@univerjs-pro/docs-formula 1.3.1 → 1.5.0

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 _0x217dd1=_0x28ce;(function(_0x46f8fe,_0x367206){const _0x4b8495=_0x28ce,_0x539628=_0x46f8fe();while(!![]){try{const _0x49ee4b=parseInt(_0x4b8495(0x1a9))/0x1*(-parseInt(_0x4b8495(0x185))/0x2)+-parseInt(_0x4b8495(0x1d4))/0x3+-parseInt(_0x4b8495(0x1a3))/0x4+-parseInt(_0x4b8495(0x216))/0x5*(-parseInt(_0x4b8495(0x1f7))/0x6)+parseInt(_0x4b8495(0x15d))/0x7+parseInt(_0x4b8495(0x176))/0x8+parseInt(_0x4b8495(0x16f))/0x9;if(_0x49ee4b===_0x367206)break;else _0x539628['push'](_0x539628['shift']());}catch(_0x525b63){_0x539628['push'](_0x539628['shift']());}}}(_0x2a6f,0x27eb7));import{FormulaCacheEligibilityService as _0x4f9c1c,FormulaLastValuePersistenceService as _0x12a840,HostExternalReferenceModel as _0x506168,UniverProFormulaEnginePlugin as _0x5bf116,buildUpsertHostExternalReferenceMutations as _0x41a736,collectFormulaExternalReferenceQualifiers as _0x7f61b,getScalarFormulaResultCell as _0x2973cb,resolveFormulaResultPresentation as _0x27458f,resolveHostFormulaExternalReferences as _0x4805eb,toFormulaLastValue as _0x1b8769}from'@univerjs-pro/engine-formula';function _0x2a6f(){const _0x5001ba=['resourceUndo','decorate','_syncScheduled','function','registerFormulaWithRange','paragraphs','documentRedo','_docFormulaModel','getUnitId','BLOCK_START','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','resources','removeUnit','documentData','sectionBreaks','some','min','params','name','customDecorations','MUTATION','stale','_presentationChanged$','resolveBinding','resource','start','set','@univerjs-pro/docs-formula','1212504ZGGcLS','segmentId','filter','includes','registerCommand','undoMutation','1fWHpzb','docs-formula.command.replace-with-text','formula','ERROR','docs-formula.mutation.set-last-values','pending','getCurrentUnitOfType','getPresentation','COLUMN_GROUP_START','forEach','docs-formula.command.update','_loadErrors','startsWith','COLUMN_START','_registrations','CUSTOM_BLOCK','sort','config','delete','removeFormula','setResource','_registrationService','selection','packageName','disabled','TABLE_ROW_START','deepClone','prototype','_change$','startOffset','_deleteRegistration','identity','referenceRevision','subscribe','serialize','resourceRedo','textRuns','columnGroups','_commandService','replaceDocRanges','resolveText','cursorOffset','COLUMN_GROUP_END','401436FfHSeE','iterator','BLOCK_END','formulas','asObservable','rangeType','lastValue','setFormula','_configService','docs-formula.command.remove','trim','customBlocks','onStarting','keys','add','register','_formulaService','TABLE_CELL_START','resolveFormula','startIndex','_preserveInvalid','setConfig','object','properties','onCommandExecuted','_resourceManagerService','_pendingUnitIds','_setPresentation','expectedNumberFormat','syncUnit','TABLE_END','TABLE_START','PENDING','has','nextDocumentData','678WPGouz','load','insertLength','getResource','_service','endIndex','toPrimitive','type','_syncUnit','setFormulas','text','liveResult','range','externalReferences','getRegisteredFormulas','tables','formulaId','_config','registerProvider','source','values','pluginName','_hostExternalReferenceModel','kind','success','customRanges','document','SECTION_BREAK','getFormula','unregister','cell','10445LWiqKQ','SUCCESS','registerPluginResource','accessor','target','call','eligible','clear','parse','get','body','change$','empty','COMMAND','EMPTY','fromEntries','complete','wholeEntity','pattern','_isDisposed','presentationChanged$','degradeBody','getRevision','defineProperty','string','_formulaKeys','paragraphId','presentation','1.3.1','color','blockRanges','_model','_rawResources','univer-docs-formula','docs-formula.command.insert','insert','model','push','getResult','schemaVersion','endsWith','rangeId','previousResource','Document\x20main\x20body\x20is\x20required\x20to\x20insert\x20Doc\x20Formula.','disposeWithMe','PARAGRAPH','COLUMN_END','getAllUnitsForType','default','notifyTextChanged','isInteger','trigger','max','symbol','_injector','assess','DOC','pushUndoRedo','previousDocumentData','dataStream','docs-formula.mutation.remove-formula','every','DOC_FORMULA_PLUGIN','_resources','updates','nextResource','from','externalMutations','dispose','934423hyRHut','paragraph','slice','getFormulaValueSync','position','_instanceService','unsupported-version','map','unitDisposed$','_updateFormulaResult','error','docs-formula.mutation.set-resource','getSnapshot','redoMutation','_cacheEligibilityService','getUnit','assign','Doc\x20Formula\x20range\x20cannot\x20cross\x20document\x20structure\x20boundaries','4028418nDJBBX','syncExecuteCommand','length','endOffset','unitId','find','expectedFormula','188096Hblvxl','docs-formula.config','next','numberFormat','references','status','unregisterUnit','expectedReferenceRevision','getInstance','UNIVER_DOC','resolved','data','getFormulas','entries','_queueSync','480422kVEUoa','boolean'];_0x2a6f=function(){return _0x5001ba;};return _0x2a6f();}import{CellValueType as _0xddeba6,CommandType as _0x5f1099,CustomRangeType as _0xa7b507,DataStreamTreeTokenType as _0x303d23,DependentOn as _0x4eb3b4,Disposable as _0x18377d,ICommandService as _0x41c106,IConfigService as _0x35fc54,IResourceManagerService as _0x2d200b,IUndoRedoService as _0xe640ba,IUniverInstanceService as _0x147b46,Inject as _0x5e32df,Injector as _0x11059a,JSONX as _0x267617,Plugin as _0x2b73e4,TextX as _0x52174a,Tools as _0x4b0aab,UniverInstanceType as _0x138c8e,generateRandomId as _0x25429d,getBodySliceForTextXAction as _0x252b2a,getCustomRangeInterval as _0x1c91d3,getParagraphContentStartOffset as _0x480edf,getRichTextEditPath as _0x2ed637,merge as _0x59447c,shiftExclusiveRangeOnDelete as _0x24c8e7,shiftExclusiveRangeOnInsert as _0x7fd50e,shiftInclusiveRangeOnDelete as _0x23a1d4,shiftInclusiveRangeOnInsert as _0x4fc859,touchDependencies as _0x53385a}from'@univerjs/core';import{DOC_SELECTION_OPTION_PRESERVE_CARET as _0x173f0a,DocSelectionManagerService as _0x3e1e55,DocTextResolverService as _0xbd430a,RichTextEditingMutation as _0x2dc975,UniverDocsPlugin as _0x50ecdf}from'@univerjs/docs';import{FormulaResultStatus as _0x5815e0,LexerTreeBuilder as _0x3a97e6,OtherFormulaBizType as _0x3508be,RegisterOtherFormulaService as _0x51a6f6}from'@univerjs/engine-formula';import{Subject as _0x2b03f3}from'rxjs';import{UniverLicensePlugin as _0x3855ef}from'@univerjs-pro/license';const y=_0x217dd1(0x156),je=0x1,Me=_0x217dd1(0x237),Ne='';function b(){return{'schemaVersion':0x1,'formulas':{}};}function x(_0x33a8b7){const _0x36fccf=_0x217dd1;return!_0x33a8b7||typeof _0x33a8b7!=_0x36fccf(0x1ea)||!S(_0x33a8b7,['schemaVersion','formulas'])||!(_0x36fccf(0x23d)in _0x33a8b7)||_0x33a8b7[_0x36fccf(0x23d)]!==0x1||!(_0x36fccf(0x1d7)in _0x33a8b7)||!_0x33a8b7[_0x36fccf(0x1d7)]||typeof _0x33a8b7['formulas']!=_0x36fccf(0x1ea)||Array['isArray'](_0x33a8b7[_0x36fccf(0x1d7)])?!0x1:Object[_0x36fccf(0x183)](_0x33a8b7[_0x36fccf(0x1d7)])[_0x36fccf(0x155)](([_0x6631b6,_0x370f0d])=>_0x6631b6[_0x36fccf(0x171)]>0x0&&Pe(_0x370f0d));}function Pe(_0x3a0550){const _0xd093a5=_0x217dd1;return!_0x3a0550||typeof _0x3a0550!=_0xd093a5(0x1ea)||!S(_0x3a0550,['formula',_0xd093a5(0x179),_0xd093a5(0x1da)])||!('formula'in _0x3a0550)||typeof _0x3a0550[_0xd093a5(0x1ab)]!=_0xd093a5(0x22e)||!_0x3a0550[_0xd093a5(0x1ab)][_0xd093a5(0x1de)]()||_0xd093a5(0x179)in _0x3a0550&&_0x3a0550['numberFormat']!=null&&(typeof _0x3a0550[_0xd093a5(0x179)]!=_0xd093a5(0x1ea)||!S(_0x3a0550[_0xd093a5(0x179)],['pattern'])||!('pattern'in _0x3a0550[_0xd093a5(0x179)])||typeof _0x3a0550[_0xd093a5(0x179)]['pattern']!=_0xd093a5(0x22e))?!0x1:!(_0xd093a5(0x1da)in _0x3a0550)||_0x3a0550['lastValue']==null||Fe(_0x3a0550[_0xd093a5(0x1da)]);}function Fe(_0x3ebafb){const _0x41a85e=_0x217dd1;return!_0x3ebafb||typeof _0x3ebafb!=_0x41a85e(0x1ea)||!S(_0x3ebafb,['v','t','pattern'])||!('v'in _0x3ebafb)||_0x3ebafb['v']!==null&&typeof _0x3ebafb['v']!=_0x41a85e(0x22e)&&typeof _0x3ebafb['v']!='number'&&typeof _0x3ebafb['v']!=_0x41a85e(0x186)||'t'in _0x3ebafb&&_0x3ebafb['t']!=null&&!Ie(_0x3ebafb['t'])?!0x1:!(_0x41a85e(0x228)in _0x3ebafb)||_0x3ebafb[_0x41a85e(0x228)]==null||typeof _0x3ebafb[_0x41a85e(0x228)]=='string';}function S(_0x5b0a55,_0x8a7a09){const _0x468ad9=_0x217dd1;let _0x3d2801=new Set(_0x8a7a09);return Object[_0x468ad9(0x1e1)](_0x5b0a55)[_0x468ad9(0x155)](_0x27fb88=>_0x3d2801[_0x468ad9(0x1f5)](_0x27fb88));}function Ie(_0x11b8d7){const _0x409c5b=_0x217dd1;return typeof _0x11b8d7=='number'&&Object[_0x409c5b(0x20b)](_0xddeba6)['includes'](_0x11b8d7);}const Le=new Set([_0x303d23[_0x217dd1(0x212)],_0x303d23[_0x217dd1(0x1f3)],_0x303d23[_0x217dd1(0x1c2)],_0x303d23[_0x217dd1(0x1e5)],_0x303d23['TABLE_CELL_END'],_0x303d23['TABLE_ROW_END'],_0x303d23[_0x217dd1(0x1f2)],_0x303d23[_0x217dd1(0x1b1)],_0x303d23[_0x217dd1(0x1b6)],_0x303d23[_0x217dd1(0x146)],_0x303d23[_0x217dd1(0x1d3)],_0x303d23[_0x217dd1(0x190)],_0x303d23[_0x217dd1(0x1d6)],_0x303d23[_0x217dd1(0x1b8)]]);var C=class extends Error{constructor(){const _0x20acbb=_0x217dd1;super(_0x20acbb(0x16e));}};function Re(_0x4a6acb){const _0x4419c5=_0x217dd1;var _0x1ba3ff,_0x411f1a;let _0x49217f=_0x4b0aab[_0x4419c5(0x1c3)](_0x4a6acb[_0x4419c5(0x194)]),_0x5c4c05=j(_0x49217f),{startOffset:_0x1871ab,endOffset:_0x32eb06}=We(_0x5c4c05,_0x4a6acb[_0x4419c5(0x1c6)],_0x4a6acb[_0x4419c5(0x172)]);He(_0x5c4c05,_0x1871ab,_0x32eb06);let _0x327859=((_0x1ba3ff=_0x5c4c05[_0x4419c5(0x210)])==null?void 0x0:_0x1ba3ff[_0x4419c5(0x1a5)](_0x17b629=>{const _0x59dd0c=_0x4419c5;if(!w(_0x17b629))return!0x1;let _0x1b1cea=_0x1c91d3(_0x17b629);return _0x1b1cea[_0x59dd0c(0x172)]>_0x1871ab&&_0x1b1cea[_0x59dd0c(0x1c6)]<_0x32eb06;})[_0x4419c5(0x164)](_0x4e9a92=>_0x4e9a92[_0x4419c5(0x141)]))??[];qe(_0x5c4c05,_0x1871ab,_0x32eb06,''),_0x5c4c05[_0x4419c5(0x210)]=[...((_0x411f1a=_0x5c4c05['customRanges'])==null?void 0x0:_0x411f1a[_0x4419c5(0x1a5)](_0x2ffe1c=>!_0x327859[_0x4419c5(0x1a6)](_0x2ffe1c[_0x4419c5(0x141)])&&_0x2ffe1c[_0x4419c5(0x141)]!==_0x4a6acb['rangeId']))??[],Ue(_0x4a6acb['rangeId'],_0x1871ab)][_0x4419c5(0x1b9)]((_0x52181d,_0x4b8459)=>_0x52181d[_0x4419c5(0x1e7)]-_0x4b8459[_0x4419c5(0x1e7)]);let _0x5e8aba=E(_0x4a6acb[_0x4419c5(0x19f)]);return _0x327859[_0x4419c5(0x1b2)](_0x4d61e3=>{const _0x4c2845=_0x4419c5;delete _0x5e8aba[_0x4c2845(0x1d7)][_0x4d61e3];}),_0x5e8aba['formulas'][_0x4a6acb[_0x4419c5(0x141)]]=_0x4b0aab[_0x4419c5(0x1c3)](_0x4a6acb[_0x4419c5(0x1ba)]),{'nextDocumentData':_0x49217f,'nextResource':_0x5e8aba,'cursorOffset':_0x1871ab+0x1};}function ze(_0x2a5355){const _0x305353=_0x217dd1;var _0x52a14b,_0x8e6589;let _0x3155b6=_0x4b0aab[_0x305353(0x1c3)](_0x2a5355[_0x305353(0x194)]),_0x4e7961=(_0x52a14b=j(_0x3155b6)[_0x305353(0x210)])==null?void 0x0:_0x52a14b[_0x305353(0x174)](_0x2bf86a=>_0x2bf86a[_0x305353(0x141)]===_0x2a5355['rangeId']&&w(_0x2bf86a));if(!_0x4e7961||!((_0x8e6589=_0x2a5355[_0x305353(0x19f)])!=null&&_0x8e6589['formulas'][_0x2a5355[_0x305353(0x141)]]))return null;let _0x28ee8e=E(_0x2a5355[_0x305353(0x19f)]);return _0x28ee8e[_0x305353(0x1d7)][_0x2a5355['rangeId']]=_0x4b0aab[_0x305353(0x1c3)](_0x2a5355[_0x305353(0x1ba)]),{'nextDocumentData':_0x3155b6,'nextResource':_0x28ee8e,'cursorOffset':_0x4e7961[_0x305353(0x1fc)]+0x1};}function Be(_0x4a14ed){const _0x3cd6cd=_0x217dd1;let _0x31de7a=_0x4b0aab[_0x3cd6cd(0x1c3)](_0x4a14ed['documentData']),_0x869cfd=Je(_0x31de7a,_0x4a14ed[_0x3cd6cd(0x141)],_0x4a14ed['text']??'');if(_0x869cfd==null)return null;let _0x347600=E(_0x4a14ed[_0x3cd6cd(0x19f)]);return delete _0x347600['formulas'][_0x4a14ed[_0x3cd6cd(0x141)]],{'nextDocumentData':_0x31de7a,'nextResource':_0x347600,'cursorOffset':_0x869cfd};}function Ve(_0x29c320,_0xf9c3a3){const _0x50ccbe=_0x217dd1;var _0x1c1ec1;let _0x3bcd60=_0x4b0aab[_0x50ccbe(0x1c3)](_0x29c320),_0x73ac89=_0x3bcd60['body'];if(!_0x73ac89)return _0x3bcd60;let _0x106e29=new Map(_0xf9c3a3[_0x50ccbe(0x164)](_0x182596=>[_0x182596['rangeId'],_0x182596[_0x50ccbe(0x201)]])),_0x418691=((_0x1c1ec1=_0x73ac89[_0x50ccbe(0x210)])==null?void 0x0:_0x1c1ec1[_0x50ccbe(0x1a5)](_0x547723=>w(_0x547723)&&_0x106e29['has'](_0x547723['rangeId']))[_0x50ccbe(0x1b9)]((_0x342876,_0x44931a)=>_0x44931a[_0x50ccbe(0x1e7)]-_0x342876[_0x50ccbe(0x1e7)]))??[];for(let _0x5162cd of _0x418691)Je(_0x3bcd60,_0x5162cd[_0x50ccbe(0x141)],_0x106e29[_0x50ccbe(0x21f)](_0x5162cd[_0x50ccbe(0x141)])??'');return _0x3bcd60;}function w(_0xc40f0d){const _0x31a015=_0x217dd1;var _0x4a24ad;return(_0xc40f0d==null?void 0x0:_0xc40f0d[_0x31a015(0x1d9)])===_0xa7b507['CUSTOM']&&_0xc40f0d[_0x31a015(0x227)]===!0x0&&((_0x4a24ad=_0xc40f0d[_0x31a015(0x1eb)])==null?void 0x0:_0x4a24ad[_0x31a015(0x20e)])==='univer-docs-formula';}function T(_0x572dc0,_0x79dd3c){const _0x33104d=_0x217dd1;var _0x452856;return _0x572dc0==null||(_0x452856=_0x572dc0['customRanges'])==null?void 0x0:_0x452856[_0x33104d(0x174)](_0x6bd752=>_0x6bd752[_0x33104d(0x141)]===_0x79dd3c&&w(_0x6bd752));}function He(_0x4a2854,_0x564262,_0x424f1b){const _0x59d0cf=_0x217dd1;if(_0x564262===_0x424f1b){if(Le[_0x59d0cf(0x1f5)](_0x4a2854['dataStream'][_0x564262]))throw new C();}else{for(let _0x424c5f=_0x564262;_0x424c5f<_0x424f1b;_0x424c5f++)if(_0x4a2854['dataStream'][_0x424c5f]===_0x303d23[_0x59d0cf(0x145)]||Le[_0x59d0cf(0x1f5)](_0x4a2854[_0x59d0cf(0x153)][_0x424c5f]))throw new C();}}function Ue(_0x30aca8,_0x47649f){return{'startIndex':_0x47649f,'endIndex':_0x47649f,'rangeId':_0x30aca8,'rangeType':_0xa7b507['CUSTOM'],'wholeEntity':!0x0,'properties':{'kind':Me}};}function E(_0x3f848f){const _0x19fd63=_0x217dd1;return _0x3f848f?_0x4b0aab[_0x19fd63(0x1c3)](_0x3f848f):b();}function We(_0x2a0fc2,_0x3dc998,_0x53b50b){const _0x3cde51=_0x217dd1;let _0x215701=Ke(_0x2a0fc2),_0x242159=_0x3dc998??_0x215701,_0x188ab8=_0x53b50b??_0x242159;return{'startOffset':Ge(Math['min'](_0x242159,_0x188ab8),_0x215701),'endOffset':Ge(Math[_0x3cde51(0x14c)](_0x242159,_0x188ab8),_0x215701)};}function Ge(_0x277a78,_0x222d67){const _0x160741=_0x217dd1;return Math[_0x160741(0x14c)](0x0,Math['min'](_0x277a78,_0x222d67));}function Ke(_0x2270fa){const _0x2ae970=_0x217dd1;return _0x2270fa[_0x2ae970(0x153)][_0x2ae970(0x140)](''+_0x303d23[_0x2ae970(0x145)]+_0x303d23[_0x2ae970(0x212)])?Math['max'](0x0,_0x2270fa['dataStream']['length']-0x2):_0x2270fa[_0x2ae970(0x153)][_0x2ae970(0x140)](_0x303d23[_0x2ae970(0x212)])?Math[_0x2ae970(0x14c)](0x0,_0x2270fa[_0x2ae970(0x153)]['length']-0x1):_0x2270fa[_0x2ae970(0x153)]['length'];}function qe(_0x25059b,_0xe6d068,_0x4a96d8,_0x2017aa){_0x4a96d8>_0xe6d068&&Xe(_0x25059b,_0xe6d068,_0x4a96d8),Ye(_0x25059b,_0xe6d068,_0x2017aa);}function Je(_0x408d34,_0x69f0e5,_0xe2f4ab){const _0x523e11=_0x217dd1;var _0x247000,_0x158924;let _0x9857d=j(_0x408d34),_0x47d4b1=(_0x247000=_0x9857d[_0x523e11(0x210)])==null?void 0x0:_0x247000[_0x523e11(0x174)](_0x7e0de8=>_0x7e0de8[_0x523e11(0x141)]===_0x69f0e5&&w(_0x7e0de8));if(!_0x47d4b1)return null;let _0x1589a2=_0x1c91d3(_0x47d4b1);return qe(_0x9857d,_0x1589a2[_0x523e11(0x1c6)],_0x1589a2['endOffset'],_0xe2f4ab),_0x9857d[_0x523e11(0x210)]=(_0x158924=_0x9857d[_0x523e11(0x210)])==null?void 0x0:_0x158924['filter'](_0x423e53=>_0x423e53['rangeId']!==_0x69f0e5),_0x1589a2['startOffset']+_0xe2f4ab[_0x523e11(0x171)];}function Ye(_0x2dd341,_0x4333b2,_0x4bf980){const _0x392e9f=_0x217dd1;_0x4bf980&&(_0x2dd341['dataStream']=''+_0x2dd341[_0x392e9f(0x153)]['slice'](0x0,_0x4333b2)+_0x4bf980+_0x2dd341['dataStream'][_0x392e9f(0x15f)](_0x4333b2),Ze(_0x2dd341,_0x4333b2,_0x4bf980['length']));}function Xe(_0x705dfb,_0xeb8d48,_0x3da25b){const _0x2f6c5f=_0x217dd1;let _0x4bc73e=_0x3da25b-_0xeb8d48;_0x705dfb[_0x2f6c5f(0x153)]=''+_0x705dfb[_0x2f6c5f(0x153)]['slice'](0x0,_0xeb8d48)+_0x705dfb[_0x2f6c5f(0x153)][_0x2f6c5f(0x15f)](_0x3da25b),Qe(_0x705dfb,_0xeb8d48,_0x4bc73e);}function Ze(_0x2945ff,_0x48e4c4,_0x203f75){const _0x2f4d78=_0x217dd1;_0x2945ff[_0x2f4d78(0x18c)]=D(_0x2945ff[_0x2f4d78(0x18c)],_0x48e4c4,_0x203f75),_0x2945ff['sectionBreaks']=D(_0x2945ff['sectionBreaks'],_0x48e4c4,_0x203f75),_0x2945ff[_0x2f4d78(0x1df)]=D(_0x2945ff[_0x2f4d78(0x1df)],_0x48e4c4,_0x203f75),_0x2945ff[_0x2f4d78(0x1cd)]=$e(_0x2945ff[_0x2f4d78(0x1cd)],_0x48e4c4,_0x203f75),_0x2945ff['tables']=et(_0x2945ff[_0x2f4d78(0x206)],_0x48e4c4,_0x203f75),_0x2945ff[_0x2f4d78(0x1ce)]=k(_0x2945ff['columnGroups'],_0x48e4c4,_0x203f75),_0x2945ff[_0x2f4d78(0x210)]=k(_0x2945ff[_0x2f4d78(0x210)],_0x48e4c4,_0x203f75),_0x2945ff[_0x2f4d78(0x19a)]=k(_0x2945ff['customDecorations'],_0x48e4c4,_0x203f75),_0x2945ff[_0x2f4d78(0x234)]=k(_0x2945ff[_0x2f4d78(0x234)],_0x48e4c4,_0x203f75);}function Qe(_0x5efb5d,_0x175cda,_0x4e40d8){const _0xdd740e=_0x217dd1;var _0x2bd071,_0x4aa016;_0x5efb5d[_0xdd740e(0x18c)]=O(_0x5efb5d[_0xdd740e(0x18c)],_0x175cda,_0x4e40d8),_0x5efb5d[_0xdd740e(0x195)]=O(_0x5efb5d[_0xdd740e(0x195)],_0x175cda,_0x4e40d8),_0x5efb5d[_0xdd740e(0x1df)]=O(_0x5efb5d[_0xdd740e(0x1df)],_0x175cda,_0x4e40d8),_0x5efb5d['textRuns']=(_0x2bd071=tt((_0x4aa016=_0x5efb5d[_0xdd740e(0x1cd)])==null?void 0x0:_0x4aa016['map'](_0x45262d=>({..._0x45262d,'startIndex':_0x45262d['st'],'endIndex':_0x45262d['ed']})),_0x175cda,_0x4e40d8))==null?void 0x0:_0x2bd071['map'](_0x5bdea5=>{let {startIndex:_0x1a71e3,endIndex:_0x3654d4,..._0x1266b6}=_0x5bdea5;return{..._0x1266b6,'st':_0x1a71e3,'ed':_0x3654d4};}),_0x5efb5d['tables']=tt(_0x5efb5d[_0xdd740e(0x206)],_0x175cda,_0x4e40d8),_0x5efb5d[_0xdd740e(0x1ce)]=A(_0x5efb5d['columnGroups'],_0x175cda,_0x4e40d8),_0x5efb5d[_0xdd740e(0x210)]=A(_0x5efb5d[_0xdd740e(0x210)],_0x175cda,_0x4e40d8),_0x5efb5d[_0xdd740e(0x19a)]=A(_0x5efb5d[_0xdd740e(0x19a)],_0x175cda,_0x4e40d8),_0x5efb5d[_0xdd740e(0x234)]=A(_0x5efb5d[_0xdd740e(0x234)],_0x175cda,_0x4e40d8);}function D(_0x2a7771,_0x57b8f2,_0x4e8f76){const _0x62b9c9=_0x217dd1;return _0x2a7771==null?void 0x0:_0x2a7771[_0x62b9c9(0x164)](_0x21abe7=>_0x21abe7[_0x62b9c9(0x1e7)]>=_0x57b8f2?{..._0x21abe7,'startIndex':_0x21abe7[_0x62b9c9(0x1e7)]+_0x4e8f76}:_0x21abe7);}function O(_0xb0873d,_0x29695d,_0x564b71){const _0x3e1049=_0x217dd1;let _0x25a7c5=_0x29695d+_0x564b71;return _0xb0873d==null?void 0x0:_0xb0873d[_0x3e1049(0x164)](_0x1d39d7=>_0x1d39d7['startIndex']>=_0x29695d&&_0x1d39d7['startIndex']<_0x25a7c5?null:_0x1d39d7[_0x3e1049(0x1e7)]>=_0x25a7c5?{..._0x1d39d7,'startIndex':_0x1d39d7[_0x3e1049(0x1e7)]-_0x564b71}:_0x1d39d7)[_0x3e1049(0x1a5)](_0x293238=>_0x293238!=null);}function $e(_0x14d7af,_0xc89632,_0x2a4ba7){const _0x3199=_0x217dd1;return _0x14d7af==null?void 0x0:_0x14d7af[_0x3199(0x164)](_0x56b9a1=>_0x56b9a1['st']>=_0xc89632?{..._0x56b9a1,'st':_0x56b9a1['st']+_0x2a4ba7,'ed':_0x56b9a1['ed']+_0x2a4ba7}:_0x56b9a1['ed']>_0xc89632?{..._0x56b9a1,'ed':_0x56b9a1['ed']+_0x2a4ba7}:_0x56b9a1);}function k(_0x33928b,_0x17c339,_0x3cb90a){const _0x56d2c5=_0x217dd1;return _0x33928b==null?void 0x0:_0x33928b[_0x56d2c5(0x164)](_0x36d70a=>_0x4fc859(_0x36d70a,_0x17c339,_0x3cb90a));}function et(_0x9914ec,_0x4050ab,_0x39797e){const _0x4b75ec=_0x217dd1;return _0x9914ec==null?void 0x0:_0x9914ec[_0x4b75ec(0x164)](_0x26ad6d=>_0x7fd50e(_0x26ad6d,_0x4050ab,_0x39797e));}function A(_0x557e94,_0x329741,_0x528a87){const _0x484474=_0x217dd1;return _0x557e94==null?void 0x0:_0x557e94[_0x484474(0x164)](_0x2f7af6=>_0x23a1d4(_0x2f7af6,_0x329741,_0x528a87))['filter'](_0x30a571=>_0x30a571!=null);}function tt(_0x3f7787,_0xe830ec,_0x2fd680){const _0x1ce5c4=_0x217dd1;return _0x3f7787==null?void 0x0:_0x3f7787[_0x1ce5c4(0x164)](_0xef9991=>_0x24c8e7(_0xef9991,_0xe830ec,_0x2fd680))[_0x1ce5c4(0x1a5)](_0x4a4e72=>_0x4a4e72!=null);}function j(_0x1a8d5a){const _0x1666d3=_0x217dd1;if(!_0x1a8d5a['body'])throw Error(_0x1666d3(0x143));return _0x1a8d5a[_0x1666d3(0x220)];}function M(_0x4d0764){'@babel/helpers - typeof';const _0x2f78c2=_0x217dd1;return M=typeof Symbol=='function'&&typeof Symbol[_0x2f78c2(0x1d5)]==_0x2f78c2(0x14d)?function(_0x111b7b){return typeof _0x111b7b;}:function(_0x3516d2){const _0x488cba=_0x2f78c2;return _0x3516d2&&typeof Symbol==_0x488cba(0x18a)&&_0x3516d2['constructor']===Symbol&&_0x3516d2!==Symbol[_0x488cba(0x1c4)]?_0x488cba(0x14d):typeof _0x3516d2;},M(_0x4d0764);}function nt(_0x9e0cf1,_0x12a938){const _0x3542db=_0x217dd1;if(M(_0x9e0cf1)!='object'||!_0x9e0cf1)return _0x9e0cf1;var _0x147f44=_0x9e0cf1[Symbol[_0x3542db(0x1fd)]];if(_0x147f44!==void 0x0){var _0x23b12a=_0x147f44[_0x3542db(0x21b)](_0x9e0cf1,_0x12a938||_0x3542db(0x148));if(M(_0x23b12a)!=_0x3542db(0x1ea))return _0x23b12a;throw TypeError(_0x3542db(0x191));}return(_0x12a938==='string'?String:Number)(_0x9e0cf1);}function rt(_0x3a3027){const _0x383181=_0x217dd1;var _0x46653a=nt(_0x3a3027,'string');return M(_0x46653a)==_0x383181(0x14d)?_0x46653a:_0x46653a+'';}function N(_0x4a3b30,_0x4b4a21,_0x1cf49f){const _0x1f28da=_0x217dd1;return(_0x4b4a21=rt(_0x4b4a21))in _0x4a3b30?Object[_0x1f28da(0x22d)](_0x4a3b30,_0x4b4a21,{'value':_0x1cf49f,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x4a3b30[_0x4b4a21]=_0x1cf49f,_0x4a3b30;}var P=class extends _0x18377d{constructor(..._0x27b5c4){const _0x255527=_0x217dd1;super(..._0x27b5c4),N(this,'_resources',new Map()),N(this,'_rawResources',new Map()),N(this,_0x255527(0x1b4),new Map()),N(this,_0x255527(0x1c5),new _0x2b03f3()),N(this,_0x255527(0x221),this[_0x255527(0x1c5)][_0x255527(0x1d8)]());}['getFormula'](_0xb6f641,_0x131d50){const _0x3ca899=_0x217dd1;var _0x2a8957;let _0x4d36e4=(_0x2a8957=this[_0x3ca899(0x157)][_0x3ca899(0x21f)](_0xb6f641))==null?void 0x0:_0x2a8957[_0x3ca899(0x1d7)][_0x131d50];return _0x4d36e4?_0x4b0aab[_0x3ca899(0x1c3)](_0x4d36e4):void 0x0;}[_0x217dd1(0x182)](_0x5ca644){const _0x3ebeb7=_0x217dd1;var _0x16bdc2;return _0x4b0aab[_0x3ebeb7(0x1c3)](((_0x16bdc2=this[_0x3ebeb7(0x157)]['get'](_0x5ca644))==null?void 0x0:_0x16bdc2[_0x3ebeb7(0x1d7)])??{});}['getResource'](_0x53b692){const _0x143138=_0x217dd1;let _0x3316fb=this['_resources']['get'](_0x53b692);return _0x3316fb?_0x4b0aab[_0x143138(0x1c3)](_0x3316fb):void 0x0;}[_0x217dd1(0x1db)](_0x598e7c,_0x3de29e,_0x48358c){const _0x3c2ed3=_0x217dd1;return this[_0x3c2ed3(0x200)](_0x598e7c,{[_0x3de29e]:_0x48358c});}['setResource'](_0x1b064d,_0x45a2b3){const _0x1a333d=_0x217dd1;return this[_0x1a333d(0x1b4)][_0x1a333d(0x1f5)](_0x1b064d)||!x(_0x45a2b3)?!0x1:(this['_resources'][_0x1a333d(0x1a1)](_0x1b064d,_0x4b0aab['deepClone'](_0x45a2b3)),this[_0x1a333d(0x1c5)][_0x1a333d(0x178)]({'unitId':_0x1b064d}),!0x0);}[_0x217dd1(0x200)](_0x1417b2,_0x1c91a7){const _0x530eb4=_0x217dd1;if(this[_0x530eb4(0x1b4)][_0x530eb4(0x1f5)](_0x1417b2)||!Object[_0x530eb4(0x1e1)](_0x1c91a7)['length']||!x({'schemaVersion':0x1,'formulas':_0x1c91a7}))return!0x1;let _0x183edd=this[_0x530eb4(0x157)][_0x530eb4(0x21f)](_0x1417b2)??b(),_0x41dee8=_0x4b0aab[_0x530eb4(0x1c3)](_0x183edd);return Object[_0x530eb4(0x16d)](_0x41dee8['formulas'],_0x4b0aab[_0x530eb4(0x1c3)](_0x1c91a7)),this[_0x530eb4(0x157)]['set'](_0x1417b2,_0x41dee8),this[_0x530eb4(0x1c5)][_0x530eb4(0x178)]({'unitId':_0x1417b2,'rangeIds':Object[_0x530eb4(0x1e1)](_0x1c91a7)}),!0x0;}[_0x217dd1(0x1bc)](_0x55aa78,_0x3b19b9){const _0x3185fb=_0x217dd1;if(this[_0x3185fb(0x1b4)][_0x3185fb(0x1f5)](_0x55aa78))return!0x1;let _0x3a18b1=this['_resources'][_0x3185fb(0x21f)](_0x55aa78);if(!(_0x3a18b1!=null&&_0x3a18b1[_0x3185fb(0x1d7)][_0x3b19b9]))return!0x1;let _0x569c61=_0x4b0aab[_0x3185fb(0x1c3)](_0x3a18b1);return delete _0x569c61[_0x3185fb(0x1d7)][_0x3b19b9],this[_0x3185fb(0x157)][_0x3185fb(0x1a1)](_0x55aa78,_0x569c61),this['_change$'][_0x3185fb(0x178)]({'unitId':_0x55aa78,'rangeIds':[_0x3b19b9]}),!0x0;}[_0x217dd1(0x1f8)](_0x4ec42a,_0x141d52){const _0x1d04ed=_0x217dd1;return _0x141d52&&typeof _0x141d52=='object'&&_0x1d04ed(0x23d)in _0x141d52&&_0x141d52[_0x1d04ed(0x23d)]!==0x1?(this[_0x1d04ed(0x1e8)](_0x4ec42a,_0x141d52,_0x1d04ed(0x163)),!0x1):x(_0x141d52)?(this['_resources'][_0x1d04ed(0x1a1)](_0x4ec42a,_0x4b0aab['deepClone'](_0x141d52)),this[_0x1d04ed(0x236)][_0x1d04ed(0x1bb)](_0x4ec42a),this[_0x1d04ed(0x1b4)][_0x1d04ed(0x1bb)](_0x4ec42a),this['_change$']['next']({'unitId':_0x4ec42a}),!0x0):(this[_0x1d04ed(0x1e8)](_0x4ec42a,_0x141d52,'invalid-resource'),!0x1);}['serialize'](_0x55fedb){const _0x587b9f=_0x217dd1;let _0x4d868b=this[_0x587b9f(0x157)]['get'](_0x55fedb);return _0x4d868b?_0x4b0aab[_0x587b9f(0x1c3)](_0x4d868b):this[_0x587b9f(0x236)][_0x587b9f(0x1f5)](_0x55fedb)?_0x4b0aab[_0x587b9f(0x1c3)](this['_rawResources'][_0x587b9f(0x21f)](_0x55fedb)):b();}['getLoadError'](_0x5b3a65){const _0x83bce7=_0x217dd1;return this[_0x83bce7(0x1b4)][_0x83bce7(0x21f)](_0x5b3a65);}['removeUnit'](_0x567732){const _0x642dbe=_0x217dd1;this[_0x642dbe(0x157)][_0x642dbe(0x1bb)](_0x567732),this[_0x642dbe(0x236)][_0x642dbe(0x1bb)](_0x567732),this[_0x642dbe(0x1b4)][_0x642dbe(0x1bb)](_0x567732),this[_0x642dbe(0x1c5)][_0x642dbe(0x178)]({'unitId':_0x567732});}['dispose'](){const _0x380c06=_0x217dd1;this[_0x380c06(0x157)]['clear'](),this[_0x380c06(0x236)]['clear'](),this[_0x380c06(0x1b4)][_0x380c06(0x21d)](),this[_0x380c06(0x1c5)]['complete'](),super[_0x380c06(0x15c)]();}[_0x217dd1(0x1e8)](_0x170e7b,_0x4e9891,_0x5a573e){const _0x3965e5=_0x217dd1;this['_resources'][_0x3965e5(0x1bb)](_0x170e7b),this[_0x3965e5(0x236)][_0x3965e5(0x1a1)](_0x170e7b,_0x4b0aab[_0x3965e5(0x1c3)](_0x4e9891)),this[_0x3965e5(0x1b4)]['set'](_0x170e7b,_0x5a573e),this[_0x3965e5(0x1c5)]['next']({'unitId':_0x170e7b});}};let it=function(_0x10513e){const _0x524e98=_0x217dd1;return _0x10513e[_0x524e98(0x224)]=_0x524e98(0x222),_0x10513e[_0x524e98(0x1f4)]=_0x524e98(0x1ae),_0x10513e[_0x524e98(0x217)]=_0x524e98(0x20f),_0x10513e[_0x524e98(0x1ac)]='error',_0x10513e;}({});function F(_0xb14ad7,_0x452cec){return function(_0x668bf7,_0x5be808){_0x452cec(_0x668bf7,_0x5be808,_0xb14ad7);};}function I(_0xd4c6b7,_0x2d85ec,_0x551c16,_0x392d22){const _0xd23448=_0x217dd1;var _0x2feea9=arguments['length'],_0x2f2361=_0x2feea9<0x3?_0x2d85ec:_0x392d22===null?_0x392d22=Object['getOwnPropertyDescriptor'](_0x2d85ec,_0x551c16):_0x392d22,_0x377118;if(typeof Reflect==_0xd23448(0x1ea)&&typeof Reflect[_0xd23448(0x188)]==_0xd23448(0x18a))_0x2f2361=Reflect[_0xd23448(0x188)](_0xd4c6b7,_0x2d85ec,_0x551c16,_0x392d22);else{for(var _0x3922d5=_0xd4c6b7[_0xd23448(0x171)]-0x1;_0x3922d5>=0x0;_0x3922d5--)(_0x377118=_0xd4c6b7[_0x3922d5])&&(_0x2f2361=(_0x2feea9<0x3?_0x377118(_0x2f2361):_0x2feea9>0x3?_0x377118(_0x2d85ec,_0x551c16,_0x2f2361):_0x377118(_0x2d85ec,_0x551c16))||_0x2f2361);}return _0x2feea9>0x3&&_0x2f2361&&Object[_0xd23448(0x22d)](_0x2d85ec,_0x551c16,_0x2f2361),_0x2f2361;}let L=class extends _0x18377d{constructor(_0x251f6e,_0x3687ee,_0x511450){const _0x15bcaa=_0x217dd1;super(),this[_0x15bcaa(0x235)]=_0x251f6e,this[_0x15bcaa(0x1be)]=_0x3687ee,this[_0x15bcaa(0x20d)]=_0x511450,N(this,_0x15bcaa(0x1b7),new Map()),N(this,_0x15bcaa(0x22f),new Map()),N(this,'_presentationChanged$',new _0x2b03f3()),N(this,_0x15bcaa(0x22a),this[_0x15bcaa(0x19d)][_0x15bcaa(0x1d8)]()),this[_0x15bcaa(0x144)](this[_0x15bcaa(0x1be)]['formulaResult$']['subscribe'](_0x2408ff=>{const _0x16b8ef=_0x15bcaa;for(let _0x4c05f0 of Object[_0x16b8ef(0x20b)](_0x2408ff))for(let _0x5c296a of Object['values'](_0x4c05f0))_0x5c296a[_0x16b8ef(0x1b2)](_0x2bbe96=>this[_0x16b8ef(0x166)](_0x2bbe96));}));}[_0x217dd1(0x1f1)](_0x254804){const _0x5222c4=_0x217dd1;var _0x31fd4e;let _0x4f695e=_0x254804[_0x5222c4(0x18f)](),_0x502059=((_0x31fd4e=_0x254804[_0x5222c4(0x169)]()[_0x5222c4(0x220)])==null||(_0x31fd4e=_0x31fd4e[_0x5222c4(0x210)])==null?void 0x0:_0x31fd4e['filter'](w))??[],_0x46299d=this[_0x5222c4(0x235)][_0x5222c4(0x182)](_0x4f695e),_0x1547f9=new Set();for(let _0x261382 of _0x502059){let _0x1b6560=_0x46299d[_0x261382[_0x5222c4(0x141)]];_0x1b6560&&(_0x1547f9['add'](R(_0x4f695e,_0x261382[_0x5222c4(0x141)])),this['register']({'unitId':_0x4f695e,'rangeId':_0x261382[_0x5222c4(0x141)]},_0x1b6560));}for(let _0x225c99 of Array[_0x5222c4(0x15a)](this[_0x5222c4(0x1b7)]['values']()))_0x225c99[_0x5222c4(0x173)]===_0x4f695e&&!_0x1547f9[_0x5222c4(0x1f5)](R(_0x225c99[_0x5222c4(0x173)],_0x225c99[_0x5222c4(0x141)]))&&this[_0x5222c4(0x214)](_0x225c99);}['register'](_0x555dac,_0x269b98){const _0x417e42=_0x217dd1;let _0x3d0d84=R(_0x555dac[_0x417e42(0x173)],_0x555dac[_0x417e42(0x141)]),_0xa4f0aa=this[_0x417e42(0x1b7)]['get'](_0x3d0d84),_0x2dbd93=this[_0x417e42(0x20d)][_0x417e42(0x22c)](_0x555dac[_0x417e42(0x173)]);if(_0xa4f0aa&&_0xa4f0aa[_0x417e42(0x1ba)]['formula']===_0x269b98[_0x417e42(0x1ab)]&&_0xa4f0aa[_0x417e42(0x1c9)]===_0x2dbd93){_0xa4f0aa[_0x417e42(0x1ba)]=_0x269b98;let _0x1f58c3=_0xa4f0aa[_0x417e42(0x207)]?this[_0x417e42(0x1be)][_0x417e42(0x160)](_0xa4f0aa['unitId'],_0xa4f0aa[_0x417e42(0x173)],_0xa4f0aa[_0x417e42(0x207)])??void 0x0:void 0x0;_0xa4f0aa['liveResult']=_0x1f58c3,this[_0x417e42(0x1ef)](_0x3d0d84,z(_0x269b98,_0x1f58c3));return;}_0xa4f0aa!=null&&_0xa4f0aa[_0x417e42(0x207)]&&this[_0x417e42(0x1c7)](_0xa4f0aa);let _0x39fc2d={..._0x555dac,'config':_0x269b98,'referenceRevision':_0x2dbd93,'presentation':z(_0x269b98,void 0x0)};if(this[_0x417e42(0x1b7)][_0x417e42(0x1a1)](_0x3d0d84,_0x39fc2d),!_0x269b98[_0x417e42(0x1ab)][_0x417e42(0x1de)]())return;let _0x47d19f=this['_registrationService'][_0x417e42(0x18b)](_0x555dac[_0x417e42(0x173)],_0x555dac[_0x417e42(0x173)],_0x269b98[_0x417e42(0x1ab)],void 0x0,{'rangeId':_0x555dac[_0x417e42(0x141)]},_0x3508be[_0x417e42(0x150)],_0x555dac[_0x417e42(0x141)]);_0x39fc2d[_0x417e42(0x207)]=_0x47d19f,this[_0x417e42(0x22f)]['set'](_0x47d19f,_0x3d0d84);}[_0x217dd1(0x214)](_0x16c20f){const _0x1fe2ee=_0x217dd1;let _0x3b9b67=R(_0x16c20f[_0x1fe2ee(0x173)],_0x16c20f['rangeId']),_0x19dffb=this[_0x1fe2ee(0x1b7)][_0x1fe2ee(0x21f)](_0x3b9b67);_0x19dffb&&(this[_0x1fe2ee(0x1c7)](_0x19dffb),this[_0x1fe2ee(0x1b7)]['delete'](_0x3b9b67));}[_0x217dd1(0x17c)](_0x57ecdb){const _0x2a02e7=_0x217dd1;for(let _0x1815e0 of Array[_0x2a02e7(0x15a)](this['_registrations'][_0x2a02e7(0x20b)]()))_0x1815e0[_0x2a02e7(0x173)]===_0x57ecdb&&this[_0x2a02e7(0x214)](_0x1815e0);}[_0x217dd1(0x1b0)](_0x342cbf){const _0x5a5a83=_0x217dd1;var _0xf5ce38;return(_0xf5ce38=this['_registrations'][_0x5a5a83(0x21f)](R(_0x342cbf['unitId'],_0x342cbf[_0x5a5a83(0x141)])))==null?void 0x0:_0xf5ce38[_0x5a5a83(0x231)];}[_0x217dd1(0x23c)](_0x536b28){const _0x473d8a=_0x217dd1;let _0x5b1984=this['_registrations']['get'](R(_0x536b28[_0x473d8a(0x173)],_0x536b28['rangeId']));return _0x5b1984?B(_0x5b1984):void 0x0;}[_0x217dd1(0x205)](){const _0x208425=_0x217dd1;return Array[_0x208425(0x15a)](this[_0x208425(0x1b7)][_0x208425(0x20b)](),_0xb547ef=>({'identity':{'unitId':_0xb547ef[_0x208425(0x173)],'rangeId':_0xb547ef['rangeId']},'config':_0xb547ef[_0x208425(0x1ba)],'referenceRevision':_0xb547ef['referenceRevision'],..._0xb547ef[_0x208425(0x202)]?{'liveResult':_0xb547ef[_0x208425(0x202)]}:null}));}[_0x217dd1(0x15c)](){const _0x116a3b=_0x217dd1;for(let _0x38620a of this[_0x116a3b(0x1b7)][_0x116a3b(0x20b)]())this['_deleteRegistration'](_0x38620a);this[_0x116a3b(0x1b7)][_0x116a3b(0x21d)](),this[_0x116a3b(0x22f)][_0x116a3b(0x21d)](),this[_0x116a3b(0x19d)][_0x116a3b(0x226)](),super[_0x116a3b(0x15c)]();}['_updateFormulaResult'](_0x59dc5b){const _0xe14cf3=_0x217dd1;let _0x15e207=this['_formulaKeys']['get'](_0x59dc5b[_0xe14cf3(0x207)]),_0x34670a=_0x15e207?this[_0xe14cf3(0x1b7)]['get'](_0x15e207):void 0x0;_0x15e207&&_0x34670a&&(_0x34670a[_0xe14cf3(0x202)]=_0x59dc5b,this[_0xe14cf3(0x1ef)](_0x15e207,z(_0x34670a['config'],_0x59dc5b)));}[_0x217dd1(0x1ef)](_0x1448e4,_0x5ba641){const _0x2c47c1=_0x217dd1;var _0x1d4feb,_0x568f60;let _0x5e66d2=this[_0x2c47c1(0x1b7)][_0x2c47c1(0x21f)](_0x1448e4);if(!_0x5e66d2||at(_0x5e66d2['presentation'],_0x5ba641))return;let _0x2d8042=_0x5e66d2[_0x2c47c1(0x231)],_0x19b738=B(_0x5e66d2);_0x5e66d2[_0x2c47c1(0x231)]=_0x5ba641,this['_presentationChanged$']['next']({'unitId':_0x5e66d2['unitId'],'rangeId':_0x5e66d2['rangeId'],'presentation':_0x5ba641,'previousPresentation':_0x2d8042,'result':B(_0x5e66d2),'previousResult':{..._0x19b738,..._0x2d8042,'value':(_0x1d4feb=_0x2d8042[_0x2c47c1(0x215)])==null?void 0x0:_0x1d4feb['v'],'valueType':((_0x568f60=_0x2d8042[_0x2c47c1(0x215)])==null?void 0x0:_0x568f60['t'])??void 0x0}});}['_deleteRegistration'](_0x55fa65){const _0x476df7=_0x217dd1;_0x55fa65[_0x476df7(0x207)]&&(this[_0x476df7(0x1be)]['deleteFormula'](_0x55fa65[_0x476df7(0x173)],_0x55fa65[_0x476df7(0x173)],[_0x55fa65[_0x476df7(0x207)]]),this[_0x476df7(0x22f)]['delete'](_0x55fa65[_0x476df7(0x207)]));}};L=I([F(0x0,_0x5e32df(P)),F(0x1,_0x5e32df(_0x51a6f6)),F(0x2,_0x5e32df(_0x506168))],L);function R(_0x18772e,_0x28f0f2){return _0x18772e+'\x00'+_0x28f0f2;}function z(_0x459b85,_0x3b34d1){const _0x3b3a83=_0x217dd1;return _0x27458f({'numberFormat':_0x459b85[_0x3b3a83(0x179)],'lastValue':_0x459b85[_0x3b3a83(0x1da)],'result':_0x3b34d1});}function B(_0x141c86){const _0x43b9f2=_0x217dd1;var _0x33f299,_0x1a2f7c,_0x5c9900;let _0x1ed6e2=_0x141c86[_0x43b9f2(0x231)],_0xad2909=_0x141c86[_0x43b9f2(0x1ba)][_0x43b9f2(0x1ab)][_0x43b9f2(0x1de)]()?_0x1ed6e2[_0x43b9f2(0x19c)]||_0x1ed6e2[_0x43b9f2(0x215)]==null?'pending':((_0x33f299=_0x141c86[_0x43b9f2(0x202)])==null?void 0x0:_0x33f299[_0x43b9f2(0x17b)])===_0x5815e0['ERROR']?_0x43b9f2(0x167):_0x43b9f2(0x20f):'empty';return{..._0x1ed6e2,'status':_0xad2909,'value':(_0x1a2f7c=_0x1ed6e2[_0x43b9f2(0x215)])==null?void 0x0:_0x1a2f7c['v'],'valueType':((_0x5c9900=_0x1ed6e2[_0x43b9f2(0x215)])==null?void 0x0:_0x5c9900['t'])??void 0x0};}function at(_0xe820e3,_0x41b29d){const _0x3376d6=_0x217dd1;var _0x3ee1d9,_0x547706,_0x401ee5,_0x1f132d;return _0xe820e3[_0x3376d6(0x201)]===_0x41b29d['text']&&_0xe820e3['color']===_0x41b29d[_0x3376d6(0x233)]&&_0xe820e3[_0x3376d6(0x228)]===_0x41b29d[_0x3376d6(0x228)]&&_0xe820e3[_0x3376d6(0x20a)]===_0x41b29d[_0x3376d6(0x20a)]&&_0xe820e3[_0x3376d6(0x19c)]===_0x41b29d[_0x3376d6(0x19c)]&&((_0x3ee1d9=_0xe820e3[_0x3376d6(0x215)])==null?void 0x0:_0x3ee1d9['t'])===((_0x547706=_0x41b29d[_0x3376d6(0x215)])==null?void 0x0:_0x547706['t'])&&Object['is']((_0x401ee5=_0xe820e3['cell'])==null?void 0x0:_0x401ee5['v'],(_0x1f132d=_0x41b29d[_0x3376d6(0x215)])==null?void 0x0:_0x1f132d['v']);}const ot={'id':'docs-formula.mutation.set-formula','type':_0x5f1099[_0x217dd1(0x19b)],'handler':(_0x49cd6d,_0x18c1b7)=>!(_0x18c1b7!=null&&_0x18c1b7[_0x217dd1(0x173)])||!_0x18c1b7['rangeId']||!_0x18c1b7[_0x217dd1(0x1ba)]?!0x1:_0x49cd6d[_0x217dd1(0x21f)](P)[_0x217dd1(0x1db)](_0x18c1b7[_0x217dd1(0x173)],_0x18c1b7[_0x217dd1(0x141)],_0x18c1b7[_0x217dd1(0x1ba)])},st={'id':_0x217dd1(0x154),'type':_0x5f1099[_0x217dd1(0x19b)],'handler':(_0x348999,_0xf1e64d)=>!(_0xf1e64d!=null&&_0xf1e64d['unitId'])||!_0xf1e64d['rangeId']?!0x1:_0x348999[_0x217dd1(0x21f)](P)[_0x217dd1(0x1bc)](_0xf1e64d['unitId'],_0xf1e64d[_0x217dd1(0x141)])},V={'id':_0x217dd1(0x168),'type':_0x5f1099[_0x217dd1(0x19b)],'handler':(_0x478f0a,_0x431c74)=>!(_0x431c74!=null&&_0x431c74['unitId'])||!_0x431c74['resource']?!0x1:_0x478f0a['get'](P)[_0x217dd1(0x1bd)](_0x431c74[_0x217dd1(0x173)],_0x431c74[_0x217dd1(0x19f)])},H={'id':_0x217dd1(0x1ad),'type':_0x5f1099[_0x217dd1(0x19b)],'handler':(_0x4fadbf,_0x268f37)=>{const _0x5efcfd=_0x217dd1;if(!(_0x268f37!=null&&_0x268f37[_0x5efcfd(0x173)])||!_0x268f37[_0x5efcfd(0x158)]['length'])return!0x1;let _0x316e60=_0x4fadbf['get'](P),_0x5e4d34=_0x4fadbf[_0x5efcfd(0x21f)](_0x506168),_0x552fe2=_0x316e60[_0x5efcfd(0x1fa)](_0x268f37[_0x5efcfd(0x173)]);if(!_0x552fe2)return!0x1;let _0x4608ac=_0x4b0aab[_0x5efcfd(0x1c3)](_0x552fe2),_0x2d48ac=!0x1;for(let _0x30beaf of _0x268f37[_0x5efcfd(0x158)]){var _0x436b9c,_0x153ba7,_0x139e1c,_0x9e0788;let _0x2e9c01=_0x4608ac[_0x5efcfd(0x1d7)][_0x30beaf[_0x5efcfd(0x141)]];_0x2e9c01&&_0x2e9c01[_0x5efcfd(0x1ab)]===_0x30beaf[_0x5efcfd(0x175)]&&((_0x436b9c=_0x2e9c01[_0x5efcfd(0x179)])==null?void 0x0:_0x436b9c[_0x5efcfd(0x228)])===_0x30beaf[_0x5efcfd(0x1f0)]&&_0x5e4d34[_0x5efcfd(0x22c)](_0x268f37['unitId'])===_0x30beaf[_0x5efcfd(0x17d)]&&(((_0x153ba7=_0x2e9c01[_0x5efcfd(0x1da)])==null?void 0x0:_0x153ba7['v'])!==_0x30beaf[_0x5efcfd(0x1da)]['v']||((_0x139e1c=_0x2e9c01[_0x5efcfd(0x1da)])==null?void 0x0:_0x139e1c['t'])!==_0x30beaf[_0x5efcfd(0x1da)]['t']||((_0x9e0788=_0x2e9c01[_0x5efcfd(0x1da)])==null?void 0x0:_0x9e0788[_0x5efcfd(0x228)])!==_0x30beaf['lastValue']['pattern'])&&(_0x2e9c01[_0x5efcfd(0x1da)]=_0x4b0aab[_0x5efcfd(0x1c3)](_0x30beaf[_0x5efcfd(0x1da)]),_0x2d48ac=!0x0);}return!_0x2d48ac||_0x316e60[_0x5efcfd(0x1bd)](_0x268f37[_0x5efcfd(0x173)],_0x4608ac);}},U={'id':_0x217dd1(0x238),'type':_0x5f1099[_0x217dd1(0x223)],'handler':(_0x1fba9b,_0x464972)=>{const _0x469fcd=_0x217dd1;if(!(_0x464972!=null&&_0x464972['formula'][_0x469fcd(0x1de)]()))return!0x1;let _0x229c5d=q(_0x1fba9b,_0x464972[_0x469fcd(0x173)],'');if(!_0x229c5d)return!0x1;let _0x12cb1c=ft(_0x464972[_0x469fcd(0x21a)],_0x229c5d[_0x469fcd(0x220)],dt(_0x1fba9b,_0x229c5d[_0x469fcd(0x173)]));if(!_0x12cb1c)return!0x1;let _0x3a81a2=pt(_0x1fba9b,_0x229c5d[_0x469fcd(0x173)],_0x464972[_0x469fcd(0x1ab)],_0x464972[_0x469fcd(0x204)]??[]);if(!_0x3a81a2)return!0x1;let _0x8c713e=mt(_0x229c5d['body'],_0x229c5d[_0x469fcd(0x23a)],_0x229c5d[_0x469fcd(0x173)]),_0x29ca7f=ht({'documentData':_0x229c5d[_0x469fcd(0x194)],'resource':_0x229c5d[_0x469fcd(0x19f)],'rangeId':_0x8c713e,'config':{'formula':_0x464972[_0x469fcd(0x1ab)],..._0x464972['numberFormat']?{'numberFormat':_0x464972[_0x469fcd(0x179)]}:null},'startOffset':_0x12cb1c[_0x469fcd(0x1c6)],'endOffset':_0x12cb1c[_0x469fcd(0x172)]});if(!_0x29ca7f)return!0x1;let _0x39d7eb=_0x41a736(_0x1fba9b,_0x229c5d[_0x469fcd(0x173)],_0x3a81a2);return!_0x39d7eb||!J({'accessor':_0x1fba9b,'document':_0x229c5d['document'],'unitId':_0x229c5d['unitId'],'trigger':U['id'],'rangeId':_0x8c713e,'previousResource':_0x229c5d[_0x469fcd(0x19f)],'nextResource':_0x29ca7f[_0x469fcd(0x159)],'previousDocumentData':_0x229c5d['documentData'],'nextDocumentData':_0x29ca7f['nextDocumentData'],'cursorOffset':_0x29ca7f['cursorOffset'],'externalMutations':_0x39d7eb})?!0x1:{'rangeId':_0x8c713e,'startOffset':_0x29ca7f[_0x469fcd(0x1d2)]-0x1,'endOffset':_0x29ca7f[_0x469fcd(0x1d2)]};}},W={'id':_0x217dd1(0x1b3),'type':_0x5f1099[_0x217dd1(0x223)],'handler':(_0x4e6f81,_0x1f26cb)=>{const _0x36b63d=_0x217dd1;if(!(_0x1f26cb!=null&&_0x1f26cb['rangeId'])||!_0x1f26cb['formula'][_0x36b63d(0x1de)]())return!0x1;let _0x40727e=q(_0x4e6f81,_0x1f26cb[_0x36b63d(0x173)],''),_0x192b27=_0x40727e==null?void 0x0:_0x40727e['model'][_0x36b63d(0x213)](_0x40727e[_0x36b63d(0x173)],_0x1f26cb[_0x36b63d(0x141)]),_0x1952e7=_0x40727e?T(_0x40727e[_0x36b63d(0x194)][_0x36b63d(0x220)],_0x1f26cb['rangeId']):void 0x0;if(!_0x40727e||!_0x192b27||!_0x1952e7)return!0x1;let _0x32178c=pt(_0x4e6f81,_0x40727e['unitId'],_0x1f26cb[_0x36b63d(0x1ab)],_0x1f26cb['externalReferences']??[]);if(!_0x32178c)return!0x1;let _0x471594=_0x41a736(_0x4e6f81,_0x40727e[_0x36b63d(0x173)],_0x32178c);if(!_0x471594)return!0x1;let _0x14d5a1=Ct(_0x40727e[_0x36b63d(0x19f)]);return _0x14d5a1['formulas'][_0x1f26cb[_0x36b63d(0x141)]]={'formula':_0x1f26cb[_0x36b63d(0x1ab)],..._0x1f26cb[_0x36b63d(0x179)]?{'numberFormat':_0x1f26cb[_0x36b63d(0x179)]}:_0x192b27[_0x36b63d(0x179)]?{'numberFormat':_0x192b27[_0x36b63d(0x179)]}:null},J({'accessor':_0x4e6f81,'document':_0x40727e['document'],'unitId':_0x40727e[_0x36b63d(0x173)],'trigger':W['id'],'rangeId':_0x1f26cb[_0x36b63d(0x141)],'previousResource':_0x40727e[_0x36b63d(0x19f)],'nextResource':_0x14d5a1,'cursorOffset':_0x1952e7[_0x36b63d(0x1fc)]+0x1,'externalMutations':_0x471594});}},G={'id':'docs-formula.command.set-number-format','type':_0x5f1099[_0x217dd1(0x223)],'handler':(_0x3db119,_0xdc2de0)=>{const _0x2b584b=_0x217dd1;if(!(_0xdc2de0!=null&&_0xdc2de0[_0x2b584b(0x141)]))return!0x1;let _0x4f65f0=q(_0x3db119,_0xdc2de0[_0x2b584b(0x173)],''),_0x1d0900=_0x4f65f0==null?void 0x0:_0x4f65f0['model'][_0x2b584b(0x213)](_0x4f65f0['unitId'],_0xdc2de0[_0x2b584b(0x141)]),_0x44e61d=_0x4f65f0?T(_0x4f65f0[_0x2b584b(0x194)][_0x2b584b(0x220)],_0xdc2de0[_0x2b584b(0x141)]):void 0x0;if(!_0x4f65f0||!_0x1d0900||!_0x44e61d)return!0x1;let _0x1017d6=Ct(_0x4f65f0['resource']);return _0x1017d6[_0x2b584b(0x1d7)][_0xdc2de0[_0x2b584b(0x141)]]={..._0x1d0900,..._0xdc2de0['numberFormat']?{'numberFormat':_0xdc2de0[_0x2b584b(0x179)]}:null},_0xdc2de0[_0x2b584b(0x179)]||delete _0x1017d6['formulas'][_0xdc2de0[_0x2b584b(0x141)]][_0x2b584b(0x179)],J({'accessor':_0x3db119,'document':_0x4f65f0[_0x2b584b(0x211)],'unitId':_0x4f65f0[_0x2b584b(0x173)],'trigger':G['id'],'rangeId':_0xdc2de0[_0x2b584b(0x141)],'previousResource':_0x4f65f0[_0x2b584b(0x19f)],'nextResource':_0x1017d6,'cursorOffset':_0x44e61d['endIndex']+0x1,'externalMutations':{}});}},K={'id':_0x217dd1(0x1dd),'type':_0x5f1099['COMMAND'],'handler':(_0x22cdf3,_0xec8d54)=>ut(_0x22cdf3,_0xec8d54,'',K['id'])},ct={'id':_0x217dd1(0x1aa),'type':_0x5f1099[_0x217dd1(0x223)],'handler':(_0x48d800,_0x3d2569)=>ut(_0x48d800,_0x3d2569,(_0x3d2569==null?void 0x0:_0x3d2569[_0x217dd1(0x201)])??'',ct['id'])},lt={'id':'docs-formula.command.convert-to-text','type':_0x5f1099[_0x217dd1(0x223)],'handler':(_0x51c21b,_0x57372a)=>{const _0x227a9e=_0x217dd1;if(!(_0x57372a!=null&&_0x57372a[_0x227a9e(0x141)]))return!0x1;let _0x2271ea=q(_0x51c21b,_0x57372a[_0x227a9e(0x173)],'');if(!_0x2271ea)return!0x1;let _0x46213e=_0x51c21b['get'](L)[_0x227a9e(0x23c)]({'unitId':_0x2271ea[_0x227a9e(0x173)],'rangeId':_0x57372a[_0x227a9e(0x141)]});return _0x46213e?ut(_0x51c21b,_0x57372a,_0x46213e[_0x227a9e(0x201)],lt['id']):!0x1;}};function ut(_0xc3b228,_0xab10db,_0xd7d583,_0x3bc059){const _0x2e0167=_0x217dd1;if(!(_0xab10db!=null&&_0xab10db[_0x2e0167(0x141)]))return!0x1;let _0x5ccbaf=q(_0xc3b228,_0xab10db['unitId'],'');if(!_0x5ccbaf)return!0x1;let _0x182d1b=Be({'documentData':_0x5ccbaf[_0x2e0167(0x194)],'resource':_0x5ccbaf[_0x2e0167(0x19f)],'rangeId':_0xab10db[_0x2e0167(0x141)],'text':_0xd7d583});return _0x182d1b?J({'accessor':_0xc3b228,'document':_0x5ccbaf['document'],'unitId':_0x5ccbaf[_0x2e0167(0x173)],'trigger':_0x3bc059,'rangeId':_0xab10db[_0x2e0167(0x141)],'previousResource':_0x5ccbaf[_0x2e0167(0x19f)],'nextResource':_0x182d1b[_0x2e0167(0x159)],'previousDocumentData':_0x5ccbaf[_0x2e0167(0x194)],'nextDocumentData':_0x182d1b[_0x2e0167(0x1f6)],'cursorOffset':_0x182d1b[_0x2e0167(0x1d2)],'externalMutations':{}}):!0x1;}function q(_0x231c7d,_0x162016,_0x4f1995){const _0x2302a7=_0x217dd1;if(_0x4f1995)return null;let _0x465657=_0x231c7d['get'](_0x147b46),_0x288d4a=(_0x162016?_0x465657['getUnit'](_0x162016,_0x138c8e['UNIVER_DOC']):_0x465657[_0x2302a7(0x1af)](_0x138c8e[_0x2302a7(0x17f)]))??null;if(!_0x288d4a)return null;let _0x8bae47=_0x288d4a['getSnapshot'](),_0x354ddc=_0x8bae47[_0x2302a7(0x220)];if(_0x8bae47[_0x2302a7(0x1c1)]||!_0x354ddc)return null;let _0x1a5c62=_0x231c7d[_0x2302a7(0x21f)](P);return _0x1a5c62['getLoadError'](_0x288d4a[_0x2302a7(0x18f)]())?null:{'document':_0x288d4a,'body':_0x354ddc,'documentData':_0x8bae47,'model':_0x1a5c62,'resource':_0x1a5c62[_0x2302a7(0x1fa)](_0x288d4a[_0x2302a7(0x18f)]())??b(),'unitId':_0x288d4a['getUnitId']()};}function dt(_0x36ca56,_0x2c5267){const _0x5ad5db=_0x217dd1;var _0x2ac5ac;return(_0x2ac5ac=_0x36ca56[_0x5ad5db(0x21f)](_0x3e1e55)['getTextRanges']({'subUnitId':_0x2c5267,'unitId':_0x2c5267}))==null?void 0x0:_0x2ac5ac[0x0];}function ft(_0x162316,_0x4065b0,_0x417eb6){const _0x7ac5b7=_0x217dd1;if((_0x162316==null?void 0x0:_0x162316[_0x7ac5b7(0x1fe)])===_0x7ac5b7(0x15e)){var _0x59cf6d;let _0x37e37f=((_0x59cf6d=_0x4065b0[_0x7ac5b7(0x18c)])==null?void 0x0:_0x59cf6d[_0x7ac5b7(0x1a5)](_0x12e31c=>_0x12e31c[_0x7ac5b7(0x230)]===_0x162316[_0x7ac5b7(0x230)]))??[];if(_0x37e37f[_0x7ac5b7(0x171)]!==0x1)return null;let _0x28e1c5=_0x37e37f[0x0],_0x428d4d=_0x480edf(_0x4065b0,_0x28e1c5),_0x51ca3a=_0x28e1c5['startIndex']-_0x428d4d,_0x569bbc=_0x162316[_0x7ac5b7(0x161)]==='end'?_0x51ca3a:_0x162316[_0x7ac5b7(0x161)];if(!Number[_0x7ac5b7(0x14a)](_0x569bbc)||_0x569bbc<0x0||_0x569bbc>_0x51ca3a)return null;let _0x4dc413=_0x428d4d+_0x569bbc;return{'startOffset':_0x4dc413,'endOffset':_0x4dc413};}if((_0x162316==null?void 0x0:_0x162316[_0x7ac5b7(0x1fe)])===_0x7ac5b7(0x203))return!Number['isInteger'](_0x162316[_0x7ac5b7(0x1c6)])||!Number['isInteger'](_0x162316[_0x7ac5b7(0x172)])?null:{'startOffset':Math[_0x7ac5b7(0x197)](_0x162316[_0x7ac5b7(0x1c6)],_0x162316[_0x7ac5b7(0x172)]),'endOffset':Math[_0x7ac5b7(0x14c)](_0x162316[_0x7ac5b7(0x1c6)],_0x162316[_0x7ac5b7(0x172)])};let _0x4c53e7=(_0x162316==null?void 0x0:_0x162316[_0x7ac5b7(0x1fe)])===_0x7ac5b7(0x1bf)?_0x162316[_0x7ac5b7(0x1bf)]:_0x417eb6;return!_0x4c53e7||_0x4c53e7[_0x7ac5b7(0x1a4)]?null:{'startOffset':Math[_0x7ac5b7(0x197)](_0x4c53e7[_0x7ac5b7(0x1c6)],_0x4c53e7['endOffset']),'endOffset':Math[_0x7ac5b7(0x14c)](_0x4c53e7['startOffset'],_0x4c53e7[_0x7ac5b7(0x172)])};}function pt(_0x4abf9e,_0x3e2fb5,_0x360d04,_0x281269){const _0x529894=_0x217dd1;let _0x3d4ca6=_0x4abf9e[_0x529894(0x21f)](_0x3a97e6),_0x1d0b5d=_0x360d04[_0x529894(0x1b5)]('=')?_0x360d04[_0x529894(0x15f)](0x1):_0x360d04,_0x36a637=_0x3d4ca6['sequenceNodesBuilder'](_0x1d0b5d);if(!_0x36a637)return null;let _0x8fa8a6=_0x4abf9e[_0x529894(0x21f)](_0x506168),_0x3921f7=_0x4805eb({'qualifiers':_0x7f61b(_0x36a637),'explicitReferences':_0x281269??[],'resolveBinding':_0x366cb6=>_0x8fa8a6[_0x529894(0x19e)](_0x3e2fb5,_0x366cb6)});return _0x3921f7[_0x529894(0x17b)]===_0x529894(0x180)?_0x3921f7[_0x529894(0x17a)]:null;}function mt(_0x51fba5,_0x35c5fd,_0x38511f){const _0xf5248=_0x217dd1;var _0x28146e;let _0x4cc709=_0x25429d(0x6);for(;_0x51fba5!=null&&(_0x28146e=_0x51fba5[_0xf5248(0x210)])!=null&&_0x28146e[_0xf5248(0x196)](_0x1893ff=>_0x1893ff[_0xf5248(0x141)]===_0x4cc709)||_0x35c5fd[_0xf5248(0x213)](_0x38511f,_0x4cc709);)_0x4cc709=_0x25429d(0x6);return _0x4cc709;}function ht(_0x53242e){try{return Re(_0x53242e);}catch(_0x32047a){if(_0x32047a instanceof C)return null;throw _0x32047a;}}function gt(_0x5ecc5e){const _0x1a0c03=_0x217dd1;let _0x577fe7=_0x5ecc5e[_0x1a0c03(0x152)]&&_0x5ecc5e['nextDocumentData']?vt(_0x5ecc5e[_0x1a0c03(0x211)],_0x5ecc5e[_0x1a0c03(0x173)],_0x5ecc5e['previousDocumentData'],_0x5ecc5e[_0x1a0c03(0x1f6)],_0x5ecc5e[_0x1a0c03(0x1d2)],_0x5ecc5e[_0x1a0c03(0x14b)]):null;return _0x5ecc5e[_0x1a0c03(0x152)]&&_0x5ecc5e[_0x1a0c03(0x1f6)]&&!_0x577fe7?null:{'documentRedo':_0x577fe7,'resourceRedo':{'id':V['id'],'params':{'unitId':_0x5ecc5e[_0x1a0c03(0x173)],'resource':_0x5ecc5e[_0x1a0c03(0x159)]}},'resourceUndo':{'id':V['id'],'params':{'unitId':_0x5ecc5e[_0x1a0c03(0x173)],'resource':_0x5ecc5e[_0x1a0c03(0x142)]}}};}function _t(_0x9e71fd,_0x515445,_0x1d62d5,_0x4959d0){const _0x426dbf=_0x217dd1;_0x4959d0[_0x426dbf(0x151)]({'id':_0x9e71fd[_0x426dbf(0x14b)]+':'+_0x9e71fd[_0x426dbf(0x141)],'unitID':_0x9e71fd[_0x426dbf(0x173)],'redoMutations':[..._0x9e71fd['externalMutations'][_0x426dbf(0x16a)]?[_0x9e71fd['externalMutations'][_0x426dbf(0x16a)]]:[],..._0x515445[_0x426dbf(0x18d)]?[_0x515445[_0x426dbf(0x18d)]]:[],_0x515445['resourceRedo']],'undoMutations':[_0x515445['resourceUndo'],..._0x1d62d5?[_0x1d62d5]:[],..._0x9e71fd['externalMutations'][_0x426dbf(0x1a8)]?[_0x9e71fd[_0x426dbf(0x15b)][_0x426dbf(0x1a8)]]:[]]});}function J(_0x1f5cab){const _0x6ef4da=_0x217dd1;let _0x3d5518=_0x1f5cab[_0x6ef4da(0x219)][_0x6ef4da(0x21f)](_0x41c106),_0x47de34=_0x1f5cab[_0x6ef4da(0x219)][_0x6ef4da(0x21f)](_0xe640ba),_0x2e906d=_0x1f5cab['accessor'][_0x6ef4da(0x21f)](_0x3e1e55),_0x242dee=gt(_0x1f5cab);if(!_0x242dee)return!0x1;let _0x89a549=!0x1,_0x8193fd=null,_0x4a3ad3=!0x1;try{if(_0x1f5cab['externalMutations']['redoMutation']){if(!_0x3d5518[_0x6ef4da(0x170)](_0x1f5cab[_0x6ef4da(0x15b)][_0x6ef4da(0x16a)]['id'],_0x1f5cab[_0x6ef4da(0x15b)]['redoMutation']['params']))return!0x1;_0x89a549=!0x0;}if(_0x242dee['documentRedo']){let _0x3b918c=_0x3d5518[_0x6ef4da(0x170)](_0x242dee[_0x6ef4da(0x18d)]['id'],_0x242dee[_0x6ef4da(0x18d)]['params']);if(!_0x3b918c)return bt(_0x3d5518,_0x1f5cab[_0x6ef4da(0x15b)],_0x89a549),!0x1;_0x8193fd={'id':_0x2dc975['id'],'params':{..._0x3b918c,'noHistory':!0x0,'noNeedSetTextRange':!0x0,'segmentId':''}};}if(!_0x3d5518['syncExecuteCommand'](_0x242dee['resourceRedo']['id'],_0x242dee[_0x6ef4da(0x1cc)][_0x6ef4da(0x198)]))return yt(_0x3d5518,_0x8193fd),bt(_0x3d5518,_0x1f5cab[_0x6ef4da(0x15b)],_0x89a549),!0x1;_0x4a3ad3=!0x0,_t(_0x1f5cab,_0x242dee,_0x8193fd,_0x47de34);}catch(_0x2ae161){throw _0x4a3ad3&&_0x3d5518[_0x6ef4da(0x170)](_0x242dee[_0x6ef4da(0x187)]['id'],_0x242dee[_0x6ef4da(0x187)][_0x6ef4da(0x198)]),yt(_0x3d5518,_0x8193fd),bt(_0x3d5518,_0x1f5cab['externalMutations'],_0x89a549),_0x2ae161;}return _0x2e906d[_0x6ef4da(0x1d0)]([{'startOffset':_0x1f5cab[_0x6ef4da(0x1d2)],'endOffset':_0x1f5cab['cursorOffset'],'segmentId':''}],{'unitId':_0x1f5cab[_0x6ef4da(0x173)],'subUnitId':_0x1f5cab['unitId']},!0x1,{[_0x173f0a]:!0x0}),!0x0;}function vt(_0x2be42c,_0x38a912,_0x11c169,_0x26e643,_0x29eae8,_0x586681){let _0x4782ba=xt(_0x11c169,_0x26e643,_0x2ed637(_0x2be42c,''));return _0x4782ba?{'id':_0x2dc975['id'],'params':{'unitId':_0x38a912,'actions':_0x4782ba,'segmentId':'','textRanges':[{'startOffset':_0x29eae8,'endOffset':_0x29eae8,'collapsed':!0x0,'segmentId':''}],'isEditing':!0x1,'noHistory':!0x0,'noNeedSetTextRange':!0x0,'trigger':_0x586681}}:null;}function yt(_0x51be1e,_0x2912cb){const _0x3de5b3=_0x217dd1;_0x2912cb&&_0x51be1e[_0x3de5b3(0x170)](_0x2912cb['id'],_0x2912cb[_0x3de5b3(0x198)]);}function bt(_0x1fe2ff,_0x14ec56,_0x1fba62){const _0xf63ce=_0x217dd1;_0x1fba62&&_0x14ec56[_0xf63ce(0x1a8)]&&_0x1fe2ff[_0xf63ce(0x170)](_0x14ec56['undoMutation']['id'],_0x14ec56['undoMutation']['params']);}function xt(_0x52e1aa,_0x1070a5,_0x58a1f4){const _0x22e9fe=_0x217dd1;let _0x4e106a=_0x52e1aa[_0x22e9fe(0x220)],_0x358ee7=_0x1070a5['body'],_0x43a1ae=St(_0x4e106a==null?void 0x0:_0x4e106a['dataStream'],_0x358ee7==null?void 0x0:_0x358ee7[_0x22e9fe(0x153)]);if(!_0x43a1ae||!_0x358ee7)return null;let _0x9c6f50=new _0x52174a();return _0x9c6f50['retain'](_0x43a1ae['start']),_0x43a1ae[_0x22e9fe(0x1f9)]>0x0&&_0x9c6f50[_0x22e9fe(0x239)](_0x43a1ae[_0x22e9fe(0x1f9)],_0x252b2a(_0x358ee7,_0x43a1ae[_0x22e9fe(0x1a0)],_0x43a1ae[_0x22e9fe(0x1a0)]+_0x43a1ae['insertLength'],!0x1)),_0x43a1ae['deleteLength']>0x0&&_0x9c6f50[_0x22e9fe(0x1bb)](_0x43a1ae['deleteLength']),_0x267617[_0x22e9fe(0x17e)]()['editOp'](_0x9c6f50['serialize'](),_0x58a1f4);}function St(_0x3bda0e,_0xea8adb){const _0x1ccf97=_0x217dd1;if(_0x3bda0e==null||_0xea8adb==null||_0x3bda0e===_0xea8adb)return null;let _0x459067=0x0;for(;_0x459067<_0x3bda0e[_0x1ccf97(0x171)]&&_0x459067<_0xea8adb[_0x1ccf97(0x171)]&&_0x3bda0e[_0x459067]===_0xea8adb[_0x459067];)_0x459067+=0x1;let _0x25635e=_0x3bda0e[_0x1ccf97(0x171)],_0x69166a=_0xea8adb[_0x1ccf97(0x171)];for(;_0x25635e>_0x459067&&_0x69166a>_0x459067&&_0x3bda0e[_0x25635e-0x1]===_0xea8adb[_0x69166a-0x1];)--_0x25635e,--_0x69166a;return{'start':_0x459067,'deleteLength':_0x25635e-_0x459067,'insertLength':_0x69166a-_0x459067};}function Ct(_0x13e995){const _0x4bfcc2=_0x217dd1;return{'schemaVersion':0x1,'formulas':Object[_0x4bfcc2(0x225)](Object[_0x4bfcc2(0x183)](_0x13e995['formulas'])[_0x4bfcc2(0x164)](([_0x3cc414,_0x56caf2])=>[_0x3cc414,{..._0x56caf2,..._0x56caf2[_0x4bfcc2(0x179)]?{'numberFormat':{..._0x56caf2[_0x4bfcc2(0x179)]}}:null,..._0x56caf2[_0x4bfcc2(0x1da)]?{'lastValue':{..._0x56caf2[_0x4bfcc2(0x1da)]}}:null}]))};}let Y=class extends _0x18377d{constructor(_0x34e44e,_0x1dd4ab,_0x4f58af,_0x48cbd1){const _0x2a5abf=_0x217dd1;super(),this['_instanceService']=_0x34e44e,this[_0x2a5abf(0x1cf)]=_0x1dd4ab,this[_0x2a5abf(0x235)]=_0x4f58af,this[_0x2a5abf(0x1fb)]=_0x48cbd1,N(this,_0x2a5abf(0x1ee),new Set()),N(this,_0x2a5abf(0x189),!0x1),N(this,_0x2a5abf(0x229),!0x1),this[_0x2a5abf(0x162)][_0x2a5abf(0x147)](_0x138c8e[_0x2a5abf(0x17f)])[_0x2a5abf(0x1b2)](_0x519d67=>this[_0x2a5abf(0x1fb)][_0x2a5abf(0x1f1)](_0x519d67)),this['disposeWithMe'](this[_0x2a5abf(0x235)][_0x2a5abf(0x221)][_0x2a5abf(0x1ca)](({unitId:_0x5e642e})=>this[_0x2a5abf(0x1ff)](_0x5e642e))),this[_0x2a5abf(0x144)](this['_instanceService']['unitAdded$'][_0x2a5abf(0x1ca)](({unit:_0x453977})=>{const _0x5adab8=_0x2a5abf;_0x453977[_0x5adab8(0x1fe)]===_0x138c8e[_0x5adab8(0x17f)]&&this[_0x5adab8(0x184)](_0x453977['getUnitId']());})),this[_0x2a5abf(0x144)](this[_0x2a5abf(0x162)][_0x2a5abf(0x165)][_0x2a5abf(0x1ca)](_0x473bc1=>{const _0x4c5b09=_0x2a5abf;this[_0x4c5b09(0x1fb)][_0x4c5b09(0x17c)](_0x473bc1[_0x4c5b09(0x18f)]());})),this[_0x2a5abf(0x144)](this[_0x2a5abf(0x1cf)][_0x2a5abf(0x1ec)](_0x3dc0fa=>{const _0x2b81db=_0x2a5abf;if(_0x3dc0fa['id']===_0x2dc975['id']&&wt(_0x3dc0fa[_0x2b81db(0x198)])){let _0x1112e9=_0x3dc0fa['params'];_0x1112e9[_0x2b81db(0x1a4)]||this[_0x2b81db(0x1ff)](_0x1112e9[_0x2b81db(0x173)]);}}));}[_0x217dd1(0x15c)](){const _0x233b29=_0x217dd1;this[_0x233b29(0x229)]=!0x0,super[_0x233b29(0x15c)]();}[_0x217dd1(0x184)](_0x3ccb93){const _0x6117f8=_0x217dd1;this[_0x6117f8(0x1ee)][_0x6117f8(0x1e2)](_0x3ccb93),!this[_0x6117f8(0x189)]&&(this[_0x6117f8(0x189)]=!0x0,queueMicrotask(()=>{const _0x374227=_0x6117f8;if(this[_0x374227(0x189)]=!0x1,this[_0x374227(0x229)])return;let _0x543600=Array[_0x374227(0x15a)](this['_pendingUnitIds']);this[_0x374227(0x1ee)][_0x374227(0x21d)](),_0x543600['forEach'](_0x4f0e70=>this[_0x374227(0x1ff)](_0x4f0e70));}));}['_syncUnit'](_0xf760cc){const _0x48a762=_0x217dd1;let _0x5950f7=this['_instanceService'][_0x48a762(0x16c)](_0xf760cc,_0x138c8e['UNIVER_DOC']);_0x5950f7&&this[_0x48a762(0x1fb)][_0x48a762(0x1f1)](_0x5950f7);}};Y=I([F(0x0,_0x147b46),F(0x1,_0x41c106),F(0x2,_0x5e32df(P)),F(0x3,_0x5e32df(L))],Y);function wt(_0x197089){const _0x5d4dd7=_0x217dd1;return typeof _0x197089==_0x5d4dd7(0x1ea)&&!!_0x197089&&_0x5d4dd7(0x173)in _0x197089&&typeof _0x197089[_0x5d4dd7(0x173)]==_0x5d4dd7(0x22e)&&(!(_0x5d4dd7(0x1a4)in _0x197089)||_0x197089['segmentId']===void 0x0||typeof _0x197089[_0x5d4dd7(0x1a4)]==_0x5d4dd7(0x22e));}let X=class extends _0x18377d{constructor(_0x3ffb79,_0x5e3616){const _0x39df9a=_0x217dd1;super(),this[_0x39df9a(0x1ed)]=_0x3ffb79,this[_0x39df9a(0x18e)]=_0x5e3616,this[_0x39df9a(0x144)](this['_resourceManagerService'][_0x39df9a(0x218)]({'pluginName':y,'businesses':[_0x138c8e[_0x39df9a(0x17f)]],'toJson':_0x307fe0=>JSON['stringify'](this[_0x39df9a(0x18e)][_0x39df9a(0x1cb)](_0x307fe0)),'parseJson':_0x3013ba=>JSON[_0x39df9a(0x21e)](_0x3013ba),'onLoad':(_0x25bd54,_0x1b7f1b)=>{const _0x513c58=_0x39df9a;this[_0x513c58(0x18e)][_0x513c58(0x1f8)](_0x25bd54,_0x1b7f1b);},'onUnLoad':_0x489680=>this['_docFormulaModel'][_0x39df9a(0x193)](_0x489680)}));}};X=I([F(0x0,_0x2d200b),F(0x1,_0x5e32df(P))],X);var Tt=_0x217dd1(0x1a2),Et=_0x217dd1(0x232);const Dt={};let Z=class extends _0x18377d{constructor(_0x354703,_0x896f11,_0x154eb8){const _0x5621fa=_0x217dd1;super(),this['_univerInstanceService']=_0x354703,this[_0x5621fa(0x1e4)]=_0x896f11,this[_0x5621fa(0x144)](_0x154eb8[_0x5621fa(0x1e3)]({'resolve':(_0x3579e5,_0x33487f)=>{const _0x4f3b91=_0x5621fa;var _0x146552;return((_0x146552=_0x33487f[_0x4f3b91(0x210)])==null?void 0x0:_0x146552['filter'](w)[_0x4f3b91(0x164)](_0x1f40f4=>({'startOffset':_0x1f40f4['startIndex'],'endOffset':_0x1f40f4[_0x4f3b91(0x1fc)]+0x1,'text':this[_0x4f3b91(0x1e6)](_0x3579e5,_0x1f40f4[_0x4f3b91(0x141)])})))??[];}})),this['disposeWithMe'](this[_0x5621fa(0x1e4)][_0x5621fa(0x22a)][_0x5621fa(0x1ca)](({unitId:_0x206576})=>{const _0x39b4af=_0x5621fa;_0x154eb8[_0x39b4af(0x149)](_0x206576);}));}[_0x217dd1(0x1e6)](_0x571e3b,_0x53fa09){const _0x18ff6e=_0x217dd1;var _0x7c7ee9;return((_0x7c7ee9=this[_0x18ff6e(0x1e4)]['getResult']({'unitId':_0x571e3b,'rangeId':_0x53fa09}))==null?void 0x0:_0x7c7ee9[_0x18ff6e(0x201)])??'';}[_0x217dd1(0x1d1)](_0xbbd049,_0xdd5fd3,_0x5f1a82){const _0x32e49d=_0x217dd1;var _0x371394;let _0x434ec2=this['_univerInstanceService'][_0x32e49d(0x16c)](_0xbbd049,_0x138c8e[_0x32e49d(0x17f)]),_0x89cec4=_0x434ec2==null?void 0x0:_0x434ec2['getBody']();if(!_0x89cec4)return'';let _0x570218=_0x89cec4[_0x32e49d(0x153)][_0x32e49d(0x15f)](_0xdd5fd3,_0x5f1a82),_0x1dce36=((_0x371394=_0x89cec4['customRanges'])==null?void 0x0:_0x371394[_0x32e49d(0x1a5)](_0x2d16e2=>w(_0x2d16e2)&&_0x2d16e2[_0x32e49d(0x1e7)]>=_0xdd5fd3&&_0x2d16e2['endIndex']<_0x5f1a82)[_0x32e49d(0x1b9)]((_0x3f2769,_0x315471)=>_0x315471[_0x32e49d(0x1e7)]-_0x3f2769[_0x32e49d(0x1e7)]))??[];for(let _0x1104f8 of _0x1dce36){let _0x7af921=_0x1104f8['startIndex']-_0xdd5fd3,_0x1d6b27=_0x1104f8[_0x32e49d(0x1fc)]-_0xdd5fd3+0x1;_0x570218=''+_0x570218[_0x32e49d(0x15f)](0x0,_0x7af921)+this[_0x32e49d(0x1e6)](_0xbbd049,_0x1104f8[_0x32e49d(0x141)])+_0x570218[_0x32e49d(0x15f)](_0x1d6b27);}return _0x570218;}['degradeDocumentData'](_0x25a2de){return Ot(_0x25a2de);}[_0x217dd1(0x22b)](_0x23bae8,_0x1180ff,_0x153998={}){const _0x4e79d5=_0x217dd1;var _0x32fe0a;return Ve({'id':_0x23bae8,'body':_0x1180ff,'documentStyle':{}},(((_0x32fe0a=_0x1180ff[_0x4e79d5(0x210)])==null?void 0x0:_0x32fe0a[_0x4e79d5(0x1a5)](w))??[])[_0x4e79d5(0x164)](_0x4c786e=>({'rangeId':_0x4c786e[_0x4e79d5(0x141)],'text':_0x153998[_0x4c786e['rangeId']]??this[_0x4e79d5(0x1e6)](_0x23bae8,_0x4c786e[_0x4e79d5(0x141)])})))[_0x4e79d5(0x220)]??{'dataStream':''};}};Z=I([F(0x0,_0x147b46),F(0x1,_0x5e32df(L)),F(0x2,_0x5e32df(_0xbd430a))],Z);function Ot(_0x350b18){const _0x18860e=_0x217dd1;var _0x38873c,_0x508833;let _0x46aaf6=kt(_0x350b18),_0x3997c7=Ve(_0x350b18,(((_0x38873c=_0x350b18[_0x18860e(0x220)])==null||(_0x38873c=_0x38873c['customRanges'])==null?void 0x0:_0x38873c[_0x18860e(0x1a5)](w))??[])[_0x18860e(0x164)](_0x43a8d3=>({'rangeId':_0x43a8d3['rangeId'],'text':At(_0x46aaf6==null?void 0x0:_0x46aaf6[_0x18860e(0x1d7)][_0x43a8d3[_0x18860e(0x141)]])})));return _0x3997c7[_0x18860e(0x192)]=(_0x508833=_0x3997c7['resources'])==null?void 0x0:_0x508833['filter'](_0x2d81ca=>_0x2d81ca[_0x18860e(0x199)]!==y),_0x3997c7;}function kt(_0x52951a){const _0x27c6bc=_0x217dd1;var _0x4d71d5;let _0x29ce75=(_0x4d71d5=_0x52951a[_0x27c6bc(0x192)])==null||(_0x4d71d5=_0x4d71d5[_0x27c6bc(0x174)](_0x3300bd=>_0x3300bd['name']===_0x27c6bc(0x156)))==null?void 0x0:_0x4d71d5[_0x27c6bc(0x181)];if(_0x29ce75)try{let _0x5dc692=JSON['parse'](_0x29ce75);return x(_0x5dc692)?_0x5dc692:void 0x0;}catch{return;}}function At(_0x4438fc){const _0xe8ed7b=_0x217dd1;return _0x4438fc?_0x27458f({'lastValue':_0x4438fc[_0xe8ed7b(0x1da)],'numberFormat':_0x4438fc[_0xe8ed7b(0x179)]})[_0xe8ed7b(0x201)]:'';}let Q=class extends _0x18377d{constructor(_0x512f01,_0x14f8b2,_0x45e783){const _0x28d510=_0x217dd1;super(),this[_0x28d510(0x1e4)]=_0x512f01,this['_cacheEligibilityService']=_0x14f8b2,this[_0x28d510(0x144)](_0x45e783[_0x28d510(0x209)](this));}['collectMutations'](_0x24e167){const _0x12c09f=_0x217dd1;let _0x1ce1cd=new Map();for(let _0xc024ef of this[_0x12c09f(0x1e4)][_0x12c09f(0x205)]()){var _0xcad0ea;if(!this[_0x12c09f(0x16b)][_0x12c09f(0x14f)](_0xc024ef['config'][_0x12c09f(0x1ab)],_0xc024ef[_0x12c09f(0x202)])[_0x12c09f(0x21c)])continue;let _0x53e971=_0x2973cb(_0xc024ef[_0x12c09f(0x202)]),_0x23d02e=_0x53e971?_0x1b8769(_0x53e971):null;if(!_0x23d02e||jt(_0xc024ef[_0x12c09f(0x1ba)][_0x12c09f(0x1da)],_0x23d02e))continue;let _0x4e97dc=_0x1ce1cd[_0x12c09f(0x21f)](_0xc024ef[_0x12c09f(0x1c8)][_0x12c09f(0x173)])??[];_0x4e97dc[_0x12c09f(0x23b)]({'rangeId':_0xc024ef[_0x12c09f(0x1c8)]['rangeId'],'expectedFormula':_0xc024ef[_0x12c09f(0x1ba)]['formula'],'expectedNumberFormat':(_0xcad0ea=_0xc024ef['config'][_0x12c09f(0x179)])==null?void 0x0:_0xcad0ea[_0x12c09f(0x228)],'expectedReferenceRevision':_0xc024ef[_0x12c09f(0x1c9)],'lastValue':_0x23d02e}),_0x1ce1cd[_0x12c09f(0x1a1)](_0xc024ef[_0x12c09f(0x1c8)][_0x12c09f(0x173)],_0x4e97dc);}return Array[_0x12c09f(0x15a)](_0x1ce1cd,([_0x4ce7fd,_0x511e9b])=>({'id':H['id'],'params':{'unitId':_0x4ce7fd,'updates':_0x511e9b}}));}};Q=I([F(0x0,_0x5e32df(L)),F(0x1,_0x5e32df(_0x4f9c1c)),F(0x2,_0x5e32df(_0x12a840))],Q);function _0x28ce(_0x19524e,_0x1a7892){_0x19524e=_0x19524e-0x140;const _0x2a6feb=_0x2a6f();let _0x28cee0=_0x2a6feb[_0x19524e];return _0x28cee0;}function jt(_0x18f5ca,_0x1ee31e){const _0x3acddf=_0x217dd1;return(_0x18f5ca==null?void 0x0:_0x18f5ca['v'])===_0x1ee31e['v']&&(_0x18f5ca==null?void 0x0:_0x18f5ca['t'])===_0x1ee31e['t']&&(_0x18f5ca==null?void 0x0:_0x18f5ca['pattern'])===_0x1ee31e[_0x3acddf(0x228)];}let $=class extends _0x2b73e4{constructor(_0x262881=Dt,_0x3acb9a,_0x3821a4,_0xca9cb2){const _0x69240f=_0x217dd1;super(),this[_0x69240f(0x208)]=_0x262881,this[_0x69240f(0x14e)]=_0x3acb9a,this[_0x69240f(0x1cf)]=_0x3821a4,this[_0x69240f(0x1dc)]=_0xca9cb2;let {..._0x2e27c2}=_0x59447c({},Dt,this[_0x69240f(0x208)]);this[_0x69240f(0x1dc)][_0x69240f(0x1e9)](_0x69240f(0x177),_0x2e27c2);}[_0x217dd1(0x1e0)](){const _0x492f94=_0x217dd1;this[_0x492f94(0x14e)][_0x492f94(0x1e2)]([P]),this[_0x492f94(0x14e)][_0x492f94(0x1e2)]([L]),this['_injector'][_0x492f94(0x1e2)]([X]),this[_0x492f94(0x14e)][_0x492f94(0x1e2)]([Y]),this['_injector']['add']([Q]),this['_injector'][_0x492f94(0x1e2)]([Z]),_0x53385a(this[_0x492f94(0x14e)],[[P],[X],[Y],[Q],[Z]]),[ot,st,V,H,U,W,G,K,ct,lt][_0x492f94(0x1b2)](_0x155fbf=>this[_0x492f94(0x144)](this['_commandService'][_0x492f94(0x1a7)](_0x155fbf)));}};N($,_0x217dd1(0x20c),y),N($,_0x217dd1(0x1c0),Tt),N($,'version',Et),N($,_0x217dd1(0x1fe),_0x138c8e[_0x217dd1(0x17f)]),$=I([_0x4eb3b4(_0x3855ef,_0x5bf116,_0x50ecdf),F(0x1,_0x5e32df(_0x11059a)),F(0x2,_0x41c106),F(0x3,_0x35fc54)],$);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 _0x3a7f13=_0x53b8;(function(_0x9328e1,_0x131692){const _0x1e12e8=_0x53b8,_0x5c827a=_0x9328e1();while(!![]){try{const _0x31ada3=-parseInt(_0x1e12e8(0x187))/0x1*(-parseInt(_0x1e12e8(0x1c3))/0x2)+parseInt(_0x1e12e8(0x22d))/0x3+parseInt(_0x1e12e8(0x196))/0x4*(-parseInt(_0x1e12e8(0x1e3))/0x5)+parseInt(_0x1e12e8(0x1c8))/0x6*(-parseInt(_0x1e12e8(0x263))/0x7)+parseInt(_0x1e12e8(0x1f2))/0x8*(-parseInt(_0x1e12e8(0x26b))/0x9)+-parseInt(_0x1e12e8(0x24c))/0xa*(-parseInt(_0x1e12e8(0x19b))/0xb)+parseInt(_0x1e12e8(0x1b8))/0xc;if(_0x31ada3===_0x131692)break;else _0x5c827a['push'](_0x5c827a['shift']());}catch(_0x2dfca3){_0x5c827a['push'](_0x5c827a['shift']());}}}(_0x52b2,0x5549a));import{FormulaCacheEligibilityService as _0x13ac3a,FormulaLastValuePersistenceService as _0x416b1f,HostExternalReferenceModel as _0xceeb38,UniverProFormulaEnginePlugin as _0x513513,buildUpsertHostExternalReferenceMutations as _0x3b0f43,collectFormulaExternalReferenceQualifiers as _0x48d68a,getScalarFormulaResultCell as _0x3ee924,resolveFormulaResultPresentation as _0x12221e,resolveHostFormulaExternalReferences as _0x5d5293,toFormulaLastValue as _0x5a1b13}from'@univerjs-pro/engine-formula';import{CellValueType as _0x320583,CommandType as _0x16d163,CustomRangeType as _0x38abe7,DataStreamTreeTokenType as _0x3c59f5,DependentOn as _0x37da81,Disposable as _0x533030,ICommandService as _0x9a0954,IConfigService as _0x4226f8,IResourceManagerService as _0x164b3f,IUndoRedoService as _0x16e8d6,IUniverInstanceService as _0x2629d5,Inject as _0x5d6038,Injector as _0x2a8248,JSONX as _0x5e930b,Plugin as _0x26195d,TextX as _0x556769,Tools as _0x5a1e4f,UniverInstanceType as _0x4aa394,generateRandomId as _0x32ab18,getBodySliceForTextXAction as _0x282876,getCustomRangeInterval as _0x4f97d4,getParagraphContentStartOffset as _0x19d939,getRichTextEditPath as _0x410a7f,merge as _0x4e3800,shiftExclusiveRangeOnDelete as _0x422036,shiftExclusiveRangeOnInsert as _0x514d4f,shiftInclusiveRangeOnDelete as _0x433aa0,shiftInclusiveRangeOnInsert as _0x4b4cb7,touchDependencies as _0xddcf97}from'@univerjs/core';import{DOC_SELECTION_OPTION_PRESERVE_CARET as _0x5393de,DocSelectionManagerService as _0x3d26b2,DocTextResolverService as _0x2459b3,RichTextEditingMutation as _0xd26f03,UniverDocsPlugin as _0x46761e}from'@univerjs/docs';import{FormulaResultStatus as _0x2c8d51,LexerTreeBuilder as _0x9fae86,OtherFormulaBizType as _0x2b96ca,RegisterOtherFormulaService as _0x16b5f1}from'@univerjs/engine-formula';import{Subject as _0x52ee64}from'rxjs';import{UniverLicensePlugin as _0x3344bd}from'@univerjs-pro/license';const y=_0x3a7f13(0x232),je=_0x3a7f13(0x1b3),Me='';function b(){return{'formulas':{}};}function x(_0x468856){const _0x21a001=_0x3a7f13;return!_0x468856||typeof _0x468856!='object'||!(_0x21a001(0x264)in _0x468856)||!_0x468856['formulas']||typeof _0x468856[_0x21a001(0x264)]!='object'||Array['isArray'](_0x468856[_0x21a001(0x264)])?!0x1:Object[_0x21a001(0x249)](_0x468856[_0x21a001(0x264)])[_0x21a001(0x186)](([_0x5bc57c,_0x5bb470])=>_0x5bc57c[_0x21a001(0x218)]>0x0&&Ne(_0x5bb470));}function _0x53b8(_0x2201e4,_0x55d4b0){_0x2201e4=_0x2201e4-0x180;const _0x52b22e=_0x52b2();let _0x53b8d2=_0x52b22e[_0x2201e4];return _0x53b8d2;}function Ne(_0x3b9f52){const _0x1751a0=_0x3a7f13;return!_0x3b9f52||typeof _0x3b9f52!='object'||!S(_0x3b9f52,[_0x1751a0(0x24d),_0x1751a0(0x230),_0x1751a0(0x1ff)])||!('formula'in _0x3b9f52)||typeof _0x3b9f52['formula']!='string'||!_0x3b9f52[_0x1751a0(0x24d)]['trim']()||_0x1751a0(0x230)in _0x3b9f52&&_0x3b9f52['numberFormat']!=null&&(typeof _0x3b9f52['numberFormat']!='object'||!S(_0x3b9f52[_0x1751a0(0x230)],[_0x1751a0(0x229)])||!(_0x1751a0(0x229)in _0x3b9f52[_0x1751a0(0x230)])||typeof _0x3b9f52[_0x1751a0(0x230)][_0x1751a0(0x229)]!='string')?!0x1:!('lastValue'in _0x3b9f52)||_0x3b9f52[_0x1751a0(0x1ff)]==null||Pe(_0x3b9f52[_0x1751a0(0x1ff)]);}function Pe(_0x2df729){const _0x43ed20=_0x3a7f13;return!_0x2df729||typeof _0x2df729!=_0x43ed20(0x247)||!S(_0x2df729,['v','t',_0x43ed20(0x229)])||!('v'in _0x2df729)||_0x2df729['v']!==null&&typeof _0x2df729['v']!=_0x43ed20(0x25f)&&typeof _0x2df729['v']!='number'&&typeof _0x2df729['v']!=_0x43ed20(0x1a2)||'t'in _0x2df729&&_0x2df729['t']!=null&&!Fe(_0x2df729['t'])?!0x1:!(_0x43ed20(0x229)in _0x2df729)||_0x2df729[_0x43ed20(0x229)]==null||typeof _0x2df729[_0x43ed20(0x229)]==_0x43ed20(0x25f);}function S(_0x4f7174,_0x249d11){const _0x22d68f=_0x3a7f13;let _0x5076cd=new Set(_0x249d11);return Object[_0x22d68f(0x241)](_0x4f7174)['every'](_0x1b71e1=>_0x5076cd[_0x22d68f(0x260)](_0x1b71e1));}function Fe(_0x25cf79){const _0x3c817f=_0x3a7f13;return typeof _0x25cf79=='number'&&Object['values'](_0x320583)[_0x3c817f(0x21f)](_0x25cf79);}const Ie=new Set([_0x3c59f5[_0x3a7f13(0x1d5)],_0x3c59f5[_0x3a7f13(0x1dd)],_0x3c59f5[_0x3a7f13(0x22c)],_0x3c59f5[_0x3a7f13(0x1ec)],_0x3c59f5[_0x3a7f13(0x279)],_0x3c59f5[_0x3a7f13(0x246)],_0x3c59f5[_0x3a7f13(0x185)],_0x3c59f5[_0x3a7f13(0x1ba)],_0x3c59f5['COLUMN_START'],_0x3c59f5[_0x3a7f13(0x18b)],_0x3c59f5[_0x3a7f13(0x1bb)],_0x3c59f5[_0x3a7f13(0x1c2)],_0x3c59f5[_0x3a7f13(0x1fa)],_0x3c59f5['CUSTOM_BLOCK']]);var C=class extends Error{constructor(){super('Doc\x20Formula\x20range\x20cannot\x20cross\x20document\x20structure\x20boundaries');}};function Le(_0x3cff8b){const _0x178960=_0x3a7f13;var _0x4f1467,_0x3c367c;let _0x3ffeab=_0x5a1e4f[_0x178960(0x201)](_0x3cff8b[_0x178960(0x1c6)]),_0x2c9849=O(_0x3ffeab),{startOffset:_0x5842c4,endOffset:_0x2617a6}=We(_0x2c9849,_0x3cff8b[_0x178960(0x23e)],_0x3cff8b[_0x178960(0x21d)]);Ve(_0x2c9849,_0x5842c4,_0x2617a6);let _0x23bc8c=((_0x4f1467=_0x2c9849['customRanges'])==null?void 0x0:_0x4f1467['filter'](_0x31d1ca=>{const _0x3a3cb6=_0x178960;if(!w(_0x31d1ca))return!0x1;let _0x576375=_0x4f97d4(_0x31d1ca);return _0x576375[_0x3a3cb6(0x21d)]>_0x5842c4&&_0x576375[_0x3a3cb6(0x23e)]<_0x2617a6;})[_0x178960(0x266)](_0x1af40c=>_0x1af40c[_0x178960(0x23f)]))??[];qe(_0x2c9849,_0x5842c4,_0x2617a6,''),_0x2c9849[_0x178960(0x182)]=[...((_0x3c367c=_0x2c9849[_0x178960(0x182)])==null?void 0x0:_0x3c367c[_0x178960(0x280)](_0x2d4851=>!_0x23bc8c['includes'](_0x2d4851['rangeId'])&&_0x2d4851['rangeId']!==_0x3cff8b[_0x178960(0x23f)]))??[],He(_0x3cff8b[_0x178960(0x23f)],_0x5842c4)][_0x178960(0x20e)]((_0x26a2ab,_0x3d3052)=>_0x26a2ab['startIndex']-_0x3d3052[_0x178960(0x254)]);let _0x251d51=Ue(_0x3cff8b[_0x178960(0x1a5)]);return _0x23bc8c['forEach'](_0x52de0e=>{delete _0x251d51['formulas'][_0x52de0e];}),_0x251d51[_0x178960(0x264)][_0x3cff8b['rangeId']]=_0x5a1e4f['deepClone'](_0x3cff8b[_0x178960(0x270)]),{'nextDocumentData':_0x3ffeab,'nextResource':_0x251d51,'cursorOffset':_0x5842c4+0x1};}function Re(_0x9e9209){const _0x66310b=_0x3a7f13;var _0x2c6cd7,_0x5bf3d5;let _0x5d9611=_0x5a1e4f['deepClone'](_0x9e9209[_0x66310b(0x1c6)]),_0x5d175e=(_0x2c6cd7=O(_0x5d9611)['customRanges'])==null?void 0x0:_0x2c6cd7[_0x66310b(0x19d)](_0x5adfc2=>_0x5adfc2[_0x66310b(0x23f)]===_0x9e9209[_0x66310b(0x23f)]&&w(_0x5adfc2));if(!_0x5d175e||!((_0x5bf3d5=_0x9e9209[_0x66310b(0x1a5)])!=null&&_0x5bf3d5[_0x66310b(0x264)][_0x9e9209[_0x66310b(0x23f)]]))return null;let _0x3f9a1d=Ue(_0x9e9209['resource']);return _0x3f9a1d[_0x66310b(0x264)][_0x9e9209[_0x66310b(0x23f)]]=_0x5a1e4f[_0x66310b(0x201)](_0x9e9209[_0x66310b(0x270)]),{'nextDocumentData':_0x5d9611,'nextResource':_0x3f9a1d,'cursorOffset':_0x5d175e[_0x66310b(0x221)]+0x1};}function ze(_0x8008f9){const _0x5ab265=_0x3a7f13;let _0x5e6d1c=_0x5a1e4f[_0x5ab265(0x201)](_0x8008f9[_0x5ab265(0x1c6)]),_0x5a7e08=Je(_0x5e6d1c,_0x8008f9[_0x5ab265(0x23f)],_0x8008f9['text']??'');if(_0x5a7e08==null)return null;let _0x2f32cc=Ue(_0x8008f9[_0x5ab265(0x1a5)]);return delete _0x2f32cc['formulas'][_0x8008f9[_0x5ab265(0x23f)]],{'nextDocumentData':_0x5e6d1c,'nextResource':_0x2f32cc,'cursorOffset':_0x5a7e08};}function Be(_0x112710,_0x28abb6){const _0x447d65=_0x3a7f13;var _0x3ef21c;let _0x5dfc4a=_0x5a1e4f[_0x447d65(0x201)](_0x112710),_0x4268a4=_0x5dfc4a[_0x447d65(0x1b4)];if(!_0x4268a4)return _0x5dfc4a;let _0x134355=new Map(_0x28abb6[_0x447d65(0x266)](_0x40f755=>[_0x40f755['rangeId'],_0x40f755[_0x447d65(0x192)]])),_0x171177=((_0x3ef21c=_0x4268a4[_0x447d65(0x182)])==null?void 0x0:_0x3ef21c[_0x447d65(0x280)](_0x4445a2=>w(_0x4445a2)&&_0x134355[_0x447d65(0x260)](_0x4445a2['rangeId']))[_0x447d65(0x20e)]((_0x26c3ff,_0x219773)=>_0x219773[_0x447d65(0x254)]-_0x26c3ff['startIndex']))??[];for(let _0x229a8a of _0x171177)Je(_0x5dfc4a,_0x229a8a[_0x447d65(0x23f)],_0x134355[_0x447d65(0x1b1)](_0x229a8a[_0x447d65(0x23f)])??'');return _0x5dfc4a;}function w(_0x3fc54e){const _0x4d30ae=_0x3a7f13;var _0x394916;return(_0x3fc54e==null?void 0x0:_0x3fc54e[_0x4d30ae(0x213)])===_0x38abe7[_0x4d30ae(0x1cc)]&&_0x3fc54e[_0x4d30ae(0x20d)]===!0x0&&((_0x394916=_0x3fc54e[_0x4d30ae(0x1a0)])==null?void 0x0:_0x394916['kind'])===_0x4d30ae(0x1b3);}function T(_0x2361f6,_0x5a3446){const _0x328429=_0x3a7f13;var _0x5e8934;return _0x2361f6==null||(_0x5e8934=_0x2361f6[_0x328429(0x182)])==null?void 0x0:_0x5e8934[_0x328429(0x19d)](_0x552181=>_0x552181[_0x328429(0x23f)]===_0x5a3446&&w(_0x552181));}function Ve(_0x3dcf85,_0x315322,_0x1cc193){const _0x1a283c=_0x3a7f13;if(_0x315322===_0x1cc193){if(Ie[_0x1a283c(0x260)](_0x3dcf85['dataStream'][_0x315322]))throw new C();}else{for(let _0x2e763c=_0x315322;_0x2e763c<_0x1cc193;_0x2e763c++)if(_0x3dcf85[_0x1a283c(0x1f4)][_0x2e763c]===_0x3c59f5[_0x1a283c(0x18c)]||Ie[_0x1a283c(0x260)](_0x3dcf85['dataStream'][_0x2e763c]))throw new C();}}function He(_0x5c2062,_0xe42fc7){return{'startIndex':_0xe42fc7,'endIndex':_0xe42fc7,'rangeId':_0x5c2062,'rangeType':_0x38abe7['CUSTOM'],'wholeEntity':!0x0,'properties':{'kind':je}};}function Ue(_0x37ebe4){const _0x53b378=_0x3a7f13;return _0x37ebe4?_0x5a1e4f[_0x53b378(0x201)](_0x37ebe4):b();}function We(_0x19cd40,_0xe0eefd,_0x5bd9f9){const _0xcc8a8a=_0x3a7f13;let _0x17ca85=Ke(_0x19cd40),_0xd8f963=_0xe0eefd??_0x17ca85,_0x17ee48=_0x5bd9f9??_0xd8f963;return{'startOffset':Ge(Math[_0xcc8a8a(0x211)](_0xd8f963,_0x17ee48),_0x17ca85),'endOffset':Ge(Math[_0xcc8a8a(0x222)](_0xd8f963,_0x17ee48),_0x17ca85)};}function Ge(_0x375055,_0x4718fa){const _0x31e305=_0x3a7f13;return Math[_0x31e305(0x222)](0x0,Math[_0x31e305(0x211)](_0x375055,_0x4718fa));}function Ke(_0xed0bce){const _0x1abdcc=_0x3a7f13;return _0xed0bce['dataStream'][_0x1abdcc(0x27a)](''+_0x3c59f5[_0x1abdcc(0x18c)]+_0x3c59f5[_0x1abdcc(0x1d5)])?Math['max'](0x0,_0xed0bce[_0x1abdcc(0x1f4)]['length']-0x2):_0xed0bce[_0x1abdcc(0x1f4)][_0x1abdcc(0x27a)](_0x3c59f5[_0x1abdcc(0x1d5)])?Math[_0x1abdcc(0x222)](0x0,_0xed0bce[_0x1abdcc(0x1f4)][_0x1abdcc(0x218)]-0x1):_0xed0bce['dataStream'][_0x1abdcc(0x218)];}function qe(_0x5cc2e5,_0x5271f2,_0x101cf0,_0x5079dc){_0x101cf0>_0x5271f2&&Xe(_0x5cc2e5,_0x5271f2,_0x101cf0),Ye(_0x5cc2e5,_0x5271f2,_0x5079dc);}function Je(_0x2694db,_0x20623e,_0x20552e){const _0x49e854=_0x3a7f13;var _0x37d030,_0x5a301e;let _0x519733=O(_0x2694db),_0x2d86a1=(_0x37d030=_0x519733[_0x49e854(0x182)])==null?void 0x0:_0x37d030[_0x49e854(0x19d)](_0x3c66de=>_0x3c66de[_0x49e854(0x23f)]===_0x20623e&&w(_0x3c66de));if(!_0x2d86a1)return null;let _0x124735=_0x4f97d4(_0x2d86a1);return qe(_0x519733,_0x124735[_0x49e854(0x23e)],_0x124735[_0x49e854(0x21d)],_0x20552e),_0x519733[_0x49e854(0x182)]=(_0x5a301e=_0x519733[_0x49e854(0x182)])==null?void 0x0:_0x5a301e[_0x49e854(0x280)](_0x93718f=>_0x93718f[_0x49e854(0x23f)]!==_0x20623e),_0x124735['startOffset']+_0x20552e[_0x49e854(0x218)];}function Ye(_0x215332,_0x1f4b18,_0x1ddf31){const _0x26c1d5=_0x3a7f13;_0x1ddf31&&(_0x215332[_0x26c1d5(0x1f4)]=''+_0x215332[_0x26c1d5(0x1f4)][_0x26c1d5(0x1f7)](0x0,_0x1f4b18)+_0x1ddf31+_0x215332[_0x26c1d5(0x1f4)][_0x26c1d5(0x1f7)](_0x1f4b18),Ze(_0x215332,_0x1f4b18,_0x1ddf31[_0x26c1d5(0x218)]));}function Xe(_0x23d4ee,_0x314c40,_0xff27ca){const _0x5216d9=_0x3a7f13;let _0x5ca488=_0xff27ca-_0x314c40;_0x23d4ee[_0x5216d9(0x1f4)]=''+_0x23d4ee[_0x5216d9(0x1f4)]['slice'](0x0,_0x314c40)+_0x23d4ee[_0x5216d9(0x1f4)][_0x5216d9(0x1f7)](_0xff27ca),Qe(_0x23d4ee,_0x314c40,_0x5ca488);}function Ze(_0x494cea,_0x2a682d,_0x1fff30){const _0x5a88d3=_0x3a7f13;_0x494cea[_0x5a88d3(0x23b)]=$e(_0x494cea[_0x5a88d3(0x23b)],_0x2a682d,_0x1fff30),_0x494cea[_0x5a88d3(0x188)]=$e(_0x494cea[_0x5a88d3(0x188)],_0x2a682d,_0x1fff30),_0x494cea[_0x5a88d3(0x281)]=$e(_0x494cea[_0x5a88d3(0x281)],_0x2a682d,_0x1fff30),_0x494cea['textRuns']=tt(_0x494cea[_0x5a88d3(0x267)],_0x2a682d,_0x1fff30),_0x494cea['tables']=nt(_0x494cea['tables'],_0x2a682d,_0x1fff30),_0x494cea[_0x5a88d3(0x1fb)]=E(_0x494cea[_0x5a88d3(0x1fb)],_0x2a682d,_0x1fff30),_0x494cea[_0x5a88d3(0x182)]=E(_0x494cea[_0x5a88d3(0x182)],_0x2a682d,_0x1fff30),_0x494cea['customDecorations']=E(_0x494cea[_0x5a88d3(0x21c)],_0x2a682d,_0x1fff30),_0x494cea['blockRanges']=E(_0x494cea['blockRanges'],_0x2a682d,_0x1fff30);}function Qe(_0x1c32c3,_0x4c0acc,_0x533786){const _0x4eee09=_0x3a7f13;var _0x2413c7,_0x39b461;_0x1c32c3[_0x4eee09(0x23b)]=et(_0x1c32c3['paragraphs'],_0x4c0acc,_0x533786),_0x1c32c3[_0x4eee09(0x188)]=et(_0x1c32c3[_0x4eee09(0x188)],_0x4c0acc,_0x533786),_0x1c32c3[_0x4eee09(0x281)]=et(_0x1c32c3[_0x4eee09(0x281)],_0x4c0acc,_0x533786),_0x1c32c3[_0x4eee09(0x267)]=(_0x2413c7=rt((_0x39b461=_0x1c32c3[_0x4eee09(0x267)])==null?void 0x0:_0x39b461[_0x4eee09(0x266)](_0x167081=>({..._0x167081,'startIndex':_0x167081['st'],'endIndex':_0x167081['ed']})),_0x4c0acc,_0x533786))==null?void 0x0:_0x2413c7[_0x4eee09(0x266)](_0x36fa90=>{let {startIndex:_0x150cbe,endIndex:_0x5c92c7,..._0x535f04}=_0x36fa90;return{..._0x535f04,'st':_0x150cbe,'ed':_0x5c92c7};}),_0x1c32c3[_0x4eee09(0x243)]=rt(_0x1c32c3[_0x4eee09(0x243)],_0x4c0acc,_0x533786),_0x1c32c3[_0x4eee09(0x1fb)]=D(_0x1c32c3[_0x4eee09(0x1fb)],_0x4c0acc,_0x533786),_0x1c32c3[_0x4eee09(0x182)]=D(_0x1c32c3[_0x4eee09(0x182)],_0x4c0acc,_0x533786),_0x1c32c3[_0x4eee09(0x21c)]=D(_0x1c32c3[_0x4eee09(0x21c)],_0x4c0acc,_0x533786),_0x1c32c3[_0x4eee09(0x1e4)]=D(_0x1c32c3[_0x4eee09(0x1e4)],_0x4c0acc,_0x533786);}function $e(_0xf83adb,_0x110626,_0x593862){const _0xb96096=_0x3a7f13;return _0xf83adb==null?void 0x0:_0xf83adb[_0xb96096(0x266)](_0x3bc5ce=>_0x3bc5ce[_0xb96096(0x254)]>=_0x110626?{..._0x3bc5ce,'startIndex':_0x3bc5ce[_0xb96096(0x254)]+_0x593862}:_0x3bc5ce);}function et(_0x45acd5,_0x39370c,_0x152a8f){const _0x156842=_0x3a7f13;let _0x49ec48=_0x39370c+_0x152a8f;return _0x45acd5==null?void 0x0:_0x45acd5['map'](_0x18e184=>_0x18e184['startIndex']>=_0x39370c&&_0x18e184[_0x156842(0x254)]<_0x49ec48?null:_0x18e184['startIndex']>=_0x49ec48?{..._0x18e184,'startIndex':_0x18e184[_0x156842(0x254)]-_0x152a8f}:_0x18e184)[_0x156842(0x280)](_0x3f34eb=>_0x3f34eb!=null);}function tt(_0x43e6c0,_0x5831a6,_0x55b2f1){const _0x5876cc=_0x3a7f13;return _0x43e6c0==null?void 0x0:_0x43e6c0[_0x5876cc(0x266)](_0x120e3b=>_0x120e3b['st']>=_0x5831a6?{..._0x120e3b,'st':_0x120e3b['st']+_0x55b2f1,'ed':_0x120e3b['ed']+_0x55b2f1}:_0x120e3b['ed']>_0x5831a6?{..._0x120e3b,'ed':_0x120e3b['ed']+_0x55b2f1}:_0x120e3b);}function E(_0x175ab9,_0x5c4fbd,_0x26c0f2){const _0x99762b=_0x3a7f13;return _0x175ab9==null?void 0x0:_0x175ab9[_0x99762b(0x266)](_0x4a7d94=>_0x4b4cb7(_0x4a7d94,_0x5c4fbd,_0x26c0f2));}function nt(_0x24643c,_0x398c06,_0x1728e8){const _0x42ed0a=_0x3a7f13;return _0x24643c==null?void 0x0:_0x24643c[_0x42ed0a(0x266)](_0x4956e1=>_0x514d4f(_0x4956e1,_0x398c06,_0x1728e8));}function D(_0x4d60be,_0x5ae3f2,_0x4bbc37){const _0x457a57=_0x3a7f13;return _0x4d60be==null?void 0x0:_0x4d60be[_0x457a57(0x266)](_0x547e2b=>_0x433aa0(_0x547e2b,_0x5ae3f2,_0x4bbc37))[_0x457a57(0x280)](_0x5e4d29=>_0x5e4d29!=null);}function rt(_0x21f9ba,_0x2322e7,_0x14a817){return _0x21f9ba==null?void 0x0:_0x21f9ba['map'](_0x21536f=>_0x422036(_0x21536f,_0x2322e7,_0x14a817))['filter'](_0x542859=>_0x542859!=null);}function O(_0x1059ad){const _0x20addd=_0x3a7f13;if(!_0x1059ad['body'])throw Error(_0x20addd(0x1f9));return _0x1059ad['body'];}function k(_0x1fbdd5){'@babel/helpers - typeof';const _0x337872=_0x3a7f13;return k=typeof Symbol==_0x337872(0x271)&&typeof Symbol['iterator']=='symbol'?function(_0x372c70){return typeof _0x372c70;}:function(_0x36bf6a){const _0x500d43=_0x337872;return _0x36bf6a&&typeof Symbol==_0x500d43(0x271)&&_0x36bf6a[_0x500d43(0x23c)]===Symbol&&_0x36bf6a!==Symbol['prototype']?'symbol':typeof _0x36bf6a;},k(_0x1fbdd5);}function it(_0x5e1b3c,_0x12ec0e){const _0x1cb036=_0x3a7f13;if(k(_0x5e1b3c)!=_0x1cb036(0x247)||!_0x5e1b3c)return _0x5e1b3c;var _0x1fec30;if(typeof Symbol<'u'&&(_0x1fec30=_0x5e1b3c[Symbol[_0x1cb036(0x18e)]])!==void 0x0){var _0x7cfe0a=_0x1fec30['call'](_0x5e1b3c,_0x12ec0e||_0x1cb036(0x1f1));if(k(_0x7cfe0a)!=_0x1cb036(0x247))return _0x7cfe0a;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x12ec0e===_0x1cb036(0x25f)?String:Number)(_0x5e1b3c);}function at(_0x1862cb){const _0x3125bb=_0x3a7f13;var _0x59373b=it(_0x1862cb,'string');return k(_0x59373b)==_0x3125bb(0x1fd)?_0x59373b:_0x59373b+'';}function A(_0x563bcb,_0x1e8ede,_0x280132){const _0x1cc6d6=_0x3a7f13;return(_0x1e8ede=at(_0x1e8ede))in _0x563bcb?Object[_0x1cc6d6(0x24f)](_0x563bcb,_0x1e8ede,{'value':_0x280132,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x563bcb[_0x1e8ede]=_0x280132,_0x563bcb;}var j=class extends _0x533030{constructor(..._0x10f52f){const _0x34b0c3=_0x3a7f13;super(..._0x10f52f),A(this,_0x34b0c3(0x1e8),new Map()),A(this,_0x34b0c3(0x216),new Map()),A(this,_0x34b0c3(0x235),new Map()),A(this,'_change$',new _0x52ee64()),A(this,_0x34b0c3(0x282),this[_0x34b0c3(0x245)][_0x34b0c3(0x200)]());}[_0x3a7f13(0x238)](_0x389a59,_0x4d0067){const _0x431714=_0x3a7f13;var _0x31c8ac;let _0x319ab7=(_0x31c8ac=this['_resources']['get'](_0x389a59))==null?void 0x0:_0x31c8ac['formulas'][_0x4d0067];return _0x319ab7?_0x5a1e4f[_0x431714(0x201)](_0x319ab7):void 0x0;}[_0x3a7f13(0x1c5)](_0x24562c){const _0x2ab601=_0x3a7f13;var _0x5114a3;return _0x5a1e4f[_0x2ab601(0x201)](((_0x5114a3=this[_0x2ab601(0x1e8)][_0x2ab601(0x1b1)](_0x24562c))==null?void 0x0:_0x5114a3['formulas'])??{});}[_0x3a7f13(0x239)](_0x2e6aff){const _0x1491e0=_0x3a7f13;let _0x372fd5=this[_0x1491e0(0x1e8)][_0x1491e0(0x1b1)](_0x2e6aff);return _0x372fd5?_0x5a1e4f[_0x1491e0(0x201)](_0x372fd5):void 0x0;}[_0x3a7f13(0x209)](_0x14dd5a,_0x133fef,_0x4f28fb){const _0x398aaa=_0x3a7f13;return this[_0x398aaa(0x1cf)](_0x14dd5a,{[_0x133fef]:_0x4f28fb});}[_0x3a7f13(0x226)](_0x6bf61e,_0x276d51){const _0x29f65a=_0x3a7f13;return this[_0x29f65a(0x235)]['has'](_0x6bf61e)||!x(_0x276d51)?!0x1:(this[_0x29f65a(0x1e8)][_0x29f65a(0x22f)](_0x6bf61e,{'formulas':_0x5a1e4f[_0x29f65a(0x201)](_0x276d51[_0x29f65a(0x264)])}),this[_0x29f65a(0x245)][_0x29f65a(0x27f)]({'unitId':_0x6bf61e}),!0x0);}[_0x3a7f13(0x1cf)](_0x5551fa,_0x1fbb64){const _0x34225b=_0x3a7f13;if(this['_loadErrors'][_0x34225b(0x260)](_0x5551fa)||!Object[_0x34225b(0x241)](_0x1fbb64)[_0x34225b(0x218)]||!x({'formulas':_0x1fbb64}))return!0x1;let _0x159bf1=this[_0x34225b(0x1e8)][_0x34225b(0x1b1)](_0x5551fa)??b(),_0x17bae8=_0x5a1e4f[_0x34225b(0x201)](_0x159bf1);return Object[_0x34225b(0x1da)](_0x17bae8['formulas'],_0x5a1e4f['deepClone'](_0x1fbb64)),this['_resources'][_0x34225b(0x22f)](_0x5551fa,_0x17bae8),this['_change$'][_0x34225b(0x27f)]({'unitId':_0x5551fa,'rangeIds':Object['keys'](_0x1fbb64)}),!0x0;}[_0x3a7f13(0x1f0)](_0xdb9045,_0x238171){const _0x423364=_0x3a7f13;if(this[_0x423364(0x235)]['has'](_0xdb9045))return!0x1;let _0x2f6dc9=this['_resources'][_0x423364(0x1b1)](_0xdb9045);if(!(_0x2f6dc9!=null&&_0x2f6dc9[_0x423364(0x264)][_0x238171]))return!0x1;let _0x260950=_0x5a1e4f[_0x423364(0x201)](_0x2f6dc9);return delete _0x260950[_0x423364(0x264)][_0x238171],this[_0x423364(0x1e8)]['set'](_0xdb9045,_0x260950),this[_0x423364(0x245)][_0x423364(0x27f)]({'unitId':_0xdb9045,'rangeIds':[_0x238171]}),!0x0;}[_0x3a7f13(0x283)](_0x559ebc,_0x1faafb){const _0x6bc25a=_0x3a7f13;return x(_0x1faafb)?(this[_0x6bc25a(0x1e8)][_0x6bc25a(0x22f)](_0x559ebc,{'formulas':_0x5a1e4f[_0x6bc25a(0x201)](_0x1faafb[_0x6bc25a(0x264)])}),this[_0x6bc25a(0x216)][_0x6bc25a(0x25c)](_0x559ebc),this['_loadErrors']['delete'](_0x559ebc),this[_0x6bc25a(0x245)]['next']({'unitId':_0x559ebc}),!0x0):(this['_preserveInvalid'](_0x559ebc,_0x1faafb,_0x6bc25a(0x223)),!0x1);}[_0x3a7f13(0x27e)](_0x213760){const _0x4ffc23=_0x3a7f13;let _0x1792e7=this[_0x4ffc23(0x1e8)]['get'](_0x213760);return _0x1792e7?_0x5a1e4f[_0x4ffc23(0x201)](_0x1792e7):this[_0x4ffc23(0x216)][_0x4ffc23(0x260)](_0x213760)?_0x5a1e4f[_0x4ffc23(0x201)](this[_0x4ffc23(0x216)][_0x4ffc23(0x1b1)](_0x213760)):b();}[_0x3a7f13(0x251)](_0x7f0ce7){const _0x58b5dd=_0x3a7f13;return this['_loadErrors'][_0x58b5dd(0x1b1)](_0x7f0ce7);}['removeUnit'](_0xeba3c8){const _0xce816a=_0x3a7f13;this[_0xce816a(0x1e8)]['delete'](_0xeba3c8),this[_0xce816a(0x216)][_0xce816a(0x25c)](_0xeba3c8),this[_0xce816a(0x235)][_0xce816a(0x25c)](_0xeba3c8),this[_0xce816a(0x245)][_0xce816a(0x27f)]({'unitId':_0xeba3c8});}['dispose'](){const _0x4ccb4d=_0x3a7f13;this['_resources'][_0x4ccb4d(0x220)](),this[_0x4ccb4d(0x216)]['clear'](),this['_loadErrors']['clear'](),this['_change$']['complete'](),super['dispose']();}[_0x3a7f13(0x1e2)](_0x3806d9,_0x11a1e0,_0x702353){const _0x38318c=_0x3a7f13;this[_0x38318c(0x1e8)][_0x38318c(0x25c)](_0x3806d9),this['_rawResources']['set'](_0x3806d9,_0x5a1e4f[_0x38318c(0x201)](_0x11a1e0)),this[_0x38318c(0x235)][_0x38318c(0x22f)](_0x3806d9,_0x702353),this[_0x38318c(0x245)]['next']({'unitId':_0x3806d9});}};let ot=function(_0x1fd8bb){const _0xee6cd8=_0x3a7f13;return _0x1fd8bb[_0xee6cd8(0x1dc)]=_0xee6cd8(0x269),_0x1fd8bb[_0xee6cd8(0x219)]=_0xee6cd8(0x203),_0x1fd8bb[_0xee6cd8(0x1c1)]=_0xee6cd8(0x1f3),_0x1fd8bb['ERROR']=_0xee6cd8(0x227),_0x1fd8bb;}({});function M(_0x4ca6b7,_0x5b1915){return function(_0x1ccec8,_0x148296){_0x5b1915(_0x1ccec8,_0x148296,_0x4ca6b7);};}function N(_0x1596fb,_0x5f0660,_0x3fbf81,_0x2901f2){const _0x31b3bb=_0x3a7f13;var _0x5a10cb=arguments[_0x31b3bb(0x218)],_0x1a8278=_0x5a10cb<0x3?_0x5f0660:_0x2901f2===null?_0x2901f2=Object['getOwnPropertyDescriptor'](_0x5f0660,_0x3fbf81):_0x2901f2,_0x315626;if(typeof Reflect==_0x31b3bb(0x247)&&typeof Reflect[_0x31b3bb(0x252)]==_0x31b3bb(0x271))_0x1a8278=Reflect[_0x31b3bb(0x252)](_0x1596fb,_0x5f0660,_0x3fbf81,_0x2901f2);else{for(var _0x43c37c=_0x1596fb[_0x31b3bb(0x218)]-0x1;_0x43c37c>=0x0;_0x43c37c--)(_0x315626=_0x1596fb[_0x43c37c])&&(_0x1a8278=(_0x5a10cb<0x3?_0x315626(_0x1a8278):_0x5a10cb>0x3?_0x315626(_0x5f0660,_0x3fbf81,_0x1a8278):_0x315626(_0x5f0660,_0x3fbf81))||_0x1a8278);}return _0x5a10cb>0x3&&_0x1a8278&&Object['defineProperty'](_0x5f0660,_0x3fbf81,_0x1a8278),_0x1a8278;}let P=class extends _0x533030{constructor(_0x1c3223,_0x19aa41,_0x39ad8c){const _0x4ae415=_0x3a7f13;super(),this['_model']=_0x1c3223,this[_0x4ae415(0x25d)]=_0x19aa41,this[_0x4ae415(0x199)]=_0x39ad8c,A(this,_0x4ae415(0x1d8),new Map()),A(this,'_formulaKeys',new Map()),A(this,_0x4ae415(0x1c0),new _0x52ee64()),A(this,_0x4ae415(0x197),this['_presentationChanged$'][_0x4ae415(0x200)]()),this[_0x4ae415(0x25a)](this[_0x4ae415(0x25d)]['formulaResult$'][_0x4ae415(0x1b0)](_0x59a15d=>{const _0x49c3e8=_0x4ae415;for(let _0x14c843 of Object['values'](_0x59a15d))for(let _0x412c7e of Object['values'](_0x14c843))_0x412c7e['forEach'](_0x589992=>this[_0x49c3e8(0x1e5)](_0x589992));}));}[_0x3a7f13(0x184)](_0x47c11f){const _0x10006c=_0x3a7f13;var _0x56ccfc;let _0x5b6070=_0x47c11f['getUnitId'](),_0x19f1f7=((_0x56ccfc=_0x47c11f[_0x10006c(0x1d2)]()['body'])==null||(_0x56ccfc=_0x56ccfc['customRanges'])==null?void 0x0:_0x56ccfc['filter'](w))??[],_0x2fdb00=this[_0x10006c(0x1f8)]['getFormulas'](_0x5b6070),_0x1331e6=new Set();for(let _0x213788 of _0x19f1f7){let _0x421708=_0x2fdb00[_0x213788[_0x10006c(0x23f)]];_0x421708&&(_0x1331e6[_0x10006c(0x1e0)](F(_0x5b6070,_0x213788[_0x10006c(0x23f)])),this['register']({'unitId':_0x5b6070,'rangeId':_0x213788['rangeId']},_0x421708));}for(let _0xf60416 of Array['from'](this['_registrations'][_0x10006c(0x1ea)]()))_0xf60416[_0x10006c(0x206)]===_0x5b6070&&!_0x1331e6[_0x10006c(0x260)](F(_0xf60416[_0x10006c(0x206)],_0xf60416[_0x10006c(0x23f)]))&&this['unregister'](_0xf60416);}['register'](_0x1a3460,_0x3d52f6){const _0x16bb10=_0x3a7f13;let _0x52e69b=F(_0x1a3460['unitId'],_0x1a3460[_0x16bb10(0x23f)]),_0x23e986=this['_registrations']['get'](_0x52e69b),_0x5f58c3=this['_hostExternalReferenceModel'][_0x16bb10(0x210)](_0x1a3460['unitId']);if(_0x23e986&&_0x23e986[_0x16bb10(0x270)][_0x16bb10(0x24d)]===_0x3d52f6[_0x16bb10(0x24d)]&&_0x23e986[_0x16bb10(0x1e7)]===_0x5f58c3){_0x23e986['config']=_0x3d52f6;let _0x41b795=_0x23e986[_0x16bb10(0x274)]?this[_0x16bb10(0x25d)][_0x16bb10(0x208)](_0x23e986['unitId'],_0x23e986['unitId'],_0x23e986[_0x16bb10(0x274)])??void 0x0:void 0x0;_0x23e986[_0x16bb10(0x1a3)]=_0x41b795,this[_0x16bb10(0x214)](_0x52e69b,st(_0x3d52f6,_0x41b795));return;}_0x23e986!=null&&_0x23e986[_0x16bb10(0x274)]&&this['_deleteRegistration'](_0x23e986);let _0x254961={..._0x1a3460,'config':_0x3d52f6,'referenceRevision':_0x5f58c3,'presentation':st(_0x3d52f6,void 0x0)};if(this[_0x16bb10(0x1d8)][_0x16bb10(0x22f)](_0x52e69b,_0x254961),!_0x3d52f6['formula'][_0x16bb10(0x1d7)]())return;let _0xb6d969=this['_registrationService'][_0x16bb10(0x26f)](_0x1a3460[_0x16bb10(0x206)],_0x1a3460[_0x16bb10(0x206)],_0x3d52f6['formula'],void 0x0,{'rangeId':_0x1a3460['rangeId']},_0x2b96ca[_0x16bb10(0x193)],_0x1a3460['rangeId']);_0x254961['formulaId']=_0xb6d969,this[_0x16bb10(0x27c)][_0x16bb10(0x22f)](_0xb6d969,_0x52e69b);}[_0x3a7f13(0x26a)](_0x4fadaf){const _0x5ad03a=_0x3a7f13;let _0x4413a0=F(_0x4fadaf[_0x5ad03a(0x206)],_0x4fadaf['rangeId']),_0x1b99d2=this[_0x5ad03a(0x1d8)]['get'](_0x4413a0);_0x1b99d2&&(this['_deleteRegistration'](_0x1b99d2),this['_registrations'][_0x5ad03a(0x25c)](_0x4413a0));}[_0x3a7f13(0x231)](_0x82cc37){const _0x2f037f=_0x3a7f13;for(let _0x1fe814 of Array[_0x2f037f(0x1d0)](this['_registrations'][_0x2f037f(0x1ea)]()))_0x1fe814[_0x2f037f(0x206)]===_0x82cc37&&this[_0x2f037f(0x26a)](_0x1fe814);}[_0x3a7f13(0x1df)](_0xbf4167){const _0x4c8692=_0x3a7f13;var _0x3e1ff7;return(_0x3e1ff7=this[_0x4c8692(0x1d8)]['get'](F(_0xbf4167[_0x4c8692(0x206)],_0xbf4167[_0x4c8692(0x23f)])))==null?void 0x0:_0x3e1ff7[_0x4c8692(0x225)];}[_0x3a7f13(0x244)](_0x595b1f){const _0x31d06e=_0x3a7f13;let _0x2a4b4b=this[_0x31d06e(0x1d8)][_0x31d06e(0x1b1)](F(_0x595b1f[_0x31d06e(0x206)],_0x595b1f[_0x31d06e(0x23f)]));return _0x2a4b4b?I(_0x2a4b4b):void 0x0;}[_0x3a7f13(0x255)](){const _0x1f8ed2=_0x3a7f13;return Array[_0x1f8ed2(0x1d0)](this[_0x1f8ed2(0x1d8)][_0x1f8ed2(0x1ea)](),_0x4e837e=>({'identity':{'unitId':_0x4e837e[_0x1f8ed2(0x206)],'rangeId':_0x4e837e[_0x1f8ed2(0x23f)]},'config':_0x4e837e[_0x1f8ed2(0x270)],'referenceRevision':_0x4e837e[_0x1f8ed2(0x1e7)],..._0x4e837e[_0x1f8ed2(0x1a3)]?{'liveResult':_0x4e837e[_0x1f8ed2(0x1a3)]}:null}));}[_0x3a7f13(0x1eb)](){const _0x109a97=_0x3a7f13;for(let _0x1d5f72 of this[_0x109a97(0x1d8)][_0x109a97(0x1ea)]())this[_0x109a97(0x261)](_0x1d5f72);this[_0x109a97(0x1d8)][_0x109a97(0x220)](),this[_0x109a97(0x27c)][_0x109a97(0x220)](),this[_0x109a97(0x1c0)][_0x109a97(0x19f)](),super[_0x109a97(0x1eb)]();}[_0x3a7f13(0x1e5)](_0x10f5ce){const _0x412a05=_0x3a7f13;let _0x5d6f3c=this['_formulaKeys'][_0x412a05(0x1b1)](_0x10f5ce[_0x412a05(0x274)]),_0x80fa5b=_0x5d6f3c?this[_0x412a05(0x1d8)][_0x412a05(0x1b1)](_0x5d6f3c):void 0x0;_0x5d6f3c&&_0x80fa5b&&(_0x80fa5b[_0x412a05(0x1a3)]=_0x10f5ce,this['_setPresentation'](_0x5d6f3c,st(_0x80fa5b[_0x412a05(0x270)],_0x10f5ce)));}[_0x3a7f13(0x214)](_0x3b1900,_0x2cc545){const _0x40dcd5=_0x3a7f13;var _0x33de5f,_0x20a68a;let _0x5c6da4=this[_0x40dcd5(0x1d8)][_0x40dcd5(0x1b1)](_0x3b1900);if(!_0x5c6da4||ct(_0x5c6da4['presentation'],_0x2cc545))return;let _0x160b0f=_0x5c6da4[_0x40dcd5(0x225)],_0x2b2520=I(_0x5c6da4);_0x5c6da4['presentation']=_0x2cc545,this[_0x40dcd5(0x1c0)][_0x40dcd5(0x27f)]({'unitId':_0x5c6da4[_0x40dcd5(0x206)],'rangeId':_0x5c6da4['rangeId'],'presentation':_0x2cc545,'previousPresentation':_0x160b0f,'result':I(_0x5c6da4),'previousResult':{..._0x2b2520,..._0x160b0f,'value':(_0x33de5f=_0x160b0f[_0x40dcd5(0x276)])==null?void 0x0:_0x33de5f['v'],'valueType':((_0x20a68a=_0x160b0f['cell'])==null?void 0x0:_0x20a68a['t'])??void 0x0}});}[_0x3a7f13(0x261)](_0xb7799e){const _0x7851e8=_0x3a7f13;_0xb7799e[_0x7851e8(0x274)]&&(this[_0x7851e8(0x25d)][_0x7851e8(0x248)](_0xb7799e['unitId'],_0xb7799e[_0x7851e8(0x206)],[_0xb7799e['formulaId']]),this[_0x7851e8(0x27c)][_0x7851e8(0x25c)](_0xb7799e[_0x7851e8(0x274)]));}};P=N([M(0x0,_0x5d6038(j)),M(0x1,_0x5d6038(_0x16b5f1)),M(0x2,_0x5d6038(_0xceeb38))],P);function F(_0x3bb3c6,_0x2e77eb){return _0x3bb3c6+'\x00'+_0x2e77eb;}function st(_0x5b4328,_0x321f1d){const _0x1fadda=_0x3a7f13;return _0x12221e({'numberFormat':_0x5b4328[_0x1fadda(0x230)],'lastValue':_0x5b4328[_0x1fadda(0x1ff)],'result':_0x321f1d});}function I(_0x244496){const _0x1cc26a=_0x3a7f13;var _0x110964,_0x344aae,_0x1c2e37;let _0x274407=_0x244496[_0x1cc26a(0x225)],_0x3a544e=_0x244496[_0x1cc26a(0x270)]['formula'][_0x1cc26a(0x1d7)]()?_0x274407['stale']||_0x274407[_0x1cc26a(0x276)]==null?_0x1cc26a(0x203):((_0x110964=_0x244496[_0x1cc26a(0x1a3)])==null?void 0x0:_0x110964['status'])===_0x2c8d51[_0x1cc26a(0x1b2)]?'error':_0x1cc26a(0x1f3):'empty';return{..._0x274407,'status':_0x3a544e,'value':(_0x344aae=_0x274407['cell'])==null?void 0x0:_0x344aae['v'],'valueType':((_0x1c2e37=_0x274407['cell'])==null?void 0x0:_0x1c2e37['t'])??void 0x0};}function ct(_0x43daef,_0x43594d){const _0x302905=_0x3a7f13;var _0x55679b,_0x30c3c9,_0x170459,_0x562ddd;return _0x43daef[_0x302905(0x192)]===_0x43594d[_0x302905(0x192)]&&_0x43daef[_0x302905(0x1b5)]===_0x43594d['color']&&_0x43daef[_0x302905(0x229)]===_0x43594d[_0x302905(0x229)]&&_0x43daef[_0x302905(0x224)]===_0x43594d['source']&&_0x43daef[_0x302905(0x19c)]===_0x43594d[_0x302905(0x19c)]&&((_0x55679b=_0x43daef['cell'])==null?void 0x0:_0x55679b['t'])===((_0x30c3c9=_0x43594d[_0x302905(0x276)])==null?void 0x0:_0x30c3c9['t'])&&Object['is']((_0x170459=_0x43daef[_0x302905(0x276)])==null?void 0x0:_0x170459['v'],(_0x562ddd=_0x43594d[_0x302905(0x276)])==null?void 0x0:_0x562ddd['v']);}const lt={'id':'docs-formula.mutation.set-formula','type':_0x16d163['MUTATION'],'handler':(_0x2ca9f2,_0x2e209d)=>!(_0x2e209d!=null&&_0x2e209d[_0x3a7f13(0x206)])||!_0x2e209d['rangeId']||!_0x2e209d[_0x3a7f13(0x270)]?!0x1:_0x2ca9f2[_0x3a7f13(0x1b1)](j)[_0x3a7f13(0x209)](_0x2e209d[_0x3a7f13(0x206)],_0x2e209d[_0x3a7f13(0x23f)],_0x2e209d['config'])},ut={'id':_0x3a7f13(0x259),'type':_0x16d163[_0x3a7f13(0x1a9)],'handler':(_0x5d840b,_0x3d969e)=>!(_0x3d969e!=null&&_0x3d969e['unitId'])||!_0x3d969e[_0x3a7f13(0x23f)]?!0x1:_0x5d840b[_0x3a7f13(0x1b1)](j)['removeFormula'](_0x3d969e[_0x3a7f13(0x206)],_0x3d969e[_0x3a7f13(0x23f)])},L={'id':_0x3a7f13(0x23a),'type':_0x16d163[_0x3a7f13(0x1a9)],'handler':(_0x61cf5a,_0x195145)=>!(_0x195145!=null&&_0x195145[_0x3a7f13(0x206)])||!_0x195145[_0x3a7f13(0x1a5)]?!0x1:_0x61cf5a['get'](j)[_0x3a7f13(0x226)](_0x195145[_0x3a7f13(0x206)],_0x195145[_0x3a7f13(0x1a5)])},R={'id':_0x3a7f13(0x1bc),'type':_0x16d163[_0x3a7f13(0x1a9)],'handler':(_0x39cf48,_0x53e433)=>{const _0x384ae3=_0x3a7f13;if(!(_0x53e433!=null&&_0x53e433[_0x384ae3(0x206)])||!_0x53e433[_0x384ae3(0x1a1)][_0x384ae3(0x218)])return!0x1;let _0x116d59=_0x39cf48[_0x384ae3(0x1b1)](j),_0x364837=_0x39cf48[_0x384ae3(0x1b1)](_0xceeb38),_0x1567cd=_0x116d59[_0x384ae3(0x239)](_0x53e433[_0x384ae3(0x206)]);if(!_0x1567cd)return!0x1;let _0x42f6d9=_0x5a1e4f[_0x384ae3(0x201)](_0x1567cd),_0x3a806c=!0x1;for(let _0x43365e of _0x53e433[_0x384ae3(0x1a1)]){var _0x290f58,_0x4904e1,_0x52f376,_0x248539;let _0x5bf630=_0x42f6d9[_0x384ae3(0x264)][_0x43365e['rangeId']];_0x5bf630&&_0x5bf630[_0x384ae3(0x24d)]===_0x43365e[_0x384ae3(0x25e)]&&((_0x290f58=_0x5bf630[_0x384ae3(0x230)])==null?void 0x0:_0x290f58[_0x384ae3(0x229)])===_0x43365e[_0x384ae3(0x265)]&&_0x364837[_0x384ae3(0x210)](_0x53e433[_0x384ae3(0x206)])===_0x43365e['expectedReferenceRevision']&&(((_0x4904e1=_0x5bf630[_0x384ae3(0x1ff)])==null?void 0x0:_0x4904e1['v'])!==_0x43365e['lastValue']['v']||((_0x52f376=_0x5bf630[_0x384ae3(0x1ff)])==null?void 0x0:_0x52f376['t'])!==_0x43365e[_0x384ae3(0x1ff)]['t']||((_0x248539=_0x5bf630[_0x384ae3(0x1ff)])==null?void 0x0:_0x248539[_0x384ae3(0x229)])!==_0x43365e[_0x384ae3(0x1ff)][_0x384ae3(0x229)])&&(_0x5bf630[_0x384ae3(0x1ff)]=_0x5a1e4f[_0x384ae3(0x201)](_0x43365e[_0x384ae3(0x1ff)]),_0x3a806c=!0x0);}return!_0x3a806c||_0x116d59['setResource'](_0x53e433[_0x384ae3(0x206)],_0x42f6d9);}},z={'id':_0x3a7f13(0x1bd),'type':_0x16d163[_0x3a7f13(0x1c4)],'handler':(_0x28c526,_0x1ea680)=>{const _0x2d4ec7=_0x3a7f13;if(!(_0x1ea680!=null&&_0x1ea680[_0x2d4ec7(0x24d)][_0x2d4ec7(0x1d7)]()))return!0x1;let _0x45232e=K(_0x28c526,_0x1ea680[_0x2d4ec7(0x206)],'');if(!_0x45232e)return!0x1;let _0x42d844=ft(_0x1ea680[_0x2d4ec7(0x181)],_0x45232e[_0x2d4ec7(0x1b4)],dt(_0x28c526,_0x45232e[_0x2d4ec7(0x206)]));if(!_0x42d844)return!0x1;let _0x167a52=pt(_0x28c526,_0x45232e['unitId'],_0x1ea680['formula'],_0x1ea680[_0x2d4ec7(0x204)]??[]);if(!_0x167a52)return!0x1;let _0x3af86e=mt(_0x45232e[_0x2d4ec7(0x1b4)],_0x45232e['model'],_0x45232e['unitId']),_0x342ecc=ht({'documentData':_0x45232e[_0x2d4ec7(0x1c6)],'resource':_0x45232e[_0x2d4ec7(0x1a5)],'rangeId':_0x3af86e,'config':{'formula':_0x1ea680['formula'],..._0x1ea680[_0x2d4ec7(0x230)]?{'numberFormat':_0x1ea680[_0x2d4ec7(0x230)]}:null},'startOffset':_0x42d844[_0x2d4ec7(0x23e)],'endOffset':_0x42d844['endOffset']});if(!_0x342ecc)return!0x1;let _0x5a255e=_0x3b0f43(_0x28c526,_0x45232e[_0x2d4ec7(0x206)],_0x167a52);return!_0x5a255e||!q({'accessor':_0x28c526,'document':_0x45232e[_0x2d4ec7(0x272)],'unitId':_0x45232e[_0x2d4ec7(0x206)],'trigger':z['id'],'rangeId':_0x3af86e,'previousResource':_0x45232e['resource'],'nextResource':_0x342ecc[_0x2d4ec7(0x22e)],'previousDocumentData':_0x45232e['documentData'],'nextDocumentData':_0x342ecc[_0x2d4ec7(0x180)],'cursorOffset':_0x342ecc[_0x2d4ec7(0x1aa)],'externalMutations':_0x5a255e})?!0x1:{'rangeId':_0x3af86e,'startOffset':_0x342ecc[_0x2d4ec7(0x1aa)]-0x1,'endOffset':_0x342ecc['cursorOffset']};}},B={'id':_0x3a7f13(0x1b7),'type':_0x16d163[_0x3a7f13(0x1c4)],'handler':(_0x4e34cb,_0x5adb8c)=>{const _0x27d748=_0x3a7f13;if(!(_0x5adb8c!=null&&_0x5adb8c[_0x27d748(0x23f)])||!_0x5adb8c['formula'][_0x27d748(0x1d7)]())return!0x1;let _0x23cccd=K(_0x4e34cb,_0x5adb8c[_0x27d748(0x206)],''),_0x58a798=_0x23cccd==null?void 0x0:_0x23cccd[_0x27d748(0x194)]['getFormula'](_0x23cccd[_0x27d748(0x206)],_0x5adb8c['rangeId']),_0xf6b006=_0x23cccd?T(_0x23cccd[_0x27d748(0x1c6)][_0x27d748(0x1b4)],_0x5adb8c[_0x27d748(0x23f)]):void 0x0;if(!_0x23cccd||!_0x58a798||!_0xf6b006)return!0x1;let _0x4a70b4=pt(_0x4e34cb,_0x23cccd[_0x27d748(0x206)],_0x5adb8c[_0x27d748(0x24d)],_0x5adb8c[_0x27d748(0x204)]??[]);if(!_0x4a70b4)return!0x1;let _0x3a835c=_0x3b0f43(_0x4e34cb,_0x23cccd[_0x27d748(0x206)],_0x4a70b4);if(!_0x3a835c)return!0x1;let _0x367c04=St(_0x23cccd[_0x27d748(0x1a5)]);return _0x367c04[_0x27d748(0x264)][_0x5adb8c[_0x27d748(0x23f)]]={'formula':_0x5adb8c[_0x27d748(0x24d)],..._0x5adb8c[_0x27d748(0x230)]?{'numberFormat':_0x5adb8c['numberFormat']}:_0x58a798[_0x27d748(0x230)]?{'numberFormat':_0x58a798[_0x27d748(0x230)]}:null},q({'accessor':_0x4e34cb,'document':_0x23cccd['document'],'unitId':_0x23cccd[_0x27d748(0x206)],'trigger':B['id'],'rangeId':_0x5adb8c['rangeId'],'previousResource':_0x23cccd[_0x27d748(0x1a5)],'nextResource':_0x367c04,'cursorOffset':_0xf6b006[_0x27d748(0x221)]+0x1,'externalMutations':_0x3a835c});}},V={'id':_0x3a7f13(0x1e9),'type':_0x16d163[_0x3a7f13(0x1c4)],'handler':(_0x337305,_0xc63fe1)=>{const _0x1f1371=_0x3a7f13;if(!(_0xc63fe1!=null&&_0xc63fe1['rangeId']))return!0x1;let _0x1bf27d=K(_0x337305,_0xc63fe1[_0x1f1371(0x206)],''),_0x47f81d=_0x1bf27d==null?void 0x0:_0x1bf27d[_0x1f1371(0x194)][_0x1f1371(0x238)](_0x1bf27d[_0x1f1371(0x206)],_0xc63fe1['rangeId']),_0x227120=_0x1bf27d?T(_0x1bf27d[_0x1f1371(0x1c6)][_0x1f1371(0x1b4)],_0xc63fe1[_0x1f1371(0x23f)]):void 0x0;if(!_0x1bf27d||!_0x47f81d||!_0x227120)return!0x1;let _0x5bc900=St(_0x1bf27d['resource']);return _0x5bc900[_0x1f1371(0x264)][_0xc63fe1[_0x1f1371(0x23f)]]={..._0x47f81d,..._0xc63fe1['numberFormat']?{'numberFormat':_0xc63fe1[_0x1f1371(0x230)]}:null},_0xc63fe1[_0x1f1371(0x230)]||delete _0x5bc900[_0x1f1371(0x264)][_0xc63fe1['rangeId']][_0x1f1371(0x230)],q({'accessor':_0x337305,'document':_0x1bf27d[_0x1f1371(0x272)],'unitId':_0x1bf27d['unitId'],'trigger':V['id'],'rangeId':_0xc63fe1[_0x1f1371(0x23f)],'previousResource':_0x1bf27d['resource'],'nextResource':_0x5bc900,'cursorOffset':_0x227120['endIndex']+0x1,'externalMutations':{}});}},H={'id':_0x3a7f13(0x22a),'type':_0x16d163[_0x3a7f13(0x1c4)],'handler':(_0x2dda94,_0x8fbc3b)=>G(_0x2dda94,_0x8fbc3b,'',H['id'])},U={'id':_0x3a7f13(0x212),'type':_0x16d163['COMMAND'],'handler':(_0x258b86,_0x251b4d)=>G(_0x258b86,_0x251b4d,(_0x251b4d==null?void 0x0:_0x251b4d[_0x3a7f13(0x192)])??'',U['id'])},W={'id':'docs-formula.command.convert-to-text','type':_0x16d163[_0x3a7f13(0x1c4)],'handler':(_0x72e575,_0x4cacbd)=>{const _0x5cdc72=_0x3a7f13;if(!(_0x4cacbd!=null&&_0x4cacbd[_0x5cdc72(0x23f)]))return!0x1;let _0x5b76a1=K(_0x72e575,_0x4cacbd[_0x5cdc72(0x206)],'');if(!_0x5b76a1)return!0x1;let _0x4e8698=_0x72e575['get'](P)[_0x5cdc72(0x244)]({'unitId':_0x5b76a1[_0x5cdc72(0x206)],'rangeId':_0x4cacbd[_0x5cdc72(0x23f)]});return _0x4e8698?G(_0x72e575,_0x4cacbd,_0x4e8698[_0x5cdc72(0x192)],W['id']):!0x1;}};function G(_0x45b525,_0x17e3e2,_0x3696ad,_0x2b91a8){const _0x54c800=_0x3a7f13;if(!(_0x17e3e2!=null&&_0x17e3e2[_0x54c800(0x23f)]))return!0x1;let _0x17fee3=K(_0x45b525,_0x17e3e2['unitId'],'');if(!_0x17fee3)return!0x1;let _0x18ed3d=ze({'documentData':_0x17fee3[_0x54c800(0x1c6)],'resource':_0x17fee3[_0x54c800(0x1a5)],'rangeId':_0x17e3e2['rangeId'],'text':_0x3696ad});return _0x18ed3d?q({'accessor':_0x45b525,'document':_0x17fee3['document'],'unitId':_0x17fee3[_0x54c800(0x206)],'trigger':_0x2b91a8,'rangeId':_0x17e3e2[_0x54c800(0x23f)],'previousResource':_0x17fee3[_0x54c800(0x1a5)],'nextResource':_0x18ed3d['nextResource'],'previousDocumentData':_0x17fee3[_0x54c800(0x1c6)],'nextDocumentData':_0x18ed3d[_0x54c800(0x180)],'cursorOffset':_0x18ed3d['cursorOffset'],'externalMutations':{}}):!0x1;}function K(_0x28f982,_0x2afc0e,_0x431aae){const _0x2b2b92=_0x3a7f13;if(_0x431aae)return null;let _0xbc0da2=_0x28f982['get'](_0x2629d5),_0x3055ed=(_0x2afc0e?_0xbc0da2[_0x2b2b92(0x1cb)](_0x2afc0e,_0x4aa394['UNIVER_DOC']):_0xbc0da2[_0x2b2b92(0x268)](_0x4aa394['UNIVER_DOC']))??null;if(!_0x3055ed)return null;let _0x11e464=_0x3055ed[_0x2b2b92(0x1d2)](),_0xd5a113=_0x11e464[_0x2b2b92(0x1b4)];if(_0x11e464[_0x2b2b92(0x1ac)]||!_0xd5a113)return null;let _0x4ed736=_0x28f982[_0x2b2b92(0x1b1)](j);return _0x4ed736[_0x2b2b92(0x251)](_0x3055ed[_0x2b2b92(0x1e6)]())?null:{'document':_0x3055ed,'body':_0xd5a113,'documentData':_0x11e464,'model':_0x4ed736,'resource':_0x4ed736['getResource'](_0x3055ed[_0x2b2b92(0x1e6)]())??b(),'unitId':_0x3055ed[_0x2b2b92(0x1e6)]()};}function dt(_0x405bac,_0xc1fa0e){const _0x1f9151=_0x3a7f13;var _0x5d71d5;return(_0x5d71d5=_0x405bac['get'](_0x3d26b2)[_0x1f9151(0x22b)]({'subUnitId':_0xc1fa0e,'unitId':_0xc1fa0e}))==null?void 0x0:_0x5d71d5[0x0];}function ft(_0x4e8538,_0xdf932e,_0x4902b3){const _0x522e23=_0x3a7f13;if((_0x4e8538==null?void 0x0:_0x4e8538[_0x522e23(0x256)])===_0x522e23(0x1ce)){var _0x53c8e9;let _0xa68ad5=((_0x53c8e9=_0xdf932e['paragraphs'])==null?void 0x0:_0x53c8e9[_0x522e23(0x280)](_0x30def1=>_0x30def1[_0x522e23(0x236)]===_0x4e8538[_0x522e23(0x236)]))??[];if(_0xa68ad5['length']!==0x1)return null;let _0x85c1fe=_0xa68ad5[0x0],_0xfbba6f=_0x19d939(_0xdf932e,_0x85c1fe),_0xe74219=_0x85c1fe['startIndex']-_0xfbba6f,_0x4138b6=_0x4e8538[_0x522e23(0x1b6)]===_0x522e23(0x20f)?_0xe74219:_0x4e8538[_0x522e23(0x1b6)];if(!Number[_0x522e23(0x240)](_0x4138b6)||_0x4138b6<0x0||_0x4138b6>_0xe74219)return null;let _0x5617c1=_0xfbba6f+_0x4138b6;return{'startOffset':_0x5617c1,'endOffset':_0x5617c1};}if((_0x4e8538==null?void 0x0:_0x4e8538[_0x522e23(0x256)])===_0x522e23(0x18d))return!Number[_0x522e23(0x240)](_0x4e8538[_0x522e23(0x23e)])||!Number['isInteger'](_0x4e8538[_0x522e23(0x21d)])?null:{'startOffset':Math[_0x522e23(0x211)](_0x4e8538[_0x522e23(0x23e)],_0x4e8538[_0x522e23(0x21d)]),'endOffset':Math['max'](_0x4e8538['startOffset'],_0x4e8538['endOffset'])};let _0x4f17d3=(_0x4e8538==null?void 0x0:_0x4e8538[_0x522e23(0x256)])==='selection'?_0x4e8538[_0x522e23(0x21a)]:_0x4902b3;return!_0x4f17d3||_0x4f17d3[_0x522e23(0x1fe)]?null:{'startOffset':Math[_0x522e23(0x211)](_0x4f17d3[_0x522e23(0x23e)],_0x4f17d3[_0x522e23(0x21d)]),'endOffset':Math[_0x522e23(0x222)](_0x4f17d3[_0x522e23(0x23e)],_0x4f17d3[_0x522e23(0x21d)])};}function pt(_0x156d4f,_0x5300a4,_0x314260,_0x2ed2b4){const _0x1e44a3=_0x3a7f13;let _0x1a5a24=_0x156d4f[_0x1e44a3(0x1b1)](_0x9fae86),_0x531966=_0x314260['startsWith']('=')?_0x314260['slice'](0x1):_0x314260,_0x56d72a=_0x1a5a24[_0x1e44a3(0x205)](_0x531966);if(!_0x56d72a)return null;let _0x5a84ba=_0x156d4f[_0x1e44a3(0x1b1)](_0xceeb38),_0x2e6c7a=_0x5d5293({'qualifiers':_0x48d68a(_0x56d72a),'explicitReferences':_0x2ed2b4??[],'resolveBinding':_0x2bea7a=>_0x5a84ba[_0x1e44a3(0x278)](_0x5300a4,_0x2bea7a)});return _0x2e6c7a['status']===_0x1e44a3(0x26c)?_0x2e6c7a[_0x1e44a3(0x1a8)]:null;}function mt(_0x515a1f,_0x542e13,_0x3ea200){const _0x336295=_0x3a7f13;var _0x26ff3b;let _0x55c654=_0x32ab18(0x6);for(;_0x515a1f!=null&&(_0x26ff3b=_0x515a1f[_0x336295(0x182)])!=null&&_0x26ff3b[_0x336295(0x1ee)](_0x5d939d=>_0x5d939d[_0x336295(0x23f)]===_0x55c654)||_0x542e13[_0x336295(0x238)](_0x3ea200,_0x55c654);)_0x55c654=_0x32ab18(0x6);return _0x55c654;}function ht(_0x4564f1){try{return Le(_0x4564f1);}catch(_0x3db6eb){if(_0x3db6eb instanceof C)return null;throw _0x3db6eb;}}function gt(_0x117061){const _0x4eb578=_0x3a7f13;let _0x485311=_0x117061['previousDocumentData']&&_0x117061[_0x4eb578(0x180)]?vt(_0x117061['document'],_0x117061['unitId'],_0x117061['previousDocumentData'],_0x117061[_0x4eb578(0x180)],_0x117061['cursorOffset'],_0x117061['trigger']):null;return _0x117061[_0x4eb578(0x1a6)]&&_0x117061[_0x4eb578(0x180)]&&!_0x485311?null:{'documentRedo':_0x485311,'resourceRedo':{'id':L['id'],'params':{'unitId':_0x117061[_0x4eb578(0x206)],'resource':_0x117061[_0x4eb578(0x22e)]}},'resourceUndo':{'id':L['id'],'params':{'unitId':_0x117061[_0x4eb578(0x206)],'resource':_0x117061['previousResource']}}};}function _0x52b2(){const _0x30d63c=['params','SECTION_BREAK','push','trim','_registrations','degradeDocumentData','assign','getInstance','EMPTY','TABLE_START','registerPluginResource','getPresentation','add','_instanceService','_preserveInvalid','165ALWzCP','blockRanges','_updateFormulaResult','getUnitId','referenceRevision','_resources','docs-formula.command.set-number-format','values','dispose','TABLE_CELL_START','1.5.0','some','degradeBody','removeFormula','default','80FgbGBK','success','dataStream','forEach','registerProvider','slice','_model','Document\x20main\x20body\x20is\x20required\x20to\x20insert\x20Doc\x20Formula.','BLOCK_END','columnGroups','documentRedo','symbol','segmentId','lastValue','asObservable','deepClone','resources','pending','externalReferences','sequenceNodesBuilder','unitId','insertLength','getFormulaValueSync','setFormula','_commandService','trigger','identity','wholeEntity','sort','end','getRevision','min','docs-formula.command.replace-with-text','rangeType','_setPresentation','name','_rawResources','notifyTextChanged','length','PENDING','selection','resourceUndo','customDecorations','endOffset','unitDisposed$','includes','clear','endIndex','max','invalid-resource','source','presentation','setResource','error','_resourceManagerService','pattern','docs-formula.command.remove','getTextRanges','TABLE_ROW_START','563001LcmOIV','nextResource','set','numberFormat','unregisterUnit','DOC_FORMULA_PLUGIN','pluginName','resolveFormula','_loadErrors','paragraphId','@univerjs-pro/docs-formula','getFormula','getResource','docs-formula.mutation.set-resource','paragraphs','constructor','parse','startOffset','rangeId','isInteger','keys','externalMutations','tables','getResult','_change$','TABLE_ROW_END','object','deleteFormula','entries','_config','_queueSync','2837630TmjOji','formula','docs-formula.config','defineProperty','deleteLength','getLoadError','decorate','_syncUnit','startIndex','getRegisteredFormulas','type','_injector','_service','docs-formula.mutation.remove-formula','disposeWithMe','resourceRedo','delete','_registrationService','expectedFormula','string','has','_deleteRegistration','data','154kDYsyE','formulas','expectedNumberFormat','map','textRuns','getCurrentUnitOfType','empty','unregister','446031mfmjEB','resolved','_isDisposed','unitAdded$','registerFormulaWithRange','config','function','document','packageName','formulaId','_docFormulaModel','cell','setConfig','resolveBinding','TABLE_CELL_END','endsWith','stringify','_formulaKeys','_configService','serialize','next','filter','customBlocks','change$','load','nextDocumentData','target','customRanges','fromEntries','syncUnit','TABLE_END','every','370BUhnqR','sectionBreaks','version','getAllUnitsForType','COLUMN_END','PARAGRAPH','range','toPrimitive','start','UNIVER_DOC','accessor','text','DOC','model','register','72748ticsoS','presentationChanged$','getBody','_hostExternalReferenceModel','undoMutation','11XOCcEg','stale','find','insert','complete','properties','updates','boolean','liveResult','_formulaService','resource','previousDocumentData','_cacheEligibilityService','references','MUTATION','cursorOffset','redoMutation','disabled','registerCommand','syncExecuteCommand','pushUndoRedo','subscribe','get','ERROR','univer-docs-formula','body','color','position','docs-formula.command.update','6899604zhXAbo','onStarting','COLUMN_GROUP_START','COLUMN_GROUP_END','docs-formula.mutation.set-last-values','docs-formula.command.insert','_pendingUnitIds','editOp','_presentationChanged$','SUCCESS','BLOCK_START','3236nCsbXX','COMMAND','getFormulas','documentData','assess','54534fZstZX','resolveText','_univerInstanceService','getUnit','CUSTOM','collectMutations','paragraph','setFormulas','from','retain','getSnapshot','_syncScheduled'];_0x52b2=function(){return _0x30d63c;};return _0x52b2();}function _t(_0x431627,_0x30f6d3,_0x336e2f,_0x401707){const _0x894fcf=_0x3a7f13;_0x401707[_0x894fcf(0x1af)]({'id':_0x431627[_0x894fcf(0x20b)]+':'+_0x431627[_0x894fcf(0x23f)],'unitID':_0x431627['unitId'],'redoMutations':[..._0x431627[_0x894fcf(0x242)][_0x894fcf(0x1ab)]?[_0x431627[_0x894fcf(0x242)][_0x894fcf(0x1ab)]]:[],..._0x30f6d3[_0x894fcf(0x1fc)]?[_0x30f6d3[_0x894fcf(0x1fc)]]:[],_0x30f6d3[_0x894fcf(0x25b)]],'undoMutations':[_0x30f6d3['resourceUndo'],..._0x336e2f?[_0x336e2f]:[],..._0x431627[_0x894fcf(0x242)][_0x894fcf(0x19a)]?[_0x431627['externalMutations'][_0x894fcf(0x19a)]]:[]]});}function q(_0x3bd7cd){const _0x36aa96=_0x3a7f13;let _0x256ad9=_0x3bd7cd['accessor'][_0x36aa96(0x1b1)](_0x9a0954),_0x455749=_0x3bd7cd[_0x36aa96(0x191)]['get'](_0x16e8d6),_0x57df78=_0x3bd7cd['accessor'][_0x36aa96(0x1b1)](_0x3d26b2),_0x8c6220=gt(_0x3bd7cd);if(!_0x8c6220)return!0x1;let _0x5cf53f=!0x1,_0x5069f3=null,_0x59afb0=!0x1;try{if(_0x3bd7cd[_0x36aa96(0x242)][_0x36aa96(0x1ab)]){if(!_0x256ad9[_0x36aa96(0x1ae)](_0x3bd7cd['externalMutations'][_0x36aa96(0x1ab)]['id'],_0x3bd7cd[_0x36aa96(0x242)][_0x36aa96(0x1ab)][_0x36aa96(0x1d4)]))return!0x1;_0x5cf53f=!0x0;}if(_0x8c6220['documentRedo']){let _0x3bf014=_0x256ad9[_0x36aa96(0x1ae)](_0x8c6220[_0x36aa96(0x1fc)]['id'],_0x8c6220[_0x36aa96(0x1fc)][_0x36aa96(0x1d4)]);if(!_0x3bf014)return J(_0x256ad9,_0x3bd7cd[_0x36aa96(0x242)],_0x5cf53f),!0x1;_0x5069f3={'id':_0xd26f03['id'],'params':{..._0x3bf014,'noHistory':!0x0,'noNeedSetTextRange':!0x0,'segmentId':''}};}if(!_0x256ad9['syncExecuteCommand'](_0x8c6220[_0x36aa96(0x25b)]['id'],_0x8c6220[_0x36aa96(0x25b)][_0x36aa96(0x1d4)]))return yt(_0x256ad9,_0x5069f3),J(_0x256ad9,_0x3bd7cd[_0x36aa96(0x242)],_0x5cf53f),!0x1;_0x59afb0=!0x0,_t(_0x3bd7cd,_0x8c6220,_0x5069f3,_0x455749);}catch(_0x39dd4b){throw _0x59afb0&&_0x256ad9[_0x36aa96(0x1ae)](_0x8c6220[_0x36aa96(0x21b)]['id'],_0x8c6220[_0x36aa96(0x21b)][_0x36aa96(0x1d4)]),yt(_0x256ad9,_0x5069f3),J(_0x256ad9,_0x3bd7cd[_0x36aa96(0x242)],_0x5cf53f),_0x39dd4b;}return _0x57df78['replaceDocRanges']([{'startOffset':_0x3bd7cd[_0x36aa96(0x1aa)],'endOffset':_0x3bd7cd[_0x36aa96(0x1aa)],'segmentId':''}],{'unitId':_0x3bd7cd[_0x36aa96(0x206)],'subUnitId':_0x3bd7cd[_0x36aa96(0x206)]},!0x1,{[_0x5393de]:!0x0}),!0x0;}function vt(_0x2ec114,_0x12cde7,_0x4ddc10,_0x18d255,_0x3c7af9,_0x196c3d){let _0x352fd4=bt(_0x4ddc10,_0x18d255,_0x410a7f(_0x2ec114,''));return _0x352fd4?{'id':_0xd26f03['id'],'params':{'unitId':_0x12cde7,'actions':_0x352fd4,'segmentId':'','textRanges':[{'startOffset':_0x3c7af9,'endOffset':_0x3c7af9,'collapsed':!0x0,'segmentId':''}],'isEditing':!0x1,'noHistory':!0x0,'noNeedSetTextRange':!0x0,'trigger':_0x196c3d}}:null;}function yt(_0x1fe23f,_0x58b3e1){const _0x5451d2=_0x3a7f13;_0x58b3e1&&_0x1fe23f[_0x5451d2(0x1ae)](_0x58b3e1['id'],_0x58b3e1['params']);}function J(_0x4a41c5,_0x1d20a0,_0x1f9c7f){const _0x2542bb=_0x3a7f13;_0x1f9c7f&&_0x1d20a0[_0x2542bb(0x19a)]&&_0x4a41c5[_0x2542bb(0x1ae)](_0x1d20a0['undoMutation']['id'],_0x1d20a0['undoMutation'][_0x2542bb(0x1d4)]);}function bt(_0x4d0b83,_0x15197b,_0x22ccc4){const _0x13ebd3=_0x3a7f13;let _0x11e4ae=_0x4d0b83[_0x13ebd3(0x1b4)],_0xecd30b=_0x15197b[_0x13ebd3(0x1b4)],_0x42bc2a=xt(_0x11e4ae==null?void 0x0:_0x11e4ae['dataStream'],_0xecd30b==null?void 0x0:_0xecd30b[_0x13ebd3(0x1f4)]);if(!_0x42bc2a||!_0xecd30b)return null;let _0x177fcb=new _0x556769();return _0x177fcb[_0x13ebd3(0x1d1)](_0x42bc2a[_0x13ebd3(0x18f)]),_0x42bc2a[_0x13ebd3(0x207)]>0x0&&_0x177fcb[_0x13ebd3(0x19e)](_0x42bc2a[_0x13ebd3(0x207)],_0x282876(_0xecd30b,_0x42bc2a['start'],_0x42bc2a['start']+_0x42bc2a[_0x13ebd3(0x207)],!0x1)),_0x42bc2a['deleteLength']>0x0&&_0x177fcb[_0x13ebd3(0x25c)](_0x42bc2a[_0x13ebd3(0x250)]),_0x5e930b[_0x13ebd3(0x1db)]()[_0x13ebd3(0x1bf)](_0x177fcb[_0x13ebd3(0x27e)](),_0x22ccc4);}function xt(_0x329017,_0x11208b){const _0x51bfe4=_0x3a7f13;if(_0x329017==null||_0x11208b==null||_0x329017===_0x11208b)return null;let _0x34df1a=0x0;for(;_0x34df1a<_0x329017['length']&&_0x34df1a<_0x11208b[_0x51bfe4(0x218)]&&_0x329017[_0x34df1a]===_0x11208b[_0x34df1a];)_0x34df1a+=0x1;let _0x4b47b9=_0x329017[_0x51bfe4(0x218)],_0x1b1f56=_0x11208b[_0x51bfe4(0x218)];for(;_0x4b47b9>_0x34df1a&&_0x1b1f56>_0x34df1a&&_0x329017[_0x4b47b9-0x1]===_0x11208b[_0x1b1f56-0x1];)--_0x4b47b9,--_0x1b1f56;return{'start':_0x34df1a,'deleteLength':_0x4b47b9-_0x34df1a,'insertLength':_0x1b1f56-_0x34df1a};}function St(_0x1c4e9f){const _0x31d240=_0x3a7f13;return{'formulas':Object[_0x31d240(0x183)](Object[_0x31d240(0x249)](_0x1c4e9f[_0x31d240(0x264)])[_0x31d240(0x266)](([_0x3cf782,_0x2e71d6])=>[_0x3cf782,{..._0x2e71d6,..._0x2e71d6[_0x31d240(0x230)]?{'numberFormat':{..._0x2e71d6[_0x31d240(0x230)]}}:null,..._0x2e71d6[_0x31d240(0x1ff)]?{'lastValue':{..._0x2e71d6[_0x31d240(0x1ff)]}}:null}]))};}let Y=class extends _0x533030{constructor(_0x26bee7,_0x41c06f,_0x6f9606,_0x36d6af){const _0xcca16b=_0x3a7f13;super(),this[_0xcca16b(0x1e1)]=_0x26bee7,this[_0xcca16b(0x20a)]=_0x41c06f,this[_0xcca16b(0x1f8)]=_0x6f9606,this[_0xcca16b(0x258)]=_0x36d6af,A(this,_0xcca16b(0x1be),new Set()),A(this,_0xcca16b(0x1d3),!0x1),A(this,_0xcca16b(0x26d),!0x1),this['_instanceService'][_0xcca16b(0x18a)](_0x4aa394['UNIVER_DOC'])[_0xcca16b(0x1f5)](_0x5da29b=>this[_0xcca16b(0x258)][_0xcca16b(0x184)](_0x5da29b)),this['disposeWithMe'](this[_0xcca16b(0x1f8)][_0xcca16b(0x282)][_0xcca16b(0x1b0)](({unitId:_0x1c7c1a})=>this['_syncUnit'](_0x1c7c1a))),this['disposeWithMe'](this[_0xcca16b(0x1e1)][_0xcca16b(0x26e)][_0xcca16b(0x1b0)](({unit:_0x2c442a})=>{const _0xc8e41f=_0xcca16b;_0x2c442a[_0xc8e41f(0x256)]===_0x4aa394[_0xc8e41f(0x190)]&&this[_0xc8e41f(0x24b)](_0x2c442a[_0xc8e41f(0x1e6)]());})),this[_0xcca16b(0x25a)](this['_instanceService'][_0xcca16b(0x21e)][_0xcca16b(0x1b0)](_0x3e6f8a=>{const _0xa9cf35=_0xcca16b;this[_0xa9cf35(0x258)][_0xa9cf35(0x231)](_0x3e6f8a['getUnitId']());})),this[_0xcca16b(0x25a)](this[_0xcca16b(0x20a)]['onCommandExecuted'](_0x301cf4=>{const _0x4f3d0e=_0xcca16b;if(_0x301cf4['id']===_0xd26f03['id']&&Ct(_0x301cf4[_0x4f3d0e(0x1d4)])){let _0x570046=_0x301cf4['params'];_0x570046[_0x4f3d0e(0x1fe)]||this[_0x4f3d0e(0x253)](_0x570046[_0x4f3d0e(0x206)]);}}));}[_0x3a7f13(0x1eb)](){const _0x19f2b4=_0x3a7f13;this['_isDisposed']=!0x0,super[_0x19f2b4(0x1eb)]();}['_queueSync'](_0x17afe2){const _0x4620df=_0x3a7f13;this[_0x4620df(0x1be)][_0x4620df(0x1e0)](_0x17afe2),this['_syncScheduled']||(this[_0x4620df(0x1d3)]=!0x0,queueMicrotask(()=>{const _0x30007d=_0x4620df;if(this['_syncScheduled']=!0x1,this[_0x30007d(0x26d)])return;let _0x929ec8=Array[_0x30007d(0x1d0)](this['_pendingUnitIds']);this[_0x30007d(0x1be)][_0x30007d(0x220)](),_0x929ec8[_0x30007d(0x1f5)](_0x3687cb=>this[_0x30007d(0x253)](_0x3687cb));}));}[_0x3a7f13(0x253)](_0x3a9813){const _0x5c1636=_0x3a7f13;let _0x286405=this[_0x5c1636(0x1e1)][_0x5c1636(0x1cb)](_0x3a9813,_0x4aa394['UNIVER_DOC']);_0x286405&&this[_0x5c1636(0x258)][_0x5c1636(0x184)](_0x286405);}};Y=N([M(0x0,_0x2629d5),M(0x1,_0x9a0954),M(0x2,_0x5d6038(j)),M(0x3,_0x5d6038(P))],Y);function Ct(_0x4a9f91){const _0x3df4d5=_0x3a7f13;return typeof _0x4a9f91==_0x3df4d5(0x247)&&!!_0x4a9f91&&'unitId'in _0x4a9f91&&typeof _0x4a9f91[_0x3df4d5(0x206)]==_0x3df4d5(0x25f)&&(!(_0x3df4d5(0x1fe)in _0x4a9f91)||_0x4a9f91[_0x3df4d5(0x1fe)]===void 0x0||typeof _0x4a9f91[_0x3df4d5(0x1fe)]==_0x3df4d5(0x25f));}let X=class extends _0x533030{constructor(_0x1ad25e,_0x47c758){const _0x5924f3=_0x3a7f13;super(),this[_0x5924f3(0x228)]=_0x1ad25e,this[_0x5924f3(0x275)]=_0x47c758,this[_0x5924f3(0x25a)](this['_resourceManagerService'][_0x5924f3(0x1de)]({'pluginName':y,'businesses':[_0x4aa394['UNIVER_DOC']],'toJson':_0x11ce79=>JSON[_0x5924f3(0x27b)](this[_0x5924f3(0x275)][_0x5924f3(0x27e)](_0x11ce79)),'parseJson':_0x5e42cb=>JSON[_0x5924f3(0x23d)](_0x5e42cb),'onLoad':(_0x70f3d0,_0x58efcd)=>{const _0x40de33=_0x5924f3;this[_0x40de33(0x275)][_0x40de33(0x283)](_0x70f3d0,_0x58efcd);},'onUnLoad':_0x1fe4e8=>this[_0x5924f3(0x275)]['removeUnit'](_0x1fe4e8)}));}};X=N([M(0x0,_0x164b3f),M(0x1,_0x5d6038(j))],X);var wt=_0x3a7f13(0x237),Tt=_0x3a7f13(0x1ed);const Et={};let Z=class extends _0x533030{constructor(_0xd158c5,_0x266105,_0x20383e){const _0x43b0cf=_0x3a7f13;super(),this[_0x43b0cf(0x1ca)]=_0xd158c5,this[_0x43b0cf(0x1a4)]=_0x266105,this[_0x43b0cf(0x25a)](_0x20383e[_0x43b0cf(0x195)]({'resolve':(_0xacd81d,_0x1d5d9d)=>{const _0x5b2e18=_0x43b0cf;var _0x504e8c;return((_0x504e8c=_0x1d5d9d[_0x5b2e18(0x182)])==null?void 0x0:_0x504e8c[_0x5b2e18(0x280)](w)[_0x5b2e18(0x266)](_0x3f5902=>({'startOffset':_0x3f5902[_0x5b2e18(0x254)],'endOffset':_0x3f5902[_0x5b2e18(0x221)]+0x1,'text':this['resolveFormula'](_0xacd81d,_0x3f5902[_0x5b2e18(0x23f)])})))??[];}})),this[_0x43b0cf(0x25a)](this[_0x43b0cf(0x1a4)]['presentationChanged$'][_0x43b0cf(0x1b0)](({unitId:_0x46eac9})=>{const _0x5c55b9=_0x43b0cf;_0x20383e[_0x5c55b9(0x217)](_0x46eac9);}));}[_0x3a7f13(0x234)](_0x3b91ad,_0x8c6a1c){const _0xe57e5c=_0x3a7f13;var _0x474428;return((_0x474428=this['_formulaService'][_0xe57e5c(0x244)]({'unitId':_0x3b91ad,'rangeId':_0x8c6a1c}))==null?void 0x0:_0x474428[_0xe57e5c(0x192)])??'';}[_0x3a7f13(0x1c9)](_0x54cad1,_0x2c003f,_0x307e62){const _0xf2a59d=_0x3a7f13;var _0x231baa;let _0x241966=this[_0xf2a59d(0x1ca)][_0xf2a59d(0x1cb)](_0x54cad1,_0x4aa394[_0xf2a59d(0x190)]),_0x712023=_0x241966==null?void 0x0:_0x241966[_0xf2a59d(0x198)]();if(!_0x712023)return'';let _0x1576f4=_0x712023['dataStream'][_0xf2a59d(0x1f7)](_0x2c003f,_0x307e62),_0x38849c=((_0x231baa=_0x712023[_0xf2a59d(0x182)])==null?void 0x0:_0x231baa[_0xf2a59d(0x280)](_0x499359=>w(_0x499359)&&_0x499359[_0xf2a59d(0x254)]>=_0x2c003f&&_0x499359['endIndex']<_0x307e62)['sort']((_0x35cf0e,_0x3e7b35)=>_0x3e7b35['startIndex']-_0x35cf0e[_0xf2a59d(0x254)]))??[];for(let _0x4323d5 of _0x38849c){let _0x172811=_0x4323d5[_0xf2a59d(0x254)]-_0x2c003f,_0xf51724=_0x4323d5[_0xf2a59d(0x221)]-_0x2c003f+0x1;_0x1576f4=''+_0x1576f4[_0xf2a59d(0x1f7)](0x0,_0x172811)+this[_0xf2a59d(0x234)](_0x54cad1,_0x4323d5[_0xf2a59d(0x23f)])+_0x1576f4[_0xf2a59d(0x1f7)](_0xf51724);}return _0x1576f4;}[_0x3a7f13(0x1d9)](_0x4a1ebe){return Dt(_0x4a1ebe);}[_0x3a7f13(0x1ef)](_0x49eed3,_0x45e9dd,_0x634093={}){const _0x2a6d37=_0x3a7f13;var _0x4e27b1;return Be({'id':_0x49eed3,'body':_0x45e9dd,'documentStyle':{}},(((_0x4e27b1=_0x45e9dd[_0x2a6d37(0x182)])==null?void 0x0:_0x4e27b1[_0x2a6d37(0x280)](w))??[])['map'](_0x1a0977=>({'rangeId':_0x1a0977['rangeId'],'text':_0x634093[_0x1a0977['rangeId']]??this[_0x2a6d37(0x234)](_0x49eed3,_0x1a0977[_0x2a6d37(0x23f)])})))[_0x2a6d37(0x1b4)]??{'dataStream':''};}};Z=N([M(0x0,_0x2629d5),M(0x1,_0x5d6038(P)),M(0x2,_0x5d6038(_0x2459b3))],Z);function Dt(_0x426647){const _0x18efad=_0x3a7f13;var _0x4ee8a6,_0x3de727;let _0x2a7704=Ot(_0x426647),_0x19d859=Be(_0x426647,(((_0x4ee8a6=_0x426647[_0x18efad(0x1b4)])==null||(_0x4ee8a6=_0x4ee8a6[_0x18efad(0x182)])==null?void 0x0:_0x4ee8a6['filter'](w))??[])[_0x18efad(0x266)](_0x2cecf1=>({'rangeId':_0x2cecf1['rangeId'],'text':kt(_0x2a7704==null?void 0x0:_0x2a7704[_0x18efad(0x264)][_0x2cecf1[_0x18efad(0x23f)]])})));return _0x19d859[_0x18efad(0x202)]=(_0x3de727=_0x19d859[_0x18efad(0x202)])==null?void 0x0:_0x3de727[_0x18efad(0x280)](_0x4689d2=>_0x4689d2[_0x18efad(0x215)]!==y),_0x19d859;}function Ot(_0x5c2187){const _0x4a282b=_0x3a7f13;var _0x2734a3;let _0x322ed5=(_0x2734a3=_0x5c2187[_0x4a282b(0x202)])==null||(_0x2734a3=_0x2734a3[_0x4a282b(0x19d)](_0x4c22ff=>_0x4c22ff[_0x4a282b(0x215)]===_0x4a282b(0x232)))==null?void 0x0:_0x2734a3[_0x4a282b(0x262)];if(_0x322ed5)try{let _0x5da19e=JSON[_0x4a282b(0x23d)](_0x322ed5);return x(_0x5da19e)?_0x5da19e:void 0x0;}catch{return;}}function kt(_0x13f512){const _0xc3c338=_0x3a7f13;return _0x13f512?_0x12221e({'lastValue':_0x13f512['lastValue'],'numberFormat':_0x13f512[_0xc3c338(0x230)]})[_0xc3c338(0x192)]:'';}let Q=class extends _0x533030{constructor(_0x67af32,_0x1ce97c,_0x26a5a0){const _0x1776a3=_0x3a7f13;super(),this[_0x1776a3(0x1a4)]=_0x67af32,this['_cacheEligibilityService']=_0x1ce97c,this[_0x1776a3(0x25a)](_0x26a5a0[_0x1776a3(0x1f6)](this));}[_0x3a7f13(0x1cd)](_0x71c7a3){const _0x15fd12=_0x3a7f13;let _0x5d2570=new Map();for(let _0x2c6b50 of this[_0x15fd12(0x1a4)]['getRegisteredFormulas']()){var _0x47912c;if(!this[_0x15fd12(0x1a7)][_0x15fd12(0x1c7)](_0x2c6b50['config'][_0x15fd12(0x24d)],_0x2c6b50[_0x15fd12(0x1a3)])['eligible'])continue;let _0x30e212=_0x3ee924(_0x2c6b50[_0x15fd12(0x1a3)]),_0x49e9f1=_0x30e212?_0x5a1b13(_0x30e212):null;if(!_0x49e9f1||At(_0x2c6b50[_0x15fd12(0x270)][_0x15fd12(0x1ff)],_0x49e9f1))continue;let _0xdbfeb8=_0x5d2570['get'](_0x2c6b50[_0x15fd12(0x20c)][_0x15fd12(0x206)])??[];_0xdbfeb8[_0x15fd12(0x1d6)]({'rangeId':_0x2c6b50[_0x15fd12(0x20c)][_0x15fd12(0x23f)],'expectedFormula':_0x2c6b50['config'][_0x15fd12(0x24d)],'expectedNumberFormat':(_0x47912c=_0x2c6b50[_0x15fd12(0x270)][_0x15fd12(0x230)])==null?void 0x0:_0x47912c[_0x15fd12(0x229)],'expectedReferenceRevision':_0x2c6b50[_0x15fd12(0x1e7)],'lastValue':_0x49e9f1}),_0x5d2570[_0x15fd12(0x22f)](_0x2c6b50[_0x15fd12(0x20c)][_0x15fd12(0x206)],_0xdbfeb8);}return Array[_0x15fd12(0x1d0)](_0x5d2570,([_0x96eb3e,_0x24f314])=>({'id':R['id'],'params':{'unitId':_0x96eb3e,'updates':_0x24f314}}));}};Q=N([M(0x0,_0x5d6038(P)),M(0x1,_0x5d6038(_0x13ac3a)),M(0x2,_0x5d6038(_0x416b1f))],Q);function At(_0xf0585,_0x5d1307){const _0xa18be=_0x3a7f13;return(_0xf0585==null?void 0x0:_0xf0585['v'])===_0x5d1307['v']&&(_0xf0585==null?void 0x0:_0xf0585['t'])===_0x5d1307['t']&&(_0xf0585==null?void 0x0:_0xf0585['pattern'])===_0x5d1307[_0xa18be(0x229)];}let $=class extends _0x26195d{constructor(_0x4f157c=Et,_0x17dac8,_0x2d617f,_0x4fe1d9){const _0x31b2c5=_0x3a7f13;super(),this[_0x31b2c5(0x24a)]=_0x4f157c,this['_injector']=_0x17dac8,this['_commandService']=_0x2d617f,this['_configService']=_0x4fe1d9;let {..._0x43a95a}=_0x4e3800({},Et,this[_0x31b2c5(0x24a)]);this[_0x31b2c5(0x27d)][_0x31b2c5(0x277)](_0x31b2c5(0x24e),_0x43a95a);}[_0x3a7f13(0x1b9)](){const _0x5218fd=_0x3a7f13;this[_0x5218fd(0x257)][_0x5218fd(0x1e0)]([j]),this[_0x5218fd(0x257)][_0x5218fd(0x1e0)]([P]),this[_0x5218fd(0x257)][_0x5218fd(0x1e0)]([X]),this[_0x5218fd(0x257)]['add']([Y]),this[_0x5218fd(0x257)][_0x5218fd(0x1e0)]([Q]),this[_0x5218fd(0x257)][_0x5218fd(0x1e0)]([Z]),_0xddcf97(this[_0x5218fd(0x257)],[[j],[X],[Y],[Q],[Z]]),[lt,ut,L,R,z,B,V,H,U,W]['forEach'](_0x399fbb=>this[_0x5218fd(0x25a)](this[_0x5218fd(0x20a)][_0x5218fd(0x1ad)](_0x399fbb)));}};A($,_0x3a7f13(0x233),y),A($,_0x3a7f13(0x273),wt),A($,_0x3a7f13(0x189),Tt),A($,_0x3a7f13(0x256),_0x4aa394[_0x3a7f13(0x190)]),$=N([_0x37da81(_0x3344bd,_0x513513,_0x46761e),M(0x1,_0x5d6038(_0x2a8248)),M(0x2,_0x9a0954),M(0x3,_0x4226f8)],$);export{W as ConvertDocFormulaToTextCommand,je as DOC_FORMULA_CUSTOM_RANGE_KIND,Me as DOC_FORMULA_OBJECT_REPLACEMENT,y as DOC_FORMULA_PLUGIN,Z as DocFormulaDisplayTextService,Y as DocFormulaLifecycleController,j as DocFormulaModel,X as DocFormulaResourceController,ot as DocFormulaResultStatus,P as DocFormulaService,z as InsertDocFormulaCommand,C as InvalidDocFormulaInsertRangeError,H as RemoveDocFormulaCommand,ut as RemoveDocFormulaMutation,U as ReplaceDocFormulaWithTextCommand,R as SetDocFormulaLastValuesMutation,lt as SetDocFormulaMutation,V as SetDocFormulaNumberFormatCommand,L as SetDocFormulaResourceMutation,$ as UniverDocsFormulaPlugin,B as UpdateDocFormulaCommand,Ve as assertSafeDocFormulaInsertRange,Le as buildInsertDocFormulaActions,ze as buildRemoveDocFormulaActions,Re as buildUpdateDocFormulaActions,b as createEmptyDocFormulaResource,Dt as degradeDocFormulaDocumentData,T as findDocFormulaRange,Ne as isDocFormulaConfig,w as isDocFormulaRange,x as isDocFormulaResource,Pe as isFormulaLastValue};
package/lib/facade.js CHANGED
@@ -1 +1 @@
1
- var _0x2b355b=_0x3a44;(function(_0x3b99bc,_0x4a9c94){var _0x205c82=_0x3a44,_0x4bf381=_0x3b99bc();while(!![]){try{var _0x3785b0=-parseInt(_0x205c82(0x1d2))/0x1*(-parseInt(_0x205c82(0x190))/0x2)+-parseInt(_0x205c82(0x19f))/0x3+parseInt(_0x205c82(0x1ac))/0x4+-parseInt(_0x205c82(0x18a))/0x5+parseInt(_0x205c82(0x1b3))/0x6+parseInt(_0x205c82(0x192))/0x7+-parseInt(_0x205c82(0x193))/0x8;if(_0x3785b0===_0x4a9c94)break;else _0x4bf381['push'](_0x4bf381['shift']());}catch(_0x4d233e){_0x4bf381['push'](_0x4bf381['shift']());}}}(_0x3b5e,0x58081));import{ConvertDocFormulaToTextCommand as _0x2d4520,DocFormulaDisplayTextService as _0xb17991,DocFormulaModel as _0x32fc45,DocFormulaService as _0x5bf394,InsertDocFormulaCommand as _0x3e5dad,RemoveDocFormulaCommand as _0x3eeb8c,ReplaceDocFormulaWithTextCommand as _0x497f52,SetDocFormulaNumberFormatCommand as _0x5dba3c,UpdateDocFormulaCommand as _0x9bf949,isDocFormulaRange as _0x3a1bb9}from'@univerjs-pro/docs-formula';import{ICommandService as _0x128e28,IResourceLoaderService as _0xcfcf25,IUniverInstanceService as _0x23abd6,Inject as _0x2f2ecf,UniverInstanceType as _0x5a4427}from'@univerjs/core';import{FDocument as _0x1cb9b3,FDocumentParagraph as _0x477006,FDocumentTextRange as _0xe94339}from'@univerjs/docs/facade';function v(_0x558cab,_0x40a1cc){return function(_0x4af14b,_0x55fda7){_0x40a1cc(_0x4af14b,_0x55fda7,_0x558cab);};}function y(_0x3795b2,_0x507c35,_0x2038e8,_0x1aaa30){var _0xef8a6c=_0x3a44,_0x3016e6=arguments['length'],_0x36f69a=_0x3016e6<0x3?_0x507c35:_0x1aaa30===null?_0x1aaa30=Object['getOwnPropertyDescriptor'](_0x507c35,_0x2038e8):_0x1aaa30,_0x217356;if(typeof Reflect==_0xef8a6c(0x1b1)&&typeof Reflect[_0xef8a6c(0x1c7)]==_0xef8a6c(0x1bf))_0x36f69a=Reflect['decorate'](_0x3795b2,_0x507c35,_0x2038e8,_0x1aaa30);else{for(var _0x48fc6d=_0x3795b2[_0xef8a6c(0x1c5)]-0x1;_0x48fc6d>=0x0;_0x48fc6d--)(_0x217356=_0x3795b2[_0x48fc6d])&&(_0x36f69a=(_0x3016e6<0x3?_0x217356(_0x36f69a):_0x3016e6>0x3?_0x217356(_0x507c35,_0x2038e8,_0x36f69a):_0x217356(_0x507c35,_0x2038e8))||_0x36f69a);}return _0x3016e6>0x3&&_0x36f69a&&Object[_0xef8a6c(0x1a3)](_0x507c35,_0x2038e8,_0x36f69a),_0x36f69a;}let b=class{constructor(_0x533d09,_0x2d879f,_0x2451b0,_0x3272f3,_0x280091,_0x1d3e0e){var _0x2e43d7=_0x3a44;this[_0x2e43d7(0x1a8)]=_0x533d09,this[_0x2e43d7(0x1c1)]=_0x2d879f,this[_0x2e43d7(0x1ab)]=_0x2451b0,this['_model']=_0x3272f3,this['_service']=_0x280091,this[_0x2e43d7(0x1b9)]=_0x1d3e0e;}[_0x2b355b(0x1b2)](){var _0x524c58=_0x2b355b;return this[_0x524c58(0x1c1)];}[_0x2b355b(0x19c)](){var _0x59abd3=_0x2b355b;let _0x321151=this[_0x59abd3(0x18b)]();return _0x321151?{'endOffset':_0x321151['endIndex']+0x1,'rangeId':_0x321151[_0x59abd3(0x195)],'startOffset':_0x321151[_0x59abd3(0x199)]}:null;}[_0x2b355b(0x1b8)](){var _0x2e643a=_0x2b355b,_0x1b162e;return((_0x1b162e=this[_0x2e643a(0x1cf)][_0x2e643a(0x1b8)](this[_0x2e643a(0x1a8)],this[_0x2e643a(0x1c1)]))==null?void 0x0:_0x1b162e[_0x2e643a(0x19e)])??'';}[_0x2b355b(0x197)](){var _0x351545=_0x2b355b;return this[_0x351545(0x1cf)][_0x351545(0x1b8)](this[_0x351545(0x1a8)],this[_0x351545(0x1c1)])??null;}['getResult'](){var _0x469f77=_0x2b355b;return this['_service'][_0x469f77(0x1ae)]({'unitId':this[_0x469f77(0x1a8)],'rangeId':this['_rangeId']})??null;}['describe'](){var _0x42f651=_0x2b355b;let _0x147ae0=this[_0x42f651(0x19c)](),_0x187639=this[_0x42f651(0x197)](),_0x3f2874=this['getResult']();return!_0x147ae0||!_0x187639||!_0x3f2874?null:{..._0x147ae0,'config':_0x187639,'formula':_0x187639[_0x42f651(0x19e)],'result':_0x3f2874,'type':_0x42f651(0x19e)};}['update'](_0x45ecf7){var _0x23646f=_0x2b355b;return this['_commandService'][_0x23646f(0x18c)](_0x9bf949['id'],{'externalReferences':_0x45ecf7['externalReferences'],'formula':_0x45ecf7[_0x23646f(0x19e)],'numberFormat':_0x45ecf7['numberFormat'],'rangeId':this[_0x23646f(0x1c1)],'unitId':this[_0x23646f(0x1a8)]});}[_0x2b355b(0x1a5)](_0x2ae9e6){var _0x1acf0f=_0x2b355b;return this[_0x1acf0f(0x1ab)][_0x1acf0f(0x18c)](_0x5dba3c['id'],{'numberFormat':_0x2ae9e6,'rangeId':this['_rangeId'],'unitId':this['_unitId']});}[_0x2b355b(0x19a)](){var _0x349c08=_0x2b355b;return this[_0x349c08(0x1ab)]['syncExecuteCommand'](_0x3eeb8c['id'],{'rangeId':this[_0x349c08(0x1c1)],'unitId':this[_0x349c08(0x1a8)]});}[_0x2b355b(0x1c9)](_0x3d05f6){var _0x55f668=_0x2b355b;return this[_0x55f668(0x1ab)][_0x55f668(0x18c)](_0x497f52['id'],{'rangeId':this[_0x55f668(0x1c1)],'text':_0x3d05f6,'unitId':this[_0x55f668(0x1a8)]});}[_0x2b355b(0x1cc)](){var _0x4a2b0a=_0x2b355b;return this[_0x4a2b0a(0x1ab)]['syncExecuteCommand'](_0x2d4520['id'],{'rangeId':this[_0x4a2b0a(0x1c1)],'unitId':this[_0x4a2b0a(0x1a8)]});}['_getCustomRange'](){var _0x4b8c6e=_0x2b355b,_0x18a5d5;let _0x161d28=this[_0x4b8c6e(0x1b9)][_0x4b8c6e(0x1c2)](this[_0x4b8c6e(0x1a8)],_0x5a4427[_0x4b8c6e(0x1b4)]);return _0x161d28==null||(_0x18a5d5=_0x161d28['getSnapshot']()['body'])==null||(_0x18a5d5=_0x18a5d5[_0x4b8c6e(0x1cd)])==null?void 0x0:_0x18a5d5[_0x4b8c6e(0x1d1)](_0x1f7d5e=>_0x1f7d5e[_0x4b8c6e(0x195)]===this[_0x4b8c6e(0x1c1)]&&_0x3a1bb9(_0x1f7d5e));}};b=y([v(0x2,_0x128e28),v(0x3,_0x2f2ecf(_0x32fc45)),v(0x4,_0x2f2ecf(_0x5bf394)),v(0x5,_0x23abd6)],b);function x(_0x32b2e8){'@babel/helpers - typeof';var _0x2b02d8=_0x2b355b;return x=typeof Symbol=='function'&&typeof Symbol[_0x2b02d8(0x1a1)]=='symbol'?function(_0x396b3e){return typeof _0x396b3e;}:function(_0x504d0f){var _0x12042d=_0x2b02d8;return _0x504d0f&&typeof Symbol==_0x12042d(0x1bf)&&_0x504d0f[_0x12042d(0x1b7)]===Symbol&&_0x504d0f!==Symbol[_0x12042d(0x18f)]?_0x12042d(0x1a6):typeof _0x504d0f;},x(_0x32b2e8);}function S(_0x395844,_0x4f7aa0){var _0x8dafe9=_0x2b355b;if(x(_0x395844)!=_0x8dafe9(0x1b1)||!_0x395844)return _0x395844;var _0x5d5e5e=_0x395844[Symbol[_0x8dafe9(0x198)]];if(_0x5d5e5e!==void 0x0){var _0x59d213=_0x5d5e5e[_0x8dafe9(0x1ce)](_0x395844,_0x4f7aa0||_0x8dafe9(0x191));if(x(_0x59d213)!='object')return _0x59d213;throw TypeError(_0x8dafe9(0x1c6));}return(_0x4f7aa0===_0x8dafe9(0x1c0)?String:Number)(_0x395844);}function C(_0x38fd36){var _0x3fff0d=_0x2b355b,_0x3e2604=S(_0x38fd36,_0x3fff0d(0x1c0));return x(_0x3e2604)==_0x3fff0d(0x1a6)?_0x3e2604:_0x3e2604+'';}function w(_0x1313de,_0x2c3e53,_0x5b5c4f){var _0x27a84d=_0x2b355b;return(_0x2c3e53=C(_0x2c3e53))in _0x1313de?Object[_0x27a84d(0x1a3)](_0x1313de,_0x2c3e53,{'value':_0x5b5c4f,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x1313de[_0x2c3e53]=_0x5b5c4f,_0x1313de;}var T=class extends _0x1cb9b3{constructor(..._0x2d01d5){var _0x77f48a=_0x2b355b;super(..._0x2d01d5),w(this,_0x77f48a(0x1bd),void 0x0),w(this,_0x77f48a(0x1b6),void 0x0),w(this,_0x77f48a(0x1ca),void 0x0),w(this,_0x77f48a(0x18e),void 0x0);}['_initialize'](_0x1bc0b6){var _0x6493a8=_0x2b355b;this[_0x6493a8(0x1bd)]=_0x1bc0b6[_0x6493a8(0x196)](_0x128e28),this[_0x6493a8(0x1b6)]=_0x1bc0b6[_0x6493a8(0x196)](_0xb17991),this[_0x6493a8(0x1ca)]=_0x1bc0b6[_0x6493a8(0x196)](_0x32fc45),this['_docsFormulaResourceLoaderService']=_0x1bc0b6[_0x6493a8(0x196)](_0xcfcf25);}[_0x2b355b(0x1b0)](){var _0x488e46=_0x2b355b;return this[_0x488e46(0x1d0)]()[_0x488e46(0x1c4)](_0x3cdc72=>this[_0x488e46(0x1aa)](_0x3cdc72['rangeId']));}[_0x2b355b(0x1b8)](_0x2efd01){var _0x38170d=_0x2b355b;return this[_0x38170d(0x1d0)]()[_0x38170d(0x1a9)](_0x29dc0d=>_0x29dc0d[_0x38170d(0x195)]===_0x2efd01)?this[_0x38170d(0x1aa)](_0x2efd01):null;}[_0x2b355b(0x19b)](_0x3febe2){var _0x167dad=_0x2b355b;let _0x431509=this[_0x167dad(0x1d0)]()['find'](_0x560648=>_0x560648['startIndex']<=_0x3febe2&&_0x3febe2<=_0x560648['endIndex']);return _0x431509?this[_0x167dad(0x1aa)](_0x431509[_0x167dad(0x195)]):null;}[_0x2b355b(0x1be)](){var _0x4aa8c1=_0x2b355b;let _0x28a557=this[_0x4aa8c1(0x18e)][_0x4aa8c1(0x1d4)](this['id']);if(!_0x28a557)throw Error(_0x4aa8c1(0x18d)+this['id']+_0x4aa8c1(0x1d5));return this['_docsFormulaDisplayTextService'][_0x4aa8c1(0x1af)](_0x28a557);}[_0x2b355b(0x1c8)](_0x41d33d){var _0x191160=_0x2b355b;return this[_0x191160(0x1a2)]({'externalReferences':_0x41d33d[_0x191160(0x1bb)],'formula':_0x41d33d['formula'],'numberFormat':_0x41d33d[_0x191160(0x1b5)],'target':{'type':_0x191160(0x1a7),'startOffset':_0x41d33d[_0x191160(0x1ba)],'endOffset':_0x41d33d['endOffset']},'unitId':this[_0x191160(0x1b2)]()});}[_0x2b355b(0x1a2)](_0x46ed4e){var _0x120a7d=_0x2b355b;let _0x132226=this['_docsFormulaCommandService'][_0x120a7d(0x18c)](_0x3e5dad['id'],_0x46ed4e);return _0x132226?this[_0x120a7d(0x1aa)](_0x132226['rangeId']):null;}[_0x2b355b(0x1d0)](){var _0x1d58c3=_0x2b355b,_0x116043;let _0xb34047=this[_0x1d58c3(0x1ca)]['getFormulas'](this[_0x1d58c3(0x1b2)]());return((_0x116043=this[_0x1d58c3(0x1c3)]('')[_0x1d58c3(0x1cd)])==null?void 0x0:_0x116043['filter'](_0x258602=>_0x3a1bb9(_0x258602)&&_0xb34047[_0x258602[_0x1d58c3(0x195)]]!=null))??[];}['_createFormula'](_0x3cadc1){var _0x59c9da=_0x2b355b;return this[_0x59c9da(0x1a0)]['createInstance'](b,this[_0x59c9da(0x1b2)](),_0x3cadc1);}};_0x1cb9b3['extend'](T);function _0x3b5e(){var _0x290e25=['_insert','defineProperty','createInstance','setNumberFormat','symbol','range','_unitId','some','_createFormula','_commandService','2256652GmuLhb','end','getResult','degradeDocumentData','getFormulas','object','getId','794124FRKoMV','UNIVER_DOC','numberFormat','_docsFormulaDisplayTextService','constructor','getFormula','_univerInstanceService','startOffset','externalReferences','_document','_docsFormulaCommandService','saveFormulaDisplayTextSnapshot','function','string','_rangeId','getUnit','getBody','map','length','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','decorate','insertFormula','replaceWithText','_docsFormulaModel','getSegmentId','convertToText','customRanges','call','_model','_getCompleteRanges','find','5VqnOuw','replaceWithFormula','saveUnit','\x20could\x20not\x20be\x20serialized.','365840jGNHzE','_getCustomRange','syncExecuteCommand','Document\x20','_docsFormulaResourceLoaderService','prototype','106250feYDGj','default','2654498EkXvZH','6966968rLuuwy','_initialize','rangeId','get','getConfig','toPrimitive','startIndex','remove','getFormulaAt','getRange','extend','formula','110220RQLZiJ','_injector','iterator'];_0x3b5e=function(){return _0x290e25;};return _0x3b5e();}var E=class extends _0x477006{constructor(..._0x13cc1b){var _0x23ef8e=_0x2b355b;super(..._0x13cc1b),w(this,_0x23ef8e(0x1bd),void 0x0);}['_initialize'](_0x374214){var _0x5e1903=_0x2b355b;this[_0x5e1903(0x1bd)]=_0x374214[_0x5e1903(0x196)](_0x128e28);}[_0x2b355b(0x1c8)](_0x4ddb55,_0x1026ca,_0x1c34e6={}){return this['_insert'](_0x4ddb55,_0x1026ca,_0x1c34e6);}['appendFormula'](_0x560153,_0x1392d0={}){var _0x40d68b=_0x2b355b;return this['_insert'](_0x40d68b(0x1ad),_0x560153,_0x1392d0);}[_0x2b355b(0x1a2)](_0x1b3211,_0x5a92bb,_0x22039c){var _0x11d99d=_0x2b355b;if(this[_0x11d99d(0x1cb)]())return null;let _0x1f8ec8={'externalReferences':_0x22039c[_0x11d99d(0x1bb)],'formula':_0x5a92bb,'numberFormat':_0x22039c[_0x11d99d(0x1b5)],'target':{'type':'paragraph','paragraphId':this['getId'](),'position':_0x1b3211},'unitId':this['_document']['getId']()},_0x33cff7=this[_0x11d99d(0x1bd)][_0x11d99d(0x18c)](_0x3e5dad['id'],_0x1f8ec8);return _0x33cff7?this['_injector'][_0x11d99d(0x1a4)](b,this[_0x11d99d(0x1bc)][_0x11d99d(0x1b2)](),_0x33cff7[_0x11d99d(0x195)]):null;}};function _0x3a44(_0x3dbffd,_0xdf1336){_0x3dbffd=_0x3dbffd-0x18a;var _0x3b5e39=_0x3b5e();var _0x3a44fe=_0x3b5e39[_0x3dbffd];return _0x3a44fe;}_0x477006[_0x2b355b(0x19d)](E);var D=class extends _0xe94339{constructor(..._0x4a40e1){var _0x610aa9=_0x2b355b;super(..._0x4a40e1),w(this,_0x610aa9(0x1bd),void 0x0);}[_0x2b355b(0x194)](_0x280f5d){var _0x37780b=_0x2b355b;this[_0x37780b(0x1bd)]=_0x280f5d['get'](_0x128e28);}[_0x2b355b(0x1d3)](_0x36cb09,_0x40b437={}){var _0x6b855b=_0x2b355b;let {endOffset:_0x32b929,segmentId:_0x353e47,startOffset:_0x2d07d4}=this[_0x6b855b(0x19c)]();return _0x353e47?null:this[_0x6b855b(0x1a2)](_0x2d07d4,_0x32b929,_0x36cb09,_0x40b437);}[_0x2b355b(0x1a2)](_0x5c1fcd,_0xac1fe0,_0x121cff,_0x1afa9a){var _0x1306de=_0x2b355b;let _0x8edbb6={'externalReferences':_0x1afa9a[_0x1306de(0x1bb)],'formula':_0x121cff,'numberFormat':_0x1afa9a[_0x1306de(0x1b5)],'target':{'type':_0x1306de(0x1a7),'startOffset':_0x5c1fcd,'endOffset':_0xac1fe0},'unitId':this[_0x1306de(0x1bc)]['getId']()},_0x3b6c94=this[_0x1306de(0x1bd)][_0x1306de(0x18c)](_0x3e5dad['id'],_0x8edbb6);return _0x3b6c94?this[_0x1306de(0x1a0)][_0x1306de(0x1a4)](b,this[_0x1306de(0x1bc)][_0x1306de(0x1b2)](),_0x3b6c94['rangeId']):null;}};_0xe94339[_0x2b355b(0x19d)](D);export{b as FDocumentFormula};
1
+ var _0x4e8d1d=_0xf76d;function _0x3633(){var _0xc53dc7=['_docsFormulaDisplayTextService','customRanges','742016OgXaYr','setNumberFormat','_initialize','prototype','_createFormula','map','update','_getCompleteRanges','getFormulas','iterator','convertToText','_rangeId','get','getRange','_model','replaceWithText','symbol','startOffset','6cuuNFe','string','replaceWithFormula','startIndex','describe','_docsFormulaCommandService','getBody','_commandService','find','length','_insert','96289QLBCZB','createInstance','end','UNIVER_DOC','object','defineProperty','function','rangeId','syncExecuteCommand','3brbyHD','_docsFormulaModel','getSegmentId','degradeDocumentData','body','_univerInstanceService','567278WYaVeo','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','_injector','remove','_getCustomRange','range','extend','toPrimitive','appendFormula','getConfig','some','saveFormulaDisplayTextSnapshot','120635MEFBoL','62657pUpWko','getId','_service','2473560NMdnIY','call','formula','36ZgyRSH','5114950xzafyz','paragraph','numberFormat','getFormulaAt','default','_docsFormulaResourceLoaderService','getSnapshot','_document','insertFormula','endOffset','_unitId','endIndex','Document\x20','externalReferences','getFormula','saveUnit','decorate'];_0x3633=function(){return _0xc53dc7;};return _0x3633();}(function(_0x4b27be,_0x5eae59){var _0x1bd2f8=_0xf76d,_0x31e262=_0x4b27be();while(!![]){try{var _0x5e0f1=-parseInt(_0x1bd2f8(0x164))/0x1+-parseInt(_0x1bd2f8(0x173))/0x2*(-parseInt(_0x1bd2f8(0x16d))/0x3)+parseInt(_0x1bd2f8(0x186))/0x4*(parseInt(_0x1bd2f8(0x17f))/0x5)+-parseInt(_0x1bd2f8(0x159))/0x6*(parseInt(_0x1bd2f8(0x180))/0x7)+parseInt(_0x1bd2f8(0x147))/0x8+parseInt(_0x1bd2f8(0x183))/0x9+-parseInt(_0x1bd2f8(0x187))/0xa;if(_0x5e0f1===_0x5eae59)break;else _0x31e262['push'](_0x31e262['shift']());}catch(_0x3269d8){_0x31e262['push'](_0x31e262['shift']());}}}(_0x3633,0x3d6f7));import{ConvertDocFormulaToTextCommand as _0x3c527c,DocFormulaDisplayTextService as _0x43e9b5,DocFormulaModel as _0x5e08ca,DocFormulaService as _0x421237,InsertDocFormulaCommand as _0x3c045b,RemoveDocFormulaCommand as _0x37e065,ReplaceDocFormulaWithTextCommand as _0x2c2385,SetDocFormulaNumberFormatCommand as _0x492dd2,UpdateDocFormulaCommand as _0x3c604f,isDocFormulaRange as _0x19981d}from'@univerjs-pro/docs-formula';import{ICommandService as _0x549850,IResourceLoaderService as _0x312cab,IUniverInstanceService as _0x207dd1,Inject as _0x23a08b,UniverInstanceType as _0x46a90a}from'@univerjs/core';import{FDocument as _0x1ac644,FDocumentParagraph as _0x44e6e4,FDocumentTextRange as _0x4618e9}from'@univerjs/docs/facade';function v(_0x334af9,_0xad1b93){return function(_0x16c0a9,_0x23d6a7){_0xad1b93(_0x16c0a9,_0x23d6a7,_0x334af9);};}function y(_0x2111c7,_0x24bf90,_0x1ab771,_0x2707c5){var _0x3f40f2=_0xf76d,_0x4c55aa=arguments['length'],_0x19139e=_0x4c55aa<0x3?_0x24bf90:_0x2707c5===null?_0x2707c5=Object['getOwnPropertyDescriptor'](_0x24bf90,_0x1ab771):_0x2707c5,_0x3f17fd;if(typeof Reflect==_0x3f40f2(0x168)&&typeof Reflect[_0x3f40f2(0x144)]==_0x3f40f2(0x16a))_0x19139e=Reflect[_0x3f40f2(0x144)](_0x2111c7,_0x24bf90,_0x1ab771,_0x2707c5);else{for(var _0x34fd4b=_0x2111c7[_0x3f40f2(0x162)]-0x1;_0x34fd4b>=0x0;_0x34fd4b--)(_0x3f17fd=_0x2111c7[_0x34fd4b])&&(_0x19139e=(_0x4c55aa<0x3?_0x3f17fd(_0x19139e):_0x4c55aa>0x3?_0x3f17fd(_0x24bf90,_0x1ab771,_0x19139e):_0x3f17fd(_0x24bf90,_0x1ab771))||_0x19139e);}return _0x4c55aa>0x3&&_0x19139e&&Object[_0x3f40f2(0x169)](_0x24bf90,_0x1ab771,_0x19139e),_0x19139e;}let b=class{constructor(_0xe4cb1,_0x59071d,_0x38b188,_0x25b3e5,_0x1c9ec0,_0x4953d0){var _0x13e345=_0xf76d;this[_0x13e345(0x191)]=_0xe4cb1,this[_0x13e345(0x152)]=_0x59071d,this[_0x13e345(0x160)]=_0x38b188,this['_model']=_0x25b3e5,this[_0x13e345(0x182)]=_0x1c9ec0,this[_0x13e345(0x172)]=_0x4953d0;}[_0x4e8d1d(0x181)](){var _0x46b880=_0x4e8d1d;return this[_0x46b880(0x152)];}['getRange'](){var _0x377138=_0x4e8d1d;let _0x2189c5=this[_0x377138(0x177)]();return _0x2189c5?{'endOffset':_0x2189c5[_0x377138(0x192)]+0x1,'rangeId':_0x2189c5[_0x377138(0x16b)],'startOffset':_0x2189c5[_0x377138(0x15c)]}:null;}[_0x4e8d1d(0x195)](){var _0x3f7d78=_0x4e8d1d,_0x207919;return((_0x207919=this[_0x3f7d78(0x155)][_0x3f7d78(0x195)](this[_0x3f7d78(0x191)],this[_0x3f7d78(0x152)]))==null?void 0x0:_0x207919['formula'])??'';}['getConfig'](){var _0x448d71=_0x4e8d1d;return this[_0x448d71(0x155)][_0x448d71(0x195)](this[_0x448d71(0x191)],this[_0x448d71(0x152)])??null;}['getResult'](){var _0x5f5100=_0x4e8d1d;return this[_0x5f5100(0x182)]['getResult']({'unitId':this[_0x5f5100(0x191)],'rangeId':this[_0x5f5100(0x152)]})??null;}[_0x4e8d1d(0x15d)](){var _0x495312=_0x4e8d1d;let _0xd4cba5=this['getRange'](),_0x435634=this[_0x495312(0x17c)](),_0x340c9a=this['getResult']();return!_0xd4cba5||!_0x435634||!_0x340c9a?null:{..._0xd4cba5,'config':_0x435634,'formula':_0x435634[_0x495312(0x185)],'result':_0x340c9a,'type':_0x495312(0x185)};}[_0x4e8d1d(0x14d)](_0xeced81){var _0x5e87e6=_0x4e8d1d;return this['_commandService'][_0x5e87e6(0x16c)](_0x3c604f['id'],{'externalReferences':_0xeced81[_0x5e87e6(0x194)],'formula':_0xeced81[_0x5e87e6(0x185)],'numberFormat':_0xeced81[_0x5e87e6(0x189)],'rangeId':this[_0x5e87e6(0x152)],'unitId':this[_0x5e87e6(0x191)]});}[_0x4e8d1d(0x148)](_0x22f63d){var _0x337a27=_0x4e8d1d;return this[_0x337a27(0x160)][_0x337a27(0x16c)](_0x492dd2['id'],{'numberFormat':_0x22f63d,'rangeId':this[_0x337a27(0x152)],'unitId':this[_0x337a27(0x191)]});}[_0x4e8d1d(0x176)](){var _0x1d4cdc=_0x4e8d1d;return this[_0x1d4cdc(0x160)][_0x1d4cdc(0x16c)](_0x37e065['id'],{'rangeId':this[_0x1d4cdc(0x152)],'unitId':this[_0x1d4cdc(0x191)]});}[_0x4e8d1d(0x156)](_0x1fe20a){var _0x2f9b08=_0x4e8d1d;return this[_0x2f9b08(0x160)][_0x2f9b08(0x16c)](_0x2c2385['id'],{'rangeId':this[_0x2f9b08(0x152)],'text':_0x1fe20a,'unitId':this[_0x2f9b08(0x191)]});}[_0x4e8d1d(0x151)](){var _0x828606=_0x4e8d1d;return this[_0x828606(0x160)]['syncExecuteCommand'](_0x3c527c['id'],{'rangeId':this['_rangeId'],'unitId':this[_0x828606(0x191)]});}[_0x4e8d1d(0x177)](){var _0x1c7838=_0x4e8d1d,_0x9740a8;let _0x4bee25=this['_univerInstanceService']['getUnit'](this[_0x1c7838(0x191)],_0x46a90a[_0x1c7838(0x167)]);return _0x4bee25==null||(_0x9740a8=_0x4bee25[_0x1c7838(0x18d)]()[_0x1c7838(0x171)])==null||(_0x9740a8=_0x9740a8[_0x1c7838(0x146)])==null?void 0x0:_0x9740a8[_0x1c7838(0x161)](_0x2c4f82=>_0x2c4f82[_0x1c7838(0x16b)]===this[_0x1c7838(0x152)]&&_0x19981d(_0x2c4f82));}};function _0xf76d(_0x2e5ab8,_0x5f5a47){_0x2e5ab8=_0x2e5ab8-0x144;var _0x363350=_0x3633();var _0xf76d62=_0x363350[_0x2e5ab8];return _0xf76d62;}b=y([v(0x2,_0x549850),v(0x3,_0x23a08b(_0x5e08ca)),v(0x4,_0x23a08b(_0x421237)),v(0x5,_0x207dd1)],b);function x(_0x29dbc1){'@babel/helpers - typeof';var _0x18fceb=_0x4e8d1d;return x=typeof Symbol==_0x18fceb(0x16a)&&typeof Symbol[_0x18fceb(0x150)]==_0x18fceb(0x157)?function(_0x191f9b){return typeof _0x191f9b;}:function(_0x197c1f){var _0x1a8856=_0x18fceb;return _0x197c1f&&typeof Symbol==_0x1a8856(0x16a)&&_0x197c1f['constructor']===Symbol&&_0x197c1f!==Symbol[_0x1a8856(0x14a)]?_0x1a8856(0x157):typeof _0x197c1f;},x(_0x29dbc1);}function S(_0x473d74,_0x4fcc0d){var _0x529981=_0x4e8d1d;if(x(_0x473d74)!='object'||!_0x473d74)return _0x473d74;var _0x24c97b;if(typeof Symbol<'u'&&(_0x24c97b=_0x473d74[Symbol[_0x529981(0x17a)]])!==void 0x0){var _0x3392c6=_0x24c97b[_0x529981(0x184)](_0x473d74,_0x4fcc0d||_0x529981(0x18b));if(x(_0x3392c6)!=_0x529981(0x168))return _0x3392c6;throw TypeError(_0x529981(0x174));}return(_0x4fcc0d==='string'?String:Number)(_0x473d74);}function C(_0x1f4030){var _0x5eb068=_0x4e8d1d,_0x507509=S(_0x1f4030,_0x5eb068(0x15a));return x(_0x507509)==_0x5eb068(0x157)?_0x507509:_0x507509+'';}function w(_0x227b8f,_0x594c15,_0x3fc39e){return(_0x594c15=C(_0x594c15))in _0x227b8f?Object['defineProperty'](_0x227b8f,_0x594c15,{'value':_0x3fc39e,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x227b8f[_0x594c15]=_0x3fc39e,_0x227b8f;}var T=class extends _0x1ac644{constructor(..._0x516a2b){var _0x5df59d=_0x4e8d1d;super(..._0x516a2b),w(this,_0x5df59d(0x15e),void 0x0),w(this,_0x5df59d(0x145),void 0x0),w(this,_0x5df59d(0x16e),void 0x0),w(this,'_docsFormulaResourceLoaderService',void 0x0);}[_0x4e8d1d(0x149)](_0x2a9ab1){var _0x5cc953=_0x4e8d1d;this[_0x5cc953(0x15e)]=_0x2a9ab1['get'](_0x549850),this['_docsFormulaDisplayTextService']=_0x2a9ab1['get'](_0x43e9b5),this[_0x5cc953(0x16e)]=_0x2a9ab1[_0x5cc953(0x153)](_0x5e08ca),this[_0x5cc953(0x18c)]=_0x2a9ab1[_0x5cc953(0x153)](_0x312cab);}[_0x4e8d1d(0x14f)](){var _0xfc6774=_0x4e8d1d;return this[_0xfc6774(0x14e)]()[_0xfc6774(0x14c)](_0x208ef7=>this['_createFormula'](_0x208ef7[_0xfc6774(0x16b)]));}[_0x4e8d1d(0x195)](_0x13b033){var _0x57ce81=_0x4e8d1d;return this['_getCompleteRanges']()[_0x57ce81(0x17d)](_0x31bb84=>_0x31bb84[_0x57ce81(0x16b)]===_0x13b033)?this[_0x57ce81(0x14b)](_0x13b033):null;}[_0x4e8d1d(0x18a)](_0x3bbd59){var _0x60af2c=_0x4e8d1d;let _0x396893=this['_getCompleteRanges']()[_0x60af2c(0x161)](_0x196783=>_0x196783[_0x60af2c(0x15c)]<=_0x3bbd59&&_0x3bbd59<=_0x196783[_0x60af2c(0x192)]);return _0x396893?this[_0x60af2c(0x14b)](_0x396893[_0x60af2c(0x16b)]):null;}[_0x4e8d1d(0x17e)](){var _0x565f7a=_0x4e8d1d;let _0x207bca=this['_docsFormulaResourceLoaderService'][_0x565f7a(0x196)](this['id']);if(!_0x207bca)throw Error(_0x565f7a(0x193)+this['id']+'\x20could\x20not\x20be\x20serialized.');return this[_0x565f7a(0x145)][_0x565f7a(0x170)](_0x207bca);}[_0x4e8d1d(0x18f)](_0x391539){var _0x45fdfa=_0x4e8d1d;return this[_0x45fdfa(0x163)]({'externalReferences':_0x391539[_0x45fdfa(0x194)],'formula':_0x391539['formula'],'numberFormat':_0x391539[_0x45fdfa(0x189)],'target':{'type':_0x45fdfa(0x178),'startOffset':_0x391539[_0x45fdfa(0x158)],'endOffset':_0x391539[_0x45fdfa(0x190)]},'unitId':this[_0x45fdfa(0x181)]()});}[_0x4e8d1d(0x163)](_0x2e8b83){var _0x974750=_0x4e8d1d;let _0x5c0316=this[_0x974750(0x15e)]['syncExecuteCommand'](_0x3c045b['id'],_0x2e8b83);return _0x5c0316?this['_createFormula'](_0x5c0316[_0x974750(0x16b)]):null;}[_0x4e8d1d(0x14e)](){var _0x273fd4=_0x4e8d1d,_0xfad6d2;let _0x188bcf=this[_0x273fd4(0x16e)][_0x273fd4(0x14f)](this[_0x273fd4(0x181)]());return((_0xfad6d2=this[_0x273fd4(0x15f)]('')['customRanges'])==null?void 0x0:_0xfad6d2['filter'](_0x526892=>_0x19981d(_0x526892)&&_0x188bcf[_0x526892[_0x273fd4(0x16b)]]!=null))??[];}[_0x4e8d1d(0x14b)](_0x289242){var _0x4ba4ae=_0x4e8d1d;return this[_0x4ba4ae(0x175)]['createInstance'](b,this[_0x4ba4ae(0x181)](),_0x289242);}};_0x1ac644[_0x4e8d1d(0x179)](T);var E=class extends _0x44e6e4{constructor(..._0x5716df){var _0xa2aa34=_0x4e8d1d;super(..._0x5716df),w(this,_0xa2aa34(0x15e),void 0x0);}['_initialize'](_0x1d697f){var _0xcc815b=_0x4e8d1d;this['_docsFormulaCommandService']=_0x1d697f[_0xcc815b(0x153)](_0x549850);}[_0x4e8d1d(0x18f)](_0x2a4f4a,_0x3710d8,_0x1512ff={}){var _0x345d43=_0x4e8d1d;return this[_0x345d43(0x163)](_0x2a4f4a,_0x3710d8,_0x1512ff);}[_0x4e8d1d(0x17b)](_0x4c9c07,_0x26aa01={}){var _0x3e7d9e=_0x4e8d1d;return this[_0x3e7d9e(0x163)](_0x3e7d9e(0x166),_0x4c9c07,_0x26aa01);}[_0x4e8d1d(0x163)](_0x3159dc,_0x4062a2,_0x427c34){var _0x2a3313=_0x4e8d1d;if(this[_0x2a3313(0x16f)]())return null;let _0x3581df={'externalReferences':_0x427c34[_0x2a3313(0x194)],'formula':_0x4062a2,'numberFormat':_0x427c34[_0x2a3313(0x189)],'target':{'type':_0x2a3313(0x188),'paragraphId':this['getId'](),'position':_0x3159dc},'unitId':this[_0x2a3313(0x18e)][_0x2a3313(0x181)]()},_0x8a3f0c=this[_0x2a3313(0x15e)][_0x2a3313(0x16c)](_0x3c045b['id'],_0x3581df);return _0x8a3f0c?this[_0x2a3313(0x175)]['createInstance'](b,this[_0x2a3313(0x18e)][_0x2a3313(0x181)](),_0x8a3f0c[_0x2a3313(0x16b)]):null;}};_0x44e6e4[_0x4e8d1d(0x179)](E);var D=class extends _0x4618e9{constructor(..._0x2797e2){var _0x5c3edf=_0x4e8d1d;super(..._0x2797e2),w(this,_0x5c3edf(0x15e),void 0x0);}[_0x4e8d1d(0x149)](_0x45312a){var _0x5a4e91=_0x4e8d1d;this[_0x5a4e91(0x15e)]=_0x45312a[_0x5a4e91(0x153)](_0x549850);}[_0x4e8d1d(0x15b)](_0x1e5aab,_0x3c65c2={}){var _0x46eed9=_0x4e8d1d;let {endOffset:_0x574388,segmentId:_0x1f9318,startOffset:_0x116856}=this[_0x46eed9(0x154)]();return _0x1f9318?null:this['_insert'](_0x116856,_0x574388,_0x1e5aab,_0x3c65c2);}['_insert'](_0x21d069,_0x5141dd,_0x4604ab,_0x12c9f8){var _0x5626fe=_0x4e8d1d;let _0x3f32b6={'externalReferences':_0x12c9f8[_0x5626fe(0x194)],'formula':_0x4604ab,'numberFormat':_0x12c9f8[_0x5626fe(0x189)],'target':{'type':_0x5626fe(0x178),'startOffset':_0x21d069,'endOffset':_0x5141dd},'unitId':this[_0x5626fe(0x18e)][_0x5626fe(0x181)]()},_0x294159=this['_docsFormulaCommandService'][_0x5626fe(0x16c)](_0x3c045b['id'],_0x3f32b6);return _0x294159?this[_0x5626fe(0x175)][_0x5626fe(0x165)](b,this[_0x5626fe(0x18e)][_0x5626fe(0x181)](),_0x294159['rangeId']):null;}};_0x4618e9[_0x4e8d1d(0x179)](D);export{b as FDocumentFormula};