@univerjs-pro/docs-formula 1.0.0-insiders.20260813-7c9aa50 → 1.0.0-rc.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/cjs/facade.js CHANGED
@@ -1 +1 @@
1
- const _0x580878=_0x27bb;(function(_0x41e9dd,_0x49489a){const _0x14473d=_0x27bb,_0x188965=_0x41e9dd();while(!![]){try{const _0x2304a1=parseInt(_0x14473d(0x1d3))/0x1*(parseInt(_0x14473d(0x1e2))/0x2)+parseInt(_0x14473d(0x1d5))/0x3*(parseInt(_0x14473d(0x1bc))/0x4)+-parseInt(_0x14473d(0x1e3))/0x5*(parseInt(_0x14473d(0x1d6))/0x6)+-parseInt(_0x14473d(0x1c6))/0x7+parseInt(_0x14473d(0x1b9))/0x8*(parseInt(_0x14473d(0x1a0))/0x9)+parseInt(_0x14473d(0x1d1))/0xa+-parseInt(_0x14473d(0x1d2))/0xb;if(_0x2304a1===_0x49489a)break;else _0x188965['push'](_0x188965['shift']());}catch(_0x53af1d){_0x188965['push'](_0x188965['shift']());}}}(_0x4f3c,0xd5225),Object[_0x580878(0x1df)](exports,Symbol['toStringTag'],{'value':'Module'}));let e=require('@univerjs-pro/docs-formula'),t=require('@univerjs/core'),n=require('@univerjs/docs/facade');function r(_0xa5184a,_0x1912b7){return function(_0x5736c7,_0x51d45c){_0x1912b7(_0x5736c7,_0x51d45c,_0xa5184a);};}function i(_0x245fa8,_0xda25e,_0x5416ef,_0x486ca9){const _0x51103f=_0x580878;var _0x32f651=arguments['length'],_0x1ba341=_0x32f651<0x3?_0xda25e:_0x486ca9===null?_0x486ca9=Object[_0x51103f(0x1cb)](_0xda25e,_0x5416ef):_0x486ca9,_0xf39564;if(typeof Reflect==_0x51103f(0x1ac)&&typeof Reflect[_0x51103f(0x1d4)]==_0x51103f(0x1cc))_0x1ba341=Reflect[_0x51103f(0x1d4)](_0x245fa8,_0xda25e,_0x5416ef,_0x486ca9);else{for(var _0x4f29d4=_0x245fa8[_0x51103f(0x1c1)]-0x1;_0x4f29d4>=0x0;_0x4f29d4--)(_0xf39564=_0x245fa8[_0x4f29d4])&&(_0x1ba341=(_0x32f651<0x3?_0xf39564(_0x1ba341):_0x32f651>0x3?_0xf39564(_0xda25e,_0x5416ef,_0x1ba341):_0xf39564(_0xda25e,_0x5416ef))||_0x1ba341);}return _0x32f651>0x3&&_0x1ba341&&Object[_0x51103f(0x1df)](_0xda25e,_0x5416ef,_0x1ba341),_0x1ba341;}function _0x4f3c(){const _0x4a0ca3=['FDocumentTextRange','remove','_rangeId','FDocument','ConvertDocFormulaToTextCommand','symbol','replaceWithFormula','_getCustomRange','insertFormula','ICommandService','ReplaceDocFormulaWithTextCommand','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','_unitId','_initialize','degradeDocumentData','_docsFormulaModel','Inject','string','getFormulas','getUnit','81AhySnv','some','externalReferences','_getCompleteRanges','range','_model','default','getBody','replaceWithText','get','find','RemoveDocFormulaCommand','object','getSegmentId','getFormula','getResult','UNIVER_DOC','_injector','appendFormula','endOffset','startIndex','endIndex','Document\x20','extend','saveFormulaDisplayTextSnapshot','1428056QXkfJp','_docsFormulaDisplayTextService','prototype','22440LPmmbh','setNumberFormat','update','rangeId','getSnapshot','length','customRanges','FDocumentParagraph','getId','end','219863whFHZq','_document','createInstance','numberFormat','formula','getOwnPropertyDescriptor','function','_docsFormulaResourceLoaderService','InsertDocFormulaCommand','getFormulaAt','_commandService','6066270NVmsqs','21958728JDAJrU','212pFXKsJ','decorate','675IsogQK','3938910rpwZHK','constructor','DocFormulaModel','\x20could\x20not\x20be\x20serialized.','IUniverInstanceService','FDocumentFormula','SetDocFormulaNumberFormatCommand','_insert','_univerInstanceService','defineProperty','getRange','_service','6964fOWDGe','10fdVItx','paragraph','syncExecuteCommand','call','convertToText','isDocFormulaRange','_docsFormulaCommandService','_createFormula'];_0x4f3c=function(){return _0x4a0ca3;};return _0x4f3c();}let a=class{constructor(_0x3123f2,_0x5754e6,_0x4ffdb2,_0x209372,_0x5d1ff,_0xef1970){const _0x17d4a5=_0x580878;this['_unitId']=_0x3123f2,this['_rangeId']=_0x5754e6,this[_0x17d4a5(0x1d0)]=_0x4ffdb2,this[_0x17d4a5(0x1a5)]=_0x209372,this[_0x17d4a5(0x1e1)]=_0x5d1ff,this[_0x17d4a5(0x1de)]=_0xef1970;}['getId'](){const _0x44a0b8=_0x580878;return this[_0x44a0b8(0x18e)];}[_0x580878(0x1e0)](){const _0x586813=_0x580878;let _0x52e2da=this[_0x586813(0x193)]();return _0x52e2da?{'endOffset':_0x52e2da['endIndex']+0x1,'rangeId':_0x52e2da[_0x586813(0x1bf)],'startOffset':_0x52e2da[_0x586813(0x1b4)]}:null;}[_0x580878(0x1ae)](){const _0x9331f=_0x580878;var _0x17b9f0;return((_0x17b9f0=this['_model']['getFormula'](this['_unitId'],this[_0x9331f(0x18e)]))==null?void 0x0:_0x17b9f0['formula'])??'';}['getConfig'](){const _0x156ba3=_0x580878;return this[_0x156ba3(0x1a5)][_0x156ba3(0x1ae)](this['_unitId'],this[_0x156ba3(0x18e)])??null;}['getResult'](){const _0x1fd5bb=_0x580878;return this[_0x1fd5bb(0x1e1)][_0x1fd5bb(0x1af)]({'unitId':this[_0x1fd5bb(0x198)],'rangeId':this['_rangeId']})??null;}['describe'](){const _0x1dfaad=_0x580878;let _0x283182=this['getRange'](),_0x386092=this['getConfig'](),_0x5bcec1=this[_0x1dfaad(0x1af)]();return!_0x283182||!_0x386092||!_0x5bcec1?null:{..._0x283182,'config':_0x386092,'formula':_0x386092[_0x1dfaad(0x1ca)],'result':_0x5bcec1,'type':_0x1dfaad(0x1ca)};}[_0x580878(0x1be)](_0x2337a2){const _0x122a17=_0x580878;return this[_0x122a17(0x1d0)]['syncExecuteCommand'](e['UpdateDocFormulaCommand']['id'],{'externalReferences':_0x2337a2[_0x122a17(0x1a2)],'formula':_0x2337a2[_0x122a17(0x1ca)],'numberFormat':_0x2337a2[_0x122a17(0x1c9)],'rangeId':this[_0x122a17(0x18e)],'unitId':this[_0x122a17(0x198)]});}[_0x580878(0x1bd)](_0x347f27){const _0x28470b=_0x580878;return this[_0x28470b(0x1d0)]['syncExecuteCommand'](e[_0x28470b(0x1dc)]['id'],{'numberFormat':_0x347f27,'rangeId':this['_rangeId'],'unitId':this[_0x28470b(0x198)]});}[_0x580878(0x18d)](){const _0x23331d=_0x580878;return this[_0x23331d(0x1d0)]['syncExecuteCommand'](e[_0x23331d(0x1ab)]['id'],{'rangeId':this['_rangeId'],'unitId':this['_unitId']});}[_0x580878(0x1a8)](_0x37aef3){const _0x1a3914=_0x580878;return this['_commandService']['syncExecuteCommand'](e[_0x1a3914(0x196)]['id'],{'rangeId':this[_0x1a3914(0x18e)],'text':_0x37aef3,'unitId':this[_0x1a3914(0x198)]});}[_0x580878(0x188)](){const _0x3460c5=_0x580878;return this[_0x3460c5(0x1d0)][_0x3460c5(0x1e5)](e[_0x3460c5(0x190)]['id'],{'rangeId':this['_rangeId'],'unitId':this[_0x3460c5(0x198)]});}['_getCustomRange'](){const _0x56b6f2=_0x580878;var _0x343da1;let _0x2e205d=this[_0x56b6f2(0x1de)][_0x56b6f2(0x19f)](this['_unitId'],t['UniverInstanceType'][_0x56b6f2(0x1b0)]);return _0x2e205d==null||(_0x343da1=_0x2e205d[_0x56b6f2(0x1c0)]()['body'])==null||(_0x343da1=_0x343da1[_0x56b6f2(0x1c2)])==null?void 0x0:_0x343da1[_0x56b6f2(0x1aa)](_0x25b94c=>_0x25b94c['rangeId']===this[_0x56b6f2(0x18e)]&&(0x0,e[_0x56b6f2(0x189)])(_0x25b94c));}};a=i([r(0x2,t[_0x580878(0x195)]),r(0x3,(0x0,t['Inject'])(e[_0x580878(0x1d8)])),r(0x4,(0x0,t[_0x580878(0x19c)])(e['DocFormulaService'])),r(0x5,t[_0x580878(0x1da)])],a);function o(_0x55470a){'@babel/helpers - typeof';const _0x2a7e89=_0x580878;return o=typeof Symbol==_0x2a7e89(0x1cc)&&typeof Symbol['iterator']==_0x2a7e89(0x191)?function(_0x2e865b){return typeof _0x2e865b;}:function(_0xdb4a9a){const _0x3ed489=_0x2a7e89;return _0xdb4a9a&&typeof Symbol==_0x3ed489(0x1cc)&&_0xdb4a9a[_0x3ed489(0x1d7)]===Symbol&&_0xdb4a9a!==Symbol[_0x3ed489(0x1bb)]?_0x3ed489(0x191):typeof _0xdb4a9a;},o(_0x55470a);}function _0x27bb(_0x23a910,_0x436392){_0x23a910=_0x23a910-0x187;const _0x4f3c91=_0x4f3c();let _0x27bb61=_0x4f3c91[_0x23a910];return _0x27bb61;}function s(_0x19ed1b,_0x5433a3){const _0x59dec4=_0x580878;if(o(_0x19ed1b)!='object'||!_0x19ed1b)return _0x19ed1b;var _0x9c7f7a=_0x19ed1b[Symbol['toPrimitive']];if(_0x9c7f7a!==void 0x0){var _0x1f9db7=_0x9c7f7a[_0x59dec4(0x187)](_0x19ed1b,_0x5433a3||_0x59dec4(0x1a6));if(o(_0x1f9db7)!=_0x59dec4(0x1ac))return _0x1f9db7;throw TypeError(_0x59dec4(0x197));}return(_0x5433a3==='string'?String:Number)(_0x19ed1b);}function c(_0x5bc4f1){const _0x3470e2=_0x580878;var _0xefda57=s(_0x5bc4f1,_0x3470e2(0x19d));return o(_0xefda57)=='symbol'?_0xefda57:_0xefda57+'';}function l(_0x16f624,_0xcd8377,_0x25d3df){const _0x4df3bc=_0x580878;return(_0xcd8377=c(_0xcd8377))in _0x16f624?Object[_0x4df3bc(0x1df)](_0x16f624,_0xcd8377,{'value':_0x25d3df,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x16f624[_0xcd8377]=_0x25d3df,_0x16f624;}var u=class extends n[_0x580878(0x18f)]{constructor(..._0x35528b){const _0xc74c76=_0x580878;super(..._0x35528b),l(this,_0xc74c76(0x18a),void 0x0),l(this,_0xc74c76(0x1ba),void 0x0),l(this,_0xc74c76(0x19b),void 0x0),l(this,_0xc74c76(0x1cd),void 0x0);}[_0x580878(0x199)](_0x3d3bf2){const _0x1bbf37=_0x580878;this[_0x1bbf37(0x18a)]=_0x3d3bf2[_0x1bbf37(0x1a9)](t[_0x1bbf37(0x195)]),this[_0x1bbf37(0x1ba)]=_0x3d3bf2[_0x1bbf37(0x1a9)](e['DocFormulaDisplayTextService']),this[_0x1bbf37(0x19b)]=_0x3d3bf2[_0x1bbf37(0x1a9)](e[_0x1bbf37(0x1d8)]),this[_0x1bbf37(0x1cd)]=_0x3d3bf2[_0x1bbf37(0x1a9)](t['IResourceLoaderService']);}[_0x580878(0x19e)](){const _0x5f41fc=_0x580878;return this[_0x5f41fc(0x1a3)]()['map'](_0x39ace4=>this['_createFormula'](_0x39ace4[_0x5f41fc(0x1bf)]));}[_0x580878(0x1ae)](_0x12cd51){const _0x38fa34=_0x580878;return this[_0x38fa34(0x1a3)]()[_0x38fa34(0x1a1)](_0x598118=>_0x598118[_0x38fa34(0x1bf)]===_0x12cd51)?this['_createFormula'](_0x12cd51):null;}[_0x580878(0x1cf)](_0x155559){const _0x1465fb=_0x580878;let _0x322b41=this[_0x1465fb(0x1a3)]()[_0x1465fb(0x1aa)](_0x3a353d=>_0x3a353d['startIndex']<=_0x155559&&_0x155559<=_0x3a353d[_0x1465fb(0x1b5)]);return _0x322b41?this[_0x1465fb(0x18b)](_0x322b41[_0x1465fb(0x1bf)]):null;}[_0x580878(0x1b8)](){const _0x93d678=_0x580878;let _0x4dbf8d=this['_docsFormulaResourceLoaderService']['saveUnit'](this['id']);if(!_0x4dbf8d)throw Error(_0x93d678(0x1b6)+this['id']+_0x93d678(0x1d9));return this[_0x93d678(0x1ba)][_0x93d678(0x19a)](_0x4dbf8d);}[_0x580878(0x194)](_0xd93a22){const _0x7f5dee=_0x580878;return this['_insert']({'externalReferences':_0xd93a22[_0x7f5dee(0x1a2)],'formula':_0xd93a22['formula'],'numberFormat':_0xd93a22[_0x7f5dee(0x1c9)],'target':{'type':_0x7f5dee(0x1a4),'startOffset':_0xd93a22['startOffset'],'endOffset':_0xd93a22[_0x7f5dee(0x1b3)]},'unitId':this[_0x7f5dee(0x1c4)]()});}[_0x580878(0x1dd)](_0x324837){const _0x3611f5=_0x580878;let _0x503db5=this[_0x3611f5(0x18a)][_0x3611f5(0x1e5)](e[_0x3611f5(0x1ce)]['id'],_0x324837);return _0x503db5?this[_0x3611f5(0x18b)](_0x503db5[_0x3611f5(0x1bf)]):null;}[_0x580878(0x1a3)](){const _0xf23379=_0x580878;var _0x26c858;let _0x54ce7a=this[_0xf23379(0x19b)][_0xf23379(0x19e)](this[_0xf23379(0x1c4)]());return((_0x26c858=this[_0xf23379(0x1a7)]('')[_0xf23379(0x1c2)])==null?void 0x0:_0x26c858['filter'](_0x2696b7=>(0x0,e[_0xf23379(0x189)])(_0x2696b7)&&_0x54ce7a[_0x2696b7[_0xf23379(0x1bf)]]!=null))??[];}[_0x580878(0x18b)](_0x561f49){const _0x31a10f=_0x580878;return this[_0x31a10f(0x1b1)]['createInstance'](a,this['getId'](),_0x561f49);}};n[_0x580878(0x18f)]['extend'](u);var d=class extends n[_0x580878(0x1c3)]{constructor(..._0x290a8c){const _0x252d84=_0x580878;super(..._0x290a8c),l(this,_0x252d84(0x18a),void 0x0);}[_0x580878(0x199)](_0x287dca){const _0x4e6323=_0x580878;this[_0x4e6323(0x18a)]=_0x287dca['get'](t[_0x4e6323(0x195)]);}['insertFormula'](_0x3f1c33,_0x49ee4a,_0x1cba0a={}){return this['_insert'](_0x3f1c33,_0x49ee4a,_0x1cba0a);}[_0x580878(0x1b2)](_0x53f899,_0x4cef49={}){const _0x21006b=_0x580878;return this['_insert'](_0x21006b(0x1c5),_0x53f899,_0x4cef49);}[_0x580878(0x1dd)](_0x35930c,_0x4280e8,_0x50636d){const _0x1b59fa=_0x580878;if(this[_0x1b59fa(0x1ad)]())return null;let _0x21d2de={'externalReferences':_0x50636d[_0x1b59fa(0x1a2)],'formula':_0x4280e8,'numberFormat':_0x50636d[_0x1b59fa(0x1c9)],'target':{'type':_0x1b59fa(0x1e4),'paragraphId':this['getId'](),'position':_0x35930c},'unitId':this[_0x1b59fa(0x1c7)][_0x1b59fa(0x1c4)]()},_0x306b5f=this[_0x1b59fa(0x18a)][_0x1b59fa(0x1e5)](e[_0x1b59fa(0x1ce)]['id'],_0x21d2de);return _0x306b5f?this[_0x1b59fa(0x1b1)][_0x1b59fa(0x1c8)](a,this[_0x1b59fa(0x1c7)]['getId'](),_0x306b5f['rangeId']):null;}};n[_0x580878(0x1c3)][_0x580878(0x1b7)](d);var f=class extends n['FDocumentTextRange']{constructor(..._0x4b9269){const _0x2d785a=_0x580878;super(..._0x4b9269),l(this,_0x2d785a(0x18a),void 0x0);}[_0x580878(0x199)](_0x21e783){const _0x388d43=_0x580878;this['_docsFormulaCommandService']=_0x21e783[_0x388d43(0x1a9)](t['ICommandService']);}[_0x580878(0x192)](_0x5caa76,_0x5ed421={}){const _0x15ecf0=_0x580878;let {endOffset:_0x479298,segmentId:_0x24a235,startOffset:_0x4b0284}=this[_0x15ecf0(0x1e0)]();return _0x24a235?null:this[_0x15ecf0(0x1dd)](_0x4b0284,_0x479298,_0x5caa76,_0x5ed421);}['_insert'](_0x10f1d6,_0x56174b,_0x5dec5a,_0xaaa301){const _0x4f6bea=_0x580878;let _0x2f4254={'externalReferences':_0xaaa301[_0x4f6bea(0x1a2)],'formula':_0x5dec5a,'numberFormat':_0xaaa301[_0x4f6bea(0x1c9)],'target':{'type':_0x4f6bea(0x1a4),'startOffset':_0x10f1d6,'endOffset':_0x56174b},'unitId':this[_0x4f6bea(0x1c7)][_0x4f6bea(0x1c4)]()},_0x3073c0=this['_docsFormulaCommandService'][_0x4f6bea(0x1e5)](e[_0x4f6bea(0x1ce)]['id'],_0x2f4254);return _0x3073c0?this[_0x4f6bea(0x1b1)][_0x4f6bea(0x1c8)](a,this[_0x4f6bea(0x1c7)][_0x4f6bea(0x1c4)](),_0x3073c0[_0x4f6bea(0x1bf)]):null;}};n[_0x580878(0x18c)][_0x580878(0x1b7)](f),Object['defineProperty'](exports,_0x580878(0x1db),{'enumerable':!0x0,'get':function(){return a;}});
1
+ const _0x317af2=_0x1826;(function(_0x42956a,_0x58524c){const _0x551220=_0x1826,_0x491dfe=_0x42956a();while(!![]){try{const _0x18bdea=parseInt(_0x551220(0xd8))/0x1+parseInt(_0x551220(0xdb))/0x2+parseInt(_0x551220(0xa6))/0x3+parseInt(_0x551220(0xf6))/0x4*(parseInt(_0x551220(0xc6))/0x5)+-parseInt(_0x551220(0xc2))/0x6+parseInt(_0x551220(0xf8))/0x7*(-parseInt(_0x551220(0xf9))/0x8)+-parseInt(_0x551220(0xdf))/0x9;if(_0x18bdea===_0x58524c)break;else _0x491dfe['push'](_0x491dfe['shift']());}catch(_0x36638b){_0x491dfe['push'](_0x491dfe['shift']());}}}(_0x492e,0xdc08c),Object[_0x317af2(0xe4)](exports,Symbol['toStringTag'],{'value':'Module'}));let e=require('@univerjs-pro/docs-formula'),t=require('@univerjs/core'),n=require('@univerjs/docs/facade');function r(_0x4b8f79,_0x5db0f5){return function(_0x4d230b,_0x43131b){_0x5db0f5(_0x4d230b,_0x43131b,_0x4b8f79);};}function i(_0x3fafdc,_0x35c108,_0x470be8,_0x1db434){const _0x3130df=_0x317af2;var _0x4a6f61=arguments[_0x3130df(0xe6)],_0x2f2990=_0x4a6f61<0x3?_0x35c108:_0x1db434===null?_0x1db434=Object['getOwnPropertyDescriptor'](_0x35c108,_0x470be8):_0x1db434,_0x1a7deb;if(typeof Reflect==_0x3130df(0xa9)&&typeof Reflect['decorate']==_0x3130df(0xdc))_0x2f2990=Reflect[_0x3130df(0xe3)](_0x3fafdc,_0x35c108,_0x470be8,_0x1db434);else{for(var _0x154427=_0x3fafdc[_0x3130df(0xe6)]-0x1;_0x154427>=0x0;_0x154427--)(_0x1a7deb=_0x3fafdc[_0x154427])&&(_0x2f2990=(_0x4a6f61<0x3?_0x1a7deb(_0x2f2990):_0x4a6f61>0x3?_0x1a7deb(_0x35c108,_0x470be8,_0x2f2990):_0x1a7deb(_0x35c108,_0x470be8))||_0x2f2990);}return _0x4a6f61>0x3&&_0x2f2990&&Object['defineProperty'](_0x35c108,_0x470be8,_0x2f2990),_0x2f2990;}let a=class{constructor(_0x255c1e,_0x1f4748,_0x16b52a,_0x57c41d,_0x29219d,_0x331ba7){const _0x30b9d9=_0x317af2;this['_unitId']=_0x255c1e,this[_0x30b9d9(0xa3)]=_0x1f4748,this[_0x30b9d9(0xbd)]=_0x16b52a,this[_0x30b9d9(0xb1)]=_0x57c41d,this[_0x30b9d9(0xb3)]=_0x29219d,this[_0x30b9d9(0xab)]=_0x331ba7;}['getId'](){const _0x2be535=_0x317af2;return this[_0x2be535(0xa3)];}[_0x317af2(0xaf)](){const _0x3985b6=_0x317af2;let _0x12456c=this['_getCustomRange']();return _0x12456c?{'endOffset':_0x12456c[_0x3985b6(0xcb)]+0x1,'rangeId':_0x12456c[_0x3985b6(0xa4)],'startOffset':_0x12456c[_0x3985b6(0xf3)]}:null;}[_0x317af2(0xd4)](){const _0x2b852f=_0x317af2;var _0x12b51f;return((_0x12b51f=this[_0x2b852f(0xb1)][_0x2b852f(0xd4)](this[_0x2b852f(0xfc)],this[_0x2b852f(0xa3)]))==null?void 0x0:_0x12b51f[_0x2b852f(0xa5)])??'';}[_0x317af2(0xe0)](){const _0x5da9a2=_0x317af2;return this['_model'][_0x5da9a2(0xd4)](this[_0x5da9a2(0xfc)],this[_0x5da9a2(0xa3)])??null;}[_0x317af2(0xec)](){const _0x7e1100=_0x317af2;return this[_0x7e1100(0xb3)][_0x7e1100(0xec)]({'unitId':this['_unitId'],'rangeId':this['_rangeId']})??null;}[_0x317af2(0xeb)](){const _0x49ec29=_0x317af2;let _0x4f4eef=this['getRange'](),_0x11ddd4=this[_0x49ec29(0xe0)](),_0x1a20bf=this[_0x49ec29(0xec)]();return!_0x4f4eef||!_0x11ddd4||!_0x1a20bf?null:{..._0x4f4eef,'config':_0x11ddd4,'formula':_0x11ddd4[_0x49ec29(0xa5)],'result':_0x1a20bf,'type':_0x49ec29(0xa5)};}['update'](_0x447a9d){const _0x23adc3=_0x317af2;return this[_0x23adc3(0xbd)][_0x23adc3(0xca)](e['UpdateDocFormulaCommand']['id'],{'externalReferences':_0x447a9d[_0x23adc3(0xfa)],'formula':_0x447a9d['formula'],'numberFormat':_0x447a9d[_0x23adc3(0xf1)],'rangeId':this['_rangeId'],'unitId':this[_0x23adc3(0xfc)]});}['setNumberFormat'](_0x35517e){const _0xff5ec4=_0x317af2;return this[_0xff5ec4(0xbd)][_0xff5ec4(0xca)](e['SetDocFormulaNumberFormatCommand']['id'],{'numberFormat':_0x35517e,'rangeId':this[_0xff5ec4(0xa3)],'unitId':this[_0xff5ec4(0xfc)]});}[_0x317af2(0xda)](){const _0x20a965=_0x317af2;return this[_0x20a965(0xbd)]['syncExecuteCommand'](e[_0x20a965(0xae)]['id'],{'rangeId':this[_0x20a965(0xa3)],'unitId':this['_unitId']});}[_0x317af2(0xde)](_0x11b735){const _0x57be6c=_0x317af2;return this[_0x57be6c(0xbd)]['syncExecuteCommand'](e['ReplaceDocFormulaWithTextCommand']['id'],{'rangeId':this[_0x57be6c(0xa3)],'text':_0x11b735,'unitId':this[_0x57be6c(0xfc)]});}[_0x317af2(0xd7)](){const _0xb3bde4=_0x317af2;return this['_commandService'][_0xb3bde4(0xca)](e[_0xb3bde4(0xe2)]['id'],{'rangeId':this[_0xb3bde4(0xa3)],'unitId':this['_unitId']});}[_0x317af2(0xd9)](){const _0x5b336e=_0x317af2;var _0x368063;let _0x32686a=this[_0x5b336e(0xab)][_0x5b336e(0xd3)](this[_0x5b336e(0xfc)],t['UniverInstanceType']['UNIVER_DOC']);return _0x32686a==null||(_0x368063=_0x32686a[_0x5b336e(0xcf)]()[_0x5b336e(0xe9)])==null||(_0x368063=_0x368063[_0x5b336e(0xdd)])==null?void 0x0:_0x368063[_0x5b336e(0xe8)](_0x71301e=>_0x71301e[_0x5b336e(0xa4)]===this[_0x5b336e(0xa3)]&&(0x0,e['isDocFormulaRange'])(_0x71301e));}};a=i([r(0x2,t[_0x317af2(0xad)]),r(0x3,(0x0,t[_0x317af2(0xed)])(e[_0x317af2(0xfb)])),r(0x4,(0x0,t['Inject'])(e[_0x317af2(0xc1)])),r(0x5,t[_0x317af2(0xc8)])],a);function o(_0x49edb0){'@babel/helpers - typeof';const _0x4c4502=_0x317af2;return o=typeof Symbol=='function'&&typeof Symbol['iterator']==_0x4c4502(0xa7)?function(_0x2f1822){return typeof _0x2f1822;}:function(_0x56e006){const _0x2fa9dd=_0x4c4502;return _0x56e006&&typeof Symbol==_0x2fa9dd(0xdc)&&_0x56e006[_0x2fa9dd(0xb7)]===Symbol&&_0x56e006!==Symbol['prototype']?_0x2fa9dd(0xa7):typeof _0x56e006;},o(_0x49edb0);}function s(_0x25eb9d,_0x4d7681){const _0x2da1f6=_0x317af2;if(o(_0x25eb9d)!=_0x2da1f6(0xa9)||!_0x25eb9d)return _0x25eb9d;var _0x111d3d=_0x25eb9d[Symbol[_0x2da1f6(0xd1)]];if(_0x111d3d!==void 0x0){var _0x40139b=_0x111d3d[_0x2da1f6(0xe1)](_0x25eb9d,_0x4d7681||_0x2da1f6(0xb6));if(o(_0x40139b)!=_0x2da1f6(0xa9))return _0x40139b;throw TypeError(_0x2da1f6(0xf2));}return(_0x4d7681===_0x2da1f6(0xba)?String:Number)(_0x25eb9d);}function _0x1826(_0x16c9c3,_0x240e9c){_0x16c9c3=_0x16c9c3-0xa3;const _0x492e51=_0x492e();let _0x1826f2=_0x492e51[_0x16c9c3];return _0x1826f2;}function c(_0x4f56bf){const _0x24bd96=_0x317af2;var _0x4af73e=s(_0x4f56bf,_0x24bd96(0xba));return o(_0x4af73e)=='symbol'?_0x4af73e:_0x4af73e+'';}function l(_0x52e72c,_0x2e855b,_0x606c3c){const _0xd354b7=_0x317af2;return(_0x2e855b=c(_0x2e855b))in _0x52e72c?Object[_0xd354b7(0xe4)](_0x52e72c,_0x2e855b,{'value':_0x606c3c,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x52e72c[_0x2e855b]=_0x606c3c,_0x52e72c;}var u=class extends n[_0x317af2(0xe7)]{constructor(..._0x44b610){const _0x4806a1=_0x317af2;super(..._0x44b610),l(this,'_docsFormulaCommandService',void 0x0),l(this,_0x4806a1(0xc7),void 0x0),l(this,'_docsFormulaModel',void 0x0),l(this,'_docsFormulaResourceLoaderService',void 0x0);}[_0x317af2(0xcc)](_0x39d898){const _0x3026aa=_0x317af2;this[_0x3026aa(0xaa)]=_0x39d898['get'](t[_0x3026aa(0xad)]),this[_0x3026aa(0xc7)]=_0x39d898[_0x3026aa(0xcd)](e[_0x3026aa(0xac)]),this[_0x3026aa(0xbc)]=_0x39d898[_0x3026aa(0xcd)](e['DocFormulaModel']),this[_0x3026aa(0xbb)]=_0x39d898['get'](t['IResourceLoaderService']);}[_0x317af2(0xc0)](){const _0x106c7a=_0x317af2;return this[_0x106c7a(0xc4)]()[_0x106c7a(0xd0)](_0x3d754d=>this['_createFormula'](_0x3d754d[_0x106c7a(0xa4)]));}[_0x317af2(0xd4)](_0x14e8d2){const _0x2ded48=_0x317af2;return this[_0x2ded48(0xc4)]()[_0x2ded48(0xf7)](_0x3016e6=>_0x3016e6[_0x2ded48(0xa4)]===_0x14e8d2)?this[_0x2ded48(0xd6)](_0x14e8d2):null;}[_0x317af2(0xd5)](_0x165976){const _0x516fcc=_0x317af2;let _0x142f96=this['_getCompleteRanges']()[_0x516fcc(0xe8)](_0x3a3705=>_0x3a3705[_0x516fcc(0xf3)]<=_0x165976&&_0x165976<=_0x3a3705['endIndex']);return _0x142f96?this[_0x516fcc(0xd6)](_0x142f96[_0x516fcc(0xa4)]):null;}[_0x317af2(0xce)](){const _0x48676e=_0x317af2;let _0x50f392=this['_docsFormulaResourceLoaderService'][_0x48676e(0xc9)](this['id']);if(!_0x50f392)throw Error(_0x48676e(0xea)+this['id']+_0x48676e(0xb4));return this['_docsFormulaDisplayTextService']['degradeDocumentData'](_0x50f392);}['insertFormula'](_0x5f3384){const _0x3be99f=_0x317af2;return this['_insert']({'externalReferences':_0x5f3384[_0x3be99f(0xfa)],'formula':_0x5f3384[_0x3be99f(0xa5)],'numberFormat':_0x5f3384['numberFormat'],'target':{'type':'range','startOffset':_0x5f3384['startOffset'],'endOffset':_0x5f3384[_0x3be99f(0xa8)]},'unitId':this['getId']()});}['_insert'](_0x2af1f4){const _0x5c6ab0=_0x317af2;let _0x506e18=this[_0x5c6ab0(0xaa)][_0x5c6ab0(0xca)](e['InsertDocFormulaCommand']['id'],_0x2af1f4);return _0x506e18?this[_0x5c6ab0(0xd6)](_0x506e18[_0x5c6ab0(0xa4)]):null;}[_0x317af2(0xc4)](){const _0x26742b=_0x317af2;var _0x1c59de;let _0x18e1e7=this[_0x26742b(0xbc)]['getFormulas'](this[_0x26742b(0xf0)]());return((_0x1c59de=this[_0x26742b(0xbe)]('')[_0x26742b(0xdd)])==null?void 0x0:_0x1c59de[_0x26742b(0xef)](_0x3c37c6=>(0x0,e[_0x26742b(0xe5)])(_0x3c37c6)&&_0x18e1e7[_0x3c37c6[_0x26742b(0xa4)]]!=null))??[];}['_createFormula'](_0x40544b){const _0x48b241=_0x317af2;return this['_injector'][_0x48b241(0xb2)](a,this[_0x48b241(0xf0)](),_0x40544b);}};n['FDocument']['extend'](u);var d=class extends n[_0x317af2(0xc5)]{constructor(..._0xb75dac){const _0x5ba9c3=_0x317af2;super(..._0xb75dac),l(this,_0x5ba9c3(0xaa),void 0x0);}['_initialize'](_0x453300){const _0x2051e3=_0x317af2;this[_0x2051e3(0xaa)]=_0x453300[_0x2051e3(0xcd)](t[_0x2051e3(0xad)]);}[_0x317af2(0xf5)](_0x3affbb,_0x227b1a,_0x3a0bb7={}){const _0x301221=_0x317af2;return this[_0x301221(0xee)](_0x3affbb,_0x227b1a,_0x3a0bb7);}[_0x317af2(0xd2)](_0xa5e84a,_0x1ce03e={}){const _0x55d1b3=_0x317af2;return this[_0x55d1b3(0xee)](_0x55d1b3(0xbf),_0xa5e84a,_0x1ce03e);}[_0x317af2(0xee)](_0x5f1ee1,_0x4dd675,_0x5e7ba3){const _0x10042f=_0x317af2;if(this['getSegmentId']())return null;let _0xa9e6e1={'externalReferences':_0x5e7ba3[_0x10042f(0xfa)],'formula':_0x4dd675,'numberFormat':_0x5e7ba3['numberFormat'],'target':{'type':'paragraph','paragraphId':this[_0x10042f(0xf0)](),'position':_0x5f1ee1},'unitId':this['_document']['getId']()},_0x517d52=this['_docsFormulaCommandService'][_0x10042f(0xca)](e[_0x10042f(0xb0)]['id'],_0xa9e6e1);return _0x517d52?this['_injector']['createInstance'](a,this[_0x10042f(0xb5)][_0x10042f(0xf0)](),_0x517d52[_0x10042f(0xa4)]):null;}};function _0x492e(){const _0x346b69=['getId','numberFormat','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','startIndex','FDocumentTextRange','insertFormula','1324ZUecyT','some','25753gQDbbL','1312YfNBJv','externalReferences','DocFormulaModel','_unitId','_rangeId','rangeId','formula','3044628IYYuKp','symbol','endOffset','object','_docsFormulaCommandService','_univerInstanceService','DocFormulaDisplayTextService','ICommandService','RemoveDocFormulaCommand','getRange','InsertDocFormulaCommand','_model','createInstance','_service','\x20could\x20not\x20be\x20serialized.','_document','default','constructor','range','extend','string','_docsFormulaResourceLoaderService','_docsFormulaModel','_commandService','getBody','end','getFormulas','DocFormulaService','5926758LBdvOu','FDocumentFormula','_getCompleteRanges','FDocumentParagraph','13325rUxCie','_docsFormulaDisplayTextService','IUniverInstanceService','saveUnit','syncExecuteCommand','endIndex','_initialize','get','saveFormulaDisplayTextSnapshot','getSnapshot','map','toPrimitive','appendFormula','getUnit','getFormula','getFormulaAt','_createFormula','convertToText','1554533DccmUO','_getCustomRange','remove','2864894JkjXmt','function','customRanges','replaceWithText','21524058agxMAy','getConfig','call','ConvertDocFormulaToTextCommand','decorate','defineProperty','isDocFormulaRange','length','FDocument','find','body','Document\x20','describe','getResult','Inject','_insert','filter'];_0x492e=function(){return _0x346b69;};return _0x492e();}n[_0x317af2(0xc5)][_0x317af2(0xb9)](d);var f=class extends n['FDocumentTextRange']{constructor(..._0x42da0c){const _0x3c2232=_0x317af2;super(..._0x42da0c),l(this,_0x3c2232(0xaa),void 0x0);}[_0x317af2(0xcc)](_0x1b316b){const _0x468195=_0x317af2;this[_0x468195(0xaa)]=_0x1b316b[_0x468195(0xcd)](t[_0x468195(0xad)]);}['replaceWithFormula'](_0x9809a6,_0x9366a3={}){const _0x9e8193=_0x317af2;let {endOffset:_0x2b4903,segmentId:_0x4541d8,startOffset:_0x9dd144}=this['getRange']();return _0x4541d8?null:this[_0x9e8193(0xee)](_0x9dd144,_0x2b4903,_0x9809a6,_0x9366a3);}['_insert'](_0x12862c,_0x5d760c,_0x2f2ef9,_0xdd9cb5){const _0x71b4c2=_0x317af2;let _0x1da151={'externalReferences':_0xdd9cb5[_0x71b4c2(0xfa)],'formula':_0x2f2ef9,'numberFormat':_0xdd9cb5[_0x71b4c2(0xf1)],'target':{'type':_0x71b4c2(0xb8),'startOffset':_0x12862c,'endOffset':_0x5d760c},'unitId':this[_0x71b4c2(0xb5)][_0x71b4c2(0xf0)]()},_0x175dd4=this[_0x71b4c2(0xaa)][_0x71b4c2(0xca)](e[_0x71b4c2(0xb0)]['id'],_0x1da151);return _0x175dd4?this['_injector'][_0x71b4c2(0xb2)](a,this[_0x71b4c2(0xb5)][_0x71b4c2(0xf0)](),_0x175dd4[_0x71b4c2(0xa4)]):null;}};n[_0x317af2(0xf4)]['extend'](f),Object[_0x317af2(0xe4)](exports,_0x317af2(0xc3),{'enumerable':!0x0,'get':function(){return a;}});
package/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- const _0xe478be=_0x57a9;(function(_0x137aeb,_0x35af2f){const _0x43402f=_0x57a9,_0x2b6aca=_0x137aeb();while(!![]){try{const _0x464af3=-parseInt(_0x43402f(0x1ba))/0x1*(parseInt(_0x43402f(0x13f))/0x2)+parseInt(_0x43402f(0x155))/0x3*(parseInt(_0x43402f(0x103))/0x4)+parseInt(_0x43402f(0x18b))/0x5*(parseInt(_0x43402f(0xf7))/0x6)+-parseInt(_0x43402f(0xf1))/0x7+parseInt(_0x43402f(0xde))/0x8+-parseInt(_0x43402f(0x1a9))/0x9*(parseInt(_0x43402f(0x159))/0xa)+-parseInt(_0x43402f(0x1c6))/0xb*(parseInt(_0x43402f(0x1a7))/0xc);if(_0x464af3===_0x35af2f)break;else _0x2b6aca['push'](_0x2b6aca['shift']());}catch(_0x3d5b3f){_0x2b6aca['push'](_0x2b6aca['shift']());}}}(_0x1dff,0x952c1),Object['defineProperty'](exports,Symbol[_0xe478be(0x1f8)],{'value':_0xe478be(0x160)}));let e=require('@univerjs-pro/engine-formula'),t=require('@univerjs/core'),n=require('@univerjs/docs'),r=require('@univerjs/engine-formula'),i=require('rxjs'),a=require('@univerjs-pro/license');const o=_0xe478be(0x102),s=_0xe478be(0x179);function c(){return{'schemaVersion':0x1,'formulas':{}};}function l(_0x447170){const _0x13f3bf=_0xe478be;return!_0x447170||typeof _0x447170!=_0x13f3bf(0xef)||!f(_0x447170,[_0x13f3bf(0xeb),_0x13f3bf(0x197)])||!(_0x13f3bf(0xeb)in _0x447170)||_0x447170[_0x13f3bf(0xeb)]!==0x1||!('formulas'in _0x447170)||!_0x447170[_0x13f3bf(0x197)]||typeof _0x447170[_0x13f3bf(0x197)]!=_0x13f3bf(0xef)||Array[_0x13f3bf(0xe3)](_0x447170[_0x13f3bf(0x197)])?!0x1:Object[_0x13f3bf(0xf4)](_0x447170[_0x13f3bf(0x197)])[_0x13f3bf(0xf0)](([_0x29626a,_0x3e02c7])=>_0x29626a[_0x13f3bf(0xf2)]>0x0&&u(_0x3e02c7));}function u(_0x375f36){const _0x549dc9=_0xe478be;return!_0x375f36||typeof _0x375f36!=_0x549dc9(0xef)||!f(_0x375f36,['formula',_0x549dc9(0x127),_0x549dc9(0x1dc)])||!('formula'in _0x375f36)||typeof _0x375f36[_0x549dc9(0x18c)]!=_0x549dc9(0xf8)||!_0x375f36[_0x549dc9(0x18c)][_0x549dc9(0x1fc)]()||'numberFormat'in _0x375f36&&_0x375f36['numberFormat']!=null&&(typeof _0x375f36[_0x549dc9(0x127)]!='object'||!f(_0x375f36[_0x549dc9(0x127)],['pattern'])||!(_0x549dc9(0xd9)in _0x375f36[_0x549dc9(0x127)])||typeof _0x375f36[_0x549dc9(0x127)][_0x549dc9(0xd9)]!=_0x549dc9(0xf8))?!0x1:!(_0x549dc9(0x1dc)in _0x375f36)||_0x375f36[_0x549dc9(0x1dc)]==null||d(_0x375f36[_0x549dc9(0x1dc)]);}function d(_0x4ee4f3){const _0x54ea79=_0xe478be;return!_0x4ee4f3||typeof _0x4ee4f3!='object'||!f(_0x4ee4f3,['v','t',_0x54ea79(0xd9)])||!('v'in _0x4ee4f3)||_0x4ee4f3['v']!==null&&typeof _0x4ee4f3['v']!=_0x54ea79(0xf8)&&typeof _0x4ee4f3['v']!='number'&&typeof _0x4ee4f3['v']!=_0x54ea79(0x107)||'t'in _0x4ee4f3&&_0x4ee4f3['t']!=null&&!ee(_0x4ee4f3['t'])?!0x1:!(_0x54ea79(0xd9)in _0x4ee4f3)||_0x4ee4f3['pattern']==null||typeof _0x4ee4f3[_0x54ea79(0xd9)]==_0x54ea79(0xf8);}function f(_0x1805e6,_0x12cce4){const _0x3a37cf=_0xe478be;let _0x20cd10=new Set(_0x12cce4);return Object[_0x3a37cf(0xdd)](_0x1805e6)[_0x3a37cf(0xf0)](_0x43be5e=>_0x20cd10['has'](_0x43be5e));}function ee(_0xc4a9d4){const _0x284b49=_0xe478be;return typeof _0xc4a9d4=='number'&&Object[_0x284b49(0x11d)](t['CellValueType'])[_0x284b49(0x1d2)](_0xc4a9d4);}const p=new Set([t[_0xe478be(0xe9)][_0xe478be(0x1bf)],t[_0xe478be(0xe9)][_0xe478be(0x11b)],t[_0xe478be(0xe9)][_0xe478be(0x12f)],t[_0xe478be(0xe9)][_0xe478be(0x20e)],t['DataStreamTreeTokenType']['TABLE_CELL_END'],t[_0xe478be(0xe9)][_0xe478be(0x1b6)],t[_0xe478be(0xe9)][_0xe478be(0x150)],t['DataStreamTreeTokenType'][_0xe478be(0x1a4)],t[_0xe478be(0xe9)][_0xe478be(0x1e0)],t['DataStreamTreeTokenType'][_0xe478be(0x13a)],t['DataStreamTreeTokenType'][_0xe478be(0x106)],t[_0xe478be(0xe9)][_0xe478be(0x111)],t[_0xe478be(0xe9)][_0xe478be(0x161)],t['DataStreamTreeTokenType'][_0xe478be(0x15c)]]);var m=class extends Error{constructor(){super('Doc\x20Formula\x20range\x20cannot\x20cross\x20document\x20structure\x20boundaries');}};function te(_0x1be79a){const _0x174444=_0xe478be;var _0x1b333a,_0x3615cb;let _0x34f8bc=t[_0x174444(0x1ef)][_0x174444(0x15e)](_0x1be79a[_0x174444(0x195)]),_0x4af4af=T(_0x34f8bc),{startOffset:_0x3eab23,endOffset:_0x5bceb8}=oe(_0x4af4af,_0x1be79a[_0x174444(0x185)],_0x1be79a[_0x174444(0x163)]);ie(_0x4af4af,_0x3eab23,_0x5bceb8);let _0x17d346=((_0x1b333a=_0x4af4af['customRanges'])==null?void 0x0:_0x1b333a['filter'](_0xc5b29=>{const _0x3343f3=_0x174444;if(!g(_0xc5b29))return!0x1;let _0x37f83d=(0x0,t[_0x3343f3(0x170)])(_0xc5b29);return _0x37f83d[_0x3343f3(0x163)]>_0x3eab23&&_0x37f83d[_0x3343f3(0x185)]<_0x5bceb8;})[_0x174444(0x1f7)](_0x3e201a=>_0x3e201a[_0x174444(0x211)]))??[];ce(_0x4af4af,_0x3eab23,_0x5bceb8,''),_0x4af4af[_0x174444(0x1a8)]=[...((_0x3615cb=_0x4af4af[_0x174444(0x1a8)])==null?void 0x0:_0x3615cb['filter'](_0x3058bf=>!_0x17d346[_0x174444(0x1d2)](_0x3058bf['rangeId'])&&_0x3058bf[_0x174444(0x211)]!==_0x1be79a[_0x174444(0x211)]))??[],ae(_0x1be79a[_0x174444(0x211)],_0x3eab23)][_0x174444(0x1e8)]((_0x495f53,_0x42a462)=>_0x495f53[_0x174444(0xd3)]-_0x42a462[_0x174444(0xd3)]);let _0x71d508=v(_0x1be79a[_0x174444(0x10b)]);return _0x17d346[_0x174444(0x108)](_0x398e27=>{delete _0x71d508['formulas'][_0x398e27];}),_0x71d508[_0x174444(0x197)][_0x1be79a['rangeId']]=t[_0x174444(0x1ef)][_0x174444(0x15e)](_0x1be79a[_0x174444(0x138)]),{'nextDocumentData':_0x34f8bc,'nextResource':_0x71d508,'cursorOffset':_0x3eab23+0x1};}function ne(_0x58dc41){const _0x9a6fb0=_0xe478be;var _0x470ad1,_0x254ed3;let _0xaf0fd7=t[_0x9a6fb0(0x1ef)]['deepClone'](_0x58dc41[_0x9a6fb0(0x195)]),_0xd5a1bb=(_0x470ad1=T(_0xaf0fd7)['customRanges'])==null?void 0x0:_0x470ad1[_0x9a6fb0(0x115)](_0x2db794=>_0x2db794[_0x9a6fb0(0x211)]===_0x58dc41[_0x9a6fb0(0x211)]&&g(_0x2db794));if(!_0xd5a1bb||!((_0x254ed3=_0x58dc41['resource'])!=null&&_0x254ed3[_0x9a6fb0(0x197)][_0x58dc41[_0x9a6fb0(0x211)]]))return null;let _0x1923e2=v(_0x58dc41[_0x9a6fb0(0x10b)]);return _0x1923e2[_0x9a6fb0(0x197)][_0x58dc41[_0x9a6fb0(0x211)]]=t['Tools'][_0x9a6fb0(0x15e)](_0x58dc41[_0x9a6fb0(0x138)]),{'nextDocumentData':_0xaf0fd7,'nextResource':_0x1923e2,'cursorOffset':_0xd5a1bb[_0x9a6fb0(0x1fd)]+0x1};}function h(_0x1baef5){const _0xb0b83d=_0xe478be;let _0x1db76a=t[_0xb0b83d(0x1ef)]['deepClone'](_0x1baef5[_0xb0b83d(0x195)]),_0x7775c=le(_0x1db76a,_0x1baef5[_0xb0b83d(0x211)],_0x1baef5[_0xb0b83d(0x174)]??'');if(_0x7775c==null)return null;let _0x1a7dc7=v(_0x1baef5[_0xb0b83d(0x10b)]);return delete _0x1a7dc7['formulas'][_0x1baef5[_0xb0b83d(0x211)]],{'nextDocumentData':_0x1db76a,'nextResource':_0x1a7dc7,'cursorOffset':_0x7775c};}function re(_0x539b93,_0x496e5e){const _0x4f2ea1=_0xe478be;var _0x3c97fa;let _0x11e1bf=t['Tools'][_0x4f2ea1(0x15e)](_0x539b93),_0x4dbf5f=_0x11e1bf['body'];if(!_0x4dbf5f)return _0x11e1bf;let _0x252616=new Map(_0x496e5e[_0x4f2ea1(0x1f7)](_0xf82a77=>[_0xf82a77[_0x4f2ea1(0x211)],_0xf82a77[_0x4f2ea1(0x174)]])),_0x498fee=((_0x3c97fa=_0x4dbf5f[_0x4f2ea1(0x1a8)])==null?void 0x0:_0x3c97fa['filter'](_0x378ab6=>g(_0x378ab6)&&_0x252616[_0x4f2ea1(0x101)](_0x378ab6[_0x4f2ea1(0x211)]))[_0x4f2ea1(0x1e8)]((_0x488170,_0x59f089)=>_0x59f089[_0x4f2ea1(0xd3)]-_0x488170[_0x4f2ea1(0xd3)]))??[];for(let _0x1992b7 of _0x498fee)le(_0x11e1bf,_0x1992b7[_0x4f2ea1(0x211)],_0x252616[_0x4f2ea1(0x1dd)](_0x1992b7[_0x4f2ea1(0x211)])??'');return _0x11e1bf;}function g(_0x4453c0){const _0x257733=_0xe478be;var _0x7664c6;return(_0x4453c0==null?void 0x0:_0x4453c0['rangeType'])===t[_0x257733(0x1b2)][_0x257733(0x199)]&&_0x4453c0['wholeEntity']===!0x0&&((_0x7664c6=_0x4453c0['properties'])==null?void 0x0:_0x7664c6[_0x257733(0x176)])===_0x257733(0x179);}function _(_0x193aea,_0x38ea47){const _0x43ef99=_0xe478be;var _0x4fb1a6;return _0x193aea==null||(_0x4fb1a6=_0x193aea['customRanges'])==null?void 0x0:_0x4fb1a6['find'](_0x1ec749=>_0x1ec749[_0x43ef99(0x211)]===_0x38ea47&&g(_0x1ec749));}function ie(_0x38d98e,_0x1a8380,_0x4b1c1a){const _0x468871=_0xe478be;if(_0x1a8380===_0x4b1c1a){if(p[_0x468871(0x101)](_0x38d98e[_0x468871(0x212)][_0x1a8380]))throw new m();return;}for(let _0x3ff48b=_0x1a8380;_0x3ff48b<_0x4b1c1a;_0x3ff48b++)if(_0x38d98e['dataStream'][_0x3ff48b]===t[_0x468871(0xe9)][_0x468871(0xd8)]||p[_0x468871(0x101)](_0x38d98e[_0x468871(0x212)][_0x3ff48b]))throw new m();}function ae(_0x532c85,_0x5891f8){const _0x1662b2=_0xe478be;return{'startIndex':_0x5891f8,'endIndex':_0x5891f8,'rangeId':_0x532c85,'rangeType':t['CustomRangeType'][_0x1662b2(0x199)],'wholeEntity':!0x0,'properties':{'kind':s}};}function v(_0x32e570){const _0x2eb5c2=_0xe478be;return _0x32e570?t[_0x2eb5c2(0x1ef)][_0x2eb5c2(0x15e)](_0x32e570):c();}function oe(_0x56870c,_0x1626ad,_0x29debd){const _0x2a1a34=_0xe478be;let _0x1dafb2=se(_0x56870c),_0x1c00d9=_0x1626ad??_0x1dafb2,_0x55f49f=_0x29debd??_0x1c00d9;return{'startOffset':y(Math[_0x2a1a34(0xed)](_0x1c00d9,_0x55f49f),_0x1dafb2),'endOffset':y(Math['max'](_0x1c00d9,_0x55f49f),_0x1dafb2)};}function y(_0x5c9ad1,_0x50a0b1){const _0x44fea8=_0xe478be;return Math[_0x44fea8(0xee)](0x0,Math[_0x44fea8(0xed)](_0x5c9ad1,_0x50a0b1));}function se(_0x22f1e8){const _0x321503=_0xe478be;return _0x22f1e8[_0x321503(0x212)][_0x321503(0x13d)](''+t['DataStreamTreeTokenType'][_0x321503(0xd8)]+t[_0x321503(0xe9)][_0x321503(0x1bf)])?Math[_0x321503(0xee)](0x0,_0x22f1e8[_0x321503(0x212)][_0x321503(0xf2)]-0x2):_0x22f1e8[_0x321503(0x212)]['endsWith'](t[_0x321503(0xe9)][_0x321503(0x1bf)])?Math['max'](0x0,_0x22f1e8['dataStream'][_0x321503(0xf2)]-0x1):_0x22f1e8['dataStream'][_0x321503(0xf2)];}function ce(_0x511464,_0xa3e67b,_0x37e2f7,_0x395fcd){_0x37e2f7>_0xa3e67b&&de(_0x511464,_0xa3e67b,_0x37e2f7),ue(_0x511464,_0xa3e67b,_0x395fcd);}function le(_0x515e25,_0x93a91e,_0x3eb0a2){const _0x3411d6=_0xe478be;var _0x29c3b9,_0x180ef4;let _0x46210a=T(_0x515e25),_0x1f0642=(_0x29c3b9=_0x46210a['customRanges'])==null?void 0x0:_0x29c3b9[_0x3411d6(0x115)](_0xd63136=>_0xd63136[_0x3411d6(0x211)]===_0x93a91e&&g(_0xd63136));if(!_0x1f0642)return null;let _0x1c11a4=(0x0,t[_0x3411d6(0x170)])(_0x1f0642);return ce(_0x46210a,_0x1c11a4['startOffset'],_0x1c11a4[_0x3411d6(0x163)],_0x3eb0a2),_0x46210a[_0x3411d6(0x1a8)]=(_0x180ef4=_0x46210a[_0x3411d6(0x1a8)])==null?void 0x0:_0x180ef4[_0x3411d6(0x17d)](_0x2b498e=>_0x2b498e['rangeId']!==_0x93a91e),_0x1c11a4[_0x3411d6(0x185)]+_0x3eb0a2[_0x3411d6(0xf2)];}function ue(_0x17da8b,_0x23448d,_0x27b8b3){const _0x48d51a=_0xe478be;_0x27b8b3&&(_0x17da8b[_0x48d51a(0x212)]=''+_0x17da8b['dataStream'][_0x48d51a(0x14d)](0x0,_0x23448d)+_0x27b8b3+_0x17da8b[_0x48d51a(0x212)][_0x48d51a(0x14d)](_0x23448d),fe(_0x17da8b,_0x23448d,_0x27b8b3[_0x48d51a(0xf2)]));}function de(_0x581b03,_0x505ab3,_0x1e0dbf){const _0x1712ff=_0xe478be;let _0x2f2268=_0x1e0dbf-_0x505ab3;_0x581b03[_0x1712ff(0x212)]=''+_0x581b03['dataStream']['slice'](0x0,_0x505ab3)+_0x581b03[_0x1712ff(0x212)][_0x1712ff(0x14d)](_0x1e0dbf),pe(_0x581b03,_0x505ab3,_0x2f2268);}function fe(_0x1e24ac,_0x32678f,_0x484fb0){const _0x1b8c62=_0xe478be;_0x1e24ac[_0x1b8c62(0x1ac)]=b(_0x1e24ac[_0x1b8c62(0x1ac)],_0x32678f,_0x484fb0),_0x1e24ac['sectionBreaks']=b(_0x1e24ac[_0x1b8c62(0x1d0)],_0x32678f,_0x484fb0),_0x1e24ac[_0x1b8c62(0x1b7)]=b(_0x1e24ac[_0x1b8c62(0x1b7)],_0x32678f,_0x484fb0),_0x1e24ac['textRuns']=me(_0x1e24ac[_0x1b8c62(0x16b)],_0x32678f,_0x484fb0),_0x1e24ac['tables']=he(_0x1e24ac[_0x1b8c62(0x18f)],_0x32678f,_0x484fb0),_0x1e24ac[_0x1b8c62(0x1cd)]=S(_0x1e24ac[_0x1b8c62(0x1cd)],_0x32678f,_0x484fb0),_0x1e24ac[_0x1b8c62(0x1a8)]=S(_0x1e24ac[_0x1b8c62(0x1a8)],_0x32678f,_0x484fb0),_0x1e24ac[_0x1b8c62(0x10e)]=S(_0x1e24ac[_0x1b8c62(0x10e)],_0x32678f,_0x484fb0),_0x1e24ac[_0x1b8c62(0x17f)]=S(_0x1e24ac[_0x1b8c62(0x17f)],_0x32678f,_0x484fb0);}function pe(_0x2f965f,_0x23dceb,_0xc9ac49){const _0x926c02=_0xe478be;var _0x5b846f,_0x56dc87;_0x2f965f[_0x926c02(0x1ac)]=x(_0x2f965f['paragraphs'],_0x23dceb,_0xc9ac49),_0x2f965f['sectionBreaks']=x(_0x2f965f[_0x926c02(0x1d0)],_0x23dceb,_0xc9ac49),_0x2f965f[_0x926c02(0x1b7)]=x(_0x2f965f[_0x926c02(0x1b7)],_0x23dceb,_0xc9ac49),_0x2f965f['textRuns']=(_0x5b846f=w((_0x56dc87=_0x2f965f[_0x926c02(0x16b)])==null?void 0x0:_0x56dc87['map'](_0x1c06c0=>({..._0x1c06c0,'startIndex':_0x1c06c0['st'],'endIndex':_0x1c06c0['ed']})),_0x23dceb,_0xc9ac49))==null?void 0x0:_0x5b846f['map'](_0x94ed9e=>{let {startIndex:_0x5bcc54,endIndex:_0x2abf62,..._0x1086fa}=_0x94ed9e;return{..._0x1086fa,'st':_0x5bcc54,'ed':_0x2abf62};}),_0x2f965f[_0x926c02(0x18f)]=w(_0x2f965f[_0x926c02(0x18f)],_0x23dceb,_0xc9ac49),_0x2f965f[_0x926c02(0x1cd)]=C(_0x2f965f[_0x926c02(0x1cd)],_0x23dceb,_0xc9ac49),_0x2f965f[_0x926c02(0x1a8)]=C(_0x2f965f[_0x926c02(0x1a8)],_0x23dceb,_0xc9ac49),_0x2f965f[_0x926c02(0x10e)]=C(_0x2f965f['customDecorations'],_0x23dceb,_0xc9ac49),_0x2f965f['blockRanges']=C(_0x2f965f[_0x926c02(0x17f)],_0x23dceb,_0xc9ac49);}function b(_0x4d731c,_0x37283d,_0x11a7b1){const _0x38320e=_0xe478be;return _0x4d731c==null?void 0x0:_0x4d731c['map'](_0x3ba01a=>_0x3ba01a[_0x38320e(0xd3)]>=_0x37283d?{..._0x3ba01a,'startIndex':_0x3ba01a[_0x38320e(0xd3)]+_0x11a7b1}:_0x3ba01a);}function x(_0x285cfa,_0x3746f8,_0x428765){const _0x45a389=_0xe478be;let _0x4463e1=_0x3746f8+_0x428765;return _0x285cfa==null?void 0x0:_0x285cfa[_0x45a389(0x1f7)](_0xb75882=>_0xb75882[_0x45a389(0xd3)]>=_0x3746f8&&_0xb75882[_0x45a389(0xd3)]<_0x4463e1?null:_0xb75882[_0x45a389(0xd3)]>=_0x4463e1?{..._0xb75882,'startIndex':_0xb75882[_0x45a389(0xd3)]-_0x428765}:_0xb75882)[_0x45a389(0x17d)](_0x554323=>_0x554323!=null);}function me(_0xd64cf6,_0x4d1082,_0x468faf){const _0x195f44=_0xe478be;return _0xd64cf6==null?void 0x0:_0xd64cf6[_0x195f44(0x1f7)](_0x9a2420=>_0x9a2420['st']>=_0x4d1082?{..._0x9a2420,'st':_0x9a2420['st']+_0x468faf,'ed':_0x9a2420['ed']+_0x468faf}:_0x9a2420['ed']>_0x4d1082?{..._0x9a2420,'ed':_0x9a2420['ed']+_0x468faf}:_0x9a2420);}function S(_0x8f9dc8,_0x45a8be,_0x5087af){const _0x35f7a0=_0xe478be;return _0x8f9dc8==null?void 0x0:_0x8f9dc8['map'](_0x5f2bcc=>(0x0,t[_0x35f7a0(0x113)])(_0x5f2bcc,_0x45a8be,_0x5087af));}function _0x1dff(){const _0x1ea94b=['getBodySliceForTextXAction','DocFormulaResourceController','generateRandomId','startIndex','clear','degradeDocumentData','body','_docFormulaModel','PARAGRAPH','pattern','IResourceManagerService','syncExecuteCommand','set','keys','1686472GPBkWM','findDocFormulaRange','_isDisposed','delete','buildRemoveDocFormulaActions','isArray','symbol','_loadErrors','DocFormulaModel','buildUpdateDocFormulaActions','function','DataStreamTreeTokenType','_formulaKeys','schemaVersion','DOC_FORMULA_CUSTOM_RANGE_KIND','min','max','object','every','2179100YLRHzR','length','buildInsertDocFormulaActions','entries','unsupported-version','push','30IklQzW','string','SetDocFormulaResourceMutation','CommandType','_hostExternalReferenceModel','_syncScheduled','JSONX','error','disposeWithMe','formulaId','has','DOC_FORMULA_PLUGIN','47984JqAPig','_resources','isInteger','COLUMN_GROUP_END','boolean','forEach','_updateFormulaResult','docs-formula.mutation.set-formula','resource','DocFormulaLifecycleController','toFormulaLastValue','customDecorations','Injector','ReplaceDocFormulaWithTextCommand','BLOCK_START','resolveBinding','shiftInclusiveRangeOnInsert','previousResource','find','InvalidDocFormulaInsertRangeError','removeFormula','getAllUnitsForType','SetDocFormulaMutation','docs-formula.config','TABLE_START','DOC_FORMULA_SCHEMA_VERSION','values','getRegisteredFormulas','resourceRedo','paragraph','DOC_FORMULA_OBJECT_REPLACEMENT','buildUpsertHostExternalReferenceMutations','selection','invalid-resource','_setPresentation','registerCommand','numberFormat','UniverDocsPlugin','eligible','replaceDocRanges','start','DocFormulaDisplayTextService','_univerInstanceService','next','TABLE_ROW_START','OtherFormulaBizType','getResource','deleteFormula','fromEntries','Subject','target','EMPTY','accessor','config','status','COLUMN_END','_service','UniverLicensePlugin','endsWith','docs-formula.command.insert','153146hTrfZK','syncUnit','register','UniverInstanceType','assign','_configService','change$','FormulaCacheEligibilityService','paragraphId','notifyTextChanged','shiftExclusiveRangeOnInsert','_commandService','params','setResource','slice','constructor','DocTextResolverService','TABLE_END','redoMutation','getScalarFormulaResultCell','shiftInclusiveRangeOnDelete','pushUndoRedo','177NDnRdV','getRevision','load','isFormulaLastValue','24620goApcm','disabled','asObservable','CUSTOM_BLOCK','SUCCESS','deepClone','assertSafeDocFormulaInsertRange','Module','BLOCK_END','_rawResources','endOffset','unregisterUnit','decorate','FormulaResultStatus','complete','getUnit','DocFormulaService','shiftExclusiveRangeOnDelete','textRuns','getFormula','documentRedo','UpdateDocFormulaCommand','externalMutations','getCustomRangeInterval','_resourceManagerService','parse','getRichTextEditPath','text','_formulaService','kind','_syncUnit','getUnitId','univer-docs-formula','from','references','resolved','filter','formulaResult$','blockRanges','version','success','DocFormulaResultStatus','cursorOffset','nextResource','startOffset','defineProperty','stale','setFormulas','_deleteRegistration','resolveHostFormulaExternalReferences','1013180hbxxfc','formula','getFormulas','serialize','tables','degradeDocFormulaDocumentData','trigger','RichTextEditingMutation','RegisterOtherFormulaService','Inject','documentData','setConfig','formulas','expectedFormula','CUSTOM','sequenceNodesBuilder','color','assess','docs-formula.command.replace-with-text','_config','unitDisposed$','docs-formula.command.convert-to-text','editOp','UniverProFormulaEnginePlugin','pending','COLUMN_GROUP_START','_model','isDocFormulaRange','806436xKjDBL','customRanges','1485nwVLdp','nextDocumentData','resolveFormula','paragraphs','_preserveInvalid','removeUnit','_registrationService','DOC','source','CustomRangeType','getOwnPropertyDescriptor','subscribe','liveResult','TABLE_ROW_END','customBlocks','docs-formula.mutation.remove-formula','touchDependencies','7hnzARG','1.0.0-insiders.20260813-7c9aa50','insertLength','identity','getInstance','SECTION_BREAK','setFormula','dispose','ConvertDocFormulaToTextCommand','MUTATION','resolveText','_cacheEligibilityService','11vyypva','collectMutations','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','onStarting','docs-formula.command.set-number-format','docs-formula.mutation.set-last-values','end','columnGroups','DocSelectionManagerService','updates','sectionBreaks','_injector','includes','Plugin','document','COMMAND','retain','add','DependentOn','previousDocumentData','data','degradeBody','lastValue','get','resources','iterator','COLUMN_START','LexerTreeBuilder','docs-formula.mutation.set-resource','segmentId','name','position','cell','Disposable','sort','some','UNIVER_DOC','getTextRanges','TextX','pluginName','insert','Tools','presentation','_instanceService','resourceUndo','HostExternalReferenceModel','collectFormulaExternalReferenceQualifiers','presentationChanged$','_presentationChanged$','map','toStringTag','unitId','expectedNumberFormat','ERROR','trim','endIndex','startsWith','DOC_SELECTION_OPTION_PRESERVE_CARET','_queueSync','_change$','ICommandService','packageName','empty','undoMutation','getSnapshot','FormulaLastValuePersistenceService','unregister','resolveFormulaResultPresentation','type','expectedReferenceRevision','model','_registrations','TABLE_CELL_START','isDocFormulaResource','SetDocFormulaLastValuesMutation','rangeId','dataStream','createEmptyDocFormulaResource','getCurrentUnitOfType','getResult','_pendingUnitIds'];_0x1dff=function(){return _0x1ea94b;};return _0x1dff();}function he(_0x59bda4,_0x2f87d6,_0x5f52c4){const _0x40a04d=_0xe478be;return _0x59bda4==null?void 0x0:_0x59bda4[_0x40a04d(0x1f7)](_0x195d6c=>(0x0,t[_0x40a04d(0x149)])(_0x195d6c,_0x2f87d6,_0x5f52c4));}function C(_0x5c6a7b,_0x5c0ca3,_0x2ecdeb){const _0x4108b3=_0xe478be;return _0x5c6a7b==null?void 0x0:_0x5c6a7b[_0x4108b3(0x1f7)](_0x447ee7=>(0x0,t[_0x4108b3(0x153)])(_0x447ee7,_0x5c0ca3,_0x2ecdeb))[_0x4108b3(0x17d)](_0x455bf8=>_0x455bf8!=null);}function w(_0x2ef784,_0x13356c,_0x18ebd3){const _0x17ae7c=_0xe478be;return _0x2ef784==null?void 0x0:_0x2ef784[_0x17ae7c(0x1f7)](_0x52b2e3=>(0x0,t[_0x17ae7c(0x16a)])(_0x52b2e3,_0x13356c,_0x18ebd3))[_0x17ae7c(0x17d)](_0x16d65c=>_0x16d65c!=null);}function T(_0xec152e){const _0x31360e=_0xe478be;if(!_0xec152e[_0x31360e(0xd6)])throw Error('Document\x20main\x20body\x20is\x20required\x20to\x20insert\x20Doc\x20Formula.');return _0xec152e[_0x31360e(0xd6)];}function E(_0x3eed1c){'@babel/helpers - typeof';const _0x355082=_0xe478be;return E=typeof Symbol==_0x355082(0xe8)&&typeof Symbol[_0x355082(0x1df)]==_0x355082(0xe4)?function(_0x283248){return typeof _0x283248;}:function(_0x552d7c){const _0x382254=_0x355082;return _0x552d7c&&typeof Symbol==_0x382254(0xe8)&&_0x552d7c[_0x382254(0x14e)]===Symbol&&_0x552d7c!==Symbol['prototype']?_0x382254(0xe4):typeof _0x552d7c;},E(_0x3eed1c);}function ge(_0x43431e,_0x3696a6){const _0x1b905a=_0xe478be;if(E(_0x43431e)!=_0x1b905a(0xef)||!_0x43431e)return _0x43431e;var _0x1df9db=_0x43431e[Symbol['toPrimitive']];if(_0x1df9db!==void 0x0){var _0x4523d4=_0x1df9db['call'](_0x43431e,_0x3696a6||'default');if(E(_0x4523d4)!=_0x1b905a(0xef))return _0x4523d4;throw TypeError(_0x1b905a(0x1c8));}return(_0x3696a6===_0x1b905a(0xf8)?String:Number)(_0x43431e);}function _e(_0x3c30ef){const _0xff4045=_0xe478be;var _0x10a2b9=ge(_0x3c30ef,_0xff4045(0xf8));return E(_0x10a2b9)==_0xff4045(0xe4)?_0x10a2b9:_0x10a2b9+'';}function D(_0x304bb5,_0x52f1ac,_0x10b17b){const _0x9ddd6a=_0xe478be;return(_0x52f1ac=_e(_0x52f1ac))in _0x304bb5?Object[_0x9ddd6a(0x186)](_0x304bb5,_0x52f1ac,{'value':_0x10b17b,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x304bb5[_0x52f1ac]=_0x10b17b,_0x304bb5;}var O=class extends t[_0xe478be(0x1e7)]{constructor(..._0x336fbc){const _0x2525dc=_0xe478be;super(..._0x336fbc),D(this,_0x2525dc(0x104),new Map()),D(this,_0x2525dc(0x162),new Map()),D(this,_0x2525dc(0xe5),new Map()),D(this,_0x2525dc(0x201),new i[(_0x2525dc(0x134))]()),D(this,_0x2525dc(0x145),this[_0x2525dc(0x201)][_0x2525dc(0x15b)]());}['getFormula'](_0x193d5c,_0x1d8ca8){const _0x4d42dc=_0xe478be;var _0x11afbe;let _0x54a772=(_0x11afbe=this[_0x4d42dc(0x104)]['get'](_0x193d5c))==null?void 0x0:_0x11afbe[_0x4d42dc(0x197)][_0x1d8ca8];return _0x54a772?t[_0x4d42dc(0x1ef)][_0x4d42dc(0x15e)](_0x54a772):void 0x0;}[_0xe478be(0x18d)](_0x241bd4){const _0x23fb2e=_0xe478be;var _0xa16c3;return t[_0x23fb2e(0x1ef)][_0x23fb2e(0x15e)](((_0xa16c3=this[_0x23fb2e(0x104)][_0x23fb2e(0x1dd)](_0x241bd4))==null?void 0x0:_0xa16c3['formulas'])??{});}[_0xe478be(0x131)](_0x2a1fbb){const _0x41c5b4=_0xe478be;let _0x104c9b=this[_0x41c5b4(0x104)][_0x41c5b4(0x1dd)](_0x2a1fbb);return _0x104c9b?t[_0x41c5b4(0x1ef)][_0x41c5b4(0x15e)](_0x104c9b):void 0x0;}['setFormula'](_0x2c2ca4,_0x47d57e,_0x2faa31){const _0x5b1bfd=_0xe478be;return this[_0x5b1bfd(0x188)](_0x2c2ca4,{[_0x47d57e]:_0x2faa31});}[_0xe478be(0x14c)](_0x12647f,_0x5061ae){const _0x19b264=_0xe478be;return this[_0x19b264(0xe5)][_0x19b264(0x101)](_0x12647f)||!l(_0x5061ae)?!0x1:(this[_0x19b264(0x104)][_0x19b264(0xdc)](_0x12647f,t[_0x19b264(0x1ef)]['deepClone'](_0x5061ae)),this[_0x19b264(0x201)][_0x19b264(0x12e)]({'unitId':_0x12647f}),!0x0);}[_0xe478be(0x188)](_0x5c2503,_0x21e552){const _0x339d53=_0xe478be;if(this['_loadErrors'][_0x339d53(0x101)](_0x5c2503)||!Object[_0x339d53(0xdd)](_0x21e552)[_0x339d53(0xf2)]||!l({'schemaVersion':0x1,'formulas':_0x21e552}))return!0x1;let _0x59b83a=this[_0x339d53(0x104)][_0x339d53(0x1dd)](_0x5c2503)??c(),_0x1efb8c=t[_0x339d53(0x1ef)][_0x339d53(0x15e)](_0x59b83a);return Object[_0x339d53(0x143)](_0x1efb8c['formulas'],t[_0x339d53(0x1ef)]['deepClone'](_0x21e552)),this[_0x339d53(0x104)][_0x339d53(0xdc)](_0x5c2503,_0x1efb8c),this[_0x339d53(0x201)][_0x339d53(0x12e)]({'unitId':_0x5c2503,'rangeIds':Object['keys'](_0x21e552)}),!0x0;}['removeFormula'](_0x306d15,_0x233429){const _0x459e05=_0xe478be;if(this[_0x459e05(0xe5)][_0x459e05(0x101)](_0x306d15))return!0x1;let _0x556c93=this['_resources'][_0x459e05(0x1dd)](_0x306d15);if(!(_0x556c93!=null&&_0x556c93[_0x459e05(0x197)][_0x233429]))return!0x1;let _0x588b9a=t[_0x459e05(0x1ef)][_0x459e05(0x15e)](_0x556c93);return delete _0x588b9a[_0x459e05(0x197)][_0x233429],this[_0x459e05(0x104)][_0x459e05(0xdc)](_0x306d15,_0x588b9a),this[_0x459e05(0x201)][_0x459e05(0x12e)]({'unitId':_0x306d15,'rangeIds':[_0x233429]}),!0x0;}[_0xe478be(0x157)](_0x4245a1,_0x1c9139){const _0xfbd877=_0xe478be;return _0x1c9139&&typeof _0x1c9139==_0xfbd877(0xef)&&'schemaVersion'in _0x1c9139&&_0x1c9139[_0xfbd877(0xeb)]!==0x1?(this['_preserveInvalid'](_0x4245a1,_0x1c9139,_0xfbd877(0xf5)),!0x1):l(_0x1c9139)?(this['_resources']['set'](_0x4245a1,t[_0xfbd877(0x1ef)][_0xfbd877(0x15e)](_0x1c9139)),this[_0xfbd877(0x162)][_0xfbd877(0xe1)](_0x4245a1),this[_0xfbd877(0xe5)][_0xfbd877(0xe1)](_0x4245a1),this[_0xfbd877(0x201)][_0xfbd877(0x12e)]({'unitId':_0x4245a1}),!0x0):(this[_0xfbd877(0x1ad)](_0x4245a1,_0x1c9139,_0xfbd877(0x124)),!0x1);}[_0xe478be(0x18e)](_0x1eac1a){const _0x200578=_0xe478be;let _0x3d5366=this['_resources'][_0x200578(0x1dd)](_0x1eac1a);return _0x3d5366?t[_0x200578(0x1ef)][_0x200578(0x15e)](_0x3d5366):this[_0x200578(0x162)][_0x200578(0x101)](_0x1eac1a)?t[_0x200578(0x1ef)]['deepClone'](this[_0x200578(0x162)][_0x200578(0x1dd)](_0x1eac1a)):c();}['getLoadError'](_0xed7e6b){const _0x19243d=_0xe478be;return this[_0x19243d(0xe5)][_0x19243d(0x1dd)](_0xed7e6b);}['removeUnit'](_0x34b8c1){const _0x55cc12=_0xe478be;this[_0x55cc12(0x104)][_0x55cc12(0xe1)](_0x34b8c1),this[_0x55cc12(0x162)][_0x55cc12(0xe1)](_0x34b8c1),this['_loadErrors']['delete'](_0x34b8c1),this[_0x55cc12(0x201)][_0x55cc12(0x12e)]({'unitId':_0x34b8c1});}['dispose'](){const _0x825162=_0xe478be;this['_resources'][_0x825162(0xd4)](),this[_0x825162(0x162)][_0x825162(0xd4)](),this[_0x825162(0xe5)][_0x825162(0xd4)](),this[_0x825162(0x201)][_0x825162(0x167)](),super[_0x825162(0x1c1)]();}[_0xe478be(0x1ad)](_0xcfa9ac,_0x5054dd,_0xe8d930){const _0x26be2c=_0xe478be;this[_0x26be2c(0x104)]['delete'](_0xcfa9ac),this['_rawResources']['set'](_0xcfa9ac,t[_0x26be2c(0x1ef)]['deepClone'](_0x5054dd)),this['_loadErrors'][_0x26be2c(0xdc)](_0xcfa9ac,_0xe8d930),this[_0x26be2c(0x201)][_0x26be2c(0x12e)]({'unitId':_0xcfa9ac});}};let ve=function(_0xafa901){const _0x1a6e75=_0xe478be;return _0xafa901[_0x1a6e75(0x136)]='empty',_0xafa901['PENDING']=_0x1a6e75(0x1a3),_0xafa901[_0x1a6e75(0x15d)]='success',_0xafa901[_0x1a6e75(0x1fb)]=_0x1a6e75(0xfe),_0xafa901;}({});function k(_0x1cea2d,_0x50528f){return function(_0x37a83b,_0x2dcbce){_0x50528f(_0x37a83b,_0x2dcbce,_0x1cea2d);};}function A(_0x3a3eb1,_0x28601e,_0x53897f,_0x516209){const _0x122eb1=_0xe478be;var _0xce5bf7=arguments['length'],_0x2eb9ec=_0xce5bf7<0x3?_0x28601e:_0x516209===null?_0x516209=Object[_0x122eb1(0x1b3)](_0x28601e,_0x53897f):_0x516209,_0x47d5f3;if(typeof Reflect=='object'&&typeof Reflect['decorate']==_0x122eb1(0xe8))_0x2eb9ec=Reflect[_0x122eb1(0x165)](_0x3a3eb1,_0x28601e,_0x53897f,_0x516209);else{for(var _0x34fb12=_0x3a3eb1[_0x122eb1(0xf2)]-0x1;_0x34fb12>=0x0;_0x34fb12--)(_0x47d5f3=_0x3a3eb1[_0x34fb12])&&(_0x2eb9ec=(_0xce5bf7<0x3?_0x47d5f3(_0x2eb9ec):_0xce5bf7>0x3?_0x47d5f3(_0x28601e,_0x53897f,_0x2eb9ec):_0x47d5f3(_0x28601e,_0x53897f))||_0x2eb9ec);}return _0xce5bf7>0x3&&_0x2eb9ec&&Object[_0x122eb1(0x186)](_0x28601e,_0x53897f,_0x2eb9ec),_0x2eb9ec;}let j=class extends t['Disposable']{constructor(_0x2159d0,_0x685784,_0x1c02bf){const _0x58d3fe=_0xe478be;super(),this[_0x58d3fe(0x1a5)]=_0x2159d0,this[_0x58d3fe(0x1af)]=_0x685784,this[_0x58d3fe(0xfb)]=_0x1c02bf,D(this,'_registrations',new Map()),D(this,'_formulaKeys',new Map()),D(this,_0x58d3fe(0x1f6),new i[(_0x58d3fe(0x134))]()),D(this,_0x58d3fe(0x1f5),this['_presentationChanged$'][_0x58d3fe(0x15b)]()),this[_0x58d3fe(0xff)](this['_registrationService'][_0x58d3fe(0x17e)][_0x58d3fe(0x1b4)](_0x3d67db=>{const _0x14e9d2=_0x58d3fe;for(let _0x4d7159 of Object[_0x14e9d2(0x11d)](_0x3d67db))for(let _0x36df74 of Object[_0x14e9d2(0x11d)](_0x4d7159))_0x36df74[_0x14e9d2(0x108)](_0x13c326=>this[_0x14e9d2(0x109)](_0x13c326));}));}[_0xe478be(0x140)](_0x5cc79d){const _0x170a2a=_0xe478be;var _0x481e70;let _0x31b8d4=_0x5cc79d[_0x170a2a(0x178)](),_0xb9cbd6=((_0x481e70=_0x5cc79d['getSnapshot']()[_0x170a2a(0xd6)])==null||(_0x481e70=_0x481e70[_0x170a2a(0x1a8)])==null?void 0x0:_0x481e70[_0x170a2a(0x17d)](g))??[],_0x3654f2=this['_model']['getFormulas'](_0x31b8d4),_0x13fef7=new Set();for(let _0x2acfbb of _0xb9cbd6){let _0x53d897=_0x3654f2[_0x2acfbb[_0x170a2a(0x211)]];_0x53d897&&(_0x13fef7[_0x170a2a(0x1d7)](M(_0x31b8d4,_0x2acfbb[_0x170a2a(0x211)])),this['register']({'unitId':_0x31b8d4,'rangeId':_0x2acfbb[_0x170a2a(0x211)]},_0x53d897));}for(let _0x4c5ae6 of Array[_0x170a2a(0x17a)](this['_registrations'][_0x170a2a(0x11d)]()))_0x4c5ae6['unitId']===_0x31b8d4&&!_0x13fef7[_0x170a2a(0x101)](M(_0x4c5ae6['unitId'],_0x4c5ae6[_0x170a2a(0x211)]))&&this[_0x170a2a(0x208)](_0x4c5ae6);}[_0xe478be(0x141)](_0x8dc62e,_0x1c3afe){const _0x3c8eb5=_0xe478be;let _0x29ab95=M(_0x8dc62e[_0x3c8eb5(0x1f9)],_0x8dc62e['rangeId']),_0x2c14bc=this[_0x3c8eb5(0x20d)][_0x3c8eb5(0x1dd)](_0x29ab95),_0x5361ef=this['_hostExternalReferenceModel'][_0x3c8eb5(0x156)](_0x8dc62e['unitId']);if(_0x2c14bc&&_0x2c14bc[_0x3c8eb5(0x138)][_0x3c8eb5(0x18c)]===_0x1c3afe[_0x3c8eb5(0x18c)]&&_0x2c14bc['referenceRevision']===_0x5361ef){_0x2c14bc[_0x3c8eb5(0x138)]=_0x1c3afe;let _0x3cb308=_0x2c14bc[_0x3c8eb5(0x100)]?this[_0x3c8eb5(0x1af)]['getFormulaValueSync'](_0x2c14bc[_0x3c8eb5(0x1f9)],_0x2c14bc[_0x3c8eb5(0x1f9)],_0x2c14bc[_0x3c8eb5(0x100)])??void 0x0:void 0x0;_0x2c14bc[_0x3c8eb5(0x1b5)]=_0x3cb308,this[_0x3c8eb5(0x125)](_0x29ab95,N(_0x1c3afe,_0x3cb308));return;}_0x2c14bc!=null&&_0x2c14bc[_0x3c8eb5(0x100)]&&this[_0x3c8eb5(0x189)](_0x2c14bc);let _0x504622={..._0x8dc62e,'config':_0x1c3afe,'referenceRevision':_0x5361ef,'presentation':N(_0x1c3afe,void 0x0)};if(this['_registrations']['set'](_0x29ab95,_0x504622),!_0x1c3afe[_0x3c8eb5(0x18c)][_0x3c8eb5(0x1fc)]())return;let _0x1ef9d3=this['_registrationService']['registerFormulaWithRange'](_0x8dc62e[_0x3c8eb5(0x1f9)],_0x8dc62e[_0x3c8eb5(0x1f9)],_0x1c3afe[_0x3c8eb5(0x18c)],void 0x0,{'rangeId':_0x8dc62e[_0x3c8eb5(0x211)]},r[_0x3c8eb5(0x130)][_0x3c8eb5(0x1b0)],_0x8dc62e[_0x3c8eb5(0x211)]);_0x504622[_0x3c8eb5(0x100)]=_0x1ef9d3,this[_0x3c8eb5(0xea)][_0x3c8eb5(0xdc)](_0x1ef9d3,_0x29ab95);}[_0xe478be(0x208)](_0x4591a9){const _0x52ae80=_0xe478be;let _0x547ef1=M(_0x4591a9[_0x52ae80(0x1f9)],_0x4591a9[_0x52ae80(0x211)]),_0x3962bf=this[_0x52ae80(0x20d)][_0x52ae80(0x1dd)](_0x547ef1);_0x3962bf&&(this[_0x52ae80(0x189)](_0x3962bf),this[_0x52ae80(0x20d)][_0x52ae80(0xe1)](_0x547ef1));}[_0xe478be(0x164)](_0x4971cc){const _0x39826c=_0xe478be;for(let _0x12ad6a of Array['from'](this[_0x39826c(0x20d)]['values']()))_0x12ad6a[_0x39826c(0x1f9)]===_0x4971cc&&this['unregister'](_0x12ad6a);}['getPresentation'](_0x4dc474){const _0xd79d03=_0xe478be;var _0x4ec1bb;return(_0x4ec1bb=this[_0xd79d03(0x20d)]['get'](M(_0x4dc474['unitId'],_0x4dc474[_0xd79d03(0x211)])))==null?void 0x0:_0x4ec1bb[_0xd79d03(0x1f0)];}[_0xe478be(0x215)](_0x25c645){const _0x26a03d=_0xe478be;let _0x2e98ee=this[_0x26a03d(0x20d)]['get'](M(_0x25c645[_0x26a03d(0x1f9)],_0x25c645[_0x26a03d(0x211)]));return _0x2e98ee?P(_0x2e98ee):void 0x0;}[_0xe478be(0x11e)](){const _0x27c601=_0xe478be;return Array[_0x27c601(0x17a)](this[_0x27c601(0x20d)]['values'](),_0x23f0c6=>({'identity':{'unitId':_0x23f0c6[_0x27c601(0x1f9)],'rangeId':_0x23f0c6[_0x27c601(0x211)]},'config':_0x23f0c6[_0x27c601(0x138)],'referenceRevision':_0x23f0c6['referenceRevision'],..._0x23f0c6[_0x27c601(0x1b5)]?{'liveResult':_0x23f0c6['liveResult']}:null}));}[_0xe478be(0x1c1)](){const _0x4987f5=_0xe478be;for(let _0x254edb of this['_registrations']['values']())this[_0x4987f5(0x189)](_0x254edb);this[_0x4987f5(0x20d)]['clear'](),this['_formulaKeys'][_0x4987f5(0xd4)](),this[_0x4987f5(0x1f6)]['complete'](),super[_0x4987f5(0x1c1)]();}[_0xe478be(0x109)](_0x4e8099){const _0x3fea6c=_0xe478be;let _0x23efae=this[_0x3fea6c(0xea)]['get'](_0x4e8099['formulaId']),_0x1bd0af=_0x23efae?this[_0x3fea6c(0x20d)][_0x3fea6c(0x1dd)](_0x23efae):void 0x0;!_0x23efae||!_0x1bd0af||(_0x1bd0af[_0x3fea6c(0x1b5)]=_0x4e8099,this['_setPresentation'](_0x23efae,N(_0x1bd0af[_0x3fea6c(0x138)],_0x4e8099)));}['_setPresentation'](_0x1f9949,_0x1809ee){const _0x5ccc91=_0xe478be;var _0x16c566,_0x105cd9;let _0x451743=this[_0x5ccc91(0x20d)]['get'](_0x1f9949);if(!_0x451743||ye(_0x451743[_0x5ccc91(0x1f0)],_0x1809ee))return;let _0x4e53b7=_0x451743['presentation'],_0x2853e3=P(_0x451743);_0x451743[_0x5ccc91(0x1f0)]=_0x1809ee,this[_0x5ccc91(0x1f6)][_0x5ccc91(0x12e)]({'unitId':_0x451743[_0x5ccc91(0x1f9)],'rangeId':_0x451743[_0x5ccc91(0x211)],'presentation':_0x1809ee,'previousPresentation':_0x4e53b7,'result':P(_0x451743),'previousResult':{..._0x2853e3,..._0x4e53b7,'value':(_0x16c566=_0x4e53b7[_0x5ccc91(0x1e6)])==null?void 0x0:_0x16c566['v'],'valueType':((_0x105cd9=_0x4e53b7[_0x5ccc91(0x1e6)])==null?void 0x0:_0x105cd9['t'])??void 0x0}});}[_0xe478be(0x189)](_0x7e3aa6){const _0x5ad6a3=_0xe478be;_0x7e3aa6[_0x5ad6a3(0x100)]&&(this[_0x5ad6a3(0x1af)][_0x5ad6a3(0x132)](_0x7e3aa6[_0x5ad6a3(0x1f9)],_0x7e3aa6[_0x5ad6a3(0x1f9)],[_0x7e3aa6['formulaId']]),this[_0x5ad6a3(0xea)][_0x5ad6a3(0xe1)](_0x7e3aa6[_0x5ad6a3(0x100)]));}};j=A([k(0x0,(0x0,t[_0xe478be(0x194)])(O)),k(0x1,(0x0,t[_0xe478be(0x194)])(r[_0xe478be(0x193)])),k(0x2,(0x0,t['Inject'])(e['HostExternalReferenceModel']))],j);function M(_0x595537,_0x24b196){return _0x595537+'\x00'+_0x24b196;}function N(_0x7b457f,_0x2ca9a6){const _0x30faf3=_0xe478be;return(0x0,e[_0x30faf3(0x209)])({'numberFormat':_0x7b457f[_0x30faf3(0x127)],'lastValue':_0x7b457f['lastValue'],'result':_0x2ca9a6});}function P(_0x136121){const _0x5612bc=_0xe478be;var _0x529acc,_0x342249,_0x40f860;let _0x5f3ea6=_0x136121[_0x5612bc(0x1f0)],_0x140ce0=_0x136121[_0x5612bc(0x138)][_0x5612bc(0x18c)]['trim']()?_0x5f3ea6['stale']||_0x5f3ea6[_0x5612bc(0x1e6)]==null?_0x5612bc(0x1a3):((_0x529acc=_0x136121['liveResult'])==null?void 0x0:_0x529acc[_0x5612bc(0x139)])===r[_0x5612bc(0x166)][_0x5612bc(0x1fb)]?'error':_0x5612bc(0x181):_0x5612bc(0x204);return{..._0x5f3ea6,'status':_0x140ce0,'value':(_0x342249=_0x5f3ea6[_0x5612bc(0x1e6)])==null?void 0x0:_0x342249['v'],'valueType':((_0x40f860=_0x5f3ea6['cell'])==null?void 0x0:_0x40f860['t'])??void 0x0};}function ye(_0x705aa2,_0x8414bf){const _0x5c2a02=_0xe478be;var _0x354c12,_0x59962f,_0xa62f0c,_0x2838a3;return _0x705aa2[_0x5c2a02(0x174)]===_0x8414bf[_0x5c2a02(0x174)]&&_0x705aa2[_0x5c2a02(0x19b)]===_0x8414bf[_0x5c2a02(0x19b)]&&_0x705aa2['pattern']===_0x8414bf[_0x5c2a02(0xd9)]&&_0x705aa2[_0x5c2a02(0x1b1)]===_0x8414bf[_0x5c2a02(0x1b1)]&&_0x705aa2['stale']===_0x8414bf[_0x5c2a02(0x187)]&&((_0x354c12=_0x705aa2['cell'])==null?void 0x0:_0x354c12['t'])===((_0x59962f=_0x8414bf[_0x5c2a02(0x1e6)])==null?void 0x0:_0x59962f['t'])&&Object['is']((_0xa62f0c=_0x705aa2[_0x5c2a02(0x1e6)])==null?void 0x0:_0xa62f0c['v'],(_0x2838a3=_0x8414bf[_0x5c2a02(0x1e6)])==null?void 0x0:_0x2838a3['v']);}const F={'id':_0xe478be(0x10a),'type':t['CommandType'][_0xe478be(0x1c3)],'handler':(_0x5c4cd7,_0x2e64c2)=>!(_0x2e64c2!=null&&_0x2e64c2[_0xe478be(0x1f9)])||!_0x2e64c2[_0xe478be(0x211)]||!_0x2e64c2[_0xe478be(0x138)]?!0x1:_0x5c4cd7[_0xe478be(0x1dd)](O)[_0xe478be(0x1c0)](_0x2e64c2['unitId'],_0x2e64c2['rangeId'],_0x2e64c2[_0xe478be(0x138)])},I={'id':_0xe478be(0x1b8),'type':t[_0xe478be(0xfa)][_0xe478be(0x1c3)],'handler':(_0x427228,_0x37c151)=>!(_0x37c151!=null&&_0x37c151['unitId'])||!_0x37c151[_0xe478be(0x211)]?!0x1:_0x427228[_0xe478be(0x1dd)](O)[_0xe478be(0x117)](_0x37c151[_0xe478be(0x1f9)],_0x37c151[_0xe478be(0x211)])},L={'id':_0xe478be(0x1e2),'type':t[_0xe478be(0xfa)]['MUTATION'],'handler':(_0x22b3bd,_0x5f2a79)=>!(_0x5f2a79!=null&&_0x5f2a79['unitId'])||!_0x5f2a79[_0xe478be(0x10b)]?!0x1:_0x22b3bd[_0xe478be(0x1dd)](O)[_0xe478be(0x14c)](_0x5f2a79[_0xe478be(0x1f9)],_0x5f2a79[_0xe478be(0x10b)])},R={'id':_0xe478be(0x1cb),'type':t['CommandType'][_0xe478be(0x1c3)],'handler':(_0x28e497,_0x3c7bae)=>{const _0x5b9f3c=_0xe478be;if(!(_0x3c7bae!=null&&_0x3c7bae['unitId'])||!_0x3c7bae[_0x5b9f3c(0x1cf)][_0x5b9f3c(0xf2)])return!0x1;let _0x4d1014=_0x28e497[_0x5b9f3c(0x1dd)](O),_0xed4cc8=_0x28e497[_0x5b9f3c(0x1dd)](e[_0x5b9f3c(0x1f3)]),_0x56eddb=_0x4d1014[_0x5b9f3c(0x131)](_0x3c7bae['unitId']);if(!_0x56eddb)return!0x1;let _0x4c9ccd=t['Tools']['deepClone'](_0x56eddb),_0x14f455=!0x1;for(let _0x36fbb8 of _0x3c7bae[_0x5b9f3c(0x1cf)]){var _0x2982c1,_0x2b4d1e,_0x5f1a48,_0x56db9e;let _0x12bcd4=_0x4c9ccd['formulas'][_0x36fbb8['rangeId']];!_0x12bcd4||_0x12bcd4[_0x5b9f3c(0x18c)]!==_0x36fbb8[_0x5b9f3c(0x198)]||((_0x2982c1=_0x12bcd4[_0x5b9f3c(0x127)])==null?void 0x0:_0x2982c1[_0x5b9f3c(0xd9)])!==_0x36fbb8[_0x5b9f3c(0x1fa)]||_0xed4cc8[_0x5b9f3c(0x156)](_0x3c7bae[_0x5b9f3c(0x1f9)])!==_0x36fbb8[_0x5b9f3c(0x20b)]||(((_0x2b4d1e=_0x12bcd4[_0x5b9f3c(0x1dc)])==null?void 0x0:_0x2b4d1e['v'])!==_0x36fbb8['lastValue']['v']||((_0x5f1a48=_0x12bcd4['lastValue'])==null?void 0x0:_0x5f1a48['t'])!==_0x36fbb8[_0x5b9f3c(0x1dc)]['t']||((_0x56db9e=_0x12bcd4[_0x5b9f3c(0x1dc)])==null?void 0x0:_0x56db9e[_0x5b9f3c(0xd9)])!==_0x36fbb8[_0x5b9f3c(0x1dc)][_0x5b9f3c(0xd9)])&&(_0x12bcd4[_0x5b9f3c(0x1dc)]=t['Tools'][_0x5b9f3c(0x15e)](_0x36fbb8['lastValue']),_0x14f455=!0x0);}return!_0x14f455||_0x4d1014['setResource'](_0x3c7bae['unitId'],_0x4c9ccd);}},z={'id':_0xe478be(0x13e),'type':t[_0xe478be(0xfa)][_0xe478be(0x1d5)],'handler':(_0x1aeed2,_0x5c1201)=>{const _0x3eefac=_0xe478be;if(!(_0x5c1201!=null&&_0x5c1201[_0x3eefac(0x18c)]['trim']()))return!0x1;let _0x434235=K(_0x1aeed2,_0x5c1201['unitId'],'');if(!_0x434235)return!0x1;let _0x32c763=xe(_0x5c1201[_0x3eefac(0x135)],_0x434235[_0x3eefac(0xd6)],be(_0x1aeed2,_0x434235[_0x3eefac(0x1f9)]));if(!_0x32c763)return!0x1;let _0x19094d=Se(_0x1aeed2,_0x434235[_0x3eefac(0x1f9)],_0x5c1201[_0x3eefac(0x18c)],_0x5c1201['externalReferences']??[]);if(!_0x19094d)return!0x1;let _0xd980a7=Ce(_0x434235['body'],_0x434235['model'],_0x434235[_0x3eefac(0x1f9)]),_0x32f28e=we({'documentData':_0x434235[_0x3eefac(0x195)],'resource':_0x434235[_0x3eefac(0x10b)],'rangeId':_0xd980a7,'config':{'formula':_0x5c1201[_0x3eefac(0x18c)],..._0x5c1201[_0x3eefac(0x127)]?{'numberFormat':_0x5c1201[_0x3eefac(0x127)]}:null},'startOffset':_0x32c763[_0x3eefac(0x185)],'endOffset':_0x32c763[_0x3eefac(0x163)]});if(!_0x32f28e)return!0x1;let _0x57d0d5=(0x0,e['buildUpsertHostExternalReferenceMutations'])(_0x1aeed2,_0x434235['unitId'],_0x19094d);return!_0x57d0d5||!q({'accessor':_0x1aeed2,'document':_0x434235['document'],'unitId':_0x434235['unitId'],'trigger':z['id'],'rangeId':_0xd980a7,'previousResource':_0x434235[_0x3eefac(0x10b)],'nextResource':_0x32f28e['nextResource'],'previousDocumentData':_0x434235['documentData'],'nextDocumentData':_0x32f28e[_0x3eefac(0x1aa)],'cursorOffset':_0x32f28e['cursorOffset'],'externalMutations':_0x57d0d5})?!0x1:{'rangeId':_0xd980a7,'startOffset':_0x32f28e[_0x3eefac(0x183)]-0x1,'endOffset':_0x32f28e[_0x3eefac(0x183)]};}},B={'id':'docs-formula.command.update','type':t[_0xe478be(0xfa)][_0xe478be(0x1d5)],'handler':(_0x414c9b,_0xff55c4)=>{const _0x2fa79b=_0xe478be;if(!(_0xff55c4!=null&&_0xff55c4['rangeId'])||!_0xff55c4[_0x2fa79b(0x18c)]['trim']())return!0x1;let _0x1b58b6=K(_0x414c9b,_0xff55c4[_0x2fa79b(0x1f9)],''),_0x22273d=_0x1b58b6==null?void 0x0:_0x1b58b6[_0x2fa79b(0x20c)][_0x2fa79b(0x16c)](_0x1b58b6[_0x2fa79b(0x1f9)],_0xff55c4[_0x2fa79b(0x211)]),_0x3e1925=_0x1b58b6?_(_0x1b58b6['documentData'][_0x2fa79b(0xd6)],_0xff55c4['rangeId']):void 0x0;if(!_0x1b58b6||!_0x22273d||!_0x3e1925)return!0x1;let _0x3daff5=Se(_0x414c9b,_0x1b58b6[_0x2fa79b(0x1f9)],_0xff55c4['formula'],_0xff55c4['externalReferences']??[]);if(!_0x3daff5)return!0x1;let _0x5a1ad9=(0x0,e[_0x2fa79b(0x122)])(_0x414c9b,_0x1b58b6[_0x2fa79b(0x1f9)],_0x3daff5);if(!_0x5a1ad9)return!0x1;let _0x161da3=je(_0x1b58b6[_0x2fa79b(0x10b)]);return _0x161da3[_0x2fa79b(0x197)][_0xff55c4[_0x2fa79b(0x211)]]={'formula':_0xff55c4['formula'],..._0xff55c4[_0x2fa79b(0x127)]?{'numberFormat':_0xff55c4[_0x2fa79b(0x127)]}:_0x22273d[_0x2fa79b(0x127)]?{'numberFormat':_0x22273d[_0x2fa79b(0x127)]}:null},q({'accessor':_0x414c9b,'document':_0x1b58b6['document'],'unitId':_0x1b58b6[_0x2fa79b(0x1f9)],'trigger':B['id'],'rangeId':_0xff55c4[_0x2fa79b(0x211)],'previousResource':_0x1b58b6[_0x2fa79b(0x10b)],'nextResource':_0x161da3,'cursorOffset':_0x3e1925[_0x2fa79b(0x1fd)]+0x1,'externalMutations':_0x5a1ad9});}},V={'id':_0xe478be(0x1ca),'type':t['CommandType'][_0xe478be(0x1d5)],'handler':(_0x277562,_0x2f0ed3)=>{const _0x253d71=_0xe478be;if(!(_0x2f0ed3!=null&&_0x2f0ed3[_0x253d71(0x211)]))return!0x1;let _0x283083=K(_0x277562,_0x2f0ed3[_0x253d71(0x1f9)],''),_0x59ebd9=_0x283083==null?void 0x0:_0x283083[_0x253d71(0x20c)]['getFormula'](_0x283083[_0x253d71(0x1f9)],_0x2f0ed3[_0x253d71(0x211)]),_0x1f61cb=_0x283083?_(_0x283083[_0x253d71(0x195)][_0x253d71(0xd6)],_0x2f0ed3[_0x253d71(0x211)]):void 0x0;if(!_0x283083||!_0x59ebd9||!_0x1f61cb)return!0x1;let _0x161b87=je(_0x283083[_0x253d71(0x10b)]);return _0x161b87[_0x253d71(0x197)][_0x2f0ed3[_0x253d71(0x211)]]={..._0x59ebd9,..._0x2f0ed3['numberFormat']?{'numberFormat':_0x2f0ed3['numberFormat']}:null},_0x2f0ed3[_0x253d71(0x127)]||delete _0x161b87[_0x253d71(0x197)][_0x2f0ed3[_0x253d71(0x211)]][_0x253d71(0x127)],q({'accessor':_0x277562,'document':_0x283083[_0x253d71(0x1d4)],'unitId':_0x283083['unitId'],'trigger':V['id'],'rangeId':_0x2f0ed3[_0x253d71(0x211)],'previousResource':_0x283083['resource'],'nextResource':_0x161b87,'cursorOffset':_0x1f61cb[_0x253d71(0x1fd)]+0x1,'externalMutations':{}});}},H={'id':'docs-formula.command.remove','type':t[_0xe478be(0xfa)][_0xe478be(0x1d5)],'handler':(_0x492828,_0x242b77)=>G(_0x492828,_0x242b77,'',H['id'])},U={'id':_0xe478be(0x19d),'type':t[_0xe478be(0xfa)][_0xe478be(0x1d5)],'handler':(_0x2c7999,_0xdfdc2d)=>G(_0x2c7999,_0xdfdc2d,(_0xdfdc2d==null?void 0x0:_0xdfdc2d[_0xe478be(0x174)])??'',U['id'])},W={'id':_0xe478be(0x1a0),'type':t[_0xe478be(0xfa)][_0xe478be(0x1d5)],'handler':(_0x5b770e,_0x4c45f0)=>{const _0x495e1e=_0xe478be;if(!(_0x4c45f0!=null&&_0x4c45f0['rangeId']))return!0x1;let _0x2e1361=K(_0x5b770e,_0x4c45f0[_0x495e1e(0x1f9)],'');if(!_0x2e1361)return!0x1;let _0x4e0672=_0x5b770e['get'](j)[_0x495e1e(0x215)]({'unitId':_0x2e1361[_0x495e1e(0x1f9)],'rangeId':_0x4c45f0[_0x495e1e(0x211)]});return _0x4e0672?G(_0x5b770e,_0x4c45f0,_0x4e0672[_0x495e1e(0x174)],W['id']):!0x1;}};function G(_0x2bedee,_0x30d487,_0x317baf,_0x309b11){const _0x33fa93=_0xe478be;if(!(_0x30d487!=null&&_0x30d487[_0x33fa93(0x211)]))return!0x1;let _0x2e534f=K(_0x2bedee,_0x30d487[_0x33fa93(0x1f9)],'');if(!_0x2e534f)return!0x1;let _0x381ffb=h({'documentData':_0x2e534f['documentData'],'resource':_0x2e534f[_0x33fa93(0x10b)],'rangeId':_0x30d487['rangeId'],'text':_0x317baf});return _0x381ffb?q({'accessor':_0x2bedee,'document':_0x2e534f[_0x33fa93(0x1d4)],'unitId':_0x2e534f['unitId'],'trigger':_0x309b11,'rangeId':_0x30d487[_0x33fa93(0x211)],'previousResource':_0x2e534f[_0x33fa93(0x10b)],'nextResource':_0x381ffb[_0x33fa93(0x184)],'previousDocumentData':_0x2e534f[_0x33fa93(0x195)],'nextDocumentData':_0x381ffb[_0x33fa93(0x1aa)],'cursorOffset':_0x381ffb[_0x33fa93(0x183)],'externalMutations':{}}):!0x1;}function K(_0x5123d3,_0x4a341d,_0x5a7b21){const _0x1b0036=_0xe478be;if(_0x5a7b21)return null;let _0x3db312=_0x5123d3[_0x1b0036(0x1dd)](t['IUniverInstanceService']),_0x483582=(_0x4a341d?_0x3db312[_0x1b0036(0x168)](_0x4a341d,t['UniverInstanceType'][_0x1b0036(0x1ea)]):_0x3db312[_0x1b0036(0x214)](t[_0x1b0036(0x142)][_0x1b0036(0x1ea)]))??null;if(!_0x483582)return null;let _0xcb88ed=_0x483582[_0x1b0036(0x206)](),_0x3abff1=_0xcb88ed[_0x1b0036(0xd6)];if(_0xcb88ed[_0x1b0036(0x15a)]||!_0x3abff1)return null;let _0x32c926=_0x5123d3[_0x1b0036(0x1dd)](O);return _0x32c926['getLoadError'](_0x483582[_0x1b0036(0x178)]())?null:{'document':_0x483582,'body':_0x3abff1,'documentData':_0xcb88ed,'model':_0x32c926,'resource':_0x32c926['getResource'](_0x483582['getUnitId']())??c(),'unitId':_0x483582['getUnitId']()};}function be(_0x2c188e,_0x1f4533){const _0x512ed1=_0xe478be;var _0x37a4f8;return(_0x37a4f8=_0x2c188e['get'](n['DocSelectionManagerService'])[_0x512ed1(0x1eb)]({'subUnitId':_0x1f4533,'unitId':_0x1f4533}))==null?void 0x0:_0x37a4f8[0x0];}function _0x57a9(_0x4d0077,_0x280949){_0x4d0077=_0x4d0077-0xd2;const _0x1dff19=_0x1dff();let _0x57a9ae=_0x1dff19[_0x4d0077];return _0x57a9ae;}function xe(_0x3172f5,_0x3d932f,_0x25fe0d){const _0x471213=_0xe478be;if((_0x3172f5==null?void 0x0:_0x3172f5[_0x471213(0x20a)])===_0x471213(0x120)){var _0x1c79bc;let _0x41c662=((_0x1c79bc=_0x3d932f[_0x471213(0x1ac)])==null?void 0x0:_0x1c79bc[_0x471213(0x17d)](_0x218258=>_0x218258['paragraphId']===_0x3172f5[_0x471213(0x147)]))??[];if(_0x41c662[_0x471213(0xf2)]!==0x1)return null;let _0x1ad3b7=_0x41c662[0x0],_0x3a7c71=(0x0,t['getParagraphContentStartOffset'])(_0x3d932f,_0x1ad3b7),_0x5dd071=_0x1ad3b7['startIndex']-_0x3a7c71,_0x581308=_0x3172f5['position']===_0x471213(0x1cc)?_0x5dd071:_0x3172f5[_0x471213(0x1e5)];if(!Number[_0x471213(0x105)](_0x581308)||_0x581308<0x0||_0x581308>_0x5dd071)return null;let _0x53bb42=_0x3a7c71+_0x581308;return{'startOffset':_0x53bb42,'endOffset':_0x53bb42};}if((_0x3172f5==null?void 0x0:_0x3172f5[_0x471213(0x20a)])==='range')return!Number[_0x471213(0x105)](_0x3172f5[_0x471213(0x185)])||!Number[_0x471213(0x105)](_0x3172f5[_0x471213(0x163)])?null:{'startOffset':Math[_0x471213(0xed)](_0x3172f5['startOffset'],_0x3172f5[_0x471213(0x163)]),'endOffset':Math[_0x471213(0xee)](_0x3172f5['startOffset'],_0x3172f5[_0x471213(0x163)])};let _0x1149f4=(_0x3172f5==null?void 0x0:_0x3172f5[_0x471213(0x20a)])===_0x471213(0x123)?_0x3172f5['selection']:_0x25fe0d;return!_0x1149f4||_0x1149f4[_0x471213(0x1e3)]?null:{'startOffset':Math[_0x471213(0xed)](_0x1149f4['startOffset'],_0x1149f4['endOffset']),'endOffset':Math[_0x471213(0xee)](_0x1149f4[_0x471213(0x185)],_0x1149f4[_0x471213(0x163)])};}function Se(_0x5581d6,_0x1611f3,_0xa5c99b,_0x51a383){const _0x3ef1c1=_0xe478be;let _0x4b4686=_0x5581d6['get'](r[_0x3ef1c1(0x1e1)]),_0x18b54f=_0xa5c99b[_0x3ef1c1(0x1fe)]('=')?_0xa5c99b[_0x3ef1c1(0x14d)](0x1):_0xa5c99b,_0x3cad81=_0x4b4686[_0x3ef1c1(0x19a)](_0x18b54f);if(!_0x3cad81)return null;let _0x34b7aa=_0x5581d6[_0x3ef1c1(0x1dd)](e[_0x3ef1c1(0x1f3)]),_0x569ac7=(0x0,e[_0x3ef1c1(0x18a)])({'qualifiers':(0x0,e[_0x3ef1c1(0x1f4)])(_0x3cad81),'explicitReferences':_0x51a383??[],'resolveBinding':_0x3c3f3d=>_0x34b7aa[_0x3ef1c1(0x112)](_0x1611f3,_0x3c3f3d)});return _0x569ac7[_0x3ef1c1(0x139)]===_0x3ef1c1(0x17c)?_0x569ac7[_0x3ef1c1(0x17b)]:null;}function Ce(_0x22e596,_0x316525,_0x47f811){const _0x56c072=_0xe478be;var _0x42a7fa;let _0x23d226=(0x0,t[_0x56c072(0xd2)])(0x6);for(;_0x22e596!=null&&(_0x42a7fa=_0x22e596[_0x56c072(0x1a8)])!=null&&_0x42a7fa[_0x56c072(0x1e9)](_0x5b9129=>_0x5b9129[_0x56c072(0x211)]===_0x23d226)||_0x316525[_0x56c072(0x16c)](_0x47f811,_0x23d226);)_0x23d226=(0x0,t[_0x56c072(0xd2)])(0x6);return _0x23d226;}function we(_0x1ee463){try{return te(_0x1ee463);}catch(_0x4ce54a){if(_0x4ce54a instanceof m)return null;throw _0x4ce54a;}}function Te(_0x5e263){const _0x510625=_0xe478be;let _0x3703e5=_0x5e263[_0x510625(0x1d9)]&&_0x5e263[_0x510625(0x1aa)]?De(_0x5e263[_0x510625(0x1d4)],_0x5e263[_0x510625(0x1f9)],_0x5e263['previousDocumentData'],_0x5e263['nextDocumentData'],_0x5e263[_0x510625(0x183)],_0x5e263[_0x510625(0x191)]):null;return _0x5e263['previousDocumentData']&&_0x5e263['nextDocumentData']&&!_0x3703e5?null:{'documentRedo':_0x3703e5,'resourceRedo':{'id':L['id'],'params':{'unitId':_0x5e263[_0x510625(0x1f9)],'resource':_0x5e263[_0x510625(0x184)]}},'resourceUndo':{'id':L['id'],'params':{'unitId':_0x5e263[_0x510625(0x1f9)],'resource':_0x5e263[_0x510625(0x114)]}}};}function Ee(_0x3f9da7,_0x521ee0,_0x37238c,_0x1725e0){const _0x1daa44=_0xe478be;_0x1725e0[_0x1daa44(0x154)]({'id':_0x3f9da7['trigger']+':'+_0x3f9da7[_0x1daa44(0x211)],'unitID':_0x3f9da7['unitId'],'redoMutations':[..._0x3f9da7[_0x1daa44(0x16f)][_0x1daa44(0x151)]?[_0x3f9da7[_0x1daa44(0x16f)][_0x1daa44(0x151)]]:[],..._0x521ee0[_0x1daa44(0x16d)]?[_0x521ee0['documentRedo']]:[],_0x521ee0[_0x1daa44(0x11f)]],'undoMutations':[_0x521ee0[_0x1daa44(0x1f2)],..._0x37238c?[_0x37238c]:[],..._0x3f9da7[_0x1daa44(0x16f)]['undoMutation']?[_0x3f9da7['externalMutations'][_0x1daa44(0x205)]]:[]]});}function q(_0x154f6c){const _0x5bc81f=_0xe478be;let _0x3f10d4=_0x154f6c['accessor'][_0x5bc81f(0x1dd)](t['ICommandService']),_0x51bf31=_0x154f6c['accessor'][_0x5bc81f(0x1dd)](t['IUndoRedoService']),_0x1c9398=_0x154f6c[_0x5bc81f(0x137)][_0x5bc81f(0x1dd)](n[_0x5bc81f(0x1ce)]),_0x31b1fa=Te(_0x154f6c);if(!_0x31b1fa)return!0x1;let _0x3f9762=!0x1,_0x1bbfad=null,_0x1946ff=!0x1;try{if(_0x154f6c['externalMutations'][_0x5bc81f(0x151)]){if(!_0x3f10d4[_0x5bc81f(0xdb)](_0x154f6c[_0x5bc81f(0x16f)][_0x5bc81f(0x151)]['id'],_0x154f6c[_0x5bc81f(0x16f)][_0x5bc81f(0x151)][_0x5bc81f(0x14b)]))return!0x1;_0x3f9762=!0x0;}if(_0x31b1fa[_0x5bc81f(0x16d)]){let _0x263fb8=_0x3f10d4[_0x5bc81f(0xdb)](_0x31b1fa[_0x5bc81f(0x16d)]['id'],_0x31b1fa[_0x5bc81f(0x16d)]['params']);if(!_0x263fb8)return J(_0x3f10d4,_0x154f6c[_0x5bc81f(0x16f)],_0x3f9762),!0x1;_0x1bbfad={'id':n[_0x5bc81f(0x192)]['id'],'params':{..._0x263fb8,'noHistory':!0x0,'noNeedSetTextRange':!0x0,'segmentId':''}};}if(!_0x3f10d4[_0x5bc81f(0xdb)](_0x31b1fa[_0x5bc81f(0x11f)]['id'],_0x31b1fa[_0x5bc81f(0x11f)][_0x5bc81f(0x14b)]))return Oe(_0x3f10d4,_0x1bbfad),J(_0x3f10d4,_0x154f6c['externalMutations'],_0x3f9762),!0x1;_0x1946ff=!0x0,Ee(_0x154f6c,_0x31b1fa,_0x1bbfad,_0x51bf31);}catch(_0x5e594c){throw _0x1946ff&&_0x3f10d4[_0x5bc81f(0xdb)](_0x31b1fa[_0x5bc81f(0x1f2)]['id'],_0x31b1fa[_0x5bc81f(0x1f2)]['params']),Oe(_0x3f10d4,_0x1bbfad),J(_0x3f10d4,_0x154f6c['externalMutations'],_0x3f9762),_0x5e594c;}return _0x1c9398[_0x5bc81f(0x12a)]([{'startOffset':_0x154f6c[_0x5bc81f(0x183)],'endOffset':_0x154f6c['cursorOffset'],'segmentId':''}],{'unitId':_0x154f6c[_0x5bc81f(0x1f9)],'subUnitId':_0x154f6c[_0x5bc81f(0x1f9)]},!0x1,{[n[_0x5bc81f(0x1ff)]]:!0x0}),!0x0;}function De(_0x80a320,_0x342a12,_0xd8cbae,_0x572970,_0x5bbc96,_0x5229d2){const _0x47a05f=_0xe478be;let _0x2cb72e=ke(_0xd8cbae,_0x572970,(0x0,t[_0x47a05f(0x173)])(_0x80a320,''));return _0x2cb72e?{'id':n[_0x47a05f(0x192)]['id'],'params':{'unitId':_0x342a12,'actions':_0x2cb72e,'segmentId':'','textRanges':[{'startOffset':_0x5bbc96,'endOffset':_0x5bbc96,'collapsed':!0x0,'segmentId':''}],'isEditing':!0x1,'noHistory':!0x0,'noNeedSetTextRange':!0x0,'trigger':_0x5229d2}}:null;}function Oe(_0x1f027c,_0xf4d0e6){const _0x4f63db=_0xe478be;_0xf4d0e6&&_0x1f027c[_0x4f63db(0xdb)](_0xf4d0e6['id'],_0xf4d0e6[_0x4f63db(0x14b)]);}function J(_0x197d9b,_0x476739,_0x5d8f78){const _0x34599c=_0xe478be;_0x5d8f78&&_0x476739['undoMutation']&&_0x197d9b[_0x34599c(0xdb)](_0x476739[_0x34599c(0x205)]['id'],_0x476739[_0x34599c(0x205)][_0x34599c(0x14b)]);}function ke(_0x1f313f,_0xba868b,_0x166290){const _0x549f8a=_0xe478be;let _0xf17a12=_0x1f313f['body'],_0x36f8b5=_0xba868b[_0x549f8a(0xd6)],_0x5a1547=Ae(_0xf17a12==null?void 0x0:_0xf17a12[_0x549f8a(0x212)],_0x36f8b5==null?void 0x0:_0x36f8b5[_0x549f8a(0x212)]);if(!_0x5a1547||!_0x36f8b5)return null;let _0x12f9bd=new t[(_0x549f8a(0x1ec))]();return _0x12f9bd[_0x549f8a(0x1d6)](_0x5a1547[_0x549f8a(0x12b)]),_0x5a1547[_0x549f8a(0x1bc)]>0x0&&_0x12f9bd[_0x549f8a(0x1ee)](_0x5a1547['insertLength'],(0x0,t[_0x549f8a(0x217)])(_0x36f8b5,_0x5a1547[_0x549f8a(0x12b)],_0x5a1547['start']+_0x5a1547[_0x549f8a(0x1bc)],!0x1)),_0x5a1547['deleteLength']>0x0&&_0x12f9bd[_0x549f8a(0xe1)](_0x5a1547['deleteLength']),t[_0x549f8a(0xfd)][_0x549f8a(0x1be)]()[_0x549f8a(0x1a1)](_0x12f9bd['serialize'](),_0x166290);}function Ae(_0x362afd,_0x4ed70e){const _0x41b771=_0xe478be;if(_0x362afd==null||_0x4ed70e==null||_0x362afd===_0x4ed70e)return null;let _0x92fe33=0x0;for(;_0x92fe33<_0x362afd[_0x41b771(0xf2)]&&_0x92fe33<_0x4ed70e['length']&&_0x362afd[_0x92fe33]===_0x4ed70e[_0x92fe33];)_0x92fe33+=0x1;let _0x126dec=_0x362afd[_0x41b771(0xf2)],_0x47ba66=_0x4ed70e[_0x41b771(0xf2)];for(;_0x126dec>_0x92fe33&&_0x47ba66>_0x92fe33&&_0x362afd[_0x126dec-0x1]===_0x4ed70e[_0x47ba66-0x1];)--_0x126dec,--_0x47ba66;return{'start':_0x92fe33,'deleteLength':_0x126dec-_0x92fe33,'insertLength':_0x47ba66-_0x92fe33};}function je(_0x30b56b){const _0x14f288=_0xe478be;return{'schemaVersion':0x1,'formulas':Object[_0x14f288(0x133)](Object[_0x14f288(0xf4)](_0x30b56b[_0x14f288(0x197)])[_0x14f288(0x1f7)](([_0x373759,_0x313672])=>[_0x373759,{..._0x313672,..._0x313672[_0x14f288(0x127)]?{'numberFormat':{..._0x313672[_0x14f288(0x127)]}}:null,..._0x313672[_0x14f288(0x1dc)]?{'lastValue':{..._0x313672[_0x14f288(0x1dc)]}}:null}]))};}let Y=class extends t[_0xe478be(0x1e7)]{constructor(_0x412afc,_0xe118d0,_0x1a2d9e,_0x228a42){const _0x20d8bf=_0xe478be;super(),this[_0x20d8bf(0x1f1)]=_0x412afc,this[_0x20d8bf(0x14a)]=_0xe118d0,this[_0x20d8bf(0x1a5)]=_0x1a2d9e,this[_0x20d8bf(0x13b)]=_0x228a42,D(this,'_pendingUnitIds',new Set()),D(this,_0x20d8bf(0xfc),!0x1),D(this,_0x20d8bf(0xe0),!0x1),this['_instanceService'][_0x20d8bf(0x118)](t['UniverInstanceType']['UNIVER_DOC'])[_0x20d8bf(0x108)](_0x99f857=>this[_0x20d8bf(0x13b)][_0x20d8bf(0x140)](_0x99f857)),this[_0x20d8bf(0xff)](this[_0x20d8bf(0x1a5)][_0x20d8bf(0x145)][_0x20d8bf(0x1b4)](({unitId:_0x28dc05})=>this[_0x20d8bf(0x177)](_0x28dc05))),this[_0x20d8bf(0xff)](this['_instanceService']['unitAdded$']['subscribe'](({unit:_0x5b6f57})=>{const _0x586e5d=_0x20d8bf;_0x5b6f57[_0x586e5d(0x20a)]===t[_0x586e5d(0x142)][_0x586e5d(0x1ea)]&&this[_0x586e5d(0x200)](_0x5b6f57[_0x586e5d(0x178)]());})),this[_0x20d8bf(0xff)](this[_0x20d8bf(0x1f1)][_0x20d8bf(0x19f)][_0x20d8bf(0x1b4)](_0x2bdd18=>{const _0x28dd11=_0x20d8bf;this['_service'][_0x28dd11(0x164)](_0x2bdd18[_0x28dd11(0x178)]());})),this[_0x20d8bf(0xff)](this[_0x20d8bf(0x14a)]['onCommandExecuted'](_0x5d45d1=>{const _0x44c1c7=_0x20d8bf;if(_0x5d45d1['id']===n['RichTextEditingMutation']['id']&&Me(_0x5d45d1['params'])){let _0x5a0212=_0x5d45d1[_0x44c1c7(0x14b)];_0x5a0212[_0x44c1c7(0x1e3)]||this['_syncUnit'](_0x5a0212[_0x44c1c7(0x1f9)]);}}));}[_0xe478be(0x1c1)](){const _0x19cdc3=_0xe478be;this[_0x19cdc3(0xe0)]=!0x0,super['dispose']();}[_0xe478be(0x200)](_0x2bba50){const _0x19e12e=_0xe478be;this[_0x19e12e(0x216)][_0x19e12e(0x1d7)](_0x2bba50),!this[_0x19e12e(0xfc)]&&(this[_0x19e12e(0xfc)]=!0x0,queueMicrotask(()=>{const _0xa4539=_0x19e12e;if(this[_0xa4539(0xfc)]=!0x1,this[_0xa4539(0xe0)])return;let _0x4a8ce3=Array[_0xa4539(0x17a)](this[_0xa4539(0x216)]);this[_0xa4539(0x216)][_0xa4539(0xd4)](),_0x4a8ce3[_0xa4539(0x108)](_0x1a6e42=>this[_0xa4539(0x177)](_0x1a6e42));}));}[_0xe478be(0x177)](_0x5f0a14){const _0x5e1c94=_0xe478be;let _0x429c5b=this[_0x5e1c94(0x1f1)]['getUnit'](_0x5f0a14,t[_0x5e1c94(0x142)][_0x5e1c94(0x1ea)]);_0x429c5b&&this[_0x5e1c94(0x13b)]['syncUnit'](_0x429c5b);}};Y=A([k(0x0,t['IUniverInstanceService']),k(0x1,t[_0xe478be(0x202)]),k(0x2,(0x0,t['Inject'])(O)),k(0x3,(0x0,t[_0xe478be(0x194)])(j))],Y);function Me(_0x742815){const _0x3db92b=_0xe478be;return typeof _0x742815==_0x3db92b(0xef)&&!!_0x742815&&_0x3db92b(0x1f9)in _0x742815&&typeof _0x742815[_0x3db92b(0x1f9)]==_0x3db92b(0xf8)&&(!('segmentId'in _0x742815)||_0x742815[_0x3db92b(0x1e3)]===void 0x0||typeof _0x742815[_0x3db92b(0x1e3)]=='string');}let X=class extends t['Disposable']{constructor(_0x5679d7,_0x3a3534){const _0x37aaba=_0xe478be;super(),this[_0x37aaba(0x171)]=_0x5679d7,this[_0x37aaba(0xd7)]=_0x3a3534,this[_0x37aaba(0xff)](this[_0x37aaba(0x171)]['registerPluginResource']({'pluginName':o,'businesses':[t[_0x37aaba(0x142)][_0x37aaba(0x1ea)]],'toJson':_0x1f9db7=>JSON['stringify'](this[_0x37aaba(0xd7)][_0x37aaba(0x18e)](_0x1f9db7)),'parseJson':_0x1f4f85=>JSON[_0x37aaba(0x172)](_0x1f4f85),'onLoad':(_0xd0d306,_0x2a6825)=>{const _0x50087c=_0x37aaba;this['_docFormulaModel'][_0x50087c(0x157)](_0xd0d306,_0x2a6825);},'onUnLoad':_0x5da3dd=>this[_0x37aaba(0xd7)][_0x37aaba(0x1ae)](_0x5da3dd)}));}};X=A([k(0x0,t[_0xe478be(0xda)]),k(0x1,(0x0,t['Inject'])(O))],X);var Ne='@univerjs-pro/docs-formula',Pe=_0xe478be(0x1bb);const Fe={};let Z=class extends t[_0xe478be(0x1e7)]{constructor(_0x37bce9,_0x275c67,_0x5ea471){const _0xf50704=_0xe478be;super(),this['_univerInstanceService']=_0x37bce9,this[_0xf50704(0x175)]=_0x275c67,this[_0xf50704(0xff)](_0x5ea471[_0xf50704(0x141)]({'resolve':(_0x326d15,_0x456657)=>{const _0x299859=_0xf50704;var _0x37a358;return((_0x37a358=_0x456657[_0x299859(0x1a8)])==null?void 0x0:_0x37a358[_0x299859(0x17d)](g)[_0x299859(0x1f7)](_0x2d37c1=>({'startOffset':_0x2d37c1[_0x299859(0xd3)],'endOffset':_0x2d37c1[_0x299859(0x1fd)]+0x1,'text':this[_0x299859(0x1ab)](_0x326d15,_0x2d37c1[_0x299859(0x211)])})))??[];}})),this[_0xf50704(0xff)](this[_0xf50704(0x175)][_0xf50704(0x1f5)]['subscribe'](({unitId:_0x57ff45})=>{const _0xc5c7e2=_0xf50704;_0x5ea471[_0xc5c7e2(0x148)](_0x57ff45);}));}[_0xe478be(0x1ab)](_0x1b5645,_0x3046df){const _0x2d44d4=_0xe478be;var _0x524379;return((_0x524379=this[_0x2d44d4(0x175)][_0x2d44d4(0x215)]({'unitId':_0x1b5645,'rangeId':_0x3046df}))==null?void 0x0:_0x524379[_0x2d44d4(0x174)])??'';}[_0xe478be(0x1c4)](_0x4a4337,_0x5a1210,_0x14cfc0){const _0x5c65ac=_0xe478be;var _0x3443a0;let _0x3c71c2=this[_0x5c65ac(0x12d)][_0x5c65ac(0x168)](_0x4a4337,t[_0x5c65ac(0x142)][_0x5c65ac(0x1ea)]),_0x30dafd=_0x3c71c2==null?void 0x0:_0x3c71c2['getBody']();if(!_0x30dafd)return'';let _0x309c5c=_0x30dafd[_0x5c65ac(0x212)]['slice'](_0x5a1210,_0x14cfc0),_0xfc68cf=((_0x3443a0=_0x30dafd[_0x5c65ac(0x1a8)])==null?void 0x0:_0x3443a0[_0x5c65ac(0x17d)](_0x1109bf=>g(_0x1109bf)&&_0x1109bf[_0x5c65ac(0xd3)]>=_0x5a1210&&_0x1109bf[_0x5c65ac(0x1fd)]<_0x14cfc0)['sort']((_0x5e4459,_0x58fd28)=>_0x58fd28['startIndex']-_0x5e4459['startIndex']))??[];for(let _0x269f7c of _0xfc68cf){let _0x4c3cb8=_0x269f7c[_0x5c65ac(0xd3)]-_0x5a1210,_0x59364b=_0x269f7c[_0x5c65ac(0x1fd)]-_0x5a1210+0x1;_0x309c5c=''+_0x309c5c['slice'](0x0,_0x4c3cb8)+this['resolveFormula'](_0x4a4337,_0x269f7c[_0x5c65ac(0x211)])+_0x309c5c[_0x5c65ac(0x14d)](_0x59364b);}return _0x309c5c;}[_0xe478be(0xd5)](_0x56c689){return Ie(_0x56c689);}[_0xe478be(0x1db)](_0xbf05e9,_0x5db530,_0x112c57={}){const _0x9387be=_0xe478be;var _0x274cb4;return re({'id':_0xbf05e9,'body':_0x5db530,'documentStyle':{}},(((_0x274cb4=_0x5db530[_0x9387be(0x1a8)])==null?void 0x0:_0x274cb4['filter'](g))??[])[_0x9387be(0x1f7)](_0x127a91=>({'rangeId':_0x127a91[_0x9387be(0x211)],'text':_0x112c57[_0x127a91[_0x9387be(0x211)]]??this[_0x9387be(0x1ab)](_0xbf05e9,_0x127a91['rangeId'])})))[_0x9387be(0xd6)]??{'dataStream':''};}};Z=A([k(0x0,t['IUniverInstanceService']),k(0x1,(0x0,t[_0xe478be(0x194)])(j)),k(0x2,(0x0,t[_0xe478be(0x194)])(n[_0xe478be(0x14f)]))],Z);function Ie(_0x5de382){const _0x4c2e41=_0xe478be;var _0x43c0bb,_0x1f5fb9;let _0x5070f9=Le(_0x5de382),_0x4b72f9=re(_0x5de382,(((_0x43c0bb=_0x5de382[_0x4c2e41(0xd6)])==null||(_0x43c0bb=_0x43c0bb['customRanges'])==null?void 0x0:_0x43c0bb['filter'](g))??[])[_0x4c2e41(0x1f7)](_0x3568cb=>({'rangeId':_0x3568cb[_0x4c2e41(0x211)],'text':Re(_0x5070f9==null?void 0x0:_0x5070f9[_0x4c2e41(0x197)][_0x3568cb['rangeId']])})));return _0x4b72f9['resources']=(_0x1f5fb9=_0x4b72f9['resources'])==null?void 0x0:_0x1f5fb9[_0x4c2e41(0x17d)](_0x62666d=>_0x62666d['name']!==o),_0x4b72f9;}function Le(_0x56baf2){const _0x59aa56=_0xe478be;var _0xd9051f;let _0x3ab450=(_0xd9051f=_0x56baf2[_0x59aa56(0x1de)])==null||(_0xd9051f=_0xd9051f[_0x59aa56(0x115)](_0x4fc82d=>_0x4fc82d[_0x59aa56(0x1e4)]===_0x59aa56(0x102)))==null?void 0x0:_0xd9051f[_0x59aa56(0x1da)];if(_0x3ab450)try{let _0x256afc=JSON[_0x59aa56(0x172)](_0x3ab450);return l(_0x256afc)?_0x256afc:void 0x0;}catch{return;}}function Re(_0x8ec1a6){const _0x4ac5c8=_0xe478be;return _0x8ec1a6?(0x0,e[_0x4ac5c8(0x209)])({'lastValue':_0x8ec1a6[_0x4ac5c8(0x1dc)],'numberFormat':_0x8ec1a6[_0x4ac5c8(0x127)]})[_0x4ac5c8(0x174)]:'';}let Q=class extends t[_0xe478be(0x1e7)]{constructor(_0x196ac5,_0x2c2fe2,_0x29ada6){const _0x48fbc1=_0xe478be;super(),this['_formulaService']=_0x196ac5,this[_0x48fbc1(0x1c5)]=_0x2c2fe2,this[_0x48fbc1(0xff)](_0x29ada6['registerProvider'](this));}[_0xe478be(0x1c7)](_0x4d13a7){const _0x554724=_0xe478be;let _0x208b6a=new Map();for(let _0x519bd9 of this[_0x554724(0x175)][_0x554724(0x11e)]()){var _0x19cebc;if(!this[_0x554724(0x1c5)][_0x554724(0x19c)](_0x519bd9[_0x554724(0x138)][_0x554724(0x18c)],_0x519bd9[_0x554724(0x1b5)])[_0x554724(0x129)])continue;let _0xdb0c75=(0x0,e[_0x554724(0x152)])(_0x519bd9[_0x554724(0x1b5)]),_0x4d6219=_0xdb0c75?(0x0,e[_0x554724(0x10d)])(_0xdb0c75):null;if(!_0x4d6219||ze(_0x519bd9[_0x554724(0x138)][_0x554724(0x1dc)],_0x4d6219))continue;let _0x4cd692=_0x208b6a[_0x554724(0x1dd)](_0x519bd9[_0x554724(0x1bd)][_0x554724(0x1f9)])??[];_0x4cd692[_0x554724(0xf6)]({'rangeId':_0x519bd9['identity']['rangeId'],'expectedFormula':_0x519bd9[_0x554724(0x138)][_0x554724(0x18c)],'expectedNumberFormat':(_0x19cebc=_0x519bd9[_0x554724(0x138)]['numberFormat'])==null?void 0x0:_0x19cebc[_0x554724(0xd9)],'expectedReferenceRevision':_0x519bd9['referenceRevision'],'lastValue':_0x4d6219}),_0x208b6a[_0x554724(0xdc)](_0x519bd9[_0x554724(0x1bd)][_0x554724(0x1f9)],_0x4cd692);}return Array[_0x554724(0x17a)](_0x208b6a,([_0x25ae5e,_0x3e505d])=>({'id':R['id'],'params':{'unitId':_0x25ae5e,'updates':_0x3e505d}}));}};Q=A([k(0x0,(0x0,t['Inject'])(j)),k(0x1,(0x0,t[_0xe478be(0x194)])(e[_0xe478be(0x146)])),k(0x2,(0x0,t[_0xe478be(0x194)])(e[_0xe478be(0x207)]))],Q);function ze(_0xad610,_0x6bef92){const _0xf4b0c6=_0xe478be;return(_0xad610==null?void 0x0:_0xad610['v'])===_0x6bef92['v']&&(_0xad610==null?void 0x0:_0xad610['t'])===_0x6bef92['t']&&(_0xad610==null?void 0x0:_0xad610[_0xf4b0c6(0xd9)])===_0x6bef92[_0xf4b0c6(0xd9)];}let $=class extends t[_0xe478be(0x1d3)]{constructor(_0xc43529=Fe,_0x2cce12,_0x2ae79c,_0x4f986b){const _0x127920=_0xe478be;super(),this[_0x127920(0x19e)]=_0xc43529,this[_0x127920(0x1d1)]=_0x2cce12,this[_0x127920(0x14a)]=_0x2ae79c,this['_configService']=_0x4f986b;let {..._0x4f0da5}=(0x0,t['merge'])({},Fe,this['_config']);this[_0x127920(0x144)][_0x127920(0x196)](_0x127920(0x11a),_0x4f0da5);}[_0xe478be(0x1c9)](){const _0x14f422=_0xe478be;this['_injector'][_0x14f422(0x1d7)]([O]),this['_injector'][_0x14f422(0x1d7)]([j]),this['_injector']['add']([X]),this[_0x14f422(0x1d1)]['add']([Y]),this['_injector'][_0x14f422(0x1d7)]([Q]),this[_0x14f422(0x1d1)][_0x14f422(0x1d7)]([Z]),(0x0,t[_0x14f422(0x1b9)])(this['_injector'],[[O],[X],[Y],[Q],[Z]]),[F,I,L,R,z,B,V,H,U,W][_0x14f422(0x108)](_0x360b0f=>this[_0x14f422(0xff)](this['_commandService'][_0x14f422(0x126)](_0x360b0f)));}};D($,_0xe478be(0x1ed),o),D($,_0xe478be(0x203),Ne),D($,_0xe478be(0x180),Pe),D($,'type',t[_0xe478be(0x142)][_0xe478be(0x1ea)]),$=A([(0x0,t[_0xe478be(0x1d8)])(a[_0xe478be(0x13c)],e[_0xe478be(0x1a2)],n[_0xe478be(0x128)]),k(0x1,(0x0,t[_0xe478be(0x194)])(t[_0xe478be(0x10f)])),k(0x2,t[_0xe478be(0x202)]),k(0x3,t['IConfigService'])],$),exports[_0xe478be(0x1c2)]=W,exports[_0xe478be(0xec)]=s,exports[_0xe478be(0x121)]='',exports[_0xe478be(0x102)]=o,exports[_0xe478be(0x11c)]=0x1,Object[_0xe478be(0x186)](exports,_0xe478be(0x12c),{'enumerable':!0x0,'get':function(){return Z;}}),Object[_0xe478be(0x186)](exports,_0xe478be(0x10c),{'enumerable':!0x0,'get':function(){return Y;}}),exports[_0xe478be(0xe6)]=O,Object[_0xe478be(0x186)](exports,_0xe478be(0x218),{'enumerable':!0x0,'get':function(){return X;}}),exports[_0xe478be(0x182)]=ve,Object[_0xe478be(0x186)](exports,_0xe478be(0x169),{'enumerable':!0x0,'get':function(){return j;}}),exports['InsertDocFormulaCommand']=z,exports[_0xe478be(0x116)]=m,exports['RemoveDocFormulaCommand']=H,exports['RemoveDocFormulaMutation']=I,exports[_0xe478be(0x110)]=U,exports[_0xe478be(0x210)]=R,exports[_0xe478be(0x119)]=F,exports['SetDocFormulaNumberFormatCommand']=V,exports[_0xe478be(0xf9)]=L,Object[_0xe478be(0x186)](exports,'UniverDocsFormulaPlugin',{'enumerable':!0x0,'get':function(){return $;}}),exports[_0xe478be(0x16e)]=B,exports[_0xe478be(0x15f)]=ie,exports[_0xe478be(0xf3)]=te,exports[_0xe478be(0xe2)]=h,exports[_0xe478be(0xe7)]=ne,exports[_0xe478be(0x213)]=c,exports[_0xe478be(0x190)]=Ie,exports[_0xe478be(0xdf)]=_,exports['isDocFormulaConfig']=u,exports[_0xe478be(0x1a6)]=g,exports[_0xe478be(0x20f)]=l,exports[_0xe478be(0x158)]=d;
1
+ const _0x5e00f3=_0xbbb1;(function(_0xecb808,_0x34e99e){const _0x3c1b99=_0xbbb1,_0x57e8ae=_0xecb808();while(!![]){try{const _0x524a7d=-parseInt(_0x3c1b99(0x139))/0x1*(parseInt(_0x3c1b99(0x18a))/0x2)+-parseInt(_0x3c1b99(0x103))/0x3+parseInt(_0x3c1b99(0x117))/0x4+parseInt(_0x3c1b99(0x130))/0x5*(-parseInt(_0x3c1b99(0x183))/0x6)+-parseInt(_0x3c1b99(0xcf))/0x7+-parseInt(_0x3c1b99(0x171))/0x8+parseInt(_0x3c1b99(0xde))/0x9*(parseInt(_0x3c1b99(0x15c))/0xa);if(_0x524a7d===_0x34e99e)break;else _0x57e8ae['push'](_0x57e8ae['shift']());}catch(_0x6870d){_0x57e8ae['push'](_0x57e8ae['shift']());}}}(_0x3704,0x96ed4),Object['defineProperty'](exports,Symbol[_0x5e00f3(0xfb)],{'value':_0x5e00f3(0x1a3)}));let e=require('@univerjs-pro/engine-formula'),t=require('@univerjs/core'),n=require('@univerjs/docs'),r=require('@univerjs/engine-formula'),i=require('rxjs'),a=require('@univerjs-pro/license');const o=_0x5e00f3(0x144),s=_0x5e00f3(0xd3);function c(){return{'schemaVersion':0x1,'formulas':{}};}function l(_0x50a318){const _0x5227fd=_0x5e00f3;return!_0x50a318||typeof _0x50a318!=_0x5227fd(0xec)||!f(_0x50a318,['schemaVersion','formulas'])||!(_0x5227fd(0x7c)in _0x50a318)||_0x50a318[_0x5227fd(0x7c)]!==0x1||!('formulas'in _0x50a318)||!_0x50a318['formulas']||typeof _0x50a318[_0x5227fd(0x1a1)]!=_0x5227fd(0xec)||Array[_0x5227fd(0x176)](_0x50a318[_0x5227fd(0x1a1)])?!0x1:Object[_0x5227fd(0xd8)](_0x50a318[_0x5227fd(0x1a1)])[_0x5227fd(0x169)](([_0x3134b9,_0x1e1b31])=>_0x3134b9[_0x5227fd(0x19c)]>0x0&&u(_0x1e1b31));}function u(_0x28536f){const _0x55c641=_0x5e00f3;return!_0x28536f||typeof _0x28536f!=_0x55c641(0xec)||!f(_0x28536f,['formula',_0x55c641(0xe5),_0x55c641(0xbb)])||!('formula'in _0x28536f)||typeof _0x28536f[_0x55c641(0xd4)]!=_0x55c641(0x151)||!_0x28536f[_0x55c641(0xd4)]['trim']()||_0x55c641(0xe5)in _0x28536f&&_0x28536f[_0x55c641(0xe5)]!=null&&(typeof _0x28536f['numberFormat']!=_0x55c641(0xec)||!f(_0x28536f[_0x55c641(0xe5)],['pattern'])||!(_0x55c641(0x156)in _0x28536f[_0x55c641(0xe5)])||typeof _0x28536f['numberFormat'][_0x55c641(0x156)]!=_0x55c641(0x151))?!0x1:!(_0x55c641(0xbb)in _0x28536f)||_0x28536f[_0x55c641(0xbb)]==null||d(_0x28536f['lastValue']);}function d(_0x118bfa){const _0x42d7b8=_0x5e00f3;return!_0x118bfa||typeof _0x118bfa!='object'||!f(_0x118bfa,['v','t','pattern'])||!('v'in _0x118bfa)||_0x118bfa['v']!==null&&typeof _0x118bfa['v']!='string'&&typeof _0x118bfa['v']!=_0x42d7b8(0xe2)&&typeof _0x118bfa['v']!=_0x42d7b8(0xa8)||'t'in _0x118bfa&&_0x118bfa['t']!=null&&!ee(_0x118bfa['t'])?!0x1:!(_0x42d7b8(0x156)in _0x118bfa)||_0x118bfa[_0x42d7b8(0x156)]==null||typeof _0x118bfa[_0x42d7b8(0x156)]==_0x42d7b8(0x151);}function f(_0xb2f9b6,_0x1adc8e){const _0x4fbc12=_0x5e00f3;let _0x38ffcc=new Set(_0x1adc8e);return Object[_0x4fbc12(0xad)](_0xb2f9b6)[_0x4fbc12(0x169)](_0x1c4d9f=>_0x38ffcc[_0x4fbc12(0xf4)](_0x1c4d9f));}function ee(_0x51c984){const _0x713cd8=_0x5e00f3;return typeof _0x51c984==_0x713cd8(0xe2)&&Object[_0x713cd8(0x13f)](t[_0x713cd8(0x6e)])[_0x713cd8(0x154)](_0x51c984);}const p=new Set([t[_0x5e00f3(0x19b)]['SECTION_BREAK'],t[_0x5e00f3(0x19b)][_0x5e00f3(0x67)],t[_0x5e00f3(0x19b)]['TABLE_ROW_START'],t[_0x5e00f3(0x19b)][_0x5e00f3(0x19f)],t[_0x5e00f3(0x19b)][_0x5e00f3(0x8f)],t['DataStreamTreeTokenType']['TABLE_ROW_END'],t[_0x5e00f3(0x19b)][_0x5e00f3(0x100)],t[_0x5e00f3(0x19b)][_0x5e00f3(0x118)],t[_0x5e00f3(0x19b)][_0x5e00f3(0x112)],t[_0x5e00f3(0x19b)][_0x5e00f3(0x65)],t['DataStreamTreeTokenType'][_0x5e00f3(0x108)],t['DataStreamTreeTokenType']['BLOCK_START'],t[_0x5e00f3(0x19b)][_0x5e00f3(0x153)],t['DataStreamTreeTokenType'][_0x5e00f3(0xdf)]]);var m=class extends Error{constructor(){super('Doc\x20Formula\x20range\x20cannot\x20cross\x20document\x20structure\x20boundaries');}};function te(_0x24f06d){const _0x37d648=_0x5e00f3;var _0x11719a,_0xf5e565;let _0x34d9ce=t['Tools'][_0x37d648(0x8e)](_0x24f06d[_0x37d648(0xa3)]),_0x5da32d=T(_0x34d9ce),{startOffset:_0x420f75,endOffset:_0x536b5b}=oe(_0x5da32d,_0x24f06d[_0x37d648(0xcd)],_0x24f06d['endOffset']);ie(_0x5da32d,_0x420f75,_0x536b5b);let _0x222d98=((_0x11719a=_0x5da32d[_0x37d648(0xce)])==null?void 0x0:_0x11719a[_0x37d648(0x87)](_0x2f4ca5=>{const _0x39947b=_0x37d648;if(!g(_0x2f4ca5))return!0x1;let _0x3a20a7=(0x0,t['getCustomRangeInterval'])(_0x2f4ca5);return _0x3a20a7['endOffset']>_0x420f75&&_0x3a20a7[_0x39947b(0xcd)]<_0x536b5b;})[_0x37d648(0x124)](_0x5c88a3=>_0x5c88a3['rangeId']))??[];ce(_0x5da32d,_0x420f75,_0x536b5b,''),_0x5da32d[_0x37d648(0xce)]=[...((_0xf5e565=_0x5da32d['customRanges'])==null?void 0x0:_0xf5e565['filter'](_0x589d98=>!_0x222d98[_0x37d648(0x154)](_0x589d98[_0x37d648(0xaa)])&&_0x589d98[_0x37d648(0xaa)]!==_0x24f06d['rangeId']))??[],ae(_0x24f06d[_0x37d648(0xaa)],_0x420f75)][_0x37d648(0x72)]((_0x1b0381,_0x5e2e9c)=>_0x1b0381['startIndex']-_0x5e2e9c[_0x37d648(0xc4)]);let _0x545428=v(_0x24f06d[_0x37d648(0xda)]);return _0x222d98['forEach'](_0x10ddf2=>{const _0x42bb5a=_0x37d648;delete _0x545428[_0x42bb5a(0x1a1)][_0x10ddf2];}),_0x545428['formulas'][_0x24f06d[_0x37d648(0xaa)]]=t['Tools'][_0x37d648(0x8e)](_0x24f06d[_0x37d648(0x182)]),{'nextDocumentData':_0x34d9ce,'nextResource':_0x545428,'cursorOffset':_0x420f75+0x1};}function ne(_0x5c435b){const _0x4a881d=_0x5e00f3;var _0x4a7a8e,_0x2ca333;let _0x495428=t[_0x4a881d(0xa2)][_0x4a881d(0x8e)](_0x5c435b['documentData']),_0x20c2a9=(_0x4a7a8e=T(_0x495428)['customRanges'])==null?void 0x0:_0x4a7a8e[_0x4a881d(0xca)](_0x14d107=>_0x14d107[_0x4a881d(0xaa)]===_0x5c435b[_0x4a881d(0xaa)]&&g(_0x14d107));if(!_0x20c2a9||!((_0x2ca333=_0x5c435b['resource'])!=null&&_0x2ca333[_0x4a881d(0x1a1)][_0x5c435b[_0x4a881d(0xaa)]]))return null;let _0x2e8839=v(_0x5c435b[_0x4a881d(0xda)]);return _0x2e8839[_0x4a881d(0x1a1)][_0x5c435b[_0x4a881d(0xaa)]]=t[_0x4a881d(0xa2)][_0x4a881d(0x8e)](_0x5c435b[_0x4a881d(0x182)]),{'nextDocumentData':_0x495428,'nextResource':_0x2e8839,'cursorOffset':_0x20c2a9[_0x4a881d(0xfc)]+0x1};}function h(_0x2db286){const _0x269926=_0x5e00f3;let _0x144780=t['Tools'][_0x269926(0x8e)](_0x2db286[_0x269926(0xa3)]),_0x45983a=le(_0x144780,_0x2db286['rangeId'],_0x2db286[_0x269926(0x14c)]??'');if(_0x45983a==null)return null;let _0x40eb95=v(_0x2db286['resource']);return delete _0x40eb95[_0x269926(0x1a1)][_0x2db286['rangeId']],{'nextDocumentData':_0x144780,'nextResource':_0x40eb95,'cursorOffset':_0x45983a};}function re(_0x1a43f1,_0x15d495){const _0x10eee9=_0x5e00f3;var _0x55ff1f;let _0x1f262f=t[_0x10eee9(0xa2)][_0x10eee9(0x8e)](_0x1a43f1),_0x4ba8d5=_0x1f262f[_0x10eee9(0x1a8)];if(!_0x4ba8d5)return _0x1f262f;let _0x51d5dc=new Map(_0x15d495[_0x10eee9(0x124)](_0x2cc442=>[_0x2cc442[_0x10eee9(0xaa)],_0x2cc442[_0x10eee9(0x14c)]])),_0xb5273=((_0x55ff1f=_0x4ba8d5[_0x10eee9(0xce)])==null?void 0x0:_0x55ff1f[_0x10eee9(0x87)](_0x598a36=>g(_0x598a36)&&_0x51d5dc[_0x10eee9(0xf4)](_0x598a36[_0x10eee9(0xaa)]))['sort']((_0x3548fe,_0x375c91)=>_0x375c91[_0x10eee9(0xc4)]-_0x3548fe[_0x10eee9(0xc4)]))??[];for(let _0x237396 of _0xb5273)le(_0x1f262f,_0x237396['rangeId'],_0x51d5dc[_0x10eee9(0xd9)](_0x237396[_0x10eee9(0xaa)])??'');return _0x1f262f;}function g(_0x28444d){const _0x422859=_0x5e00f3;var _0x18c6cc;return(_0x28444d==null?void 0x0:_0x28444d[_0x422859(0x116)])===t[_0x422859(0x184)][_0x422859(0x7a)]&&_0x28444d[_0x422859(0x8a)]===!0x0&&((_0x18c6cc=_0x28444d[_0x422859(0xa0)])==null?void 0x0:_0x18c6cc[_0x422859(0x160)])===_0x422859(0xd3);}function _(_0x1604f3,_0x2b9f43){const _0x2e61bc=_0x5e00f3;var _0x4cbfc7;return _0x1604f3==null||(_0x4cbfc7=_0x1604f3[_0x2e61bc(0xce)])==null?void 0x0:_0x4cbfc7[_0x2e61bc(0xca)](_0x56baa5=>_0x56baa5[_0x2e61bc(0xaa)]===_0x2b9f43&&g(_0x56baa5));}function ie(_0xe09886,_0x440b31,_0x5eb625){const _0x1aa642=_0x5e00f3;if(_0x440b31===_0x5eb625){if(p[_0x1aa642(0xf4)](_0xe09886['dataStream'][_0x440b31]))throw new m();return;}for(let _0x3516fa=_0x440b31;_0x3516fa<_0x5eb625;_0x3516fa++)if(_0xe09886[_0x1aa642(0x197)][_0x3516fa]===t['DataStreamTreeTokenType']['PARAGRAPH']||p[_0x1aa642(0xf4)](_0xe09886[_0x1aa642(0x197)][_0x3516fa]))throw new m();}function ae(_0x5ba7b6,_0x192193){const _0x1231f9=_0x5e00f3;return{'startIndex':_0x192193,'endIndex':_0x192193,'rangeId':_0x5ba7b6,'rangeType':t[_0x1231f9(0x184)][_0x1231f9(0x7a)],'wholeEntity':!0x0,'properties':{'kind':s}};}function v(_0x45f2d5){const _0x31cb81=_0x5e00f3;return _0x45f2d5?t['Tools'][_0x31cb81(0x8e)](_0x45f2d5):c();}function oe(_0x4a3cb2,_0x3c9311,_0x2d961d){const _0x2d7c1a=_0x5e00f3;let _0x1a9498=se(_0x4a3cb2),_0x539150=_0x3c9311??_0x1a9498,_0x173dc8=_0x2d961d??_0x539150;return{'startOffset':y(Math[_0x2d7c1a(0xf7)](_0x539150,_0x173dc8),_0x1a9498),'endOffset':y(Math['max'](_0x539150,_0x173dc8),_0x1a9498)};}function y(_0x5958db,_0x5eaaec){const _0x131c1f=_0x5e00f3;return Math[_0x131c1f(0xf2)](0x0,Math[_0x131c1f(0xf7)](_0x5958db,_0x5eaaec));}function se(_0x4989a5){const _0x8a25cc=_0x5e00f3;return _0x4989a5[_0x8a25cc(0x197)][_0x8a25cc(0xbe)](''+t[_0x8a25cc(0x19b)][_0x8a25cc(0x190)]+t[_0x8a25cc(0x19b)][_0x8a25cc(0x196)])?Math[_0x8a25cc(0xf2)](0x0,_0x4989a5[_0x8a25cc(0x197)][_0x8a25cc(0x19c)]-0x2):_0x4989a5[_0x8a25cc(0x197)][_0x8a25cc(0xbe)](t[_0x8a25cc(0x19b)][_0x8a25cc(0x196)])?Math[_0x8a25cc(0xf2)](0x0,_0x4989a5[_0x8a25cc(0x197)][_0x8a25cc(0x19c)]-0x1):_0x4989a5[_0x8a25cc(0x197)][_0x8a25cc(0x19c)];}function _0x3704(){const _0xeac52b=['onCommandExecuted','Inject','5Zqoxbt','getScalarFormulaResultCell','DocSelectionManagerService','isDocFormulaConfig','getFormulaValueSync','docs-formula.command.convert-to-text','values','presentationChanged$','IUniverInstanceService','pluginName','degradeDocumentData','DOC_FORMULA_PLUGIN','syncExecuteCommand','_deleteRegistration','removeFormula','type','trim','degradeBody','formulaResult$','text','setResource','from','getPresentation','selection','string','RemoveDocFormulaCommand','BLOCK_END','includes','DocFormulaDisplayTextService','pattern','SetDocFormulaNumberFormatCommand','resolved','constructor','SUCCESS','resources','10qfyFhu','dispose','_rawResources','registerProvider','kind','position','_config','stale','params','resolveFormula','resolveBinding','getCustomRangeInterval','DocFormulaLifecycleController','every','previousDocumentData','FormulaResultStatus','set','expectedNumberFormat','paragraphs','_syncUnit','segmentId','5979048Dvobjk','DocFormulaService','docs-formula.command.remove','ICommandService','accessor','isArray','_formulaService','documentRedo','undoMutation','_pendingUnitIds','touchDependencies','1.0.0-rc.0','sequenceNodesBuilder','serialize','docs-formula.command.set-number-format','getCurrentUnitOfType','setFormula','config','18276vTDPDu','CustomRangeType','getAllUnitsForType','getResult','customDecorations','references','_univerInstanceService','104296szlFDf','ReplaceDocFormulaWithTextCommand','_resourceManagerService','isDocFormulaResource','ERROR','Injector','PARAGRAPH','removeUnit','PENDING','EMPTY','docs-formula.command.replace-with-text','forEach','SECTION_BREAK','dataStream','registerPluginResource','getUnit','IResourceManagerService','DataStreamTreeTokenType','length','referenceRevision','shiftInclusiveRangeOnDelete','TABLE_CELL_START','UniverLicensePlugin','formulas','DOC','Module','DependentOn','DOC_FORMULA_OBJECT_REPLACEMENT','_commandService','_service','body','COLUMN_END','getFormulas','TABLE_START','RichTextEditingMutation','SetDocFormulaResourceMutation','Subject','externalMutations','getFormula','getRichTextEditPath','CellValueType','some','function','cell','sort','_hostExternalReferenceModel','source','updates','identity','Plugin','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','degradeDocFormulaDocumentData','CUSTOM','isInteger','schemaVersion','UniverInstanceType','color','expectedFormula','disabled','_isDisposed','notifyTextChanged','isFormulaLastValue','resolveHostFormulaExternalReferences','nextResource','fromEntries','filter','getRegisteredFormulas','decorate','wholeEntity','generateRandomId','subscribe','onStarting','deepClone','TABLE_CELL_END','paragraph','_presentationChanged$','collectMutations','assign','register','DOC_FORMULA_CUSTOM_RANGE_KIND','next','docs-formula.mutation.set-formula','replaceDocRanges','MUTATION','docs-formula.config','InvalidDocFormulaInsertRangeError','CommandType','docs-formula.mutation.set-last-values','endOffset','getSnapshot','properties','resourceRedo','Tools','documentData','isDocFormulaRange','SetDocFormulaLastValuesMutation','document','pending','boolean','externalReferences','rangeId','unregister','OtherFormulaBizType','keys','defineProperty','paragraphId','_resources','JSONX','load','presentation','blockRanges','columnGroups','insert','unregisterUnit','range','formulaId','unitId','lastValue','redoMutation','call','endsWith','name','_model','trigger','complete','UniverDocsFormulaPlugin','startIndex','merge','_loadErrors','findDocFormulaRange','DocFormulaResultStatus','packageName','find','DOC_FORMULA_SCHEMA_VERSION','buildInsertDocFormulaActions','startOffset','customRanges','8202782eiJyJS','default','_registrationService','data','univer-docs-formula','formula','_syncScheduled','syncUnit','UpdateDocFormulaCommand','entries','get','resource','error','docs-formula.mutation.set-resource','resolveFormulaResultPresentation','31501107CMnjar','CUSTOM_BLOCK','textRuns','model','number','_queueSync','nextDocumentData','numberFormat','liveResult','Disposable','status','push','customBlocks','_cacheEligibilityService','object','UNIVER_DOC','clear','buildUpsertHostExternalReferenceMutations','getLoadError','getResource','max','delete','has','change$','eligible','min','unitAdded$','symbol','cursorOffset','toStringTag','endIndex','FormulaLastValuePersistenceService','@univerjs-pro/docs-formula','_preserveInvalid','TABLE_END','resourceUndo','_setPresentation','420759ceZxyk','InsertDocFormulaCommand','slice','_updateFormulaResult','getUnitId','COLUMN_GROUP_END','COMMAND','DocFormulaModel','shiftInclusiveRangeOnInsert','deleteFormula','IUndoRedoService','_change$','unitDisposed$','getRevision','getTextRanges','COLUMN_START','collectFormulaExternalReferenceQualifiers','buildRemoveDocFormulaActions','tables','rangeType','1249900Ephtlu','COLUMN_GROUP_START','_docFormulaModel','disposeWithMe','DocFormulaResourceController','start','shiftExclusiveRangeOnInsert','shiftExclusiveRangeOnDelete','insertLength','deleteLength','_formulaKeys','getInstance','add','map','TextX','_injector','_registrations','sectionBreaks','_instanceService','HostExternalReferenceModel','IConfigService','getParagraphContentStartOffset','toPrimitive','pushUndoRedo','_configService','1435dJgwLN','setConfig','ConvertDocFormulaToTextCommand','docs-formula.mutation.remove-formula','iterator','setFormulas','prototype'];_0x3704=function(){return _0xeac52b;};return _0x3704();}function ce(_0x2625ba,_0x32a707,_0x2e0256,_0x3e2a38){_0x2e0256>_0x32a707&&de(_0x2625ba,_0x32a707,_0x2e0256),ue(_0x2625ba,_0x32a707,_0x3e2a38);}function le(_0xf666c1,_0x38e740,_0x172dd0){const _0x350666=_0x5e00f3;var _0x34bd7e,_0x53da86;let _0x52edb8=T(_0xf666c1),_0x317e06=(_0x34bd7e=_0x52edb8[_0x350666(0xce)])==null?void 0x0:_0x34bd7e[_0x350666(0xca)](_0x2657c3=>_0x2657c3[_0x350666(0xaa)]===_0x38e740&&g(_0x2657c3));if(!_0x317e06)return null;let _0x3db314=(0x0,t[_0x350666(0x167)])(_0x317e06);return ce(_0x52edb8,_0x3db314[_0x350666(0xcd)],_0x3db314[_0x350666(0x9e)],_0x172dd0),_0x52edb8['customRanges']=(_0x53da86=_0x52edb8['customRanges'])==null?void 0x0:_0x53da86[_0x350666(0x87)](_0x3170e5=>_0x3170e5['rangeId']!==_0x38e740),_0x3db314[_0x350666(0xcd)]+_0x172dd0['length'];}function ue(_0x4ecb1b,_0x561c5b,_0x56936e){const _0x4073f2=_0x5e00f3;_0x56936e&&(_0x4ecb1b['dataStream']=''+_0x4ecb1b['dataStream'][_0x4073f2(0x105)](0x0,_0x561c5b)+_0x56936e+_0x4ecb1b[_0x4073f2(0x197)][_0x4073f2(0x105)](_0x561c5b),fe(_0x4ecb1b,_0x561c5b,_0x56936e[_0x4073f2(0x19c)]));}function de(_0x617302,_0x4964c6,_0x16e263){const _0x1c13b2=_0x5e00f3;let _0x46af57=_0x16e263-_0x4964c6;_0x617302[_0x1c13b2(0x197)]=''+_0x617302['dataStream']['slice'](0x0,_0x4964c6)+_0x617302[_0x1c13b2(0x197)][_0x1c13b2(0x105)](_0x16e263),pe(_0x617302,_0x4964c6,_0x46af57);}function _0xbbb1(_0x86bfff,_0x2d4cd4){_0x86bfff=_0x86bfff-0x65;const _0x370420=_0x3704();let _0xbbb13f=_0x370420[_0x86bfff];return _0xbbb13f;}function fe(_0x5b2301,_0x2b94a8,_0x2eb46c){const _0x40aa8f=_0x5e00f3;_0x5b2301[_0x40aa8f(0x16e)]=b(_0x5b2301['paragraphs'],_0x2b94a8,_0x2eb46c),_0x5b2301[_0x40aa8f(0x128)]=b(_0x5b2301[_0x40aa8f(0x128)],_0x2b94a8,_0x2eb46c),_0x5b2301['customBlocks']=b(_0x5b2301[_0x40aa8f(0xea)],_0x2b94a8,_0x2eb46c),_0x5b2301[_0x40aa8f(0xe0)]=me(_0x5b2301[_0x40aa8f(0xe0)],_0x2b94a8,_0x2eb46c),_0x5b2301[_0x40aa8f(0x115)]=he(_0x5b2301['tables'],_0x2b94a8,_0x2eb46c),_0x5b2301[_0x40aa8f(0xb5)]=S(_0x5b2301[_0x40aa8f(0xb5)],_0x2b94a8,_0x2eb46c),_0x5b2301[_0x40aa8f(0xce)]=S(_0x5b2301[_0x40aa8f(0xce)],_0x2b94a8,_0x2eb46c),_0x5b2301[_0x40aa8f(0x187)]=S(_0x5b2301[_0x40aa8f(0x187)],_0x2b94a8,_0x2eb46c),_0x5b2301['blockRanges']=S(_0x5b2301[_0x40aa8f(0xb4)],_0x2b94a8,_0x2eb46c);}function pe(_0x147e48,_0x10ffe0,_0x786d6c){const _0x513772=_0x5e00f3;var _0x3b9dbd,_0x218a04;_0x147e48[_0x513772(0x16e)]=x(_0x147e48[_0x513772(0x16e)],_0x10ffe0,_0x786d6c),_0x147e48[_0x513772(0x128)]=x(_0x147e48[_0x513772(0x128)],_0x10ffe0,_0x786d6c),_0x147e48[_0x513772(0xea)]=x(_0x147e48['customBlocks'],_0x10ffe0,_0x786d6c),_0x147e48[_0x513772(0xe0)]=(_0x3b9dbd=w((_0x218a04=_0x147e48[_0x513772(0xe0)])==null?void 0x0:_0x218a04[_0x513772(0x124)](_0x281046=>({..._0x281046,'startIndex':_0x281046['st'],'endIndex':_0x281046['ed']})),_0x10ffe0,_0x786d6c))==null?void 0x0:_0x3b9dbd['map'](_0x1fd63b=>{let {startIndex:_0x1d1ca6,endIndex:_0xc8f4fd,..._0x32a66e}=_0x1fd63b;return{..._0x32a66e,'st':_0x1d1ca6,'ed':_0xc8f4fd};}),_0x147e48[_0x513772(0x115)]=w(_0x147e48[_0x513772(0x115)],_0x10ffe0,_0x786d6c),_0x147e48[_0x513772(0xb5)]=C(_0x147e48[_0x513772(0xb5)],_0x10ffe0,_0x786d6c),_0x147e48['customRanges']=C(_0x147e48[_0x513772(0xce)],_0x10ffe0,_0x786d6c),_0x147e48['customDecorations']=C(_0x147e48[_0x513772(0x187)],_0x10ffe0,_0x786d6c),_0x147e48[_0x513772(0xb4)]=C(_0x147e48[_0x513772(0xb4)],_0x10ffe0,_0x786d6c);}function b(_0xd8b739,_0x105db0,_0x4c7d13){const _0x3a1065=_0x5e00f3;return _0xd8b739==null?void 0x0:_0xd8b739[_0x3a1065(0x124)](_0x5369b4=>_0x5369b4[_0x3a1065(0xc4)]>=_0x105db0?{..._0x5369b4,'startIndex':_0x5369b4['startIndex']+_0x4c7d13}:_0x5369b4);}function x(_0x1da017,_0x587677,_0x135ce7){const _0xc6c897=_0x5e00f3;let _0x393d82=_0x587677+_0x135ce7;return _0x1da017==null?void 0x0:_0x1da017['map'](_0x2341fc=>_0x2341fc['startIndex']>=_0x587677&&_0x2341fc['startIndex']<_0x393d82?null:_0x2341fc[_0xc6c897(0xc4)]>=_0x393d82?{..._0x2341fc,'startIndex':_0x2341fc['startIndex']-_0x135ce7}:_0x2341fc)['filter'](_0x392f0f=>_0x392f0f!=null);}function me(_0x2b1378,_0x4c662d,_0x25c2b2){return _0x2b1378==null?void 0x0:_0x2b1378['map'](_0x51fa10=>_0x51fa10['st']>=_0x4c662d?{..._0x51fa10,'st':_0x51fa10['st']+_0x25c2b2,'ed':_0x51fa10['ed']+_0x25c2b2}:_0x51fa10['ed']>_0x4c662d?{..._0x51fa10,'ed':_0x51fa10['ed']+_0x25c2b2}:_0x51fa10);}function S(_0x5bbcd8,_0xaaa101,_0x26d6f0){const _0x567987=_0x5e00f3;return _0x5bbcd8==null?void 0x0:_0x5bbcd8[_0x567987(0x124)](_0x2501b6=>(0x0,t[_0x567987(0x10b)])(_0x2501b6,_0xaaa101,_0x26d6f0));}function he(_0xdcb367,_0xa9c4dc,_0x56cfaa){const _0x54d6fa=_0x5e00f3;return _0xdcb367==null?void 0x0:_0xdcb367[_0x54d6fa(0x124)](_0x91ba43=>(0x0,t[_0x54d6fa(0x11d)])(_0x91ba43,_0xa9c4dc,_0x56cfaa));}function C(_0x1a21ef,_0x261be2,_0x1623de){const _0x2d5295=_0x5e00f3;return _0x1a21ef==null?void 0x0:_0x1a21ef['map'](_0x409066=>(0x0,t[_0x2d5295(0x19e)])(_0x409066,_0x261be2,_0x1623de))['filter'](_0x3f6060=>_0x3f6060!=null);}function w(_0x59a8e0,_0x466fcd,_0x23b8a5){const _0x27b68d=_0x5e00f3;return _0x59a8e0==null?void 0x0:_0x59a8e0['map'](_0x1001cc=>(0x0,t[_0x27b68d(0x11e)])(_0x1001cc,_0x466fcd,_0x23b8a5))[_0x27b68d(0x87)](_0x3606ba=>_0x3606ba!=null);}function T(_0x4569c4){const _0x235581=_0x5e00f3;if(!_0x4569c4[_0x235581(0x1a8)])throw Error('Document\x20main\x20body\x20is\x20required\x20to\x20insert\x20Doc\x20Formula.');return _0x4569c4[_0x235581(0x1a8)];}function E(_0x27906f){'@babel/helpers - typeof';const _0x5ec22a=_0x5e00f3;return E=typeof Symbol=='function'&&typeof Symbol[_0x5ec22a(0x134)]==_0x5ec22a(0xf9)?function(_0x18d420){return typeof _0x18d420;}:function(_0x48f78d){const _0x1d6182=_0x5ec22a;return _0x48f78d&&typeof Symbol=='function'&&_0x48f78d[_0x1d6182(0x159)]===Symbol&&_0x48f78d!==Symbol[_0x1d6182(0x136)]?'symbol':typeof _0x48f78d;},E(_0x27906f);}function ge(_0x499cad,_0x4aa69b){const _0x9ea332=_0x5e00f3;if(E(_0x499cad)!=_0x9ea332(0xec)||!_0x499cad)return _0x499cad;var _0x4b2897=_0x499cad[Symbol[_0x9ea332(0x12d)]];if(_0x4b2897!==void 0x0){var _0x2ed985=_0x4b2897[_0x9ea332(0xbd)](_0x499cad,_0x4aa69b||_0x9ea332(0xd0));if(E(_0x2ed985)!='object')return _0x2ed985;throw TypeError(_0x9ea332(0x78));}return(_0x4aa69b===_0x9ea332(0x151)?String:Number)(_0x499cad);}function _e(_0x1b5b67){const _0x3f4e4e=_0x5e00f3;var _0x7a10b9=ge(_0x1b5b67,'string');return E(_0x7a10b9)==_0x3f4e4e(0xf9)?_0x7a10b9:_0x7a10b9+'';}function D(_0x1130fe,_0x39f4de,_0x4a34dc){return(_0x39f4de=_e(_0x39f4de))in _0x1130fe?Object['defineProperty'](_0x1130fe,_0x39f4de,{'value':_0x4a34dc,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x1130fe[_0x39f4de]=_0x4a34dc,_0x1130fe;}var O=class extends t[_0x5e00f3(0xe7)]{constructor(..._0x48eba7){const _0x22e1f4=_0x5e00f3;super(..._0x48eba7),D(this,_0x22e1f4(0xb0),new Map()),D(this,_0x22e1f4(0x15e),new Map()),D(this,_0x22e1f4(0xc6),new Map()),D(this,_0x22e1f4(0x10e),new i[(_0x22e1f4(0x6a))]()),D(this,_0x22e1f4(0xf5),this[_0x22e1f4(0x10e)]['asObservable']());}['getFormula'](_0x555f6a,_0x4369b7){const _0x55092b=_0x5e00f3;var _0x359267;let _0x4becc2=(_0x359267=this[_0x55092b(0xb0)][_0x55092b(0xd9)](_0x555f6a))==null?void 0x0:_0x359267['formulas'][_0x4369b7];return _0x4becc2?t[_0x55092b(0xa2)][_0x55092b(0x8e)](_0x4becc2):void 0x0;}['getFormulas'](_0x42c14f){const _0x3e0eaa=_0x5e00f3;var _0xd8d68c;return t['Tools']['deepClone'](((_0xd8d68c=this[_0x3e0eaa(0xb0)][_0x3e0eaa(0xd9)](_0x42c14f))==null?void 0x0:_0xd8d68c[_0x3e0eaa(0x1a1)])??{});}[_0x5e00f3(0xf1)](_0x3e164e){const _0x5b0614=_0x5e00f3;let _0x4ee6d3=this['_resources']['get'](_0x3e164e);return _0x4ee6d3?t[_0x5b0614(0xa2)][_0x5b0614(0x8e)](_0x4ee6d3):void 0x0;}[_0x5e00f3(0x181)](_0x3ecaa0,_0x223185,_0xf74715){const _0x1acba6=_0x5e00f3;return this[_0x1acba6(0x135)](_0x3ecaa0,{[_0x223185]:_0xf74715});}[_0x5e00f3(0x14d)](_0x33d500,_0x2af622){const _0x836d9f=_0x5e00f3;return this[_0x836d9f(0xc6)]['has'](_0x33d500)||!l(_0x2af622)?!0x1:(this['_resources'][_0x836d9f(0x16c)](_0x33d500,t['Tools'][_0x836d9f(0x8e)](_0x2af622)),this[_0x836d9f(0x10e)][_0x836d9f(0x96)]({'unitId':_0x33d500}),!0x0);}[_0x5e00f3(0x135)](_0x156698,_0x2ec885){const _0x163d2a=_0x5e00f3;if(this['_loadErrors'][_0x163d2a(0xf4)](_0x156698)||!Object[_0x163d2a(0xad)](_0x2ec885)[_0x163d2a(0x19c)]||!l({'schemaVersion':0x1,'formulas':_0x2ec885}))return!0x1;let _0x45043e=this[_0x163d2a(0xb0)]['get'](_0x156698)??c(),_0x5db082=t[_0x163d2a(0xa2)]['deepClone'](_0x45043e);return Object[_0x163d2a(0x93)](_0x5db082[_0x163d2a(0x1a1)],t[_0x163d2a(0xa2)][_0x163d2a(0x8e)](_0x2ec885)),this['_resources'][_0x163d2a(0x16c)](_0x156698,_0x5db082),this['_change$']['next']({'unitId':_0x156698,'rangeIds':Object['keys'](_0x2ec885)}),!0x0;}[_0x5e00f3(0x147)](_0x2e43a7,_0x3d53a3){const _0x435d98=_0x5e00f3;if(this['_loadErrors'][_0x435d98(0xf4)](_0x2e43a7))return!0x1;let _0xd5fcc=this['_resources'][_0x435d98(0xd9)](_0x2e43a7);if(!(_0xd5fcc!=null&&_0xd5fcc[_0x435d98(0x1a1)][_0x3d53a3]))return!0x1;let _0x1c5e82=t[_0x435d98(0xa2)]['deepClone'](_0xd5fcc);return delete _0x1c5e82[_0x435d98(0x1a1)][_0x3d53a3],this['_resources'][_0x435d98(0x16c)](_0x2e43a7,_0x1c5e82),this[_0x435d98(0x10e)][_0x435d98(0x96)]({'unitId':_0x2e43a7,'rangeIds':[_0x3d53a3]}),!0x0;}[_0x5e00f3(0xb2)](_0xd93edb,_0x2b744d){const _0xc30657=_0x5e00f3;return _0x2b744d&&typeof _0x2b744d==_0xc30657(0xec)&&'schemaVersion'in _0x2b744d&&_0x2b744d[_0xc30657(0x7c)]!==0x1?(this[_0xc30657(0xff)](_0xd93edb,_0x2b744d,'unsupported-version'),!0x1):l(_0x2b744d)?(this[_0xc30657(0xb0)][_0xc30657(0x16c)](_0xd93edb,t['Tools']['deepClone'](_0x2b744d)),this[_0xc30657(0x15e)][_0xc30657(0xf3)](_0xd93edb),this['_loadErrors']['delete'](_0xd93edb),this[_0xc30657(0x10e)][_0xc30657(0x96)]({'unitId':_0xd93edb}),!0x0):(this[_0xc30657(0xff)](_0xd93edb,_0x2b744d,'invalid-resource'),!0x1);}[_0x5e00f3(0x17e)](_0x206cd2){const _0x2d8ba9=_0x5e00f3;let _0x37651b=this[_0x2d8ba9(0xb0)][_0x2d8ba9(0xd9)](_0x206cd2);return _0x37651b?t[_0x2d8ba9(0xa2)][_0x2d8ba9(0x8e)](_0x37651b):this['_rawResources']['has'](_0x206cd2)?t[_0x2d8ba9(0xa2)][_0x2d8ba9(0x8e)](this[_0x2d8ba9(0x15e)]['get'](_0x206cd2)):c();}['getLoadError'](_0x4f9eb4){const _0x29b0bb=_0x5e00f3;return this[_0x29b0bb(0xc6)][_0x29b0bb(0xd9)](_0x4f9eb4);}[_0x5e00f3(0x191)](_0x3a2a88){const _0x445bd3=_0x5e00f3;this[_0x445bd3(0xb0)][_0x445bd3(0xf3)](_0x3a2a88),this['_rawResources'][_0x445bd3(0xf3)](_0x3a2a88),this[_0x445bd3(0xc6)][_0x445bd3(0xf3)](_0x3a2a88),this['_change$']['next']({'unitId':_0x3a2a88});}['dispose'](){const _0x50deec=_0x5e00f3;this['_resources'][_0x50deec(0xee)](),this['_rawResources']['clear'](),this[_0x50deec(0xc6)][_0x50deec(0xee)](),this[_0x50deec(0x10e)][_0x50deec(0xc2)](),super[_0x50deec(0x15d)]();}['_preserveInvalid'](_0xa4eed4,_0x1b2ade,_0x16b2eb){const _0x35befc=_0x5e00f3;this[_0x35befc(0xb0)][_0x35befc(0xf3)](_0xa4eed4),this[_0x35befc(0x15e)][_0x35befc(0x16c)](_0xa4eed4,t[_0x35befc(0xa2)]['deepClone'](_0x1b2ade)),this[_0x35befc(0xc6)][_0x35befc(0x16c)](_0xa4eed4,_0x16b2eb),this[_0x35befc(0x10e)][_0x35befc(0x96)]({'unitId':_0xa4eed4});}};let ve=function(_0xd1d741){const _0x34773a=_0x5e00f3;return _0xd1d741[_0x34773a(0x193)]='empty',_0xd1d741[_0x34773a(0x192)]='pending',_0xd1d741[_0x34773a(0x15a)]='success',_0xd1d741['ERROR']=_0x34773a(0xdb),_0xd1d741;}({});function k(_0x20d5a1,_0x1bd1c6){return function(_0x5a9aa6,_0x1ad08f){_0x1bd1c6(_0x5a9aa6,_0x1ad08f,_0x20d5a1);};}function A(_0x54557e,_0x436f03,_0x33b182,_0x3fe646){const _0x5755aa=_0x5e00f3;var _0x37c5e2=arguments['length'],_0x3d15b4=_0x37c5e2<0x3?_0x436f03:_0x3fe646===null?_0x3fe646=Object['getOwnPropertyDescriptor'](_0x436f03,_0x33b182):_0x3fe646,_0x423f8e;if(typeof Reflect==_0x5755aa(0xec)&&typeof Reflect[_0x5755aa(0x89)]==_0x5755aa(0x70))_0x3d15b4=Reflect[_0x5755aa(0x89)](_0x54557e,_0x436f03,_0x33b182,_0x3fe646);else{for(var _0x1b62cf=_0x54557e[_0x5755aa(0x19c)]-0x1;_0x1b62cf>=0x0;_0x1b62cf--)(_0x423f8e=_0x54557e[_0x1b62cf])&&(_0x3d15b4=(_0x37c5e2<0x3?_0x423f8e(_0x3d15b4):_0x37c5e2>0x3?_0x423f8e(_0x436f03,_0x33b182,_0x3d15b4):_0x423f8e(_0x436f03,_0x33b182))||_0x3d15b4);}return _0x37c5e2>0x3&&_0x3d15b4&&Object[_0x5755aa(0xae)](_0x436f03,_0x33b182,_0x3d15b4),_0x3d15b4;}let j=class extends t['Disposable']{constructor(_0x3f3b96,_0xc20f8c,_0x1d818c){const _0x3b276d=_0x5e00f3;super(),this[_0x3b276d(0xc0)]=_0x3f3b96,this[_0x3b276d(0xd1)]=_0xc20f8c,this[_0x3b276d(0x73)]=_0x1d818c,D(this,'_registrations',new Map()),D(this,_0x3b276d(0x121),new Map()),D(this,_0x3b276d(0x91),new i[(_0x3b276d(0x6a))]()),D(this,'presentationChanged$',this[_0x3b276d(0x91)]['asObservable']()),this[_0x3b276d(0x11a)](this[_0x3b276d(0xd1)][_0x3b276d(0x14b)][_0x3b276d(0x8c)](_0x870ed9=>{const _0x3923b2=_0x3b276d;for(let _0xead275 of Object[_0x3923b2(0x13f)](_0x870ed9))for(let _0x1024cf of Object[_0x3923b2(0x13f)](_0xead275))_0x1024cf[_0x3923b2(0x195)](_0x4ddce5=>this[_0x3923b2(0x106)](_0x4ddce5));}));}[_0x5e00f3(0xd6)](_0x106825){const _0xc84734=_0x5e00f3;var _0x86cb56;let _0x12181a=_0x106825['getUnitId'](),_0x17ad2e=((_0x86cb56=_0x106825[_0xc84734(0x9f)]()[_0xc84734(0x1a8)])==null||(_0x86cb56=_0x86cb56[_0xc84734(0xce)])==null?void 0x0:_0x86cb56[_0xc84734(0x87)](g))??[],_0x4ab2d6=this[_0xc84734(0xc0)][_0xc84734(0x66)](_0x12181a),_0x39fb9d=new Set();for(let _0x41313e of _0x17ad2e){let _0x32a684=_0x4ab2d6[_0x41313e['rangeId']];_0x32a684&&(_0x39fb9d[_0xc84734(0x123)](M(_0x12181a,_0x41313e[_0xc84734(0xaa)])),this['register']({'unitId':_0x12181a,'rangeId':_0x41313e['rangeId']},_0x32a684));}for(let _0x15561f of Array[_0xc84734(0x14e)](this[_0xc84734(0x127)][_0xc84734(0x13f)]()))_0x15561f[_0xc84734(0xba)]===_0x12181a&&!_0x39fb9d['has'](M(_0x15561f[_0xc84734(0xba)],_0x15561f[_0xc84734(0xaa)]))&&this[_0xc84734(0xab)](_0x15561f);}['register'](_0x253391,_0x249649){const _0x1d4e3e=_0x5e00f3;let _0x4c8d41=M(_0x253391['unitId'],_0x253391[_0x1d4e3e(0xaa)]),_0x501075=this[_0x1d4e3e(0x127)][_0x1d4e3e(0xd9)](_0x4c8d41),_0xee0e5e=this[_0x1d4e3e(0x73)][_0x1d4e3e(0x110)](_0x253391['unitId']);if(_0x501075&&_0x501075[_0x1d4e3e(0x182)][_0x1d4e3e(0xd4)]===_0x249649['formula']&&_0x501075[_0x1d4e3e(0x19d)]===_0xee0e5e){_0x501075['config']=_0x249649;let _0x570370=_0x501075[_0x1d4e3e(0xb9)]?this['_registrationService'][_0x1d4e3e(0x13d)](_0x501075['unitId'],_0x501075[_0x1d4e3e(0xba)],_0x501075[_0x1d4e3e(0xb9)])??void 0x0:void 0x0;_0x501075['liveResult']=_0x570370,this[_0x1d4e3e(0x102)](_0x4c8d41,N(_0x249649,_0x570370));return;}_0x501075!=null&&_0x501075[_0x1d4e3e(0xb9)]&&this['_deleteRegistration'](_0x501075);let _0x136f54={..._0x253391,'config':_0x249649,'referenceRevision':_0xee0e5e,'presentation':N(_0x249649,void 0x0)};if(this[_0x1d4e3e(0x127)][_0x1d4e3e(0x16c)](_0x4c8d41,_0x136f54),!_0x249649[_0x1d4e3e(0xd4)][_0x1d4e3e(0x149)]())return;let _0xecc402=this['_registrationService']['registerFormulaWithRange'](_0x253391['unitId'],_0x253391[_0x1d4e3e(0xba)],_0x249649['formula'],void 0x0,{'rangeId':_0x253391[_0x1d4e3e(0xaa)]},r[_0x1d4e3e(0xac)][_0x1d4e3e(0x1a2)],_0x253391[_0x1d4e3e(0xaa)]);_0x136f54[_0x1d4e3e(0xb9)]=_0xecc402,this[_0x1d4e3e(0x121)]['set'](_0xecc402,_0x4c8d41);}['unregister'](_0x382a00){const _0x109be9=_0x5e00f3;let _0x2244ff=M(_0x382a00['unitId'],_0x382a00[_0x109be9(0xaa)]),_0x28786b=this[_0x109be9(0x127)]['get'](_0x2244ff);_0x28786b&&(this[_0x109be9(0x146)](_0x28786b),this['_registrations'][_0x109be9(0xf3)](_0x2244ff));}[_0x5e00f3(0xb7)](_0x23c8e0){const _0x41e250=_0x5e00f3;for(let _0x40828f of Array[_0x41e250(0x14e)](this[_0x41e250(0x127)][_0x41e250(0x13f)]()))_0x40828f['unitId']===_0x23c8e0&&this[_0x41e250(0xab)](_0x40828f);}[_0x5e00f3(0x14f)](_0x25fed8){const _0x5bf2a0=_0x5e00f3;var _0x5133b4;return(_0x5133b4=this[_0x5bf2a0(0x127)][_0x5bf2a0(0xd9)](M(_0x25fed8[_0x5bf2a0(0xba)],_0x25fed8['rangeId'])))==null?void 0x0:_0x5133b4[_0x5bf2a0(0xb3)];}[_0x5e00f3(0x186)](_0x5c019e){const _0x40d32d=_0x5e00f3;let _0x2d305e=this['_registrations']['get'](M(_0x5c019e[_0x40d32d(0xba)],_0x5c019e[_0x40d32d(0xaa)]));return _0x2d305e?P(_0x2d305e):void 0x0;}[_0x5e00f3(0x88)](){const _0x3fdedc=_0x5e00f3;return Array[_0x3fdedc(0x14e)](this[_0x3fdedc(0x127)][_0x3fdedc(0x13f)](),_0x26fb53=>({'identity':{'unitId':_0x26fb53[_0x3fdedc(0xba)],'rangeId':_0x26fb53[_0x3fdedc(0xaa)]},'config':_0x26fb53[_0x3fdedc(0x182)],'referenceRevision':_0x26fb53[_0x3fdedc(0x19d)],..._0x26fb53[_0x3fdedc(0xe6)]?{'liveResult':_0x26fb53[_0x3fdedc(0xe6)]}:null}));}[_0x5e00f3(0x15d)](){const _0x19769a=_0x5e00f3;for(let _0x5f328b of this[_0x19769a(0x127)][_0x19769a(0x13f)]())this[_0x19769a(0x146)](_0x5f328b);this[_0x19769a(0x127)][_0x19769a(0xee)](),this['_formulaKeys'][_0x19769a(0xee)](),this[_0x19769a(0x91)][_0x19769a(0xc2)](),super['dispose']();}[_0x5e00f3(0x106)](_0x46e97e){const _0x18ec0a=_0x5e00f3;let _0x5d2f3e=this['_formulaKeys']['get'](_0x46e97e[_0x18ec0a(0xb9)]),_0x3d01ee=_0x5d2f3e?this['_registrations']['get'](_0x5d2f3e):void 0x0;!_0x5d2f3e||!_0x3d01ee||(_0x3d01ee[_0x18ec0a(0xe6)]=_0x46e97e,this[_0x18ec0a(0x102)](_0x5d2f3e,N(_0x3d01ee[_0x18ec0a(0x182)],_0x46e97e)));}[_0x5e00f3(0x102)](_0x5b00f5,_0x2a3fe0){const _0x5b3195=_0x5e00f3;var _0x4302ad,_0x11ba39;let _0x539ccf=this[_0x5b3195(0x127)]['get'](_0x5b00f5);if(!_0x539ccf||ye(_0x539ccf[_0x5b3195(0xb3)],_0x2a3fe0))return;let _0x26f92a=_0x539ccf[_0x5b3195(0xb3)],_0x4127af=P(_0x539ccf);_0x539ccf[_0x5b3195(0xb3)]=_0x2a3fe0,this[_0x5b3195(0x91)][_0x5b3195(0x96)]({'unitId':_0x539ccf[_0x5b3195(0xba)],'rangeId':_0x539ccf[_0x5b3195(0xaa)],'presentation':_0x2a3fe0,'previousPresentation':_0x26f92a,'result':P(_0x539ccf),'previousResult':{..._0x4127af,..._0x26f92a,'value':(_0x4302ad=_0x26f92a[_0x5b3195(0x71)])==null?void 0x0:_0x4302ad['v'],'valueType':((_0x11ba39=_0x26f92a['cell'])==null?void 0x0:_0x11ba39['t'])??void 0x0}});}[_0x5e00f3(0x146)](_0x53d05c){const _0x1f306d=_0x5e00f3;_0x53d05c['formulaId']&&(this['_registrationService'][_0x1f306d(0x10c)](_0x53d05c[_0x1f306d(0xba)],_0x53d05c[_0x1f306d(0xba)],[_0x53d05c['formulaId']]),this['_formulaKeys'][_0x1f306d(0xf3)](_0x53d05c[_0x1f306d(0xb9)]));}};j=A([k(0x0,(0x0,t[_0x5e00f3(0x138)])(O)),k(0x1,(0x0,t['Inject'])(r['RegisterOtherFormulaService'])),k(0x2,(0x0,t[_0x5e00f3(0x138)])(e[_0x5e00f3(0x12a)]))],j);function M(_0x5becfe,_0x543128){return _0x5becfe+'\x00'+_0x543128;}function N(_0x99c658,_0x263b7d){const _0x51a0bf=_0x5e00f3;return(0x0,e['resolveFormulaResultPresentation'])({'numberFormat':_0x99c658[_0x51a0bf(0xe5)],'lastValue':_0x99c658['lastValue'],'result':_0x263b7d});}function P(_0x26489b){const _0x4086d7=_0x5e00f3;var _0x836e86,_0xfe4bdd,_0x4b245c;let _0x5709d9=_0x26489b['presentation'],_0x20373f=_0x26489b[_0x4086d7(0x182)][_0x4086d7(0xd4)]['trim']()?_0x5709d9['stale']||_0x5709d9[_0x4086d7(0x71)]==null?_0x4086d7(0xa7):((_0x836e86=_0x26489b[_0x4086d7(0xe6)])==null?void 0x0:_0x836e86[_0x4086d7(0xe8)])===r[_0x4086d7(0x16b)][_0x4086d7(0x18e)]?_0x4086d7(0xdb):'success':'empty';return{..._0x5709d9,'status':_0x20373f,'value':(_0xfe4bdd=_0x5709d9[_0x4086d7(0x71)])==null?void 0x0:_0xfe4bdd['v'],'valueType':((_0x4b245c=_0x5709d9[_0x4086d7(0x71)])==null?void 0x0:_0x4b245c['t'])??void 0x0};}function ye(_0x561ea6,_0x16fa96){const _0x46bfef=_0x5e00f3;var _0x399cdc,_0x399e4a,_0x43eca0,_0x4d2cbf;return _0x561ea6['text']===_0x16fa96['text']&&_0x561ea6[_0x46bfef(0x7e)]===_0x16fa96[_0x46bfef(0x7e)]&&_0x561ea6[_0x46bfef(0x156)]===_0x16fa96[_0x46bfef(0x156)]&&_0x561ea6[_0x46bfef(0x74)]===_0x16fa96[_0x46bfef(0x74)]&&_0x561ea6['stale']===_0x16fa96[_0x46bfef(0x163)]&&((_0x399cdc=_0x561ea6[_0x46bfef(0x71)])==null?void 0x0:_0x399cdc['t'])===((_0x399e4a=_0x16fa96['cell'])==null?void 0x0:_0x399e4a['t'])&&Object['is']((_0x43eca0=_0x561ea6[_0x46bfef(0x71)])==null?void 0x0:_0x43eca0['v'],(_0x4d2cbf=_0x16fa96[_0x46bfef(0x71)])==null?void 0x0:_0x4d2cbf['v']);}const F={'id':_0x5e00f3(0x97),'type':t[_0x5e00f3(0x9c)][_0x5e00f3(0x99)],'handler':(_0x35af1d,_0x4b6094)=>!(_0x4b6094!=null&&_0x4b6094['unitId'])||!_0x4b6094['rangeId']||!_0x4b6094[_0x5e00f3(0x182)]?!0x1:_0x35af1d[_0x5e00f3(0xd9)](O)[_0x5e00f3(0x181)](_0x4b6094['unitId'],_0x4b6094['rangeId'],_0x4b6094['config'])},I={'id':_0x5e00f3(0x133),'type':t[_0x5e00f3(0x9c)][_0x5e00f3(0x99)],'handler':(_0x13d073,_0x41e454)=>!(_0x41e454!=null&&_0x41e454[_0x5e00f3(0xba)])||!_0x41e454[_0x5e00f3(0xaa)]?!0x1:_0x13d073[_0x5e00f3(0xd9)](O)[_0x5e00f3(0x147)](_0x41e454[_0x5e00f3(0xba)],_0x41e454['rangeId'])},L={'id':_0x5e00f3(0xdc),'type':t['CommandType'][_0x5e00f3(0x99)],'handler':(_0x2b6c7f,_0x15bbc3)=>!(_0x15bbc3!=null&&_0x15bbc3[_0x5e00f3(0xba)])||!_0x15bbc3[_0x5e00f3(0xda)]?!0x1:_0x2b6c7f[_0x5e00f3(0xd9)](O)[_0x5e00f3(0x14d)](_0x15bbc3['unitId'],_0x15bbc3['resource'])},R={'id':_0x5e00f3(0x9d),'type':t[_0x5e00f3(0x9c)][_0x5e00f3(0x99)],'handler':(_0x4d0b81,_0x59dc0e)=>{const _0xd8a97c=_0x5e00f3;if(!(_0x59dc0e!=null&&_0x59dc0e[_0xd8a97c(0xba)])||!_0x59dc0e[_0xd8a97c(0x75)][_0xd8a97c(0x19c)])return!0x1;let _0x40ceb1=_0x4d0b81[_0xd8a97c(0xd9)](O),_0x5e1f9b=_0x4d0b81[_0xd8a97c(0xd9)](e[_0xd8a97c(0x12a)]),_0x429531=_0x40ceb1['getResource'](_0x59dc0e[_0xd8a97c(0xba)]);if(!_0x429531)return!0x1;let _0x42a4c5=t[_0xd8a97c(0xa2)][_0xd8a97c(0x8e)](_0x429531),_0x3b493c=!0x1;for(let _0x453b94 of _0x59dc0e['updates']){var _0x2a0c95,_0x5efa1a,_0x3bef5e,_0x102098;let _0x5be757=_0x42a4c5[_0xd8a97c(0x1a1)][_0x453b94[_0xd8a97c(0xaa)]];!_0x5be757||_0x5be757['formula']!==_0x453b94[_0xd8a97c(0x7f)]||((_0x2a0c95=_0x5be757[_0xd8a97c(0xe5)])==null?void 0x0:_0x2a0c95['pattern'])!==_0x453b94[_0xd8a97c(0x16d)]||_0x5e1f9b['getRevision'](_0x59dc0e[_0xd8a97c(0xba)])!==_0x453b94['expectedReferenceRevision']||(((_0x5efa1a=_0x5be757[_0xd8a97c(0xbb)])==null?void 0x0:_0x5efa1a['v'])!==_0x453b94['lastValue']['v']||((_0x3bef5e=_0x5be757[_0xd8a97c(0xbb)])==null?void 0x0:_0x3bef5e['t'])!==_0x453b94[_0xd8a97c(0xbb)]['t']||((_0x102098=_0x5be757['lastValue'])==null?void 0x0:_0x102098[_0xd8a97c(0x156)])!==_0x453b94['lastValue']['pattern'])&&(_0x5be757[_0xd8a97c(0xbb)]=t['Tools'][_0xd8a97c(0x8e)](_0x453b94[_0xd8a97c(0xbb)]),_0x3b493c=!0x0);}return!_0x3b493c||_0x40ceb1[_0xd8a97c(0x14d)](_0x59dc0e[_0xd8a97c(0xba)],_0x42a4c5);}},z={'id':'docs-formula.command.insert','type':t[_0x5e00f3(0x9c)][_0x5e00f3(0x109)],'handler':(_0x2a7808,_0x5bca1c)=>{const _0x279a13=_0x5e00f3;if(!(_0x5bca1c!=null&&_0x5bca1c[_0x279a13(0xd4)][_0x279a13(0x149)]()))return!0x1;let _0x46b311=K(_0x2a7808,_0x5bca1c[_0x279a13(0xba)],'');if(!_0x46b311)return!0x1;let _0x25764b=xe(_0x5bca1c['target'],_0x46b311[_0x279a13(0x1a8)],be(_0x2a7808,_0x46b311[_0x279a13(0xba)]));if(!_0x25764b)return!0x1;let _0x6c75fa=Se(_0x2a7808,_0x46b311['unitId'],_0x5bca1c[_0x279a13(0xd4)],_0x5bca1c[_0x279a13(0xa9)]??[]);if(!_0x6c75fa)return!0x1;let _0x43afe7=Ce(_0x46b311[_0x279a13(0x1a8)],_0x46b311[_0x279a13(0xe1)],_0x46b311['unitId']),_0x4df9c8=we({'documentData':_0x46b311[_0x279a13(0xa3)],'resource':_0x46b311[_0x279a13(0xda)],'rangeId':_0x43afe7,'config':{'formula':_0x5bca1c[_0x279a13(0xd4)],..._0x5bca1c['numberFormat']?{'numberFormat':_0x5bca1c[_0x279a13(0xe5)]}:null},'startOffset':_0x25764b['startOffset'],'endOffset':_0x25764b[_0x279a13(0x9e)]});if(!_0x4df9c8)return!0x1;let _0x20fe4e=(0x0,e[_0x279a13(0xef)])(_0x2a7808,_0x46b311[_0x279a13(0xba)],_0x6c75fa);return!_0x20fe4e||!q({'accessor':_0x2a7808,'document':_0x46b311[_0x279a13(0xa6)],'unitId':_0x46b311['unitId'],'trigger':z['id'],'rangeId':_0x43afe7,'previousResource':_0x46b311[_0x279a13(0xda)],'nextResource':_0x4df9c8[_0x279a13(0x85)],'previousDocumentData':_0x46b311[_0x279a13(0xa3)],'nextDocumentData':_0x4df9c8['nextDocumentData'],'cursorOffset':_0x4df9c8['cursorOffset'],'externalMutations':_0x20fe4e})?!0x1:{'rangeId':_0x43afe7,'startOffset':_0x4df9c8['cursorOffset']-0x1,'endOffset':_0x4df9c8[_0x279a13(0xfa)]};}},B={'id':'docs-formula.command.update','type':t[_0x5e00f3(0x9c)]['COMMAND'],'handler':(_0xe87c4b,_0x1dece9)=>{const _0xf4144a=_0x5e00f3;if(!(_0x1dece9!=null&&_0x1dece9['rangeId'])||!_0x1dece9[_0xf4144a(0xd4)][_0xf4144a(0x149)]())return!0x1;let _0x4d2d50=K(_0xe87c4b,_0x1dece9['unitId'],''),_0x55e5d7=_0x4d2d50==null?void 0x0:_0x4d2d50[_0xf4144a(0xe1)]['getFormula'](_0x4d2d50[_0xf4144a(0xba)],_0x1dece9[_0xf4144a(0xaa)]),_0x3fd00a=_0x4d2d50?_(_0x4d2d50[_0xf4144a(0xa3)][_0xf4144a(0x1a8)],_0x1dece9[_0xf4144a(0xaa)]):void 0x0;if(!_0x4d2d50||!_0x55e5d7||!_0x3fd00a)return!0x1;let _0x1e6978=Se(_0xe87c4b,_0x4d2d50[_0xf4144a(0xba)],_0x1dece9[_0xf4144a(0xd4)],_0x1dece9['externalReferences']??[]);if(!_0x1e6978)return!0x1;let _0x89503a=(0x0,e[_0xf4144a(0xef)])(_0xe87c4b,_0x4d2d50[_0xf4144a(0xba)],_0x1e6978);if(!_0x89503a)return!0x1;let _0x2bfac9=je(_0x4d2d50[_0xf4144a(0xda)]);return _0x2bfac9['formulas'][_0x1dece9[_0xf4144a(0xaa)]]={'formula':_0x1dece9[_0xf4144a(0xd4)],..._0x1dece9[_0xf4144a(0xe5)]?{'numberFormat':_0x1dece9[_0xf4144a(0xe5)]}:_0x55e5d7[_0xf4144a(0xe5)]?{'numberFormat':_0x55e5d7[_0xf4144a(0xe5)]}:null},q({'accessor':_0xe87c4b,'document':_0x4d2d50[_0xf4144a(0xa6)],'unitId':_0x4d2d50[_0xf4144a(0xba)],'trigger':B['id'],'rangeId':_0x1dece9[_0xf4144a(0xaa)],'previousResource':_0x4d2d50[_0xf4144a(0xda)],'nextResource':_0x2bfac9,'cursorOffset':_0x3fd00a['endIndex']+0x1,'externalMutations':_0x89503a});}},V={'id':_0x5e00f3(0x17f),'type':t[_0x5e00f3(0x9c)][_0x5e00f3(0x109)],'handler':(_0x4e7bc6,_0x98ff8e)=>{const _0x50a091=_0x5e00f3;if(!(_0x98ff8e!=null&&_0x98ff8e[_0x50a091(0xaa)]))return!0x1;let _0x1ac596=K(_0x4e7bc6,_0x98ff8e['unitId'],''),_0x37a330=_0x1ac596==null?void 0x0:_0x1ac596['model']['getFormula'](_0x1ac596['unitId'],_0x98ff8e['rangeId']),_0x114875=_0x1ac596?_(_0x1ac596[_0x50a091(0xa3)][_0x50a091(0x1a8)],_0x98ff8e[_0x50a091(0xaa)]):void 0x0;if(!_0x1ac596||!_0x37a330||!_0x114875)return!0x1;let _0x7fb9d9=je(_0x1ac596['resource']);return _0x7fb9d9[_0x50a091(0x1a1)][_0x98ff8e[_0x50a091(0xaa)]]={..._0x37a330,..._0x98ff8e[_0x50a091(0xe5)]?{'numberFormat':_0x98ff8e[_0x50a091(0xe5)]}:null},_0x98ff8e['numberFormat']||delete _0x7fb9d9[_0x50a091(0x1a1)][_0x98ff8e[_0x50a091(0xaa)]][_0x50a091(0xe5)],q({'accessor':_0x4e7bc6,'document':_0x1ac596[_0x50a091(0xa6)],'unitId':_0x1ac596[_0x50a091(0xba)],'trigger':V['id'],'rangeId':_0x98ff8e[_0x50a091(0xaa)],'previousResource':_0x1ac596['resource'],'nextResource':_0x7fb9d9,'cursorOffset':_0x114875[_0x50a091(0xfc)]+0x1,'externalMutations':{}});}},H={'id':_0x5e00f3(0x173),'type':t[_0x5e00f3(0x9c)][_0x5e00f3(0x109)],'handler':(_0x24fc68,_0x4fd919)=>G(_0x24fc68,_0x4fd919,'',H['id'])},U={'id':_0x5e00f3(0x194),'type':t[_0x5e00f3(0x9c)]['COMMAND'],'handler':(_0x207f94,_0x347b7d)=>G(_0x207f94,_0x347b7d,(_0x347b7d==null?void 0x0:_0x347b7d[_0x5e00f3(0x14c)])??'',U['id'])},W={'id':_0x5e00f3(0x13e),'type':t[_0x5e00f3(0x9c)][_0x5e00f3(0x109)],'handler':(_0x1d9900,_0x50957d)=>{const _0x47afc4=_0x5e00f3;if(!(_0x50957d!=null&&_0x50957d[_0x47afc4(0xaa)]))return!0x1;let _0x27eddf=K(_0x1d9900,_0x50957d[_0x47afc4(0xba)],'');if(!_0x27eddf)return!0x1;let _0x5088b0=_0x1d9900['get'](j)['getResult']({'unitId':_0x27eddf[_0x47afc4(0xba)],'rangeId':_0x50957d[_0x47afc4(0xaa)]});return _0x5088b0?G(_0x1d9900,_0x50957d,_0x5088b0[_0x47afc4(0x14c)],W['id']):!0x1;}};function G(_0x2f3cb3,_0x4f3c9e,_0x58518b,_0x5d4584){const _0x239094=_0x5e00f3;if(!(_0x4f3c9e!=null&&_0x4f3c9e[_0x239094(0xaa)]))return!0x1;let _0x1ef3ed=K(_0x2f3cb3,_0x4f3c9e[_0x239094(0xba)],'');if(!_0x1ef3ed)return!0x1;let _0x4bf463=h({'documentData':_0x1ef3ed[_0x239094(0xa3)],'resource':_0x1ef3ed['resource'],'rangeId':_0x4f3c9e[_0x239094(0xaa)],'text':_0x58518b});return _0x4bf463?q({'accessor':_0x2f3cb3,'document':_0x1ef3ed[_0x239094(0xa6)],'unitId':_0x1ef3ed[_0x239094(0xba)],'trigger':_0x5d4584,'rangeId':_0x4f3c9e[_0x239094(0xaa)],'previousResource':_0x1ef3ed[_0x239094(0xda)],'nextResource':_0x4bf463[_0x239094(0x85)],'previousDocumentData':_0x1ef3ed[_0x239094(0xa3)],'nextDocumentData':_0x4bf463[_0x239094(0xe4)],'cursorOffset':_0x4bf463[_0x239094(0xfa)],'externalMutations':{}}):!0x1;}function K(_0xd95ec5,_0x54ba9c,_0x1f59dd){const _0xadab98=_0x5e00f3;if(_0x1f59dd)return null;let _0x9d74a2=_0xd95ec5['get'](t[_0xadab98(0x141)]),_0x4bf626=(_0x54ba9c?_0x9d74a2['getUnit'](_0x54ba9c,t['UniverInstanceType'][_0xadab98(0xed)]):_0x9d74a2[_0xadab98(0x180)](t[_0xadab98(0x7d)]['UNIVER_DOC']))??null;if(!_0x4bf626)return null;let _0x14d395=_0x4bf626['getSnapshot'](),_0x69309c=_0x14d395['body'];if(_0x14d395[_0xadab98(0x80)]||!_0x69309c)return null;let _0x2ee9e1=_0xd95ec5[_0xadab98(0xd9)](O);return _0x2ee9e1[_0xadab98(0xf0)](_0x4bf626['getUnitId']())?null:{'document':_0x4bf626,'body':_0x69309c,'documentData':_0x14d395,'model':_0x2ee9e1,'resource':_0x2ee9e1[_0xadab98(0xf1)](_0x4bf626[_0xadab98(0x107)]())??c(),'unitId':_0x4bf626['getUnitId']()};}function be(_0x406227,_0x2f16d4){const _0x460b21=_0x5e00f3;var _0x7326e;return(_0x7326e=_0x406227['get'](n[_0x460b21(0x13b)])[_0x460b21(0x111)]({'subUnitId':_0x2f16d4,'unitId':_0x2f16d4}))==null?void 0x0:_0x7326e[0x0];}function xe(_0x4f69c1,_0x44a1ad,_0x65edaa){const _0x5035b6=_0x5e00f3;if((_0x4f69c1==null?void 0x0:_0x4f69c1[_0x5035b6(0x148)])===_0x5035b6(0x90)){var _0x47cab2;let _0xb46c97=((_0x47cab2=_0x44a1ad[_0x5035b6(0x16e)])==null?void 0x0:_0x47cab2[_0x5035b6(0x87)](_0x3f59e5=>_0x3f59e5[_0x5035b6(0xaf)]===_0x4f69c1['paragraphId']))??[];if(_0xb46c97[_0x5035b6(0x19c)]!==0x1)return null;let _0x4cfb4e=_0xb46c97[0x0],_0x547dd9=(0x0,t[_0x5035b6(0x12c)])(_0x44a1ad,_0x4cfb4e),_0x708a78=_0x4cfb4e['startIndex']-_0x547dd9,_0x4a61a5=_0x4f69c1[_0x5035b6(0x161)]==='end'?_0x708a78:_0x4f69c1['position'];if(!Number[_0x5035b6(0x7b)](_0x4a61a5)||_0x4a61a5<0x0||_0x4a61a5>_0x708a78)return null;let _0x51c86e=_0x547dd9+_0x4a61a5;return{'startOffset':_0x51c86e,'endOffset':_0x51c86e};}if((_0x4f69c1==null?void 0x0:_0x4f69c1[_0x5035b6(0x148)])===_0x5035b6(0xb8))return!Number['isInteger'](_0x4f69c1[_0x5035b6(0xcd)])||!Number[_0x5035b6(0x7b)](_0x4f69c1[_0x5035b6(0x9e)])?null:{'startOffset':Math[_0x5035b6(0xf7)](_0x4f69c1[_0x5035b6(0xcd)],_0x4f69c1['endOffset']),'endOffset':Math[_0x5035b6(0xf2)](_0x4f69c1[_0x5035b6(0xcd)],_0x4f69c1[_0x5035b6(0x9e)])};let _0x48267f=(_0x4f69c1==null?void 0x0:_0x4f69c1[_0x5035b6(0x148)])===_0x5035b6(0x150)?_0x4f69c1[_0x5035b6(0x150)]:_0x65edaa;return!_0x48267f||_0x48267f[_0x5035b6(0x170)]?null:{'startOffset':Math[_0x5035b6(0xf7)](_0x48267f['startOffset'],_0x48267f[_0x5035b6(0x9e)]),'endOffset':Math['max'](_0x48267f[_0x5035b6(0xcd)],_0x48267f[_0x5035b6(0x9e)])};}function Se(_0x3079c7,_0x33d1ee,_0x29bcca,_0xd3920e){const _0x38c614=_0x5e00f3;let _0x4c319c=_0x3079c7[_0x38c614(0xd9)](r['LexerTreeBuilder']),_0x8c1f00=_0x29bcca['startsWith']('=')?_0x29bcca['slice'](0x1):_0x29bcca,_0x18ef57=_0x4c319c[_0x38c614(0x17d)](_0x8c1f00);if(!_0x18ef57)return null;let _0x518752=_0x3079c7[_0x38c614(0xd9)](e[_0x38c614(0x12a)]),_0x47b014=(0x0,e[_0x38c614(0x84)])({'qualifiers':(0x0,e[_0x38c614(0x113)])(_0x18ef57),'explicitReferences':_0xd3920e??[],'resolveBinding':_0x2bb794=>_0x518752[_0x38c614(0x166)](_0x33d1ee,_0x2bb794)});return _0x47b014[_0x38c614(0xe8)]===_0x38c614(0x158)?_0x47b014[_0x38c614(0x188)]:null;}function Ce(_0x47cb0e,_0x3765e7,_0x40b16a){const _0x5af77f=_0x5e00f3;var _0x28ffd2;let _0x2c20f0=(0x0,t[_0x5af77f(0x8b)])(0x6);for(;_0x47cb0e!=null&&(_0x28ffd2=_0x47cb0e['customRanges'])!=null&&_0x28ffd2[_0x5af77f(0x6f)](_0x3c753c=>_0x3c753c[_0x5af77f(0xaa)]===_0x2c20f0)||_0x3765e7[_0x5af77f(0x6c)](_0x40b16a,_0x2c20f0);)_0x2c20f0=(0x0,t[_0x5af77f(0x8b)])(0x6);return _0x2c20f0;}function we(_0x1dd066){try{return te(_0x1dd066);}catch(_0x460cd4){if(_0x460cd4 instanceof m)return null;throw _0x460cd4;}}function Te(_0x278047){const _0x381347=_0x5e00f3;let _0x55b722=_0x278047[_0x381347(0x16a)]&&_0x278047[_0x381347(0xe4)]?De(_0x278047[_0x381347(0xa6)],_0x278047[_0x381347(0xba)],_0x278047[_0x381347(0x16a)],_0x278047[_0x381347(0xe4)],_0x278047['cursorOffset'],_0x278047[_0x381347(0xc1)]):null;return _0x278047['previousDocumentData']&&_0x278047[_0x381347(0xe4)]&&!_0x55b722?null:{'documentRedo':_0x55b722,'resourceRedo':{'id':L['id'],'params':{'unitId':_0x278047[_0x381347(0xba)],'resource':_0x278047[_0x381347(0x85)]}},'resourceUndo':{'id':L['id'],'params':{'unitId':_0x278047['unitId'],'resource':_0x278047['previousResource']}}};}function Ee(_0x1e1e0b,_0x1d85c4,_0x5ac1ed,_0x555a18){const _0x4fc7e8=_0x5e00f3;_0x555a18[_0x4fc7e8(0x12e)]({'id':_0x1e1e0b[_0x4fc7e8(0xc1)]+':'+_0x1e1e0b[_0x4fc7e8(0xaa)],'unitID':_0x1e1e0b['unitId'],'redoMutations':[..._0x1e1e0b['externalMutations'][_0x4fc7e8(0xbc)]?[_0x1e1e0b['externalMutations'][_0x4fc7e8(0xbc)]]:[],..._0x1d85c4['documentRedo']?[_0x1d85c4[_0x4fc7e8(0x178)]]:[],_0x1d85c4[_0x4fc7e8(0xa1)]],'undoMutations':[_0x1d85c4[_0x4fc7e8(0x101)],..._0x5ac1ed?[_0x5ac1ed]:[],..._0x1e1e0b['externalMutations'][_0x4fc7e8(0x179)]?[_0x1e1e0b['externalMutations'][_0x4fc7e8(0x179)]]:[]]});}function q(_0x3cd426){const _0x4ea16e=_0x5e00f3;let _0x2f2787=_0x3cd426[_0x4ea16e(0x175)]['get'](t[_0x4ea16e(0x174)]),_0x59a426=_0x3cd426[_0x4ea16e(0x175)][_0x4ea16e(0xd9)](t[_0x4ea16e(0x10d)]),_0x2ab766=_0x3cd426['accessor'][_0x4ea16e(0xd9)](n[_0x4ea16e(0x13b)]),_0x1b9f5b=Te(_0x3cd426);if(!_0x1b9f5b)return!0x1;let _0x547b4a=!0x1,_0x11cbed=null,_0x1ac01b=!0x1;try{if(_0x3cd426[_0x4ea16e(0x6b)][_0x4ea16e(0xbc)]){if(!_0x2f2787['syncExecuteCommand'](_0x3cd426[_0x4ea16e(0x6b)][_0x4ea16e(0xbc)]['id'],_0x3cd426[_0x4ea16e(0x6b)][_0x4ea16e(0xbc)][_0x4ea16e(0x164)]))return!0x1;_0x547b4a=!0x0;}if(_0x1b9f5b['documentRedo']){let _0x5c71cb=_0x2f2787[_0x4ea16e(0x145)](_0x1b9f5b[_0x4ea16e(0x178)]['id'],_0x1b9f5b[_0x4ea16e(0x178)]['params']);if(!_0x5c71cb)return J(_0x2f2787,_0x3cd426['externalMutations'],_0x547b4a),!0x1;_0x11cbed={'id':n[_0x4ea16e(0x68)]['id'],'params':{..._0x5c71cb,'noHistory':!0x0,'noNeedSetTextRange':!0x0,'segmentId':''}};}if(!_0x2f2787[_0x4ea16e(0x145)](_0x1b9f5b[_0x4ea16e(0xa1)]['id'],_0x1b9f5b[_0x4ea16e(0xa1)][_0x4ea16e(0x164)]))return Oe(_0x2f2787,_0x11cbed),J(_0x2f2787,_0x3cd426[_0x4ea16e(0x6b)],_0x547b4a),!0x1;_0x1ac01b=!0x0,Ee(_0x3cd426,_0x1b9f5b,_0x11cbed,_0x59a426);}catch(_0x5abae1){throw _0x1ac01b&&_0x2f2787[_0x4ea16e(0x145)](_0x1b9f5b[_0x4ea16e(0x101)]['id'],_0x1b9f5b[_0x4ea16e(0x101)][_0x4ea16e(0x164)]),Oe(_0x2f2787,_0x11cbed),J(_0x2f2787,_0x3cd426[_0x4ea16e(0x6b)],_0x547b4a),_0x5abae1;}return _0x2ab766[_0x4ea16e(0x98)]([{'startOffset':_0x3cd426[_0x4ea16e(0xfa)],'endOffset':_0x3cd426['cursorOffset'],'segmentId':''}],{'unitId':_0x3cd426[_0x4ea16e(0xba)],'subUnitId':_0x3cd426['unitId']},!0x1,{[n['DOC_SELECTION_OPTION_PRESERVE_CARET']]:!0x0}),!0x0;}function De(_0x409cac,_0xb87dd3,_0x2c0fb9,_0x1d4a34,_0x298750,_0x5ec2e5){const _0x1526cf=_0x5e00f3;let _0x1cc114=ke(_0x2c0fb9,_0x1d4a34,(0x0,t[_0x1526cf(0x6d)])(_0x409cac,''));return _0x1cc114?{'id':n[_0x1526cf(0x68)]['id'],'params':{'unitId':_0xb87dd3,'actions':_0x1cc114,'segmentId':'','textRanges':[{'startOffset':_0x298750,'endOffset':_0x298750,'collapsed':!0x0,'segmentId':''}],'isEditing':!0x1,'noHistory':!0x0,'noNeedSetTextRange':!0x0,'trigger':_0x5ec2e5}}:null;}function Oe(_0x208da4,_0x7d225e){const _0x4cb854=_0x5e00f3;_0x7d225e&&_0x208da4[_0x4cb854(0x145)](_0x7d225e['id'],_0x7d225e[_0x4cb854(0x164)]);}function J(_0x2cf102,_0x2bff7f,_0x31ff4e){const _0x2f1f3d=_0x5e00f3;_0x31ff4e&&_0x2bff7f[_0x2f1f3d(0x179)]&&_0x2cf102[_0x2f1f3d(0x145)](_0x2bff7f[_0x2f1f3d(0x179)]['id'],_0x2bff7f[_0x2f1f3d(0x179)]['params']);}function ke(_0xb8df35,_0x13e572,_0x4797d5){const _0x32ef7c=_0x5e00f3;let _0x3db0b0=_0xb8df35[_0x32ef7c(0x1a8)],_0x4d812e=_0x13e572[_0x32ef7c(0x1a8)],_0x61d147=Ae(_0x3db0b0==null?void 0x0:_0x3db0b0['dataStream'],_0x4d812e==null?void 0x0:_0x4d812e[_0x32ef7c(0x197)]);if(!_0x61d147||!_0x4d812e)return null;let _0x619f91=new t[(_0x32ef7c(0x125))]();return _0x619f91['retain'](_0x61d147[_0x32ef7c(0x11c)]),_0x61d147['insertLength']>0x0&&_0x619f91[_0x32ef7c(0xb6)](_0x61d147[_0x32ef7c(0x11f)],(0x0,t['getBodySliceForTextXAction'])(_0x4d812e,_0x61d147['start'],_0x61d147[_0x32ef7c(0x11c)]+_0x61d147[_0x32ef7c(0x11f)],!0x1)),_0x61d147[_0x32ef7c(0x120)]>0x0&&_0x619f91[_0x32ef7c(0xf3)](_0x61d147[_0x32ef7c(0x120)]),t[_0x32ef7c(0xb1)][_0x32ef7c(0x122)]()['editOp'](_0x619f91[_0x32ef7c(0x17e)](),_0x4797d5);}function Ae(_0x537899,_0x1f1dbd){const _0xc1e370=_0x5e00f3;if(_0x537899==null||_0x1f1dbd==null||_0x537899===_0x1f1dbd)return null;let _0x24a631=0x0;for(;_0x24a631<_0x537899[_0xc1e370(0x19c)]&&_0x24a631<_0x1f1dbd[_0xc1e370(0x19c)]&&_0x537899[_0x24a631]===_0x1f1dbd[_0x24a631];)_0x24a631+=0x1;let _0x5dfd92=_0x537899['length'],_0x57aee5=_0x1f1dbd['length'];for(;_0x5dfd92>_0x24a631&&_0x57aee5>_0x24a631&&_0x537899[_0x5dfd92-0x1]===_0x1f1dbd[_0x57aee5-0x1];)--_0x5dfd92,--_0x57aee5;return{'start':_0x24a631,'deleteLength':_0x5dfd92-_0x24a631,'insertLength':_0x57aee5-_0x24a631};}function je(_0x2799a0){const _0x140e81=_0x5e00f3;return{'schemaVersion':0x1,'formulas':Object[_0x140e81(0x86)](Object[_0x140e81(0xd8)](_0x2799a0[_0x140e81(0x1a1)])[_0x140e81(0x124)](([_0x29fb9a,_0x46778c])=>[_0x29fb9a,{..._0x46778c,..._0x46778c[_0x140e81(0xe5)]?{'numberFormat':{..._0x46778c[_0x140e81(0xe5)]}}:null,..._0x46778c[_0x140e81(0xbb)]?{'lastValue':{..._0x46778c[_0x140e81(0xbb)]}}:null}]))};}let Y=class extends t[_0x5e00f3(0xe7)]{constructor(_0x2d9248,_0x1f0113,_0x1dcbc1,_0x24fc80){const _0x34f403=_0x5e00f3;super(),this['_instanceService']=_0x2d9248,this[_0x34f403(0x1a6)]=_0x1f0113,this['_model']=_0x1dcbc1,this['_service']=_0x24fc80,D(this,_0x34f403(0x17a),new Set()),D(this,'_syncScheduled',!0x1),D(this,_0x34f403(0x81),!0x1),this['_instanceService'][_0x34f403(0x185)](t[_0x34f403(0x7d)][_0x34f403(0xed)])[_0x34f403(0x195)](_0x5af9cb=>this[_0x34f403(0x1a7)][_0x34f403(0xd6)](_0x5af9cb)),this[_0x34f403(0x11a)](this[_0x34f403(0xc0)][_0x34f403(0xf5)]['subscribe'](({unitId:_0x8a7111})=>this['_syncUnit'](_0x8a7111))),this[_0x34f403(0x11a)](this['_instanceService'][_0x34f403(0xf8)][_0x34f403(0x8c)](({unit:_0x591bf9})=>{const _0x1fe5c4=_0x34f403;_0x591bf9[_0x1fe5c4(0x148)]===t[_0x1fe5c4(0x7d)][_0x1fe5c4(0xed)]&&this[_0x1fe5c4(0xe3)](_0x591bf9[_0x1fe5c4(0x107)]());})),this['disposeWithMe'](this[_0x34f403(0x129)][_0x34f403(0x10f)][_0x34f403(0x8c)](_0x10690f=>{const _0x4e049c=_0x34f403;this['_service'][_0x4e049c(0xb7)](_0x10690f[_0x4e049c(0x107)]());})),this[_0x34f403(0x11a)](this[_0x34f403(0x1a6)][_0x34f403(0x137)](_0x1b527a=>{const _0x401297=_0x34f403;if(_0x1b527a['id']===n[_0x401297(0x68)]['id']&&Me(_0x1b527a[_0x401297(0x164)])){let _0x483896=_0x1b527a['params'];_0x483896['segmentId']||this[_0x401297(0x16f)](_0x483896[_0x401297(0xba)]);}}));}['dispose'](){const _0x1a036a=_0x5e00f3;this['_isDisposed']=!0x0,super[_0x1a036a(0x15d)]();}[_0x5e00f3(0xe3)](_0x38c352){const _0x52874c=_0x5e00f3;this[_0x52874c(0x17a)][_0x52874c(0x123)](_0x38c352),!this[_0x52874c(0xd5)]&&(this[_0x52874c(0xd5)]=!0x0,queueMicrotask(()=>{const _0x2e3f5a=_0x52874c;if(this[_0x2e3f5a(0xd5)]=!0x1,this[_0x2e3f5a(0x81)])return;let _0x2d799f=Array['from'](this[_0x2e3f5a(0x17a)]);this['_pendingUnitIds'][_0x2e3f5a(0xee)](),_0x2d799f['forEach'](_0x30eafb=>this[_0x2e3f5a(0x16f)](_0x30eafb));}));}[_0x5e00f3(0x16f)](_0xb1937f){const _0x17d099=_0x5e00f3;let _0x33331=this[_0x17d099(0x129)][_0x17d099(0x199)](_0xb1937f,t[_0x17d099(0x7d)][_0x17d099(0xed)]);_0x33331&&this[_0x17d099(0x1a7)][_0x17d099(0xd6)](_0x33331);}};Y=A([k(0x0,t[_0x5e00f3(0x141)]),k(0x1,t[_0x5e00f3(0x174)]),k(0x2,(0x0,t['Inject'])(O)),k(0x3,(0x0,t[_0x5e00f3(0x138)])(j))],Y);function Me(_0xcb96e2){const _0x24a437=_0x5e00f3;return typeof _0xcb96e2==_0x24a437(0xec)&&!!_0xcb96e2&&_0x24a437(0xba)in _0xcb96e2&&typeof _0xcb96e2[_0x24a437(0xba)]=='string'&&(!(_0x24a437(0x170)in _0xcb96e2)||_0xcb96e2['segmentId']===void 0x0||typeof _0xcb96e2[_0x24a437(0x170)]==_0x24a437(0x151));}let X=class extends t[_0x5e00f3(0xe7)]{constructor(_0x54106d,_0x87a6c5){const _0x258ac2=_0x5e00f3;super(),this[_0x258ac2(0x18c)]=_0x54106d,this[_0x258ac2(0x119)]=_0x87a6c5,this[_0x258ac2(0x11a)](this[_0x258ac2(0x18c)][_0x258ac2(0x198)]({'pluginName':o,'businesses':[t[_0x258ac2(0x7d)][_0x258ac2(0xed)]],'toJson':_0x31a8c4=>JSON['stringify'](this[_0x258ac2(0x119)][_0x258ac2(0x17e)](_0x31a8c4)),'parseJson':_0x6c15a8=>JSON['parse'](_0x6c15a8),'onLoad':(_0x34e2ae,_0x538ff4)=>{const _0x4bf637=_0x258ac2;this['_docFormulaModel'][_0x4bf637(0xb2)](_0x34e2ae,_0x538ff4);},'onUnLoad':_0x49ddaf=>this[_0x258ac2(0x119)][_0x258ac2(0x191)](_0x49ddaf)}));}};X=A([k(0x0,t[_0x5e00f3(0x19a)]),k(0x1,(0x0,t[_0x5e00f3(0x138)])(O))],X);var Ne=_0x5e00f3(0xfe),Pe=_0x5e00f3(0x17c);const Fe={};let Z=class extends t[_0x5e00f3(0xe7)]{constructor(_0x1daf28,_0x59db42,_0x3e05e3){const _0x1aeabd=_0x5e00f3;super(),this[_0x1aeabd(0x189)]=_0x1daf28,this[_0x1aeabd(0x177)]=_0x59db42,this['disposeWithMe'](_0x3e05e3[_0x1aeabd(0x94)]({'resolve':(_0x18c66c,_0xc0bfa7)=>{const _0x541c3b=_0x1aeabd;var _0x5420bf;return((_0x5420bf=_0xc0bfa7['customRanges'])==null?void 0x0:_0x5420bf[_0x541c3b(0x87)](g)[_0x541c3b(0x124)](_0x235142=>({'startOffset':_0x235142[_0x541c3b(0xc4)],'endOffset':_0x235142[_0x541c3b(0xfc)]+0x1,'text':this[_0x541c3b(0x165)](_0x18c66c,_0x235142[_0x541c3b(0xaa)])})))??[];}})),this[_0x1aeabd(0x11a)](this['_formulaService'][_0x1aeabd(0x140)][_0x1aeabd(0x8c)](({unitId:_0x1dd4db})=>{const _0x2e8db2=_0x1aeabd;_0x3e05e3[_0x2e8db2(0x82)](_0x1dd4db);}));}['resolveFormula'](_0x55161a,_0x9a90f7){const _0x22d9b1=_0x5e00f3;var _0x273aff;return((_0x273aff=this[_0x22d9b1(0x177)][_0x22d9b1(0x186)]({'unitId':_0x55161a,'rangeId':_0x9a90f7}))==null?void 0x0:_0x273aff['text'])??'';}['resolveText'](_0x42d81c,_0x4d95ca,_0x13538f){const _0x180715=_0x5e00f3;var _0x5116f2;let _0x587dba=this['_univerInstanceService']['getUnit'](_0x42d81c,t[_0x180715(0x7d)][_0x180715(0xed)]),_0x5d60bd=_0x587dba==null?void 0x0:_0x587dba['getBody']();if(!_0x5d60bd)return'';let _0x518f1e=_0x5d60bd['dataStream']['slice'](_0x4d95ca,_0x13538f),_0x32e87b=((_0x5116f2=_0x5d60bd[_0x180715(0xce)])==null?void 0x0:_0x5116f2['filter'](_0x44e208=>g(_0x44e208)&&_0x44e208[_0x180715(0xc4)]>=_0x4d95ca&&_0x44e208[_0x180715(0xfc)]<_0x13538f)[_0x180715(0x72)]((_0x382d2a,_0x204eb6)=>_0x204eb6[_0x180715(0xc4)]-_0x382d2a['startIndex']))??[];for(let _0x55b6e7 of _0x32e87b){let _0x547d62=_0x55b6e7[_0x180715(0xc4)]-_0x4d95ca,_0x27eddb=_0x55b6e7[_0x180715(0xfc)]-_0x4d95ca+0x1;_0x518f1e=''+_0x518f1e[_0x180715(0x105)](0x0,_0x547d62)+this['resolveFormula'](_0x42d81c,_0x55b6e7[_0x180715(0xaa)])+_0x518f1e[_0x180715(0x105)](_0x27eddb);}return _0x518f1e;}[_0x5e00f3(0x143)](_0x2b80cf){return Ie(_0x2b80cf);}[_0x5e00f3(0x14a)](_0x46a567,_0x585de5,_0x1ec3ee={}){const _0x196bfc=_0x5e00f3;var _0x1eb2f9;return re({'id':_0x46a567,'body':_0x585de5,'documentStyle':{}},(((_0x1eb2f9=_0x585de5[_0x196bfc(0xce)])==null?void 0x0:_0x1eb2f9[_0x196bfc(0x87)](g))??[])['map'](_0x1ac260=>({'rangeId':_0x1ac260[_0x196bfc(0xaa)],'text':_0x1ec3ee[_0x1ac260[_0x196bfc(0xaa)]]??this['resolveFormula'](_0x46a567,_0x1ac260[_0x196bfc(0xaa)])})))['body']??{'dataStream':''};}};Z=A([k(0x0,t[_0x5e00f3(0x141)]),k(0x1,(0x0,t[_0x5e00f3(0x138)])(j)),k(0x2,(0x0,t[_0x5e00f3(0x138)])(n['DocTextResolverService']))],Z);function Ie(_0x329c7e){const _0x27fab5=_0x5e00f3;var _0x33ae95,_0xf98c2a;let _0x165c17=Le(_0x329c7e),_0x2c55d4=re(_0x329c7e,(((_0x33ae95=_0x329c7e['body'])==null||(_0x33ae95=_0x33ae95[_0x27fab5(0xce)])==null?void 0x0:_0x33ae95[_0x27fab5(0x87)](g))??[])[_0x27fab5(0x124)](_0x814953=>({'rangeId':_0x814953[_0x27fab5(0xaa)],'text':Re(_0x165c17==null?void 0x0:_0x165c17[_0x27fab5(0x1a1)][_0x814953['rangeId']])})));return _0x2c55d4[_0x27fab5(0x15b)]=(_0xf98c2a=_0x2c55d4['resources'])==null?void 0x0:_0xf98c2a['filter'](_0x2943c5=>_0x2943c5[_0x27fab5(0xbf)]!==o),_0x2c55d4;}function Le(_0x4e3386){const _0x38c66e=_0x5e00f3;var _0x5d98fb;let _0x2a3ac5=(_0x5d98fb=_0x4e3386[_0x38c66e(0x15b)])==null||(_0x5d98fb=_0x5d98fb['find'](_0x274165=>_0x274165[_0x38c66e(0xbf)]==='DOC_FORMULA_PLUGIN'))==null?void 0x0:_0x5d98fb[_0x38c66e(0xd2)];if(_0x2a3ac5)try{let _0x1ea86a=JSON['parse'](_0x2a3ac5);return l(_0x1ea86a)?_0x1ea86a:void 0x0;}catch{return;}}function Re(_0x3adcb9){const _0x38432c=_0x5e00f3;return _0x3adcb9?(0x0,e[_0x38432c(0xdd)])({'lastValue':_0x3adcb9[_0x38432c(0xbb)],'numberFormat':_0x3adcb9[_0x38432c(0xe5)]})['text']:'';}let Q=class extends t[_0x5e00f3(0xe7)]{constructor(_0x46af2e,_0x483674,_0xd22289){const _0x23b27b=_0x5e00f3;super(),this[_0x23b27b(0x177)]=_0x46af2e,this[_0x23b27b(0xeb)]=_0x483674,this['disposeWithMe'](_0xd22289[_0x23b27b(0x15f)](this));}[_0x5e00f3(0x92)](_0x4b7b35){const _0x2666ad=_0x5e00f3;let _0x5b2084=new Map();for(let _0x4065b1 of this[_0x2666ad(0x177)]['getRegisteredFormulas']()){var _0x16d912;if(!this['_cacheEligibilityService']['assess'](_0x4065b1['config'][_0x2666ad(0xd4)],_0x4065b1[_0x2666ad(0xe6)])[_0x2666ad(0xf6)])continue;let _0xf145ca=(0x0,e[_0x2666ad(0x13a)])(_0x4065b1[_0x2666ad(0xe6)]),_0x5e1e37=_0xf145ca?(0x0,e['toFormulaLastValue'])(_0xf145ca):null;if(!_0x5e1e37||ze(_0x4065b1[_0x2666ad(0x182)][_0x2666ad(0xbb)],_0x5e1e37))continue;let _0x151748=_0x5b2084['get'](_0x4065b1[_0x2666ad(0x76)][_0x2666ad(0xba)])??[];_0x151748[_0x2666ad(0xe9)]({'rangeId':_0x4065b1[_0x2666ad(0x76)][_0x2666ad(0xaa)],'expectedFormula':_0x4065b1[_0x2666ad(0x182)][_0x2666ad(0xd4)],'expectedNumberFormat':(_0x16d912=_0x4065b1[_0x2666ad(0x182)][_0x2666ad(0xe5)])==null?void 0x0:_0x16d912[_0x2666ad(0x156)],'expectedReferenceRevision':_0x4065b1['referenceRevision'],'lastValue':_0x5e1e37}),_0x5b2084[_0x2666ad(0x16c)](_0x4065b1[_0x2666ad(0x76)]['unitId'],_0x151748);}return Array[_0x2666ad(0x14e)](_0x5b2084,([_0x55246b,_0x2c7667])=>({'id':R['id'],'params':{'unitId':_0x55246b,'updates':_0x2c7667}}));}};Q=A([k(0x0,(0x0,t[_0x5e00f3(0x138)])(j)),k(0x1,(0x0,t[_0x5e00f3(0x138)])(e['FormulaCacheEligibilityService'])),k(0x2,(0x0,t[_0x5e00f3(0x138)])(e[_0x5e00f3(0xfd)]))],Q);function ze(_0x3a1122,_0x58c77b){const _0x515a21=_0x5e00f3;return(_0x3a1122==null?void 0x0:_0x3a1122['v'])===_0x58c77b['v']&&(_0x3a1122==null?void 0x0:_0x3a1122['t'])===_0x58c77b['t']&&(_0x3a1122==null?void 0x0:_0x3a1122['pattern'])===_0x58c77b[_0x515a21(0x156)];}let $=class extends t[_0x5e00f3(0x77)]{constructor(_0x2d6682=Fe,_0xb94897,_0x174a56,_0x5e04b0){const _0x241852=_0x5e00f3;super(),this[_0x241852(0x162)]=_0x2d6682,this[_0x241852(0x126)]=_0xb94897,this[_0x241852(0x1a6)]=_0x174a56,this[_0x241852(0x12f)]=_0x5e04b0;let {..._0x334be1}=(0x0,t[_0x241852(0xc5)])({},Fe,this[_0x241852(0x162)]);this[_0x241852(0x12f)][_0x241852(0x131)](_0x241852(0x9a),_0x334be1);}[_0x5e00f3(0x8d)](){const _0x3826ba=_0x5e00f3;this['_injector'][_0x3826ba(0x123)]([O]),this['_injector']['add']([j]),this[_0x3826ba(0x126)][_0x3826ba(0x123)]([X]),this[_0x3826ba(0x126)][_0x3826ba(0x123)]([Y]),this[_0x3826ba(0x126)][_0x3826ba(0x123)]([Q]),this[_0x3826ba(0x126)]['add']([Z]),(0x0,t[_0x3826ba(0x17b)])(this[_0x3826ba(0x126)],[[O],[X],[Y],[Q],[Z]]),[F,I,L,R,z,B,V,H,U,W][_0x3826ba(0x195)](_0x45e621=>this[_0x3826ba(0x11a)](this[_0x3826ba(0x1a6)]['registerCommand'](_0x45e621)));}};D($,_0x5e00f3(0x142),o),D($,_0x5e00f3(0xc9),Ne),D($,'version',Pe),D($,'type',t[_0x5e00f3(0x7d)][_0x5e00f3(0xed)]),$=A([(0x0,t[_0x5e00f3(0x1a4)])(a[_0x5e00f3(0x1a0)],e['UniverProFormulaEnginePlugin'],n['UniverDocsPlugin']),k(0x1,(0x0,t[_0x5e00f3(0x138)])(t[_0x5e00f3(0x18f)])),k(0x2,t['ICommandService']),k(0x3,t[_0x5e00f3(0x12b)])],$),exports[_0x5e00f3(0x132)]=W,exports[_0x5e00f3(0x95)]=s,exports[_0x5e00f3(0x1a5)]='',exports[_0x5e00f3(0x144)]=o,exports[_0x5e00f3(0xcb)]=0x1,Object['defineProperty'](exports,_0x5e00f3(0x155),{'enumerable':!0x0,'get':function(){return Z;}}),Object[_0x5e00f3(0xae)](exports,_0x5e00f3(0x168),{'enumerable':!0x0,'get':function(){return Y;}}),exports[_0x5e00f3(0x10a)]=O,Object[_0x5e00f3(0xae)](exports,_0x5e00f3(0x11b),{'enumerable':!0x0,'get':function(){return X;}}),exports[_0x5e00f3(0xc8)]=ve,Object[_0x5e00f3(0xae)](exports,_0x5e00f3(0x172),{'enumerable':!0x0,'get':function(){return j;}}),exports[_0x5e00f3(0x104)]=z,exports[_0x5e00f3(0x9b)]=m,exports[_0x5e00f3(0x152)]=H,exports['RemoveDocFormulaMutation']=I,exports[_0x5e00f3(0x18b)]=U,exports[_0x5e00f3(0xa5)]=R,exports['SetDocFormulaMutation']=F,exports[_0x5e00f3(0x157)]=V,exports[_0x5e00f3(0x69)]=L,Object['defineProperty'](exports,_0x5e00f3(0xc3),{'enumerable':!0x0,'get':function(){return $;}}),exports[_0x5e00f3(0xd7)]=B,exports['assertSafeDocFormulaInsertRange']=ie,exports[_0x5e00f3(0xcc)]=te,exports[_0x5e00f3(0x114)]=h,exports['buildUpdateDocFormulaActions']=ne,exports['createEmptyDocFormulaResource']=c,exports[_0x5e00f3(0x79)]=Ie,exports[_0x5e00f3(0xc7)]=_,exports[_0x5e00f3(0x13c)]=u,exports[_0x5e00f3(0xa4)]=g,exports[_0x5e00f3(0x18d)]=l,exports[_0x5e00f3(0x83)]=d;
package/lib/es/facade.js CHANGED
@@ -1 +1 @@
1
- var _0x2f995c=_0x2a51;function _0x5e18(){var _0x50f453=['5542453EEMuip','constructor','getFormulaAt','Document\x20','startOffset','symbol','_commandService','numberFormat','_rangeId','12IVCBZV','_univerInstanceService','getConfig','string','toPrimitive','_service','saveUnit','_insert','UNIVER_DOC','setNumberFormat','createInstance','384156UkKDJE','_docsFormulaDisplayTextService','map','getSegmentId','range','insertFormula','getFormulas','startIndex','_injector','call','_document','default','getFormula','getResult','remove','114460TYPTrN','1706982FfAtue','\x20could\x20not\x20be\x20serialized.','getId','function','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','saveFormulaDisplayTextSnapshot','replaceWithFormula','prototype','describe','26197083OqFkbj','7381376YiImVV','convertToText','rangeId','_unitId','endIndex','defineProperty','update','extend','filter','object','syncExecuteCommand','formula','customRanges','_initialize','decorate','_docsFormulaCommandService','get','144095zBCKfn','_docsFormulaResourceLoaderService','length','_docsFormulaModel','getOwnPropertyDescriptor','externalReferences','getRange','_model','15WgWhsn','_getCompleteRanges','_createFormula','paragraph','appendFormula'];_0x5e18=function(){return _0x50f453;};return _0x5e18();}function _0x2a51(_0xc12d4f,_0x41e059){_0xc12d4f=_0xc12d4f-0x166;var _0x5e1824=_0x5e18();var _0x2a5185=_0x5e1824[_0xc12d4f];return _0x2a5185;}(function(_0x2d33be,_0x2f1a30){var _0x10559e=_0x2a51,_0x4bccb6=_0x2d33be();while(!![]){try{var _0xbe657d=-parseInt(_0x10559e(0x16a))/0x1+-parseInt(_0x10559e(0x1a6))/0x2+-parseInt(_0x10559e(0x18d))/0x3*(-parseInt(_0x10559e(0x169))/0x4)+-parseInt(_0x10559e(0x185))/0x5*(parseInt(_0x10559e(0x19b))/0x6)+parseInt(_0x10559e(0x192))/0x7+-parseInt(_0x10559e(0x174))/0x8+parseInt(_0x10559e(0x173))/0x9;if(_0xbe657d===_0x2f1a30)break;else _0x4bccb6['push'](_0x4bccb6['shift']());}catch(_0x17333a){_0x4bccb6['push'](_0x4bccb6['shift']());}}}(_0x5e18,0xebe7f));import{ConvertDocFormulaToTextCommand as _0x1b4717,DocFormulaDisplayTextService as _0x5b148b,DocFormulaModel as _0x2f9e95,DocFormulaService as _0x198058,InsertDocFormulaCommand as _0x30cba6,RemoveDocFormulaCommand as _0x369bb8,ReplaceDocFormulaWithTextCommand as _0x1f2ab5,SetDocFormulaNumberFormatCommand as _0x307588,UpdateDocFormulaCommand as _0x5e3e8d,isDocFormulaRange as _0xa2ed8b}from'@univerjs-pro/docs-formula';import{ICommandService as _0x287051,IResourceLoaderService as _0x364da6,IUniverInstanceService as _0x4f0114,Inject as _0x274288,UniverInstanceType as _0x53f0d1}from'@univerjs/core';import{FDocument as _0x44b991,FDocumentParagraph as _0x6fd9cc,FDocumentTextRange as _0xd6a089}from'@univerjs/docs/facade';function v(_0x4bee6b,_0x1b1ffa){return function(_0x329d23,_0xf87734){_0x1b1ffa(_0x329d23,_0xf87734,_0x4bee6b);};}function y(_0xfe5379,_0x385f06,_0x1370bd,_0x7d891c){var _0x408f33=_0x2a51,_0x592392=arguments[_0x408f33(0x187)],_0xe8b21e=_0x592392<0x3?_0x385f06:_0x7d891c===null?_0x7d891c=Object[_0x408f33(0x189)](_0x385f06,_0x1370bd):_0x7d891c,_0x54de89;if(typeof Reflect==_0x408f33(0x17d)&&typeof Reflect[_0x408f33(0x182)]=='function')_0xe8b21e=Reflect[_0x408f33(0x182)](_0xfe5379,_0x385f06,_0x1370bd,_0x7d891c);else{for(var _0x5f6411=_0xfe5379['length']-0x1;_0x5f6411>=0x0;_0x5f6411--)(_0x54de89=_0xfe5379[_0x5f6411])&&(_0xe8b21e=(_0x592392<0x3?_0x54de89(_0xe8b21e):_0x592392>0x3?_0x54de89(_0x385f06,_0x1370bd,_0xe8b21e):_0x54de89(_0x385f06,_0x1370bd))||_0xe8b21e);}return _0x592392>0x3&&_0xe8b21e&&Object[_0x408f33(0x179)](_0x385f06,_0x1370bd,_0xe8b21e),_0xe8b21e;}let b=class{constructor(_0x1b4cf7,_0x13374e,_0x43cce0,_0x246a81,_0x5edd83,_0x3bbee7){var _0x5a0777=_0x2a51;this[_0x5a0777(0x177)]=_0x1b4cf7,this[_0x5a0777(0x19a)]=_0x13374e,this['_commandService']=_0x43cce0,this[_0x5a0777(0x18c)]=_0x246a81,this[_0x5a0777(0x1a0)]=_0x5edd83,this['_univerInstanceService']=_0x3bbee7;}[_0x2f995c(0x16c)](){var _0x1f6b62=_0x2f995c;return this[_0x1f6b62(0x19a)];}[_0x2f995c(0x18b)](){var _0x656a0e=_0x2f995c;let _0x2b728a=this['_getCustomRange']();return _0x2b728a?{'endOffset':_0x2b728a[_0x656a0e(0x178)]+0x1,'rangeId':_0x2b728a[_0x656a0e(0x176)],'startOffset':_0x2b728a[_0x656a0e(0x1ad)]}:null;}['getFormula'](){var _0x507cc4=_0x2f995c,_0x4839cd;return((_0x4839cd=this[_0x507cc4(0x18c)][_0x507cc4(0x166)](this[_0x507cc4(0x177)],this['_rangeId']))==null?void 0x0:_0x4839cd[_0x507cc4(0x17f)])??'';}[_0x2f995c(0x19d)](){var _0xbd7161=_0x2f995c;return this['_model'][_0xbd7161(0x166)](this[_0xbd7161(0x177)],this[_0xbd7161(0x19a)])??null;}[_0x2f995c(0x167)](){var _0x3f6d24=_0x2f995c;return this[_0x3f6d24(0x1a0)][_0x3f6d24(0x167)]({'unitId':this[_0x3f6d24(0x177)],'rangeId':this[_0x3f6d24(0x19a)]})??null;}[_0x2f995c(0x172)](){var _0x405741=_0x2f995c;let _0x184e81=this['getRange'](),_0x58bec7=this[_0x405741(0x19d)](),_0x567148=this[_0x405741(0x167)]();return!_0x184e81||!_0x58bec7||!_0x567148?null:{..._0x184e81,'config':_0x58bec7,'formula':_0x58bec7['formula'],'result':_0x567148,'type':_0x405741(0x17f)};}[_0x2f995c(0x17a)](_0x5e7f75){var _0x515301=_0x2f995c;return this[_0x515301(0x198)][_0x515301(0x17e)](_0x5e3e8d['id'],{'externalReferences':_0x5e7f75[_0x515301(0x18a)],'formula':_0x5e7f75[_0x515301(0x17f)],'numberFormat':_0x5e7f75[_0x515301(0x199)],'rangeId':this[_0x515301(0x19a)],'unitId':this['_unitId']});}[_0x2f995c(0x1a4)](_0x4dc34c){var _0x638331=_0x2f995c;return this[_0x638331(0x198)][_0x638331(0x17e)](_0x307588['id'],{'numberFormat':_0x4dc34c,'rangeId':this['_rangeId'],'unitId':this[_0x638331(0x177)]});}[_0x2f995c(0x168)](){var _0x4088fd=_0x2f995c;return this[_0x4088fd(0x198)][_0x4088fd(0x17e)](_0x369bb8['id'],{'rangeId':this['_rangeId'],'unitId':this[_0x4088fd(0x177)]});}['replaceWithText'](_0x176678){var _0x1f43f8=_0x2f995c;return this['_commandService'][_0x1f43f8(0x17e)](_0x1f2ab5['id'],{'rangeId':this[_0x1f43f8(0x19a)],'text':_0x176678,'unitId':this['_unitId']});}[_0x2f995c(0x175)](){var _0x5e0b42=_0x2f995c;return this['_commandService'][_0x5e0b42(0x17e)](_0x1b4717['id'],{'rangeId':this[_0x5e0b42(0x19a)],'unitId':this[_0x5e0b42(0x177)]});}['_getCustomRange'](){var _0x4fa4df=_0x2f995c,_0x2d8e5b;let _0x4ca44a=this[_0x4fa4df(0x19c)]['getUnit'](this[_0x4fa4df(0x177)],_0x53f0d1[_0x4fa4df(0x1a3)]);return _0x4ca44a==null||(_0x2d8e5b=_0x4ca44a['getSnapshot']()['body'])==null||(_0x2d8e5b=_0x2d8e5b[_0x4fa4df(0x180)])==null?void 0x0:_0x2d8e5b['find'](_0x5aef5e=>_0x5aef5e[_0x4fa4df(0x176)]===this[_0x4fa4df(0x19a)]&&_0xa2ed8b(_0x5aef5e));}};b=y([v(0x2,_0x287051),v(0x3,_0x274288(_0x2f9e95)),v(0x4,_0x274288(_0x198058)),v(0x5,_0x4f0114)],b);function x(_0x5b140e){'@babel/helpers - typeof';var _0x4a7693=_0x2f995c;return x=typeof Symbol==_0x4a7693(0x16d)&&typeof Symbol['iterator']==_0x4a7693(0x197)?function(_0x53a6e0){return typeof _0x53a6e0;}:function(_0x229dbc){var _0x30bba5=_0x4a7693;return _0x229dbc&&typeof Symbol=='function'&&_0x229dbc[_0x30bba5(0x193)]===Symbol&&_0x229dbc!==Symbol[_0x30bba5(0x171)]?_0x30bba5(0x197):typeof _0x229dbc;},x(_0x5b140e);}function S(_0x4f29b8,_0x142bfc){var _0x10aaae=_0x2f995c;if(x(_0x4f29b8)!=_0x10aaae(0x17d)||!_0x4f29b8)return _0x4f29b8;var _0x134cf1=_0x4f29b8[Symbol[_0x10aaae(0x19f)]];if(_0x134cf1!==void 0x0){var _0x4ec523=_0x134cf1[_0x10aaae(0x1af)](_0x4f29b8,_0x142bfc||_0x10aaae(0x1b1));if(x(_0x4ec523)!=_0x10aaae(0x17d))return _0x4ec523;throw TypeError(_0x10aaae(0x16e));}return(_0x142bfc===_0x10aaae(0x19e)?String:Number)(_0x4f29b8);}function C(_0x37ba46){var _0x542f8b=_0x2f995c,_0xe3cf5=S(_0x37ba46,_0x542f8b(0x19e));return x(_0xe3cf5)=='symbol'?_0xe3cf5:_0xe3cf5+'';}function w(_0x528012,_0x156d44,_0x44144a){return(_0x156d44=C(_0x156d44))in _0x528012?Object['defineProperty'](_0x528012,_0x156d44,{'value':_0x44144a,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x528012[_0x156d44]=_0x44144a,_0x528012;}var T=class extends _0x44b991{constructor(..._0x1dea37){var _0x50da8b=_0x2f995c;super(..._0x1dea37),w(this,_0x50da8b(0x183),void 0x0),w(this,'_docsFormulaDisplayTextService',void 0x0),w(this,_0x50da8b(0x188),void 0x0),w(this,'_docsFormulaResourceLoaderService',void 0x0);}[_0x2f995c(0x181)](_0x57b044){var _0x27ea80=_0x2f995c;this[_0x27ea80(0x183)]=_0x57b044['get'](_0x287051),this['_docsFormulaDisplayTextService']=_0x57b044['get'](_0x5b148b),this[_0x27ea80(0x188)]=_0x57b044[_0x27ea80(0x184)](_0x2f9e95),this[_0x27ea80(0x186)]=_0x57b044[_0x27ea80(0x184)](_0x364da6);}[_0x2f995c(0x1ac)](){var _0x17cdc4=_0x2f995c;return this[_0x17cdc4(0x18e)]()[_0x17cdc4(0x1a8)](_0x26bbc8=>this[_0x17cdc4(0x18f)](_0x26bbc8[_0x17cdc4(0x176)]));}[_0x2f995c(0x166)](_0x5f4bee){var _0xa0b72c=_0x2f995c;return this[_0xa0b72c(0x18e)]()['some'](_0x4806db=>_0x4806db[_0xa0b72c(0x176)]===_0x5f4bee)?this[_0xa0b72c(0x18f)](_0x5f4bee):null;}[_0x2f995c(0x194)](_0x49ef1c){var _0x2af182=_0x2f995c;let _0x3df56a=this[_0x2af182(0x18e)]()['find'](_0x199c04=>_0x199c04[_0x2af182(0x1ad)]<=_0x49ef1c&&_0x49ef1c<=_0x199c04[_0x2af182(0x178)]);return _0x3df56a?this['_createFormula'](_0x3df56a[_0x2af182(0x176)]):null;}[_0x2f995c(0x16f)](){var _0x14c257=_0x2f995c;let _0x3a2fe0=this[_0x14c257(0x186)][_0x14c257(0x1a1)](this['id']);if(!_0x3a2fe0)throw Error(_0x14c257(0x195)+this['id']+_0x14c257(0x16b));return this[_0x14c257(0x1a7)]['degradeDocumentData'](_0x3a2fe0);}[_0x2f995c(0x1ab)](_0x3cd444){var _0x1a402f=_0x2f995c;return this[_0x1a402f(0x1a2)]({'externalReferences':_0x3cd444[_0x1a402f(0x18a)],'formula':_0x3cd444[_0x1a402f(0x17f)],'numberFormat':_0x3cd444[_0x1a402f(0x199)],'target':{'type':_0x1a402f(0x1aa),'startOffset':_0x3cd444[_0x1a402f(0x196)],'endOffset':_0x3cd444['endOffset']},'unitId':this[_0x1a402f(0x16c)]()});}[_0x2f995c(0x1a2)](_0x434614){var _0x4fec32=_0x2f995c;let _0x3d983b=this[_0x4fec32(0x183)][_0x4fec32(0x17e)](_0x30cba6['id'],_0x434614);return _0x3d983b?this[_0x4fec32(0x18f)](_0x3d983b['rangeId']):null;}[_0x2f995c(0x18e)](){var _0x34305f=_0x2f995c,_0x39abf9;let _0x5de8e1=this[_0x34305f(0x188)][_0x34305f(0x1ac)](this[_0x34305f(0x16c)]());return((_0x39abf9=this['getBody']('')[_0x34305f(0x180)])==null?void 0x0:_0x39abf9[_0x34305f(0x17c)](_0x2dafb8=>_0xa2ed8b(_0x2dafb8)&&_0x5de8e1[_0x2dafb8[_0x34305f(0x176)]]!=null))??[];}[_0x2f995c(0x18f)](_0x1649d9){var _0x54ddd7=_0x2f995c;return this[_0x54ddd7(0x1ae)][_0x54ddd7(0x1a5)](b,this[_0x54ddd7(0x16c)](),_0x1649d9);}};_0x44b991[_0x2f995c(0x17b)](T);var E=class extends _0x6fd9cc{constructor(..._0x1ec4c4){var _0xe48961=_0x2f995c;super(..._0x1ec4c4),w(this,_0xe48961(0x183),void 0x0);}[_0x2f995c(0x181)](_0x3b5b67){var _0x5ef680=_0x2f995c;this['_docsFormulaCommandService']=_0x3b5b67[_0x5ef680(0x184)](_0x287051);}[_0x2f995c(0x1ab)](_0x240ce9,_0xfa974e,_0x3accff={}){var _0x2ff35c=_0x2f995c;return this[_0x2ff35c(0x1a2)](_0x240ce9,_0xfa974e,_0x3accff);}[_0x2f995c(0x191)](_0x4a2161,_0x521112={}){var _0x2cbbed=_0x2f995c;return this[_0x2cbbed(0x1a2)]('end',_0x4a2161,_0x521112);}['_insert'](_0x2575de,_0x8731cb,_0x11550d){var _0x49889d=_0x2f995c;if(this[_0x49889d(0x1a9)]())return null;let _0x473450={'externalReferences':_0x11550d[_0x49889d(0x18a)],'formula':_0x8731cb,'numberFormat':_0x11550d['numberFormat'],'target':{'type':_0x49889d(0x190),'paragraphId':this[_0x49889d(0x16c)](),'position':_0x2575de},'unitId':this[_0x49889d(0x1b0)]['getId']()},_0x1ca2ef=this['_docsFormulaCommandService'][_0x49889d(0x17e)](_0x30cba6['id'],_0x473450);return _0x1ca2ef?this[_0x49889d(0x1ae)][_0x49889d(0x1a5)](b,this[_0x49889d(0x1b0)]['getId'](),_0x1ca2ef[_0x49889d(0x176)]):null;}};_0x6fd9cc[_0x2f995c(0x17b)](E);var D=class extends _0xd6a089{constructor(..._0x58cf36){var _0x29d3e8=_0x2f995c;super(..._0x58cf36),w(this,_0x29d3e8(0x183),void 0x0);}['_initialize'](_0x22771e){var _0xfaad34=_0x2f995c;this[_0xfaad34(0x183)]=_0x22771e['get'](_0x287051);}[_0x2f995c(0x170)](_0xdc38c7,_0x1292f9={}){var _0x5e2189=_0x2f995c;let {endOffset:_0x4183f8,segmentId:_0xa62219,startOffset:_0x1c2a3d}=this[_0x5e2189(0x18b)]();return _0xa62219?null:this[_0x5e2189(0x1a2)](_0x1c2a3d,_0x4183f8,_0xdc38c7,_0x1292f9);}[_0x2f995c(0x1a2)](_0x3eff13,_0x482fb6,_0x18e1b3,_0x5e67b2){var _0x39bba1=_0x2f995c;let _0xf32e70={'externalReferences':_0x5e67b2['externalReferences'],'formula':_0x18e1b3,'numberFormat':_0x5e67b2[_0x39bba1(0x199)],'target':{'type':'range','startOffset':_0x3eff13,'endOffset':_0x482fb6},'unitId':this[_0x39bba1(0x1b0)][_0x39bba1(0x16c)]()},_0x53b2f6=this[_0x39bba1(0x183)]['syncExecuteCommand'](_0x30cba6['id'],_0xf32e70);return _0x53b2f6?this[_0x39bba1(0x1ae)][_0x39bba1(0x1a5)](b,this[_0x39bba1(0x1b0)]['getId'](),_0x53b2f6[_0x39bba1(0x176)]):null;}};_0xd6a089['extend'](D);export{b as FDocumentFormula};
1
+ var _0x38962f=_0x1e42;(function(_0x2c8896,_0x2c7a38){var _0x16d654=_0x1e42,_0x1421e9=_0x2c8896();while(!![]){try{var _0x479c61=parseInt(_0x16d654(0x13e))/0x1*(-parseInt(_0x16d654(0x179))/0x2)+-parseInt(_0x16d654(0x162))/0x3+-parseInt(_0x16d654(0x17f))/0x4+-parseInt(_0x16d654(0x149))/0x5+-parseInt(_0x16d654(0x174))/0x6+-parseInt(_0x16d654(0x157))/0x7+parseInt(_0x16d654(0x170))/0x8;if(_0x479c61===_0x2c7a38)break;else _0x1421e9['push'](_0x1421e9['shift']());}catch(_0x1616e1){_0x1421e9['push'](_0x1421e9['shift']());}}}(_0x26ea,0x60474));import{ConvertDocFormulaToTextCommand as _0x5630ac,DocFormulaDisplayTextService as _0x503b3d,DocFormulaModel as _0x430368,DocFormulaService as _0x5e35b9,InsertDocFormulaCommand as _0x3db5b8,RemoveDocFormulaCommand as _0x5c8158,ReplaceDocFormulaWithTextCommand as _0x169f0a,SetDocFormulaNumberFormatCommand as _0x5d2be8,UpdateDocFormulaCommand as _0x9c564d,isDocFormulaRange as _0x2ec456}from'@univerjs-pro/docs-formula';import{ICommandService as _0x15d819,IResourceLoaderService as _0x5aabfe,IUniverInstanceService as _0x232552,Inject as _0x1a7be6,UniverInstanceType as _0x42414d}from'@univerjs/core';import{FDocument as _0x55da0f,FDocumentParagraph as _0x589793,FDocumentTextRange as _0x2362be}from'@univerjs/docs/facade';function v(_0x51931b,_0x390995){return function(_0x3c3122,_0x784975){_0x390995(_0x3c3122,_0x784975,_0x51931b);};}function y(_0x5d8d87,_0x84954,_0x233c77,_0x171d26){var _0x1ab2c5=_0x1e42,_0x2da630=arguments[_0x1ab2c5(0x151)],_0x145800=_0x2da630<0x3?_0x84954:_0x171d26===null?_0x171d26=Object[_0x1ab2c5(0x17e)](_0x84954,_0x233c77):_0x171d26,_0x28b326;if(typeof Reflect==_0x1ab2c5(0x13f)&&typeof Reflect['decorate']==_0x1ab2c5(0x154))_0x145800=Reflect['decorate'](_0x5d8d87,_0x84954,_0x233c77,_0x171d26);else{for(var _0x521019=_0x5d8d87[_0x1ab2c5(0x151)]-0x1;_0x521019>=0x0;_0x521019--)(_0x28b326=_0x5d8d87[_0x521019])&&(_0x145800=(_0x2da630<0x3?_0x28b326(_0x145800):_0x2da630>0x3?_0x28b326(_0x84954,_0x233c77,_0x145800):_0x28b326(_0x84954,_0x233c77))||_0x145800);}return _0x2da630>0x3&&_0x145800&&Object[_0x1ab2c5(0x15c)](_0x84954,_0x233c77,_0x145800),_0x145800;}let b=class{constructor(_0x2e699f,_0x54f53d,_0x37184e,_0x10db18,_0x29dd3a,_0x2275b8){var _0x375ff4=_0x1e42;this[_0x375ff4(0x140)]=_0x2e699f,this[_0x375ff4(0x148)]=_0x54f53d,this['_commandService']=_0x37184e,this[_0x375ff4(0x177)]=_0x10db18,this[_0x375ff4(0x141)]=_0x29dd3a,this[_0x375ff4(0x14a)]=_0x2275b8;}['getId'](){var _0x443ee3=_0x1e42;return this[_0x443ee3(0x148)];}[_0x38962f(0x13c)](){var _0x54b65a=_0x38962f;let _0x2a72bf=this[_0x54b65a(0x17c)]();return _0x2a72bf?{'endOffset':_0x2a72bf[_0x54b65a(0x180)]+0x1,'rangeId':_0x2a72bf[_0x54b65a(0x13b)],'startOffset':_0x2a72bf['startIndex']}:null;}[_0x38962f(0x14e)](){var _0xe44337=_0x38962f,_0xaea5db;return((_0xaea5db=this['_model']['getFormula'](this[_0xe44337(0x140)],this[_0xe44337(0x148)]))==null?void 0x0:_0xaea5db[_0xe44337(0x15e)])??'';}[_0x38962f(0x181)](){var _0x152406=_0x38962f;return this['_model'][_0x152406(0x14e)](this[_0x152406(0x140)],this[_0x152406(0x148)])??null;}[_0x38962f(0x144)](){var _0x7d072f=_0x38962f;return this[_0x7d072f(0x141)][_0x7d072f(0x144)]({'unitId':this[_0x7d072f(0x140)],'rangeId':this[_0x7d072f(0x148)]})??null;}[_0x38962f(0x178)](){var _0x3cdcbb=_0x38962f;let _0x592a75=this['getRange'](),_0x4c04d2=this[_0x3cdcbb(0x181)](),_0x55fc9c=this[_0x3cdcbb(0x144)]();return!_0x592a75||!_0x4c04d2||!_0x55fc9c?null:{..._0x592a75,'config':_0x4c04d2,'formula':_0x4c04d2[_0x3cdcbb(0x15e)],'result':_0x55fc9c,'type':_0x3cdcbb(0x15e)};}['update'](_0x42774d){var _0x46f641=_0x38962f;return this[_0x46f641(0x188)][_0x46f641(0x187)](_0x9c564d['id'],{'externalReferences':_0x42774d[_0x46f641(0x182)],'formula':_0x42774d[_0x46f641(0x15e)],'numberFormat':_0x42774d[_0x46f641(0x155)],'rangeId':this[_0x46f641(0x148)],'unitId':this[_0x46f641(0x140)]});}[_0x38962f(0x163)](_0xc855d2){var _0xab8155=_0x38962f;return this['_commandService'][_0xab8155(0x187)](_0x5d2be8['id'],{'numberFormat':_0xc855d2,'rangeId':this[_0xab8155(0x148)],'unitId':this[_0xab8155(0x140)]});}[_0x38962f(0x16c)](){var _0x38f81d=_0x38962f;return this[_0x38f81d(0x188)][_0x38f81d(0x187)](_0x5c8158['id'],{'rangeId':this[_0x38f81d(0x148)],'unitId':this[_0x38f81d(0x140)]});}[_0x38962f(0x16f)](_0x4258ae){var _0x160483=_0x38962f;return this['_commandService'][_0x160483(0x187)](_0x169f0a['id'],{'rangeId':this[_0x160483(0x148)],'text':_0x4258ae,'unitId':this[_0x160483(0x140)]});}['convertToText'](){var _0x38891b=_0x38962f;return this['_commandService'][_0x38891b(0x187)](_0x5630ac['id'],{'rangeId':this[_0x38891b(0x148)],'unitId':this[_0x38891b(0x140)]});}[_0x38962f(0x17c)](){var _0x2c6d3b=_0x38962f,_0xdfa00f;let _0x4bd2cb=this[_0x2c6d3b(0x14a)][_0x2c6d3b(0x183)](this[_0x2c6d3b(0x140)],_0x42414d[_0x2c6d3b(0x15b)]);return _0x4bd2cb==null||(_0xdfa00f=_0x4bd2cb[_0x2c6d3b(0x185)]()[_0x2c6d3b(0x143)])==null||(_0xdfa00f=_0xdfa00f[_0x2c6d3b(0x147)])==null?void 0x0:_0xdfa00f['find'](_0x1f3d17=>_0x1f3d17[_0x2c6d3b(0x13b)]===this[_0x2c6d3b(0x148)]&&_0x2ec456(_0x1f3d17));}};b=y([v(0x2,_0x15d819),v(0x3,_0x1a7be6(_0x430368)),v(0x4,_0x1a7be6(_0x5e35b9)),v(0x5,_0x232552)],b);function x(_0x25b11f){'@babel/helpers - typeof';var _0x1284ca=_0x38962f;return x=typeof Symbol==_0x1284ca(0x154)&&typeof Symbol['iterator']==_0x1284ca(0x145)?function(_0x383255){return typeof _0x383255;}:function(_0x5777b2){var _0x36c2c7=_0x1284ca;return _0x5777b2&&typeof Symbol==_0x36c2c7(0x154)&&_0x5777b2[_0x36c2c7(0x14c)]===Symbol&&_0x5777b2!==Symbol['prototype']?_0x36c2c7(0x145):typeof _0x5777b2;},x(_0x25b11f);}function S(_0x5d6807,_0x337bc5){var _0x5aa34c=_0x38962f;if(x(_0x5d6807)!=_0x5aa34c(0x13f)||!_0x5d6807)return _0x5d6807;var _0x4554dc=_0x5d6807[Symbol[_0x5aa34c(0x16d)]];if(_0x4554dc!==void 0x0){var _0x7dfebe=_0x4554dc[_0x5aa34c(0x176)](_0x5d6807,_0x337bc5||_0x5aa34c(0x13d));if(x(_0x7dfebe)!=_0x5aa34c(0x13f))return _0x7dfebe;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x337bc5===_0x5aa34c(0x165)?String:Number)(_0x5d6807);}function C(_0x1bb409){var _0x536077=_0x38962f,_0x3e5984=S(_0x1bb409,_0x536077(0x165));return x(_0x3e5984)==_0x536077(0x145)?_0x3e5984:_0x3e5984+'';}function _0x26ea(){var _0x59e4f6=['getRange','default','1uBRExi','object','_unitId','_service','filter','body','getResult','symbol','_docsFormulaDisplayTextService','customRanges','_rangeId','2202725UfrVqz','_univerInstanceService','get','constructor','insertFormula','getFormula','getSegmentId','startOffset','length','_createFormula','replaceWithFormula','function','numberFormat','_docsFormulaModel','2823555ubevcQ','end','degradeDocumentData','saveUnit','UNIVER_DOC','defineProperty','saveFormulaDisplayTextSnapshot','formula','_initialize','_document','getFormulaAt','714615dAmohY','setNumberFormat','getBody','string','extend','some','_docsFormulaCommandService','Document\x20','map','_injector','remove','toPrimitive','_insert','replaceWithText','15752392YZNJmf','range','getId','_docsFormulaResourceLoaderService','2610960HkWkxC','find','call','_model','describe','29158CnCvee','appendFormula','createInstance','_getCustomRange','paragraph','getOwnPropertyDescriptor','171356SanboD','endIndex','getConfig','externalReferences','getUnit','_getCompleteRanges','getSnapshot','\x20could\x20not\x20be\x20serialized.','syncExecuteCommand','_commandService','rangeId'];_0x26ea=function(){return _0x59e4f6;};return _0x26ea();}function w(_0x5458d5,_0x4d8686,_0x5880d0){var _0x3f95ca=_0x38962f;return(_0x4d8686=C(_0x4d8686))in _0x5458d5?Object[_0x3f95ca(0x15c)](_0x5458d5,_0x4d8686,{'value':_0x5880d0,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x5458d5[_0x4d8686]=_0x5880d0,_0x5458d5;}function _0x1e42(_0x16a32e,_0x524e8f){_0x16a32e=_0x16a32e-0x13b;var _0x26eac0=_0x26ea();var _0x1e4254=_0x26eac0[_0x16a32e];return _0x1e4254;}var T=class extends _0x55da0f{constructor(..._0x42340d){var _0x1ad76f=_0x38962f;super(..._0x42340d),w(this,_0x1ad76f(0x168),void 0x0),w(this,_0x1ad76f(0x146),void 0x0),w(this,_0x1ad76f(0x156),void 0x0),w(this,_0x1ad76f(0x173),void 0x0);}[_0x38962f(0x15f)](_0x1b2c89){var _0x53a655=_0x38962f;this[_0x53a655(0x168)]=_0x1b2c89[_0x53a655(0x14b)](_0x15d819),this[_0x53a655(0x146)]=_0x1b2c89[_0x53a655(0x14b)](_0x503b3d),this[_0x53a655(0x156)]=_0x1b2c89['get'](_0x430368),this[_0x53a655(0x173)]=_0x1b2c89['get'](_0x5aabfe);}['getFormulas'](){var _0x1cb4aa=_0x38962f;return this['_getCompleteRanges']()[_0x1cb4aa(0x16a)](_0x930586=>this[_0x1cb4aa(0x152)](_0x930586['rangeId']));}[_0x38962f(0x14e)](_0x2bd645){var _0x59d242=_0x38962f;return this[_0x59d242(0x184)]()[_0x59d242(0x167)](_0x5a297a=>_0x5a297a[_0x59d242(0x13b)]===_0x2bd645)?this['_createFormula'](_0x2bd645):null;}[_0x38962f(0x161)](_0x4fe1b7){var _0x4d38c3=_0x38962f;let _0x124282=this['_getCompleteRanges']()[_0x4d38c3(0x175)](_0x2850b9=>_0x2850b9['startIndex']<=_0x4fe1b7&&_0x4fe1b7<=_0x2850b9[_0x4d38c3(0x180)]);return _0x124282?this['_createFormula'](_0x124282[_0x4d38c3(0x13b)]):null;}[_0x38962f(0x15d)](){var _0x2d7c7a=_0x38962f;let _0x4c2f44=this[_0x2d7c7a(0x173)][_0x2d7c7a(0x15a)](this['id']);if(!_0x4c2f44)throw Error(_0x2d7c7a(0x169)+this['id']+_0x2d7c7a(0x186));return this[_0x2d7c7a(0x146)][_0x2d7c7a(0x159)](_0x4c2f44);}[_0x38962f(0x14d)](_0x19d9e3){var _0x5bb829=_0x38962f;return this['_insert']({'externalReferences':_0x19d9e3[_0x5bb829(0x182)],'formula':_0x19d9e3[_0x5bb829(0x15e)],'numberFormat':_0x19d9e3['numberFormat'],'target':{'type':_0x5bb829(0x171),'startOffset':_0x19d9e3[_0x5bb829(0x150)],'endOffset':_0x19d9e3['endOffset']},'unitId':this[_0x5bb829(0x172)]()});}[_0x38962f(0x16e)](_0x467f44){var _0x1a93a2=_0x38962f;let _0x4a5fee=this[_0x1a93a2(0x168)]['syncExecuteCommand'](_0x3db5b8['id'],_0x467f44);return _0x4a5fee?this['_createFormula'](_0x4a5fee[_0x1a93a2(0x13b)]):null;}[_0x38962f(0x184)](){var _0x374308=_0x38962f,_0x5b9374;let _0x1a0f54=this['_docsFormulaModel']['getFormulas'](this[_0x374308(0x172)]());return((_0x5b9374=this[_0x374308(0x164)]('')['customRanges'])==null?void 0x0:_0x5b9374[_0x374308(0x142)](_0xef2a09=>_0x2ec456(_0xef2a09)&&_0x1a0f54[_0xef2a09[_0x374308(0x13b)]]!=null))??[];}[_0x38962f(0x152)](_0x4c4c03){var _0xe9b90c=_0x38962f;return this[_0xe9b90c(0x16b)]['createInstance'](b,this[_0xe9b90c(0x172)](),_0x4c4c03);}};_0x55da0f[_0x38962f(0x166)](T);var E=class extends _0x589793{constructor(..._0x4ab080){var _0x378f2e=_0x38962f;super(..._0x4ab080),w(this,_0x378f2e(0x168),void 0x0);}[_0x38962f(0x15f)](_0x5dedec){var _0x4d2e8d=_0x38962f;this[_0x4d2e8d(0x168)]=_0x5dedec['get'](_0x15d819);}[_0x38962f(0x14d)](_0xc7a121,_0x1ba6a5,_0x39db6e={}){return this['_insert'](_0xc7a121,_0x1ba6a5,_0x39db6e);}[_0x38962f(0x17a)](_0x1a7892,_0xeb9c7f={}){var _0x592027=_0x38962f;return this[_0x592027(0x16e)](_0x592027(0x158),_0x1a7892,_0xeb9c7f);}[_0x38962f(0x16e)](_0x58b7ff,_0x3fbe01,_0x1316dc){var _0x4c5ac8=_0x38962f;if(this[_0x4c5ac8(0x14f)]())return null;let _0x44eaaf={'externalReferences':_0x1316dc[_0x4c5ac8(0x182)],'formula':_0x3fbe01,'numberFormat':_0x1316dc[_0x4c5ac8(0x155)],'target':{'type':_0x4c5ac8(0x17d),'paragraphId':this[_0x4c5ac8(0x172)](),'position':_0x58b7ff},'unitId':this[_0x4c5ac8(0x160)][_0x4c5ac8(0x172)]()},_0x45c04f=this['_docsFormulaCommandService'][_0x4c5ac8(0x187)](_0x3db5b8['id'],_0x44eaaf);return _0x45c04f?this[_0x4c5ac8(0x16b)][_0x4c5ac8(0x17b)](b,this[_0x4c5ac8(0x160)]['getId'](),_0x45c04f[_0x4c5ac8(0x13b)]):null;}};_0x589793[_0x38962f(0x166)](E);var D=class extends _0x2362be{constructor(..._0x47fcd8){super(..._0x47fcd8),w(this,'_docsFormulaCommandService',void 0x0);}[_0x38962f(0x15f)](_0x5d02d0){var _0x21d43c=_0x38962f;this[_0x21d43c(0x168)]=_0x5d02d0[_0x21d43c(0x14b)](_0x15d819);}[_0x38962f(0x153)](_0x26a1a8,_0x1385d4={}){var _0x40dba9=_0x38962f;let {endOffset:_0x2ea00b,segmentId:_0x106598,startOffset:_0x6d55a9}=this[_0x40dba9(0x13c)]();return _0x106598?null:this[_0x40dba9(0x16e)](_0x6d55a9,_0x2ea00b,_0x26a1a8,_0x1385d4);}[_0x38962f(0x16e)](_0x1f1c0c,_0x34293c,_0x49ce71,_0x5d9d1f){var _0x181709=_0x38962f;let _0xa89452={'externalReferences':_0x5d9d1f[_0x181709(0x182)],'formula':_0x49ce71,'numberFormat':_0x5d9d1f[_0x181709(0x155)],'target':{'type':_0x181709(0x171),'startOffset':_0x1f1c0c,'endOffset':_0x34293c},'unitId':this[_0x181709(0x160)][_0x181709(0x172)]()},_0x4ddd00=this['_docsFormulaCommandService'][_0x181709(0x187)](_0x3db5b8['id'],_0xa89452);return _0x4ddd00?this[_0x181709(0x16b)][_0x181709(0x17b)](b,this[_0x181709(0x160)]['getId'](),_0x4ddd00[_0x181709(0x13b)]):null;}};_0x2362be[_0x38962f(0x166)](D);export{b as FDocumentFormula};