@univerjs-pro/collaboration-client 1.0.2 → 1.0.4

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 (85) 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/umd/facade.js +1 -1
  65. package/lib/umd/index.js +1 -1
  66. package/lib/umd/locale/ar-SA.js +1 -1
  67. package/lib/umd/locale/ca-ES.js +1 -1
  68. package/lib/umd/locale/de-DE.js +1 -1
  69. package/lib/umd/locale/en-US.js +1 -1
  70. package/lib/umd/locale/es-ES.js +1 -1
  71. package/lib/umd/locale/fa-IR.js +1 -1
  72. package/lib/umd/locale/fr-FR.js +1 -1
  73. package/lib/umd/locale/id-ID.js +1 -1
  74. package/lib/umd/locale/it-IT.js +1 -1
  75. package/lib/umd/locale/ja-JP.js +1 -1
  76. package/lib/umd/locale/ko-KR.js +1 -1
  77. package/lib/umd/locale/pl-PL.js +1 -1
  78. package/lib/umd/locale/pt-BR.js +1 -1
  79. package/lib/umd/locale/ru-RU.js +1 -1
  80. package/lib/umd/locale/sk-SK.js +1 -1
  81. package/lib/umd/locale/vi-VN.js +1 -1
  82. package/lib/umd/locale/zh-CN.js +1 -1
  83. package/lib/umd/locale/zh-HK.js +1 -1
  84. package/lib/umd/locale/zh-TW.js +1 -1
  85. package/package.json +15 -15
package/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- const _0x16128c=_0x4c27;(function(_0x54d701,_0x21173e){const _0x5c6f4e=_0x4c27,_0x2a6418=_0x54d701();while(!![]){try{const _0x4cfb16=-parseInt(_0x5c6f4e(0x251))/0x1+parseInt(_0x5c6f4e(0x4c7))/0x2*(parseInt(_0x5c6f4e(0x1db))/0x3)+-parseInt(_0x5c6f4e(0x468))/0x4+-parseInt(_0x5c6f4e(0x464))/0x5+-parseInt(_0x5c6f4e(0x401))/0x6+parseInt(_0x5c6f4e(0x3b8))/0x7+-parseInt(_0x5c6f4e(0x489))/0x8*(-parseInt(_0x5c6f4e(0x3aa))/0x9);if(_0x4cfb16===_0x21173e)break;else _0x2a6418['push'](_0x2a6418['shift']());}catch(_0x2b9a58){_0x2a6418['push'](_0x2a6418['shift']());}}}(_0x1631,0x8aba6),Object[_0x16128c(0x3a6)](exports,Symbol['toStringTag'],{'value':_0x16128c(0x31e)}));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=_0x16128c(0x290),ee={};function te(_0x211bcc){const _0x187576=_0x16128c;return JSON[_0x187576(0x24f)](_0x211bcc)[_0x187576(0x471)];}function h(_0x5f1e6b){'@babel/helpers - typeof';const _0x18c4a9=_0x16128c;return h=typeof Symbol==_0x18c4a9(0x4ce)&&typeof Symbol[_0x18c4a9(0x396)]==_0x18c4a9(0x376)?function(_0x644c3f){return typeof _0x644c3f;}:function(_0x19c599){const _0x6bc64e=_0x18c4a9;return _0x19c599&&typeof Symbol=='function'&&_0x19c599[_0x6bc64e(0x24d)]===Symbol&&_0x19c599!==Symbol[_0x6bc64e(0x45c)]?_0x6bc64e(0x376):typeof _0x19c599;},h(_0x5f1e6b);}function ne(_0x522e31,_0x4fa2fe){const _0x26cc7c=_0x16128c;if(h(_0x522e31)!=_0x26cc7c(0x321)||!_0x522e31)return _0x522e31;var _0x3ccd49=_0x522e31[Symbol[_0x26cc7c(0x2ef)]];if(_0x3ccd49!==void 0x0){var _0x4bc904=_0x3ccd49[_0x26cc7c(0x2a7)](_0x522e31,_0x4fa2fe||_0x26cc7c(0x419));if(h(_0x4bc904)!='object')return _0x4bc904;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x4fa2fe===_0x26cc7c(0x508)?String:Number)(_0x522e31);}function re(_0x39fb90){const _0x4489f8=_0x16128c;var _0x52286b=ne(_0x39fb90,_0x4489f8(0x508));return h(_0x52286b)==_0x4489f8(0x376)?_0x52286b:_0x52286b+'';}function g(_0x407b97,_0x7db728,_0x2d23b2){const _0xc539f1=_0x16128c;return(_0x7db728=re(_0x7db728))in _0x407b97?Object[_0xc539f1(0x3a6)](_0x407b97,_0x7db728,{'value':_0x2d23b2,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x407b97[_0x7db728]=_0x2d23b2,_0x407b97;}let ie=function(_0x3a06e4){const _0x44aaca=_0x16128c;return _0x3a06e4[_0x44aaca(0x229)]=_0x44aaca(0x229),_0x3a06e4['PERMISSION_DENIED']=_0x44aaca(0x4cd),_0x3a06e4[_0x44aaca(0x3b6)]=_0x44aaca(0x3b6),_0x3a06e4[_0x44aaca(0x1eb)]=_0x44aaca(0x1eb),_0x3a06e4['CONFLICT']='CONFLICT',_0x3a06e4[_0x44aaca(0x47b)]='CLOSE_ROOM',_0x3a06e4[_0x44aaca(0x4a9)]='JOIN_ROOM_FAILED',_0x3a06e4[_0x44aaca(0x28f)]=_0x44aaca(0x28f),_0x3a06e4[_0x44aaca(0x320)]=_0x44aaca(0x320),_0x3a06e4[_0x44aaca(0x2aa)]=_0x44aaca(0x2aa),_0x3a06e4;}({});var _=class{constructor(){const _0x5c4855=_0x16128c;g(this,'_event$',new i[(_0x5c4855(0x21b))]()),g(this,_0x5c4855(0x47e),this[_0x5c4855(0x266)][_0x5c4855(0x45a)]());}[_0x16128c(0x4e7)](_0x36025d){const _0x1e0d33=_0x16128c;this['_event$'][_0x1e0d33(0x272)](_0x36025d);}},ae=class{constructor(){const _0x583755=_0x16128c;g(this,'_commentUpdate$',new i['Subject']()),g(this,_0x583755(0x2b5),this[_0x583755(0x38d)][_0x583755(0x45a)]());}[_0x16128c(0x4e1)](_0x1b4082){const _0x40440d=_0x16128c;this[_0x40440d(0x38d)][_0x40440d(0x272)](_0x1b4082);}};function v(_0x46fea2,_0x2c62ab){return function(_0x2c2e61,_0x242eaa){_0x2c62ab(_0x2c2e61,_0x242eaa,_0x46fea2);};}function y(_0xeda812,_0x29bb12,_0x52ef47,_0x80e484){const _0x513a9e=_0x16128c;var _0x5691fd=arguments[_0x513a9e(0x471)],_0x2ab2ad=_0x5691fd<0x3?_0x29bb12:_0x80e484===null?_0x80e484=Object['getOwnPropertyDescriptor'](_0x29bb12,_0x52ef47):_0x80e484,_0x2db85b;if(typeof Reflect==_0x513a9e(0x321)&&typeof Reflect[_0x513a9e(0x46a)]==_0x513a9e(0x4ce))_0x2ab2ad=Reflect[_0x513a9e(0x46a)](_0xeda812,_0x29bb12,_0x52ef47,_0x80e484);else{for(var _0x3eb406=_0xeda812[_0x513a9e(0x471)]-0x1;_0x3eb406>=0x0;_0x3eb406--)(_0x2db85b=_0xeda812[_0x3eb406])&&(_0x2ab2ad=(_0x5691fd<0x3?_0x2db85b(_0x2ab2ad):_0x5691fd>0x3?_0x2db85b(_0x29bb12,_0x52ef47,_0x2ab2ad):_0x2db85b(_0x29bb12,_0x52ef47))||_0x2ab2ad);}return _0x5691fd>0x3&&_0x2ab2ad&&Object[_0x513a9e(0x3a6)](_0x29bb12,_0x52ef47,_0x2ab2ad),_0x2ab2ad;}let b=class extends t[_0x16128c(0x31f)]{constructor(_0x38b14e){const _0x490788=_0x16128c;super(),this[_0x490788(0x32c)]=_0x38b14e,g(this,'_roomMembers',new Map()),g(this,_0x490788(0x493),new i['Subject']()),this[_0x490788(0x31d)]((0x0,i['merge'])(this['_univerInstanceService'][_0x490788(0x439)](t[_0x490788(0x3c4)]['UNIVER_SHEET'])[_0x490788(0x476)]((0x0,s['map'])(_0x504fc1=>_0x504fc1[_0x490788(0x2f0)]())),this[_0x490788(0x32c)][_0x490788(0x439)](t[_0x490788(0x3c4)]['UNIVER_DOC'])[_0x490788(0x476)]((0x0,s[_0x490788(0x2b2)])(_0x3db08c=>_0x3db08c[_0x490788(0x2f0)]())),this[_0x490788(0x32c)][_0x490788(0x439)](t[_0x490788(0x3c4)]['UNIVER_BOARD'])[_0x490788(0x476)]((0x0,s[_0x490788(0x2b2)])(_0x3a9b0a=>_0x3a9b0a[_0x490788(0x2f0)]())),this[_0x490788(0x32c)][_0x490788(0x439)](t[_0x490788(0x3c4)]['UNIVER_BASE'])[_0x490788(0x476)]((0x0,s[_0x490788(0x2b2)])(_0x1a7cff=>_0x1a7cff[_0x490788(0x2f0)]())))['subscribe'](_0x3480e1=>this[_0x490788(0x38b)](_0x3480e1)));}['waitForRoom$'](_0x25b9c6){const _0x9937c6=_0x16128c;return this['_roomMembers'][_0x9937c6(0x339)](_0x25b9c6)?(0x0,i['of'])(this[_0x9937c6(0x24b)]['get'](_0x25b9c6)):this['_roomCreated$'][_0x9937c6(0x476)]((0x0,s[_0x9937c6(0x2b2)])(_0x3031e9=>{const _0x53b8fe=_0x9937c6;if(_0x3031e9===_0x25b9c6)return this['_roomMembers'][_0x53b8fe(0x1f1)](_0x3031e9);}));}['updateMember'](_0x3b0060,_0x17f92e){const _0x1dcde2=_0x16128c;let _0x5d152f=this['_roomMembers'][_0x1dcde2(0x1f1)](_0x3b0060);_0x5d152f||(_0x5d152f=new oe(),this[_0x1dcde2(0x24b)][_0x1dcde2(0x2b4)](_0x3b0060,_0x5d152f),this['_roomCreated$'][_0x1dcde2(0x272)](_0x3b0060)),_0x5d152f[_0x1dcde2(0x2b0)](_0x17f92e);}[_0x16128c(0x261)](_0xfaf32a,_0x18391c){const _0xae32ec=_0x16128c;let _0x53e535=this[_0xae32ec(0x24b)][_0xae32ec(0x1f1)](_0xfaf32a);_0x53e535&&_0x53e535[_0xae32ec(0x261)](_0x18391c);}[_0x16128c(0x341)](_0x942c33){const _0x53a83f=_0x16128c;return this['_roomMembers'][_0x53a83f(0x1f1)](_0x942c33);}[_0x16128c(0x3dc)](_0x5a8bd6,_0x5118a4){const _0x19a678=_0x16128c;let _0x46061a=this[_0x19a678(0x24b)][_0x19a678(0x1f1)](_0x5a8bd6);if(_0x46061a)return _0x46061a[_0x19a678(0x3dc)](_0x5118a4);}[_0x16128c(0x38b)](_0x3aaff1){const _0x1d25ab=_0x16128c;let _0x1cfdeb=this[_0x1d25ab(0x24b)][_0x1d25ab(0x1f1)](_0x3aaff1);_0x1cfdeb&&(_0x1cfdeb[_0x1d25ab(0x22b)](),this[_0x1d25ab(0x24b)]['delete'](_0x3aaff1));}[_0x16128c(0x22b)](){const _0x42e05d=_0x16128c;this[_0x42e05d(0x24b)]['forEach'](_0x1eaec2=>_0x1eaec2[_0x42e05d(0x22b)]()),this[_0x42e05d(0x24b)]['clear'](),this['_roomCreated$'][_0x42e05d(0x26e)]();}};b=y([v(0x0,t[_0x16128c(0x399)])],b);var oe=class extends t[_0x16128c(0x31f)]{constructor(..._0x31e20e){const _0x38221d=_0x16128c;super(..._0x31e20e),g(this,_0x38221d(0x36d),new Map()),g(this,_0x38221d(0x1fc),new i[(_0x38221d(0x204))](this['_members'])),g(this,_0x38221d(0x258),this['_members$'][_0x38221d(0x45a)]());}[_0x16128c(0x22b)](){const _0x36ebf1=_0x16128c;this[_0x36ebf1(0x36d)][_0x36ebf1(0x292)](),this[_0x36ebf1(0x1fc)][_0x36ebf1(0x26e)]();}[_0x16128c(0x2b0)](_0x23df52){const _0x267633=_0x16128c;this[_0x267633(0x36d)]['set'](_0x23df52[_0x267633(0x2a6)],_0x23df52),this['_emitMembers']();}[_0x16128c(0x261)](_0x3ad318){const _0x352767=_0x16128c;this[_0x352767(0x36d)][_0x352767(0x328)](_0x3ad318),this['_emitMembers']();}[_0x16128c(0x3dc)](_0x43c21c){const _0x552b76=_0x16128c;return this[_0x552b76(0x36d)]['get'](_0x43c21c);}[_0x16128c(0x29f)](){const _0x4ea5a0=_0x16128c;return Array[_0x4ea5a0(0x3ba)](this[_0x4ea5a0(0x36d)][_0x4ea5a0(0x3af)]());}[_0x16128c(0x3f9)](){const _0xef0c9d=_0x16128c;this[_0xef0c9d(0x1fc)][_0xef0c9d(0x272)](this[_0xef0c9d(0x36d)]);}};function se(_0x5ed8d5,_0x3ec800){const _0x34cfc1=_0x16128c;if(le(_0x5ed8d5))return _0x3ec800;if(_0x3ec800[_0x34cfc1(0x25c)]===e[_0x34cfc1(0x1f4)][_0x34cfc1(0x2bf)]){let _0x27c1e2=me(_0x5ed8d5),_0x2a1275=_0x3ec800;return{..._0x2a1275,'data':{..._0x2a1275[_0x34cfc1(0x223)],'unitID':_0x5ed8d5[_0x34cfc1(0x218)][_0x34cfc1(0x367)],'unitType':_0x5ed8d5['target'][_0x34cfc1(0x4e0)]??_0x2a1275[_0x34cfc1(0x223)][_0x34cfc1(0x4e0)],'changeset':_0x27c1e2[_0x34cfc1(0x262)](_0x2a1275['data'][_0x34cfc1(0x3ad)],he(_0x5ed8d5))}};}if(_0x3ec800['eventID']===e[_0x34cfc1(0x1f4)][_0x34cfc1(0x355)]){let _0x1410ad=_0x3ec800;return{..._0x1410ad,'data':{..._0x1410ad['data'],'unitID':_0x5ed8d5[_0x34cfc1(0x218)][_0x34cfc1(0x367)],'unitType':_0x5ed8d5[_0x34cfc1(0x218)][_0x34cfc1(0x4e0)]??_0x1410ad[_0x34cfc1(0x223)][_0x34cfc1(0x4e0)]}};}return _0x3ec800;}function ce(_0x4f0e81,_0x4bbe50){const _0x13bb58=_0x16128c;if(le(_0x4f0e81))return[_0x4bbe50];switch(_0x4bbe50[_0x13bb58(0x25c)]){case e[_0x13bb58(0x1f4)][_0x13bb58(0x2db)]:return[ue(_0x4f0e81,_0x4bbe50)];case e['CollaborationEvent'][_0x13bb58(0x4a4)]:return[fe(_0x4f0e81,_0x4bbe50)];case e[_0x13bb58(0x1f4)][_0x13bb58(0x2a3)]:return[de(_0x4f0e81,_0x4bbe50)];default:return[_0x4bbe50];}}function le(_0x2de903){const _0xdb58ef=_0x16128c;return _0x2de903['target'][_0xdb58ef(0x32f)]==null&&_0x2de903[_0xdb58ef(0x218)][_0xdb58ef(0x367)]===_0x2de903[_0xdb58ef(0x4dc)]&&!_0x2de903['changeset'];}function ue(_0x153508,_0x54e85e){const _0x277d95=_0x16128c;return{..._0x54e85e,'data':(0x0,e[_0x277d95(0x1f9)])(pe(_0x153508,(0x0,e['parseProtocolChangeset'])(_0x54e85e[_0x277d95(0x223)])))};}function de(_0x4f1f3d,_0x3f4533){return{..._0x3f4533,'data':pe(_0x4f1f3d,_0x3f4533['data'])};}function fe(_0x86908e,_0x612289){const _0x110e40=_0x16128c;let _0x35af04=_0x612289[_0x110e40(0x223)];return{..._0x612289,'data':{..._0x35af04,'changesets':_0x35af04['changesets'][_0x110e40(0x2b2)](_0x29f183=>(0x0,e['parseChangesetToProtocol'])(pe(_0x86908e,(0x0,e[_0x110e40(0x453)])(_0x29f183))))}};}function pe(_0xdbbb1f,_0x2a956c){const _0x774802=_0x16128c;return me(_0xdbbb1f)[_0x774802(0x426)](_0x2a956c,he(_0xdbbb1f));}function me(_0x59c828){const _0x108df8=_0x16128c;if(!_0x59c828[_0x108df8(0x3ad)])throw Error('COLLABORATION_CHANGESET_TRANSLATION_REQUIRED');return _0x59c828[_0x108df8(0x3ad)];}function he(_0x4f2764){const _0x165ee3=_0x16128c;return{'localUnitId':_0x4f2764[_0x165ee3(0x4dc)],'unitType':_0x4f2764[_0x165ee3(0x4e0)],'target':_0x4f2764[_0x165ee3(0x218)]};}let ge=function(_0x4af09e){const _0x195899=_0x16128c;return _0x4af09e[_0x4af09e[_0x195899(0x2f2)]=0x0]=_0x195899(0x2f2),_0x4af09e[_0x4af09e[_0x195899(0x3a3)]=0x1]='JOINING',_0x4af09e[_0x4af09e[_0x195899(0x256)]=0x2]=_0x195899(0x256),_0x4af09e[_0x4af09e[_0x195899(0x1e0)]=0x3]='ONLINE',_0x4af09e;}({});const _e={[a['CmdRspCode'][_0x16128c(0x483)]]:_0x16128c(0x32a),[a['CmdRspCode']['JOIN_ROOM_FULL']]:'session.room-full',[a[_0x16128c(0x259)][_0x16128c(0x2b9)]]:_0x16128c(0x4db),[a[_0x16128c(0x259)][_0x16128c(0x388)]]:_0x16128c(0x405),[a[_0x16128c(0x259)][_0x16128c(0x43a)]]:_0x16128c(0x3db)};let ve=class extends t[_0x16128c(0x313)]{get[_0x16128c(0x221)](){return this['_sessionStatus$']['getValue']();}constructor(_0x5e39de,_0x13a1bf,_0xcfd97a,_0x4349a1,_0x1bd462,_0x4efc5a,_0x2243dc,_0x40bdd7){const _0x20e891=_0x16128c;super(),this[_0x20e891(0x366)]=_0x5e39de,this[_0x20e891(0x451)]=_0xcfd97a,this[_0x20e891(0x20e)]=_0x4349a1,this[_0x20e891(0x248)]=_0x1bd462,this[_0x20e891(0x2d3)]=_0x4efc5a,this[_0x20e891(0x3ce)]=_0x2243dc,this['_telemetryService']=_0x40bdd7,g(this,_0x20e891(0x324),new i[(_0x20e891(0x204))](0x0)),g(this,'sessionStatus$',this['_sessionStatus$']['asObservable']()),g(this,'_event$',new i['Subject']()),g(this,_0x20e891(0x47e),this['_event$'][_0x20e891(0x45a)]()),g(this,_0x20e891(0x4be),void 0x0),g(this,_0x20e891(0x21a),void 0x0),g(this,_0x20e891(0x4c5),void 0x0),g(this,_0x20e891(0x4e3),!0x1),g(this,_0x20e891(0x214),null),this[_0x20e891(0x4e3)]=!!this[_0x20e891(0x40e)],_0x13a1bf['pipe']((0x0,i[_0x20e891(0x2ed)])(this[_0x20e891(0x343)]))['subscribe'](_0x4b923e=>{const _0x34ddd1=_0x20e891;if(_0x4b923e!==void 0x0){if(this[_0x34ddd1(0x4be)]=_0x4b923e,_0x4b923e)this[_0x34ddd1(0x509)](_0x4b923e),this[_0x34ddd1(0x21a)]=_0x4b923e['message$'][_0x34ddd1(0x3f8)](_0x30a0cc=>{const _0x15715c=_0x34ddd1;_0x30a0cc[_0x15715c(0x38c)]===this[_0x15715c(0x366)][_0x15715c(0x218)][_0x15715c(0x367)]&&this[_0x15715c(0x484)](_0x30a0cc);});else{var _0x1d19d7;this[_0x34ddd1(0x4ab)](),this[_0x34ddd1(0x324)][_0x34ddd1(0x272)](0x2),(_0x1d19d7=this[_0x34ddd1(0x21a)])==null||_0x1d19d7[_0x34ddd1(0x3e2)](),this[_0x34ddd1(0x21a)]=null;}}});}[_0x16128c(0x347)](){const _0x498405=_0x16128c;var _0x481f1e;return((_0x481f1e=this['_socket'])==null?void 0x0:_0x481f1e[_0x498405(0x2a6)])??null;}[_0x16128c(0x22b)](){const _0x490bf4=_0x16128c;super[_0x490bf4(0x22b)](),this[_0x490bf4(0x41e)](),this[_0x490bf4(0x343)][_0x490bf4(0x272)](),this[_0x490bf4(0x343)][_0x490bf4(0x26e)]();}[_0x16128c(0x41e)](){const _0x24851e=_0x16128c;var _0x5be0d7;this[_0x24851e(0x4ab)](),(_0x5be0d7=this[_0x24851e(0x4be)])==null||_0x5be0d7[_0x24851e(0x389)]({'cmd':a[_0x24851e(0x3c0)]['LEAVE'],'data':{'roomID':this['_identity'][_0x24851e(0x218)][_0x24851e(0x367)]}}),this[_0x24851e(0x266)]['complete'](),this[_0x24851e(0x324)]['complete']();}[_0x16128c(0x484)](_0x374530){const _0x650c93=_0x16128c;_0x374530[_0x650c93(0x37f)]===a['CombCmd'][_0x650c93(0x4cb)]?this[_0x650c93(0x33d)](_0x374530):_0x374530['cmd']===a[_0x650c93(0x3c0)][_0x650c93(0x2b6)]&&this['_onRecvEvent'](_0x374530);}[_0x16128c(0x509)](_0x431c3d){const _0x418c47=_0x16128c;this['_sessionStatus$'][_0x418c47(0x272)](0x1),_0x431c3d['send']({'cmd':a[_0x418c47(0x3c0)]['JOIN'],'routeKey':this[_0x418c47(0x366)][_0x418c47(0x218)][_0x418c47(0x367)],'routeType':'','data':{'rooms':[{'roomID':this[_0x418c47(0x366)]['target']['unitId']}]}});}[_0x16128c(0x33d)](_0x2eb1de){const _0x23166d=_0x16128c;var _0x49a7f0;if(_0x2eb1de[_0x23166d(0x2e0)]in _e){this['_collaborationUIEventService'][_0x23166d(0x4e7)]({'id':_0x23166d(0x4a9),'data':_e[_0x2eb1de['code']]}),this['_sessionStatus$']['next'](0x2);return;}this['_sessionStatus$'][_0x23166d(0x272)](0x3);let _0x46fea7=(_0x49a7f0=_0x2eb1de[_0x23166d(0x223)][_0x23166d(0x473)][this[_0x23166d(0x366)][_0x23166d(0x218)]['unitId']])==null?void 0x0:_0x49a7f0[_0x23166d(0x244)];_0x46fea7&&_0x46fea7[_0x23166d(0x43b)](_0x4bd09b=>this[_0x23166d(0x248)][_0x23166d(0x2b0)](this[_0x23166d(0x366)][_0x23166d(0x4dc)],_0x4bd09b));}[_0x16128c(0x243)](_0x5cc3e5){const _0x3b9a51=_0x16128c;try{let _0x15ff1b=ce(this[_0x3b9a51(0x366)],_0x5cc3e5['data']);for(let _0x166a4d of _0x15ff1b)switch(_0x166a4d[_0x3b9a51(0x25c)]){case e['CollaborationEvent'][_0x3b9a51(0x1e1)]:this[_0x3b9a51(0x33c)](_0x166a4d),this[_0x3b9a51(0x266)][_0x3b9a51(0x272)](_0x166a4d);break;case e[_0x3b9a51(0x1f4)][_0x3b9a51(0x239)]:this[_0x3b9a51(0x283)](_0x166a4d),this[_0x3b9a51(0x266)][_0x3b9a51(0x272)](_0x166a4d);break;case e[_0x3b9a51(0x1f4)]['CHANGESET_ACK']:case e[_0x3b9a51(0x1f4)][_0x3b9a51(0x2a3)]:this[_0x3b9a51(0x47f)](),this['_clearCollaborationTimeoutTimer'](),this[_0x3b9a51(0x266)]['next'](_0x166a4d);break;case e[_0x3b9a51(0x1f4)][_0x3b9a51(0x2fa)]:this[_0x3b9a51(0x451)][_0x3b9a51(0x1d8)](_0x3b9a51(0x308)+JSON[_0x3b9a51(0x24f)](_0x166a4d)),this['_event$'][_0x3b9a51(0x272)](_0x166a4d);break;case e[_0x3b9a51(0x1f4)][_0x3b9a51(0x2a8)]:this[_0x3b9a51(0x2d3)]['onCommentUpdate'](_0x166a4d[_0x3b9a51(0x223)]),this['_event$'][_0x3b9a51(0x272)](_0x166a4d);break;default:this[_0x3b9a51(0x266)][_0x3b9a51(0x272)](_0x166a4d);}}catch(_0x387174){this['_logService']['error'](_0x387174,_0x5cc3e5);}}[_0x16128c(0x33c)](_0x466e20){const _0x2b0966=_0x16128c;this[_0x2b0966(0x248)][_0x2b0966(0x2b0)](this['_identity']['localUnitId'],_0x466e20['data']);}[_0x16128c(0x283)](_0x509e9b){const _0x56112c=_0x16128c;this[_0x56112c(0x248)][_0x56112c(0x261)](this['_identity'][_0x56112c(0x4dc)],_0x509e9b[_0x56112c(0x223)][_0x56112c(0x2a6)]);}async[_0x16128c(0x389)](_0x47b7a3,_0x29e306){const _0x10a498=_0x16128c;if(this[_0x10a498(0x221)]!==0x3||!this[_0x10a498(0x4be)])throw Error(_0x10a498(0x44e));try{let _0x420050=se(this[_0x10a498(0x366)],_0x47b7a3);_0x420050['eventID']===e[_0x10a498(0x1f4)][_0x10a498(0x2bf)]&&(this['_scheduleCollaborationTimeoutTimer'](),this[_0x10a498(0x2e3)](_0x420050)),this[_0x10a498(0x4be)]['send']({'cmd':a[_0x10a498(0x3c0)]['INGEST'],'routeKey':this[_0x10a498(0x366)]['target'][_0x10a498(0x367)],'routeType':'','data':_0x420050});}catch(_0x4e76ae){this[_0x10a498(0x451)][_0x10a498(0x1d8)](_0x4e76ae);}}[_0x16128c(0x3bb)](){const _0x2dd822=_0x16128c;this[_0x2dd822(0x4c5)]=setTimeout(()=>{const _0x5c1fd7=_0x2dd822;this[_0x5c1fd7(0x4c5)]=null,this[_0x5c1fd7(0x3ce)]['emitEvent']({'id':'SUBMIT_CHANGESET_TIMEOUT'});},this[_0x2dd822(0x20e)]['getConfig'](_0x2dd822(0x263))??0x4e20);}[_0x16128c(0x4eb)](){const _0x54ef95=_0x16128c;this[_0x54ef95(0x4c5)]&&=(clearTimeout(this['_collaborationTimeoutTimer']),null);}['_startTelemetryCollaborationNewChangeset'](_0xecd64d){const _0x2322f6=_0x16128c;if(!this[_0x2322f6(0x4e3)])return;let {data:_0x5b9161}=_0xecd64d,{unitID:_0x67238e,changeset:_0x5c7f5c}=_0x5b9161,{mutations:_0x587cdf,type:_0x8f817b}=_0x5c7f5c;this[_0x2322f6(0x214)]={'unitId':_0x67238e,'type':_0x8f817b,'startTime':performance[_0x2322f6(0x253)](),'stopTime':0x0,'duration':0x0,'size':te(_0x587cdf)};}[_0x16128c(0x47f)](){const _0x5e61bd=_0x16128c;if(this[_0x5e61bd(0x4e3)]){if(!this[_0x5e61bd(0x214)]){this[_0x5e61bd(0x451)][_0x5e61bd(0x1d8)](_0x5e61bd(0x434),_0x5e61bd(0x37d));return;}this[_0x5e61bd(0x214)]['stopTime']=performance['now'](),this[_0x5e61bd(0x214)][_0x5e61bd(0x465)]=this[_0x5e61bd(0x214)]['stopTime']-this['_telemetryInfo'][_0x5e61bd(0x27b)],this[_0x5e61bd(0x40e)][_0x5e61bd(0x202)](_0x5e61bd(0x20f),this[_0x5e61bd(0x214)]),this[_0x5e61bd(0x214)]=null;}}[_0x16128c(0x4ab)](){const _0x2eb465=_0x16128c;this[_0x2eb465(0x214)]=null;}};ve=y([v(0x2,t[_0x16128c(0x22c)]),v(0x3,t[_0x16128c(0x35d)]),v(0x4,(0x0,t[_0x16128c(0x4c0)])(b)),v(0x5,(0x0,t[_0x16128c(0x4c0)])(ae)),v(0x6,(0x0,t['Inject'])(_)),v(0x7,(0x0,t[_0x16128c(0x2e7)])(o[_0x16128c(0x24a)]))],ve);const x=(0x0,t[_0x16128c(0x2e5)])('collaboration-client.local-cache-service');function ye(_0x568b49){return'unit-cache-'+_0x568b49;}function be(_0x485dbc){const _0x39df3a=_0x16128c;let {unitID:_0x59c01c,mutations:_0x151fca}=_0x485dbc;return{'unitId':_0x59c01c,'subUnitId':_0x151fca['length']>0x0?_0x151fca[0x0][_0x39df3a(0x4f8)][_0x39df3a(0x3be)]:null};}function _0x1631(){const _0x3d5ebe=['you\x20should\x20override\x20\x22IUndoRedoService\x22\x20provided\x20in\x20\x22core\x22\x20package!','CollaborationAttachmentIoService','saveSnapshot','SheetsSelectionsService','JOIN_ROOM_FAILED','enableAuthServer','_throwTelemetryCollaborationNewChangeset','sid','/object','delay','includes','subject','catch','[SyncedState]:\x20invalid\x20calling\x20to\x20`resend`.','/allowed','{fileID}','Tools','incrementRevOfUnit','SUCCUSS','_userManagerService','univer-pro.collaboration-client.network-condition.service','SheetCollaborationEntity','_transformUndoredo','ISnapshotServerService','COMPRESS_MUTATION_APPLY','_socket','confirm','Inject','/universer-api/oidc/authpage','[SyncedState]:\x20received\x20acknowledgement.','_collaborationSessionService','[CollaborationEntity]:\x20initial\x20state\x20has\x20been\x20created\x20before.\x20You\x20should\x20not\x20call\x20\x22init\x22\x20twice.','_collaborationTimeoutTimer','_pendingMutations','40628ELzQHR','rev','focused$','[CollaborationEntity]:\x20invalid\x20state\x20transition!\x20State\x20transferred\x20from\x20is\x20not\x20the\x20current\x20state.\x0aBefore:\x20','JOIN','subType','PERMISSION_DENIED','function','collabSubmitChangesetUrl','changesets','_scheduleCompleteTimestamp','Board','setWaitCount','SnapshotService','_onOffline','[UniverCollaborationClientPlugin]:\x20you\x20must\x20provide\x20a\x20socketService\x20implementation\x20in\x20config!','_createSocket','UNIVER_SHEET','textEncoder','push','session.room-not-exists','localUnitId','objectPermissionTypes','every','resolve','unitType','onCommentUpdate','_exhaustRemoteChangesetQueue','_shouldReportTelemetry','min','/fetchmissing?from=','_getCurrentRevision','emitEvent','socketMessageSubscription','toString','offline','_clearCollaborationTimeoutTimer','localeService','range','find','_clearUndo','newCsEvent','status$','[CollaborationController]:\x20invalid\x20univer\x20type:\x20','getImageSourceCache','_getRedoStack','/universer-api/authz','failed\x20to\x20apply\x20missed\x20changesets!','UNIVER_BASE','params','mergeOverrideWithDependencies','_startCollaboration','permissionRejEvent','HEARTBEAT','UNIVER_SLIDE','DisposableCollection','csAckEvent','_collabSessionService','CollaborationUIEventId','accept','[PendingState]:\x20received\x20rejection.','sendHeartbeatTimer','PERMISSION_REJ','_prepareConflictRecovery','setConfig','string','_joinRoom','_onRemoteACK','encode','originalMeta','_sheetTransformSelectionsService','\x0aAfter:\x20','/universer-api/comb','COLLABORATION_ENDPOINT_INVALID','/role','charCodeAt','_syncEditingCollabCursor','parse','_initMergeInterceptor','textRanges','[ConflictState]:\x20invalid\x20calling\x20to\x20`resend`.','hostname','_config','getSheetBlock','refreshUnit','awaitingChangeset','error','put','docStateChange$','57CJIKFj','concatMap','getConfig','Failed\x20to\x20update\x20permission\x20point','RichTextEditingMutation','ONLINE','USERS_ENTER','getUnitType','/resources','collaboration-client.auth.needGotoLoginAlert','transformSelections','_getUndoStack','isArray','signUrlServerUrl','deepClone','pluginName','CONFLICT_CACHE_CLEAR_FAILED','commit','[PendingState]:\x20invalid\x20calling\x20to\x20`resend`.','isCompositionEnd','_tryEnsureSocket','updatePermissionObjEvent','get','_resendTimer','LOCAL_CACHE_INTERVAL','CollaborationEvent','IPermissionService','headers','ObjectPermissionService','_executeRemoteChangeset','parseChangesetToProtocol','file','_status$','_members$','origin','getFocusedUnit','mapDocumentTypeToUniverInstanceType','_injector','getTypeOfUnitAdded$','capture','UserManagerService','BehaviorSubject','selections','&source=','_getSocketChannel','mutations','_pendingSessions','patch','body','[CollaborationSocketService]:\x20failed\x20to\x20create\x20socket!','post','_configService','collaboration_new_changeset','onTransformRemoteChangesetByIMECache','ICollaborationClientAdapterService','&assign=','commentUpdateEvent','_telemetryInfo','_instanceService','then','_socketService','target','_acknowledgeAwaitingIfReady','_socketMessageSubscription','Subject','c2Prime','CollaborationStatus','_handlerCallback','onTransformRemoteChangesetByStateCache','univer-pro.collaboration-client.single-active-unit-service','sessionStatus','UniverCollaborationClientPlugin','data','ImageSourceType','missingChangesets','actions','LOCAL_CACHE_INTERVAL_KEY','initWorkbookPermissionChange','OTHER_CLIENT_EDITING','CompressMutationService','dispose','ILogService','_docStateChangeManagerService','This\x20method\x20should\x20not\x20be\x20called\x20on\x20the\x20client\x20side!','_doCreateSocket','LEAVE','objectID','_lockTransition','touchDependencies','_getUploadFileURL','debug','some','_change$','_transformService','USERS_LEAVE','getValue','requestParams','isTransformChangesetsSuccess','batchAllowed','CollaborationController','merge','MUTATION','/block/','DRAWING_IMAGE_ALLOW_IMAGE_LIST','_onRecvEvent','members','state$','_toggleOnline','__splitChunk__','_memberService','?url=','ITelemetryService','_roomMembers','DEFAULT_WS_SESSION_TICKET_URL','constructor','_snapshotServerService','stringify','_state$','1005553hFVOtV','number','now','MentionType','utf8ToBytes','OFFLINE','_hasSessionsForEndpoint','members$','CmdRspCode','_sessionChannels','@univerjs-pro/collaboration-client','eventID','_waitForHeartbeatResponse','rollback','sequenceExecute','_singleActiveUnitService','removeMember','toRemote','HEARTBEAT_TIMEOUT','[FetchMissState]','endsWith','_event$','_resendTimeout','/universer-api/snapshot','[CollaborationAttachmentIoService]:\x20unitId\x20is\x20not\x20found.','authzUrl','endpointKey','COMPRESS_MUTATION_SEND','Edit','complete','ERROR_EXCEED_SIZE','_onConnectionFailed','href','next','_waitCount','_snapshotService','m2Prime','collaboratorID','x-univer-host','[CollaborationUndoRedoService]','loadDoc','IMentionIOService','startTime','RevisionService','_substituteRedoStack','take','HTTPService','reqId','_fetchMissChangesets','_entities','_onUserLeave','toggleOnline','_closedUnits','onload','_compressMutationService','_transformStateCache','resend','ITransformService','NO_OTHER_CLIENTS_EDITING','baseRev','enableCollaboration','_sender','SOCKET_FAILED_RETRY','collaboration-client.config','REMOTE_UNISCRIPT_EXECUTION_ENDPOINT_KEY','clear','conflict','LocalUndoRedoService','infoRsp','Document','_commandService','onSyncEditingCollabCursor','UnitEmbedded','loadOfflineData','POST','_createInitialStateImpl','Base','[CollaborationAttachmentIoService]:\x20attachment\x20exceeds\x20max\x20size.','getAllMembers','SYNCED','socketReady','UPDATE_PERMISSION_OBJ','CHANGESET_SHOULD_RETRY','_clearRedo','[SyncedState]:\x20received\x20rejection.','memberID','call','COMMENT_UPDATE','_collaborationPaused','SUBMIT_CHANGESET_TIMEOUT','getImage','_transformRemoteChangesetByStateCache','socket\x20open.','[FetchingMissState]:\x20not\x20expected\x20to\x20receive\x20ack\x20when\x20`this._awaitingChangeset`\x20is\x20null!','_clearScheduledTask','updateMember','_socketChannels','map','/universer-api/stream/file/upload','set','commentUpdate$','RECV','PdfCollaborationEntity','IContextService','JOIN_ROOM_NOT_EXISTS','editingUnit','saveChangeset','_registerDependencies','executeCommand','AWAITING_WITH_PENDING','SUBMIT_CHANGESET','onStarting','HELLO','toggleOffline','unknown','HTTPRequest','_onMessage','CollaborativeUndoRedoService','ImageUploadStatusType','SyncedState','b64DecodeUnicode','transformUndoRedo','reject','transformChangesets','size','_tryReconnect','UNIVER_COLLABORATION_CLIENT_PLUGIN','randomBytes','clearOfflineData','[CollaborationEntity]','_commentService','getResourcesRequest','\x20to\x20','PENDING','createUniverCollaborationAdapter','collabWebSocketUrl','OBJECT_PERMISSION_CONFIG_KEY','supports','NEW_CHANGESETS','loadSheet','_handler','_localeService','filter','code','UNIVER_PDF','/-/object/list','_startTelemetryCollaborationNewChangeset','PendingState','createIdentifier','generateRandomId','Optional','UniverCollaborationPlugin','setShowComponents','_prepareTransformSelections','UnitObject','localCacheService','takeUntil','FileId','toPrimitive','getUnitId','concatBytes','IDLE','[PendingState]:\x20received\x20acknowledgement.','result','collaborators','_init','c1Prime','[FetchingMissState]:\x20invalid\x20calling\x20to\x20`resend`.','_isPermissionRej','MSG_FOR_ERROR','/new_changes','_networkConditionService','[OfflineState]:\x20received\x20changeset.','UniverNetworkPlugin','PERSON','_getLoginPath','retryConnectingTimer','url','saveImage','_authzIoService','connection\x20error','Quantity','slice','save\x20fail\x20reason\x20is\x20','trim','onMutationExecutedForCollab','encrypt','csShouldRetryEvent','[FetchMissState]:\x20missing\x20changesets\x20response\x20still\x20has\x20revision\x20gaps.','override','JSONX','close$','UNISCRIPT_RUN','_createInitialState','RxDisposable','MentionIoHttpService','_clearTimeoutTimer','ICommandService','_disposed','createInstance','pauseCollaboration','registerHTTPInterceptor','ws://127.0.0.1:8000/universer-api/comb/connect','_onRemoteRejected','disposeWithMe','Module','Disposable','SOCKET_FAILED','object','getCollabEntity$','getUploadOptions','_sessionStatus$','socket\x20close','IImageIoService','_getSignURL','delete','DEFAULT_REMOTE_UNISCRIPT_EXECUTION_ENDPOINT','session.join-failed','createSocket','_univerInstanceService','_onFetchMissResult','listRoles','endpoint','_getSendChangesetTimeout','serializeCombRequest','_rescheduleHeartbeat','_schedule','isTransformMutationsWithChangesetSuccess','saveAttachment','_HTTPService','uuidv4','_incrementRevisionNumber','has','CONFLICT','Injector','_onUserJoin','_onJoinRoomEvent','_replayCachedMutations','LIVESHARE_OPERATION','update','getRoom','objectType','dispose$','_unitLoaded$','firstValueFrom','LIVESHARE_FETCH_OPERATIONS','getMemberID','method','online$','toDisposable','text-x','/rev/','_initDependencies','SlideCollaborationEntity','AWAITING','COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY','CommandType','_clearHeartbeatTimer','listCollaborators','NOT_COLLAB','FETCH_MISSING','updateOfflineData','tables','_revisionService','/universer-api/file/{fileID}/sign-url','fetch_missing','ErrorCode','unitInfo$','IConfigService','submit\x20changeset\x20error!','getCurrentRevOfUnit','_transformIMECache','_createHandler','not_collab','open$','roles','objectId','_identity','unitId','clearUnit','INGEST','addImageSourceCache','AwaitingWithPendingState','Workbook','_members','getCollabEntity','session','_showConflictNotification','InsertSheetMutation','appendMutation','\x0aCurrent:\x20','sheets','transformMutationsWithChangeset','symbol','reverse','floor','onRemoteRej','replace','onRemoteAck','columnGroups','telemetry\x20info\x20is\x20not\x20initialized','downloadEndpointUrl','cmd','_resendWithTimeout','[PendingState]:\x20unhandled\x20univer\x20type:\x20','BaseCollaborationEntity','_eventService','_acknowledgeAwaiting','univer-pro.collaboration-client-socket-service','_onRemoteChangeset','loadPdf','JOIN_ROOM_PERMISSION_DENIED','send','enableOfflineEditing','_removeRoom','routeKey','_commentUpdate$','_replaceFileID','AddSlidePageMutation','fetching\x20the\x20latest\x20document\x20from\x20the\x20server.','_onConnectionOpen','[OfflineState]:\x20received\x20acknowledgement.','_upload','_updateUnitPermissionPoint','_acknowledgedAwaitingRevision','iterator','liveShareOperation','_transformSelections','IUniverInstanceService','onTransformIME','getCfgEnableObjInherit','requireSession','findIndex','\x20in\x20_schedule.','uniscriptRunEvent','location','_getCtorByUniverInstanceType','_initUnitPermissionChange','JOINING','_httpService','onRemoteChangeset','defineProperty','max','IAuthzIoService','fetchThroughInterceptors','4236273VDLLod','OPTIONAL','isPermissionRej','changeset','leaveEvent','values','FETCH_MISS','_sessions','_unitInfo$','_createSession','socketService','_refreshUnitPermission','CONFLICT_PROCESSING','refreshPermission','619633DdiKsW','unitID','from','_scheduleCollaborationTimeoutTimer','_unlockTransition','LIVESHARE_TERMINATE','subUnitId','_getDownloadEndpointURL','CombCmd','CollaborationSession','fromCollab','MemberService','UniverInstanceType','WorkbookEditablePermission','ThresholdInterceptorFactory','revision','UUID','[CollaborationSessionService]:\x20socket\x20error','HEARTBEAT_INTERVAL_KEY','list','BoardCollaborationEntity','startsWith','_collaborationUIEventService','withCredentials','_applyRemoteChangeset','/universer-api/snapshot/','_clearRetryConnectingTimer','DependentOn','interceptor','[FetchingMissState]:\x20received\x20stale\x20ack\x20revision:\x20','onlyLocal','_remoteChangesetQueue','disableLocalCache','hasOwnProperty','apply','session.room-cnt-exceeds','getMember','CHANGESET_REJ','blockRanges','UnitStatus','_showConflictProcessingNotification','registerDependencies','unsubscribe','AuthzIoHttpService','awaiting_with_pending','isInternalEditorID','socket$','_onLocalMutation','_imageSourceCache','_decreaseWaiting','add','type','_undoStacks','/-/object/-/batch_allowed','userID','timeoutTimer','_updateLocalCache','_transformRemoteChangesetByIMECache','error$','_substituteUndoStack','Plugin','fetching\x20missing\x20changesets\x20from\x20','_awaitingChangeset','_sendHeartbeat','subscribe','_emitMembers','_transformStack','status','loadUnitOfRevision','updatePermissionPoint','_maxTotalRetryTimeout','1.0.2','[OfflineState]:\x20received\x20rejection.','3469554ifuFuk','&to=','SheetPermissionInitController','EmptyMutationInfo','session.room-permission-denied','_getAPIPrefixPath','upload','isTransformMutationsWithChangesetFailure','name','loadBase','[serializeCombRequest]:\x20should\x20not\x20fall\x20into\x20default\x20branch!','OTHER_CLIENTS_EDITING','_resolveSessionIdentity','_telemetryService','maxSize','fromCharCode','create','CHANGESET_ACK','MoveSlidePageMutation','[OfflineState]:\x20invalid\x20calling\x20to\x20`resend`.','readAsDataURL','getCurrentSelections','DocStateChangeManagerService','liveShareNewHost','default','SnapshotServerOverHTTPService','retryCount','DEFAULT_COLLAB_WEB_SOCKET_URL','SetSelectionsOperation','close','copyFileMeta','getLatestCsReqIdBySid','onPrepareTransformSelections','ICollaborationSocketService','unitDisposed$','onRemoteRetry','_type','toLocal','reduce','attachment','closeSession','_changesetSessionId','/object/','getDeserializedSheetBlock','getDrawingImageAllowSize','_onRemoteRetry','OfflineState','retryConnectingInterval','addHandlerCallback','_entityInit$','ERROR_IMAGE','[CollaborationSession]','DocCollaborationEntity','_permissionService','_transformAndApplyRemoteChangeset','LIVESHARE_NEW_HOST','getTypeOfUnitDisposed$','GLOBAL_ROOMS_CNT_EXCEEDS','forEach','onTransformState','sort','[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.','_undoRedoService','onSendChangeset','UNIVER_BOARD','unitLoaded$','/unit/','?size=','entries','_updateState','\x20-\x20','state','loadBoard','append','_transitionLocked','FileSource','[CollaborationSessionService]','[CollaborationSession]:\x20should\x20not\x20send\x20message\x20when\x20the\x20session\x20is\x20offline!','_changesetReqId','packageName','_logService','resolveWithBasePath','parseProtocolChangeset','_initRequestHeader','getAllPermissionPoint','[DataLoaderService]','_getConfig','FetchingMissState','joinEvent','asObservable','shareReplay','prototype','_getUnitPermissionPoints','UPDATE_CURSOR','_checkMissing','allowed','_updateStatus','getTime','objectActions','458145UWnECA','duration','entityInit$','loadSlide','454408wCKkcW','_getAPIPrefix','decorate','createCollaborator','getCurrentUser','base-ui.attachment-io.service','_localCacheService','getSnapshotAPIPath','sessionStatus$','length','synced','roomInfos','getActiveSheet','candidateSocket','pipe','HEARTBEAT_INTERVAL','CollaborationSocketService','_onConflict','action','CLOSE_ROOM','_initCloseConn','src','event$','_stopTelemetryCollaborationNewChangeset','BASE64','_sendingTimer','onTransformSelections','FAIL','_onCombEvent','_queuedRemoteChangesets','_handleRemoteChangesets','loadUnit','getInterceptPoints','32AjQPCq','LocaleService','cbc','ConflictState','_submitChangeset','uploadFileServerUrl','SHOULD_CLOSE_CONN','_cfgEnableObjInherit','IUndoRedoService','fetchMissingChangesets','_roomCreated$','UNIVER_DOC','getUnit','change$','UnitAction','_toggleOffline','avatar','init','unit','__Key__','_state','resolveUnit','onMissingChangesets','/collaborator','Unknown\x20type.\x20Will\x20not\x20load\x20files\x20from\x20remote\x20address.','awaiting','_listenToNetworkCondition','PSEUDO_FETCH_MISSING_RESULT'];_0x1631=function(){return _0x3d5ebe;};return _0x1631();}let S=class{constructor(_0x1e325c,_0x3d275c,_0x4a23b9){const _0x13b6b4=_0x16128c;this[_0x13b6b4(0x200)]=_0x1e325c,this[_0x13b6b4(0x238)]=_0x3d275c,this[_0x13b6b4(0x215)]=_0x4a23b9;}[_0x16128c(0x1e5)](_0x321441){const _0x2c8a6e=_0x16128c;var _0x54da31,_0x856f3;let _0xda5ecc=this[_0x2c8a6e(0x200)][_0x2c8a6e(0x1f1)](r[_0x2c8a6e(0x4a8)]),{unitId:_0x32467f,subUnitId:_0x3a8ab8}=be(_0x321441),_0x576d80=_0xda5ecc==null?void 0x0:_0xda5ecc['getWorkbookSelections'](_0x32467f)[_0x2c8a6e(0x416)](),_0x437b46=(_0x54da31=this[_0x2c8a6e(0x215)][_0x2c8a6e(0x495)](_0x32467f))==null||(_0x54da31=_0x54da31[_0x2c8a6e(0x474)]())==null?void 0x0:_0x54da31['getSheetId']();if(_0x576d80[_0x2c8a6e(0x471)]===0x0||!_0x32467f||!_0x3a8ab8)return;let _0x468fac=[{'id':r['SetSelectionsOperation']['id'],'params':{'unitId':_0x32467f,'subUnitId':_0x437b46,'selections':t[_0x2c8a6e(0x4b5)][_0x2c8a6e(0x1e9)](_0x576d80)}}],_0x12e788=this[_0x2c8a6e(0x238)][_0x2c8a6e(0x375)](_0x321441,_0x468fac);if(!(0x0,e[_0x2c8a6e(0x334)])(_0x12e788))throw _0x12e788['error'];let _0x1a6e10=(_0x856f3=_0x12e788[_0x2c8a6e(0x275)][0x0])==null||(_0x856f3=_0x856f3['params'])==null?void 0x0:_0x856f3['selections'];if(Array[_0x2c8a6e(0x1e7)](_0x1a6e10)&&_0x1a6e10[_0x2c8a6e(0x471)]){if(_0x1a6e10[_0x2c8a6e(0x471)]===_0x468fac[0x0][_0x2c8a6e(0x4f8)][_0x2c8a6e(0x205)]['length']&&_0x1a6e10[_0x2c8a6e(0x4de)]((_0x5636e8,_0x130928)=>t['Rectangle']['equals'](_0x5636e8[_0x2c8a6e(0x4ed)],_0x468fac[0x0]['params'][_0x2c8a6e(0x205)][_0x130928][_0x2c8a6e(0x4ed)])))return;this[_0x2c8a6e(0x200)][_0x2c8a6e(0x1f1)](t[_0x2c8a6e(0x316)])[_0x2c8a6e(0x2bd)](r[_0x2c8a6e(0x41d)]['id'],{'unitId':_0x32467f,'subUnitId':_0x437b46,'selections':_0x1a6e10});}}};S=y([v(0x0,(0x0,t['Inject'])(t['Injector'])),v(0x1,e['ITransformService']),v(0x2,t[_0x16128c(0x399)])],S);const C=(0x0,t['createIdentifier'])(_0x16128c(0x220));let xe=function(_0x3801f4){const _0x2909ad=_0x16128c;return _0x3801f4[_0x3801f4[_0x2909ad(0x28b)]=0x0]=_0x2909ad(0x28b),_0x3801f4[_0x3801f4[_0x2909ad(0x40c)]=0x1]=_0x2909ad(0x40c),_0x3801f4;}({});function Se(_0xc17cef){const _0x4b82b5=_0x16128c;var _0x29f59e;return!!((_0x29f59e=_0xc17cef['params'])!=null&&_0x29f59e[_0x4b82b5(0x247)]);}const Ce=new Set([r[_0x16128c(0x371)]['id']]),we=new Set([c[_0x16128c(0x38f)]['id'],c['EnsureSlideMasterPageMutation']['id'],c[_0x16128c(0x413)]['id'],c['RemoveSlidePageMutation']['id']]);function Te(_0x1463d8,_0x4510e3=Ce){const _0x12b554=_0x16128c;let _0x5c563a=[];for(let _0x2c5c0a of _0x1463d8){if(_0x4510e3[_0x12b554(0x339)](_0x2c5c0a['id'])){if(_0x5c563a[_0x12b554(0x471)]>0x0)break;_0x5c563a[_0x12b554(0x4da)](_0x2c5c0a);break;}if(Se(_0x2c5c0a)){if(_0x5c563a[_0x12b554(0x471)]>0x0)break;_0x5c563a[_0x12b554(0x4da)](_0x2c5c0a);break;}_0x5c563a['push'](_0x2c5c0a);}return _0x5c563a;}function w(_0x74d703,_0xb4d172,_0x84dddd,_0x5ee3cf,_0x3c6b49){const _0x22670a=_0x16128c;let _0x5df586=Te(_0x74d703),_0x2ba9cf=_0x3c6b49['getCurrentUser'](),_0x55c802=(_0x2ba9cf==null?void 0x0:_0x2ba9cf['userID'])??_0x22670a(0x2c3),_0x25ccf0=(_0x2ba9cf==null?void 0x0:_0x2ba9cf[_0x22670a(0x2a6)])??'unknown';return{'changeset':{'unitID':_0xb4d172,'type':(0x0,e[_0x22670a(0x1ff)])(_0x84dddd[_0x22670a(0x1e2)](_0xb4d172)),'baseRev':_0x5ee3cf[_0x22670a(0x35f)](_0xb4d172),'revision':0x0,'userID':_0x55c802,'memberID':_0x25ccf0,'mutations':_0x5df586},'pendingMutations':_0x74d703[_0x22670a(0x307)](_0x5df586[_0x22670a(0x471)])};}const Ee=w;function De(_0x4ff231,_0x4fa4a7,_0x3ab027,_0x1e4213,_0xa89f9b){const _0x1113a1=_0x16128c;let _0x25b489=Te(_0x4ff231,we),_0x354ea7=_0xa89f9b['getCurrentUser'](),_0x36f898=(_0x354ea7==null?void 0x0:_0x354ea7['userID'])??'unknown',_0x18a6e7=(_0x354ea7==null?void 0x0:_0x354ea7[_0x1113a1(0x2a6)])??'unknown';return{'changeset':{'unitID':_0x4fa4a7,'type':(0x0,e[_0x1113a1(0x1ff)])(_0x3ab027[_0x1113a1(0x1e2)](_0x4fa4a7)),'baseRev':_0x1e4213[_0x1113a1(0x35f)](_0x4fa4a7),'revision':0x0,'userID':_0x36f898,'memberID':_0x18a6e7,'mutations':_0x25b489},'pendingMutations':_0x4ff231[_0x1113a1(0x307)](_0x25b489[_0x1113a1(0x471)])};}function Oe(_0x2af635,_0x4906de,_0x3f23af,_0x3d7127,_0x4f3679){const _0x5a5f1a=_0x16128c;let _0x12cf62=_0x2af635[_0x5a5f1a(0x427)]((_0x25c02a,_0x5d0ec9)=>{const _0x353613=_0x5a5f1a;let _0xead11=_0x25c02a[_0x25c02a[_0x353613(0x471)]-0x1],{id:_0xadb276}=_0xead11??{},{id:_0x3eeb93,type:_0x259d33}=_0x5d0ec9,_0x54e74c=_0x5d0ec9[_0x353613(0x4f8)];if(_0xadb276&&_0xadb276!==_0x3eeb93)throw Error('Cannot\x20assemble\x20a\x20changeset\x20from\x20multiple\x20mutations\x20of\x20different\x20types:\x20'+_0xadb276+_0x353613(0x447)+_0x3eeb93+'.');if(!_0xead11)return[{'id':_0x3eeb93,'type':_0x259d33,'params':{'unitId':_0x54e74c[_0x353613(0x367)],'textRanges':_0x54e74c['textRanges'],'actions':_0x54e74c['actions']}}];let _0x127750=_0xead11['params'];return ke(_0x127750,_0x54e74c)?[..._0x25c02a[_0x353613(0x307)](0x0,-0x1),{..._0xead11,'id':_0x3eeb93,'type':_0x259d33,'params':{'unitId':_0x54e74c['unitId'],'textRanges':_0x54e74c[_0x353613(0x1d1)],'actions':t[_0x353613(0x30f)]['compose'](_0x127750[_0x353613(0x226)],_0x54e74c['actions'])}}]:[..._0x25c02a,{'id':_0x3eeb93,'type':_0x259d33,'params':{'unitId':_0x54e74c['unitId'],'textRanges':_0x54e74c[_0x353613(0x1d1)],'actions':_0x54e74c['actions']}}];},[]),_0x445418=_0x4f3679[_0x5a5f1a(0x46c)](),_0x1bd9f8=(_0x445418==null?void 0x0:_0x445418[_0x5a5f1a(0x3ee)])??_0x5a5f1a(0x2c3),_0x1f654f=(_0x445418==null?void 0x0:_0x445418[_0x5a5f1a(0x2a6)])??'unknown';return{'changeset':{'unitID':_0x4906de,'type':(0x0,e[_0x5a5f1a(0x1ff)])(_0x3f23af['getUnitType'](_0x4906de)),'baseRev':_0x3d7127[_0x5a5f1a(0x35f)](_0x4906de),'revision':0x0,'userID':_0x1bd9f8,'memberID':_0x1f654f,'mutations':_0x12cf62},'pendingMutations':_0x2af635[_0x5a5f1a(0x307)](_0x2af635[_0x5a5f1a(0x471)])};}function ke(_0x337166,_0x349f48){const _0xb1900a=_0x16128c;return!Ae(_0x337166)&&!Ae(_0x349f48)&&je(_0x337166[_0xb1900a(0x226)],_0x349f48[_0xb1900a(0x226)]);}function Ae(_0x531e48){const _0x5a64ec=_0x16128c;return _0x531e48[_0x5a64ec(0x1ee)]!==void 0x0;}function je(_0x11ff6b,_0x1d2237){return Me(_0x11ff6b)&&Me(_0x1d2237)&&!Pe(_0x11ff6b)&&!Pe(_0x1d2237)&&!Ne(_0x11ff6b)&&!Ne(_0x1d2237);}function Me(_0x3ebd38){const _0x2c0317=_0x16128c;return Fe(_0x3ebd38)[_0x2c0317(0x236)](_0x167277=>T(_0x167277)&&_0x167277['et']==='text-x');}function Ne(_0x1fc560){const _0x12a4c5=_0x16128c;return Fe(_0x1fc560)[_0x12a4c5(0x236)](_0x89b711=>Array[_0x12a4c5(0x1e7)](_0x89b711)||typeof _0x89b711==_0x12a4c5(0x508)||typeof _0x89b711==_0x12a4c5(0x252));}function Pe(_0x1c249e){const _0x336288=_0x16128c;return Fe(_0x1c249e)[_0x336288(0x236)](_0x40c1fc=>!T(_0x40c1fc)||_0x40c1fc['et']!==_0x336288(0x34b)||!Array['isArray'](_0x40c1fc['e'])?!0x1:_0x40c1fc['e'][_0x336288(0x236)](_0x548fc2=>!T(_0x548fc2)||!T(_0x548fc2['body'])?!0x1:Object[_0x336288(0x45c)]['hasOwnProperty'][_0x336288(0x2a7)](_0x548fc2[_0x336288(0x20b)],_0x336288(0x357))||Object[_0x336288(0x45c)][_0x336288(0x3d9)]['call'](_0x548fc2[_0x336288(0x20b)],_0x336288(0x37c))||Object[_0x336288(0x45c)][_0x336288(0x3d9)][_0x336288(0x2a7)](_0x548fc2['body'],_0x336288(0x3de))));}function Fe(_0x1697ef){const _0x8a2751=_0x16128c;if(!Array[_0x8a2751(0x1e7)](_0x1697ef))return[];let _0x1a4292=_0x1697ef[_0x8a2751(0x4af)](_0x8a2751(0x20b))?_0x1697ef:_0x1697ef[_0x8a2751(0x4ee)](_0x187566=>Array[_0x8a2751(0x1e7)](_0x187566)&&_0x187566[_0x8a2751(0x4af)](_0x8a2751(0x20b)));if(!Array[_0x8a2751(0x1e7)](_0x1a4292))return[];let _0x45387a=_0x1a4292['indexOf']('body');return _0x45387a===-0x1?[]:_0x1a4292[_0x8a2751(0x307)](_0x45387a+0x1);}function T(_0x379629){const _0x353bfe=_0x16128c;return typeof _0x379629==_0x353bfe(0x321)&&!!_0x379629&&!Array[_0x353bfe(0x1e7)](_0x379629);}function Ie(_0x57cb6c,_0x46f0e3){const _0x391ecd=_0x16128c;let _0x2f26c6=new i['ReplaySubject'](0x1);return setTimeout(()=>_0x2f26c6[_0x391ecd(0x272)](_0x46f0e3),_0x57cb6c),_0x2f26c6[_0x391ecd(0x45a)]()[_0x391ecd(0x476)]((0x0,i['take'])(0x1));}var Le,Re,ze;let Be=function(_0x1c887d){const _0x40f5c7=_0x16128c;return _0x1c887d[_0x40f5c7(0x354)]=_0x40f5c7(0x362),_0x1c887d[_0x40f5c7(0x2a0)]=_0x40f5c7(0x472),_0x1c887d[_0x40f5c7(0x2d6)]='pending',_0x1c887d[_0x40f5c7(0x34f)]='awaiting',_0x1c887d[_0x40f5c7(0x2be)]=_0x40f5c7(0x3e4),_0x1c887d[_0x40f5c7(0x3b0)]=_0x40f5c7(0x35a),_0x1c887d[_0x40f5c7(0x33a)]=_0x40f5c7(0x293),_0x1c887d[_0x40f5c7(0x256)]='offline',_0x1c887d;}({});const Ve=0x4e20,He=0x2bf20;var E=class{constructor(_0x3d152b,_0x18fc79,_0x33aa57,_0x4e3005,_0x14b359,_0xb5b904,_0xa05d13,_0x19c44d,_0xc81061){const _0x34e27a=_0x16128c;this[_0x34e27a(0x3b9)]=_0x3d152b,this[_0x34e27a(0x3eb)]=_0x18fc79,this['_handler']=_0x14b359,this[_0x34e27a(0x297)]=_0xb5b904,this['_undoRedoService']=_0xa05d13,this['_revisionService']=_0x19c44d,this[_0x34e27a(0x46e)]=_0xc81061,g(this,_0x34e27a(0x3f6),null),g(this,'_pendingMutations',[]),this['_awaitingChangeset']=_0x33aa57,this[_0x34e27a(0x4c6)]=_0x4e3005;}['_checkMissing'](_0x5ed27f){const _0xd5abd7=_0x16128c;let _0x1c24e1=this[_0xd5abd7(0x358)][_0xd5abd7(0x35f)](this[_0xd5abd7(0x3b9)]);return _0x5ed27f[_0xd5abd7(0x3c7)]>_0x1c24e1+0x1&&(this[_0xd5abd7(0x2dd)][_0xd5abd7(0x49f)]({'from':_0x1c24e1,'to':_0x5ed27f['revision']-0x1}),!0x0);}['_transformUndoredo'](_0x536000){const _0x3f0d4b=_0x16128c;this[_0x3f0d4b(0x43f)][_0x3f0d4b(0x2ca)](this[_0x3f0d4b(0x3b9)],_0x536000);}['_transformSelections'](_0x506e22){const _0x2852ba=_0x16128c;var _0x2228fb,_0x33141f;(_0x2228fb=(_0x33141f=this[_0x2852ba(0x2dd)])['onTransformSelections'])==null||_0x2228fb['call'](_0x33141f,_0x506e22);}[_0x16128c(0x2ea)](_0x25ff4a){const _0x4348ce=_0x16128c;var _0x4f9b81,_0x4223aa;return((_0x4f9b81=(_0x4223aa=this['_handler'])[_0x4348ce(0x421)])==null?void 0x0:_0x4f9b81['call'](_0x4223aa,_0x25ff4a))??null;}[_0x16128c(0x360)](_0x49ed97){const _0x5e7dde=_0x16128c;var _0xa64d2c,_0x5aed06;return(_0xa64d2c=(_0x5aed06=this['_handler'])[_0x5e7dde(0x39a)])==null?void 0x0:_0xa64d2c[_0x5e7dde(0x2a7)](_0x5aed06,_0x49ed97);}[_0x16128c(0x288)](_0x312ff1){const _0x188fdf=_0x16128c;var _0x1c97e9,_0x4bad10;return(_0x1c97e9=(_0x4bad10=this[_0x188fdf(0x2dd)])['onTransformState'])==null?void 0x0:_0x1c97e9[_0x188fdf(0x2a7)](_0x4bad10,_0x312ff1);}[_0x16128c(0x3f1)](_0x1477e5){const _0x1e8c97=_0x16128c;var _0xd1d569,_0x4ffec9;return((_0xd1d569=(_0x4ffec9=this[_0x1e8c97(0x2dd)])['onTransformRemoteChangesetByIMECache'])==null?void 0x0:_0xd1d569[_0x1e8c97(0x2a7)](_0x4ffec9,_0x1477e5))??_0x1477e5;}[_0x16128c(0x2ac)](_0x41af0d){const _0x3f8fe9=_0x16128c;var _0x24e6ae,_0xdf33ee;return((_0x24e6ae=(_0xdf33ee=this[_0x3f8fe9(0x2dd)])[_0x3f8fe9(0x21f)])==null?void 0x0:_0x24e6ae[_0x3f8fe9(0x2a7)](_0xdf33ee,_0x41af0d))??_0x41af0d;}[_0x16128c(0x1ce)](_0x3e73f2){const _0x5b76ca=_0x16128c;if(this[_0x5b76ca(0x3eb)]===t[_0x5b76ca(0x3c4)][_0x5b76ca(0x494)]){let {unitID:_0x48d2ce,mutations:_0x5c63c7,memberID:_0x569a11}=_0x3e73f2,_0x596a74=_0x5c63c7[_0x5b76ca(0x471)]>0x0?_0x5c63c7[0x0][_0x5b76ca(0x4f8)][_0x5b76ca(0x1d1)]:[];if(Array['isArray'](_0x596a74)&&_0x596a74['length']>0x0){var _0x132c32,_0x15f0a4;(_0x132c32=(_0x15f0a4=this[_0x5b76ca(0x2dd)])[_0x5b76ca(0x298)])==null||_0x132c32[_0x5b76ca(0x2a7)](_0x15f0a4,{'unitID':_0x48d2ce,'memberID':_0x569a11,'textRanges':_0x596a74});}}}['_updateLocalCache'](){const _0x10b18c=_0x16128c;var _0x6d6301;(_0x6d6301=this[_0x10b18c(0x46e)])==null||_0x6d6301[_0x10b18c(0x356)](this[_0x10b18c(0x3b9)],this[_0x10b18c(0x3eb)],this[_0x10b18c(0x3f6)],this[_0x10b18c(0x4c6)]);}['_getCurrentRevision'](){const _0x9edd47=_0x16128c;return this[_0x9edd47(0x358)][_0x9edd47(0x35f)](this[_0x9edd47(0x3b9)]);}[_0x16128c(0x338)](){const _0x5deebf=_0x16128c;this[_0x5deebf(0x358)][_0x5deebf(0x4b6)](this[_0x5deebf(0x3b9)]);}[_0x16128c(0x1f8)](_0x5beaaf){const _0x508741=_0x16128c;let _0x23aa03=this['_transformRemoteChangesetByIMECache'](_0x5beaaf);_0x23aa03=this['_transformRemoteChangesetByStateCache'](_0x23aa03);let _0x3a0bc1=this[_0x508741(0x2ea)](_0x23aa03),_0xb69379=(0x0,t[_0x508741(0x25f)])(_0x23aa03[_0x508741(0x208)],this['_commandService'],{'fromCollab':!0x0});if(!_0xb69379[_0x508741(0x2f4)])throw _0x3a0bc1==null||_0x3a0bc1[_0x508741(0x25e)](),_0xb69379['error']instanceof Error?_0xb69379['error']:Error(_0xb69379[_0x508741(0x1d8)]??'[CollaborationState]:\x20apply\x20error!');_0x3a0bc1==null||_0x3a0bc1[_0x508741(0x1ec)](),this[_0x508741(0x360)](_0x23aa03),this[_0x508741(0x288)](_0x23aa03),this[_0x508741(0x4bb)](_0x5beaaf),this[_0x508741(0x398)](_0x23aa03),this['_syncEditingCollabCursor'](_0x23aa03),this[_0x508741(0x338)]();}};let D=class extends E{constructor(_0x38bea2,_0x56b617,_0x7b5930,_0x89e76f,_0x51347e,_0x4e5def,_0x54a9a1,_0x2b0f04,_0x5a6c87,_0x3caabc){const _0x312a76=_0x16128c;super(_0x38bea2,_0x56b617,null,[],_0x7b5930,_0x54a9a1,_0x4e5def,_0x89e76f,_0x3caabc),this['_injector']=_0x51347e,this[_0x312a76(0x451)]=_0x2b0f04,this[_0x312a76(0x238)]=_0x5a6c87,this[_0x312a76(0x2ec)]=_0x3caabc,g(this,_0x312a76(0x3fb),'synced');}[_0x16128c(0x372)](_0x201fd7){const _0x57f20d=_0x16128c;let _0x212ebf=this[_0x57f20d(0x200)][_0x57f20d(0x318)](O,this['unitID'],this[_0x57f20d(0x3eb)],[_0x201fd7],this[_0x57f20d(0x2dd)]);return _0x212ebf[_0x57f20d(0x333)](),_0x212ebf[_0x57f20d(0x3f0)](),_0x212ebf;}[_0x16128c(0x3a5)](_0x77934d){const _0x285a94=_0x16128c;if(this[_0x285a94(0x45f)](_0x77934d))return this[_0x285a94(0x200)][_0x285a94(0x318)](N,this[_0x285a94(0x3b9)],this[_0x285a94(0x3eb)],null,[],null,[_0x77934d],this[_0x285a94(0x2dd)]);try{let _0x19b921=this['_transformService'][_0x285a94(0x375)](_0x77934d,[e[_0x285a94(0x404)]]);if((0x0,e[_0x285a94(0x334)])(_0x19b921)){let {c1Prime:_0x490061}=_0x19b921;return this[_0x285a94(0x1f8)](_0x490061),this;}throw _0x19b921[_0x285a94(0x1d8)];}catch(_0x243ae9){return this[_0x285a94(0x451)][_0x285a94(0x1d8)](_0x243ae9),this[_0x285a94(0x479)](!0x1);}}[_0x16128c(0x479)](_0x4c17aa){const _0x58df8b=_0x16128c;return this[_0x58df8b(0x200)][_0x58df8b(0x318)](j,this[_0x58df8b(0x3b9)],this[_0x58df8b(0x3eb)],null,[],this[_0x58df8b(0x2dd)],_0x4c17aa);}[_0x16128c(0x37b)](_0xc04caf){const _0x465294=_0x16128c;if(_0xc04caf[_0x465294(0x3c7)]<=this[_0x465294(0x4e6)]())return this;throw Error(_0x465294(0x4c2));}['onRemoteRej'](){const _0x3e5230=_0x16128c;throw Error(_0x3e5230(0x2a5));}[_0x16128c(0x424)](){return this;}[_0x16128c(0x2c2)](){const _0x372a2f=_0x16128c;return this['_injector'][_0x372a2f(0x318)](M,this[_0x372a2f(0x3b9)],this[_0x372a2f(0x3eb)],null,[],this[_0x372a2f(0x2dd)]);}['toggleOnline'](){return this;}[_0x16128c(0x289)](){const _0x4f6fff=_0x16128c;throw Error(_0x4f6fff(0x4b2));}['fetchMiss'](){const _0x4eb117=_0x16128c;let _0x5990ba=this[_0x4eb117(0x358)][_0x4eb117(0x35f)](this[_0x4eb117(0x3b9)]);return this[_0x4eb117(0x2dd)][_0x4eb117(0x49f)]({'from':_0x5990ba,'to':0x0}),this[_0x4eb117(0x200)][_0x4eb117(0x318)](N,this[_0x4eb117(0x3b9)],this[_0x4eb117(0x3eb)],null,[],null,[],this[_0x4eb117(0x2dd)]);}};D=y([v(0x3,(0x0,t[_0x16128c(0x4c0)])(e[_0x16128c(0x27c)])),v(0x4,(0x0,t[_0x16128c(0x4c0)])(t['Injector'])),v(0x5,t[_0x16128c(0x491)]),v(0x6,t[_0x16128c(0x316)]),v(0x7,t['ILogService']),v(0x8,e[_0x16128c(0x28a)]),v(0x9,(0x0,t[_0x16128c(0x2e7)])(x))],D);let O=Le=class extends E{constructor(_0xd791dc,_0x37d3bb,_0x5e557d,_0x2eea0f,_0x4fa3e0,_0x35a776,_0x548ce2,_0x4604f0,_0x599216,_0x2e9406,_0x505f3f,_0x290da5,_0x1db567,_0x221dbf){const _0x3eeeb3=_0x16128c;super(_0xd791dc,_0x37d3bb,null,_0x5e557d,_0x2eea0f,_0x599216,_0x1db567,_0x35a776,_0x221dbf),this['_injector']=_0x4fa3e0,this['_userManagerService']=_0x548ce2,this[_0x3eeeb3(0x451)]=_0x4604f0,this[_0x3eeeb3(0x20e)]=_0x2e9406,this['_transformService']=_0x505f3f,this[_0x3eeeb3(0x32c)]=_0x290da5,g(this,_0x3eeeb3(0x3fb),'pending'),g(this,_0x3eeeb3(0x4d1),null),g(this,_0x3eeeb3(0x481),null);}['appendMutation'](_0x2469c2){const _0x31c26f=_0x16128c;return this['_pendingMutations'][_0x31c26f(0x4da)](_0x2469c2),this[_0x31c26f(0x3f0)](),this;}[_0x16128c(0x3a5)](_0x46f5af){const _0x10fb25=_0x16128c;if(this[_0x10fb25(0x45f)](_0x46f5af))return this[_0x10fb25(0x2af)](),this[_0x10fb25(0x200)][_0x10fb25(0x318)](N,this[_0x10fb25(0x3b9)],this[_0x10fb25(0x3eb)],null,this[_0x10fb25(0x4c6)],null,[_0x46f5af],this['_handler']);try{let _0x4d4fc6=this[_0x10fb25(0x238)][_0x10fb25(0x375)](_0x46f5af,this['_pendingMutations']);if((0x0,e[_0x10fb25(0x334)])(_0x4d4fc6)){let {c1Prime:_0x514ea7,m2Prime:_0x105c34}=_0x4d4fc6;this[_0x10fb25(0x1f8)](_0x514ea7);let _0x50cd11=this[_0x10fb25(0x200)]['createInstance'](Le,this['unitID'],this['type'],_0x105c34,this['_handler']);this[_0x10fb25(0x2af)]();let _0xfd1247=new Date()[_0x10fb25(0x462)](),_0x5a78e4=this[_0x10fb25(0x4d1)]?Math[_0x10fb25(0x3a7)](this[_0x10fb25(0x4d1)]-_0xfd1247,0x0):this[_0x10fb25(0x330)]();return _0x50cd11['_schedule'](_0x5a78e4),_0x50cd11;}throw _0x4d4fc6[_0x10fb25(0x1d8)];}catch(_0x59609f){return this['_logService'][_0x10fb25(0x1d8)](_0x59609f),this[_0x10fb25(0x479)](!0x1);}}[_0x16128c(0x37b)](_0x382050){const _0x1bc967=_0x16128c;if(_0x382050[_0x1bc967(0x3c7)]<=this[_0x1bc967(0x4e6)]())return this;throw Error(_0x1bc967(0x2f3));}[_0x16128c(0x379)](){const _0x17d06c=_0x16128c;throw Error(_0x17d06c(0x503));}[_0x16128c(0x424)](){return this;}[_0x16128c(0x2c2)](){const _0x18b0cc=_0x16128c;return this['_clearScheduledTask'](),this[_0x18b0cc(0x200)][_0x18b0cc(0x318)](M,this[_0x18b0cc(0x3b9)],this[_0x18b0cc(0x3eb)],null,this[_0x18b0cc(0x4c6)],this['_handler']);}['toggleOnline'](){return this;}['_schedule'](_0x4fbd98){const _0x59c0d3=_0x16128c;let _0x4f6368=_0x4fbd98??this[_0x59c0d3(0x330)]();this[_0x59c0d3(0x4d1)]=new Date()['getTime']()+_0x4f6368,this['_sendingTimer']=setTimeout(()=>{const _0x52f860=_0x59c0d3;this[_0x52f860(0x2af)]();let _0x1eb77e=null;switch(this[_0x52f860(0x3eb)]){case t[_0x52f860(0x3c4)][_0x52f860(0x4d8)]:_0x1eb77e=w(this[_0x52f860(0x4c6)],this[_0x52f860(0x3b9)],this[_0x52f860(0x32c)],this[_0x52f860(0x358)],this[_0x52f860(0x4b8)]);break;case t[_0x52f860(0x3c4)][_0x52f860(0x494)]:_0x1eb77e=this[_0x52f860(0x4c6)][_0x52f860(0x4de)](_0x1655ce=>_0x1655ce['id']===n['RichTextEditingMutation']['id'])?Oe(this[_0x52f860(0x4c6)],this[_0x52f860(0x3b9)],this[_0x52f860(0x32c)],this[_0x52f860(0x358)],this['_userManagerService']):w(this[_0x52f860(0x4c6)],this[_0x52f860(0x3b9)],this[_0x52f860(0x32c)],this[_0x52f860(0x358)],this[_0x52f860(0x4b8)]);break;case t[_0x52f860(0x3c4)][_0x52f860(0x4fd)]:_0x1eb77e=De(this['_pendingMutations'],this['unitID'],this[_0x52f860(0x32c)],this[_0x52f860(0x358)],this[_0x52f860(0x4b8)]);break;case t[_0x52f860(0x3c4)][_0x52f860(0x2e1)]:_0x1eb77e=Ee(this[_0x52f860(0x4c6)],this['unitID'],this[_0x52f860(0x32c)],this[_0x52f860(0x358)],this[_0x52f860(0x4b8)]);break;case t['UniverInstanceType'][_0x52f860(0x441)]:_0x1eb77e=w(this[_0x52f860(0x4c6)],this[_0x52f860(0x3b9)],this[_0x52f860(0x32c)],this['_revisionService'],this[_0x52f860(0x4b8)]);break;case t['UniverInstanceType']['UNIVER_BASE']:_0x1eb77e=w(this['_pendingMutations'],this[_0x52f860(0x3b9)],this[_0x52f860(0x32c)],this[_0x52f860(0x358)],this[_0x52f860(0x4b8)]);break;default:throw Error(_0x52f860(0x381)+this[_0x52f860(0x3eb)]+_0x52f860(0x39e));}let {changeset:_0x376a10,pendingMutations:_0xa985de}=_0x1eb77e;this[_0x52f860(0x2dd)][_0x52f860(0x440)](_0x376a10);let _0x4a601c=_0xa985de[_0x52f860(0x471)]?this[_0x52f860(0x200)]['createInstance'](A,this[_0x52f860(0x3b9)],this[_0x52f860(0x3eb)],_0x376a10,_0xa985de,this[_0x52f860(0x2dd)],void 0x0):this[_0x52f860(0x200)][_0x52f860(0x318)](k,this[_0x52f860(0x3b9)],this['type'],_0x376a10,this['_handler']);_0x4a601c[_0x52f860(0x3f0)](),this['_handler']['onStateChange'](this,_0x4a601c);},_0x4f6368);}[_0x16128c(0x330)](){const _0x211232=_0x16128c;let _0x2cece1=this[_0x211232(0x20e)][_0x211232(0x1dd)](m);return(_0x2cece1==null?void 0x0:_0x2cece1['sendChangesetTimeout'])??0x7d0;}[_0x16128c(0x289)](){const _0x9898bd=_0x16128c;throw Error(_0x9898bd(0x1ed));}[_0x16128c(0x2af)](){const _0x44bd46=_0x16128c;this[_0x44bd46(0x481)]!=null&&(clearTimeout(this['_sendingTimer']),this[_0x44bd46(0x481)]=null);}[_0x16128c(0x479)](_0x1604a1){const _0x5e639c=_0x16128c;return this[_0x5e639c(0x2af)](),this[_0x5e639c(0x200)][_0x5e639c(0x318)](j,this[_0x5e639c(0x3b9)],this[_0x5e639c(0x3eb)],null,this[_0x5e639c(0x4c6)],this[_0x5e639c(0x2dd)],_0x1604a1);}};O=Le=y([v(0x4,(0x0,t[_0x16128c(0x4c0)])(t['Injector'])),v(0x5,(0x0,t[_0x16128c(0x4c0)])(e[_0x16128c(0x27c)])),v(0x6,(0x0,t[_0x16128c(0x4c0)])(t[_0x16128c(0x203)])),v(0x7,t[_0x16128c(0x22c)]),v(0x8,t[_0x16128c(0x316)]),v(0x9,t[_0x16128c(0x35d)]),v(0xa,e[_0x16128c(0x28a)]),v(0xb,t[_0x16128c(0x399)]),v(0xc,t['IUndoRedoService']),v(0xd,(0x0,t['Optional'])(x))],O);let k=Re=class extends E{constructor(_0x13180f,_0x57c8bf,_0x5e5682,_0x24e690,_0x1b16b0,_0x689a3e,_0x2afb15,_0x2aff94,_0xbef22d,_0x363300,_0x2c9eb1){const _0x2f7c02=_0x16128c;super(_0x13180f,_0x57c8bf,_0x5e5682,[],_0x24e690,_0x2afb15,_0x363300,_0x689a3e,_0x2c9eb1),this['_injector']=_0x1b16b0,this[_0x2f7c02(0x451)]=_0x2aff94,this[_0x2f7c02(0x238)]=_0xbef22d,g(this,_0x2f7c02(0x3fb),_0x2f7c02(0x4a2)),g(this,'_resendTimeout',0x0),g(this,_0x2f7c02(0x3fe),0x0),g(this,_0x2f7c02(0x1f2),void 0x0),g(this,_0x2f7c02(0x28e),void 0x0);}[_0x16128c(0x372)](_0x56327d){const _0x34643f=_0x16128c;this[_0x34643f(0x2af)]();let _0x574af1=this[_0x34643f(0x200)][_0x34643f(0x318)](A,this['unitID'],this[_0x34643f(0x3eb)],this['_awaitingChangeset'],[_0x56327d],this[_0x34643f(0x2dd)],this[_0x34643f(0x1f2)]);return _0x574af1[_0x34643f(0x3f0)](),_0x574af1;}[_0x16128c(0x3a5)](_0x4fa9b2){const _0x3e8a09=_0x16128c;if(this[_0x3e8a09(0x45f)](_0x4fa9b2))return this[_0x3e8a09(0x2af)](),this[_0x3e8a09(0x200)][_0x3e8a09(0x318)](N,this[_0x3e8a09(0x3b9)],this[_0x3e8a09(0x3eb)],this['_awaitingChangeset'],[],null,[_0x4fa9b2],this[_0x3e8a09(0x2dd)]);try{let _0x262db5=this['_transformService']['transformChangesets']([_0x4fa9b2],[this[_0x3e8a09(0x3f6)]],!0x1);if((0x0,e[_0x3e8a09(0x23c)])(_0x262db5)){let {c1Prime:_0x5f4c43,c2Prime:_0x4ad617}=_0x262db5;this[_0x3e8a09(0x1f8)](_0x5f4c43[0x0]),_0x4ad617[0x0][_0x3e8a09(0x28c)]=this[_0x3e8a09(0x4e6)](),this[_0x3e8a09(0x2af)]();let _0x4d2534=this[_0x3e8a09(0x200)][_0x3e8a09(0x318)](Re,this[_0x3e8a09(0x3b9)],this[_0x3e8a09(0x3eb)],_0x4ad617[0x0],this[_0x3e8a09(0x2dd)]);return _0x4d2534[_0x3e8a09(0x3f0)](),_0x4d2534;}throw _0x262db5[_0x3e8a09(0x1d8)];}catch(_0x46ff3d){return this['_logService'][_0x3e8a09(0x1d8)](_0x46ff3d),this['_onConflict'](!0x1);}}[_0x16128c(0x37b)](_0x41dadc){const _0x323ffc=_0x16128c;this[_0x323ffc(0x2af)]();let _0x4c33af=this[_0x323ffc(0x358)][_0x323ffc(0x35f)](this[_0x323ffc(0x3b9)]);if(_0x41dadc[_0x323ffc(0x3c7)]<=_0x4c33af)return this;if(this[_0x323ffc(0x45f)](_0x41dadc))return this['_injector'][_0x323ffc(0x318)](N,this['unitID'],this[_0x323ffc(0x3eb)],this[_0x323ffc(0x3f6)],[],_0x41dadc[_0x323ffc(0x3c7)],[],this[_0x323ffc(0x2dd)]);this[_0x323ffc(0x338)]();let _0xd7adab=this[_0x323ffc(0x200)][_0x323ffc(0x318)](D,this[_0x323ffc(0x3b9)],this[_0x323ffc(0x3eb)],this[_0x323ffc(0x2dd)]);return _0xd7adab['_updateLocalCache'](),_0xd7adab;}[_0x16128c(0x379)](_0x36d140){const _0x34f321=_0x16128c;return this[_0x34f321(0x479)](!!(_0x36d140!=null&&_0x36d140['isPermissionRej']));}['onRemoteRetry'](_0x2aedda){const _0x248c52=_0x16128c;return this['_maxTotalRetryTimeout']>He?this['toggleOffline']():(this[_0x248c52(0x1f2)]=Ie(this[_0x248c52(0x267)],{'timeout':this['_resendTimeout'],'reqId':_0x2aedda['reqId']}),this[_0x248c52(0x28e)]=this[_0x248c52(0x1f2)][_0x248c52(0x3f8)](({reqId:_0x59dced,timeout:_0x305b0f})=>{this['_resendWithTimeout'](_0x59dced,_0x305b0f);}),this);}[_0x16128c(0x2c2)](){const _0x4f7828=_0x16128c;return this['_clearScheduledTask'](),this['_injector'][_0x4f7828(0x318)](M,this[_0x4f7828(0x3b9)],this['type'],this[_0x4f7828(0x3f6)],[],this['_handler']);}[_0x16128c(0x284)](){return this;}[_0x16128c(0x289)](){const _0xf9ce18=_0x16128c;this[_0xf9ce18(0x2dd)][_0xf9ce18(0x440)](this[_0xf9ce18(0x3f6)]);}[_0x16128c(0x479)](_0x22491a){const _0x1644ae=_0x16128c;return this[_0x1644ae(0x2af)](),this[_0x1644ae(0x200)][_0x1644ae(0x318)](j,this[_0x1644ae(0x3b9)],this[_0x1644ae(0x3eb)],this[_0x1644ae(0x3f6)],[],this[_0x1644ae(0x2dd)],_0x22491a);}[_0x16128c(0x380)](_0x22150e,_0xb367d0){const _0x272703=_0x16128c;var _0x971901;_0x22150e===((_0x971901=this[_0x272703(0x3f6)])==null?void 0x0:_0x971901[_0x272703(0x280)])&&(this[_0x272703(0x289)](),this[_0x272703(0x267)]=_0xb367d0===0x0?0x3e8:Math[_0x272703(0x4e4)](_0xb367d0*0x2,Ve),this[_0x272703(0x3fe)]+=this['_resendTimeout']);}[_0x16128c(0x2af)](){const _0x5cd7ed=_0x16128c;var _0x3f2578;(_0x3f2578=this['_sender'])==null||_0x3f2578[_0x5cd7ed(0x3e2)](),this[_0x5cd7ed(0x267)]=0x0,this[_0x5cd7ed(0x3fe)]=0x0;}};k=Re=y([v(0x4,(0x0,t[_0x16128c(0x4c0)])(t[_0x16128c(0x33b)])),v(0x5,(0x0,t[_0x16128c(0x4c0)])(e['RevisionService'])),v(0x6,t['ICommandService']),v(0x7,t[_0x16128c(0x22c)]),v(0x8,e[_0x16128c(0x28a)]),v(0x9,t[_0x16128c(0x491)]),v(0xa,(0x0,t[_0x16128c(0x2e7)])(x))],k);let A=ze=class extends E{constructor(_0x23e80,_0x159da2,_0x506564,_0x33ec48,_0x5b9c02,_0x1dfd2f,_0x1ebeb5,_0x445dfe,_0x567154,_0x4a2151,_0x1b7725,_0x5c6dcc,_0x3d73e5){const _0x29de19=_0x16128c;super(_0x23e80,_0x159da2,_0x506564,_0x33ec48,_0x5b9c02,_0x567154,_0x5c6dcc,_0x445dfe,_0x3d73e5),this['_injector']=_0x1ebeb5,this[_0x29de19(0x451)]=_0x4a2151,this[_0x29de19(0x238)]=_0x1b7725,this[_0x29de19(0x2ec)]=_0x3d73e5,g(this,_0x29de19(0x3fb),_0x29de19(0x3e4)),g(this,_0x29de19(0x267),0x0),g(this,_0x29de19(0x3fe),0x0),g(this,'_resendTimer',void 0x0),g(this,_0x29de19(0x28e),void 0x0),_0x1dfd2f&&(this['_resendTimer']=_0x1dfd2f,this['_sender']=this[_0x29de19(0x1f2)][_0x29de19(0x3f8)](({reqId:_0x4b8b3c,timeout:_0x4d17dc})=>{const _0x30b85e=_0x29de19;this[_0x30b85e(0x380)](_0x4b8b3c,_0x4d17dc);}));}[_0x16128c(0x372)](_0x2dcd79){const _0x20a820=_0x16128c;return this[_0x20a820(0x4c6)]['push'](_0x2dcd79),this;}['onRemoteChangeset'](_0x24e83a){const _0x37bce8=_0x16128c;if(this['_checkMissing'](_0x24e83a))return this['_clearScheduledTask'](),this[_0x37bce8(0x200)][_0x37bce8(0x318)](N,this[_0x37bce8(0x3b9)],this['type'],this[_0x37bce8(0x3f6)],this[_0x37bce8(0x4c6)],null,[_0x24e83a],this[_0x37bce8(0x2dd)]);try{let _0x1de075=this['_transformService'][_0x37bce8(0x2cc)]([_0x24e83a],[this['_awaitingChangeset']],!0x1);if((0x0,e['isTransformChangesetsSuccess'])(_0x1de075)){let {c1Prime:_0x5b2422,c2Prime:_0x1d3340}=_0x1de075,_0x2c396c=this[_0x37bce8(0x238)]['transformMutationsWithChangeset'](_0x5b2422[0x0],this['_pendingMutations']);if((0x0,e['isTransformMutationsWithChangesetSuccess'])(_0x2c396c)){let {c1Prime:_0x444810,m2Prime:_0x22f84f}=_0x2c396c;return this[_0x37bce8(0x1f8)](_0x444810),_0x1d3340[0x0]['baseRev']=this['_getCurrentRevision'](),this['_clearScheduledTask'](),this['_injector'][_0x37bce8(0x318)](ze,this[_0x37bce8(0x3b9)],this[_0x37bce8(0x3eb)],_0x1d3340[0x0],_0x22f84f,this[_0x37bce8(0x2dd)],void 0x0);}throw _0x2c396c[_0x37bce8(0x1d8)];}throw _0x1de075[_0x37bce8(0x1d8)];}catch(_0xd41fc8){return this['_logService']['error'](_0xd41fc8),this[_0x37bce8(0x479)](!0x1);}}['onRemoteAck'](_0x4197f1){const _0x137b3d=_0x16128c;this[_0x137b3d(0x2af)]();let _0x44ab6f=this[_0x137b3d(0x4e6)]();if(_0x4197f1[_0x137b3d(0x3c7)]<=_0x44ab6f)return this;if(this[_0x137b3d(0x45f)](_0x4197f1))return this[_0x137b3d(0x200)][_0x137b3d(0x318)](N,this[_0x137b3d(0x3b9)],this['type'],this[_0x137b3d(0x3f6)],this['_pendingMutations'],_0x4197f1[_0x137b3d(0x3c7)],[],this[_0x137b3d(0x2dd)]);this[_0x137b3d(0x338)]();let _0xfc20a5=this[_0x137b3d(0x200)][_0x137b3d(0x318)](O,this[_0x137b3d(0x3b9)],this[_0x137b3d(0x3eb)],this[_0x137b3d(0x4c6)],this[_0x137b3d(0x2dd)]);return _0xfc20a5[_0x137b3d(0x333)](),_0xfc20a5[_0x137b3d(0x3f0)](),_0xfc20a5;}[_0x16128c(0x379)](_0x5830b3){const _0x40d175=_0x16128c;return this[_0x40d175(0x479)](!!(_0x5830b3!=null&&_0x5830b3['isPermissionRej']));}[_0x16128c(0x424)](_0x4f281e){const _0x168c52=_0x16128c;return this['_maxTotalRetryTimeout']>He?this[_0x168c52(0x2c2)]():(this[_0x168c52(0x1f2)]=Ie(this['_resendTimeout'],{'timeout':this['_resendTimeout'],'reqId':_0x4f281e[_0x168c52(0x280)]}),this[_0x168c52(0x28e)]=this[_0x168c52(0x1f2)][_0x168c52(0x3f8)](({reqId:_0x3de15d,timeout:_0x1ab3f5})=>{const _0x432814=_0x168c52;this[_0x432814(0x380)](_0x3de15d,_0x1ab3f5);}),this);}[_0x16128c(0x2c2)](){const _0x4d4ac0=_0x16128c;return this[_0x4d4ac0(0x2af)](),this[_0x4d4ac0(0x200)][_0x4d4ac0(0x318)](M,this[_0x4d4ac0(0x3b9)],this['type'],this[_0x4d4ac0(0x3f6)],this[_0x4d4ac0(0x4c6)],this[_0x4d4ac0(0x2dd)]);}['toggleOnline'](){return this;}[_0x16128c(0x289)](){const _0x143ed8=_0x16128c;this[_0x143ed8(0x2dd)][_0x143ed8(0x440)](this[_0x143ed8(0x3f6)]);}[_0x16128c(0x479)](_0x5dd3ad){const _0x373300=_0x16128c;return this[_0x373300(0x2af)](),this['_injector'][_0x373300(0x318)](j,this[_0x373300(0x3b9)],this[_0x373300(0x3eb)],null,this[_0x373300(0x4c6)],this[_0x373300(0x2dd)],_0x5dd3ad);}[_0x16128c(0x380)](_0x45ce4c,_0x22c688){const _0x42d785=_0x16128c;var _0x431250;_0x45ce4c===((_0x431250=this['_awaitingChangeset'])==null?void 0x0:_0x431250[_0x42d785(0x280)])&&(this[_0x42d785(0x289)](),this['_resendTimeout']=_0x22c688===0x0?0x3e8:Math[_0x42d785(0x4e4)](_0x22c688*0x2,Ve),this[_0x42d785(0x3fe)]+=this[_0x42d785(0x267)]);}[_0x16128c(0x2af)](){const _0x3a8c4a=_0x16128c;var _0x2c61a5;(_0x2c61a5=this[_0x3a8c4a(0x28e)])==null||_0x2c61a5[_0x3a8c4a(0x3e2)](),this[_0x3a8c4a(0x267)]=0x0,this[_0x3a8c4a(0x3fe)]=0x0;}};A=ze=y([v(0x6,(0x0,t[_0x16128c(0x4c0)])(t['Injector'])),v(0x7,(0x0,t['Inject'])(e[_0x16128c(0x27c)])),v(0x8,t[_0x16128c(0x316)]),v(0x9,t[_0x16128c(0x22c)]),v(0xa,e['ITransformService']),v(0xb,t['IUndoRedoService']),v(0xc,(0x0,t[_0x16128c(0x2e7)])(x))],A);let j=class extends E{constructor(_0x3182f6,_0x33e13d,_0x14b7c7,_0x21e145,_0x46edff,_0x43fa61=!0x1,_0x3bcbd1,_0x578644,_0xe5304,_0x155131,_0x41bec6,_0x642be4,_0x2fcabb){const _0x3ab4c1=_0x16128c;super(_0x3182f6,_0x33e13d,_0x14b7c7,_0x21e145,_0x46edff,_0x578644,_0xe5304,_0x155131,_0x2fcabb),this[_0x3ab4c1(0x2f9)]=_0x43fa61,this[_0x3ab4c1(0x436)]=_0x3bcbd1,this[_0x3ab4c1(0x2de)]=_0x41bec6,this[_0x3ab4c1(0x3ce)]=_0x642be4,this[_0x3ab4c1(0x2ec)]=_0x2fcabb,g(this,'status','conflict'),this['_disableEditing'](),this[_0x3ab4c1(0x3e0)](),this[_0x3ab4c1(0x506)]();}[_0x16128c(0x372)](){return this;}[_0x16128c(0x3a5)](){return this;}[_0x16128c(0x37b)](){return this;}[_0x16128c(0x379)](){return this;}['onRemoteRetry'](){return this;}['toggleOffline'](){return this;}[_0x16128c(0x284)](){return this;}['resend'](){const _0x252dda=_0x16128c;throw Error(_0x252dda(0x1d2));}async[_0x16128c(0x506)](){const _0x1123cd=_0x16128c;var _0x3893a6,_0x3a619a;await((_0x3893a6=this[_0x1123cd(0x46e)])==null||(_0x3a619a=_0x3893a6['backupOfflineData'])==null?void 0x0:_0x3a619a[_0x1123cd(0x2a7)](_0x3893a6,this[_0x1123cd(0x3b9)],_0x1123cd(0x293))[_0x1123cd(0x4b1)](()=>void 0x0));try{var _0x524c13;await((_0x524c13=this[_0x1123cd(0x46e)])==null?void 0x0:_0x524c13[_0x1123cd(0x2d1)](this[_0x1123cd(0x3b9)]));}catch{this['_collaborationUIEventService'][_0x1123cd(0x4e7)]({'id':_0x1123cd(0x1eb),'unitID':this[_0x1123cd(0x3b9)]});return;}this[_0x1123cd(0x370)]();}[_0x16128c(0x3e0)](){const _0x331744=_0x16128c;this['_collaborationUIEventService'][_0x331744(0x4e7)]({'id':_0x331744(0x3b6)});}['_showConflictNotification'](){const _0x2e172c=_0x16128c;this[_0x2e172c(0x2f9)]?this[_0x2e172c(0x3ce)]['emitEvent']({'id':_0x2e172c(0x4cd)}):this[_0x2e172c(0x3ce)][_0x2e172c(0x4e7)]({'id':_0x2e172c(0x33a)});}['_disableEditing'](){const _0x546358=_0x16128c;this[_0x546358(0x436)][_0x546358(0x3fd)](new r[(_0x546358(0x3c5))](this[_0x546358(0x3b9)])['id'],!0x1);}};j=y([v(0x6,(0x0,t[_0x16128c(0x4c0)])(t[_0x16128c(0x1f5)])),v(0x7,t['ICommandService']),v(0x8,t['IUndoRedoService']),v(0x9,(0x0,t[_0x16128c(0x4c0)])(e['RevisionService'])),v(0xa,(0x0,t[_0x16128c(0x4c0)])(t[_0x16128c(0x48a)])),v(0xb,(0x0,t['Inject'])(_)),v(0xc,(0x0,t[_0x16128c(0x2e7)])(x))],j);let M=class extends E{constructor(_0x4f7260,_0xec247e,_0x4c95c9,_0x32afab,_0x37537a,_0x1244fe,_0x225382,_0x2ec8c0,_0x5884e7,_0x51d590){const _0x1ca1e2=_0x16128c;super(_0x4f7260,_0xec247e,_0x4c95c9,_0x32afab,_0x37537a,_0x2ec8c0,_0x5884e7,_0x225382,_0x51d590),this[_0x1ca1e2(0x200)]=_0x1244fe,g(this,_0x1ca1e2(0x3fb),'offline');}['appendMutation'](_0xcd9623){const _0x2d3e18=_0x16128c;return this[_0x2d3e18(0x4c6)][_0x2d3e18(0x4da)](_0xcd9623),this[_0x2d3e18(0x3f0)](),this;}[_0x16128c(0x3a5)](_0x514725){const _0x2f8cda=_0x16128c;throw Error(_0x2f8cda(0x2fd));}[_0x16128c(0x37b)](){const _0x4f5c67=_0x16128c;throw Error(_0x4f5c67(0x392));}[_0x16128c(0x379)](){const _0x24fb1f=_0x16128c;throw Error(_0x24fb1f(0x400));}[_0x16128c(0x424)](){return this;}[_0x16128c(0x2c2)](){return this;}['toggleOnline'](){const _0x2134d7=_0x16128c;let {_injector:_0x3ea7d5,_pendingMutations:_0x171a97,_awaitingChangeset:_0x4aba5e,unitID:_0x2ecf96,_handler:_0x421d4b,type:_0x3cdf3}=this,_0x876b29=Ue(_0x3ea7d5,_0x2ecf96,_0x3cdf3,_0x4aba5e,_0x171a97,_0x421d4b);return _0x876b29 instanceof O?_0x876b29[_0x2134d7(0x333)]():(_0x876b29 instanceof A||_0x876b29 instanceof k)&&_0x876b29[_0x2134d7(0x289)](),_0x876b29;}['resend'](){const _0x35abd1=_0x16128c;throw Error(_0x35abd1(0x414));}};M=y([v(0x5,(0x0,t[_0x16128c(0x4c0)])(t[_0x16128c(0x33b)])),v(0x6,(0x0,t[_0x16128c(0x4c0)])(e[_0x16128c(0x27c)])),v(0x7,t['ICommandService']),v(0x8,t[_0x16128c(0x491)]),v(0x9,(0x0,t[_0x16128c(0x2e7)])(x))],M);let N=class extends E{constructor(_0x29ff62,_0x2c6f2f,_0x29d797,_0x1313c4,_0x3bd28d,_0x474939,_0x3dfd85,_0x26bb42,_0x33875f,_0x321147,_0x5996e8,_0x801164,_0x3c3aac,_0x4c15d0){const _0x29c3e3=_0x16128c;super(_0x29ff62,_0x2c6f2f,_0x29d797,_0x1313c4,_0x3dfd85,_0x5996e8,_0x801164,_0x33875f,_0x4c15d0),this[_0x29c3e3(0x395)]=_0x3bd28d,this[_0x29c3e3(0x485)]=_0x474939,this[_0x29c3e3(0x200)]=_0x26bb42,this[_0x29c3e3(0x451)]=_0x321147,this[_0x29c3e3(0x238)]=_0x3c3aac,this[_0x29c3e3(0x2ec)]=_0x4c15d0,g(this,_0x29c3e3(0x3fb),_0x29c3e3(0x35a));}['onMissedChangesetFetched'](_0x368de7){const _0x68ca7b=_0x16128c;try{if(this['_handleRemoteChangesets'](_0x368de7)[_0x68ca7b(0x225)])throw Error(_0x68ca7b(0x30d));if(this[_0x68ca7b(0x486)]([...this[_0x68ca7b(0x485)]][_0x68ca7b(0x43d)]((_0x26d74d,_0x2a340e)=>_0x26d74d[_0x68ca7b(0x3c7)]-_0x2a340e[_0x68ca7b(0x3c7)]))[_0x68ca7b(0x225)])return this[_0x68ca7b(0x485)]=[],this['_updateLocalCache'](),this['_handler']['onMissingChangesets']({'from':this['_getCurrentRevision'](),'to':0x0}),this;let _0xfd47bb=this[_0x68ca7b(0x3f6)],_0x4a2990=this[_0x68ca7b(0x4c6)],_0x1ae192;if(_0xfd47bb&&_0x4a2990['length']!==0x0)_0x1ae192=this[_0x68ca7b(0x200)][_0x68ca7b(0x318)](A,this[_0x68ca7b(0x3b9)],this[_0x68ca7b(0x3eb)],_0xfd47bb,_0x4a2990,this[_0x68ca7b(0x2dd)],void 0x0);else{if(_0xfd47bb&&_0x4a2990['length']===0x0)_0xfd47bb['baseRev']=this[_0x68ca7b(0x4e6)](),_0x1ae192=this['_injector'][_0x68ca7b(0x318)](k,this[_0x68ca7b(0x3b9)],this['type'],_0xfd47bb,this[_0x68ca7b(0x2dd)]);else{if(_0x4a2990[_0x68ca7b(0x471)]!==0x0){let _0x5e6146=this[_0x68ca7b(0x200)]['createInstance'](O,this[_0x68ca7b(0x3b9)],this[_0x68ca7b(0x3eb)],_0x4a2990,this['_handler']);_0x5e6146['_schedule'](),_0x1ae192=_0x5e6146;}else _0x1ae192=this[_0x68ca7b(0x200)][_0x68ca7b(0x318)](D,this['unitID'],this['type'],this[_0x68ca7b(0x2dd)]);}}return _0x1ae192[_0x68ca7b(0x3f0)](),_0x1ae192;}catch(_0x52eb39){return this[_0x68ca7b(0x451)][_0x68ca7b(0x1d8)](_0x68ca7b(0x264),_0x68ca7b(0x4f6),_0x52eb39),this[_0x68ca7b(0x200)][_0x68ca7b(0x318)](j,this[_0x68ca7b(0x3b9)],this[_0x68ca7b(0x3eb)],this['_awaitingChangeset'],this[_0x68ca7b(0x4c6)],this['_handler'],!0x1);}}['_handleRemoteChangesets'](_0x15ecb7){const _0x23eb7f=_0x16128c;this[_0x23eb7f(0x219)]();for(let _0x3b1c16=0x0;_0x3b1c16<_0x15ecb7[_0x23eb7f(0x471)];_0x3b1c16++){let _0x5baa7d=_0x15ecb7[_0x3b1c16],_0x4d0a46=this['_getCurrentRevision']();if(!(_0x5baa7d[_0x23eb7f(0x3c7)]<=_0x4d0a46)){if(_0x5baa7d[_0x23eb7f(0x3c7)]>_0x4d0a46+0x1)return{'missingChangesets':!0x0};if(this['_isEchoedAwaitingChangeset'](_0x5baa7d)){this['_acknowledgeAwaiting']();continue;}this[_0x23eb7f(0x437)](_0x5baa7d),this['_acknowledgeAwaitingIfReady']();}}return{'missingChangesets':!0x1};}[_0x16128c(0x437)](_0x553845){const _0xde33e5=_0x16128c;let _0x35165d=_0x553845,_0x26c606=this[_0xde33e5(0x3f6)];if(_0x26c606){let _0x11a165=this[_0xde33e5(0x238)][_0xde33e5(0x2cc)]([_0x553845],[_0x26c606],!0x1);if(!(0x0,e[_0xde33e5(0x23c)])(_0x11a165))throw _0x11a165[_0xde33e5(0x1d8)];_0x35165d=_0x11a165['c1Prime'][0x0],_0x26c606=_0x11a165[_0xde33e5(0x21c)][0x0];}let _0x25568a=this['_pendingMutations'];if(_0x25568a[_0xde33e5(0x471)]){let _0x9ffe7f=this['_transformService'][_0xde33e5(0x375)](_0x35165d,_0x25568a);if(!(0x0,e['isTransformMutationsWithChangesetSuccess'])(_0x9ffe7f))throw _0x9ffe7f[_0xde33e5(0x1d8)];_0x35165d=_0x9ffe7f[_0xde33e5(0x2f7)],_0x25568a=_0x9ffe7f[_0xde33e5(0x275)];}this[_0xde33e5(0x1f8)](_0x35165d),_0x26c606&&(_0x26c606[_0xde33e5(0x28c)]=this[_0xde33e5(0x4e6)]()),this[_0xde33e5(0x3f6)]=_0x26c606,this['_pendingMutations']=_0x25568a;}[_0x16128c(0x219)](){const _0x11a85a=_0x16128c;if(!this[_0x11a85a(0x3f6)]||this[_0x11a85a(0x395)]==null)return;let _0xf041d=this[_0x11a85a(0x4e6)]();if(this[_0x11a85a(0x395)]<=_0xf041d)throw Error(_0x11a85a(0x3d5)+this['_acknowledgedAwaitingRevision']+'.');this[_0x11a85a(0x395)]===_0xf041d+0x1&&this[_0x11a85a(0x384)]();}[_0x16128c(0x384)](){const _0x13e3ca=_0x16128c;this[_0x13e3ca(0x338)](),this['_awaitingChangeset']=null,this['_acknowledgedAwaitingRevision']=null;}['_isEchoedAwaitingChangeset'](_0x3200bf){const _0x62c6ba=_0x16128c;let _0x16a12d=this[_0x62c6ba(0x3f6)];return!_0x16a12d||!_0x16a12d[_0x62c6ba(0x4ac)]||_0x16a12d[_0x62c6ba(0x280)]===null||_0x16a12d[_0x62c6ba(0x280)]===void 0x0?!0x1:_0x3200bf[_0x62c6ba(0x3b9)]===_0x16a12d[_0x62c6ba(0x3b9)]&&_0x3200bf[_0x62c6ba(0x4ac)]===_0x16a12d['sid']&&_0x3200bf[_0x62c6ba(0x280)]===_0x16a12d['reqId'];}[_0x16128c(0x289)](){const _0x492562=_0x16128c;throw Error(_0x492562(0x2f8));}[_0x16128c(0x372)](_0x4ca150){const _0x14c469=_0x16128c;return this[_0x14c469(0x4c6)][_0x14c469(0x4da)](_0x4ca150),this;}[_0x16128c(0x3a5)](_0x3555f5){const _0x343890=_0x16128c;return this[_0x343890(0x485)][_0x343890(0x4da)](_0x3555f5),this;}[_0x16128c(0x37b)](_0x209ea6){const _0x1eb231=_0x16128c;if(this['_awaitingChangeset']){let _0x8e678c=this[_0x1eb231(0x4e6)]();return _0x209ea6['revision']<=_0x8e678c||(_0x8e678c+0x1===_0x209ea6[_0x1eb231(0x3c7)]?(this['_incrementRevisionNumber'](),this[_0x1eb231(0x3f6)]=null,this[_0x1eb231(0x395)]=null):this[_0x1eb231(0x395)]=_0x209ea6[_0x1eb231(0x3c7)]),this;}if(_0x209ea6['revision']<=this['_getCurrentRevision']())return this;throw Error(_0x1eb231(0x2ae));}['onRemoteRej'](_0x48dd27){const _0x6247be=_0x16128c;return this[_0x6247be(0x479)](!!(_0x48dd27!=null&&_0x48dd27[_0x6247be(0x3ac)]));}[_0x16128c(0x424)](){return this;}[_0x16128c(0x2c2)](){const _0x8c4e74=_0x16128c;return this[_0x8c4e74(0x200)][_0x8c4e74(0x318)](M,this[_0x8c4e74(0x3b9)],this['type'],this['_awaitingChangeset'],this[_0x8c4e74(0x4c6)],this[_0x8c4e74(0x2dd)]);}[_0x16128c(0x284)](){return this;}['_onConflict'](_0x4f61a2){const _0x21399a=_0x16128c;return this['_injector'][_0x21399a(0x318)](j,this[_0x21399a(0x3b9)],this[_0x21399a(0x3eb)],this['_awaitingChangeset'],this[_0x21399a(0x4c6)],this['_handler'],_0x4f61a2);}};N=y([v(0x7,(0x0,t[_0x16128c(0x4c0)])(t[_0x16128c(0x33b)])),v(0x8,(0x0,t[_0x16128c(0x4c0)])(e[_0x16128c(0x27c)])),v(0x9,t[_0x16128c(0x22c)]),v(0xa,t[_0x16128c(0x316)]),v(0xb,t[_0x16128c(0x491)]),v(0xc,e['ITransformService']),v(0xd,(0x0,t['Optional'])(x))],N);function Ue(_0x438560,_0x156ec2,_0x4b34c6,_0x1e5b4f,_0x19de5f,_0x53d404){const _0x59c690=_0x16128c;return _0x1e5b4f&&_0x19de5f['length']?_0x438560[_0x59c690(0x318)](A,_0x156ec2,_0x4b34c6,_0x1e5b4f,_0x19de5f,_0x53d404,void 0x0):_0x1e5b4f?_0x438560[_0x59c690(0x318)](k,_0x156ec2,_0x4b34c6,_0x1e5b4f,_0x53d404):_0x19de5f[_0x59c690(0x471)]?_0x438560[_0x59c690(0x318)](O,_0x156ec2,_0x4b34c6,_0x19de5f,_0x53d404):_0x438560[_0x59c690(0x318)](D,_0x156ec2,_0x4b34c6,_0x53d404);}let P=class extends t[_0x16128c(0x313)]{get[_0x16128c(0x448)](){const _0x380b80=_0x16128c;return this[_0x380b80(0x49d)];}constructor(_0x2919da,_0x56a7f7,_0x437c5f,_0x44eb6f,_0x3d7a4d,_0x5924a2,_0x163bcc,_0x5e4d54,_0x46adad,_0x49bcd9,_0x91066a,_0x1ace81,_0x4dbac4,_0x12752f){const _0x49c087=_0x16128c;super(),this[_0x49c087(0x3b9)]=_0x2919da,this['session']=_0x56a7f7,this[_0x49c087(0x425)]=_0x437c5f,this['_injector']=_0x44eb6f,this[_0x49c087(0x287)]=_0x3d7a4d,this[_0x49c087(0x2de)]=_0x5924a2,this['_revisionService']=_0x163bcc,this[_0x49c087(0x383)]=_0x5e4d54,this[_0x49c087(0x32c)]=_0x46adad,this[_0x49c087(0x451)]=_0x49bcd9,this[_0x49c087(0x297)]=_0x91066a,this['_permissionService']=_0x1ace81,this[_0x49c087(0x260)]=_0x4dbac4,this[_0x49c087(0x46e)]=_0x12752f,g(this,_0x49c087(0x250),new i[(_0x49c087(0x204))](null)),g(this,_0x49c087(0x245),this[_0x49c087(0x250)][_0x49c087(0x45a)]()),g(this,_0x49c087(0x49d),void 0x0),g(this,_0x49c087(0x2a9),!0x1),g(this,_0x49c087(0x42a),''),g(this,_0x49c087(0x44f),0x0),g(this,'status$',this['state$'][_0x49c087(0x476)]((0x0,i['map'])(_0x2050cd=>_0x2050cd?_0x2050cd[_0x49c087(0x3fb)]:_0x49c087(0x4ea)),(0x0,i[_0x49c087(0x45b)])({'bufferSize':0x1,'refCount':!0x0}))),g(this,_0x49c087(0x44b),!0x1),g(this,_0x49c087(0x3d7),[]);}async[_0x16128c(0x49a)](){const _0x1ff101=_0x16128c;if(this[_0x1ff101(0x448)])throw Error(_0x1ff101(0x4c4));await this['_init']();}[_0x16128c(0x319)](){const _0x5e5571=_0x16128c;return this[_0x5e5571(0x2a9)]=!0x0,(0x0,t[_0x5e5571(0x34a)])(()=>{const _0x33557f=_0x5e5571;this['_collaborationPaused']=!0x1,this[_0x33557f(0x4e2)]();});}['onLocalMutation'](_0x223cc6){const _0x2817b0=_0x16128c;this[_0x2817b0(0x3e7)](_0x223cc6);}['_updateState'](_0x159b45){const _0x54a31a=_0x16128c;this['_state']=_0x159b45,this['_state$'][_0x54a31a(0x272)](_0x159b45);}async[_0x16128c(0x2f6)](){const _0x89ee21=_0x16128c;if(this[_0x89ee21(0x446)](await this[_0x89ee21(0x312)]()),this[_0x89ee21(0x260)]){var _0x4425aa;(_0x4425aa=this[_0x89ee21(0x260)])==null||_0x4425aa[_0x89ee21(0x2ba)](this[_0x89ee21(0x3b9)]),this['disposeWithMe'](this[_0x89ee21(0x260)]['getUnitStatus$'](this['unitID'])[_0x89ee21(0x3f8)](_0x12c89b=>{const _0x1ba4bb=_0x89ee21;this[_0x1ba4bb(0x451)][_0x1ba4bb(0x235)](_0x1ba4bb(0x2d2),'editing\x20status\x20changed\x20to',_0x12c89b),_0x12c89b===0x1?(this[_0x1ba4bb(0x383)][_0x1ba4bb(0x4e7)]({'id':_0x1ba4bb(0x229)}),this[_0x1ba4bb(0x436)][_0x1ba4bb(0x3fd)](new r[(_0x1ba4bb(0x3c5))](this[_0x1ba4bb(0x3b9)])['id'],!0x1),this[_0x1ba4bb(0x436)][_0x1ba4bb(0x2e9)](!0x1)):(this['_permissionService']['updatePermissionPoint'](new r[(_0x1ba4bb(0x3c5))](this[_0x1ba4bb(0x3b9)])['id'],!0x0),this['_permissionService'][_0x1ba4bb(0x2e9)](!0x0));}));}let _0x728651=!0x1;return this[_0x89ee21(0x31d)](this[_0x89ee21(0x36f)][_0x89ee21(0x470)][_0x89ee21(0x3f8)](_0x103981=>{const _0x269eb6=_0x89ee21;_0x103981===0x3?this[_0x269eb6(0x246)](_0x728651):_0x103981===0x2&&(_0x728651=!0x0,this['_toggleOffline']());})),this[_0x89ee21(0x31d)](this[_0x89ee21(0x36f)][_0x89ee21(0x47e)]['subscribe'](_0x43d7a1=>{const _0x5147ac=_0x89ee21;try{switch(_0x43d7a1[_0x5147ac(0x25c)]){case e[_0x5147ac(0x1f4)][_0x5147ac(0x2db)]:this[_0x5147ac(0x386)]((0x0,e[_0x5147ac(0x453)])(_0x43d7a1['data']));break;case e[_0x5147ac(0x1f4)][_0x5147ac(0x412)]:this[_0x5147ac(0x50a)](_0x43d7a1[_0x5147ac(0x223)]);break;case e[_0x5147ac(0x1f4)][_0x5147ac(0x3dd)]:this[_0x5147ac(0x31c)]();break;case e['CollaborationEvent'][_0x5147ac(0x2a3)]:this[_0x5147ac(0x42e)](_0x43d7a1[_0x5147ac(0x223)]);break;case e[_0x5147ac(0x1f4)][_0x5147ac(0x4a4)]:this[_0x5147ac(0x32d)](_0x43d7a1[_0x5147ac(0x223)][_0x5147ac(0x4d0)][_0x5147ac(0x2b2)](_0x4e817f=>(0x0,e[_0x5147ac(0x453)])(_0x4e817f)));break;case e[_0x5147ac(0x1f4)][_0x5147ac(0x505)]:this[_0x5147ac(0x31c)]({'isPermissionRej':!0x0});break;case e[_0x5147ac(0x1f4)][_0x5147ac(0x311)]:}}catch(_0x5e6ec0){throw console[_0x5147ac(0x1d8)]('Error\x20on\x20receiving\x20event',_0x5e6ec0),_0x5e6ec0;}})),this[_0x89ee21(0x49d)];}[_0x16128c(0x3bc)](){const _0x2cbf97=_0x16128c;this[_0x2cbf97(0x44b)]=!0x1;}[_0x16128c(0x232)](){const _0x4fc13c=_0x16128c;if(this[_0x4fc13c(0x44b)])throw Error(_0x4fc13c(0x43e));this[_0x4fc13c(0x44b)]=!0x0;}[_0x16128c(0x3e7)](_0x1a4900){const _0x585765=_0x16128c;this[_0x585765(0x232)](),this[_0x585765(0x446)](this[_0x585765(0x49d)][_0x585765(0x372)](_0x1a4900)),this['_unlockTransition']();}[_0x16128c(0x386)](_0x41255d){const _0x2fa3e7=_0x16128c;if(!(_0x41255d[_0x2fa3e7(0x3c7)]<=this[_0x2fa3e7(0x358)][_0x2fa3e7(0x35f)](this[_0x2fa3e7(0x3b9)]))){if(this['_collaborationPaused']){this[_0x2fa3e7(0x3d7)][_0x2fa3e7(0x4da)](_0x41255d);return;}this[_0x2fa3e7(0x3d0)](_0x41255d);}}[_0x16128c(0x4e2)](){const _0x1510d3=_0x16128c;this[_0x1510d3(0x3d7)][_0x1510d3(0x43b)](_0x26aaba=>this[_0x1510d3(0x3d0)](_0x26aaba)),this[_0x1510d3(0x3d7)]=[];}[_0x16128c(0x3d0)](_0x557aca){const _0x2063a5=_0x16128c;let _0x44cc7c=this['_compressMutationService']['interceptor']['fetchThroughInterceptors'](this[_0x2063a5(0x287)][_0x2063a5(0x3d4)][_0x2063a5(0x488)]()[_0x2063a5(0x4bd)])(_0x557aca[_0x2063a5(0x208)],null)||_0x557aca[_0x2063a5(0x208)],_0x8eb224={..._0x557aca,'mutations':_0x44cc7c};this[_0x2063a5(0x232)](),this['_updateState'](this[_0x2063a5(0x49d)][_0x2063a5(0x3a5)](_0x8eb224)),this[_0x2063a5(0x3bc)]();}[_0x16128c(0x50a)](_0x494501){const _0x28d676=_0x16128c;this[_0x28d676(0x232)](),this[_0x28d676(0x446)](this[_0x28d676(0x49d)]['onRemoteAck'](_0x494501)),this[_0x28d676(0x3bc)]();}[_0x16128c(0x31c)](_0x49de9c){const _0x4521ee=_0x16128c;this[_0x4521ee(0x232)](),this[_0x4521ee(0x446)](this[_0x4521ee(0x49d)][_0x4521ee(0x379)](_0x49de9c)),this['_unlockTransition']();}['_onRemoteRetry'](_0x5138d0){const _0x3b8db5=_0x16128c;this['_lockTransition'](),this[_0x3b8db5(0x446)](this['_state']['onRemoteRetry'](_0x5138d0)),this[_0x3b8db5(0x3bc)]();}[_0x16128c(0x32d)](_0x250e1b){const _0x2b9e49=_0x16128c;if(!(this[_0x2b9e49(0x49d)]instanceof N))throw TypeError('[CollaborationEntity]:\x20cannot\x20apply\x20missing\x20results\x20on\x20other\x20states!');let _0xb720d5=_0x250e1b[_0x2b9e49(0x2b2)](_0x3a52a8=>{const _0x5ddfd6=_0x2b9e49;let _0x539f9c=this['_compressMutationService'][_0x5ddfd6(0x3d4)][_0x5ddfd6(0x3a9)](this[_0x5ddfd6(0x287)][_0x5ddfd6(0x3d4)][_0x5ddfd6(0x488)]()[_0x5ddfd6(0x4bd)])(_0x3a52a8['mutations'],null)||_0x3a52a8[_0x5ddfd6(0x208)];return{..._0x3a52a8,'mutations':_0x539f9c};});this[_0x2b9e49(0x232)](),this['_updateState'](this[_0x2b9e49(0x49d)]['onMissedChangesetFetched'](_0xb720d5)),this[_0x2b9e49(0x3bc)]();}[_0x16128c(0x498)](){const _0x232c01=_0x16128c;this['_lockTransition'](),this[_0x232c01(0x446)](this['_state'][_0x232c01(0x2c2)]()),this[_0x232c01(0x3bc)]();}[_0x16128c(0x246)](_0x5a7184=!0x1){const _0x5ba1a2=_0x16128c;this[_0x5ba1a2(0x232)](),this['_updateState'](this[_0x5ba1a2(0x49d)]['toggleOnline']()),this['_unlockTransition']();let _0x5e2a34=this[_0x5ba1a2(0x49d)];_0x5a7184&&_0x5e2a34 instanceof D&&(this[_0x5ba1a2(0x232)](),this[_0x5ba1a2(0x446)](_0x5e2a34['fetchMiss']()),this[_0x5ba1a2(0x3bc)]());}async[_0x16128c(0x312)](){return new Promise(_0x3ffdb4=>{const _0x31c27a=_0x4c27;this[_0x31c27a(0x36f)][_0x31c27a(0x470)][_0x31c27a(0x476)]((0x0,i[_0x31c27a(0x27e)])(0x1))[_0x31c27a(0x3f8)](async _0x2051bd=>{const _0x56327e=_0x31c27a;_0x3ffdb4(await this[_0x56327e(0x29c)](_0x2051bd===0x3));});});}[_0x16128c(0x361)](){let _0x525fcc=this['unitID'];return{'onStateChange':(_0x30040e,_0x1537ee)=>{const _0x33d13e=_0x4c27;if(_0x30040e!==this['_state'])throw Error(_0x33d13e(0x4ca)+_0x30040e[_0x33d13e(0x3fb)]+_0x33d13e(0x1c9)+_0x1537ee[_0x33d13e(0x3fb)]+_0x33d13e(0x373)+this['_state'][_0x33d13e(0x3fb)]);this[_0x33d13e(0x446)](_0x1537ee);},'onSendChangeset':_0x4db61f=>{const _0x565891=_0x4c27;_0x4db61f[_0x565891(0x4ac)]||(_0x4db61f[_0x565891(0x4ac)]=this[_0x565891(0x42a)],_0x4db61f[_0x565891(0x280)]=++this[_0x565891(0x44f)]);let _0x53fa4d={'eventID':e['CollaborationEvent'][_0x565891(0x2bf)],'data':{'unitID':_0x4db61f[_0x565891(0x3b9)],'unitType':this['_type'],'changeset':_0x4db61f,'memberID':this[_0x565891(0x36f)][_0x565891(0x347)]()}};this['session'][_0x565891(0x389)](_0x53fa4d,this[_0x565891(0x3b9)]);},'onMissingChangesets':({from:_0x417eda,to:_0xa9606a})=>{const _0x6e2f4f=_0x4c27;this['_logService']['debug'](_0x6e2f4f(0x2d2),_0x6e2f4f(0x3f5)+_0x417eda+_0x6e2f4f(0x2d5)+_0xa9606a);let _0x1ba425={'eventID':e[_0x6e2f4f(0x1f4)]['FETCH_MISSING'],'data':{'unitID':_0x525fcc,'unitType':this[_0x6e2f4f(0x425)],'from':_0x417eda,'to':_0xa9606a}};this[_0x6e2f4f(0x36f)]['send'](_0x1ba425,this[_0x6e2f4f(0x3b9)]);}};}async['_createInitialStateImpl'](_0x4ec748){const _0xaa2ef8=_0x16128c;var _0x2ba8b3;let _0x510b38=await((_0x2ba8b3=this['_localCacheService'])==null?void 0x0:_0x2ba8b3['loadOfflineData'](this['unitID'])),_0x10e974=(_0x510b38==null?void 0x0:_0x510b38[_0xaa2ef8(0x208)])??[],_0x34e4b9=(_0x510b38==null?void 0x0:_0x510b38[_0xaa2ef8(0x1d7)])??null,_0x4b83db=!!(_0x34e4b9!=null&&_0x34e4b9['sid'])&&!!(_0x34e4b9!=null&&_0x34e4b9[_0xaa2ef8(0x280)]);this[_0xaa2ef8(0x42a)]=_0x4b83db?_0x34e4b9['sid']:(0x0,e[_0xaa2ef8(0x337)])(),this[_0xaa2ef8(0x44f)]=_0x4b83db?_0x34e4b9[_0xaa2ef8(0x280)]:0x0;let _0x354c34=this[_0xaa2ef8(0x3b9)];try{this[_0xaa2ef8(0x33e)](_0x34e4b9,_0x10e974);}catch(_0x1b1dc3){this[_0xaa2ef8(0x451)][_0xaa2ef8(0x1d8)](_0x1b1dc3);}let _0x8d79a8=this['_createHandler']();if(_0x4ec748){let _0x162383=Ue(this[_0xaa2ef8(0x200)],_0x354c34,this[_0xaa2ef8(0x425)],_0x34e4b9,_0x10e974,_0x8d79a8);return _0x162383 instanceof O?_0x162383[_0xaa2ef8(0x333)]():(_0x162383 instanceof A||_0x162383 instanceof k)&&_0x162383[_0xaa2ef8(0x289)](),_0x162383;}return this[_0xaa2ef8(0x200)][_0xaa2ef8(0x318)](M,_0x354c34,this[_0xaa2ef8(0x425)],_0x34e4b9,_0x10e974,_0x8d79a8);}['_replayCachedMutations'](_0x51ace2,_0x3bd731){const _0x1c586a=_0x16128c;var _0xb3b686,_0x29eefd;let _0x27a6d7=this['_compressMutationService'][_0x1c586a(0x3d4)][_0x1c586a(0x3a9)](this['_compressMutationService'][_0x1c586a(0x3d4)]['getInterceptPoints']()[_0x1c586a(0x4bd)]);(_0xb3b686=_0x27a6d7((_0x51ace2==null?void 0x0:_0x51ace2['mutations'])||[],null))==null||_0xb3b686[_0x1c586a(0x43b)](_0x531520=>this[_0x1c586a(0x297)][_0x1c586a(0x2bd)](_0x531520['id'],_0x531520[_0x1c586a(0x4f8)])),(_0x29eefd=_0x27a6d7(_0x3bd731||[],null))==null||_0x29eefd[_0x1c586a(0x43b)](_0x48cee7=>this[_0x1c586a(0x297)][_0x1c586a(0x2bd)](_0x48cee7['id'],_0x48cee7[_0x1c586a(0x4f8)]));}};P=y([v(0x3,(0x0,t[_0x16128c(0x4c0)])(t[_0x16128c(0x33b)])),v(0x4,(0x0,t[_0x16128c(0x4c0)])(e[_0x16128c(0x22a)])),v(0x5,(0x0,t[_0x16128c(0x4c0)])(t['LocaleService'])),v(0x6,(0x0,t[_0x16128c(0x4c0)])(e[_0x16128c(0x27c)])),v(0x7,(0x0,t['Inject'])(_)),v(0x8,t[_0x16128c(0x399)]),v(0x9,t['ILogService']),v(0xa,t['ICommandService']),v(0xb,t[_0x16128c(0x1f5)]),v(0xc,(0x0,t[_0x16128c(0x2e7)])(C)),v(0xd,(0x0,t[_0x16128c(0x2e7)])(x))],P);let F=class extends P{constructor(_0x2a006c,_0x370b27,_0xcbbf08,_0x3c0f9b,_0x4ae649,_0x4c854d,_0x1c68d7,_0x4de5d7,_0x2acb05,_0x3ea40,_0x21fed3,_0x3a0927,_0x2d233d,_0x102f3a,_0xe16469){const _0x31504c=_0x16128c;super(_0x2a006c,_0xcbbf08,_0x370b27,_0x3c0f9b,_0x4ae649,_0x4c854d,_0x1c68d7,_0x4de5d7,_0x2acb05,_0x3ea40,_0x21fed3,_0x3a0927,_0x102f3a,_0xe16469),this['unitID']=_0x2a006c,this['type']=_0x370b27,this[_0x31504c(0x22d)]=_0x2d233d,g(this,_0x31504c(0x21e),null);}[_0x16128c(0x431)](_0x54d1d4){const _0x4e502b=_0x16128c;this[_0x4e502b(0x21e)]=_0x54d1d4;}[_0x16128c(0x22b)](){const _0x3dcaad=_0x16128c;this[_0x3dcaad(0x21e)]=null,super[_0x3dcaad(0x22b)]();}[_0x16128c(0x361)](){const _0x513035=_0x16128c;let _0x4ca46a=super['_createHandler']();return _0x4ca46a[_0x513035(0x39a)]=_0x102198=>{const _0xfc9ef2=_0x513035;var _0x5e29c6,_0x25369c;return(_0x5e29c6=this['_handlerCallback'])==null||(_0x25369c=_0x5e29c6[_0xfc9ef2(0x39a)])==null?void 0x0:_0x25369c[_0xfc9ef2(0x2a7)](_0x5e29c6,_0x102198);},_0x4ca46a[_0x513035(0x43c)]=_0x20f376=>{const _0x2e82f5=_0x513035;var _0x17f3bc,_0x1e307d;return(_0x17f3bc=this[_0x2e82f5(0x21e)])==null||(_0x1e307d=_0x17f3bc[_0x2e82f5(0x43c)])==null?void 0x0:_0x1e307d[_0x2e82f5(0x2a7)](_0x17f3bc,_0x20f376);},_0x4ca46a['onPrepareTransformSelections']=_0x3f74cd=>{const _0xf862ac=_0x513035;var _0x3a778c,_0x251156;return((_0x3a778c=this[_0xf862ac(0x21e)])==null||(_0x251156=_0x3a778c[_0xf862ac(0x421)])==null?void 0x0:_0x251156['call'](_0x3a778c,_0x3f74cd))??null;},_0x4ca46a[_0x513035(0x482)]=_0x1d4ea0=>{const _0x4f4a8b=_0x513035;var _0x1e0800,_0x2e679e;return(_0x1e0800=this[_0x4f4a8b(0x21e)])==null||(_0x2e679e=_0x1e0800['onTransformSelections'])==null?void 0x0:_0x2e679e[_0x4f4a8b(0x2a7)](_0x1e0800,_0x1d4ea0);},_0x4ca46a['onSyncEditingCollabCursor']=_0x79fb89=>{const _0x5a41b0=_0x513035;var _0x210774,_0x51248a;return(_0x210774=this[_0x5a41b0(0x21e)])==null||(_0x51248a=_0x210774[_0x5a41b0(0x298)])==null?void 0x0:_0x51248a[_0x5a41b0(0x2a7)](_0x210774,_0x79fb89);},_0x4ca46a['onTransformRemoteChangesetByIMECache']=_0x54de44=>{const _0x29f251=_0x513035;var _0x4f4852,_0x268727;return((_0x4f4852=this[_0x29f251(0x21e)])==null||(_0x268727=_0x4f4852[_0x29f251(0x210)])==null?void 0x0:_0x268727[_0x29f251(0x2a7)](_0x4f4852,_0x54de44))??_0x54de44;},_0x4ca46a['onTransformRemoteChangesetByStateCache']=_0x524a63=>{const _0x457bdd=_0x513035;var _0x40ef42,_0x1ba6a0;return((_0x40ef42=this[_0x457bdd(0x21e)])==null||(_0x1ba6a0=_0x40ef42[_0x457bdd(0x21f)])==null?void 0x0:_0x1ba6a0[_0x457bdd(0x2a7)](_0x40ef42,_0x524a63))??_0x524a63;},_0x4ca46a;}async[_0x16128c(0x2f6)](){const _0x67b91f=_0x16128c;let _0x1efb1e=await super[_0x67b91f(0x2f6)]();return this[_0x67b91f(0x31d)](this[_0x67b91f(0x22d)][_0x67b91f(0x1da)][_0x67b91f(0x3f8)](_0x1c0997=>{const _0x4ebd0c=_0x67b91f;if(_0x1c0997==null||_0x1c0997[_0x4ebd0c(0x367)]!==this['unitID'])return;let {commandId:_0x422e2e,redoState:_0x597df1,unitId:_0x26d276}=_0x1c0997,_0x539e88={'id':_0x422e2e,'type':t[_0x4ebd0c(0x351)][_0x4ebd0c(0x240)],'params':{'unitId':_0x26d276,'actions':_0x597df1[_0x4ebd0c(0x226)],'textRanges':null}};this[_0x4ebd0c(0x3e7)](_0x539e88);})),this[_0x67b91f(0x31d)](this['_commandService'][_0x67b91f(0x30a)]((_0x5e6b02,_0x2963ed)=>{const _0x431f72=_0x67b91f;if(_0x5e6b02[_0x431f72(0x3eb)]!==t[_0x431f72(0x351)][_0x431f72(0x240)]||_0x2963ed!=null&&_0x2963ed['fromCollab']||_0x2963ed!=null&&_0x2963ed[_0x431f72(0x3d6)]||_0x5e6b02['id']===n[_0x431f72(0x1df)]['id'])return;let _0x48fbe4=_0x5e6b02[_0x431f72(0x4f8)];if((_0x48fbe4==null?void 0x0:_0x48fbe4[_0x431f72(0x367)])!==this[_0x431f72(0x3b9)])return;let _0x49505d=_0x5e6b02,_0x5d7bc2=this[_0x431f72(0x287)][_0x431f72(0x3d4)][_0x431f72(0x3a9)](this[_0x431f72(0x287)][_0x431f72(0x3d4)][_0x431f72(0x488)]()[_0x431f72(0x26c)])([_0x49505d],this[_0x431f72(0x32c)])||[_0x49505d];this[_0x431f72(0x3e7)](_0x5d7bc2[0x0]);})),_0x1efb1e;}};F=y([v(0x3,(0x0,t[_0x16128c(0x4c0)])(t[_0x16128c(0x33b)])),v(0x4,(0x0,t[_0x16128c(0x4c0)])(e['CompressMutationService'])),v(0x5,(0x0,t[_0x16128c(0x4c0)])(t[_0x16128c(0x48a)])),v(0x6,(0x0,t['Inject'])(e[_0x16128c(0x27c)])),v(0x7,(0x0,t[_0x16128c(0x4c0)])(_)),v(0x8,t[_0x16128c(0x399)]),v(0x9,t['ILogService']),v(0xa,t[_0x16128c(0x316)]),v(0xb,t[_0x16128c(0x1f5)]),v(0xc,(0x0,t['Inject'])(n[_0x16128c(0x417)])),v(0xd,(0x0,t['Optional'])(C)),v(0xe,(0x0,t[_0x16128c(0x2e7)])(x))],F);let I=class extends P{constructor(_0x34c24d,_0x3c429e,_0x58524a,_0x25a0c0,_0x15488d,_0x38437d,_0x5209c2,_0x241c6e,_0x2315ea,_0x3593c1,_0xeaeb21,_0x283d1b,_0x2dd50c,_0x211c24){const _0x13a683=_0x16128c;super(_0x34c24d,_0x58524a,_0x3c429e,_0x25a0c0,_0x15488d,_0x38437d,_0x5209c2,_0x241c6e,_0x2315ea,_0x3593c1,_0xeaeb21,_0x283d1b,_0x2dd50c,_0x211c24),this[_0x13a683(0x3b9)]=_0x34c24d,this[_0x13a683(0x3eb)]=_0x3c429e;}async[_0x16128c(0x2f6)](){const _0x25a584=_0x16128c;let _0x49f74a=await super['_init']();return this[_0x25a584(0x31d)](this[_0x25a584(0x297)][_0x25a584(0x30a)]((_0x1a8cef,_0xb86e7f)=>{const _0x2231e2=_0x25a584;if(_0x1a8cef[_0x2231e2(0x3eb)]!==t['CommandType'][_0x2231e2(0x240)]||_0xb86e7f!=null&&_0xb86e7f['fromCollab']||_0xb86e7f!=null&&_0xb86e7f['onlyLocal'])return;let _0x365db9=_0x1a8cef[_0x2231e2(0x4f8)];if((_0x365db9==null?void 0x0:_0x365db9['unitId'])!==this['unitID'])return;let _0x25eddd=_0x1a8cef,_0x30ca88=this[_0x2231e2(0x287)][_0x2231e2(0x3d4)]['fetchThroughInterceptors'](this[_0x2231e2(0x287)][_0x2231e2(0x3d4)]['getInterceptPoints']()[_0x2231e2(0x26c)])([_0x25eddd],this[_0x2231e2(0x32c)])||[_0x25eddd];this[_0x2231e2(0x3e7)](_0x30ca88[0x0]);})),_0x49f74a;}};I=y([v(0x3,(0x0,t[_0x16128c(0x4c0)])(t[_0x16128c(0x33b)])),v(0x4,(0x0,t[_0x16128c(0x4c0)])(e[_0x16128c(0x22a)])),v(0x5,(0x0,t[_0x16128c(0x4c0)])(t['LocaleService'])),v(0x6,(0x0,t[_0x16128c(0x4c0)])(e[_0x16128c(0x27c)])),v(0x7,(0x0,t[_0x16128c(0x4c0)])(_)),v(0x8,t[_0x16128c(0x399)]),v(0x9,t[_0x16128c(0x22c)]),v(0xa,t['ICommandService']),v(0xb,t['IPermissionService']),v(0xc,(0x0,t['Optional'])(C)),v(0xd,(0x0,t[_0x16128c(0x2e7)])(x))],I);let L=class extends P{constructor(_0x2a6f3f,_0x253a13,_0xc59f30,_0x4c5016,_0x4076a6,_0x4bf9af,_0x57c62a,_0x3ad428,_0x2adfa2,_0x430877,_0x2980c8,_0x254de5,_0x1747c0,_0x16b7ab,_0x58b947){const _0x4efed2=_0x16128c;super(_0x2a6f3f,_0xc59f30,_0x253a13,_0x4c5016,_0x4076a6,_0x4bf9af,_0x57c62a,_0x2adfa2,_0x430877,_0x2980c8,_0x254de5,_0x1747c0,_0x16b7ab,_0x58b947),this[_0x4efed2(0x3b9)]=_0x2a6f3f,this[_0x4efed2(0x3eb)]=_0x253a13,this[_0x4efed2(0x50d)]=_0x3ad428;}[_0x16128c(0x361)](){const _0xd8d10a=_0x16128c;let _0x4e5a8c=super[_0xd8d10a(0x361)]();return _0x4e5a8c[_0xd8d10a(0x482)]=_0x44c63a=>this[_0xd8d10a(0x50d)][_0xd8d10a(0x1e5)](_0x44c63a),_0x4e5a8c;}async[_0x16128c(0x2f6)](){const _0x2f9dfb=_0x16128c;let _0x15c154=await super[_0x2f9dfb(0x2f6)]();return this[_0x2f9dfb(0x31d)](this[_0x2f9dfb(0x297)][_0x2f9dfb(0x30a)]((_0x3d0f1f,_0x37161b)=>{const _0xfc4a79=_0x2f9dfb;if(_0x3d0f1f[_0xfc4a79(0x3eb)]!==t['CommandType'][_0xfc4a79(0x240)]||_0x37161b!=null&&_0x37161b['fromCollab']||_0x37161b!=null&&_0x37161b[_0xfc4a79(0x3d6)])return;let _0x28fae2=_0x3d0f1f[_0xfc4a79(0x4f8)];if((_0x28fae2==null?void 0x0:_0x28fae2[_0xfc4a79(0x367)])!==this[_0xfc4a79(0x3b9)])return;let _0x37ad95=_0x3d0f1f,_0x182644=this[_0xfc4a79(0x287)][_0xfc4a79(0x3d4)][_0xfc4a79(0x3a9)](this[_0xfc4a79(0x287)][_0xfc4a79(0x3d4)][_0xfc4a79(0x488)]()[_0xfc4a79(0x26c)])([_0x37ad95],this['_univerInstanceService'])||[_0x37ad95];this[_0xfc4a79(0x3e7)](_0x182644[0x0]);})),_0x15c154;}};L=y([v(0x3,(0x0,t['Inject'])(t[_0x16128c(0x33b)])),v(0x4,(0x0,t['Inject'])(e['CompressMutationService'])),v(0x5,(0x0,t[_0x16128c(0x4c0)])(t[_0x16128c(0x48a)])),v(0x6,(0x0,t[_0x16128c(0x4c0)])(e[_0x16128c(0x27c)])),v(0x7,(0x0,t[_0x16128c(0x4c0)])(S)),v(0x8,(0x0,t[_0x16128c(0x4c0)])(_)),v(0x9,t[_0x16128c(0x399)]),v(0xa,t[_0x16128c(0x22c)]),v(0xb,t[_0x16128c(0x316)]),v(0xc,t[_0x16128c(0x1f5)]),v(0xd,(0x0,t['Optional'])(C)),v(0xe,(0x0,t[_0x16128c(0x2e7)])(x))],L);let R=class extends P{constructor(_0x4b8a70,_0x3f3611,_0x3c1fd7,_0x3e30fd,_0x116f3f,_0x25cf6f,_0x4a2bc5,_0x44fec9,_0x4f1f0e,_0xcd09e1,_0x1a5684,_0x4c714c,_0x8d3f56,_0x422b4e){const _0x129121=_0x16128c;super(_0x4b8a70,_0x3c1fd7,_0x3f3611,_0x3e30fd,_0x116f3f,_0x25cf6f,_0x4a2bc5,_0x44fec9,_0x4f1f0e,_0xcd09e1,_0x1a5684,_0x4c714c,_0x8d3f56,_0x422b4e),this[_0x129121(0x3b9)]=_0x4b8a70,this[_0x129121(0x3eb)]=_0x3f3611;}async[_0x16128c(0x2f6)](){const _0x4b60eb=_0x16128c;let _0x2cdba7=await super[_0x4b60eb(0x2f6)]();return this[_0x4b60eb(0x31d)](this[_0x4b60eb(0x297)]['onMutationExecutedForCollab']((_0x2d010a,_0x410ca8)=>{const _0x3fb45c=_0x4b60eb;if(_0x2d010a[_0x3fb45c(0x3eb)]!==t[_0x3fb45c(0x351)]['MUTATION']||_0x410ca8!=null&&_0x410ca8[_0x3fb45c(0x3c2)]||_0x410ca8!=null&&_0x410ca8[_0x3fb45c(0x3d6)])return;let _0x505360=_0x2d010a[_0x3fb45c(0x4f8)];if((_0x505360==null?void 0x0:_0x505360[_0x3fb45c(0x367)])!==this[_0x3fb45c(0x3b9)])return;let _0x51f7b9=_0x2d010a,_0x10cf4a=this[_0x3fb45c(0x287)][_0x3fb45c(0x3d4)][_0x3fb45c(0x3a9)](this[_0x3fb45c(0x287)]['interceptor']['getInterceptPoints']()[_0x3fb45c(0x26c)])([_0x51f7b9],this[_0x3fb45c(0x32c)])||[_0x51f7b9];this['_onLocalMutation'](_0x10cf4a[0x0]);})),_0x2cdba7;}};R=y([v(0x3,(0x0,t[_0x16128c(0x4c0)])(t['Injector'])),v(0x4,(0x0,t[_0x16128c(0x4c0)])(e['CompressMutationService'])),v(0x5,(0x0,t['Inject'])(t[_0x16128c(0x48a)])),v(0x6,(0x0,t[_0x16128c(0x4c0)])(e[_0x16128c(0x27c)])),v(0x7,(0x0,t[_0x16128c(0x4c0)])(_)),v(0x8,t[_0x16128c(0x399)]),v(0x9,t[_0x16128c(0x22c)]),v(0xa,t['ICommandService']),v(0xb,t[_0x16128c(0x1f5)]),v(0xc,(0x0,t[_0x16128c(0x2e7)])(C)),v(0xd,(0x0,t[_0x16128c(0x2e7)])(x))],R);let z=class extends P{constructor(_0x1aac91,_0x1c22f1,_0x26264f,_0x78e218,_0x3b33f8,_0x190d8d,_0x4622ed,_0x28788e,_0x3b5095,_0x4beb70,_0x4c8744,_0x1319ee,_0x30a1a3,_0x193773){const _0x38e261=_0x16128c;super(_0x1aac91,_0x26264f,_0x1c22f1,_0x78e218,_0x3b33f8,_0x190d8d,_0x4622ed,_0x28788e,_0x3b5095,_0x4beb70,_0x4c8744,_0x1319ee,_0x30a1a3,_0x193773),this[_0x38e261(0x3b9)]=_0x1aac91,this[_0x38e261(0x3eb)]=_0x1c22f1;}async[_0x16128c(0x2f6)](){const _0x1e597b=_0x16128c;let _0x64a9f5=await super['_init']();return this[_0x1e597b(0x31d)](this['_commandService']['onMutationExecutedForCollab']((_0x14293d,_0x349c2d)=>{const _0xf07b88=_0x1e597b;if(_0x14293d[_0xf07b88(0x3eb)]!==t[_0xf07b88(0x351)][_0xf07b88(0x240)]||_0x349c2d!=null&&_0x349c2d[_0xf07b88(0x3c2)]||_0x349c2d!=null&&_0x349c2d['onlyLocal'])return;let _0x3914f6=_0x14293d[_0xf07b88(0x4f8)];if((_0x3914f6==null?void 0x0:_0x3914f6[_0xf07b88(0x367)])!==this['unitID'])return;let _0x41dee8=_0x14293d,_0x369685=this['_compressMutationService']['interceptor'][_0xf07b88(0x3a9)](this[_0xf07b88(0x287)]['interceptor'][_0xf07b88(0x488)]()[_0xf07b88(0x26c)])([_0x41dee8],this[_0xf07b88(0x32c)])||[_0x41dee8];this['_onLocalMutation'](_0x369685[0x0]);})),_0x64a9f5;}};z=y([v(0x3,(0x0,t['Inject'])(t[_0x16128c(0x33b)])),v(0x4,(0x0,t[_0x16128c(0x4c0)])(e[_0x16128c(0x22a)])),v(0x5,(0x0,t[_0x16128c(0x4c0)])(t[_0x16128c(0x48a)])),v(0x6,(0x0,t['Inject'])(e['RevisionService'])),v(0x7,(0x0,t[_0x16128c(0x4c0)])(_)),v(0x8,t[_0x16128c(0x399)]),v(0x9,t[_0x16128c(0x22c)]),v(0xa,t['ICommandService']),v(0xb,t[_0x16128c(0x1f5)]),v(0xc,(0x0,t[_0x16128c(0x2e7)])(C)),v(0xd,(0x0,t[_0x16128c(0x2e7)])(x))],z);let B=class extends P{constructor(_0x11c6db,_0x3bc3a7,_0x13022f,_0x427348,_0x5a762e,_0x42d683,_0x3d880a,_0x2dd69e,_0x3782f8,_0x3044e4,_0x5604f9,_0x3b9716,_0x349fcb,_0x134334){const _0x29f301=_0x16128c;super(_0x11c6db,_0x13022f,_0x3bc3a7,_0x427348,_0x5a762e,_0x42d683,_0x3d880a,_0x2dd69e,_0x3782f8,_0x3044e4,_0x5604f9,_0x3b9716,_0x349fcb,_0x134334),this[_0x29f301(0x3b9)]=_0x11c6db,this[_0x29f301(0x3eb)]=_0x3bc3a7;}async[_0x16128c(0x2f6)](){const _0x256e8b=_0x16128c;let _0x26a0f0=await super[_0x256e8b(0x2f6)]();return this[_0x256e8b(0x31d)](this['_commandService'][_0x256e8b(0x30a)]((_0x25d658,_0x480e1c)=>{const _0xc6c38c=_0x256e8b;if(_0x25d658[_0xc6c38c(0x3eb)]!==t[_0xc6c38c(0x351)][_0xc6c38c(0x240)]||_0x480e1c!=null&&_0x480e1c[_0xc6c38c(0x3c2)]||_0x480e1c!=null&&_0x480e1c['onlyLocal'])return;let _0xd73aec=_0x25d658['params'];if((_0xd73aec==null?void 0x0:_0xd73aec[_0xc6c38c(0x367)])!==this['unitID'])return;let _0x2dac6b=_0x25d658,_0x1d151e=this[_0xc6c38c(0x287)][_0xc6c38c(0x3d4)]['fetchThroughInterceptors'](this['_compressMutationService']['interceptor'][_0xc6c38c(0x488)]()[_0xc6c38c(0x26c)])([_0x2dac6b],this['_univerInstanceService'])||[_0x2dac6b];this['_onLocalMutation'](_0x1d151e[0x0]);})),_0x26a0f0;}};B=y([v(0x3,(0x0,t['Inject'])(t[_0x16128c(0x33b)])),v(0x4,(0x0,t[_0x16128c(0x4c0)])(e[_0x16128c(0x22a)])),v(0x5,(0x0,t[_0x16128c(0x4c0)])(t['LocaleService'])),v(0x6,(0x0,t[_0x16128c(0x4c0)])(e[_0x16128c(0x27c)])),v(0x7,(0x0,t[_0x16128c(0x4c0)])(_)),v(0x8,t['IUniverInstanceService']),v(0x9,t[_0x16128c(0x22c)]),v(0xa,t['ICommandService']),v(0xb,t[_0x16128c(0x1f5)]),v(0xc,(0x0,t[_0x16128c(0x2e7)])(C)),v(0xd,(0x0,t[_0x16128c(0x2e7)])(x))],B);const We=(0x0,t[_0x16128c(0x2e5)])(_0x16128c(0x4b9));function Ge(_0x1e5fc6){const _0x1b5feb=_0x16128c;let _0x17bef1=_0x1e5fc6[_0x1b5feb(0x223)],_0x4eca5d=JSON[_0x1b5feb(0x1cf)](_0x17bef1);switch(_0x4eca5d[_0x1b5feb(0x37f)]){case a[_0x1b5feb(0x3c0)][_0x1b5feb(0x4fc)]:case a[_0x1b5feb(0x3c0)]['HELLO']:{let _0x560cb5=_0x4eca5d[_0x1b5feb(0x295)];return{..._0x4eca5d,'data':_0x560cb5,'cmd':_0x4eca5d['cmd']};}case a['CombCmd'][_0x1b5feb(0x4cb)]:{let _0x5e6c99=_0x4eca5d['joinRsp'];return{..._0x4eca5d,'data':_0x5e6c99,'cmd':_0x4eca5d[_0x1b5feb(0x37f)]};}case a[_0x1b5feb(0x3c0)][_0x1b5feb(0x2b6)]:{let _0x49506b=_0x4eca5d['collaMsg'];switch(_0x49506b[_0x1b5feb(0x25c)]){case e[_0x1b5feb(0x1f4)][_0x1b5feb(0x505)]:var _0x189e64;return{..._0x4eca5d,'data':{..._0x49506b,'data':(_0x189e64=_0x49506b[_0x1b5feb(0x4fb)])==null?void 0x0:_0x189e64['cs']},'cmd':_0x4eca5d[_0x1b5feb(0x37f)]};case e[_0x1b5feb(0x1f4)]['CHANGESET_ACK']:var _0x4e4d2f;return{..._0x4eca5d,'data':{..._0x49506b,'data':(_0x4e4d2f=_0x49506b[_0x1b5feb(0x4ff)])==null?void 0x0:_0x4e4d2f['cs']},'cmd':_0x4eca5d[_0x1b5feb(0x37f)]};case e[_0x1b5feb(0x1f4)]['NEW_CHANGESETS']:var _0x4133c6;return{..._0x4eca5d,'data':{..._0x49506b,'data':(_0x4133c6=_0x49506b[_0x1b5feb(0x4f0)])==null?void 0x0:_0x4133c6['cs']},'cmd':_0x4eca5d[_0x1b5feb(0x37f)]};case e['CollaborationEvent'][_0x1b5feb(0x3dd)]:var _0x2e953f;return{..._0x4eca5d,'data':{..._0x49506b,'data':(_0x2e953f=_0x49506b['csRejEvent'])==null?void 0x0:_0x2e953f['cs']},'cmd':_0x4eca5d[_0x1b5feb(0x37f)]};case e[_0x1b5feb(0x1f4)][_0x1b5feb(0x2a3)]:var _0xc2950;return{..._0x4eca5d,'data':{..._0x49506b,'data':(_0xc2950=_0x49506b[_0x1b5feb(0x30c)])==null?void 0x0:_0xc2950['cs']},'cmd':_0x4eca5d[_0x1b5feb(0x37f)]};case e[_0x1b5feb(0x1f4)]['UPDATE_CURSOR']:return{..._0x4eca5d,'data':{..._0x49506b,'data':_0x49506b['updateCursorEvent']},'cmd':_0x4eca5d[_0x1b5feb(0x37f)]};case e['CollaborationEvent'][_0x1b5feb(0x1e1)]:return{..._0x4eca5d,'data':{..._0x49506b,'data':_0x49506b[_0x1b5feb(0x459)]},'cmd':_0x4eca5d[_0x1b5feb(0x37f)]};case e[_0x1b5feb(0x1f4)][_0x1b5feb(0x239)]:return{..._0x4eca5d,'data':{..._0x49506b,'data':_0x49506b[_0x1b5feb(0x3ae)]},'cmd':_0x4eca5d[_0x1b5feb(0x37f)]};case e[_0x1b5feb(0x1f4)][_0x1b5feb(0x438)]:return{..._0x4eca5d,'data':{..._0x49506b,'data':_0x49506b[_0x1b5feb(0x418)]},'cmd':_0x4eca5d[_0x1b5feb(0x37f)]};case e[_0x1b5feb(0x1f4)][_0x1b5feb(0x346)]:case e[_0x1b5feb(0x1f4)][_0x1b5feb(0x33f)]:return{..._0x4eca5d,'data':{..._0x49506b,'data':_0x49506b[_0x1b5feb(0x397)]},'cmd':_0x4eca5d['cmd']};case e[_0x1b5feb(0x1f4)]['LIVESHARE_TERMINATE']:return{..._0x4eca5d,'data':{..._0x49506b,'data':_0x49506b[_0x1b5feb(0x418)]},'cmd':_0x4eca5d[_0x1b5feb(0x37f)]};case e[_0x1b5feb(0x1f4)][_0x1b5feb(0x2fa)]:return{..._0x4eca5d,'data':_0x49506b,'cmd':_0x4eca5d[_0x1b5feb(0x37f)]};case e[_0x1b5feb(0x1f4)]['COMMENT_UPDATE']:return{..._0x4eca5d,'data':{..._0x49506b,'data':_0x49506b[_0x1b5feb(0x213)]},'cmd':_0x4eca5d['cmd']};case e[_0x1b5feb(0x1f4)][_0x1b5feb(0x2a2)]:return{..._0x4eca5d,'data':{..._0x49506b,'data':_0x49506b[_0x1b5feb(0x1f0)]},'cmd':_0x4eca5d[_0x1b5feb(0x37f)]};case e['CollaborationEvent'][_0x1b5feb(0x48f)]:return{..._0x4eca5d,'data':{..._0x49506b,'data':_0x49506b['shouldCloseConn']},'cmd':_0x4eca5d[_0x1b5feb(0x37f)]};case e['CollaborationEvent'][_0x1b5feb(0x311)]:return{..._0x4eca5d,'data':{..._0x49506b,'data':_0x49506b[_0x1b5feb(0x39f)]},'cmd':_0x4eca5d[_0x1b5feb(0x37f)]};default:return _0x4eca5d;}}default:return _0x4eca5d;}}function Ke(_0x4e18bc){const _0x38a684=_0x16128c;switch(_0x4e18bc[_0x38a684(0x37f)]){case a[_0x38a684(0x3c0)][_0x38a684(0x4fc)]:case a[_0x38a684(0x3c0)][_0x38a684(0x2c1)]:return JSON[_0x38a684(0x24f)]({'cmd':_0x4e18bc[_0x38a684(0x37f)],'routeKey':_0x4e18bc[_0x38a684(0x38c)]});case a['CombCmd']['INGEST']:{let _0x426648;switch(_0x4e18bc[_0x38a684(0x223)][_0x38a684(0x25c)]){case e[_0x38a684(0x1f4)][_0x38a684(0x45e)]:_0x426648={'eventID':e[_0x38a684(0x1f4)][_0x38a684(0x45e)],'updateCursorEvent':_0x4e18bc[_0x38a684(0x223)][_0x38a684(0x223)]};break;case e[_0x38a684(0x1f4)]['USERS_LEAVE']:_0x426648={'eventID':e[_0x38a684(0x1f4)][_0x38a684(0x239)],'leaveEvent':_0x4e18bc['data'][_0x38a684(0x223)]};break;case e[_0x38a684(0x1f4)][_0x38a684(0x1e1)]:_0x426648={'eventID':e[_0x38a684(0x1f4)]['USERS_ENTER'],'joinEvent':_0x4e18bc[_0x38a684(0x223)][_0x38a684(0x223)]};break;case e['CollaborationEvent'][_0x38a684(0x438)]:_0x426648={'eventID':e['CollaborationEvent'][_0x38a684(0x438)],'liveShareNewHost':_0x4e18bc[_0x38a684(0x223)]['data']};break;case e[_0x38a684(0x1f4)][_0x38a684(0x33f)]:_0x426648={'eventID':e[_0x38a684(0x1f4)][_0x38a684(0x33f)],'liveShareOperation':_0x4e18bc[_0x38a684(0x223)][_0x38a684(0x223)]};break;case e[_0x38a684(0x1f4)]['LIVESHARE_TERMINATE']:_0x426648={'eventID':e[_0x38a684(0x1f4)][_0x38a684(0x3bd)],'liveShareTerminate':_0x4e18bc[_0x38a684(0x223)]['data']};break;case e['CollaborationEvent']['LIVESHARE_REQUEST_HOST']:_0x426648={'eventID':e[_0x38a684(0x1f4)]['LIVESHARE_REQUEST_HOST'],'liveShareRequestHost':_0x4e18bc[_0x38a684(0x223)][_0x38a684(0x223)]};break;case e[_0x38a684(0x1f4)][_0x38a684(0x346)]:_0x426648={'eventID':e[_0x38a684(0x1f4)][_0x38a684(0x346)]};break;default:_0x426648={'eventID':_0x4e18bc[_0x38a684(0x223)][_0x38a684(0x25c)]};}return JSON[_0x38a684(0x24f)]({'cmd':_0x4e18bc[_0x38a684(0x37f)],'routeKey':_0x4e18bc[_0x38a684(0x38c)],'collaMsg':_0x426648});}case a['CombCmd'][_0x38a684(0x4cb)]:return JSON[_0x38a684(0x24f)]({'cmd':_0x4e18bc['cmd'],'routeKey':_0x4e18bc['routeKey'],'joinReq':_0x4e18bc['data']});case a['CombCmd'][_0x38a684(0x230)]:return JSON[_0x38a684(0x24f)]({'cmd':_0x4e18bc['cmd'],'routeKey':_0x4e18bc[_0x38a684(0x38c)],'leaveReq':_0x4e18bc[_0x38a684(0x223)]});default:throw Error(_0x38a684(0x40b));}}function _0x4c27(_0x2ddecf,_0x162f3e){_0x2ddecf=_0x2ddecf-0x1c9;const _0x163194=_0x1631();let _0x4c277e=_0x163194[_0x2ddecf];return _0x4c277e;}const qe=(0x0,t[_0x16128c(0x2e5)])(_0x16128c(0x385));function Je(_0x2ce2bd,_0x4906b2,_0x430815){const _0x405935=_0x16128c;return _0x2ce2bd+'/'+_0x4906b2+_0x405935(0x443)+_0x430815+_0x405935(0x2fb);}let Ye=class extends t[_0x16128c(0x31f)]{constructor(_0x2112c2,_0x194aeb,_0x1cc4c3,_0x26bf7f,_0x29dde9){const _0x2ac2a2=_0x16128c;super(),this[_0x2ac2a2(0x200)]=_0x2112c2,this[_0x2ac2a2(0x3a4)]=_0x194aeb,this[_0x2ac2a2(0x20e)]=_0x1cc4c3,this[_0x2ac2a2(0x451)]=_0x26bf7f,this[_0x2ac2a2(0x24e)]=_0x29dde9;}[_0x16128c(0x22f)](_0x36abd7){const _0x57db6b=_0x16128c;let _0x197495=this[_0x57db6b(0x200)][_0x57db6b(0x1f1)](l['ISocketService']);if(!_0x197495)throw Error('[CollaborationSocketService]:\x20failed\x20to\x20get\x20web\x20socket\x20factory!');let _0x377320=_0x197495[_0x57db6b(0x32b)](_0x36abd7);if(!_0x377320)throw Error(_0x57db6b(0x20c));let _0x58180c=new t[(_0x57db6b(0x4fe))](),_0xcadfac=new i[(_0x57db6b(0x21b))]();_0x58180c[_0x57db6b(0x3ea)](_0x377320['close$'][_0x57db6b(0x3f8)](_0x6b3949=>_0xcadfac['next'](_0x6b3949))),_0x58180c[_0x57db6b(0x3ea)]((0x0,t[_0x57db6b(0x34a)])(()=>_0xcadfac[_0x57db6b(0x26e)]()));let _0x13d7bd=new i['Subject']();_0x58180c[_0x57db6b(0x3ea)](_0x377320[_0x57db6b(0x3f2)]['subscribe'](_0x37c256=>_0x13d7bd['next'](_0x37c256))),_0x58180c[_0x57db6b(0x3ea)]((0x0,t[_0x57db6b(0x34a)])(()=>_0x13d7bd[_0x57db6b(0x26e)]()));let _0x48408e=new i[(_0x57db6b(0x21b))]();_0x58180c[_0x57db6b(0x3ea)](_0x377320['message$'][_0x57db6b(0x3f8)](_0x38792e=>{let _0x39cbce=Ge(_0x38792e);_0x48408e['next'](_0x39cbce);})),_0x58180c[_0x57db6b(0x3ea)]((0x0,t[_0x57db6b(0x34a)])(()=>_0x48408e[_0x57db6b(0x26e)]()));let _0x1d4b16,_0xfae256=()=>{const _0x2f3e59=_0x57db6b;_0x13d7bd['next'](new Event(_0x2f3e59(0x305))),_0xcadfac[_0x2f3e59(0x272)](new Event(_0x2f3e59(0x305))),_0x1d4b16['close']();};return _0x1d4b16={'memberID':'','close$':_0xcadfac[_0x57db6b(0x45a)](),'error$':_0x13d7bd[_0x57db6b(0x45a)](),'open$':_0x377320[_0x57db6b(0x363)],'message$':_0x48408e['asObservable'](),'send':_0x4541c2=>{const _0x598459=_0x57db6b;if(_0x4541c2[_0x598459(0x37f)]===a[_0x598459(0x3c0)][_0x598459(0x369)]){if(_0x4541c2['data'][_0x598459(0x25c)]===e[_0x598459(0x1f4)]['SUBMIT_CHANGESET']){this['_submitChangeset'](_0x1d4b16,_0x4541c2[_0x598459(0x223)])[_0x598459(0x4b1)](_0x2b47f5=>{const _0x1fe035=_0x598459;this[_0x1fe035(0x451)]['error'](_0x2b47f5),_0xfae256();});return;}if(_0x4541c2[_0x598459(0x223)][_0x598459(0x25c)]===e[_0x598459(0x1f4)][_0x598459(0x355)]){let _0x5d43b6=_0x4541c2[_0x598459(0x223)];this['_fetchMissChangesets'](_0x5d43b6)[_0x598459(0x216)](_0x21fb48=>{const _0x5aa896=_0x598459;_0x48408e['next']({'cmd':a['CombCmd']['RECV'],'code':a['CmdRspCode']['OK'],'routeKey':_0x5d43b6[_0x5aa896(0x223)][_0x5aa896(0x3b9)],'routeType':'','data':{'eventID':e['CollaborationEvent'][_0x5aa896(0x4a4)],'data':{'changesets':_0x21fb48}}});})[_0x598459(0x4b1)](_0x4f46f8=>{const _0x195a44=_0x598459;this[_0x195a44(0x451)][_0x195a44(0x1d8)](_0x4f46f8),_0xfae256();});return;}}_0x377320['send'](Ke(_0x4541c2));},'close':()=>{const _0x7297b7=_0x57db6b;_0x377320[_0x7297b7(0x41e)](),_0x58180c[_0x7297b7(0x22b)]();}},_0x1d4b16;}async[_0x16128c(0x48d)](_0x861762,_0x50d359){const _0x1e8cce=_0x16128c;let {unitType:_0x16195e,unitID:_0x5526f3,changeset:_0x91bd66}=_0x50d359['data'],_0x4cf81a={'unitID':_0x5526f3,'memberID':_0x861762[_0x1e8cce(0x2a6)],'type':_0x16195e,'changeset':(0x0,e[_0x1e8cce(0x1f9)])(_0x91bd66)},_0xd61e5=this[_0x1e8cce(0x20e)]['getConfig'](m),_0x37818f=Je((_0xd61e5==null?void 0x0:_0xd61e5[_0x1e8cce(0x4cf)])??_0x1e8cce(0x1ca),_0x16195e,_0x5526f3);try{await this[_0x1e8cce(0x3a4)][_0x1e8cce(0x20d)](_0x37818f,{'body':_0x4cf81a});}catch(_0xe16d9d){throw this[_0x1e8cce(0x451)][_0x1e8cce(0x1d8)]('[CollaborationSession]',_0x1e8cce(0x35e)),_0xe16d9d;}}async[_0x16128c(0x281)](_0x25d262){const _0x43c1c5=_0x16128c;let {unitID:_0x32496a,from:_0x1a7c60,to:_0xf5f7e6,unitType:_0x1ebc80}=_0x25d262['data'];return(await this[_0x43c1c5(0x24e)][_0x43c1c5(0x492)]({'metadata':void 0x0},{'unitID':_0x32496a,'type':_0x1ebc80,'from':_0x1a7c60,'to':_0xf5f7e6}))[_0x43c1c5(0x4d0)][_0x43c1c5(0x2b2)](_0x3dad0b=>((_0x3dad0b['mutations']===null||_0x3dad0b[_0x43c1c5(0x208)]===void 0x0)&&(_0x3dad0b['mutations']=[]),_0x3dad0b));}};Ye=y([v(0x0,(0x0,t['Inject'])(t[_0x16128c(0x33b)])),v(0x1,(0x0,t['Inject'])(l[_0x16128c(0x27f)])),v(0x2,t[_0x16128c(0x35d)]),v(0x3,t[_0x16128c(0x22c)]),v(0x4,e['ISnapshotServerService'])],Ye);const Xe=(0x0,t[_0x16128c(0x2e5)])('univer-pro.collaboration-client-adapter-service');function Ze(_0xa304d3={}){const _0x2b384c=_0x16128c;return _0xa304d3['resolveUnit']?{'resolveUnit':_0xa304d3[_0x2b384c(0x49e)]}:{'resolveUnit':_0x47dc29=>({'target':{'unitId':_0x47dc29[_0x2b384c(0x367)],'unitType':_0x47dc29[_0x2b384c(0x4e0)]}})};}function Qe(_0x97bd21,_0x12a1f7,_0x22d3a3){const _0x61f323=_0x16128c;let _0x25f76f=_0x22d3a3[_0x61f323(0x218)][_0x61f323(0x32f)];if(_0x25f76f!=null&&_0x25f76f[_0x61f323(0x309)]()==='')throw Error(_0x61f323(0x1cb));if(!_0x22d3a3[_0x61f323(0x218)][_0x61f323(0x367)])throw Error('COLLABORATION_SESSION_TARGET_UNIT_ID_REQUIRED');return{'localUnitId':_0x97bd21,'unitType':_0x12a1f7,'target':{'endpoint':_0x25f76f,'unitId':_0x22d3a3[_0x61f323(0x218)][_0x61f323(0x367)],'unitType':_0x22d3a3[_0x61f323(0x218)][_0x61f323(0x4e0)]??_0x12a1f7},'changeset':_0x22d3a3['changeset']};}let V=class extends t[_0x16128c(0x31f)]{constructor(_0x3a779e,_0x5719fb,_0x590c1e,_0x3b0da4,_0x21345a,_0x1cd179,_0xb196e5){const _0x4dabfd=_0x16128c;super(),this[_0x4dabfd(0x200)]=_0x3a779e,this['_logService']=_0x5719fb,this[_0x4dabfd(0x20e)]=_0x590c1e,this['_socketService']=_0x3b0da4,this[_0x4dabfd(0x3ce)]=_0x21345a,this['_adapter']=_0x1cd179,this['_networkConditionService']=_0xb196e5,g(this,'_sessions',new Map()),g(this,'_pendingSessions',new Map()),g(this,_0x4dabfd(0x25a),new Map()),g(this,_0x4dabfd(0x2b1),new Map()),g(this,_0x4dabfd(0x3e6),this[_0x4dabfd(0x207)](void 0x0)[_0x4dabfd(0x3e6)]['asObservable']()),g(this,_0x4dabfd(0x1fb),new i[(_0x4dabfd(0x204))](0x0)),g(this,_0x4dabfd(0x4f1),this[_0x4dabfd(0x1fb)][_0x4dabfd(0x45a)]()),this[_0x4dabfd(0x4a3)]();}[_0x16128c(0x4a3)](){const _0x504dab=_0x16128c;this[_0x504dab(0x2fc)]&&this['disposeWithMe'](this[_0x504dab(0x2fc)][_0x504dab(0x349)][_0x504dab(0x3f8)](_0x5d8492=>{const _0x25b7cc=_0x504dab;_0x5d8492&&this['reconnect'](),_0x5d8492||this[_0x25b7cc(0x2b1)][_0x25b7cc(0x43b)](_0x555ba7=>this[_0x25b7cc(0x4d5)](_0x555ba7));}));}[_0x16128c(0x22b)](){const _0x10c5b5=_0x16128c;super[_0x10c5b5(0x22b)](),this[_0x10c5b5(0x2b1)]['forEach'](_0x3d2035=>{const _0x394e84=_0x10c5b5;var _0x3e138a,_0x2bf62a;(_0x3e138a=_0x3d2035[_0x394e84(0x4e8)])==null||_0x3e138a['unsubscribe'](),_0x3d2035['socketMessageSubscription']=null,this[_0x394e84(0x3d2)](_0x3d2035),this[_0x394e84(0x315)](_0x3d2035),this[_0x394e84(0x352)](_0x3d2035),(_0x2bf62a=_0x3d2035[_0x394e84(0x3e6)]['getValue']())==null||_0x2bf62a['close'](),_0x3d2035['socket$'][_0x394e84(0x26e)]();}),this[_0x10c5b5(0x2b1)][_0x10c5b5(0x292)](),this[_0x10c5b5(0x3b1)][_0x10c5b5(0x43b)](_0x5a80b2=>_0x5a80b2[_0x10c5b5(0x22b)]()),this[_0x10c5b5(0x3b1)][_0x10c5b5(0x292)](),this[_0x10c5b5(0x25a)][_0x10c5b5(0x292)](),this[_0x10c5b5(0x1fb)]['complete']();}async['requireSession'](_0x1bcc35,_0x105cc1){const _0x3f8a3a=_0x16128c;if(this[_0x3f8a3a(0x3b1)][_0x3f8a3a(0x339)](_0x1bcc35))return this[_0x3f8a3a(0x3b1)][_0x3f8a3a(0x1f1)](_0x1bcc35);let _0xb07c59=this[_0x3f8a3a(0x209)][_0x3f8a3a(0x1f1)](_0x1bcc35);if(_0xb07c59)return _0xb07c59;let _0x4055de=this[_0x3f8a3a(0x3b3)](_0x1bcc35,_0x105cc1);this[_0x3f8a3a(0x209)][_0x3f8a3a(0x2b4)](_0x1bcc35,_0x4055de);try{return await _0x4055de;}finally{this[_0x3f8a3a(0x209)][_0x3f8a3a(0x328)](_0x1bcc35);}}async[_0x16128c(0x3b3)](_0x4851c8,_0x39608f){const _0x49c0fd=_0x16128c;let _0x1cddd7=await this[_0x49c0fd(0x40d)](_0x4851c8,_0x39608f),_0x1805ae=this['_getSocketChannel'](_0x1cddd7[_0x49c0fd(0x218)][_0x49c0fd(0x32f)]);this[_0x49c0fd(0x1ef)](_0x1805ae);let _0x4d5e51=this[_0x49c0fd(0x200)]['createInstance'](ve,_0x1cddd7,_0x1805ae[_0x49c0fd(0x3e6)]['asObservable']());return this['_sessions'][_0x49c0fd(0x2b4)](_0x4851c8,_0x4d5e51),this[_0x49c0fd(0x25a)][_0x49c0fd(0x2b4)](_0x4851c8,_0x1805ae[_0x49c0fd(0x26b)]),_0x4d5e51;}[_0x16128c(0x429)](_0x1b12ee){const _0x1f448f=_0x16128c;let _0xd40ba6=this[_0x1f448f(0x3b1)][_0x1f448f(0x1f1)](_0x1b12ee),_0x19b840=this['_sessionChannels']['get'](_0x1b12ee);if(_0xd40ba6&&(this[_0x1f448f(0x3b1)]['delete'](_0x1b12ee),this['_sessionChannels'][_0x1f448f(0x328)](_0x1b12ee),_0xd40ba6[_0x1f448f(0x41e)]()),_0x19b840&&!this[_0x1f448f(0x257)](_0x19b840)){var _0x4680a3;let _0x541de1=this[_0x1f448f(0x2b1)][_0x1f448f(0x1f1)](_0x19b840);_0x541de1==null||(_0x4680a3=_0x541de1[_0x1f448f(0x3e6)]['getValue']())==null||_0x4680a3[_0x1f448f(0x41e)]();}}['reconnect'](){const _0x5ee7dd=_0x16128c;(this['_socketChannels'][_0x5ee7dd(0x2cd)]?[...this[_0x5ee7dd(0x2b1)][_0x5ee7dd(0x3af)]()]:[this[_0x5ee7dd(0x207)](void 0x0)])[_0x5ee7dd(0x43b)](_0x53476c=>{const _0x2a45a0=_0x5ee7dd;_0x53476c[_0x2a45a0(0x41b)]=0x0,this['_clearRetryConnectingTimer'](_0x53476c),this[_0x2a45a0(0x2ce)](_0x53476c);});}['_clearRetryConnectingTimer'](_0x381312){const _0x5f10a2=_0x16128c;_0x381312['retryConnectingTimer']!=null&&(clearTimeout(_0x381312['retryConnectingTimer']),_0x381312[_0x5f10a2(0x301)]=null);}async[_0x16128c(0x4d7)](_0xebb751){const _0x418a12=_0x16128c;let _0x21bf2c=this[_0x418a12(0x20e)][_0x418a12(0x1dd)](m),_0x5ab8bc=_0xebb751['endpoint']??(_0x21bf2c==null?void 0x0:_0x21bf2c[_0x418a12(0x2d8)])??_0x418a12(0x31b),_0x5d65c6=await this[_0x418a12(0x217)][_0x418a12(0x32b)](_0x5ab8bc);return _0xebb751[_0x418a12(0x475)]=_0x5d65c6,_0x5d65c6;}async['_tryEnsureSocket'](_0x3394c2){const _0xafa401=_0x16128c;try{let _0x173a49=_0x3394c2['socket$'][_0xafa401(0x23a)]()??_0x3394c2[_0xafa401(0x475)]??await this['_createSocket'](_0x3394c2);if(_0x173a49){var _0x23c9da;let _0x5166db=_0x173a49[_0xafa401(0x389)];_0x173a49['send']=_0x4eea5b=>(_0x4eea5b[_0xafa401(0x37f)]!==a[_0xafa401(0x3c0)][_0xafa401(0x230)]&&this['_rescheduleHeartbeat'](_0x3394c2),_0x5166db[_0xafa401(0x3da)](_0x173a49,[_0x4eea5b])),(_0x23c9da=_0x3394c2[_0xafa401(0x4e8)])==null||_0x23c9da[_0xafa401(0x3e2)](),_0x3394c2[_0xafa401(0x4e8)]=null,_0x3394c2[_0xafa401(0x4e8)]=_0x173a49['message$'][_0xafa401(0x3f8)](_0x5d36da=>this[_0xafa401(0x2c5)](_0x3394c2,_0x173a49,_0x5d36da)),_0x173a49[_0xafa401(0x3f2)][_0xafa401(0x476)]((0x0,s['take'])(0x1))['subscribe'](_0x3bb7ec=>this['_logService'][_0xafa401(0x1d8)](_0xafa401(0x3c9),_0x3bb7ec)),_0x173a49[_0xafa401(0x363)][_0xafa401(0x476)]((0x0,s[_0xafa401(0x27e)])(0x1))[_0xafa401(0x3f8)](()=>{this['_onConnectionOpen'](_0x3394c2,_0x173a49);}),_0x173a49[_0xafa401(0x310)]['pipe']((0x0,s['take'])(0x1))[_0xafa401(0x3f8)](_0x211f41=>{const _0x315ab4=_0xafa401;this[_0x315ab4(0x451)][_0x315ab4(0x235)](_0x315ab4(0x44d),_0x315ab4(0x325),_0x211f41),this['_onConnectionFailed'](_0x3394c2);});}}catch(_0x4eb93d){this[_0xafa401(0x451)]['error'](_0x4eb93d),this[_0xafa401(0x270)](_0x3394c2);}}[_0x16128c(0x391)](_0x39278f,_0x2f0e8b){const _0x458938=_0x16128c;this[_0x458938(0x451)][_0x458938(0x235)](_0x458938(0x44d),_0x458938(0x2ad)),_0x2f0e8b[_0x458938(0x389)]({'cmd':a[_0x458938(0x3c0)]['HELLO']}),this[_0x458938(0x332)](_0x39278f);}[_0x16128c(0x4d5)](_0x142d2f){const _0x5a0231=_0x16128c;_0x142d2f['socketReady']=!0x1,_0x142d2f['candidateSocket']=null,this['_status$'][_0x5a0231(0x272)](0x2),_0x142d2f[_0x5a0231(0x3e6)][_0x5a0231(0x272)](null),this[_0x5a0231(0x315)](_0x142d2f),this[_0x5a0231(0x352)](_0x142d2f);}[_0x16128c(0x270)](_0x3023e8){const _0x55b0b6=_0x16128c;this[_0x55b0b6(0x4d5)](_0x3023e8),this[_0x55b0b6(0x257)](_0x3023e8[_0x55b0b6(0x26b)])&&(_0x3023e8[_0x55b0b6(0x41b)]<(this['_configService']['getConfig']('RETRY_CONNECTING_MAX_COUNT')??0x3)?(this[_0x55b0b6(0x3ce)][_0x55b0b6(0x4e7)]({'id':_0x55b0b6(0x28f)}),this[_0x55b0b6(0x2ce)](_0x3023e8)):this['_collaborationUIEventService'][_0x55b0b6(0x4e7)]({'id':'SOCKET_FAILED'}));}[_0x16128c(0x2ce)](_0x565d21){const _0x1eae31=_0x16128c;let _0x28f239=_0x565d21[_0x1eae31(0x41b)],_0x4ebb92=this[_0x1eae31(0x20e)][_0x1eae31(0x1dd)](m),_0x19a12c=_0x28f239===0x0?0x0:((_0x4ebb92==null?void 0x0:_0x4ebb92[_0x1eae31(0x430)])??0x4e20)*0x2**_0x28f239;_0x565d21[_0x1eae31(0x301)]=setTimeout(()=>{const _0x8cecef=_0x1eae31;clearTimeout(_0x565d21[_0x8cecef(0x301)]),_0x565d21[_0x8cecef(0x301)]=null,this[_0x8cecef(0x1ef)](_0x565d21);},_0x19a12c),_0x565d21[_0x1eae31(0x41b)]+=0x1;}async[_0x16128c(0x40d)](_0x470b84,_0x4a935a){const _0x44723f=_0x16128c;return Qe(_0x470b84,_0x4a935a,await this['_adapter'][_0x44723f(0x49e)]({'unitId':_0x470b84,'unitType':_0x4a935a}));}[_0x16128c(0x2c5)](_0x4e2855,_0x526347,_0x21fb83){const _0x122730=_0x16128c;let {cmd:_0x35b944}=_0x21fb83;_0x35b944===a[_0x122730(0x3c0)][_0x122730(0x2c1)]&&!_0x4e2855[_0x122730(0x2a1)]&&(_0x526347['memberID']=_0x21fb83[_0x122730(0x223)]['memberID'],_0x4e2855[_0x122730(0x41b)]=0x0,_0x4e2855[_0x122730(0x3e6)][_0x122730(0x272)](_0x526347),this[_0x122730(0x1fb)][_0x122730(0x272)](0x3),_0x4e2855['socketReady']=!0x0,_0x4e2855['candidateSocket']=null),_0x35b944===a[_0x122730(0x3c0)][_0x122730(0x4fc)]&&this[_0x122730(0x315)](_0x4e2855),this[_0x122730(0x332)](_0x4e2855);}[_0x16128c(0x257)](_0x3970b9){const _0x52bb58=_0x16128c;return[...this[_0x52bb58(0x25a)]['values']()][_0x52bb58(0x236)](_0x4c41e9=>_0x4c41e9===_0x3970b9);}[_0x16128c(0x207)](_0x161cb7){const _0xf77838=_0x16128c;let _0xebdd41=_0x161cb7??'',_0x1bbdbb=this['_socketChannels'][_0xf77838(0x1f1)](_0xebdd41);if(_0x1bbdbb)return _0x1bbdbb;let _0x556ce0={'endpointKey':_0xebdd41,'endpoint':_0x161cb7,'socket$':new i[(_0xf77838(0x204))](void 0x0),'candidateSocket':null,'socketReady':!0x1,'socketMessageSubscription':null,'retryConnectingTimer':null,'retryCount':0x0,'sendHeartbeatTimer':null,'timeoutTimer':null};return this[_0xf77838(0x2b1)]['set'](_0xebdd41,_0x556ce0),_0x556ce0;}[_0x16128c(0x332)](_0xd60370){const _0x23909b=_0x16128c;this[_0x23909b(0x352)](_0xd60370),_0xd60370[_0x23909b(0x504)]=setTimeout(()=>this[_0x23909b(0x3f7)](_0xd60370),this['_configService'][_0x23909b(0x1dd)](_0x23909b(0x477))??0x7530);}[_0x16128c(0x3f7)](_0x48698a){const _0x6cbd75=_0x16128c;_0x48698a['socket$'][_0x6cbd75(0x23a)]()['send']({'cmd':a[_0x6cbd75(0x3c0)][_0x6cbd75(0x4fc)]}),this[_0x6cbd75(0x25d)](_0x48698a);}[_0x16128c(0x25d)](_0x2e30bd){const _0x5cf331=_0x16128c;_0x2e30bd[_0x5cf331(0x3ef)]=setTimeout(()=>this[_0x5cf331(0x270)](_0x2e30bd),this[_0x5cf331(0x20e)]['getConfig'](_0x5cf331(0x263))??0x4e20);}[_0x16128c(0x352)](_0x34e2a0){const _0x58a36a=_0x16128c;_0x34e2a0['sendHeartbeatTimer']!=null&&(clearTimeout(_0x34e2a0[_0x58a36a(0x504)]),_0x34e2a0[_0x58a36a(0x504)]=null);}['_clearTimeoutTimer'](_0x5d3d65){const _0x345551=_0x16128c;_0x5d3d65[_0x345551(0x3ef)]!=null&&(clearTimeout(_0x5d3d65[_0x345551(0x3ef)]),_0x5d3d65[_0x345551(0x3ef)]=null);}};V=y([v(0x0,(0x0,t[_0x16128c(0x4c0)])(t[_0x16128c(0x33b)])),v(0x1,t[_0x16128c(0x22c)]),v(0x2,t[_0x16128c(0x35d)]),v(0x3,qe),v(0x4,(0x0,t[_0x16128c(0x4c0)])(_)),v(0x5,Xe),v(0x6,(0x0,t['Optional'])(We))],V);let H=class extends t[_0x16128c(0x313)]{constructor(_0x4f2112,_0x55c841,_0x43dabd,_0x189be4){const _0x3b8240=_0x16128c;var _0x162433;super(),this[_0x3b8240(0x200)]=_0x4f2112,this[_0x3b8240(0x500)]=_0x55c841,this[_0x3b8240(0x20e)]=_0x43dabd,this[_0x3b8240(0x32c)]=_0x189be4,g(this,_0x3b8240(0x282),new Map()),g(this,_0x3b8240(0x432),new i[(_0x3b8240(0x21b))]()),g(this,_0x3b8240(0x466),this['_entityInit$']['asObservable']()),((_0x162433=this[_0x3b8240(0x20e)][_0x3b8240(0x1dd)](_0x3b8240(0x290)))==null?void 0x0:_0x162433[_0x3b8240(0x28d)])!==!0x1&&this[_0x3b8240(0x2f6)]();}[_0x16128c(0x22b)](){const _0x1dc619=_0x16128c;super[_0x1dc619(0x22b)](),this[_0x1dc619(0x282)][_0x1dc619(0x43b)](_0x40c568=>_0x40c568[_0x1dc619(0x22b)]()),this['_entities'][_0x1dc619(0x292)]();}['getCollabEntity'](_0x432040){const _0xb2c3ad=_0x16128c;return this[_0xb2c3ad(0x282)][_0xb2c3ad(0x1f1)](_0x432040)??null;}['getCollabEntity$'](_0x21f7f6){const _0x55c9af=_0x16128c;let _0x3c713f=this[_0x55c9af(0x36e)](_0x21f7f6);return _0x3c713f?(0x0,i['of'])(_0x3c713f):this[_0x55c9af(0x432)][_0x55c9af(0x476)]((0x0,s[_0x55c9af(0x2df)])(_0xb10aa7=>_0xb10aa7[_0x55c9af(0x3b9)]===_0x21f7f6));}['readyForCollab'](_0x3f2317){const _0x330b62=_0x16128c;return(0x0,i[_0x330b62(0x345)])(this[_0x330b62(0x322)](_0x3f2317)[_0x330b62(0x476)]((0x0,s[_0x330b62(0x2b2)])(()=>void 0x0)));}[_0x16128c(0x2f6)](){const _0x558c27=_0x16128c;this['_univerInstanceService']['getTypeOfUnitAdded$'](t[_0x558c27(0x3c4)]['UNIVER_SHEET'])['pipe']((0x0,i['takeUntil'])(this[_0x558c27(0x343)]),(0x0,s[_0x558c27(0x4ae)])(0x10))[_0x558c27(0x3f8)](async _0x578337=>{const _0x3570ad=_0x558c27;let _0x25eb45=_0x578337[_0x3570ad(0x49b)][_0x3570ad(0x2f0)](),_0x21faf8=await this[_0x3570ad(0x4fa)](_0x25eb45,t[_0x3570ad(0x3c4)][_0x3570ad(0x4d8)]);this[_0x3570ad(0x282)]['set'](_0x25eb45,_0x21faf8);}),this[_0x558c27(0x32c)]['getTypeOfUnitAdded$'](t['UniverInstanceType']['UNIVER_DOC'])[_0x558c27(0x476)]((0x0,i['takeUntil'])(this[_0x558c27(0x343)]),(0x0,s[_0x558c27(0x4ae)])(0x10))['pipe']((0x0,s[_0x558c27(0x2df)])(_0x3bf5e7=>!_0x3bf5e7[_0x558c27(0x49b)][_0x558c27(0x2f0)]()[_0x558c27(0x3cd)]('__')))[_0x558c27(0x3f8)](async _0x2670b2=>{const _0x155c67=_0x558c27;let _0x40c27c=_0x2670b2[_0x155c67(0x49b)][_0x155c67(0x2f0)](),_0x423a84=await this['_startCollaboration'](_0x40c27c,t[_0x155c67(0x3c4)][_0x155c67(0x494)]);this['_entities'][_0x155c67(0x2b4)](_0x40c27c,_0x423a84);}),this[_0x558c27(0x32c)][_0x558c27(0x201)](t['UniverInstanceType'][_0x558c27(0x4fd)])[_0x558c27(0x476)]((0x0,i['takeUntil'])(this[_0x558c27(0x343)]),(0x0,s[_0x558c27(0x4ae)])(0x10))[_0x558c27(0x3f8)](async _0x585662=>{const _0x2ddb04=_0x558c27;let _0x48cd86=_0x585662[_0x2ddb04(0x49b)][_0x2ddb04(0x2f0)](),_0x5cdb0f=await this['_startCollaboration'](_0x48cd86,t[_0x2ddb04(0x3c4)][_0x2ddb04(0x4fd)]);this[_0x2ddb04(0x282)][_0x2ddb04(0x2b4)](_0x48cd86,_0x5cdb0f);}),this[_0x558c27(0x32c)][_0x558c27(0x201)](t[_0x558c27(0x3c4)]['UNIVER_BOARD'])[_0x558c27(0x476)]((0x0,i[_0x558c27(0x2ed)])(this[_0x558c27(0x343)]),(0x0,s['delay'])(0x10))[_0x558c27(0x3f8)](async _0x54183c=>{const _0x8f0b84=_0x558c27;let _0x1c0662=_0x54183c[_0x8f0b84(0x49b)][_0x8f0b84(0x2f0)](),_0x52f685=await this['_startCollaboration'](_0x1c0662,t[_0x8f0b84(0x3c4)]['UNIVER_BOARD']);this[_0x8f0b84(0x282)][_0x8f0b84(0x2b4)](_0x1c0662,_0x52f685);}),this[_0x558c27(0x32c)][_0x558c27(0x201)](t[_0x558c27(0x3c4)][_0x558c27(0x4f7)])['pipe']((0x0,i[_0x558c27(0x2ed)])(this[_0x558c27(0x343)]),(0x0,s[_0x558c27(0x4ae)])(0x10))[_0x558c27(0x3f8)](async _0x14b2ca=>{const _0x2b4a87=_0x558c27;let _0x2569df=_0x14b2ca[_0x2b4a87(0x49b)][_0x2b4a87(0x2f0)](),_0x84434f=await this[_0x2b4a87(0x4fa)](_0x2569df,t[_0x2b4a87(0x3c4)][_0x2b4a87(0x4f7)]);this[_0x2b4a87(0x282)][_0x2b4a87(0x2b4)](_0x2569df,_0x84434f);}),this['_univerInstanceService'][_0x558c27(0x201)](t[_0x558c27(0x3c4)][_0x558c27(0x2e1)])['pipe']((0x0,i[_0x558c27(0x2ed)])(this['dispose$']),(0x0,s[_0x558c27(0x4ae)])(0x10))[_0x558c27(0x3f8)](async _0x38e8f0=>{const _0x5ba89d=_0x558c27;let _0x50f079=_0x38e8f0[_0x5ba89d(0x49b)][_0x5ba89d(0x2f0)](),_0x2253cb=await this[_0x5ba89d(0x4fa)](_0x50f079,t[_0x5ba89d(0x3c4)][_0x5ba89d(0x2e1)]);this['_entities']['set'](_0x50f079,_0x2253cb);}),(0x0,i[_0x558c27(0x23f)])(this[_0x558c27(0x32c)][_0x558c27(0x439)](t[_0x558c27(0x3c4)][_0x558c27(0x4d8)]),this[_0x558c27(0x32c)][_0x558c27(0x439)](t[_0x558c27(0x3c4)][_0x558c27(0x494)]),this[_0x558c27(0x32c)][_0x558c27(0x439)](t['UniverInstanceType'][_0x558c27(0x4fd)]),this[_0x558c27(0x32c)][_0x558c27(0x439)](t[_0x558c27(0x3c4)]['UNIVER_BOARD']),this[_0x558c27(0x32c)][_0x558c27(0x439)](t[_0x558c27(0x3c4)][_0x558c27(0x4f7)]),this[_0x558c27(0x32c)][_0x558c27(0x439)](t[_0x558c27(0x3c4)][_0x558c27(0x2e1)]))[_0x558c27(0x476)]((0x0,i[_0x558c27(0x2ed)])(this['dispose$']))[_0x558c27(0x3f8)](_0x4e4911=>{const _0x9c4f3c=_0x558c27;let _0x52b4e0=_0x4e4911[_0x9c4f3c(0x2f0)](),_0x116cfc=this[_0x9c4f3c(0x282)][_0x9c4f3c(0x1f1)](_0x52b4e0);_0x116cfc&&(_0x116cfc[_0x9c4f3c(0x22b)](),this[_0x9c4f3c(0x282)][_0x9c4f3c(0x328)](_0x52b4e0));});}async[_0x16128c(0x4fa)](_0x1c254a,_0x1e72bc){const _0x386bba=_0x16128c;let _0x5770f1=await this[_0x386bba(0x500)][_0x386bba(0x39c)](_0x1c254a),_0x120fd3=this['_injector']['createInstance'](this[_0x386bba(0x3a1)](_0x1e72bc),_0x1c254a,_0x1e72bc,_0x5770f1);return await _0x120fd3['init'](),this['_entityInit$']['next'](_0x120fd3),_0x120fd3;}[_0x16128c(0x3a1)](_0x170809){const _0x5e649f=_0x16128c;switch(_0x170809){case t['UniverInstanceType'][_0x5e649f(0x494)]:return F;case t[_0x5e649f(0x3c4)]['UNIVER_SHEET']:return L;case t['UniverInstanceType']['UNIVER_SLIDE']:return R;case t[_0x5e649f(0x3c4)][_0x5e649f(0x441)]:return z;case t[_0x5e649f(0x3c4)][_0x5e649f(0x4f7)]:return I;case t[_0x5e649f(0x3c4)][_0x5e649f(0x2e1)]:return B;default:throw Error(_0x5e649f(0x4f2)+_0x170809);}}};H=y([v(0x0,(0x0,t[_0x16128c(0x4c0)])(t[_0x16128c(0x33b)])),v(0x1,(0x0,t[_0x16128c(0x4c0)])(V)),v(0x2,t[_0x16128c(0x35d)]),v(0x3,t[_0x16128c(0x399)])],H);var $e=_0x16128c(0x25b),et=_0x16128c(0x3ff);let tt=class extends t[_0x16128c(0x31f)]{constructor(_0x340100,_0x55c4ac){const _0x392081=_0x16128c;super(),this[_0x392081(0x32c)]=_0x340100,this[_0x392081(0x20e)]=_0x55c4ac,this[_0x392081(0x2f6)]();}[_0x16128c(0x2f6)](){const _0xd70a45=_0x16128c;this['disposeWithMe'](this[_0xd70a45(0x32c)][_0xd70a45(0x4c9)][_0xd70a45(0x3f8)](()=>{const _0x722788=_0xd70a45;let _0x25023e=this[_0x722788(0x32c)]['getFocusedUnit'](),_0x471dab=this[_0x722788(0x20e)][_0x722788(0x1dd)]('DEFAULT_FILE_NAME')??'Univer';_0x25023e instanceof t[_0x722788(0x36c)]&&(_0x471dab=_0x25023e[_0x722788(0x409)]),document['title']=_0x471dab;}));}};tt=y([v(0x0,t[_0x16128c(0x399)]),v(0x1,t['IConfigService'])],tt);const nt=(0x0,t[_0x16128c(0x2e5)])(_0x16128c(0x46d));let U=class{constructor(_0x889a69,_0x2cb5d4,_0x3e5eff){const _0x1205af=_0x16128c;this['_httpService']=_0x889a69,this[_0x1205af(0x20e)]=_0x2cb5d4,this[_0x1205af(0x32c)]=_0x3e5eff;}[_0x16128c(0x323)](){const _0x3176dc=_0x16128c;return this[_0x3176dc(0x457)]()[_0x3176dc(0x428)]??{};}async[_0x16128c(0x335)](_0x18c816){const _0x212eb1=_0x16128c;let _0x29ba84=this[_0x212eb1(0x323)]();if(rt(_0x18c816,_0x29ba84),_0x29ba84[_0x212eb1(0x407)])return _0x29ba84['upload'](_0x18c816);let _0x4a659f=await this[_0x212eb1(0x393)](_0x18c816);return{'id':_0x4a659f,'name':_0x18c816[_0x212eb1(0x409)],'mimeType':_0x18c816[_0x212eb1(0x3eb)],'size':_0x18c816[_0x212eb1(0x2cd)],'sourceType':t['ImageSourceType'][_0x212eb1(0x3c8)],'source':_0x4a659f};}async['getAttachmentUrl'](_0x27d1b0,_0x4f3a3a){const _0x1c2496=_0x16128c;if(_0x4f3a3a!==t['ImageSourceType'][_0x1c2496(0x3c8)])return _0x27d1b0;let _0x41a22d=(await this[_0x1c2496(0x3a4)]['get'](this[_0x1c2496(0x327)]()['replace'](_0x1c2496(0x4b4),_0x27d1b0)))['body'];if(_0x41a22d[_0x1c2496(0x1d8)]&&_0x41a22d[_0x1c2496(0x1d8)]['code']!==a[_0x1c2496(0x35b)]['OK'])throw _0x41a22d['error'];if(!_0x41a22d[_0x1c2496(0x302)])throw Error('[CollaborationAttachmentIoService]:\x20failed\x20to\x20resolve\x20attachment\x20URL.');return(0x0,t[_0x1c2496(0x452)])(_0x41a22d[_0x1c2496(0x302)],this['_getDownloadEndpointURL']());}async[_0x16128c(0x393)](_0x788c3){const _0x355d67=_0x16128c;let _0x56531a=this['_univerInstanceService'][_0x355d67(0x1fe)](),_0x41d817=_0x56531a==null?void 0x0:_0x56531a[_0x355d67(0x2f0)]();if(!_0x41d817)throw Error(_0x355d67(0x269));let _0x1b5ec8=new FormData();_0x1b5ec8['append'](_0x355d67(0x1fa),_0x788c3);let _0x10b5a8=this[_0x355d67(0x234)]()+'?size='+_0x788c3['size']['toString']()+_0x355d67(0x206)+a['FileSource'][_0x355d67(0x299)]+_0x355d67(0x212)+encodeURIComponent(_0x41d817),_0x3d7832=(await this['_httpService'][_0x355d67(0x20d)](_0x10b5a8,{'body':_0x1b5ec8}))[_0x355d67(0x20b)][_0x355d67(0x2ee)];if(typeof _0x3d7832!=_0x355d67(0x508)||!_0x3d7832)throw Error('[CollaborationAttachmentIoService]:\x20failed\x20to\x20upload\x20attachment.');return _0x3d7832;}[_0x16128c(0x234)](){const _0x21051e=_0x16128c;return this[_0x21051e(0x457)]()[_0x21051e(0x48e)]??_0x21051e(0x2b3);}[_0x16128c(0x327)](){const _0x3d4455=_0x16128c;return this['_getConfig']()[_0x3d4455(0x1e8)]??_0x3d4455(0x359);}[_0x16128c(0x3bf)](){const _0x223452=_0x16128c;let _0x3a2140=this['_getConfig']();return _0x3a2140[_0x223452(0x37e)]?_0x3a2140[_0x223452(0x37e)]:typeof location<'u'?location[_0x223452(0x1fd)]:_0x3a2140[_0x223452(0x48e)]??'';}[_0x16128c(0x457)](){const _0x4c8c47=_0x16128c;return this[_0x4c8c47(0x20e)][_0x4c8c47(0x1dd)](_0x4c8c47(0x290))??{};}};U=y([v(0x0,(0x0,t['Inject'])(l[_0x16128c(0x27f)])),v(0x1,(0x0,t[_0x16128c(0x4c0)])(t[_0x16128c(0x35d)])),v(0x2,(0x0,t['Inject'])(t['IUniverInstanceService']))],U);function rt(_0x50b6d4,_0x3b2644){const _0x3c65b4=_0x16128c;var _0x4610e4;if(_0x3b2644[_0x3c65b4(0x40f)]!=null&&_0x50b6d4[_0x3c65b4(0x2cd)]>_0x3b2644[_0x3c65b4(0x40f)])throw Error(_0x3c65b4(0x29e));if((_0x4610e4=_0x3b2644[_0x3c65b4(0x502)])!=null&&_0x4610e4['length']&&!_0x3b2644[_0x3c65b4(0x502)][_0x3c65b4(0x236)](_0x2308d0=>_0x50b6d4[_0x3c65b4(0x3eb)]===_0x2308d0||_0x50b6d4['name'][_0x3c65b4(0x265)](_0x2308d0)||_0x2308d0[_0x3c65b4(0x265)]('/*')&&_0x50b6d4[_0x3c65b4(0x3eb)][_0x3c65b4(0x3cd)](_0x2308d0[_0x3c65b4(0x307)](0x0,-0x1))))throw Error('[CollaborationAttachmentIoService]:\x20attachment\x20type\x20is\x20not\x20accepted.');}let W=class{constructor(_0x2ea063,_0x162216,_0x332bbc){const _0x563fa8=_0x16128c;this[_0x563fa8(0x20e)]=_0x2ea063,this['_httpService']=_0x162216,this[_0x563fa8(0x4ec)]=_0x332bbc,this['init']();}[_0x16128c(0x49a)](){const _0x42b1d1=_0x16128c;this['_httpService']['registerHTTPInterceptor']({'priority':0x1,'interceptor':(_0xaf6847,_0x2dbe9f)=>_0x2dbe9f(_0xaf6847)[_0x42b1d1(0x476)]((0x0,i[_0x42b1d1(0x1dc)])(async _0x3bd3e4=>{const _0xabf1f6=_0x42b1d1;let _0x5ce3dc=_0x3bd3e4;if(_0x5ce3dc[_0xabf1f6(0x3fb)]===0x191){if(typeof window>'u')throw Error('[AuthServerService]:\x20you\x20should\x20provide\x20authentication\x20info\x20on\x20Node.js.');if(window[_0xabf1f6(0x4bf)](this['localeService']['t'](_0xabf1f6(0x1e4)))){let _0x2e4c91=window['encodeURIComponent'](window['location']['href']);window[_0xabf1f6(0x3a0)][_0xabf1f6(0x271)]=this[_0xabf1f6(0x300)]()+_0xabf1f6(0x249)+_0x2e4c91;}}return _0x5ce3dc;}))});}['_getLoginPath'](){const _0x2b36c0=_0x16128c;let _0x51a370=this[_0x2b36c0(0x20e)][_0x2b36c0(0x1dd)](m);return(_0x51a370==null?void 0x0:_0x51a370['loginUrlKey'])??_0x2b36c0(0x4c1);}};W=y([v(0x0,t[_0x16128c(0x35d)]),v(0x1,(0x0,t[_0x16128c(0x4c0)])(l[_0x16128c(0x27f)])),v(0x2,(0x0,t['Inject'])(t[_0x16128c(0x48a)]))],W);let G=class extends t[_0x16128c(0x31f)]{constructor(_0x26e932,_0x18e479){const _0x1149bf=_0x16128c;super(),this[_0x1149bf(0x336)]=_0x26e932,this['_configService']=_0x18e479,g(this,_0x1149bf(0x490),!0x1),this[_0x1149bf(0x1d0)]();}['_initMergeInterceptor'](){const _0x371e5e=_0x16128c;let _0x52a4d3=this;this[_0x371e5e(0x31d)](this['_HTTPService'][_0x371e5e(0x31a)]({'priority':0x3e7,'interceptor':(0x0,l['MergeInterceptorFactory'])({'isMatch'(_0x171c3d){const _0x2895e8=_0x371e5e;var _0x178960;if(_0x171c3d[_0x2895e8(0x348)]==='POST'&&(_0x178960=_0x171c3d[_0x2895e8(0x23b)])!=null&&_0x178960['body']){let {objectID:_0x55716a,objectType:_0x3897a6}=_0x171c3d[_0x2895e8(0x23b)]['body']||{};if(!_0x55716a||_0x3897a6===void 0x0)return!0x1;let _0x318464=_0x52a4d3[_0x2895e8(0x406)]()+'/'+_0x3897a6+_0x2895e8(0x42b)+encodeURIComponent(_0x55716a)+_0x2895e8(0x4b3);if(_0x171c3d[_0x2895e8(0x302)]===_0x318464)return!0x0;}return!0x1;},'getParamsFromRequest'(_0x196f61){const _0x4daf52=_0x371e5e;var _0x50fad5;return(_0x50fad5=_0x196f61[_0x4daf52(0x23b)])==null?void 0x0:_0x50fad5['body'];},'mergeParamsToRequest'(_0x24671e,_0x5e963a){const _0x447b5b=_0x371e5e;let _0x43a617=_0x52a4d3[_0x447b5b(0x406)]()+'/-/object/-/batch_allowed',_0x42caf0=_0x24671e['reduce']((_0x3b153c,_0x3d51f5)=>{const _0x3fb797=_0x447b5b;let {unitID:_0x6fecc4,objectID:_0x48e8fe,objectType:_0x5e7598,actions:_0x57642a}=_0x3d51f5;return _0x3b153c[_0x6fecc4]||(_0x3b153c[_0x6fecc4]=Object[_0x3fb797(0x411)](null)),_0x3b153c[_0x6fecc4][_0x48e8fe]||(_0x3b153c[_0x6fecc4][_0x48e8fe]={'objectID':_0x48e8fe,'objectType':_0x5e7598,'actions':[]}),_0x3b153c[_0x6fecc4][_0x48e8fe][_0x3fb797(0x226)][_0x3fb797(0x4da)](..._0x57642a),_0x3b153c;},Object[_0x447b5b(0x411)](null)),_0x4d9545=[];for(let _0x17c639 in _0x42caf0)for(let _0x22aedb in _0x42caf0[_0x17c639]){let {actions:_0x1a0856,objectType:_0x5ae25b}=_0x42caf0[_0x17c639][_0x22aedb],_0x145105=[...new Set(_0x1a0856)];_0x4d9545[_0x447b5b(0x4da)]({'unitID':_0x17c639,'objectID':_0x22aedb,'objectType':_0x5ae25b,'actions':_0x145105});}return new l[(_0x447b5b(0x2c4))](_0x447b5b(0x29b),_0x43a617,{'headers':_0x5e963a[_0x447b5b(0x1f6)],'withCredentials':_0x5e963a[_0x447b5b(0x3cf)],'responseType':_0x5e963a['responseType'],'body':{'requests':_0x4d9545}});}},{'distributeResult'(_0x960fa3,_0x51d375){const _0x230fa5=_0x371e5e;let {objectActions:_0x3c288}=_0x960fa3;return _0x51d375[_0x230fa5(0x2b2)](_0x215493=>{const _0x4023b6=_0x230fa5;let {unitID:_0x1fc209,objectID:_0x4a5698,actions:_0x2b759b}=_0x215493,_0x46e829=_0x3c288[_0x4023b6(0x4ee)](_0x5b0a56=>_0x5b0a56[_0x4023b6(0x3b9)]===_0x1fc209&&_0x5b0a56['objectID']===_0x4a5698);return{'config':_0x215493,'result':{'actions':_0x2b759b[_0x4023b6(0x2b2)](_0x5cb989=>_0x46e829==null?void 0x0:_0x46e829[_0x4023b6(0x226)][_0x4023b6(0x4ee)](_0x285e24=>_0x285e24[_0x4023b6(0x47a)]===_0x5cb989))['filter'](_0x29b0c1=>!!_0x29b0c1),'error':_0x960fa3[_0x4023b6(0x1d8)]}};});}})}));}['_getAPIPrefixPath'](){const _0x17747f=_0x16128c;let _0x4847d4=this[_0x17747f(0x20e)][_0x17747f(0x1dd)](m);return(_0x4847d4==null?void 0x0:_0x4847d4[_0x17747f(0x26a)])??'/universer-api/authz';}async['create'](_0x3a3773){const _0x34c3e4=_0x16128c;let _0x4d6221=this[_0x34c3e4(0x406)]()+'/'+_0x3a3773[_0x34c3e4(0x342)]+_0x34c3e4(0x4ad);return(await this[_0x34c3e4(0x336)][_0x34c3e4(0x20d)](_0x4d6221,{'body':_0x3a3773}))[_0x34c3e4(0x20b)][_0x34c3e4(0x231)]||'';}async[_0x16128c(0x3cb)](_0x1ff775){const _0x271bc3=_0x16128c;let _0x57ea47=this[_0x271bc3(0x406)]()+_0x271bc3(0x2e2);return(await this[_0x271bc3(0x336)][_0x271bc3(0x20d)](_0x57ea47,{'body':_0x1ff775}))['body']['objects'];}async[_0x16128c(0x340)](_0x31f353){const _0x5629cd=_0x16128c;var _0x3f23fd;let _0x242efd=this[_0x5629cd(0x406)]()+'/'+_0x31f353[_0x5629cd(0x342)]+_0x5629cd(0x42b)+encodeURIComponent(_0x31f353[_0x5629cd(0x231)]),_0x5e9395=await this[_0x5629cd(0x336)][_0x5629cd(0x1d9)](_0x242efd,{'body':_0x31f353});if((_0x5e9395==null||(_0x3f23fd=_0x5e9395['body'])==null||(_0x3f23fd=_0x3f23fd['error'])==null?void 0x0:_0x3f23fd['code'])!==0x1)throw Error(_0x5629cd(0x1de));}async['allowed'](_0xb28a54){const _0x3187ce=_0x16128c;let _0x5636cb=this[_0x3187ce(0x406)]()+'/'+_0xb28a54[_0x3187ce(0x342)]+_0x3187ce(0x42b)+encodeURIComponent(_0xb28a54[_0x3187ce(0x231)])+_0x3187ce(0x4b3);return(await this[_0x3187ce(0x336)][_0x3187ce(0x20d)](_0x5636cb,{'body':_0xb28a54}))[_0x3187ce(0x20b)][_0x3187ce(0x226)];}async[_0x16128c(0x23d)](_0x4d8228){const _0x4dffa6=_0x16128c;let _0x1c8a0d=this[_0x4dffa6(0x406)]()+_0x4dffa6(0x3ed);return(await this[_0x4dffa6(0x336)][_0x4dffa6(0x20d)](_0x1c8a0d,{'body':{'requests':_0x4d8228}}))[_0x4dffa6(0x20b)][_0x4dffa6(0x463)];}async[_0x16128c(0x32e)](_0x5a7d16){const _0x265fa4=_0x16128c;let _0x27d02a=this[_0x265fa4(0x406)]()+'/'+_0x5a7d16[_0x265fa4(0x342)]+_0x265fa4(0x1cc),_0x31d35d=await this[_0x265fa4(0x336)][_0x265fa4(0x20d)](_0x27d02a,{'body':_0x5a7d16});return{'roles':_0x31d35d[_0x265fa4(0x20b)][_0x265fa4(0x364)],'actions':_0x31d35d[_0x265fa4(0x20b)][_0x265fa4(0x226)]};}async['deleteCollaborator'](_0x5c442f){const _0x44d508=_0x16128c;let _0x25ac1d=this[_0x44d508(0x406)]()+_0x44d508(0x4a0);await this['_HTTPService'][_0x44d508(0x328)](_0x25ac1d,{'params':{'collaboratorID':_0x5c442f[_0x44d508(0x276)],'objectID':_0x5c442f[_0x44d508(0x231)],'unitID':_0x5c442f['unitID']}});}async['updateCollaborator'](_0x58201e){const _0x574a6f=_0x16128c;let _0x5d98c6=this[_0x574a6f(0x406)]()+_0x574a6f(0x4a0);await this[_0x574a6f(0x336)][_0x574a6f(0x20a)](_0x5d98c6,{'body':_0x58201e});}async[_0x16128c(0x46b)](_0x13d36c){const _0x46d164=_0x16128c;let _0x3b2d04=this[_0x46d164(0x406)]()+_0x46d164(0x4a0);await this[_0x46d164(0x336)][_0x46d164(0x20d)](_0x3b2d04,{'body':_0x13d36c});}async[_0x16128c(0x353)](_0x34340f){const _0x31623f=_0x16128c;let _0x23371e=this[_0x31623f(0x406)]()+'/collaborator',_0xe0e585=await this[_0x31623f(0x336)]['get'](_0x23371e,{'params':{'objectID':_0x34340f[_0x31623f(0x231)],'unitID':_0x34340f[_0x31623f(0x3b9)]}});return this['setCfgEnableObjInherit'](_0xe0e585[_0x31623f(0x20b)]['cfgEnableObjInherit']??!0x1),_0xe0e585[_0x31623f(0x20b)][_0x31623f(0x2f5)];}async['putCollaborators'](_0x30c91e){const _0x392c94=_0x16128c;let _0x344e39=this[_0x392c94(0x406)]()+'/collaborator';await this[_0x392c94(0x336)][_0x392c94(0x1d9)](_0x344e39,{'body':_0x30c91e});}['setCfgEnableObjInherit'](_0x5781ba){const _0x320204=_0x16128c;this[_0x320204(0x490)]=_0x5781ba;}[_0x16128c(0x39b)](){return this['_cfgEnableObjInherit'];}};G=y([v(0x0,(0x0,t['Inject'])(l[_0x16128c(0x27f)])),v(0x1,(0x0,t[_0x16128c(0x4c0)])(t[_0x16128c(0x35d)]))],G);function it(_0x4de50f){const _0x2a586f=_0x16128c;let _0x3bc88f=atob(_0x4de50f),_0xe188bf=new Uint8Array(_0x3bc88f[_0x2a586f(0x471)]);for(let _0x5f1149=0x0;_0x5f1149<_0x3bc88f[_0x2a586f(0x471)];_0x5f1149++)_0xe188bf[_0x5f1149]=_0x3bc88f[_0x2a586f(0x1cd)](_0x5f1149);return _0xe188bf;}function at(_0x412bea){const _0x1c91c7=_0x16128c;let _0x13c773='';for(let _0x361d7f=0x0;_0x361d7f<_0x412bea['length'];_0x361d7f++)_0x13c773+=String[_0x1c91c7(0x410)](_0x412bea[_0x361d7f]);return btoa(_0x13c773);}function ot(_0x56a088,_0x3b8f99){const _0x2ce171=_0x16128c;let _0x2f2101=it(_0x3b8f99),_0x4c2662=(0x0,f[_0x2ce171(0x2d0)])(0x10),_0x2afded=(0x0,d[_0x2ce171(0x48b)])(_0x2f2101,_0x4c2662)[_0x2ce171(0x30b)]((0x0,f[_0x2ce171(0x255)])(_0x56a088));return at((0x0,f[_0x2ce171(0x2f1)])(_0x4c2662,_0x2afded));}function st(){const _0x4183dd=_0x16128c;let _0xfffa04=(0x0,u['getGlobalObject'])()[_0x4183dd(0x49c)];if(typeof window<'u'&&window[_0x4183dd(0x3a0)]!==void 0x0&&_0xfffa04){let _0x1255ca={'time':Math[_0x4183dd(0x378)](Date['now']()/0x3e8),'domain':location[_0x4183dd(0x1d3)]};return ot(JSON[_0x4183dd(0x24f)](_0x1255ca),_0xfffa04);}}let K=class{constructor(_0x342a20){const _0x5adbab=_0x16128c;this[_0x5adbab(0x3a4)]=_0x342a20,this[_0x5adbab(0x454)]();}[_0x16128c(0x454)](){const _0x5ba862=_0x16128c;this[_0x5ba862(0x3a4)][_0x5ba862(0x31a)]({'interceptor':(_0x17b111,_0x2af35d)=>{const _0x503b73=_0x5ba862;let _0x5163cb=st();return _0x5163cb&&_0x17b111['headers'][_0x503b73(0x2b4)](_0x503b73(0x277),_0x5163cb),_0x2af35d(_0x17b111);}});}};K=y([v(0x0,(0x0,t['Inject'])(l[_0x16128c(0x27f)]))],K);let q=class extends t[_0x16128c(0x313)]{constructor(_0x369dbf,_0x1e8ec9,_0x2d1250){const _0x171d33=_0x16128c;super(),this[_0x171d33(0x451)]=_0x369dbf,this[_0x171d33(0x274)]=_0x1e8ec9,this[_0x171d33(0x46e)]=_0x2d1250,g(this,_0x171d33(0x3b2),new i['BehaviorSubject'](null)),g(this,_0x171d33(0x344),new i[(_0x171d33(0x21b))]()),g(this,_0x171d33(0x35c),this['_unitInfo$'][_0x171d33(0x45a)]()),g(this,_0x171d33(0x442),this['_unitLoaded$']['asObservable']());}[_0x16128c(0x22b)](){const _0x321b15=_0x16128c;super['dispose'](),this[_0x321b15(0x344)][_0x321b15(0x26e)](),this[_0x321b15(0x3b2)]['complete']();}async[_0x16128c(0x3fc)](_0x224963,_0x58b182,_0x19c424,_0x385084){const _0x289dbb=_0x16128c;this[_0x289dbb(0x3b2)]['next']({'unitId':_0x224963,'type':_0x58b182,'subUnitId':_0x385084});let _0x57b466=null;switch(_0x58b182){case t[_0x289dbb(0x3c4)][_0x289dbb(0x4d8)]:_0x57b466=await this[_0x289dbb(0x274)][_0x289dbb(0x2dc)](_0x224963,_0x19c424,void 0x0,{'initialSubUnitId':_0x385084});break;case t[_0x289dbb(0x3c4)]['UNIVER_DOC']:_0x57b466=await this[_0x289dbb(0x274)][_0x289dbb(0x279)](_0x224963,_0x19c424);break;case t[_0x289dbb(0x3c4)][_0x289dbb(0x4fd)]:_0x57b466=await this[_0x289dbb(0x274)][_0x289dbb(0x467)](_0x224963,_0x19c424);break;case t[_0x289dbb(0x3c4)][_0x289dbb(0x441)]:_0x57b466=await this[_0x289dbb(0x274)][_0x289dbb(0x449)](_0x224963,_0x19c424);break;case t['UniverInstanceType'][_0x289dbb(0x4f7)]:_0x57b466=await this[_0x289dbb(0x274)][_0x289dbb(0x40a)](_0x224963,_0x19c424);break;case t[_0x289dbb(0x3c4)][_0x289dbb(0x2e1)]:_0x57b466=await this[_0x289dbb(0x274)][_0x289dbb(0x387)](_0x224963,_0x19c424);break;default:this[_0x289dbb(0x451)]['error'](_0x289dbb(0x456),_0x289dbb(0x4a1));}return _0x57b466&&this[_0x289dbb(0x344)][_0x289dbb(0x272)](_0x57b466),_0x57b466;}async[_0x16128c(0x487)](_0x3d17fc,_0x3e26e2,_0x618a87){const _0x83fdcc=_0x16128c;var _0x5c326c;this[_0x83fdcc(0x3b2)][_0x83fdcc(0x272)]({'unitId':_0x3d17fc,'type':_0x3e26e2,'subUnitId':_0x618a87});let _0x3826f7=0x0,_0x1a38fe=await((_0x5c326c=this[_0x83fdcc(0x46e)])==null?void 0x0:_0x5c326c[_0x83fdcc(0x29a)](_0x3d17fc));return _0x1a38fe&&(_0x1a38fe[_0x83fdcc(0x1d7)]||_0x1a38fe[_0x83fdcc(0x208)]['length']!==0x0)&&(_0x3826f7=_0x1a38fe[_0x83fdcc(0x4c8)]),_0x3826f7===0x0&&this[_0x83fdcc(0x451)][_0x83fdcc(0x235)](_0x83fdcc(0x456),_0x83fdcc(0x390)),this['loadUnitOfRevision'](_0x3d17fc,_0x3e26e2,_0x3826f7,_0x618a87);}};q=y([v(0x0,t[_0x16128c(0x22c)]),v(0x1,(0x0,t['Inject'])(e[_0x16128c(0x4d4)])),v(0x2,(0x0,t[_0x16128c(0x2e7)])(x))],q);let J=class{constructor(_0x1fada1,_0x98a4fc,_0x482077){const _0x100ff3=_0x16128c;this[_0x100ff3(0x3a4)]=_0x1fada1,this[_0x100ff3(0x20e)]=_0x98a4fc,this['_univerInstanceService']=_0x482077,g(this,'_waitCount',0x0),g(this,'_change$',new i[(_0x100ff3(0x21b))]()),g(this,_0x100ff3(0x496),this[_0x100ff3(0x237)]),g(this,_0x100ff3(0x3e8),new Map());}[_0x16128c(0x4d3)](_0x2a2f45){const _0x49f826=_0x16128c;this[_0x49f826(0x273)]=_0x2a2f45,this[_0x49f826(0x237)][_0x49f826(0x272)](_0x2a2f45);}[_0x16128c(0x4f3)](_0x58b6cd,_0x5b1ea1){const _0x350a6a=_0x16128c;if(_0x5b1ea1===t[_0x350a6a(0x224)]['BASE64']){let _0x3205f5=new Image();return _0x3205f5[_0x350a6a(0x47d)]=_0x58b6cd,_0x3205f5;}return this[_0x350a6a(0x3e8)][_0x350a6a(0x1f1)](_0x58b6cd);}[_0x16128c(0x36a)](_0x4dd905,_0x36d972,_0x4d3aee){const _0x3a0a9e=_0x16128c;_0x36d972!==t[_0x3a0a9e(0x224)][_0x3a0a9e(0x480)]&&_0x4d3aee!=null&&this[_0x3a0a9e(0x3e8)][_0x3a0a9e(0x2b4)](_0x4dd905,_0x4d3aee);}async[_0x16128c(0x2ab)](_0x522d91){const _0x5716a5=_0x16128c;try{let _0x14e6b5=this[_0x5716a5(0x38e)](this[_0x5716a5(0x327)](),''+_0x522d91),_0x47540f=(await this[_0x5716a5(0x3a4)][_0x5716a5(0x1f1)](_0x14e6b5))[_0x5716a5(0x20b)];if(_0x47540f['error']&&_0x47540f[_0x5716a5(0x1d8)][_0x5716a5(0x2e0)]===a[_0x5716a5(0x35b)]['OK']){let _0x1b30d2=(0x0,t['resolveWithBasePath'])(_0x47540f[_0x5716a5(0x302)],this[_0x5716a5(0x3bf)]());return Promise[_0x5716a5(0x4df)](_0x1b30d2);}return Promise[_0x5716a5(0x2cb)](_0x47540f[_0x5716a5(0x1d8)]);}catch(_0x4cd56a){return Promise[_0x5716a5(0x2cb)](_0x4cd56a);}}async[_0x16128c(0x303)](_0x285c7b){const _0x1843ba=_0x16128c;let _0x23a3ed='';if(!p[_0x1843ba(0x242)][_0x1843ba(0x4af)](_0x285c7b[_0x1843ba(0x3eb)]))return this[_0x1843ba(0x3e9)](),Promise[_0x1843ba(0x2cb)](Error(t[_0x1843ba(0x2c7)]['ERROR_IMAGE_TYPE']));if(_0x285c7b[_0x1843ba(0x2cd)]>(0x0,p[_0x1843ba(0x42d)])())return this[_0x1843ba(0x3e9)](),Promise[_0x1843ba(0x2cb)](Error(t['ImageUploadStatusType'][_0x1843ba(0x26f)]));try{let _0x5eb3a3=new FormData();_0x5eb3a3[_0x1843ba(0x44a)]('file',_0x285c7b);let _0x415676=this[_0x1843ba(0x32c)]['getFocusedUnit'](),_0x52bb25=_0x415676==null?void 0x0:_0x415676['getUnitId']();if(!_0x52bb25)throw Error('unitId\x20is\x20not\x20found');let _0x3d8479=this['_getUploadFileURL']()+_0x1843ba(0x444)+_0x285c7b[_0x1843ba(0x2cd)][_0x1843ba(0x4e9)]()+'&source='+a[_0x1843ba(0x44c)][_0x1843ba(0x299)]+'&assign='+encodeURIComponent(_0x52bb25),_0x445110={'body':_0x5eb3a3},_0x4fcffd=(await this[_0x1843ba(0x3a4)]['post'](_0x3d8479,_0x445110))[_0x1843ba(0x20b)];if(typeof _0x4fcffd['FileId']!='string')return this[_0x1843ba(0x3e9)](),Promise[_0x1843ba(0x2cb)](Error(t['ImageUploadStatusType'][_0x1843ba(0x433)]));_0x23a3ed=_0x4fcffd[_0x1843ba(0x2ee)];}catch{return this[_0x1843ba(0x3e9)](),Promise[_0x1843ba(0x2cb)](Error(t[_0x1843ba(0x2c7)][_0x1843ba(0x433)]));}return new Promise((_0x5b8a5c,_0xf3b46d)=>{const _0x44cb92=_0x1843ba;let _0x12a145=new FileReader();_0x12a145[_0x44cb92(0x415)](_0x285c7b),_0x12a145[_0x44cb92(0x286)]=_0x945a47=>{const _0x296925=_0x44cb92;var _0x163343;let _0x5a14ac=(_0x163343=_0x945a47[_0x296925(0x218)])==null?void 0x0:_0x163343[_0x296925(0x2f4)];if(_0x5a14ac==null){this[_0x296925(0x3e9)](),_0xf3b46d(Error(t[_0x296925(0x2c7)]['ERROR_IMAGE']));return;}_0x5b8a5c({'imageId':(0x0,t[_0x296925(0x2e6)])(0x6),'imageSourceType':t[_0x296925(0x224)][_0x296925(0x3c8)],'source':_0x23a3ed,'base64Cache':_0x5a14ac,'status':t[_0x296925(0x2c7)][_0x296925(0x4b7)]}),this['_decreaseWaiting']();};});}[_0x16128c(0x234)](){const _0x453ea0=_0x16128c;let _0x51a56e=this['_configService']['getConfig'](m);return(_0x51a56e==null?void 0x0:_0x51a56e[_0x453ea0(0x48e)])??_0x453ea0(0x2b3);}[_0x16128c(0x327)](){const _0x516bd0=_0x16128c;let _0x4a3baa=this[_0x516bd0(0x20e)][_0x516bd0(0x1dd)](m);return(_0x4a3baa==null?void 0x0:_0x4a3baa[_0x516bd0(0x1e8)])??'/universer-api/file/{fileID}/sign-url';}[_0x16128c(0x3bf)](){const _0x367cec=_0x16128c;let _0x669563=this[_0x367cec(0x20e)][_0x367cec(0x1dd)](m);return(_0x669563==null?void 0x0:_0x669563[_0x367cec(0x37e)])??location[_0x367cec(0x1fd)];}[_0x16128c(0x38e)](_0x466358,_0x28b979){const _0x650ab7=_0x16128c;return _0x466358[_0x650ab7(0x37a)](_0x650ab7(0x4b4),_0x28b979);}['_decreaseWaiting'](){const _0x1d9a4c=_0x16128c;--this['_waitCount'],this[_0x1d9a4c(0x237)]['next'](this['_waitCount']);}};J=y([v(0x0,(0x0,t[_0x16128c(0x4c0)])(l[_0x16128c(0x27f)])),v(0x1,t[_0x16128c(0x35d)]),v(0x2,(0x0,t['Inject'])(t[_0x16128c(0x399)]))],J);let Y=class{constructor(_0x4261cd,_0x263752){const _0x36b126=_0x16128c;this[_0x36b126(0x20e)]=_0x4261cd,this[_0x36b126(0x336)]=_0x263752;}[_0x16128c(0x406)](){const _0x541a12=_0x16128c;let _0x3f0f9b=this[_0x541a12(0x20e)]['getConfig'](m);return(_0x3f0f9b==null?void 0x0:_0x3f0f9b[_0x541a12(0x26a)])??_0x541a12(0x4f5);}async['list'](_0x41fc7d){const _0x45b2be=_0x16128c;let _0xbdcd40=this[_0x45b2be(0x406)]()+_0x45b2be(0x4a0);return{'list':[{'title':'People','mentions':(await this['_HTTPService']['get'](_0xbdcd40,{'params':{'objectID':_0x41fc7d['unitId'],'unitID':_0x41fc7d[_0x45b2be(0x367)]}}))[_0x45b2be(0x20b)][_0x45b2be(0x2f5)][_0x45b2be(0x2b2)](_0x298cc2=>({'objectId':_0x298cc2['id'],'name':_0x298cc2[_0x45b2be(0x4b0)][_0x45b2be(0x409)],'metadata':{'icon':_0x298cc2[_0x45b2be(0x4b0)][_0x45b2be(0x499)]},'label':_0x298cc2[_0x45b2be(0x4b0)]['name'],'objectType':t[_0x45b2be(0x254)][_0x45b2be(0x2ff)]})),'metadata':{},'type':t[_0x45b2be(0x254)][_0x45b2be(0x2ff)]}]};}};Y=y([v(0x0,(0x0,t[_0x16128c(0x4c0)])(t[_0x16128c(0x35d)])),v(0x1,(0x0,t[_0x16128c(0x4c0)])(l['HTTPService']))],Y);let X=class extends t[_0x16128c(0x313)]{constructor(_0x450a10,_0x39230a,_0x599ad3,_0xb927cb,_0x40ab19,_0x2557ab){const _0x66772d=_0x16128c;super(),this[_0x66772d(0x200)]=_0x450a10,this['_univerInstanceService']=_0x39230a,this['_permissionService']=_0x599ad3,this[_0x66772d(0x304)]=_0xb927cb,this[_0x66772d(0x4c3)]=_0x40ab19,this[_0x66772d(0x3ce)]=_0x2557ab,g(this,_0x66772d(0x285),new Set()),this[_0x66772d(0x31d)](()=>this[_0x66772d(0x285)]['clear']()),this[_0x66772d(0x31d)](ct(this[_0x66772d(0x32c)])[_0x66772d(0x3f8)](({unitId:_0x23983e})=>this['_closedUnits']['delete'](_0x23983e))),this[_0x66772d(0x3a2)](),this[_0x66772d(0x47c)](),[t[_0x66772d(0x3c4)][_0x66772d(0x494)],t[_0x66772d(0x3c4)][_0x66772d(0x4fd)],t[_0x66772d(0x3c4)][_0x66772d(0x4f7)],t[_0x66772d(0x3c4)]['UNIVER_BOARD']]['forEach'](_0x2f4465=>{const _0x57f1e7=_0x66772d;this[_0x57f1e7(0x31d)](this[_0x57f1e7(0x32c)][_0x57f1e7(0x439)](_0x2f4465)[_0x57f1e7(0x3f8)](_0x5e21e6=>{const _0x537cd4=_0x57f1e7;this[_0x537cd4(0x285)]['add'](_0x5e21e6[_0x537cd4(0x2f0)]()),this[_0x537cd4(0x200)]['get'](t[_0x537cd4(0x1f7)])[_0x537cd4(0x368)](_0x5e21e6[_0x537cd4(0x2f0)]());}));});}[_0x16128c(0x47c)](){const _0x3d04e1=_0x16128c;let _0x39d3cb=async(_0x2ed833,_0x237844)=>{const _0x43285f=_0x4c27;let _0x28804a=await this['_collaborationSessionService']['requireSession'](_0x2ed833);this[_0x43285f(0x317)]||this[_0x43285f(0x285)]['has'](_0x2ed833)||!this[_0x43285f(0x32c)]['getUnit'](_0x2ed833)||_0x28804a['event$']['pipe']((0x0,s[_0x43285f(0x2df)])(_0x4147f2=>_0x4147f2[_0x43285f(0x25c)]===e['CollaborationEvent'][_0x43285f(0x48f)]),(0x0,s[_0x43285f(0x2ed)])((0x0,i['merge'])(this[_0x43285f(0x343)],this[_0x43285f(0x32c)][_0x43285f(0x423)][_0x43285f(0x476)]((0x0,s[_0x43285f(0x2df)])(_0x1f9a9c=>_0x1f9a9c[_0x43285f(0x2f0)]()===_0x2ed833)))))['subscribe'](_0x49a854=>{const _0x228e0f=_0x43285f;let {reason:_0x53362f}=_0x49a854[_0x228e0f(0x223)];this[_0x228e0f(0x3ce)]['emitEvent']({'id':_0x228e0f(0x47b),'data':_0x53362f}),this[_0x228e0f(0x285)][_0x228e0f(0x3ea)](_0x2ed833),this['_injector'][_0x228e0f(0x1f1)](t['ObjectPermissionService'])[_0x228e0f(0x368)](_0x2ed833);let _0x230eaf=lt(_0x237844);_0x230eaf!=null&&this[_0x228e0f(0x394)](_0x2ed833,_0x230eaf,a[_0x228e0f(0x497)][_0x228e0f(0x26d)],!0x1),this['_collaborationSessionService'][_0x228e0f(0x429)](_0x2ed833);});};ct(this[_0x3d04e1(0x32c)])[_0x3d04e1(0x476)]((0x0,s[_0x3d04e1(0x2df)])(({unitId:_0x5949f3})=>!(0x0,t[_0x3d04e1(0x3e5)])(_0x5949f3)),(0x0,s[_0x3d04e1(0x2ed)])(this['dispose$']))['subscribe'](({type:_0x30764d,unitId:_0x492040})=>{const _0x5a11e2=_0x3d04e1;_0x39d3cb(_0x492040,_0x30764d)[_0x5a11e2(0x4b1)](_0x498dfa=>this['_injector'][_0x5a11e2(0x1f1)](t[_0x5a11e2(0x22c)])[_0x5a11e2(0x1d8)](_0x498dfa));});}['_initUnitPermissionChange'](){const _0x976972=_0x16128c;let _0x39653b=async(_0x3596ee,_0x24a22b)=>{const _0x6a3411=_0x4c27;let _0x5a42cc=await this[_0x6a3411(0x4c3)][_0x6a3411(0x39c)](_0x3596ee);if(!(this['_disposed']||this['_closedUnits'][_0x6a3411(0x339)](_0x3596ee)||!this[_0x6a3411(0x32c)][_0x6a3411(0x495)](_0x3596ee))){if(_0x24a22b===t[_0x6a3411(0x3c4)]['UNIVER_SHEET']){let _0x6bf761=this['_injector'][_0x6a3411(0x1f1)](r[_0x6a3411(0x403)]);await _0x6bf761[_0x6a3411(0x228)](_0x3596ee),_0x5a42cc[_0x6a3411(0x47e)][_0x6a3411(0x476)]((0x0,s[_0x6a3411(0x2df)])(_0x3f7454=>_0x3f7454['eventID']===e[_0x6a3411(0x1f4)][_0x6a3411(0x2a2)]),(0x0,s[_0x6a3411(0x2ed)])((0x0,i[_0x6a3411(0x23f)])(this['dispose$'],_0x5a42cc[_0x6a3411(0x47e)][_0x6a3411(0x476)]((0x0,s['filter'])(_0x1855a2=>_0x1855a2[_0x6a3411(0x25c)]===e['CollaborationEvent'][_0x6a3411(0x48f)])),this['_univerInstanceService'][_0x6a3411(0x423)]['pipe']((0x0,s[_0x6a3411(0x2df)])(_0x4d36ab=>_0x4d36ab[_0x6a3411(0x2f0)]()===_0x3596ee)))))[_0x6a3411(0x3f8)](_0x49d9ac=>{const _0x301dbb=_0x6a3411;let {objectId:_0x1dc166}=_0x49d9ac[_0x301dbb(0x223)];_0x1dc166===_0x3596ee?_0x6bf761[_0x301dbb(0x228)](_0x3596ee):_0x6bf761[_0x301dbb(0x3b7)](_0x3596ee,_0x1dc166);});return;}_0x5a42cc[_0x6a3411(0x47e)][_0x6a3411(0x476)]((0x0,s['filter'])(_0x1a990b=>_0x1a990b['eventID']===e[_0x6a3411(0x1f4)][_0x6a3411(0x2a2)]),(0x0,s[_0x6a3411(0x2ed)])((0x0,i[_0x6a3411(0x23f)])(this['dispose$'],_0x5a42cc[_0x6a3411(0x47e)]['pipe']((0x0,s[_0x6a3411(0x2df)])(_0x61c723=>_0x61c723['eventID']===e[_0x6a3411(0x1f4)][_0x6a3411(0x48f)])),this[_0x6a3411(0x32c)][_0x6a3411(0x423)]['pipe']((0x0,s[_0x6a3411(0x2df)])(_0x414c9d=>_0x414c9d[_0x6a3411(0x2f0)]()===_0x3596ee)))))[_0x6a3411(0x3f8)](()=>{const _0x15a870=_0x6a3411;this[_0x15a870(0x3b5)](_0x3596ee,_0x24a22b)[_0x15a870(0x4b1)](_0x42f917=>this[_0x15a870(0x200)][_0x15a870(0x1f1)](t[_0x15a870(0x22c)])[_0x15a870(0x1d8)](_0x42f917));}),await this['_refreshUnitPermission'](_0x3596ee,_0x24a22b);}};ct(this[_0x976972(0x32c)])[_0x976972(0x476)]((0x0,s['filter'])(({unitId:_0x203b21})=>!(0x0,t[_0x976972(0x3e5)])(_0x203b21)),(0x0,s[_0x976972(0x2ed)])(this['dispose$']))['subscribe'](({type:_0x31817c,unitId:_0x347d31})=>{const _0x497308=_0x976972;_0x39653b(_0x347d31,_0x31817c)[_0x497308(0x4b1)](_0x2694b3=>this['_injector']['get'](t['ILogService'])[_0x497308(0x1d8)](_0x2694b3));});}async[_0x16128c(0x3b5)](_0x532090,_0x5d0238){const _0x2d945d=_0x16128c;let _0x563752=lt(_0x5d0238);if(_0x563752==null)return;let _0x22d5a9=this[_0x2d945d(0x200)]['get'](t['ObjectPermissionService']);if(_0x22d5a9[_0x2d945d(0x2da)]({'unitId':_0x532090,'objectId':_0x532090,'objectType':_0x563752})){await _0x22d5a9[_0x2d945d(0x1d6)](_0x532090);return;}let _0x3fa0ad=this[_0x2d945d(0x45d)](_0x532090,_0x563752);if(!_0x3fa0ad[_0x2d945d(0x471)])return;let _0x38cbf5=await this[_0x2d945d(0x304)][_0x2d945d(0x460)]({'objectID':_0x532090,'objectType':_0x563752,'unitID':_0x532090,'actions':_0x3fa0ad[_0x2d945d(0x2b2)](({action:_0x21b95d})=>_0x21b95d)});this[_0x2d945d(0x317)]||this['_closedUnits'][_0x2d945d(0x339)](_0x532090)||!this[_0x2d945d(0x32c)][_0x2d945d(0x495)](_0x532090)||_0x38cbf5[_0x2d945d(0x43b)](_0x487a95=>{const _0x26056e=_0x2d945d;let _0x10b370=_0x487a95[_0x26056e(0x47a)],_0x2a5bc3=_0x487a95[_0x26056e(0x460)];_0x10b370!=null&&_0x2a5bc3!=null&&_0x3fa0ad[_0x26056e(0x2df)](_0x219a6d=>_0x219a6d[_0x26056e(0x47a)]===_0x10b370)['forEach'](_0x5b0e44=>this[_0x26056e(0x436)][_0x26056e(0x3fd)](_0x5b0e44['id'],_0x2a5bc3));});}[_0x16128c(0x45d)](_0x3e1bb1,_0x1cd2b7){const _0x40181e=_0x16128c;let _0x36d556=[];return this[_0x40181e(0x436)]['getAllPermissionPoint']()[_0x40181e(0x43b)]((_0x2c8d26,_0x48e611)=>{const _0x244b69=_0x40181e;_0x2c8d26[_0x244b69(0x3f8)](_0x29f2f2=>{const _0x3004ec=_0x244b69;_0x29f2f2[_0x3004ec(0x3eb)]===_0x1cd2b7&&_0x3004ec(0x367)in _0x29f2f2&&_0x29f2f2[_0x3004ec(0x367)]===_0x3e1bb1&&(!(_0x3004ec(0x365)in _0x29f2f2)||_0x29f2f2['objectId']===_0x3e1bb1)&&_0x36d556[_0x3004ec(0x4da)]({'id':_0x48e611,'action':_0x29f2f2[_0x3004ec(0x4cc)]});})['unsubscribe']();}),_0x36d556;}[_0x16128c(0x394)](_0x109d38,_0x4fd59d,_0x139739,_0x4a50b5){const _0x4ed8e9=_0x16128c;this['_permissionService'][_0x4ed8e9(0x455)]()[_0x4ed8e9(0x43b)]((_0x2b945e,_0x151422)=>{const _0x5eaec2=_0x4ed8e9;let _0x1350d0=!0x1;_0x2b945e[_0x5eaec2(0x3f8)](_0x320b4c=>{const _0x656269=_0x5eaec2;_0x1350d0=_0x320b4c[_0x656269(0x3eb)]===_0x4fd59d&&_0x320b4c[_0x656269(0x4cc)]===_0x139739&&_0x656269(0x367)in _0x320b4c&&_0x320b4c[_0x656269(0x367)]===_0x109d38&&(!('objectId'in _0x320b4c)||_0x320b4c[_0x656269(0x365)]===_0x109d38);})[_0x5eaec2(0x3e2)](),_0x1350d0&&this[_0x5eaec2(0x436)][_0x5eaec2(0x3fd)](_0x151422,_0x4a50b5);});}};X=y([v(0x0,(0x0,t[_0x16128c(0x4c0)])(t[_0x16128c(0x33b)])),v(0x1,t[_0x16128c(0x399)]),v(0x2,t['IPermissionService']),v(0x3,t['IAuthzIoService']),v(0x4,(0x0,t[_0x16128c(0x4c0)])(V)),v(0x5,(0x0,t[_0x16128c(0x4c0)])(_))],X);function ct(_0x7baf3f){const _0x22fd00=_0x16128c;return(0x0,i['merge'])(...[t['UniverInstanceType'][_0x22fd00(0x4d8)],t[_0x22fd00(0x3c4)]['UNIVER_DOC'],t[_0x22fd00(0x3c4)][_0x22fd00(0x4fd)],t[_0x22fd00(0x3c4)][_0x22fd00(0x441)],t['UniverInstanceType'][_0x22fd00(0x4f7)]][_0x22fd00(0x2b2)](_0x5c056b=>_0x7baf3f[_0x22fd00(0x201)](_0x5c056b)[_0x22fd00(0x476)]((0x0,s['map'])(_0x218325=>({'type':_0x5c056b,'unitId':_0x218325[_0x22fd00(0x49b)][_0x22fd00(0x2f0)]()})))));}function lt(_0x2cbcce){const _0x272c4e=_0x16128c;switch(_0x2cbcce){case t[_0x272c4e(0x3c4)][_0x272c4e(0x4d8)]:return a[_0x272c4e(0x2eb)][_0x272c4e(0x36c)];case t[_0x272c4e(0x3c4)][_0x272c4e(0x494)]:return a[_0x272c4e(0x2eb)][_0x272c4e(0x296)];case t[_0x272c4e(0x3c4)]['UNIVER_SLIDE']:return a[_0x272c4e(0x2eb)]['Slide'];case t[_0x272c4e(0x3c4)][_0x272c4e(0x441)]:return a[_0x272c4e(0x2eb)][_0x272c4e(0x4d2)];case t['UniverInstanceType']['UNIVER_BASE']:return a[_0x272c4e(0x2eb)][_0x272c4e(0x29d)];default:return;}}let Z=class{constructor(_0x30a5f8,_0x49572c){const _0x5d3f77=_0x16128c;this[_0x5d3f77(0x20e)]=_0x30a5f8,this[_0x5d3f77(0x3a4)]=_0x49572c;}async['getUnitOnRev'](_0x235189,_0x2b3929){const _0x39a533=_0x16128c;var _0x3e8c42;let {unitID:_0x5c85a7,type:_0x40da41,revision:_0x40fd7f=0x0}=_0x2b3929,_0x1728d0=this[_0x39a533(0x46f)]()+'/'+_0x40da41+_0x39a533(0x443)+_0x5c85a7+_0x39a533(0x34c)+_0x40fd7f,_0x13d590=(await this[_0x39a533(0x3a4)]['get'](_0x1728d0))['body'],_0x1eb3c8=(_0x3e8c42=_0x13d590['snapshot'])==null?void 0x0:_0x3e8c42['workbook'];if(_0x1eb3c8){let _0x167d25=_0x1eb3c8==null?void 0x0:_0x1eb3c8['originalMeta'];_0x1eb3c8[_0x39a533(0x50c)]=e['textEncoder'][_0x39a533(0x50b)]((0x0,e[_0x39a533(0x2c9)])(_0x167d25)),Object[_0x39a533(0x445)](_0x1eb3c8[_0x39a533(0x374)])['forEach'](([,_0x35f3e2])=>{const _0x3905f7=_0x39a533;let _0xeffe2d=_0x35f3e2[_0x3905f7(0x50c)];_0x35f3e2[_0x3905f7(0x50c)]=e[_0x3905f7(0x4d9)][_0x3905f7(0x50b)]((0x0,e[_0x3905f7(0x2c9)])(_0xeffe2d));});}return _0x13d590;}async[_0x16128c(0x1d5)](_0x26335e,_0x5a1f99){const _0x55904a=_0x16128c;let {unitID:_0x5cd36e,type:_0x3a2065,blockID:_0x65aa79}=_0x5a1f99,_0x5d18d6=this[_0x55904a(0x469)]()+'/'+_0x3a2065+_0x55904a(0x443)+_0x5cd36e+_0x55904a(0x241)+_0x65aa79;return(await this[_0x55904a(0x3a4)][_0x55904a(0x1f1)](_0x5d18d6))[_0x55904a(0x20b)];}async[_0x16128c(0x42c)](_0x3558aa,_0x4fc5b7){const _0x24116c=_0x16128c;let {unitID:_0x21d489,type:_0x847a1c,blockID:_0x13c62f}=_0x4fc5b7,_0xcff840=this[_0x24116c(0x469)]()+_0x24116c(0x241)+_0x847a1c+_0x24116c(0x443)+_0x21d489+_0x24116c(0x241)+_0x13c62f;return(await this['_httpService'][_0x24116c(0x1f1)](_0xcff840))[_0x24116c(0x20b)];}async[_0x16128c(0x492)](_0x3c32b6,_0x30d86e){const _0x423bf2=_0x16128c;let {unitID:_0x472f88,type:_0x374c0c,from:_0x343154,to:_0x33105d}=_0x30d86e,_0x3e8685=this[_0x423bf2(0x469)]()+'/'+_0x374c0c+_0x423bf2(0x443)+_0x472f88+_0x423bf2(0x4e5)+_0x343154+_0x423bf2(0x402)+_0x33105d;return(await this[_0x423bf2(0x3a4)]['get'](_0x3e8685))[_0x423bf2(0x20b)];}[_0x16128c(0x46f)](){const _0x5a62a9=_0x16128c;return this[_0x5a62a9(0x20e)][_0x5a62a9(0x1dd)]('SNAPSHOT_URL_KEY')??this['_getAPIPrefix']();}[_0x16128c(0x469)](){const _0x368332=_0x16128c;let _0x3f29fe=this['_configService']['getConfig'](m);return(_0x3f29fe==null?void 0x0:_0x3f29fe['snapshotServerUrl'])??_0x368332(0x268);}async[_0x16128c(0x2d4)](_0x273236,_0xf86f8f){const _0x642018=_0x16128c;let _0x23134e=_0x642018(0x3d1)+_0xf86f8f[_0x642018(0x3eb)]+_0x642018(0x443)+_0xf86f8f['unitID']+_0x642018(0x1e3);return(await this[_0x642018(0x3a4)][_0x642018(0x1f1)](_0x23134e,{'params':{'resourceId':JSON[_0x642018(0x24f)](_0xf86f8f['resourceIDs'])}}))[_0x642018(0x20b)];}[_0x16128c(0x4a7)](){const _0x4937f3=_0x16128c;throw Error(_0x4937f3(0x22e));}['updateSnapshot'](){const _0x126779=_0x16128c;throw Error(_0x126779(0x22e));}['saveSheetBlock'](){throw Error('This\x20method\x20should\x20not\x20be\x20called\x20on\x20the\x20client\x20side!');}[_0x16128c(0x2bb)](){const _0x57ca49=_0x16128c;throw Error(_0x57ca49(0x22e));}[_0x16128c(0x41f)](){const _0x597789=_0x16128c;throw Error(_0x597789(0x22e));}[_0x16128c(0x420)](){const _0x532cb9=_0x16128c;throw Error(_0x532cb9(0x22e));}};Z=y([v(0x0,t['IConfigService']),v(0x1,(0x0,t[_0x16128c(0x4c0)])(l[_0x16128c(0x27f)]))],Z);let Q=class extends t[_0x16128c(0x294)]{constructor(_0x36b42d,_0x192234,_0x2fd068,_0x358a50,_0x3cf4e,_0x561144){const _0x251373=_0x16128c;super(_0x36b42d,_0x192234,_0x2fd068,_0x358a50),this['_transformService']=_0x3cf4e,this[_0x251373(0x451)]=_0x561144;}[_0x16128c(0x2ca)](_0x241ccf,_0x1864b8){const _0x29d5e0=_0x16128c;let _0x4a8cd0=this[_0x29d5e0(0x1e6)](_0x241ccf);if(_0x4a8cd0)try{let _0x16f46c=this['_transformStack'](_0x4a8cd0,_0x1864b8);this[_0x29d5e0(0x3f3)](_0x241ccf,_0x16f46c);}catch(_0x54f7ab){this['_logService']['error'](_0x29d5e0(0x278),_0x54f7ab),this[_0x29d5e0(0x4ef)](_0x241ccf);}let _0x5bc2f7=this[_0x29d5e0(0x4f4)](_0x241ccf);if(_0x5bc2f7)try{let _0x3500db=this['_transformStack'](_0x5bc2f7,_0x1864b8);this[_0x29d5e0(0x27d)](_0x241ccf,_0x3500db);}catch(_0x2b1945){this[_0x29d5e0(0x451)][_0x29d5e0(0x1d8)](_0x2b1945),this[_0x29d5e0(0x2a4)](_0x241ccf);}}[_0x16128c(0x4ef)](_0x2ec4dd){const _0x13f6f2=_0x16128c;let _0x45b5bb=this[_0x13f6f2(0x1e6)](_0x2ec4dd);_0x45b5bb&&(_0x45b5bb[_0x13f6f2(0x471)]=0x0,this[_0x13f6f2(0x461)]());}[_0x16128c(0x2a4)](_0x56558f){const _0x156842=_0x16128c;let _0x3b1e7b=this['_getRedoStack'](_0x56558f);_0x3b1e7b&&(_0x3b1e7b['length']=0x0,this[_0x156842(0x461)]());}[_0x16128c(0x3f3)](_0x44cd32,_0xbfe898){const _0x381338=_0x16128c;this[_0x381338(0x3ec)]['set'](_0x44cd32,_0xbfe898),this[_0x381338(0x461)]();}[_0x16128c(0x27d)](_0x2d34b2,_0x40b91e){const _0x471483=_0x16128c;this['_redoStacks'][_0x471483(0x2b4)](_0x2d34b2,_0x40b91e),this[_0x471483(0x461)]();}[_0x16128c(0x3fa)](_0x39fe69,_0x144c5c){const _0x30861f=_0x16128c;let _0x5d6453=[],_0x406af2=_0x144c5c,_0x4cbec7=_0x144c5c;for(let _0x68e62e=_0x39fe69[_0x30861f(0x471)]-0x1;_0x68e62e>=0x0;_0x68e62e--){let {unitID:_0x2ea28f,undoMutations:_0x519727,redoMutations:_0x2c6bbb}=_0x39fe69[_0x68e62e],_0x166940=this[_0x30861f(0x238)][_0x30861f(0x375)](_0x406af2,_0x519727),_0x39abf0=this[_0x30861f(0x238)]['transformMutationsWithChangeset'](_0x4cbec7,_0x2c6bbb);if((0x0,e[_0x30861f(0x408)])(_0x166940)||(0x0,e[_0x30861f(0x408)])(_0x39abf0)){this[_0x30861f(0x451)][_0x30861f(0x1d8)](_0x30861f(0x278),'transformStack\x20failed!',_0x166940,_0x39abf0);break;}_0x406af2=_0x166940[_0x30861f(0x2f7)],_0x4cbec7=_0x39abf0[_0x30861f(0x2f7)],_0x5d6453['push']({'unitID':_0x2ea28f,'undoMutations':_0x166940[_0x30861f(0x275)],'redoMutations':_0x39abf0[_0x30861f(0x275)]});}return _0x5d6453[_0x30861f(0x377)]();}};Q=y([v(0x0,t[_0x16128c(0x399)]),v(0x1,t['ICommandService']),v(0x2,t[_0x16128c(0x2b8)]),v(0x3,t[_0x16128c(0x35d)]),v(0x4,e[_0x16128c(0x28a)]),v(0x5,t[_0x16128c(0x22c)])],Q);let $=class extends t[_0x16128c(0x3f4)]{constructor(_0x68ec06=ee,_0x3096b6,_0x1ba253,_0x3ba213){const _0x1fe067=_0x16128c;super(),this[_0x1fe067(0x1d4)]=_0x68ec06,this[_0x1fe067(0x451)]=_0x3096b6,this[_0x1fe067(0x200)]=_0x1ba253,this[_0x1fe067(0x20e)]=_0x3ba213;let {..._0x49fc13}=(0x0,t[_0x1fe067(0x23f)])({},ee,this[_0x1fe067(0x1d4)]);if(!_0x49fc13['socketService'])throw Error(_0x1fe067(0x4d6));this[_0x1fe067(0x1d4)]=_0x49fc13,this[_0x1fe067(0x20e)][_0x1fe067(0x507)](m,_0x49fc13);}[_0x16128c(0x2c0)](){const _0x285839=_0x16128c;this[_0x285839(0x20e)][_0x285839(0x507)](t[_0x285839(0x2d9)],this[_0x285839(0x1d4)][_0x285839(0x4dd)]??[]),this[_0x285839(0x2bc)](),this[_0x285839(0x34d)]();}[_0x16128c(0x2bc)](){const _0x434bde=_0x16128c;var _0x21812b,_0x5255a1;this[_0x434bde(0x200)][_0x434bde(0x339)](t['IUndoRedoService'])&&this['_logService'][_0x434bde(0x1d8)]('[UniverCollaborationClientPlugin]',_0x434bde(0x4a5));let _0x5347d3=(0x0,t[_0x434bde(0x4f9)])([[t['IUndoRedoService'],{'useClass':Q}],[Xe,{'useValue':Ze()}],[V],[b],[S],[W],[K],[ae],[X],[_],[q],[qe,{'useClass':this['_config'][_0x434bde(0x3b4)]}],[e[_0x434bde(0x4bc)],{'useClass':Z}],[t[_0x434bde(0x3a8)],{'useClass':G}],[t[_0x434bde(0x326)],{'useClass':J}],[nt,{'useClass':U}],[t[_0x434bde(0x27a)],{'useClass':Y}],[H],[tt]],(_0x21812b=this[_0x434bde(0x1d4)])==null?void 0x0:_0x21812b[_0x434bde(0x30e)]);if(!((_0x5255a1=this['_config'])!=null&&_0x5255a1['enableSingleActiveInstanceLock'])){let _0x141a3c=_0x5347d3[_0x434bde(0x39d)](([_0x5f589c])=>_0x5f589c===C);_0x141a3c!==-0x1&&_0x5347d3['splice'](_0x141a3c,0x1);}(0x0,t[_0x434bde(0x3e1)])(this[_0x434bde(0x200)],_0x5347d3);}[_0x16128c(0x34d)](){const _0xee2531=_0x16128c;var _0x1e2b58,_0x30aef2;if(this['_injector'][_0xee2531(0x1f1)](l[_0xee2531(0x27f)])[_0xee2531(0x31a)]({'priority':0x14,'interceptor':(0x0,l[_0xee2531(0x3c6)])({'maxParallel':0x6})}),!((_0x1e2b58=this['_config'])!=null&&_0x1e2b58[_0xee2531(0x38a)])){var _0x104133;(_0x104133=this['_injector'][_0xee2531(0x1f1)](x,t[_0xee2531(0x306)][_0xee2531(0x3ab)]))==null||_0x104133[_0xee2531(0x3d8)]();}(_0x30aef2=this['_config'])!=null&&_0x30aef2[_0xee2531(0x4aa)]&&(0x0,t[_0xee2531(0x233)])(this['_injector'],[[W]]),(0x0,t[_0xee2531(0x233)])(this[_0xee2531(0x200)],[[K],[H],[X]]);}};g($,_0x16128c(0x1ea),_0x16128c(0x2cf)),g($,_0x16128c(0x450),$e),g($,'version',et),$=y([(0x0,t[_0x16128c(0x3d3)])(u['UniverLicensePlugin'],l[_0x16128c(0x2fe)],e[_0x16128c(0x2e8)]),v(0x1,t[_0x16128c(0x22c)]),v(0x2,(0x0,t['Inject'])(t[_0x16128c(0x33b)])),v(0x3,t[_0x16128c(0x35d)])],$),Object['defineProperty'](exports,_0x16128c(0x3e3),{'enumerable':!0x0,'get':function(){return G;}}),Object[_0x16128c(0x3a6)](exports,'AwaitingState',{'enumerable':!0x0,'get':function(){return k;}}),Object[_0x16128c(0x3a6)](exports,_0x16128c(0x36b),{'enumerable':!0x0,'get':function(){return A;}}),Object[_0x16128c(0x3a6)](exports,_0x16128c(0x382),{'enumerable':!0x0,'get':function(){return I;}}),Object['defineProperty'](exports,_0x16128c(0x3cc),{'enumerable':!0x0,'get':function(){return z;}}),exports[_0x16128c(0x350)]=m,Object[_0x16128c(0x3a6)](exports,_0x16128c(0x4a6),{'enumerable':!0x0,'get':function(){return U;}}),Object[_0x16128c(0x3a6)](exports,_0x16128c(0x23e),{'enumerable':!0x0,'get':function(){return H;}}),Object[_0x16128c(0x3a6)](exports,'CollaborationEntity',{'enumerable':!0x0,'get':function(){return P;}}),Object[_0x16128c(0x3a6)](exports,'CollaborationImageIoService',{'enumerable':!0x0,'get':function(){return J;}}),Object['defineProperty'](exports,_0x16128c(0x3c1),{'enumerable':!0x0,'get':function(){return ve;}}),Object[_0x16128c(0x3a6)](exports,'CollaborationSessionService',{'enumerable':!0x0,'get':function(){return V;}}),Object[_0x16128c(0x3a6)](exports,_0x16128c(0x478),{'enumerable':!0x0,'get':function(){return Ye;}}),exports[_0x16128c(0x21d)]=Be,exports[_0x16128c(0x501)]=ie,exports['CollaborationUIEventService']=_,Object[_0x16128c(0x3a6)](exports,_0x16128c(0x2c6),{'enumerable':!0x0,'get':function(){return Q;}}),exports['CommentService']=ae,Object[_0x16128c(0x3a6)](exports,_0x16128c(0x48c),{'enumerable':!0x0,'get':function(){return j;}}),exports[_0x16128c(0x41c)]=_0x16128c(0x31b),exports[_0x16128c(0x329)]='/universer-api/uniscript',exports[_0x16128c(0x24c)]='/universer-api/user/session-ticket',Object[_0x16128c(0x3a6)](exports,'DataLoaderService',{'enumerable':!0x0,'get':function(){return q;}}),Object[_0x16128c(0x3a6)](exports,_0x16128c(0x435),{'enumerable':!0x0,'get':function(){return F;}}),Object['defineProperty'](exports,_0x16128c(0x458),{'enumerable':!0x0,'get':function(){return N;}}),exports[_0x16128c(0x3ca)]=_0x16128c(0x477),exports['HEARTBEAT_TIMEOUT_KEY']=_0x16128c(0x263),exports['IAttachmentIoService']=nt,exports[_0x16128c(0x211)]=Xe,exports[_0x16128c(0x422)]=qe,exports['ILocalCacheService']=x,exports['INetworkConditionService']=We,exports['ISingleActiveUnitService']=C,exports[_0x16128c(0x1f3)]=0x3e8,exports[_0x16128c(0x227)]=_0x16128c(0x1f3),Object['defineProperty'](exports,_0x16128c(0x3c3),{'enumerable':!0x0,'get':function(){return b;}}),Object[_0x16128c(0x3a6)](exports,_0x16128c(0x314),{'enumerable':!0x0,'get':function(){return Y;}}),Object[_0x16128c(0x3a6)](exports,_0x16128c(0x42f),{'enumerable':!0x0,'get':function(){return M;}}),Object[_0x16128c(0x3a6)](exports,_0x16128c(0x2b7),{'enumerable':!0x0,'get':function(){return B;}}),Object[_0x16128c(0x3a6)](exports,_0x16128c(0x2e4),{'enumerable':!0x0,'get':function(){return O;}}),exports[_0x16128c(0x291)]='REMOTE_UNISCRIPT_EXECUTION_ENDPOINT',exports['RETRY_CONNECTING_MAX_COUNT_KEY']='RETRY_CONNECTING_MAX_COUNT',exports['SessionStatus']=ge,Object[_0x16128c(0x3a6)](exports,_0x16128c(0x4ba),{'enumerable':!0x0,'get':function(){return L;}}),Object[_0x16128c(0x3a6)](exports,'SheetTransformSelectionsService',{'enumerable':!0x0,'get':function(){return S;}}),Object['defineProperty'](exports,_0x16128c(0x34e),{'enumerable':!0x0,'get':function(){return R;}}),Object[_0x16128c(0x3a6)](exports,_0x16128c(0x41a),{'enumerable':!0x0,'get':function(){return Z;}}),Object[_0x16128c(0x3a6)](exports,_0x16128c(0x2c8),{'enumerable':!0x0,'get':function(){return D;}}),exports[_0x16128c(0x3df)]=xe,Object['defineProperty'](exports,_0x16128c(0x222),{'enumerable':!0x0,'get':function(){return $;}}),exports[_0x16128c(0x2d7)]=Ze,exports['deserializeToCombResponse']=Ge,exports['getLocalCacheKey']=ye,exports[_0x16128c(0x331)]=Ke;
1
+ const _0x51c992=_0x3ab5;(function(_0x47e575,_0x3f131f){const _0x13a324=_0x3ab5,_0x9de24d=_0x47e575();while(!![]){try{const _0x4a868f=parseInt(_0x13a324(0x33a))/0x1*(parseInt(_0x13a324(0x2ef))/0x2)+parseInt(_0x13a324(0x46f))/0x3*(-parseInt(_0x13a324(0x220))/0x4)+-parseInt(_0x13a324(0x347))/0x5*(-parseInt(_0x13a324(0x36a))/0x6)+-parseInt(_0x13a324(0x32b))/0x7+-parseInt(_0x13a324(0x18f))/0x8*(parseInt(_0x13a324(0x2da))/0x9)+-parseInt(_0x13a324(0x218))/0xa*(parseInt(_0x13a324(0x236))/0xb)+parseInt(_0x13a324(0x266))/0xc;if(_0x4a868f===_0x3f131f)break;else _0x9de24d['push'](_0x9de24d['shift']());}catch(_0x2a143d){_0x9de24d['push'](_0x9de24d['shift']());}}}(_0x60bf,0xc7868),Object['defineProperty'](exports,Symbol[_0x51c992(0x452)],{'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=_0x51c992(0x39b),ee={};function te(_0x41472c){const _0x2adb6c=_0x51c992;return JSON[_0x2adb6c(0x45d)](_0x41472c)[_0x2adb6c(0x187)];}function h(_0x442285){'@babel/helpers - typeof';const _0x4d94bd=_0x51c992;return h=typeof Symbol==_0x4d94bd(0x2b3)&&typeof Symbol[_0x4d94bd(0x3ef)]=='symbol'?function(_0x2fcef0){return typeof _0x2fcef0;}:function(_0x3b5eb1){const _0x4bc191=_0x4d94bd;return _0x3b5eb1&&typeof Symbol==_0x4bc191(0x2b3)&&_0x3b5eb1['constructor']===Symbol&&_0x3b5eb1!==Symbol[_0x4bc191(0x3fa)]?_0x4bc191(0x407):typeof _0x3b5eb1;},h(_0x442285);}function ne(_0x67a18f,_0x458af9){const _0x1b313e=_0x51c992;if(h(_0x67a18f)!='object'||!_0x67a18f)return _0x67a18f;var _0x3f67e1=_0x67a18f[Symbol[_0x1b313e(0x3f0)]];if(_0x3f67e1!==void 0x0){var _0x33a8cd=_0x3f67e1[_0x1b313e(0x454)](_0x67a18f,_0x458af9||_0x1b313e(0x19a));if(h(_0x33a8cd)!=_0x1b313e(0x31b))return _0x33a8cd;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x458af9===_0x1b313e(0x2dc)?String:Number)(_0x67a18f);}function re(_0x4e4aab){const _0x162027=_0x51c992;var _0x97f0df=ne(_0x4e4aab,_0x162027(0x2dc));return h(_0x97f0df)==_0x162027(0x407)?_0x97f0df:_0x97f0df+'';}function g(_0x458fe6,_0x5403d6,_0x36c256){return(_0x5403d6=re(_0x5403d6))in _0x458fe6?Object['defineProperty'](_0x458fe6,_0x5403d6,{'value':_0x36c256,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x458fe6[_0x5403d6]=_0x36c256,_0x458fe6;}let ie=function(_0xc7c05e){const _0x3f3525=_0x51c992;return _0xc7c05e[_0x3f3525(0x289)]=_0x3f3525(0x289),_0xc7c05e[_0x3f3525(0x3ae)]='PERMISSION_DENIED',_0xc7c05e[_0x3f3525(0x3af)]=_0x3f3525(0x3af),_0xc7c05e[_0x3f3525(0x25e)]=_0x3f3525(0x25e),_0xc7c05e[_0x3f3525(0x1ad)]=_0x3f3525(0x1ad),_0xc7c05e[_0x3f3525(0x2cf)]=_0x3f3525(0x2cf),_0xc7c05e[_0x3f3525(0x237)]='JOIN_ROOM_FAILED',_0xc7c05e[_0x3f3525(0x43a)]=_0x3f3525(0x43a),_0xc7c05e['SOCKET_FAILED']=_0x3f3525(0x1ce),_0xc7c05e[_0x3f3525(0x33c)]=_0x3f3525(0x33c),_0xc7c05e;}({});var _=class{constructor(){const _0x13f38a=_0x51c992;g(this,_0x13f38a(0x1e5),new i[(_0x13f38a(0x29d))]()),g(this,'event$',this[_0x13f38a(0x1e5)][_0x13f38a(0x3e3)]());}[_0x51c992(0x3e8)](_0x99385d){const _0x2bc159=_0x51c992;this[_0x2bc159(0x1e5)]['next'](_0x99385d);}},ae=class{constructor(){const _0x2da332=_0x51c992;g(this,_0x2da332(0x42a),new i[(_0x2da332(0x29d))]()),g(this,'commentUpdate$',this[_0x2da332(0x42a)][_0x2da332(0x3e3)]());}[_0x51c992(0x2aa)](_0x2af392){const _0x1aefac=_0x51c992;this[_0x1aefac(0x42a)][_0x1aefac(0x443)](_0x2af392);}};function v(_0x50110d,_0x4f07a0){return function(_0x57c8b9,_0x295836){_0x4f07a0(_0x57c8b9,_0x295836,_0x50110d);};}function y(_0x27adb2,_0x33ef4d,_0x81ee6,_0x33ff1a){const _0x15a711=_0x51c992;var _0x1167b6=arguments[_0x15a711(0x187)],_0x538276=_0x1167b6<0x3?_0x33ef4d:_0x33ff1a===null?_0x33ff1a=Object[_0x15a711(0x304)](_0x33ef4d,_0x81ee6):_0x33ff1a,_0x1e6dfb;if(typeof Reflect==_0x15a711(0x31b)&&typeof Reflect[_0x15a711(0x36c)]==_0x15a711(0x2b3))_0x538276=Reflect[_0x15a711(0x36c)](_0x27adb2,_0x33ef4d,_0x81ee6,_0x33ff1a);else{for(var _0x25e6fe=_0x27adb2[_0x15a711(0x187)]-0x1;_0x25e6fe>=0x0;_0x25e6fe--)(_0x1e6dfb=_0x27adb2[_0x25e6fe])&&(_0x538276=(_0x1167b6<0x3?_0x1e6dfb(_0x538276):_0x1167b6>0x3?_0x1e6dfb(_0x33ef4d,_0x81ee6,_0x538276):_0x1e6dfb(_0x33ef4d,_0x81ee6))||_0x538276);}return _0x1167b6>0x3&&_0x538276&&Object[_0x15a711(0x478)](_0x33ef4d,_0x81ee6,_0x538276),_0x538276;}let b=class extends t[_0x51c992(0x3ac)]{constructor(_0x4f3784){const _0x1725f2=_0x51c992;super(),this[_0x1725f2(0x322)]=_0x4f3784,g(this,_0x1725f2(0x1aa),new Map()),g(this,_0x1725f2(0x49e),new i[(_0x1725f2(0x29d))]()),this['disposeWithMe']((0x0,i[_0x1725f2(0x335)])(this[_0x1725f2(0x322)]['getTypeOfUnitDisposed$'](t[_0x1725f2(0x2b4)][_0x1725f2(0x3f5)])['pipe']((0x0,s[_0x1725f2(0x231)])(_0x4714d2=>_0x4714d2[_0x1725f2(0x1c8)]())),this['_univerInstanceService'][_0x1725f2(0x29f)](t['UniverInstanceType'][_0x1725f2(0x47c)])[_0x1725f2(0x3a2)]((0x0,s[_0x1725f2(0x231)])(_0xeb7993=>_0xeb7993[_0x1725f2(0x1c8)]())),this[_0x1725f2(0x322)][_0x1725f2(0x29f)](t['UniverInstanceType']['UNIVER_BOARD'])['pipe']((0x0,s[_0x1725f2(0x231)])(_0x2bf1bf=>_0x2bf1bf['getUnitId']())),this[_0x1725f2(0x322)]['getTypeOfUnitDisposed$'](t[_0x1725f2(0x2b4)][_0x1725f2(0x387)])[_0x1725f2(0x3a2)]((0x0,s[_0x1725f2(0x231)])(_0x390e25=>_0x390e25[_0x1725f2(0x1c8)]())))[_0x1725f2(0x481)](_0x338eb5=>this[_0x1725f2(0x2cb)](_0x338eb5)));}[_0x51c992(0x2e9)](_0x22aaf3){const _0x373407=_0x51c992;return this[_0x373407(0x1aa)][_0x373407(0x2d4)](_0x22aaf3)?(0x0,i['of'])(this['_roomMembers'][_0x373407(0x403)](_0x22aaf3)):this[_0x373407(0x49e)][_0x373407(0x3a2)]((0x0,s[_0x373407(0x231)])(_0x2e0e09=>{const _0x51ea73=_0x373407;if(_0x2e0e09===_0x22aaf3)return this[_0x51ea73(0x1aa)][_0x51ea73(0x403)](_0x2e0e09);}));}[_0x51c992(0x1eb)](_0xb22e6f,_0x13e768){const _0xa388a7=_0x51c992;let _0x4e459b=this[_0xa388a7(0x1aa)][_0xa388a7(0x403)](_0xb22e6f);_0x4e459b||(_0x4e459b=new oe(),this['_roomMembers']['set'](_0xb22e6f,_0x4e459b),this['_roomCreated$'][_0xa388a7(0x443)](_0xb22e6f)),_0x4e459b[_0xa388a7(0x1eb)](_0x13e768);}[_0x51c992(0x179)](_0x302306,_0x13c954){const _0x155fd4=_0x51c992;let _0x34f340=this[_0x155fd4(0x1aa)]['get'](_0x302306);_0x34f340&&_0x34f340[_0x155fd4(0x179)](_0x13c954);}['getRoom'](_0x270175){const _0x547a64=_0x51c992;return this['_roomMembers'][_0x547a64(0x403)](_0x270175);}[_0x51c992(0x1b5)](_0x2d0462,_0x5e43be){const _0x48ce24=_0x51c992;let _0x513812=this['_roomMembers'][_0x48ce24(0x403)](_0x2d0462);if(_0x513812)return _0x513812[_0x48ce24(0x1b5)](_0x5e43be);}[_0x51c992(0x2cb)](_0x4b8aa4){const _0x30c77a=_0x51c992;let _0x2ca327=this[_0x30c77a(0x1aa)]['get'](_0x4b8aa4);_0x2ca327&&(_0x2ca327['dispose'](),this[_0x30c77a(0x1aa)][_0x30c77a(0x404)](_0x4b8aa4));}[_0x51c992(0x37b)](){const _0x3f4178=_0x51c992;this[_0x3f4178(0x1aa)]['forEach'](_0x3ffde1=>_0x3ffde1[_0x3f4178(0x37b)]()),this[_0x3f4178(0x1aa)][_0x3f4178(0x47a)](),this[_0x3f4178(0x49e)][_0x3f4178(0x3a9)]();}};b=y([v(0x0,t[_0x51c992(0x1dd)])],b);var oe=class extends t[_0x51c992(0x3ac)]{constructor(..._0x524f3c){const _0x5c303d=_0x51c992;super(..._0x524f3c),g(this,_0x5c303d(0x3ad),new Map()),g(this,_0x5c303d(0x380),new i[(_0x5c303d(0x3f2))](this['_members'])),g(this,_0x5c303d(0x2a3),this[_0x5c303d(0x380)]['asObservable']());}[_0x51c992(0x37b)](){const _0x2b0961=_0x51c992;this['_members']['clear'](),this[_0x2b0961(0x380)]['complete']();}[_0x51c992(0x1eb)](_0x32b77b){const _0x3acbf9=_0x51c992;this['_members'][_0x3acbf9(0x35e)](_0x32b77b[_0x3acbf9(0x44a)],_0x32b77b),this[_0x3acbf9(0x1fc)]();}[_0x51c992(0x179)](_0x3a2340){const _0x35419e=_0x51c992;this[_0x35419e(0x3ad)][_0x35419e(0x404)](_0x3a2340),this[_0x35419e(0x1fc)]();}[_0x51c992(0x1b5)](_0x36691b){const _0x115a04=_0x51c992;return this[_0x115a04(0x3ad)][_0x115a04(0x403)](_0x36691b);}[_0x51c992(0x3ea)](){const _0x22213e=_0x51c992;return Array[_0x22213e(0x1f3)](this['_members'][_0x22213e(0x215)]());}[_0x51c992(0x1fc)](){const _0x1eac08=_0x51c992;this[_0x1eac08(0x380)][_0x1eac08(0x443)](this[_0x1eac08(0x3ad)]);}};function se(_0x4edd19,_0x5038a1){const _0x25f9ec=_0x51c992;if(le(_0x4edd19))return _0x5038a1;if(_0x5038a1[_0x25f9ec(0x309)]===e['CollaborationEvent'][_0x25f9ec(0x1de)]){let _0x30ecaa=me(_0x4edd19),_0x31401c=_0x5038a1;return{..._0x31401c,'data':{..._0x31401c[_0x25f9ec(0x2e1)],'unitID':_0x4edd19[_0x25f9ec(0x280)]['unitId'],'unitType':_0x4edd19[_0x25f9ec(0x280)]['unitType']??_0x31401c[_0x25f9ec(0x2e1)][_0x25f9ec(0x19c)],'changeset':_0x30ecaa[_0x25f9ec(0x3c7)](_0x31401c['data'][_0x25f9ec(0x184)],he(_0x4edd19))}};}if(_0x5038a1[_0x25f9ec(0x309)]===e[_0x25f9ec(0x496)]['FETCH_MISSING']){let _0x274f10=_0x5038a1;return{..._0x274f10,'data':{..._0x274f10[_0x25f9ec(0x2e1)],'unitID':_0x4edd19[_0x25f9ec(0x280)][_0x25f9ec(0x44c)],'unitType':_0x4edd19[_0x25f9ec(0x280)][_0x25f9ec(0x19c)]??_0x274f10[_0x25f9ec(0x2e1)]['unitType']}};}return _0x5038a1;}function ce(_0x199dc9,_0x421f30){const _0x2da760=_0x51c992;if(le(_0x199dc9))return[_0x421f30];switch(_0x421f30[_0x2da760(0x309)]){case e['CollaborationEvent']['NEW_CHANGESETS']:return[ue(_0x199dc9,_0x421f30)];case e[_0x2da760(0x496)][_0x2da760(0x40a)]:return[fe(_0x199dc9,_0x421f30)];case e['CollaborationEvent'][_0x2da760(0x2cd)]:return[de(_0x199dc9,_0x421f30)];default:return[_0x421f30];}}function le(_0x265422){const _0x3d79ca=_0x51c992;return _0x265422['target'][_0x3d79ca(0x2ee)]==null&&_0x265422[_0x3d79ca(0x280)][_0x3d79ca(0x44c)]===_0x265422['localUnitId']&&!_0x265422[_0x3d79ca(0x184)];}function ue(_0x10d8bb,_0x48b003){const _0x1d6e54=_0x51c992;return{..._0x48b003,'data':(0x0,e[_0x1d6e54(0x225)])(pe(_0x10d8bb,(0x0,e[_0x1d6e54(0x3a5)])(_0x48b003[_0x1d6e54(0x2e1)])))};}function de(_0x104bb5,_0x4d5843){const _0x2d806b=_0x51c992;return{..._0x4d5843,'data':pe(_0x104bb5,_0x4d5843[_0x2d806b(0x2e1)])};}function fe(_0x15102e,_0x4bf32e){const _0x537816=_0x51c992;let _0x2ea62d=_0x4bf32e[_0x537816(0x2e1)];return{..._0x4bf32e,'data':{..._0x2ea62d,'changesets':_0x2ea62d[_0x537816(0x1b9)]['map'](_0x24ef97=>(0x0,e[_0x537816(0x225)])(pe(_0x15102e,(0x0,e[_0x537816(0x3a5)])(_0x24ef97))))}};}function pe(_0x90073f,_0x5e26cc){const _0x79d4ce=_0x51c992;return me(_0x90073f)[_0x79d4ce(0x2c5)](_0x5e26cc,he(_0x90073f));}function me(_0x13af7d){const _0x679ebe=_0x51c992;if(!_0x13af7d[_0x679ebe(0x184)])throw Error('COLLABORATION_CHANGESET_TRANSLATION_REQUIRED');return _0x13af7d[_0x679ebe(0x184)];}function he(_0x3339a7){const _0x14ac1b=_0x51c992;return{'localUnitId':_0x3339a7[_0x14ac1b(0x242)],'unitType':_0x3339a7[_0x14ac1b(0x19c)],'target':_0x3339a7['target']};}let ge=function(_0x1a423c){const _0x319e25=_0x51c992;return _0x1a423c[_0x1a423c[_0x319e25(0x406)]=0x0]=_0x319e25(0x406),_0x1a423c[_0x1a423c[_0x319e25(0x3aa)]=0x1]=_0x319e25(0x3aa),_0x1a423c[_0x1a423c[_0x319e25(0x40d)]=0x2]=_0x319e25(0x40d),_0x1a423c[_0x1a423c['ONLINE']=0x3]='ONLINE',_0x1a423c;}({});const _e={[a['CmdRspCode'][_0x51c992(0x425)]]:_0x51c992(0x3c2),[a['CmdRspCode'][_0x51c992(0x1a1)]]:_0x51c992(0x395),[a[_0x51c992(0x28c)][_0x51c992(0x2f1)]]:_0x51c992(0x441),[a[_0x51c992(0x28c)][_0x51c992(0x2f3)]]:_0x51c992(0x490),[a[_0x51c992(0x28c)]['GLOBAL_ROOMS_CNT_EXCEEDS']]:_0x51c992(0x495)};let ve=class extends t[_0x51c992(0x251)]{get[_0x51c992(0x3ab)](){const _0x413dec=_0x51c992;return this[_0x413dec(0x1e1)][_0x413dec(0x2a8)]();}constructor(_0x59743f,_0x332d33,_0x544092,_0x109538,_0x392908,_0x3be8f8,_0xf9fe9a,_0x77a54c){const _0x52621e=_0x51c992;super(),this[_0x52621e(0x38d)]=_0x59743f,this[_0x52621e(0x396)]=_0x544092,this[_0x52621e(0x214)]=_0x109538,this[_0x52621e(0x2c0)]=_0x392908,this[_0x52621e(0x2c6)]=_0x3be8f8,this[_0x52621e(0x2f5)]=_0xf9fe9a,this['_telemetryService']=_0x77a54c,g(this,_0x52621e(0x1e1),new i[(_0x52621e(0x3f2))](0x0)),g(this,'sessionStatus$',this['_sessionStatus$'][_0x52621e(0x3e3)]()),g(this,_0x52621e(0x1e5),new i['Subject']()),g(this,_0x52621e(0x40b),this[_0x52621e(0x1e5)][_0x52621e(0x3e3)]()),g(this,'_socket',void 0x0),g(this,_0x52621e(0x447),void 0x0),g(this,_0x52621e(0x273),void 0x0),g(this,'_shouldReportTelemetry',!0x1),g(this,_0x52621e(0x3c1),null),this['_shouldReportTelemetry']=!!this[_0x52621e(0x22c)],_0x332d33[_0x52621e(0x3a2)]((0x0,i[_0x52621e(0x2ec)])(this[_0x52621e(0x257)]))[_0x52621e(0x481)](_0x1618e9=>{const _0x1632c1=_0x52621e;if(_0x1618e9!==void 0x0){if(this[_0x1632c1(0x429)]=_0x1618e9,_0x1618e9)this[_0x1632c1(0x1dc)](_0x1618e9),this[_0x1632c1(0x447)]=_0x1618e9[_0x1632c1(0x194)]['subscribe'](_0x359a28=>{const _0x1b6552=_0x1632c1;_0x359a28[_0x1b6552(0x308)]===this[_0x1b6552(0x38d)][_0x1b6552(0x280)]['unitId']&&this[_0x1b6552(0x265)](_0x359a28);});else{var _0x21ae00;this[_0x1632c1(0x332)](),this['_sessionStatus$'][_0x1632c1(0x443)](0x2),(_0x21ae00=this[_0x1632c1(0x447)])==null||_0x21ae00[_0x1632c1(0x2df)](),this[_0x1632c1(0x447)]=null;}}});}[_0x51c992(0x30d)](){const _0x3a945b=_0x51c992;var _0x19baad;return((_0x19baad=this['_socket'])==null?void 0x0:_0x19baad[_0x3a945b(0x44a)])??null;}[_0x51c992(0x37b)](){const _0x5904b7=_0x51c992;super[_0x5904b7(0x37b)](),this[_0x5904b7(0x35f)](),this[_0x5904b7(0x257)]['next'](),this[_0x5904b7(0x257)][_0x5904b7(0x3a9)]();}['close'](){const _0x5c3b59=_0x51c992;var _0x59540b;this[_0x5c3b59(0x332)](),(_0x59540b=this[_0x5c3b59(0x429)])==null||_0x59540b[_0x5c3b59(0x2a9)]({'cmd':a[_0x5c3b59(0x399)][_0x5c3b59(0x442)],'data':{'roomID':this[_0x5c3b59(0x38d)][_0x5c3b59(0x280)]['unitId']}}),this[_0x5c3b59(0x1e5)][_0x5c3b59(0x3a9)](),this[_0x5c3b59(0x1e1)][_0x5c3b59(0x3a9)]();}[_0x51c992(0x265)](_0x47368b){const _0x1e63ad=_0x51c992;_0x47368b[_0x1e63ad(0x19b)]===a[_0x1e63ad(0x399)][_0x1e63ad(0x1af)]?this[_0x1e63ad(0x244)](_0x47368b):_0x47368b[_0x1e63ad(0x19b)]===a[_0x1e63ad(0x399)][_0x1e63ad(0x3ce)]&&this[_0x1e63ad(0x2ae)](_0x47368b);}['_joinRoom'](_0x43c62e){const _0x1a6fed=_0x51c992;this[_0x1a6fed(0x1e1)][_0x1a6fed(0x443)](0x1),_0x43c62e['send']({'cmd':a[_0x1a6fed(0x399)][_0x1a6fed(0x1af)],'routeKey':this[_0x1a6fed(0x38d)][_0x1a6fed(0x280)][_0x1a6fed(0x44c)],'routeType':'','data':{'rooms':[{'roomID':this[_0x1a6fed(0x38d)][_0x1a6fed(0x280)][_0x1a6fed(0x44c)]}]}});}['_onJoinRoomEvent'](_0x2503e7){const _0x37034f=_0x51c992;var _0x4af724;if(_0x2503e7['code']in _e){this[_0x37034f(0x2f5)][_0x37034f(0x3e8)]({'id':_0x37034f(0x237),'data':_e[_0x2503e7[_0x37034f(0x25c)]]}),this[_0x37034f(0x1e1)][_0x37034f(0x443)](0x2);return;}this['_sessionStatus$'][_0x37034f(0x443)](0x3);let _0x32d1de=(_0x4af724=_0x2503e7['data'][_0x37034f(0x1fa)][this['_identity'][_0x37034f(0x280)]['unitId']])==null?void 0x0:_0x4af724[_0x37034f(0x28f)];_0x32d1de&&_0x32d1de[_0x37034f(0x1be)](_0x1139b6=>this[_0x37034f(0x2c0)]['updateMember'](this['_identity'][_0x37034f(0x242)],_0x1139b6));}['_onRecvEvent'](_0x2ae878){const _0xef1b7a=_0x51c992;try{let _0x4eebe2=ce(this['_identity'],_0x2ae878['data']);for(let _0x13703f of _0x4eebe2)switch(_0x13703f[_0xef1b7a(0x309)]){case e[_0xef1b7a(0x496)][_0xef1b7a(0x2c2)]:this[_0xef1b7a(0x493)](_0x13703f),this['_event$'][_0xef1b7a(0x443)](_0x13703f);break;case e[_0xef1b7a(0x496)][_0xef1b7a(0x34e)]:this['_onUserLeave'](_0x13703f),this['_event$']['next'](_0x13703f);break;case e[_0xef1b7a(0x496)]['CHANGESET_ACK']:case e[_0xef1b7a(0x496)][_0xef1b7a(0x2cd)]:this['_stopTelemetryCollaborationNewChangeset'](),this[_0xef1b7a(0x41e)](),this['_event$'][_0xef1b7a(0x443)](_0x13703f);break;case e[_0xef1b7a(0x496)][_0xef1b7a(0x1c6)]:this[_0xef1b7a(0x396)][_0xef1b7a(0x420)](_0xef1b7a(0x24b)+JSON[_0xef1b7a(0x45d)](_0x13703f)),this[_0xef1b7a(0x1e5)][_0xef1b7a(0x443)](_0x13703f);break;case e['CollaborationEvent'][_0xef1b7a(0x2c8)]:this[_0xef1b7a(0x2c6)][_0xef1b7a(0x2aa)](_0x13703f['data']),this['_event$'][_0xef1b7a(0x443)](_0x13703f);break;default:this[_0xef1b7a(0x1e5)][_0xef1b7a(0x443)](_0x13703f);}}catch(_0xc9433a){this[_0xef1b7a(0x396)]['error'](_0xc9433a,_0x2ae878);}}[_0x51c992(0x493)](_0x5136d3){const _0x51e78f=_0x51c992;this[_0x51e78f(0x2c0)][_0x51e78f(0x1eb)](this[_0x51e78f(0x38d)]['localUnitId'],_0x5136d3[_0x51e78f(0x2e1)]);}['_onUserLeave'](_0x2744a5){const _0x3c7d50=_0x51c992;this[_0x3c7d50(0x2c0)]['removeMember'](this[_0x3c7d50(0x38d)][_0x3c7d50(0x242)],_0x2744a5[_0x3c7d50(0x2e1)]['memberID']);}async[_0x51c992(0x2a9)](_0xb10f22,_0x4bd263){const _0x3a41f2=_0x51c992;if(this[_0x3a41f2(0x3ab)]!==0x3||!this[_0x3a41f2(0x429)])throw Error(_0x3a41f2(0x455));try{let _0x2b338d=se(this['_identity'],_0xb10f22);_0x2b338d[_0x3a41f2(0x309)]===e[_0x3a41f2(0x496)]['SUBMIT_CHANGESET']&&(this[_0x3a41f2(0x239)](),this[_0x3a41f2(0x315)](_0x2b338d)),this['_socket'][_0x3a41f2(0x2a9)]({'cmd':a[_0x3a41f2(0x399)][_0x3a41f2(0x37f)],'routeKey':this[_0x3a41f2(0x38d)][_0x3a41f2(0x280)]['unitId'],'routeType':'','data':_0x2b338d});}catch(_0x3e7e56){this['_logService'][_0x3a41f2(0x420)](_0x3e7e56);}}[_0x51c992(0x239)](){const _0x32e721=_0x51c992;this[_0x32e721(0x273)]=setTimeout(()=>{const _0x3301c6=_0x32e721;this['_collaborationTimeoutTimer']=null,this['_collaborationUIEventService'][_0x3301c6(0x3e8)]({'id':_0x3301c6(0x33c)});},this[_0x32e721(0x214)][_0x32e721(0x310)]('HEARTBEAT_TIMEOUT')??0x4e20);}[_0x51c992(0x41e)](){const _0x4fbc67=_0x51c992;this['_collaborationTimeoutTimer']&&=(clearTimeout(this[_0x4fbc67(0x273)]),null);}['_startTelemetryCollaborationNewChangeset'](_0xdd6da1){const _0x212f49=_0x51c992;if(!this[_0x212f49(0x39d)])return;let {data:_0x5b495c}=_0xdd6da1,{unitID:_0x470d16,changeset:_0x1a77e8}=_0x5b495c,{mutations:_0x2dce5f,type:_0x477c31}=_0x1a77e8;this[_0x212f49(0x3c1)]={'unitId':_0x470d16,'type':_0x477c31,'startTime':performance[_0x212f49(0x472)](),'stopTime':0x0,'duration':0x0,'size':te(_0x2dce5f)};}[_0x51c992(0x24d)](){const _0x5a2d23=_0x51c992;if(this['_shouldReportTelemetry']){if(!this[_0x5a2d23(0x3c1)]){this[_0x5a2d23(0x396)][_0x5a2d23(0x420)](_0x5a2d23(0x1d7),_0x5a2d23(0x2fb));return;}this[_0x5a2d23(0x3c1)][_0x5a2d23(0x416)]=performance['now'](),this[_0x5a2d23(0x3c1)][_0x5a2d23(0x3df)]=this['_telemetryInfo']['stopTime']-this['_telemetryInfo'][_0x5a2d23(0x176)],this['_telemetryService'][_0x5a2d23(0x460)]('collaboration_new_changeset',this['_telemetryInfo']),this[_0x5a2d23(0x3c1)]=null;}}[_0x51c992(0x332)](){const _0x11d6bf=_0x51c992;this[_0x11d6bf(0x3c1)]=null;}};ve=y([v(0x2,t[_0x51c992(0x291)]),v(0x3,t[_0x51c992(0x46e)]),v(0x4,(0x0,t['Inject'])(b)),v(0x5,(0x0,t[_0x51c992(0x1ba)])(ae)),v(0x6,(0x0,t['Inject'])(_)),v(0x7,(0x0,t[_0x51c992(0x47e)])(o[_0x51c992(0x205)]))],ve);const x=(0x0,t[_0x51c992(0x2e3)])(_0x51c992(0x44b));function ye(_0x56b8a3){const _0x1d19d7=_0x51c992;return _0x1d19d7(0x17e)+_0x56b8a3;}function be(_0x4dbcae){const _0x1d17b1=_0x51c992;let {unitID:_0x3bfb87,mutations:_0x210123}=_0x4dbcae;return{'unitId':_0x3bfb87,'subUnitId':_0x210123[_0x1d17b1(0x187)]>0x0?_0x210123[0x0][_0x1d17b1(0x2a5)][_0x1d17b1(0x26b)]:null};}let S=class{constructor(_0x3f9894,_0x4efaee,_0x39c671){const _0x1f5936=_0x51c992;this['_injector']=_0x3f9894,this[_0x1f5936(0x364)]=_0x4efaee,this[_0x1f5936(0x2ba)]=_0x39c671;}[_0x51c992(0x24e)](_0x377342){const _0x361d11=_0x51c992;var _0x14da3d,_0x20416b;let _0x9dc1d7=this[_0x361d11(0x4a1)][_0x361d11(0x403)](r[_0x361d11(0x46b)]),{unitId:_0x2d30f9,subUnitId:_0x1976f3}=be(_0x377342),_0x5e7331=_0x9dc1d7==null?void 0x0:_0x9dc1d7[_0x361d11(0x279)](_0x2d30f9)[_0x361d11(0x26e)](),_0x56c600=(_0x14da3d=this[_0x361d11(0x2ba)][_0x361d11(0x2e2)](_0x2d30f9))==null||(_0x14da3d=_0x14da3d[_0x361d11(0x286)]())==null?void 0x0:_0x14da3d[_0x361d11(0x2d6)]();if(_0x5e7331[_0x361d11(0x187)]===0x0||!_0x2d30f9||!_0x1976f3)return;let _0x2c8905=[{'id':r[_0x361d11(0x474)]['id'],'params':{'unitId':_0x2d30f9,'subUnitId':_0x56c600,'selections':t['Tools'][_0x361d11(0x290)](_0x5e7331)}}],_0x540d65=this[_0x361d11(0x364)][_0x361d11(0x262)](_0x377342,_0x2c8905);if(!(0x0,e[_0x361d11(0x21b)])(_0x540d65))throw _0x540d65[_0x361d11(0x420)];let _0x477c2c=(_0x20416b=_0x540d65[_0x361d11(0x1d1)][0x0])==null||(_0x20416b=_0x20416b[_0x361d11(0x2a5)])==null?void 0x0:_0x20416b[_0x361d11(0x30b)];if(Array[_0x361d11(0x29b)](_0x477c2c)&&_0x477c2c['length']){if(_0x477c2c[_0x361d11(0x187)]===_0x2c8905[0x0][_0x361d11(0x2a5)]['selections'][_0x361d11(0x187)]&&_0x477c2c[_0x361d11(0x1cb)]((_0x32740f,_0x3aa5a2)=>t[_0x361d11(0x294)][_0x361d11(0x43b)](_0x32740f[_0x361d11(0x1e4)],_0x2c8905[0x0][_0x361d11(0x2a5)]['selections'][_0x3aa5a2]['range'])))return;this[_0x361d11(0x4a1)][_0x361d11(0x403)](t[_0x361d11(0x48c)])[_0x361d11(0x1f8)](r['SetSelectionsOperation']['id'],{'unitId':_0x2d30f9,'subUnitId':_0x56c600,'selections':_0x477c2c});}}};S=y([v(0x0,(0x0,t[_0x51c992(0x1ba)])(t[_0x51c992(0x401)])),v(0x1,e[_0x51c992(0x354)]),v(0x2,t[_0x51c992(0x1dd)])],S);function _0x3ab5(_0x515c6d,_0x30aaa8){_0x515c6d=_0x515c6d-0x176;const _0x60bff3=_0x60bf();let _0x3ab550=_0x60bff3[_0x515c6d];return _0x3ab550;}const C=(0x0,t[_0x51c992(0x2e3)])(_0x51c992(0x32e));let xe=function(_0xb6e8e1){const _0x14b742=_0x51c992;return _0xb6e8e1[_0xb6e8e1[_0x14b742(0x2b7)]=0x0]=_0x14b742(0x2b7),_0xb6e8e1[_0xb6e8e1[_0x14b742(0x2f2)]=0x1]=_0x14b742(0x2f2),_0xb6e8e1;}({});function Se(_0x5f6e4f){const _0x19832d=_0x51c992;var _0x129e53;return!!((_0x129e53=_0x5f6e4f[_0x19832d(0x2a5)])!=null&&_0x129e53['__splitChunk__']);}const Ce=new Set([r['InsertSheetMutation']['id']]),we=new Set([c['AddSlidePageMutation']['id'],c[_0x51c992(0x40c)]['id'],c[_0x51c992(0x32a)]['id'],c[_0x51c992(0x219)]['id']]);function Te(_0xe8027c,_0x1b04cf=Ce){const _0x3ae594=_0x51c992;let _0x5f00bc=[];for(let _0x5d7750 of _0xe8027c){if(_0x1b04cf[_0x3ae594(0x2d4)](_0x5d7750['id'])){if(_0x5f00bc['length']>0x0)break;_0x5f00bc[_0x3ae594(0x499)](_0x5d7750);break;}if(Se(_0x5d7750)){if(_0x5f00bc['length']>0x0)break;_0x5f00bc[_0x3ae594(0x499)](_0x5d7750);break;}_0x5f00bc['push'](_0x5d7750);}return _0x5f00bc;}function w(_0x10c00f,_0x5144b4,_0x40e328,_0x51a6a8,_0x5e87c4){const _0x363816=_0x51c992;let _0x1de105=Te(_0x10c00f),_0x3ff42b=_0x5e87c4['getCurrentUser'](),_0x531c41=(_0x3ff42b==null?void 0x0:_0x3ff42b['userID'])??_0x363816(0x216),_0x51845e=(_0x3ff42b==null?void 0x0:_0x3ff42b[_0x363816(0x44a)])??_0x363816(0x216);return{'changeset':{'unitID':_0x5144b4,'type':(0x0,e[_0x363816(0x180)])(_0x40e328[_0x363816(0x188)](_0x5144b4)),'baseRev':_0x51a6a8['getCurrentRevOfUnit'](_0x5144b4),'revision':0x0,'userID':_0x531c41,'memberID':_0x51845e,'mutations':_0x1de105},'pendingMutations':_0x10c00f[_0x363816(0x1f1)](_0x1de105[_0x363816(0x187)])};}const Ee=w;function De(_0x2f6f43,_0x53c992,_0x35d1cf,_0x5203b1,_0x163bf8){const _0x5d9783=_0x51c992;let _0x185ace=Te(_0x2f6f43,we),_0x161f46=_0x163bf8[_0x5d9783(0x28d)](),_0x55ad2c=(_0x161f46==null?void 0x0:_0x161f46[_0x5d9783(0x183)])??'unknown',_0x2d0242=(_0x161f46==null?void 0x0:_0x161f46[_0x5d9783(0x44a)])??_0x5d9783(0x216);return{'changeset':{'unitID':_0x53c992,'type':(0x0,e['mapDocumentTypeToUniverInstanceType'])(_0x35d1cf[_0x5d9783(0x188)](_0x53c992)),'baseRev':_0x5203b1['getCurrentRevOfUnit'](_0x53c992),'revision':0x0,'userID':_0x55ad2c,'memberID':_0x2d0242,'mutations':_0x185ace},'pendingMutations':_0x2f6f43[_0x5d9783(0x1f1)](_0x185ace[_0x5d9783(0x187)])};}function Oe(_0x3a4719,_0x3077ab,_0x599cf7,_0x66ab5f,_0x277d6c){const _0x5b4905=_0x51c992;let _0xcdbb4f=_0x3a4719[_0x5b4905(0x42c)]((_0x1de8a8,_0x56f733)=>{const _0x507fea=_0x5b4905;let _0x3a1381=_0x1de8a8[_0x1de8a8['length']-0x1],{id:_0x5c157d}=_0x3a1381??{},{id:_0x39e1f5,type:_0x2f5d10}=_0x56f733,_0x5a7601=_0x56f733[_0x507fea(0x2a5)];if(_0x5c157d&&_0x5c157d!==_0x39e1f5)throw Error('Cannot\x20assemble\x20a\x20changeset\x20from\x20multiple\x20mutations\x20of\x20different\x20types:\x20'+_0x5c157d+_0x507fea(0x485)+_0x39e1f5+'.');if(!_0x3a1381)return[{'id':_0x39e1f5,'type':_0x2f5d10,'params':{'unitId':_0x5a7601[_0x507fea(0x44c)],'textRanges':_0x5a7601[_0x507fea(0x30f)],'actions':_0x5a7601['actions']}}];let _0x1c5457=_0x3a1381[_0x507fea(0x2a5)];return ke(_0x1c5457,_0x5a7601)?[..._0x1de8a8[_0x507fea(0x1f1)](0x0,-0x1),{..._0x3a1381,'id':_0x39e1f5,'type':_0x2f5d10,'params':{'unitId':_0x5a7601[_0x507fea(0x44c)],'textRanges':_0x5a7601[_0x507fea(0x30f)],'actions':t['JSONX']['compose'](_0x1c5457[_0x507fea(0x27c)],_0x5a7601[_0x507fea(0x27c)])}}]:[..._0x1de8a8,{'id':_0x39e1f5,'type':_0x2f5d10,'params':{'unitId':_0x5a7601['unitId'],'textRanges':_0x5a7601['textRanges'],'actions':_0x5a7601['actions']}}];},[]),_0x56ed63=_0x277d6c[_0x5b4905(0x28d)](),_0x5493e4=(_0x56ed63==null?void 0x0:_0x56ed63['userID'])??_0x5b4905(0x216),_0x30c85c=(_0x56ed63==null?void 0x0:_0x56ed63[_0x5b4905(0x44a)])??'unknown';return{'changeset':{'unitID':_0x3077ab,'type':(0x0,e[_0x5b4905(0x180)])(_0x599cf7[_0x5b4905(0x188)](_0x3077ab)),'baseRev':_0x66ab5f[_0x5b4905(0x388)](_0x3077ab),'revision':0x0,'userID':_0x5493e4,'memberID':_0x30c85c,'mutations':_0xcdbb4f},'pendingMutations':_0x3a4719[_0x5b4905(0x1f1)](_0x3a4719[_0x5b4905(0x187)])};}function ke(_0x4e7090,_0x49db5b){const _0x1cd00b=_0x51c992;return!Ae(_0x4e7090)&&!Ae(_0x49db5b)&&je(_0x4e7090[_0x1cd00b(0x27c)],_0x49db5b[_0x1cd00b(0x27c)]);}function _0x60bf(){const _0x3e21ef=['_type','toggleOnline','RETRY_CONNECTING_MAX_COUNT','getOwnPropertyDescriptor','_resendWithTimeout','_prepareTransformSelections','retryConnectingTimer','routeKey','eventID','loadOfflineData','selections','loadPdf','getMemberID','_submitChangeset','textRanges','getConfig','HEARTBEAT','listRoles','CollaborationEntity','_transformStack','_startTelemetryCollaborationNewChangeset','&to=','getLatestCsReqIdBySid','CollaborationSession','NEW_CHANGESETS','Base','object','_lockTransition','[FetchingMissState]:\x20invalid\x20calling\x20to\x20`resend`.','unitInfo$','_createHandler','resolveUnit','create','_univerInstanceService','refreshUnit','action','SheetTransformSelectionsService','_onRemoteChangeset','REMOTE_UNISCRIPT_EXECUTION_ENDPOINT','ReplaySubject','name','MoveSlidePageMutation','10436867wZyTYG','_sendingTimer','sort','univer-pro.collaboration-client.single-active-unit-service','[ConflictState]:\x20invalid\x20calling\x20to\x20`resend`.','subject','copyFileMeta','_throwTelemetryCollaborationNewChangeset','retryConnectingInterval','_unitLoaded$','merge','_tryReconnect','SYNCED','entries','signUrlServerUrl','67388QCHVxk','ImageUploadStatusType','SUBMIT_CHANGESET_TIMEOUT','tables','univer-pro.collaboration-client-socket-service','onTransformState','FETCH_MISSING','setWaitCount','RevisionService','_imageSourceCache','_collaborationPaused','requireSession','INetworkConditionService','4145xlStyd','__Key__','registerDependencies','[CollaborationSocketService]:\x20failed\x20to\x20create\x20socket!','headers','DocCollaborationEntity','registerHTTPInterceptor','USERS_LEAVE','CollaborationStatus','UnitEmbedded','SlideCollaborationEntity','_getDownloadEndpointURL','text-x','ITransformService','sheets','ERROR_IMAGE','_change$','ISingleActiveUnitService','ICollaborationSocketService','Failed\x20to\x20update\x20permission\x20point','_waitCount','appendMutation','pending','set','close','isPermissionRej','loadDoc','_initDependencies','/universer-api/oidc/authpage','_transformService','columnGroups','maxSize','DependentOn','liveShareOperation','fetch_missing','9906oMnNzO','onload','decorate','encrypt','[CollaborationSocketService]:\x20failed\x20to\x20get\x20web\x20socket\x20factory!','_closedUnits','CollaborationImageIoService','socket\x20open.','getResourcesRequest','_incrementRevisionNumber','getUnitOnRev','responseType','pauseCollaboration','[PendingState]:\x20invalid\x20calling\x20to\x20`resend`.','touchDependencies','_collabSessionService','_transformIMECache','dispose','_transformSelections','_onRemoteRetry','localeService','INGEST','_members$','update','_getUploadFileURL','_createInitialState','[SyncedState]:\x20invalid\x20calling\x20to\x20`resend`.','/new_changes','/universer-api/stream/file/upload','UNIVER_BASE','getCurrentRevOfUnit','getTypeOfUnitAdded$','FileSource','error$','_acknowledgedAwaitingRevision','_identity','toggleOffline','/collaborator','IUndoRedoService','_config','_transformStateCache','_initMergeInterceptor','submit\x20changeset\x20error!','session.room-full','_logService','catch','BASE64','CombCmd','enableCollaboration','collaboration-client.config','_initCloseConn','_shouldReportTelemetry','_pendingMutations','PERMISSION_REJ','LocalUndoRedoService','/allowed','pipe','charCodeAt','_getSocketChannel','parseProtocolChangeset','SNAPSHOT_URL_KEY','requestParams','onTransformRemoteChangesetByIMECache','complete','JOINING','sessionStatus','Disposable','_members','PERMISSION_DENIED','CONFLICT_PROCESSING','?size=','_onRemoteRejected','onMissedChangesetFetched','roles','onSyncEditingCollabCursor','_refreshUnitPermission','socketMessageSubscription','AuthzIoHttpService','allowed','DataLoaderService','_changesetSessionId','collaborators','BoardCollaborationEntity','conflict','packageName','awaiting_with_pending','textEncoder','_telemetryInfo','session.join-failed','getLocalCacheKey','getDeserializedSheetBlock','ws://127.0.0.1:8000/universer-api/comb/connect','c1Prime','toRemote','[AuthServerService]:\x20you\x20should\x20provide\x20authentication\x20info\x20on\x20Node.js.','ISocketService','\x0aAfter:\x20','sendChangesetTimeout','localCacheService','_toggleOffline','RECV','createSocket','resend','commentUpdateEvent','UnitStatus','_cfgEnableObjInherit','resolveWithBasePath','_localeService','toString','_HTTPService','filter','_clearScheduledTask','updateOfflineData','LIVESHARE_OPERATION','updateCursorEvent','UNISCRIPT_RUN','_pendingSessions','duration','SHOULD_CLOSE_CONN','[OfflineState]:\x20received\x20rejection.','UUID','asObservable','_commandService','socket$','_sheetTransformSelectionsService','HEARTBEAT_INTERVAL','emitEvent','initWorkbookPermissionChange','getAllMembers','UNIVER_PDF','isTransformChangesetsSuccess','objectID','permissionRejEvent','iterator','toPrimitive','DisposableCollection','BehaviorSubject','UNIVER_BOARD','AWAITING_WITH_PENDING','UNIVER_SHEET','list','[CollaborationState]:\x20apply\x20error!','awaitingChangeset','ImageSourceType','prototype','createInstance','type','DEFAULT_COLLAB_WEB_SOCKET_URL','/universer-api/uniscript','_userManagerService','Edit','Injector','_compressMutationService','get','delete','_fetchMissChangesets','IDLE','symbol','url','setConfig','PSEUDO_FETCH_MISSING_RESULT','event$','EnsureSlideMasterPageMutation','OFFLINE','FetchingMissState','_handlerCallback','IAttachmentIoService','loadBase','&assign=','clearOfflineData','onStarting','_resendTimeout','stopTime','onlyLocal','saveAttachment','&source=','updateSnapshot','COMPRESS_MUTATION_SEND','PERSON','transformStack\x20failed!','_clearCollaborationTimeoutTimer','endpointKey','error','_handler','isTransformMutationsWithChangesetFailure','objectType','joinRsp','FAIL','_onConnectionOpen','setShowComponents','sendHeartbeatTimer','_socket','_commentUpdate$','getCollabEntity$','reduce','addImageSourceCache','toDisposable','objectId','_remoteChangesetQueue','_sender','session','unitLoaded$','status$','_state$','[PendingState]:\x20unhandled\x20univer\x20type:\x20','UNIVER_COLLABORATION_CLIENT_PLUGIN','[FetchingMissState]:\x20received\x20stale\x20ack\x20revision:\x20','UNIVER_SLIDE','SOCKET_FAILED_RETRY','equals','ISnapshotServerService','loadSheet','onRemoteChangeset','fromCollab','debug','session.room-not-exists','LEAVE','next','put','UniverLicensePlugin','_isEchoedAwaitingChangeset','_socketMessageSubscription','_upload','POST','memberID','collaboration-client.local-cache-service','unitId','CollaborationController','onRemoteRej','ObjectPermissionService','authzUrl','_localCacheService','toStringTag','_tryEnsureSocket','call','[CollaborationSession]:\x20should\x20not\x20send\x20message\x20when\x20the\x20session\x20is\x20offline!','status','WorkbookEditablePermission','onRemoteAck','method','add','replace','avatar','stringify','_resendTimer','fetchMissingChangesets','capture','revision','_transitionLocked','CHANGESET_REJ','COLLABORATION_ENDPOINT_INVALID','transformUndoRedo','loadUnitOfRevision','\x0aCurrent:\x20','/role','result','_onOffline','SheetsSelectionsService','_unlockTransition','resolve','IConfigService','3JOqZIc','_substituteUndoStack','SnapshotServerOverHTTPService','now','csRejEvent','SetSelectionsOperation','transformChangesets','UPDATE_CURSOR','startsWith','defineProperty','getAllPermissionPoint','clear','_onFetchMissResult','UNIVER_DOC','accept','Optional','[CollaborationEntity]:\x20initial\x20state\x20has\x20been\x20created\x20before.\x20You\x20should\x20not\x20call\x20\x22init\x22\x20twice.','CollaborationSocketService','subscribe','ConflictState','append','post','\x20-\x20','indexOf','SyncedState','MUTATION','_transformRemoteChangesetByIMECache','[CollaborationSessionService]','_onConnectionFailed','ICommandService','encodeURIComponent','[FetchingMissState]:\x20not\x20expected\x20to\x20receive\x20ack\x20when\x20`this._awaitingChangeset`\x20is\x20null!','findIndex','session.room-permission-denied','objectPermissionTypes','HTTPService','_onUserJoin','_changesetReqId','session.room-cnt-exceeds','CollaborationEvent','_awaitingChangeset','_hasSessionsForEndpoint','push','saveChangeset','addHandlerCallback','COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY','_getAPIPrefix','_roomCreated$','_clearTimeoutTimer','/universer-api/file/{fileID}/sign-url','_injector','HTTPRequest','_transformUndoredo','fetchMiss','UPDATE_PERMISSION_OBJ','LIVESHARE_NEW_HOST','awaiting','_listenToNetworkCondition','size','onTransformIME','_schedule','getAttachmentUrl','_getLoginPath','UserManagerService','editing\x20status\x20changed\x20to','endsWith','startTime','_authzIoService','snapshot','removeMember','subType','_queuedRemoteChangesets','some','floor','unit-cache-','updatePermissionPoint','mapDocumentTypeToUniverInstanceType','updateCollaborator','liveShareNewHost','userID','changeset','file','CollaborationSessionService','length','getUnitType','patch','uploadFileServerUrl','_createSocket','[SyncedState]:\x20received\x20rejection.','socketService','_undoStacks','173784mAcdpr','number','_getRedoStack','_docStateChangeManagerService','_socketService','message$','docStateChange$','onTransformRemoteChangesetByStateCache','[FetchMissState]','/unit/','_showConflictProcessingNotification','default','cmd','unitType','_acknowledgeAwaitingIfReady','/fetchmissing?from=','UniverCollaborationClientPlugin','_executeRemoteChangeset','JOIN_ROOM_FULL','DEFAULT_FILE_NAME','_updateStatus','_prepareConflictRecovery','[OfflineState]:\x20invalid\x20calling\x20to\x20`resend`.','missingChangesets','[CollaborationAttachmentIoService]:\x20failed\x20to\x20upload\x20attachment.','_clearHeartbeatTimer','apply','_roomMembers','_permissionService','sid','CONFLICT','min','JOIN','_rescheduleHeartbeat','_acknowledgeAwaiting','socketReady','_replayCachedMutations','failed\x20to\x20apply\x20missed\x20changesets!','getMember','This\x20method\x20should\x20not\x20be\x20called\x20on\x20the\x20client\x20side!','PdfCollaborationEntity','MentionIoHttpService','changesets','Inject','joinEvent','isInternalEditorID','/-/object/-/batch_allowed','forEach','saveImage','getCollabEntity','fetching\x20the\x20latest\x20document\x20from\x20the\x20server.','SessionStatus','MemberService','onSendChangeset','getImage','MSG_FOR_ERROR','not_collab','getUnitId','/universer-api/authz','onMutationExecutedForCollab','every','_onLocalMutation','delay','SOCKET_FAILED','getSnapshotAPIPath','hasOwnProperty','m2Prime','DRAWING_IMAGE_ALLOW_IMAGE_LIST','baseRev','Plugin','_initRequestHeader','loadSlide','[CollaborationSession]','_snapshotServerService','_networkConditionService','_getSignURL','[PendingState]:\x20received\x20acknowledgement.','_joinRoom','IUniverInstanceService','SUBMIT_CHANGESET','UnitObject','ErrorCode','_sessionStatus$','{fileID}','take','range','_event$','reconnect','HELLO','location','clearUnit','_initUnitPermissionChange','updateMember','_socketChannels','SnapshotService','_sessions','unitDisposed$','CompressMutationService','slice','_createSession','from','_getCtorByUniverInstanceType','_onConflict','onLocalMutation','univer-pro.collaboration-client.network-condition.service','executeCommand','shareReplay','roomInfos','/universer-api/user/session-ticket','_emitMembers','[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.','_onRemoteACK','\x20in\x20_schedule.','CommentService','fromCharCode','_transformRemoteChangesetByStateCache','OfflineState','_exhaustRemoteChangesetQueue','ITelemetryService','state','loadUnit','_getSendChangesetTimeout','_waitForHeartbeatResponse','timeoutTimer','/universer-api/snapshot/','encode','COMPRESS_MUTATION_APPLY','_replaceFileID','retryCount','fetchThroughInterceptors','unit','origin','_applyRemoteChangeset','_configService','values','unknown','supports','316760QxdHWz','RemoveSlidePageMutation','LIVESHARE_FETCH_OPERATIONS','isTransformMutationsWithChangesetSuccess','_updateState','trim','batchAllowed','version','6355948UEhxKj','onRemoteRetry','src','_init','reqId','parseChangesetToProtocol','workbook','[PendingState]:\x20received\x20rejection.','_getConfig','loadBoard','_sendHeartbeat','ICollaborationClientAdapterService','_telemetryService','_scheduleCompleteTimestamp','then','_httpService','_resolveSessionIdentity','map','MergeInterceptorFactory','getTime','firstValueFrom','NOT_COLLAB','418yiizuc','JOIN_ROOM_FAILED','resourceIDs','_scheduleCollaborationTimeoutTimer','REMOTE_UNISCRIPT_EXECUTION_ENDPOINT_KEY','unitID','_transformAndApplyRemoteChangeset','[CollaborationEntity]:\x20cannot\x20apply\x20missing\x20results\x20on\x20other\x20states!','fetching\x20missing\x20changesets\x20from\x20','_revisionService','HEARTBEAT_TIMEOUT','_getUnitPermissionPoints','localUnitId','LOCAL_CACHE_INTERVAL','_onJoinRoomEvent','close$','_undoRedoService','parse','_substituteRedoStack','max','ERROR_IMAGE_TYPE','save\x20fail\x20reason\x20is\x20','downloadEndpointUrl','_stopTelemetryCollaborationNewChangeset','transformSelections','_unitInfo$','href','RxDisposable','LIVESHARE_TERMINATE','body','@univerjs-pro/collaboration-client','IPermissionService','leaveEvent','dispose$','/object/','_status$','_startCollaboration','Board','code','_toggleOnline','CONFLICT_CACHE_CLEAR_FAILED','MentionType','mergeOverrideWithDependencies','reject','transformMutationsWithChangeset','[CollaborationAttachmentIoService]:\x20failed\x20to\x20resolve\x20attachment\x20URL.','/block/','_onCombEvent','57687456psknzA','?url=','cbc','[DataLoaderService]','_clearRetryConnectingTimer','subUnitId','putCollaborators','enableAuthServer','getCurrentSelections','_showConflictNotification','AwaitingWithPendingState','getSheetBlock','_adapter','_collaborationTimeoutTimer','interceptor','enableOfflineEditing','_sessionChannels','OPTIONAL','setCfgEnableObjInherit','getWorkbookSelections','RichTextEditingMutation','c2Prime','actions','_entityInit$','_updateUnitPermissionPoint','backupOfflineData','target','collabWebSocketUrl','LIVESHARE_REQUEST_HOST','CommandType','IAuthzIoService','/-/object/list','getActiveSheet','1.0.4','connection\x20error','OTHER_CLIENT_EDITING','_entities','synced','CmdRspCode','getCurrentUser','_getUndoStack','members','deepClone','ILogService','concatMap','offline','Rectangle','_createInitialStateImpl','loginUrlKey','_maxTotalRetryTimeout','[serializeCombRequest]:\x20should\x20not\x20fall\x20into\x20default\x20branch!','_disableEditing','readyForCollab','isArray','onPrepareTransformSelections','Subject','LocaleService','getTypeOfUnitDisposed$','originalMeta','_getCurrentRevision','mutations','members$','candidateSocket','params','confirm','includes','getValue','send','onCommentUpdate','change$','[CollaborationAttachmentIoService]:\x20attachment\x20exceeds\x20max\x20size.','FileId','_onRecvEvent','OBJECT_PERMISSION_CONFIG_KEY','_redoStacks','_singleActiveUnitService','onMissingChangesets','function','UniverInstanceType','[CollaborationEntity]','init','NO_OTHER_CLIENTS_EDITING','People','online$','_instanceService','title','_clearRedo','_state','_disposed','_registerDependencies','_memberService','_snapshotService','USERS_ENTER','_getAPIPrefixPath','Slide','toLocal','_commentService','collaMsg','COMMENT_UPDATE','Workbook','BaseCollaborationEntity','_removeRoom','_updateLocalCache','CHANGESET_SHOULD_RETRY','COLLABORATION_SESSION_TARGET_UNIT_ID_REQUIRED','CLOSE_ROOM','onTransformSelections','/object','closeSession','LOCAL_CACHE_INTERVAL_KEY','has','concatBytes','getSheetId','disposeWithMe','_decreaseWaiting','_collaborationSessionService','585HRRiKh','editingUnit','string','base-ui.attachment-io.service','_syncEditingCollabCursor','unsubscribe','sessionStatus$','data','getUnit','createIdentifier','[SyncedState]:\x20received\x20acknowledgement.','HEARTBEAT_INTERVAL_KEY','EmptyMutationInfo','SheetPermissionInitController','UnitAction','waitForRoom$','find','UniverNetworkPlugin','takeUntil','getUploadOptions','endpoint','10tRhrKe','IImageIoService','JOIN_ROOM_NOT_EXISTS','OTHER_CLIENTS_EDITING','JOIN_ROOM_PERMISSION_DENIED','[FetchMissState]:\x20missing\x20changesets\x20response\x20still\x20has\x20revision\x20gaps.','_collaborationUIEventService','csAckEvent','_handleRemoteChangesets','CollaborationAttachmentIoService','_checkMissing','blockRanges','telemetry\x20info\x20is\x20not\x20initialized','CollaborationUIEventService','getFocusedUnit','getInterceptPoints','UniverCollaborationPlugin','override'];_0x60bf=function(){return _0x3e21ef;};return _0x60bf();}function Ae(_0x54ace6){return _0x54ace6['isCompositionEnd']!==void 0x0;}function je(_0x28dcc9,_0x19cf50){return Me(_0x28dcc9)&&Me(_0x19cf50)&&!Pe(_0x28dcc9)&&!Pe(_0x19cf50)&&!Ne(_0x28dcc9)&&!Ne(_0x19cf50);}function Me(_0x4636f4){const _0x2aa571=_0x51c992;return Fe(_0x4636f4)[_0x2aa571(0x17c)](_0x254b77=>T(_0x254b77)&&_0x254b77['et']==='text-x');}function Ne(_0x45713d){const _0x4c8df4=_0x51c992;return Fe(_0x45713d)[_0x4c8df4(0x17c)](_0x4694bf=>Array[_0x4c8df4(0x29b)](_0x4694bf)||typeof _0x4694bf==_0x4c8df4(0x2dc)||typeof _0x4694bf==_0x4c8df4(0x190));}function Pe(_0x36825c){const _0x3e65c2=_0x51c992;return Fe(_0x36825c)[_0x3e65c2(0x17c)](_0x4bdcdb=>!T(_0x4bdcdb)||_0x4bdcdb['et']!==_0x3e65c2(0x353)||!Array['isArray'](_0x4bdcdb['e'])?!0x1:_0x4bdcdb['e'][_0x3e65c2(0x17c)](_0x6742a5=>!T(_0x6742a5)||!T(_0x6742a5[_0x3e65c2(0x253)])?!0x1:Object[_0x3e65c2(0x3fa)][_0x3e65c2(0x1d0)][_0x3e65c2(0x454)](_0x6742a5[_0x3e65c2(0x253)],_0x3e65c2(0x33d))||Object[_0x3e65c2(0x3fa)][_0x3e65c2(0x1d0)][_0x3e65c2(0x454)](_0x6742a5[_0x3e65c2(0x253)],_0x3e65c2(0x365))||Object['prototype'][_0x3e65c2(0x1d0)]['call'](_0x6742a5[_0x3e65c2(0x253)],_0x3e65c2(0x2fa))));}function Fe(_0xc0f098){const _0x4eb05a=_0x51c992;if(!Array[_0x4eb05a(0x29b)](_0xc0f098))return[];let _0x3fb27f=_0xc0f098[_0x4eb05a(0x2a7)]('body')?_0xc0f098:_0xc0f098['find'](_0x76b6d9=>Array['isArray'](_0x76b6d9)&&_0x76b6d9[_0x4eb05a(0x2a7)](_0x4eb05a(0x253)));if(!Array['isArray'](_0x3fb27f))return[];let _0x3c43cb=_0x3fb27f[_0x4eb05a(0x486)]('body');return _0x3c43cb===-0x1?[]:_0x3fb27f[_0x4eb05a(0x1f1)](_0x3c43cb+0x1);}function T(_0x5cc325){const _0x3aefe1=_0x51c992;return typeof _0x5cc325==_0x3aefe1(0x31b)&&!!_0x5cc325&&!Array[_0x3aefe1(0x29b)](_0x5cc325);}function Ie(_0x41fc09,_0x41b860){const _0x5d03fa=_0x51c992;let _0x2a8577=new i[(_0x5d03fa(0x328))](0x1);return setTimeout(()=>_0x2a8577[_0x5d03fa(0x443)](_0x41b860),_0x41fc09),_0x2a8577[_0x5d03fa(0x3e3)]()[_0x5d03fa(0x3a2)]((0x0,i[_0x5d03fa(0x1e3)])(0x1));}var Le,Re,ze;let Be=function(_0x4054ac){const _0x1d7116=_0x51c992;return _0x4054ac[_0x1d7116(0x235)]=_0x1d7116(0x1c7),_0x4054ac[_0x1d7116(0x337)]=_0x1d7116(0x28b),_0x4054ac['PENDING']='pending',_0x4054ac['AWAITING']=_0x1d7116(0x4a7),_0x4054ac[_0x1d7116(0x3f4)]=_0x1d7116(0x3bf),_0x4054ac['FETCH_MISS']=_0x1d7116(0x369),_0x4054ac['CONFLICT']='conflict',_0x4054ac['OFFLINE']=_0x1d7116(0x293),_0x4054ac;}({});const Ve=0x4e20,He=0x2bf20;var E=class{constructor(_0x4bb309,_0x5aeebc,_0x529176,_0x58c52e,_0xe8b9ac,_0x55a151,_0xb074d3,_0x3b141a,_0x456dd7){const _0x33a60c=_0x51c992;this[_0x33a60c(0x23b)]=_0x4bb309,this[_0x33a60c(0x3fc)]=_0x5aeebc,this[_0x33a60c(0x421)]=_0xe8b9ac,this['_commandService']=_0x55a151,this['_undoRedoService']=_0xb074d3,this['_revisionService']=_0x3b141a,this['_localCacheService']=_0x456dd7,g(this,'_awaitingChangeset',null),g(this,_0x33a60c(0x39e),[]),this[_0x33a60c(0x497)]=_0x529176,this['_pendingMutations']=_0x58c52e;}[_0x51c992(0x2f9)](_0x481026){const _0x43327a=_0x51c992;let _0x23127d=this[_0x43327a(0x23f)][_0x43327a(0x388)](this[_0x43327a(0x23b)]);return _0x481026[_0x43327a(0x461)]>_0x23127d+0x1&&(this[_0x43327a(0x421)][_0x43327a(0x2b2)]({'from':_0x23127d,'to':_0x481026[_0x43327a(0x461)]-0x1}),!0x0);}[_0x51c992(0x4a3)](_0x141780){const _0x4b087a=_0x51c992;this[_0x4b087a(0x246)][_0x4b087a(0x465)](this['unitID'],_0x141780);}[_0x51c992(0x37c)](_0x12e90c){const _0x518bfc=_0x51c992;var _0xa5d106,_0x3bf1f0;(_0xa5d106=(_0x3bf1f0=this[_0x518bfc(0x421)])[_0x518bfc(0x2d0)])==null||_0xa5d106[_0x518bfc(0x454)](_0x3bf1f0,_0x12e90c);}['_prepareTransformSelections'](_0x15b024){const _0x1b44bf=_0x51c992;var _0xfea5c6,_0x169bde;return((_0xfea5c6=(_0x169bde=this[_0x1b44bf(0x421)])[_0x1b44bf(0x29c)])==null?void 0x0:_0xfea5c6[_0x1b44bf(0x454)](_0x169bde,_0x15b024))??null;}[_0x51c992(0x37a)](_0x4eb9a4){const _0x2100d7=_0x51c992;var _0x1aff26,_0x2ae71a;return(_0x1aff26=(_0x2ae71a=this[_0x2100d7(0x421)])[_0x2100d7(0x4aa)])==null?void 0x0:_0x1aff26['call'](_0x2ae71a,_0x4eb9a4);}[_0x51c992(0x392)](_0x137f2d){const _0x3eb8f0=_0x51c992;var _0x20096e,_0x16f78d;return(_0x20096e=(_0x16f78d=this[_0x3eb8f0(0x421)])['onTransformState'])==null?void 0x0:_0x20096e[_0x3eb8f0(0x454)](_0x16f78d,_0x137f2d);}[_0x51c992(0x489)](_0x2e46b3){const _0x5e9fd3=_0x51c992;var _0x331b5a,_0x5d8295;return((_0x331b5a=(_0x5d8295=this[_0x5e9fd3(0x421)])['onTransformRemoteChangesetByIMECache'])==null?void 0x0:_0x331b5a['call'](_0x5d8295,_0x2e46b3))??_0x2e46b3;}['_transformRemoteChangesetByStateCache'](_0x479094){const _0x50118a=_0x51c992;var _0x4340e5,_0x2b2a53;return((_0x4340e5=(_0x2b2a53=this[_0x50118a(0x421)])[_0x50118a(0x196)])==null?void 0x0:_0x4340e5[_0x50118a(0x454)](_0x2b2a53,_0x479094))??_0x479094;}[_0x51c992(0x2de)](_0x576d14){const _0xca601b=_0x51c992;if(this[_0xca601b(0x3fc)]===t[_0xca601b(0x2b4)]['UNIVER_DOC']){let {unitID:_0x2ff851,mutations:_0x465e64,memberID:_0x264867}=_0x576d14,_0x2c9354=_0x465e64[_0xca601b(0x187)]>0x0?_0x465e64[0x0]['params']['textRanges']:[];if(Array[_0xca601b(0x29b)](_0x2c9354)&&_0x2c9354[_0xca601b(0x187)]>0x0){var _0x52feec,_0x289989;(_0x52feec=(_0x289989=this['_handler'])[_0xca601b(0x3b4)])==null||_0x52feec[_0xca601b(0x454)](_0x289989,{'unitID':_0x2ff851,'memberID':_0x264867,'textRanges':_0x2c9354});}}}[_0x51c992(0x2cc)](){const _0xaa134d=_0x51c992;var _0x5b6f2e;(_0x5b6f2e=this[_0xaa134d(0x451)])==null||_0x5b6f2e[_0xaa134d(0x3da)](this[_0xaa134d(0x23b)],this[_0xaa134d(0x3fc)],this['_awaitingChangeset'],this[_0xaa134d(0x39e)]);}[_0x51c992(0x2a1)](){const _0x3802ce=_0x51c992;return this[_0x3802ce(0x23f)]['getCurrentRevOfUnit'](this[_0x3802ce(0x23b)]);}['_incrementRevisionNumber'](){const _0x2c76b0=_0x51c992;this['_revisionService']['incrementRevOfUnit'](this[_0x2c76b0(0x23b)]);}[_0x51c992(0x1a0)](_0x26a213){const _0xac6726=_0x51c992;let _0x47db18=this[_0xac6726(0x489)](_0x26a213);_0x47db18=this[_0xac6726(0x202)](_0x47db18);let _0x381393=this[_0xac6726(0x306)](_0x47db18),_0x17547c=(0x0,t['sequenceExecute'])(_0x47db18[_0xac6726(0x2a2)],this[_0xac6726(0x3e4)],{'fromCollab':!0x0});if(!_0x17547c[_0xac6726(0x469)])throw _0x381393==null||_0x381393['rollback'](),_0x17547c[_0xac6726(0x420)]instanceof Error?_0x17547c[_0xac6726(0x420)]:Error(_0x17547c['error']??_0xac6726(0x3f7));_0x381393==null||_0x381393['commit'](),this[_0xac6726(0x37a)](_0x47db18),this[_0xac6726(0x392)](_0x47db18),this['_transformUndoredo'](_0x26a213),this[_0xac6726(0x37c)](_0x47db18),this[_0xac6726(0x2de)](_0x47db18),this[_0xac6726(0x373)]();}};let D=class extends E{constructor(_0x40c01c,_0x2d2a0d,_0x1e18b2,_0x39a9ac,_0x2284be,_0x303210,_0x3e6c7f,_0x7d0e0,_0x29b317,_0x57cc7e){const _0x521399=_0x51c992;super(_0x40c01c,_0x2d2a0d,null,[],_0x1e18b2,_0x3e6c7f,_0x303210,_0x39a9ac,_0x57cc7e),this[_0x521399(0x4a1)]=_0x2284be,this[_0x521399(0x396)]=_0x7d0e0,this[_0x521399(0x364)]=_0x29b317,this[_0x521399(0x3cc)]=_0x57cc7e,g(this,_0x521399(0x456),_0x521399(0x28b));}[_0x51c992(0x35c)](_0xfcae97){const _0x1ae72a=_0x51c992;let _0x2348da=this[_0x1ae72a(0x4a1)][_0x1ae72a(0x3fb)](O,this[_0x1ae72a(0x23b)],this[_0x1ae72a(0x3fc)],[_0xfcae97],this['_handler']);return _0x2348da[_0x1ae72a(0x4ab)](),_0x2348da[_0x1ae72a(0x2cc)](),_0x2348da;}[_0x51c992(0x43e)](_0x432ec2){const _0x5e8801=_0x51c992;if(this['_checkMissing'](_0x432ec2))return this[_0x5e8801(0x4a1)][_0x5e8801(0x3fb)](N,this[_0x5e8801(0x23b)],this['type'],null,[],null,[_0x432ec2],this['_handler']);try{let _0x2758b3=this[_0x5e8801(0x364)]['transformMutationsWithChangeset'](_0x432ec2,[e[_0x5e8801(0x2e6)]]);if((0x0,e[_0x5e8801(0x21b)])(_0x2758b3)){let {c1Prime:_0x9b541}=_0x2758b3;return this[_0x5e8801(0x1a0)](_0x9b541),this;}throw _0x2758b3[_0x5e8801(0x420)];}catch(_0x491080){return this[_0x5e8801(0x396)][_0x5e8801(0x420)](_0x491080),this[_0x5e8801(0x1f5)](!0x1);}}[_0x51c992(0x1f5)](_0x24f39c){const _0x447c5d=_0x51c992;return this[_0x447c5d(0x4a1)]['createInstance'](j,this[_0x447c5d(0x23b)],this[_0x447c5d(0x3fc)],null,[],this['_handler'],_0x24f39c);}[_0x51c992(0x458)](_0x49a055){const _0x135c2e=_0x51c992;if(_0x49a055[_0x135c2e(0x461)]<=this[_0x135c2e(0x2a1)]())return this;throw Error(_0x135c2e(0x2e4));}[_0x51c992(0x44e)](){const _0xea515c=_0x51c992;throw Error(_0xea515c(0x18c));}[_0x51c992(0x221)](){return this;}['toggleOffline'](){const _0x52ca75=_0x51c992;return this['_injector'][_0x52ca75(0x3fb)](M,this[_0x52ca75(0x23b)],this[_0x52ca75(0x3fc)],null,[],this[_0x52ca75(0x421)]);}['toggleOnline'](){return this;}[_0x51c992(0x3d0)](){const _0x2f62b8=_0x51c992;throw Error(_0x2f62b8(0x384));}[_0x51c992(0x4a4)](){const _0x3cb776=_0x51c992;let _0x1788c9=this[_0x3cb776(0x23f)]['getCurrentRevOfUnit'](this[_0x3cb776(0x23b)]);return this['_handler'][_0x3cb776(0x2b2)]({'from':_0x1788c9,'to':0x0}),this[_0x3cb776(0x4a1)][_0x3cb776(0x3fb)](N,this['unitID'],this[_0x3cb776(0x3fc)],null,[],null,[],this[_0x3cb776(0x421)]);}};D=y([v(0x3,(0x0,t[_0x51c992(0x1ba)])(e[_0x51c992(0x342)])),v(0x4,(0x0,t[_0x51c992(0x1ba)])(t[_0x51c992(0x401)])),v(0x5,t['IUndoRedoService']),v(0x6,t['ICommandService']),v(0x7,t[_0x51c992(0x291)]),v(0x8,e[_0x51c992(0x354)]),v(0x9,(0x0,t[_0x51c992(0x47e)])(x))],D);let O=Le=class extends E{constructor(_0x5b4cc2,_0x56c11f,_0x567983,_0x84317b,_0x4adb91,_0x189a01,_0x1957a1,_0x56f046,_0x135ef4,_0x4d606e,_0x5de1f6,_0x41f0b0,_0x53c319,_0x179b4d){const _0x137d65=_0x51c992;super(_0x5b4cc2,_0x56c11f,null,_0x567983,_0x84317b,_0x135ef4,_0x53c319,_0x189a01,_0x179b4d),this[_0x137d65(0x4a1)]=_0x4adb91,this[_0x137d65(0x3ff)]=_0x1957a1,this[_0x137d65(0x396)]=_0x56f046,this[_0x137d65(0x214)]=_0x4d606e,this[_0x137d65(0x364)]=_0x5de1f6,this[_0x137d65(0x322)]=_0x41f0b0,g(this,'status',_0x137d65(0x35d)),g(this,_0x137d65(0x22d),null),g(this,_0x137d65(0x32c),null);}[_0x51c992(0x35c)](_0x1405e2){const _0x2cb7c2=_0x51c992;return this[_0x2cb7c2(0x39e)][_0x2cb7c2(0x499)](_0x1405e2),this[_0x2cb7c2(0x2cc)](),this;}[_0x51c992(0x43e)](_0x373d86){const _0x49f85b=_0x51c992;if(this['_checkMissing'](_0x373d86))return this[_0x49f85b(0x3d9)](),this[_0x49f85b(0x4a1)][_0x49f85b(0x3fb)](N,this[_0x49f85b(0x23b)],this[_0x49f85b(0x3fc)],null,this[_0x49f85b(0x39e)],null,[_0x373d86],this[_0x49f85b(0x421)]);try{let _0x38efc3=this[_0x49f85b(0x364)][_0x49f85b(0x262)](_0x373d86,this['_pendingMutations']);if((0x0,e[_0x49f85b(0x21b)])(_0x38efc3)){let {c1Prime:_0x403ca8,m2Prime:_0x34971e}=_0x38efc3;this[_0x49f85b(0x1a0)](_0x403ca8);let _0x2daae2=this[_0x49f85b(0x4a1)][_0x49f85b(0x3fb)](Le,this['unitID'],this[_0x49f85b(0x3fc)],_0x34971e,this[_0x49f85b(0x421)]);this['_clearScheduledTask']();let _0x14e5e9=new Date()[_0x49f85b(0x233)](),_0x448eda=this[_0x49f85b(0x22d)]?Math[_0x49f85b(0x249)](this[_0x49f85b(0x22d)]-_0x14e5e9,0x0):this[_0x49f85b(0x208)]();return _0x2daae2['_schedule'](_0x448eda),_0x2daae2;}throw _0x38efc3[_0x49f85b(0x420)];}catch(_0x280fbd){return this[_0x49f85b(0x396)][_0x49f85b(0x420)](_0x280fbd),this['_onConflict'](!0x1);}}[_0x51c992(0x458)](_0x11f37f){const _0x5e13d4=_0x51c992;if(_0x11f37f[_0x5e13d4(0x461)]<=this[_0x5e13d4(0x2a1)]())return this;throw Error(_0x5e13d4(0x1db));}[_0x51c992(0x44e)](){const _0xc24246=_0x51c992;throw Error(_0xc24246(0x227));}[_0x51c992(0x221)](){return this;}[_0x51c992(0x38e)](){const _0x392537=_0x51c992;return this[_0x392537(0x3d9)](),this[_0x392537(0x4a1)]['createInstance'](M,this[_0x392537(0x23b)],this[_0x392537(0x3fc)],null,this[_0x392537(0x39e)],this[_0x392537(0x421)]);}[_0x51c992(0x302)](){return this;}['_schedule'](_0x54dc92){const _0x2d066a=_0x51c992;let _0x3bf86e=_0x54dc92??this[_0x2d066a(0x208)]();this[_0x2d066a(0x22d)]=new Date()[_0x2d066a(0x233)]()+_0x3bf86e,this[_0x2d066a(0x32c)]=setTimeout(()=>{const _0x3e73a1=_0x2d066a;this[_0x3e73a1(0x3d9)]();let _0x36fc1f=null;switch(this[_0x3e73a1(0x3fc)]){case t[_0x3e73a1(0x2b4)][_0x3e73a1(0x3f5)]:_0x36fc1f=w(this['_pendingMutations'],this[_0x3e73a1(0x23b)],this[_0x3e73a1(0x322)],this[_0x3e73a1(0x23f)],this[_0x3e73a1(0x3ff)]);break;case t[_0x3e73a1(0x2b4)][_0x3e73a1(0x47c)]:_0x36fc1f=this['_pendingMutations'][_0x3e73a1(0x1cb)](_0x3729b0=>_0x3729b0['id']===n['RichTextEditingMutation']['id'])?Oe(this['_pendingMutations'],this[_0x3e73a1(0x23b)],this[_0x3e73a1(0x322)],this[_0x3e73a1(0x23f)],this['_userManagerService']):w(this[_0x3e73a1(0x39e)],this[_0x3e73a1(0x23b)],this['_univerInstanceService'],this[_0x3e73a1(0x23f)],this['_userManagerService']);break;case t[_0x3e73a1(0x2b4)][_0x3e73a1(0x439)]:_0x36fc1f=De(this[_0x3e73a1(0x39e)],this[_0x3e73a1(0x23b)],this[_0x3e73a1(0x322)],this[_0x3e73a1(0x23f)],this[_0x3e73a1(0x3ff)]);break;case t['UniverInstanceType'][_0x3e73a1(0x3eb)]:_0x36fc1f=Ee(this[_0x3e73a1(0x39e)],this[_0x3e73a1(0x23b)],this[_0x3e73a1(0x322)],this['_revisionService'],this[_0x3e73a1(0x3ff)]);break;case t[_0x3e73a1(0x2b4)][_0x3e73a1(0x3f3)]:_0x36fc1f=w(this[_0x3e73a1(0x39e)],this[_0x3e73a1(0x23b)],this[_0x3e73a1(0x322)],this['_revisionService'],this[_0x3e73a1(0x3ff)]);break;case t['UniverInstanceType'][_0x3e73a1(0x387)]:_0x36fc1f=w(this[_0x3e73a1(0x39e)],this['unitID'],this[_0x3e73a1(0x322)],this[_0x3e73a1(0x23f)],this['_userManagerService']);break;default:throw Error(_0x3e73a1(0x436)+this['type']+_0x3e73a1(0x1ff));}let {changeset:_0x50a6ff,pendingMutations:_0x46b4c6}=_0x36fc1f;this['_handler']['onSendChangeset'](_0x50a6ff);let _0x20a62c=_0x46b4c6[_0x3e73a1(0x187)]?this[_0x3e73a1(0x4a1)]['createInstance'](A,this[_0x3e73a1(0x23b)],this[_0x3e73a1(0x3fc)],_0x50a6ff,_0x46b4c6,this['_handler'],void 0x0):this[_0x3e73a1(0x4a1)][_0x3e73a1(0x3fb)](k,this[_0x3e73a1(0x23b)],this[_0x3e73a1(0x3fc)],_0x50a6ff,this['_handler']);_0x20a62c['_updateLocalCache'](),this[_0x3e73a1(0x421)]['onStateChange'](this,_0x20a62c);},_0x3bf86e);}[_0x51c992(0x208)](){const _0xb60b02=_0x51c992;let _0x187996=this[_0xb60b02(0x214)]['getConfig'](m);return(_0x187996==null?void 0x0:_0x187996[_0xb60b02(0x3cb)])??0x7d0;}[_0x51c992(0x3d0)](){const _0x43575e=_0x51c992;throw Error(_0x43575e(0x377));}['_clearScheduledTask'](){const _0x4f313a=_0x51c992;this[_0x4f313a(0x32c)]!=null&&(clearTimeout(this[_0x4f313a(0x32c)]),this[_0x4f313a(0x32c)]=null);}[_0x51c992(0x1f5)](_0x5ba2c3){const _0x4b716f=_0x51c992;return this[_0x4b716f(0x3d9)](),this[_0x4b716f(0x4a1)][_0x4b716f(0x3fb)](j,this[_0x4b716f(0x23b)],this[_0x4b716f(0x3fc)],null,this[_0x4b716f(0x39e)],this['_handler'],_0x5ba2c3);}};O=Le=y([v(0x4,(0x0,t[_0x51c992(0x1ba)])(t[_0x51c992(0x401)])),v(0x5,(0x0,t[_0x51c992(0x1ba)])(e['RevisionService'])),v(0x6,(0x0,t[_0x51c992(0x1ba)])(t[_0x51c992(0x4ae)])),v(0x7,t[_0x51c992(0x291)]),v(0x8,t['ICommandService']),v(0x9,t[_0x51c992(0x46e)]),v(0xa,e['ITransformService']),v(0xb,t[_0x51c992(0x1dd)]),v(0xc,t[_0x51c992(0x390)]),v(0xd,(0x0,t[_0x51c992(0x47e)])(x))],O);let k=Re=class extends E{constructor(_0x246c0a,_0xe22b53,_0x4a9670,_0x3026d8,_0x19a16b,_0x29dd0f,_0x4cf4e8,_0x4dfb2f,_0x2835d3,_0x515bd0,_0x277fe7){const _0x424fd7=_0x51c992;super(_0x246c0a,_0xe22b53,_0x4a9670,[],_0x3026d8,_0x4cf4e8,_0x515bd0,_0x29dd0f,_0x277fe7),this['_injector']=_0x19a16b,this[_0x424fd7(0x396)]=_0x4dfb2f,this[_0x424fd7(0x364)]=_0x2835d3,g(this,_0x424fd7(0x456),'awaiting'),g(this,_0x424fd7(0x415),0x0),g(this,_0x424fd7(0x297),0x0),g(this,_0x424fd7(0x45e),void 0x0),g(this,_0x424fd7(0x431),void 0x0);}[_0x51c992(0x35c)](_0x14a1c5){const _0x427896=_0x51c992;this['_clearScheduledTask']();let _0x25c9bb=this['_injector'][_0x427896(0x3fb)](A,this[_0x427896(0x23b)],this[_0x427896(0x3fc)],this['_awaitingChangeset'],[_0x14a1c5],this[_0x427896(0x421)],this[_0x427896(0x45e)]);return _0x25c9bb['_updateLocalCache'](),_0x25c9bb;}[_0x51c992(0x43e)](_0x410727){const _0x1434ea=_0x51c992;if(this['_checkMissing'](_0x410727))return this[_0x1434ea(0x3d9)](),this[_0x1434ea(0x4a1)][_0x1434ea(0x3fb)](N,this[_0x1434ea(0x23b)],this['type'],this['_awaitingChangeset'],[],null,[_0x410727],this[_0x1434ea(0x421)]);try{let _0x4d1865=this['_transformService'][_0x1434ea(0x475)]([_0x410727],[this['_awaitingChangeset']],!0x1);if((0x0,e[_0x1434ea(0x3ec)])(_0x4d1865)){let {c1Prime:_0x9804fa,c2Prime:_0x3644b0}=_0x4d1865;this[_0x1434ea(0x1a0)](_0x9804fa[0x0]),_0x3644b0[0x0][_0x1434ea(0x1d3)]=this[_0x1434ea(0x2a1)](),this['_clearScheduledTask']();let _0x161a5f=this[_0x1434ea(0x4a1)][_0x1434ea(0x3fb)](Re,this[_0x1434ea(0x23b)],this[_0x1434ea(0x3fc)],_0x3644b0[0x0],this[_0x1434ea(0x421)]);return _0x161a5f[_0x1434ea(0x2cc)](),_0x161a5f;}throw _0x4d1865['error'];}catch(_0x36eca5){return this[_0x1434ea(0x396)][_0x1434ea(0x420)](_0x36eca5),this[_0x1434ea(0x1f5)](!0x1);}}[_0x51c992(0x458)](_0x5723d2){const _0x4a0aa2=_0x51c992;this[_0x4a0aa2(0x3d9)]();let _0xb1a49b=this[_0x4a0aa2(0x23f)][_0x4a0aa2(0x388)](this[_0x4a0aa2(0x23b)]);if(_0x5723d2[_0x4a0aa2(0x461)]<=_0xb1a49b)return this;if(this['_checkMissing'](_0x5723d2))return this[_0x4a0aa2(0x4a1)][_0x4a0aa2(0x3fb)](N,this['unitID'],this[_0x4a0aa2(0x3fc)],this[_0x4a0aa2(0x497)],[],_0x5723d2[_0x4a0aa2(0x461)],[],this[_0x4a0aa2(0x421)]);this[_0x4a0aa2(0x373)]();let _0xba813c=this[_0x4a0aa2(0x4a1)][_0x4a0aa2(0x3fb)](D,this[_0x4a0aa2(0x23b)],this[_0x4a0aa2(0x3fc)],this[_0x4a0aa2(0x421)]);return _0xba813c[_0x4a0aa2(0x2cc)](),_0xba813c;}['onRemoteRej'](_0x4d7697){const _0x3dea02=_0x51c992;return this[_0x3dea02(0x1f5)](!!(_0x4d7697!=null&&_0x4d7697[_0x3dea02(0x360)]));}['onRemoteRetry'](_0x14b3bf){const _0x34960d=_0x51c992;return this[_0x34960d(0x297)]>He?this[_0x34960d(0x38e)]():(this[_0x34960d(0x45e)]=Ie(this['_resendTimeout'],{'timeout':this[_0x34960d(0x415)],'reqId':_0x14b3bf[_0x34960d(0x224)]}),this['_sender']=this[_0x34960d(0x45e)][_0x34960d(0x481)](({reqId:_0x42903a,timeout:_0x52bfdf})=>{this['_resendWithTimeout'](_0x42903a,_0x52bfdf);}),this);}[_0x51c992(0x38e)](){const _0x3dd071=_0x51c992;return this['_clearScheduledTask'](),this[_0x3dd071(0x4a1)][_0x3dd071(0x3fb)](M,this['unitID'],this[_0x3dd071(0x3fc)],this[_0x3dd071(0x497)],[],this['_handler']);}[_0x51c992(0x302)](){return this;}['resend'](){const _0x25e08e=_0x51c992;this[_0x25e08e(0x421)][_0x25e08e(0x1c4)](this[_0x25e08e(0x497)]);}[_0x51c992(0x1f5)](_0x54c698){const _0x1bdef8=_0x51c992;return this[_0x1bdef8(0x3d9)](),this[_0x1bdef8(0x4a1)]['createInstance'](j,this[_0x1bdef8(0x23b)],this[_0x1bdef8(0x3fc)],this['_awaitingChangeset'],[],this['_handler'],_0x54c698);}[_0x51c992(0x305)](_0x4a9cae,_0x206f5d){const _0x4135c9=_0x51c992;var _0x1c0007;_0x4a9cae===((_0x1c0007=this[_0x4135c9(0x497)])==null?void 0x0:_0x1c0007[_0x4135c9(0x224)])&&(this[_0x4135c9(0x3d0)](),this[_0x4135c9(0x415)]=_0x206f5d===0x0?0x3e8:Math[_0x4135c9(0x1ae)](_0x206f5d*0x2,Ve),this[_0x4135c9(0x297)]+=this['_resendTimeout']);}[_0x51c992(0x3d9)](){const _0xdf5285=_0x51c992;var _0x4f927e;(_0x4f927e=this[_0xdf5285(0x431)])==null||_0x4f927e[_0xdf5285(0x2df)](),this[_0xdf5285(0x415)]=0x0,this[_0xdf5285(0x297)]=0x0;}};k=Re=y([v(0x4,(0x0,t[_0x51c992(0x1ba)])(t[_0x51c992(0x401)])),v(0x5,(0x0,t[_0x51c992(0x1ba)])(e[_0x51c992(0x342)])),v(0x6,t[_0x51c992(0x48c)]),v(0x7,t[_0x51c992(0x291)]),v(0x8,e[_0x51c992(0x354)]),v(0x9,t[_0x51c992(0x390)]),v(0xa,(0x0,t['Optional'])(x))],k);let A=ze=class extends E{constructor(_0x1074dc,_0x1cdf9e,_0x55273f,_0x4a5b30,_0x1cfaa3,_0x357dba,_0x7399af,_0x2fb937,_0x564ffc,_0x27c190,_0x378ae1,_0x4e1b35,_0x42dcdf){const _0x4e6c9d=_0x51c992;super(_0x1074dc,_0x1cdf9e,_0x55273f,_0x4a5b30,_0x1cfaa3,_0x564ffc,_0x4e1b35,_0x2fb937,_0x42dcdf),this['_injector']=_0x7399af,this[_0x4e6c9d(0x396)]=_0x27c190,this[_0x4e6c9d(0x364)]=_0x378ae1,this['localCacheService']=_0x42dcdf,g(this,_0x4e6c9d(0x456),_0x4e6c9d(0x3bf)),g(this,_0x4e6c9d(0x415),0x0),g(this,_0x4e6c9d(0x297),0x0),g(this,'_resendTimer',void 0x0),g(this,'_sender',void 0x0),_0x357dba&&(this[_0x4e6c9d(0x45e)]=_0x357dba,this[_0x4e6c9d(0x431)]=this[_0x4e6c9d(0x45e)]['subscribe'](({reqId:_0x4a977d,timeout:_0x441b8e})=>{const _0x4bb7ab=_0x4e6c9d;this[_0x4bb7ab(0x305)](_0x4a977d,_0x441b8e);}));}[_0x51c992(0x35c)](_0x2e526b){const _0x30fbd6=_0x51c992;return this['_pendingMutations'][_0x30fbd6(0x499)](_0x2e526b),this;}['onRemoteChangeset'](_0x3a407e){const _0x28810c=_0x51c992;if(this['_checkMissing'](_0x3a407e))return this[_0x28810c(0x3d9)](),this[_0x28810c(0x4a1)]['createInstance'](N,this[_0x28810c(0x23b)],this[_0x28810c(0x3fc)],this['_awaitingChangeset'],this[_0x28810c(0x39e)],null,[_0x3a407e],this[_0x28810c(0x421)]);try{let _0x1cdd2c=this[_0x28810c(0x364)]['transformChangesets']([_0x3a407e],[this[_0x28810c(0x497)]],!0x1);if((0x0,e[_0x28810c(0x3ec)])(_0x1cdd2c)){let {c1Prime:_0x81fc2,c2Prime:_0x272928}=_0x1cdd2c,_0x1fb399=this[_0x28810c(0x364)][_0x28810c(0x262)](_0x81fc2[0x0],this[_0x28810c(0x39e)]);if((0x0,e[_0x28810c(0x21b)])(_0x1fb399)){let {c1Prime:_0x3347c9,m2Prime:_0x243adc}=_0x1fb399;return this[_0x28810c(0x1a0)](_0x3347c9),_0x272928[0x0][_0x28810c(0x1d3)]=this[_0x28810c(0x2a1)](),this[_0x28810c(0x3d9)](),this[_0x28810c(0x4a1)][_0x28810c(0x3fb)](ze,this[_0x28810c(0x23b)],this[_0x28810c(0x3fc)],_0x272928[0x0],_0x243adc,this[_0x28810c(0x421)],void 0x0);}throw _0x1fb399[_0x28810c(0x420)];}throw _0x1cdd2c[_0x28810c(0x420)];}catch(_0x45c19b){return this[_0x28810c(0x396)]['error'](_0x45c19b),this['_onConflict'](!0x1);}}[_0x51c992(0x458)](_0x4dc351){const _0x503c0a=_0x51c992;this[_0x503c0a(0x3d9)]();let _0x335f63=this[_0x503c0a(0x2a1)]();if(_0x4dc351[_0x503c0a(0x461)]<=_0x335f63)return this;if(this[_0x503c0a(0x2f9)](_0x4dc351))return this[_0x503c0a(0x4a1)][_0x503c0a(0x3fb)](N,this[_0x503c0a(0x23b)],this['type'],this[_0x503c0a(0x497)],this[_0x503c0a(0x39e)],_0x4dc351['revision'],[],this['_handler']);this['_incrementRevisionNumber']();let _0x26ffc5=this[_0x503c0a(0x4a1)]['createInstance'](O,this[_0x503c0a(0x23b)],this['type'],this['_pendingMutations'],this[_0x503c0a(0x421)]);return _0x26ffc5['_schedule'](),_0x26ffc5['_updateLocalCache'](),_0x26ffc5;}[_0x51c992(0x44e)](_0x4adbb2){const _0x50f4cf=_0x51c992;return this[_0x50f4cf(0x1f5)](!!(_0x4adbb2!=null&&_0x4adbb2['isPermissionRej']));}[_0x51c992(0x221)](_0x3587cc){const _0x199a28=_0x51c992;return this[_0x199a28(0x297)]>He?this[_0x199a28(0x38e)]():(this[_0x199a28(0x45e)]=Ie(this[_0x199a28(0x415)],{'timeout':this[_0x199a28(0x415)],'reqId':_0x3587cc['reqId']}),this[_0x199a28(0x431)]=this[_0x199a28(0x45e)][_0x199a28(0x481)](({reqId:_0x1963ea,timeout:_0x1c05ec})=>{const _0x577e93=_0x199a28;this[_0x577e93(0x305)](_0x1963ea,_0x1c05ec);}),this);}[_0x51c992(0x38e)](){const _0x1cf06e=_0x51c992;return this[_0x1cf06e(0x3d9)](),this[_0x1cf06e(0x4a1)][_0x1cf06e(0x3fb)](M,this[_0x1cf06e(0x23b)],this['type'],this[_0x1cf06e(0x497)],this['_pendingMutations'],this['_handler']);}[_0x51c992(0x302)](){return this;}['resend'](){const _0x4413c2=_0x51c992;this['_handler'][_0x4413c2(0x1c4)](this[_0x4413c2(0x497)]);}[_0x51c992(0x1f5)](_0x5a2568){const _0x7da8d7=_0x51c992;return this['_clearScheduledTask'](),this[_0x7da8d7(0x4a1)][_0x7da8d7(0x3fb)](j,this['unitID'],this['type'],null,this[_0x7da8d7(0x39e)],this[_0x7da8d7(0x421)],_0x5a2568);}[_0x51c992(0x305)](_0x1abbf8,_0x5e539a){const _0x4705f7=_0x51c992;var _0x5e7d0e;_0x1abbf8===((_0x5e7d0e=this[_0x4705f7(0x497)])==null?void 0x0:_0x5e7d0e['reqId'])&&(this[_0x4705f7(0x3d0)](),this[_0x4705f7(0x415)]=_0x5e539a===0x0?0x3e8:Math[_0x4705f7(0x1ae)](_0x5e539a*0x2,Ve),this['_maxTotalRetryTimeout']+=this[_0x4705f7(0x415)]);}[_0x51c992(0x3d9)](){const _0x54a2ef=_0x51c992;var _0x4eb1eb;(_0x4eb1eb=this[_0x54a2ef(0x431)])==null||_0x4eb1eb[_0x54a2ef(0x2df)](),this[_0x54a2ef(0x415)]=0x0,this['_maxTotalRetryTimeout']=0x0;}};A=ze=y([v(0x6,(0x0,t[_0x51c992(0x1ba)])(t[_0x51c992(0x401)])),v(0x7,(0x0,t[_0x51c992(0x1ba)])(e[_0x51c992(0x342)])),v(0x8,t[_0x51c992(0x48c)]),v(0x9,t['ILogService']),v(0xa,e[_0x51c992(0x354)]),v(0xb,t[_0x51c992(0x390)]),v(0xc,(0x0,t[_0x51c992(0x47e)])(x))],A);let j=class extends E{constructor(_0x3c732c,_0x7efc6c,_0xce16f3,_0x576b33,_0x331eed,_0x2a6f84=!0x1,_0x5decdd,_0x3749a1,_0x29bd16,_0x4c385b,_0x1cad44,_0x1cdc9b,_0x546d6f){const _0x243661=_0x51c992;super(_0x3c732c,_0x7efc6c,_0xce16f3,_0x576b33,_0x331eed,_0x3749a1,_0x29bd16,_0x4c385b,_0x546d6f),this['_isPermissionRej']=_0x2a6f84,this['_permissionService']=_0x5decdd,this[_0x243661(0x3d5)]=_0x1cad44,this[_0x243661(0x2f5)]=_0x1cdc9b,this[_0x243661(0x3cc)]=_0x546d6f,g(this,'status',_0x243661(0x3bd)),this[_0x243661(0x299)](),this[_0x243661(0x199)](),this[_0x243661(0x1a4)]();}['appendMutation'](){return this;}[_0x51c992(0x43e)](){return this;}[_0x51c992(0x458)](){return this;}[_0x51c992(0x44e)](){return this;}['onRemoteRetry'](){return this;}[_0x51c992(0x38e)](){return this;}[_0x51c992(0x302)](){return this;}[_0x51c992(0x3d0)](){const _0x45e4cb=_0x51c992;throw Error(_0x45e4cb(0x32f));}async['_prepareConflictRecovery'](){const _0x3e3b9d=_0x51c992;var _0x2f7a5d,_0x37f62d;await((_0x2f7a5d=this['_localCacheService'])==null||(_0x37f62d=_0x2f7a5d[_0x3e3b9d(0x27f)])==null?void 0x0:_0x37f62d[_0x3e3b9d(0x454)](_0x2f7a5d,this[_0x3e3b9d(0x23b)],_0x3e3b9d(0x3bd))['catch'](()=>void 0x0));try{var _0x260ee9;await((_0x260ee9=this[_0x3e3b9d(0x451)])==null?void 0x0:_0x260ee9[_0x3e3b9d(0x413)](this['unitID']));}catch{this[_0x3e3b9d(0x2f5)][_0x3e3b9d(0x3e8)]({'id':_0x3e3b9d(0x25e),'unitID':this['unitID']});return;}this['_showConflictNotification']();}['_showConflictProcessingNotification'](){const _0x10f033=_0x51c992;this[_0x10f033(0x2f5)][_0x10f033(0x3e8)]({'id':_0x10f033(0x3af)});}[_0x51c992(0x26f)](){const _0x33e505=_0x51c992;this['_isPermissionRej']?this['_collaborationUIEventService'][_0x33e505(0x3e8)]({'id':_0x33e505(0x3ae)}):this['_collaborationUIEventService']['emitEvent']({'id':'CONFLICT'});}['_disableEditing'](){const _0x34f8c0=_0x51c992;this[_0x34f8c0(0x1ab)][_0x34f8c0(0x17f)](new r['WorkbookEditablePermission'](this[_0x34f8c0(0x23b)])['id'],!0x1);}};j=y([v(0x6,(0x0,t[_0x51c992(0x1ba)])(t[_0x51c992(0x255)])),v(0x7,t[_0x51c992(0x48c)]),v(0x8,t['IUndoRedoService']),v(0x9,(0x0,t[_0x51c992(0x1ba)])(e['RevisionService'])),v(0xa,(0x0,t[_0x51c992(0x1ba)])(t['LocaleService'])),v(0xb,(0x0,t[_0x51c992(0x1ba)])(_)),v(0xc,(0x0,t['Optional'])(x))],j);let M=class extends E{constructor(_0x30d1c0,_0x5c7c32,_0x16fd8e,_0x539fab,_0x8f2acd,_0x36b913,_0x1f431a,_0x1a04ae,_0x1a88a7,_0x22de51){const _0x5ef6bc=_0x51c992;super(_0x30d1c0,_0x5c7c32,_0x16fd8e,_0x539fab,_0x8f2acd,_0x1a04ae,_0x1a88a7,_0x1f431a,_0x22de51),this[_0x5ef6bc(0x4a1)]=_0x36b913,g(this,_0x5ef6bc(0x456),'offline');}[_0x51c992(0x35c)](_0x23235d){const _0x296746=_0x51c992;return this[_0x296746(0x39e)][_0x296746(0x499)](_0x23235d),this[_0x296746(0x2cc)](),this;}[_0x51c992(0x43e)](_0x34c80f){throw Error('[OfflineState]:\x20received\x20changeset.');}['onRemoteAck'](){throw Error('[OfflineState]:\x20received\x20acknowledgement.');}[_0x51c992(0x44e)](){const _0x4b1fa9=_0x51c992;throw Error(_0x4b1fa9(0x3e1));}['onRemoteRetry'](){return this;}[_0x51c992(0x38e)](){return this;}[_0x51c992(0x302)](){const _0x278954=_0x51c992;let {_injector:_0x2028b4,_pendingMutations:_0x49122e,_awaitingChangeset:_0x46dc73,unitID:_0x2dcb7a,_handler:_0x3c1e14,type:_0x314a3a}=this,_0x35c576=Ue(_0x2028b4,_0x2dcb7a,_0x314a3a,_0x46dc73,_0x49122e,_0x3c1e14);return _0x35c576 instanceof O?_0x35c576[_0x278954(0x4ab)]():(_0x35c576 instanceof A||_0x35c576 instanceof k)&&_0x35c576[_0x278954(0x3d0)](),_0x35c576;}[_0x51c992(0x3d0)](){const _0x510aa8=_0x51c992;throw Error(_0x510aa8(0x1a5));}};M=y([v(0x5,(0x0,t[_0x51c992(0x1ba)])(t[_0x51c992(0x401)])),v(0x6,(0x0,t[_0x51c992(0x1ba)])(e[_0x51c992(0x342)])),v(0x7,t[_0x51c992(0x48c)]),v(0x8,t[_0x51c992(0x390)]),v(0x9,(0x0,t[_0x51c992(0x47e)])(x))],M);let N=class extends E{constructor(_0x430e71,_0x2f5e1e,_0x26b6f7,_0x39d590,_0x30cc93,_0x2db25a,_0x21f467,_0x283f83,_0x231752,_0x584586,_0x381b11,_0x45505b,_0x11f525,_0x38fe89){const _0x5338dd=_0x51c992;super(_0x430e71,_0x2f5e1e,_0x26b6f7,_0x39d590,_0x21f467,_0x381b11,_0x45505b,_0x231752,_0x38fe89),this[_0x5338dd(0x38c)]=_0x30cc93,this['_queuedRemoteChangesets']=_0x2db25a,this[_0x5338dd(0x4a1)]=_0x283f83,this['_logService']=_0x584586,this[_0x5338dd(0x364)]=_0x11f525,this['localCacheService']=_0x38fe89,g(this,_0x5338dd(0x456),_0x5338dd(0x369));}[_0x51c992(0x3b2)](_0x12ae72){const _0x4297e9=_0x51c992;try{if(this[_0x4297e9(0x2f7)](_0x12ae72)[_0x4297e9(0x1a6)])throw Error(_0x4297e9(0x2f4));if(this[_0x4297e9(0x2f7)]([...this['_queuedRemoteChangesets']][_0x4297e9(0x32d)]((_0x2edeae,_0x6749f2)=>_0x2edeae[_0x4297e9(0x461)]-_0x6749f2['revision']))[_0x4297e9(0x1a6)])return this[_0x4297e9(0x17b)]=[],this['_updateLocalCache'](),this['_handler'][_0x4297e9(0x2b2)]({'from':this[_0x4297e9(0x2a1)](),'to':0x0}),this;let _0x46eb60=this[_0x4297e9(0x497)],_0x3574c4=this['_pendingMutations'],_0x3d64e0;if(_0x46eb60&&_0x3574c4[_0x4297e9(0x187)]!==0x0)_0x3d64e0=this['_injector']['createInstance'](A,this[_0x4297e9(0x23b)],this[_0x4297e9(0x3fc)],_0x46eb60,_0x3574c4,this[_0x4297e9(0x421)],void 0x0);else{if(_0x46eb60&&_0x3574c4[_0x4297e9(0x187)]===0x0)_0x46eb60[_0x4297e9(0x1d3)]=this[_0x4297e9(0x2a1)](),_0x3d64e0=this[_0x4297e9(0x4a1)][_0x4297e9(0x3fb)](k,this['unitID'],this[_0x4297e9(0x3fc)],_0x46eb60,this[_0x4297e9(0x421)]);else{if(_0x3574c4[_0x4297e9(0x187)]!==0x0){let _0x2b5042=this[_0x4297e9(0x4a1)][_0x4297e9(0x3fb)](O,this[_0x4297e9(0x23b)],this[_0x4297e9(0x3fc)],_0x3574c4,this[_0x4297e9(0x421)]);_0x2b5042[_0x4297e9(0x4ab)](),_0x3d64e0=_0x2b5042;}else _0x3d64e0=this[_0x4297e9(0x4a1)][_0x4297e9(0x3fb)](D,this[_0x4297e9(0x23b)],this[_0x4297e9(0x3fc)],this['_handler']);}}return _0x3d64e0['_updateLocalCache'](),_0x3d64e0;}catch(_0x5926c1){return this[_0x4297e9(0x396)][_0x4297e9(0x420)](_0x4297e9(0x197),_0x4297e9(0x1b4),_0x5926c1),this[_0x4297e9(0x4a1)][_0x4297e9(0x3fb)](j,this[_0x4297e9(0x23b)],this['type'],this['_awaitingChangeset'],this[_0x4297e9(0x39e)],this[_0x4297e9(0x421)],!0x1);}}['_handleRemoteChangesets'](_0x1fa111){const _0xcd615d=_0x51c992;this[_0xcd615d(0x19d)]();for(let _0x4dd0f5=0x0;_0x4dd0f5<_0x1fa111[_0xcd615d(0x187)];_0x4dd0f5++){let _0x4bb712=_0x1fa111[_0x4dd0f5],_0x5b4d4f=this['_getCurrentRevision']();if(!(_0x4bb712['revision']<=_0x5b4d4f)){if(_0x4bb712[_0xcd615d(0x461)]>_0x5b4d4f+0x1)return{'missingChangesets':!0x0};if(this['_isEchoedAwaitingChangeset'](_0x4bb712)){this[_0xcd615d(0x1b1)]();continue;}this[_0xcd615d(0x23c)](_0x4bb712),this[_0xcd615d(0x19d)]();}}return{'missingChangesets':!0x1};}['_transformAndApplyRemoteChangeset'](_0x4d8623){const _0xcb8d45=_0x51c992;let _0x130e55=_0x4d8623,_0x4024a8=this[_0xcb8d45(0x497)];if(_0x4024a8){let _0x53af4f=this[_0xcb8d45(0x364)][_0xcb8d45(0x475)]([_0x4d8623],[_0x4024a8],!0x1);if(!(0x0,e[_0xcb8d45(0x3ec)])(_0x53af4f))throw _0x53af4f[_0xcb8d45(0x420)];_0x130e55=_0x53af4f['c1Prime'][0x0],_0x4024a8=_0x53af4f[_0xcb8d45(0x27b)][0x0];}let _0x46f292=this['_pendingMutations'];if(_0x46f292['length']){let _0x36b9b2=this['_transformService'][_0xcb8d45(0x262)](_0x130e55,_0x46f292);if(!(0x0,e[_0xcb8d45(0x21b)])(_0x36b9b2))throw _0x36b9b2['error'];_0x130e55=_0x36b9b2[_0xcb8d45(0x3c6)],_0x46f292=_0x36b9b2[_0xcb8d45(0x1d1)];}this[_0xcb8d45(0x1a0)](_0x130e55),_0x4024a8&&(_0x4024a8['baseRev']=this['_getCurrentRevision']()),this['_awaitingChangeset']=_0x4024a8,this['_pendingMutations']=_0x46f292;}['_acknowledgeAwaitingIfReady'](){const _0x381aca=_0x51c992;if(!this['_awaitingChangeset']||this['_acknowledgedAwaitingRevision']==null)return;let _0x5ef4ef=this[_0x381aca(0x2a1)]();if(this['_acknowledgedAwaitingRevision']<=_0x5ef4ef)throw Error(_0x381aca(0x438)+this['_acknowledgedAwaitingRevision']+'.');this[_0x381aca(0x38c)]===_0x5ef4ef+0x1&&this['_acknowledgeAwaiting']();}[_0x51c992(0x1b1)](){const _0x2a257b=_0x51c992;this['_incrementRevisionNumber'](),this['_awaitingChangeset']=null,this[_0x2a257b(0x38c)]=null;}[_0x51c992(0x446)](_0x10dcdd){const _0x4ec41c=_0x51c992;let _0x105d01=this[_0x4ec41c(0x497)];return!_0x105d01||!_0x105d01[_0x4ec41c(0x1ac)]||_0x105d01[_0x4ec41c(0x224)]===null||_0x105d01[_0x4ec41c(0x224)]===void 0x0?!0x1:_0x10dcdd['unitID']===_0x105d01[_0x4ec41c(0x23b)]&&_0x10dcdd[_0x4ec41c(0x1ac)]===_0x105d01['sid']&&_0x10dcdd[_0x4ec41c(0x224)]===_0x105d01['reqId'];}[_0x51c992(0x3d0)](){const _0x4589a6=_0x51c992;throw Error(_0x4589a6(0x31d));}[_0x51c992(0x35c)](_0x24dd7e){const _0x122855=_0x51c992;return this[_0x122855(0x39e)][_0x122855(0x499)](_0x24dd7e),this;}[_0x51c992(0x43e)](_0x3ada0c){return this['_queuedRemoteChangesets']['push'](_0x3ada0c),this;}[_0x51c992(0x458)](_0x4a55b6){const _0x15379a=_0x51c992;if(this[_0x15379a(0x497)]){let _0x322bfd=this[_0x15379a(0x2a1)]();return _0x4a55b6[_0x15379a(0x461)]<=_0x322bfd||(_0x322bfd+0x1===_0x4a55b6[_0x15379a(0x461)]?(this['_incrementRevisionNumber'](),this[_0x15379a(0x497)]=null,this[_0x15379a(0x38c)]=null):this[_0x15379a(0x38c)]=_0x4a55b6[_0x15379a(0x461)]),this;}if(_0x4a55b6[_0x15379a(0x461)]<=this[_0x15379a(0x2a1)]())return this;throw Error(_0x15379a(0x48e));}[_0x51c992(0x44e)](_0x5dc207){const _0x1ee985=_0x51c992;return this[_0x1ee985(0x1f5)](!!(_0x5dc207!=null&&_0x5dc207[_0x1ee985(0x360)]));}['onRemoteRetry'](){return this;}[_0x51c992(0x38e)](){const _0x1710d6=_0x51c992;return this['_injector'][_0x1710d6(0x3fb)](M,this[_0x1710d6(0x23b)],this[_0x1710d6(0x3fc)],this[_0x1710d6(0x497)],this[_0x1710d6(0x39e)],this[_0x1710d6(0x421)]);}[_0x51c992(0x302)](){return this;}[_0x51c992(0x1f5)](_0x2bf965){const _0x321559=_0x51c992;return this[_0x321559(0x4a1)][_0x321559(0x3fb)](j,this['unitID'],this[_0x321559(0x3fc)],this['_awaitingChangeset'],this[_0x321559(0x39e)],this[_0x321559(0x421)],_0x2bf965);}};N=y([v(0x7,(0x0,t['Inject'])(t['Injector'])),v(0x8,(0x0,t[_0x51c992(0x1ba)])(e['RevisionService'])),v(0x9,t[_0x51c992(0x291)]),v(0xa,t[_0x51c992(0x48c)]),v(0xb,t['IUndoRedoService']),v(0xc,e[_0x51c992(0x354)]),v(0xd,(0x0,t['Optional'])(x))],N);function Ue(_0x56c24b,_0x82daf5,_0x5974c4,_0x222a1f,_0x176f30,_0x594494){const _0x5504bc=_0x51c992;return _0x222a1f&&_0x176f30[_0x5504bc(0x187)]?_0x56c24b[_0x5504bc(0x3fb)](A,_0x82daf5,_0x5974c4,_0x222a1f,_0x176f30,_0x594494,void 0x0):_0x222a1f?_0x56c24b[_0x5504bc(0x3fb)](k,_0x82daf5,_0x5974c4,_0x222a1f,_0x594494):_0x176f30['length']?_0x56c24b[_0x5504bc(0x3fb)](O,_0x82daf5,_0x5974c4,_0x176f30,_0x594494):_0x56c24b[_0x5504bc(0x3fb)](D,_0x82daf5,_0x5974c4,_0x594494);}let P=class extends t[_0x51c992(0x251)]{get['state'](){return this['_state'];}constructor(_0x3a421f,_0x4c19b4,_0x56b4d0,_0x26a6f0,_0xafed40,_0xc0cf92,_0x5a221a,_0x4d307e,_0x24506f,_0x1eccdb,_0x5cad82,_0x5f0e37,_0x567a7b,_0x34324a){const _0x4c04f0=_0x51c992;super(),this[_0x4c04f0(0x23b)]=_0x3a421f,this[_0x4c04f0(0x432)]=_0x4c19b4,this[_0x4c04f0(0x301)]=_0x56b4d0,this[_0x4c04f0(0x4a1)]=_0x26a6f0,this[_0x4c04f0(0x402)]=_0xafed40,this[_0x4c04f0(0x3d5)]=_0xc0cf92,this['_revisionService']=_0x5a221a,this['_eventService']=_0x4d307e,this[_0x4c04f0(0x322)]=_0x24506f,this['_logService']=_0x1eccdb,this[_0x4c04f0(0x3e4)]=_0x5cad82,this[_0x4c04f0(0x1ab)]=_0x5f0e37,this[_0x4c04f0(0x2b1)]=_0x567a7b,this[_0x4c04f0(0x451)]=_0x34324a,g(this,_0x4c04f0(0x435),new i[(_0x4c04f0(0x3f2))](null)),g(this,'state$',this[_0x4c04f0(0x435)][_0x4c04f0(0x3e3)]()),g(this,'_state',void 0x0),g(this,_0x4c04f0(0x344),!0x1),g(this,_0x4c04f0(0x3ba),''),g(this,_0x4c04f0(0x494),0x0),g(this,_0x4c04f0(0x434),this['state$'][_0x4c04f0(0x3a2)]((0x0,i['map'])(_0x143a08=>_0x143a08?_0x143a08[_0x4c04f0(0x456)]:_0x4c04f0(0x293)),(0x0,i[_0x4c04f0(0x1f9)])({'bufferSize':0x1,'refCount':!0x0}))),g(this,_0x4c04f0(0x462),!0x1),g(this,_0x4c04f0(0x430),[]);}async[_0x51c992(0x2b6)](){const _0x563df0=_0x51c992;if(this[_0x563df0(0x206)])throw Error(_0x563df0(0x47f));await this[_0x563df0(0x223)]();}[_0x51c992(0x376)](){const _0x3d16f1=_0x51c992;return this[_0x3d16f1(0x344)]=!0x0,(0x0,t[_0x3d16f1(0x42e)])(()=>{const _0x2ae6d1=_0x3d16f1;this[_0x2ae6d1(0x344)]=!0x1,this['_exhaustRemoteChangesetQueue']();});}[_0x51c992(0x1f6)](_0x3f36eb){const _0x1287f7=_0x51c992;this[_0x1287f7(0x1cc)](_0x3f36eb);}[_0x51c992(0x21c)](_0x4f942b){const _0x3b70b4=_0x51c992;this[_0x3b70b4(0x2bd)]=_0x4f942b,this[_0x3b70b4(0x435)][_0x3b70b4(0x443)](_0x4f942b);}async[_0x51c992(0x223)](){const _0x1aae5b=_0x51c992;if(this[_0x1aae5b(0x21c)](await this[_0x1aae5b(0x383)]()),this[_0x1aae5b(0x2b1)]){var _0x5a6725;(_0x5a6725=this['_singleActiveUnitService'])==null||_0x5a6725[_0x1aae5b(0x2db)](this[_0x1aae5b(0x23b)]),this[_0x1aae5b(0x2d7)](this[_0x1aae5b(0x2b1)]['getUnitStatus$'](this[_0x1aae5b(0x23b)])['subscribe'](_0x64935a=>{const _0x493c73=_0x1aae5b;this[_0x493c73(0x396)][_0x493c73(0x440)](_0x493c73(0x2b5),_0x493c73(0x4af),_0x64935a),_0x64935a===0x1?(this['_eventService'][_0x493c73(0x3e8)]({'id':'OTHER_CLIENT_EDITING'}),this['_permissionService'][_0x493c73(0x17f)](new r['WorkbookEditablePermission'](this[_0x493c73(0x23b)])['id'],!0x1),this[_0x493c73(0x1ab)][_0x493c73(0x427)](!0x1)):(this[_0x493c73(0x1ab)][_0x493c73(0x17f)](new r[(_0x493c73(0x457))](this['unitID'])['id'],!0x0),this[_0x493c73(0x1ab)][_0x493c73(0x427)](!0x0));}));}let _0x56b66b=!0x1;return this['disposeWithMe'](this[_0x1aae5b(0x432)][_0x1aae5b(0x2e0)][_0x1aae5b(0x481)](_0x5d400c=>{const _0x1d445c=_0x1aae5b;_0x5d400c===0x3?this[_0x1d445c(0x25d)](_0x56b66b):_0x5d400c===0x2&&(_0x56b66b=!0x0,this[_0x1d445c(0x3cd)]());})),this[_0x1aae5b(0x2d7)](this[_0x1aae5b(0x432)][_0x1aae5b(0x40b)]['subscribe'](_0x56431e=>{const _0x10b766=_0x1aae5b;try{switch(_0x56431e[_0x10b766(0x309)]){case e[_0x10b766(0x496)]['NEW_CHANGESETS']:this[_0x10b766(0x326)]((0x0,e['parseProtocolChangeset'])(_0x56431e[_0x10b766(0x2e1)]));break;case e[_0x10b766(0x496)]['CHANGESET_ACK']:this[_0x10b766(0x1fe)](_0x56431e[_0x10b766(0x2e1)]);break;case e[_0x10b766(0x496)][_0x10b766(0x463)]:this['_onRemoteRejected']();break;case e[_0x10b766(0x496)][_0x10b766(0x2cd)]:this[_0x10b766(0x37d)](_0x56431e[_0x10b766(0x2e1)]);break;case e['CollaborationEvent']['PSEUDO_FETCH_MISSING_RESULT']:this[_0x10b766(0x47b)](_0x56431e[_0x10b766(0x2e1)][_0x10b766(0x1b9)][_0x10b766(0x231)](_0x16d9e3=>(0x0,e[_0x10b766(0x3a5)])(_0x16d9e3)));break;case e['CollaborationEvent']['PERMISSION_REJ']:this[_0x10b766(0x3b1)]({'isPermissionRej':!0x0});break;case e['CollaborationEvent'][_0x10b766(0x3dd)]:}}catch(_0x2a5428){throw console[_0x10b766(0x420)]('Error\x20on\x20receiving\x20event',_0x2a5428),_0x2a5428;}})),this[_0x1aae5b(0x2bd)];}[_0x51c992(0x46c)](){this['_transitionLocked']=!0x1;}[_0x51c992(0x31c)](){const _0x369d9b=_0x51c992;if(this[_0x369d9b(0x462)])throw Error(_0x369d9b(0x1fd));this[_0x369d9b(0x462)]=!0x0;}['_onLocalMutation'](_0x2e3a6d){const _0x3aa625=_0x51c992;this[_0x3aa625(0x31c)](),this[_0x3aa625(0x21c)](this[_0x3aa625(0x2bd)][_0x3aa625(0x35c)](_0x2e3a6d)),this[_0x3aa625(0x46c)]();}[_0x51c992(0x326)](_0x1cf938){const _0x1729db=_0x51c992;if(!(_0x1cf938[_0x1729db(0x461)]<=this[_0x1729db(0x23f)][_0x1729db(0x388)](this[_0x1729db(0x23b)]))){if(this[_0x1729db(0x344)]){this[_0x1729db(0x430)][_0x1729db(0x499)](_0x1cf938);return;}this[_0x1729db(0x213)](_0x1cf938);}}[_0x51c992(0x204)](){const _0x598575=_0x51c992;this[_0x598575(0x430)][_0x598575(0x1be)](_0x6d9153=>this[_0x598575(0x213)](_0x6d9153)),this[_0x598575(0x430)]=[];}[_0x51c992(0x213)](_0x18ba61){const _0x1dd471=_0x51c992;let _0x4c2b90=this[_0x1dd471(0x402)][_0x1dd471(0x274)][_0x1dd471(0x210)](this[_0x1dd471(0x402)][_0x1dd471(0x274)]['getInterceptPoints']()[_0x1dd471(0x20d)])(_0x18ba61[_0x1dd471(0x2a2)],null)||_0x18ba61['mutations'],_0x4a59b6={..._0x18ba61,'mutations':_0x4c2b90};this[_0x1dd471(0x31c)](),this['_updateState'](this['_state'][_0x1dd471(0x43e)](_0x4a59b6)),this[_0x1dd471(0x46c)]();}[_0x51c992(0x1fe)](_0xbdc927){const _0xa8ea21=_0x51c992;this[_0xa8ea21(0x31c)](),this[_0xa8ea21(0x21c)](this[_0xa8ea21(0x2bd)][_0xa8ea21(0x458)](_0xbdc927)),this[_0xa8ea21(0x46c)]();}[_0x51c992(0x3b1)](_0x1519db){const _0x284da5=_0x51c992;this['_lockTransition'](),this[_0x284da5(0x21c)](this[_0x284da5(0x2bd)][_0x284da5(0x44e)](_0x1519db)),this[_0x284da5(0x46c)]();}[_0x51c992(0x37d)](_0x33dbc8){const _0x32f1e8=_0x51c992;this[_0x32f1e8(0x31c)](),this[_0x32f1e8(0x21c)](this[_0x32f1e8(0x2bd)][_0x32f1e8(0x221)](_0x33dbc8)),this['_unlockTransition']();}[_0x51c992(0x47b)](_0x5c6a04){const _0x3be0c5=_0x51c992;if(!(this[_0x3be0c5(0x2bd)]instanceof N))throw TypeError(_0x3be0c5(0x23d));let _0x19294f=_0x5c6a04[_0x3be0c5(0x231)](_0x1c8898=>{const _0x1fa1b7=_0x3be0c5;let _0x211117=this[_0x1fa1b7(0x402)][_0x1fa1b7(0x274)][_0x1fa1b7(0x210)](this['_compressMutationService'][_0x1fa1b7(0x274)][_0x1fa1b7(0x2fe)]()[_0x1fa1b7(0x20d)])(_0x1c8898['mutations'],null)||_0x1c8898['mutations'];return{..._0x1c8898,'mutations':_0x211117};});this[_0x3be0c5(0x31c)](),this[_0x3be0c5(0x21c)](this[_0x3be0c5(0x2bd)][_0x3be0c5(0x3b2)](_0x19294f)),this[_0x3be0c5(0x46c)]();}['_toggleOffline'](){const _0xa7d5d6=_0x51c992;this['_lockTransition'](),this[_0xa7d5d6(0x21c)](this['_state'][_0xa7d5d6(0x38e)]()),this[_0xa7d5d6(0x46c)]();}[_0x51c992(0x25d)](_0x13856b=!0x1){const _0x1628fe=_0x51c992;this[_0x1628fe(0x31c)](),this[_0x1628fe(0x21c)](this[_0x1628fe(0x2bd)][_0x1628fe(0x302)]()),this[_0x1628fe(0x46c)]();let _0x2e1376=this[_0x1628fe(0x2bd)];_0x13856b&&_0x2e1376 instanceof D&&(this[_0x1628fe(0x31c)](),this[_0x1628fe(0x21c)](_0x2e1376[_0x1628fe(0x4a4)]()),this[_0x1628fe(0x46c)]());}async[_0x51c992(0x383)](){return new Promise(_0x21c790=>{const _0x4e4f82=_0x3ab5;this[_0x4e4f82(0x432)][_0x4e4f82(0x2e0)][_0x4e4f82(0x3a2)]((0x0,i[_0x4e4f82(0x1e3)])(0x1))[_0x4e4f82(0x481)](async _0x505ce6=>{const _0x1f4e34=_0x4e4f82;_0x21c790(await this[_0x1f4e34(0x295)](_0x505ce6===0x3));});});}[_0x51c992(0x31f)](){let _0x1af68a=this['unitID'];return{'onStateChange':(_0x3a789c,_0x4f44df)=>{const _0x1148db=_0x3ab5;if(_0x3a789c!==this[_0x1148db(0x2bd)])throw Error('[CollaborationEntity]:\x20invalid\x20state\x20transition!\x20State\x20transferred\x20from\x20is\x20not\x20the\x20current\x20state.\x0aBefore:\x20'+_0x3a789c[_0x1148db(0x456)]+_0x1148db(0x3ca)+_0x4f44df['status']+_0x1148db(0x467)+this[_0x1148db(0x2bd)]['status']);this['_updateState'](_0x4f44df);},'onSendChangeset':_0x1e1321=>{const _0x5e50e5=_0x3ab5;_0x1e1321[_0x5e50e5(0x1ac)]||(_0x1e1321[_0x5e50e5(0x1ac)]=this[_0x5e50e5(0x3ba)],_0x1e1321[_0x5e50e5(0x224)]=++this['_changesetReqId']);let _0x53e3df={'eventID':e[_0x5e50e5(0x496)][_0x5e50e5(0x1de)],'data':{'unitID':_0x1e1321[_0x5e50e5(0x23b)],'unitType':this[_0x5e50e5(0x301)],'changeset':_0x1e1321,'memberID':this[_0x5e50e5(0x432)][_0x5e50e5(0x30d)]()}};this[_0x5e50e5(0x432)]['send'](_0x53e3df,this['unitID']);},'onMissingChangesets':({from:_0x289a6f,to:_0x1661a8})=>{const _0x24962e=_0x3ab5;this[_0x24962e(0x396)]['debug'](_0x24962e(0x2b5),_0x24962e(0x23e)+_0x289a6f+'\x20to\x20'+_0x1661a8);let _0x525bad={'eventID':e[_0x24962e(0x496)][_0x24962e(0x340)],'data':{'unitID':_0x1af68a,'unitType':this[_0x24962e(0x301)],'from':_0x289a6f,'to':_0x1661a8}};this['session'][_0x24962e(0x2a9)](_0x525bad,this[_0x24962e(0x23b)]);}};}async[_0x51c992(0x295)](_0x47db5a){const _0x11041a=_0x51c992;var _0x24194e;let _0x1cf1d7=await((_0x24194e=this[_0x11041a(0x451)])==null?void 0x0:_0x24194e[_0x11041a(0x30a)](this[_0x11041a(0x23b)])),_0x2bcd5e=(_0x1cf1d7==null?void 0x0:_0x1cf1d7[_0x11041a(0x2a2)])??[],_0x4b6841=(_0x1cf1d7==null?void 0x0:_0x1cf1d7[_0x11041a(0x3f8)])??null,_0xc51812=!!(_0x4b6841!=null&&_0x4b6841['sid'])&&!!(_0x4b6841!=null&&_0x4b6841[_0x11041a(0x224)]);this[_0x11041a(0x3ba)]=_0xc51812?_0x4b6841[_0x11041a(0x1ac)]:(0x0,e['uuidv4'])(),this[_0x11041a(0x494)]=_0xc51812?_0x4b6841[_0x11041a(0x224)]:0x0;let _0x4604ba=this[_0x11041a(0x23b)];try{this[_0x11041a(0x1b3)](_0x4b6841,_0x2bcd5e);}catch(_0x52b838){this[_0x11041a(0x396)][_0x11041a(0x420)](_0x52b838);}let _0x2dbe45=this[_0x11041a(0x31f)]();if(_0x47db5a){let _0x426479=Ue(this[_0x11041a(0x4a1)],_0x4604ba,this['_type'],_0x4b6841,_0x2bcd5e,_0x2dbe45);return _0x426479 instanceof O?_0x426479['_schedule']():(_0x426479 instanceof A||_0x426479 instanceof k)&&_0x426479[_0x11041a(0x3d0)](),_0x426479;}return this['_injector'][_0x11041a(0x3fb)](M,_0x4604ba,this[_0x11041a(0x301)],_0x4b6841,_0x2bcd5e,_0x2dbe45);}['_replayCachedMutations'](_0x2cc63a,_0x259af1){const _0x45a9e1=_0x51c992;var _0x28e2a7,_0x133626;let _0x2055d5=this['_compressMutationService']['interceptor'][_0x45a9e1(0x210)](this['_compressMutationService'][_0x45a9e1(0x274)][_0x45a9e1(0x2fe)]()[_0x45a9e1(0x20d)]);(_0x28e2a7=_0x2055d5((_0x2cc63a==null?void 0x0:_0x2cc63a[_0x45a9e1(0x2a2)])||[],null))==null||_0x28e2a7['forEach'](_0x15f3e2=>this[_0x45a9e1(0x3e4)][_0x45a9e1(0x1f8)](_0x15f3e2['id'],_0x15f3e2[_0x45a9e1(0x2a5)])),(_0x133626=_0x2055d5(_0x259af1||[],null))==null||_0x133626[_0x45a9e1(0x1be)](_0x184bd7=>this[_0x45a9e1(0x3e4)][_0x45a9e1(0x1f8)](_0x184bd7['id'],_0x184bd7[_0x45a9e1(0x2a5)]));}};P=y([v(0x3,(0x0,t[_0x51c992(0x1ba)])(t['Injector'])),v(0x4,(0x0,t[_0x51c992(0x1ba)])(e[_0x51c992(0x1f0)])),v(0x5,(0x0,t[_0x51c992(0x1ba)])(t[_0x51c992(0x29e)])),v(0x6,(0x0,t['Inject'])(e['RevisionService'])),v(0x7,(0x0,t[_0x51c992(0x1ba)])(_)),v(0x8,t['IUniverInstanceService']),v(0x9,t[_0x51c992(0x291)]),v(0xa,t['ICommandService']),v(0xb,t[_0x51c992(0x255)]),v(0xc,(0x0,t[_0x51c992(0x47e)])(C)),v(0xd,(0x0,t['Optional'])(x))],P);let F=class extends P{constructor(_0xa6d2a5,_0x9b71d7,_0x36aca9,_0x31b9a0,_0x164683,_0x2ba182,_0x315963,_0x8812d7,_0x168a5d,_0x178f88,_0x4160c9,_0x25ad35,_0x2547da,_0xd98bb2,_0x56a5dd){const _0x38bd60=_0x51c992;super(_0xa6d2a5,_0x36aca9,_0x9b71d7,_0x31b9a0,_0x164683,_0x2ba182,_0x315963,_0x8812d7,_0x168a5d,_0x178f88,_0x4160c9,_0x25ad35,_0xd98bb2,_0x56a5dd),this[_0x38bd60(0x23b)]=_0xa6d2a5,this[_0x38bd60(0x3fc)]=_0x9b71d7,this[_0x38bd60(0x192)]=_0x2547da,g(this,_0x38bd60(0x40f),null);}[_0x51c992(0x49b)](_0x438fa8){const _0x4fe58c=_0x51c992;this[_0x4fe58c(0x40f)]=_0x438fa8;}[_0x51c992(0x37b)](){const _0x505037=_0x51c992;this[_0x505037(0x40f)]=null,super[_0x505037(0x37b)]();}[_0x51c992(0x31f)](){const _0x12b22e=_0x51c992;let _0x472e0c=super[_0x12b22e(0x31f)]();return _0x472e0c[_0x12b22e(0x4aa)]=_0x36e73b=>{const _0xc6ab8c=_0x12b22e;var _0x98f2dd,_0x34baca;return(_0x98f2dd=this[_0xc6ab8c(0x40f)])==null||(_0x34baca=_0x98f2dd[_0xc6ab8c(0x4aa)])==null?void 0x0:_0x34baca[_0xc6ab8c(0x454)](_0x98f2dd,_0x36e73b);},_0x472e0c['onTransformState']=_0x228cde=>{const _0x92e9d5=_0x12b22e;var _0xb99196,_0x91c330;return(_0xb99196=this[_0x92e9d5(0x40f)])==null||(_0x91c330=_0xb99196[_0x92e9d5(0x33f)])==null?void 0x0:_0x91c330['call'](_0xb99196,_0x228cde);},_0x472e0c[_0x12b22e(0x29c)]=_0x9e1335=>{const _0x2bf898=_0x12b22e;var _0x5203aa,_0x5e1501;return((_0x5203aa=this['_handlerCallback'])==null||(_0x5e1501=_0x5203aa[_0x2bf898(0x29c)])==null?void 0x0:_0x5e1501[_0x2bf898(0x454)](_0x5203aa,_0x9e1335))??null;},_0x472e0c[_0x12b22e(0x2d0)]=_0x2c9792=>{const _0x2fdf35=_0x12b22e;var _0x2487d9,_0x138ac7;return(_0x2487d9=this[_0x2fdf35(0x40f)])==null||(_0x138ac7=_0x2487d9[_0x2fdf35(0x2d0)])==null?void 0x0:_0x138ac7[_0x2fdf35(0x454)](_0x2487d9,_0x2c9792);},_0x472e0c['onSyncEditingCollabCursor']=_0x11b8de=>{const _0x5eaf11=_0x12b22e;var _0x1a4d6a,_0x259f38;return(_0x1a4d6a=this[_0x5eaf11(0x40f)])==null||(_0x259f38=_0x1a4d6a[_0x5eaf11(0x3b4)])==null?void 0x0:_0x259f38[_0x5eaf11(0x454)](_0x1a4d6a,_0x11b8de);},_0x472e0c[_0x12b22e(0x3a8)]=_0x47213e=>{const _0x42c63b=_0x12b22e;var _0x460fa7,_0x27e298;return((_0x460fa7=this[_0x42c63b(0x40f)])==null||(_0x27e298=_0x460fa7[_0x42c63b(0x3a8)])==null?void 0x0:_0x27e298[_0x42c63b(0x454)](_0x460fa7,_0x47213e))??_0x47213e;},_0x472e0c[_0x12b22e(0x196)]=_0x425730=>{const _0x4bf654=_0x12b22e;var _0x30e766,_0x2a0e35;return((_0x30e766=this[_0x4bf654(0x40f)])==null||(_0x2a0e35=_0x30e766[_0x4bf654(0x196)])==null?void 0x0:_0x2a0e35[_0x4bf654(0x454)](_0x30e766,_0x425730))??_0x425730;},_0x472e0c;}async[_0x51c992(0x223)](){const _0x1207a8=_0x51c992;let _0x4a5ec2=await super[_0x1207a8(0x223)]();return this[_0x1207a8(0x2d7)](this[_0x1207a8(0x192)][_0x1207a8(0x195)][_0x1207a8(0x481)](_0x4cd293=>{const _0x5cbacc=_0x1207a8;if(_0x4cd293==null||_0x4cd293[_0x5cbacc(0x44c)]!==this[_0x5cbacc(0x23b)])return;let {commandId:_0x133560,redoState:_0x2b163d,unitId:_0x358171}=_0x4cd293,_0x4c62d7={'id':_0x133560,'type':t[_0x5cbacc(0x283)][_0x5cbacc(0x488)],'params':{'unitId':_0x358171,'actions':_0x2b163d[_0x5cbacc(0x27c)],'textRanges':null}};this[_0x5cbacc(0x1cc)](_0x4c62d7);})),this[_0x1207a8(0x2d7)](this[_0x1207a8(0x3e4)][_0x1207a8(0x1ca)]((_0x479f02,_0x704dd3)=>{const _0xed864=_0x1207a8;if(_0x479f02['type']!==t['CommandType'][_0xed864(0x488)]||_0x704dd3!=null&&_0x704dd3[_0xed864(0x43f)]||_0x704dd3!=null&&_0x704dd3['onlyLocal']||_0x479f02['id']===n[_0xed864(0x27a)]['id'])return;let _0x320190=_0x479f02['params'];if((_0x320190==null?void 0x0:_0x320190[_0xed864(0x44c)])!==this[_0xed864(0x23b)])return;let _0x402211=_0x479f02,_0x5efa99=this[_0xed864(0x402)]['interceptor'][_0xed864(0x210)](this['_compressMutationService'][_0xed864(0x274)][_0xed864(0x2fe)]()[_0xed864(0x41b)])([_0x402211],this[_0xed864(0x322)])||[_0x402211];this[_0xed864(0x1cc)](_0x5efa99[0x0]);})),_0x4a5ec2;}};F=y([v(0x3,(0x0,t['Inject'])(t[_0x51c992(0x401)])),v(0x4,(0x0,t[_0x51c992(0x1ba)])(e[_0x51c992(0x1f0)])),v(0x5,(0x0,t[_0x51c992(0x1ba)])(t[_0x51c992(0x29e)])),v(0x6,(0x0,t[_0x51c992(0x1ba)])(e[_0x51c992(0x342)])),v(0x7,(0x0,t['Inject'])(_)),v(0x8,t['IUniverInstanceService']),v(0x9,t[_0x51c992(0x291)]),v(0xa,t[_0x51c992(0x48c)]),v(0xb,t[_0x51c992(0x255)]),v(0xc,(0x0,t[_0x51c992(0x1ba)])(n['DocStateChangeManagerService'])),v(0xd,(0x0,t[_0x51c992(0x47e)])(C)),v(0xe,(0x0,t[_0x51c992(0x47e)])(x))],F);let I=class extends P{constructor(_0x56500a,_0x330b54,_0x3b2090,_0x5909d5,_0x17f023,_0x134557,_0x57e365,_0x4c5c51,_0x44a835,_0x56d048,_0xb9bc3a,_0x4c9d8f,_0x48395b,_0x4b3255){const _0x38897d=_0x51c992;super(_0x56500a,_0x3b2090,_0x330b54,_0x5909d5,_0x17f023,_0x134557,_0x57e365,_0x4c5c51,_0x44a835,_0x56d048,_0xb9bc3a,_0x4c9d8f,_0x48395b,_0x4b3255),this['unitID']=_0x56500a,this[_0x38897d(0x3fc)]=_0x330b54;}async['_init'](){const _0x21d788=_0x51c992;let _0x4c520b=await super[_0x21d788(0x223)]();return this[_0x21d788(0x2d7)](this[_0x21d788(0x3e4)][_0x21d788(0x1ca)]((_0x26fe0d,_0x298b3f)=>{const _0x8dcd71=_0x21d788;if(_0x26fe0d[_0x8dcd71(0x3fc)]!==t[_0x8dcd71(0x283)][_0x8dcd71(0x488)]||_0x298b3f!=null&&_0x298b3f[_0x8dcd71(0x43f)]||_0x298b3f!=null&&_0x298b3f['onlyLocal'])return;let _0x1b30c0=_0x26fe0d['params'];if((_0x1b30c0==null?void 0x0:_0x1b30c0[_0x8dcd71(0x44c)])!==this['unitID'])return;let _0x8f2c3f=_0x26fe0d,_0x368735=this[_0x8dcd71(0x402)][_0x8dcd71(0x274)][_0x8dcd71(0x210)](this[_0x8dcd71(0x402)][_0x8dcd71(0x274)][_0x8dcd71(0x2fe)]()[_0x8dcd71(0x41b)])([_0x8f2c3f],this[_0x8dcd71(0x322)])||[_0x8f2c3f];this[_0x8dcd71(0x1cc)](_0x368735[0x0]);})),_0x4c520b;}};I=y([v(0x3,(0x0,t[_0x51c992(0x1ba)])(t[_0x51c992(0x401)])),v(0x4,(0x0,t[_0x51c992(0x1ba)])(e['CompressMutationService'])),v(0x5,(0x0,t['Inject'])(t[_0x51c992(0x29e)])),v(0x6,(0x0,t['Inject'])(e[_0x51c992(0x342)])),v(0x7,(0x0,t[_0x51c992(0x1ba)])(_)),v(0x8,t[_0x51c992(0x1dd)]),v(0x9,t[_0x51c992(0x291)]),v(0xa,t[_0x51c992(0x48c)]),v(0xb,t[_0x51c992(0x255)]),v(0xc,(0x0,t['Optional'])(C)),v(0xd,(0x0,t[_0x51c992(0x47e)])(x))],I);let L=class extends P{constructor(_0x1a95e6,_0x52ff4c,_0x19d3ad,_0x34df9f,_0x530c70,_0x1b7eaf,_0x55ed53,_0x14f1db,_0xaf56bd,_0x5a27a7,_0x1514c3,_0x54e9ed,_0x38121a,_0xf342f9,_0x2c3146){const _0x3a22d1=_0x51c992;super(_0x1a95e6,_0x19d3ad,_0x52ff4c,_0x34df9f,_0x530c70,_0x1b7eaf,_0x55ed53,_0xaf56bd,_0x5a27a7,_0x1514c3,_0x54e9ed,_0x38121a,_0xf342f9,_0x2c3146),this[_0x3a22d1(0x23b)]=_0x1a95e6,this[_0x3a22d1(0x3fc)]=_0x52ff4c,this[_0x3a22d1(0x3e6)]=_0x14f1db;}[_0x51c992(0x31f)](){const _0xeb8d04=_0x51c992;let _0x5b3ad2=super['_createHandler']();return _0x5b3ad2[_0xeb8d04(0x2d0)]=_0x5a9f80=>this[_0xeb8d04(0x3e6)][_0xeb8d04(0x24e)](_0x5a9f80),_0x5b3ad2;}async[_0x51c992(0x223)](){const _0x298e3e=_0x51c992;let _0x62405e=await super[_0x298e3e(0x223)]();return this[_0x298e3e(0x2d7)](this[_0x298e3e(0x3e4)][_0x298e3e(0x1ca)]((_0x46f616,_0x4d3c92)=>{const _0x210659=_0x298e3e;if(_0x46f616[_0x210659(0x3fc)]!==t['CommandType'][_0x210659(0x488)]||_0x4d3c92!=null&&_0x4d3c92[_0x210659(0x43f)]||_0x4d3c92!=null&&_0x4d3c92[_0x210659(0x417)])return;let _0x5c4020=_0x46f616[_0x210659(0x2a5)];if((_0x5c4020==null?void 0x0:_0x5c4020[_0x210659(0x44c)])!==this[_0x210659(0x23b)])return;let _0x1a29df=_0x46f616,_0x357b66=this[_0x210659(0x402)][_0x210659(0x274)][_0x210659(0x210)](this[_0x210659(0x402)][_0x210659(0x274)][_0x210659(0x2fe)]()[_0x210659(0x41b)])([_0x1a29df],this[_0x210659(0x322)])||[_0x1a29df];this[_0x210659(0x1cc)](_0x357b66[0x0]);})),_0x62405e;}};L=y([v(0x3,(0x0,t['Inject'])(t[_0x51c992(0x401)])),v(0x4,(0x0,t[_0x51c992(0x1ba)])(e[_0x51c992(0x1f0)])),v(0x5,(0x0,t['Inject'])(t[_0x51c992(0x29e)])),v(0x6,(0x0,t['Inject'])(e[_0x51c992(0x342)])),v(0x7,(0x0,t[_0x51c992(0x1ba)])(S)),v(0x8,(0x0,t[_0x51c992(0x1ba)])(_)),v(0x9,t['IUniverInstanceService']),v(0xa,t['ILogService']),v(0xb,t[_0x51c992(0x48c)]),v(0xc,t[_0x51c992(0x255)]),v(0xd,(0x0,t[_0x51c992(0x47e)])(C)),v(0xe,(0x0,t[_0x51c992(0x47e)])(x))],L);let R=class extends P{constructor(_0x4ba393,_0x2c050c,_0x3facce,_0x124d54,_0x18f7d0,_0x2d1794,_0x250655,_0x544f0e,_0x4c35ae,_0x124621,_0x4e34a9,_0x28acb4,_0x52fd80,_0x18c375){const _0xabf747=_0x51c992;super(_0x4ba393,_0x3facce,_0x2c050c,_0x124d54,_0x18f7d0,_0x2d1794,_0x250655,_0x544f0e,_0x4c35ae,_0x124621,_0x4e34a9,_0x28acb4,_0x52fd80,_0x18c375),this[_0xabf747(0x23b)]=_0x4ba393,this[_0xabf747(0x3fc)]=_0x2c050c;}async['_init'](){const _0xac2454=_0x51c992;let _0x5b012b=await super[_0xac2454(0x223)]();return this['disposeWithMe'](this[_0xac2454(0x3e4)][_0xac2454(0x1ca)]((_0x144355,_0x1fbee2)=>{const _0x5b2a1d=_0xac2454;if(_0x144355[_0x5b2a1d(0x3fc)]!==t['CommandType']['MUTATION']||_0x1fbee2!=null&&_0x1fbee2[_0x5b2a1d(0x43f)]||_0x1fbee2!=null&&_0x1fbee2[_0x5b2a1d(0x417)])return;let _0x4625db=_0x144355[_0x5b2a1d(0x2a5)];if((_0x4625db==null?void 0x0:_0x4625db['unitId'])!==this[_0x5b2a1d(0x23b)])return;let _0x1ffba8=_0x144355,_0x122989=this['_compressMutationService'][_0x5b2a1d(0x274)][_0x5b2a1d(0x210)](this[_0x5b2a1d(0x402)][_0x5b2a1d(0x274)]['getInterceptPoints']()[_0x5b2a1d(0x41b)])([_0x1ffba8],this[_0x5b2a1d(0x322)])||[_0x1ffba8];this[_0x5b2a1d(0x1cc)](_0x122989[0x0]);})),_0x5b012b;}};R=y([v(0x3,(0x0,t['Inject'])(t[_0x51c992(0x401)])),v(0x4,(0x0,t[_0x51c992(0x1ba)])(e[_0x51c992(0x1f0)])),v(0x5,(0x0,t[_0x51c992(0x1ba)])(t['LocaleService'])),v(0x6,(0x0,t[_0x51c992(0x1ba)])(e[_0x51c992(0x342)])),v(0x7,(0x0,t[_0x51c992(0x1ba)])(_)),v(0x8,t[_0x51c992(0x1dd)]),v(0x9,t[_0x51c992(0x291)]),v(0xa,t['ICommandService']),v(0xb,t['IPermissionService']),v(0xc,(0x0,t[_0x51c992(0x47e)])(C)),v(0xd,(0x0,t[_0x51c992(0x47e)])(x))],R);let z=class extends P{constructor(_0x6df323,_0x1cdc87,_0x29c3bf,_0x1ab627,_0x2a4d66,_0x5cb0ee,_0x12d33c,_0x5c2c9c,_0xf5cf0,_0x1bad75,_0x2e6e8f,_0x2b79a0,_0x5a9b76,_0x342304){const _0x300911=_0x51c992;super(_0x6df323,_0x29c3bf,_0x1cdc87,_0x1ab627,_0x2a4d66,_0x5cb0ee,_0x12d33c,_0x5c2c9c,_0xf5cf0,_0x1bad75,_0x2e6e8f,_0x2b79a0,_0x5a9b76,_0x342304),this['unitID']=_0x6df323,this[_0x300911(0x3fc)]=_0x1cdc87;}async[_0x51c992(0x223)](){const _0x394f4b=_0x51c992;let _0x335bb2=await super[_0x394f4b(0x223)]();return this['disposeWithMe'](this[_0x394f4b(0x3e4)][_0x394f4b(0x1ca)]((_0x443cf8,_0x1c2463)=>{const _0x1d32e3=_0x394f4b;if(_0x443cf8[_0x1d32e3(0x3fc)]!==t[_0x1d32e3(0x283)][_0x1d32e3(0x488)]||_0x1c2463!=null&&_0x1c2463[_0x1d32e3(0x43f)]||_0x1c2463!=null&&_0x1c2463[_0x1d32e3(0x417)])return;let _0x42f638=_0x443cf8['params'];if((_0x42f638==null?void 0x0:_0x42f638['unitId'])!==this[_0x1d32e3(0x23b)])return;let _0xcf01ff=_0x443cf8,_0x1bdbd7=this['_compressMutationService']['interceptor'][_0x1d32e3(0x210)](this[_0x1d32e3(0x402)]['interceptor'][_0x1d32e3(0x2fe)]()['COMPRESS_MUTATION_SEND'])([_0xcf01ff],this[_0x1d32e3(0x322)])||[_0xcf01ff];this[_0x1d32e3(0x1cc)](_0x1bdbd7[0x0]);})),_0x335bb2;}};z=y([v(0x3,(0x0,t[_0x51c992(0x1ba)])(t[_0x51c992(0x401)])),v(0x4,(0x0,t[_0x51c992(0x1ba)])(e[_0x51c992(0x1f0)])),v(0x5,(0x0,t['Inject'])(t[_0x51c992(0x29e)])),v(0x6,(0x0,t['Inject'])(e[_0x51c992(0x342)])),v(0x7,(0x0,t['Inject'])(_)),v(0x8,t[_0x51c992(0x1dd)]),v(0x9,t[_0x51c992(0x291)]),v(0xa,t[_0x51c992(0x48c)]),v(0xb,t[_0x51c992(0x255)]),v(0xc,(0x0,t['Optional'])(C)),v(0xd,(0x0,t['Optional'])(x))],z);let B=class extends P{constructor(_0x4af697,_0x7ee5e5,_0x1d4ad1,_0x39dd5e,_0x2786ef,_0x5776d1,_0x3aef2b,_0x50d545,_0x50a873,_0x357e4a,_0x114bf6,_0x50d231,_0x437091,_0x470eb9){const _0x3dec0d=_0x51c992;super(_0x4af697,_0x1d4ad1,_0x7ee5e5,_0x39dd5e,_0x2786ef,_0x5776d1,_0x3aef2b,_0x50d545,_0x50a873,_0x357e4a,_0x114bf6,_0x50d231,_0x437091,_0x470eb9),this[_0x3dec0d(0x23b)]=_0x4af697,this[_0x3dec0d(0x3fc)]=_0x7ee5e5;}async[_0x51c992(0x223)](){const _0x485434=_0x51c992;let _0x353bad=await super['_init']();return this[_0x485434(0x2d7)](this[_0x485434(0x3e4)]['onMutationExecutedForCollab']((_0x13ae5c,_0x5be509)=>{const _0x490030=_0x485434;if(_0x13ae5c['type']!==t['CommandType'][_0x490030(0x488)]||_0x5be509!=null&&_0x5be509['fromCollab']||_0x5be509!=null&&_0x5be509[_0x490030(0x417)])return;let _0xea1c8c=_0x13ae5c[_0x490030(0x2a5)];if((_0xea1c8c==null?void 0x0:_0xea1c8c[_0x490030(0x44c)])!==this[_0x490030(0x23b)])return;let _0x91cac3=_0x13ae5c,_0x54fa9b=this[_0x490030(0x402)]['interceptor']['fetchThroughInterceptors'](this[_0x490030(0x402)]['interceptor'][_0x490030(0x2fe)]()[_0x490030(0x41b)])([_0x91cac3],this[_0x490030(0x322)])||[_0x91cac3];this[_0x490030(0x1cc)](_0x54fa9b[0x0]);})),_0x353bad;}};B=y([v(0x3,(0x0,t['Inject'])(t[_0x51c992(0x401)])),v(0x4,(0x0,t['Inject'])(e[_0x51c992(0x1f0)])),v(0x5,(0x0,t[_0x51c992(0x1ba)])(t['LocaleService'])),v(0x6,(0x0,t[_0x51c992(0x1ba)])(e[_0x51c992(0x342)])),v(0x7,(0x0,t['Inject'])(_)),v(0x8,t[_0x51c992(0x1dd)]),v(0x9,t['ILogService']),v(0xa,t[_0x51c992(0x48c)]),v(0xb,t['IPermissionService']),v(0xc,(0x0,t[_0x51c992(0x47e)])(C)),v(0xd,(0x0,t[_0x51c992(0x47e)])(x))],B);const We=(0x0,t['createIdentifier'])(_0x51c992(0x1f7));function Ge(_0x551367){const _0x42afb3=_0x51c992;let _0x1f371c=_0x551367[_0x42afb3(0x2e1)],_0x2f6993=JSON[_0x42afb3(0x247)](_0x1f371c);switch(_0x2f6993[_0x42afb3(0x19b)]){case a[_0x42afb3(0x399)]['HEARTBEAT']:case a['CombCmd'][_0x42afb3(0x1e7)]:{let _0x403bdf=_0x2f6993['infoRsp'];return{..._0x2f6993,'data':_0x403bdf,'cmd':_0x2f6993[_0x42afb3(0x19b)]};}case a[_0x42afb3(0x399)][_0x42afb3(0x1af)]:{let _0x3dc1fb=_0x2f6993[_0x42afb3(0x424)];return{..._0x2f6993,'data':_0x3dc1fb,'cmd':_0x2f6993['cmd']};}case a[_0x42afb3(0x399)]['RECV']:{let _0x350c65=_0x2f6993[_0x42afb3(0x2c7)];switch(_0x350c65[_0x42afb3(0x309)]){case e[_0x42afb3(0x496)][_0x42afb3(0x39f)]:var _0x2cad05;return{..._0x2f6993,'data':{..._0x350c65,'data':(_0x2cad05=_0x350c65[_0x42afb3(0x3ee)])==null?void 0x0:_0x2cad05['cs']},'cmd':_0x2f6993[_0x42afb3(0x19b)]};case e[_0x42afb3(0x496)]['CHANGESET_ACK']:var _0x5e8ed4;return{..._0x2f6993,'data':{..._0x350c65,'data':(_0x5e8ed4=_0x350c65[_0x42afb3(0x2f6)])==null?void 0x0:_0x5e8ed4['cs']},'cmd':_0x2f6993['cmd']};case e[_0x42afb3(0x496)][_0x42afb3(0x319)]:var _0x4b7599;return{..._0x2f6993,'data':{..._0x350c65,'data':(_0x4b7599=_0x350c65['newCsEvent'])==null?void 0x0:_0x4b7599['cs']},'cmd':_0x2f6993[_0x42afb3(0x19b)]};case e[_0x42afb3(0x496)][_0x42afb3(0x463)]:var _0x36f9cc;return{..._0x2f6993,'data':{..._0x350c65,'data':(_0x36f9cc=_0x350c65[_0x42afb3(0x473)])==null?void 0x0:_0x36f9cc['cs']},'cmd':_0x2f6993[_0x42afb3(0x19b)]};case e[_0x42afb3(0x496)][_0x42afb3(0x2cd)]:var _0x304c81;return{..._0x2f6993,'data':{..._0x350c65,'data':(_0x304c81=_0x350c65['csShouldRetryEvent'])==null?void 0x0:_0x304c81['cs']},'cmd':_0x2f6993[_0x42afb3(0x19b)]};case e[_0x42afb3(0x496)][_0x42afb3(0x476)]:return{..._0x2f6993,'data':{..._0x350c65,'data':_0x350c65[_0x42afb3(0x3dc)]},'cmd':_0x2f6993[_0x42afb3(0x19b)]};case e[_0x42afb3(0x496)]['USERS_ENTER']:return{..._0x2f6993,'data':{..._0x350c65,'data':_0x350c65[_0x42afb3(0x1bb)]},'cmd':_0x2f6993['cmd']};case e[_0x42afb3(0x496)]['USERS_LEAVE']:return{..._0x2f6993,'data':{..._0x350c65,'data':_0x350c65[_0x42afb3(0x256)]},'cmd':_0x2f6993[_0x42afb3(0x19b)]};case e[_0x42afb3(0x496)][_0x42afb3(0x4a6)]:return{..._0x2f6993,'data':{..._0x350c65,'data':_0x350c65[_0x42afb3(0x182)]},'cmd':_0x2f6993[_0x42afb3(0x19b)]};case e[_0x42afb3(0x496)][_0x42afb3(0x21a)]:case e[_0x42afb3(0x496)][_0x42afb3(0x3db)]:return{..._0x2f6993,'data':{..._0x350c65,'data':_0x350c65[_0x42afb3(0x368)]},'cmd':_0x2f6993[_0x42afb3(0x19b)]};case e[_0x42afb3(0x496)]['LIVESHARE_TERMINATE']:return{..._0x2f6993,'data':{..._0x350c65,'data':_0x350c65['liveShareNewHost']},'cmd':_0x2f6993['cmd']};case e[_0x42afb3(0x496)]['MSG_FOR_ERROR']:return{..._0x2f6993,'data':_0x350c65,'cmd':_0x2f6993[_0x42afb3(0x19b)]};case e[_0x42afb3(0x496)]['COMMENT_UPDATE']:return{..._0x2f6993,'data':{..._0x350c65,'data':_0x350c65[_0x42afb3(0x3d1)]},'cmd':_0x2f6993['cmd']};case e[_0x42afb3(0x496)][_0x42afb3(0x4a5)]:return{..._0x2f6993,'data':{..._0x350c65,'data':_0x350c65['updatePermissionObjEvent']},'cmd':_0x2f6993['cmd']};case e[_0x42afb3(0x496)]['SHOULD_CLOSE_CONN']:return{..._0x2f6993,'data':{..._0x350c65,'data':_0x350c65['shouldCloseConn']},'cmd':_0x2f6993['cmd']};case e[_0x42afb3(0x496)]['UNISCRIPT_RUN']:return{..._0x2f6993,'data':{..._0x350c65,'data':_0x350c65['uniscriptRunEvent']},'cmd':_0x2f6993['cmd']};default:return _0x2f6993;}}default:return _0x2f6993;}}function Ke(_0x1386af){const _0x12294a=_0x51c992;switch(_0x1386af[_0x12294a(0x19b)]){case a['CombCmd'][_0x12294a(0x311)]:case a['CombCmd'][_0x12294a(0x1e7)]:return JSON[_0x12294a(0x45d)]({'cmd':_0x1386af[_0x12294a(0x19b)],'routeKey':_0x1386af['routeKey']});case a[_0x12294a(0x399)][_0x12294a(0x37f)]:{let _0x5993ef;switch(_0x1386af['data']['eventID']){case e[_0x12294a(0x496)]['UPDATE_CURSOR']:_0x5993ef={'eventID':e['CollaborationEvent']['UPDATE_CURSOR'],'updateCursorEvent':_0x1386af[_0x12294a(0x2e1)][_0x12294a(0x2e1)]};break;case e['CollaborationEvent'][_0x12294a(0x34e)]:_0x5993ef={'eventID':e[_0x12294a(0x496)]['USERS_LEAVE'],'leaveEvent':_0x1386af['data'][_0x12294a(0x2e1)]};break;case e[_0x12294a(0x496)][_0x12294a(0x2c2)]:_0x5993ef={'eventID':e['CollaborationEvent'][_0x12294a(0x2c2)],'joinEvent':_0x1386af[_0x12294a(0x2e1)][_0x12294a(0x2e1)]};break;case e[_0x12294a(0x496)][_0x12294a(0x4a6)]:_0x5993ef={'eventID':e[_0x12294a(0x496)][_0x12294a(0x4a6)],'liveShareNewHost':_0x1386af[_0x12294a(0x2e1)][_0x12294a(0x2e1)]};break;case e[_0x12294a(0x496)]['LIVESHARE_OPERATION']:_0x5993ef={'eventID':e[_0x12294a(0x496)][_0x12294a(0x3db)],'liveShareOperation':_0x1386af[_0x12294a(0x2e1)][_0x12294a(0x2e1)]};break;case e[_0x12294a(0x496)]['LIVESHARE_TERMINATE']:_0x5993ef={'eventID':e[_0x12294a(0x496)][_0x12294a(0x252)],'liveShareTerminate':_0x1386af[_0x12294a(0x2e1)]['data']};break;case e[_0x12294a(0x496)][_0x12294a(0x282)]:_0x5993ef={'eventID':e[_0x12294a(0x496)][_0x12294a(0x282)],'liveShareRequestHost':_0x1386af[_0x12294a(0x2e1)][_0x12294a(0x2e1)]};break;case e['CollaborationEvent'][_0x12294a(0x21a)]:_0x5993ef={'eventID':e[_0x12294a(0x496)][_0x12294a(0x21a)]};break;default:_0x5993ef={'eventID':_0x1386af['data'][_0x12294a(0x309)]};}return JSON[_0x12294a(0x45d)]({'cmd':_0x1386af[_0x12294a(0x19b)],'routeKey':_0x1386af[_0x12294a(0x308)],'collaMsg':_0x5993ef});}case a[_0x12294a(0x399)][_0x12294a(0x1af)]:return JSON[_0x12294a(0x45d)]({'cmd':_0x1386af[_0x12294a(0x19b)],'routeKey':_0x1386af[_0x12294a(0x308)],'joinReq':_0x1386af[_0x12294a(0x2e1)]});case a[_0x12294a(0x399)][_0x12294a(0x442)]:return JSON[_0x12294a(0x45d)]({'cmd':_0x1386af[_0x12294a(0x19b)],'routeKey':_0x1386af['routeKey'],'leaveReq':_0x1386af[_0x12294a(0x2e1)]});default:throw Error(_0x12294a(0x298));}}const qe=(0x0,t[_0x51c992(0x2e3)])(_0x51c992(0x33e));function Je(_0x204d6f,_0x2c37ba,_0x2641ba){const _0x2254b2=_0x51c992;return _0x204d6f+'/'+_0x2c37ba+_0x2254b2(0x198)+_0x2641ba+_0x2254b2(0x385);}let Ye=class extends t[_0x51c992(0x3ac)]{constructor(_0x138473,_0x2e5708,_0x54763c,_0x40127f,_0x1de40e){const _0x24379c=_0x51c992;super(),this[_0x24379c(0x4a1)]=_0x138473,this['_httpService']=_0x2e5708,this['_configService']=_0x54763c,this[_0x24379c(0x396)]=_0x40127f,this['_snapshotServerService']=_0x1de40e;}['_doCreateSocket'](_0x62b799){const _0x26db32=_0x51c992;let _0x5d8c73=this[_0x26db32(0x4a1)][_0x26db32(0x403)](l[_0x26db32(0x3c9)]);if(!_0x5d8c73)throw Error(_0x26db32(0x36e));let _0x269e56=_0x5d8c73[_0x26db32(0x3cf)](_0x62b799);if(!_0x269e56)throw Error(_0x26db32(0x34a));let _0x4e7b5b=new t[(_0x26db32(0x3f1))](),_0xdc7753=new i[(_0x26db32(0x29d))]();_0x4e7b5b[_0x26db32(0x45a)](_0x269e56[_0x26db32(0x245)]['subscribe'](_0x1b9ceb=>_0xdc7753[_0x26db32(0x443)](_0x1b9ceb))),_0x4e7b5b['add']((0x0,t[_0x26db32(0x42e)])(()=>_0xdc7753['complete']()));let _0x25fdda=new i[(_0x26db32(0x29d))]();_0x4e7b5b[_0x26db32(0x45a)](_0x269e56[_0x26db32(0x38b)]['subscribe'](_0x4ea30a=>_0x25fdda[_0x26db32(0x443)](_0x4ea30a))),_0x4e7b5b[_0x26db32(0x45a)]((0x0,t[_0x26db32(0x42e)])(()=>_0x25fdda[_0x26db32(0x3a9)]()));let _0x4ee658=new i[(_0x26db32(0x29d))]();_0x4e7b5b[_0x26db32(0x45a)](_0x269e56[_0x26db32(0x194)][_0x26db32(0x481)](_0x3c3cfe=>{let _0x174d08=Ge(_0x3c3cfe);_0x4ee658['next'](_0x174d08);})),_0x4e7b5b[_0x26db32(0x45a)]((0x0,t['toDisposable'])(()=>_0x4ee658['complete']()));let _0x3f6e35,_0x25a264=()=>{const _0x4445f9=_0x26db32;_0x25fdda[_0x4445f9(0x443)](new Event(_0x4445f9(0x288))),_0xdc7753[_0x4445f9(0x443)](new Event('connection\x20error')),_0x3f6e35[_0x4445f9(0x35f)]();};return _0x3f6e35={'memberID':'','close$':_0xdc7753[_0x26db32(0x3e3)](),'error$':_0x25fdda[_0x26db32(0x3e3)](),'open$':_0x269e56['open$'],'message$':_0x4ee658[_0x26db32(0x3e3)](),'send':_0x4fd21a=>{const _0x5cf6c0=_0x26db32;if(_0x4fd21a['cmd']===a[_0x5cf6c0(0x399)][_0x5cf6c0(0x37f)]){if(_0x4fd21a[_0x5cf6c0(0x2e1)][_0x5cf6c0(0x309)]===e['CollaborationEvent']['SUBMIT_CHANGESET']){this[_0x5cf6c0(0x30e)](_0x3f6e35,_0x4fd21a[_0x5cf6c0(0x2e1)])[_0x5cf6c0(0x397)](_0x3d6203=>{this['_logService']['error'](_0x3d6203),_0x25a264();});return;}if(_0x4fd21a['data'][_0x5cf6c0(0x309)]===e[_0x5cf6c0(0x496)][_0x5cf6c0(0x340)]){let _0x4e255b=_0x4fd21a[_0x5cf6c0(0x2e1)];this[_0x5cf6c0(0x405)](_0x4e255b)[_0x5cf6c0(0x22e)](_0x1fe412=>{const _0x344c20=_0x5cf6c0;_0x4ee658[_0x344c20(0x443)]({'cmd':a[_0x344c20(0x399)][_0x344c20(0x3ce)],'code':a[_0x344c20(0x28c)]['OK'],'routeKey':_0x4e255b[_0x344c20(0x2e1)]['unitID'],'routeType':'','data':{'eventID':e[_0x344c20(0x496)][_0x344c20(0x40a)],'data':{'changesets':_0x1fe412}}});})[_0x5cf6c0(0x397)](_0x5352f8=>{const _0x43ae87=_0x5cf6c0;this[_0x43ae87(0x396)][_0x43ae87(0x420)](_0x5352f8),_0x25a264();});return;}}_0x269e56[_0x5cf6c0(0x2a9)](Ke(_0x4fd21a));},'close':()=>{const _0xf3753a=_0x26db32;_0x269e56[_0xf3753a(0x35f)](),_0x4e7b5b[_0xf3753a(0x37b)]();}},_0x3f6e35;}async['_submitChangeset'](_0x53f117,_0x23343c){const _0x18a059=_0x51c992;let {unitType:_0xa4aeb,unitID:_0x1fdc39,changeset:_0x308564}=_0x23343c[_0x18a059(0x2e1)],_0x34ad8b={'unitID':_0x1fdc39,'memberID':_0x53f117[_0x18a059(0x44a)],'type':_0xa4aeb,'changeset':(0x0,e[_0x18a059(0x225)])(_0x308564)},_0x1518c5=this[_0x18a059(0x214)]['getConfig'](m),_0x1e8626=Je((_0x1518c5==null?void 0x0:_0x1518c5['collabSubmitChangesetUrl'])??'/universer-api/comb',_0xa4aeb,_0x1fdc39);try{await this[_0x18a059(0x22f)][_0x18a059(0x484)](_0x1e8626,{'body':_0x34ad8b});}catch(_0x2edbb1){throw this[_0x18a059(0x396)][_0x18a059(0x420)](_0x18a059(0x1d7),_0x18a059(0x394)),_0x2edbb1;}}async['_fetchMissChangesets'](_0x2d631a){const _0x3a3806=_0x51c992;let {unitID:_0x2c4585,from:_0x37778b,to:_0x5c77c0,unitType:_0x4d1b27}=_0x2d631a['data'];return(await this[_0x3a3806(0x1d8)][_0x3a3806(0x45f)]({'metadata':void 0x0},{'unitID':_0x2c4585,'type':_0x4d1b27,'from':_0x37778b,'to':_0x5c77c0}))['changesets'][_0x3a3806(0x231)](_0x47727f=>((_0x47727f[_0x3a3806(0x2a2)]===null||_0x47727f['mutations']===void 0x0)&&(_0x47727f[_0x3a3806(0x2a2)]=[]),_0x47727f));}};Ye=y([v(0x0,(0x0,t[_0x51c992(0x1ba)])(t[_0x51c992(0x401)])),v(0x1,(0x0,t['Inject'])(l[_0x51c992(0x492)])),v(0x2,t['IConfigService']),v(0x3,t[_0x51c992(0x291)]),v(0x4,e[_0x51c992(0x43c)])],Ye);const Xe=(0x0,t[_0x51c992(0x2e3)])('univer-pro.collaboration-client-adapter-service');function Ze(_0x4b12a8={}){const _0x1b9554=_0x51c992;return _0x4b12a8['resolveUnit']?{'resolveUnit':_0x4b12a8[_0x1b9554(0x320)]}:{'resolveUnit':_0x409f45=>({'target':{'unitId':_0x409f45[_0x1b9554(0x44c)],'unitType':_0x409f45[_0x1b9554(0x19c)]}})};}function Qe(_0x6ebaab,_0x9749cf,_0x2c8406){const _0x52f59a=_0x51c992;let _0x4f3dd1=_0x2c8406[_0x52f59a(0x280)][_0x52f59a(0x2ee)];if(_0x4f3dd1!=null&&_0x4f3dd1[_0x52f59a(0x21d)]()==='')throw Error(_0x52f59a(0x464));if(!_0x2c8406[_0x52f59a(0x280)]['unitId'])throw Error(_0x52f59a(0x2ce));return{'localUnitId':_0x6ebaab,'unitType':_0x9749cf,'target':{'endpoint':_0x4f3dd1,'unitId':_0x2c8406[_0x52f59a(0x280)][_0x52f59a(0x44c)],'unitType':_0x2c8406[_0x52f59a(0x280)][_0x52f59a(0x19c)]??_0x9749cf},'changeset':_0x2c8406['changeset']};}let V=class extends t[_0x51c992(0x3ac)]{constructor(_0x5159cb,_0x1edb03,_0x2cb815,_0x2b8737,_0x1092a8,_0x94aa78,_0x2f6d87){const _0xfe0df1=_0x51c992;super(),this['_injector']=_0x5159cb,this['_logService']=_0x1edb03,this['_configService']=_0x2cb815,this['_socketService']=_0x2b8737,this[_0xfe0df1(0x2f5)]=_0x1092a8,this[_0xfe0df1(0x272)]=_0x94aa78,this[_0xfe0df1(0x1d9)]=_0x2f6d87,g(this,'_sessions',new Map()),g(this,_0xfe0df1(0x3de),new Map()),g(this,_0xfe0df1(0x276),new Map()),g(this,_0xfe0df1(0x1ec),new Map()),g(this,_0xfe0df1(0x3e5),this[_0xfe0df1(0x3a4)](void 0x0)[_0xfe0df1(0x3e5)][_0xfe0df1(0x3e3)]()),g(this,_0xfe0df1(0x259),new i[(_0xfe0df1(0x3f2))](0x0)),g(this,'status$',this[_0xfe0df1(0x259)][_0xfe0df1(0x3e3)]()),this['_listenToNetworkCondition']();}[_0x51c992(0x4a8)](){const _0x1a1419=_0x51c992;this[_0x1a1419(0x1d9)]&&this[_0x1a1419(0x2d7)](this[_0x1a1419(0x1d9)][_0x1a1419(0x2b9)][_0x1a1419(0x481)](_0x2ee3c1=>{const _0x264104=_0x1a1419;_0x2ee3c1&&this['reconnect'](),_0x2ee3c1||this[_0x264104(0x1ec)][_0x264104(0x1be)](_0x26086e=>this[_0x264104(0x46a)](_0x26086e));}));}[_0x51c992(0x37b)](){const _0x3d90bf=_0x51c992;super[_0x3d90bf(0x37b)](),this['_socketChannels'][_0x3d90bf(0x1be)](_0x562a5b=>{const _0x57efd7=_0x3d90bf;var _0x5b956a,_0x42ca15;(_0x5b956a=_0x562a5b[_0x57efd7(0x3b6)])==null||_0x5b956a['unsubscribe'](),_0x562a5b[_0x57efd7(0x3b6)]=null,this[_0x57efd7(0x26a)](_0x562a5b),this[_0x57efd7(0x49f)](_0x562a5b),this[_0x57efd7(0x1a8)](_0x562a5b),(_0x42ca15=_0x562a5b[_0x57efd7(0x3e5)][_0x57efd7(0x2a8)]())==null||_0x42ca15['close'](),_0x562a5b[_0x57efd7(0x3e5)][_0x57efd7(0x3a9)]();}),this['_socketChannels'][_0x3d90bf(0x47a)](),this[_0x3d90bf(0x1ee)][_0x3d90bf(0x1be)](_0x232663=>_0x232663['dispose']()),this[_0x3d90bf(0x1ee)][_0x3d90bf(0x47a)](),this[_0x3d90bf(0x276)]['clear'](),this[_0x3d90bf(0x259)][_0x3d90bf(0x3a9)]();}async[_0x51c992(0x345)](_0x1e450f,_0x5d1912){const _0x37874e=_0x51c992;if(this[_0x37874e(0x1ee)][_0x37874e(0x2d4)](_0x1e450f))return this[_0x37874e(0x1ee)]['get'](_0x1e450f);let _0x503962=this[_0x37874e(0x3de)][_0x37874e(0x403)](_0x1e450f);if(_0x503962)return _0x503962;let _0x5784f8=this[_0x37874e(0x1f2)](_0x1e450f,_0x5d1912);this['_pendingSessions'][_0x37874e(0x35e)](_0x1e450f,_0x5784f8);try{return await _0x5784f8;}finally{this[_0x37874e(0x3de)][_0x37874e(0x404)](_0x1e450f);}}async[_0x51c992(0x1f2)](_0x3156c0,_0x303bda){const _0x29405e=_0x51c992;let _0x476612=await this[_0x29405e(0x230)](_0x3156c0,_0x303bda),_0x2d26a9=this[_0x29405e(0x3a4)](_0x476612[_0x29405e(0x280)][_0x29405e(0x2ee)]);this[_0x29405e(0x453)](_0x2d26a9);let _0x225c5b=this[_0x29405e(0x4a1)][_0x29405e(0x3fb)](ve,_0x476612,_0x2d26a9[_0x29405e(0x3e5)][_0x29405e(0x3e3)]());return this[_0x29405e(0x1ee)][_0x29405e(0x35e)](_0x3156c0,_0x225c5b),this[_0x29405e(0x276)][_0x29405e(0x35e)](_0x3156c0,_0x2d26a9[_0x29405e(0x41f)]),_0x225c5b;}[_0x51c992(0x2d2)](_0x5f3003){const _0x423b39=_0x51c992;let _0x3867aa=this[_0x423b39(0x1ee)][_0x423b39(0x403)](_0x5f3003),_0x291eda=this[_0x423b39(0x276)][_0x423b39(0x403)](_0x5f3003);if(_0x3867aa&&(this[_0x423b39(0x1ee)][_0x423b39(0x404)](_0x5f3003),this[_0x423b39(0x276)][_0x423b39(0x404)](_0x5f3003),_0x3867aa[_0x423b39(0x35f)]()),_0x291eda&&!this['_hasSessionsForEndpoint'](_0x291eda)){var _0x1a7fea;let _0x32c911=this[_0x423b39(0x1ec)][_0x423b39(0x403)](_0x291eda);_0x32c911==null||(_0x1a7fea=_0x32c911[_0x423b39(0x3e5)][_0x423b39(0x2a8)]())==null||_0x1a7fea[_0x423b39(0x35f)]();}}[_0x51c992(0x1e6)](){const _0x50ffa1=_0x51c992;(this[_0x50ffa1(0x1ec)]['size']?[...this[_0x50ffa1(0x1ec)]['values']()]:[this[_0x50ffa1(0x3a4)](void 0x0)])['forEach'](_0x3843fc=>{const _0x44e8d6=_0x50ffa1;_0x3843fc['retryCount']=0x0,this['_clearRetryConnectingTimer'](_0x3843fc),this[_0x44e8d6(0x336)](_0x3843fc);});}[_0x51c992(0x26a)](_0xecc639){const _0x14e93b=_0x51c992;_0xecc639['retryConnectingTimer']!=null&&(clearTimeout(_0xecc639[_0x14e93b(0x307)]),_0xecc639[_0x14e93b(0x307)]=null);}async[_0x51c992(0x18b)](_0x3d5503){const _0x444638=_0x51c992;let _0x353cc5=this[_0x444638(0x214)][_0x444638(0x310)](m),_0x2d6f88=_0x3d5503['endpoint']??(_0x353cc5==null?void 0x0:_0x353cc5[_0x444638(0x281)])??_0x444638(0x3c5),_0x58c1fe=await this[_0x444638(0x193)][_0x444638(0x3cf)](_0x2d6f88);return _0x3d5503[_0x444638(0x2a4)]=_0x58c1fe,_0x58c1fe;}async[_0x51c992(0x453)](_0x240d01){const _0x133d8b=_0x51c992;try{let _0x430971=_0x240d01[_0x133d8b(0x3e5)][_0x133d8b(0x2a8)]()??_0x240d01['candidateSocket']??await this[_0x133d8b(0x18b)](_0x240d01);if(_0x430971){var _0x39343c;let _0x218de5=_0x430971[_0x133d8b(0x2a9)];_0x430971['send']=_0x169b36=>(_0x169b36[_0x133d8b(0x19b)]!==a[_0x133d8b(0x399)][_0x133d8b(0x442)]&&this[_0x133d8b(0x1b0)](_0x240d01),_0x218de5[_0x133d8b(0x1a9)](_0x430971,[_0x169b36])),(_0x39343c=_0x240d01[_0x133d8b(0x3b6)])==null||_0x39343c[_0x133d8b(0x2df)](),_0x240d01[_0x133d8b(0x3b6)]=null,_0x240d01['socketMessageSubscription']=_0x430971[_0x133d8b(0x194)][_0x133d8b(0x481)](_0x2d79ed=>this['_onMessage'](_0x240d01,_0x430971,_0x2d79ed)),_0x430971[_0x133d8b(0x38b)][_0x133d8b(0x3a2)]((0x0,s[_0x133d8b(0x1e3)])(0x1))[_0x133d8b(0x481)](_0x3906a1=>this['_logService'][_0x133d8b(0x420)]('[CollaborationSessionService]:\x20socket\x20error',_0x3906a1)),_0x430971['open$']['pipe']((0x0,s[_0x133d8b(0x1e3)])(0x1))[_0x133d8b(0x481)](()=>{this['_onConnectionOpen'](_0x240d01,_0x430971);}),_0x430971[_0x133d8b(0x245)][_0x133d8b(0x3a2)]((0x0,s[_0x133d8b(0x1e3)])(0x1))[_0x133d8b(0x481)](_0x5b1708=>{const _0x374499=_0x133d8b;this[_0x374499(0x396)][_0x374499(0x440)](_0x374499(0x48a),'socket\x20close',_0x5b1708),this[_0x374499(0x48b)](_0x240d01);});}}catch(_0x88d9d2){this['_logService'][_0x133d8b(0x420)](_0x88d9d2),this[_0x133d8b(0x48b)](_0x240d01);}}[_0x51c992(0x426)](_0x172964,_0x4094d2){const _0x29b25e=_0x51c992;this[_0x29b25e(0x396)][_0x29b25e(0x440)]('[CollaborationSessionService]',_0x29b25e(0x371)),_0x4094d2[_0x29b25e(0x2a9)]({'cmd':a[_0x29b25e(0x399)][_0x29b25e(0x1e7)]}),this[_0x29b25e(0x1b0)](_0x172964);}['_onOffline'](_0x2b687b){const _0x22eb6a=_0x51c992;_0x2b687b[_0x22eb6a(0x1b2)]=!0x1,_0x2b687b[_0x22eb6a(0x2a4)]=null,this[_0x22eb6a(0x259)]['next'](0x2),_0x2b687b[_0x22eb6a(0x3e5)]['next'](null),this['_clearTimeoutTimer'](_0x2b687b),this['_clearHeartbeatTimer'](_0x2b687b);}[_0x51c992(0x48b)](_0x43b23f){const _0x3498c2=_0x51c992;this[_0x3498c2(0x46a)](_0x43b23f),this['_hasSessionsForEndpoint'](_0x43b23f[_0x3498c2(0x41f)])&&(_0x43b23f['retryCount']<(this[_0x3498c2(0x214)]['getConfig'](_0x3498c2(0x303))??0x3)?(this[_0x3498c2(0x2f5)]['emitEvent']({'id':_0x3498c2(0x43a)}),this[_0x3498c2(0x336)](_0x43b23f)):this[_0x3498c2(0x2f5)][_0x3498c2(0x3e8)]({'id':_0x3498c2(0x1ce)}));}['_tryReconnect'](_0x1d0fbf){const _0x577a8e=_0x51c992;let _0x1ca6dc=_0x1d0fbf[_0x577a8e(0x20f)],_0x586389=this[_0x577a8e(0x214)][_0x577a8e(0x310)](m),_0x217546=_0x1ca6dc===0x0?0x0:((_0x586389==null?void 0x0:_0x586389[_0x577a8e(0x333)])??0x4e20)*0x2**_0x1ca6dc;_0x1d0fbf[_0x577a8e(0x307)]=setTimeout(()=>{const _0x4d9c67=_0x577a8e;clearTimeout(_0x1d0fbf[_0x4d9c67(0x307)]),_0x1d0fbf[_0x4d9c67(0x307)]=null,this[_0x4d9c67(0x453)](_0x1d0fbf);},_0x217546),_0x1d0fbf[_0x577a8e(0x20f)]+=0x1;}async[_0x51c992(0x230)](_0x106e89,_0xb007bd){const _0x8e7b58=_0x51c992;return Qe(_0x106e89,_0xb007bd,await this[_0x8e7b58(0x272)][_0x8e7b58(0x320)]({'unitId':_0x106e89,'unitType':_0xb007bd}));}['_onMessage'](_0x7d23ea,_0x35122a,_0x6d2799){const _0x1594b0=_0x51c992;let {cmd:_0x5a2896}=_0x6d2799;_0x5a2896===a[_0x1594b0(0x399)][_0x1594b0(0x1e7)]&&!_0x7d23ea[_0x1594b0(0x1b2)]&&(_0x35122a[_0x1594b0(0x44a)]=_0x6d2799[_0x1594b0(0x2e1)][_0x1594b0(0x44a)],_0x7d23ea[_0x1594b0(0x20f)]=0x0,_0x7d23ea[_0x1594b0(0x3e5)][_0x1594b0(0x443)](_0x35122a),this['_status$']['next'](0x3),_0x7d23ea[_0x1594b0(0x1b2)]=!0x0,_0x7d23ea[_0x1594b0(0x2a4)]=null),_0x5a2896===a[_0x1594b0(0x399)]['HEARTBEAT']&&this[_0x1594b0(0x49f)](_0x7d23ea),this['_rescheduleHeartbeat'](_0x7d23ea);}[_0x51c992(0x498)](_0x3a5cd8){const _0x3d64da=_0x51c992;return[...this[_0x3d64da(0x276)][_0x3d64da(0x215)]()][_0x3d64da(0x17c)](_0x5b74fa=>_0x5b74fa===_0x3a5cd8);}[_0x51c992(0x3a4)](_0x19a859){const _0x2faf41=_0x51c992;let _0x1f6a63=_0x19a859??'',_0x298556=this[_0x2faf41(0x1ec)][_0x2faf41(0x403)](_0x1f6a63);if(_0x298556)return _0x298556;let _0x507543={'endpointKey':_0x1f6a63,'endpoint':_0x19a859,'socket$':new i[(_0x2faf41(0x3f2))](void 0x0),'candidateSocket':null,'socketReady':!0x1,'socketMessageSubscription':null,'retryConnectingTimer':null,'retryCount':0x0,'sendHeartbeatTimer':null,'timeoutTimer':null};return this[_0x2faf41(0x1ec)][_0x2faf41(0x35e)](_0x1f6a63,_0x507543),_0x507543;}['_rescheduleHeartbeat'](_0x2e58f1){const _0x4926f6=_0x51c992;this['_clearHeartbeatTimer'](_0x2e58f1),_0x2e58f1['sendHeartbeatTimer']=setTimeout(()=>this['_sendHeartbeat'](_0x2e58f1),this[_0x4926f6(0x214)]['getConfig']('HEARTBEAT_INTERVAL')??0x7530);}[_0x51c992(0x22a)](_0x2c21b8){const _0x3e95b8=_0x51c992;_0x2c21b8[_0x3e95b8(0x3e5)][_0x3e95b8(0x2a8)]()[_0x3e95b8(0x2a9)]({'cmd':a[_0x3e95b8(0x399)][_0x3e95b8(0x311)]}),this[_0x3e95b8(0x209)](_0x2c21b8);}[_0x51c992(0x209)](_0x104fd9){const _0xc93118=_0x51c992;_0x104fd9[_0xc93118(0x20a)]=setTimeout(()=>this[_0xc93118(0x48b)](_0x104fd9),this[_0xc93118(0x214)][_0xc93118(0x310)](_0xc93118(0x240))??0x4e20);}[_0x51c992(0x1a8)](_0x261da3){const _0x50be68=_0x51c992;_0x261da3[_0x50be68(0x428)]!=null&&(clearTimeout(_0x261da3[_0x50be68(0x428)]),_0x261da3['sendHeartbeatTimer']=null);}[_0x51c992(0x49f)](_0x3377b2){const _0x38ff1a=_0x51c992;_0x3377b2[_0x38ff1a(0x20a)]!=null&&(clearTimeout(_0x3377b2[_0x38ff1a(0x20a)]),_0x3377b2[_0x38ff1a(0x20a)]=null);}};V=y([v(0x0,(0x0,t[_0x51c992(0x1ba)])(t['Injector'])),v(0x1,t[_0x51c992(0x291)]),v(0x2,t['IConfigService']),v(0x3,qe),v(0x4,(0x0,t[_0x51c992(0x1ba)])(_)),v(0x5,Xe),v(0x6,(0x0,t[_0x51c992(0x47e)])(We))],V);let H=class extends t[_0x51c992(0x251)]{constructor(_0x4a50c3,_0xa9cf14,_0x45754b,_0x590ed4){const _0x2a66ba=_0x51c992;var _0x4839eb;super(),this[_0x2a66ba(0x4a1)]=_0x4a50c3,this[_0x2a66ba(0x379)]=_0xa9cf14,this[_0x2a66ba(0x214)]=_0x45754b,this['_univerInstanceService']=_0x590ed4,g(this,_0x2a66ba(0x28a),new Map()),g(this,'_entityInit$',new i[(_0x2a66ba(0x29d))]()),g(this,'entityInit$',this[_0x2a66ba(0x27d)][_0x2a66ba(0x3e3)]()),((_0x4839eb=this['_configService'][_0x2a66ba(0x310)]('collaboration-client.config'))==null?void 0x0:_0x4839eb[_0x2a66ba(0x39a)])!==!0x1&&this['_init']();}[_0x51c992(0x37b)](){const _0x1b361a=_0x51c992;super[_0x1b361a(0x37b)](),this['_entities'][_0x1b361a(0x1be)](_0x10e273=>_0x10e273[_0x1b361a(0x37b)]()),this[_0x1b361a(0x28a)][_0x1b361a(0x47a)]();}['getCollabEntity'](_0x371a5e){const _0x2c8cfb=_0x51c992;return this[_0x2c8cfb(0x28a)][_0x2c8cfb(0x403)](_0x371a5e)??null;}[_0x51c992(0x42b)](_0x5939e9){const _0x330305=_0x51c992;let _0x4f94e3=this[_0x330305(0x1c0)](_0x5939e9);return _0x4f94e3?(0x0,i['of'])(_0x4f94e3):this[_0x330305(0x27d)][_0x330305(0x3a2)]((0x0,s[_0x330305(0x3d8)])(_0x21e873=>_0x21e873[_0x330305(0x23b)]===_0x5939e9));}[_0x51c992(0x29a)](_0x3d0217){const _0x360de9=_0x51c992;return(0x0,i[_0x360de9(0x234)])(this[_0x360de9(0x42b)](_0x3d0217)['pipe']((0x0,s[_0x360de9(0x231)])(()=>void 0x0)));}['_init'](){const _0x506138=_0x51c992;this['_univerInstanceService'][_0x506138(0x389)](t['UniverInstanceType'][_0x506138(0x3f5)])[_0x506138(0x3a2)]((0x0,i[_0x506138(0x2ec)])(this[_0x506138(0x257)]),(0x0,s[_0x506138(0x1cd)])(0x10))['subscribe'](async _0x2afd0c=>{const _0x2f09a6=_0x506138;let _0x3796c0=_0x2afd0c[_0x2f09a6(0x211)][_0x2f09a6(0x1c8)](),_0x35ec15=await this[_0x2f09a6(0x25a)](_0x3796c0,t[_0x2f09a6(0x2b4)][_0x2f09a6(0x3f5)]);this['_entities'][_0x2f09a6(0x35e)](_0x3796c0,_0x35ec15);}),this[_0x506138(0x322)][_0x506138(0x389)](t[_0x506138(0x2b4)]['UNIVER_DOC'])['pipe']((0x0,i[_0x506138(0x2ec)])(this[_0x506138(0x257)]),(0x0,s[_0x506138(0x1cd)])(0x10))[_0x506138(0x3a2)]((0x0,s[_0x506138(0x3d8)])(_0x291014=>!_0x291014[_0x506138(0x211)]['getUnitId']()['startsWith']('__')))[_0x506138(0x481)](async _0x55479c=>{const _0x54b13c=_0x506138;let _0x2a4189=_0x55479c[_0x54b13c(0x211)][_0x54b13c(0x1c8)](),_0x5e631c=await this[_0x54b13c(0x25a)](_0x2a4189,t['UniverInstanceType'][_0x54b13c(0x47c)]);this['_entities']['set'](_0x2a4189,_0x5e631c);}),this[_0x506138(0x322)][_0x506138(0x389)](t[_0x506138(0x2b4)][_0x506138(0x439)])[_0x506138(0x3a2)]((0x0,i['takeUntil'])(this[_0x506138(0x257)]),(0x0,s['delay'])(0x10))[_0x506138(0x481)](async _0x301cdc=>{const _0x583d55=_0x506138;let _0x5d5c08=_0x301cdc[_0x583d55(0x211)][_0x583d55(0x1c8)](),_0x14fc82=await this[_0x583d55(0x25a)](_0x5d5c08,t[_0x583d55(0x2b4)][_0x583d55(0x439)]);this[_0x583d55(0x28a)][_0x583d55(0x35e)](_0x5d5c08,_0x14fc82);}),this[_0x506138(0x322)][_0x506138(0x389)](t[_0x506138(0x2b4)][_0x506138(0x3f3)])['pipe']((0x0,i[_0x506138(0x2ec)])(this[_0x506138(0x257)]),(0x0,s[_0x506138(0x1cd)])(0x10))[_0x506138(0x481)](async _0x1d5746=>{const _0x52156a=_0x506138;let _0x202aef=_0x1d5746[_0x52156a(0x211)][_0x52156a(0x1c8)](),_0x2f64b7=await this[_0x52156a(0x25a)](_0x202aef,t['UniverInstanceType'][_0x52156a(0x3f3)]);this[_0x52156a(0x28a)][_0x52156a(0x35e)](_0x202aef,_0x2f64b7);}),this[_0x506138(0x322)][_0x506138(0x389)](t[_0x506138(0x2b4)]['UNIVER_BASE'])[_0x506138(0x3a2)]((0x0,i[_0x506138(0x2ec)])(this[_0x506138(0x257)]),(0x0,s['delay'])(0x10))[_0x506138(0x481)](async _0x32077d=>{const _0x341b3b=_0x506138;let _0x44846a=_0x32077d[_0x341b3b(0x211)][_0x341b3b(0x1c8)](),_0x6436d0=await this[_0x341b3b(0x25a)](_0x44846a,t[_0x341b3b(0x2b4)][_0x341b3b(0x387)]);this[_0x341b3b(0x28a)][_0x341b3b(0x35e)](_0x44846a,_0x6436d0);}),this['_univerInstanceService'][_0x506138(0x389)](t['UniverInstanceType'][_0x506138(0x3eb)])[_0x506138(0x3a2)]((0x0,i['takeUntil'])(this[_0x506138(0x257)]),(0x0,s[_0x506138(0x1cd)])(0x10))[_0x506138(0x481)](async _0x4aa921=>{const _0x14e353=_0x506138;let _0x41846b=_0x4aa921[_0x14e353(0x211)][_0x14e353(0x1c8)](),_0x57eefd=await this[_0x14e353(0x25a)](_0x41846b,t['UniverInstanceType'][_0x14e353(0x3eb)]);this['_entities'][_0x14e353(0x35e)](_0x41846b,_0x57eefd);}),(0x0,i[_0x506138(0x335)])(this[_0x506138(0x322)][_0x506138(0x29f)](t[_0x506138(0x2b4)][_0x506138(0x3f5)]),this[_0x506138(0x322)][_0x506138(0x29f)](t['UniverInstanceType'][_0x506138(0x47c)]),this[_0x506138(0x322)][_0x506138(0x29f)](t[_0x506138(0x2b4)][_0x506138(0x439)]),this[_0x506138(0x322)][_0x506138(0x29f)](t[_0x506138(0x2b4)][_0x506138(0x3f3)]),this[_0x506138(0x322)]['getTypeOfUnitDisposed$'](t['UniverInstanceType'][_0x506138(0x387)]),this['_univerInstanceService']['getTypeOfUnitDisposed$'](t[_0x506138(0x2b4)]['UNIVER_PDF']))[_0x506138(0x3a2)]((0x0,i['takeUntil'])(this['dispose$']))[_0x506138(0x481)](_0x27da31=>{const _0x1107b1=_0x506138;let _0x29bd0d=_0x27da31[_0x1107b1(0x1c8)](),_0x3dc018=this[_0x1107b1(0x28a)][_0x1107b1(0x403)](_0x29bd0d);_0x3dc018&&(_0x3dc018['dispose'](),this[_0x1107b1(0x28a)]['delete'](_0x29bd0d));});}async[_0x51c992(0x25a)](_0x5eb336,_0x49228c){const _0x20b998=_0x51c992;let _0x560659=await this[_0x20b998(0x379)][_0x20b998(0x345)](_0x5eb336),_0x405e72=this[_0x20b998(0x4a1)][_0x20b998(0x3fb)](this[_0x20b998(0x1f4)](_0x49228c),_0x5eb336,_0x49228c,_0x560659);return await _0x405e72[_0x20b998(0x2b6)](),this[_0x20b998(0x27d)][_0x20b998(0x443)](_0x405e72),_0x405e72;}[_0x51c992(0x1f4)](_0x32e7e1){const _0x3a2f7e=_0x51c992;switch(_0x32e7e1){case t[_0x3a2f7e(0x2b4)][_0x3a2f7e(0x47c)]:return F;case t['UniverInstanceType'][_0x3a2f7e(0x3f5)]:return L;case t[_0x3a2f7e(0x2b4)][_0x3a2f7e(0x439)]:return R;case t['UniverInstanceType'][_0x3a2f7e(0x3f3)]:return z;case t['UniverInstanceType'][_0x3a2f7e(0x387)]:return I;case t[_0x3a2f7e(0x2b4)][_0x3a2f7e(0x3eb)]:return B;default:throw Error('[CollaborationController]:\x20invalid\x20univer\x20type:\x20'+_0x32e7e1);}}};H=y([v(0x0,(0x0,t[_0x51c992(0x1ba)])(t[_0x51c992(0x401)])),v(0x1,(0x0,t['Inject'])(V)),v(0x2,t[_0x51c992(0x46e)]),v(0x3,t[_0x51c992(0x1dd)])],H);var $e=_0x51c992(0x254),et=_0x51c992(0x287);let tt=class extends t[_0x51c992(0x3ac)]{constructor(_0x502e64,_0x43bb28){const _0x3733ac=_0x51c992;super(),this[_0x3733ac(0x322)]=_0x502e64,this['_configService']=_0x43bb28,this[_0x3733ac(0x223)]();}[_0x51c992(0x223)](){const _0x53d731=_0x51c992;this[_0x53d731(0x2d7)](this[_0x53d731(0x322)]['focused$'][_0x53d731(0x481)](()=>{const _0x85026d=_0x53d731;let _0x2d09f8=this[_0x85026d(0x322)][_0x85026d(0x2fd)](),_0x132533=this[_0x85026d(0x214)]['getConfig'](_0x85026d(0x1a2))??'Univer';_0x2d09f8 instanceof t[_0x85026d(0x2c9)]&&(_0x132533=_0x2d09f8[_0x85026d(0x329)]),document[_0x85026d(0x2bb)]=_0x132533;}));}};tt=y([v(0x0,t[_0x51c992(0x1dd)]),v(0x1,t['IConfigService'])],tt);const nt=(0x0,t[_0x51c992(0x2e3)])(_0x51c992(0x2dd));let U=class{constructor(_0x245b7c,_0x205079,_0x8e13d9){const _0x4b1e4e=_0x51c992;this[_0x4b1e4e(0x22f)]=_0x245b7c,this[_0x4b1e4e(0x214)]=_0x205079,this['_univerInstanceService']=_0x8e13d9;}[_0x51c992(0x2ed)](){return this['_getConfig']()['attachment']??{};}async[_0x51c992(0x418)](_0x559265){const _0x26fd71=_0x51c992;let _0x107bc4=this[_0x26fd71(0x2ed)]();if(rt(_0x559265,_0x107bc4),_0x107bc4['upload'])return _0x107bc4['upload'](_0x559265);let _0x20cf8f=await this['_upload'](_0x559265);return{'id':_0x20cf8f,'name':_0x559265[_0x26fd71(0x329)],'mimeType':_0x559265[_0x26fd71(0x3fc)],'size':_0x559265[_0x26fd71(0x4a9)],'sourceType':t['ImageSourceType']['UUID'],'source':_0x20cf8f};}async[_0x51c992(0x4ac)](_0x4142b0,_0x33c562){const _0x437255=_0x51c992;if(_0x33c562!==t['ImageSourceType'][_0x437255(0x3e2)])return _0x4142b0;let _0x54db2b=(await this['_httpService']['get'](this['_getSignURL']()[_0x437255(0x45b)]('{fileID}',_0x4142b0)))[_0x437255(0x253)];if(_0x54db2b[_0x437255(0x420)]&&_0x54db2b['error'][_0x437255(0x25c)]!==a[_0x437255(0x1e0)]['OK'])throw _0x54db2b[_0x437255(0x420)];if(!_0x54db2b[_0x437255(0x408)])throw Error(_0x437255(0x263));return(0x0,t[_0x437255(0x3d4)])(_0x54db2b[_0x437255(0x408)],this['_getDownloadEndpointURL']());}async[_0x51c992(0x448)](_0x21724f){const _0x4f88a0=_0x51c992;let _0x51fa8b=this[_0x4f88a0(0x322)][_0x4f88a0(0x2fd)](),_0x31f787=_0x51fa8b==null?void 0x0:_0x51fa8b[_0x4f88a0(0x1c8)]();if(!_0x31f787)throw Error('[CollaborationAttachmentIoService]:\x20unitId\x20is\x20not\x20found.');let _0xdd9e95=new FormData();_0xdd9e95['append']('file',_0x21724f);let _0x2691ef=this[_0x4f88a0(0x382)]()+_0x4f88a0(0x3b0)+_0x21724f[_0x4f88a0(0x4a9)]['toString']()+_0x4f88a0(0x419)+a[_0x4f88a0(0x38a)][_0x4f88a0(0x350)]+_0x4f88a0(0x412)+encodeURIComponent(_0x31f787),_0xf21fe1=(await this[_0x4f88a0(0x22f)][_0x4f88a0(0x484)](_0x2691ef,{'body':_0xdd9e95}))[_0x4f88a0(0x253)]['FileId'];if(typeof _0xf21fe1!=_0x4f88a0(0x2dc)||!_0xf21fe1)throw Error(_0x4f88a0(0x1a7));return _0xf21fe1;}['_getUploadFileURL'](){const _0xa58e22=_0x51c992;return this['_getConfig']()[_0xa58e22(0x18a)]??_0xa58e22(0x386);}['_getSignURL'](){const _0x7cbbc=_0x51c992;return this['_getConfig']()[_0x7cbbc(0x339)]??_0x7cbbc(0x4a0);}['_getDownloadEndpointURL'](){const _0x71427a=_0x51c992;let _0x1f3edf=this[_0x71427a(0x228)]();return _0x1f3edf[_0x71427a(0x24c)]?_0x1f3edf[_0x71427a(0x24c)]:typeof location<'u'?location[_0x71427a(0x212)]:_0x1f3edf[_0x71427a(0x18a)]??'';}[_0x51c992(0x228)](){const _0x2b9e7c=_0x51c992;return this[_0x2b9e7c(0x214)][_0x2b9e7c(0x310)](_0x2b9e7c(0x39b))??{};}};U=y([v(0x0,(0x0,t[_0x51c992(0x1ba)])(l[_0x51c992(0x492)])),v(0x1,(0x0,t[_0x51c992(0x1ba)])(t[_0x51c992(0x46e)])),v(0x2,(0x0,t['Inject'])(t[_0x51c992(0x1dd)]))],U);function rt(_0x4fee15,_0x236720){const _0x29163e=_0x51c992;var _0x4a7775;if(_0x236720[_0x29163e(0x366)]!=null&&_0x4fee15[_0x29163e(0x4a9)]>_0x236720[_0x29163e(0x366)])throw Error(_0x29163e(0x2ac));if((_0x4a7775=_0x236720[_0x29163e(0x47d)])!=null&&_0x4a7775[_0x29163e(0x187)]&&!_0x236720[_0x29163e(0x47d)][_0x29163e(0x17c)](_0x18812c=>_0x4fee15[_0x29163e(0x3fc)]===_0x18812c||_0x4fee15['name']['endsWith'](_0x18812c)||_0x18812c[_0x29163e(0x4b0)]('/*')&&_0x4fee15[_0x29163e(0x3fc)][_0x29163e(0x477)](_0x18812c[_0x29163e(0x1f1)](0x0,-0x1))))throw Error('[CollaborationAttachmentIoService]:\x20attachment\x20type\x20is\x20not\x20accepted.');}let W=class{constructor(_0x5268d3,_0x38cb38,_0x48d447){const _0x2a2f44=_0x51c992;this[_0x2a2f44(0x214)]=_0x5268d3,this['_httpService']=_0x38cb38,this['localeService']=_0x48d447,this[_0x2a2f44(0x2b6)]();}[_0x51c992(0x2b6)](){const _0x235e15=_0x51c992;this['_httpService']['registerHTTPInterceptor']({'priority':0x1,'interceptor':(_0x3e9fd3,_0x4e806c)=>_0x4e806c(_0x3e9fd3)[_0x235e15(0x3a2)]((0x0,i[_0x235e15(0x292)])(async _0x30cbd6=>{const _0x4f65a7=_0x235e15;let _0x1109f7=_0x30cbd6;if(_0x1109f7[_0x4f65a7(0x456)]===0x191){if(typeof window>'u')throw Error(_0x4f65a7(0x3c8));if(window[_0x4f65a7(0x2a6)](this[_0x4f65a7(0x37e)]['t']('collaboration-client.auth.needGotoLoginAlert'))){let _0x5da0b7=window[_0x4f65a7(0x48d)](window[_0x4f65a7(0x1e8)][_0x4f65a7(0x250)]);window[_0x4f65a7(0x1e8)][_0x4f65a7(0x250)]=this[_0x4f65a7(0x4ad)]()+_0x4f65a7(0x267)+_0x5da0b7;}}return _0x1109f7;}))});}['_getLoginPath'](){const _0x4ca2a9=_0x51c992;let _0x3d5307=this[_0x4ca2a9(0x214)]['getConfig'](m);return(_0x3d5307==null?void 0x0:_0x3d5307[_0x4ca2a9(0x296)])??_0x4ca2a9(0x363);}};W=y([v(0x0,t[_0x51c992(0x46e)]),v(0x1,(0x0,t[_0x51c992(0x1ba)])(l[_0x51c992(0x492)])),v(0x2,(0x0,t[_0x51c992(0x1ba)])(t[_0x51c992(0x29e)]))],W);let G=class extends t[_0x51c992(0x3ac)]{constructor(_0x2e662d,_0x57125b){const _0x310145=_0x51c992;super(),this[_0x310145(0x3d7)]=_0x2e662d,this[_0x310145(0x214)]=_0x57125b,g(this,_0x310145(0x3d3),!0x1),this[_0x310145(0x393)]();}['_initMergeInterceptor'](){const _0x363ca6=_0x51c992;let _0xab5921=this;this[_0x363ca6(0x2d7)](this[_0x363ca6(0x3d7)][_0x363ca6(0x34d)]({'priority':0x3e7,'interceptor':(0x0,l[_0x363ca6(0x232)])({'isMatch'(_0xfa213d){const _0x37047f=_0x363ca6;var _0x41ccf7;if(_0xfa213d[_0x37047f(0x459)]===_0x37047f(0x449)&&(_0x41ccf7=_0xfa213d[_0x37047f(0x3a7)])!=null&&_0x41ccf7[_0x37047f(0x253)]){let {objectID:_0x33cb1c,objectType:_0xe8b6d8}=_0xfa213d['requestParams']['body']||{};if(!_0x33cb1c||_0xe8b6d8===void 0x0)return!0x1;let _0x559d30=_0xab5921['_getAPIPrefixPath']()+'/'+_0xe8b6d8+_0x37047f(0x258)+encodeURIComponent(_0x33cb1c)+_0x37047f(0x3a1);if(_0xfa213d[_0x37047f(0x408)]===_0x559d30)return!0x0;}return!0x1;},'getParamsFromRequest'(_0x5ed801){const _0x373ea4=_0x363ca6;var _0x4f0a08;return(_0x4f0a08=_0x5ed801['requestParams'])==null?void 0x0:_0x4f0a08[_0x373ea4(0x253)];},'mergeParamsToRequest'(_0x49eb3b,_0x109605){const _0x467249=_0x363ca6;let _0x150bfe=_0xab5921[_0x467249(0x2c3)]()+_0x467249(0x1bd),_0x217b04=_0x49eb3b[_0x467249(0x42c)]((_0x24ebbc,_0x1664d1)=>{const _0x239216=_0x467249;let {unitID:_0x34e02e,objectID:_0x1a2d05,objectType:_0x4850e6,actions:_0x4f56d2}=_0x1664d1;return _0x24ebbc[_0x34e02e]||(_0x24ebbc[_0x34e02e]=Object['create'](null)),_0x24ebbc[_0x34e02e][_0x1a2d05]||(_0x24ebbc[_0x34e02e][_0x1a2d05]={'objectID':_0x1a2d05,'objectType':_0x4850e6,'actions':[]}),_0x24ebbc[_0x34e02e][_0x1a2d05][_0x239216(0x27c)][_0x239216(0x499)](..._0x4f56d2),_0x24ebbc;},Object[_0x467249(0x321)](null)),_0xe2f026=[];for(let _0x4ae2ee in _0x217b04)for(let _0x4e81c5 in _0x217b04[_0x4ae2ee]){let {actions:_0x510780,objectType:_0x4382a3}=_0x217b04[_0x4ae2ee][_0x4e81c5],_0x16ae24=[...new Set(_0x510780)];_0xe2f026[_0x467249(0x499)]({'unitID':_0x4ae2ee,'objectID':_0x4e81c5,'objectType':_0x4382a3,'actions':_0x16ae24});}return new l[(_0x467249(0x4a2))](_0x467249(0x449),_0x150bfe,{'headers':_0x109605[_0x467249(0x34b)],'withCredentials':_0x109605['withCredentials'],'responseType':_0x109605[_0x467249(0x375)],'body':{'requests':_0xe2f026}});}},{'distributeResult'(_0x5f15ed,_0x3cb4b0){const _0x30008e=_0x363ca6;let {objectActions:_0x4e766a}=_0x5f15ed;return _0x3cb4b0[_0x30008e(0x231)](_0x4c262d=>{const _0x3692f3=_0x30008e;let {unitID:_0x2780dd,objectID:_0x51f698,actions:_0x2dbebb}=_0x4c262d,_0x1d505e=_0x4e766a[_0x3692f3(0x2ea)](_0x59bf1=>_0x59bf1[_0x3692f3(0x23b)]===_0x2780dd&&_0x59bf1[_0x3692f3(0x3ed)]===_0x51f698);return{'config':_0x4c262d,'result':{'actions':_0x2dbebb[_0x3692f3(0x231)](_0x4c6d53=>_0x1d505e==null?void 0x0:_0x1d505e[_0x3692f3(0x27c)][_0x3692f3(0x2ea)](_0xbd2abd=>_0xbd2abd[_0x3692f3(0x324)]===_0x4c6d53))[_0x3692f3(0x3d8)](_0x16c932=>!!_0x16c932),'error':_0x5f15ed[_0x3692f3(0x420)]}};});}})}));}[_0x51c992(0x2c3)](){const _0x36238b=_0x51c992;let _0x4ee7bd=this['_configService'][_0x36238b(0x310)](m);return(_0x4ee7bd==null?void 0x0:_0x4ee7bd[_0x36238b(0x450)])??_0x36238b(0x1c9);}async[_0x51c992(0x321)](_0x4ff883){const _0x3dba07=_0x51c992;let _0x520ff2=this[_0x3dba07(0x2c3)]()+'/'+_0x4ff883[_0x3dba07(0x423)]+_0x3dba07(0x2d1);return(await this[_0x3dba07(0x3d7)]['post'](_0x520ff2,{'body':_0x4ff883}))[_0x3dba07(0x253)][_0x3dba07(0x3ed)]||'';}async[_0x51c992(0x3f6)](_0x4ee9d0){const _0x449df8=_0x51c992;let _0x17711d=this[_0x449df8(0x2c3)]()+_0x449df8(0x285);return(await this['_HTTPService'][_0x449df8(0x484)](_0x17711d,{'body':_0x4ee9d0}))['body']['objects'];}async[_0x51c992(0x381)](_0x4d3d51){const _0x477ef4=_0x51c992;var _0x1de6ab;let _0x5c66cb=this[_0x477ef4(0x2c3)]()+'/'+_0x4d3d51['objectType']+'/object/'+encodeURIComponent(_0x4d3d51['objectID']),_0x59dcdf=await this['_HTTPService'][_0x477ef4(0x444)](_0x5c66cb,{'body':_0x4d3d51});if((_0x59dcdf==null||(_0x1de6ab=_0x59dcdf[_0x477ef4(0x253)])==null||(_0x1de6ab=_0x1de6ab['error'])==null?void 0x0:_0x1de6ab[_0x477ef4(0x25c)])!==0x1)throw Error(_0x477ef4(0x35a));}async['allowed'](_0x29da46){const _0xcc82d8=_0x51c992;let _0x42b822=this[_0xcc82d8(0x2c3)]()+'/'+_0x29da46[_0xcc82d8(0x423)]+_0xcc82d8(0x258)+encodeURIComponent(_0x29da46[_0xcc82d8(0x3ed)])+'/allowed';return(await this[_0xcc82d8(0x3d7)][_0xcc82d8(0x484)](_0x42b822,{'body':_0x29da46}))['body'][_0xcc82d8(0x27c)];}async[_0x51c992(0x21e)](_0x3fa583){const _0x2bac27=_0x51c992;let _0x35e83a=this[_0x2bac27(0x2c3)]()+'/-/object/-/batch_allowed';return(await this[_0x2bac27(0x3d7)][_0x2bac27(0x484)](_0x35e83a,{'body':{'requests':_0x3fa583}}))[_0x2bac27(0x253)]['objectActions'];}async[_0x51c992(0x312)](_0x9e5037){const _0x51e4c0=_0x51c992;let _0x3abde1=this[_0x51e4c0(0x2c3)]()+'/'+_0x9e5037[_0x51e4c0(0x423)]+_0x51e4c0(0x468),_0x16e1d2=await this[_0x51e4c0(0x3d7)][_0x51e4c0(0x484)](_0x3abde1,{'body':_0x9e5037});return{'roles':_0x16e1d2[_0x51e4c0(0x253)][_0x51e4c0(0x3b3)],'actions':_0x16e1d2[_0x51e4c0(0x253)][_0x51e4c0(0x27c)]};}async['deleteCollaborator'](_0xdea229){const _0x521f88=_0x51c992;let _0xd72854=this['_getAPIPrefixPath']()+'/collaborator';await this[_0x521f88(0x3d7)][_0x521f88(0x404)](_0xd72854,{'params':{'collaboratorID':_0xdea229['collaboratorID'],'objectID':_0xdea229['objectID'],'unitID':_0xdea229[_0x521f88(0x23b)]}});}async[_0x51c992(0x181)](_0x46cc0b){const _0x205c15=_0x51c992;let _0x5af393=this[_0x205c15(0x2c3)]()+_0x205c15(0x38f);await this[_0x205c15(0x3d7)][_0x205c15(0x189)](_0x5af393,{'body':_0x46cc0b});}async['createCollaborator'](_0x16465f){const _0x1ae1e3=_0x51c992;let _0x149ca2=this[_0x1ae1e3(0x2c3)]()+'/collaborator';await this[_0x1ae1e3(0x3d7)][_0x1ae1e3(0x484)](_0x149ca2,{'body':_0x16465f});}async['listCollaborators'](_0x904f09){const _0x3fadfc=_0x51c992;let _0x3b3aa6=this[_0x3fadfc(0x2c3)]()+_0x3fadfc(0x38f),_0x3e6c2a=await this[_0x3fadfc(0x3d7)][_0x3fadfc(0x403)](_0x3b3aa6,{'params':{'objectID':_0x904f09['objectID'],'unitID':_0x904f09[_0x3fadfc(0x23b)]}});return this[_0x3fadfc(0x278)](_0x3e6c2a[_0x3fadfc(0x253)]['cfgEnableObjInherit']??!0x1),_0x3e6c2a[_0x3fadfc(0x253)][_0x3fadfc(0x3bb)];}async[_0x51c992(0x26c)](_0xf33740){const _0x130e07=_0x51c992;let _0x3b08bb=this[_0x130e07(0x2c3)]()+_0x130e07(0x38f);await this['_HTTPService'][_0x130e07(0x444)](_0x3b08bb,{'body':_0xf33740});}[_0x51c992(0x278)](_0x3d82a8){const _0x3152f3=_0x51c992;this[_0x3152f3(0x3d3)]=_0x3d82a8;}['getCfgEnableObjInherit'](){const _0x17dd5c=_0x51c992;return this[_0x17dd5c(0x3d3)];}};G=y([v(0x0,(0x0,t['Inject'])(l[_0x51c992(0x492)])),v(0x1,(0x0,t[_0x51c992(0x1ba)])(t[_0x51c992(0x46e)]))],G);function it(_0x5980d5){const _0x56f57f=_0x51c992;let _0x18f4a8=atob(_0x5980d5),_0x263c48=new Uint8Array(_0x18f4a8[_0x56f57f(0x187)]);for(let _0x10ad63=0x0;_0x10ad63<_0x18f4a8[_0x56f57f(0x187)];_0x10ad63++)_0x263c48[_0x10ad63]=_0x18f4a8[_0x56f57f(0x3a3)](_0x10ad63);return _0x263c48;}function at(_0x53e850){const _0x5be70e=_0x51c992;let _0x2ae03c='';for(let _0x1454b1=0x0;_0x1454b1<_0x53e850[_0x5be70e(0x187)];_0x1454b1++)_0x2ae03c+=String[_0x5be70e(0x201)](_0x53e850[_0x1454b1]);return btoa(_0x2ae03c);}function ot(_0x390d21,_0x457e26){const _0x557a5d=_0x51c992;let _0x2fc667=it(_0x457e26),_0x82aeb3=(0x0,f['randomBytes'])(0x10),_0x3aa137=(0x0,d[_0x557a5d(0x268)])(_0x2fc667,_0x82aeb3)[_0x557a5d(0x36d)]((0x0,f['utf8ToBytes'])(_0x390d21));return at((0x0,f[_0x557a5d(0x2d5)])(_0x82aeb3,_0x3aa137));}function st(){const _0x5dd0e7=_0x51c992;let _0x2ea16b=(0x0,u['getGlobalObject'])()[_0x5dd0e7(0x348)];if(typeof window<'u'&&window[_0x5dd0e7(0x1e8)]!==void 0x0&&_0x2ea16b){let _0x2da395={'time':Math[_0x5dd0e7(0x17d)](Date[_0x5dd0e7(0x472)]()/0x3e8),'domain':location['hostname']};return ot(JSON[_0x5dd0e7(0x45d)](_0x2da395),_0x2ea16b);}}let K=class{constructor(_0x58c2e9){const _0x5eb440=_0x51c992;this[_0x5eb440(0x22f)]=_0x58c2e9,this['_initRequestHeader']();}[_0x51c992(0x1d5)](){const _0x2aa034=_0x51c992;this['_httpService'][_0x2aa034(0x34d)]({'interceptor':(_0x1ff340,_0x34d96c)=>{const _0x24d059=_0x2aa034;let _0xf5a294=st();return _0xf5a294&&_0x1ff340['headers'][_0x24d059(0x35e)]('x-univer-host',_0xf5a294),_0x34d96c(_0x1ff340);}});}};K=y([v(0x0,(0x0,t['Inject'])(l['HTTPService']))],K);let q=class extends t[_0x51c992(0x251)]{constructor(_0xee4fbc,_0x5eb423,_0x19faa7){const _0x4de05e=_0x51c992;super(),this['_logService']=_0xee4fbc,this['_snapshotService']=_0x5eb423,this[_0x4de05e(0x451)]=_0x19faa7,g(this,_0x4de05e(0x24f),new i[(_0x4de05e(0x3f2))](null)),g(this,_0x4de05e(0x334),new i['Subject']()),g(this,_0x4de05e(0x31e),this[_0x4de05e(0x24f)][_0x4de05e(0x3e3)]()),g(this,_0x4de05e(0x433),this[_0x4de05e(0x334)]['asObservable']());}[_0x51c992(0x37b)](){const _0x1aef3c=_0x51c992;super[_0x1aef3c(0x37b)](),this[_0x1aef3c(0x334)]['complete'](),this[_0x1aef3c(0x24f)][_0x1aef3c(0x3a9)]();}async[_0x51c992(0x466)](_0x2dd0f6,_0x396349,_0x48008e,_0x29ac26){const _0x35904d=_0x51c992;this[_0x35904d(0x24f)]['next']({'unitId':_0x2dd0f6,'type':_0x396349,'subUnitId':_0x29ac26});let _0x23e66f=null;switch(_0x396349){case t[_0x35904d(0x2b4)][_0x35904d(0x3f5)]:_0x23e66f=await this[_0x35904d(0x2c1)][_0x35904d(0x43d)](_0x2dd0f6,_0x48008e,void 0x0,{'initialSubUnitId':_0x29ac26});break;case t[_0x35904d(0x2b4)][_0x35904d(0x47c)]:_0x23e66f=await this['_snapshotService'][_0x35904d(0x361)](_0x2dd0f6,_0x48008e);break;case t['UniverInstanceType'][_0x35904d(0x439)]:_0x23e66f=await this['_snapshotService'][_0x35904d(0x1d6)](_0x2dd0f6,_0x48008e);break;case t[_0x35904d(0x2b4)][_0x35904d(0x3f3)]:_0x23e66f=await this['_snapshotService'][_0x35904d(0x229)](_0x2dd0f6,_0x48008e);break;case t[_0x35904d(0x2b4)]['UNIVER_BASE']:_0x23e66f=await this[_0x35904d(0x2c1)][_0x35904d(0x411)](_0x2dd0f6,_0x48008e);break;case t['UniverInstanceType'][_0x35904d(0x3eb)]:_0x23e66f=await this['_snapshotService'][_0x35904d(0x30c)](_0x2dd0f6,_0x48008e);break;default:this[_0x35904d(0x396)][_0x35904d(0x420)](_0x35904d(0x269),'Unknown\x20type.\x20Will\x20not\x20load\x20files\x20from\x20remote\x20address.');}return _0x23e66f&&this[_0x35904d(0x334)][_0x35904d(0x443)](_0x23e66f),_0x23e66f;}async[_0x51c992(0x207)](_0x274556,_0x2b3ab9,_0x20c806){const _0x653113=_0x51c992;var _0x4158b6;this['_unitInfo$'][_0x653113(0x443)]({'unitId':_0x274556,'type':_0x2b3ab9,'subUnitId':_0x20c806});let _0x221edd=0x0,_0x7238b4=await((_0x4158b6=this[_0x653113(0x451)])==null?void 0x0:_0x4158b6[_0x653113(0x30a)](_0x274556));return _0x7238b4&&(_0x7238b4[_0x653113(0x3f8)]||_0x7238b4[_0x653113(0x2a2)]['length']!==0x0)&&(_0x221edd=_0x7238b4['rev']),_0x221edd===0x0&&this[_0x653113(0x396)]['debug'](_0x653113(0x269),_0x653113(0x1c1)),this[_0x653113(0x466)](_0x274556,_0x2b3ab9,_0x221edd,_0x20c806);}};q=y([v(0x0,t[_0x51c992(0x291)]),v(0x1,(0x0,t[_0x51c992(0x1ba)])(e[_0x51c992(0x1ed)])),v(0x2,(0x0,t[_0x51c992(0x47e)])(x))],q);let J=class{constructor(_0x5b51b2,_0x11ab21,_0x2ff0ab){const _0x1bf070=_0x51c992;this[_0x1bf070(0x22f)]=_0x5b51b2,this['_configService']=_0x11ab21,this[_0x1bf070(0x322)]=_0x2ff0ab,g(this,'_waitCount',0x0),g(this,_0x1bf070(0x357),new i[(_0x1bf070(0x29d))]()),g(this,_0x1bf070(0x2ab),this[_0x1bf070(0x357)]),g(this,_0x1bf070(0x343),new Map());}[_0x51c992(0x341)](_0x52a8d4){const _0x24eef5=_0x51c992;this[_0x24eef5(0x35b)]=_0x52a8d4,this[_0x24eef5(0x357)][_0x24eef5(0x443)](_0x52a8d4);}['getImageSourceCache'](_0x538024,_0x67566c){const _0x390f41=_0x51c992;if(_0x67566c===t[_0x390f41(0x3f9)][_0x390f41(0x398)]){let _0x1033a5=new Image();return _0x1033a5[_0x390f41(0x222)]=_0x538024,_0x1033a5;}return this[_0x390f41(0x343)][_0x390f41(0x403)](_0x538024);}[_0x51c992(0x42d)](_0xad7f43,_0x25baf2,_0x457db3){const _0x19998f=_0x51c992;_0x25baf2!==t[_0x19998f(0x3f9)][_0x19998f(0x398)]&&_0x457db3!=null&&this[_0x19998f(0x343)][_0x19998f(0x35e)](_0xad7f43,_0x457db3);}async[_0x51c992(0x1c5)](_0x241eea){const _0xa2f05=_0x51c992;try{let _0x28d167=this['_replaceFileID'](this[_0xa2f05(0x1da)](),''+_0x241eea),_0x2a09a5=(await this[_0xa2f05(0x22f)][_0xa2f05(0x403)](_0x28d167))[_0xa2f05(0x253)];if(_0x2a09a5[_0xa2f05(0x420)]&&_0x2a09a5['error'][_0xa2f05(0x25c)]===a[_0xa2f05(0x1e0)]['OK']){let _0x1add89=(0x0,t[_0xa2f05(0x3d4)])(_0x2a09a5['url'],this[_0xa2f05(0x352)]());return Promise[_0xa2f05(0x46d)](_0x1add89);}return Promise['reject'](_0x2a09a5['error']);}catch(_0x3b66f2){return Promise[_0xa2f05(0x261)](_0x3b66f2);}}async[_0x51c992(0x1bf)](_0x46e2c7){const _0x4de2a5=_0x51c992;let _0x53310c='';if(!p[_0x4de2a5(0x1d2)]['includes'](_0x46e2c7[_0x4de2a5(0x3fc)]))return this[_0x4de2a5(0x2d8)](),Promise[_0x4de2a5(0x261)](Error(t[_0x4de2a5(0x33b)][_0x4de2a5(0x24a)]));if(_0x46e2c7['size']>(0x0,p['getDrawingImageAllowSize'])())return this[_0x4de2a5(0x2d8)](),Promise[_0x4de2a5(0x261)](Error(t[_0x4de2a5(0x33b)]['ERROR_EXCEED_SIZE']));try{let _0x345a47=new FormData();_0x345a47[_0x4de2a5(0x483)](_0x4de2a5(0x185),_0x46e2c7);let _0x4922fe=this[_0x4de2a5(0x322)]['getFocusedUnit'](),_0x532426=_0x4922fe==null?void 0x0:_0x4922fe['getUnitId']();if(!_0x532426)throw Error('unitId\x20is\x20not\x20found');let _0x55ebd1=this[_0x4de2a5(0x382)]()+_0x4de2a5(0x3b0)+_0x46e2c7['size'][_0x4de2a5(0x3d6)]()+_0x4de2a5(0x419)+a[_0x4de2a5(0x38a)][_0x4de2a5(0x350)]+_0x4de2a5(0x412)+encodeURIComponent(_0x532426),_0x4187d7={'body':_0x345a47},_0x5700fb=(await this[_0x4de2a5(0x22f)][_0x4de2a5(0x484)](_0x55ebd1,_0x4187d7))[_0x4de2a5(0x253)];if(typeof _0x5700fb[_0x4de2a5(0x2ad)]!=_0x4de2a5(0x2dc))return this[_0x4de2a5(0x2d8)](),Promise[_0x4de2a5(0x261)](Error(t[_0x4de2a5(0x33b)][_0x4de2a5(0x356)]));_0x53310c=_0x5700fb[_0x4de2a5(0x2ad)];}catch{return this['_decreaseWaiting'](),Promise[_0x4de2a5(0x261)](Error(t[_0x4de2a5(0x33b)][_0x4de2a5(0x356)]));}return new Promise((_0x3ab916,_0x29ee65)=>{const _0x1941fc=_0x4de2a5;let _0x56fc15=new FileReader();_0x56fc15['readAsDataURL'](_0x46e2c7),_0x56fc15[_0x1941fc(0x36b)]=_0x5c5767=>{const _0x27af25=_0x1941fc;var _0x5b9611;let _0x7dddc2=(_0x5b9611=_0x5c5767[_0x27af25(0x280)])==null?void 0x0:_0x5b9611[_0x27af25(0x469)];if(_0x7dddc2==null){this[_0x27af25(0x2d8)](),_0x29ee65(Error(t['ImageUploadStatusType']['ERROR_IMAGE']));return;}_0x3ab916({'imageId':(0x0,t['generateRandomId'])(0x6),'imageSourceType':t['ImageSourceType'][_0x27af25(0x3e2)],'source':_0x53310c,'base64Cache':_0x7dddc2,'status':t['ImageUploadStatusType']['SUCCUSS']}),this[_0x27af25(0x2d8)]();};});}[_0x51c992(0x382)](){const _0x35f0d4=_0x51c992;let _0x215aa6=this[_0x35f0d4(0x214)][_0x35f0d4(0x310)](m);return(_0x215aa6==null?void 0x0:_0x215aa6[_0x35f0d4(0x18a)])??_0x35f0d4(0x386);}['_getSignURL'](){const _0x28d058=_0x51c992;let _0x2d48a7=this[_0x28d058(0x214)][_0x28d058(0x310)](m);return(_0x2d48a7==null?void 0x0:_0x2d48a7[_0x28d058(0x339)])??_0x28d058(0x4a0);}['_getDownloadEndpointURL'](){const _0x49923d=_0x51c992;let _0x1025f1=this[_0x49923d(0x214)][_0x49923d(0x310)](m);return(_0x1025f1==null?void 0x0:_0x1025f1[_0x49923d(0x24c)])??location['origin'];}[_0x51c992(0x20e)](_0x12f535,_0x525c49){const _0x14dd87=_0x51c992;return _0x12f535[_0x14dd87(0x45b)](_0x14dd87(0x1e2),_0x525c49);}[_0x51c992(0x2d8)](){const _0x8485d=_0x51c992;--this[_0x8485d(0x35b)],this[_0x8485d(0x357)][_0x8485d(0x443)](this[_0x8485d(0x35b)]);}};J=y([v(0x0,(0x0,t['Inject'])(l[_0x51c992(0x492)])),v(0x1,t['IConfigService']),v(0x2,(0x0,t['Inject'])(t['IUniverInstanceService']))],J);let Y=class{constructor(_0x158775,_0xd0472c){const _0x78f829=_0x51c992;this[_0x78f829(0x214)]=_0x158775,this[_0x78f829(0x3d7)]=_0xd0472c;}[_0x51c992(0x2c3)](){const _0x357278=_0x51c992;let _0x2a7c42=this[_0x357278(0x214)]['getConfig'](m);return(_0x2a7c42==null?void 0x0:_0x2a7c42[_0x357278(0x450)])??'/universer-api/authz';}async[_0x51c992(0x3f6)](_0x1bf1e6){const _0x4a6b0a=_0x51c992;let _0x3dc237=this['_getAPIPrefixPath']()+_0x4a6b0a(0x38f);return{'list':[{'title':_0x4a6b0a(0x2b8),'mentions':(await this[_0x4a6b0a(0x3d7)][_0x4a6b0a(0x403)](_0x3dc237,{'params':{'objectID':_0x1bf1e6['unitId'],'unitID':_0x1bf1e6[_0x4a6b0a(0x44c)]}}))['body']['collaborators'][_0x4a6b0a(0x231)](_0x33d23d=>({'objectId':_0x33d23d['id'],'name':_0x33d23d[_0x4a6b0a(0x330)][_0x4a6b0a(0x329)],'metadata':{'icon':_0x33d23d['subject'][_0x4a6b0a(0x45c)]},'label':_0x33d23d['subject'][_0x4a6b0a(0x329)],'objectType':t['MentionType'][_0x4a6b0a(0x41c)]})),'metadata':{},'type':t[_0x4a6b0a(0x25f)]['PERSON']}]};}};Y=y([v(0x0,(0x0,t[_0x51c992(0x1ba)])(t[_0x51c992(0x46e)])),v(0x1,(0x0,t['Inject'])(l[_0x51c992(0x492)]))],Y);let X=class extends t[_0x51c992(0x251)]{constructor(_0x50f839,_0x98ad1a,_0x30e917,_0xb5c4f5,_0x14d38b,_0xf5fa98){const _0x19b981=_0x51c992;super(),this[_0x19b981(0x4a1)]=_0x50f839,this[_0x19b981(0x322)]=_0x98ad1a,this[_0x19b981(0x1ab)]=_0x30e917,this[_0x19b981(0x177)]=_0xb5c4f5,this[_0x19b981(0x2d9)]=_0x14d38b,this[_0x19b981(0x2f5)]=_0xf5fa98,g(this,_0x19b981(0x36f),new Set()),this[_0x19b981(0x2d7)](()=>this[_0x19b981(0x36f)]['clear']()),this['disposeWithMe'](ct(this[_0x19b981(0x322)])[_0x19b981(0x481)](({unitId:_0x43bfad})=>this[_0x19b981(0x36f)][_0x19b981(0x404)](_0x43bfad))),this[_0x19b981(0x1ea)](),this['_initCloseConn'](),[t['UniverInstanceType']['UNIVER_DOC'],t['UniverInstanceType'][_0x19b981(0x439)],t['UniverInstanceType']['UNIVER_BASE'],t[_0x19b981(0x2b4)][_0x19b981(0x3f3)]][_0x19b981(0x1be)](_0x444e4f=>{const _0x1bdb9c=_0x19b981;this['disposeWithMe'](this[_0x1bdb9c(0x322)]['getTypeOfUnitDisposed$'](_0x444e4f)[_0x1bdb9c(0x481)](_0x1da032=>{const _0x4bb9e9=_0x1bdb9c;this['_closedUnits']['add'](_0x1da032[_0x4bb9e9(0x1c8)]()),this[_0x4bb9e9(0x4a1)]['get'](t[_0x4bb9e9(0x44f)])[_0x4bb9e9(0x1e9)](_0x1da032['getUnitId']());}));});}[_0x51c992(0x39c)](){const _0x34806e=_0x51c992;let _0x3e824f=async(_0x5a1b74,_0x57af0f)=>{const _0x1f87ac=_0x3ab5;let _0x41c6d3=await this[_0x1f87ac(0x2d9)][_0x1f87ac(0x345)](_0x5a1b74);this[_0x1f87ac(0x2be)]||this[_0x1f87ac(0x36f)][_0x1f87ac(0x2d4)](_0x5a1b74)||!this[_0x1f87ac(0x322)][_0x1f87ac(0x2e2)](_0x5a1b74)||_0x41c6d3[_0x1f87ac(0x40b)][_0x1f87ac(0x3a2)]((0x0,s[_0x1f87ac(0x3d8)])(_0x5cd221=>_0x5cd221[_0x1f87ac(0x309)]===e[_0x1f87ac(0x496)][_0x1f87ac(0x3e0)]),(0x0,s[_0x1f87ac(0x2ec)])((0x0,i[_0x1f87ac(0x335)])(this[_0x1f87ac(0x257)],this['_univerInstanceService'][_0x1f87ac(0x1ef)][_0x1f87ac(0x3a2)]((0x0,s[_0x1f87ac(0x3d8)])(_0x5074db=>_0x5074db[_0x1f87ac(0x1c8)]()===_0x5a1b74)))))[_0x1f87ac(0x481)](_0x5bd9df=>{const _0x59b820=_0x1f87ac;let {reason:_0x4c3968}=_0x5bd9df[_0x59b820(0x2e1)];this[_0x59b820(0x2f5)][_0x59b820(0x3e8)]({'id':_0x59b820(0x2cf),'data':_0x4c3968}),this[_0x59b820(0x36f)][_0x59b820(0x45a)](_0x5a1b74),this[_0x59b820(0x4a1)][_0x59b820(0x403)](t[_0x59b820(0x44f)])[_0x59b820(0x1e9)](_0x5a1b74);let _0x34f7f0=lt(_0x57af0f);_0x34f7f0!=null&&this[_0x59b820(0x27e)](_0x5a1b74,_0x34f7f0,a[_0x59b820(0x2e8)][_0x59b820(0x400)],!0x1),this[_0x59b820(0x2d9)][_0x59b820(0x2d2)](_0x5a1b74);});};ct(this[_0x34806e(0x322)])['pipe']((0x0,s[_0x34806e(0x3d8)])(({unitId:_0x59ee24})=>!(0x0,t[_0x34806e(0x1bc)])(_0x59ee24)),(0x0,s['takeUntil'])(this[_0x34806e(0x257)]))[_0x34806e(0x481)](({type:_0x3deefe,unitId:_0x5397d2})=>{const _0xd3bf2c=_0x34806e;_0x3e824f(_0x5397d2,_0x3deefe)[_0xd3bf2c(0x397)](_0x20ae69=>this[_0xd3bf2c(0x4a1)][_0xd3bf2c(0x403)](t[_0xd3bf2c(0x291)])['error'](_0x20ae69));});}[_0x51c992(0x1ea)](){const _0x3a1688=_0x51c992;let _0x283cb0=async(_0x287949,_0x57277a)=>{const _0x4fe940=_0x3ab5;let _0x39d624=await this[_0x4fe940(0x2d9)]['requireSession'](_0x287949);if(!(this[_0x4fe940(0x2be)]||this[_0x4fe940(0x36f)][_0x4fe940(0x2d4)](_0x287949)||!this[_0x4fe940(0x322)][_0x4fe940(0x2e2)](_0x287949))){if(_0x57277a===t[_0x4fe940(0x2b4)][_0x4fe940(0x3f5)]){let _0x84833c=this[_0x4fe940(0x4a1)][_0x4fe940(0x403)](r[_0x4fe940(0x2e7)]);await _0x84833c['initWorkbookPermissionChange'](_0x287949),_0x39d624[_0x4fe940(0x40b)][_0x4fe940(0x3a2)]((0x0,s[_0x4fe940(0x3d8)])(_0x2b93d3=>_0x2b93d3[_0x4fe940(0x309)]===e[_0x4fe940(0x496)][_0x4fe940(0x4a5)]),(0x0,s[_0x4fe940(0x2ec)])((0x0,i['merge'])(this[_0x4fe940(0x257)],_0x39d624[_0x4fe940(0x40b)][_0x4fe940(0x3a2)]((0x0,s[_0x4fe940(0x3d8)])(_0x46ccd3=>_0x46ccd3[_0x4fe940(0x309)]===e[_0x4fe940(0x496)]['SHOULD_CLOSE_CONN'])),this[_0x4fe940(0x322)][_0x4fe940(0x1ef)][_0x4fe940(0x3a2)]((0x0,s[_0x4fe940(0x3d8)])(_0x16665f=>_0x16665f[_0x4fe940(0x1c8)]()===_0x287949)))))[_0x4fe940(0x481)](_0x3ff0a0=>{const _0x4b8c33=_0x4fe940;let {objectId:_0x340e41}=_0x3ff0a0['data'];_0x340e41===_0x287949?_0x84833c[_0x4b8c33(0x3e9)](_0x287949):_0x84833c['refreshPermission'](_0x287949,_0x340e41);});return;}_0x39d624['event$']['pipe']((0x0,s[_0x4fe940(0x3d8)])(_0xbedd25=>_0xbedd25[_0x4fe940(0x309)]===e['CollaborationEvent']['UPDATE_PERMISSION_OBJ']),(0x0,s[_0x4fe940(0x2ec)])((0x0,i['merge'])(this[_0x4fe940(0x257)],_0x39d624[_0x4fe940(0x40b)][_0x4fe940(0x3a2)]((0x0,s[_0x4fe940(0x3d8)])(_0x720cc9=>_0x720cc9[_0x4fe940(0x309)]===e[_0x4fe940(0x496)][_0x4fe940(0x3e0)])),this[_0x4fe940(0x322)][_0x4fe940(0x1ef)][_0x4fe940(0x3a2)]((0x0,s[_0x4fe940(0x3d8)])(_0x1f02c0=>_0x1f02c0[_0x4fe940(0x1c8)]()===_0x287949)))))[_0x4fe940(0x481)](()=>{const _0x412f9d=_0x4fe940;this[_0x412f9d(0x3b5)](_0x287949,_0x57277a)[_0x412f9d(0x397)](_0x32f7c3=>this[_0x412f9d(0x4a1)][_0x412f9d(0x403)](t[_0x412f9d(0x291)])[_0x412f9d(0x420)](_0x32f7c3));}),await this[_0x4fe940(0x3b5)](_0x287949,_0x57277a);}};ct(this[_0x3a1688(0x322)])[_0x3a1688(0x3a2)]((0x0,s[_0x3a1688(0x3d8)])(({unitId:_0x466cb5})=>!(0x0,t[_0x3a1688(0x1bc)])(_0x466cb5)),(0x0,s['takeUntil'])(this[_0x3a1688(0x257)]))[_0x3a1688(0x481)](({type:_0x5647c2,unitId:_0x165c68})=>{const _0x8be8f3=_0x3a1688;_0x283cb0(_0x165c68,_0x5647c2)[_0x8be8f3(0x397)](_0x559aab=>this[_0x8be8f3(0x4a1)][_0x8be8f3(0x403)](t[_0x8be8f3(0x291)])[_0x8be8f3(0x420)](_0x559aab));});}async['_refreshUnitPermission'](_0x390d5d,_0x5cec4b){const _0x185e9d=_0x51c992;let _0x2928f1=lt(_0x5cec4b);if(_0x2928f1==null)return;let _0x5c8d9b=this[_0x185e9d(0x4a1)][_0x185e9d(0x403)](t['ObjectPermissionService']);if(_0x5c8d9b[_0x185e9d(0x217)]({'unitId':_0x390d5d,'objectId':_0x390d5d,'objectType':_0x2928f1})){await _0x5c8d9b[_0x185e9d(0x323)](_0x390d5d);return;}let _0x452c25=this[_0x185e9d(0x241)](_0x390d5d,_0x2928f1);if(!_0x452c25[_0x185e9d(0x187)])return;let _0x609719=await this[_0x185e9d(0x177)][_0x185e9d(0x3b8)]({'objectID':_0x390d5d,'objectType':_0x2928f1,'unitID':_0x390d5d,'actions':_0x452c25[_0x185e9d(0x231)](({action:_0x1263f2})=>_0x1263f2)});this[_0x185e9d(0x2be)]||this[_0x185e9d(0x36f)][_0x185e9d(0x2d4)](_0x390d5d)||!this[_0x185e9d(0x322)][_0x185e9d(0x2e2)](_0x390d5d)||_0x609719['forEach'](_0x35b40a=>{const _0x4afd7d=_0x185e9d;let _0x4da73a=_0x35b40a[_0x4afd7d(0x324)],_0x5955b8=_0x35b40a[_0x4afd7d(0x3b8)];_0x4da73a!=null&&_0x5955b8!=null&&_0x452c25[_0x4afd7d(0x3d8)](_0x1e7595=>_0x1e7595[_0x4afd7d(0x324)]===_0x4da73a)[_0x4afd7d(0x1be)](_0x5d2021=>this[_0x4afd7d(0x1ab)][_0x4afd7d(0x17f)](_0x5d2021['id'],_0x5955b8));});}['_getUnitPermissionPoints'](_0x2174ac,_0x29756f){const _0x19ce86=_0x51c992;let _0x1ab609=[];return this[_0x19ce86(0x1ab)][_0x19ce86(0x479)]()['forEach']((_0x48698d,_0x1c49d3)=>{const _0x516883=_0x19ce86;_0x48698d[_0x516883(0x481)](_0x35b6a8=>{const _0x297943=_0x516883;_0x35b6a8[_0x297943(0x3fc)]===_0x29756f&&_0x297943(0x44c)in _0x35b6a8&&_0x35b6a8[_0x297943(0x44c)]===_0x2174ac&&(!('objectId'in _0x35b6a8)||_0x35b6a8[_0x297943(0x42f)]===_0x2174ac)&&_0x1ab609[_0x297943(0x499)]({'id':_0x1c49d3,'action':_0x35b6a8[_0x297943(0x17a)]});})[_0x516883(0x2df)]();}),_0x1ab609;}[_0x51c992(0x27e)](_0x1f9e0f,_0x4db4ef,_0x533500,_0x2263d6){const _0x158903=_0x51c992;this[_0x158903(0x1ab)][_0x158903(0x479)]()[_0x158903(0x1be)]((_0x238329,_0x3dadb7)=>{const _0xf7db5d=_0x158903;let _0x179bd6=!0x1;_0x238329['subscribe'](_0x38e81f=>{const _0x5f15cb=_0x3ab5;_0x179bd6=_0x38e81f[_0x5f15cb(0x3fc)]===_0x4db4ef&&_0x38e81f[_0x5f15cb(0x17a)]===_0x533500&&'unitId'in _0x38e81f&&_0x38e81f[_0x5f15cb(0x44c)]===_0x1f9e0f&&(!(_0x5f15cb(0x42f)in _0x38e81f)||_0x38e81f[_0x5f15cb(0x42f)]===_0x1f9e0f);})[_0xf7db5d(0x2df)](),_0x179bd6&&this['_permissionService'][_0xf7db5d(0x17f)](_0x3dadb7,_0x2263d6);});}};X=y([v(0x0,(0x0,t[_0x51c992(0x1ba)])(t['Injector'])),v(0x1,t[_0x51c992(0x1dd)]),v(0x2,t[_0x51c992(0x255)]),v(0x3,t[_0x51c992(0x284)]),v(0x4,(0x0,t[_0x51c992(0x1ba)])(V)),v(0x5,(0x0,t[_0x51c992(0x1ba)])(_))],X);function ct(_0x46ef50){const _0x3b1477=_0x51c992;return(0x0,i[_0x3b1477(0x335)])(...[t[_0x3b1477(0x2b4)]['UNIVER_SHEET'],t[_0x3b1477(0x2b4)][_0x3b1477(0x47c)],t[_0x3b1477(0x2b4)]['UNIVER_SLIDE'],t[_0x3b1477(0x2b4)]['UNIVER_BOARD'],t[_0x3b1477(0x2b4)][_0x3b1477(0x387)]][_0x3b1477(0x231)](_0x546d8e=>_0x46ef50[_0x3b1477(0x389)](_0x546d8e)['pipe']((0x0,s[_0x3b1477(0x231)])(_0x45c565=>({'type':_0x546d8e,'unitId':_0x45c565[_0x3b1477(0x211)][_0x3b1477(0x1c8)]()})))));}function lt(_0x371436){const _0x3fe99c=_0x51c992;switch(_0x371436){case t[_0x3fe99c(0x2b4)]['UNIVER_SHEET']:return a[_0x3fe99c(0x1df)][_0x3fe99c(0x2c9)];case t[_0x3fe99c(0x2b4)][_0x3fe99c(0x47c)]:return a[_0x3fe99c(0x1df)]['Document'];case t['UniverInstanceType'][_0x3fe99c(0x439)]:return a[_0x3fe99c(0x1df)][_0x3fe99c(0x2c4)];case t[_0x3fe99c(0x2b4)][_0x3fe99c(0x3f3)]:return a[_0x3fe99c(0x1df)][_0x3fe99c(0x25b)];case t[_0x3fe99c(0x2b4)][_0x3fe99c(0x387)]:return a[_0x3fe99c(0x1df)][_0x3fe99c(0x31a)];default:return;}}let Z=class{constructor(_0x27abbf,_0x513d82){const _0x301cd2=_0x51c992;this[_0x301cd2(0x214)]=_0x27abbf,this[_0x301cd2(0x22f)]=_0x513d82;}async[_0x51c992(0x374)](_0x1f1eb6,_0x2eaa46){const _0x9c96e0=_0x51c992;var _0x2e82c3;let {unitID:_0x4f9be7,type:_0x270141,revision:_0x197767=0x0}=_0x2eaa46,_0x360909=this[_0x9c96e0(0x1cf)]()+'/'+_0x270141+'/unit/'+_0x4f9be7+'/rev/'+_0x197767,_0x44b37a=(await this[_0x9c96e0(0x22f)][_0x9c96e0(0x403)](_0x360909))[_0x9c96e0(0x253)],_0x224636=(_0x2e82c3=_0x44b37a[_0x9c96e0(0x178)])==null?void 0x0:_0x2e82c3[_0x9c96e0(0x226)];if(_0x224636){let _0x286d96=_0x224636==null?void 0x0:_0x224636[_0x9c96e0(0x2a0)];_0x224636[_0x9c96e0(0x2a0)]=e[_0x9c96e0(0x3c0)][_0x9c96e0(0x20c)]((0x0,e['b64DecodeUnicode'])(_0x286d96)),Object[_0x9c96e0(0x338)](_0x224636[_0x9c96e0(0x355)])[_0x9c96e0(0x1be)](([,_0x3013a3])=>{const _0x38ece8=_0x9c96e0;let _0xf7f5cb=_0x3013a3[_0x38ece8(0x2a0)];_0x3013a3['originalMeta']=e[_0x38ece8(0x3c0)]['encode']((0x0,e['b64DecodeUnicode'])(_0xf7f5cb));});}return _0x44b37a;}async[_0x51c992(0x271)](_0x5aa90f,_0x37d0e4){const _0x22e5b9=_0x51c992;let {unitID:_0x7591d7,type:_0x362093,blockID:_0x399342}=_0x37d0e4,_0x1bce01=this[_0x22e5b9(0x49d)]()+'/'+_0x362093+_0x22e5b9(0x198)+_0x7591d7+_0x22e5b9(0x264)+_0x399342;return(await this[_0x22e5b9(0x22f)]['get'](_0x1bce01))[_0x22e5b9(0x253)];}async[_0x51c992(0x3c4)](_0x4fc7a1,_0x53f7cf){const _0x141776=_0x51c992;let {unitID:_0x10d93c,type:_0x55cc37,blockID:_0x286e91}=_0x53f7cf,_0x1a22a6=this['_getAPIPrefix']()+'/block/'+_0x55cc37+_0x141776(0x198)+_0x10d93c+_0x141776(0x264)+_0x286e91;return(await this[_0x141776(0x22f)][_0x141776(0x403)](_0x1a22a6))[_0x141776(0x253)];}async[_0x51c992(0x45f)](_0x4bf44d,_0x1dbc64){const _0x4927aa=_0x51c992;let {unitID:_0x144848,type:_0x8da564,from:_0x2e4210,to:_0x485595}=_0x1dbc64,_0x6983d7=this[_0x4927aa(0x49d)]()+'/'+_0x8da564+'/unit/'+_0x144848+_0x4927aa(0x19e)+_0x2e4210+_0x4927aa(0x316)+_0x485595;return(await this[_0x4927aa(0x22f)][_0x4927aa(0x403)](_0x6983d7))['body'];}['getSnapshotAPIPath'](){const _0x4671a5=_0x51c992;return this[_0x4671a5(0x214)][_0x4671a5(0x310)](_0x4671a5(0x3a6))??this[_0x4671a5(0x49d)]();}[_0x51c992(0x49d)](){const _0x3a147d=_0x51c992;let _0x26951b=this[_0x3a147d(0x214)]['getConfig'](m);return(_0x26951b==null?void 0x0:_0x26951b['snapshotServerUrl'])??'/universer-api/snapshot';}async[_0x51c992(0x372)](_0x2a08d7,_0x3e9795){const _0x51c236=_0x51c992;let _0x35a72e=_0x51c236(0x20b)+_0x3e9795[_0x51c236(0x3fc)]+_0x51c236(0x198)+_0x3e9795[_0x51c236(0x23b)]+'/resources';return(await this['_httpService'][_0x51c236(0x403)](_0x35a72e,{'params':{'resourceId':JSON[_0x51c236(0x45d)](_0x3e9795[_0x51c236(0x238)])}}))[_0x51c236(0x253)];}['saveSnapshot'](){const _0x2da311=_0x51c992;throw Error(_0x2da311(0x1b6));}[_0x51c992(0x41a)](){const _0x153487=_0x51c992;throw Error(_0x153487(0x1b6));}['saveSheetBlock'](){const _0x417b9c=_0x51c992;throw Error(_0x417b9c(0x1b6));}[_0x51c992(0x49a)](){const _0x48ae7d=_0x51c992;throw Error(_0x48ae7d(0x1b6));}[_0x51c992(0x331)](){throw Error('This\x20method\x20should\x20not\x20be\x20called\x20on\x20the\x20client\x20side!');}[_0x51c992(0x317)](){const _0x179602=_0x51c992;throw Error(_0x179602(0x1b6));}};Z=y([v(0x0,t['IConfigService']),v(0x1,(0x0,t[_0x51c992(0x1ba)])(l['HTTPService']))],Z);let Q=class extends t[_0x51c992(0x3a0)]{constructor(_0x41c03e,_0x3aade6,_0x2eca12,_0x576a39,_0x46d183,_0x5aaa45){const _0x4a6c15=_0x51c992;super(_0x41c03e,_0x3aade6,_0x2eca12,_0x576a39),this[_0x4a6c15(0x364)]=_0x46d183,this[_0x4a6c15(0x396)]=_0x5aaa45;}[_0x51c992(0x465)](_0x5db439,_0x21d7af){const _0x111691=_0x51c992;let _0x305a84=this[_0x111691(0x28e)](_0x5db439);if(_0x305a84)try{let _0x2c7a1c=this[_0x111691(0x314)](_0x305a84,_0x21d7af);this['_substituteUndoStack'](_0x5db439,_0x2c7a1c);}catch(_0x4396a0){this[_0x111691(0x396)]['error']('[CollaborationUndoRedoService]',_0x4396a0),this['_clearUndo'](_0x5db439);}let _0x480f02=this[_0x111691(0x191)](_0x5db439);if(_0x480f02)try{let _0x28f8b3=this[_0x111691(0x314)](_0x480f02,_0x21d7af);this[_0x111691(0x248)](_0x5db439,_0x28f8b3);}catch(_0x51a071){this['_logService'][_0x111691(0x420)](_0x51a071),this[_0x111691(0x2bc)](_0x5db439);}}['_clearUndo'](_0x161795){const _0x440561=_0x51c992;let _0x2d46a3=this[_0x440561(0x28e)](_0x161795);_0x2d46a3&&(_0x2d46a3[_0x440561(0x187)]=0x0,this['_updateStatus']());}['_clearRedo'](_0x3f77f6){const _0x5ca949=_0x51c992;let _0xee0cd=this[_0x5ca949(0x191)](_0x3f77f6);_0xee0cd&&(_0xee0cd[_0x5ca949(0x187)]=0x0,this['_updateStatus']());}[_0x51c992(0x470)](_0x58b5b1,_0xae4c49){const _0x2b892b=_0x51c992;this[_0x2b892b(0x18e)][_0x2b892b(0x35e)](_0x58b5b1,_0xae4c49),this['_updateStatus']();}[_0x51c992(0x248)](_0x2f0f07,_0x248524){const _0x53091a=_0x51c992;this[_0x53091a(0x2b0)][_0x53091a(0x35e)](_0x2f0f07,_0x248524),this[_0x53091a(0x1a3)]();}[_0x51c992(0x314)](_0x4edba5,_0xaa8263){const _0x32e180=_0x51c992;let _0x37eff6=[],_0x5facb3=_0xaa8263,_0x2d0804=_0xaa8263;for(let _0x2ca198=_0x4edba5[_0x32e180(0x187)]-0x1;_0x2ca198>=0x0;_0x2ca198--){let {unitID:_0x4a2043,undoMutations:_0x1606d0,redoMutations:_0x5cc682}=_0x4edba5[_0x2ca198],_0x317568=this[_0x32e180(0x364)][_0x32e180(0x262)](_0x5facb3,_0x1606d0),_0x45a465=this[_0x32e180(0x364)][_0x32e180(0x262)](_0x2d0804,_0x5cc682);if((0x0,e[_0x32e180(0x422)])(_0x317568)||(0x0,e[_0x32e180(0x422)])(_0x45a465)){this[_0x32e180(0x396)][_0x32e180(0x420)]('[CollaborationUndoRedoService]',_0x32e180(0x41d),_0x317568,_0x45a465);break;}_0x5facb3=_0x317568[_0x32e180(0x3c6)],_0x2d0804=_0x45a465['c1Prime'],_0x37eff6[_0x32e180(0x499)]({'unitID':_0x4a2043,'undoMutations':_0x317568[_0x32e180(0x1d1)],'redoMutations':_0x45a465[_0x32e180(0x1d1)]});}return _0x37eff6['reverse']();}};Q=y([v(0x0,t[_0x51c992(0x1dd)]),v(0x1,t['ICommandService']),v(0x2,t['IContextService']),v(0x3,t[_0x51c992(0x46e)]),v(0x4,e['ITransformService']),v(0x5,t[_0x51c992(0x291)])],Q);let $=class extends t[_0x51c992(0x1d4)]{constructor(_0x4dfe6d=ee,_0x56147d,_0x38f399,_0x13f469){const _0x2c5d2c=_0x51c992;super(),this['_config']=_0x4dfe6d,this[_0x2c5d2c(0x396)]=_0x56147d,this[_0x2c5d2c(0x4a1)]=_0x38f399,this[_0x2c5d2c(0x214)]=_0x13f469;let {..._0x5eea75}=(0x0,t[_0x2c5d2c(0x335)])({},ee,this[_0x2c5d2c(0x391)]);if(!_0x5eea75[_0x2c5d2c(0x18d)])throw Error('[UniverCollaborationClientPlugin]:\x20you\x20must\x20provide\x20a\x20socketService\x20implementation\x20in\x20config!');this['_config']=_0x5eea75,this['_configService'][_0x2c5d2c(0x409)](m,_0x5eea75);}[_0x51c992(0x414)](){const _0x27eeda=_0x51c992;this[_0x27eeda(0x214)][_0x27eeda(0x409)](t[_0x27eeda(0x2af)],this[_0x27eeda(0x391)][_0x27eeda(0x491)]??[]),this[_0x27eeda(0x2bf)](),this[_0x27eeda(0x362)]();}[_0x51c992(0x2bf)](){const _0x25225d=_0x51c992;var _0x3fd2a2,_0x31dbe2;this[_0x25225d(0x4a1)][_0x25225d(0x2d4)](t['IUndoRedoService'])&&this[_0x25225d(0x396)][_0x25225d(0x420)]('[UniverCollaborationClientPlugin]','you\x20should\x20override\x20\x22IUndoRedoService\x22\x20provided\x20in\x20\x22core\x22\x20package!');let _0x491d01=(0x0,t[_0x25225d(0x260)])([[t[_0x25225d(0x390)],{'useClass':Q}],[Xe,{'useValue':Ze()}],[V],[b],[S],[W],[K],[ae],[X],[_],[q],[qe,{'useClass':this[_0x25225d(0x391)]['socketService']}],[e[_0x25225d(0x43c)],{'useClass':Z}],[t[_0x25225d(0x284)],{'useClass':G}],[t[_0x25225d(0x2f0)],{'useClass':J}],[nt,{'useClass':U}],[t['IMentionIOService'],{'useClass':Y}],[H],[tt]],(_0x3fd2a2=this[_0x25225d(0x391)])==null?void 0x0:_0x3fd2a2[_0x25225d(0x300)]);if(!((_0x31dbe2=this[_0x25225d(0x391)])!=null&&_0x31dbe2['enableSingleActiveInstanceLock'])){let _0x93b5c0=_0x491d01[_0x25225d(0x48f)](([_0xc9cc7d])=>_0xc9cc7d===C);_0x93b5c0!==-0x1&&_0x491d01['splice'](_0x93b5c0,0x1);}(0x0,t[_0x25225d(0x349)])(this[_0x25225d(0x4a1)],_0x491d01);}['_initDependencies'](){const _0x1ff06=_0x51c992;var _0x2c72af,_0x582561;if(this[_0x1ff06(0x4a1)]['get'](l['HTTPService'])[_0x1ff06(0x34d)]({'priority':0x14,'interceptor':(0x0,l['ThresholdInterceptorFactory'])({'maxParallel':0x6})}),!((_0x2c72af=this['_config'])!=null&&_0x2c72af[_0x1ff06(0x275)])){var _0x3dcd49;(_0x3dcd49=this[_0x1ff06(0x4a1)]['get'](x,t['Quantity'][_0x1ff06(0x277)]))==null||_0x3dcd49['disableLocalCache']();}(_0x582561=this[_0x1ff06(0x391)])!=null&&_0x582561[_0x1ff06(0x26d)]&&(0x0,t[_0x1ff06(0x378)])(this[_0x1ff06(0x4a1)],[[W]]),(0x0,t[_0x1ff06(0x378)])(this['_injector'],[[K],[H],[X]]);}};g($,'pluginName',_0x51c992(0x437)),g($,_0x51c992(0x3be),$e),g($,_0x51c992(0x21f),et),$=y([(0x0,t[_0x51c992(0x367)])(u[_0x51c992(0x445)],l[_0x51c992(0x2eb)],e[_0x51c992(0x2ff)]),v(0x1,t['ILogService']),v(0x2,(0x0,t['Inject'])(t['Injector'])),v(0x3,t[_0x51c992(0x46e)])],$),Object[_0x51c992(0x478)](exports,_0x51c992(0x3b7),{'enumerable':!0x0,'get':function(){return G;}}),Object['defineProperty'](exports,'AwaitingState',{'enumerable':!0x0,'get':function(){return k;}}),Object[_0x51c992(0x478)](exports,_0x51c992(0x270),{'enumerable':!0x0,'get':function(){return A;}}),Object[_0x51c992(0x478)](exports,_0x51c992(0x2ca),{'enumerable':!0x0,'get':function(){return I;}}),Object[_0x51c992(0x478)](exports,_0x51c992(0x3bc),{'enumerable':!0x0,'get':function(){return z;}}),exports[_0x51c992(0x49c)]=m,Object[_0x51c992(0x478)](exports,_0x51c992(0x2f8),{'enumerable':!0x0,'get':function(){return U;}}),Object[_0x51c992(0x478)](exports,_0x51c992(0x44d),{'enumerable':!0x0,'get':function(){return H;}}),Object[_0x51c992(0x478)](exports,_0x51c992(0x313),{'enumerable':!0x0,'get':function(){return P;}}),Object[_0x51c992(0x478)](exports,_0x51c992(0x370),{'enumerable':!0x0,'get':function(){return J;}}),Object[_0x51c992(0x478)](exports,_0x51c992(0x318),{'enumerable':!0x0,'get':function(){return ve;}}),Object[_0x51c992(0x478)](exports,_0x51c992(0x186),{'enumerable':!0x0,'get':function(){return V;}}),Object[_0x51c992(0x478)](exports,_0x51c992(0x480),{'enumerable':!0x0,'get':function(){return Ye;}}),exports[_0x51c992(0x34f)]=Be,exports['CollaborationUIEventId']=ie,exports[_0x51c992(0x2fc)]=_,Object[_0x51c992(0x478)](exports,'CollaborativeUndoRedoService',{'enumerable':!0x0,'get':function(){return Q;}}),exports[_0x51c992(0x200)]=ae,Object[_0x51c992(0x478)](exports,_0x51c992(0x482),{'enumerable':!0x0,'get':function(){return j;}}),exports[_0x51c992(0x3fd)]=_0x51c992(0x3c5),exports['DEFAULT_REMOTE_UNISCRIPT_EXECUTION_ENDPOINT']=_0x51c992(0x3fe),exports['DEFAULT_WS_SESSION_TICKET_URL']=_0x51c992(0x1fb),Object['defineProperty'](exports,_0x51c992(0x3b9),{'enumerable':!0x0,'get':function(){return q;}}),Object[_0x51c992(0x478)](exports,_0x51c992(0x34c),{'enumerable':!0x0,'get':function(){return F;}}),Object[_0x51c992(0x478)](exports,_0x51c992(0x40e),{'enumerable':!0x0,'get':function(){return N;}}),exports[_0x51c992(0x2e5)]=_0x51c992(0x3e7),exports['HEARTBEAT_TIMEOUT_KEY']=_0x51c992(0x240),exports[_0x51c992(0x410)]=nt,exports[_0x51c992(0x22b)]=Xe,exports[_0x51c992(0x359)]=qe,exports['ILocalCacheService']=x,exports[_0x51c992(0x346)]=We,exports[_0x51c992(0x358)]=C,exports[_0x51c992(0x243)]=0x3e8,exports[_0x51c992(0x2d3)]=_0x51c992(0x243),Object[_0x51c992(0x478)](exports,_0x51c992(0x1c3),{'enumerable':!0x0,'get':function(){return b;}}),Object[_0x51c992(0x478)](exports,_0x51c992(0x1b8),{'enumerable':!0x0,'get':function(){return Y;}}),Object[_0x51c992(0x478)](exports,_0x51c992(0x203),{'enumerable':!0x0,'get':function(){return M;}}),Object[_0x51c992(0x478)](exports,_0x51c992(0x1b7),{'enumerable':!0x0,'get':function(){return B;}}),Object[_0x51c992(0x478)](exports,'PendingState',{'enumerable':!0x0,'get':function(){return O;}}),exports[_0x51c992(0x23a)]=_0x51c992(0x327),exports['RETRY_CONNECTING_MAX_COUNT_KEY']=_0x51c992(0x303),exports[_0x51c992(0x1c2)]=ge,Object[_0x51c992(0x478)](exports,'SheetCollaborationEntity',{'enumerable':!0x0,'get':function(){return L;}}),Object['defineProperty'](exports,_0x51c992(0x325),{'enumerable':!0x0,'get':function(){return S;}}),Object['defineProperty'](exports,_0x51c992(0x351),{'enumerable':!0x0,'get':function(){return R;}}),Object[_0x51c992(0x478)](exports,_0x51c992(0x471),{'enumerable':!0x0,'get':function(){return Z;}}),Object[_0x51c992(0x478)](exports,_0x51c992(0x487),{'enumerable':!0x0,'get':function(){return D;}}),exports[_0x51c992(0x3d2)]=xe,Object['defineProperty'](exports,_0x51c992(0x19f),{'enumerable':!0x0,'get':function(){return $;}}),exports['createUniverCollaborationAdapter']=Ze,exports['deserializeToCombResponse']=Ge,exports[_0x51c992(0x3c3)]=ye,exports['serializeCombRequest']=Ke;