@univerjs-pro/collaboration-client 0.21.0 → 0.21.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.
- package/lib/cjs/facade.js +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/locale/ca-ES.js +1 -1
- package/lib/cjs/locale/en-US.js +1 -1
- package/lib/cjs/locale/es-ES.js +1 -1
- package/lib/cjs/locale/fa-IR.js +1 -1
- package/lib/cjs/locale/fr-FR.js +1 -1
- package/lib/cjs/locale/ja-JP.js +1 -1
- package/lib/cjs/locale/ko-KR.js +1 -1
- package/lib/cjs/locale/ru-RU.js +1 -1
- package/lib/cjs/locale/sk-SK.js +1 -1
- package/lib/cjs/locale/vi-VN.js +1 -1
- package/lib/cjs/locale/zh-CN.js +1 -1
- package/lib/cjs/locale/zh-TW.js +1 -1
- package/lib/es/facade.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/es/locale/ca-ES.js +1 -1
- package/lib/es/locale/en-US.js +1 -1
- package/lib/es/locale/es-ES.js +1 -1
- package/lib/es/locale/fa-IR.js +1 -1
- package/lib/es/locale/fr-FR.js +1 -1
- package/lib/es/locale/ja-JP.js +1 -1
- package/lib/es/locale/ko-KR.js +1 -1
- package/lib/es/locale/ru-RU.js +1 -1
- package/lib/es/locale/sk-SK.js +1 -1
- package/lib/es/locale/vi-VN.js +1 -1
- package/lib/es/locale/zh-CN.js +1 -1
- package/lib/es/locale/zh-TW.js +1 -1
- package/lib/facade.js +1 -1
- package/lib/index.js +1 -1
- package/lib/locale/ca-ES.js +1 -1
- package/lib/locale/en-US.js +1 -1
- package/lib/locale/es-ES.js +1 -1
- package/lib/locale/fa-IR.js +1 -1
- package/lib/locale/fr-FR.js +1 -1
- package/lib/locale/ja-JP.js +1 -1
- package/lib/locale/ko-KR.js +1 -1
- package/lib/locale/ru-RU.js +1 -1
- package/lib/locale/sk-SK.js +1 -1
- package/lib/locale/vi-VN.js +1 -1
- package/lib/locale/zh-CN.js +1 -1
- package/lib/locale/zh-TW.js +1 -1
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +1 -1
- package/lib/umd/locale/ca-ES.js +1 -1
- package/lib/umd/locale/en-US.js +1 -1
- package/lib/umd/locale/es-ES.js +1 -1
- package/lib/umd/locale/fa-IR.js +1 -1
- package/lib/umd/locale/fr-FR.js +1 -1
- package/lib/umd/locale/ja-JP.js +1 -1
- package/lib/umd/locale/ko-KR.js +1 -1
- package/lib/umd/locale/ru-RU.js +1 -1
- package/lib/umd/locale/sk-SK.js +1 -1
- package/lib/umd/locale/vi-VN.js +1 -1
- package/lib/umd/locale/zh-CN.js +1 -1
- package/lib/umd/locale/zh-TW.js +1 -1
- package/package.json +11 -11
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x35406f=_0x4d20;(function(_0x533e1f,_0x48f3ef){const _0x24995e=_0x4d20,_0x3f9b74=_0x533e1f();while(!![]){try{const _0x4b312a=parseInt(_0x24995e(0x102))/0x1*(parseInt(_0x24995e(0x290))/0x2)+parseInt(_0x24995e(0x282))/0x3+-parseInt(_0x24995e(0x38e))/0x4+parseInt(_0x24995e(0x3bb))/0x5+-parseInt(_0x24995e(0x289))/0x6+-parseInt(_0x24995e(0x2a5))/0x7+-parseInt(_0x24995e(0x2eb))/0x8;if(_0x4b312a===_0x48f3ef)break;else _0x3f9b74['push'](_0x3f9b74['shift']());}catch(_0x39ef3b){_0x3f9b74['push'](_0x3f9b74['shift']());}}}(_0x2fc4,0x5b2c2),Object[_0x35406f(0x105)](exports,Symbol[_0x35406f(0x11d)],{'value':'Module'}));let _univerjs_pro_collaboration=require('@univerjs-pro/collaboration'),_univerjs_core=require('@univerjs/core'),_univerjs_docs=require('@univerjs/docs'),_univerjs_sheets=require('@univerjs/sheets'),rxjs=require('rxjs'),_univerjs_protocol=require('@univerjs/protocol'),_univerjs_telemetry=require('@univerjs/telemetry'),rxjs_operators=require('rxjs/operators'),_univerjs_network=require('@univerjs/network'),_univerjs_pro_license=require('@univerjs-pro/license'),_univerjs_drawing=require('@univerjs/drawing'),_noble_ciphers_aes_js=require('@noble/ciphers/aes.js'),_noble_ciphers_utils_js=require('@noble/ciphers/utils.js');const DEFAULT_SNAPSHOT_SERVER_URL='/universer-api/snapshot',SNAPSHOT_URL_KEY=_0x35406f(0x1d1),DEFAULT_SEND_CHANGESET_TIMEOUT=0x7d0,DEFAULT_COLLAB_WEB_SOCKET_URL='ws://127.0.0.1:8000/universer-api/comb/connect',DEFAULT_WS_SESSION_TICKET_URL=_0x35406f(0x315),HEARTBEAT_INTERVAL_KEY='HEARTBEAT_INTERVAL',DEFAULT_HEARTBEAT_INTERVAL=0x7530,HEARTBEAT_TIMEOUT_KEY='HEARTBEAT_TIMEOUT',DEFAULT_HEARTBEAT_TIMEOUT=0x4e20,DEFAULT_RETRY_CONNECTING_INTERVAL=0x4e20,RETRY_CONNECTING_MAX_COUNT_KEY=_0x35406f(0x38d),LOCAL_CACHE_INTERVAL_KEY=_0x35406f(0x366),LOCAL_CACHE_INTERVAL=0x3e8,DEFAULT_COLLAB_SUBMIT_CHANGESET_URL='/universer-api/comb',DEFAULT_LOGIN_URL=_0x35406f(0x2f6),REMOTE_UNISCRIPT_EXECUTION_ENDPOINT_KEY=_0x35406f(0x3c2),DEFAULT_REMOTE_UNISCRIPT_EXECUTION_ENDPOINT=_0x35406f(0x214),TELEMETRY_COLLABORATION_NEW_CHANGESET=_0x35406f(0x160);function summaryChangesetSize(_0x164571){const _0x29d8f0=_0x35406f;return JSON[_0x29d8f0(0x2db)](_0x164571)[_0x29d8f0(0x332)];}function _typeof(_0x3312cf){'@babel/helpers - typeof';const _0x25306c=_0x35406f;return _typeof=_0x25306c(0x244)==typeof Symbol&&_0x25306c(0x116)==typeof Symbol['iterator']?function(_0xbb61dd){return typeof _0xbb61dd;}:function(_0x3b59bb){const _0x470b1c=_0x25306c;return _0x3b59bb&&_0x470b1c(0x244)==typeof Symbol&&_0x3b59bb[_0x470b1c(0x176)]===Symbol&&_0x3b59bb!==Symbol[_0x470b1c(0x1ee)]?'symbol':typeof _0x3b59bb;},_typeof(_0x3312cf);}function toPrimitive(_0x26f97b,_0x13851c){const _0x4eb69f=_0x35406f;if(_0x4eb69f(0x1fa)!=_typeof(_0x26f97b)||!_0x26f97b)return _0x26f97b;var _0x3b147b=_0x26f97b[Symbol[_0x4eb69f(0x304)]];if(void 0x0!==_0x3b147b){var _0x2b741b=_0x3b147b[_0x4eb69f(0x374)](_0x26f97b,_0x13851c||_0x4eb69f(0x17c));if(_0x4eb69f(0x1fa)!=_typeof(_0x2b741b))return _0x2b741b;throw new TypeError(_0x4eb69f(0x305));}return(_0x4eb69f(0x37d)===_0x13851c?String:Number)(_0x26f97b);}function toPropertyKey(_0xef7948){const _0x512e22=_0x35406f;var _0x4ced4d=toPrimitive(_0xef7948,_0x512e22(0x37d));return'symbol'==_typeof(_0x4ced4d)?_0x4ced4d:_0x4ced4d+'';}function _defineProperty(_0x68f084,_0x1916dc,_0x4c4586){const _0x44cf4a=_0x35406f;return(_0x1916dc=toPropertyKey(_0x1916dc))in _0x68f084?Object[_0x44cf4a(0x105)](_0x68f084,_0x1916dc,{'value':_0x4c4586,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x68f084[_0x1916dc]=_0x4c4586,_0x68f084;}let CollaborationUIEventId=function(_0x33c7b1){const _0x5aed1f=_0x35406f;return _0x33c7b1['OTHER_CLIENT_EDITING']='OTHER_CLIENT_EDITING',_0x33c7b1[_0x5aed1f(0x231)]=_0x5aed1f(0x231),_0x33c7b1['CONFLICT']=_0x5aed1f(0x111),_0x33c7b1[_0x5aed1f(0x248)]='CLOSE_ROOM',_0x33c7b1[_0x5aed1f(0x120)]=_0x5aed1f(0x120),_0x33c7b1[_0x5aed1f(0x377)]='SOCKET_FAILED_RETRY',_0x33c7b1[_0x5aed1f(0x240)]=_0x5aed1f(0x240),_0x33c7b1['SUBMIT_CHANGESET_TIMEOUT']='SUBMIT_CHANGESET_TIMEOUT',_0x33c7b1;}({});var CollaborationUIEventService=class{constructor(){const _0x2c2960=_0x35406f;_defineProperty(this,_0x2c2960(0x39d),new rxjs['Subject']()),_defineProperty(this,_0x2c2960(0x195),this[_0x2c2960(0x39d)][_0x2c2960(0x25c)]());}[_0x35406f(0x190)](_0x81c6c9){const _0x25b4f5=_0x35406f;this[_0x25b4f5(0x39d)][_0x25b4f5(0x2b4)](_0x81c6c9);}},CommentService=class{constructor(){const _0x2b9b08=_0x35406f;_defineProperty(this,_0x2b9b08(0x2dc),new rxjs[(_0x2b9b08(0x2bc))]()),_defineProperty(this,_0x2b9b08(0x2d1),this[_0x2b9b08(0x2dc)]['asObservable']());}['onCommentUpdate'](_0x210274){const _0x59c264=_0x35406f;this[_0x59c264(0x2dc)][_0x59c264(0x2b4)](_0x210274);}};function __decorateParam(_0x479884,_0x49f67c){return function(_0x308562,_0x33e7d0){_0x49f67c(_0x308562,_0x33e7d0,_0x479884);};}function __decorate(_0x1c1001,_0x494f42,_0x182efd,_0x57b81a){const _0x4e5ac8=_0x35406f;var _0x46df35=arguments[_0x4e5ac8(0x332)],_0x547f48=_0x46df35<0x3?_0x494f42:_0x57b81a===null?_0x57b81a=Object[_0x4e5ac8(0x1bd)](_0x494f42,_0x182efd):_0x57b81a,_0x335d5c;if(typeof Reflect==='object'&&typeof Reflect[_0x4e5ac8(0x3b6)]===_0x4e5ac8(0x244))_0x547f48=Reflect[_0x4e5ac8(0x3b6)](_0x1c1001,_0x494f42,_0x182efd,_0x57b81a);else{for(var _0x1dbf77=_0x1c1001['length']-0x1;_0x1dbf77>=0x0;_0x1dbf77--)if(_0x335d5c=_0x1c1001[_0x1dbf77])_0x547f48=(_0x46df35<0x3?_0x335d5c(_0x547f48):_0x46df35>0x3?_0x335d5c(_0x494f42,_0x182efd,_0x547f48):_0x335d5c(_0x494f42,_0x182efd))||_0x547f48;}return _0x46df35>0x3&&_0x547f48&&Object[_0x4e5ac8(0x105)](_0x494f42,_0x182efd,_0x547f48),_0x547f48;}let MemberService=class MemberService extends _univerjs_core[_0x35406f(0x163)]{constructor(_0x45c3e7,_0x3ce876){const _0x2589d8=_0x35406f;super(),this[_0x2589d8(0x3a3)]=_0x45c3e7,this[_0x2589d8(0x174)]=_0x3ce876,_defineProperty(this,'_roomMembers',new Map()),_defineProperty(this,_0x2589d8(0x180),new rxjs[(_0x2589d8(0x2bc))]()),this[_0x2589d8(0x367)]((0x0,rxjs['merge'])(this[_0x2589d8(0x3a3)][_0x2589d8(0x1e8)](_univerjs_core[_0x2589d8(0x3b4)][_0x2589d8(0x307)])[_0x2589d8(0x38a)]((0x0,rxjs_operators[_0x2589d8(0x173)])(_0x3afc34=>_0x3afc34[_0x2589d8(0x1bf)]())),this['_univerInstanceService'][_0x2589d8(0x1e8)](_univerjs_core[_0x2589d8(0x3b4)][_0x2589d8(0x319)])[_0x2589d8(0x38a)]((0x0,rxjs_operators[_0x2589d8(0x173)])(_0x413758=>_0x413758[_0x2589d8(0x1bf)]())))[_0x2589d8(0x2b5)](_0x2ac363=>this[_0x2589d8(0x142)](_0x2ac363)));}[_0x35406f(0x147)](_0x48a42e){const _0x32a5fa=_0x35406f;if(this[_0x32a5fa(0x23c)][_0x32a5fa(0x3d5)](_0x48a42e))return(0x0,rxjs['of'])(this['_roomMembers'][_0x32a5fa(0x2c5)](_0x48a42e));return this[_0x32a5fa(0x180)][_0x32a5fa(0x38a)]((0x0,rxjs_operators[_0x32a5fa(0x173)])(_0x4a68e9=>{const _0x58055f=_0x32a5fa;if(_0x4a68e9===_0x48a42e)return this[_0x58055f(0x23c)][_0x58055f(0x2c5)](_0x4a68e9);}));}['setCurrentUser'](_0xd473d5){const _0x29d69c=_0x35406f;this[_0x29d69c(0x174)][_0x29d69c(0xfe)](_0xd473d5);}[_0x35406f(0x2a8)](){const _0x1bbf7f=_0x35406f;return this[_0x1bbf7f(0x174)]['getCurrentUser']();}['updateMember'](_0x4f56f2,_0x53d8e1){const _0x3fa864=_0x35406f;let _0x59a3c4=this[_0x3fa864(0x23c)]['get'](_0x4f56f2);!_0x59a3c4&&(_0x59a3c4=new RoomMember(),this['_roomMembers']['set'](_0x4f56f2,_0x59a3c4),this[_0x3fa864(0x180)][_0x3fa864(0x2b4)](_0x4f56f2)),_0x59a3c4[_0x3fa864(0x31d)](_0x53d8e1);}[_0x35406f(0x21a)](_0x4ff175,_0x388fb5){const _0x57b670=_0x35406f,_0x195af7=this['_roomMembers'][_0x57b670(0x2c5)](_0x4ff175);if(_0x195af7)_0x195af7['removeMember'](_0x388fb5);}[_0x35406f(0x2d0)](_0x274bed){const _0x3c8b49=_0x35406f;return this['_roomMembers'][_0x3c8b49(0x2c5)](_0x274bed);}[_0x35406f(0x158)](_0x27efa0,_0x430d5c){const _0xb1f8b1=_0x35406f,_0x512cb6=this[_0xb1f8b1(0x23c)][_0xb1f8b1(0x2c5)](_0x27efa0);if(_0x512cb6)return _0x512cb6[_0xb1f8b1(0x158)](_0x430d5c);}[_0x35406f(0x142)](_0x50d1cd){const _0x51a2f9=_0x35406f,_0x4cb6d3=this['_roomMembers'][_0x51a2f9(0x2c5)](_0x50d1cd);_0x4cb6d3&&(_0x4cb6d3[_0x51a2f9(0x1db)](),this[_0x51a2f9(0x23c)][_0x51a2f9(0x202)](_0x50d1cd));}[_0x35406f(0x1db)](){const _0x3862f1=_0x35406f;this[_0x3862f1(0x23c)]['forEach'](_0x2d79ab=>_0x2d79ab[_0x3862f1(0x1db)]()),this['_roomMembers'][_0x3862f1(0x20f)](),this['_roomCreated$'][_0x3862f1(0x22c)]();}};MemberService=__decorate([__decorateParam(0x0,_univerjs_core['IUniverInstanceService']),__decorateParam(0x1,(0x0,_univerjs_core['Inject'])(_univerjs_core[_0x35406f(0x1cb)]))],MemberService);var RoomMember=class extends _univerjs_core[_0x35406f(0x163)]{constructor(..._0x57a604){const _0x1f610b=_0x35406f;super(..._0x57a604),_defineProperty(this,_0x1f610b(0x363),new Map()),_defineProperty(this,_0x1f610b(0x376),new rxjs[(_0x1f610b(0x2a2))](this['_members'])),_defineProperty(this,'members$',this[_0x1f610b(0x376)]['asObservable']());}[_0x35406f(0x1db)](){const _0x4fd381=_0x35406f;this['_members'][_0x4fd381(0x20f)]();}[_0x35406f(0x31d)](_0x5e6722){const _0x3a701b=_0x35406f;this[_0x3a701b(0x363)]['set'](_0x5e6722[_0x3a701b(0x389)],_0x5e6722),this[_0x3a701b(0x197)]();}[_0x35406f(0x21a)](_0x212ac0){const _0xa54ce=_0x35406f;this[_0xa54ce(0x363)][_0xa54ce(0x202)](_0x212ac0);}[_0x35406f(0x158)](_0x41da67){const _0x345c02=_0x35406f;return this[_0x345c02(0x363)][_0x345c02(0x2c5)](_0x41da67);}[_0x35406f(0x1a0)](){const _0xadf036=_0x35406f;return Array['from'](this[_0xadf036(0x363)][_0xadf036(0x191)]());}[_0x35406f(0x197)](){const _0x132d8e=_0x35406f;this[_0x132d8e(0x376)][_0x132d8e(0x2b4)](this[_0x132d8e(0x363)]);}};let SessionStatus=function(_0x50c928){const _0x259c00=_0x35406f;return _0x50c928[_0x50c928[_0x259c00(0x15e)]=0x0]=_0x259c00(0x15e),_0x50c928[_0x50c928[_0x259c00(0x24e)]=0x1]=_0x259c00(0x24e),_0x50c928[_0x50c928['OFFLINE']=0x2]=_0x259c00(0x3af),_0x50c928[_0x50c928[_0x259c00(0x27c)]=0x3]='ONLINE',_0x50c928;}({});const FailedReason={[_univerjs_protocol[_0x35406f(0x360)][_0x35406f(0x277)]]:_0x35406f(0x133),[_univerjs_protocol[_0x35406f(0x360)][_0x35406f(0x3cd)]]:_0x35406f(0x31e),[_univerjs_protocol['CmdRspCode'][_0x35406f(0x10c)]]:_0x35406f(0x3ab),[_univerjs_protocol[_0x35406f(0x360)]['JOIN_ROOM_PERMISSION_DENIED']]:_0x35406f(0x38f),[_univerjs_protocol['CmdRspCode'][_0x35406f(0x1dd)]]:'session.room-cnt-exceeds'};let CollaborationSession=class CollaborationSession extends _univerjs_core[_0x35406f(0x388)]{get[_0x35406f(0x1ed)](){const _0x4d5403=_0x35406f;return this[_0x4d5403(0x21b)][_0x4d5403(0x316)]();}constructor(_0x1e7c6d,_0x51e664,_0x53a276,_0x4885f8,_0xace138,_0x2f473e,_0x52f09d,_0x3570db){const _0x1bbf3f=_0x35406f;super(),this[_0x1bbf3f(0x2c6)]=_0x1e7c6d,this['_logService']=_0x53a276,this[_0x1bbf3f(0x279)]=_0x4885f8,this[_0x1bbf3f(0x23a)]=_0xace138,this[_0x1bbf3f(0x3d2)]=_0x2f473e,this[_0x1bbf3f(0x24d)]=_0x52f09d,this['_telemetryService']=_0x3570db,_defineProperty(this,_0x1bbf3f(0x21b),new rxjs[(_0x1bbf3f(0x2a2))](SessionStatus['IDLE'])),_defineProperty(this,_0x1bbf3f(0x1ce),this[_0x1bbf3f(0x21b)][_0x1bbf3f(0x25c)]()),_defineProperty(this,'_event$',new rxjs['Subject']()),_defineProperty(this,_0x1bbf3f(0x195),this[_0x1bbf3f(0x39d)][_0x1bbf3f(0x25c)]()),_defineProperty(this,_0x1bbf3f(0x386),void 0x0),_defineProperty(this,_0x1bbf3f(0x397),void 0x0),_defineProperty(this,_0x1bbf3f(0x259),void 0x0),_defineProperty(this,_0x1bbf3f(0x194),![]),_defineProperty(this,_0x1bbf3f(0x3a5),null),this[_0x1bbf3f(0x194)]=!!this[_0x1bbf3f(0x24b)],_0x51e664[_0x1bbf3f(0x38a)]((0x0,rxjs[_0x1bbf3f(0x3b3)])(this[_0x1bbf3f(0x378)]))[_0x1bbf3f(0x2b5)](_0x52a03b=>{const _0x3579a2=_0x1bbf3f;if(typeof _0x52a03b===_0x3579a2(0x384))return;this[_0x3579a2(0x386)]=_0x52a03b;if(_0x52a03b)this[_0x3579a2(0x350)](_0x52a03b),this[_0x3579a2(0x397)]=_0x52a03b[_0x3579a2(0x128)][_0x3579a2(0x2b5)](_0xf5e784=>{const _0x452774=_0x3579a2;if(_0xf5e784['routeKey']!==this[_0x452774(0x2c6)])return;this[_0x452774(0x1a7)](_0xf5e784);});else{var _0x2d031d;this['_throwTelemetryCollaborationNewChangeset'](),this['_sessionStatus$']['next'](SessionStatus[_0x3579a2(0x3af)]),(_0x2d031d=this[_0x3579a2(0x397)])===null||_0x2d031d===void 0x0||_0x2d031d[_0x3579a2(0x33a)](),this[_0x3579a2(0x397)]=null;}});}[_0x35406f(0x18d)](){const _0x37e3ac=_0x35406f;var _0xbe74d9,_0x544b97;return(_0xbe74d9=(_0x544b97=this['_socket'])===null||_0x544b97===void 0x0?void 0x0:_0x544b97[_0x37e3ac(0x389)])!==null&&_0xbe74d9!==void 0x0?_0xbe74d9:null;}[_0x35406f(0x1db)](){const _0x323085=_0x35406f;super[_0x323085(0x1db)](),this[_0x323085(0x208)](),this['dispose$']['next'](),this[_0x323085(0x378)][_0x323085(0x22c)]();}[_0x35406f(0x208)](){const _0x1bc0ff=_0x35406f;var _0x22e27b,_0x55e6b4;this[_0x1bc0ff(0x1c0)](),(_0x22e27b=this[_0x1bc0ff(0x386)])===null||_0x22e27b===void 0x0||_0x22e27b['send']({'cmd':_univerjs_protocol['CombCmd'][_0x1bc0ff(0x106)],'data':{'roomID':this[_0x1bc0ff(0x2c6)]}}),(_0x55e6b4=this[_0x1bc0ff(0x386)])===null||_0x55e6b4===void 0x0||_0x55e6b4[_0x1bc0ff(0x208)](),this[_0x1bc0ff(0x39d)][_0x1bc0ff(0x22c)](),this['_sessionStatus$']['complete']();}[_0x35406f(0x1a7)](_0x42d163){const _0x1c5f4a=_0x35406f;if(_0x42d163[_0x1c5f4a(0x1f7)]===_univerjs_protocol[_0x1c5f4a(0x245)]['JOIN'])this[_0x1c5f4a(0x1d0)](_0x42d163);else{if(_0x42d163['cmd']===_univerjs_protocol[_0x1c5f4a(0x245)][_0x1c5f4a(0x18a)])this[_0x1c5f4a(0x39f)](_0x42d163);}}['_joinRoom'](_0x4c654b){const _0x3d1186=_0x35406f;this[_0x3d1186(0x21b)][_0x3d1186(0x2b4)](SessionStatus['JOINING']),_0x4c654b[_0x3d1186(0xfd)]({'cmd':_univerjs_protocol[_0x3d1186(0x245)][_0x3d1186(0x2cb)],'routeKey':this['_unitID'],'routeType':'','data':{'rooms':[{'roomID':this[_0x3d1186(0x2c6)]}]}});}[_0x35406f(0x1d0)](_0x415ca7){const _0x5e723a=_0x35406f;var _0x8ccefc;if(_0x415ca7[_0x5e723a(0x1c7)]in FailedReason){this[_0x5e723a(0x24d)][_0x5e723a(0x190)]({'id':CollaborationUIEventId[_0x5e723a(0x120)],'data':FailedReason[_0x415ca7[_0x5e723a(0x1c7)]]}),this['_sessionStatus$'][_0x5e723a(0x2b4)](SessionStatus[_0x5e723a(0x3af)]);return;}this[_0x5e723a(0x21b)][_0x5e723a(0x2b4)](SessionStatus[_0x5e723a(0x27c)]);const _0x5627cc=(_0x8ccefc=_0x415ca7[_0x5e723a(0x1b8)][_0x5e723a(0x268)][this[_0x5e723a(0x2c6)]])===null||_0x8ccefc===void 0x0?void 0x0:_0x8ccefc[_0x5e723a(0x274)];if(_0x5627cc)_0x5627cc[_0x5e723a(0x320)](_0x151943=>this[_0x5e723a(0x23a)][_0x5e723a(0x31d)](this[_0x5e723a(0x2c6)],_0x151943));}['_onRecvEvent'](_0x38a70f){const _0x4f2f87=_0x35406f;try{const _0x23cb59=_0x38a70f[_0x4f2f87(0x1b8)];switch(_0x23cb59[_0x4f2f87(0x258)]){case _univerjs_pro_collaboration[_0x4f2f87(0x1ae)]['USERS_ENTER']:this['_onUserJoin'](_0x23cb59),this[_0x4f2f87(0x39d)][_0x4f2f87(0x2b4)](_0x23cb59);break;case _univerjs_pro_collaboration[_0x4f2f87(0x1ae)]['USERS_LEAVE']:this[_0x4f2f87(0x177)](_0x23cb59),this[_0x4f2f87(0x39d)][_0x4f2f87(0x2b4)](_0x23cb59);break;case _univerjs_pro_collaboration[_0x4f2f87(0x1ae)][_0x4f2f87(0x2ec)]:case _univerjs_pro_collaboration[_0x4f2f87(0x1ae)][_0x4f2f87(0x20c)]:this['_stopTelemetryCollaborationNewChangeset'](),this[_0x4f2f87(0x1f8)](),this[_0x4f2f87(0x39d)][_0x4f2f87(0x2b4)](_0x23cb59);break;case _univerjs_pro_collaboration['CollaborationEvent']['MSG_FOR_ERROR']:this[_0x4f2f87(0x3ae)][_0x4f2f87(0x34c)](_0x4f2f87(0x3c7)+JSON[_0x4f2f87(0x2db)](_0x23cb59)),this[_0x4f2f87(0x39d)][_0x4f2f87(0x2b4)](_0x23cb59);break;case _univerjs_pro_collaboration['CollaborationEvent'][_0x4f2f87(0x22f)]:this[_0x4f2f87(0x3d2)][_0x4f2f87(0x371)](_0x23cb59[_0x4f2f87(0x1b8)]),this[_0x4f2f87(0x39d)][_0x4f2f87(0x2b4)](_0x23cb59);break;default:this[_0x4f2f87(0x39d)][_0x4f2f87(0x2b4)](_0x23cb59);}}catch(_0x904b83){this['_logService'][_0x4f2f87(0x34c)](_0x904b83,_0x38a70f);}}['_onUserJoin'](_0x69d034){const _0x2bfb24=_0x35406f;this['_memberService']['updateMember'](this[_0x2bfb24(0x2c6)],_0x69d034[_0x2bfb24(0x1b8)]);}['_onUserLeave'](_0x197846){const _0x3fd931=_0x35406f;this['_memberService'][_0x3fd931(0x21a)](this[_0x3fd931(0x2c6)],_0x197846['data'][_0x3fd931(0x389)]);}async[_0x35406f(0xfd)](_0x5586fa,_0x1aee7c){const _0x1183ce=_0x35406f;if(this['sessionStatus']!==SessionStatus[_0x1183ce(0x27c)]||!this['_socket'])throw new Error(_0x1183ce(0x14e));try{_0x5586fa[_0x1183ce(0x258)]===_univerjs_pro_collaboration[_0x1183ce(0x1ae)][_0x1183ce(0x2a1)]&&(this[_0x1183ce(0x34a)](),this[_0x1183ce(0x250)](_0x5586fa)),this['_socket'][_0x1183ce(0xfd)]({'cmd':_univerjs_protocol[_0x1183ce(0x245)]['INGEST'],'routeKey':_0x1aee7c,'routeType':'','data':_0x5586fa});}catch(_0x1b7442){this[_0x1183ce(0x3ae)]['error'](_0x1b7442);}}['_scheduleCollaborationTimeoutTimer'](){const _0x5a830e=_0x35406f;var _0x4e4d41;this[_0x5a830e(0x259)]=setTimeout(()=>{const _0x45b0f1=_0x5a830e;this[_0x45b0f1(0x259)]=null,this[_0x45b0f1(0x24d)][_0x45b0f1(0x190)]({'id':CollaborationUIEventId[_0x45b0f1(0x11e)]});},(_0x4e4d41=this[_0x5a830e(0x279)][_0x5a830e(0x38b)](_0x5a830e(0x221)))!==null&&_0x4e4d41!==void 0x0?_0x4e4d41:DEFAULT_HEARTBEAT_TIMEOUT);}[_0x35406f(0x1f8)](){const _0x4536fa=_0x35406f;this[_0x4536fa(0x259)]&&(clearTimeout(this[_0x4536fa(0x259)]),this[_0x4536fa(0x259)]=null);}[_0x35406f(0x250)](_0x381920){const _0x27fb83=_0x35406f;if(!this[_0x27fb83(0x194)])return;const {data:_0x5e1070}=_0x381920,{unitID:_0x2b50f7,changeset:_0x218c7f}=_0x5e1070,{mutations:_0x51b8dc,type:_0x384c1f}=_0x218c7f;this[_0x27fb83(0x3a5)]={'unitId':_0x2b50f7,'type':_0x384c1f,'startTime':performance[_0x27fb83(0x1b7)](),'stopTime':0x0,'duration':0x0,'size':summaryChangesetSize(_0x51b8dc)};}[_0x35406f(0x204)](){const _0x1c6748=_0x35406f;if(!this[_0x1c6748(0x194)])return;if(!this[_0x1c6748(0x3a5)]){this[_0x1c6748(0x3ae)][_0x1c6748(0x34c)](_0x1c6748(0x22b),_0x1c6748(0x19c));return;}this['_telemetryInfo'][_0x1c6748(0x2b3)]=performance[_0x1c6748(0x1b7)](),this['_telemetryInfo'][_0x1c6748(0x30e)]=this[_0x1c6748(0x3a5)][_0x1c6748(0x2b3)]-this['_telemetryInfo']['startTime'],this[_0x1c6748(0x24b)][_0x1c6748(0x26b)](TELEMETRY_COLLABORATION_NEW_CHANGESET,this[_0x1c6748(0x3a5)]),this[_0x1c6748(0x3a5)]=null;}['_throwTelemetryCollaborationNewChangeset'](){const _0x4e23c6=_0x35406f;this[_0x4e23c6(0x3a5)]=null;}};CollaborationSession=__decorate([__decorateParam(0x2,_univerjs_core[_0x35406f(0x33e)]),__decorateParam(0x3,_univerjs_core[_0x35406f(0x196)]),__decorateParam(0x4,(0x0,_univerjs_core[_0x35406f(0x33b)])(MemberService)),__decorateParam(0x5,(0x0,_univerjs_core[_0x35406f(0x33b)])(CommentService)),__decorateParam(0x6,(0x0,_univerjs_core['Inject'])(CollaborationUIEventService)),__decorateParam(0x7,(0x0,_univerjs_core[_0x35406f(0x2c9)])(_univerjs_telemetry['ITelemetryService']))],CollaborationSession);const ILocalCacheService=(0x0,_univerjs_core[_0x35406f(0x36d)])(_0x35406f(0x137));function getLocalCacheKey(_0x1070b4){return'unit-cache-'+_0x1070b4;}function extractTargetFromFirstChangeset(_0x118adc){const _0xbb8242=_0x35406f,{unitID:_0x409369,mutations:_0x53b9da}=_0x118adc;return{'unitId':_0x409369,'subUnitId':_0x53b9da[_0xbb8242(0x332)]>0x0?_0x53b9da[0x0][_0xbb8242(0x1de)][_0xbb8242(0x272)]:null};}let SheetTransformSelectionsService=class SheetTransformSelectionsService{constructor(_0x57c8e4,_0x1baf98,_0x1920f7){const _0x213895=_0x35406f;this[_0x213895(0x157)]=_0x57c8e4,this[_0x213895(0x300)]=_0x1baf98,this[_0x213895(0x3d3)]=_0x1920f7;}['transformSelections'](_0x4ab93f){const _0x14e286=_0x35406f;var _0x57914e,_0x3c7420;const _0x21c418=this[_0x14e286(0x157)]['get'](_univerjs_sheets[_0x14e286(0x3ce)]),{unitId:_0x5cc7f7,subUnitId:_0x14c761}=extractTargetFromFirstChangeset(_0x4ab93f),_0x3a64a5=_0x21c418===null||_0x21c418===void 0x0?void 0x0:_0x21c418[_0x14e286(0x19d)](_0x5cc7f7)[_0x14e286(0x2e1)](),_0x221018=(_0x57914e=this[_0x14e286(0x3d3)][_0x14e286(0x2d4)](_0x5cc7f7))===null||_0x57914e===void 0x0||(_0x57914e=_0x57914e[_0x14e286(0x13f)]())===null||_0x57914e===void 0x0?void 0x0:_0x57914e[_0x14e286(0x28d)]();if(_0x3a64a5[_0x14e286(0x332)]===0x0||!_0x5cc7f7||!_0x14c761)return;const _0x21cf70=[{'id':_univerjs_sheets[_0x14e286(0x238)]['id'],'params':{'unitId':_0x5cc7f7,'subUnitId':_0x221018,'selections':_univerjs_core[_0x14e286(0x152)]['deepClone'](_0x3a64a5)}}],_0x373608=this[_0x14e286(0x300)][_0x14e286(0x23f)](_0x4ab93f,_0x21cf70);if(!(0x0,_univerjs_pro_collaboration['isTransformMutationsWithChangesetSuccess'])(_0x373608))throw _0x373608[_0x14e286(0x34c)];const _0x4a3aa4=(_0x3c7420=_0x373608[_0x14e286(0x1d6)][0x0])===null||_0x3c7420===void 0x0||(_0x3c7420=_0x3c7420[_0x14e286(0x1de)])===null||_0x3c7420===void 0x0?void 0x0:_0x3c7420[_0x14e286(0x31f)];if(Array[_0x14e286(0x118)](_0x4a3aa4)&&_0x4a3aa4[_0x14e286(0x332)]){if(_0x4a3aa4[_0x14e286(0x332)]===_0x21cf70[0x0]['params'][_0x14e286(0x31f)][_0x14e286(0x332)]&&_0x4a3aa4['every']((_0x192ece,_0xcf5934)=>_univerjs_core['Rectangle'][_0x14e286(0x334)](_0x192ece[_0x14e286(0x1a3)],_0x21cf70[0x0]['params']['selections'][_0xcf5934][_0x14e286(0x1a3)])))return;this[_0x14e286(0x157)][_0x14e286(0x2c5)](_univerjs_core['ICommandService'])[_0x14e286(0x3ca)](_univerjs_sheets[_0x14e286(0x238)]['id'],{'unitId':_0x5cc7f7,'subUnitId':_0x221018,'selections':_0x4a3aa4});}}};SheetTransformSelectionsService=__decorate([__decorateParam(0x0,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_core[_0x35406f(0x2f9)])),__decorateParam(0x1,_univerjs_pro_collaboration[_0x35406f(0x308)]),__decorateParam(0x2,_univerjs_core[_0x35406f(0x161)])],SheetTransformSelectionsService);const ISingleActiveUnitService=(0x0,_univerjs_core['createIdentifier'])('univer-pro.collaboration-client.single-active-unit-service');let UnitStatus=function(_0x422b7f){const _0x4a8dd3=_0x35406f;return _0x422b7f[_0x422b7f[_0x4a8dd3(0x1a1)]=0x0]=_0x4a8dd3(0x1a1),_0x422b7f[_0x422b7f['OTHER_CLIENTS_EDITING']=0x1]=_0x4a8dd3(0x2f4),_0x422b7f;}({});const COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY=_0x35406f(0x2b9),configSymbol=Symbol(COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY),defaultPluginConfig={};function isSplitChunkMutation(_0x2e3763){const _0x222710=_0x35406f;var _0x359780;return!!((_0x359780=_0x2e3763[_0x222710(0x1de)])===null||_0x359780===void 0x0?void 0x0:_0x359780[_0x222710(0x167)]);}const SINGLE_CHANGESET_MUTATIONS=new Set([_univerjs_sheets[_0x35406f(0x265)]['id']]);function _0x2fc4(){const _0x5ee02d=['reduce','WorkbookEditablePermission','/universer-api/uniscript','_getCurrentRevision','loadUnitOfRevision','USERS_LEAVE','merge','transformStack\x20failed!','removeMember','_sessionStatus$','NOT_COLLAB','size','@univerjs-pro/collaboration-client','socket\x20open.','_getCtorByUniverInstanceType','HEARTBEAT_TIMEOUT','reverse','_registerDependencies','session','_transformUndoredo','OfflineState','listRoles','close$','body','loginUrlKey','[CollaborationSession]','complete','_lockTransition','ILocalCacheService','COMMENT_UPDATE','resolveWithBasePath','PERMISSION_DENIED','onTransformState','error$','setShowComponents','CollaborativeUndoRedoService','[FetchMissState]','onMissingChangesets','SetSelectionsOperation','_createInitialState','_memberService','add','_roomMembers','saveImage','_updateState','transformMutationsWithChangeset','SOCKET_FAILED','ERROR_IMAGE','0.21.0','CHANGESET_REJ','function','CombCmd','_isPermissionRej','onTransformRemoteChangesetByIMECache\x20callback\x20is\x20not\x20added\x20yet.','CLOSE_ROOM','then','disableLocalCache','_telemetryService','_getSignURL','_collaborationUIEventService','JOINING','toggleOffline','_startTelemetryCollaborationNewChangeset','image/gif','JSONX','CommentService','_socket$','editing\x20status\x20changed\x20to','parseProtocolChangeset','_updateLocalCache','eventID','_collaborationTimeoutTimer','_clearTimeoutTimer','updatePermissionObjEvent','asObservable','conflict','ReplaySubject','x-univer-host','encodeURIComponent','FetchingMissState','_clearRetryConnectingTimer','onRemoteRej','location','InsertSheetMutation','toDisposable','RevisionService','roomInfos','_handlerCallback','_httpService','capture','AuthzIoHttpService','mapDocumentTypeToUniverInstanceType','[SyncedState]:\x20received\x20acknowledgement.','CollaborationUIEventId','/-/object/-/batch_allowed','onStateChange','subUnitId','listCollaborators','members','UPDATE_CURSOR','onMutationExecutedForCollab','FAIL','textRanges','_configService','unitID','batchAllowed','ONLINE','transformUndoRedo','_getUndoStack','_sendHeartbeat','cfgEnableObjInherit','result','1287303amTBXo','_getLoginPath','onTransformIME','type','IAuthzIoService','src','updateCursorEvent','2590038WtPtna','you\x20should\x20override\x20\x22IUndoRedoService\x22\x20provided\x20in\x20\x22core\x22\x20package!','liveShareNewHost','revision','getSheetId','findIndex','image/jpg','4VFDosF','parse','url','_handler','collaboratorID','CollaborationSession','localCacheService','COMPRESS_MUTATION_SEND','PSEUDO_FETCH_MISSING_RESULT','resolve','loadSheet','infoRsp','authzUrl','ISingleActiveUnitService','updatePermissionPoint','getSheetBlock','[SyncedState]:\x20invalid\x20calling\x20to\x20`resend`.','SUBMIT_CHANGESET','BehaviorSubject','resend','__Key__','917546OjVsnj','_snapshotService','ISnapshotServerService','getCurrentUser','&source=','[PendingState]:\x20received\x20rejection.','This\x20method\x20should\x20not\x20be\x20called\x20on\x20the\x20client\x20side!','[CollaborationSessionService]:\x20socket\x20error','_entities','mergeOverrideWithDependencies','_tryEnsureSocket','onLocalMutation','?size=','/allowed','stopTime','next','subscribe','_commandService','_waitForHeartbeatResponse','b64DecodeUnicode','collaboration-client.config','appendMutation','[PendingState]:\x20received\x20acknowledgement.','Subject','_changesetReqId','find','AWAITING','?url=','submit\x20changeset\x20error!','apply','joinEvent','refreshPermission','get','_unitID','_showConflictNotification','&assign=','Optional','reconnect','JOIN','deleteCollaborator','_localeService','_maxTotalRetryTimeout','deserializeToCombResponse','getRoom','commentUpdate$','randomBytes','catch','getUnit','requireSession','Error\x20on\x20receiving\x20event','_toggleOnline','_updateStatus','getDeserializedSheetBlock','_transformSelections','stringify','_commentUpdate$','SnapshotServerOverHTTPService','pending','_pendingMutations','/rev/','getCurrentSelections','onMissedChangesetFetched','snapshot','POST','routeKey','fromCollab','filter','[SyncedState]:\x20received\x20rejection.','_replaceFileID','CollaborationSessionService','3732288NPHnpE','CHANGESET_ACK','_status$','SyncedState','_singleActiveUnitService','SheetPermissionInitController','synced','_initUnitPermissionChange','permissionRejEvent','OTHER_CLIENTS_EDITING','originalMeta','/universer-api/oidc/authpage','debug','[OfflineState]:\x20invalid\x20calling\x20to\x20`resend`.','Injector','UNIVER_COLLABORATION_CLIENT_PLUGIN','_toggleOffline','_transformStack','snapshotServerUrl','_clearLocalCache','_getRedoStack','_transformService','firstValueFrom','c1Prime','unknown','toPrimitive','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','_decreaseWaiting','UNIVER_SHEET','ITransformService','createSocket','updateOfflineData','isTransformMutationsWithChangesetSuccess','onRemoteRetry','_transformRemoteChangesetByStateCache','duration','_createHandler','_schedule','_transformStateCache','copyFileMeta','/resources','_onConflict','/universer-api/user/session-ticket','getValue','collabSubmitChangesetUrl','sendChangesetTimeout','UNIVER_DOC','isTransformMutationsWithChangesetFailure','[OfflineState]:\x20received\x20changeset.','transformChangesets','updateMember','session.room-full','selections','forEach','Plugin','failed\x20to\x20apply\x20missed\x20changesets!','REMOTE_UNISCRIPT_EXECUTION_ENDPOINT_KEY','ImageSourceType','enableOfflineEditing','IImageIoService','MergeInterceptorFactory','getImage','enableCollaboration','fetch_missing','ERROR_EXCEED_SIZE','_executeRemoteChangeset','getFocusedUnit','baseRev','status$','_onOffline','INGEST','length','_change$','equals','isInternalEditorID','/new_changes','[DataLoaderService]','_initRequestHeader','_substituteUndoStack','unsubscribe','Inject','_waitCount','requestParams','ILogService','sheets','addImageSourceCache','put','_HTTPService','[CollaborationEntity]','LIVESHARE_NEW_HOST','_onRemoteRejected','onSendChangeset','allowed','DEFAULT_WS_SESSION_TICKET_URL','unitId','_scheduleCollaborationTimeoutTimer','OPTIONAL','error','_getAPIPrefix','CommandType','updateSnapshot','_joinRoom','onTransformRemoteChangesetByIMECache','[CollaborationUndoRedoService]','/universer-api/authz','getUnitType','toString','encode','post','Univer','AwaitingState','loadUnit','init','_clearHeartbeatTimer','getImageSourceCache','avatar','FETCH_MISS','CmdRspCode','ConflictState','_state','_members','entityInit$','PENDING','LOCAL_CACHE_INTERVAL','disposeWithMe','RichTextEditingMutation','includes','HEARTBEAT_INTERVAL_KEY','_retryConnectingTimer','_remoteChangesetQueue','createIdentifier','_permissionService','_rescheduleHeartbeat','_fetchMissChangesets','onCommentUpdate','mutations','awaitingChangeset','call','fetchMissingChangesets','_members$','SOCKET_FAILED_RETRY','dispose$','ICollaborationSocketService','state$','onRemoteAck','getResourcesRequest','string','offline','commentUpdateEvent','_init','append','HEARTBEAT_INTERVAL','socket\x20close','undefined','socketService','_socket','method','RxDisposable','memberID','pipe','getConfig','getTime','RETRY_CONNECTING_MAX_COUNT','370304uZNhCd','session.room-permission-denied','_socketReady','_collabSessionService','retryConnectingInterval','joinRsp','pluginName','_sheetTransformSelectionsService','registerDependencies','_socketMessageSubscription','_initMergeInterceptor','_checkMissing','online$','_onRemoteRetry','isPermissionRej','_event$','_transitionLocked','_onRecvEvent','IMentionIOService','delay','SessionStatus','_univerInstanceService','_state$','_telemetryInfo','_disableEditing','DataLoaderService','fromCharCode','_revisionService','SheetTransformSelectionsService','session.room-not-exists','loadOfflineData','CompressMutationService','_logService','OFFLINE','_syncEditingCollabCursor','LIVESHARE_FETCH_OPERATIONS','/collaborator','takeUntil','UniverInstanceType','readAsDataURL','decorate','reqId','[CollaborationEntity]:\x20invalid\x20state\x20transition!\x20State\x20transferred\x20from\x20is\x20not\x20the\x20current\x20state.\x0aBefore:\x20','CollaborationImageIoService','liveShareOperation','2898330nchMpB','change$','_collaborationPaused','PERSON','getSnapshotAPIPath','MentionIoHttpService','_listenToNetworkCondition','REMOTE_UNISCRIPT_EXECUTION_ENDPOINT','uploadFileServerUrl','create','objectActions','_createInitialStateImpl','save\x20fail\x20reason\x20is\x20','concatMap','confirm','executeCommand','_config','_getAPIPrefixPath','JOIN_ROOM_FULL','SheetsSelectionsService','[PendingState]:\x20invalid\x20calling\x20to\x20`resend`.','target','_getSendChangesetTimeout','_commentService','_instanceService','_localCacheService','has','_retryCount','interceptor','_imageSourceCache','OTHER_CLIENT_EDITING','send','setCurrentUser','_sender','take','fetching\x20the\x20latest\x20document\x20from\x20the\x20server.','243269cfESyA','collaborators','COMPRESS_MUTATION_APPLY','defineProperty','LEAVE','\x0aCurrent:\x20','/object','getTypeOfUnitAdded$','_onConnectionOpen','LocaleService','JOIN_ROOM_NOT_EXISTS','ICommandService','USERS_ENTER','href','_onLocalMutation','CONFLICT','csShouldRetryEvent','origin','_changesetSessionId','_resendWithTimeout','symbol','shareReplay','isArray','_incrementRevisionNumber','/fetchmissing?from=','LIVESHARE_REQUEST_HOST','workbook','toStringTag','SUBMIT_CHANGESET_TIMEOUT','closeSession','JOIN_ROOM_FAILED','LocalUndoRedoService','setCfgEnableObjInherit','uniscriptRunEvent','subject','UniverCollaborationPlugin','CollaborationSocketService','_createSocket','message$','getCurrentRevOfUnit','MUTATION','_cfgEnableObjInherit','_submitChangeset','AWAITING_WITH_PENDING','SheetCollaborationEntity','DEFAULT_FILE_NAME','UNISCRIPT_RUN','utf8ToBytes','objectType','session.join-failed','_socketService','fetching\x20missing\x20changesets\x20from\x20','SnapshotService','collaboration-client.local-cache-service','collaMsg','SHOULD_CLOSE_CONN','getCollabEntity$','HEARTBEAT','_type','newCsEvent','_transformRemoteChangesetByIMECache','getActiveSheet','_clearUndo','[UniverCollaborationClientPlugin]:\x20you\x20must\x20provide\x20a\x20socketService\x20implementation\x20in\x20config!','_removeRoom','UPDATE_PERMISSION_OBJ','getUnitOnRev','uuidv4','userID','waitForRoom$','[FetchingMissState]:\x20invalid\x20calling\x20to\x20`resend`.','FETCH_MISSING','_unitInfo$','Unknown\x20type.\x20Will\x20not\x20load\x20files\x20from\x20remote\x20address.','getLocalCacheKey','_undoRedoService','[CollaborationSession]:\x20should\x20not\x20send\x20message\x20when\x20the\x20session\x20is\x20offline!','toggleOnline','/unit/','_scheduleCompleteTimestamp','Tools','/universer-api/snapshot/','getInterceptPoints','_timeoutTimer','touchDependencies','_injector','getMember','UUID','sid','_snapshotServerService','univer-pro.collaboration-client.network-condition.service','_clearRedo','IDLE','serializeCombRequest','collaboration_new_changeset','IUniverInstanceService','fetchThroughInterceptors','Disposable','_onMessage','_unlockTransition','[CollaborationState]:\x20apply\x20error!','__splitChunk__','\x20in\x20_schedule.','[PendingState]:\x20unhandled\x20univer\x20type:\x20','ISocketService','focused$','_sessions','ErrorCode','ThresholdInterceptorFactory','_transformIMECache','COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY','update','resourceIDs','map','_userManagerService','Failed\x20to\x20update\x20permission\x20point','constructor','_onUserLeave','_doCreateSocket','csRejEvent','[CollaborationSocketService]:\x20failed\x20to\x20get\x20web\x20socket\x20factory!','push','default','image/jpeg','awaiting_with_pending','MemberService','_roomCreated$','parseChangesetToProtocol','textEncoder','_compressMutationService','action','MentionType','unitId\x20is\x20not\x20found','_initDependencies','LIVESHARE_TERMINATE','replace','RECV','downloadEndpointUrl','sequenceExecute','getMemberID','BASE64','[FetchingMissState]:\x20not\x20expected\x20to\x20receive\x20ack\x20when\x20`this._awaitingChangeset`\x20is\x20null!','emitEvent','values','IPermissionService','setConfig','_shouldReportTelemetry','event$','IConfigService','_emitMembers','override','actions','min','_collaborationSessionService','telemetry\x20info\x20is\x20not\x20initialized','getWorkbookSelections','_onRemoteChangeset','_acknowledgedAwaitingChangeset','getAllMembers','NO_OTHER_CLIENTS_EDITING','registerHTTPInterceptor','range','title','signUrlServerUrl','HELLO','_onCombEvent','onload','_clearScheduledTask','slice','_exhaustRemoteChangesetQueue','state','encrypt','CollaborationEvent','PERMISSION_REJ','ImageUploadStatusType','NEW_CHANGESETS','loadDoc','_networkConditionService','_queuedRemoteChangesets','/-/object/list','UniverCollaborationClientPlugin','now','data','_startCollaboration','&to=','[CollaborationSessionService]','/block/','getOwnPropertyDescriptor','connection\x20error','getUnitId','_throwTelemetryCollaborationNewChangeset','onlyLocal','Cannot\x20assemble\x20a\x20changeset\x20from\x20multiple\x20mutations\x20of\x20different\x20types:\x20','every','_entityInit$','status','collabWebSocketUrl','code','_getDownloadEndpointURL','_candidateSocket','AwaitingWithPendingState','UserManagerService','reject','list','sessionStatus$','_sendHeartbeatTimer','_onJoinRoomEvent','SNAPSHOT_URL_KEY','entries','objectID','RETRY_CONNECTING_MAX_COUNT_KEY','createInstance','m2Prime','enableSingleActiveInstanceLock','updateCollaborator','addHandlerCallback','{fileID}','dispose','set','GLOBAL_ROOMS_CNT_EXCEEDS','params','name','[CollaborationEntity]:\x20cannot\x20apply\x20missing\x20results\x20on\x20other\x20states!','LIVESHARE_OPERATION','open$','isTransformChangesetsSuccess','_sendingTimer','_substituteRedoStack','floor','HTTPService','getTypeOfUnitDisposed$','SYNCED','_resendTimer','DependentOn','onSyncEditingCollabCursor','sessionStatus','prototype','onRemoteChangeset','setWaitCount','responseType','localeService','onTransformRemoteChangesetByStateCache','onTransformSelections','MSG_FOR_ERROR','getGlobalObject','cmd','_clearCollaborationTimeoutTimer','_awaitingChangeset','object','_applyRemoteChangeset','packageName','_resendTimeout','_eventService','_onConnectionFailed','version','FileId','delete','csAckEvent','_stopTelemetryCollaborationNewChangeset','[CollaborationSocketService]:\x20failed\x20to\x20create\x20socket!','_initCloseConn','IUndoRedoService','close','cbc','enableAuthServer','changesets','CHANGESET_SHOULD_RETRY','Workbook','CollaborationStatus','clear','_tryReconnect','objects'];_0x2fc4=function(){return _0x5ee02d;};return _0x2fc4();}function assembleSheetChangeset(_0x1d36e1,_0x7da168,_0x252526,_0x3552b8,_0x1d4057){const _0x3678cc=_0x35406f;var _0x54fd88,_0x28c893,_0x1cfe16,_0x1402c5;const _0x311e76=[];for(const _0x22b8f2 of _0x1d36e1){if(SINGLE_CHANGESET_MUTATIONS['has'](_0x22b8f2['id'])){if(_0x311e76[_0x3678cc(0x332)]>0x0)break;_0x311e76['push'](_0x22b8f2);break;}if(isSplitChunkMutation(_0x22b8f2)){if(_0x311e76[_0x3678cc(0x332)]>0x0)break;_0x311e76['push'](_0x22b8f2);break;}_0x311e76['push'](_0x22b8f2);}const _0x58e09b=(_0x54fd88=(_0x28c893=_0x1d4057[_0x3678cc(0x2a8)]())===null||_0x28c893===void 0x0?void 0x0:_0x28c893['userID'])!==null&&_0x54fd88!==void 0x0?_0x54fd88:_0x3678cc(0x303),_0x10e87e=(_0x1cfe16=(_0x1402c5=_0x1d4057['getCurrentUser']())===null||_0x1402c5===void 0x0?void 0x0:_0x1402c5[_0x3678cc(0x389)])!==null&&_0x1cfe16!==void 0x0?_0x1cfe16:_0x3678cc(0x303);return{'changeset':{'unitID':_0x7da168,'type':(0x0,_univerjs_pro_collaboration[_0x3678cc(0x26d)])(_0x252526[_0x3678cc(0x354)](_0x7da168)),'baseRev':_0x3552b8[_0x3678cc(0x129)](_0x7da168),'revision':0x0,'userID':_0x58e09b,'memberID':_0x10e87e,'mutations':_0x311e76},'pendingMutations':_0x1d36e1[_0x3678cc(0x1aa)](_0x311e76[_0x3678cc(0x332)])};}function assembleDocChangeset(_0x51f011,_0x41b386,_0x51e036,_0x34f30b,_0x3e333e){const _0xd793a5=_0x35406f;var _0x548b09,_0xa274ae,_0x100e29,_0x4b0a00;const _0x1b209d=[_0x51f011[_0xd793a5(0x212)]((_0x4f7f2f,_0x51bf5b)=>{const _0x4318fa=_0xd793a5;var _0x36b801;const {id:_0x5ecd68}=_0x4f7f2f,{id:_0x51b904,type:_0x884c48}=_0x51bf5b,_0x3d3bec=(_0x36b801=_0x4f7f2f[_0x4318fa(0x1de)])!==null&&_0x36b801!==void 0x0?_0x36b801:{'actions':null},_0x778121=_0x51bf5b[_0x4318fa(0x1de)];if(_0x5ecd68&&_0x5ecd68!==_0x51b904)throw new Error(_0x4318fa(0x1c2)+_0x5ecd68+'\x20-\x20'+_0x51b904+'.');return{..._0x4f7f2f,'id':_0x51b904,'type':_0x884c48,'params':{'unitId':_0x778121['unitId'],'textRanges':_0x778121['textRanges'],'actions':_univerjs_core[_0x4318fa(0x252)]['compose'](_0x3d3bec['actions'],_0x778121[_0x4318fa(0x199)])}};},{})],_0x28b154=(_0x548b09=(_0xa274ae=_0x3e333e['getCurrentUser']())===null||_0xa274ae===void 0x0?void 0x0:_0xa274ae[_0xd793a5(0x146)])!==null&&_0x548b09!==void 0x0?_0x548b09:'unknown',_0x1f41f8=(_0x100e29=(_0x4b0a00=_0x3e333e[_0xd793a5(0x2a8)]())===null||_0x4b0a00===void 0x0?void 0x0:_0x4b0a00[_0xd793a5(0x389)])!==null&&_0x100e29!==void 0x0?_0x100e29:'unknown';return{'changeset':{'unitID':_0x41b386,'type':(0x0,_univerjs_pro_collaboration[_0xd793a5(0x26d)])(_0x51e036['getUnitType'](_0x41b386)),'baseRev':_0x34f30b[_0xd793a5(0x129)](_0x41b386),'revision':0x0,'userID':_0x28b154,'memberID':_0x1f41f8,'mutations':_0x1b209d},'pendingMutations':[]};}function createTimerObservable$(_0x2f336f,_0x7c65e){const _0x17cb0c=_0x35406f,_0x237f9c=new rxjs[(_0x17cb0c(0x25e))](0x1);return setTimeout(()=>_0x237f9c['next'](_0x7c65e),_0x2f336f),_0x237f9c[_0x17cb0c(0x25c)]()[_0x17cb0c(0x38a)]((0x0,rxjs['take'])(0x1));}var _PendingState,_AwaitingState,_AwaitingWithPendingState;let CollaborationStatus=function(_0x575fc3){const _0x4b8065=_0x35406f;return _0x575fc3[_0x4b8065(0x21c)]='not_collab',_0x575fc3['SYNCED']=_0x4b8065(0x2f1),_0x575fc3[_0x4b8065(0x365)]=_0x4b8065(0x2de),_0x575fc3[_0x4b8065(0x2bf)]='awaiting',_0x575fc3[_0x4b8065(0x12d)]=_0x4b8065(0x17e),_0x575fc3[_0x4b8065(0x35f)]=_0x4b8065(0x32a),_0x575fc3['CONFLICT']=_0x4b8065(0x25d),_0x575fc3[_0x4b8065(0x3af)]=_0x4b8065(0x37e),_0x575fc3;}({});const MAX_RETRY_TIMEOUT=0x4e20,MAX_RETRY_TOTAL_TIMEOUT=0x2bf20;var CollaborationState=class{constructor(_0x37ee0f,_0x1690c7,_0x476076,_0x238baa,_0x29fc4f,_0x58d1c4,_0x5b147d,_0x463cde,_0x26549f){const _0x19a0a2=_0x35406f;this[_0x19a0a2(0x27a)]=_0x37ee0f,this[_0x19a0a2(0x285)]=_0x1690c7,this['_handler']=_0x29fc4f,this[_0x19a0a2(0x2b6)]=_0x58d1c4,this[_0x19a0a2(0x14d)]=_0x5b147d,this[_0x19a0a2(0x3a9)]=_0x463cde,this[_0x19a0a2(0x3d4)]=_0x26549f,_defineProperty(this,_0x19a0a2(0x1f9),null),_defineProperty(this,_0x19a0a2(0x2df),[]),this[_0x19a0a2(0x1f9)]=_0x476076,this[_0x19a0a2(0x2df)]=_0x238baa;}['_checkMissing'](_0x4a9936){const _0x530130=_0x35406f,_0x2f071c=this[_0x530130(0x3a9)][_0x530130(0x129)](this['unitID']);if(_0x4a9936[_0x530130(0x28c)]>_0x2f071c+0x1)return this[_0x530130(0x293)][_0x530130(0x237)]({'from':_0x2f071c,'to':_0x4a9936[_0x530130(0x28c)]-0x1}),!![];return![];}[_0x35406f(0x225)](_0x4be050){const _0x579e6a=_0x35406f;this['_undoRedoService'][_0x579e6a(0x27d)](this[_0x579e6a(0x27a)],_0x4be050);}[_0x35406f(0x2da)](_0x4ae445){var _0x3d98ae,_0x1dae2d;(_0x3d98ae=(_0x1dae2d=this['_handler'])['onTransformSelections'])===null||_0x3d98ae===void 0x0||_0x3d98ae['call'](_0x1dae2d,_0x4ae445);}[_0x35406f(0x16f)](_0x2b71ac){const _0x5cc8f5=_0x35406f;var _0x1a8c4e,_0x7b7572;return(_0x1a8c4e=(_0x7b7572=this[_0x5cc8f5(0x293)])[_0x5cc8f5(0x284)])===null||_0x1a8c4e===void 0x0?void 0x0:_0x1a8c4e[_0x5cc8f5(0x374)](_0x7b7572,_0x2b71ac);}['_transformStateCache'](_0x32743f){var _0xe3e88,_0x51d6dd;return(_0xe3e88=(_0x51d6dd=this['_handler'])['onTransformState'])===null||_0xe3e88===void 0x0?void 0x0:_0xe3e88['call'](_0x51d6dd,_0x32743f);}[_0x35406f(0x13e)](_0x35a556){const _0xac56ae=_0x35406f;var _0x1b6f1d,_0x5af6d7,_0x37df5f;return(_0x1b6f1d=(_0x5af6d7=(_0x37df5f=this[_0xac56ae(0x293)])[_0xac56ae(0x351)])===null||_0x5af6d7===void 0x0?void 0x0:_0x5af6d7[_0xac56ae(0x374)](_0x37df5f,_0x35a556))!==null&&_0x1b6f1d!==void 0x0?_0x1b6f1d:_0x35a556;}['_transformRemoteChangesetByStateCache'](_0x5b8ec8){const _0x29f044=_0x35406f;var _0x283726,_0x266a06,_0x12ff27;return(_0x283726=(_0x266a06=(_0x12ff27=this[_0x29f044(0x293)])[_0x29f044(0x1f3)])===null||_0x266a06===void 0x0?void 0x0:_0x266a06[_0x29f044(0x374)](_0x12ff27,_0x5b8ec8))!==null&&_0x283726!==void 0x0?_0x283726:_0x5b8ec8;}[_0x35406f(0x3b0)](_0x189d7b){const _0x173123=_0x35406f;if(this[_0x173123(0x285)]===_univerjs_core[_0x173123(0x3b4)][_0x173123(0x319)]){const {unitID:_0x3212cc,mutations:_0x1bed36,memberID:_0x1c42f8}=_0x189d7b,_0x215f71=_0x1bed36[_0x173123(0x332)]>0x0?_0x1bed36[0x0][_0x173123(0x1de)][_0x173123(0x278)]:[];if(Array[_0x173123(0x118)](_0x215f71)&&_0x215f71['length']>0x0){var _0x3e6192,_0x61a68c;(_0x3e6192=(_0x61a68c=this[_0x173123(0x293)])[_0x173123(0x1ec)])===null||_0x3e6192===void 0x0||_0x3e6192['call'](_0x61a68c,{'unitID':_0x3212cc,'memberID':_0x1c42f8,'textRanges':_0x215f71});}}}[_0x35406f(0x257)](){const _0x445c3e=_0x35406f;var _0x20e244;(_0x20e244=this[_0x445c3e(0x3d4)])===null||_0x20e244===void 0x0||_0x20e244[_0x445c3e(0x30a)](this['unitID'],this[_0x445c3e(0x285)],this[_0x445c3e(0x1f9)],this[_0x445c3e(0x2df)]);}[_0x35406f(0x215)](){const _0x4958a3=_0x35406f;return this[_0x4958a3(0x3a9)][_0x4958a3(0x129)](this[_0x4958a3(0x27a)]);}['_incrementRevisionNumber'](){const _0x45714d=_0x35406f;this[_0x45714d(0x3a9)]['incrementRevOfUnit'](this[_0x45714d(0x27a)]);}['_executeRemoteChangeset'](_0x9986bd){const _0x38014a=_0x35406f;let _0x2bd85d=this[_0x38014a(0x13e)](_0x9986bd);_0x2bd85d=this[_0x38014a(0x30d)](_0x2bd85d);const _0x549f37=(0x0,_univerjs_core[_0x38014a(0x18c)])(_0x2bd85d['mutations'],this[_0x38014a(0x2b6)],{'fromCollab':!![]});if(!_0x549f37[_0x38014a(0x281)]){var _0x2985c9;if(_0x549f37[_0x38014a(0x34c)]instanceof Error)throw _0x549f37['error'];throw new Error((_0x2985c9=_0x549f37[_0x38014a(0x34c)])!==null&&_0x2985c9!==void 0x0?_0x2985c9:_0x38014a(0x166));}this['_transformIMECache'](_0x2bd85d),this[_0x38014a(0x311)](_0x2bd85d),this[_0x38014a(0x225)](_0x9986bd),this['_transformSelections'](_0x2bd85d),this['_syncEditingCollabCursor'](_0x2bd85d),this['_incrementRevisionNumber']();}};let SyncedState=class SyncedState extends CollaborationState{constructor(_0x585eea,_0x15cc5d,_0x2a5331,_0x22ce25,_0xa0ad49,_0x1c4318,_0xfb1e7d,_0x17ff2a,_0x3a5364,_0x5a7efe){const _0x3de83c=_0x35406f;super(_0x585eea,_0x15cc5d,null,[],_0x2a5331,_0xfb1e7d,_0x1c4318,_0x22ce25,_0x5a7efe),this[_0x3de83c(0x157)]=_0xa0ad49,this[_0x3de83c(0x3ae)]=_0x17ff2a,this[_0x3de83c(0x300)]=_0x3a5364,this['localCacheService']=_0x5a7efe,_defineProperty(this,'status',CollaborationStatus[_0x3de83c(0x1e9)]);}[_0x35406f(0x2ba)](_0x458e46){const _0x4ed8c8=_0x35406f,_0x26822b=this[_0x4ed8c8(0x157)]['createInstance'](PendingState,this[_0x4ed8c8(0x27a)],this['type'],[_0x458e46],this['_handler']);return _0x26822b[_0x4ed8c8(0x310)](),_0x26822b[_0x4ed8c8(0x257)](),_0x26822b;}[_0x35406f(0x1ef)](_0x2e6f9b){const _0x32b775=_0x35406f;if(this['_checkMissing'](_0x2e6f9b))return this['_injector']['createInstance'](FetchingMissState,this['unitID'],this['type'],null,[],null,[_0x2e6f9b],this[_0x32b775(0x293)]);try{const _0x4614e6=this[_0x32b775(0x300)][_0x32b775(0x23f)](_0x2e6f9b,[_univerjs_pro_collaboration['EmptyMutationInfo']]);if((0x0,_univerjs_pro_collaboration[_0x32b775(0x30b)])(_0x4614e6)){const {c1Prime:_0x10463d}=_0x4614e6;return this[_0x32b775(0x32c)](_0x10463d),this;}throw _0x4614e6[_0x32b775(0x34c)];}catch(_0x28ad9a){return this[_0x32b775(0x3ae)][_0x32b775(0x34c)](_0x28ad9a),this['_onConflict'](![]);}}[_0x35406f(0x314)](_0xb0c2c6){const _0x1f9518=_0x35406f;return this[_0x1f9518(0x157)][_0x1f9518(0x1d5)](ConflictState,this['unitID'],this[_0x1f9518(0x285)],null,[],this[_0x1f9518(0x293)],_0xb0c2c6);}[_0x35406f(0x37b)](){const _0x1bb927=_0x35406f;throw new Error(_0x1bb927(0x26e));}[_0x35406f(0x263)](){const _0x39f6b3=_0x35406f;throw new Error(_0x39f6b3(0x2e8));}[_0x35406f(0x30c)](){return this;}['toggleOffline'](){const _0x308323=_0x35406f;return this[_0x308323(0x157)][_0x308323(0x1d5)](OfflineState,this['unitID'],this[_0x308323(0x285)],null,[],this[_0x308323(0x293)]);}['toggleOnline'](){return this;}[_0x35406f(0x2a3)](){const _0x39cd23=_0x35406f;throw new Error(_0x39cd23(0x2a0));}['fetchMiss'](){const _0x5047e6=_0x35406f,_0x376ea5=this[_0x5047e6(0x3a9)][_0x5047e6(0x129)](this[_0x5047e6(0x27a)]);return this[_0x5047e6(0x293)][_0x5047e6(0x237)]({'from':_0x376ea5,'to':0x0}),this[_0x5047e6(0x157)][_0x5047e6(0x1d5)](FetchingMissState,this['unitID'],this[_0x5047e6(0x285)],null,[],null,[],this[_0x5047e6(0x293)]);}};SyncedState=__decorate([__decorateParam(0x3,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_pro_collaboration[_0x35406f(0x267)])),__decorateParam(0x4,(0x0,_univerjs_core['Inject'])(_univerjs_core[_0x35406f(0x2f9)])),__decorateParam(0x5,_univerjs_core[_0x35406f(0x207)]),__decorateParam(0x6,_univerjs_core[_0x35406f(0x10d)]),__decorateParam(0x7,_univerjs_core[_0x35406f(0x33e)]),__decorateParam(0x8,_univerjs_pro_collaboration[_0x35406f(0x308)]),__decorateParam(0x9,(0x0,_univerjs_core['Optional'])(ILocalCacheService))],SyncedState);let PendingState=_PendingState=class PendingState extends CollaborationState{constructor(_0x232d5c,_0x328c55,_0x3483ed,_0x35964b,_0x11fc8a,_0x4dcb78,_0x2a2cf5,_0x2905f7,_0x294458,_0x51c24d,_0x4865a1,_0x585651,_0x9f1093,_0x55e23e){const _0x357f73=_0x35406f;super(_0x232d5c,_0x328c55,null,_0x3483ed,_0x35964b,_0x294458,_0x9f1093,_0x4dcb78,_0x55e23e),this[_0x357f73(0x157)]=_0x11fc8a,this[_0x357f73(0x23a)]=_0x2a2cf5,this[_0x357f73(0x3ae)]=_0x2905f7,this[_0x357f73(0x279)]=_0x51c24d,this[_0x357f73(0x300)]=_0x4865a1,this[_0x357f73(0x3a3)]=_0x585651,_defineProperty(this,_0x357f73(0x1c5),CollaborationStatus[_0x357f73(0x365)]),_defineProperty(this,_0x357f73(0x151),null),_defineProperty(this,'_sendingTimer',null);}[_0x35406f(0x2ba)](_0x2e91b5){const _0x2985ee=_0x35406f;return this['_pendingMutations'][_0x2985ee(0x17b)](_0x2e91b5),this[_0x2985ee(0x257)](),this;}[_0x35406f(0x1ef)](_0x2d270c){const _0x176e3d=_0x35406f;if(this[_0x176e3d(0x399)](_0x2d270c))return this[_0x176e3d(0x1a9)](),this[_0x176e3d(0x157)]['createInstance'](FetchingMissState,this[_0x176e3d(0x27a)],this['type'],null,this[_0x176e3d(0x2df)],null,[_0x2d270c],this[_0x176e3d(0x293)]);try{const _0x246837=this[_0x176e3d(0x300)]['transformMutationsWithChangeset'](_0x2d270c,this['_pendingMutations']);if((0x0,_univerjs_pro_collaboration['isTransformMutationsWithChangesetSuccess'])(_0x246837)){const {c1Prime:_0x30e356,m2Prime:_0x3d827c}=_0x246837;this['_executeRemoteChangeset'](_0x30e356);const _0x1bd3d9=this[_0x176e3d(0x157)][_0x176e3d(0x1d5)](_PendingState,this[_0x176e3d(0x27a)],this[_0x176e3d(0x285)],_0x3d827c,this[_0x176e3d(0x293)]);this[_0x176e3d(0x1a9)]();const _0x38f6d2=new Date()[_0x176e3d(0x38c)](),_0x25c08f=this[_0x176e3d(0x151)]?Math['max'](this[_0x176e3d(0x151)]-_0x38f6d2,0x0):this['_getSendChangesetTimeout']();return _0x1bd3d9['_schedule'](_0x25c08f),_0x1bd3d9;}throw _0x246837[_0x176e3d(0x34c)];}catch(_0xb56ee3){return this[_0x176e3d(0x3ae)][_0x176e3d(0x34c)](_0xb56ee3),this['_onConflict'](![]);}}[_0x35406f(0x37b)](){const _0x1d55c6=_0x35406f;throw new Error(_0x1d55c6(0x2bb));}[_0x35406f(0x263)](){const _0x351a91=_0x35406f;throw new Error(_0x351a91(0x2aa));}['onRemoteRetry'](){return this;}['toggleOffline'](){const _0x2e0a4d=_0x35406f;return this[_0x2e0a4d(0x1a9)](),this[_0x2e0a4d(0x157)][_0x2e0a4d(0x1d5)](OfflineState,this[_0x2e0a4d(0x27a)],this[_0x2e0a4d(0x285)],null,this[_0x2e0a4d(0x2df)],this['_handler']);}['toggleOnline'](){return this;}[_0x35406f(0x310)](_0x136a1b){const _0x31f1c8=_0x35406f,_0x3269d9=_0x136a1b!==null&&_0x136a1b!==void 0x0?_0x136a1b:this[_0x31f1c8(0x3d1)]();this[_0x31f1c8(0x151)]=new Date()[_0x31f1c8(0x38c)]()+_0x3269d9,this[_0x31f1c8(0x1e4)]=setTimeout(()=>{const _0x4503d6=_0x31f1c8;this[_0x4503d6(0x1a9)]();let _0x8c697d=null;switch(this[_0x4503d6(0x285)]){case _univerjs_core['UniverInstanceType'][_0x4503d6(0x307)]:_0x8c697d=assembleSheetChangeset(this['_pendingMutations'],this[_0x4503d6(0x27a)],this[_0x4503d6(0x3a3)],this[_0x4503d6(0x3a9)],this['_memberService']);break;case _univerjs_core[_0x4503d6(0x3b4)]['UNIVER_DOC']:if(this[_0x4503d6(0x2df)][_0x4503d6(0x1c3)](_0x34cfed=>_0x34cfed['id']===_univerjs_docs[_0x4503d6(0x368)]['id']))_0x8c697d=assembleDocChangeset(this[_0x4503d6(0x2df)],this[_0x4503d6(0x27a)],this[_0x4503d6(0x3a3)],this[_0x4503d6(0x3a9)],this[_0x4503d6(0x23a)]);else _0x8c697d=assembleSheetChangeset(this[_0x4503d6(0x2df)],this[_0x4503d6(0x27a)],this[_0x4503d6(0x3a3)],this[_0x4503d6(0x3a9)],this['_memberService']);break;default:throw new Error(_0x4503d6(0x169)+this[_0x4503d6(0x285)]+_0x4503d6(0x168));}const {changeset:_0x4922a4,pendingMutations:_0x1ba08b}=_0x8c697d;this[_0x4503d6(0x293)]['onSendChangeset'](_0x4922a4);const _0x2f31b3=_0x1ba08b[_0x4503d6(0x332)]?this[_0x4503d6(0x157)][_0x4503d6(0x1d5)](AwaitingWithPendingState,this[_0x4503d6(0x27a)],this[_0x4503d6(0x285)],_0x4922a4,_0x1ba08b,this[_0x4503d6(0x293)],void 0x0):this[_0x4503d6(0x157)][_0x4503d6(0x1d5)](AwaitingState,this[_0x4503d6(0x27a)],this['type'],_0x4922a4,this['_handler']);_0x2f31b3[_0x4503d6(0x257)](),this['_handler'][_0x4503d6(0x271)](this,_0x2f31b3);},_0x3269d9);}['_getSendChangesetTimeout'](){const _0x707f56=_0x35406f;var _0x1bc823;const _0x14dd64=this[_0x707f56(0x279)][_0x707f56(0x38b)](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY);return(_0x1bc823=_0x14dd64===null||_0x14dd64===void 0x0?void 0x0:_0x14dd64[_0x707f56(0x318)])!==null&&_0x1bc823!==void 0x0?_0x1bc823:DEFAULT_SEND_CHANGESET_TIMEOUT;}[_0x35406f(0x2a3)](){const _0x3fba3b=_0x35406f;throw new Error(_0x3fba3b(0x3cf));}['_clearScheduledTask'](){const _0x3fa74c=_0x35406f;this[_0x3fa74c(0x1e4)]!=null&&(clearTimeout(this[_0x3fa74c(0x1e4)]),this[_0x3fa74c(0x1e4)]=null);}[_0x35406f(0x314)](_0x45c938){const _0x3a7cbe=_0x35406f;return this[_0x3a7cbe(0x1a9)](),this['_injector']['createInstance'](ConflictState,this[_0x3a7cbe(0x27a)],this['type'],null,this[_0x3a7cbe(0x2df)],this[_0x3a7cbe(0x293)],_0x45c938);}};PendingState=_PendingState=__decorate([__decorateParam(0x4,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_core[_0x35406f(0x2f9)])),__decorateParam(0x5,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_pro_collaboration[_0x35406f(0x267)])),__decorateParam(0x6,(0x0,_univerjs_core[_0x35406f(0x33b)])(MemberService)),__decorateParam(0x7,_univerjs_core['ILogService']),__decorateParam(0x8,_univerjs_core['ICommandService']),__decorateParam(0x9,_univerjs_core[_0x35406f(0x196)]),__decorateParam(0xa,_univerjs_pro_collaboration[_0x35406f(0x308)]),__decorateParam(0xb,_univerjs_core[_0x35406f(0x161)]),__decorateParam(0xc,_univerjs_core[_0x35406f(0x207)]),__decorateParam(0xd,(0x0,_univerjs_core['Optional'])(ILocalCacheService))],PendingState);let AwaitingState=_AwaitingState=class AwaitingState extends CollaborationState{constructor(_0x5c1a81,_0x4f8abf,_0x275dbd,_0x29dd49,_0x3aa5ee,_0x20f202,_0x5167a4,_0x581ee2,_0x33d8c8,_0x3c8d5b,_0x3194f9){const _0xae0504=_0x35406f;super(_0x5c1a81,_0x4f8abf,_0x275dbd,[],_0x29dd49,_0x5167a4,_0x3c8d5b,_0x20f202,_0x3194f9),this['_injector']=_0x3aa5ee,this[_0xae0504(0x3ae)]=_0x581ee2,this[_0xae0504(0x300)]=_0x33d8c8,_defineProperty(this,'status',CollaborationStatus[_0xae0504(0x2bf)]),_defineProperty(this,_0xae0504(0x1fd),0x0),_defineProperty(this,_0xae0504(0x2ce),0x0),_defineProperty(this,_0xae0504(0x1ea),void 0x0),_defineProperty(this,'_sender',void 0x0);}[_0x35406f(0x2ba)](_0x729171){const _0x186ba4=_0x35406f;this[_0x186ba4(0x1a9)]();const _0x2ca7d9=this[_0x186ba4(0x157)][_0x186ba4(0x1d5)](AwaitingWithPendingState,this['unitID'],this[_0x186ba4(0x285)],this['_awaitingChangeset'],[_0x729171],this[_0x186ba4(0x293)],this[_0x186ba4(0x1ea)]);return _0x2ca7d9[_0x186ba4(0x257)](),_0x2ca7d9;}[_0x35406f(0x1ef)](_0x64412a){const _0x1339b0=_0x35406f;if(this[_0x1339b0(0x399)](_0x64412a))return this[_0x1339b0(0x1a9)](),this[_0x1339b0(0x157)][_0x1339b0(0x1d5)](FetchingMissState,this[_0x1339b0(0x27a)],this[_0x1339b0(0x285)],this[_0x1339b0(0x1f9)],[],null,[_0x64412a],this[_0x1339b0(0x293)]);try{const _0xb02f6=this[_0x1339b0(0x300)][_0x1339b0(0x31c)]([_0x64412a],[this[_0x1339b0(0x1f9)]],![]);if((0x0,_univerjs_pro_collaboration[_0x1339b0(0x1e3)])(_0xb02f6)){const {c1Prime:_0x5c0b0e,c2Prime:_0x346a64}=_0xb02f6;this[_0x1339b0(0x32c)](_0x5c0b0e[0x0]),_0x346a64[0x0]['baseRev']=this[_0x1339b0(0x215)](),this[_0x1339b0(0x1a9)]();const _0x448459=this['_injector'][_0x1339b0(0x1d5)](_AwaitingState,this[_0x1339b0(0x27a)],this[_0x1339b0(0x285)],_0x346a64[0x0],this[_0x1339b0(0x293)]);return _0x448459[_0x1339b0(0x257)](),_0x448459;}return this['_onConflict'](![]);}catch(_0xb0ae8){return this[_0x1339b0(0x3ae)]['error'](_0xb0ae8),this[_0x1339b0(0x314)](![]);}}[_0x35406f(0x37b)](_0x24ba4f){const _0x44c424=_0x35406f;this['_clearScheduledTask']();const _0x21f81c=this['_revisionService'][_0x44c424(0x129)](this[_0x44c424(0x27a)]);if(_0x24ba4f['revision']<_0x21f81c-0x1)return this;if(this[_0x44c424(0x399)](_0x24ba4f))return this[_0x44c424(0x157)][_0x44c424(0x1d5)](FetchingMissState,this[_0x44c424(0x27a)],this[_0x44c424(0x285)],null,[],this['_awaitingChangeset'],[],this[_0x44c424(0x293)]);this[_0x44c424(0x119)]();const _0x3f2beb=this[_0x44c424(0x157)][_0x44c424(0x1d5)](SyncedState,this[_0x44c424(0x27a)],this['type'],this['_handler']);return _0x3f2beb[_0x44c424(0x257)](),_0x3f2beb;}[_0x35406f(0x263)](_0x351ab7){const _0x2e8e57=_0x35406f;return this[_0x2e8e57(0x314)](!!(_0x351ab7===null||_0x351ab7===void 0x0?void 0x0:_0x351ab7[_0x2e8e57(0x39c)]));}[_0x35406f(0x30c)](_0x5144b7){const _0x2b8a62=_0x35406f;if(this[_0x2b8a62(0x2ce)]>MAX_RETRY_TOTAL_TIMEOUT)return this[_0x2b8a62(0x24f)]();return this[_0x2b8a62(0x1ea)]=createTimerObservable$(this[_0x2b8a62(0x1fd)],{'timeout':this[_0x2b8a62(0x1fd)],'reqId':_0x5144b7[_0x2b8a62(0x3b7)]}),this[_0x2b8a62(0xff)]=this[_0x2b8a62(0x1ea)][_0x2b8a62(0x2b5)](({reqId:_0x2cde62,timeout:_0x47518f})=>{const _0x5857ac=_0x2b8a62;this[_0x5857ac(0x115)](_0x2cde62,_0x47518f);}),this;}[_0x35406f(0x24f)](){const _0x356cd8=_0x35406f;return this[_0x356cd8(0x1a9)](),this[_0x356cd8(0x157)][_0x356cd8(0x1d5)](OfflineState,this['unitID'],this[_0x356cd8(0x285)],this[_0x356cd8(0x1f9)],[],this['_handler']);}[_0x35406f(0x14f)](){return this;}[_0x35406f(0x2a3)](){const _0x38d42e=_0x35406f;this[_0x38d42e(0x293)][_0x38d42e(0x346)](this[_0x38d42e(0x1f9)]);}['_onConflict'](_0x4956d5){const _0x20f38c=_0x35406f;return this[_0x20f38c(0x1a9)](),this[_0x20f38c(0x157)][_0x20f38c(0x1d5)](ConflictState,this[_0x20f38c(0x27a)],this[_0x20f38c(0x285)],this['_awaitingChangeset'],[],this[_0x20f38c(0x293)],_0x4956d5);}[_0x35406f(0x115)](_0x4ac136,_0x563e4b){const _0x5a6356=_0x35406f;var _0x28ab2a;_0x4ac136===((_0x28ab2a=this[_0x5a6356(0x1f9)])===null||_0x28ab2a===void 0x0?void 0x0:_0x28ab2a[_0x5a6356(0x3b7)])&&(this[_0x5a6356(0x2a3)](),this['_resendTimeout']=_0x563e4b===0x0?0x3e8:Math['min'](_0x563e4b*0x2,MAX_RETRY_TIMEOUT),this[_0x5a6356(0x2ce)]+=this[_0x5a6356(0x1fd)]);}[_0x35406f(0x1a9)](){var _0x2c897b;(_0x2c897b=this['_sender'])===null||_0x2c897b===void 0x0||_0x2c897b['unsubscribe'](),this['_resendTimeout']=0x0,this['_maxTotalRetryTimeout']=0x0;}};AwaitingState=_AwaitingState=__decorate([__decorateParam(0x4,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_core[_0x35406f(0x2f9)])),__decorateParam(0x5,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_pro_collaboration['RevisionService'])),__decorateParam(0x6,_univerjs_core[_0x35406f(0x10d)]),__decorateParam(0x7,_univerjs_core[_0x35406f(0x33e)]),__decorateParam(0x8,_univerjs_pro_collaboration['ITransformService']),__decorateParam(0x9,_univerjs_core['IUndoRedoService']),__decorateParam(0xa,(0x0,_univerjs_core['Optional'])(ILocalCacheService))],AwaitingState);let AwaitingWithPendingState=_AwaitingWithPendingState=class AwaitingWithPendingState extends CollaborationState{constructor(_0x377571,_0x3c8e47,_0x13a1c4,_0x42537d,_0x23a7e3,_0x2f1a0b,_0x56c187,_0x2d9755,_0x267f50,_0x1694d3,_0x40ac45,_0xb59d80,_0x7e5efe){const _0x35eceb=_0x35406f;super(_0x377571,_0x3c8e47,_0x13a1c4,_0x42537d,_0x23a7e3,_0x267f50,_0xb59d80,_0x2d9755,_0x7e5efe),this[_0x35eceb(0x157)]=_0x56c187,this[_0x35eceb(0x3ae)]=_0x1694d3,this['_transformService']=_0x40ac45,this['localCacheService']=_0x7e5efe,_defineProperty(this,'status',CollaborationStatus['AWAITING_WITH_PENDING']),_defineProperty(this,'_resendTimeout',0x0),_defineProperty(this,_0x35eceb(0x2ce),0x0),_defineProperty(this,'_resendTimer',void 0x0),_defineProperty(this,'_sender',void 0x0),_0x2f1a0b&&(this[_0x35eceb(0x1ea)]=_0x2f1a0b,this[_0x35eceb(0xff)]=this[_0x35eceb(0x1ea)]['subscribe'](({reqId:_0x59fb50,timeout:_0x1df7f5})=>{this['_resendWithTimeout'](_0x59fb50,_0x1df7f5);}));}[_0x35406f(0x2ba)](_0x402e66){const _0x61eb89=_0x35406f;return this[_0x61eb89(0x2df)][_0x61eb89(0x17b)](_0x402e66),this;}[_0x35406f(0x1ef)](_0x31052b){const _0x59b880=_0x35406f;if(this[_0x59b880(0x399)](_0x31052b))return this['_clearScheduledTask'](),this['_injector'][_0x59b880(0x1d5)](FetchingMissState,this[_0x59b880(0x27a)],this['type'],this[_0x59b880(0x1f9)],this['_pendingMutations'],null,[_0x31052b],this[_0x59b880(0x293)]);try{const _0xcbb666=this[_0x59b880(0x300)][_0x59b880(0x31c)]([_0x31052b],[this[_0x59b880(0x1f9)]],![]);if((0x0,_univerjs_pro_collaboration[_0x59b880(0x1e3)])(_0xcbb666)){const {c1Prime:_0x26986c,c2Prime:_0x5cf2d4}=_0xcbb666,_0x516fc9=this[_0x59b880(0x300)][_0x59b880(0x23f)](_0x26986c[0x0],this[_0x59b880(0x2df)]);if((0x0,_univerjs_pro_collaboration[_0x59b880(0x30b)])(_0x516fc9)){const {c1Prime:_0x4a180c,m2Prime:_0x331c23}=_0x516fc9;return this[_0x59b880(0x32c)](_0x4a180c),_0x5cf2d4[0x0]['baseRev']=this[_0x59b880(0x215)](),this[_0x59b880(0x1a9)](),this[_0x59b880(0x157)]['createInstance'](_AwaitingWithPendingState,this[_0x59b880(0x27a)],this[_0x59b880(0x285)],_0x5cf2d4[0x0],_0x331c23,this[_0x59b880(0x293)],void 0x0);}throw _0x516fc9[_0x59b880(0x34c)];}throw _0xcbb666['error'];}catch(_0xab23eb){return this['_logService'][_0x59b880(0x34c)](_0xab23eb),this[_0x59b880(0x314)](![]);}}[_0x35406f(0x37b)](_0x4981b7){const _0x5cec97=_0x35406f;this[_0x5cec97(0x1a9)]();if(this[_0x5cec97(0x399)](_0x4981b7))return this[_0x5cec97(0x157)]['createInstance'](FetchingMissState,this[_0x5cec97(0x27a)],this['type'],null,this['_pendingMutations'],this[_0x5cec97(0x1f9)],[],this[_0x5cec97(0x293)]);this['_incrementRevisionNumber']();const _0x1a7efe=this[_0x5cec97(0x157)][_0x5cec97(0x1d5)](PendingState,this[_0x5cec97(0x27a)],this[_0x5cec97(0x285)],this[_0x5cec97(0x2df)],this['_handler']);return _0x1a7efe[_0x5cec97(0x310)](),_0x1a7efe[_0x5cec97(0x257)](),_0x1a7efe;}['onRemoteRej'](_0x1b3c09){const _0x3256ba=_0x35406f;return this[_0x3256ba(0x314)](!!(_0x1b3c09===null||_0x1b3c09===void 0x0?void 0x0:_0x1b3c09[_0x3256ba(0x39c)]));}['onRemoteRetry'](_0x479797){const _0x537788=_0x35406f;if(this[_0x537788(0x2ce)]>MAX_RETRY_TOTAL_TIMEOUT)return this[_0x537788(0x24f)]();return this[_0x537788(0x1ea)]=createTimerObservable$(this['_resendTimeout'],{'timeout':this[_0x537788(0x1fd)],'reqId':_0x479797[_0x537788(0x3b7)]}),this['_sender']=this[_0x537788(0x1ea)][_0x537788(0x2b5)](({reqId:_0x343052,timeout:_0x93c133})=>{const _0x29a2d2=_0x537788;this[_0x29a2d2(0x115)](_0x343052,_0x93c133);}),this;}[_0x35406f(0x24f)](){const _0x6c4cf9=_0x35406f;return this[_0x6c4cf9(0x1a9)](),this['_injector'][_0x6c4cf9(0x1d5)](OfflineState,this[_0x6c4cf9(0x27a)],this['type'],this['_awaitingChangeset'],this[_0x6c4cf9(0x2df)],this[_0x6c4cf9(0x293)]);}[_0x35406f(0x14f)](){return this;}[_0x35406f(0x2a3)](){const _0x2a145c=_0x35406f;this[_0x2a145c(0x293)][_0x2a145c(0x346)](this[_0x2a145c(0x1f9)]);}['_onConflict'](_0x5f0f9f){const _0x3d54e9=_0x35406f;return this[_0x3d54e9(0x1a9)](),this['_injector'][_0x3d54e9(0x1d5)](ConflictState,this[_0x3d54e9(0x27a)],this[_0x3d54e9(0x285)],null,this['_pendingMutations'],this[_0x3d54e9(0x293)],_0x5f0f9f);}['_resendWithTimeout'](_0x5724a2,_0x3fca13){const _0x10dc9a=_0x35406f;var _0x12380b;_0x5724a2===((_0x12380b=this['_awaitingChangeset'])===null||_0x12380b===void 0x0?void 0x0:_0x12380b[_0x10dc9a(0x3b7)])&&(this[_0x10dc9a(0x2a3)](),this[_0x10dc9a(0x1fd)]=_0x3fca13===0x0?0x3e8:Math[_0x10dc9a(0x19a)](_0x3fca13*0x2,MAX_RETRY_TIMEOUT),this[_0x10dc9a(0x2ce)]+=this['_resendTimeout']);}[_0x35406f(0x1a9)](){const _0x4aa9fb=_0x35406f;var _0x4ba1ae;(_0x4ba1ae=this[_0x4aa9fb(0xff)])===null||_0x4ba1ae===void 0x0||_0x4ba1ae[_0x4aa9fb(0x33a)](),this['_resendTimeout']=0x0,this[_0x4aa9fb(0x2ce)]=0x0;}};AwaitingWithPendingState=_AwaitingWithPendingState=__decorate([__decorateParam(0x6,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_core[_0x35406f(0x2f9)])),__decorateParam(0x7,(0x0,_univerjs_core['Inject'])(_univerjs_pro_collaboration[_0x35406f(0x267)])),__decorateParam(0x8,_univerjs_core['ICommandService']),__decorateParam(0x9,_univerjs_core['ILogService']),__decorateParam(0xa,_univerjs_pro_collaboration[_0x35406f(0x308)]),__decorateParam(0xb,_univerjs_core[_0x35406f(0x207)]),__decorateParam(0xc,(0x0,_univerjs_core[_0x35406f(0x2c9)])(ILocalCacheService))],AwaitingWithPendingState);let ConflictState=class ConflictState extends CollaborationState{constructor(_0x124daa,_0x9ec5fd,_0x26d2aa,_0x222d90,_0x27754e,_0x4616ef=![],_0x255bbb,_0xae9a59,_0x207a1e,_0x58beba,_0x97157a,_0x330423,_0x2eb758){const _0x31a314=_0x35406f;super(_0x124daa,_0x9ec5fd,_0x26d2aa,_0x222d90,_0x27754e,_0xae9a59,_0x207a1e,_0x58beba,_0x2eb758),this[_0x31a314(0x246)]=_0x4616ef,this[_0x31a314(0x36e)]=_0x255bbb,this[_0x31a314(0x2cd)]=_0x97157a,this[_0x31a314(0x24d)]=_0x330423,this[_0x31a314(0x296)]=_0x2eb758,_defineProperty(this,_0x31a314(0x1c5),CollaborationStatus[_0x31a314(0x111)]),this['_showConflictNotification'](),this[_0x31a314(0x2fe)](),this[_0x31a314(0x3a6)]();}[_0x35406f(0x2ba)](){return this;}[_0x35406f(0x1ef)](){return this;}[_0x35406f(0x37b)](){return this;}[_0x35406f(0x263)](){return this;}[_0x35406f(0x30c)](){return this;}[_0x35406f(0x24f)](){return this;}[_0x35406f(0x14f)](){return this;}[_0x35406f(0x2a3)](){throw new Error('[ConflictState]:\x20invalid\x20calling\x20to\x20`resend`.');}[_0x35406f(0x2fe)](){const _0x170240=_0x35406f;var _0x26570c;(_0x26570c=this['_localCacheService'])===null||_0x26570c===void 0x0||_0x26570c[_0x170240(0x30a)](this[_0x170240(0x27a)],this[_0x170240(0x285)],null,[]);}[_0x35406f(0x2c7)](){const _0x4ddd10=_0x35406f;if(this[_0x4ddd10(0x246)])this[_0x4ddd10(0x24d)][_0x4ddd10(0x190)]({'id':CollaborationUIEventId[_0x4ddd10(0x231)]});else this[_0x4ddd10(0x24d)]['emitEvent']({'id':CollaborationUIEventId[_0x4ddd10(0x111)]});}[_0x35406f(0x3a6)](){const _0x290177=_0x35406f;this[_0x290177(0x36e)][_0x290177(0x29e)](new _univerjs_sheets[(_0x290177(0x213))](this[_0x290177(0x27a)])['id'],![]);}};ConflictState=__decorate([__decorateParam(0x6,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_core[_0x35406f(0x192)])),__decorateParam(0x7,_univerjs_core[_0x35406f(0x10d)]),__decorateParam(0x8,_univerjs_core[_0x35406f(0x207)]),__decorateParam(0x9,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_pro_collaboration['RevisionService'])),__decorateParam(0xa,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_core[_0x35406f(0x10b)])),__decorateParam(0xb,(0x0,_univerjs_core[_0x35406f(0x33b)])(CollaborationUIEventService)),__decorateParam(0xc,(0x0,_univerjs_core[_0x35406f(0x2c9)])(ILocalCacheService))],ConflictState);let OfflineState=class OfflineState extends CollaborationState{constructor(_0x4d37dc,_0x4ee9e8,_0x43095d,_0x47c812,_0x5968f2,_0x3b4d39,_0x58a044,_0xad272a,_0x5b8e84,_0x12cb7d){const _0x1363aa=_0x35406f;super(_0x4d37dc,_0x4ee9e8,_0x43095d,_0x47c812,_0x5968f2,_0xad272a,_0x5b8e84,_0x58a044,_0x12cb7d),this[_0x1363aa(0x157)]=_0x3b4d39,_defineProperty(this,'status',CollaborationStatus[_0x1363aa(0x3af)]);}[_0x35406f(0x2ba)](_0x406fb){const _0xd04061=_0x35406f;return this[_0xd04061(0x2df)][_0xd04061(0x17b)](_0x406fb),this[_0xd04061(0x257)](),this;}[_0x35406f(0x1ef)](_0x1d65d2){const _0x4fdca8=_0x35406f;throw new Error(_0x4fdca8(0x31b));}[_0x35406f(0x37b)](){throw new Error('[OfflineState]:\x20received\x20acknowledgement.');}[_0x35406f(0x263)](){throw new Error('[OfflineState]:\x20received\x20rejection.');}[_0x35406f(0x30c)](){return this;}['toggleOffline'](){return this;}['toggleOnline'](){const _0x350592=_0x35406f,{_injector:_0x1fba6d,_pendingMutations:_0x48df61,_awaitingChangeset:_0x24afa6,unitID:_0x5071b4,_handler:_0x40a303,type:_0x1e313e}=this,_0x3d9627=createOnlineState(_0x1fba6d,_0x5071b4,_0x1e313e,_0x24afa6,_0x48df61,_0x40a303);if(_0x3d9627 instanceof PendingState)_0x3d9627['_schedule']();else{if(_0x3d9627 instanceof AwaitingWithPendingState||_0x3d9627 instanceof AwaitingState)_0x3d9627[_0x350592(0x2a3)]();}return _0x3d9627;}[_0x35406f(0x2a3)](){const _0x292fbf=_0x35406f;throw new Error(_0x292fbf(0x2f8));}};OfflineState=__decorate([__decorateParam(0x5,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_core[_0x35406f(0x2f9)])),__decorateParam(0x6,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_pro_collaboration[_0x35406f(0x267)])),__decorateParam(0x7,_univerjs_core[_0x35406f(0x10d)]),__decorateParam(0x8,_univerjs_core[_0x35406f(0x207)]),__decorateParam(0x9,(0x0,_univerjs_core[_0x35406f(0x2c9)])(ILocalCacheService))],OfflineState);let FetchingMissState=class FetchingMissState extends CollaborationState{constructor(_0x3ff3f2,_0x1924ed,_0x33a369,_0x2d484d,_0x2c4006,_0x50ab2e,_0x25c839,_0x19c895,_0x33ce83,_0x401d20,_0xa18351,_0x50773b,_0x40bf56,_0x395283){const _0x3584a3=_0x35406f;super(_0x3ff3f2,_0x1924ed,_0x33a369,_0x2d484d,_0x25c839,_0xa18351,_0x50773b,_0x33ce83,_0x395283),this[_0x3584a3(0x19f)]=_0x2c4006,this[_0x3584a3(0x1b4)]=_0x50ab2e,this[_0x3584a3(0x157)]=_0x19c895,this[_0x3584a3(0x3ae)]=_0x401d20,this['_transformService']=_0x40bf56,this['localCacheService']=_0x395283,_defineProperty(this,_0x3584a3(0x1c5),CollaborationStatus[_0x3584a3(0x35f)]);}[_0x35406f(0x2e2)](_0x5354b1){const _0x39735d=_0x35406f;try{const _0x59dc3a=[..._0x5354b1,...this[_0x39735d(0x1b4)]],_0x1a8643=[this[_0x39735d(0x1f9)]||this[_0x39735d(0x19f)]][_0x39735d(0x2e7)](_0x37f27b=>!!_0x37f27b);let _0x486b4b,_0x2bf8dd;if(_0x1a8643['length']){const _0x4843c4=this['_transformService'][_0x39735d(0x31c)](_0x59dc3a,_0x1a8643,![]);if(!(0x0,_univerjs_pro_collaboration[_0x39735d(0x1e3)])(_0x4843c4))throw _0x4843c4[_0x39735d(0x34c)];_0x486b4b=_0x4843c4[_0x39735d(0x302)],_0x2bf8dd=_0x4843c4['c2Prime'];}else _0x486b4b=_0x59dc3a,_0x2bf8dd=[];let _0x2c5c5c=this[_0x39735d(0x2df)];_0x486b4b['forEach'](_0x32bc16=>{const _0x1f5414=_0x39735d;let _0x48359c;if(_0x2c5c5c[_0x1f5414(0x332)]){const _0x2e2088=this[_0x1f5414(0x300)][_0x1f5414(0x23f)](_0x32bc16,_0x2c5c5c);if(!(0x0,_univerjs_pro_collaboration[_0x1f5414(0x30b)])(_0x2e2088))throw _0x2e2088[_0x1f5414(0x34c)];_0x48359c=_0x2e2088[_0x1f5414(0x302)],_0x2c5c5c=_0x2e2088[_0x1f5414(0x1d6)];}else _0x48359c=_0x32bc16;this[_0x1f5414(0x32c)](_0x48359c);});if(this[_0x39735d(0x19f)])this[_0x39735d(0x119)]();if(this[_0x39735d(0x1f9)]&&_0x2bf8dd[_0x39735d(0x332)])_0x2bf8dd[0x0]['baseRev']=this[_0x39735d(0x215)]();let _0x2bd05b;if(this[_0x39735d(0x1f9)]&&_0x2c5c5c[_0x39735d(0x332)]!==0x0)_0x2bd05b=this[_0x39735d(0x157)]['createInstance'](AwaitingWithPendingState,this[_0x39735d(0x27a)],this[_0x39735d(0x285)],_0x2bf8dd[0x0],_0x2c5c5c,this['_handler'],void 0x0);else{if(this['_awaitingChangeset']&&_0x2c5c5c[_0x39735d(0x332)]===0x0)_0x2bf8dd[0x0][_0x39735d(0x32e)]=this[_0x39735d(0x215)](),_0x2bd05b=this['_injector'][_0x39735d(0x1d5)](AwaitingState,this[_0x39735d(0x27a)],this[_0x39735d(0x285)],_0x2bf8dd[0x0],this[_0x39735d(0x293)]);else{if(_0x2c5c5c[_0x39735d(0x332)]!==0x0){const _0x45490e=this[_0x39735d(0x157)]['createInstance'](PendingState,this[_0x39735d(0x27a)],this['type'],_0x2c5c5c,this['_handler']);_0x45490e[_0x39735d(0x310)](),_0x2bd05b=_0x45490e;}else _0x2bd05b=this[_0x39735d(0x157)][_0x39735d(0x1d5)](SyncedState,this[_0x39735d(0x27a)],this['type'],this[_0x39735d(0x293)]);}}return _0x2bd05b[_0x39735d(0x257)](),_0x2bd05b;}catch(_0x19e474){return this[_0x39735d(0x3ae)][_0x39735d(0x34c)](_0x39735d(0x236),_0x39735d(0x322),_0x19e474),this[_0x39735d(0x157)][_0x39735d(0x1d5)](ConflictState,this[_0x39735d(0x27a)],this[_0x39735d(0x285)],this[_0x39735d(0x1f9)],this['_pendingMutations'],this[_0x39735d(0x293)],![]);}}[_0x35406f(0x2a3)](){const _0x506fbb=_0x35406f;throw new Error(_0x506fbb(0x148));}[_0x35406f(0x2ba)](_0x5181ea){const _0x23b8f2=_0x35406f;return this[_0x23b8f2(0x2df)]['push'](_0x5181ea),this;}[_0x35406f(0x1ef)](_0x57328a){const _0x1e75e3=_0x35406f;return this[_0x1e75e3(0x1b4)][_0x1e75e3(0x17b)](_0x57328a),this;}[_0x35406f(0x37b)](_0x70df4){const _0x3ec9b4=_0x35406f;if(this[_0x3ec9b4(0x1f9)])return this[_0x3ec9b4(0x19f)]=this['_awaitingChangeset'],this['_awaitingChangeset']=null,this;throw new Error(_0x3ec9b4(0x18f));}['onRemoteRej'](_0x4d7c4e){const _0x5e1909=_0x35406f;return this[_0x5e1909(0x314)](!!(_0x4d7c4e===null||_0x4d7c4e===void 0x0?void 0x0:_0x4d7c4e[_0x5e1909(0x39c)]));}[_0x35406f(0x30c)](){return this;}['toggleOffline'](){const _0x2a6c18=_0x35406f;return this[_0x2a6c18(0x157)][_0x2a6c18(0x1d5)](OfflineState,this[_0x2a6c18(0x27a)],this[_0x2a6c18(0x285)],this[_0x2a6c18(0x1f9)],this[_0x2a6c18(0x2df)],this[_0x2a6c18(0x293)]);}['toggleOnline'](){return this;}[_0x35406f(0x314)](_0x22e115){const _0x19877d=_0x35406f;return this['_injector']['createInstance'](ConflictState,this[_0x19877d(0x27a)],this[_0x19877d(0x285)],this[_0x19877d(0x1f9)],this['_pendingMutations'],this[_0x19877d(0x293)],_0x22e115);}};FetchingMissState=__decorate([__decorateParam(0x7,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_core['Injector'])),__decorateParam(0x8,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_pro_collaboration[_0x35406f(0x267)])),__decorateParam(0x9,_univerjs_core[_0x35406f(0x33e)]),__decorateParam(0xa,_univerjs_core['ICommandService']),__decorateParam(0xb,_univerjs_core['IUndoRedoService']),__decorateParam(0xc,_univerjs_pro_collaboration['ITransformService']),__decorateParam(0xd,(0x0,_univerjs_core[_0x35406f(0x2c9)])(ILocalCacheService))],FetchingMissState);function createOnlineState(_0x1dae71,_0x3d4be9,_0x406632,_0x157567,_0x42fc1b,_0x2dd95b){const _0x3dece1=_0x35406f;if(_0x157567&&_0x42fc1b['length'])return _0x1dae71['createInstance'](AwaitingWithPendingState,_0x3d4be9,_0x406632,_0x157567,_0x42fc1b,_0x2dd95b,void 0x0);if(_0x157567)return _0x1dae71[_0x3dece1(0x1d5)](AwaitingState,_0x3d4be9,_0x406632,_0x157567,_0x2dd95b);if(_0x42fc1b[_0x3dece1(0x332)])return _0x1dae71[_0x3dece1(0x1d5)](PendingState,_0x3d4be9,_0x406632,_0x42fc1b,_0x2dd95b);return _0x1dae71[_0x3dece1(0x1d5)](SyncedState,_0x3d4be9,_0x406632,_0x2dd95b);}let CollaborationEntity=class CollaborationEntity extends _univerjs_core[_0x35406f(0x388)]{get[_0x35406f(0x1ac)](){const _0x3aa050=_0x35406f;return this[_0x3aa050(0x362)];}constructor(_0x440583,_0x4ca69c,_0x39bc1d,_0x160d3a,_0x579f98,_0x108f98,_0x5db4a2,_0x5e0e8a,_0x165f2f,_0x457b83,_0x32221d,_0x21fefa,_0xb3d0f7,_0x5ca859){const _0xb6c228=_0x35406f;super(),this[_0xb6c228(0x27a)]=_0x440583,this['session']=_0x4ca69c,this[_0xb6c228(0x13c)]=_0x39bc1d,this['_injector']=_0x160d3a,this[_0xb6c228(0x183)]=_0x579f98,this['_localeService']=_0x108f98,this[_0xb6c228(0x3a9)]=_0x5db4a2,this[_0xb6c228(0x1fe)]=_0x5e0e8a,this[_0xb6c228(0x3a3)]=_0x165f2f,this[_0xb6c228(0x3ae)]=_0x457b83,this[_0xb6c228(0x2b6)]=_0x32221d,this['_permissionService']=_0x21fefa,this['_singleActiveUnitService']=_0xb3d0f7,this[_0xb6c228(0x3d4)]=_0x5ca859,_defineProperty(this,_0xb6c228(0x3a4),new rxjs['BehaviorSubject'](null)),_defineProperty(this,_0xb6c228(0x37a),this[_0xb6c228(0x3a4)][_0xb6c228(0x25c)]()),_defineProperty(this,_0xb6c228(0x362),void 0x0),_defineProperty(this,_0xb6c228(0x3bd),![]),_defineProperty(this,_0xb6c228(0x114),''),_defineProperty(this,_0xb6c228(0x2bd),0x0),_defineProperty(this,_0xb6c228(0x32f),this[_0xb6c228(0x37a)][_0xb6c228(0x38a)]((0x0,rxjs[_0xb6c228(0x173)])(_0x5ca505=>{const _0x20f49b=_0xb6c228;if(_0x5ca505)return _0x5ca505[_0x20f49b(0x1c5)];return CollaborationStatus['OFFLINE'];}),(0x0,rxjs[_0xb6c228(0x117)])(0x1))),_defineProperty(this,_0xb6c228(0x39e),![]),_defineProperty(this,_0xb6c228(0x36c),[]);}async[_0x35406f(0x35b)](){const _0x50900=_0x35406f;if(this['state'])throw new Error('[CollaborationEntity]:\x20initial\x20state\x20has\x20been\x20created\x20before.\x20You\x20should\x20not\x20call\x20\x22init\x22\x20twice.');await this[_0x50900(0x380)]();}['pauseCollaboration'](){const _0x4f6765=_0x35406f;return this['_collaborationPaused']=!![],(0x0,_univerjs_core[_0x4f6765(0x266)])(()=>{const _0x41fac4=_0x4f6765;this[_0x41fac4(0x3bd)]=![],this[_0x41fac4(0x1ab)]();});}[_0x35406f(0x2b0)](_0x428775){const _0xf0ff4c=_0x35406f;this[_0xf0ff4c(0x110)](_0x428775);}[_0x35406f(0x23e)](_0xf54158){const _0x2a4501=_0x35406f;this[_0x2a4501(0x362)]=_0xf54158,this[_0x2a4501(0x3a4)][_0x2a4501(0x2b4)](_0xf54158);}async[_0x35406f(0x380)](){const _0x2b3124=_0x35406f;this[_0x2b3124(0x23e)](await this[_0x2b3124(0x239)]());if(this[_0x2b3124(0x2ef)]){var _0x21efb3;(_0x21efb3=this['_singleActiveUnitService'])===null||_0x21efb3===void 0x0||_0x21efb3['editingUnit'](this[_0x2b3124(0x27a)]),this[_0x2b3124(0x367)](this[_0x2b3124(0x2ef)]['getUnitStatus$'](this['unitID'])[_0x2b3124(0x2b5)](_0x3d3aef=>{const _0x48d80d=_0x2b3124;this[_0x48d80d(0x3ae)][_0x48d80d(0x2f7)](_0x48d80d(0x343),_0x48d80d(0x255),_0x3d3aef),_0x3d3aef===UnitStatus[_0x48d80d(0x2f4)]?(this[_0x48d80d(0x1fe)][_0x48d80d(0x190)]({'id':CollaborationUIEventId[_0x48d80d(0xfc)]}),this[_0x48d80d(0x36e)][_0x48d80d(0x29e)](new _univerjs_sheets[(_0x48d80d(0x213))](this[_0x48d80d(0x27a)])['id'],![]),this[_0x48d80d(0x36e)][_0x48d80d(0x234)](![])):(this[_0x48d80d(0x36e)][_0x48d80d(0x29e)](new _univerjs_sheets[(_0x48d80d(0x213))](this[_0x48d80d(0x27a)])['id'],!![]),this['_permissionService'][_0x48d80d(0x234)](!![]));}));}let _0x3efaed=![];return this[_0x2b3124(0x367)](this['session']['sessionStatus$'][_0x2b3124(0x2b5)](_0x4c99f4=>{const _0x47051d=_0x2b3124;if(_0x4c99f4===SessionStatus['ONLINE'])this[_0x47051d(0x2d7)](_0x3efaed);else _0x4c99f4===SessionStatus[_0x47051d(0x3af)]&&(_0x3efaed=!![],this['_toggleOffline']());})),this['disposeWithMe'](this[_0x2b3124(0x224)][_0x2b3124(0x195)][_0x2b3124(0x2b5)](_0x300a23=>{const _0x192c1c=_0x2b3124;try{switch(_0x300a23[_0x192c1c(0x258)]){case _univerjs_pro_collaboration[_0x192c1c(0x1ae)]['NEW_CHANGESETS']:this[_0x192c1c(0x19e)]((0x0,_univerjs_pro_collaboration['parseProtocolChangeset'])(_0x300a23[_0x192c1c(0x1b8)]));break;case _univerjs_pro_collaboration[_0x192c1c(0x1ae)][_0x192c1c(0x2ec)]:this['_onRemoteACK'](_0x300a23[_0x192c1c(0x1b8)]);break;case _univerjs_pro_collaboration[_0x192c1c(0x1ae)]['CHANGESET_REJ']:this[_0x192c1c(0x345)]();break;case _univerjs_pro_collaboration[_0x192c1c(0x1ae)][_0x192c1c(0x20c)]:this[_0x192c1c(0x39b)](_0x300a23[_0x192c1c(0x1b8)]);break;case _univerjs_pro_collaboration[_0x192c1c(0x1ae)][_0x192c1c(0x298)]:this['_onFetchMissResult'](_0x300a23['data'][_0x192c1c(0x20b)][_0x192c1c(0x173)](_0x1c5f73=>(0x0,_univerjs_pro_collaboration[_0x192c1c(0x256)])(_0x1c5f73)));break;case _univerjs_pro_collaboration[_0x192c1c(0x1ae)][_0x192c1c(0x1af)]:this[_0x192c1c(0x345)]({'isPermissionRej':!![]});break;case _univerjs_pro_collaboration['CollaborationEvent'][_0x192c1c(0x130)]:break;}}catch(_0x19af34){console[_0x192c1c(0x34c)](_0x192c1c(0x2d6),_0x19af34);throw _0x19af34;}})),this['_state'];}[_0x35406f(0x165)](){const _0x234dc2=_0x35406f;this[_0x234dc2(0x39e)]=![];}[_0x35406f(0x22d)](){const _0x55a5ec=_0x35406f;if(this['_transitionLocked'])throw new 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[_0x55a5ec(0x39e)]=!![];}[_0x35406f(0x110)](_0x5ee4b1){const _0x28143b=_0x35406f;this[_0x28143b(0x22d)](),this[_0x28143b(0x23e)](this[_0x28143b(0x362)][_0x28143b(0x2ba)](_0x5ee4b1)),this[_0x28143b(0x165)]();}[_0x35406f(0x19e)](_0x2170b9){const _0x3bc14e=_0x35406f;if(_0x2170b9['revision']<=this[_0x3bc14e(0x3a9)]['getCurrentRevOfUnit'](this[_0x3bc14e(0x27a)]))return;if(this[_0x3bc14e(0x3bd)]){this[_0x3bc14e(0x36c)]['push'](_0x2170b9);return;}this[_0x3bc14e(0x1fb)](_0x2170b9);}[_0x35406f(0x1ab)](){const _0x6528bd=_0x35406f;this[_0x6528bd(0x36c)][_0x6528bd(0x320)](_0x3f0949=>this[_0x6528bd(0x1fb)](_0x3f0949)),this[_0x6528bd(0x36c)]=[];}[_0x35406f(0x1fb)](_0x51017d){const _0x3b078c=_0x35406f,_0x113fa0=this['_compressMutationService']['interceptor'][_0x3b078c(0x162)](this[_0x3b078c(0x183)][_0x3b078c(0xfa)]['getInterceptPoints']()[_0x3b078c(0x104)])(_0x51017d['mutations'],null)||_0x51017d[_0x3b078c(0x372)],_0x4c15a7={..._0x51017d,'mutations':_0x113fa0};this['_lockTransition'](),this[_0x3b078c(0x23e)](this[_0x3b078c(0x362)][_0x3b078c(0x1ef)](_0x4c15a7)),this['_unlockTransition']();}['_onRemoteACK'](_0x579a08){const _0x4ed137=_0x35406f;this[_0x4ed137(0x22d)](),this['_updateState'](this[_0x4ed137(0x362)]['onRemoteAck'](_0x579a08)),this[_0x4ed137(0x165)]();}[_0x35406f(0x345)](_0x4a2115){const _0x3ee19e=_0x35406f;this['_lockTransition'](),this['_updateState'](this[_0x3ee19e(0x362)][_0x3ee19e(0x263)](_0x4a2115)),this[_0x3ee19e(0x165)]();}['_onRemoteRetry'](_0x554700){const _0x28ad73=_0x35406f;this['_lockTransition'](),this['_updateState'](this[_0x28ad73(0x362)][_0x28ad73(0x30c)](_0x554700)),this[_0x28ad73(0x165)]();}['_onFetchMissResult'](_0x40c43e){const _0x106c0f=_0x35406f;if(!(this[_0x106c0f(0x362)]instanceof FetchingMissState))throw new TypeError(_0x106c0f(0x1e0));const _0x39b01c=_0x40c43e['map'](_0x46d7a2=>{const _0x20ec93=_0x106c0f,_0x2be703=this[_0x20ec93(0x183)][_0x20ec93(0xfa)][_0x20ec93(0x162)](this[_0x20ec93(0x183)][_0x20ec93(0xfa)][_0x20ec93(0x154)]()['COMPRESS_MUTATION_APPLY'])(_0x46d7a2[_0x20ec93(0x372)],null)||_0x46d7a2[_0x20ec93(0x372)];return{..._0x46d7a2,'mutations':_0x2be703};});this['_lockTransition'](),this[_0x106c0f(0x23e)](this['_state'][_0x106c0f(0x2e2)](_0x39b01c)),this[_0x106c0f(0x165)]();}[_0x35406f(0x2fb)](){const _0x2c3da9=_0x35406f;this[_0x2c3da9(0x22d)](),this[_0x2c3da9(0x23e)](this[_0x2c3da9(0x362)][_0x2c3da9(0x24f)]()),this['_unlockTransition']();}[_0x35406f(0x2d7)](_0x1d6730=![]){const _0x5b60ec=_0x35406f;this[_0x5b60ec(0x22d)](),this[_0x5b60ec(0x23e)](this[_0x5b60ec(0x362)][_0x5b60ec(0x14f)]()),this[_0x5b60ec(0x165)]();const _0x1009f7=this['_state'];_0x1d6730&&_0x1009f7 instanceof SyncedState&&(this['_lockTransition'](),this['_updateState'](_0x1009f7['fetchMiss']()),this[_0x5b60ec(0x165)]());}async[_0x35406f(0x239)](){return new Promise(_0x542664=>{const _0x16b5ef=_0x4d20;this['session'][_0x16b5ef(0x1ce)][_0x16b5ef(0x38a)]((0x0,rxjs[_0x16b5ef(0x100)])(0x1))[_0x16b5ef(0x2b5)](async _0x1bcf5f=>{const _0x242437=_0x16b5ef;_0x542664(await this[_0x242437(0x3c6)](_0x1bcf5f===SessionStatus[_0x242437(0x27c)]));});});}['_createHandler'](){const _0x25f5fe=_0x35406f,_0x3571f5=this[_0x25f5fe(0x27a)];return{'onStateChange':(_0x5afd13,_0x345ddd)=>{const _0x32b109=_0x25f5fe;if(_0x5afd13!==this['_state'])throw new Error(_0x32b109(0x3b8)+_0x5afd13[_0x32b109(0x1c5)]+'\x0aAfter:\x20'+_0x345ddd[_0x32b109(0x1c5)]+_0x32b109(0x107)+this[_0x32b109(0x362)][_0x32b109(0x1c5)]);this[_0x32b109(0x23e)](_0x345ddd);},'onSendChangeset':_0x446717=>{const _0xcd71d=_0x25f5fe;!_0x446717[_0xcd71d(0x15a)]&&(_0x446717[_0xcd71d(0x15a)]=this[_0xcd71d(0x114)],_0x446717[_0xcd71d(0x3b7)]=++this[_0xcd71d(0x2bd)]);const _0x344f24={'eventID':_univerjs_pro_collaboration[_0xcd71d(0x1ae)][_0xcd71d(0x2a1)],'data':{'unitID':_0x446717[_0xcd71d(0x27a)],'unitType':this['_type'],'changeset':_0x446717,'memberID':this['session'][_0xcd71d(0x18d)]()}};this[_0xcd71d(0x224)][_0xcd71d(0xfd)](_0x344f24,this[_0xcd71d(0x27a)]);},'onMissingChangesets':({from:_0x4cb65a,to:_0x241e4b})=>{const _0x3c2fb0=_0x25f5fe;this['_logService'][_0x3c2fb0(0x2f7)]('[CollaborationEntity]',_0x3c2fb0(0x135)+_0x4cb65a+'\x20to\x20'+_0x241e4b);const _0x5b47c7={'eventID':_univerjs_pro_collaboration[_0x3c2fb0(0x1ae)][_0x3c2fb0(0x149)],'data':{'unitID':_0x3571f5,'unitType':this[_0x3c2fb0(0x13c)],'from':_0x4cb65a,'to':_0x241e4b}};this[_0x3c2fb0(0x224)]['send'](_0x5b47c7,this[_0x3c2fb0(0x27a)]);}};}async[_0x35406f(0x3c6)](_0x547e53){const _0x2f2f06=_0x35406f;var _0x4ea874,_0x248895,_0x39bff2;const _0x593bfc=await((_0x4ea874=this[_0x2f2f06(0x3d4)])===null||_0x4ea874===void 0x0?void 0x0:_0x4ea874[_0x2f2f06(0x3ac)](this[_0x2f2f06(0x27a)])),_0x1dce4b=(_0x248895=_0x593bfc===null||_0x593bfc===void 0x0?void 0x0:_0x593bfc[_0x2f2f06(0x372)])!==null&&_0x248895!==void 0x0?_0x248895:[],_0x1578eb=(_0x39bff2=_0x593bfc===null||_0x593bfc===void 0x0?void 0x0:_0x593bfc[_0x2f2f06(0x373)])!==null&&_0x39bff2!==void 0x0?_0x39bff2:null,_0x13e29c=!!(_0x1578eb===null||_0x1578eb===void 0x0?void 0x0:_0x1578eb['sid'])&&!!(_0x1578eb===null||_0x1578eb===void 0x0?void 0x0:_0x1578eb[_0x2f2f06(0x3b7)]);this[_0x2f2f06(0x114)]=_0x13e29c?_0x1578eb[_0x2f2f06(0x15a)]:(0x0,_univerjs_pro_collaboration[_0x2f2f06(0x145)])(),this[_0x2f2f06(0x2bd)]=_0x13e29c?_0x1578eb[_0x2f2f06(0x3b7)]:0x0;const _0x23d242=this[_0x2f2f06(0x27a)];try{this['_replayCachedMutations'](_0x1578eb,_0x1dce4b);}catch(_0x36da8f){this[_0x2f2f06(0x3ae)]['error'](_0x36da8f);}const _0x51c779=this['_createHandler']();if(_0x547e53){const _0x35327f=createOnlineState(this[_0x2f2f06(0x157)],_0x23d242,this[_0x2f2f06(0x13c)],_0x1578eb,_0x1dce4b,_0x51c779);if(_0x35327f instanceof PendingState)_0x35327f['_schedule']();else{if(_0x35327f instanceof AwaitingWithPendingState||_0x35327f instanceof AwaitingState)_0x35327f['resend']();}return _0x35327f;}return this[_0x2f2f06(0x157)][_0x2f2f06(0x1d5)](OfflineState,_0x23d242,this[_0x2f2f06(0x13c)],_0x1578eb,_0x1dce4b,_0x51c779);}['_replayCachedMutations'](_0x4e3f9a,_0x839cb2){const _0x47aa13=_0x35406f;var _0x21e184,_0x31301f;const _0x10f096=this['_compressMutationService'][_0x47aa13(0xfa)][_0x47aa13(0x162)](this[_0x47aa13(0x183)]['interceptor'][_0x47aa13(0x154)]()[_0x47aa13(0x104)]);(_0x21e184=_0x10f096((_0x4e3f9a===null||_0x4e3f9a===void 0x0?void 0x0:_0x4e3f9a['mutations'])||[],null))===null||_0x21e184===void 0x0||_0x21e184['forEach'](_0x436e63=>this[_0x47aa13(0x2b6)][_0x47aa13(0x3ca)](_0x436e63['id'],_0x436e63['params'])),(_0x31301f=_0x10f096(_0x839cb2||[],null))===null||_0x31301f===void 0x0||_0x31301f[_0x47aa13(0x320)](_0x2fe59e=>this[_0x47aa13(0x2b6)]['executeCommand'](_0x2fe59e['id'],_0x2fe59e[_0x47aa13(0x1de)]));}};CollaborationEntity=__decorate([__decorateParam(0x3,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_core[_0x35406f(0x2f9)])),__decorateParam(0x4,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_pro_collaboration[_0x35406f(0x3ad)])),__decorateParam(0x5,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_core['LocaleService'])),__decorateParam(0x6,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_pro_collaboration[_0x35406f(0x267)])),__decorateParam(0x7,(0x0,_univerjs_core[_0x35406f(0x33b)])(CollaborationUIEventService)),__decorateParam(0x8,_univerjs_core[_0x35406f(0x161)]),__decorateParam(0x9,_univerjs_core[_0x35406f(0x33e)]),__decorateParam(0xa,_univerjs_core[_0x35406f(0x10d)]),__decorateParam(0xb,_univerjs_core[_0x35406f(0x192)]),__decorateParam(0xc,(0x0,_univerjs_core[_0x35406f(0x2c9)])(ISingleActiveUnitService)),__decorateParam(0xd,(0x0,_univerjs_core[_0x35406f(0x2c9)])(ILocalCacheService))],CollaborationEntity);let DocCollaborationEntity=class DocCollaborationEntity extends CollaborationEntity{constructor(_0x4bd6a6,_0x233961,_0xc33968,_0x1f37ca,_0x59c21b,_0x5c90d7,_0xa62835,_0x41e872,_0xb3c6c5,_0x551317,_0x41d6fe,_0x3af401,_0xb651fd,_0x1b645c){const _0x4cbc9a=_0x35406f;super(_0x4bd6a6,_0xc33968,_0x233961,_0x1f37ca,_0x59c21b,_0x5c90d7,_0xa62835,_0x41e872,_0xb3c6c5,_0x551317,_0x41d6fe,_0x3af401,_0xb651fd,_0x1b645c),this[_0x4cbc9a(0x27a)]=_0x4bd6a6,this[_0x4cbc9a(0x285)]=_0x233961,_defineProperty(this,'_handlerCallback',null);}[_0x35406f(0x1d9)](_0x1d85d6){const _0x40a130=_0x35406f;this[_0x40a130(0x269)]=_0x1d85d6;}['dispose'](){const _0x4b69b0=_0x35406f;this['_handlerCallback']=null,super[_0x4b69b0(0x1db)]();}[_0x35406f(0x30f)](){const _0x41c45e=_0x35406f,_0x42ac67=super[_0x41c45e(0x30f)]();return _0x42ac67[_0x41c45e(0x284)]=_0xbbf42c=>{const _0x3584fa=_0x41c45e;var _0x56d552,_0x395180;return(_0x56d552=this[_0x3584fa(0x269)])===null||_0x56d552===void 0x0||(_0x395180=_0x56d552['onTransformIME'])===null||_0x395180===void 0x0?void 0x0:_0x395180[_0x3584fa(0x374)](_0x56d552,_0xbbf42c);},_0x42ac67[_0x41c45e(0x232)]=_0x54f329=>{const _0x2b7030=_0x41c45e;var _0x50d017,_0x3567aa;return(_0x50d017=this[_0x2b7030(0x269)])===null||_0x50d017===void 0x0||(_0x3567aa=_0x50d017['onTransformState'])===null||_0x3567aa===void 0x0?void 0x0:_0x3567aa[_0x2b7030(0x374)](_0x50d017,_0x54f329);},_0x42ac67[_0x41c45e(0x1f4)]=_0x256331=>{const _0x3f5a3b=_0x41c45e;var _0x4dd2b8,_0x2286c3;return(_0x4dd2b8=this[_0x3f5a3b(0x269)])===null||_0x4dd2b8===void 0x0||(_0x2286c3=_0x4dd2b8['onTransformSelections'])===null||_0x2286c3===void 0x0?void 0x0:_0x2286c3[_0x3f5a3b(0x374)](_0x4dd2b8,_0x256331);},_0x42ac67['onSyncEditingCollabCursor']=_0x265b4a=>{const _0x5c81b7=_0x41c45e;var _0x1754aa,_0x4b9110;return(_0x1754aa=this[_0x5c81b7(0x269)])===null||_0x1754aa===void 0x0||(_0x4b9110=_0x1754aa['onSyncEditingCollabCursor'])===null||_0x4b9110===void 0x0?void 0x0:_0x4b9110[_0x5c81b7(0x374)](_0x1754aa,_0x265b4a);},_0x42ac67['onTransformRemoteChangesetByIMECache']=_0x54431f=>{const _0x34e47e=_0x41c45e;var _0x3edbd0,_0x54360d,_0x1a4381;if(!((_0x3edbd0=this['_handlerCallback'])===null||_0x3edbd0===void 0x0?void 0x0:_0x3edbd0['onTransformRemoteChangesetByIMECache']))throw new Error(_0x34e47e(0x247));return(_0x54360d=this['_handlerCallback'])===null||_0x54360d===void 0x0||(_0x1a4381=_0x54360d[_0x34e47e(0x351)])===null||_0x1a4381===void 0x0?void 0x0:_0x1a4381[_0x34e47e(0x374)](_0x54360d,_0x54431f);},_0x42ac67[_0x41c45e(0x1f3)]=_0x42837d=>{const _0x29d46a=_0x41c45e;var _0xa85d3f,_0x3cb2e3,_0x3567f0;if(!((_0xa85d3f=this[_0x29d46a(0x269)])===null||_0xa85d3f===void 0x0?void 0x0:_0xa85d3f[_0x29d46a(0x1f3)]))throw new Error('onTransformRemoteChangesetByStateCache\x20callback\x20is\x20not\x20added\x20yet.');return(_0x3cb2e3=this['_handlerCallback'])===null||_0x3cb2e3===void 0x0||(_0x3567f0=_0x3cb2e3[_0x29d46a(0x1f3)])===null||_0x3567f0===void 0x0?void 0x0:_0x3567f0[_0x29d46a(0x374)](_0x3cb2e3,_0x42837d);},_0x42ac67;}async[_0x35406f(0x380)](){const _0x22d56f=_0x35406f,_0x1be02f=await super['_init']();return this[_0x22d56f(0x367)](this[_0x22d56f(0x2b6)]['onMutationExecutedForCollab']((_0x5ee8ab,_0x3b5b22)=>{const _0xdbd7d2=_0x22d56f;if(_0x5ee8ab['type']!==_univerjs_core[_0xdbd7d2(0x34e)][_0xdbd7d2(0x12a)]||(_0x3b5b22===null||_0x3b5b22===void 0x0?void 0x0:_0x3b5b22[_0xdbd7d2(0x2e6)])||(_0x3b5b22===null||_0x3b5b22===void 0x0?void 0x0:_0x3b5b22[_0xdbd7d2(0x1c1)]))return;if(_0x5ee8ab['id']===_univerjs_docs['RichTextEditingMutation']['id'])return;const _0x4e0934=_0x5ee8ab['params'];if((_0x4e0934===null||_0x4e0934===void 0x0?void 0x0:_0x4e0934[_0xdbd7d2(0x349)])!==this['unitID'])return;const _0x2dec93=_0x5ee8ab,_0x1fb4b1=this[_0xdbd7d2(0x183)]['interceptor'][_0xdbd7d2(0x162)](this['_compressMutationService']['interceptor'][_0xdbd7d2(0x154)]()[_0xdbd7d2(0x297)])([_0x2dec93],this[_0xdbd7d2(0x3a3)])||[_0x2dec93];this[_0xdbd7d2(0x110)](_0x1fb4b1[0x0]);})),_0x1be02f;}};DocCollaborationEntity=__decorate([__decorateParam(0x3,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_core['Injector'])),__decorateParam(0x4,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_pro_collaboration[_0x35406f(0x3ad)])),__decorateParam(0x5,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_core[_0x35406f(0x10b)])),__decorateParam(0x6,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_pro_collaboration[_0x35406f(0x267)])),__decorateParam(0x7,(0x0,_univerjs_core['Inject'])(CollaborationUIEventService)),__decorateParam(0x8,_univerjs_core[_0x35406f(0x161)]),__decorateParam(0x9,_univerjs_core['ILogService']),__decorateParam(0xa,_univerjs_core[_0x35406f(0x10d)]),__decorateParam(0xb,_univerjs_core['IPermissionService']),__decorateParam(0xc,(0x0,_univerjs_core[_0x35406f(0x2c9)])(ISingleActiveUnitService)),__decorateParam(0xd,(0x0,_univerjs_core[_0x35406f(0x2c9)])(ILocalCacheService))],DocCollaborationEntity);let SheetCollaborationEntity=class SheetCollaborationEntity extends CollaborationEntity{constructor(_0x1ef8a1,_0x2fbbbd,_0x36a404,_0x5a3226,_0x1658ae,_0xc863e6,_0x2ad410,_0x25cfe6,_0x183c72,_0x36344e,_0x35eaa4,_0x39dd69,_0x2c7de3,_0xabd3c6,_0x2a279d){const _0x1e811f=_0x35406f;super(_0x1ef8a1,_0x36a404,_0x2fbbbd,_0x5a3226,_0x1658ae,_0xc863e6,_0x2ad410,_0x183c72,_0x36344e,_0x35eaa4,_0x39dd69,_0x2c7de3,_0xabd3c6,_0x2a279d),this[_0x1e811f(0x27a)]=_0x1ef8a1,this[_0x1e811f(0x285)]=_0x2fbbbd,this[_0x1e811f(0x395)]=_0x25cfe6;}[_0x35406f(0x30f)](){const _0x5c6915=_0x35406f,_0xb34728=super[_0x5c6915(0x30f)]();return _0xb34728[_0x5c6915(0x1f4)]=_0x11770e=>this['_sheetTransformSelectionsService']['transformSelections'](_0x11770e),_0xb34728;}async[_0x35406f(0x380)](){const _0x12bb79=_0x35406f,_0x2c281e=await super[_0x12bb79(0x380)]();return this[_0x12bb79(0x367)](this[_0x12bb79(0x2b6)][_0x12bb79(0x276)]((_0x42bf12,_0x50b97e)=>{const _0x3720e7=_0x12bb79;if(_0x42bf12[_0x3720e7(0x285)]!==_univerjs_core[_0x3720e7(0x34e)][_0x3720e7(0x12a)]||(_0x50b97e===null||_0x50b97e===void 0x0?void 0x0:_0x50b97e['fromCollab'])||(_0x50b97e===null||_0x50b97e===void 0x0?void 0x0:_0x50b97e[_0x3720e7(0x1c1)]))return;const _0x5173c5=_0x42bf12['params'];if((_0x5173c5===null||_0x5173c5===void 0x0?void 0x0:_0x5173c5[_0x3720e7(0x349)])!==this[_0x3720e7(0x27a)])return;const _0x210b99=_0x42bf12,_0x143d62=this['_compressMutationService'][_0x3720e7(0xfa)]['fetchThroughInterceptors'](this[_0x3720e7(0x183)][_0x3720e7(0xfa)][_0x3720e7(0x154)]()[_0x3720e7(0x297)])([_0x210b99],this[_0x3720e7(0x3a3)])||[_0x210b99];this[_0x3720e7(0x110)](_0x143d62[0x0]);})),_0x2c281e;}};SheetCollaborationEntity=__decorate([__decorateParam(0x3,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_core[_0x35406f(0x2f9)])),__decorateParam(0x4,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_pro_collaboration['CompressMutationService'])),__decorateParam(0x5,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_core[_0x35406f(0x10b)])),__decorateParam(0x6,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_pro_collaboration[_0x35406f(0x267)])),__decorateParam(0x7,(0x0,_univerjs_core[_0x35406f(0x33b)])(SheetTransformSelectionsService)),__decorateParam(0x8,(0x0,_univerjs_core[_0x35406f(0x33b)])(CollaborationUIEventService)),__decorateParam(0x9,_univerjs_core[_0x35406f(0x161)]),__decorateParam(0xa,_univerjs_core[_0x35406f(0x33e)]),__decorateParam(0xb,_univerjs_core['ICommandService']),__decorateParam(0xc,_univerjs_core[_0x35406f(0x192)]),__decorateParam(0xd,(0x0,_univerjs_core[_0x35406f(0x2c9)])(ISingleActiveUnitService)),__decorateParam(0xe,(0x0,_univerjs_core['Optional'])(ILocalCacheService))],SheetCollaborationEntity);const INetworkConditionService=(0x0,_univerjs_core['createIdentifier'])(_0x35406f(0x15c));function deserializeToCombResponse(_0x565aa5){const _0x31e4ba=_0x35406f,_0x20511c=_0x565aa5[_0x31e4ba(0x1b8)],_0x5f092a=JSON[_0x31e4ba(0x291)](_0x20511c);switch(_0x5f092a['cmd']){case _univerjs_protocol[_0x31e4ba(0x245)][_0x31e4ba(0x13b)]:case _univerjs_protocol[_0x31e4ba(0x245)][_0x31e4ba(0x1a6)]:{const _0x4e246c=_0x5f092a[_0x31e4ba(0x29b)];return{..._0x5f092a,'data':_0x4e246c,'cmd':_0x5f092a[_0x31e4ba(0x1f7)]};}case _univerjs_protocol[_0x31e4ba(0x245)][_0x31e4ba(0x2cb)]:{const _0xd6f4d9=_0x5f092a[_0x31e4ba(0x393)];return{..._0x5f092a,'data':_0xd6f4d9,'cmd':_0x5f092a[_0x31e4ba(0x1f7)]};}case _univerjs_protocol[_0x31e4ba(0x245)][_0x31e4ba(0x18a)]:{const _0x349d59=_0x5f092a[_0x31e4ba(0x138)];switch(_0x349d59[_0x31e4ba(0x258)]){case _univerjs_pro_collaboration[_0x31e4ba(0x1ae)][_0x31e4ba(0x1af)]:var _0x514163;return{..._0x5f092a,'data':{..._0x349d59,'data':(_0x514163=_0x349d59[_0x31e4ba(0x2f3)])===null||_0x514163===void 0x0?void 0x0:_0x514163['cs']},'cmd':_0x5f092a[_0x31e4ba(0x1f7)]};case _univerjs_pro_collaboration[_0x31e4ba(0x1ae)][_0x31e4ba(0x2ec)]:var _0x1d4a68;return{..._0x5f092a,'data':{..._0x349d59,'data':(_0x1d4a68=_0x349d59[_0x31e4ba(0x203)])===null||_0x1d4a68===void 0x0?void 0x0:_0x1d4a68['cs']},'cmd':_0x5f092a['cmd']};case _univerjs_pro_collaboration[_0x31e4ba(0x1ae)][_0x31e4ba(0x1b1)]:var _0x3a7eaa;return{..._0x5f092a,'data':{..._0x349d59,'data':(_0x3a7eaa=_0x349d59[_0x31e4ba(0x13d)])===null||_0x3a7eaa===void 0x0?void 0x0:_0x3a7eaa['cs']},'cmd':_0x5f092a['cmd']};case _univerjs_pro_collaboration['CollaborationEvent'][_0x31e4ba(0x243)]:var _0x3b22a8;return{..._0x5f092a,'data':{..._0x349d59,'data':(_0x3b22a8=_0x349d59[_0x31e4ba(0x179)])===null||_0x3b22a8===void 0x0?void 0x0:_0x3b22a8['cs']},'cmd':_0x5f092a[_0x31e4ba(0x1f7)]};case _univerjs_pro_collaboration[_0x31e4ba(0x1ae)][_0x31e4ba(0x20c)]:var _0x200e0e;return{..._0x5f092a,'data':{..._0x349d59,'data':(_0x200e0e=_0x349d59[_0x31e4ba(0x112)])===null||_0x200e0e===void 0x0?void 0x0:_0x200e0e['cs']},'cmd':_0x5f092a[_0x31e4ba(0x1f7)]};case _univerjs_pro_collaboration[_0x31e4ba(0x1ae)][_0x31e4ba(0x275)]:return{..._0x5f092a,'data':{..._0x349d59,'data':_0x349d59[_0x31e4ba(0x288)]},'cmd':_0x5f092a['cmd']};case _univerjs_pro_collaboration[_0x31e4ba(0x1ae)][_0x31e4ba(0x10e)]:return{..._0x5f092a,'data':{..._0x349d59,'data':_0x349d59[_0x31e4ba(0x2c3)]},'cmd':_0x5f092a[_0x31e4ba(0x1f7)]};case _univerjs_pro_collaboration[_0x31e4ba(0x1ae)][_0x31e4ba(0x217)]:return{..._0x5f092a,'data':{..._0x349d59,'data':_0x349d59['leaveEvent']},'cmd':_0x5f092a[_0x31e4ba(0x1f7)]};case _univerjs_pro_collaboration[_0x31e4ba(0x1ae)][_0x31e4ba(0x344)]:return{..._0x5f092a,'data':{..._0x349d59,'data':_0x349d59[_0x31e4ba(0x28b)]},'cmd':_0x5f092a['cmd']};case _univerjs_pro_collaboration[_0x31e4ba(0x1ae)][_0x31e4ba(0x3b1)]:case _univerjs_pro_collaboration[_0x31e4ba(0x1ae)]['LIVESHARE_OPERATION']:return{..._0x5f092a,'data':{..._0x349d59,'data':_0x349d59[_0x31e4ba(0x3ba)]},'cmd':_0x5f092a[_0x31e4ba(0x1f7)]};case _univerjs_pro_collaboration['CollaborationEvent'][_0x31e4ba(0x188)]:return{..._0x5f092a,'data':{..._0x349d59,'data':_0x349d59[_0x31e4ba(0x28b)]},'cmd':_0x5f092a[_0x31e4ba(0x1f7)]};case _univerjs_pro_collaboration['CollaborationEvent'][_0x31e4ba(0x1f5)]:return{..._0x5f092a,'data':_0x349d59,'cmd':_0x5f092a[_0x31e4ba(0x1f7)]};case _univerjs_pro_collaboration[_0x31e4ba(0x1ae)]['COMMENT_UPDATE']:return{..._0x5f092a,'data':{..._0x349d59,'data':_0x349d59[_0x31e4ba(0x37f)]},'cmd':_0x5f092a[_0x31e4ba(0x1f7)]};case _univerjs_pro_collaboration[_0x31e4ba(0x1ae)][_0x31e4ba(0x143)]:return{..._0x5f092a,'data':{..._0x349d59,'data':_0x349d59[_0x31e4ba(0x25b)]},'cmd':_0x5f092a['cmd']};case _univerjs_pro_collaboration[_0x31e4ba(0x1ae)][_0x31e4ba(0x139)]:return{..._0x5f092a,'data':{..._0x349d59,'data':_0x349d59['shouldCloseConn']},'cmd':_0x5f092a[_0x31e4ba(0x1f7)]};case _univerjs_pro_collaboration['CollaborationEvent'][_0x31e4ba(0x130)]:return{..._0x5f092a,'data':{..._0x349d59,'data':_0x349d59[_0x31e4ba(0x123)]},'cmd':_0x5f092a[_0x31e4ba(0x1f7)]};default:return _0x5f092a;}}default:return _0x5f092a;}}function serializeCombRequest(_0x356f6c){const _0x34f852=_0x35406f;switch(_0x356f6c[_0x34f852(0x1f7)]){case _univerjs_protocol[_0x34f852(0x245)][_0x34f852(0x13b)]:case _univerjs_protocol[_0x34f852(0x245)][_0x34f852(0x1a6)]:return JSON[_0x34f852(0x2db)]({'cmd':_0x356f6c[_0x34f852(0x1f7)],'routeKey':_0x356f6c['routeKey']});case _univerjs_protocol['CombCmd'][_0x34f852(0x331)]:{let _0x1e02eb;switch(_0x356f6c[_0x34f852(0x1b8)][_0x34f852(0x258)]){case _univerjs_pro_collaboration['CollaborationEvent']['UPDATE_CURSOR']:_0x1e02eb={'eventID':_univerjs_pro_collaboration[_0x34f852(0x1ae)][_0x34f852(0x275)],'updateCursorEvent':_0x356f6c['data']['data']};break;case _univerjs_pro_collaboration[_0x34f852(0x1ae)]['USERS_LEAVE']:_0x1e02eb={'eventID':_univerjs_pro_collaboration['CollaborationEvent'][_0x34f852(0x217)],'leaveEvent':_0x356f6c[_0x34f852(0x1b8)]['data']};break;case _univerjs_pro_collaboration['CollaborationEvent']['USERS_ENTER']:_0x1e02eb={'eventID':_univerjs_pro_collaboration[_0x34f852(0x1ae)][_0x34f852(0x10e)],'joinEvent':_0x356f6c[_0x34f852(0x1b8)][_0x34f852(0x1b8)]};break;case _univerjs_pro_collaboration[_0x34f852(0x1ae)][_0x34f852(0x344)]:_0x1e02eb={'eventID':_univerjs_pro_collaboration[_0x34f852(0x1ae)][_0x34f852(0x344)],'liveShareNewHost':_0x356f6c[_0x34f852(0x1b8)][_0x34f852(0x1b8)]};break;case _univerjs_pro_collaboration[_0x34f852(0x1ae)]['LIVESHARE_OPERATION']:_0x1e02eb={'eventID':_univerjs_pro_collaboration[_0x34f852(0x1ae)][_0x34f852(0x1e1)],'liveShareOperation':_0x356f6c['data'][_0x34f852(0x1b8)]};break;case _univerjs_pro_collaboration['CollaborationEvent']['LIVESHARE_TERMINATE']:_0x1e02eb={'eventID':_univerjs_pro_collaboration['CollaborationEvent'][_0x34f852(0x188)],'liveShareTerminate':_0x356f6c[_0x34f852(0x1b8)][_0x34f852(0x1b8)]};break;case _univerjs_pro_collaboration['CollaborationEvent'][_0x34f852(0x11b)]:_0x1e02eb={'eventID':_univerjs_pro_collaboration['CollaborationEvent'][_0x34f852(0x11b)],'liveShareRequestHost':_0x356f6c[_0x34f852(0x1b8)][_0x34f852(0x1b8)]};break;case _univerjs_pro_collaboration['CollaborationEvent']['LIVESHARE_FETCH_OPERATIONS']:_0x1e02eb={'eventID':_univerjs_pro_collaboration[_0x34f852(0x1ae)]['LIVESHARE_FETCH_OPERATIONS']};break;default:_0x1e02eb={'eventID':_0x356f6c[_0x34f852(0x1b8)][_0x34f852(0x258)]};}return JSON[_0x34f852(0x2db)]({'cmd':_0x356f6c[_0x34f852(0x1f7)],'routeKey':_0x356f6c['routeKey'],'collaMsg':_0x1e02eb});}case _univerjs_protocol[_0x34f852(0x245)]['JOIN']:return JSON[_0x34f852(0x2db)]({'cmd':_0x356f6c[_0x34f852(0x1f7)],'routeKey':_0x356f6c[_0x34f852(0x2e5)],'joinReq':_0x356f6c[_0x34f852(0x1b8)]});case _univerjs_protocol[_0x34f852(0x245)][_0x34f852(0x106)]:return JSON[_0x34f852(0x2db)]({'cmd':_0x356f6c[_0x34f852(0x1f7)],'routeKey':_0x356f6c[_0x34f852(0x2e5)],'leaveReq':_0x356f6c['data']});default:throw new Error('[serializeCombRequest]:\x20should\x20not\x20fall\x20into\x20default\x20branch!');}}const ICollaborationSocketService=(0x0,_univerjs_core[_0x35406f(0x36d)])('univer-pro.collaboration-client-socket-service');function generateSubmitChangesPath(_0x3e885c,_0x1b8a6e,_0x431602){const _0x5f4a5d=_0x35406f;return _0x3e885c+'/'+_0x1b8a6e+_0x5f4a5d(0x150)+_0x431602+_0x5f4a5d(0x336);}let CollaborationSocketService=class CollaborationSocketService extends _univerjs_core[_0x35406f(0x163)]{constructor(_0x5573a1,_0x791c56,_0x53094d,_0x313a65,_0x2e5b44){const _0x12572a=_0x35406f;super(),this[_0x12572a(0x157)]=_0x5573a1,this['_httpService']=_0x791c56,this['_configService']=_0x53094d,this[_0x12572a(0x3ae)]=_0x313a65,this['_snapshotServerService']=_0x2e5b44;}[_0x35406f(0x178)](_0x10ad8c){const _0x2c93c9=_0x35406f,_0x7ec904=this[_0x2c93c9(0x157)][_0x2c93c9(0x2c5)](_univerjs_network[_0x2c93c9(0x16a)]);if(!_0x7ec904)throw new Error(_0x2c93c9(0x17a));const _0x11d426=_0x7ec904[_0x2c93c9(0x309)](_0x10ad8c);if(!_0x11d426)throw new Error(_0x2c93c9(0x205));const _0x26dc25=new _univerjs_core['DisposableCollection'](),_0x451132=new rxjs[(_0x2c93c9(0x2bc))]();_0x26dc25[_0x2c93c9(0x23b)](_0x11d426[_0x2c93c9(0x228)][_0x2c93c9(0x2b5)](_0x1a894f=>_0x451132[_0x2c93c9(0x2b4)](_0x1a894f))),_0x26dc25[_0x2c93c9(0x23b)]((0x0,_univerjs_core[_0x2c93c9(0x266)])(()=>_0x451132['complete']()));const _0x1bc416=new rxjs['Subject']();_0x26dc25[_0x2c93c9(0x23b)](_0x11d426[_0x2c93c9(0x233)][_0x2c93c9(0x2b5)](_0x1423ef=>_0x1bc416['next'](_0x1423ef))),_0x26dc25[_0x2c93c9(0x23b)]((0x0,_univerjs_core[_0x2c93c9(0x266)])(()=>_0x1bc416['complete']()));const _0x4c2184=new rxjs['Subject']();_0x26dc25[_0x2c93c9(0x23b)](_0x11d426[_0x2c93c9(0x128)][_0x2c93c9(0x2b5)](_0x1a0316=>{const _0x36209e=deserializeToCombResponse(_0x1a0316);_0x4c2184['next'](_0x36209e);})),_0x26dc25[_0x2c93c9(0x23b)]((0x0,_univerjs_core[_0x2c93c9(0x266)])(()=>_0x4c2184[_0x2c93c9(0x22c)]()));let _0x3467e1;const _0x219b5e=()=>{const _0x542981=_0x2c93c9;_0x1bc416[_0x542981(0x2b4)](new Event(_0x542981(0x1be))),_0x451132[_0x542981(0x2b4)](new Event(_0x542981(0x1be))),_0x3467e1[_0x542981(0x208)]();};return _0x3467e1={'memberID':'','close$':_0x451132[_0x2c93c9(0x25c)](),'error$':_0x1bc416[_0x2c93c9(0x25c)](),'open$':_0x11d426[_0x2c93c9(0x1e2)],'message$':_0x4c2184[_0x2c93c9(0x25c)](),'send':_0x34380b=>{const _0x451fde=_0x2c93c9;if(_0x34380b[_0x451fde(0x1f7)]===_univerjs_protocol[_0x451fde(0x245)][_0x451fde(0x331)]){if(_0x34380b[_0x451fde(0x1b8)][_0x451fde(0x258)]===_univerjs_pro_collaboration[_0x451fde(0x1ae)][_0x451fde(0x2a1)]){this[_0x451fde(0x12c)](_0x3467e1,_0x34380b[_0x451fde(0x1b8)])[_0x451fde(0x2d3)](_0x25a798=>{const _0xb5bfc7=_0x451fde;this[_0xb5bfc7(0x3ae)]['error'](_0x25a798),_0x219b5e();});return;}if(_0x34380b[_0x451fde(0x1b8)][_0x451fde(0x258)]===_univerjs_pro_collaboration['CollaborationEvent'][_0x451fde(0x149)]){const _0x44043f=_0x34380b['data'];this['_fetchMissChangesets'](_0x44043f)[_0x451fde(0x249)](_0x277475=>{const _0x5d3c8f=_0x451fde;_0x4c2184[_0x5d3c8f(0x2b4)]({'cmd':_univerjs_protocol['CombCmd'][_0x5d3c8f(0x18a)],'code':_univerjs_protocol[_0x5d3c8f(0x360)]['OK'],'routeKey':_0x44043f['data'][_0x5d3c8f(0x27a)],'routeType':'','data':{'eventID':_univerjs_pro_collaboration['CollaborationEvent'][_0x5d3c8f(0x298)],'data':{'changesets':_0x277475}}});})['catch'](_0x231437=>{const _0x2c81a1=_0x451fde;this[_0x2c81a1(0x3ae)][_0x2c81a1(0x34c)](_0x231437),_0x219b5e();});return;}}_0x11d426['send'](serializeCombRequest(_0x34380b));},'close':()=>{const _0x463f74=_0x2c93c9;_0x11d426[_0x463f74(0x208)](),_0x26dc25[_0x463f74(0x1db)]();}},_0x3467e1;}async[_0x35406f(0x12c)](_0x3aca8f,_0x50eb87){const _0x46bbf9=_0x35406f;var _0x123598;const {unitType:_0x542cb6,unitID:_0x1037e2,changeset:_0x130c47}=_0x50eb87[_0x46bbf9(0x1b8)],_0x36174d={'unitID':_0x1037e2,'memberID':_0x3aca8f[_0x46bbf9(0x389)],'type':_0x542cb6,'changeset':(0x0,_univerjs_pro_collaboration[_0x46bbf9(0x181)])(_0x130c47)},_0xb2c5d1=this[_0x46bbf9(0x279)]['getConfig'](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY),_0xdb1ab6=generateSubmitChangesPath((_0x123598=_0xb2c5d1===null||_0xb2c5d1===void 0x0?void 0x0:_0xb2c5d1[_0x46bbf9(0x317)])!==null&&_0x123598!==void 0x0?_0x123598:DEFAULT_COLLAB_SUBMIT_CHANGESET_URL,_0x542cb6,_0x1037e2);try{await this[_0x46bbf9(0x26a)]['post'](_0xdb1ab6,{'body':_0x36174d});}catch(_0x1e511a){this[_0x46bbf9(0x3ae)]['error'](_0x46bbf9(0x22b),_0x46bbf9(0x2c1));throw _0x1e511a;}}async[_0x35406f(0x370)](_0x1dcf2f){const _0x3992c6=_0x35406f,{unitID:_0x21442f,from:_0x40905d,to:_0x5a863d,unitType:_0x37749f}=_0x1dcf2f['data'];return(await this[_0x3992c6(0x15b)][_0x3992c6(0x375)]({'metadata':void 0x0},{'unitID':_0x21442f,'type':_0x37749f,'from':_0x40905d,'to':_0x5a863d}))[_0x3992c6(0x20b)][_0x3992c6(0x173)](_0x8831ff=>{const _0x56ae86=_0x3992c6;if(_0x8831ff[_0x56ae86(0x372)]===null||_0x8831ff[_0x56ae86(0x372)]===void 0x0)_0x8831ff[_0x56ae86(0x372)]=[];return _0x8831ff;});}};CollaborationSocketService=__decorate([__decorateParam(0x0,(0x0,_univerjs_core['Inject'])(_univerjs_core[_0x35406f(0x2f9)])),__decorateParam(0x1,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_network[_0x35406f(0x1e7)])),__decorateParam(0x2,_univerjs_core['IConfigService']),__decorateParam(0x3,_univerjs_core[_0x35406f(0x33e)]),__decorateParam(0x4,_univerjs_pro_collaboration[_0x35406f(0x2a7)])],CollaborationSocketService);let CollaborationSessionService=class CollaborationSessionService extends _univerjs_core[_0x35406f(0x163)]{get['_socket'](){const _0x3cabe9=_0x35406f;return this['_socket$'][_0x3cabe9(0x316)]();}constructor(_0x5e5a9b,_0x10fa06,_0x472429,_0x42030b,_0x4a75f3,_0x4d35d3){const _0x47bcca=_0x35406f;super(),this['_injector']=_0x5e5a9b,this[_0x47bcca(0x3ae)]=_0x10fa06,this[_0x47bcca(0x279)]=_0x472429,this[_0x47bcca(0x134)]=_0x42030b,this['_collaborationUIEventService']=_0x4a75f3,this[_0x47bcca(0x1b3)]=_0x4d35d3,_defineProperty(this,_0x47bcca(0x254),new rxjs['BehaviorSubject'](void 0x0)),_defineProperty(this,'socket$',this['_socket$'][_0x47bcca(0x25c)]()),_defineProperty(this,_0x47bcca(0x1c9),null),_defineProperty(this,_0x47bcca(0x16c),new Map()),_defineProperty(this,_0x47bcca(0x2ed),new rxjs['BehaviorSubject'](SessionStatus[_0x47bcca(0x15e)])),_defineProperty(this,_0x47bcca(0x32f),this[_0x47bcca(0x2ed)]['asObservable']()),_defineProperty(this,'_socketReady',![]),_defineProperty(this,'_retryConnectingTimer',void 0x0),_defineProperty(this,_0x47bcca(0xf9),0x0),_defineProperty(this,_0x47bcca(0x1cf),void 0x0),_defineProperty(this,_0x47bcca(0x155),void 0x0),this[_0x47bcca(0x3c1)]();}[_0x35406f(0x3c1)](){const _0x5eb99a=_0x35406f;if(!this[_0x5eb99a(0x1b3)])return;this[_0x5eb99a(0x367)](this[_0x5eb99a(0x1b3)][_0x5eb99a(0x39a)][_0x5eb99a(0x2b5)](_0x167140=>{const _0x3bce74=_0x5eb99a;if(_0x167140&&!this[_0x3bce74(0x386)])this['reconnect']();if(!_0x167140)this['_onOffline']();}));}['dispose'](){const _0x54a1a9=_0x35406f;super[_0x54a1a9(0x1db)](),this[_0x54a1a9(0x262)](),this[_0x54a1a9(0x25a)](),this[_0x54a1a9(0x35c)](),this['_sessions'][_0x54a1a9(0x320)](_0x22df53=>_0x22df53['dispose']()),this[_0x54a1a9(0x16c)][_0x54a1a9(0x20f)](),this['_status$']['complete']();}async[_0x35406f(0x2d5)](_0x229f7d){const _0x49b07b=_0x35406f;if(this['_sessions'][_0x49b07b(0x3d5)](_0x229f7d))return this[_0x49b07b(0x16c)][_0x49b07b(0x2c5)](_0x229f7d);this[_0x49b07b(0x2af)]();const _0x44475c=this['_injector']['createInstance'](CollaborationSession,_0x229f7d,this[_0x49b07b(0x254)]['asObservable']());return this[_0x49b07b(0x16c)][_0x49b07b(0x1dc)](_0x229f7d,_0x44475c),_0x44475c;}[_0x35406f(0x11f)](_0x15be2e){const _0x395480=_0x35406f,_0xa26ffa=this[_0x395480(0x16c)]['get'](_0x15be2e);_0xa26ffa&&(this[_0x395480(0x16c)]['delete'](_0x15be2e),_0xa26ffa[_0x395480(0x208)]());if(!this[_0x395480(0x16c)][_0x395480(0x21d)]){var _0x234dbe;(_0x234dbe=this['_socket'])===null||_0x234dbe===void 0x0||_0x234dbe[_0x395480(0x208)]();}}[_0x35406f(0x2ca)](){const _0x4448a1=_0x35406f;this[_0x4448a1(0xf9)]=0x0,this[_0x4448a1(0x262)](),this[_0x4448a1(0x210)]();}[_0x35406f(0x262)](){const _0x58575f=_0x35406f;this[_0x58575f(0x36b)]!=null&&(clearTimeout(this[_0x58575f(0x36b)]),this[_0x58575f(0x36b)]=null);}async[_0x35406f(0x127)](){const _0x4e52d4=_0x35406f;var _0x13da33;const _0x210afe=this[_0x4e52d4(0x279)][_0x4e52d4(0x38b)](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY),_0x31991e=(_0x13da33=_0x210afe===null||_0x210afe===void 0x0?void 0x0:_0x210afe[_0x4e52d4(0x1c6)])!==null&&_0x13da33!==void 0x0?_0x13da33:DEFAULT_COLLAB_WEB_SOCKET_URL,_0x614b85=await this[_0x4e52d4(0x134)]['createSocket'](_0x31991e);return this[_0x4e52d4(0x1c9)]=_0x614b85,_0x614b85;}async[_0x35406f(0x2af)](){const _0xc74533=_0x35406f;try{var _0x23ed18,_0xd9ffa7;const _0x53e8fa=(_0x23ed18=(_0xd9ffa7=this[_0xc74533(0x386)])!==null&&_0xd9ffa7!==void 0x0?_0xd9ffa7:this[_0xc74533(0x1c9)])!==null&&_0x23ed18!==void 0x0?_0x23ed18:await this[_0xc74533(0x127)]();if(_0x53e8fa){const _0x517d63=_0x53e8fa[_0xc74533(0xfd)];_0x53e8fa[_0xc74533(0xfd)]=_0xf91b6d=>{const _0x59ae93=_0xc74533;if(_0xf91b6d[_0x59ae93(0x1f7)]!==_univerjs_protocol['CombCmd']['LEAVE'])this['_rescheduleHeartbeat']();return _0x517d63[_0x59ae93(0x2c2)](_0x53e8fa,[_0xf91b6d]);},_0x53e8fa['message$'][_0xc74533(0x2b5)](_0x43d289=>this[_0xc74533(0x164)](_0x53e8fa,_0x43d289)),_0x53e8fa['error$']['pipe']((0x0,rxjs_operators[_0xc74533(0x100)])(0x1))['subscribe'](_0x1aa516=>this['_logService'][_0xc74533(0x34c)](_0xc74533(0x2ac),_0x1aa516)),_0x53e8fa[_0xc74533(0x1e2)][_0xc74533(0x38a)]((0x0,rxjs_operators[_0xc74533(0x100)])(0x1))[_0xc74533(0x2b5)](()=>{const _0x4002da=_0xc74533;this[_0x4002da(0x10a)](_0x53e8fa);}),_0x53e8fa[_0xc74533(0x228)]['pipe']((0x0,rxjs_operators['take'])(0x1))[_0xc74533(0x2b5)](_0x3bfa1e=>{const _0x3c4003=_0xc74533;this[_0x3c4003(0x3ae)][_0x3c4003(0x2f7)](_0x3c4003(0x1bb),_0x3c4003(0x383),_0x3bfa1e),this['_onConnectionFailed']();});}}catch(_0x3c1d3e){this[_0xc74533(0x3ae)][_0xc74533(0x34c)](_0x3c1d3e),this['_onConnectionFailed']();}}[_0x35406f(0x10a)](_0x1791af){const _0x4afcaa=_0x35406f;this['_logService'][_0x4afcaa(0x2f7)](_0x4afcaa(0x1bb),_0x4afcaa(0x21f)),_0x1791af[_0x4afcaa(0xfd)]({'cmd':_univerjs_protocol[_0x4afcaa(0x245)][_0x4afcaa(0x1a6)]}),this['_rescheduleHeartbeat']();}[_0x35406f(0x330)](){const _0x4c0c95=_0x35406f;this[_0x4c0c95(0x390)]=![],this[_0x4c0c95(0x1c9)]=null,this[_0x4c0c95(0x2ed)]['next'](SessionStatus[_0x4c0c95(0x3af)]),this[_0x4c0c95(0x254)][_0x4c0c95(0x2b4)](null),this[_0x4c0c95(0x25a)](),this[_0x4c0c95(0x35c)]();}[_0x35406f(0x1ff)](){const _0x4bf2bd=_0x35406f;var _0x8c6e73;this[_0x4bf2bd(0x330)]();if(this[_0x4bf2bd(0xf9)]<((_0x8c6e73=this[_0x4bf2bd(0x279)][_0x4bf2bd(0x38b)](_0x4bf2bd(0x38d)))!==null&&_0x8c6e73!==void 0x0?_0x8c6e73:0x3))this['_collaborationUIEventService'][_0x4bf2bd(0x190)]({'id':CollaborationUIEventId[_0x4bf2bd(0x377)]}),this[_0x4bf2bd(0x210)]();else this[_0x4bf2bd(0x24d)][_0x4bf2bd(0x190)]({'id':CollaborationUIEventId[_0x4bf2bd(0x240)]});}[_0x35406f(0x210)](){const _0x1da172=_0x35406f;var _0x295c70;const _0xcb1b65=this['_retryCount'],_0x2211bf=this['_configService'][_0x1da172(0x38b)](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY),_0x4eb985=_0xcb1b65===0x0?0x0:((_0x295c70=_0x2211bf===null||_0x2211bf===void 0x0?void 0x0:_0x2211bf[_0x1da172(0x392)])!==null&&_0x295c70!==void 0x0?_0x295c70:DEFAULT_RETRY_CONNECTING_INTERVAL)*0x2**_0xcb1b65;this[_0x1da172(0x36b)]=setTimeout(()=>{const _0x1bfb35=_0x1da172;clearTimeout(this[_0x1bfb35(0x36b)]),this[_0x1bfb35(0x36b)]=null,this[_0x1bfb35(0x2af)]();},_0x4eb985),this[_0x1da172(0xf9)]+=0x1;}[_0x35406f(0x164)](_0x23cff6,_0xf94692){const _0x118424=_0x35406f,{cmd:_0xdf07f0}=_0xf94692;_0xdf07f0===_univerjs_protocol[_0x118424(0x245)][_0x118424(0x1a6)]&&!this[_0x118424(0x390)]&&(_0x23cff6[_0x118424(0x389)]=_0xf94692['data']['memberID'],this[_0x118424(0x254)]['next'](_0x23cff6),this[_0x118424(0x2ed)][_0x118424(0x2b4)](SessionStatus[_0x118424(0x27c)]),this[_0x118424(0x390)]=!![],this[_0x118424(0x1c9)]=null);if(_0xdf07f0===_univerjs_protocol[_0x118424(0x245)]['HEARTBEAT'])this[_0x118424(0x25a)]();this[_0x118424(0x36f)]();}[_0x35406f(0x36f)](){const _0x4ac6b9=_0x35406f;var _0x361ac7;this[_0x4ac6b9(0x35c)](),this['_sendHeartbeatTimer']=setTimeout(()=>this[_0x4ac6b9(0x27f)](),(_0x361ac7=this['_configService']['getConfig'](_0x4ac6b9(0x382)))!==null&&_0x361ac7!==void 0x0?_0x361ac7:DEFAULT_HEARTBEAT_INTERVAL);}[_0x35406f(0x27f)](){const _0x159357=_0x35406f;this[_0x159357(0x386)]['send']({'cmd':_univerjs_protocol['CombCmd'][_0x159357(0x13b)]}),this[_0x159357(0x2b7)]();}[_0x35406f(0x2b7)](){const _0x32a2b5=_0x35406f;var _0xb268bd;this[_0x32a2b5(0x155)]=setTimeout(()=>this[_0x32a2b5(0x1ff)](),(_0xb268bd=this[_0x32a2b5(0x279)][_0x32a2b5(0x38b)](_0x32a2b5(0x221)))!==null&&_0xb268bd!==void 0x0?_0xb268bd:DEFAULT_HEARTBEAT_TIMEOUT);}[_0x35406f(0x35c)](){const _0x43bcea=_0x35406f;this['_sendHeartbeatTimer']!=null&&(clearTimeout(this[_0x43bcea(0x1cf)]),this[_0x43bcea(0x1cf)]=null);}['_clearTimeoutTimer'](){const _0x19fe68=_0x35406f;this[_0x19fe68(0x155)]!=null&&(clearTimeout(this[_0x19fe68(0x155)]),this[_0x19fe68(0x155)]=null);}};CollaborationSessionService=__decorate([__decorateParam(0x0,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_core[_0x35406f(0x2f9)])),__decorateParam(0x1,_univerjs_core[_0x35406f(0x33e)]),__decorateParam(0x2,_univerjs_core['IConfigService']),__decorateParam(0x3,ICollaborationSocketService),__decorateParam(0x4,(0x0,_univerjs_core[_0x35406f(0x33b)])(CollaborationUIEventService)),__decorateParam(0x5,(0x0,_univerjs_core[_0x35406f(0x2c9)])(INetworkConditionService))],CollaborationSessionService);let CollaborationController=class CollaborationController extends _univerjs_core['RxDisposable']{constructor(_0x38ab44,_0x134156,_0x559875,_0x5aa501){const _0x5111be=_0x35406f;var _0x31f01e;super(),this[_0x5111be(0x157)]=_0x38ab44,this[_0x5111be(0x391)]=_0x134156,this[_0x5111be(0x279)]=_0x559875,this[_0x5111be(0x3a3)]=_0x5aa501,_defineProperty(this,'_entities',new Map()),_defineProperty(this,_0x5111be(0x1c4),new rxjs[(_0x5111be(0x2bc))]()),_defineProperty(this,_0x5111be(0x364),this[_0x5111be(0x1c4)][_0x5111be(0x25c)]());if(((_0x31f01e=this[_0x5111be(0x279)]['getConfig'](_0x5111be(0x2b9)))===null||_0x31f01e===void 0x0?void 0x0:_0x31f01e[_0x5111be(0x329)])!==![])this[_0x5111be(0x380)]();}['dispose'](){const _0x401075=_0x35406f;super[_0x401075(0x1db)](),this[_0x401075(0x2ad)]['forEach'](_0x27bf2c=>_0x27bf2c[_0x401075(0x1db)]()),this[_0x401075(0x2ad)][_0x401075(0x20f)]();}['getCollabEntity'](_0x3cac0b){const _0x2bf49e=_0x35406f;var _0x452e9a;return(_0x452e9a=this[_0x2bf49e(0x2ad)][_0x2bf49e(0x2c5)](_0x3cac0b))!==null&&_0x452e9a!==void 0x0?_0x452e9a:null;}[_0x35406f(0x13a)](_0x598d7e){const _0x25a66b=_0x35406f,_0xc7d6d6=this['getCollabEntity'](_0x598d7e);if(_0xc7d6d6)return(0x0,rxjs['of'])(_0xc7d6d6);return this[_0x25a66b(0x1c4)][_0x25a66b(0x38a)]((0x0,rxjs_operators[_0x25a66b(0x2e7)])(_0x442f96=>_0x442f96[_0x25a66b(0x27a)]===_0x598d7e));}['readyForCollab'](_0x524e72){const _0x5051cd=_0x35406f;return(0x0,rxjs[_0x5051cd(0x301)])(this[_0x5051cd(0x13a)](_0x524e72)[_0x5051cd(0x38a)]((0x0,rxjs_operators[_0x5051cd(0x173)])(()=>void 0x0)));}['_init'](){const _0x564c2a=_0x35406f,_0x2bfc9c=0x10;this[_0x564c2a(0x3a3)]['getTypeOfUnitAdded$'](_univerjs_core[_0x564c2a(0x3b4)][_0x564c2a(0x307)])[_0x564c2a(0x38a)]((0x0,rxjs[_0x564c2a(0x3b3)])(this['dispose$']),(0x0,rxjs_operators[_0x564c2a(0x3a1)])(_0x2bfc9c))[_0x564c2a(0x2b5)](async _0x12efe1=>{const _0x1e4f64=_0x564c2a,_0x174c28=_0x12efe1[_0x1e4f64(0x1bf)](),_0x35401d=await this['_startCollaboration'](_0x174c28,_univerjs_core[_0x1e4f64(0x3b4)][_0x1e4f64(0x307)]);this[_0x1e4f64(0x2ad)][_0x1e4f64(0x1dc)](_0x174c28,_0x35401d);}),this[_0x564c2a(0x3a3)][_0x564c2a(0x109)](_univerjs_core[_0x564c2a(0x3b4)][_0x564c2a(0x319)])[_0x564c2a(0x38a)]((0x0,rxjs[_0x564c2a(0x3b3)])(this[_0x564c2a(0x378)]),(0x0,rxjs_operators[_0x564c2a(0x3a1)])(_0x2bfc9c))[_0x564c2a(0x38a)]((0x0,rxjs_operators['filter'])(_0x5dc2f6=>{const _0x4e048f=_0x564c2a;return!_0x5dc2f6[_0x4e048f(0x1bf)]()['startsWith']('__');}))[_0x564c2a(0x2b5)](async _0x3052d2=>{const _0x3330e2=_0x564c2a,_0x362836=_0x3052d2['getUnitId'](),_0x510a23=await this['_startCollaboration'](_0x362836,_univerjs_core[_0x3330e2(0x3b4)]['UNIVER_DOC']);this[_0x3330e2(0x2ad)]['set'](_0x362836,_0x510a23);}),(0x0,rxjs['merge'])(this['_univerInstanceService'][_0x564c2a(0x1e8)](_univerjs_core[_0x564c2a(0x3b4)][_0x564c2a(0x307)]),this[_0x564c2a(0x3a3)][_0x564c2a(0x1e8)](_univerjs_core[_0x564c2a(0x3b4)][_0x564c2a(0x319)]))[_0x564c2a(0x38a)]((0x0,rxjs[_0x564c2a(0x3b3)])(this[_0x564c2a(0x378)]))[_0x564c2a(0x2b5)](_0xda6816=>{const _0x101bf5=_0x564c2a,_0x4d25ee=_0xda6816[_0x101bf5(0x1bf)](),_0x21e2a0=this['_entities']['get'](_0x4d25ee);_0x21e2a0&&(_0x21e2a0[_0x101bf5(0x1db)](),this[_0x101bf5(0x2ad)]['delete'](_0x4d25ee));});}async[_0x35406f(0x1b9)](_0x49e47a,_0x40c04f){const _0x406ab6=_0x35406f,_0x312262=await this['_collabSessionService'][_0x406ab6(0x2d5)](_0x49e47a),_0x542356=this[_0x406ab6(0x157)][_0x406ab6(0x1d5)](this[_0x406ab6(0x220)](_0x40c04f),_0x49e47a,_0x40c04f,_0x312262);return await _0x542356[_0x406ab6(0x35b)](),this['_entityInit$']['next'](_0x542356),_0x542356;}['_getCtorByUniverInstanceType'](_0x2a35ad){const _0xdeea64=_0x35406f;switch(_0x2a35ad){case _univerjs_core[_0xdeea64(0x3b4)]['UNIVER_DOC']:return DocCollaborationEntity;case _univerjs_core[_0xdeea64(0x3b4)]['UNIVER_SHEET']:return SheetCollaborationEntity;default:throw new Error('[CollaborationController]:\x20invalid\x20univer\x20type:\x20'+_0x2a35ad);}}};CollaborationController=__decorate([__decorateParam(0x0,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_core[_0x35406f(0x2f9)])),__decorateParam(0x1,(0x0,_univerjs_core[_0x35406f(0x33b)])(CollaborationSessionService)),__decorateParam(0x2,_univerjs_core[_0x35406f(0x196)]),__decorateParam(0x3,_univerjs_core[_0x35406f(0x161)])],CollaborationController);var name=_0x35406f(0x21e),version=_0x35406f(0x242);const DEFAULT_FILE_NAME_KEY='DEFAULT_FILE_NAME',UNIVER_DEFAULT_FILE_NAME=_0x35406f(0x358);let FileNameController=class FileNameController extends _univerjs_core[_0x35406f(0x163)]{constructor(_0x1edba9,_0x5ccf52){const _0x40aefc=_0x35406f;super(),this[_0x40aefc(0x3a3)]=_0x1edba9,this[_0x40aefc(0x279)]=_0x5ccf52,this[_0x40aefc(0x380)]();}[_0x35406f(0x380)](){const _0x37e003=_0x35406f;this[_0x37e003(0x367)](this[_0x37e003(0x3a3)][_0x37e003(0x16b)][_0x37e003(0x2b5)](()=>{const _0x5216c9=_0x37e003;var _0xfe4bc1;const _0x32b6f2=this[_0x5216c9(0x3a3)]['getFocusedUnit']();let _0x8c2a9c=(_0xfe4bc1=this[_0x5216c9(0x279)]['getConfig'](_0x5216c9(0x12f)))!==null&&_0xfe4bc1!==void 0x0?_0xfe4bc1:UNIVER_DEFAULT_FILE_NAME;if(_0x32b6f2 instanceof _univerjs_core[_0x5216c9(0x20d)])_0x8c2a9c=_0x32b6f2['name'];document[_0x5216c9(0x1a4)]=_0x8c2a9c;}));}};FileNameController=__decorate([__decorateParam(0x0,_univerjs_core[_0x35406f(0x161)]),__decorateParam(0x1,_univerjs_core['IConfigService'])],FileNameController);let AuthServerService=class AuthServerService{constructor(_0x2bbed2,_0x437a9b,_0x312557){const _0x4007ca=_0x35406f;this[_0x4007ca(0x279)]=_0x2bbed2,this[_0x4007ca(0x26a)]=_0x437a9b,this[_0x4007ca(0x1f2)]=_0x312557,this[_0x4007ca(0x35b)]();}['init'](){const _0x103e13=_0x35406f;this[_0x103e13(0x26a)][_0x103e13(0x1a2)]({'priority':0x1,'interceptor':(_0x801a46,_0x38731b)=>{const _0x3acf62=_0x103e13;return _0x38731b(_0x801a46)[_0x3acf62(0x38a)]((0x0,rxjs[_0x3acf62(0x3c8)])(async _0x4fa49d=>{const _0x2212a0=_0x3acf62,_0x5c3fe1=_0x4fa49d;if(_0x5c3fe1[_0x2212a0(0x1c5)]===0x191){if(typeof window===_0x2212a0(0x384))throw new Error('[AuthServerService]:\x20you\x20should\x20provide\x20authentication\x20info\x20on\x20Node.js.');if(window[_0x2212a0(0x3c9)](this[_0x2212a0(0x1f2)]['t']('auth.needGotoLoginAlert'))){const _0x52a1ac=window[_0x2212a0(0x260)](window[_0x2212a0(0x264)][_0x2212a0(0x10f)]);window[_0x2212a0(0x264)][_0x2212a0(0x10f)]=this[_0x2212a0(0x283)]()+_0x2212a0(0x2c0)+_0x52a1ac;}}return _0x5c3fe1;}));}});}['_getLoginPath'](){const _0x22f771=_0x35406f;var _0x545553;const _0x378998=this[_0x22f771(0x279)][_0x22f771(0x38b)](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY);return(_0x545553=_0x378998===null||_0x378998===void 0x0?void 0x0:_0x378998[_0x22f771(0x22a)])!==null&&_0x545553!==void 0x0?_0x545553:DEFAULT_LOGIN_URL;}};AuthServerService=__decorate([__decorateParam(0x0,_univerjs_core[_0x35406f(0x196)]),__decorateParam(0x1,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_network[_0x35406f(0x1e7)])),__decorateParam(0x2,(0x0,_univerjs_core['Inject'])(_univerjs_core[_0x35406f(0x10b)]))],AuthServerService);const DEFAULT_AUTHZ_URL_KEY$1=_0x35406f(0x353);let AuthzIoHttpService=class AuthzIoHttpService extends _univerjs_core['Disposable']{constructor(_0x182916,_0x28cd07){const _0x3905c7=_0x35406f;super(),this[_0x3905c7(0x342)]=_0x182916,this['_configService']=_0x28cd07,_defineProperty(this,_0x3905c7(0x12b),![]),this[_0x3905c7(0x398)]();}[_0x35406f(0x398)](){const _0x490aa5=_0x35406f,_0x232024=this;this['disposeWithMe'](this[_0x490aa5(0x342)][_0x490aa5(0x1a2)]({'priority':0x3e7,'interceptor':(0x0,_univerjs_network[_0x490aa5(0x327)])({'isMatch'(_0x2c4be1){const _0x1a4cd9=_0x490aa5;var _0x588b98;if(_0x2c4be1[_0x1a4cd9(0x387)]==='POST'&&((_0x588b98=_0x2c4be1[_0x1a4cd9(0x33d)])===null||_0x588b98===void 0x0?void 0x0:_0x588b98[_0x1a4cd9(0x229)])){const {objectID:_0x2452ed,objectType:_0x292221}=_0x2c4be1[_0x1a4cd9(0x33d)]['body']||{};if(!_0x2452ed||_0x292221===void 0x0)return![];const _0x56ee83=_0x232024[_0x1a4cd9(0x3cc)]()+'/'+_0x292221+'/object/'+_0x2452ed+_0x1a4cd9(0x2b2);if(_0x2c4be1[_0x1a4cd9(0x292)]===_0x56ee83)return!![];}return![];},'getParamsFromRequest'(_0x18e2a4){var _0xe02aac;return(_0xe02aac=_0x18e2a4['requestParams'])===null||_0xe02aac===void 0x0?void 0x0:_0xe02aac['body'];},'mergeParamsToRequest'(_0x17ffd9,_0x1ebb3b){const _0xd49043=_0x490aa5,_0x3b89aa=_0x232024[_0xd49043(0x3cc)]()+_0xd49043(0x270),_0xf3b48f=_0x17ffd9[_0xd49043(0x212)]((_0x2b3970,_0x2a30c3)=>{const _0x256657=_0xd49043,{unitID:_0x1a236a,objectID:_0x665eb8,objectType:_0x3f975c,actions:_0x5907dc}=_0x2a30c3;if(!_0x2b3970[_0x1a236a])_0x2b3970[_0x1a236a]={};if(!_0x2b3970[_0x1a236a][_0x665eb8])_0x2b3970[_0x1a236a][_0x665eb8]={'objectID':_0x665eb8,'objectType':_0x3f975c,'actions':[]};return _0x2b3970[_0x1a236a][_0x665eb8][_0x256657(0x199)]['push'](..._0x5907dc),_0x2b3970;},{}),_0x311b94=[];for(const _0x31c34b in _0xf3b48f)for(const _0xa16a89 in _0xf3b48f[_0x31c34b]){const {actions:_0x311087,objectType:_0x41bdec}=_0xf3b48f[_0x31c34b][_0xa16a89],_0x87e81=[...new Set(_0x311087)];_0x311b94[_0xd49043(0x17b)]({'unitID':_0x31c34b,'objectID':_0xa16a89,'objectType':_0x41bdec,'actions':_0x87e81});}return new _univerjs_network['HTTPRequest'](_0xd49043(0x2e4),_0x3b89aa,{'headers':_0x1ebb3b['headers'],'withCredentials':_0x1ebb3b['withCredentials'],'responseType':_0x1ebb3b[_0xd49043(0x1f1)],'body':{'requests':_0x311b94}});}},{'distributeResult'(_0x517b88,_0x341481){const {objectActions:_0x4c3f7a}=_0x517b88;return _0x341481['map'](_0x1a5a1d=>{const _0x17bb29=_0x4d20,{unitID:_0x534c11,objectID:_0x339b6f,actions:_0x3a9e4c}=_0x1a5a1d,_0x238ecf=_0x4c3f7a[_0x17bb29(0x2be)](_0x198124=>_0x198124[_0x17bb29(0x27a)]===_0x534c11&&_0x198124[_0x17bb29(0x1d3)]===_0x339b6f);return{'config':_0x1a5a1d,'result':{'actions':_0x3a9e4c[_0x17bb29(0x173)](_0x5e83d7=>_0x238ecf===null||_0x238ecf===void 0x0?void 0x0:_0x238ecf[_0x17bb29(0x199)][_0x17bb29(0x2be)](_0x1624d4=>_0x1624d4[_0x17bb29(0x184)]===_0x5e83d7))[_0x17bb29(0x2e7)](_0x18e05b=>!!_0x18e05b),'error':_0x517b88['error']}};});}})}));}[_0x35406f(0x3cc)](){const _0x2eec34=_0x35406f;var _0x1d2d56;const _0x346fdb=this[_0x2eec34(0x279)]['getConfig'](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY);return(_0x1d2d56=_0x346fdb===null||_0x346fdb===void 0x0?void 0x0:_0x346fdb[_0x2eec34(0x29c)])!==null&&_0x1d2d56!==void 0x0?_0x1d2d56:DEFAULT_AUTHZ_URL_KEY$1;}async[_0x35406f(0x3c4)](_0x428250){const _0x13b493=_0x35406f,_0x47ecd6=this[_0x13b493(0x3cc)]()+'/'+_0x428250[_0x13b493(0x132)]+_0x13b493(0x108);return(await this['_HTTPService'][_0x13b493(0x357)](_0x47ecd6,{'body':_0x428250}))[_0x13b493(0x229)][_0x13b493(0x1d3)]||'';}async['list'](_0xff043a){const _0x26b9f0=_0x35406f,_0x4838a7=this['_getAPIPrefixPath']()+_0x26b9f0(0x1b5);return(await this[_0x26b9f0(0x342)][_0x26b9f0(0x357)](_0x4838a7,{'body':_0xff043a}))[_0x26b9f0(0x229)][_0x26b9f0(0x211)];}async[_0x35406f(0x171)](_0x2b75da){const _0x31ce46=_0x35406f;var _0x5cd173;const _0x42820e=this[_0x31ce46(0x3cc)]()+'/'+_0x2b75da[_0x31ce46(0x132)]+'/object/'+_0x2b75da[_0x31ce46(0x1d3)],_0x4428ea=await this[_0x31ce46(0x342)]['put'](_0x42820e,{'body':_0x2b75da});if((_0x4428ea===null||_0x4428ea===void 0x0||(_0x5cd173=_0x4428ea[_0x31ce46(0x229)])===null||_0x5cd173===void 0x0||(_0x5cd173=_0x5cd173[_0x31ce46(0x34c)])===null||_0x5cd173===void 0x0?void 0x0:_0x5cd173['code'])!==0x1)throw new Error(_0x31ce46(0x175));}async[_0x35406f(0x347)](_0x2b4936){const _0x1555e8=_0x35406f,_0x42b3de=this[_0x1555e8(0x3cc)]()+'/'+_0x2b4936[_0x1555e8(0x132)]+'/object/'+_0x2b4936[_0x1555e8(0x1d3)]+_0x1555e8(0x2b2);return(await this[_0x1555e8(0x342)][_0x1555e8(0x357)](_0x42b3de,{'body':_0x2b4936}))[_0x1555e8(0x229)][_0x1555e8(0x199)];}async[_0x35406f(0x27b)](_0x45ab41){const _0x23884a=_0x35406f,_0x41611f=this[_0x23884a(0x3cc)]()+_0x23884a(0x270);return(await this[_0x23884a(0x342)][_0x23884a(0x357)](_0x41611f,{'body':{'requests':_0x45ab41}}))[_0x23884a(0x229)][_0x23884a(0x3c5)];}async[_0x35406f(0x227)](_0x1dff1f){const _0x1e676f=_0x35406f,_0x77e27=this[_0x1e676f(0x3cc)]()+'/'+_0x1dff1f['objectType']+'/role',_0x9338b6=await this[_0x1e676f(0x342)][_0x1e676f(0x357)](_0x77e27,{'body':_0x1dff1f});return{'roles':_0x9338b6[_0x1e676f(0x229)]['roles'],'actions':_0x9338b6[_0x1e676f(0x229)][_0x1e676f(0x199)]};}async[_0x35406f(0x2cc)](_0x293594){const _0x61c7c3=_0x35406f,_0x5cf970=this[_0x61c7c3(0x3cc)]()+_0x61c7c3(0x3b2);await this[_0x61c7c3(0x342)][_0x61c7c3(0x202)](_0x5cf970,{'params':{'collaboratorID':_0x293594[_0x61c7c3(0x294)],'objectID':_0x293594[_0x61c7c3(0x1d3)],'unitID':_0x293594[_0x61c7c3(0x27a)]}});}async[_0x35406f(0x1d8)](_0x79f3ba){const _0x5744d5=_0x35406f,_0xc28126=this[_0x5744d5(0x3cc)]()+'/collaborator';await this[_0x5744d5(0x342)]['patch'](_0xc28126,{'body':_0x79f3ba});}async['createCollaborator'](_0x21ba38){const _0x2d630c=_0x35406f,_0x21501a=this[_0x2d630c(0x3cc)]()+_0x2d630c(0x3b2);await this[_0x2d630c(0x342)][_0x2d630c(0x357)](_0x21501a,{'body':_0x21ba38});}async[_0x35406f(0x273)](_0x1a7607){const _0x59d42e=_0x35406f;var _0x4d8ba7;const _0x4c124c=this[_0x59d42e(0x3cc)]()+_0x59d42e(0x3b2),_0x5c165a=await this[_0x59d42e(0x342)][_0x59d42e(0x2c5)](_0x4c124c,{'params':{'objectID':_0x1a7607[_0x59d42e(0x1d3)],'unitID':_0x1a7607[_0x59d42e(0x27a)]}});return this[_0x59d42e(0x122)]((_0x4d8ba7=_0x5c165a[_0x59d42e(0x229)][_0x59d42e(0x280)])!==null&&_0x4d8ba7!==void 0x0?_0x4d8ba7:![]),_0x5c165a[_0x59d42e(0x229)][_0x59d42e(0x103)];}async['putCollaborators'](_0x2c8ced){const _0x2527c3=_0x35406f,_0x18484c=this['_getAPIPrefixPath']()+_0x2527c3(0x3b2);await this['_HTTPService'][_0x2527c3(0x341)](_0x18484c,{'body':_0x2c8ced});}[_0x35406f(0x122)](_0x1ebc02){const _0x2e7d1b=_0x35406f;this[_0x2e7d1b(0x12b)]=_0x1ebc02;}['getCfgEnableObjInherit'](){const _0x572c15=_0x35406f;return this[_0x572c15(0x12b)];}};AuthzIoHttpService=__decorate([__decorateParam(0x0,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_network[_0x35406f(0x1e7)])),__decorateParam(0x1,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_core[_0x35406f(0x196)]))],AuthzIoHttpService);function base64ToBytes(_0x45b80b){const _0x1fc2b6=atob(_0x45b80b),_0x584e9e=new Uint8Array(_0x1fc2b6['length']);for(let _0x1e208b=0x0;_0x1e208b<_0x1fc2b6['length'];_0x1e208b++)_0x584e9e[_0x1e208b]=_0x1fc2b6['charCodeAt'](_0x1e208b);return _0x584e9e;}function bytesToBase64(_0x250020){const _0x462fd6=_0x35406f;let _0xcd83ee='';for(let _0x1a3678=0x0;_0x1a3678<_0x250020[_0x462fd6(0x332)];_0x1a3678++)_0xcd83ee+=String[_0x462fd6(0x3a8)](_0x250020[_0x1a3678]);return btoa(_0xcd83ee);}function encrypt(_0xb8992e,_0x268780){const _0x29d4e7=_0x35406f,_0x3aedd3=base64ToBytes(_0x268780),_0x17db8d=(0x0,_noble_ciphers_utils_js[_0x29d4e7(0x2d2)])(0x10);return bytesToBase64((0x0,_noble_ciphers_utils_js['concatBytes'])(_0x17db8d,(0x0,_noble_ciphers_aes_js[_0x29d4e7(0x209)])(_0x3aedd3,_0x17db8d)[_0x29d4e7(0x1ad)]((0x0,_noble_ciphers_utils_js[_0x29d4e7(0x131)])(_0xb8992e))));}function getAttachHeader(){const _0x253a9b=_0x35406f,_0x859a8e=(0x0,_univerjs_pro_license[_0x253a9b(0x1f6)])()[_0x253a9b(0x2a4)];if(typeof window!==_0x253a9b(0x384)&&typeof window[_0x253a9b(0x264)]!==_0x253a9b(0x384)&&_0x859a8e){const _0x5b6463={'time':Math[_0x253a9b(0x1e6)](Date[_0x253a9b(0x1b7)]()/0x3e8),'domain':location['hostname']};return encrypt(JSON[_0x253a9b(0x2db)](_0x5b6463),_0x859a8e);}}let DomainRequestService=class DomainRequestService{constructor(_0x525154){const _0x39e595=_0x35406f;this[_0x39e595(0x26a)]=_0x525154,this[_0x39e595(0x338)]();}[_0x35406f(0x338)](){const _0x1554ed=_0x35406f;this[_0x1554ed(0x26a)][_0x1554ed(0x1a2)]({'interceptor':(_0x1526a4,_0x14b48a)=>{const _0x1dcb9a=_0x1554ed,_0x44f6d3=getAttachHeader();if(_0x44f6d3)_0x1526a4['headers'][_0x1dcb9a(0x1dc)](_0x1dcb9a(0x25f),_0x44f6d3);return _0x14b48a(_0x1526a4);}});}};DomainRequestService=__decorate([__decorateParam(0x0,(0x0,_univerjs_core['Inject'])(_univerjs_network[_0x35406f(0x1e7)]))],DomainRequestService);let DataLoaderService=class DataLoaderService extends _univerjs_core[_0x35406f(0x388)]{constructor(_0x5a19f4,_0x2917e2,_0x594044){const _0xf366=_0x35406f;super(),this[_0xf366(0x3ae)]=_0x5a19f4,this['_snapshotService']=_0x2917e2,this[_0xf366(0x3d4)]=_0x594044,_defineProperty(this,_0xf366(0x14a),new rxjs[(_0xf366(0x2a2))](null)),_defineProperty(this,'unitInfo$',this[_0xf366(0x14a)][_0xf366(0x25c)]());}async[_0x35406f(0x216)](_0x564634,_0x57f1a8,_0x656e18){const _0x4a5298=_0x35406f;this['_unitInfo$']['next']({'unitId':_0x564634,'type':_0x57f1a8});let _0x2d37d0=null;switch(_0x57f1a8){case _univerjs_core[_0x4a5298(0x3b4)][_0x4a5298(0x307)]:_0x2d37d0=await this[_0x4a5298(0x2a6)][_0x4a5298(0x29a)](_0x564634,_0x656e18);break;case _univerjs_core[_0x4a5298(0x3b4)]['UNIVER_DOC']:_0x2d37d0=await this[_0x4a5298(0x2a6)][_0x4a5298(0x1b2)](_0x564634,_0x656e18);break;default:this[_0x4a5298(0x3ae)][_0x4a5298(0x34c)](_0x4a5298(0x337),_0x4a5298(0x14b));break;}return _0x2d37d0;}async[_0x35406f(0x35a)](_0x565bb5,_0x4ae545,_0x5b28be){const _0x599c02=_0x35406f;var _0x311c87;this[_0x599c02(0x14a)][_0x599c02(0x2b4)]({'unitId':_0x565bb5,'type':_0x4ae545,'subUnitId':_0x5b28be});let _0x495fc8=0x0;const _0x1e3929=await((_0x311c87=this[_0x599c02(0x3d4)])===null||_0x311c87===void 0x0?void 0x0:_0x311c87[_0x599c02(0x3ac)](_0x565bb5));if(_0x1e3929&&(_0x1e3929[_0x599c02(0x373)]||_0x1e3929['mutations'][_0x599c02(0x332)]!==0x0))_0x495fc8=_0x1e3929['rev'];if(_0x495fc8===0x0)this['_logService'][_0x599c02(0x2f7)](_0x599c02(0x337),_0x599c02(0x101));return this[_0x599c02(0x216)](_0x565bb5,_0x4ae545,_0x495fc8);}};DataLoaderService=__decorate([__decorateParam(0x0,_univerjs_core[_0x35406f(0x33e)]),__decorateParam(0x1,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_pro_collaboration[_0x35406f(0x136)])),__decorateParam(0x2,(0x0,_univerjs_core[_0x35406f(0x2c9)])(ILocalCacheService))],DataLoaderService);const ALLOW_IMAGE_LIST=['image/png',_0x35406f(0x17d),_0x35406f(0x28f),_0x35406f(0x251),'image/bmp'],ALLOW_IMAGE_SIZE=0x5*0x400*0x400,DEFAULT_EXCHANGE_UPLOAD_FILE_SERVER_URL_KEY='/universer-api/stream/file/upload',DEFAULT_EXCHANGE_SIGN_URL_SERVER_URL_KEY='/universer-api/file/{fileID}/sign-url';let CollaborationImageIoService=class CollaborationImageIoService{constructor(_0x5a7809,_0x5a0b84,_0x18ad20){const _0x38d0bf=_0x35406f;this[_0x38d0bf(0x26a)]=_0x5a7809,this[_0x38d0bf(0x279)]=_0x5a0b84,this['_univerInstanceService']=_0x18ad20,_defineProperty(this,_0x38d0bf(0x33c),0x0),_defineProperty(this,'_change$',new rxjs[(_0x38d0bf(0x2bc))]()),_defineProperty(this,_0x38d0bf(0x3bc),this['_change$']),_defineProperty(this,_0x38d0bf(0xfb),new Map());}[_0x35406f(0x1f0)](_0x59a6a3){const _0x39ab07=_0x35406f;this[_0x39ab07(0x33c)]=_0x59a6a3,this['_change$'][_0x39ab07(0x2b4)](_0x59a6a3);}[_0x35406f(0x35d)](_0x1e569d,_0xdb88de){const _0x1e1181=_0x35406f;if(_0xdb88de===_univerjs_drawing[_0x1e1181(0x324)][_0x1e1181(0x18e)]){const _0x148496=new Image();return _0x148496[_0x1e1181(0x287)]=_0x1e569d,_0x148496;}return this[_0x1e1181(0xfb)][_0x1e1181(0x2c5)](_0x1e569d);}[_0x35406f(0x340)](_0x4933b6,_0x3437a3,_0x30c745){const _0x15e505=_0x35406f;if(_0x3437a3===_univerjs_drawing[_0x15e505(0x324)][_0x15e505(0x18e)]||_0x30c745==null)return;this[_0x15e505(0xfb)][_0x15e505(0x1dc)](_0x4933b6,_0x30c745);}async[_0x35406f(0x328)](_0x41a9dc){const _0x294f4a=_0x35406f;try{const _0x1c9417=this[_0x294f4a(0x2e9)](this[_0x294f4a(0x24c)](),''+_0x41a9dc),_0x383a3b=(await this[_0x294f4a(0x26a)][_0x294f4a(0x2c5)](_0x1c9417))[_0x294f4a(0x229)];if(_0x383a3b[_0x294f4a(0x34c)]&&_0x383a3b[_0x294f4a(0x34c)][_0x294f4a(0x1c7)]===_univerjs_protocol[_0x294f4a(0x16d)]['OK']){const _0x126580=(0x0,_univerjs_core[_0x294f4a(0x230)])(_0x383a3b[_0x294f4a(0x292)],this['_getDownloadEndpointURL']());return Promise[_0x294f4a(0x299)](_0x126580);}return Promise[_0x294f4a(0x1cc)](_0x383a3b[_0x294f4a(0x34c)]);}catch(_0x27ed10){return Promise[_0x294f4a(0x1cc)](_0x27ed10);}}async[_0x35406f(0x23d)](_0x14adf3){const _0x3c986b=_0x35406f;let _0x395d7e='';if(!ALLOW_IMAGE_LIST[_0x3c986b(0x369)](_0x14adf3[_0x3c986b(0x285)]))return this[_0x3c986b(0x306)](),Promise[_0x3c986b(0x1cc)](new Error(_univerjs_drawing[_0x3c986b(0x1b0)]['ERROR_IMAGE_TYPE']));if(_0x14adf3[_0x3c986b(0x21d)]>ALLOW_IMAGE_SIZE)return this[_0x3c986b(0x306)](),Promise[_0x3c986b(0x1cc)](new Error(_univerjs_drawing['ImageUploadStatusType'][_0x3c986b(0x32b)]));try{const _0x1e896e=new FormData();_0x1e896e[_0x3c986b(0x381)]('file',_0x14adf3);const _0x61ec16=this[_0x3c986b(0x3a3)][_0x3c986b(0x32d)](),_0x2d0f96=_0x61ec16===null||_0x61ec16===void 0x0?void 0x0:_0x61ec16['getUnitId']();if(!_0x2d0f96)throw new Error(_0x3c986b(0x186));const _0x1db012=this['_getUploadFileURL']()+_0x3c986b(0x2b1)+_0x14adf3[_0x3c986b(0x21d)][_0x3c986b(0x355)]()+_0x3c986b(0x2a9)+_univerjs_protocol['FileSource']['UnitEmbedded']+_0x3c986b(0x2c8)+encodeURIComponent(_0x2d0f96),_0x533810={'body':_0x1e896e},_0x9fecd2=(await this[_0x3c986b(0x26a)][_0x3c986b(0x357)](_0x1db012,_0x533810))[_0x3c986b(0x229)];if(typeof _0x9fecd2[_0x3c986b(0x201)]!==_0x3c986b(0x37d))return this[_0x3c986b(0x306)](),Promise['reject'](new Error(_univerjs_drawing[_0x3c986b(0x1b0)][_0x3c986b(0x241)]));_0x395d7e=_0x9fecd2['FileId'];}catch(_0x42aa2c){return this[_0x3c986b(0x306)](),Promise[_0x3c986b(0x1cc)](new Error(_univerjs_drawing[_0x3c986b(0x1b0)][_0x3c986b(0x241)]));}return new Promise((_0x5a12c0,_0xd98d9b)=>{const _0x5a230d=_0x3c986b,_0x5062a4=new FileReader();_0x5062a4[_0x5a230d(0x3b5)](_0x14adf3),_0x5062a4[_0x5a230d(0x1a8)]=_0x505917=>{const _0x3204e8=_0x5a230d;var _0x4385c3;const _0x548c3f=(_0x4385c3=_0x505917[_0x3204e8(0x3d0)])===null||_0x4385c3===void 0x0?void 0x0:_0x4385c3[_0x3204e8(0x281)];if(_0x548c3f==null){this['_decreaseWaiting'](),_0xd98d9b(new Error(_univerjs_drawing[_0x3204e8(0x1b0)][_0x3204e8(0x241)]));return;}_0x5a12c0({'imageId':(0x0,_univerjs_core['generateRandomId'])(0x6),'imageSourceType':_univerjs_drawing[_0x3204e8(0x324)][_0x3204e8(0x159)],'source':_0x395d7e,'base64Cache':_0x548c3f,'status':_univerjs_drawing['ImageUploadStatusType']['SUCCUSS']}),this[_0x3204e8(0x306)]();};});}['_getUploadFileURL'](){const _0x215cde=_0x35406f;var _0x440a9c;const _0x150b2d=this[_0x215cde(0x279)][_0x215cde(0x38b)](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY);return(_0x440a9c=_0x150b2d===null||_0x150b2d===void 0x0?void 0x0:_0x150b2d[_0x215cde(0x3c3)])!==null&&_0x440a9c!==void 0x0?_0x440a9c:DEFAULT_EXCHANGE_UPLOAD_FILE_SERVER_URL_KEY;}[_0x35406f(0x24c)](){const _0x5b2e39=_0x35406f;var _0x5c4f26;const _0x2785a5=this[_0x5b2e39(0x279)][_0x5b2e39(0x38b)](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY);return(_0x5c4f26=_0x2785a5===null||_0x2785a5===void 0x0?void 0x0:_0x2785a5[_0x5b2e39(0x1a5)])!==null&&_0x5c4f26!==void 0x0?_0x5c4f26:DEFAULT_EXCHANGE_SIGN_URL_SERVER_URL_KEY;}[_0x35406f(0x1c8)](){const _0x3ee84c=_0x35406f;var _0x388ac6;const _0x4e49ae=this[_0x3ee84c(0x279)][_0x3ee84c(0x38b)](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY);return(_0x388ac6=_0x4e49ae===null||_0x4e49ae===void 0x0?void 0x0:_0x4e49ae[_0x3ee84c(0x18b)])!==null&&_0x388ac6!==void 0x0?_0x388ac6:location[_0x3ee84c(0x113)];}[_0x35406f(0x2e9)](_0xf8d93d,_0x5b513b){const _0x1eb30b=_0x35406f;return _0xf8d93d[_0x1eb30b(0x189)](_0x1eb30b(0x1da),_0x5b513b);}[_0x35406f(0x306)](){const _0x2af2a5=_0x35406f;this['_waitCount']-=0x1,this[_0x2af2a5(0x333)][_0x2af2a5(0x2b4)](this['_waitCount']);}};CollaborationImageIoService=__decorate([__decorateParam(0x0,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_network[_0x35406f(0x1e7)])),__decorateParam(0x1,_univerjs_core[_0x35406f(0x196)]),__decorateParam(0x2,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_core[_0x35406f(0x161)]))],CollaborationImageIoService);const DEFAULT_AUTHZ_URL_KEY=_0x35406f(0x353);let MentionIoHttpService=class MentionIoHttpService{constructor(_0x5176a0,_0x3ddc45){const _0x34fe1d=_0x35406f;this[_0x34fe1d(0x279)]=_0x5176a0,this['_HTTPService']=_0x3ddc45;}['_getAPIPrefixPath'](){const _0x3b7dca=_0x35406f;var _0x5c62dc;const _0x10ee7a=this[_0x3b7dca(0x279)][_0x3b7dca(0x38b)](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY);return(_0x5c62dc=_0x10ee7a===null||_0x10ee7a===void 0x0?void 0x0:_0x10ee7a[_0x3b7dca(0x29c)])!==null&&_0x5c62dc!==void 0x0?_0x5c62dc:DEFAULT_AUTHZ_URL_KEY;}async[_0x35406f(0x1cd)](_0x3b22b4){const _0xef5c39=_0x35406f,_0x1ecb2a=this['_getAPIPrefixPath']()+_0xef5c39(0x3b2);return{'list':[{'title':'People','mentions':(await this[_0xef5c39(0x342)]['get'](_0x1ecb2a,{'params':{'objectID':_0x3b22b4[_0xef5c39(0x349)],'unitID':_0x3b22b4[_0xef5c39(0x349)]}}))[_0xef5c39(0x229)][_0xef5c39(0x103)][_0xef5c39(0x173)](_0x2fd22a=>({'objectId':_0x2fd22a['id'],'name':_0x2fd22a['subject'][_0xef5c39(0x1df)],'metadata':{'icon':_0x2fd22a['subject'][_0xef5c39(0x35e)]},'label':_0x2fd22a[_0xef5c39(0x124)][_0xef5c39(0x1df)],'objectType':_univerjs_core[_0xef5c39(0x185)]['PERSON']})),'metadata':{},'type':_univerjs_core[_0xef5c39(0x185)][_0xef5c39(0x3be)]}]};}};MentionIoHttpService=__decorate([__decorateParam(0x0,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_core[_0x35406f(0x196)])),__decorateParam(0x1,(0x0,_univerjs_core['Inject'])(_univerjs_network[_0x35406f(0x1e7)]))],MentionIoHttpService);let PermissionService=class PermissionService extends _univerjs_core['RxDisposable']{constructor(_0x5db1ef,_0x2e43d7,_0x5880b5,_0x2f324b,_0x12a4e4){const _0x1b7f6c=_0x35406f;super(),this[_0x1b7f6c(0x157)]=_0x5db1ef,this[_0x1b7f6c(0x3a3)]=_0x2e43d7,this[_0x1b7f6c(0x36e)]=_0x5880b5,this[_0x1b7f6c(0x19b)]=_0x2f324b,this[_0x1b7f6c(0x24d)]=_0x12a4e4,this[_0x1b7f6c(0x2f2)](),this[_0x1b7f6c(0x206)]();}[_0x35406f(0x206)](){const _0x46dbed=_0x35406f,_0x51c267=async _0x44f647=>{const _0x5aa6f3=_0x4d20;(await this[_0x5aa6f3(0x19b)]['requireSession'](_0x44f647))[_0x5aa6f3(0x195)][_0x5aa6f3(0x38a)]((0x0,rxjs_operators[_0x5aa6f3(0x2e7)])(_0x1bdb82=>_0x1bdb82[_0x5aa6f3(0x258)]===_univerjs_pro_collaboration['CollaborationEvent']['SHOULD_CLOSE_CONN']),(0x0,rxjs_operators[_0x5aa6f3(0x3b3)])(this[_0x5aa6f3(0x378)]))[_0x5aa6f3(0x2b5)](_0x200482=>{const _0x518396=_0x5aa6f3,{reason:_0x5ef53d}=_0x200482['data'];this[_0x518396(0x24d)][_0x518396(0x190)]({'id':CollaborationUIEventId[_0x518396(0x248)],'data':_0x5ef53d}),this[_0x518396(0x36e)][_0x518396(0x29e)](new _univerjs_sheets[(_0x518396(0x213))](_0x44f647)['id'],![]),this[_0x518396(0x19b)][_0x518396(0x11f)](_0x44f647);});};(0x0,rxjs['merge'])(this['_univerInstanceService']['getTypeOfUnitAdded$'](_univerjs_core[_0x46dbed(0x3b4)]['UNIVER_SHEET']),this['_univerInstanceService'][_0x46dbed(0x109)](_univerjs_core['UniverInstanceType'][_0x46dbed(0x319)]))[_0x46dbed(0x38a)]((0x0,rxjs_operators['map'])(_0x153a3b=>_0x153a3b[_0x46dbed(0x1bf)]()),(0x0,rxjs_operators['filter'])(_0x259797=>!(0x0,_univerjs_core[_0x46dbed(0x335)])(_0x259797)),(0x0,rxjs_operators[_0x46dbed(0x3b3)])(this[_0x46dbed(0x378)]))[_0x46dbed(0x2b5)](_0x3c0fe7=>{_0x51c267(_0x3c0fe7);});}[_0x35406f(0x2f2)](){const _0xa159bc=_0x35406f,_0x374fb1=async _0x482aca=>{const _0x29eb4f=_0x4d20,_0x232ce6=await this['_collaborationSessionService'][_0x29eb4f(0x2d5)](_0x482aca),_0x168bce=this[_0x29eb4f(0x157)][_0x29eb4f(0x2c5)](_univerjs_sheets[_0x29eb4f(0x2f0)]);_0x232ce6[_0x29eb4f(0x195)][_0x29eb4f(0x38a)]((0x0,rxjs_operators[_0x29eb4f(0x2e7)])(_0x1d1fa2=>_0x1d1fa2[_0x29eb4f(0x258)]===_univerjs_pro_collaboration[_0x29eb4f(0x1ae)][_0x29eb4f(0x143)]),(0x0,rxjs_operators['takeUntil'])(this[_0x29eb4f(0x378)]))[_0x29eb4f(0x2b5)](_0x489a29=>{const _0x5e2fda=_0x29eb4f,{objectId:_0x3b763a}=_0x489a29[_0x5e2fda(0x1b8)];if(_0x3b763a===_0x482aca)_0x168bce['initWorkbookPermissionChange'](_0x482aca);else _0x168bce[_0x5e2fda(0x2c4)](_0x482aca,_0x3b763a);});};(0x0,rxjs['merge'])(this[_0xa159bc(0x3a3)][_0xa159bc(0x109)](_univerjs_core[_0xa159bc(0x3b4)][_0xa159bc(0x307)]))['pipe']((0x0,rxjs_operators[_0xa159bc(0x173)])(_0x2f4642=>_0x2f4642[_0xa159bc(0x1bf)]()),(0x0,rxjs_operators['filter'])(_0x6209d9=>!(0x0,_univerjs_core[_0xa159bc(0x335)])(_0x6209d9)),(0x0,rxjs_operators[_0xa159bc(0x3b3)])(this[_0xa159bc(0x378)]))[_0xa159bc(0x2b5)](_0x35aede=>{_0x374fb1(_0x35aede);});}};PermissionService=__decorate([__decorateParam(0x0,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_core[_0x35406f(0x2f9)])),__decorateParam(0x1,_univerjs_core[_0x35406f(0x161)]),__decorateParam(0x2,_univerjs_core[_0x35406f(0x192)]),__decorateParam(0x3,(0x0,_univerjs_core[_0x35406f(0x33b)])(CollaborationSessionService)),__decorateParam(0x4,(0x0,_univerjs_core[_0x35406f(0x33b)])(CollaborationUIEventService))],PermissionService);let SnapshotServerOverHTTPService=class SnapshotServerOverHTTPService{constructor(_0x161474,_0x1d8d97){const _0x5db144=_0x35406f;this[_0x5db144(0x279)]=_0x161474,this['_httpService']=_0x1d8d97;}async[_0x35406f(0x144)](_0x2b574d,_0x1a370f){const _0x186511=_0x35406f;var _0x18ff91;const {unitID:_0x5ba10c,type:_0x3a5ce4,revision:revision=0x0}=_0x1a370f,_0x52bd50=this[_0x186511(0x3bf)]()+'/'+_0x3a5ce4+_0x186511(0x150)+_0x5ba10c+_0x186511(0x2e0)+revision,_0x36db18=(await this[_0x186511(0x26a)][_0x186511(0x2c5)](_0x52bd50))[_0x186511(0x229)],_0x43ee03=(_0x18ff91=_0x36db18[_0x186511(0x2e3)])===null||_0x18ff91===void 0x0?void 0x0:_0x18ff91[_0x186511(0x11c)];if(_0x43ee03){const _0x16c780=_0x43ee03===null||_0x43ee03===void 0x0?void 0x0:_0x43ee03['originalMeta'];_0x43ee03[_0x186511(0x2f5)]=_univerjs_pro_collaboration[_0x186511(0x182)][_0x186511(0x356)]((0x0,_univerjs_pro_collaboration[_0x186511(0x2b8)])(_0x16c780)),Object[_0x186511(0x1d2)](_0x43ee03[_0x186511(0x33f)])[_0x186511(0x320)](([,_0xd36b4])=>{const _0xa231e5=_0x186511,_0x276966=_0xd36b4[_0xa231e5(0x2f5)];_0xd36b4[_0xa231e5(0x2f5)]=_univerjs_pro_collaboration[_0xa231e5(0x182)][_0xa231e5(0x356)]((0x0,_univerjs_pro_collaboration[_0xa231e5(0x2b8)])(_0x276966));});}return _0x36db18;}async[_0x35406f(0x29f)](_0x47b89c,_0x38d83e){const _0x3db988=_0x35406f,{unitID:_0x1dc929,type:_0x166cac,blockID:_0x349edc}=_0x38d83e,_0x58c739=this[_0x3db988(0x34d)]()+'/'+_0x166cac+_0x3db988(0x150)+_0x1dc929+'/block/'+_0x349edc;return(await this[_0x3db988(0x26a)]['get'](_0x58c739))[_0x3db988(0x229)];}async[_0x35406f(0x2d9)](_0x11987d,_0x1fe2ea){const _0xe7f6bb=_0x35406f,{unitID:_0x4a0993,type:_0x386325,blockID:_0xe79289}=_0x1fe2ea,_0x438164=this['_getAPIPrefix']()+_0xe7f6bb(0x1bc)+_0x386325+_0xe7f6bb(0x150)+_0x4a0993+'/block/'+_0xe79289;return(await this[_0xe7f6bb(0x26a)][_0xe7f6bb(0x2c5)](_0x438164))[_0xe7f6bb(0x229)];}async['fetchMissingChangesets'](_0x35bd67,_0x26772d){const _0x223ea3=_0x35406f,{unitID:_0x3fda2f,type:_0xffc20c,from:_0x533c82,to:_0x2e3c35}=_0x26772d,_0x56c96f=this['_getAPIPrefix']()+'/'+_0xffc20c+_0x223ea3(0x150)+_0x3fda2f+_0x223ea3(0x11a)+_0x533c82+_0x223ea3(0x1ba)+_0x2e3c35;return(await this[_0x223ea3(0x26a)][_0x223ea3(0x2c5)](_0x56c96f))[_0x223ea3(0x229)];}[_0x35406f(0x3bf)](){const _0x4e1fb3=_0x35406f;var _0x5b24d4;return(_0x5b24d4=this['_configService'][_0x4e1fb3(0x38b)](_0x4e1fb3(0x1d1)))!==null&&_0x5b24d4!==void 0x0?_0x5b24d4:this['_getAPIPrefix']();}['_getAPIPrefix'](){const _0x48b0d4=_0x35406f;var _0x138650;const _0x5133f1=this[_0x48b0d4(0x279)][_0x48b0d4(0x38b)](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY);return(_0x138650=_0x5133f1===null||_0x5133f1===void 0x0?void 0x0:_0x5133f1[_0x48b0d4(0x2fd)])!==null&&_0x138650!==void 0x0?_0x138650:DEFAULT_SNAPSHOT_SERVER_URL;}async[_0x35406f(0x37c)](_0x24fcfe,_0x16e951){const _0x2e977f=_0x35406f,_0x1f040a=_0x2e977f(0x153)+_0x16e951[_0x2e977f(0x285)]+'/unit/'+_0x16e951[_0x2e977f(0x27a)]+_0x2e977f(0x313);return(await this[_0x2e977f(0x26a)][_0x2e977f(0x2c5)](_0x1f040a,{'params':{'resourceId':JSON[_0x2e977f(0x2db)](_0x16e951[_0x2e977f(0x172)])}}))[_0x2e977f(0x229)];}['saveSnapshot'](){throw new Error('This\x20method\x20should\x20not\x20be\x20called\x20on\x20the\x20client\x20side!');}[_0x35406f(0x34f)](){throw new Error('This\x20method\x20should\x20not\x20be\x20called\x20on\x20the\x20client\x20side!');}['saveSheetBlock'](){throw new Error('This\x20method\x20should\x20not\x20be\x20called\x20on\x20the\x20client\x20side!');}['saveChangeset'](){throw new Error('This\x20method\x20should\x20not\x20be\x20called\x20on\x20the\x20client\x20side!');}[_0x35406f(0x312)](){throw new Error('This\x20method\x20should\x20not\x20be\x20called\x20on\x20the\x20client\x20side!');}['getLatestCsReqIdBySid'](){const _0x43e5bc=_0x35406f;throw new Error(_0x43e5bc(0x2ab));}};SnapshotServerOverHTTPService=__decorate([__decorateParam(0x0,_univerjs_core['IConfigService']),__decorateParam(0x1,(0x0,_univerjs_core[_0x35406f(0x33b)])(_univerjs_network['HTTPService']))],SnapshotServerOverHTTPService);let CollaborativeUndoRedoService=class CollaborativeUndoRedoService extends _univerjs_core[_0x35406f(0x121)]{constructor(_0x2fe02c,_0x10d77a,_0x2ff7e6,_0x58eb20,_0x2c2eb7){const _0x266b99=_0x35406f;super(_0x2fe02c,_0x10d77a,_0x2ff7e6),this['_transformService']=_0x58eb20,this[_0x266b99(0x3ae)]=_0x2c2eb7;}[_0x35406f(0x27d)](_0x146998,_0x3fbc07){const _0x243440=_0x35406f,_0xc415aa=this[_0x243440(0x27e)](_0x146998);if(_0xc415aa)try{const _0xca7528=this[_0x243440(0x2fc)](_0xc415aa,_0x3fbc07);this[_0x243440(0x339)](_0x146998,_0xca7528);}catch(_0x31007e){this[_0x243440(0x3ae)]['error'](_0x243440(0x352),_0x31007e),this[_0x243440(0x140)](_0x146998);}const _0x2375cb=this[_0x243440(0x2ff)](_0x146998);if(_0x2375cb)try{const _0x4f21c8=this['_transformStack'](_0x2375cb,_0x3fbc07);this[_0x243440(0x1e5)](_0x146998,_0x4f21c8);}catch(_0x46237a){this['_logService']['error'](_0x46237a),this[_0x243440(0x15d)](_0x146998);}}[_0x35406f(0x140)](_0x21b075){const _0x4777b8=_0x35406f,_0x37d429=this[_0x4777b8(0x27e)](_0x21b075);_0x37d429&&(_0x37d429[_0x4777b8(0x332)]=0x0,this[_0x4777b8(0x2d8)]());}[_0x35406f(0x15d)](_0x5aa9fe){const _0x31abf4=_0x35406f,_0x21ad29=this['_getRedoStack'](_0x5aa9fe);_0x21ad29&&(_0x21ad29[_0x31abf4(0x332)]=0x0,this['_updateStatus']());}[_0x35406f(0x339)](_0x5cc7df,_0x5e1314){const _0x52eaad=_0x35406f;this['_undoStacks']['set'](_0x5cc7df,_0x5e1314),this[_0x52eaad(0x2d8)]();}[_0x35406f(0x1e5)](_0x1c5faa,_0x3960e2){const _0x563318=_0x35406f;this['_redoStacks'][_0x563318(0x1dc)](_0x1c5faa,_0x3960e2),this[_0x563318(0x2d8)]();}[_0x35406f(0x2fc)](_0x242f26,_0x30a9fe){const _0x573a38=_0x35406f,_0x251d88=[];let _0x1a1b09=_0x30a9fe,_0x43c53f=_0x30a9fe;for(let _0x3ddb45=_0x242f26[_0x573a38(0x332)]-0x1;_0x3ddb45>=0x0;_0x3ddb45--){const {unitID:_0x292b69,undoMutations:_0x32df0c,redoMutations:_0x567bdb}=_0x242f26[_0x3ddb45],_0x1de64f=this[_0x573a38(0x300)][_0x573a38(0x23f)](_0x1a1b09,_0x32df0c),_0x1dd052=this[_0x573a38(0x300)][_0x573a38(0x23f)](_0x43c53f,_0x567bdb);if((0x0,_univerjs_pro_collaboration['isTransformMutationsWithChangesetFailure'])(_0x1de64f)||(0x0,_univerjs_pro_collaboration[_0x573a38(0x31a)])(_0x1dd052)){this[_0x573a38(0x3ae)][_0x573a38(0x34c)](_0x573a38(0x352),_0x573a38(0x219),_0x1de64f,_0x1dd052);break;}_0x1a1b09=_0x1de64f[_0x573a38(0x302)],_0x43c53f=_0x1dd052[_0x573a38(0x302)],_0x251d88[_0x573a38(0x17b)]({'unitID':_0x292b69,'undoMutations':_0x1de64f[_0x573a38(0x1d6)],'redoMutations':_0x1dd052[_0x573a38(0x1d6)]});}return _0x251d88[_0x573a38(0x222)]();}};CollaborativeUndoRedoService=__decorate([__decorateParam(0x0,_univerjs_core['IUniverInstanceService']),__decorateParam(0x1,_univerjs_core[_0x35406f(0x10d)]),__decorateParam(0x2,_univerjs_core['IContextService']),__decorateParam(0x3,_univerjs_pro_collaboration[_0x35406f(0x308)]),__decorateParam(0x4,_univerjs_core[_0x35406f(0x33e)])],CollaborativeUndoRedoService);let UniverCollaborationClientPlugin=class UniverCollaborationClientPlugin extends _univerjs_core[_0x35406f(0x321)]{constructor(_0x5af138={},_0x3ce254,_0x5c9d3a,_0x5af684){const _0x3abd05=_0x35406f;super(),this[_0x3abd05(0x3cb)]=_0x5af138,this[_0x3abd05(0x3ae)]=_0x3ce254,this[_0x3abd05(0x157)]=_0x5c9d3a,this[_0x3abd05(0x279)]=_0x5af684;const {..._0x59aee9}=(0x0,_univerjs_core[_0x3abd05(0x218)])({},defaultPluginConfig,_0x5af138);if(!_0x59aee9[_0x3abd05(0x385)])throw new Error(_0x3abd05(0x141));this['_config']=_0x59aee9,this[_0x3abd05(0x279)][_0x3abd05(0x193)](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY,_0x59aee9);}['onStarting'](){const _0x365f32=_0x35406f;this[_0x365f32(0x223)](),this[_0x365f32(0x187)]();}[_0x35406f(0x223)](){const _0x5d01da=_0x35406f;var _0x6f9173,_0x1422ed;if(this[_0x5d01da(0x157)][_0x5d01da(0x3d5)](_univerjs_core[_0x5d01da(0x207)]))this['_logService'][_0x5d01da(0x34c)]('[UniverCollaborationClientPlugin]',_0x5d01da(0x28a));const _0x1fe102=(0x0,_univerjs_core[_0x5d01da(0x2ae)])([[_univerjs_core[_0x5d01da(0x207)],{'useClass':CollaborativeUndoRedoService}],[CollaborationSessionService],[MemberService],[SheetTransformSelectionsService],[AuthServerService],[DomainRequestService],[CommentService],[PermissionService],[CollaborationUIEventService],[DataLoaderService],[ICollaborationSocketService,{'useClass':this[_0x5d01da(0x3cb)][_0x5d01da(0x385)]}],[_univerjs_pro_collaboration[_0x5d01da(0x2a7)],{'useClass':SnapshotServerOverHTTPService}],[_univerjs_core[_0x5d01da(0x286)],{'useClass':AuthzIoHttpService}],[_univerjs_drawing[_0x5d01da(0x326)],{'useClass':CollaborationImageIoService}],[_univerjs_core[_0x5d01da(0x3a0)],{'useClass':MentionIoHttpService}],[CollaborationController],[FileNameController]],(_0x6f9173=this[_0x5d01da(0x3cb)])===null||_0x6f9173===void 0x0?void 0x0:_0x6f9173[_0x5d01da(0x198)]);if(!((_0x1422ed=this[_0x5d01da(0x3cb)])===null||_0x1422ed===void 0x0?void 0x0:_0x1422ed[_0x5d01da(0x1d7)])){const _0x373afb=_0x1fe102[_0x5d01da(0x28e)](([_0x51513c])=>_0x51513c===ISingleActiveUnitService);if(_0x373afb!==-0x1)_0x1fe102['splice'](_0x373afb,0x1);}(0x0,_univerjs_core[_0x5d01da(0x396)])(this[_0x5d01da(0x157)],_0x1fe102);}['_initDependencies'](){const _0x47475e=_0x35406f;var _0x156971,_0x1bb86f;this[_0x47475e(0x157)][_0x47475e(0x2c5)](_univerjs_network['HTTPService'])[_0x47475e(0x1a2)]({'priority':0x14,'interceptor':(0x0,_univerjs_network[_0x47475e(0x16e)])({'maxParallel':0x6})});if(!((_0x156971=this['_config'])===null||_0x156971===void 0x0?void 0x0:_0x156971[_0x47475e(0x325)])){var _0x438ce2;(_0x438ce2=this[_0x47475e(0x157)][_0x47475e(0x2c5)](ILocalCacheService,_univerjs_core['Quantity'][_0x47475e(0x34b)]))===null||_0x438ce2===void 0x0||_0x438ce2[_0x47475e(0x24a)]();}if((_0x1bb86f=this['_config'])===null||_0x1bb86f===void 0x0?void 0x0:_0x1bb86f[_0x47475e(0x20a)])(0x0,_univerjs_core[_0x47475e(0x156)])(this[_0x47475e(0x157)],[[AuthServerService]]);(0x0,_univerjs_core[_0x47475e(0x156)])(this['_injector'],[[DomainRequestService],[CollaborationController],[PermissionService]]);}};function _0x4d20(_0x22b29f,_0x127a3c){_0x22b29f=_0x22b29f-0xf9;const _0x2fc44c=_0x2fc4();let _0x4d203e=_0x2fc44c[_0x22b29f];return _0x4d203e;}_defineProperty(UniverCollaborationClientPlugin,_0x35406f(0x394),_0x35406f(0x2fa)),_defineProperty(UniverCollaborationClientPlugin,_0x35406f(0x1fc),name),_defineProperty(UniverCollaborationClientPlugin,_0x35406f(0x200),version),UniverCollaborationClientPlugin=__decorate([(0x0,_univerjs_core[_0x35406f(0x1eb)])(_univerjs_pro_license['UniverLicensePlugin'],_univerjs_pro_collaboration[_0x35406f(0x125)],_univerjs_network['UniverNetworkPlugin']),__decorateParam(0x1,_univerjs_core[_0x35406f(0x33e)]),__decorateParam(0x2,(0x0,_univerjs_core['Inject'])(_univerjs_core[_0x35406f(0x2f9)])),__decorateParam(0x3,_univerjs_core[_0x35406f(0x196)])],UniverCollaborationClientPlugin),Object[_0x35406f(0x105)](exports,_0x35406f(0x26c),{'enumerable':!![],'get':function(){return AuthzIoHttpService;}}),Object[_0x35406f(0x105)](exports,_0x35406f(0x359),{'enumerable':!![],'get':function(){return AwaitingState;}}),Object[_0x35406f(0x105)](exports,_0x35406f(0x1ca),{'enumerable':!![],'get':function(){return AwaitingWithPendingState;}}),exports[_0x35406f(0x170)]=COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY,Object[_0x35406f(0x105)](exports,'CollaborationController',{'enumerable':!![],'get':function(){return CollaborationController;}}),Object['defineProperty'](exports,'CollaborationEntity',{'enumerable':!![],'get':function(){return CollaborationEntity;}}),Object[_0x35406f(0x105)](exports,_0x35406f(0x3b9),{'enumerable':!![],'get':function(){return CollaborationImageIoService;}}),Object['defineProperty'](exports,_0x35406f(0x295),{'enumerable':!![],'get':function(){return CollaborationSession;}}),Object[_0x35406f(0x105)](exports,_0x35406f(0x2ea),{'enumerable':!![],'get':function(){return CollaborationSessionService;}}),Object['defineProperty'](exports,_0x35406f(0x126),{'enumerable':!![],'get':function(){return CollaborationSocketService;}}),exports[_0x35406f(0x20e)]=CollaborationStatus,exports[_0x35406f(0x26f)]=CollaborationUIEventId,exports['CollaborationUIEventService']=CollaborationUIEventService,Object['defineProperty'](exports,_0x35406f(0x235),{'enumerable':!![],'get':function(){return CollaborativeUndoRedoService;}}),exports[_0x35406f(0x253)]=CommentService,Object[_0x35406f(0x105)](exports,_0x35406f(0x361),{'enumerable':!![],'get':function(){return ConflictState;}}),exports['DEFAULT_COLLAB_WEB_SOCKET_URL']=DEFAULT_COLLAB_WEB_SOCKET_URL,exports['DEFAULT_REMOTE_UNISCRIPT_EXECUTION_ENDPOINT']=DEFAULT_REMOTE_UNISCRIPT_EXECUTION_ENDPOINT,exports[_0x35406f(0x348)]=DEFAULT_WS_SESSION_TICKET_URL,Object[_0x35406f(0x105)](exports,_0x35406f(0x3a7),{'enumerable':!![],'get':function(){return DataLoaderService;}}),Object[_0x35406f(0x105)](exports,'DocCollaborationEntity',{'enumerable':!![],'get':function(){return DocCollaborationEntity;}}),Object[_0x35406f(0x105)](exports,_0x35406f(0x261),{'enumerable':!![],'get':function(){return FetchingMissState;}}),exports[_0x35406f(0x36a)]=HEARTBEAT_INTERVAL_KEY,exports['HEARTBEAT_TIMEOUT_KEY']=HEARTBEAT_TIMEOUT_KEY,exports[_0x35406f(0x379)]=ICollaborationSocketService,exports[_0x35406f(0x22e)]=ILocalCacheService,exports['INetworkConditionService']=INetworkConditionService,exports[_0x35406f(0x29d)]=ISingleActiveUnitService,exports[_0x35406f(0x366)]=LOCAL_CACHE_INTERVAL,exports['LOCAL_CACHE_INTERVAL_KEY']=LOCAL_CACHE_INTERVAL_KEY,Object[_0x35406f(0x105)](exports,_0x35406f(0x17f),{'enumerable':!![],'get':function(){return MemberService;}}),Object['defineProperty'](exports,_0x35406f(0x3c0),{'enumerable':!![],'get':function(){return MentionIoHttpService;}}),Object[_0x35406f(0x105)](exports,_0x35406f(0x226),{'enumerable':!![],'get':function(){return OfflineState;}}),Object[_0x35406f(0x105)](exports,'PendingState',{'enumerable':!![],'get':function(){return PendingState;}}),exports[_0x35406f(0x323)]=REMOTE_UNISCRIPT_EXECUTION_ENDPOINT_KEY,exports[_0x35406f(0x1d4)]=RETRY_CONNECTING_MAX_COUNT_KEY,exports[_0x35406f(0x3a2)]=SessionStatus,Object[_0x35406f(0x105)](exports,_0x35406f(0x12e),{'enumerable':!![],'get':function(){return SheetCollaborationEntity;}}),Object['defineProperty'](exports,_0x35406f(0x3aa),{'enumerable':!![],'get':function(){return SheetTransformSelectionsService;}}),Object[_0x35406f(0x105)](exports,_0x35406f(0x2dd),{'enumerable':!![],'get':function(){return SnapshotServerOverHTTPService;}}),Object['defineProperty'](exports,_0x35406f(0x2ee),{'enumerable':!![],'get':function(){return SyncedState;}}),exports['UnitStatus']=UnitStatus,Object['defineProperty'](exports,_0x35406f(0x1b6),{'enumerable':!![],'get':function(){return UniverCollaborationClientPlugin;}}),exports[_0x35406f(0x2cf)]=deserializeToCombResponse,exports[_0x35406f(0x14c)]=getLocalCacheKey,exports[_0x35406f(0x15f)]=serializeCombRequest;
|
|
1
|
+
const _0x54582d=_0x598e;(function(_0x5cb07d,_0x17865f){const _0x205cea=_0x598e,_0x4880e2=_0x5cb07d();while(!![]){try{const _0x24e8cc=-parseInt(_0x205cea(0x376))/0x1*(-parseInt(_0x205cea(0x1a8))/0x2)+-parseInt(_0x205cea(0x213))/0x3*(-parseInt(_0x205cea(0x295))/0x4)+-parseInt(_0x205cea(0x2bc))/0x5*(parseInt(_0x205cea(0x3e5))/0x6)+parseInt(_0x205cea(0x19b))/0x7*(-parseInt(_0x205cea(0x1e9))/0x8)+-parseInt(_0x205cea(0x29f))/0x9+-parseInt(_0x205cea(0x23b))/0xa+parseInt(_0x205cea(0x2fc))/0xb;if(_0x24e8cc===_0x17865f)break;else _0x4880e2['push'](_0x4880e2['shift']());}catch(_0xa8b755){_0x4880e2['push'](_0x4880e2['shift']());}}}(_0x1fa5,0x76997),Object[_0x54582d(0x2c9)](exports,Symbol[_0x54582d(0x1e6)],{'value':'Module'}));let _univerjs_pro_collaboration=require('@univerjs-pro/collaboration'),_univerjs_core=require('@univerjs/core'),_univerjs_docs=require('@univerjs/docs'),_univerjs_sheets=require('@univerjs/sheets'),rxjs=require('rxjs'),_univerjs_protocol=require('@univerjs/protocol'),_univerjs_telemetry=require('@univerjs/telemetry'),rxjs_operators=require('rxjs/operators'),_univerjs_network=require('@univerjs/network'),_univerjs_pro_license=require('@univerjs-pro/license'),_univerjs_drawing=require('@univerjs/drawing'),_noble_ciphers_aes_js=require('@noble/ciphers/aes.js'),_noble_ciphers_utils_js=require('@noble/ciphers/utils.js');const DEFAULT_SNAPSHOT_SERVER_URL='/universer-api/snapshot',SNAPSHOT_URL_KEY='SNAPSHOT_URL_KEY',DEFAULT_SEND_CHANGESET_TIMEOUT=0x7d0,DEFAULT_COLLAB_WEB_SOCKET_URL=_0x54582d(0x27c),DEFAULT_WS_SESSION_TICKET_URL='/universer-api/user/session-ticket',HEARTBEAT_INTERVAL_KEY=_0x54582d(0x20e),DEFAULT_HEARTBEAT_INTERVAL=0x7530,HEARTBEAT_TIMEOUT_KEY=_0x54582d(0x47b),DEFAULT_HEARTBEAT_TIMEOUT=0x4e20,DEFAULT_RETRY_CONNECTING_INTERVAL=0x4e20,RETRY_CONNECTING_MAX_COUNT_KEY=_0x54582d(0x1ba),LOCAL_CACHE_INTERVAL_KEY=_0x54582d(0x28c),LOCAL_CACHE_INTERVAL=0x3e8,DEFAULT_COLLAB_SUBMIT_CHANGESET_URL=_0x54582d(0x256),DEFAULT_LOGIN_URL='/universer-api/oidc/authpage',REMOTE_UNISCRIPT_EXECUTION_ENDPOINT_KEY=_0x54582d(0x229),DEFAULT_REMOTE_UNISCRIPT_EXECUTION_ENDPOINT='/universer-api/uniscript',TELEMETRY_COLLABORATION_NEW_CHANGESET=_0x54582d(0x2fe);function summaryChangesetSize(_0x33f7ef){const _0x2f8fc2=_0x54582d;return JSON[_0x2f8fc2(0x276)](_0x33f7ef)[_0x2f8fc2(0x473)];}function _typeof(_0x1403b4){'@babel/helpers - typeof';const _0x44e3a3=_0x54582d;return _typeof=_0x44e3a3(0x470)==typeof Symbol&&'symbol'==typeof Symbol['iterator']?function(_0x4af1e6){return typeof _0x4af1e6;}:function(_0x15cb16){const _0x18f6b0=_0x44e3a3;return _0x15cb16&&_0x18f6b0(0x470)==typeof Symbol&&_0x15cb16['constructor']===Symbol&&_0x15cb16!==Symbol['prototype']?_0x18f6b0(0x31f):typeof _0x15cb16;},_typeof(_0x1403b4);}function toPrimitive(_0x40cec6,_0x4e6f8f){const _0x401b63=_0x54582d;if(_0x401b63(0x1d4)!=_typeof(_0x40cec6)||!_0x40cec6)return _0x40cec6;var _0x55245b=_0x40cec6[Symbol['toPrimitive']];if(void 0x0!==_0x55245b){var _0x2db3bd=_0x55245b[_0x401b63(0x46d)](_0x40cec6,_0x4e6f8f||_0x401b63(0x445));if(_0x401b63(0x1d4)!=_typeof(_0x2db3bd))return _0x2db3bd;throw new TypeError(_0x401b63(0x37e));}return(_0x401b63(0x293)===_0x4e6f8f?String:Number)(_0x40cec6);}function toPropertyKey(_0x2dd114){const _0x531859=_0x54582d;var _0x17c510=toPrimitive(_0x2dd114,_0x531859(0x293));return _0x531859(0x31f)==_typeof(_0x17c510)?_0x17c510:_0x17c510+'';}function _defineProperty(_0x3312b7,_0x146c96,_0x1222df){const _0x27b413=_0x54582d;return(_0x146c96=toPropertyKey(_0x146c96))in _0x3312b7?Object[_0x27b413(0x2c9)](_0x3312b7,_0x146c96,{'value':_0x1222df,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x3312b7[_0x146c96]=_0x1222df,_0x3312b7;}let CollaborationUIEventId=function(_0x44d568){const _0x42186a=_0x54582d;return _0x44d568[_0x42186a(0x2ac)]=_0x42186a(0x2ac),_0x44d568['PERMISSION_DENIED']=_0x42186a(0x19e),_0x44d568[_0x42186a(0x397)]=_0x42186a(0x397),_0x44d568[_0x42186a(0x317)]=_0x42186a(0x317),_0x44d568[_0x42186a(0x233)]=_0x42186a(0x233),_0x44d568['SOCKET_FAILED_RETRY']=_0x42186a(0x237),_0x44d568['SOCKET_FAILED']='SOCKET_FAILED',_0x44d568[_0x42186a(0x270)]=_0x42186a(0x270),_0x44d568;}({});var CollaborationUIEventService=class{constructor(){const _0x52f679=_0x54582d;_defineProperty(this,_0x52f679(0x3bf),new rxjs[(_0x52f679(0x263))]()),_defineProperty(this,_0x52f679(0x2f4),this[_0x52f679(0x3bf)]['asObservable']());}[_0x54582d(0x19d)](_0x5d1dd2){const _0x5129c3=_0x54582d;this[_0x5129c3(0x3bf)][_0x5129c3(0x22a)](_0x5d1dd2);}},CommentService=class{constructor(){const _0x9ab014=_0x54582d;_defineProperty(this,_0x9ab014(0x285),new rxjs['Subject']()),_defineProperty(this,_0x9ab014(0x351),this[_0x9ab014(0x285)]['asObservable']());}[_0x54582d(0x2a0)](_0xf31938){const _0x333ee3=_0x54582d;this[_0x333ee3(0x285)][_0x333ee3(0x22a)](_0xf31938);}};function __decorateParam(_0x545c09,_0x5e45b4){return function(_0x49b08b,_0x33cc18){_0x5e45b4(_0x49b08b,_0x33cc18,_0x545c09);};}function __decorate(_0xc3fffb,_0x5e23fb,_0x296f13,_0x570764){const _0x1e26a9=_0x54582d;var _0x5a4c0a=arguments[_0x1e26a9(0x473)],_0x11dc0e=_0x5a4c0a<0x3?_0x5e23fb:_0x570764===null?_0x570764=Object[_0x1e26a9(0x2d3)](_0x5e23fb,_0x296f13):_0x570764,_0x2f74ec;if(typeof Reflect==='object'&&typeof Reflect[_0x1e26a9(0x24b)]===_0x1e26a9(0x470))_0x11dc0e=Reflect[_0x1e26a9(0x24b)](_0xc3fffb,_0x5e23fb,_0x296f13,_0x570764);else{for(var _0x51862c=_0xc3fffb[_0x1e26a9(0x473)]-0x1;_0x51862c>=0x0;_0x51862c--)if(_0x2f74ec=_0xc3fffb[_0x51862c])_0x11dc0e=(_0x5a4c0a<0x3?_0x2f74ec(_0x11dc0e):_0x5a4c0a>0x3?_0x2f74ec(_0x5e23fb,_0x296f13,_0x11dc0e):_0x2f74ec(_0x5e23fb,_0x296f13))||_0x11dc0e;}return _0x5a4c0a>0x3&&_0x11dc0e&&Object[_0x1e26a9(0x2c9)](_0x5e23fb,_0x296f13,_0x11dc0e),_0x11dc0e;}let MemberService=class MemberService extends _univerjs_core[_0x54582d(0x412)]{constructor(_0x1cfd54,_0x5bb2b5){const _0x1d4b22=_0x54582d;super(),this[_0x1d4b22(0x46c)]=_0x1cfd54,this['_userManagerService']=_0x5bb2b5,_defineProperty(this,_0x1d4b22(0x3b8),new Map()),_defineProperty(this,_0x1d4b22(0x238),new rxjs[(_0x1d4b22(0x263))]()),this[_0x1d4b22(0x47f)]((0x0,rxjs['merge'])(this['_univerInstanceService']['getTypeOfUnitDisposed$'](_univerjs_core['UniverInstanceType'][_0x1d4b22(0x1f9)])[_0x1d4b22(0x197)]((0x0,rxjs_operators['map'])(_0x492fcc=>_0x492fcc[_0x1d4b22(0x27f)]())),this['_univerInstanceService'][_0x1d4b22(0x1ed)](_univerjs_core[_0x1d4b22(0x2fd)][_0x1d4b22(0x2e6)])[_0x1d4b22(0x197)]((0x0,rxjs_operators[_0x1d4b22(0x2b9)])(_0x534858=>_0x534858[_0x1d4b22(0x27f)]())))[_0x1d4b22(0x1c3)](_0x5e85fb=>this['_removeRoom'](_0x5e85fb)));}[_0x54582d(0x3d5)](_0x479c39){const _0xc0b45d=_0x54582d;if(this[_0xc0b45d(0x3b8)]['has'](_0x479c39))return(0x0,rxjs['of'])(this[_0xc0b45d(0x3b8)][_0xc0b45d(0x2c8)](_0x479c39));return this[_0xc0b45d(0x238)][_0xc0b45d(0x197)]((0x0,rxjs_operators[_0xc0b45d(0x2b9)])(_0x1de0e7=>{const _0x5675c6=_0xc0b45d;if(_0x1de0e7===_0x479c39)return this[_0x5675c6(0x3b8)][_0x5675c6(0x2c8)](_0x1de0e7);}));}[_0x54582d(0x3e7)](_0x4a4bf4){const _0xa511f7=_0x54582d;this['_userManagerService'][_0xa511f7(0x3e7)](_0x4a4bf4);}['getCurrentUser'](){return this['_userManagerService']['getCurrentUser']();}[_0x54582d(0x2bd)](_0x222488,_0x4b2085){const _0x2dcf35=_0x54582d;let _0x23f6b3=this['_roomMembers'][_0x2dcf35(0x2c8)](_0x222488);!_0x23f6b3&&(_0x23f6b3=new RoomMember(),this[_0x2dcf35(0x3b8)]['set'](_0x222488,_0x23f6b3),this[_0x2dcf35(0x238)][_0x2dcf35(0x22a)](_0x222488)),_0x23f6b3[_0x2dcf35(0x2bd)](_0x4b2085);}[_0x54582d(0x3a5)](_0x24376c,_0x6f08cc){const _0x40ddb9=_0x54582d,_0x188749=this[_0x40ddb9(0x3b8)][_0x40ddb9(0x2c8)](_0x24376c);if(_0x188749)_0x188749[_0x40ddb9(0x3a5)](_0x6f08cc);}['getRoom'](_0x3db307){const _0xeaa05e=_0x54582d;return this[_0xeaa05e(0x3b8)]['get'](_0x3db307);}['getMember'](_0x40606a,_0x411b35){const _0x2f4526=_0x54582d,_0x27b158=this[_0x2f4526(0x3b8)]['get'](_0x40606a);if(_0x27b158)return _0x27b158[_0x2f4526(0x449)](_0x411b35);}[_0x54582d(0x338)](_0x3d4a20){const _0x2d1a1a=_0x54582d,_0x36cf2e=this[_0x2d1a1a(0x3b8)][_0x2d1a1a(0x2c8)](_0x3d4a20);_0x36cf2e&&(_0x36cf2e['dispose'](),this[_0x2d1a1a(0x3b8)][_0x2d1a1a(0x43a)](_0x3d4a20));}[_0x54582d(0x27d)](){const _0x5444cb=_0x54582d;this['_roomMembers']['forEach'](_0x3f8fcf=>_0x3f8fcf[_0x5444cb(0x27d)]()),this[_0x5444cb(0x3b8)][_0x5444cb(0x2c0)](),this[_0x5444cb(0x238)][_0x5444cb(0x3e4)]();}};MemberService=__decorate([__decorateParam(0x0,_univerjs_core[_0x54582d(0x3f4)]),__decorateParam(0x1,(0x0,_univerjs_core['Inject'])(_univerjs_core['UserManagerService']))],MemberService);var RoomMember=class extends _univerjs_core[_0x54582d(0x412)]{constructor(..._0x581af6){const _0x4920e0=_0x54582d;super(..._0x581af6),_defineProperty(this,_0x4920e0(0x3cf),new Map()),_defineProperty(this,'_members$',new rxjs['BehaviorSubject'](this[_0x4920e0(0x3cf)])),_defineProperty(this,_0x4920e0(0x2fa),this[_0x4920e0(0x228)][_0x4920e0(0x2a1)]());}['dispose'](){const _0x2a036a=_0x54582d;this[_0x2a036a(0x3cf)][_0x2a036a(0x2c0)](),this[_0x2a036a(0x228)]['complete']();}['updateMember'](_0x416033){const _0x5072c8=_0x54582d;this[_0x5072c8(0x3cf)][_0x5072c8(0x298)](_0x416033[_0x5072c8(0x46b)],_0x416033),this['_emitMembers']();}[_0x54582d(0x3a5)](_0x4cae26){const _0x5af025=_0x54582d;this[_0x5af025(0x3cf)][_0x5af025(0x43a)](_0x4cae26),this[_0x5af025(0x222)]();}[_0x54582d(0x449)](_0x3f8c5b){const _0x4878de=_0x54582d;return this[_0x4878de(0x3cf)][_0x4878de(0x2c8)](_0x3f8c5b);}[_0x54582d(0x415)](){const _0x363143=_0x54582d;return Array[_0x363143(0x262)](this[_0x363143(0x3cf)][_0x363143(0x3f2)]());}[_0x54582d(0x222)](){const _0x124d35=_0x54582d;this['_members$'][_0x124d35(0x22a)](this[_0x124d35(0x3cf)]);}};let SessionStatus=function(_0x47312e){const _0x123b2d=_0x54582d;return _0x47312e[_0x47312e['IDLE']=0x0]=_0x123b2d(0x1a2),_0x47312e[_0x47312e[_0x123b2d(0x3cd)]=0x1]=_0x123b2d(0x3cd),_0x47312e[_0x47312e[_0x123b2d(0x391)]=0x2]=_0x123b2d(0x391),_0x47312e[_0x47312e[_0x123b2d(0x2bb)]=0x3]='ONLINE',_0x47312e;}({});const FailedReason={[_univerjs_protocol[_0x54582d(0x411)][_0x54582d(0x1e0)]]:_0x54582d(0x396),[_univerjs_protocol[_0x54582d(0x411)][_0x54582d(0x3fb)]]:'session.room-full',[_univerjs_protocol[_0x54582d(0x411)][_0x54582d(0x2d0)]]:_0x54582d(0x272),[_univerjs_protocol[_0x54582d(0x411)]['JOIN_ROOM_PERMISSION_DENIED']]:_0x54582d(0x394),[_univerjs_protocol[_0x54582d(0x411)][_0x54582d(0x3f6)]]:_0x54582d(0x2e5)};let CollaborationSession=class CollaborationSession extends _univerjs_core[_0x54582d(0x21c)]{get[_0x54582d(0x1b8)](){const _0x3e3131=_0x54582d;return this[_0x3e3131(0x3ce)]['getValue']();}constructor(_0x4274e4,_0x498440,_0x23b78b,_0x154c12,_0xce7422,_0x22e4bc,_0x438d2c,_0x2e0b2a){const _0x38eb47=_0x54582d;super(),this[_0x38eb47(0x434)]=_0x4274e4,this[_0x38eb47(0x469)]=_0x23b78b,this[_0x38eb47(0x345)]=_0x154c12,this[_0x38eb47(0x24a)]=_0xce7422,this['_commentService']=_0x22e4bc,this[_0x38eb47(0x350)]=_0x438d2c,this[_0x38eb47(0x335)]=_0x2e0b2a,_defineProperty(this,_0x38eb47(0x3ce),new rxjs[(_0x38eb47(0x3c7))](SessionStatus['IDLE'])),_defineProperty(this,'sessionStatus$',this[_0x38eb47(0x3ce)][_0x38eb47(0x2a1)]()),_defineProperty(this,_0x38eb47(0x3bf),new rxjs['Subject']()),_defineProperty(this,_0x38eb47(0x2f4),this[_0x38eb47(0x3bf)]['asObservable']()),_defineProperty(this,_0x38eb47(0x21f),void 0x0),_defineProperty(this,_0x38eb47(0x30a),void 0x0),_defineProperty(this,_0x38eb47(0x365),void 0x0),_defineProperty(this,_0x38eb47(0x3bc),![]),_defineProperty(this,_0x38eb47(0x458),null),this[_0x38eb47(0x3bc)]=!!this[_0x38eb47(0x335)],_0x498440[_0x38eb47(0x197)]((0x0,rxjs[_0x38eb47(0x324)])(this[_0x38eb47(0x3d9)]))[_0x38eb47(0x1c3)](_0x5d7fcd=>{const _0xe14fdd=_0x38eb47;if(typeof _0x5d7fcd===_0xe14fdd(0x2bf))return;this[_0xe14fdd(0x21f)]=_0x5d7fcd;if(_0x5d7fcd)this[_0xe14fdd(0x40e)](_0x5d7fcd),this[_0xe14fdd(0x30a)]=_0x5d7fcd[_0xe14fdd(0x432)][_0xe14fdd(0x1c3)](_0x2fc8d2=>{const _0x227265=_0xe14fdd;if(_0x2fc8d2[_0x227265(0x246)]!==this[_0x227265(0x434)])return;this[_0x227265(0x39b)](_0x2fc8d2);});else{var _0x3e4306;this[_0xe14fdd(0x3e8)](),this['_sessionStatus$'][_0xe14fdd(0x22a)](SessionStatus[_0xe14fdd(0x391)]),(_0x3e4306=this[_0xe14fdd(0x30a)])===null||_0x3e4306===void 0x0||_0x3e4306['unsubscribe'](),this['_socketMessageSubscription']=null;}});}[_0x54582d(0x1ad)](){const _0x1e88fa=_0x54582d;var _0x232355,_0x4bd826;return(_0x232355=(_0x4bd826=this[_0x1e88fa(0x21f)])===null||_0x4bd826===void 0x0?void 0x0:_0x4bd826[_0x1e88fa(0x46b)])!==null&&_0x232355!==void 0x0?_0x232355:null;}[_0x54582d(0x27d)](){const _0x3eb33a=_0x54582d;super[_0x3eb33a(0x27d)](),this[_0x3eb33a(0x37b)](),this['dispose$'][_0x3eb33a(0x22a)](),this[_0x3eb33a(0x3d9)][_0x3eb33a(0x3e4)]();}[_0x54582d(0x37b)](){const _0xb78bc=_0x54582d;var _0x4a857f,_0x4ce7fd;this[_0xb78bc(0x3e8)](),(_0x4a857f=this[_0xb78bc(0x21f)])===null||_0x4a857f===void 0x0||_0x4a857f[_0xb78bc(0x476)]({'cmd':_univerjs_protocol['CombCmd'][_0xb78bc(0x31b)],'data':{'roomID':this['_unitID']}}),(_0x4ce7fd=this[_0xb78bc(0x21f)])===null||_0x4ce7fd===void 0x0||_0x4ce7fd['close'](),this[_0xb78bc(0x3bf)][_0xb78bc(0x3e4)](),this[_0xb78bc(0x3ce)][_0xb78bc(0x3e4)]();}['_onCombEvent'](_0x2e9ea4){const _0x2a1046=_0x54582d;if(_0x2e9ea4[_0x2a1046(0x435)]===_univerjs_protocol[_0x2a1046(0x36f)][_0x2a1046(0x303)])this[_0x2a1046(0x30f)](_0x2e9ea4);else{if(_0x2e9ea4[_0x2a1046(0x435)]===_univerjs_protocol[_0x2a1046(0x36f)][_0x2a1046(0x464)])this[_0x2a1046(0x3c9)](_0x2e9ea4);}}[_0x54582d(0x40e)](_0x130142){const _0x51f228=_0x54582d;this['_sessionStatus$'][_0x51f228(0x22a)](SessionStatus['JOINING']),_0x130142['send']({'cmd':_univerjs_protocol[_0x51f228(0x36f)][_0x51f228(0x303)],'routeKey':this[_0x51f228(0x434)],'routeType':'','data':{'rooms':[{'roomID':this[_0x51f228(0x434)]}]}});}[_0x54582d(0x30f)](_0x10e60a){const _0x4c4351=_0x54582d;var _0x3c729a;if(_0x10e60a[_0x4c4351(0x1bf)]in FailedReason){this[_0x4c4351(0x350)][_0x4c4351(0x19d)]({'id':CollaborationUIEventId[_0x4c4351(0x233)],'data':FailedReason[_0x10e60a['code']]}),this['_sessionStatus$'][_0x4c4351(0x22a)](SessionStatus['OFFLINE']);return;}this['_sessionStatus$']['next'](SessionStatus[_0x4c4351(0x2bb)]);const _0x439064=(_0x3c729a=_0x10e60a['data'][_0x4c4351(0x20d)][this[_0x4c4351(0x434)]])===null||_0x3c729a===void 0x0?void 0x0:_0x3c729a[_0x4c4351(0x3ea)];if(_0x439064)_0x439064[_0x4c4351(0x333)](_0x292dd9=>this[_0x4c4351(0x24a)]['updateMember'](this[_0x4c4351(0x434)],_0x292dd9));}[_0x54582d(0x3c9)](_0x141e4a){const _0x616b3b=_0x54582d;try{const _0x4cda1d=_0x141e4a[_0x616b3b(0x341)];switch(_0x4cda1d[_0x616b3b(0x206)]){case _univerjs_pro_collaboration['CollaborationEvent'][_0x616b3b(0x3ac)]:this['_onUserJoin'](_0x4cda1d),this[_0x616b3b(0x3bf)][_0x616b3b(0x22a)](_0x4cda1d);break;case _univerjs_pro_collaboration[_0x616b3b(0x439)][_0x616b3b(0x25e)]:this['_onUserLeave'](_0x4cda1d),this[_0x616b3b(0x3bf)]['next'](_0x4cda1d);break;case _univerjs_pro_collaboration[_0x616b3b(0x439)][_0x616b3b(0x408)]:case _univerjs_pro_collaboration['CollaborationEvent'][_0x616b3b(0x2e3)]:this[_0x616b3b(0x440)](),this[_0x616b3b(0x337)](),this['_event$'][_0x616b3b(0x22a)](_0x4cda1d);break;case _univerjs_pro_collaboration['CollaborationEvent']['MSG_FOR_ERROR']:this['_logService'][_0x616b3b(0x3e0)](_0x616b3b(0x3c6)+JSON[_0x616b3b(0x276)](_0x4cda1d)),this['_event$'][_0x616b3b(0x22a)](_0x4cda1d);break;case _univerjs_pro_collaboration[_0x616b3b(0x439)]['COMMENT_UPDATE']:this[_0x616b3b(0x1f3)]['onCommentUpdate'](_0x4cda1d[_0x616b3b(0x341)]),this[_0x616b3b(0x3bf)][_0x616b3b(0x22a)](_0x4cda1d);break;default:this['_event$'][_0x616b3b(0x22a)](_0x4cda1d);}}catch(_0xfd3d79){this[_0x616b3b(0x469)][_0x616b3b(0x3e0)](_0xfd3d79,_0x141e4a);}}[_0x54582d(0x390)](_0x275636){this['_memberService']['updateMember'](this['_unitID'],_0x275636['data']);}[_0x54582d(0x22b)](_0x22d055){const _0x2d885b=_0x54582d;this[_0x2d885b(0x24a)][_0x2d885b(0x3a5)](this[_0x2d885b(0x434)],_0x22d055[_0x2d885b(0x341)][_0x2d885b(0x46b)]);}async[_0x54582d(0x476)](_0x561ed5,_0x58945d){const _0x1cd318=_0x54582d;if(this[_0x1cd318(0x1b8)]!==SessionStatus[_0x1cd318(0x2bb)]||!this['_socket'])throw new Error(_0x1cd318(0x250));try{_0x561ed5[_0x1cd318(0x206)]===_univerjs_pro_collaboration[_0x1cd318(0x439)][_0x1cd318(0x452)]&&(this['_scheduleCollaborationTimeoutTimer'](),this['_startTelemetryCollaborationNewChangeset'](_0x561ed5)),this['_socket'][_0x1cd318(0x476)]({'cmd':_univerjs_protocol['CombCmd'][_0x1cd318(0x3c8)],'routeKey':_0x58945d,'routeType':'','data':_0x561ed5});}catch(_0x474aa5){this[_0x1cd318(0x469)]['error'](_0x474aa5);}}[_0x54582d(0x427)](){const _0x25e46e=_0x54582d;var _0x3fe913;this['_collaborationTimeoutTimer']=setTimeout(()=>{const _0x219309=_0x598e;this[_0x219309(0x365)]=null,this[_0x219309(0x350)][_0x219309(0x19d)]({'id':CollaborationUIEventId[_0x219309(0x270)]});},(_0x3fe913=this['_configService'][_0x25e46e(0x3de)](_0x25e46e(0x47b)))!==null&&_0x3fe913!==void 0x0?_0x3fe913:DEFAULT_HEARTBEAT_TIMEOUT);}['_clearCollaborationTimeoutTimer'](){const _0x59a229=_0x54582d;this['_collaborationTimeoutTimer']&&(clearTimeout(this[_0x59a229(0x365)]),this['_collaborationTimeoutTimer']=null);}[_0x54582d(0x331)](_0x2dbc35){const _0x1b85c7=_0x54582d;if(!this['_shouldReportTelemetry'])return;const {data:_0x111084}=_0x2dbc35,{unitID:_0x3a4811,changeset:_0x7e485}=_0x111084,{mutations:_0x2adbb7,type:_0x5549e4}=_0x7e485;this['_telemetryInfo']={'unitId':_0x3a4811,'type':_0x5549e4,'startTime':performance[_0x1b85c7(0x37d)](),'stopTime':0x0,'duration':0x0,'size':summaryChangesetSize(_0x2adbb7)};}['_stopTelemetryCollaborationNewChangeset'](){const _0x72e6a=_0x54582d;if(!this[_0x72e6a(0x3bc)])return;if(!this[_0x72e6a(0x458)]){this[_0x72e6a(0x469)][_0x72e6a(0x3e0)](_0x72e6a(0x2d4),_0x72e6a(0x35b));return;}this[_0x72e6a(0x458)][_0x72e6a(0x288)]=performance[_0x72e6a(0x37d)](),this[_0x72e6a(0x458)][_0x72e6a(0x3ee)]=this['_telemetryInfo'][_0x72e6a(0x288)]-this[_0x72e6a(0x458)][_0x72e6a(0x3f0)],this[_0x72e6a(0x335)][_0x72e6a(0x410)](TELEMETRY_COLLABORATION_NEW_CHANGESET,this[_0x72e6a(0x458)]),this[_0x72e6a(0x458)]=null;}[_0x54582d(0x3e8)](){this['_telemetryInfo']=null;}};CollaborationSession=__decorate([__decorateParam(0x2,_univerjs_core[_0x54582d(0x31e)]),__decorateParam(0x3,_univerjs_core[_0x54582d(0x29e)]),__decorateParam(0x4,(0x0,_univerjs_core[_0x54582d(0x205)])(MemberService)),__decorateParam(0x5,(0x0,_univerjs_core[_0x54582d(0x205)])(CommentService)),__decorateParam(0x6,(0x0,_univerjs_core[_0x54582d(0x205)])(CollaborationUIEventService)),__decorateParam(0x7,(0x0,_univerjs_core['Optional'])(_univerjs_telemetry[_0x54582d(0x34a)]))],CollaborationSession);const ILocalCacheService=(0x0,_univerjs_core[_0x54582d(0x1e1)])(_0x54582d(0x30e));function getLocalCacheKey(_0x49ebd8){const _0x5e8f5d=_0x54582d;return _0x5e8f5d(0x3e1)+_0x49ebd8;}function extractTargetFromFirstChangeset(_0x3ef1ae){const _0x254605=_0x54582d,{unitID:_0x11b3cd,mutations:_0x15795e}=_0x3ef1ae;return{'unitId':_0x11b3cd,'subUnitId':_0x15795e[_0x254605(0x473)]>0x0?_0x15795e[0x0][_0x254605(0x1c6)][_0x254605(0x1aa)]:null};}let SheetTransformSelectionsService=class SheetTransformSelectionsService{constructor(_0x595bbe,_0x40e88b,_0x145d79){const _0x716b1a=_0x54582d;this[_0x716b1a(0x42a)]=_0x595bbe,this['_transformService']=_0x40e88b,this[_0x716b1a(0x1c2)]=_0x145d79;}['transformSelections'](_0x51921f){const _0x9f9086=_0x54582d;var _0x122bc8,_0x2e71b4;const _0x49b5b2=this[_0x9f9086(0x42a)][_0x9f9086(0x2c8)](_univerjs_sheets[_0x9f9086(0x27e)]),{unitId:_0x3253e7,subUnitId:_0xb208e4}=extractTargetFromFirstChangeset(_0x51921f),_0x623daf=_0x49b5b2===null||_0x49b5b2===void 0x0?void 0x0:_0x49b5b2['getWorkbookSelections'](_0x3253e7)[_0x9f9086(0x1cd)](),_0x28e5ac=(_0x122bc8=this[_0x9f9086(0x1c2)]['getUnit'](_0x3253e7))===null||_0x122bc8===void 0x0||(_0x122bc8=_0x122bc8[_0x9f9086(0x3aa)]())===null||_0x122bc8===void 0x0?void 0x0:_0x122bc8[_0x9f9086(0x35f)]();if(_0x623daf['length']===0x0||!_0x3253e7||!_0xb208e4)return;const _0x35870e=[{'id':_univerjs_sheets[_0x9f9086(0x336)]['id'],'params':{'unitId':_0x3253e7,'subUnitId':_0x28e5ac,'selections':_univerjs_core[_0x9f9086(0x2b1)][_0x9f9086(0x346)](_0x623daf)}}],_0x2934b0=this[_0x9f9086(0x448)][_0x9f9086(0x24e)](_0x51921f,_0x35870e);if(!(0x0,_univerjs_pro_collaboration[_0x9f9086(0x219)])(_0x2934b0))throw _0x2934b0[_0x9f9086(0x3e0)];const _0x170e20=(_0x2e71b4=_0x2934b0[_0x9f9086(0x379)][0x0])===null||_0x2e71b4===void 0x0||(_0x2e71b4=_0x2e71b4[_0x9f9086(0x1c6)])===null||_0x2e71b4===void 0x0?void 0x0:_0x2e71b4[_0x9f9086(0x3f5)];if(Array[_0x9f9086(0x209)](_0x170e20)&&_0x170e20[_0x9f9086(0x473)]){if(_0x170e20['length']===_0x35870e[0x0][_0x9f9086(0x1c6)][_0x9f9086(0x3f5)][_0x9f9086(0x473)]&&_0x170e20['every']((_0x132a8e,_0x2b1e04)=>_univerjs_core[_0x9f9086(0x2cc)][_0x9f9086(0x255)](_0x132a8e[_0x9f9086(0x22f)],_0x35870e[0x0][_0x9f9086(0x1c6)][_0x9f9086(0x3f5)][_0x2b1e04][_0x9f9086(0x22f)])))return;this['_injector'][_0x9f9086(0x2c8)](_univerjs_core[_0x9f9086(0x1a6)])[_0x9f9086(0x224)](_univerjs_sheets[_0x9f9086(0x336)]['id'],{'unitId':_0x3253e7,'subUnitId':_0x28e5ac,'selections':_0x170e20});}}};SheetTransformSelectionsService=__decorate([__decorateParam(0x0,(0x0,_univerjs_core['Inject'])(_univerjs_core['Injector'])),__decorateParam(0x1,_univerjs_pro_collaboration[_0x54582d(0x1af)]),__decorateParam(0x2,_univerjs_core[_0x54582d(0x3f4)])],SheetTransformSelectionsService);const ISingleActiveUnitService=(0x0,_univerjs_core[_0x54582d(0x1e1)])('univer-pro.collaboration-client.single-active-unit-service');let UnitStatus=function(_0x40abcf){const _0x3a2b75=_0x54582d;return _0x40abcf[_0x40abcf[_0x3a2b75(0x455)]=0x0]='NO_OTHER_CLIENTS_EDITING',_0x40abcf[_0x40abcf[_0x3a2b75(0x22d)]=0x1]=_0x3a2b75(0x22d),_0x40abcf;}({});const COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY=_0x54582d(0x1e3),configSymbol=Symbol(COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY),defaultPluginConfig={};function isSplitChunkMutation(_0x1279f1){const _0x5f5910=_0x54582d;var _0x296453;return!!((_0x296453=_0x1279f1[_0x5f5910(0x1c6)])===null||_0x296453===void 0x0?void 0x0:_0x296453['__splitChunk__']);}const SINGLE_CHANGESET_MUTATIONS=new Set([_univerjs_sheets[_0x54582d(0x26a)]['id']]);function assembleSheetChangeset(_0xe1c8f8,_0x4169ca,_0x508f3b,_0x2ca448,_0x377d29){const _0x32c42a=_0x54582d;var _0x33c2af,_0x9cd28,_0x2f97e2,_0xf28d6f;const _0x46a666=[];for(const _0x2dc860 of _0xe1c8f8){if(SINGLE_CHANGESET_MUTATIONS['has'](_0x2dc860['id'])){if(_0x46a666[_0x32c42a(0x473)]>0x0)break;_0x46a666[_0x32c42a(0x35d)](_0x2dc860);break;}if(isSplitChunkMutation(_0x2dc860)){if(_0x46a666[_0x32c42a(0x473)]>0x0)break;_0x46a666[_0x32c42a(0x35d)](_0x2dc860);break;}_0x46a666['push'](_0x2dc860);}const _0x846c0b=(_0x33c2af=(_0x9cd28=_0x377d29[_0x32c42a(0x38a)]())===null||_0x9cd28===void 0x0?void 0x0:_0x9cd28[_0x32c42a(0x202)])!==null&&_0x33c2af!==void 0x0?_0x33c2af:'unknown',_0xf6e616=(_0x2f97e2=(_0xf28d6f=_0x377d29[_0x32c42a(0x38a)]())===null||_0xf28d6f===void 0x0?void 0x0:_0xf28d6f['memberID'])!==null&&_0x2f97e2!==void 0x0?_0x2f97e2:'unknown';return{'changeset':{'unitID':_0x4169ca,'type':(0x0,_univerjs_pro_collaboration[_0x32c42a(0x426)])(_0x508f3b['getUnitType'](_0x4169ca)),'baseRev':_0x2ca448['getCurrentRevOfUnit'](_0x4169ca),'revision':0x0,'userID':_0x846c0b,'memberID':_0xf6e616,'mutations':_0x46a666},'pendingMutations':_0xe1c8f8[_0x32c42a(0x377)](_0x46a666[_0x32c42a(0x473)])};}function assembleDocChangeset(_0x5529d3,_0x311e12,_0x83b166,_0x3a1ddc,_0xc48a75){const _0x1d7ffe=_0x54582d;var _0x42eab2,_0x306960,_0x141ad6,_0x1d9684;const _0x55d643=[_0x5529d3[_0x1d7ffe(0x322)]((_0x5d153c,_0x1d680c)=>{const _0x2ac2d0=_0x1d7ffe;var _0x5b2dc5;const {id:_0x3c48ab}=_0x5d153c,{id:_0x3cea,type:_0x1eaeac}=_0x1d680c,_0x7d08c2=(_0x5b2dc5=_0x5d153c[_0x2ac2d0(0x1c6)])!==null&&_0x5b2dc5!==void 0x0?_0x5b2dc5:{'actions':null},_0xc4ec94=_0x1d680c[_0x2ac2d0(0x1c6)];if(_0x3c48ab&&_0x3c48ab!==_0x3cea)throw new Error(_0x2ac2d0(0x1d8)+_0x3c48ab+_0x2ac2d0(0x327)+_0x3cea+'.');return{..._0x5d153c,'id':_0x3cea,'type':_0x1eaeac,'params':{'unitId':_0xc4ec94['unitId'],'textRanges':_0xc4ec94[_0x2ac2d0(0x1c8)],'actions':_univerjs_core[_0x2ac2d0(0x19a)][_0x2ac2d0(0x45d)](_0x7d08c2[_0x2ac2d0(0x1b3)],_0xc4ec94[_0x2ac2d0(0x1b3)])}};},{})],_0x2ae809=(_0x42eab2=(_0x306960=_0xc48a75[_0x1d7ffe(0x38a)]())===null||_0x306960===void 0x0?void 0x0:_0x306960[_0x1d7ffe(0x202)])!==null&&_0x42eab2!==void 0x0?_0x42eab2:_0x1d7ffe(0x21b),_0x5e277a=(_0x141ad6=(_0x1d9684=_0xc48a75[_0x1d7ffe(0x38a)]())===null||_0x1d9684===void 0x0?void 0x0:_0x1d9684[_0x1d7ffe(0x46b)])!==null&&_0x141ad6!==void 0x0?_0x141ad6:_0x1d7ffe(0x21b);return{'changeset':{'unitID':_0x311e12,'type':(0x0,_univerjs_pro_collaboration[_0x1d7ffe(0x426)])(_0x83b166[_0x1d7ffe(0x398)](_0x311e12)),'baseRev':_0x3a1ddc[_0x1d7ffe(0x340)](_0x311e12),'revision':0x0,'userID':_0x2ae809,'memberID':_0x5e277a,'mutations':_0x55d643},'pendingMutations':[]};}function createTimerObservable$(_0x3fd86c,_0x2618d2){const _0x2e9ceb=_0x54582d,_0x2620bf=new rxjs[(_0x2e9ceb(0x199))](0x1);return setTimeout(()=>_0x2620bf[_0x2e9ceb(0x22a)](_0x2618d2),_0x3fd86c),_0x2620bf[_0x2e9ceb(0x2a1)]()[_0x2e9ceb(0x197)]((0x0,rxjs[_0x2e9ceb(0x1db)])(0x1));}var _PendingState,_AwaitingState,_AwaitingWithPendingState;let CollaborationStatus=function(_0x1862c4){const _0xc3768d=_0x54582d;return _0x1862c4[_0xc3768d(0x216)]=_0xc3768d(0x381),_0x1862c4[_0xc3768d(0x291)]=_0xc3768d(0x1ce),_0x1862c4['PENDING']='pending',_0x1862c4[_0xc3768d(0x3bd)]=_0xc3768d(0x2d1),_0x1862c4[_0xc3768d(0x1a3)]=_0xc3768d(0x3a4),_0x1862c4[_0xc3768d(0x220)]=_0xc3768d(0x3ba),_0x1862c4[_0xc3768d(0x397)]='conflict',_0x1862c4[_0xc3768d(0x391)]=_0xc3768d(0x357),_0x1862c4;}({});const MAX_RETRY_TIMEOUT=0x4e20,MAX_RETRY_TOTAL_TIMEOUT=0x2bf20;var CollaborationState=class{constructor(_0x239a31,_0x5d8925,_0x1e0a40,_0x47fddb,_0x432193,_0x22b93b,_0x5c7054,_0xdb202a,_0x9a37ae){const _0x14eb60=_0x54582d;this[_0x14eb60(0x481)]=_0x239a31,this['type']=_0x5d8925,this[_0x14eb60(0x2de)]=_0x432193,this[_0x14eb60(0x1b1)]=_0x22b93b,this[_0x14eb60(0x223)]=_0x5c7054,this[_0x14eb60(0x36a)]=_0xdb202a,this[_0x14eb60(0x310)]=_0x9a37ae,_defineProperty(this,_0x14eb60(0x42b),null),_defineProperty(this,_0x14eb60(0x1c4),[]),this[_0x14eb60(0x42b)]=_0x1e0a40,this[_0x14eb60(0x1c4)]=_0x47fddb;}[_0x54582d(0x461)](_0x19b2d9){const _0x237843=_0x54582d,_0x4e0624=this['_revisionService'][_0x237843(0x340)](this[_0x237843(0x481)]);if(_0x19b2d9['revision']>_0x4e0624+0x1)return this[_0x237843(0x2de)][_0x237843(0x312)]({'from':_0x4e0624,'to':_0x19b2d9[_0x237843(0x442)]-0x1}),!![];return![];}['_transformUndoredo'](_0x5cebc7){const _0xdf9214=_0x54582d;this[_0xdf9214(0x223)][_0xdf9214(0x3a6)](this[_0xdf9214(0x481)],_0x5cebc7);}[_0x54582d(0x1b4)](_0x3fd926){const _0xd35d09=_0x54582d;var _0x455d72,_0x2c054b;(_0x455d72=(_0x2c054b=this[_0xd35d09(0x2de)])['onTransformSelections'])===null||_0x455d72===void 0x0||_0x455d72[_0xd35d09(0x46d)](_0x2c054b,_0x3fd926);}['_transformIMECache'](_0x2b81e3){const _0x3086ff=_0x54582d;var _0x1281f5,_0x53dbaf;return(_0x1281f5=(_0x53dbaf=this[_0x3086ff(0x2de)])[_0x3086ff(0x208)])===null||_0x1281f5===void 0x0?void 0x0:_0x1281f5[_0x3086ff(0x46d)](_0x53dbaf,_0x2b81e3);}[_0x54582d(0x42d)](_0x2d8e5a){const _0x4b07b6=_0x54582d;var _0x238182,_0xe41d3f;return(_0x238182=(_0xe41d3f=this[_0x4b07b6(0x2de)])[_0x4b07b6(0x45b)])===null||_0x238182===void 0x0?void 0x0:_0x238182['call'](_0xe41d3f,_0x2d8e5a);}['_transformRemoteChangesetByIMECache'](_0x4be173){const _0x3b013d=_0x54582d;var _0x2cb4be,_0x48a3c2,_0x21e035;return(_0x2cb4be=(_0x48a3c2=(_0x21e035=this[_0x3b013d(0x2de)])[_0x3b013d(0x46a)])===null||_0x48a3c2===void 0x0?void 0x0:_0x48a3c2[_0x3b013d(0x46d)](_0x21e035,_0x4be173))!==null&&_0x2cb4be!==void 0x0?_0x2cb4be:_0x4be173;}[_0x54582d(0x3c0)](_0x78fd75){const _0x1e8894=_0x54582d;var _0x51775e,_0x4d667d,_0x3c6cac;return(_0x51775e=(_0x4d667d=(_0x3c6cac=this[_0x1e8894(0x2de)])['onTransformRemoteChangesetByStateCache'])===null||_0x4d667d===void 0x0?void 0x0:_0x4d667d[_0x1e8894(0x46d)](_0x3c6cac,_0x78fd75))!==null&&_0x51775e!==void 0x0?_0x51775e:_0x78fd75;}[_0x54582d(0x3f7)](_0x5db2d0){const _0x48721e=_0x54582d;if(this['type']===_univerjs_core[_0x48721e(0x2fd)]['UNIVER_DOC']){const {unitID:_0x2e93ed,mutations:_0x52c794,memberID:_0x5ad75a}=_0x5db2d0,_0x57736f=_0x52c794['length']>0x0?_0x52c794[0x0][_0x48721e(0x1c6)][_0x48721e(0x1c8)]:[];if(Array[_0x48721e(0x209)](_0x57736f)&&_0x57736f[_0x48721e(0x473)]>0x0){var _0xdc735c,_0x4b7883;(_0xdc735c=(_0x4b7883=this[_0x48721e(0x2de)])[_0x48721e(0x243)])===null||_0xdc735c===void 0x0||_0xdc735c[_0x48721e(0x46d)](_0x4b7883,{'unitID':_0x2e93ed,'memberID':_0x5ad75a,'textRanges':_0x57736f});}}}[_0x54582d(0x479)](){const _0x4c1ec5=_0x54582d;var _0x345872;(_0x345872=this[_0x4c1ec5(0x310)])===null||_0x345872===void 0x0||_0x345872[_0x4c1ec5(0x404)](this[_0x4c1ec5(0x481)],this[_0x4c1ec5(0x343)],this[_0x4c1ec5(0x42b)],this[_0x4c1ec5(0x1c4)]);}[_0x54582d(0x39d)](){const _0x31512b=_0x54582d;return this[_0x31512b(0x36a)][_0x31512b(0x340)](this[_0x31512b(0x481)]);}[_0x54582d(0x403)](){const _0x235bcf=_0x54582d;this[_0x235bcf(0x36a)][_0x235bcf(0x257)](this[_0x235bcf(0x481)]);}[_0x54582d(0x33c)](_0x230a05){const _0x20dd89=_0x54582d;let _0x53158a=this['_transformRemoteChangesetByIMECache'](_0x230a05);_0x53158a=this[_0x20dd89(0x3c0)](_0x53158a);const _0x23ff2d=(0x0,_univerjs_core['sequenceExecute'])(_0x53158a[_0x20dd89(0x334)],this['_commandService'],{'fromCollab':!![]});if(!_0x23ff2d['result']){var _0xe2fc4d;if(_0x23ff2d[_0x20dd89(0x3e0)]instanceof Error)throw _0x23ff2d[_0x20dd89(0x3e0)];throw new Error((_0xe2fc4d=_0x23ff2d[_0x20dd89(0x3e0)])!==null&&_0xe2fc4d!==void 0x0?_0xe2fc4d:_0x20dd89(0x2e0));}this[_0x20dd89(0x36b)](_0x53158a),this['_transformStateCache'](_0x53158a),this['_transformUndoredo'](_0x230a05),this[_0x20dd89(0x1b4)](_0x53158a),this[_0x20dd89(0x3f7)](_0x53158a),this['_incrementRevisionNumber']();}};let SyncedState=class SyncedState extends CollaborationState{constructor(_0x50ce0c,_0x17f3e7,_0x451430,_0x1aa229,_0x1a8a2d,_0x54ed19,_0x448f43,_0x3c7e25,_0x5357ff,_0x446d46){const _0x1d49ab=_0x54582d;super(_0x50ce0c,_0x17f3e7,null,[],_0x451430,_0x448f43,_0x54ed19,_0x1aa229,_0x446d46),this['_injector']=_0x1a8a2d,this[_0x1d49ab(0x469)]=_0x3c7e25,this[_0x1d49ab(0x448)]=_0x5357ff,this[_0x1d49ab(0x286)]=_0x446d46,_defineProperty(this,_0x1d49ab(0x21e),CollaborationStatus[_0x1d49ab(0x291)]);}[_0x54582d(0x326)](_0x4f5e58){const _0x39c8d6=_0x54582d,_0x31493c=this[_0x39c8d6(0x42a)][_0x39c8d6(0x40f)](PendingState,this[_0x39c8d6(0x481)],this[_0x39c8d6(0x343)],[_0x4f5e58],this[_0x39c8d6(0x2de)]);return _0x31493c[_0x39c8d6(0x23f)](),_0x31493c['_updateLocalCache'](),_0x31493c;}[_0x54582d(0x41f)](_0x457700){const _0x4395c8=_0x54582d;if(this[_0x4395c8(0x461)](_0x457700))return this[_0x4395c8(0x42a)][_0x4395c8(0x40f)](FetchingMissState,this[_0x4395c8(0x481)],this[_0x4395c8(0x343)],null,[],null,[_0x457700],this[_0x4395c8(0x2de)]);try{const _0x1964da=this['_transformService'][_0x4395c8(0x24e)](_0x457700,[_univerjs_pro_collaboration[_0x4395c8(0x456)]]);if((0x0,_univerjs_pro_collaboration['isTransformMutationsWithChangesetSuccess'])(_0x1964da)){const {c1Prime:_0x2a434f}=_0x1964da;return this['_executeRemoteChangeset'](_0x2a434f),this;}throw _0x1964da[_0x4395c8(0x3e0)];}catch(_0x1b8284){return this[_0x4395c8(0x469)][_0x4395c8(0x3e0)](_0x1b8284),this[_0x4395c8(0x290)](![]);}}['_onConflict'](_0x2acf7e){const _0x507dac=_0x54582d;return this[_0x507dac(0x42a)][_0x507dac(0x40f)](ConflictState,this[_0x507dac(0x481)],this['type'],null,[],this['_handler'],_0x2acf7e);}[_0x54582d(0x296)](){const _0x466beb=_0x54582d;throw new Error(_0x466beb(0x33a));}[_0x54582d(0x33d)](){const _0x33a590=_0x54582d;throw new Error(_0x33a590(0x19f));}[_0x54582d(0x301)](){return this;}[_0x54582d(0x1ab)](){const _0x3a7707=_0x54582d;return this[_0x3a7707(0x42a)]['createInstance'](OfflineState,this[_0x3a7707(0x481)],this['type'],null,[],this[_0x3a7707(0x2de)]);}[_0x54582d(0x211)](){return this;}[_0x54582d(0x2df)](){throw new Error('[SyncedState]:\x20invalid\x20calling\x20to\x20`resend`.');}['fetchMiss'](){const _0x3f3b02=_0x54582d,_0x11b5a5=this[_0x3f3b02(0x36a)][_0x3f3b02(0x340)](this[_0x3f3b02(0x481)]);return this[_0x3f3b02(0x2de)]['onMissingChangesets']({'from':_0x11b5a5,'to':0x0}),this[_0x3f3b02(0x42a)]['createInstance'](FetchingMissState,this[_0x3f3b02(0x481)],this[_0x3f3b02(0x343)],null,[],null,[],this[_0x3f3b02(0x2de)]);}};SyncedState=__decorate([__decorateParam(0x3,(0x0,_univerjs_core[_0x54582d(0x205)])(_univerjs_pro_collaboration[_0x54582d(0x40c)])),__decorateParam(0x4,(0x0,_univerjs_core[_0x54582d(0x205)])(_univerjs_core[_0x54582d(0x28f)])),__decorateParam(0x5,_univerjs_core['IUndoRedoService']),__decorateParam(0x6,_univerjs_core[_0x54582d(0x1a6)]),__decorateParam(0x7,_univerjs_core[_0x54582d(0x31e)]),__decorateParam(0x8,_univerjs_pro_collaboration['ITransformService']),__decorateParam(0x9,(0x0,_univerjs_core[_0x54582d(0x23d)])(ILocalCacheService))],SyncedState);let PendingState=_PendingState=class PendingState extends CollaborationState{constructor(_0x31d56b,_0x5a1e0d,_0x2cff07,_0x2c513a,_0x3956ef,_0x201095,_0x2e2469,_0x500747,_0x2364e8,_0x22b18d,_0x2c1c82,_0x45c51f,_0x582fc9,_0x114eaf){const _0x1d604a=_0x54582d;super(_0x31d56b,_0x5a1e0d,null,_0x2cff07,_0x2c513a,_0x2364e8,_0x582fc9,_0x201095,_0x114eaf),this[_0x1d604a(0x42a)]=_0x3956ef,this[_0x1d604a(0x24a)]=_0x2e2469,this[_0x1d604a(0x469)]=_0x500747,this[_0x1d604a(0x345)]=_0x22b18d,this[_0x1d604a(0x448)]=_0x2c1c82,this[_0x1d604a(0x46c)]=_0x45c51f,_defineProperty(this,_0x1d604a(0x21e),CollaborationStatus[_0x1d604a(0x1bd)]),_defineProperty(this,'_scheduleCompleteTimestamp',null),_defineProperty(this,_0x1d604a(0x1ef),null);}[_0x54582d(0x326)](_0xac23b9){const _0x53413f=_0x54582d;return this[_0x53413f(0x1c4)][_0x53413f(0x35d)](_0xac23b9),this[_0x53413f(0x479)](),this;}[_0x54582d(0x41f)](_0x4e1ea7){const _0x12ed9b=_0x54582d;if(this['_checkMissing'](_0x4e1ea7))return this['_clearScheduledTask'](),this[_0x12ed9b(0x42a)]['createInstance'](FetchingMissState,this[_0x12ed9b(0x481)],this[_0x12ed9b(0x343)],null,this['_pendingMutations'],null,[_0x4e1ea7],this[_0x12ed9b(0x2de)]);try{const _0x731a74=this[_0x12ed9b(0x448)]['transformMutationsWithChangeset'](_0x4e1ea7,this['_pendingMutations']);if((0x0,_univerjs_pro_collaboration[_0x12ed9b(0x219)])(_0x731a74)){const {c1Prime:_0x4fc0fd,m2Prime:_0x43afca}=_0x731a74;this[_0x12ed9b(0x33c)](_0x4fc0fd);const _0x26c1ac=this[_0x12ed9b(0x42a)][_0x12ed9b(0x40f)](_PendingState,this[_0x12ed9b(0x481)],this[_0x12ed9b(0x343)],_0x43afca,this['_handler']);this[_0x12ed9b(0x1eb)]();const _0x4bd795=new Date()[_0x12ed9b(0x3b2)](),_0xa98a80=this[_0x12ed9b(0x42c)]?Math['max'](this[_0x12ed9b(0x42c)]-_0x4bd795,0x0):this[_0x12ed9b(0x2aa)]();return _0x26c1ac[_0x12ed9b(0x23f)](_0xa98a80),_0x26c1ac;}throw _0x731a74[_0x12ed9b(0x3e0)];}catch(_0x2757b3){return this[_0x12ed9b(0x469)][_0x12ed9b(0x3e0)](_0x2757b3),this['_onConflict'](![]);}}[_0x54582d(0x296)](){const _0x1ac0a4=_0x54582d;throw new Error(_0x1ac0a4(0x1ac));}[_0x54582d(0x33d)](){const _0x263cbf=_0x54582d;throw new Error(_0x263cbf(0x1df));}[_0x54582d(0x301)](){return this;}[_0x54582d(0x1ab)](){const _0x150039=_0x54582d;return this[_0x150039(0x1eb)](),this[_0x150039(0x42a)][_0x150039(0x40f)](OfflineState,this[_0x150039(0x481)],this[_0x150039(0x343)],null,this['_pendingMutations'],this[_0x150039(0x2de)]);}[_0x54582d(0x211)](){return this;}[_0x54582d(0x23f)](_0x14fb84){const _0x2cd0f7=_0x54582d,_0x2cb1e5=_0x14fb84!==null&&_0x14fb84!==void 0x0?_0x14fb84:this['_getSendChangesetTimeout']();this[_0x2cd0f7(0x42c)]=new Date()[_0x2cd0f7(0x3b2)]()+_0x2cb1e5,this['_sendingTimer']=setTimeout(()=>{const _0x2bffb3=_0x2cd0f7;this['_clearScheduledTask']();let _0x1f9d21=null;switch(this[_0x2bffb3(0x343)]){case _univerjs_core[_0x2bffb3(0x2fd)][_0x2bffb3(0x1f9)]:_0x1f9d21=assembleSheetChangeset(this[_0x2bffb3(0x1c4)],this[_0x2bffb3(0x481)],this['_univerInstanceService'],this['_revisionService'],this['_memberService']);break;case _univerjs_core[_0x2bffb3(0x2fd)][_0x2bffb3(0x2e6)]:if(this['_pendingMutations'][_0x2bffb3(0x2e1)](_0x4f961c=>_0x4f961c['id']===_univerjs_docs[_0x2bffb3(0x37c)]['id']))_0x1f9d21=assembleDocChangeset(this['_pendingMutations'],this[_0x2bffb3(0x481)],this[_0x2bffb3(0x46c)],this['_revisionService'],this[_0x2bffb3(0x24a)]);else _0x1f9d21=assembleSheetChangeset(this[_0x2bffb3(0x1c4)],this['unitID'],this['_univerInstanceService'],this[_0x2bffb3(0x36a)],this[_0x2bffb3(0x24a)]);break;default:throw new Error(_0x2bffb3(0x2a4)+this[_0x2bffb3(0x343)]+_0x2bffb3(0x2ef));}const {changeset:_0x4a69f5,pendingMutations:_0x32e7be}=_0x1f9d21;this['_handler'][_0x2bffb3(0x2d6)](_0x4a69f5);const _0x2fba2e=_0x32e7be[_0x2bffb3(0x473)]?this['_injector'][_0x2bffb3(0x40f)](AwaitingWithPendingState,this[_0x2bffb3(0x481)],this['type'],_0x4a69f5,_0x32e7be,this[_0x2bffb3(0x2de)],void 0x0):this[_0x2bffb3(0x42a)][_0x2bffb3(0x40f)](AwaitingState,this[_0x2bffb3(0x481)],this[_0x2bffb3(0x343)],_0x4a69f5,this[_0x2bffb3(0x2de)]);_0x2fba2e[_0x2bffb3(0x479)](),this['_handler'][_0x2bffb3(0x200)](this,_0x2fba2e);},_0x2cb1e5);}[_0x54582d(0x2aa)](){const _0x3c1cac=_0x54582d;var _0xe4aac0;const _0x50184c=this['_configService'][_0x3c1cac(0x3de)](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY);return(_0xe4aac0=_0x50184c===null||_0x50184c===void 0x0?void 0x0:_0x50184c[_0x3c1cac(0x363)])!==null&&_0xe4aac0!==void 0x0?_0xe4aac0:DEFAULT_SEND_CHANGESET_TIMEOUT;}[_0x54582d(0x2df)](){const _0xfa1aed=_0x54582d;throw new Error(_0xfa1aed(0x1b9));}['_clearScheduledTask'](){const _0x467826=_0x54582d;this['_sendingTimer']!=null&&(clearTimeout(this[_0x467826(0x1ef)]),this['_sendingTimer']=null);}['_onConflict'](_0x3f1fd4){const _0x5d1f2e=_0x54582d;return this[_0x5d1f2e(0x1eb)](),this[_0x5d1f2e(0x42a)][_0x5d1f2e(0x40f)](ConflictState,this[_0x5d1f2e(0x481)],this['type'],null,this[_0x5d1f2e(0x1c4)],this[_0x5d1f2e(0x2de)],_0x3f1fd4);}};PendingState=_PendingState=__decorate([__decorateParam(0x4,(0x0,_univerjs_core[_0x54582d(0x205)])(_univerjs_core[_0x54582d(0x28f)])),__decorateParam(0x5,(0x0,_univerjs_core[_0x54582d(0x205)])(_univerjs_pro_collaboration[_0x54582d(0x40c)])),__decorateParam(0x6,(0x0,_univerjs_core[_0x54582d(0x205)])(MemberService)),__decorateParam(0x7,_univerjs_core[_0x54582d(0x31e)]),__decorateParam(0x8,_univerjs_core['ICommandService']),__decorateParam(0x9,_univerjs_core['IConfigService']),__decorateParam(0xa,_univerjs_pro_collaboration[_0x54582d(0x1af)]),__decorateParam(0xb,_univerjs_core[_0x54582d(0x3f4)]),__decorateParam(0xc,_univerjs_core[_0x54582d(0x2eb)]),__decorateParam(0xd,(0x0,_univerjs_core['Optional'])(ILocalCacheService))],PendingState);let AwaitingState=_AwaitingState=class AwaitingState extends CollaborationState{constructor(_0x41125e,_0x2322db,_0x2b44b1,_0x3bd2cd,_0x38c5e8,_0x49f928,_0x444ed7,_0xb44b7d,_0x962fa4,_0x1ae74f,_0x160888){const _0x4a53a5=_0x54582d;super(_0x41125e,_0x2322db,_0x2b44b1,[],_0x3bd2cd,_0x444ed7,_0x1ae74f,_0x49f928,_0x160888),this['_injector']=_0x38c5e8,this[_0x4a53a5(0x469)]=_0xb44b7d,this[_0x4a53a5(0x448)]=_0x962fa4,_defineProperty(this,_0x4a53a5(0x21e),CollaborationStatus[_0x4a53a5(0x3bd)]),_defineProperty(this,'_resendTimeout',0x0),_defineProperty(this,'_maxTotalRetryTimeout',0x0),_defineProperty(this,_0x4a53a5(0x215),void 0x0),_defineProperty(this,_0x4a53a5(0x32a),void 0x0);}[_0x54582d(0x326)](_0x49dbf0){const _0x58d603=_0x54582d;this[_0x58d603(0x1eb)]();const _0x4df2bb=this['_injector'][_0x58d603(0x40f)](AwaitingWithPendingState,this[_0x58d603(0x481)],this['type'],this[_0x58d603(0x42b)],[_0x49dbf0],this['_handler'],this[_0x58d603(0x215)]);return _0x4df2bb[_0x58d603(0x479)](),_0x4df2bb;}['onRemoteChangeset'](_0x340bf9){const _0x4cbcd3=_0x54582d;if(this[_0x4cbcd3(0x461)](_0x340bf9))return this[_0x4cbcd3(0x1eb)](),this['_injector'][_0x4cbcd3(0x40f)](FetchingMissState,this[_0x4cbcd3(0x481)],this[_0x4cbcd3(0x343)],this[_0x4cbcd3(0x42b)],[],null,[_0x340bf9],this[_0x4cbcd3(0x2de)]);try{const _0x476b4f=this['_transformService'][_0x4cbcd3(0x3af)]([_0x340bf9],[this[_0x4cbcd3(0x42b)]],![]);if((0x0,_univerjs_pro_collaboration[_0x4cbcd3(0x3f9)])(_0x476b4f)){const {c1Prime:_0xfbc06c,c2Prime:_0x1b84c1}=_0x476b4f;this['_executeRemoteChangeset'](_0xfbc06c[0x0]),_0x1b84c1[0x0][_0x4cbcd3(0x20b)]=this['_getCurrentRevision'](),this[_0x4cbcd3(0x1eb)]();const _0x1e1751=this[_0x4cbcd3(0x42a)]['createInstance'](_AwaitingState,this[_0x4cbcd3(0x481)],this[_0x4cbcd3(0x343)],_0x1b84c1[0x0],this[_0x4cbcd3(0x2de)]);return _0x1e1751[_0x4cbcd3(0x479)](),_0x1e1751;}return this['_onConflict'](![]);}catch(_0x551ce6){return this[_0x4cbcd3(0x469)][_0x4cbcd3(0x3e0)](_0x551ce6),this[_0x4cbcd3(0x290)](![]);}}['onRemoteAck'](_0x5781c8){const _0x56029=_0x54582d;this[_0x56029(0x1eb)]();const _0x2926da=this[_0x56029(0x36a)][_0x56029(0x340)](this['unitID']);if(_0x5781c8[_0x56029(0x442)]<_0x2926da-0x1)return this;if(this[_0x56029(0x461)](_0x5781c8))return this['_injector'][_0x56029(0x40f)](FetchingMissState,this[_0x56029(0x481)],this[_0x56029(0x343)],null,[],this[_0x56029(0x42b)],[],this[_0x56029(0x2de)]);this['_incrementRevisionNumber']();const _0x1495d2=this['_injector']['createInstance'](SyncedState,this[_0x56029(0x481)],this[_0x56029(0x343)],this[_0x56029(0x2de)]);return _0x1495d2[_0x56029(0x479)](),_0x1495d2;}['onRemoteRej'](_0x1d9467){const _0x3b312c=_0x54582d;return this[_0x3b312c(0x290)](!!(_0x1d9467===null||_0x1d9467===void 0x0?void 0x0:_0x1d9467[_0x3b312c(0x402)]));}[_0x54582d(0x301)](_0x803ee0){const _0x1c4fcb=_0x54582d;if(this[_0x1c4fcb(0x3ef)]>MAX_RETRY_TOTAL_TIMEOUT)return this[_0x1c4fcb(0x1ab)]();return this[_0x1c4fcb(0x215)]=createTimerObservable$(this[_0x1c4fcb(0x3b4)],{'timeout':this[_0x1c4fcb(0x3b4)],'reqId':_0x803ee0['reqId']}),this[_0x1c4fcb(0x32a)]=this[_0x1c4fcb(0x215)][_0x1c4fcb(0x1c3)](({reqId:_0x5e81cd,timeout:_0x380513})=>{const _0x37cca5=_0x1c4fcb;this[_0x37cca5(0x240)](_0x5e81cd,_0x380513);}),this;}[_0x54582d(0x1ab)](){const _0x411ac7=_0x54582d;return this['_clearScheduledTask'](),this['_injector']['createInstance'](OfflineState,this[_0x411ac7(0x481)],this['type'],this[_0x411ac7(0x42b)],[],this['_handler']);}[_0x54582d(0x211)](){return this;}['resend'](){const _0x2f7806=_0x54582d;this[_0x2f7806(0x2de)][_0x2f7806(0x2d6)](this[_0x2f7806(0x42b)]);}[_0x54582d(0x290)](_0x407a0d){const _0x2a6fb5=_0x54582d;return this[_0x2a6fb5(0x1eb)](),this[_0x2a6fb5(0x42a)][_0x2a6fb5(0x40f)](ConflictState,this['unitID'],this[_0x2a6fb5(0x343)],this['_awaitingChangeset'],[],this['_handler'],_0x407a0d);}['_resendWithTimeout'](_0x580f12,_0x527433){const _0x43caa6=_0x54582d;var _0x2af423;_0x580f12===((_0x2af423=this[_0x43caa6(0x42b)])===null||_0x2af423===void 0x0?void 0x0:_0x2af423[_0x43caa6(0x2ca)])&&(this[_0x43caa6(0x2df)](),this[_0x43caa6(0x3b4)]=_0x527433===0x0?0x3e8:Math[_0x43caa6(0x1d1)](_0x527433*0x2,MAX_RETRY_TIMEOUT),this[_0x43caa6(0x3ef)]+=this[_0x43caa6(0x3b4)]);}[_0x54582d(0x1eb)](){const _0x1d6c62=_0x54582d;var _0x59e451;(_0x59e451=this[_0x1d6c62(0x32a)])===null||_0x59e451===void 0x0||_0x59e451[_0x1d6c62(0x196)](),this[_0x1d6c62(0x3b4)]=0x0,this[_0x1d6c62(0x3ef)]=0x0;}};AwaitingState=_AwaitingState=__decorate([__decorateParam(0x4,(0x0,_univerjs_core[_0x54582d(0x205)])(_univerjs_core[_0x54582d(0x28f)])),__decorateParam(0x5,(0x0,_univerjs_core[_0x54582d(0x205)])(_univerjs_pro_collaboration[_0x54582d(0x40c)])),__decorateParam(0x6,_univerjs_core['ICommandService']),__decorateParam(0x7,_univerjs_core['ILogService']),__decorateParam(0x8,_univerjs_pro_collaboration[_0x54582d(0x1af)]),__decorateParam(0x9,_univerjs_core[_0x54582d(0x2eb)]),__decorateParam(0xa,(0x0,_univerjs_core[_0x54582d(0x23d)])(ILocalCacheService))],AwaitingState);let AwaitingWithPendingState=_AwaitingWithPendingState=class AwaitingWithPendingState extends CollaborationState{constructor(_0x4461db,_0x4d23ed,_0x4f1b1b,_0xa3fd,_0x4dd878,_0x3abbc9,_0x1def03,_0x110433,_0x551b31,_0x254efa,_0xe914d8,_0x5371c7,_0x5d3217){const _0x546c2f=_0x54582d;super(_0x4461db,_0x4d23ed,_0x4f1b1b,_0xa3fd,_0x4dd878,_0x551b31,_0x5371c7,_0x110433,_0x5d3217),this[_0x546c2f(0x42a)]=_0x1def03,this['_logService']=_0x254efa,this[_0x546c2f(0x448)]=_0xe914d8,this[_0x546c2f(0x286)]=_0x5d3217,_defineProperty(this,_0x546c2f(0x21e),CollaborationStatus[_0x546c2f(0x1a3)]),_defineProperty(this,'_resendTimeout',0x0),_defineProperty(this,_0x546c2f(0x3ef),0x0),_defineProperty(this,_0x546c2f(0x215),void 0x0),_defineProperty(this,'_sender',void 0x0),_0x3abbc9&&(this[_0x546c2f(0x215)]=_0x3abbc9,this['_sender']=this[_0x546c2f(0x215)][_0x546c2f(0x1c3)](({reqId:_0x8c956e,timeout:_0x34b7ef})=>{this['_resendWithTimeout'](_0x8c956e,_0x34b7ef);}));}[_0x54582d(0x326)](_0x5d523f){const _0x20858b=_0x54582d;return this[_0x20858b(0x1c4)][_0x20858b(0x35d)](_0x5d523f),this;}[_0x54582d(0x41f)](_0x5f3edd){const _0x1ed074=_0x54582d;if(this[_0x1ed074(0x461)](_0x5f3edd))return this['_clearScheduledTask'](),this[_0x1ed074(0x42a)]['createInstance'](FetchingMissState,this['unitID'],this['type'],this['_awaitingChangeset'],this[_0x1ed074(0x1c4)],null,[_0x5f3edd],this[_0x1ed074(0x2de)]);try{const _0x5e818f=this[_0x1ed074(0x448)][_0x1ed074(0x3af)]([_0x5f3edd],[this[_0x1ed074(0x42b)]],![]);if((0x0,_univerjs_pro_collaboration[_0x1ed074(0x3f9)])(_0x5e818f)){const {c1Prime:_0x26ed9a,c2Prime:_0x1c0733}=_0x5e818f,_0x1d1c80=this[_0x1ed074(0x448)][_0x1ed074(0x24e)](_0x26ed9a[0x0],this[_0x1ed074(0x1c4)]);if((0x0,_univerjs_pro_collaboration[_0x1ed074(0x219)])(_0x1d1c80)){const {c1Prime:_0x39f5ff,m2Prime:_0x39fdf0}=_0x1d1c80;return this[_0x1ed074(0x33c)](_0x39f5ff),_0x1c0733[0x0][_0x1ed074(0x20b)]=this[_0x1ed074(0x39d)](),this[_0x1ed074(0x1eb)](),this[_0x1ed074(0x42a)]['createInstance'](_AwaitingWithPendingState,this[_0x1ed074(0x481)],this[_0x1ed074(0x343)],_0x1c0733[0x0],_0x39fdf0,this[_0x1ed074(0x2de)],void 0x0);}throw _0x1d1c80[_0x1ed074(0x3e0)];}throw _0x5e818f[_0x1ed074(0x3e0)];}catch(_0x43eed1){return this[_0x1ed074(0x469)][_0x1ed074(0x3e0)](_0x43eed1),this[_0x1ed074(0x290)](![]);}}[_0x54582d(0x296)](_0x365d9d){const _0x37779b=_0x54582d;this[_0x37779b(0x1eb)]();if(this['_checkMissing'](_0x365d9d))return this[_0x37779b(0x42a)][_0x37779b(0x40f)](FetchingMissState,this[_0x37779b(0x481)],this[_0x37779b(0x343)],null,this['_pendingMutations'],this[_0x37779b(0x42b)],[],this[_0x37779b(0x2de)]);this[_0x37779b(0x403)]();const _0x3d742f=this[_0x37779b(0x42a)][_0x37779b(0x40f)](PendingState,this[_0x37779b(0x481)],this[_0x37779b(0x343)],this[_0x37779b(0x1c4)],this['_handler']);return _0x3d742f['_schedule'](),_0x3d742f[_0x37779b(0x479)](),_0x3d742f;}['onRemoteRej'](_0xbac638){const _0x15d36a=_0x54582d;return this[_0x15d36a(0x290)](!!(_0xbac638===null||_0xbac638===void 0x0?void 0x0:_0xbac638[_0x15d36a(0x402)]));}['onRemoteRetry'](_0x39e152){const _0x3e388b=_0x54582d;if(this[_0x3e388b(0x3ef)]>MAX_RETRY_TOTAL_TIMEOUT)return this[_0x3e388b(0x1ab)]();return this['_resendTimer']=createTimerObservable$(this[_0x3e388b(0x3b4)],{'timeout':this['_resendTimeout'],'reqId':_0x39e152[_0x3e388b(0x2ca)]}),this['_sender']=this[_0x3e388b(0x215)]['subscribe'](({reqId:_0x56c79b,timeout:_0x104273})=>{const _0x21e550=_0x3e388b;this[_0x21e550(0x240)](_0x56c79b,_0x104273);}),this;}[_0x54582d(0x1ab)](){const _0xe95d6e=_0x54582d;return this[_0xe95d6e(0x1eb)](),this['_injector'][_0xe95d6e(0x40f)](OfflineState,this['unitID'],this[_0xe95d6e(0x343)],this['_awaitingChangeset'],this['_pendingMutations'],this[_0xe95d6e(0x2de)]);}[_0x54582d(0x211)](){return this;}[_0x54582d(0x2df)](){const _0x112286=_0x54582d;this[_0x112286(0x2de)][_0x112286(0x2d6)](this[_0x112286(0x42b)]);}[_0x54582d(0x290)](_0xefe32c){const _0x3b875d=_0x54582d;return this[_0x3b875d(0x1eb)](),this[_0x3b875d(0x42a)][_0x3b875d(0x40f)](ConflictState,this[_0x3b875d(0x481)],this[_0x3b875d(0x343)],null,this[_0x3b875d(0x1c4)],this[_0x3b875d(0x2de)],_0xefe32c);}[_0x54582d(0x240)](_0x58195a,_0x47b3c9){const _0x2777e4=_0x54582d;var _0x1a1d2d;_0x58195a===((_0x1a1d2d=this[_0x2777e4(0x42b)])===null||_0x1a1d2d===void 0x0?void 0x0:_0x1a1d2d[_0x2777e4(0x2ca)])&&(this[_0x2777e4(0x2df)](),this[_0x2777e4(0x3b4)]=_0x47b3c9===0x0?0x3e8:Math[_0x2777e4(0x1d1)](_0x47b3c9*0x2,MAX_RETRY_TIMEOUT),this[_0x2777e4(0x3ef)]+=this[_0x2777e4(0x3b4)]);}[_0x54582d(0x1eb)](){const _0x549a47=_0x54582d;var _0x58d051;(_0x58d051=this['_sender'])===null||_0x58d051===void 0x0||_0x58d051[_0x549a47(0x196)](),this[_0x549a47(0x3b4)]=0x0,this[_0x549a47(0x3ef)]=0x0;}};AwaitingWithPendingState=_AwaitingWithPendingState=__decorate([__decorateParam(0x6,(0x0,_univerjs_core[_0x54582d(0x205)])(_univerjs_core[_0x54582d(0x28f)])),__decorateParam(0x7,(0x0,_univerjs_core[_0x54582d(0x205)])(_univerjs_pro_collaboration['RevisionService'])),__decorateParam(0x8,_univerjs_core[_0x54582d(0x1a6)]),__decorateParam(0x9,_univerjs_core['ILogService']),__decorateParam(0xa,_univerjs_pro_collaboration[_0x54582d(0x1af)]),__decorateParam(0xb,_univerjs_core[_0x54582d(0x2eb)]),__decorateParam(0xc,(0x0,_univerjs_core['Optional'])(ILocalCacheService))],AwaitingWithPendingState);function _0x598e(_0x41d2c1,_0x5a144b){_0x41d2c1=_0x41d2c1-0x196;const _0x1fa5ef=_0x1fa5();let _0x598ede=_0x1fa5ef[_0x41d2c1];return _0x598ede;}let ConflictState=class ConflictState extends CollaborationState{constructor(_0x2af552,_0x2611d2,_0x325ac2,_0x4428df,_0x1f49a2,_0x27bd6b=![],_0x3a4afc,_0x136e5b,_0x1224e2,_0x58c569,_0xa432f9,_0x1e044e,_0x97a239){const _0x169d2e=_0x54582d;super(_0x2af552,_0x2611d2,_0x325ac2,_0x4428df,_0x1f49a2,_0x136e5b,_0x1224e2,_0x58c569,_0x97a239),this[_0x169d2e(0x329)]=_0x27bd6b,this['_permissionService']=_0x3a4afc,this['_localeService']=_0xa432f9,this['_collaborationUIEventService']=_0x1e044e,this['localCacheService']=_0x97a239,_defineProperty(this,_0x169d2e(0x21e),CollaborationStatus[_0x169d2e(0x397)]),this[_0x169d2e(0x30c)](),this[_0x169d2e(0x45a)](),this['_disableEditing']();}[_0x54582d(0x326)](){return this;}[_0x54582d(0x41f)](){return this;}[_0x54582d(0x296)](){return this;}[_0x54582d(0x33d)](){return this;}['onRemoteRetry'](){return this;}[_0x54582d(0x1ab)](){return this;}[_0x54582d(0x211)](){return this;}['resend'](){throw new Error('[ConflictState]:\x20invalid\x20calling\x20to\x20`resend`.');}[_0x54582d(0x45a)](){const _0x49d566=_0x54582d;var _0x2b0cbe;(_0x2b0cbe=this[_0x49d566(0x310)])===null||_0x2b0cbe===void 0x0||_0x2b0cbe['updateOfflineData'](this[_0x49d566(0x481)],this[_0x49d566(0x343)],null,[]);}[_0x54582d(0x30c)](){const _0x2775b8=_0x54582d;if(this['_isPermissionRej'])this[_0x2775b8(0x350)][_0x2775b8(0x19d)]({'id':CollaborationUIEventId[_0x2775b8(0x19e)]});else this[_0x2775b8(0x350)][_0x2775b8(0x19d)]({'id':CollaborationUIEventId[_0x2775b8(0x397)]});}['_disableEditing'](){const _0x1852e0=_0x54582d;this[_0x1852e0(0x39a)]['updatePermissionPoint'](new _univerjs_sheets['WorkbookEditablePermission'](this[_0x1852e0(0x481)])['id'],![]);}};ConflictState=__decorate([__decorateParam(0x6,(0x0,_univerjs_core['Inject'])(_univerjs_core[_0x54582d(0x247)])),__decorateParam(0x7,_univerjs_core[_0x54582d(0x1a6)]),__decorateParam(0x8,_univerjs_core[_0x54582d(0x2eb)]),__decorateParam(0x9,(0x0,_univerjs_core[_0x54582d(0x205)])(_univerjs_pro_collaboration[_0x54582d(0x40c)])),__decorateParam(0xa,(0x0,_univerjs_core[_0x54582d(0x205)])(_univerjs_core[_0x54582d(0x443)])),__decorateParam(0xb,(0x0,_univerjs_core['Inject'])(CollaborationUIEventService)),__decorateParam(0xc,(0x0,_univerjs_core[_0x54582d(0x23d)])(ILocalCacheService))],ConflictState);let OfflineState=class OfflineState extends CollaborationState{constructor(_0x5b5543,_0x3b46c5,_0x500c15,_0x24557d,_0x12a0f2,_0x2189a1,_0x3dadf2,_0x10b71f,_0x3decb1,_0x2fb67f){const _0x186492=_0x54582d;super(_0x5b5543,_0x3b46c5,_0x500c15,_0x24557d,_0x12a0f2,_0x10b71f,_0x3decb1,_0x3dadf2,_0x2fb67f),this[_0x186492(0x42a)]=_0x2189a1,_defineProperty(this,_0x186492(0x21e),CollaborationStatus['OFFLINE']);}[_0x54582d(0x326)](_0x198be5){const _0x5cf572=_0x54582d;return this['_pendingMutations'][_0x5cf572(0x35d)](_0x198be5),this[_0x5cf572(0x479)](),this;}['onRemoteChangeset'](_0x47cfdd){const _0x225117=_0x54582d;throw new Error(_0x225117(0x1ca));}['onRemoteAck'](){throw new Error('[OfflineState]:\x20received\x20acknowledgement.');}[_0x54582d(0x33d)](){const _0x3028c7=_0x54582d;throw new Error(_0x3028c7(0x2e2));}['onRemoteRetry'](){return this;}[_0x54582d(0x1ab)](){return this;}[_0x54582d(0x211)](){const _0xfca854=_0x54582d,{_injector:_0x3595c2,_pendingMutations:_0x4f3566,_awaitingChangeset:_0x51f0f0,unitID:_0x266620,_handler:_0x369410,type:_0x1405d3}=this,_0x5778dc=createOnlineState(_0x3595c2,_0x266620,_0x1405d3,_0x51f0f0,_0x4f3566,_0x369410);if(_0x5778dc instanceof PendingState)_0x5778dc['_schedule']();else{if(_0x5778dc instanceof AwaitingWithPendingState||_0x5778dc instanceof AwaitingState)_0x5778dc[_0xfca854(0x2df)]();}return _0x5778dc;}[_0x54582d(0x2df)](){const _0x5f028a=_0x54582d;throw new Error(_0x5f028a(0x355));}};OfflineState=__decorate([__decorateParam(0x5,(0x0,_univerjs_core['Inject'])(_univerjs_core[_0x54582d(0x28f)])),__decorateParam(0x6,(0x0,_univerjs_core[_0x54582d(0x205)])(_univerjs_pro_collaboration['RevisionService'])),__decorateParam(0x7,_univerjs_core[_0x54582d(0x1a6)]),__decorateParam(0x8,_univerjs_core[_0x54582d(0x2eb)]),__decorateParam(0x9,(0x0,_univerjs_core[_0x54582d(0x23d)])(ILocalCacheService))],OfflineState);let FetchingMissState=class FetchingMissState extends CollaborationState{constructor(_0x2f94e4,_0x30ea12,_0x25155d,_0x4be84d,_0x36de83,_0x5bac8d,_0x18d5c2,_0x559776,_0x11f792,_0x443ff2,_0x37a3d5,_0x3235fd,_0x4469dd,_0x119898){const _0x59d24e=_0x54582d;super(_0x2f94e4,_0x30ea12,_0x25155d,_0x4be84d,_0x18d5c2,_0x37a3d5,_0x3235fd,_0x11f792,_0x119898),this[_0x59d24e(0x2cf)]=_0x36de83,this[_0x59d24e(0x378)]=_0x5bac8d,this[_0x59d24e(0x42a)]=_0x559776,this[_0x59d24e(0x469)]=_0x443ff2,this['_transformService']=_0x4469dd,this[_0x59d24e(0x286)]=_0x119898,_defineProperty(this,_0x59d24e(0x21e),CollaborationStatus[_0x59d24e(0x220)]);}[_0x54582d(0x3e3)](_0x4c0596){const _0x2f22d6=_0x54582d;try{const _0x1ba401=[..._0x4c0596,...this[_0x2f22d6(0x378)]],_0x327153=[this[_0x2f22d6(0x42b)]||this['_acknowledgedAwaitingChangeset']]['filter'](_0xcfd780=>!!_0xcfd780);let _0x36d5ec,_0xa3b1e8;if(_0x327153['length']){const _0x36d40b=this[_0x2f22d6(0x448)][_0x2f22d6(0x3af)](_0x1ba401,_0x327153,![]);if(!(0x0,_univerjs_pro_collaboration[_0x2f22d6(0x3f9)])(_0x36d40b))throw _0x36d40b['error'];_0x36d5ec=_0x36d40b[_0x2f22d6(0x28e)],_0xa3b1e8=_0x36d40b[_0x2f22d6(0x453)];}else _0x36d5ec=_0x1ba401,_0xa3b1e8=[];let _0x2ca615=this[_0x2f22d6(0x1c4)];_0x36d5ec[_0x2f22d6(0x333)](_0x2c0484=>{const _0x161882=_0x2f22d6;let _0x3f32d2;if(_0x2ca615[_0x161882(0x473)]){const _0x5ad814=this[_0x161882(0x448)]['transformMutationsWithChangeset'](_0x2c0484,_0x2ca615);if(!(0x0,_univerjs_pro_collaboration[_0x161882(0x219)])(_0x5ad814))throw _0x5ad814['error'];_0x3f32d2=_0x5ad814[_0x161882(0x28e)],_0x2ca615=_0x5ad814[_0x161882(0x379)];}else _0x3f32d2=_0x2c0484;this[_0x161882(0x33c)](_0x3f32d2);});if(this[_0x2f22d6(0x2cf)])this[_0x2f22d6(0x403)]();if(this[_0x2f22d6(0x42b)]&&_0xa3b1e8[_0x2f22d6(0x473)])_0xa3b1e8[0x0][_0x2f22d6(0x20b)]=this[_0x2f22d6(0x39d)]();let _0x3599a9;if(this[_0x2f22d6(0x42b)]&&_0x2ca615[_0x2f22d6(0x473)]!==0x0)_0x3599a9=this[_0x2f22d6(0x42a)][_0x2f22d6(0x40f)](AwaitingWithPendingState,this[_0x2f22d6(0x481)],this[_0x2f22d6(0x343)],_0xa3b1e8[0x0],_0x2ca615,this[_0x2f22d6(0x2de)],void 0x0);else{if(this['_awaitingChangeset']&&_0x2ca615[_0x2f22d6(0x473)]===0x0)_0xa3b1e8[0x0][_0x2f22d6(0x20b)]=this[_0x2f22d6(0x39d)](),_0x3599a9=this[_0x2f22d6(0x42a)][_0x2f22d6(0x40f)](AwaitingState,this[_0x2f22d6(0x481)],this[_0x2f22d6(0x343)],_0xa3b1e8[0x0],this['_handler']);else{if(_0x2ca615[_0x2f22d6(0x473)]!==0x0){const _0x1f79d1=this['_injector'][_0x2f22d6(0x40f)](PendingState,this[_0x2f22d6(0x481)],this[_0x2f22d6(0x343)],_0x2ca615,this[_0x2f22d6(0x2de)]);_0x1f79d1[_0x2f22d6(0x23f)](),_0x3599a9=_0x1f79d1;}else _0x3599a9=this[_0x2f22d6(0x42a)]['createInstance'](SyncedState,this[_0x2f22d6(0x481)],this[_0x2f22d6(0x343)],this[_0x2f22d6(0x2de)]);}}return _0x3599a9[_0x2f22d6(0x479)](),_0x3599a9;}catch(_0x1fc672){return this[_0x2f22d6(0x469)][_0x2f22d6(0x3e0)](_0x2f22d6(0x389),_0x2f22d6(0x268),_0x1fc672),this[_0x2f22d6(0x42a)]['createInstance'](ConflictState,this[_0x2f22d6(0x481)],this[_0x2f22d6(0x343)],this['_awaitingChangeset'],this[_0x2f22d6(0x1c4)],this[_0x2f22d6(0x2de)],![]);}}['resend'](){const _0x13dac3=_0x54582d;throw new Error(_0x13dac3(0x1c0));}[_0x54582d(0x326)](_0x15ae12){const _0x3df290=_0x54582d;return this[_0x3df290(0x1c4)][_0x3df290(0x35d)](_0x15ae12),this;}['onRemoteChangeset'](_0x632cbb){const _0x294254=_0x54582d;return this[_0x294254(0x378)]['push'](_0x632cbb),this;}['onRemoteAck'](_0x1e65c8){const _0x18ec7d=_0x54582d;if(this[_0x18ec7d(0x42b)])return this[_0x18ec7d(0x2cf)]=this[_0x18ec7d(0x42b)],this[_0x18ec7d(0x42b)]=null,this;throw new Error(_0x18ec7d(0x385));}[_0x54582d(0x33d)](_0x4fccf4){const _0x50aedf=_0x54582d;return this[_0x50aedf(0x290)](!!(_0x4fccf4===null||_0x4fccf4===void 0x0?void 0x0:_0x4fccf4['isPermissionRej']));}[_0x54582d(0x301)](){return this;}['toggleOffline'](){const _0x33b9b3=_0x54582d;return this[_0x33b9b3(0x42a)]['createInstance'](OfflineState,this[_0x33b9b3(0x481)],this[_0x33b9b3(0x343)],this[_0x33b9b3(0x42b)],this[_0x33b9b3(0x1c4)],this[_0x33b9b3(0x2de)]);}[_0x54582d(0x211)](){return this;}[_0x54582d(0x290)](_0x3a156d){const _0x29c48e=_0x54582d;return this['_injector'][_0x29c48e(0x40f)](ConflictState,this[_0x29c48e(0x481)],this['type'],this[_0x29c48e(0x42b)],this[_0x29c48e(0x1c4)],this['_handler'],_0x3a156d);}};FetchingMissState=__decorate([__decorateParam(0x7,(0x0,_univerjs_core[_0x54582d(0x205)])(_univerjs_core[_0x54582d(0x28f)])),__decorateParam(0x8,(0x0,_univerjs_core[_0x54582d(0x205)])(_univerjs_pro_collaboration[_0x54582d(0x40c)])),__decorateParam(0x9,_univerjs_core[_0x54582d(0x31e)]),__decorateParam(0xa,_univerjs_core[_0x54582d(0x1a6)]),__decorateParam(0xb,_univerjs_core[_0x54582d(0x2eb)]),__decorateParam(0xc,_univerjs_pro_collaboration[_0x54582d(0x1af)]),__decorateParam(0xd,(0x0,_univerjs_core['Optional'])(ILocalCacheService))],FetchingMissState);function createOnlineState(_0x1dae5,_0x17f800,_0x3083c5,_0x56d1c0,_0x44dea3,_0x4c5417){const _0x42fe2c=_0x54582d;if(_0x56d1c0&&_0x44dea3[_0x42fe2c(0x473)])return _0x1dae5[_0x42fe2c(0x40f)](AwaitingWithPendingState,_0x17f800,_0x3083c5,_0x56d1c0,_0x44dea3,_0x4c5417,void 0x0);if(_0x56d1c0)return _0x1dae5[_0x42fe2c(0x40f)](AwaitingState,_0x17f800,_0x3083c5,_0x56d1c0,_0x4c5417);if(_0x44dea3[_0x42fe2c(0x473)])return _0x1dae5[_0x42fe2c(0x40f)](PendingState,_0x17f800,_0x3083c5,_0x44dea3,_0x4c5417);return _0x1dae5[_0x42fe2c(0x40f)](SyncedState,_0x17f800,_0x3083c5,_0x4c5417);}let CollaborationEntity=class CollaborationEntity extends _univerjs_core[_0x54582d(0x21c)]{get[_0x54582d(0x368)](){return this['_state'];}constructor(_0x407587,_0x43da9f,_0x1b8c9b,_0x58d5c5,_0x3c574f,_0x2495fe,_0x38f76,_0xb816d0,_0x356680,_0x31ac56,_0x4a8068,_0x9ad0f0,_0x3bba76,_0x4642c0){const _0x393e94=_0x54582d;super(),this[_0x393e94(0x481)]=_0x407587,this['session']=_0x43da9f,this[_0x393e94(0x2da)]=_0x1b8c9b,this['_injector']=_0x58d5c5,this[_0x393e94(0x2b3)]=_0x3c574f,this[_0x393e94(0x287)]=_0x2495fe,this['_revisionService']=_0x38f76,this[_0x393e94(0x1d7)]=_0xb816d0,this['_univerInstanceService']=_0x356680,this['_logService']=_0x31ac56,this[_0x393e94(0x1b1)]=_0x4a8068,this[_0x393e94(0x39a)]=_0x9ad0f0,this[_0x393e94(0x3dd)]=_0x3bba76,this[_0x393e94(0x310)]=_0x4642c0,_defineProperty(this,_0x393e94(0x32b),new rxjs['BehaviorSubject'](null)),_defineProperty(this,_0x393e94(0x2a7),this[_0x393e94(0x32b)][_0x393e94(0x2a1)]()),_defineProperty(this,_0x393e94(0x358),void 0x0),_defineProperty(this,_0x393e94(0x2d5),![]),_defineProperty(this,'_changesetSessionId',''),_defineProperty(this,_0x393e94(0x297),0x0),_defineProperty(this,_0x393e94(0x3a1),this['state$']['pipe']((0x0,rxjs[_0x393e94(0x2b9)])(_0x11c4da=>{if(_0x11c4da)return _0x11c4da['status'];return CollaborationStatus['OFFLINE'];}),(0x0,rxjs[_0x393e94(0x2f5)])(0x1))),_defineProperty(this,_0x393e94(0x2af),![]),_defineProperty(this,'_remoteChangesetQueue',[]);}async['init'](){const _0x27b157=_0x54582d;if(this[_0x27b157(0x368)])throw new Error(_0x27b157(0x3b6));await this['_init']();}[_0x54582d(0x349)](){const _0x3959e9=_0x54582d;return this[_0x3959e9(0x2d5)]=!![],(0x0,_univerjs_core[_0x3959e9(0x2b4)])(()=>{const _0x717abb=_0x3959e9;this[_0x717abb(0x2d5)]=![],this[_0x717abb(0x203)]();});}['onLocalMutation'](_0x5ea133){const _0x2a389=_0x54582d;this[_0x2a389(0x1ee)](_0x5ea133);}[_0x54582d(0x29c)](_0x5296d5){const _0x3c61f1=_0x54582d;this['_state']=_0x5296d5,this[_0x3c61f1(0x32b)][_0x3c61f1(0x22a)](_0x5296d5);}async[_0x54582d(0x2a8)](){const _0x9d15b0=_0x54582d;this[_0x9d15b0(0x29c)](await this[_0x9d15b0(0x1d9)]());if(this[_0x9d15b0(0x3dd)]){var _0x94ed29;(_0x94ed29=this['_singleActiveUnitService'])===null||_0x94ed29===void 0x0||_0x94ed29[_0x9d15b0(0x38d)](this[_0x9d15b0(0x481)]),this['disposeWithMe'](this[_0x9d15b0(0x3dd)][_0x9d15b0(0x21a)](this[_0x9d15b0(0x481)])[_0x9d15b0(0x1c3)](_0x5daa14=>{const _0x2d39d0=_0x9d15b0;this['_logService'][_0x2d39d0(0x3e6)](_0x2d39d0(0x3f3),_0x2d39d0(0x438),_0x5daa14),_0x5daa14===UnitStatus[_0x2d39d0(0x22d)]?(this[_0x2d39d0(0x1d7)][_0x2d39d0(0x19d)]({'id':CollaborationUIEventId[_0x2d39d0(0x2ac)]}),this[_0x2d39d0(0x39a)][_0x2d39d0(0x252)](new _univerjs_sheets[(_0x2d39d0(0x20f))](this[_0x2d39d0(0x481)])['id'],![]),this[_0x2d39d0(0x39a)][_0x2d39d0(0x444)](![])):(this['_permissionService'][_0x2d39d0(0x252)](new _univerjs_sheets[(_0x2d39d0(0x20f))](this[_0x2d39d0(0x481)])['id'],!![]),this['_permissionService'][_0x2d39d0(0x444)](!![]));}));}let _0x2a2102=![];return this[_0x9d15b0(0x47f)](this[_0x9d15b0(0x308)][_0x9d15b0(0x225)][_0x9d15b0(0x1c3)](_0x5971a=>{const _0x23b9bf=_0x9d15b0;if(_0x5971a===SessionStatus[_0x23b9bf(0x2bb)])this[_0x23b9bf(0x43f)](_0x2a2102);else _0x5971a===SessionStatus[_0x23b9bf(0x391)]&&(_0x2a2102=!![],this[_0x23b9bf(0x409)]());})),this[_0x9d15b0(0x47f)](this[_0x9d15b0(0x308)]['event$']['subscribe'](_0x387bc8=>{const _0x50028b=_0x9d15b0;try{switch(_0x387bc8['eventID']){case _univerjs_pro_collaboration[_0x50028b(0x439)]['NEW_CHANGESETS']:this[_0x50028b(0x2dd)]((0x0,_univerjs_pro_collaboration['parseProtocolChangeset'])(_0x387bc8[_0x50028b(0x341)]));break;case _univerjs_pro_collaboration['CollaborationEvent'][_0x50028b(0x408)]:this[_0x50028b(0x3ca)](_0x387bc8[_0x50028b(0x341)]);break;case _univerjs_pro_collaboration['CollaborationEvent'][_0x50028b(0x292)]:this['_onRemoteRejected']();break;case _univerjs_pro_collaboration[_0x50028b(0x439)][_0x50028b(0x2e3)]:this[_0x50028b(0x1e4)](_0x387bc8[_0x50028b(0x341)]);break;case _univerjs_pro_collaboration[_0x50028b(0x439)]['PSEUDO_FETCH_MISSING_RESULT']:this[_0x50028b(0x1de)](_0x387bc8['data'][_0x50028b(0x261)][_0x50028b(0x2b9)](_0x22f947=>(0x0,_univerjs_pro_collaboration['parseProtocolChangeset'])(_0x22f947)));break;case _univerjs_pro_collaboration[_0x50028b(0x439)]['PERMISSION_REJ']:this[_0x50028b(0x474)]({'isPermissionRej':!![]});break;case _univerjs_pro_collaboration[_0x50028b(0x439)][_0x50028b(0x31c)]:break;}}catch(_0x31462d){console[_0x50028b(0x3e0)](_0x50028b(0x26c),_0x31462d);throw _0x31462d;}})),this[_0x9d15b0(0x358)];}[_0x54582d(0x321)](){const _0x105c33=_0x54582d;this[_0x105c33(0x2af)]=![];}[_0x54582d(0x33f)](){const _0x445ac3=_0x54582d;if(this[_0x445ac3(0x2af)])throw new Error(_0x445ac3(0x3c3));this['_transitionLocked']=!![];}['_onLocalMutation'](_0x204f85){const _0xa15081=_0x54582d;this[_0xa15081(0x33f)](),this[_0xa15081(0x29c)](this['_state'][_0xa15081(0x326)](_0x204f85)),this[_0xa15081(0x321)]();}[_0x54582d(0x2dd)](_0x37e60f){const _0x2fc4a9=_0x54582d;if(_0x37e60f[_0x2fc4a9(0x442)]<=this[_0x2fc4a9(0x36a)][_0x2fc4a9(0x340)](this[_0x2fc4a9(0x481)]))return;if(this['_collaborationPaused']){this['_remoteChangesetQueue']['push'](_0x37e60f);return;}this[_0x2fc4a9(0x2f3)](_0x37e60f);}[_0x54582d(0x203)](){const _0x31df92=_0x54582d;this['_remoteChangesetQueue'][_0x31df92(0x333)](_0x47477a=>this['_applyRemoteChangeset'](_0x47477a)),this[_0x31df92(0x446)]=[];}[_0x54582d(0x2f3)](_0x5402f4){const _0x567f6e=_0x54582d,_0x5bab8=this[_0x567f6e(0x2b3)][_0x567f6e(0x362)][_0x567f6e(0x1d6)](this[_0x567f6e(0x2b3)][_0x567f6e(0x362)][_0x567f6e(0x207)]()['COMPRESS_MUTATION_APPLY'])(_0x5402f4[_0x567f6e(0x334)],null)||_0x5402f4[_0x567f6e(0x334)],_0x5a0c92={..._0x5402f4,'mutations':_0x5bab8};this['_lockTransition'](),this[_0x567f6e(0x29c)](this['_state']['onRemoteChangeset'](_0x5a0c92)),this['_unlockTransition']();}[_0x54582d(0x3ca)](_0x5a3110){const _0x26392d=_0x54582d;this[_0x26392d(0x33f)](),this[_0x26392d(0x29c)](this[_0x26392d(0x358)][_0x26392d(0x296)](_0x5a3110)),this[_0x26392d(0x321)]();}['_onRemoteRejected'](_0x2f0fc0){const _0x238d13=_0x54582d;this[_0x238d13(0x33f)](),this[_0x238d13(0x29c)](this[_0x238d13(0x358)][_0x238d13(0x33d)](_0x2f0fc0)),this[_0x238d13(0x321)]();}['_onRemoteRetry'](_0x3d3435){const _0x145ca1=_0x54582d;this['_lockTransition'](),this[_0x145ca1(0x29c)](this[_0x145ca1(0x358)][_0x145ca1(0x301)](_0x3d3435)),this[_0x145ca1(0x321)]();}[_0x54582d(0x1de)](_0x32d150){const _0x52c7a0=_0x54582d;if(!(this[_0x52c7a0(0x358)]instanceof FetchingMissState))throw new TypeError(_0x52c7a0(0x1fa));const _0x4d3100=_0x32d150[_0x52c7a0(0x2b9)](_0x473186=>{const _0x531e32=_0x52c7a0,_0x226786=this[_0x531e32(0x2b3)]['interceptor'][_0x531e32(0x1d6)](this[_0x531e32(0x2b3)][_0x531e32(0x362)][_0x531e32(0x207)]()['COMPRESS_MUTATION_APPLY'])(_0x473186['mutations'],null)||_0x473186['mutations'];return{..._0x473186,'mutations':_0x226786};});this[_0x52c7a0(0x33f)](),this['_updateState'](this['_state'][_0x52c7a0(0x3e3)](_0x4d3100)),this[_0x52c7a0(0x321)]();}['_toggleOffline'](){const _0x3d4888=_0x54582d;this[_0x3d4888(0x33f)](),this['_updateState'](this[_0x3d4888(0x358)][_0x3d4888(0x1ab)]()),this['_unlockTransition']();}[_0x54582d(0x43f)](_0x2506dc=![]){const _0x57365d=_0x54582d;this[_0x57365d(0x33f)](),this[_0x57365d(0x29c)](this[_0x57365d(0x358)][_0x57365d(0x211)]()),this[_0x57365d(0x321)]();const _0x16ff04=this[_0x57365d(0x358)];_0x2506dc&&_0x16ff04 instanceof SyncedState&&(this['_lockTransition'](),this['_updateState'](_0x16ff04[_0x57365d(0x3a8)]()),this[_0x57365d(0x321)]());}async[_0x54582d(0x1d9)](){return new Promise(_0x129239=>{const _0x43fd9e=_0x598e;this[_0x43fd9e(0x308)][_0x43fd9e(0x225)]['pipe']((0x0,rxjs[_0x43fd9e(0x1db)])(0x1))[_0x43fd9e(0x1c3)](async _0x2bef1a=>{const _0x2729c7=_0x43fd9e;_0x129239(await this[_0x2729c7(0x330)](_0x2bef1a===SessionStatus[_0x2729c7(0x2bb)]));});});}[_0x54582d(0x2e8)](){const _0x8227a4=_0x54582d,_0x5a407c=this[_0x8227a4(0x481)];return{'onStateChange':(_0x59d829,_0x550631)=>{const _0x20e1e0=_0x8227a4;if(_0x59d829!==this[_0x20e1e0(0x358)])throw new Error('[CollaborationEntity]:\x20invalid\x20state\x20transition!\x20State\x20transferred\x20from\x20is\x20not\x20the\x20current\x20state.\x0aBefore:\x20'+_0x59d829[_0x20e1e0(0x21e)]+_0x20e1e0(0x1d2)+_0x550631['status']+_0x20e1e0(0x2e7)+this[_0x20e1e0(0x358)][_0x20e1e0(0x21e)]);this['_updateState'](_0x550631);},'onSendChangeset':_0x18cfc8=>{const _0x237e7a=_0x8227a4;!_0x18cfc8[_0x237e7a(0x416)]&&(_0x18cfc8[_0x237e7a(0x416)]=this[_0x237e7a(0x1c9)],_0x18cfc8['reqId']=++this[_0x237e7a(0x297)]);const _0x1e189d={'eventID':_univerjs_pro_collaboration[_0x237e7a(0x439)][_0x237e7a(0x452)],'data':{'unitID':_0x18cfc8['unitID'],'unitType':this[_0x237e7a(0x2da)],'changeset':_0x18cfc8,'memberID':this[_0x237e7a(0x308)][_0x237e7a(0x1ad)]()}};this[_0x237e7a(0x308)][_0x237e7a(0x476)](_0x1e189d,this[_0x237e7a(0x481)]);},'onMissingChangesets':({from:_0xecee4,to:_0x4c2d4e})=>{const _0x40a9b6=_0x8227a4;this[_0x40a9b6(0x469)][_0x40a9b6(0x3e6)](_0x40a9b6(0x3f3),_0x40a9b6(0x2cb)+_0xecee4+'\x20to\x20'+_0x4c2d4e);const _0x553436={'eventID':_univerjs_pro_collaboration[_0x40a9b6(0x439)][_0x40a9b6(0x1cc)],'data':{'unitID':_0x5a407c,'unitType':this[_0x40a9b6(0x2da)],'from':_0xecee4,'to':_0x4c2d4e}};this['session'][_0x40a9b6(0x476)](_0x553436,this[_0x40a9b6(0x481)]);}};}async[_0x54582d(0x330)](_0x4dcda7){const _0x13dda4=_0x54582d;var _0x53b3ae,_0x538927,_0x4311e7;const _0x3957fb=await((_0x53b3ae=this[_0x13dda4(0x310)])===null||_0x53b3ae===void 0x0?void 0x0:_0x53b3ae[_0x13dda4(0x253)](this[_0x13dda4(0x481)])),_0x2405d1=(_0x538927=_0x3957fb===null||_0x3957fb===void 0x0?void 0x0:_0x3957fb[_0x13dda4(0x334)])!==null&&_0x538927!==void 0x0?_0x538927:[],_0x16bcb0=(_0x4311e7=_0x3957fb===null||_0x3957fb===void 0x0?void 0x0:_0x3957fb['awaitingChangeset'])!==null&&_0x4311e7!==void 0x0?_0x4311e7:null,_0x32b87a=!!(_0x16bcb0===null||_0x16bcb0===void 0x0?void 0x0:_0x16bcb0[_0x13dda4(0x416)])&&!!(_0x16bcb0===null||_0x16bcb0===void 0x0?void 0x0:_0x16bcb0[_0x13dda4(0x2ca)]);this[_0x13dda4(0x1c9)]=_0x32b87a?_0x16bcb0['sid']:(0x0,_univerjs_pro_collaboration[_0x13dda4(0x1dc)])(),this[_0x13dda4(0x297)]=_0x32b87a?_0x16bcb0[_0x13dda4(0x2ca)]:0x0;const _0x13db70=this[_0x13dda4(0x481)];try{this['_replayCachedMutations'](_0x16bcb0,_0x2405d1);}catch(_0x705e79){this[_0x13dda4(0x469)]['error'](_0x705e79);}const _0x348f47=this['_createHandler']();if(_0x4dcda7){const _0x57f9f5=createOnlineState(this[_0x13dda4(0x42a)],_0x13db70,this['_type'],_0x16bcb0,_0x2405d1,_0x348f47);if(_0x57f9f5 instanceof PendingState)_0x57f9f5[_0x13dda4(0x23f)]();else{if(_0x57f9f5 instanceof AwaitingWithPendingState||_0x57f9f5 instanceof AwaitingState)_0x57f9f5[_0x13dda4(0x2df)]();}return _0x57f9f5;}return this[_0x13dda4(0x42a)][_0x13dda4(0x40f)](OfflineState,_0x13db70,this[_0x13dda4(0x2da)],_0x16bcb0,_0x2405d1,_0x348f47);}[_0x54582d(0x2ba)](_0x3e454b,_0x1eafa9){const _0x492644=_0x54582d;var _0x341ae3,_0x2ded76;const _0x8aa6c6=this['_compressMutationService'][_0x492644(0x362)]['fetchThroughInterceptors'](this[_0x492644(0x2b3)]['interceptor'][_0x492644(0x207)]()[_0x492644(0x45e)]);(_0x341ae3=_0x8aa6c6((_0x3e454b===null||_0x3e454b===void 0x0?void 0x0:_0x3e454b[_0x492644(0x334)])||[],null))===null||_0x341ae3===void 0x0||_0x341ae3['forEach'](_0x13bfc8=>this[_0x492644(0x1b1)]['executeCommand'](_0x13bfc8['id'],_0x13bfc8['params'])),(_0x2ded76=_0x8aa6c6(_0x1eafa9||[],null))===null||_0x2ded76===void 0x0||_0x2ded76[_0x492644(0x333)](_0x26fb68=>this[_0x492644(0x1b1)][_0x492644(0x224)](_0x26fb68['id'],_0x26fb68[_0x492644(0x1c6)]));}};CollaborationEntity=__decorate([__decorateParam(0x3,(0x0,_univerjs_core[_0x54582d(0x205)])(_univerjs_core['Injector'])),__decorateParam(0x4,(0x0,_univerjs_core[_0x54582d(0x205)])(_univerjs_pro_collaboration[_0x54582d(0x472)])),__decorateParam(0x5,(0x0,_univerjs_core[_0x54582d(0x205)])(_univerjs_core[_0x54582d(0x443)])),__decorateParam(0x6,(0x0,_univerjs_core['Inject'])(_univerjs_pro_collaboration[_0x54582d(0x40c)])),__decorateParam(0x7,(0x0,_univerjs_core[_0x54582d(0x205)])(CollaborationUIEventService)),__decorateParam(0x8,_univerjs_core[_0x54582d(0x3f4)]),__decorateParam(0x9,_univerjs_core[_0x54582d(0x31e)]),__decorateParam(0xa,_univerjs_core[_0x54582d(0x1a6)]),__decorateParam(0xb,_univerjs_core[_0x54582d(0x247)]),__decorateParam(0xc,(0x0,_univerjs_core[_0x54582d(0x23d)])(ISingleActiveUnitService)),__decorateParam(0xd,(0x0,_univerjs_core[_0x54582d(0x23d)])(ILocalCacheService))],CollaborationEntity);let DocCollaborationEntity=class DocCollaborationEntity extends CollaborationEntity{constructor(_0x1435d1,_0x45d210,_0x1fd16d,_0x5de1ae,_0x150b7c,_0x28e2e2,_0x589bca,_0x14f1bf,_0x44ae60,_0x11458d,_0x343614,_0x220e04,_0x4e90a3,_0x223812){const _0x36831c=_0x54582d;super(_0x1435d1,_0x1fd16d,_0x45d210,_0x5de1ae,_0x150b7c,_0x28e2e2,_0x589bca,_0x14f1bf,_0x44ae60,_0x11458d,_0x343614,_0x220e04,_0x4e90a3,_0x223812),this[_0x36831c(0x481)]=_0x1435d1,this['type']=_0x45d210,_defineProperty(this,'_handlerCallback',null);}[_0x54582d(0x2d2)](_0x38d97a){const _0x4acc5d=_0x54582d;this[_0x4acc5d(0x34b)]=_0x38d97a;}[_0x54582d(0x27d)](){const _0x3478b7=_0x54582d;this[_0x3478b7(0x34b)]=null,super[_0x3478b7(0x27d)]();}[_0x54582d(0x2e8)](){const _0x34df73=_0x54582d,_0x547d3a=super['_createHandler']();return _0x547d3a[_0x34df73(0x208)]=_0x2e00e3=>{const _0xe4fece=_0x34df73;var _0x4c106d,_0x4506c3;return(_0x4c106d=this[_0xe4fece(0x34b)])===null||_0x4c106d===void 0x0||(_0x4506c3=_0x4c106d['onTransformIME'])===null||_0x4506c3===void 0x0?void 0x0:_0x4506c3[_0xe4fece(0x46d)](_0x4c106d,_0x2e00e3);},_0x547d3a['onTransformState']=_0x1371ec=>{const _0x41d16f=_0x34df73;var _0x406e94,_0x56fc84;return(_0x406e94=this[_0x41d16f(0x34b)])===null||_0x406e94===void 0x0||(_0x56fc84=_0x406e94['onTransformState'])===null||_0x56fc84===void 0x0?void 0x0:_0x56fc84[_0x41d16f(0x46d)](_0x406e94,_0x1371ec);},_0x547d3a[_0x34df73(0x422)]=_0x58f0d7=>{const _0x491ebd=_0x34df73;var _0x22fca8,_0x59e3ca;return(_0x22fca8=this[_0x491ebd(0x34b)])===null||_0x22fca8===void 0x0||(_0x59e3ca=_0x22fca8[_0x491ebd(0x422)])===null||_0x59e3ca===void 0x0?void 0x0:_0x59e3ca[_0x491ebd(0x46d)](_0x22fca8,_0x58f0d7);},_0x547d3a[_0x34df73(0x243)]=_0x18cdf7=>{const _0x596289=_0x34df73;var _0x29bfd0,_0x268d9a;return(_0x29bfd0=this[_0x596289(0x34b)])===null||_0x29bfd0===void 0x0||(_0x268d9a=_0x29bfd0[_0x596289(0x243)])===null||_0x268d9a===void 0x0?void 0x0:_0x268d9a[_0x596289(0x46d)](_0x29bfd0,_0x18cdf7);},_0x547d3a[_0x34df73(0x46a)]=_0x99cfdd=>{const _0x4c9c74=_0x34df73;var _0x199734,_0x9db343,_0x47885b;if(!((_0x199734=this[_0x4c9c74(0x34b)])===null||_0x199734===void 0x0?void 0x0:_0x199734[_0x4c9c74(0x46a)]))throw new Error(_0x4c9c74(0x267));return(_0x9db343=this[_0x4c9c74(0x34b)])===null||_0x9db343===void 0x0||(_0x47885b=_0x9db343['onTransformRemoteChangesetByIMECache'])===null||_0x47885b===void 0x0?void 0x0:_0x47885b['call'](_0x9db343,_0x99cfdd);},_0x547d3a[_0x34df73(0x3be)]=_0x565422=>{const _0x14b068=_0x34df73;var _0x388eae,_0x55b7dd,_0x238c44;if(!((_0x388eae=this['_handlerCallback'])===null||_0x388eae===void 0x0?void 0x0:_0x388eae['onTransformRemoteChangesetByStateCache']))throw new Error(_0x14b068(0x23e));return(_0x55b7dd=this['_handlerCallback'])===null||_0x55b7dd===void 0x0||(_0x238c44=_0x55b7dd['onTransformRemoteChangesetByStateCache'])===null||_0x238c44===void 0x0?void 0x0:_0x238c44[_0x14b068(0x46d)](_0x55b7dd,_0x565422);},_0x547d3a;}async[_0x54582d(0x2a8)](){const _0x4c2afc=_0x54582d,_0x515e16=await super['_init']();return this[_0x4c2afc(0x47f)](this[_0x4c2afc(0x1b1)]['onMutationExecutedForCollab']((_0x185fdc,_0x4a7a67)=>{const _0x16e15a=_0x4c2afc;if(_0x185fdc[_0x16e15a(0x343)]!==_univerjs_core['CommandType']['MUTATION']||(_0x4a7a67===null||_0x4a7a67===void 0x0?void 0x0:_0x4a7a67[_0x16e15a(0x20c)])||(_0x4a7a67===null||_0x4a7a67===void 0x0?void 0x0:_0x4a7a67[_0x16e15a(0x387)]))return;if(_0x185fdc['id']===_univerjs_docs['RichTextEditingMutation']['id'])return;const _0x581f71=_0x185fdc['params'];if((_0x581f71===null||_0x581f71===void 0x0?void 0x0:_0x581f71[_0x16e15a(0x313)])!==this[_0x16e15a(0x481)])return;const _0x302bc8=_0x185fdc,_0x2bfafb=this['_compressMutationService'][_0x16e15a(0x362)][_0x16e15a(0x1d6)](this[_0x16e15a(0x2b3)]['interceptor'][_0x16e15a(0x207)]()[_0x16e15a(0x36e)])([_0x302bc8],this[_0x16e15a(0x46c)])||[_0x302bc8];this[_0x16e15a(0x1ee)](_0x2bfafb[0x0]);})),_0x515e16;}};DocCollaborationEntity=__decorate([__decorateParam(0x3,(0x0,_univerjs_core[_0x54582d(0x205)])(_univerjs_core['Injector'])),__decorateParam(0x4,(0x0,_univerjs_core[_0x54582d(0x205)])(_univerjs_pro_collaboration[_0x54582d(0x472)])),__decorateParam(0x5,(0x0,_univerjs_core[_0x54582d(0x205)])(_univerjs_core[_0x54582d(0x443)])),__decorateParam(0x6,(0x0,_univerjs_core['Inject'])(_univerjs_pro_collaboration[_0x54582d(0x40c)])),__decorateParam(0x7,(0x0,_univerjs_core[_0x54582d(0x205)])(CollaborationUIEventService)),__decorateParam(0x8,_univerjs_core[_0x54582d(0x3f4)]),__decorateParam(0x9,_univerjs_core['ILogService']),__decorateParam(0xa,_univerjs_core['ICommandService']),__decorateParam(0xb,_univerjs_core[_0x54582d(0x247)]),__decorateParam(0xc,(0x0,_univerjs_core[_0x54582d(0x23d)])(ISingleActiveUnitService)),__decorateParam(0xd,(0x0,_univerjs_core['Optional'])(ILocalCacheService))],DocCollaborationEntity);let SheetCollaborationEntity=class SheetCollaborationEntity extends CollaborationEntity{constructor(_0x424fe2,_0x265eff,_0x1ee9ce,_0x5dc947,_0x171ce9,_0x254979,_0x11461b,_0x1a7a6a,_0x18d93e,_0x3f0ae2,_0x277bd6,_0x2464e6,_0x329cb0,_0x49616b,_0x49eb82){const _0xcb0e4b=_0x54582d;super(_0x424fe2,_0x1ee9ce,_0x265eff,_0x5dc947,_0x171ce9,_0x254979,_0x11461b,_0x18d93e,_0x3f0ae2,_0x277bd6,_0x2464e6,_0x329cb0,_0x49616b,_0x49eb82),this[_0xcb0e4b(0x481)]=_0x424fe2,this['type']=_0x265eff,this['_sheetTransformSelectionsService']=_0x1a7a6a;}['_createHandler'](){const _0x2db64c=_0x54582d,_0x2ae3df=super[_0x2db64c(0x2e8)]();return _0x2ae3df[_0x2db64c(0x422)]=_0x28bbba=>this['_sheetTransformSelectionsService'][_0x2db64c(0x198)](_0x28bbba),_0x2ae3df;}async[_0x54582d(0x2a8)](){const _0x25bb10=_0x54582d,_0x421a12=await super[_0x25bb10(0x2a8)]();return this[_0x25bb10(0x47f)](this[_0x25bb10(0x1b1)]['onMutationExecutedForCollab']((_0x57c855,_0x1a17b9)=>{const _0x212920=_0x25bb10;if(_0x57c855[_0x212920(0x343)]!==_univerjs_core[_0x212920(0x2f9)][_0x212920(0x275)]||(_0x1a17b9===null||_0x1a17b9===void 0x0?void 0x0:_0x1a17b9[_0x212920(0x20c)])||(_0x1a17b9===null||_0x1a17b9===void 0x0?void 0x0:_0x1a17b9[_0x212920(0x387)]))return;const _0xbbfbaa=_0x57c855[_0x212920(0x1c6)];if((_0xbbfbaa===null||_0xbbfbaa===void 0x0?void 0x0:_0xbbfbaa['unitId'])!==this[_0x212920(0x481)])return;const _0x55d60b=_0x57c855,_0x5ebc94=this[_0x212920(0x2b3)][_0x212920(0x362)]['fetchThroughInterceptors'](this[_0x212920(0x2b3)][_0x212920(0x362)][_0x212920(0x207)]()[_0x212920(0x36e)])([_0x55d60b],this[_0x212920(0x46c)])||[_0x55d60b];this[_0x212920(0x1ee)](_0x5ebc94[0x0]);})),_0x421a12;}};SheetCollaborationEntity=__decorate([__decorateParam(0x3,(0x0,_univerjs_core[_0x54582d(0x205)])(_univerjs_core[_0x54582d(0x28f)])),__decorateParam(0x4,(0x0,_univerjs_core[_0x54582d(0x205)])(_univerjs_pro_collaboration['CompressMutationService'])),__decorateParam(0x5,(0x0,_univerjs_core['Inject'])(_univerjs_core[_0x54582d(0x443)])),__decorateParam(0x6,(0x0,_univerjs_core['Inject'])(_univerjs_pro_collaboration[_0x54582d(0x40c)])),__decorateParam(0x7,(0x0,_univerjs_core[_0x54582d(0x205)])(SheetTransformSelectionsService)),__decorateParam(0x8,(0x0,_univerjs_core['Inject'])(CollaborationUIEventService)),__decorateParam(0x9,_univerjs_core[_0x54582d(0x3f4)]),__decorateParam(0xa,_univerjs_core[_0x54582d(0x31e)]),__decorateParam(0xb,_univerjs_core[_0x54582d(0x1a6)]),__decorateParam(0xc,_univerjs_core['IPermissionService']),__decorateParam(0xd,(0x0,_univerjs_core['Optional'])(ISingleActiveUnitService)),__decorateParam(0xe,(0x0,_univerjs_core[_0x54582d(0x23d)])(ILocalCacheService))],SheetCollaborationEntity);const INetworkConditionService=(0x0,_univerjs_core[_0x54582d(0x1e1)])(_0x54582d(0x1b6));function _0x1fa5(){const _0x992868=['_initMergeInterceptor','COMPRESS_MUTATION_SEND','CombCmd','_undoStacks','&source=','snapshot','_snapshotService','connection\x20error','_candidateSocket','13474kZFGZh','slice','_queuedRemoteChangesets','m2Prime','FileId','close','RichTextEditingMutation','now','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','resourceIDs','post','not_collab','put','[DataLoaderService]','CollaborationSession','[FetchingMissState]:\x20not\x20expected\x20to\x20receive\x20ack\x20when\x20`this._awaitingChangeset`\x20is\x20null!','updatePermissionObjEvent','onlyLocal','getResourcesRequest','[FetchMissState]','getCurrentUser','SheetPermissionInitController','CollaborativeUndoRedoService','editingUnit','[serializeCombRequest]:\x20should\x20not\x20fall\x20into\x20default\x20branch!','_status$','_onUserJoin','OFFLINE','_httpService','/object','session.room-permission-denied','image/gif','session.join-failed','CONFLICT','getUnitType','originalMeta','_permissionService','_onCombEvent','[UniverCollaborationClientPlugin]:\x20you\x20must\x20provide\x20a\x20socketService\x20implementation\x20in\x20config!','_getCurrentRevision','deleteCollaborator','_imageSourceCache','saveChangeset','status$','splice','MemberService','awaiting_with_pending','removeMember','transformUndoRedo','Quantity','fetchMiss','withCredentials','getActiveSheet','file','USERS_ENTER','updateSnapshot','deserializeToCombResponse','transformChangesets','_clearUndo','getSnapshotAPIPath','getTime','_getRedoStack','_resendTimeout','isInternalEditorID','[CollaborationEntity]:\x20initial\x20state\x20has\x20been\x20created\x20before.\x20You\x20should\x20not\x20call\x20\x22init\x22\x20twice.','UniverCollaborationPlugin','_roomMembers','signUrlServerUrl','fetch_missing','closeSession','_shouldReportTelemetry','AWAITING','onTransformRemoteChangesetByStateCache','_event$','_transformRemoteChangesetByStateCache','_transformStack','_registerDependencies','[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.','/-/object/-/batch_allowed','packageName','save\x20fail\x20reason\x20is\x20','BehaviorSubject','INGEST','_onRecvEvent','_onRemoteACK','UniverNetworkPlugin','OPTIONAL','JOINING','_sessionStatus$','_members','_getUndoStack','_retryCount','href','enableCollaboration','_cfgEnableObjInherit','waitForRoom$','result','onStarting','getImage','dispose$','SNAPSHOT_URL_KEY','/fetchmissing?from=','_rescheduleHeartbeat','_singleActiveUnitService','getConfig','collaborators','error','unit-cache-','univer-pro.collaboration-client-socket-service','onMissedChangesetFetched','complete','30eWDQmv','debug','setCurrentUser','_throwTelemetryCollaborationNewChangeset','awaitingChangeset','members','_updateStatus','MSG_FOR_ERROR','SheetCollaborationEntity','duration','_maxTotalRetryTimeout','startTime','CollaborationImageIoService','values','[CollaborationEntity]','IUniverInstanceService','selections','GLOBAL_ROOMS_CNT_EXCEEDS','_syncEditingCollabCursor','patch','isTransformChangesetsSuccess','generateRandomId','JOIN_ROOM_FULL','location','_timeoutTimer','IImageIoService','loginUrlKey','getCollabEntity','_entities','isPermissionRej','_incrementRevisionNumber','updateOfflineData','[CollaborationUndoRedoService]','IMentionIOService','ERROR_EXCEED_SIZE','CHANGESET_ACK','_toggleOffline','AwaitingWithPendingState','_redoStacks','RevisionService','_getDownloadEndpointURL','_joinRoom','createInstance','capture','CmdRspCode','Disposable','startsWith','listCollaborators','getAllMembers','sid','headers','&to=','DataLoaderService','HEARTBEAT','SheetTransformSelectionsService','CollaborationUIEventId','_fetchMissChangesets','submit\x20changeset\x20error!','onRemoteChangeset','image/jpg','focused$','onTransformSelections','sheets','_snapshotServerService','UnitEmbedded','mapDocumentTypeToUniverInstanceType','_scheduleCollaborationTimeoutTimer','subject','localeService','_injector','_awaitingChangeset','_scheduleCompleteTimestamp','_transformStateCache','BASE64','version','updateCollaborator','allowed','message$','CollaborationController','_unitID','cmd','onload','_listenToNetworkCondition','editing\x20status\x20changed\x20to','CollaborationEvent','delete','workbook','_onMessage','UUID','ISnapshotServerService','_toggleOnline','_stopTelemetryCollaborationNewChangeset','image/png','revision','LocaleService','setShowComponents','default','_remoteChangesetQueue','LocalUndoRedoService','_transformService','getMember','_retryConnectingTimer','method','permissionRejEvent','you\x20should\x20override\x20\x22IUndoRedoService\x22\x20provided\x20in\x20\x22core\x22\x20package!','textEncoder','IContextService','DisposableCollection','collabWebSocketUrl','SUBMIT_CHANGESET','c2Prime','ICollaborationSocketService','NO_OTHER_CLIENTS_EDITING','EmptyMutationInfo','/universer-api/stream/file/upload','_telemetryInfo','cbc','_clearLocalCache','onTransformState','refreshPermission','compose','COMPRESS_MUTATION_APPLY','b64DecodeUnicode','SnapshotServerOverHTTPService','_checkMissing','0.21.1','UPDATE_CURSOR','RECV','_change$','DEFAULT_REMOTE_UNISCRIPT_EXECUTION_ENDPOINT','getFocusedUnit','_socketService','_logService','onTransformRemoteChangesetByIMECache','memberID','_univerInstanceService','call','encodeURIComponent','createSocket','function','then','CompressMutationService','length','_onRemoteRejected','collaboratorID','send','getValue','firstValueFrom','_updateLocalCache','action','HEARTBEAT_TIMEOUT','getTypeOfUnitAdded$','SUCCUSS','uniscriptRunEvent','disposeWithMe','/allowed','unitID','UniverCollaborationClientPlugin','?url=','DEFAULT_WS_SESSION_TICKET_URL','unsubscribe','pipe','transformSelections','ReplaySubject','JSONX','339808nOaAhl','serializeCombRequest','emitEvent','PERMISSION_DENIED','[SyncedState]:\x20received\x20rejection.','parse','merge','IDLE','AWAITING_WITH_PENDING','includes','ERROR_IMAGE','ICommandService','_submitChangeset','34pfQMIQ','filter','subUnitId','toggleOffline','[PendingState]:\x20received\x20acknowledgement.','getMemberID','reject','ITransformService','_getCtorByUniverInstanceType','_commandService','list','actions','_transformSelections','UniverLicensePlugin','univer-pro.collaboration-client.network-condition.service','has','sessionStatus','[PendingState]:\x20invalid\x20calling\x20to\x20`resend`.','RETRY_CONNECTING_MAX_COUNT','open$','objectType','PENDING','DEFAULT_COLLAB_WEB_SOCKET_URL','code','[FetchingMissState]:\x20invalid\x20calling\x20to\x20`resend`.','[CollaborationController]:\x20invalid\x20univer\x20type:\x20','_instanceService','subscribe','_pendingMutations','entityInit$','params','requestParams','textRanges','_changesetSessionId','[OfflineState]:\x20received\x20changeset.','_collabSessionService','FETCH_MISSING','getCurrentSelections','synced','RETRY_CONNECTING_MAX_COUNT_KEY','delay','min','\x0aAfter:\x20','encrypt','object','readyForCollab','fetchThroughInterceptors','_eventService','Cannot\x20assemble\x20a\x20changeset\x20from\x20multiple\x20mutations\x20of\x20different\x20types:\x20','_createInitialState','_networkConditionService','take','uuidv4','[CollaborationSessionService]','_onFetchMissResult','[PendingState]:\x20received\x20rejection.','FAIL','createIdentifier','@univerjs-pro/collaboration-client','collaboration-client.config','_onRemoteRetry','_getAPIPrefixPath','toStringTag','uploadFileServerUrl','initWorkbookPermissionChange','96chQPJa','leaveEvent','_clearScheduledTask','charCodeAt','getTypeOfUnitDisposed$','_onLocalMutation','_sendingTimer','_onOffline','This\x20method\x20should\x20not\x20be\x20called\x20on\x20the\x20client\x20side!','csRejEvent','_commentService','getImageSourceCache','concatBytes','append','add','_clearRedo','UNIVER_SHEET','[CollaborationEntity]:\x20cannot\x20apply\x20missing\x20results\x20on\x20other\x20states!','batchAllowed','shouldCloseConn','joinRsp','src','confirm','onStateChange','loadUnit','userID','_exhaustRemoteChangesetQueue','cfgEnableObjInherit','Inject','eventID','getInterceptPoints','onTransformIME','isArray','ISocketService','baseRev','fromCollab','roomInfos','HEARTBEAT_INTERVAL','WorkbookEditablePermission','CollaborationEntity','toggleOnline','_onConnectionOpen','915639vpyGTw','OfflineState','_resendTimer','NOT_COLLAB','[UniverCollaborationClientPlugin]','HEARTBEAT_TIMEOUT_KEY','isTransformMutationsWithChangesetSuccess','getUnitStatus$','unknown','RxDisposable','HEARTBEAT_INTERVAL_KEY','status','_socket','FETCH_MISS','/universer-api/authz','_emitMembers','_undoRedoService','executeCommand','sessionStatus$','objects','_collaborationSessionService','_members$','REMOTE_UNISCRIPT_EXECUTION_ENDPOINT','next','_onUserLeave','error$','OTHER_CLIENTS_EDITING','AwaitingState','range','_initDependencies','/block/','HELLO','JOIN_ROOM_FAILED','_tryReconnect','override','_createSocket','SOCKET_FAILED_RETRY','_roomCreated$','size','_substituteUndoStack','6426260jTGheh','DEFAULT_FILE_NAME','Optional','onTransformRemoteChangesetByStateCache\x20callback\x20is\x20not\x20added\x20yet.','_schedule','_resendWithTimeout','ErrorCode','MentionIoHttpService','onSyncEditingCollabCursor','loadDoc','LIVESHARE_FETCH_OPERATIONS','routeKey','IPermissionService','PendingState','_clearRetryConnectingTimer','_memberService','decorate','/role','csShouldRetryEvent','transformMutationsWithChangeset','INetworkConditionService','[CollaborationSession]:\x20should\x20not\x20send\x20message\x20when\x20the\x20session\x20is\x20offline!','/resources','updatePermissionPoint','loadOfflineData','getCollabEntity$','equals','/universer-api/comb','incrementRevOfUnit','auth.needGotoLoginAlert','create','_sendHeartbeat','replace','_socketReady','resolve','USERS_LEAVE','requireSession','_socket$','changesets','from','Subject','LIVESHARE_TERMINATE','_initRequestHeader','_getLoginPath','onTransformRemoteChangesetByIMECache\x20callback\x20is\x20not\x20added\x20yet.','failed\x20to\x20apply\x20missed\x20changesets!','_getSignURL','InsertSheetMutation','enableSingleActiveInstanceLock','Error\x20on\x20receiving\x20event','responseType','downloadEndpointUrl','saveSnapshot','SUBMIT_CHANGESET_TIMEOUT','FetchingMissState','session.room-not-exists','apply','change$','MUTATION','stringify','init','update','People','PERSON','getLocalCacheKey','ws://127.0.0.1:8000/universer-api/comb/connect','dispose','SheetsSelectionsService','getUnitId','_initUnitPermissionChange','[CollaborationSocketService]:\x20failed\x20to\x20get\x20web\x20socket\x20factory!','fetchMissingChangesets','AuthzIoHttpService','/-/object/list','_commentUpdate$','localCacheService','_localeService','stopTime','fetching\x20the\x20latest\x20document\x20from\x20the\x20server.','?size=','ConflictState','LOCAL_CACHE_INTERVAL','_entityInit$','c1Prime','Injector','_onConflict','SYNCED','CHANGESET_REJ','string','socket\x20close','4iSxDIa','onRemoteAck','_changesetReqId','set','_clearTimeoutTimer','SyncedState','randomBytes','_updateState','/new_changes','IConfigService','3501396rZBYPk','onCommentUpdate','asObservable','CommentService','roles','[PendingState]:\x20unhandled\x20univer\x20type:\x20','_getAPIPrefix','PSEUDO_FETCH_MISSING_RESULT','state$','_init','LIVESHARE_OPERATION','_getSendChangesetTimeout','liveShareNewHost','OTHER_CLIENT_EDITING','ImageUploadStatusType','getSheetBlock','_transitionLocked','liveShareOperation','Tools','CollaborationUIEventService','_compressMutationService','toDisposable','putCollaborators','/collaborator','_tryEnsureSocket','hostname','map','_replayCachedMutations','ONLINE','101755XvxrSp','updateMember','commentUpdateEvent','undefined','clear','Univer','_decreaseWaiting','utf8ToBytes','UPDATE_PERMISSION_OBJ','[CollaborationSessionService]:\x20socket\x20error','SHOULD_CLOSE_CONN','registerHTTPInterceptor','get','defineProperty','reqId','fetching\x20missing\x20changesets\x20from\x20','Rectangle','getDeserializedSheetBlock','parseChangesetToProtocol','_acknowledgedAwaitingChangeset','JOIN_ROOM_NOT_EXISTS','awaiting','addHandlerCallback','getOwnPropertyDescriptor','[CollaborationSession]','_collaborationPaused','onSendChangeset','/universer-api/snapshot/','getUnitOnRev','_substituteRedoStack','_type','fromCharCode','touchDependencies','_onRemoteChangeset','_handler','resend','[CollaborationState]:\x20apply\x20error!','every','[OfflineState]:\x20received\x20rejection.','CHANGESET_SHOULD_RETRY','_doCreateSocket','session.room-cnt-exceeds','UNIVER_DOC','\x0aCurrent:\x20','_createHandler','socketService','_config','IUndoRedoService','_sessions','setConfig','_waitCount','\x20in\x20_schedule.','createCollaborator','socket$','MentionType','_applyRemoteChangeset','event$','shareReplay','/unit/','setCfgEnableObjInherit','enableOfflineEditing','CommandType','members$','isTransformMutationsWithChangesetFailure','18342115ELtsIr','UniverInstanceType','collaboration_new_changeset','body','HTTPService','onRemoteRetry','url','JOIN','getGlobalObject','LIVESHARE_NEW_HOST','/object/','_HTTPService','session','resolveWithBasePath','_socketMessageSubscription','COMMENT_UPDATE','_showConflictNotification','catch','collaboration-client.local-cache-service','_onJoinRoomEvent','_localCacheService','_clearHeartbeatTimer','onMissingChangesets','unitId','getLatestCsReqIdBySid','target','_startCollaboration','CLOSE_ROOM','reconnect','{fileID}','_onConnectionFailed','LEAVE','UNISCRIPT_RUN','HTTPRequest','ILogService','symbol','findIndex','_unlockTransition','reduce','disableLocalCache','takeUntil','Unknown\x20type.\x20Will\x20not\x20load\x20files\x20from\x20remote\x20address.','appendMutation','\x20-\x20','_unitInfo$','_isPermissionRej','_sender','_state$','transformStack\x20failed!','COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY','_waitForHeartbeatResponse','toString','_createInitialStateImpl','_startTelemetryCollaborationNewChangeset','DependentOn','forEach','mutations','_telemetryService','SetSelectionsOperation','_clearCollaborationTimeoutTimer','_removeRoom','Workbook','[SyncedState]:\x20received\x20acknowledgement.','close$','_executeRemoteChangeset','onRemoteRej','ImageSourceType','_lockTransition','getCurrentRevOfUnit','data','FileSource','type','_initCloseConn','_configService','deepClone','POST','_getUploadFileURL','pauseCollaboration','ITelemetryService','_handlerCallback','find','objectID','IAuthzIoService','PERMISSION_REJ','_collaborationUIEventService','commentUpdate$','getCfgEnableObjInherit','_replaceFileID','reverse','[OfflineState]:\x20invalid\x20calling\x20to\x20`resend`.','DocCollaborationEntity','offline','_state','_sendHeartbeatTimer','name','telemetry\x20info\x20is\x20not\x20initialized','loadUnitOfRevision','push','unit','getSheetId','encode','UNIVER_COLLABORATION_CLIENT_PLUGIN','interceptor','sendChangesetTimeout','addImageSourceCache','_collaborationTimeoutTimer','LIVESHARE_REQUEST_HOST','snapshotServerUrl','state','copyFileMeta','_revisionService','_transformIMECache','updateCursorEvent'];_0x1fa5=function(){return _0x992868;};return _0x1fa5();}function deserializeToCombResponse(_0x2d076d){const _0x375155=_0x54582d,_0x48df0f=_0x2d076d[_0x375155(0x341)],_0x258c80=JSON[_0x375155(0x1a0)](_0x48df0f);switch(_0x258c80[_0x375155(0x435)]){case _univerjs_protocol[_0x375155(0x36f)][_0x375155(0x41a)]:case _univerjs_protocol[_0x375155(0x36f)]['HELLO']:{const _0x5a15ab=_0x258c80['infoRsp'];return{..._0x258c80,'data':_0x5a15ab,'cmd':_0x258c80['cmd']};}case _univerjs_protocol['CombCmd'][_0x375155(0x303)]:{const _0x23f267=_0x258c80[_0x375155(0x1fd)];return{..._0x258c80,'data':_0x23f267,'cmd':_0x258c80[_0x375155(0x435)]};}case _univerjs_protocol[_0x375155(0x36f)][_0x375155(0x464)]:{const _0xd00cc5=_0x258c80['collaMsg'];switch(_0xd00cc5[_0x375155(0x206)]){case _univerjs_pro_collaboration[_0x375155(0x439)][_0x375155(0x34f)]:var _0x194b05;return{..._0x258c80,'data':{..._0xd00cc5,'data':(_0x194b05=_0xd00cc5[_0x375155(0x44c)])===null||_0x194b05===void 0x0?void 0x0:_0x194b05['cs']},'cmd':_0x258c80['cmd']};case _univerjs_pro_collaboration[_0x375155(0x439)]['CHANGESET_ACK']:var _0x236103;return{..._0x258c80,'data':{..._0xd00cc5,'data':(_0x236103=_0xd00cc5['csAckEvent'])===null||_0x236103===void 0x0?void 0x0:_0x236103['cs']},'cmd':_0x258c80['cmd']};case _univerjs_pro_collaboration[_0x375155(0x439)]['NEW_CHANGESETS']:var _0x2218ff;return{..._0x258c80,'data':{..._0xd00cc5,'data':(_0x2218ff=_0xd00cc5['newCsEvent'])===null||_0x2218ff===void 0x0?void 0x0:_0x2218ff['cs']},'cmd':_0x258c80['cmd']};case _univerjs_pro_collaboration[_0x375155(0x439)][_0x375155(0x292)]:var _0x1a730b;return{..._0x258c80,'data':{..._0xd00cc5,'data':(_0x1a730b=_0xd00cc5[_0x375155(0x1f2)])===null||_0x1a730b===void 0x0?void 0x0:_0x1a730b['cs']},'cmd':_0x258c80[_0x375155(0x435)]};case _univerjs_pro_collaboration[_0x375155(0x439)][_0x375155(0x2e3)]:var _0x472648;return{..._0x258c80,'data':{..._0xd00cc5,'data':(_0x472648=_0xd00cc5[_0x375155(0x24d)])===null||_0x472648===void 0x0?void 0x0:_0x472648['cs']},'cmd':_0x258c80[_0x375155(0x435)]};case _univerjs_pro_collaboration['CollaborationEvent'][_0x375155(0x463)]:return{..._0x258c80,'data':{..._0xd00cc5,'data':_0xd00cc5[_0x375155(0x36c)]},'cmd':_0x258c80[_0x375155(0x435)]};case _univerjs_pro_collaboration[_0x375155(0x439)]['USERS_ENTER']:return{..._0x258c80,'data':{..._0xd00cc5,'data':_0xd00cc5['joinEvent']},'cmd':_0x258c80[_0x375155(0x435)]};case _univerjs_pro_collaboration['CollaborationEvent'][_0x375155(0x25e)]:return{..._0x258c80,'data':{..._0xd00cc5,'data':_0xd00cc5[_0x375155(0x1ea)]},'cmd':_0x258c80[_0x375155(0x435)]};case _univerjs_pro_collaboration['CollaborationEvent'][_0x375155(0x305)]:return{..._0x258c80,'data':{..._0xd00cc5,'data':_0xd00cc5[_0x375155(0x2ab)]},'cmd':_0x258c80[_0x375155(0x435)]};case _univerjs_pro_collaboration[_0x375155(0x439)][_0x375155(0x245)]:case _univerjs_pro_collaboration[_0x375155(0x439)]['LIVESHARE_OPERATION']:return{..._0x258c80,'data':{..._0xd00cc5,'data':_0xd00cc5[_0x375155(0x2b0)]},'cmd':_0x258c80[_0x375155(0x435)]};case _univerjs_pro_collaboration[_0x375155(0x439)]['LIVESHARE_TERMINATE']:return{..._0x258c80,'data':{..._0xd00cc5,'data':_0xd00cc5['liveShareNewHost']},'cmd':_0x258c80[_0x375155(0x435)]};case _univerjs_pro_collaboration[_0x375155(0x439)][_0x375155(0x3ec)]:return{..._0x258c80,'data':_0xd00cc5,'cmd':_0x258c80[_0x375155(0x435)]};case _univerjs_pro_collaboration[_0x375155(0x439)][_0x375155(0x30b)]:return{..._0x258c80,'data':{..._0xd00cc5,'data':_0xd00cc5[_0x375155(0x2be)]},'cmd':_0x258c80['cmd']};case _univerjs_pro_collaboration[_0x375155(0x439)][_0x375155(0x2c4)]:return{..._0x258c80,'data':{..._0xd00cc5,'data':_0xd00cc5[_0x375155(0x386)]},'cmd':_0x258c80[_0x375155(0x435)]};case _univerjs_pro_collaboration[_0x375155(0x439)][_0x375155(0x2c6)]:return{..._0x258c80,'data':{..._0xd00cc5,'data':_0xd00cc5[_0x375155(0x1fc)]},'cmd':_0x258c80[_0x375155(0x435)]};case _univerjs_pro_collaboration[_0x375155(0x439)]['UNISCRIPT_RUN']:return{..._0x258c80,'data':{..._0xd00cc5,'data':_0xd00cc5[_0x375155(0x47e)]},'cmd':_0x258c80[_0x375155(0x435)]};default:return _0x258c80;}}default:return _0x258c80;}}function serializeCombRequest(_0xfbe623){const _0x4b902e=_0x54582d;switch(_0xfbe623[_0x4b902e(0x435)]){case _univerjs_protocol[_0x4b902e(0x36f)][_0x4b902e(0x41a)]:case _univerjs_protocol['CombCmd'][_0x4b902e(0x232)]:return JSON[_0x4b902e(0x276)]({'cmd':_0xfbe623[_0x4b902e(0x435)],'routeKey':_0xfbe623[_0x4b902e(0x246)]});case _univerjs_protocol[_0x4b902e(0x36f)][_0x4b902e(0x3c8)]:{let _0x267a78;switch(_0xfbe623[_0x4b902e(0x341)]['eventID']){case _univerjs_pro_collaboration[_0x4b902e(0x439)][_0x4b902e(0x463)]:_0x267a78={'eventID':_univerjs_pro_collaboration[_0x4b902e(0x439)][_0x4b902e(0x463)],'updateCursorEvent':_0xfbe623[_0x4b902e(0x341)]['data']};break;case _univerjs_pro_collaboration['CollaborationEvent'][_0x4b902e(0x25e)]:_0x267a78={'eventID':_univerjs_pro_collaboration['CollaborationEvent'][_0x4b902e(0x25e)],'leaveEvent':_0xfbe623[_0x4b902e(0x341)][_0x4b902e(0x341)]};break;case _univerjs_pro_collaboration['CollaborationEvent'][_0x4b902e(0x3ac)]:_0x267a78={'eventID':_univerjs_pro_collaboration[_0x4b902e(0x439)][_0x4b902e(0x3ac)],'joinEvent':_0xfbe623[_0x4b902e(0x341)]['data']};break;case _univerjs_pro_collaboration[_0x4b902e(0x439)]['LIVESHARE_NEW_HOST']:_0x267a78={'eventID':_univerjs_pro_collaboration['CollaborationEvent']['LIVESHARE_NEW_HOST'],'liveShareNewHost':_0xfbe623[_0x4b902e(0x341)]['data']};break;case _univerjs_pro_collaboration['CollaborationEvent'][_0x4b902e(0x2a9)]:_0x267a78={'eventID':_univerjs_pro_collaboration[_0x4b902e(0x439)]['LIVESHARE_OPERATION'],'liveShareOperation':_0xfbe623[_0x4b902e(0x341)][_0x4b902e(0x341)]};break;case _univerjs_pro_collaboration[_0x4b902e(0x439)][_0x4b902e(0x264)]:_0x267a78={'eventID':_univerjs_pro_collaboration[_0x4b902e(0x439)]['LIVESHARE_TERMINATE'],'liveShareTerminate':_0xfbe623[_0x4b902e(0x341)][_0x4b902e(0x341)]};break;case _univerjs_pro_collaboration['CollaborationEvent'][_0x4b902e(0x366)]:_0x267a78={'eventID':_univerjs_pro_collaboration['CollaborationEvent'][_0x4b902e(0x366)],'liveShareRequestHost':_0xfbe623[_0x4b902e(0x341)]['data']};break;case _univerjs_pro_collaboration[_0x4b902e(0x439)][_0x4b902e(0x245)]:_0x267a78={'eventID':_univerjs_pro_collaboration['CollaborationEvent'][_0x4b902e(0x245)]};break;default:_0x267a78={'eventID':_0xfbe623['data'][_0x4b902e(0x206)]};}return JSON[_0x4b902e(0x276)]({'cmd':_0xfbe623[_0x4b902e(0x435)],'routeKey':_0xfbe623[_0x4b902e(0x246)],'collaMsg':_0x267a78});}case _univerjs_protocol[_0x4b902e(0x36f)][_0x4b902e(0x303)]:return JSON[_0x4b902e(0x276)]({'cmd':_0xfbe623[_0x4b902e(0x435)],'routeKey':_0xfbe623[_0x4b902e(0x246)],'joinReq':_0xfbe623[_0x4b902e(0x341)]});case _univerjs_protocol[_0x4b902e(0x36f)][_0x4b902e(0x31b)]:return JSON[_0x4b902e(0x276)]({'cmd':_0xfbe623[_0x4b902e(0x435)],'routeKey':_0xfbe623['routeKey'],'leaveReq':_0xfbe623[_0x4b902e(0x341)]});default:throw new Error(_0x4b902e(0x38e));}}const ICollaborationSocketService=(0x0,_univerjs_core[_0x54582d(0x1e1)])(_0x54582d(0x3e2));function generateSubmitChangesPath(_0x1ce5de,_0x43366d,_0x42f86a){const _0x5784f5=_0x54582d;return _0x1ce5de+'/'+_0x43366d+_0x5784f5(0x2f6)+_0x42f86a+_0x5784f5(0x29d);}let CollaborationSocketService=class CollaborationSocketService extends _univerjs_core[_0x54582d(0x412)]{constructor(_0x382770,_0x2fbfef,_0x3957db,_0x2bf5e9,_0xe6b10f){const _0x3cf455=_0x54582d;super(),this[_0x3cf455(0x42a)]=_0x382770,this[_0x3cf455(0x392)]=_0x2fbfef,this[_0x3cf455(0x345)]=_0x3957db,this[_0x3cf455(0x469)]=_0x2bf5e9,this[_0x3cf455(0x424)]=_0xe6b10f;}[_0x54582d(0x2e4)](_0x4eac08){const _0x14e6f6=_0x54582d,_0x4d9c9a=this[_0x14e6f6(0x42a)][_0x14e6f6(0x2c8)](_univerjs_network[_0x14e6f6(0x20a)]);if(!_0x4d9c9a)throw new Error(_0x14e6f6(0x281));const _0x5acb03=_0x4d9c9a[_0x14e6f6(0x46f)](_0x4eac08);if(!_0x5acb03)throw new Error('[CollaborationSocketService]:\x20failed\x20to\x20create\x20socket!');const _0x521095=new _univerjs_core[(_0x14e6f6(0x450))](),_0x34a51c=new rxjs['Subject']();_0x521095[_0x14e6f6(0x1f7)](_0x5acb03[_0x14e6f6(0x33b)][_0x14e6f6(0x1c3)](_0x7e5f4=>_0x34a51c['next'](_0x7e5f4))),_0x521095[_0x14e6f6(0x1f7)]((0x0,_univerjs_core[_0x14e6f6(0x2b4)])(()=>_0x34a51c[_0x14e6f6(0x3e4)]()));const _0x370f66=new rxjs[(_0x14e6f6(0x263))]();_0x521095['add'](_0x5acb03[_0x14e6f6(0x22c)][_0x14e6f6(0x1c3)](_0x440e23=>_0x370f66[_0x14e6f6(0x22a)](_0x440e23))),_0x521095[_0x14e6f6(0x1f7)]((0x0,_univerjs_core[_0x14e6f6(0x2b4)])(()=>_0x370f66[_0x14e6f6(0x3e4)]()));const _0x485b1e=new rxjs[(_0x14e6f6(0x263))]();_0x521095[_0x14e6f6(0x1f7)](_0x5acb03[_0x14e6f6(0x432)][_0x14e6f6(0x1c3)](_0x1f9493=>{const _0x2fe3f0=_0x14e6f6,_0x4861fa=deserializeToCombResponse(_0x1f9493);_0x485b1e[_0x2fe3f0(0x22a)](_0x4861fa);})),_0x521095[_0x14e6f6(0x1f7)]((0x0,_univerjs_core[_0x14e6f6(0x2b4)])(()=>_0x485b1e[_0x14e6f6(0x3e4)]()));let _0x35b9aa;const _0x36037d=()=>{const _0x303f8d=_0x14e6f6;_0x370f66[_0x303f8d(0x22a)](new Event(_0x303f8d(0x374))),_0x34a51c[_0x303f8d(0x22a)](new Event(_0x303f8d(0x374))),_0x35b9aa[_0x303f8d(0x37b)]();};return _0x35b9aa={'memberID':'','close$':_0x34a51c['asObservable'](),'error$':_0x370f66[_0x14e6f6(0x2a1)](),'open$':_0x5acb03[_0x14e6f6(0x1bb)],'message$':_0x485b1e[_0x14e6f6(0x2a1)](),'send':_0x73a26f=>{const _0x6ba8a9=_0x14e6f6;if(_0x73a26f[_0x6ba8a9(0x435)]===_univerjs_protocol[_0x6ba8a9(0x36f)][_0x6ba8a9(0x3c8)]){if(_0x73a26f[_0x6ba8a9(0x341)][_0x6ba8a9(0x206)]===_univerjs_pro_collaboration[_0x6ba8a9(0x439)][_0x6ba8a9(0x452)]){this[_0x6ba8a9(0x1a7)](_0x35b9aa,_0x73a26f[_0x6ba8a9(0x341)])[_0x6ba8a9(0x30d)](_0x4bca9f=>{const _0x182d41=_0x6ba8a9;this[_0x182d41(0x469)]['error'](_0x4bca9f),_0x36037d();});return;}if(_0x73a26f[_0x6ba8a9(0x341)]['eventID']===_univerjs_pro_collaboration[_0x6ba8a9(0x439)][_0x6ba8a9(0x1cc)]){const _0x364524=_0x73a26f['data'];this['_fetchMissChangesets'](_0x364524)[_0x6ba8a9(0x471)](_0x12b468=>{const _0x3fabc9=_0x6ba8a9;_0x485b1e['next']({'cmd':_univerjs_protocol['CombCmd'][_0x3fabc9(0x464)],'code':_univerjs_protocol[_0x3fabc9(0x411)]['OK'],'routeKey':_0x364524[_0x3fabc9(0x341)][_0x3fabc9(0x481)],'routeType':'','data':{'eventID':_univerjs_pro_collaboration[_0x3fabc9(0x439)][_0x3fabc9(0x2a6)],'data':{'changesets':_0x12b468}}});})[_0x6ba8a9(0x30d)](_0x23a633=>{const _0x5332d5=_0x6ba8a9;this[_0x5332d5(0x469)][_0x5332d5(0x3e0)](_0x23a633),_0x36037d();});return;}}_0x5acb03[_0x6ba8a9(0x476)](serializeCombRequest(_0x73a26f));},'close':()=>{const _0x1d6827=_0x14e6f6;_0x5acb03[_0x1d6827(0x37b)](),_0x521095[_0x1d6827(0x27d)]();}},_0x35b9aa;}async[_0x54582d(0x1a7)](_0x30104d,_0x4894d3){const _0x1a96b7=_0x54582d;var _0x4b603e;const {unitType:_0x5c2773,unitID:_0x3942d4,changeset:_0x3082fb}=_0x4894d3['data'],_0x4bfa93={'unitID':_0x3942d4,'memberID':_0x30104d['memberID'],'type':_0x5c2773,'changeset':(0x0,_univerjs_pro_collaboration[_0x1a96b7(0x2ce)])(_0x3082fb)},_0x321ec9=this[_0x1a96b7(0x345)]['getConfig'](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY),_0x5c5753=generateSubmitChangesPath((_0x4b603e=_0x321ec9===null||_0x321ec9===void 0x0?void 0x0:_0x321ec9['collabSubmitChangesetUrl'])!==null&&_0x4b603e!==void 0x0?_0x4b603e:DEFAULT_COLLAB_SUBMIT_CHANGESET_URL,_0x5c2773,_0x3942d4);try{await this[_0x1a96b7(0x392)][_0x1a96b7(0x380)](_0x5c5753,{'body':_0x4bfa93});}catch(_0x2efa6){this[_0x1a96b7(0x469)][_0x1a96b7(0x3e0)](_0x1a96b7(0x2d4),_0x1a96b7(0x41e));throw _0x2efa6;}}async[_0x54582d(0x41d)](_0x579b4b){const _0x8d4121=_0x54582d,{unitID:_0x5a52f0,from:_0xbab5ee,to:_0x29b852,unitType:_0x25607f}=_0x579b4b[_0x8d4121(0x341)];return(await this[_0x8d4121(0x424)][_0x8d4121(0x282)]({'metadata':void 0x0},{'unitID':_0x5a52f0,'type':_0x25607f,'from':_0xbab5ee,'to':_0x29b852}))[_0x8d4121(0x261)][_0x8d4121(0x2b9)](_0x79ef02=>{const _0xabfa6b=_0x8d4121;if(_0x79ef02[_0xabfa6b(0x334)]===null||_0x79ef02[_0xabfa6b(0x334)]===void 0x0)_0x79ef02[_0xabfa6b(0x334)]=[];return _0x79ef02;});}};CollaborationSocketService=__decorate([__decorateParam(0x0,(0x0,_univerjs_core[_0x54582d(0x205)])(_univerjs_core[_0x54582d(0x28f)])),__decorateParam(0x1,(0x0,_univerjs_core[_0x54582d(0x205)])(_univerjs_network[_0x54582d(0x300)])),__decorateParam(0x2,_univerjs_core[_0x54582d(0x29e)]),__decorateParam(0x3,_univerjs_core[_0x54582d(0x31e)]),__decorateParam(0x4,_univerjs_pro_collaboration[_0x54582d(0x43e)])],CollaborationSocketService);let CollaborationSessionService=class CollaborationSessionService extends _univerjs_core['Disposable']{get[_0x54582d(0x21f)](){const _0x3b910c=_0x54582d;return this[_0x3b910c(0x260)][_0x3b910c(0x477)]();}constructor(_0x4df983,_0x2eb41e,_0x3ee59c,_0x1e8b5b,_0x5d10b4,_0x44b28e){const _0x1a9851=_0x54582d;super(),this[_0x1a9851(0x42a)]=_0x4df983,this[_0x1a9851(0x469)]=_0x2eb41e,this['_configService']=_0x3ee59c,this[_0x1a9851(0x468)]=_0x1e8b5b,this['_collaborationUIEventService']=_0x5d10b4,this[_0x1a9851(0x1da)]=_0x44b28e,_defineProperty(this,'_socket$',new rxjs[(_0x1a9851(0x3c7))](void 0x0)),_defineProperty(this,_0x1a9851(0x2f1),this[_0x1a9851(0x260)][_0x1a9851(0x2a1)]()),_defineProperty(this,_0x1a9851(0x375),null),_defineProperty(this,_0x1a9851(0x2ec),new Map()),_defineProperty(this,_0x1a9851(0x38f),new rxjs[(_0x1a9851(0x3c7))](SessionStatus['IDLE'])),_defineProperty(this,'status$',this[_0x1a9851(0x38f)][_0x1a9851(0x2a1)]()),_defineProperty(this,'_socketReady',![]),_defineProperty(this,_0x1a9851(0x44a),void 0x0),_defineProperty(this,_0x1a9851(0x3d1),0x0),_defineProperty(this,_0x1a9851(0x359),void 0x0),_defineProperty(this,_0x1a9851(0x3fd),void 0x0),this[_0x1a9851(0x437)]();}['_listenToNetworkCondition'](){const _0x2c0282=_0x54582d;if(!this['_networkConditionService'])return;this[_0x2c0282(0x47f)](this[_0x2c0282(0x1da)]['online$'][_0x2c0282(0x1c3)](_0x50d537=>{const _0x409f69=_0x2c0282;if(_0x50d537&&!this['_socket'])this[_0x409f69(0x318)]();if(!_0x50d537)this[_0x409f69(0x1f0)]();}));}[_0x54582d(0x27d)](){const _0x3cbf35=_0x54582d;super[_0x3cbf35(0x27d)](),this[_0x3cbf35(0x249)](),this[_0x3cbf35(0x299)](),this[_0x3cbf35(0x311)](),this['_sessions'][_0x3cbf35(0x333)](_0x1b13a4=>_0x1b13a4[_0x3cbf35(0x27d)]()),this['_sessions']['clear'](),this[_0x3cbf35(0x38f)][_0x3cbf35(0x3e4)]();}async['requireSession'](_0x5d6ed5){const _0x2b3f01=_0x54582d;if(this[_0x2b3f01(0x2ec)][_0x2b3f01(0x1b7)](_0x5d6ed5))return this[_0x2b3f01(0x2ec)]['get'](_0x5d6ed5);this[_0x2b3f01(0x2b7)]();const _0x158ff7=this[_0x2b3f01(0x42a)]['createInstance'](CollaborationSession,_0x5d6ed5,this[_0x2b3f01(0x260)][_0x2b3f01(0x2a1)]());return this[_0x2b3f01(0x2ec)][_0x2b3f01(0x298)](_0x5d6ed5,_0x158ff7),_0x158ff7;}[_0x54582d(0x3bb)](_0x54d25c){const _0xc90a8d=_0x54582d,_0xcdecff=this[_0xc90a8d(0x2ec)][_0xc90a8d(0x2c8)](_0x54d25c);_0xcdecff&&(this[_0xc90a8d(0x2ec)]['delete'](_0x54d25c),_0xcdecff[_0xc90a8d(0x37b)]());if(!this[_0xc90a8d(0x2ec)][_0xc90a8d(0x239)]){var _0x6a52b7;(_0x6a52b7=this[_0xc90a8d(0x21f)])===null||_0x6a52b7===void 0x0||_0x6a52b7[_0xc90a8d(0x37b)]();}}['reconnect'](){const _0x57868c=_0x54582d;this['_retryCount']=0x0,this['_clearRetryConnectingTimer'](),this[_0x57868c(0x234)]();}[_0x54582d(0x249)](){const _0x1a932d=_0x54582d;this[_0x1a932d(0x44a)]!=null&&(clearTimeout(this[_0x1a932d(0x44a)]),this[_0x1a932d(0x44a)]=null);}async[_0x54582d(0x236)](){const _0x280635=_0x54582d;var _0x4fe2ff;const _0x5817ba=this[_0x280635(0x345)][_0x280635(0x3de)](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY),_0x1fa1fe=(_0x4fe2ff=_0x5817ba===null||_0x5817ba===void 0x0?void 0x0:_0x5817ba[_0x280635(0x451)])!==null&&_0x4fe2ff!==void 0x0?_0x4fe2ff:DEFAULT_COLLAB_WEB_SOCKET_URL,_0x198a8c=await this[_0x280635(0x468)]['createSocket'](_0x1fa1fe);return this[_0x280635(0x375)]=_0x198a8c,_0x198a8c;}async[_0x54582d(0x2b7)](){const _0x362e2d=_0x54582d;try{var _0x7adbae,_0x1bd9b9;const _0xf80750=(_0x7adbae=(_0x1bd9b9=this[_0x362e2d(0x21f)])!==null&&_0x1bd9b9!==void 0x0?_0x1bd9b9:this[_0x362e2d(0x375)])!==null&&_0x7adbae!==void 0x0?_0x7adbae:await this['_createSocket']();if(_0xf80750){const _0x29bb66=_0xf80750['send'];_0xf80750['send']=_0x2bdc09=>{const _0x56ae9a=_0x362e2d;if(_0x2bdc09['cmd']!==_univerjs_protocol['CombCmd']['LEAVE'])this[_0x56ae9a(0x3dc)]();return _0x29bb66[_0x56ae9a(0x273)](_0xf80750,[_0x2bdc09]);},_0xf80750[_0x362e2d(0x432)][_0x362e2d(0x1c3)](_0x330193=>this[_0x362e2d(0x43c)](_0xf80750,_0x330193)),_0xf80750[_0x362e2d(0x22c)][_0x362e2d(0x197)]((0x0,rxjs_operators['take'])(0x1))[_0x362e2d(0x1c3)](_0x201088=>this['_logService'][_0x362e2d(0x3e0)](_0x362e2d(0x2c5),_0x201088)),_0xf80750[_0x362e2d(0x1bb)][_0x362e2d(0x197)]((0x0,rxjs_operators['take'])(0x1))[_0x362e2d(0x1c3)](()=>{const _0xd1f56d=_0x362e2d;this[_0xd1f56d(0x212)](_0xf80750);}),_0xf80750[_0x362e2d(0x33b)]['pipe']((0x0,rxjs_operators[_0x362e2d(0x1db)])(0x1))[_0x362e2d(0x1c3)](_0x293099=>{const _0x410199=_0x362e2d;this[_0x410199(0x469)][_0x410199(0x3e6)](_0x410199(0x1dd),_0x410199(0x294),_0x293099),this[_0x410199(0x31a)]();});}}catch(_0x32538e){this[_0x362e2d(0x469)][_0x362e2d(0x3e0)](_0x32538e),this[_0x362e2d(0x31a)]();}}['_onConnectionOpen'](_0x10bd9a){const _0x5752e7=_0x54582d;this['_logService'][_0x5752e7(0x3e6)](_0x5752e7(0x1dd),'socket\x20open.'),_0x10bd9a['send']({'cmd':_univerjs_protocol[_0x5752e7(0x36f)][_0x5752e7(0x232)]}),this[_0x5752e7(0x3dc)]();}['_onOffline'](){const _0x3f66ea=_0x54582d;this['_socketReady']=![],this[_0x3f66ea(0x375)]=null,this[_0x3f66ea(0x38f)][_0x3f66ea(0x22a)](SessionStatus[_0x3f66ea(0x391)]),this['_socket$']['next'](null),this['_clearTimeoutTimer'](),this[_0x3f66ea(0x311)]();}[_0x54582d(0x31a)](){const _0x45110b=_0x54582d;var _0x379593;this[_0x45110b(0x1f0)]();if(this['_retryCount']<((_0x379593=this[_0x45110b(0x345)][_0x45110b(0x3de)](_0x45110b(0x1ba)))!==null&&_0x379593!==void 0x0?_0x379593:0x3))this[_0x45110b(0x350)][_0x45110b(0x19d)]({'id':CollaborationUIEventId[_0x45110b(0x237)]}),this['_tryReconnect']();else this['_collaborationUIEventService'][_0x45110b(0x19d)]({'id':CollaborationUIEventId['SOCKET_FAILED']});}[_0x54582d(0x234)](){const _0x5bb9b0=_0x54582d;var _0x2226a4;const _0x1e8046=this[_0x5bb9b0(0x3d1)],_0x38ed92=this['_configService']['getConfig'](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY),_0x1fbb66=_0x1e8046===0x0?0x0:((_0x2226a4=_0x38ed92===null||_0x38ed92===void 0x0?void 0x0:_0x38ed92['retryConnectingInterval'])!==null&&_0x2226a4!==void 0x0?_0x2226a4:DEFAULT_RETRY_CONNECTING_INTERVAL)*0x2**_0x1e8046;this[_0x5bb9b0(0x44a)]=setTimeout(()=>{const _0x2a7e0e=_0x5bb9b0;clearTimeout(this[_0x2a7e0e(0x44a)]),this[_0x2a7e0e(0x44a)]=null,this[_0x2a7e0e(0x2b7)]();},_0x1fbb66),this[_0x5bb9b0(0x3d1)]+=0x1;}['_onMessage'](_0x2f541c,_0x2f9a3a){const _0x3defb0=_0x54582d,{cmd:_0x574e54}=_0x2f9a3a;_0x574e54===_univerjs_protocol[_0x3defb0(0x36f)][_0x3defb0(0x232)]&&!this[_0x3defb0(0x25c)]&&(_0x2f541c['memberID']=_0x2f9a3a[_0x3defb0(0x341)][_0x3defb0(0x46b)],this['_socket$'][_0x3defb0(0x22a)](_0x2f541c),this[_0x3defb0(0x38f)][_0x3defb0(0x22a)](SessionStatus[_0x3defb0(0x2bb)]),this['_socketReady']=!![],this[_0x3defb0(0x375)]=null);if(_0x574e54===_univerjs_protocol['CombCmd'][_0x3defb0(0x41a)])this[_0x3defb0(0x299)]();this[_0x3defb0(0x3dc)]();}['_rescheduleHeartbeat'](){const _0x4552ae=_0x54582d;var _0x38e103;this[_0x4552ae(0x311)](),this[_0x4552ae(0x359)]=setTimeout(()=>this[_0x4552ae(0x25a)](),(_0x38e103=this['_configService'][_0x4552ae(0x3de)](_0x4552ae(0x20e)))!==null&&_0x38e103!==void 0x0?_0x38e103:DEFAULT_HEARTBEAT_INTERVAL);}[_0x54582d(0x25a)](){const _0x49d9da=_0x54582d;this[_0x49d9da(0x21f)][_0x49d9da(0x476)]({'cmd':_univerjs_protocol[_0x49d9da(0x36f)]['HEARTBEAT']}),this[_0x49d9da(0x32e)]();}[_0x54582d(0x32e)](){const _0x58e59a=_0x54582d;var _0x354fd0;this[_0x58e59a(0x3fd)]=setTimeout(()=>this[_0x58e59a(0x31a)](),(_0x354fd0=this[_0x58e59a(0x345)]['getConfig'](_0x58e59a(0x47b)))!==null&&_0x354fd0!==void 0x0?_0x354fd0:DEFAULT_HEARTBEAT_TIMEOUT);}['_clearHeartbeatTimer'](){const _0x354d71=_0x54582d;this[_0x354d71(0x359)]!=null&&(clearTimeout(this[_0x354d71(0x359)]),this[_0x354d71(0x359)]=null);}[_0x54582d(0x299)](){const _0x37fc89=_0x54582d;this[_0x37fc89(0x3fd)]!=null&&(clearTimeout(this[_0x37fc89(0x3fd)]),this['_timeoutTimer']=null);}};CollaborationSessionService=__decorate([__decorateParam(0x0,(0x0,_univerjs_core[_0x54582d(0x205)])(_univerjs_core[_0x54582d(0x28f)])),__decorateParam(0x1,_univerjs_core[_0x54582d(0x31e)]),__decorateParam(0x2,_univerjs_core[_0x54582d(0x29e)]),__decorateParam(0x3,ICollaborationSocketService),__decorateParam(0x4,(0x0,_univerjs_core[_0x54582d(0x205)])(CollaborationUIEventService)),__decorateParam(0x5,(0x0,_univerjs_core['Optional'])(INetworkConditionService))],CollaborationSessionService);let CollaborationController=class CollaborationController extends _univerjs_core[_0x54582d(0x21c)]{constructor(_0x4b2242,_0xaf6582,_0x41a9a7,_0x4e487a){const _0x2972cb=_0x54582d;var _0x5e419f;super(),this['_injector']=_0x4b2242,this[_0x2972cb(0x1cb)]=_0xaf6582,this[_0x2972cb(0x345)]=_0x41a9a7,this[_0x2972cb(0x46c)]=_0x4e487a,_defineProperty(this,_0x2972cb(0x401),new Map()),_defineProperty(this,'_entityInit$',new rxjs[(_0x2972cb(0x263))]()),_defineProperty(this,_0x2972cb(0x1c5),this[_0x2972cb(0x28d)][_0x2972cb(0x2a1)]());if(((_0x5e419f=this['_configService'][_0x2972cb(0x3de)](_0x2972cb(0x1e3)))===null||_0x5e419f===void 0x0?void 0x0:_0x5e419f[_0x2972cb(0x3d3)])!==![])this[_0x2972cb(0x2a8)]();}[_0x54582d(0x27d)](){const _0x20ffb0=_0x54582d;super[_0x20ffb0(0x27d)](),this['_entities'][_0x20ffb0(0x333)](_0x916608=>_0x916608[_0x20ffb0(0x27d)]()),this[_0x20ffb0(0x401)][_0x20ffb0(0x2c0)]();}[_0x54582d(0x400)](_0x1fc321){var _0x2644c5;return(_0x2644c5=this['_entities']['get'](_0x1fc321))!==null&&_0x2644c5!==void 0x0?_0x2644c5:null;}[_0x54582d(0x254)](_0x1efaf4){const _0x49f550=_0x54582d,_0x155d2c=this[_0x49f550(0x400)](_0x1efaf4);if(_0x155d2c)return(0x0,rxjs['of'])(_0x155d2c);return this[_0x49f550(0x28d)][_0x49f550(0x197)]((0x0,rxjs_operators[_0x49f550(0x1a9)])(_0x5d7389=>_0x5d7389[_0x49f550(0x481)]===_0x1efaf4));}[_0x54582d(0x1d5)](_0x5a09dd){const _0x5ee9aa=_0x54582d;return(0x0,rxjs[_0x5ee9aa(0x478)])(this[_0x5ee9aa(0x254)](_0x5a09dd)[_0x5ee9aa(0x197)]((0x0,rxjs_operators['map'])(()=>void 0x0)));}['_init'](){const _0x21ff06=_0x54582d,_0xbdfce4=0x10;this[_0x21ff06(0x46c)][_0x21ff06(0x47c)](_univerjs_core[_0x21ff06(0x2fd)][_0x21ff06(0x1f9)])[_0x21ff06(0x197)]((0x0,rxjs['takeUntil'])(this[_0x21ff06(0x3d9)]),(0x0,rxjs_operators[_0x21ff06(0x1d0)])(_0xbdfce4))[_0x21ff06(0x1c3)](async _0x447e39=>{const _0x417eee=_0x21ff06,_0x495294=_0x447e39['unit'][_0x417eee(0x27f)](),_0xd5b26c=await this[_0x417eee(0x316)](_0x495294,_univerjs_core[_0x417eee(0x2fd)][_0x417eee(0x1f9)]);this[_0x417eee(0x401)][_0x417eee(0x298)](_0x495294,_0xd5b26c);}),this[_0x21ff06(0x46c)][_0x21ff06(0x47c)](_univerjs_core[_0x21ff06(0x2fd)][_0x21ff06(0x2e6)])['pipe']((0x0,rxjs[_0x21ff06(0x324)])(this[_0x21ff06(0x3d9)]),(0x0,rxjs_operators['delay'])(_0xbdfce4))[_0x21ff06(0x197)]((0x0,rxjs_operators[_0x21ff06(0x1a9)])(_0x5aca16=>{const _0x3fa6d3=_0x21ff06;return!_0x5aca16[_0x3fa6d3(0x35e)][_0x3fa6d3(0x27f)]()[_0x3fa6d3(0x413)]('__');}))['subscribe'](async _0x3d47a1=>{const _0x3466c8=_0x21ff06,_0x5275d3=_0x3d47a1[_0x3466c8(0x35e)]['getUnitId'](),_0x20b2fe=await this[_0x3466c8(0x316)](_0x5275d3,_univerjs_core[_0x3466c8(0x2fd)][_0x3466c8(0x2e6)]);this[_0x3466c8(0x401)][_0x3466c8(0x298)](_0x5275d3,_0x20b2fe);}),(0x0,rxjs['merge'])(this[_0x21ff06(0x46c)]['getTypeOfUnitDisposed$'](_univerjs_core[_0x21ff06(0x2fd)][_0x21ff06(0x1f9)]),this[_0x21ff06(0x46c)][_0x21ff06(0x1ed)](_univerjs_core[_0x21ff06(0x2fd)][_0x21ff06(0x2e6)]))[_0x21ff06(0x197)]((0x0,rxjs[_0x21ff06(0x324)])(this[_0x21ff06(0x3d9)]))['subscribe'](_0x428f99=>{const _0x16f6a6=_0x21ff06,_0x246981=_0x428f99[_0x16f6a6(0x27f)](),_0x3339d5=this[_0x16f6a6(0x401)][_0x16f6a6(0x2c8)](_0x246981);_0x3339d5&&(_0x3339d5[_0x16f6a6(0x27d)](),this[_0x16f6a6(0x401)][_0x16f6a6(0x43a)](_0x246981));});}async[_0x54582d(0x316)](_0x316ff7,_0x4e960a){const _0x294b1b=_0x54582d,_0x2ac2ef=await this['_collabSessionService'][_0x294b1b(0x25f)](_0x316ff7),_0x577aa2=this[_0x294b1b(0x42a)][_0x294b1b(0x40f)](this[_0x294b1b(0x1b0)](_0x4e960a),_0x316ff7,_0x4e960a,_0x2ac2ef);return await _0x577aa2[_0x294b1b(0x277)](),this['_entityInit$'][_0x294b1b(0x22a)](_0x577aa2),_0x577aa2;}[_0x54582d(0x1b0)](_0x53649f){const _0x52ea91=_0x54582d;switch(_0x53649f){case _univerjs_core['UniverInstanceType'][_0x52ea91(0x2e6)]:return DocCollaborationEntity;case _univerjs_core[_0x52ea91(0x2fd)][_0x52ea91(0x1f9)]:return SheetCollaborationEntity;default:throw new Error(_0x52ea91(0x1c1)+_0x53649f);}}};CollaborationController=__decorate([__decorateParam(0x0,(0x0,_univerjs_core[_0x54582d(0x205)])(_univerjs_core[_0x54582d(0x28f)])),__decorateParam(0x1,(0x0,_univerjs_core[_0x54582d(0x205)])(CollaborationSessionService)),__decorateParam(0x2,_univerjs_core[_0x54582d(0x29e)]),__decorateParam(0x3,_univerjs_core['IUniverInstanceService'])],CollaborationController);var name=_0x54582d(0x1e2),version=_0x54582d(0x462);const DEFAULT_FILE_NAME_KEY='DEFAULT_FILE_NAME',UNIVER_DEFAULT_FILE_NAME=_0x54582d(0x2c1);let FileNameController=class FileNameController extends _univerjs_core[_0x54582d(0x412)]{constructor(_0x3d4404,_0x12031a){const _0x50b39a=_0x54582d;super(),this[_0x50b39a(0x46c)]=_0x3d4404,this[_0x50b39a(0x345)]=_0x12031a,this[_0x50b39a(0x2a8)]();}[_0x54582d(0x2a8)](){const _0x5b3ca6=_0x54582d;this[_0x5b3ca6(0x47f)](this[_0x5b3ca6(0x46c)][_0x5b3ca6(0x421)][_0x5b3ca6(0x1c3)](()=>{const _0x49d0af=_0x5b3ca6;var _0x223fba;const _0x4e2228=this['_univerInstanceService'][_0x49d0af(0x467)]();let _0x43d120=(_0x223fba=this[_0x49d0af(0x345)][_0x49d0af(0x3de)](_0x49d0af(0x23c)))!==null&&_0x223fba!==void 0x0?_0x223fba:UNIVER_DEFAULT_FILE_NAME;if(_0x4e2228 instanceof _univerjs_core[_0x49d0af(0x339)])_0x43d120=_0x4e2228[_0x49d0af(0x35a)];document['title']=_0x43d120;}));}};FileNameController=__decorate([__decorateParam(0x0,_univerjs_core[_0x54582d(0x3f4)]),__decorateParam(0x1,_univerjs_core['IConfigService'])],FileNameController);let AuthServerService=class AuthServerService{constructor(_0x2102e0,_0x331aa9,_0x33b62e){const _0x61742b=_0x54582d;this[_0x61742b(0x345)]=_0x2102e0,this[_0x61742b(0x392)]=_0x331aa9,this[_0x61742b(0x429)]=_0x33b62e,this[_0x61742b(0x277)]();}[_0x54582d(0x277)](){const _0x4efdf2=_0x54582d;this[_0x4efdf2(0x392)][_0x4efdf2(0x2c7)]({'priority':0x1,'interceptor':(_0x41e389,_0x19f616)=>{return _0x19f616(_0x41e389)['pipe']((0x0,rxjs['concatMap'])(async _0x4aba92=>{const _0x4ea0df=_0x598e,_0x39e711=_0x4aba92;if(_0x39e711['status']===0x191){if(typeof window===_0x4ea0df(0x2bf))throw new Error('[AuthServerService]:\x20you\x20should\x20provide\x20authentication\x20info\x20on\x20Node.js.');if(window[_0x4ea0df(0x1ff)](this['localeService']['t'](_0x4ea0df(0x258)))){const _0x14c920=window[_0x4ea0df(0x46e)](window['location'][_0x4ea0df(0x3d2)]);window[_0x4ea0df(0x3fc)][_0x4ea0df(0x3d2)]=this[_0x4ea0df(0x266)]()+_0x4ea0df(0x483)+_0x14c920;}}return _0x39e711;}));}});}['_getLoginPath'](){const _0x3041f7=_0x54582d;var _0x485ef4;const _0x4d4ed9=this[_0x3041f7(0x345)]['getConfig'](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY);return(_0x485ef4=_0x4d4ed9===null||_0x4d4ed9===void 0x0?void 0x0:_0x4d4ed9[_0x3041f7(0x3ff)])!==null&&_0x485ef4!==void 0x0?_0x485ef4:DEFAULT_LOGIN_URL;}};AuthServerService=__decorate([__decorateParam(0x0,_univerjs_core['IConfigService']),__decorateParam(0x1,(0x0,_univerjs_core[_0x54582d(0x205)])(_univerjs_network['HTTPService'])),__decorateParam(0x2,(0x0,_univerjs_core[_0x54582d(0x205)])(_univerjs_core['LocaleService']))],AuthServerService);const DEFAULT_AUTHZ_URL_KEY$1=_0x54582d(0x221);let AuthzIoHttpService=class AuthzIoHttpService extends _univerjs_core[_0x54582d(0x412)]{constructor(_0x4a5a52,_0x35fc87){const _0x3802e6=_0x54582d;super(),this['_HTTPService']=_0x4a5a52,this[_0x3802e6(0x345)]=_0x35fc87,_defineProperty(this,_0x3802e6(0x3d4),![]),this[_0x3802e6(0x36d)]();}[_0x54582d(0x36d)](){const _0x185718=_0x54582d,_0x4ff62e=this;this['disposeWithMe'](this[_0x185718(0x307)]['registerHTTPInterceptor']({'priority':0x3e7,'interceptor':(0x0,_univerjs_network['MergeInterceptorFactory'])({'isMatch'(_0x451e1e){const _0x3f9070=_0x185718;var _0x42be90;if(_0x451e1e[_0x3f9070(0x44b)]===_0x3f9070(0x347)&&((_0x42be90=_0x451e1e[_0x3f9070(0x1c7)])===null||_0x42be90===void 0x0?void 0x0:_0x42be90[_0x3f9070(0x2ff)])){const {objectID:_0x35bb75,objectType:_0x3e1715}=_0x451e1e['requestParams'][_0x3f9070(0x2ff)]||{};if(!_0x35bb75||_0x3e1715===void 0x0)return![];const _0x1a5d5c=_0x4ff62e[_0x3f9070(0x1e5)]()+'/'+_0x3e1715+_0x3f9070(0x306)+_0x35bb75+_0x3f9070(0x480);if(_0x451e1e['url']===_0x1a5d5c)return!![];}return![];},'getParamsFromRequest'(_0x5402f8){var _0x59ab94;return(_0x59ab94=_0x5402f8['requestParams'])===null||_0x59ab94===void 0x0?void 0x0:_0x59ab94['body'];},'mergeParamsToRequest'(_0x37ed4a,_0x3dc6fe){const _0x6bf42d=_0x185718,_0x12e8b7=_0x4ff62e[_0x6bf42d(0x1e5)]()+_0x6bf42d(0x3c4),_0x48dfd3=_0x37ed4a[_0x6bf42d(0x322)]((_0x1745fb,_0x3eba91)=>{const _0x46afb9=_0x6bf42d,{unitID:_0x5bcd4a,objectID:_0x15f8d1,objectType:_0x2963ed,actions:_0x4a9acb}=_0x3eba91;if(!_0x1745fb[_0x5bcd4a])_0x1745fb[_0x5bcd4a]={};if(!_0x1745fb[_0x5bcd4a][_0x15f8d1])_0x1745fb[_0x5bcd4a][_0x15f8d1]={'objectID':_0x15f8d1,'objectType':_0x2963ed,'actions':[]};return _0x1745fb[_0x5bcd4a][_0x15f8d1][_0x46afb9(0x1b3)][_0x46afb9(0x35d)](..._0x4a9acb),_0x1745fb;},{}),_0xec4400=[];for(const _0x1bd064 in _0x48dfd3)for(const _0x36dd82 in _0x48dfd3[_0x1bd064]){const {actions:_0x577fe8,objectType:_0x358fc8}=_0x48dfd3[_0x1bd064][_0x36dd82],_0x3a953d=[...new Set(_0x577fe8)];_0xec4400[_0x6bf42d(0x35d)]({'unitID':_0x1bd064,'objectID':_0x36dd82,'objectType':_0x358fc8,'actions':_0x3a953d});}return new _univerjs_network[(_0x6bf42d(0x31d))]('POST',_0x12e8b7,{'headers':_0x3dc6fe[_0x6bf42d(0x417)],'withCredentials':_0x3dc6fe[_0x6bf42d(0x3a9)],'responseType':_0x3dc6fe[_0x6bf42d(0x26d)],'body':{'requests':_0xec4400}});}},{'distributeResult'(_0x10b820,_0x198d40){const _0x287212=_0x185718,{objectActions:_0x34cc99}=_0x10b820;return _0x198d40[_0x287212(0x2b9)](_0x3fcb19=>{const _0xcc0966=_0x287212,{unitID:_0x330cea,objectID:_0x267a64,actions:_0x24f616}=_0x3fcb19,_0x3f695e=_0x34cc99['find'](_0x2e895e=>_0x2e895e[_0xcc0966(0x481)]===_0x330cea&&_0x2e895e['objectID']===_0x267a64);return{'config':_0x3fcb19,'result':{'actions':_0x24f616[_0xcc0966(0x2b9)](_0x5190f3=>_0x3f695e===null||_0x3f695e===void 0x0?void 0x0:_0x3f695e[_0xcc0966(0x1b3)][_0xcc0966(0x34c)](_0x2a73bb=>_0x2a73bb[_0xcc0966(0x47a)]===_0x5190f3))[_0xcc0966(0x1a9)](_0x27245d=>!!_0x27245d),'error':_0x10b820[_0xcc0966(0x3e0)]}};});}})}));}[_0x54582d(0x1e5)](){const _0x2013b9=_0x54582d;var _0x29f034;const _0x777de1=this[_0x2013b9(0x345)][_0x2013b9(0x3de)](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY);return(_0x29f034=_0x777de1===null||_0x777de1===void 0x0?void 0x0:_0x777de1['authzUrl'])!==null&&_0x29f034!==void 0x0?_0x29f034:DEFAULT_AUTHZ_URL_KEY$1;}async[_0x54582d(0x259)](_0x3bfccd){const _0x29214a=_0x54582d,_0x15c2c=this['_getAPIPrefixPath']()+'/'+_0x3bfccd['objectType']+_0x29214a(0x393);return(await this[_0x29214a(0x307)][_0x29214a(0x380)](_0x15c2c,{'body':_0x3bfccd}))[_0x29214a(0x2ff)][_0x29214a(0x34d)]||'';}async[_0x54582d(0x1b2)](_0xf68048){const _0x33f0b7=_0x54582d,_0xcd578c=this[_0x33f0b7(0x1e5)]()+_0x33f0b7(0x284);return(await this[_0x33f0b7(0x307)][_0x33f0b7(0x380)](_0xcd578c,{'body':_0xf68048}))['body'][_0x33f0b7(0x226)];}async[_0x54582d(0x278)](_0x5c3aa1){const _0x40f202=_0x54582d;var _0x44a9c2;const _0x2a83a5=this[_0x40f202(0x1e5)]()+'/'+_0x5c3aa1[_0x40f202(0x1bc)]+_0x40f202(0x306)+_0x5c3aa1[_0x40f202(0x34d)],_0x55c0ed=await this[_0x40f202(0x307)]['put'](_0x2a83a5,{'body':_0x5c3aa1});if((_0x55c0ed===null||_0x55c0ed===void 0x0||(_0x44a9c2=_0x55c0ed[_0x40f202(0x2ff)])===null||_0x44a9c2===void 0x0||(_0x44a9c2=_0x44a9c2[_0x40f202(0x3e0)])===null||_0x44a9c2===void 0x0?void 0x0:_0x44a9c2['code'])!==0x1)throw new Error('Failed\x20to\x20update\x20permission\x20point');}async[_0x54582d(0x431)](_0x383d46){const _0x21c118=_0x54582d,_0x2d717e=this['_getAPIPrefixPath']()+'/'+_0x383d46['objectType']+_0x21c118(0x306)+_0x383d46[_0x21c118(0x34d)]+_0x21c118(0x480);return(await this[_0x21c118(0x307)][_0x21c118(0x380)](_0x2d717e,{'body':_0x383d46}))[_0x21c118(0x2ff)][_0x21c118(0x1b3)];}async[_0x54582d(0x1fb)](_0x23bd09){const _0x4b22fc=_0x54582d,_0x5dbcb8=this[_0x4b22fc(0x1e5)]()+_0x4b22fc(0x3c4);return(await this[_0x4b22fc(0x307)][_0x4b22fc(0x380)](_0x5dbcb8,{'body':{'requests':_0x23bd09}}))[_0x4b22fc(0x2ff)]['objectActions'];}async['listRoles'](_0x1ac417){const _0x5ade9e=_0x54582d,_0x335204=this[_0x5ade9e(0x1e5)]()+'/'+_0x1ac417[_0x5ade9e(0x1bc)]+_0x5ade9e(0x24c),_0x3cd9da=await this['_HTTPService'][_0x5ade9e(0x380)](_0x335204,{'body':_0x1ac417});return{'roles':_0x3cd9da[_0x5ade9e(0x2ff)][_0x5ade9e(0x2a3)],'actions':_0x3cd9da[_0x5ade9e(0x2ff)][_0x5ade9e(0x1b3)]};}async[_0x54582d(0x39e)](_0x1a13f8){const _0x57fc22=_0x54582d,_0x2d51b7=this['_getAPIPrefixPath']()+'/collaborator';await this[_0x57fc22(0x307)]['delete'](_0x2d51b7,{'params':{'collaboratorID':_0x1a13f8[_0x57fc22(0x475)],'objectID':_0x1a13f8[_0x57fc22(0x34d)],'unitID':_0x1a13f8[_0x57fc22(0x481)]}});}async[_0x54582d(0x430)](_0x1fcbef){const _0x1aec9b=_0x54582d,_0x54ce98=this[_0x1aec9b(0x1e5)]()+_0x1aec9b(0x2b6);await this[_0x1aec9b(0x307)][_0x1aec9b(0x3f8)](_0x54ce98,{'body':_0x1fcbef});}async[_0x54582d(0x2f0)](_0x3cd904){const _0x1abbef=_0x54582d,_0x452f7b=this[_0x1abbef(0x1e5)]()+'/collaborator';await this[_0x1abbef(0x307)][_0x1abbef(0x380)](_0x452f7b,{'body':_0x3cd904});}async[_0x54582d(0x414)](_0x106ca9){const _0x15f8ff=_0x54582d;var _0x10bae5;const _0xf1f481=this['_getAPIPrefixPath']()+_0x15f8ff(0x2b6),_0x70c306=await this[_0x15f8ff(0x307)][_0x15f8ff(0x2c8)](_0xf1f481,{'params':{'objectID':_0x106ca9[_0x15f8ff(0x34d)],'unitID':_0x106ca9[_0x15f8ff(0x481)]}});return this['setCfgEnableObjInherit']((_0x10bae5=_0x70c306[_0x15f8ff(0x2ff)][_0x15f8ff(0x204)])!==null&&_0x10bae5!==void 0x0?_0x10bae5:![]),_0x70c306[_0x15f8ff(0x2ff)][_0x15f8ff(0x3df)];}async[_0x54582d(0x2b5)](_0x1a9366){const _0x50db4e=_0x54582d,_0xd9c395=this['_getAPIPrefixPath']()+'/collaborator';await this[_0x50db4e(0x307)][_0x50db4e(0x382)](_0xd9c395,{'body':_0x1a9366});}[_0x54582d(0x2f7)](_0x418bb1){const _0x33abd5=_0x54582d;this[_0x33abd5(0x3d4)]=_0x418bb1;}[_0x54582d(0x352)](){const _0x498c7c=_0x54582d;return this[_0x498c7c(0x3d4)];}};AuthzIoHttpService=__decorate([__decorateParam(0x0,(0x0,_univerjs_core[_0x54582d(0x205)])(_univerjs_network[_0x54582d(0x300)])),__decorateParam(0x1,(0x0,_univerjs_core['Inject'])(_univerjs_core[_0x54582d(0x29e)]))],AuthzIoHttpService);function base64ToBytes(_0x39992c){const _0x4d8e66=_0x54582d,_0x15d884=atob(_0x39992c),_0x2d031d=new Uint8Array(_0x15d884[_0x4d8e66(0x473)]);for(let _0x5d99df=0x0;_0x5d99df<_0x15d884[_0x4d8e66(0x473)];_0x5d99df++)_0x2d031d[_0x5d99df]=_0x15d884[_0x4d8e66(0x1ec)](_0x5d99df);return _0x2d031d;}function bytesToBase64(_0x22e2b0){const _0x2e42d2=_0x54582d;let _0x142a1f='';for(let _0x38bc0a=0x0;_0x38bc0a<_0x22e2b0[_0x2e42d2(0x473)];_0x38bc0a++)_0x142a1f+=String[_0x2e42d2(0x2db)](_0x22e2b0[_0x38bc0a]);return btoa(_0x142a1f);}function encrypt(_0xf1f3da,_0x5380c3){const _0xba0ecb=_0x54582d,_0x14485b=base64ToBytes(_0x5380c3),_0x155008=(0x0,_noble_ciphers_utils_js[_0xba0ecb(0x29b)])(0x10);return bytesToBase64((0x0,_noble_ciphers_utils_js[_0xba0ecb(0x1f5)])(_0x155008,(0x0,_noble_ciphers_aes_js[_0xba0ecb(0x459)])(_0x14485b,_0x155008)[_0xba0ecb(0x1d3)]((0x0,_noble_ciphers_utils_js[_0xba0ecb(0x2c3)])(_0xf1f3da))));}function getAttachHeader(){const _0x4481c2=_0x54582d,_0x2637ed=(0x0,_univerjs_pro_license[_0x4481c2(0x304)])()['__Key__'];if(typeof window!=='undefined'&&typeof window[_0x4481c2(0x3fc)]!==_0x4481c2(0x2bf)&&_0x2637ed){const _0x5c0d05={'time':Math['floor'](Date[_0x4481c2(0x37d)]()/0x3e8),'domain':location[_0x4481c2(0x2b8)]};return encrypt(JSON[_0x4481c2(0x276)](_0x5c0d05),_0x2637ed);}}let DomainRequestService=class DomainRequestService{constructor(_0x51f870){const _0x8d4c63=_0x54582d;this[_0x8d4c63(0x392)]=_0x51f870,this[_0x8d4c63(0x265)]();}[_0x54582d(0x265)](){const _0x4e0fe0=_0x54582d;this[_0x4e0fe0(0x392)][_0x4e0fe0(0x2c7)]({'interceptor':(_0x577088,_0x5511c0)=>{const _0x5728c6=_0x4e0fe0,_0x4880b7=getAttachHeader();if(_0x4880b7)_0x577088[_0x5728c6(0x417)][_0x5728c6(0x298)]('x-univer-host',_0x4880b7);return _0x5511c0(_0x577088);}});}};DomainRequestService=__decorate([__decorateParam(0x0,(0x0,_univerjs_core['Inject'])(_univerjs_network[_0x54582d(0x300)]))],DomainRequestService);let DataLoaderService=class DataLoaderService extends _univerjs_core[_0x54582d(0x21c)]{constructor(_0x1d6f46,_0x962928,_0x2c6081){const _0x3dcc37=_0x54582d;super(),this[_0x3dcc37(0x469)]=_0x1d6f46,this[_0x3dcc37(0x373)]=_0x962928,this[_0x3dcc37(0x310)]=_0x2c6081,_defineProperty(this,_0x3dcc37(0x328),new rxjs[(_0x3dcc37(0x3c7))](null)),_defineProperty(this,'unitInfo$',this[_0x3dcc37(0x328)][_0x3dcc37(0x2a1)]());}async[_0x54582d(0x35c)](_0xb919b3,_0x22ae83,_0x5324ef){const _0x35a0d2=_0x54582d;this[_0x35a0d2(0x328)][_0x35a0d2(0x22a)]({'unitId':_0xb919b3,'type':_0x22ae83});let _0x32eac1=null;switch(_0x22ae83){case _univerjs_core[_0x35a0d2(0x2fd)]['UNIVER_SHEET']:_0x32eac1=await this[_0x35a0d2(0x373)]['loadSheet'](_0xb919b3,_0x5324ef);break;case _univerjs_core['UniverInstanceType'][_0x35a0d2(0x2e6)]:_0x32eac1=await this[_0x35a0d2(0x373)][_0x35a0d2(0x244)](_0xb919b3,_0x5324ef);break;default:this[_0x35a0d2(0x469)]['error'](_0x35a0d2(0x383),_0x35a0d2(0x325));break;}return _0x32eac1;}async[_0x54582d(0x201)](_0x16a3fb,_0x487a46,_0x2f40a3){const _0x577ceb=_0x54582d;var _0x4ada1c;this[_0x577ceb(0x328)][_0x577ceb(0x22a)]({'unitId':_0x16a3fb,'type':_0x487a46,'subUnitId':_0x2f40a3});let _0x5e2af1=0x0;const _0x3b969a=await((_0x4ada1c=this['_localCacheService'])===null||_0x4ada1c===void 0x0?void 0x0:_0x4ada1c['loadOfflineData'](_0x16a3fb));if(_0x3b969a&&(_0x3b969a[_0x577ceb(0x3e9)]||_0x3b969a[_0x577ceb(0x334)][_0x577ceb(0x473)]!==0x0))_0x5e2af1=_0x3b969a['rev'];if(_0x5e2af1===0x0)this[_0x577ceb(0x469)]['debug'](_0x577ceb(0x383),_0x577ceb(0x289));return this[_0x577ceb(0x35c)](_0x16a3fb,_0x487a46,_0x5e2af1);}};DataLoaderService=__decorate([__decorateParam(0x0,_univerjs_core[_0x54582d(0x31e)]),__decorateParam(0x1,(0x0,_univerjs_core[_0x54582d(0x205)])(_univerjs_pro_collaboration['SnapshotService'])),__decorateParam(0x2,(0x0,_univerjs_core[_0x54582d(0x23d)])(ILocalCacheService))],DataLoaderService);const ALLOW_IMAGE_LIST=[_0x54582d(0x441),'image/jpeg',_0x54582d(0x420),_0x54582d(0x395),'image/bmp'],ALLOW_IMAGE_SIZE=0x5*0x400*0x400,DEFAULT_EXCHANGE_UPLOAD_FILE_SERVER_URL_KEY=_0x54582d(0x457),DEFAULT_EXCHANGE_SIGN_URL_SERVER_URL_KEY='/universer-api/file/{fileID}/sign-url';let CollaborationImageIoService=class CollaborationImageIoService{constructor(_0x10ebaa,_0x42ad21,_0x530569){const _0x20bb41=_0x54582d;this[_0x20bb41(0x392)]=_0x10ebaa,this['_configService']=_0x42ad21,this['_univerInstanceService']=_0x530569,_defineProperty(this,_0x20bb41(0x2ee),0x0),_defineProperty(this,_0x20bb41(0x465),new rxjs[(_0x20bb41(0x263))]()),_defineProperty(this,_0x20bb41(0x274),this[_0x20bb41(0x465)]),_defineProperty(this,_0x20bb41(0x39f),new Map());}['setWaitCount'](_0x5cb744){const _0x4c705d=_0x54582d;this[_0x4c705d(0x2ee)]=_0x5cb744,this[_0x4c705d(0x465)][_0x4c705d(0x22a)](_0x5cb744);}[_0x54582d(0x1f4)](_0x3c61bb,_0x3f0fb4){const _0x1310d6=_0x54582d;if(_0x3f0fb4===_univerjs_drawing[_0x1310d6(0x33e)][_0x1310d6(0x42e)]){const _0x3246d2=new Image();return _0x3246d2[_0x1310d6(0x1fe)]=_0x3c61bb,_0x3246d2;}return this[_0x1310d6(0x39f)]['get'](_0x3c61bb);}[_0x54582d(0x364)](_0x2b6710,_0x361c53,_0x1421fd){const _0x3d442a=_0x54582d;if(_0x361c53===_univerjs_drawing[_0x3d442a(0x33e)][_0x3d442a(0x42e)]||_0x1421fd==null)return;this[_0x3d442a(0x39f)][_0x3d442a(0x298)](_0x2b6710,_0x1421fd);}async[_0x54582d(0x3d8)](_0x31aeda){const _0x4936a0=_0x54582d;try{const _0x5b72d2=this[_0x4936a0(0x353)](this[_0x4936a0(0x269)](),''+_0x31aeda),_0x51086b=(await this['_httpService'][_0x4936a0(0x2c8)](_0x5b72d2))['body'];if(_0x51086b[_0x4936a0(0x3e0)]&&_0x51086b[_0x4936a0(0x3e0)][_0x4936a0(0x1bf)]===_univerjs_protocol[_0x4936a0(0x241)]['OK']){const _0x51463e=(0x0,_univerjs_core[_0x4936a0(0x309)])(_0x51086b[_0x4936a0(0x302)],this[_0x4936a0(0x40d)]());return Promise[_0x4936a0(0x25d)](_0x51463e);}return Promise[_0x4936a0(0x1ae)](_0x51086b['error']);}catch(_0x3d3679){return Promise[_0x4936a0(0x1ae)](_0x3d3679);}}async['saveImage'](_0x41395a){const _0x5f0380=_0x54582d;let _0x4d55b3='';if(!ALLOW_IMAGE_LIST[_0x5f0380(0x1a4)](_0x41395a[_0x5f0380(0x343)]))return this[_0x5f0380(0x2c2)](),Promise[_0x5f0380(0x1ae)](new Error(_univerjs_drawing[_0x5f0380(0x2ad)]['ERROR_IMAGE_TYPE']));if(_0x41395a[_0x5f0380(0x239)]>ALLOW_IMAGE_SIZE)return this['_decreaseWaiting'](),Promise[_0x5f0380(0x1ae)](new Error(_univerjs_drawing[_0x5f0380(0x2ad)][_0x5f0380(0x407)]));try{const _0xc25ae9=new FormData();_0xc25ae9[_0x5f0380(0x1f6)](_0x5f0380(0x3ab),_0x41395a);const _0x12b21b=this[_0x5f0380(0x46c)]['getFocusedUnit'](),_0x3f609d=_0x12b21b===null||_0x12b21b===void 0x0?void 0x0:_0x12b21b[_0x5f0380(0x27f)]();if(!_0x3f609d)throw new Error('unitId\x20is\x20not\x20found');const _0xc744eb=this[_0x5f0380(0x348)]()+_0x5f0380(0x28a)+_0x41395a[_0x5f0380(0x239)][_0x5f0380(0x32f)]()+_0x5f0380(0x371)+_univerjs_protocol[_0x5f0380(0x342)][_0x5f0380(0x425)]+'&assign='+encodeURIComponent(_0x3f609d),_0x3d64b7={'body':_0xc25ae9},_0x5cd65f=(await this['_httpService'][_0x5f0380(0x380)](_0xc744eb,_0x3d64b7))[_0x5f0380(0x2ff)];if(typeof _0x5cd65f[_0x5f0380(0x37a)]!=='string')return this[_0x5f0380(0x2c2)](),Promise['reject'](new Error(_univerjs_drawing[_0x5f0380(0x2ad)][_0x5f0380(0x1a5)]));_0x4d55b3=_0x5cd65f['FileId'];}catch(_0x450c3b){return this['_decreaseWaiting'](),Promise[_0x5f0380(0x1ae)](new Error(_univerjs_drawing[_0x5f0380(0x2ad)][_0x5f0380(0x1a5)]));}return new Promise((_0x7f370b,_0x9f6f35)=>{const _0x2ef248=_0x5f0380,_0x4b758f=new FileReader();_0x4b758f['readAsDataURL'](_0x41395a),_0x4b758f[_0x2ef248(0x436)]=_0x549b2e=>{const _0x319adb=_0x2ef248;var _0x114692;const _0x1e8184=(_0x114692=_0x549b2e[_0x319adb(0x315)])===null||_0x114692===void 0x0?void 0x0:_0x114692[_0x319adb(0x3d6)];if(_0x1e8184==null){this[_0x319adb(0x2c2)](),_0x9f6f35(new Error(_univerjs_drawing[_0x319adb(0x2ad)]['ERROR_IMAGE']));return;}_0x7f370b({'imageId':(0x0,_univerjs_core[_0x319adb(0x3fa)])(0x6),'imageSourceType':_univerjs_drawing['ImageSourceType'][_0x319adb(0x43d)],'source':_0x4d55b3,'base64Cache':_0x1e8184,'status':_univerjs_drawing[_0x319adb(0x2ad)][_0x319adb(0x47d)]}),this[_0x319adb(0x2c2)]();};});}[_0x54582d(0x348)](){const _0x1dccb8=_0x54582d;var _0x17646a;const _0x3b7136=this[_0x1dccb8(0x345)]['getConfig'](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY);return(_0x17646a=_0x3b7136===null||_0x3b7136===void 0x0?void 0x0:_0x3b7136[_0x1dccb8(0x1e7)])!==null&&_0x17646a!==void 0x0?_0x17646a:DEFAULT_EXCHANGE_UPLOAD_FILE_SERVER_URL_KEY;}[_0x54582d(0x269)](){const _0x3d29a2=_0x54582d;var _0x2becd5;const _0x54f8fa=this[_0x3d29a2(0x345)][_0x3d29a2(0x3de)](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY);return(_0x2becd5=_0x54f8fa===null||_0x54f8fa===void 0x0?void 0x0:_0x54f8fa[_0x3d29a2(0x3b9)])!==null&&_0x2becd5!==void 0x0?_0x2becd5:DEFAULT_EXCHANGE_SIGN_URL_SERVER_URL_KEY;}['_getDownloadEndpointURL'](){const _0xaf0aec=_0x54582d;var _0x469082;const _0x2ca210=this['_configService'][_0xaf0aec(0x3de)](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY);return(_0x469082=_0x2ca210===null||_0x2ca210===void 0x0?void 0x0:_0x2ca210[_0xaf0aec(0x26e)])!==null&&_0x469082!==void 0x0?_0x469082:location['origin'];}['_replaceFileID'](_0x414cfa,_0x1799f0){const _0x25f8ad=_0x54582d;return _0x414cfa[_0x25f8ad(0x25b)](_0x25f8ad(0x319),_0x1799f0);}[_0x54582d(0x2c2)](){const _0x52f00c=_0x54582d;this['_waitCount']-=0x1,this[_0x52f00c(0x465)][_0x52f00c(0x22a)](this[_0x52f00c(0x2ee)]);}};CollaborationImageIoService=__decorate([__decorateParam(0x0,(0x0,_univerjs_core[_0x54582d(0x205)])(_univerjs_network[_0x54582d(0x300)])),__decorateParam(0x1,_univerjs_core['IConfigService']),__decorateParam(0x2,(0x0,_univerjs_core[_0x54582d(0x205)])(_univerjs_core[_0x54582d(0x3f4)]))],CollaborationImageIoService);const DEFAULT_AUTHZ_URL_KEY=_0x54582d(0x221);let MentionIoHttpService=class MentionIoHttpService{constructor(_0x115c86,_0x55d3aa){const _0x5860c5=_0x54582d;this[_0x5860c5(0x345)]=_0x115c86,this[_0x5860c5(0x307)]=_0x55d3aa;}[_0x54582d(0x1e5)](){const _0x5b80ba=_0x54582d;var _0x48ef50;const _0x4c74ff=this[_0x5b80ba(0x345)]['getConfig'](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY);return(_0x48ef50=_0x4c74ff===null||_0x4c74ff===void 0x0?void 0x0:_0x4c74ff['authzUrl'])!==null&&_0x48ef50!==void 0x0?_0x48ef50:DEFAULT_AUTHZ_URL_KEY;}async['list'](_0x3016ca){const _0x40cd7d=_0x54582d,_0x4912c1=this['_getAPIPrefixPath']()+'/collaborator';return{'list':[{'title':_0x40cd7d(0x279),'mentions':(await this[_0x40cd7d(0x307)][_0x40cd7d(0x2c8)](_0x4912c1,{'params':{'objectID':_0x3016ca[_0x40cd7d(0x313)],'unitID':_0x3016ca[_0x40cd7d(0x313)]}}))['body'][_0x40cd7d(0x3df)]['map'](_0x45acdc=>({'objectId':_0x45acdc['id'],'name':_0x45acdc[_0x40cd7d(0x428)][_0x40cd7d(0x35a)],'metadata':{'icon':_0x45acdc[_0x40cd7d(0x428)]['avatar']},'label':_0x45acdc[_0x40cd7d(0x428)]['name'],'objectType':_univerjs_core['MentionType'][_0x40cd7d(0x27a)]})),'metadata':{},'type':_univerjs_core[_0x40cd7d(0x2f2)][_0x40cd7d(0x27a)]}]};}};MentionIoHttpService=__decorate([__decorateParam(0x0,(0x0,_univerjs_core[_0x54582d(0x205)])(_univerjs_core[_0x54582d(0x29e)])),__decorateParam(0x1,(0x0,_univerjs_core[_0x54582d(0x205)])(_univerjs_network[_0x54582d(0x300)]))],MentionIoHttpService);let PermissionService=class PermissionService extends _univerjs_core[_0x54582d(0x21c)]{constructor(_0x239b14,_0x4662bf,_0x3aac5a,_0x37e70b,_0x1ecc85){const _0x51f038=_0x54582d;super(),this[_0x51f038(0x42a)]=_0x239b14,this[_0x51f038(0x46c)]=_0x4662bf,this[_0x51f038(0x39a)]=_0x3aac5a,this[_0x51f038(0x227)]=_0x37e70b,this['_collaborationUIEventService']=_0x1ecc85,this[_0x51f038(0x280)](),this['_initCloseConn']();}[_0x54582d(0x344)](){const _0x125812=_0x54582d,_0x5f029a=async _0x350cc4=>{const _0x5f492a=_0x598e;(await this[_0x5f492a(0x227)][_0x5f492a(0x25f)](_0x350cc4))[_0x5f492a(0x2f4)][_0x5f492a(0x197)]((0x0,rxjs_operators[_0x5f492a(0x1a9)])(_0x1fb438=>_0x1fb438[_0x5f492a(0x206)]===_univerjs_pro_collaboration[_0x5f492a(0x439)][_0x5f492a(0x2c6)]),(0x0,rxjs_operators[_0x5f492a(0x324)])(this['dispose$']))[_0x5f492a(0x1c3)](_0x5d39a6=>{const _0x2c6905=_0x5f492a,{reason:_0x1a5daf}=_0x5d39a6[_0x2c6905(0x341)];this[_0x2c6905(0x350)]['emitEvent']({'id':CollaborationUIEventId[_0x2c6905(0x317)],'data':_0x1a5daf}),this[_0x2c6905(0x39a)][_0x2c6905(0x252)](new _univerjs_sheets[(_0x2c6905(0x20f))](_0x350cc4)['id'],![]),this[_0x2c6905(0x227)][_0x2c6905(0x3bb)](_0x350cc4);});};(0x0,rxjs[_0x125812(0x1a1)])(this[_0x125812(0x46c)][_0x125812(0x47c)](_univerjs_core[_0x125812(0x2fd)][_0x125812(0x1f9)]),this[_0x125812(0x46c)][_0x125812(0x47c)](_univerjs_core[_0x125812(0x2fd)][_0x125812(0x2e6)]))['pipe']((0x0,rxjs_operators['map'])(_0x34206e=>_0x34206e[_0x125812(0x35e)][_0x125812(0x27f)]()),(0x0,rxjs_operators[_0x125812(0x1a9)])(_0x43ba88=>!(0x0,_univerjs_core[_0x125812(0x3b5)])(_0x43ba88)),(0x0,rxjs_operators[_0x125812(0x324)])(this[_0x125812(0x3d9)]))[_0x125812(0x1c3)](_0x1c1931=>{_0x5f029a(_0x1c1931);});}[_0x54582d(0x280)](){const _0x2ab2de=_0x54582d,_0x368224=async _0x3d3ef0=>{const _0x5d1f8b=_0x598e,_0x1eaba5=await this[_0x5d1f8b(0x227)][_0x5d1f8b(0x25f)](_0x3d3ef0),_0x38ff8a=this[_0x5d1f8b(0x42a)][_0x5d1f8b(0x2c8)](_univerjs_sheets[_0x5d1f8b(0x38b)]);_0x1eaba5[_0x5d1f8b(0x2f4)][_0x5d1f8b(0x197)]((0x0,rxjs_operators[_0x5d1f8b(0x1a9)])(_0x1e2777=>_0x1e2777[_0x5d1f8b(0x206)]===_univerjs_pro_collaboration[_0x5d1f8b(0x439)]['UPDATE_PERMISSION_OBJ']),(0x0,rxjs_operators[_0x5d1f8b(0x324)])(this[_0x5d1f8b(0x3d9)]))[_0x5d1f8b(0x1c3)](_0x41c452=>{const _0x35a860=_0x5d1f8b,{objectId:_0x30f3cf}=_0x41c452[_0x35a860(0x341)];if(_0x30f3cf===_0x3d3ef0)_0x38ff8a[_0x35a860(0x1e8)](_0x3d3ef0);else _0x38ff8a[_0x35a860(0x45c)](_0x3d3ef0,_0x30f3cf);});};(0x0,rxjs[_0x2ab2de(0x1a1)])(this[_0x2ab2de(0x46c)]['getTypeOfUnitAdded$'](_univerjs_core[_0x2ab2de(0x2fd)][_0x2ab2de(0x1f9)]))[_0x2ab2de(0x197)]((0x0,rxjs_operators[_0x2ab2de(0x2b9)])(_0x417cda=>_0x417cda[_0x2ab2de(0x35e)][_0x2ab2de(0x27f)]()),(0x0,rxjs_operators[_0x2ab2de(0x1a9)])(_0x337570=>!(0x0,_univerjs_core['isInternalEditorID'])(_0x337570)),(0x0,rxjs_operators[_0x2ab2de(0x324)])(this[_0x2ab2de(0x3d9)]))[_0x2ab2de(0x1c3)](_0x1546b5=>{_0x368224(_0x1546b5);});}};PermissionService=__decorate([__decorateParam(0x0,(0x0,_univerjs_core[_0x54582d(0x205)])(_univerjs_core[_0x54582d(0x28f)])),__decorateParam(0x1,_univerjs_core[_0x54582d(0x3f4)]),__decorateParam(0x2,_univerjs_core[_0x54582d(0x247)]),__decorateParam(0x3,(0x0,_univerjs_core[_0x54582d(0x205)])(CollaborationSessionService)),__decorateParam(0x4,(0x0,_univerjs_core['Inject'])(CollaborationUIEventService))],PermissionService);let SnapshotServerOverHTTPService=class SnapshotServerOverHTTPService{constructor(_0x54ba07,_0x26b1c4){const _0x44d1ae=_0x54582d;this[_0x44d1ae(0x345)]=_0x54ba07,this[_0x44d1ae(0x392)]=_0x26b1c4;}async[_0x54582d(0x2d8)](_0x1f0fe2,_0x8bafd8){const _0x379529=_0x54582d;var _0x2582a5;const {unitID:_0x460d6c,type:_0x10ba83,revision:revision=0x0}=_0x8bafd8,_0x26b9a1=this[_0x379529(0x3b1)]()+'/'+_0x10ba83+'/unit/'+_0x460d6c+'/rev/'+revision,_0x40d024=(await this[_0x379529(0x392)][_0x379529(0x2c8)](_0x26b9a1))[_0x379529(0x2ff)],_0x33192c=(_0x2582a5=_0x40d024[_0x379529(0x372)])===null||_0x2582a5===void 0x0?void 0x0:_0x2582a5[_0x379529(0x43b)];if(_0x33192c){const _0x20ef06=_0x33192c===null||_0x33192c===void 0x0?void 0x0:_0x33192c[_0x379529(0x399)];_0x33192c[_0x379529(0x399)]=_univerjs_pro_collaboration[_0x379529(0x44e)]['encode']((0x0,_univerjs_pro_collaboration['b64DecodeUnicode'])(_0x20ef06)),Object['entries'](_0x33192c[_0x379529(0x423)])[_0x379529(0x333)](([,_0x72ccc4])=>{const _0x3dc095=_0x379529,_0x54e6b3=_0x72ccc4[_0x3dc095(0x399)];_0x72ccc4[_0x3dc095(0x399)]=_univerjs_pro_collaboration[_0x3dc095(0x44e)][_0x3dc095(0x360)]((0x0,_univerjs_pro_collaboration[_0x3dc095(0x45f)])(_0x54e6b3));});}return _0x40d024;}async[_0x54582d(0x2ae)](_0x59f653,_0x3e4d75){const _0x2b12e6=_0x54582d,{unitID:_0x2f1484,type:_0x3fd254,blockID:_0x5cb73a}=_0x3e4d75,_0x564033=this[_0x2b12e6(0x2a5)]()+'/'+_0x3fd254+_0x2b12e6(0x2f6)+_0x2f1484+_0x2b12e6(0x231)+_0x5cb73a;return(await this[_0x2b12e6(0x392)][_0x2b12e6(0x2c8)](_0x564033))[_0x2b12e6(0x2ff)];}async[_0x54582d(0x2cd)](_0x579dfe,_0x2fbc7a){const _0x26b33c=_0x54582d,{unitID:_0x1cb4b6,type:_0x5c4dfb,blockID:_0x319cb1}=_0x2fbc7a,_0x452aef=this['_getAPIPrefix']()+_0x26b33c(0x231)+_0x5c4dfb+'/unit/'+_0x1cb4b6+_0x26b33c(0x231)+_0x319cb1;return(await this[_0x26b33c(0x392)][_0x26b33c(0x2c8)](_0x452aef))[_0x26b33c(0x2ff)];}async['fetchMissingChangesets'](_0x108dd4,_0x2230b7){const _0x28d96f=_0x54582d,{unitID:_0x562d84,type:_0x11028a,from:_0xfc3b9d,to:_0x38bf36}=_0x2230b7,_0xd4d54=this[_0x28d96f(0x2a5)]()+'/'+_0x11028a+_0x28d96f(0x2f6)+_0x562d84+_0x28d96f(0x3db)+_0xfc3b9d+_0x28d96f(0x418)+_0x38bf36;return(await this[_0x28d96f(0x392)][_0x28d96f(0x2c8)](_0xd4d54))['body'];}[_0x54582d(0x3b1)](){const _0x1742d9=_0x54582d;var _0xe6a6c;return(_0xe6a6c=this[_0x1742d9(0x345)][_0x1742d9(0x3de)](_0x1742d9(0x3da)))!==null&&_0xe6a6c!==void 0x0?_0xe6a6c:this[_0x1742d9(0x2a5)]();}['_getAPIPrefix'](){const _0x47f3ce=_0x54582d;var _0x37f289;const _0xa8d33c=this['_configService'][_0x47f3ce(0x3de)](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY);return(_0x37f289=_0xa8d33c===null||_0xa8d33c===void 0x0?void 0x0:_0xa8d33c[_0x47f3ce(0x367)])!==null&&_0x37f289!==void 0x0?_0x37f289:DEFAULT_SNAPSHOT_SERVER_URL;}async[_0x54582d(0x388)](_0x5f38b1,_0x37828d){const _0x194f7c=_0x54582d,_0x16e0fc=_0x194f7c(0x2d7)+_0x37828d[_0x194f7c(0x343)]+_0x194f7c(0x2f6)+_0x37828d[_0x194f7c(0x481)]+_0x194f7c(0x251);return(await this[_0x194f7c(0x392)][_0x194f7c(0x2c8)](_0x16e0fc,{'params':{'resourceId':JSON['stringify'](_0x37828d[_0x194f7c(0x37f)])}}))[_0x194f7c(0x2ff)];}[_0x54582d(0x26f)](){throw new Error('This\x20method\x20should\x20not\x20be\x20called\x20on\x20the\x20client\x20side!');}[_0x54582d(0x3ad)](){const _0x45317d=_0x54582d;throw new Error(_0x45317d(0x1f1));}['saveSheetBlock'](){throw new Error('This\x20method\x20should\x20not\x20be\x20called\x20on\x20the\x20client\x20side!');}[_0x54582d(0x3a0)](){const _0x52f257=_0x54582d;throw new Error(_0x52f257(0x1f1));}[_0x54582d(0x369)](){throw new Error('This\x20method\x20should\x20not\x20be\x20called\x20on\x20the\x20client\x20side!');}[_0x54582d(0x314)](){const _0x483c90=_0x54582d;throw new Error(_0x483c90(0x1f1));}};SnapshotServerOverHTTPService=__decorate([__decorateParam(0x0,_univerjs_core['IConfigService']),__decorateParam(0x1,(0x0,_univerjs_core[_0x54582d(0x205)])(_univerjs_network[_0x54582d(0x300)]))],SnapshotServerOverHTTPService);let CollaborativeUndoRedoService=class CollaborativeUndoRedoService extends _univerjs_core[_0x54582d(0x447)]{constructor(_0x3269a2,_0x16187e,_0x3debce,_0x442f82,_0x4a35c6){const _0xd6cf01=_0x54582d;super(_0x3269a2,_0x16187e,_0x3debce),this[_0xd6cf01(0x448)]=_0x442f82,this[_0xd6cf01(0x469)]=_0x4a35c6;}[_0x54582d(0x3a6)](_0x1f290b,_0x340dcb){const _0x2ff4a3=_0x54582d,_0x1b9181=this[_0x2ff4a3(0x3d0)](_0x1f290b);if(_0x1b9181)try{const _0x252a1d=this[_0x2ff4a3(0x3c1)](_0x1b9181,_0x340dcb);this[_0x2ff4a3(0x23a)](_0x1f290b,_0x252a1d);}catch(_0x58a666){this[_0x2ff4a3(0x469)][_0x2ff4a3(0x3e0)](_0x2ff4a3(0x405),_0x58a666),this[_0x2ff4a3(0x3b0)](_0x1f290b);}const _0x3adfca=this[_0x2ff4a3(0x3b3)](_0x1f290b);if(_0x3adfca)try{const _0x10c5a4=this[_0x2ff4a3(0x3c1)](_0x3adfca,_0x340dcb);this[_0x2ff4a3(0x2d9)](_0x1f290b,_0x10c5a4);}catch(_0x32cadb){this['_logService']['error'](_0x32cadb),this[_0x2ff4a3(0x1f8)](_0x1f290b);}}['_clearUndo'](_0x544a3d){const _0x3668ae=this['_getUndoStack'](_0x544a3d);_0x3668ae&&(_0x3668ae['length']=0x0,this['_updateStatus']());}[_0x54582d(0x1f8)](_0x553992){const _0x41d005=_0x54582d,_0x502797=this[_0x41d005(0x3b3)](_0x553992);_0x502797&&(_0x502797[_0x41d005(0x473)]=0x0,this[_0x41d005(0x3eb)]());}[_0x54582d(0x23a)](_0x56271f,_0x1072eb){const _0x271374=_0x54582d;this[_0x271374(0x370)]['set'](_0x56271f,_0x1072eb),this['_updateStatus']();}[_0x54582d(0x2d9)](_0x163c7a,_0x28798f){const _0x1c9b41=_0x54582d;this[_0x1c9b41(0x40b)][_0x1c9b41(0x298)](_0x163c7a,_0x28798f),this[_0x1c9b41(0x3eb)]();}[_0x54582d(0x3c1)](_0x3930af,_0x29d734){const _0x140500=_0x54582d,_0x3f7fca=[];let _0x1bd6f9=_0x29d734,_0x36e200=_0x29d734;for(let _0x430c98=_0x3930af[_0x140500(0x473)]-0x1;_0x430c98>=0x0;_0x430c98--){const {unitID:_0x47e1e7,undoMutations:_0x5783e2,redoMutations:_0x19dd53}=_0x3930af[_0x430c98],_0x34d3fe=this[_0x140500(0x448)][_0x140500(0x24e)](_0x1bd6f9,_0x5783e2),_0xe0bf42=this[_0x140500(0x448)][_0x140500(0x24e)](_0x36e200,_0x19dd53);if((0x0,_univerjs_pro_collaboration['isTransformMutationsWithChangesetFailure'])(_0x34d3fe)||(0x0,_univerjs_pro_collaboration[_0x140500(0x2fb)])(_0xe0bf42)){this[_0x140500(0x469)][_0x140500(0x3e0)](_0x140500(0x405),_0x140500(0x32c),_0x34d3fe,_0xe0bf42);break;}_0x1bd6f9=_0x34d3fe[_0x140500(0x28e)],_0x36e200=_0xe0bf42[_0x140500(0x28e)],_0x3f7fca[_0x140500(0x35d)]({'unitID':_0x47e1e7,'undoMutations':_0x34d3fe[_0x140500(0x379)],'redoMutations':_0xe0bf42[_0x140500(0x379)]});}return _0x3f7fca[_0x140500(0x354)]();}};CollaborativeUndoRedoService=__decorate([__decorateParam(0x0,_univerjs_core[_0x54582d(0x3f4)]),__decorateParam(0x1,_univerjs_core[_0x54582d(0x1a6)]),__decorateParam(0x2,_univerjs_core[_0x54582d(0x44f)]),__decorateParam(0x3,_univerjs_pro_collaboration['ITransformService']),__decorateParam(0x4,_univerjs_core[_0x54582d(0x31e)])],CollaborativeUndoRedoService);let UniverCollaborationClientPlugin=class UniverCollaborationClientPlugin extends _univerjs_core['Plugin']{constructor(_0x44c192={},_0x2d66c4,_0x25fb10,_0x2298e0){const _0x9dc909=_0x54582d;super(),this[_0x9dc909(0x2ea)]=_0x44c192,this['_logService']=_0x2d66c4,this[_0x9dc909(0x42a)]=_0x25fb10,this[_0x9dc909(0x345)]=_0x2298e0;const {..._0x3960ac}=(0x0,_univerjs_core[_0x9dc909(0x1a1)])({},defaultPluginConfig,_0x44c192);if(!_0x3960ac[_0x9dc909(0x2e9)])throw new Error(_0x9dc909(0x39c));this['_config']=_0x3960ac,this[_0x9dc909(0x345)][_0x9dc909(0x2ed)](COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY,_0x3960ac);}[_0x54582d(0x3d7)](){const _0x47ab8e=_0x54582d;this[_0x47ab8e(0x3c2)](),this[_0x47ab8e(0x230)]();}[_0x54582d(0x3c2)](){const _0x4338d3=_0x54582d;var _0x160f7f,_0x27a202;if(this[_0x4338d3(0x42a)][_0x4338d3(0x1b7)](_univerjs_core[_0x4338d3(0x2eb)]))this[_0x4338d3(0x469)]['error'](_0x4338d3(0x217),_0x4338d3(0x44d));const _0x359891=(0x0,_univerjs_core['mergeOverrideWithDependencies'])([[_univerjs_core['IUndoRedoService'],{'useClass':CollaborativeUndoRedoService}],[CollaborationSessionService],[MemberService],[SheetTransformSelectionsService],[AuthServerService],[DomainRequestService],[CommentService],[PermissionService],[CollaborationUIEventService],[DataLoaderService],[ICollaborationSocketService,{'useClass':this['_config'][_0x4338d3(0x2e9)]}],[_univerjs_pro_collaboration[_0x4338d3(0x43e)],{'useClass':SnapshotServerOverHTTPService}],[_univerjs_core[_0x4338d3(0x34e)],{'useClass':AuthzIoHttpService}],[_univerjs_drawing[_0x4338d3(0x3fe)],{'useClass':CollaborationImageIoService}],[_univerjs_core[_0x4338d3(0x406)],{'useClass':MentionIoHttpService}],[CollaborationController],[FileNameController]],(_0x160f7f=this[_0x4338d3(0x2ea)])===null||_0x160f7f===void 0x0?void 0x0:_0x160f7f[_0x4338d3(0x235)]);if(!((_0x27a202=this['_config'])===null||_0x27a202===void 0x0?void 0x0:_0x27a202[_0x4338d3(0x26b)])){const _0x1e316d=_0x359891[_0x4338d3(0x320)](([_0x117f16])=>_0x117f16===ISingleActiveUnitService);if(_0x1e316d!==-0x1)_0x359891[_0x4338d3(0x3a2)](_0x1e316d,0x1);}(0x0,_univerjs_core['registerDependencies'])(this[_0x4338d3(0x42a)],_0x359891);}[_0x54582d(0x230)](){const _0x50447c=_0x54582d;var _0x22dd3d,_0x3bbe19;this[_0x50447c(0x42a)][_0x50447c(0x2c8)](_univerjs_network[_0x50447c(0x300)])[_0x50447c(0x2c7)]({'priority':0x14,'interceptor':(0x0,_univerjs_network['ThresholdInterceptorFactory'])({'maxParallel':0x6})});if(!((_0x22dd3d=this['_config'])===null||_0x22dd3d===void 0x0?void 0x0:_0x22dd3d[_0x50447c(0x2f8)])){var _0x8b7489;(_0x8b7489=this[_0x50447c(0x42a)][_0x50447c(0x2c8)](ILocalCacheService,_univerjs_core[_0x50447c(0x3a7)][_0x50447c(0x3cc)]))===null||_0x8b7489===void 0x0||_0x8b7489[_0x50447c(0x323)]();}if((_0x3bbe19=this['_config'])===null||_0x3bbe19===void 0x0?void 0x0:_0x3bbe19['enableAuthServer'])(0x0,_univerjs_core[_0x50447c(0x2dc)])(this[_0x50447c(0x42a)],[[AuthServerService]]);(0x0,_univerjs_core[_0x50447c(0x2dc)])(this[_0x50447c(0x42a)],[[DomainRequestService],[CollaborationController],[PermissionService]]);}};_defineProperty(UniverCollaborationClientPlugin,'pluginName',_0x54582d(0x361)),_defineProperty(UniverCollaborationClientPlugin,_0x54582d(0x3c5),name),_defineProperty(UniverCollaborationClientPlugin,_0x54582d(0x42f),version),UniverCollaborationClientPlugin=__decorate([(0x0,_univerjs_core[_0x54582d(0x332)])(_univerjs_pro_license[_0x54582d(0x1b5)],_univerjs_pro_collaboration[_0x54582d(0x3b7)],_univerjs_network[_0x54582d(0x3cb)]),__decorateParam(0x1,_univerjs_core[_0x54582d(0x31e)]),__decorateParam(0x2,(0x0,_univerjs_core['Inject'])(_univerjs_core[_0x54582d(0x28f)])),__decorateParam(0x3,_univerjs_core['IConfigService'])],UniverCollaborationClientPlugin),Object['defineProperty'](exports,_0x54582d(0x283),{'enumerable':!![],'get':function(){return AuthzIoHttpService;}}),Object[_0x54582d(0x2c9)](exports,_0x54582d(0x22e),{'enumerable':!![],'get':function(){return AwaitingState;}}),Object['defineProperty'](exports,_0x54582d(0x40a),{'enumerable':!![],'get':function(){return AwaitingWithPendingState;}}),exports[_0x54582d(0x32d)]=COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY,Object[_0x54582d(0x2c9)](exports,_0x54582d(0x433),{'enumerable':!![],'get':function(){return CollaborationController;}}),Object[_0x54582d(0x2c9)](exports,_0x54582d(0x210),{'enumerable':!![],'get':function(){return CollaborationEntity;}}),Object[_0x54582d(0x2c9)](exports,_0x54582d(0x3f1),{'enumerable':!![],'get':function(){return CollaborationImageIoService;}}),Object[_0x54582d(0x2c9)](exports,_0x54582d(0x384),{'enumerable':!![],'get':function(){return CollaborationSession;}}),Object[_0x54582d(0x2c9)](exports,'CollaborationSessionService',{'enumerable':!![],'get':function(){return CollaborationSessionService;}}),Object['defineProperty'](exports,'CollaborationSocketService',{'enumerable':!![],'get':function(){return CollaborationSocketService;}}),exports['CollaborationStatus']=CollaborationStatus,exports[_0x54582d(0x41c)]=CollaborationUIEventId,exports[_0x54582d(0x2b2)]=CollaborationUIEventService,Object[_0x54582d(0x2c9)](exports,_0x54582d(0x38c),{'enumerable':!![],'get':function(){return CollaborativeUndoRedoService;}}),exports[_0x54582d(0x2a2)]=CommentService,Object[_0x54582d(0x2c9)](exports,_0x54582d(0x28b),{'enumerable':!![],'get':function(){return ConflictState;}}),exports[_0x54582d(0x1be)]=DEFAULT_COLLAB_WEB_SOCKET_URL,exports[_0x54582d(0x466)]=DEFAULT_REMOTE_UNISCRIPT_EXECUTION_ENDPOINT,exports[_0x54582d(0x484)]=DEFAULT_WS_SESSION_TICKET_URL,Object['defineProperty'](exports,_0x54582d(0x419),{'enumerable':!![],'get':function(){return DataLoaderService;}}),Object[_0x54582d(0x2c9)](exports,_0x54582d(0x356),{'enumerable':!![],'get':function(){return DocCollaborationEntity;}}),Object['defineProperty'](exports,_0x54582d(0x271),{'enumerable':!![],'get':function(){return FetchingMissState;}}),exports[_0x54582d(0x21d)]=HEARTBEAT_INTERVAL_KEY,exports[_0x54582d(0x218)]=HEARTBEAT_TIMEOUT_KEY,exports[_0x54582d(0x454)]=ICollaborationSocketService,exports['ILocalCacheService']=ILocalCacheService,exports[_0x54582d(0x24f)]=INetworkConditionService,exports['ISingleActiveUnitService']=ISingleActiveUnitService,exports['LOCAL_CACHE_INTERVAL']=LOCAL_CACHE_INTERVAL,exports['LOCAL_CACHE_INTERVAL_KEY']=LOCAL_CACHE_INTERVAL_KEY,Object[_0x54582d(0x2c9)](exports,_0x54582d(0x3a3),{'enumerable':!![],'get':function(){return MemberService;}}),Object['defineProperty'](exports,_0x54582d(0x242),{'enumerable':!![],'get':function(){return MentionIoHttpService;}}),Object[_0x54582d(0x2c9)](exports,_0x54582d(0x214),{'enumerable':!![],'get':function(){return OfflineState;}}),Object[_0x54582d(0x2c9)](exports,_0x54582d(0x248),{'enumerable':!![],'get':function(){return PendingState;}}),exports['REMOTE_UNISCRIPT_EXECUTION_ENDPOINT_KEY']=REMOTE_UNISCRIPT_EXECUTION_ENDPOINT_KEY,exports[_0x54582d(0x1cf)]=RETRY_CONNECTING_MAX_COUNT_KEY,exports['SessionStatus']=SessionStatus,Object[_0x54582d(0x2c9)](exports,_0x54582d(0x3ed),{'enumerable':!![],'get':function(){return SheetCollaborationEntity;}}),Object[_0x54582d(0x2c9)](exports,_0x54582d(0x41b),{'enumerable':!![],'get':function(){return SheetTransformSelectionsService;}}),Object[_0x54582d(0x2c9)](exports,_0x54582d(0x460),{'enumerable':!![],'get':function(){return SnapshotServerOverHTTPService;}}),Object[_0x54582d(0x2c9)](exports,_0x54582d(0x29a),{'enumerable':!![],'get':function(){return SyncedState;}}),exports['UnitStatus']=UnitStatus,Object[_0x54582d(0x2c9)](exports,_0x54582d(0x482),{'enumerable':!![],'get':function(){return UniverCollaborationClientPlugin;}}),exports[_0x54582d(0x3ae)]=deserializeToCombResponse,exports[_0x54582d(0x27b)]=getLocalCacheKey,exports[_0x54582d(0x19c)]=serializeCombRequest;
|