@univerjs-pro/collaboration-client 0.25.0 → 0.25.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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 +11 -11
package/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- const _0x1de16c=_0x3896;(function(_0x11be8d,_0x49e442){const _0x1fad69=_0x3896,_0x51ca26=_0x11be8d();while(!![]){try{const _0x1a2d2b=parseInt(_0x1fad69(0x276))/0x1+-parseInt(_0x1fad69(0x1d6))/0x2+-parseInt(_0x1fad69(0x13b))/0x3*(-parseInt(_0x1fad69(0x345))/0x4)+parseInt(_0x1fad69(0x304))/0x5+parseInt(_0x1fad69(0x323))/0x6+-parseInt(_0x1fad69(0x3b3))/0x7*(-parseInt(_0x1fad69(0x290))/0x8)+parseInt(_0x1fad69(0x17e))/0x9*(-parseInt(_0x1fad69(0x319))/0xa);if(_0x1a2d2b===_0x49e442)break;else _0x51ca26['push'](_0x51ca26['shift']());}catch(_0x101902){_0x51ca26['push'](_0x51ca26['shift']());}}}(_0x4f3f,0x567d8),Object[_0x1de16c(0x310)](exports,Symbol[_0x1de16c(0x2b2)],{'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/network'),l=require('@univerjs-pro/license'),u=require('@univerjs/drawing'),d=require('@noble/ciphers/aes.js'),f=require('@noble/ciphers/utils.js');const p='ws://127.0.0.1:8000/universer-api/comb/connect',m=0x4e20;function ee(_0x3581ae){const _0x197530=_0x1de16c;return JSON[_0x197530(0x2d8)](_0x3581ae)[_0x197530(0x3c7)];}function h(_0x198375){'@babel/helpers - typeof';const _0x39b50b=_0x1de16c;return h=typeof Symbol=='function'&&typeof Symbol['iterator']==_0x39b50b(0x1b3)?function(_0x4ef208){return typeof _0x4ef208;}:function(_0x5a162b){const _0x5c935e=_0x39b50b;return _0x5a162b&&typeof Symbol==_0x5c935e(0x31e)&&_0x5a162b[_0x5c935e(0x340)]===Symbol&&_0x5a162b!==Symbol['prototype']?_0x5c935e(0x1b3):typeof _0x5a162b;},h(_0x198375);}function te(_0x381074,_0x465623){const _0x4ccc24=_0x1de16c;if(h(_0x381074)!=_0x4ccc24(0x29f)||!_0x381074)return _0x381074;var _0x59407b=_0x381074[Symbol[_0x4ccc24(0x228)]];if(_0x59407b!==void 0x0){var _0x50a718=_0x59407b[_0x4ccc24(0x21c)](_0x381074,_0x465623||_0x4ccc24(0x1aa));if(h(_0x50a718)!=_0x4ccc24(0x29f))return _0x50a718;throw TypeError(_0x4ccc24(0x24c));}return(_0x465623===_0x4ccc24(0x239)?String:Number)(_0x381074);}function ne(_0x4c9768){const _0x2c3804=_0x1de16c;var _0x1076ee=te(_0x4c9768,_0x2c3804(0x239));return h(_0x1076ee)==_0x2c3804(0x1b3)?_0x1076ee:_0x1076ee+'';}function g(_0x237c9a,_0x5f5901,_0xa78bc8){const _0x1a697a=_0x1de16c;return(_0x5f5901=ne(_0x5f5901))in _0x237c9a?Object[_0x1a697a(0x310)](_0x237c9a,_0x5f5901,{'value':_0xa78bc8,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x237c9a[_0x5f5901]=_0xa78bc8,_0x237c9a;}let re=function(_0x464dda){const _0x15f4c3=_0x1de16c;return _0x464dda[_0x15f4c3(0x3c6)]='OTHER_CLIENT_EDITING',_0x464dda['PERMISSION_DENIED']=_0x15f4c3(0x147),_0x464dda[_0x15f4c3(0x171)]=_0x15f4c3(0x171),_0x464dda['CLOSE_ROOM']='CLOSE_ROOM',_0x464dda[_0x15f4c3(0x21a)]=_0x15f4c3(0x21a),_0x464dda[_0x15f4c3(0x29a)]=_0x15f4c3(0x29a),_0x464dda[_0x15f4c3(0x1fa)]=_0x15f4c3(0x1fa),_0x464dda['SUBMIT_CHANGESET_TIMEOUT']=_0x15f4c3(0x2b3),_0x464dda;}({});var _=class{constructor(){const _0x16b318=_0x1de16c;g(this,'_event$',new i[(_0x16b318(0x3c5))]()),g(this,'event$',this[_0x16b318(0x3e5)]['asObservable']());}[_0x1de16c(0x262)](_0x1f8946){const _0x4ff7a4=_0x1de16c;this[_0x4ff7a4(0x3e5)][_0x4ff7a4(0x286)](_0x1f8946);}},ie=class{constructor(){const _0x55cbf6=_0x1de16c;g(this,_0x55cbf6(0x230),new i[(_0x55cbf6(0x3c5))]()),g(this,_0x55cbf6(0x2ff),this[_0x55cbf6(0x230)][_0x55cbf6(0x1ea)]());}[_0x1de16c(0x26e)](_0x2e5e27){const _0x788472=_0x1de16c;this['_commentUpdate$'][_0x788472(0x286)](_0x2e5e27);}};function v(_0x1a136c,_0x356cac){return function(_0x29faac,_0x40d199){_0x356cac(_0x29faac,_0x40d199,_0x1a136c);};}function y(_0xcd9312,_0x560e9e,_0x3573d8,_0x5d62c7){const _0x593fdd=_0x1de16c;var _0xcde944=arguments['length'],_0x45c2d6=_0xcde944<0x3?_0x560e9e:_0x5d62c7===null?_0x5d62c7=Object[_0x593fdd(0x3aa)](_0x560e9e,_0x3573d8):_0x5d62c7,_0x2925e2;if(typeof Reflect=='object'&&typeof Reflect[_0x593fdd(0x22e)]=='function')_0x45c2d6=Reflect[_0x593fdd(0x22e)](_0xcd9312,_0x560e9e,_0x3573d8,_0x5d62c7);else{for(var _0x4f64f6=_0xcd9312[_0x593fdd(0x3c7)]-0x1;_0x4f64f6>=0x0;_0x4f64f6--)(_0x2925e2=_0xcd9312[_0x4f64f6])&&(_0x45c2d6=(_0xcde944<0x3?_0x2925e2(_0x45c2d6):_0xcde944>0x3?_0x2925e2(_0x560e9e,_0x3573d8,_0x45c2d6):_0x2925e2(_0x560e9e,_0x3573d8))||_0x45c2d6);}return _0xcde944>0x3&&_0x45c2d6&&Object[_0x593fdd(0x310)](_0x560e9e,_0x3573d8,_0x45c2d6),_0x45c2d6;}let b=class extends t[_0x1de16c(0x1d2)]{constructor(_0x17460f,_0x2bd7bd){const _0x11e222=_0x1de16c;super(),this[_0x11e222(0x2a7)]=_0x17460f,this[_0x11e222(0x2fe)]=_0x2bd7bd,g(this,_0x11e222(0x2ae),new Map()),g(this,_0x11e222(0x225),new i[(_0x11e222(0x3c5))]()),this[_0x11e222(0x3b8)]((0x0,i['merge'])(this[_0x11e222(0x2a7)][_0x11e222(0x232)](t[_0x11e222(0x20a)]['UNIVER_SHEET'])[_0x11e222(0x200)]((0x0,s[_0x11e222(0x2fc)])(_0x3dc7a9=>_0x3dc7a9['getUnitId']())),this['_univerInstanceService'][_0x11e222(0x232)](t['UniverInstanceType'][_0x11e222(0x198)])[_0x11e222(0x200)]((0x0,s[_0x11e222(0x2fc)])(_0x4cbb3d=>_0x4cbb3d[_0x11e222(0x270)]())))['subscribe'](_0x4eb96c=>this[_0x11e222(0x35c)](_0x4eb96c)));}[_0x1de16c(0x1f4)](_0x58e1ca){const _0x4e3476=_0x1de16c;return this[_0x4e3476(0x2ae)]['has'](_0x58e1ca)?(0x0,i['of'])(this['_roomMembers'][_0x4e3476(0x373)](_0x58e1ca)):this[_0x4e3476(0x225)][_0x4e3476(0x200)]((0x0,s[_0x4e3476(0x2fc)])(_0x4f5fb4=>{const _0x2702ec=_0x4e3476;if(_0x4f5fb4===_0x58e1ca)return this[_0x2702ec(0x2ae)][_0x2702ec(0x373)](_0x4f5fb4);}));}['setCurrentUser'](_0x1514c0){const _0x4063b1=_0x1de16c;this[_0x4063b1(0x2fe)][_0x4063b1(0x178)](_0x1514c0);}[_0x1de16c(0x325)](){return this['_userManagerService']['getCurrentUser']();}[_0x1de16c(0x3dc)](_0x475dfe,_0xc461ad){const _0x32b6df=_0x1de16c;let _0x55be3d=this[_0x32b6df(0x2ae)][_0x32b6df(0x373)](_0x475dfe);_0x55be3d||(_0x55be3d=new ae(),this[_0x32b6df(0x2ae)][_0x32b6df(0x248)](_0x475dfe,_0x55be3d),this[_0x32b6df(0x225)][_0x32b6df(0x286)](_0x475dfe)),_0x55be3d[_0x32b6df(0x3dc)](_0xc461ad);}['removeMember'](_0x4e0166,_0xad7d41){const _0x35f0d=_0x1de16c;let _0x51ca7b=this['_roomMembers'][_0x35f0d(0x373)](_0x4e0166);_0x51ca7b&&_0x51ca7b[_0x35f0d(0x3ad)](_0xad7d41);}[_0x1de16c(0x138)](_0x577c94){const _0x206598=_0x1de16c;return this[_0x206598(0x2ae)]['get'](_0x577c94);}[_0x1de16c(0x269)](_0x487d55,_0x297282){const _0x1b4129=_0x1de16c;let _0x3d75d7=this['_roomMembers'][_0x1b4129(0x373)](_0x487d55);if(_0x3d75d7)return _0x3d75d7['getMember'](_0x297282);}[_0x1de16c(0x35c)](_0x5ab907){const _0x493b31=_0x1de16c;let _0x10fa23=this[_0x493b31(0x2ae)][_0x493b31(0x373)](_0x5ab907);_0x10fa23&&(_0x10fa23[_0x493b31(0x317)](),this[_0x493b31(0x2ae)][_0x493b31(0x1d7)](_0x5ab907));}[_0x1de16c(0x317)](){const _0x244735=_0x1de16c;this['_roomMembers'][_0x244735(0x2f3)](_0x4f863a=>_0x4f863a[_0x244735(0x317)]()),this[_0x244735(0x2ae)][_0x244735(0x12f)](),this[_0x244735(0x225)][_0x244735(0x183)]();}};b=y([v(0x0,t[_0x1de16c(0x1ca)]),v(0x1,(0x0,t[_0x1de16c(0x20f)])(t[_0x1de16c(0x13e)]))],b);var ae=class extends t[_0x1de16c(0x1d2)]{constructor(..._0x20cb0c){const _0x5ee2cc=_0x1de16c;super(..._0x20cb0c),g(this,_0x5ee2cc(0x1df),new Map()),g(this,'_members$',new i[(_0x5ee2cc(0x19f))](this[_0x5ee2cc(0x1df)])),g(this,_0x5ee2cc(0x18c),this[_0x5ee2cc(0x2b0)]['asObservable']());}[_0x1de16c(0x317)](){const _0x4d6408=_0x1de16c;this['_members']['clear'](),this[_0x4d6408(0x2b0)][_0x4d6408(0x183)]();}[_0x1de16c(0x3dc)](_0x82943d){const _0x20aae2=_0x1de16c;this[_0x20aae2(0x1df)][_0x20aae2(0x248)](_0x82943d[_0x20aae2(0x33e)],_0x82943d),this['_emitMembers']();}[_0x1de16c(0x3ad)](_0x5a034a){this['_members']['delete'](_0x5a034a),this['_emitMembers']();}[_0x1de16c(0x269)](_0x5c4359){const _0xeeab6b=_0x1de16c;return this[_0xeeab6b(0x1df)][_0xeeab6b(0x373)](_0x5c4359);}[_0x1de16c(0x363)](){const _0x37d3ac=_0x1de16c;return Array[_0x37d3ac(0x2a6)](this['_members'][_0x37d3ac(0x3f9)]());}[_0x1de16c(0x162)](){const _0x5ef064=_0x1de16c;this[_0x5ef064(0x2b0)]['next'](this['_members']);}};let oe=function(_0x598088){const _0xb878c=_0x1de16c;return _0x598088[_0x598088[_0xb878c(0x1b8)]=0x0]=_0xb878c(0x1b8),_0x598088[_0x598088[_0xb878c(0x12b)]=0x1]=_0xb878c(0x12b),_0x598088[_0x598088[_0xb878c(0x2d7)]=0x2]='OFFLINE',_0x598088[_0x598088[_0xb878c(0x28c)]=0x3]=_0xb878c(0x28c),_0x598088;}({});const se={[a[_0x1de16c(0x343)]['FAIL']]:_0x1de16c(0x1ad),[a[_0x1de16c(0x343)][_0x1de16c(0x209)]]:_0x1de16c(0x293),[a[_0x1de16c(0x343)][_0x1de16c(0x27e)]]:'session.room-not-exists',[a[_0x1de16c(0x343)]['JOIN_ROOM_PERMISSION_DENIED']]:_0x1de16c(0x3fb),[a['CmdRspCode'][_0x1de16c(0x314)]]:_0x1de16c(0x3ef)};let x=class extends t[_0x1de16c(0x1f0)]{get[_0x1de16c(0x36b)](){return this['_sessionStatus$']['getValue']();}constructor(_0x3e6122,_0x524c0f,_0x25d906,_0x2cf5d9,_0x2649e4,_0x59819d,_0x552129,_0x2f483b){const _0x41fc44=_0x1de16c;super(),this[_0x41fc44(0x1d3)]=_0x3e6122,this['_logService']=_0x25d906,this[_0x41fc44(0x2aa)]=_0x2cf5d9,this['_memberService']=_0x2649e4,this['_commentService']=_0x59819d,this['_collaborationUIEventService']=_0x552129,this[_0x41fc44(0x19b)]=_0x2f483b,g(this,_0x41fc44(0x2af),new i[(_0x41fc44(0x19f))](0x0)),g(this,'sessionStatus$',this[_0x41fc44(0x2af)][_0x41fc44(0x1ea)]()),g(this,_0x41fc44(0x3e5),new i[(_0x41fc44(0x3c5))]()),g(this,_0x41fc44(0x201),this[_0x41fc44(0x3e5)][_0x41fc44(0x1ea)]()),g(this,_0x41fc44(0x260),void 0x0),g(this,_0x41fc44(0x21b),void 0x0),g(this,_0x41fc44(0x278),void 0x0),g(this,_0x41fc44(0x1cb),!0x1),g(this,_0x41fc44(0x22b),null),this['_shouldReportTelemetry']=!!this['_telemetryService'],_0x524c0f[_0x41fc44(0x200)]((0x0,i[_0x41fc44(0x3ba)])(this['dispose$']))[_0x41fc44(0x15c)](_0x52fce4=>{const _0x4020a7=_0x41fc44;if(_0x52fce4!==void 0x0){if(this[_0x4020a7(0x260)]=_0x52fce4,_0x52fce4)this['_joinRoom'](_0x52fce4),this[_0x4020a7(0x21b)]=_0x52fce4[_0x4020a7(0x252)][_0x4020a7(0x15c)](_0x5ae439=>{const _0x1e6c87=_0x4020a7;_0x5ae439[_0x1e6c87(0x3f8)]===this[_0x1e6c87(0x1d3)]&&this[_0x1e6c87(0x3fd)](_0x5ae439);});else{var _0x362cd0;this[_0x4020a7(0x161)](),this['_sessionStatus$']['next'](0x2),(_0x362cd0=this['_socketMessageSubscription'])==null||_0x362cd0['unsubscribe'](),this[_0x4020a7(0x21b)]=null;}}});}['getMemberID'](){const _0x11ea9a=_0x1de16c;var _0x3de1ca,_0xeaecc3;return(_0x3de1ca=(_0xeaecc3=this['_socket'])==null?void 0x0:_0xeaecc3[_0x11ea9a(0x33e)])==null?null:_0x3de1ca;}[_0x1de16c(0x317)](){const _0x105d6e=_0x1de16c;super[_0x105d6e(0x317)](),this['close'](),this['dispose$'][_0x105d6e(0x286)](),this['dispose$'][_0x105d6e(0x183)]();}[_0x1de16c(0x261)](){const _0x227b5a=_0x1de16c;var _0x2863c6,_0x202196;this[_0x227b5a(0x161)](),(_0x2863c6=this[_0x227b5a(0x260)])==null||_0x2863c6[_0x227b5a(0x2d5)]({'cmd':a['CombCmd'][_0x227b5a(0x2bd)],'data':{'roomID':this[_0x227b5a(0x1d3)]}}),(_0x202196=this[_0x227b5a(0x260)])==null||_0x202196[_0x227b5a(0x261)](),this['_event$'][_0x227b5a(0x183)](),this['_sessionStatus$']['complete']();}['_onCombEvent'](_0x294fb4){const _0x551700=_0x1de16c;_0x294fb4[_0x551700(0x2e6)]===a[_0x551700(0x3ae)]['JOIN']?this[_0x551700(0x134)](_0x294fb4):_0x294fb4['cmd']===a[_0x551700(0x3ae)]['RECV']&&this[_0x551700(0x39d)](_0x294fb4);}['_joinRoom'](_0x50fe6e){const _0x5af88b=_0x1de16c;this[_0x5af88b(0x2af)][_0x5af88b(0x286)](0x1),_0x50fe6e['send']({'cmd':a[_0x5af88b(0x3ae)][_0x5af88b(0x220)],'routeKey':this[_0x5af88b(0x1d3)],'routeType':'','data':{'rooms':[{'roomID':this[_0x5af88b(0x1d3)]}]}});}['_onJoinRoomEvent'](_0xa98b47){const _0x5621c9=_0x1de16c;var _0x2731a7;if(_0xa98b47[_0x5621c9(0x308)]in se){this[_0x5621c9(0x3f4)][_0x5621c9(0x262)]({'id':'JOIN_ROOM_FAILED','data':se[_0xa98b47['code']]}),this[_0x5621c9(0x2af)][_0x5621c9(0x286)](0x2);return;}this['_sessionStatus$']['next'](0x3);let _0x3f4ce6=(_0x2731a7=_0xa98b47[_0x5621c9(0x2d2)][_0x5621c9(0x1ac)][this[_0x5621c9(0x1d3)]])==null?void 0x0:_0x2731a7['members'];_0x3f4ce6&&_0x3f4ce6[_0x5621c9(0x2f3)](_0x53ce8c=>this[_0x5621c9(0x231)][_0x5621c9(0x3dc)](this[_0x5621c9(0x1d3)],_0x53ce8c));}[_0x1de16c(0x39d)](_0x570981){const _0x204baa=_0x1de16c;try{let _0x588df7=_0x570981[_0x204baa(0x2d2)];switch(_0x588df7['eventID']){case e[_0x204baa(0x255)]['USERS_ENTER']:this[_0x204baa(0x3df)](_0x588df7),this[_0x204baa(0x3e5)][_0x204baa(0x286)](_0x588df7);break;case e[_0x204baa(0x255)][_0x204baa(0x2dc)]:this['_onUserLeave'](_0x588df7),this[_0x204baa(0x3e5)][_0x204baa(0x286)](_0x588df7);break;case e[_0x204baa(0x255)]['CHANGESET_ACK']:case e['CollaborationEvent'][_0x204baa(0x18b)]:this[_0x204baa(0x1a3)](),this[_0x204baa(0x3d4)](),this[_0x204baa(0x3e5)][_0x204baa(0x286)](_0x588df7);break;case e[_0x204baa(0x255)][_0x204baa(0x3f2)]:this[_0x204baa(0x30d)][_0x204baa(0x1e3)](_0x204baa(0x150)+JSON[_0x204baa(0x2d8)](_0x588df7)),this['_event$']['next'](_0x588df7);break;case e['CollaborationEvent'][_0x204baa(0x1e7)]:this['_commentService']['onCommentUpdate'](_0x588df7['data']),this['_event$']['next'](_0x588df7);break;default:this['_event$']['next'](_0x588df7);}}catch(_0x3dd0cc){this['_logService'][_0x204baa(0x1e3)](_0x3dd0cc,_0x570981);}}['_onUserJoin'](_0x56d6cc){const _0x33136a=_0x1de16c;this[_0x33136a(0x231)][_0x33136a(0x3dc)](this[_0x33136a(0x1d3)],_0x56d6cc[_0x33136a(0x2d2)]);}['_onUserLeave'](_0x5c7828){const _0x16e60a=_0x1de16c;this[_0x16e60a(0x231)][_0x16e60a(0x3ad)](this[_0x16e60a(0x1d3)],_0x5c7828['data'][_0x16e60a(0x33e)]);}async[_0x1de16c(0x2d5)](_0x5734cb,_0x2a2ebd){const _0xa21978=_0x1de16c;if(this[_0xa21978(0x36b)]!==0x3||!this[_0xa21978(0x260)])throw Error(_0xa21978(0x27b));try{_0x5734cb[_0xa21978(0x26d)]===e[_0xa21978(0x255)]['SUBMIT_CHANGESET']&&(this['_scheduleCollaborationTimeoutTimer'](),this['_startTelemetryCollaborationNewChangeset'](_0x5734cb)),this[_0xa21978(0x260)]['send']({'cmd':a[_0xa21978(0x3ae)][_0xa21978(0x212)],'routeKey':_0x2a2ebd,'routeType':'','data':_0x5734cb});}catch(_0x8b4417){this[_0xa21978(0x30d)][_0xa21978(0x1e3)](_0x8b4417);}}[_0x1de16c(0x22f)](){const _0x4226c4=_0x1de16c;var _0x131d83;this['_collaborationTimeoutTimer']=setTimeout(()=>{const _0x51ed25=_0x3896;this['_collaborationTimeoutTimer']=null,this[_0x51ed25(0x3f4)][_0x51ed25(0x262)]({'id':_0x51ed25(0x2b3)});},(_0x131d83=this[_0x4226c4(0x2aa)]['getConfig']('HEARTBEAT_TIMEOUT'))==null?m:_0x131d83);}[_0x1de16c(0x3d4)](){const _0x32c64e=_0x1de16c;this['_collaborationTimeoutTimer']&&(clearTimeout(this[_0x32c64e(0x278)]),this['_collaborationTimeoutTimer']=null);}[_0x1de16c(0x2a5)](_0x92635a){const _0x2cbc3c=_0x1de16c;if(!this[_0x2cbc3c(0x1cb)])return;let {data:_0x345954}=_0x92635a,{unitID:_0x2c6fc7,changeset:_0x275745}=_0x345954,{mutations:_0x2f670b,type:_0x226f3a}=_0x275745;this['_telemetryInfo']={'unitId':_0x2c6fc7,'type':_0x226f3a,'startTime':performance[_0x2cbc3c(0x322)](),'stopTime':0x0,'duration':0x0,'size':ee(_0x2f670b)};}[_0x1de16c(0x1a3)](){const _0x37139d=_0x1de16c;if(this[_0x37139d(0x1cb)]){if(!this[_0x37139d(0x22b)]){this[_0x37139d(0x30d)][_0x37139d(0x1e3)](_0x37139d(0x12e),_0x37139d(0x289));return;}this[_0x37139d(0x22b)][_0x37139d(0x1ab)]=performance[_0x37139d(0x322)](),this[_0x37139d(0x22b)]['duration']=this[_0x37139d(0x22b)][_0x37139d(0x1ab)]-this['_telemetryInfo'][_0x37139d(0x148)],this[_0x37139d(0x19b)]['capture']('collaboration_new_changeset',this[_0x37139d(0x22b)]),this[_0x37139d(0x22b)]=null;}}['_throwTelemetryCollaborationNewChangeset'](){this['_telemetryInfo']=null;}};function _0x3896(_0x263bc3,_0x35d897){_0x263bc3=_0x263bc3-0x127;const _0x4f3fac=_0x4f3f();let _0x389663=_0x4f3fac[_0x263bc3];return _0x389663;}x=y([v(0x2,t[_0x1de16c(0x243)]),v(0x3,t[_0x1de16c(0x3cb)]),v(0x4,(0x0,t[_0x1de16c(0x20f)])(b)),v(0x5,(0x0,t[_0x1de16c(0x20f)])(ie)),v(0x6,(0x0,t['Inject'])(_)),v(0x7,(0x0,t[_0x1de16c(0x37e)])(o[_0x1de16c(0x379)]))],x);const S=(0x0,t[_0x1de16c(0x26b)])(_0x1de16c(0x172));function ce(_0x284af6){return'unit-cache-'+_0x284af6;}function le(_0xeee939){const _0x1f377d=_0x1de16c;let {unitID:_0x4ebc25,mutations:_0x17ac59}=_0xeee939;return{'unitId':_0x4ebc25,'subUnitId':_0x17ac59[_0x1f377d(0x3c7)]>0x0?_0x17ac59[0x0]['params'][_0x1f377d(0x206)]:null};}let C=class{constructor(_0x274586,_0x39bf48,_0x3a3c15){const _0x399cf3=_0x1de16c;this[_0x399cf3(0x16d)]=_0x274586,this[_0x399cf3(0x226)]=_0x39bf48,this[_0x399cf3(0x330)]=_0x3a3c15;}[_0x1de16c(0x3ea)](_0x39a27e){const _0x13bad7=_0x1de16c;var _0xd5d5a0,_0x15c22c;let _0x6dc447=this['_injector'][_0x13bad7(0x373)](r[_0x13bad7(0x3cc)]),{unitId:_0x4e21ed,subUnitId:_0x4bc997}=le(_0x39a27e),_0x135ff0=_0x6dc447==null?void 0x0:_0x6dc447['getWorkbookSelections'](_0x4e21ed)['getCurrentSelections'](),_0x32adf0=(_0xd5d5a0=this[_0x13bad7(0x330)][_0x13bad7(0x309)](_0x4e21ed))==null||(_0xd5d5a0=_0xd5d5a0[_0x13bad7(0x388)]())==null?void 0x0:_0xd5d5a0['getSheetId']();if(_0x135ff0[_0x13bad7(0x3c7)]===0x0||!_0x4e21ed||!_0x4bc997)return;let _0xe94348=[{'id':r[_0x13bad7(0x17f)]['id'],'params':{'unitId':_0x4e21ed,'subUnitId':_0x32adf0,'selections':t[_0x13bad7(0x20e)][_0x13bad7(0x273)](_0x135ff0)}}],_0x58e226=this[_0x13bad7(0x226)][_0x13bad7(0x307)](_0x39a27e,_0xe94348);if(!(0x0,e[_0x13bad7(0x2f1)])(_0x58e226))throw _0x58e226['error'];let _0x1c54c8=(_0x15c22c=_0x58e226[_0x13bad7(0x249)][0x0])==null||(_0x15c22c=_0x15c22c[_0x13bad7(0x3ce)])==null?void 0x0:_0x15c22c[_0x13bad7(0x190)];if(Array['isArray'](_0x1c54c8)&&_0x1c54c8[_0x13bad7(0x3c7)]){if(_0x1c54c8[_0x13bad7(0x3c7)]===_0xe94348[0x0]['params'][_0x13bad7(0x190)][_0x13bad7(0x3c7)]&&_0x1c54c8[_0x13bad7(0x2ea)]((_0x3658b3,_0x2412e9)=>t['Rectangle'][_0x13bad7(0x3b0)](_0x3658b3['range'],_0xe94348[0x0][_0x13bad7(0x3ce)]['selections'][_0x2412e9][_0x13bad7(0x292)])))return;this[_0x13bad7(0x16d)][_0x13bad7(0x373)](t[_0x13bad7(0x2a8)])['executeCommand'](r[_0x13bad7(0x17f)]['id'],{'unitId':_0x4e21ed,'subUnitId':_0x32adf0,'selections':_0x1c54c8});}}};C=y([v(0x0,(0x0,t[_0x1de16c(0x20f)])(t[_0x1de16c(0x25d)])),v(0x1,e[_0x1de16c(0x13c)]),v(0x2,t[_0x1de16c(0x1ca)])],C);const w=(0x0,t[_0x1de16c(0x26b)])(_0x1de16c(0x159));let ue=function(_0x384e3e){const _0x3e6140=_0x1de16c;return _0x384e3e[_0x384e3e['NO_OTHER_CLIENTS_EDITING']=0x0]='NO_OTHER_CLIENTS_EDITING',_0x384e3e[_0x384e3e[_0x3e6140(0x3e3)]=0x1]=_0x3e6140(0x3e3),_0x384e3e;}({});const T=_0x1de16c(0x2dd),de={};function fe(_0x423e95){const _0x11e1ab=_0x1de16c;var _0x16b4f0;return!!((_0x16b4f0=_0x423e95[_0x11e1ab(0x3ce)])!=null&&_0x16b4f0[_0x11e1ab(0x3a0)]);}const pe=new Set([r[_0x1de16c(0x2c3)]['id']]);function me(_0xd84832,_0x126d11,_0x31281d,_0x542616,_0x3f896f){const _0x159fef=_0x1de16c;var _0x5ad98b,_0x4d9fe,_0x49e87d,_0x2d9b00;let _0x1e9d9c=[];for(let _0x20c977 of _0xd84832){if(pe[_0x159fef(0x1c7)](_0x20c977['id'])){if(_0x1e9d9c[_0x159fef(0x3c7)]>0x0)break;_0x1e9d9c[_0x159fef(0x186)](_0x20c977);break;}if(fe(_0x20c977)){if(_0x1e9d9c[_0x159fef(0x3c7)]>0x0)break;_0x1e9d9c[_0x159fef(0x186)](_0x20c977);break;}_0x1e9d9c['push'](_0x20c977);}let _0x2b38b3=(_0x5ad98b=(_0x4d9fe=_0x3f896f[_0x159fef(0x325)]())==null?void 0x0:_0x4d9fe[_0x159fef(0x237)])==null?_0x159fef(0x1a7):_0x5ad98b,_0x39fdd5=(_0x49e87d=(_0x2d9b00=_0x3f896f['getCurrentUser']())==null?void 0x0:_0x2d9b00[_0x159fef(0x33e)])==null?'unknown':_0x49e87d;return{'changeset':{'unitID':_0x126d11,'type':(0x0,e[_0x159fef(0x194)])(_0x31281d['getUnitType'](_0x126d11)),'baseRev':_0x542616[_0x159fef(0x295)](_0x126d11),'revision':0x0,'userID':_0x2b38b3,'memberID':_0x39fdd5,'mutations':_0x1e9d9c},'pendingMutations':_0xd84832[_0x159fef(0x381)](_0x1e9d9c['length'])};}function he(_0x31332c,_0x22a126,_0x202929,_0x3a6cf4,_0x17afc5){const _0x5862d6=_0x1de16c;var _0x570c47,_0x28e898,_0x36bd1c,_0x2b99e6;let _0x1e60cd=_0x31332c[_0x5862d6(0x3ee)]((_0x3b7a52,_0x5ed8fa)=>{const _0x2e8d4e=_0x5862d6;let _0x10c2dd=_0x3b7a52[_0x3b7a52[_0x2e8d4e(0x3c7)]-0x1],{id:_0x5d38c5}=_0x10c2dd==null?{}:_0x10c2dd,{id:_0x29f7ab,type:_0x1c4c07}=_0x5ed8fa,_0x5df15a=_0x5ed8fa['params'];if(_0x5d38c5&&_0x5d38c5!==_0x29f7ab)throw Error(_0x2e8d4e(0x321)+_0x5d38c5+_0x2e8d4e(0x189)+_0x29f7ab+'.');if(!_0x10c2dd)return[{'id':_0x29f7ab,'type':_0x1c4c07,'params':{'unitId':_0x5df15a[_0x2e8d4e(0x2c9)],'textRanges':_0x5df15a['textRanges'],'actions':_0x5df15a[_0x2e8d4e(0x17c)]}}];let _0x3717e1=_0x10c2dd['params'];return ge(_0x3717e1[_0x2e8d4e(0x17c)],_0x5df15a[_0x2e8d4e(0x17c)])?[..._0x3b7a52[_0x2e8d4e(0x381)](0x0,-0x1),{..._0x10c2dd,'id':_0x29f7ab,'type':_0x1c4c07,'params':{'unitId':_0x5df15a[_0x2e8d4e(0x2c9)],'textRanges':_0x5df15a[_0x2e8d4e(0x12d)],'actions':t[_0x2e8d4e(0x1bf)][_0x2e8d4e(0x2ab)](_0x3717e1[_0x2e8d4e(0x17c)],_0x5df15a[_0x2e8d4e(0x17c)])}}]:[..._0x3b7a52,{'id':_0x29f7ab,'type':_0x1c4c07,'params':{'unitId':_0x5df15a['unitId'],'textRanges':_0x5df15a[_0x2e8d4e(0x12d)],'actions':_0x5df15a['actions']}}];},[]),_0x261b12=(_0x570c47=(_0x28e898=_0x17afc5[_0x5862d6(0x325)]())==null?void 0x0:_0x28e898[_0x5862d6(0x237)])==null?_0x5862d6(0x1a7):_0x570c47,_0x569100=(_0x36bd1c=(_0x2b99e6=_0x17afc5[_0x5862d6(0x325)]())==null?void 0x0:_0x2b99e6[_0x5862d6(0x33e)])==null?_0x5862d6(0x1a7):_0x36bd1c;return{'changeset':{'unitID':_0x22a126,'type':(0x0,e[_0x5862d6(0x194)])(_0x202929[_0x5862d6(0x3c9)](_0x22a126)),'baseRev':_0x3a6cf4[_0x5862d6(0x295)](_0x22a126),'revision':0x0,'userID':_0x261b12,'memberID':_0x569100,'mutations':_0x1e60cd},'pendingMutations':_0x31332c[_0x5862d6(0x381)](_0x31332c[_0x5862d6(0x3c7)])};}function ge(_0x2583c3,_0x59307d){return!(_e(_0x2583c3)&&ve(_0x59307d)||ve(_0x2583c3)&&_e(_0x59307d));}function _e(_0x2cb178){const _0x51cfc4=_0x1de16c;return ye(_0x2cb178)[_0x51cfc4(0x3c2)](_0x3928ec=>be(_0x3928ec)&&_0x3928ec['et']===_0x51cfc4(0x1e2));}function ve(_0xfd6ede){const _0x1f82dd=_0x1de16c;return ye(_0xfd6ede)['some'](_0x453d8a=>Array['isArray'](_0x453d8a)||typeof _0x453d8a==_0x1f82dd(0x239)||typeof _0x453d8a==_0x1f82dd(0x272));}function ye(_0x213039){const _0x48d2fd=_0x1de16c;if(!Array[_0x48d2fd(0x3db)](_0x213039))return[];let _0x113c52=_0x213039[_0x48d2fd(0x39f)](_0x48d2fd(0x401))?_0x213039:_0x213039[_0x48d2fd(0x38b)](_0x892d6b=>Array[_0x48d2fd(0x3db)](_0x892d6b)&&_0x892d6b[_0x48d2fd(0x39f)]('body'));if(!Array['isArray'](_0x113c52))return[];let _0x12032b=_0x113c52[_0x48d2fd(0x21d)](_0x48d2fd(0x401));return _0x12032b===-0x1?[]:_0x113c52['slice'](_0x12032b+0x1);}function be(_0x5216f8){const _0x22fbd2=_0x1de16c;return typeof _0x5216f8=='object'&&!!_0x5216f8&&!Array[_0x22fbd2(0x3db)](_0x5216f8);}function xe(_0x37e729,_0x1170d2){const _0x36f75d=_0x1de16c;let _0x1ab6b0=new i[(_0x36f75d(0x1b7))](0x1);return setTimeout(()=>_0x1ab6b0[_0x36f75d(0x286)](_0x1170d2),_0x37e729),_0x1ab6b0[_0x36f75d(0x1ea)]()[_0x36f75d(0x200)]((0x0,i[_0x36f75d(0x2ed)])(0x1));}var E,D,O;let Se=function(_0x465441){const _0x5275fd=_0x1de16c;return _0x465441[_0x5275fd(0x257)]=_0x5275fd(0x3e0),_0x465441[_0x5275fd(0x2f8)]='synced',_0x465441[_0x5275fd(0x360)]='pending',_0x465441[_0x5275fd(0x29c)]=_0x5275fd(0x197),_0x465441[_0x5275fd(0x3e1)]=_0x5275fd(0x355),_0x465441['FETCH_MISS']=_0x5275fd(0x3f5),_0x465441[_0x5275fd(0x171)]=_0x5275fd(0x326),_0x465441[_0x5275fd(0x2d7)]=_0x5275fd(0x2fa),_0x465441;}({});const Ce=0x4e20,we=0x2bf20;var k=class{constructor(_0xd4940,_0x180084,_0x341e7c,_0x373261,_0x518d08,_0x4f330a,_0x1d477c,_0x567da8,_0xf57098){const _0x1bcdeb=_0x1de16c;this[_0x1bcdeb(0x378)]=_0xd4940,this[_0x1bcdeb(0x1a0)]=_0x180084,this['_handler']=_0x518d08,this['_commandService']=_0x4f330a,this[_0x1bcdeb(0x217)]=_0x1d477c,this[_0x1bcdeb(0x20b)]=_0x567da8,this[_0x1bcdeb(0x2e1)]=_0xf57098,g(this,'_awaitingChangeset',null),g(this,_0x1bcdeb(0x256),[]),this[_0x1bcdeb(0x1c3)]=_0x341e7c,this[_0x1bcdeb(0x256)]=_0x373261;}[_0x1de16c(0x402)](_0x592ae6){const _0x45fc79=_0x1de16c;let _0x27feb6=this[_0x45fc79(0x20b)][_0x45fc79(0x295)](this['unitID']);return _0x592ae6[_0x45fc79(0x3be)]>_0x27feb6+0x1?(this['_handler']['onMissingChangesets']({'from':_0x27feb6,'to':_0x592ae6[_0x45fc79(0x3be)]-0x1}),!0x0):!0x1;}[_0x1de16c(0x139)](_0x3754c0){const _0x2d1260=_0x1de16c;this[_0x2d1260(0x217)][_0x2d1260(0x2e9)](this[_0x2d1260(0x378)],_0x3754c0);}[_0x1de16c(0x2f4)](_0x1f6f86){const _0x149142=_0x1de16c;var _0x1afcb3,_0x50166f;(_0x1afcb3=(_0x50166f=this[_0x149142(0x36f)])[_0x149142(0x2cc)])==null||_0x1afcb3['call'](_0x50166f,_0x1f6f86);}['_transformIMECache'](_0x6f8484){const _0x4c3485=_0x1de16c;var _0x5f4c76,_0xedaabd;return(_0x5f4c76=(_0xedaabd=this[_0x4c3485(0x36f)])[_0x4c3485(0x364)])==null?void 0x0:_0x5f4c76[_0x4c3485(0x21c)](_0xedaabd,_0x6f8484);}[_0x1de16c(0x335)](_0x141c36){const _0x82c903=_0x1de16c;var _0x3538b5,_0x1173d6;return(_0x3538b5=(_0x1173d6=this[_0x82c903(0x36f)])[_0x82c903(0x32d)])==null?void 0x0:_0x3538b5[_0x82c903(0x21c)](_0x1173d6,_0x141c36);}[_0x1de16c(0x18a)](_0x7cb79f){const _0x4f8a8e=_0x1de16c;var _0x4e2263,_0x214732,_0x4f11c0;return(_0x4e2263=(_0x214732=(_0x4f11c0=this[_0x4f8a8e(0x36f)])[_0x4f8a8e(0x1d4)])==null?void 0x0:_0x214732[_0x4f8a8e(0x21c)](_0x4f11c0,_0x7cb79f))==null?_0x7cb79f:_0x4e2263;}[_0x1de16c(0x356)](_0x1b8d10){const _0x278ac8=_0x1de16c;var _0x1c93ca,_0x11cff4,_0x3d56c3;return(_0x1c93ca=(_0x11cff4=(_0x3d56c3=this[_0x278ac8(0x36f)])[_0x278ac8(0x3d8)])==null?void 0x0:_0x11cff4['call'](_0x3d56c3,_0x1b8d10))==null?_0x1b8d10:_0x1c93ca;}[_0x1de16c(0x140)](_0x5182fa){const _0x225c42=_0x1de16c;if(this[_0x225c42(0x1a0)]===t['UniverInstanceType'][_0x225c42(0x198)]){let {unitID:_0x13a47f,mutations:_0x414819,memberID:_0x19eed3}=_0x5182fa,_0x3c15ff=_0x414819['length']>0x0?_0x414819[0x0][_0x225c42(0x3ce)]['textRanges']:[];if(Array[_0x225c42(0x3db)](_0x3c15ff)&&_0x3c15ff[_0x225c42(0x3c7)]>0x0){var _0x429c2d,_0x20249b;(_0x429c2d=(_0x20249b=this[_0x225c42(0x36f)])['onSyncEditingCollabCursor'])==null||_0x429c2d[_0x225c42(0x21c)](_0x20249b,{'unitID':_0x13a47f,'memberID':_0x19eed3,'textRanges':_0x3c15ff});}}}[_0x1de16c(0x394)](){const _0x476c41=_0x1de16c;var _0x1a7334;(_0x1a7334=this[_0x476c41(0x2e1)])==null||_0x1a7334[_0x476c41(0x152)](this[_0x476c41(0x378)],this[_0x476c41(0x1a0)],this[_0x476c41(0x1c3)],this['_pendingMutations']);}[_0x1de16c(0x170)](){const _0x2f952d=_0x1de16c;return this['_revisionService'][_0x2f952d(0x295)](this[_0x2f952d(0x378)]);}[_0x1de16c(0x3a3)](){this['_revisionService']['incrementRevOfUnit'](this['unitID']);}[_0x1de16c(0x1f3)](_0x1acdf1){const _0x5bcc46=_0x1de16c;let _0x2204ca=this['_transformRemoteChangesetByIMECache'](_0x1acdf1);_0x2204ca=this[_0x5bcc46(0x356)](_0x2204ca);let _0x500c36=(0x0,t['sequenceExecute'])(_0x2204ca[_0x5bcc46(0x13f)],this[_0x5bcc46(0x3ab)],{'fromCollab':!0x0});if(!_0x500c36['result']){var _0x52567b;throw _0x500c36[_0x5bcc46(0x1e3)]instanceof Error?_0x500c36[_0x5bcc46(0x1e3)]:Error((_0x52567b=_0x500c36[_0x5bcc46(0x1e3)])==null?_0x5bcc46(0x131):_0x52567b);}this[_0x5bcc46(0x1d1)](_0x2204ca),this[_0x5bcc46(0x335)](_0x2204ca),this[_0x5bcc46(0x139)](_0x1acdf1),this[_0x5bcc46(0x2f4)](_0x2204ca),this['_syncEditingCollabCursor'](_0x2204ca),this[_0x5bcc46(0x3a3)]();}};let A=class extends k{constructor(_0x4d70a4,_0xea0274,_0x229c49,_0x1ea1af,_0x1280b3,_0x1309d0,_0x4255a5,_0x5cf209,_0xbe04c5,_0x41eef2){const _0x34ec9e=_0x1de16c;super(_0x4d70a4,_0xea0274,null,[],_0x229c49,_0x4255a5,_0x1309d0,_0x1ea1af,_0x41eef2),this['_injector']=_0x1280b3,this[_0x34ec9e(0x30d)]=_0x5cf209,this['_transformService']=_0xbe04c5,this[_0x34ec9e(0x30c)]=_0x41eef2,g(this,_0x34ec9e(0x218),_0x34ec9e(0x31c));}[_0x1de16c(0x21e)](_0x35769c){const _0xd8b379=_0x1de16c;let _0x2d1592=this[_0xd8b379(0x16d)][_0xd8b379(0x215)](j,this['unitID'],this[_0xd8b379(0x1a0)],[_0x35769c],this['_handler']);return _0x2d1592[_0xd8b379(0x35e)](),_0x2d1592[_0xd8b379(0x394)](),_0x2d1592;}['onRemoteChangeset'](_0x5f448f){const _0x2fe15b=_0x1de16c;if(this['_checkMissing'](_0x5f448f))return this[_0x2fe15b(0x16d)][_0x2fe15b(0x215)](I,this[_0x2fe15b(0x378)],this[_0x2fe15b(0x1a0)],null,[],null,[_0x5f448f],this['_handler']);try{let _0x3ece6e=this[_0x2fe15b(0x226)][_0x2fe15b(0x307)](_0x5f448f,[e[_0x2fe15b(0x247)]]);if((0x0,e[_0x2fe15b(0x2f1)])(_0x3ece6e)){let {c1Prime:_0x15cd3e}=_0x3ece6e;return this[_0x2fe15b(0x1f3)](_0x15cd3e),this;}throw _0x3ece6e['error'];}catch(_0x2db83e){return this['_logService'][_0x2fe15b(0x1e3)](_0x2db83e),this['_onConflict'](!0x1);}}['_onConflict'](_0x4bcb27){const _0x396337=_0x1de16c;return this[_0x396337(0x16d)][_0x396337(0x215)](P,this['unitID'],this[_0x396337(0x1a0)],null,[],this[_0x396337(0x36f)],_0x4bcb27);}[_0x1de16c(0x2ca)](_0x4c35fd){const _0x3308a6=_0x1de16c;if(_0x4c35fd[_0x3308a6(0x3be)]<=this[_0x3308a6(0x170)]())return this;throw Error(_0x3308a6(0x332));}['onRemoteRej'](){const _0x2efb93=_0x1de16c;throw Error(_0x2efb93(0x386));}[_0x1de16c(0x28f)](){return this;}['toggleOffline'](){const _0x4aeac5=_0x1de16c;return this[_0x4aeac5(0x16d)]['createInstance'](F,this['unitID'],this['type'],null,[],this[_0x4aeac5(0x36f)]);}[_0x1de16c(0x127)](){return this;}[_0x1de16c(0x1be)](){const _0x5a3c90=_0x1de16c;throw Error(_0x5a3c90(0x32c));}[_0x1de16c(0x14e)](){const _0x3bfc55=_0x1de16c;let _0x53dfe3=this[_0x3bfc55(0x20b)][_0x3bfc55(0x295)](this['unitID']);return this[_0x3bfc55(0x36f)][_0x3bfc55(0x3da)]({'from':_0x53dfe3,'to':0x0}),this[_0x3bfc55(0x16d)]['createInstance'](I,this[_0x3bfc55(0x378)],this[_0x3bfc55(0x1a0)],null,[],null,[],this[_0x3bfc55(0x36f)]);}};A=y([v(0x3,(0x0,t['Inject'])(e[_0x1de16c(0x2eb)])),v(0x4,(0x0,t[_0x1de16c(0x20f)])(t[_0x1de16c(0x25d)])),v(0x5,t['IUndoRedoService']),v(0x6,t[_0x1de16c(0x2a8)]),v(0x7,t[_0x1de16c(0x243)]),v(0x8,e[_0x1de16c(0x13c)]),v(0x9,(0x0,t[_0x1de16c(0x37e)])(S))],A);let j=E=class extends k{constructor(_0x4a5514,_0x1e7c4e,_0x4c1f03,_0x4edd4f,_0x112fc3,_0x3b5c92,_0x4432f1,_0x538ecf,_0x2ece2b,_0x1c746e,_0x3b6415,_0x496782,_0x55e9a2,_0x253813){const _0x234d39=_0x1de16c;super(_0x4a5514,_0x1e7c4e,null,_0x4c1f03,_0x4edd4f,_0x2ece2b,_0x55e9a2,_0x3b5c92,_0x253813),this['_injector']=_0x112fc3,this[_0x234d39(0x231)]=_0x4432f1,this[_0x234d39(0x30d)]=_0x538ecf,this[_0x234d39(0x2aa)]=_0x1c746e,this[_0x234d39(0x226)]=_0x3b6415,this['_univerInstanceService']=_0x496782,g(this,_0x234d39(0x218),_0x234d39(0x375)),g(this,_0x234d39(0x271),null),g(this,_0x234d39(0x366),null);}['appendMutation'](_0x15d359){const _0x9e4c45=_0x1de16c;return this[_0x9e4c45(0x256)][_0x9e4c45(0x186)](_0x15d359),this['_updateLocalCache'](),this;}[_0x1de16c(0x2e0)](_0x25145b){const _0x14b2b7=_0x1de16c;if(this[_0x14b2b7(0x402)](_0x25145b))return this[_0x14b2b7(0x338)](),this[_0x14b2b7(0x16d)][_0x14b2b7(0x215)](I,this[_0x14b2b7(0x378)],this['type'],null,this[_0x14b2b7(0x256)],null,[_0x25145b],this['_handler']);try{let _0x2b54fe=this[_0x14b2b7(0x226)][_0x14b2b7(0x307)](_0x25145b,this['_pendingMutations']);if((0x0,e[_0x14b2b7(0x2f1)])(_0x2b54fe)){let {c1Prime:_0x1ab778,m2Prime:_0x179d64}=_0x2b54fe;this[_0x14b2b7(0x1f3)](_0x1ab778);let _0x21aede=this['_injector'][_0x14b2b7(0x215)](E,this[_0x14b2b7(0x378)],this[_0x14b2b7(0x1a0)],_0x179d64,this[_0x14b2b7(0x36f)]);this[_0x14b2b7(0x338)]();let _0x4e2661=new Date()[_0x14b2b7(0x3f6)](),_0x7e7b18=this[_0x14b2b7(0x271)]?Math['max'](this['_scheduleCompleteTimestamp']-_0x4e2661,0x0):this[_0x14b2b7(0x3c4)]();return _0x21aede[_0x14b2b7(0x35e)](_0x7e7b18),_0x21aede;}throw _0x2b54fe[_0x14b2b7(0x1e3)];}catch(_0x254188){return this[_0x14b2b7(0x30d)][_0x14b2b7(0x1e3)](_0x254188),this[_0x14b2b7(0x369)](!0x1);}}['onRemoteAck'](_0x5069f8){const _0x9df6c8=_0x1de16c;if(_0x5069f8['revision']<=this[_0x9df6c8(0x170)]())return this;throw Error(_0x9df6c8(0x2f7));}[_0x1de16c(0x3a5)](){const _0x250c7a=_0x1de16c;throw Error(_0x250c7a(0x2e2));}[_0x1de16c(0x28f)](){return this;}[_0x1de16c(0x315)](){const _0x5698fc=_0x1de16c;return this[_0x5698fc(0x338)](),this['_injector'][_0x5698fc(0x215)](F,this[_0x5698fc(0x378)],this[_0x5698fc(0x1a0)],null,this[_0x5698fc(0x256)],this['_handler']);}['toggleOnline'](){return this;}['_schedule'](_0x52b9bb){const _0x4bf15f=_0x1de16c;let _0x374b9d=_0x52b9bb==null?this[_0x4bf15f(0x3c4)]():_0x52b9bb;this[_0x4bf15f(0x271)]=new Date()['getTime']()+_0x374b9d,this[_0x4bf15f(0x366)]=setTimeout(()=>{const _0x329055=_0x4bf15f;this[_0x329055(0x338)]();let _0x1dc146=null;switch(this[_0x329055(0x1a0)]){case t[_0x329055(0x20a)]['UNIVER_SHEET']:_0x1dc146=me(this[_0x329055(0x256)],this[_0x329055(0x378)],this[_0x329055(0x2a7)],this[_0x329055(0x20b)],this[_0x329055(0x231)]);break;case t[_0x329055(0x20a)][_0x329055(0x198)]:_0x1dc146=this[_0x329055(0x256)][_0x329055(0x2ea)](_0x12b053=>_0x12b053['id']===n[_0x329055(0x142)]['id'])?he(this[_0x329055(0x256)],this[_0x329055(0x378)],this['_univerInstanceService'],this['_revisionService'],this[_0x329055(0x231)]):me(this['_pendingMutations'],this[_0x329055(0x378)],this['_univerInstanceService'],this[_0x329055(0x20b)],this[_0x329055(0x231)]);break;default:throw Error(_0x329055(0x39a)+this['type']+_0x329055(0x30a));}let {changeset:_0x1e3e7d,pendingMutations:_0x541163}=_0x1dc146;this[_0x329055(0x36f)]['onSendChangeset'](_0x1e3e7d);let _0x4dca21=_0x541163[_0x329055(0x3c7)]?this['_injector'][_0x329055(0x215)](N,this['unitID'],this[_0x329055(0x1a0)],_0x1e3e7d,_0x541163,this[_0x329055(0x36f)],void 0x0):this[_0x329055(0x16d)][_0x329055(0x215)](M,this[_0x329055(0x378)],this[_0x329055(0x1a0)],_0x1e3e7d,this[_0x329055(0x36f)]);_0x4dca21[_0x329055(0x394)](),this[_0x329055(0x36f)][_0x329055(0x135)](this,_0x4dca21);},_0x374b9d);}[_0x1de16c(0x3c4)](){const _0x394457=_0x1de16c;var _0x223151;let _0x3b9c22=this[_0x394457(0x2aa)][_0x394457(0x26a)](T);return(_0x223151=_0x3b9c22==null?void 0x0:_0x3b9c22['sendChangesetTimeout'])==null?0x7d0:_0x223151;}[_0x1de16c(0x1be)](){const _0x3236f5=_0x1de16c;throw Error(_0x3236f5(0x213));}['_clearScheduledTask'](){const _0x335eca=_0x1de16c;this[_0x335eca(0x366)]!=null&&(clearTimeout(this['_sendingTimer']),this[_0x335eca(0x366)]=null);}['_onConflict'](_0x1a331f){const _0x38c0f4=_0x1de16c;return this[_0x38c0f4(0x338)](),this[_0x38c0f4(0x16d)][_0x38c0f4(0x215)](P,this[_0x38c0f4(0x378)],this[_0x38c0f4(0x1a0)],null,this[_0x38c0f4(0x256)],this[_0x38c0f4(0x36f)],_0x1a331f);}};j=E=y([v(0x4,(0x0,t[_0x1de16c(0x20f)])(t[_0x1de16c(0x25d)])),v(0x5,(0x0,t[_0x1de16c(0x20f)])(e[_0x1de16c(0x2eb)])),v(0x6,(0x0,t['Inject'])(b)),v(0x7,t[_0x1de16c(0x243)]),v(0x8,t['ICommandService']),v(0x9,t['IConfigService']),v(0xa,e[_0x1de16c(0x13c)]),v(0xb,t[_0x1de16c(0x1ca)]),v(0xc,t[_0x1de16c(0x374)]),v(0xd,(0x0,t['Optional'])(S))],j);let M=D=class extends k{constructor(_0x4072bc,_0x99185a,_0x3afdb0,_0x7bf4dc,_0x35c678,_0x5e4ef2,_0x42e823,_0x19a858,_0x5d9d39,_0x26dd95,_0x354101){const _0x4370ed=_0x1de16c;super(_0x4072bc,_0x99185a,_0x3afdb0,[],_0x7bf4dc,_0x42e823,_0x26dd95,_0x5e4ef2,_0x354101),this[_0x4370ed(0x16d)]=_0x35c678,this[_0x4370ed(0x30d)]=_0x19a858,this[_0x4370ed(0x226)]=_0x5d9d39,g(this,_0x4370ed(0x218),'awaiting'),g(this,_0x4370ed(0x1eb),0x0),g(this,_0x4370ed(0x39e),0x0),g(this,_0x4370ed(0x3a8),void 0x0),g(this,_0x4370ed(0x22a),void 0x0);}['appendMutation'](_0xd5f9a){const _0x42d9e8=_0x1de16c;this[_0x42d9e8(0x338)]();let _0x522233=this[_0x42d9e8(0x16d)][_0x42d9e8(0x215)](N,this[_0x42d9e8(0x378)],this[_0x42d9e8(0x1a0)],this[_0x42d9e8(0x1c3)],[_0xd5f9a],this[_0x42d9e8(0x36f)],this[_0x42d9e8(0x3a8)]);return _0x522233[_0x42d9e8(0x394)](),_0x522233;}[_0x1de16c(0x2e0)](_0x1861f6){const _0x385d21=_0x1de16c;if(this['_checkMissing'](_0x1861f6))return this[_0x385d21(0x338)](),this[_0x385d21(0x16d)][_0x385d21(0x215)](I,this[_0x385d21(0x378)],this[_0x385d21(0x1a0)],this[_0x385d21(0x1c3)],[],null,[_0x1861f6],this[_0x385d21(0x36f)]);try{let _0x39cdd2=this['_transformService'][_0x385d21(0x34d)]([_0x1861f6],[this[_0x385d21(0x1c3)]],!0x1);if((0x0,e[_0x385d21(0x20c)])(_0x39cdd2)){let {c1Prime:_0x131417,c2Prime:_0x2a584a}=_0x39cdd2;this['_executeRemoteChangeset'](_0x131417[0x0]),_0x2a584a[0x0][_0x385d21(0x336)]=this[_0x385d21(0x170)](),this[_0x385d21(0x338)]();let _0x7f60bf=this[_0x385d21(0x16d)]['createInstance'](D,this[_0x385d21(0x378)],this[_0x385d21(0x1a0)],_0x2a584a[0x0],this['_handler']);return _0x7f60bf[_0x385d21(0x394)](),_0x7f60bf;}throw _0x39cdd2[_0x385d21(0x1e3)];}catch(_0x4342ed){return this[_0x385d21(0x30d)]['error'](_0x4342ed),this[_0x385d21(0x369)](!0x1);}}[_0x1de16c(0x2ca)](_0x5234b8){const _0x5df9fa=_0x1de16c;this[_0x5df9fa(0x338)]();let _0x230a80=this[_0x5df9fa(0x20b)][_0x5df9fa(0x295)](this[_0x5df9fa(0x378)]);if(_0x5234b8[_0x5df9fa(0x3be)]<=_0x230a80)return this;if(this[_0x5df9fa(0x402)](_0x5234b8))return this[_0x5df9fa(0x16d)][_0x5df9fa(0x215)](I,this[_0x5df9fa(0x378)],this[_0x5df9fa(0x1a0)],this[_0x5df9fa(0x1c3)],[],_0x5234b8[_0x5df9fa(0x3be)],[],this[_0x5df9fa(0x36f)]);this[_0x5df9fa(0x3a3)]();let _0x17fb24=this[_0x5df9fa(0x16d)][_0x5df9fa(0x215)](A,this[_0x5df9fa(0x378)],this[_0x5df9fa(0x1a0)],this['_handler']);return _0x17fb24['_updateLocalCache'](),_0x17fb24;}[_0x1de16c(0x3a5)](_0xdc1b30){const _0x5de53d=_0x1de16c;return this['_onConflict'](!!(_0xdc1b30!=null&&_0xdc1b30[_0x5de53d(0x3e2)]));}[_0x1de16c(0x28f)](_0x50ec03){const _0x189e0a=_0x1de16c;return this['_maxTotalRetryTimeout']>we?this[_0x189e0a(0x315)]():(this[_0x189e0a(0x3a8)]=xe(this[_0x189e0a(0x1eb)],{'timeout':this[_0x189e0a(0x1eb)],'reqId':_0x50ec03[_0x189e0a(0x163)]}),this[_0x189e0a(0x22a)]=this[_0x189e0a(0x3a8)][_0x189e0a(0x15c)](({reqId:_0xf8516c,timeout:_0x175435})=>{this['_resendWithTimeout'](_0xf8516c,_0x175435);}),this);}[_0x1de16c(0x315)](){const _0x2c05df=_0x1de16c;return this[_0x2c05df(0x338)](),this[_0x2c05df(0x16d)]['createInstance'](F,this[_0x2c05df(0x378)],this[_0x2c05df(0x1a0)],this['_awaitingChangeset'],[],this[_0x2c05df(0x36f)]);}['toggleOnline'](){return this;}[_0x1de16c(0x1be)](){const _0x558022=_0x1de16c;this['_handler']['onSendChangeset'](this[_0x558022(0x1c3)]);}[_0x1de16c(0x369)](_0x65bf39){const _0x476678=_0x1de16c;return this[_0x476678(0x338)](),this[_0x476678(0x16d)][_0x476678(0x215)](P,this[_0x476678(0x378)],this[_0x476678(0x1a0)],this[_0x476678(0x1c3)],[],this[_0x476678(0x36f)],_0x65bf39);}[_0x1de16c(0x16c)](_0x2aa40a,_0x1a2370){const _0x1687ad=_0x1de16c;var _0x5181c6;_0x2aa40a===((_0x5181c6=this[_0x1687ad(0x1c3)])==null?void 0x0:_0x5181c6[_0x1687ad(0x163)])&&(this[_0x1687ad(0x1be)](),this[_0x1687ad(0x1eb)]=_0x1a2370===0x0?0x3e8:Math[_0x1687ad(0x34b)](_0x1a2370*0x2,Ce),this['_maxTotalRetryTimeout']+=this[_0x1687ad(0x1eb)]);}[_0x1de16c(0x338)](){const _0x1c0b6b=_0x1de16c;var _0x2abe7e;(_0x2abe7e=this[_0x1c0b6b(0x22a)])==null||_0x2abe7e[_0x1c0b6b(0x21f)](),this[_0x1c0b6b(0x1eb)]=0x0,this[_0x1c0b6b(0x39e)]=0x0;}};M=D=y([v(0x4,(0x0,t[_0x1de16c(0x20f)])(t[_0x1de16c(0x25d)])),v(0x5,(0x0,t['Inject'])(e[_0x1de16c(0x2eb)])),v(0x6,t[_0x1de16c(0x2a8)]),v(0x7,t['ILogService']),v(0x8,e[_0x1de16c(0x13c)]),v(0x9,t[_0x1de16c(0x374)]),v(0xa,(0x0,t['Optional'])(S))],M);let N=O=class extends k{constructor(_0x332984,_0x3d556b,_0x994c7e,_0xa1621d,_0x596df2,_0x1fa8e6,_0x4bdf9c,_0x1fac70,_0x4ecbf6,_0x259592,_0x4e2247,_0x57b1c2,_0x332d03){const _0x204c1a=_0x1de16c;super(_0x332984,_0x3d556b,_0x994c7e,_0xa1621d,_0x596df2,_0x4ecbf6,_0x57b1c2,_0x1fac70,_0x332d03),this[_0x204c1a(0x16d)]=_0x4bdf9c,this[_0x204c1a(0x30d)]=_0x259592,this[_0x204c1a(0x226)]=_0x4e2247,this[_0x204c1a(0x30c)]=_0x332d03,g(this,_0x204c1a(0x218),_0x204c1a(0x355)),g(this,_0x204c1a(0x1eb),0x0),g(this,'_maxTotalRetryTimeout',0x0),g(this,_0x204c1a(0x3a8),void 0x0),g(this,'_sender',void 0x0),_0x1fa8e6&&(this[_0x204c1a(0x3a8)]=_0x1fa8e6,this['_sender']=this[_0x204c1a(0x3a8)][_0x204c1a(0x15c)](({reqId:_0x2d2ae4,timeout:_0x53c089})=>{const _0x47b334=_0x204c1a;this[_0x47b334(0x16c)](_0x2d2ae4,_0x53c089);}));}['appendMutation'](_0x299400){const _0x33031d=_0x1de16c;return this[_0x33031d(0x256)]['push'](_0x299400),this;}[_0x1de16c(0x2e0)](_0x1150fa){const _0x2f8d3c=_0x1de16c;if(this[_0x2f8d3c(0x402)](_0x1150fa))return this['_clearScheduledTask'](),this['_injector']['createInstance'](I,this[_0x2f8d3c(0x378)],this[_0x2f8d3c(0x1a0)],this[_0x2f8d3c(0x1c3)],this['_pendingMutations'],null,[_0x1150fa],this[_0x2f8d3c(0x36f)]);try{let _0x323c9d=this['_transformService']['transformChangesets']([_0x1150fa],[this[_0x2f8d3c(0x1c3)]],!0x1);if((0x0,e[_0x2f8d3c(0x20c)])(_0x323c9d)){let {c1Prime:_0x19dfcb,c2Prime:_0x3b595e}=_0x323c9d,_0x1ef9e7=this[_0x2f8d3c(0x226)][_0x2f8d3c(0x307)](_0x19dfcb[0x0],this[_0x2f8d3c(0x256)]);if((0x0,e[_0x2f8d3c(0x2f1)])(_0x1ef9e7)){let {c1Prime:_0x437c70,m2Prime:_0x35131d}=_0x1ef9e7;return this[_0x2f8d3c(0x1f3)](_0x437c70),_0x3b595e[0x0][_0x2f8d3c(0x336)]=this[_0x2f8d3c(0x170)](),this[_0x2f8d3c(0x338)](),this[_0x2f8d3c(0x16d)][_0x2f8d3c(0x215)](O,this[_0x2f8d3c(0x378)],this[_0x2f8d3c(0x1a0)],_0x3b595e[0x0],_0x35131d,this['_handler'],void 0x0);}throw _0x1ef9e7['error'];}throw _0x323c9d[_0x2f8d3c(0x1e3)];}catch(_0x7e89fd){return this[_0x2f8d3c(0x30d)]['error'](_0x7e89fd),this[_0x2f8d3c(0x369)](!0x1);}}['onRemoteAck'](_0x3ecc3d){const _0x120e45=_0x1de16c;this[_0x120e45(0x338)]();let _0x1cb73a=this[_0x120e45(0x170)]();if(_0x3ecc3d['revision']<=_0x1cb73a)return this;if(this[_0x120e45(0x402)](_0x3ecc3d))return this['_injector'][_0x120e45(0x215)](I,this[_0x120e45(0x378)],this[_0x120e45(0x1a0)],this[_0x120e45(0x1c3)],this[_0x120e45(0x256)],_0x3ecc3d[_0x120e45(0x3be)],[],this[_0x120e45(0x36f)]);this[_0x120e45(0x3a3)]();let _0x49fadd=this[_0x120e45(0x16d)]['createInstance'](j,this[_0x120e45(0x378)],this[_0x120e45(0x1a0)],this[_0x120e45(0x256)],this[_0x120e45(0x36f)]);return _0x49fadd[_0x120e45(0x35e)](),_0x49fadd[_0x120e45(0x394)](),_0x49fadd;}['onRemoteRej'](_0x140d9c){const _0x1d3119=_0x1de16c;return this[_0x1d3119(0x369)](!!(_0x140d9c!=null&&_0x140d9c[_0x1d3119(0x3e2)]));}[_0x1de16c(0x28f)](_0x4e1150){const _0x289916=_0x1de16c;return this[_0x289916(0x39e)]>we?this[_0x289916(0x315)]():(this[_0x289916(0x3a8)]=xe(this[_0x289916(0x1eb)],{'timeout':this[_0x289916(0x1eb)],'reqId':_0x4e1150[_0x289916(0x163)]}),this[_0x289916(0x22a)]=this[_0x289916(0x3a8)][_0x289916(0x15c)](({reqId:_0x2ac1a6,timeout:_0x5d6af8})=>{this['_resendWithTimeout'](_0x2ac1a6,_0x5d6af8);}),this);}[_0x1de16c(0x315)](){const _0x7dc3f0=_0x1de16c;return this[_0x7dc3f0(0x338)](),this[_0x7dc3f0(0x16d)][_0x7dc3f0(0x215)](F,this['unitID'],this[_0x7dc3f0(0x1a0)],this[_0x7dc3f0(0x1c3)],this['_pendingMutations'],this[_0x7dc3f0(0x36f)]);}[_0x1de16c(0x127)](){return this;}['resend'](){const _0x479daf=_0x1de16c;this['_handler'][_0x479daf(0x219)](this['_awaitingChangeset']);}[_0x1de16c(0x369)](_0x11f474){const _0x15ec88=_0x1de16c;return this[_0x15ec88(0x338)](),this[_0x15ec88(0x16d)]['createInstance'](P,this[_0x15ec88(0x378)],this[_0x15ec88(0x1a0)],null,this[_0x15ec88(0x256)],this[_0x15ec88(0x36f)],_0x11f474);}[_0x1de16c(0x16c)](_0xdf29b4,_0x8aedd8){const _0x5e36fa=_0x1de16c;var _0x38356a;_0xdf29b4===((_0x38356a=this[_0x5e36fa(0x1c3)])==null?void 0x0:_0x38356a[_0x5e36fa(0x163)])&&(this[_0x5e36fa(0x1be)](),this[_0x5e36fa(0x1eb)]=_0x8aedd8===0x0?0x3e8:Math['min'](_0x8aedd8*0x2,Ce),this[_0x5e36fa(0x39e)]+=this[_0x5e36fa(0x1eb)]);}[_0x1de16c(0x338)](){const _0x1194e9=_0x1de16c;var _0x43dd66;(_0x43dd66=this['_sender'])==null||_0x43dd66[_0x1194e9(0x21f)](),this[_0x1194e9(0x1eb)]=0x0,this['_maxTotalRetryTimeout']=0x0;}};N=O=y([v(0x6,(0x0,t['Inject'])(t[_0x1de16c(0x25d)])),v(0x7,(0x0,t[_0x1de16c(0x20f)])(e[_0x1de16c(0x2eb)])),v(0x8,t[_0x1de16c(0x2a8)]),v(0x9,t[_0x1de16c(0x243)]),v(0xa,e['ITransformService']),v(0xb,t['IUndoRedoService']),v(0xc,(0x0,t[_0x1de16c(0x37e)])(S))],N);let P=class extends k{constructor(_0x377909,_0x4e3d56,_0x4d0348,_0x317747,_0xc067ac,_0x12d490=!0x1,_0x5d90a2,_0x5ad27c,_0x47e6f3,_0x45425e,_0x4dd96f,_0x1a7ab3,_0x40b1ec){const _0x4c5d37=_0x1de16c;super(_0x377909,_0x4e3d56,_0x4d0348,_0x317747,_0xc067ac,_0x5ad27c,_0x47e6f3,_0x45425e,_0x40b1ec),this[_0x4c5d37(0x16f)]=_0x12d490,this[_0x4c5d37(0x2c5)]=_0x5d90a2,this[_0x4c5d37(0x3ff)]=_0x4dd96f,this['_collaborationUIEventService']=_0x1a7ab3,this[_0x4c5d37(0x30c)]=_0x40b1ec,g(this,_0x4c5d37(0x218),_0x4c5d37(0x326)),this[_0x4c5d37(0x1f6)](),this['_clearLocalCache'](),this[_0x4c5d37(0x407)]();}[_0x1de16c(0x21e)](){return this;}[_0x1de16c(0x2e0)](){return this;}[_0x1de16c(0x2ca)](){return this;}['onRemoteRej'](){return this;}[_0x1de16c(0x28f)](){return this;}[_0x1de16c(0x315)](){return this;}[_0x1de16c(0x127)](){return this;}[_0x1de16c(0x1be)](){const _0x536b4f=_0x1de16c;throw Error(_0x536b4f(0x387));}[_0x1de16c(0x266)](){const _0x53d2d1=_0x1de16c;var _0x497395;(_0x497395=this[_0x53d2d1(0x2e1)])==null||_0x497395[_0x53d2d1(0x152)](this[_0x53d2d1(0x378)],this[_0x53d2d1(0x1a0)],null,[]);}[_0x1de16c(0x1f6)](){const _0x49d0e8=_0x1de16c;this[_0x49d0e8(0x16f)]?this[_0x49d0e8(0x3f4)]['emitEvent']({'id':'PERMISSION_DENIED'}):this[_0x49d0e8(0x3f4)][_0x49d0e8(0x262)]({'id':_0x49d0e8(0x171)});}[_0x1de16c(0x407)](){const _0x5b2ab3=_0x1de16c;this[_0x5b2ab3(0x2c5)]['updatePermissionPoint'](new r[(_0x5b2ab3(0x316))](this[_0x5b2ab3(0x378)])['id'],!0x1);}};P=y([v(0x6,(0x0,t[_0x1de16c(0x20f)])(t[_0x1de16c(0x3e7)])),v(0x7,t[_0x1de16c(0x2a8)]),v(0x8,t['IUndoRedoService']),v(0x9,(0x0,t[_0x1de16c(0x20f)])(e[_0x1de16c(0x2eb)])),v(0xa,(0x0,t['Inject'])(t[_0x1de16c(0x297)])),v(0xb,(0x0,t[_0x1de16c(0x20f)])(_)),v(0xc,(0x0,t['Optional'])(S))],P);let F=class extends k{constructor(_0x3368b8,_0x13fced,_0x3c569e,_0xa75bf7,_0x2525f6,_0x351f61,_0x3a777e,_0x593c98,_0x83a10f,_0x1c4209){const _0x25d7ed=_0x1de16c;super(_0x3368b8,_0x13fced,_0x3c569e,_0xa75bf7,_0x2525f6,_0x593c98,_0x83a10f,_0x3a777e,_0x1c4209),this['_injector']=_0x351f61,g(this,_0x25d7ed(0x218),_0x25d7ed(0x2fa));}[_0x1de16c(0x21e)](_0x6743e1){const _0x3f6b20=_0x1de16c;return this[_0x3f6b20(0x256)][_0x3f6b20(0x186)](_0x6743e1),this[_0x3f6b20(0x394)](),this;}[_0x1de16c(0x2e0)](_0x25b1b9){const _0x121130=_0x1de16c;throw Error(_0x121130(0x34f));}['onRemoteAck'](){const _0x3bab05=_0x1de16c;throw Error(_0x3bab05(0x37a));}[_0x1de16c(0x3a5)](){throw Error('[OfflineState]:\x20received\x20rejection.');}[_0x1de16c(0x28f)](){return this;}[_0x1de16c(0x315)](){return this;}[_0x1de16c(0x127)](){const _0x2e8a64=_0x1de16c;let {_injector:_0x4f563d,_pendingMutations:_0x56104f,_awaitingChangeset:_0x84e893,unitID:_0x56abd5,_handler:_0x157f88,type:_0x5596f8}=this,_0x17b3f5=Te(_0x4f563d,_0x56abd5,_0x5596f8,_0x84e893,_0x56104f,_0x157f88);return _0x17b3f5 instanceof j?_0x17b3f5[_0x2e8a64(0x35e)]():(_0x17b3f5 instanceof N||_0x17b3f5 instanceof M)&&_0x17b3f5[_0x2e8a64(0x1be)](),_0x17b3f5;}['resend'](){const _0x2a615c=_0x1de16c;throw Error(_0x2a615c(0x38f));}};F=y([v(0x5,(0x0,t[_0x1de16c(0x20f)])(t[_0x1de16c(0x25d)])),v(0x6,(0x0,t[_0x1de16c(0x20f)])(e['RevisionService'])),v(0x7,t[_0x1de16c(0x2a8)]),v(0x8,t[_0x1de16c(0x374)]),v(0x9,(0x0,t[_0x1de16c(0x37e)])(S))],F);let I=class extends k{constructor(_0x294574,_0x94ab04,_0x41d18d,_0x125c28,_0x4c3fa4,_0x10d6fd,_0x54342b,_0x570435,_0x257ee7,_0xe06725,_0x1ec77b,_0x475f8a,_0x4e9580,_0x5a84de){const _0x585b37=_0x1de16c;super(_0x294574,_0x94ab04,_0x41d18d,_0x125c28,_0x54342b,_0x1ec77b,_0x475f8a,_0x257ee7,_0x5a84de),this[_0x585b37(0x385)]=_0x4c3fa4,this[_0x585b37(0x298)]=_0x10d6fd,this[_0x585b37(0x16d)]=_0x570435,this[_0x585b37(0x30d)]=_0xe06725,this[_0x585b37(0x226)]=_0x4e9580,this[_0x585b37(0x30c)]=_0x5a84de,g(this,'status',_0x585b37(0x3f5));}['onMissedChangesetFetched'](_0x44ecd0){const _0x3ac8ff=_0x1de16c;try{if(this['_handleRemoteChangesets'](_0x44ecd0)[_0x3ac8ff(0x3ec)])throw Error(_0x3ac8ff(0x283));if(this[_0x3ac8ff(0x18f)]([...this[_0x3ac8ff(0x298)]][_0x3ac8ff(0x24f)]((_0x3232a5,_0x542704)=>_0x3232a5[_0x3ac8ff(0x3be)]-_0x542704[_0x3ac8ff(0x3be)]))[_0x3ac8ff(0x3ec)])return this['_queuedRemoteChangesets']=[],this[_0x3ac8ff(0x394)](),this[_0x3ac8ff(0x36f)][_0x3ac8ff(0x3da)]({'from':this['_getCurrentRevision'](),'to':0x0}),this;let _0x1646d3=this['_awaitingChangeset'],_0x8e2d25=this[_0x3ac8ff(0x256)],_0x21cb2e;if(_0x1646d3&&_0x8e2d25['length']!==0x0)_0x21cb2e=this[_0x3ac8ff(0x16d)][_0x3ac8ff(0x215)](N,this[_0x3ac8ff(0x378)],this[_0x3ac8ff(0x1a0)],_0x1646d3,_0x8e2d25,this[_0x3ac8ff(0x36f)],void 0x0);else{if(_0x1646d3&&_0x8e2d25[_0x3ac8ff(0x3c7)]===0x0)_0x1646d3[_0x3ac8ff(0x336)]=this['_getCurrentRevision'](),_0x21cb2e=this[_0x3ac8ff(0x16d)][_0x3ac8ff(0x215)](M,this[_0x3ac8ff(0x378)],this[_0x3ac8ff(0x1a0)],_0x1646d3,this[_0x3ac8ff(0x36f)]);else{if(_0x8e2d25['length']!==0x0){let _0x5583de=this[_0x3ac8ff(0x16d)]['createInstance'](j,this[_0x3ac8ff(0x378)],this[_0x3ac8ff(0x1a0)],_0x8e2d25,this[_0x3ac8ff(0x36f)]);_0x5583de[_0x3ac8ff(0x35e)](),_0x21cb2e=_0x5583de;}else _0x21cb2e=this[_0x3ac8ff(0x16d)]['createInstance'](A,this[_0x3ac8ff(0x378)],this['type'],this[_0x3ac8ff(0x36f)]);}}return _0x21cb2e[_0x3ac8ff(0x394)](),_0x21cb2e;}catch(_0x504fd3){return this[_0x3ac8ff(0x30d)][_0x3ac8ff(0x1e3)]('[FetchMissState]',_0x3ac8ff(0x2d9),_0x504fd3),this['_injector'][_0x3ac8ff(0x215)](P,this[_0x3ac8ff(0x378)],this[_0x3ac8ff(0x1a0)],this['_awaitingChangeset'],this['_pendingMutations'],this[_0x3ac8ff(0x36f)],!0x1);}}[_0x1de16c(0x18f)](_0x5494a3){const _0x345e6c=_0x1de16c;this[_0x345e6c(0x1cc)]();for(let _0x41fe70=0x0;_0x41fe70<_0x5494a3[_0x345e6c(0x3c7)];_0x41fe70++){let _0x118d0f=_0x5494a3[_0x41fe70],_0x2572f7=this[_0x345e6c(0x170)]();if(!(_0x118d0f[_0x345e6c(0x3be)]<=_0x2572f7)){if(_0x118d0f['revision']>_0x2572f7+0x1)return{'missingChangesets':!0x0};if(this['_isEchoedAwaitingChangeset'](_0x118d0f)){this[_0x345e6c(0x24a)]();continue;}this[_0x345e6c(0x346)](_0x118d0f),this[_0x345e6c(0x1cc)]();}}return{'missingChangesets':!0x1};}['_transformAndApplyRemoteChangeset'](_0x69eb26){const _0x16faef=_0x1de16c;let _0x4f14e7=_0x69eb26,_0x57ef82=this[_0x16faef(0x1c3)];if(_0x57ef82){let _0x216bb3=this['_transformService']['transformChangesets']([_0x69eb26],[_0x57ef82],!0x1);if(!(0x0,e[_0x16faef(0x20c)])(_0x216bb3))throw _0x216bb3['error'];_0x4f14e7=_0x216bb3['c1Prime'][0x0],_0x57ef82=_0x216bb3[_0x16faef(0x324)][0x0];}let _0x19473e=this[_0x16faef(0x256)];if(_0x19473e['length']){let _0x3f4312=this[_0x16faef(0x226)][_0x16faef(0x307)](_0x4f14e7,_0x19473e);if(!(0x0,e[_0x16faef(0x2f1)])(_0x3f4312))throw _0x3f4312[_0x16faef(0x1e3)];_0x4f14e7=_0x3f4312[_0x16faef(0x38e)],_0x19473e=_0x3f4312[_0x16faef(0x249)];}this[_0x16faef(0x1f3)](_0x4f14e7),_0x57ef82&&(_0x57ef82[_0x16faef(0x336)]=this['_getCurrentRevision']()),this[_0x16faef(0x1c3)]=_0x57ef82,this[_0x16faef(0x256)]=_0x19473e;}[_0x1de16c(0x1cc)](){const _0x3baec5=_0x1de16c;if(!this[_0x3baec5(0x1c3)]||this[_0x3baec5(0x385)]==null)return;let _0x3cde16=this[_0x3baec5(0x170)]();if(this[_0x3baec5(0x385)]<=_0x3cde16)throw Error(_0x3baec5(0x285)+this[_0x3baec5(0x385)]+'.');this[_0x3baec5(0x385)]===_0x3cde16+0x1&&this[_0x3baec5(0x24a)]();}[_0x1de16c(0x24a)](){const _0x507d98=_0x1de16c;this['_incrementRevisionNumber'](),this[_0x507d98(0x1c3)]=null,this[_0x507d98(0x385)]=null;}['_isEchoedAwaitingChangeset'](_0x570a61){const _0x18701f=_0x1de16c;let _0x279e1d=this[_0x18701f(0x1c3)];return!_0x279e1d||!_0x279e1d['sid']||_0x279e1d[_0x18701f(0x163)]===null||_0x279e1d[_0x18701f(0x163)]===void 0x0?!0x1:_0x570a61[_0x18701f(0x378)]===_0x279e1d[_0x18701f(0x378)]&&_0x570a61[_0x18701f(0x3d2)]===_0x279e1d['sid']&&_0x570a61[_0x18701f(0x163)]===_0x279e1d['reqId'];}[_0x1de16c(0x1be)](){const _0x24280c=_0x1de16c;throw Error(_0x24280c(0x348));}[_0x1de16c(0x21e)](_0x242a50){const _0x5ab464=_0x1de16c;return this[_0x5ab464(0x256)]['push'](_0x242a50),this;}[_0x1de16c(0x2e0)](_0x1e03c1){const _0x504c81=_0x1de16c;return this[_0x504c81(0x298)]['push'](_0x1e03c1),this;}['onRemoteAck'](_0x6c67af){const _0x3099b4=_0x1de16c;if(this[_0x3099b4(0x1c3)]){let _0x5f240e=this[_0x3099b4(0x170)]();return _0x6c67af[_0x3099b4(0x3be)]<=_0x5f240e||(_0x5f240e+0x1===_0x6c67af[_0x3099b4(0x3be)]?(this[_0x3099b4(0x3a3)](),this[_0x3099b4(0x1c3)]=null,this[_0x3099b4(0x385)]=null):this['_acknowledgedAwaitingRevision']=_0x6c67af[_0x3099b4(0x3be)]),this;}if(_0x6c67af['revision']<=this['_getCurrentRevision']())return this;throw Error(_0x3099b4(0x36e));}[_0x1de16c(0x3a5)](_0x4e4f6a){const _0x134b17=_0x1de16c;return this['_onConflict'](!!(_0x4e4f6a!=null&&_0x4e4f6a[_0x134b17(0x3e2)]));}[_0x1de16c(0x28f)](){return this;}[_0x1de16c(0x315)](){const _0x176fd8=_0x1de16c;return this[_0x176fd8(0x16d)]['createInstance'](F,this[_0x176fd8(0x378)],this[_0x176fd8(0x1a0)],this[_0x176fd8(0x1c3)],this[_0x176fd8(0x256)],this[_0x176fd8(0x36f)]);}['toggleOnline'](){return this;}[_0x1de16c(0x369)](_0x104583){const _0x250aa4=_0x1de16c;return this[_0x250aa4(0x16d)][_0x250aa4(0x215)](P,this['unitID'],this[_0x250aa4(0x1a0)],this[_0x250aa4(0x1c3)],this[_0x250aa4(0x256)],this[_0x250aa4(0x36f)],_0x104583);}};I=y([v(0x7,(0x0,t[_0x1de16c(0x20f)])(t[_0x1de16c(0x25d)])),v(0x8,(0x0,t[_0x1de16c(0x20f)])(e[_0x1de16c(0x2eb)])),v(0x9,t[_0x1de16c(0x243)]),v(0xa,t[_0x1de16c(0x2a8)]),v(0xb,t[_0x1de16c(0x374)]),v(0xc,e[_0x1de16c(0x13c)]),v(0xd,(0x0,t[_0x1de16c(0x37e)])(S))],I);function Te(_0x22175d,_0x2ddb0e,_0x4b49de,_0x4f6c1e,_0x213c9a,_0x4642bd){const _0x5e6026=_0x1de16c;return _0x4f6c1e&&_0x213c9a[_0x5e6026(0x3c7)]?_0x22175d[_0x5e6026(0x215)](N,_0x2ddb0e,_0x4b49de,_0x4f6c1e,_0x213c9a,_0x4642bd,void 0x0):_0x4f6c1e?_0x22175d[_0x5e6026(0x215)](M,_0x2ddb0e,_0x4b49de,_0x4f6c1e,_0x4642bd):_0x213c9a[_0x5e6026(0x3c7)]?_0x22175d[_0x5e6026(0x215)](j,_0x2ddb0e,_0x4b49de,_0x213c9a,_0x4642bd):_0x22175d[_0x5e6026(0x215)](A,_0x2ddb0e,_0x4b49de,_0x4642bd);}let L=class extends t['RxDisposable']{get['state'](){const _0x2638b5=_0x1de16c;return this[_0x2638b5(0x404)];}constructor(_0x4e040a,_0x130f9e,_0x4b03de,_0x385ffc,_0x1eeea3,_0x11b56e,_0x42d9e3,_0x35c6df,_0x2e876b,_0x2302c0,_0x33d700,_0x5219a9,_0x44c0f5,_0xf74dce){const _0x584baa=_0x1de16c;super(),this[_0x584baa(0x378)]=_0x4e040a,this[_0x584baa(0x380)]=_0x130f9e,this[_0x584baa(0x2ac)]=_0x4b03de,this[_0x584baa(0x16d)]=_0x385ffc,this[_0x584baa(0x1ba)]=_0x1eeea3,this[_0x584baa(0x3ff)]=_0x11b56e,this['_revisionService']=_0x42d9e3,this[_0x584baa(0x37d)]=_0x35c6df,this['_univerInstanceService']=_0x2e876b,this[_0x584baa(0x30d)]=_0x2302c0,this[_0x584baa(0x3ab)]=_0x33d700,this[_0x584baa(0x2c5)]=_0x5219a9,this[_0x584baa(0x238)]=_0x44c0f5,this[_0x584baa(0x2e1)]=_0xf74dce,g(this,_0x584baa(0x1cf),new i[(_0x584baa(0x19f))](null)),g(this,_0x584baa(0x2f6),this[_0x584baa(0x1cf)]['asObservable']()),g(this,_0x584baa(0x404),void 0x0),g(this,_0x584baa(0x38a),!0x1),g(this,_0x584baa(0x23e),''),g(this,_0x584baa(0x1f2),0x0),g(this,_0x584baa(0x1b6),this[_0x584baa(0x2f6)][_0x584baa(0x200)]((0x0,i[_0x584baa(0x2fc)])(_0x72fbda=>_0x72fbda?_0x72fbda[_0x584baa(0x218)]:_0x584baa(0x2fa)),(0x0,i['shareReplay'])({'bufferSize':0x1,'refCount':!0x0}))),g(this,_0x584baa(0x33f),!0x1),g(this,_0x584baa(0x265),[]);}async[_0x1de16c(0x399)](){if(this['state'])throw Error('[CollaborationEntity]:\x20initial\x20state\x20has\x20been\x20created\x20before.\x20You\x20should\x20not\x20call\x20\x22init\x22\x20twice.');await this['_init']();}[_0x1de16c(0x2ef)](){const _0x10454a=_0x1de16c;return this['_collaborationPaused']=!0x0,(0x0,t[_0x10454a(0x1db)])(()=>{const _0x272dda=_0x10454a;this[_0x272dda(0x38a)]=!0x1,this[_0x272dda(0x25b)]();});}[_0x1de16c(0x32e)](_0xce831b){const _0x3d1d0c=_0x1de16c;this[_0x3d1d0c(0x1fe)](_0xce831b);}['_updateState'](_0x382200){const _0x3d37f7=_0x1de16c;this[_0x3d37f7(0x404)]=_0x382200,this[_0x3d37f7(0x1cf)][_0x3d37f7(0x286)](_0x382200);}async[_0x1de16c(0x208)](){const _0x9a3175=_0x1de16c;if(this[_0x9a3175(0x3b7)](await this[_0x9a3175(0x263)]()),this[_0x9a3175(0x238)]){var _0x510519;(_0x510519=this[_0x9a3175(0x238)])==null||_0x510519[_0x9a3175(0x392)](this[_0x9a3175(0x378)]),this['disposeWithMe'](this['_singleActiveUnitService'][_0x9a3175(0x132)](this[_0x9a3175(0x378)])[_0x9a3175(0x15c)](_0x442e13=>{const _0x5fbe92=_0x9a3175;this[_0x5fbe92(0x30d)][_0x5fbe92(0x2f2)](_0x5fbe92(0x156),_0x5fbe92(0x33c),_0x442e13),_0x442e13===0x1?(this[_0x5fbe92(0x37d)][_0x5fbe92(0x262)]({'id':_0x5fbe92(0x3c6)}),this[_0x5fbe92(0x2c5)][_0x5fbe92(0x301)](new r['WorkbookEditablePermission'](this[_0x5fbe92(0x378)])['id'],!0x1),this[_0x5fbe92(0x2c5)]['setShowComponents'](!0x1)):(this[_0x5fbe92(0x2c5)]['updatePermissionPoint'](new r['WorkbookEditablePermission'](this['unitID'])['id'],!0x0),this[_0x5fbe92(0x2c5)]['setShowComponents'](!0x0));}));}let _0x56779e=!0x1;return this['disposeWithMe'](this[_0x9a3175(0x380)]['sessionStatus$'][_0x9a3175(0x15c)](_0x1f8cc0=>{const _0x28965b=_0x9a3175;_0x1f8cc0===0x3?this[_0x28965b(0x3dd)](_0x56779e):_0x1f8cc0===0x2&&(_0x56779e=!0x0,this[_0x28965b(0x30e)]());})),this[_0x9a3175(0x3b8)](this[_0x9a3175(0x380)][_0x9a3175(0x201)]['subscribe'](_0x7ad1a8=>{const _0x362456=_0x9a3175;try{switch(_0x7ad1a8['eventID']){case e[_0x362456(0x255)]['NEW_CHANGESETS']:this['_onRemoteChangeset']((0x0,e[_0x362456(0x320)])(_0x7ad1a8[_0x362456(0x2d2)]));break;case e[_0x362456(0x255)][_0x362456(0x3bf)]:this[_0x362456(0x2de)](_0x7ad1a8[_0x362456(0x2d2)]);break;case e[_0x362456(0x255)][_0x362456(0x357)]:this[_0x362456(0x2c1)]();break;case e[_0x362456(0x255)][_0x362456(0x18b)]:this['_onRemoteRetry'](_0x7ad1a8[_0x362456(0x2d2)]);break;case e[_0x362456(0x255)][_0x362456(0x2c8)]:this[_0x362456(0x19a)](_0x7ad1a8[_0x362456(0x2d2)]['changesets'][_0x362456(0x2fc)](_0x52c38e=>(0x0,e[_0x362456(0x320)])(_0x52c38e)));break;case e[_0x362456(0x255)]['PERMISSION_REJ']:this[_0x362456(0x2c1)]({'isPermissionRej':!0x0});break;case e[_0x362456(0x255)][_0x362456(0x26f)]:break;}}catch(_0x4e92ae){throw console['error'](_0x362456(0x409),_0x4e92ae),_0x4e92ae;}})),this['_state'];}[_0x1de16c(0x23f)](){this['_transitionLocked']=!0x1;}['_lockTransition'](){const _0x3a7207=_0x1de16c;if(this[_0x3a7207(0x33f)])throw Error('[CollaborationEntity]:\x20cannot\x20lock\x20transition\x20twice!\x20This\x20is\x20an\x20implementation\x20error,\x20meaning\x20you\x20transit\x20the\x20collaboration\x20state\x20again\x20in\x20the\x20process\x20of\x20a\x20previous\x20transition.\x20This\x20should\x20never\x20happen.');this[_0x3a7207(0x33f)]=!0x0;}[_0x1de16c(0x1fe)](_0x5f707){const _0x2bdd14=_0x1de16c;this[_0x2bdd14(0x1bb)](),this[_0x2bdd14(0x3b7)](this[_0x2bdd14(0x404)][_0x2bdd14(0x21e)](_0x5f707)),this[_0x2bdd14(0x23f)]();}[_0x1de16c(0x376)](_0x48fd39){const _0xb0e5bb=_0x1de16c;if(!(_0x48fd39['revision']<=this[_0xb0e5bb(0x20b)][_0xb0e5bb(0x295)](this[_0xb0e5bb(0x378)]))){if(this[_0xb0e5bb(0x38a)]){this['_remoteChangesetQueue'][_0xb0e5bb(0x186)](_0x48fd39);return;}this['_applyRemoteChangeset'](_0x48fd39);}}[_0x1de16c(0x25b)](){const _0x46f095=_0x1de16c;this[_0x46f095(0x265)]['forEach'](_0x3d03ab=>this[_0x46f095(0x2d1)](_0x3d03ab)),this[_0x46f095(0x265)]=[];}[_0x1de16c(0x2d1)](_0x3d817e){const _0x5b1ed5=_0x1de16c;let _0x76a0a6=this['_compressMutationService'][_0x5b1ed5(0x1c5)][_0x5b1ed5(0x14a)](this[_0x5b1ed5(0x1ba)][_0x5b1ed5(0x1c5)]['getInterceptPoints']()[_0x5b1ed5(0x128)])(_0x3d817e[_0x5b1ed5(0x13f)],null)||_0x3d817e['mutations'],_0x540241={..._0x3d817e,'mutations':_0x76a0a6};this['_lockTransition'](),this[_0x5b1ed5(0x3b7)](this[_0x5b1ed5(0x404)][_0x5b1ed5(0x2e0)](_0x540241)),this[_0x5b1ed5(0x23f)]();}[_0x1de16c(0x2de)](_0x1ef428){const _0x373de5=_0x1de16c;this[_0x373de5(0x1bb)](),this[_0x373de5(0x3b7)](this['_state']['onRemoteAck'](_0x1ef428)),this[_0x373de5(0x23f)]();}[_0x1de16c(0x2c1)](_0x5a2a16){const _0x4c8125=_0x1de16c;this[_0x4c8125(0x1bb)](),this[_0x4c8125(0x3b7)](this['_state'][_0x4c8125(0x3a5)](_0x5a2a16)),this[_0x4c8125(0x23f)]();}['_onRemoteRetry'](_0x4adb34){const _0x50adba=_0x1de16c;this['_lockTransition'](),this[_0x50adba(0x3b7)](this['_state'][_0x50adba(0x28f)](_0x4adb34)),this[_0x50adba(0x23f)]();}['_onFetchMissResult'](_0x36ed0d){const _0x540574=_0x1de16c;if(!(this[_0x540574(0x404)]instanceof I))throw TypeError('[CollaborationEntity]:\x20cannot\x20apply\x20missing\x20results\x20on\x20other\x20states!');let _0x13594c=_0x36ed0d[_0x540574(0x2fc)](_0x442626=>{const _0xef6a5=_0x540574;let _0x19fe62=this[_0xef6a5(0x1ba)][_0xef6a5(0x1c5)][_0xef6a5(0x14a)](this[_0xef6a5(0x1ba)]['interceptor'][_0xef6a5(0x368)]()[_0xef6a5(0x128)])(_0x442626['mutations'],null)||_0x442626[_0xef6a5(0x13f)];return{..._0x442626,'mutations':_0x19fe62};});this[_0x540574(0x1bb)](),this['_updateState'](this[_0x540574(0x404)][_0x540574(0x329)](_0x13594c)),this[_0x540574(0x23f)]();}['_toggleOffline'](){const _0x2af132=_0x1de16c;this[_0x2af132(0x1bb)](),this[_0x2af132(0x3b7)](this[_0x2af132(0x404)]['toggleOffline']()),this['_unlockTransition']();}[_0x1de16c(0x3dd)](_0x1e04e8=!0x1){const _0x5a60a1=_0x1de16c;this[_0x5a60a1(0x1bb)](),this[_0x5a60a1(0x3b7)](this[_0x5a60a1(0x404)][_0x5a60a1(0x127)]()),this[_0x5a60a1(0x23f)]();let _0x194db4=this[_0x5a60a1(0x404)];_0x1e04e8&&_0x194db4 instanceof A&&(this[_0x5a60a1(0x1bb)](),this['_updateState'](_0x194db4[_0x5a60a1(0x14e)]()),this[_0x5a60a1(0x23f)]());}async[_0x1de16c(0x263)](){return new Promise(_0x289a53=>{const _0x333776=_0x3896;this[_0x333776(0x380)]['sessionStatus$'][_0x333776(0x200)]((0x0,i[_0x333776(0x2ed)])(0x1))[_0x333776(0x15c)](async _0x49b754=>{const _0x43bf41=_0x333776;_0x289a53(await this[_0x43bf41(0x223)](_0x49b754===0x3));});});}['_createHandler'](){const _0x3cd7cf=_0x1de16c;let _0x51ab23=this[_0x3cd7cf(0x378)];return{'onStateChange':(_0x5d962c,_0x21cd31)=>{const _0x257ac3=_0x3cd7cf;if(_0x5d962c!==this[_0x257ac3(0x404)])throw Error('[CollaborationEntity]:\x20invalid\x20state\x20transition!\x20State\x20transferred\x20from\x20is\x20not\x20the\x20current\x20state.\x0aBefore:\x20'+_0x5d962c[_0x257ac3(0x218)]+_0x257ac3(0x137)+_0x21cd31[_0x257ac3(0x218)]+_0x257ac3(0x2bc)+this['_state'][_0x257ac3(0x218)]);this['_updateState'](_0x21cd31);},'onSendChangeset':_0xa8b839=>{const _0x1b157c=_0x3cd7cf;_0xa8b839[_0x1b157c(0x3d2)]||(_0xa8b839[_0x1b157c(0x3d2)]=this['_changesetSessionId'],_0xa8b839['reqId']=++this[_0x1b157c(0x1f2)]);let _0x255296={'eventID':e[_0x1b157c(0x255)][_0x1b157c(0x32b)],'data':{'unitID':_0xa8b839[_0x1b157c(0x378)],'unitType':this[_0x1b157c(0x2ac)],'changeset':_0xa8b839,'memberID':this[_0x1b157c(0x380)]['getMemberID']()}};this[_0x1b157c(0x380)][_0x1b157c(0x2d5)](_0x255296,this['unitID']);},'onMissingChangesets':({from:_0x1ae612,to:_0x4486a9})=>{const _0x580078=_0x3cd7cf;this[_0x580078(0x30d)]['debug'](_0x580078(0x156),_0x580078(0x3c1)+_0x1ae612+_0x580078(0x396)+_0x4486a9);let _0x57fad6={'eventID':e[_0x580078(0x255)]['FETCH_MISSING'],'data':{'unitID':_0x51ab23,'unitType':this[_0x580078(0x2ac)],'from':_0x1ae612,'to':_0x4486a9}};this[_0x580078(0x380)]['send'](_0x57fad6,this[_0x580078(0x378)]);}};}async['_createInitialStateImpl'](_0x129552){const _0x53eefe=_0x1de16c;var _0x59ad39,_0x15c913,_0x31e12a;let _0x361cd4=await((_0x59ad39=this[_0x53eefe(0x2e1)])==null?void 0x0:_0x59ad39['loadOfflineData'](this[_0x53eefe(0x378)])),_0x29e58=(_0x15c913=_0x361cd4==null?void 0x0:_0x361cd4['mutations'])==null?[]:_0x15c913,_0x3e21b9=(_0x31e12a=_0x361cd4==null?void 0x0:_0x361cd4[_0x53eefe(0x2f5)])==null?null:_0x31e12a,_0x5b73e2=!!(_0x3e21b9!=null&&_0x3e21b9[_0x53eefe(0x3d2)])&&!!(_0x3e21b9!=null&&_0x3e21b9['reqId']);this[_0x53eefe(0x23e)]=_0x5b73e2?_0x3e21b9[_0x53eefe(0x3d2)]:(0x0,e[_0x53eefe(0x333)])(),this[_0x53eefe(0x1f2)]=_0x5b73e2?_0x3e21b9['reqId']:0x0;let _0x15e7e3=this[_0x53eefe(0x378)];try{this[_0x53eefe(0x3bc)](_0x3e21b9,_0x29e58);}catch(_0x3c3f55){this[_0x53eefe(0x30d)]['error'](_0x3c3f55);}let _0xaede08=this[_0x53eefe(0x312)]();if(_0x129552){let _0x156061=Te(this[_0x53eefe(0x16d)],_0x15e7e3,this[_0x53eefe(0x2ac)],_0x3e21b9,_0x29e58,_0xaede08);return _0x156061 instanceof j?_0x156061[_0x53eefe(0x35e)]():(_0x156061 instanceof N||_0x156061 instanceof M)&&_0x156061[_0x53eefe(0x1be)](),_0x156061;}return this[_0x53eefe(0x16d)][_0x53eefe(0x215)](F,_0x15e7e3,this[_0x53eefe(0x2ac)],_0x3e21b9,_0x29e58,_0xaede08);}['_replayCachedMutations'](_0x41d9d9,_0x39d976){const _0x41c856=_0x1de16c;var _0x2fe3c3,_0x117df6;let _0x1e3b34=this[_0x41c856(0x1ba)][_0x41c856(0x1c5)]['fetchThroughInterceptors'](this[_0x41c856(0x1ba)][_0x41c856(0x1c5)][_0x41c856(0x368)]()[_0x41c856(0x128)]);(_0x2fe3c3=_0x1e3b34((_0x41d9d9==null?void 0x0:_0x41d9d9[_0x41c856(0x13f)])||[],null))==null||_0x2fe3c3['forEach'](_0x2f2ba2=>this['_commandService'][_0x41c856(0x300)](_0x2f2ba2['id'],_0x2f2ba2[_0x41c856(0x3ce)])),(_0x117df6=_0x1e3b34(_0x39d976||[],null))==null||_0x117df6[_0x41c856(0x2f3)](_0x300c3e=>this['_commandService'][_0x41c856(0x300)](_0x300c3e['id'],_0x300c3e[_0x41c856(0x3ce)]));}};L=y([v(0x3,(0x0,t[_0x1de16c(0x20f)])(t[_0x1de16c(0x25d)])),v(0x4,(0x0,t[_0x1de16c(0x20f)])(e[_0x1de16c(0x160)])),v(0x5,(0x0,t[_0x1de16c(0x20f)])(t[_0x1de16c(0x297)])),v(0x6,(0x0,t['Inject'])(e[_0x1de16c(0x2eb)])),v(0x7,(0x0,t[_0x1de16c(0x20f)])(_)),v(0x8,t[_0x1de16c(0x1ca)]),v(0x9,t[_0x1de16c(0x243)]),v(0xa,t[_0x1de16c(0x2a8)]),v(0xb,t[_0x1de16c(0x3e7)]),v(0xc,(0x0,t[_0x1de16c(0x37e)])(w)),v(0xd,(0x0,t[_0x1de16c(0x37e)])(S))],L);let R=class extends L{constructor(_0x6a7698,_0x1e029,_0xcb3351,_0x3105ff,_0x4b0b36,_0x3f2f98,_0x1a908f,_0x3c1a0e,_0xb1c8b7,_0x36f4f4,_0x304784,_0x3b7e58,_0x33b4d1,_0x329c5f){const _0x37b5f6=_0x1de16c;super(_0x6a7698,_0xcb3351,_0x1e029,_0x3105ff,_0x4b0b36,_0x3f2f98,_0x1a908f,_0x3c1a0e,_0xb1c8b7,_0x36f4f4,_0x304784,_0x3b7e58,_0x33b4d1,_0x329c5f),this[_0x37b5f6(0x378)]=_0x6a7698,this[_0x37b5f6(0x1a0)]=_0x1e029,g(this,_0x37b5f6(0x1f9),null);}[_0x1de16c(0x181)](_0x1eef9e){const _0x29a11d=_0x1de16c;this[_0x29a11d(0x1f9)]=_0x1eef9e;}['dispose'](){const _0xebd947=_0x1de16c;this[_0xebd947(0x1f9)]=null,super['dispose']();}['_createHandler'](){const _0x37443d=_0x1de16c;let _0x3ebf0f=super[_0x37443d(0x312)]();return _0x3ebf0f['onTransformIME']=_0x12e020=>{const _0x3a1f9b=_0x37443d;var _0x54ce6f,_0x5363f5;return(_0x54ce6f=this['_handlerCallback'])==null||(_0x5363f5=_0x54ce6f[_0x3a1f9b(0x364)])==null?void 0x0:_0x5363f5[_0x3a1f9b(0x21c)](_0x54ce6f,_0x12e020);},_0x3ebf0f[_0x37443d(0x32d)]=_0x57996e=>{const _0x9cad59=_0x37443d;var _0x1a6bf9,_0x3c971f;return(_0x1a6bf9=this[_0x9cad59(0x1f9)])==null||(_0x3c971f=_0x1a6bf9[_0x9cad59(0x32d)])==null?void 0x0:_0x3c971f[_0x9cad59(0x21c)](_0x1a6bf9,_0x57996e);},_0x3ebf0f[_0x37443d(0x2cc)]=_0x1affe9=>{const _0x34409a=_0x37443d;var _0x5b8feb,_0x32cb23;return(_0x5b8feb=this[_0x34409a(0x1f9)])==null||(_0x32cb23=_0x5b8feb[_0x34409a(0x2cc)])==null?void 0x0:_0x32cb23[_0x34409a(0x21c)](_0x5b8feb,_0x1affe9);},_0x3ebf0f[_0x37443d(0x204)]=_0x14e1ca=>{const _0x3df518=_0x37443d;var _0xd95b2e,_0x3fcdbb;return(_0xd95b2e=this[_0x3df518(0x1f9)])==null||(_0x3fcdbb=_0xd95b2e['onSyncEditingCollabCursor'])==null?void 0x0:_0x3fcdbb[_0x3df518(0x21c)](_0xd95b2e,_0x14e1ca);},_0x3ebf0f[_0x37443d(0x1d4)]=_0x30694e=>{const _0x2729b8=_0x37443d;var _0x361719,_0x3b1f33,_0x31628c;if(!((_0x361719=this[_0x2729b8(0x1f9)])!=null&&_0x361719[_0x2729b8(0x1d4)]))throw Error(_0x2729b8(0x241));return(_0x3b1f33=this['_handlerCallback'])==null||(_0x31628c=_0x3b1f33[_0x2729b8(0x1d4)])==null?void 0x0:_0x31628c[_0x2729b8(0x21c)](_0x3b1f33,_0x30694e);},_0x3ebf0f['onTransformRemoteChangesetByStateCache']=_0x5ec831=>{const _0x16b77d=_0x37443d;var _0x596e8b,_0x26a2b4,_0x2d3865;if(!((_0x596e8b=this[_0x16b77d(0x1f9)])!=null&&_0x596e8b[_0x16b77d(0x3d8)]))throw Error(_0x16b77d(0x2fd));return(_0x26a2b4=this[_0x16b77d(0x1f9)])==null||(_0x2d3865=_0x26a2b4[_0x16b77d(0x3d8)])==null?void 0x0:_0x2d3865[_0x16b77d(0x21c)](_0x26a2b4,_0x5ec831);},_0x3ebf0f;}async[_0x1de16c(0x208)](){const _0x50a0af=_0x1de16c;let _0x3850cd=await super[_0x50a0af(0x208)]();return this[_0x50a0af(0x3b8)](this['_commandService'][_0x50a0af(0x313)]((_0x437e6f,_0x3bab39)=>{const _0xb01300=_0x50a0af;if(_0x437e6f['type']!==t[_0xb01300(0x267)][_0xb01300(0x37c)]||_0x3bab39!=null&&_0x3bab39[_0xb01300(0x299)]||_0x3bab39!=null&&_0x3bab39[_0xb01300(0x296)]||_0x437e6f['id']===n['RichTextEditingMutation']['id'])return;let _0x38a228=_0x437e6f[_0xb01300(0x3ce)];if((_0x38a228==null?void 0x0:_0x38a228[_0xb01300(0x2c9)])!==this['unitID'])return;let _0x587383=_0x437e6f,_0x69312d=this['_compressMutationService'][_0xb01300(0x1c5)][_0xb01300(0x14a)](this[_0xb01300(0x1ba)][_0xb01300(0x1c5)][_0xb01300(0x368)]()['COMPRESS_MUTATION_SEND'])([_0x587383],this[_0xb01300(0x2a7)])||[_0x587383];this[_0xb01300(0x1fe)](_0x69312d[0x0]);})),_0x3850cd;}};R=y([v(0x3,(0x0,t[_0x1de16c(0x20f)])(t[_0x1de16c(0x25d)])),v(0x4,(0x0,t[_0x1de16c(0x20f)])(e[_0x1de16c(0x160)])),v(0x5,(0x0,t['Inject'])(t[_0x1de16c(0x297)])),v(0x6,(0x0,t[_0x1de16c(0x20f)])(e[_0x1de16c(0x2eb)])),v(0x7,(0x0,t[_0x1de16c(0x20f)])(_)),v(0x8,t[_0x1de16c(0x1ca)]),v(0x9,t[_0x1de16c(0x243)]),v(0xa,t[_0x1de16c(0x2a8)]),v(0xb,t[_0x1de16c(0x3e7)]),v(0xc,(0x0,t['Optional'])(w)),v(0xd,(0x0,t[_0x1de16c(0x37e)])(S))],R);let z=class extends L{constructor(_0x2e7a91,_0x1b4f5d,_0x19bf01,_0x486c3d,_0x58d054,_0x20f3a0,_0x1fb48c,_0x4439a5,_0x37e1e8,_0x353ddb,_0x59b6b0,_0x3c8d82,_0x4c0158,_0x5bcb09,_0x35adba){const _0xf0dbe=_0x1de16c;super(_0x2e7a91,_0x19bf01,_0x1b4f5d,_0x486c3d,_0x58d054,_0x20f3a0,_0x1fb48c,_0x37e1e8,_0x353ddb,_0x59b6b0,_0x3c8d82,_0x4c0158,_0x5bcb09,_0x35adba),this['unitID']=_0x2e7a91,this[_0xf0dbe(0x1a0)]=_0x1b4f5d,this[_0xf0dbe(0x221)]=_0x4439a5;}['_createHandler'](){const _0x472d6e=_0x1de16c;let _0x33026d=super[_0x472d6e(0x312)]();return _0x33026d[_0x472d6e(0x2cc)]=_0x10d9f2=>this[_0x472d6e(0x221)][_0x472d6e(0x3ea)](_0x10d9f2),_0x33026d;}async[_0x1de16c(0x208)](){const _0x15e563=_0x1de16c;let _0x27225d=await super[_0x15e563(0x208)]();return this['disposeWithMe'](this[_0x15e563(0x3ab)][_0x15e563(0x313)]((_0x3cbd84,_0x21f3f1)=>{const _0x18356f=_0x15e563;if(_0x3cbd84['type']!==t[_0x18356f(0x267)][_0x18356f(0x37c)]||_0x21f3f1!=null&&_0x21f3f1['fromCollab']||_0x21f3f1!=null&&_0x21f3f1[_0x18356f(0x296)])return;let _0x536928=_0x3cbd84[_0x18356f(0x3ce)];if((_0x536928==null?void 0x0:_0x536928[_0x18356f(0x2c9)])!==this[_0x18356f(0x378)])return;let _0x47451f=_0x3cbd84,_0x2e513d=this[_0x18356f(0x1ba)][_0x18356f(0x1c5)][_0x18356f(0x14a)](this[_0x18356f(0x1ba)][_0x18356f(0x1c5)][_0x18356f(0x368)]()['COMPRESS_MUTATION_SEND'])([_0x47451f],this['_univerInstanceService'])||[_0x47451f];this[_0x18356f(0x1fe)](_0x2e513d[0x0]);})),_0x27225d;}};z=y([v(0x3,(0x0,t[_0x1de16c(0x20f)])(t[_0x1de16c(0x25d)])),v(0x4,(0x0,t['Inject'])(e[_0x1de16c(0x160)])),v(0x5,(0x0,t[_0x1de16c(0x20f)])(t[_0x1de16c(0x297)])),v(0x6,(0x0,t['Inject'])(e['RevisionService'])),v(0x7,(0x0,t[_0x1de16c(0x20f)])(C)),v(0x8,(0x0,t[_0x1de16c(0x20f)])(_)),v(0x9,t[_0x1de16c(0x1ca)]),v(0xa,t[_0x1de16c(0x243)]),v(0xb,t[_0x1de16c(0x2a8)]),v(0xc,t[_0x1de16c(0x3e7)]),v(0xd,(0x0,t[_0x1de16c(0x37e)])(w)),v(0xe,(0x0,t['Optional'])(S))],z);const Ee=(0x0,t[_0x1de16c(0x26b)])(_0x1de16c(0x30b));function De(_0x3ae757){const _0x4b89ce=_0x1de16c;let _0x1ff9e5=_0x3ae757[_0x4b89ce(0x2d2)],_0x1e1c6c=JSON[_0x4b89ce(0x28b)](_0x1ff9e5);switch(_0x1e1c6c['cmd']){case a['CombCmd']['HEARTBEAT']:case a['CombCmd'][_0x4b89ce(0x354)]:{let _0x153540=_0x1e1c6c[_0x4b89ce(0x1dd)];return{..._0x1e1c6c,'data':_0x153540,'cmd':_0x1e1c6c[_0x4b89ce(0x2e6)]};}case a[_0x4b89ce(0x3ae)][_0x4b89ce(0x220)]:{let _0x57f7d0=_0x1e1c6c[_0x4b89ce(0x2f9)];return{..._0x1e1c6c,'data':_0x57f7d0,'cmd':_0x1e1c6c[_0x4b89ce(0x2e6)]};}case a[_0x4b89ce(0x3ae)][_0x4b89ce(0x3f7)]:{let _0x38be0e=_0x1e1c6c[_0x4b89ce(0x25f)];switch(_0x38be0e['eventID']){case e[_0x4b89ce(0x255)][_0x4b89ce(0x195)]:var _0x95cf62;return{..._0x1e1c6c,'data':{..._0x38be0e,'data':(_0x95cf62=_0x38be0e['permissionRejEvent'])==null?void 0x0:_0x95cf62['cs']},'cmd':_0x1e1c6c[_0x4b89ce(0x2e6)]};case e[_0x4b89ce(0x255)][_0x4b89ce(0x3bf)]:var _0x5fd1a4;return{..._0x1e1c6c,'data':{..._0x38be0e,'data':(_0x5fd1a4=_0x38be0e[_0x4b89ce(0x193)])==null?void 0x0:_0x5fd1a4['cs']},'cmd':_0x1e1c6c[_0x4b89ce(0x2e6)]};case e[_0x4b89ce(0x255)]['NEW_CHANGESETS']:var _0x573266;return{..._0x1e1c6c,'data':{..._0x38be0e,'data':(_0x573266=_0x38be0e[_0x4b89ce(0x251)])==null?void 0x0:_0x573266['cs']},'cmd':_0x1e1c6c['cmd']};case e[_0x4b89ce(0x255)]['CHANGESET_REJ']:var _0x3a3e9c;return{..._0x1e1c6c,'data':{..._0x38be0e,'data':(_0x3a3e9c=_0x38be0e[_0x4b89ce(0x2df)])==null?void 0x0:_0x3a3e9c['cs']},'cmd':_0x1e1c6c[_0x4b89ce(0x2e6)]};case e[_0x4b89ce(0x255)][_0x4b89ce(0x18b)]:var _0x56297c;return{..._0x1e1c6c,'data':{..._0x38be0e,'data':(_0x56297c=_0x38be0e[_0x4b89ce(0x244)])==null?void 0x0:_0x56297c['cs']},'cmd':_0x1e1c6c[_0x4b89ce(0x2e6)]};case e[_0x4b89ce(0x255)]['UPDATE_CURSOR']:return{..._0x1e1c6c,'data':{..._0x38be0e,'data':_0x38be0e[_0x4b89ce(0x37b)]},'cmd':_0x1e1c6c[_0x4b89ce(0x2e6)]};case e[_0x4b89ce(0x255)]['USERS_ENTER']:return{..._0x1e1c6c,'data':{..._0x38be0e,'data':_0x38be0e[_0x4b89ce(0x141)]},'cmd':_0x1e1c6c[_0x4b89ce(0x2e6)]};case e[_0x4b89ce(0x255)][_0x4b89ce(0x2dc)]:return{..._0x1e1c6c,'data':{..._0x38be0e,'data':_0x38be0e[_0x4b89ce(0x165)]},'cmd':_0x1e1c6c[_0x4b89ce(0x2e6)]};case e[_0x4b89ce(0x255)]['LIVESHARE_NEW_HOST']:return{..._0x1e1c6c,'data':{..._0x38be0e,'data':_0x38be0e['liveShareNewHost']},'cmd':_0x1e1c6c[_0x4b89ce(0x2e6)]};case e[_0x4b89ce(0x255)][_0x4b89ce(0x264)]:case e[_0x4b89ce(0x255)]['LIVESHARE_OPERATION']:return{..._0x1e1c6c,'data':{..._0x38be0e,'data':_0x38be0e[_0x4b89ce(0x1e5)]},'cmd':_0x1e1c6c[_0x4b89ce(0x2e6)]};case e[_0x4b89ce(0x255)][_0x4b89ce(0x3cd)]:return{..._0x1e1c6c,'data':{..._0x38be0e,'data':_0x38be0e['liveShareNewHost']},'cmd':_0x1e1c6c[_0x4b89ce(0x2e6)]};case e['CollaborationEvent'][_0x4b89ce(0x3f2)]:return{..._0x1e1c6c,'data':_0x38be0e,'cmd':_0x1e1c6c[_0x4b89ce(0x2e6)]};case e['CollaborationEvent'][_0x4b89ce(0x1e7)]:return{..._0x1e1c6c,'data':{..._0x38be0e,'data':_0x38be0e[_0x4b89ce(0x34a)]},'cmd':_0x1e1c6c[_0x4b89ce(0x2e6)]};case e['CollaborationEvent'][_0x4b89ce(0x344)]:return{..._0x1e1c6c,'data':{..._0x38be0e,'data':_0x38be0e[_0x4b89ce(0x268)]},'cmd':_0x1e1c6c[_0x4b89ce(0x2e6)]};case e[_0x4b89ce(0x255)][_0x4b89ce(0x3fe)]:return{..._0x1e1c6c,'data':{..._0x38be0e,'data':_0x38be0e[_0x4b89ce(0x2e3)]},'cmd':_0x1e1c6c[_0x4b89ce(0x2e6)]};case e[_0x4b89ce(0x255)][_0x4b89ce(0x26f)]:return{..._0x1e1c6c,'data':{..._0x38be0e,'data':_0x38be0e[_0x4b89ce(0x287)]},'cmd':_0x1e1c6c[_0x4b89ce(0x2e6)]};default:return _0x1e1c6c;}}default:return _0x1e1c6c;}}function Oe(_0x2f64ee){const _0x15ee8a=_0x1de16c;switch(_0x2f64ee[_0x15ee8a(0x2e6)]){case a[_0x15ee8a(0x3ae)][_0x15ee8a(0x3d0)]:case a[_0x15ee8a(0x3ae)][_0x15ee8a(0x354)]:return JSON[_0x15ee8a(0x2d8)]({'cmd':_0x2f64ee['cmd'],'routeKey':_0x2f64ee[_0x15ee8a(0x3f8)]});case a[_0x15ee8a(0x3ae)][_0x15ee8a(0x212)]:{let _0x1732d0;switch(_0x2f64ee['data'][_0x15ee8a(0x26d)]){case e[_0x15ee8a(0x255)][_0x15ee8a(0x3b1)]:_0x1732d0={'eventID':e['CollaborationEvent'][_0x15ee8a(0x3b1)],'updateCursorEvent':_0x2f64ee[_0x15ee8a(0x2d2)][_0x15ee8a(0x2d2)]};break;case e[_0x15ee8a(0x255)][_0x15ee8a(0x2dc)]:_0x1732d0={'eventID':e[_0x15ee8a(0x255)]['USERS_LEAVE'],'leaveEvent':_0x2f64ee[_0x15ee8a(0x2d2)][_0x15ee8a(0x2d2)]};break;case e[_0x15ee8a(0x255)][_0x15ee8a(0x318)]:_0x1732d0={'eventID':e['CollaborationEvent'][_0x15ee8a(0x318)],'joinEvent':_0x2f64ee[_0x15ee8a(0x2d2)][_0x15ee8a(0x2d2)]};break;case e[_0x15ee8a(0x255)][_0x15ee8a(0x3b9)]:_0x1732d0={'eventID':e['CollaborationEvent']['LIVESHARE_NEW_HOST'],'liveShareNewHost':_0x2f64ee[_0x15ee8a(0x2d2)][_0x15ee8a(0x2d2)]};break;case e[_0x15ee8a(0x255)][_0x15ee8a(0x20d)]:_0x1732d0={'eventID':e[_0x15ee8a(0x255)][_0x15ee8a(0x20d)],'liveShareOperation':_0x2f64ee[_0x15ee8a(0x2d2)][_0x15ee8a(0x2d2)]};break;case e[_0x15ee8a(0x255)]['LIVESHARE_TERMINATE']:_0x1732d0={'eventID':e[_0x15ee8a(0x255)][_0x15ee8a(0x3cd)],'liveShareTerminate':_0x2f64ee[_0x15ee8a(0x2d2)][_0x15ee8a(0x2d2)]};break;case e[_0x15ee8a(0x255)][_0x15ee8a(0x1bd)]:_0x1732d0={'eventID':e['CollaborationEvent'][_0x15ee8a(0x1bd)],'liveShareRequestHost':_0x2f64ee[_0x15ee8a(0x2d2)][_0x15ee8a(0x2d2)]};break;case e[_0x15ee8a(0x255)][_0x15ee8a(0x264)]:_0x1732d0={'eventID':e[_0x15ee8a(0x255)]['LIVESHARE_FETCH_OPERATIONS']};break;default:_0x1732d0={'eventID':_0x2f64ee['data'][_0x15ee8a(0x26d)]};}return JSON[_0x15ee8a(0x2d8)]({'cmd':_0x2f64ee[_0x15ee8a(0x2e6)],'routeKey':_0x2f64ee[_0x15ee8a(0x3f8)],'collaMsg':_0x1732d0});}case a['CombCmd']['JOIN']:return JSON[_0x15ee8a(0x2d8)]({'cmd':_0x2f64ee[_0x15ee8a(0x2e6)],'routeKey':_0x2f64ee['routeKey'],'joinReq':_0x2f64ee['data']});case a[_0x15ee8a(0x3ae)]['LEAVE']:return JSON['stringify']({'cmd':_0x2f64ee['cmd'],'routeKey':_0x2f64ee['routeKey'],'leaveReq':_0x2f64ee[_0x15ee8a(0x2d2)]});default:throw Error(_0x15ee8a(0x191));}}const B=(0x0,t['createIdentifier'])(_0x1de16c(0x3ca));function ke(_0x2fd6b3,_0x47e019,_0x11a8eb){const _0x485d2b=_0x1de16c;return _0x2fd6b3+'/'+_0x47e019+_0x485d2b(0x192)+_0x11a8eb+_0x485d2b(0x1f1);}let V=class extends t['Disposable']{constructor(_0x5c980f,_0x1f8556,_0x1561fc,_0x3b2fa2,_0x57b143){const _0x16867d=_0x1de16c;super(),this[_0x16867d(0x16d)]=_0x5c980f,this[_0x16867d(0x367)]=_0x1f8556,this[_0x16867d(0x2aa)]=_0x1561fc,this[_0x16867d(0x30d)]=_0x3b2fa2,this[_0x16867d(0x229)]=_0x57b143;}[_0x1de16c(0x205)](_0x19c4ab){const _0x5dc969=_0x1de16c;let _0x46c011=this[_0x5dc969(0x16d)][_0x5dc969(0x373)](c['ISocketService']);if(!_0x46c011)throw Error(_0x5dc969(0x1c8));let _0x4b1387=_0x46c011[_0x5dc969(0x1a1)](_0x19c4ab);if(!_0x4b1387)throw Error('[CollaborationSocketService]:\x20failed\x20to\x20create\x20socket!');let _0x341001=new t[(_0x5dc969(0x157))](),_0x214276=new i['Subject']();_0x341001[_0x5dc969(0x27f)](_0x4b1387[_0x5dc969(0x26c)][_0x5dc969(0x15c)](_0x47999f=>_0x214276[_0x5dc969(0x286)](_0x47999f))),_0x341001[_0x5dc969(0x27f)]((0x0,t[_0x5dc969(0x1db)])(()=>_0x214276[_0x5dc969(0x183)]()));let _0xb38224=new i[(_0x5dc969(0x3c5))]();_0x341001[_0x5dc969(0x27f)](_0x4b1387['error$'][_0x5dc969(0x15c)](_0x240fe1=>_0xb38224[_0x5dc969(0x286)](_0x240fe1))),_0x341001[_0x5dc969(0x27f)]((0x0,t['toDisposable'])(()=>_0xb38224[_0x5dc969(0x183)]()));let _0x1295b4=new i[(_0x5dc969(0x3c5))]();_0x341001[_0x5dc969(0x27f)](_0x4b1387['message$'][_0x5dc969(0x15c)](_0x392365=>{const _0x33c86e=_0x5dc969;let _0x357e8e=De(_0x392365);_0x1295b4[_0x33c86e(0x286)](_0x357e8e);})),_0x341001[_0x5dc969(0x27f)]((0x0,t[_0x5dc969(0x1db)])(()=>_0x1295b4[_0x5dc969(0x183)]()));let _0x2531fa,_0x12d7bf=()=>{const _0x220560=_0x5dc969;_0xb38224[_0x220560(0x286)](new Event(_0x220560(0x23d))),_0x214276[_0x220560(0x286)](new Event(_0x220560(0x23d))),_0x2531fa[_0x220560(0x261)]();};return _0x2531fa={'memberID':'','close$':_0x214276[_0x5dc969(0x1ea)](),'error$':_0xb38224[_0x5dc969(0x1ea)](),'open$':_0x4b1387[_0x5dc969(0x327)],'message$':_0x1295b4[_0x5dc969(0x1ea)](),'send':_0x4e8561=>{const _0x5f1563=_0x5dc969;if(_0x4e8561[_0x5f1563(0x2e6)]===a[_0x5f1563(0x3ae)]['INGEST']){if(_0x4e8561[_0x5f1563(0x2d2)][_0x5f1563(0x26d)]===e[_0x5f1563(0x255)]['SUBMIT_CHANGESET']){this['_submitChangeset'](_0x2531fa,_0x4e8561[_0x5f1563(0x2d2)])[_0x5f1563(0x158)](_0x33fafd=>{const _0x27bcc0=_0x5f1563;this[_0x27bcc0(0x30d)][_0x27bcc0(0x1e3)](_0x33fafd),_0x12d7bf();});return;}if(_0x4e8561[_0x5f1563(0x2d2)][_0x5f1563(0x26d)]===e[_0x5f1563(0x255)][_0x5f1563(0x24b)]){let _0x945b39=_0x4e8561[_0x5f1563(0x2d2)];this[_0x5f1563(0x224)](_0x945b39)[_0x5f1563(0x129)](_0x3d77fc=>{const _0x3b8a0b=_0x5f1563;_0x1295b4[_0x3b8a0b(0x286)]({'cmd':a[_0x3b8a0b(0x3ae)]['RECV'],'code':a['CmdRspCode']['OK'],'routeKey':_0x945b39['data'][_0x3b8a0b(0x378)],'routeType':'','data':{'eventID':e[_0x3b8a0b(0x255)][_0x3b8a0b(0x2c8)],'data':{'changesets':_0x3d77fc}}});})[_0x5f1563(0x158)](_0x5dad21=>{const _0x24e1c9=_0x5f1563;this[_0x24e1c9(0x30d)][_0x24e1c9(0x1e3)](_0x5dad21),_0x12d7bf();});return;}}_0x4b1387[_0x5f1563(0x2d5)](Oe(_0x4e8561));},'close':()=>{const _0x31ae67=_0x5dc969;_0x4b1387[_0x31ae67(0x261)](),_0x341001[_0x31ae67(0x317)]();}},_0x2531fa;}async[_0x1de16c(0x33a)](_0x53d791,_0x4a0fb0){const _0x2942a8=_0x1de16c;var _0x1531c8;let {unitType:_0x3667a4,unitID:_0xd45dac,changeset:_0x5bdb74}=_0x4a0fb0[_0x2942a8(0x2d2)],_0x402c25={'unitID':_0xd45dac,'memberID':_0x53d791[_0x2942a8(0x33e)],'type':_0x3667a4,'changeset':(0x0,e[_0x2942a8(0x339)])(_0x5bdb74)},_0x45fdb8=this[_0x2942a8(0x2aa)][_0x2942a8(0x26a)](T),_0x37f199=ke((_0x1531c8=_0x45fdb8==null?void 0x0:_0x45fdb8[_0x2942a8(0x24e)])==null?'/universer-api/comb':_0x1531c8,_0x3667a4,_0xd45dac);try{await this[_0x2942a8(0x367)][_0x2942a8(0x154)](_0x37f199,{'body':_0x402c25});}catch(_0x66aa70){throw this['_logService']['error'](_0x2942a8(0x12e),'submit\x20changeset\x20error!'),_0x66aa70;}}async[_0x1de16c(0x224)](_0x1a6cd8){const _0x41c314=_0x1de16c;let {unitID:_0x329e9b,from:_0x3d9606,to:_0x3258b5,unitType:_0x2910bb}=_0x1a6cd8['data'];return(await this[_0x41c314(0x229)][_0x41c314(0x1b9)]({'metadata':void 0x0},{'unitID':_0x329e9b,'type':_0x2910bb,'from':_0x3d9606,'to':_0x3258b5}))['changesets']['map'](_0x3f7a55=>((_0x3f7a55[_0x41c314(0x13f)]===null||_0x3f7a55[_0x41c314(0x13f)]===void 0x0)&&(_0x3f7a55['mutations']=[]),_0x3f7a55));}};V=y([v(0x0,(0x0,t[_0x1de16c(0x20f)])(t[_0x1de16c(0x25d)])),v(0x1,(0x0,t['Inject'])(c[_0x1de16c(0x14d)])),v(0x2,t[_0x1de16c(0x3cb)]),v(0x3,t[_0x1de16c(0x243)]),v(0x4,e[_0x1de16c(0x35a)])],V);let H=class extends t[_0x1de16c(0x1d2)]{get['_socket'](){return this['_socket$']['getValue']();}constructor(_0x1430b0,_0x103065,_0x43b11b,_0x419d0c,_0x18353e,_0x3a9d7e){const _0xc258cc=_0x1de16c;super(),this[_0xc258cc(0x16d)]=_0x1430b0,this[_0xc258cc(0x30d)]=_0x103065,this['_configService']=_0x43b11b,this[_0xc258cc(0x17a)]=_0x419d0c,this[_0xc258cc(0x3f4)]=_0x18353e,this[_0xc258cc(0x164)]=_0x3a9d7e,g(this,_0xc258cc(0x246),new i['BehaviorSubject'](void 0x0)),g(this,_0xc258cc(0x25e),this[_0xc258cc(0x246)]['asObservable']()),g(this,_0xc258cc(0x390),null),g(this,'_sessions',new Map()),g(this,_0xc258cc(0x1a2),new i[(_0xc258cc(0x19f))](0x0)),g(this,_0xc258cc(0x1b6),this[_0xc258cc(0x1a2)][_0xc258cc(0x1ea)]()),g(this,'_socketReady',!0x1),g(this,_0xc258cc(0x38d),void 0x0),g(this,_0xc258cc(0x12a),0x0),g(this,_0xc258cc(0x21b),null),g(this,'_sendHeartbeatTimer',void 0x0),g(this,_0xc258cc(0x328),void 0x0),this[_0xc258cc(0x3c0)]();}[_0x1de16c(0x3c0)](){const _0x3934f8=_0x1de16c;this[_0x3934f8(0x164)]&&this[_0x3934f8(0x3b8)](this['_networkConditionService'][_0x3934f8(0x3d5)][_0x3934f8(0x15c)](_0x254dff=>{const _0xe00e6e=_0x3934f8;_0x254dff&&!this[_0xe00e6e(0x260)]&&this['reconnect'](),_0x254dff||this[_0xe00e6e(0x29d)]();}));}['dispose'](){const _0x1173fa=_0x1de16c;var _0x1f55db;super[_0x1173fa(0x317)](),(_0x1f55db=this['_socketMessageSubscription'])==null||_0x1f55db[_0x1173fa(0x21f)](),this['_socketMessageSubscription']=null,this['_clearRetryConnectingTimer'](),this[_0x1173fa(0x361)](),this[_0x1173fa(0x2bf)](),this[_0x1173fa(0x2b9)][_0x1173fa(0x2f3)](_0x385d36=>_0x385d36[_0x1173fa(0x317)]()),this[_0x1173fa(0x2b9)]['clear'](),this['_status$']['complete']();}async['requireSession'](_0x58b369){const _0x5e1722=_0x1de16c;if(this[_0x5e1722(0x2b9)][_0x5e1722(0x1c7)](_0x58b369))return this[_0x5e1722(0x2b9)]['get'](_0x58b369);this[_0x5e1722(0x1e9)]();let _0x1ef680=this[_0x5e1722(0x16d)][_0x5e1722(0x215)](x,_0x58b369,this[_0x5e1722(0x246)]['asObservable']());return this[_0x5e1722(0x2b9)][_0x5e1722(0x248)](_0x58b369,_0x1ef680),_0x1ef680;}['closeSession'](_0x35b74b){const _0x283f53=_0x1de16c;let _0x27f914=this['_sessions']['get'](_0x35b74b);if(_0x27f914&&(this['_sessions'][_0x283f53(0x1d7)](_0x35b74b),_0x27f914[_0x283f53(0x261)]()),!this[_0x283f53(0x2b9)][_0x283f53(0x372)]){var _0x17875e;(_0x17875e=this[_0x283f53(0x260)])==null||_0x17875e[_0x283f53(0x261)]();}}['reconnect'](){const _0x415738=_0x1de16c;this[_0x415738(0x12a)]=0x0,this[_0x415738(0x203)](),this[_0x415738(0x2cf)]();}[_0x1de16c(0x203)](){const _0xd01b64=_0x1de16c;this[_0xd01b64(0x38d)]!=null&&(clearTimeout(this[_0xd01b64(0x38d)]),this['_retryConnectingTimer']=null);}async[_0x1de16c(0x199)](){const _0x1a019d=_0x1de16c;var _0x46a296;let _0x511446=this[_0x1a019d(0x2aa)]['getConfig'](T),_0xa3caa1=(_0x46a296=_0x511446==null?void 0x0:_0x511446['collabWebSocketUrl'])==null?p:_0x46a296,_0x33aedf=await this[_0x1a019d(0x17a)][_0x1a019d(0x1a1)](_0xa3caa1);return this[_0x1a019d(0x390)]=_0x33aedf,_0x33aedf;}async[_0x1de16c(0x1e9)](){const _0x57e28b=_0x1de16c;try{var _0xda6eea,_0x889418;let _0x4e829f=(_0xda6eea=(_0x889418=this[_0x57e28b(0x260)])==null?this[_0x57e28b(0x390)]:_0x889418)==null?await this[_0x57e28b(0x199)]():_0xda6eea;if(_0x4e829f){var _0x33a407;let _0x6bc1dd=_0x4e829f[_0x57e28b(0x2d5)];_0x4e829f['send']=_0x431fae=>(_0x431fae[_0x57e28b(0x2e6)]!==a[_0x57e28b(0x3ae)]['LEAVE']&&this['_rescheduleHeartbeat'](),_0x6bc1dd[_0x57e28b(0x245)](_0x4e829f,[_0x431fae])),(_0x33a407=this[_0x57e28b(0x21b)])==null||_0x33a407['unsubscribe'](),this[_0x57e28b(0x21b)]=null,this[_0x57e28b(0x21b)]=_0x4e829f[_0x57e28b(0x252)][_0x57e28b(0x15c)](_0x14adb0=>this[_0x57e28b(0x32f)](_0x4e829f,_0x14adb0)),_0x4e829f['error$'][_0x57e28b(0x200)]((0x0,s[_0x57e28b(0x2ed)])(0x1))[_0x57e28b(0x15c)](_0x4a1220=>this['_logService'][_0x57e28b(0x1e3)](_0x57e28b(0x393),_0x4a1220)),_0x4e829f['open$'][_0x57e28b(0x200)]((0x0,s['take'])(0x1))['subscribe'](()=>{this['_onConnectionOpen'](_0x4e829f);}),_0x4e829f[_0x57e28b(0x26c)][_0x57e28b(0x200)]((0x0,s[_0x57e28b(0x2ed)])(0x1))['subscribe'](_0xe4bdaa=>{const _0x111648=_0x57e28b;this[_0x111648(0x30d)][_0x111648(0x2f2)](_0x111648(0x1c6),_0x111648(0x2cd),_0xe4bdaa),this['_onConnectionFailed']();});}}catch(_0x17e9e9){this[_0x57e28b(0x30d)]['error'](_0x17e9e9),this[_0x57e28b(0x250)]();}}['_onConnectionOpen'](_0x92d643){const _0x409b59=_0x1de16c;this[_0x409b59(0x30d)][_0x409b59(0x2f2)](_0x409b59(0x1c6),_0x409b59(0x1a5)),_0x92d643[_0x409b59(0x2d5)]({'cmd':a[_0x409b59(0x3ae)][_0x409b59(0x354)]}),this[_0x409b59(0x38c)]();}[_0x1de16c(0x29d)](){const _0x14251c=_0x1de16c;this[_0x14251c(0x384)]=!0x1,this[_0x14251c(0x390)]=null,this[_0x14251c(0x1a2)][_0x14251c(0x286)](0x2),this[_0x14251c(0x246)][_0x14251c(0x286)](null),this[_0x14251c(0x361)](),this[_0x14251c(0x2bf)]();}['_onConnectionFailed'](){const _0x3649a6=_0x1de16c;var _0x3dfa8b;this[_0x3649a6(0x29d)](),this['_retryCount']<((_0x3dfa8b=this[_0x3649a6(0x2aa)][_0x3649a6(0x26a)](_0x3649a6(0x358)))==null?0x3:_0x3dfa8b)?(this[_0x3649a6(0x3f4)][_0x3649a6(0x262)]({'id':'SOCKET_FAILED_RETRY'}),this['_tryReconnect']()):this[_0x3649a6(0x3f4)][_0x3649a6(0x262)]({'id':_0x3649a6(0x1fa)});}[_0x1de16c(0x2cf)](){const _0x57da91=_0x1de16c;var _0x40251d;let _0x325cbe=this[_0x57da91(0x12a)],_0x1088cd=this[_0x57da91(0x2aa)]['getConfig'](T),_0xcde651=_0x325cbe===0x0?0x0:((_0x40251d=_0x1088cd==null?void 0x0:_0x1088cd[_0x57da91(0x1fd)])==null?0x4e20:_0x40251d)*0x2**_0x325cbe;this[_0x57da91(0x38d)]=setTimeout(()=>{const _0x26433f=_0x57da91;clearTimeout(this['_retryConnectingTimer']),this[_0x26433f(0x38d)]=null,this['_tryEnsureSocket']();},_0xcde651),this[_0x57da91(0x12a)]+=0x1;}[_0x1de16c(0x32f)](_0x367408,_0x2f6ba6){const _0x1ccda8=_0x1de16c;let {cmd:_0x3cf819}=_0x2f6ba6;_0x3cf819===a[_0x1ccda8(0x3ae)][_0x1ccda8(0x354)]&&!this[_0x1ccda8(0x384)]&&(_0x367408[_0x1ccda8(0x33e)]=_0x2f6ba6[_0x1ccda8(0x2d2)][_0x1ccda8(0x33e)],this[_0x1ccda8(0x246)]['next'](_0x367408),this['_status$']['next'](0x3),this[_0x1ccda8(0x384)]=!0x0,this[_0x1ccda8(0x390)]=null),_0x3cf819===a[_0x1ccda8(0x3ae)][_0x1ccda8(0x3d0)]&&this[_0x1ccda8(0x361)](),this[_0x1ccda8(0x38c)]();}[_0x1de16c(0x38c)](){const _0x4417b9=_0x1de16c;var _0x36176c;this[_0x4417b9(0x2bf)](),this[_0x4417b9(0x1ec)]=setTimeout(()=>this[_0x4417b9(0x1ee)](),(_0x36176c=this[_0x4417b9(0x2aa)][_0x4417b9(0x26a)](_0x4417b9(0x143)))==null?0x7530:_0x36176c);}[_0x1de16c(0x1ee)](){const _0x5a1cfd=_0x1de16c;this['_socket'][_0x5a1cfd(0x2d5)]({'cmd':a[_0x5a1cfd(0x3ae)][_0x5a1cfd(0x3d0)]}),this[_0x5a1cfd(0x28d)]();}[_0x1de16c(0x28d)](){const _0xf497ef=_0x1de16c;var _0x9f5212;this[_0xf497ef(0x328)]=setTimeout(()=>this[_0xf497ef(0x250)](),(_0x9f5212=this[_0xf497ef(0x2aa)][_0xf497ef(0x26a)]('HEARTBEAT_TIMEOUT'))==null?m:_0x9f5212);}['_clearHeartbeatTimer'](){const _0x354d30=_0x1de16c;this['_sendHeartbeatTimer']!=null&&(clearTimeout(this[_0x354d30(0x1ec)]),this['_sendHeartbeatTimer']=null);}[_0x1de16c(0x361)](){const _0x171f9b=_0x1de16c;this[_0x171f9b(0x328)]!=null&&(clearTimeout(this[_0x171f9b(0x328)]),this[_0x171f9b(0x328)]=null);}};H=y([v(0x0,(0x0,t[_0x1de16c(0x20f)])(t[_0x1de16c(0x25d)])),v(0x1,t['ILogService']),v(0x2,t[_0x1de16c(0x3cb)]),v(0x3,B),v(0x4,(0x0,t[_0x1de16c(0x20f)])(_)),v(0x5,(0x0,t['Optional'])(Ee))],H);let U=class extends t[_0x1de16c(0x1f0)]{constructor(_0x29cfc0,_0x542124,_0x52280e,_0x2440c6){const _0x34d5b2=_0x1de16c;var _0x192a07;super(),this['_injector']=_0x29cfc0,this[_0x34d5b2(0x32a)]=_0x542124,this[_0x34d5b2(0x2aa)]=_0x52280e,this[_0x34d5b2(0x2a7)]=_0x2440c6,g(this,'_entities',new Map()),g(this,_0x34d5b2(0x352),new i[(_0x34d5b2(0x3c5))]()),g(this,'entityInit$',this[_0x34d5b2(0x352)][_0x34d5b2(0x1ea)]()),((_0x192a07=this['_configService'][_0x34d5b2(0x26a)](_0x34d5b2(0x2dd)))==null?void 0x0:_0x192a07[_0x34d5b2(0x1dc)])!==!0x1&&this[_0x34d5b2(0x208)]();}[_0x1de16c(0x317)](){const _0x2115d4=_0x1de16c;super[_0x2115d4(0x317)](),this[_0x2115d4(0x27a)]['forEach'](_0x473863=>_0x473863[_0x2115d4(0x317)]()),this[_0x2115d4(0x27a)][_0x2115d4(0x12f)]();}[_0x1de16c(0x306)](_0x3e039c){const _0x33bcfb=_0x1de16c;var _0x3babad;return(_0x3babad=this[_0x33bcfb(0x27a)][_0x33bcfb(0x373)](_0x3e039c))==null?null:_0x3babad;}[_0x1de16c(0x3a6)](_0x1d6baf){const _0x2ba52c=_0x1de16c;let _0x37dd0c=this[_0x2ba52c(0x306)](_0x1d6baf);return _0x37dd0c?(0x0,i['of'])(_0x37dd0c):this[_0x2ba52c(0x352)][_0x2ba52c(0x200)]((0x0,s[_0x2ba52c(0x15e)])(_0x1cf695=>_0x1cf695[_0x2ba52c(0x378)]===_0x1d6baf));}[_0x1de16c(0x2c7)](_0x2acae2){const _0x19febe=_0x1de16c;return(0x0,i['firstValueFrom'])(this[_0x19febe(0x3a6)](_0x2acae2)[_0x19febe(0x200)]((0x0,s['map'])(()=>void 0x0)));}[_0x1de16c(0x208)](){const _0x50f0ca=_0x1de16c;this[_0x50f0ca(0x2a7)][_0x50f0ca(0x13d)](t[_0x50f0ca(0x20a)][_0x50f0ca(0x2b5)])[_0x50f0ca(0x200)]((0x0,i[_0x50f0ca(0x3ba)])(this[_0x50f0ca(0x155)]),(0x0,s[_0x50f0ca(0x187)])(0x10))[_0x50f0ca(0x15c)](async _0x436725=>{const _0x560a8d=_0x50f0ca;let _0x498a79=_0x436725[_0x560a8d(0x341)]['getUnitId'](),_0x30cebe=await this[_0x560a8d(0x1c0)](_0x498a79,t[_0x560a8d(0x20a)]['UNIVER_SHEET']);this['_entities'][_0x560a8d(0x248)](_0x498a79,_0x30cebe);}),this[_0x50f0ca(0x2a7)][_0x50f0ca(0x13d)](t[_0x50f0ca(0x20a)][_0x50f0ca(0x198)])[_0x50f0ca(0x200)]((0x0,i[_0x50f0ca(0x3ba)])(this[_0x50f0ca(0x155)]),(0x0,s[_0x50f0ca(0x187)])(0x10))['pipe']((0x0,s['filter'])(_0x4d8b91=>!_0x4d8b91[_0x50f0ca(0x341)][_0x50f0ca(0x270)]()[_0x50f0ca(0x169)]('__')))[_0x50f0ca(0x15c)](async _0x7ca4a1=>{const _0x1737d6=_0x50f0ca;let _0x5f4ee5=_0x7ca4a1['unit'][_0x1737d6(0x270)](),_0x21f441=await this[_0x1737d6(0x1c0)](_0x5f4ee5,t[_0x1737d6(0x20a)]['UNIVER_DOC']);this['_entities']['set'](_0x5f4ee5,_0x21f441);}),(0x0,i[_0x50f0ca(0x391)])(this[_0x50f0ca(0x2a7)][_0x50f0ca(0x232)](t[_0x50f0ca(0x20a)][_0x50f0ca(0x2b5)]),this[_0x50f0ca(0x2a7)][_0x50f0ca(0x232)](t['UniverInstanceType'][_0x50f0ca(0x198)]))['pipe']((0x0,i['takeUntil'])(this[_0x50f0ca(0x155)]))[_0x50f0ca(0x15c)](_0x5aab70=>{const _0x329b54=_0x50f0ca;let _0x53eee1=_0x5aab70[_0x329b54(0x270)](),_0x679c85=this[_0x329b54(0x27a)]['get'](_0x53eee1);_0x679c85&&(_0x679c85[_0x329b54(0x317)](),this[_0x329b54(0x27a)][_0x329b54(0x1d7)](_0x53eee1));});}async[_0x1de16c(0x1c0)](_0x5a96d8,_0x1c8823){const _0x58f5d5=_0x1de16c;let _0x46ce31=await this['_collabSessionService']['requireSession'](_0x5a96d8),_0x2a72c1=this[_0x58f5d5(0x16d)][_0x58f5d5(0x215)](this[_0x58f5d5(0x1a8)](_0x1c8823),_0x5a96d8,_0x1c8823,_0x46ce31);return await _0x2a72c1[_0x58f5d5(0x399)](),this[_0x58f5d5(0x352)][_0x58f5d5(0x286)](_0x2a72c1),_0x2a72c1;}[_0x1de16c(0x1a8)](_0x2f7e3e){const _0x29d5f8=_0x1de16c;switch(_0x2f7e3e){case t[_0x29d5f8(0x20a)][_0x29d5f8(0x198)]:return R;case t[_0x29d5f8(0x20a)][_0x29d5f8(0x2b5)]:return z;default:throw Error(_0x29d5f8(0x2be)+_0x2f7e3e);}}};U=y([v(0x0,(0x0,t[_0x1de16c(0x20f)])(t['Injector'])),v(0x1,(0x0,t[_0x1de16c(0x20f)])(H)),v(0x2,t['IConfigService']),v(0x3,t[_0x1de16c(0x1ca)])],U);var Ae=_0x1de16c(0x182),je=_0x1de16c(0x1ef);function _0x4f3f(){const _0x4b9d72=['HELLO','awaiting_with_pending','_transformRemoteChangesetByStateCache','CHANGESET_REJ','RETRY_CONNECTING_MAX_COUNT','unitId\x20is\x20not\x20found','ISnapshotServerService','[CollaborationUndoRedoService]','_removeRoom','LOCAL_CACHE_INTERVAL','_schedule','subject','PENDING','_clearTimeoutTimer','resourceIDs','getAllMembers','onTransformIME','fromCharCode','_sendingTimer','_httpService','getInterceptPoints','_onConflict','loginUrlKey','sessionStatus','method','headers','[FetchingMissState]:\x20not\x20expected\x20to\x20receive\x20ack\x20when\x20`this._awaitingChangeset`\x20is\x20null!','_handler','url','DependentOn','size','get','IUndoRedoService','pending','_onRemoteChangeset','refreshPermission','unitID','ITelemetryService','[OfflineState]:\x20received\x20acknowledgement.','updateCursorEvent','MUTATION','_eventService','Optional','registerDependencies','session','slice','CollaborationImageIoService','deleteCollaborator','_socketReady','_acknowledgedAwaitingRevision','[SyncedState]:\x20received\x20rejection.','[ConflictState]:\x20invalid\x20calling\x20to\x20`resend`.','getActiveSheet','_clearUndo','_collaborationPaused','find','_rescheduleHeartbeat','_retryConnectingTimer','c1Prime','[OfflineState]:\x20invalid\x20calling\x20to\x20`resend`.','_candidateSocket','merge','editingUnit','[CollaborationSessionService]:\x20socket\x20error','_updateLocalCache','onload','\x20to\x20','SheetTransformSelectionsService','POST','init','[PendingState]:\x20unhandled\x20univer\x20type:\x20','OPTIONAL','Unknown\x20type.\x20Will\x20not\x20load\x20files\x20from\x20remote\x20address.','_onRecvEvent','_maxTotalRetryTimeout','includes','__splitChunk__','reject','collaborators','_incrementRevisionNumber','rev','onRemoteRej','getCollabEntity$','/-/object/-/batch_allowed','_resendTimer','putCollaborators','getOwnPropertyDescriptor','_commandService','DEFAULT_REMOTE_UNISCRIPT_EXECUTION_ENDPOINT','removeMember','CombCmd','/universer-api/user/session-ticket','equals','UPDATE_CURSOR','_cfgEnableObjInherit','1771609QmGPdS','put','loadUnitOfRevision','BASE64','_updateState','disposeWithMe','LIVESHARE_NEW_HOST','takeUntil','MentionType','_replayCachedMutations','IContextService','revision','CHANGESET_ACK','_listenToNetworkCondition','fetching\x20missing\x20changesets\x20from\x20','some','_decreaseWaiting','_getSendChangesetTimeout','Subject','OTHER_CLIENT_EDITING','length','Failed\x20to\x20update\x20permission\x20point','getUnitType','univer-pro.collaboration-client-socket-service','IConfigService','SheetsSelectionsService','LIVESHARE_TERMINATE','params','setCfgEnableObjInherit','HEARTBEAT','src','sid','origin','_clearCollaborationTimeoutTimer','online$','CollaborationUIEventId','encrypt','onTransformRemoteChangesetByStateCache','getResourcesRequest','onMissingChangesets','isArray','updateMember','_toggleOnline','getFocusedUnit','_onUserJoin','not_collab','AWAITING_WITH_PENDING','isPermissionRej','OTHER_CLIENTS_EDITING','DRAWING_IMAGE_ALLOW_IMAGE_LIST','_event$','requireSession','IPermissionService','_transformStack','randomBytes','transformSelections','href','missingChangesets','getImageSourceCache','reduce','session.room-cnt-exceeds','requestParams','/allowed','MSG_FOR_ERROR','{fileID}','_collaborationUIEventService','fetch_missing','getTime','RECV','routeKey','values','objectActions','session.room-permission-denied','findIndex','_onCombEvent','SHOULD_CLOSE_CONN','_localeService','registerHTTPInterceptor','body','_checkMissing','enableAuthServer','_state','_config','DataLoaderService','_disableEditing','Workbook','Error\x20on\x20receiving\x20event','toggleOnline','COMPRESS_MUTATION_APPLY','then','_retryCount','JOINING','entries','textRanges','[CollaborationSession]','clear','_getSignURL','[CollaborationState]:\x20apply\x20error!','getUnitStatus$','confirm','_onJoinRoomEvent','onStateChange','saveSheetBlock','\x0aAfter:\x20','getRoom','_transformUndoredo','sheets','253569uQAsQw','ITransformService','getTypeOfUnitAdded$','UserManagerService','mutations','_syncEditingCollabCursor','joinEvent','RichTextEditingMutation','HEARTBEAT_INTERVAL','CollaborationEntity','snapshotServerUrl','action','PERMISSION_DENIED','startTime','[UniverCollaborationClientPlugin]','fetchThroughInterceptors','readAsDataURL','getCfgEnableObjInherit','HTTPService','fetchMiss','localeService','save\x20fail\x20reason\x20is\x20','createCollaborator','updateOfflineData','concatBytes','post','dispose$','[CollaborationEntity]','DisposableCollection','catch','univer-pro.collaboration-client.single-active-unit-service','_initDependencies','IMentionIOService','subscribe','REMOTE_UNISCRIPT_EXECUTION_ENDPOINT_KEY','filter','?size=','CompressMutationService','_throwTelemetryCollaborationNewChangeset','_emitMembers','reqId','_networkConditionService','leaveEvent','SNAPSHOT_URL_KEY','_getUploadFileURL','_waitCount','startsWith','CollaborationStatus','MemberService','_resendWithTimeout','_injector','objectID','_isPermissionRej','_getCurrentRevision','CONFLICT','collaboration-client.local-cache-service','CollaborationUIEventService','floor','cfgEnableObjInherit','x-univer-host','FileId','setCurrentUser','_substituteUndoStack','_socketService','CollaborationSocketService','actions','getSheetBlock','909leoHUh','SetSelectionsOperation','OfflineState','addHandlerCallback','@univerjs-pro/collaboration-client','complete','closeSession','setWaitCount','push','delay','roles','\x20-\x20','_transformRemoteChangesetByIMECache','CHANGESET_SHOULD_RETRY','members$','SheetPermissionInitController','ICollaborationSocketService','_handleRemoteChangesets','selections','[serializeCombRequest]:\x20should\x20not\x20fall\x20into\x20default\x20branch!','/unit/','csAckEvent','mapDocumentTypeToUniverInstanceType','PERMISSION_REJ','DEFAULT_COLLAB_WEB_SOCKET_URL','awaiting','UNIVER_DOC','_createSocket','_onFetchMissResult','_telemetryService','saveSnapshot','allowed','name','BehaviorSubject','type','createSocket','_status$','_stopTelemetryCollaborationNewChangeset','_replaceFileID','socket\x20open.','objectType','unknown','_getCtorByUniverInstanceType','textEncoder','default','stopTime','roomInfos','session.join-failed','/rev/','collaboratorID','CollaborativeUndoRedoService','override','initWorkbookPermissionChange','symbol','SheetCollaborationEntity','loadDoc','status$','ReplaySubject','IDLE','fetchMissingChangesets','_compressMutationService','_lockTransition','objects','LIVESHARE_REQUEST_HOST','resend','JSONX','_startCollaboration','charCodeAt','PendingState','_awaitingChangeset','collaboration-client.auth.needGotoLoginAlert','interceptor','[CollaborationSessionService]','has','[CollaborationSocketService]:\x20failed\x20to\x20get\x20web\x20socket\x20factory!','ERROR_IMAGE','IUniverInstanceService','_shouldReportTelemetry','_acknowledgeAwaitingIfReady','AwaitingState','authzUrl','_state$','/universer-api/uniscript','_transformIMECache','Disposable','_unitID','onTransformRemoteChangesetByIMECache','/universer-api/authz','622422DpevWa','delete','focused$','__Key__','hostname','toDisposable','enableCollaboration','infoRsp','IImageIoService','_members','UniverLicensePlugin','uploadFileServerUrl','text-x','error','_imageSourceCache','liveShareOperation','b64DecodeUnicode','COMMENT_UPDATE','workbook','_tryEnsureSocket','asObservable','_resendTimeout','_sendHeartbeatTimer','/resources','_sendHeartbeat','0.25.0','RxDisposable','/new_changes','_changesetReqId','_executeRemoteChangeset','waitForRoom$','packageName','_showConflictNotification','/object/','AwaitingWithPendingState','_handlerCallback','SOCKET_FAILED','&assign=','CollaborationSessionService','retryConnectingInterval','_onLocalMutation','UUID','pipe','event$','downloadEndpointUrl','_clearRetryConnectingTimer','onSyncEditingCollabCursor','_doCreateSocket','subUnitId','getLatestCsReqIdBySid','_init','JOIN_ROOM_FULL','UniverInstanceType','_revisionService','isTransformChangesetsSuccess','LIVESHARE_OPERATION','Tools','Inject','utf8ToBytes','deserializeToCombResponse','INGEST','[PendingState]:\x20invalid\x20calling\x20to\x20`resend`.','_getAPIPrefixPath','createInstance','listRoles','_undoRedoService','status','onSendChangeset','JOIN_ROOM_FAILED','_socketMessageSubscription','call','indexOf','appendMutation','unsubscribe','JOIN','_sheetTransformSelectionsService','_updateStatus','_createInitialStateImpl','_fetchMissChangesets','_roomCreated$','_transformService','REMOTE_UNISCRIPT_EXECUTION_ENDPOINT','toPrimitive','_snapshotServerService','_sender','_telemetryInfo','This\x20method\x20should\x20not\x20be\x20called\x20on\x20the\x20client\x20side!','file','decorate','_scheduleCollaborationTimeoutTimer','_commentUpdate$','_memberService','getTypeOfUnitDisposed$','/block/','list','SessionStatus','_getRedoStack','userID','_singleActiveUnitService','string','_getLoginPath','version','Quantity','connection\x20error','_changesetSessionId','_unlockTransition','ErrorCode','onTransformRemoteChangesetByIMECache\x20callback\x20is\x20not\x20added\x20yet.','updateSnapshot','ILogService','csShouldRetryEvent','apply','_socket$','EmptyMutationInfo','set','m2Prime','_acknowledgeAwaiting','FETCH_MISSING','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','DEFAULT_FILE_NAME','collabSubmitChangesetUrl','sort','_onConnectionFailed','newCsEvent','message$','RETRY_CONNECTING_MAX_COUNT_KEY','HTTPRequest','CollaborationEvent','_pendingMutations','NOT_COLLAB','_snapshotService','/collaborator','_change$','_exhaustRemoteChangesetQueue','change$','Injector','socket$','collaMsg','_socket','close','emitEvent','_createInitialState','LIVESHARE_FETCH_OPERATIONS','_remoteChangesetQueue','_clearLocalCache','CommandType','updatePermissionObjEvent','getMember','getConfig','createIdentifier','close$','eventID','onCommentUpdate','UNISCRIPT_RUN','getUnitId','_scheduleCompleteTimestamp','number','deepClone','result','SyncedState','154260fVphOW','loadUnit','_collaborationTimeoutTimer','CommentService','_entities','[CollaborationSession]:\x20should\x20not\x20send\x20message\x20when\x20the\x20session\x20is\x20offline!','CollaborationSession','/universer-api/file/{fileID}/sign-url','JOIN_ROOM_NOT_EXISTS','add','isTransformMutationsWithChangesetFailure','batchAllowed','/fetchmissing?from=','[FetchMissState]:\x20missing\x20changesets\x20response\x20still\x20has\x20revision\x20gaps.','splice','[FetchingMissState]:\x20received\x20stale\x20ack\x20revision:\x20','next','uniscriptRunEvent','mergeOverrideWithDependencies','telemetry\x20info\x20is\x20not\x20initialized','copyFileMeta','parse','ONLINE','_waitForHeartbeatResponse','getGlobalObject','onRemoteRetry','16caxoBy','FileSource','range','session.room-full','[AuthServerService]:\x20you\x20should\x20provide\x20authentication\x20info\x20on\x20Node.js.','getCurrentRevOfUnit','onlyLocal','LocaleService','_queuedRemoteChangesets','fromCollab','SOCKET_FAILED_RETRY','saveChangeset','AWAITING','_onOffline','PERSON','object','loadOfflineData','_unitInfo$','HEARTBEAT_TIMEOUT_KEY','[UniverCollaborationClientPlugin]:\x20you\x20must\x20provide\x20a\x20socketService\x20implementation\x20in\x20config!','_initCloseConn','_startTelemetryCollaborationNewChangeset','from','_univerInstanceService','ICommandService','_getUndoStack','_configService','compose','_type','DEFAULT_WS_SESSION_TICKET_URL','_roomMembers','_sessionStatus$','_members$','_registerDependencies','toStringTag','SUBMIT_CHANGESET_TIMEOUT','IAuthzIoService','UNIVER_SHEET','responseType','/universer-api/snapshot','withCredentials','_sessions','&source=','replace','\x0aCurrent:\x20','LEAVE','[CollaborationController]:\x20invalid\x20univer\x20type:\x20','_clearHeartbeatTimer','HEARTBEAT_TIMEOUT','_onRemoteRejected','getSnapshotAPIPath','InsertSheetMutation','getUnitOnRev','_permissionService','you\x20should\x20override\x20\x22IUndoRedoService\x22\x20provided\x20in\x20\x22core\x22\x20package!','readyForCollab','PSEUDO_FETCH_MISSING_RESULT','unitId','onRemoteAck','_clearRedo','onTransformSelections','socket\x20close','update','_tryReconnect','_substituteRedoStack','_applyRemoteChangeset','data','_HTTPService','isInternalEditorID','send','LOCAL_CACHE_INTERVAL_KEY','OFFLINE','stringify','failed\x20to\x20apply\x20missed\x20changesets!','transformStack\x20failed!','updateCollaborator','USERS_LEAVE','collaboration-client.config','_onRemoteACK','csRejEvent','onRemoteChangeset','_localCacheService','[PendingState]:\x20received\x20rejection.','shouldCloseConn','/-/object/list','getDrawingImageAllowSize','cmd','signUrlServerUrl','ThresholdInterceptorFactory','transformUndoRedo','every','RevisionService','CollaborationController','take','ERROR_IMAGE_TYPE','pauseCollaboration','originalMeta','isTransformMutationsWithChangesetSuccess','debug','forEach','_transformSelections','awaitingChangeset','state$','[PendingState]:\x20received\x20acknowledgement.','SYNCED','joinRsp','offline','_initMergeInterceptor','map','onTransformRemoteChangesetByStateCache\x20callback\x20is\x20not\x20added\x20yet.','_userManagerService','commentUpdate$','executeCommand','updatePermissionPoint','UniverCollaborationPlugin','_getDownloadEndpointURL','1883465WrQpjU','_initRequestHeader','getCollabEntity','transformMutationsWithChangeset','code','getUnit','\x20in\x20_schedule.','univer-pro.collaboration-client.network-condition.service','localCacheService','_logService','_toggleOffline','reverse','defineProperty','location','_createHandler','onMutationExecutedForCollab','GLOBAL_ROOMS_CNT_EXCEEDS','toggleOffline','WorkbookEditablePermission','dispose','USERS_ENTER','97010NZDoVt','ImageSourceType','ImageUploadStatusType','synced','generateRandomId','function','/object','parseProtocolChangeset','Cannot\x20assemble\x20a\x20changeset\x20from\x20multiple\x20mutations\x20of\x20different\x20types:\x20','now','2634618azNqNo','c2Prime','getCurrentUser','conflict','open$','_timeoutTimer','onMissedChangesetFetched','_collabSessionService','SUBMIT_CHANGESET','[SyncedState]:\x20invalid\x20calling\x20to\x20`resend`.','onTransformState','onLocalMutation','_onMessage','_instanceService','_getAPIPrefix','[SyncedState]:\x20received\x20acknowledgement.','uuidv4','onStarting','_transformStateCache','baseRev','getDeserializedSheetBlock','_clearScheduledTask','parseChangesetToProtocol','_submitChangeset','encode','editing\x20status\x20changed\x20to','patch','memberID','_transitionLocked','constructor','unit','loadSheet','CmdRspCode','UPDATE_PERMISSION_OBJ','8DDvQVn','_transformAndApplyRemoteChangeset','pluginName','[FetchingMissState]:\x20invalid\x20calling\x20to\x20`resend`.','CLOSE_ROOM','commentUpdateEvent','min','UnitEmbedded','transformChangesets','touchDependencies','[OfflineState]:\x20received\x20changeset.','_collaborationSessionService','FetchingMissState','_entityInit$','avatar'];_0x4f3f=function(){return _0x4b9d72;};return _0x4f3f();}let Me=class extends t['Disposable']{constructor(_0x418a3f,_0x521d99){const _0x21d749=_0x1de16c;super(),this['_univerInstanceService']=_0x418a3f,this[_0x21d749(0x2aa)]=_0x521d99,this['_init']();}['_init'](){const _0x1769cf=_0x1de16c;this['disposeWithMe'](this[_0x1769cf(0x2a7)][_0x1769cf(0x1d8)][_0x1769cf(0x15c)](()=>{const _0x21a152=_0x1769cf;var _0x5046a6;let _0xc4ddaa=this[_0x21a152(0x2a7)][_0x21a152(0x3de)](),_0x562907=(_0x5046a6=this['_configService']['getConfig'](_0x21a152(0x24d)))==null?'Univer':_0x5046a6;_0xc4ddaa instanceof t[_0x21a152(0x408)]&&(_0x562907=_0xc4ddaa[_0x21a152(0x19e)]),document['title']=_0x562907;}));}};Me=y([v(0x0,t[_0x1de16c(0x1ca)]),v(0x1,t[_0x1de16c(0x3cb)])],Me);let W=class{constructor(_0x4aa04e,_0x490be0,_0x2d30f3){const _0x41ec05=_0x1de16c;this['_configService']=_0x4aa04e,this['_httpService']=_0x490be0,this[_0x41ec05(0x14f)]=_0x2d30f3,this['init']();}[_0x1de16c(0x399)](){const _0x2515e4=_0x1de16c;this[_0x2515e4(0x367)][_0x2515e4(0x400)]({'priority':0x1,'interceptor':(_0x29264e,_0x147ba5)=>_0x147ba5(_0x29264e)[_0x2515e4(0x200)]((0x0,i['concatMap'])(async _0x3cb0ca=>{const _0x159740=_0x2515e4;let _0x3cc282=_0x3cb0ca;if(_0x3cc282['status']===0x191){if(typeof window>'u')throw Error(_0x159740(0x294));if(window[_0x159740(0x133)](this['localeService']['t'](_0x159740(0x1c4)))){let _0x2935f9=window['encodeURIComponent'](window[_0x159740(0x311)]['href']);window['location'][_0x159740(0x3eb)]=this[_0x159740(0x23a)]()+'?url='+_0x2935f9;}}return _0x3cc282;}))});}['_getLoginPath'](){const _0x5910f4=_0x1de16c;var _0x240c00;let _0x37f238=this[_0x5910f4(0x2aa)][_0x5910f4(0x26a)](T);return(_0x240c00=_0x37f238==null?void 0x0:_0x37f238[_0x5910f4(0x36a)])==null?'/universer-api/oidc/authpage':_0x240c00;}};W=y([v(0x0,t[_0x1de16c(0x3cb)]),v(0x1,(0x0,t[_0x1de16c(0x20f)])(c[_0x1de16c(0x14d)])),v(0x2,(0x0,t[_0x1de16c(0x20f)])(t[_0x1de16c(0x297)]))],W);let G=class extends t[_0x1de16c(0x1d2)]{constructor(_0x3e5caa,_0x452ad5){const _0x40c0b2=_0x1de16c;super(),this[_0x40c0b2(0x2d3)]=_0x3e5caa,this[_0x40c0b2(0x2aa)]=_0x452ad5,g(this,_0x40c0b2(0x3b2),!0x1),this[_0x40c0b2(0x2fb)]();}[_0x1de16c(0x2fb)](){const _0x30c0d1=_0x1de16c;let _0x4b60aa=this;this[_0x30c0d1(0x3b8)](this[_0x30c0d1(0x2d3)]['registerHTTPInterceptor']({'priority':0x3e7,'interceptor':(0x0,c['MergeInterceptorFactory'])({'isMatch'(_0x19e05b){const _0x32f7b4=_0x30c0d1;var _0xb6adc4;if(_0x19e05b[_0x32f7b4(0x36c)]===_0x32f7b4(0x398)&&(_0xb6adc4=_0x19e05b['requestParams'])!=null&&_0xb6adc4[_0x32f7b4(0x401)]){let {objectID:_0x17405c,objectType:_0x2c1ae1}=_0x19e05b[_0x32f7b4(0x3f0)]['body']||{};if(!_0x17405c||_0x2c1ae1===void 0x0)return!0x1;let _0x203c3b=_0x4b60aa[_0x32f7b4(0x214)]()+'/'+_0x2c1ae1+_0x32f7b4(0x1f7)+_0x17405c+_0x32f7b4(0x3f1);if(_0x19e05b['url']===_0x203c3b)return!0x0;}return!0x1;},'getParamsFromRequest'(_0x2fdd2f){const _0x2ee978=_0x30c0d1;var _0x3900d7;return(_0x3900d7=_0x2fdd2f[_0x2ee978(0x3f0)])==null?void 0x0:_0x3900d7[_0x2ee978(0x401)];},'mergeParamsToRequest'(_0x1e90bb,_0x2c483e){const _0xf8bc70=_0x30c0d1;let _0x36a6c7=_0x4b60aa[_0xf8bc70(0x214)]()+_0xf8bc70(0x3a7),_0x3af6e6=_0x1e90bb[_0xf8bc70(0x3ee)]((_0x2ea1f7,_0x399214)=>{const _0x16a34f=_0xf8bc70;let {unitID:_0x4a5d80,objectID:_0x33f2d0,objectType:_0x5084fe,actions:_0x13dd93}=_0x399214;return _0x2ea1f7[_0x4a5d80]||(_0x2ea1f7[_0x4a5d80]={}),_0x2ea1f7[_0x4a5d80][_0x33f2d0]||(_0x2ea1f7[_0x4a5d80][_0x33f2d0]={'objectID':_0x33f2d0,'objectType':_0x5084fe,'actions':[]}),_0x2ea1f7[_0x4a5d80][_0x33f2d0][_0x16a34f(0x17c)]['push'](..._0x13dd93),_0x2ea1f7;},{}),_0x7ce58d=[];for(let _0x2dbe26 in _0x3af6e6)for(let _0x1a8dc5 in _0x3af6e6[_0x2dbe26]){let {actions:_0x4d28d8,objectType:_0x1b8cf6}=_0x3af6e6[_0x2dbe26][_0x1a8dc5],_0x345a5f=[...new Set(_0x4d28d8)];_0x7ce58d[_0xf8bc70(0x186)]({'unitID':_0x2dbe26,'objectID':_0x1a8dc5,'objectType':_0x1b8cf6,'actions':_0x345a5f});}return new c[(_0xf8bc70(0x254))](_0xf8bc70(0x398),_0x36a6c7,{'headers':_0x2c483e[_0xf8bc70(0x36d)],'withCredentials':_0x2c483e[_0xf8bc70(0x2b8)],'responseType':_0x2c483e[_0xf8bc70(0x2b6)],'body':{'requests':_0x7ce58d}});}},{'distributeResult'(_0x332b06,_0x1b6a91){const _0x2cb50c=_0x30c0d1;let {objectActions:_0x402f9e}=_0x332b06;return _0x1b6a91[_0x2cb50c(0x2fc)](_0x26873e=>{const _0x229d24=_0x2cb50c;let {unitID:_0x3d5f69,objectID:_0x4ab380,actions:_0x174b06}=_0x26873e,_0x449753=_0x402f9e['find'](_0x1a666c=>_0x1a666c[_0x229d24(0x378)]===_0x3d5f69&&_0x1a666c[_0x229d24(0x16e)]===_0x4ab380);return{'config':_0x26873e,'result':{'actions':_0x174b06[_0x229d24(0x2fc)](_0x12f409=>_0x449753==null?void 0x0:_0x449753[_0x229d24(0x17c)][_0x229d24(0x38b)](_0x29ed1d=>_0x29ed1d[_0x229d24(0x146)]===_0x12f409))['filter'](_0x2720f8=>!!_0x2720f8),'error':_0x332b06[_0x229d24(0x1e3)]}};});}})}));}[_0x1de16c(0x214)](){const _0x3c74df=_0x1de16c;var _0x5f536d;let _0x3d107c=this[_0x3c74df(0x2aa)][_0x3c74df(0x26a)](T);return(_0x5f536d=_0x3d107c==null?void 0x0:_0x3d107c['authzUrl'])==null?'/universer-api/authz':_0x5f536d;}async['create'](_0xdf7ce4){const _0x74f464=_0x1de16c;let _0x27d3ed=this[_0x74f464(0x214)]()+'/'+_0xdf7ce4[_0x74f464(0x1a6)]+_0x74f464(0x31f);return(await this[_0x74f464(0x2d3)][_0x74f464(0x154)](_0x27d3ed,{'body':_0xdf7ce4}))[_0x74f464(0x401)]['objectID']||'';}async[_0x1de16c(0x234)](_0x3a54c8){const _0x3a13f3=_0x1de16c;let _0x26a9e4=this[_0x3a13f3(0x214)]()+_0x3a13f3(0x2e4);return(await this[_0x3a13f3(0x2d3)]['post'](_0x26a9e4,{'body':_0x3a54c8}))[_0x3a13f3(0x401)][_0x3a13f3(0x1bc)];}async[_0x1de16c(0x2ce)](_0x179a69){const _0x55deef=_0x1de16c;var _0x1bb44e;let _0x47e612=this[_0x55deef(0x214)]()+'/'+_0x179a69[_0x55deef(0x1a6)]+'/object/'+_0x179a69[_0x55deef(0x16e)],_0xa09177=await this[_0x55deef(0x2d3)][_0x55deef(0x3b4)](_0x47e612,{'body':_0x179a69});if((_0xa09177==null||(_0x1bb44e=_0xa09177[_0x55deef(0x401)])==null||(_0x1bb44e=_0x1bb44e[_0x55deef(0x1e3)])==null?void 0x0:_0x1bb44e[_0x55deef(0x308)])!==0x1)throw Error(_0x55deef(0x3c8));}async[_0x1de16c(0x19d)](_0x2f1311){const _0x2e5f39=_0x1de16c;let _0x53db53=this[_0x2e5f39(0x214)]()+'/'+_0x2f1311[_0x2e5f39(0x1a6)]+_0x2e5f39(0x1f7)+_0x2f1311['objectID']+_0x2e5f39(0x3f1);return(await this[_0x2e5f39(0x2d3)][_0x2e5f39(0x154)](_0x53db53,{'body':_0x2f1311}))[_0x2e5f39(0x401)]['actions'];}async[_0x1de16c(0x281)](_0x43afb1){const _0x332a14=_0x1de16c;let _0x49bb90=this['_getAPIPrefixPath']()+'/-/object/-/batch_allowed';return(await this[_0x332a14(0x2d3)][_0x332a14(0x154)](_0x49bb90,{'body':{'requests':_0x43afb1}}))[_0x332a14(0x401)][_0x332a14(0x3fa)];}async[_0x1de16c(0x216)](_0x3e9d30){const _0x5f2f2b=_0x1de16c;let _0x3009d3=this[_0x5f2f2b(0x214)]()+'/'+_0x3e9d30[_0x5f2f2b(0x1a6)]+'/role',_0x3a3d6a=await this[_0x5f2f2b(0x2d3)]['post'](_0x3009d3,{'body':_0x3e9d30});return{'roles':_0x3a3d6a['body'][_0x5f2f2b(0x188)],'actions':_0x3a3d6a[_0x5f2f2b(0x401)][_0x5f2f2b(0x17c)]};}async[_0x1de16c(0x383)](_0xa22e83){const _0x3e6f25=_0x1de16c;let _0x44ce2e=this[_0x3e6f25(0x214)]()+'/collaborator';await this[_0x3e6f25(0x2d3)]['delete'](_0x44ce2e,{'params':{'collaboratorID':_0xa22e83[_0x3e6f25(0x1af)],'objectID':_0xa22e83['objectID'],'unitID':_0xa22e83[_0x3e6f25(0x378)]}});}async[_0x1de16c(0x2db)](_0x1ab065){const _0x4c53a8=_0x1de16c;let _0x526478=this[_0x4c53a8(0x214)]()+_0x4c53a8(0x259);await this[_0x4c53a8(0x2d3)][_0x4c53a8(0x33d)](_0x526478,{'body':_0x1ab065});}async[_0x1de16c(0x151)](_0x26e2fe){const _0x381efd=_0x1de16c;let _0x2ae48d=this[_0x381efd(0x214)]()+_0x381efd(0x259);await this[_0x381efd(0x2d3)][_0x381efd(0x154)](_0x2ae48d,{'body':_0x26e2fe});}async['listCollaborators'](_0x15012c){const _0x4272fb=_0x1de16c;var _0x210afa;let _0x4c3c03=this[_0x4272fb(0x214)]()+'/collaborator',_0x2d787b=await this[_0x4272fb(0x2d3)][_0x4272fb(0x373)](_0x4c3c03,{'params':{'objectID':_0x15012c[_0x4272fb(0x16e)],'unitID':_0x15012c[_0x4272fb(0x378)]}});return this[_0x4272fb(0x3cf)]((_0x210afa=_0x2d787b[_0x4272fb(0x401)][_0x4272fb(0x175)])==null?!0x1:_0x210afa),_0x2d787b[_0x4272fb(0x401)][_0x4272fb(0x3a2)];}async[_0x1de16c(0x3a9)](_0x318af9){const _0x5998a9=_0x1de16c;let _0x4627a6=this[_0x5998a9(0x214)]()+_0x5998a9(0x259);await this[_0x5998a9(0x2d3)][_0x5998a9(0x3b4)](_0x4627a6,{'body':_0x318af9});}[_0x1de16c(0x3cf)](_0x2410a9){this['_cfgEnableObjInherit']=_0x2410a9;}[_0x1de16c(0x14c)](){const _0xdb5a2a=_0x1de16c;return this[_0xdb5a2a(0x3b2)];}};G=y([v(0x0,(0x0,t['Inject'])(c[_0x1de16c(0x14d)])),v(0x1,(0x0,t[_0x1de16c(0x20f)])(t[_0x1de16c(0x3cb)]))],G);function Ne(_0x53ef06){const _0x2d66ba=_0x1de16c;let _0x4acf96=atob(_0x53ef06),_0x323e92=new Uint8Array(_0x4acf96[_0x2d66ba(0x3c7)]);for(let _0x10af90=0x0;_0x10af90<_0x4acf96['length'];_0x10af90++)_0x323e92[_0x10af90]=_0x4acf96[_0x2d66ba(0x1c1)](_0x10af90);return _0x323e92;}function Pe(_0x1ec8ad){const _0x4df657=_0x1de16c;let _0x174868='';for(let _0x1e83bc=0x0;_0x1e83bc<_0x1ec8ad[_0x4df657(0x3c7)];_0x1e83bc++)_0x174868+=String[_0x4df657(0x365)](_0x1ec8ad[_0x1e83bc]);return btoa(_0x174868);}function Fe(_0x455f2d,_0x3aae9e){const _0x1470ca=_0x1de16c;let _0x573f68=Ne(_0x3aae9e),_0x8a4ec0=(0x0,f[_0x1470ca(0x3e9)])(0x10);return Pe((0x0,f[_0x1470ca(0x153)])(_0x8a4ec0,(0x0,d['cbc'])(_0x573f68,_0x8a4ec0)[_0x1470ca(0x3d7)]((0x0,f[_0x1470ca(0x210)])(_0x455f2d))));}function Ie(){const _0x2b33d2=_0x1de16c;let _0x1868a3=(0x0,l[_0x2b33d2(0x28e)])()[_0x2b33d2(0x1d9)];if(typeof window<'u'&&window['location']!==void 0x0&&_0x1868a3){let _0x1b35fb={'time':Math[_0x2b33d2(0x174)](Date['now']()/0x3e8),'domain':location[_0x2b33d2(0x1da)]};return Fe(JSON[_0x2b33d2(0x2d8)](_0x1b35fb),_0x1868a3);}}let K=class{constructor(_0x15f5c3){const _0x2588c7=_0x1de16c;this[_0x2588c7(0x367)]=_0x15f5c3,this['_initRequestHeader']();}[_0x1de16c(0x305)](){const _0x26719a=_0x1de16c;this['_httpService'][_0x26719a(0x400)]({'interceptor':(_0x1dfd5b,_0x3c5f4a)=>{const _0xd3ce52=_0x26719a;let _0x44de7d=Ie();return _0x44de7d&&_0x1dfd5b[_0xd3ce52(0x36d)][_0xd3ce52(0x248)](_0xd3ce52(0x176),_0x44de7d),_0x3c5f4a(_0x1dfd5b);}});}};K=y([v(0x0,(0x0,t['Inject'])(c['HTTPService']))],K);let q=class extends t['RxDisposable']{constructor(_0x4447e8,_0x39b3b5,_0x2f7f5f){const _0x2b24f1=_0x1de16c;super(),this[_0x2b24f1(0x30d)]=_0x4447e8,this[_0x2b24f1(0x258)]=_0x39b3b5,this[_0x2b24f1(0x2e1)]=_0x2f7f5f,g(this,_0x2b24f1(0x2a1),new i[(_0x2b24f1(0x19f))](null)),g(this,'unitInfo$',this['_unitInfo$'][_0x2b24f1(0x1ea)]());}async[_0x1de16c(0x3b5)](_0x4e57d5,_0x1bda22,_0x34476f){const _0xc8995c=_0x1de16c;this[_0xc8995c(0x2a1)][_0xc8995c(0x286)]({'unitId':_0x4e57d5,'type':_0x1bda22});let _0x5a1afb=null;switch(_0x1bda22){case t[_0xc8995c(0x20a)][_0xc8995c(0x2b5)]:_0x5a1afb=await this[_0xc8995c(0x258)][_0xc8995c(0x342)](_0x4e57d5,_0x34476f);break;case t[_0xc8995c(0x20a)][_0xc8995c(0x198)]:_0x5a1afb=await this['_snapshotService'][_0xc8995c(0x1b5)](_0x4e57d5,_0x34476f);break;default:this['_logService'][_0xc8995c(0x1e3)]('[DataLoaderService]',_0xc8995c(0x39c));break;}return _0x5a1afb;}async[_0x1de16c(0x277)](_0x1bdc57,_0x2938e9,_0x2a5398){const _0xb75861=_0x1de16c;var _0x1563cb;this[_0xb75861(0x2a1)][_0xb75861(0x286)]({'unitId':_0x1bdc57,'type':_0x2938e9,'subUnitId':_0x2a5398});let _0x17806e=0x0,_0x21b87d=await((_0x1563cb=this[_0xb75861(0x2e1)])==null?void 0x0:_0x1563cb[_0xb75861(0x2a0)](_0x1bdc57));return _0x21b87d&&(_0x21b87d[_0xb75861(0x2f5)]||_0x21b87d[_0xb75861(0x13f)][_0xb75861(0x3c7)]!==0x0)&&(_0x17806e=_0x21b87d[_0xb75861(0x3a4)]),_0x17806e===0x0&&this['_logService'][_0xb75861(0x2f2)]('[DataLoaderService]','fetching\x20the\x20latest\x20document\x20from\x20the\x20server.'),this[_0xb75861(0x3b5)](_0x1bdc57,_0x2938e9,_0x17806e);}};q=y([v(0x0,t[_0x1de16c(0x243)]),v(0x1,(0x0,t[_0x1de16c(0x20f)])(e['SnapshotService'])),v(0x2,(0x0,t[_0x1de16c(0x37e)])(S))],q);let J=class{constructor(_0x3c1489,_0x554d65,_0x555304){const _0x27644f=_0x1de16c;this['_httpService']=_0x3c1489,this[_0x27644f(0x2aa)]=_0x554d65,this[_0x27644f(0x2a7)]=_0x555304,g(this,_0x27644f(0x168),0x0),g(this,'_change$',new i[(_0x27644f(0x3c5))]()),g(this,_0x27644f(0x25c),this['_change$']),g(this,_0x27644f(0x1e4),new Map());}[_0x1de16c(0x185)](_0xff52a7){const _0x58ee2e=_0x1de16c;this[_0x58ee2e(0x168)]=_0xff52a7,this['_change$'][_0x58ee2e(0x286)](_0xff52a7);}[_0x1de16c(0x3ed)](_0x799307,_0x5ced72){const _0x2cb3f6=_0x1de16c;if(_0x5ced72===u['ImageSourceType'][_0x2cb3f6(0x3b6)]){let _0x4fefb1=new Image();return _0x4fefb1[_0x2cb3f6(0x3d1)]=_0x799307,_0x4fefb1;}return this[_0x2cb3f6(0x1e4)][_0x2cb3f6(0x373)](_0x799307);}['addImageSourceCache'](_0x127188,_0x5b2321,_0x573736){const _0x14f90f=_0x1de16c;_0x5b2321===u[_0x14f90f(0x31a)][_0x14f90f(0x3b6)]||_0x573736==null||this[_0x14f90f(0x1e4)][_0x14f90f(0x248)](_0x127188,_0x573736);}async['getImage'](_0x4ed21a){const _0x1b2392=_0x1de16c;try{let _0x4e3313=this[_0x1b2392(0x1a4)](this[_0x1b2392(0x130)](),''+_0x4ed21a),_0x33d28e=(await this['_httpService']['get'](_0x4e3313))[_0x1b2392(0x401)];if(_0x33d28e[_0x1b2392(0x1e3)]&&_0x33d28e[_0x1b2392(0x1e3)][_0x1b2392(0x308)]===a[_0x1b2392(0x240)]['OK']){let _0x389915=(0x0,t['resolveWithBasePath'])(_0x33d28e[_0x1b2392(0x370)],this[_0x1b2392(0x303)]());return Promise['resolve'](_0x389915);}return Promise['reject'](_0x33d28e[_0x1b2392(0x1e3)]);}catch(_0x1d44de){return Promise[_0x1b2392(0x3a1)](_0x1d44de);}}async['saveImage'](_0x13c6c6){const _0x4fd577=_0x1de16c;let _0x33b77b='';if(!u[_0x4fd577(0x3e4)][_0x4fd577(0x39f)](_0x13c6c6[_0x4fd577(0x1a0)]))return this[_0x4fd577(0x3c3)](),Promise[_0x4fd577(0x3a1)](Error(u['ImageUploadStatusType'][_0x4fd577(0x2ee)]));if(_0x13c6c6[_0x4fd577(0x372)]>(0x0,u[_0x4fd577(0x2e5)])())return this[_0x4fd577(0x3c3)](),Promise[_0x4fd577(0x3a1)](Error(u[_0x4fd577(0x31b)]['ERROR_EXCEED_SIZE']));try{let _0x53e7a7=new FormData();_0x53e7a7['append'](_0x4fd577(0x22d),_0x13c6c6);let _0x4270e1=this[_0x4fd577(0x2a7)]['getFocusedUnit'](),_0x34842b=_0x4270e1==null?void 0x0:_0x4270e1[_0x4fd577(0x270)]();if(!_0x34842b)throw Error(_0x4fd577(0x359));let _0x5936b8=this[_0x4fd577(0x167)]()+_0x4fd577(0x15f)+_0x13c6c6[_0x4fd577(0x372)]['toString']()+_0x4fd577(0x2ba)+a[_0x4fd577(0x291)][_0x4fd577(0x34c)]+_0x4fd577(0x1fb)+encodeURIComponent(_0x34842b),_0x302ec8={'body':_0x53e7a7},_0x5b0548=(await this[_0x4fd577(0x367)][_0x4fd577(0x154)](_0x5936b8,_0x302ec8))[_0x4fd577(0x401)];if(typeof _0x5b0548[_0x4fd577(0x177)]!=_0x4fd577(0x239))return this['_decreaseWaiting'](),Promise[_0x4fd577(0x3a1)](Error(u[_0x4fd577(0x31b)][_0x4fd577(0x1c9)]));_0x33b77b=_0x5b0548[_0x4fd577(0x177)];}catch{return this[_0x4fd577(0x3c3)](),Promise[_0x4fd577(0x3a1)](Error(u[_0x4fd577(0x31b)][_0x4fd577(0x1c9)]));}return new Promise((_0x41d04f,_0x33b520)=>{const _0x222396=_0x4fd577;let _0x5827a3=new FileReader();_0x5827a3[_0x222396(0x14b)](_0x13c6c6),_0x5827a3[_0x222396(0x395)]=_0x4ef3a0=>{const _0x25fe3b=_0x222396;var _0x3965a8;let _0x3b71d3=(_0x3965a8=_0x4ef3a0['target'])==null?void 0x0:_0x3965a8[_0x25fe3b(0x274)];if(_0x3b71d3==null){this[_0x25fe3b(0x3c3)](),_0x33b520(Error(u['ImageUploadStatusType']['ERROR_IMAGE']));return;}_0x41d04f({'imageId':(0x0,t[_0x25fe3b(0x31d)])(0x6),'imageSourceType':u[_0x25fe3b(0x31a)][_0x25fe3b(0x1ff)],'source':_0x33b77b,'base64Cache':_0x3b71d3,'status':u[_0x25fe3b(0x31b)]['SUCCUSS']}),this[_0x25fe3b(0x3c3)]();};});}[_0x1de16c(0x167)](){const _0x25f9b8=_0x1de16c;var _0x39d888;let _0x12b1bc=this['_configService'][_0x25f9b8(0x26a)](T);return(_0x39d888=_0x12b1bc==null?void 0x0:_0x12b1bc[_0x25f9b8(0x1e1)])==null?'/universer-api/stream/file/upload':_0x39d888;}[_0x1de16c(0x130)](){const _0x30feec=_0x1de16c;var _0xb84d8e;let _0x33b975=this['_configService'][_0x30feec(0x26a)](T);return(_0xb84d8e=_0x33b975==null?void 0x0:_0x33b975[_0x30feec(0x2e7)])==null?_0x30feec(0x27d):_0xb84d8e;}[_0x1de16c(0x303)](){const _0x14e616=_0x1de16c;var _0x44e041;let _0x547722=this['_configService'][_0x14e616(0x26a)](T);return(_0x44e041=_0x547722==null?void 0x0:_0x547722[_0x14e616(0x202)])==null?location[_0x14e616(0x3d3)]:_0x44e041;}[_0x1de16c(0x1a4)](_0x396db8,_0x55fafc){const _0x47522d=_0x1de16c;return _0x396db8[_0x47522d(0x2bb)](_0x47522d(0x3f3),_0x55fafc);}[_0x1de16c(0x3c3)](){const _0x1623bd=_0x1de16c;--this['_waitCount'],this[_0x1623bd(0x25a)][_0x1623bd(0x286)](this[_0x1623bd(0x168)]);}};J=y([v(0x0,(0x0,t[_0x1de16c(0x20f)])(c[_0x1de16c(0x14d)])),v(0x1,t[_0x1de16c(0x3cb)]),v(0x2,(0x0,t[_0x1de16c(0x20f)])(t[_0x1de16c(0x1ca)]))],J);let Y=class{constructor(_0x5558ad,_0x3488ce){const _0x7f943f=_0x1de16c;this[_0x7f943f(0x2aa)]=_0x5558ad,this[_0x7f943f(0x2d3)]=_0x3488ce;}[_0x1de16c(0x214)](){const _0x1dbdaf=_0x1de16c;var _0x5d17a2;let _0x555631=this[_0x1dbdaf(0x2aa)][_0x1dbdaf(0x26a)](T);return(_0x5d17a2=_0x555631==null?void 0x0:_0x555631[_0x1dbdaf(0x1ce)])==null?_0x1dbdaf(0x1d5):_0x5d17a2;}async[_0x1de16c(0x234)](_0x3778d9){const _0x401c94=_0x1de16c;let _0x3698f8=this[_0x401c94(0x214)]()+_0x401c94(0x259);return{'list':[{'title':'People','mentions':(await this['_HTTPService'][_0x401c94(0x373)](_0x3698f8,{'params':{'objectID':_0x3778d9[_0x401c94(0x2c9)],'unitID':_0x3778d9['unitId']}}))[_0x401c94(0x401)][_0x401c94(0x3a2)][_0x401c94(0x2fc)](_0x29d44d=>({'objectId':_0x29d44d['id'],'name':_0x29d44d['subject'][_0x401c94(0x19e)],'metadata':{'icon':_0x29d44d[_0x401c94(0x35f)][_0x401c94(0x353)]},'label':_0x29d44d[_0x401c94(0x35f)][_0x401c94(0x19e)],'objectType':t['MentionType'][_0x401c94(0x29e)]})),'metadata':{},'type':t[_0x401c94(0x3bb)][_0x401c94(0x29e)]}]};}};Y=y([v(0x0,(0x0,t[_0x1de16c(0x20f)])(t[_0x1de16c(0x3cb)])),v(0x1,(0x0,t[_0x1de16c(0x20f)])(c[_0x1de16c(0x14d)]))],Y);let X=class extends t['RxDisposable']{constructor(_0x290b75,_0x9c5691,_0x5a6769,_0x56d680,_0x357b2d){const _0x1af5fe=_0x1de16c;super(),this[_0x1af5fe(0x16d)]=_0x290b75,this[_0x1af5fe(0x2a7)]=_0x9c5691,this['_permissionService']=_0x5a6769,this[_0x1af5fe(0x350)]=_0x56d680,this[_0x1af5fe(0x3f4)]=_0x357b2d,this['_initUnitPermissionChange'](),this[_0x1af5fe(0x2a4)]();}[_0x1de16c(0x2a4)](){const _0x42eaf9=_0x1de16c;let _0x2fb33d=async _0x2ea2cc=>{const _0x55d5f6=_0x3896;(await this[_0x55d5f6(0x350)][_0x55d5f6(0x3e6)](_0x2ea2cc))[_0x55d5f6(0x201)][_0x55d5f6(0x200)]((0x0,s['filter'])(_0x2ffecb=>_0x2ffecb[_0x55d5f6(0x26d)]===e[_0x55d5f6(0x255)][_0x55d5f6(0x3fe)]),(0x0,s[_0x55d5f6(0x3ba)])(this[_0x55d5f6(0x155)]))[_0x55d5f6(0x15c)](_0x55119a=>{const _0x4c4380=_0x55d5f6;let {reason:_0x273415}=_0x55119a[_0x4c4380(0x2d2)];this['_collaborationUIEventService'][_0x4c4380(0x262)]({'id':_0x4c4380(0x349),'data':_0x273415}),this[_0x4c4380(0x2c5)][_0x4c4380(0x301)](new r[(_0x4c4380(0x316))](_0x2ea2cc)['id'],!0x1),this[_0x4c4380(0x350)][_0x4c4380(0x184)](_0x2ea2cc);});};(0x0,i[_0x42eaf9(0x391)])(this['_univerInstanceService'][_0x42eaf9(0x13d)](t[_0x42eaf9(0x20a)]['UNIVER_SHEET']),this['_univerInstanceService'][_0x42eaf9(0x13d)](t[_0x42eaf9(0x20a)][_0x42eaf9(0x198)]))[_0x42eaf9(0x200)]((0x0,s[_0x42eaf9(0x2fc)])(_0x7630f9=>_0x7630f9[_0x42eaf9(0x341)][_0x42eaf9(0x270)]()),(0x0,s[_0x42eaf9(0x15e)])(_0x3467c8=>!(0x0,t[_0x42eaf9(0x2d4)])(_0x3467c8)),(0x0,s['takeUntil'])(this[_0x42eaf9(0x155)]))[_0x42eaf9(0x15c)](_0x2df618=>{_0x2fb33d(_0x2df618);});}['_initUnitPermissionChange'](){const _0x1280af=_0x1de16c;let _0x160efa=async _0x56b370=>{const _0x82923=_0x3896;let _0x5277cb=await this[_0x82923(0x350)][_0x82923(0x3e6)](_0x56b370),_0x417eab=this[_0x82923(0x16d)][_0x82923(0x373)](r[_0x82923(0x18d)]);_0x5277cb['event$'][_0x82923(0x200)]((0x0,s[_0x82923(0x15e)])(_0x557124=>_0x557124[_0x82923(0x26d)]===e[_0x82923(0x255)][_0x82923(0x344)]),(0x0,s[_0x82923(0x3ba)])(this[_0x82923(0x155)]))['subscribe'](_0x2a45e2=>{const _0x37070a=_0x82923;let {objectId:_0x19872e}=_0x2a45e2[_0x37070a(0x2d2)];_0x19872e===_0x56b370?_0x417eab[_0x37070a(0x1b2)](_0x56b370):_0x417eab[_0x37070a(0x377)](_0x56b370,_0x19872e);});};(0x0,i[_0x1280af(0x391)])(this['_univerInstanceService']['getTypeOfUnitAdded$'](t['UniverInstanceType']['UNIVER_SHEET']))[_0x1280af(0x200)]((0x0,s[_0x1280af(0x2fc)])(_0x30a179=>_0x30a179[_0x1280af(0x341)]['getUnitId']()),(0x0,s[_0x1280af(0x15e)])(_0x46f2c4=>!(0x0,t[_0x1280af(0x2d4)])(_0x46f2c4)),(0x0,s[_0x1280af(0x3ba)])(this['dispose$']))[_0x1280af(0x15c)](_0x29327b=>{_0x160efa(_0x29327b);});}};X=y([v(0x0,(0x0,t['Inject'])(t[_0x1de16c(0x25d)])),v(0x1,t[_0x1de16c(0x1ca)]),v(0x2,t[_0x1de16c(0x3e7)]),v(0x3,(0x0,t['Inject'])(H)),v(0x4,(0x0,t[_0x1de16c(0x20f)])(_))],X);let Z=class{constructor(_0x29f3ef,_0x37c022){const _0x49af95=_0x1de16c;this['_configService']=_0x29f3ef,this[_0x49af95(0x367)]=_0x37c022;}async[_0x1de16c(0x2c4)](_0x38e878,_0x2c8f38){const _0x2a7b81=_0x1de16c;var _0x512277;let {unitID:_0xb3335f,type:_0x1a2e1c,revision:_0x5da00d=0x0}=_0x2c8f38,_0x3bf189=this[_0x2a7b81(0x2c2)]()+'/'+_0x1a2e1c+_0x2a7b81(0x192)+_0xb3335f+_0x2a7b81(0x1ae)+_0x5da00d,_0x438a95=(await this['_httpService']['get'](_0x3bf189))[_0x2a7b81(0x401)],_0x1f1357=(_0x512277=_0x438a95['snapshot'])==null?void 0x0:_0x512277[_0x2a7b81(0x1e8)];if(_0x1f1357){let _0x4790f9=_0x1f1357==null?void 0x0:_0x1f1357[_0x2a7b81(0x2f0)];_0x1f1357[_0x2a7b81(0x2f0)]=e[_0x2a7b81(0x1a9)][_0x2a7b81(0x33b)]((0x0,e[_0x2a7b81(0x1e6)])(_0x4790f9)),Object[_0x2a7b81(0x12c)](_0x1f1357[_0x2a7b81(0x13a)])[_0x2a7b81(0x2f3)](([,_0x3f3be2])=>{const _0x246bc6=_0x2a7b81;let _0x23f490=_0x3f3be2[_0x246bc6(0x2f0)];_0x3f3be2[_0x246bc6(0x2f0)]=e[_0x246bc6(0x1a9)]['encode']((0x0,e['b64DecodeUnicode'])(_0x23f490));});}return _0x438a95;}async[_0x1de16c(0x17d)](_0x29c1cd,_0x524b18){const _0x1ad95d=_0x1de16c;let {unitID:_0x5a82c6,type:_0x5cab7b,blockID:_0x471dcd}=_0x524b18,_0x1ecb98=this[_0x1ad95d(0x331)]()+'/'+_0x5cab7b+'/unit/'+_0x5a82c6+'/block/'+_0x471dcd;return(await this['_httpService'][_0x1ad95d(0x373)](_0x1ecb98))[_0x1ad95d(0x401)];}async[_0x1de16c(0x337)](_0x4b3528,_0x4e7156){const _0x2c2238=_0x1de16c;let {unitID:_0x2d9b7f,type:_0x386e3e,blockID:_0x471b85}=_0x4e7156,_0x484c46=this[_0x2c2238(0x331)]()+_0x2c2238(0x233)+_0x386e3e+_0x2c2238(0x192)+_0x2d9b7f+'/block/'+_0x471b85;return(await this[_0x2c2238(0x367)][_0x2c2238(0x373)](_0x484c46))[_0x2c2238(0x401)];}async[_0x1de16c(0x1b9)](_0x31ed54,_0x244fe4){const _0x32bc8f=_0x1de16c;let {unitID:_0x5e7636,type:_0x47ec18,from:_0x4376f1,to:_0x57ada5}=_0x244fe4,_0x3f4607=this[_0x32bc8f(0x331)]()+'/'+_0x47ec18+'/unit/'+_0x5e7636+_0x32bc8f(0x282)+_0x4376f1+'&to='+_0x57ada5;return(await this['_httpService'][_0x32bc8f(0x373)](_0x3f4607))['body'];}[_0x1de16c(0x2c2)](){const _0x2991a7=_0x1de16c;var _0x309140;return(_0x309140=this[_0x2991a7(0x2aa)][_0x2991a7(0x26a)](_0x2991a7(0x166)))==null?this[_0x2991a7(0x331)]():_0x309140;}[_0x1de16c(0x331)](){const _0x5a4be8=_0x1de16c;var _0xe2cd2;let _0x6c95a8=this['_configService'][_0x5a4be8(0x26a)](T);return(_0xe2cd2=_0x6c95a8==null?void 0x0:_0x6c95a8[_0x5a4be8(0x145)])==null?_0x5a4be8(0x2b7):_0xe2cd2;}async[_0x1de16c(0x3d9)](_0x219be6,_0x53cfc8){const _0x28fdb9=_0x1de16c;let _0x447ab3='/universer-api/snapshot/'+_0x53cfc8[_0x28fdb9(0x1a0)]+_0x28fdb9(0x192)+_0x53cfc8[_0x28fdb9(0x378)]+_0x28fdb9(0x1ed);return(await this[_0x28fdb9(0x367)][_0x28fdb9(0x373)](_0x447ab3,{'params':{'resourceId':JSON[_0x28fdb9(0x2d8)](_0x53cfc8[_0x28fdb9(0x362)])}}))[_0x28fdb9(0x401)];}[_0x1de16c(0x19c)](){const _0x649aa6=_0x1de16c;throw Error(_0x649aa6(0x22c));}[_0x1de16c(0x242)](){const _0x507c64=_0x1de16c;throw Error(_0x507c64(0x22c));}[_0x1de16c(0x136)](){const _0x29c764=_0x1de16c;throw Error(_0x29c764(0x22c));}[_0x1de16c(0x29b)](){const _0x46094d=_0x1de16c;throw Error(_0x46094d(0x22c));}[_0x1de16c(0x28a)](){const _0x2d5ea1=_0x1de16c;throw Error(_0x2d5ea1(0x22c));}[_0x1de16c(0x207)](){const _0x23b0fd=_0x1de16c;throw Error(_0x23b0fd(0x22c));}};Z=y([v(0x0,t[_0x1de16c(0x3cb)]),v(0x1,(0x0,t[_0x1de16c(0x20f)])(c[_0x1de16c(0x14d)]))],Z);let Q=class extends t['LocalUndoRedoService']{constructor(_0x1c1f8b,_0x45085e,_0x1f8ef8,_0x2d9161,_0x305b5c){const _0x2377f0=_0x1de16c;super(_0x1c1f8b,_0x45085e,_0x1f8ef8),this['_transformService']=_0x2d9161,this[_0x2377f0(0x30d)]=_0x305b5c;}['transformUndoRedo'](_0x2c21e6,_0x2732b5){const _0x3b326c=_0x1de16c;let _0x89aa77=this[_0x3b326c(0x2a9)](_0x2c21e6);if(_0x89aa77)try{let _0x51a58b=this[_0x3b326c(0x3e8)](_0x89aa77,_0x2732b5);this[_0x3b326c(0x179)](_0x2c21e6,_0x51a58b);}catch(_0x330c0c){this[_0x3b326c(0x30d)]['error'](_0x3b326c(0x35b),_0x330c0c),this[_0x3b326c(0x389)](_0x2c21e6);}let _0x429ad0=this['_getRedoStack'](_0x2c21e6);if(_0x429ad0)try{let _0x16c1c9=this[_0x3b326c(0x3e8)](_0x429ad0,_0x2732b5);this[_0x3b326c(0x2d0)](_0x2c21e6,_0x16c1c9);}catch(_0x5994b8){this['_logService'][_0x3b326c(0x1e3)](_0x5994b8),this[_0x3b326c(0x2cb)](_0x2c21e6);}}[_0x1de16c(0x389)](_0x3a2f78){const _0x152f21=_0x1de16c;let _0x20edaa=this[_0x152f21(0x2a9)](_0x3a2f78);_0x20edaa&&(_0x20edaa['length']=0x0,this['_updateStatus']());}[_0x1de16c(0x2cb)](_0x5011d2){const _0x406c75=_0x1de16c;let _0x442ee2=this[_0x406c75(0x236)](_0x5011d2);_0x442ee2&&(_0x442ee2['length']=0x0,this[_0x406c75(0x222)]());}['_substituteUndoStack'](_0x568944,_0x28d381){const _0x444eea=_0x1de16c;this['_undoStacks'][_0x444eea(0x248)](_0x568944,_0x28d381),this['_updateStatus']();}['_substituteRedoStack'](_0x21bc79,_0x7c58ad){const _0xe15f9d=_0x1de16c;this['_redoStacks'][_0xe15f9d(0x248)](_0x21bc79,_0x7c58ad),this[_0xe15f9d(0x222)]();}['_transformStack'](_0xba5873,_0x17a590){const _0x4354e2=_0x1de16c;let _0x19cfc0=[],_0x2d2327=_0x17a590,_0xe93503=_0x17a590;for(let _0x2ba8cb=_0xba5873[_0x4354e2(0x3c7)]-0x1;_0x2ba8cb>=0x0;_0x2ba8cb--){let {unitID:_0x10faa8,undoMutations:_0x4fb8c7,redoMutations:_0x215636}=_0xba5873[_0x2ba8cb],_0x54cf07=this[_0x4354e2(0x226)]['transformMutationsWithChangeset'](_0x2d2327,_0x4fb8c7),_0x46780d=this[_0x4354e2(0x226)][_0x4354e2(0x307)](_0xe93503,_0x215636);if((0x0,e[_0x4354e2(0x280)])(_0x54cf07)||(0x0,e[_0x4354e2(0x280)])(_0x46780d)){this[_0x4354e2(0x30d)]['error'](_0x4354e2(0x35b),_0x4354e2(0x2da),_0x54cf07,_0x46780d);break;}_0x2d2327=_0x54cf07[_0x4354e2(0x38e)],_0xe93503=_0x46780d[_0x4354e2(0x38e)],_0x19cfc0[_0x4354e2(0x186)]({'unitID':_0x10faa8,'undoMutations':_0x54cf07['m2Prime'],'redoMutations':_0x46780d[_0x4354e2(0x249)]});}return _0x19cfc0[_0x4354e2(0x30f)]();}};Q=y([v(0x0,t['IUniverInstanceService']),v(0x1,t[_0x1de16c(0x2a8)]),v(0x2,t[_0x1de16c(0x3bd)]),v(0x3,e[_0x1de16c(0x13c)]),v(0x4,t[_0x1de16c(0x243)])],Q);let $=class extends t['Plugin']{constructor(_0x3d804d={},_0x5920d9,_0x245574,_0x263dfa){const _0x2327f1=_0x1de16c;super(),this[_0x2327f1(0x405)]=_0x3d804d,this[_0x2327f1(0x30d)]=_0x5920d9,this[_0x2327f1(0x16d)]=_0x245574,this['_configService']=_0x263dfa;let {..._0x1d95eb}=(0x0,t[_0x2327f1(0x391)])({},de,_0x3d804d);if(!_0x1d95eb['socketService'])throw Error(_0x2327f1(0x2a3));this[_0x2327f1(0x405)]=_0x1d95eb,this[_0x2327f1(0x2aa)]['setConfig'](T,_0x1d95eb);}[_0x1de16c(0x334)](){const _0x3eb148=_0x1de16c;this[_0x3eb148(0x2b1)](),this[_0x3eb148(0x15a)]();}[_0x1de16c(0x2b1)](){const _0x1b7024=_0x1de16c;var _0x1bc7a2,_0x1d219e;this[_0x1b7024(0x16d)][_0x1b7024(0x1c7)](t[_0x1b7024(0x374)])&&this['_logService'][_0x1b7024(0x1e3)](_0x1b7024(0x149),_0x1b7024(0x2c6));let _0x3e5a3c=(0x0,t[_0x1b7024(0x288)])([[t[_0x1b7024(0x374)],{'useClass':Q}],[H],[b],[C],[W],[K],[ie],[X],[_],[q],[B,{'useClass':this[_0x1b7024(0x405)]['socketService']}],[e['ISnapshotServerService'],{'useClass':Z}],[t[_0x1b7024(0x2b4)],{'useClass':G}],[u[_0x1b7024(0x1de)],{'useClass':J}],[t[_0x1b7024(0x15b)],{'useClass':Y}],[U],[Me]],(_0x1bc7a2=this[_0x1b7024(0x405)])==null?void 0x0:_0x1bc7a2[_0x1b7024(0x1b1)]);if(!((_0x1d219e=this[_0x1b7024(0x405)])!=null&&_0x1d219e['enableSingleActiveInstanceLock'])){let _0x1630ef=_0x3e5a3c[_0x1b7024(0x3fc)](([_0x11c30b])=>_0x11c30b===w);_0x1630ef!==-0x1&&_0x3e5a3c[_0x1b7024(0x284)](_0x1630ef,0x1);}(0x0,t[_0x1b7024(0x37f)])(this[_0x1b7024(0x16d)],_0x3e5a3c);}[_0x1de16c(0x15a)](){const _0x417d7e=_0x1de16c;var _0x17e78e,_0x373a91;if(this[_0x417d7e(0x16d)][_0x417d7e(0x373)](c['HTTPService'])[_0x417d7e(0x400)]({'priority':0x14,'interceptor':(0x0,c[_0x417d7e(0x2e8)])({'maxParallel':0x6})}),!((_0x17e78e=this[_0x417d7e(0x405)])!=null&&_0x17e78e['enableOfflineEditing'])){var _0x24ad6e;(_0x24ad6e=this[_0x417d7e(0x16d)][_0x417d7e(0x373)](S,t[_0x417d7e(0x23c)][_0x417d7e(0x39b)]))==null||_0x24ad6e['disableLocalCache']();}(_0x373a91=this[_0x417d7e(0x405)])!=null&&_0x373a91[_0x417d7e(0x403)]&&(0x0,t[_0x417d7e(0x34e)])(this[_0x417d7e(0x16d)],[[W]]),(0x0,t['touchDependencies'])(this[_0x417d7e(0x16d)],[[K],[U],[X]]);}};g($,_0x1de16c(0x347),'UNIVER_COLLABORATION_CLIENT_PLUGIN'),g($,_0x1de16c(0x1f5),Ae),g($,_0x1de16c(0x23b),je),$=y([(0x0,t[_0x1de16c(0x371)])(l[_0x1de16c(0x1e0)],e[_0x1de16c(0x302)],c['UniverNetworkPlugin']),v(0x1,t[_0x1de16c(0x243)]),v(0x2,(0x0,t[_0x1de16c(0x20f)])(t[_0x1de16c(0x25d)])),v(0x3,t['IConfigService'])],$),Object[_0x1de16c(0x310)](exports,'AuthzIoHttpService',{'enumerable':!0x0,'get':function(){return G;}}),Object[_0x1de16c(0x310)](exports,_0x1de16c(0x1cd),{'enumerable':!0x0,'get':function(){return M;}}),Object['defineProperty'](exports,_0x1de16c(0x1f8),{'enumerable':!0x0,'get':function(){return N;}}),exports['COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY']=T,Object[_0x1de16c(0x310)](exports,_0x1de16c(0x2ec),{'enumerable':!0x0,'get':function(){return U;}}),Object[_0x1de16c(0x310)](exports,_0x1de16c(0x144),{'enumerable':!0x0,'get':function(){return L;}}),Object[_0x1de16c(0x310)](exports,_0x1de16c(0x382),{'enumerable':!0x0,'get':function(){return J;}}),Object[_0x1de16c(0x310)](exports,_0x1de16c(0x27c),{'enumerable':!0x0,'get':function(){return x;}}),Object['defineProperty'](exports,_0x1de16c(0x1fc),{'enumerable':!0x0,'get':function(){return H;}}),Object['defineProperty'](exports,_0x1de16c(0x17b),{'enumerable':!0x0,'get':function(){return V;}}),exports[_0x1de16c(0x16a)]=Se,exports[_0x1de16c(0x3d6)]=re,exports[_0x1de16c(0x173)]=_,Object[_0x1de16c(0x310)](exports,_0x1de16c(0x1b0),{'enumerable':!0x0,'get':function(){return Q;}}),exports[_0x1de16c(0x279)]=ie,Object[_0x1de16c(0x310)](exports,'ConflictState',{'enumerable':!0x0,'get':function(){return P;}}),exports[_0x1de16c(0x196)]=p,exports[_0x1de16c(0x3ac)]=_0x1de16c(0x1d0),exports[_0x1de16c(0x2ad)]=_0x1de16c(0x3af),Object['defineProperty'](exports,_0x1de16c(0x406),{'enumerable':!0x0,'get':function(){return q;}}),Object[_0x1de16c(0x310)](exports,'DocCollaborationEntity',{'enumerable':!0x0,'get':function(){return R;}}),Object[_0x1de16c(0x310)](exports,_0x1de16c(0x351),{'enumerable':!0x0,'get':function(){return I;}}),exports['HEARTBEAT_INTERVAL_KEY']=_0x1de16c(0x143),exports[_0x1de16c(0x2a2)]=_0x1de16c(0x2c0),exports[_0x1de16c(0x18e)]=B,exports['ILocalCacheService']=S,exports['INetworkConditionService']=Ee,exports['ISingleActiveUnitService']=w,exports[_0x1de16c(0x35d)]=0x3e8,exports[_0x1de16c(0x2d6)]=_0x1de16c(0x35d),Object[_0x1de16c(0x310)](exports,_0x1de16c(0x16b),{'enumerable':!0x0,'get':function(){return b;}}),Object[_0x1de16c(0x310)](exports,'MentionIoHttpService',{'enumerable':!0x0,'get':function(){return Y;}}),Object[_0x1de16c(0x310)](exports,_0x1de16c(0x180),{'enumerable':!0x0,'get':function(){return F;}}),Object['defineProperty'](exports,_0x1de16c(0x1c2),{'enumerable':!0x0,'get':function(){return j;}}),exports[_0x1de16c(0x15d)]=_0x1de16c(0x227),exports[_0x1de16c(0x253)]='RETRY_CONNECTING_MAX_COUNT',exports[_0x1de16c(0x235)]=oe,Object['defineProperty'](exports,_0x1de16c(0x1b4),{'enumerable':!0x0,'get':function(){return z;}}),Object[_0x1de16c(0x310)](exports,_0x1de16c(0x397),{'enumerable':!0x0,'get':function(){return C;}}),Object['defineProperty'](exports,'SnapshotServerOverHTTPService',{'enumerable':!0x0,'get':function(){return Z;}}),Object['defineProperty'](exports,_0x1de16c(0x275),{'enumerable':!0x0,'get':function(){return A;}}),exports['UnitStatus']=ue,Object['defineProperty'](exports,'UniverCollaborationClientPlugin',{'enumerable':!0x0,'get':function(){return $;}}),exports[_0x1de16c(0x211)]=De,exports['getLocalCacheKey']=ce,exports['serializeCombRequest']=Oe;
1
+ const _0x393dbe=_0x4ff9;(function(_0x3e8a11,_0x21a08b){const _0xf542bd=_0x4ff9,_0x4caf1c=_0x3e8a11();while(!![]){try{const _0x3f16e4=-parseInt(_0xf542bd(0x2f2))/0x1+-parseInt(_0xf542bd(0x218))/0x2*(parseInt(_0xf542bd(0x3bc))/0x3)+parseInt(_0xf542bd(0xeb))/0x4*(-parseInt(_0xf542bd(0x2a5))/0x5)+parseInt(_0xf542bd(0x122))/0x6+parseInt(_0xf542bd(0x2ac))/0x7+-parseInt(_0xf542bd(0x1af))/0x8*(parseInt(_0xf542bd(0x2cd))/0x9)+parseInt(_0xf542bd(0x32f))/0xa;if(_0x3f16e4===_0x21a08b)break;else _0x4caf1c['push'](_0x4caf1c['shift']());}catch(_0x132b9f){_0x4caf1c['push'](_0x4caf1c['shift']());}}}(_0x4764,0xd88a1),Object[_0x393dbe(0x255)](exports,Symbol['toStringTag'],{'value':_0x393dbe(0x2bd)}));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/network'),l=require('@univerjs-pro/license'),u=require('@univerjs/drawing'),d=require('@noble/ciphers/aes.js'),f=require('@noble/ciphers/utils.js');const p='ws://127.0.0.1:8000/universer-api/comb/connect',m=0x4e20;function ee(_0x2af7e6){return JSON['stringify'](_0x2af7e6)['length'];}function h(_0x3117e2){'@babel/helpers - typeof';const _0x1d9872=_0x393dbe;return h=typeof Symbol==_0x1d9872(0x185)&&typeof Symbol[_0x1d9872(0x201)]==_0x1d9872(0x209)?function(_0x5840d0){return typeof _0x5840d0;}:function(_0x2010c9){return _0x2010c9&&typeof Symbol=='function'&&_0x2010c9['constructor']===Symbol&&_0x2010c9!==Symbol['prototype']?'symbol':typeof _0x2010c9;},h(_0x3117e2);}function _0x4764(){const _0x3cb2ef=['b64DecodeUnicode','CollaborationStatus','saveChangeset','LIVESHARE_REQUEST_HOST','EmptyMutationInfo','retryConnectingInterval','128sORWoY','Optional','RevisionService','members$','ERROR_IMAGE','enableSingleActiveInstanceLock','_createSocket','UniverCollaborationPlugin','DisposableCollection','hostname','size','changesets','touchDependencies','_onUserLeave','[FetchingMissState]:\x20received\x20stale\x20ack\x20revision:\x20','session.room-permission-denied','_snapshotServerService','string','_transformRemoteChangesetByStateCache','CHANGESET_ACK','catch','now','status','toggleOffline','RECV','unknown','_onConnectionFailed','SnapshotService','SetSelectionsOperation','ISnapshotServerService','BASE64','collabWebSocketUrl','randomBytes','OTHER_CLIENTS_EDITING','&assign=','_startTelemetryCollaborationNewChangeset','onTransformRemoteChangesetByStateCache','_memberService','startTime','error','data','[CollaborationEntity]','loginUrlKey','fromCollab','updateSnapshot','JOIN_ROOM_PERMISSION_DENIED','subscribe','range','subject','NEW_CHANGESETS','from','close','objectID','awaiting','debug','authzUrl','_candidateSocket','getTime','People','_logService','appendMutation','defineProperty','_showConflictNotification','unitId','OfflineState','[CollaborationController]:\x20invalid\x20univer\x20type:\x20','_onRemoteRejected','_roomMembers','replace','JOIN_ROOM_FAILED','_onJoinRoomEvent','params','sessionStatus$','online$','MSG_FOR_ERROR','awaitingChangeset','onCommentUpdate','stringify','requireSession','allowed','ITransformService','then','forEach','readAsDataURL','enableCollaboration','_changesetReqId','_replayCachedMutations','_onLocalMutation','onTransformIME','_transitionLocked','_shouldReportTelemetry','transformSelections','subUnitId','?url=','SheetPermissionInitController','getImageSourceCache','_getSendChangesetTimeout','session.room-full','pauseCollaboration','MentionType','_entities','[OfflineState]:\x20invalid\x20calling\x20to\x20`resend`.','event$','SessionStatus','\x20-\x20','take','avatar','_getRedoStack','liveShareOperation','getUnit','onStateChange','collaborators','waitForRoom$','/universer-api/file/{fileID}/sign-url','post','_awaitingChangeset','onTransformState','getTypeOfUnitAdded$','_collaborationTimeoutTimer','/-/object/-/batch_allowed','_changesetSessionId','IContextService','_revisionService','[CollaborationState]:\x20apply\x20error!','LEAVE','object','_updateLocalCache','pipe','/role','_entityInit$','getSnapshotAPIPath','getUnitType','pluginName','ILocalCacheService','FETCH_MISSING','_doCreateSocket','registerHTTPInterceptor','unitId\x20is\x20not\x20found','isTransformMutationsWithChangesetFailure','slice','SheetCollaborationEntity','5liXdoD','target','CHANGESET_SHOULD_RETRY','ConflictState','OFFLINE','COMPRESS_MUTATION_APPLY','_networkConditionService','4956490CpiiFG','_substituteRedoStack','PERMISSION_DENIED','onSendChangeset','pending','univer-pro.collaboration-client.network-condition.service','interceptor','RETRY_CONNECTING_MAX_COUNT','DEFAULT_FILE_NAME','closeSession','_collaborationUIEventService','CollaborationImageIoService','createCollaborator','[PendingState]:\x20received\x20acknowledgement.','includes','localeService','firstValueFrom','Module','sid','getCurrentRevOfUnit','_sheetTransformSelectionsService','HEARTBEAT_INTERVAL_KEY','toPrimitive','failed\x20to\x20apply\x20missed\x20changesets!','ERROR_EXCEED_SIZE','session','CollaborationUIEventId','_removeRoom','_resendTimer','responseType','loadDoc','_updateState','_disableEditing','2601gXmSvN','mapDocumentTypeToUniverInstanceType','copyFileMeta','_roomCreated$','_transformIMECache','getUnitOnRev','unit-cache-','refreshPermission','SUBMIT_CHANGESET_TIMEOUT','onTransformRemoteChangesetByIMECache','cmd','snapshot','_toggleOnline','updatePermissionObjEvent','UniverInstanceType','connection\x20error','_acknowledgeAwaiting','CompressMutationService','rev','IAuthzIoService','resourceIDs','UNIVER_SHEET','_waitForHeartbeatResponse','cbc','[PendingState]:\x20unhandled\x20univer\x20type:\x20','onload','cfgEnableObjInherit','/collaborator','put','_timeoutTimer','asObservable','conflict','unitInfo$','setConfig','onTransformRemoteChangesetByIMECache\x20callback\x20is\x20not\x20added\x20yet.','entityInit$','updateMember','1415184tqDZHd','USERS_ENTER','uploadFileServerUrl','_getCtorByUniverInstanceType','HELLO','[SyncedState]:\x20received\x20rejection.','body','create','UNIVER_DOC','deepClone','readyForCollab','Disposable','AuthzIoHttpService','parse','[CollaborationUndoRedoService]','serializeCombRequest','UniverLicensePlugin','[PendingState]:\x20invalid\x20calling\x20to\x20`resend`.','SHOULD_CLOSE_CONN','executeCommand','_telemetryService','_status$','_type','collaboration-client.local-cache-service','ErrorCode','_cfgEnableObjInherit','RETRY_CONNECTING_MAX_COUNT_KEY','error$','HTTPRequest','_applyRemoteChangeset','close$','/universer-api/authz','result','objectActions','_replaceFileID','textEncoder','_userManagerService','_undoRedoService','_permissionService','_listenToNetworkCondition','_getDownloadEndpointURL','_transformUndoredo','_onConnectionOpen','_onRemoteChangeset','default','[OfflineState]:\x20received\x20rejection.','_submitChangeset','_clearTimeoutTimer','_change$','_tryEnsureSocket','permissionRejEvent','onTransformRemoteChangesetByStateCache\x20callback\x20is\x20not\x20added\x20yet.','sendChangesetTimeout','SnapshotServerOverHTTPService','_sessions','loadUnit','LIVESHARE_NEW_HOST','onTransformSelections','LIVESHARE_TERMINATE','_event$','loadOfflineData','34055630GWMHse','HEARTBEAT_INTERVAL','_sessionStatus$','baseRev','stopTime','/object/','IMentionIOService','\x0aCurrent:\x20','_clearCollaborationTimeoutTimer','HEARTBEAT_TIMEOUT','REMOTE_UNISCRIPT_EXECUTION_ENDPOINT','_transformStateCache','call','max','dispose$','CmdRspCode','MergeInterceptorFactory','toString','_getAPIPrefix','CONFLICT','_compressMutationService','COMPRESS_MUTATION_SEND','resend','session.room-cnt-exceeds','capture','[CollaborationSocketService]:\x20failed\x20to\x20get\x20web\x20socket\x20factory!','c2Prime','collabSubmitChangesetUrl','_getCurrentRevision','/universer-api/snapshot','SOCKET_FAILED_RETRY','LocaleService','ITelemetryService','DEFAULT_COLLAB_WEB_SOCKET_URL','ILogService','objectType','type','fetching\x20the\x20latest\x20document\x20from\x20the\x20server.','MentionIoHttpService','[SyncedState]:\x20received\x20acknowledgement.','onStarting','LOCAL_CACHE_INTERVAL','_schedule','reject','_isEchoedAwaitingChangeset','transformUndoRedo','_handlerCallback','UnitEmbedded','JOIN','onRemoteChangeset','session.join-failed','every','fromCharCode','duration','takeUntil','getUnitId','fetching\x20missing\x20changesets\x20from\x20','min','liveShareNewHost','src','SyncedState','_retryConnectingTimer','m2Prime','_createInitialStateImpl','/object','_unitID','SOCKET_FAILED','/universer-api/oidc/authpage','name','getMemberID','_config','override','FileId','filter','CLOSE_ROOM','getFocusedUnit','not_collab','newCsEvent','add','UniverCollaborationClientPlugin','LocalUndoRedoService','JOIN_ROOM_FULL','toDisposable','_collaborationSessionService','HEARTBEAT_TIMEOUT_KEY','[UniverCollaborationClientPlugin]','eventID','_onOffline','removeMember','localCacheService','send','getRoom','Tools','_eventService','downloadEndpointUrl','_throwTelemetryCollaborationNewChangeset','getActiveSheet','IDLE','has','collaboration-client.auth.needGotoLoginAlert','set','_imageSourceCache','AWAITING','IUniverInstanceService','/block/','[SyncedState]:\x20invalid\x20calling\x20to\x20`resend`.','ISingleActiveUnitService','_clearScheduledTask','CommandType','CollaborationSocketService','DocCollaborationEntity','csShouldRetryEvent','updateOfflineData','UniverNetworkPlugin','sheets','&source=','update','emitEvent','SNAPSHOT_URL_KEY','_queuedRemoteChangesets','_acknowledgedAwaitingRevision','PENDING','location','dispose','complete','roles','onRemoteRetry','find','_commentUpdate$','MUTATION','Inject','RichTextEditingMutation','SheetTransformSelectionsService','SYNCED','_tryReconnect','action','setWaitCount','_onMessage','_collabSessionService','getCurrentUser','__Key__','27408CXcjzy','floor','headers','packageName','_retryCount','_sendHeartbeat','_acknowledgeAwaitingIfReady','onMissingChangesets','getCollabEntity$','x-univer-host','getMember','[AuthServerService]:\x20you\x20should\x20provide\x20authentication\x20info\x20on\x20Node.js.','socket\x20open.','textRanges','getCurrentSelections','_clearRedo','_waitCount','_lockTransition','\x20to\x20','getLocalCacheKey','4448100uQhbTR','DRAWING_IMAGE_ALLOW_IMAGE_LIST','_members$','_emitMembers','DataLoaderService','_clearHeartbeatTimer','POST','setShowComponents','_getLoginPath','[ConflictState]:\x20invalid\x20calling\x20to\x20`resend`.','_scheduleCompleteTimestamp','CollaborationSession','encodeURIComponent','setCfgEnableObjInherit','unsubscribe','csRejEvent','reqId','isPermissionRej','_socketMessageSubscription','disableLocalCache','_executeRemoteChangeset','isTransformChangesetsSuccess','some','list','isInternalEditorID','_getUploadFileURL','NOT_COLLAB','enableAuthServer','_telemetryInfo','createIdentifier','isTransformMutationsWithChangesetSuccess','_getSignURL','[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.','routeKey','registerDependencies','_initRequestHeader','DEFAULT_WS_SESSION_TICKET_URL','telemetry\x20info\x20is\x20not\x20initialized','sequenceExecute','[FetchingMissState]:\x20not\x20expected\x20to\x20receive\x20ack\x20when\x20`this._awaitingChangeset`\x20is\x20null!','_socket$','CollaborationEvent','_handler','_startCollaboration','_onRemoteRetry','UserManagerService','_init','submit\x20changeset\x20error!','encode','ONLINE','_instanceService','patch','UNIVER_COLLABORATION_CLIENT_PLUGIN','listRoles','getAllMembers','7830492kUHiNm','utf8ToBytes','fetch_missing','SheetsSelectionsService','_injector','ThresholdInterceptorFactory','unit','HTTPService','saveSnapshot','socketService','collaboration-client.config','state','values','_maxTotalRetryTimeout','selections','onMutationExecutedForCollab','createSocket','url','transformChangesets','ImageUploadStatusType','enableOfflineEditing','c1Prime','UPDATE_PERMISSION_OBJ','[CollaborationEntity]:\x20cannot\x20apply\x20missing\x20results\x20on\x20other\x20states!','getInterceptPoints','_incrementRevisionNumber','_configService','SUBMIT_CHANGESET','loadUnitOfRevision','requestParams','updatePermissionPoint','INetworkConditionService','awaiting_with_pending','_socketService','resolveWithBasePath','putCollaborators','incrementRevOfUnit','UnitStatus','CHANGESET_REJ','_redoStacks','transformMutationsWithChangeset','mutations','_socket','onRemoteAck','open$','IConfigService','socket\x20close','_univerInstanceService','IPermissionService','_HTTPService','_substituteUndoStack','missingChangesets','_initDependencies','ISocketService','equals','code','transformStack\x20failed!','_transformStack','_remoteChangesetQueue','_singleActiveUnitService','_unlockTransition','_createInitialState','commentUpdateEvent','ReplaySubject','_scheduleCollaborationTimeoutTimer','_onUserJoin','_socketReady','unitID','DependentOn','_collaborationPaused','version','delay','revision','_transformAndApplyRemoteChangeset','indexOf','CombCmd','_clearUndo','_unitInfo$','addImageSourceCache','_joinRoom','INGEST','initWorkbookPermissionChange','This\x20method\x20should\x20not\x20be\x20called\x20on\x20the\x20client\x20side!','_resendWithTimeout','length','batchAllowed','AwaitingWithPendingState','_clearLocalCache','encrypt','userID','_localeService','_handleRemoteChangesets','Plugin','_clearRetryConnectingTimer','[CollaborationSessionService]','LIVESHARE_FETCH_OPERATIONS','onSyncEditingCollabCursor','deleteCollaborator','FileSource','function','map','_transformSelections','/unit/','_initMergeInterceptor','sessionStatus','getResourcesRequest','[CollaborationSocketService]:\x20failed\x20to\x20create\x20socket!','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','DEFAULT_REMOTE_UNISCRIPT_EXECUTION_ENDPOINT','IUndoRedoService','WorkbookEditablePermission','LIVESHARE_OPERATION','getValue','_resendTimeout','_pendingMutations','CollaborationUIEventService','0.25.1','[CollaborationSession]','getGlobalObject','_state$','/universer-api/comb','[FetchMissState]:\x20missing\x20changesets\x20response\x20still\x20has\x20revision\x20gaps.','MemberService','toggleOnline','uniscriptRunEvent','you\x20should\x20override\x20\x22IUndoRedoService\x22\x20provided\x20in\x20\x22core\x22\x20package!','_toggleOffline','BehaviorSubject','createInstance','socket$','save\x20fail\x20reason\x20is\x20','merge','Rectangle','sort','/universer-api/uniscript','editing\x20status\x20changed\x20to','Subject','_snapshotService','[OfflineState]:\x20received\x20changeset.','GLOBAL_ROOMS_CNT_EXCEEDS','_onConflict','39304fSRNFG','_checkMissing','getSheetId','isArray','_stopTelemetryCollaborationNewChangeset','getCollabEntity','PERMISSION_REJ','onRemoteRej','status$','synced','_isPermissionRej','[DataLoaderService]','originalMeta','disposeWithMe','_commentService','InsertSheetMutation','_rescheduleHeartbeat','saveSheetBlock','parseProtocolChangeset','@univerjs-pro/collaboration-client','memberID','parseChangesetToProtocol','reconnect','UNISCRIPT_RUN','_fetchMissChangesets','RxDisposable','/allowed','AWAITING_WITH_PENDING','_localCacheService','PSEUDO_FETCH_MISSING_RESULT','_initUnitPermissionChange','href','_undoStacks','_updateStatus','_decreaseWaiting','USERS_LEAVE','onMissedChangesetFetched','ERROR_IMAGE_TYPE','getCfgEnableObjInherit','getDeserializedSheetBlock','_exhaustRemoteChangesetQueue','UPDATE_CURSOR','Error\x20on\x20receiving\x20event','init','_sendingTimer','getWorkbookSelections','reverse','entries','Injector','_members','getOwnPropertyDescriptor','message$','_registerDependencies','_createHandler','CollaborationEntity','snapshotServerUrl','workbook','OTHER_CLIENT_EDITING','roomInfos','actions','ImageSourceType','deserializeToCombResponse','getTypeOfUnitDisposed$','ICommandService','clear','reduce','_state','_onRecvEvent','decorate','_getAPIPrefixPath','confirm','_sender','_getUndoStack','push','__splitChunk__','getConfig','COMMENT_UPDATE','_commandService','NO_OTHER_CLIENTS_EDITING','joinEvent','delete','CollaborativeUndoRedoService','iterator','get','_sendHeartbeatTimer','text-x','fetchThroughInterceptors','Quantity','_onCombEvent','AwaitingState','symbol','next','JOINING','_httpService','_transformService','[serializeCombRequest]:\x20should\x20not\x20fall\x20into\x20default\x20branch!','getSheetBlock','HEARTBEAT','state$'];_0x4764=function(){return _0x3cb2ef;};return _0x4764();}function te(_0x3c5637,_0x136ecd){const _0x5f54c3=_0x393dbe;if(h(_0x3c5637)!=_0x5f54c3(0x295)||!_0x3c5637)return _0x3c5637;var _0x2e5ad2=_0x3c5637[Symbol[_0x5f54c3(0x2c2)]];if(_0x2e5ad2!==void 0x0){var _0x1dda82=_0x2e5ad2[_0x5f54c3(0x33b)](_0x3c5637,_0x136ecd||_0x5f54c3(0x31e));if(h(_0x1dda82)!=_0x5f54c3(0x295))return _0x1dda82;throw TypeError(_0x5f54c3(0x18d));}return(_0x136ecd===_0x5f54c3(0x229)?String:Number)(_0x3c5637);}function ne(_0xc846d0){const _0x553754=_0x393dbe;var _0x24cbbf=te(_0xc846d0,_0x553754(0x229));return h(_0x24cbbf)==_0x553754(0x209)?_0x24cbbf:_0x24cbbf+'';}function g(_0x23e465,_0x5a30d3,_0x2fdbef){const _0x3c0976=_0x393dbe;return(_0x5a30d3=ne(_0x5a30d3))in _0x23e465?Object[_0x3c0976(0x255)](_0x23e465,_0x5a30d3,{'value':_0x2fdbef,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x23e465[_0x5a30d3]=_0x2fdbef,_0x23e465;}let re=function(_0x35cc14){const _0x120c68=_0x393dbe;return _0x35cc14[_0x120c68(0x1e8)]=_0x120c68(0x1e8),_0x35cc14['PERMISSION_DENIED']=_0x120c68(0x2ae),_0x35cc14[_0x120c68(0x342)]='CONFLICT',_0x35cc14['CLOSE_ROOM']=_0x120c68(0x379),_0x35cc14[_0x120c68(0x25d)]=_0x120c68(0x25d),_0x35cc14[_0x120c68(0x34d)]='SOCKET_FAILED_RETRY',_0x35cc14[_0x120c68(0x371)]=_0x120c68(0x371),_0x35cc14['SUBMIT_CHANGESET_TIMEOUT']=_0x120c68(0x2d5),_0x35cc14;}({});var _=class{constructor(){const _0x9d115e=_0x393dbe;g(this,_0x9d115e(0x32d),new i[(_0x9d115e(0x1aa))]()),g(this,_0x9d115e(0x27e),this[_0x9d115e(0x32d)]['asObservable']());}['emitEvent'](_0x6ef3b6){const _0x2ccf73=_0x393dbe;this[_0x2ccf73(0x32d)][_0x2ccf73(0x20a)](_0x6ef3b6);}},ie=class{constructor(){const _0x475a92=_0x393dbe;g(this,_0x475a92(0x3af),new i[(_0x475a92(0x1aa))]()),g(this,'commentUpdate$',this['_commentUpdate$'][_0x475a92(0x2eb)]());}['onCommentUpdate'](_0x2c4078){this['_commentUpdate$']['next'](_0x2c4078);}};function v(_0x203f3c,_0x4e0f26){return function(_0x3a3aec,_0x48ba20){_0x4e0f26(_0x3a3aec,_0x48ba20,_0x203f3c);};}function y(_0x5d047f,_0x1a94e9,_0x155548,_0x3fcb8d){const _0x2b01d7=_0x393dbe;var _0x273fe3=arguments[_0x2b01d7(0x176)],_0x2de8dd=_0x273fe3<0x3?_0x1a94e9:_0x3fcb8d===null?_0x3fcb8d=Object[_0x2b01d7(0x1e1)](_0x1a94e9,_0x155548):_0x3fcb8d,_0x185ba7;if(typeof Reflect==_0x2b01d7(0x295)&&typeof Reflect[_0x2b01d7(0x1f3)]==_0x2b01d7(0x185))_0x2de8dd=Reflect[_0x2b01d7(0x1f3)](_0x5d047f,_0x1a94e9,_0x155548,_0x3fcb8d);else{for(var _0x2a8c49=_0x5d047f[_0x2b01d7(0x176)]-0x1;_0x2a8c49>=0x0;_0x2a8c49--)(_0x185ba7=_0x5d047f[_0x2a8c49])&&(_0x2de8dd=(_0x273fe3<0x3?_0x185ba7(_0x2de8dd):_0x273fe3>0x3?_0x185ba7(_0x1a94e9,_0x155548,_0x2de8dd):_0x185ba7(_0x1a94e9,_0x155548))||_0x2de8dd);}return _0x273fe3>0x3&&_0x2de8dd&&Object[_0x2b01d7(0x255)](_0x1a94e9,_0x155548,_0x2de8dd),_0x2de8dd;}let b=class extends t[_0x393dbe(0x2fd)]{constructor(_0x12dfb5,_0x232767){const _0x58ee86=_0x393dbe;super(),this[_0x58ee86(0x151)]=_0x12dfb5,this[_0x58ee86(0x316)]=_0x232767,g(this,_0x58ee86(0x25b),new Map()),g(this,'_roomCreated$',new i['Subject']()),this[_0x58ee86(0x1bc)]((0x0,i[_0x58ee86(0x1a5)])(this[_0x58ee86(0x151)][_0x58ee86(0x1ed)](t['UniverInstanceType']['UNIVER_SHEET'])[_0x58ee86(0x297)]((0x0,s[_0x58ee86(0x186)])(_0x3a8afd=>_0x3a8afd[_0x58ee86(0x366)]())),this[_0x58ee86(0x151)][_0x58ee86(0x1ed)](t[_0x58ee86(0x2db)][_0x58ee86(0x2fa)])[_0x58ee86(0x297)]((0x0,s[_0x58ee86(0x186)])(_0x1c2843=>_0x1c2843[_0x58ee86(0x366)]())))[_0x58ee86(0x246)](_0x5db193=>this[_0x58ee86(0x2c7)](_0x5db193)));}[_0x393dbe(0x288)](_0x2b71f0){const _0x148e6f=_0x393dbe;return this[_0x148e6f(0x25b)]['has'](_0x2b71f0)?(0x0,i['of'])(this[_0x148e6f(0x25b)][_0x148e6f(0x202)](_0x2b71f0)):this[_0x148e6f(0x2d0)][_0x148e6f(0x297)]((0x0,s[_0x148e6f(0x186)])(_0x2bc314=>{if(_0x2bc314===_0x2b71f0)return this['_roomMembers']['get'](_0x2bc314);}));}['setCurrentUser'](_0x476cce){const _0x106b90=_0x393dbe;this[_0x106b90(0x316)]['setCurrentUser'](_0x476cce);}[_0x393dbe(0x3ba)](){return this['_userManagerService']['getCurrentUser']();}[_0x393dbe(0x2f1)](_0x1b170d,_0x41a9ce){const _0x1eec70=_0x393dbe;let _0x42cb8d=this['_roomMembers'][_0x1eec70(0x202)](_0x1b170d);_0x42cb8d||(_0x42cb8d=new ae(),this[_0x1eec70(0x25b)][_0x1eec70(0x393)](_0x1b170d,_0x42cb8d),this[_0x1eec70(0x2d0)]['next'](_0x1b170d)),_0x42cb8d['updateMember'](_0x41a9ce);}[_0x393dbe(0x387)](_0x54a998,_0x3da47b){const _0x59c12e=_0x393dbe;let _0x1a90d0=this['_roomMembers'][_0x59c12e(0x202)](_0x54a998);_0x1a90d0&&_0x1a90d0[_0x59c12e(0x387)](_0x3da47b);}[_0x393dbe(0x38a)](_0xa1dacb){const _0x425dcc=_0x393dbe;return this[_0x425dcc(0x25b)][_0x425dcc(0x202)](_0xa1dacb);}[_0x393dbe(0xe1)](_0x286636,_0x30919a){const _0x1b46f8=_0x393dbe;let _0x2cdeca=this[_0x1b46f8(0x25b)][_0x1b46f8(0x202)](_0x286636);if(_0x2cdeca)return _0x2cdeca[_0x1b46f8(0xe1)](_0x30919a);}[_0x393dbe(0x2c7)](_0x598684){const _0x2c42bb=_0x393dbe;let _0x36bf23=this['_roomMembers'][_0x2c42bb(0x202)](_0x598684);_0x36bf23&&(_0x36bf23[_0x2c42bb(0x3aa)](),this[_0x2c42bb(0x25b)]['delete'](_0x598684));}['dispose'](){const _0x35f51e=_0x393dbe;this[_0x35f51e(0x25b)][_0x35f51e(0x26a)](_0x543aae=>_0x543aae['dispose']()),this[_0x35f51e(0x25b)][_0x35f51e(0x1ef)](),this[_0x35f51e(0x2d0)][_0x35f51e(0x3ab)]();}};b=y([v(0x0,t[_0x393dbe(0x396)]),v(0x1,(0x0,t[_0x393dbe(0x3b1)])(t[_0x393dbe(0x118)]))],b);var ae=class extends t[_0x393dbe(0x2fd)]{constructor(..._0x2e1a86){const _0x3e8289=_0x393dbe;super(..._0x2e1a86),g(this,_0x3e8289(0x1e0),new Map()),g(this,_0x3e8289(0xed),new i['BehaviorSubject'](this[_0x3e8289(0x1e0)])),g(this,_0x3e8289(0x21b),this[_0x3e8289(0xed)][_0x3e8289(0x2eb)]());}[_0x393dbe(0x3aa)](){const _0x258d22=_0x393dbe;this[_0x258d22(0x1e0)]['clear'](),this[_0x258d22(0xed)][_0x258d22(0x3ab)]();}[_0x393dbe(0x2f1)](_0xda8600){const _0xbcbe4d=_0x393dbe;this[_0xbcbe4d(0x1e0)][_0xbcbe4d(0x393)](_0xda8600[_0xbcbe4d(0x1c3)],_0xda8600),this[_0xbcbe4d(0xee)]();}[_0x393dbe(0x387)](_0x4d0cb5){const _0x381364=_0x393dbe;this[_0x381364(0x1e0)][_0x381364(0x1ff)](_0x4d0cb5),this[_0x381364(0xee)]();}['getMember'](_0x249e22){const _0x54f2f5=_0x393dbe;return this[_0x54f2f5(0x1e0)][_0x54f2f5(0x202)](_0x249e22);}[_0x393dbe(0x121)](){const _0x22eea1=_0x393dbe;return Array[_0x22eea1(0x24a)](this[_0x22eea1(0x1e0)][_0x22eea1(0x12e)]());}[_0x393dbe(0xee)](){const _0x21a103=_0x393dbe;this['_members$']['next'](this[_0x21a103(0x1e0)]);}};let oe=function(_0x2db60f){const _0xbd1d16=_0x393dbe;return _0x2db60f[_0x2db60f[_0xbd1d16(0x390)]=0x0]=_0xbd1d16(0x390),_0x2db60f[_0x2db60f[_0xbd1d16(0x20b)]=0x1]=_0xbd1d16(0x20b),_0x2db60f[_0x2db60f['OFFLINE']=0x2]=_0xbd1d16(0x2a9),_0x2db60f[_0x2db60f['ONLINE']=0x3]=_0xbd1d16(0x11c),_0x2db60f;}({});const se={[a[_0x393dbe(0x33e)]['FAIL']]:_0x393dbe(0x361),[a[_0x393dbe(0x33e)][_0x393dbe(0x380)]]:_0x393dbe(0x279),[a[_0x393dbe(0x33e)]['JOIN_ROOM_NOT_EXISTS']]:'session.room-not-exists',[a[_0x393dbe(0x33e)][_0x393dbe(0x245)]]:_0x393dbe(0x227),[a[_0x393dbe(0x33e)][_0x393dbe(0x1ad)]]:_0x393dbe(0x346)};let x=class extends t[_0x393dbe(0x1c8)]{get[_0x393dbe(0x18a)](){const _0x2ca1ee=_0x393dbe;return this[_0x2ca1ee(0x331)][_0x2ca1ee(0x192)]();}constructor(_0xfbd76,_0xb3da02,_0x4f82de,_0x56b56b,_0xf2c75f,_0x1418e6,_0x239484,_0x2510a1){const _0x19711d=_0x393dbe;super(),this[_0x19711d(0x370)]=_0xfbd76,this['_logService']=_0x4f82de,this[_0x19711d(0x13c)]=_0x56b56b,this['_memberService']=_0xf2c75f,this[_0x19711d(0x1bd)]=_0x1418e6,this[_0x19711d(0x2b6)]=_0x239484,this[_0x19711d(0x306)]=_0x2510a1,g(this,_0x19711d(0x331),new i[(_0x19711d(0x1a1))](0x0)),g(this,_0x19711d(0x260),this['_sessionStatus$'][_0x19711d(0x2eb)]()),g(this,_0x19711d(0x32d),new i['Subject']()),g(this,_0x19711d(0x27e),this[_0x19711d(0x32d)][_0x19711d(0x2eb)]()),g(this,_0x19711d(0x14c),void 0x0),g(this,_0x19711d(0xfd),void 0x0),g(this,_0x19711d(0x28e),void 0x0),g(this,'_shouldReportTelemetry',!0x1),g(this,_0x19711d(0x107),null),this[_0x19711d(0x272)]=!!this[_0x19711d(0x306)],_0xb3da02[_0x19711d(0x297)]((0x0,i[_0x19711d(0x365)])(this[_0x19711d(0x33d)]))[_0x19711d(0x246)](_0x555c49=>{const _0x32cdc0=_0x19711d;if(_0x555c49!==void 0x0){if(this[_0x32cdc0(0x14c)]=_0x555c49,_0x555c49)this[_0x32cdc0(0x171)](_0x555c49),this[_0x32cdc0(0xfd)]=_0x555c49['message$'][_0x32cdc0(0x246)](_0x1f6243=>{const _0xefd9c0=_0x32cdc0;_0x1f6243[_0xefd9c0(0x10c)]===this[_0xefd9c0(0x370)]&&this[_0xefd9c0(0x207)](_0x1f6243);});else{var _0x28ad77;this[_0x32cdc0(0x38e)](),this[_0x32cdc0(0x331)][_0x32cdc0(0x20a)](0x2),(_0x28ad77=this['_socketMessageSubscription'])==null||_0x28ad77[_0x32cdc0(0xf9)](),this['_socketMessageSubscription']=null;}}});}[_0x393dbe(0x374)](){const _0x1cace7=_0x393dbe;var _0x51ac70,_0x580265;return(_0x51ac70=(_0x580265=this[_0x1cace7(0x14c)])==null?void 0x0:_0x580265[_0x1cace7(0x1c3)])==null?null:_0x51ac70;}[_0x393dbe(0x3aa)](){const _0x5495e1=_0x393dbe;super[_0x5495e1(0x3aa)](),this[_0x5495e1(0x24b)](),this[_0x5495e1(0x33d)][_0x5495e1(0x20a)](),this[_0x5495e1(0x33d)][_0x5495e1(0x3ab)]();}[_0x393dbe(0x24b)](){const _0x2b9070=_0x393dbe;var _0x590bc7,_0x30f017;this['_throwTelemetryCollaborationNewChangeset'](),(_0x590bc7=this[_0x2b9070(0x14c)])==null||_0x590bc7[_0x2b9070(0x389)]({'cmd':a[_0x2b9070(0x16d)][_0x2b9070(0x294)],'data':{'roomID':this[_0x2b9070(0x370)]}}),(_0x30f017=this[_0x2b9070(0x14c)])==null||_0x30f017[_0x2b9070(0x24b)](),this[_0x2b9070(0x32d)][_0x2b9070(0x3ab)](),this[_0x2b9070(0x331)][_0x2b9070(0x3ab)]();}[_0x393dbe(0x207)](_0x4d0ba9){const _0x553c11=_0x393dbe;_0x4d0ba9[_0x553c11(0x2d7)]===a['CombCmd'][_0x553c11(0x35f)]?this[_0x553c11(0x25e)](_0x4d0ba9):_0x4d0ba9[_0x553c11(0x2d7)]===a['CombCmd'][_0x553c11(0x230)]&&this[_0x553c11(0x1f2)](_0x4d0ba9);}[_0x393dbe(0x171)](_0x37d49b){const _0xcf5601=_0x393dbe;this[_0xcf5601(0x331)][_0xcf5601(0x20a)](0x1),_0x37d49b[_0xcf5601(0x389)]({'cmd':a[_0xcf5601(0x16d)][_0xcf5601(0x35f)],'routeKey':this[_0xcf5601(0x370)],'routeType':'','data':{'rooms':[{'roomID':this[_0xcf5601(0x370)]}]}});}[_0x393dbe(0x25e)](_0x1946b4){const _0x1fbf92=_0x393dbe;var _0x165d59;if(_0x1946b4['code']in se){this[_0x1fbf92(0x2b6)][_0x1fbf92(0x3a4)]({'id':_0x1fbf92(0x25d),'data':se[_0x1946b4[_0x1fbf92(0x159)]]}),this['_sessionStatus$']['next'](0x2);return;}this[_0x1fbf92(0x331)][_0x1fbf92(0x20a)](0x3);let _0x5e7770=(_0x165d59=_0x1946b4[_0x1fbf92(0x240)][_0x1fbf92(0x1e9)][this['_unitID']])==null?void 0x0:_0x165d59['members'];_0x5e7770&&_0x5e7770[_0x1fbf92(0x26a)](_0x371b8c=>this[_0x1fbf92(0x23d)][_0x1fbf92(0x2f1)](this[_0x1fbf92(0x370)],_0x371b8c));}[_0x393dbe(0x1f2)](_0x1984a7){const _0x57fbee=_0x393dbe;try{let _0xc2ed8b=_0x1984a7[_0x57fbee(0x240)];switch(_0xc2ed8b[_0x57fbee(0x385)]){case e[_0x57fbee(0x114)][_0x57fbee(0x2f3)]:this[_0x57fbee(0x163)](_0xc2ed8b),this[_0x57fbee(0x32d)][_0x57fbee(0x20a)](_0xc2ed8b);break;case e['CollaborationEvent']['USERS_LEAVE']:this[_0x57fbee(0x225)](_0xc2ed8b),this[_0x57fbee(0x32d)][_0x57fbee(0x20a)](_0xc2ed8b);break;case e[_0x57fbee(0x114)]['CHANGESET_ACK']:case e[_0x57fbee(0x114)][_0x57fbee(0x2a7)]:this[_0x57fbee(0x1b3)](),this[_0x57fbee(0x337)](),this[_0x57fbee(0x32d)]['next'](_0xc2ed8b);break;case e[_0x57fbee(0x114)]['MSG_FOR_ERROR']:this[_0x57fbee(0x253)][_0x57fbee(0x23f)](_0x57fbee(0x1a4)+JSON['stringify'](_0xc2ed8b)),this['_event$'][_0x57fbee(0x20a)](_0xc2ed8b);break;case e[_0x57fbee(0x114)][_0x57fbee(0x1fb)]:this['_commentService'][_0x57fbee(0x264)](_0xc2ed8b[_0x57fbee(0x240)]),this['_event$'][_0x57fbee(0x20a)](_0xc2ed8b);break;default:this[_0x57fbee(0x32d)][_0x57fbee(0x20a)](_0xc2ed8b);}}catch(_0x11453b){this[_0x57fbee(0x253)]['error'](_0x11453b,_0x1984a7);}}[_0x393dbe(0x163)](_0x57b63b){const _0x5590d1=_0x393dbe;this['_memberService'][_0x5590d1(0x2f1)](this['_unitID'],_0x57b63b[_0x5590d1(0x240)]);}[_0x393dbe(0x225)](_0x433c14){const _0x2bb3e7=_0x393dbe;this[_0x2bb3e7(0x23d)][_0x2bb3e7(0x387)](this[_0x2bb3e7(0x370)],_0x433c14[_0x2bb3e7(0x240)][_0x2bb3e7(0x1c3)]);}async['send'](_0x14bdaf,_0x2ac845){const _0x568a88=_0x393dbe;if(this['sessionStatus']!==0x3||!this[_0x568a88(0x14c)])throw Error('[CollaborationSession]:\x20should\x20not\x20send\x20message\x20when\x20the\x20session\x20is\x20offline!');try{_0x14bdaf[_0x568a88(0x385)]===e[_0x568a88(0x114)][_0x568a88(0x13d)]&&(this['_scheduleCollaborationTimeoutTimer'](),this[_0x568a88(0x23b)](_0x14bdaf)),this[_0x568a88(0x14c)][_0x568a88(0x389)]({'cmd':a['CombCmd'][_0x568a88(0x172)],'routeKey':_0x2ac845,'routeType':'','data':_0x14bdaf});}catch(_0x24a72f){this[_0x568a88(0x253)]['error'](_0x24a72f);}}[_0x393dbe(0x162)](){const _0x4966fa=_0x393dbe;var _0x2bf70b;this[_0x4966fa(0x28e)]=setTimeout(()=>{const _0x1fe1ca=_0x4966fa;this['_collaborationTimeoutTimer']=null,this[_0x1fe1ca(0x2b6)][_0x1fe1ca(0x3a4)]({'id':_0x1fe1ca(0x2d5)});},(_0x2bf70b=this[_0x4966fa(0x13c)][_0x4966fa(0x1fa)](_0x4966fa(0x338)))==null?m:_0x2bf70b);}[_0x393dbe(0x337)](){const _0x3c8515=_0x393dbe;this[_0x3c8515(0x28e)]&&(clearTimeout(this[_0x3c8515(0x28e)]),this[_0x3c8515(0x28e)]=null);}[_0x393dbe(0x23b)](_0xddb9dc){const _0x2d49b7=_0x393dbe;if(!this[_0x2d49b7(0x272)])return;let {data:_0x35313c}=_0xddb9dc,{unitID:_0x4209c3,changeset:_0x3b754c}=_0x35313c,{mutations:_0x402a20,type:_0x26368c}=_0x3b754c;this[_0x2d49b7(0x107)]={'unitId':_0x4209c3,'type':_0x26368c,'startTime':performance['now'](),'stopTime':0x0,'duration':0x0,'size':ee(_0x402a20)};}[_0x393dbe(0x1b3)](){const _0x462af2=_0x393dbe;if(this[_0x462af2(0x272)]){if(!this['_telemetryInfo']){this[_0x462af2(0x253)]['error'](_0x462af2(0x197),_0x462af2(0x110));return;}this[_0x462af2(0x107)][_0x462af2(0x333)]=performance[_0x462af2(0x22d)](),this['_telemetryInfo'][_0x462af2(0x364)]=this[_0x462af2(0x107)][_0x462af2(0x333)]-this[_0x462af2(0x107)][_0x462af2(0x23e)],this[_0x462af2(0x306)][_0x462af2(0x347)]('collaboration_new_changeset',this[_0x462af2(0x107)]),this[_0x462af2(0x107)]=null;}}['_throwTelemetryCollaborationNewChangeset'](){const _0x5c9c59=_0x393dbe;this[_0x5c9c59(0x107)]=null;}};x=y([v(0x2,t[_0x393dbe(0x351)]),v(0x3,t[_0x393dbe(0x14f)]),v(0x4,(0x0,t[_0x393dbe(0x3b1)])(b)),v(0x5,(0x0,t[_0x393dbe(0x3b1)])(ie)),v(0x6,(0x0,t[_0x393dbe(0x3b1)])(_)),v(0x7,(0x0,t['Optional'])(o[_0x393dbe(0x34f)]))],x);const S=(0x0,t[_0x393dbe(0x108)])(_0x393dbe(0x309));function ce(_0x68b054){const _0x53c91e=_0x393dbe;return _0x53c91e(0x2d3)+_0x68b054;}function le(_0x275fdf){const _0x456e12=_0x393dbe;let {unitID:_0x4209cf,mutations:_0x11726a}=_0x275fdf;return{'unitId':_0x4209cf,'subUnitId':_0x11726a[_0x456e12(0x176)]>0x0?_0x11726a[0x0][_0x456e12(0x25f)][_0x456e12(0x274)]:null};}let C=class{constructor(_0x4ead04,_0x39dceb,_0x4f7f00){const _0x34906d=_0x393dbe;this['_injector']=_0x4ead04,this[_0x34906d(0x20d)]=_0x39dceb,this[_0x34906d(0x11d)]=_0x4f7f00;}[_0x393dbe(0x273)](_0x245176){const _0x2a99f6=_0x393dbe;var _0x21cc4a,_0x23aff3;let _0x509e13=this['_injector']['get'](r[_0x2a99f6(0x125)]),{unitId:_0x582146,subUnitId:_0x20f8ce}=le(_0x245176),_0x1448d9=_0x509e13==null?void 0x0:_0x509e13[_0x2a99f6(0x1dc)](_0x582146)[_0x2a99f6(0xe5)](),_0x16e00e=(_0x21cc4a=this[_0x2a99f6(0x11d)][_0x2a99f6(0x285)](_0x582146))==null||(_0x21cc4a=_0x21cc4a[_0x2a99f6(0x38f)]())==null?void 0x0:_0x21cc4a[_0x2a99f6(0x1b1)]();if(_0x1448d9['length']===0x0||!_0x582146||!_0x20f8ce)return;let _0x1533fa=[{'id':r['SetSelectionsOperation']['id'],'params':{'unitId':_0x582146,'subUnitId':_0x16e00e,'selections':t[_0x2a99f6(0x38b)][_0x2a99f6(0x2fb)](_0x1448d9)}}],_0x238743=this[_0x2a99f6(0x20d)][_0x2a99f6(0x14a)](_0x245176,_0x1533fa);if(!(0x0,e[_0x2a99f6(0x109)])(_0x238743))throw _0x238743[_0x2a99f6(0x23f)];let _0x2c9898=(_0x23aff3=_0x238743[_0x2a99f6(0x36d)][0x0])==null||(_0x23aff3=_0x23aff3[_0x2a99f6(0x25f)])==null?void 0x0:_0x23aff3[_0x2a99f6(0x130)];if(Array[_0x2a99f6(0x1b2)](_0x2c9898)&&_0x2c9898[_0x2a99f6(0x176)]){if(_0x2c9898[_0x2a99f6(0x176)]===_0x1533fa[0x0][_0x2a99f6(0x25f)][_0x2a99f6(0x130)][_0x2a99f6(0x176)]&&_0x2c9898[_0x2a99f6(0x362)]((_0x22db63,_0x29bce3)=>t[_0x2a99f6(0x1a6)][_0x2a99f6(0x158)](_0x22db63[_0x2a99f6(0x247)],_0x1533fa[0x0]['params'][_0x2a99f6(0x130)][_0x29bce3]['range'])))return;this[_0x2a99f6(0x126)][_0x2a99f6(0x202)](t['ICommandService'])['executeCommand'](r[_0x2a99f6(0x234)]['id'],{'unitId':_0x582146,'subUnitId':_0x16e00e,'selections':_0x2c9898});}}};C=y([v(0x0,(0x0,t['Inject'])(t[_0x393dbe(0x1df)])),v(0x1,e[_0x393dbe(0x268)]),v(0x2,t[_0x393dbe(0x396)])],C);const w=(0x0,t['createIdentifier'])('univer-pro.collaboration-client.single-active-unit-service');let ue=function(_0x242a58){const _0x6fe927=_0x393dbe;return _0x242a58[_0x242a58[_0x6fe927(0x1fd)]=0x0]='NO_OTHER_CLIENTS_EDITING',_0x242a58[_0x242a58[_0x6fe927(0x239)]=0x1]=_0x6fe927(0x239),_0x242a58;}({});const T=_0x393dbe(0x12c),de={};function fe(_0x573890){const _0x12cfab=_0x393dbe;var _0x56e9fb;return!!((_0x56e9fb=_0x573890[_0x12cfab(0x25f)])!=null&&_0x56e9fb[_0x12cfab(0x1f9)]);}const pe=new Set([r[_0x393dbe(0x1be)]['id']]);function me(_0x9329a5,_0x3d5f22,_0x1c67af,_0x4bc54a,_0x48306c){const _0x20f936=_0x393dbe;var _0x203f4e,_0x591ff3,_0x182ac9,_0x3ba4c6;let _0xb613e4=[];for(let _0xae8823 of _0x9329a5){if(pe[_0x20f936(0x391)](_0xae8823['id'])){if(_0xb613e4['length']>0x0)break;_0xb613e4[_0x20f936(0x1f8)](_0xae8823);break;}if(fe(_0xae8823)){if(_0xb613e4['length']>0x0)break;_0xb613e4[_0x20f936(0x1f8)](_0xae8823);break;}_0xb613e4[_0x20f936(0x1f8)](_0xae8823);}let _0x24616b=(_0x203f4e=(_0x591ff3=_0x48306c[_0x20f936(0x3ba)]())==null?void 0x0:_0x591ff3['userID'])==null?_0x20f936(0x231):_0x203f4e,_0x14c94b=(_0x182ac9=(_0x3ba4c6=_0x48306c[_0x20f936(0x3ba)]())==null?void 0x0:_0x3ba4c6[_0x20f936(0x1c3)])==null?'unknown':_0x182ac9;return{'changeset':{'unitID':_0x3d5f22,'type':(0x0,e[_0x20f936(0x2ce)])(_0x1c67af[_0x20f936(0x29b)](_0x3d5f22)),'baseRev':_0x4bc54a[_0x20f936(0x2bf)](_0x3d5f22),'revision':0x0,'userID':_0x24616b,'memberID':_0x14c94b,'mutations':_0xb613e4},'pendingMutations':_0x9329a5['slice'](_0xb613e4[_0x20f936(0x176)])};}function he(_0x846103,_0x40f03b,_0x503f34,_0x2535a2,_0x21de87){const _0x432cc0=_0x393dbe;var _0x528907,_0x359f52,_0x417e7a,_0x20d86a;let _0x24ffad=_0x846103[_0x432cc0(0x1f0)]((_0x5cd520,_0x19fe60)=>{const _0x43e2d0=_0x432cc0;let _0x3bf28e=_0x5cd520[_0x5cd520[_0x43e2d0(0x176)]-0x1],{id:_0x2823d9}=_0x3bf28e==null?{}:_0x3bf28e,{id:_0x196cff,type:_0x4e8196}=_0x19fe60,_0x32d3c9=_0x19fe60['params'];if(_0x2823d9&&_0x2823d9!==_0x196cff)throw Error('Cannot\x20assemble\x20a\x20changeset\x20from\x20multiple\x20mutations\x20of\x20different\x20types:\x20'+_0x2823d9+_0x43e2d0(0x280)+_0x196cff+'.');if(!_0x3bf28e)return[{'id':_0x196cff,'type':_0x4e8196,'params':{'unitId':_0x32d3c9[_0x43e2d0(0x257)],'textRanges':_0x32d3c9['textRanges'],'actions':_0x32d3c9['actions']}}];let _0x52c6cd=_0x3bf28e['params'];return ge(_0x52c6cd['actions'],_0x32d3c9[_0x43e2d0(0x1ea)])?[..._0x5cd520[_0x43e2d0(0x2a3)](0x0,-0x1),{..._0x3bf28e,'id':_0x196cff,'type':_0x4e8196,'params':{'unitId':_0x32d3c9['unitId'],'textRanges':_0x32d3c9[_0x43e2d0(0xe4)],'actions':t['JSONX']['compose'](_0x52c6cd[_0x43e2d0(0x1ea)],_0x32d3c9['actions'])}}]:[..._0x5cd520,{'id':_0x196cff,'type':_0x4e8196,'params':{'unitId':_0x32d3c9['unitId'],'textRanges':_0x32d3c9[_0x43e2d0(0xe4)],'actions':_0x32d3c9[_0x43e2d0(0x1ea)]}}];},[]),_0x54ff30=(_0x528907=(_0x359f52=_0x21de87[_0x432cc0(0x3ba)]())==null?void 0x0:_0x359f52[_0x432cc0(0x17b)])==null?'unknown':_0x528907,_0x148a3f=(_0x417e7a=(_0x20d86a=_0x21de87[_0x432cc0(0x3ba)]())==null?void 0x0:_0x20d86a[_0x432cc0(0x1c3)])==null?'unknown':_0x417e7a;return{'changeset':{'unitID':_0x40f03b,'type':(0x0,e[_0x432cc0(0x2ce)])(_0x503f34[_0x432cc0(0x29b)](_0x40f03b)),'baseRev':_0x2535a2[_0x432cc0(0x2bf)](_0x40f03b),'revision':0x0,'userID':_0x54ff30,'memberID':_0x148a3f,'mutations':_0x24ffad},'pendingMutations':_0x846103['slice'](_0x846103['length'])};}function ge(_0x11094d,_0x509a20){return!(_e(_0x11094d)&&ve(_0x509a20)||ve(_0x11094d)&&_e(_0x509a20));}function _e(_0x561097){const _0x42290f=_0x393dbe;return ye(_0x561097)[_0x42290f(0x101)](_0x282925=>be(_0x282925)&&_0x282925['et']===_0x42290f(0x204));}function ve(_0x11e1ca){const _0x26e46e=_0x393dbe;return ye(_0x11e1ca)[_0x26e46e(0x101)](_0x587aa1=>Array[_0x26e46e(0x1b2)](_0x587aa1)||typeof _0x587aa1=='string'||typeof _0x587aa1=='number');}function ye(_0x5ade50){const _0x227d92=_0x393dbe;if(!Array[_0x227d92(0x1b2)](_0x5ade50))return[];let _0x22c9c8=_0x5ade50[_0x227d92(0x2ba)](_0x227d92(0x2f8))?_0x5ade50:_0x5ade50[_0x227d92(0x3ae)](_0x2eb9eb=>Array[_0x227d92(0x1b2)](_0x2eb9eb)&&_0x2eb9eb[_0x227d92(0x2ba)](_0x227d92(0x2f8)));if(!Array[_0x227d92(0x1b2)](_0x22c9c8))return[];let _0x41e109=_0x22c9c8[_0x227d92(0x16c)](_0x227d92(0x2f8));return _0x41e109===-0x1?[]:_0x22c9c8[_0x227d92(0x2a3)](_0x41e109+0x1);}function _0x4ff9(_0x4664af,_0x17ac46){_0x4664af=_0x4664af-0xdb;const _0x4764bc=_0x4764();let _0x4ff9f5=_0x4764bc[_0x4664af];return _0x4ff9f5;}function be(_0x4234f7){const _0x34aeac=_0x393dbe;return typeof _0x4234f7==_0x34aeac(0x295)&&!!_0x4234f7&&!Array[_0x34aeac(0x1b2)](_0x4234f7);}function xe(_0x3bffd2,_0x2732b9){const _0x14e986=_0x393dbe;let _0xaacb18=new i[(_0x14e986(0x161))](0x1);return setTimeout(()=>_0xaacb18[_0x14e986(0x20a)](_0x2732b9),_0x3bffd2),_0xaacb18[_0x14e986(0x2eb)]()[_0x14e986(0x297)]((0x0,i[_0x14e986(0x281)])(0x1));}var E,D,O;let Se=function(_0x2f4173){const _0x2cb060=_0x393dbe;return _0x2f4173[_0x2cb060(0x105)]=_0x2cb060(0x37b),_0x2f4173[_0x2cb060(0x3b4)]=_0x2cb060(0x1b8),_0x2f4173[_0x2cb060(0x3a8)]=_0x2cb060(0x2b0),_0x2f4173[_0x2cb060(0x395)]='awaiting',_0x2f4173[_0x2cb060(0x1ca)]=_0x2cb060(0x142),_0x2f4173['FETCH_MISS']=_0x2cb060(0x124),_0x2f4173[_0x2cb060(0x342)]='conflict',_0x2f4173['OFFLINE']='offline',_0x2f4173;}({});const Ce=0x4e20,we=0x2bf20;var k=class{constructor(_0x58e67d,_0x6bf3ec,_0x557d02,_0x4a7d23,_0x113b60,_0x51dd3e,_0x206a93,_0x20a967,_0x3a670d){const _0x4505f0=_0x393dbe;this[_0x4505f0(0x165)]=_0x58e67d,this[_0x4505f0(0x353)]=_0x6bf3ec,this[_0x4505f0(0x115)]=_0x113b60,this[_0x4505f0(0x1fc)]=_0x51dd3e,this[_0x4505f0(0x317)]=_0x206a93,this[_0x4505f0(0x292)]=_0x20a967,this[_0x4505f0(0x1cb)]=_0x3a670d,g(this,'_awaitingChangeset',null),g(this,_0x4505f0(0x194),[]),this[_0x4505f0(0x28b)]=_0x557d02,this['_pendingMutations']=_0x4a7d23;}[_0x393dbe(0x1b0)](_0x18b3f7){const _0x18105b=_0x393dbe;let _0x40b25a=this['_revisionService'][_0x18105b(0x2bf)](this[_0x18105b(0x165)]);return _0x18b3f7[_0x18105b(0x16a)]>_0x40b25a+0x1?(this['_handler'][_0x18105b(0xde)]({'from':_0x40b25a,'to':_0x18b3f7[_0x18105b(0x16a)]-0x1}),!0x0):!0x1;}[_0x393dbe(0x31b)](_0x54ca39){const _0x1c6d15=_0x393dbe;this[_0x1c6d15(0x317)][_0x1c6d15(0x35c)](this['unitID'],_0x54ca39);}[_0x393dbe(0x187)](_0x7a5748){const _0x32163a=_0x393dbe;var _0x1f08a4,_0x318d0e;(_0x1f08a4=(_0x318d0e=this[_0x32163a(0x115)])[_0x32163a(0x32b)])==null||_0x1f08a4['call'](_0x318d0e,_0x7a5748);}['_transformIMECache'](_0x9b016){const _0x29e229=_0x393dbe;var _0x5f38dd,_0xcf026e;return(_0x5f38dd=(_0xcf026e=this[_0x29e229(0x115)])[_0x29e229(0x270)])==null?void 0x0:_0x5f38dd['call'](_0xcf026e,_0x9b016);}[_0x393dbe(0x33a)](_0x49b480){const _0x3865b1=_0x393dbe;var _0x12d1f6,_0x20dbe8;return(_0x12d1f6=(_0x20dbe8=this[_0x3865b1(0x115)])[_0x3865b1(0x28c)])==null?void 0x0:_0x12d1f6['call'](_0x20dbe8,_0x49b480);}['_transformRemoteChangesetByIMECache'](_0x30bd56){const _0x19dcee=_0x393dbe;var _0x560218,_0x56a505,_0xc4f6f2;return(_0x560218=(_0x56a505=(_0xc4f6f2=this['_handler'])[_0x19dcee(0x2d6)])==null?void 0x0:_0x56a505[_0x19dcee(0x33b)](_0xc4f6f2,_0x30bd56))==null?_0x30bd56:_0x560218;}[_0x393dbe(0x22a)](_0x43fd17){const _0x4a2eff=_0x393dbe;var _0x22cfb3,_0x1f78b3,_0xeb6f67;return(_0x22cfb3=(_0x1f78b3=(_0xeb6f67=this[_0x4a2eff(0x115)])[_0x4a2eff(0x23c)])==null?void 0x0:_0x1f78b3['call'](_0xeb6f67,_0x43fd17))==null?_0x43fd17:_0x22cfb3;}['_syncEditingCollabCursor'](_0x53b143){const _0xdb5f82=_0x393dbe;if(this[_0xdb5f82(0x353)]===t['UniverInstanceType'][_0xdb5f82(0x2fa)]){let {unitID:_0x3d7563,mutations:_0x3fcf2d,memberID:_0x207492}=_0x53b143,_0x28f21e=_0x3fcf2d['length']>0x0?_0x3fcf2d[0x0][_0xdb5f82(0x25f)][_0xdb5f82(0xe4)]:[];if(Array[_0xdb5f82(0x1b2)](_0x28f21e)&&_0x28f21e['length']>0x0){var _0x3372c1,_0x5d4529;(_0x3372c1=(_0x5d4529=this[_0xdb5f82(0x115)])[_0xdb5f82(0x182)])==null||_0x3372c1[_0xdb5f82(0x33b)](_0x5d4529,{'unitID':_0x3d7563,'memberID':_0x207492,'textRanges':_0x28f21e});}}}['_updateLocalCache'](){const _0x2b85d5=_0x393dbe;var _0x233085;(_0x233085=this[_0x2b85d5(0x1cb)])==null||_0x233085[_0x2b85d5(0x39f)](this[_0x2b85d5(0x165)],this[_0x2b85d5(0x353)],this['_awaitingChangeset'],this[_0x2b85d5(0x194)]);}[_0x393dbe(0x34b)](){const _0x218588=_0x393dbe;return this[_0x218588(0x292)][_0x218588(0x2bf)](this[_0x218588(0x165)]);}['_incrementRevisionNumber'](){const _0x4d907e=_0x393dbe;this['_revisionService'][_0x4d907e(0x146)](this['unitID']);}[_0x393dbe(0xff)](_0x16b431){const _0x450539=_0x393dbe;let _0x42b303=this['_transformRemoteChangesetByIMECache'](_0x16b431);_0x42b303=this[_0x450539(0x22a)](_0x42b303);let _0x560941=(0x0,t[_0x450539(0x111)])(_0x42b303[_0x450539(0x14b)],this[_0x450539(0x1fc)],{'fromCollab':!0x0});if(!_0x560941[_0x450539(0x312)]){var _0x29f911;throw _0x560941[_0x450539(0x23f)]instanceof Error?_0x560941[_0x450539(0x23f)]:Error((_0x29f911=_0x560941[_0x450539(0x23f)])==null?_0x450539(0x293):_0x29f911);}this[_0x450539(0x2d1)](_0x42b303),this['_transformStateCache'](_0x42b303),this['_transformUndoredo'](_0x16b431),this[_0x450539(0x187)](_0x42b303),this['_syncEditingCollabCursor'](_0x42b303),this['_incrementRevisionNumber']();}};let A=class extends k{constructor(_0x125c26,_0x4524cb,_0x5406d,_0x30a740,_0x2b5d82,_0x5ccaa5,_0x3e382d,_0x345e27,_0x58f19e,_0x3acdcd){const _0xa50e05=_0x393dbe;super(_0x125c26,_0x4524cb,null,[],_0x5406d,_0x3e382d,_0x5ccaa5,_0x30a740,_0x3acdcd),this[_0xa50e05(0x126)]=_0x2b5d82,this['_logService']=_0x345e27,this[_0xa50e05(0x20d)]=_0x58f19e,this[_0xa50e05(0x388)]=_0x3acdcd,g(this,_0xa50e05(0x22e),_0xa50e05(0x1b8));}[_0x393dbe(0x254)](_0xf30698){const _0x1740f4=_0x393dbe;let _0xd73228=this[_0x1740f4(0x126)][_0x1740f4(0x1a2)](j,this[_0x1740f4(0x165)],this[_0x1740f4(0x353)],[_0xf30698],this['_handler']);return _0xd73228[_0x1740f4(0x359)](),_0xd73228[_0x1740f4(0x296)](),_0xd73228;}[_0x393dbe(0x360)](_0x522edd){const _0x5c3ce1=_0x393dbe;if(this[_0x5c3ce1(0x1b0)](_0x522edd))return this['_injector'][_0x5c3ce1(0x1a2)](I,this[_0x5c3ce1(0x165)],this[_0x5c3ce1(0x353)],null,[],null,[_0x522edd],this[_0x5c3ce1(0x115)]);try{let _0x3c351e=this['_transformService'][_0x5c3ce1(0x14a)](_0x522edd,[e[_0x5c3ce1(0x216)]]);if((0x0,e[_0x5c3ce1(0x109)])(_0x3c351e)){let {c1Prime:_0x357adc}=_0x3c351e;return this[_0x5c3ce1(0xff)](_0x357adc),this;}throw _0x3c351e['error'];}catch(_0x1bcd44){return this[_0x5c3ce1(0x253)][_0x5c3ce1(0x23f)](_0x1bcd44),this[_0x5c3ce1(0x1ae)](!0x1);}}[_0x393dbe(0x1ae)](_0x57c10f){const _0x161da8=_0x393dbe;return this[_0x161da8(0x126)][_0x161da8(0x1a2)](P,this[_0x161da8(0x165)],this[_0x161da8(0x353)],null,[],this[_0x161da8(0x115)],_0x57c10f);}['onRemoteAck'](_0x9195fb){const _0x2aa51a=_0x393dbe;if(_0x9195fb[_0x2aa51a(0x16a)]<=this[_0x2aa51a(0x34b)]())return this;throw Error(_0x2aa51a(0x356));}[_0x393dbe(0x1b6)](){const _0xd5ab64=_0x393dbe;throw Error(_0xd5ab64(0x2f7));}[_0x393dbe(0x3ad)](){return this;}[_0x393dbe(0x22f)](){const _0x52876e=_0x393dbe;return this['_injector']['createInstance'](F,this[_0x52876e(0x165)],this[_0x52876e(0x353)],null,[],this[_0x52876e(0x115)]);}['toggleOnline'](){return this;}['resend'](){const _0x2d71eb=_0x393dbe;throw Error(_0x2d71eb(0x398));}['fetchMiss'](){const _0xb77c20=_0x393dbe;let _0x2c3db7=this[_0xb77c20(0x292)][_0xb77c20(0x2bf)](this[_0xb77c20(0x165)]);return this[_0xb77c20(0x115)][_0xb77c20(0xde)]({'from':_0x2c3db7,'to':0x0}),this[_0xb77c20(0x126)][_0xb77c20(0x1a2)](I,this['unitID'],this[_0xb77c20(0x353)],null,[],null,[],this[_0xb77c20(0x115)]);}};A=y([v(0x3,(0x0,t[_0x393dbe(0x3b1)])(e[_0x393dbe(0x21a)])),v(0x4,(0x0,t['Inject'])(t[_0x393dbe(0x1df)])),v(0x5,t[_0x393dbe(0x18f)]),v(0x6,t[_0x393dbe(0x1ee)]),v(0x7,t[_0x393dbe(0x351)]),v(0x8,e['ITransformService']),v(0x9,(0x0,t[_0x393dbe(0x219)])(S))],A);let j=E=class extends k{constructor(_0x44c110,_0x189aeb,_0xfc0ff4,_0x59d7e1,_0x1c35ae,_0x432f65,_0x823620,_0x5b451f,_0x8ae657,_0x19bf04,_0x1e1eee,_0x13a043,_0xae97ef,_0x44a13f){const _0x41537c=_0x393dbe;super(_0x44c110,_0x189aeb,null,_0xfc0ff4,_0x59d7e1,_0x8ae657,_0xae97ef,_0x432f65,_0x44a13f),this[_0x41537c(0x126)]=_0x1c35ae,this[_0x41537c(0x23d)]=_0x823620,this[_0x41537c(0x253)]=_0x5b451f,this[_0x41537c(0x13c)]=_0x19bf04,this[_0x41537c(0x20d)]=_0x1e1eee,this[_0x41537c(0x151)]=_0x13a043,g(this,_0x41537c(0x22e),'pending'),g(this,_0x41537c(0xf5),null),g(this,_0x41537c(0x1db),null);}[_0x393dbe(0x254)](_0xc58ff2){const _0x1b4e6a=_0x393dbe;return this[_0x1b4e6a(0x194)]['push'](_0xc58ff2),this[_0x1b4e6a(0x296)](),this;}[_0x393dbe(0x360)](_0x23f711){const _0x53ad82=_0x393dbe;if(this[_0x53ad82(0x1b0)](_0x23f711))return this[_0x53ad82(0x39a)](),this[_0x53ad82(0x126)][_0x53ad82(0x1a2)](I,this[_0x53ad82(0x165)],this['type'],null,this[_0x53ad82(0x194)],null,[_0x23f711],this['_handler']);try{let _0x3e1be0=this[_0x53ad82(0x20d)][_0x53ad82(0x14a)](_0x23f711,this['_pendingMutations']);if((0x0,e[_0x53ad82(0x109)])(_0x3e1be0)){let {c1Prime:_0x140d84,m2Prime:_0x53814b}=_0x3e1be0;this[_0x53ad82(0xff)](_0x140d84);let _0x2348ea=this[_0x53ad82(0x126)][_0x53ad82(0x1a2)](E,this[_0x53ad82(0x165)],this[_0x53ad82(0x353)],_0x53814b,this[_0x53ad82(0x115)]);this[_0x53ad82(0x39a)]();let _0x468086=new Date()[_0x53ad82(0x251)](),_0x2e9630=this[_0x53ad82(0xf5)]?Math[_0x53ad82(0x33c)](this[_0x53ad82(0xf5)]-_0x468086,0x0):this['_getSendChangesetTimeout']();return _0x2348ea[_0x53ad82(0x359)](_0x2e9630),_0x2348ea;}throw _0x3e1be0[_0x53ad82(0x23f)];}catch(_0x587cb3){return this[_0x53ad82(0x253)][_0x53ad82(0x23f)](_0x587cb3),this[_0x53ad82(0x1ae)](!0x1);}}['onRemoteAck'](_0x3151d2){const _0x35287b=_0x393dbe;if(_0x3151d2[_0x35287b(0x16a)]<=this[_0x35287b(0x34b)]())return this;throw Error(_0x35287b(0x2b9));}['onRemoteRej'](){throw Error('[PendingState]:\x20received\x20rejection.');}['onRemoteRetry'](){return this;}[_0x393dbe(0x22f)](){const _0x1830a0=_0x393dbe;return this['_clearScheduledTask'](),this[_0x1830a0(0x126)][_0x1830a0(0x1a2)](F,this[_0x1830a0(0x165)],this[_0x1830a0(0x353)],null,this[_0x1830a0(0x194)],this[_0x1830a0(0x115)]);}[_0x393dbe(0x19d)](){return this;}[_0x393dbe(0x359)](_0x2b1ccf){const _0x24a62d=_0x393dbe;let _0x247c49=_0x2b1ccf==null?this[_0x24a62d(0x278)]():_0x2b1ccf;this[_0x24a62d(0xf5)]=new Date()[_0x24a62d(0x251)]()+_0x247c49,this[_0x24a62d(0x1db)]=setTimeout(()=>{const _0x2ac398=_0x24a62d;this[_0x2ac398(0x39a)]();let _0x3105c0=null;switch(this['type']){case t[_0x2ac398(0x2db)][_0x2ac398(0x2e2)]:_0x3105c0=me(this['_pendingMutations'],this[_0x2ac398(0x165)],this[_0x2ac398(0x151)],this[_0x2ac398(0x292)],this[_0x2ac398(0x23d)]);break;case t['UniverInstanceType']['UNIVER_DOC']:_0x3105c0=this[_0x2ac398(0x194)][_0x2ac398(0x362)](_0x185052=>_0x185052['id']===n[_0x2ac398(0x3b2)]['id'])?he(this[_0x2ac398(0x194)],this[_0x2ac398(0x165)],this['_univerInstanceService'],this[_0x2ac398(0x292)],this[_0x2ac398(0x23d)]):me(this[_0x2ac398(0x194)],this[_0x2ac398(0x165)],this[_0x2ac398(0x151)],this[_0x2ac398(0x292)],this[_0x2ac398(0x23d)]);break;default:throw Error(_0x2ac398(0x2e5)+this[_0x2ac398(0x353)]+'\x20in\x20_schedule.');}let {changeset:_0xd14627,pendingMutations:_0x4df8ab}=_0x3105c0;this[_0x2ac398(0x115)][_0x2ac398(0x2af)](_0xd14627);let _0x4a1ba0=_0x4df8ab[_0x2ac398(0x176)]?this[_0x2ac398(0x126)][_0x2ac398(0x1a2)](N,this[_0x2ac398(0x165)],this[_0x2ac398(0x353)],_0xd14627,_0x4df8ab,this[_0x2ac398(0x115)],void 0x0):this[_0x2ac398(0x126)][_0x2ac398(0x1a2)](M,this['unitID'],this['type'],_0xd14627,this[_0x2ac398(0x115)]);_0x4a1ba0[_0x2ac398(0x296)](),this['_handler'][_0x2ac398(0x286)](this,_0x4a1ba0);},_0x247c49);}[_0x393dbe(0x278)](){const _0x316189=_0x393dbe;var _0x4dfb29;let _0x51ca84=this['_configService'][_0x316189(0x1fa)](T);return(_0x4dfb29=_0x51ca84==null?void 0x0:_0x51ca84[_0x316189(0x326)])==null?0x7d0:_0x4dfb29;}['resend'](){const _0x38958f=_0x393dbe;throw Error(_0x38958f(0x303));}[_0x393dbe(0x39a)](){const _0x523f4a=_0x393dbe;this[_0x523f4a(0x1db)]!=null&&(clearTimeout(this['_sendingTimer']),this[_0x523f4a(0x1db)]=null);}['_onConflict'](_0x3907df){const _0x1a43f6=_0x393dbe;return this[_0x1a43f6(0x39a)](),this[_0x1a43f6(0x126)]['createInstance'](P,this[_0x1a43f6(0x165)],this['type'],null,this[_0x1a43f6(0x194)],this[_0x1a43f6(0x115)],_0x3907df);}};j=E=y([v(0x4,(0x0,t[_0x393dbe(0x3b1)])(t[_0x393dbe(0x1df)])),v(0x5,(0x0,t['Inject'])(e[_0x393dbe(0x21a)])),v(0x6,(0x0,t[_0x393dbe(0x3b1)])(b)),v(0x7,t[_0x393dbe(0x351)]),v(0x8,t[_0x393dbe(0x1ee)]),v(0x9,t['IConfigService']),v(0xa,e[_0x393dbe(0x268)]),v(0xb,t[_0x393dbe(0x396)]),v(0xc,t[_0x393dbe(0x18f)]),v(0xd,(0x0,t[_0x393dbe(0x219)])(S))],j);let M=D=class extends k{constructor(_0x1f6cfb,_0xe1f1a6,_0x553563,_0x6c5ce,_0x558233,_0x28a538,_0x16e7f5,_0x3117aa,_0x30a3ce,_0x5dc6ef,_0x5670f5){const _0x25933c=_0x393dbe;super(_0x1f6cfb,_0xe1f1a6,_0x553563,[],_0x6c5ce,_0x16e7f5,_0x5dc6ef,_0x28a538,_0x5670f5),this[_0x25933c(0x126)]=_0x558233,this['_logService']=_0x3117aa,this[_0x25933c(0x20d)]=_0x30a3ce,g(this,_0x25933c(0x22e),_0x25933c(0x24d)),g(this,'_resendTimeout',0x0),g(this,_0x25933c(0x12f),0x0),g(this,'_resendTimer',void 0x0),g(this,'_sender',void 0x0);}[_0x393dbe(0x254)](_0x57ba44){const _0x5c7690=_0x393dbe;this[_0x5c7690(0x39a)]();let _0x33d69e=this[_0x5c7690(0x126)][_0x5c7690(0x1a2)](N,this[_0x5c7690(0x165)],this[_0x5c7690(0x353)],this[_0x5c7690(0x28b)],[_0x57ba44],this[_0x5c7690(0x115)],this['_resendTimer']);return _0x33d69e['_updateLocalCache'](),_0x33d69e;}[_0x393dbe(0x360)](_0x23052d){const _0x404f1e=_0x393dbe;if(this['_checkMissing'](_0x23052d))return this[_0x404f1e(0x39a)](),this[_0x404f1e(0x126)]['createInstance'](I,this[_0x404f1e(0x165)],this['type'],this[_0x404f1e(0x28b)],[],null,[_0x23052d],this['_handler']);try{let _0x1f6edc=this[_0x404f1e(0x20d)]['transformChangesets']([_0x23052d],[this[_0x404f1e(0x28b)]],!0x1);if((0x0,e['isTransformChangesetsSuccess'])(_0x1f6edc)){let {c1Prime:_0x4da465,c2Prime:_0x31c0a7}=_0x1f6edc;this[_0x404f1e(0xff)](_0x4da465[0x0]),_0x31c0a7[0x0]['baseRev']=this[_0x404f1e(0x34b)](),this['_clearScheduledTask']();let _0x227df2=this['_injector'][_0x404f1e(0x1a2)](D,this['unitID'],this['type'],_0x31c0a7[0x0],this[_0x404f1e(0x115)]);return _0x227df2[_0x404f1e(0x296)](),_0x227df2;}throw _0x1f6edc['error'];}catch(_0x2620d6){return this[_0x404f1e(0x253)][_0x404f1e(0x23f)](_0x2620d6),this[_0x404f1e(0x1ae)](!0x1);}}[_0x393dbe(0x14d)](_0x2fbcf5){const _0x2adb28=_0x393dbe;this[_0x2adb28(0x39a)]();let _0x173ad2=this[_0x2adb28(0x292)]['getCurrentRevOfUnit'](this[_0x2adb28(0x165)]);if(_0x2fbcf5[_0x2adb28(0x16a)]<=_0x173ad2)return this;if(this[_0x2adb28(0x1b0)](_0x2fbcf5))return this[_0x2adb28(0x126)][_0x2adb28(0x1a2)](I,this['unitID'],this[_0x2adb28(0x353)],this[_0x2adb28(0x28b)],[],_0x2fbcf5[_0x2adb28(0x16a)],[],this[_0x2adb28(0x115)]);this[_0x2adb28(0x13b)]();let _0xb3a3c2=this['_injector'][_0x2adb28(0x1a2)](A,this[_0x2adb28(0x165)],this[_0x2adb28(0x353)],this['_handler']);return _0xb3a3c2[_0x2adb28(0x296)](),_0xb3a3c2;}[_0x393dbe(0x1b6)](_0x3a42a5){const _0x4af6d7=_0x393dbe;return this['_onConflict'](!!(_0x3a42a5!=null&&_0x3a42a5[_0x4af6d7(0xfc)]));}[_0x393dbe(0x3ad)](_0x45ed9b){const _0x59aba8=_0x393dbe;return this['_maxTotalRetryTimeout']>we?this[_0x59aba8(0x22f)]():(this[_0x59aba8(0x2c8)]=xe(this['_resendTimeout'],{'timeout':this[_0x59aba8(0x193)],'reqId':_0x45ed9b[_0x59aba8(0xfb)]}),this[_0x59aba8(0x1f6)]=this[_0x59aba8(0x2c8)][_0x59aba8(0x246)](({reqId:_0x5336d2,timeout:_0x525ff9})=>{const _0x2c8f56=_0x59aba8;this[_0x2c8f56(0x175)](_0x5336d2,_0x525ff9);}),this);}['toggleOffline'](){const _0x44526e=_0x393dbe;return this[_0x44526e(0x39a)](),this[_0x44526e(0x126)][_0x44526e(0x1a2)](F,this[_0x44526e(0x165)],this[_0x44526e(0x353)],this[_0x44526e(0x28b)],[],this[_0x44526e(0x115)]);}[_0x393dbe(0x19d)](){return this;}[_0x393dbe(0x345)](){const _0x3da1d4=_0x393dbe;this[_0x3da1d4(0x115)][_0x3da1d4(0x2af)](this[_0x3da1d4(0x28b)]);}[_0x393dbe(0x1ae)](_0x476525){const _0x5abcf4=_0x393dbe;return this[_0x5abcf4(0x39a)](),this[_0x5abcf4(0x126)][_0x5abcf4(0x1a2)](P,this['unitID'],this[_0x5abcf4(0x353)],this[_0x5abcf4(0x28b)],[],this[_0x5abcf4(0x115)],_0x476525);}['_resendWithTimeout'](_0x4e4d84,_0x2f81e4){const _0x66fd22=_0x393dbe;var _0x12ea69;_0x4e4d84===((_0x12ea69=this[_0x66fd22(0x28b)])==null?void 0x0:_0x12ea69[_0x66fd22(0xfb)])&&(this[_0x66fd22(0x345)](),this['_resendTimeout']=_0x2f81e4===0x0?0x3e8:Math['min'](_0x2f81e4*0x2,Ce),this['_maxTotalRetryTimeout']+=this[_0x66fd22(0x193)]);}[_0x393dbe(0x39a)](){const _0x55e537=_0x393dbe;var _0x230f99;(_0x230f99=this[_0x55e537(0x1f6)])==null||_0x230f99[_0x55e537(0xf9)](),this['_resendTimeout']=0x0,this[_0x55e537(0x12f)]=0x0;}};M=D=y([v(0x4,(0x0,t[_0x393dbe(0x3b1)])(t[_0x393dbe(0x1df)])),v(0x5,(0x0,t[_0x393dbe(0x3b1)])(e[_0x393dbe(0x21a)])),v(0x6,t[_0x393dbe(0x1ee)]),v(0x7,t[_0x393dbe(0x351)]),v(0x8,e[_0x393dbe(0x268)]),v(0x9,t['IUndoRedoService']),v(0xa,(0x0,t[_0x393dbe(0x219)])(S))],M);let N=O=class extends k{constructor(_0x2e989,_0x5e8ae0,_0x2f26eb,_0x45eae1,_0x201b27,_0x365099,_0x137ff8,_0x8f828f,_0x5e664d,_0x1ef4b3,_0x1bd05f,_0xe050d9,_0x50ac8e){const _0x4b6e19=_0x393dbe;super(_0x2e989,_0x5e8ae0,_0x2f26eb,_0x45eae1,_0x201b27,_0x5e664d,_0xe050d9,_0x8f828f,_0x50ac8e),this['_injector']=_0x137ff8,this[_0x4b6e19(0x253)]=_0x1ef4b3,this[_0x4b6e19(0x20d)]=_0x1bd05f,this[_0x4b6e19(0x388)]=_0x50ac8e,g(this,_0x4b6e19(0x22e),_0x4b6e19(0x142)),g(this,_0x4b6e19(0x193),0x0),g(this,_0x4b6e19(0x12f),0x0),g(this,_0x4b6e19(0x2c8),void 0x0),g(this,_0x4b6e19(0x1f6),void 0x0),_0x365099&&(this[_0x4b6e19(0x2c8)]=_0x365099,this[_0x4b6e19(0x1f6)]=this[_0x4b6e19(0x2c8)]['subscribe'](({reqId:_0xcc4434,timeout:_0x125a20})=>{const _0x4e4b32=_0x4b6e19;this[_0x4e4b32(0x175)](_0xcc4434,_0x125a20);}));}['appendMutation'](_0x5bb2d7){const _0x367da1=_0x393dbe;return this[_0x367da1(0x194)][_0x367da1(0x1f8)](_0x5bb2d7),this;}[_0x393dbe(0x360)](_0x5c299b){const _0xe0b29e=_0x393dbe;if(this[_0xe0b29e(0x1b0)](_0x5c299b))return this[_0xe0b29e(0x39a)](),this[_0xe0b29e(0x126)][_0xe0b29e(0x1a2)](I,this['unitID'],this[_0xe0b29e(0x353)],this[_0xe0b29e(0x28b)],this[_0xe0b29e(0x194)],null,[_0x5c299b],this[_0xe0b29e(0x115)]);try{let _0x3243b3=this[_0xe0b29e(0x20d)][_0xe0b29e(0x134)]([_0x5c299b],[this[_0xe0b29e(0x28b)]],!0x1);if((0x0,e[_0xe0b29e(0x100)])(_0x3243b3)){let {c1Prime:_0x1decc5,c2Prime:_0xad3b48}=_0x3243b3,_0x54e6ac=this[_0xe0b29e(0x20d)]['transformMutationsWithChangeset'](_0x1decc5[0x0],this[_0xe0b29e(0x194)]);if((0x0,e[_0xe0b29e(0x109)])(_0x54e6ac)){let {c1Prime:_0x24b46e,m2Prime:_0x533836}=_0x54e6ac;return this['_executeRemoteChangeset'](_0x24b46e),_0xad3b48[0x0][_0xe0b29e(0x332)]=this[_0xe0b29e(0x34b)](),this[_0xe0b29e(0x39a)](),this[_0xe0b29e(0x126)][_0xe0b29e(0x1a2)](O,this['unitID'],this['type'],_0xad3b48[0x0],_0x533836,this[_0xe0b29e(0x115)],void 0x0);}throw _0x54e6ac[_0xe0b29e(0x23f)];}throw _0x3243b3[_0xe0b29e(0x23f)];}catch(_0x5b04f1){return this[_0xe0b29e(0x253)]['error'](_0x5b04f1),this[_0xe0b29e(0x1ae)](!0x1);}}['onRemoteAck'](_0x186097){const _0xaa90bd=_0x393dbe;this[_0xaa90bd(0x39a)]();let _0x22bfc7=this[_0xaa90bd(0x34b)]();if(_0x186097[_0xaa90bd(0x16a)]<=_0x22bfc7)return this;if(this['_checkMissing'](_0x186097))return this['_injector'][_0xaa90bd(0x1a2)](I,this[_0xaa90bd(0x165)],this[_0xaa90bd(0x353)],this['_awaitingChangeset'],this[_0xaa90bd(0x194)],_0x186097[_0xaa90bd(0x16a)],[],this[_0xaa90bd(0x115)]);this[_0xaa90bd(0x13b)]();let _0x1e8d96=this['_injector'][_0xaa90bd(0x1a2)](j,this[_0xaa90bd(0x165)],this[_0xaa90bd(0x353)],this[_0xaa90bd(0x194)],this[_0xaa90bd(0x115)]);return _0x1e8d96[_0xaa90bd(0x359)](),_0x1e8d96[_0xaa90bd(0x296)](),_0x1e8d96;}['onRemoteRej'](_0x5ef119){const _0x4e4a07=_0x393dbe;return this[_0x4e4a07(0x1ae)](!!(_0x5ef119!=null&&_0x5ef119[_0x4e4a07(0xfc)]));}[_0x393dbe(0x3ad)](_0x5afe63){const _0x1b87cc=_0x393dbe;return this[_0x1b87cc(0x12f)]>we?this[_0x1b87cc(0x22f)]():(this[_0x1b87cc(0x2c8)]=xe(this[_0x1b87cc(0x193)],{'timeout':this[_0x1b87cc(0x193)],'reqId':_0x5afe63['reqId']}),this[_0x1b87cc(0x1f6)]=this[_0x1b87cc(0x2c8)][_0x1b87cc(0x246)](({reqId:_0x5c2164,timeout:_0x1d889c})=>{const _0x455364=_0x1b87cc;this[_0x455364(0x175)](_0x5c2164,_0x1d889c);}),this);}['toggleOffline'](){const _0x504304=_0x393dbe;return this[_0x504304(0x39a)](),this[_0x504304(0x126)][_0x504304(0x1a2)](F,this[_0x504304(0x165)],this[_0x504304(0x353)],this[_0x504304(0x28b)],this[_0x504304(0x194)],this[_0x504304(0x115)]);}[_0x393dbe(0x19d)](){return this;}[_0x393dbe(0x345)](){const _0x26376f=_0x393dbe;this[_0x26376f(0x115)]['onSendChangeset'](this[_0x26376f(0x28b)]);}[_0x393dbe(0x1ae)](_0x225fe9){const _0x111da2=_0x393dbe;return this[_0x111da2(0x39a)](),this[_0x111da2(0x126)][_0x111da2(0x1a2)](P,this[_0x111da2(0x165)],this['type'],null,this[_0x111da2(0x194)],this[_0x111da2(0x115)],_0x225fe9);}['_resendWithTimeout'](_0x94dd5f,_0x4da4c9){const _0xbd1a46=_0x393dbe;var _0x14f69c;_0x94dd5f===((_0x14f69c=this[_0xbd1a46(0x28b)])==null?void 0x0:_0x14f69c[_0xbd1a46(0xfb)])&&(this[_0xbd1a46(0x345)](),this[_0xbd1a46(0x193)]=_0x4da4c9===0x0?0x3e8:Math[_0xbd1a46(0x368)](_0x4da4c9*0x2,Ce),this[_0xbd1a46(0x12f)]+=this[_0xbd1a46(0x193)]);}[_0x393dbe(0x39a)](){const _0x24c5ab=_0x393dbe;var _0x21bb47;(_0x21bb47=this['_sender'])==null||_0x21bb47['unsubscribe'](),this[_0x24c5ab(0x193)]=0x0,this['_maxTotalRetryTimeout']=0x0;}};N=O=y([v(0x6,(0x0,t[_0x393dbe(0x3b1)])(t[_0x393dbe(0x1df)])),v(0x7,(0x0,t[_0x393dbe(0x3b1)])(e[_0x393dbe(0x21a)])),v(0x8,t[_0x393dbe(0x1ee)]),v(0x9,t[_0x393dbe(0x351)]),v(0xa,e[_0x393dbe(0x268)]),v(0xb,t[_0x393dbe(0x18f)]),v(0xc,(0x0,t[_0x393dbe(0x219)])(S))],N);let P=class extends k{constructor(_0x205530,_0x2901d5,_0x486ea5,_0x5aa712,_0x1319d6,_0x1e4820=!0x1,_0x2c5448,_0x4ca710,_0x300af2,_0x14eef4,_0x4d0f32,_0x3b47b7,_0x40e27c){const _0x49b811=_0x393dbe;super(_0x205530,_0x2901d5,_0x486ea5,_0x5aa712,_0x1319d6,_0x4ca710,_0x300af2,_0x14eef4,_0x40e27c),this['_isPermissionRej']=_0x1e4820,this['_permissionService']=_0x2c5448,this[_0x49b811(0x17c)]=_0x4d0f32,this['_collaborationUIEventService']=_0x3b47b7,this[_0x49b811(0x388)]=_0x40e27c,g(this,_0x49b811(0x22e),_0x49b811(0x2ec)),this[_0x49b811(0x256)](),this[_0x49b811(0x179)](),this[_0x49b811(0x2cc)]();}['appendMutation'](){return this;}['onRemoteChangeset'](){return this;}['onRemoteAck'](){return this;}[_0x393dbe(0x1b6)](){return this;}[_0x393dbe(0x3ad)](){return this;}['toggleOffline'](){return this;}[_0x393dbe(0x19d)](){return this;}['resend'](){const _0x3ee6cd=_0x393dbe;throw Error(_0x3ee6cd(0xf4));}[_0x393dbe(0x179)](){const _0x504cd3=_0x393dbe;var _0x2ae986;(_0x2ae986=this['_localCacheService'])==null||_0x2ae986['updateOfflineData'](this[_0x504cd3(0x165)],this[_0x504cd3(0x353)],null,[]);}[_0x393dbe(0x256)](){const _0x2c05a6=_0x393dbe;this[_0x2c05a6(0x1b9)]?this[_0x2c05a6(0x2b6)]['emitEvent']({'id':_0x2c05a6(0x2ae)}):this['_collaborationUIEventService'][_0x2c05a6(0x3a4)]({'id':_0x2c05a6(0x342)});}[_0x393dbe(0x2cc)](){const _0x60e2cf=_0x393dbe;this[_0x60e2cf(0x318)][_0x60e2cf(0x140)](new r[(_0x60e2cf(0x190))](this[_0x60e2cf(0x165)])['id'],!0x1);}};P=y([v(0x6,(0x0,t[_0x393dbe(0x3b1)])(t['IPermissionService'])),v(0x7,t[_0x393dbe(0x1ee)]),v(0x8,t['IUndoRedoService']),v(0x9,(0x0,t[_0x393dbe(0x3b1)])(e[_0x393dbe(0x21a)])),v(0xa,(0x0,t[_0x393dbe(0x3b1)])(t[_0x393dbe(0x34e)])),v(0xb,(0x0,t['Inject'])(_)),v(0xc,(0x0,t[_0x393dbe(0x219)])(S))],P);let F=class extends k{constructor(_0x5e8d4d,_0x2d08d2,_0xf2aab9,_0x82c726,_0x4eadeb,_0x1c52c2,_0x4ad6f5,_0x584e94,_0x2206db,_0x27865d){const _0x636026=_0x393dbe;super(_0x5e8d4d,_0x2d08d2,_0xf2aab9,_0x82c726,_0x4eadeb,_0x584e94,_0x2206db,_0x4ad6f5,_0x27865d),this[_0x636026(0x126)]=_0x1c52c2,g(this,_0x636026(0x22e),'offline');}['appendMutation'](_0x5faa1a){const _0x11de3c=_0x393dbe;return this[_0x11de3c(0x194)]['push'](_0x5faa1a),this['_updateLocalCache'](),this;}[_0x393dbe(0x360)](_0xcfb6f8){const _0x4d349d=_0x393dbe;throw Error(_0x4d349d(0x1ac));}[_0x393dbe(0x14d)](){throw Error('[OfflineState]:\x20received\x20acknowledgement.');}[_0x393dbe(0x1b6)](){const _0xe0c086=_0x393dbe;throw Error(_0xe0c086(0x31f));}[_0x393dbe(0x3ad)](){return this;}['toggleOffline'](){return this;}['toggleOnline'](){const _0x1cc17b=_0x393dbe;let {_injector:_0x2b3bfe,_pendingMutations:_0x2a2b2d,_awaitingChangeset:_0x34cfbc,unitID:_0x3896da,_handler:_0x42cd05,type:_0xc021a1}=this,_0x4ae657=Te(_0x2b3bfe,_0x3896da,_0xc021a1,_0x34cfbc,_0x2a2b2d,_0x42cd05);return _0x4ae657 instanceof j?_0x4ae657[_0x1cc17b(0x359)]():(_0x4ae657 instanceof N||_0x4ae657 instanceof M)&&_0x4ae657['resend'](),_0x4ae657;}[_0x393dbe(0x345)](){const _0x2aa402=_0x393dbe;throw Error(_0x2aa402(0x27d));}};F=y([v(0x5,(0x0,t[_0x393dbe(0x3b1)])(t[_0x393dbe(0x1df)])),v(0x6,(0x0,t['Inject'])(e[_0x393dbe(0x21a)])),v(0x7,t['ICommandService']),v(0x8,t['IUndoRedoService']),v(0x9,(0x0,t[_0x393dbe(0x219)])(S))],F);let I=class extends k{constructor(_0x48ddfa,_0x369ccb,_0x6b3165,_0x35f825,_0x2fc13c,_0x4409bf,_0x500204,_0x1dd702,_0x49a2b9,_0x3f9f05,_0x42c5ae,_0xb7b36c,_0x28e8fe,_0x43d947){const _0x581961=_0x393dbe;super(_0x48ddfa,_0x369ccb,_0x6b3165,_0x35f825,_0x500204,_0x42c5ae,_0xb7b36c,_0x49a2b9,_0x43d947),this[_0x581961(0x3a7)]=_0x2fc13c,this[_0x581961(0x3a6)]=_0x4409bf,this[_0x581961(0x126)]=_0x1dd702,this['_logService']=_0x3f9f05,this[_0x581961(0x20d)]=_0x28e8fe,this['localCacheService']=_0x43d947,g(this,_0x581961(0x22e),'fetch_missing');}[_0x393dbe(0x1d3)](_0xa30515){const _0x131093=_0x393dbe;try{if(this[_0x131093(0x17d)](_0xa30515)[_0x131093(0x155)])throw Error(_0x131093(0x19b));if(this[_0x131093(0x17d)]([...this['_queuedRemoteChangesets']][_0x131093(0x1a7)]((_0x25e5cb,_0x14bff5)=>_0x25e5cb[_0x131093(0x16a)]-_0x14bff5[_0x131093(0x16a)]))[_0x131093(0x155)])return this['_queuedRemoteChangesets']=[],this['_updateLocalCache'](),this[_0x131093(0x115)][_0x131093(0xde)]({'from':this[_0x131093(0x34b)](),'to':0x0}),this;let _0x3c7f9a=this[_0x131093(0x28b)],_0x427b43=this['_pendingMutations'],_0xbcedbe;if(_0x3c7f9a&&_0x427b43[_0x131093(0x176)]!==0x0)_0xbcedbe=this[_0x131093(0x126)][_0x131093(0x1a2)](N,this['unitID'],this[_0x131093(0x353)],_0x3c7f9a,_0x427b43,this[_0x131093(0x115)],void 0x0);else{if(_0x3c7f9a&&_0x427b43['length']===0x0)_0x3c7f9a[_0x131093(0x332)]=this['_getCurrentRevision'](),_0xbcedbe=this[_0x131093(0x126)]['createInstance'](M,this['unitID'],this['type'],_0x3c7f9a,this[_0x131093(0x115)]);else{if(_0x427b43[_0x131093(0x176)]!==0x0){let _0x31fd1f=this[_0x131093(0x126)]['createInstance'](j,this['unitID'],this[_0x131093(0x353)],_0x427b43,this[_0x131093(0x115)]);_0x31fd1f[_0x131093(0x359)](),_0xbcedbe=_0x31fd1f;}else _0xbcedbe=this[_0x131093(0x126)][_0x131093(0x1a2)](A,this[_0x131093(0x165)],this['type'],this['_handler']);}}return _0xbcedbe['_updateLocalCache'](),_0xbcedbe;}catch(_0x371a44){return this[_0x131093(0x253)][_0x131093(0x23f)]('[FetchMissState]',_0x131093(0x2c3),_0x371a44),this['_injector'][_0x131093(0x1a2)](P,this[_0x131093(0x165)],this['type'],this[_0x131093(0x28b)],this[_0x131093(0x194)],this[_0x131093(0x115)],!0x1);}}[_0x393dbe(0x17d)](_0x416d27){const _0x100487=_0x393dbe;this[_0x100487(0xdd)]();for(let _0x115f1b=0x0;_0x115f1b<_0x416d27[_0x100487(0x176)];_0x115f1b++){let _0x3ac4c4=_0x416d27[_0x115f1b],_0xc4f0d9=this[_0x100487(0x34b)]();if(!(_0x3ac4c4[_0x100487(0x16a)]<=_0xc4f0d9)){if(_0x3ac4c4[_0x100487(0x16a)]>_0xc4f0d9+0x1)return{'missingChangesets':!0x0};if(this['_isEchoedAwaitingChangeset'](_0x3ac4c4)){this[_0x100487(0x2dd)]();continue;}this[_0x100487(0x16b)](_0x3ac4c4),this[_0x100487(0xdd)]();}}return{'missingChangesets':!0x1};}[_0x393dbe(0x16b)](_0x2805da){const _0x249ab4=_0x393dbe;let _0x1f5d6d=_0x2805da,_0x3d5577=this[_0x249ab4(0x28b)];if(_0x3d5577){let _0x2ce0f4=this[_0x249ab4(0x20d)]['transformChangesets']([_0x2805da],[_0x3d5577],!0x1);if(!(0x0,e['isTransformChangesetsSuccess'])(_0x2ce0f4))throw _0x2ce0f4['error'];_0x1f5d6d=_0x2ce0f4[_0x249ab4(0x137)][0x0],_0x3d5577=_0x2ce0f4[_0x249ab4(0x349)][0x0];}let _0xe1aa88=this[_0x249ab4(0x194)];if(_0xe1aa88[_0x249ab4(0x176)]){let _0x422fc9=this[_0x249ab4(0x20d)][_0x249ab4(0x14a)](_0x1f5d6d,_0xe1aa88);if(!(0x0,e[_0x249ab4(0x109)])(_0x422fc9))throw _0x422fc9[_0x249ab4(0x23f)];_0x1f5d6d=_0x422fc9[_0x249ab4(0x137)],_0xe1aa88=_0x422fc9[_0x249ab4(0x36d)];}this['_executeRemoteChangeset'](_0x1f5d6d),_0x3d5577&&(_0x3d5577[_0x249ab4(0x332)]=this[_0x249ab4(0x34b)]()),this[_0x249ab4(0x28b)]=_0x3d5577,this['_pendingMutations']=_0xe1aa88;}[_0x393dbe(0xdd)](){const _0x1deb60=_0x393dbe;if(!this[_0x1deb60(0x28b)]||this[_0x1deb60(0x3a7)]==null)return;let _0x4fbeda=this[_0x1deb60(0x34b)]();if(this['_acknowledgedAwaitingRevision']<=_0x4fbeda)throw Error(_0x1deb60(0x226)+this[_0x1deb60(0x3a7)]+'.');this['_acknowledgedAwaitingRevision']===_0x4fbeda+0x1&&this[_0x1deb60(0x2dd)]();}[_0x393dbe(0x2dd)](){const _0x3f1347=_0x393dbe;this[_0x3f1347(0x13b)](),this[_0x3f1347(0x28b)]=null,this['_acknowledgedAwaitingRevision']=null;}[_0x393dbe(0x35b)](_0x33c3eb){const _0x2a5013=_0x393dbe;let _0x3cd172=this[_0x2a5013(0x28b)];return!_0x3cd172||!_0x3cd172[_0x2a5013(0x2be)]||_0x3cd172[_0x2a5013(0xfb)]===null||_0x3cd172[_0x2a5013(0xfb)]===void 0x0?!0x1:_0x33c3eb[_0x2a5013(0x165)]===_0x3cd172['unitID']&&_0x33c3eb[_0x2a5013(0x2be)]===_0x3cd172[_0x2a5013(0x2be)]&&_0x33c3eb[_0x2a5013(0xfb)]===_0x3cd172['reqId'];}[_0x393dbe(0x345)](){throw Error('[FetchingMissState]:\x20invalid\x20calling\x20to\x20`resend`.');}[_0x393dbe(0x254)](_0x462575){const _0x1de110=_0x393dbe;return this[_0x1de110(0x194)]['push'](_0x462575),this;}[_0x393dbe(0x360)](_0x5aa4cc){const _0x4e9e7f=_0x393dbe;return this['_queuedRemoteChangesets'][_0x4e9e7f(0x1f8)](_0x5aa4cc),this;}['onRemoteAck'](_0x100102){const _0x5d94fc=_0x393dbe;if(this[_0x5d94fc(0x28b)]){let _0x33154e=this['_getCurrentRevision']();return _0x100102['revision']<=_0x33154e||(_0x33154e+0x1===_0x100102['revision']?(this[_0x5d94fc(0x13b)](),this[_0x5d94fc(0x28b)]=null,this[_0x5d94fc(0x3a7)]=null):this[_0x5d94fc(0x3a7)]=_0x100102[_0x5d94fc(0x16a)]),this;}if(_0x100102[_0x5d94fc(0x16a)]<=this[_0x5d94fc(0x34b)]())return this;throw Error(_0x5d94fc(0x112));}['onRemoteRej'](_0x24f1c4){const _0xc16c1a=_0x393dbe;return this['_onConflict'](!!(_0x24f1c4!=null&&_0x24f1c4[_0xc16c1a(0xfc)]));}[_0x393dbe(0x3ad)](){return this;}[_0x393dbe(0x22f)](){const _0x61f44e=_0x393dbe;return this[_0x61f44e(0x126)]['createInstance'](F,this['unitID'],this[_0x61f44e(0x353)],this[_0x61f44e(0x28b)],this['_pendingMutations'],this[_0x61f44e(0x115)]);}[_0x393dbe(0x19d)](){return this;}[_0x393dbe(0x1ae)](_0x289766){const _0x3b3be4=_0x393dbe;return this[_0x3b3be4(0x126)][_0x3b3be4(0x1a2)](P,this['unitID'],this[_0x3b3be4(0x353)],this['_awaitingChangeset'],this['_pendingMutations'],this[_0x3b3be4(0x115)],_0x289766);}};I=y([v(0x7,(0x0,t[_0x393dbe(0x3b1)])(t[_0x393dbe(0x1df)])),v(0x8,(0x0,t[_0x393dbe(0x3b1)])(e['RevisionService'])),v(0x9,t[_0x393dbe(0x351)]),v(0xa,t[_0x393dbe(0x1ee)]),v(0xb,t['IUndoRedoService']),v(0xc,e[_0x393dbe(0x268)]),v(0xd,(0x0,t[_0x393dbe(0x219)])(S))],I);function Te(_0xe632,_0x1af5b5,_0x3dbfb9,_0x884d1e,_0x536027,_0xa4a5f4){const _0x17401c=_0x393dbe;return _0x884d1e&&_0x536027['length']?_0xe632[_0x17401c(0x1a2)](N,_0x1af5b5,_0x3dbfb9,_0x884d1e,_0x536027,_0xa4a5f4,void 0x0):_0x884d1e?_0xe632['createInstance'](M,_0x1af5b5,_0x3dbfb9,_0x884d1e,_0xa4a5f4):_0x536027[_0x17401c(0x176)]?_0xe632['createInstance'](j,_0x1af5b5,_0x3dbfb9,_0x536027,_0xa4a5f4):_0xe632[_0x17401c(0x1a2)](A,_0x1af5b5,_0x3dbfb9,_0xa4a5f4);}let L=class extends t['RxDisposable']{get[_0x393dbe(0x12d)](){const _0x27cb06=_0x393dbe;return this[_0x27cb06(0x1f1)];}constructor(_0x5795ab,_0x2f249b,_0x1c3ab9,_0x7bd26e,_0x5a3006,_0x1fdd26,_0x5ebeb4,_0x558a2a,_0x296065,_0x5f046d,_0x2db970,_0xc5c003,_0x30f59f,_0x5c4a8b){const _0x401915=_0x393dbe;super(),this[_0x401915(0x165)]=_0x5795ab,this[_0x401915(0x2c5)]=_0x2f249b,this[_0x401915(0x308)]=_0x1c3ab9,this[_0x401915(0x126)]=_0x7bd26e,this['_compressMutationService']=_0x5a3006,this[_0x401915(0x17c)]=_0x1fdd26,this['_revisionService']=_0x5ebeb4,this['_eventService']=_0x558a2a,this['_univerInstanceService']=_0x296065,this[_0x401915(0x253)]=_0x5f046d,this[_0x401915(0x1fc)]=_0x2db970,this[_0x401915(0x318)]=_0xc5c003,this[_0x401915(0x15d)]=_0x30f59f,this[_0x401915(0x1cb)]=_0x5c4a8b,g(this,'_state$',new i[(_0x401915(0x1a1))](null)),g(this,_0x401915(0x211),this[_0x401915(0x199)]['asObservable']()),g(this,_0x401915(0x1f1),void 0x0),g(this,_0x401915(0x167),!0x1),g(this,_0x401915(0x290),''),g(this,_0x401915(0x26d),0x0),g(this,_0x401915(0x1b7),this[_0x401915(0x211)][_0x401915(0x297)]((0x0,i[_0x401915(0x186)])(_0x5ab101=>_0x5ab101?_0x5ab101[_0x401915(0x22e)]:'offline'),(0x0,i['shareReplay'])({'bufferSize':0x1,'refCount':!0x0}))),g(this,'_transitionLocked',!0x1),g(this,_0x401915(0x15c),[]);}async[_0x393dbe(0x1da)](){const _0x2ef4d4=_0x393dbe;if(this['state'])throw Error('[CollaborationEntity]:\x20initial\x20state\x20has\x20been\x20created\x20before.\x20You\x20should\x20not\x20call\x20\x22init\x22\x20twice.');await this[_0x2ef4d4(0x119)]();}[_0x393dbe(0x27a)](){const _0x216a76=_0x393dbe;return this[_0x216a76(0x167)]=!0x0,(0x0,t[_0x216a76(0x381)])(()=>{const _0x1013d1=_0x216a76;this[_0x1013d1(0x167)]=!0x1,this['_exhaustRemoteChangesetQueue']();});}['onLocalMutation'](_0x2d5a19){const _0x94e359=_0x393dbe;this[_0x94e359(0x26f)](_0x2d5a19);}[_0x393dbe(0x2cb)](_0x186d51){const _0x50dc71=_0x393dbe;this[_0x50dc71(0x1f1)]=_0x186d51,this[_0x50dc71(0x199)][_0x50dc71(0x20a)](_0x186d51);}async[_0x393dbe(0x119)](){const _0x5c5d86=_0x393dbe;if(this[_0x5c5d86(0x2cb)](await this['_createInitialState']()),this['_singleActiveUnitService']){var _0x4f3b35;(_0x4f3b35=this[_0x5c5d86(0x15d)])==null||_0x4f3b35['editingUnit'](this[_0x5c5d86(0x165)]),this[_0x5c5d86(0x1bc)](this[_0x5c5d86(0x15d)]['getUnitStatus$'](this['unitID'])[_0x5c5d86(0x246)](_0x31834b=>{const _0x4d7bd5=_0x5c5d86;this[_0x4d7bd5(0x253)][_0x4d7bd5(0x24e)]('[CollaborationEntity]',_0x4d7bd5(0x1a9),_0x31834b),_0x31834b===0x1?(this[_0x4d7bd5(0x38c)]['emitEvent']({'id':_0x4d7bd5(0x1e8)}),this['_permissionService'][_0x4d7bd5(0x140)](new r[(_0x4d7bd5(0x190))](this[_0x4d7bd5(0x165)])['id'],!0x1),this[_0x4d7bd5(0x318)][_0x4d7bd5(0xf2)](!0x1)):(this[_0x4d7bd5(0x318)]['updatePermissionPoint'](new r[(_0x4d7bd5(0x190))](this[_0x4d7bd5(0x165)])['id'],!0x0),this[_0x4d7bd5(0x318)][_0x4d7bd5(0xf2)](!0x0));}));}let _0x3e20b0=!0x1;return this[_0x5c5d86(0x1bc)](this[_0x5c5d86(0x2c5)][_0x5c5d86(0x260)][_0x5c5d86(0x246)](_0x381440=>{const _0x1106d4=_0x5c5d86;_0x381440===0x3?this[_0x1106d4(0x2d9)](_0x3e20b0):_0x381440===0x2&&(_0x3e20b0=!0x0,this[_0x1106d4(0x1a0)]());})),this['disposeWithMe'](this[_0x5c5d86(0x2c5)]['event$'][_0x5c5d86(0x246)](_0x550e4f=>{const _0x357f55=_0x5c5d86;try{switch(_0x550e4f[_0x357f55(0x385)]){case e[_0x357f55(0x114)][_0x357f55(0x249)]:this['_onRemoteChangeset']((0x0,e[_0x357f55(0x1c1)])(_0x550e4f['data']));break;case e['CollaborationEvent']['CHANGESET_ACK']:this['_onRemoteACK'](_0x550e4f[_0x357f55(0x240)]);break;case e['CollaborationEvent'][_0x357f55(0x148)]:this[_0x357f55(0x25a)]();break;case e[_0x357f55(0x114)]['CHANGESET_SHOULD_RETRY']:this[_0x357f55(0x117)](_0x550e4f['data']);break;case e[_0x357f55(0x114)][_0x357f55(0x1cc)]:this['_onFetchMissResult'](_0x550e4f[_0x357f55(0x240)][_0x357f55(0x223)][_0x357f55(0x186)](_0x4f4413=>(0x0,e[_0x357f55(0x1c1)])(_0x4f4413)));break;case e[_0x357f55(0x114)][_0x357f55(0x1b5)]:this[_0x357f55(0x25a)]({'isPermissionRej':!0x0});break;case e[_0x357f55(0x114)]['UNISCRIPT_RUN']:break;}}catch(_0x2e0e33){throw console[_0x357f55(0x23f)](_0x357f55(0x1d9),_0x2e0e33),_0x2e0e33;}})),this[_0x5c5d86(0x1f1)];}['_unlockTransition'](){const _0x5ba347=_0x393dbe;this[_0x5ba347(0x271)]=!0x1;}['_lockTransition'](){const _0x49ca6b=_0x393dbe;if(this[_0x49ca6b(0x271)])throw Error(_0x49ca6b(0x10b));this['_transitionLocked']=!0x0;}[_0x393dbe(0x26f)](_0x379f38){const _0x191145=_0x393dbe;this[_0x191145(0xe8)](),this[_0x191145(0x2cb)](this[_0x191145(0x1f1)][_0x191145(0x254)](_0x379f38)),this['_unlockTransition']();}[_0x393dbe(0x31d)](_0x1f9576){const _0x28cc74=_0x393dbe;if(!(_0x1f9576[_0x28cc74(0x16a)]<=this[_0x28cc74(0x292)][_0x28cc74(0x2bf)](this['unitID']))){if(this[_0x28cc74(0x167)]){this['_remoteChangesetQueue'][_0x28cc74(0x1f8)](_0x1f9576);return;}this[_0x28cc74(0x30f)](_0x1f9576);}}[_0x393dbe(0x1d7)](){const _0x44aefe=_0x393dbe;this[_0x44aefe(0x15c)][_0x44aefe(0x26a)](_0x23bdb9=>this[_0x44aefe(0x30f)](_0x23bdb9)),this[_0x44aefe(0x15c)]=[];}[_0x393dbe(0x30f)](_0x9df4e6){const _0x3dbc60=_0x393dbe;let _0x3c9bc7=this[_0x3dbc60(0x343)][_0x3dbc60(0x2b2)][_0x3dbc60(0x205)](this['_compressMutationService'][_0x3dbc60(0x2b2)][_0x3dbc60(0x13a)]()[_0x3dbc60(0x2aa)])(_0x9df4e6[_0x3dbc60(0x14b)],null)||_0x9df4e6[_0x3dbc60(0x14b)],_0x11784a={..._0x9df4e6,'mutations':_0x3c9bc7};this[_0x3dbc60(0xe8)](),this[_0x3dbc60(0x2cb)](this[_0x3dbc60(0x1f1)]['onRemoteChangeset'](_0x11784a)),this['_unlockTransition']();}['_onRemoteACK'](_0x2881be){const _0x2c9e57=_0x393dbe;this[_0x2c9e57(0xe8)](),this[_0x2c9e57(0x2cb)](this['_state'][_0x2c9e57(0x14d)](_0x2881be)),this['_unlockTransition']();}[_0x393dbe(0x25a)](_0x56f792){const _0x3c1620=_0x393dbe;this[_0x3c1620(0xe8)](),this['_updateState'](this[_0x3c1620(0x1f1)]['onRemoteRej'](_0x56f792)),this['_unlockTransition']();}[_0x393dbe(0x117)](_0x20ebd9){const _0x294198=_0x393dbe;this[_0x294198(0xe8)](),this[_0x294198(0x2cb)](this[_0x294198(0x1f1)][_0x294198(0x3ad)](_0x20ebd9)),this[_0x294198(0x15e)]();}['_onFetchMissResult'](_0x5aa3e0){const _0x3b4a7e=_0x393dbe;if(!(this[_0x3b4a7e(0x1f1)]instanceof I))throw TypeError(_0x3b4a7e(0x139));let _0x1d62a6=_0x5aa3e0[_0x3b4a7e(0x186)](_0x2b48d0=>{const _0x75916d=_0x3b4a7e;let _0x39de7a=this[_0x75916d(0x343)][_0x75916d(0x2b2)][_0x75916d(0x205)](this[_0x75916d(0x343)][_0x75916d(0x2b2)]['getInterceptPoints']()[_0x75916d(0x2aa)])(_0x2b48d0[_0x75916d(0x14b)],null)||_0x2b48d0[_0x75916d(0x14b)];return{..._0x2b48d0,'mutations':_0x39de7a};});this[_0x3b4a7e(0xe8)](),this[_0x3b4a7e(0x2cb)](this[_0x3b4a7e(0x1f1)][_0x3b4a7e(0x1d3)](_0x1d62a6)),this[_0x3b4a7e(0x15e)]();}['_toggleOffline'](){const _0x34e7cf=_0x393dbe;this[_0x34e7cf(0xe8)](),this[_0x34e7cf(0x2cb)](this[_0x34e7cf(0x1f1)][_0x34e7cf(0x22f)]()),this['_unlockTransition']();}[_0x393dbe(0x2d9)](_0x40c973=!0x1){const _0x27e50e=_0x393dbe;this[_0x27e50e(0xe8)](),this[_0x27e50e(0x2cb)](this[_0x27e50e(0x1f1)][_0x27e50e(0x19d)]()),this[_0x27e50e(0x15e)]();let _0x31add8=this['_state'];_0x40c973&&_0x31add8 instanceof A&&(this['_lockTransition'](),this[_0x27e50e(0x2cb)](_0x31add8['fetchMiss']()),this[_0x27e50e(0x15e)]());}async[_0x393dbe(0x15f)](){return new Promise(_0xd9903d=>{const _0x5729fc=_0x4ff9;this['session'][_0x5729fc(0x260)][_0x5729fc(0x297)]((0x0,i['take'])(0x1))[_0x5729fc(0x246)](async _0x50147b=>{_0xd9903d(await this['_createInitialStateImpl'](_0x50147b===0x3));});});}[_0x393dbe(0x1e4)](){const _0x587235=_0x393dbe;let _0x4119e4=this[_0x587235(0x165)];return{'onStateChange':(_0x2f6fdf,_0x40f2f1)=>{const _0x3bfc1b=_0x587235;if(_0x2f6fdf!==this[_0x3bfc1b(0x1f1)])throw Error('[CollaborationEntity]:\x20invalid\x20state\x20transition!\x20State\x20transferred\x20from\x20is\x20not\x20the\x20current\x20state.\x0aBefore:\x20'+_0x2f6fdf['status']+'\x0aAfter:\x20'+_0x40f2f1['status']+_0x3bfc1b(0x336)+this[_0x3bfc1b(0x1f1)][_0x3bfc1b(0x22e)]);this['_updateState'](_0x40f2f1);},'onSendChangeset':_0x309853=>{const _0x2d72f6=_0x587235;_0x309853[_0x2d72f6(0x2be)]||(_0x309853['sid']=this[_0x2d72f6(0x290)],_0x309853[_0x2d72f6(0xfb)]=++this[_0x2d72f6(0x26d)]);let _0x4688e2={'eventID':e['CollaborationEvent'][_0x2d72f6(0x13d)],'data':{'unitID':_0x309853[_0x2d72f6(0x165)],'unitType':this[_0x2d72f6(0x308)],'changeset':_0x309853,'memberID':this[_0x2d72f6(0x2c5)][_0x2d72f6(0x374)]()}};this['session'][_0x2d72f6(0x389)](_0x4688e2,this[_0x2d72f6(0x165)]);},'onMissingChangesets':({from:_0x527937,to:_0x50f2df})=>{const _0x3ccff3=_0x587235;this['_logService'][_0x3ccff3(0x24e)](_0x3ccff3(0x241),_0x3ccff3(0x367)+_0x527937+_0x3ccff3(0xe9)+_0x50f2df);let _0xa34273={'eventID':e[_0x3ccff3(0x114)][_0x3ccff3(0x29e)],'data':{'unitID':_0x4119e4,'unitType':this[_0x3ccff3(0x308)],'from':_0x527937,'to':_0x50f2df}};this['session'][_0x3ccff3(0x389)](_0xa34273,this[_0x3ccff3(0x165)]);}};}async[_0x393dbe(0x36e)](_0x3e535c){const _0x13d607=_0x393dbe;var _0x36b9c7,_0x26db6b,_0x39aacc;let _0x4589ee=await((_0x36b9c7=this[_0x13d607(0x1cb)])==null?void 0x0:_0x36b9c7[_0x13d607(0x32e)](this[_0x13d607(0x165)])),_0x2de163=(_0x26db6b=_0x4589ee==null?void 0x0:_0x4589ee[_0x13d607(0x14b)])==null?[]:_0x26db6b,_0x5c7604=(_0x39aacc=_0x4589ee==null?void 0x0:_0x4589ee[_0x13d607(0x263)])==null?null:_0x39aacc,_0x25452e=!!(_0x5c7604!=null&&_0x5c7604[_0x13d607(0x2be)])&&!!(_0x5c7604!=null&&_0x5c7604['reqId']);this[_0x13d607(0x290)]=_0x25452e?_0x5c7604[_0x13d607(0x2be)]:(0x0,e['uuidv4'])(),this[_0x13d607(0x26d)]=_0x25452e?_0x5c7604[_0x13d607(0xfb)]:0x0;let _0x5f16c9=this['unitID'];try{this[_0x13d607(0x26e)](_0x5c7604,_0x2de163);}catch(_0x3fd10f){this[_0x13d607(0x253)]['error'](_0x3fd10f);}let _0x19ee97=this[_0x13d607(0x1e4)]();if(_0x3e535c){let _0x7daec=Te(this['_injector'],_0x5f16c9,this[_0x13d607(0x308)],_0x5c7604,_0x2de163,_0x19ee97);return _0x7daec instanceof j?_0x7daec[_0x13d607(0x359)]():(_0x7daec instanceof N||_0x7daec instanceof M)&&_0x7daec[_0x13d607(0x345)](),_0x7daec;}return this[_0x13d607(0x126)][_0x13d607(0x1a2)](F,_0x5f16c9,this[_0x13d607(0x308)],_0x5c7604,_0x2de163,_0x19ee97);}[_0x393dbe(0x26e)](_0x2edabe,_0x269637){const _0xd884f7=_0x393dbe;var _0x5b0fdb,_0x5c3d2c;let _0x81d9d4=this[_0xd884f7(0x343)]['interceptor'][_0xd884f7(0x205)](this[_0xd884f7(0x343)]['interceptor'][_0xd884f7(0x13a)]()['COMPRESS_MUTATION_APPLY']);(_0x5b0fdb=_0x81d9d4((_0x2edabe==null?void 0x0:_0x2edabe['mutations'])||[],null))==null||_0x5b0fdb[_0xd884f7(0x26a)](_0x1b0cf5=>this['_commandService'][_0xd884f7(0x305)](_0x1b0cf5['id'],_0x1b0cf5['params'])),(_0x5c3d2c=_0x81d9d4(_0x269637||[],null))==null||_0x5c3d2c[_0xd884f7(0x26a)](_0x193e7f=>this[_0xd884f7(0x1fc)][_0xd884f7(0x305)](_0x193e7f['id'],_0x193e7f[_0xd884f7(0x25f)]));}};L=y([v(0x3,(0x0,t[_0x393dbe(0x3b1)])(t['Injector'])),v(0x4,(0x0,t[_0x393dbe(0x3b1)])(e[_0x393dbe(0x2de)])),v(0x5,(0x0,t['Inject'])(t['LocaleService'])),v(0x6,(0x0,t['Inject'])(e['RevisionService'])),v(0x7,(0x0,t[_0x393dbe(0x3b1)])(_)),v(0x8,t[_0x393dbe(0x396)]),v(0x9,t[_0x393dbe(0x351)]),v(0xa,t[_0x393dbe(0x1ee)]),v(0xb,t[_0x393dbe(0x152)]),v(0xc,(0x0,t[_0x393dbe(0x219)])(w)),v(0xd,(0x0,t[_0x393dbe(0x219)])(S))],L);let R=class extends L{constructor(_0x3657e5,_0x383b11,_0xb472f3,_0x4bd8ad,_0x325e53,_0x18ddd0,_0x494602,_0x29e3b6,_0x520a67,_0x340052,_0x170c41,_0x4455ff,_0x54c002,_0x3f8225){const _0x5d17c5=_0x393dbe;super(_0x3657e5,_0xb472f3,_0x383b11,_0x4bd8ad,_0x325e53,_0x18ddd0,_0x494602,_0x29e3b6,_0x520a67,_0x340052,_0x170c41,_0x4455ff,_0x54c002,_0x3f8225),this[_0x5d17c5(0x165)]=_0x3657e5,this[_0x5d17c5(0x353)]=_0x383b11,g(this,'_handlerCallback',null);}['addHandlerCallback'](_0x29f29e){const _0x84b502=_0x393dbe;this[_0x84b502(0x35d)]=_0x29f29e;}['dispose'](){const _0x2d3f84=_0x393dbe;this[_0x2d3f84(0x35d)]=null,super[_0x2d3f84(0x3aa)]();}[_0x393dbe(0x1e4)](){const _0x3ef49c=_0x393dbe;let _0x4d180a=super[_0x3ef49c(0x1e4)]();return _0x4d180a['onTransformIME']=_0x1737b1=>{const _0x271867=_0x3ef49c;var _0x14cf7f,_0xb79476;return(_0x14cf7f=this[_0x271867(0x35d)])==null||(_0xb79476=_0x14cf7f[_0x271867(0x270)])==null?void 0x0:_0xb79476['call'](_0x14cf7f,_0x1737b1);},_0x4d180a[_0x3ef49c(0x28c)]=_0x5adfbe=>{const _0x3f3bb2=_0x3ef49c;var _0x458ffa,_0x5bffcb;return(_0x458ffa=this['_handlerCallback'])==null||(_0x5bffcb=_0x458ffa[_0x3f3bb2(0x28c)])==null?void 0x0:_0x5bffcb[_0x3f3bb2(0x33b)](_0x458ffa,_0x5adfbe);},_0x4d180a[_0x3ef49c(0x32b)]=_0xb360f3=>{const _0x32c0d6=_0x3ef49c;var _0x3ac391,_0x519d30;return(_0x3ac391=this[_0x32c0d6(0x35d)])==null||(_0x519d30=_0x3ac391[_0x32c0d6(0x32b)])==null?void 0x0:_0x519d30[_0x32c0d6(0x33b)](_0x3ac391,_0xb360f3);},_0x4d180a[_0x3ef49c(0x182)]=_0x3b149c=>{const _0x594b03=_0x3ef49c;var _0x566491,_0x124ee1;return(_0x566491=this['_handlerCallback'])==null||(_0x124ee1=_0x566491['onSyncEditingCollabCursor'])==null?void 0x0:_0x124ee1[_0x594b03(0x33b)](_0x566491,_0x3b149c);},_0x4d180a[_0x3ef49c(0x2d6)]=_0x336980=>{const _0x418515=_0x3ef49c;var _0x22d0b7,_0x193a41,_0x2b1dac;if(!((_0x22d0b7=this[_0x418515(0x35d)])!=null&&_0x22d0b7[_0x418515(0x2d6)]))throw Error(_0x418515(0x2ef));return(_0x193a41=this['_handlerCallback'])==null||(_0x2b1dac=_0x193a41[_0x418515(0x2d6)])==null?void 0x0:_0x2b1dac[_0x418515(0x33b)](_0x193a41,_0x336980);},_0x4d180a['onTransformRemoteChangesetByStateCache']=_0x384b6d=>{const _0x1f9796=_0x3ef49c;var _0x4262a0,_0x1f7160,_0x1d1ad9;if(!((_0x4262a0=this[_0x1f9796(0x35d)])!=null&&_0x4262a0[_0x1f9796(0x23c)]))throw Error(_0x1f9796(0x325));return(_0x1f7160=this[_0x1f9796(0x35d)])==null||(_0x1d1ad9=_0x1f7160['onTransformRemoteChangesetByStateCache'])==null?void 0x0:_0x1d1ad9[_0x1f9796(0x33b)](_0x1f7160,_0x384b6d);},_0x4d180a;}async[_0x393dbe(0x119)](){const _0x271e11=_0x393dbe;let _0x57c2c3=await super[_0x271e11(0x119)]();return this[_0x271e11(0x1bc)](this['_commandService'][_0x271e11(0x131)]((_0x2d40a8,_0x57641c)=>{const _0x181576=_0x271e11;if(_0x2d40a8[_0x181576(0x353)]!==t[_0x181576(0x39b)][_0x181576(0x3b0)]||_0x57641c!=null&&_0x57641c['fromCollab']||_0x57641c!=null&&_0x57641c['onlyLocal']||_0x2d40a8['id']===n[_0x181576(0x3b2)]['id'])return;let _0x38ae60=_0x2d40a8[_0x181576(0x25f)];if((_0x38ae60==null?void 0x0:_0x38ae60['unitId'])!==this[_0x181576(0x165)])return;let _0x5f57d3=_0x2d40a8,_0x5892fd=this[_0x181576(0x343)]['interceptor']['fetchThroughInterceptors'](this[_0x181576(0x343)][_0x181576(0x2b2)][_0x181576(0x13a)]()[_0x181576(0x344)])([_0x5f57d3],this[_0x181576(0x151)])||[_0x5f57d3];this[_0x181576(0x26f)](_0x5892fd[0x0]);})),_0x57c2c3;}};R=y([v(0x3,(0x0,t[_0x393dbe(0x3b1)])(t[_0x393dbe(0x1df)])),v(0x4,(0x0,t[_0x393dbe(0x3b1)])(e[_0x393dbe(0x2de)])),v(0x5,(0x0,t[_0x393dbe(0x3b1)])(t[_0x393dbe(0x34e)])),v(0x6,(0x0,t[_0x393dbe(0x3b1)])(e[_0x393dbe(0x21a)])),v(0x7,(0x0,t[_0x393dbe(0x3b1)])(_)),v(0x8,t[_0x393dbe(0x396)]),v(0x9,t['ILogService']),v(0xa,t[_0x393dbe(0x1ee)]),v(0xb,t[_0x393dbe(0x152)]),v(0xc,(0x0,t['Optional'])(w)),v(0xd,(0x0,t[_0x393dbe(0x219)])(S))],R);let z=class extends L{constructor(_0x29556c,_0x55987b,_0x2b5b1e,_0x51d6f3,_0x4b8379,_0x5731bb,_0x9575ac,_0x40515c,_0x3c1d75,_0x4fd2eb,_0x20541a,_0x581054,_0x11c89e,_0x5eac97,_0x388215){const _0x3f21a1=_0x393dbe;super(_0x29556c,_0x2b5b1e,_0x55987b,_0x51d6f3,_0x4b8379,_0x5731bb,_0x9575ac,_0x3c1d75,_0x4fd2eb,_0x20541a,_0x581054,_0x11c89e,_0x5eac97,_0x388215),this['unitID']=_0x29556c,this[_0x3f21a1(0x353)]=_0x55987b,this[_0x3f21a1(0x2c0)]=_0x40515c;}[_0x393dbe(0x1e4)](){const _0x107ad8=_0x393dbe;let _0x1a6b31=super[_0x107ad8(0x1e4)]();return _0x1a6b31[_0x107ad8(0x32b)]=_0x15562b=>this[_0x107ad8(0x2c0)][_0x107ad8(0x273)](_0x15562b),_0x1a6b31;}async[_0x393dbe(0x119)](){const _0x4d2008=_0x393dbe;let _0x170fa2=await super[_0x4d2008(0x119)]();return this[_0x4d2008(0x1bc)](this[_0x4d2008(0x1fc)][_0x4d2008(0x131)]((_0x4bc383,_0x4f4844)=>{const _0x134fd3=_0x4d2008;if(_0x4bc383[_0x134fd3(0x353)]!==t[_0x134fd3(0x39b)][_0x134fd3(0x3b0)]||_0x4f4844!=null&&_0x4f4844[_0x134fd3(0x243)]||_0x4f4844!=null&&_0x4f4844['onlyLocal'])return;let _0x4e83e7=_0x4bc383['params'];if((_0x4e83e7==null?void 0x0:_0x4e83e7[_0x134fd3(0x257)])!==this['unitID'])return;let _0x39e85a=_0x4bc383,_0x200d14=this[_0x134fd3(0x343)]['interceptor'][_0x134fd3(0x205)](this[_0x134fd3(0x343)][_0x134fd3(0x2b2)][_0x134fd3(0x13a)]()[_0x134fd3(0x344)])([_0x39e85a],this['_univerInstanceService'])||[_0x39e85a];this[_0x134fd3(0x26f)](_0x200d14[0x0]);})),_0x170fa2;}};z=y([v(0x3,(0x0,t['Inject'])(t[_0x393dbe(0x1df)])),v(0x4,(0x0,t[_0x393dbe(0x3b1)])(e['CompressMutationService'])),v(0x5,(0x0,t[_0x393dbe(0x3b1)])(t['LocaleService'])),v(0x6,(0x0,t['Inject'])(e[_0x393dbe(0x21a)])),v(0x7,(0x0,t['Inject'])(C)),v(0x8,(0x0,t['Inject'])(_)),v(0x9,t[_0x393dbe(0x396)]),v(0xa,t[_0x393dbe(0x351)]),v(0xb,t[_0x393dbe(0x1ee)]),v(0xc,t[_0x393dbe(0x152)]),v(0xd,(0x0,t[_0x393dbe(0x219)])(w)),v(0xe,(0x0,t[_0x393dbe(0x219)])(S))],z);const Ee=(0x0,t[_0x393dbe(0x108)])(_0x393dbe(0x2b1));function De(_0x1bd75c){const _0x14dbbd=_0x393dbe;let _0x441d5b=_0x1bd75c[_0x14dbbd(0x240)],_0x25072a=JSON[_0x14dbbd(0x2ff)](_0x441d5b);switch(_0x25072a[_0x14dbbd(0x2d7)]){case a[_0x14dbbd(0x16d)][_0x14dbbd(0x210)]:case a[_0x14dbbd(0x16d)][_0x14dbbd(0x2f6)]:{let _0x326395=_0x25072a['infoRsp'];return{..._0x25072a,'data':_0x326395,'cmd':_0x25072a['cmd']};}case a['CombCmd'][_0x14dbbd(0x35f)]:{let _0x59c55a=_0x25072a['joinRsp'];return{..._0x25072a,'data':_0x59c55a,'cmd':_0x25072a[_0x14dbbd(0x2d7)]};}case a[_0x14dbbd(0x16d)][_0x14dbbd(0x230)]:{let _0x2ccc5b=_0x25072a['collaMsg'];switch(_0x2ccc5b[_0x14dbbd(0x385)]){case e['CollaborationEvent'][_0x14dbbd(0x1b5)]:var _0x38f40e;return{..._0x25072a,'data':{..._0x2ccc5b,'data':(_0x38f40e=_0x2ccc5b[_0x14dbbd(0x324)])==null?void 0x0:_0x38f40e['cs']},'cmd':_0x25072a['cmd']};case e[_0x14dbbd(0x114)][_0x14dbbd(0x22b)]:var _0x1271ad;return{..._0x25072a,'data':{..._0x2ccc5b,'data':(_0x1271ad=_0x2ccc5b['csAckEvent'])==null?void 0x0:_0x1271ad['cs']},'cmd':_0x25072a[_0x14dbbd(0x2d7)]};case e[_0x14dbbd(0x114)][_0x14dbbd(0x249)]:var _0x141d33;return{..._0x25072a,'data':{..._0x2ccc5b,'data':(_0x141d33=_0x2ccc5b[_0x14dbbd(0x37c)])==null?void 0x0:_0x141d33['cs']},'cmd':_0x25072a[_0x14dbbd(0x2d7)]};case e['CollaborationEvent'][_0x14dbbd(0x148)]:var _0x2b948a;return{..._0x25072a,'data':{..._0x2ccc5b,'data':(_0x2b948a=_0x2ccc5b[_0x14dbbd(0xfa)])==null?void 0x0:_0x2b948a['cs']},'cmd':_0x25072a['cmd']};case e[_0x14dbbd(0x114)][_0x14dbbd(0x2a7)]:var _0x275493;return{..._0x25072a,'data':{..._0x2ccc5b,'data':(_0x275493=_0x2ccc5b[_0x14dbbd(0x39e)])==null?void 0x0:_0x275493['cs']},'cmd':_0x25072a[_0x14dbbd(0x2d7)]};case e['CollaborationEvent']['UPDATE_CURSOR']:return{..._0x25072a,'data':{..._0x2ccc5b,'data':_0x2ccc5b['updateCursorEvent']},'cmd':_0x25072a[_0x14dbbd(0x2d7)]};case e[_0x14dbbd(0x114)][_0x14dbbd(0x2f3)]:return{..._0x25072a,'data':{..._0x2ccc5b,'data':_0x2ccc5b[_0x14dbbd(0x1fe)]},'cmd':_0x25072a[_0x14dbbd(0x2d7)]};case e[_0x14dbbd(0x114)]['USERS_LEAVE']:return{..._0x25072a,'data':{..._0x2ccc5b,'data':_0x2ccc5b['leaveEvent']},'cmd':_0x25072a[_0x14dbbd(0x2d7)]};case e['CollaborationEvent']['LIVESHARE_NEW_HOST']:return{..._0x25072a,'data':{..._0x2ccc5b,'data':_0x2ccc5b[_0x14dbbd(0x369)]},'cmd':_0x25072a[_0x14dbbd(0x2d7)]};case e[_0x14dbbd(0x114)][_0x14dbbd(0x181)]:case e[_0x14dbbd(0x114)][_0x14dbbd(0x191)]:return{..._0x25072a,'data':{..._0x2ccc5b,'data':_0x2ccc5b[_0x14dbbd(0x284)]},'cmd':_0x25072a[_0x14dbbd(0x2d7)]};case e['CollaborationEvent'][_0x14dbbd(0x32c)]:return{..._0x25072a,'data':{..._0x2ccc5b,'data':_0x2ccc5b[_0x14dbbd(0x369)]},'cmd':_0x25072a[_0x14dbbd(0x2d7)]};case e['CollaborationEvent'][_0x14dbbd(0x262)]:return{..._0x25072a,'data':_0x2ccc5b,'cmd':_0x25072a[_0x14dbbd(0x2d7)]};case e[_0x14dbbd(0x114)][_0x14dbbd(0x1fb)]:return{..._0x25072a,'data':{..._0x2ccc5b,'data':_0x2ccc5b[_0x14dbbd(0x160)]},'cmd':_0x25072a[_0x14dbbd(0x2d7)]};case e[_0x14dbbd(0x114)]['UPDATE_PERMISSION_OBJ']:return{..._0x25072a,'data':{..._0x2ccc5b,'data':_0x2ccc5b[_0x14dbbd(0x2da)]},'cmd':_0x25072a[_0x14dbbd(0x2d7)]};case e[_0x14dbbd(0x114)]['SHOULD_CLOSE_CONN']:return{..._0x25072a,'data':{..._0x2ccc5b,'data':_0x2ccc5b['shouldCloseConn']},'cmd':_0x25072a[_0x14dbbd(0x2d7)]};case e[_0x14dbbd(0x114)][_0x14dbbd(0x1c6)]:return{..._0x25072a,'data':{..._0x2ccc5b,'data':_0x2ccc5b[_0x14dbbd(0x19e)]},'cmd':_0x25072a[_0x14dbbd(0x2d7)]};default:return _0x25072a;}}default:return _0x25072a;}}function Oe(_0x4e9df0){const _0x50c5cd=_0x393dbe;switch(_0x4e9df0[_0x50c5cd(0x2d7)]){case a[_0x50c5cd(0x16d)]['HEARTBEAT']:case a['CombCmd'][_0x50c5cd(0x2f6)]:return JSON[_0x50c5cd(0x265)]({'cmd':_0x4e9df0[_0x50c5cd(0x2d7)],'routeKey':_0x4e9df0['routeKey']});case a['CombCmd'][_0x50c5cd(0x172)]:{let _0xb78b54;switch(_0x4e9df0[_0x50c5cd(0x240)][_0x50c5cd(0x385)]){case e[_0x50c5cd(0x114)][_0x50c5cd(0x1d8)]:_0xb78b54={'eventID':e[_0x50c5cd(0x114)][_0x50c5cd(0x1d8)],'updateCursorEvent':_0x4e9df0[_0x50c5cd(0x240)]['data']};break;case e[_0x50c5cd(0x114)][_0x50c5cd(0x1d2)]:_0xb78b54={'eventID':e[_0x50c5cd(0x114)]['USERS_LEAVE'],'leaveEvent':_0x4e9df0[_0x50c5cd(0x240)][_0x50c5cd(0x240)]};break;case e[_0x50c5cd(0x114)]['USERS_ENTER']:_0xb78b54={'eventID':e[_0x50c5cd(0x114)][_0x50c5cd(0x2f3)],'joinEvent':_0x4e9df0[_0x50c5cd(0x240)]['data']};break;case e[_0x50c5cd(0x114)]['LIVESHARE_NEW_HOST']:_0xb78b54={'eventID':e[_0x50c5cd(0x114)][_0x50c5cd(0x32a)],'liveShareNewHost':_0x4e9df0[_0x50c5cd(0x240)][_0x50c5cd(0x240)]};break;case e[_0x50c5cd(0x114)]['LIVESHARE_OPERATION']:_0xb78b54={'eventID':e[_0x50c5cd(0x114)][_0x50c5cd(0x191)],'liveShareOperation':_0x4e9df0[_0x50c5cd(0x240)]['data']};break;case e[_0x50c5cd(0x114)][_0x50c5cd(0x32c)]:_0xb78b54={'eventID':e[_0x50c5cd(0x114)][_0x50c5cd(0x32c)],'liveShareTerminate':_0x4e9df0['data']['data']};break;case e[_0x50c5cd(0x114)][_0x50c5cd(0x215)]:_0xb78b54={'eventID':e['CollaborationEvent'][_0x50c5cd(0x215)],'liveShareRequestHost':_0x4e9df0['data'][_0x50c5cd(0x240)]};break;case e[_0x50c5cd(0x114)][_0x50c5cd(0x181)]:_0xb78b54={'eventID':e['CollaborationEvent'][_0x50c5cd(0x181)]};break;default:_0xb78b54={'eventID':_0x4e9df0[_0x50c5cd(0x240)][_0x50c5cd(0x385)]};}return JSON['stringify']({'cmd':_0x4e9df0['cmd'],'routeKey':_0x4e9df0[_0x50c5cd(0x10c)],'collaMsg':_0xb78b54});}case a['CombCmd']['JOIN']:return JSON[_0x50c5cd(0x265)]({'cmd':_0x4e9df0[_0x50c5cd(0x2d7)],'routeKey':_0x4e9df0[_0x50c5cd(0x10c)],'joinReq':_0x4e9df0[_0x50c5cd(0x240)]});case a[_0x50c5cd(0x16d)]['LEAVE']:return JSON[_0x50c5cd(0x265)]({'cmd':_0x4e9df0[_0x50c5cd(0x2d7)],'routeKey':_0x4e9df0[_0x50c5cd(0x10c)],'leaveReq':_0x4e9df0[_0x50c5cd(0x240)]});default:throw Error(_0x50c5cd(0x20e));}}const B=(0x0,t['createIdentifier'])('univer-pro.collaboration-client-socket-service');function ke(_0x41e5ca,_0x119c8,_0x4865de){return _0x41e5ca+'/'+_0x119c8+'/unit/'+_0x4865de+'/new_changes';}let V=class extends t[_0x393dbe(0x2fd)]{constructor(_0x48bdd3,_0x1f99dd,_0x53b864,_0x27d519,_0x12aced){const _0x219459=_0x393dbe;super(),this['_injector']=_0x48bdd3,this['_httpService']=_0x1f99dd,this[_0x219459(0x13c)]=_0x53b864,this['_logService']=_0x27d519,this[_0x219459(0x228)]=_0x12aced;}[_0x393dbe(0x29f)](_0x4ea0e4){const _0x3d0e6c=_0x393dbe;let _0x5cf2d2=this[_0x3d0e6c(0x126)][_0x3d0e6c(0x202)](c[_0x3d0e6c(0x157)]);if(!_0x5cf2d2)throw Error(_0x3d0e6c(0x348));let _0x108288=_0x5cf2d2[_0x3d0e6c(0x132)](_0x4ea0e4);if(!_0x108288)throw Error(_0x3d0e6c(0x18c));let _0x13a8e0=new t[(_0x3d0e6c(0x220))](),_0x57eda6=new i['Subject']();_0x13a8e0[_0x3d0e6c(0x37d)](_0x108288[_0x3d0e6c(0x310)][_0x3d0e6c(0x246)](_0x4c25f7=>_0x57eda6[_0x3d0e6c(0x20a)](_0x4c25f7))),_0x13a8e0[_0x3d0e6c(0x37d)]((0x0,t['toDisposable'])(()=>_0x57eda6[_0x3d0e6c(0x3ab)]()));let _0x22df6f=new i[(_0x3d0e6c(0x1aa))]();_0x13a8e0[_0x3d0e6c(0x37d)](_0x108288[_0x3d0e6c(0x30d)][_0x3d0e6c(0x246)](_0x425b91=>_0x22df6f[_0x3d0e6c(0x20a)](_0x425b91))),_0x13a8e0[_0x3d0e6c(0x37d)]((0x0,t['toDisposable'])(()=>_0x22df6f['complete']()));let _0x4ad1c3=new i[(_0x3d0e6c(0x1aa))]();_0x13a8e0[_0x3d0e6c(0x37d)](_0x108288[_0x3d0e6c(0x1e2)][_0x3d0e6c(0x246)](_0x1ab828=>{let _0x3e06bd=De(_0x1ab828);_0x4ad1c3['next'](_0x3e06bd);})),_0x13a8e0['add']((0x0,t['toDisposable'])(()=>_0x4ad1c3[_0x3d0e6c(0x3ab)]()));let _0x1f6664,_0x1add43=()=>{const _0x37274c=_0x3d0e6c;_0x22df6f[_0x37274c(0x20a)](new Event(_0x37274c(0x2dc))),_0x57eda6[_0x37274c(0x20a)](new Event(_0x37274c(0x2dc))),_0x1f6664['close']();};return _0x1f6664={'memberID':'','close$':_0x57eda6[_0x3d0e6c(0x2eb)](),'error$':_0x22df6f[_0x3d0e6c(0x2eb)](),'open$':_0x108288[_0x3d0e6c(0x14e)],'message$':_0x4ad1c3[_0x3d0e6c(0x2eb)](),'send':_0x33ce31=>{const _0x5a4df3=_0x3d0e6c;if(_0x33ce31[_0x5a4df3(0x2d7)]===a[_0x5a4df3(0x16d)][_0x5a4df3(0x172)]){if(_0x33ce31[_0x5a4df3(0x240)][_0x5a4df3(0x385)]===e['CollaborationEvent']['SUBMIT_CHANGESET']){this[_0x5a4df3(0x320)](_0x1f6664,_0x33ce31[_0x5a4df3(0x240)])['catch'](_0x4e400c=>{const _0x4a5647=_0x5a4df3;this[_0x4a5647(0x253)][_0x4a5647(0x23f)](_0x4e400c),_0x1add43();});return;}if(_0x33ce31[_0x5a4df3(0x240)]['eventID']===e[_0x5a4df3(0x114)][_0x5a4df3(0x29e)]){let _0x18e9d8=_0x33ce31[_0x5a4df3(0x240)];this[_0x5a4df3(0x1c7)](_0x18e9d8)[_0x5a4df3(0x269)](_0x432d00=>{const _0x5da009=_0x5a4df3;_0x4ad1c3[_0x5da009(0x20a)]({'cmd':a[_0x5da009(0x16d)][_0x5da009(0x230)],'code':a[_0x5da009(0x33e)]['OK'],'routeKey':_0x18e9d8[_0x5da009(0x240)][_0x5da009(0x165)],'routeType':'','data':{'eventID':e['CollaborationEvent']['PSEUDO_FETCH_MISSING_RESULT'],'data':{'changesets':_0x432d00}}});})[_0x5a4df3(0x22c)](_0x264b18=>{const _0x347e97=_0x5a4df3;this[_0x347e97(0x253)][_0x347e97(0x23f)](_0x264b18),_0x1add43();});return;}}_0x108288[_0x5a4df3(0x389)](Oe(_0x33ce31));},'close':()=>{const _0x8af61a=_0x3d0e6c;_0x108288[_0x8af61a(0x24b)](),_0x13a8e0[_0x8af61a(0x3aa)]();}},_0x1f6664;}async[_0x393dbe(0x320)](_0x17964c,_0xba88){const _0x5d834f=_0x393dbe;var _0x125522;let {unitType:_0x48cacc,unitID:_0x1f751e,changeset:_0xdd5da1}=_0xba88[_0x5d834f(0x240)],_0x4907f6={'unitID':_0x1f751e,'memberID':_0x17964c['memberID'],'type':_0x48cacc,'changeset':(0x0,e[_0x5d834f(0x1c4)])(_0xdd5da1)},_0x10e65c=this[_0x5d834f(0x13c)][_0x5d834f(0x1fa)](T),_0x3bce86=ke((_0x125522=_0x10e65c==null?void 0x0:_0x10e65c[_0x5d834f(0x34a)])==null?_0x5d834f(0x19a):_0x125522,_0x48cacc,_0x1f751e);try{await this[_0x5d834f(0x20c)][_0x5d834f(0x28a)](_0x3bce86,{'body':_0x4907f6});}catch(_0x23bfe8){throw this[_0x5d834f(0x253)][_0x5d834f(0x23f)](_0x5d834f(0x197),_0x5d834f(0x11a)),_0x23bfe8;}}async[_0x393dbe(0x1c7)](_0x432d2b){const _0x559ce1=_0x393dbe;let {unitID:_0x1b2cca,from:_0x48a366,to:_0xca2aeb,unitType:_0x3ed110}=_0x432d2b['data'];return(await this[_0x559ce1(0x228)]['fetchMissingChangesets']({'metadata':void 0x0},{'unitID':_0x1b2cca,'type':_0x3ed110,'from':_0x48a366,'to':_0xca2aeb}))[_0x559ce1(0x223)][_0x559ce1(0x186)](_0xd86e5b=>((_0xd86e5b[_0x559ce1(0x14b)]===null||_0xd86e5b[_0x559ce1(0x14b)]===void 0x0)&&(_0xd86e5b[_0x559ce1(0x14b)]=[]),_0xd86e5b));}};V=y([v(0x0,(0x0,t[_0x393dbe(0x3b1)])(t[_0x393dbe(0x1df)])),v(0x1,(0x0,t[_0x393dbe(0x3b1)])(c[_0x393dbe(0x129)])),v(0x2,t['IConfigService']),v(0x3,t['ILogService']),v(0x4,e[_0x393dbe(0x235)])],V);let H=class extends t[_0x393dbe(0x2fd)]{get[_0x393dbe(0x14c)](){const _0xc60b02=_0x393dbe;return this['_socket$'][_0xc60b02(0x192)]();}constructor(_0x4ae206,_0x15a591,_0x183ab5,_0x31130e,_0x42d135,_0x451aaf){const _0x4fa30d=_0x393dbe;super(),this[_0x4fa30d(0x126)]=_0x4ae206,this[_0x4fa30d(0x253)]=_0x15a591,this[_0x4fa30d(0x13c)]=_0x183ab5,this[_0x4fa30d(0x143)]=_0x31130e,this[_0x4fa30d(0x2b6)]=_0x42d135,this[_0x4fa30d(0x2ab)]=_0x451aaf,g(this,'_socket$',new i[(_0x4fa30d(0x1a1))](void 0x0)),g(this,_0x4fa30d(0x1a3),this['_socket$'][_0x4fa30d(0x2eb)]()),g(this,_0x4fa30d(0x250),null),g(this,_0x4fa30d(0x328),new Map()),g(this,'_status$',new i[(_0x4fa30d(0x1a1))](0x0)),g(this,_0x4fa30d(0x1b7),this['_status$'][_0x4fa30d(0x2eb)]()),g(this,_0x4fa30d(0x164),!0x1),g(this,_0x4fa30d(0x36c),void 0x0),g(this,'_retryCount',0x0),g(this,_0x4fa30d(0xfd),null),g(this,_0x4fa30d(0x203),void 0x0),g(this,_0x4fa30d(0x2ea),void 0x0),this[_0x4fa30d(0x319)]();}[_0x393dbe(0x319)](){const _0x22249c=_0x393dbe;this[_0x22249c(0x2ab)]&&this[_0x22249c(0x1bc)](this['_networkConditionService'][_0x22249c(0x261)]['subscribe'](_0x523093=>{const _0x402e7a=_0x22249c;_0x523093&&!this[_0x402e7a(0x14c)]&&this[_0x402e7a(0x1c5)](),_0x523093||this[_0x402e7a(0x386)]();}));}[_0x393dbe(0x3aa)](){const _0x58fb4e=_0x393dbe;var _0x453a3d;super[_0x58fb4e(0x3aa)](),(_0x453a3d=this[_0x58fb4e(0xfd)])==null||_0x453a3d[_0x58fb4e(0xf9)](),this[_0x58fb4e(0xfd)]=null,this[_0x58fb4e(0x17f)](),this[_0x58fb4e(0x321)](),this[_0x58fb4e(0xf0)](),this[_0x58fb4e(0x328)][_0x58fb4e(0x26a)](_0x34016d=>_0x34016d[_0x58fb4e(0x3aa)]()),this[_0x58fb4e(0x328)][_0x58fb4e(0x1ef)](),this[_0x58fb4e(0x307)][_0x58fb4e(0x3ab)]();}async[_0x393dbe(0x266)](_0x39b13e){const _0x54ff4f=_0x393dbe;if(this[_0x54ff4f(0x328)][_0x54ff4f(0x391)](_0x39b13e))return this[_0x54ff4f(0x328)][_0x54ff4f(0x202)](_0x39b13e);this[_0x54ff4f(0x323)]();let _0x48d7e4=this['_injector'][_0x54ff4f(0x1a2)](x,_0x39b13e,this[_0x54ff4f(0x113)][_0x54ff4f(0x2eb)]());return this[_0x54ff4f(0x328)][_0x54ff4f(0x393)](_0x39b13e,_0x48d7e4),_0x48d7e4;}[_0x393dbe(0x2b5)](_0x28b14a){const _0x1b729f=_0x393dbe;let _0x5178a7=this[_0x1b729f(0x328)][_0x1b729f(0x202)](_0x28b14a);if(_0x5178a7&&(this[_0x1b729f(0x328)][_0x1b729f(0x1ff)](_0x28b14a),_0x5178a7['close']()),!this[_0x1b729f(0x328)][_0x1b729f(0x222)]){var _0x1d2e7e;(_0x1d2e7e=this[_0x1b729f(0x14c)])==null||_0x1d2e7e[_0x1b729f(0x24b)]();}}[_0x393dbe(0x1c5)](){const _0x2ea812=_0x393dbe;this[_0x2ea812(0xdb)]=0x0,this[_0x2ea812(0x17f)](),this[_0x2ea812(0x3b5)]();}['_clearRetryConnectingTimer'](){const _0x1c425b=_0x393dbe;this['_retryConnectingTimer']!=null&&(clearTimeout(this[_0x1c425b(0x36c)]),this['_retryConnectingTimer']=null);}async[_0x393dbe(0x21e)](){const _0x48c4c1=_0x393dbe;var _0x486f3a;let _0x466ba0=this['_configService'][_0x48c4c1(0x1fa)](T),_0x2ce92d=(_0x486f3a=_0x466ba0==null?void 0x0:_0x466ba0[_0x48c4c1(0x237)])==null?p:_0x486f3a,_0x5022be=await this['_socketService']['createSocket'](_0x2ce92d);return this[_0x48c4c1(0x250)]=_0x5022be,_0x5022be;}async[_0x393dbe(0x323)](){const _0x3dd27e=_0x393dbe;try{var _0x22bff1,_0x1b5943;let _0x518b0a=(_0x22bff1=(_0x1b5943=this['_socket'])==null?this[_0x3dd27e(0x250)]:_0x1b5943)==null?await this[_0x3dd27e(0x21e)]():_0x22bff1;if(_0x518b0a){var _0xf04984;let _0x1d0c56=_0x518b0a['send'];_0x518b0a[_0x3dd27e(0x389)]=_0x336585=>(_0x336585[_0x3dd27e(0x2d7)]!==a[_0x3dd27e(0x16d)][_0x3dd27e(0x294)]&&this[_0x3dd27e(0x1bf)](),_0x1d0c56['apply'](_0x518b0a,[_0x336585])),(_0xf04984=this[_0x3dd27e(0xfd)])==null||_0xf04984[_0x3dd27e(0xf9)](),this[_0x3dd27e(0xfd)]=null,this[_0x3dd27e(0xfd)]=_0x518b0a[_0x3dd27e(0x1e2)]['subscribe'](_0x5831a5=>this[_0x3dd27e(0x3b8)](_0x518b0a,_0x5831a5)),_0x518b0a[_0x3dd27e(0x30d)][_0x3dd27e(0x297)]((0x0,s['take'])(0x1))[_0x3dd27e(0x246)](_0x3310a4=>this[_0x3dd27e(0x253)]['error']('[CollaborationSessionService]:\x20socket\x20error',_0x3310a4)),_0x518b0a[_0x3dd27e(0x14e)][_0x3dd27e(0x297)]((0x0,s[_0x3dd27e(0x281)])(0x1))['subscribe'](()=>{const _0x2081ee=_0x3dd27e;this[_0x2081ee(0x31c)](_0x518b0a);}),_0x518b0a['close$'][_0x3dd27e(0x297)]((0x0,s[_0x3dd27e(0x281)])(0x1))[_0x3dd27e(0x246)](_0x2811e0=>{const _0x3783d2=_0x3dd27e;this[_0x3783d2(0x253)][_0x3783d2(0x24e)](_0x3783d2(0x180),_0x3783d2(0x150),_0x2811e0),this['_onConnectionFailed']();});}}catch(_0x36f8c2){this[_0x3dd27e(0x253)][_0x3dd27e(0x23f)](_0x36f8c2),this[_0x3dd27e(0x232)]();}}[_0x393dbe(0x31c)](_0x324bcd){const _0x19397b=_0x393dbe;this[_0x19397b(0x253)][_0x19397b(0x24e)](_0x19397b(0x180),_0x19397b(0xe3)),_0x324bcd[_0x19397b(0x389)]({'cmd':a[_0x19397b(0x16d)][_0x19397b(0x2f6)]}),this[_0x19397b(0x1bf)]();}['_onOffline'](){const _0x215c95=_0x393dbe;this[_0x215c95(0x164)]=!0x1,this[_0x215c95(0x250)]=null,this['_status$'][_0x215c95(0x20a)](0x2),this[_0x215c95(0x113)]['next'](null),this['_clearTimeoutTimer'](),this[_0x215c95(0xf0)]();}[_0x393dbe(0x232)](){const _0x44aa36=_0x393dbe;var _0x18198b;this[_0x44aa36(0x386)](),this[_0x44aa36(0xdb)]<((_0x18198b=this[_0x44aa36(0x13c)][_0x44aa36(0x1fa)](_0x44aa36(0x2b3)))==null?0x3:_0x18198b)?(this['_collaborationUIEventService'][_0x44aa36(0x3a4)]({'id':_0x44aa36(0x34d)}),this['_tryReconnect']()):this['_collaborationUIEventService'][_0x44aa36(0x3a4)]({'id':'SOCKET_FAILED'});}[_0x393dbe(0x3b5)](){const _0x2cdd4b=_0x393dbe;var _0x275d49;let _0x4052dd=this[_0x2cdd4b(0xdb)],_0x47657e=this['_configService'][_0x2cdd4b(0x1fa)](T),_0x3ee07b=_0x4052dd===0x0?0x0:((_0x275d49=_0x47657e==null?void 0x0:_0x47657e[_0x2cdd4b(0x217)])==null?0x4e20:_0x275d49)*0x2**_0x4052dd;this[_0x2cdd4b(0x36c)]=setTimeout(()=>{const _0x16459a=_0x2cdd4b;clearTimeout(this['_retryConnectingTimer']),this[_0x16459a(0x36c)]=null,this[_0x16459a(0x323)]();},_0x3ee07b),this['_retryCount']+=0x1;}[_0x393dbe(0x3b8)](_0x45f3d2,_0x389717){const _0x56d87f=_0x393dbe;let {cmd:_0x1644d9}=_0x389717;_0x1644d9===a[_0x56d87f(0x16d)][_0x56d87f(0x2f6)]&&!this['_socketReady']&&(_0x45f3d2['memberID']=_0x389717[_0x56d87f(0x240)][_0x56d87f(0x1c3)],this['_socket$'][_0x56d87f(0x20a)](_0x45f3d2),this[_0x56d87f(0x307)][_0x56d87f(0x20a)](0x3),this[_0x56d87f(0x164)]=!0x0,this['_candidateSocket']=null),_0x1644d9===a[_0x56d87f(0x16d)][_0x56d87f(0x210)]&&this[_0x56d87f(0x321)](),this['_rescheduleHeartbeat']();}['_rescheduleHeartbeat'](){const _0x611130=_0x393dbe;var _0x7d3bc4;this[_0x611130(0xf0)](),this[_0x611130(0x203)]=setTimeout(()=>this['_sendHeartbeat'](),(_0x7d3bc4=this[_0x611130(0x13c)][_0x611130(0x1fa)](_0x611130(0x330)))==null?0x7530:_0x7d3bc4);}[_0x393dbe(0xdc)](){const _0x558f5c=_0x393dbe;this['_socket'][_0x558f5c(0x389)]({'cmd':a[_0x558f5c(0x16d)]['HEARTBEAT']}),this[_0x558f5c(0x2e3)]();}[_0x393dbe(0x2e3)](){const _0x3d80e3=_0x393dbe;var _0x5013e1;this[_0x3d80e3(0x2ea)]=setTimeout(()=>this[_0x3d80e3(0x232)](),(_0x5013e1=this['_configService'][_0x3d80e3(0x1fa)]('HEARTBEAT_TIMEOUT'))==null?m:_0x5013e1);}[_0x393dbe(0xf0)](){const _0xa16483=_0x393dbe;this['_sendHeartbeatTimer']!=null&&(clearTimeout(this[_0xa16483(0x203)]),this[_0xa16483(0x203)]=null);}[_0x393dbe(0x321)](){const _0x571dd0=_0x393dbe;this[_0x571dd0(0x2ea)]!=null&&(clearTimeout(this[_0x571dd0(0x2ea)]),this[_0x571dd0(0x2ea)]=null);}};H=y([v(0x0,(0x0,t[_0x393dbe(0x3b1)])(t[_0x393dbe(0x1df)])),v(0x1,t[_0x393dbe(0x351)]),v(0x2,t[_0x393dbe(0x14f)]),v(0x3,B),v(0x4,(0x0,t[_0x393dbe(0x3b1)])(_)),v(0x5,(0x0,t[_0x393dbe(0x219)])(Ee))],H);let U=class extends t[_0x393dbe(0x1c8)]{constructor(_0xc7b340,_0x412ad8,_0x2a9182,_0x4e572f){const _0x4e0e1b=_0x393dbe;var _0x3e38c3;super(),this[_0x4e0e1b(0x126)]=_0xc7b340,this[_0x4e0e1b(0x3b9)]=_0x412ad8,this['_configService']=_0x2a9182,this[_0x4e0e1b(0x151)]=_0x4e572f,g(this,_0x4e0e1b(0x27c),new Map()),g(this,_0x4e0e1b(0x299),new i[(_0x4e0e1b(0x1aa))]()),g(this,_0x4e0e1b(0x2f0),this['_entityInit$']['asObservable']()),((_0x3e38c3=this['_configService'][_0x4e0e1b(0x1fa)](_0x4e0e1b(0x12c)))==null?void 0x0:_0x3e38c3[_0x4e0e1b(0x26c)])!==!0x1&&this['_init']();}['dispose'](){const _0x45fe29=_0x393dbe;super['dispose'](),this[_0x45fe29(0x27c)][_0x45fe29(0x26a)](_0x182e28=>_0x182e28[_0x45fe29(0x3aa)]()),this[_0x45fe29(0x27c)][_0x45fe29(0x1ef)]();}[_0x393dbe(0x1b4)](_0x259739){const _0x7f2e92=_0x393dbe;var _0x34d628;return(_0x34d628=this[_0x7f2e92(0x27c)]['get'](_0x259739))==null?null:_0x34d628;}[_0x393dbe(0xdf)](_0x219d43){const _0xe45386=_0x393dbe;let _0x95e4ad=this[_0xe45386(0x1b4)](_0x219d43);return _0x95e4ad?(0x0,i['of'])(_0x95e4ad):this['_entityInit$'][_0xe45386(0x297)]((0x0,s[_0xe45386(0x378)])(_0x1daa53=>_0x1daa53[_0xe45386(0x165)]===_0x219d43));}[_0x393dbe(0x2fc)](_0xebb93){const _0x4919e5=_0x393dbe;return(0x0,i[_0x4919e5(0x2bc)])(this[_0x4919e5(0xdf)](_0xebb93)['pipe']((0x0,s[_0x4919e5(0x186)])(()=>void 0x0)));}[_0x393dbe(0x119)](){const _0x2c01fa=_0x393dbe;this[_0x2c01fa(0x151)][_0x2c01fa(0x28d)](t[_0x2c01fa(0x2db)]['UNIVER_SHEET'])[_0x2c01fa(0x297)]((0x0,i[_0x2c01fa(0x365)])(this['dispose$']),(0x0,s[_0x2c01fa(0x169)])(0x10))[_0x2c01fa(0x246)](async _0x598e39=>{const _0x581abb=_0x2c01fa;let _0x3b2d8d=_0x598e39[_0x581abb(0x128)][_0x581abb(0x366)](),_0x315b15=await this['_startCollaboration'](_0x3b2d8d,t[_0x581abb(0x2db)][_0x581abb(0x2e2)]);this[_0x581abb(0x27c)]['set'](_0x3b2d8d,_0x315b15);}),this[_0x2c01fa(0x151)][_0x2c01fa(0x28d)](t[_0x2c01fa(0x2db)][_0x2c01fa(0x2fa)])['pipe']((0x0,i['takeUntil'])(this[_0x2c01fa(0x33d)]),(0x0,s[_0x2c01fa(0x169)])(0x10))[_0x2c01fa(0x297)]((0x0,s[_0x2c01fa(0x378)])(_0xf33bd4=>!_0xf33bd4[_0x2c01fa(0x128)]['getUnitId']()['startsWith']('__')))[_0x2c01fa(0x246)](async _0x30889a=>{const _0x324c50=_0x2c01fa;let _0x243d01=_0x30889a[_0x324c50(0x128)]['getUnitId'](),_0x28d597=await this[_0x324c50(0x116)](_0x243d01,t[_0x324c50(0x2db)]['UNIVER_DOC']);this['_entities'][_0x324c50(0x393)](_0x243d01,_0x28d597);}),(0x0,i[_0x2c01fa(0x1a5)])(this[_0x2c01fa(0x151)][_0x2c01fa(0x1ed)](t[_0x2c01fa(0x2db)][_0x2c01fa(0x2e2)]),this[_0x2c01fa(0x151)][_0x2c01fa(0x1ed)](t[_0x2c01fa(0x2db)][_0x2c01fa(0x2fa)]))['pipe']((0x0,i[_0x2c01fa(0x365)])(this['dispose$']))[_0x2c01fa(0x246)](_0xb4fabb=>{const _0x556454=_0x2c01fa;let _0x2eeb83=_0xb4fabb[_0x556454(0x366)](),_0x39766a=this[_0x556454(0x27c)][_0x556454(0x202)](_0x2eeb83);_0x39766a&&(_0x39766a['dispose'](),this['_entities'][_0x556454(0x1ff)](_0x2eeb83));});}async[_0x393dbe(0x116)](_0x1ca1df,_0x31c72f){const _0x1754f6=_0x393dbe;let _0x364b69=await this[_0x1754f6(0x3b9)]['requireSession'](_0x1ca1df),_0x9b6897=this[_0x1754f6(0x126)][_0x1754f6(0x1a2)](this[_0x1754f6(0x2f5)](_0x31c72f),_0x1ca1df,_0x31c72f,_0x364b69);return await _0x9b6897['init'](),this[_0x1754f6(0x299)][_0x1754f6(0x20a)](_0x9b6897),_0x9b6897;}[_0x393dbe(0x2f5)](_0x6202b){const _0x23201b=_0x393dbe;switch(_0x6202b){case t[_0x23201b(0x2db)][_0x23201b(0x2fa)]:return R;case t[_0x23201b(0x2db)][_0x23201b(0x2e2)]:return z;default:throw Error(_0x23201b(0x259)+_0x6202b);}}};U=y([v(0x0,(0x0,t[_0x393dbe(0x3b1)])(t[_0x393dbe(0x1df)])),v(0x1,(0x0,t[_0x393dbe(0x3b1)])(H)),v(0x2,t[_0x393dbe(0x14f)]),v(0x3,t[_0x393dbe(0x396)])],U);var Ae=_0x393dbe(0x1c2),je=_0x393dbe(0x196);let Me=class extends t[_0x393dbe(0x2fd)]{constructor(_0x5f1e00,_0x2c192a){const _0xa432e7=_0x393dbe;super(),this['_univerInstanceService']=_0x5f1e00,this[_0xa432e7(0x13c)]=_0x2c192a,this[_0xa432e7(0x119)]();}[_0x393dbe(0x119)](){const _0x2e542e=_0x393dbe;this[_0x2e542e(0x1bc)](this[_0x2e542e(0x151)]['focused$'][_0x2e542e(0x246)](()=>{const _0x7feb8d=_0x2e542e;var _0x521c02;let _0x5b954a=this['_univerInstanceService'][_0x7feb8d(0x37a)](),_0x2f6bc4=(_0x521c02=this['_configService'][_0x7feb8d(0x1fa)](_0x7feb8d(0x2b4)))==null?'Univer':_0x521c02;_0x5b954a instanceof t['Workbook']&&(_0x2f6bc4=_0x5b954a[_0x7feb8d(0x373)]),document['title']=_0x2f6bc4;}));}};Me=y([v(0x0,t[_0x393dbe(0x396)]),v(0x1,t[_0x393dbe(0x14f)])],Me);let W=class{constructor(_0x49b1d1,_0x41caff,_0x2da75f){const _0x3c13fc=_0x393dbe;this['_configService']=_0x49b1d1,this[_0x3c13fc(0x20c)]=_0x41caff,this[_0x3c13fc(0x2bb)]=_0x2da75f,this['init']();}[_0x393dbe(0x1da)](){const _0x113a9b=_0x393dbe;this['_httpService'][_0x113a9b(0x2a0)]({'priority':0x1,'interceptor':(_0x542e08,_0x5319f0)=>_0x5319f0(_0x542e08)[_0x113a9b(0x297)]((0x0,i['concatMap'])(async _0x450930=>{const _0x4fb06e=_0x113a9b;let _0xbededf=_0x450930;if(_0xbededf[_0x4fb06e(0x22e)]===0x191){if(typeof window>'u')throw Error(_0x4fb06e(0xe2));if(window[_0x4fb06e(0x1f5)](this[_0x4fb06e(0x2bb)]['t'](_0x4fb06e(0x392)))){let _0x17921e=window[_0x4fb06e(0xf7)](window[_0x4fb06e(0x3a9)][_0x4fb06e(0x1ce)]);window['location'][_0x4fb06e(0x1ce)]=this['_getLoginPath']()+_0x4fb06e(0x275)+_0x17921e;}}return _0xbededf;}))});}[_0x393dbe(0xf3)](){const _0x21f425=_0x393dbe;var _0x2c221c;let _0x34f932=this[_0x21f425(0x13c)][_0x21f425(0x1fa)](T);return(_0x2c221c=_0x34f932==null?void 0x0:_0x34f932[_0x21f425(0x242)])==null?_0x21f425(0x372):_0x2c221c;}};W=y([v(0x0,t[_0x393dbe(0x14f)]),v(0x1,(0x0,t[_0x393dbe(0x3b1)])(c['HTTPService'])),v(0x2,(0x0,t[_0x393dbe(0x3b1)])(t['LocaleService']))],W);let G=class extends t[_0x393dbe(0x2fd)]{constructor(_0x549930,_0xc3e0a8){const _0x551ed8=_0x393dbe;super(),this['_HTTPService']=_0x549930,this[_0x551ed8(0x13c)]=_0xc3e0a8,g(this,_0x551ed8(0x30b),!0x1),this[_0x551ed8(0x189)]();}['_initMergeInterceptor'](){const _0xb55c04=_0x393dbe;let _0x1261ea=this;this[_0xb55c04(0x1bc)](this['_HTTPService']['registerHTTPInterceptor']({'priority':0x3e7,'interceptor':(0x0,c[_0xb55c04(0x33f)])({'isMatch'(_0x923dca){const _0x33fbdc=_0xb55c04;var _0x33d09b;if(_0x923dca['method']===_0x33fbdc(0xf1)&&(_0x33d09b=_0x923dca[_0x33fbdc(0x13f)])!=null&&_0x33d09b['body']){let {objectID:_0x20191c,objectType:_0x2114e7}=_0x923dca[_0x33fbdc(0x13f)]['body']||{};if(!_0x20191c||_0x2114e7===void 0x0)return!0x1;let _0x3f2e7e=_0x1261ea[_0x33fbdc(0x1f4)]()+'/'+_0x2114e7+_0x33fbdc(0x334)+_0x20191c+_0x33fbdc(0x1c9);if(_0x923dca[_0x33fbdc(0x133)]===_0x3f2e7e)return!0x0;}return!0x1;},'getParamsFromRequest'(_0x396bd3){const _0x739292=_0xb55c04;var _0x2dcbfd;return(_0x2dcbfd=_0x396bd3['requestParams'])==null?void 0x0:_0x2dcbfd[_0x739292(0x2f8)];},'mergeParamsToRequest'(_0xe3ffae,_0x271d09){const _0x8926e5=_0xb55c04;let _0x4d0c04=_0x1261ea[_0x8926e5(0x1f4)]()+_0x8926e5(0x28f),_0x4a99c4=_0xe3ffae[_0x8926e5(0x1f0)]((_0xcabe14,_0x40bc05)=>{const _0x4245a3=_0x8926e5;let {unitID:_0x2f62be,objectID:_0x164971,objectType:_0x179106,actions:_0x13957f}=_0x40bc05;return _0xcabe14[_0x2f62be]||(_0xcabe14[_0x2f62be]={}),_0xcabe14[_0x2f62be][_0x164971]||(_0xcabe14[_0x2f62be][_0x164971]={'objectID':_0x164971,'objectType':_0x179106,'actions':[]}),_0xcabe14[_0x2f62be][_0x164971][_0x4245a3(0x1ea)][_0x4245a3(0x1f8)](..._0x13957f),_0xcabe14;},{}),_0x172df4=[];for(let _0x21ac26 in _0x4a99c4)for(let _0x176e25 in _0x4a99c4[_0x21ac26]){let {actions:_0x1810b0,objectType:_0x2c0f3e}=_0x4a99c4[_0x21ac26][_0x176e25],_0xca5f0f=[...new Set(_0x1810b0)];_0x172df4['push']({'unitID':_0x21ac26,'objectID':_0x176e25,'objectType':_0x2c0f3e,'actions':_0xca5f0f});}return new c[(_0x8926e5(0x30e))](_0x8926e5(0xf1),_0x4d0c04,{'headers':_0x271d09[_0x8926e5(0x3be)],'withCredentials':_0x271d09['withCredentials'],'responseType':_0x271d09[_0x8926e5(0x2c9)],'body':{'requests':_0x172df4}});}},{'distributeResult'(_0x5744d0,_0x4f9d8a){const _0x21359e=_0xb55c04;let {objectActions:_0x41dcbb}=_0x5744d0;return _0x4f9d8a[_0x21359e(0x186)](_0x196c9a=>{const _0x211e0c=_0x21359e;let {unitID:_0x4c70a2,objectID:_0x10c1b7,actions:_0x4b0d41}=_0x196c9a,_0x559ee5=_0x41dcbb[_0x211e0c(0x3ae)](_0x4a849b=>_0x4a849b[_0x211e0c(0x165)]===_0x4c70a2&&_0x4a849b[_0x211e0c(0x24c)]===_0x10c1b7);return{'config':_0x196c9a,'result':{'actions':_0x4b0d41[_0x211e0c(0x186)](_0x37cdb5=>_0x559ee5==null?void 0x0:_0x559ee5[_0x211e0c(0x1ea)]['find'](_0x5afe42=>_0x5afe42[_0x211e0c(0x3b6)]===_0x37cdb5))['filter'](_0x62e43f=>!!_0x62e43f),'error':_0x5744d0[_0x211e0c(0x23f)]}};});}})}));}[_0x393dbe(0x1f4)](){const _0x299150=_0x393dbe;var _0x35050c;let _0x904740=this[_0x299150(0x13c)][_0x299150(0x1fa)](T);return(_0x35050c=_0x904740==null?void 0x0:_0x904740['authzUrl'])==null?_0x299150(0x311):_0x35050c;}async[_0x393dbe(0x2f9)](_0x8abfa8){const _0x1d31af=_0x393dbe;let _0x318450=this[_0x1d31af(0x1f4)]()+'/'+_0x8abfa8[_0x1d31af(0x352)]+_0x1d31af(0x36f);return(await this['_HTTPService'][_0x1d31af(0x28a)](_0x318450,{'body':_0x8abfa8}))[_0x1d31af(0x2f8)][_0x1d31af(0x24c)]||'';}async[_0x393dbe(0x102)](_0x52af63){const _0xbefc10=_0x393dbe;let _0x50d11c=this[_0xbefc10(0x1f4)]()+'/-/object/list';return(await this[_0xbefc10(0x153)][_0xbefc10(0x28a)](_0x50d11c,{'body':_0x52af63}))[_0xbefc10(0x2f8)]['objects'];}async[_0x393dbe(0x3a3)](_0x5de8a9){const _0xd3f2b0=_0x393dbe;var _0xa410df;let _0x5a27fb=this['_getAPIPrefixPath']()+'/'+_0x5de8a9['objectType']+'/object/'+_0x5de8a9['objectID'],_0x1b6ccf=await this[_0xd3f2b0(0x153)][_0xd3f2b0(0x2e9)](_0x5a27fb,{'body':_0x5de8a9});if((_0x1b6ccf==null||(_0xa410df=_0x1b6ccf[_0xd3f2b0(0x2f8)])==null||(_0xa410df=_0xa410df['error'])==null?void 0x0:_0xa410df[_0xd3f2b0(0x159)])!==0x1)throw Error('Failed\x20to\x20update\x20permission\x20point');}async[_0x393dbe(0x267)](_0x213c30){const _0x3c97c5=_0x393dbe;let _0x1e5359=this['_getAPIPrefixPath']()+'/'+_0x213c30[_0x3c97c5(0x352)]+_0x3c97c5(0x334)+_0x213c30[_0x3c97c5(0x24c)]+_0x3c97c5(0x1c9);return(await this['_HTTPService'][_0x3c97c5(0x28a)](_0x1e5359,{'body':_0x213c30}))[_0x3c97c5(0x2f8)][_0x3c97c5(0x1ea)];}async[_0x393dbe(0x177)](_0x306f1b){const _0x537a8b=_0x393dbe;let _0x1f1046=this[_0x537a8b(0x1f4)]()+_0x537a8b(0x28f);return(await this['_HTTPService']['post'](_0x1f1046,{'body':{'requests':_0x306f1b}}))[_0x537a8b(0x2f8)][_0x537a8b(0x313)];}async[_0x393dbe(0x120)](_0x19863d){const _0x59c2a2=_0x393dbe;let _0x2f84d6=this['_getAPIPrefixPath']()+'/'+_0x19863d['objectType']+_0x59c2a2(0x298),_0x42009d=await this[_0x59c2a2(0x153)][_0x59c2a2(0x28a)](_0x2f84d6,{'body':_0x19863d});return{'roles':_0x42009d[_0x59c2a2(0x2f8)][_0x59c2a2(0x3ac)],'actions':_0x42009d[_0x59c2a2(0x2f8)][_0x59c2a2(0x1ea)]};}async[_0x393dbe(0x183)](_0x4aa7b4){const _0x53a331=_0x393dbe;let _0x513f3b=this['_getAPIPrefixPath']()+'/collaborator';await this['_HTTPService'][_0x53a331(0x1ff)](_0x513f3b,{'params':{'collaboratorID':_0x4aa7b4['collaboratorID'],'objectID':_0x4aa7b4[_0x53a331(0x24c)],'unitID':_0x4aa7b4['unitID']}});}async['updateCollaborator'](_0x280e0a){const _0x5c3198=_0x393dbe;let _0x11fd48=this[_0x5c3198(0x1f4)]()+'/collaborator';await this[_0x5c3198(0x153)][_0x5c3198(0x11e)](_0x11fd48,{'body':_0x280e0a});}async[_0x393dbe(0x2b8)](_0x24dcfe){const _0x372c66=_0x393dbe;let _0x248c6c=this[_0x372c66(0x1f4)]()+_0x372c66(0x2e8);await this[_0x372c66(0x153)][_0x372c66(0x28a)](_0x248c6c,{'body':_0x24dcfe});}async['listCollaborators'](_0x48d4e1){const _0x31c920=_0x393dbe;var _0x37ad07;let _0x2fc120=this[_0x31c920(0x1f4)]()+'/collaborator',_0xf330f4=await this[_0x31c920(0x153)][_0x31c920(0x202)](_0x2fc120,{'params':{'objectID':_0x48d4e1[_0x31c920(0x24c)],'unitID':_0x48d4e1['unitID']}});return this[_0x31c920(0xf8)]((_0x37ad07=_0xf330f4[_0x31c920(0x2f8)][_0x31c920(0x2e7)])==null?!0x1:_0x37ad07),_0xf330f4['body'][_0x31c920(0x287)];}async[_0x393dbe(0x145)](_0x41cf8){const _0x89a984=_0x393dbe;let _0x264be6=this['_getAPIPrefixPath']()+_0x89a984(0x2e8);await this['_HTTPService']['put'](_0x264be6,{'body':_0x41cf8});}[_0x393dbe(0xf8)](_0x584d8d){const _0x42f9c3=_0x393dbe;this[_0x42f9c3(0x30b)]=_0x584d8d;}[_0x393dbe(0x1d5)](){const _0x32336c=_0x393dbe;return this[_0x32336c(0x30b)];}};G=y([v(0x0,(0x0,t[_0x393dbe(0x3b1)])(c['HTTPService'])),v(0x1,(0x0,t[_0x393dbe(0x3b1)])(t[_0x393dbe(0x14f)]))],G);function Ne(_0x428810){const _0x589a10=_0x393dbe;let _0x2667b0=atob(_0x428810),_0x1bd157=new Uint8Array(_0x2667b0[_0x589a10(0x176)]);for(let _0x4b2884=0x0;_0x4b2884<_0x2667b0[_0x589a10(0x176)];_0x4b2884++)_0x1bd157[_0x4b2884]=_0x2667b0['charCodeAt'](_0x4b2884);return _0x1bd157;}function Pe(_0xdb49c){const _0x5e41=_0x393dbe;let _0x397560='';for(let _0x488132=0x0;_0x488132<_0xdb49c[_0x5e41(0x176)];_0x488132++)_0x397560+=String[_0x5e41(0x363)](_0xdb49c[_0x488132]);return btoa(_0x397560);}function Fe(_0x206571,_0x2fbd89){const _0x147865=_0x393dbe;let _0xd0409e=Ne(_0x2fbd89),_0x112463=(0x0,f[_0x147865(0x238)])(0x10);return Pe((0x0,f['concatBytes'])(_0x112463,(0x0,d[_0x147865(0x2e4)])(_0xd0409e,_0x112463)[_0x147865(0x17a)]((0x0,f[_0x147865(0x123)])(_0x206571))));}function Ie(){const _0x186fce=_0x393dbe;let _0x41f6ee=(0x0,l[_0x186fce(0x198)])()[_0x186fce(0x3bb)];if(typeof window<'u'&&window[_0x186fce(0x3a9)]!==void 0x0&&_0x41f6ee){let _0x2cd448={'time':Math[_0x186fce(0x3bd)](Date['now']()/0x3e8),'domain':location[_0x186fce(0x221)]};return Fe(JSON[_0x186fce(0x265)](_0x2cd448),_0x41f6ee);}}let K=class{constructor(_0x12c06d){const _0x3124f1=_0x393dbe;this[_0x3124f1(0x20c)]=_0x12c06d,this[_0x3124f1(0x10e)]();}[_0x393dbe(0x10e)](){const _0xd14b8=_0x393dbe;this[_0xd14b8(0x20c)][_0xd14b8(0x2a0)]({'interceptor':(_0xb23ee,_0x4a2fc1)=>{const _0x49cefb=_0xd14b8;let _0x1cfd31=Ie();return _0x1cfd31&&_0xb23ee['headers'][_0x49cefb(0x393)](_0x49cefb(0xe0),_0x1cfd31),_0x4a2fc1(_0xb23ee);}});}};K=y([v(0x0,(0x0,t[_0x393dbe(0x3b1)])(c[_0x393dbe(0x129)]))],K);let q=class extends t[_0x393dbe(0x1c8)]{constructor(_0x1d0243,_0x4c2a1a,_0x515307){const _0x3b8264=_0x393dbe;super(),this[_0x3b8264(0x253)]=_0x1d0243,this[_0x3b8264(0x1ab)]=_0x4c2a1a,this[_0x3b8264(0x1cb)]=_0x515307,g(this,_0x3b8264(0x16f),new i[(_0x3b8264(0x1a1))](null)),g(this,_0x3b8264(0x2ed),this[_0x3b8264(0x16f)][_0x3b8264(0x2eb)]());}async[_0x393dbe(0x13e)](_0x1c98d6,_0x29040b,_0x2b76e9){const _0x1e8790=_0x393dbe;this[_0x1e8790(0x16f)][_0x1e8790(0x20a)]({'unitId':_0x1c98d6,'type':_0x29040b});let _0x366cec=null;switch(_0x29040b){case t[_0x1e8790(0x2db)][_0x1e8790(0x2e2)]:_0x366cec=await this[_0x1e8790(0x1ab)]['loadSheet'](_0x1c98d6,_0x2b76e9);break;case t[_0x1e8790(0x2db)]['UNIVER_DOC']:_0x366cec=await this[_0x1e8790(0x1ab)][_0x1e8790(0x2ca)](_0x1c98d6,_0x2b76e9);break;default:this[_0x1e8790(0x253)][_0x1e8790(0x23f)](_0x1e8790(0x1ba),'Unknown\x20type.\x20Will\x20not\x20load\x20files\x20from\x20remote\x20address.');break;}return _0x366cec;}async[_0x393dbe(0x329)](_0x78452d,_0x41ebfb,_0x401679){const _0x3f881d=_0x393dbe;var _0x2a60a5;this['_unitInfo$'][_0x3f881d(0x20a)]({'unitId':_0x78452d,'type':_0x41ebfb,'subUnitId':_0x401679});let _0x1a88af=0x0,_0x14d1d2=await((_0x2a60a5=this[_0x3f881d(0x1cb)])==null?void 0x0:_0x2a60a5[_0x3f881d(0x32e)](_0x78452d));return _0x14d1d2&&(_0x14d1d2['awaitingChangeset']||_0x14d1d2['mutations'][_0x3f881d(0x176)]!==0x0)&&(_0x1a88af=_0x14d1d2[_0x3f881d(0x2df)]),_0x1a88af===0x0&&this[_0x3f881d(0x253)][_0x3f881d(0x24e)]('[DataLoaderService]',_0x3f881d(0x354)),this[_0x3f881d(0x13e)](_0x78452d,_0x41ebfb,_0x1a88af);}};q=y([v(0x0,t[_0x393dbe(0x351)]),v(0x1,(0x0,t[_0x393dbe(0x3b1)])(e[_0x393dbe(0x233)])),v(0x2,(0x0,t[_0x393dbe(0x219)])(S))],q);let J=class{constructor(_0x3f0d7a,_0x421a6b,_0x373f7c){const _0x19fd85=_0x393dbe;this['_httpService']=_0x3f0d7a,this[_0x19fd85(0x13c)]=_0x421a6b,this[_0x19fd85(0x151)]=_0x373f7c,g(this,_0x19fd85(0xe7),0x0),g(this,'_change$',new i[(_0x19fd85(0x1aa))]()),g(this,'change$',this[_0x19fd85(0x322)]),g(this,_0x19fd85(0x394),new Map());}[_0x393dbe(0x3b7)](_0x4dee01){const _0x47a932=_0x393dbe;this[_0x47a932(0xe7)]=_0x4dee01,this[_0x47a932(0x322)][_0x47a932(0x20a)](_0x4dee01);}[_0x393dbe(0x277)](_0xe6f13a,_0x3c9cc4){const _0x5f211c=_0x393dbe;if(_0x3c9cc4===u['ImageSourceType'][_0x5f211c(0x236)]){let _0x11e7b0=new Image();return _0x11e7b0[_0x5f211c(0x36a)]=_0xe6f13a,_0x11e7b0;}return this[_0x5f211c(0x394)][_0x5f211c(0x202)](_0xe6f13a);}[_0x393dbe(0x170)](_0x7d8454,_0x2ebefc,_0x400ed8){const _0x3f82db=_0x393dbe;_0x2ebefc===u[_0x3f82db(0x1eb)]['BASE64']||_0x400ed8==null||this[_0x3f82db(0x394)][_0x3f82db(0x393)](_0x7d8454,_0x400ed8);}async['getImage'](_0x545f7f){const _0xab3d92=_0x393dbe;try{let _0x17e50e=this[_0xab3d92(0x314)](this['_getSignURL'](),''+_0x545f7f),_0x578aef=(await this[_0xab3d92(0x20c)][_0xab3d92(0x202)](_0x17e50e))[_0xab3d92(0x2f8)];if(_0x578aef[_0xab3d92(0x23f)]&&_0x578aef['error']['code']===a[_0xab3d92(0x30a)]['OK']){let _0x2e7cfd=(0x0,t[_0xab3d92(0x144)])(_0x578aef[_0xab3d92(0x133)],this[_0xab3d92(0x31a)]());return Promise['resolve'](_0x2e7cfd);}return Promise[_0xab3d92(0x35a)](_0x578aef[_0xab3d92(0x23f)]);}catch(_0x16f12e){return Promise[_0xab3d92(0x35a)](_0x16f12e);}}async['saveImage'](_0x2d2e93){const _0x199441=_0x393dbe;let _0x5f4d54='';if(!u[_0x199441(0xec)]['includes'](_0x2d2e93['type']))return this['_decreaseWaiting'](),Promise[_0x199441(0x35a)](Error(u[_0x199441(0x135)][_0x199441(0x1d4)]));if(_0x2d2e93['size']>(0x0,u['getDrawingImageAllowSize'])())return this[_0x199441(0x1d1)](),Promise['reject'](Error(u[_0x199441(0x135)][_0x199441(0x2c4)]));try{let _0x437e33=new FormData();_0x437e33['append']('file',_0x2d2e93);let _0x2f1daa=this['_univerInstanceService'][_0x199441(0x37a)](),_0x23a276=_0x2f1daa==null?void 0x0:_0x2f1daa[_0x199441(0x366)]();if(!_0x23a276)throw Error(_0x199441(0x2a1));let _0x226335=this[_0x199441(0x104)]()+'?size='+_0x2d2e93[_0x199441(0x222)][_0x199441(0x340)]()+_0x199441(0x3a2)+a[_0x199441(0x184)][_0x199441(0x35e)]+_0x199441(0x23a)+encodeURIComponent(_0x23a276),_0x3f9181={'body':_0x437e33},_0x55ab68=(await this['_httpService'][_0x199441(0x28a)](_0x226335,_0x3f9181))[_0x199441(0x2f8)];if(typeof _0x55ab68[_0x199441(0x377)]!=_0x199441(0x229))return this[_0x199441(0x1d1)](),Promise['reject'](Error(u[_0x199441(0x135)][_0x199441(0x21c)]));_0x5f4d54=_0x55ab68['FileId'];}catch{return this[_0x199441(0x1d1)](),Promise[_0x199441(0x35a)](Error(u[_0x199441(0x135)][_0x199441(0x21c)]));}return new Promise((_0x12e0c4,_0x5a4efc)=>{const _0x512aa3=_0x199441;let _0x32985b=new FileReader();_0x32985b[_0x512aa3(0x26b)](_0x2d2e93),_0x32985b[_0x512aa3(0x2e6)]=_0x1e879e=>{const _0x4f7e52=_0x512aa3;var _0x4b4f07;let _0x2b6b5e=(_0x4b4f07=_0x1e879e[_0x4f7e52(0x2a6)])==null?void 0x0:_0x4b4f07[_0x4f7e52(0x312)];if(_0x2b6b5e==null){this['_decreaseWaiting'](),_0x5a4efc(Error(u['ImageUploadStatusType'][_0x4f7e52(0x21c)]));return;}_0x12e0c4({'imageId':(0x0,t['generateRandomId'])(0x6),'imageSourceType':u['ImageSourceType']['UUID'],'source':_0x5f4d54,'base64Cache':_0x2b6b5e,'status':u[_0x4f7e52(0x135)]['SUCCUSS']}),this[_0x4f7e52(0x1d1)]();};});}[_0x393dbe(0x104)](){const _0x4724b7=_0x393dbe;var _0x4ff421;let _0x42d139=this[_0x4724b7(0x13c)][_0x4724b7(0x1fa)](T);return(_0x4ff421=_0x42d139==null?void 0x0:_0x42d139[_0x4724b7(0x2f4)])==null?'/universer-api/stream/file/upload':_0x4ff421;}[_0x393dbe(0x10a)](){const _0x1893c2=_0x393dbe;var _0x28c4b5;let _0x5c3302=this[_0x1893c2(0x13c)][_0x1893c2(0x1fa)](T);return(_0x28c4b5=_0x5c3302==null?void 0x0:_0x5c3302['signUrlServerUrl'])==null?_0x1893c2(0x289):_0x28c4b5;}[_0x393dbe(0x31a)](){const _0x5f3251=_0x393dbe;var _0x35d0fd;let _0x722bcb=this[_0x5f3251(0x13c)][_0x5f3251(0x1fa)](T);return(_0x35d0fd=_0x722bcb==null?void 0x0:_0x722bcb[_0x5f3251(0x38d)])==null?location['origin']:_0x35d0fd;}[_0x393dbe(0x314)](_0x54c1f4,_0x4afbae){const _0x2efbfd=_0x393dbe;return _0x54c1f4[_0x2efbfd(0x25c)]('{fileID}',_0x4afbae);}[_0x393dbe(0x1d1)](){const _0x138190=_0x393dbe;--this[_0x138190(0xe7)],this['_change$'][_0x138190(0x20a)](this[_0x138190(0xe7)]);}};J=y([v(0x0,(0x0,t[_0x393dbe(0x3b1)])(c[_0x393dbe(0x129)])),v(0x1,t[_0x393dbe(0x14f)]),v(0x2,(0x0,t[_0x393dbe(0x3b1)])(t['IUniverInstanceService']))],J);let Y=class{constructor(_0x206ad5,_0x19e49d){const _0x694a74=_0x393dbe;this['_configService']=_0x206ad5,this[_0x694a74(0x153)]=_0x19e49d;}['_getAPIPrefixPath'](){const _0x21ddeb=_0x393dbe;var _0x4ee846;let _0x2619c7=this[_0x21ddeb(0x13c)]['getConfig'](T);return(_0x4ee846=_0x2619c7==null?void 0x0:_0x2619c7[_0x21ddeb(0x24f)])==null?_0x21ddeb(0x311):_0x4ee846;}async['list'](_0x331cfa){const _0x31c147=_0x393dbe;let _0x2a5f4a=this[_0x31c147(0x1f4)]()+_0x31c147(0x2e8);return{'list':[{'title':_0x31c147(0x252),'mentions':(await this[_0x31c147(0x153)]['get'](_0x2a5f4a,{'params':{'objectID':_0x331cfa[_0x31c147(0x257)],'unitID':_0x331cfa[_0x31c147(0x257)]}}))[_0x31c147(0x2f8)][_0x31c147(0x287)][_0x31c147(0x186)](_0x258351=>({'objectId':_0x258351['id'],'name':_0x258351['subject'][_0x31c147(0x373)],'metadata':{'icon':_0x258351['subject'][_0x31c147(0x282)]},'label':_0x258351[_0x31c147(0x248)][_0x31c147(0x373)],'objectType':t[_0x31c147(0x27b)]['PERSON']})),'metadata':{},'type':t['MentionType']['PERSON']}]};}};Y=y([v(0x0,(0x0,t[_0x393dbe(0x3b1)])(t['IConfigService'])),v(0x1,(0x0,t['Inject'])(c[_0x393dbe(0x129)]))],Y);let X=class extends t['RxDisposable']{constructor(_0x39bb00,_0x2cd90c,_0x5b7f1e,_0x36a3d8,_0x360c73){const _0x41662c=_0x393dbe;super(),this[_0x41662c(0x126)]=_0x39bb00,this['_univerInstanceService']=_0x2cd90c,this[_0x41662c(0x318)]=_0x5b7f1e,this[_0x41662c(0x382)]=_0x36a3d8,this[_0x41662c(0x2b6)]=_0x360c73,this[_0x41662c(0x1cd)](),this['_initCloseConn']();}['_initCloseConn'](){const _0x344ea4=_0x393dbe;let _0x481962=async _0x80eac5=>{const _0x476c09=_0x4ff9;(await this[_0x476c09(0x382)]['requireSession'](_0x80eac5))['event$']['pipe']((0x0,s[_0x476c09(0x378)])(_0x5b93e0=>_0x5b93e0[_0x476c09(0x385)]===e[_0x476c09(0x114)][_0x476c09(0x304)]),(0x0,s[_0x476c09(0x365)])(this[_0x476c09(0x33d)]))['subscribe'](_0x2d8362=>{const _0xb9bedf=_0x476c09;let {reason:_0x2a0f08}=_0x2d8362[_0xb9bedf(0x240)];this[_0xb9bedf(0x2b6)]['emitEvent']({'id':_0xb9bedf(0x379),'data':_0x2a0f08}),this[_0xb9bedf(0x318)][_0xb9bedf(0x140)](new r['WorkbookEditablePermission'](_0x80eac5)['id'],!0x1),this['_collaborationSessionService'][_0xb9bedf(0x2b5)](_0x80eac5);});};(0x0,i[_0x344ea4(0x1a5)])(this[_0x344ea4(0x151)][_0x344ea4(0x28d)](t[_0x344ea4(0x2db)][_0x344ea4(0x2e2)]),this[_0x344ea4(0x151)][_0x344ea4(0x28d)](t['UniverInstanceType']['UNIVER_DOC']))[_0x344ea4(0x297)]((0x0,s['map'])(_0x395966=>_0x395966[_0x344ea4(0x128)][_0x344ea4(0x366)]()),(0x0,s[_0x344ea4(0x378)])(_0x160cad=>!(0x0,t[_0x344ea4(0x103)])(_0x160cad)),(0x0,s[_0x344ea4(0x365)])(this[_0x344ea4(0x33d)]))[_0x344ea4(0x246)](_0x63b9ce=>{_0x481962(_0x63b9ce);});}['_initUnitPermissionChange'](){const _0x335899=_0x393dbe;let _0x432eb7=async _0x1a3678=>{const _0x5636bc=_0x4ff9;let _0x3f96a0=await this[_0x5636bc(0x382)]['requireSession'](_0x1a3678),_0x478c09=this[_0x5636bc(0x126)]['get'](r[_0x5636bc(0x276)]);_0x3f96a0[_0x5636bc(0x27e)][_0x5636bc(0x297)]((0x0,s[_0x5636bc(0x378)])(_0x34cd85=>_0x34cd85[_0x5636bc(0x385)]===e['CollaborationEvent'][_0x5636bc(0x138)]),(0x0,s['takeUntil'])(this[_0x5636bc(0x33d)]))[_0x5636bc(0x246)](_0xaebeb3=>{const _0xb10dff=_0x5636bc;let {objectId:_0x2a196e}=_0xaebeb3[_0xb10dff(0x240)];_0x2a196e===_0x1a3678?_0x478c09[_0xb10dff(0x173)](_0x1a3678):_0x478c09[_0xb10dff(0x2d4)](_0x1a3678,_0x2a196e);});};(0x0,i[_0x335899(0x1a5)])(this['_univerInstanceService'][_0x335899(0x28d)](t[_0x335899(0x2db)][_0x335899(0x2e2)]))['pipe']((0x0,s[_0x335899(0x186)])(_0x1009fd=>_0x1009fd[_0x335899(0x128)][_0x335899(0x366)]()),(0x0,s['filter'])(_0x739ca3=>!(0x0,t['isInternalEditorID'])(_0x739ca3)),(0x0,s[_0x335899(0x365)])(this[_0x335899(0x33d)]))[_0x335899(0x246)](_0x13ddd3=>{_0x432eb7(_0x13ddd3);});}};X=y([v(0x0,(0x0,t[_0x393dbe(0x3b1)])(t[_0x393dbe(0x1df)])),v(0x1,t[_0x393dbe(0x396)]),v(0x2,t['IPermissionService']),v(0x3,(0x0,t[_0x393dbe(0x3b1)])(H)),v(0x4,(0x0,t[_0x393dbe(0x3b1)])(_))],X);let Z=class{constructor(_0x18f793,_0x5d8575){const _0x70a2fa=_0x393dbe;this[_0x70a2fa(0x13c)]=_0x18f793,this[_0x70a2fa(0x20c)]=_0x5d8575;}async[_0x393dbe(0x2d2)](_0x36fc42,_0x295f04){const _0x329442=_0x393dbe;var _0x389809;let {unitID:_0x51057b,type:_0x4c2a06,revision:_0x162b7c=0x0}=_0x295f04,_0x9eb71=this[_0x329442(0x29a)]()+'/'+_0x4c2a06+_0x329442(0x188)+_0x51057b+'/rev/'+_0x162b7c,_0x14d23e=(await this[_0x329442(0x20c)][_0x329442(0x202)](_0x9eb71))['body'],_0x56c46a=(_0x389809=_0x14d23e[_0x329442(0x2d8)])==null?void 0x0:_0x389809[_0x329442(0x1e7)];if(_0x56c46a){let _0x2b6465=_0x56c46a==null?void 0x0:_0x56c46a[_0x329442(0x1bb)];_0x56c46a[_0x329442(0x1bb)]=e['textEncoder'][_0x329442(0x11b)]((0x0,e[_0x329442(0x212)])(_0x2b6465)),Object[_0x329442(0x1de)](_0x56c46a[_0x329442(0x3a1)])[_0x329442(0x26a)](([,_0x6bc534])=>{const _0x4c109e=_0x329442;let _0x158a76=_0x6bc534[_0x4c109e(0x1bb)];_0x6bc534['originalMeta']=e[_0x4c109e(0x315)]['encode']((0x0,e[_0x4c109e(0x212)])(_0x158a76));});}return _0x14d23e;}async[_0x393dbe(0x20f)](_0x2d5dc3,_0x4f109f){const _0x34ef0e=_0x393dbe;let {unitID:_0x5e8a94,type:_0x4b5f32,blockID:_0x2f34f8}=_0x4f109f,_0x34fa28=this[_0x34ef0e(0x341)]()+'/'+_0x4b5f32+_0x34ef0e(0x188)+_0x5e8a94+'/block/'+_0x2f34f8;return(await this['_httpService'][_0x34ef0e(0x202)](_0x34fa28))[_0x34ef0e(0x2f8)];}async[_0x393dbe(0x1d6)](_0x1273d4,_0x139c2d){const _0x5dff4d=_0x393dbe;let {unitID:_0x3906c6,type:_0x8163c7,blockID:_0x2d333f}=_0x139c2d,_0x2e941b=this[_0x5dff4d(0x341)]()+_0x5dff4d(0x397)+_0x8163c7+_0x5dff4d(0x188)+_0x3906c6+_0x5dff4d(0x397)+_0x2d333f;return(await this[_0x5dff4d(0x20c)]['get'](_0x2e941b))[_0x5dff4d(0x2f8)];}async['fetchMissingChangesets'](_0x36b9a9,_0x30dc0e){const _0x56ea5c=_0x393dbe;let {unitID:_0x339810,type:_0x5223b0,from:_0x52ad6a,to:_0x18cfae}=_0x30dc0e,_0x5c5f02=this[_0x56ea5c(0x341)]()+'/'+_0x5223b0+_0x56ea5c(0x188)+_0x339810+'/fetchmissing?from='+_0x52ad6a+'&to='+_0x18cfae;return(await this[_0x56ea5c(0x20c)][_0x56ea5c(0x202)](_0x5c5f02))['body'];}['getSnapshotAPIPath'](){const _0x49bc11=_0x393dbe;var _0x49d910;return(_0x49d910=this['_configService'][_0x49bc11(0x1fa)](_0x49bc11(0x3a5)))==null?this[_0x49bc11(0x341)]():_0x49d910;}[_0x393dbe(0x341)](){const _0x243052=_0x393dbe;var _0x45629d;let _0x3e1987=this[_0x243052(0x13c)][_0x243052(0x1fa)](T);return(_0x45629d=_0x3e1987==null?void 0x0:_0x3e1987[_0x243052(0x1e6)])==null?_0x243052(0x34c):_0x45629d;}async[_0x393dbe(0x18b)](_0x5a13a1,_0x3c9caf){const _0x5d02ac=_0x393dbe;let _0x4c8011='/universer-api/snapshot/'+_0x3c9caf[_0x5d02ac(0x353)]+'/unit/'+_0x3c9caf[_0x5d02ac(0x165)]+'/resources';return(await this[_0x5d02ac(0x20c)][_0x5d02ac(0x202)](_0x4c8011,{'params':{'resourceId':JSON['stringify'](_0x3c9caf[_0x5d02ac(0x2e1)])}}))[_0x5d02ac(0x2f8)];}[_0x393dbe(0x12a)](){const _0x17545a=_0x393dbe;throw Error(_0x17545a(0x174));}[_0x393dbe(0x244)](){const _0x165c26=_0x393dbe;throw Error(_0x165c26(0x174));}[_0x393dbe(0x1c0)](){const _0x36e98a=_0x393dbe;throw Error(_0x36e98a(0x174));}[_0x393dbe(0x214)](){throw Error('This\x20method\x20should\x20not\x20be\x20called\x20on\x20the\x20client\x20side!');}[_0x393dbe(0x2cf)](){const _0xe03064=_0x393dbe;throw Error(_0xe03064(0x174));}['getLatestCsReqIdBySid'](){throw Error('This\x20method\x20should\x20not\x20be\x20called\x20on\x20the\x20client\x20side!');}};Z=y([v(0x0,t['IConfigService']),v(0x1,(0x0,t[_0x393dbe(0x3b1)])(c[_0x393dbe(0x129)]))],Z);let Q=class extends t[_0x393dbe(0x37f)]{constructor(_0x190759,_0x115833,_0xea72f9,_0x3c9a3c,_0x141983){const _0x3b4a1e=_0x393dbe;super(_0x190759,_0x115833,_0xea72f9),this['_transformService']=_0x3c9a3c,this[_0x3b4a1e(0x253)]=_0x141983;}[_0x393dbe(0x35c)](_0x5c06d7,_0x176fc6){const _0x228254=_0x393dbe;let _0x18003d=this['_getUndoStack'](_0x5c06d7);if(_0x18003d)try{let _0x5a71d9=this[_0x228254(0x15b)](_0x18003d,_0x176fc6);this[_0x228254(0x154)](_0x5c06d7,_0x5a71d9);}catch(_0x21c69d){this[_0x228254(0x253)][_0x228254(0x23f)](_0x228254(0x300),_0x21c69d),this[_0x228254(0x16e)](_0x5c06d7);}let _0x4351f7=this['_getRedoStack'](_0x5c06d7);if(_0x4351f7)try{let _0x20a606=this['_transformStack'](_0x4351f7,_0x176fc6);this[_0x228254(0x2ad)](_0x5c06d7,_0x20a606);}catch(_0x39923c){this[_0x228254(0x253)]['error'](_0x39923c),this[_0x228254(0xe6)](_0x5c06d7);}}[_0x393dbe(0x16e)](_0x369dab){const _0x2ee746=_0x393dbe;let _0x191e9d=this[_0x2ee746(0x1f7)](_0x369dab);_0x191e9d&&(_0x191e9d['length']=0x0,this[_0x2ee746(0x1d0)]());}[_0x393dbe(0xe6)](_0x577473){const _0x392215=_0x393dbe;let _0x33c426=this[_0x392215(0x283)](_0x577473);_0x33c426&&(_0x33c426['length']=0x0,this[_0x392215(0x1d0)]());}['_substituteUndoStack'](_0x2df666,_0x26b7e0){const _0x450932=_0x393dbe;this[_0x450932(0x1cf)]['set'](_0x2df666,_0x26b7e0),this[_0x450932(0x1d0)]();}['_substituteRedoStack'](_0x490c58,_0x267020){const _0x35de8d=_0x393dbe;this[_0x35de8d(0x149)]['set'](_0x490c58,_0x267020),this[_0x35de8d(0x1d0)]();}[_0x393dbe(0x15b)](_0x842a09,_0x332bdf){const _0x1ff737=_0x393dbe;let _0x1f5810=[],_0x137021=_0x332bdf,_0x38cb82=_0x332bdf;for(let _0x395873=_0x842a09[_0x1ff737(0x176)]-0x1;_0x395873>=0x0;_0x395873--){let {unitID:_0x15341a,undoMutations:_0x59227c,redoMutations:_0x7532d7}=_0x842a09[_0x395873],_0x13234d=this[_0x1ff737(0x20d)]['transformMutationsWithChangeset'](_0x137021,_0x59227c),_0x110284=this[_0x1ff737(0x20d)][_0x1ff737(0x14a)](_0x38cb82,_0x7532d7);if((0x0,e[_0x1ff737(0x2a2)])(_0x13234d)||(0x0,e[_0x1ff737(0x2a2)])(_0x110284)){this[_0x1ff737(0x253)]['error'](_0x1ff737(0x300),_0x1ff737(0x15a),_0x13234d,_0x110284);break;}_0x137021=_0x13234d[_0x1ff737(0x137)],_0x38cb82=_0x110284[_0x1ff737(0x137)],_0x1f5810[_0x1ff737(0x1f8)]({'unitID':_0x15341a,'undoMutations':_0x13234d[_0x1ff737(0x36d)],'redoMutations':_0x110284[_0x1ff737(0x36d)]});}return _0x1f5810[_0x1ff737(0x1dd)]();}};Q=y([v(0x0,t[_0x393dbe(0x396)]),v(0x1,t[_0x393dbe(0x1ee)]),v(0x2,t[_0x393dbe(0x291)]),v(0x3,e[_0x393dbe(0x268)]),v(0x4,t[_0x393dbe(0x351)])],Q);let $=class extends t[_0x393dbe(0x17e)]{constructor(_0x5de15c={},_0x5490d7,_0x15d17a,_0x2a8a60){const _0x32d0bc=_0x393dbe;super(),this['_config']=_0x5de15c,this['_logService']=_0x5490d7,this[_0x32d0bc(0x126)]=_0x15d17a,this[_0x32d0bc(0x13c)]=_0x2a8a60;let {..._0x540c6b}=(0x0,t['merge'])({},de,_0x5de15c);if(!_0x540c6b[_0x32d0bc(0x12b)])throw Error('[UniverCollaborationClientPlugin]:\x20you\x20must\x20provide\x20a\x20socketService\x20implementation\x20in\x20config!');this[_0x32d0bc(0x375)]=_0x540c6b,this[_0x32d0bc(0x13c)][_0x32d0bc(0x2ee)](T,_0x540c6b);}[_0x393dbe(0x357)](){const _0xed2abf=_0x393dbe;this[_0xed2abf(0x1e3)](),this[_0xed2abf(0x156)]();}[_0x393dbe(0x1e3)](){const _0x545ddc=_0x393dbe;var _0x3edd82,_0x2fdad5;this['_injector'][_0x545ddc(0x391)](t[_0x545ddc(0x18f)])&&this['_logService'][_0x545ddc(0x23f)](_0x545ddc(0x384),_0x545ddc(0x19f));let _0x5b8415=(0x0,t['mergeOverrideWithDependencies'])([[t[_0x545ddc(0x18f)],{'useClass':Q}],[H],[b],[C],[W],[K],[ie],[X],[_],[q],[B,{'useClass':this['_config'][_0x545ddc(0x12b)]}],[e[_0x545ddc(0x235)],{'useClass':Z}],[t[_0x545ddc(0x2e0)],{'useClass':G}],[u['IImageIoService'],{'useClass':J}],[t[_0x545ddc(0x335)],{'useClass':Y}],[U],[Me]],(_0x3edd82=this[_0x545ddc(0x375)])==null?void 0x0:_0x3edd82[_0x545ddc(0x376)]);if(!((_0x2fdad5=this[_0x545ddc(0x375)])!=null&&_0x2fdad5[_0x545ddc(0x21d)])){let _0x21d33b=_0x5b8415['findIndex'](([_0x1746ac])=>_0x1746ac===w);_0x21d33b!==-0x1&&_0x5b8415['splice'](_0x21d33b,0x1);}(0x0,t[_0x545ddc(0x10d)])(this[_0x545ddc(0x126)],_0x5b8415);}[_0x393dbe(0x156)](){const _0xf44221=_0x393dbe;var _0x5b62e3,_0x73ec9b;if(this[_0xf44221(0x126)][_0xf44221(0x202)](c[_0xf44221(0x129)])[_0xf44221(0x2a0)]({'priority':0x14,'interceptor':(0x0,c[_0xf44221(0x127)])({'maxParallel':0x6})}),!((_0x5b62e3=this[_0xf44221(0x375)])!=null&&_0x5b62e3[_0xf44221(0x136)])){var _0x5252a4;(_0x5252a4=this[_0xf44221(0x126)]['get'](S,t[_0xf44221(0x206)]['OPTIONAL']))==null||_0x5252a4[_0xf44221(0xfe)]();}(_0x73ec9b=this[_0xf44221(0x375)])!=null&&_0x73ec9b[_0xf44221(0x106)]&&(0x0,t[_0xf44221(0x224)])(this[_0xf44221(0x126)],[[W]]),(0x0,t[_0xf44221(0x224)])(this['_injector'],[[K],[U],[X]]);}};g($,_0x393dbe(0x29c),_0x393dbe(0x11f)),g($,_0x393dbe(0x3bf),Ae),g($,_0x393dbe(0x168),je),$=y([(0x0,t[_0x393dbe(0x166)])(l[_0x393dbe(0x302)],e[_0x393dbe(0x21f)],c[_0x393dbe(0x3a0)]),v(0x1,t[_0x393dbe(0x351)]),v(0x2,(0x0,t[_0x393dbe(0x3b1)])(t[_0x393dbe(0x1df)])),v(0x3,t[_0x393dbe(0x14f)])],$),Object[_0x393dbe(0x255)](exports,_0x393dbe(0x2fe),{'enumerable':!0x0,'get':function(){return G;}}),Object[_0x393dbe(0x255)](exports,_0x393dbe(0x208),{'enumerable':!0x0,'get':function(){return M;}}),Object[_0x393dbe(0x255)](exports,_0x393dbe(0x178),{'enumerable':!0x0,'get':function(){return N;}}),exports['COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY']=T,Object['defineProperty'](exports,'CollaborationController',{'enumerable':!0x0,'get':function(){return U;}}),Object['defineProperty'](exports,_0x393dbe(0x1e5),{'enumerable':!0x0,'get':function(){return L;}}),Object[_0x393dbe(0x255)](exports,_0x393dbe(0x2b7),{'enumerable':!0x0,'get':function(){return J;}}),Object['defineProperty'](exports,_0x393dbe(0xf6),{'enumerable':!0x0,'get':function(){return x;}}),Object[_0x393dbe(0x255)](exports,'CollaborationSessionService',{'enumerable':!0x0,'get':function(){return H;}}),Object[_0x393dbe(0x255)](exports,_0x393dbe(0x39c),{'enumerable':!0x0,'get':function(){return V;}}),exports[_0x393dbe(0x213)]=Se,exports[_0x393dbe(0x2c6)]=re,exports[_0x393dbe(0x195)]=_,Object[_0x393dbe(0x255)](exports,_0x393dbe(0x200),{'enumerable':!0x0,'get':function(){return Q;}}),exports['CommentService']=ie,Object['defineProperty'](exports,_0x393dbe(0x2a8),{'enumerable':!0x0,'get':function(){return P;}}),exports[_0x393dbe(0x350)]=p,exports[_0x393dbe(0x18e)]=_0x393dbe(0x1a8),exports[_0x393dbe(0x10f)]='/universer-api/user/session-ticket',Object[_0x393dbe(0x255)](exports,_0x393dbe(0xef),{'enumerable':!0x0,'get':function(){return q;}}),Object[_0x393dbe(0x255)](exports,_0x393dbe(0x39d),{'enumerable':!0x0,'get':function(){return R;}}),Object[_0x393dbe(0x255)](exports,'FetchingMissState',{'enumerable':!0x0,'get':function(){return I;}}),exports[_0x393dbe(0x2c1)]=_0x393dbe(0x330),exports[_0x393dbe(0x383)]=_0x393dbe(0x338),exports['ICollaborationSocketService']=B,exports[_0x393dbe(0x29d)]=S,exports[_0x393dbe(0x141)]=Ee,exports[_0x393dbe(0x399)]=w,exports['LOCAL_CACHE_INTERVAL']=0x3e8,exports['LOCAL_CACHE_INTERVAL_KEY']=_0x393dbe(0x358),Object[_0x393dbe(0x255)](exports,_0x393dbe(0x19c),{'enumerable':!0x0,'get':function(){return b;}}),Object[_0x393dbe(0x255)](exports,_0x393dbe(0x355),{'enumerable':!0x0,'get':function(){return Y;}}),Object[_0x393dbe(0x255)](exports,_0x393dbe(0x258),{'enumerable':!0x0,'get':function(){return F;}}),Object[_0x393dbe(0x255)](exports,'PendingState',{'enumerable':!0x0,'get':function(){return j;}}),exports['REMOTE_UNISCRIPT_EXECUTION_ENDPOINT_KEY']=_0x393dbe(0x339),exports[_0x393dbe(0x30c)]=_0x393dbe(0x2b3),exports[_0x393dbe(0x27f)]=oe,Object[_0x393dbe(0x255)](exports,_0x393dbe(0x2a4),{'enumerable':!0x0,'get':function(){return z;}}),Object[_0x393dbe(0x255)](exports,_0x393dbe(0x3b3),{'enumerable':!0x0,'get':function(){return C;}}),Object['defineProperty'](exports,_0x393dbe(0x327),{'enumerable':!0x0,'get':function(){return Z;}}),Object[_0x393dbe(0x255)](exports,_0x393dbe(0x36b),{'enumerable':!0x0,'get':function(){return A;}}),exports[_0x393dbe(0x147)]=ue,Object[_0x393dbe(0x255)](exports,_0x393dbe(0x37e),{'enumerable':!0x0,'get':function(){return $;}}),exports[_0x393dbe(0x1ec)]=De,exports[_0x393dbe(0xea)]=ce,exports[_0x393dbe(0x301)]=Oe;