@univerjs-pro/docs-formula 1.0.3 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x34c9f2=_0x9a42;(function(_0x3fd348,_0x4d1222){const _0x426d50=_0x9a42,_0x5d915b=_0x3fd348();while(!![]){try{const _0x493f60=parseInt(_0x426d50(0x23b))/0x1*(-parseInt(_0x426d50(0x1ee))/0x2)+-parseInt(_0x426d50(0x29e))/0x3+-parseInt(_0x426d50(0x1fc))/0x4*(-parseInt(_0x426d50(0x22a))/0x5)+-parseInt(_0x426d50(0x1ea))/0x6*(parseInt(_0x426d50(0x2c0))/0x7)+-parseInt(_0x426d50(0x1f7))/0x8+parseInt(_0x426d50(0x2c5))/0x9+parseInt(_0x426d50(0x22d))/0xa;if(_0x493f60===_0x4d1222)break;else _0x5d915b['push'](_0x5d915b['shift']());}catch(_0x19bf52){_0x5d915b['push'](_0x5d915b['shift']());}}}(_0x35ee,0x5d711));import{FormulaCacheEligibilityService as _0x168d95,FormulaLastValuePersistenceService as _0x442e83,HostExternalReferenceModel as _0x598fe,UniverProFormulaEnginePlugin as _0x4266a3,buildUpsertHostExternalReferenceMutations as _0x64c5d3,collectFormulaExternalReferenceQualifiers as _0x51ffff,getScalarFormulaResultCell as _0x477060,resolveFormulaResultPresentation as _0x44276e,resolveHostFormulaExternalReferences as _0xc8a733,toFormulaLastValue as _0x16967c}from'@univerjs-pro/engine-formula';import{CellValueType as _0xcdd757,CommandType as _0x3d8c4d,CustomRangeType as _0xe8be5b,DataStreamTreeTokenType as _0x1a4e6c,DependentOn as _0x962570,Disposable as _0x49a82f,ICommandService as _0x1fba3b,IConfigService as _0x4eefec,IResourceManagerService as _0x674a1c,IUndoRedoService as _0x6bc219,IUniverInstanceService as _0x35f474,Inject as _0x5c5393,Injector as _0x57c044,JSONX as _0x42e010,Plugin as _0x530da8,TextX as _0x283512,Tools as _0x5e88d9,UniverInstanceType as _0x9cc7bc,generateRandomId as _0x23fed8,getBodySliceForTextXAction as _0x2ffd0f,getCustomRangeInterval as _0x3c5aee,getParagraphContentStartOffset as _0x44d00,getRichTextEditPath as _0x38047f,merge as _0x2e4085,shiftExclusiveRangeOnDelete as _0x4483d1,shiftExclusiveRangeOnInsert as _0x5e2c6d,shiftInclusiveRangeOnDelete as _0x16ca5b,shiftInclusiveRangeOnInsert as _0x2a05e1,touchDependencies as _0x6f29f6}from'@univerjs/core';import{DOC_SELECTION_OPTION_PRESERVE_CARET as _0x291f0f,DocSelectionManagerService as _0x1841de,DocTextResolverService as _0x557df1,RichTextEditingMutation as _0x26272f,UniverDocsPlugin as _0x4c3072}from'@univerjs/docs';import{FormulaResultStatus as _0x51281a,LexerTreeBuilder as _0x2ea0aa,OtherFormulaBizType as _0x20565b,RegisterOtherFormulaService as _0x2bd31f}from'@univerjs/engine-formula';import{Subject as _0x2c9ea2}from'rxjs';import{UniverLicensePlugin as _0x16ebc7}from'@univerjs-pro/license';const y=_0x34c9f2(0x26b),je=0x1,Me=_0x34c9f2(0x25e),Ne='';function b(){return{'schemaVersion':0x1,'formulas':{}};}function x(_0x811692){const _0x34b868=_0x34c9f2;return!_0x811692||typeof _0x811692!=_0x34b868(0x224)||!S(_0x811692,[_0x34b868(0x1f8),_0x34b868(0x214)])||!(_0x34b868(0x1f8)in _0x811692)||_0x811692[_0x34b868(0x1f8)]!==0x1||!(_0x34b868(0x214)in _0x811692)||!_0x811692[_0x34b868(0x214)]||typeof _0x811692[_0x34b868(0x214)]!=_0x34b868(0x224)||Array[_0x34b868(0x2a8)](_0x811692['formulas'])?!0x1:Object[_0x34b868(0x2ad)](_0x811692[_0x34b868(0x214)])[_0x34b868(0x2bb)](([_0xeaf602,_0x440282])=>_0xeaf602[_0x34b868(0x2c1)]>0x0&&Pe(_0x440282));}function Pe(_0xd26335){const _0x28aab0=_0x34c9f2;return!_0xd26335||typeof _0xd26335!=_0x28aab0(0x224)||!S(_0xd26335,['formula',_0x28aab0(0x271),_0x28aab0(0x21f)])||!(_0x28aab0(0x20f)in _0xd26335)||typeof _0xd26335[_0x28aab0(0x20f)]!=_0x28aab0(0x1d5)||!_0xd26335[_0x28aab0(0x20f)][_0x28aab0(0x27c)]()||_0x28aab0(0x271)in _0xd26335&&_0xd26335[_0x28aab0(0x271)]!=null&&(typeof _0xd26335[_0x28aab0(0x271)]!=_0x28aab0(0x224)||!S(_0xd26335[_0x28aab0(0x271)],[_0x28aab0(0x244)])||!(_0x28aab0(0x244)in _0xd26335['numberFormat'])||typeof _0xd26335['numberFormat'][_0x28aab0(0x244)]!=_0x28aab0(0x1d5))?!0x1:!(_0x28aab0(0x21f)in _0xd26335)||_0xd26335[_0x28aab0(0x21f)]==null||Fe(_0xd26335[_0x28aab0(0x21f)]);}function Fe(_0x5062cd){const _0x42133e=_0x34c9f2;return!_0x5062cd||typeof _0x5062cd!=_0x42133e(0x224)||!S(_0x5062cd,['v','t',_0x42133e(0x244)])||!('v'in _0x5062cd)||_0x5062cd['v']!==null&&typeof _0x5062cd['v']!=_0x42133e(0x1d5)&&typeof _0x5062cd['v']!=_0x42133e(0x1dd)&&typeof _0x5062cd['v']!='boolean'||'t'in _0x5062cd&&_0x5062cd['t']!=null&&!Ie(_0x5062cd['t'])?!0x1:!(_0x42133e(0x244)in _0x5062cd)||_0x5062cd[_0x42133e(0x244)]==null||typeof _0x5062cd[_0x42133e(0x244)]==_0x42133e(0x1d5);}function S(_0x58961a,_0x20376b){const _0x2772ea=_0x34c9f2;let _0x15783b=new Set(_0x20376b);return Object[_0x2772ea(0x24a)](_0x58961a)[_0x2772ea(0x2bb)](_0xcd09d7=>_0x15783b[_0x2772ea(0x253)](_0xcd09d7));}function Ie(_0x38487a){const _0x51fa00=_0x34c9f2;return typeof _0x38487a==_0x51fa00(0x1dd)&&Object[_0x51fa00(0x2a5)](_0xcdd757)['includes'](_0x38487a);}const Le=new Set([_0x1a4e6c[_0x34c9f2(0x26e)],_0x1a4e6c['TABLE_START'],_0x1a4e6c[_0x34c9f2(0x266)],_0x1a4e6c['TABLE_CELL_START'],_0x1a4e6c[_0x34c9f2(0x1e1)],_0x1a4e6c['TABLE_ROW_END'],_0x1a4e6c['TABLE_END'],_0x1a4e6c[_0x34c9f2(0x213)],_0x1a4e6c[_0x34c9f2(0x1e5)],_0x1a4e6c[_0x34c9f2(0x1da)],_0x1a4e6c[_0x34c9f2(0x2aa)],_0x1a4e6c[_0x34c9f2(0x205)],_0x1a4e6c[_0x34c9f2(0x288)],_0x1a4e6c[_0x34c9f2(0x23d)]]);var C=class extends Error{constructor(){super('Doc\x20Formula\x20range\x20cannot\x20cross\x20document\x20structure\x20boundaries');}};function Re(_0x4367e2){const _0x14cac0=_0x34c9f2;var _0x1f8799,_0x49d0f5;let _0x597e9c=_0x5e88d9['deepClone'](_0x4367e2[_0x14cac0(0x2a7)]),_0x2d3efb=j(_0x597e9c),{startOffset:_0x42c351,endOffset:_0x2f2aa1}=We(_0x2d3efb,_0x4367e2[_0x14cac0(0x262)],_0x4367e2[_0x14cac0(0x251)]);He(_0x2d3efb,_0x42c351,_0x2f2aa1);let _0x319100=((_0x1f8799=_0x2d3efb[_0x14cac0(0x2b7)])==null?void 0x0:_0x1f8799[_0x14cac0(0x229)](_0x358f49=>{const _0xcc7983=_0x14cac0;if(!w(_0x358f49))return!0x1;let _0x55efdd=_0x3c5aee(_0x358f49);return _0x55efdd[_0xcc7983(0x251)]>_0x42c351&&_0x55efdd['startOffset']<_0x2f2aa1;})[_0x14cac0(0x26d)](_0x4be67c=>_0x4be67c[_0x14cac0(0x212)]))??[];qe(_0x2d3efb,_0x42c351,_0x2f2aa1,''),_0x2d3efb[_0x14cac0(0x2b7)]=[...((_0x49d0f5=_0x2d3efb[_0x14cac0(0x2b7)])==null?void 0x0:_0x49d0f5[_0x14cac0(0x229)](_0x5a712f=>!_0x319100[_0x14cac0(0x279)](_0x5a712f[_0x14cac0(0x212)])&&_0x5a712f['rangeId']!==_0x4367e2[_0x14cac0(0x212)]))??[],Ue(_0x4367e2[_0x14cac0(0x212)],_0x42c351)]['sort']((_0x6ca7f0,_0x4bcd7f)=>_0x6ca7f0[_0x14cac0(0x25c)]-_0x4bcd7f[_0x14cac0(0x25c)]);let _0xf4a77c=E(_0x4367e2[_0x14cac0(0x1d4)]);return _0x319100[_0x14cac0(0x230)](_0x12ef5f=>{delete _0xf4a77c['formulas'][_0x12ef5f];}),_0xf4a77c['formulas'][_0x4367e2['rangeId']]=_0x5e88d9['deepClone'](_0x4367e2[_0x14cac0(0x1ef)]),{'nextDocumentData':_0x597e9c,'nextResource':_0xf4a77c,'cursorOffset':_0x42c351+0x1};}function ze(_0x51d67e){const _0x493497=_0x34c9f2;var _0x13b35f,_0x822e52;let _0x215297=_0x5e88d9['deepClone'](_0x51d67e[_0x493497(0x2a7)]),_0x3933f3=(_0x13b35f=j(_0x215297)[_0x493497(0x2b7)])==null?void 0x0:_0x13b35f[_0x493497(0x206)](_0x24c774=>_0x24c774[_0x493497(0x212)]===_0x51d67e[_0x493497(0x212)]&&w(_0x24c774));if(!_0x3933f3||!((_0x822e52=_0x51d67e['resource'])!=null&&_0x822e52[_0x493497(0x214)][_0x51d67e[_0x493497(0x212)]]))return null;let _0x484aa5=E(_0x51d67e[_0x493497(0x1d4)]);return _0x484aa5[_0x493497(0x214)][_0x51d67e['rangeId']]=_0x5e88d9[_0x493497(0x261)](_0x51d67e[_0x493497(0x1ef)]),{'nextDocumentData':_0x215297,'nextResource':_0x484aa5,'cursorOffset':_0x3933f3[_0x493497(0x285)]+0x1};}function Be(_0x4cd673){const _0x64d2a9=_0x34c9f2;let _0x5ea050=_0x5e88d9['deepClone'](_0x4cd673[_0x64d2a9(0x2a7)]),_0x3afff3=Je(_0x5ea050,_0x4cd673[_0x64d2a9(0x212)],_0x4cd673[_0x64d2a9(0x282)]??'');if(_0x3afff3==null)return null;let _0x398717=E(_0x4cd673['resource']);return delete _0x398717[_0x64d2a9(0x214)][_0x4cd673['rangeId']],{'nextDocumentData':_0x5ea050,'nextResource':_0x398717,'cursorOffset':_0x3afff3};}function Ve(_0x4e3475,_0x10d93a){const _0x48aa78=_0x34c9f2;var _0x4e0665;let _0x300331=_0x5e88d9['deepClone'](_0x4e3475),_0x1b9d3f=_0x300331[_0x48aa78(0x2ab)];if(!_0x1b9d3f)return _0x300331;let _0x4e6966=new Map(_0x10d93a[_0x48aa78(0x26d)](_0x333848=>[_0x333848[_0x48aa78(0x212)],_0x333848[_0x48aa78(0x282)]])),_0x342f78=((_0x4e0665=_0x1b9d3f[_0x48aa78(0x2b7)])==null?void 0x0:_0x4e0665['filter'](_0x850d77=>w(_0x850d77)&&_0x4e6966[_0x48aa78(0x253)](_0x850d77[_0x48aa78(0x212)]))[_0x48aa78(0x26f)]((_0x1d5bba,_0x3fcda6)=>_0x3fcda6[_0x48aa78(0x25c)]-_0x1d5bba[_0x48aa78(0x25c)]))??[];for(let _0x35edd5 of _0x342f78)Je(_0x300331,_0x35edd5[_0x48aa78(0x212)],_0x4e6966[_0x48aa78(0x1ff)](_0x35edd5[_0x48aa78(0x212)])??'');return _0x300331;}function w(_0x7fc17e){const _0x3b9d05=_0x34c9f2;var _0x120ec7;return(_0x7fc17e==null?void 0x0:_0x7fc17e['rangeType'])===_0xe8be5b[_0x3b9d05(0x245)]&&_0x7fc17e[_0x3b9d05(0x28e)]===!0x0&&((_0x120ec7=_0x7fc17e[_0x3b9d05(0x233)])==null?void 0x0:_0x120ec7[_0x3b9d05(0x1e2)])===_0x3b9d05(0x25e);}function T(_0x32ea0d,_0x25a674){const _0x24a3b9=_0x34c9f2;var _0x208f0a;return _0x32ea0d==null||(_0x208f0a=_0x32ea0d[_0x24a3b9(0x2b7)])==null?void 0x0:_0x208f0a[_0x24a3b9(0x206)](_0x1e0af3=>_0x1e0af3[_0x24a3b9(0x212)]===_0x25a674&&w(_0x1e0af3));}function He(_0x49cfb3,_0x7620,_0x46e0a1){const _0x19928e=_0x34c9f2;if(_0x7620===_0x46e0a1){if(Le[_0x19928e(0x253)](_0x49cfb3['dataStream'][_0x7620]))throw new C();return;}for(let _0x10e200=_0x7620;_0x10e200<_0x46e0a1;_0x10e200++)if(_0x49cfb3['dataStream'][_0x10e200]===_0x1a4e6c['PARAGRAPH']||Le[_0x19928e(0x253)](_0x49cfb3[_0x19928e(0x1de)][_0x10e200]))throw new C();}function Ue(_0x21b2c2,_0x4c36dc){const _0x3ca4be=_0x34c9f2;return{'startIndex':_0x4c36dc,'endIndex':_0x4c36dc,'rangeId':_0x21b2c2,'rangeType':_0xe8be5b[_0x3ca4be(0x245)],'wholeEntity':!0x0,'properties':{'kind':Me}};}function E(_0x10e67e){const _0x5ed176=_0x34c9f2;return _0x10e67e?_0x5e88d9[_0x5ed176(0x261)](_0x10e67e):b();}function We(_0xf05af,_0xd903f0,_0x5a7f7e){const _0x288a45=_0x34c9f2;let _0x463342=Ke(_0xf05af),_0x25c77f=_0xd903f0??_0x463342,_0x51d137=_0x5a7f7e??_0x25c77f;return{'startOffset':Ge(Math['min'](_0x25c77f,_0x51d137),_0x463342),'endOffset':Ge(Math[_0x288a45(0x241)](_0x25c77f,_0x51d137),_0x463342)};}function Ge(_0x2b0f63,_0x33eaae){const _0x21bc12=_0x34c9f2;return Math[_0x21bc12(0x241)](0x0,Math[_0x21bc12(0x232)](_0x2b0f63,_0x33eaae));}function Ke(_0x4d72cc){const _0x133c96=_0x34c9f2;return _0x4d72cc[_0x133c96(0x1de)][_0x133c96(0x1ed)](''+_0x1a4e6c[_0x133c96(0x2b3)]+_0x1a4e6c[_0x133c96(0x26e)])?Math['max'](0x0,_0x4d72cc[_0x133c96(0x1de)][_0x133c96(0x2c1)]-0x2):_0x4d72cc[_0x133c96(0x1de)][_0x133c96(0x1ed)](_0x1a4e6c[_0x133c96(0x26e)])?Math['max'](0x0,_0x4d72cc[_0x133c96(0x1de)][_0x133c96(0x2c1)]-0x1):_0x4d72cc['dataStream'][_0x133c96(0x2c1)];}function qe(_0x599212,_0xbeefc4,_0x19a7de,_0x598c4f){_0x19a7de>_0xbeefc4&&Xe(_0x599212,_0xbeefc4,_0x19a7de),Ye(_0x599212,_0xbeefc4,_0x598c4f);}function Je(_0x3875c9,_0x4bfec1,_0x359174){const _0x209b98=_0x34c9f2;var _0x25be50,_0x27c44c;let _0x3c3f09=j(_0x3875c9),_0xf6b51b=(_0x25be50=_0x3c3f09[_0x209b98(0x2b7)])==null?void 0x0:_0x25be50[_0x209b98(0x206)](_0x185825=>_0x185825[_0x209b98(0x212)]===_0x4bfec1&&w(_0x185825));if(!_0xf6b51b)return null;let _0x4f65d0=_0x3c5aee(_0xf6b51b);return qe(_0x3c3f09,_0x4f65d0[_0x209b98(0x262)],_0x4f65d0[_0x209b98(0x251)],_0x359174),_0x3c3f09[_0x209b98(0x2b7)]=(_0x27c44c=_0x3c3f09[_0x209b98(0x2b7)])==null?void 0x0:_0x27c44c[_0x209b98(0x229)](_0x366a58=>_0x366a58[_0x209b98(0x212)]!==_0x4bfec1),_0x4f65d0['startOffset']+_0x359174[_0x209b98(0x2c1)];}function Ye(_0x3093d3,_0x424786,_0x2df869){const _0x5f4dd0=_0x34c9f2;_0x2df869&&(_0x3093d3[_0x5f4dd0(0x1de)]=''+_0x3093d3['dataStream']['slice'](0x0,_0x424786)+_0x2df869+_0x3093d3[_0x5f4dd0(0x1de)][_0x5f4dd0(0x23c)](_0x424786),Ze(_0x3093d3,_0x424786,_0x2df869['length']));}function Xe(_0x765c62,_0x524822,_0x3366d1){const _0x21f5fb=_0x34c9f2;let _0x5bddea=_0x3366d1-_0x524822;_0x765c62['dataStream']=''+_0x765c62[_0x21f5fb(0x1de)]['slice'](0x0,_0x524822)+_0x765c62[_0x21f5fb(0x1de)][_0x21f5fb(0x23c)](_0x3366d1),Qe(_0x765c62,_0x524822,_0x5bddea);}function Ze(_0x406e40,_0x58b2c1,_0x3cc0af){const _0x18c5eb=_0x34c9f2;_0x406e40['paragraphs']=D(_0x406e40[_0x18c5eb(0x27f)],_0x58b2c1,_0x3cc0af),_0x406e40[_0x18c5eb(0x23e)]=D(_0x406e40[_0x18c5eb(0x23e)],_0x58b2c1,_0x3cc0af),_0x406e40[_0x18c5eb(0x27d)]=D(_0x406e40['customBlocks'],_0x58b2c1,_0x3cc0af),_0x406e40[_0x18c5eb(0x20b)]=$e(_0x406e40[_0x18c5eb(0x20b)],_0x58b2c1,_0x3cc0af),_0x406e40[_0x18c5eb(0x221)]=et(_0x406e40[_0x18c5eb(0x221)],_0x58b2c1,_0x3cc0af),_0x406e40['columnGroups']=k(_0x406e40[_0x18c5eb(0x246)],_0x58b2c1,_0x3cc0af),_0x406e40[_0x18c5eb(0x2b7)]=k(_0x406e40[_0x18c5eb(0x2b7)],_0x58b2c1,_0x3cc0af),_0x406e40['customDecorations']=k(_0x406e40[_0x18c5eb(0x2ac)],_0x58b2c1,_0x3cc0af),_0x406e40[_0x18c5eb(0x20c)]=k(_0x406e40[_0x18c5eb(0x20c)],_0x58b2c1,_0x3cc0af);}function Qe(_0x538499,_0x443f2f,_0x2a98e2){const _0x2c1b57=_0x34c9f2;var _0x4456a5,_0x560fd2;_0x538499[_0x2c1b57(0x27f)]=O(_0x538499['paragraphs'],_0x443f2f,_0x2a98e2),_0x538499[_0x2c1b57(0x23e)]=O(_0x538499['sectionBreaks'],_0x443f2f,_0x2a98e2),_0x538499[_0x2c1b57(0x27d)]=O(_0x538499[_0x2c1b57(0x27d)],_0x443f2f,_0x2a98e2),_0x538499[_0x2c1b57(0x20b)]=(_0x4456a5=tt((_0x560fd2=_0x538499[_0x2c1b57(0x20b)])==null?void 0x0:_0x560fd2[_0x2c1b57(0x26d)](_0xbdc334=>({..._0xbdc334,'startIndex':_0xbdc334['st'],'endIndex':_0xbdc334['ed']})),_0x443f2f,_0x2a98e2))==null?void 0x0:_0x4456a5['map'](_0x49762b=>{let {startIndex:_0x44cd3f,endIndex:_0x30d028,..._0x4f1961}=_0x49762b;return{..._0x4f1961,'st':_0x44cd3f,'ed':_0x30d028};}),_0x538499[_0x2c1b57(0x221)]=tt(_0x538499[_0x2c1b57(0x221)],_0x443f2f,_0x2a98e2),_0x538499['columnGroups']=A(_0x538499[_0x2c1b57(0x246)],_0x443f2f,_0x2a98e2),_0x538499[_0x2c1b57(0x2b7)]=A(_0x538499[_0x2c1b57(0x2b7)],_0x443f2f,_0x2a98e2),_0x538499['customDecorations']=A(_0x538499[_0x2c1b57(0x2ac)],_0x443f2f,_0x2a98e2),_0x538499[_0x2c1b57(0x20c)]=A(_0x538499['blockRanges'],_0x443f2f,_0x2a98e2);}function D(_0x3880f9,_0xc03d8e,_0x924146){const _0x4c7631=_0x34c9f2;return _0x3880f9==null?void 0x0:_0x3880f9[_0x4c7631(0x26d)](_0x5a25fc=>_0x5a25fc[_0x4c7631(0x25c)]>=_0xc03d8e?{..._0x5a25fc,'startIndex':_0x5a25fc[_0x4c7631(0x25c)]+_0x924146}:_0x5a25fc);}function O(_0x2b6001,_0x21b2c4,_0x545c3e){const _0x4ab09b=_0x34c9f2;let _0x52bdac=_0x21b2c4+_0x545c3e;return _0x2b6001==null?void 0x0:_0x2b6001[_0x4ab09b(0x26d)](_0x4352b4=>_0x4352b4[_0x4ab09b(0x25c)]>=_0x21b2c4&&_0x4352b4[_0x4ab09b(0x25c)]<_0x52bdac?null:_0x4352b4['startIndex']>=_0x52bdac?{..._0x4352b4,'startIndex':_0x4352b4['startIndex']-_0x545c3e}:_0x4352b4)[_0x4ab09b(0x229)](_0x1a459c=>_0x1a459c!=null);}function $e(_0x4b1b10,_0x16fd65,_0x1511a0){return _0x4b1b10==null?void 0x0:_0x4b1b10['map'](_0x25846d=>_0x25846d['st']>=_0x16fd65?{..._0x25846d,'st':_0x25846d['st']+_0x1511a0,'ed':_0x25846d['ed']+_0x1511a0}:_0x25846d['ed']>_0x16fd65?{..._0x25846d,'ed':_0x25846d['ed']+_0x1511a0}:_0x25846d);}function _0x9a42(_0xf4c610,_0x5919e4){_0xf4c610=_0xf4c610-0x1ce;const _0x35eef1=_0x35ee();let _0x9a4267=_0x35eef1[_0xf4c610];return _0x9a4267;}function k(_0x4a56f3,_0x35e381,_0x4ee161){const _0x3f295a=_0x34c9f2;return _0x4a56f3==null?void 0x0:_0x4a56f3[_0x3f295a(0x26d)](_0x2dc9cf=>_0x2a05e1(_0x2dc9cf,_0x35e381,_0x4ee161));}function et(_0x291657,_0x26c671,_0x1402e7){const _0xc8b6ff=_0x34c9f2;return _0x291657==null?void 0x0:_0x291657[_0xc8b6ff(0x26d)](_0x9112c2=>_0x5e2c6d(_0x9112c2,_0x26c671,_0x1402e7));}function A(_0x528756,_0x4bc962,_0x46dbd2){return _0x528756==null?void 0x0:_0x528756['map'](_0x3c7cdb=>_0x16ca5b(_0x3c7cdb,_0x4bc962,_0x46dbd2))['filter'](_0xb02150=>_0xb02150!=null);}function tt(_0x2ab2ca,_0x1fe1ac,_0x3888da){const _0x34a89a=_0x34c9f2;return _0x2ab2ca==null?void 0x0:_0x2ab2ca[_0x34a89a(0x26d)](_0x58df2a=>_0x4483d1(_0x58df2a,_0x1fe1ac,_0x3888da))[_0x34a89a(0x229)](_0x33d38a=>_0x33d38a!=null);}function j(_0xb4cdcd){const _0x43acd3=_0x34c9f2;if(!_0xb4cdcd[_0x43acd3(0x2ab)])throw Error(_0x43acd3(0x1d7));return _0xb4cdcd[_0x43acd3(0x2ab)];}function M(_0x279f26){'@babel/helpers - typeof';const _0x4831a8=_0x34c9f2;return M=typeof Symbol=='function'&&typeof Symbol[_0x4831a8(0x20e)]==_0x4831a8(0x200)?function(_0x16fce7){return typeof _0x16fce7;}:function(_0x1f3b53){const _0x389e86=_0x4831a8;return _0x1f3b53&&typeof Symbol=='function'&&_0x1f3b53['constructor']===Symbol&&_0x1f3b53!==Symbol[_0x389e86(0x28a)]?'symbol':typeof _0x1f3b53;},M(_0x279f26);}function nt(_0x1f7a0c,_0x75a7e){const _0x44e143=_0x34c9f2;if(M(_0x1f7a0c)!='object'||!_0x1f7a0c)return _0x1f7a0c;var _0x3f359d=_0x1f7a0c[Symbol[_0x44e143(0x21d)]];if(_0x3f359d!==void 0x0){var _0x3cae03=_0x3f359d['call'](_0x1f7a0c,_0x75a7e||_0x44e143(0x25b));if(M(_0x3cae03)!='object')return _0x3cae03;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x75a7e==='string'?String:Number)(_0x1f7a0c);}function rt(_0xfc529a){const _0x3f4ac7=_0x34c9f2;var _0x47906b=nt(_0xfc529a,'string');return M(_0x47906b)==_0x3f4ac7(0x200)?_0x47906b:_0x47906b+'';}function N(_0x116ce8,_0x552aa6,_0x269d6a){const _0x25dcb4=_0x34c9f2;return(_0x552aa6=rt(_0x552aa6))in _0x116ce8?Object[_0x25dcb4(0x207)](_0x116ce8,_0x552aa6,{'value':_0x269d6a,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x116ce8[_0x552aa6]=_0x269d6a,_0x116ce8;}var P=class extends _0x49a82f{constructor(..._0x29f506){const _0x228f14=_0x34c9f2;super(..._0x29f506),N(this,_0x228f14(0x24f),new Map()),N(this,_0x228f14(0x21e),new Map()),N(this,_0x228f14(0x2b5),new Map()),N(this,_0x228f14(0x204),new _0x2c9ea2()),N(this,_0x228f14(0x2ba),this[_0x228f14(0x204)]['asObservable']());}[_0x34c9f2(0x2a3)](_0x50e9d3,_0x53287c){const _0x3159e5=_0x34c9f2;var _0xf98001;let _0x2d30b5=(_0xf98001=this[_0x3159e5(0x24f)][_0x3159e5(0x1ff)](_0x50e9d3))==null?void 0x0:_0xf98001[_0x3159e5(0x214)][_0x53287c];return _0x2d30b5?_0x5e88d9[_0x3159e5(0x261)](_0x2d30b5):void 0x0;}['getFormulas'](_0x357214){const _0x22ec8b=_0x34c9f2;var _0x234184;return _0x5e88d9['deepClone'](((_0x234184=this[_0x22ec8b(0x24f)][_0x22ec8b(0x1ff)](_0x357214))==null?void 0x0:_0x234184['formulas'])??{});}['getResource'](_0x116e08){const _0x2cd050=_0x34c9f2;let _0x250eb8=this[_0x2cd050(0x24f)][_0x2cd050(0x1ff)](_0x116e08);return _0x250eb8?_0x5e88d9[_0x2cd050(0x261)](_0x250eb8):void 0x0;}[_0x34c9f2(0x26a)](_0x5d376c,_0x3fd416,_0x16a52a){const _0x39a52d=_0x34c9f2;return this[_0x39a52d(0x28f)](_0x5d376c,{[_0x3fd416]:_0x16a52a});}[_0x34c9f2(0x295)](_0x1256be,_0x3274c0){const _0x16c6e4=_0x34c9f2;return this[_0x16c6e4(0x2b5)][_0x16c6e4(0x253)](_0x1256be)||!x(_0x3274c0)?!0x1:(this[_0x16c6e4(0x24f)][_0x16c6e4(0x252)](_0x1256be,_0x5e88d9[_0x16c6e4(0x261)](_0x3274c0)),this[_0x16c6e4(0x204)][_0x16c6e4(0x22b)]({'unitId':_0x1256be}),!0x0);}[_0x34c9f2(0x28f)](_0x2f985c,_0x2da324){const _0x257fb4=_0x34c9f2;if(this[_0x257fb4(0x2b5)]['has'](_0x2f985c)||!Object[_0x257fb4(0x24a)](_0x2da324)[_0x257fb4(0x2c1)]||!x({'schemaVersion':0x1,'formulas':_0x2da324}))return!0x1;let _0x20c10a=this[_0x257fb4(0x24f)][_0x257fb4(0x1ff)](_0x2f985c)??b(),_0x355138=_0x5e88d9[_0x257fb4(0x261)](_0x20c10a);return Object['assign'](_0x355138[_0x257fb4(0x214)],_0x5e88d9[_0x257fb4(0x261)](_0x2da324)),this[_0x257fb4(0x24f)][_0x257fb4(0x252)](_0x2f985c,_0x355138),this[_0x257fb4(0x204)][_0x257fb4(0x22b)]({'unitId':_0x2f985c,'rangeIds':Object[_0x257fb4(0x24a)](_0x2da324)}),!0x0;}[_0x34c9f2(0x21a)](_0x5bbdcd,_0x2443ee){const _0x1ff973=_0x34c9f2;if(this[_0x1ff973(0x2b5)][_0x1ff973(0x253)](_0x5bbdcd))return!0x1;let _0x7ca67=this[_0x1ff973(0x24f)][_0x1ff973(0x1ff)](_0x5bbdcd);if(!(_0x7ca67!=null&&_0x7ca67[_0x1ff973(0x214)][_0x2443ee]))return!0x1;let _0x996ad4=_0x5e88d9[_0x1ff973(0x261)](_0x7ca67);return delete _0x996ad4[_0x1ff973(0x214)][_0x2443ee],this[_0x1ff973(0x24f)]['set'](_0x5bbdcd,_0x996ad4),this[_0x1ff973(0x204)][_0x1ff973(0x22b)]({'unitId':_0x5bbdcd,'rangeIds':[_0x2443ee]}),!0x0;}['load'](_0x5074d3,_0x7d6a95){const _0x438ab1=_0x34c9f2;return _0x7d6a95&&typeof _0x7d6a95==_0x438ab1(0x224)&&_0x438ab1(0x1f8)in _0x7d6a95&&_0x7d6a95[_0x438ab1(0x1f8)]!==0x1?(this['_preserveInvalid'](_0x5074d3,_0x7d6a95,_0x438ab1(0x243)),!0x1):x(_0x7d6a95)?(this[_0x438ab1(0x24f)][_0x438ab1(0x252)](_0x5074d3,_0x5e88d9[_0x438ab1(0x261)](_0x7d6a95)),this[_0x438ab1(0x21e)][_0x438ab1(0x287)](_0x5074d3),this[_0x438ab1(0x2b5)][_0x438ab1(0x287)](_0x5074d3),this[_0x438ab1(0x204)][_0x438ab1(0x22b)]({'unitId':_0x5074d3}),!0x0):(this[_0x438ab1(0x24d)](_0x5074d3,_0x7d6a95,_0x438ab1(0x273)),!0x1);}[_0x34c9f2(0x27e)](_0x4640ac){const _0x3f3a59=_0x34c9f2;let _0x586efa=this[_0x3f3a59(0x24f)][_0x3f3a59(0x1ff)](_0x4640ac);return _0x586efa?_0x5e88d9[_0x3f3a59(0x261)](_0x586efa):this[_0x3f3a59(0x21e)][_0x3f3a59(0x253)](_0x4640ac)?_0x5e88d9[_0x3f3a59(0x261)](this[_0x3f3a59(0x21e)][_0x3f3a59(0x1ff)](_0x4640ac)):b();}[_0x34c9f2(0x1d3)](_0x1a6678){const _0x54e3ed=_0x34c9f2;return this[_0x54e3ed(0x2b5)][_0x54e3ed(0x1ff)](_0x1a6678);}[_0x34c9f2(0x2c3)](_0x5f5217){const _0x6793e8=_0x34c9f2;this[_0x6793e8(0x24f)][_0x6793e8(0x287)](_0x5f5217),this[_0x6793e8(0x21e)][_0x6793e8(0x287)](_0x5f5217),this[_0x6793e8(0x2b5)][_0x6793e8(0x287)](_0x5f5217),this['_change$'][_0x6793e8(0x22b)]({'unitId':_0x5f5217});}[_0x34c9f2(0x1d1)](){const _0x5a2c84=_0x34c9f2;this[_0x5a2c84(0x24f)]['clear'](),this['_rawResources'][_0x5a2c84(0x26c)](),this[_0x5a2c84(0x2b5)][_0x5a2c84(0x26c)](),this[_0x5a2c84(0x204)][_0x5a2c84(0x294)](),super[_0x5a2c84(0x1d1)]();}[_0x34c9f2(0x24d)](_0x417c16,_0x188661,_0x5c1ce4){const _0x56b595=_0x34c9f2;this[_0x56b595(0x24f)][_0x56b595(0x287)](_0x417c16),this[_0x56b595(0x21e)][_0x56b595(0x252)](_0x417c16,_0x5e88d9['deepClone'](_0x188661)),this[_0x56b595(0x2b5)]['set'](_0x417c16,_0x5c1ce4),this[_0x56b595(0x204)]['next']({'unitId':_0x417c16});}};let it=function(_0x457909){const _0x55caeb=_0x34c9f2;return _0x457909[_0x55caeb(0x21c)]='empty',_0x457909['PENDING']='pending',_0x457909['SUCCESS']=_0x55caeb(0x217),_0x457909[_0x55caeb(0x250)]=_0x55caeb(0x2c7),_0x457909;}({});function F(_0x3b4f2f,_0x218320){return function(_0x52f7ca,_0x5ee1eb){_0x218320(_0x52f7ca,_0x5ee1eb,_0x3b4f2f);};}function I(_0x7110f2,_0x273d5e,_0x5cc3cf,_0x2688f9){const _0x2829c9=_0x34c9f2;var _0x387439=arguments[_0x2829c9(0x2c1)],_0x5d4902=_0x387439<0x3?_0x273d5e:_0x2688f9===null?_0x2688f9=Object[_0x2829c9(0x1ce)](_0x273d5e,_0x5cc3cf):_0x2688f9,_0x573103;if(typeof Reflect==_0x2829c9(0x224)&&typeof Reflect[_0x2829c9(0x2c4)]=='function')_0x5d4902=Reflect[_0x2829c9(0x2c4)](_0x7110f2,_0x273d5e,_0x5cc3cf,_0x2688f9);else{for(var _0x3c9bb5=_0x7110f2['length']-0x1;_0x3c9bb5>=0x0;_0x3c9bb5--)(_0x573103=_0x7110f2[_0x3c9bb5])&&(_0x5d4902=(_0x387439<0x3?_0x573103(_0x5d4902):_0x387439>0x3?_0x573103(_0x273d5e,_0x5cc3cf,_0x5d4902):_0x573103(_0x273d5e,_0x5cc3cf))||_0x5d4902);}return _0x387439>0x3&&_0x5d4902&&Object[_0x2829c9(0x207)](_0x273d5e,_0x5cc3cf,_0x5d4902),_0x5d4902;}let L=class extends _0x49a82f{constructor(_0x1d9b31,_0x81eb5c,_0x141e68){const _0x580bbf=_0x34c9f2;super(),this['_model']=_0x1d9b31,this[_0x580bbf(0x27b)]=_0x81eb5c,this[_0x580bbf(0x23f)]=_0x141e68,N(this,_0x580bbf(0x1df),new Map()),N(this,_0x580bbf(0x1e9),new Map()),N(this,'_presentationChanged$',new _0x2c9ea2()),N(this,_0x580bbf(0x268),this[_0x580bbf(0x280)][_0x580bbf(0x2b2)]()),this[_0x580bbf(0x249)](this[_0x580bbf(0x27b)][_0x580bbf(0x2bc)][_0x580bbf(0x283)](_0x2743d1=>{const _0x31b610=_0x580bbf;for(let _0x29004a of Object['values'](_0x2743d1))for(let _0x11f271 of Object[_0x31b610(0x2a5)](_0x29004a))_0x11f271['forEach'](_0x38e2d7=>this[_0x31b610(0x1f1)](_0x38e2d7));}));}[_0x34c9f2(0x234)](_0x513a3e){const _0x37c924=_0x34c9f2;var _0x315ae8;let _0x598a60=_0x513a3e[_0x37c924(0x1f2)](),_0x4e3b9e=((_0x315ae8=_0x513a3e[_0x37c924(0x281)]()[_0x37c924(0x2ab)])==null||(_0x315ae8=_0x315ae8[_0x37c924(0x2b7)])==null?void 0x0:_0x315ae8[_0x37c924(0x229)](w))??[],_0x4aa1c2=this['_model'][_0x37c924(0x22e)](_0x598a60),_0x1626ff=new Set();for(let _0x34e59b of _0x4e3b9e){let _0x5a729c=_0x4aa1c2[_0x34e59b[_0x37c924(0x212)]];_0x5a729c&&(_0x1626ff[_0x37c924(0x21b)](R(_0x598a60,_0x34e59b['rangeId'])),this[_0x37c924(0x2a4)]({'unitId':_0x598a60,'rangeId':_0x34e59b[_0x37c924(0x212)]},_0x5a729c));}for(let _0x191d4e of Array[_0x37c924(0x1f4)](this['_registrations'][_0x37c924(0x2a5)]()))_0x191d4e['unitId']===_0x598a60&&!_0x1626ff[_0x37c924(0x253)](R(_0x191d4e['unitId'],_0x191d4e['rangeId']))&&this['unregister'](_0x191d4e);}[_0x34c9f2(0x2a4)](_0x3033f3,_0x1f544b){const _0xdc32c8=_0x34c9f2;let _0x5e8dbe=R(_0x3033f3['unitId'],_0x3033f3[_0xdc32c8(0x212)]),_0x22485b=this[_0xdc32c8(0x1df)][_0xdc32c8(0x1ff)](_0x5e8dbe),_0x57bae9=this[_0xdc32c8(0x23f)][_0xdc32c8(0x277)](_0x3033f3['unitId']);if(_0x22485b&&_0x22485b['config'][_0xdc32c8(0x20f)]===_0x1f544b[_0xdc32c8(0x20f)]&&_0x22485b[_0xdc32c8(0x2bd)]===_0x57bae9){_0x22485b[_0xdc32c8(0x1ef)]=_0x1f544b;let _0x66b01a=_0x22485b['formulaId']?this[_0xdc32c8(0x27b)][_0xdc32c8(0x263)](_0x22485b[_0xdc32c8(0x24b)],_0x22485b[_0xdc32c8(0x24b)],_0x22485b[_0xdc32c8(0x20a)])??void 0x0:void 0x0;_0x22485b[_0xdc32c8(0x2a1)]=_0x66b01a,this[_0xdc32c8(0x254)](_0x5e8dbe,z(_0x1f544b,_0x66b01a));return;}_0x22485b!=null&&_0x22485b[_0xdc32c8(0x20a)]&&this[_0xdc32c8(0x1eb)](_0x22485b);let _0x2ee832={..._0x3033f3,'config':_0x1f544b,'referenceRevision':_0x57bae9,'presentation':z(_0x1f544b,void 0x0)};if(this['_registrations']['set'](_0x5e8dbe,_0x2ee832),!_0x1f544b['formula'][_0xdc32c8(0x27c)]())return;let _0x5a8fbf=this[_0xdc32c8(0x27b)]['registerFormulaWithRange'](_0x3033f3[_0xdc32c8(0x24b)],_0x3033f3[_0xdc32c8(0x24b)],_0x1f544b[_0xdc32c8(0x20f)],void 0x0,{'rangeId':_0x3033f3[_0xdc32c8(0x212)]},_0x20565b[_0xdc32c8(0x239)],_0x3033f3[_0xdc32c8(0x212)]);_0x2ee832[_0xdc32c8(0x20a)]=_0x5a8fbf,this[_0xdc32c8(0x1e9)][_0xdc32c8(0x252)](_0x5a8fbf,_0x5e8dbe);}[_0x34c9f2(0x270)](_0x226e95){const _0x2c27c9=_0x34c9f2;let _0x327668=R(_0x226e95[_0x2c27c9(0x24b)],_0x226e95['rangeId']),_0x3648db=this[_0x2c27c9(0x1df)][_0x2c27c9(0x1ff)](_0x327668);_0x3648db&&(this[_0x2c27c9(0x1eb)](_0x3648db),this[_0x2c27c9(0x1df)][_0x2c27c9(0x287)](_0x327668));}[_0x34c9f2(0x28c)](_0x39c1f2){const _0x14ccf3=_0x34c9f2;for(let _0x19bbe8 of Array[_0x14ccf3(0x1f4)](this[_0x14ccf3(0x1df)]['values']()))_0x19bbe8[_0x14ccf3(0x24b)]===_0x39c1f2&&this[_0x14ccf3(0x270)](_0x19bbe8);}[_0x34c9f2(0x1cf)](_0x2ef0aa){const _0x522896=_0x34c9f2;var _0x1763c0;return(_0x1763c0=this[_0x522896(0x1df)]['get'](R(_0x2ef0aa[_0x522896(0x24b)],_0x2ef0aa['rangeId'])))==null?void 0x0:_0x1763c0[_0x522896(0x29f)];}[_0x34c9f2(0x25a)](_0x1250b3){const _0x52a6d4=_0x34c9f2;let _0x4d246b=this[_0x52a6d4(0x1df)]['get'](R(_0x1250b3['unitId'],_0x1250b3[_0x52a6d4(0x212)]));return _0x4d246b?B(_0x4d246b):void 0x0;}[_0x34c9f2(0x209)](){const _0x33b7a4=_0x34c9f2;return Array[_0x33b7a4(0x1f4)](this[_0x33b7a4(0x1df)][_0x33b7a4(0x2a5)](),_0x5ec8e7=>({'identity':{'unitId':_0x5ec8e7[_0x33b7a4(0x24b)],'rangeId':_0x5ec8e7[_0x33b7a4(0x212)]},'config':_0x5ec8e7[_0x33b7a4(0x1ef)],'referenceRevision':_0x5ec8e7[_0x33b7a4(0x2bd)],..._0x5ec8e7[_0x33b7a4(0x2a1)]?{'liveResult':_0x5ec8e7[_0x33b7a4(0x2a1)]}:null}));}['dispose'](){const _0x494455=_0x34c9f2;for(let _0x5d7551 of this['_registrations'][_0x494455(0x2a5)]())this[_0x494455(0x1eb)](_0x5d7551);this[_0x494455(0x1df)][_0x494455(0x26c)](),this['_formulaKeys']['clear'](),this[_0x494455(0x280)]['complete'](),super[_0x494455(0x1d1)]();}[_0x34c9f2(0x1f1)](_0x425333){const _0x2f3376=_0x34c9f2;let _0x15d9d9=this[_0x2f3376(0x1e9)]['get'](_0x425333[_0x2f3376(0x20a)]),_0xf2fed=_0x15d9d9?this['_registrations'][_0x2f3376(0x1ff)](_0x15d9d9):void 0x0;_0x15d9d9&&_0xf2fed&&(_0xf2fed[_0x2f3376(0x2a1)]=_0x425333,this['_setPresentation'](_0x15d9d9,z(_0xf2fed[_0x2f3376(0x1ef)],_0x425333)));}['_setPresentation'](_0x1cef04,_0x4ea0ba){const _0x1be4bd=_0x34c9f2;var _0x3de0be,_0x5768b2;let _0x339c05=this[_0x1be4bd(0x1df)]['get'](_0x1cef04);if(!_0x339c05||at(_0x339c05[_0x1be4bd(0x29f)],_0x4ea0ba))return;let _0x256739=_0x339c05['presentation'],_0x1b7389=B(_0x339c05);_0x339c05[_0x1be4bd(0x29f)]=_0x4ea0ba,this[_0x1be4bd(0x280)][_0x1be4bd(0x22b)]({'unitId':_0x339c05[_0x1be4bd(0x24b)],'rangeId':_0x339c05[_0x1be4bd(0x212)],'presentation':_0x4ea0ba,'previousPresentation':_0x256739,'result':B(_0x339c05),'previousResult':{..._0x1b7389,..._0x256739,'value':(_0x3de0be=_0x256739[_0x1be4bd(0x236)])==null?void 0x0:_0x3de0be['v'],'valueType':((_0x5768b2=_0x256739[_0x1be4bd(0x236)])==null?void 0x0:_0x5768b2['t'])??void 0x0}});}[_0x34c9f2(0x1eb)](_0x3a2f98){const _0x1a4077=_0x34c9f2;_0x3a2f98['formulaId']&&(this['_registrationService']['deleteFormula'](_0x3a2f98[_0x1a4077(0x24b)],_0x3a2f98['unitId'],[_0x3a2f98['formulaId']]),this[_0x1a4077(0x1e9)][_0x1a4077(0x287)](_0x3a2f98['formulaId']));}};L=I([F(0x0,_0x5c5393(P)),F(0x1,_0x5c5393(_0x2bd31f)),F(0x2,_0x5c5393(_0x598fe))],L);function R(_0x53e74d,_0x16d5d2){return _0x53e74d+'\x00'+_0x16d5d2;}function z(_0x4781b1,_0x476ead){const _0x3ae270=_0x34c9f2;return _0x44276e({'numberFormat':_0x4781b1['numberFormat'],'lastValue':_0x4781b1[_0x3ae270(0x21f)],'result':_0x476ead});}function B(_0x15b0c7){const _0x29c9b9=_0x34c9f2;var _0x566370,_0x471e10,_0x4139fb;let _0x31532b=_0x15b0c7['presentation'],_0x3ed5b6=_0x15b0c7[_0x29c9b9(0x1ef)]['formula']['trim']()?_0x31532b[_0x29c9b9(0x1fd)]||_0x31532b[_0x29c9b9(0x236)]==null?_0x29c9b9(0x2b1):((_0x566370=_0x15b0c7[_0x29c9b9(0x2a1)])==null?void 0x0:_0x566370[_0x29c9b9(0x216)])===_0x51281a['ERROR']?_0x29c9b9(0x2c7):_0x29c9b9(0x217):_0x29c9b9(0x2bf);return{..._0x31532b,'status':_0x3ed5b6,'value':(_0x471e10=_0x31532b['cell'])==null?void 0x0:_0x471e10['v'],'valueType':((_0x4139fb=_0x31532b['cell'])==null?void 0x0:_0x4139fb['t'])??void 0x0};}function at(_0x336c71,_0x1abc89){const _0x2b0358=_0x34c9f2;var _0x2089c1,_0x5f0168,_0x28bf52,_0xaf302a;return _0x336c71[_0x2b0358(0x282)]===_0x1abc89[_0x2b0358(0x282)]&&_0x336c71[_0x2b0358(0x231)]===_0x1abc89[_0x2b0358(0x231)]&&_0x336c71['pattern']===_0x1abc89[_0x2b0358(0x244)]&&_0x336c71[_0x2b0358(0x218)]===_0x1abc89['source']&&_0x336c71[_0x2b0358(0x1fd)]===_0x1abc89[_0x2b0358(0x1fd)]&&((_0x2089c1=_0x336c71[_0x2b0358(0x236)])==null?void 0x0:_0x2089c1['t'])===((_0x5f0168=_0x1abc89[_0x2b0358(0x236)])==null?void 0x0:_0x5f0168['t'])&&Object['is']((_0x28bf52=_0x336c71[_0x2b0358(0x236)])==null?void 0x0:_0x28bf52['v'],(_0xaf302a=_0x1abc89[_0x2b0358(0x236)])==null?void 0x0:_0xaf302a['v']);}const ot={'id':_0x34c9f2(0x203),'type':_0x3d8c4d[_0x34c9f2(0x2b6)],'handler':(_0x3c4786,_0x3e7cd0)=>!(_0x3e7cd0!=null&&_0x3e7cd0['unitId'])||!_0x3e7cd0[_0x34c9f2(0x212)]||!_0x3e7cd0[_0x34c9f2(0x1ef)]?!0x1:_0x3c4786['get'](P)['setFormula'](_0x3e7cd0[_0x34c9f2(0x24b)],_0x3e7cd0[_0x34c9f2(0x212)],_0x3e7cd0[_0x34c9f2(0x1ef)])},st={'id':_0x34c9f2(0x2be),'type':_0x3d8c4d[_0x34c9f2(0x2b6)],'handler':(_0x51b61e,_0x36e172)=>!(_0x36e172!=null&&_0x36e172[_0x34c9f2(0x24b)])||!_0x36e172[_0x34c9f2(0x212)]?!0x1:_0x51b61e[_0x34c9f2(0x1ff)](P)[_0x34c9f2(0x21a)](_0x36e172['unitId'],_0x36e172[_0x34c9f2(0x212)])},V={'id':_0x34c9f2(0x2c6),'type':_0x3d8c4d[_0x34c9f2(0x2b6)],'handler':(_0x420b11,_0x40f4a1)=>!(_0x40f4a1!=null&&_0x40f4a1['unitId'])||!_0x40f4a1['resource']?!0x1:_0x420b11[_0x34c9f2(0x1ff)](P)['setResource'](_0x40f4a1[_0x34c9f2(0x24b)],_0x40f4a1[_0x34c9f2(0x1d4)])},H={'id':_0x34c9f2(0x291),'type':_0x3d8c4d['MUTATION'],'handler':(_0x113afa,_0x305bbe)=>{const _0x24c86d=_0x34c9f2;if(!(_0x305bbe!=null&&_0x305bbe['unitId'])||!_0x305bbe[_0x24c86d(0x276)][_0x24c86d(0x2c1)])return!0x1;let _0x56dbcc=_0x113afa['get'](P),_0x10ea08=_0x113afa[_0x24c86d(0x1ff)](_0x598fe),_0x254226=_0x56dbcc[_0x24c86d(0x284)](_0x305bbe[_0x24c86d(0x24b)]);if(!_0x254226)return!0x1;let _0x546e80=_0x5e88d9[_0x24c86d(0x261)](_0x254226),_0x550af7=!0x1;for(let _0x3f6fb8 of _0x305bbe[_0x24c86d(0x276)]){var _0x39b2be,_0x2538fa,_0x36f142,_0x360341;let _0x14614a=_0x546e80[_0x24c86d(0x214)][_0x3f6fb8['rangeId']];_0x14614a&&_0x14614a[_0x24c86d(0x20f)]===_0x3f6fb8['expectedFormula']&&((_0x39b2be=_0x14614a[_0x24c86d(0x271)])==null?void 0x0:_0x39b2be[_0x24c86d(0x244)])===_0x3f6fb8['expectedNumberFormat']&&_0x10ea08[_0x24c86d(0x277)](_0x305bbe[_0x24c86d(0x24b)])===_0x3f6fb8['expectedReferenceRevision']&&(((_0x2538fa=_0x14614a[_0x24c86d(0x21f)])==null?void 0x0:_0x2538fa['v'])!==_0x3f6fb8[_0x24c86d(0x21f)]['v']||((_0x36f142=_0x14614a[_0x24c86d(0x21f)])==null?void 0x0:_0x36f142['t'])!==_0x3f6fb8[_0x24c86d(0x21f)]['t']||((_0x360341=_0x14614a['lastValue'])==null?void 0x0:_0x360341[_0x24c86d(0x244)])!==_0x3f6fb8[_0x24c86d(0x21f)][_0x24c86d(0x244)])&&(_0x14614a['lastValue']=_0x5e88d9[_0x24c86d(0x261)](_0x3f6fb8[_0x24c86d(0x21f)]),_0x550af7=!0x0);}return!_0x550af7||_0x56dbcc[_0x24c86d(0x295)](_0x305bbe[_0x24c86d(0x24b)],_0x546e80);}},U={'id':_0x34c9f2(0x1fb),'type':_0x3d8c4d['COMMAND'],'handler':(_0x17e9eb,_0x54120e)=>{const _0x51e4d9=_0x34c9f2;if(!(_0x54120e!=null&&_0x54120e[_0x51e4d9(0x20f)]['trim']()))return!0x1;let _0x41b37a=q(_0x17e9eb,_0x54120e[_0x51e4d9(0x24b)],'');if(!_0x41b37a)return!0x1;let _0x4395b7=ft(_0x54120e[_0x51e4d9(0x255)],_0x41b37a[_0x51e4d9(0x2ab)],dt(_0x17e9eb,_0x41b37a[_0x51e4d9(0x24b)]));if(!_0x4395b7)return!0x1;let _0x570138=pt(_0x17e9eb,_0x41b37a['unitId'],_0x54120e['formula'],_0x54120e[_0x51e4d9(0x223)]??[]);if(!_0x570138)return!0x1;let _0x51f5d7=mt(_0x41b37a[_0x51e4d9(0x2ab)],_0x41b37a[_0x51e4d9(0x22c)],_0x41b37a['unitId']),_0x52ed4f=ht({'documentData':_0x41b37a['documentData'],'resource':_0x41b37a[_0x51e4d9(0x1d4)],'rangeId':_0x51f5d7,'config':{'formula':_0x54120e['formula'],..._0x54120e['numberFormat']?{'numberFormat':_0x54120e[_0x51e4d9(0x271)]}:null},'startOffset':_0x4395b7[_0x51e4d9(0x262)],'endOffset':_0x4395b7['endOffset']});if(!_0x52ed4f)return!0x1;let _0x41c52b=_0x64c5d3(_0x17e9eb,_0x41b37a[_0x51e4d9(0x24b)],_0x570138);return!_0x41c52b||!J({'accessor':_0x17e9eb,'document':_0x41b37a['document'],'unitId':_0x41b37a[_0x51e4d9(0x24b)],'trigger':U['id'],'rangeId':_0x51f5d7,'previousResource':_0x41b37a['resource'],'nextResource':_0x52ed4f[_0x51e4d9(0x2c8)],'previousDocumentData':_0x41b37a[_0x51e4d9(0x2a7)],'nextDocumentData':_0x52ed4f[_0x51e4d9(0x247)],'cursorOffset':_0x52ed4f['cursorOffset'],'externalMutations':_0x41c52b})?!0x1:{'rangeId':_0x51f5d7,'startOffset':_0x52ed4f['cursorOffset']-0x1,'endOffset':_0x52ed4f[_0x51e4d9(0x256)]};}},W={'id':_0x34c9f2(0x222),'type':_0x3d8c4d[_0x34c9f2(0x2a0)],'handler':(_0x52be58,_0x444b30)=>{const _0x2b7c6a=_0x34c9f2;if(!(_0x444b30!=null&&_0x444b30['rangeId'])||!_0x444b30[_0x2b7c6a(0x20f)][_0x2b7c6a(0x27c)]())return!0x1;let _0x5bc2ad=q(_0x52be58,_0x444b30[_0x2b7c6a(0x24b)],''),_0x2782ef=_0x5bc2ad==null?void 0x0:_0x5bc2ad[_0x2b7c6a(0x22c)][_0x2b7c6a(0x2a3)](_0x5bc2ad[_0x2b7c6a(0x24b)],_0x444b30[_0x2b7c6a(0x212)]),_0x14c5df=_0x5bc2ad?T(_0x5bc2ad[_0x2b7c6a(0x2a7)][_0x2b7c6a(0x2ab)],_0x444b30[_0x2b7c6a(0x212)]):void 0x0;if(!_0x5bc2ad||!_0x2782ef||!_0x14c5df)return!0x1;let _0x5ddfc0=pt(_0x52be58,_0x5bc2ad['unitId'],_0x444b30[_0x2b7c6a(0x20f)],_0x444b30['externalReferences']??[]);if(!_0x5ddfc0)return!0x1;let _0x1f8c8b=_0x64c5d3(_0x52be58,_0x5bc2ad[_0x2b7c6a(0x24b)],_0x5ddfc0);if(!_0x1f8c8b)return!0x1;let _0x1624c2=Ct(_0x5bc2ad[_0x2b7c6a(0x1d4)]);return _0x1624c2[_0x2b7c6a(0x214)][_0x444b30[_0x2b7c6a(0x212)]]={'formula':_0x444b30[_0x2b7c6a(0x20f)],..._0x444b30[_0x2b7c6a(0x271)]?{'numberFormat':_0x444b30[_0x2b7c6a(0x271)]}:_0x2782ef[_0x2b7c6a(0x271)]?{'numberFormat':_0x2782ef['numberFormat']}:null},J({'accessor':_0x52be58,'document':_0x5bc2ad[_0x2b7c6a(0x289)],'unitId':_0x5bc2ad[_0x2b7c6a(0x24b)],'trigger':W['id'],'rangeId':_0x444b30['rangeId'],'previousResource':_0x5bc2ad[_0x2b7c6a(0x1d4)],'nextResource':_0x1624c2,'cursorOffset':_0x14c5df[_0x2b7c6a(0x285)]+0x1,'externalMutations':_0x1f8c8b});}},G={'id':_0x34c9f2(0x2ae),'type':_0x3d8c4d[_0x34c9f2(0x2a0)],'handler':(_0x484798,_0x40b4e6)=>{const _0x1da246=_0x34c9f2;if(!(_0x40b4e6!=null&&_0x40b4e6['rangeId']))return!0x1;let _0x3b0dea=q(_0x484798,_0x40b4e6[_0x1da246(0x24b)],''),_0x29a759=_0x3b0dea==null?void 0x0:_0x3b0dea[_0x1da246(0x22c)]['getFormula'](_0x3b0dea[_0x1da246(0x24b)],_0x40b4e6[_0x1da246(0x212)]),_0x128c09=_0x3b0dea?T(_0x3b0dea['documentData'][_0x1da246(0x2ab)],_0x40b4e6[_0x1da246(0x212)]):void 0x0;if(!_0x3b0dea||!_0x29a759||!_0x128c09)return!0x1;let _0x50694c=Ct(_0x3b0dea['resource']);return _0x50694c[_0x1da246(0x214)][_0x40b4e6[_0x1da246(0x212)]]={..._0x29a759,..._0x40b4e6[_0x1da246(0x271)]?{'numberFormat':_0x40b4e6[_0x1da246(0x271)]}:null},_0x40b4e6[_0x1da246(0x271)]||delete _0x50694c[_0x1da246(0x214)][_0x40b4e6['rangeId']][_0x1da246(0x271)],J({'accessor':_0x484798,'document':_0x3b0dea[_0x1da246(0x289)],'unitId':_0x3b0dea['unitId'],'trigger':G['id'],'rangeId':_0x40b4e6[_0x1da246(0x212)],'previousResource':_0x3b0dea[_0x1da246(0x1d4)],'nextResource':_0x50694c,'cursorOffset':_0x128c09[_0x1da246(0x285)]+0x1,'externalMutations':{}});}},K={'id':_0x34c9f2(0x1e3),'type':_0x3d8c4d[_0x34c9f2(0x2a0)],'handler':(_0x2a4240,_0x328bf6)=>ut(_0x2a4240,_0x328bf6,'',K['id'])},ct={'id':'docs-formula.command.replace-with-text','type':_0x3d8c4d[_0x34c9f2(0x2a0)],'handler':(_0x2b4a2e,_0x5f51c2)=>ut(_0x2b4a2e,_0x5f51c2,(_0x5f51c2==null?void 0x0:_0x5f51c2['text'])??'',ct['id'])},lt={'id':_0x34c9f2(0x29d),'type':_0x3d8c4d[_0x34c9f2(0x2a0)],'handler':(_0x5a3d76,_0x136fc2)=>{const _0x450364=_0x34c9f2;if(!(_0x136fc2!=null&&_0x136fc2['rangeId']))return!0x1;let _0x4ff79f=q(_0x5a3d76,_0x136fc2[_0x450364(0x24b)],'');if(!_0x4ff79f)return!0x1;let _0x345678=_0x5a3d76[_0x450364(0x1ff)](L)[_0x450364(0x25a)]({'unitId':_0x4ff79f['unitId'],'rangeId':_0x136fc2[_0x450364(0x212)]});return _0x345678?ut(_0x5a3d76,_0x136fc2,_0x345678[_0x450364(0x282)],lt['id']):!0x1;}};function ut(_0x1c7aeb,_0x5ed69c,_0x1572b5,_0xac1785){const _0x1b1302=_0x34c9f2;if(!(_0x5ed69c!=null&&_0x5ed69c[_0x1b1302(0x212)]))return!0x1;let _0x33ae45=q(_0x1c7aeb,_0x5ed69c[_0x1b1302(0x24b)],'');if(!_0x33ae45)return!0x1;let _0x1f6714=Be({'documentData':_0x33ae45[_0x1b1302(0x2a7)],'resource':_0x33ae45[_0x1b1302(0x1d4)],'rangeId':_0x5ed69c[_0x1b1302(0x212)],'text':_0x1572b5});return _0x1f6714?J({'accessor':_0x1c7aeb,'document':_0x33ae45['document'],'unitId':_0x33ae45[_0x1b1302(0x24b)],'trigger':_0xac1785,'rangeId':_0x5ed69c['rangeId'],'previousResource':_0x33ae45['resource'],'nextResource':_0x1f6714['nextResource'],'previousDocumentData':_0x33ae45[_0x1b1302(0x2a7)],'nextDocumentData':_0x1f6714['nextDocumentData'],'cursorOffset':_0x1f6714[_0x1b1302(0x256)],'externalMutations':{}}):!0x1;}function q(_0x2e0241,_0x5b8b2e,_0x721619){const _0x1f5ccf=_0x34c9f2;if(_0x721619)return null;let _0x3c61c9=_0x2e0241[_0x1f5ccf(0x1ff)](_0x35f474),_0x44ec47=(_0x5b8b2e?_0x3c61c9[_0x1f5ccf(0x1e4)](_0x5b8b2e,_0x9cc7bc[_0x1f5ccf(0x259)]):_0x3c61c9[_0x1f5ccf(0x2c2)](_0x9cc7bc['UNIVER_DOC']))??null;if(!_0x44ec47)return null;let _0x3138f5=_0x44ec47[_0x1f5ccf(0x281)](),_0x2a6252=_0x3138f5[_0x1f5ccf(0x2ab)];if(_0x3138f5[_0x1f5ccf(0x226)]||!_0x2a6252)return null;let _0x1ec377=_0x2e0241[_0x1f5ccf(0x1ff)](P);return _0x1ec377['getLoadError'](_0x44ec47[_0x1f5ccf(0x1f2)]())?null:{'document':_0x44ec47,'body':_0x2a6252,'documentData':_0x3138f5,'model':_0x1ec377,'resource':_0x1ec377[_0x1f5ccf(0x284)](_0x44ec47['getUnitId']())??b(),'unitId':_0x44ec47[_0x1f5ccf(0x1f2)]()};}function dt(_0x24d41f,_0x5314c5){const _0x301c83=_0x34c9f2;var _0x57fb6f;return(_0x57fb6f=_0x24d41f[_0x301c83(0x1ff)](_0x1841de)[_0x301c83(0x1d8)]({'subUnitId':_0x5314c5,'unitId':_0x5314c5}))==null?void 0x0:_0x57fb6f[0x0];}function ft(_0x3a81b8,_0x254d1f,_0x5c9e40){const _0x2c569c=_0x34c9f2;if((_0x3a81b8==null?void 0x0:_0x3a81b8['type'])===_0x2c569c(0x286)){var _0x326a5f;let _0x7b68b5=((_0x326a5f=_0x254d1f[_0x2c569c(0x27f)])==null?void 0x0:_0x326a5f[_0x2c569c(0x229)](_0x19a101=>_0x19a101['paragraphId']===_0x3a81b8[_0x2c569c(0x1d0)]))??[];if(_0x7b68b5[_0x2c569c(0x2c1)]!==0x1)return null;let _0x3640fd=_0x7b68b5[0x0],_0x34d96f=_0x44d00(_0x254d1f,_0x3640fd),_0x388779=_0x3640fd[_0x2c569c(0x25c)]-_0x34d96f,_0x4d9aa0=_0x3a81b8[_0x2c569c(0x296)]===_0x2c569c(0x297)?_0x388779:_0x3a81b8[_0x2c569c(0x296)];if(!Number['isInteger'](_0x4d9aa0)||_0x4d9aa0<0x0||_0x4d9aa0>_0x388779)return null;let _0x3543f8=_0x34d96f+_0x4d9aa0;return{'startOffset':_0x3543f8,'endOffset':_0x3543f8};}if((_0x3a81b8==null?void 0x0:_0x3a81b8[_0x2c569c(0x278)])===_0x2c569c(0x210))return!Number[_0x2c569c(0x1fa)](_0x3a81b8[_0x2c569c(0x262)])||!Number[_0x2c569c(0x1fa)](_0x3a81b8[_0x2c569c(0x251)])?null:{'startOffset':Math[_0x2c569c(0x232)](_0x3a81b8[_0x2c569c(0x262)],_0x3a81b8['endOffset']),'endOffset':Math[_0x2c569c(0x241)](_0x3a81b8[_0x2c569c(0x262)],_0x3a81b8[_0x2c569c(0x251)])};let _0x1ef499=(_0x3a81b8==null?void 0x0:_0x3a81b8[_0x2c569c(0x278)])===_0x2c569c(0x272)?_0x3a81b8['selection']:_0x5c9e40;return!_0x1ef499||_0x1ef499[_0x2c569c(0x1f0)]?null:{'startOffset':Math[_0x2c569c(0x232)](_0x1ef499[_0x2c569c(0x262)],_0x1ef499[_0x2c569c(0x251)]),'endOffset':Math['max'](_0x1ef499[_0x2c569c(0x262)],_0x1ef499[_0x2c569c(0x251)])};}function pt(_0x3e6850,_0x5f579d,_0x5ad614,_0x79382){const _0x3e0385=_0x34c9f2;let _0x5036a7=_0x3e6850['get'](_0x2ea0aa),_0x5f10a4=_0x5ad614[_0x3e0385(0x274)]('=')?_0x5ad614[_0x3e0385(0x23c)](0x1):_0x5ad614,_0x195fe0=_0x5036a7[_0x3e0385(0x1db)](_0x5f10a4);if(!_0x195fe0)return null;let _0x503568=_0x3e6850[_0x3e0385(0x1ff)](_0x598fe),_0x409e25=_0xc8a733({'qualifiers':_0x51ffff(_0x195fe0),'explicitReferences':_0x79382??[],'resolveBinding':_0x4f881b=>_0x503568[_0x3e0385(0x25f)](_0x5f579d,_0x4f881b)});return _0x409e25[_0x3e0385(0x216)]===_0x3e0385(0x1f5)?_0x409e25[_0x3e0385(0x227)]:null;}function mt(_0x4b6f34,_0x10a56b,_0x1a7bae){const _0xdf7525=_0x34c9f2;var _0x19c741;let _0x1ee56e=_0x23fed8(0x6);for(;_0x4b6f34!=null&&(_0x19c741=_0x4b6f34[_0xdf7525(0x2b7)])!=null&&_0x19c741[_0xdf7525(0x23a)](_0x1d40d8=>_0x1d40d8['rangeId']===_0x1ee56e)||_0x10a56b['getFormula'](_0x1a7bae,_0x1ee56e);)_0x1ee56e=_0x23fed8(0x6);return _0x1ee56e;}function ht(_0x29c252){try{return Re(_0x29c252);}catch(_0x293e10){if(_0x293e10 instanceof C)return null;throw _0x293e10;}}function gt(_0x43f515){const _0x20ecf7=_0x34c9f2;let _0x4a8589=_0x43f515[_0x20ecf7(0x1e6)]&&_0x43f515[_0x20ecf7(0x247)]?vt(_0x43f515[_0x20ecf7(0x289)],_0x43f515['unitId'],_0x43f515[_0x20ecf7(0x1e6)],_0x43f515['nextDocumentData'],_0x43f515[_0x20ecf7(0x256)],_0x43f515[_0x20ecf7(0x225)]):null;return _0x43f515[_0x20ecf7(0x1e6)]&&_0x43f515[_0x20ecf7(0x247)]&&!_0x4a8589?null:{'documentRedo':_0x4a8589,'resourceRedo':{'id':V['id'],'params':{'unitId':_0x43f515[_0x20ecf7(0x24b)],'resource':_0x43f515[_0x20ecf7(0x2c8)]}},'resourceUndo':{'id':V['id'],'params':{'unitId':_0x43f515[_0x20ecf7(0x24b)],'resource':_0x43f515['previousResource']}}};}function _t(_0x686c56,_0x5cf636,_0x59c45a,_0x2c1feb){const _0x31dc43=_0x34c9f2;_0x2c1feb[_0x31dc43(0x29b)]({'id':_0x686c56[_0x31dc43(0x225)]+':'+_0x686c56[_0x31dc43(0x212)],'unitID':_0x686c56['unitId'],'redoMutations':[..._0x686c56[_0x31dc43(0x248)]['redoMutation']?[_0x686c56[_0x31dc43(0x248)][_0x31dc43(0x215)]]:[],..._0x5cf636[_0x31dc43(0x264)]?[_0x5cf636[_0x31dc43(0x264)]]:[],_0x5cf636[_0x31dc43(0x2a9)]],'undoMutations':[_0x5cf636[_0x31dc43(0x202)],..._0x59c45a?[_0x59c45a]:[],..._0x686c56['externalMutations'][_0x31dc43(0x2a2)]?[_0x686c56[_0x31dc43(0x248)]['undoMutation']]:[]]});}function J(_0x4e1a85){const _0x32a94d=_0x34c9f2;let _0x4f1779=_0x4e1a85['accessor'][_0x32a94d(0x1ff)](_0x1fba3b),_0x6cc367=_0x4e1a85[_0x32a94d(0x267)][_0x32a94d(0x1ff)](_0x6bc219),_0x4f8127=_0x4e1a85[_0x32a94d(0x267)][_0x32a94d(0x1ff)](_0x1841de),_0x83d72b=gt(_0x4e1a85);if(!_0x83d72b)return!0x1;let _0x313e89=!0x1,_0x1ec61d=null,_0x1f2b2f=!0x1;try{if(_0x4e1a85[_0x32a94d(0x248)][_0x32a94d(0x215)]){if(!_0x4f1779[_0x32a94d(0x242)](_0x4e1a85[_0x32a94d(0x248)][_0x32a94d(0x215)]['id'],_0x4e1a85[_0x32a94d(0x248)][_0x32a94d(0x215)][_0x32a94d(0x1f6)]))return!0x1;_0x313e89=!0x0;}if(_0x83d72b[_0x32a94d(0x264)]){let _0xca81f3=_0x4f1779[_0x32a94d(0x242)](_0x83d72b['documentRedo']['id'],_0x83d72b['documentRedo']['params']);if(!_0xca81f3)return bt(_0x4f1779,_0x4e1a85['externalMutations'],_0x313e89),!0x1;_0x1ec61d={'id':_0x26272f['id'],'params':{..._0xca81f3,'noHistory':!0x0,'noNeedSetTextRange':!0x0,'segmentId':''}};}if(!_0x4f1779[_0x32a94d(0x242)](_0x83d72b['resourceRedo']['id'],_0x83d72b[_0x32a94d(0x2a9)][_0x32a94d(0x1f6)]))return yt(_0x4f1779,_0x1ec61d),bt(_0x4f1779,_0x4e1a85[_0x32a94d(0x248)],_0x313e89),!0x1;_0x1f2b2f=!0x0,_t(_0x4e1a85,_0x83d72b,_0x1ec61d,_0x6cc367);}catch(_0x4dccb4){throw _0x1f2b2f&&_0x4f1779['syncExecuteCommand'](_0x83d72b[_0x32a94d(0x202)]['id'],_0x83d72b[_0x32a94d(0x202)][_0x32a94d(0x1f6)]),yt(_0x4f1779,_0x1ec61d),bt(_0x4f1779,_0x4e1a85[_0x32a94d(0x248)],_0x313e89),_0x4dccb4;}return _0x4f8127[_0x32a94d(0x20d)]([{'startOffset':_0x4e1a85[_0x32a94d(0x256)],'endOffset':_0x4e1a85[_0x32a94d(0x256)],'segmentId':''}],{'unitId':_0x4e1a85['unitId'],'subUnitId':_0x4e1a85[_0x32a94d(0x24b)]},!0x1,{[_0x291f0f]:!0x0}),!0x0;}function vt(_0x58e0e5,_0x170e0a,_0x55e688,_0x5f402,_0x346ed0,_0x7647ae){let _0x2124af=xt(_0x55e688,_0x5f402,_0x38047f(_0x58e0e5,''));return _0x2124af?{'id':_0x26272f['id'],'params':{'unitId':_0x170e0a,'actions':_0x2124af,'segmentId':'','textRanges':[{'startOffset':_0x346ed0,'endOffset':_0x346ed0,'collapsed':!0x0,'segmentId':''}],'isEditing':!0x1,'noHistory':!0x0,'noNeedSetTextRange':!0x0,'trigger':_0x7647ae}}:null;}function yt(_0x1a4287,_0x46fa67){const _0x26ab8a=_0x34c9f2;_0x46fa67&&_0x1a4287[_0x26ab8a(0x242)](_0x46fa67['id'],_0x46fa67['params']);}function bt(_0x2680ee,_0x3ae5e9,_0xa7024c){const _0x170c0d=_0x34c9f2;_0xa7024c&&_0x3ae5e9[_0x170c0d(0x2a2)]&&_0x2680ee[_0x170c0d(0x242)](_0x3ae5e9[_0x170c0d(0x2a2)]['id'],_0x3ae5e9['undoMutation'][_0x170c0d(0x1f6)]);}function xt(_0x2b54a6,_0x3cbd5c,_0x4a1590){const _0x51fad9=_0x34c9f2;let _0x2344aa=_0x2b54a6[_0x51fad9(0x2ab)],_0x5dfe35=_0x3cbd5c[_0x51fad9(0x2ab)],_0x20e1e6=St(_0x2344aa==null?void 0x0:_0x2344aa[_0x51fad9(0x1de)],_0x5dfe35==null?void 0x0:_0x5dfe35[_0x51fad9(0x1de)]);if(!_0x20e1e6||!_0x5dfe35)return null;let _0x9074ac=new _0x283512();return _0x9074ac[_0x51fad9(0x299)](_0x20e1e6['start']),_0x20e1e6[_0x51fad9(0x29c)]>0x0&&_0x9074ac[_0x51fad9(0x25d)](_0x20e1e6[_0x51fad9(0x29c)],_0x2ffd0f(_0x5dfe35,_0x20e1e6['start'],_0x20e1e6[_0x51fad9(0x22f)]+_0x20e1e6[_0x51fad9(0x29c)],!0x1)),_0x20e1e6[_0x51fad9(0x208)]>0x0&&_0x9074ac[_0x51fad9(0x287)](_0x20e1e6[_0x51fad9(0x208)]),_0x42e010['getInstance']()[_0x51fad9(0x201)](_0x9074ac['serialize'](),_0x4a1590);}function St(_0x3eb6ce,_0x568f33){const _0x19e2fd=_0x34c9f2;if(_0x3eb6ce==null||_0x568f33==null||_0x3eb6ce===_0x568f33)return null;let _0x69a4e7=0x0;for(;_0x69a4e7<_0x3eb6ce[_0x19e2fd(0x2c1)]&&_0x69a4e7<_0x568f33[_0x19e2fd(0x2c1)]&&_0x3eb6ce[_0x69a4e7]===_0x568f33[_0x69a4e7];)_0x69a4e7+=0x1;let _0x16a404=_0x3eb6ce['length'],_0x590359=_0x568f33[_0x19e2fd(0x2c1)];for(;_0x16a404>_0x69a4e7&&_0x590359>_0x69a4e7&&_0x3eb6ce[_0x16a404-0x1]===_0x568f33[_0x590359-0x1];)--_0x16a404,--_0x590359;return{'start':_0x69a4e7,'deleteLength':_0x16a404-_0x69a4e7,'insertLength':_0x590359-_0x69a4e7};}function Ct(_0xd5a7fd){const _0x3c05b5=_0x34c9f2;return{'schemaVersion':0x1,'formulas':Object['fromEntries'](Object[_0x3c05b5(0x2ad)](_0xd5a7fd[_0x3c05b5(0x214)])[_0x3c05b5(0x26d)](([_0x553824,_0x3cbab0])=>[_0x553824,{..._0x3cbab0,..._0x3cbab0[_0x3c05b5(0x271)]?{'numberFormat':{..._0x3cbab0[_0x3c05b5(0x271)]}}:null,..._0x3cbab0[_0x3c05b5(0x21f)]?{'lastValue':{..._0x3cbab0[_0x3c05b5(0x21f)]}}:null}]))};}let Y=class extends _0x49a82f{constructor(_0x280f00,_0x4820ec,_0xb233fe,_0x331b89){const _0x22723e=_0x34c9f2;super(),this[_0x22723e(0x298)]=_0x280f00,this[_0x22723e(0x2b8)]=_0x4820ec,this['_model']=_0xb233fe,this[_0x22723e(0x27a)]=_0x331b89,N(this,_0x22723e(0x1ec),new Set()),N(this,_0x22723e(0x1e8),!0x1),N(this,'_isDisposed',!0x1),this['_instanceService'][_0x22723e(0x290)](_0x9cc7bc[_0x22723e(0x259)])[_0x22723e(0x230)](_0x1390d4=>this[_0x22723e(0x27a)]['syncUnit'](_0x1390d4)),this[_0x22723e(0x249)](this[_0x22723e(0x1f3)][_0x22723e(0x2ba)][_0x22723e(0x283)](({unitId:_0x22f4a2})=>this[_0x22723e(0x260)](_0x22f4a2))),this[_0x22723e(0x249)](this[_0x22723e(0x298)]['unitAdded$']['subscribe'](({unit:_0x423dd2})=>{const _0x582255=_0x22723e;_0x423dd2[_0x582255(0x278)]===_0x9cc7bc[_0x582255(0x259)]&&this[_0x582255(0x240)](_0x423dd2[_0x582255(0x1f2)]());})),this['disposeWithMe'](this[_0x22723e(0x298)]['unitDisposed$'][_0x22723e(0x283)](_0x359dc6=>{const _0x352a26=_0x22723e;this['_service']['unregisterUnit'](_0x359dc6[_0x352a26(0x1f2)]());})),this['disposeWithMe'](this[_0x22723e(0x2b8)][_0x22723e(0x29a)](_0x2ed073=>{const _0xac8161=_0x22723e;if(_0x2ed073['id']===_0x26272f['id']&&wt(_0x2ed073[_0xac8161(0x1f6)])){let _0x18c9bf=_0x2ed073['params'];_0x18c9bf[_0xac8161(0x1f0)]||this[_0xac8161(0x260)](_0x18c9bf[_0xac8161(0x24b)]);}}));}[_0x34c9f2(0x1d1)](){const _0xc47545=_0x34c9f2;this[_0xc47545(0x292)]=!0x0,super[_0xc47545(0x1d1)]();}[_0x34c9f2(0x240)](_0x392403){const _0x897751=_0x34c9f2;this[_0x897751(0x1ec)][_0x897751(0x21b)](_0x392403),!this[_0x897751(0x1e8)]&&(this[_0x897751(0x1e8)]=!0x0,queueMicrotask(()=>{const _0x3f46f8=_0x897751;if(this['_syncScheduled']=!0x1,this[_0x3f46f8(0x292)])return;let _0x29e46d=Array[_0x3f46f8(0x1f4)](this['_pendingUnitIds']);this[_0x3f46f8(0x1ec)][_0x3f46f8(0x26c)](),_0x29e46d[_0x3f46f8(0x230)](_0x1e6e88=>this[_0x3f46f8(0x260)](_0x1e6e88));}));}['_syncUnit'](_0x2976fc){const _0xdf46c5=_0x34c9f2;let _0x579fbf=this['_instanceService'][_0xdf46c5(0x1e4)](_0x2976fc,_0x9cc7bc[_0xdf46c5(0x259)]);_0x579fbf&&this[_0xdf46c5(0x27a)][_0xdf46c5(0x234)](_0x579fbf);}};Y=I([F(0x0,_0x35f474),F(0x1,_0x1fba3b),F(0x2,_0x5c5393(P)),F(0x3,_0x5c5393(L))],Y);function wt(_0x227a8f){const _0x2d4c3f=_0x34c9f2;return typeof _0x227a8f=='object'&&!!_0x227a8f&&_0x2d4c3f(0x24b)in _0x227a8f&&typeof _0x227a8f[_0x2d4c3f(0x24b)]==_0x2d4c3f(0x1d5)&&(!(_0x2d4c3f(0x1f0)in _0x227a8f)||_0x227a8f[_0x2d4c3f(0x1f0)]===void 0x0||typeof _0x227a8f[_0x2d4c3f(0x1f0)]==_0x2d4c3f(0x1d5));}let X=class extends _0x49a82f{constructor(_0x778ade,_0x1075b2){const _0x43b250=_0x34c9f2;super(),this[_0x43b250(0x1d6)]=_0x778ade,this[_0x43b250(0x219)]=_0x1075b2,this[_0x43b250(0x249)](this['_resourceManagerService']['registerPluginResource']({'pluginName':y,'businesses':[_0x9cc7bc[_0x43b250(0x259)]],'toJson':_0x140ada=>JSON[_0x43b250(0x275)](this[_0x43b250(0x219)][_0x43b250(0x27e)](_0x140ada)),'parseJson':_0x4b7256=>JSON[_0x43b250(0x237)](_0x4b7256),'onLoad':(_0x316212,_0x340225)=>{const _0x343109=_0x43b250;this[_0x343109(0x219)][_0x343109(0x2a6)](_0x316212,_0x340225);},'onUnLoad':_0x3a11de=>this[_0x43b250(0x219)]['removeUnit'](_0x3a11de)}));}};X=I([F(0x0,_0x674a1c),F(0x1,_0x5c5393(P))],X);var Tt='@univerjs-pro/docs-formula',Et=_0x34c9f2(0x1e7);const Dt={};let Z=class extends _0x49a82f{constructor(_0x2472f5,_0xd16fc2,_0x38ee2d){const _0x205c08=_0x34c9f2;super(),this[_0x205c08(0x28b)]=_0x2472f5,this[_0x205c08(0x238)]=_0xd16fc2,this[_0x205c08(0x249)](_0x38ee2d[_0x205c08(0x2a4)]({'resolve':(_0x540fa3,_0x377245)=>{const _0x4400b1=_0x205c08;var _0x532f47;return((_0x532f47=_0x377245['customRanges'])==null?void 0x0:_0x532f47[_0x4400b1(0x229)](w)['map'](_0x1d05ad=>({'startOffset':_0x1d05ad['startIndex'],'endOffset':_0x1d05ad[_0x4400b1(0x285)]+0x1,'text':this[_0x4400b1(0x28d)](_0x540fa3,_0x1d05ad[_0x4400b1(0x212)])})))??[];}})),this[_0x205c08(0x249)](this[_0x205c08(0x238)][_0x205c08(0x268)][_0x205c08(0x283)](({unitId:_0x1161f4})=>{const _0x1b0c8c=_0x205c08;_0x38ee2d[_0x1b0c8c(0x2b9)](_0x1161f4);}));}[_0x34c9f2(0x28d)](_0x23ff72,_0xb5750d){const _0x41a43a=_0x34c9f2;var _0x177ff0;return((_0x177ff0=this[_0x41a43a(0x238)][_0x41a43a(0x25a)]({'unitId':_0x23ff72,'rangeId':_0xb5750d}))==null?void 0x0:_0x177ff0['text'])??'';}[_0x34c9f2(0x211)](_0x18af5b,_0x36a2bb,_0x5ca176){const _0x58d10=_0x34c9f2;var _0x5bf26b;let _0x218d2a=this['_univerInstanceService'][_0x58d10(0x1e4)](_0x18af5b,_0x9cc7bc[_0x58d10(0x259)]),_0x576fb3=_0x218d2a==null?void 0x0:_0x218d2a['getBody']();if(!_0x576fb3)return'';let _0x111d5a=_0x576fb3[_0x58d10(0x1de)][_0x58d10(0x23c)](_0x36a2bb,_0x5ca176),_0x2b1c45=((_0x5bf26b=_0x576fb3['customRanges'])==null?void 0x0:_0x5bf26b[_0x58d10(0x229)](_0x235467=>w(_0x235467)&&_0x235467['startIndex']>=_0x36a2bb&&_0x235467[_0x58d10(0x285)]<_0x5ca176)[_0x58d10(0x26f)]((_0x504d07,_0x553e6e)=>_0x553e6e[_0x58d10(0x25c)]-_0x504d07[_0x58d10(0x25c)]))??[];for(let _0x461f6a of _0x2b1c45){let _0x374092=_0x461f6a['startIndex']-_0x36a2bb,_0x29609b=_0x461f6a[_0x58d10(0x285)]-_0x36a2bb+0x1;_0x111d5a=''+_0x111d5a[_0x58d10(0x23c)](0x0,_0x374092)+this[_0x58d10(0x28d)](_0x18af5b,_0x461f6a['rangeId'])+_0x111d5a[_0x58d10(0x23c)](_0x29609b);}return _0x111d5a;}[_0x34c9f2(0x257)](_0x43c0f8){return Ot(_0x43c0f8);}[_0x34c9f2(0x2b0)](_0x5f4c20,_0x268d63,_0x5f4f4f={}){const _0x55baae=_0x34c9f2;var _0x5908ca;return Ve({'id':_0x5f4c20,'body':_0x268d63,'documentStyle':{}},(((_0x5908ca=_0x268d63[_0x55baae(0x2b7)])==null?void 0x0:_0x5908ca['filter'](w))??[])['map'](_0xd5b6f5=>({'rangeId':_0xd5b6f5[_0x55baae(0x212)],'text':_0x5f4f4f[_0xd5b6f5[_0x55baae(0x212)]]??this[_0x55baae(0x28d)](_0x5f4c20,_0xd5b6f5[_0x55baae(0x212)])})))['body']??{'dataStream':''};}};Z=I([F(0x0,_0x35f474),F(0x1,_0x5c5393(L)),F(0x2,_0x5c5393(_0x557df1))],Z);function Ot(_0x503517){const _0x20a230=_0x34c9f2;var _0x35edca,_0x3bbbaa;let _0x1cbb04=kt(_0x503517),_0x4af208=Ve(_0x503517,(((_0x35edca=_0x503517[_0x20a230(0x2ab)])==null||(_0x35edca=_0x35edca[_0x20a230(0x2b7)])==null?void 0x0:_0x35edca[_0x20a230(0x229)](w))??[])[_0x20a230(0x26d)](_0x289ef1=>({'rangeId':_0x289ef1[_0x20a230(0x212)],'text':At(_0x1cbb04==null?void 0x0:_0x1cbb04[_0x20a230(0x214)][_0x289ef1[_0x20a230(0x212)]])})));return _0x4af208[_0x20a230(0x265)]=(_0x3bbbaa=_0x4af208['resources'])==null?void 0x0:_0x3bbbaa[_0x20a230(0x229)](_0xe5d3ea=>_0xe5d3ea[_0x20a230(0x220)]!==y),_0x4af208;}function kt(_0x40f534){const _0x3d1b75=_0x34c9f2;var _0x1d23c7;let _0x44a313=(_0x1d23c7=_0x40f534[_0x3d1b75(0x265)])==null||(_0x1d23c7=_0x1d23c7['find'](_0x1b4957=>_0x1b4957[_0x3d1b75(0x220)]===_0x3d1b75(0x26b)))==null?void 0x0:_0x1d23c7[_0x3d1b75(0x24c)];if(_0x44a313)try{let _0x396568=JSON[_0x3d1b75(0x237)](_0x44a313);return x(_0x396568)?_0x396568:void 0x0;}catch{return;}}function At(_0x2ac03b){const _0x438b01=_0x34c9f2;return _0x2ac03b?_0x44276e({'lastValue':_0x2ac03b['lastValue'],'numberFormat':_0x2ac03b[_0x438b01(0x271)]})[_0x438b01(0x282)]:'';}let Q=class extends _0x49a82f{constructor(_0x21e517,_0x3a79ff,_0x48ca5b){const _0x607f01=_0x34c9f2;super(),this[_0x607f01(0x238)]=_0x21e517,this[_0x607f01(0x1d2)]=_0x3a79ff,this[_0x607f01(0x249)](_0x48ca5b['registerProvider'](this));}[_0x34c9f2(0x1d9)](_0x5cfc53){const _0x3a073f=_0x34c9f2;let _0x117375=new Map();for(let _0x84fce6 of this['_formulaService']['getRegisteredFormulas']()){var _0x837586;if(!this[_0x3a073f(0x1d2)][_0x3a073f(0x24e)](_0x84fce6[_0x3a073f(0x1ef)][_0x3a073f(0x20f)],_0x84fce6[_0x3a073f(0x2a1)])['eligible'])continue;let _0x3b4d43=_0x477060(_0x84fce6[_0x3a073f(0x2a1)]),_0x28aa71=_0x3b4d43?_0x16967c(_0x3b4d43):null;if(!_0x28aa71||jt(_0x84fce6[_0x3a073f(0x1ef)]['lastValue'],_0x28aa71))continue;let _0x17a49e=_0x117375[_0x3a073f(0x1ff)](_0x84fce6[_0x3a073f(0x228)]['unitId'])??[];_0x17a49e[_0x3a073f(0x2af)]({'rangeId':_0x84fce6[_0x3a073f(0x228)][_0x3a073f(0x212)],'expectedFormula':_0x84fce6[_0x3a073f(0x1ef)]['formula'],'expectedNumberFormat':(_0x837586=_0x84fce6['config'][_0x3a073f(0x271)])==null?void 0x0:_0x837586['pattern'],'expectedReferenceRevision':_0x84fce6[_0x3a073f(0x2bd)],'lastValue':_0x28aa71}),_0x117375[_0x3a073f(0x252)](_0x84fce6[_0x3a073f(0x228)]['unitId'],_0x17a49e);}return Array[_0x3a073f(0x1f4)](_0x117375,([_0x4117f6,_0x5d1d3a])=>({'id':H['id'],'params':{'unitId':_0x4117f6,'updates':_0x5d1d3a}}));}};Q=I([F(0x0,_0x5c5393(L)),F(0x1,_0x5c5393(_0x168d95)),F(0x2,_0x5c5393(_0x442e83))],Q);function jt(_0x47cf81,_0x4b0dad){const _0x2c0178=_0x34c9f2;return(_0x47cf81==null?void 0x0:_0x47cf81['v'])===_0x4b0dad['v']&&(_0x47cf81==null?void 0x0:_0x47cf81['t'])===_0x4b0dad['t']&&(_0x47cf81==null?void 0x0:_0x47cf81[_0x2c0178(0x244)])===_0x4b0dad[_0x2c0178(0x244)];}let $=class extends _0x530da8{constructor(_0x4ed583=Dt,_0x4fad2c,_0x12bee5,_0x303e59){const _0x5a9665=_0x34c9f2;super(),this[_0x5a9665(0x1e0)]=_0x4ed583,this[_0x5a9665(0x258)]=_0x4fad2c,this[_0x5a9665(0x2b8)]=_0x12bee5,this['_configService']=_0x303e59;let {..._0x341519}=_0x2e4085({},Dt,this[_0x5a9665(0x1e0)]);this[_0x5a9665(0x1fe)][_0x5a9665(0x1dc)](_0x5a9665(0x293),_0x341519);}[_0x34c9f2(0x269)](){const _0x46442d=_0x34c9f2;this[_0x46442d(0x258)]['add']([P]),this[_0x46442d(0x258)][_0x46442d(0x21b)]([L]),this[_0x46442d(0x258)]['add']([X]),this['_injector'][_0x46442d(0x21b)]([Y]),this[_0x46442d(0x258)][_0x46442d(0x21b)]([Q]),this[_0x46442d(0x258)][_0x46442d(0x21b)]([Z]),_0x6f29f6(this['_injector'],[[P],[X],[Y],[Q],[Z]]),[ot,st,V,H,U,W,G,K,ct,lt][_0x46442d(0x230)](_0x2ed1ef=>this[_0x46442d(0x249)](this[_0x46442d(0x2b8)][_0x46442d(0x2b4)](_0x2ed1ef)));}};N($,_0x34c9f2(0x1f9),y),N($,'packageName',Tt),N($,_0x34c9f2(0x235),Et),N($,_0x34c9f2(0x278),_0x9cc7bc['UNIVER_DOC']),$=I([_0x962570(_0x16ebc7,_0x4266a3,_0x4c3072),F(0x1,_0x5c5393(_0x57c044)),F(0x2,_0x1fba3b),F(0x3,_0x4eefec)],$);function _0x35ee(){const _0x4f783d=['end','_instanceService','retain','onCommandExecuted','pushUndoRedo','insertLength','docs-formula.command.convert-to-text','870816XWeFIR','presentation','COMMAND','liveResult','undoMutation','getFormula','register','values','load','documentData','isArray','resourceRedo','COLUMN_GROUP_END','body','customDecorations','entries','docs-formula.command.set-number-format','push','degradeBody','pending','asObservable','PARAGRAPH','registerCommand','_loadErrors','MUTATION','customRanges','_commandService','notifyTextChanged','change$','every','formulaResult$','referenceRevision','docs-formula.mutation.remove-formula','empty','4795nPPyms','length','getCurrentUnitOfType','removeUnit','decorate','1669752CIXeqq','docs-formula.mutation.set-resource','error','nextResource','getOwnPropertyDescriptor','getPresentation','paragraphId','dispose','_cacheEligibilityService','getLoadError','resource','string','_resourceManagerService','Document\x20main\x20body\x20is\x20required\x20to\x20insert\x20Doc\x20Formula.','getTextRanges','collectMutations','COLUMN_END','sequenceNodesBuilder','setConfig','number','dataStream','_registrations','_config','TABLE_CELL_END','kind','docs-formula.command.remove','getUnit','COLUMN_START','previousDocumentData','1.0.3','_syncScheduled','_formulaKeys','750djySEq','_deleteRegistration','_pendingUnitIds','endsWith','43006RwjXnG','config','segmentId','_updateFormulaResult','getUnitId','_model','from','resolved','params','2248944klvGRE','schemaVersion','pluginName','isInteger','docs-formula.command.insert','4BXuSrP','stale','_configService','get','symbol','editOp','resourceUndo','docs-formula.mutation.set-formula','_change$','BLOCK_START','find','defineProperty','deleteLength','getRegisteredFormulas','formulaId','textRuns','blockRanges','replaceDocRanges','iterator','formula','range','resolveText','rangeId','COLUMN_GROUP_START','formulas','redoMutation','status','success','source','_docFormulaModel','removeFormula','add','EMPTY','toPrimitive','_rawResources','lastValue','name','tables','docs-formula.command.update','externalReferences','object','trigger','disabled','references','identity','filter','19025QOxAzn','next','model','13449880sXIaBd','getFormulas','start','forEach','color','min','properties','syncUnit','version','cell','parse','_formulaService','DOC','some','23umGGwg','slice','CUSTOM_BLOCK','sectionBreaks','_hostExternalReferenceModel','_queueSync','max','syncExecuteCommand','unsupported-version','pattern','CUSTOM','columnGroups','nextDocumentData','externalMutations','disposeWithMe','keys','unitId','data','_preserveInvalid','assess','_resources','ERROR','endOffset','set','has','_setPresentation','target','cursorOffset','degradeDocumentData','_injector','UNIVER_DOC','getResult','default','startIndex','insert','univer-docs-formula','resolveBinding','_syncUnit','deepClone','startOffset','getFormulaValueSync','documentRedo','resources','TABLE_ROW_START','accessor','presentationChanged$','onStarting','setFormula','DOC_FORMULA_PLUGIN','clear','map','SECTION_BREAK','sort','unregister','numberFormat','selection','invalid-resource','startsWith','stringify','updates','getRevision','type','includes','_service','_registrationService','trim','customBlocks','serialize','paragraphs','_presentationChanged$','getSnapshot','text','subscribe','getResource','endIndex','paragraph','delete','BLOCK_END','document','prototype','_univerInstanceService','unregisterUnit','resolveFormula','wholeEntity','setFormulas','getAllUnitsForType','docs-formula.mutation.set-last-values','_isDisposed','docs-formula.config','complete','setResource','position'];_0x35ee=function(){return _0x4f783d;};return _0x35ee();}export{lt as ConvertDocFormulaToTextCommand,Me as DOC_FORMULA_CUSTOM_RANGE_KIND,Ne as DOC_FORMULA_OBJECT_REPLACEMENT,y as DOC_FORMULA_PLUGIN,je as DOC_FORMULA_SCHEMA_VERSION,Z as DocFormulaDisplayTextService,Y as DocFormulaLifecycleController,P as DocFormulaModel,X as DocFormulaResourceController,it as DocFormulaResultStatus,L as DocFormulaService,U as InsertDocFormulaCommand,C as InvalidDocFormulaInsertRangeError,K as RemoveDocFormulaCommand,st as RemoveDocFormulaMutation,ct as ReplaceDocFormulaWithTextCommand,H as SetDocFormulaLastValuesMutation,ot as SetDocFormulaMutation,G as SetDocFormulaNumberFormatCommand,V as SetDocFormulaResourceMutation,$ as UniverDocsFormulaPlugin,W as UpdateDocFormulaCommand,He as assertSafeDocFormulaInsertRange,Re as buildInsertDocFormulaActions,Be as buildRemoveDocFormulaActions,ze as buildUpdateDocFormulaActions,b as createEmptyDocFormulaResource,Ot as degradeDocFormulaDocumentData,T as findDocFormulaRange,Pe as isDocFormulaConfig,w as isDocFormulaRange,x as isDocFormulaResource,Fe as isFormulaLastValue};
1
+ const _0x3074bd=_0x1bc5;(function(_0x1bd644,_0x411508){const _0x49da13=_0x1bc5,_0x7c39f0=_0x1bd644();while(!![]){try{const _0x1d90b4=parseInt(_0x49da13(0xe9))/0x1+parseInt(_0x49da13(0x135))/0x2*(-parseInt(_0x49da13(0x119))/0x3)+parseInt(_0x49da13(0x174))/0x4+parseInt(_0x49da13(0x1c0))/0x5*(parseInt(_0x49da13(0x176))/0x6)+-parseInt(_0x49da13(0x197))/0x7+-parseInt(_0x49da13(0xf3))/0x8*(-parseInt(_0x49da13(0x167))/0x9)+parseInt(_0x49da13(0x110))/0xa*(-parseInt(_0x49da13(0x1d4))/0xb);if(_0x1d90b4===_0x411508)break;else _0x7c39f0['push'](_0x7c39f0['shift']());}catch(_0x949826){_0x7c39f0['push'](_0x7c39f0['shift']());}}}(_0x200b,0xca008));import{FormulaCacheEligibilityService as _0x142c68,FormulaLastValuePersistenceService as _0xdccf24,HostExternalReferenceModel as _0x51c26f,UniverProFormulaEnginePlugin as _0x1a7798,buildUpsertHostExternalReferenceMutations as _0x4bd97f,collectFormulaExternalReferenceQualifiers as _0x239d3f,getScalarFormulaResultCell as _0x329bd2,resolveFormulaResultPresentation as _0x43dcf8,resolveHostFormulaExternalReferences as _0x26b6bd,toFormulaLastValue as _0x2dfe02}from'@univerjs-pro/engine-formula';import{CellValueType as _0x235b15,CommandType as _0x49f619,CustomRangeType as _0x542b54,DataStreamTreeTokenType as _0x484270,DependentOn as _0x21eda0,Disposable as _0x5dc02b,ICommandService as _0x78f14b,IConfigService as _0x111e6a,IResourceManagerService as _0x3f723c,IUndoRedoService as _0x3e3a50,IUniverInstanceService as _0x5a1b75,Inject as _0x34e393,Injector as _0x37a854,JSONX as _0x4ed544,Plugin as _0x497bd3,TextX as _0x1b1246,Tools as _0x942fba,UniverInstanceType as _0x56d504,generateRandomId as _0x260a9d,getBodySliceForTextXAction as _0x27439c,getCustomRangeInterval as _0x528474,getParagraphContentStartOffset as _0x403d2a,getRichTextEditPath as _0x1d4096,merge as _0x5be025,shiftExclusiveRangeOnDelete as _0x2ee3d6,shiftExclusiveRangeOnInsert as _0x37b9bc,shiftInclusiveRangeOnDelete as _0x2bd672,shiftInclusiveRangeOnInsert as _0x528ea5,touchDependencies as _0x2d40f1}from'@univerjs/core';import{DOC_SELECTION_OPTION_PRESERVE_CARET as _0x169a9f,DocSelectionManagerService as _0x2711a1,DocTextResolverService as _0x572c95,RichTextEditingMutation as _0x40b755,UniverDocsPlugin as _0x515868}from'@univerjs/docs';import{FormulaResultStatus as _0x11c47e,LexerTreeBuilder as _0x3874f6,OtherFormulaBizType as _0x350834,RegisterOtherFormulaService as _0x3391af}from'@univerjs/engine-formula';import{Subject as _0x581576}from'rxjs';import{UniverLicensePlugin as _0x4342e7}from'@univerjs-pro/license';const y='DOC_FORMULA_PLUGIN',je=0x1,Me='univer-docs-formula',Ne='';function b(){return{'schemaVersion':0x1,'formulas':{}};}function x(_0x37ae32){const _0x4f5034=_0x1bc5;return!_0x37ae32||typeof _0x37ae32!=_0x4f5034(0x195)||!S(_0x37ae32,[_0x4f5034(0x102),_0x4f5034(0x151)])||!(_0x4f5034(0x102)in _0x37ae32)||_0x37ae32[_0x4f5034(0x102)]!==0x1||!(_0x4f5034(0x151)in _0x37ae32)||!_0x37ae32[_0x4f5034(0x151)]||typeof _0x37ae32[_0x4f5034(0x151)]!=_0x4f5034(0x195)||Array[_0x4f5034(0x11d)](_0x37ae32[_0x4f5034(0x151)])?!0x1:Object[_0x4f5034(0x1e1)](_0x37ae32[_0x4f5034(0x151)])['every'](([_0x1beef8,_0x3d04df])=>_0x1beef8[_0x4f5034(0x177)]>0x0&&Pe(_0x3d04df));}function Pe(_0x4c0c1e){const _0x2859c7=_0x1bc5;return!_0x4c0c1e||typeof _0x4c0c1e!=_0x2859c7(0x195)||!S(_0x4c0c1e,[_0x2859c7(0x1ce),_0x2859c7(0x1ba),'lastValue'])||!(_0x2859c7(0x1ce)in _0x4c0c1e)||typeof _0x4c0c1e[_0x2859c7(0x1ce)]!=_0x2859c7(0x165)||!_0x4c0c1e[_0x2859c7(0x1ce)]['trim']()||_0x2859c7(0x1ba)in _0x4c0c1e&&_0x4c0c1e[_0x2859c7(0x1ba)]!=null&&(typeof _0x4c0c1e[_0x2859c7(0x1ba)]!='object'||!S(_0x4c0c1e[_0x2859c7(0x1ba)],[_0x2859c7(0x128)])||!(_0x2859c7(0x128)in _0x4c0c1e[_0x2859c7(0x1ba)])||typeof _0x4c0c1e[_0x2859c7(0x1ba)][_0x2859c7(0x128)]!=_0x2859c7(0x165))?!0x1:!(_0x2859c7(0x13e)in _0x4c0c1e)||_0x4c0c1e[_0x2859c7(0x13e)]==null||Fe(_0x4c0c1e[_0x2859c7(0x13e)]);}function Fe(_0xa25a08){const _0x5d2dbb=_0x1bc5;return!_0xa25a08||typeof _0xa25a08!=_0x5d2dbb(0x195)||!S(_0xa25a08,['v','t',_0x5d2dbb(0x128)])||!('v'in _0xa25a08)||_0xa25a08['v']!==null&&typeof _0xa25a08['v']!=_0x5d2dbb(0x165)&&typeof _0xa25a08['v']!=_0x5d2dbb(0x193)&&typeof _0xa25a08['v']!=_0x5d2dbb(0x1bf)||'t'in _0xa25a08&&_0xa25a08['t']!=null&&!Ie(_0xa25a08['t'])?!0x1:!(_0x5d2dbb(0x128)in _0xa25a08)||_0xa25a08[_0x5d2dbb(0x128)]==null||typeof _0xa25a08[_0x5d2dbb(0x128)]=='string';}function S(_0x109870,_0x31cfb4){const _0x59f0f4=_0x1bc5;let _0x36eee1=new Set(_0x31cfb4);return Object[_0x59f0f4(0xf6)](_0x109870)['every'](_0x2b1b68=>_0x36eee1['has'](_0x2b1b68));}function Ie(_0x33c2e1){const _0x3573b3=_0x1bc5;return typeof _0x33c2e1=='number'&&Object[_0x3573b3(0x1d3)](_0x235b15)[_0x3573b3(0x1aa)](_0x33c2e1);}const Le=new Set([_0x484270[_0x3074bd(0x16c)],_0x484270[_0x3074bd(0xee)],_0x484270[_0x3074bd(0x13b)],_0x484270['TABLE_CELL_START'],_0x484270[_0x3074bd(0x186)],_0x484270[_0x3074bd(0x1d7)],_0x484270[_0x3074bd(0x1c2)],_0x484270[_0x3074bd(0x182)],_0x484270[_0x3074bd(0x14e)],_0x484270[_0x3074bd(0x188)],_0x484270[_0x3074bd(0xfa)],_0x484270['BLOCK_START'],_0x484270[_0x3074bd(0x1a5)],_0x484270[_0x3074bd(0x146)]]);var C=class extends Error{constructor(){const _0x132166=_0x3074bd;super(_0x132166(0x1a4));}};function Re(_0x1a3405){const _0x5f1a4d=_0x3074bd;var _0x1af2ac,_0x34409d;let _0x515d6e=_0x942fba['deepClone'](_0x1a3405['documentData']),_0xa2599c=j(_0x515d6e),{startOffset:_0x1df447,endOffset:_0x56e4bd}=We(_0xa2599c,_0x1a3405['startOffset'],_0x1a3405[_0x5f1a4d(0x172)]);He(_0xa2599c,_0x1df447,_0x56e4bd);let _0x3c937f=((_0x1af2ac=_0xa2599c[_0x5f1a4d(0x122)])==null?void 0x0:_0x1af2ac['filter'](_0x48a413=>{const _0x3c1478=_0x5f1a4d;if(!w(_0x48a413))return!0x1;let _0x4c11b7=_0x528474(_0x48a413);return _0x4c11b7[_0x3c1478(0x172)]>_0x1df447&&_0x4c11b7['startOffset']<_0x56e4bd;})[_0x5f1a4d(0xfd)](_0x3130df=>_0x3130df['rangeId']))??[];qe(_0xa2599c,_0x1df447,_0x56e4bd,''),_0xa2599c['customRanges']=[...((_0x34409d=_0xa2599c[_0x5f1a4d(0x122)])==null?void 0x0:_0x34409d[_0x5f1a4d(0x180)](_0x49f6a6=>!_0x3c937f[_0x5f1a4d(0x1aa)](_0x49f6a6[_0x5f1a4d(0x1b3)])&&_0x49f6a6['rangeId']!==_0x1a3405[_0x5f1a4d(0x1b3)]))??[],Ue(_0x1a3405['rangeId'],_0x1df447)][_0x5f1a4d(0x133)]((_0x4085d3,_0x2d7c2b)=>_0x4085d3['startIndex']-_0x2d7c2b[_0x5f1a4d(0x1ab)]);let _0xcf935b=E(_0x1a3405[_0x5f1a4d(0x19d)]);return _0x3c937f['forEach'](_0x56e737=>{delete _0xcf935b['formulas'][_0x56e737];}),_0xcf935b[_0x5f1a4d(0x151)][_0x1a3405['rangeId']]=_0x942fba['deepClone'](_0x1a3405[_0x5f1a4d(0x1b6)]),{'nextDocumentData':_0x515d6e,'nextResource':_0xcf935b,'cursorOffset':_0x1df447+0x1};}function ze(_0x20a608){const _0x40ce91=_0x3074bd;var _0x1de896,_0x2120f5;let _0x408198=_0x942fba[_0x40ce91(0x189)](_0x20a608[_0x40ce91(0x194)]),_0xd3695e=(_0x1de896=j(_0x408198)[_0x40ce91(0x122)])==null?void 0x0:_0x1de896[_0x40ce91(0x129)](_0x630d20=>_0x630d20['rangeId']===_0x20a608[_0x40ce91(0x1b3)]&&w(_0x630d20));if(!_0xd3695e||!((_0x2120f5=_0x20a608['resource'])!=null&&_0x2120f5['formulas'][_0x20a608[_0x40ce91(0x1b3)]]))return null;let _0x4ad25f=E(_0x20a608['resource']);return _0x4ad25f[_0x40ce91(0x151)][_0x20a608['rangeId']]=_0x942fba['deepClone'](_0x20a608[_0x40ce91(0x1b6)]),{'nextDocumentData':_0x408198,'nextResource':_0x4ad25f,'cursorOffset':_0xd3695e[_0x40ce91(0xf2)]+0x1};}function Be(_0xd12696){const _0x9d120=_0x3074bd;let _0x495b6d=_0x942fba[_0x9d120(0x189)](_0xd12696[_0x9d120(0x194)]),_0x493d3f=Je(_0x495b6d,_0xd12696[_0x9d120(0x1b3)],_0xd12696[_0x9d120(0x18c)]??'');if(_0x493d3f==null)return null;let _0x140ff3=E(_0xd12696[_0x9d120(0x19d)]);return delete _0x140ff3[_0x9d120(0x151)][_0xd12696[_0x9d120(0x1b3)]],{'nextDocumentData':_0x495b6d,'nextResource':_0x140ff3,'cursorOffset':_0x493d3f};}function Ve(_0x447fbf,_0x174fdc){const _0x3c6ab5=_0x3074bd;var _0x3333e9;let _0x4bc832=_0x942fba[_0x3c6ab5(0x189)](_0x447fbf),_0x46d734=_0x4bc832[_0x3c6ab5(0x11f)];if(!_0x46d734)return _0x4bc832;let _0x56d961=new Map(_0x174fdc[_0x3c6ab5(0xfd)](_0x23285d=>[_0x23285d[_0x3c6ab5(0x1b3)],_0x23285d['text']])),_0x4550ae=((_0x3333e9=_0x46d734[_0x3c6ab5(0x122)])==null?void 0x0:_0x3333e9[_0x3c6ab5(0x180)](_0x5c6625=>w(_0x5c6625)&&_0x56d961['has'](_0x5c6625[_0x3c6ab5(0x1b3)]))['sort']((_0xd95b96,_0x43270e)=>_0x43270e['startIndex']-_0xd95b96[_0x3c6ab5(0x1ab)]))??[];for(let _0x461dd8 of _0x4550ae)Je(_0x4bc832,_0x461dd8[_0x3c6ab5(0x1b3)],_0x56d961[_0x3c6ab5(0x104)](_0x461dd8[_0x3c6ab5(0x1b3)])??'');return _0x4bc832;}function w(_0x4f2681){const _0x29b6b1=_0x3074bd;var _0x3c314c;return(_0x4f2681==null?void 0x0:_0x4f2681[_0x29b6b1(0x1d6)])===_0x542b54[_0x29b6b1(0x154)]&&_0x4f2681[_0x29b6b1(0x155)]===!0x0&&((_0x3c314c=_0x4f2681[_0x29b6b1(0x10c)])==null?void 0x0:_0x3c314c[_0x29b6b1(0x11a)])===_0x29b6b1(0x1cc);}function T(_0x1e9d0b,_0x4a62b1){const _0x4f969e=_0x3074bd;var _0x47f5ad;return _0x1e9d0b==null||(_0x47f5ad=_0x1e9d0b[_0x4f969e(0x122)])==null?void 0x0:_0x47f5ad[_0x4f969e(0x129)](_0x2ef00c=>_0x2ef00c[_0x4f969e(0x1b3)]===_0x4a62b1&&w(_0x2ef00c));}function He(_0x3977b5,_0xe2e628,_0x286e40){const _0x50373d=_0x3074bd;if(_0xe2e628===_0x286e40){if(Le[_0x50373d(0x1b9)](_0x3977b5[_0x50373d(0x1d5)][_0xe2e628]))throw new C();return;}for(let _0x2d4c98=_0xe2e628;_0x2d4c98<_0x286e40;_0x2d4c98++)if(_0x3977b5['dataStream'][_0x2d4c98]===_0x484270[_0x50373d(0x138)]||Le[_0x50373d(0x1b9)](_0x3977b5[_0x50373d(0x1d5)][_0x2d4c98]))throw new C();}function Ue(_0x19b31b,_0x3ec4be){const _0x24d91d=_0x3074bd;return{'startIndex':_0x3ec4be,'endIndex':_0x3ec4be,'rangeId':_0x19b31b,'rangeType':_0x542b54[_0x24d91d(0x154)],'wholeEntity':!0x0,'properties':{'kind':Me}};}function E(_0x44c32b){const _0x1a8544=_0x3074bd;return _0x44c32b?_0x942fba[_0x1a8544(0x189)](_0x44c32b):b();}function We(_0xf1308f,_0x15b26f,_0x5d9e78){const _0x2b25f5=_0x3074bd;let _0x1ed63e=Ke(_0xf1308f),_0x45089b=_0x15b26f??_0x1ed63e,_0x4af214=_0x5d9e78??_0x45089b;return{'startOffset':Ge(Math[_0x2b25f5(0x15f)](_0x45089b,_0x4af214),_0x1ed63e),'endOffset':Ge(Math['max'](_0x45089b,_0x4af214),_0x1ed63e)};}function Ge(_0x4cea99,_0x564828){const _0x1f0b71=_0x3074bd;return Math[_0x1f0b71(0x1cb)](0x0,Math[_0x1f0b71(0x15f)](_0x4cea99,_0x564828));}function Ke(_0x558c1e){const _0x53b182=_0x3074bd;return _0x558c1e[_0x53b182(0x1d5)][_0x53b182(0x199)](''+_0x484270[_0x53b182(0x138)]+_0x484270[_0x53b182(0x16c)])?Math['max'](0x0,_0x558c1e[_0x53b182(0x1d5)][_0x53b182(0x177)]-0x2):_0x558c1e[_0x53b182(0x1d5)][_0x53b182(0x199)](_0x484270[_0x53b182(0x16c)])?Math['max'](0x0,_0x558c1e[_0x53b182(0x1d5)][_0x53b182(0x177)]-0x1):_0x558c1e['dataStream']['length'];}function qe(_0x5b88a8,_0x29a56b,_0x4f912c,_0x2598e0){_0x4f912c>_0x29a56b&&Xe(_0x5b88a8,_0x29a56b,_0x4f912c),Ye(_0x5b88a8,_0x29a56b,_0x2598e0);}function Je(_0x5d71e3,_0x38ae96,_0x279624){const _0x319d25=_0x3074bd;var _0x3338cf,_0x3446f7;let _0x49aac3=j(_0x5d71e3),_0x2a1a75=(_0x3338cf=_0x49aac3['customRanges'])==null?void 0x0:_0x3338cf[_0x319d25(0x129)](_0x37973f=>_0x37973f[_0x319d25(0x1b3)]===_0x38ae96&&w(_0x37973f));if(!_0x2a1a75)return null;let _0x420004=_0x528474(_0x2a1a75);return qe(_0x49aac3,_0x420004[_0x319d25(0x15d)],_0x420004[_0x319d25(0x172)],_0x279624),_0x49aac3[_0x319d25(0x122)]=(_0x3446f7=_0x49aac3['customRanges'])==null?void 0x0:_0x3446f7['filter'](_0x24ed6b=>_0x24ed6b['rangeId']!==_0x38ae96),_0x420004[_0x319d25(0x15d)]+_0x279624['length'];}function Ye(_0x4767dd,_0x26f628,_0x1d2eae){const _0x425f79=_0x3074bd;_0x1d2eae&&(_0x4767dd[_0x425f79(0x1d5)]=''+_0x4767dd[_0x425f79(0x1d5)][_0x425f79(0x178)](0x0,_0x26f628)+_0x1d2eae+_0x4767dd['dataStream'][_0x425f79(0x178)](_0x26f628),Ze(_0x4767dd,_0x26f628,_0x1d2eae[_0x425f79(0x177)]));}function Xe(_0x22cd9f,_0x3c632b,_0x771a80){const _0x210c43=_0x3074bd;let _0x2210e4=_0x771a80-_0x3c632b;_0x22cd9f['dataStream']=''+_0x22cd9f[_0x210c43(0x1d5)]['slice'](0x0,_0x3c632b)+_0x22cd9f[_0x210c43(0x1d5)][_0x210c43(0x178)](_0x771a80),Qe(_0x22cd9f,_0x3c632b,_0x2210e4);}function Ze(_0x56eaee,_0x19b552,_0x37be49){const _0x478eb3=_0x3074bd;_0x56eaee['paragraphs']=D(_0x56eaee[_0x478eb3(0x12b)],_0x19b552,_0x37be49),_0x56eaee['sectionBreaks']=D(_0x56eaee[_0x478eb3(0x1cf)],_0x19b552,_0x37be49),_0x56eaee[_0x478eb3(0x116)]=D(_0x56eaee[_0x478eb3(0x116)],_0x19b552,_0x37be49),_0x56eaee[_0x478eb3(0x1b7)]=$e(_0x56eaee['textRuns'],_0x19b552,_0x37be49),_0x56eaee[_0x478eb3(0xfc)]=et(_0x56eaee[_0x478eb3(0xfc)],_0x19b552,_0x37be49),_0x56eaee['columnGroups']=k(_0x56eaee[_0x478eb3(0xf4)],_0x19b552,_0x37be49),_0x56eaee[_0x478eb3(0x122)]=k(_0x56eaee[_0x478eb3(0x122)],_0x19b552,_0x37be49),_0x56eaee['customDecorations']=k(_0x56eaee['customDecorations'],_0x19b552,_0x37be49),_0x56eaee[_0x478eb3(0xf0)]=k(_0x56eaee[_0x478eb3(0xf0)],_0x19b552,_0x37be49);}function Qe(_0x5b7914,_0x150067,_0x5e1d6d){const _0x3e0b83=_0x3074bd;var _0x37bfff,_0x5ae0e4;_0x5b7914['paragraphs']=O(_0x5b7914[_0x3e0b83(0x12b)],_0x150067,_0x5e1d6d),_0x5b7914[_0x3e0b83(0x1cf)]=O(_0x5b7914[_0x3e0b83(0x1cf)],_0x150067,_0x5e1d6d),_0x5b7914[_0x3e0b83(0x116)]=O(_0x5b7914[_0x3e0b83(0x116)],_0x150067,_0x5e1d6d),_0x5b7914[_0x3e0b83(0x1b7)]=(_0x37bfff=tt((_0x5ae0e4=_0x5b7914[_0x3e0b83(0x1b7)])==null?void 0x0:_0x5ae0e4[_0x3e0b83(0xfd)](_0x436148=>({..._0x436148,'startIndex':_0x436148['st'],'endIndex':_0x436148['ed']})),_0x150067,_0x5e1d6d))==null?void 0x0:_0x37bfff[_0x3e0b83(0xfd)](_0x5020b4=>{let {startIndex:_0x51daa9,endIndex:_0x48e1af,..._0x56a490}=_0x5020b4;return{..._0x56a490,'st':_0x51daa9,'ed':_0x48e1af};}),_0x5b7914[_0x3e0b83(0xfc)]=tt(_0x5b7914[_0x3e0b83(0xfc)],_0x150067,_0x5e1d6d),_0x5b7914[_0x3e0b83(0xf4)]=A(_0x5b7914['columnGroups'],_0x150067,_0x5e1d6d),_0x5b7914[_0x3e0b83(0x122)]=A(_0x5b7914[_0x3e0b83(0x122)],_0x150067,_0x5e1d6d),_0x5b7914[_0x3e0b83(0x13a)]=A(_0x5b7914['customDecorations'],_0x150067,_0x5e1d6d),_0x5b7914['blockRanges']=A(_0x5b7914[_0x3e0b83(0xf0)],_0x150067,_0x5e1d6d);}function D(_0x5a728f,_0x11b6ec,_0x1f3109){const _0x3b8c6f=_0x3074bd;return _0x5a728f==null?void 0x0:_0x5a728f['map'](_0x3a7b18=>_0x3a7b18[_0x3b8c6f(0x1ab)]>=_0x11b6ec?{..._0x3a7b18,'startIndex':_0x3a7b18[_0x3b8c6f(0x1ab)]+_0x1f3109}:_0x3a7b18);}function O(_0x30470f,_0x444252,_0xcc48ae){const _0x465ed4=_0x3074bd;let _0x5cc75d=_0x444252+_0xcc48ae;return _0x30470f==null?void 0x0:_0x30470f[_0x465ed4(0xfd)](_0x4a1604=>_0x4a1604[_0x465ed4(0x1ab)]>=_0x444252&&_0x4a1604[_0x465ed4(0x1ab)]<_0x5cc75d?null:_0x4a1604[_0x465ed4(0x1ab)]>=_0x5cc75d?{..._0x4a1604,'startIndex':_0x4a1604['startIndex']-_0xcc48ae}:_0x4a1604)[_0x465ed4(0x180)](_0x3e22ad=>_0x3e22ad!=null);}function _0x200b(){const _0x5c633b=['_deleteRegistration','schemaVersion','registerProvider','get','insert','cell','call','docs-formula.mutation.set-resource','toPrimitive','getLoadError','presentationChanged$','properties','_change$','ERROR','getResult','170cEtTSh','docs-formula.mutation.set-last-values','_setPresentation','getUnitId','paragraphId','_syncScheduled','customBlocks','params','registerFormulaWithRange','705918QaVGnS','kind','resourceUndo','function','isArray','resolveFormula','body','complete','clear','customRanges','undoMutation','serialize','_injector','identity','_hostExternalReferenceModel','pattern','find','range','paragraphs','expectedNumberFormat','subscribe','eligible','externalMutations','default','docs-formula.command.convert-to-text','setFormula','sort','selection','8aPJrXC','@univerjs-pro/docs-formula','_updateFormulaResult','PARAGRAPH','accessor','customDecorations','TABLE_ROW_START','syncUnit','_instanceService','lastValue','from','disabled','pluginName','sequenceNodesBuilder','presentation','defineProperty','dispose','CUSTOM_BLOCK','externalReferences','_resourceManagerService','getUnit','unregister','getCurrentUnitOfType','onStarting','previousDocumentData','COLUMN_START','UNIVER_DOC','getInstance','formulas','change$','type','CUSTOM','wholeEntity','source','_pendingUnitIds','COMMAND','formulaResult$','trigger','deleteFormula','assign','startOffset','expectedReferenceRevision','min','DOC_FORMULA_PLUGIN','version','assess','resourceRedo','setFormulas','string','degradeBody','156969lACQYZ','retain','color','SUCCESS','symbol','SECTION_BREAK','_registrationService','_loadErrors','_commandService','references','setResource','endOffset','getFormulaValueSync','4683992DovckP','_rawResources','9185322JuawfS','length','slice','_isDisposed','forEach','some','_model','docs-formula.command.insert','parse','documentRedo','filter','_syncUnit','COLUMN_GROUP_START','add','registerPluginResource','getResource','TABLE_CELL_END','set','COLUMN_END','deepClone','segmentId','empty','text','isInteger','error','_docFormulaModel','_queueSync','Document\x20main\x20body\x20is\x20required\x20to\x20insert\x20Doc\x20Formula.','_service','number','documentData','object','asObservable','2268763OxdpKs','_univerInstanceService','endsWith','position','unregisterUnit','getRevision','resource','invalid-resource','removeFormula','next','unitId','docs-formula.mutation.remove-formula','docs-formula.command.set-number-format','Doc\x20Formula\x20range\x20cannot\x20cross\x20document\x20structure\x20boundaries','BLOCK_END','MUTATION','resources','formulaId','constructor','includes','startIndex','packageName','syncExecuteCommand','deleteLength','model','data','delete','trim','rangeId','stringify','name','config','textRuns','getFormula','has','numberFormat','target','getSnapshot','_presentationChanged$','prototype','boolean','5TwyUYd','redoMutation','TABLE_END','_registrations','stale','degradeDocumentData','_formulaKeys','_resources','getRegisteredFormulas','removeUnit','resolved','max','univer-docs-formula','unsupported-version','formula','sectionBreaks','nextDocumentData','1.0.4','collectMutations','values','1537261HzUEQw','dataStream','rangeType','TABLE_ROW_END','liveResult','nextResource','onCommandExecuted','disposeWithMe','unitAdded$','getTextRanges','replaceDocRanges','getFormulas','_configService','entries','_config','getOwnPropertyDescriptor','notifyTextChanged','598068okvLCx','referenceRevision','cursorOffset','fromEntries','load','TABLE_START','_preserveInvalid','blockRanges','document','endIndex','536xDvacr','columnGroups','decorate','keys','updates','success','insertLength','COLUMN_GROUP_END','register','tables','map','status','docs-formula.command.update','_formulaService'];_0x200b=function(){return _0x5c633b;};return _0x200b();}function $e(_0xbab213,_0x205a72,_0xce6be0){const _0x4c641e=_0x3074bd;return _0xbab213==null?void 0x0:_0xbab213[_0x4c641e(0xfd)](_0x58f37f=>_0x58f37f['st']>=_0x205a72?{..._0x58f37f,'st':_0x58f37f['st']+_0xce6be0,'ed':_0x58f37f['ed']+_0xce6be0}:_0x58f37f['ed']>_0x205a72?{..._0x58f37f,'ed':_0x58f37f['ed']+_0xce6be0}:_0x58f37f);}function k(_0xb56eae,_0x59869e,_0x156800){const _0x317341=_0x3074bd;return _0xb56eae==null?void 0x0:_0xb56eae[_0x317341(0xfd)](_0x43817d=>_0x528ea5(_0x43817d,_0x59869e,_0x156800));}function et(_0x3355b8,_0x5603ab,_0x7676ac){const _0x4cac9f=_0x3074bd;return _0x3355b8==null?void 0x0:_0x3355b8[_0x4cac9f(0xfd)](_0x1ad8e1=>_0x37b9bc(_0x1ad8e1,_0x5603ab,_0x7676ac));}function A(_0x508d46,_0x467425,_0x4e3ce3){const _0x51b844=_0x3074bd;return _0x508d46==null?void 0x0:_0x508d46['map'](_0x361ff5=>_0x2bd672(_0x361ff5,_0x467425,_0x4e3ce3))[_0x51b844(0x180)](_0x23ee1b=>_0x23ee1b!=null);}function tt(_0x5a6ecb,_0x142c79,_0x5b48ea){const _0x13b96b=_0x3074bd;return _0x5a6ecb==null?void 0x0:_0x5a6ecb[_0x13b96b(0xfd)](_0x152f19=>_0x2ee3d6(_0x152f19,_0x142c79,_0x5b48ea))[_0x13b96b(0x180)](_0x110575=>_0x110575!=null);}function _0x1bc5(_0x3613e1,_0x5cdc8d){_0x3613e1=_0x3613e1-0xe7;const _0x200b67=_0x200b();let _0x1bc588=_0x200b67[_0x3613e1];return _0x1bc588;}function j(_0x49a883){const _0x268836=_0x3074bd;if(!_0x49a883[_0x268836(0x11f)])throw Error(_0x268836(0x191));return _0x49a883[_0x268836(0x11f)];}function M(_0x523ce2){'@babel/helpers - typeof';const _0x1d5593=_0x3074bd;return M=typeof Symbol==_0x1d5593(0x11c)&&typeof Symbol['iterator']=='symbol'?function(_0x134558){return typeof _0x134558;}:function(_0x232539){const _0x2db687=_0x1d5593;return _0x232539&&typeof Symbol==_0x2db687(0x11c)&&_0x232539[_0x2db687(0x1a9)]===Symbol&&_0x232539!==Symbol[_0x2db687(0x1be)]?_0x2db687(0x16b):typeof _0x232539;},M(_0x523ce2);}function nt(_0x5c0dc4,_0x2fbcd1){const _0x44c758=_0x3074bd;if(M(_0x5c0dc4)!='object'||!_0x5c0dc4)return _0x5c0dc4;var _0x4ba59f=_0x5c0dc4[Symbol[_0x44c758(0x109)]];if(_0x4ba59f!==void 0x0){var _0x3dd079=_0x4ba59f[_0x44c758(0x107)](_0x5c0dc4,_0x2fbcd1||_0x44c758(0x130));if(M(_0x3dd079)!=_0x44c758(0x195))return _0x3dd079;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x2fbcd1==='string'?String:Number)(_0x5c0dc4);}function rt(_0x305c5d){const _0x5b8ffa=_0x3074bd;var _0x209066=nt(_0x305c5d,_0x5b8ffa(0x165));return M(_0x209066)==_0x5b8ffa(0x16b)?_0x209066:_0x209066+'';}function N(_0x85a486,_0x3ebbc8,_0x5b83fa){const _0x36c8b1=_0x3074bd;return(_0x3ebbc8=rt(_0x3ebbc8))in _0x85a486?Object[_0x36c8b1(0x144)](_0x85a486,_0x3ebbc8,{'value':_0x5b83fa,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x85a486[_0x3ebbc8]=_0x5b83fa,_0x85a486;}var P=class extends _0x5dc02b{constructor(..._0x1fd400){const _0x11b270=_0x3074bd;super(..._0x1fd400),N(this,'_resources',new Map()),N(this,'_rawResources',new Map()),N(this,'_loadErrors',new Map()),N(this,_0x11b270(0x10d),new _0x581576()),N(this,_0x11b270(0x152),this[_0x11b270(0x10d)][_0x11b270(0x196)]());}[_0x3074bd(0x1b8)](_0x884bf,_0xb898e2){const _0x24b38b=_0x3074bd;var _0x26322f;let _0x212788=(_0x26322f=this['_resources'][_0x24b38b(0x104)](_0x884bf))==null?void 0x0:_0x26322f[_0x24b38b(0x151)][_0xb898e2];return _0x212788?_0x942fba[_0x24b38b(0x189)](_0x212788):void 0x0;}['getFormulas'](_0x507dbb){const _0xdbd199=_0x3074bd;var _0x394d1b;return _0x942fba[_0xdbd199(0x189)](((_0x394d1b=this[_0xdbd199(0x1c7)]['get'](_0x507dbb))==null?void 0x0:_0x394d1b[_0xdbd199(0x151)])??{});}['getResource'](_0x423dc4){const _0x164cc4=_0x3074bd;let _0x496e2c=this[_0x164cc4(0x1c7)][_0x164cc4(0x104)](_0x423dc4);return _0x496e2c?_0x942fba[_0x164cc4(0x189)](_0x496e2c):void 0x0;}[_0x3074bd(0x132)](_0x2ee1b0,_0xa46798,_0x4b49bd){const _0x5a9524=_0x3074bd;return this[_0x5a9524(0x164)](_0x2ee1b0,{[_0xa46798]:_0x4b49bd});}['setResource'](_0x50545f,_0x5e26bc){const _0x4ffe48=_0x3074bd;return this[_0x4ffe48(0x16e)][_0x4ffe48(0x1b9)](_0x50545f)||!x(_0x5e26bc)?!0x1:(this[_0x4ffe48(0x1c7)][_0x4ffe48(0x187)](_0x50545f,_0x942fba['deepClone'](_0x5e26bc)),this[_0x4ffe48(0x10d)][_0x4ffe48(0x1a0)]({'unitId':_0x50545f}),!0x0);}[_0x3074bd(0x164)](_0x30bcac,_0x5515cd){const _0x4c7406=_0x3074bd;if(this[_0x4c7406(0x16e)][_0x4c7406(0x1b9)](_0x30bcac)||!Object[_0x4c7406(0xf6)](_0x5515cd)[_0x4c7406(0x177)]||!x({'schemaVersion':0x1,'formulas':_0x5515cd}))return!0x1;let _0x42dd08=this['_resources'][_0x4c7406(0x104)](_0x30bcac)??b(),_0x2b6d83=_0x942fba[_0x4c7406(0x189)](_0x42dd08);return Object[_0x4c7406(0x15c)](_0x2b6d83[_0x4c7406(0x151)],_0x942fba[_0x4c7406(0x189)](_0x5515cd)),this[_0x4c7406(0x1c7)][_0x4c7406(0x187)](_0x30bcac,_0x2b6d83),this[_0x4c7406(0x10d)][_0x4c7406(0x1a0)]({'unitId':_0x30bcac,'rangeIds':Object[_0x4c7406(0xf6)](_0x5515cd)}),!0x0;}[_0x3074bd(0x19f)](_0x377cae,_0x57fa8a){const _0xfb3ca4=_0x3074bd;if(this['_loadErrors'][_0xfb3ca4(0x1b9)](_0x377cae))return!0x1;let _0x334808=this[_0xfb3ca4(0x1c7)][_0xfb3ca4(0x104)](_0x377cae);if(!(_0x334808!=null&&_0x334808[_0xfb3ca4(0x151)][_0x57fa8a]))return!0x1;let _0xfb75f5=_0x942fba[_0xfb3ca4(0x189)](_0x334808);return delete _0xfb75f5[_0xfb3ca4(0x151)][_0x57fa8a],this[_0xfb3ca4(0x1c7)]['set'](_0x377cae,_0xfb75f5),this[_0xfb3ca4(0x10d)][_0xfb3ca4(0x1a0)]({'unitId':_0x377cae,'rangeIds':[_0x57fa8a]}),!0x0;}['load'](_0x492a87,_0x30478c){const _0x5d90bf=_0x3074bd;return _0x30478c&&typeof _0x30478c==_0x5d90bf(0x195)&&_0x5d90bf(0x102)in _0x30478c&&_0x30478c[_0x5d90bf(0x102)]!==0x1?(this[_0x5d90bf(0xef)](_0x492a87,_0x30478c,_0x5d90bf(0x1cd)),!0x1):x(_0x30478c)?(this[_0x5d90bf(0x1c7)][_0x5d90bf(0x187)](_0x492a87,_0x942fba[_0x5d90bf(0x189)](_0x30478c)),this[_0x5d90bf(0x175)]['delete'](_0x492a87),this[_0x5d90bf(0x16e)][_0x5d90bf(0x1b1)](_0x492a87),this[_0x5d90bf(0x10d)]['next']({'unitId':_0x492a87}),!0x0):(this[_0x5d90bf(0xef)](_0x492a87,_0x30478c,_0x5d90bf(0x19e)),!0x1);}[_0x3074bd(0x124)](_0x4ec572){const _0x1271ac=_0x3074bd;let _0x4758d7=this['_resources'][_0x1271ac(0x104)](_0x4ec572);return _0x4758d7?_0x942fba[_0x1271ac(0x189)](_0x4758d7):this['_rawResources'][_0x1271ac(0x1b9)](_0x4ec572)?_0x942fba[_0x1271ac(0x189)](this[_0x1271ac(0x175)][_0x1271ac(0x104)](_0x4ec572)):b();}[_0x3074bd(0x10a)](_0x105201){const _0x390791=_0x3074bd;return this['_loadErrors'][_0x390791(0x104)](_0x105201);}[_0x3074bd(0x1c9)](_0x353371){const _0x5e8048=_0x3074bd;this[_0x5e8048(0x1c7)][_0x5e8048(0x1b1)](_0x353371),this[_0x5e8048(0x175)][_0x5e8048(0x1b1)](_0x353371),this[_0x5e8048(0x16e)][_0x5e8048(0x1b1)](_0x353371),this[_0x5e8048(0x10d)][_0x5e8048(0x1a0)]({'unitId':_0x353371});}[_0x3074bd(0x145)](){const _0x3b0dd3=_0x3074bd;this['_resources']['clear'](),this['_rawResources'][_0x3b0dd3(0x121)](),this[_0x3b0dd3(0x16e)]['clear'](),this[_0x3b0dd3(0x10d)]['complete'](),super[_0x3b0dd3(0x145)]();}['_preserveInvalid'](_0x1bcbac,_0x595829,_0x3759fd){const _0x5aebf1=_0x3074bd;this[_0x5aebf1(0x1c7)]['delete'](_0x1bcbac),this[_0x5aebf1(0x175)][_0x5aebf1(0x187)](_0x1bcbac,_0x942fba[_0x5aebf1(0x189)](_0x595829)),this['_loadErrors']['set'](_0x1bcbac,_0x3759fd),this[_0x5aebf1(0x10d)][_0x5aebf1(0x1a0)]({'unitId':_0x1bcbac});}};let it=function(_0x37291c){const _0x3b5333=_0x3074bd;return _0x37291c['EMPTY']=_0x3b5333(0x18b),_0x37291c['PENDING']='pending',_0x37291c[_0x3b5333(0x16a)]='success',_0x37291c[_0x3b5333(0x10e)]=_0x3b5333(0x18e),_0x37291c;}({});function F(_0x495bf4,_0x4ce0ae){return function(_0x5bbffe,_0x4f3e7e){_0x4ce0ae(_0x5bbffe,_0x4f3e7e,_0x495bf4);};}function I(_0xf62371,_0x373098,_0x55e3c2,_0x39ae02){const _0x1ac38e=_0x3074bd;var _0x3c4f03=arguments[_0x1ac38e(0x177)],_0xa1db56=_0x3c4f03<0x3?_0x373098:_0x39ae02===null?_0x39ae02=Object[_0x1ac38e(0xe7)](_0x373098,_0x55e3c2):_0x39ae02,_0x18b8e8;if(typeof Reflect==_0x1ac38e(0x195)&&typeof Reflect[_0x1ac38e(0xf5)]==_0x1ac38e(0x11c))_0xa1db56=Reflect[_0x1ac38e(0xf5)](_0xf62371,_0x373098,_0x55e3c2,_0x39ae02);else{for(var _0x13b319=_0xf62371['length']-0x1;_0x13b319>=0x0;_0x13b319--)(_0x18b8e8=_0xf62371[_0x13b319])&&(_0xa1db56=(_0x3c4f03<0x3?_0x18b8e8(_0xa1db56):_0x3c4f03>0x3?_0x18b8e8(_0x373098,_0x55e3c2,_0xa1db56):_0x18b8e8(_0x373098,_0x55e3c2))||_0xa1db56);}return _0x3c4f03>0x3&&_0xa1db56&&Object[_0x1ac38e(0x144)](_0x373098,_0x55e3c2,_0xa1db56),_0xa1db56;}let L=class extends _0x5dc02b{constructor(_0x58126f,_0x55bea2,_0xe0c9c){const _0x1229bb=_0x3074bd;super(),this[_0x1229bb(0x17c)]=_0x58126f,this[_0x1229bb(0x16d)]=_0x55bea2,this[_0x1229bb(0x127)]=_0xe0c9c,N(this,_0x1229bb(0x1c3),new Map()),N(this,_0x1229bb(0x1c6),new Map()),N(this,_0x1229bb(0x1bd),new _0x581576()),N(this,_0x1229bb(0x10b),this[_0x1229bb(0x1bd)][_0x1229bb(0x196)]()),this['disposeWithMe'](this[_0x1229bb(0x16d)][_0x1229bb(0x159)][_0x1229bb(0x12d)](_0x109df7=>{const _0x1fe394=_0x1229bb;for(let _0x3fadf3 of Object[_0x1fe394(0x1d3)](_0x109df7))for(let _0x2bcba6 of Object['values'](_0x3fadf3))_0x2bcba6[_0x1fe394(0x17a)](_0x3d9fd7=>this['_updateFormulaResult'](_0x3d9fd7));}));}[_0x3074bd(0x13c)](_0x3394f7){const _0x5c5884=_0x3074bd;var _0x10a038;let _0xa4d8e1=_0x3394f7['getUnitId'](),_0x102c8e=((_0x10a038=_0x3394f7[_0x5c5884(0x1bc)]()['body'])==null||(_0x10a038=_0x10a038['customRanges'])==null?void 0x0:_0x10a038['filter'](w))??[],_0x1f8c42=this[_0x5c5884(0x17c)][_0x5c5884(0x1df)](_0xa4d8e1),_0x3ebcd1=new Set();for(let _0x2a64f2 of _0x102c8e){let _0x178e27=_0x1f8c42[_0x2a64f2[_0x5c5884(0x1b3)]];_0x178e27&&(_0x3ebcd1[_0x5c5884(0x183)](R(_0xa4d8e1,_0x2a64f2['rangeId'])),this['register']({'unitId':_0xa4d8e1,'rangeId':_0x2a64f2[_0x5c5884(0x1b3)]},_0x178e27));}for(let _0x3cf181 of Array['from'](this[_0x5c5884(0x1c3)][_0x5c5884(0x1d3)]()))_0x3cf181[_0x5c5884(0x1a1)]===_0xa4d8e1&&!_0x3ebcd1[_0x5c5884(0x1b9)](R(_0x3cf181[_0x5c5884(0x1a1)],_0x3cf181[_0x5c5884(0x1b3)]))&&this[_0x5c5884(0x14a)](_0x3cf181);}['register'](_0x2b2aee,_0x4820e4){const _0x3d0e7d=_0x3074bd;let _0x5a73f6=R(_0x2b2aee['unitId'],_0x2b2aee[_0x3d0e7d(0x1b3)]),_0x198639=this['_registrations']['get'](_0x5a73f6),_0x43baa4=this[_0x3d0e7d(0x127)]['getRevision'](_0x2b2aee[_0x3d0e7d(0x1a1)]);if(_0x198639&&_0x198639[_0x3d0e7d(0x1b6)][_0x3d0e7d(0x1ce)]===_0x4820e4[_0x3d0e7d(0x1ce)]&&_0x198639[_0x3d0e7d(0xea)]===_0x43baa4){_0x198639[_0x3d0e7d(0x1b6)]=_0x4820e4;let _0x44a556=_0x198639['formulaId']?this['_registrationService'][_0x3d0e7d(0x173)](_0x198639[_0x3d0e7d(0x1a1)],_0x198639[_0x3d0e7d(0x1a1)],_0x198639['formulaId'])??void 0x0:void 0x0;_0x198639['liveResult']=_0x44a556,this['_setPresentation'](_0x5a73f6,z(_0x4820e4,_0x44a556));return;}_0x198639!=null&&_0x198639[_0x3d0e7d(0x1a8)]&&this[_0x3d0e7d(0x101)](_0x198639);let _0x4e6e50={..._0x2b2aee,'config':_0x4820e4,'referenceRevision':_0x43baa4,'presentation':z(_0x4820e4,void 0x0)};if(this[_0x3d0e7d(0x1c3)][_0x3d0e7d(0x187)](_0x5a73f6,_0x4e6e50),!_0x4820e4[_0x3d0e7d(0x1ce)]['trim']())return;let _0x3eeaca=this[_0x3d0e7d(0x16d)][_0x3d0e7d(0x118)](_0x2b2aee[_0x3d0e7d(0x1a1)],_0x2b2aee[_0x3d0e7d(0x1a1)],_0x4820e4[_0x3d0e7d(0x1ce)],void 0x0,{'rangeId':_0x2b2aee[_0x3d0e7d(0x1b3)]},_0x350834['DOC'],_0x2b2aee[_0x3d0e7d(0x1b3)]);_0x4e6e50['formulaId']=_0x3eeaca,this[_0x3d0e7d(0x1c6)][_0x3d0e7d(0x187)](_0x3eeaca,_0x5a73f6);}[_0x3074bd(0x14a)](_0x4eca57){const _0x3aefc4=_0x3074bd;let _0x41ca30=R(_0x4eca57[_0x3aefc4(0x1a1)],_0x4eca57[_0x3aefc4(0x1b3)]),_0x2228c4=this['_registrations'][_0x3aefc4(0x104)](_0x41ca30);_0x2228c4&&(this[_0x3aefc4(0x101)](_0x2228c4),this['_registrations'][_0x3aefc4(0x1b1)](_0x41ca30));}[_0x3074bd(0x19b)](_0x45d1b5){const _0x2b02c7=_0x3074bd;for(let _0x389206 of Array[_0x2b02c7(0x13f)](this[_0x2b02c7(0x1c3)][_0x2b02c7(0x1d3)]()))_0x389206[_0x2b02c7(0x1a1)]===_0x45d1b5&&this[_0x2b02c7(0x14a)](_0x389206);}['getPresentation'](_0x191f9a){const _0x3295f8=_0x3074bd;var _0x48cbc7;return(_0x48cbc7=this[_0x3295f8(0x1c3)]['get'](R(_0x191f9a[_0x3295f8(0x1a1)],_0x191f9a[_0x3295f8(0x1b3)])))==null?void 0x0:_0x48cbc7[_0x3295f8(0x143)];}[_0x3074bd(0x10f)](_0x181c23){const _0x13c798=_0x3074bd;let _0x16b260=this[_0x13c798(0x1c3)]['get'](R(_0x181c23[_0x13c798(0x1a1)],_0x181c23['rangeId']));return _0x16b260?B(_0x16b260):void 0x0;}[_0x3074bd(0x1c8)](){const _0x20556f=_0x3074bd;return Array['from'](this[_0x20556f(0x1c3)][_0x20556f(0x1d3)](),_0x3abd24=>({'identity':{'unitId':_0x3abd24[_0x20556f(0x1a1)],'rangeId':_0x3abd24[_0x20556f(0x1b3)]},'config':_0x3abd24[_0x20556f(0x1b6)],'referenceRevision':_0x3abd24['referenceRevision'],..._0x3abd24['liveResult']?{'liveResult':_0x3abd24[_0x20556f(0x1d8)]}:null}));}['dispose'](){const _0x1e7ca0=_0x3074bd;for(let _0x30ba54 of this[_0x1e7ca0(0x1c3)][_0x1e7ca0(0x1d3)]())this[_0x1e7ca0(0x101)](_0x30ba54);this[_0x1e7ca0(0x1c3)][_0x1e7ca0(0x121)](),this[_0x1e7ca0(0x1c6)][_0x1e7ca0(0x121)](),this[_0x1e7ca0(0x1bd)][_0x1e7ca0(0x120)](),super[_0x1e7ca0(0x145)]();}[_0x3074bd(0x137)](_0x1dec87){const _0x63c0c0=_0x3074bd;let _0x1ce3b0=this[_0x63c0c0(0x1c6)][_0x63c0c0(0x104)](_0x1dec87[_0x63c0c0(0x1a8)]),_0x4a92ff=_0x1ce3b0?this[_0x63c0c0(0x1c3)]['get'](_0x1ce3b0):void 0x0;_0x1ce3b0&&_0x4a92ff&&(_0x4a92ff[_0x63c0c0(0x1d8)]=_0x1dec87,this[_0x63c0c0(0x112)](_0x1ce3b0,z(_0x4a92ff[_0x63c0c0(0x1b6)],_0x1dec87)));}[_0x3074bd(0x112)](_0x5df354,_0x3ea006){const _0x3c6296=_0x3074bd;var _0x53f4fa,_0x5bb6e9;let _0x4311d9=this[_0x3c6296(0x1c3)]['get'](_0x5df354);if(!_0x4311d9||at(_0x4311d9[_0x3c6296(0x143)],_0x3ea006))return;let _0x24d2a3=_0x4311d9['presentation'],_0x197c6a=B(_0x4311d9);_0x4311d9['presentation']=_0x3ea006,this['_presentationChanged$'][_0x3c6296(0x1a0)]({'unitId':_0x4311d9['unitId'],'rangeId':_0x4311d9[_0x3c6296(0x1b3)],'presentation':_0x3ea006,'previousPresentation':_0x24d2a3,'result':B(_0x4311d9),'previousResult':{..._0x197c6a,..._0x24d2a3,'value':(_0x53f4fa=_0x24d2a3[_0x3c6296(0x106)])==null?void 0x0:_0x53f4fa['v'],'valueType':((_0x5bb6e9=_0x24d2a3[_0x3c6296(0x106)])==null?void 0x0:_0x5bb6e9['t'])??void 0x0}});}[_0x3074bd(0x101)](_0xbb3d18){const _0x13bd5b=_0x3074bd;_0xbb3d18[_0x13bd5b(0x1a8)]&&(this[_0x13bd5b(0x16d)][_0x13bd5b(0x15b)](_0xbb3d18[_0x13bd5b(0x1a1)],_0xbb3d18[_0x13bd5b(0x1a1)],[_0xbb3d18[_0x13bd5b(0x1a8)]]),this[_0x13bd5b(0x1c6)][_0x13bd5b(0x1b1)](_0xbb3d18[_0x13bd5b(0x1a8)]));}};L=I([F(0x0,_0x34e393(P)),F(0x1,_0x34e393(_0x3391af)),F(0x2,_0x34e393(_0x51c26f))],L);function R(_0x391ef6,_0x2fee02){return _0x391ef6+'\x00'+_0x2fee02;}function z(_0x12c868,_0x418d32){const _0x1e5454=_0x3074bd;return _0x43dcf8({'numberFormat':_0x12c868[_0x1e5454(0x1ba)],'lastValue':_0x12c868['lastValue'],'result':_0x418d32});}function B(_0xd9619){const _0x4c9c04=_0x3074bd;var _0x2c4a0f,_0x3b4dee,_0x80a505;let _0x1b602b=_0xd9619[_0x4c9c04(0x143)],_0x212be7=_0xd9619[_0x4c9c04(0x1b6)][_0x4c9c04(0x1ce)][_0x4c9c04(0x1b2)]()?_0x1b602b[_0x4c9c04(0x1c4)]||_0x1b602b[_0x4c9c04(0x106)]==null?'pending':((_0x2c4a0f=_0xd9619['liveResult'])==null?void 0x0:_0x2c4a0f[_0x4c9c04(0xfe)])===_0x11c47e[_0x4c9c04(0x10e)]?_0x4c9c04(0x18e):_0x4c9c04(0xf8):_0x4c9c04(0x18b);return{..._0x1b602b,'status':_0x212be7,'value':(_0x3b4dee=_0x1b602b[_0x4c9c04(0x106)])==null?void 0x0:_0x3b4dee['v'],'valueType':((_0x80a505=_0x1b602b['cell'])==null?void 0x0:_0x80a505['t'])??void 0x0};}function at(_0x472185,_0xb33955){const _0x5d825e=_0x3074bd;var _0x5acd3b,_0x22566c,_0x54eada,_0x273188;return _0x472185[_0x5d825e(0x18c)]===_0xb33955[_0x5d825e(0x18c)]&&_0x472185[_0x5d825e(0x169)]===_0xb33955[_0x5d825e(0x169)]&&_0x472185['pattern']===_0xb33955[_0x5d825e(0x128)]&&_0x472185['source']===_0xb33955[_0x5d825e(0x156)]&&_0x472185[_0x5d825e(0x1c4)]===_0xb33955[_0x5d825e(0x1c4)]&&((_0x5acd3b=_0x472185[_0x5d825e(0x106)])==null?void 0x0:_0x5acd3b['t'])===((_0x22566c=_0xb33955[_0x5d825e(0x106)])==null?void 0x0:_0x22566c['t'])&&Object['is']((_0x54eada=_0x472185[_0x5d825e(0x106)])==null?void 0x0:_0x54eada['v'],(_0x273188=_0xb33955['cell'])==null?void 0x0:_0x273188['v']);}const ot={'id':'docs-formula.mutation.set-formula','type':_0x49f619[_0x3074bd(0x1a6)],'handler':(_0x126a4f,_0x18d94e)=>!(_0x18d94e!=null&&_0x18d94e['unitId'])||!_0x18d94e['rangeId']||!_0x18d94e['config']?!0x1:_0x126a4f['get'](P)[_0x3074bd(0x132)](_0x18d94e[_0x3074bd(0x1a1)],_0x18d94e['rangeId'],_0x18d94e['config'])},st={'id':_0x3074bd(0x1a2),'type':_0x49f619[_0x3074bd(0x1a6)],'handler':(_0x40f165,_0x228941)=>!(_0x228941!=null&&_0x228941['unitId'])||!_0x228941[_0x3074bd(0x1b3)]?!0x1:_0x40f165['get'](P)[_0x3074bd(0x19f)](_0x228941[_0x3074bd(0x1a1)],_0x228941[_0x3074bd(0x1b3)])},V={'id':_0x3074bd(0x108),'type':_0x49f619['MUTATION'],'handler':(_0x254588,_0x5d91b4)=>!(_0x5d91b4!=null&&_0x5d91b4[_0x3074bd(0x1a1)])||!_0x5d91b4[_0x3074bd(0x19d)]?!0x1:_0x254588[_0x3074bd(0x104)](P)[_0x3074bd(0x171)](_0x5d91b4['unitId'],_0x5d91b4[_0x3074bd(0x19d)])},H={'id':_0x3074bd(0x111),'type':_0x49f619[_0x3074bd(0x1a6)],'handler':(_0x1d3b74,_0x465571)=>{const _0x146a8a=_0x3074bd;if(!(_0x465571!=null&&_0x465571['unitId'])||!_0x465571['updates'][_0x146a8a(0x177)])return!0x1;let _0x1f1955=_0x1d3b74[_0x146a8a(0x104)](P),_0x3e564c=_0x1d3b74[_0x146a8a(0x104)](_0x51c26f),_0xd5841b=_0x1f1955[_0x146a8a(0x185)](_0x465571[_0x146a8a(0x1a1)]);if(!_0xd5841b)return!0x1;let _0x2c99ad=_0x942fba[_0x146a8a(0x189)](_0xd5841b),_0x2c3837=!0x1;for(let _0x2258cd of _0x465571[_0x146a8a(0xf7)]){var _0x13f328,_0x596f82,_0x2988db,_0x5eb532;let _0x254d24=_0x2c99ad['formulas'][_0x2258cd[_0x146a8a(0x1b3)]];_0x254d24&&_0x254d24[_0x146a8a(0x1ce)]===_0x2258cd['expectedFormula']&&((_0x13f328=_0x254d24[_0x146a8a(0x1ba)])==null?void 0x0:_0x13f328[_0x146a8a(0x128)])===_0x2258cd[_0x146a8a(0x12c)]&&_0x3e564c[_0x146a8a(0x19c)](_0x465571[_0x146a8a(0x1a1)])===_0x2258cd[_0x146a8a(0x15e)]&&(((_0x596f82=_0x254d24[_0x146a8a(0x13e)])==null?void 0x0:_0x596f82['v'])!==_0x2258cd['lastValue']['v']||((_0x2988db=_0x254d24[_0x146a8a(0x13e)])==null?void 0x0:_0x2988db['t'])!==_0x2258cd[_0x146a8a(0x13e)]['t']||((_0x5eb532=_0x254d24['lastValue'])==null?void 0x0:_0x5eb532['pattern'])!==_0x2258cd[_0x146a8a(0x13e)][_0x146a8a(0x128)])&&(_0x254d24['lastValue']=_0x942fba[_0x146a8a(0x189)](_0x2258cd['lastValue']),_0x2c3837=!0x0);}return!_0x2c3837||_0x1f1955['setResource'](_0x465571['unitId'],_0x2c99ad);}},U={'id':_0x3074bd(0x17d),'type':_0x49f619[_0x3074bd(0x158)],'handler':(_0x2099cb,_0x491dd7)=>{const _0x4d5241=_0x3074bd;if(!(_0x491dd7!=null&&_0x491dd7[_0x4d5241(0x1ce)][_0x4d5241(0x1b2)]()))return!0x1;let _0x34cf8b=q(_0x2099cb,_0x491dd7[_0x4d5241(0x1a1)],'');if(!_0x34cf8b)return!0x1;let _0x2b079b=ft(_0x491dd7[_0x4d5241(0x1bb)],_0x34cf8b[_0x4d5241(0x11f)],dt(_0x2099cb,_0x34cf8b[_0x4d5241(0x1a1)]));if(!_0x2b079b)return!0x1;let _0x53d61f=pt(_0x2099cb,_0x34cf8b[_0x4d5241(0x1a1)],_0x491dd7[_0x4d5241(0x1ce)],_0x491dd7[_0x4d5241(0x147)]??[]);if(!_0x53d61f)return!0x1;let _0xe9f69b=mt(_0x34cf8b[_0x4d5241(0x11f)],_0x34cf8b['model'],_0x34cf8b['unitId']),_0x1ff475=ht({'documentData':_0x34cf8b[_0x4d5241(0x194)],'resource':_0x34cf8b['resource'],'rangeId':_0xe9f69b,'config':{'formula':_0x491dd7['formula'],..._0x491dd7[_0x4d5241(0x1ba)]?{'numberFormat':_0x491dd7['numberFormat']}:null},'startOffset':_0x2b079b['startOffset'],'endOffset':_0x2b079b[_0x4d5241(0x172)]});if(!_0x1ff475)return!0x1;let _0x157f73=_0x4bd97f(_0x2099cb,_0x34cf8b['unitId'],_0x53d61f);return!_0x157f73||!J({'accessor':_0x2099cb,'document':_0x34cf8b[_0x4d5241(0xf1)],'unitId':_0x34cf8b[_0x4d5241(0x1a1)],'trigger':U['id'],'rangeId':_0xe9f69b,'previousResource':_0x34cf8b[_0x4d5241(0x19d)],'nextResource':_0x1ff475['nextResource'],'previousDocumentData':_0x34cf8b[_0x4d5241(0x194)],'nextDocumentData':_0x1ff475[_0x4d5241(0x1d0)],'cursorOffset':_0x1ff475['cursorOffset'],'externalMutations':_0x157f73})?!0x1:{'rangeId':_0xe9f69b,'startOffset':_0x1ff475['cursorOffset']-0x1,'endOffset':_0x1ff475['cursorOffset']};}},W={'id':_0x3074bd(0xff),'type':_0x49f619[_0x3074bd(0x158)],'handler':(_0x41d3ca,_0x1f074a)=>{const _0x108922=_0x3074bd;if(!(_0x1f074a!=null&&_0x1f074a['rangeId'])||!_0x1f074a[_0x108922(0x1ce)][_0x108922(0x1b2)]())return!0x1;let _0x4f6756=q(_0x41d3ca,_0x1f074a[_0x108922(0x1a1)],''),_0x428f0f=_0x4f6756==null?void 0x0:_0x4f6756[_0x108922(0x1af)]['getFormula'](_0x4f6756[_0x108922(0x1a1)],_0x1f074a['rangeId']),_0x464d76=_0x4f6756?T(_0x4f6756[_0x108922(0x194)][_0x108922(0x11f)],_0x1f074a[_0x108922(0x1b3)]):void 0x0;if(!_0x4f6756||!_0x428f0f||!_0x464d76)return!0x1;let _0x25d714=pt(_0x41d3ca,_0x4f6756[_0x108922(0x1a1)],_0x1f074a['formula'],_0x1f074a[_0x108922(0x147)]??[]);if(!_0x25d714)return!0x1;let _0x2ab4b4=_0x4bd97f(_0x41d3ca,_0x4f6756['unitId'],_0x25d714);if(!_0x2ab4b4)return!0x1;let _0x4c5f00=Ct(_0x4f6756[_0x108922(0x19d)]);return _0x4c5f00[_0x108922(0x151)][_0x1f074a['rangeId']]={'formula':_0x1f074a[_0x108922(0x1ce)],..._0x1f074a['numberFormat']?{'numberFormat':_0x1f074a[_0x108922(0x1ba)]}:_0x428f0f['numberFormat']?{'numberFormat':_0x428f0f[_0x108922(0x1ba)]}:null},J({'accessor':_0x41d3ca,'document':_0x4f6756[_0x108922(0xf1)],'unitId':_0x4f6756['unitId'],'trigger':W['id'],'rangeId':_0x1f074a[_0x108922(0x1b3)],'previousResource':_0x4f6756['resource'],'nextResource':_0x4c5f00,'cursorOffset':_0x464d76['endIndex']+0x1,'externalMutations':_0x2ab4b4});}},G={'id':_0x3074bd(0x1a3),'type':_0x49f619[_0x3074bd(0x158)],'handler':(_0x397733,_0x2e5413)=>{const _0x1f0046=_0x3074bd;if(!(_0x2e5413!=null&&_0x2e5413[_0x1f0046(0x1b3)]))return!0x1;let _0xed3c6d=q(_0x397733,_0x2e5413[_0x1f0046(0x1a1)],''),_0x3955b4=_0xed3c6d==null?void 0x0:_0xed3c6d[_0x1f0046(0x1af)][_0x1f0046(0x1b8)](_0xed3c6d[_0x1f0046(0x1a1)],_0x2e5413['rangeId']),_0x19a39e=_0xed3c6d?T(_0xed3c6d['documentData'][_0x1f0046(0x11f)],_0x2e5413[_0x1f0046(0x1b3)]):void 0x0;if(!_0xed3c6d||!_0x3955b4||!_0x19a39e)return!0x1;let _0x4006cd=Ct(_0xed3c6d[_0x1f0046(0x19d)]);return _0x4006cd[_0x1f0046(0x151)][_0x2e5413[_0x1f0046(0x1b3)]]={..._0x3955b4,..._0x2e5413[_0x1f0046(0x1ba)]?{'numberFormat':_0x2e5413[_0x1f0046(0x1ba)]}:null},_0x2e5413[_0x1f0046(0x1ba)]||delete _0x4006cd[_0x1f0046(0x151)][_0x2e5413[_0x1f0046(0x1b3)]]['numberFormat'],J({'accessor':_0x397733,'document':_0xed3c6d[_0x1f0046(0xf1)],'unitId':_0xed3c6d[_0x1f0046(0x1a1)],'trigger':G['id'],'rangeId':_0x2e5413['rangeId'],'previousResource':_0xed3c6d['resource'],'nextResource':_0x4006cd,'cursorOffset':_0x19a39e[_0x1f0046(0xf2)]+0x1,'externalMutations':{}});}},K={'id':'docs-formula.command.remove','type':_0x49f619[_0x3074bd(0x158)],'handler':(_0xd5e60c,_0x18ef04)=>ut(_0xd5e60c,_0x18ef04,'',K['id'])},ct={'id':'docs-formula.command.replace-with-text','type':_0x49f619[_0x3074bd(0x158)],'handler':(_0x533af6,_0x574a35)=>ut(_0x533af6,_0x574a35,(_0x574a35==null?void 0x0:_0x574a35[_0x3074bd(0x18c)])??'',ct['id'])},lt={'id':_0x3074bd(0x131),'type':_0x49f619[_0x3074bd(0x158)],'handler':(_0x2661fa,_0x1146fd)=>{const _0x408a17=_0x3074bd;if(!(_0x1146fd!=null&&_0x1146fd[_0x408a17(0x1b3)]))return!0x1;let _0x37fe51=q(_0x2661fa,_0x1146fd[_0x408a17(0x1a1)],'');if(!_0x37fe51)return!0x1;let _0x3bd7c8=_0x2661fa[_0x408a17(0x104)](L)[_0x408a17(0x10f)]({'unitId':_0x37fe51['unitId'],'rangeId':_0x1146fd[_0x408a17(0x1b3)]});return _0x3bd7c8?ut(_0x2661fa,_0x1146fd,_0x3bd7c8[_0x408a17(0x18c)],lt['id']):!0x1;}};function ut(_0x57669c,_0x426beb,_0x46c36e,_0x5b69e7){const _0x107cde=_0x3074bd;if(!(_0x426beb!=null&&_0x426beb[_0x107cde(0x1b3)]))return!0x1;let _0x451971=q(_0x57669c,_0x426beb['unitId'],'');if(!_0x451971)return!0x1;let _0x496c65=Be({'documentData':_0x451971[_0x107cde(0x194)],'resource':_0x451971[_0x107cde(0x19d)],'rangeId':_0x426beb['rangeId'],'text':_0x46c36e});return _0x496c65?J({'accessor':_0x57669c,'document':_0x451971[_0x107cde(0xf1)],'unitId':_0x451971[_0x107cde(0x1a1)],'trigger':_0x5b69e7,'rangeId':_0x426beb[_0x107cde(0x1b3)],'previousResource':_0x451971['resource'],'nextResource':_0x496c65[_0x107cde(0x1d9)],'previousDocumentData':_0x451971[_0x107cde(0x194)],'nextDocumentData':_0x496c65[_0x107cde(0x1d0)],'cursorOffset':_0x496c65[_0x107cde(0xeb)],'externalMutations':{}}):!0x1;}function q(_0x81bb81,_0xb336e3,_0x35c32f){const _0x4545cf=_0x3074bd;if(_0x35c32f)return null;let _0x31f8f3=_0x81bb81[_0x4545cf(0x104)](_0x5a1b75),_0x24fbd=(_0xb336e3?_0x31f8f3['getUnit'](_0xb336e3,_0x56d504[_0x4545cf(0x14f)]):_0x31f8f3[_0x4545cf(0x14b)](_0x56d504[_0x4545cf(0x14f)]))??null;if(!_0x24fbd)return null;let _0x5462dc=_0x24fbd['getSnapshot'](),_0x143f05=_0x5462dc[_0x4545cf(0x11f)];if(_0x5462dc[_0x4545cf(0x140)]||!_0x143f05)return null;let _0x5e2a42=_0x81bb81['get'](P);return _0x5e2a42[_0x4545cf(0x10a)](_0x24fbd['getUnitId']())?null:{'document':_0x24fbd,'body':_0x143f05,'documentData':_0x5462dc,'model':_0x5e2a42,'resource':_0x5e2a42[_0x4545cf(0x185)](_0x24fbd[_0x4545cf(0x113)]())??b(),'unitId':_0x24fbd[_0x4545cf(0x113)]()};}function dt(_0x46af4f,_0x326fd3){const _0x496760=_0x3074bd;var _0xbad62c;return(_0xbad62c=_0x46af4f[_0x496760(0x104)](_0x2711a1)[_0x496760(0x1dd)]({'subUnitId':_0x326fd3,'unitId':_0x326fd3}))==null?void 0x0:_0xbad62c[0x0];}function ft(_0x4f47a5,_0x1fc99e,_0x4d2a6c){const _0x2cea14=_0x3074bd;if((_0x4f47a5==null?void 0x0:_0x4f47a5['type'])==='paragraph'){var _0x1b82cd;let _0x3dffa4=((_0x1b82cd=_0x1fc99e[_0x2cea14(0x12b)])==null?void 0x0:_0x1b82cd[_0x2cea14(0x180)](_0x5ba3b2=>_0x5ba3b2[_0x2cea14(0x114)]===_0x4f47a5['paragraphId']))??[];if(_0x3dffa4[_0x2cea14(0x177)]!==0x1)return null;let _0x43a12f=_0x3dffa4[0x0],_0x24ce83=_0x403d2a(_0x1fc99e,_0x43a12f),_0x3c0f55=_0x43a12f[_0x2cea14(0x1ab)]-_0x24ce83,_0x570667=_0x4f47a5[_0x2cea14(0x19a)]==='end'?_0x3c0f55:_0x4f47a5[_0x2cea14(0x19a)];if(!Number['isInteger'](_0x570667)||_0x570667<0x0||_0x570667>_0x3c0f55)return null;let _0x39a125=_0x24ce83+_0x570667;return{'startOffset':_0x39a125,'endOffset':_0x39a125};}if((_0x4f47a5==null?void 0x0:_0x4f47a5[_0x2cea14(0x153)])===_0x2cea14(0x12a))return!Number['isInteger'](_0x4f47a5[_0x2cea14(0x15d)])||!Number[_0x2cea14(0x18d)](_0x4f47a5['endOffset'])?null:{'startOffset':Math[_0x2cea14(0x15f)](_0x4f47a5['startOffset'],_0x4f47a5[_0x2cea14(0x172)]),'endOffset':Math['max'](_0x4f47a5['startOffset'],_0x4f47a5[_0x2cea14(0x172)])};let _0x3ca6bf=(_0x4f47a5==null?void 0x0:_0x4f47a5['type'])===_0x2cea14(0x134)?_0x4f47a5['selection']:_0x4d2a6c;return!_0x3ca6bf||_0x3ca6bf[_0x2cea14(0x18a)]?null:{'startOffset':Math[_0x2cea14(0x15f)](_0x3ca6bf['startOffset'],_0x3ca6bf[_0x2cea14(0x172)]),'endOffset':Math[_0x2cea14(0x1cb)](_0x3ca6bf[_0x2cea14(0x15d)],_0x3ca6bf[_0x2cea14(0x172)])};}function pt(_0x10caae,_0x3935ad,_0x37674e,_0x419cce){const _0x5e4776=_0x3074bd;let _0x457b88=_0x10caae[_0x5e4776(0x104)](_0x3874f6),_0x38d283=_0x37674e['startsWith']('=')?_0x37674e[_0x5e4776(0x178)](0x1):_0x37674e,_0x476613=_0x457b88[_0x5e4776(0x142)](_0x38d283);if(!_0x476613)return null;let _0x3e0a6e=_0x10caae[_0x5e4776(0x104)](_0x51c26f),_0x22cd0c=_0x26b6bd({'qualifiers':_0x239d3f(_0x476613),'explicitReferences':_0x419cce??[],'resolveBinding':_0x844b7=>_0x3e0a6e['resolveBinding'](_0x3935ad,_0x844b7)});return _0x22cd0c[_0x5e4776(0xfe)]===_0x5e4776(0x1ca)?_0x22cd0c[_0x5e4776(0x170)]:null;}function mt(_0x83caec,_0x384e6c,_0x5b9ff5){const _0x566c39=_0x3074bd;var _0x9603d9;let _0x2e50bc=_0x260a9d(0x6);for(;_0x83caec!=null&&(_0x9603d9=_0x83caec[_0x566c39(0x122)])!=null&&_0x9603d9[_0x566c39(0x17b)](_0x3d0a4f=>_0x3d0a4f[_0x566c39(0x1b3)]===_0x2e50bc)||_0x384e6c[_0x566c39(0x1b8)](_0x5b9ff5,_0x2e50bc);)_0x2e50bc=_0x260a9d(0x6);return _0x2e50bc;}function ht(_0x4d03db){try{return Re(_0x4d03db);}catch(_0x58b084){if(_0x58b084 instanceof C)return null;throw _0x58b084;}}function gt(_0x4fb62f){const _0x30b63e=_0x3074bd;let _0x16e6b7=_0x4fb62f[_0x30b63e(0x14d)]&&_0x4fb62f['nextDocumentData']?vt(_0x4fb62f[_0x30b63e(0xf1)],_0x4fb62f['unitId'],_0x4fb62f['previousDocumentData'],_0x4fb62f['nextDocumentData'],_0x4fb62f[_0x30b63e(0xeb)],_0x4fb62f[_0x30b63e(0x15a)]):null;return _0x4fb62f[_0x30b63e(0x14d)]&&_0x4fb62f[_0x30b63e(0x1d0)]&&!_0x16e6b7?null:{'documentRedo':_0x16e6b7,'resourceRedo':{'id':V['id'],'params':{'unitId':_0x4fb62f[_0x30b63e(0x1a1)],'resource':_0x4fb62f[_0x30b63e(0x1d9)]}},'resourceUndo':{'id':V['id'],'params':{'unitId':_0x4fb62f[_0x30b63e(0x1a1)],'resource':_0x4fb62f['previousResource']}}};}function _t(_0xa67574,_0x2ce36d,_0x572fd1,_0x49766a){const _0x3871f8=_0x3074bd;_0x49766a['pushUndoRedo']({'id':_0xa67574['trigger']+':'+_0xa67574[_0x3871f8(0x1b3)],'unitID':_0xa67574[_0x3871f8(0x1a1)],'redoMutations':[..._0xa67574[_0x3871f8(0x12f)][_0x3871f8(0x1c1)]?[_0xa67574[_0x3871f8(0x12f)][_0x3871f8(0x1c1)]]:[],..._0x2ce36d['documentRedo']?[_0x2ce36d['documentRedo']]:[],_0x2ce36d['resourceRedo']],'undoMutations':[_0x2ce36d[_0x3871f8(0x11b)],..._0x572fd1?[_0x572fd1]:[],..._0xa67574[_0x3871f8(0x12f)][_0x3871f8(0x123)]?[_0xa67574[_0x3871f8(0x12f)]['undoMutation']]:[]]});}function J(_0x407de1){const _0x207627=_0x3074bd;let _0x2b1462=_0x407de1['accessor']['get'](_0x78f14b),_0x2203e3=_0x407de1['accessor'][_0x207627(0x104)](_0x3e3a50),_0x1fa48b=_0x407de1[_0x207627(0x139)]['get'](_0x2711a1),_0x1b7eb4=gt(_0x407de1);if(!_0x1b7eb4)return!0x1;let _0x32f231=!0x1,_0x15d24a=null,_0x1ad0c9=!0x1;try{if(_0x407de1['externalMutations'][_0x207627(0x1c1)]){if(!_0x2b1462[_0x207627(0x1ad)](_0x407de1[_0x207627(0x12f)][_0x207627(0x1c1)]['id'],_0x407de1[_0x207627(0x12f)][_0x207627(0x1c1)][_0x207627(0x117)]))return!0x1;_0x32f231=!0x0;}if(_0x1b7eb4[_0x207627(0x17f)]){let _0x563b0c=_0x2b1462['syncExecuteCommand'](_0x1b7eb4[_0x207627(0x17f)]['id'],_0x1b7eb4[_0x207627(0x17f)]['params']);if(!_0x563b0c)return bt(_0x2b1462,_0x407de1['externalMutations'],_0x32f231),!0x1;_0x15d24a={'id':_0x40b755['id'],'params':{..._0x563b0c,'noHistory':!0x0,'noNeedSetTextRange':!0x0,'segmentId':''}};}if(!_0x2b1462[_0x207627(0x1ad)](_0x1b7eb4[_0x207627(0x163)]['id'],_0x1b7eb4[_0x207627(0x163)][_0x207627(0x117)]))return yt(_0x2b1462,_0x15d24a),bt(_0x2b1462,_0x407de1[_0x207627(0x12f)],_0x32f231),!0x1;_0x1ad0c9=!0x0,_t(_0x407de1,_0x1b7eb4,_0x15d24a,_0x2203e3);}catch(_0x3d803b){throw _0x1ad0c9&&_0x2b1462[_0x207627(0x1ad)](_0x1b7eb4['resourceUndo']['id'],_0x1b7eb4['resourceUndo'][_0x207627(0x117)]),yt(_0x2b1462,_0x15d24a),bt(_0x2b1462,_0x407de1[_0x207627(0x12f)],_0x32f231),_0x3d803b;}return _0x1fa48b[_0x207627(0x1de)]([{'startOffset':_0x407de1['cursorOffset'],'endOffset':_0x407de1[_0x207627(0xeb)],'segmentId':''}],{'unitId':_0x407de1[_0x207627(0x1a1)],'subUnitId':_0x407de1[_0x207627(0x1a1)]},!0x1,{[_0x169a9f]:!0x0}),!0x0;}function vt(_0xdcaadd,_0x1db5fd,_0xc294ac,_0x4197aa,_0x253379,_0x71cfb0){let _0x602615=xt(_0xc294ac,_0x4197aa,_0x1d4096(_0xdcaadd,''));return _0x602615?{'id':_0x40b755['id'],'params':{'unitId':_0x1db5fd,'actions':_0x602615,'segmentId':'','textRanges':[{'startOffset':_0x253379,'endOffset':_0x253379,'collapsed':!0x0,'segmentId':''}],'isEditing':!0x1,'noHistory':!0x0,'noNeedSetTextRange':!0x0,'trigger':_0x71cfb0}}:null;}function yt(_0x201721,_0x429785){const _0x1a19f5=_0x3074bd;_0x429785&&_0x201721[_0x1a19f5(0x1ad)](_0x429785['id'],_0x429785[_0x1a19f5(0x117)]);}function bt(_0x311c67,_0x1b9aca,_0x270378){const _0x1c3e39=_0x3074bd;_0x270378&&_0x1b9aca[_0x1c3e39(0x123)]&&_0x311c67['syncExecuteCommand'](_0x1b9aca[_0x1c3e39(0x123)]['id'],_0x1b9aca['undoMutation'][_0x1c3e39(0x117)]);}function xt(_0xe9087c,_0x4f094c,_0x44e2f4){const _0x54969c=_0x3074bd;let _0x328d2c=_0xe9087c[_0x54969c(0x11f)],_0x247632=_0x4f094c[_0x54969c(0x11f)],_0x4fb0a9=St(_0x328d2c==null?void 0x0:_0x328d2c[_0x54969c(0x1d5)],_0x247632==null?void 0x0:_0x247632[_0x54969c(0x1d5)]);if(!_0x4fb0a9||!_0x247632)return null;let _0x1097ce=new _0x1b1246();return _0x1097ce[_0x54969c(0x168)](_0x4fb0a9['start']),_0x4fb0a9[_0x54969c(0xf9)]>0x0&&_0x1097ce[_0x54969c(0x105)](_0x4fb0a9[_0x54969c(0xf9)],_0x27439c(_0x247632,_0x4fb0a9['start'],_0x4fb0a9['start']+_0x4fb0a9[_0x54969c(0xf9)],!0x1)),_0x4fb0a9[_0x54969c(0x1ae)]>0x0&&_0x1097ce[_0x54969c(0x1b1)](_0x4fb0a9[_0x54969c(0x1ae)]),_0x4ed544[_0x54969c(0x150)]()['editOp'](_0x1097ce[_0x54969c(0x124)](),_0x44e2f4);}function St(_0x407080,_0x48f6f5){const _0x2ba6e9=_0x3074bd;if(_0x407080==null||_0x48f6f5==null||_0x407080===_0x48f6f5)return null;let _0x55743a=0x0;for(;_0x55743a<_0x407080['length']&&_0x55743a<_0x48f6f5[_0x2ba6e9(0x177)]&&_0x407080[_0x55743a]===_0x48f6f5[_0x55743a];)_0x55743a+=0x1;let _0x4dde57=_0x407080[_0x2ba6e9(0x177)],_0x5356f7=_0x48f6f5[_0x2ba6e9(0x177)];for(;_0x4dde57>_0x55743a&&_0x5356f7>_0x55743a&&_0x407080[_0x4dde57-0x1]===_0x48f6f5[_0x5356f7-0x1];)--_0x4dde57,--_0x5356f7;return{'start':_0x55743a,'deleteLength':_0x4dde57-_0x55743a,'insertLength':_0x5356f7-_0x55743a};}function Ct(_0x266bea){const _0x2ca54b=_0x3074bd;return{'schemaVersion':0x1,'formulas':Object[_0x2ca54b(0xec)](Object[_0x2ca54b(0x1e1)](_0x266bea['formulas'])[_0x2ca54b(0xfd)](([_0x3c5300,_0x2f3f57])=>[_0x3c5300,{..._0x2f3f57,..._0x2f3f57['numberFormat']?{'numberFormat':{..._0x2f3f57[_0x2ca54b(0x1ba)]}}:null,..._0x2f3f57[_0x2ca54b(0x13e)]?{'lastValue':{..._0x2f3f57['lastValue']}}:null}]))};}let Y=class extends _0x5dc02b{constructor(_0x51c4c4,_0x4a6557,_0x137d5b,_0x3874a8){const _0x42b5fd=_0x3074bd;super(),this['_instanceService']=_0x51c4c4,this[_0x42b5fd(0x16f)]=_0x4a6557,this[_0x42b5fd(0x17c)]=_0x137d5b,this[_0x42b5fd(0x192)]=_0x3874a8,N(this,'_pendingUnitIds',new Set()),N(this,_0x42b5fd(0x115),!0x1),N(this,_0x42b5fd(0x179),!0x1),this[_0x42b5fd(0x13d)]['getAllUnitsForType'](_0x56d504[_0x42b5fd(0x14f)])[_0x42b5fd(0x17a)](_0x4898aa=>this[_0x42b5fd(0x192)][_0x42b5fd(0x13c)](_0x4898aa)),this['disposeWithMe'](this['_model'][_0x42b5fd(0x152)]['subscribe'](({unitId:_0x50752d})=>this[_0x42b5fd(0x181)](_0x50752d))),this[_0x42b5fd(0x1db)](this[_0x42b5fd(0x13d)][_0x42b5fd(0x1dc)][_0x42b5fd(0x12d)](({unit:_0x11a544})=>{const _0x4bea6d=_0x42b5fd;_0x11a544[_0x4bea6d(0x153)]===_0x56d504[_0x4bea6d(0x14f)]&&this[_0x4bea6d(0x190)](_0x11a544[_0x4bea6d(0x113)]());})),this[_0x42b5fd(0x1db)](this[_0x42b5fd(0x13d)]['unitDisposed$'][_0x42b5fd(0x12d)](_0x43c2f7=>{const _0x16fbf6=_0x42b5fd;this['_service'][_0x16fbf6(0x19b)](_0x43c2f7[_0x16fbf6(0x113)]());})),this['disposeWithMe'](this[_0x42b5fd(0x16f)][_0x42b5fd(0x1da)](_0x1299d7=>{const _0xb05ac0=_0x42b5fd;if(_0x1299d7['id']===_0x40b755['id']&&wt(_0x1299d7[_0xb05ac0(0x117)])){let _0x161e5c=_0x1299d7[_0xb05ac0(0x117)];_0x161e5c[_0xb05ac0(0x18a)]||this['_syncUnit'](_0x161e5c[_0xb05ac0(0x1a1)]);}}));}['dispose'](){const _0x2a7cd1=_0x3074bd;this[_0x2a7cd1(0x179)]=!0x0,super[_0x2a7cd1(0x145)]();}[_0x3074bd(0x190)](_0x5da4f2){const _0x200252=_0x3074bd;this['_pendingUnitIds'][_0x200252(0x183)](_0x5da4f2),!this[_0x200252(0x115)]&&(this[_0x200252(0x115)]=!0x0,queueMicrotask(()=>{const _0x2592aa=_0x200252;if(this[_0x2592aa(0x115)]=!0x1,this[_0x2592aa(0x179)])return;let _0x5082e5=Array[_0x2592aa(0x13f)](this[_0x2592aa(0x157)]);this[_0x2592aa(0x157)][_0x2592aa(0x121)](),_0x5082e5['forEach'](_0x577885=>this[_0x2592aa(0x181)](_0x577885));}));}[_0x3074bd(0x181)](_0x5a818a){const _0x43fc44=_0x3074bd;let _0x47f6ac=this[_0x43fc44(0x13d)]['getUnit'](_0x5a818a,_0x56d504[_0x43fc44(0x14f)]);_0x47f6ac&&this[_0x43fc44(0x192)]['syncUnit'](_0x47f6ac);}};Y=I([F(0x0,_0x5a1b75),F(0x1,_0x78f14b),F(0x2,_0x34e393(P)),F(0x3,_0x34e393(L))],Y);function wt(_0x3cb370){const _0x1167f3=_0x3074bd;return typeof _0x3cb370==_0x1167f3(0x195)&&!!_0x3cb370&&_0x1167f3(0x1a1)in _0x3cb370&&typeof _0x3cb370[_0x1167f3(0x1a1)]==_0x1167f3(0x165)&&(!(_0x1167f3(0x18a)in _0x3cb370)||_0x3cb370[_0x1167f3(0x18a)]===void 0x0||typeof _0x3cb370[_0x1167f3(0x18a)]=='string');}let X=class extends _0x5dc02b{constructor(_0x1924a1,_0xe959fd){const _0x43e54b=_0x3074bd;super(),this[_0x43e54b(0x148)]=_0x1924a1,this[_0x43e54b(0x18f)]=_0xe959fd,this[_0x43e54b(0x1db)](this[_0x43e54b(0x148)][_0x43e54b(0x184)]({'pluginName':y,'businesses':[_0x56d504[_0x43e54b(0x14f)]],'toJson':_0x430e2c=>JSON[_0x43e54b(0x1b4)](this[_0x43e54b(0x18f)]['serialize'](_0x430e2c)),'parseJson':_0x25af78=>JSON[_0x43e54b(0x17e)](_0x25af78),'onLoad':(_0x27bbe1,_0x2d1130)=>{const _0x5aa99f=_0x43e54b;this['_docFormulaModel'][_0x5aa99f(0xed)](_0x27bbe1,_0x2d1130);},'onUnLoad':_0x4de3d8=>this[_0x43e54b(0x18f)][_0x43e54b(0x1c9)](_0x4de3d8)}));}};X=I([F(0x0,_0x3f723c),F(0x1,_0x34e393(P))],X);var Tt=_0x3074bd(0x136),Et=_0x3074bd(0x1d1);const Dt={};let Z=class extends _0x5dc02b{constructor(_0x4a8847,_0x48037b,_0x2299f8){const _0x18c3e7=_0x3074bd;super(),this[_0x18c3e7(0x198)]=_0x4a8847,this[_0x18c3e7(0x100)]=_0x48037b,this[_0x18c3e7(0x1db)](_0x2299f8[_0x18c3e7(0xfb)]({'resolve':(_0x4e0ff5,_0x3cd840)=>{const _0xbefd60=_0x18c3e7;var _0x1a243d;return((_0x1a243d=_0x3cd840['customRanges'])==null?void 0x0:_0x1a243d[_0xbefd60(0x180)](w)['map'](_0x13885e=>({'startOffset':_0x13885e[_0xbefd60(0x1ab)],'endOffset':_0x13885e[_0xbefd60(0xf2)]+0x1,'text':this[_0xbefd60(0x11e)](_0x4e0ff5,_0x13885e[_0xbefd60(0x1b3)])})))??[];}})),this['disposeWithMe'](this[_0x18c3e7(0x100)][_0x18c3e7(0x10b)][_0x18c3e7(0x12d)](({unitId:_0xaa6ca})=>{const _0x167648=_0x18c3e7;_0x2299f8[_0x167648(0xe8)](_0xaa6ca);}));}[_0x3074bd(0x11e)](_0x2c5bf9,_0x225411){const _0x449518=_0x3074bd;var _0x3692bd;return((_0x3692bd=this['_formulaService'][_0x449518(0x10f)]({'unitId':_0x2c5bf9,'rangeId':_0x225411}))==null?void 0x0:_0x3692bd[_0x449518(0x18c)])??'';}['resolveText'](_0x40b513,_0xf1624,_0x329977){const _0x112194=_0x3074bd;var _0x5191cf;let _0x33ae39=this[_0x112194(0x198)][_0x112194(0x149)](_0x40b513,_0x56d504[_0x112194(0x14f)]),_0x179216=_0x33ae39==null?void 0x0:_0x33ae39['getBody']();if(!_0x179216)return'';let _0x2edad3=_0x179216[_0x112194(0x1d5)][_0x112194(0x178)](_0xf1624,_0x329977),_0x826430=((_0x5191cf=_0x179216[_0x112194(0x122)])==null?void 0x0:_0x5191cf[_0x112194(0x180)](_0x319bb7=>w(_0x319bb7)&&_0x319bb7['startIndex']>=_0xf1624&&_0x319bb7[_0x112194(0xf2)]<_0x329977)[_0x112194(0x133)]((_0x4bcc5e,_0xb827a8)=>_0xb827a8[_0x112194(0x1ab)]-_0x4bcc5e['startIndex']))??[];for(let _0x34ac62 of _0x826430){let _0x400e0b=_0x34ac62[_0x112194(0x1ab)]-_0xf1624,_0x44ac0b=_0x34ac62[_0x112194(0xf2)]-_0xf1624+0x1;_0x2edad3=''+_0x2edad3['slice'](0x0,_0x400e0b)+this['resolveFormula'](_0x40b513,_0x34ac62['rangeId'])+_0x2edad3[_0x112194(0x178)](_0x44ac0b);}return _0x2edad3;}[_0x3074bd(0x1c5)](_0x3c68cf){return Ot(_0x3c68cf);}[_0x3074bd(0x166)](_0x4b1b82,_0x1c578e,_0x2ed5c7={}){const _0x418e8f=_0x3074bd;var _0x5c302b;return Ve({'id':_0x4b1b82,'body':_0x1c578e,'documentStyle':{}},(((_0x5c302b=_0x1c578e[_0x418e8f(0x122)])==null?void 0x0:_0x5c302b[_0x418e8f(0x180)](w))??[])['map'](_0x8f9139=>({'rangeId':_0x8f9139['rangeId'],'text':_0x2ed5c7[_0x8f9139['rangeId']]??this[_0x418e8f(0x11e)](_0x4b1b82,_0x8f9139[_0x418e8f(0x1b3)])})))['body']??{'dataStream':''};}};Z=I([F(0x0,_0x5a1b75),F(0x1,_0x34e393(L)),F(0x2,_0x34e393(_0x572c95))],Z);function Ot(_0x21ac83){const _0x313bfd=_0x3074bd;var _0x2a4f7d,_0x50f110;let _0x2f7841=kt(_0x21ac83),_0x274901=Ve(_0x21ac83,(((_0x2a4f7d=_0x21ac83[_0x313bfd(0x11f)])==null||(_0x2a4f7d=_0x2a4f7d[_0x313bfd(0x122)])==null?void 0x0:_0x2a4f7d[_0x313bfd(0x180)](w))??[])[_0x313bfd(0xfd)](_0x26956b=>({'rangeId':_0x26956b[_0x313bfd(0x1b3)],'text':At(_0x2f7841==null?void 0x0:_0x2f7841['formulas'][_0x26956b[_0x313bfd(0x1b3)]])})));return _0x274901[_0x313bfd(0x1a7)]=(_0x50f110=_0x274901[_0x313bfd(0x1a7)])==null?void 0x0:_0x50f110[_0x313bfd(0x180)](_0x2cb911=>_0x2cb911['name']!==y),_0x274901;}function kt(_0x151c7d){const _0x34c06d=_0x3074bd;var _0x2caa98;let _0x3b5313=(_0x2caa98=_0x151c7d['resources'])==null||(_0x2caa98=_0x2caa98[_0x34c06d(0x129)](_0x411c73=>_0x411c73[_0x34c06d(0x1b5)]===_0x34c06d(0x160)))==null?void 0x0:_0x2caa98[_0x34c06d(0x1b0)];if(_0x3b5313)try{let _0x1b0173=JSON[_0x34c06d(0x17e)](_0x3b5313);return x(_0x1b0173)?_0x1b0173:void 0x0;}catch{return;}}function At(_0x330030){const _0x194572=_0x3074bd;return _0x330030?_0x43dcf8({'lastValue':_0x330030[_0x194572(0x13e)],'numberFormat':_0x330030[_0x194572(0x1ba)]})[_0x194572(0x18c)]:'';}let Q=class extends _0x5dc02b{constructor(_0xc14e92,_0x1b33af,_0x186623){const _0x2bd20d=_0x3074bd;super(),this[_0x2bd20d(0x100)]=_0xc14e92,this['_cacheEligibilityService']=_0x1b33af,this[_0x2bd20d(0x1db)](_0x186623[_0x2bd20d(0x103)](this));}[_0x3074bd(0x1d2)](_0x3e8ebd){const _0x39d0bb=_0x3074bd;let _0x166b29=new Map();for(let _0x350baf of this['_formulaService']['getRegisteredFormulas']()){var _0x28882c;if(!this['_cacheEligibilityService'][_0x39d0bb(0x162)](_0x350baf['config'][_0x39d0bb(0x1ce)],_0x350baf[_0x39d0bb(0x1d8)])[_0x39d0bb(0x12e)])continue;let _0x2746c9=_0x329bd2(_0x350baf[_0x39d0bb(0x1d8)]),_0x1cef38=_0x2746c9?_0x2dfe02(_0x2746c9):null;if(!_0x1cef38||jt(_0x350baf[_0x39d0bb(0x1b6)]['lastValue'],_0x1cef38))continue;let _0x2746e9=_0x166b29[_0x39d0bb(0x104)](_0x350baf[_0x39d0bb(0x126)][_0x39d0bb(0x1a1)])??[];_0x2746e9['push']({'rangeId':_0x350baf['identity'][_0x39d0bb(0x1b3)],'expectedFormula':_0x350baf['config'][_0x39d0bb(0x1ce)],'expectedNumberFormat':(_0x28882c=_0x350baf['config'][_0x39d0bb(0x1ba)])==null?void 0x0:_0x28882c['pattern'],'expectedReferenceRevision':_0x350baf['referenceRevision'],'lastValue':_0x1cef38}),_0x166b29[_0x39d0bb(0x187)](_0x350baf[_0x39d0bb(0x126)][_0x39d0bb(0x1a1)],_0x2746e9);}return Array[_0x39d0bb(0x13f)](_0x166b29,([_0x18166b,_0x286e3d])=>({'id':H['id'],'params':{'unitId':_0x18166b,'updates':_0x286e3d}}));}};Q=I([F(0x0,_0x34e393(L)),F(0x1,_0x34e393(_0x142c68)),F(0x2,_0x34e393(_0xdccf24))],Q);function jt(_0x28132f,_0x3e8a8b){const _0x15a7a2=_0x3074bd;return(_0x28132f==null?void 0x0:_0x28132f['v'])===_0x3e8a8b['v']&&(_0x28132f==null?void 0x0:_0x28132f['t'])===_0x3e8a8b['t']&&(_0x28132f==null?void 0x0:_0x28132f[_0x15a7a2(0x128)])===_0x3e8a8b[_0x15a7a2(0x128)];}let $=class extends _0x497bd3{constructor(_0x4b70ab=Dt,_0x49b31c,_0xe6831c,_0x11975c){const _0x1bda44=_0x3074bd;super(),this[_0x1bda44(0x1e2)]=_0x4b70ab,this['_injector']=_0x49b31c,this[_0x1bda44(0x16f)]=_0xe6831c,this[_0x1bda44(0x1e0)]=_0x11975c;let {..._0x2c11fa}=_0x5be025({},Dt,this[_0x1bda44(0x1e2)]);this['_configService']['setConfig']('docs-formula.config',_0x2c11fa);}[_0x3074bd(0x14c)](){const _0x3dd1f1=_0x3074bd;this[_0x3dd1f1(0x125)][_0x3dd1f1(0x183)]([P]),this[_0x3dd1f1(0x125)]['add']([L]),this[_0x3dd1f1(0x125)][_0x3dd1f1(0x183)]([X]),this['_injector'][_0x3dd1f1(0x183)]([Y]),this[_0x3dd1f1(0x125)][_0x3dd1f1(0x183)]([Q]),this['_injector'][_0x3dd1f1(0x183)]([Z]),_0x2d40f1(this[_0x3dd1f1(0x125)],[[P],[X],[Y],[Q],[Z]]),[ot,st,V,H,U,W,G,K,ct,lt][_0x3dd1f1(0x17a)](_0x1cb259=>this['disposeWithMe'](this[_0x3dd1f1(0x16f)]['registerCommand'](_0x1cb259)));}};N($,_0x3074bd(0x141),y),N($,_0x3074bd(0x1ac),Tt),N($,_0x3074bd(0x161),Et),N($,_0x3074bd(0x153),_0x56d504[_0x3074bd(0x14f)]),$=I([_0x21eda0(_0x4342e7,_0x1a7798,_0x515868),F(0x1,_0x34e393(_0x37a854)),F(0x2,_0x78f14b),F(0x3,_0x111e6a)],$);export{lt as ConvertDocFormulaToTextCommand,Me as DOC_FORMULA_CUSTOM_RANGE_KIND,Ne as DOC_FORMULA_OBJECT_REPLACEMENT,y as DOC_FORMULA_PLUGIN,je as DOC_FORMULA_SCHEMA_VERSION,Z as DocFormulaDisplayTextService,Y as DocFormulaLifecycleController,P as DocFormulaModel,X as DocFormulaResourceController,it as DocFormulaResultStatus,L as DocFormulaService,U as InsertDocFormulaCommand,C as InvalidDocFormulaInsertRangeError,K as RemoveDocFormulaCommand,st as RemoveDocFormulaMutation,ct as ReplaceDocFormulaWithTextCommand,H as SetDocFormulaLastValuesMutation,ot as SetDocFormulaMutation,G as SetDocFormulaNumberFormatCommand,V as SetDocFormulaResourceMutation,$ as UniverDocsFormulaPlugin,W as UpdateDocFormulaCommand,He as assertSafeDocFormulaInsertRange,Re as buildInsertDocFormulaActions,Be as buildRemoveDocFormulaActions,ze as buildUpdateDocFormulaActions,b as createEmptyDocFormulaResource,Ot as degradeDocFormulaDocumentData,T as findDocFormulaRange,Pe as isDocFormulaConfig,w as isDocFormulaRange,x as isDocFormulaResource,Fe as isFormulaLastValue};
package/lib/facade.js CHANGED
@@ -1 +1 @@
1
- var _0x38b32e=_0x4561;(function(_0x2a55bc,_0x264147){var _0x470037=_0x4561,_0x517040=_0x2a55bc();while(!![]){try{var _0x514f82=-parseInt(_0x470037(0xc0))/0x1*(-parseInt(_0x470037(0xda))/0x2)+-parseInt(_0x470037(0xcf))/0x3+-parseInt(_0x470037(0xed))/0x4+parseInt(_0x470037(0xe9))/0x5*(-parseInt(_0x470037(0xfc))/0x6)+parseInt(_0x470037(0xe8))/0x7+-parseInt(_0x470037(0x10b))/0x8*(-parseInt(_0x470037(0xe5))/0x9)+parseInt(_0x470037(0xfb))/0xa*(parseInt(_0x470037(0xc1))/0xb);if(_0x514f82===_0x264147)break;else _0x517040['push'](_0x517040['shift']());}catch(_0x5a25cf){_0x517040['push'](_0x517040['shift']());}}}(_0x15d1,0x1b993));import{ConvertDocFormulaToTextCommand as _0x312162,DocFormulaDisplayTextService as _0x6b6aca,DocFormulaModel as _0x26bebb,DocFormulaService as _0xa7e990,InsertDocFormulaCommand as _0x19c95b,RemoveDocFormulaCommand as _0x569ec3,ReplaceDocFormulaWithTextCommand as _0x278615,SetDocFormulaNumberFormatCommand as _0x7e41be,UpdateDocFormulaCommand as _0x13989d,isDocFormulaRange as _0x24b8b0}from'@univerjs-pro/docs-formula';import{ICommandService as _0x74e3c5,IResourceLoaderService as _0x239261,IUniverInstanceService as _0x484a6c,Inject as _0x53a887,UniverInstanceType as _0x104ec2}from'@univerjs/core';import{FDocument as _0x4d8a90,FDocumentParagraph as _0x2a2428,FDocumentTextRange as _0x41761d}from'@univerjs/docs/facade';function v(_0x134583,_0x40180f){return function(_0x2625b7,_0x5143fb){_0x40180f(_0x2625b7,_0x5143fb,_0x134583);};}function y(_0x3253e2,_0x407b3c,_0x133c89,_0x1e9250){var _0x3e03a2=_0x4561,_0x379687=arguments[_0x3e03a2(0xe0)],_0xa1f198=_0x379687<0x3?_0x407b3c:_0x1e9250===null?_0x1e9250=Object[_0x3e03a2(0xf7)](_0x407b3c,_0x133c89):_0x1e9250,_0x29c215;if(typeof Reflect==_0x3e03a2(0xd5)&&typeof Reflect['decorate']==_0x3e03a2(0xfe))_0xa1f198=Reflect[_0x3e03a2(0xc3)](_0x3253e2,_0x407b3c,_0x133c89,_0x1e9250);else{for(var _0x1e1f74=_0x3253e2[_0x3e03a2(0xe0)]-0x1;_0x1e1f74>=0x0;_0x1e1f74--)(_0x29c215=_0x3253e2[_0x1e1f74])&&(_0xa1f198=(_0x379687<0x3?_0x29c215(_0xa1f198):_0x379687>0x3?_0x29c215(_0x407b3c,_0x133c89,_0xa1f198):_0x29c215(_0x407b3c,_0x133c89))||_0xa1f198);}return _0x379687>0x3&&_0xa1f198&&Object[_0x3e03a2(0xce)](_0x407b3c,_0x133c89,_0xa1f198),_0xa1f198;}let b=class{constructor(_0x590907,_0x1ad6a5,_0x4621ab,_0x18a018,_0x312dea,_0x367f97){var _0x17b5fc=_0x4561;this['_unitId']=_0x590907,this[_0x17b5fc(0xcc)]=_0x1ad6a5,this[_0x17b5fc(0x100)]=_0x4621ab,this['_model']=_0x18a018,this[_0x17b5fc(0x108)]=_0x312dea,this[_0x17b5fc(0xd1)]=_0x367f97;}['getId'](){return this['_rangeId'];}[_0x38b32e(0xdc)](){var _0x39c12d=_0x38b32e;let _0x4d7f88=this['_getCustomRange']();return _0x4d7f88?{'endOffset':_0x4d7f88[_0x39c12d(0x105)]+0x1,'rangeId':_0x4d7f88[_0x39c12d(0xf8)],'startOffset':_0x4d7f88[_0x39c12d(0xd0)]}:null;}[_0x38b32e(0xbe)](){var _0x5ed2fc=_0x38b32e,_0x29a6d2;return((_0x29a6d2=this['_model'][_0x5ed2fc(0xbe)](this[_0x5ed2fc(0xd2)],this[_0x5ed2fc(0xcc)]))==null?void 0x0:_0x29a6d2[_0x5ed2fc(0xec)])??'';}['getConfig'](){var _0xb99bc9=_0x38b32e;return this[_0xb99bc9(0xeb)]['getFormula'](this[_0xb99bc9(0xd2)],this[_0xb99bc9(0xcc)])??null;}[_0x38b32e(0xd6)](){var _0x3b2e44=_0x38b32e;return this[_0x3b2e44(0x108)]['getResult']({'unitId':this[_0x3b2e44(0xd2)],'rangeId':this[_0x3b2e44(0xcc)]})??null;}[_0x38b32e(0xc8)](){var _0x23187f=_0x38b32e;let _0x3b6dac=this[_0x23187f(0xdc)](),_0x34cfaa=this['getConfig'](),_0xf4068a=this[_0x23187f(0xd6)]();return!_0x3b6dac||!_0x34cfaa||!_0xf4068a?null:{..._0x3b6dac,'config':_0x34cfaa,'formula':_0x34cfaa[_0x23187f(0xec)],'result':_0xf4068a,'type':_0x23187f(0xec)};}[_0x38b32e(0xbd)](_0x4da93a){var _0x2159f5=_0x38b32e;return this[_0x2159f5(0x100)][_0x2159f5(0xc7)](_0x13989d['id'],{'externalReferences':_0x4da93a['externalReferences'],'formula':_0x4da93a['formula'],'numberFormat':_0x4da93a['numberFormat'],'rangeId':this['_rangeId'],'unitId':this['_unitId']});}[_0x38b32e(0xc4)](_0x3eaf40){var _0x2cdf03=_0x38b32e;return this[_0x2cdf03(0x100)][_0x2cdf03(0xc7)](_0x7e41be['id'],{'numberFormat':_0x3eaf40,'rangeId':this['_rangeId'],'unitId':this[_0x2cdf03(0xd2)]});}[_0x38b32e(0xcb)](){var _0x2f2924=_0x38b32e;return this['_commandService']['syncExecuteCommand'](_0x569ec3['id'],{'rangeId':this[_0x2f2924(0xcc)],'unitId':this[_0x2f2924(0xd2)]});}[_0x38b32e(0xdd)](_0x2f73cd){var _0x160b0b=_0x38b32e;return this[_0x160b0b(0x100)][_0x160b0b(0xc7)](_0x278615['id'],{'rangeId':this[_0x160b0b(0xcc)],'text':_0x2f73cd,'unitId':this[_0x160b0b(0xd2)]});}[_0x38b32e(0xc5)](){var _0x257d5a=_0x38b32e;return this['_commandService'][_0x257d5a(0xc7)](_0x312162['id'],{'rangeId':this[_0x257d5a(0xcc)],'unitId':this[_0x257d5a(0xd2)]});}['_getCustomRange'](){var _0x2ed791=_0x38b32e,_0x19491f;let _0x184036=this['_univerInstanceService']['getUnit'](this[_0x2ed791(0xd2)],_0x104ec2['UNIVER_DOC']);return _0x184036==null||(_0x19491f=_0x184036['getSnapshot']()[_0x2ed791(0xf0)])==null||(_0x19491f=_0x19491f[_0x2ed791(0xd3)])==null?void 0x0:_0x19491f[_0x2ed791(0xff)](_0x5aa3db=>_0x5aa3db[_0x2ed791(0xf8)]===this[_0x2ed791(0xcc)]&&_0x24b8b0(_0x5aa3db));}};b=y([v(0x2,_0x74e3c5),v(0x3,_0x53a887(_0x26bebb)),v(0x4,_0x53a887(_0xa7e990)),v(0x5,_0x484a6c)],b);function _0x4561(_0x407f3e,_0x2291ea){_0x407f3e=_0x407f3e-0xbd;var _0x15d1ba=_0x15d1();var _0x45618b=_0x15d1ba[_0x407f3e];return _0x45618b;}function _0x15d1(){var _0x48c2c3=['update','getFormula','Document\x20','8353KRrYzX','198IiZwmM','end','decorate','setNumberFormat','convertToText','getSegmentId','syncExecuteCommand','describe','get','_document','remove','_rangeId','degradeDocumentData','defineProperty','117345yXMiYQ','startIndex','_univerInstanceService','_unitId','customRanges','createInstance','object','getResult','_docsFormulaCommandService','_injector','symbol','4SGTrFc','toPrimitive','getRange','replaceWithText','getId','numberFormat','length','constructor','insertFormula','_insert','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','2010969CEiwUB','_docsFormulaModel','_initialize','637112RXugTh','25RYKEHI','startOffset','_model','formula','775516TpOfDw','_docsFormulaResourceLoaderService','extend','body','appendFormula','paragraph','getFormulas','prototype','getBody','\x20could\x20not\x20be\x20serialized.','getOwnPropertyDescriptor','rangeId','_createFormula','range','41780OXJSzy','72396nubRqn','map','function','find','_commandService','_getCompleteRanges','_docsFormulaDisplayTextService','saveUnit','getFormulaAt','endIndex','externalReferences','some','_service','string','replaceWithFormula','8gvuYaF'];_0x15d1=function(){return _0x48c2c3;};return _0x15d1();}function x(_0x36bdc1){'@babel/helpers - typeof';var _0x400e42=_0x38b32e;return x=typeof Symbol==_0x400e42(0xfe)&&typeof Symbol['iterator']==_0x400e42(0xd9)?function(_0xbd9e8e){return typeof _0xbd9e8e;}:function(_0x545c15){var _0x43260f=_0x400e42;return _0x545c15&&typeof Symbol==_0x43260f(0xfe)&&_0x545c15[_0x43260f(0xe1)]===Symbol&&_0x545c15!==Symbol[_0x43260f(0xf4)]?_0x43260f(0xd9):typeof _0x545c15;},x(_0x36bdc1);}function S(_0x56e557,_0x5bef39){var _0x164dd3=_0x38b32e;if(x(_0x56e557)!=_0x164dd3(0xd5)||!_0x56e557)return _0x56e557;var _0x17182b=_0x56e557[Symbol[_0x164dd3(0xdb)]];if(_0x17182b!==void 0x0){var _0x484c32=_0x17182b['call'](_0x56e557,_0x5bef39||'default');if(x(_0x484c32)!=_0x164dd3(0xd5))return _0x484c32;throw TypeError(_0x164dd3(0xe4));}return(_0x5bef39===_0x164dd3(0x109)?String:Number)(_0x56e557);}function C(_0x4485df){var _0x3027c0=_0x38b32e,_0x6bca0c=S(_0x4485df,_0x3027c0(0x109));return x(_0x6bca0c)==_0x3027c0(0xd9)?_0x6bca0c:_0x6bca0c+'';}function w(_0x1128c1,_0x1052ec,_0x88439){return(_0x1052ec=C(_0x1052ec))in _0x1128c1?Object['defineProperty'](_0x1128c1,_0x1052ec,{'value':_0x88439,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x1128c1[_0x1052ec]=_0x88439,_0x1128c1;}var T=class extends _0x4d8a90{constructor(..._0x241c73){var _0x7a79c0=_0x38b32e;super(..._0x241c73),w(this,_0x7a79c0(0xd7),void 0x0),w(this,_0x7a79c0(0x102),void 0x0),w(this,_0x7a79c0(0xe6),void 0x0),w(this,_0x7a79c0(0xee),void 0x0);}[_0x38b32e(0xe7)](_0x4ac44d){var _0x1f6f26=_0x38b32e;this[_0x1f6f26(0xd7)]=_0x4ac44d[_0x1f6f26(0xc9)](_0x74e3c5),this['_docsFormulaDisplayTextService']=_0x4ac44d[_0x1f6f26(0xc9)](_0x6b6aca),this[_0x1f6f26(0xe6)]=_0x4ac44d[_0x1f6f26(0xc9)](_0x26bebb),this['_docsFormulaResourceLoaderService']=_0x4ac44d[_0x1f6f26(0xc9)](_0x239261);}[_0x38b32e(0xf3)](){var _0x618c93=_0x38b32e;return this[_0x618c93(0x101)]()[_0x618c93(0xfd)](_0x5162c1=>this[_0x618c93(0xf9)](_0x5162c1[_0x618c93(0xf8)]));}[_0x38b32e(0xbe)](_0x531890){var _0x577890=_0x38b32e;return this[_0x577890(0x101)]()[_0x577890(0x107)](_0x22cb30=>_0x22cb30[_0x577890(0xf8)]===_0x531890)?this[_0x577890(0xf9)](_0x531890):null;}[_0x38b32e(0x104)](_0x8256b1){var _0xa0950d=_0x38b32e;let _0x1aa805=this[_0xa0950d(0x101)]()[_0xa0950d(0xff)](_0x5e8080=>_0x5e8080[_0xa0950d(0xd0)]<=_0x8256b1&&_0x8256b1<=_0x5e8080[_0xa0950d(0x105)]);return _0x1aa805?this['_createFormula'](_0x1aa805[_0xa0950d(0xf8)]):null;}['saveFormulaDisplayTextSnapshot'](){var _0x4c47ad=_0x38b32e;let _0x505b94=this[_0x4c47ad(0xee)][_0x4c47ad(0x103)](this['id']);if(!_0x505b94)throw Error(_0x4c47ad(0xbf)+this['id']+_0x4c47ad(0xf6));return this['_docsFormulaDisplayTextService'][_0x4c47ad(0xcd)](_0x505b94);}[_0x38b32e(0xe2)](_0x3900cc){var _0x451c3a=_0x38b32e;return this[_0x451c3a(0xe3)]({'externalReferences':_0x3900cc[_0x451c3a(0x106)],'formula':_0x3900cc[_0x451c3a(0xec)],'numberFormat':_0x3900cc[_0x451c3a(0xdf)],'target':{'type':_0x451c3a(0xfa),'startOffset':_0x3900cc[_0x451c3a(0xea)],'endOffset':_0x3900cc['endOffset']},'unitId':this[_0x451c3a(0xde)]()});}[_0x38b32e(0xe3)](_0x25065a){var _0x371503=_0x38b32e;let _0x5e9d57=this[_0x371503(0xd7)][_0x371503(0xc7)](_0x19c95b['id'],_0x25065a);return _0x5e9d57?this[_0x371503(0xf9)](_0x5e9d57['rangeId']):null;}[_0x38b32e(0x101)](){var _0x4d24f1=_0x38b32e,_0x593c16;let _0x15b049=this['_docsFormulaModel'][_0x4d24f1(0xf3)](this[_0x4d24f1(0xde)]());return((_0x593c16=this[_0x4d24f1(0xf5)]('')[_0x4d24f1(0xd3)])==null?void 0x0:_0x593c16['filter'](_0x28b6fe=>_0x24b8b0(_0x28b6fe)&&_0x15b049[_0x28b6fe[_0x4d24f1(0xf8)]]!=null))??[];}[_0x38b32e(0xf9)](_0x281ff7){var _0x3d49fa=_0x38b32e;return this['_injector']['createInstance'](b,this[_0x3d49fa(0xde)](),_0x281ff7);}};_0x4d8a90['extend'](T);var E=class extends _0x2a2428{constructor(..._0x5a040e){super(..._0x5a040e),w(this,'_docsFormulaCommandService',void 0x0);}[_0x38b32e(0xe7)](_0x29fb2b){var _0x498f43=_0x38b32e;this['_docsFormulaCommandService']=_0x29fb2b[_0x498f43(0xc9)](_0x74e3c5);}[_0x38b32e(0xe2)](_0x32a28b,_0x5bf8ea,_0x9f300f={}){var _0xeb405c=_0x38b32e;return this[_0xeb405c(0xe3)](_0x32a28b,_0x5bf8ea,_0x9f300f);}[_0x38b32e(0xf1)](_0x118368,_0x31cd2d={}){var _0x4a8cdb=_0x38b32e;return this['_insert'](_0x4a8cdb(0xc2),_0x118368,_0x31cd2d);}[_0x38b32e(0xe3)](_0xf92f73,_0xab3353,_0x48e051){var _0x596832=_0x38b32e;if(this[_0x596832(0xc6)]())return null;let _0x18bae9={'externalReferences':_0x48e051[_0x596832(0x106)],'formula':_0xab3353,'numberFormat':_0x48e051['numberFormat'],'target':{'type':_0x596832(0xf2),'paragraphId':this[_0x596832(0xde)](),'position':_0xf92f73},'unitId':this['_document']['getId']()},_0x22948d=this[_0x596832(0xd7)]['syncExecuteCommand'](_0x19c95b['id'],_0x18bae9);return _0x22948d?this[_0x596832(0xd8)][_0x596832(0xd4)](b,this['_document']['getId'](),_0x22948d[_0x596832(0xf8)]):null;}};_0x2a2428[_0x38b32e(0xef)](E);var D=class extends _0x41761d{constructor(..._0x455eba){var _0x5e90fb=_0x38b32e;super(..._0x455eba),w(this,_0x5e90fb(0xd7),void 0x0);}[_0x38b32e(0xe7)](_0x48f6e6){var _0x573c9e=_0x38b32e;this['_docsFormulaCommandService']=_0x48f6e6[_0x573c9e(0xc9)](_0x74e3c5);}[_0x38b32e(0x10a)](_0x2b10bc,_0x2b282f={}){var _0x421f78=_0x38b32e;let {endOffset:_0x1f1ad3,segmentId:_0x45d6e6,startOffset:_0x4656e6}=this[_0x421f78(0xdc)]();return _0x45d6e6?null:this[_0x421f78(0xe3)](_0x4656e6,_0x1f1ad3,_0x2b10bc,_0x2b282f);}[_0x38b32e(0xe3)](_0x125945,_0x128cd7,_0x3a61aa,_0x49eb96){var _0x1d3439=_0x38b32e;let _0x31b51f={'externalReferences':_0x49eb96[_0x1d3439(0x106)],'formula':_0x3a61aa,'numberFormat':_0x49eb96['numberFormat'],'target':{'type':_0x1d3439(0xfa),'startOffset':_0x125945,'endOffset':_0x128cd7},'unitId':this[_0x1d3439(0xca)]['getId']()},_0x42a2df=this[_0x1d3439(0xd7)]['syncExecuteCommand'](_0x19c95b['id'],_0x31b51f);return _0x42a2df?this[_0x1d3439(0xd8)][_0x1d3439(0xd4)](b,this[_0x1d3439(0xca)][_0x1d3439(0xde)](),_0x42a2df[_0x1d3439(0xf8)]):null;}};_0x41761d['extend'](D);export{b as FDocumentFormula};
1
+ var _0x5eab3b=_0x14c4;(function(_0x2344fa,_0x519f97){var _0x2cc35e=_0x14c4,_0x4eaffe=_0x2344fa();while(!![]){try{var _0x135cc6=parseInt(_0x2cc35e(0x12e))/0x1*(parseInt(_0x2cc35e(0x128))/0x2)+-parseInt(_0x2cc35e(0x14f))/0x3+parseInt(_0x2cc35e(0x13c))/0x4+-parseInt(_0x2cc35e(0x117))/0x5*(parseInt(_0x2cc35e(0x113))/0x6)+-parseInt(_0x2cc35e(0x155))/0x7*(parseInt(_0x2cc35e(0x134))/0x8)+-parseInt(_0x2cc35e(0x149))/0x9+parseInt(_0x2cc35e(0x12c))/0xa*(parseInt(_0x2cc35e(0x10e))/0xb);if(_0x135cc6===_0x519f97)break;else _0x4eaffe['push'](_0x4eaffe['shift']());}catch(_0x1ed5f7){_0x4eaffe['push'](_0x4eaffe['shift']());}}}(_0x4003,0xe5cea));import{ConvertDocFormulaToTextCommand as _0x3729b5,DocFormulaDisplayTextService as _0x5cb9d,DocFormulaModel as _0x50eb99,DocFormulaService as _0x4268ea,InsertDocFormulaCommand as _0xe5f011,RemoveDocFormulaCommand as _0x2db552,ReplaceDocFormulaWithTextCommand as _0x551dca,SetDocFormulaNumberFormatCommand as _0x4fb839,UpdateDocFormulaCommand as _0x1ca540,isDocFormulaRange as _0x3001cb}from'@univerjs-pro/docs-formula';import{ICommandService as _0x271a18,IResourceLoaderService as _0x33f5f6,IUniverInstanceService as _0x30e07a,Inject as _0x56df00,UniverInstanceType as _0x4f4b56}from'@univerjs/core';import{FDocument as _0x433c8c,FDocumentParagraph as _0x7791d5,FDocumentTextRange as _0x239d8a}from'@univerjs/docs/facade';function v(_0x29b9b2,_0x452a58){return function(_0xfaa003,_0xe2ab61){_0x452a58(_0xfaa003,_0xe2ab61,_0x29b9b2);};}function y(_0x44971a,_0x111c7e,_0x36ff77,_0x9b9dc0){var _0x5f1588=_0x14c4,_0x2c4c29=arguments['length'],_0x57fa97=_0x2c4c29<0x3?_0x111c7e:_0x9b9dc0===null?_0x9b9dc0=Object[_0x5f1588(0x147)](_0x111c7e,_0x36ff77):_0x9b9dc0,_0x211fb8;if(typeof Reflect==_0x5f1588(0x141)&&typeof Reflect[_0x5f1588(0x12b)]=='function')_0x57fa97=Reflect[_0x5f1588(0x12b)](_0x44971a,_0x111c7e,_0x36ff77,_0x9b9dc0);else{for(var _0x53ca9e=_0x44971a[_0x5f1588(0x10b)]-0x1;_0x53ca9e>=0x0;_0x53ca9e--)(_0x211fb8=_0x44971a[_0x53ca9e])&&(_0x57fa97=(_0x2c4c29<0x3?_0x211fb8(_0x57fa97):_0x2c4c29>0x3?_0x211fb8(_0x111c7e,_0x36ff77,_0x57fa97):_0x211fb8(_0x111c7e,_0x36ff77))||_0x57fa97);}return _0x2c4c29>0x3&&_0x57fa97&&Object[_0x5f1588(0x115)](_0x111c7e,_0x36ff77,_0x57fa97),_0x57fa97;}function _0x4003(){var _0x33e69b=['constructor','startOffset','length','map','_injector','1423774wCYvjs','startIndex','numberFormat','getResult','_model','12SWiAvI','_unitId','defineProperty','_insert','3664165MUUCWl','insertFormula','getFormula','body','_docsFormulaCommandService','filter','saveUnit','function','saveFormulaDisplayTextSnapshot','range','_docsFormulaModel','end','get','getSegmentId','update','_initialize','appendFormula','314qMuard','formula','default','decorate','330pVMxpT','_rangeId','2199RETkjD','_docsFormulaDisplayTextService','prototype','getFormulas','endOffset','getId','111256JCSaEI','_docsFormulaResourceLoaderService','externalReferences','customRanges','Document\x20','iterator','_getCompleteRanges','_document','3306488sVsCUZ','syncExecuteCommand','symbol','toPrimitive','extend','object','_service','_commandService','getConfig','replaceWithFormula','\x20could\x20not\x20be\x20serialized.','getOwnPropertyDescriptor','getBody','13322259RiwJpl','string','endIndex','convertToText','UNIVER_DOC','_createFormula','454119jBTFgJ','_univerInstanceService','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','createInstance','describe','getSnapshot','707YAGDlF','_getCustomRange','rangeId','getRange','find','degradeDocumentData','remove'];_0x4003=function(){return _0x33e69b;};return _0x4003();}let b=class{constructor(_0x50536c,_0x59ee35,_0x6e16ee,_0x569703,_0x25d1c3,_0x524dc2){var _0x3699c3=_0x14c4;this['_unitId']=_0x50536c,this[_0x3699c3(0x12d)]=_0x59ee35,this[_0x3699c3(0x143)]=_0x6e16ee,this['_model']=_0x569703,this[_0x3699c3(0x142)]=_0x25d1c3,this[_0x3699c3(0x150)]=_0x524dc2;}['getId'](){var _0x25bc2d=_0x14c4;return this[_0x25bc2d(0x12d)];}[_0x5eab3b(0x105)](){var _0x16c618=_0x5eab3b;let _0x150ff6=this[_0x16c618(0x103)]();return _0x150ff6?{'endOffset':_0x150ff6[_0x16c618(0x14b)]+0x1,'rangeId':_0x150ff6['rangeId'],'startOffset':_0x150ff6[_0x16c618(0x10f)]}:null;}[_0x5eab3b(0x119)](){var _0x3f1d9c=_0x5eab3b,_0x10fd55;return((_0x10fd55=this[_0x3f1d9c(0x112)][_0x3f1d9c(0x119)](this[_0x3f1d9c(0x114)],this[_0x3f1d9c(0x12d)]))==null?void 0x0:_0x10fd55['formula'])??'';}['getConfig'](){var _0xb6b5fd=_0x5eab3b;return this['_model']['getFormula'](this[_0xb6b5fd(0x114)],this[_0xb6b5fd(0x12d)])??null;}[_0x5eab3b(0x111)](){var _0x3dc902=_0x5eab3b;return this[_0x3dc902(0x142)][_0x3dc902(0x111)]({'unitId':this['_unitId'],'rangeId':this[_0x3dc902(0x12d)]})??null;}[_0x5eab3b(0x153)](){var _0x1e4c8b=_0x5eab3b;let _0x18eaff=this[_0x1e4c8b(0x105)](),_0x25f61e=this[_0x1e4c8b(0x144)](),_0x230625=this[_0x1e4c8b(0x111)]();return!_0x18eaff||!_0x25f61e||!_0x230625?null:{..._0x18eaff,'config':_0x25f61e,'formula':_0x25f61e[_0x1e4c8b(0x129)],'result':_0x230625,'type':_0x1e4c8b(0x129)};}[_0x5eab3b(0x125)](_0x1480f4){var _0x25a761=_0x5eab3b;return this[_0x25a761(0x143)]['syncExecuteCommand'](_0x1ca540['id'],{'externalReferences':_0x1480f4[_0x25a761(0x136)],'formula':_0x1480f4[_0x25a761(0x129)],'numberFormat':_0x1480f4[_0x25a761(0x110)],'rangeId':this['_rangeId'],'unitId':this[_0x25a761(0x114)]});}['setNumberFormat'](_0x47134d){var _0x1583ad=_0x5eab3b;return this[_0x1583ad(0x143)]['syncExecuteCommand'](_0x4fb839['id'],{'numberFormat':_0x47134d,'rangeId':this[_0x1583ad(0x12d)],'unitId':this[_0x1583ad(0x114)]});}[_0x5eab3b(0x108)](){var _0x5446aa=_0x5eab3b;return this[_0x5446aa(0x143)][_0x5446aa(0x13d)](_0x2db552['id'],{'rangeId':this[_0x5446aa(0x12d)],'unitId':this[_0x5446aa(0x114)]});}['replaceWithText'](_0x365293){var _0x4ff429=_0x5eab3b;return this[_0x4ff429(0x143)][_0x4ff429(0x13d)](_0x551dca['id'],{'rangeId':this['_rangeId'],'text':_0x365293,'unitId':this[_0x4ff429(0x114)]});}[_0x5eab3b(0x14c)](){var _0x30611b=_0x5eab3b;return this[_0x30611b(0x143)][_0x30611b(0x13d)](_0x3729b5['id'],{'rangeId':this[_0x30611b(0x12d)],'unitId':this[_0x30611b(0x114)]});}[_0x5eab3b(0x103)](){var _0x449863=_0x5eab3b,_0x348329;let _0x4a0a26=this[_0x449863(0x150)]['getUnit'](this[_0x449863(0x114)],_0x4f4b56[_0x449863(0x14d)]);return _0x4a0a26==null||(_0x348329=_0x4a0a26[_0x449863(0x154)]()[_0x449863(0x11a)])==null||(_0x348329=_0x348329[_0x449863(0x137)])==null?void 0x0:_0x348329[_0x449863(0x106)](_0x2223b4=>_0x2223b4[_0x449863(0x104)]===this[_0x449863(0x12d)]&&_0x3001cb(_0x2223b4));}};b=y([v(0x2,_0x271a18),v(0x3,_0x56df00(_0x50eb99)),v(0x4,_0x56df00(_0x4268ea)),v(0x5,_0x30e07a)],b);function x(_0x5d5385){'@babel/helpers - typeof';var _0x1abaa9=_0x5eab3b;return x=typeof Symbol==_0x1abaa9(0x11e)&&typeof Symbol[_0x1abaa9(0x139)]==_0x1abaa9(0x13e)?function(_0x112426){return typeof _0x112426;}:function(_0x20804a){var _0x1a75ee=_0x1abaa9;return _0x20804a&&typeof Symbol==_0x1a75ee(0x11e)&&_0x20804a[_0x1a75ee(0x109)]===Symbol&&_0x20804a!==Symbol[_0x1a75ee(0x130)]?_0x1a75ee(0x13e):typeof _0x20804a;},x(_0x5d5385);}function S(_0x1cff83,_0x6db545){var _0x1a405a=_0x5eab3b;if(x(_0x1cff83)!=_0x1a405a(0x141)||!_0x1cff83)return _0x1cff83;var _0x51ef9c=_0x1cff83[Symbol[_0x1a405a(0x13f)]];if(_0x51ef9c!==void 0x0){var _0x5b95f1=_0x51ef9c['call'](_0x1cff83,_0x6db545||_0x1a405a(0x12a));if(x(_0x5b95f1)!=_0x1a405a(0x141))return _0x5b95f1;throw TypeError(_0x1a405a(0x151));}return(_0x6db545==='string'?String:Number)(_0x1cff83);}function C(_0x5bd62d){var _0xc564ee=_0x5eab3b,_0x2caec7=S(_0x5bd62d,_0xc564ee(0x14a));return x(_0x2caec7)==_0xc564ee(0x13e)?_0x2caec7:_0x2caec7+'';}function w(_0x32fb27,_0xec8368,_0x286dee){var _0x2145b8=_0x5eab3b;return(_0xec8368=C(_0xec8368))in _0x32fb27?Object[_0x2145b8(0x115)](_0x32fb27,_0xec8368,{'value':_0x286dee,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x32fb27[_0xec8368]=_0x286dee,_0x32fb27;}var T=class extends _0x433c8c{constructor(..._0x2f4ef7){var _0x326c88=_0x5eab3b;super(..._0x2f4ef7),w(this,_0x326c88(0x11b),void 0x0),w(this,_0x326c88(0x12f),void 0x0),w(this,_0x326c88(0x121),void 0x0),w(this,_0x326c88(0x135),void 0x0);}['_initialize'](_0x3d9784){var _0x5aa9b6=_0x5eab3b;this['_docsFormulaCommandService']=_0x3d9784[_0x5aa9b6(0x123)](_0x271a18),this[_0x5aa9b6(0x12f)]=_0x3d9784[_0x5aa9b6(0x123)](_0x5cb9d),this[_0x5aa9b6(0x121)]=_0x3d9784[_0x5aa9b6(0x123)](_0x50eb99),this['_docsFormulaResourceLoaderService']=_0x3d9784['get'](_0x33f5f6);}[_0x5eab3b(0x131)](){var _0xb4dd96=_0x5eab3b;return this['_getCompleteRanges']()[_0xb4dd96(0x10c)](_0x4ae9ef=>this[_0xb4dd96(0x14e)](_0x4ae9ef[_0xb4dd96(0x104)]));}[_0x5eab3b(0x119)](_0x23ed2c){var _0x46062a=_0x5eab3b;return this[_0x46062a(0x13a)]()['some'](_0x45a132=>_0x45a132[_0x46062a(0x104)]===_0x23ed2c)?this['_createFormula'](_0x23ed2c):null;}['getFormulaAt'](_0xc06cce){var _0x58e2e5=_0x5eab3b;let _0x6921df=this['_getCompleteRanges']()['find'](_0x1eb374=>_0x1eb374[_0x58e2e5(0x10f)]<=_0xc06cce&&_0xc06cce<=_0x1eb374[_0x58e2e5(0x14b)]);return _0x6921df?this[_0x58e2e5(0x14e)](_0x6921df[_0x58e2e5(0x104)]):null;}[_0x5eab3b(0x11f)](){var _0x2a0e20=_0x5eab3b;let _0x3b2837=this[_0x2a0e20(0x135)][_0x2a0e20(0x11d)](this['id']);if(!_0x3b2837)throw Error(_0x2a0e20(0x138)+this['id']+_0x2a0e20(0x146));return this['_docsFormulaDisplayTextService'][_0x2a0e20(0x107)](_0x3b2837);}[_0x5eab3b(0x118)](_0x28de0c){var _0x4c7425=_0x5eab3b;return this[_0x4c7425(0x116)]({'externalReferences':_0x28de0c['externalReferences'],'formula':_0x28de0c[_0x4c7425(0x129)],'numberFormat':_0x28de0c[_0x4c7425(0x110)],'target':{'type':_0x4c7425(0x120),'startOffset':_0x28de0c[_0x4c7425(0x10a)],'endOffset':_0x28de0c[_0x4c7425(0x132)]},'unitId':this[_0x4c7425(0x133)]()});}[_0x5eab3b(0x116)](_0x272008){var _0x47db9a=_0x5eab3b;let _0x46b158=this[_0x47db9a(0x11b)][_0x47db9a(0x13d)](_0xe5f011['id'],_0x272008);return _0x46b158?this[_0x47db9a(0x14e)](_0x46b158['rangeId']):null;}['_getCompleteRanges'](){var _0x59635c=_0x5eab3b,_0x1ec87f;let _0x10faef=this[_0x59635c(0x121)][_0x59635c(0x131)](this[_0x59635c(0x133)]());return((_0x1ec87f=this[_0x59635c(0x148)]('')[_0x59635c(0x137)])==null?void 0x0:_0x1ec87f[_0x59635c(0x11c)](_0x3ac858=>_0x3001cb(_0x3ac858)&&_0x10faef[_0x3ac858['rangeId']]!=null))??[];}[_0x5eab3b(0x14e)](_0x2bb0e7){var _0x4457d7=_0x5eab3b;return this[_0x4457d7(0x10d)][_0x4457d7(0x152)](b,this['getId'](),_0x2bb0e7);}};_0x433c8c[_0x5eab3b(0x140)](T);var E=class extends _0x7791d5{constructor(..._0x16eaae){var _0x247165=_0x5eab3b;super(..._0x16eaae),w(this,_0x247165(0x11b),void 0x0);}[_0x5eab3b(0x126)](_0x2a4c3d){var _0x1a6361=_0x5eab3b;this[_0x1a6361(0x11b)]=_0x2a4c3d[_0x1a6361(0x123)](_0x271a18);}['insertFormula'](_0x2e75ed,_0x57cb23,_0x566d8c={}){var _0x20e679=_0x5eab3b;return this[_0x20e679(0x116)](_0x2e75ed,_0x57cb23,_0x566d8c);}[_0x5eab3b(0x127)](_0x5373f9,_0x3b43d4={}){var _0x23d8d6=_0x5eab3b;return this[_0x23d8d6(0x116)](_0x23d8d6(0x122),_0x5373f9,_0x3b43d4);}['_insert'](_0x296283,_0x3bdf17,_0x5ae7ad){var _0x3bccc1=_0x5eab3b;if(this[_0x3bccc1(0x124)]())return null;let _0x3c8406={'externalReferences':_0x5ae7ad[_0x3bccc1(0x136)],'formula':_0x3bdf17,'numberFormat':_0x5ae7ad[_0x3bccc1(0x110)],'target':{'type':'paragraph','paragraphId':this['getId'](),'position':_0x296283},'unitId':this[_0x3bccc1(0x13b)][_0x3bccc1(0x133)]()},_0x5b3c1d=this[_0x3bccc1(0x11b)]['syncExecuteCommand'](_0xe5f011['id'],_0x3c8406);return _0x5b3c1d?this[_0x3bccc1(0x10d)][_0x3bccc1(0x152)](b,this['_document'][_0x3bccc1(0x133)](),_0x5b3c1d['rangeId']):null;}};function _0x14c4(_0x50e161,_0x114d83){_0x50e161=_0x50e161-0x103;var _0x40039a=_0x4003();var _0x14c446=_0x40039a[_0x50e161];return _0x14c446;}_0x7791d5[_0x5eab3b(0x140)](E);var D=class extends _0x239d8a{constructor(..._0x24fc59){var _0xc9bc5b=_0x5eab3b;super(..._0x24fc59),w(this,_0xc9bc5b(0x11b),void 0x0);}[_0x5eab3b(0x126)](_0x670c8a){var _0x2b9d32=_0x5eab3b;this[_0x2b9d32(0x11b)]=_0x670c8a[_0x2b9d32(0x123)](_0x271a18);}[_0x5eab3b(0x145)](_0x15a459,_0x29dcfd={}){var _0x25dab9=_0x5eab3b;let {endOffset:_0x5506cb,segmentId:_0x92d378,startOffset:_0x2c03c3}=this[_0x25dab9(0x105)]();return _0x92d378?null:this['_insert'](_0x2c03c3,_0x5506cb,_0x15a459,_0x29dcfd);}['_insert'](_0x2a2d58,_0x45d689,_0x1b36ec,_0x1a8975){var _0x42ea32=_0x5eab3b;let _0x2283d5={'externalReferences':_0x1a8975[_0x42ea32(0x136)],'formula':_0x1b36ec,'numberFormat':_0x1a8975[_0x42ea32(0x110)],'target':{'type':_0x42ea32(0x120),'startOffset':_0x2a2d58,'endOffset':_0x45d689},'unitId':this[_0x42ea32(0x13b)]['getId']()},_0x26d599=this[_0x42ea32(0x11b)][_0x42ea32(0x13d)](_0xe5f011['id'],_0x2283d5);return _0x26d599?this[_0x42ea32(0x10d)][_0x42ea32(0x152)](b,this['_document'][_0x42ea32(0x133)](),_0x26d599[_0x42ea32(0x104)]):null;}};_0x239d8a['extend'](D);export{b as FDocumentFormula};