@univerjs-pro/docs-formula 1.1.0 → 1.3.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 _0x3464a0=_0x1ec5;(function(_0x949f0f,_0x36651d){const _0x496305=_0x1ec5,_0x162348=_0x949f0f();while(!![]){try{const _0x28e7f6=-parseInt(_0x496305(0x16b))/0x1+-parseInt(_0x496305(0x181))/0x2*(-parseInt(_0x496305(0x1a7))/0x3)+-parseInt(_0x496305(0x1ba))/0x4*(-parseInt(_0x496305(0x199))/0x5)+-parseInt(_0x496305(0x17f))/0x6+parseInt(_0x496305(0x19b))/0x7*(-parseInt(_0x496305(0x179))/0x8)+parseInt(_0x496305(0x1a4))/0x9*(parseInt(_0x496305(0x198))/0xa)+parseInt(_0x496305(0x1b3))/0xb*(parseInt(_0x496305(0x195))/0xc);if(_0x28e7f6===_0x36651d)break;else _0x162348['push'](_0x162348['shift']());}catch(_0x4f3474){_0x162348['push'](_0x162348['shift']());}}}(_0x3bf6,0xdd212),Object[_0x3464a0(0x1b6)](exports,Symbol['toStringTag'],{'value':_0x3464a0(0x1ae)}));let e=require('@univerjs-pro/docs-formula'),t=require('@univerjs/core'),n=require('@univerjs/docs/facade');function r(_0x1883f9,_0x5afb8d){return function(_0x4444ef,_0x699379){_0x5afb8d(_0x4444ef,_0x699379,_0x1883f9);};}function _0x1ec5(_0xbff0e7,_0x34dc0e){_0xbff0e7=_0xbff0e7-0x166;const _0x3bf641=_0x3bf6();let _0x1ec584=_0x3bf641[_0xbff0e7];return _0x1ec584;}function i(_0x44b72a,_0x17154c,_0x4a2c9d,_0x1d17a2){const _0x7df83d=_0x3464a0;var _0x2c8df7=arguments[_0x7df83d(0x169)],_0xa49122=_0x2c8df7<0x3?_0x17154c:_0x1d17a2===null?_0x1d17a2=Object['getOwnPropertyDescriptor'](_0x17154c,_0x4a2c9d):_0x1d17a2,_0x5a1473;if(typeof Reflect==_0x7df83d(0x1bc)&&typeof Reflect['decorate']==_0x7df83d(0x1b2))_0xa49122=Reflect[_0x7df83d(0x182)](_0x44b72a,_0x17154c,_0x4a2c9d,_0x1d17a2);else{for(var _0xa62ec1=_0x44b72a['length']-0x1;_0xa62ec1>=0x0;_0xa62ec1--)(_0x5a1473=_0x44b72a[_0xa62ec1])&&(_0xa49122=(_0x2c8df7<0x3?_0x5a1473(_0xa49122):_0x2c8df7>0x3?_0x5a1473(_0x17154c,_0x4a2c9d,_0xa49122):_0x5a1473(_0x17154c,_0x4a2c9d))||_0xa49122);}return _0x2c8df7>0x3&&_0xa49122&&Object[_0x7df83d(0x1b6)](_0x17154c,_0x4a2c9d,_0xa49122),_0xa49122;}let a=class{constructor(_0xd1c048,_0x586946,_0x1eb4da,_0x4584e6,_0x1417c1,_0x4c3347){const _0x3c4d3d=_0x3464a0;this[_0x3c4d3d(0x184)]=_0xd1c048,this[_0x3c4d3d(0x1c2)]=_0x586946,this['_commandService']=_0x1eb4da,this['_model']=_0x4584e6,this[_0x3c4d3d(0x1a6)]=_0x1417c1,this[_0x3c4d3d(0x194)]=_0x4c3347;}[_0x3464a0(0x196)](){return this['_rangeId'];}[_0x3464a0(0x1ab)](){const _0x56511d=_0x3464a0;let _0x1a17a6=this[_0x56511d(0x1a0)]();return _0x1a17a6?{'endOffset':_0x1a17a6[_0x56511d(0x18d)]+0x1,'rangeId':_0x1a17a6[_0x56511d(0x17e)],'startOffset':_0x1a17a6[_0x56511d(0x1b9)]}:null;}[_0x3464a0(0x1a3)](){const _0x2b78bb=_0x3464a0;var _0x43aa0d;return((_0x43aa0d=this['_model'][_0x2b78bb(0x1a3)](this[_0x2b78bb(0x184)],this[_0x2b78bb(0x1c2)]))==null?void 0x0:_0x43aa0d['formula'])??'';}[_0x3464a0(0x18a)](){const _0x62a549=_0x3464a0;return this[_0x62a549(0x172)][_0x62a549(0x1a3)](this['_unitId'],this[_0x62a549(0x1c2)])??null;}[_0x3464a0(0x197)](){const _0x3afd29=_0x3464a0;return this[_0x3afd29(0x1a6)][_0x3afd29(0x197)]({'unitId':this['_unitId'],'rangeId':this[_0x3afd29(0x1c2)]})??null;}['describe'](){const _0x131126=_0x3464a0;let _0x32aec6=this[_0x131126(0x1ab)](),_0x2ebf54=this[_0x131126(0x18a)](),_0x4cbfcc=this[_0x131126(0x197)]();return!_0x32aec6||!_0x2ebf54||!_0x4cbfcc?null:{..._0x32aec6,'config':_0x2ebf54,'formula':_0x2ebf54[_0x131126(0x1c3)],'result':_0x4cbfcc,'type':'formula'};}[_0x3464a0(0x1af)](_0x342e2f){const _0x5eb387=_0x3464a0;return this[_0x5eb387(0x189)][_0x5eb387(0x19c)](e[_0x5eb387(0x18e)]['id'],{'externalReferences':_0x342e2f[_0x5eb387(0x1bf)],'formula':_0x342e2f[_0x5eb387(0x1c3)],'numberFormat':_0x342e2f['numberFormat'],'rangeId':this[_0x5eb387(0x1c2)],'unitId':this[_0x5eb387(0x184)]});}[_0x3464a0(0x180)](_0x1b3d42){const _0x540afc=_0x3464a0;return this[_0x540afc(0x189)]['syncExecuteCommand'](e[_0x540afc(0x16a)]['id'],{'numberFormat':_0x1b3d42,'rangeId':this[_0x540afc(0x1c2)],'unitId':this[_0x540afc(0x184)]});}[_0x3464a0(0x1c6)](){const _0x535ab6=_0x3464a0;return this['_commandService'][_0x535ab6(0x19c)](e[_0x535ab6(0x187)]['id'],{'rangeId':this['_rangeId'],'unitId':this[_0x535ab6(0x184)]});}['replaceWithText'](_0x5e2ae0){const _0x1eef16=_0x3464a0;return this['_commandService'][_0x1eef16(0x19c)](e[_0x1eef16(0x185)]['id'],{'rangeId':this[_0x1eef16(0x1c2)],'text':_0x5e2ae0,'unitId':this['_unitId']});}[_0x3464a0(0x1be)](){const _0x430075=_0x3464a0;return this[_0x430075(0x189)]['syncExecuteCommand'](e[_0x430075(0x19a)]['id'],{'rangeId':this[_0x430075(0x1c2)],'unitId':this[_0x430075(0x184)]});}[_0x3464a0(0x1a0)](){const _0x418775=_0x3464a0;var _0x55665d;let _0x2bd8f3=this[_0x418775(0x194)][_0x418775(0x171)](this[_0x418775(0x184)],t['UniverInstanceType'][_0x418775(0x174)]);return _0x2bd8f3==null||(_0x55665d=_0x2bd8f3[_0x418775(0x1b5)]()[_0x418775(0x1c4)])==null||(_0x55665d=_0x55665d['customRanges'])==null?void 0x0:_0x55665d[_0x418775(0x17c)](_0xbd9a8e=>_0xbd9a8e['rangeId']===this[_0x418775(0x1c2)]&&(0x0,e['isDocFormulaRange'])(_0xbd9a8e));}};a=i([r(0x2,t[_0x3464a0(0x1b1)]),r(0x3,(0x0,t[_0x3464a0(0x168)])(e[_0x3464a0(0x17b)])),r(0x4,(0x0,t['Inject'])(e[_0x3464a0(0x192)])),r(0x5,t[_0x3464a0(0x1b4)])],a);function o(_0x49f1b4){'@babel/helpers - typeof';const _0x3d7f6a=_0x3464a0;return o=typeof Symbol==_0x3d7f6a(0x1b2)&&typeof Symbol['iterator']==_0x3d7f6a(0x1a5)?function(_0x2116fa){return typeof _0x2116fa;}:function(_0x13c2d2){const _0x1c2fb2=_0x3d7f6a;return _0x13c2d2&&typeof Symbol=='function'&&_0x13c2d2[_0x1c2fb2(0x188)]===Symbol&&_0x13c2d2!==Symbol['prototype']?_0x1c2fb2(0x1a5):typeof _0x13c2d2;},o(_0x49f1b4);}function s(_0x167d8e,_0x12242e){const _0x37f3ef=_0x3464a0;if(o(_0x167d8e)!=_0x37f3ef(0x1bc)||!_0x167d8e)return _0x167d8e;var _0x2026c8=_0x167d8e[Symbol['toPrimitive']];if(_0x2026c8!==void 0x0){var _0x76c912=_0x2026c8['call'](_0x167d8e,_0x12242e||_0x37f3ef(0x1c5));if(o(_0x76c912)!=_0x37f3ef(0x1bc))return _0x76c912;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x12242e==='string'?String:Number)(_0x167d8e);}function c(_0x1c230c){const _0xef3b0f=_0x3464a0;var _0x4630f9=s(_0x1c230c,_0xef3b0f(0x170));return o(_0x4630f9)==_0xef3b0f(0x1a5)?_0x4630f9:_0x4630f9+'';}function l(_0x4f8da0,_0x36dde7,_0xd32356){const _0x48c66a=_0x3464a0;return(_0x36dde7=c(_0x36dde7))in _0x4f8da0?Object[_0x48c66a(0x1b6)](_0x4f8da0,_0x36dde7,{'value':_0xd32356,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x4f8da0[_0x36dde7]=_0xd32356,_0x4f8da0;}var u=class extends n[_0x3464a0(0x1ac)]{constructor(..._0x5a38d0){const _0x4f7fc2=_0x3464a0;super(..._0x5a38d0),l(this,_0x4f7fc2(0x1bb),void 0x0),l(this,_0x4f7fc2(0x1aa),void 0x0),l(this,_0x4f7fc2(0x186),void 0x0),l(this,_0x4f7fc2(0x18c),void 0x0);}['_initialize'](_0x2fe140){const _0x2b9ee2=_0x3464a0;this[_0x2b9ee2(0x1bb)]=_0x2fe140[_0x2b9ee2(0x17d)](t[_0x2b9ee2(0x1b1)]),this['_docsFormulaDisplayTextService']=_0x2fe140[_0x2b9ee2(0x17d)](e[_0x2b9ee2(0x190)]),this[_0x2b9ee2(0x186)]=_0x2fe140[_0x2b9ee2(0x17d)](e['DocFormulaModel']),this['_docsFormulaResourceLoaderService']=_0x2fe140[_0x2b9ee2(0x17d)](t[_0x2b9ee2(0x1a8)]);}['getFormulas'](){const _0x2bf56f=_0x3464a0;return this[_0x2bf56f(0x16d)]()[_0x2bf56f(0x16f)](_0x444407=>this[_0x2bf56f(0x1b8)](_0x444407[_0x2bf56f(0x17e)]));}[_0x3464a0(0x1a3)](_0x5daf45){const _0x430c30=_0x3464a0;return this['_getCompleteRanges']()[_0x430c30(0x1a1)](_0x554a61=>_0x554a61[_0x430c30(0x17e)]===_0x5daf45)?this['_createFormula'](_0x5daf45):null;}[_0x3464a0(0x19d)](_0x107ac4){const _0x301627=_0x3464a0;let _0x12c38b=this[_0x301627(0x16d)]()[_0x301627(0x17c)](_0x49aef3=>_0x49aef3['startIndex']<=_0x107ac4&&_0x107ac4<=_0x49aef3[_0x301627(0x18d)]);return _0x12c38b?this[_0x301627(0x1b8)](_0x12c38b['rangeId']):null;}[_0x3464a0(0x1c1)](){const _0x387134=_0x3464a0;let _0x3c2857=this[_0x387134(0x18c)][_0x387134(0x16e)](this['id']);if(!_0x3c2857)throw Error('Document\x20'+this['id']+_0x387134(0x1b7));return this['_docsFormulaDisplayTextService']['degradeDocumentData'](_0x3c2857);}[_0x3464a0(0x166)](_0x479428){const _0x2c39cd=_0x3464a0;return this[_0x2c39cd(0x17a)]({'externalReferences':_0x479428[_0x2c39cd(0x1bf)],'formula':_0x479428[_0x2c39cd(0x1c3)],'numberFormat':_0x479428[_0x2c39cd(0x18b)],'target':{'type':_0x2c39cd(0x177),'startOffset':_0x479428['startOffset'],'endOffset':_0x479428[_0x2c39cd(0x175)]},'unitId':this[_0x2c39cd(0x196)]()});}[_0x3464a0(0x17a)](_0x2bd59e){const _0x13010c=_0x3464a0;let _0x48d25e=this[_0x13010c(0x1bb)][_0x13010c(0x19c)](e[_0x13010c(0x178)]['id'],_0x2bd59e);return _0x48d25e?this['_createFormula'](_0x48d25e['rangeId']):null;}[_0x3464a0(0x16d)](){const _0x5a2656=_0x3464a0;var _0x4cd2a3;let _0x520958=this['_docsFormulaModel'][_0x5a2656(0x16c)](this[_0x5a2656(0x196)]());return((_0x4cd2a3=this[_0x5a2656(0x167)]('')['customRanges'])==null?void 0x0:_0x4cd2a3[_0x5a2656(0x1bd)](_0x4173fd=>(0x0,e[_0x5a2656(0x1c0)])(_0x4173fd)&&_0x520958[_0x4173fd[_0x5a2656(0x17e)]]!=null))??[];}[_0x3464a0(0x1b8)](_0x44de4b){const _0x1790f8=_0x3464a0;return this[_0x1790f8(0x1ad)]['createInstance'](a,this[_0x1790f8(0x196)](),_0x44de4b);}};n[_0x3464a0(0x1ac)][_0x3464a0(0x18f)](u);var d=class extends n[_0x3464a0(0x1a2)]{constructor(..._0x15beb1){const _0x1afc29=_0x3464a0;super(..._0x15beb1),l(this,_0x1afc29(0x1bb),void 0x0);}['_initialize'](_0x4977c1){const _0x2901f3=_0x3464a0;this[_0x2901f3(0x1bb)]=_0x4977c1[_0x2901f3(0x17d)](t[_0x2901f3(0x1b1)]);}[_0x3464a0(0x166)](_0x3e9a28,_0x1b32c3,_0x538f92={}){return this['_insert'](_0x3e9a28,_0x1b32c3,_0x538f92);}[_0x3464a0(0x173)](_0x42e359,_0x472e3e={}){const _0x327dd7=_0x3464a0;return this[_0x327dd7(0x17a)](_0x327dd7(0x1a9),_0x42e359,_0x472e3e);}['_insert'](_0x52f827,_0x50eb4a,_0x27cbe1){const _0xe09231=_0x3464a0;if(this[_0xe09231(0x1b0)]())return null;let _0x491dd4={'externalReferences':_0x27cbe1[_0xe09231(0x1bf)],'formula':_0x50eb4a,'numberFormat':_0x27cbe1[_0xe09231(0x18b)],'target':{'type':_0xe09231(0x19f),'paragraphId':this[_0xe09231(0x196)](),'position':_0x52f827},'unitId':this[_0xe09231(0x191)][_0xe09231(0x196)]()},_0x4126e8=this[_0xe09231(0x1bb)]['syncExecuteCommand'](e['InsertDocFormulaCommand']['id'],_0x491dd4);return _0x4126e8?this['_injector']['createInstance'](a,this['_document'][_0xe09231(0x196)](),_0x4126e8[_0xe09231(0x17e)]):null;}};n[_0x3464a0(0x1a2)][_0x3464a0(0x18f)](d);var f=class extends n[_0x3464a0(0x19e)]{constructor(..._0x3b0312){const _0x320cfb=_0x3464a0;super(..._0x3b0312),l(this,_0x320cfb(0x1bb),void 0x0);}[_0x3464a0(0x176)](_0xaa8690){const _0x1b2ac9=_0x3464a0;this[_0x1b2ac9(0x1bb)]=_0xaa8690[_0x1b2ac9(0x17d)](t['ICommandService']);}['replaceWithFormula'](_0x117c98,_0x295e04={}){const _0x267a44=_0x3464a0;let {endOffset:_0x177ab0,segmentId:_0x61a80,startOffset:_0x41ffef}=this[_0x267a44(0x1ab)]();return _0x61a80?null:this[_0x267a44(0x17a)](_0x41ffef,_0x177ab0,_0x117c98,_0x295e04);}[_0x3464a0(0x17a)](_0x4f35e2,_0x1bcaff,_0x18b27e,_0x4d32da){const _0x5d4b0f=_0x3464a0;let _0x165e3f={'externalReferences':_0x4d32da[_0x5d4b0f(0x1bf)],'formula':_0x18b27e,'numberFormat':_0x4d32da['numberFormat'],'target':{'type':_0x5d4b0f(0x177),'startOffset':_0x4f35e2,'endOffset':_0x1bcaff},'unitId':this[_0x5d4b0f(0x191)][_0x5d4b0f(0x196)]()},_0x2d559c=this[_0x5d4b0f(0x1bb)][_0x5d4b0f(0x19c)](e[_0x5d4b0f(0x178)]['id'],_0x165e3f);return _0x2d559c?this[_0x5d4b0f(0x1ad)][_0x5d4b0f(0x193)](a,this['_document']['getId'](),_0x2d559c[_0x5d4b0f(0x17e)]):null;}};function _0x3bf6(){const _0x2dfd5d=['string','getUnit','_model','appendFormula','UNIVER_DOC','endOffset','_initialize','range','InsertDocFormulaCommand','48xSVgEw','_insert','DocFormulaModel','find','get','rangeId','7764906IGhQBi','setNumberFormat','1194AnAcze','decorate','FDocumentFormula','_unitId','ReplaceDocFormulaWithTextCommand','_docsFormulaModel','RemoveDocFormulaCommand','constructor','_commandService','getConfig','numberFormat','_docsFormulaResourceLoaderService','endIndex','UpdateDocFormulaCommand','extend','DocFormulaDisplayTextService','_document','DocFormulaService','createInstance','_univerInstanceService','14373204JddNoW','getId','getResult','140PkHTjJ','515KyPkwz','ConvertDocFormulaToTextCommand','1195614cLwPef','syncExecuteCommand','getFormulaAt','FDocumentTextRange','paragraph','_getCustomRange','some','FDocumentParagraph','getFormula','418617mxeiJQ','symbol','_service','1167zPLzfL','IResourceLoaderService','end','_docsFormulaDisplayTextService','getRange','FDocument','_injector','Module','update','getSegmentId','ICommandService','function','11dDMVZG','IUniverInstanceService','getSnapshot','defineProperty','\x20could\x20not\x20be\x20serialized.','_createFormula','startIndex','48932eXncuM','_docsFormulaCommandService','object','filter','convertToText','externalReferences','isDocFormulaRange','saveFormulaDisplayTextSnapshot','_rangeId','formula','body','default','remove','insertFormula','getBody','Inject','length','SetDocFormulaNumberFormatCommand','116472RrtTct','getFormulas','_getCompleteRanges','saveUnit','map'];_0x3bf6=function(){return _0x2dfd5d;};return _0x3bf6();}n['FDocumentTextRange'][_0x3464a0(0x18f)](f),Object[_0x3464a0(0x1b6)](exports,_0x3464a0(0x183),{'enumerable':!0x0,'get':function(){return a;}});
1
+ const _0xd3d361=_0x28c1;(function(_0x2ee3e7,_0x52a363){const _0x56f3b5=_0x28c1,_0x442a80=_0x2ee3e7();while(!![]){try{const _0x241406=parseInt(_0x56f3b5(0x1dd))/0x1*(-parseInt(_0x56f3b5(0x1ac))/0x2)+parseInt(_0x56f3b5(0x1ca))/0x3+parseInt(_0x56f3b5(0x1b6))/0x4*(-parseInt(_0x56f3b5(0x1e2))/0x5)+-parseInt(_0x56f3b5(0x1d3))/0x6*(-parseInt(_0x56f3b5(0x194))/0x7)+parseInt(_0x56f3b5(0x1cf))/0x8+-parseInt(_0x56f3b5(0x191))/0x9+parseInt(_0x56f3b5(0x1ee))/0xa;if(_0x241406===_0x52a363)break;else _0x442a80['push'](_0x442a80['shift']());}catch(_0x1260b){_0x442a80['push'](_0x442a80['shift']());}}}(_0x4728,0x871f6),Object['defineProperty'](exports,Symbol['toStringTag'],{'value':'Module'}));let e=require('@univerjs-pro/docs-formula'),t=require('@univerjs/core'),n=require('@univerjs/docs/facade');function r(_0x579b07,_0x55593d){return function(_0x3b660d,_0x4094c2){_0x55593d(_0x3b660d,_0x4094c2,_0x579b07);};}function i(_0x358a50,_0xa65942,_0xcca8be,_0x501152){const _0x2f5088=_0x28c1;var _0x3b7d1c=arguments[_0x2f5088(0x1d9)],_0x1c5f4d=_0x3b7d1c<0x3?_0xa65942:_0x501152===null?_0x501152=Object[_0x2f5088(0x1ea)](_0xa65942,_0xcca8be):_0x501152,_0x584b55;if(typeof Reflect==_0x2f5088(0x1a6)&&typeof Reflect[_0x2f5088(0x1ba)]==_0x2f5088(0x1d4))_0x1c5f4d=Reflect[_0x2f5088(0x1ba)](_0x358a50,_0xa65942,_0xcca8be,_0x501152);else{for(var _0x49f1a0=_0x358a50[_0x2f5088(0x1d9)]-0x1;_0x49f1a0>=0x0;_0x49f1a0--)(_0x584b55=_0x358a50[_0x49f1a0])&&(_0x1c5f4d=(_0x3b7d1c<0x3?_0x584b55(_0x1c5f4d):_0x3b7d1c>0x3?_0x584b55(_0xa65942,_0xcca8be,_0x1c5f4d):_0x584b55(_0xa65942,_0xcca8be))||_0x1c5f4d);}return _0x3b7d1c>0x3&&_0x1c5f4d&&Object[_0x2f5088(0x1bd)](_0xa65942,_0xcca8be,_0x1c5f4d),_0x1c5f4d;}let a=class{constructor(_0x4aa219,_0x370d3b,_0x2fc348,_0x174a10,_0xa0db81,_0x435206){const _0x9bc173=_0x28c1;this[_0x9bc173(0x1bc)]=_0x4aa219,this[_0x9bc173(0x1cc)]=_0x370d3b,this[_0x9bc173(0x1cd)]=_0x2fc348,this['_model']=_0x174a10,this[_0x9bc173(0x1d8)]=_0xa0db81,this[_0x9bc173(0x1a8)]=_0x435206;}[_0xd3d361(0x1df)](){const _0x25bc44=_0xd3d361;return this[_0x25bc44(0x1cc)];}['getRange'](){const _0x3b3663=_0xd3d361;let _0xf6eb7d=this[_0x3b3663(0x1c0)]();return _0xf6eb7d?{'endOffset':_0xf6eb7d['endIndex']+0x1,'rangeId':_0xf6eb7d['rangeId'],'startOffset':_0xf6eb7d[_0x3b3663(0x18c)]}:null;}[_0xd3d361(0x1e1)](){const _0x351e31=_0xd3d361;var _0x5497d3;return((_0x5497d3=this[_0x351e31(0x18d)][_0x351e31(0x1e1)](this[_0x351e31(0x1bc)],this[_0x351e31(0x1cc)]))==null?void 0x0:_0x5497d3[_0x351e31(0x1e7)])??'';}['getConfig'](){const _0x17174c=_0xd3d361;return this[_0x17174c(0x18d)][_0x17174c(0x1e1)](this[_0x17174c(0x1bc)],this[_0x17174c(0x1cc)])??null;}[_0xd3d361(0x1e0)](){const _0x79e470=_0xd3d361;return this['_service'][_0x79e470(0x1e0)]({'unitId':this[_0x79e470(0x1bc)],'rangeId':this[_0x79e470(0x1cc)]})??null;}['describe'](){const _0x497dd9=_0xd3d361;let _0x5b9a25=this[_0x497dd9(0x1b1)](),_0x2daf1d=this[_0x497dd9(0x1e6)](),_0x4c249c=this[_0x497dd9(0x1e0)]();return!_0x5b9a25||!_0x2daf1d||!_0x4c249c?null:{..._0x5b9a25,'config':_0x2daf1d,'formula':_0x2daf1d['formula'],'result':_0x4c249c,'type':_0x497dd9(0x1e7)};}[_0xd3d361(0x1b5)](_0x4a3e8a){const _0x2b6660=_0xd3d361;return this[_0x2b6660(0x1cd)][_0x2b6660(0x1a3)](e[_0x2b6660(0x18f)]['id'],{'externalReferences':_0x4a3e8a[_0x2b6660(0x1a1)],'formula':_0x4a3e8a[_0x2b6660(0x1e7)],'numberFormat':_0x4a3e8a[_0x2b6660(0x197)],'rangeId':this['_rangeId'],'unitId':this[_0x2b6660(0x1bc)]});}[_0xd3d361(0x1af)](_0x3332cf){const _0x381cad=_0xd3d361;return this['_commandService'][_0x381cad(0x1a3)](e[_0x381cad(0x1b2)]['id'],{'numberFormat':_0x3332cf,'rangeId':this[_0x381cad(0x1cc)],'unitId':this[_0x381cad(0x1bc)]});}[_0xd3d361(0x1aa)](){const _0x32ca86=_0xd3d361;return this[_0x32ca86(0x1cd)]['syncExecuteCommand'](e['RemoveDocFormulaCommand']['id'],{'rangeId':this[_0x32ca86(0x1cc)],'unitId':this[_0x32ca86(0x1bc)]});}['replaceWithText'](_0x164135){const _0x51045a=_0xd3d361;return this[_0x51045a(0x1cd)][_0x51045a(0x1a3)](e[_0x51045a(0x19d)]['id'],{'rangeId':this[_0x51045a(0x1cc)],'text':_0x164135,'unitId':this[_0x51045a(0x1bc)]});}[_0xd3d361(0x1b4)](){const _0x4af047=_0xd3d361;return this[_0x4af047(0x1cd)][_0x4af047(0x1a3)](e['ConvertDocFormulaToTextCommand']['id'],{'rangeId':this[_0x4af047(0x1cc)],'unitId':this[_0x4af047(0x1bc)]});}[_0xd3d361(0x1c0)](){const _0x50c0c7=_0xd3d361;var _0x3cb279;let _0x765358=this[_0x50c0c7(0x1a8)][_0x50c0c7(0x19a)](this[_0x50c0c7(0x1bc)],t[_0x50c0c7(0x1b3)][_0x50c0c7(0x1db)]);return _0x765358==null||(_0x3cb279=_0x765358[_0x50c0c7(0x19e)]()[_0x50c0c7(0x1a9)])==null||(_0x3cb279=_0x3cb279[_0x50c0c7(0x1be)])==null?void 0x0:_0x3cb279[_0x50c0c7(0x1e4)](_0x5c65d1=>_0x5c65d1[_0x50c0c7(0x1e8)]===this[_0x50c0c7(0x1cc)]&&(0x0,e[_0x50c0c7(0x1a7)])(_0x5c65d1));}};a=i([r(0x2,t[_0xd3d361(0x190)]),r(0x3,(0x0,t[_0xd3d361(0x1c7)])(e[_0xd3d361(0x192)])),r(0x4,(0x0,t[_0xd3d361(0x1c7)])(e[_0xd3d361(0x1da)])),r(0x5,t[_0xd3d361(0x1cb)])],a);function o(_0x5b71c1){'@babel/helpers - typeof';const _0x3d92dc=_0xd3d361;return o=typeof Symbol==_0x3d92dc(0x1d4)&&typeof Symbol['iterator']==_0x3d92dc(0x1ae)?function(_0xd36509){return typeof _0xd36509;}:function(_0x446bc2){const _0x59b13f=_0x3d92dc;return _0x446bc2&&typeof Symbol=='function'&&_0x446bc2[_0x59b13f(0x1c2)]===Symbol&&_0x446bc2!==Symbol[_0x59b13f(0x196)]?'symbol':typeof _0x446bc2;},o(_0x5b71c1);}function s(_0x42a2c7,_0xdd78d8){const _0x2fa9df=_0xd3d361;if(o(_0x42a2c7)!=_0x2fa9df(0x1a6)||!_0x42a2c7)return _0x42a2c7;var _0x1fcc2b=_0x42a2c7[Symbol[_0x2fa9df(0x1e5)]];if(_0x1fcc2b!==void 0x0){var _0x159f4b=_0x1fcc2b[_0x2fa9df(0x1a5)](_0x42a2c7,_0xdd78d8||_0x2fa9df(0x1dc));if(o(_0x159f4b)!=_0x2fa9df(0x1a6))return _0x159f4b;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0xdd78d8===_0x2fa9df(0x1c1)?String:Number)(_0x42a2c7);}function _0x28c1(_0x408777,_0x6a56e6){_0x408777=_0x408777-0x18c;const _0x472804=_0x4728();let _0x28c182=_0x472804[_0x408777];return _0x28c182;}function c(_0x639bf7){const _0x47d8b5=_0xd3d361;var _0xace01b=s(_0x639bf7,_0x47d8b5(0x1c1));return o(_0xace01b)==_0x47d8b5(0x1ae)?_0xace01b:_0xace01b+'';}function l(_0x43f897,_0x365498,_0x54fb92){const _0x3120e0=_0xd3d361;return(_0x365498=c(_0x365498))in _0x43f897?Object[_0x3120e0(0x1bd)](_0x43f897,_0x365498,{'value':_0x54fb92,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x43f897[_0x365498]=_0x54fb92,_0x43f897;}var u=class extends n[_0xd3d361(0x193)]{constructor(..._0x4436c2){const _0x415970=_0xd3d361;super(..._0x4436c2),l(this,'_docsFormulaCommandService',void 0x0),l(this,_0x415970(0x1c5),void 0x0),l(this,'_docsFormulaModel',void 0x0),l(this,_0x415970(0x195),void 0x0);}[_0xd3d361(0x1ab)](_0x706253){const _0x5c4323=_0xd3d361;this[_0x5c4323(0x1c4)]=_0x706253[_0x5c4323(0x1b0)](t['ICommandService']),this['_docsFormulaDisplayTextService']=_0x706253['get'](e[_0x5c4323(0x1b8)]),this[_0x5c4323(0x1bf)]=_0x706253['get'](e[_0x5c4323(0x192)]),this[_0x5c4323(0x195)]=_0x706253[_0x5c4323(0x1b0)](t[_0x5c4323(0x1a0)]);}[_0xd3d361(0x19b)](){const _0x2a4eff=_0xd3d361;return this[_0x2a4eff(0x1b7)]()[_0x2a4eff(0x1c3)](_0x3e6e78=>this[_0x2a4eff(0x1d2)](_0x3e6e78[_0x2a4eff(0x1e8)]));}[_0xd3d361(0x1e1)](_0x340a85){const _0x5675db=_0xd3d361;return this['_getCompleteRanges']()[_0x5675db(0x1a4)](_0x93c26d=>_0x93c26d['rangeId']===_0x340a85)?this[_0x5675db(0x1d2)](_0x340a85):null;}[_0xd3d361(0x1c8)](_0x31dd93){const _0x5484b9=_0xd3d361;let _0x162e13=this[_0x5484b9(0x1b7)]()['find'](_0x4307b8=>_0x4307b8[_0x5484b9(0x18c)]<=_0x31dd93&&_0x31dd93<=_0x4307b8[_0x5484b9(0x1ad)]);return _0x162e13?this[_0x5484b9(0x1d2)](_0x162e13['rangeId']):null;}[_0xd3d361(0x18e)](){const _0x3f7aa6=_0xd3d361;let _0x32c849=this[_0x3f7aa6(0x195)][_0x3f7aa6(0x1c6)](this['id']);if(!_0x32c849)throw Error(_0x3f7aa6(0x1ed)+this['id']+_0x3f7aa6(0x199));return this[_0x3f7aa6(0x1c5)][_0x3f7aa6(0x1c9)](_0x32c849);}[_0xd3d361(0x19f)](_0x5107d6){const _0x503617=_0xd3d361;return this['_insert']({'externalReferences':_0x5107d6[_0x503617(0x1a1)],'formula':_0x5107d6[_0x503617(0x1e7)],'numberFormat':_0x5107d6[_0x503617(0x197)],'target':{'type':_0x503617(0x1de),'startOffset':_0x5107d6[_0x503617(0x1d0)],'endOffset':_0x5107d6[_0x503617(0x198)]},'unitId':this[_0x503617(0x1df)]()});}['_insert'](_0x2ff348){const _0x2f6903=_0xd3d361;let _0x15041f=this['_docsFormulaCommandService'][_0x2f6903(0x1a3)](e[_0x2f6903(0x1e3)]['id'],_0x2ff348);return _0x15041f?this[_0x2f6903(0x1d2)](_0x15041f['rangeId']):null;}[_0xd3d361(0x1b7)](){const _0x1bcae4=_0xd3d361;var _0x1e3f06;let _0x520434=this[_0x1bcae4(0x1bf)][_0x1bcae4(0x19b)](this[_0x1bcae4(0x1df)]());return((_0x1e3f06=this[_0x1bcae4(0x1d6)]('')['customRanges'])==null?void 0x0:_0x1e3f06[_0x1bcae4(0x1d1)](_0x466117=>(0x0,e[_0x1bcae4(0x1a7)])(_0x466117)&&_0x520434[_0x466117[_0x1bcae4(0x1e8)]]!=null))??[];}[_0xd3d361(0x1d2)](_0x1609f0){const _0x497d7c=_0xd3d361;return this[_0x497d7c(0x1bb)][_0x497d7c(0x1e9)](a,this[_0x497d7c(0x1df)](),_0x1609f0);}};n[_0xd3d361(0x193)][_0xd3d361(0x1d7)](u);function _0x4728(){const _0x2689d3=['getResult','getFormula','2540990zDgZPc','InsertDocFormulaCommand','find','toPrimitive','getConfig','formula','rangeId','createInstance','getOwnPropertyDescriptor','FDocumentTextRange','_insert','Document\x20','6968090wHsatc','startIndex','_model','saveFormulaDisplayTextSnapshot','UpdateDocFormulaCommand','ICommandService','5705856cWwmYo','DocFormulaModel','FDocument','5709319jOAQaO','_docsFormulaResourceLoaderService','prototype','numberFormat','endOffset','\x20could\x20not\x20be\x20serialized.','getUnit','getFormulas','paragraph','ReplaceDocFormulaWithTextCommand','getSnapshot','insertFormula','IResourceLoaderService','externalReferences','end','syncExecuteCommand','some','call','object','isDocFormulaRange','_univerInstanceService','body','remove','_initialize','6yYUgZi','endIndex','symbol','setNumberFormat','get','getRange','SetDocFormulaNumberFormatCommand','UniverInstanceType','convertToText','update','8kpjTBS','_getCompleteRanges','DocFormulaDisplayTextService','FDocumentParagraph','decorate','_injector','_unitId','defineProperty','customRanges','_docsFormulaModel','_getCustomRange','string','constructor','map','_docsFormulaCommandService','_docsFormulaDisplayTextService','saveUnit','Inject','getFormulaAt','degradeDocumentData','1282620lEigmM','IUniverInstanceService','_rangeId','_commandService','_document','8029432BJnTRz','startOffset','filter','_createFormula','6HdMXhJ','function','appendFormula','getBody','extend','_service','length','DocFormulaService','UNIVER_DOC','default','246601OdjooV','range','getId'];_0x4728=function(){return _0x2689d3;};return _0x4728();}var d=class extends n['FDocumentParagraph']{constructor(..._0x13dded){super(..._0x13dded),l(this,'_docsFormulaCommandService',void 0x0);}[_0xd3d361(0x1ab)](_0x3ef2e6){const _0x890f63=_0xd3d361;this['_docsFormulaCommandService']=_0x3ef2e6[_0x890f63(0x1b0)](t[_0x890f63(0x190)]);}[_0xd3d361(0x19f)](_0x47e82d,_0x3d602d,_0x2bc91e={}){const _0x376ad7=_0xd3d361;return this[_0x376ad7(0x1ec)](_0x47e82d,_0x3d602d,_0x2bc91e);}[_0xd3d361(0x1d5)](_0x3f7bb9,_0x4fe69f={}){const _0x181367=_0xd3d361;return this['_insert'](_0x181367(0x1a2),_0x3f7bb9,_0x4fe69f);}[_0xd3d361(0x1ec)](_0xe15387,_0x2125e8,_0xfad777){const _0x423cfa=_0xd3d361;if(this['getSegmentId']())return null;let _0x19a8a1={'externalReferences':_0xfad777[_0x423cfa(0x1a1)],'formula':_0x2125e8,'numberFormat':_0xfad777['numberFormat'],'target':{'type':_0x423cfa(0x19c),'paragraphId':this[_0x423cfa(0x1df)](),'position':_0xe15387},'unitId':this[_0x423cfa(0x1ce)][_0x423cfa(0x1df)]()},_0x53af05=this[_0x423cfa(0x1c4)]['syncExecuteCommand'](e['InsertDocFormulaCommand']['id'],_0x19a8a1);return _0x53af05?this[_0x423cfa(0x1bb)][_0x423cfa(0x1e9)](a,this[_0x423cfa(0x1ce)][_0x423cfa(0x1df)](),_0x53af05['rangeId']):null;}};n[_0xd3d361(0x1b9)][_0xd3d361(0x1d7)](d);var f=class extends n[_0xd3d361(0x1eb)]{constructor(..._0x46bdea){const _0x32e3d4=_0xd3d361;super(..._0x46bdea),l(this,_0x32e3d4(0x1c4),void 0x0);}[_0xd3d361(0x1ab)](_0x75f4c2){const _0x2fba87=_0xd3d361;this[_0x2fba87(0x1c4)]=_0x75f4c2[_0x2fba87(0x1b0)](t[_0x2fba87(0x190)]);}['replaceWithFormula'](_0x12dabd,_0x4a13cc={}){const _0x4153f5=_0xd3d361;let {endOffset:_0x46e761,segmentId:_0x4c00fb,startOffset:_0x53cbf2}=this['getRange']();return _0x4c00fb?null:this[_0x4153f5(0x1ec)](_0x53cbf2,_0x46e761,_0x12dabd,_0x4a13cc);}[_0xd3d361(0x1ec)](_0x1b0fa2,_0x733c5a,_0x2559e9,_0x2525d9){const _0x125710=_0xd3d361;let _0x493a4d={'externalReferences':_0x2525d9[_0x125710(0x1a1)],'formula':_0x2559e9,'numberFormat':_0x2525d9['numberFormat'],'target':{'type':_0x125710(0x1de),'startOffset':_0x1b0fa2,'endOffset':_0x733c5a},'unitId':this['_document']['getId']()},_0x121f5b=this[_0x125710(0x1c4)][_0x125710(0x1a3)](e[_0x125710(0x1e3)]['id'],_0x493a4d);return _0x121f5b?this['_injector']['createInstance'](a,this[_0x125710(0x1ce)]['getId'](),_0x121f5b[_0x125710(0x1e8)]):null;}};n[_0xd3d361(0x1eb)][_0xd3d361(0x1d7)](f),Object[_0xd3d361(0x1bd)](exports,'FDocumentFormula',{'enumerable':!0x0,'get':function(){return a;}});
package/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- const _0x39b1a5=_0x4a80;(function(_0x3d4a82,_0x46dc0f){const _0x220c17=_0x4a80,_0x36e7de=_0x3d4a82();while(!![]){try{const _0x640702=parseInt(_0x220c17(0x17c))/0x1*(-parseInt(_0x220c17(0x1a6))/0x2)+-parseInt(_0x220c17(0x1d9))/0x3*(parseInt(_0x220c17(0x25a))/0x4)+parseInt(_0x220c17(0x1e7))/0x5+parseInt(_0x220c17(0x1ad))/0x6+parseInt(_0x220c17(0x23b))/0x7+-parseInt(_0x220c17(0x1d7))/0x8+parseInt(_0x220c17(0x14a))/0x9;if(_0x640702===_0x46dc0f)break;else _0x36e7de['push'](_0x36e7de['shift']());}catch(_0xb15909){_0x36e7de['push'](_0x36e7de['shift']());}}}(_0x3dcb,0x28551),Object[_0x39b1a5(0x235)](exports,Symbol[_0x39b1a5(0x1f5)],{'value':_0x39b1a5(0x1fb)}));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=_0x39b1a5(0x243),s=_0x39b1a5(0x1d4);function c(){return{'schemaVersion':0x1,'formulas':{}};}function l(_0x4f7cad){const _0x231549=_0x39b1a5;return!_0x4f7cad||typeof _0x4f7cad!=_0x231549(0x1bc)||!f(_0x4f7cad,[_0x231549(0x131),_0x231549(0x1e6)])||!(_0x231549(0x131)in _0x4f7cad)||_0x4f7cad['schemaVersion']!==0x1||!(_0x231549(0x1e6)in _0x4f7cad)||!_0x4f7cad['formulas']||typeof _0x4f7cad[_0x231549(0x1e6)]!=_0x231549(0x1bc)||Array[_0x231549(0x141)](_0x4f7cad[_0x231549(0x1e6)])?!0x1:Object[_0x231549(0x246)](_0x4f7cad[_0x231549(0x1e6)])[_0x231549(0x124)](([_0x1d0c5f,_0x19ac1d])=>_0x1d0c5f[_0x231549(0x153)]>0x0&&u(_0x19ac1d));}function u(_0x38f13e){const _0x50857a=_0x39b1a5;return!_0x38f13e||typeof _0x38f13e!=_0x50857a(0x1bc)||!f(_0x38f13e,['formula',_0x50857a(0x1ac),_0x50857a(0x1d6)])||!('formula'in _0x38f13e)||typeof _0x38f13e['formula']!=_0x50857a(0x14f)||!_0x38f13e[_0x50857a(0x1bf)][_0x50857a(0x1ca)]()||_0x50857a(0x1ac)in _0x38f13e&&_0x38f13e[_0x50857a(0x1ac)]!=null&&(typeof _0x38f13e['numberFormat']!=_0x50857a(0x1bc)||!f(_0x38f13e[_0x50857a(0x1ac)],[_0x50857a(0x217)])||!('pattern'in _0x38f13e[_0x50857a(0x1ac)])||typeof _0x38f13e[_0x50857a(0x1ac)]['pattern']!=_0x50857a(0x14f))?!0x1:!(_0x50857a(0x1d6)in _0x38f13e)||_0x38f13e[_0x50857a(0x1d6)]==null||d(_0x38f13e[_0x50857a(0x1d6)]);}function d(_0x44d45d){const _0x389577=_0x39b1a5;return!_0x44d45d||typeof _0x44d45d!=_0x389577(0x1bc)||!f(_0x44d45d,['v','t',_0x389577(0x217)])||!('v'in _0x44d45d)||_0x44d45d['v']!==null&&typeof _0x44d45d['v']!='string'&&typeof _0x44d45d['v']!=_0x389577(0x1b0)&&typeof _0x44d45d['v']!=_0x389577(0x140)||'t'in _0x44d45d&&_0x44d45d['t']!=null&&!ee(_0x44d45d['t'])?!0x1:!(_0x389577(0x217)in _0x44d45d)||_0x44d45d[_0x389577(0x217)]==null||typeof _0x44d45d[_0x389577(0x217)]==_0x389577(0x14f);}function f(_0x50a4ea,_0x1838c5){const _0x2a0814=_0x39b1a5;let _0x1aa192=new Set(_0x1838c5);return Object[_0x2a0814(0x207)](_0x50a4ea)[_0x2a0814(0x124)](_0x134206=>_0x1aa192['has'](_0x134206));}function ee(_0x23f812){const _0x30d67a=_0x39b1a5;return typeof _0x23f812==_0x30d67a(0x1b0)&&Object[_0x30d67a(0x17f)](t[_0x30d67a(0x163)])[_0x30d67a(0x15d)](_0x23f812);}const p=new Set([t[_0x39b1a5(0x241)][_0x39b1a5(0x148)],t[_0x39b1a5(0x241)][_0x39b1a5(0x136)],t[_0x39b1a5(0x241)][_0x39b1a5(0x197)],t[_0x39b1a5(0x241)]['TABLE_CELL_START'],t['DataStreamTreeTokenType'][_0x39b1a5(0x13a)],t[_0x39b1a5(0x241)][_0x39b1a5(0x206)],t[_0x39b1a5(0x241)]['TABLE_END'],t[_0x39b1a5(0x241)][_0x39b1a5(0x158)],t['DataStreamTreeTokenType']['COLUMN_START'],t[_0x39b1a5(0x241)][_0x39b1a5(0x1ab)],t[_0x39b1a5(0x241)][_0x39b1a5(0x176)],t[_0x39b1a5(0x241)][_0x39b1a5(0x16e)],t[_0x39b1a5(0x241)][_0x39b1a5(0x1a3)],t[_0x39b1a5(0x241)][_0x39b1a5(0x250)]]);var m=class extends Error{constructor(){const _0x566dca=_0x39b1a5;super(_0x566dca(0x1a5));}};function te(_0x3da45c){const _0x36b6bb=_0x39b1a5;var _0x4586ea,_0x387f16;let _0x3bb8df=t[_0x36b6bb(0x1d5)]['deepClone'](_0x3da45c[_0x36b6bb(0x1f6)]),_0x4ab82d=T(_0x3bb8df),{startOffset:_0x53f1fe,endOffset:_0x44daca}=oe(_0x4ab82d,_0x3da45c[_0x36b6bb(0x22a)],_0x3da45c[_0x36b6bb(0x1de)]);ie(_0x4ab82d,_0x53f1fe,_0x44daca);let _0x5e3894=((_0x4586ea=_0x4ab82d[_0x36b6bb(0x215)])==null?void 0x0:_0x4586ea[_0x36b6bb(0x1fc)](_0x5e1ee1=>{const _0x530431=_0x36b6bb;if(!g(_0x5e1ee1))return!0x1;let _0x3fe74a=(0x0,t['getCustomRangeInterval'])(_0x5e1ee1);return _0x3fe74a['endOffset']>_0x53f1fe&&_0x3fe74a[_0x530431(0x22a)]<_0x44daca;})[_0x36b6bb(0x233)](_0x1afa23=>_0x1afa23[_0x36b6bb(0x133)]))??[];ce(_0x4ab82d,_0x53f1fe,_0x44daca,''),_0x4ab82d[_0x36b6bb(0x215)]=[...((_0x387f16=_0x4ab82d[_0x36b6bb(0x215)])==null?void 0x0:_0x387f16[_0x36b6bb(0x1fc)](_0x3727c2=>!_0x5e3894[_0x36b6bb(0x15d)](_0x3727c2[_0x36b6bb(0x133)])&&_0x3727c2[_0x36b6bb(0x133)]!==_0x3da45c[_0x36b6bb(0x133)]))??[],ae(_0x3da45c[_0x36b6bb(0x133)],_0x53f1fe)][_0x36b6bb(0x142)]((_0xda0025,_0x5cc0b6)=>_0xda0025[_0x36b6bb(0x146)]-_0x5cc0b6['startIndex']);let _0x353614=v(_0x3da45c[_0x36b6bb(0x1da)]);return _0x5e3894[_0x36b6bb(0x213)](_0x3f993d=>{delete _0x353614['formulas'][_0x3f993d];}),_0x353614[_0x36b6bb(0x1e6)][_0x3da45c[_0x36b6bb(0x133)]]=t[_0x36b6bb(0x1d5)][_0x36b6bb(0x138)](_0x3da45c[_0x36b6bb(0x18e)]),{'nextDocumentData':_0x3bb8df,'nextResource':_0x353614,'cursorOffset':_0x53f1fe+0x1};}function ne(_0x285b5e){const _0x3f6a85=_0x39b1a5;var _0xe1b688,_0x4e7b75;let _0x23bb7f=t['Tools'][_0x3f6a85(0x138)](_0x285b5e[_0x3f6a85(0x1f6)]),_0x5cefb6=(_0xe1b688=T(_0x23bb7f)[_0x3f6a85(0x215)])==null?void 0x0:_0xe1b688[_0x3f6a85(0x182)](_0x301a39=>_0x301a39['rangeId']===_0x285b5e[_0x3f6a85(0x133)]&&g(_0x301a39));if(!_0x5cefb6||!((_0x4e7b75=_0x285b5e['resource'])!=null&&_0x4e7b75[_0x3f6a85(0x1e6)][_0x285b5e[_0x3f6a85(0x133)]]))return null;let _0xdbc79d=v(_0x285b5e[_0x3f6a85(0x1da)]);return _0xdbc79d[_0x3f6a85(0x1e6)][_0x285b5e[_0x3f6a85(0x133)]]=t[_0x3f6a85(0x1d5)][_0x3f6a85(0x138)](_0x285b5e[_0x3f6a85(0x18e)]),{'nextDocumentData':_0x23bb7f,'nextResource':_0xdbc79d,'cursorOffset':_0x5cefb6[_0x3f6a85(0x18a)]+0x1};}function h(_0x51b877){const _0x12475d=_0x39b1a5;let _0x341824=t[_0x12475d(0x1d5)][_0x12475d(0x138)](_0x51b877[_0x12475d(0x1f6)]),_0x54c1d0=le(_0x341824,_0x51b877[_0x12475d(0x133)],_0x51b877[_0x12475d(0x1d1)]??'');if(_0x54c1d0==null)return null;let _0x5979b3=v(_0x51b877[_0x12475d(0x1da)]);return delete _0x5979b3[_0x12475d(0x1e6)][_0x51b877[_0x12475d(0x133)]],{'nextDocumentData':_0x341824,'nextResource':_0x5979b3,'cursorOffset':_0x54c1d0};}function re(_0x495864,_0x125681){const _0x51378d=_0x39b1a5;var _0x8f13c1;let _0xb3507e=t[_0x51378d(0x1d5)]['deepClone'](_0x495864),_0x51e391=_0xb3507e['body'];if(!_0x51e391)return _0xb3507e;let _0x45b54f=new Map(_0x125681[_0x51378d(0x233)](_0x1b487d=>[_0x1b487d['rangeId'],_0x1b487d[_0x51378d(0x1d1)]])),_0x30660d=((_0x8f13c1=_0x51e391[_0x51378d(0x215)])==null?void 0x0:_0x8f13c1[_0x51378d(0x1fc)](_0xb2cc14=>g(_0xb2cc14)&&_0x45b54f[_0x51378d(0x1e1)](_0xb2cc14[_0x51378d(0x133)]))['sort']((_0x572bca,_0x5da57d)=>_0x5da57d[_0x51378d(0x146)]-_0x572bca[_0x51378d(0x146)]))??[];for(let _0x2feedc of _0x30660d)le(_0xb3507e,_0x2feedc[_0x51378d(0x133)],_0x45b54f[_0x51378d(0x234)](_0x2feedc[_0x51378d(0x133)])??'');return _0xb3507e;}function g(_0x5c2588){const _0xd330bd=_0x39b1a5;var _0x553b9f;return(_0x5c2588==null?void 0x0:_0x5c2588[_0xd330bd(0x17a)])===t[_0xd330bd(0x1eb)]['CUSTOM']&&_0x5c2588[_0xd330bd(0x1ce)]===!0x0&&((_0x553b9f=_0x5c2588[_0xd330bd(0x135)])==null?void 0x0:_0x553b9f[_0xd330bd(0x143)])===_0xd330bd(0x1d4);}function _(_0x1b432c,_0x3357d4){const _0x5c967e=_0x39b1a5;var _0x20964b;return _0x1b432c==null||(_0x20964b=_0x1b432c['customRanges'])==null?void 0x0:_0x20964b[_0x5c967e(0x182)](_0x416e85=>_0x416e85[_0x5c967e(0x133)]===_0x3357d4&&g(_0x416e85));}function ie(_0x17ac84,_0x448b9b,_0x4c74c5){const _0x1a73a9=_0x39b1a5;if(_0x448b9b===_0x4c74c5){if(p['has'](_0x17ac84[_0x1a73a9(0x258)][_0x448b9b]))throw new m();}else{for(let _0x1a0f49=_0x448b9b;_0x1a0f49<_0x4c74c5;_0x1a0f49++)if(_0x17ac84[_0x1a73a9(0x258)][_0x1a0f49]===t['DataStreamTreeTokenType'][_0x1a73a9(0x22d)]||p[_0x1a73a9(0x1e1)](_0x17ac84[_0x1a73a9(0x258)][_0x1a0f49]))throw new m();}}function ae(_0x40e9ec,_0x1bd868){const _0x9fed95=_0x39b1a5;return{'startIndex':_0x1bd868,'endIndex':_0x1bd868,'rangeId':_0x40e9ec,'rangeType':t[_0x9fed95(0x1eb)]['CUSTOM'],'wholeEntity':!0x0,'properties':{'kind':s}};}function v(_0x1bae12){const _0x363d33=_0x39b1a5;return _0x1bae12?t['Tools'][_0x363d33(0x138)](_0x1bae12):c();}function oe(_0x457d8a,_0x46afca,_0x47bb4a){const _0x1dbca0=_0x39b1a5;let _0x2fe919=se(_0x457d8a),_0x39281a=_0x46afca??_0x2fe919,_0x5692f5=_0x47bb4a??_0x39281a;return{'startOffset':y(Math[_0x1dbca0(0x220)](_0x39281a,_0x5692f5),_0x2fe919),'endOffset':y(Math['max'](_0x39281a,_0x5692f5),_0x2fe919)};}function y(_0x23b8e7,_0x389b7f){const _0x5e51ce=_0x39b1a5;return Math[_0x5e51ce(0x1c4)](0x0,Math[_0x5e51ce(0x220)](_0x23b8e7,_0x389b7f));}function se(_0x5ef912){const _0x3d9036=_0x39b1a5;return _0x5ef912[_0x3d9036(0x258)][_0x3d9036(0x17b)](''+t['DataStreamTreeTokenType'][_0x3d9036(0x22d)]+t['DataStreamTreeTokenType'][_0x3d9036(0x148)])?Math[_0x3d9036(0x1c4)](0x0,_0x5ef912[_0x3d9036(0x258)]['length']-0x2):_0x5ef912[_0x3d9036(0x258)]['endsWith'](t[_0x3d9036(0x241)][_0x3d9036(0x148)])?Math[_0x3d9036(0x1c4)](0x0,_0x5ef912[_0x3d9036(0x258)][_0x3d9036(0x153)]-0x1):_0x5ef912[_0x3d9036(0x258)]['length'];}function ce(_0x1d87d4,_0x4a1a77,_0x1b5f45,_0x4bf2d9){_0x1b5f45>_0x4a1a77&&de(_0x1d87d4,_0x4a1a77,_0x1b5f45),ue(_0x1d87d4,_0x4a1a77,_0x4bf2d9);}function le(_0x3f66c2,_0xbf90ce,_0x123156){const _0x4bec4d=_0x39b1a5;var _0x1148d0,_0x2b14ad;let _0x5654bd=T(_0x3f66c2),_0x199bdc=(_0x1148d0=_0x5654bd[_0x4bec4d(0x215)])==null?void 0x0:_0x1148d0[_0x4bec4d(0x182)](_0x496f1e=>_0x496f1e[_0x4bec4d(0x133)]===_0xbf90ce&&g(_0x496f1e));if(!_0x199bdc)return null;let _0x116953=(0x0,t[_0x4bec4d(0x1a9)])(_0x199bdc);return ce(_0x5654bd,_0x116953[_0x4bec4d(0x22a)],_0x116953['endOffset'],_0x123156),_0x5654bd[_0x4bec4d(0x215)]=(_0x2b14ad=_0x5654bd[_0x4bec4d(0x215)])==null?void 0x0:_0x2b14ad[_0x4bec4d(0x1fc)](_0x25252d=>_0x25252d[_0x4bec4d(0x133)]!==_0xbf90ce),_0x116953['startOffset']+_0x123156[_0x4bec4d(0x153)];}function ue(_0x31be45,_0x14d99f,_0x2e5724){const _0x12aa56=_0x39b1a5;_0x2e5724&&(_0x31be45[_0x12aa56(0x258)]=''+_0x31be45[_0x12aa56(0x258)][_0x12aa56(0x165)](0x0,_0x14d99f)+_0x2e5724+_0x31be45['dataStream'][_0x12aa56(0x165)](_0x14d99f),fe(_0x31be45,_0x14d99f,_0x2e5724['length']));}function de(_0xa12889,_0x2ec603,_0x476527){const _0x235486=_0x39b1a5;let _0x2560b4=_0x476527-_0x2ec603;_0xa12889[_0x235486(0x258)]=''+_0xa12889[_0x235486(0x258)][_0x235486(0x165)](0x0,_0x2ec603)+_0xa12889['dataStream'][_0x235486(0x165)](_0x476527),pe(_0xa12889,_0x2ec603,_0x2560b4);}function fe(_0x2a8cbb,_0x50b1a7,_0x4dfaee){const _0x53bd42=_0x39b1a5;_0x2a8cbb['paragraphs']=b(_0x2a8cbb['paragraphs'],_0x50b1a7,_0x4dfaee),_0x2a8cbb[_0x53bd42(0x19a)]=b(_0x2a8cbb[_0x53bd42(0x19a)],_0x50b1a7,_0x4dfaee),_0x2a8cbb['customBlocks']=b(_0x2a8cbb[_0x53bd42(0x255)],_0x50b1a7,_0x4dfaee),_0x2a8cbb[_0x53bd42(0x13d)]=me(_0x2a8cbb['textRuns'],_0x50b1a7,_0x4dfaee),_0x2a8cbb[_0x53bd42(0x125)]=he(_0x2a8cbb[_0x53bd42(0x125)],_0x50b1a7,_0x4dfaee),_0x2a8cbb['columnGroups']=S(_0x2a8cbb[_0x53bd42(0x1b5)],_0x50b1a7,_0x4dfaee),_0x2a8cbb[_0x53bd42(0x215)]=S(_0x2a8cbb[_0x53bd42(0x215)],_0x50b1a7,_0x4dfaee),_0x2a8cbb[_0x53bd42(0x226)]=S(_0x2a8cbb[_0x53bd42(0x226)],_0x50b1a7,_0x4dfaee),_0x2a8cbb[_0x53bd42(0x256)]=S(_0x2a8cbb[_0x53bd42(0x256)],_0x50b1a7,_0x4dfaee);}function pe(_0x52313a,_0x2ce06c,_0x492aa9){const _0xb30d2f=_0x39b1a5;var _0x14b2bd,_0x298096;_0x52313a[_0xb30d2f(0x126)]=x(_0x52313a[_0xb30d2f(0x126)],_0x2ce06c,_0x492aa9),_0x52313a[_0xb30d2f(0x19a)]=x(_0x52313a['sectionBreaks'],_0x2ce06c,_0x492aa9),_0x52313a[_0xb30d2f(0x255)]=x(_0x52313a[_0xb30d2f(0x255)],_0x2ce06c,_0x492aa9),_0x52313a['textRuns']=(_0x14b2bd=w((_0x298096=_0x52313a[_0xb30d2f(0x13d)])==null?void 0x0:_0x298096[_0xb30d2f(0x233)](_0x5ca00c=>({..._0x5ca00c,'startIndex':_0x5ca00c['st'],'endIndex':_0x5ca00c['ed']})),_0x2ce06c,_0x492aa9))==null?void 0x0:_0x14b2bd[_0xb30d2f(0x233)](_0x48d0e2=>{let {startIndex:_0x1111a3,endIndex:_0x47f7f0,..._0x1b8821}=_0x48d0e2;return{..._0x1b8821,'st':_0x1111a3,'ed':_0x47f7f0};}),_0x52313a['tables']=w(_0x52313a['tables'],_0x2ce06c,_0x492aa9),_0x52313a[_0xb30d2f(0x1b5)]=C(_0x52313a['columnGroups'],_0x2ce06c,_0x492aa9),_0x52313a[_0xb30d2f(0x215)]=C(_0x52313a[_0xb30d2f(0x215)],_0x2ce06c,_0x492aa9),_0x52313a[_0xb30d2f(0x226)]=C(_0x52313a['customDecorations'],_0x2ce06c,_0x492aa9),_0x52313a[_0xb30d2f(0x256)]=C(_0x52313a[_0xb30d2f(0x256)],_0x2ce06c,_0x492aa9);}function b(_0x4ec664,_0x43d365,_0x500b56){const _0x415432=_0x39b1a5;return _0x4ec664==null?void 0x0:_0x4ec664['map'](_0x4f8dba=>_0x4f8dba[_0x415432(0x146)]>=_0x43d365?{..._0x4f8dba,'startIndex':_0x4f8dba[_0x415432(0x146)]+_0x500b56}:_0x4f8dba);}function x(_0x237d74,_0x2234b9,_0x40705a){const _0x364acb=_0x39b1a5;let _0x3c76d6=_0x2234b9+_0x40705a;return _0x237d74==null?void 0x0:_0x237d74[_0x364acb(0x233)](_0x1a1cff=>_0x1a1cff['startIndex']>=_0x2234b9&&_0x1a1cff[_0x364acb(0x146)]<_0x3c76d6?null:_0x1a1cff[_0x364acb(0x146)]>=_0x3c76d6?{..._0x1a1cff,'startIndex':_0x1a1cff[_0x364acb(0x146)]-_0x40705a}:_0x1a1cff)[_0x364acb(0x1fc)](_0x307cbb=>_0x307cbb!=null);}function me(_0x50808b,_0x5d463e,_0x1769f9){const _0x56141d=_0x39b1a5;return _0x50808b==null?void 0x0:_0x50808b[_0x56141d(0x233)](_0x13149b=>_0x13149b['st']>=_0x5d463e?{..._0x13149b,'st':_0x13149b['st']+_0x1769f9,'ed':_0x13149b['ed']+_0x1769f9}:_0x13149b['ed']>_0x5d463e?{..._0x13149b,'ed':_0x13149b['ed']+_0x1769f9}:_0x13149b);}function S(_0x383f36,_0xf56bd7,_0x30d151){const _0x1f6455=_0x39b1a5;return _0x383f36==null?void 0x0:_0x383f36[_0x1f6455(0x233)](_0x3fa848=>(0x0,t[_0x1f6455(0x219)])(_0x3fa848,_0xf56bd7,_0x30d151));}function he(_0xa197a1,_0x431764,_0x279d43){const _0x33c19a=_0x39b1a5;return _0xa197a1==null?void 0x0:_0xa197a1[_0x33c19a(0x233)](_0x4ba327=>(0x0,t[_0x33c19a(0x162)])(_0x4ba327,_0x431764,_0x279d43));}function C(_0x35e71e,_0x5568ed,_0x4078f7){const _0x410f8e=_0x39b1a5;return _0x35e71e==null?void 0x0:_0x35e71e[_0x410f8e(0x233)](_0x8ffd33=>(0x0,t[_0x410f8e(0x186)])(_0x8ffd33,_0x5568ed,_0x4078f7))[_0x410f8e(0x1fc)](_0x127943=>_0x127943!=null);}function w(_0x804b77,_0xee810d,_0x5e5dc9){const _0x488c30=_0x39b1a5;return _0x804b77==null?void 0x0:_0x804b77[_0x488c30(0x233)](_0x4afa05=>(0x0,t[_0x488c30(0x11e)])(_0x4afa05,_0xee810d,_0x5e5dc9))[_0x488c30(0x1fc)](_0x1738cd=>_0x1738cd!=null);}function T(_0x2d58fd){const _0x471c94=_0x39b1a5;if(!_0x2d58fd[_0x471c94(0x203)])throw Error('Document\x20main\x20body\x20is\x20required\x20to\x20insert\x20Doc\x20Formula.');return _0x2d58fd['body'];}function E(_0x145e2e){'@babel/helpers - typeof';const _0x3a3575=_0x39b1a5;return E=typeof Symbol==_0x3a3575(0x24c)&&typeof Symbol[_0x3a3575(0x14b)]==_0x3a3575(0x199)?function(_0x37fd1b){return typeof _0x37fd1b;}:function(_0x44f166){const _0x2d740c=_0x3a3575;return _0x44f166&&typeof Symbol==_0x2d740c(0x24c)&&_0x44f166[_0x2d740c(0x248)]===Symbol&&_0x44f166!==Symbol['prototype']?_0x2d740c(0x199):typeof _0x44f166;},E(_0x145e2e);}function ge(_0xeb00eb,_0x1b3ba4){const _0x256d22=_0x39b1a5;if(E(_0xeb00eb)!=_0x256d22(0x1bc)||!_0xeb00eb)return _0xeb00eb;var _0x5b0c46=_0xeb00eb[Symbol[_0x256d22(0x173)]];if(_0x5b0c46!==void 0x0){var _0x41036d=_0x5b0c46[_0x256d22(0x137)](_0xeb00eb,_0x1b3ba4||'default');if(E(_0x41036d)!=_0x256d22(0x1bc))return _0x41036d;throw TypeError(_0x256d22(0x23d));}return(_0x1b3ba4==='string'?String:Number)(_0xeb00eb);}function _0x3dcb(){const _0x1178cb=['dispose','getCurrentUnitOfType','_pendingUnitIds','getResult','getFormulaValueSync','every','tables','paragraphs','formulaId','_formulaKeys','_registrations','IUniverInstanceService','pending','isDocFormulaRange','UniverDocsPlugin','undoMutation','merge','resources','schemaVersion','IConfigService','rangeId','IUndoRedoService','properties','TABLE_START','call','deepClone','nextResource','TABLE_CELL_END','resolveFormula','collectFormulaExternalReferenceQualifiers','textRuns','setConfig','Injector','boolean','isArray','sort','kind','docs-formula.mutation.set-resource','isInteger','startIndex','getFormula','SECTION_BREAK','startsWith','3421260JJSijr','iterator','getTextRanges','buildUpsertHostExternalReferenceMutations','getPresentation','string','disposeWithMe','_deleteRegistration','getRevision','length','UniverDocsFormulaPlugin','syncUnit','_updateFormulaResult','documentRedo','COLUMN_GROUP_START','UniverProFormulaEnginePlugin','collectMutations','docs-formula.command.remove','nextDocumentData','includes','name','set','registerPluginResource','getBody','shiftExclusiveRangeOnInsert','CellValueType','identity','slice','_isDisposed','docs-formula.command.convert-to-text','docs-formula.command.update','docs-formula.mutation.set-last-values','disabled','source','model','externalMutations','BLOCK_START','_resources','docs-formula.command.insert','unregister','PENDING','toPrimitive','next','Disposable','COLUMN_GROUP_END','DocFormulaModel','clear','start','rangeType','endsWith','79dFhoPX','range','_syncUnit','values','LexerTreeBuilder','SetDocFormulaMutation','find','docs-formula.command.replace-with-text','getSnapshot','HostExternalReferenceModel','shiftInclusiveRangeOnDelete','1.1.0','setFormulas','UniverInstanceType','endIndex','DocFormulaService','stale','InsertDocFormulaCommand','config','segmentId','getUnitId','DependentOn','ReplaceDocFormulaWithTextCommand','_resourceManagerService','docs-formula.mutation.set-formula','docs-formula.mutation.remove-formula','SetDocFormulaResourceMutation','TABLE_ROW_START','degradeBody','symbol','sectionBreaks','Inject','asObservable','resolveBinding','error','add','resolveHostFormulaExternalReferences','delete','IResourceManagerService','BLOCK_END','paragraphId','Doc\x20Formula\x20range\x20cannot\x20cross\x20document\x20structure\x20boundaries','5706uYGCTy','_docFormulaModel','deleteFormula','getCustomRangeInterval','getLoadError','COLUMN_END','numberFormat','1210842XzNQEs','resourceUndo','status','number','cursorOffset','stringify','Subject','formulaResult$','columnGroups','unregisterUnit','push','trigger','UNIVER_DOC','referenceRevision','syncExecuteCommand','object','assertSafeDocFormulaInsertRange','ICommandService','formula','MUTATION','subscribe','presentationChanged$','from','max','DocFormulaDisplayTextService','registerProvider','RemoveDocFormulaMutation','getUnit','toFormulaLastValue','trim','resourceRedo','serialize','_loadErrors','wholeEntity','resolveFormulaResultPresentation','success','text','pushUndoRedo','_cacheEligibilityService','univer-docs-formula','Tools','lastValue','1741304agjHBR','FormulaResultStatus','627lYDxlT','resource','getOwnPropertyDescriptor','expectedFormula','getInstance','endOffset','getBodySliceForTextXAction','DocTextResolverService','has','registerCommand','removeFormula','_service','resolved','formulas','154395IpLyWt','register','resolveText','COMMAND','CustomRangeType','_config','end','touchDependencies','unitDisposed$','previousDocumentData','load','replaceDocRanges','unitId','invalid-resource','toStringTag','documentData','FormulaCacheEligibilityService','change$','assign','CommandType','Module','filter','EMPTY','_rawResources','_commandService','parse','empty','_queueSync','body','isDocFormulaResource','removeUnit','TABLE_ROW_END','keys','RegisterOtherFormulaService','params','expectedNumberFormat','liveResult','SUCCESS','setResource','getFormulas','pluginName','expectedReferenceRevision','isDocFormulaConfig','findDocFormulaRange','forEach','data','customRanges','fromEntries','pattern','updates','shiftInclusiveRangeOnInsert','_hostExternalReferenceModel','type','editOp','_configService','accessor','_syncScheduled','min','RichTextEditingMutation','cell','createEmptyDocFormulaResource','externalReferences','getResource','customDecorations','JSONX','_preserveInvalid','_registrationService','startOffset','getParagraphContentStartOffset','_model','PARAGRAPH','_presentationChanged$','selection','ERROR','_change$','RemoveDocFormulaCommand','map','get','defineProperty','_instanceService','Plugin','document','DOC','UniverLicensePlugin','601454WNvtlY','_univerInstanceService','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','presentation','packageName','DocSelectionManagerService','DataStreamTreeTokenType','_setPresentation','DOC_FORMULA_PLUGIN','previousResource','decorate','entries','color','constructor','_formulaService','DOC_FORMULA_SCHEMA_VERSION','getRegisteredFormulas','function','insertLength','notifyTextChanged','redoMutation','CUSTOM_BLOCK','DocFormulaResourceController','deleteLength','setFormula','_injector','customBlocks','blockRanges','SetDocFormulaNumberFormatCommand','dataStream','OtherFormulaBizType','1732eYoRHB','buildRemoveDocFormulaActions','assess','generateRandomId','shiftExclusiveRangeOnDelete'];_0x3dcb=function(){return _0x1178cb;};return _0x3dcb();}function _0x4a80(_0x2244c0,_0x4be193){_0x2244c0=_0x2244c0-0x11e;const _0x3dcb1d=_0x3dcb();let _0x4a80af=_0x3dcb1d[_0x2244c0];return _0x4a80af;}function _e(_0x3c0c2c){const _0x5c61c1=_0x39b1a5;var _0x7d69ca=ge(_0x3c0c2c,_0x5c61c1(0x14f));return E(_0x7d69ca)=='symbol'?_0x7d69ca:_0x7d69ca+'';}function D(_0x3ae946,_0xdf6899,_0x536636){const _0x2d8633=_0x39b1a5;return(_0xdf6899=_e(_0xdf6899))in _0x3ae946?Object[_0x2d8633(0x235)](_0x3ae946,_0xdf6899,{'value':_0x536636,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x3ae946[_0xdf6899]=_0x536636,_0x3ae946;}var O=class extends t[_0x39b1a5(0x175)]{constructor(..._0x5d7db5){const _0x38c203=_0x39b1a5;super(..._0x5d7db5),D(this,_0x38c203(0x16f),new Map()),D(this,'_rawResources',new Map()),D(this,'_loadErrors',new Map()),D(this,'_change$',new i[(_0x38c203(0x1b3))]()),D(this,'change$',this[_0x38c203(0x231)][_0x38c203(0x19c)]());}['getFormula'](_0x16628d,_0x5150ec){const _0x2d5708=_0x39b1a5;var _0x554344;let _0x502338=(_0x554344=this[_0x2d5708(0x16f)][_0x2d5708(0x234)](_0x16628d))==null?void 0x0:_0x554344['formulas'][_0x5150ec];return _0x502338?t[_0x2d5708(0x1d5)]['deepClone'](_0x502338):void 0x0;}[_0x39b1a5(0x20e)](_0x4d6a5c){const _0x53d2ab=_0x39b1a5;var _0x44c4e1;return t[_0x53d2ab(0x1d5)][_0x53d2ab(0x138)](((_0x44c4e1=this[_0x53d2ab(0x16f)]['get'](_0x4d6a5c))==null?void 0x0:_0x44c4e1[_0x53d2ab(0x1e6)])??{});}[_0x39b1a5(0x225)](_0x165913){const _0x466fe3=_0x39b1a5;let _0x1a4fad=this[_0x466fe3(0x16f)]['get'](_0x165913);return _0x1a4fad?t[_0x466fe3(0x1d5)][_0x466fe3(0x138)](_0x1a4fad):void 0x0;}[_0x39b1a5(0x253)](_0x172a18,_0x46cb25,_0x3454c1){const _0x5ada22=_0x39b1a5;return this[_0x5ada22(0x188)](_0x172a18,{[_0x46cb25]:_0x3454c1});}['setResource'](_0x10416e,_0x1dd22c){const _0x5d454e=_0x39b1a5;return this[_0x5d454e(0x1cd)][_0x5d454e(0x1e1)](_0x10416e)||!l(_0x1dd22c)?!0x1:(this['_resources'][_0x5d454e(0x15f)](_0x10416e,t[_0x5d454e(0x1d5)][_0x5d454e(0x138)](_0x1dd22c)),this[_0x5d454e(0x231)][_0x5d454e(0x174)]({'unitId':_0x10416e}),!0x0);}['setFormulas'](_0x3fbfc8,_0x324b72){const _0x3c3973=_0x39b1a5;if(this['_loadErrors']['has'](_0x3fbfc8)||!Object['keys'](_0x324b72)['length']||!l({'schemaVersion':0x1,'formulas':_0x324b72}))return!0x1;let _0x22774b=this[_0x3c3973(0x16f)][_0x3c3973(0x234)](_0x3fbfc8)??c(),_0x360ada=t[_0x3c3973(0x1d5)][_0x3c3973(0x138)](_0x22774b);return Object[_0x3c3973(0x1f9)](_0x360ada[_0x3c3973(0x1e6)],t['Tools'][_0x3c3973(0x138)](_0x324b72)),this[_0x3c3973(0x16f)]['set'](_0x3fbfc8,_0x360ada),this[_0x3c3973(0x231)][_0x3c3973(0x174)]({'unitId':_0x3fbfc8,'rangeIds':Object[_0x3c3973(0x207)](_0x324b72)}),!0x0;}[_0x39b1a5(0x1e3)](_0x952f10,_0x599b2d){const _0x50253e=_0x39b1a5;if(this['_loadErrors'][_0x50253e(0x1e1)](_0x952f10))return!0x1;let _0x267184=this[_0x50253e(0x16f)][_0x50253e(0x234)](_0x952f10);if(!(_0x267184!=null&&_0x267184[_0x50253e(0x1e6)][_0x599b2d]))return!0x1;let _0x156fbe=t[_0x50253e(0x1d5)]['deepClone'](_0x267184);return delete _0x156fbe[_0x50253e(0x1e6)][_0x599b2d],this[_0x50253e(0x16f)][_0x50253e(0x15f)](_0x952f10,_0x156fbe),this[_0x50253e(0x231)]['next']({'unitId':_0x952f10,'rangeIds':[_0x599b2d]}),!0x0;}[_0x39b1a5(0x1f1)](_0x4e48de,_0x3210d1){const _0x11a998=_0x39b1a5;return _0x3210d1&&typeof _0x3210d1=='object'&&_0x11a998(0x131)in _0x3210d1&&_0x3210d1[_0x11a998(0x131)]!==0x1?(this[_0x11a998(0x228)](_0x4e48de,_0x3210d1,'unsupported-version'),!0x1):l(_0x3210d1)?(this[_0x11a998(0x16f)][_0x11a998(0x15f)](_0x4e48de,t[_0x11a998(0x1d5)]['deepClone'](_0x3210d1)),this[_0x11a998(0x1fe)][_0x11a998(0x1a1)](_0x4e48de),this['_loadErrors'][_0x11a998(0x1a1)](_0x4e48de),this[_0x11a998(0x231)][_0x11a998(0x174)]({'unitId':_0x4e48de}),!0x0):(this[_0x11a998(0x228)](_0x4e48de,_0x3210d1,_0x11a998(0x1f4)),!0x1);}['serialize'](_0x13b572){const _0x4e2f0c=_0x39b1a5;let _0x306018=this[_0x4e2f0c(0x16f)][_0x4e2f0c(0x234)](_0x13b572);return _0x306018?t['Tools']['deepClone'](_0x306018):this['_rawResources'][_0x4e2f0c(0x1e1)](_0x13b572)?t[_0x4e2f0c(0x1d5)][_0x4e2f0c(0x138)](this['_rawResources'][_0x4e2f0c(0x234)](_0x13b572)):c();}[_0x39b1a5(0x1aa)](_0x7cc31e){const _0x2fabb4=_0x39b1a5;return this[_0x2fabb4(0x1cd)][_0x2fabb4(0x234)](_0x7cc31e);}[_0x39b1a5(0x205)](_0x449dc4){const _0x25031b=_0x39b1a5;this[_0x25031b(0x16f)][_0x25031b(0x1a1)](_0x449dc4),this[_0x25031b(0x1fe)][_0x25031b(0x1a1)](_0x449dc4),this[_0x25031b(0x1cd)][_0x25031b(0x1a1)](_0x449dc4),this[_0x25031b(0x231)]['next']({'unitId':_0x449dc4});}['dispose'](){const _0x249e5f=_0x39b1a5;this[_0x249e5f(0x16f)]['clear'](),this[_0x249e5f(0x1fe)][_0x249e5f(0x178)](),this[_0x249e5f(0x1cd)][_0x249e5f(0x178)](),this[_0x249e5f(0x231)]['complete'](),super[_0x249e5f(0x11f)]();}[_0x39b1a5(0x228)](_0x29e50a,_0x5ad071,_0x1b5699){const _0x427693=_0x39b1a5;this[_0x427693(0x16f)]['delete'](_0x29e50a),this[_0x427693(0x1fe)]['set'](_0x29e50a,t[_0x427693(0x1d5)][_0x427693(0x138)](_0x5ad071)),this[_0x427693(0x1cd)][_0x427693(0x15f)](_0x29e50a,_0x1b5699),this[_0x427693(0x231)][_0x427693(0x174)]({'unitId':_0x29e50a});}};let ve=function(_0x572ca6){const _0x1036ff=_0x39b1a5;return _0x572ca6[_0x1036ff(0x1fd)]=_0x1036ff(0x201),_0x572ca6[_0x1036ff(0x172)]=_0x1036ff(0x12b),_0x572ca6[_0x1036ff(0x20c)]=_0x1036ff(0x1d0),_0x572ca6[_0x1036ff(0x230)]=_0x1036ff(0x19e),_0x572ca6;}({});function k(_0x334e7b,_0x2bffeb){return function(_0x14b45c,_0x52e81e){_0x2bffeb(_0x14b45c,_0x52e81e,_0x334e7b);};}function A(_0x2ef16f,_0x24f9c6,_0x2637f4,_0x52a8ba){const _0x1beb17=_0x39b1a5;var _0x3effd3=arguments[_0x1beb17(0x153)],_0x147567=_0x3effd3<0x3?_0x24f9c6:_0x52a8ba===null?_0x52a8ba=Object[_0x1beb17(0x1db)](_0x24f9c6,_0x2637f4):_0x52a8ba,_0x9a76de;if(typeof Reflect=='object'&&typeof Reflect[_0x1beb17(0x245)]==_0x1beb17(0x24c))_0x147567=Reflect['decorate'](_0x2ef16f,_0x24f9c6,_0x2637f4,_0x52a8ba);else{for(var _0x81141=_0x2ef16f[_0x1beb17(0x153)]-0x1;_0x81141>=0x0;_0x81141--)(_0x9a76de=_0x2ef16f[_0x81141])&&(_0x147567=(_0x3effd3<0x3?_0x9a76de(_0x147567):_0x3effd3>0x3?_0x9a76de(_0x24f9c6,_0x2637f4,_0x147567):_0x9a76de(_0x24f9c6,_0x2637f4))||_0x147567);}return _0x3effd3>0x3&&_0x147567&&Object['defineProperty'](_0x24f9c6,_0x2637f4,_0x147567),_0x147567;}let j=class extends t['Disposable']{constructor(_0x1fb4ee,_0x1b9ab1,_0x2f5ce7){const _0x8e0fca=_0x39b1a5;super(),this[_0x8e0fca(0x22c)]=_0x1fb4ee,this['_registrationService']=_0x1b9ab1,this[_0x8e0fca(0x21a)]=_0x2f5ce7,D(this,'_registrations',new Map()),D(this,'_formulaKeys',new Map()),D(this,'_presentationChanged$',new i[(_0x8e0fca(0x1b3))]()),D(this,_0x8e0fca(0x1c2),this[_0x8e0fca(0x22e)][_0x8e0fca(0x19c)]()),this[_0x8e0fca(0x150)](this['_registrationService'][_0x8e0fca(0x1b4)]['subscribe'](_0x354c71=>{const _0x557610=_0x8e0fca;for(let _0x462606 of Object[_0x557610(0x17f)](_0x354c71))for(let _0x3e001f of Object[_0x557610(0x17f)](_0x462606))_0x3e001f[_0x557610(0x213)](_0x3d2cec=>this[_0x557610(0x156)](_0x3d2cec));}));}[_0x39b1a5(0x155)](_0x3c90c8){const _0x3c271e=_0x39b1a5;var _0x1c79d6;let _0x24a9e0=_0x3c90c8[_0x3c271e(0x190)](),_0x5bf65d=((_0x1c79d6=_0x3c90c8[_0x3c271e(0x184)]()[_0x3c271e(0x203)])==null||(_0x1c79d6=_0x1c79d6[_0x3c271e(0x215)])==null?void 0x0:_0x1c79d6['filter'](g))??[],_0x207474=this[_0x3c271e(0x22c)]['getFormulas'](_0x24a9e0),_0x2f8965=new Set();for(let _0x2d0d32 of _0x5bf65d){let _0x2866a0=_0x207474[_0x2d0d32[_0x3c271e(0x133)]];_0x2866a0&&(_0x2f8965['add'](M(_0x24a9e0,_0x2d0d32[_0x3c271e(0x133)])),this[_0x3c271e(0x1e8)]({'unitId':_0x24a9e0,'rangeId':_0x2d0d32[_0x3c271e(0x133)]},_0x2866a0));}for(let _0x244e88 of Array[_0x3c271e(0x1c3)](this[_0x3c271e(0x129)][_0x3c271e(0x17f)]()))_0x244e88[_0x3c271e(0x1f3)]===_0x24a9e0&&!_0x2f8965['has'](M(_0x244e88[_0x3c271e(0x1f3)],_0x244e88[_0x3c271e(0x133)]))&&this[_0x3c271e(0x171)](_0x244e88);}['register'](_0x48e0e8,_0x13c953){const _0x58f9d8=_0x39b1a5;let _0x285f38=M(_0x48e0e8[_0x58f9d8(0x1f3)],_0x48e0e8[_0x58f9d8(0x133)]),_0x6077a5=this[_0x58f9d8(0x129)][_0x58f9d8(0x234)](_0x285f38),_0x4c2d13=this['_hostExternalReferenceModel'][_0x58f9d8(0x152)](_0x48e0e8['unitId']);if(_0x6077a5&&_0x6077a5[_0x58f9d8(0x18e)]['formula']===_0x13c953[_0x58f9d8(0x1bf)]&&_0x6077a5['referenceRevision']===_0x4c2d13){_0x6077a5[_0x58f9d8(0x18e)]=_0x13c953;let _0xdcf2d4=_0x6077a5[_0x58f9d8(0x127)]?this['_registrationService'][_0x58f9d8(0x123)](_0x6077a5[_0x58f9d8(0x1f3)],_0x6077a5['unitId'],_0x6077a5['formulaId'])??void 0x0:void 0x0;_0x6077a5[_0x58f9d8(0x20b)]=_0xdcf2d4,this['_setPresentation'](_0x285f38,N(_0x13c953,_0xdcf2d4));return;}_0x6077a5!=null&&_0x6077a5[_0x58f9d8(0x127)]&&this['_deleteRegistration'](_0x6077a5);let _0x864c9={..._0x48e0e8,'config':_0x13c953,'referenceRevision':_0x4c2d13,'presentation':N(_0x13c953,void 0x0)};if(this[_0x58f9d8(0x129)]['set'](_0x285f38,_0x864c9),!_0x13c953['formula'][_0x58f9d8(0x1ca)]())return;let _0x42bf00=this[_0x58f9d8(0x229)]['registerFormulaWithRange'](_0x48e0e8['unitId'],_0x48e0e8[_0x58f9d8(0x1f3)],_0x13c953[_0x58f9d8(0x1bf)],void 0x0,{'rangeId':_0x48e0e8[_0x58f9d8(0x133)]},r[_0x58f9d8(0x259)][_0x58f9d8(0x239)],_0x48e0e8[_0x58f9d8(0x133)]);_0x864c9[_0x58f9d8(0x127)]=_0x42bf00,this[_0x58f9d8(0x128)][_0x58f9d8(0x15f)](_0x42bf00,_0x285f38);}[_0x39b1a5(0x171)](_0x11ec47){const _0x169072=_0x39b1a5;let _0x4a3a03=M(_0x11ec47[_0x169072(0x1f3)],_0x11ec47[_0x169072(0x133)]),_0x2c9bb8=this['_registrations'][_0x169072(0x234)](_0x4a3a03);_0x2c9bb8&&(this['_deleteRegistration'](_0x2c9bb8),this[_0x169072(0x129)][_0x169072(0x1a1)](_0x4a3a03));}['unregisterUnit'](_0x39690e){const _0x42dbdc=_0x39b1a5;for(let _0x354d38 of Array[_0x42dbdc(0x1c3)](this[_0x42dbdc(0x129)][_0x42dbdc(0x17f)]()))_0x354d38[_0x42dbdc(0x1f3)]===_0x39690e&&this[_0x42dbdc(0x171)](_0x354d38);}[_0x39b1a5(0x14e)](_0x5b70c0){const _0x129b7b=_0x39b1a5;var _0x5ae2a2;return(_0x5ae2a2=this[_0x129b7b(0x129)]['get'](M(_0x5b70c0[_0x129b7b(0x1f3)],_0x5b70c0[_0x129b7b(0x133)])))==null?void 0x0:_0x5ae2a2[_0x129b7b(0x23e)];}[_0x39b1a5(0x122)](_0x36f078){const _0x445069=_0x39b1a5;let _0x53a1ee=this[_0x445069(0x129)][_0x445069(0x234)](M(_0x36f078[_0x445069(0x1f3)],_0x36f078['rangeId']));return _0x53a1ee?P(_0x53a1ee):void 0x0;}[_0x39b1a5(0x24b)](){const _0x2d8edc=_0x39b1a5;return Array[_0x2d8edc(0x1c3)](this[_0x2d8edc(0x129)][_0x2d8edc(0x17f)](),_0x3e8b17=>({'identity':{'unitId':_0x3e8b17[_0x2d8edc(0x1f3)],'rangeId':_0x3e8b17[_0x2d8edc(0x133)]},'config':_0x3e8b17[_0x2d8edc(0x18e)],'referenceRevision':_0x3e8b17[_0x2d8edc(0x1ba)],..._0x3e8b17[_0x2d8edc(0x20b)]?{'liveResult':_0x3e8b17[_0x2d8edc(0x20b)]}:null}));}[_0x39b1a5(0x11f)](){const _0x4b5ee2=_0x39b1a5;for(let _0x56ff49 of this[_0x4b5ee2(0x129)]['values']())this[_0x4b5ee2(0x151)](_0x56ff49);this[_0x4b5ee2(0x129)][_0x4b5ee2(0x178)](),this[_0x4b5ee2(0x128)][_0x4b5ee2(0x178)](),this[_0x4b5ee2(0x22e)]['complete'](),super[_0x4b5ee2(0x11f)]();}[_0x39b1a5(0x156)](_0x12e48d){const _0x183eaa=_0x39b1a5;let _0x7ae243=this[_0x183eaa(0x128)][_0x183eaa(0x234)](_0x12e48d[_0x183eaa(0x127)]),_0x4862f8=_0x7ae243?this[_0x183eaa(0x129)]['get'](_0x7ae243):void 0x0;_0x7ae243&&_0x4862f8&&(_0x4862f8[_0x183eaa(0x20b)]=_0x12e48d,this['_setPresentation'](_0x7ae243,N(_0x4862f8['config'],_0x12e48d)));}[_0x39b1a5(0x242)](_0x14d271,_0x1dad04){const _0x215618=_0x39b1a5;var _0x3f4cf5,_0x4a2638;let _0x2284f2=this['_registrations'][_0x215618(0x234)](_0x14d271);if(!_0x2284f2||ye(_0x2284f2[_0x215618(0x23e)],_0x1dad04))return;let _0x2983d8=_0x2284f2['presentation'],_0x5247b6=P(_0x2284f2);_0x2284f2['presentation']=_0x1dad04,this[_0x215618(0x22e)][_0x215618(0x174)]({'unitId':_0x2284f2[_0x215618(0x1f3)],'rangeId':_0x2284f2['rangeId'],'presentation':_0x1dad04,'previousPresentation':_0x2983d8,'result':P(_0x2284f2),'previousResult':{..._0x5247b6,..._0x2983d8,'value':(_0x3f4cf5=_0x2983d8[_0x215618(0x222)])==null?void 0x0:_0x3f4cf5['v'],'valueType':((_0x4a2638=_0x2983d8[_0x215618(0x222)])==null?void 0x0:_0x4a2638['t'])??void 0x0}});}[_0x39b1a5(0x151)](_0x26eadc){const _0x3d887e=_0x39b1a5;_0x26eadc[_0x3d887e(0x127)]&&(this[_0x3d887e(0x229)][_0x3d887e(0x1a8)](_0x26eadc[_0x3d887e(0x1f3)],_0x26eadc[_0x3d887e(0x1f3)],[_0x26eadc[_0x3d887e(0x127)]]),this[_0x3d887e(0x128)][_0x3d887e(0x1a1)](_0x26eadc[_0x3d887e(0x127)]));}};j=A([k(0x0,(0x0,t[_0x39b1a5(0x19b)])(O)),k(0x1,(0x0,t[_0x39b1a5(0x19b)])(r[_0x39b1a5(0x208)])),k(0x2,(0x0,t[_0x39b1a5(0x19b)])(e[_0x39b1a5(0x185)]))],j);function M(_0x2e5a4e,_0x3fb04b){return _0x2e5a4e+'\x00'+_0x3fb04b;}function N(_0x4e124d,_0x569ba9){const _0x17c438=_0x39b1a5;return(0x0,e[_0x17c438(0x1cf)])({'numberFormat':_0x4e124d['numberFormat'],'lastValue':_0x4e124d[_0x17c438(0x1d6)],'result':_0x569ba9});}function P(_0x507fde){const _0x16f006=_0x39b1a5;var _0x3b15ce,_0x3fba29,_0x5af455;let _0x4a041d=_0x507fde[_0x16f006(0x23e)],_0x2b017a=_0x507fde[_0x16f006(0x18e)]['formula'][_0x16f006(0x1ca)]()?_0x4a041d['stale']||_0x4a041d[_0x16f006(0x222)]==null?'pending':((_0x3b15ce=_0x507fde[_0x16f006(0x20b)])==null?void 0x0:_0x3b15ce[_0x16f006(0x1af)])===r[_0x16f006(0x1d8)][_0x16f006(0x230)]?'error':'success':_0x16f006(0x201);return{..._0x4a041d,'status':_0x2b017a,'value':(_0x3fba29=_0x4a041d[_0x16f006(0x222)])==null?void 0x0:_0x3fba29['v'],'valueType':((_0x5af455=_0x4a041d[_0x16f006(0x222)])==null?void 0x0:_0x5af455['t'])??void 0x0};}function ye(_0x4e685a,_0x10c6ca){const _0x2a3c86=_0x39b1a5;var _0x2dd6ec,_0x415240,_0x1b0ed9,_0x1df0af;return _0x4e685a[_0x2a3c86(0x1d1)]===_0x10c6ca[_0x2a3c86(0x1d1)]&&_0x4e685a[_0x2a3c86(0x247)]===_0x10c6ca[_0x2a3c86(0x247)]&&_0x4e685a[_0x2a3c86(0x217)]===_0x10c6ca['pattern']&&_0x4e685a[_0x2a3c86(0x16b)]===_0x10c6ca[_0x2a3c86(0x16b)]&&_0x4e685a[_0x2a3c86(0x18c)]===_0x10c6ca['stale']&&((_0x2dd6ec=_0x4e685a['cell'])==null?void 0x0:_0x2dd6ec['t'])===((_0x415240=_0x10c6ca[_0x2a3c86(0x222)])==null?void 0x0:_0x415240['t'])&&Object['is']((_0x1b0ed9=_0x4e685a[_0x2a3c86(0x222)])==null?void 0x0:_0x1b0ed9['v'],(_0x1df0af=_0x10c6ca[_0x2a3c86(0x222)])==null?void 0x0:_0x1df0af['v']);}const F={'id':_0x39b1a5(0x194),'type':t[_0x39b1a5(0x1fa)]['MUTATION'],'handler':(_0x28ede9,_0x2651d0)=>!(_0x2651d0!=null&&_0x2651d0[_0x39b1a5(0x1f3)])||!_0x2651d0[_0x39b1a5(0x133)]||!_0x2651d0[_0x39b1a5(0x18e)]?!0x1:_0x28ede9[_0x39b1a5(0x234)](O)[_0x39b1a5(0x253)](_0x2651d0[_0x39b1a5(0x1f3)],_0x2651d0[_0x39b1a5(0x133)],_0x2651d0[_0x39b1a5(0x18e)])},I={'id':_0x39b1a5(0x195),'type':t[_0x39b1a5(0x1fa)][_0x39b1a5(0x1c0)],'handler':(_0x2c7de3,_0x50f8fe)=>!(_0x50f8fe!=null&&_0x50f8fe[_0x39b1a5(0x1f3)])||!_0x50f8fe[_0x39b1a5(0x133)]?!0x1:_0x2c7de3[_0x39b1a5(0x234)](O)[_0x39b1a5(0x1e3)](_0x50f8fe[_0x39b1a5(0x1f3)],_0x50f8fe['rangeId'])},L={'id':_0x39b1a5(0x144),'type':t[_0x39b1a5(0x1fa)][_0x39b1a5(0x1c0)],'handler':(_0x5187fa,_0x474c9f)=>!(_0x474c9f!=null&&_0x474c9f[_0x39b1a5(0x1f3)])||!_0x474c9f[_0x39b1a5(0x1da)]?!0x1:_0x5187fa['get'](O)['setResource'](_0x474c9f[_0x39b1a5(0x1f3)],_0x474c9f[_0x39b1a5(0x1da)])},R={'id':_0x39b1a5(0x169),'type':t['CommandType'][_0x39b1a5(0x1c0)],'handler':(_0x68c3b1,_0x3dce84)=>{const _0x324c57=_0x39b1a5;if(!(_0x3dce84!=null&&_0x3dce84[_0x324c57(0x1f3)])||!_0x3dce84['updates']['length'])return!0x1;let _0x59069f=_0x68c3b1[_0x324c57(0x234)](O),_0x10960d=_0x68c3b1[_0x324c57(0x234)](e[_0x324c57(0x185)]),_0x3a4378=_0x59069f['getResource'](_0x3dce84[_0x324c57(0x1f3)]);if(!_0x3a4378)return!0x1;let _0x559445=t[_0x324c57(0x1d5)]['deepClone'](_0x3a4378),_0x1058e5=!0x1;for(let _0x34921d of _0x3dce84[_0x324c57(0x218)]){var _0x228086,_0x1174ca,_0x4f80fa,_0xe5b631;let _0x11e17b=_0x559445[_0x324c57(0x1e6)][_0x34921d[_0x324c57(0x133)]];_0x11e17b&&_0x11e17b['formula']===_0x34921d[_0x324c57(0x1dc)]&&((_0x228086=_0x11e17b[_0x324c57(0x1ac)])==null?void 0x0:_0x228086[_0x324c57(0x217)])===_0x34921d[_0x324c57(0x20a)]&&_0x10960d['getRevision'](_0x3dce84['unitId'])===_0x34921d[_0x324c57(0x210)]&&(((_0x1174ca=_0x11e17b[_0x324c57(0x1d6)])==null?void 0x0:_0x1174ca['v'])!==_0x34921d['lastValue']['v']||((_0x4f80fa=_0x11e17b[_0x324c57(0x1d6)])==null?void 0x0:_0x4f80fa['t'])!==_0x34921d[_0x324c57(0x1d6)]['t']||((_0xe5b631=_0x11e17b[_0x324c57(0x1d6)])==null?void 0x0:_0xe5b631[_0x324c57(0x217)])!==_0x34921d[_0x324c57(0x1d6)]['pattern'])&&(_0x11e17b[_0x324c57(0x1d6)]=t[_0x324c57(0x1d5)][_0x324c57(0x138)](_0x34921d[_0x324c57(0x1d6)]),_0x1058e5=!0x0);}return!_0x1058e5||_0x59069f[_0x324c57(0x20d)](_0x3dce84['unitId'],_0x559445);}},z={'id':_0x39b1a5(0x170),'type':t[_0x39b1a5(0x1fa)][_0x39b1a5(0x1ea)],'handler':(_0x2c3537,_0x208371)=>{const _0x49727b=_0x39b1a5;if(!(_0x208371!=null&&_0x208371[_0x49727b(0x1bf)][_0x49727b(0x1ca)]()))return!0x1;let _0x9a13ce=K(_0x2c3537,_0x208371[_0x49727b(0x1f3)],'');if(!_0x9a13ce)return!0x1;let _0x470442=xe(_0x208371['target'],_0x9a13ce['body'],be(_0x2c3537,_0x9a13ce['unitId']));if(!_0x470442)return!0x1;let _0x23e935=Se(_0x2c3537,_0x9a13ce[_0x49727b(0x1f3)],_0x208371[_0x49727b(0x1bf)],_0x208371[_0x49727b(0x224)]??[]);if(!_0x23e935)return!0x1;let _0x1ee915=Ce(_0x9a13ce[_0x49727b(0x203)],_0x9a13ce['model'],_0x9a13ce[_0x49727b(0x1f3)]),_0x298d44=we({'documentData':_0x9a13ce[_0x49727b(0x1f6)],'resource':_0x9a13ce['resource'],'rangeId':_0x1ee915,'config':{'formula':_0x208371[_0x49727b(0x1bf)],..._0x208371['numberFormat']?{'numberFormat':_0x208371[_0x49727b(0x1ac)]}:null},'startOffset':_0x470442[_0x49727b(0x22a)],'endOffset':_0x470442['endOffset']});if(!_0x298d44)return!0x1;let _0x388f03=(0x0,e[_0x49727b(0x14d)])(_0x2c3537,_0x9a13ce[_0x49727b(0x1f3)],_0x23e935);return!_0x388f03||!q({'accessor':_0x2c3537,'document':_0x9a13ce[_0x49727b(0x238)],'unitId':_0x9a13ce[_0x49727b(0x1f3)],'trigger':z['id'],'rangeId':_0x1ee915,'previousResource':_0x9a13ce[_0x49727b(0x1da)],'nextResource':_0x298d44[_0x49727b(0x139)],'previousDocumentData':_0x9a13ce[_0x49727b(0x1f6)],'nextDocumentData':_0x298d44[_0x49727b(0x15c)],'cursorOffset':_0x298d44[_0x49727b(0x1b1)],'externalMutations':_0x388f03})?!0x1:{'rangeId':_0x1ee915,'startOffset':_0x298d44[_0x49727b(0x1b1)]-0x1,'endOffset':_0x298d44[_0x49727b(0x1b1)]};}},B={'id':_0x39b1a5(0x168),'type':t[_0x39b1a5(0x1fa)][_0x39b1a5(0x1ea)],'handler':(_0x54d6bc,_0x450469)=>{const _0x959db2=_0x39b1a5;if(!(_0x450469!=null&&_0x450469[_0x959db2(0x133)])||!_0x450469[_0x959db2(0x1bf)]['trim']())return!0x1;let _0x5d140a=K(_0x54d6bc,_0x450469[_0x959db2(0x1f3)],''),_0x35622a=_0x5d140a==null?void 0x0:_0x5d140a['model'][_0x959db2(0x147)](_0x5d140a[_0x959db2(0x1f3)],_0x450469[_0x959db2(0x133)]),_0x140eaa=_0x5d140a?_(_0x5d140a['documentData']['body'],_0x450469[_0x959db2(0x133)]):void 0x0;if(!_0x5d140a||!_0x35622a||!_0x140eaa)return!0x1;let _0x113178=Se(_0x54d6bc,_0x5d140a[_0x959db2(0x1f3)],_0x450469['formula'],_0x450469[_0x959db2(0x224)]??[]);if(!_0x113178)return!0x1;let _0xe265e4=(0x0,e[_0x959db2(0x14d)])(_0x54d6bc,_0x5d140a['unitId'],_0x113178);if(!_0xe265e4)return!0x1;let _0x44ff4b=je(_0x5d140a[_0x959db2(0x1da)]);return _0x44ff4b[_0x959db2(0x1e6)][_0x450469[_0x959db2(0x133)]]={'formula':_0x450469[_0x959db2(0x1bf)],..._0x450469[_0x959db2(0x1ac)]?{'numberFormat':_0x450469[_0x959db2(0x1ac)]}:_0x35622a[_0x959db2(0x1ac)]?{'numberFormat':_0x35622a[_0x959db2(0x1ac)]}:null},q({'accessor':_0x54d6bc,'document':_0x5d140a[_0x959db2(0x238)],'unitId':_0x5d140a[_0x959db2(0x1f3)],'trigger':B['id'],'rangeId':_0x450469[_0x959db2(0x133)],'previousResource':_0x5d140a[_0x959db2(0x1da)],'nextResource':_0x44ff4b,'cursorOffset':_0x140eaa['endIndex']+0x1,'externalMutations':_0xe265e4});}},V={'id':'docs-formula.command.set-number-format','type':t['CommandType']['COMMAND'],'handler':(_0x582007,_0x548465)=>{const _0x257939=_0x39b1a5;if(!(_0x548465!=null&&_0x548465['rangeId']))return!0x1;let _0x1b1fb2=K(_0x582007,_0x548465[_0x257939(0x1f3)],''),_0x376104=_0x1b1fb2==null?void 0x0:_0x1b1fb2[_0x257939(0x16c)]['getFormula'](_0x1b1fb2[_0x257939(0x1f3)],_0x548465['rangeId']),_0x16e4b7=_0x1b1fb2?_(_0x1b1fb2['documentData'][_0x257939(0x203)],_0x548465['rangeId']):void 0x0;if(!_0x1b1fb2||!_0x376104||!_0x16e4b7)return!0x1;let _0x14993b=je(_0x1b1fb2[_0x257939(0x1da)]);return _0x14993b[_0x257939(0x1e6)][_0x548465[_0x257939(0x133)]]={..._0x376104,..._0x548465[_0x257939(0x1ac)]?{'numberFormat':_0x548465[_0x257939(0x1ac)]}:null},_0x548465[_0x257939(0x1ac)]||delete _0x14993b[_0x257939(0x1e6)][_0x548465[_0x257939(0x133)]][_0x257939(0x1ac)],q({'accessor':_0x582007,'document':_0x1b1fb2[_0x257939(0x238)],'unitId':_0x1b1fb2[_0x257939(0x1f3)],'trigger':V['id'],'rangeId':_0x548465['rangeId'],'previousResource':_0x1b1fb2['resource'],'nextResource':_0x14993b,'cursorOffset':_0x16e4b7[_0x257939(0x18a)]+0x1,'externalMutations':{}});}},H={'id':_0x39b1a5(0x15b),'type':t[_0x39b1a5(0x1fa)]['COMMAND'],'handler':(_0x142adb,_0x48ff2b)=>G(_0x142adb,_0x48ff2b,'',H['id'])},U={'id':_0x39b1a5(0x183),'type':t[_0x39b1a5(0x1fa)][_0x39b1a5(0x1ea)],'handler':(_0x5dd247,_0xb75cb4)=>G(_0x5dd247,_0xb75cb4,(_0xb75cb4==null?void 0x0:_0xb75cb4[_0x39b1a5(0x1d1)])??'',U['id'])},W={'id':_0x39b1a5(0x167),'type':t[_0x39b1a5(0x1fa)]['COMMAND'],'handler':(_0x6dee8,_0x13242d)=>{const _0x20763c=_0x39b1a5;if(!(_0x13242d!=null&&_0x13242d[_0x20763c(0x133)]))return!0x1;let _0xf10140=K(_0x6dee8,_0x13242d[_0x20763c(0x1f3)],'');if(!_0xf10140)return!0x1;let _0x57ea66=_0x6dee8[_0x20763c(0x234)](j)[_0x20763c(0x122)]({'unitId':_0xf10140[_0x20763c(0x1f3)],'rangeId':_0x13242d['rangeId']});return _0x57ea66?G(_0x6dee8,_0x13242d,_0x57ea66[_0x20763c(0x1d1)],W['id']):!0x1;}};function G(_0x56baa7,_0x569990,_0x2446a9,_0x1095e1){const _0x5ea599=_0x39b1a5;if(!(_0x569990!=null&&_0x569990[_0x5ea599(0x133)]))return!0x1;let _0x47179d=K(_0x56baa7,_0x569990[_0x5ea599(0x1f3)],'');if(!_0x47179d)return!0x1;let _0x3c3191=h({'documentData':_0x47179d[_0x5ea599(0x1f6)],'resource':_0x47179d[_0x5ea599(0x1da)],'rangeId':_0x569990[_0x5ea599(0x133)],'text':_0x2446a9});return _0x3c3191?q({'accessor':_0x56baa7,'document':_0x47179d[_0x5ea599(0x238)],'unitId':_0x47179d[_0x5ea599(0x1f3)],'trigger':_0x1095e1,'rangeId':_0x569990['rangeId'],'previousResource':_0x47179d[_0x5ea599(0x1da)],'nextResource':_0x3c3191['nextResource'],'previousDocumentData':_0x47179d[_0x5ea599(0x1f6)],'nextDocumentData':_0x3c3191[_0x5ea599(0x15c)],'cursorOffset':_0x3c3191['cursorOffset'],'externalMutations':{}}):!0x1;}function K(_0x51a701,_0x5e496c,_0x2fcb25){const _0x4bbd9c=_0x39b1a5;if(_0x2fcb25)return null;let _0x57a498=_0x51a701[_0x4bbd9c(0x234)](t[_0x4bbd9c(0x12a)]),_0x1dd26a=(_0x5e496c?_0x57a498[_0x4bbd9c(0x1c8)](_0x5e496c,t[_0x4bbd9c(0x189)][_0x4bbd9c(0x1b9)]):_0x57a498[_0x4bbd9c(0x120)](t[_0x4bbd9c(0x189)]['UNIVER_DOC']))??null;if(!_0x1dd26a)return null;let _0x3b3ae8=_0x1dd26a[_0x4bbd9c(0x184)](),_0x32e0b1=_0x3b3ae8['body'];if(_0x3b3ae8[_0x4bbd9c(0x16a)]||!_0x32e0b1)return null;let _0x5412fe=_0x51a701[_0x4bbd9c(0x234)](O);return _0x5412fe[_0x4bbd9c(0x1aa)](_0x1dd26a[_0x4bbd9c(0x190)]())?null:{'document':_0x1dd26a,'body':_0x32e0b1,'documentData':_0x3b3ae8,'model':_0x5412fe,'resource':_0x5412fe['getResource'](_0x1dd26a['getUnitId']())??c(),'unitId':_0x1dd26a['getUnitId']()};}function be(_0x25069b,_0x254eb9){const _0x334408=_0x39b1a5;var _0x14b8c3;return(_0x14b8c3=_0x25069b[_0x334408(0x234)](n[_0x334408(0x240)])[_0x334408(0x14c)]({'subUnitId':_0x254eb9,'unitId':_0x254eb9}))==null?void 0x0:_0x14b8c3[0x0];}function xe(_0x193569,_0x2d537d,_0x270fac){const _0x376100=_0x39b1a5;if((_0x193569==null?void 0x0:_0x193569[_0x376100(0x21b)])==='paragraph'){var _0x74f45c;let _0x3d7d27=((_0x74f45c=_0x2d537d[_0x376100(0x126)])==null?void 0x0:_0x74f45c[_0x376100(0x1fc)](_0x579636=>_0x579636[_0x376100(0x1a4)]===_0x193569['paragraphId']))??[];if(_0x3d7d27[_0x376100(0x153)]!==0x1)return null;let _0x2b15e6=_0x3d7d27[0x0],_0x3c5158=(0x0,t[_0x376100(0x22b)])(_0x2d537d,_0x2b15e6),_0x24b67b=_0x2b15e6[_0x376100(0x146)]-_0x3c5158,_0x406cb1=_0x193569['position']===_0x376100(0x1ed)?_0x24b67b:_0x193569['position'];if(!Number['isInteger'](_0x406cb1)||_0x406cb1<0x0||_0x406cb1>_0x24b67b)return null;let _0xc98fac=_0x3c5158+_0x406cb1;return{'startOffset':_0xc98fac,'endOffset':_0xc98fac};}if((_0x193569==null?void 0x0:_0x193569[_0x376100(0x21b)])===_0x376100(0x17d))return!Number[_0x376100(0x145)](_0x193569[_0x376100(0x22a)])||!Number[_0x376100(0x145)](_0x193569[_0x376100(0x1de)])?null:{'startOffset':Math['min'](_0x193569[_0x376100(0x22a)],_0x193569[_0x376100(0x1de)]),'endOffset':Math[_0x376100(0x1c4)](_0x193569['startOffset'],_0x193569['endOffset'])};let _0x5c352d=(_0x193569==null?void 0x0:_0x193569['type'])===_0x376100(0x22f)?_0x193569[_0x376100(0x22f)]:_0x270fac;return!_0x5c352d||_0x5c352d['segmentId']?null:{'startOffset':Math['min'](_0x5c352d[_0x376100(0x22a)],_0x5c352d[_0x376100(0x1de)]),'endOffset':Math[_0x376100(0x1c4)](_0x5c352d[_0x376100(0x22a)],_0x5c352d[_0x376100(0x1de)])};}function Se(_0x495bf0,_0x12e57a,_0xdbfea6,_0x5d211a){const _0x274cd5=_0x39b1a5;let _0x44e8b7=_0x495bf0[_0x274cd5(0x234)](r[_0x274cd5(0x180)]),_0x5a022e=_0xdbfea6[_0x274cd5(0x149)]('=')?_0xdbfea6[_0x274cd5(0x165)](0x1):_0xdbfea6,_0x18b92e=_0x44e8b7['sequenceNodesBuilder'](_0x5a022e);if(!_0x18b92e)return null;let _0x15f766=_0x495bf0[_0x274cd5(0x234)](e[_0x274cd5(0x185)]),_0x33aac1=(0x0,e[_0x274cd5(0x1a0)])({'qualifiers':(0x0,e[_0x274cd5(0x13c)])(_0x18b92e),'explicitReferences':_0x5d211a??[],'resolveBinding':_0x2f7aad=>_0x15f766[_0x274cd5(0x19d)](_0x12e57a,_0x2f7aad)});return _0x33aac1[_0x274cd5(0x1af)]===_0x274cd5(0x1e5)?_0x33aac1['references']:null;}function Ce(_0x8cb33a,_0x5f22ef,_0x12d63f){const _0x34234f=_0x39b1a5;var _0x44706c;let _0xdae239=(0x0,t[_0x34234f(0x25d)])(0x6);for(;_0x8cb33a!=null&&(_0x44706c=_0x8cb33a[_0x34234f(0x215)])!=null&&_0x44706c['some'](_0x580d3c=>_0x580d3c[_0x34234f(0x133)]===_0xdae239)||_0x5f22ef[_0x34234f(0x147)](_0x12d63f,_0xdae239);)_0xdae239=(0x0,t['generateRandomId'])(0x6);return _0xdae239;}function we(_0x3b1c1d){try{return te(_0x3b1c1d);}catch(_0x4fc12e){if(_0x4fc12e instanceof m)return null;throw _0x4fc12e;}}function Te(_0x335110){const _0x5d2205=_0x39b1a5;let _0x1223b5=_0x335110[_0x5d2205(0x1f0)]&&_0x335110[_0x5d2205(0x15c)]?De(_0x335110[_0x5d2205(0x238)],_0x335110['unitId'],_0x335110[_0x5d2205(0x1f0)],_0x335110[_0x5d2205(0x15c)],_0x335110[_0x5d2205(0x1b1)],_0x335110[_0x5d2205(0x1b8)]):null;return _0x335110['previousDocumentData']&&_0x335110[_0x5d2205(0x15c)]&&!_0x1223b5?null:{'documentRedo':_0x1223b5,'resourceRedo':{'id':L['id'],'params':{'unitId':_0x335110[_0x5d2205(0x1f3)],'resource':_0x335110['nextResource']}},'resourceUndo':{'id':L['id'],'params':{'unitId':_0x335110[_0x5d2205(0x1f3)],'resource':_0x335110[_0x5d2205(0x244)]}}};}function Ee(_0x212482,_0x1fa0d5,_0x342bf7,_0x4a9d2c){const _0x1a58f6=_0x39b1a5;_0x4a9d2c[_0x1a58f6(0x1d2)]({'id':_0x212482[_0x1a58f6(0x1b8)]+':'+_0x212482[_0x1a58f6(0x133)],'unitID':_0x212482[_0x1a58f6(0x1f3)],'redoMutations':[..._0x212482[_0x1a58f6(0x16d)]['redoMutation']?[_0x212482['externalMutations'][_0x1a58f6(0x24f)]]:[],..._0x1fa0d5[_0x1a58f6(0x157)]?[_0x1fa0d5[_0x1a58f6(0x157)]]:[],_0x1fa0d5['resourceRedo']],'undoMutations':[_0x1fa0d5['resourceUndo'],..._0x342bf7?[_0x342bf7]:[],..._0x212482[_0x1a58f6(0x16d)][_0x1a58f6(0x12e)]?[_0x212482[_0x1a58f6(0x16d)][_0x1a58f6(0x12e)]]:[]]});}function q(_0x18712d){const _0x8c617b=_0x39b1a5;let _0x50c08c=_0x18712d[_0x8c617b(0x21e)][_0x8c617b(0x234)](t[_0x8c617b(0x1be)]),_0x2ea106=_0x18712d['accessor']['get'](t[_0x8c617b(0x134)]),_0x1945ed=_0x18712d['accessor'][_0x8c617b(0x234)](n[_0x8c617b(0x240)]),_0x15cbbd=Te(_0x18712d);if(!_0x15cbbd)return!0x1;let _0x4f3494=!0x1,_0x1c765e=null,_0x5ff831=!0x1;try{if(_0x18712d[_0x8c617b(0x16d)][_0x8c617b(0x24f)]){if(!_0x50c08c['syncExecuteCommand'](_0x18712d[_0x8c617b(0x16d)][_0x8c617b(0x24f)]['id'],_0x18712d[_0x8c617b(0x16d)][_0x8c617b(0x24f)]['params']))return!0x1;_0x4f3494=!0x0;}if(_0x15cbbd[_0x8c617b(0x157)]){let _0x248af7=_0x50c08c[_0x8c617b(0x1bb)](_0x15cbbd['documentRedo']['id'],_0x15cbbd[_0x8c617b(0x157)][_0x8c617b(0x209)]);if(!_0x248af7)return J(_0x50c08c,_0x18712d[_0x8c617b(0x16d)],_0x4f3494),!0x1;_0x1c765e={'id':n[_0x8c617b(0x221)]['id'],'params':{..._0x248af7,'noHistory':!0x0,'noNeedSetTextRange':!0x0,'segmentId':''}};}if(!_0x50c08c[_0x8c617b(0x1bb)](_0x15cbbd[_0x8c617b(0x1cb)]['id'],_0x15cbbd['resourceRedo']['params']))return Oe(_0x50c08c,_0x1c765e),J(_0x50c08c,_0x18712d[_0x8c617b(0x16d)],_0x4f3494),!0x1;_0x5ff831=!0x0,Ee(_0x18712d,_0x15cbbd,_0x1c765e,_0x2ea106);}catch(_0x5f49a9){throw _0x5ff831&&_0x50c08c[_0x8c617b(0x1bb)](_0x15cbbd[_0x8c617b(0x1ae)]['id'],_0x15cbbd[_0x8c617b(0x1ae)][_0x8c617b(0x209)]),Oe(_0x50c08c,_0x1c765e),J(_0x50c08c,_0x18712d[_0x8c617b(0x16d)],_0x4f3494),_0x5f49a9;}return _0x1945ed[_0x8c617b(0x1f2)]([{'startOffset':_0x18712d[_0x8c617b(0x1b1)],'endOffset':_0x18712d[_0x8c617b(0x1b1)],'segmentId':''}],{'unitId':_0x18712d[_0x8c617b(0x1f3)],'subUnitId':_0x18712d[_0x8c617b(0x1f3)]},!0x1,{[n['DOC_SELECTION_OPTION_PRESERVE_CARET']]:!0x0}),!0x0;}function De(_0x1bd890,_0x8cbcac,_0x3f4679,_0x4b1374,_0x11ecfe,_0x4975ea){let _0xfd0958=ke(_0x3f4679,_0x4b1374,(0x0,t['getRichTextEditPath'])(_0x1bd890,''));return _0xfd0958?{'id':n['RichTextEditingMutation']['id'],'params':{'unitId':_0x8cbcac,'actions':_0xfd0958,'segmentId':'','textRanges':[{'startOffset':_0x11ecfe,'endOffset':_0x11ecfe,'collapsed':!0x0,'segmentId':''}],'isEditing':!0x1,'noHistory':!0x0,'noNeedSetTextRange':!0x0,'trigger':_0x4975ea}}:null;}function Oe(_0xe3ddec,_0x25b177){const _0x201622=_0x39b1a5;_0x25b177&&_0xe3ddec[_0x201622(0x1bb)](_0x25b177['id'],_0x25b177[_0x201622(0x209)]);}function J(_0x565f9d,_0x29db8e,_0x17efb8){const _0x24706f=_0x39b1a5;_0x17efb8&&_0x29db8e['undoMutation']&&_0x565f9d[_0x24706f(0x1bb)](_0x29db8e[_0x24706f(0x12e)]['id'],_0x29db8e[_0x24706f(0x12e)][_0x24706f(0x209)]);}function ke(_0x246035,_0x35677a,_0xcba71){const _0x10be97=_0x39b1a5;let _0x22c6ba=_0x246035['body'],_0x4fac67=_0x35677a['body'],_0x1870f9=Ae(_0x22c6ba==null?void 0x0:_0x22c6ba[_0x10be97(0x258)],_0x4fac67==null?void 0x0:_0x4fac67[_0x10be97(0x258)]);if(!_0x1870f9||!_0x4fac67)return null;let _0x3a81f0=new t['TextX']();return _0x3a81f0['retain'](_0x1870f9[_0x10be97(0x179)]),_0x1870f9[_0x10be97(0x24d)]>0x0&&_0x3a81f0['insert'](_0x1870f9[_0x10be97(0x24d)],(0x0,t[_0x10be97(0x1df)])(_0x4fac67,_0x1870f9[_0x10be97(0x179)],_0x1870f9[_0x10be97(0x179)]+_0x1870f9[_0x10be97(0x24d)],!0x1)),_0x1870f9[_0x10be97(0x252)]>0x0&&_0x3a81f0[_0x10be97(0x1a1)](_0x1870f9[_0x10be97(0x252)]),t[_0x10be97(0x227)][_0x10be97(0x1dd)]()[_0x10be97(0x21c)](_0x3a81f0['serialize'](),_0xcba71);}function Ae(_0x5b560a,_0x3971a3){const _0x15eee7=_0x39b1a5;if(_0x5b560a==null||_0x3971a3==null||_0x5b560a===_0x3971a3)return null;let _0x2f438a=0x0;for(;_0x2f438a<_0x5b560a['length']&&_0x2f438a<_0x3971a3['length']&&_0x5b560a[_0x2f438a]===_0x3971a3[_0x2f438a];)_0x2f438a+=0x1;let _0x441a0f=_0x5b560a[_0x15eee7(0x153)],_0x4902b7=_0x3971a3[_0x15eee7(0x153)];for(;_0x441a0f>_0x2f438a&&_0x4902b7>_0x2f438a&&_0x5b560a[_0x441a0f-0x1]===_0x3971a3[_0x4902b7-0x1];)--_0x441a0f,--_0x4902b7;return{'start':_0x2f438a,'deleteLength':_0x441a0f-_0x2f438a,'insertLength':_0x4902b7-_0x2f438a};}function je(_0x6df535){const _0x5712e1=_0x39b1a5;return{'schemaVersion':0x1,'formulas':Object[_0x5712e1(0x216)](Object[_0x5712e1(0x246)](_0x6df535[_0x5712e1(0x1e6)])[_0x5712e1(0x233)](([_0xeef742,_0x2d265d])=>[_0xeef742,{..._0x2d265d,..._0x2d265d[_0x5712e1(0x1ac)]?{'numberFormat':{..._0x2d265d[_0x5712e1(0x1ac)]}}:null,..._0x2d265d[_0x5712e1(0x1d6)]?{'lastValue':{..._0x2d265d[_0x5712e1(0x1d6)]}}:null}]))};}let Y=class extends t[_0x39b1a5(0x175)]{constructor(_0x17284d,_0x4c3a18,_0x448670,_0x4d7590){const _0x3502ed=_0x39b1a5;super(),this[_0x3502ed(0x236)]=_0x17284d,this[_0x3502ed(0x1ff)]=_0x4c3a18,this[_0x3502ed(0x22c)]=_0x448670,this[_0x3502ed(0x1e4)]=_0x4d7590,D(this,_0x3502ed(0x121),new Set()),D(this,_0x3502ed(0x21f),!0x1),D(this,_0x3502ed(0x166),!0x1),this['_instanceService']['getAllUnitsForType'](t[_0x3502ed(0x189)][_0x3502ed(0x1b9)])[_0x3502ed(0x213)](_0x1cf661=>this['_service'][_0x3502ed(0x155)](_0x1cf661)),this[_0x3502ed(0x150)](this['_model'][_0x3502ed(0x1f8)][_0x3502ed(0x1c1)](({unitId:_0x23bbca})=>this[_0x3502ed(0x17e)](_0x23bbca))),this['disposeWithMe'](this[_0x3502ed(0x236)]['unitAdded$']['subscribe'](({unit:_0x2df79f})=>{const _0x36b837=_0x3502ed;_0x2df79f[_0x36b837(0x21b)]===t['UniverInstanceType'][_0x36b837(0x1b9)]&&this[_0x36b837(0x202)](_0x2df79f['getUnitId']());})),this['disposeWithMe'](this[_0x3502ed(0x236)][_0x3502ed(0x1ef)]['subscribe'](_0x40129e=>{const _0x265fac=_0x3502ed;this[_0x265fac(0x1e4)][_0x265fac(0x1b6)](_0x40129e[_0x265fac(0x190)]());})),this[_0x3502ed(0x150)](this[_0x3502ed(0x1ff)]['onCommandExecuted'](_0x4cb6e1=>{const _0x4e3595=_0x3502ed;if(_0x4cb6e1['id']===n[_0x4e3595(0x221)]['id']&&Me(_0x4cb6e1['params'])){let _0x3b917e=_0x4cb6e1[_0x4e3595(0x209)];_0x3b917e['segmentId']||this[_0x4e3595(0x17e)](_0x3b917e[_0x4e3595(0x1f3)]);}}));}[_0x39b1a5(0x11f)](){const _0xf08cbf=_0x39b1a5;this['_isDisposed']=!0x0,super[_0xf08cbf(0x11f)]();}['_queueSync'](_0x43a4d1){const _0x2c7325=_0x39b1a5;this['_pendingUnitIds'][_0x2c7325(0x19f)](_0x43a4d1),!this[_0x2c7325(0x21f)]&&(this[_0x2c7325(0x21f)]=!0x0,queueMicrotask(()=>{const _0x14ff4a=_0x2c7325;if(this[_0x14ff4a(0x21f)]=!0x1,this[_0x14ff4a(0x166)])return;let _0x43e6a2=Array[_0x14ff4a(0x1c3)](this[_0x14ff4a(0x121)]);this['_pendingUnitIds'][_0x14ff4a(0x178)](),_0x43e6a2[_0x14ff4a(0x213)](_0x157e08=>this[_0x14ff4a(0x17e)](_0x157e08));}));}[_0x39b1a5(0x17e)](_0x46b293){const _0x3857d5=_0x39b1a5;let _0x4a6717=this[_0x3857d5(0x236)][_0x3857d5(0x1c8)](_0x46b293,t['UniverInstanceType'][_0x3857d5(0x1b9)]);_0x4a6717&&this[_0x3857d5(0x1e4)][_0x3857d5(0x155)](_0x4a6717);}};Y=A([k(0x0,t['IUniverInstanceService']),k(0x1,t[_0x39b1a5(0x1be)]),k(0x2,(0x0,t['Inject'])(O)),k(0x3,(0x0,t[_0x39b1a5(0x19b)])(j))],Y);function Me(_0x519a25){const _0x5129ec=_0x39b1a5;return typeof _0x519a25==_0x5129ec(0x1bc)&&!!_0x519a25&&_0x5129ec(0x1f3)in _0x519a25&&typeof _0x519a25[_0x5129ec(0x1f3)]==_0x5129ec(0x14f)&&(!(_0x5129ec(0x18f)in _0x519a25)||_0x519a25[_0x5129ec(0x18f)]===void 0x0||typeof _0x519a25[_0x5129ec(0x18f)]==_0x5129ec(0x14f));}let X=class extends t[_0x39b1a5(0x175)]{constructor(_0x52e338,_0x11df80){const _0x8df1d1=_0x39b1a5;super(),this['_resourceManagerService']=_0x52e338,this[_0x8df1d1(0x1a7)]=_0x11df80,this[_0x8df1d1(0x150)](this[_0x8df1d1(0x193)][_0x8df1d1(0x160)]({'pluginName':o,'businesses':[t[_0x8df1d1(0x189)]['UNIVER_DOC']],'toJson':_0x47d30a=>JSON[_0x8df1d1(0x1b2)](this[_0x8df1d1(0x1a7)][_0x8df1d1(0x1cc)](_0x47d30a)),'parseJson':_0x434488=>JSON[_0x8df1d1(0x200)](_0x434488),'onLoad':(_0x204813,_0x549cb5)=>{this['_docFormulaModel']['load'](_0x204813,_0x549cb5);},'onUnLoad':_0x3e3c21=>this[_0x8df1d1(0x1a7)][_0x8df1d1(0x205)](_0x3e3c21)}));}};X=A([k(0x0,t[_0x39b1a5(0x1a2)]),k(0x1,(0x0,t['Inject'])(O))],X);var Ne='@univerjs-pro/docs-formula',Pe=_0x39b1a5(0x187);const Fe={};let Z=class extends t[_0x39b1a5(0x175)]{constructor(_0x579c63,_0x1b453a,_0x567453){const _0x186fce=_0x39b1a5;super(),this[_0x186fce(0x23c)]=_0x579c63,this[_0x186fce(0x249)]=_0x1b453a,this[_0x186fce(0x150)](_0x567453[_0x186fce(0x1e8)]({'resolve':(_0xd8f39e,_0x94ac2c)=>{const _0x2e9ad9=_0x186fce;var _0x436b77;return((_0x436b77=_0x94ac2c[_0x2e9ad9(0x215)])==null?void 0x0:_0x436b77['filter'](g)['map'](_0x11640f=>({'startOffset':_0x11640f['startIndex'],'endOffset':_0x11640f[_0x2e9ad9(0x18a)]+0x1,'text':this[_0x2e9ad9(0x13b)](_0xd8f39e,_0x11640f[_0x2e9ad9(0x133)])})))??[];}})),this['disposeWithMe'](this[_0x186fce(0x249)][_0x186fce(0x1c2)]['subscribe'](({unitId:_0x110bd3})=>{const _0x8dbf7=_0x186fce;_0x567453[_0x8dbf7(0x24e)](_0x110bd3);}));}[_0x39b1a5(0x13b)](_0x28ef08,_0x45145c){const _0x11c8e9=_0x39b1a5;var _0x29b62a;return((_0x29b62a=this[_0x11c8e9(0x249)][_0x11c8e9(0x122)]({'unitId':_0x28ef08,'rangeId':_0x45145c}))==null?void 0x0:_0x29b62a[_0x11c8e9(0x1d1)])??'';}[_0x39b1a5(0x1e9)](_0x3b5982,_0x9050f2,_0x5370e1){const _0x192cd3=_0x39b1a5;var _0x3993f8;let _0x5a259f=this[_0x192cd3(0x23c)]['getUnit'](_0x3b5982,t['UniverInstanceType'][_0x192cd3(0x1b9)]),_0x2015c2=_0x5a259f==null?void 0x0:_0x5a259f[_0x192cd3(0x161)]();if(!_0x2015c2)return'';let _0x34d790=_0x2015c2['dataStream'][_0x192cd3(0x165)](_0x9050f2,_0x5370e1),_0x5b514f=((_0x3993f8=_0x2015c2[_0x192cd3(0x215)])==null?void 0x0:_0x3993f8[_0x192cd3(0x1fc)](_0x593267=>g(_0x593267)&&_0x593267[_0x192cd3(0x146)]>=_0x9050f2&&_0x593267[_0x192cd3(0x18a)]<_0x5370e1)[_0x192cd3(0x142)]((_0x3269d2,_0x187f3e)=>_0x187f3e[_0x192cd3(0x146)]-_0x3269d2[_0x192cd3(0x146)]))??[];for(let _0x3cbba1 of _0x5b514f){let _0x4184c7=_0x3cbba1[_0x192cd3(0x146)]-_0x9050f2,_0x38567f=_0x3cbba1[_0x192cd3(0x18a)]-_0x9050f2+0x1;_0x34d790=''+_0x34d790[_0x192cd3(0x165)](0x0,_0x4184c7)+this[_0x192cd3(0x13b)](_0x3b5982,_0x3cbba1[_0x192cd3(0x133)])+_0x34d790['slice'](_0x38567f);}return _0x34d790;}['degradeDocumentData'](_0x9f215d){return Ie(_0x9f215d);}[_0x39b1a5(0x198)](_0x487700,_0x48d012,_0x3ba0cb={}){const _0x15b94b=_0x39b1a5;var _0x1990fc;return re({'id':_0x487700,'body':_0x48d012,'documentStyle':{}},(((_0x1990fc=_0x48d012['customRanges'])==null?void 0x0:_0x1990fc['filter'](g))??[])[_0x15b94b(0x233)](_0x45e6a0=>({'rangeId':_0x45e6a0[_0x15b94b(0x133)],'text':_0x3ba0cb[_0x45e6a0[_0x15b94b(0x133)]]??this[_0x15b94b(0x13b)](_0x487700,_0x45e6a0[_0x15b94b(0x133)])})))[_0x15b94b(0x203)]??{'dataStream':''};}};Z=A([k(0x0,t['IUniverInstanceService']),k(0x1,(0x0,t[_0x39b1a5(0x19b)])(j)),k(0x2,(0x0,t['Inject'])(n[_0x39b1a5(0x1e0)]))],Z);function Ie(_0x3854b8){const _0x13d32b=_0x39b1a5;var _0x1b43dc,_0x3bbb3e;let _0x1676fb=Le(_0x3854b8),_0xf0a0b6=re(_0x3854b8,(((_0x1b43dc=_0x3854b8['body'])==null||(_0x1b43dc=_0x1b43dc[_0x13d32b(0x215)])==null?void 0x0:_0x1b43dc['filter'](g))??[])['map'](_0x111c75=>({'rangeId':_0x111c75[_0x13d32b(0x133)],'text':Re(_0x1676fb==null?void 0x0:_0x1676fb[_0x13d32b(0x1e6)][_0x111c75[_0x13d32b(0x133)]])})));return _0xf0a0b6['resources']=(_0x3bbb3e=_0xf0a0b6[_0x13d32b(0x130)])==null?void 0x0:_0x3bbb3e[_0x13d32b(0x1fc)](_0x156210=>_0x156210[_0x13d32b(0x15e)]!==o),_0xf0a0b6;}function Le(_0x36eb64){const _0x347d8d=_0x39b1a5;var _0x4fc11e;let _0x12f5c2=(_0x4fc11e=_0x36eb64['resources'])==null||(_0x4fc11e=_0x4fc11e[_0x347d8d(0x182)](_0x1db1ac=>_0x1db1ac[_0x347d8d(0x15e)]===_0x347d8d(0x243)))==null?void 0x0:_0x4fc11e[_0x347d8d(0x214)];if(_0x12f5c2)try{let _0x1b3bb1=JSON[_0x347d8d(0x200)](_0x12f5c2);return l(_0x1b3bb1)?_0x1b3bb1:void 0x0;}catch{return;}}function Re(_0x613318){const _0x3c51b8=_0x39b1a5;return _0x613318?(0x0,e[_0x3c51b8(0x1cf)])({'lastValue':_0x613318[_0x3c51b8(0x1d6)],'numberFormat':_0x613318[_0x3c51b8(0x1ac)]})[_0x3c51b8(0x1d1)]:'';}let Q=class extends t[_0x39b1a5(0x175)]{constructor(_0x3c1307,_0x585eba,_0x58c202){const _0x1a7a7d=_0x39b1a5;super(),this[_0x1a7a7d(0x249)]=_0x3c1307,this['_cacheEligibilityService']=_0x585eba,this[_0x1a7a7d(0x150)](_0x58c202[_0x1a7a7d(0x1c6)](this));}[_0x39b1a5(0x15a)](_0x2d731f){const _0x5e6373=_0x39b1a5;let _0x457e68=new Map();for(let _0xf8c6aa of this[_0x5e6373(0x249)][_0x5e6373(0x24b)]()){var _0x5d113a;if(!this[_0x5e6373(0x1d3)][_0x5e6373(0x25c)](_0xf8c6aa[_0x5e6373(0x18e)][_0x5e6373(0x1bf)],_0xf8c6aa[_0x5e6373(0x20b)])['eligible'])continue;let _0x4e34f3=(0x0,e['getScalarFormulaResultCell'])(_0xf8c6aa['liveResult']),_0x52f6b6=_0x4e34f3?(0x0,e[_0x5e6373(0x1c9)])(_0x4e34f3):null;if(!_0x52f6b6||ze(_0xf8c6aa[_0x5e6373(0x18e)][_0x5e6373(0x1d6)],_0x52f6b6))continue;let _0x18d31d=_0x457e68['get'](_0xf8c6aa[_0x5e6373(0x164)]['unitId'])??[];_0x18d31d[_0x5e6373(0x1b7)]({'rangeId':_0xf8c6aa['identity'][_0x5e6373(0x133)],'expectedFormula':_0xf8c6aa[_0x5e6373(0x18e)][_0x5e6373(0x1bf)],'expectedNumberFormat':(_0x5d113a=_0xf8c6aa['config'][_0x5e6373(0x1ac)])==null?void 0x0:_0x5d113a[_0x5e6373(0x217)],'expectedReferenceRevision':_0xf8c6aa[_0x5e6373(0x1ba)],'lastValue':_0x52f6b6}),_0x457e68[_0x5e6373(0x15f)](_0xf8c6aa['identity'][_0x5e6373(0x1f3)],_0x18d31d);}return Array['from'](_0x457e68,([_0x457a2c,_0x482737])=>({'id':R['id'],'params':{'unitId':_0x457a2c,'updates':_0x482737}}));}};Q=A([k(0x0,(0x0,t[_0x39b1a5(0x19b)])(j)),k(0x1,(0x0,t['Inject'])(e[_0x39b1a5(0x1f7)])),k(0x2,(0x0,t[_0x39b1a5(0x19b)])(e['FormulaLastValuePersistenceService']))],Q);function ze(_0x1c0a5c,_0xb07a26){const _0x56531e=_0x39b1a5;return(_0x1c0a5c==null?void 0x0:_0x1c0a5c['v'])===_0xb07a26['v']&&(_0x1c0a5c==null?void 0x0:_0x1c0a5c['t'])===_0xb07a26['t']&&(_0x1c0a5c==null?void 0x0:_0x1c0a5c[_0x56531e(0x217)])===_0xb07a26[_0x56531e(0x217)];}let $=class extends t[_0x39b1a5(0x237)]{constructor(_0x10ae04=Fe,_0x4a268d,_0x525311,_0x2376df){const _0x2132ac=_0x39b1a5;super(),this[_0x2132ac(0x1ec)]=_0x10ae04,this[_0x2132ac(0x254)]=_0x4a268d,this[_0x2132ac(0x1ff)]=_0x525311,this[_0x2132ac(0x21d)]=_0x2376df;let {..._0x144979}=(0x0,t[_0x2132ac(0x12f)])({},Fe,this['_config']);this[_0x2132ac(0x21d)][_0x2132ac(0x13e)]('docs-formula.config',_0x144979);}['onStarting'](){const _0x5cd2e9=_0x39b1a5;this['_injector'][_0x5cd2e9(0x19f)]([O]),this['_injector'][_0x5cd2e9(0x19f)]([j]),this[_0x5cd2e9(0x254)][_0x5cd2e9(0x19f)]([X]),this[_0x5cd2e9(0x254)][_0x5cd2e9(0x19f)]([Y]),this['_injector'][_0x5cd2e9(0x19f)]([Q]),this['_injector'][_0x5cd2e9(0x19f)]([Z]),(0x0,t[_0x5cd2e9(0x1ee)])(this[_0x5cd2e9(0x254)],[[O],[X],[Y],[Q],[Z]]),[F,I,L,R,z,B,V,H,U,W]['forEach'](_0x36a765=>this[_0x5cd2e9(0x150)](this[_0x5cd2e9(0x1ff)][_0x5cd2e9(0x1e2)](_0x36a765)));}};D($,_0x39b1a5(0x20f),o),D($,_0x39b1a5(0x23f),Ne),D($,'version',Pe),D($,_0x39b1a5(0x21b),t[_0x39b1a5(0x189)][_0x39b1a5(0x1b9)]),$=A([(0x0,t[_0x39b1a5(0x191)])(a[_0x39b1a5(0x23a)],e[_0x39b1a5(0x159)],n[_0x39b1a5(0x12d)]),k(0x1,(0x0,t['Inject'])(t[_0x39b1a5(0x13f)])),k(0x2,t['ICommandService']),k(0x3,t[_0x39b1a5(0x132)])],$),exports['ConvertDocFormulaToTextCommand']=W,exports['DOC_FORMULA_CUSTOM_RANGE_KIND']=s,exports['DOC_FORMULA_OBJECT_REPLACEMENT']='',exports[_0x39b1a5(0x243)]=o,exports[_0x39b1a5(0x24a)]=0x1,Object[_0x39b1a5(0x235)](exports,_0x39b1a5(0x1c5),{'enumerable':!0x0,'get':function(){return Z;}}),Object[_0x39b1a5(0x235)](exports,'DocFormulaLifecycleController',{'enumerable':!0x0,'get':function(){return Y;}}),exports[_0x39b1a5(0x177)]=O,Object['defineProperty'](exports,_0x39b1a5(0x251),{'enumerable':!0x0,'get':function(){return X;}}),exports['DocFormulaResultStatus']=ve,Object[_0x39b1a5(0x235)](exports,_0x39b1a5(0x18b),{'enumerable':!0x0,'get':function(){return j;}}),exports[_0x39b1a5(0x18d)]=z,exports['InvalidDocFormulaInsertRangeError']=m,exports[_0x39b1a5(0x232)]=H,exports[_0x39b1a5(0x1c7)]=I,exports[_0x39b1a5(0x192)]=U,exports['SetDocFormulaLastValuesMutation']=R,exports[_0x39b1a5(0x181)]=F,exports[_0x39b1a5(0x257)]=V,exports[_0x39b1a5(0x196)]=L,Object['defineProperty'](exports,_0x39b1a5(0x154),{'enumerable':!0x0,'get':function(){return $;}}),exports['UpdateDocFormulaCommand']=B,exports[_0x39b1a5(0x1bd)]=ie,exports['buildInsertDocFormulaActions']=te,exports[_0x39b1a5(0x25b)]=h,exports['buildUpdateDocFormulaActions']=ne,exports[_0x39b1a5(0x223)]=c,exports['degradeDocFormulaDocumentData']=Ie,exports[_0x39b1a5(0x212)]=_,exports[_0x39b1a5(0x211)]=u,exports[_0x39b1a5(0x12c)]=g,exports[_0x39b1a5(0x204)]=l,exports['isFormulaLastValue']=d;
1
+ const _0x468d3c=_0x4dab;(function(_0x22065b,_0x22782c){const _0x174c87=_0x4dab,_0x28fc6e=_0x22065b();while(!![]){try{const _0x425c02=-parseInt(_0x174c87(0x16f))/0x1+-parseInt(_0x174c87(0x105))/0x2+-parseInt(_0x174c87(0x1db))/0x3*(-parseInt(_0x174c87(0x17c))/0x4)+parseInt(_0x174c87(0x1be))/0x5+-parseInt(_0x174c87(0x1cd))/0x6+-parseInt(_0x174c87(0x173))/0x7+parseInt(_0x174c87(0x162))/0x8;if(_0x425c02===_0x22782c)break;else _0x28fc6e['push'](_0x28fc6e['shift']());}catch(_0x5ea0ce){_0x28fc6e['push'](_0x28fc6e['shift']());}}}(_0x26ab,0x49859),Object['defineProperty'](exports,Symbol[_0x468d3c(0x188)],{'value':_0x468d3c(0x139)}));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=_0x468d3c(0x1ae),s=_0x468d3c(0xf5);function c(){return{'schemaVersion':0x1,'formulas':{}};}function l(_0x10d7a2){const _0x2f756d=_0x468d3c;return!_0x10d7a2||typeof _0x10d7a2!='object'||!f(_0x10d7a2,['schemaVersion','formulas'])||!(_0x2f756d(0xfa)in _0x10d7a2)||_0x10d7a2[_0x2f756d(0xfa)]!==0x1||!(_0x2f756d(0x164)in _0x10d7a2)||!_0x10d7a2[_0x2f756d(0x164)]||typeof _0x10d7a2[_0x2f756d(0x164)]!=_0x2f756d(0x120)||Array[_0x2f756d(0x11a)](_0x10d7a2[_0x2f756d(0x164)])?!0x1:Object[_0x2f756d(0x146)](_0x10d7a2[_0x2f756d(0x164)])['every'](([_0x1affc5,_0x1842a3])=>_0x1affc5[_0x2f756d(0x158)]>0x0&&u(_0x1842a3));}function u(_0xd50d1f){const _0x1be827=_0x468d3c;return!_0xd50d1f||typeof _0xd50d1f!=_0x1be827(0x120)||!f(_0xd50d1f,[_0x1be827(0x15e),_0x1be827(0x15b),_0x1be827(0x144)])||!(_0x1be827(0x15e)in _0xd50d1f)||typeof _0xd50d1f['formula']!=_0x1be827(0x1a8)||!_0xd50d1f[_0x1be827(0x15e)][_0x1be827(0x12b)]()||_0x1be827(0x15b)in _0xd50d1f&&_0xd50d1f['numberFormat']!=null&&(typeof _0xd50d1f['numberFormat']!=_0x1be827(0x120)||!f(_0xd50d1f[_0x1be827(0x15b)],['pattern'])||!(_0x1be827(0x13b)in _0xd50d1f[_0x1be827(0x15b)])||typeof _0xd50d1f[_0x1be827(0x15b)][_0x1be827(0x13b)]!='string')?!0x1:!('lastValue'in _0xd50d1f)||_0xd50d1f[_0x1be827(0x144)]==null||d(_0xd50d1f['lastValue']);}function d(_0x28e4f1){const _0x2dfb97=_0x468d3c;return!_0x28e4f1||typeof _0x28e4f1!=_0x2dfb97(0x120)||!f(_0x28e4f1,['v','t',_0x2dfb97(0x13b)])||!('v'in _0x28e4f1)||_0x28e4f1['v']!==null&&typeof _0x28e4f1['v']!=_0x2dfb97(0x1a8)&&typeof _0x28e4f1['v']!='number'&&typeof _0x28e4f1['v']!='boolean'||'t'in _0x28e4f1&&_0x28e4f1['t']!=null&&!ee(_0x28e4f1['t'])?!0x1:!('pattern'in _0x28e4f1)||_0x28e4f1[_0x2dfb97(0x13b)]==null||typeof _0x28e4f1['pattern']=='string';}function f(_0x3039d1,_0x431081){const _0x271891=_0x468d3c;let _0x5bfd7d=new Set(_0x431081);return Object[_0x271891(0xfc)](_0x3039d1)[_0x271891(0x159)](_0x48edbb=>_0x5bfd7d[_0x271891(0x1b8)](_0x48edbb));}function ee(_0x58ba08){const _0x26c12b=_0x468d3c;return typeof _0x58ba08==_0x26c12b(0x157)&&Object['values'](t['CellValueType'])['includes'](_0x58ba08);}const p=new Set([t[_0x468d3c(0x142)]['SECTION_BREAK'],t[_0x468d3c(0x142)]['TABLE_START'],t[_0x468d3c(0x142)]['TABLE_ROW_START'],t[_0x468d3c(0x142)]['TABLE_CELL_START'],t[_0x468d3c(0x142)][_0x468d3c(0x151)],t[_0x468d3c(0x142)][_0x468d3c(0x1c6)],t[_0x468d3c(0x142)]['TABLE_END'],t[_0x468d3c(0x142)][_0x468d3c(0x135)],t[_0x468d3c(0x142)][_0x468d3c(0x1e6)],t['DataStreamTreeTokenType'][_0x468d3c(0x16b)],t[_0x468d3c(0x142)][_0x468d3c(0x20b)],t['DataStreamTreeTokenType'][_0x468d3c(0x171)],t['DataStreamTreeTokenType'][_0x468d3c(0x207)],t[_0x468d3c(0x142)][_0x468d3c(0x216)]]);var m=class extends Error{constructor(){const _0x5301d7=_0x468d3c;super(_0x5301d7(0x1b2));}};function te(_0x461653){const _0xd526a7=_0x468d3c;var _0x5a6f62,_0x3031bb;let _0x87c690=t[_0xd526a7(0xeb)][_0xd526a7(0x149)](_0x461653[_0xd526a7(0x168)]),_0x39b354=T(_0x87c690),{startOffset:_0x17243e,endOffset:_0x1a5da3}=oe(_0x39b354,_0x461653['startOffset'],_0x461653['endOffset']);ie(_0x39b354,_0x17243e,_0x1a5da3);let _0x4ff303=((_0x5a6f62=_0x39b354[_0xd526a7(0x113)])==null?void 0x0:_0x5a6f62['filter'](_0x5f276a=>{const _0xf45ce4=_0xd526a7;if(!g(_0x5f276a))return!0x1;let _0x2a7c45=(0x0,t[_0xf45ce4(0x195)])(_0x5f276a);return _0x2a7c45[_0xf45ce4(0x186)]>_0x17243e&&_0x2a7c45[_0xf45ce4(0x1ba)]<_0x1a5da3;})['map'](_0x4d0f90=>_0x4d0f90[_0xd526a7(0x176)]))??[];ce(_0x39b354,_0x17243e,_0x1a5da3,''),_0x39b354[_0xd526a7(0x113)]=[...((_0x3031bb=_0x39b354[_0xd526a7(0x113)])==null?void 0x0:_0x3031bb[_0xd526a7(0x1ab)](_0x5872bf=>!_0x4ff303[_0xd526a7(0x182)](_0x5872bf[_0xd526a7(0x176)])&&_0x5872bf[_0xd526a7(0x176)]!==_0x461653[_0xd526a7(0x176)]))??[],ae(_0x461653[_0xd526a7(0x176)],_0x17243e)]['sort']((_0x1d2fa0,_0x68828e)=>_0x1d2fa0['startIndex']-_0x68828e['startIndex']);let _0x3c421c=v(_0x461653['resource']);return _0x4ff303[_0xd526a7(0x12d)](_0x2f8f1d=>{const _0x31857e=_0xd526a7;delete _0x3c421c[_0x31857e(0x164)][_0x2f8f1d];}),_0x3c421c['formulas'][_0x461653[_0xd526a7(0x176)]]=t[_0xd526a7(0xeb)]['deepClone'](_0x461653[_0xd526a7(0x198)]),{'nextDocumentData':_0x87c690,'nextResource':_0x3c421c,'cursorOffset':_0x17243e+0x1};}function ne(_0x41c5cc){const _0xc8e05a=_0x468d3c;var _0x36485f,_0x2c6f21;let _0x14b930=t[_0xc8e05a(0xeb)][_0xc8e05a(0x149)](_0x41c5cc[_0xc8e05a(0x168)]),_0x260c4d=(_0x36485f=T(_0x14b930)[_0xc8e05a(0x113)])==null?void 0x0:_0x36485f[_0xc8e05a(0x170)](_0x4297bb=>_0x4297bb['rangeId']===_0x41c5cc['rangeId']&&g(_0x4297bb));if(!_0x260c4d||!((_0x2c6f21=_0x41c5cc['resource'])!=null&&_0x2c6f21[_0xc8e05a(0x164)][_0x41c5cc[_0xc8e05a(0x176)]]))return null;let _0x498473=v(_0x41c5cc[_0xc8e05a(0x1c1)]);return _0x498473[_0xc8e05a(0x164)][_0x41c5cc[_0xc8e05a(0x176)]]=t[_0xc8e05a(0xeb)][_0xc8e05a(0x149)](_0x41c5cc['config']),{'nextDocumentData':_0x14b930,'nextResource':_0x498473,'cursorOffset':_0x260c4d[_0xc8e05a(0x179)]+0x1};}function h(_0x5ac61c){const _0x2ace8b=_0x468d3c;let _0x4d9a5c=t[_0x2ace8b(0xeb)][_0x2ace8b(0x149)](_0x5ac61c[_0x2ace8b(0x168)]),_0x1c528d=le(_0x4d9a5c,_0x5ac61c[_0x2ace8b(0x176)],_0x5ac61c[_0x2ace8b(0x11b)]??'');if(_0x1c528d==null)return null;let _0x4dc62f=v(_0x5ac61c[_0x2ace8b(0x1c1)]);return delete _0x4dc62f['formulas'][_0x5ac61c['rangeId']],{'nextDocumentData':_0x4d9a5c,'nextResource':_0x4dc62f,'cursorOffset':_0x1c528d};}function re(_0x5925f6,_0x5401a3){const _0x5d1b8f=_0x468d3c;var _0x2db0b4;let _0x2e518c=t[_0x5d1b8f(0xeb)][_0x5d1b8f(0x149)](_0x5925f6),_0x1e02b0=_0x2e518c['body'];if(!_0x1e02b0)return _0x2e518c;let _0x4b9dcc=new Map(_0x5401a3['map'](_0x219fe9=>[_0x219fe9[_0x5d1b8f(0x176)],_0x219fe9[_0x5d1b8f(0x11b)]])),_0x265d7b=((_0x2db0b4=_0x1e02b0[_0x5d1b8f(0x113)])==null?void 0x0:_0x2db0b4[_0x5d1b8f(0x1ab)](_0x469917=>g(_0x469917)&&_0x4b9dcc['has'](_0x469917['rangeId']))[_0x5d1b8f(0x140)]((_0x3d1d4c,_0x3c7ad7)=>_0x3c7ad7['startIndex']-_0x3d1d4c['startIndex']))??[];for(let _0x50081f of _0x265d7b)le(_0x2e518c,_0x50081f[_0x5d1b8f(0x176)],_0x4b9dcc['get'](_0x50081f[_0x5d1b8f(0x176)])??'');return _0x2e518c;}function g(_0x38b5c7){const _0x54cce6=_0x468d3c;var _0x2a1521;return(_0x38b5c7==null?void 0x0:_0x38b5c7['rangeType'])===t[_0x54cce6(0xe9)]['CUSTOM']&&_0x38b5c7[_0x54cce6(0x196)]===!0x0&&((_0x2a1521=_0x38b5c7[_0x54cce6(0x1b0)])==null?void 0x0:_0x2a1521['kind'])==='univer-docs-formula';}function _(_0x116142,_0x47a17e){const _0x2dec27=_0x468d3c;var _0x17c90c;return _0x116142==null||(_0x17c90c=_0x116142['customRanges'])==null?void 0x0:_0x17c90c[_0x2dec27(0x170)](_0x4762fc=>_0x4762fc[_0x2dec27(0x176)]===_0x47a17e&&g(_0x4762fc));}function ie(_0x8dcf73,_0x47347b,_0x323742){const _0x3ed903=_0x468d3c;if(_0x47347b===_0x323742){if(p[_0x3ed903(0x1b8)](_0x8dcf73[_0x3ed903(0xef)][_0x47347b]))throw new m();}else{for(let _0x11bb92=_0x47347b;_0x11bb92<_0x323742;_0x11bb92++)if(_0x8dcf73[_0x3ed903(0xef)][_0x11bb92]===t['DataStreamTreeTokenType'][_0x3ed903(0x11c)]||p[_0x3ed903(0x1b8)](_0x8dcf73[_0x3ed903(0xef)][_0x11bb92]))throw new m();}}function ae(_0xa9bba0,_0x2d97c6){const _0x3814b2=_0x468d3c;return{'startIndex':_0x2d97c6,'endIndex':_0x2d97c6,'rangeId':_0xa9bba0,'rangeType':t[_0x3814b2(0xe9)]['CUSTOM'],'wholeEntity':!0x0,'properties':{'kind':s}};}function v(_0x122b89){const _0x4b46a4=_0x468d3c;return _0x122b89?t[_0x4b46a4(0xeb)][_0x4b46a4(0x149)](_0x122b89):c();}function oe(_0x5cc055,_0x884d8d,_0x2aa145){const _0x5866bb=_0x468d3c;let _0x3f3dff=se(_0x5cc055),_0x11a3eb=_0x884d8d??_0x3f3dff,_0x52e6f6=_0x2aa145??_0x11a3eb;return{'startOffset':y(Math[_0x5866bb(0x136)](_0x11a3eb,_0x52e6f6),_0x3f3dff),'endOffset':y(Math[_0x5866bb(0xf2)](_0x11a3eb,_0x52e6f6),_0x3f3dff)};}function y(_0x1f3cdd,_0x11c8e1){const _0x58f8b0=_0x468d3c;return Math[_0x58f8b0(0xf2)](0x0,Math['min'](_0x1f3cdd,_0x11c8e1));}function se(_0x5b190a){const _0x4cfc52=_0x468d3c;return _0x5b190a[_0x4cfc52(0xef)]['endsWith'](''+t[_0x4cfc52(0x142)][_0x4cfc52(0x11c)]+t[_0x4cfc52(0x142)][_0x4cfc52(0x19e)])?Math[_0x4cfc52(0xf2)](0x0,_0x5b190a[_0x4cfc52(0xef)][_0x4cfc52(0x158)]-0x2):_0x5b190a[_0x4cfc52(0xef)][_0x4cfc52(0x137)](t['DataStreamTreeTokenType'][_0x4cfc52(0x19e)])?Math[_0x4cfc52(0xf2)](0x0,_0x5b190a[_0x4cfc52(0xef)][_0x4cfc52(0x158)]-0x1):_0x5b190a[_0x4cfc52(0xef)][_0x4cfc52(0x158)];}function ce(_0x1a5c4f,_0x6f1ad8,_0x12eb8a,_0x2a95cd){_0x12eb8a>_0x6f1ad8&&de(_0x1a5c4f,_0x6f1ad8,_0x12eb8a),ue(_0x1a5c4f,_0x6f1ad8,_0x2a95cd);}function le(_0x156057,_0x3f9117,_0x8af5a2){const _0x2e99df=_0x468d3c;var _0x56d937,_0x4c7eb8;let _0xbf1b65=T(_0x156057),_0x5a58da=(_0x56d937=_0xbf1b65[_0x2e99df(0x113)])==null?void 0x0:_0x56d937[_0x2e99df(0x170)](_0x240c80=>_0x240c80['rangeId']===_0x3f9117&&g(_0x240c80));if(!_0x5a58da)return null;let _0x381d3b=(0x0,t[_0x2e99df(0x195)])(_0x5a58da);return ce(_0xbf1b65,_0x381d3b[_0x2e99df(0x1ba)],_0x381d3b['endOffset'],_0x8af5a2),_0xbf1b65[_0x2e99df(0x113)]=(_0x4c7eb8=_0xbf1b65['customRanges'])==null?void 0x0:_0x4c7eb8[_0x2e99df(0x1ab)](_0x58d145=>_0x58d145[_0x2e99df(0x176)]!==_0x3f9117),_0x381d3b[_0x2e99df(0x1ba)]+_0x8af5a2[_0x2e99df(0x158)];}function ue(_0xdb158,_0x7007b2,_0x492069){const _0x26831e=_0x468d3c;_0x492069&&(_0xdb158[_0x26831e(0xef)]=''+_0xdb158[_0x26831e(0xef)][_0x26831e(0xec)](0x0,_0x7007b2)+_0x492069+_0xdb158[_0x26831e(0xef)][_0x26831e(0xec)](_0x7007b2),fe(_0xdb158,_0x7007b2,_0x492069[_0x26831e(0x158)]));}function de(_0x1e95ba,_0x29f8c3,_0x4b4b59){const _0x2a7def=_0x468d3c;let _0x50e5c5=_0x4b4b59-_0x29f8c3;_0x1e95ba[_0x2a7def(0xef)]=''+_0x1e95ba['dataStream'][_0x2a7def(0xec)](0x0,_0x29f8c3)+_0x1e95ba[_0x2a7def(0xef)][_0x2a7def(0xec)](_0x4b4b59),pe(_0x1e95ba,_0x29f8c3,_0x50e5c5);}function fe(_0x945ed2,_0x13f461,_0x4b400f){const _0x5937ce=_0x468d3c;_0x945ed2[_0x5937ce(0x1e2)]=b(_0x945ed2[_0x5937ce(0x1e2)],_0x13f461,_0x4b400f),_0x945ed2[_0x5937ce(0x191)]=b(_0x945ed2[_0x5937ce(0x191)],_0x13f461,_0x4b400f),_0x945ed2['customBlocks']=b(_0x945ed2[_0x5937ce(0x197)],_0x13f461,_0x4b400f),_0x945ed2[_0x5937ce(0x1a1)]=me(_0x945ed2[_0x5937ce(0x1a1)],_0x13f461,_0x4b400f),_0x945ed2[_0x5937ce(0x10e)]=he(_0x945ed2[_0x5937ce(0x10e)],_0x13f461,_0x4b400f),_0x945ed2['columnGroups']=S(_0x945ed2[_0x5937ce(0x1f5)],_0x13f461,_0x4b400f),_0x945ed2['customRanges']=S(_0x945ed2[_0x5937ce(0x113)],_0x13f461,_0x4b400f),_0x945ed2['customDecorations']=S(_0x945ed2['customDecorations'],_0x13f461,_0x4b400f),_0x945ed2['blockRanges']=S(_0x945ed2[_0x5937ce(0x169)],_0x13f461,_0x4b400f);}function pe(_0x137948,_0x4a0e81,_0x8ea955){const _0x1fddeb=_0x468d3c;var _0x7ebc4d,_0x7be763;_0x137948[_0x1fddeb(0x1e2)]=x(_0x137948['paragraphs'],_0x4a0e81,_0x8ea955),_0x137948[_0x1fddeb(0x191)]=x(_0x137948[_0x1fddeb(0x191)],_0x4a0e81,_0x8ea955),_0x137948[_0x1fddeb(0x197)]=x(_0x137948[_0x1fddeb(0x197)],_0x4a0e81,_0x8ea955),_0x137948[_0x1fddeb(0x1a1)]=(_0x7ebc4d=w((_0x7be763=_0x137948[_0x1fddeb(0x1a1)])==null?void 0x0:_0x7be763['map'](_0x1d6531=>({..._0x1d6531,'startIndex':_0x1d6531['st'],'endIndex':_0x1d6531['ed']})),_0x4a0e81,_0x8ea955))==null?void 0x0:_0x7ebc4d['map'](_0x2fd566=>{let {startIndex:_0x3736f6,endIndex:_0x44e31d,..._0x41e42f}=_0x2fd566;return{..._0x41e42f,'st':_0x3736f6,'ed':_0x44e31d};}),_0x137948[_0x1fddeb(0x10e)]=w(_0x137948['tables'],_0x4a0e81,_0x8ea955),_0x137948[_0x1fddeb(0x1f5)]=C(_0x137948['columnGroups'],_0x4a0e81,_0x8ea955),_0x137948[_0x1fddeb(0x113)]=C(_0x137948[_0x1fddeb(0x113)],_0x4a0e81,_0x8ea955),_0x137948[_0x1fddeb(0x1a3)]=C(_0x137948['customDecorations'],_0x4a0e81,_0x8ea955),_0x137948[_0x1fddeb(0x169)]=C(_0x137948[_0x1fddeb(0x169)],_0x4a0e81,_0x8ea955);}function b(_0x1c2c1d,_0x4dffe2,_0x4467f5){const _0x4c7c58=_0x468d3c;return _0x1c2c1d==null?void 0x0:_0x1c2c1d[_0x4c7c58(0x18f)](_0x1e6403=>_0x1e6403['startIndex']>=_0x4dffe2?{..._0x1e6403,'startIndex':_0x1e6403['startIndex']+_0x4467f5}:_0x1e6403);}function x(_0x284c90,_0x74f0f7,_0xd8ecdb){const _0x333408=_0x468d3c;let _0x301d79=_0x74f0f7+_0xd8ecdb;return _0x284c90==null?void 0x0:_0x284c90[_0x333408(0x18f)](_0x55cbc1=>_0x55cbc1[_0x333408(0x1fa)]>=_0x74f0f7&&_0x55cbc1[_0x333408(0x1fa)]<_0x301d79?null:_0x55cbc1[_0x333408(0x1fa)]>=_0x301d79?{..._0x55cbc1,'startIndex':_0x55cbc1['startIndex']-_0xd8ecdb}:_0x55cbc1)[_0x333408(0x1ab)](_0x17024a=>_0x17024a!=null);}function _0x26ab(){const _0x289c21=['unregisterUnit','_isDisposed','getCustomRangeInterval','wholeEntity','customBlocks','config','fromEntries','EMPTY','Disposable','eligible','registerPluginResource','SECTION_BREAK','removeUnit','onStarting','textRuns','UniverDocsFormulaPlugin','customDecorations','setFormulas','_syncUnit','resourceRedo','insertLength','string','push','unitDisposed$','filter','getBodySliceForTextXAction','default','DOC_FORMULA_PLUGIN','_configService','properties','isFormulaLastValue','Doc\x20Formula\x20range\x20cannot\x20cross\x20document\x20structure\x20boundaries','cursorOffset','registerFormulaWithRange','DocTextResolverService','findDocFormulaRange','resolveFormulaResultPresentation','has','_service','startOffset','clear','pushUndoRedo','DocFormulaResourceController','2086180hkbCGS','UpdateDocFormulaCommand','DependentOn','resource','insert','getAllUnitsForType','name','next','TABLE_ROW_END','nextDocumentData','_formulaService','collectFormulaExternalReferenceQualifiers','body','add','unsupported-version','2768100fBOEER','docs-formula.command.set-number-format','disposeWithMe','presentation','DocSelectionManagerService','range','subscribe','from','stale','setResource','UniverDocsPlugin','_loadErrors','ConvertDocFormulaToTextCommand','values','448143AChKrA','getRichTextEditPath','generateRandomId','editOp','_preserveInvalid','constructor','DOC_FORMULA_SCHEMA_VERSION','paragraphs','DocFormulaLifecycleController','_rawResources','getRevision','COLUMN_START','_deleteRegistration','replaceDocRanges','_hostExternalReferenceModel','delete','pending','collectMutations','color','status','decorate','getFormula','setFormula','IUniverInstanceService','_queueSync','previousResource','columnGroups','resolveFormula','type','Inject','isInteger','startIndex','SetDocFormulaMutation','retain','docs-formula.mutation.set-last-values','invalid-resource','_config','Injector','_presentationChanged$','document','SetDocFormulaResourceMutation','InvalidDocFormulaInsertRangeError','LexerTreeBuilder','some','BLOCK_END','_docFormulaModel','error','getResult','COLUMN_GROUP_END','register','formulaResult$','ICommandService','asObservable','JSONX','segmentId','SetDocFormulaNumberFormatCommand','SUCCESS','serialize','getFormulas','CUSTOM_BLOCK','toFormulaLastValue','ReplaceDocFormulaWithTextCommand','startsWith','assertSafeDocFormulaInsertRange','referenceRevision','pluginName','resources','updates','symbol','CustomRangeType','degradeDocumentData','Tools','slice','params','end','dataStream','SetDocFormulaLastValuesMutation','getBody','max','notifyTextChanged','MUTATION','univer-docs-formula','syncExecuteCommand','1.3.0','getRegisteredFormulas','defineProperty','schemaVersion','externalReferences','keys','getUnitId','_syncScheduled','cell','start','call','_model','getParagraphContentStartOffset','previousDocumentData','524532LTpPJo','resolveBinding','getScalarFormulaResultCell','identity','getUnit','COMMAND','resolved','degradeBody','version','tables','getCurrentUnitOfType','resourceUndo','source','RemoveDocFormulaMutation','customRanges','expectedNumberFormat','dispose','target','InsertDocFormulaCommand','_setPresentation','deleteFormula','isArray','text','PARAGRAPH','getResource','getPresentation','complete','object','documentRedo','degradeDocFormulaDocumentData','RichTextEditingMutation','DOC_FORMULA_CUSTOM_RANGE_KIND','unitId','paragraphId','function','set','DOC_SELECTION_OPTION_PRESERVE_CARET','load','trim','liveResult','forEach','UNIVER_DOC','_cacheEligibilityService','_registrations','trigger','buildRemoveDocFormulaActions','FormulaCacheEligibilityService','getLoadError','COLUMN_GROUP_START','min','endsWith','Subject','Module','change$','pattern','externalMutations','HostExternalReferenceModel','disabled','_injector','sort','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','DataStreamTreeTokenType','syncUnit','lastValue','removeFormula','entries','docs-formula.mutation.set-formula','docs-formula.config','deepClone','expectedReferenceRevision','formulaId','_commandService','resolveText','_resourceManagerService','FormulaResultStatus','_formulaKeys','TABLE_CELL_END','model','accessor','TextX','_instanceService','_registrationService','number','length','every','toPrimitive','numberFormat','buildUpsertHostExternalReferenceMutations','_univerInstanceService','formula','ERROR','DocFormulaService','references','7049032SqXSdq','docs-formula.command.replace-with-text','formulas','shiftExclusiveRangeOnInsert','_resources','CommandType','documentData','blockRanges','UniverInstanceType','COLUMN_END','_updateFormulaResult','undoMutation','DocFormulaModel','61700QXFtMu','find','BLOCK_START','resolveHostFormulaExternalReferences','3574662NtFvSa','parse','getSnapshot','rangeId','DocFormulaDisplayTextService','RegisterOtherFormulaService','endIndex','success','deleteLength','8YEDEDl','getFormulaValueSync','_pendingUnitIds','presentationChanged$','IResourceManagerService','get','includes','iterator','OtherFormulaBizType','PENDING','endOffset','empty','toStringTag','sequenceNodesBuilder','redoMutation','nextResource','shiftExclusiveRangeOnDelete','_change$','getOwnPropertyDescriptor','map','selection','sectionBreaks','unregister'];_0x26ab=function(){return _0x289c21;};return _0x26ab();}function me(_0x5564d7,_0x176017,_0x4d555f){const _0x410339=_0x468d3c;return _0x5564d7==null?void 0x0:_0x5564d7[_0x410339(0x18f)](_0x105bbc=>_0x105bbc['st']>=_0x176017?{..._0x105bbc,'st':_0x105bbc['st']+_0x4d555f,'ed':_0x105bbc['ed']+_0x4d555f}:_0x105bbc['ed']>_0x176017?{..._0x105bbc,'ed':_0x105bbc['ed']+_0x4d555f}:_0x105bbc);}function S(_0x2f5b2f,_0x22525a,_0x27b82a){return _0x2f5b2f==null?void 0x0:_0x2f5b2f['map'](_0xb4c930=>(0x0,t['shiftInclusiveRangeOnInsert'])(_0xb4c930,_0x22525a,_0x27b82a));}function he(_0x8d26ea,_0x1fcddb,_0x1b83fb){const _0x384b27=_0x468d3c;return _0x8d26ea==null?void 0x0:_0x8d26ea[_0x384b27(0x18f)](_0x3b1891=>(0x0,t[_0x384b27(0x165)])(_0x3b1891,_0x1fcddb,_0x1b83fb));}function C(_0x3fda2c,_0x5dd452,_0x3be7a6){const _0x3547a7=_0x468d3c;return _0x3fda2c==null?void 0x0:_0x3fda2c[_0x3547a7(0x18f)](_0x53c479=>(0x0,t['shiftInclusiveRangeOnDelete'])(_0x53c479,_0x5dd452,_0x3be7a6))[_0x3547a7(0x1ab)](_0x595135=>_0x595135!=null);}function w(_0x12fa04,_0x56b112,_0x1c9481){const _0x1a0983=_0x468d3c;return _0x12fa04==null?void 0x0:_0x12fa04[_0x1a0983(0x18f)](_0x29df18=>(0x0,t[_0x1a0983(0x18c)])(_0x29df18,_0x56b112,_0x1c9481))[_0x1a0983(0x1ab)](_0x1a20fc=>_0x1a20fc!=null);}function T(_0x575e3a){const _0x28fc86=_0x468d3c;if(!_0x575e3a['body'])throw Error('Document\x20main\x20body\x20is\x20required\x20to\x20insert\x20Doc\x20Formula.');return _0x575e3a[_0x28fc86(0x1ca)];}function E(_0x6c6f2d){'@babel/helpers - typeof';const _0xe2b6cc=_0x468d3c;return E=typeof Symbol==_0xe2b6cc(0x127)&&typeof Symbol[_0xe2b6cc(0x183)]==_0xe2b6cc(0xe8)?function(_0x5bcc84){return typeof _0x5bcc84;}:function(_0x1f5453){const _0x5a88d2=_0xe2b6cc;return _0x1f5453&&typeof Symbol==_0x5a88d2(0x127)&&_0x1f5453[_0x5a88d2(0x1e0)]===Symbol&&_0x1f5453!==Symbol['prototype']?_0x5a88d2(0xe8):typeof _0x1f5453;},E(_0x6c6f2d);}function ge(_0x177831,_0x325034){const _0x1cad4b=_0x468d3c;if(E(_0x177831)!=_0x1cad4b(0x120)||!_0x177831)return _0x177831;var _0x5c3545=_0x177831[Symbol[_0x1cad4b(0x15a)]];if(_0x5c3545!==void 0x0){var _0x5100d8=_0x5c3545[_0x1cad4b(0x101)](_0x177831,_0x325034||_0x1cad4b(0x1ad));if(E(_0x5100d8)!='object')return _0x5100d8;throw TypeError(_0x1cad4b(0x141));}return(_0x325034===_0x1cad4b(0x1a8)?String:Number)(_0x177831);}function _e(_0x5923a7){const _0x2b9b59=_0x468d3c;var _0x51741=ge(_0x5923a7,_0x2b9b59(0x1a8));return E(_0x51741)=='symbol'?_0x51741:_0x51741+'';}function D(_0x243554,_0x17b41e,_0x241350){const _0x553f23=_0x468d3c;return(_0x17b41e=_e(_0x17b41e))in _0x243554?Object[_0x553f23(0xf9)](_0x243554,_0x17b41e,{'value':_0x241350,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x243554[_0x17b41e]=_0x241350,_0x243554;}var O=class extends t[_0x468d3c(0x19b)]{constructor(..._0x270fb0){const _0x26d24d=_0x468d3c;super(..._0x270fb0),D(this,_0x26d24d(0x166),new Map()),D(this,_0x26d24d(0x1e4),new Map()),D(this,'_loadErrors',new Map()),D(this,'_change$',new i[(_0x26d24d(0x138))]()),D(this,'change$',this[_0x26d24d(0x18d)]['asObservable']());}[_0x468d3c(0x1f0)](_0x4b5972,_0xbf8cb0){const _0x24499c=_0x468d3c;var _0x377133;let _0x582ca3=(_0x377133=this[_0x24499c(0x166)][_0x24499c(0x181)](_0x4b5972))==null?void 0x0:_0x377133[_0x24499c(0x164)][_0xbf8cb0];return _0x582ca3?t['Tools'][_0x24499c(0x149)](_0x582ca3):void 0x0;}[_0x468d3c(0x215)](_0x753d31){const _0x3c80bd=_0x468d3c;var _0x453329;return t[_0x3c80bd(0xeb)][_0x3c80bd(0x149)](((_0x453329=this[_0x3c80bd(0x166)][_0x3c80bd(0x181)](_0x753d31))==null?void 0x0:_0x453329[_0x3c80bd(0x164)])??{});}['getResource'](_0x3a04f3){const _0x19bece=_0x468d3c;let _0x2947b2=this[_0x19bece(0x166)][_0x19bece(0x181)](_0x3a04f3);return _0x2947b2?t[_0x19bece(0xeb)]['deepClone'](_0x2947b2):void 0x0;}[_0x468d3c(0x1f1)](_0x23b103,_0x3bd107,_0x24e92f){const _0x3adbda=_0x468d3c;return this[_0x3adbda(0x1a4)](_0x23b103,{[_0x3bd107]:_0x24e92f});}['setResource'](_0x115226,_0x5e3bf7){const _0x31b736=_0x468d3c;return this[_0x31b736(0x1d8)][_0x31b736(0x1b8)](_0x115226)||!l(_0x5e3bf7)?!0x1:(this[_0x31b736(0x166)]['set'](_0x115226,t['Tools']['deepClone'](_0x5e3bf7)),this[_0x31b736(0x18d)][_0x31b736(0x1c5)]({'unitId':_0x115226}),!0x0);}['setFormulas'](_0x20d165,_0x514682){const _0x18cdd1=_0x468d3c;if(this['_loadErrors']['has'](_0x20d165)||!Object[_0x18cdd1(0xfc)](_0x514682)[_0x18cdd1(0x158)]||!l({'schemaVersion':0x1,'formulas':_0x514682}))return!0x1;let _0x1b4e32=this[_0x18cdd1(0x166)][_0x18cdd1(0x181)](_0x20d165)??c(),_0x31f4ef=t[_0x18cdd1(0xeb)][_0x18cdd1(0x149)](_0x1b4e32);return Object['assign'](_0x31f4ef['formulas'],t[_0x18cdd1(0xeb)]['deepClone'](_0x514682)),this['_resources'][_0x18cdd1(0x128)](_0x20d165,_0x31f4ef),this[_0x18cdd1(0x18d)][_0x18cdd1(0x1c5)]({'unitId':_0x20d165,'rangeIds':Object[_0x18cdd1(0xfc)](_0x514682)}),!0x0;}['removeFormula'](_0x2f6afd,_0x469cc1){const _0x3db0af=_0x468d3c;if(this[_0x3db0af(0x1d8)][_0x3db0af(0x1b8)](_0x2f6afd))return!0x1;let _0x229b3c=this[_0x3db0af(0x166)][_0x3db0af(0x181)](_0x2f6afd);if(!(_0x229b3c!=null&&_0x229b3c[_0x3db0af(0x164)][_0x469cc1]))return!0x1;let _0x2ffe66=t[_0x3db0af(0xeb)][_0x3db0af(0x149)](_0x229b3c);return delete _0x2ffe66['formulas'][_0x469cc1],this[_0x3db0af(0x166)]['set'](_0x2f6afd,_0x2ffe66),this[_0x3db0af(0x18d)][_0x3db0af(0x1c5)]({'unitId':_0x2f6afd,'rangeIds':[_0x469cc1]}),!0x0;}[_0x468d3c(0x12a)](_0x3120d6,_0x1fce61){const _0x4deb97=_0x468d3c;return _0x1fce61&&typeof _0x1fce61=='object'&&_0x4deb97(0xfa)in _0x1fce61&&_0x1fce61[_0x4deb97(0xfa)]!==0x1?(this['_preserveInvalid'](_0x3120d6,_0x1fce61,_0x4deb97(0x1cc)),!0x1):l(_0x1fce61)?(this['_resources'][_0x4deb97(0x128)](_0x3120d6,t[_0x4deb97(0xeb)][_0x4deb97(0x149)](_0x1fce61)),this[_0x4deb97(0x1e4)][_0x4deb97(0x1ea)](_0x3120d6),this[_0x4deb97(0x1d8)]['delete'](_0x3120d6),this[_0x4deb97(0x18d)][_0x4deb97(0x1c5)]({'unitId':_0x3120d6}),!0x0):(this[_0x4deb97(0x1df)](_0x3120d6,_0x1fce61,_0x4deb97(0x1fe)),!0x1);}['serialize'](_0x419f55){const _0x17de66=_0x468d3c;let _0x3ecf7a=this[_0x17de66(0x166)]['get'](_0x419f55);return _0x3ecf7a?t['Tools'][_0x17de66(0x149)](_0x3ecf7a):this[_0x17de66(0x1e4)]['has'](_0x419f55)?t[_0x17de66(0xeb)][_0x17de66(0x149)](this[_0x17de66(0x1e4)][_0x17de66(0x181)](_0x419f55)):c();}[_0x468d3c(0x134)](_0x27ec08){const _0x76eb5c=_0x468d3c;return this[_0x76eb5c(0x1d8)][_0x76eb5c(0x181)](_0x27ec08);}['removeUnit'](_0x16882b){const _0x243172=_0x468d3c;this[_0x243172(0x166)][_0x243172(0x1ea)](_0x16882b),this[_0x243172(0x1e4)]['delete'](_0x16882b),this[_0x243172(0x1d8)][_0x243172(0x1ea)](_0x16882b),this[_0x243172(0x18d)]['next']({'unitId':_0x16882b});}['dispose'](){const _0x4d47b4=_0x468d3c;this[_0x4d47b4(0x166)]['clear'](),this[_0x4d47b4(0x1e4)][_0x4d47b4(0x1bb)](),this['_loadErrors'][_0x4d47b4(0x1bb)](),this['_change$'][_0x4d47b4(0x11f)](),super[_0x4d47b4(0x115)]();}[_0x468d3c(0x1df)](_0x216f3d,_0x3e1872,_0x4894da){const _0x198d00=_0x468d3c;this['_resources']['delete'](_0x216f3d),this[_0x198d00(0x1e4)][_0x198d00(0x128)](_0x216f3d,t[_0x198d00(0xeb)][_0x198d00(0x149)](_0x3e1872)),this[_0x198d00(0x1d8)][_0x198d00(0x128)](_0x216f3d,_0x4894da),this[_0x198d00(0x18d)][_0x198d00(0x1c5)]({'unitId':_0x216f3d});}};let ve=function(_0x57a9da){const _0x33dc0d=_0x468d3c;return _0x57a9da[_0x33dc0d(0x19a)]=_0x33dc0d(0x187),_0x57a9da[_0x33dc0d(0x185)]=_0x33dc0d(0x1eb),_0x57a9da[_0x33dc0d(0x213)]=_0x33dc0d(0x17a),_0x57a9da[_0x33dc0d(0x15f)]=_0x33dc0d(0x209),_0x57a9da;}({});function k(_0xdf9a17,_0x1fd118){return function(_0x7aef7e,_0x39e7fa){_0x1fd118(_0x7aef7e,_0x39e7fa,_0xdf9a17);};}function A(_0x19cfc7,_0x38daaa,_0x5a6eeb,_0x435a73){const _0x2d3528=_0x468d3c;var _0x16e143=arguments[_0x2d3528(0x158)],_0x214ff3=_0x16e143<0x3?_0x38daaa:_0x435a73===null?_0x435a73=Object[_0x2d3528(0x18e)](_0x38daaa,_0x5a6eeb):_0x435a73,_0x33b34c;if(typeof Reflect==_0x2d3528(0x120)&&typeof Reflect['decorate']=='function')_0x214ff3=Reflect[_0x2d3528(0x1ef)](_0x19cfc7,_0x38daaa,_0x5a6eeb,_0x435a73);else{for(var _0x3ec663=_0x19cfc7['length']-0x1;_0x3ec663>=0x0;_0x3ec663--)(_0x33b34c=_0x19cfc7[_0x3ec663])&&(_0x214ff3=(_0x16e143<0x3?_0x33b34c(_0x214ff3):_0x16e143>0x3?_0x33b34c(_0x38daaa,_0x5a6eeb,_0x214ff3):_0x33b34c(_0x38daaa,_0x5a6eeb))||_0x214ff3);}return _0x16e143>0x3&&_0x214ff3&&Object[_0x2d3528(0xf9)](_0x38daaa,_0x5a6eeb,_0x214ff3),_0x214ff3;}let j=class extends t[_0x468d3c(0x19b)]{constructor(_0x533a43,_0x41b67c,_0x4d784a){const _0x397209=_0x468d3c;super(),this[_0x397209(0x102)]=_0x533a43,this[_0x397209(0x156)]=_0x41b67c,this[_0x397209(0x1e9)]=_0x4d784a,D(this,'_registrations',new Map()),D(this,'_formulaKeys',new Map()),D(this,_0x397209(0x201),new i[(_0x397209(0x138))]()),D(this,_0x397209(0x17f),this[_0x397209(0x201)][_0x397209(0x20f)]()),this[_0x397209(0x1cf)](this[_0x397209(0x156)][_0x397209(0x20d)][_0x397209(0x1d3)](_0x3df409=>{const _0x2a51f5=_0x397209;for(let _0x9b0ef8 of Object['values'](_0x3df409))for(let _0x55462d of Object['values'](_0x9b0ef8))_0x55462d[_0x2a51f5(0x12d)](_0x1fc744=>this['_updateFormulaResult'](_0x1fc744));}));}['syncUnit'](_0x330c82){const _0x4a05cf=_0x468d3c;var _0xc156d9;let _0x19ea98=_0x330c82[_0x4a05cf(0xfd)](),_0x3f2b49=((_0xc156d9=_0x330c82[_0x4a05cf(0x175)]()[_0x4a05cf(0x1ca)])==null||(_0xc156d9=_0xc156d9[_0x4a05cf(0x113)])==null?void 0x0:_0xc156d9[_0x4a05cf(0x1ab)](g))??[],_0x1d5da3=this['_model']['getFormulas'](_0x19ea98),_0x2a153e=new Set();for(let _0x9c2906 of _0x3f2b49){let _0x1ccb67=_0x1d5da3[_0x9c2906[_0x4a05cf(0x176)]];_0x1ccb67&&(_0x2a153e['add'](M(_0x19ea98,_0x9c2906['rangeId'])),this[_0x4a05cf(0x20c)]({'unitId':_0x19ea98,'rangeId':_0x9c2906[_0x4a05cf(0x176)]},_0x1ccb67));}for(let _0x4cb6db of Array[_0x4a05cf(0x1d4)](this[_0x4a05cf(0x130)][_0x4a05cf(0x1da)]()))_0x4cb6db[_0x4a05cf(0x125)]===_0x19ea98&&!_0x2a153e['has'](M(_0x4cb6db[_0x4a05cf(0x125)],_0x4cb6db[_0x4a05cf(0x176)]))&&this[_0x4a05cf(0x192)](_0x4cb6db);}[_0x468d3c(0x20c)](_0xc03823,_0x47b2aa){const _0x483299=_0x468d3c;let _0x266a17=M(_0xc03823[_0x483299(0x125)],_0xc03823['rangeId']),_0x5b761e=this[_0x483299(0x130)][_0x483299(0x181)](_0x266a17),_0x5e4bbf=this['_hostExternalReferenceModel']['getRevision'](_0xc03823[_0x483299(0x125)]);if(_0x5b761e&&_0x5b761e[_0x483299(0x198)][_0x483299(0x15e)]===_0x47b2aa[_0x483299(0x15e)]&&_0x5b761e[_0x483299(0xe4)]===_0x5e4bbf){_0x5b761e[_0x483299(0x198)]=_0x47b2aa;let _0x5da035=_0x5b761e[_0x483299(0x14b)]?this[_0x483299(0x156)][_0x483299(0x17d)](_0x5b761e[_0x483299(0x125)],_0x5b761e[_0x483299(0x125)],_0x5b761e['formulaId'])??void 0x0:void 0x0;_0x5b761e[_0x483299(0x12c)]=_0x5da035,this[_0x483299(0x118)](_0x266a17,N(_0x47b2aa,_0x5da035));return;}_0x5b761e!=null&&_0x5b761e[_0x483299(0x14b)]&&this[_0x483299(0x1e7)](_0x5b761e);let _0x3b8d02={..._0xc03823,'config':_0x47b2aa,'referenceRevision':_0x5e4bbf,'presentation':N(_0x47b2aa,void 0x0)};if(this['_registrations']['set'](_0x266a17,_0x3b8d02),!_0x47b2aa[_0x483299(0x15e)]['trim']())return;let _0x2d95a0=this[_0x483299(0x156)][_0x483299(0x1b4)](_0xc03823['unitId'],_0xc03823[_0x483299(0x125)],_0x47b2aa['formula'],void 0x0,{'rangeId':_0xc03823[_0x483299(0x176)]},r[_0x483299(0x184)]['DOC'],_0xc03823[_0x483299(0x176)]);_0x3b8d02[_0x483299(0x14b)]=_0x2d95a0,this[_0x483299(0x150)]['set'](_0x2d95a0,_0x266a17);}['unregister'](_0x527433){const _0x321282=_0x468d3c;let _0x1804f6=M(_0x527433[_0x321282(0x125)],_0x527433[_0x321282(0x176)]),_0x5c4b2e=this[_0x321282(0x130)][_0x321282(0x181)](_0x1804f6);_0x5c4b2e&&(this['_deleteRegistration'](_0x5c4b2e),this[_0x321282(0x130)]['delete'](_0x1804f6));}[_0x468d3c(0x193)](_0x1a4aa6){const _0x51953f=_0x468d3c;for(let _0x5bb9c2 of Array[_0x51953f(0x1d4)](this['_registrations'][_0x51953f(0x1da)]()))_0x5bb9c2[_0x51953f(0x125)]===_0x1a4aa6&&this[_0x51953f(0x192)](_0x5bb9c2);}[_0x468d3c(0x11e)](_0x263523){const _0x500ea0=_0x468d3c;var _0x1d19f4;return(_0x1d19f4=this['_registrations'][_0x500ea0(0x181)](M(_0x263523['unitId'],_0x263523[_0x500ea0(0x176)])))==null?void 0x0:_0x1d19f4[_0x500ea0(0x1d0)];}[_0x468d3c(0x20a)](_0x5b223a){const _0x1f6588=_0x468d3c;let _0x1762e2=this[_0x1f6588(0x130)][_0x1f6588(0x181)](M(_0x5b223a['unitId'],_0x5b223a[_0x1f6588(0x176)]));return _0x1762e2?P(_0x1762e2):void 0x0;}[_0x468d3c(0xf8)](){const _0x595f92=_0x468d3c;return Array[_0x595f92(0x1d4)](this[_0x595f92(0x130)][_0x595f92(0x1da)](),_0x2b3ce0=>({'identity':{'unitId':_0x2b3ce0[_0x595f92(0x125)],'rangeId':_0x2b3ce0[_0x595f92(0x176)]},'config':_0x2b3ce0[_0x595f92(0x198)],'referenceRevision':_0x2b3ce0[_0x595f92(0xe4)],..._0x2b3ce0[_0x595f92(0x12c)]?{'liveResult':_0x2b3ce0[_0x595f92(0x12c)]}:null}));}[_0x468d3c(0x115)](){const _0x57925a=_0x468d3c;for(let _0x4b5c8a of this[_0x57925a(0x130)]['values']())this[_0x57925a(0x1e7)](_0x4b5c8a);this[_0x57925a(0x130)][_0x57925a(0x1bb)](),this['_formulaKeys'][_0x57925a(0x1bb)](),this[_0x57925a(0x201)]['complete'](),super[_0x57925a(0x115)]();}[_0x468d3c(0x16c)](_0x3daa72){const _0x3e81bb=_0x468d3c;let _0x4c9a53=this[_0x3e81bb(0x150)][_0x3e81bb(0x181)](_0x3daa72[_0x3e81bb(0x14b)]),_0x12d23c=_0x4c9a53?this[_0x3e81bb(0x130)][_0x3e81bb(0x181)](_0x4c9a53):void 0x0;_0x4c9a53&&_0x12d23c&&(_0x12d23c[_0x3e81bb(0x12c)]=_0x3daa72,this['_setPresentation'](_0x4c9a53,N(_0x12d23c[_0x3e81bb(0x198)],_0x3daa72)));}[_0x468d3c(0x118)](_0x23e175,_0xe84b75){const _0x547bff=_0x468d3c;var _0x201359,_0x4c07d3;let _0x420f1d=this[_0x547bff(0x130)][_0x547bff(0x181)](_0x23e175);if(!_0x420f1d||ye(_0x420f1d['presentation'],_0xe84b75))return;let _0x19f43b=_0x420f1d[_0x547bff(0x1d0)],_0x38366e=P(_0x420f1d);_0x420f1d[_0x547bff(0x1d0)]=_0xe84b75,this[_0x547bff(0x201)][_0x547bff(0x1c5)]({'unitId':_0x420f1d[_0x547bff(0x125)],'rangeId':_0x420f1d[_0x547bff(0x176)],'presentation':_0xe84b75,'previousPresentation':_0x19f43b,'result':P(_0x420f1d),'previousResult':{..._0x38366e,..._0x19f43b,'value':(_0x201359=_0x19f43b[_0x547bff(0xff)])==null?void 0x0:_0x201359['v'],'valueType':((_0x4c07d3=_0x19f43b[_0x547bff(0xff)])==null?void 0x0:_0x4c07d3['t'])??void 0x0}});}[_0x468d3c(0x1e7)](_0x44791a){const _0x15d3aa=_0x468d3c;_0x44791a[_0x15d3aa(0x14b)]&&(this[_0x15d3aa(0x156)][_0x15d3aa(0x119)](_0x44791a[_0x15d3aa(0x125)],_0x44791a[_0x15d3aa(0x125)],[_0x44791a[_0x15d3aa(0x14b)]]),this[_0x15d3aa(0x150)][_0x15d3aa(0x1ea)](_0x44791a[_0x15d3aa(0x14b)]));}};j=A([k(0x0,(0x0,t[_0x468d3c(0x1f8)])(O)),k(0x1,(0x0,t[_0x468d3c(0x1f8)])(r[_0x468d3c(0x178)])),k(0x2,(0x0,t[_0x468d3c(0x1f8)])(e[_0x468d3c(0x13d)]))],j);function M(_0x14d291,_0x3cb0f5){return _0x14d291+'\x00'+_0x3cb0f5;}function N(_0x4806a3,_0x58edcf){const _0x3a201a=_0x468d3c;return(0x0,e[_0x3a201a(0x1b7)])({'numberFormat':_0x4806a3[_0x3a201a(0x15b)],'lastValue':_0x4806a3['lastValue'],'result':_0x58edcf});}function P(_0x1fa9ce){const _0xc616a4=_0x468d3c;var _0x269398,_0x4e8061,_0x29e50c;let _0x1a18ef=_0x1fa9ce[_0xc616a4(0x1d0)],_0x8d7f13=_0x1fa9ce[_0xc616a4(0x198)]['formula'][_0xc616a4(0x12b)]()?_0x1a18ef[_0xc616a4(0x1d5)]||_0x1a18ef['cell']==null?_0xc616a4(0x1eb):((_0x269398=_0x1fa9ce[_0xc616a4(0x12c)])==null?void 0x0:_0x269398[_0xc616a4(0x1ee)])===r[_0xc616a4(0x14f)][_0xc616a4(0x15f)]?'error':_0xc616a4(0x17a):_0xc616a4(0x187);return{..._0x1a18ef,'status':_0x8d7f13,'value':(_0x4e8061=_0x1a18ef[_0xc616a4(0xff)])==null?void 0x0:_0x4e8061['v'],'valueType':((_0x29e50c=_0x1a18ef[_0xc616a4(0xff)])==null?void 0x0:_0x29e50c['t'])??void 0x0};}function ye(_0x5e0919,_0x39289b){const _0xb97205=_0x468d3c;var _0x3ad056,_0xab3086,_0x26f758,_0x256f04;return _0x5e0919[_0xb97205(0x11b)]===_0x39289b[_0xb97205(0x11b)]&&_0x5e0919[_0xb97205(0x1ed)]===_0x39289b[_0xb97205(0x1ed)]&&_0x5e0919['pattern']===_0x39289b[_0xb97205(0x13b)]&&_0x5e0919[_0xb97205(0x111)]===_0x39289b['source']&&_0x5e0919[_0xb97205(0x1d5)]===_0x39289b[_0xb97205(0x1d5)]&&((_0x3ad056=_0x5e0919[_0xb97205(0xff)])==null?void 0x0:_0x3ad056['t'])===((_0xab3086=_0x39289b[_0xb97205(0xff)])==null?void 0x0:_0xab3086['t'])&&Object['is']((_0x26f758=_0x5e0919[_0xb97205(0xff)])==null?void 0x0:_0x26f758['v'],(_0x256f04=_0x39289b[_0xb97205(0xff)])==null?void 0x0:_0x256f04['v']);}const F={'id':_0x468d3c(0x147),'type':t[_0x468d3c(0x167)][_0x468d3c(0xf4)],'handler':(_0x48afd5,_0x5f6779)=>!(_0x5f6779!=null&&_0x5f6779[_0x468d3c(0x125)])||!_0x5f6779['rangeId']||!_0x5f6779[_0x468d3c(0x198)]?!0x1:_0x48afd5[_0x468d3c(0x181)](O)['setFormula'](_0x5f6779[_0x468d3c(0x125)],_0x5f6779[_0x468d3c(0x176)],_0x5f6779['config'])},I={'id':'docs-formula.mutation.remove-formula','type':t['CommandType'][_0x468d3c(0xf4)],'handler':(_0x34c9ef,_0x1ec692)=>!(_0x1ec692!=null&&_0x1ec692[_0x468d3c(0x125)])||!_0x1ec692['rangeId']?!0x1:_0x34c9ef[_0x468d3c(0x181)](O)[_0x468d3c(0x145)](_0x1ec692[_0x468d3c(0x125)],_0x1ec692[_0x468d3c(0x176)])},L={'id':'docs-formula.mutation.set-resource','type':t[_0x468d3c(0x167)][_0x468d3c(0xf4)],'handler':(_0x54c576,_0x22c86b)=>!(_0x22c86b!=null&&_0x22c86b[_0x468d3c(0x125)])||!_0x22c86b[_0x468d3c(0x1c1)]?!0x1:_0x54c576[_0x468d3c(0x181)](O)[_0x468d3c(0x1d6)](_0x22c86b[_0x468d3c(0x125)],_0x22c86b[_0x468d3c(0x1c1)])},R={'id':_0x468d3c(0x1fd),'type':t[_0x468d3c(0x167)]['MUTATION'],'handler':(_0x43dc9d,_0x5a954f)=>{const _0x2f6386=_0x468d3c;if(!(_0x5a954f!=null&&_0x5a954f[_0x2f6386(0x125)])||!_0x5a954f[_0x2f6386(0xe7)][_0x2f6386(0x158)])return!0x1;let _0x27347c=_0x43dc9d[_0x2f6386(0x181)](O),_0x5acd52=_0x43dc9d[_0x2f6386(0x181)](e['HostExternalReferenceModel']),_0x176107=_0x27347c['getResource'](_0x5a954f['unitId']);if(!_0x176107)return!0x1;let _0x42cff4=t[_0x2f6386(0xeb)][_0x2f6386(0x149)](_0x176107),_0x427e35=!0x1;for(let _0x358add of _0x5a954f['updates']){var _0xdf97,_0x58a006,_0xd8eae3,_0x48df8d;let _0x487b0c=_0x42cff4[_0x2f6386(0x164)][_0x358add[_0x2f6386(0x176)]];_0x487b0c&&_0x487b0c[_0x2f6386(0x15e)]===_0x358add['expectedFormula']&&((_0xdf97=_0x487b0c[_0x2f6386(0x15b)])==null?void 0x0:_0xdf97[_0x2f6386(0x13b)])===_0x358add[_0x2f6386(0x114)]&&_0x5acd52[_0x2f6386(0x1e5)](_0x5a954f[_0x2f6386(0x125)])===_0x358add[_0x2f6386(0x14a)]&&(((_0x58a006=_0x487b0c[_0x2f6386(0x144)])==null?void 0x0:_0x58a006['v'])!==_0x358add[_0x2f6386(0x144)]['v']||((_0xd8eae3=_0x487b0c[_0x2f6386(0x144)])==null?void 0x0:_0xd8eae3['t'])!==_0x358add['lastValue']['t']||((_0x48df8d=_0x487b0c['lastValue'])==null?void 0x0:_0x48df8d['pattern'])!==_0x358add[_0x2f6386(0x144)][_0x2f6386(0x13b)])&&(_0x487b0c[_0x2f6386(0x144)]=t[_0x2f6386(0xeb)][_0x2f6386(0x149)](_0x358add[_0x2f6386(0x144)]),_0x427e35=!0x0);}return!_0x427e35||_0x27347c[_0x2f6386(0x1d6)](_0x5a954f[_0x2f6386(0x125)],_0x42cff4);}},z={'id':'docs-formula.command.insert','type':t['CommandType'][_0x468d3c(0x10a)],'handler':(_0x1db679,_0x348e5b)=>{const _0x3d2fee=_0x468d3c;if(!(_0x348e5b!=null&&_0x348e5b['formula'][_0x3d2fee(0x12b)]()))return!0x1;let _0x455576=K(_0x1db679,_0x348e5b[_0x3d2fee(0x125)],'');if(!_0x455576)return!0x1;let _0x108a1c=xe(_0x348e5b[_0x3d2fee(0x116)],_0x455576['body'],be(_0x1db679,_0x455576[_0x3d2fee(0x125)]));if(!_0x108a1c)return!0x1;let _0x106fbe=Se(_0x1db679,_0x455576[_0x3d2fee(0x125)],_0x348e5b[_0x3d2fee(0x15e)],_0x348e5b[_0x3d2fee(0xfb)]??[]);if(!_0x106fbe)return!0x1;let _0x123c93=Ce(_0x455576[_0x3d2fee(0x1ca)],_0x455576[_0x3d2fee(0x152)],_0x455576[_0x3d2fee(0x125)]),_0x55bdfa=we({'documentData':_0x455576[_0x3d2fee(0x168)],'resource':_0x455576[_0x3d2fee(0x1c1)],'rangeId':_0x123c93,'config':{'formula':_0x348e5b[_0x3d2fee(0x15e)],..._0x348e5b['numberFormat']?{'numberFormat':_0x348e5b['numberFormat']}:null},'startOffset':_0x108a1c[_0x3d2fee(0x1ba)],'endOffset':_0x108a1c[_0x3d2fee(0x186)]});if(!_0x55bdfa)return!0x1;let _0x2da2a1=(0x0,e[_0x3d2fee(0x15c)])(_0x1db679,_0x455576['unitId'],_0x106fbe);return!_0x2da2a1||!q({'accessor':_0x1db679,'document':_0x455576[_0x3d2fee(0x202)],'unitId':_0x455576['unitId'],'trigger':z['id'],'rangeId':_0x123c93,'previousResource':_0x455576['resource'],'nextResource':_0x55bdfa[_0x3d2fee(0x18b)],'previousDocumentData':_0x455576[_0x3d2fee(0x168)],'nextDocumentData':_0x55bdfa[_0x3d2fee(0x1c7)],'cursorOffset':_0x55bdfa[_0x3d2fee(0x1b3)],'externalMutations':_0x2da2a1})?!0x1:{'rangeId':_0x123c93,'startOffset':_0x55bdfa['cursorOffset']-0x1,'endOffset':_0x55bdfa['cursorOffset']};}},B={'id':'docs-formula.command.update','type':t[_0x468d3c(0x167)][_0x468d3c(0x10a)],'handler':(_0x1a4bad,_0x1c4121)=>{const _0x198385=_0x468d3c;if(!(_0x1c4121!=null&&_0x1c4121[_0x198385(0x176)])||!_0x1c4121[_0x198385(0x15e)][_0x198385(0x12b)]())return!0x1;let _0x18136f=K(_0x1a4bad,_0x1c4121[_0x198385(0x125)],''),_0x337537=_0x18136f==null?void 0x0:_0x18136f[_0x198385(0x152)][_0x198385(0x1f0)](_0x18136f[_0x198385(0x125)],_0x1c4121[_0x198385(0x176)]),_0x2220e0=_0x18136f?_(_0x18136f[_0x198385(0x168)][_0x198385(0x1ca)],_0x1c4121[_0x198385(0x176)]):void 0x0;if(!_0x18136f||!_0x337537||!_0x2220e0)return!0x1;let _0x48e134=Se(_0x1a4bad,_0x18136f[_0x198385(0x125)],_0x1c4121[_0x198385(0x15e)],_0x1c4121[_0x198385(0xfb)]??[]);if(!_0x48e134)return!0x1;let _0x10284f=(0x0,e[_0x198385(0x15c)])(_0x1a4bad,_0x18136f[_0x198385(0x125)],_0x48e134);if(!_0x10284f)return!0x1;let _0x55d048=je(_0x18136f[_0x198385(0x1c1)]);return _0x55d048[_0x198385(0x164)][_0x1c4121[_0x198385(0x176)]]={'formula':_0x1c4121[_0x198385(0x15e)],..._0x1c4121[_0x198385(0x15b)]?{'numberFormat':_0x1c4121[_0x198385(0x15b)]}:_0x337537[_0x198385(0x15b)]?{'numberFormat':_0x337537[_0x198385(0x15b)]}:null},q({'accessor':_0x1a4bad,'document':_0x18136f[_0x198385(0x202)],'unitId':_0x18136f[_0x198385(0x125)],'trigger':B['id'],'rangeId':_0x1c4121[_0x198385(0x176)],'previousResource':_0x18136f['resource'],'nextResource':_0x55d048,'cursorOffset':_0x2220e0[_0x198385(0x179)]+0x1,'externalMutations':_0x10284f});}},V={'id':_0x468d3c(0x1ce),'type':t[_0x468d3c(0x167)][_0x468d3c(0x10a)],'handler':(_0x4256bc,_0x4d8dc5)=>{const _0xf270d3=_0x468d3c;if(!(_0x4d8dc5!=null&&_0x4d8dc5[_0xf270d3(0x176)]))return!0x1;let _0x204aa4=K(_0x4256bc,_0x4d8dc5[_0xf270d3(0x125)],''),_0x5abf47=_0x204aa4==null?void 0x0:_0x204aa4[_0xf270d3(0x152)][_0xf270d3(0x1f0)](_0x204aa4[_0xf270d3(0x125)],_0x4d8dc5['rangeId']),_0x41ccdb=_0x204aa4?_(_0x204aa4[_0xf270d3(0x168)][_0xf270d3(0x1ca)],_0x4d8dc5[_0xf270d3(0x176)]):void 0x0;if(!_0x204aa4||!_0x5abf47||!_0x41ccdb)return!0x1;let _0x372f2a=je(_0x204aa4[_0xf270d3(0x1c1)]);return _0x372f2a[_0xf270d3(0x164)][_0x4d8dc5[_0xf270d3(0x176)]]={..._0x5abf47,..._0x4d8dc5['numberFormat']?{'numberFormat':_0x4d8dc5[_0xf270d3(0x15b)]}:null},_0x4d8dc5[_0xf270d3(0x15b)]||delete _0x372f2a[_0xf270d3(0x164)][_0x4d8dc5[_0xf270d3(0x176)]]['numberFormat'],q({'accessor':_0x4256bc,'document':_0x204aa4[_0xf270d3(0x202)],'unitId':_0x204aa4['unitId'],'trigger':V['id'],'rangeId':_0x4d8dc5['rangeId'],'previousResource':_0x204aa4[_0xf270d3(0x1c1)],'nextResource':_0x372f2a,'cursorOffset':_0x41ccdb[_0xf270d3(0x179)]+0x1,'externalMutations':{}});}},H={'id':'docs-formula.command.remove','type':t[_0x468d3c(0x167)][_0x468d3c(0x10a)],'handler':(_0x318be4,_0x245d23)=>G(_0x318be4,_0x245d23,'',H['id'])},U={'id':_0x468d3c(0x163),'type':t[_0x468d3c(0x167)][_0x468d3c(0x10a)],'handler':(_0x4e56cc,_0x54cf5a)=>G(_0x4e56cc,_0x54cf5a,(_0x54cf5a==null?void 0x0:_0x54cf5a[_0x468d3c(0x11b)])??'',U['id'])},W={'id':'docs-formula.command.convert-to-text','type':t[_0x468d3c(0x167)]['COMMAND'],'handler':(_0x12b6f7,_0x166437)=>{const _0x408f9f=_0x468d3c;if(!(_0x166437!=null&&_0x166437[_0x408f9f(0x176)]))return!0x1;let _0x551907=K(_0x12b6f7,_0x166437['unitId'],'');if(!_0x551907)return!0x1;let _0x555989=_0x12b6f7[_0x408f9f(0x181)](j)[_0x408f9f(0x20a)]({'unitId':_0x551907[_0x408f9f(0x125)],'rangeId':_0x166437[_0x408f9f(0x176)]});return _0x555989?G(_0x12b6f7,_0x166437,_0x555989[_0x408f9f(0x11b)],W['id']):!0x1;}};function G(_0x26a561,_0x198806,_0x4a5016,_0x2a761b){const _0xc5ab92=_0x468d3c;if(!(_0x198806!=null&&_0x198806[_0xc5ab92(0x176)]))return!0x1;let _0x2c665e=K(_0x26a561,_0x198806[_0xc5ab92(0x125)],'');if(!_0x2c665e)return!0x1;let _0x4c7834=h({'documentData':_0x2c665e[_0xc5ab92(0x168)],'resource':_0x2c665e[_0xc5ab92(0x1c1)],'rangeId':_0x198806[_0xc5ab92(0x176)],'text':_0x4a5016});return _0x4c7834?q({'accessor':_0x26a561,'document':_0x2c665e[_0xc5ab92(0x202)],'unitId':_0x2c665e[_0xc5ab92(0x125)],'trigger':_0x2a761b,'rangeId':_0x198806[_0xc5ab92(0x176)],'previousResource':_0x2c665e[_0xc5ab92(0x1c1)],'nextResource':_0x4c7834['nextResource'],'previousDocumentData':_0x2c665e[_0xc5ab92(0x168)],'nextDocumentData':_0x4c7834[_0xc5ab92(0x1c7)],'cursorOffset':_0x4c7834[_0xc5ab92(0x1b3)],'externalMutations':{}}):!0x1;}function K(_0x4cd2bd,_0x52f8d3,_0x465e16){const _0x17d1fc=_0x468d3c;if(_0x465e16)return null;let _0x5835ee=_0x4cd2bd[_0x17d1fc(0x181)](t[_0x17d1fc(0x1f2)]),_0x11d44b=(_0x52f8d3?_0x5835ee['getUnit'](_0x52f8d3,t['UniverInstanceType'][_0x17d1fc(0x12e)]):_0x5835ee[_0x17d1fc(0x10f)](t[_0x17d1fc(0x16a)][_0x17d1fc(0x12e)]))??null;if(!_0x11d44b)return null;let _0x311f0e=_0x11d44b[_0x17d1fc(0x175)](),_0x2209c0=_0x311f0e['body'];if(_0x311f0e[_0x17d1fc(0x13e)]||!_0x2209c0)return null;let _0xa19d21=_0x4cd2bd['get'](O);return _0xa19d21[_0x17d1fc(0x134)](_0x11d44b[_0x17d1fc(0xfd)]())?null:{'document':_0x11d44b,'body':_0x2209c0,'documentData':_0x311f0e,'model':_0xa19d21,'resource':_0xa19d21[_0x17d1fc(0x11d)](_0x11d44b['getUnitId']())??c(),'unitId':_0x11d44b[_0x17d1fc(0xfd)]()};}function be(_0x50f4fd,_0x370dd3){const _0x53addd=_0x468d3c;var _0x10f13e;return(_0x10f13e=_0x50f4fd[_0x53addd(0x181)](n['DocSelectionManagerService'])['getTextRanges']({'subUnitId':_0x370dd3,'unitId':_0x370dd3}))==null?void 0x0:_0x10f13e[0x0];}function xe(_0x4f7281,_0x2071bc,_0x4c5495){const _0xc05fc1=_0x468d3c;if((_0x4f7281==null?void 0x0:_0x4f7281[_0xc05fc1(0x1f7)])==='paragraph'){var _0x485a72;let _0x2d0036=((_0x485a72=_0x2071bc[_0xc05fc1(0x1e2)])==null?void 0x0:_0x485a72['filter'](_0x58d1ff=>_0x58d1ff['paragraphId']===_0x4f7281[_0xc05fc1(0x126)]))??[];if(_0x2d0036['length']!==0x1)return null;let _0x1708e1=_0x2d0036[0x0],_0x18e466=(0x0,t[_0xc05fc1(0x103)])(_0x2071bc,_0x1708e1),_0x2ca78b=_0x1708e1[_0xc05fc1(0x1fa)]-_0x18e466,_0xe12fb5=_0x4f7281['position']===_0xc05fc1(0xee)?_0x2ca78b:_0x4f7281['position'];if(!Number[_0xc05fc1(0x1f9)](_0xe12fb5)||_0xe12fb5<0x0||_0xe12fb5>_0x2ca78b)return null;let _0xe6287b=_0x18e466+_0xe12fb5;return{'startOffset':_0xe6287b,'endOffset':_0xe6287b};}if((_0x4f7281==null?void 0x0:_0x4f7281[_0xc05fc1(0x1f7)])===_0xc05fc1(0x1d2))return!Number[_0xc05fc1(0x1f9)](_0x4f7281[_0xc05fc1(0x1ba)])||!Number[_0xc05fc1(0x1f9)](_0x4f7281[_0xc05fc1(0x186)])?null:{'startOffset':Math['min'](_0x4f7281['startOffset'],_0x4f7281[_0xc05fc1(0x186)]),'endOffset':Math[_0xc05fc1(0xf2)](_0x4f7281[_0xc05fc1(0x1ba)],_0x4f7281['endOffset'])};let _0x5d9d78=(_0x4f7281==null?void 0x0:_0x4f7281['type'])===_0xc05fc1(0x190)?_0x4f7281[_0xc05fc1(0x190)]:_0x4c5495;return!_0x5d9d78||_0x5d9d78[_0xc05fc1(0x211)]?null:{'startOffset':Math['min'](_0x5d9d78[_0xc05fc1(0x1ba)],_0x5d9d78[_0xc05fc1(0x186)]),'endOffset':Math[_0xc05fc1(0xf2)](_0x5d9d78[_0xc05fc1(0x1ba)],_0x5d9d78['endOffset'])};}function Se(_0x3a804c,_0x860f10,_0x181b72,_0x1b20aa){const _0x3c2414=_0x468d3c;let _0x2cac96=_0x3a804c[_0x3c2414(0x181)](r[_0x3c2414(0x205)]),_0x296f11=_0x181b72[_0x3c2414(0xe2)]('=')?_0x181b72['slice'](0x1):_0x181b72,_0x318512=_0x2cac96[_0x3c2414(0x189)](_0x296f11);if(!_0x318512)return null;let _0x344b11=_0x3a804c[_0x3c2414(0x181)](e[_0x3c2414(0x13d)]),_0x3eb963=(0x0,e[_0x3c2414(0x172)])({'qualifiers':(0x0,e[_0x3c2414(0x1c9)])(_0x318512),'explicitReferences':_0x1b20aa??[],'resolveBinding':_0x4a3306=>_0x344b11[_0x3c2414(0x106)](_0x860f10,_0x4a3306)});return _0x3eb963[_0x3c2414(0x1ee)]===_0x3c2414(0x10b)?_0x3eb963[_0x3c2414(0x161)]:null;}function Ce(_0x477f83,_0x1868db,_0x1ded94){const _0x54f7e8=_0x468d3c;var _0x2e04df;let _0x325cc5=(0x0,t[_0x54f7e8(0x1dd)])(0x6);for(;_0x477f83!=null&&(_0x2e04df=_0x477f83['customRanges'])!=null&&_0x2e04df[_0x54f7e8(0x206)](_0x5b0648=>_0x5b0648[_0x54f7e8(0x176)]===_0x325cc5)||_0x1868db['getFormula'](_0x1ded94,_0x325cc5);)_0x325cc5=(0x0,t[_0x54f7e8(0x1dd)])(0x6);return _0x325cc5;}function we(_0x1a8297){try{return te(_0x1a8297);}catch(_0x187f58){if(_0x187f58 instanceof m)return null;throw _0x187f58;}}function Te(_0x2cbc75){const _0xbbe8c6=_0x468d3c;let _0x2d9e66=_0x2cbc75[_0xbbe8c6(0x104)]&&_0x2cbc75[_0xbbe8c6(0x1c7)]?De(_0x2cbc75[_0xbbe8c6(0x202)],_0x2cbc75[_0xbbe8c6(0x125)],_0x2cbc75['previousDocumentData'],_0x2cbc75[_0xbbe8c6(0x1c7)],_0x2cbc75[_0xbbe8c6(0x1b3)],_0x2cbc75['trigger']):null;return _0x2cbc75[_0xbbe8c6(0x104)]&&_0x2cbc75[_0xbbe8c6(0x1c7)]&&!_0x2d9e66?null:{'documentRedo':_0x2d9e66,'resourceRedo':{'id':L['id'],'params':{'unitId':_0x2cbc75[_0xbbe8c6(0x125)],'resource':_0x2cbc75['nextResource']}},'resourceUndo':{'id':L['id'],'params':{'unitId':_0x2cbc75[_0xbbe8c6(0x125)],'resource':_0x2cbc75[_0xbbe8c6(0x1f4)]}}};}function Ee(_0x259a72,_0x45030e,_0x5b0008,_0x4b1e28){const _0x2e8be4=_0x468d3c;_0x4b1e28[_0x2e8be4(0x1bc)]({'id':_0x259a72[_0x2e8be4(0x131)]+':'+_0x259a72[_0x2e8be4(0x176)],'unitID':_0x259a72[_0x2e8be4(0x125)],'redoMutations':[..._0x259a72[_0x2e8be4(0x13c)][_0x2e8be4(0x18a)]?[_0x259a72['externalMutations']['redoMutation']]:[],..._0x45030e[_0x2e8be4(0x121)]?[_0x45030e[_0x2e8be4(0x121)]]:[],_0x45030e['resourceRedo']],'undoMutations':[_0x45030e['resourceUndo'],..._0x5b0008?[_0x5b0008]:[],..._0x259a72[_0x2e8be4(0x13c)][_0x2e8be4(0x16d)]?[_0x259a72[_0x2e8be4(0x13c)][_0x2e8be4(0x16d)]]:[]]});}function q(_0x23220c){const _0x2cba53=_0x468d3c;let _0x45e24a=_0x23220c[_0x2cba53(0x153)]['get'](t['ICommandService']),_0x349b21=_0x23220c[_0x2cba53(0x153)][_0x2cba53(0x181)](t['IUndoRedoService']),_0x21548a=_0x23220c[_0x2cba53(0x153)][_0x2cba53(0x181)](n[_0x2cba53(0x1d1)]),_0x4f18bd=Te(_0x23220c);if(!_0x4f18bd)return!0x1;let _0x59a8c6=!0x1,_0x16704e=null,_0x171d20=!0x1;try{if(_0x23220c[_0x2cba53(0x13c)][_0x2cba53(0x18a)]){if(!_0x45e24a['syncExecuteCommand'](_0x23220c[_0x2cba53(0x13c)][_0x2cba53(0x18a)]['id'],_0x23220c['externalMutations'][_0x2cba53(0x18a)]['params']))return!0x1;_0x59a8c6=!0x0;}if(_0x4f18bd[_0x2cba53(0x121)]){let _0x3a6a2d=_0x45e24a[_0x2cba53(0xf6)](_0x4f18bd[_0x2cba53(0x121)]['id'],_0x4f18bd[_0x2cba53(0x121)][_0x2cba53(0xed)]);if(!_0x3a6a2d)return J(_0x45e24a,_0x23220c[_0x2cba53(0x13c)],_0x59a8c6),!0x1;_0x16704e={'id':n[_0x2cba53(0x123)]['id'],'params':{..._0x3a6a2d,'noHistory':!0x0,'noNeedSetTextRange':!0x0,'segmentId':''}};}if(!_0x45e24a[_0x2cba53(0xf6)](_0x4f18bd[_0x2cba53(0x1a6)]['id'],_0x4f18bd[_0x2cba53(0x1a6)][_0x2cba53(0xed)]))return Oe(_0x45e24a,_0x16704e),J(_0x45e24a,_0x23220c[_0x2cba53(0x13c)],_0x59a8c6),!0x1;_0x171d20=!0x0,Ee(_0x23220c,_0x4f18bd,_0x16704e,_0x349b21);}catch(_0x44ebef){throw _0x171d20&&_0x45e24a[_0x2cba53(0xf6)](_0x4f18bd[_0x2cba53(0x110)]['id'],_0x4f18bd[_0x2cba53(0x110)][_0x2cba53(0xed)]),Oe(_0x45e24a,_0x16704e),J(_0x45e24a,_0x23220c[_0x2cba53(0x13c)],_0x59a8c6),_0x44ebef;}return _0x21548a[_0x2cba53(0x1e8)]([{'startOffset':_0x23220c[_0x2cba53(0x1b3)],'endOffset':_0x23220c['cursorOffset'],'segmentId':''}],{'unitId':_0x23220c[_0x2cba53(0x125)],'subUnitId':_0x23220c[_0x2cba53(0x125)]},!0x1,{[n[_0x2cba53(0x129)]]:!0x0}),!0x0;}function De(_0x4a7877,_0x4e671d,_0x3eb5b2,_0x2cef0a,_0x1bcd76,_0x4fd18a){const _0x653839=_0x468d3c;let _0x563431=ke(_0x3eb5b2,_0x2cef0a,(0x0,t[_0x653839(0x1dc)])(_0x4a7877,''));return _0x563431?{'id':n['RichTextEditingMutation']['id'],'params':{'unitId':_0x4e671d,'actions':_0x563431,'segmentId':'','textRanges':[{'startOffset':_0x1bcd76,'endOffset':_0x1bcd76,'collapsed':!0x0,'segmentId':''}],'isEditing':!0x1,'noHistory':!0x0,'noNeedSetTextRange':!0x0,'trigger':_0x4fd18a}}:null;}function Oe(_0x4d48f4,_0x1a9e65){const _0x3d16e7=_0x468d3c;_0x1a9e65&&_0x4d48f4[_0x3d16e7(0xf6)](_0x1a9e65['id'],_0x1a9e65['params']);}function J(_0x158522,_0x2669c3,_0x2120ea){const _0x55e9db=_0x468d3c;_0x2120ea&&_0x2669c3['undoMutation']&&_0x158522[_0x55e9db(0xf6)](_0x2669c3[_0x55e9db(0x16d)]['id'],_0x2669c3[_0x55e9db(0x16d)][_0x55e9db(0xed)]);}function ke(_0xc07906,_0x37e253,_0x2a70e9){const _0x35d53f=_0x468d3c;let _0x3a240a=_0xc07906[_0x35d53f(0x1ca)],_0x5aa465=_0x37e253[_0x35d53f(0x1ca)],_0x41f121=Ae(_0x3a240a==null?void 0x0:_0x3a240a[_0x35d53f(0xef)],_0x5aa465==null?void 0x0:_0x5aa465[_0x35d53f(0xef)]);if(!_0x41f121||!_0x5aa465)return null;let _0x2d7e2d=new t[(_0x35d53f(0x154))]();return _0x2d7e2d[_0x35d53f(0x1fc)](_0x41f121[_0x35d53f(0x100)]),_0x41f121[_0x35d53f(0x1a7)]>0x0&&_0x2d7e2d[_0x35d53f(0x1c2)](_0x41f121[_0x35d53f(0x1a7)],(0x0,t[_0x35d53f(0x1ac)])(_0x5aa465,_0x41f121[_0x35d53f(0x100)],_0x41f121[_0x35d53f(0x100)]+_0x41f121['insertLength'],!0x1)),_0x41f121[_0x35d53f(0x17b)]>0x0&&_0x2d7e2d[_0x35d53f(0x1ea)](_0x41f121[_0x35d53f(0x17b)]),t[_0x35d53f(0x210)]['getInstance']()[_0x35d53f(0x1de)](_0x2d7e2d[_0x35d53f(0x214)](),_0x2a70e9);}function Ae(_0x406491,_0x7af8a0){const _0x1aa719=_0x468d3c;if(_0x406491==null||_0x7af8a0==null||_0x406491===_0x7af8a0)return null;let _0x1fe167=0x0;for(;_0x1fe167<_0x406491[_0x1aa719(0x158)]&&_0x1fe167<_0x7af8a0[_0x1aa719(0x158)]&&_0x406491[_0x1fe167]===_0x7af8a0[_0x1fe167];)_0x1fe167+=0x1;let _0x42c4b8=_0x406491['length'],_0x3e8750=_0x7af8a0['length'];for(;_0x42c4b8>_0x1fe167&&_0x3e8750>_0x1fe167&&_0x406491[_0x42c4b8-0x1]===_0x7af8a0[_0x3e8750-0x1];)--_0x42c4b8,--_0x3e8750;return{'start':_0x1fe167,'deleteLength':_0x42c4b8-_0x1fe167,'insertLength':_0x3e8750-_0x1fe167};}function je(_0x5efe31){const _0x56f72b=_0x468d3c;return{'schemaVersion':0x1,'formulas':Object[_0x56f72b(0x199)](Object[_0x56f72b(0x146)](_0x5efe31['formulas'])['map'](([_0x2eeb4a,_0x97a034])=>[_0x2eeb4a,{..._0x97a034,..._0x97a034[_0x56f72b(0x15b)]?{'numberFormat':{..._0x97a034['numberFormat']}}:null,..._0x97a034['lastValue']?{'lastValue':{..._0x97a034['lastValue']}}:null}]))};}let Y=class extends t[_0x468d3c(0x19b)]{constructor(_0x1ff6ef,_0x1e1fd1,_0x5dacf7,_0x61057f){const _0x2f4b0b=_0x468d3c;super(),this[_0x2f4b0b(0x155)]=_0x1ff6ef,this[_0x2f4b0b(0x14c)]=_0x1e1fd1,this['_model']=_0x5dacf7,this[_0x2f4b0b(0x1b9)]=_0x61057f,D(this,'_pendingUnitIds',new Set()),D(this,'_syncScheduled',!0x1),D(this,_0x2f4b0b(0x194),!0x1),this['_instanceService'][_0x2f4b0b(0x1c3)](t[_0x2f4b0b(0x16a)]['UNIVER_DOC'])[_0x2f4b0b(0x12d)](_0x32db92=>this['_service'][_0x2f4b0b(0x143)](_0x32db92)),this['disposeWithMe'](this[_0x2f4b0b(0x102)][_0x2f4b0b(0x13a)][_0x2f4b0b(0x1d3)](({unitId:_0x4ef519})=>this['_syncUnit'](_0x4ef519))),this[_0x2f4b0b(0x1cf)](this[_0x2f4b0b(0x155)]['unitAdded$']['subscribe'](({unit:_0xdbd2b8})=>{const _0x5b81cc=_0x2f4b0b;_0xdbd2b8['type']===t[_0x5b81cc(0x16a)][_0x5b81cc(0x12e)]&&this[_0x5b81cc(0x1f3)](_0xdbd2b8[_0x5b81cc(0xfd)]());})),this[_0x2f4b0b(0x1cf)](this['_instanceService'][_0x2f4b0b(0x1aa)][_0x2f4b0b(0x1d3)](_0x65c792=>{const _0x5f53ab=_0x2f4b0b;this[_0x5f53ab(0x1b9)][_0x5f53ab(0x193)](_0x65c792[_0x5f53ab(0xfd)]());})),this[_0x2f4b0b(0x1cf)](this[_0x2f4b0b(0x14c)]['onCommandExecuted'](_0x54c6a6=>{const _0x42b579=_0x2f4b0b;if(_0x54c6a6['id']===n[_0x42b579(0x123)]['id']&&Me(_0x54c6a6[_0x42b579(0xed)])){let _0x190752=_0x54c6a6[_0x42b579(0xed)];_0x190752[_0x42b579(0x211)]||this[_0x42b579(0x1a5)](_0x190752['unitId']);}}));}[_0x468d3c(0x115)](){const _0x419a7a=_0x468d3c;this['_isDisposed']=!0x0,super[_0x419a7a(0x115)]();}['_queueSync'](_0xb9ab63){const _0x366fce=_0x468d3c;this[_0x366fce(0x17e)][_0x366fce(0x1cb)](_0xb9ab63),!this[_0x366fce(0xfe)]&&(this[_0x366fce(0xfe)]=!0x0,queueMicrotask(()=>{const _0x5ebf81=_0x366fce;if(this[_0x5ebf81(0xfe)]=!0x1,this['_isDisposed'])return;let _0x7bc61c=Array[_0x5ebf81(0x1d4)](this[_0x5ebf81(0x17e)]);this[_0x5ebf81(0x17e)][_0x5ebf81(0x1bb)](),_0x7bc61c[_0x5ebf81(0x12d)](_0x52854e=>this['_syncUnit'](_0x52854e));}));}['_syncUnit'](_0x212a47){const _0xcd91c9=_0x468d3c;let _0x3a39d3=this[_0xcd91c9(0x155)][_0xcd91c9(0x109)](_0x212a47,t[_0xcd91c9(0x16a)][_0xcd91c9(0x12e)]);_0x3a39d3&&this['_service']['syncUnit'](_0x3a39d3);}};Y=A([k(0x0,t['IUniverInstanceService']),k(0x1,t[_0x468d3c(0x20e)]),k(0x2,(0x0,t[_0x468d3c(0x1f8)])(O)),k(0x3,(0x0,t['Inject'])(j))],Y);function Me(_0x1c84af){const _0x3cfe2e=_0x468d3c;return typeof _0x1c84af==_0x3cfe2e(0x120)&&!!_0x1c84af&&_0x3cfe2e(0x125)in _0x1c84af&&typeof _0x1c84af[_0x3cfe2e(0x125)]==_0x3cfe2e(0x1a8)&&(!('segmentId'in _0x1c84af)||_0x1c84af[_0x3cfe2e(0x211)]===void 0x0||typeof _0x1c84af[_0x3cfe2e(0x211)]==_0x3cfe2e(0x1a8));}let X=class extends t[_0x468d3c(0x19b)]{constructor(_0xfa9b46,_0x367991){const _0x1276fc=_0x468d3c;super(),this[_0x1276fc(0x14e)]=_0xfa9b46,this[_0x1276fc(0x208)]=_0x367991,this['disposeWithMe'](this['_resourceManagerService'][_0x1276fc(0x19d)]({'pluginName':o,'businesses':[t[_0x1276fc(0x16a)]['UNIVER_DOC']],'toJson':_0xdeb68=>JSON['stringify'](this['_docFormulaModel'][_0x1276fc(0x214)](_0xdeb68)),'parseJson':_0x2cdd39=>JSON[_0x1276fc(0x174)](_0x2cdd39),'onLoad':(_0x3c24dc,_0x54c840)=>{const _0x566af6=_0x1276fc;this[_0x566af6(0x208)]['load'](_0x3c24dc,_0x54c840);},'onUnLoad':_0x5af3f1=>this['_docFormulaModel'][_0x1276fc(0x19f)](_0x5af3f1)}));}};X=A([k(0x0,t[_0x468d3c(0x180)]),k(0x1,(0x0,t['Inject'])(O))],X);var Ne='@univerjs-pro/docs-formula',Pe=_0x468d3c(0xf7);function _0x4dab(_0x5501ff,_0x4f4cf2){_0x5501ff=_0x5501ff-0xe1;const _0x26ab41=_0x26ab();let _0x4dab02=_0x26ab41[_0x5501ff];return _0x4dab02;}const Fe={};let Z=class extends t[_0x468d3c(0x19b)]{constructor(_0x42c367,_0x34e933,_0x1ef4b8){const _0x44c74b=_0x468d3c;super(),this[_0x44c74b(0x15d)]=_0x42c367,this[_0x44c74b(0x1c8)]=_0x34e933,this[_0x44c74b(0x1cf)](_0x1ef4b8['register']({'resolve':(_0x306290,_0x4261fa)=>{const _0x289c2c=_0x44c74b;var _0x55ba91;return((_0x55ba91=_0x4261fa[_0x289c2c(0x113)])==null?void 0x0:_0x55ba91['filter'](g)[_0x289c2c(0x18f)](_0x1f9b9e=>({'startOffset':_0x1f9b9e[_0x289c2c(0x1fa)],'endOffset':_0x1f9b9e[_0x289c2c(0x179)]+0x1,'text':this[_0x289c2c(0x1f6)](_0x306290,_0x1f9b9e['rangeId'])})))??[];}})),this['disposeWithMe'](this[_0x44c74b(0x1c8)][_0x44c74b(0x17f)][_0x44c74b(0x1d3)](({unitId:_0x4144cd})=>{const _0x23af6d=_0x44c74b;_0x1ef4b8[_0x23af6d(0xf3)](_0x4144cd);}));}[_0x468d3c(0x1f6)](_0xd22b3b,_0x19afdc){const _0x15c97b=_0x468d3c;var _0x2ca57b;return((_0x2ca57b=this[_0x15c97b(0x1c8)][_0x15c97b(0x20a)]({'unitId':_0xd22b3b,'rangeId':_0x19afdc}))==null?void 0x0:_0x2ca57b[_0x15c97b(0x11b)])??'';}[_0x468d3c(0x14d)](_0x25dfd9,_0x5c8d31,_0x41b1be){const _0x6ba730=_0x468d3c;var _0x280d28;let _0x1f40c6=this[_0x6ba730(0x15d)]['getUnit'](_0x25dfd9,t[_0x6ba730(0x16a)][_0x6ba730(0x12e)]),_0x36df1e=_0x1f40c6==null?void 0x0:_0x1f40c6[_0x6ba730(0xf1)]();if(!_0x36df1e)return'';let _0xeb5efc=_0x36df1e[_0x6ba730(0xef)][_0x6ba730(0xec)](_0x5c8d31,_0x41b1be),_0x4551cf=((_0x280d28=_0x36df1e[_0x6ba730(0x113)])==null?void 0x0:_0x280d28['filter'](_0x1d15f4=>g(_0x1d15f4)&&_0x1d15f4[_0x6ba730(0x1fa)]>=_0x5c8d31&&_0x1d15f4['endIndex']<_0x41b1be)[_0x6ba730(0x140)]((_0x219d68,_0x3683ac)=>_0x3683ac[_0x6ba730(0x1fa)]-_0x219d68['startIndex']))??[];for(let _0x6917e of _0x4551cf){let _0x527223=_0x6917e[_0x6ba730(0x1fa)]-_0x5c8d31,_0x2055ce=_0x6917e['endIndex']-_0x5c8d31+0x1;_0xeb5efc=''+_0xeb5efc[_0x6ba730(0xec)](0x0,_0x527223)+this[_0x6ba730(0x1f6)](_0x25dfd9,_0x6917e['rangeId'])+_0xeb5efc[_0x6ba730(0xec)](_0x2055ce);}return _0xeb5efc;}[_0x468d3c(0xea)](_0x1ec6cd){return Ie(_0x1ec6cd);}[_0x468d3c(0x10c)](_0x21796e,_0x5ce76c,_0x528342={}){const _0x3dd8a8=_0x468d3c;var _0xc12551;return re({'id':_0x21796e,'body':_0x5ce76c,'documentStyle':{}},(((_0xc12551=_0x5ce76c[_0x3dd8a8(0x113)])==null?void 0x0:_0xc12551['filter'](g))??[])['map'](_0x5f4507=>({'rangeId':_0x5f4507[_0x3dd8a8(0x176)],'text':_0x528342[_0x5f4507[_0x3dd8a8(0x176)]]??this[_0x3dd8a8(0x1f6)](_0x21796e,_0x5f4507[_0x3dd8a8(0x176)])})))[_0x3dd8a8(0x1ca)]??{'dataStream':''};}};Z=A([k(0x0,t[_0x468d3c(0x1f2)]),k(0x1,(0x0,t['Inject'])(j)),k(0x2,(0x0,t['Inject'])(n[_0x468d3c(0x1b5)]))],Z);function Ie(_0x47a310){const _0x1baee8=_0x468d3c;var _0x1637c2,_0x1ba2e0;let _0x10c75f=Le(_0x47a310),_0x225838=re(_0x47a310,(((_0x1637c2=_0x47a310[_0x1baee8(0x1ca)])==null||(_0x1637c2=_0x1637c2[_0x1baee8(0x113)])==null?void 0x0:_0x1637c2['filter'](g))??[])[_0x1baee8(0x18f)](_0x29f57d=>({'rangeId':_0x29f57d['rangeId'],'text':Re(_0x10c75f==null?void 0x0:_0x10c75f[_0x1baee8(0x164)][_0x29f57d[_0x1baee8(0x176)]])})));return _0x225838['resources']=(_0x1ba2e0=_0x225838[_0x1baee8(0xe6)])==null?void 0x0:_0x1ba2e0[_0x1baee8(0x1ab)](_0x1a1d7e=>_0x1a1d7e[_0x1baee8(0x1c4)]!==o),_0x225838;}function Le(_0x3421c1){const _0x25889d=_0x468d3c;var _0x37862a;let _0x266ca8=(_0x37862a=_0x3421c1[_0x25889d(0xe6)])==null||(_0x37862a=_0x37862a['find'](_0x1a6076=>_0x1a6076['name']===_0x25889d(0x1ae)))==null?void 0x0:_0x37862a['data'];if(_0x266ca8)try{let _0x2f32c1=JSON['parse'](_0x266ca8);return l(_0x2f32c1)?_0x2f32c1:void 0x0;}catch{return;}}function Re(_0x40be67){const _0x19c429=_0x468d3c;return _0x40be67?(0x0,e[_0x19c429(0x1b7)])({'lastValue':_0x40be67[_0x19c429(0x144)],'numberFormat':_0x40be67[_0x19c429(0x15b)]})['text']:'';}let Q=class extends t['Disposable']{constructor(_0x27deda,_0x540c46,_0x57c0a1){const _0x255b57=_0x468d3c;super(),this[_0x255b57(0x1c8)]=_0x27deda,this[_0x255b57(0x12f)]=_0x540c46,this[_0x255b57(0x1cf)](_0x57c0a1['registerProvider'](this));}[_0x468d3c(0x1ec)](_0x6fd001){const _0x4ecdb7=_0x468d3c;let _0x3d4c2b=new Map();for(let _0x2bd784 of this[_0x4ecdb7(0x1c8)][_0x4ecdb7(0xf8)]()){var _0x216746;if(!this[_0x4ecdb7(0x12f)]['assess'](_0x2bd784[_0x4ecdb7(0x198)][_0x4ecdb7(0x15e)],_0x2bd784['liveResult'])[_0x4ecdb7(0x19c)])continue;let _0x4d4646=(0x0,e[_0x4ecdb7(0x107)])(_0x2bd784[_0x4ecdb7(0x12c)]),_0x25e4a6=_0x4d4646?(0x0,e[_0x4ecdb7(0x217)])(_0x4d4646):null;if(!_0x25e4a6||ze(_0x2bd784[_0x4ecdb7(0x198)][_0x4ecdb7(0x144)],_0x25e4a6))continue;let _0x4503b1=_0x3d4c2b[_0x4ecdb7(0x181)](_0x2bd784[_0x4ecdb7(0x108)]['unitId'])??[];_0x4503b1[_0x4ecdb7(0x1a9)]({'rangeId':_0x2bd784['identity'][_0x4ecdb7(0x176)],'expectedFormula':_0x2bd784['config'][_0x4ecdb7(0x15e)],'expectedNumberFormat':(_0x216746=_0x2bd784[_0x4ecdb7(0x198)][_0x4ecdb7(0x15b)])==null?void 0x0:_0x216746[_0x4ecdb7(0x13b)],'expectedReferenceRevision':_0x2bd784[_0x4ecdb7(0xe4)],'lastValue':_0x25e4a6}),_0x3d4c2b[_0x4ecdb7(0x128)](_0x2bd784[_0x4ecdb7(0x108)][_0x4ecdb7(0x125)],_0x4503b1);}return Array[_0x4ecdb7(0x1d4)](_0x3d4c2b,([_0x1d6c84,_0x316ed2])=>({'id':R['id'],'params':{'unitId':_0x1d6c84,'updates':_0x316ed2}}));}};Q=A([k(0x0,(0x0,t[_0x468d3c(0x1f8)])(j)),k(0x1,(0x0,t['Inject'])(e[_0x468d3c(0x133)])),k(0x2,(0x0,t[_0x468d3c(0x1f8)])(e['FormulaLastValuePersistenceService']))],Q);function ze(_0x5b0045,_0x5c4287){const _0x387f62=_0x468d3c;return(_0x5b0045==null?void 0x0:_0x5b0045['v'])===_0x5c4287['v']&&(_0x5b0045==null?void 0x0:_0x5b0045['t'])===_0x5c4287['t']&&(_0x5b0045==null?void 0x0:_0x5b0045[_0x387f62(0x13b)])===_0x5c4287[_0x387f62(0x13b)];}let $=class extends t['Plugin']{constructor(_0x14aa0a=Fe,_0x2116e1,_0x579714,_0x30c070){const _0x5ae62d=_0x468d3c;super(),this['_config']=_0x14aa0a,this['_injector']=_0x2116e1,this[_0x5ae62d(0x14c)]=_0x579714,this[_0x5ae62d(0x1af)]=_0x30c070;let {..._0x4e6b79}=(0x0,t['merge'])({},Fe,this[_0x5ae62d(0x1ff)]);this[_0x5ae62d(0x1af)]['setConfig'](_0x5ae62d(0x148),_0x4e6b79);}[_0x468d3c(0x1a0)](){const _0x451351=_0x468d3c;this[_0x451351(0x13f)][_0x451351(0x1cb)]([O]),this['_injector'][_0x451351(0x1cb)]([j]),this['_injector'][_0x451351(0x1cb)]([X]),this[_0x451351(0x13f)]['add']([Y]),this[_0x451351(0x13f)][_0x451351(0x1cb)]([Q]),this[_0x451351(0x13f)]['add']([Z]),(0x0,t['touchDependencies'])(this[_0x451351(0x13f)],[[O],[X],[Y],[Q],[Z]]),[F,I,L,R,z,B,V,H,U,W][_0x451351(0x12d)](_0x44cf59=>this['disposeWithMe'](this[_0x451351(0x14c)]['registerCommand'](_0x44cf59)));}};D($,_0x468d3c(0xe5),o),D($,'packageName',Ne),D($,_0x468d3c(0x10d),Pe),D($,_0x468d3c(0x1f7),t[_0x468d3c(0x16a)][_0x468d3c(0x12e)]),$=A([(0x0,t[_0x468d3c(0x1c0)])(a['UniverLicensePlugin'],e['UniverProFormulaEnginePlugin'],n[_0x468d3c(0x1d7)]),k(0x1,(0x0,t[_0x468d3c(0x1f8)])(t[_0x468d3c(0x200)])),k(0x2,t[_0x468d3c(0x20e)]),k(0x3,t['IConfigService'])],$),exports[_0x468d3c(0x1d9)]=W,exports[_0x468d3c(0x124)]=s,exports['DOC_FORMULA_OBJECT_REPLACEMENT']='',exports[_0x468d3c(0x1ae)]=o,exports[_0x468d3c(0x1e1)]=0x1,Object[_0x468d3c(0xf9)](exports,_0x468d3c(0x177),{'enumerable':!0x0,'get':function(){return Z;}}),Object['defineProperty'](exports,_0x468d3c(0x1e3),{'enumerable':!0x0,'get':function(){return Y;}}),exports[_0x468d3c(0x16e)]=O,Object[_0x468d3c(0xf9)](exports,_0x468d3c(0x1bd),{'enumerable':!0x0,'get':function(){return X;}}),exports['DocFormulaResultStatus']=ve,Object[_0x468d3c(0xf9)](exports,_0x468d3c(0x160),{'enumerable':!0x0,'get':function(){return j;}}),exports[_0x468d3c(0x117)]=z,exports[_0x468d3c(0x204)]=m,exports['RemoveDocFormulaCommand']=H,exports[_0x468d3c(0x112)]=I,exports[_0x468d3c(0xe1)]=U,exports[_0x468d3c(0xf0)]=R,exports[_0x468d3c(0x1fb)]=F,exports[_0x468d3c(0x212)]=V,exports[_0x468d3c(0x203)]=L,Object[_0x468d3c(0xf9)](exports,_0x468d3c(0x1a2),{'enumerable':!0x0,'get':function(){return $;}}),exports[_0x468d3c(0x1bf)]=B,exports[_0x468d3c(0xe3)]=ie,exports['buildInsertDocFormulaActions']=te,exports[_0x468d3c(0x132)]=h,exports['buildUpdateDocFormulaActions']=ne,exports['createEmptyDocFormulaResource']=c,exports[_0x468d3c(0x122)]=Ie,exports[_0x468d3c(0x1b6)]=_,exports['isDocFormulaConfig']=u,exports['isDocFormulaRange']=g,exports['isDocFormulaResource']=l,exports[_0x468d3c(0x1b1)]=d;
package/lib/es/facade.js CHANGED
@@ -1 +1 @@
1
- var _0x5d57b4=_0x1963;(function(_0x1b3cab,_0x2e81f7){var _0x50e2ed=_0x1963,_0x1082e3=_0x1b3cab();while(!![]){try{var _0x29f1af=parseInt(_0x50e2ed(0x1c7))/0x1+-parseInt(_0x50e2ed(0x1cb))/0x2+-parseInt(_0x50e2ed(0x19c))/0x3+parseInt(_0x50e2ed(0x1bd))/0x4+-parseInt(_0x50e2ed(0x1a2))/0x5+-parseInt(_0x50e2ed(0x1c5))/0x6*(parseInt(_0x50e2ed(0x1b0))/0x7)+parseInt(_0x50e2ed(0x1a4))/0x8;if(_0x29f1af===_0x2e81f7)break;else _0x1082e3['push'](_0x1082e3['shift']());}catch(_0x58b34d){_0x1082e3['push'](_0x1082e3['shift']());}}}(_0x4518,0xe4c56));import{ConvertDocFormulaToTextCommand as _0x75c1fa,DocFormulaDisplayTextService as _0x515404,DocFormulaModel as _0x28e2b2,DocFormulaService as _0x5786f1,InsertDocFormulaCommand as _0x34e369,RemoveDocFormulaCommand as _0x46c0d2,ReplaceDocFormulaWithTextCommand as _0xd88033,SetDocFormulaNumberFormatCommand as _0x55a52b,UpdateDocFormulaCommand as _0x23c539,isDocFormulaRange as _0x45ace4}from'@univerjs-pro/docs-formula';import{ICommandService as _0x59cbd8,IResourceLoaderService as _0x547241,IUniverInstanceService as _0x4db722,Inject as _0x6db6f9,UniverInstanceType as _0x5a957e}from'@univerjs/core';import{FDocument as _0x52274f,FDocumentParagraph as _0x41def4,FDocumentTextRange as _0x16f6e2}from'@univerjs/docs/facade';function v(_0x2ce1d0,_0x53502a){return function(_0x42a6b5,_0x13acab){_0x53502a(_0x42a6b5,_0x13acab,_0x2ce1d0);};}function y(_0x18067f,_0x5c5b4c,_0x3bd0cc,_0x3b50e8){var _0x53ce8b=_0x1963,_0x4c03da=arguments[_0x53ce8b(0x1a6)],_0x2a532c=_0x4c03da<0x3?_0x5c5b4c:_0x3b50e8===null?_0x3b50e8=Object[_0x53ce8b(0x1ac)](_0x5c5b4c,_0x3bd0cc):_0x3b50e8,_0x155aab;if(typeof Reflect==_0x53ce8b(0x1bb)&&typeof Reflect[_0x53ce8b(0x1b9)]==_0x53ce8b(0x1d6))_0x2a532c=Reflect[_0x53ce8b(0x1b9)](_0x18067f,_0x5c5b4c,_0x3bd0cc,_0x3b50e8);else{for(var _0x4ddaec=_0x18067f[_0x53ce8b(0x1a6)]-0x1;_0x4ddaec>=0x0;_0x4ddaec--)(_0x155aab=_0x18067f[_0x4ddaec])&&(_0x2a532c=(_0x4c03da<0x3?_0x155aab(_0x2a532c):_0x4c03da>0x3?_0x155aab(_0x5c5b4c,_0x3bd0cc,_0x2a532c):_0x155aab(_0x5c5b4c,_0x3bd0cc))||_0x2a532c);}return _0x4c03da>0x3&&_0x2a532c&&Object['defineProperty'](_0x5c5b4c,_0x3bd0cc,_0x2a532c),_0x2a532c;}let b=class{constructor(_0x53787e,_0x1ddb36,_0x3c14e1,_0x84701f,_0x539f22,_0x53e79f){var _0x4d1aa0=_0x1963;this[_0x4d1aa0(0x194)]=_0x53787e,this[_0x4d1aa0(0x193)]=_0x1ddb36,this['_commandService']=_0x3c14e1,this['_model']=_0x84701f,this[_0x4d1aa0(0x1cd)]=_0x539f22,this[_0x4d1aa0(0x1a3)]=_0x53e79f;}[_0x5d57b4(0x1a5)](){var _0x49a100=_0x5d57b4;return this[_0x49a100(0x193)];}['getRange'](){var _0x4f5447=_0x5d57b4;let _0x2bb025=this[_0x4f5447(0x197)]();return _0x2bb025?{'endOffset':_0x2bb025[_0x4f5447(0x1bc)]+0x1,'rangeId':_0x2bb025[_0x4f5447(0x1a8)],'startOffset':_0x2bb025[_0x4f5447(0x1b6)]}:null;}[_0x5d57b4(0x1d8)](){var _0x5d45a9=_0x5d57b4,_0x1a0349;return((_0x1a0349=this[_0x5d45a9(0x1db)][_0x5d45a9(0x1d8)](this['_unitId'],this[_0x5d45a9(0x193)]))==null?void 0x0:_0x1a0349['formula'])??'';}[_0x5d57b4(0x1be)](){var _0x3bd94b=_0x5d57b4;return this['_model'][_0x3bd94b(0x1d8)](this[_0x3bd94b(0x194)],this['_rangeId'])??null;}[_0x5d57b4(0x1dc)](){var _0x68ca8e=_0x5d57b4;return this[_0x68ca8e(0x1cd)][_0x68ca8e(0x1dc)]({'unitId':this[_0x68ca8e(0x194)],'rangeId':this['_rangeId']})??null;}['describe'](){var _0x304515=_0x5d57b4;let _0x9695f9=this[_0x304515(0x1af)](),_0x5858d4=this['getConfig'](),_0x5a2e1c=this['getResult']();return!_0x9695f9||!_0x5858d4||!_0x5a2e1c?null:{..._0x9695f9,'config':_0x5858d4,'formula':_0x5858d4[_0x304515(0x1b4)],'result':_0x5a2e1c,'type':_0x304515(0x1b4)};}[_0x5d57b4(0x1d9)](_0x46b97d){var _0x377e9a=_0x5d57b4;return this['_commandService'][_0x377e9a(0x198)](_0x23c539['id'],{'externalReferences':_0x46b97d[_0x377e9a(0x1ab)],'formula':_0x46b97d[_0x377e9a(0x1b4)],'numberFormat':_0x46b97d[_0x377e9a(0x19a)],'rangeId':this[_0x377e9a(0x193)],'unitId':this['_unitId']});}['setNumberFormat'](_0x48168c){var _0x4dab7c=_0x5d57b4;return this[_0x4dab7c(0x1b8)][_0x4dab7c(0x198)](_0x55a52b['id'],{'numberFormat':_0x48168c,'rangeId':this[_0x4dab7c(0x193)],'unitId':this['_unitId']});}[_0x5d57b4(0x1de)](){var _0x1810ea=_0x5d57b4;return this[_0x1810ea(0x1b8)]['syncExecuteCommand'](_0x46c0d2['id'],{'rangeId':this[_0x1810ea(0x193)],'unitId':this['_unitId']});}[_0x5d57b4(0x1c1)](_0x10e875){var _0x515413=_0x5d57b4;return this[_0x515413(0x1b8)][_0x515413(0x198)](_0xd88033['id'],{'rangeId':this['_rangeId'],'text':_0x10e875,'unitId':this[_0x515413(0x194)]});}['convertToText'](){var _0x1f6219=_0x5d57b4;return this[_0x1f6219(0x1b8)][_0x1f6219(0x198)](_0x75c1fa['id'],{'rangeId':this[_0x1f6219(0x193)],'unitId':this[_0x1f6219(0x194)]});}[_0x5d57b4(0x197)](){var _0x272173=_0x5d57b4,_0x3d942;let _0x153aa0=this[_0x272173(0x1a3)][_0x272173(0x1a7)](this['_unitId'],_0x5a957e[_0x272173(0x19d)]);return _0x153aa0==null||(_0x3d942=_0x153aa0[_0x272173(0x1aa)]()['body'])==null||(_0x3d942=_0x3d942['customRanges'])==null?void 0x0:_0x3d942[_0x272173(0x1a9)](_0x153ee3=>_0x153ee3[_0x272173(0x1a8)]===this[_0x272173(0x193)]&&_0x45ace4(_0x153ee3));}};b=y([v(0x2,_0x59cbd8),v(0x3,_0x6db6f9(_0x28e2b2)),v(0x4,_0x6db6f9(_0x5786f1)),v(0x5,_0x4db722)],b);function x(_0x534e2b){'@babel/helpers - typeof';var _0x4263ce=_0x5d57b4;return x=typeof Symbol==_0x4263ce(0x1d6)&&typeof Symbol[_0x4263ce(0x19e)]=='symbol'?function(_0x712503){return typeof _0x712503;}:function(_0x1ea102){var _0x598169=_0x4263ce;return _0x1ea102&&typeof Symbol==_0x598169(0x1d6)&&_0x1ea102[_0x598169(0x1d2)]===Symbol&&_0x1ea102!==Symbol[_0x598169(0x1c4)]?'symbol':typeof _0x1ea102;},x(_0x534e2b);}function _0x1963(_0x4e07d3,_0x4f0c9f){_0x4e07d3=_0x4e07d3-0x193;var _0x451819=_0x4518();var _0x1963b1=_0x451819[_0x4e07d3];return _0x1963b1;}function S(_0x17feaf,_0x80c196){var _0x1abbc8=_0x5d57b4;if(x(_0x17feaf)!=_0x1abbc8(0x1bb)||!_0x17feaf)return _0x17feaf;var _0x289f0e=_0x17feaf[Symbol['toPrimitive']];if(_0x289f0e!==void 0x0){var _0x4565e8=_0x289f0e[_0x1abbc8(0x1ae)](_0x17feaf,_0x80c196||_0x1abbc8(0x196));if(x(_0x4565e8)!=_0x1abbc8(0x1bb))return _0x4565e8;throw TypeError(_0x1abbc8(0x1b7));}return(_0x80c196==='string'?String:Number)(_0x17feaf);}function C(_0x582b65){var _0xe32d27=_0x5d57b4,_0x2beafc=S(_0x582b65,_0xe32d27(0x1b1));return x(_0x2beafc)==_0xe32d27(0x1df)?_0x2beafc:_0x2beafc+'';}function w(_0x4d6902,_0xc70968,_0x2eea7f){var _0x59e956=_0x5d57b4;return(_0xc70968=C(_0xc70968))in _0x4d6902?Object[_0x59e956(0x1c6)](_0x4d6902,_0xc70968,{'value':_0x2eea7f,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x4d6902[_0xc70968]=_0x2eea7f,_0x4d6902;}var T=class extends _0x52274f{constructor(..._0x268497){var _0x536a34=_0x5d57b4;super(..._0x268497),w(this,'_docsFormulaCommandService',void 0x0),w(this,_0x536a34(0x1d5),void 0x0),w(this,_0x536a34(0x1a1),void 0x0),w(this,'_docsFormulaResourceLoaderService',void 0x0);}['_initialize'](_0x54d07d){var _0x2893d8=_0x5d57b4;this[_0x2893d8(0x1a0)]=_0x54d07d['get'](_0x59cbd8),this[_0x2893d8(0x1d5)]=_0x54d07d[_0x2893d8(0x1ba)](_0x515404),this['_docsFormulaModel']=_0x54d07d['get'](_0x28e2b2),this[_0x2893d8(0x1b5)]=_0x54d07d['get'](_0x547241);}[_0x5d57b4(0x1ca)](){var _0x517859=_0x5d57b4;return this['_getCompleteRanges']()[_0x517859(0x1da)](_0x237faf=>this[_0x517859(0x1b3)](_0x237faf[_0x517859(0x1a8)]));}[_0x5d57b4(0x1d8)](_0x262fb3){var _0x404c4e=_0x5d57b4;return this[_0x404c4e(0x1d0)]()[_0x404c4e(0x1ce)](_0x11ee78=>_0x11ee78[_0x404c4e(0x1a8)]===_0x262fb3)?this[_0x404c4e(0x1b3)](_0x262fb3):null;}['getFormulaAt'](_0x399b7a){var _0x4703a3=_0x5d57b4;let _0x3dc992=this['_getCompleteRanges']()[_0x4703a3(0x1a9)](_0x3f9a5e=>_0x3f9a5e[_0x4703a3(0x1b6)]<=_0x399b7a&&_0x399b7a<=_0x3f9a5e[_0x4703a3(0x1bc)]);return _0x3dc992?this[_0x4703a3(0x1b3)](_0x3dc992['rangeId']):null;}['saveFormulaDisplayTextSnapshot'](){var _0x30190c=_0x5d57b4;let _0x5f4948=this['_docsFormulaResourceLoaderService'][_0x30190c(0x1dd)](this['id']);if(!_0x5f4948)throw Error(_0x30190c(0x1c8)+this['id']+_0x30190c(0x19f));return this[_0x30190c(0x1d5)][_0x30190c(0x1d1)](_0x5f4948);}[_0x5d57b4(0x1ad)](_0x2b6e96){var _0x345889=_0x5d57b4;return this[_0x345889(0x1c9)]({'externalReferences':_0x2b6e96[_0x345889(0x1ab)],'formula':_0x2b6e96[_0x345889(0x1b4)],'numberFormat':_0x2b6e96[_0x345889(0x19a)],'target':{'type':'range','startOffset':_0x2b6e96[_0x345889(0x1cf)],'endOffset':_0x2b6e96[_0x345889(0x1d3)]},'unitId':this['getId']()});}[_0x5d57b4(0x1c9)](_0x1777cc){var _0x54fc2a=_0x5d57b4;let _0x3657e6=this[_0x54fc2a(0x1a0)][_0x54fc2a(0x198)](_0x34e369['id'],_0x1777cc);return _0x3657e6?this[_0x54fc2a(0x1b3)](_0x3657e6[_0x54fc2a(0x1a8)]):null;}['_getCompleteRanges'](){var _0x472825=_0x5d57b4,_0x34e2b0;let _0x53be54=this[_0x472825(0x1a1)]['getFormulas'](this['getId']());return((_0x34e2b0=this[_0x472825(0x19b)]('')['customRanges'])==null?void 0x0:_0x34e2b0[_0x472825(0x1c0)](_0x1bb8fa=>_0x45ace4(_0x1bb8fa)&&_0x53be54[_0x1bb8fa[_0x472825(0x1a8)]]!=null))??[];}[_0x5d57b4(0x1b3)](_0x57477c){var _0x48daac=_0x5d57b4;return this['_injector'][_0x48daac(0x1c2)](b,this[_0x48daac(0x1a5)](),_0x57477c);}};function _0x4518(){var _0x303e97=['_createFormula','formula','_docsFormulaResourceLoaderService','startIndex','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','_commandService','decorate','get','object','endIndex','6717788CIeGFT','getConfig','paragraph','filter','replaceWithText','createInstance','_document','prototype','6vgMwjJ','defineProperty','1563659TcSili','Document\x20','_insert','getFormulas','2789530DvWApG','_initialize','_service','some','startOffset','_getCompleteRanges','degradeDocumentData','constructor','endOffset','_injector','_docsFormulaDisplayTextService','function','end','getFormula','update','map','_model','getResult','saveUnit','remove','symbol','_rangeId','_unitId','extend','default','_getCustomRange','syncExecuteCommand','replaceWithFormula','numberFormat','getBody','1002327qNmzgs','UNIVER_DOC','iterator','\x20could\x20not\x20be\x20serialized.','_docsFormulaCommandService','_docsFormulaModel','602045VgLlpK','_univerInstanceService','5408536jJwRLS','getId','length','getUnit','rangeId','find','getSnapshot','externalReferences','getOwnPropertyDescriptor','insertFormula','call','getRange','7929908GOTXjC','string','appendFormula'];_0x4518=function(){return _0x303e97;};return _0x4518();}_0x52274f['extend'](T);var E=class extends _0x41def4{constructor(..._0x301a4a){var _0x14dd70=_0x5d57b4;super(..._0x301a4a),w(this,_0x14dd70(0x1a0),void 0x0);}[_0x5d57b4(0x1cc)](_0x2faa00){var _0x359d23=_0x5d57b4;this[_0x359d23(0x1a0)]=_0x2faa00['get'](_0x59cbd8);}['insertFormula'](_0x1a7599,_0xc36d8f,_0x273087={}){var _0x4cd2d7=_0x5d57b4;return this[_0x4cd2d7(0x1c9)](_0x1a7599,_0xc36d8f,_0x273087);}[_0x5d57b4(0x1b2)](_0x1d7c49,_0x586f47={}){var _0x5111cb=_0x5d57b4;return this[_0x5111cb(0x1c9)](_0x5111cb(0x1d7),_0x1d7c49,_0x586f47);}[_0x5d57b4(0x1c9)](_0x587682,_0x3ba007,_0x5424c4){var _0x5d5e1e=_0x5d57b4;if(this['getSegmentId']())return null;let _0x1dc49e={'externalReferences':_0x5424c4[_0x5d5e1e(0x1ab)],'formula':_0x3ba007,'numberFormat':_0x5424c4['numberFormat'],'target':{'type':_0x5d5e1e(0x1bf),'paragraphId':this['getId'](),'position':_0x587682},'unitId':this[_0x5d5e1e(0x1c3)]['getId']()},_0x4e39be=this[_0x5d5e1e(0x1a0)][_0x5d5e1e(0x198)](_0x34e369['id'],_0x1dc49e);return _0x4e39be?this[_0x5d5e1e(0x1d4)]['createInstance'](b,this['_document'][_0x5d5e1e(0x1a5)](),_0x4e39be['rangeId']):null;}};_0x41def4['extend'](E);var D=class extends _0x16f6e2{constructor(..._0x25ea9d){var _0x380f17=_0x5d57b4;super(..._0x25ea9d),w(this,_0x380f17(0x1a0),void 0x0);}[_0x5d57b4(0x1cc)](_0x3c4d83){var _0x4f3993=_0x5d57b4;this['_docsFormulaCommandService']=_0x3c4d83[_0x4f3993(0x1ba)](_0x59cbd8);}[_0x5d57b4(0x199)](_0x5aa9ae,_0x2457cf={}){var _0x2dac1c=_0x5d57b4;let {endOffset:_0x37c9bc,segmentId:_0x4bf19b,startOffset:_0x13202e}=this[_0x2dac1c(0x1af)]();return _0x4bf19b?null:this[_0x2dac1c(0x1c9)](_0x13202e,_0x37c9bc,_0x5aa9ae,_0x2457cf);}[_0x5d57b4(0x1c9)](_0x71818f,_0x3304ad,_0x1e57e7,_0x128fdd){var _0x4cf90a=_0x5d57b4;let _0x204f24={'externalReferences':_0x128fdd[_0x4cf90a(0x1ab)],'formula':_0x1e57e7,'numberFormat':_0x128fdd['numberFormat'],'target':{'type':'range','startOffset':_0x71818f,'endOffset':_0x3304ad},'unitId':this[_0x4cf90a(0x1c3)][_0x4cf90a(0x1a5)]()},_0x5c67fb=this[_0x4cf90a(0x1a0)][_0x4cf90a(0x198)](_0x34e369['id'],_0x204f24);return _0x5c67fb?this[_0x4cf90a(0x1d4)][_0x4cf90a(0x1c2)](b,this[_0x4cf90a(0x1c3)][_0x4cf90a(0x1a5)](),_0x5c67fb[_0x4cf90a(0x1a8)]):null;}};_0x16f6e2[_0x5d57b4(0x195)](D);export{b as FDocumentFormula};
1
+ var _0x43e278=_0x32db;(function(_0x4072a8,_0x5c7423){var _0x27c94b=_0x32db,_0x12e726=_0x4072a8();while(!![]){try{var _0x534714=parseInt(_0x27c94b(0x17a))/0x1*(parseInt(_0x27c94b(0x190))/0x2)+parseInt(_0x27c94b(0x188))/0x3+parseInt(_0x27c94b(0x1ae))/0x4+-parseInt(_0x27c94b(0x1a4))/0x5+-parseInt(_0x27c94b(0x163))/0x6*(parseInt(_0x27c94b(0x195))/0x7)+parseInt(_0x27c94b(0x17d))/0x8+-parseInt(_0x27c94b(0x17c))/0x9*(parseInt(_0x27c94b(0x1a7))/0xa);if(_0x534714===_0x5c7423)break;else _0x12e726['push'](_0x12e726['shift']());}catch(_0x2ecb5e){_0x12e726['push'](_0x12e726['shift']());}}}(_0x5b6c,0x838c4));import{ConvertDocFormulaToTextCommand as _0x334f28,DocFormulaDisplayTextService as _0x29119a,DocFormulaModel as _0x352050,DocFormulaService as _0x285cca,InsertDocFormulaCommand as _0x4cef27,RemoveDocFormulaCommand as _0x280b1f,ReplaceDocFormulaWithTextCommand as _0x223a60,SetDocFormulaNumberFormatCommand as _0x1bb1a3,UpdateDocFormulaCommand as _0x236518,isDocFormulaRange as _0x3eb00d}from'@univerjs-pro/docs-formula';import{ICommandService as _0x5a6335,IResourceLoaderService as _0x2e4e88,IUniverInstanceService as _0x2b5182,Inject as _0x44bf6b,UniverInstanceType as _0x32ec54}from'@univerjs/core';import{FDocument as _0x9be5d2,FDocumentParagraph as _0x5f3dce,FDocumentTextRange as _0x2f9447}from'@univerjs/docs/facade';function v(_0x59e430,_0x3bde68){return function(_0x3f63d8,_0x358c97){_0x3bde68(_0x3f63d8,_0x358c97,_0x59e430);};}function y(_0x272e2f,_0x1f8d57,_0x23c313,_0x2d66e8){var _0x18fc56=_0x32db,_0x4396e9=arguments['length'],_0x3932e4=_0x4396e9<0x3?_0x1f8d57:_0x2d66e8===null?_0x2d66e8=Object['getOwnPropertyDescriptor'](_0x1f8d57,_0x23c313):_0x2d66e8,_0x4167fb;if(typeof Reflect==_0x18fc56(0x189)&&typeof Reflect[_0x18fc56(0x187)]==_0x18fc56(0x173))_0x3932e4=Reflect['decorate'](_0x272e2f,_0x1f8d57,_0x23c313,_0x2d66e8);else{for(var _0x2a2988=_0x272e2f[_0x18fc56(0x1a8)]-0x1;_0x2a2988>=0x0;_0x2a2988--)(_0x4167fb=_0x272e2f[_0x2a2988])&&(_0x3932e4=(_0x4396e9<0x3?_0x4167fb(_0x3932e4):_0x4396e9>0x3?_0x4167fb(_0x1f8d57,_0x23c313,_0x3932e4):_0x4167fb(_0x1f8d57,_0x23c313))||_0x3932e4);}return _0x4396e9>0x3&&_0x3932e4&&Object[_0x18fc56(0x1aa)](_0x1f8d57,_0x23c313,_0x3932e4),_0x3932e4;}let b=class{constructor(_0x42c7b3,_0x328197,_0x1bebed,_0x51aa71,_0x52a086,_0x111919){var _0x4483c6=_0x32db;this['_unitId']=_0x42c7b3,this[_0x4483c6(0x17b)]=_0x328197,this[_0x4483c6(0x184)]=_0x1bebed,this[_0x4483c6(0x167)]=_0x51aa71,this[_0x4483c6(0x174)]=_0x52a086,this[_0x4483c6(0x170)]=_0x111919;}[_0x43e278(0x176)](){var _0x29b724=_0x43e278;return this[_0x29b724(0x17b)];}[_0x43e278(0x171)](){var _0x495dcd=_0x43e278;let _0x52a55f=this[_0x495dcd(0x181)]();return _0x52a55f?{'endOffset':_0x52a55f[_0x495dcd(0x172)]+0x1,'rangeId':_0x52a55f['rangeId'],'startOffset':_0x52a55f[_0x495dcd(0x192)]}:null;}[_0x43e278(0x19d)](){var _0x5cfe4b=_0x43e278,_0x1a3291;return((_0x1a3291=this[_0x5cfe4b(0x167)][_0x5cfe4b(0x19d)](this['_unitId'],this['_rangeId']))==null?void 0x0:_0x1a3291[_0x5cfe4b(0x16e)])??'';}[_0x43e278(0x18f)](){var _0x3e6f95=_0x43e278;return this[_0x3e6f95(0x167)]['getFormula'](this[_0x3e6f95(0x168)],this[_0x3e6f95(0x17b)])??null;}['getResult'](){var _0x529f13=_0x43e278;return this[_0x529f13(0x174)][_0x529f13(0x16b)]({'unitId':this[_0x529f13(0x168)],'rangeId':this[_0x529f13(0x17b)]})??null;}[_0x43e278(0x164)](){var _0xfc804e=_0x43e278;let _0x49caf7=this[_0xfc804e(0x171)](),_0x162171=this['getConfig'](),_0x386d07=this[_0xfc804e(0x16b)]();return!_0x49caf7||!_0x162171||!_0x386d07?null:{..._0x49caf7,'config':_0x162171,'formula':_0x162171[_0xfc804e(0x16e)],'result':_0x386d07,'type':_0xfc804e(0x16e)};}['update'](_0x2a59f4){var _0x2547de=_0x43e278;return this[_0x2547de(0x184)]['syncExecuteCommand'](_0x236518['id'],{'externalReferences':_0x2a59f4[_0x2547de(0x1a3)],'formula':_0x2a59f4['formula'],'numberFormat':_0x2a59f4[_0x2547de(0x1a1)],'rangeId':this[_0x2547de(0x17b)],'unitId':this[_0x2547de(0x168)]});}['setNumberFormat'](_0x38fb22){var _0x472b87=_0x43e278;return this[_0x472b87(0x184)][_0x472b87(0x1b0)](_0x1bb1a3['id'],{'numberFormat':_0x38fb22,'rangeId':this[_0x472b87(0x17b)],'unitId':this[_0x472b87(0x168)]});}[_0x43e278(0x19a)](){var _0x3e8fca=_0x43e278;return this['_commandService'][_0x3e8fca(0x1b0)](_0x280b1f['id'],{'rangeId':this[_0x3e8fca(0x17b)],'unitId':this[_0x3e8fca(0x168)]});}[_0x43e278(0x1a2)](_0x1e6e89){var _0x4b3cbb=_0x43e278;return this[_0x4b3cbb(0x184)][_0x4b3cbb(0x1b0)](_0x223a60['id'],{'rangeId':this[_0x4b3cbb(0x17b)],'text':_0x1e6e89,'unitId':this[_0x4b3cbb(0x168)]});}['convertToText'](){var _0xc6920c=_0x43e278;return this[_0xc6920c(0x184)][_0xc6920c(0x1b0)](_0x334f28['id'],{'rangeId':this[_0xc6920c(0x17b)],'unitId':this[_0xc6920c(0x168)]});}[_0x43e278(0x181)](){var _0x2c44b8=_0x43e278,_0x451a14;let _0x5addea=this[_0x2c44b8(0x170)][_0x2c44b8(0x1ad)](this[_0x2c44b8(0x168)],_0x32ec54['UNIVER_DOC']);return _0x5addea==null||(_0x451a14=_0x5addea[_0x2c44b8(0x1b2)]()[_0x2c44b8(0x1a5)])==null||(_0x451a14=_0x451a14[_0x2c44b8(0x1ac)])==null?void 0x0:_0x451a14[_0x2c44b8(0x169)](_0x2660b7=>_0x2660b7[_0x2c44b8(0x19c)]===this[_0x2c44b8(0x17b)]&&_0x3eb00d(_0x2660b7));}};function _0x5b6c(){var _0x514806=['_docsFormulaCommandService','rangeId','getFormula','getSegmentId','_createFormula','filter','numberFormat','replaceWithText','externalReferences','2744600LNFOqv','body','some','10Mtykqb','length','getBody','defineProperty','range','customRanges','getUnit','2215532KmTEWU','paragraph','syncExecuteCommand','getFormulaAt','getSnapshot','12NCNdzi','describe','getFormulas','_document','_model','_unitId','find','_docsFormulaModel','getResult','map','end','formula','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','_univerInstanceService','getRange','endIndex','function','_service','prototype','getId','extend','iterator','createInstance','107957IviErs','_rangeId','5639661qyREGU','3415512HxqlnD','toPrimitive','_docsFormulaResourceLoaderService','saveFormulaDisplayTextSnapshot','_getCustomRange','_injector','symbol','_commandService','_insert','startOffset','decorate','2280900KsIlUA','object','default','_docsFormulaDisplayTextService','_initialize','_getCompleteRanges','saveUnit','getConfig','18gdoxcU','insertFormula','startIndex','degradeDocumentData','call','3494281LsAVKu','endOffset','replaceWithFormula','constructor','get','remove'];_0x5b6c=function(){return _0x514806;};return _0x5b6c();}function _0x32db(_0x4eefbf,_0x4bb507){_0x4eefbf=_0x4eefbf-0x163;var _0x5b6cd3=_0x5b6c();var _0x32db03=_0x5b6cd3[_0x4eefbf];return _0x32db03;}b=y([v(0x2,_0x5a6335),v(0x3,_0x44bf6b(_0x352050)),v(0x4,_0x44bf6b(_0x285cca)),v(0x5,_0x2b5182)],b);function x(_0x1a9e30){'@babel/helpers - typeof';var _0x43fa81=_0x43e278;return x=typeof Symbol=='function'&&typeof Symbol[_0x43fa81(0x178)]=='symbol'?function(_0xd2b72d){return typeof _0xd2b72d;}:function(_0x22386d){var _0x34819d=_0x43fa81;return _0x22386d&&typeof Symbol=='function'&&_0x22386d[_0x34819d(0x198)]===Symbol&&_0x22386d!==Symbol[_0x34819d(0x175)]?_0x34819d(0x183):typeof _0x22386d;},x(_0x1a9e30);}function S(_0x1e1b67,_0x322107){var _0x4c02a9=_0x43e278;if(x(_0x1e1b67)!=_0x4c02a9(0x189)||!_0x1e1b67)return _0x1e1b67;var _0xc425a1=_0x1e1b67[Symbol[_0x4c02a9(0x17e)]];if(_0xc425a1!==void 0x0){var _0x134350=_0xc425a1[_0x4c02a9(0x194)](_0x1e1b67,_0x322107||_0x4c02a9(0x18a));if(x(_0x134350)!=_0x4c02a9(0x189))return _0x134350;throw TypeError(_0x4c02a9(0x16f));}return(_0x322107==='string'?String:Number)(_0x1e1b67);}function C(_0x5bfd00){var _0x2374ec=_0x43e278,_0x428bd7=S(_0x5bfd00,'string');return x(_0x428bd7)==_0x2374ec(0x183)?_0x428bd7:_0x428bd7+'';}function w(_0x3e2484,_0x5c5c82,_0x4fb589){var _0x53b8ba=_0x43e278;return(_0x5c5c82=C(_0x5c5c82))in _0x3e2484?Object[_0x53b8ba(0x1aa)](_0x3e2484,_0x5c5c82,{'value':_0x4fb589,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x3e2484[_0x5c5c82]=_0x4fb589,_0x3e2484;}var T=class extends _0x9be5d2{constructor(..._0x43b413){var _0x1a54fa=_0x43e278;super(..._0x43b413),w(this,'_docsFormulaCommandService',void 0x0),w(this,_0x1a54fa(0x18b),void 0x0),w(this,_0x1a54fa(0x16a),void 0x0),w(this,_0x1a54fa(0x17f),void 0x0);}[_0x43e278(0x18c)](_0x51ac0e){var _0x4bed7c=_0x43e278;this[_0x4bed7c(0x19b)]=_0x51ac0e['get'](_0x5a6335),this[_0x4bed7c(0x18b)]=_0x51ac0e[_0x4bed7c(0x199)](_0x29119a),this[_0x4bed7c(0x16a)]=_0x51ac0e[_0x4bed7c(0x199)](_0x352050),this[_0x4bed7c(0x17f)]=_0x51ac0e[_0x4bed7c(0x199)](_0x2e4e88);}[_0x43e278(0x165)](){var _0x4017b0=_0x43e278;return this[_0x4017b0(0x18d)]()[_0x4017b0(0x16c)](_0x4f691c=>this[_0x4017b0(0x19f)](_0x4f691c[_0x4017b0(0x19c)]));}[_0x43e278(0x19d)](_0x39197a){var _0x4dd232=_0x43e278;return this[_0x4dd232(0x18d)]()[_0x4dd232(0x1a6)](_0x36b4ab=>_0x36b4ab['rangeId']===_0x39197a)?this[_0x4dd232(0x19f)](_0x39197a):null;}[_0x43e278(0x1b1)](_0x18a8c5){var _0x5be941=_0x43e278;let _0x543144=this['_getCompleteRanges']()['find'](_0x1e74dd=>_0x1e74dd[_0x5be941(0x192)]<=_0x18a8c5&&_0x18a8c5<=_0x1e74dd[_0x5be941(0x172)]);return _0x543144?this[_0x5be941(0x19f)](_0x543144[_0x5be941(0x19c)]):null;}[_0x43e278(0x180)](){var _0x5af2f7=_0x43e278;let _0x17f8e5=this['_docsFormulaResourceLoaderService'][_0x5af2f7(0x18e)](this['id']);if(!_0x17f8e5)throw Error('Document\x20'+this['id']+'\x20could\x20not\x20be\x20serialized.');return this[_0x5af2f7(0x18b)][_0x5af2f7(0x193)](_0x17f8e5);}[_0x43e278(0x191)](_0x1a0400){var _0x347b6e=_0x43e278;return this[_0x347b6e(0x185)]({'externalReferences':_0x1a0400['externalReferences'],'formula':_0x1a0400[_0x347b6e(0x16e)],'numberFormat':_0x1a0400[_0x347b6e(0x1a1)],'target':{'type':'range','startOffset':_0x1a0400[_0x347b6e(0x186)],'endOffset':_0x1a0400[_0x347b6e(0x196)]},'unitId':this[_0x347b6e(0x176)]()});}[_0x43e278(0x185)](_0x3bd1dd){var _0x1f769c=_0x43e278;let _0x37e264=this[_0x1f769c(0x19b)][_0x1f769c(0x1b0)](_0x4cef27['id'],_0x3bd1dd);return _0x37e264?this['_createFormula'](_0x37e264[_0x1f769c(0x19c)]):null;}[_0x43e278(0x18d)](){var _0x67f993=_0x43e278,_0x1b641e;let _0xd8b92d=this[_0x67f993(0x16a)][_0x67f993(0x165)](this[_0x67f993(0x176)]());return((_0x1b641e=this[_0x67f993(0x1a9)]('')[_0x67f993(0x1ac)])==null?void 0x0:_0x1b641e[_0x67f993(0x1a0)](_0x2c4b51=>_0x3eb00d(_0x2c4b51)&&_0xd8b92d[_0x2c4b51['rangeId']]!=null))??[];}[_0x43e278(0x19f)](_0xd52f63){var _0x5da3df=_0x43e278;return this[_0x5da3df(0x182)][_0x5da3df(0x179)](b,this[_0x5da3df(0x176)](),_0xd52f63);}};_0x9be5d2[_0x43e278(0x177)](T);var E=class extends _0x5f3dce{constructor(..._0x1130cc){var _0x56c59d=_0x43e278;super(..._0x1130cc),w(this,_0x56c59d(0x19b),void 0x0);}[_0x43e278(0x18c)](_0x575cf5){var _0x571a2b=_0x43e278;this[_0x571a2b(0x19b)]=_0x575cf5['get'](_0x5a6335);}['insertFormula'](_0x5c46e7,_0x52fb1a,_0x33cea5={}){var _0x2548b3=_0x43e278;return this[_0x2548b3(0x185)](_0x5c46e7,_0x52fb1a,_0x33cea5);}['appendFormula'](_0x383ee1,_0x234c10={}){var _0x2ab220=_0x43e278;return this['_insert'](_0x2ab220(0x16d),_0x383ee1,_0x234c10);}[_0x43e278(0x185)](_0x186e62,_0x190170,_0x2a7d2f){var _0x56da4f=_0x43e278;if(this[_0x56da4f(0x19e)]())return null;let _0x13d172={'externalReferences':_0x2a7d2f[_0x56da4f(0x1a3)],'formula':_0x190170,'numberFormat':_0x2a7d2f[_0x56da4f(0x1a1)],'target':{'type':_0x56da4f(0x1af),'paragraphId':this['getId'](),'position':_0x186e62},'unitId':this[_0x56da4f(0x166)][_0x56da4f(0x176)]()},_0x532f9=this[_0x56da4f(0x19b)]['syncExecuteCommand'](_0x4cef27['id'],_0x13d172);return _0x532f9?this[_0x56da4f(0x182)][_0x56da4f(0x179)](b,this[_0x56da4f(0x166)]['getId'](),_0x532f9[_0x56da4f(0x19c)]):null;}};_0x5f3dce[_0x43e278(0x177)](E);var D=class extends _0x2f9447{constructor(..._0x58f15a){var _0x14281f=_0x43e278;super(..._0x58f15a),w(this,_0x14281f(0x19b),void 0x0);}[_0x43e278(0x18c)](_0xc998de){var _0x1f7dea=_0x43e278;this[_0x1f7dea(0x19b)]=_0xc998de[_0x1f7dea(0x199)](_0x5a6335);}[_0x43e278(0x197)](_0x50335d,_0x3557db={}){var _0x136452=_0x43e278;let {endOffset:_0x5651ed,segmentId:_0x12862b,startOffset:_0x501b43}=this[_0x136452(0x171)]();return _0x12862b?null:this[_0x136452(0x185)](_0x501b43,_0x5651ed,_0x50335d,_0x3557db);}[_0x43e278(0x185)](_0x2f58a5,_0x2cb9d3,_0x5bd4df,_0x2c218c){var _0xcea158=_0x43e278;let _0x3e86d0={'externalReferences':_0x2c218c[_0xcea158(0x1a3)],'formula':_0x5bd4df,'numberFormat':_0x2c218c[_0xcea158(0x1a1)],'target':{'type':_0xcea158(0x1ab),'startOffset':_0x2f58a5,'endOffset':_0x2cb9d3},'unitId':this[_0xcea158(0x166)][_0xcea158(0x176)]()},_0x3135dd=this[_0xcea158(0x19b)]['syncExecuteCommand'](_0x4cef27['id'],_0x3e86d0);return _0x3135dd?this[_0xcea158(0x182)][_0xcea158(0x179)](b,this[_0xcea158(0x166)][_0xcea158(0x176)](),_0x3135dd[_0xcea158(0x19c)]):null;}};_0x2f9447[_0x43e278(0x177)](D);export{b as FDocumentFormula};