@univerjs-pro/docs-formula 1.0.1 → 1.0.3

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 _0x18cc3=_0x5c97;(function(_0x32f822,_0x31bad3){const _0x38e259=_0x5c97,_0x2cb3e6=_0x32f822();while(!![]){try{const _0xe234=parseInt(_0x38e259(0x178))/0x1+parseInt(_0x38e259(0x199))/0x2+parseInt(_0x38e259(0x19f))/0x3*(-parseInt(_0x38e259(0x16c))/0x4)+parseInt(_0x38e259(0x122))/0x5*(parseInt(_0x38e259(0x104))/0x6)+-parseInt(_0x38e259(0x11d))/0x7+-parseInt(_0x38e259(0x17a))/0x8+parseInt(_0x38e259(0x19c))/0x9*(-parseInt(_0x38e259(0x129))/0xa);if(_0xe234===_0x31bad3)break;else _0x2cb3e6['push'](_0x2cb3e6['shift']());}catch(_0xfcd1ab){_0x2cb3e6['push'](_0x2cb3e6['shift']());}}}(_0x1745,0x21a91));import{FormulaCacheEligibilityService as _0x3b4337,FormulaLastValuePersistenceService as _0x10b137,HostExternalReferenceModel as _0x4c2fec,UniverProFormulaEnginePlugin as _0xb2e160,buildUpsertHostExternalReferenceMutations as _0x1e344d,collectFormulaExternalReferenceQualifiers as _0x51c5b2,getScalarFormulaResultCell as _0x1ff720,resolveFormulaResultPresentation as _0x3ddcc7,resolveHostFormulaExternalReferences as _0x1b3797,toFormulaLastValue as _0x4977e2}from'@univerjs-pro/engine-formula';import{CellValueType as _0x4caaef,CommandType as _0x180a99,CustomRangeType as _0x16c72a,DataStreamTreeTokenType as _0x20e742,DependentOn as _0x423cf2,Disposable as _0x4ff05d,ICommandService as _0x23d207,IConfigService as _0x3a9ecf,IResourceManagerService as _0x27e934,IUndoRedoService as _0x1cf111,IUniverInstanceService as _0x2f20c7,Inject as _0x3f1c8b,Injector as _0x57b2b9,JSONX as _0x71110d,Plugin as _0x253e10,TextX as _0x3bd205,Tools as _0x381d68,UniverInstanceType as _0x106590,generateRandomId as _0x51cbf3,getBodySliceForTextXAction as _0x307e5c,getCustomRangeInterval as _0xd34d7e,getParagraphContentStartOffset as _0x3b94db,getRichTextEditPath as _0x47e386,merge as _0x5aceac,shiftExclusiveRangeOnDelete as _0x1cbe27,shiftExclusiveRangeOnInsert as _0x5c965b,shiftInclusiveRangeOnDelete as _0x1ab29b,shiftInclusiveRangeOnInsert as _0x499da7,touchDependencies as _0xbb7c0c}from'@univerjs/core';import{DOC_SELECTION_OPTION_PRESERVE_CARET as _0x4063e0,DocSelectionManagerService as _0x268941,DocTextResolverService as _0x23a854,RichTextEditingMutation as _0x5c51e6,UniverDocsPlugin as _0x5d4396}from'@univerjs/docs';import{FormulaResultStatus as _0x1a30ad,LexerTreeBuilder as _0x2a6039,OtherFormulaBizType as _0xc230f8,RegisterOtherFormulaService as _0x209f95}from'@univerjs/engine-formula';import{Subject as _0x3a4da6}from'rxjs';import{UniverLicensePlugin as _0x2a4fe0}from'@univerjs-pro/license';const y=_0x18cc3(0x174),je=0x1,Me=_0x18cc3(0x1f1),Ne='';function b(){return{'schemaVersion':0x1,'formulas':{}};}function x(_0x39f2f2){const _0x174a2e=_0x18cc3;return!_0x39f2f2||typeof _0x39f2f2!=_0x174a2e(0x167)||!S(_0x39f2f2,[_0x174a2e(0x11a),'formulas'])||!(_0x174a2e(0x11a)in _0x39f2f2)||_0x39f2f2[_0x174a2e(0x11a)]!==0x1||!('formulas'in _0x39f2f2)||!_0x39f2f2[_0x174a2e(0x15b)]||typeof _0x39f2f2[_0x174a2e(0x15b)]!=_0x174a2e(0x167)||Array[_0x174a2e(0x1bc)](_0x39f2f2['formulas'])?!0x1:Object[_0x174a2e(0x1ce)](_0x39f2f2[_0x174a2e(0x15b)])[_0x174a2e(0x19b)](([_0x41bcea,_0xa5ba3a])=>_0x41bcea[_0x174a2e(0x1cf)]>0x0&&Pe(_0xa5ba3a));}function Pe(_0x5efb5d){const _0x507ad5=_0x18cc3;return!_0x5efb5d||typeof _0x5efb5d!=_0x507ad5(0x167)||!S(_0x5efb5d,[_0x507ad5(0x1df),_0x507ad5(0xfd),'lastValue'])||!('formula'in _0x5efb5d)||typeof _0x5efb5d['formula']!=_0x507ad5(0x1d6)||!_0x5efb5d[_0x507ad5(0x1df)][_0x507ad5(0x106)]()||_0x507ad5(0xfd)in _0x5efb5d&&_0x5efb5d[_0x507ad5(0xfd)]!=null&&(typeof _0x5efb5d[_0x507ad5(0xfd)]!='object'||!S(_0x5efb5d[_0x507ad5(0xfd)],[_0x507ad5(0x1c2)])||!(_0x507ad5(0x1c2)in _0x5efb5d[_0x507ad5(0xfd)])||typeof _0x5efb5d[_0x507ad5(0xfd)]['pattern']!=_0x507ad5(0x1d6))?!0x1:!(_0x507ad5(0x16d)in _0x5efb5d)||_0x5efb5d['lastValue']==null||Fe(_0x5efb5d[_0x507ad5(0x16d)]);}function Fe(_0x2a8f0e){const _0x2dd1e9=_0x18cc3;return!_0x2a8f0e||typeof _0x2a8f0e!='object'||!S(_0x2a8f0e,['v','t','pattern'])||!('v'in _0x2a8f0e)||_0x2a8f0e['v']!==null&&typeof _0x2a8f0e['v']!=_0x2dd1e9(0x1d6)&&typeof _0x2a8f0e['v']!=_0x2dd1e9(0x1b0)&&typeof _0x2a8f0e['v']!=_0x2dd1e9(0x16a)||'t'in _0x2a8f0e&&_0x2a8f0e['t']!=null&&!Ie(_0x2a8f0e['t'])?!0x1:!('pattern'in _0x2a8f0e)||_0x2a8f0e[_0x2dd1e9(0x1c2)]==null||typeof _0x2a8f0e[_0x2dd1e9(0x1c2)]=='string';}function S(_0x14c0b5,_0x292461){const _0x5a135a=_0x18cc3;let _0x2dda19=new Set(_0x292461);return Object[_0x5a135a(0x102)](_0x14c0b5)[_0x5a135a(0x19b)](_0x399ebc=>_0x2dda19[_0x5a135a(0x139)](_0x399ebc));}function Ie(_0x3551c7){const _0x3bc82a=_0x18cc3;return typeof _0x3551c7==_0x3bc82a(0x1b0)&&Object[_0x3bc82a(0x172)](_0x4caaef)['includes'](_0x3551c7);}const Le=new Set([_0x20e742[_0x18cc3(0x133)],_0x20e742['TABLE_START'],_0x20e742[_0x18cc3(0x142)],_0x20e742[_0x18cc3(0x147)],_0x20e742[_0x18cc3(0x145)],_0x20e742[_0x18cc3(0x155)],_0x20e742[_0x18cc3(0x11f)],_0x20e742[_0x18cc3(0x19a)],_0x20e742[_0x18cc3(0x10f)],_0x20e742['COLUMN_END'],_0x20e742[_0x18cc3(0x121)],_0x20e742[_0x18cc3(0x1cb)],_0x20e742[_0x18cc3(0x1aa)],_0x20e742[_0x18cc3(0x17d)]]);var C=class extends Error{constructor(){const _0x40c431=_0x18cc3;super(_0x40c431(0x1db));}};function Re(_0x2f4a3d){const _0x34381=_0x18cc3;var _0xefdd1b,_0x382599;let _0x277a7f=_0x381d68[_0x34381(0x18c)](_0x2f4a3d[_0x34381(0x15a)]),_0x3d5d19=j(_0x277a7f),{startOffset:_0x3bddac,endOffset:_0xa80df6}=We(_0x3d5d19,_0x2f4a3d[_0x34381(0x118)],_0x2f4a3d['endOffset']);He(_0x3d5d19,_0x3bddac,_0xa80df6);let _0x4ba0eb=((_0xefdd1b=_0x3d5d19[_0x34381(0x179)])==null?void 0x0:_0xefdd1b['filter'](_0xc4da7=>{const _0x1d693c=_0x34381;if(!w(_0xc4da7))return!0x1;let _0x2cc8be=_0xd34d7e(_0xc4da7);return _0x2cc8be[_0x1d693c(0x1ec)]>_0x3bddac&&_0x2cc8be[_0x1d693c(0x118)]<_0xa80df6;})[_0x34381(0x109)](_0x4a891f=>_0x4a891f[_0x34381(0xff)]))??[];qe(_0x3d5d19,_0x3bddac,_0xa80df6,''),_0x3d5d19[_0x34381(0x179)]=[...((_0x382599=_0x3d5d19['customRanges'])==null?void 0x0:_0x382599['filter'](_0x326b42=>!_0x4ba0eb['includes'](_0x326b42[_0x34381(0xff)])&&_0x326b42[_0x34381(0xff)]!==_0x2f4a3d[_0x34381(0xff)]))??[],Ue(_0x2f4a3d[_0x34381(0xff)],_0x3bddac)][_0x34381(0x1ba)]((_0x39c2bb,_0x5dc90b)=>_0x39c2bb[_0x34381(0x124)]-_0x5dc90b[_0x34381(0x124)]);let _0x42ca00=E(_0x2f4a3d[_0x34381(0x12b)]);return _0x4ba0eb['forEach'](_0x1a7f23=>{delete _0x42ca00['formulas'][_0x1a7f23];}),_0x42ca00[_0x34381(0x15b)][_0x2f4a3d[_0x34381(0xff)]]=_0x381d68[_0x34381(0x18c)](_0x2f4a3d['config']),{'nextDocumentData':_0x277a7f,'nextResource':_0x42ca00,'cursorOffset':_0x3bddac+0x1};}function ze(_0x24ef89){const _0x1b98bf=_0x18cc3;var _0x270355,_0x1e370b;let _0xf6140b=_0x381d68[_0x1b98bf(0x18c)](_0x24ef89[_0x1b98bf(0x15a)]),_0x332efa=(_0x270355=j(_0xf6140b)['customRanges'])==null?void 0x0:_0x270355[_0x1b98bf(0x1c4)](_0x2f8c9c=>_0x2f8c9c[_0x1b98bf(0xff)]===_0x24ef89[_0x1b98bf(0xff)]&&w(_0x2f8c9c));if(!_0x332efa||!((_0x1e370b=_0x24ef89['resource'])!=null&&_0x1e370b[_0x1b98bf(0x15b)][_0x24ef89[_0x1b98bf(0xff)]]))return null;let _0x597f86=E(_0x24ef89[_0x1b98bf(0x12b)]);return _0x597f86[_0x1b98bf(0x15b)][_0x24ef89[_0x1b98bf(0xff)]]=_0x381d68[_0x1b98bf(0x18c)](_0x24ef89[_0x1b98bf(0x119)]),{'nextDocumentData':_0xf6140b,'nextResource':_0x597f86,'cursorOffset':_0x332efa[_0x1b98bf(0x1a8)]+0x1};}function Be(_0x4a033e){const _0x1dd78a=_0x18cc3;let _0x536e51=_0x381d68[_0x1dd78a(0x18c)](_0x4a033e[_0x1dd78a(0x15a)]),_0x25f89b=Je(_0x536e51,_0x4a033e[_0x1dd78a(0xff)],_0x4a033e[_0x1dd78a(0x19e)]??'');if(_0x25f89b==null)return null;let _0x4932f4=E(_0x4a033e[_0x1dd78a(0x12b)]);return delete _0x4932f4[_0x1dd78a(0x15b)][_0x4a033e['rangeId']],{'nextDocumentData':_0x536e51,'nextResource':_0x4932f4,'cursorOffset':_0x25f89b};}function Ve(_0x18f02b,_0x24b291){const _0x74060e=_0x18cc3;var _0x4bbfb3;let _0x25c74e=_0x381d68[_0x74060e(0x18c)](_0x18f02b),_0x121b36=_0x25c74e[_0x74060e(0x1f3)];if(!_0x121b36)return _0x25c74e;let _0x4a076a=new Map(_0x24b291[_0x74060e(0x109)](_0x5604e6=>[_0x5604e6[_0x74060e(0xff)],_0x5604e6[_0x74060e(0x19e)]])),_0x554ffb=((_0x4bbfb3=_0x121b36[_0x74060e(0x179)])==null?void 0x0:_0x4bbfb3[_0x74060e(0x17e)](_0x2a325b=>w(_0x2a325b)&&_0x4a076a[_0x74060e(0x139)](_0x2a325b[_0x74060e(0xff)]))[_0x74060e(0x1ba)]((_0x7bb821,_0x1ab19e)=>_0x1ab19e['startIndex']-_0x7bb821[_0x74060e(0x124)]))??[];for(let _0x510c4b of _0x554ffb)Je(_0x25c74e,_0x510c4b[_0x74060e(0xff)],_0x4a076a['get'](_0x510c4b['rangeId'])??'');return _0x25c74e;}function w(_0x1f8484){const _0x22db73=_0x18cc3;var _0x305edb;return(_0x1f8484==null?void 0x0:_0x1f8484['rangeType'])===_0x16c72a['CUSTOM']&&_0x1f8484[_0x22db73(0x111)]===!0x0&&((_0x305edb=_0x1f8484[_0x22db73(0x14e)])==null?void 0x0:_0x305edb[_0x22db73(0x18e)])===_0x22db73(0x1f1);}function T(_0x4b8c9d,_0x92c01c){const _0x148526=_0x18cc3;var _0x17a8c9;return _0x4b8c9d==null||(_0x17a8c9=_0x4b8c9d['customRanges'])==null?void 0x0:_0x17a8c9[_0x148526(0x1c4)](_0x3d2f15=>_0x3d2f15[_0x148526(0xff)]===_0x92c01c&&w(_0x3d2f15));}function He(_0x3eecee,_0x463309,_0x4decfa){const _0x2f557f=_0x18cc3;if(_0x463309===_0x4decfa){if(Le[_0x2f557f(0x139)](_0x3eecee[_0x2f557f(0x13a)][_0x463309]))throw new C();return;}for(let _0x582ece=_0x463309;_0x582ece<_0x4decfa;_0x582ece++)if(_0x3eecee[_0x2f557f(0x13a)][_0x582ece]===_0x20e742[_0x2f557f(0x18d)]||Le[_0x2f557f(0x139)](_0x3eecee['dataStream'][_0x582ece]))throw new C();}function Ue(_0x4e9cc1,_0x59ac81){const _0x162f0f=_0x18cc3;return{'startIndex':_0x59ac81,'endIndex':_0x59ac81,'rangeId':_0x4e9cc1,'rangeType':_0x16c72a[_0x162f0f(0x193)],'wholeEntity':!0x0,'properties':{'kind':Me}};}function E(_0x59f28e){const _0x5c221e=_0x18cc3;return _0x59f28e?_0x381d68[_0x5c221e(0x18c)](_0x59f28e):b();}function We(_0x3b3575,_0x27a214,_0x53094f){const _0x887919=_0x18cc3;let _0x37f24b=Ke(_0x3b3575),_0x3ab1f8=_0x27a214??_0x37f24b,_0x51a549=_0x53094f??_0x3ab1f8;return{'startOffset':Ge(Math[_0x887919(0x196)](_0x3ab1f8,_0x51a549),_0x37f24b),'endOffset':Ge(Math[_0x887919(0x140)](_0x3ab1f8,_0x51a549),_0x37f24b)};}function Ge(_0x3cfeaa,_0x5042c2){const _0x18c5b8=_0x18cc3;return Math[_0x18c5b8(0x140)](0x0,Math[_0x18c5b8(0x196)](_0x3cfeaa,_0x5042c2));}function Ke(_0xecc012){const _0x2018a9=_0x18cc3;return _0xecc012[_0x2018a9(0x13a)][_0x2018a9(0x1e7)](''+_0x20e742['PARAGRAPH']+_0x20e742[_0x2018a9(0x133)])?Math[_0x2018a9(0x140)](0x0,_0xecc012[_0x2018a9(0x13a)][_0x2018a9(0x1cf)]-0x2):_0xecc012[_0x2018a9(0x13a)][_0x2018a9(0x1e7)](_0x20e742[_0x2018a9(0x133)])?Math[_0x2018a9(0x140)](0x0,_0xecc012[_0x2018a9(0x13a)][_0x2018a9(0x1cf)]-0x1):_0xecc012[_0x2018a9(0x13a)][_0x2018a9(0x1cf)];}function qe(_0x366e33,_0xe37fcd,_0x55dfb2,_0x489c49){_0x55dfb2>_0xe37fcd&&Xe(_0x366e33,_0xe37fcd,_0x55dfb2),Ye(_0x366e33,_0xe37fcd,_0x489c49);}function Je(_0xd749db,_0x36c4a2,_0x5c88c3){const _0x185353=_0x18cc3;var _0x18a5ba,_0x3c75cc;let _0x4580ac=j(_0xd749db),_0x2852da=(_0x18a5ba=_0x4580ac[_0x185353(0x179)])==null?void 0x0:_0x18a5ba[_0x185353(0x1c4)](_0x396b37=>_0x396b37[_0x185353(0xff)]===_0x36c4a2&&w(_0x396b37));if(!_0x2852da)return null;let _0x210f14=_0xd34d7e(_0x2852da);return qe(_0x4580ac,_0x210f14[_0x185353(0x118)],_0x210f14[_0x185353(0x1ec)],_0x5c88c3),_0x4580ac['customRanges']=(_0x3c75cc=_0x4580ac['customRanges'])==null?void 0x0:_0x3c75cc[_0x185353(0x17e)](_0x1d7663=>_0x1d7663[_0x185353(0xff)]!==_0x36c4a2),_0x210f14[_0x185353(0x118)]+_0x5c88c3[_0x185353(0x1cf)];}function Ye(_0x47ae36,_0xc13eef,_0x3002ea){const _0x831d2a=_0x18cc3;_0x3002ea&&(_0x47ae36[_0x831d2a(0x13a)]=''+_0x47ae36['dataStream'][_0x831d2a(0x116)](0x0,_0xc13eef)+_0x3002ea+_0x47ae36[_0x831d2a(0x13a)][_0x831d2a(0x116)](_0xc13eef),Ze(_0x47ae36,_0xc13eef,_0x3002ea['length']));}function Xe(_0x235efe,_0x3a7e31,_0x2bbb70){const _0x229ba6=_0x18cc3;let _0x28b958=_0x2bbb70-_0x3a7e31;_0x235efe[_0x229ba6(0x13a)]=''+_0x235efe[_0x229ba6(0x13a)][_0x229ba6(0x116)](0x0,_0x3a7e31)+_0x235efe['dataStream'][_0x229ba6(0x116)](_0x2bbb70),Qe(_0x235efe,_0x3a7e31,_0x28b958);}function Ze(_0x20d789,_0x4dca34,_0x36ad3b){const _0x4df099=_0x18cc3;_0x20d789[_0x4df099(0x112)]=D(_0x20d789[_0x4df099(0x112)],_0x4dca34,_0x36ad3b),_0x20d789[_0x4df099(0x10c)]=D(_0x20d789[_0x4df099(0x10c)],_0x4dca34,_0x36ad3b),_0x20d789['customBlocks']=D(_0x20d789[_0x4df099(0x127)],_0x4dca34,_0x36ad3b),_0x20d789[_0x4df099(0x173)]=$e(_0x20d789[_0x4df099(0x173)],_0x4dca34,_0x36ad3b),_0x20d789[_0x4df099(0x188)]=et(_0x20d789[_0x4df099(0x188)],_0x4dca34,_0x36ad3b),_0x20d789[_0x4df099(0x161)]=k(_0x20d789[_0x4df099(0x161)],_0x4dca34,_0x36ad3b),_0x20d789[_0x4df099(0x179)]=k(_0x20d789[_0x4df099(0x179)],_0x4dca34,_0x36ad3b),_0x20d789[_0x4df099(0x170)]=k(_0x20d789['customDecorations'],_0x4dca34,_0x36ad3b),_0x20d789[_0x4df099(0x1c3)]=k(_0x20d789[_0x4df099(0x1c3)],_0x4dca34,_0x36ad3b);}function Qe(_0x376ffb,_0x47e509,_0x239af0){const _0x5ecf92=_0x18cc3;var _0x42eb43,_0xae561c;_0x376ffb[_0x5ecf92(0x112)]=O(_0x376ffb[_0x5ecf92(0x112)],_0x47e509,_0x239af0),_0x376ffb[_0x5ecf92(0x10c)]=O(_0x376ffb[_0x5ecf92(0x10c)],_0x47e509,_0x239af0),_0x376ffb['customBlocks']=O(_0x376ffb[_0x5ecf92(0x127)],_0x47e509,_0x239af0),_0x376ffb['textRuns']=(_0x42eb43=tt((_0xae561c=_0x376ffb[_0x5ecf92(0x173)])==null?void 0x0:_0xae561c[_0x5ecf92(0x109)](_0x275478=>({..._0x275478,'startIndex':_0x275478['st'],'endIndex':_0x275478['ed']})),_0x47e509,_0x239af0))==null?void 0x0:_0x42eb43[_0x5ecf92(0x109)](_0x34ef37=>{let {startIndex:_0x2a0e0c,endIndex:_0x258143,..._0x41ebb3}=_0x34ef37;return{..._0x41ebb3,'st':_0x2a0e0c,'ed':_0x258143};}),_0x376ffb['tables']=tt(_0x376ffb['tables'],_0x47e509,_0x239af0),_0x376ffb[_0x5ecf92(0x161)]=A(_0x376ffb[_0x5ecf92(0x161)],_0x47e509,_0x239af0),_0x376ffb[_0x5ecf92(0x179)]=A(_0x376ffb[_0x5ecf92(0x179)],_0x47e509,_0x239af0),_0x376ffb[_0x5ecf92(0x170)]=A(_0x376ffb[_0x5ecf92(0x170)],_0x47e509,_0x239af0),_0x376ffb[_0x5ecf92(0x1c3)]=A(_0x376ffb['blockRanges'],_0x47e509,_0x239af0);}function D(_0x58775e,_0x349616,_0x51951a){const _0x4bd41a=_0x18cc3;return _0x58775e==null?void 0x0:_0x58775e[_0x4bd41a(0x109)](_0x216b53=>_0x216b53[_0x4bd41a(0x124)]>=_0x349616?{..._0x216b53,'startIndex':_0x216b53[_0x4bd41a(0x124)]+_0x51951a}:_0x216b53);}function O(_0x495305,_0x38be02,_0x5b9d4a){const _0x43361d=_0x18cc3;let _0x39e17a=_0x38be02+_0x5b9d4a;return _0x495305==null?void 0x0:_0x495305[_0x43361d(0x109)](_0x2ada07=>_0x2ada07[_0x43361d(0x124)]>=_0x38be02&&_0x2ada07[_0x43361d(0x124)]<_0x39e17a?null:_0x2ada07['startIndex']>=_0x39e17a?{..._0x2ada07,'startIndex':_0x2ada07[_0x43361d(0x124)]-_0x5b9d4a}:_0x2ada07)[_0x43361d(0x17e)](_0x566af7=>_0x566af7!=null);}function $e(_0x53247b,_0x502164,_0x25e2b8){const _0x192381=_0x18cc3;return _0x53247b==null?void 0x0:_0x53247b[_0x192381(0x109)](_0x10ca9c=>_0x10ca9c['st']>=_0x502164?{..._0x10ca9c,'st':_0x10ca9c['st']+_0x25e2b8,'ed':_0x10ca9c['ed']+_0x25e2b8}:_0x10ca9c['ed']>_0x502164?{..._0x10ca9c,'ed':_0x10ca9c['ed']+_0x25e2b8}:_0x10ca9c);}function k(_0x4cb657,_0x5c1766,_0x16590a){const _0x478174=_0x18cc3;return _0x4cb657==null?void 0x0:_0x4cb657[_0x478174(0x109)](_0x329553=>_0x499da7(_0x329553,_0x5c1766,_0x16590a));}function et(_0x38b5be,_0x26aa12,_0x478600){const _0x4e99d7=_0x18cc3;return _0x38b5be==null?void 0x0:_0x38b5be[_0x4e99d7(0x109)](_0x503302=>_0x5c965b(_0x503302,_0x26aa12,_0x478600));}function A(_0x29d1e8,_0x64a424,_0x3ba36f){const _0x1c328b=_0x18cc3;return _0x29d1e8==null?void 0x0:_0x29d1e8[_0x1c328b(0x109)](_0x2fe446=>_0x1ab29b(_0x2fe446,_0x64a424,_0x3ba36f))[_0x1c328b(0x17e)](_0xf36619=>_0xf36619!=null);}function tt(_0x45f6ea,_0x1e7b26,_0x1b6011){const _0x4d5195=_0x18cc3;return _0x45f6ea==null?void 0x0:_0x45f6ea['map'](_0x68209e=>_0x1cbe27(_0x68209e,_0x1e7b26,_0x1b6011))[_0x4d5195(0x17e)](_0x2eb854=>_0x2eb854!=null);}function j(_0x237e27){const _0x10fcc5=_0x18cc3;if(!_0x237e27[_0x10fcc5(0x1f3)])throw Error(_0x10fcc5(0x150));return _0x237e27[_0x10fcc5(0x1f3)];}function _0x5c97(_0x431c91,_0x5001fe){_0x431c91=_0x431c91-0xfd;const _0x1745ad=_0x1745();let _0x5c977f=_0x1745ad[_0x431c91];return _0x5c977f;}function M(_0x443edb){'@babel/helpers - typeof';const _0x5995af=_0x18cc3;return M=typeof Symbol==_0x5995af(0x107)&&typeof Symbol['iterator']==_0x5995af(0x13e)?function(_0x6af839){return typeof _0x6af839;}:function(_0x2bb55a){const _0x1152ba=_0x5995af;return _0x2bb55a&&typeof Symbol==_0x1152ba(0x107)&&_0x2bb55a[_0x1152ba(0x1f5)]===Symbol&&_0x2bb55a!==Symbol[_0x1152ba(0x1b6)]?'symbol':typeof _0x2bb55a;},M(_0x443edb);}function nt(_0x3ec633,_0x4340c6){const _0x4a4715=_0x18cc3;if(M(_0x3ec633)!=_0x4a4715(0x167)||!_0x3ec633)return _0x3ec633;var _0x35adfc=_0x3ec633[Symbol[_0x4a4715(0x132)]];if(_0x35adfc!==void 0x0){var _0x3ffd13=_0x35adfc[_0x4a4715(0x115)](_0x3ec633,_0x4340c6||_0x4a4715(0x1b4));if(M(_0x3ffd13)!=_0x4a4715(0x167))return _0x3ffd13;throw TypeError(_0x4a4715(0x10a));}return(_0x4340c6==='string'?String:Number)(_0x3ec633);}function rt(_0x1386e4){const _0x59ad12=_0x18cc3;var _0x4fd926=nt(_0x1386e4,_0x59ad12(0x1d6));return M(_0x4fd926)==_0x59ad12(0x13e)?_0x4fd926:_0x4fd926+'';}function N(_0x12cce4,_0x4152f4,_0x4f9ec9){return(_0x4152f4=rt(_0x4152f4))in _0x12cce4?Object['defineProperty'](_0x12cce4,_0x4152f4,{'value':_0x4f9ec9,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x12cce4[_0x4152f4]=_0x4f9ec9,_0x12cce4;}var P=class extends _0x4ff05d{constructor(..._0x1dc888){const _0x59cca0=_0x18cc3;super(..._0x1dc888),N(this,_0x59cca0(0x154),new Map()),N(this,_0x59cca0(0x11e),new Map()),N(this,_0x59cca0(0x1dc),new Map()),N(this,_0x59cca0(0x1e1),new _0x3a4da6()),N(this,_0x59cca0(0x1ca),this[_0x59cca0(0x1e1)][_0x59cca0(0x1a1)]());}['getFormula'](_0x172f36,_0x3fc41d){const _0x57a50b=_0x18cc3;var _0x2a14dc;let _0x37a1b5=(_0x2a14dc=this['_resources'][_0x57a50b(0x151)](_0x172f36))==null?void 0x0:_0x2a14dc['formulas'][_0x3fc41d];return _0x37a1b5?_0x381d68['deepClone'](_0x37a1b5):void 0x0;}[_0x18cc3(0x187)](_0x171cd3){const _0x85ed8=_0x18cc3;var _0x476f83;return _0x381d68[_0x85ed8(0x18c)](((_0x476f83=this[_0x85ed8(0x154)][_0x85ed8(0x151)](_0x171cd3))==null?void 0x0:_0x476f83[_0x85ed8(0x15b)])??{});}['getResource'](_0x4e8906){const _0x2fe0ec=_0x18cc3;let _0x2eb1c0=this['_resources'][_0x2fe0ec(0x151)](_0x4e8906);return _0x2eb1c0?_0x381d68['deepClone'](_0x2eb1c0):void 0x0;}[_0x18cc3(0x181)](_0x17fb02,_0x2a9104,_0x3d45be){return this['setFormulas'](_0x17fb02,{[_0x2a9104]:_0x3d45be});}[_0x18cc3(0x14a)](_0x104203,_0x4abe4a){const _0x57fb81=_0x18cc3;return this[_0x57fb81(0x1dc)]['has'](_0x104203)||!x(_0x4abe4a)?!0x1:(this[_0x57fb81(0x154)][_0x57fb81(0x1e2)](_0x104203,_0x381d68[_0x57fb81(0x18c)](_0x4abe4a)),this[_0x57fb81(0x1e1)][_0x57fb81(0x123)]({'unitId':_0x104203}),!0x0);}['setFormulas'](_0x1856a7,_0x1e7a27){const _0x13e7d1=_0x18cc3;if(this[_0x13e7d1(0x1dc)]['has'](_0x1856a7)||!Object['keys'](_0x1e7a27)['length']||!x({'schemaVersion':0x1,'formulas':_0x1e7a27}))return!0x1;let _0x4299a3=this[_0x13e7d1(0x154)]['get'](_0x1856a7)??b(),_0x195719=_0x381d68['deepClone'](_0x4299a3);return Object[_0x13e7d1(0x108)](_0x195719[_0x13e7d1(0x15b)],_0x381d68['deepClone'](_0x1e7a27)),this['_resources']['set'](_0x1856a7,_0x195719),this[_0x13e7d1(0x1e1)]['next']({'unitId':_0x1856a7,'rangeIds':Object[_0x13e7d1(0x102)](_0x1e7a27)}),!0x0;}[_0x18cc3(0x1c0)](_0x164156,_0x11350f){const _0x3862d9=_0x18cc3;if(this[_0x3862d9(0x1dc)][_0x3862d9(0x139)](_0x164156))return!0x1;let _0x4b74f6=this['_resources']['get'](_0x164156);if(!(_0x4b74f6!=null&&_0x4b74f6[_0x3862d9(0x15b)][_0x11350f]))return!0x1;let _0x129ba7=_0x381d68[_0x3862d9(0x18c)](_0x4b74f6);return delete _0x129ba7['formulas'][_0x11350f],this['_resources'][_0x3862d9(0x1e2)](_0x164156,_0x129ba7),this['_change$']['next']({'unitId':_0x164156,'rangeIds':[_0x11350f]}),!0x0;}[_0x18cc3(0x1cc)](_0x3c6e5d,_0x29de52){const _0x11bd15=_0x18cc3;return _0x29de52&&typeof _0x29de52=='object'&&'schemaVersion'in _0x29de52&&_0x29de52[_0x11bd15(0x11a)]!==0x1?(this['_preserveInvalid'](_0x3c6e5d,_0x29de52,'unsupported-version'),!0x1):x(_0x29de52)?(this[_0x11bd15(0x154)][_0x11bd15(0x1e2)](_0x3c6e5d,_0x381d68['deepClone'](_0x29de52)),this[_0x11bd15(0x11e)]['delete'](_0x3c6e5d),this[_0x11bd15(0x1dc)][_0x11bd15(0x1ad)](_0x3c6e5d),this[_0x11bd15(0x1e1)]['next']({'unitId':_0x3c6e5d}),!0x0):(this[_0x11bd15(0x166)](_0x3c6e5d,_0x29de52,_0x11bd15(0x110)),!0x1);}[_0x18cc3(0x126)](_0x10c838){const _0x5df81a=_0x18cc3;let _0x42b510=this[_0x5df81a(0x154)][_0x5df81a(0x151)](_0x10c838);return _0x42b510?_0x381d68[_0x5df81a(0x18c)](_0x42b510):this[_0x5df81a(0x11e)][_0x5df81a(0x139)](_0x10c838)?_0x381d68[_0x5df81a(0x18c)](this[_0x5df81a(0x11e)][_0x5df81a(0x151)](_0x10c838)):b();}[_0x18cc3(0x131)](_0x5ec62c){const _0x43cc8f=_0x18cc3;return this['_loadErrors'][_0x43cc8f(0x151)](_0x5ec62c);}[_0x18cc3(0x103)](_0x46df03){const _0x477900=_0x18cc3;this[_0x477900(0x154)][_0x477900(0x1ad)](_0x46df03),this[_0x477900(0x11e)][_0x477900(0x1ad)](_0x46df03),this[_0x477900(0x1dc)][_0x477900(0x1ad)](_0x46df03),this[_0x477900(0x1e1)]['next']({'unitId':_0x46df03});}['dispose'](){const _0x427553=_0x18cc3;this['_resources']['clear'](),this[_0x427553(0x11e)]['clear'](),this[_0x427553(0x1dc)][_0x427553(0x11b)](),this[_0x427553(0x1e1)][_0x427553(0x1be)](),super[_0x427553(0x175)]();}['_preserveInvalid'](_0x1dc390,_0x160bf7,_0x28a4bd){const _0x2d2ed0=_0x18cc3;this[_0x2d2ed0(0x154)]['delete'](_0x1dc390),this['_rawResources'][_0x2d2ed0(0x1e2)](_0x1dc390,_0x381d68[_0x2d2ed0(0x18c)](_0x160bf7)),this[_0x2d2ed0(0x1dc)][_0x2d2ed0(0x1e2)](_0x1dc390,_0x28a4bd),this[_0x2d2ed0(0x1e1)][_0x2d2ed0(0x123)]({'unitId':_0x1dc390});}};let it=function(_0x15e551){const _0x30dbcd=_0x18cc3;return _0x15e551['EMPTY']='empty',_0x15e551['PENDING']=_0x30dbcd(0x197),_0x15e551[_0x30dbcd(0x117)]=_0x30dbcd(0x1a6),_0x15e551[_0x30dbcd(0x1c7)]=_0x30dbcd(0x1a3),_0x15e551;}({});function F(_0x5b4953,_0x3b21d3){return function(_0x1d6ed7,_0x5196b7){_0x3b21d3(_0x1d6ed7,_0x5196b7,_0x5b4953);};}function I(_0x2c8f5f,_0x108be1,_0x3f31a4,_0x4dbeab){const _0x55a543=_0x18cc3;var _0x23eb51=arguments['length'],_0x15369c=_0x23eb51<0x3?_0x108be1:_0x4dbeab===null?_0x4dbeab=Object[_0x55a543(0x1f0)](_0x108be1,_0x3f31a4):_0x4dbeab,_0x422046;if(typeof Reflect==_0x55a543(0x167)&&typeof Reflect[_0x55a543(0x113)]=='function')_0x15369c=Reflect[_0x55a543(0x113)](_0x2c8f5f,_0x108be1,_0x3f31a4,_0x4dbeab);else{for(var _0x4556ab=_0x2c8f5f[_0x55a543(0x1cf)]-0x1;_0x4556ab>=0x0;_0x4556ab--)(_0x422046=_0x2c8f5f[_0x4556ab])&&(_0x15369c=(_0x23eb51<0x3?_0x422046(_0x15369c):_0x23eb51>0x3?_0x422046(_0x108be1,_0x3f31a4,_0x15369c):_0x422046(_0x108be1,_0x3f31a4))||_0x15369c);}return _0x23eb51>0x3&&_0x15369c&&Object[_0x55a543(0x1bd)](_0x108be1,_0x3f31a4,_0x15369c),_0x15369c;}let L=class extends _0x4ff05d{constructor(_0xcd139d,_0x28cee8,_0x54202c){const _0x3c31f0=_0x18cc3;super(),this[_0x3c31f0(0x1d7)]=_0xcd139d,this['_registrationService']=_0x28cee8,this[_0x3c31f0(0x1da)]=_0x54202c,N(this,_0x3c31f0(0x15d),new Map()),N(this,_0x3c31f0(0x1e6),new Map()),N(this,_0x3c31f0(0x194),new _0x3a4da6()),N(this,_0x3c31f0(0x1cd),this['_presentationChanged$']['asObservable']()),this[_0x3c31f0(0x160)](this[_0x3c31f0(0x1bb)]['formulaResult$'][_0x3c31f0(0x13b)](_0x5b5299=>{const _0x29f373=_0x3c31f0;for(let _0x4090f9 of Object[_0x29f373(0x172)](_0x5b5299))for(let _0x169432 of Object[_0x29f373(0x172)](_0x4090f9))_0x169432[_0x29f373(0x14f)](_0x15f2f1=>this[_0x29f373(0x1a7)](_0x15f2f1));}));}[_0x18cc3(0x135)](_0x2bacb0){const _0x830fca=_0x18cc3;var _0x135e73;let _0x5d6e5a=_0x2bacb0['getUnitId'](),_0x293681=((_0x135e73=_0x2bacb0['getSnapshot']()[_0x830fca(0x1f3)])==null||(_0x135e73=_0x135e73[_0x830fca(0x179)])==null?void 0x0:_0x135e73[_0x830fca(0x17e)](w))??[],_0x48df68=this[_0x830fca(0x1d7)][_0x830fca(0x187)](_0x5d6e5a),_0x3e048f=new Set();for(let _0x5184d1 of _0x293681){let _0x3fb1fe=_0x48df68[_0x5184d1[_0x830fca(0xff)]];_0x3fb1fe&&(_0x3e048f['add'](R(_0x5d6e5a,_0x5184d1['rangeId'])),this[_0x830fca(0x198)]({'unitId':_0x5d6e5a,'rangeId':_0x5184d1[_0x830fca(0xff)]},_0x3fb1fe));}for(let _0x1ff298 of Array[_0x830fca(0x1d5)](this['_registrations']['values']()))_0x1ff298['unitId']===_0x5d6e5a&&!_0x3e048f[_0x830fca(0x139)](R(_0x1ff298[_0x830fca(0x1e9)],_0x1ff298[_0x830fca(0xff)]))&&this[_0x830fca(0x10d)](_0x1ff298);}[_0x18cc3(0x198)](_0x10bd77,_0x295018){const _0x86ff9b=_0x18cc3;let _0x116e5f=R(_0x10bd77[_0x86ff9b(0x1e9)],_0x10bd77[_0x86ff9b(0xff)]),_0xa62644=this[_0x86ff9b(0x15d)][_0x86ff9b(0x151)](_0x116e5f),_0x5d0da4=this['_hostExternalReferenceModel'][_0x86ff9b(0x13f)](_0x10bd77[_0x86ff9b(0x1e9)]);if(_0xa62644&&_0xa62644['config'][_0x86ff9b(0x1df)]===_0x295018['formula']&&_0xa62644[_0x86ff9b(0x195)]===_0x5d0da4){_0xa62644[_0x86ff9b(0x119)]=_0x295018;let _0x9a4acb=_0xa62644[_0x86ff9b(0x153)]?this[_0x86ff9b(0x1bb)][_0x86ff9b(0x192)](_0xa62644[_0x86ff9b(0x1e9)],_0xa62644['unitId'],_0xa62644['formulaId'])??void 0x0:void 0x0;_0xa62644['liveResult']=_0x9a4acb,this[_0x86ff9b(0x14c)](_0x116e5f,z(_0x295018,_0x9a4acb));return;}_0xa62644!=null&&_0xa62644[_0x86ff9b(0x153)]&&this[_0x86ff9b(0x164)](_0xa62644);let _0x2a4951={..._0x10bd77,'config':_0x295018,'referenceRevision':_0x5d0da4,'presentation':z(_0x295018,void 0x0)};if(this['_registrations'][_0x86ff9b(0x1e2)](_0x116e5f,_0x2a4951),!_0x295018[_0x86ff9b(0x1df)][_0x86ff9b(0x106)]())return;let _0x52ce0c=this[_0x86ff9b(0x1bb)][_0x86ff9b(0x1e3)](_0x10bd77[_0x86ff9b(0x1e9)],_0x10bd77['unitId'],_0x295018['formula'],void 0x0,{'rangeId':_0x10bd77[_0x86ff9b(0xff)]},_0xc230f8[_0x86ff9b(0x19d)],_0x10bd77[_0x86ff9b(0xff)]);_0x2a4951[_0x86ff9b(0x153)]=_0x52ce0c,this[_0x86ff9b(0x1e6)][_0x86ff9b(0x1e2)](_0x52ce0c,_0x116e5f);}[_0x18cc3(0x10d)](_0x3dcaaf){const _0x1fdf99=_0x18cc3;let _0x2c8762=R(_0x3dcaaf[_0x1fdf99(0x1e9)],_0x3dcaaf[_0x1fdf99(0xff)]),_0x4dfca9=this[_0x1fdf99(0x15d)][_0x1fdf99(0x151)](_0x2c8762);_0x4dfca9&&(this['_deleteRegistration'](_0x4dfca9),this['_registrations'][_0x1fdf99(0x1ad)](_0x2c8762));}[_0x18cc3(0x148)](_0x227030){const _0x47c693=_0x18cc3;for(let _0x471d20 of Array[_0x47c693(0x1d5)](this[_0x47c693(0x15d)][_0x47c693(0x172)]()))_0x471d20[_0x47c693(0x1e9)]===_0x227030&&this[_0x47c693(0x10d)](_0x471d20);}[_0x18cc3(0x177)](_0x2f2a24){const _0x94788c=_0x18cc3;var _0x482879;return(_0x482879=this[_0x94788c(0x15d)][_0x94788c(0x151)](R(_0x2f2a24[_0x94788c(0x1e9)],_0x2f2a24['rangeId'])))==null?void 0x0:_0x482879[_0x94788c(0x1b8)];}[_0x18cc3(0x1d2)](_0x3c0b03){const _0x4273b7=_0x18cc3;let _0x5153d1=this[_0x4273b7(0x15d)][_0x4273b7(0x151)](R(_0x3c0b03[_0x4273b7(0x1e9)],_0x3c0b03[_0x4273b7(0xff)]));return _0x5153d1?B(_0x5153d1):void 0x0;}['getRegisteredFormulas'](){const _0x196075=_0x18cc3;return Array[_0x196075(0x1d5)](this[_0x196075(0x15d)]['values'](),_0x25cb93=>({'identity':{'unitId':_0x25cb93['unitId'],'rangeId':_0x25cb93['rangeId']},'config':_0x25cb93[_0x196075(0x119)],'referenceRevision':_0x25cb93[_0x196075(0x195)],..._0x25cb93[_0x196075(0x1d0)]?{'liveResult':_0x25cb93[_0x196075(0x1d0)]}:null}));}[_0x18cc3(0x175)](){const _0x5c2fea=_0x18cc3;for(let _0x444c9d of this[_0x5c2fea(0x15d)][_0x5c2fea(0x172)]())this[_0x5c2fea(0x164)](_0x444c9d);this['_registrations'][_0x5c2fea(0x11b)](),this[_0x5c2fea(0x1e6)][_0x5c2fea(0x11b)](),this['_presentationChanged$'][_0x5c2fea(0x1be)](),super[_0x5c2fea(0x175)]();}['_updateFormulaResult'](_0x36dc36){const _0x5a6278=_0x18cc3;let _0x38901f=this[_0x5a6278(0x1e6)][_0x5a6278(0x151)](_0x36dc36[_0x5a6278(0x153)]),_0x254307=_0x38901f?this['_registrations']['get'](_0x38901f):void 0x0;_0x38901f&&_0x254307&&(_0x254307['liveResult']=_0x36dc36,this['_setPresentation'](_0x38901f,z(_0x254307[_0x5a6278(0x119)],_0x36dc36)));}['_setPresentation'](_0x356b49,_0x577a79){const _0xfa5e2f=_0x18cc3;var _0x3b7cfc,_0x1f2d42;let _0x211513=this[_0xfa5e2f(0x15d)][_0xfa5e2f(0x151)](_0x356b49);if(!_0x211513||at(_0x211513['presentation'],_0x577a79))return;let _0x5a242a=_0x211513[_0xfa5e2f(0x1b8)],_0x3ff261=B(_0x211513);_0x211513[_0xfa5e2f(0x1b8)]=_0x577a79,this['_presentationChanged$'][_0xfa5e2f(0x123)]({'unitId':_0x211513[_0xfa5e2f(0x1e9)],'rangeId':_0x211513['rangeId'],'presentation':_0x577a79,'previousPresentation':_0x5a242a,'result':B(_0x211513),'previousResult':{..._0x3ff261,..._0x5a242a,'value':(_0x3b7cfc=_0x5a242a[_0xfa5e2f(0x11c)])==null?void 0x0:_0x3b7cfc['v'],'valueType':((_0x1f2d42=_0x5a242a[_0xfa5e2f(0x11c)])==null?void 0x0:_0x1f2d42['t'])??void 0x0}});}[_0x18cc3(0x164)](_0xdb17f9){const _0xbd78af=_0x18cc3;_0xdb17f9[_0xbd78af(0x153)]&&(this[_0xbd78af(0x1bb)][_0xbd78af(0x156)](_0xdb17f9[_0xbd78af(0x1e9)],_0xdb17f9[_0xbd78af(0x1e9)],[_0xdb17f9['formulaId']]),this['_formulaKeys'][_0xbd78af(0x1ad)](_0xdb17f9[_0xbd78af(0x153)]));}};L=I([F(0x0,_0x3f1c8b(P)),F(0x1,_0x3f1c8b(_0x209f95)),F(0x2,_0x3f1c8b(_0x4c2fec))],L);function R(_0x46ef40,_0x4d9fcd){return _0x46ef40+'\x00'+_0x4d9fcd;}function z(_0x282dd7,_0x3b87ee){const _0x160790=_0x18cc3;return _0x3ddcc7({'numberFormat':_0x282dd7[_0x160790(0xfd)],'lastValue':_0x282dd7['lastValue'],'result':_0x3b87ee});}function B(_0x4ef6fa){const _0x31d4c4=_0x18cc3;var _0x20ee9b,_0x4a5097,_0x43eb9c;let _0x23d580=_0x4ef6fa[_0x31d4c4(0x1b8)],_0x193a05=_0x4ef6fa[_0x31d4c4(0x119)][_0x31d4c4(0x1df)]['trim']()?_0x23d580[_0x31d4c4(0x18b)]||_0x23d580['cell']==null?'pending':((_0x20ee9b=_0x4ef6fa[_0x31d4c4(0x1d0)])==null?void 0x0:_0x20ee9b[_0x31d4c4(0x169)])===_0x1a30ad[_0x31d4c4(0x1c7)]?_0x31d4c4(0x1a3):_0x31d4c4(0x1a6):_0x31d4c4(0x10b);return{..._0x23d580,'status':_0x193a05,'value':(_0x4a5097=_0x23d580[_0x31d4c4(0x11c)])==null?void 0x0:_0x4a5097['v'],'valueType':((_0x43eb9c=_0x23d580[_0x31d4c4(0x11c)])==null?void 0x0:_0x43eb9c['t'])??void 0x0};}function at(_0x4b0c19,_0x4d64c2){const _0x567e53=_0x18cc3;var _0x1082fa,_0xa3b5ec,_0x1f329e,_0xe9eefe;return _0x4b0c19[_0x567e53(0x19e)]===_0x4d64c2['text']&&_0x4b0c19[_0x567e53(0x15f)]===_0x4d64c2[_0x567e53(0x15f)]&&_0x4b0c19[_0x567e53(0x1c2)]===_0x4d64c2[_0x567e53(0x1c2)]&&_0x4b0c19[_0x567e53(0x1b5)]===_0x4d64c2['source']&&_0x4b0c19[_0x567e53(0x18b)]===_0x4d64c2['stale']&&((_0x1082fa=_0x4b0c19[_0x567e53(0x11c)])==null?void 0x0:_0x1082fa['t'])===((_0xa3b5ec=_0x4d64c2['cell'])==null?void 0x0:_0xa3b5ec['t'])&&Object['is']((_0x1f329e=_0x4b0c19['cell'])==null?void 0x0:_0x1f329e['v'],(_0xe9eefe=_0x4d64c2[_0x567e53(0x11c)])==null?void 0x0:_0xe9eefe['v']);}const ot={'id':_0x18cc3(0x183),'type':_0x180a99[_0x18cc3(0x143)],'handler':(_0x4c6c14,_0x3ab5e2)=>!(_0x3ab5e2!=null&&_0x3ab5e2[_0x18cc3(0x1e9)])||!_0x3ab5e2[_0x18cc3(0xff)]||!_0x3ab5e2[_0x18cc3(0x119)]?!0x1:_0x4c6c14[_0x18cc3(0x151)](P)[_0x18cc3(0x181)](_0x3ab5e2[_0x18cc3(0x1e9)],_0x3ab5e2[_0x18cc3(0xff)],_0x3ab5e2[_0x18cc3(0x119)])},st={'id':'docs-formula.mutation.remove-formula','type':_0x180a99[_0x18cc3(0x143)],'handler':(_0x204ccf,_0xb5a314)=>!(_0xb5a314!=null&&_0xb5a314['unitId'])||!_0xb5a314[_0x18cc3(0xff)]?!0x1:_0x204ccf['get'](P)[_0x18cc3(0x1c0)](_0xb5a314[_0x18cc3(0x1e9)],_0xb5a314[_0x18cc3(0xff)])},V={'id':_0x18cc3(0x1f2),'type':_0x180a99['MUTATION'],'handler':(_0xd6f73f,_0x19dbea)=>!(_0x19dbea!=null&&_0x19dbea['unitId'])||!_0x19dbea[_0x18cc3(0x12b)]?!0x1:_0xd6f73f[_0x18cc3(0x151)](P)[_0x18cc3(0x14a)](_0x19dbea[_0x18cc3(0x1e9)],_0x19dbea[_0x18cc3(0x12b)])},H={'id':_0x18cc3(0x1e8),'type':_0x180a99[_0x18cc3(0x143)],'handler':(_0x1683ad,_0x394349)=>{const _0x324590=_0x18cc3;if(!(_0x394349!=null&&_0x394349[_0x324590(0x1e9)])||!_0x394349[_0x324590(0x1b2)][_0x324590(0x1cf)])return!0x1;let _0x135082=_0x1683ad[_0x324590(0x151)](P),_0x627a9f=_0x1683ad['get'](_0x4c2fec),_0x4cd5bd=_0x135082[_0x324590(0x1ee)](_0x394349[_0x324590(0x1e9)]);if(!_0x4cd5bd)return!0x1;let _0x324318=_0x381d68[_0x324590(0x18c)](_0x4cd5bd),_0x268f4c=!0x1;for(let _0x4a04ef of _0x394349[_0x324590(0x1b2)]){var _0x1228ad,_0x45e6fa,_0x4a065d,_0x432455;let _0x26152c=_0x324318[_0x324590(0x15b)][_0x4a04ef['rangeId']];_0x26152c&&_0x26152c[_0x324590(0x1df)]===_0x4a04ef[_0x324590(0x18a)]&&((_0x1228ad=_0x26152c['numberFormat'])==null?void 0x0:_0x1228ad[_0x324590(0x1c2)])===_0x4a04ef['expectedNumberFormat']&&_0x627a9f[_0x324590(0x13f)](_0x394349[_0x324590(0x1e9)])===_0x4a04ef[_0x324590(0x134)]&&(((_0x45e6fa=_0x26152c[_0x324590(0x16d)])==null?void 0x0:_0x45e6fa['v'])!==_0x4a04ef[_0x324590(0x16d)]['v']||((_0x4a065d=_0x26152c[_0x324590(0x16d)])==null?void 0x0:_0x4a065d['t'])!==_0x4a04ef[_0x324590(0x16d)]['t']||((_0x432455=_0x26152c[_0x324590(0x16d)])==null?void 0x0:_0x432455['pattern'])!==_0x4a04ef[_0x324590(0x16d)][_0x324590(0x1c2)])&&(_0x26152c[_0x324590(0x16d)]=_0x381d68[_0x324590(0x18c)](_0x4a04ef[_0x324590(0x16d)]),_0x268f4c=!0x0);}return!_0x268f4c||_0x135082['setResource'](_0x394349[_0x324590(0x1e9)],_0x324318);}},U={'id':_0x18cc3(0x144),'type':_0x180a99[_0x18cc3(0x10e)],'handler':(_0x1f96e8,_0x3b46b4)=>{const _0x5a25bb=_0x18cc3;if(!(_0x3b46b4!=null&&_0x3b46b4['formula'][_0x5a25bb(0x106)]()))return!0x1;let _0x507df0=q(_0x1f96e8,_0x3b46b4['unitId'],'');if(!_0x507df0)return!0x1;let _0x30c0ca=ft(_0x3b46b4[_0x5a25bb(0x1c1)],_0x507df0[_0x5a25bb(0x1f3)],dt(_0x1f96e8,_0x507df0[_0x5a25bb(0x1e9)]));if(!_0x30c0ca)return!0x1;let _0x4afb7d=pt(_0x1f96e8,_0x507df0['unitId'],_0x3b46b4['formula'],_0x3b46b4['externalReferences']??[]);if(!_0x4afb7d)return!0x1;let _0x591757=mt(_0x507df0['body'],_0x507df0[_0x5a25bb(0x163)],_0x507df0[_0x5a25bb(0x1e9)]),_0x3a432f=ht({'documentData':_0x507df0[_0x5a25bb(0x15a)],'resource':_0x507df0[_0x5a25bb(0x12b)],'rangeId':_0x591757,'config':{'formula':_0x3b46b4[_0x5a25bb(0x1df)],..._0x3b46b4['numberFormat']?{'numberFormat':_0x3b46b4['numberFormat']}:null},'startOffset':_0x30c0ca[_0x5a25bb(0x118)],'endOffset':_0x30c0ca[_0x5a25bb(0x1ec)]});if(!_0x3a432f)return!0x1;let _0x472a5e=_0x1e344d(_0x1f96e8,_0x507df0[_0x5a25bb(0x1e9)],_0x4afb7d);return!_0x472a5e||!J({'accessor':_0x1f96e8,'document':_0x507df0[_0x5a25bb(0x162)],'unitId':_0x507df0[_0x5a25bb(0x1e9)],'trigger':U['id'],'rangeId':_0x591757,'previousResource':_0x507df0[_0x5a25bb(0x12b)],'nextResource':_0x3a432f['nextResource'],'previousDocumentData':_0x507df0[_0x5a25bb(0x15a)],'nextDocumentData':_0x3a432f[_0x5a25bb(0x1b7)],'cursorOffset':_0x3a432f[_0x5a25bb(0x17f)],'externalMutations':_0x472a5e})?!0x1:{'rangeId':_0x591757,'startOffset':_0x3a432f[_0x5a25bb(0x17f)]-0x1,'endOffset':_0x3a432f[_0x5a25bb(0x17f)]};}},W={'id':_0x18cc3(0xfe),'type':_0x180a99[_0x18cc3(0x10e)],'handler':(_0x513753,_0x477b04)=>{const _0x50500c=_0x18cc3;if(!(_0x477b04!=null&&_0x477b04[_0x50500c(0xff)])||!_0x477b04['formula'][_0x50500c(0x106)]())return!0x1;let _0x59cf99=q(_0x513753,_0x477b04[_0x50500c(0x1e9)],''),_0x5a59ea=_0x59cf99==null?void 0x0:_0x59cf99['model'][_0x50500c(0x1ab)](_0x59cf99[_0x50500c(0x1e9)],_0x477b04['rangeId']),_0x45a70c=_0x59cf99?T(_0x59cf99['documentData'][_0x50500c(0x1f3)],_0x477b04[_0x50500c(0xff)]):void 0x0;if(!_0x59cf99||!_0x5a59ea||!_0x45a70c)return!0x1;let _0x27af7f=pt(_0x513753,_0x59cf99[_0x50500c(0x1e9)],_0x477b04[_0x50500c(0x1df)],_0x477b04[_0x50500c(0x1c8)]??[]);if(!_0x27af7f)return!0x1;let _0x21c315=_0x1e344d(_0x513753,_0x59cf99[_0x50500c(0x1e9)],_0x27af7f);if(!_0x21c315)return!0x1;let _0x1f6571=Ct(_0x59cf99[_0x50500c(0x12b)]);return _0x1f6571[_0x50500c(0x15b)][_0x477b04[_0x50500c(0xff)]]={'formula':_0x477b04[_0x50500c(0x1df)],..._0x477b04[_0x50500c(0xfd)]?{'numberFormat':_0x477b04[_0x50500c(0xfd)]}:_0x5a59ea[_0x50500c(0xfd)]?{'numberFormat':_0x5a59ea[_0x50500c(0xfd)]}:null},J({'accessor':_0x513753,'document':_0x59cf99[_0x50500c(0x162)],'unitId':_0x59cf99[_0x50500c(0x1e9)],'trigger':W['id'],'rangeId':_0x477b04[_0x50500c(0xff)],'previousResource':_0x59cf99['resource'],'nextResource':_0x1f6571,'cursorOffset':_0x45a70c[_0x50500c(0x1a8)]+0x1,'externalMutations':_0x21c315});}},G={'id':'docs-formula.command.set-number-format','type':_0x180a99['COMMAND'],'handler':(_0x59d64d,_0x54edbf)=>{const _0xb42082=_0x18cc3;if(!(_0x54edbf!=null&&_0x54edbf[_0xb42082(0xff)]))return!0x1;let _0x3a4305=q(_0x59d64d,_0x54edbf[_0xb42082(0x1e9)],''),_0x383a57=_0x3a4305==null?void 0x0:_0x3a4305[_0xb42082(0x163)]['getFormula'](_0x3a4305['unitId'],_0x54edbf[_0xb42082(0xff)]),_0x1169fb=_0x3a4305?T(_0x3a4305[_0xb42082(0x15a)]['body'],_0x54edbf[_0xb42082(0xff)]):void 0x0;if(!_0x3a4305||!_0x383a57||!_0x1169fb)return!0x1;let _0x21ba36=Ct(_0x3a4305[_0xb42082(0x12b)]);return _0x21ba36[_0xb42082(0x15b)][_0x54edbf['rangeId']]={..._0x383a57,..._0x54edbf['numberFormat']?{'numberFormat':_0x54edbf[_0xb42082(0xfd)]}:null},_0x54edbf['numberFormat']||delete _0x21ba36[_0xb42082(0x15b)][_0x54edbf[_0xb42082(0xff)]][_0xb42082(0xfd)],J({'accessor':_0x59d64d,'document':_0x3a4305['document'],'unitId':_0x3a4305[_0xb42082(0x1e9)],'trigger':G['id'],'rangeId':_0x54edbf[_0xb42082(0xff)],'previousResource':_0x3a4305['resource'],'nextResource':_0x21ba36,'cursorOffset':_0x1169fb[_0xb42082(0x1a8)]+0x1,'externalMutations':{}});}},K={'id':'docs-formula.command.remove','type':_0x180a99[_0x18cc3(0x10e)],'handler':(_0x57b88b,_0x28ba07)=>ut(_0x57b88b,_0x28ba07,'',K['id'])},ct={'id':_0x18cc3(0x1d4),'type':_0x180a99[_0x18cc3(0x10e)],'handler':(_0x34b4ef,_0x3bf4eb)=>ut(_0x34b4ef,_0x3bf4eb,(_0x3bf4eb==null?void 0x0:_0x3bf4eb['text'])??'',ct['id'])},lt={'id':'docs-formula.command.convert-to-text','type':_0x180a99[_0x18cc3(0x10e)],'handler':(_0x515a5c,_0x5d0532)=>{const _0x476058=_0x18cc3;if(!(_0x5d0532!=null&&_0x5d0532['rangeId']))return!0x1;let _0x3e04c2=q(_0x515a5c,_0x5d0532[_0x476058(0x1e9)],'');if(!_0x3e04c2)return!0x1;let _0x3bb988=_0x515a5c[_0x476058(0x151)](L)[_0x476058(0x1d2)]({'unitId':_0x3e04c2[_0x476058(0x1e9)],'rangeId':_0x5d0532[_0x476058(0xff)]});return _0x3bb988?ut(_0x515a5c,_0x5d0532,_0x3bb988[_0x476058(0x19e)],lt['id']):!0x1;}};function ut(_0xfce24e,_0x839ee4,_0x47cad5,_0x4e9965){const _0xe883ed=_0x18cc3;if(!(_0x839ee4!=null&&_0x839ee4[_0xe883ed(0xff)]))return!0x1;let _0x24343d=q(_0xfce24e,_0x839ee4[_0xe883ed(0x1e9)],'');if(!_0x24343d)return!0x1;let _0x4e473f=Be({'documentData':_0x24343d[_0xe883ed(0x15a)],'resource':_0x24343d[_0xe883ed(0x12b)],'rangeId':_0x839ee4[_0xe883ed(0xff)],'text':_0x47cad5});return _0x4e473f?J({'accessor':_0xfce24e,'document':_0x24343d[_0xe883ed(0x162)],'unitId':_0x24343d['unitId'],'trigger':_0x4e9965,'rangeId':_0x839ee4[_0xe883ed(0xff)],'previousResource':_0x24343d[_0xe883ed(0x12b)],'nextResource':_0x4e473f['nextResource'],'previousDocumentData':_0x24343d[_0xe883ed(0x15a)],'nextDocumentData':_0x4e473f[_0xe883ed(0x1b7)],'cursorOffset':_0x4e473f['cursorOffset'],'externalMutations':{}}):!0x1;}function q(_0x1a8c97,_0x498383,_0x48098b){const _0x4c5fe5=_0x18cc3;if(_0x48098b)return null;let _0x5181a7=_0x1a8c97[_0x4c5fe5(0x151)](_0x2f20c7),_0x97e5c9=(_0x498383?_0x5181a7[_0x4c5fe5(0x15e)](_0x498383,_0x106590[_0x4c5fe5(0x1d8)]):_0x5181a7['getCurrentUnitOfType'](_0x106590['UNIVER_DOC']))??null;if(!_0x97e5c9)return null;let _0x3825c2=_0x97e5c9['getSnapshot'](),_0x20e3bd=_0x3825c2[_0x4c5fe5(0x1f3)];if(_0x3825c2[_0x4c5fe5(0x1eb)]||!_0x20e3bd)return null;let _0x542d65=_0x1a8c97['get'](P);return _0x542d65[_0x4c5fe5(0x131)](_0x97e5c9[_0x4c5fe5(0x137)]())?null:{'document':_0x97e5c9,'body':_0x20e3bd,'documentData':_0x3825c2,'model':_0x542d65,'resource':_0x542d65[_0x4c5fe5(0x1ee)](_0x97e5c9[_0x4c5fe5(0x137)]())??b(),'unitId':_0x97e5c9[_0x4c5fe5(0x137)]()};}function dt(_0x2b54ed,_0xbf4b93){const _0x48e617=_0x18cc3;var _0x135793;return(_0x135793=_0x2b54ed[_0x48e617(0x151)](_0x268941)[_0x48e617(0x120)]({'subUnitId':_0xbf4b93,'unitId':_0xbf4b93}))==null?void 0x0:_0x135793[0x0];}function ft(_0x3166c0,_0xe9e040,_0x439361){const _0x43d5d9=_0x18cc3;if((_0x3166c0==null?void 0x0:_0x3166c0['type'])===_0x43d5d9(0x190)){var _0x548d68;let _0x1a566e=((_0x548d68=_0xe9e040[_0x43d5d9(0x112)])==null?void 0x0:_0x548d68[_0x43d5d9(0x17e)](_0x2de238=>_0x2de238[_0x43d5d9(0x1e0)]===_0x3166c0[_0x43d5d9(0x1e0)]))??[];if(_0x1a566e[_0x43d5d9(0x1cf)]!==0x1)return null;let _0xc10e51=_0x1a566e[0x0],_0x44243f=_0x3b94db(_0xe9e040,_0xc10e51),_0x4d7865=_0xc10e51['startIndex']-_0x44243f,_0x546d39=_0x3166c0[_0x43d5d9(0x1a0)]===_0x43d5d9(0x1a5)?_0x4d7865:_0x3166c0['position'];if(!Number[_0x43d5d9(0x130)](_0x546d39)||_0x546d39<0x0||_0x546d39>_0x4d7865)return null;let _0x296a70=_0x44243f+_0x546d39;return{'startOffset':_0x296a70,'endOffset':_0x296a70};}if((_0x3166c0==null?void 0x0:_0x3166c0[_0x43d5d9(0x1d1)])==='range')return!Number[_0x43d5d9(0x130)](_0x3166c0[_0x43d5d9(0x118)])||!Number['isInteger'](_0x3166c0[_0x43d5d9(0x1ec)])?null:{'startOffset':Math[_0x43d5d9(0x196)](_0x3166c0[_0x43d5d9(0x118)],_0x3166c0['endOffset']),'endOffset':Math['max'](_0x3166c0[_0x43d5d9(0x118)],_0x3166c0[_0x43d5d9(0x1ec)])};let _0x3ebaef=(_0x3166c0==null?void 0x0:_0x3166c0[_0x43d5d9(0x1d1)])==='selection'?_0x3166c0['selection']:_0x439361;return!_0x3ebaef||_0x3ebaef[_0x43d5d9(0x1ea)]?null:{'startOffset':Math[_0x43d5d9(0x196)](_0x3ebaef[_0x43d5d9(0x118)],_0x3ebaef[_0x43d5d9(0x1ec)]),'endOffset':Math['max'](_0x3ebaef[_0x43d5d9(0x118)],_0x3ebaef[_0x43d5d9(0x1ec)])};}function pt(_0x24d08b,_0x4c67cd,_0x302caf,_0x48f5dc){const _0x510efe=_0x18cc3;let _0x209216=_0x24d08b[_0x510efe(0x151)](_0x2a6039),_0x28d078=_0x302caf[_0x510efe(0x1af)]('=')?_0x302caf[_0x510efe(0x116)](0x1):_0x302caf,_0x16e774=_0x209216[_0x510efe(0x1e4)](_0x28d078);if(!_0x16e774)return null;let _0x557d8c=_0x24d08b[_0x510efe(0x151)](_0x4c2fec),_0x111a92=_0x1b3797({'qualifiers':_0x51c5b2(_0x16e774),'explicitReferences':_0x48f5dc??[],'resolveBinding':_0x2822a0=>_0x557d8c['resolveBinding'](_0x4c67cd,_0x2822a0)});return _0x111a92[_0x510efe(0x169)]===_0x510efe(0x158)?_0x111a92['references']:null;}function mt(_0x25822d,_0x50158e,_0x27189b){const _0x341798=_0x18cc3;var _0x1a68a2;let _0x136f4a=_0x51cbf3(0x6);for(;_0x25822d!=null&&(_0x1a68a2=_0x25822d[_0x341798(0x179)])!=null&&_0x1a68a2['some'](_0x18715f=>_0x18715f[_0x341798(0xff)]===_0x136f4a)||_0x50158e['getFormula'](_0x27189b,_0x136f4a);)_0x136f4a=_0x51cbf3(0x6);return _0x136f4a;}function ht(_0x2f053d){try{return Re(_0x2f053d);}catch(_0x3f0dc1){if(_0x3f0dc1 instanceof C)return null;throw _0x3f0dc1;}}function gt(_0xcb8e6a){const _0x17d2bd=_0x18cc3;let _0x482d00=_0xcb8e6a['previousDocumentData']&&_0xcb8e6a['nextDocumentData']?vt(_0xcb8e6a[_0x17d2bd(0x162)],_0xcb8e6a[_0x17d2bd(0x1e9)],_0xcb8e6a[_0x17d2bd(0x138)],_0xcb8e6a[_0x17d2bd(0x1b7)],_0xcb8e6a['cursorOffset'],_0xcb8e6a[_0x17d2bd(0x101)]):null;return _0xcb8e6a['previousDocumentData']&&_0xcb8e6a[_0x17d2bd(0x1b7)]&&!_0x482d00?null:{'documentRedo':_0x482d00,'resourceRedo':{'id':V['id'],'params':{'unitId':_0xcb8e6a[_0x17d2bd(0x1e9)],'resource':_0xcb8e6a[_0x17d2bd(0x182)]}},'resourceUndo':{'id':V['id'],'params':{'unitId':_0xcb8e6a[_0x17d2bd(0x1e9)],'resource':_0xcb8e6a['previousResource']}}};}function _t(_0x25d4e7,_0x3cfbc0,_0xa4e727,_0x5eff9e){const _0x255a8b=_0x18cc3;_0x5eff9e[_0x255a8b(0x1a4)]({'id':_0x25d4e7[_0x255a8b(0x101)]+':'+_0x25d4e7[_0x255a8b(0xff)],'unitID':_0x25d4e7[_0x255a8b(0x1e9)],'redoMutations':[..._0x25d4e7[_0x255a8b(0x12d)][_0x255a8b(0x165)]?[_0x25d4e7['externalMutations'][_0x255a8b(0x165)]]:[],..._0x3cfbc0[_0x255a8b(0x149)]?[_0x3cfbc0['documentRedo']]:[],_0x3cfbc0['resourceRedo']],'undoMutations':[_0x3cfbc0[_0x255a8b(0x1c5)],..._0xa4e727?[_0xa4e727]:[],..._0x25d4e7[_0x255a8b(0x12d)][_0x255a8b(0x1c9)]?[_0x25d4e7[_0x255a8b(0x12d)][_0x255a8b(0x1c9)]]:[]]});}function _0x1745(){const _0xb4f5f2=['1302635LUSJLl','next','startIndex','accessor','serialize','customBlocks','@univerjs-pro/docs-formula','847010GsUgtE','_configService','resource','start','externalMutations','_cacheEligibilityService','onCommandExecuted','isInteger','getLoadError','toPrimitive','SECTION_BREAK','expectedReferenceRevision','syncUnit','name','getUnitId','previousDocumentData','has','dataStream','subscribe','_queueSync','resourceRedo','symbol','getRevision','max','add','TABLE_ROW_START','MUTATION','docs-formula.command.insert','TABLE_CELL_END','parse','TABLE_CELL_START','unregisterUnit','documentRedo','setResource','replaceDocRanges','_setPresentation','_formulaService','properties','forEach','Document\x20main\x20body\x20is\x20required\x20to\x20insert\x20Doc\x20Formula.','get','packageName','formulaId','_resources','TABLE_ROW_END','deleteFormula','_instanceService','resolved','_syncScheduled','documentData','formulas','degradeBody','_registrations','getUnit','color','disposeWithMe','columnGroups','document','model','_deleteRegistration','redoMutation','_preserveInvalid','object','fromEntries','status','boolean','retain','4sUAvYI','lastValue','_docFormulaModel','identity','customDecorations','resolveText','values','textRuns','DOC_FORMULA_PLUGIN','dispose','editOp','getPresentation','85132FoAtex','customRanges','1555648dNWzMH','getInstance','push','CUSTOM_BLOCK','filter','cursorOffset','unitDisposed$','setFormula','nextResource','docs-formula.mutation.set-formula','notifyTextChanged','_service','resources','getFormulas','tables','_isDisposed','expectedFormula','stale','deepClone','PARAGRAPH','kind','_univerInstanceService','paragraph','_syncUnit','getFormulaValueSync','CUSTOM','_presentationChanged$','referenceRevision','min','pending','register','461914PfqbwE','COLUMN_GROUP_START','every','9UBDhnL','DOC','text','228357FtUpXu','position','asObservable','degradeDocumentData','error','pushUndoRedo','end','success','_updateFormulaResult','endIndex','getAllUnitsForType','BLOCK_END','getFormula','params','delete','unitAdded$','startsWith','number','resolveFormula','updates','insertLength','default','source','prototype','nextDocumentData','presentation','collectMutations','sort','_registrationService','isArray','defineProperty','complete','_commandService','removeFormula','target','pattern','blockRanges','find','resourceUndo','onStarting','ERROR','externalReferences','undoMutation','change$','BLOCK_START','load','presentationChanged$','entries','length','liveResult','type','getResult','registerPluginResource','docs-formula.command.replace-with-text','from','string','_model','UNIVER_DOC','setConfig','_hostExternalReferenceModel','Doc\x20Formula\x20range\x20cannot\x20cross\x20document\x20structure\x20boundaries','_loadErrors','_injector','_config','formula','paragraphId','_change$','set','registerFormulaWithRange','sequenceNodesBuilder','docs-formula.config','_formulaKeys','endsWith','docs-formula.mutation.set-last-values','unitId','segmentId','disabled','endOffset','eligible','getResource','_pendingUnitIds','getOwnPropertyDescriptor','univer-docs-formula','docs-formula.mutation.set-resource','body','pluginName','constructor','numberFormat','docs-formula.command.update','rangeId','getBody','trigger','keys','removeUnit','6YSEPRC','version','trim','function','assign','map','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','empty','sectionBreaks','unregister','COMMAND','COLUMN_START','invalid-resource','wholeEntity','paragraphs','decorate','syncExecuteCommand','call','slice','SUCCESS','startOffset','config','schemaVersion','clear','cell','584269focvgr','_rawResources','TABLE_END','getTextRanges','COLUMN_GROUP_END'];_0x1745=function(){return _0xb4f5f2;};return _0x1745();}function J(_0x12258f){const _0x57de2d=_0x18cc3;let _0xaa7195=_0x12258f[_0x57de2d(0x125)][_0x57de2d(0x151)](_0x23d207),_0x442b8e=_0x12258f[_0x57de2d(0x125)][_0x57de2d(0x151)](_0x1cf111),_0x5f0456=_0x12258f[_0x57de2d(0x125)][_0x57de2d(0x151)](_0x268941),_0x1b40d6=gt(_0x12258f);if(!_0x1b40d6)return!0x1;let _0x4dba60=!0x1,_0x5b46e6=null,_0x52110f=!0x1;try{if(_0x12258f[_0x57de2d(0x12d)][_0x57de2d(0x165)]){if(!_0xaa7195[_0x57de2d(0x114)](_0x12258f['externalMutations'][_0x57de2d(0x165)]['id'],_0x12258f[_0x57de2d(0x12d)]['redoMutation'][_0x57de2d(0x1ac)]))return!0x1;_0x4dba60=!0x0;}if(_0x1b40d6[_0x57de2d(0x149)]){let _0x38a031=_0xaa7195[_0x57de2d(0x114)](_0x1b40d6[_0x57de2d(0x149)]['id'],_0x1b40d6[_0x57de2d(0x149)][_0x57de2d(0x1ac)]);if(!_0x38a031)return bt(_0xaa7195,_0x12258f[_0x57de2d(0x12d)],_0x4dba60),!0x1;_0x5b46e6={'id':_0x5c51e6['id'],'params':{..._0x38a031,'noHistory':!0x0,'noNeedSetTextRange':!0x0,'segmentId':''}};}if(!_0xaa7195['syncExecuteCommand'](_0x1b40d6[_0x57de2d(0x13d)]['id'],_0x1b40d6['resourceRedo'][_0x57de2d(0x1ac)]))return yt(_0xaa7195,_0x5b46e6),bt(_0xaa7195,_0x12258f[_0x57de2d(0x12d)],_0x4dba60),!0x1;_0x52110f=!0x0,_t(_0x12258f,_0x1b40d6,_0x5b46e6,_0x442b8e);}catch(_0x2cb5b8){throw _0x52110f&&_0xaa7195[_0x57de2d(0x114)](_0x1b40d6[_0x57de2d(0x1c5)]['id'],_0x1b40d6['resourceUndo']['params']),yt(_0xaa7195,_0x5b46e6),bt(_0xaa7195,_0x12258f['externalMutations'],_0x4dba60),_0x2cb5b8;}return _0x5f0456[_0x57de2d(0x14b)]([{'startOffset':_0x12258f[_0x57de2d(0x17f)],'endOffset':_0x12258f[_0x57de2d(0x17f)],'segmentId':''}],{'unitId':_0x12258f[_0x57de2d(0x1e9)],'subUnitId':_0x12258f['unitId']},!0x1,{[_0x4063e0]:!0x0}),!0x0;}function vt(_0x2cf09d,_0x560b42,_0x12d9fe,_0x2f578f,_0x58d3b1,_0x47c8fb){let _0x5a4ce2=xt(_0x12d9fe,_0x2f578f,_0x47e386(_0x2cf09d,''));return _0x5a4ce2?{'id':_0x5c51e6['id'],'params':{'unitId':_0x560b42,'actions':_0x5a4ce2,'segmentId':'','textRanges':[{'startOffset':_0x58d3b1,'endOffset':_0x58d3b1,'collapsed':!0x0,'segmentId':''}],'isEditing':!0x1,'noHistory':!0x0,'noNeedSetTextRange':!0x0,'trigger':_0x47c8fb}}:null;}function yt(_0x19f0ca,_0x9ec429){const _0x31702f=_0x18cc3;_0x9ec429&&_0x19f0ca[_0x31702f(0x114)](_0x9ec429['id'],_0x9ec429[_0x31702f(0x1ac)]);}function bt(_0x4bec52,_0x4ccac1,_0x1a135d){const _0x38edaf=_0x18cc3;_0x1a135d&&_0x4ccac1['undoMutation']&&_0x4bec52[_0x38edaf(0x114)](_0x4ccac1[_0x38edaf(0x1c9)]['id'],_0x4ccac1['undoMutation'][_0x38edaf(0x1ac)]);}function xt(_0x5b63f3,_0x52cd31,_0x105e4c){const _0x203dca=_0x18cc3;let _0x5352a8=_0x5b63f3[_0x203dca(0x1f3)],_0x584e36=_0x52cd31[_0x203dca(0x1f3)],_0x44a6c2=St(_0x5352a8==null?void 0x0:_0x5352a8[_0x203dca(0x13a)],_0x584e36==null?void 0x0:_0x584e36[_0x203dca(0x13a)]);if(!_0x44a6c2||!_0x584e36)return null;let _0x8888c5=new _0x3bd205();return _0x8888c5[_0x203dca(0x16b)](_0x44a6c2[_0x203dca(0x12c)]),_0x44a6c2[_0x203dca(0x1b3)]>0x0&&_0x8888c5['insert'](_0x44a6c2[_0x203dca(0x1b3)],_0x307e5c(_0x584e36,_0x44a6c2['start'],_0x44a6c2[_0x203dca(0x12c)]+_0x44a6c2[_0x203dca(0x1b3)],!0x1)),_0x44a6c2['deleteLength']>0x0&&_0x8888c5['delete'](_0x44a6c2['deleteLength']),_0x71110d[_0x203dca(0x17b)]()[_0x203dca(0x176)](_0x8888c5[_0x203dca(0x126)](),_0x105e4c);}function St(_0x2c398d,_0x52410b){const _0x2066af=_0x18cc3;if(_0x2c398d==null||_0x52410b==null||_0x2c398d===_0x52410b)return null;let _0x31f21d=0x0;for(;_0x31f21d<_0x2c398d[_0x2066af(0x1cf)]&&_0x31f21d<_0x52410b[_0x2066af(0x1cf)]&&_0x2c398d[_0x31f21d]===_0x52410b[_0x31f21d];)_0x31f21d+=0x1;let _0x14bd29=_0x2c398d[_0x2066af(0x1cf)],_0x107ad3=_0x52410b[_0x2066af(0x1cf)];for(;_0x14bd29>_0x31f21d&&_0x107ad3>_0x31f21d&&_0x2c398d[_0x14bd29-0x1]===_0x52410b[_0x107ad3-0x1];)--_0x14bd29,--_0x107ad3;return{'start':_0x31f21d,'deleteLength':_0x14bd29-_0x31f21d,'insertLength':_0x107ad3-_0x31f21d};}function Ct(_0x13d011){const _0x2395df=_0x18cc3;return{'schemaVersion':0x1,'formulas':Object[_0x2395df(0x168)](Object['entries'](_0x13d011[_0x2395df(0x15b)])[_0x2395df(0x109)](([_0x5b077b,_0x4fe1b4])=>[_0x5b077b,{..._0x4fe1b4,..._0x4fe1b4['numberFormat']?{'numberFormat':{..._0x4fe1b4[_0x2395df(0xfd)]}}:null,..._0x4fe1b4[_0x2395df(0x16d)]?{'lastValue':{..._0x4fe1b4[_0x2395df(0x16d)]}}:null}]))};}let Y=class extends _0x4ff05d{constructor(_0x15a891,_0x463243,_0x514ec8,_0x32bdf7){const _0x527fb1=_0x18cc3;super(),this[_0x527fb1(0x157)]=_0x15a891,this['_commandService']=_0x463243,this[_0x527fb1(0x1d7)]=_0x514ec8,this[_0x527fb1(0x185)]=_0x32bdf7,N(this,'_pendingUnitIds',new Set()),N(this,_0x527fb1(0x159),!0x1),N(this,_0x527fb1(0x189),!0x1),this['_instanceService'][_0x527fb1(0x1a9)](_0x106590['UNIVER_DOC'])['forEach'](_0x1c845a=>this[_0x527fb1(0x185)]['syncUnit'](_0x1c845a)),this[_0x527fb1(0x160)](this[_0x527fb1(0x1d7)]['change$'][_0x527fb1(0x13b)](({unitId:_0x4cf800})=>this[_0x527fb1(0x191)](_0x4cf800))),this['disposeWithMe'](this['_instanceService'][_0x527fb1(0x1ae)][_0x527fb1(0x13b)](({unit:_0x418ca6})=>{const _0x4492ad=_0x527fb1;_0x418ca6[_0x4492ad(0x1d1)]===_0x106590[_0x4492ad(0x1d8)]&&this[_0x4492ad(0x13c)](_0x418ca6[_0x4492ad(0x137)]());})),this[_0x527fb1(0x160)](this[_0x527fb1(0x157)][_0x527fb1(0x180)][_0x527fb1(0x13b)](_0x34c991=>{const _0x3d5345=_0x527fb1;this[_0x3d5345(0x185)][_0x3d5345(0x148)](_0x34c991[_0x3d5345(0x137)]());})),this['disposeWithMe'](this[_0x527fb1(0x1bf)][_0x527fb1(0x12f)](_0x2a90c7=>{const _0x23d4c8=_0x527fb1;if(_0x2a90c7['id']===_0x5c51e6['id']&&wt(_0x2a90c7[_0x23d4c8(0x1ac)])){let _0x4ae87f=_0x2a90c7['params'];_0x4ae87f['segmentId']||this['_syncUnit'](_0x4ae87f[_0x23d4c8(0x1e9)]);}}));}['dispose'](){const _0x1f9e28=_0x18cc3;this['_isDisposed']=!0x0,super[_0x1f9e28(0x175)]();}[_0x18cc3(0x13c)](_0x4ae106){const _0xb5f6b=_0x18cc3;this[_0xb5f6b(0x1ef)][_0xb5f6b(0x141)](_0x4ae106),!this[_0xb5f6b(0x159)]&&(this[_0xb5f6b(0x159)]=!0x0,queueMicrotask(()=>{const _0x5e3ce9=_0xb5f6b;if(this[_0x5e3ce9(0x159)]=!0x1,this[_0x5e3ce9(0x189)])return;let _0x1549de=Array[_0x5e3ce9(0x1d5)](this['_pendingUnitIds']);this[_0x5e3ce9(0x1ef)][_0x5e3ce9(0x11b)](),_0x1549de['forEach'](_0x753fed=>this['_syncUnit'](_0x753fed));}));}[_0x18cc3(0x191)](_0x164d2){const _0x32fdba=_0x18cc3;let _0x49cc32=this[_0x32fdba(0x157)]['getUnit'](_0x164d2,_0x106590['UNIVER_DOC']);_0x49cc32&&this[_0x32fdba(0x185)][_0x32fdba(0x135)](_0x49cc32);}};Y=I([F(0x0,_0x2f20c7),F(0x1,_0x23d207),F(0x2,_0x3f1c8b(P)),F(0x3,_0x3f1c8b(L))],Y);function wt(_0x23c49a){const _0x476411=_0x18cc3;return typeof _0x23c49a==_0x476411(0x167)&&!!_0x23c49a&&_0x476411(0x1e9)in _0x23c49a&&typeof _0x23c49a[_0x476411(0x1e9)]==_0x476411(0x1d6)&&(!('segmentId'in _0x23c49a)||_0x23c49a[_0x476411(0x1ea)]===void 0x0||typeof _0x23c49a[_0x476411(0x1ea)]==_0x476411(0x1d6));}let X=class extends _0x4ff05d{constructor(_0x3d394f,_0x2aaf0d){const _0x267ed3=_0x18cc3;super(),this['_resourceManagerService']=_0x3d394f,this[_0x267ed3(0x16e)]=_0x2aaf0d,this[_0x267ed3(0x160)](this['_resourceManagerService'][_0x267ed3(0x1d3)]({'pluginName':y,'businesses':[_0x106590[_0x267ed3(0x1d8)]],'toJson':_0x3525d8=>JSON['stringify'](this[_0x267ed3(0x16e)]['serialize'](_0x3525d8)),'parseJson':_0x12b898=>JSON[_0x267ed3(0x146)](_0x12b898),'onLoad':(_0x2b4302,_0x3e5007)=>{const _0x2df788=_0x267ed3;this[_0x2df788(0x16e)]['load'](_0x2b4302,_0x3e5007);},'onUnLoad':_0x50364b=>this[_0x267ed3(0x16e)]['removeUnit'](_0x50364b)}));}};X=I([F(0x0,_0x27e934),F(0x1,_0x3f1c8b(P))],X);var Tt=_0x18cc3(0x128),Et='1.0.1';const Dt={};let Z=class extends _0x4ff05d{constructor(_0x385ff3,_0x1d2acf,_0x1603ed){const _0x18bf75=_0x18cc3;super(),this[_0x18bf75(0x18f)]=_0x385ff3,this[_0x18bf75(0x14d)]=_0x1d2acf,this[_0x18bf75(0x160)](_0x1603ed[_0x18bf75(0x198)]({'resolve':(_0x2f59e0,_0x481d11)=>{const _0x24d7eb=_0x18bf75;var _0x31719f;return((_0x31719f=_0x481d11['customRanges'])==null?void 0x0:_0x31719f['filter'](w)[_0x24d7eb(0x109)](_0x5d8480=>({'startOffset':_0x5d8480['startIndex'],'endOffset':_0x5d8480[_0x24d7eb(0x1a8)]+0x1,'text':this[_0x24d7eb(0x1b1)](_0x2f59e0,_0x5d8480[_0x24d7eb(0xff)])})))??[];}})),this[_0x18bf75(0x160)](this[_0x18bf75(0x14d)]['presentationChanged$'][_0x18bf75(0x13b)](({unitId:_0x248908})=>{const _0x5ea812=_0x18bf75;_0x1603ed[_0x5ea812(0x184)](_0x248908);}));}['resolveFormula'](_0x5f1bee,_0x1fc87c){const _0x316188=_0x18cc3;var _0x4d38ba;return((_0x4d38ba=this[_0x316188(0x14d)][_0x316188(0x1d2)]({'unitId':_0x5f1bee,'rangeId':_0x1fc87c}))==null?void 0x0:_0x4d38ba['text'])??'';}[_0x18cc3(0x171)](_0x31ca75,_0x53dff8,_0x5f09e0){const _0x29b126=_0x18cc3;var _0x437feb;let _0xd51973=this[_0x29b126(0x18f)][_0x29b126(0x15e)](_0x31ca75,_0x106590['UNIVER_DOC']),_0x596843=_0xd51973==null?void 0x0:_0xd51973[_0x29b126(0x100)]();if(!_0x596843)return'';let _0x16c0a3=_0x596843[_0x29b126(0x13a)][_0x29b126(0x116)](_0x53dff8,_0x5f09e0),_0x840f6a=((_0x437feb=_0x596843[_0x29b126(0x179)])==null?void 0x0:_0x437feb[_0x29b126(0x17e)](_0x16e94a=>w(_0x16e94a)&&_0x16e94a[_0x29b126(0x124)]>=_0x53dff8&&_0x16e94a[_0x29b126(0x1a8)]<_0x5f09e0)['sort']((_0x8c4cfd,_0x5d152f)=>_0x5d152f[_0x29b126(0x124)]-_0x8c4cfd[_0x29b126(0x124)]))??[];for(let _0x2d016c of _0x840f6a){let _0x328e86=_0x2d016c[_0x29b126(0x124)]-_0x53dff8,_0x318bd4=_0x2d016c[_0x29b126(0x1a8)]-_0x53dff8+0x1;_0x16c0a3=''+_0x16c0a3['slice'](0x0,_0x328e86)+this['resolveFormula'](_0x31ca75,_0x2d016c[_0x29b126(0xff)])+_0x16c0a3[_0x29b126(0x116)](_0x318bd4);}return _0x16c0a3;}[_0x18cc3(0x1a2)](_0x473a73){return Ot(_0x473a73);}[_0x18cc3(0x15c)](_0x299428,_0x3831c8,_0x2ccc2f={}){const _0x31a549=_0x18cc3;var _0x573240;return Ve({'id':_0x299428,'body':_0x3831c8,'documentStyle':{}},(((_0x573240=_0x3831c8[_0x31a549(0x179)])==null?void 0x0:_0x573240['filter'](w))??[])[_0x31a549(0x109)](_0x15e735=>({'rangeId':_0x15e735[_0x31a549(0xff)],'text':_0x2ccc2f[_0x15e735['rangeId']]??this[_0x31a549(0x1b1)](_0x299428,_0x15e735[_0x31a549(0xff)])})))[_0x31a549(0x1f3)]??{'dataStream':''};}};Z=I([F(0x0,_0x2f20c7),F(0x1,_0x3f1c8b(L)),F(0x2,_0x3f1c8b(_0x23a854))],Z);function Ot(_0x551308){const _0x65c0f8=_0x18cc3;var _0x3df80b,_0x4015d5;let _0x238131=kt(_0x551308),_0x501864=Ve(_0x551308,(((_0x3df80b=_0x551308[_0x65c0f8(0x1f3)])==null||(_0x3df80b=_0x3df80b[_0x65c0f8(0x179)])==null?void 0x0:_0x3df80b[_0x65c0f8(0x17e)](w))??[])[_0x65c0f8(0x109)](_0xf77d06=>({'rangeId':_0xf77d06[_0x65c0f8(0xff)],'text':At(_0x238131==null?void 0x0:_0x238131[_0x65c0f8(0x15b)][_0xf77d06[_0x65c0f8(0xff)]])})));return _0x501864[_0x65c0f8(0x186)]=(_0x4015d5=_0x501864[_0x65c0f8(0x186)])==null?void 0x0:_0x4015d5['filter'](_0x46a6d6=>_0x46a6d6[_0x65c0f8(0x136)]!==y),_0x501864;}function kt(_0x36ed2b){const _0x5a1ea4=_0x18cc3;var _0x1a61a8;let _0x1b10d8=(_0x1a61a8=_0x36ed2b['resources'])==null||(_0x1a61a8=_0x1a61a8[_0x5a1ea4(0x1c4)](_0x848cd=>_0x848cd[_0x5a1ea4(0x136)]===_0x5a1ea4(0x174)))==null?void 0x0:_0x1a61a8['data'];if(_0x1b10d8)try{let _0x2660d9=JSON[_0x5a1ea4(0x146)](_0x1b10d8);return x(_0x2660d9)?_0x2660d9:void 0x0;}catch{return;}}function At(_0x5985aa){const _0x4d90f6=_0x18cc3;return _0x5985aa?_0x3ddcc7({'lastValue':_0x5985aa['lastValue'],'numberFormat':_0x5985aa[_0x4d90f6(0xfd)]})[_0x4d90f6(0x19e)]:'';}let Q=class extends _0x4ff05d{constructor(_0x576985,_0x2a2bf9,_0x552102){const _0x57f208=_0x18cc3;super(),this[_0x57f208(0x14d)]=_0x576985,this[_0x57f208(0x12e)]=_0x2a2bf9,this[_0x57f208(0x160)](_0x552102['registerProvider'](this));}[_0x18cc3(0x1b9)](_0x253b83){const _0x323e67=_0x18cc3;let _0x1a176c=new Map();for(let _0x51c709 of this[_0x323e67(0x14d)]['getRegisteredFormulas']()){var _0x5c3dfc;if(!this['_cacheEligibilityService']['assess'](_0x51c709[_0x323e67(0x119)][_0x323e67(0x1df)],_0x51c709[_0x323e67(0x1d0)])[_0x323e67(0x1ed)])continue;let _0x5b75a4=_0x1ff720(_0x51c709[_0x323e67(0x1d0)]),_0x2d050b=_0x5b75a4?_0x4977e2(_0x5b75a4):null;if(!_0x2d050b||jt(_0x51c709[_0x323e67(0x119)][_0x323e67(0x16d)],_0x2d050b))continue;let _0x98d83f=_0x1a176c[_0x323e67(0x151)](_0x51c709[_0x323e67(0x16f)]['unitId'])??[];_0x98d83f[_0x323e67(0x17c)]({'rangeId':_0x51c709[_0x323e67(0x16f)][_0x323e67(0xff)],'expectedFormula':_0x51c709[_0x323e67(0x119)]['formula'],'expectedNumberFormat':(_0x5c3dfc=_0x51c709[_0x323e67(0x119)]['numberFormat'])==null?void 0x0:_0x5c3dfc[_0x323e67(0x1c2)],'expectedReferenceRevision':_0x51c709['referenceRevision'],'lastValue':_0x2d050b}),_0x1a176c[_0x323e67(0x1e2)](_0x51c709[_0x323e67(0x16f)][_0x323e67(0x1e9)],_0x98d83f);}return Array[_0x323e67(0x1d5)](_0x1a176c,([_0x56a178,_0x902f33])=>({'id':H['id'],'params':{'unitId':_0x56a178,'updates':_0x902f33}}));}};Q=I([F(0x0,_0x3f1c8b(L)),F(0x1,_0x3f1c8b(_0x3b4337)),F(0x2,_0x3f1c8b(_0x10b137))],Q);function jt(_0x55d393,_0x4177ec){const _0x560d91=_0x18cc3;return(_0x55d393==null?void 0x0:_0x55d393['v'])===_0x4177ec['v']&&(_0x55d393==null?void 0x0:_0x55d393['t'])===_0x4177ec['t']&&(_0x55d393==null?void 0x0:_0x55d393['pattern'])===_0x4177ec[_0x560d91(0x1c2)];}let $=class extends _0x253e10{constructor(_0x1e39ea=Dt,_0x59e74d,_0x4d18f6,_0x1b9566){const _0x7b38b9=_0x18cc3;super(),this[_0x7b38b9(0x1de)]=_0x1e39ea,this[_0x7b38b9(0x1dd)]=_0x59e74d,this[_0x7b38b9(0x1bf)]=_0x4d18f6,this[_0x7b38b9(0x12a)]=_0x1b9566;let {..._0x46fc60}=_0x5aceac({},Dt,this[_0x7b38b9(0x1de)]);this['_configService'][_0x7b38b9(0x1d9)](_0x7b38b9(0x1e5),_0x46fc60);}[_0x18cc3(0x1c6)](){const _0x49fcf6=_0x18cc3;this[_0x49fcf6(0x1dd)][_0x49fcf6(0x141)]([P]),this['_injector'][_0x49fcf6(0x141)]([L]),this[_0x49fcf6(0x1dd)][_0x49fcf6(0x141)]([X]),this[_0x49fcf6(0x1dd)][_0x49fcf6(0x141)]([Y]),this['_injector'][_0x49fcf6(0x141)]([Q]),this['_injector'][_0x49fcf6(0x141)]([Z]),_0xbb7c0c(this[_0x49fcf6(0x1dd)],[[P],[X],[Y],[Q],[Z]]),[ot,st,V,H,U,W,G,K,ct,lt][_0x49fcf6(0x14f)](_0x1ad708=>this['disposeWithMe'](this[_0x49fcf6(0x1bf)]['registerCommand'](_0x1ad708)));}};N($,_0x18cc3(0x1f4),y),N($,_0x18cc3(0x152),Tt),N($,_0x18cc3(0x105),Et),N($,_0x18cc3(0x1d1),_0x106590[_0x18cc3(0x1d8)]),$=I([_0x423cf2(_0x2a4fe0,_0xb2e160,_0x5d4396),F(0x1,_0x3f1c8b(_0x57b2b9)),F(0x2,_0x23d207),F(0x3,_0x3a9ecf)],$);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 _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};
package/lib/facade.js CHANGED
@@ -1 +1 @@
1
- var _0x3492e3=_0x3590;(function(_0x2b7966,_0x487a3b){var _0x10a53c=_0x3590,_0x209153=_0x2b7966();while(!![]){try{var _0x22c77f=-parseInt(_0x10a53c(0xe5))/0x1+parseInt(_0x10a53c(0x11f))/0x2*(parseInt(_0x10a53c(0xf7))/0x3)+-parseInt(_0x10a53c(0x11e))/0x4+parseInt(_0x10a53c(0xf3))/0x5*(-parseInt(_0x10a53c(0x126))/0x6)+-parseInt(_0x10a53c(0xf0))/0x7+parseInt(_0x10a53c(0x131))/0x8*(parseInt(_0x10a53c(0x11a))/0x9)+parseInt(_0x10a53c(0x121))/0xa;if(_0x22c77f===_0x487a3b)break;else _0x209153['push'](_0x209153['shift']());}catch(_0x58b967){_0x209153['push'](_0x209153['shift']());}}}(_0x4959,0xeb344));import{ConvertDocFormulaToTextCommand as _0x339487,DocFormulaDisplayTextService as _0x2b41fa,DocFormulaModel as _0x77e54a,DocFormulaService as _0x55c459,InsertDocFormulaCommand as _0x7c7e8,RemoveDocFormulaCommand as _0x4fa0cb,ReplaceDocFormulaWithTextCommand as _0x2886b8,SetDocFormulaNumberFormatCommand as _0x14812a,UpdateDocFormulaCommand as _0x21ddbb,isDocFormulaRange as _0x1792e8}from'@univerjs-pro/docs-formula';import{ICommandService as _0x19a590,IResourceLoaderService as _0x2722b5,IUniverInstanceService as _0x209cdd,Inject as _0x1b4738,UniverInstanceType as _0x482900}from'@univerjs/core';import{FDocument as _0xf7b689,FDocumentParagraph as _0x2d8bee,FDocumentTextRange as _0x56adcb}from'@univerjs/docs/facade';function v(_0x413c62,_0x301625){return function(_0x1387fd,_0xf7ecc6){_0x301625(_0x1387fd,_0xf7ecc6,_0x413c62);};}function y(_0xfee433,_0x4f8cd2,_0x249295,_0xb367b0){var _0x74ae1e=_0x3590,_0x24833b=arguments[_0x74ae1e(0x11d)],_0x5c0235=_0x24833b<0x3?_0x4f8cd2:_0xb367b0===null?_0xb367b0=Object[_0x74ae1e(0xf4)](_0x4f8cd2,_0x249295):_0xb367b0,_0x2fd10b;if(typeof Reflect==_0x74ae1e(0xed)&&typeof Reflect[_0x74ae1e(0x106)]==_0x74ae1e(0xff))_0x5c0235=Reflect['decorate'](_0xfee433,_0x4f8cd2,_0x249295,_0xb367b0);else{for(var _0x2f2a95=_0xfee433[_0x74ae1e(0x11d)]-0x1;_0x2f2a95>=0x0;_0x2f2a95--)(_0x2fd10b=_0xfee433[_0x2f2a95])&&(_0x5c0235=(_0x24833b<0x3?_0x2fd10b(_0x5c0235):_0x24833b>0x3?_0x2fd10b(_0x4f8cd2,_0x249295,_0x5c0235):_0x2fd10b(_0x4f8cd2,_0x249295))||_0x5c0235);}return _0x24833b>0x3&&_0x5c0235&&Object[_0x74ae1e(0x10a)](_0x4f8cd2,_0x249295,_0x5c0235),_0x5c0235;}let b=class{constructor(_0x3bfa3b,_0x17c0cf,_0x3943db,_0x37e287,_0x3208a4,_0x54d466){var _0xa16208=_0x3590;this[_0xa16208(0x12a)]=_0x3bfa3b,this[_0xa16208(0xfc)]=_0x17c0cf,this['_commandService']=_0x3943db,this['_model']=_0x37e287,this[_0xa16208(0x120)]=_0x3208a4,this[_0xa16208(0x100)]=_0x54d466;}[_0x3492e3(0x123)](){return this['_rangeId'];}[_0x3492e3(0x104)](){var _0x1934d9=_0x3492e3;let _0x13acf2=this['_getCustomRange']();return _0x13acf2?{'endOffset':_0x13acf2[_0x1934d9(0x111)]+0x1,'rangeId':_0x13acf2['rangeId'],'startOffset':_0x13acf2[_0x1934d9(0x12d)]}:null;}[_0x3492e3(0xe8)](){var _0x305516=_0x3492e3,_0x1969a6;return((_0x1969a6=this[_0x305516(0xf1)][_0x305516(0xe8)](this['_unitId'],this[_0x305516(0xfc)]))==null?void 0x0:_0x1969a6[_0x305516(0xe6)])??'';}[_0x3492e3(0x110)](){var _0x2c8702=_0x3492e3;return this[_0x2c8702(0xf1)][_0x2c8702(0xe8)](this[_0x2c8702(0x12a)],this[_0x2c8702(0xfc)])??null;}[_0x3492e3(0x122)](){var _0x44a804=_0x3492e3;return this['_service']['getResult']({'unitId':this[_0x44a804(0x12a)],'rangeId':this[_0x44a804(0xfc)]})??null;}[_0x3492e3(0x107)](){var _0x43107d=_0x3492e3;let _0x5b6d5b=this[_0x43107d(0x104)](),_0x4376a9=this['getConfig'](),_0x4c06ff=this[_0x43107d(0x122)]();return!_0x5b6d5b||!_0x4376a9||!_0x4c06ff?null:{..._0x5b6d5b,'config':_0x4376a9,'formula':_0x4376a9[_0x43107d(0xe6)],'result':_0x4c06ff,'type':_0x43107d(0xe6)};}[_0x3492e3(0x134)](_0x424aff){var _0x32b2fa=_0x3492e3;return this[_0x32b2fa(0xfa)]['syncExecuteCommand'](_0x21ddbb['id'],{'externalReferences':_0x424aff['externalReferences'],'formula':_0x424aff[_0x32b2fa(0xe6)],'numberFormat':_0x424aff[_0x32b2fa(0x12e)],'rangeId':this[_0x32b2fa(0xfc)],'unitId':this[_0x32b2fa(0x12a)]});}['setNumberFormat'](_0x3b2a3b){var _0x7e90ac=_0x3492e3;return this[_0x7e90ac(0xfa)][_0x7e90ac(0x10e)](_0x14812a['id'],{'numberFormat':_0x3b2a3b,'rangeId':this[_0x7e90ac(0xfc)],'unitId':this['_unitId']});}[_0x3492e3(0x118)](){return this['_commandService']['syncExecuteCommand'](_0x4fa0cb['id'],{'rangeId':this['_rangeId'],'unitId':this['_unitId']});}[_0x3492e3(0xec)](_0x2b0646){var _0xc22827=_0x3492e3;return this[_0xc22827(0xfa)][_0xc22827(0x10e)](_0x2886b8['id'],{'rangeId':this[_0xc22827(0xfc)],'text':_0x2b0646,'unitId':this['_unitId']});}[_0x3492e3(0x10f)](){var _0x950ff6=_0x3492e3;return this[_0x950ff6(0xfa)][_0x950ff6(0x10e)](_0x339487['id'],{'rangeId':this[_0x950ff6(0xfc)],'unitId':this[_0x950ff6(0x12a)]});}[_0x3492e3(0x10b)](){var _0x23a512=_0x3492e3,_0x5cbb2b;let _0x48ca18=this['_univerInstanceService'][_0x23a512(0x108)](this['_unitId'],_0x482900[_0x23a512(0x129)]);return _0x48ca18==null||(_0x5cbb2b=_0x48ca18['getSnapshot']()[_0x23a512(0x117)])==null||(_0x5cbb2b=_0x5cbb2b[_0x23a512(0xf9)])==null?void 0x0:_0x5cbb2b[_0x23a512(0x112)](_0x55ed6e=>_0x55ed6e[_0x23a512(0xea)]===this[_0x23a512(0xfc)]&&_0x1792e8(_0x55ed6e));}};b=y([v(0x2,_0x19a590),v(0x3,_0x1b4738(_0x77e54a)),v(0x4,_0x1b4738(_0x55c459)),v(0x5,_0x209cdd)],b);function x(_0x3f2c55){'@babel/helpers - typeof';var _0x5c577c=_0x3492e3;return x=typeof Symbol==_0x5c577c(0xff)&&typeof Symbol[_0x5c577c(0x102)]=='symbol'?function(_0x5ce47c){return typeof _0x5ce47c;}:function(_0x152fe4){var _0x17c4c9=_0x5c577c;return _0x152fe4&&typeof Symbol==_0x17c4c9(0xff)&&_0x152fe4[_0x17c4c9(0xfd)]===Symbol&&_0x152fe4!==Symbol[_0x17c4c9(0x115)]?'symbol':typeof _0x152fe4;},x(_0x3f2c55);}function _0x4959(){var _0x463b8d=['277670mWXKPz','getOwnPropertyDescriptor','getBody','extend','2043033PAgojJ','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','customRanges','_commandService','saveUnit','_rangeId','constructor','string','function','_univerInstanceService','_createFormula','iterator','_getCompleteRanges','getRange','_insert','decorate','describe','getUnit','insertFormula','defineProperty','_getCustomRange','range','_docsFormulaDisplayTextService','syncExecuteCommand','convertToText','getConfig','endIndex','find','saveFormulaDisplayTextSnapshot','paragraph','prototype','startOffset','body','remove','_injector','126lTOuJh','_docsFormulaCommandService','Document\x20','length','2028888XOhLSe','4lKOnNX','_service','5706320QNmJZO','getResult','getId','toPrimitive','symbol','48ygwOor','some','default','UNIVER_DOC','_unitId','_docsFormulaModel','_initialize','startIndex','numberFormat','getSegmentId','createInstance','869664eMmzZx','get','map','update','634978UUCvvd','formula','getFormulaAt','getFormula','_document','rangeId','externalReferences','replaceWithText','object','getFormulas','_docsFormulaResourceLoaderService','6332886FugVSl','_model','call'];_0x4959=function(){return _0x463b8d;};return _0x4959();}function S(_0x4a257a,_0x3299e7){var _0x38630e=_0x3492e3;if(x(_0x4a257a)!=_0x38630e(0xed)||!_0x4a257a)return _0x4a257a;var _0x537ab0=_0x4a257a[Symbol[_0x38630e(0x124)]];if(_0x537ab0!==void 0x0){var _0xeffd31=_0x537ab0[_0x38630e(0xf2)](_0x4a257a,_0x3299e7||_0x38630e(0x128));if(x(_0xeffd31)!='object')return _0xeffd31;throw TypeError(_0x38630e(0xf8));}return(_0x3299e7===_0x38630e(0xfe)?String:Number)(_0x4a257a);}function C(_0x12a192){var _0x40e709=_0x3492e3,_0xa39196=S(_0x12a192,_0x40e709(0xfe));return x(_0xa39196)==_0x40e709(0x125)?_0xa39196:_0xa39196+'';}function w(_0x2779c1,_0x2a81dd,_0x16c3ad){var _0x38a02d=_0x3492e3;return(_0x2a81dd=C(_0x2a81dd))in _0x2779c1?Object[_0x38a02d(0x10a)](_0x2779c1,_0x2a81dd,{'value':_0x16c3ad,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x2779c1[_0x2a81dd]=_0x16c3ad,_0x2779c1;}var T=class extends _0xf7b689{constructor(..._0x43bb30){var _0x4dce8a=_0x3492e3;super(..._0x43bb30),w(this,_0x4dce8a(0x11b),void 0x0),w(this,_0x4dce8a(0x10d),void 0x0),w(this,_0x4dce8a(0x12b),void 0x0),w(this,_0x4dce8a(0xef),void 0x0);}[_0x3492e3(0x12c)](_0x2de1e1){var _0x361857=_0x3492e3;this[_0x361857(0x11b)]=_0x2de1e1[_0x361857(0x132)](_0x19a590),this[_0x361857(0x10d)]=_0x2de1e1[_0x361857(0x132)](_0x2b41fa),this[_0x361857(0x12b)]=_0x2de1e1[_0x361857(0x132)](_0x77e54a),this[_0x361857(0xef)]=_0x2de1e1[_0x361857(0x132)](_0x2722b5);}[_0x3492e3(0xee)](){var _0x5e7054=_0x3492e3;return this[_0x5e7054(0x103)]()[_0x5e7054(0x133)](_0x3a9563=>this[_0x5e7054(0x101)](_0x3a9563[_0x5e7054(0xea)]));}[_0x3492e3(0xe8)](_0x4cdc89){var _0x3adadf=_0x3492e3;return this['_getCompleteRanges']()[_0x3adadf(0x127)](_0x4ea8bb=>_0x4ea8bb[_0x3adadf(0xea)]===_0x4cdc89)?this[_0x3adadf(0x101)](_0x4cdc89):null;}[_0x3492e3(0xe7)](_0x3cd1ee){var _0x59df4c=_0x3492e3;let _0x2846aa=this[_0x59df4c(0x103)]()[_0x59df4c(0x112)](_0x3d1a2e=>_0x3d1a2e[_0x59df4c(0x12d)]<=_0x3cd1ee&&_0x3cd1ee<=_0x3d1a2e[_0x59df4c(0x111)]);return _0x2846aa?this[_0x59df4c(0x101)](_0x2846aa['rangeId']):null;}[_0x3492e3(0x113)](){var _0x5ba2f3=_0x3492e3;let _0x3d87e2=this[_0x5ba2f3(0xef)][_0x5ba2f3(0xfb)](this['id']);if(!_0x3d87e2)throw Error(_0x5ba2f3(0x11c)+this['id']+'\x20could\x20not\x20be\x20serialized.');return this[_0x5ba2f3(0x10d)]['degradeDocumentData'](_0x3d87e2);}[_0x3492e3(0x109)](_0xe7d332){var _0x5c14dd=_0x3492e3;return this[_0x5c14dd(0x105)]({'externalReferences':_0xe7d332['externalReferences'],'formula':_0xe7d332[_0x5c14dd(0xe6)],'numberFormat':_0xe7d332['numberFormat'],'target':{'type':_0x5c14dd(0x10c),'startOffset':_0xe7d332[_0x5c14dd(0x116)],'endOffset':_0xe7d332['endOffset']},'unitId':this['getId']()});}['_insert'](_0x18c488){var _0xf996b2=_0x3492e3;let _0x59511d=this[_0xf996b2(0x11b)][_0xf996b2(0x10e)](_0x7c7e8['id'],_0x18c488);return _0x59511d?this[_0xf996b2(0x101)](_0x59511d['rangeId']):null;}[_0x3492e3(0x103)](){var _0x51e83e=_0x3492e3,_0x22e9c2;let _0x243858=this[_0x51e83e(0x12b)][_0x51e83e(0xee)](this['getId']());return((_0x22e9c2=this[_0x51e83e(0xf5)]('')[_0x51e83e(0xf9)])==null?void 0x0:_0x22e9c2['filter'](_0x533981=>_0x1792e8(_0x533981)&&_0x243858[_0x533981[_0x51e83e(0xea)]]!=null))??[];}['_createFormula'](_0x510953){var _0x57cc1e=_0x3492e3;return this[_0x57cc1e(0x119)]['createInstance'](b,this['getId'](),_0x510953);}};_0xf7b689['extend'](T);var E=class extends _0x2d8bee{constructor(..._0x3d6cee){super(..._0x3d6cee),w(this,'_docsFormulaCommandService',void 0x0);}[_0x3492e3(0x12c)](_0x4bcd6f){var _0x1fc635=_0x3492e3;this[_0x1fc635(0x11b)]=_0x4bcd6f[_0x1fc635(0x132)](_0x19a590);}[_0x3492e3(0x109)](_0x28ab97,_0x131e34,_0x52c844={}){var _0x546035=_0x3492e3;return this[_0x546035(0x105)](_0x28ab97,_0x131e34,_0x52c844);}['appendFormula'](_0x54dcc0,_0x2a72a6={}){var _0x20ff4f=_0x3492e3;return this[_0x20ff4f(0x105)]('end',_0x54dcc0,_0x2a72a6);}[_0x3492e3(0x105)](_0x487cec,_0x3fd6d2,_0x37c160){var _0x56bf59=_0x3492e3;if(this[_0x56bf59(0x12f)]())return null;let _0x2a32cf={'externalReferences':_0x37c160[_0x56bf59(0xeb)],'formula':_0x3fd6d2,'numberFormat':_0x37c160[_0x56bf59(0x12e)],'target':{'type':_0x56bf59(0x114),'paragraphId':this['getId'](),'position':_0x487cec},'unitId':this[_0x56bf59(0xe9)][_0x56bf59(0x123)]()},_0x1127a7=this[_0x56bf59(0x11b)][_0x56bf59(0x10e)](_0x7c7e8['id'],_0x2a32cf);return _0x1127a7?this[_0x56bf59(0x119)][_0x56bf59(0x130)](b,this[_0x56bf59(0xe9)]['getId'](),_0x1127a7[_0x56bf59(0xea)]):null;}};_0x2d8bee[_0x3492e3(0xf6)](E);var D=class extends _0x56adcb{constructor(..._0x1006e0){var _0xa644a=_0x3492e3;super(..._0x1006e0),w(this,_0xa644a(0x11b),void 0x0);}['_initialize'](_0x239515){var _0x521f98=_0x3492e3;this[_0x521f98(0x11b)]=_0x239515[_0x521f98(0x132)](_0x19a590);}['replaceWithFormula'](_0xc3b4d4,_0x194ad8={}){var _0x485e36=_0x3492e3;let {endOffset:_0x311464,segmentId:_0x5034f8,startOffset:_0x5df12b}=this[_0x485e36(0x104)]();return _0x5034f8?null:this[_0x485e36(0x105)](_0x5df12b,_0x311464,_0xc3b4d4,_0x194ad8);}['_insert'](_0xfe8929,_0x1f25b4,_0x515eda,_0x503092){var _0x22b393=_0x3492e3;let _0x4fc73d={'externalReferences':_0x503092[_0x22b393(0xeb)],'formula':_0x515eda,'numberFormat':_0x503092[_0x22b393(0x12e)],'target':{'type':'range','startOffset':_0xfe8929,'endOffset':_0x1f25b4},'unitId':this[_0x22b393(0xe9)][_0x22b393(0x123)]()},_0xffa735=this['_docsFormulaCommandService'][_0x22b393(0x10e)](_0x7c7e8['id'],_0x4fc73d);return _0xffa735?this[_0x22b393(0x119)][_0x22b393(0x130)](b,this[_0x22b393(0xe9)][_0x22b393(0x123)](),_0xffa735['rangeId']):null;}};function _0x3590(_0x17e39c,_0xeeaaf4){_0x17e39c=_0x17e39c-0xe5;var _0x4959d7=_0x4959();var _0x35906f=_0x4959d7[_0x17e39c];return _0x35906f;}_0x56adcb[_0x3492e3(0xf6)](D);export{b as FDocumentFormula};
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};