@univer-cli/univer-collaboration-runtime 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.mjs +1 -1
  2. package/package.json +12 -12
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- const _0x11d030=_0x583c;(function(_0x373015,_0x2bde9d){const _0x97d168=_0x583c,_0x29ca8a=_0x373015();while(!![]){try{const _0x2950d9=parseInt(_0x97d168(0x2a8))/0x1*(-parseInt(_0x97d168(0x2b6))/0x2)+-parseInt(_0x97d168(0x1b5))/0x3*(-parseInt(_0x97d168(0x15f))/0x4)+parseInt(_0x97d168(0x167))/0x5+parseInt(_0x97d168(0x205))/0x6*(parseInt(_0x97d168(0x21c))/0x7)+parseInt(_0x97d168(0x23c))/0x8+parseInt(_0x97d168(0x145))/0x9+-parseInt(_0x97d168(0x22a))/0xa*(parseInt(_0x97d168(0x182))/0xb);if(_0x2950d9===_0x2bde9d)break;else _0x29ca8a['push'](_0x29ca8a['shift']());}catch(_0x20910b){_0x29ca8a['push'](_0x29ca8a['shift']());}}}(_0x5cc0,0xd0b4f));import{CommandType as _0x8f800b,DependentOn as _0x402b0b,ICommandService as _0x16b588,IUniverInstanceService as _0x5896bb,Inject as _0x2dcc67,Injector as _0x3a4ce6,Plugin as _0xfef6ce,UniverInstanceType as _0x20b30d,registerDependencies as _0x56afce,sequenceExecute as _0xd0978b,toDisposable as _0x586343}from'@univerjs/core';import{CompressMutationService as _0x79e251,ISnapshotServerService as _0x4dc918,ITransformService as _0x4fd054,RevertRevisionMutation as _0x4e6ffd,RevisionService as _0x3614fb,SnapshotService as _0x561fda,UniverCollaborationPlugin as _0x382b63,isTransformMutationsSuccess as _0x4dd855,parseChangesetToProtocol as _0x437dd3,parseMutationToProtocol as _0x451c27,parseProtocolChangeset as _0x2b9af6,transformSnapshotToBaseData as _0xf344e5,transformSnapshotToBoardData as _0x48a275,transformSnapshotToDocumentData as _0x9a37bd,transformSnapshotToSlideData as _0x3b04ef,transformSnapshotToWorkbookData as _0x3c8e29}from'@univerjs-pro/collaboration';import{FormulaCalculationSessionService as _0x25ed85}from'@univerjs/engine-formula';import{CmdRspCode as _0xe6f23a,CombCmd as _0x3042f5,isError as _0x400ff3}from'@univerjs/protocol';import{PersistFormulaLastValuesCommand as _0x5e9279}from'@univerjs-pro/engine-formula';import{DocStateChangeManagerService as _0x3d47df,RichTextEditingMutation as _0x2431f0}from'@univerjs/docs';import{IRenderManagerService as _0x36e564}from'@univerjs/engine-render';import{FUniver as _0x306570}from'@univerjs/core/facade';import'@univerjs-pro/bases/facade';import'@univerjs-pro/boards/facade';import'@univerjs-pro/slides/facade';import'@univerjs/docs/facade';import'@univerjs/sheets/facade';import _0xc64a00 from'@oxc-project/runtime/helpers/decorateParam';import _0x16ecd6 from'@oxc-project/runtime/helpers/decorate';var j=class extends Error{[_0x11d030(0x1e2)];[_0x11d030(0x22b)];constructor(_0x324f77,_0x44e432,_0x45fd03={}){const _0x4f2364=_0x11d030;super(_0x44e432,_0x45fd03),this[_0x4f2364(0x18d)]=_0x4f2364(0x1c3),this['code']=_0x324f77,this[_0x4f2364(0x22b)]=_0x45fd03[_0x4f2364(0x22b)]??!0x1;}},se=class{[_0x11d030(0x2be)];[_0x11d030(0x1a9)];[_0x11d030(0x202)]=[];[_0x11d030(0x15a)]=[];[_0x11d030(0x261)]=0x0;constructor(_0x398099,_0x56ae9e,_0x17f8b3){const _0x42d633=_0x11d030;this[_0x42d633(0x2be)]=_0x398099,this[_0x42d633(0x1a9)]=_0x56ae9e,this[_0x42d633(0x15a)][_0x42d633(0x209)](_0x398099['commandService'][_0x42d633(0x248)]((_0x4c3e3f,_0x2bb91d)=>{this['_captureCommandMutation'](_0x4c3e3f,_0x2bb91d,_0x17f8b3);})),_0x17f8b3===_0x20b30d[_0x42d633(0x2b2)]&&(_0x398099[_0x42d633(0x1c4)]['get'](_0x36e564),this['_subscribeToDocumentState']());}get[_0x11d030(0x19d)](){const _0x43b054=_0x11d030;return this[_0x43b054(0x202)];}[_0x11d030(0x24b)](_0x5ac384){const _0x31a0b3=_0x11d030;return this[_0x31a0b3(0x202)][_0x31a0b3(0x2ac)](_0x5ac384);}[_0x11d030(0x28d)](_0x35624c){const _0x25b085=_0x11d030;this['_pending'][_0x25b085(0x193)](0x0,this[_0x25b085(0x202)][_0x25b085(0x27b)],..._0x35624c);}[_0x11d030(0x2a0)](){const _0x3ed168=_0x11d030;return this[_0x3ed168(0x202)][_0x3ed168(0x193)](0x0);}[_0x11d030(0x244)](_0x533094){const _0x3b90f0=_0x11d030;this['_pending'][_0x3b90f0(0x284)](..._0x533094);}async['suppress'](_0x52a06a){const _0x43aeec=_0x11d030;this[_0x43aeec(0x261)]+=0x1;try{return await _0x52a06a();}finally{--this[_0x43aeec(0x261)];}}[_0x11d030(0x28c)](){const _0x15f0bb=_0x11d030;for(let _0x5a5434 of this[_0x15f0bb(0x15a)][_0x15f0bb(0x193)](0x0))_0x5a5434['dispose']();}[_0x11d030(0x1fe)](_0x1b6371,_0x365b17,_0x3fab5f){const _0x3910e6=_0x11d030;if(this[_0x3910e6(0x261)]>0x0||_0x1b6371[_0x3910e6(0x201)]!==_0x8f800b['MUTATION']||_0x365b17?.['fromCollab']||_0x365b17?.[_0x3910e6(0x26b)]||_0x365b17?.[_0x3910e6(0x1eb)])return;let _0x36128d=_0x1b6371[_0x3910e6(0x1f6)];if(_0x36128d?.['unitId']!==void 0x0&&_0x36128d[_0x3910e6(0x227)]!==this[_0x3910e6(0x1a9)]){if(_0x36128d[_0x3910e6(0x174)]===_0x5e9279['id'])return;throw new j('COLLABORATION_INVALID_INPUT',_0x3910e6(0x1ec)+this['_unitId']+_0x3910e6(0x23d)+_0x1b6371['id']+_0x3910e6(0x1cb)+String(_0x36128d['unitId']));}if(_0x36128d?.[_0x3910e6(0x227)]===void 0x0||_0x3fab5f===_0x20b30d[_0x3910e6(0x2b2)]&&_0x1b6371['id']===_0x2431f0['id'])return;if(_0x1b6371['id']===_0x4e6ffd['id'])throw new j(_0x3910e6(0x216),_0x3910e6(0x275));let _0x1d707b=_0x1b6371,_0x3b96ca=this[_0x3910e6(0x2be)]['compressMutationService'][_0x3910e6(0x1b9)]['getInterceptPoints']()[_0x3910e6(0x25b)],_0x2edc13=(this['_kernel'][_0x3910e6(0x161)][_0x3910e6(0x1b9)][_0x3910e6(0x207)](_0x3b96ca)([_0x1d707b],this[_0x3910e6(0x2be)]['instanceService'])??[_0x1d707b])[0x0];_0x2edc13&&this[_0x3910e6(0x202)][_0x3910e6(0x209)](_0x451c27(_0x2edc13));}[_0x11d030(0x263)](){const _0x55640a=_0x11d030;let _0x469f77=this[_0x55640a(0x2be)][_0x55640a(0x1c4)]['get'](_0x3d47df)[_0x55640a(0x1a8)][_0x55640a(0x155)](_0x3d2b1a=>{const _0x487e2f=_0x55640a;if(this[_0x487e2f(0x261)]>0x0||_0x3d2b1a?.[_0x487e2f(0x227)]!==this[_0x487e2f(0x1a9)])return;let _0x467e0d={'id':_0x3d2b1a[_0x487e2f(0x23e)],'params':{'actions':_0x3d2b1a['redoState'][_0x487e2f(0x208)],'textRanges':null,'unitId':_0x3d2b1a[_0x487e2f(0x227)]},'type':_0x8f800b[_0x487e2f(0x1aa)]};this[_0x487e2f(0x202)][_0x487e2f(0x209)](_0x451c27(_0x467e0d));});this['_disposables'][_0x55640a(0x209)](_0x586343(()=>_0x469f77[_0x55640a(0x184)]()));}},ce=new Set(['formula.mutation.set-trigger-formula-calculation-start',_0x11d030(0x2a9),_0x11d030(0x1ae),_0x11d030(0x20e),_0x11d030(0x1b0),_0x11d030(0x170),_0x11d030(0x220)]),le=new Set([_0x11d030(0x1a7),_0x11d030(0x2b7),_0x11d030(0x2a4),_0x11d030(0x232),_0x11d030(0x236),_0x11d030(0x26a),'disposeUnit']);function ue(_0x185bbb,_0x11902c,_0x8c427f){const _0x1f94cd=_0x11d030;let _0x3e9e3d=_0x306570[_0x1f94cd(0x1f8)](_0x185bbb);return{async 'execute'(_0x545869,_0x4914ff){const _0x204e0e=_0x1f94cd;if(_0x545869['length']>_0x8c427f)throw new j('COLLABORATION_INVALID_INPUT',_0x204e0e(0x183)+_0x8c427f+_0x204e0e(0x2bb));let _0x556ad9=_0x4914ff===_0x204e0e(0x1db)?M(_0x3e9e3d):void 0x0,_0x1fb7f5=de(_0x3e9e3d,_0x11902c);try{return await Function(_0x204e0e(0x1bb),'return\x20(async\x20()\x20=>\x20{\x20'+_0x545869+_0x204e0e(0x1d5))(_0x1fb7f5);}finally{_0x556ad9?.[_0x204e0e(0x28c)]();}}};}function de(_0x23df8a,_0x5ed174){return new Proxy(_0x23df8a,{'get'(_0xf97b9a,_0x4fd001,_0x323b92){const _0x31fdc7=_0x583c;return le['has'](_0x4fd001)?()=>{const _0x11bd01=_0x583c;throw new j(_0x11bd01(0x216),_0x11bd01(0x241)+_0x5ed174+_0x11bd01(0x144)+String(_0x4fd001));}:Reflect[_0x31fdc7(0x165)](_0xf97b9a,_0x4fd001,_0x323b92);}});}function M(_0x34e775){const _0x55db97=_0x11d030;return _0x34e775[_0x55db97(0x297)](_0x34e775[_0x55db97(0x26e)][_0x55db97(0x2b4)],_0x324ea7=>{const _0x2ce62a=_0x55db97;let _0x8c3c29=_0x324ea7;if(N(_0x8c3c29))throw _0x8c3c29[_0x2ce62a(0x292)]=!0x0,new j(_0x2ce62a(0x216),_0x2ce62a(0x185)+_0x8c3c29['id']);});}function N(_0x56d70e){const _0x15ca2e=_0x11d030;return _0x56d70e['type']===_0x8f800b[_0x15ca2e(0x29b)]||_0x56d70e[_0x15ca2e(0x201)]===_0x8f800b[_0x15ca2e(0x1aa)]&&!ce[_0x15ca2e(0x257)](_0x56d70e['id']);}function P(_0x9d139d){const _0x18c0f5=_0x11d030;if(_0x9d139d===void 0x0)return null;if(_0x9d139d===null||typeof _0x9d139d==_0x18c0f5(0x199)||typeof _0x9d139d=='string')return _0x9d139d;if(typeof _0x9d139d==_0x18c0f5(0x14f)){if(Number[_0x18c0f5(0x226)](_0x9d139d))return _0x9d139d;throw I();}if(Array['isArray'](_0x9d139d))return _0x9d139d[_0x18c0f5(0x258)](P);if(F(_0x9d139d))return Object['fromEntries'](Object[_0x18c0f5(0x187)](_0x9d139d)[_0x18c0f5(0x258)](([_0x2b10c1,_0x17240b])=>[_0x2b10c1,P(_0x17240b)]));throw I();}function F(_0x24b3fa){const _0xe44fb6=_0x11d030;if(typeof _0x24b3fa!=_0xe44fb6(0x224)||!_0x24b3fa)return!0x1;let _0x103a50=Object[_0xe44fb6(0x1fc)](_0x24b3fa);return _0x103a50===Object[_0xe44fb6(0x1b8)]||_0x103a50===null;}function I(){const _0x6aba45=_0x11d030;return new j('COLLABORATION_INVALID_INPUT',_0x6aba45(0x1e1));}var L=class{[_0x11d030(0x23b)]=Promise[_0x11d030(0x22c)]();[_0x11d030(0x17c)](_0x1434e7){const _0x16f9ab=_0x11d030;let _0x57b575=this['_tail'][_0x16f9ab(0x198)](_0x1434e7,_0x1434e7);return this[_0x16f9ab(0x23b)]=_0x57b575['then'](()=>void 0x0,()=>void 0x0),_0x57b575;}};function R(_0x26f95b,_0xac565d,_0x22e774,_0x37ee6e){const _0x215f8a=_0x11d030;if(!Array[_0x215f8a(0x135)](_0x26f95b))throw new j(_0x215f8a(0x20c),_0x215f8a(0x278));let _0x5035c0=[..._0x26f95b][_0x215f8a(0x2b8)]((_0x154213,_0x50829f)=>_0x154213[_0x215f8a(0x1b6)]-_0x50829f[_0x215f8a(0x1b6)]),_0x4d5331=_0x37ee6e;for(let _0x275557 of _0x5035c0){if(!_0x275557||typeof _0x275557!=_0x215f8a(0x224)||!Array[_0x215f8a(0x135)](_0x275557[_0x215f8a(0x1bc)])||_0x275557[_0x215f8a(0x1bc)][_0x215f8a(0x1cf)](_0x4d5830=>!_0x4d5830||typeof _0x4d5830!=_0x215f8a(0x224)||!('id'in _0x4d5830)||typeof _0x4d5830['id']!='string'||!(_0x215f8a(0x1a2)in _0x4d5830)||typeof _0x4d5830['data']!=_0x215f8a(0x27f))||!Number['isSafeInteger'](_0x275557[_0x215f8a(0x22d)])||!Number[_0x215f8a(0x140)](_0x275557[_0x215f8a(0x1b6)])||_0x275557[_0x215f8a(0x231)]!==_0xac565d||_0x275557[_0x215f8a(0x201)]!==_0x22e774||_0x275557[_0x215f8a(0x22d)]!==_0x4d5331||_0x275557[_0x215f8a(0x1b6)]!==_0x4d5331+0x1)throw new j('COLLABORATION_PROTOCOL_ERROR',_0x215f8a(0x150));_0x4d5331=_0x275557[_0x215f8a(0x1b6)];}return _0x5035c0;}function z(_0x4f1c73){const _0x59bc0d=_0x11d030;return{'baseRevision':_0x4f1c73[_0x59bc0d(0x22d)],'mutationCount':_0x4f1c73[_0x59bc0d(0x1bc)][_0x59bc0d(0x27b)],'revision':_0x4f1c73[_0x59bc0d(0x1b6)],..._0x4f1c73[_0x59bc0d(0x1fd)]===void 0x0?{}:{'sid':_0x4f1c73['sid']},..._0x4f1c73[_0x59bc0d(0x200)]===void 0x0?{}:{'reqId':_0x4f1c73[_0x59bc0d(0x200)]}};}function B(_0x180a9a,_0x5495b8,_0xa19ac8,_0x158a93,_0x58348b,_0x5abc08=_0x11d030(0x27d)){const _0x1c21b6=_0x11d030;if(_0x58348b[_0x1c21b6(0x1cf)](_0x2f4ab4=>_0x2f4ab4[_0x1c21b6(0x1bc)][_0x1c21b6(0x1cf)](_0x2015e6=>_0x2015e6['id']===_0x4e6ffd['id'])))throw new j(_0x1c21b6(0x20c),_0x1c21b6(0x1e5));let _0x156531=_0x158a93;for(let _0x4bacfe of _0x58348b){let _0x3efcb1=_0x156531+0x1;if(_0x4bacfe[_0x1c21b6(0x231)]!==_0x5495b8||_0x4bacfe['type']!==_0xa19ac8||_0x4bacfe[_0x1c21b6(0x22d)]!==_0x156531||_0x4bacfe[_0x1c21b6(0x1b6)]!==_0x3efcb1)throw new j('COLLABORATION_PROTOCOL_ERROR',_0x1c21b6(0x13b));let _0x2256d6=_0x2b9af6(_0x4bacfe),_0x41a6a5=_0x180a9a[_0x1c21b6(0x161)][_0x1c21b6(0x1b9)][_0x1c21b6(0x24a)]()[_0x1c21b6(0x1ea)],_0x15fa6a=_0x180a9a[_0x1c21b6(0x161)][_0x1c21b6(0x1b9)][_0x1c21b6(0x207)](_0x41a6a5)(_0x2256d6[_0x1c21b6(0x1bc)],null)??_0x2256d6[_0x1c21b6(0x1bc)],_0x4a6ed1=_0xd0978b(_0x15fa6a,_0x180a9a[_0x1c21b6(0x286)],_0x5abc08==='initial'?{'fromChangeset':!0x0}:{'fromCollab':!0x0});if(!_0x4a6ed1[_0x1c21b6(0x240)])throw new j(_0x1c21b6(0x168),_0x1c21b6(0x1ef)+_0x4a6ed1[_0x1c21b6(0x2a6)]+':\x20'+String(_0x4a6ed1[_0x1c21b6(0x218)]));let _0x55ca0d=_0x180a9a[_0x1c21b6(0x23a)][_0x1c21b6(0x1d8)](_0x5495b8);if(_0x55ca0d!==_0x3efcb1)throw new j(_0x1c21b6(0x20c),_0x1c21b6(0x152));_0x156531=_0x55ca0d;}return _0x156531;}function V(_0x1ed3d0,_0xe3fd51,_0x541809){const _0x5ea22f=_0x11d030;let _0x50c236=_0x306570[_0x5ea22f(0x1f8)](_0x1ed3d0);switch(_0x541809){case _0x20b30d['UNIVER_SHEET']:return H(_0x50c236[_0x5ea22f(0x190)](_0xe3fd51)?.[_0x5ea22f(0x246)](),_0xe3fd51);case _0x20b30d[_0x5ea22f(0x2b2)]:return H(_0x50c236['getDocument'](_0xe3fd51)?.['save'](),_0xe3fd51);case _0x20b30d[_0x5ea22f(0x1dc)]:return H(_0x50c236[_0x5ea22f(0x153)](_0xe3fd51)?.['save'](),_0xe3fd51);case _0x20b30d['UNIVER_BASE']:return H(_0x50c236[_0x5ea22f(0x264)](_0xe3fd51)?.[_0x5ea22f(0x246)](),_0xe3fd51);case _0x20b30d[_0x5ea22f(0x29a)]:return H(_0x50c236[_0x5ea22f(0x17f)](_0xe3fd51)?.[_0x5ea22f(0x246)](),_0xe3fd51);default:throw new j(_0x5ea22f(0x216),_0x5ea22f(0x195)+_0x541809);}}function H(_0x2a9e08,_0x5eab3b){const _0xbadb06=_0x11d030;if(_0x2a9e08===void 0x0)throw new j('COLLABORATION_LOAD_FAILED','Unit\x20'+_0x5eab3b+_0xbadb06(0x27a));return structuredClone(_0x2a9e08);}var fe=class{[_0x11d030(0x227)];['unitType'];[_0x11d030(0x273)];[_0x11d030(0x270)];[_0x11d030(0x262)];[_0x11d030(0x2be)];[_0x11d030(0x206)];[_0x11d030(0x254)]=!0x0;[_0x11d030(0x139)]=!0x1;[_0x11d030(0x293)];[_0x11d030(0x21e)];[_0x11d030(0x287)]=new L();[_0x11d030(0x21b)]=[];[_0x11d030(0x1a3)];[_0x11d030(0x210)]=null;['_awaiting']=null;['_sid']=crypto[_0x11d030(0x238)]();[_0x11d030(0x2ae)]=0x1;constructor(_0x427db6,_0x543062,_0x373e60,_0x215380,_0x3e7b22,_0x2b7c52,_0x1a3c0b){const _0x473bbc=_0x11d030;this[_0x473bbc(0x227)]=_0x427db6,this[_0x473bbc(0x296)]=_0x543062,this[_0x473bbc(0x273)]=_0x373e60,this[_0x473bbc(0x270)]=_0x215380,this[_0x473bbc(0x262)]=_0x3e7b22,this[_0x473bbc(0x2be)]=_0x2b7c52,this[_0x473bbc(0x1a3)]=_0x373e60,this[_0x473bbc(0x293)]=new se(_0x2b7c52,_0x427db6,_0x543062),this['_executor']=ue(_0x3e7b22,_0x427db6,_0x1a3c0b);}['getState'](){const _0x4c5c4f=_0x11d030;return{'awaitingChangeset':this[_0x4c5c4f(0x1d9)]===null?null:U(this[_0x4c5c4f(0x1d9)]),'baseRevision':this[_0x4c5c4f(0x273)],'bufferedChangesetCount':this[_0x4c5c4f(0x21b)][_0x4c5c4f(0x27b)],'conflict':this[_0x4c5c4f(0x210)],'connection':this[_0x4c5c4f(0x139)]?'closed':this[_0x4c5c4f(0x270)]['getConnectionState'](),'knownHeadRevision':this[_0x4c5c4f(0x1a3)],'pendingMutationCount':this[_0x4c5c4f(0x293)]['pending'][_0x4c5c4f(0x27b)]};}[_0x11d030(0x22f)](){const _0x3b62c6=_0x11d030;return structuredClone(this[_0x3b62c6(0x293)][_0x3b62c6(0x19d)]);}[_0x11d030(0x247)](){const _0xe6dc5c=_0x11d030;return this[_0xe6dc5c(0x171)]()||this[_0xe6dc5c(0x287)]['run'](async()=>(this[_0xe6dc5c(0x26c)](_0xe6dc5c(0x247)),await this[_0xe6dc5c(0x1d1)]()));}[_0x11d030(0x159)](){const _0x179a6e=_0x11d030;return this[_0x179a6e(0x171)]()||this['_operations'][_0x179a6e(0x17c)](async()=>{const _0x188f72=_0x179a6e;if(this[_0x188f72(0x26c)](_0x188f72(0x159)),await this[_0x188f72(0x1d1)](),this['_bufferedChangesets'][_0x188f72(0x27b)]===0x0)return{'state':this['getState'](),'status':_0x188f72(0x1d4)};let _0x5cd4af=[...this['_bufferedChangesets']];if(_0x5cd4af[_0x188f72(0x1cf)](_0x20f947=>_0x20f947['mutations'][_0x188f72(0x1cf)](_0xa322b9=>_0xa322b9['id']===_0x4e6ffd['id'])))throw new j('COLLABORATION_PROTOCOL_ERROR',_0x188f72(0x19a));let _0x2ea5a2=this[_0x188f72(0x273)],_0x3c5e0d=this[_0x188f72(0x1d9)]?W(this[_0x188f72(0x1d9)][_0x188f72(0x1bc)],this[_0x188f72(0x227)],this[_0x188f72(0x296)],this[_0x188f72(0x273)]):null,_0x583c7c=_0x2b9af6({'baseRev':this[_0x188f72(0x273)],'memberID':'','mutations':[...this[_0x188f72(0x293)]['pending']],'revision':0x0,'type':this[_0x188f72(0x296)],'unitID':this[_0x188f72(0x227)],'userID':''})[_0x188f72(0x1bc)],_0x4d851e=[];for(let _0x229564 of _0x5cd4af){let _0x38f4e3=_0x2b9af6(_0x229564);if(this[_0x188f72(0x1d9)]!==null&&_0x229564[_0x188f72(0x1fd)]===this[_0x188f72(0x1d9)]['sid']&&_0x229564[_0x188f72(0x200)]===this[_0x188f72(0x1d9)][_0x188f72(0x200)]){let _0x162066=(_0x3c5e0d??[])['map'](_0x451c27);G(_0x229564['mutations'],_0x162066)||await this['_closeAfterFatalError'](new j(_0x188f72(0x20c),_0x188f72(0x245))),_0x4d851e[_0x188f72(0x209)]({'changeset':_0x229564,'kind':_0x188f72(0x14b)}),_0x3c5e0d=null;continue;}let _0x331a7b=_0x38f4e3[_0x188f72(0x1bc)];if(_0x3c5e0d!==null){let _0x59b560=this[_0x188f72(0x2be)][_0x188f72(0x147)]['transformMutations'](_0x331a7b,_0x3c5e0d,!0x1);if(!_0x4dd855(_0x59b560))return this[_0x188f72(0x210)]={'message':_0x59b560['error'][_0x188f72(0x1c5)],'operation':'pull','reason':'transform-failed'},{'conflict':this['_conflict'],'state':this[_0x188f72(0x1f7)](),'status':'conflict'};_0x331a7b=_0x59b560[_0x188f72(0x1df)],_0x3c5e0d=_0x59b560[_0x188f72(0x290)];}let _0x223186=this['_kernel']['transformService'][_0x188f72(0x242)](_0x331a7b,_0x583c7c,!0x1);if(!_0x4dd855(_0x223186))return this[_0x188f72(0x210)]={'message':_0x223186[_0x188f72(0x218)][_0x188f72(0x1c5)],'operation':_0x188f72(0x159),'reason':_0x188f72(0x136)},{'conflict':this[_0x188f72(0x210)],'state':this[_0x188f72(0x1f7)](),'status':_0x188f72(0x1ce)};_0x4d851e[_0x188f72(0x209)]({'changeset':_0x437dd3({..._0x38f4e3,'mutations':_0x223186[_0x188f72(0x1df)]}),'kind':'remote'}),_0x583c7c=_0x223186[_0x188f72(0x290)];}let _0x1aecfa=_0x2ea5a2;for(let _0x567921 of _0x4d851e){if(_0x567921[_0x188f72(0x196)]==='awaiting-ack'){let _0x524fb1=this[_0x188f72(0x2be)]['revisionService'][_0x188f72(0x1d8)](this[_0x188f72(0x227)]);_0x524fb1!==_0x567921[_0x188f72(0x219)][_0x188f72(0x1b6)]&&await this[_0x188f72(0x1da)](new j(_0x188f72(0x20c),_0x188f72(0x1e8))),_0x1aecfa=_0x524fb1;continue;}_0x1aecfa=await this[_0x188f72(0x19b)](_0x1aecfa,[_0x567921[_0x188f72(0x219)]]);}return this['_capture'][_0x188f72(0x28d)](_0x583c7c[_0x188f72(0x258)](_0x451c27)),this[_0x188f72(0x1d9)]!==null&&(this[_0x188f72(0x1d9)]=_0x3c5e0d===null?null:{...this[_0x188f72(0x1d9)],'baseRev':_0x1aecfa,'mutations':_0x3c5e0d['map'](_0x451c27)}),this[_0x188f72(0x273)]=_0x1aecfa,this['_bufferedChangesets'][_0x188f72(0x193)](0x0),{'appliedChangesets':_0x5cd4af[_0x188f72(0x258)](z),'fromRevision':_0x2ea5a2,'state':this[_0x188f72(0x1f7)](),'status':_0x188f72(0x164),'toRevision':_0x1aecfa,'transformedPendingMutationCount':_0x583c7c['length']};});}[_0x11d030(0x1e3)](){const _0x3413d8=_0x11d030;return this[_0x3413d8(0x171)]()||this[_0x3413d8(0x287)]['run'](async()=>{const _0x10f789=_0x3413d8;this[_0x10f789(0x26c)](_0x10f789(0x1e3));let _0x40e103=[],_0x1ba918=[];if(this[_0x10f789(0x1d9)]===null){if(this[_0x10f789(0x293)][_0x10f789(0x19d)]['length']===0x0)return{'state':this[_0x10f789(0x1f7)](),'status':'nothing-to-commit'};if(await this['_fetchChangesets'](),this[_0x10f789(0x21b)][_0x10f789(0x27b)]>0x0)return{'baseRevision':this['_baseRevision'],'confirmedChangesets':_0x40e103,'knownHeadRevision':this[_0x10f789(0x1a3)],'state':this[_0x10f789(0x1f7)](),'status':_0x10f789(0x1c8)};this[_0x10f789(0x137)]();}for(;this[_0x10f789(0x1d9)]!==null;){let _0x56929e=this[_0x10f789(0x1d9)],_0x500b04;try{_0x500b04=await this['_handle'][_0x10f789(0x2aa)](_0x56929e);}catch{return{'changeset':U(_0x56929e),'confirmedChangesets':_0x40e103,'state':this[_0x10f789(0x1f7)](),'status':_0x10f789(0x1a6)};}if(_0x500b04['status']===_0x10f789(0x276)||_0x500b04[_0x10f789(0x13a)]===_0x10f789(0x1a6))return{'changeset':U(_0x56929e),'confirmedChangesets':_0x40e103,'state':this['getState'](),'status':_0x500b04['status']};if(_0x500b04[_0x10f789(0x13a)]===_0x10f789(0x2a1))return _0x500b04[_0x10f789(0x265)]===_0x10f789(0x154)?(this[_0x10f789(0x293)]['prependPending'](_0x56929e[_0x10f789(0x1bc)]),this['_awaiting']=null,await this[_0x10f789(0x1d1)](),{'baseRevision':this['_baseRevision'],'confirmedChangesets':_0x40e103,'knownHeadRevision':this[_0x10f789(0x1a3)],'state':this[_0x10f789(0x1f7)](),'status':_0x10f789(0x1c8)}):(this[_0x10f789(0x210)]={'message':_0x500b04[_0x10f789(0x1c5)],'operation':_0x10f789(0x1e3),'reason':_0x500b04[_0x10f789(0x265)]===_0x10f789(0x23f)?_0x10f789(0x18a):'changeset-rejected'},{'conflict':this[_0x10f789(0x210)],'confirmedChangesets':_0x40e103,'state':this['getState'](),'status':'conflict'});let _0x448a28=_0x500b04[_0x10f789(0x2ab)];try{this[_0x10f789(0x212)](_0x56929e,_0x500b04[_0x10f789(0x1e4)],_0x448a28);}catch(_0x52f375){await this['_closeAfterFatalError'](_0x52f375);}let _0x5ed26a=_0x56929e[_0x10f789(0x1bc)];if(_0x500b04[_0x10f789(0x1e4)][_0x10f789(0x27b)]>0x0){let _0x239f6e=await this[_0x10f789(0x13f)](_0x56929e,_0x500b04[_0x10f789(0x1e4)]);if(_0x239f6e===null)return{'conflict':this[_0x10f789(0x210)],'confirmedChangesets':_0x40e103,'state':this[_0x10f789(0x1f7)](),'status':_0x10f789(0x1ce)};_0x5ed26a=_0x239f6e[_0x10f789(0x181)];try{this[_0x10f789(0x2a3)](_0x500b04[_0x10f789(0x1e4)]);}catch(_0x54bb19){await this[_0x10f789(0x1da)](_0x54bb19);}_0x1ba918[_0x10f789(0x209)](..._0x500b04[_0x10f789(0x1e4)][_0x10f789(0x258)](z));}G(_0x448a28[_0x10f789(0x1bc)],_0x5ed26a)||await this[_0x10f789(0x1da)](new j(_0x10f789(0x20c),'Backend\x20returned\x20an\x20ACK\x20whose\x20mutations\x20do\x20not\x20match\x20the\x20submitted\x20changeset'));let _0x445ae6=this[_0x10f789(0x2be)]['revisionService'][_0x10f789(0x1d8)](this[_0x10f789(0x227)]);if(_0x445ae6!==_0x448a28[_0x10f789(0x1b6)]&&await this[_0x10f789(0x1da)](new j('COLLABORATION_PROTOCOL_ERROR','ACK\x20revision\x20does\x20not\x20follow\x20the\x20applied\x20confirmed\x20revision')),this[_0x10f789(0x273)]=_0x445ae6,this['_knownHeadRevision']=Math[_0x10f789(0x21a)](this['_knownHeadRevision'],_0x445ae6),this[_0x10f789(0x1d9)]=null,_0x40e103[_0x10f789(0x209)](z(_0x448a28)),this[_0x10f789(0x293)][_0x10f789(0x19d)][_0x10f789(0x27b)]===0x0)break;this[_0x10f789(0x137)]();}return{'confirmedChangesets':_0x40e103,'reconciledChangesets':_0x1ba918,'state':this[_0x10f789(0x1f7)](),'status':_0x10f789(0x1ff)};});}async[_0x11d030(0x1d1)](){const _0x2d7f64=_0x11d030;let _0x51e540=this[_0x2d7f64(0x1a3)],_0x56975e=await this[_0x2d7f64(0x270)][_0x2d7f64(0x1e9)](_0x51e540,void 0x0);if(_0x400ff3(_0x56975e['error'])){let _0x46f56c=_0x56975e[_0x2d7f64(0x218)];throw new j(_0x2d7f64(0x2b1),_0x46f56c?.[_0x2d7f64(0x1c5)]||_0x2d7f64(0x22e),{'retryable':!0x0});}let _0x51e34a=R(_0x56975e[_0x2d7f64(0x157)],this[_0x2d7f64(0x227)],this[_0x2d7f64(0x296)],_0x51e540),_0x5cd392=_0x51e34a['at'](-0x1)?.[_0x2d7f64(0x1b6)]??_0x51e540;if(_0x56975e[_0x2d7f64(0x21f)]!==void 0x0&&_0x56975e[_0x2d7f64(0x21f)]!==_0x5cd392)throw new j(_0x2d7f64(0x20c),'Backend\x20latest\x20revision\x20does\x20not\x20match\x20its\x20continuous\x20changeset\x20range');return _0x51e34a[_0x2d7f64(0x27b)]===0x0?{'knownHeadRevision':this[_0x2d7f64(0x1a3)],'state':this[_0x2d7f64(0x1f7)](),'status':'unchanged'}:(this[_0x2d7f64(0x21b)][_0x2d7f64(0x209)](..._0x51e34a),this[_0x2d7f64(0x1a3)]=_0x5cd392,{'changesets':_0x51e34a['map'](z),'fromRevision':_0x51e540,'state':this['getState'](),'status':_0x2d7f64(0x259),'toRevision':_0x5cd392});}['_createAwaitingFromPending'](){const _0x366f13=_0x11d030;let _0x5ce555=this[_0x366f13(0x293)][_0x366f13(0x2a0)]();this['_awaiting']={'baseRev':this['_baseRevision'],'mutations':_0x5ce555,'reqId':this[_0x366f13(0x2ae)],'sid':this[_0x366f13(0x285)]},this[_0x366f13(0x2ae)]+=0x1;}[_0x11d030(0x212)](_0x1673e0,_0x3cafb6,_0x7e21b2){const _0xc0ba80=_0x11d030;let _0x591efc=R(_0x3cafb6,this[_0xc0ba80(0x227)],this[_0xc0ba80(0x296)],this[_0xc0ba80(0x273)])['at'](-0x1)?.[_0xc0ba80(0x1b6)]??this[_0xc0ba80(0x273)];if(_0x7e21b2[_0xc0ba80(0x231)]!==this[_0xc0ba80(0x227)]||_0x7e21b2[_0xc0ba80(0x201)]!==this[_0xc0ba80(0x296)]||_0x7e21b2[_0xc0ba80(0x1fd)]!==_0x1673e0[_0xc0ba80(0x1fd)]||_0x7e21b2[_0xc0ba80(0x200)]!==_0x1673e0['reqId']||_0x7e21b2[_0xc0ba80(0x22d)]!==_0x591efc||_0x7e21b2[_0xc0ba80(0x1b6)]!==_0x591efc+0x1)throw new j('COLLABORATION_PROTOCOL_ERROR',_0xc0ba80(0x251));}async[_0x11d030(0x13f)](_0xce8cf1,_0xbcb0e8){const _0x129b34=_0x11d030;let _0x3b3948=W(_0xce8cf1[_0x129b34(0x1bc)],this[_0x129b34(0x227)],this[_0x129b34(0x296)],this['_baseRevision']),_0x8aebaf=W(this[_0x129b34(0x293)][_0x129b34(0x19d)],this[_0x129b34(0x227)],this[_0x129b34(0x296)],this[_0x129b34(0x273)]),_0x6c6396=[];for(let _0x261f9b of _0xbcb0e8){let _0x59ea19=_0x2b9af6(_0x261f9b),_0x189a1f=this[_0x129b34(0x2be)]['transformService'][_0x129b34(0x242)](_0x59ea19[_0x129b34(0x1bc)],_0x3b3948,!0x1);if(!_0x4dd855(_0x189a1f))return this[_0x129b34(0x237)](_0x129b34(0x1e3),_0x189a1f[_0x129b34(0x218)]),null;_0x3b3948=_0x189a1f['m2Prime'];let _0x37eada=this[_0x129b34(0x2be)]['transformService']['transformMutations'](_0x189a1f['m1Prime'],_0x8aebaf,!0x1);if(!_0x4dd855(_0x37eada))return this['_setTransformConflict']('commit',_0x37eada[_0x129b34(0x218)]),null;_0x8aebaf=_0x37eada[_0x129b34(0x290)],_0x6c6396['push'](_0x437dd3({..._0x59ea19,'mutations':_0x37eada['m1Prime']}));}let _0x29c867=await this[_0x129b34(0x19b)](this[_0x129b34(0x273)],_0x6c6396);return this[_0x129b34(0x293)][_0x129b34(0x28d)](_0x8aebaf[_0x129b34(0x258)](_0x451c27)),this[_0x129b34(0x273)]=_0x29c867,{'awaitingMutations':_0x3b3948['map'](_0x451c27),'revision':_0x29c867};}[_0x11d030(0x237)](_0x4b3157,_0x12645e){const _0x1c40fe=_0x11d030;this[_0x1c40fe(0x210)]={'message':_0x12645e[_0x1c40fe(0x1c5)],'operation':_0x4b3157,'reason':'transform-failed'};}async[_0x11d030(0x19b)](_0x3ebe1f,_0x31c5af){const _0x28c22a=_0x11d030;try{return await this['_capture'][_0x28c22a(0x1de)](async()=>B(this[_0x28c22a(0x2be)],this[_0x28c22a(0x227)],this[_0x28c22a(0x296)],_0x3ebe1f,_0x31c5af,_0x28c22a(0x27c)));}catch(_0x3f2b80){return await this[_0x28c22a(0x1da)](_0x3f2b80);}}async[_0x11d030(0x1da)](_0x37d1c4){const _0x4afbe0=_0x11d030;this[_0x4afbe0(0x254)]=!0x1,this['_closePromise']??=this[_0x4afbe0(0x233)]();try{await this[_0x4afbe0(0x206)];}catch{}throw _0x37d1c4;}[_0x11d030(0x2a3)](_0xff8c3b){const _0x1dc56c=_0x11d030;let _0x1cd581=_0xff8c3b['at'](-0x1)?.['revision'];if(_0x1cd581===void 0x0||this[_0x1dc56c(0x21b)][_0x1dc56c(0x27b)]===0x0)return;let _0xc620e9=this[_0x1dc56c(0x21b)]['findIndex'](({revision:_0x449c7c})=>_0x449c7c>_0x1cd581),_0x177470=this[_0x1dc56c(0x21b)][_0x1dc56c(0x2ac)](0x0,_0xc620e9===-0x1?this['_bufferedChangesets'][_0x1dc56c(0x27b)]:_0xc620e9);for(let _0xc13910 of _0x177470){let _0x3bfaa1=_0xff8c3b[_0x1dc56c(0x20f)](({revision:_0x432f31})=>_0x432f31===_0xc13910[_0x1dc56c(0x1b6)]);if(!_0x3bfaa1||!pe(_0xc13910,_0x3bfaa1))throw new j(_0x1dc56c(0x20c),_0x1dc56c(0x13e));}this['_bufferedChangesets']['splice'](0x0,_0x177470['length']);}['execute'](_0xfa09a9){const _0x2d6274=_0x11d030;return this[_0x2d6274(0x171)]()||this['_operations'][_0x2d6274(0x17c)](async()=>{const _0x4b6678=_0x2d6274;_0xfa09a9[_0x4b6678(0x253)]===_0x4b6678(0x16d)&&this[_0x4b6678(0x26c)](_0x4b6678(0x16d));let _0x465def=this[_0x4b6678(0x293)]['pending'][_0x4b6678(0x27b)],_0x4e8ec7=P(await this[_0x4b6678(0x21e)][_0x4b6678(0x162)](_0xfa09a9[_0x4b6678(0x1e2)],_0xfa09a9[_0x4b6678(0x253)]));return _0xfa09a9['mode']===_0x4b6678(0x1db)?{'state':this[_0x4b6678(0x1f7)](),'value':_0x4e8ec7}:{'mutations':this['_capture']['snapshotFrom'](_0x465def),'state':this[_0x4b6678(0x1f7)](),'value':_0x4e8ec7};});}[_0x11d030(0x2a2)](_0x187042){const _0x37eb1b=_0x11d030;return this[_0x37eb1b(0x171)]()||this[_0x37eb1b(0x287)][_0x37eb1b(0x17c)](async()=>{const _0x5602fc=_0x37eb1b;if(this['_assertMutableState'](_0x5602fc(0x2b0)),this[_0x5602fc(0x1d9)]!==null)throw new j(_0x5602fc(0x216),_0x5602fc(0x2af));let _0x1af2b8=me(_0x187042),_0x113202=[...this[_0x5602fc(0x293)]['pending']];this[_0x5602fc(0x293)][_0x5602fc(0x28d)](_0x1af2b8);let _0x33d270=this[_0x5602fc(0x1f7)]();return{'pendingMutationCount':_0x1af2b8['length'],'previousMutationCount':_0x113202[_0x5602fc(0x27b)],'state':_0x33d270};});}[_0x11d030(0x186)](){const _0xafe301=_0x11d030;return this['_rejectIfNotAccepting']()||this[_0xafe301(0x287)]['run'](async()=>V(this[_0xafe301(0x262)],this[_0xafe301(0x227)],this[_0xafe301(0x296)]));}[_0x11d030(0x192)](){const _0x220f84=_0x11d030;return this[_0x220f84(0x206)]?this[_0x220f84(0x206)]:(this['_acceptingOperations']=!0x1,this[_0x220f84(0x206)]=this[_0x220f84(0x287)][_0x220f84(0x17c)](async()=>await this['_closeOwnedResources']()),this['_closePromise']);}async[_0x11d030(0x233)](){const _0x2d4b4f=_0x11d030;try{this[_0x2d4b4f(0x293)][_0x2d4b4f(0x28c)](),await this[_0x2d4b4f(0x270)][_0x2d4b4f(0x192)]();}finally{try{this['_univer'][_0x2d4b4f(0x28c)]();}finally{this[_0x2d4b4f(0x139)]=!0x0;}}}['_rejectIfNotAccepting'](){const _0x4936b5=_0x11d030;return this[_0x4936b5(0x254)]?null:Promise[_0x4936b5(0x18c)](new j(_0x4936b5(0x1bd),_0x4936b5(0x14d)));}[_0x11d030(0x26c)](_0x451ac8){const _0x559fda=_0x11d030;if(this[_0x559fda(0x210)]!==null)throw new j(_0x559fda(0x216),_0x559fda(0x1f9)+_0x451ac8+_0x559fda(0x1d0));}};function U(_0x432e77){const _0xd44b17=_0x11d030;return{'baseRevision':_0x432e77[_0xd44b17(0x22d)],'mutationCount':_0x432e77[_0xd44b17(0x1bc)][_0xd44b17(0x27b)],'reqId':_0x432e77[_0xd44b17(0x200)],'revision':0x0,'sid':_0x432e77[_0xd44b17(0x1fd)]};}function W(_0x443f84,_0x2d33e3,_0x1e89ec,_0x3f9226){return _0x2b9af6({'baseRev':_0x3f9226,'memberID':'','mutations':[..._0x443f84],'revision':0x0,'type':_0x1e89ec,'unitID':_0x2d33e3,'userID':''})['mutations'];}function pe(_0x7bce1c,_0x13283f){const _0x29a6d5=_0x11d030;return _0x7bce1c[_0x29a6d5(0x231)]===_0x13283f[_0x29a6d5(0x231)]&&_0x7bce1c[_0x29a6d5(0x201)]===_0x13283f[_0x29a6d5(0x201)]&&_0x7bce1c['baseRev']===_0x13283f[_0x29a6d5(0x22d)]&&_0x7bce1c[_0x29a6d5(0x1b6)]===_0x13283f[_0x29a6d5(0x1b6)]&&_0x7bce1c['sid']===_0x13283f['sid']&&_0x7bce1c[_0x29a6d5(0x200)]===_0x13283f[_0x29a6d5(0x200)]&&JSON[_0x29a6d5(0x1be)](_0x7bce1c[_0x29a6d5(0x1bc)])===JSON[_0x29a6d5(0x1be)](_0x13283f[_0x29a6d5(0x1bc)]);}function G(_0x4d8982,_0x48da8e){const _0x3fb73d=_0x11d030;return _0x4d8982[_0x3fb73d(0x27b)]===_0x48da8e[_0x3fb73d(0x27b)]&&_0x4d8982[_0x3fb73d(0x295)]((_0x49d243,_0x1f99f8)=>_0x49d243['id']===_0x48da8e[_0x1f99f8]?.['id']&&_0x49d243[_0x3fb73d(0x1a2)]===_0x48da8e[_0x1f99f8]?.[_0x3fb73d(0x1a2)]);}function me(_0x31dffd){const _0xc48f20=_0x11d030;if(!Array['isArray'](_0x31dffd))throw new j(_0xc48f20(0x216),_0xc48f20(0x28f));return _0x31dffd[_0xc48f20(0x258)](_0x49ff93=>{const _0x2bc2cc=_0xc48f20;if(!_0x49ff93||typeof _0x49ff93!='object'||typeof _0x49ff93['id']!=_0x2bc2cc(0x27f)||_0x49ff93['id'][_0x2bc2cc(0x27b)]===0x0||typeof _0x49ff93[_0x2bc2cc(0x1a2)]!=_0x2bc2cc(0x27f))throw new j(_0x2bc2cc(0x216),'Replacement\x20mutations\x20must\x20contain\x20non-empty\x20id\x20and\x20string\x20data\x20fields');return{'data':_0x49ff93[_0x2bc2cc(0x1a2)],'id':_0x49ff93['id']};});}var K=class extends _0xfef6ce{[_0x11d030(0x15d)];[_0x11d030(0x1d3)];static [_0x11d030(0x277)]=_0x11d030(0x29c);constructor(_0x1bf960,_0x12fdec){const _0x2315df=_0x11d030;super(),this[_0x2315df(0x15d)]=_0x1bf960,this[_0x2315df(0x1d3)]=_0x12fdec;}[_0x11d030(0x249)](){const _0x37fd23=_0x11d030;this[_0x37fd23(0x15d)][_0x37fd23(0x282)]!==void 0x0&&_0x56afce(this['_injector'],[[_0x4dc918,{'useValue':this[_0x37fd23(0x15d)][_0x37fd23(0x282)]}]]),this[_0x37fd23(0x15d)][_0x37fd23(0x249)]({'commandService':this[_0x37fd23(0x1d3)][_0x37fd23(0x165)](_0x16b588),'compressMutationService':this[_0x37fd23(0x1d3)][_0x37fd23(0x165)](_0x79e251),'instanceService':this[_0x37fd23(0x1d3)][_0x37fd23(0x165)](_0x5896bb),'injector':this[_0x37fd23(0x1d3)],'revisionService':this[_0x37fd23(0x1d3)][_0x37fd23(0x165)](_0x3614fb),'transformService':this[_0x37fd23(0x1d3)][_0x37fd23(0x165)](_0x4fd054)});}};K=_0x16ecd6([_0x402b0b(_0x382b63),_0xc64a00(0x1,_0x2dcc67(_0x3a4ce6))],K);function he(_0x3567a7,_0x350d86){const _0x237efe=_0x11d030;let _0x1a04c1;if(_0x3567a7[_0x237efe(0x156)](K,{'onStarting'(_0x20ce2b){_0x1a04c1=_0x20ce2b;},..._0x350d86===void 0x0?{}:{'snapshotServerService':_0x350d86}}),!_0x1a04c1)throw Error(_0x237efe(0x221));return _0x1a04c1;}async function ge(_0x1cfd73,_0x19ec96,_0x658b69){const _0x251d20=_0x11d030;let _0x1c7a93=await _0x1cfd73['getUnitOnRev'](0x0);if(_0x400ff3(_0x1c7a93[_0x251d20(0x218)])){let _0x238bc8=_0x1c7a93[_0x251d20(0x218)];throw new j(_0x251d20(0x168),_0x238bc8?.[_0x251d20(0x1c5)]||_0x251d20(0x18f));}let _0x40e200=_0x1c7a93[_0x251d20(0x225)];if(!_0x40e200)throw new j('COLLABORATION_LOAD_FAILED',_0x251d20(0x1b1));_e(_0x40e200,_0x19ec96,_0x658b69);try{switch(_0x658b69){case _0x20b30d[_0x251d20(0x272)]:return{'changesets':_0x1c7a93[_0x251d20(0x157)],'unitData':await _0x3c8e29(_0x40e200,await q(_0x1cfd73,_0x40e200)),'unitType':_0x658b69};case _0x20b30d[_0x251d20(0x2b2)]:return{'changesets':_0x1c7a93[_0x251d20(0x157)],'unitData':_0x9a37bd(_0x40e200),'unitType':_0x658b69};case _0x20b30d[_0x251d20(0x1dc)]:return{'changesets':_0x1c7a93[_0x251d20(0x157)],'unitData':_0x3b04ef(_0x40e200),'unitType':_0x658b69};case _0x20b30d[_0x251d20(0x15e)]:return{'changesets':_0x1c7a93[_0x251d20(0x157)],'unitData':await _0xf344e5(_0x40e200,await q(_0x1cfd73,_0x40e200)),'unitType':_0x658b69};case _0x20b30d['UNIVER_BOARD']:return{'changesets':_0x1c7a93['changesets'],'unitData':_0x48a275(_0x40e200),'unitType':_0x658b69};default:throw new j(_0x251d20(0x216),_0x251d20(0x195)+_0x658b69);}}catch(_0x176f43){throw _0x176f43 instanceof j?_0x176f43:new j(_0x251d20(0x168),'Failed\x20to\x20transform\x20the\x20Unit\x20snapshot',{'cause':_0x176f43});}}function _0x5cc0(){const _0xedb916=['getSheetBlock','_memberId','_lease','3PDkQxt','revision','includes','prototype','interceptor','readyState','univerAPI','mutations','COLLABORATION_CLOSED','stringify','changeset_ack','board','Collaboration\x20WebSocket\x20closed\x20before\x20opening','set','CollaborationRuntimeError','injector','message','commitTimeoutMs\x20must\x20be\x20a\x20positive\x20safe\x20integer','leases','pull-required','_join','online','\x20for\x20Unit\x20','send','ack','conflict','some','\x20after\x20the\x20collaboration\x20runtime\x20entered\x20conflict','_fetchChangesets','createUniver','_injector','up-to-date','\x20})();','Snapshot\x20revision\x20must\x20be\x20a\x20positive\x20safe\x20integer','collabWebSocketUrl','incrementRevOfUnit','_awaiting','_closeAfterFatalError','read','UNIVER_SLIDE','promise','suppress','m1Prime','Invalid\x20JSON\x20response','Collaboration\x20runtime\x20result\x20must\x20be\x20JSON-compatible','code','commit','precedingChangesets','Historical\x20restore\x20requires\x20reloading\x20the\x20Unit\x20and\x20cannot\x20be\x20replayed\x20in\x20place','accepted','_target','Awaiting\x20changeset\x20echo\x20does\x20not\x20follow\x20the\x20current\x20revision','fetchChangesets','COMPRESS_MUTATION_APPLY','onlyLocal','Runtime\x20for\x20','open','cmd','Confirmed\x20mutation\x20replay\x20failed\x20at\x20index\x20','Session\x20ticket\x20response\x20is\x20missing\x20a\x20ticket','Snapshot\x20contains\x20duplicate\x20block\x20ids','_connectPromise','backend','getUnitData','_handleMessage','params','getState','newAPI','Cannot\x20','originalMeta','format','getPrototypeOf','sid','_captureCommandMutation','confirmed','reqId','type','_pending','base64','unit','6HuLmkO','_closePromise','fetchThroughInterceptors','actions','push','Checkpoint\x20revision\x20must\x20be\x20a\x20positive\x20safe\x20integer','_release','COLLABORATION_PROTOCOL_ERROR','permission','formula.mutation.set-calculation-result','find','_conflict','_socket','_validateAcceptedChangeset','Timed\x20out\x20waiting\x20for\x20Collaboration\x20command\x20','Collaboration\x20HTTP\x20response\x20is\x20not\x20valid\x20JSON','reconnecting','COLLABORATION_INVALID_INPUT','block','error','changeset','max','_bufferedChangesets','8472821BjsHcO','closed','_executor','latestRevision','sheet.mutation.send-init-pivot-text-local','Manual\x20collaboration\x20plugin\x20did\x20not\x20reach\x20the\x20Starting\x20lifecycle','memberID','_connection','object','snapshot','isFinite','unitId','_reconnectAttempts','new_changes','9770gjkKRR','retryable','resolve','baseRev','Backend\x20failed\x20to\x20fetch\x20changesets','getPendingMutations','httpRequest','unitID','createDocument','_closeOwnedResources','HEARTBEAT','csShouldRetryEvent','createPresentation','_setTransformConflict','randomUUID','Timed\x20out\x20establishing\x20Collaboration\x20WebSocket','revisionService','_tail','12244672MFpGnn','\x20cannot\x20capture\x20mutation\x20','commandId','permission-denied','result','Single-Unit\x20runtime\x20for\x20','transformMutations','timeout','prependPending','Awaiting\x20changeset\x20echo\x20does\x20not\x20match\x20the\x20transformed\x20local\x20mutations','save','fetch','onMutationExecutedForCollab','onStarting','getInterceptPoints','snapshotFrom','Failed\x20to\x20rejoin\x20Unit\x20room','snapshotServerUrl','add','fetchmissing','timer','Backend\x20returned\x20an\x20ACK\x20that\x20does\x20not\x20match\x20the\x20submitted\x20changeset','csAckEvent','mode','_acceptingOperations','Initial\x20Unit\x20JOIN\x20failed','maxCodeLength\x20must\x20be\x20a\x20positive\x20safe\x20integer','has','map','fetched','collabSubmitChangesetUrl','COMPRESS_MUTATION_SEND','Failed\x20to\x20send\x20Collaboration\x20WebSocket\x20command','delete','Failed\x20to\x20open\x20the\x20collaboration\x20backend','pathname','infoRsp','_suppressionDepth','_univer','_subscribeToDocumentState','getBase','reason','unitId\x20must\x20not\x20be\x20empty','searchParams','replace','_handleCollaborationEvent','createUniverSheet','fromChangeset','_assertMutableState','takeInboundChangesets','Event','size','_handle','Failed\x20to\x20fetch\x20preceding\x20changesets','UNIVER_SHEET','_baseRevision','permissionRejEvent','Historical\x20restore\x20requires\x20reloading\x20the\x20Unit\x20and\x20is\x20not\x20supported\x20by\x20this\x20runtime','retry','pluginName','Backend\x20changesets\x20must\x20be\x20an\x20array','json','\x20is\x20unavailable','length','remote','initial','invalid','string','\x20returned\x20a\x20different\x20block\x20identity','new_changesets','snapshotServerService','Collaboration\x20WebSocket\x20is\x20not\x20online','unshift','_sid','commandService','_operations','Connection\x20timed\x20out','Failed\x20to\x20create\x20the\x20collaboration\x20runtime','_joined','_submissionWaiters','dispose','replacePending','clear','Replacement\x20mutations\x20must\x20be\x20an\x20array','m2Prime','memberId','cancel','_capture','permission_rej','every','unitType','addEvent','getUnitOnRev','Backend\x20failed\x20to\x20close\x20the\x20initial\x20revision\x20gap','UNIVER_BOARD','COMMAND','UNIVER_CLI_SDK_MANUAL_COLLABORATION_PLUGIN','collaMsg','The\x20same\x20Unit\x20id\x20cannot\x20be\x20joined\x20with\x20two\x20Unit\x20types','Collaboration\x20HELLO\x20response\x20is\x20invalid','takePending','rejected','replacePendingMutations','_consumeBufferedPrecedingChangesets','createWorkbook','sheets','index','GET','44184flBWQd','formula.mutation.set-trigger-formula-calculation-stop','submitChangeset','acceptedChangeset','slice','_heartbeat','_nextReqId','Cannot\x20replace\x20mutations\x20after\x20a\x20changeset\x20is\x20awaiting\x20confirmation','replace\x20mutations','COLLABORATION_UNAVAILABLE','UNIVER_DOC','workbook','BeforeCommandExecute','changeset_rej','22GpKmaY','createBoard','sort','_commandWaiters','No\x20active\x20Unit\x20leases','\x20character\x20limit','OPEN','acquire','_kernel','isArray','transform-failed','_createAwaitingFromPending','ws:','_closed','status','Confirmed\x20changeset\x20history\x20is\x20not\x20contiguous','LEAVE','_startHeartbeat','Buffered\x20changeset\x20does\x20not\x20match\x20the\x20canonical\x20preceding\x20changeset','_reconcilePrecedingChangesets','isSafeInteger','commitTimeoutMs','changeset-rejected','removeEventListener','\x20cannot\x20call\x20','2931498nEgNhE','invalid-changeset','transformService','_waitForSubmission','http:','waitForSubmission','awaiting-ack','_inbound','Collaboration\x20runtime\x20is\x20closing\x20or\x20closed','protocol','number','Backend\x20returned\x20a\x20non-contiguous\x20changeset\x20range','wsSessionTicketUrl','Univer\x20revision\x20did\x20not\x20advance\x20to\x20the\x20confirmed\x20changeset\x20revision','getPresentation','invalid-revision','subscribe','registerPlugin','changesets','Snapshot\x20Unit\x20identity\x20does\x20not\x20match\x20the\x20requested\x20Unit','pull','_disposables','routeKey','https:','_config','UNIVER_BASE','6504196rRFVym','Changeset\x20submission\x20was\x20rejected','compressMutationService','execute','Backend\x20latest\x20revision\x20does\x20not\x20match\x20the\x20initial\x20continuous\x20changeset\x20range','pulled','get','min','2844150fKbbFC','COLLABORATION_LOAD_FAILED','_requestCommand','_ensureConnected','values','catch','write','eventID','Failed\x20to\x20establish\x20Collaboration\x20WebSocket','formula.mutation.set-formula-data','_rejectIfNotAccepting','The\x20same\x20changeset\x20submission\x20is\x20already\x20in\x20flight','SnapshotService\x20is\x20not\x20ready\x20until\x20the\x20Univer\x20factory\x20has\x20returned','trigger','Session\x20ticket\x20request\x20failed\x20with\x20HTTP\x20','wss:','waitForLatestApplied','ticket','application/json','JOIN','sessionTicket','run','RECV','getConnectionState','getBoard','addEventListener','awaitingMutations','44143oaHfxv','Code\x20is\x20longer\x20than\x20the\x20','unsubscribe','Read\x20execution\x20cannot\x20run\x20persistable\x20action\x20','exportUnitData','entries','_reconnectTimer','_failCommandWaiters','permission-rejected','_state','reject','name','createUnit','Backend\x20failed\x20to\x20load\x20the\x20Unit\x20snapshot','getWorkbook','target','close','splice','parse','Unsupported\x20collaboration\x20Unit\x20type:\x20','kind','_stopHeartbeat','then','boolean','Historical\x20restore\x20requires\x20reloading\x20the\x20Unit\x20and\x20cannot\x20be\x20pulled\x20in\x20place','_replayRemoteChangesets','Checkpoint\x20Unit\x20id\x20does\x20not\x20match\x20the\x20requested\x20Unit\x20id','pending','Snapshot\x20block\x20','changeset_should_retry','_scheduleReconnect','from','data','_knownHeadRevision','unitData','_connect','unknown','createBase','docStateChange$','_unitId','MUTATION','ensureOnline','offline','finally','formula.mutation.set-trigger-formula-calculation','rev','formula.mutation.set-array-formula-data','Backend\x20returned\x20no\x20Unit\x20snapshot'];_0x5cc0=function(){return _0xedb916;};return _0x5cc0();}function _e(_0x1ad606,_0x38c341,_0x5ca2a0){const _0x2937c4=_0x11d030;if(_0x1ad606[_0x2937c4(0x231)]!==_0x38c341||_0x1ad606['type']!==_0x5ca2a0)throw new j(_0x2937c4(0x168),_0x2937c4(0x158));if(!Number['isSafeInteger'](_0x1ad606['rev'])||_0x1ad606[_0x2937c4(0x1af)]<0x1)throw new j(_0x2937c4(0x168),_0x2937c4(0x1d6));}async function q(_0x2d10f5,_0x53b680){const _0x28ea5e=_0x11d030;let _0x465feb=_0x53b680[_0x28ea5e(0x2b3)];if(!_0x465feb)throw new j(_0x28ea5e(0x168),'Sheet-shaped\x20snapshot\x20is\x20missing\x20workbook\x20metadata');let _0x4d1a28=Object['values'](_0x465feb['blockMeta'])['flatMap'](({blocks:_0x25be3f})=>_0x25be3f);if(new Set(_0x4d1a28)['size']!==_0x4d1a28[_0x28ea5e(0x27b)])throw new j('COLLABORATION_LOAD_FAILED',_0x28ea5e(0x1f1));return await Promise['all'](_0x4d1a28[_0x28ea5e(0x258)](async _0x1ab199=>{const _0x200c2f=_0x28ea5e;let _0x1b4a9f=await _0x2d10f5[_0x200c2f(0x1b2)](_0x1ab199);if(_0x400ff3(_0x1b4a9f['error'])||!_0x1b4a9f[_0x200c2f(0x217)])throw new j(_0x200c2f(0x168),_0x1b4a9f[_0x200c2f(0x218)]?.['message']||_0x200c2f(0x19e)+_0x1ab199+_0x200c2f(0x27a));if(_0x1b4a9f[_0x200c2f(0x217)]['id']!==_0x1ab199)throw new j(_0x200c2f(0x168),_0x200c2f(0x19e)+_0x1ab199+_0x200c2f(0x280));return _0x1b4a9f[_0x200c2f(0x217)];}));}function ve(_0x49429d){const _0x44f544=_0x11d030;let _0x33902b=_0x49429d['maxCodeLength']??0xa00000;if(!Number[_0x44f544(0x140)](_0x33902b)||_0x33902b<=0x0)throw new j(_0x44f544(0x216),_0x44f544(0x256));return{async 'load'(_0x103616,_0x507bd2){const _0x284ec1=_0x44f544;be(_0x103616,_0x507bd2);let _0x2dd458,_0x3afd41={'unitId':_0x103616,'unitType':_0x507bd2},_0x36b5ed={'unitId':_0x103616,'unitType':_0x507bd2,..._0x49429d[_0x284ec1(0x282)]===void 0x0?{}:{'resolveSnapshotService':()=>{const _0x3e959d=_0x284ec1;if(_0x2dd458===void 0x0)throw new j(_0x3e959d(0x168),_0x3e959d(0x173));return _0x2dd458;}}},_0x14b129;try{_0x14b129=await _0x49429d[_0x284ec1(0x1f3)][_0x284ec1(0x1ed)](_0x3afd41);}catch(_0x53d24c){throw new j(_0x284ec1(0x2b1),_0x284ec1(0x25e),{'cause':_0x53d24c,'retryable':!0x0});}let _0x1d66f2;try{_0x1d66f2=await _0x49429d[_0x284ec1(0x1d2)](_0x36b5ed);let _0x1287ec=he(_0x1d66f2,_0x49429d['snapshotServerService']);_0x49429d[_0x284ec1(0x282)]!==void 0x0&&(_0x2dd458=_0x1287ec[_0x284ec1(0x1c4)][_0x284ec1(0x165)](_0x561fda));let _0x4fc58b=await xe(_0x14b129,_0x103616,_0x507bd2);Se(_0x4fc58b,_0x3afd41),Ce(_0x1d66f2,_0x4fc58b);let _0x277bd0=B(_0x1287ec,_0x103616,_0x507bd2,J(_0x4fc58b[_0x284ec1(0x1a4)]),_0x4fc58b[_0x284ec1(0x157)]),_0xb17aa9=await _0x14b129['fetchChangesets'](_0x277bd0,void 0x0);if(_0x400ff3(_0xb17aa9[_0x284ec1(0x218)])){let _0x3e77b2=_0xb17aa9[_0x284ec1(0x218)];throw new j('COLLABORATION_UNAVAILABLE',_0x3e77b2?.[_0x284ec1(0x1c5)]||_0x284ec1(0x299),{'retryable':!0x0});}let _0x407e34=R(_0xb17aa9[_0x284ec1(0x157)],_0x103616,_0x507bd2,_0x277bd0),_0x288a09=_0x407e34['at'](-0x1)?.[_0x284ec1(0x1b6)]??_0x277bd0;if(_0xb17aa9['latestRevision']!==void 0x0&&_0xb17aa9[_0x284ec1(0x21f)]!==_0x288a09)throw new j(_0x284ec1(0x20c),_0x284ec1(0x163));return _0x277bd0=B(_0x1287ec,_0x103616,_0x507bd2,_0x277bd0,_0x407e34),await ye(_0x1287ec),new fe(_0x103616,_0x507bd2,_0x277bd0,_0x14b129,_0x1d66f2,_0x1287ec,_0x33902b);}catch(_0x5e328f){try{await _0x14b129[_0x284ec1(0x192)]();}catch{}try{_0x1d66f2?.['dispose']();}catch{}throw _0x5e328f instanceof j?_0x5e328f:new j(_0x284ec1(0x168),_0x284ec1(0x289),{'cause':_0x5e328f});}}};}async function ye(_0x5c0c06){const _0x514eea=_0x11d030;_0x5c0c06['injector'][_0x514eea(0x257)](_0x25ed85)&&await _0x5c0c06['injector'][_0x514eea(0x165)](_0x25ed85)[_0x514eea(0x177)]();}function be(_0x24da45,_0x1e4ddf){const _0x409a34=_0x11d030;if(_0x24da45['trim']()['length']===0x0)throw new j(_0x409a34(0x216),_0x409a34(0x266));if(_0x1e4ddf!==_0x20b30d[_0x409a34(0x272)]&&_0x1e4ddf!==_0x20b30d[_0x409a34(0x2b2)]&&_0x1e4ddf!==_0x20b30d[_0x409a34(0x1dc)]&&_0x1e4ddf!==_0x20b30d[_0x409a34(0x15e)]&&_0x1e4ddf!==_0x20b30d['UNIVER_BOARD'])throw new j('COLLABORATION_INVALID_INPUT',_0x409a34(0x195)+_0x1e4ddf);}async function xe(_0x4ac2a7,_0x478084,_0x8537f6){const _0x126216=_0x11d030;return _0x4ac2a7[_0x126216(0x1fb)]==='unit-data'?await _0x4ac2a7[_0x126216(0x1f4)]():await ge(_0x4ac2a7,_0x478084,_0x8537f6);}function Se(_0x24478a,_0x55bfef){const _0x385c71=_0x11d030;if(_0x24478a[_0x385c71(0x296)]!==_0x55bfef[_0x385c71(0x296)])throw new j(_0x385c71(0x168),'Checkpoint\x20Unit\x20type\x20does\x20not\x20match\x20the\x20requested\x20Unit\x20type');if(_0x24478a[_0x385c71(0x1a4)]['id']!==_0x55bfef[_0x385c71(0x227)])throw new j(_0x385c71(0x168),_0x385c71(0x19c));J(_0x24478a[_0x385c71(0x1a4)]);}function J(_0x3ec188){const _0x96c00e=_0x11d030;let _0x8c12e3=_0x3ec188[_0x96c00e(0x1af)];if(!Number[_0x96c00e(0x140)](_0x8c12e3)||_0x8c12e3===void 0x0||_0x8c12e3<0x1)throw new j(_0x96c00e(0x168),_0x96c00e(0x20a));return _0x8c12e3;}function _0x583c(_0x4f5cbe,_0x379694){_0x4f5cbe=_0x4f5cbe-0x135;const _0x5cc0ec=_0x5cc0();let _0x583c90=_0x5cc0ec[_0x4f5cbe];return _0x583c90;}function Ce(_0x2cb80e,_0x2f8e14){const _0xd992b5=_0x11d030;switch(_0x2f8e14['unitType']){case _0x20b30d[_0xd992b5(0x272)]:_0x2cb80e['createUnit'](_0x2f8e14[_0xd992b5(0x296)],structuredClone(_0x2f8e14[_0xd992b5(0x1a4)]));return;case _0x20b30d[_0xd992b5(0x2b2)]:_0x2cb80e['createUnit'](_0x2f8e14['unitType'],structuredClone(_0x2f8e14[_0xd992b5(0x1a4)]));return;case _0x20b30d['UNIVER_SLIDE']:_0x2cb80e[_0xd992b5(0x18e)](_0x2f8e14[_0xd992b5(0x296)],structuredClone(_0x2f8e14[_0xd992b5(0x1a4)]));return;case _0x20b30d[_0xd992b5(0x15e)]:_0x2cb80e[_0xd992b5(0x18e)](_0x2f8e14['unitType'],structuredClone(_0x2f8e14['unitData']));return;case _0x20b30d[_0xd992b5(0x29a)]:_0x2cb80e['createUnit'](_0x2f8e14['unitType'],structuredClone(_0x2f8e14['unitData']));return;}}var we=class{[_0x11d030(0x15d)];[_0x11d030(0x1e7)];[_0x11d030(0x1b4)];['format']='snapshot';constructor(_0x522324,_0x11d144,_0x45f4c4){const _0x1faccf=_0x11d030;this[_0x1faccf(0x15d)]=_0x522324,this['_target']=_0x11d144,this[_0x1faccf(0x1b4)]=_0x45f4c4;}[_0x11d030(0x17e)](){const _0xb29223=_0x11d030;return this[_0xb29223(0x1b4)]['getConnectionState']();}async[_0x11d030(0x298)](_0x119973=0x0){const _0x1112f8=_0x11d030;let _0x8b392e=X(this['_config'][_0x1112f8(0x24d)],this[_0x1112f8(0x1e7)][_0x1112f8(0x296)],_0x1112f8(0x204),this[_0x1112f8(0x1e7)][_0x1112f8(0x227)],_0x1112f8(0x1af),_0x119973),_0x38df78=await Y(this['_config'],_0x8b392e);return Te(_0x38df78[_0x1112f8(0x225)]),_0x38df78;}async[_0x11d030(0x1b2)](_0x121ac6){const _0x40ec63=_0x11d030;let _0x3b08e6=X(this[_0x40ec63(0x15d)][_0x40ec63(0x24d)],this[_0x40ec63(0x1e7)][_0x40ec63(0x296)],_0x40ec63(0x204),this[_0x40ec63(0x1e7)]['unitId'],'block',_0x121ac6),_0x16b4c4=await Y(this[_0x40ec63(0x15d)],_0x3b08e6);return _0x16b4c4[_0x40ec63(0x217)]&&typeof _0x16b4c4[_0x40ec63(0x217)][_0x40ec63(0x1a2)]==_0x40ec63(0x27f)&&(_0x16b4c4['block'][_0x40ec63(0x1a2)]=Z(_0x16b4c4[_0x40ec63(0x217)][_0x40ec63(0x1a2)])),_0x16b4c4;}async[_0x11d030(0x1e9)](_0x1d5f2e,_0x56e463=0x0){const _0x59a1a7=_0x11d030;let _0x58eb4d=X(this[_0x59a1a7(0x15d)]['snapshotServerUrl'],this['_target'][_0x59a1a7(0x296)],_0x59a1a7(0x204),this[_0x59a1a7(0x1e7)]['unitId'],_0x59a1a7(0x24f));_0x58eb4d['searchParams'][_0x59a1a7(0x1c2)](_0x59a1a7(0x1a1),String(_0x1d5f2e)),_0x58eb4d[_0x59a1a7(0x267)][_0x59a1a7(0x1c2)]('to',String(_0x56e463));let _0x4aa514=await Y(this[_0x59a1a7(0x15d)],_0x58eb4d);return this[_0x59a1a7(0x1b4)][_0x59a1a7(0x26d)](),_0x4aa514;}async['submitChangeset'](_0x30f8dd){const _0x2ebace=_0x11d030;await this[_0x2ebace(0x1b4)][_0x2ebace(0x1ab)]();let _0x31611a=this[_0x2ebace(0x1b4)][_0x2ebace(0x14a)](_0x30f8dd[_0x2ebace(0x1fd)],_0x30f8dd['reqId']),_0x237262={..._0x30f8dd,'memberID':this[_0x2ebace(0x1b4)]['memberId'],'revision':0x0,'type':this[_0x2ebace(0x1e7)][_0x2ebace(0x296)],'unitID':this[_0x2ebace(0x1e7)][_0x2ebace(0x227)],'userID':''},_0x1350c6=X(this[_0x2ebace(0x15d)][_0x2ebace(0x25a)],this['_target'][_0x2ebace(0x296)],_0x2ebace(0x204),this[_0x2ebace(0x1e7)][_0x2ebace(0x227)],_0x2ebace(0x229)),_0x8c6176=this[_0x2ebace(0x15d)][_0x2ebace(0x230)](_0x1350c6,{'body':JSON[_0x2ebace(0x1be)]({'changeset':_0x237262,'memberID':this[_0x2ebace(0x1b4)][_0x2ebace(0x291)],'type':this[_0x2ebace(0x1e7)][_0x2ebace(0x296)],'unitID':this[_0x2ebace(0x1e7)]['unitId']}),'headers':{'content-type':'application/json'},'method':'POST'})[_0x2ebace(0x198)](async _0xd02093=>_0xd02093['status']===0x191||_0xd02093['status']===0x193?_0x2ebace(0x20d):_0xd02093[_0x2ebace(0x13a)]===0x190||_0xd02093[_0x2ebace(0x13a)]===0x199?'invalid':_0xd02093['ok']?_0x2ebace(0x1e6):_0x2ebace(0x1a6))[_0x2ebace(0x16c)](()=>_0x2ebace(0x1a6)),_0x2ea119=Ee(this[_0x2ebace(0x15d)]['commitTimeoutMs']),_0x35fc03=_0x8c6176['then'](_0x318777=>_0x318777===_0x2ebace(0x20d)?{'status':_0x2ebace(0x18a)}:_0x318777===_0x2ebace(0x27e)?{'status':_0x2ebace(0x142)}:new Promise(()=>void 0x0)),_0x3bce5c=await Promise['race']([_0x31611a[_0x2ebace(0x1dd)],_0x35fc03,_0x2ea119[_0x2ebace(0x1dd)][_0x2ebace(0x198)](()=>({'status':_0x2ebace(0x243)}))])[_0x2ebace(0x1ad)](()=>{const _0x55b0c9=_0x2ebace;_0x31611a[_0x55b0c9(0x292)](),_0x2ea119[_0x55b0c9(0x292)]();});if(_0x3bce5c['status']===_0x2ebace(0x243)){let _0x5bc4a0=await _0x8c6176;return _0x5bc4a0===_0x2ebace(0x20d)?{'message':'Changeset\x20submission\x20was\x20denied','reason':'permission-denied','status':_0x2ebace(0x2a1)}:_0x5bc4a0===_0x2ebace(0x27e)?{'message':'Changeset\x20submission\x20was\x20rejected','reason':'invalid-changeset','status':'rejected'}:{'status':'unknown'};}if(_0x3bce5c[_0x2ebace(0x13a)]===_0x2ebace(0x21d))return{'status':_0x2ebace(0x1a6)};if(_0x3bce5c[_0x2ebace(0x13a)]===_0x2ebace(0x276))return{'status':_0x2ebace(0x276)};if(_0x3bce5c[_0x2ebace(0x13a)]===_0x2ebace(0x18a))return{'message':'Changeset\x20submission\x20was\x20denied','reason':_0x2ebace(0x23f),'status':_0x2ebace(0x2a1)};if(_0x3bce5c[_0x2ebace(0x13a)]===_0x2ebace(0x142)){let _0x1f6f23=await this[_0x2ebace(0x1e9)](_0x30f8dd[_0x2ebace(0x22d)],_0x30f8dd[_0x2ebace(0x22d)]);return{'message':_0x2ebace(0x160),'reason':_0x1f6f23['latestRevision']!==void 0x0&&_0x1f6f23['latestRevision']<_0x30f8dd[_0x2ebace(0x22d)]?_0x2ebace(0x154):_0x2ebace(0x146),'status':_0x2ebace(0x2a1)};}let _0x193712=_0x3bce5c[_0x2ebace(0x219)],_0x48705b=await this[_0x2ebace(0x1e9)](_0x30f8dd['baseRev'],_0x193712[_0x2ebace(0x1b6)]-0x1);if(_0x400ff3(_0x48705b['error'])){let _0x2ac8e2=_0x48705b['error'];throw new j(_0x2ebace(0x2b1),_0x2ac8e2?.[_0x2ebace(0x1c5)]||_0x2ebace(0x271),{'retryable':!0x0});}return{'acceptedChangeset':_0x193712,'precedingChangesets':_0x48705b['changesets'],'status':_0x2ebace(0x1ff)};}async[_0x11d030(0x192)](){const _0x4075ae=_0x11d030;await this[_0x4075ae(0x1b4)]['close']();}};async function Y(_0x4d22e4,_0x4eeaf9){const _0x11a685=_0x11d030;let _0x2dcdf4;try{_0x2dcdf4=await _0x4d22e4[_0x11a685(0x230)](_0x4eeaf9,{'method':_0x11a685(0x2a7)});}catch(_0x93ba4){throw new j(_0x11a685(0x2b1),'Collaboration\x20HTTP\x20request\x20failed',{'cause':_0x93ba4,'retryable':!0x0});}if(!_0x2dcdf4['ok'])throw new j(_0x11a685(0x2b1),'Collaboration\x20HTTP\x20request\x20failed\x20with\x20status\x20'+_0x2dcdf4[_0x11a685(0x13a)],{'retryable':_0x2dcdf4[_0x11a685(0x13a)]>=0x1f4});try{return await _0x2dcdf4[_0x11a685(0x279)]();}catch(_0x5032df){throw new j(_0x11a685(0x20c),_0x11a685(0x214),{'cause':_0x5032df});}}function X(_0x3a9947,..._0x2712f8){const _0x4fe6d9=_0x11d030;let _0x331855=new URL(_0x3a9947);return _0x331855[_0x4fe6d9(0x25f)]=_0x331855[_0x4fe6d9(0x25f)][_0x4fe6d9(0x268)](/\/$/,'')+'/'+_0x2712f8['map'](_0x4ebbc4=>encodeURIComponent(String(_0x4ebbc4)))['join']('/'),_0x331855;}function Te(_0x441305){const _0x4a4854=_0x11d030;if(!_0x441305)return;let _0x38cc29=[_0x441305['workbook'],_0x441305['doc'],_0x441305['slide'],_0x441305[_0x4a4854(0x1c0)]];for(let _0xf753d9 of _0x38cc29)_0xf753d9&&typeof _0xf753d9[_0x4a4854(0x1fa)]==_0x4a4854(0x27f)&&(_0xf753d9[_0x4a4854(0x1fa)]=Z(_0xf753d9[_0x4a4854(0x1fa)]));if(_0x441305[_0x4a4854(0x2b3)]){for(let _0x30044d of Object[_0x4a4854(0x16b)](_0x441305['workbook'][_0x4a4854(0x2a5)]))typeof _0x30044d[_0x4a4854(0x1fa)]=='string'&&(_0x30044d['originalMeta']=Z(_0x30044d['originalMeta']));}}function Z(_0x4728f2){const _0x3ac138=_0x11d030;return Uint8Array[_0x3ac138(0x1a1)](Buffer[_0x3ac138(0x1a1)](_0x4728f2,_0x3ac138(0x203)));}function Ee(_0x5b7057){let _0xa284ad;return{'cancel':()=>{_0xa284ad!==void 0x0&&clearTimeout(_0xa284ad);},'promise':new Promise(_0x23db81=>{_0xa284ad=setTimeout(_0x23db81,_0x5b7057);})};}var De=class{[_0x11d030(0x15d)];[_0x11d030(0x18b)]=_0x11d030(0x1ac);[_0x11d030(0x211)];['_connectPromise'];['_memberId']='';[_0x11d030(0x28a)]=new Map();[_0x11d030(0x2b9)]=new Map();[_0x11d030(0x28b)]=new Map();['_inbound']=new Map();[_0x11d030(0x2ad)];[_0x11d030(0x188)];[_0x11d030(0x228)]=0x0;constructor(_0x1b2e7c){const _0x16a525=_0x11d030;this[_0x16a525(0x15d)]=_0x1b2e7c;}async[_0x11d030(0x2bd)](_0xbe5ed9){const _0x4d05c7=_0x11d030;let _0x3e79ed=this['_joined'][_0x4d05c7(0x165)](_0xbe5ed9[_0x4d05c7(0x227)]);if(_0x3e79ed&&_0x3e79ed[_0x4d05c7(0x191)]['unitType']!==_0xbe5ed9[_0x4d05c7(0x296)])throw new j(_0x4d05c7(0x216),_0x4d05c7(0x29e));if(await this[_0x4d05c7(0x16a)](),_0x3e79ed)_0x3e79ed['leases']+=0x1;else{try{await this[_0x4d05c7(0x1c9)](_0xbe5ed9);}catch(_0x39b506){throw this[_0x4d05c7(0x28a)]['size']===0x0&&(this[_0x4d05c7(0x18b)]=_0x4d05c7(0x21d),this[_0x4d05c7(0x197)](),this['_socket']?.[_0x4d05c7(0x192)](0x3e8,_0x4d05c7(0x255)),this[_0x4d05c7(0x211)]=void 0x0,this['_memberId']=''),_0x39b506;}this[_0x4d05c7(0x28a)][_0x4d05c7(0x1c2)](_0xbe5ed9['unitId'],{'leases':0x1,'target':_0xbe5ed9});}let _0x43a189=!0x1,_0x2e0dfd=()=>this[_0x4d05c7(0x1b3)],_0x4f2d14=new Set();return{'close':async()=>{const _0x5a0c06=_0x4d05c7;if(!_0x43a189){_0x43a189=!0x0;for(let _0x4cfba1 of _0x4f2d14)_0x4cfba1[_0x5a0c06(0x292)]();_0x4f2d14[_0x5a0c06(0x28e)](),await this[_0x5a0c06(0x20b)](_0xbe5ed9['unitId']);}},'ensureOnline':async()=>await this[_0x4d05c7(0x16a)](),'getConnectionState':()=>_0x43a189?'closed':this[_0x4d05c7(0x18b)],get 'memberId'(){return _0x2e0dfd();},'takeInboundChangesets':()=>{const _0x156972=_0x4d05c7;let _0x64696c=this['_inbound']['get'](_0xbe5ed9['unitId'])??[];return this[_0x156972(0x14c)][_0x156972(0x25d)](_0xbe5ed9[_0x156972(0x227)]),_0x64696c;},'waitForSubmission':(_0x3367b2,_0x4c1073)=>{const _0x4dabfe=_0x4d05c7;let _0x2e6349=this[_0x4dabfe(0x148)](_0x3367b2,_0x4c1073);return _0x4f2d14[_0x4dabfe(0x24e)](_0x2e6349),_0x2e6349['promise']['then'](()=>_0x4f2d14[_0x4dabfe(0x25d)](_0x2e6349),()=>_0x4f2d14[_0x4dabfe(0x25d)](_0x2e6349)),{'cancel':()=>{const _0x4b1ba0=_0x4dabfe;_0x4f2d14[_0x4b1ba0(0x25d)](_0x2e6349),_0x2e6349[_0x4b1ba0(0x292)]();},'promise':_0x2e6349[_0x4dabfe(0x1dd)]};}};}async[_0x11d030(0x16a)](){const _0x5aa5a1=_0x11d030;if(this[_0x5aa5a1(0x18b)]!==_0x5aa5a1(0x1ca)||this['_socket']?.['readyState']!==WebSocket[_0x5aa5a1(0x2bc)]){this[_0x5aa5a1(0x188)]!==void 0x0&&clearTimeout(this[_0x5aa5a1(0x188)]),this[_0x5aa5a1(0x188)]=void 0x0,this[_0x5aa5a1(0x1f2)]??=this[_0x5aa5a1(0x1a5)]();try{await this[_0x5aa5a1(0x1f2)];}finally{this['_connectPromise']=void 0x0;}}}async[_0x11d030(0x1a5)](){const _0x1f4baf=_0x11d030;this[_0x1f4baf(0x18b)]=_0x1f4baf(0x215);let _0x2e062a=await this[_0x1f4baf(0x15d)][_0x1f4baf(0x230)](this[_0x1f4baf(0x15d)][_0x1f4baf(0x151)],{'headers':{'content-type':_0x1f4baf(0x179)},'method':_0x1f4baf(0x2a7)});if(!_0x2e062a['ok'])throw this[_0x1f4baf(0x18b)]=_0x1f4baf(0x1ac),new j('COLLABORATION_UNAVAILABLE',_0x1f4baf(0x175)+_0x2e062a[_0x1f4baf(0x13a)],{'retryable':_0x2e062a[_0x1f4baf(0x13a)]>=0x1f4});let _0x2d54b0=await _0x2e062a['json']();if(typeof _0x2d54b0[_0x1f4baf(0x178)]!=_0x1f4baf(0x27f)||_0x2d54b0[_0x1f4baf(0x178)][_0x1f4baf(0x27b)]===0x0)throw this[_0x1f4baf(0x18b)]=_0x1f4baf(0x1ac),new j(_0x1f4baf(0x20c),_0x1f4baf(0x1f0));let _0x44df67=new URL(this['_config'][_0x1f4baf(0x1d7)]);_0x44df67[_0x1f4baf(0x267)][_0x1f4baf(0x1c2)](_0x1f4baf(0x17b),_0x2d54b0[_0x1f4baf(0x178)]);let _0xaf5166=new WebSocket(_0x44df67);this['_socket']=_0xaf5166,_0xaf5166[_0x1f4baf(0x180)](_0x1f4baf(0x1c5),_0x4c0a06=>this[_0x1f4baf(0x1f5)](_0x4c0a06)),_0xaf5166['addEventListener']('close',()=>{const _0x16d60e=_0x1f4baf;this['_socket']===_0xaf5166&&(this[_0x16d60e(0x197)](),this[_0x16d60e(0x189)](new j(_0x16d60e(0x2b1),'Collaboration\x20WebSocket\x20closed',{'retryable':!0x0})),this[_0x16d60e(0x18b)]=this[_0x16d60e(0x28a)][_0x16d60e(0x26f)]===0x0?'closed':_0x16d60e(0x215),this[_0x16d60e(0x28a)]['size']>0x0&&this[_0x16d60e(0x1a0)]());}),await Oe(_0xaf5166);let _0x55ec43=await this[_0x1f4baf(0x169)](_0x3042f5['HELLO'],'',{'cmd':_0x3042f5['HELLO'],'routeKey':''});if(_0x55ec43[_0x1f4baf(0x1e2)]!==_0xe6f23a['OK']||typeof _0x55ec43[_0x1f4baf(0x260)]?.[_0x1f4baf(0x222)]!=_0x1f4baf(0x27f))throw _0xaf5166[_0x1f4baf(0x192)](),new j('COLLABORATION_PROTOCOL_ERROR',_0x1f4baf(0x29f));this[_0x1f4baf(0x1b3)]=_0x55ec43[_0x1f4baf(0x260)][_0x1f4baf(0x222)],this[_0x1f4baf(0x18b)]='online';for(let {target:_0x193dd0}of this[_0x1f4baf(0x28a)][_0x1f4baf(0x16b)]())try{await this[_0x1f4baf(0x1c9)](_0x193dd0);}catch(_0x2c4bef){throw _0xaf5166['close'](0x3f3,_0x1f4baf(0x24c)),_0x2c4bef;}this[_0x1f4baf(0x228)]=0x0,this[_0x1f4baf(0x13d)]();}async['_join'](_0x422db7){const _0x24c9a8=_0x11d030;let _0x4d587c=await this[_0x24c9a8(0x169)](_0x3042f5[_0x24c9a8(0x17a)],_0x422db7[_0x24c9a8(0x227)],{'cmd':_0x3042f5[_0x24c9a8(0x17a)],'joinReq':{'rooms':[{'args':'','roomID':_0x422db7[_0x24c9a8(0x227)]}]},'routeKey':_0x422db7[_0x24c9a8(0x227)]});if(_0x4d587c[_0x24c9a8(0x1e2)]!==_0xe6f23a['OK'])throw new j(_0x24c9a8(0x2b1),typeof _0x4d587c[_0x24c9a8(0x265)]==_0x24c9a8(0x27f)?_0x4d587c[_0x24c9a8(0x265)]:'Failed\x20to\x20join\x20Unit\x20room');}[_0x11d030(0x169)](_0xd366,_0x31818a,_0x2ad56c){const _0x14affa=_0x11d030;let _0x37c455=this['_socket'];if(!_0x37c455||_0x37c455[_0x14affa(0x1ba)]!==WebSocket['OPEN'])return Promise[_0x14affa(0x18c)](new j(_0x14affa(0x2b1),_0x14affa(0x283),{'retryable':!0x0}));let _0x5f5c4f=_0xd366+':'+_0x31818a;return new Promise((_0x48fc4d,_0x3a5688)=>{const _0x4c87e6=_0x14affa;if(this[_0x4c87e6(0x2b9)][_0x4c87e6(0x257)](_0x5f5c4f)){_0x3a5688(new j('COLLABORATION_PROTOCOL_ERROR','A\x20'+_0xd366+'\x20request\x20is\x20already\x20active\x20for\x20'+_0x31818a));return;}let _0x476ebe=setTimeout(()=>{const _0x333b86=_0x4c87e6;this[_0x333b86(0x2b9)][_0x333b86(0x25d)](_0x5f5c4f),_0x3a5688(new j(_0x333b86(0x2b1),_0x333b86(0x213)+_0xd366,{'retryable':!0x0}));},0x7530);this['_commandWaiters'][_0x4c87e6(0x1c2)](_0x5f5c4f,{'reject':_0x3a5688,'resolve':_0x48fc4d,'timer':_0x476ebe});try{_0x37c455[_0x4c87e6(0x1cc)](JSON['stringify'](_0x2ad56c));}catch(_0x386718){this[_0x4c87e6(0x2b9)][_0x4c87e6(0x25d)](_0x5f5c4f),clearTimeout(_0x476ebe),_0x3a5688(new j(_0x4c87e6(0x2b1),_0x4c87e6(0x25c),{'cause':_0x386718,'retryable':!0x0}));}});}[_0x11d030(0x1f5)](_0xb4dc8b){const _0x15a8d9=_0x11d030;if(typeof _0xb4dc8b[_0x15a8d9(0x1a2)]!=_0x15a8d9(0x27f))return;let _0x197488;try{_0x197488=JSON[_0x15a8d9(0x194)](_0xb4dc8b[_0x15a8d9(0x1a2)]);}catch{this[_0x15a8d9(0x211)]?.[_0x15a8d9(0x192)](0x3eb,_0x15a8d9(0x1e0));return;}let _0x281c6f=typeof _0x197488['routeKey']==_0x15a8d9(0x27f)?_0x197488[_0x15a8d9(0x15b)]:'';if(_0x197488['cmd']===_0x3042f5['HELLO']||_0x197488[_0x15a8d9(0x1ee)]===_0x3042f5[_0x15a8d9(0x17a)]||_0x197488['cmd']===_0x3042f5[_0x15a8d9(0x234)]){let _0x5cbf74=_0x197488[_0x15a8d9(0x1ee)]+':'+_0x281c6f,_0xe1b74c=this['_commandWaiters'][_0x15a8d9(0x165)](_0x5cbf74);_0xe1b74c&&(this[_0x15a8d9(0x2b9)][_0x15a8d9(0x25d)](_0x5cbf74),clearTimeout(_0xe1b74c[_0x15a8d9(0x250)]),_0xe1b74c['resolve'](_0x197488));return;}_0x197488[_0x15a8d9(0x1ee)]!==_0x3042f5[_0x15a8d9(0x17d)]||!_0x197488[_0x15a8d9(0x29d)]||this[_0x15a8d9(0x269)](_0x281c6f,_0x197488['collaMsg']);}[_0x11d030(0x269)](_0x4d8f7d,_0x4e3ab2){const _0x1e73a6=_0x11d030;let _0x514a62=_0x4e3ab2[_0x1e73a6(0x16e)],_0x5f341f=_0x514a62===_0x1e73a6(0x1bf)?_0x1e73a6(0x252):_0x514a62===_0x1e73a6(0x2b5)?'csRejEvent':_0x514a62===_0x1e73a6(0x19f)?_0x1e73a6(0x235):_0x514a62===_0x1e73a6(0x294)?_0x1e73a6(0x274):_0x514a62===_0x1e73a6(0x281)?'newCsEvent':void 0x0;if(!_0x5f341f)return;let _0x4f7c97=ke(_0x4e3ab2[_0x5f341f]);if(!_0x4f7c97||_0x4f7c97[_0x1e73a6(0x231)]!==_0x4d8f7d)return;if(_0x514a62==='new_changesets'){let _0x1f47f3=this[_0x1e73a6(0x14c)][_0x1e73a6(0x165)](_0x4d8f7d)??[];_0x1f47f3[_0x1e73a6(0x209)](_0x4f7c97),this['_inbound'][_0x1e73a6(0x1c2)](_0x4d8f7d,_0x1f47f3);return;}let _0x444c1d=Q(_0x4f7c97['sid'],_0x4f7c97['reqId']),_0x36d3c3=this['_submissionWaiters'][_0x1e73a6(0x165)](_0x444c1d);_0x36d3c3&&_0x36d3c3(_0x514a62==='changeset_ack'?{'changeset':_0x4f7c97,'status':_0x1e73a6(0x1cd)}:_0x514a62===_0x1e73a6(0x19f)?{'status':_0x1e73a6(0x276)}:_0x514a62===_0x1e73a6(0x294)?{'status':_0x1e73a6(0x18a)}:{'status':_0x1e73a6(0x142)});}[_0x11d030(0x148)](_0x3e12af,_0x1a7910){const _0xa1172b=_0x11d030;let _0xb27b13=Q(_0x3e12af,_0x1a7910);if(this[_0xa1172b(0x28b)]['has'](_0xb27b13))return{'cancel':()=>void 0x0,'promise':Promise['reject'](new j(_0xa1172b(0x216),_0xa1172b(0x172)))};let _0x3ca474=()=>void 0x0;return{'cancel':()=>_0x3ca474({'status':_0xa1172b(0x21d)}),'promise':new Promise(_0x4560ce=>{const _0x217aa3=_0xa1172b;_0x3ca474=_0x56699f=>{const _0x3a58d6=_0x583c;this['_submissionWaiters'][_0x3a58d6(0x25d)](_0xb27b13)&&_0x4560ce(_0x56699f);},this['_submissionWaiters'][_0x217aa3(0x1c2)](_0xb27b13,_0x3ca474);})};}async[_0x11d030(0x20b)](_0x442d43){const _0x5827ff=_0x11d030;let _0x1485b2=this['_joined'][_0x5827ff(0x165)](_0x442d43);_0x1485b2&&(--_0x1485b2['leases'],!(_0x1485b2[_0x5827ff(0x1c7)]>0x0)&&(this[_0x5827ff(0x28a)][_0x5827ff(0x25d)](_0x442d43),this[_0x5827ff(0x14c)][_0x5827ff(0x25d)](_0x442d43),this[_0x5827ff(0x211)]?.[_0x5827ff(0x1ba)]===WebSocket[_0x5827ff(0x2bc)]&&this[_0x5827ff(0x211)][_0x5827ff(0x1cc)](JSON[_0x5827ff(0x1be)]({'cmd':_0x3042f5[_0x5827ff(0x13c)],'leaveReq':{'args':'','roomID':_0x442d43},'routeKey':_0x442d43})),this[_0x5827ff(0x28a)][_0x5827ff(0x26f)]===0x0&&(this[_0x5827ff(0x18b)]=_0x5827ff(0x21d),this[_0x5827ff(0x188)]!==void 0x0&&clearTimeout(this['_reconnectTimer']),this[_0x5827ff(0x188)]=void 0x0,this[_0x5827ff(0x197)](),this[_0x5827ff(0x211)]?.[_0x5827ff(0x192)](0x3e8,_0x5827ff(0x2ba)),this['_socket']=void 0x0,this[_0x5827ff(0x1b3)]='')));}[_0x11d030(0x1a0)](){const _0x444be0=_0x11d030;if(this[_0x444be0(0x188)]!==void 0x0||this['_reconnectAttempts']>=0x3){this['_reconnectAttempts']>=0x3&&(this[_0x444be0(0x18b)]=_0x444be0(0x1ac));return;}let _0x4d5fa6=Math[_0x444be0(0x166)](0x3e8*0x2**this['_reconnectAttempts'],0x4e20);this[_0x444be0(0x228)]+=0x1,this[_0x444be0(0x188)]=setTimeout(()=>{const _0xe80de2=_0x444be0;this[_0xe80de2(0x188)]=void 0x0,this['_connectPromise']??=this[_0xe80de2(0x1a5)](),this['_connectPromise']['catch'](()=>this[_0xe80de2(0x1a0)]())['finally'](()=>{const _0x46b9ac=_0xe80de2;this[_0x46b9ac(0x1f2)]=void 0x0;});},_0x4d5fa6);}[_0x11d030(0x13d)](){const _0x3dd817=_0x11d030;this['_stopHeartbeat'](),this[_0x3dd817(0x2ad)]=setInterval(()=>{const _0xdccdcd=_0x3dd817;this[_0xdccdcd(0x18b)]===_0xdccdcd(0x1ca)&&this[_0xdccdcd(0x169)](_0x3042f5[_0xdccdcd(0x234)],'',{'cmd':_0x3042f5[_0xdccdcd(0x234)],'routeKey':''})[_0xdccdcd(0x16c)](()=>this['_socket']?.[_0xdccdcd(0x192)](0x3f3,'Heartbeat\x20failed'));},0x7530);}[_0x11d030(0x197)](){const _0x51bda3=_0x11d030;this['_heartbeat']!==void 0x0&&clearInterval(this[_0x51bda3(0x2ad)]),this[_0x51bda3(0x2ad)]=void 0x0;}[_0x11d030(0x189)](_0x2a1297){const _0x5206f9=_0x11d030;for(let _0x3ce18c of this[_0x5206f9(0x2b9)][_0x5206f9(0x16b)]())clearTimeout(_0x3ce18c['timer']),_0x3ce18c[_0x5206f9(0x18c)](_0x2a1297);this[_0x5206f9(0x2b9)][_0x5206f9(0x28e)]();}};function Oe(_0x3ed9f1){return new Promise((_0x33c73e,_0x215ed2)=>{const _0x43430e=_0x583c;let _0x5c5fb0=()=>{const _0x2111d0=_0x583c;clearTimeout(_0x33ce30),_0x3ed9f1[_0x2111d0(0x143)](_0x2111d0(0x192),_0x546e8e),_0x3ed9f1[_0x2111d0(0x143)](_0x2111d0(0x218),_0x4f8edc),_0x3ed9f1[_0x2111d0(0x143)](_0x2111d0(0x1ed),_0x4b8958);},_0x49dc6b=_0xf6b19f=>{const _0x2d67ed=_0x583c;_0x5c5fb0(),_0x215ed2(new j(_0x2d67ed(0x2b1),_0xf6b19f,{'retryable':!0x0}));},_0x546e8e=()=>_0x49dc6b(_0x43430e(0x1c1)),_0x4f8edc=()=>_0x49dc6b(_0x43430e(0x16f)),_0x4b8958=()=>{_0x5c5fb0(),_0x33c73e();},_0x33ce30=setTimeout(()=>{const _0x36402c=_0x43430e;_0x49dc6b(_0x36402c(0x239)),_0x3ed9f1[_0x36402c(0x192)](0x3e8,_0x36402c(0x288));},0x7530);_0x3ed9f1['addEventListener'](_0x43430e(0x192),_0x546e8e,{'once':!0x0}),_0x3ed9f1['addEventListener']('error',_0x4f8edc,{'once':!0x0}),_0x3ed9f1[_0x43430e(0x180)](_0x43430e(0x1ed),_0x4b8958,{'once':!0x0});});}function ke(_0x4def3f){const _0x84ce44=_0x11d030;if(!_0x4def3f||typeof _0x4def3f!='object')return null;let _0x7b6eda=_0x4def3f['cs'];return _0x7b6eda&&typeof _0x7b6eda==_0x84ce44(0x224)?_0x7b6eda:null;}function Q(_0x2a3dfb,_0x1e68d7){return(_0x2a3dfb??'')+':'+(_0x1e68d7??0x0);}var Ae=class{[_0x11d030(0x15d)];[_0x11d030(0x223)];constructor(_0x5cad60){const _0x9815af=_0x11d030;this['_config']=je(_0x5cad60),this['_connection']=new De(this[_0x9815af(0x15d)]);}async[_0x11d030(0x1ed)](_0x467fca){const _0x3cfb65=_0x11d030;let _0x4f23a3=await this[_0x3cfb65(0x223)]['acquire'](_0x467fca);return new we(this[_0x3cfb65(0x15d)],_0x467fca,_0x4f23a3);}};function je(_0x320394){const _0x49609e=_0x11d030;let _0xa8c545=$(_0x320394[_0x49609e(0x24d)],_0x49609e(0x24d),[_0x49609e(0x149),_0x49609e(0x15c)]),_0x185264=$(_0x320394[_0x49609e(0x25a)],_0x49609e(0x25a),[_0x49609e(0x149),_0x49609e(0x15c)]),_0x3411f1=$(_0x320394['collabWebSocketUrl'],_0x49609e(0x1d7),[_0x49609e(0x138),_0x49609e(0x176),_0x49609e(0x149),_0x49609e(0x15c)]);_0x3411f1[_0x49609e(0x14e)]===_0x49609e(0x149)&&(_0x3411f1[_0x49609e(0x14e)]=_0x49609e(0x138)),_0x3411f1[_0x49609e(0x14e)]===_0x49609e(0x15c)&&(_0x3411f1[_0x49609e(0x14e)]='wss:');let _0x4638d7=$(_0x320394[_0x49609e(0x151)],'wsSessionTicketUrl',['http:',_0x49609e(0x15c)]),_0x5ad7c3=_0x320394[_0x49609e(0x141)]??0x7530;if(!Number[_0x49609e(0x140)](_0x5ad7c3)||_0x5ad7c3<=0x0)throw new j(_0x49609e(0x216),_0x49609e(0x1c6));return{'collabSubmitChangesetUrl':_0x185264,'collabWebSocketUrl':_0x3411f1,'commitTimeoutMs':_0x5ad7c3,'httpRequest':_0x320394[_0x49609e(0x230)]??globalThis[_0x49609e(0x247)]['bind'](globalThis),'snapshotServerUrl':_0xa8c545,'wsSessionTicketUrl':_0x4638d7};}function $(_0x223151,_0x4984f4,_0x4bc192){const _0x2ebbaf=_0x11d030;let _0x29d9e1;try{_0x29d9e1=new URL(_0x223151);}catch{throw new j(_0x2ebbaf(0x216),_0x4984f4+'\x20must\x20be\x20an\x20absolute\x20URL');}if(!_0x4bc192[_0x2ebbaf(0x1b7)](_0x29d9e1[_0x2ebbaf(0x14e)]))throw new j(_0x2ebbaf(0x216),_0x4984f4+'\x20uses\x20an\x20unsupported\x20protocol');return _0x29d9e1;}function Me(_0x304827){return new Ae(_0x304827);}export{j as CollaborationRuntimeError,Me as createCollaborationServerAdapter,ve as createUniverCollaborationRuntimeFactory};
1
+ const _0x28a351=_0x2b76;(function(_0x2ad9db,_0x1f1a92){const _0x2f2ee3=_0x2b76,_0x46b724=_0x2ad9db();while(!![]){try{const _0x28f08c=-parseInt(_0x2f2ee3(0x266))/0x1+parseInt(_0x2f2ee3(0x265))/0x2+parseInt(_0x2f2ee3(0x2c4))/0x3*(-parseInt(_0x2f2ee3(0x237))/0x4)+-parseInt(_0x2f2ee3(0x337))/0x5+parseInt(_0x2f2ee3(0x2cc))/0x6*(-parseInt(_0x2f2ee3(0x345))/0x7)+-parseInt(_0x2f2ee3(0x2e6))/0x8*(parseInt(_0x2f2ee3(0x284))/0x9)+-parseInt(_0x2f2ee3(0x1ff))/0xa*(-parseInt(_0x2f2ee3(0x249))/0xb);if(_0x28f08c===_0x1f1a92)break;else _0x46b724['push'](_0x46b724['shift']());}catch(_0x385133){_0x46b724['push'](_0x46b724['shift']());}}}(_0x2e3a,0x958dd));import{CommandType as _0x56c714,DependentOn as _0x47e19f,ICommandService as _0x24a215,IUniverInstanceService as _0x4f82f9,Inject as _0x407b4d,Injector as _0x419b26,Plugin as _0x45c71a,UniverInstanceType as _0x27cc9f,registerDependencies as _0x9caa23,sequenceExecute as _0x2648cd,toDisposable as _0x1752eb}from'@univerjs/core';function _0x2e3a(){const _0x5e2b40=['1010201qfgxMU','_closeAfterFatalError','formula.mutation.set-trigger-formula-calculation-stop','readyState','permission','save','_scheduleReconnect','splice','protocol','_setTransformConflict','OPEN','closed','Collaboration\x20WebSocket\x20is\x20not\x20online','type','COLLABORATION_INVALID_INPUT','permission-denied','collaMsg','RECV','suppress','latestRevision','m2Prime','UNIVER_SLIDE','_awaiting','mutations','acceptedChangeset','status','Snapshot\x20revision\x20must\x20be\x20a\x20positive\x20safe\x20integer','has','Collaboration\x20HELLO\x20response\x20is\x20invalid','randomUUID','45BGSuwq','dispose','pathname','UNIVER_BOARD','takeInboundChangesets','_tail','awaiting-ack','up-to-date','\x20cannot\x20capture\x20mutation\x20','cmd','online','_ensureConnected','createPresentation','unknown','univerAPI','COLLABORATION_CLOSED','onMutationExecutedForCollab','Collaboration\x20runtime\x20result\x20must\x20be\x20JSON-compatible','snapshotServerService','Changeset\x20submission\x20was\x20rejected','reject','searchParams','min','_nextReqId','slice','getBoard','memberId','open','application/json','Session\x20ticket\x20request\x20failed\x20with\x20HTTP\x20','_socket','pending','permission_rej','isArray','_capture','index','board','fetchThroughInterceptors','formula.mutation.set-calculation-result','wsSessionTicketUrl','Event','changesets','\x20cannot\x20call\x20','Buffered\x20changeset\x20does\x20not\x20match\x20the\x20canonical\x20preceding\x20changeset','_suppressionDepth','findIndex','ticket','promise','Failed\x20to\x20transform\x20the\x20Unit\x20snapshot','subscribe','length','leases','ack','kind','http:','_injector','registerPlugin','POST','createDocument','changeset_should_retry','values','_connect','Awaiting\x20changeset\x20echo\x20does\x20not\x20follow\x20the\x20current\x20revision','_joined','387eNieAN','MUTATION','catch','_waitForSubmission','result','workbook','data','snapshotServerUrl','6hicmZd','_connection','snapshot','_replayRemoteChangesets','createBase','_config','prependPending','\x20returned\x20a\x20different\x20block\x20identity','revisionService','Failed\x20to\x20establish\x20Collaboration\x20WebSocket','permission-rejected','maxCodeLength','pull','read','compressMutationService','Historical\x20restore\x20requires\x20reloading\x20the\x20Unit\x20and\x20cannot\x20be\x20replayed\x20in\x20place','fetchmissing','entries','formula.mutation.set-formula-data','formula.mutation.set-trigger-formula-calculation-start','return\x20(async\x20()\x20=>\x20{\x20','object','write','some','createBoard','routeKey','1262264frYPwe','unit','backend','incrementRevOfUnit','reconnecting','prototype','sort','maxCodeLength\x20must\x20be\x20a\x20positive\x20safe\x20integer','getDocument','Historical\x20restore\x20requires\x20reloading\x20the\x20Unit\x20and\x20cannot\x20be\x20pulled\x20in\x20place','target','blockMeta','unsubscribe','COMPRESS_MUTATION_SEND','fetchChangesets','json','rejected','close','unitData','_state','unchanged','commitTimeoutMs','_closeOwnedResources','_reconnectTimer','_baseRevision','_closePromise','ws:','Awaiting\x20changeset\x20echo\x20does\x20not\x20match\x20the\x20transformed\x20local\x20mutations','Snapshot\x20Unit\x20identity\x20does\x20not\x20match\x20the\x20requested\x20Unit','_validateAcceptedChangeset','_join','createUnit','_requestCommand','_startHeartbeat','sheet.mutation.send-init-pivot-text-local','UNIVER_CLI_SDK_MANUAL_COLLABORATION_PLUGIN','docStateChange$','Single-Unit\x20runtime\x20for\x20','string','UNIVER_DOC','changeset_rej','_executor','Collaboration\x20WebSocket\x20closed','Backend\x20returned\x20a\x20non-contiguous\x20changeset\x20range','Failed\x20to\x20rejoin\x20Unit\x20room','HELLO','UNIVER_BASE','takePending','csAckEvent','offline','find','Failed\x20to\x20join\x20Unit\x20room','_captureCommandMutation','_closed','Unit\x20','Timed\x20out\x20waiting\x20for\x20Collaboration\x20command\x20','collabSubmitChangesetUrl','newCsEvent','_bufferedChangesets','originalMeta','COMPRESS_MUTATION_APPLY','onlyLocal','LEAVE','interceptor','stringify','clear','_unitId','Unsupported\x20collaboration\x20Unit\x20type:\x20','nothing-to-commit','error','SnapshotService\x20is\x20not\x20ready\x20until\x20the\x20Univer\x20factory\x20has\x20returned','redoState','unit-data','_release','execute','transform-failed','rev','sid','fetch','pull-required','injector','5490055cDXqCK','conflict','COLLABORATION_PROTOCOL_ERROR','_target','Univer\x20revision\x20did\x20not\x20advance\x20to\x20the\x20confirmed\x20changeset\x20revision','COLLABORATION_LOAD_FAILED','includes','acquire','exportUnitData','_subscribeToDocumentState','getBase','delete','createWorkbook','Session\x20ticket\x20response\x20is\x20missing\x20a\x20ticket','6742582HaQQdo','Runtime\x20for\x20','reqId','onStarting','addEventListener','BeforeCommandExecute','new_changes','isSafeInteger','UNIVER_SHEET','_operations','GET','run','_createAwaitingFromPending','Cannot\x20replace\x20mutations\x20after\x20a\x20changeset\x20is\x20awaiting\x20confirmation','eventID','changeset-rejected','_consumeBufferedPrecedingChangesets','isFinite','JOIN','_commandWaiters','confirmed','getState','size','_handleCollaborationEvent','memberID','unitId','m1Prime','COMMAND','snapshotFrom','_lease','transformService','commitTimeoutMs\x20must\x20be\x20a\x20positive\x20safe\x20integer','Collaboration\x20HTTP\x20request\x20failed\x20with\x20status\x20','map','actions','_sid','https:','Historical\x20restore\x20requires\x20reloading\x20the\x20Unit\x20and\x20is\x20not\x20supported\x20by\x20this\x20runtime','sheets','timer','\x20after\x20the\x20collaboration\x20runtime\x20entered\x20conflict','Collaboration\x20WebSocket\x20closed\x20before\x20opening','\x20})();','_handle','_univer','transformMutations','invalid','replace','Backend\x20changesets\x20must\x20be\x20an\x20array','get','Collaboration\x20HTTP\x20request\x20failed','awaitingMutations','10GMvvXK','block','then','unitID','remote','HEARTBEAT','removeEventListener','collabWebSocketUrl','all','resolve','send','boolean','infoRsp','Backend\x20latest\x20revision\x20does\x20not\x20match\x20its\x20continuous\x20changeset\x20range','getPrototypeOf','changeset','_stopHeartbeat','_inbound','commandId','submitChangeset','Sheet-shaped\x20snapshot\x20is\x20missing\x20workbook\x20metadata','unitType','COLLABORATION_UNAVAILABLE','instanceService','changeset_ack','race','_kernel','Code\x20is\x20longer\x20than\x20the\x20','\x20for\x20Unit\x20','revision','Confirmed\x20mutation\x20replay\x20failed\x20at\x20index\x20','disposeUnit','_pending','The\x20same\x20Unit\x20id\x20cannot\x20be\x20joined\x20with\x20two\x20Unit\x20types','timeout','_submissionWaiters','ensureOnline','format','replacePending','_handleMessage','trim','retry','getPresentation','baseRev','_reconcilePrecedingChangesets','push','getConnectionState','Backend\x20returned\x20no\x20Unit\x20snapshot','_disposables','_fetchChangesets','_conflict','\x20character\x20limit','ACK\x20revision\x20does\x20not\x20follow\x20the\x20applied\x20confirmed\x20revision','_heartbeat','replacePendingMutations','code','23496IsiThq','sessionTicket','message','new_changesets','unshift','csRejEvent','Changeset\x20submission\x20was\x20denied','from','_assertMutableState','getInterceptPoints','httpRequest','parse','Confirmed\x20changeset\x20history\x20is\x20not\x20contiguous','mode','_knownHeadRevision','Failed\x20to\x20fetch\x20preceding\x20changesets','\x20request\x20is\x20already\x20active\x20for\x20','reason','51723001abtrtH','cancel','retryable','add','_reconnectAttempts','Backend\x20failed\x20to\x20load\x20the\x20Unit\x20snapshot','set','fromEntries','Backend\x20failed\x20to\x20close\x20the\x20initial\x20revision\x20gap','\x20is\x20unavailable','addEvent','bind','number','Checkpoint\x20revision\x20must\x20be\x20a\x20positive\x20safe\x20integer','Connection\x20timed\x20out','createUniver','commandService','fetched','_rejectIfNotAccepting','_memberId','precedingChangesets','commit','Snapshot\x20block\x20','invalid-revision','Failed\x20to\x20create\x20the\x20collaboration\x20runtime','wss:','No\x20active\x20Unit\x20leases','_connectPromise','1057162blCWKk'];_0x2e3a=function(){return _0x5e2b40;};return _0x2e3a();}import{CompressMutationService as _0x45cd35,ISnapshotServerService as _0x2114fe,ITransformService as _0x309abf,RevertRevisionMutation as _0x4d191d,RevisionService as _0x56a7c3,SnapshotService as _0x3e3e5b,UniverCollaborationPlugin as _0x91edc2,isTransformMutationsSuccess as _0x74ccd6,parseChangesetToProtocol as _0x54e5d7,parseMutationToProtocol as _0x4dcbdd,parseProtocolChangeset as _0xeb2c40,transformSnapshotToBaseData as _0x16c6bc,transformSnapshotToBoardData as _0x641f7a,transformSnapshotToDocumentData as _0x6ffd28,transformSnapshotToSlideData as _0x1ce93e,transformSnapshotToWorkbookData as _0x25d93a}from'@univerjs-pro/collaboration';import{FormulaCalculationSessionService as _0x3c1c2d}from'@univerjs/engine-formula';import{CmdRspCode as _0x90bf3a,CombCmd as _0x9b7859,isError as _0x1d0608}from'@univerjs/protocol';import{PersistFormulaLastValuesCommand as _0x564f99}from'@univerjs-pro/engine-formula';import{DocStateChangeManagerService as _0x27b5b6,RichTextEditingMutation as _0x21e09d}from'@univerjs/docs';import{IRenderManagerService as _0x12089b}from'@univerjs/engine-render';import{FUniver as _0x264464}from'@univerjs/core/facade';import'@univerjs-pro/bases/facade';import'@univerjs-pro/boards/facade';import'@univerjs-pro/slides/facade';import'@univerjs/docs/facade';import'@univerjs/sheets/facade';import _0x45e199 from'@oxc-project/runtime/helpers/decorateParam';import _0x5bf473 from'@oxc-project/runtime/helpers/decorate';function _0x2b76(_0x1112d3,_0x30c2cc){_0x1112d3=_0x1112d3-0x1f2;const _0x2e3ab5=_0x2e3a();let _0x2b760f=_0x2e3ab5[_0x1112d3];return _0x2b760f;}var j=class extends Error{[_0x28a351(0x236)];[_0x28a351(0x24b)];constructor(_0x407ec0,_0x2da8be,_0x183878={}){const _0x214b03=_0x28a351;super(_0x2da8be,_0x183878),this['name']='CollaborationRuntimeError',this['code']=_0x407ec0,this[_0x214b03(0x24b)]=_0x183878['retryable']??!0x1;}},se=class{[_0x28a351(0x219)];[_0x28a351(0x328)];[_0x28a351(0x21f)]=[];[_0x28a351(0x22f)]=[];[_0x28a351(0x2b0)]=0x0;constructor(_0x4a8f4b,_0x334e1f,_0x274cb1){const _0x32ddf3=_0x28a351;this['_kernel']=_0x4a8f4b,this[_0x32ddf3(0x328)]=_0x334e1f,this[_0x32ddf3(0x22f)][_0x32ddf3(0x22c)](_0x4a8f4b[_0x32ddf3(0x259)][_0x32ddf3(0x294)]((_0x4f1fd3,_0x767716)=>{const _0x55fae2=_0x32ddf3;this[_0x55fae2(0x31a)](_0x4f1fd3,_0x767716,_0x274cb1);})),_0x274cb1===_0x27cc9f[_0x32ddf3(0x30d)]&&(_0x4a8f4b[_0x32ddf3(0x336)][_0x32ddf3(0x1fc)](_0x12089b),this[_0x32ddf3(0x340)]());}get['pending'](){const _0x52d10c=_0x28a351;return this[_0x52d10c(0x21f)];}[_0x28a351(0x361)](_0x3d53e9){const _0x3d69ca=_0x28a351;return this[_0x3d69ca(0x21f)]['slice'](_0x3d53e9);}[_0x28a351(0x225)](_0x46d258){const _0x4f1af2=_0x28a351;this['_pending']['splice'](0x0,this[_0x4f1af2(0x21f)][_0x4f1af2(0x2b6)],..._0x46d258);}[_0x28a351(0x315)](){const _0x1db120=_0x28a351;return this['_pending'][_0x1db120(0x26d)](0x0);}['prependPending'](_0x362002){const _0x4fac40=_0x28a351;this[_0x4fac40(0x21f)][_0x4fac40(0x23b)](..._0x362002);}async[_0x28a351(0x278)](_0x47b19e){const _0x10f312=_0x28a351;this[_0x10f312(0x2b0)]+=0x1;try{return await _0x47b19e();}finally{--this[_0x10f312(0x2b0)];}}[_0x28a351(0x285)](){const _0x50272f=_0x28a351;for(let _0x17bfb4 of this[_0x50272f(0x22f)]['splice'](0x0))_0x17bfb4[_0x50272f(0x285)]();}['_captureCommandMutation'](_0x368e2b,_0xcc3c51,_0x45e06c){const _0x115f06=_0x28a351;if(this[_0x115f06(0x2b0)]>0x0||_0x368e2b[_0x115f06(0x273)]!==_0x56c714[_0x115f06(0x2c5)]||_0xcc3c51?.['fromCollab']||_0xcc3c51?.['fromChangeset']||_0xcc3c51?.[_0x115f06(0x323)])return;let _0x39df56=_0x368e2b['params'];if(_0x39df56?.[_0x115f06(0x35e)]!==void 0x0&&_0x39df56[_0x115f06(0x35e)]!==this[_0x115f06(0x328)]){if(_0x39df56['trigger']===_0x564f99['id'])return;throw new j('COLLABORATION_INVALID_INPUT',_0x115f06(0x346)+this[_0x115f06(0x328)]+_0x115f06(0x28c)+_0x368e2b['id']+_0x115f06(0x21b)+String(_0x39df56['unitId']));}if(_0x39df56?.[_0x115f06(0x35e)]===void 0x0||_0x45e06c===_0x27cc9f[_0x115f06(0x30d)]&&_0x368e2b['id']===_0x21e09d['id'])return;if(_0x368e2b['id']===_0x4d191d['id'])throw new j('COLLABORATION_INVALID_INPUT',_0x115f06(0x36a));let _0x3b9076=_0x368e2b,_0x2fafd8=this[_0x115f06(0x219)][_0x115f06(0x2da)][_0x115f06(0x325)][_0x115f06(0x240)]()[_0x115f06(0x2f3)],_0x1328aa=(this[_0x115f06(0x219)][_0x115f06(0x2da)][_0x115f06(0x325)]['fetchThroughInterceptors'](_0x2fafd8)([_0x3b9076],this[_0x115f06(0x219)][_0x115f06(0x216)])??[_0x3b9076])[0x0];_0x1328aa&&this[_0x115f06(0x21f)]['push'](_0x4dcbdd(_0x1328aa));}[_0x28a351(0x340)](){const _0x105ff3=_0x28a351;let _0x12a6e5=this[_0x105ff3(0x219)][_0x105ff3(0x336)][_0x105ff3(0x1fc)](_0x27b5b6)[_0x105ff3(0x30a)][_0x105ff3(0x2b5)](_0x4d8aa4=>{const _0x2ae199=_0x105ff3;if(this['_suppressionDepth']>0x0||_0x4d8aa4?.[_0x2ae199(0x35e)]!==this[_0x2ae199(0x328)])return;let _0x40644c={'id':_0x4d8aa4[_0x2ae199(0x211)],'params':{'actions':_0x4d8aa4[_0x2ae199(0x32d)][_0x2ae199(0x367)],'textRanges':null,'unitId':_0x4d8aa4[_0x2ae199(0x35e)]},'type':_0x56c714[_0x2ae199(0x2c5)]};this[_0x2ae199(0x21f)]['push'](_0x4dcbdd(_0x40644c));});this[_0x105ff3(0x22f)][_0x105ff3(0x22c)](_0x1752eb(()=>_0x12a6e5[_0x105ff3(0x2f2)]()));}},ce=new Set([_0x28a351(0x2df),_0x28a351(0x268),'formula.mutation.set-trigger-formula-calculation',_0x28a351(0x2aa),'formula.mutation.set-array-formula-data',_0x28a351(0x2de),_0x28a351(0x308)]),le=new Set([_0x28a351(0x2d0),_0x28a351(0x2e4),_0x28a351(0x343),_0x28a351(0x2be),_0x28a351(0x290),'createUniverSheet',_0x28a351(0x21e)]);function ue(_0x1915e7,_0x42067e,_0x43b00e){let _0x4abcf7=_0x264464['newAPI'](_0x1915e7);return{async 'execute'(_0x16077e,_0x3e1105){const _0x4f3531=_0x2b76;if(_0x16077e[_0x4f3531(0x2b6)]>_0x43b00e)throw new j(_0x4f3531(0x274),_0x4f3531(0x21a)+_0x43b00e+_0x4f3531(0x232));let _0xec9be3=_0x3e1105===_0x4f3531(0x2d9)?M(_0x4abcf7):void 0x0,_0x51a4a4=de(_0x4abcf7,_0x42067e);try{return await Function(_0x4f3531(0x292),_0x4f3531(0x2e0)+_0x16077e+_0x4f3531(0x1f5))(_0x51a4a4);}finally{_0xec9be3?.[_0x4f3531(0x285)]();}}};}function de(_0x268c0b,_0x37dd51){return new Proxy(_0x268c0b,{'get'(_0x4438f1,_0xaead89,_0x58aa86){const _0x3d84e8=_0x2b76;return le[_0x3d84e8(0x281)](_0xaead89)?()=>{const _0x5c8314=_0x3d84e8;throw new j('COLLABORATION_INVALID_INPUT',_0x5c8314(0x30b)+_0x37dd51+_0x5c8314(0x2ae)+String(_0xaead89));}:Reflect[_0x3d84e8(0x1fc)](_0x4438f1,_0xaead89,_0x58aa86);}});}function M(_0x1c08a6){const _0x22d95e=_0x28a351;return _0x1c08a6[_0x22d95e(0x253)](_0x1c08a6[_0x22d95e(0x2ac)][_0x22d95e(0x34a)],_0x1b88a0=>{const _0xe6e842=_0x22d95e;let _0x104d91=_0x1b88a0;if(N(_0x104d91))throw _0x104d91[_0xe6e842(0x24a)]=!0x0,new j('COLLABORATION_INVALID_INPUT','Read\x20execution\x20cannot\x20run\x20persistable\x20action\x20'+_0x104d91['id']);});}function N(_0x5452af){const _0x1449dc=_0x28a351;return _0x5452af['type']===_0x56c714[_0x1449dc(0x360)]||_0x5452af['type']===_0x56c714[_0x1449dc(0x2c5)]&&!ce[_0x1449dc(0x281)](_0x5452af['id']);}function P(_0xac4d7c){const _0x1a5a25=_0x28a351;if(_0xac4d7c===void 0x0)return null;if(_0xac4d7c===null||typeof _0xac4d7c==_0x1a5a25(0x20a)||typeof _0xac4d7c==_0x1a5a25(0x30c))return _0xac4d7c;if(typeof _0xac4d7c==_0x1a5a25(0x255)){if(Number[_0x1a5a25(0x356)](_0xac4d7c))return _0xac4d7c;throw I();}if(Array[_0x1a5a25(0x2a5)](_0xac4d7c))return _0xac4d7c[_0x1a5a25(0x366)](P);if(F(_0xac4d7c))return Object[_0x1a5a25(0x250)](Object[_0x1a5a25(0x2dd)](_0xac4d7c)['map'](([_0x57b0cd,_0x43d133])=>[_0x57b0cd,P(_0x43d133)]));throw I();}function F(_0x354545){const _0x18bcb8=_0x28a351;if(typeof _0x354545!=_0x18bcb8(0x2e1)||!_0x354545)return!0x1;let _0x2708b3=Object[_0x18bcb8(0x20d)](_0x354545);return _0x2708b3===Object[_0x18bcb8(0x2eb)]||_0x2708b3===null;}function I(){const _0x5172ee=_0x28a351;return new j(_0x5172ee(0x274),_0x5172ee(0x295));}var L=class{[_0x28a351(0x289)]=Promise[_0x28a351(0x208)]();[_0x28a351(0x350)](_0x2f9385){const _0x346e99=_0x28a351;let _0x113bc6=this['_tail'][_0x346e99(0x201)](_0x2f9385,_0x2f9385);return this[_0x346e99(0x289)]=_0x113bc6[_0x346e99(0x201)](()=>void 0x0,()=>void 0x0),_0x113bc6;}};function R(_0x1cb8e0,_0x4f5031,_0x1b1f15,_0x3610a8){const _0x68132f=_0x28a351;if(!Array[_0x68132f(0x2a5)](_0x1cb8e0))throw new j('COLLABORATION_PROTOCOL_ERROR',_0x68132f(0x1fb));let _0x3f21d5=[..._0x1cb8e0][_0x68132f(0x2ec)]((_0x2ccca9,_0x419e5a)=>_0x2ccca9[_0x68132f(0x21c)]-_0x419e5a[_0x68132f(0x21c)]),_0x4a7bc7=_0x3610a8;for(let _0x5567a5 of _0x3f21d5){if(!_0x5567a5||typeof _0x5567a5!=_0x68132f(0x2e1)||!Array[_0x68132f(0x2a5)](_0x5567a5[_0x68132f(0x27d)])||_0x5567a5[_0x68132f(0x27d)]['some'](_0x5cbbe7=>!_0x5cbbe7||typeof _0x5cbbe7!=_0x68132f(0x2e1)||!('id'in _0x5cbbe7)||typeof _0x5cbbe7['id']!=_0x68132f(0x30c)||!('data'in _0x5cbbe7)||typeof _0x5cbbe7[_0x68132f(0x2ca)]!=_0x68132f(0x30c))||!Number[_0x68132f(0x34c)](_0x5567a5[_0x68132f(0x22a)])||!Number[_0x68132f(0x34c)](_0x5567a5[_0x68132f(0x21c)])||_0x5567a5[_0x68132f(0x202)]!==_0x4f5031||_0x5567a5['type']!==_0x1b1f15||_0x5567a5['baseRev']!==_0x4a7bc7||_0x5567a5['revision']!==_0x4a7bc7+0x1)throw new j(_0x68132f(0x339),_0x68132f(0x311));_0x4a7bc7=_0x5567a5[_0x68132f(0x21c)];}return _0x3f21d5;}function z(_0x4a608a){const _0x4236eb=_0x28a351;return{'baseRevision':_0x4a608a[_0x4236eb(0x22a)],'mutationCount':_0x4a608a[_0x4236eb(0x27d)][_0x4236eb(0x2b6)],'revision':_0x4a608a[_0x4236eb(0x21c)],..._0x4a608a[_0x4236eb(0x333)]===void 0x0?{}:{'sid':_0x4a608a[_0x4236eb(0x333)]},..._0x4a608a[_0x4236eb(0x347)]===void 0x0?{}:{'reqId':_0x4a608a[_0x4236eb(0x347)]}};}function B(_0x395568,_0x336574,_0x20b82c,_0x428633,_0x583445,_0x340c29='initial'){const _0x3b505c=_0x28a351;if(_0x583445[_0x3b505c(0x2e3)](_0x40cb7c=>_0x40cb7c[_0x3b505c(0x27d)]['some'](_0x2a8d81=>_0x2a8d81['id']===_0x4d191d['id'])))throw new j('COLLABORATION_PROTOCOL_ERROR',_0x3b505c(0x2db));let _0xf0b43e=_0x428633;for(let _0x23a24f of _0x583445){let _0xfdbcd0=_0xf0b43e+0x1;if(_0x23a24f['unitID']!==_0x336574||_0x23a24f['type']!==_0x20b82c||_0x23a24f['baseRev']!==_0xf0b43e||_0x23a24f['revision']!==_0xfdbcd0)throw new j(_0x3b505c(0x339),_0x3b505c(0x243));let _0x3dd3e4=_0xeb2c40(_0x23a24f),_0x52a5e5=_0x395568['compressMutationService'][_0x3b505c(0x325)][_0x3b505c(0x240)]()[_0x3b505c(0x322)],_0x4caeef=_0x395568[_0x3b505c(0x2da)][_0x3b505c(0x325)][_0x3b505c(0x2a9)](_0x52a5e5)(_0x3dd3e4['mutations'],null)??_0x3dd3e4['mutations'],_0xfd54f0=_0x2648cd(_0x4caeef,_0x395568[_0x3b505c(0x259)],_0x340c29==='initial'?{'fromChangeset':!0x0}:{'fromCollab':!0x0});if(!_0xfd54f0[_0x3b505c(0x2c8)])throw new j(_0x3b505c(0x33c),_0x3b505c(0x21d)+_0xfd54f0[_0x3b505c(0x2a7)]+':\x20'+String(_0xfd54f0['error']));let _0x3e306c=_0x395568[_0x3b505c(0x2d4)]['incrementRevOfUnit'](_0x336574);if(_0x3e306c!==_0xfdbcd0)throw new j(_0x3b505c(0x339),_0x3b505c(0x33b));_0xf0b43e=_0x3e306c;}return _0xf0b43e;}function V(_0x5adeb2,_0x5e6682,_0x4bf1d9){const _0x25595d=_0x28a351;let _0x5a13e0=_0x264464['newAPI'](_0x5adeb2);switch(_0x4bf1d9){case _0x27cc9f[_0x25595d(0x34d)]:return H(_0x5a13e0['getWorkbook'](_0x5e6682)?.[_0x25595d(0x26b)](),_0x5e6682);case _0x27cc9f[_0x25595d(0x30d)]:return H(_0x5a13e0[_0x25595d(0x2ee)](_0x5e6682)?.[_0x25595d(0x26b)](),_0x5e6682);case _0x27cc9f['UNIVER_SLIDE']:return H(_0x5a13e0[_0x25595d(0x229)](_0x5e6682)?.[_0x25595d(0x26b)](),_0x5e6682);case _0x27cc9f[_0x25595d(0x314)]:return H(_0x5a13e0[_0x25595d(0x341)](_0x5e6682)?.[_0x25595d(0x26b)](),_0x5e6682);case _0x27cc9f[_0x25595d(0x287)]:return H(_0x5a13e0[_0x25595d(0x29d)](_0x5e6682)?.['save'](),_0x5e6682);default:throw new j(_0x25595d(0x274),_0x25595d(0x329)+_0x4bf1d9);}}function H(_0x2a263f,_0x3722ad){const _0x2bb8c5=_0x28a351;if(_0x2a263f===void 0x0)throw new j(_0x2bb8c5(0x33c),_0x2bb8c5(0x31c)+_0x3722ad+_0x2bb8c5(0x252));return structuredClone(_0x2a263f);}var fe=class{['unitId'];['unitType'];[_0x28a351(0x2fe)];[_0x28a351(0x1f6)];[_0x28a351(0x1f7)];[_0x28a351(0x219)];['_closePromise'];['_acceptingOperations']=!0x0;['_closed']=!0x1;[_0x28a351(0x2a6)];[_0x28a351(0x30f)];['_operations']=new L();[_0x28a351(0x320)]=[];['_knownHeadRevision'];[_0x28a351(0x231)]=null;['_awaiting']=null;[_0x28a351(0x368)]=crypto[_0x28a351(0x283)]();[_0x28a351(0x29b)]=0x1;constructor(_0x3e265a,_0x5d5ace,_0x358dd3,_0x1f263f,_0x3d5bc4,_0x514476,_0x1a5140){const _0x41ac87=_0x28a351;this[_0x41ac87(0x35e)]=_0x3e265a,this[_0x41ac87(0x214)]=_0x5d5ace,this['_baseRevision']=_0x358dd3,this['_handle']=_0x1f263f,this[_0x41ac87(0x1f7)]=_0x3d5bc4,this[_0x41ac87(0x219)]=_0x514476,this[_0x41ac87(0x245)]=_0x358dd3,this[_0x41ac87(0x2a6)]=new se(_0x514476,_0x3e265a,_0x5d5ace),this[_0x41ac87(0x30f)]=ue(_0x3d5bc4,_0x3e265a,_0x1a5140);}[_0x28a351(0x35a)](){const _0x422229=_0x28a351;return{'awaitingChangeset':this[_0x422229(0x27c)]===null?null:U(this[_0x422229(0x27c)]),'baseRevision':this[_0x422229(0x2fe)],'bufferedChangesetCount':this['_bufferedChangesets'][_0x422229(0x2b6)],'conflict':this[_0x422229(0x231)],'connection':this[_0x422229(0x31b)]?_0x422229(0x271):this['_handle'][_0x422229(0x22d)](),'knownHeadRevision':this['_knownHeadRevision'],'pendingMutationCount':this[_0x422229(0x2a6)]['pending'][_0x422229(0x2b6)]};}['getPendingMutations'](){const _0x3cfb81=_0x28a351;return structuredClone(this['_capture'][_0x3cfb81(0x2a3)]);}[_0x28a351(0x334)](){const _0x1175d8=_0x28a351;return this[_0x1175d8(0x25b)]()||this[_0x1175d8(0x34e)][_0x1175d8(0x350)](async()=>(this[_0x1175d8(0x23f)](_0x1175d8(0x334)),await this['_fetchChangesets']()));}['pull'](){const _0x47c47b=_0x28a351;return this[_0x47c47b(0x25b)]()||this[_0x47c47b(0x34e)][_0x47c47b(0x350)](async()=>{const _0x45d567=_0x47c47b;if(this[_0x45d567(0x23f)](_0x45d567(0x2d8)),await this[_0x45d567(0x230)](),this[_0x45d567(0x320)][_0x45d567(0x2b6)]===0x0)return{'state':this[_0x45d567(0x35a)](),'status':_0x45d567(0x28b)};let _0x24bba0=[...this[_0x45d567(0x320)]];if(_0x24bba0['some'](_0x337cd4=>_0x337cd4[_0x45d567(0x27d)][_0x45d567(0x2e3)](_0x941a5c=>_0x941a5c['id']===_0x4d191d['id'])))throw new j(_0x45d567(0x339),_0x45d567(0x2ef));let _0x267a96=this['_baseRevision'],_0x4fbefd=this[_0x45d567(0x27c)]?W(this[_0x45d567(0x27c)]['mutations'],this[_0x45d567(0x35e)],this[_0x45d567(0x214)],this['_baseRevision']):null,_0x51a6e6=_0xeb2c40({'baseRev':this[_0x45d567(0x2fe)],'memberID':'','mutations':[...this['_capture']['pending']],'revision':0x0,'type':this['unitType'],'unitID':this['unitId'],'userID':''})[_0x45d567(0x27d)],_0x1f61ac=[];for(let _0x247bad of _0x24bba0){let _0x2cb592=_0xeb2c40(_0x247bad);if(this[_0x45d567(0x27c)]!==null&&_0x247bad['sid']===this[_0x45d567(0x27c)][_0x45d567(0x333)]&&_0x247bad[_0x45d567(0x347)]===this[_0x45d567(0x27c)][_0x45d567(0x347)]){let _0x1792c3=(_0x4fbefd??[])[_0x45d567(0x366)](_0x4dcbdd);G(_0x247bad[_0x45d567(0x27d)],_0x1792c3)||await this['_closeAfterFatalError'](new j('COLLABORATION_PROTOCOL_ERROR',_0x45d567(0x301))),_0x1f61ac[_0x45d567(0x22c)]({'changeset':_0x247bad,'kind':_0x45d567(0x28a)}),_0x4fbefd=null;continue;}let _0x3bd524=_0x2cb592['mutations'];if(_0x4fbefd!==null){let _0x5397ac=this[_0x45d567(0x219)][_0x45d567(0x363)][_0x45d567(0x1f8)](_0x3bd524,_0x4fbefd,!0x1);if(!_0x74ccd6(_0x5397ac))return this[_0x45d567(0x231)]={'message':_0x5397ac[_0x45d567(0x32b)][_0x45d567(0x239)],'operation':'pull','reason':_0x45d567(0x331)},{'conflict':this['_conflict'],'state':this['getState'](),'status':_0x45d567(0x338)};_0x3bd524=_0x5397ac[_0x45d567(0x35f)],_0x4fbefd=_0x5397ac[_0x45d567(0x27a)];}let _0x2a85d3=this[_0x45d567(0x219)][_0x45d567(0x363)][_0x45d567(0x1f8)](_0x3bd524,_0x51a6e6,!0x1);if(!_0x74ccd6(_0x2a85d3))return this['_conflict']={'message':_0x2a85d3[_0x45d567(0x32b)][_0x45d567(0x239)],'operation':_0x45d567(0x2d8),'reason':_0x45d567(0x331)},{'conflict':this[_0x45d567(0x231)],'state':this[_0x45d567(0x35a)](),'status':'conflict'};_0x1f61ac['push']({'changeset':_0x54e5d7({..._0x2cb592,'mutations':_0x2a85d3['m1Prime']}),'kind':'remote'}),_0x51a6e6=_0x2a85d3['m2Prime'];}let _0x3443cb=_0x267a96;for(let _0x3a28a5 of _0x1f61ac){if(_0x3a28a5[_0x45d567(0x2b9)]==='awaiting-ack'){let _0x511c4f=this[_0x45d567(0x219)][_0x45d567(0x2d4)][_0x45d567(0x2e9)](this[_0x45d567(0x35e)]);_0x511c4f!==_0x3a28a5[_0x45d567(0x20e)][_0x45d567(0x21c)]&&await this[_0x45d567(0x267)](new j('COLLABORATION_PROTOCOL_ERROR',_0x45d567(0x2c2))),_0x3443cb=_0x511c4f;continue;}_0x3443cb=await this['_replayRemoteChangesets'](_0x3443cb,[_0x3a28a5[_0x45d567(0x20e)]]);}return this['_capture'][_0x45d567(0x225)](_0x51a6e6[_0x45d567(0x366)](_0x4dcbdd)),this[_0x45d567(0x27c)]!==null&&(this['_awaiting']=_0x4fbefd===null?null:{...this[_0x45d567(0x27c)],'baseRev':_0x3443cb,'mutations':_0x4fbefd[_0x45d567(0x366)](_0x4dcbdd)}),this[_0x45d567(0x2fe)]=_0x3443cb,this['_bufferedChangesets'][_0x45d567(0x26d)](0x0),{'appliedChangesets':_0x24bba0[_0x45d567(0x366)](z),'fromRevision':_0x267a96,'state':this[_0x45d567(0x35a)](),'status':'pulled','toRevision':_0x3443cb,'transformedPendingMutationCount':_0x51a6e6['length']};});}['commit'](){const _0x2b06f5=_0x28a351;return this[_0x2b06f5(0x25b)]()||this[_0x2b06f5(0x34e)]['run'](async()=>{const _0x42fd70=_0x2b06f5;this[_0x42fd70(0x23f)](_0x42fd70(0x25e));let _0x5d1868=[],_0x1c8e11=[];if(this[_0x42fd70(0x27c)]===null){if(this['_capture']['pending'][_0x42fd70(0x2b6)]===0x0)return{'state':this[_0x42fd70(0x35a)](),'status':_0x42fd70(0x32a)};if(await this[_0x42fd70(0x230)](),this['_bufferedChangesets']['length']>0x0)return{'baseRevision':this[_0x42fd70(0x2fe)],'confirmedChangesets':_0x5d1868,'knownHeadRevision':this[_0x42fd70(0x245)],'state':this[_0x42fd70(0x35a)](),'status':_0x42fd70(0x335)};this[_0x42fd70(0x351)]();}for(;this[_0x42fd70(0x27c)]!==null;){let _0x52b2c9=this[_0x42fd70(0x27c)],_0x167703;try{_0x167703=await this[_0x42fd70(0x1f6)][_0x42fd70(0x212)](_0x52b2c9);}catch{return{'changeset':U(_0x52b2c9),'confirmedChangesets':_0x5d1868,'state':this[_0x42fd70(0x35a)](),'status':'unknown'};}if(_0x167703[_0x42fd70(0x27f)]===_0x42fd70(0x228)||_0x167703[_0x42fd70(0x27f)]==='unknown')return{'changeset':U(_0x52b2c9),'confirmedChangesets':_0x5d1868,'state':this[_0x42fd70(0x35a)](),'status':_0x167703[_0x42fd70(0x27f)]};if(_0x167703[_0x42fd70(0x27f)]===_0x42fd70(0x2f6))return _0x167703['reason']===_0x42fd70(0x260)?(this['_capture'][_0x42fd70(0x2d2)](_0x52b2c9['mutations']),this[_0x42fd70(0x27c)]=null,await this['_fetchChangesets'](),{'baseRevision':this[_0x42fd70(0x2fe)],'confirmedChangesets':_0x5d1868,'knownHeadRevision':this[_0x42fd70(0x245)],'state':this[_0x42fd70(0x35a)](),'status':_0x42fd70(0x335)}):(this[_0x42fd70(0x231)]={'message':_0x167703[_0x42fd70(0x239)],'operation':_0x42fd70(0x25e),'reason':_0x167703['reason']===_0x42fd70(0x275)?_0x42fd70(0x2d6):_0x42fd70(0x354)},{'conflict':this[_0x42fd70(0x231)],'confirmedChangesets':_0x5d1868,'state':this[_0x42fd70(0x35a)](),'status':_0x42fd70(0x338)});let _0x40d47f=_0x167703[_0x42fd70(0x27e)];try{this[_0x42fd70(0x303)](_0x52b2c9,_0x167703[_0x42fd70(0x25d)],_0x40d47f);}catch(_0x251dd1){await this[_0x42fd70(0x267)](_0x251dd1);}let _0x2243c4=_0x52b2c9['mutations'];if(_0x167703[_0x42fd70(0x25d)][_0x42fd70(0x2b6)]>0x0){let _0x300fb1=await this[_0x42fd70(0x22b)](_0x52b2c9,_0x167703[_0x42fd70(0x25d)]);if(_0x300fb1===null)return{'conflict':this[_0x42fd70(0x231)],'confirmedChangesets':_0x5d1868,'state':this[_0x42fd70(0x35a)](),'status':_0x42fd70(0x338)};_0x2243c4=_0x300fb1[_0x42fd70(0x1fe)];try{this[_0x42fd70(0x355)](_0x167703['precedingChangesets']);}catch(_0x19872a){await this['_closeAfterFatalError'](_0x19872a);}_0x1c8e11[_0x42fd70(0x22c)](..._0x167703[_0x42fd70(0x25d)][_0x42fd70(0x366)](z));}G(_0x40d47f['mutations'],_0x2243c4)||await this['_closeAfterFatalError'](new j(_0x42fd70(0x339),'Backend\x20returned\x20an\x20ACK\x20whose\x20mutations\x20do\x20not\x20match\x20the\x20submitted\x20changeset'));let _0xb231fa=this[_0x42fd70(0x219)][_0x42fd70(0x2d4)]['incrementRevOfUnit'](this[_0x42fd70(0x35e)]);if(_0xb231fa!==_0x40d47f[_0x42fd70(0x21c)]&&await this['_closeAfterFatalError'](new j(_0x42fd70(0x339),_0x42fd70(0x233))),this[_0x42fd70(0x2fe)]=_0xb231fa,this[_0x42fd70(0x245)]=Math['max'](this[_0x42fd70(0x245)],_0xb231fa),this[_0x42fd70(0x27c)]=null,_0x5d1868[_0x42fd70(0x22c)](z(_0x40d47f)),this[_0x42fd70(0x2a6)][_0x42fd70(0x2a3)][_0x42fd70(0x2b6)]===0x0)break;this['_createAwaitingFromPending']();}return{'confirmedChangesets':_0x5d1868,'reconciledChangesets':_0x1c8e11,'state':this[_0x42fd70(0x35a)](),'status':'confirmed'};});}async['_fetchChangesets'](){const _0x2d2a16=_0x28a351;let _0x511128=this[_0x2d2a16(0x245)],_0x5bf891=await this[_0x2d2a16(0x1f6)][_0x2d2a16(0x2f4)](_0x511128,void 0x0);if(_0x1d0608(_0x5bf891['error'])){let _0x44dc50=_0x5bf891[_0x2d2a16(0x32b)];throw new j(_0x2d2a16(0x215),_0x44dc50?.[_0x2d2a16(0x239)]||'Backend\x20failed\x20to\x20fetch\x20changesets',{'retryable':!0x0});}let _0x2f17ac=R(_0x5bf891[_0x2d2a16(0x2ad)],this[_0x2d2a16(0x35e)],this[_0x2d2a16(0x214)],_0x511128),_0x4a101d=_0x2f17ac['at'](-0x1)?.['revision']??_0x511128;if(_0x5bf891[_0x2d2a16(0x279)]!==void 0x0&&_0x5bf891['latestRevision']!==_0x4a101d)throw new j(_0x2d2a16(0x339),_0x2d2a16(0x20c));return _0x2f17ac[_0x2d2a16(0x2b6)]===0x0?{'knownHeadRevision':this[_0x2d2a16(0x245)],'state':this[_0x2d2a16(0x35a)](),'status':_0x2d2a16(0x2fa)}:(this['_bufferedChangesets'][_0x2d2a16(0x22c)](..._0x2f17ac),this['_knownHeadRevision']=_0x4a101d,{'changesets':_0x2f17ac[_0x2d2a16(0x366)](z),'fromRevision':_0x511128,'state':this[_0x2d2a16(0x35a)](),'status':_0x2d2a16(0x25a),'toRevision':_0x4a101d});}[_0x28a351(0x351)](){const _0x11d735=_0x28a351;let _0x255a8b=this[_0x11d735(0x2a6)][_0x11d735(0x315)]();this[_0x11d735(0x27c)]={'baseRev':this[_0x11d735(0x2fe)],'mutations':_0x255a8b,'reqId':this[_0x11d735(0x29b)],'sid':this['_sid']},this[_0x11d735(0x29b)]+=0x1;}[_0x28a351(0x303)](_0x28bbed,_0x2c16ff,_0x22c075){const _0x16861d=_0x28a351;let _0x15f185=R(_0x2c16ff,this[_0x16861d(0x35e)],this[_0x16861d(0x214)],this[_0x16861d(0x2fe)])['at'](-0x1)?.[_0x16861d(0x21c)]??this['_baseRevision'];if(_0x22c075[_0x16861d(0x202)]!==this[_0x16861d(0x35e)]||_0x22c075[_0x16861d(0x273)]!==this[_0x16861d(0x214)]||_0x22c075[_0x16861d(0x333)]!==_0x28bbed[_0x16861d(0x333)]||_0x22c075[_0x16861d(0x347)]!==_0x28bbed[_0x16861d(0x347)]||_0x22c075[_0x16861d(0x22a)]!==_0x15f185||_0x22c075[_0x16861d(0x21c)]!==_0x15f185+0x1)throw new j(_0x16861d(0x339),'Backend\x20returned\x20an\x20ACK\x20that\x20does\x20not\x20match\x20the\x20submitted\x20changeset');}async['_reconcilePrecedingChangesets'](_0x1f7a18,_0x2e683e){const _0x462844=_0x28a351;let _0x49bd9a=W(_0x1f7a18[_0x462844(0x27d)],this[_0x462844(0x35e)],this[_0x462844(0x214)],this[_0x462844(0x2fe)]),_0x8b8565=W(this[_0x462844(0x2a6)][_0x462844(0x2a3)],this[_0x462844(0x35e)],this[_0x462844(0x214)],this[_0x462844(0x2fe)]),_0xa56e9e=[];for(let _0x46eda8 of _0x2e683e){let _0x1787d7=_0xeb2c40(_0x46eda8),_0xabebbe=this[_0x462844(0x219)][_0x462844(0x363)][_0x462844(0x1f8)](_0x1787d7[_0x462844(0x27d)],_0x49bd9a,!0x1);if(!_0x74ccd6(_0xabebbe))return this[_0x462844(0x26f)](_0x462844(0x25e),_0xabebbe[_0x462844(0x32b)]),null;_0x49bd9a=_0xabebbe['m2Prime'];let _0x1223f6=this['_kernel'][_0x462844(0x363)][_0x462844(0x1f8)](_0xabebbe[_0x462844(0x35f)],_0x8b8565,!0x1);if(!_0x74ccd6(_0x1223f6))return this['_setTransformConflict'](_0x462844(0x25e),_0x1223f6['error']),null;_0x8b8565=_0x1223f6[_0x462844(0x27a)],_0xa56e9e['push'](_0x54e5d7({..._0x1787d7,'mutations':_0x1223f6[_0x462844(0x35f)]}));}let _0x57149a=await this['_replayRemoteChangesets'](this['_baseRevision'],_0xa56e9e);return this['_capture'][_0x462844(0x225)](_0x8b8565[_0x462844(0x366)](_0x4dcbdd)),this[_0x462844(0x2fe)]=_0x57149a,{'awaitingMutations':_0x49bd9a[_0x462844(0x366)](_0x4dcbdd),'revision':_0x57149a};}[_0x28a351(0x26f)](_0x40f67e,_0x2eb99b){const _0xcf3eda=_0x28a351;this[_0xcf3eda(0x231)]={'message':_0x2eb99b[_0xcf3eda(0x239)],'operation':_0x40f67e,'reason':_0xcf3eda(0x331)};}async[_0x28a351(0x2cf)](_0x143a39,_0x3838c1){const _0xdb1c06=_0x28a351;try{return await this['_capture'][_0xdb1c06(0x278)](async()=>B(this['_kernel'],this[_0xdb1c06(0x35e)],this['unitType'],_0x143a39,_0x3838c1,_0xdb1c06(0x203)));}catch(_0x5ad12b){return await this['_closeAfterFatalError'](_0x5ad12b);}}async[_0x28a351(0x267)](_0x103bab){const _0x48e56f=_0x28a351;this['_acceptingOperations']=!0x1,this[_0x48e56f(0x2ff)]??=this[_0x48e56f(0x2fc)]();try{await this[_0x48e56f(0x2ff)];}catch{}throw _0x103bab;}['_consumeBufferedPrecedingChangesets'](_0x1337fa){const _0x310270=_0x28a351;let _0x412ada=_0x1337fa['at'](-0x1)?.[_0x310270(0x21c)];if(_0x412ada===void 0x0||this['_bufferedChangesets'][_0x310270(0x2b6)]===0x0)return;let _0x2dde5a=this['_bufferedChangesets'][_0x310270(0x2b1)](({revision:_0x2f3144})=>_0x2f3144>_0x412ada),_0x10bd1f=this[_0x310270(0x320)][_0x310270(0x29c)](0x0,_0x2dde5a===-0x1?this[_0x310270(0x320)][_0x310270(0x2b6)]:_0x2dde5a);for(let _0x49bf1e of _0x10bd1f){let _0x4587aa=_0x1337fa[_0x310270(0x318)](({revision:_0x757a0e})=>_0x757a0e===_0x49bf1e['revision']);if(!_0x4587aa||!pe(_0x49bf1e,_0x4587aa))throw new j(_0x310270(0x339),_0x310270(0x2af));}this[_0x310270(0x320)]['splice'](0x0,_0x10bd1f['length']);}[_0x28a351(0x330)](_0x297624){const _0x19e756=_0x28a351;return this[_0x19e756(0x25b)]()||this[_0x19e756(0x34e)][_0x19e756(0x350)](async()=>{const _0x57c968=_0x19e756;_0x297624[_0x57c968(0x244)]===_0x57c968(0x2e2)&&this['_assertMutableState'](_0x57c968(0x2e2));let _0x50cbaf=this[_0x57c968(0x2a6)][_0x57c968(0x2a3)][_0x57c968(0x2b6)],_0x506fc1=P(await this[_0x57c968(0x30f)][_0x57c968(0x330)](_0x297624['code'],_0x297624['mode']));return _0x297624['mode']===_0x57c968(0x2d9)?{'state':this['getState'](),'value':_0x506fc1}:{'mutations':this['_capture'][_0x57c968(0x361)](_0x50cbaf),'state':this[_0x57c968(0x35a)](),'value':_0x506fc1};});}[_0x28a351(0x235)](_0x379ece){const _0x2cf981=_0x28a351;return this['_rejectIfNotAccepting']()||this[_0x2cf981(0x34e)]['run'](async()=>{const _0x98aa00=_0x2cf981;if(this[_0x98aa00(0x23f)]('replace\x20mutations'),this[_0x98aa00(0x27c)]!==null)throw new j(_0x98aa00(0x274),_0x98aa00(0x352));let _0x4b2b1d=me(_0x379ece),_0x58d3b5=[...this['_capture'][_0x98aa00(0x2a3)]];this[_0x98aa00(0x2a6)]['replacePending'](_0x4b2b1d);let _0x1a4250=this['getState']();return{'pendingMutationCount':_0x4b2b1d[_0x98aa00(0x2b6)],'previousMutationCount':_0x58d3b5[_0x98aa00(0x2b6)],'state':_0x1a4250};});}[_0x28a351(0x33f)](){const _0xdf58cb=_0x28a351;return this[_0xdf58cb(0x25b)]()||this[_0xdf58cb(0x34e)][_0xdf58cb(0x350)](async()=>V(this['_univer'],this[_0xdf58cb(0x35e)],this[_0xdf58cb(0x214)]));}[_0x28a351(0x2f7)](){const _0x25bb3c=_0x28a351;return this['_closePromise']?this[_0x25bb3c(0x2ff)]:(this['_acceptingOperations']=!0x1,this[_0x25bb3c(0x2ff)]=this[_0x25bb3c(0x34e)][_0x25bb3c(0x350)](async()=>await this[_0x25bb3c(0x2fc)]()),this[_0x25bb3c(0x2ff)]);}async[_0x28a351(0x2fc)](){const _0x4903ad=_0x28a351;try{this['_capture'][_0x4903ad(0x285)](),await this[_0x4903ad(0x1f6)][_0x4903ad(0x2f7)]();}finally{try{this[_0x4903ad(0x1f7)][_0x4903ad(0x285)]();}finally{this[_0x4903ad(0x31b)]=!0x0;}}}['_rejectIfNotAccepting'](){const _0x42f481=_0x28a351;return this['_acceptingOperations']?null:Promise[_0x42f481(0x298)](new j(_0x42f481(0x293),'Collaboration\x20runtime\x20is\x20closing\x20or\x20closed'));}['_assertMutableState'](_0x27d61d){const _0x39eccb=_0x28a351;if(this[_0x39eccb(0x231)]!==null)throw new j(_0x39eccb(0x274),'Cannot\x20'+_0x27d61d+_0x39eccb(0x1f3));}};function U(_0xbee2d0){const _0x3f0cc6=_0x28a351;return{'baseRevision':_0xbee2d0[_0x3f0cc6(0x22a)],'mutationCount':_0xbee2d0[_0x3f0cc6(0x27d)][_0x3f0cc6(0x2b6)],'reqId':_0xbee2d0[_0x3f0cc6(0x347)],'revision':0x0,'sid':_0xbee2d0[_0x3f0cc6(0x333)]};}function W(_0xbd5e4a,_0x356f1c,_0x1ea63d,_0x224d85){const _0x5cf181=_0x28a351;return _0xeb2c40({'baseRev':_0x224d85,'memberID':'','mutations':[..._0xbd5e4a],'revision':0x0,'type':_0x1ea63d,'unitID':_0x356f1c,'userID':''})[_0x5cf181(0x27d)];}function pe(_0xd65412,_0x545986){const _0x15d709=_0x28a351;return _0xd65412[_0x15d709(0x202)]===_0x545986[_0x15d709(0x202)]&&_0xd65412[_0x15d709(0x273)]===_0x545986[_0x15d709(0x273)]&&_0xd65412['baseRev']===_0x545986['baseRev']&&_0xd65412[_0x15d709(0x21c)]===_0x545986['revision']&&_0xd65412['sid']===_0x545986[_0x15d709(0x333)]&&_0xd65412[_0x15d709(0x347)]===_0x545986[_0x15d709(0x347)]&&JSON['stringify'](_0xd65412[_0x15d709(0x27d)])===JSON[_0x15d709(0x326)](_0x545986[_0x15d709(0x27d)]);}function G(_0x1383ec,_0x48bed1){const _0x38c23a=_0x28a351;return _0x1383ec[_0x38c23a(0x2b6)]===_0x48bed1[_0x38c23a(0x2b6)]&&_0x1383ec['every']((_0x51f9fc,_0x155f3d)=>_0x51f9fc['id']===_0x48bed1[_0x155f3d]?.['id']&&_0x51f9fc[_0x38c23a(0x2ca)]===_0x48bed1[_0x155f3d]?.[_0x38c23a(0x2ca)]);}function me(_0x11aa9f){const _0xb54418=_0x28a351;if(!Array['isArray'](_0x11aa9f))throw new j(_0xb54418(0x274),'Replacement\x20mutations\x20must\x20be\x20an\x20array');return _0x11aa9f[_0xb54418(0x366)](_0x193497=>{const _0x1763b5=_0xb54418;if(!_0x193497||typeof _0x193497!='object'||typeof _0x193497['id']!='string'||_0x193497['id'][_0x1763b5(0x2b6)]===0x0||typeof _0x193497['data']!=_0x1763b5(0x30c))throw new j(_0x1763b5(0x274),'Replacement\x20mutations\x20must\x20contain\x20non-empty\x20id\x20and\x20string\x20data\x20fields');return{'data':_0x193497[_0x1763b5(0x2ca)],'id':_0x193497['id']};});}var K=class extends _0x45c71a{['_config'];[_0x28a351(0x2bb)];static ['pluginName']=_0x28a351(0x309);constructor(_0x13c6e7,_0x43e55a){const _0x2e6442=_0x28a351;super(),this[_0x2e6442(0x2d1)]=_0x13c6e7,this['_injector']=_0x43e55a;}[_0x28a351(0x348)](){const _0x1e7867=_0x28a351;this['_config'][_0x1e7867(0x296)]!==void 0x0&&_0x9caa23(this[_0x1e7867(0x2bb)],[[_0x2114fe,{'useValue':this[_0x1e7867(0x2d1)]['snapshotServerService']}]]),this[_0x1e7867(0x2d1)][_0x1e7867(0x348)]({'commandService':this[_0x1e7867(0x2bb)]['get'](_0x24a215),'compressMutationService':this['_injector'][_0x1e7867(0x1fc)](_0x45cd35),'instanceService':this[_0x1e7867(0x2bb)][_0x1e7867(0x1fc)](_0x4f82f9),'injector':this[_0x1e7867(0x2bb)],'revisionService':this[_0x1e7867(0x2bb)][_0x1e7867(0x1fc)](_0x56a7c3),'transformService':this[_0x1e7867(0x2bb)][_0x1e7867(0x1fc)](_0x309abf)});}};K=_0x5bf473([_0x47e19f(_0x91edc2),_0x45e199(0x1,_0x407b4d(_0x419b26))],K);function he(_0xf07488,_0x1ca6da){const _0x1260ac=_0x28a351;let _0x409ce4;if(_0xf07488[_0x1260ac(0x2bc)](K,{'onStarting'(_0xc544d5){_0x409ce4=_0xc544d5;},..._0x1ca6da===void 0x0?{}:{'snapshotServerService':_0x1ca6da}}),!_0x409ce4)throw Error('Manual\x20collaboration\x20plugin\x20did\x20not\x20reach\x20the\x20Starting\x20lifecycle');return _0x409ce4;}async function ge(_0x1adf9b,_0x2a4472,_0xe24771){const _0x53f509=_0x28a351;let _0x2cabd7=await _0x1adf9b['getUnitOnRev'](0x0);if(_0x1d0608(_0x2cabd7[_0x53f509(0x32b)])){let _0x18f087=_0x2cabd7[_0x53f509(0x32b)];throw new j('COLLABORATION_LOAD_FAILED',_0x18f087?.[_0x53f509(0x239)]||_0x53f509(0x24e));}let _0x42f6b7=_0x2cabd7['snapshot'];if(!_0x42f6b7)throw new j(_0x53f509(0x33c),_0x53f509(0x22e));_e(_0x42f6b7,_0x2a4472,_0xe24771);try{switch(_0xe24771){case _0x27cc9f['UNIVER_SHEET']:return{'changesets':_0x2cabd7[_0x53f509(0x2ad)],'unitData':await _0x25d93a(_0x42f6b7,await q(_0x1adf9b,_0x42f6b7)),'unitType':_0xe24771};case _0x27cc9f[_0x53f509(0x30d)]:return{'changesets':_0x2cabd7[_0x53f509(0x2ad)],'unitData':_0x6ffd28(_0x42f6b7),'unitType':_0xe24771};case _0x27cc9f[_0x53f509(0x27b)]:return{'changesets':_0x2cabd7[_0x53f509(0x2ad)],'unitData':_0x1ce93e(_0x42f6b7),'unitType':_0xe24771};case _0x27cc9f[_0x53f509(0x314)]:return{'changesets':_0x2cabd7[_0x53f509(0x2ad)],'unitData':await _0x16c6bc(_0x42f6b7,await q(_0x1adf9b,_0x42f6b7)),'unitType':_0xe24771};case _0x27cc9f['UNIVER_BOARD']:return{'changesets':_0x2cabd7[_0x53f509(0x2ad)],'unitData':_0x641f7a(_0x42f6b7),'unitType':_0xe24771};default:throw new j('COLLABORATION_INVALID_INPUT',_0x53f509(0x329)+_0xe24771);}}catch(_0x79c59f){throw _0x79c59f instanceof j?_0x79c59f:new j(_0x53f509(0x33c),_0x53f509(0x2b4),{'cause':_0x79c59f});}}function _e(_0x33bddd,_0x19bb2e,_0x218abb){const _0x509d61=_0x28a351;if(_0x33bddd[_0x509d61(0x202)]!==_0x19bb2e||_0x33bddd[_0x509d61(0x273)]!==_0x218abb)throw new j(_0x509d61(0x33c),_0x509d61(0x302));if(!Number[_0x509d61(0x34c)](_0x33bddd['rev'])||_0x33bddd[_0x509d61(0x332)]<0x1)throw new j(_0x509d61(0x33c),_0x509d61(0x280));}async function q(_0x3e6191,_0x39af6c){const _0x361d84=_0x28a351;let _0x4dee71=_0x39af6c['workbook'];if(!_0x4dee71)throw new j(_0x361d84(0x33c),_0x361d84(0x213));let _0x46c330=Object[_0x361d84(0x2c0)](_0x4dee71[_0x361d84(0x2f1)])['flatMap'](({blocks:_0x222826})=>_0x222826);if(new Set(_0x46c330)['size']!==_0x46c330['length'])throw new j(_0x361d84(0x33c),'Snapshot\x20contains\x20duplicate\x20block\x20ids');return await Promise[_0x361d84(0x207)](_0x46c330[_0x361d84(0x366)](async _0x493db7=>{const _0xf96ed8=_0x361d84;let _0x374b36=await _0x3e6191['getSheetBlock'](_0x493db7);if(_0x1d0608(_0x374b36[_0xf96ed8(0x32b)])||!_0x374b36[_0xf96ed8(0x200)])throw new j('COLLABORATION_LOAD_FAILED',_0x374b36[_0xf96ed8(0x32b)]?.[_0xf96ed8(0x239)]||_0xf96ed8(0x25f)+_0x493db7+'\x20is\x20unavailable');if(_0x374b36[_0xf96ed8(0x200)]['id']!==_0x493db7)throw new j(_0xf96ed8(0x33c),_0xf96ed8(0x25f)+_0x493db7+_0xf96ed8(0x2d3));return _0x374b36['block'];}));}function ve(_0x1a7642){const _0xcab7ad=_0x28a351;let _0x362da0=_0x1a7642[_0xcab7ad(0x2d7)]??0xa00000;if(!Number[_0xcab7ad(0x34c)](_0x362da0)||_0x362da0<=0x0)throw new j(_0xcab7ad(0x274),_0xcab7ad(0x2ed));return{async 'load'(_0xca669f,_0x232a06){const _0x2a3805=_0xcab7ad;be(_0xca669f,_0x232a06);let _0x62a189,_0x532810={'unitId':_0xca669f,'unitType':_0x232a06},_0x120d31={'unitId':_0xca669f,'unitType':_0x232a06,..._0x1a7642['snapshotServerService']===void 0x0?{}:{'resolveSnapshotService':()=>{const _0x12ea2c=_0x2b76;if(_0x62a189===void 0x0)throw new j(_0x12ea2c(0x33c),_0x12ea2c(0x32c));return _0x62a189;}}},_0x57cd07;try{_0x57cd07=await _0x1a7642[_0x2a3805(0x2e8)][_0x2a3805(0x29f)](_0x532810);}catch(_0x263b2a){throw new j(_0x2a3805(0x215),'Failed\x20to\x20open\x20the\x20collaboration\x20backend',{'cause':_0x263b2a,'retryable':!0x0});}let _0x31cc16;try{_0x31cc16=await _0x1a7642[_0x2a3805(0x258)](_0x120d31);let _0x37bcdd=he(_0x31cc16,_0x1a7642[_0x2a3805(0x296)]);_0x1a7642[_0x2a3805(0x296)]!==void 0x0&&(_0x62a189=_0x37bcdd['injector'][_0x2a3805(0x1fc)](_0x3e3e5b));let _0x42de48=await xe(_0x57cd07,_0xca669f,_0x232a06);Se(_0x42de48,_0x532810),Ce(_0x31cc16,_0x42de48);let _0x5913a1=B(_0x37bcdd,_0xca669f,_0x232a06,J(_0x42de48[_0x2a3805(0x2f8)]),_0x42de48[_0x2a3805(0x2ad)]),_0x56f844=await _0x57cd07[_0x2a3805(0x2f4)](_0x5913a1,void 0x0);if(_0x1d0608(_0x56f844[_0x2a3805(0x32b)])){let _0x42be9d=_0x56f844['error'];throw new j(_0x2a3805(0x215),_0x42be9d?.[_0x2a3805(0x239)]||_0x2a3805(0x251),{'retryable':!0x0});}let _0x4fa8d9=R(_0x56f844[_0x2a3805(0x2ad)],_0xca669f,_0x232a06,_0x5913a1),_0x89871a=_0x4fa8d9['at'](-0x1)?.[_0x2a3805(0x21c)]??_0x5913a1;if(_0x56f844['latestRevision']!==void 0x0&&_0x56f844['latestRevision']!==_0x89871a)throw new j(_0x2a3805(0x339),'Backend\x20latest\x20revision\x20does\x20not\x20match\x20the\x20initial\x20continuous\x20changeset\x20range');return _0x5913a1=B(_0x37bcdd,_0xca669f,_0x232a06,_0x5913a1,_0x4fa8d9),await ye(_0x37bcdd),new fe(_0xca669f,_0x232a06,_0x5913a1,_0x57cd07,_0x31cc16,_0x37bcdd,_0x362da0);}catch(_0x4b2902){try{await _0x57cd07[_0x2a3805(0x2f7)]();}catch{}try{_0x31cc16?.[_0x2a3805(0x285)]();}catch{}throw _0x4b2902 instanceof j?_0x4b2902:new j(_0x2a3805(0x33c),_0x2a3805(0x261),{'cause':_0x4b2902});}}};}async function ye(_0x5b5282){const _0x1d1b0f=_0x28a351;_0x5b5282['injector'][_0x1d1b0f(0x281)](_0x3c1c2d)&&await _0x5b5282[_0x1d1b0f(0x336)][_0x1d1b0f(0x1fc)](_0x3c1c2d)['waitForLatestApplied']();}function be(_0x294f24,_0x3ae24e){const _0x19cc8d=_0x28a351;if(_0x294f24[_0x19cc8d(0x227)]()[_0x19cc8d(0x2b6)]===0x0)throw new j(_0x19cc8d(0x274),'unitId\x20must\x20not\x20be\x20empty');if(_0x3ae24e!==_0x27cc9f[_0x19cc8d(0x34d)]&&_0x3ae24e!==_0x27cc9f[_0x19cc8d(0x30d)]&&_0x3ae24e!==_0x27cc9f['UNIVER_SLIDE']&&_0x3ae24e!==_0x27cc9f[_0x19cc8d(0x314)]&&_0x3ae24e!==_0x27cc9f[_0x19cc8d(0x287)])throw new j(_0x19cc8d(0x274),_0x19cc8d(0x329)+_0x3ae24e);}async function xe(_0x58deee,_0x5a64fa,_0x2147d0){const _0x1563b8=_0x28a351;return _0x58deee[_0x1563b8(0x224)]===_0x1563b8(0x32e)?await _0x58deee['getUnitData']():await ge(_0x58deee,_0x5a64fa,_0x2147d0);}function Se(_0x187856,_0x5f4bcc){const _0x263e0d=_0x28a351;if(_0x187856[_0x263e0d(0x214)]!==_0x5f4bcc[_0x263e0d(0x214)])throw new j(_0x263e0d(0x33c),'Checkpoint\x20Unit\x20type\x20does\x20not\x20match\x20the\x20requested\x20Unit\x20type');if(_0x187856[_0x263e0d(0x2f8)]['id']!==_0x5f4bcc[_0x263e0d(0x35e)])throw new j(_0x263e0d(0x33c),'Checkpoint\x20Unit\x20id\x20does\x20not\x20match\x20the\x20requested\x20Unit\x20id');J(_0x187856['unitData']);}function J(_0x39f194){const _0x8c1f12=_0x28a351;let _0x3646be=_0x39f194['rev'];if(!Number[_0x8c1f12(0x34c)](_0x3646be)||_0x3646be===void 0x0||_0x3646be<0x1)throw new j(_0x8c1f12(0x33c),_0x8c1f12(0x256));return _0x3646be;}function Ce(_0x35efa3,_0x2a899d){const _0x3f5ab8=_0x28a351;switch(_0x2a899d['unitType']){case _0x27cc9f[_0x3f5ab8(0x34d)]:_0x35efa3[_0x3f5ab8(0x305)](_0x2a899d[_0x3f5ab8(0x214)],structuredClone(_0x2a899d[_0x3f5ab8(0x2f8)]));return;case _0x27cc9f[_0x3f5ab8(0x30d)]:_0x35efa3[_0x3f5ab8(0x305)](_0x2a899d[_0x3f5ab8(0x214)],structuredClone(_0x2a899d[_0x3f5ab8(0x2f8)]));return;case _0x27cc9f['UNIVER_SLIDE']:_0x35efa3[_0x3f5ab8(0x305)](_0x2a899d[_0x3f5ab8(0x214)],structuredClone(_0x2a899d[_0x3f5ab8(0x2f8)]));return;case _0x27cc9f[_0x3f5ab8(0x314)]:_0x35efa3[_0x3f5ab8(0x305)](_0x2a899d['unitType'],structuredClone(_0x2a899d['unitData']));return;case _0x27cc9f[_0x3f5ab8(0x287)]:_0x35efa3['createUnit'](_0x2a899d[_0x3f5ab8(0x214)],structuredClone(_0x2a899d[_0x3f5ab8(0x2f8)]));return;}}var we=class{[_0x28a351(0x2d1)];[_0x28a351(0x33a)];['_lease'];['format']=_0x28a351(0x2ce);constructor(_0x70606f,_0x2674ce,_0x5e7f07){const _0x14e8a9=_0x28a351;this[_0x14e8a9(0x2d1)]=_0x70606f,this['_target']=_0x2674ce,this[_0x14e8a9(0x362)]=_0x5e7f07;}[_0x28a351(0x22d)](){const _0x5c0cbd=_0x28a351;return this['_lease'][_0x5c0cbd(0x22d)]();}async['getUnitOnRev'](_0x523ff5=0x0){const _0x435ac3=_0x28a351;let _0x1ef906=X(this[_0x435ac3(0x2d1)][_0x435ac3(0x2cb)],this[_0x435ac3(0x33a)][_0x435ac3(0x214)],'unit',this[_0x435ac3(0x33a)][_0x435ac3(0x35e)],_0x435ac3(0x332),_0x523ff5),_0x55652d=await Y(this[_0x435ac3(0x2d1)],_0x1ef906);return Te(_0x55652d[_0x435ac3(0x2ce)]),_0x55652d;}async['getSheetBlock'](_0x33300c){const _0x2d84fb=_0x28a351;let _0x464f49=X(this[_0x2d84fb(0x2d1)][_0x2d84fb(0x2cb)],this[_0x2d84fb(0x33a)][_0x2d84fb(0x214)],_0x2d84fb(0x2e7),this[_0x2d84fb(0x33a)]['unitId'],'block',_0x33300c),_0x160346=await Y(this[_0x2d84fb(0x2d1)],_0x464f49);return _0x160346[_0x2d84fb(0x200)]&&typeof _0x160346[_0x2d84fb(0x200)][_0x2d84fb(0x2ca)]==_0x2d84fb(0x30c)&&(_0x160346[_0x2d84fb(0x200)][_0x2d84fb(0x2ca)]=Z(_0x160346[_0x2d84fb(0x200)]['data'])),_0x160346;}async[_0x28a351(0x2f4)](_0x10606c,_0x2cd081=0x0){const _0x253736=_0x28a351;let _0x278290=X(this[_0x253736(0x2d1)]['snapshotServerUrl'],this[_0x253736(0x33a)][_0x253736(0x214)],'unit',this[_0x253736(0x33a)]['unitId'],_0x253736(0x2dc));_0x278290[_0x253736(0x299)][_0x253736(0x24f)](_0x253736(0x23e),String(_0x10606c)),_0x278290[_0x253736(0x299)][_0x253736(0x24f)]('to',String(_0x2cd081));let _0x426e91=await Y(this[_0x253736(0x2d1)],_0x278290);return this[_0x253736(0x362)][_0x253736(0x288)](),_0x426e91;}async[_0x28a351(0x212)](_0x1d74aa){const _0x221179=_0x28a351;await this['_lease'][_0x221179(0x223)]();let _0x1b454a=this[_0x221179(0x362)]['waitForSubmission'](_0x1d74aa[_0x221179(0x333)],_0x1d74aa['reqId']),_0x2b1e8b={..._0x1d74aa,'memberID':this[_0x221179(0x362)][_0x221179(0x29e)],'revision':0x0,'type':this[_0x221179(0x33a)]['unitType'],'unitID':this[_0x221179(0x33a)][_0x221179(0x35e)],'userID':''},_0x27f835=X(this[_0x221179(0x2d1)][_0x221179(0x31e)],this['_target'][_0x221179(0x214)],_0x221179(0x2e7),this[_0x221179(0x33a)]['unitId'],_0x221179(0x34b)),_0x416c75=this[_0x221179(0x2d1)][_0x221179(0x241)](_0x27f835,{'body':JSON[_0x221179(0x326)]({'changeset':_0x2b1e8b,'memberID':this[_0x221179(0x362)][_0x221179(0x29e)],'type':this[_0x221179(0x33a)][_0x221179(0x214)],'unitID':this[_0x221179(0x33a)][_0x221179(0x35e)]}),'headers':{'content-type':_0x221179(0x2a0)},'method':_0x221179(0x2bd)})[_0x221179(0x201)](async _0x543f19=>_0x543f19[_0x221179(0x27f)]===0x191||_0x543f19[_0x221179(0x27f)]===0x193?_0x221179(0x26a):_0x543f19[_0x221179(0x27f)]===0x190||_0x543f19['status']===0x199?_0x221179(0x1f9):_0x543f19['ok']?'accepted':_0x221179(0x291))[_0x221179(0x2c6)](()=>_0x221179(0x291)),_0x21ac53=Ee(this['_config']['commitTimeoutMs']),_0x453708=_0x416c75['then'](_0x23b30d=>_0x23b30d===_0x221179(0x26a)?{'status':_0x221179(0x2d6)}:_0x23b30d===_0x221179(0x1f9)?{'status':_0x221179(0x354)}:new Promise(()=>void 0x0)),_0x376e66=await Promise[_0x221179(0x218)]([_0x1b454a['promise'],_0x453708,_0x21ac53[_0x221179(0x2b3)][_0x221179(0x201)](()=>({'status':'timeout'}))])['finally'](()=>{const _0x2447e9=_0x221179;_0x1b454a[_0x2447e9(0x24a)](),_0x21ac53[_0x2447e9(0x24a)]();});if(_0x376e66[_0x221179(0x27f)]===_0x221179(0x221)){let _0x2e9352=await _0x416c75;return _0x2e9352==='permission'?{'message':'Changeset\x20submission\x20was\x20denied','reason':_0x221179(0x275),'status':_0x221179(0x2f6)}:_0x2e9352===_0x221179(0x1f9)?{'message':_0x221179(0x297),'reason':'invalid-changeset','status':_0x221179(0x2f6)}:{'status':_0x221179(0x291)};}if(_0x376e66['status']==='closed')return{'status':_0x221179(0x291)};if(_0x376e66[_0x221179(0x27f)]==='retry')return{'status':_0x221179(0x228)};if(_0x376e66[_0x221179(0x27f)]===_0x221179(0x2d6))return{'message':_0x221179(0x23d),'reason':'permission-denied','status':_0x221179(0x2f6)};if(_0x376e66[_0x221179(0x27f)]===_0x221179(0x354)){let _0x1c589e=await this[_0x221179(0x2f4)](_0x1d74aa['baseRev'],_0x1d74aa['baseRev']);return{'message':_0x221179(0x297),'reason':_0x1c589e[_0x221179(0x279)]!==void 0x0&&_0x1c589e[_0x221179(0x279)]<_0x1d74aa[_0x221179(0x22a)]?'invalid-revision':'invalid-changeset','status':'rejected'};}let _0x417133=_0x376e66[_0x221179(0x20e)],_0x4a949b=await this[_0x221179(0x2f4)](_0x1d74aa[_0x221179(0x22a)],_0x417133[_0x221179(0x21c)]-0x1);if(_0x1d0608(_0x4a949b[_0x221179(0x32b)])){let _0x28bf7f=_0x4a949b['error'];throw new j(_0x221179(0x215),_0x28bf7f?.[_0x221179(0x239)]||_0x221179(0x246),{'retryable':!0x0});}return{'acceptedChangeset':_0x417133,'precedingChangesets':_0x4a949b[_0x221179(0x2ad)],'status':_0x221179(0x359)};}async[_0x28a351(0x2f7)](){const _0x544007=_0x28a351;await this['_lease'][_0x544007(0x2f7)]();}};async function Y(_0x2628c7,_0x20e4d1){const _0x380303=_0x28a351;let _0x38f634;try{_0x38f634=await _0x2628c7[_0x380303(0x241)](_0x20e4d1,{'method':'GET'});}catch(_0x83a00b){throw new j(_0x380303(0x215),_0x380303(0x1fd),{'cause':_0x83a00b,'retryable':!0x0});}if(!_0x38f634['ok'])throw new j(_0x380303(0x215),_0x380303(0x365)+_0x38f634[_0x380303(0x27f)],{'retryable':_0x38f634[_0x380303(0x27f)]>=0x1f4});try{return await _0x38f634[_0x380303(0x2f5)]();}catch(_0x158a5c){throw new j(_0x380303(0x339),'Collaboration\x20HTTP\x20response\x20is\x20not\x20valid\x20JSON',{'cause':_0x158a5c});}}function X(_0x13131d,..._0x45fc92){const _0x4ab38c=_0x28a351;let _0x1a15e4=new URL(_0x13131d);return _0x1a15e4[_0x4ab38c(0x286)]=_0x1a15e4[_0x4ab38c(0x286)][_0x4ab38c(0x1fa)](/\/$/,'')+'/'+_0x45fc92[_0x4ab38c(0x366)](_0x691694=>encodeURIComponent(String(_0x691694)))['join']('/'),_0x1a15e4;}function Te(_0xa7ada0){const _0x50f83f=_0x28a351;if(!_0xa7ada0)return;let _0x1203a7=[_0xa7ada0['workbook'],_0xa7ada0['doc'],_0xa7ada0['slide'],_0xa7ada0[_0x50f83f(0x2a8)]];for(let _0x468615 of _0x1203a7)_0x468615&&typeof _0x468615[_0x50f83f(0x321)]==_0x50f83f(0x30c)&&(_0x468615[_0x50f83f(0x321)]=Z(_0x468615[_0x50f83f(0x321)]));if(_0xa7ada0['workbook']){for(let _0x32598a of Object[_0x50f83f(0x2c0)](_0xa7ada0[_0x50f83f(0x2c9)][_0x50f83f(0x36b)]))typeof _0x32598a[_0x50f83f(0x321)]=='string'&&(_0x32598a[_0x50f83f(0x321)]=Z(_0x32598a[_0x50f83f(0x321)]));}}function Z(_0x34ddad){const _0x5da7be=_0x28a351;return Uint8Array[_0x5da7be(0x23e)](Buffer[_0x5da7be(0x23e)](_0x34ddad,'base64'));}function Ee(_0x20da55){let _0x489c6a;return{'cancel':()=>{_0x489c6a!==void 0x0&&clearTimeout(_0x489c6a);},'promise':new Promise(_0x4a3549=>{_0x489c6a=setTimeout(_0x4a3549,_0x20da55);})};}var De=class{[_0x28a351(0x2d1)];[_0x28a351(0x2f9)]='offline';['_socket'];[_0x28a351(0x264)];[_0x28a351(0x25c)]='';[_0x28a351(0x2c3)]=new Map();[_0x28a351(0x358)]=new Map();[_0x28a351(0x222)]=new Map();[_0x28a351(0x210)]=new Map();[_0x28a351(0x234)];['_reconnectTimer'];[_0x28a351(0x24d)]=0x0;constructor(_0x219382){const _0x5b3a28=_0x28a351;this[_0x5b3a28(0x2d1)]=_0x219382;}async[_0x28a351(0x33e)](_0x53bf2c){const _0x22e7d9=_0x28a351;let _0xa280bd=this[_0x22e7d9(0x2c3)][_0x22e7d9(0x1fc)](_0x53bf2c['unitId']);if(_0xa280bd&&_0xa280bd[_0x22e7d9(0x2f0)][_0x22e7d9(0x214)]!==_0x53bf2c[_0x22e7d9(0x214)])throw new j(_0x22e7d9(0x274),_0x22e7d9(0x220));if(await this['_ensureConnected'](),_0xa280bd)_0xa280bd[_0x22e7d9(0x2b7)]+=0x1;else{try{await this[_0x22e7d9(0x304)](_0x53bf2c);}catch(_0x264f09){throw this['_joined'][_0x22e7d9(0x35b)]===0x0&&(this['_state']=_0x22e7d9(0x271),this[_0x22e7d9(0x20f)](),this[_0x22e7d9(0x2a2)]?.[_0x22e7d9(0x2f7)](0x3e8,'Initial\x20Unit\x20JOIN\x20failed'),this[_0x22e7d9(0x2a2)]=void 0x0,this[_0x22e7d9(0x25c)]=''),_0x264f09;}this[_0x22e7d9(0x2c3)][_0x22e7d9(0x24f)](_0x53bf2c[_0x22e7d9(0x35e)],{'leases':0x1,'target':_0x53bf2c});}let _0x12d6ed=!0x1,_0x576d26=()=>this['_memberId'],_0x20b210=new Set();return{'close':async()=>{const _0x26861f=_0x22e7d9;if(!_0x12d6ed){_0x12d6ed=!0x0;for(let _0x463d34 of _0x20b210)_0x463d34[_0x26861f(0x24a)]();_0x20b210[_0x26861f(0x327)](),await this[_0x26861f(0x32f)](_0x53bf2c['unitId']);}},'ensureOnline':async()=>await this[_0x22e7d9(0x28f)](),'getConnectionState':()=>_0x12d6ed?_0x22e7d9(0x271):this[_0x22e7d9(0x2f9)],get 'memberId'(){return _0x576d26();},'takeInboundChangesets':()=>{const _0x57b78c=_0x22e7d9;let _0x182f7f=this[_0x57b78c(0x210)][_0x57b78c(0x1fc)](_0x53bf2c[_0x57b78c(0x35e)])??[];return this[_0x57b78c(0x210)][_0x57b78c(0x342)](_0x53bf2c[_0x57b78c(0x35e)]),_0x182f7f;},'waitForSubmission':(_0x29b89b,_0x283063)=>{const _0x12b2bb=_0x22e7d9;let _0x668040=this[_0x12b2bb(0x2c7)](_0x29b89b,_0x283063);return _0x20b210[_0x12b2bb(0x24c)](_0x668040),_0x668040[_0x12b2bb(0x2b3)][_0x12b2bb(0x201)](()=>_0x20b210['delete'](_0x668040),()=>_0x20b210[_0x12b2bb(0x342)](_0x668040)),{'cancel':()=>{const _0x5912dd=_0x12b2bb;_0x20b210[_0x5912dd(0x342)](_0x668040),_0x668040[_0x5912dd(0x24a)]();},'promise':_0x668040[_0x12b2bb(0x2b3)]};}};}async[_0x28a351(0x28f)](){const _0x57a9db=_0x28a351;if(this[_0x57a9db(0x2f9)]!=='online'||this[_0x57a9db(0x2a2)]?.[_0x57a9db(0x269)]!==WebSocket[_0x57a9db(0x270)]){this[_0x57a9db(0x2fd)]!==void 0x0&&clearTimeout(this[_0x57a9db(0x2fd)]),this[_0x57a9db(0x2fd)]=void 0x0,this[_0x57a9db(0x264)]??=this[_0x57a9db(0x2c1)]();try{await this[_0x57a9db(0x264)];}finally{this[_0x57a9db(0x264)]=void 0x0;}}}async[_0x28a351(0x2c1)](){const _0xd94e01=_0x28a351;this['_state']=_0xd94e01(0x2ea);let _0x12c2e9=await this[_0xd94e01(0x2d1)][_0xd94e01(0x241)](this[_0xd94e01(0x2d1)][_0xd94e01(0x2ab)],{'headers':{'content-type':_0xd94e01(0x2a0)},'method':_0xd94e01(0x34f)});if(!_0x12c2e9['ok'])throw this['_state']=_0xd94e01(0x317),new j(_0xd94e01(0x215),_0xd94e01(0x2a1)+_0x12c2e9[_0xd94e01(0x27f)],{'retryable':_0x12c2e9[_0xd94e01(0x27f)]>=0x1f4});let _0x43d872=await _0x12c2e9[_0xd94e01(0x2f5)]();if(typeof _0x43d872[_0xd94e01(0x2b2)]!='string'||_0x43d872['ticket'][_0xd94e01(0x2b6)]===0x0)throw this[_0xd94e01(0x2f9)]='offline',new j(_0xd94e01(0x339),_0xd94e01(0x344));let _0x4caa4b=new URL(this[_0xd94e01(0x2d1)][_0xd94e01(0x206)]);_0x4caa4b[_0xd94e01(0x299)][_0xd94e01(0x24f)](_0xd94e01(0x238),_0x43d872[_0xd94e01(0x2b2)]);let _0x470c58=new WebSocket(_0x4caa4b);this[_0xd94e01(0x2a2)]=_0x470c58,_0x470c58[_0xd94e01(0x349)](_0xd94e01(0x239),_0x2487cc=>this[_0xd94e01(0x226)](_0x2487cc)),_0x470c58['addEventListener']('close',()=>{const _0x20fd07=_0xd94e01;this[_0x20fd07(0x2a2)]===_0x470c58&&(this[_0x20fd07(0x20f)](),this['_failCommandWaiters'](new j('COLLABORATION_UNAVAILABLE',_0x20fd07(0x310),{'retryable':!0x0})),this[_0x20fd07(0x2f9)]=this[_0x20fd07(0x2c3)][_0x20fd07(0x35b)]===0x0?_0x20fd07(0x271):_0x20fd07(0x2ea),this['_joined'][_0x20fd07(0x35b)]>0x0&&this[_0x20fd07(0x26c)]());}),await Oe(_0x470c58);let _0x372be2=await this[_0xd94e01(0x306)](_0x9b7859[_0xd94e01(0x313)],'',{'cmd':_0x9b7859[_0xd94e01(0x313)],'routeKey':''});if(_0x372be2[_0xd94e01(0x236)]!==_0x90bf3a['OK']||typeof _0x372be2[_0xd94e01(0x20b)]?.[_0xd94e01(0x35d)]!='string')throw _0x470c58[_0xd94e01(0x2f7)](),new j(_0xd94e01(0x339),_0xd94e01(0x282));this['_memberId']=_0x372be2[_0xd94e01(0x20b)][_0xd94e01(0x35d)],this[_0xd94e01(0x2f9)]=_0xd94e01(0x28e);for(let {target:_0x290f1b}of this[_0xd94e01(0x2c3)]['values']())try{await this[_0xd94e01(0x304)](_0x290f1b);}catch(_0x4abd55){throw _0x470c58[_0xd94e01(0x2f7)](0x3f3,_0xd94e01(0x312)),_0x4abd55;}this[_0xd94e01(0x24d)]=0x0,this[_0xd94e01(0x307)]();}async[_0x28a351(0x304)](_0x2616f0){const _0x14f407=_0x28a351;let _0x47aa78=await this[_0x14f407(0x306)](_0x9b7859['JOIN'],_0x2616f0[_0x14f407(0x35e)],{'cmd':_0x9b7859['JOIN'],'joinReq':{'rooms':[{'args':'','roomID':_0x2616f0[_0x14f407(0x35e)]}]},'routeKey':_0x2616f0[_0x14f407(0x35e)]});if(_0x47aa78[_0x14f407(0x236)]!==_0x90bf3a['OK'])throw new j('COLLABORATION_UNAVAILABLE',typeof _0x47aa78[_0x14f407(0x248)]==_0x14f407(0x30c)?_0x47aa78[_0x14f407(0x248)]:_0x14f407(0x319));}[_0x28a351(0x306)](_0x5a1e4e,_0x1acae0,_0x2681ea){const _0x29c247=_0x28a351;let _0x456c00=this[_0x29c247(0x2a2)];if(!_0x456c00||_0x456c00['readyState']!==WebSocket[_0x29c247(0x270)])return Promise['reject'](new j(_0x29c247(0x215),_0x29c247(0x272),{'retryable':!0x0}));let _0x4d2e8d=_0x5a1e4e+':'+_0x1acae0;return new Promise((_0x31c9b1,_0x483d0c)=>{const _0x1860bd=_0x29c247;if(this[_0x1860bd(0x358)][_0x1860bd(0x281)](_0x4d2e8d)){_0x483d0c(new j(_0x1860bd(0x339),'A\x20'+_0x5a1e4e+_0x1860bd(0x247)+_0x1acae0));return;}let _0x33334f=setTimeout(()=>{const _0x53a27f=_0x1860bd;this['_commandWaiters'][_0x53a27f(0x342)](_0x4d2e8d),_0x483d0c(new j(_0x53a27f(0x215),_0x53a27f(0x31d)+_0x5a1e4e,{'retryable':!0x0}));},0x7530);this[_0x1860bd(0x358)][_0x1860bd(0x24f)](_0x4d2e8d,{'reject':_0x483d0c,'resolve':_0x31c9b1,'timer':_0x33334f});try{_0x456c00[_0x1860bd(0x209)](JSON[_0x1860bd(0x326)](_0x2681ea));}catch(_0x4c4e92){this['_commandWaiters'][_0x1860bd(0x342)](_0x4d2e8d),clearTimeout(_0x33334f),_0x483d0c(new j(_0x1860bd(0x215),'Failed\x20to\x20send\x20Collaboration\x20WebSocket\x20command',{'cause':_0x4c4e92,'retryable':!0x0}));}});}[_0x28a351(0x226)](_0x3b6017){const _0xd17c37=_0x28a351;if(typeof _0x3b6017['data']!=_0xd17c37(0x30c))return;let _0x56f461;try{_0x56f461=JSON[_0xd17c37(0x242)](_0x3b6017[_0xd17c37(0x2ca)]);}catch{this[_0xd17c37(0x2a2)]?.[_0xd17c37(0x2f7)](0x3eb,'Invalid\x20JSON\x20response');return;}let _0x112735=typeof _0x56f461[_0xd17c37(0x2e5)]==_0xd17c37(0x30c)?_0x56f461[_0xd17c37(0x2e5)]:'';if(_0x56f461['cmd']===_0x9b7859[_0xd17c37(0x313)]||_0x56f461[_0xd17c37(0x28d)]===_0x9b7859[_0xd17c37(0x357)]||_0x56f461[_0xd17c37(0x28d)]===_0x9b7859['HEARTBEAT']){let _0x8ddf80=_0x56f461['cmd']+':'+_0x112735,_0x130d06=this[_0xd17c37(0x358)][_0xd17c37(0x1fc)](_0x8ddf80);_0x130d06&&(this[_0xd17c37(0x358)][_0xd17c37(0x342)](_0x8ddf80),clearTimeout(_0x130d06[_0xd17c37(0x1f2)]),_0x130d06[_0xd17c37(0x208)](_0x56f461));return;}_0x56f461[_0xd17c37(0x28d)]!==_0x9b7859[_0xd17c37(0x277)]||!_0x56f461['collaMsg']||this[_0xd17c37(0x35c)](_0x112735,_0x56f461[_0xd17c37(0x276)]);}[_0x28a351(0x35c)](_0xe5df58,_0x84292d){const _0x1ff846=_0x28a351;let _0x2aaa06=_0x84292d[_0x1ff846(0x353)],_0x31da67=_0x2aaa06===_0x1ff846(0x217)?_0x1ff846(0x316):_0x2aaa06===_0x1ff846(0x30e)?_0x1ff846(0x23c):_0x2aaa06===_0x1ff846(0x2bf)?'csShouldRetryEvent':_0x2aaa06==='permission_rej'?'permissionRejEvent':_0x2aaa06===_0x1ff846(0x23a)?_0x1ff846(0x31f):void 0x0;if(!_0x31da67)return;let _0x3231f9=ke(_0x84292d[_0x31da67]);if(!_0x3231f9||_0x3231f9['unitID']!==_0xe5df58)return;if(_0x2aaa06==='new_changesets'){let _0x50d304=this[_0x1ff846(0x210)]['get'](_0xe5df58)??[];_0x50d304['push'](_0x3231f9),this['_inbound'][_0x1ff846(0x24f)](_0xe5df58,_0x50d304);return;}let _0x5066e1=Q(_0x3231f9[_0x1ff846(0x333)],_0x3231f9[_0x1ff846(0x347)]),_0x20a4bc=this['_submissionWaiters'][_0x1ff846(0x1fc)](_0x5066e1);_0x20a4bc&&_0x20a4bc(_0x2aaa06===_0x1ff846(0x217)?{'changeset':_0x3231f9,'status':_0x1ff846(0x2b8)}:_0x2aaa06==='changeset_should_retry'?{'status':_0x1ff846(0x228)}:_0x2aaa06===_0x1ff846(0x2a4)?{'status':_0x1ff846(0x2d6)}:{'status':_0x1ff846(0x354)});}['_waitForSubmission'](_0x389e73,_0x2a42b1){const _0x5f1393=_0x28a351;let _0xaa9725=Q(_0x389e73,_0x2a42b1);if(this['_submissionWaiters']['has'](_0xaa9725))return{'cancel':()=>void 0x0,'promise':Promise[_0x5f1393(0x298)](new j(_0x5f1393(0x274),'The\x20same\x20changeset\x20submission\x20is\x20already\x20in\x20flight'))};let _0x5d862b=()=>void 0x0;return{'cancel':()=>_0x5d862b({'status':'closed'}),'promise':new Promise(_0x5e1e56=>{const _0x482225=_0x5f1393;_0x5d862b=_0x40b2d4=>{const _0x3d5906=_0x2b76;this[_0x3d5906(0x222)][_0x3d5906(0x342)](_0xaa9725)&&_0x5e1e56(_0x40b2d4);},this[_0x482225(0x222)][_0x482225(0x24f)](_0xaa9725,_0x5d862b);})};}async[_0x28a351(0x32f)](_0x54bade){const _0x50c802=_0x28a351;let _0x35639b=this[_0x50c802(0x2c3)][_0x50c802(0x1fc)](_0x54bade);_0x35639b&&(--_0x35639b['leases'],!(_0x35639b['leases']>0x0)&&(this[_0x50c802(0x2c3)][_0x50c802(0x342)](_0x54bade),this[_0x50c802(0x210)][_0x50c802(0x342)](_0x54bade),this[_0x50c802(0x2a2)]?.[_0x50c802(0x269)]===WebSocket[_0x50c802(0x270)]&&this[_0x50c802(0x2a2)][_0x50c802(0x209)](JSON['stringify']({'cmd':_0x9b7859[_0x50c802(0x324)],'leaveReq':{'args':'','roomID':_0x54bade},'routeKey':_0x54bade})),this[_0x50c802(0x2c3)]['size']===0x0&&(this[_0x50c802(0x2f9)]=_0x50c802(0x271),this[_0x50c802(0x2fd)]!==void 0x0&&clearTimeout(this[_0x50c802(0x2fd)]),this[_0x50c802(0x2fd)]=void 0x0,this['_stopHeartbeat'](),this[_0x50c802(0x2a2)]?.['close'](0x3e8,_0x50c802(0x263)),this['_socket']=void 0x0,this[_0x50c802(0x25c)]='')));}[_0x28a351(0x26c)](){const _0x580da2=_0x28a351;if(this[_0x580da2(0x2fd)]!==void 0x0||this[_0x580da2(0x24d)]>=0x3){this['_reconnectAttempts']>=0x3&&(this[_0x580da2(0x2f9)]=_0x580da2(0x317));return;}let _0x2de381=Math[_0x580da2(0x29a)](0x3e8*0x2**this['_reconnectAttempts'],0x4e20);this[_0x580da2(0x24d)]+=0x1,this[_0x580da2(0x2fd)]=setTimeout(()=>{const _0x5229a9=_0x580da2;this['_reconnectTimer']=void 0x0,this[_0x5229a9(0x264)]??=this[_0x5229a9(0x2c1)](),this['_connectPromise'][_0x5229a9(0x2c6)](()=>this[_0x5229a9(0x26c)]())['finally'](()=>{const _0x1a3206=_0x5229a9;this[_0x1a3206(0x264)]=void 0x0;});},_0x2de381);}[_0x28a351(0x307)](){const _0x21aae6=_0x28a351;this['_stopHeartbeat'](),this[_0x21aae6(0x234)]=setInterval(()=>{const _0x5157ca=_0x21aae6;this['_state']==='online'&&this['_requestCommand'](_0x9b7859['HEARTBEAT'],'',{'cmd':_0x9b7859[_0x5157ca(0x204)],'routeKey':''})[_0x5157ca(0x2c6)](()=>this[_0x5157ca(0x2a2)]?.[_0x5157ca(0x2f7)](0x3f3,'Heartbeat\x20failed'));},0x7530);}[_0x28a351(0x20f)](){const _0x4aedc0=_0x28a351;this['_heartbeat']!==void 0x0&&clearInterval(this[_0x4aedc0(0x234)]),this[_0x4aedc0(0x234)]=void 0x0;}['_failCommandWaiters'](_0x16e359){const _0xf3725b=_0x28a351;for(let _0x531925 of this['_commandWaiters'][_0xf3725b(0x2c0)]())clearTimeout(_0x531925['timer']),_0x531925['reject'](_0x16e359);this[_0xf3725b(0x358)][_0xf3725b(0x327)]();}};function Oe(_0x5116b4){return new Promise((_0xbf8474,_0x20cfc6)=>{const _0xaf17ca=_0x2b76;let _0x23844c=()=>{const _0x2e4825=_0x2b76;clearTimeout(_0x1da7f7),_0x5116b4[_0x2e4825(0x205)]('close',_0x5544eb),_0x5116b4[_0x2e4825(0x205)](_0x2e4825(0x32b),_0x1e7e74),_0x5116b4[_0x2e4825(0x205)](_0x2e4825(0x29f),_0x592937);},_0x2b967c=_0x4220c1=>{_0x23844c(),_0x20cfc6(new j('COLLABORATION_UNAVAILABLE',_0x4220c1,{'retryable':!0x0}));},_0x5544eb=()=>_0x2b967c(_0xaf17ca(0x1f4)),_0x1e7e74=()=>_0x2b967c(_0xaf17ca(0x2d5)),_0x592937=()=>{_0x23844c(),_0xbf8474();},_0x1da7f7=setTimeout(()=>{const _0xe8c6c2=_0xaf17ca;_0x2b967c('Timed\x20out\x20establishing\x20Collaboration\x20WebSocket'),_0x5116b4[_0xe8c6c2(0x2f7)](0x3e8,_0xe8c6c2(0x257));},0x7530);_0x5116b4[_0xaf17ca(0x349)](_0xaf17ca(0x2f7),_0x5544eb,{'once':!0x0}),_0x5116b4[_0xaf17ca(0x349)](_0xaf17ca(0x32b),_0x1e7e74,{'once':!0x0}),_0x5116b4[_0xaf17ca(0x349)](_0xaf17ca(0x29f),_0x592937,{'once':!0x0});});}function ke(_0x252cb9){const _0x15049a=_0x28a351;if(!_0x252cb9||typeof _0x252cb9!=_0x15049a(0x2e1))return null;let _0x3d8764=_0x252cb9['cs'];return _0x3d8764&&typeof _0x3d8764=='object'?_0x3d8764:null;}function Q(_0x2da2eb,_0x168ce9){return(_0x2da2eb??'')+':'+(_0x168ce9??0x0);}var Ae=class{[_0x28a351(0x2d1)];[_0x28a351(0x2cd)];constructor(_0x9e8a97){const _0x15e102=_0x28a351;this['_config']=je(_0x9e8a97),this[_0x15e102(0x2cd)]=new De(this[_0x15e102(0x2d1)]);}async[_0x28a351(0x29f)](_0x2e8750){const _0x2e6ef8=_0x28a351;let _0x4d29e1=await this[_0x2e6ef8(0x2cd)][_0x2e6ef8(0x33e)](_0x2e8750);return new we(this[_0x2e6ef8(0x2d1)],_0x2e8750,_0x4d29e1);}};function je(_0x4827f3){const _0x4d2a9e=_0x28a351;let _0x4c5f87=$(_0x4827f3[_0x4d2a9e(0x2cb)],'snapshotServerUrl',[_0x4d2a9e(0x2ba),_0x4d2a9e(0x369)]),_0x566b83=$(_0x4827f3['collabSubmitChangesetUrl'],_0x4d2a9e(0x31e),[_0x4d2a9e(0x2ba),_0x4d2a9e(0x369)]),_0x14b636=$(_0x4827f3[_0x4d2a9e(0x206)],_0x4d2a9e(0x206),[_0x4d2a9e(0x300),_0x4d2a9e(0x262),_0x4d2a9e(0x2ba),_0x4d2a9e(0x369)]);_0x14b636['protocol']===_0x4d2a9e(0x2ba)&&(_0x14b636['protocol']='ws:'),_0x14b636['protocol']===_0x4d2a9e(0x369)&&(_0x14b636['protocol']=_0x4d2a9e(0x262));let _0x2ff778=$(_0x4827f3['wsSessionTicketUrl'],'wsSessionTicketUrl',[_0x4d2a9e(0x2ba),_0x4d2a9e(0x369)]),_0x36f54b=_0x4827f3[_0x4d2a9e(0x2fb)]??0x7530;if(!Number['isSafeInteger'](_0x36f54b)||_0x36f54b<=0x0)throw new j(_0x4d2a9e(0x274),_0x4d2a9e(0x364));return{'collabSubmitChangesetUrl':_0x566b83,'collabWebSocketUrl':_0x14b636,'commitTimeoutMs':_0x36f54b,'httpRequest':_0x4827f3[_0x4d2a9e(0x241)]??globalThis['fetch'][_0x4d2a9e(0x254)](globalThis),'snapshotServerUrl':_0x4c5f87,'wsSessionTicketUrl':_0x2ff778};}function $(_0x4f9062,_0x53fb1b,_0x55bec9){const _0x3a750f=_0x28a351;let _0x25cffa;try{_0x25cffa=new URL(_0x4f9062);}catch{throw new j(_0x3a750f(0x274),_0x53fb1b+'\x20must\x20be\x20an\x20absolute\x20URL');}if(!_0x55bec9[_0x3a750f(0x33d)](_0x25cffa[_0x3a750f(0x26e)]))throw new j(_0x3a750f(0x274),_0x53fb1b+'\x20uses\x20an\x20unsupported\x20protocol');return _0x25cffa;}function Me(_0xca302f){return new Ae(_0xca302f);}export{j as CollaborationRuntimeError,Me as createCollaborationServerAdapter,ve as createUniverCollaborationRuntimeFactory};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@univer-cli/univer-collaboration-runtime",
3
3
  "type": "module",
4
- "version": "1.0.1",
4
+ "version": "1.0.2",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",
7
7
  "types": "./dist/index.d.ts",
@@ -19,16 +19,16 @@
19
19
  ],
20
20
  "dependencies": {
21
21
  "@oxc-project/runtime": "0.142.0",
22
- "@univerjs-pro/bases": "1.0.1",
23
- "@univerjs-pro/boards": "1.0.1",
24
- "@univerjs-pro/collaboration": "1.0.1",
25
- "@univerjs-pro/engine-formula": "1.0.1",
26
- "@univerjs-pro/slides": "1.0.1",
27
- "@univerjs/core": "1.0.1",
28
- "@univerjs/docs": "1.0.1",
29
- "@univerjs/engine-formula": "1.0.1",
30
- "@univerjs/engine-render": "1.0.1",
31
- "@univerjs/protocol": "1.0.1",
32
- "@univerjs/sheets": "1.0.1"
22
+ "@univerjs-pro/bases": "1.0.2",
23
+ "@univerjs-pro/boards": "1.0.2",
24
+ "@univerjs-pro/collaboration": "1.0.2",
25
+ "@univerjs-pro/engine-formula": "1.0.2",
26
+ "@univerjs-pro/slides": "1.0.2",
27
+ "@univerjs/core": "1.0.2",
28
+ "@univerjs/docs": "1.0.2",
29
+ "@univerjs/engine-formula": "1.0.2",
30
+ "@univerjs/engine-render": "1.0.2",
31
+ "@univerjs/protocol": "1.0.2",
32
+ "@univerjs/sheets": "1.0.2"
33
33
  }
34
34
  }