@univerjs-pro/docs-formula 1.0.3 → 1.1.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 _0x4809d2=_0x2142;(function(_0x235da6,_0x200aae){const _0x392b17=_0x2142,_0x57973b=_0x235da6();while(!![]){try{const _0x446234=parseInt(_0x392b17(0x156))/0x1*(-parseInt(_0x392b17(0x14d))/0x2)+parseInt(_0x392b17(0x186))/0x3+-parseInt(_0x392b17(0x18d))/0x4+parseInt(_0x392b17(0x18f))/0x5+-parseInt(_0x392b17(0x150))/0x6+-parseInt(_0x392b17(0x15e))/0x7+parseInt(_0x392b17(0x1a5))/0x8;if(_0x446234===_0x200aae)break;else _0x57973b['push'](_0x57973b['shift']());}catch(_0x2864a9){_0x57973b['push'](_0x57973b['shift']());}}}(_0x5a35,0xd8296),Object[_0x4809d2(0x187)](exports,Symbol[_0x4809d2(0x15a)],{'value':_0x4809d2(0x164)}));let e=require('@univerjs-pro/docs-formula'),t=require('@univerjs/core'),n=require('@univerjs/docs/facade');function _0x2142(_0x5ede85,_0x43145b){_0x5ede85=_0x5ede85-0x14c;const _0x5a3533=_0x5a35();let _0x214270=_0x5a3533[_0x5ede85];return _0x214270;}function r(_0xd75857,_0x43a599){return function(_0x3929a9,_0x4487be){_0x43a599(_0x3929a9,_0x4487be,_0xd75857);};}function i(_0x7583fc,_0x355155,_0x483f05,_0xa074a3){const _0x90cc87=_0x4809d2;var _0x1d7b75=arguments[_0x90cc87(0x172)],_0x59d014=_0x1d7b75<0x3?_0x355155:_0xa074a3===null?_0xa074a3=Object[_0x90cc87(0x18e)](_0x355155,_0x483f05):_0xa074a3,_0x2bb1a6;if(typeof Reflect=='object'&&typeof Reflect[_0x90cc87(0x179)]==_0x90cc87(0x17c))_0x59d014=Reflect['decorate'](_0x7583fc,_0x355155,_0x483f05,_0xa074a3);else{for(var _0x1fe56f=_0x7583fc[_0x90cc87(0x172)]-0x1;_0x1fe56f>=0x0;_0x1fe56f--)(_0x2bb1a6=_0x7583fc[_0x1fe56f])&&(_0x59d014=(_0x1d7b75<0x3?_0x2bb1a6(_0x59d014):_0x1d7b75>0x3?_0x2bb1a6(_0x355155,_0x483f05,_0x59d014):_0x2bb1a6(_0x355155,_0x483f05))||_0x59d014);}return _0x1d7b75>0x3&&_0x59d014&&Object[_0x90cc87(0x187)](_0x355155,_0x483f05,_0x59d014),_0x59d014;}let a=class{constructor(_0x34b5d6,_0x437fd7,_0x430bb0,_0x20d763,_0x3b1f71,_0x40db85){const _0x353a83=_0x4809d2;this['_unitId']=_0x34b5d6,this[_0x353a83(0x15c)]=_0x437fd7,this[_0x353a83(0x18b)]=_0x430bb0,this['_model']=_0x20d763,this[_0x353a83(0x175)]=_0x3b1f71,this[_0x353a83(0x199)]=_0x40db85;}[_0x4809d2(0x151)](){const _0x3005de=_0x4809d2;return this[_0x3005de(0x15c)];}[_0x4809d2(0x196)](){const _0x137fb2=_0x4809d2;let _0x1b0ea9=this[_0x137fb2(0x1a8)]();return _0x1b0ea9?{'endOffset':_0x1b0ea9[_0x137fb2(0x16c)]+0x1,'rangeId':_0x1b0ea9[_0x137fb2(0x163)],'startOffset':_0x1b0ea9[_0x137fb2(0x181)]}:null;}[_0x4809d2(0x1a0)](){const _0x7a3ba9=_0x4809d2;var _0x520b9c;return((_0x520b9c=this[_0x7a3ba9(0x153)][_0x7a3ba9(0x1a0)](this[_0x7a3ba9(0x14c)],this[_0x7a3ba9(0x15c)]))==null?void 0x0:_0x520b9c[_0x7a3ba9(0x180)])??'';}[_0x4809d2(0x168)](){const _0x15bbd2=_0x4809d2;return this[_0x15bbd2(0x153)][_0x15bbd2(0x1a0)](this[_0x15bbd2(0x14c)],this['_rangeId'])??null;}['getResult'](){const _0x7e5c5a=_0x4809d2;return this[_0x7e5c5a(0x175)][_0x7e5c5a(0x17a)]({'unitId':this['_unitId'],'rangeId':this[_0x7e5c5a(0x15c)]})??null;}['describe'](){const _0x528a93=_0x4809d2;let _0x5c7dcf=this['getRange'](),_0xa98b6f=this[_0x528a93(0x168)](),_0x53987a=this['getResult']();return!_0x5c7dcf||!_0xa98b6f||!_0x53987a?null:{..._0x5c7dcf,'config':_0xa98b6f,'formula':_0xa98b6f['formula'],'result':_0x53987a,'type':_0x528a93(0x180)};}['update'](_0x5a7331){const _0xed7dec=_0x4809d2;return this[_0xed7dec(0x18b)][_0xed7dec(0x182)](e[_0xed7dec(0x157)]['id'],{'externalReferences':_0x5a7331[_0xed7dec(0x15f)],'formula':_0x5a7331[_0xed7dec(0x180)],'numberFormat':_0x5a7331[_0xed7dec(0x161)],'rangeId':this[_0xed7dec(0x15c)],'unitId':this['_unitId']});}[_0x4809d2(0x159)](_0x1a7a85){const _0x90f16f=_0x4809d2;return this[_0x90f16f(0x18b)][_0x90f16f(0x182)](e[_0x90f16f(0x1a4)]['id'],{'numberFormat':_0x1a7a85,'rangeId':this[_0x90f16f(0x15c)],'unitId':this['_unitId']});}['remove'](){const _0x4f3ffb=_0x4809d2;return this[_0x4f3ffb(0x18b)][_0x4f3ffb(0x182)](e[_0x4f3ffb(0x15d)]['id'],{'rangeId':this[_0x4f3ffb(0x15c)],'unitId':this[_0x4f3ffb(0x14c)]});}[_0x4809d2(0x16d)](_0x52ede7){const _0x19229a=_0x4809d2;return this[_0x19229a(0x18b)]['syncExecuteCommand'](e[_0x19229a(0x167)]['id'],{'rangeId':this[_0x19229a(0x15c)],'text':_0x52ede7,'unitId':this[_0x19229a(0x14c)]});}[_0x4809d2(0x154)](){const _0x5b635b=_0x4809d2;return this['_commandService']['syncExecuteCommand'](e[_0x5b635b(0x16b)]['id'],{'rangeId':this['_rangeId'],'unitId':this[_0x5b635b(0x14c)]});}[_0x4809d2(0x1a8)](){const _0x3918ff=_0x4809d2;var _0x1b588e;let _0x14a400=this[_0x3918ff(0x199)][_0x3918ff(0x18c)](this[_0x3918ff(0x14c)],t['UniverInstanceType'][_0x3918ff(0x1a7)]);return _0x14a400==null||(_0x1b588e=_0x14a400[_0x3918ff(0x17d)]()[_0x3918ff(0x1a2)])==null||(_0x1b588e=_0x1b588e['customRanges'])==null?void 0x0:_0x1b588e['find'](_0x276438=>_0x276438['rangeId']===this[_0x3918ff(0x15c)]&&(0x0,e[_0x3918ff(0x15b)])(_0x276438));}};a=i([r(0x2,t['ICommandService']),r(0x3,(0x0,t['Inject'])(e[_0x4809d2(0x162)])),r(0x4,(0x0,t['Inject'])(e[_0x4809d2(0x18a)])),r(0x5,t[_0x4809d2(0x17e)])],a);function o(_0x15c485){'@babel/helpers - typeof';const _0x217c4a=_0x4809d2;return o=typeof Symbol==_0x217c4a(0x17c)&&typeof Symbol[_0x217c4a(0x198)]==_0x217c4a(0x178)?function(_0x26b11d){return typeof _0x26b11d;}:function(_0x17ba4e){const _0x4e0434=_0x217c4a;return _0x17ba4e&&typeof Symbol==_0x4e0434(0x17c)&&_0x17ba4e[_0x4e0434(0x189)]===Symbol&&_0x17ba4e!==Symbol[_0x4e0434(0x14f)]?_0x4e0434(0x178):typeof _0x17ba4e;},o(_0x15c485);}function s(_0x29d58d,_0x1aaa3c){const _0x107d1d=_0x4809d2;if(o(_0x29d58d)!=_0x107d1d(0x174)||!_0x29d58d)return _0x29d58d;var _0x1fd705=_0x29d58d[Symbol[_0x107d1d(0x16a)]];if(_0x1fd705!==void 0x0){var _0x422726=_0x1fd705[_0x107d1d(0x197)](_0x29d58d,_0x1aaa3c||_0x107d1d(0x1a1));if(o(_0x422726)!=_0x107d1d(0x174))return _0x422726;throw TypeError(_0x107d1d(0x192));}return(_0x1aaa3c===_0x107d1d(0x165)?String:Number)(_0x29d58d);}function c(_0xa4c04b){const _0x139dbd=_0x4809d2;var _0x26dddf=s(_0xa4c04b,_0x139dbd(0x165));return o(_0x26dddf)==_0x139dbd(0x178)?_0x26dddf:_0x26dddf+'';}function l(_0x583bdc,_0x331db6,_0x57b220){const _0x444388=_0x4809d2;return(_0x331db6=c(_0x331db6))in _0x583bdc?Object[_0x444388(0x187)](_0x583bdc,_0x331db6,{'value':_0x57b220,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x583bdc[_0x331db6]=_0x57b220,_0x583bdc;}var u=class extends n[_0x4809d2(0x152)]{constructor(..._0x292861){const _0x3d2349=_0x4809d2;super(..._0x292861),l(this,_0x3d2349(0x188),void 0x0),l(this,'_docsFormulaDisplayTextService',void 0x0),l(this,_0x3d2349(0x16f),void 0x0),l(this,_0x3d2349(0x16e),void 0x0);}['_initialize'](_0x40ef8d){const _0x5a1871=_0x4809d2;this[_0x5a1871(0x188)]=_0x40ef8d[_0x5a1871(0x195)](t[_0x5a1871(0x176)]),this[_0x5a1871(0x160)]=_0x40ef8d[_0x5a1871(0x195)](e[_0x5a1871(0x194)]),this[_0x5a1871(0x16f)]=_0x40ef8d[_0x5a1871(0x195)](e[_0x5a1871(0x162)]),this[_0x5a1871(0x16e)]=_0x40ef8d[_0x5a1871(0x195)](t[_0x5a1871(0x1a9)]);}[_0x4809d2(0x19c)](){const _0x185234=_0x4809d2;return this['_getCompleteRanges']()['map'](_0x45afd1=>this['_createFormula'](_0x45afd1[_0x185234(0x163)]));}[_0x4809d2(0x1a0)](_0x25d203){const _0x294e5c=_0x4809d2;return this[_0x294e5c(0x19a)]()['some'](_0x1302e7=>_0x1302e7[_0x294e5c(0x163)]===_0x25d203)?this['_createFormula'](_0x25d203):null;}[_0x4809d2(0x158)](_0x1f546d){const _0x43d12e=_0x4809d2;let _0x5305a0=this[_0x43d12e(0x19a)]()[_0x43d12e(0x177)](_0x1807fc=>_0x1807fc[_0x43d12e(0x181)]<=_0x1f546d&&_0x1f546d<=_0x1807fc['endIndex']);return _0x5305a0?this[_0x43d12e(0x19d)](_0x5305a0[_0x43d12e(0x163)]):null;}[_0x4809d2(0x19e)](){const _0x4b9d1b=_0x4809d2;let _0x124460=this[_0x4b9d1b(0x16e)]['saveUnit'](this['id']);if(!_0x124460)throw Error(_0x4b9d1b(0x14e)+this['id']+_0x4b9d1b(0x184));return this[_0x4b9d1b(0x160)]['degradeDocumentData'](_0x124460);}[_0x4809d2(0x1a6)](_0x287cc4){const _0x378b85=_0x4809d2;return this[_0x378b85(0x171)]({'externalReferences':_0x287cc4[_0x378b85(0x15f)],'formula':_0x287cc4[_0x378b85(0x180)],'numberFormat':_0x287cc4['numberFormat'],'target':{'type':'range','startOffset':_0x287cc4['startOffset'],'endOffset':_0x287cc4[_0x378b85(0x191)]},'unitId':this[_0x378b85(0x151)]()});}['_insert'](_0x20af4b){const _0x16f6e1=_0x4809d2;let _0x4f9574=this[_0x16f6e1(0x188)]['syncExecuteCommand'](e[_0x16f6e1(0x183)]['id'],_0x20af4b);return _0x4f9574?this[_0x16f6e1(0x19d)](_0x4f9574[_0x16f6e1(0x163)]):null;}['_getCompleteRanges'](){const _0xb567e7=_0x4809d2;var _0x32c72d;let _0xc47628=this[_0xb567e7(0x16f)][_0xb567e7(0x19c)](this[_0xb567e7(0x151)]());return((_0x32c72d=this[_0xb567e7(0x185)]('')[_0xb567e7(0x166)])==null?void 0x0:_0x32c72d[_0xb567e7(0x17b)](_0x51ee82=>(0x0,e[_0xb567e7(0x15b)])(_0x51ee82)&&_0xc47628[_0x51ee82[_0xb567e7(0x163)]]!=null))??[];}['_createFormula'](_0x5c7406){const _0x406bc5=_0x4809d2;return this[_0x406bc5(0x190)][_0x406bc5(0x19f)](a,this['getId'](),_0x5c7406);}};n[_0x4809d2(0x152)][_0x4809d2(0x170)](u);var d=class extends n['FDocumentParagraph']{constructor(..._0x1dbac3){const _0x5c02a6=_0x4809d2;super(..._0x1dbac3),l(this,_0x5c02a6(0x188),void 0x0);}['_initialize'](_0x5680f5){const _0x5ca33c=_0x4809d2;this[_0x5ca33c(0x188)]=_0x5680f5[_0x5ca33c(0x195)](t[_0x5ca33c(0x176)]);}[_0x4809d2(0x1a6)](_0x2efeda,_0x501ca6,_0x4b6046={}){return this['_insert'](_0x2efeda,_0x501ca6,_0x4b6046);}['appendFormula'](_0x6b8149,_0x1f0dc6={}){const _0x2e4284=_0x4809d2;return this[_0x2e4284(0x171)](_0x2e4284(0x169),_0x6b8149,_0x1f0dc6);}[_0x4809d2(0x171)](_0x14ba52,_0x18fc0f,_0x2e6eab){const _0x555e84=_0x4809d2;if(this['getSegmentId']())return null;let _0x50d7a8={'externalReferences':_0x2e6eab[_0x555e84(0x15f)],'formula':_0x18fc0f,'numberFormat':_0x2e6eab[_0x555e84(0x161)],'target':{'type':_0x555e84(0x155),'paragraphId':this['getId'](),'position':_0x14ba52},'unitId':this['_document'][_0x555e84(0x151)]()},_0x5b9235=this['_docsFormulaCommandService'][_0x555e84(0x182)](e['InsertDocFormulaCommand']['id'],_0x50d7a8);return _0x5b9235?this[_0x555e84(0x190)][_0x555e84(0x19f)](a,this[_0x555e84(0x193)][_0x555e84(0x151)](),_0x5b9235['rangeId']):null;}};n[_0x4809d2(0x1a3)]['extend'](d);var f=class extends n[_0x4809d2(0x19b)]{constructor(..._0x3b97f5){const _0xa13c55=_0x4809d2;super(..._0x3b97f5),l(this,_0xa13c55(0x188),void 0x0);}[_0x4809d2(0x173)](_0x19d870){const _0x4f0ca9=_0x4809d2;this[_0x4f0ca9(0x188)]=_0x19d870[_0x4f0ca9(0x195)](t['ICommandService']);}['replaceWithFormula'](_0x5ce715,_0x408f12={}){const _0x57ac17=_0x4809d2;let {endOffset:_0x23cef8,segmentId:_0x3b3919,startOffset:_0x435ffd}=this[_0x57ac17(0x196)]();return _0x3b3919?null:this[_0x57ac17(0x171)](_0x435ffd,_0x23cef8,_0x5ce715,_0x408f12);}[_0x4809d2(0x171)](_0x417fd9,_0x2a2739,_0xad835f,_0x298d1b){const _0x52640=_0x4809d2;let _0x5ddfdc={'externalReferences':_0x298d1b[_0x52640(0x15f)],'formula':_0xad835f,'numberFormat':_0x298d1b['numberFormat'],'target':{'type':'range','startOffset':_0x417fd9,'endOffset':_0x2a2739},'unitId':this[_0x52640(0x193)][_0x52640(0x151)]()},_0x3a181f=this[_0x52640(0x188)][_0x52640(0x182)](e[_0x52640(0x183)]['id'],_0x5ddfdc);return _0x3a181f?this[_0x52640(0x190)][_0x52640(0x19f)](a,this[_0x52640(0x193)][_0x52640(0x151)](),_0x3a181f[_0x52640(0x163)]):null;}};function _0x5a35(){const _0x45067f=['extend','_insert','length','_initialize','object','_service','ICommandService','find','symbol','decorate','getResult','filter','function','getSnapshot','IUniverInstanceService','FDocumentFormula','formula','startIndex','syncExecuteCommand','InsertDocFormulaCommand','\x20could\x20not\x20be\x20serialized.','getBody','3406029lvOATW','defineProperty','_docsFormulaCommandService','constructor','DocFormulaService','_commandService','getUnit','2265744gZKmAX','getOwnPropertyDescriptor','6336450MIuVsz','_injector','endOffset','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','_document','DocFormulaDisplayTextService','get','getRange','call','iterator','_univerInstanceService','_getCompleteRanges','FDocumentTextRange','getFormulas','_createFormula','saveFormulaDisplayTextSnapshot','createInstance','getFormula','default','body','FDocumentParagraph','SetDocFormulaNumberFormatCommand','14502000aKsqYO','insertFormula','UNIVER_DOC','_getCustomRange','IResourceLoaderService','_unitId','198itLfYX','Document\x20','prototype','9330360AxkUrI','getId','FDocument','_model','convertToText','paragraph','2160kGOvNE','UpdateDocFormulaCommand','getFormulaAt','setNumberFormat','toStringTag','isDocFormulaRange','_rangeId','RemoveDocFormulaCommand','6962543vzawBq','externalReferences','_docsFormulaDisplayTextService','numberFormat','DocFormulaModel','rangeId','Module','string','customRanges','ReplaceDocFormulaWithTextCommand','getConfig','end','toPrimitive','ConvertDocFormulaToTextCommand','endIndex','replaceWithText','_docsFormulaResourceLoaderService','_docsFormulaModel'];_0x5a35=function(){return _0x45067f;};return _0x5a35();}n[_0x4809d2(0x19b)][_0x4809d2(0x170)](f),Object[_0x4809d2(0x187)](exports,_0x4809d2(0x17f),{'enumerable':!0x0,'get':function(){return a;}});
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;}});
package/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- const _0x2c2698=_0x2a36;(function(_0x31aaf0,_0x43e853){const _0x28cdc5=_0x2a36,_0x1a9e42=_0x31aaf0();while(!![]){try{const _0x2e43bd=parseInt(_0x28cdc5(0x1f8))/0x1+-parseInt(_0x28cdc5(0x24f))/0x2*(-parseInt(_0x28cdc5(0x2a8))/0x3)+-parseInt(_0x28cdc5(0x1ee))/0x4*(parseInt(_0x28cdc5(0x205))/0x5)+-parseInt(_0x28cdc5(0x259))/0x6*(parseInt(_0x28cdc5(0x1d5))/0x7)+-parseInt(_0x28cdc5(0x1ac))/0x8+-parseInt(_0x28cdc5(0x284))/0x9+parseInt(_0x28cdc5(0x184))/0xa;if(_0x2e43bd===_0x43e853)break;else _0x1a9e42['push'](_0x1a9e42['shift']());}catch(_0x1d50b7){_0x1a9e42['push'](_0x1a9e42['shift']());}}}(_0x3a68,0xa2924),Object[_0x2c2698(0x1b2)](exports,Symbol[_0x2c2698(0x228)],{'value':_0x2c2698(0x260)}));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=_0x2c2698(0x1b6),s='univer-docs-formula';function c(){return{'schemaVersion':0x1,'formulas':{}};}function l(_0x10274c){const _0x2d221b=_0x2c2698;return!_0x10274c||typeof _0x10274c!=_0x2d221b(0x23d)||!f(_0x10274c,[_0x2d221b(0x1a8),_0x2d221b(0x276)])||!(_0x2d221b(0x1a8)in _0x10274c)||_0x10274c[_0x2d221b(0x1a8)]!==0x1||!('formulas'in _0x10274c)||!_0x10274c[_0x2d221b(0x276)]||typeof _0x10274c[_0x2d221b(0x276)]!=_0x2d221b(0x23d)||Array[_0x2d221b(0x1c5)](_0x10274c['formulas'])?!0x1:Object[_0x2d221b(0x1bb)](_0x10274c[_0x2d221b(0x276)])[_0x2d221b(0x26f)](([_0x42de2b,_0x35e8d7])=>_0x42de2b[_0x2d221b(0x1fa)]>0x0&&u(_0x35e8d7));}function u(_0x23d54a){const _0xee7e40=_0x2c2698;return!_0x23d54a||typeof _0x23d54a!=_0xee7e40(0x23d)||!f(_0x23d54a,[_0xee7e40(0x261),_0xee7e40(0x1e9),_0xee7e40(0x257)])||!('formula'in _0x23d54a)||typeof _0x23d54a[_0xee7e40(0x261)]!=_0xee7e40(0x247)||!_0x23d54a[_0xee7e40(0x261)][_0xee7e40(0x299)]()||_0xee7e40(0x1e9)in _0x23d54a&&_0x23d54a[_0xee7e40(0x1e9)]!=null&&(typeof _0x23d54a[_0xee7e40(0x1e9)]!='object'||!f(_0x23d54a['numberFormat'],[_0xee7e40(0x23f)])||!(_0xee7e40(0x23f)in _0x23d54a[_0xee7e40(0x1e9)])||typeof _0x23d54a['numberFormat']['pattern']!=_0xee7e40(0x247))?!0x1:!(_0xee7e40(0x257)in _0x23d54a)||_0x23d54a[_0xee7e40(0x257)]==null||d(_0x23d54a['lastValue']);}function d(_0x1846de){const _0x4c0b1f=_0x2c2698;return!_0x1846de||typeof _0x1846de!=_0x4c0b1f(0x23d)||!f(_0x1846de,['v','t',_0x4c0b1f(0x23f)])||!('v'in _0x1846de)||_0x1846de['v']!==null&&typeof _0x1846de['v']!=_0x4c0b1f(0x247)&&typeof _0x1846de['v']!=_0x4c0b1f(0x241)&&typeof _0x1846de['v']!=_0x4c0b1f(0x28b)||'t'in _0x1846de&&_0x1846de['t']!=null&&!ee(_0x1846de['t'])?!0x1:!(_0x4c0b1f(0x23f)in _0x1846de)||_0x1846de[_0x4c0b1f(0x23f)]==null||typeof _0x1846de[_0x4c0b1f(0x23f)]==_0x4c0b1f(0x247);}function f(_0x46ca3a,_0x5e17e2){const _0xe8edcd=_0x2c2698;let _0x42e134=new Set(_0x5e17e2);return Object[_0xe8edcd(0x23c)](_0x46ca3a)[_0xe8edcd(0x26f)](_0x17f60a=>_0x42e134[_0xe8edcd(0x27f)](_0x17f60a));}function ee(_0x5bbb3b){const _0x39fc75=_0x2c2698;return typeof _0x5bbb3b==_0x39fc75(0x241)&&Object[_0x39fc75(0x291)](t[_0x39fc75(0x1ef)])[_0x39fc75(0x1e8)](_0x5bbb3b);}const p=new Set([t[_0x2c2698(0x1eb)][_0x2c2698(0x1c9)],t[_0x2c2698(0x1eb)]['TABLE_START'],t[_0x2c2698(0x1eb)][_0x2c2698(0x27e)],t[_0x2c2698(0x1eb)][_0x2c2698(0x235)],t[_0x2c2698(0x1eb)]['TABLE_CELL_END'],t['DataStreamTreeTokenType'][_0x2c2698(0x1a4)],t[_0x2c2698(0x1eb)][_0x2c2698(0x2a9)],t[_0x2c2698(0x1eb)][_0x2c2698(0x17c)],t['DataStreamTreeTokenType'][_0x2c2698(0x19b)],t['DataStreamTreeTokenType'][_0x2c2698(0x2ac)],t[_0x2c2698(0x1eb)]['COLUMN_GROUP_END'],t[_0x2c2698(0x1eb)][_0x2c2698(0x26d)],t[_0x2c2698(0x1eb)]['BLOCK_END'],t[_0x2c2698(0x1eb)]['CUSTOM_BLOCK']]);var m=class extends Error{constructor(){const _0x331fea=_0x2c2698;super(_0x331fea(0x2a4));}};function te(_0x46a010){const _0x194177=_0x2c2698;var _0x34a5f9,_0x22ed86;let _0x470f96=t['Tools']['deepClone'](_0x46a010[_0x194177(0x1a2)]),_0x2dc290=T(_0x470f96),{startOffset:_0x37f567,endOffset:_0x3544eb}=oe(_0x2dc290,_0x46a010['startOffset'],_0x46a010[_0x194177(0x2a6)]);ie(_0x2dc290,_0x37f567,_0x3544eb);let _0x288b4f=((_0x34a5f9=_0x2dc290[_0x194177(0x215)])==null?void 0x0:_0x34a5f9[_0x194177(0x18a)](_0x195515=>{const _0x11cdf2=_0x194177;if(!g(_0x195515))return!0x1;let _0x4861f3=(0x0,t[_0x11cdf2(0x282)])(_0x195515);return _0x4861f3['endOffset']>_0x37f567&&_0x4861f3['startOffset']<_0x3544eb;})[_0x194177(0x185)](_0x399b40=>_0x399b40[_0x194177(0x29c)]))??[];ce(_0x2dc290,_0x37f567,_0x3544eb,''),_0x2dc290[_0x194177(0x215)]=[...((_0x22ed86=_0x2dc290['customRanges'])==null?void 0x0:_0x22ed86[_0x194177(0x18a)](_0x1ac10b=>!_0x288b4f[_0x194177(0x1e8)](_0x1ac10b['rangeId'])&&_0x1ac10b[_0x194177(0x29c)]!==_0x46a010[_0x194177(0x29c)]))??[],ae(_0x46a010[_0x194177(0x29c)],_0x37f567)][_0x194177(0x29e)]((_0x27a674,_0x2031c8)=>_0x27a674[_0x194177(0x17b)]-_0x2031c8['startIndex']);let _0x5c010a=v(_0x46a010['resource']);return _0x288b4f[_0x194177(0x1db)](_0x24f5dd=>{delete _0x5c010a['formulas'][_0x24f5dd];}),_0x5c010a[_0x194177(0x276)][_0x46a010['rangeId']]=t[_0x194177(0x234)][_0x194177(0x25d)](_0x46a010[_0x194177(0x1b0)]),{'nextDocumentData':_0x470f96,'nextResource':_0x5c010a,'cursorOffset':_0x37f567+0x1};}function ne(_0x48a082){const _0x2c5171=_0x2c2698;var _0x59e9ea,_0x5b6052;let _0xa4e750=t[_0x2c5171(0x234)][_0x2c5171(0x25d)](_0x48a082[_0x2c5171(0x1a2)]),_0x5752ff=(_0x59e9ea=T(_0xa4e750)[_0x2c5171(0x215)])==null?void 0x0:_0x59e9ea[_0x2c5171(0x190)](_0x1cda1e=>_0x1cda1e['rangeId']===_0x48a082['rangeId']&&g(_0x1cda1e));if(!_0x5752ff||!((_0x5b6052=_0x48a082[_0x2c5171(0x253)])!=null&&_0x5b6052[_0x2c5171(0x276)][_0x48a082[_0x2c5171(0x29c)]]))return null;let _0x3ef589=v(_0x48a082['resource']);return _0x3ef589['formulas'][_0x48a082[_0x2c5171(0x29c)]]=t[_0x2c5171(0x234)]['deepClone'](_0x48a082[_0x2c5171(0x1b0)]),{'nextDocumentData':_0xa4e750,'nextResource':_0x3ef589,'cursorOffset':_0x5752ff[_0x2c5171(0x19e)]+0x1};}function h(_0x14a2f6){const _0x5f57a0=_0x2c2698;let _0x3bf5a8=t[_0x5f57a0(0x234)]['deepClone'](_0x14a2f6[_0x5f57a0(0x1a2)]),_0x3a0e5b=le(_0x3bf5a8,_0x14a2f6['rangeId'],_0x14a2f6[_0x5f57a0(0x224)]??'');if(_0x3a0e5b==null)return null;let _0x21eeea=v(_0x14a2f6[_0x5f57a0(0x253)]);return delete _0x21eeea[_0x5f57a0(0x276)][_0x14a2f6[_0x5f57a0(0x29c)]],{'nextDocumentData':_0x3bf5a8,'nextResource':_0x21eeea,'cursorOffset':_0x3a0e5b};}function re(_0xbd3da4,_0x46f461){const _0xb4b71b=_0x2c2698;var _0x2b2041;let _0x296716=t[_0xb4b71b(0x234)]['deepClone'](_0xbd3da4),_0x89ec75=_0x296716[_0xb4b71b(0x1ea)];if(!_0x89ec75)return _0x296716;let _0x3c976c=new Map(_0x46f461['map'](_0x23bd5f=>[_0x23bd5f['rangeId'],_0x23bd5f[_0xb4b71b(0x224)]])),_0xd577b4=((_0x2b2041=_0x89ec75[_0xb4b71b(0x215)])==null?void 0x0:_0x2b2041[_0xb4b71b(0x18a)](_0x17c23b=>g(_0x17c23b)&&_0x3c976c[_0xb4b71b(0x27f)](_0x17c23b['rangeId']))[_0xb4b71b(0x29e)]((_0x38ba6d,_0x36af30)=>_0x36af30[_0xb4b71b(0x17b)]-_0x38ba6d['startIndex']))??[];for(let _0x548237 of _0xd577b4)le(_0x296716,_0x548237[_0xb4b71b(0x29c)],_0x3c976c['get'](_0x548237['rangeId'])??'');return _0x296716;}function g(_0x46e2cf){const _0x240a62=_0x2c2698;var _0x27405e;return(_0x46e2cf==null?void 0x0:_0x46e2cf[_0x240a62(0x19c)])===t['CustomRangeType'][_0x240a62(0x206)]&&_0x46e2cf[_0x240a62(0x2b0)]===!0x0&&((_0x27405e=_0x46e2cf['properties'])==null?void 0x0:_0x27405e['kind'])===_0x240a62(0x231);}function _(_0x3de63b,_0x52492e){const _0x7b5dd9=_0x2c2698;var _0x199770;return _0x3de63b==null||(_0x199770=_0x3de63b['customRanges'])==null?void 0x0:_0x199770['find'](_0x1bbc5c=>_0x1bbc5c[_0x7b5dd9(0x29c)]===_0x52492e&&g(_0x1bbc5c));}function ie(_0x5db51d,_0x569f18,_0xd9a73){const _0x56dedc=_0x2c2698;if(_0x569f18===_0xd9a73){if(p[_0x56dedc(0x27f)](_0x5db51d[_0x56dedc(0x210)][_0x569f18]))throw new m();return;}for(let _0x591e6a=_0x569f18;_0x591e6a<_0xd9a73;_0x591e6a++)if(_0x5db51d['dataStream'][_0x591e6a]===t[_0x56dedc(0x1eb)]['PARAGRAPH']||p[_0x56dedc(0x27f)](_0x5db51d[_0x56dedc(0x210)][_0x591e6a]))throw new m();}function ae(_0x5f1c38,_0x32097f){const _0x346d71=_0x2c2698;return{'startIndex':_0x32097f,'endIndex':_0x32097f,'rangeId':_0x5f1c38,'rangeType':t['CustomRangeType'][_0x346d71(0x206)],'wholeEntity':!0x0,'properties':{'kind':s}};}function v(_0x4d8d37){const _0x410103=_0x2c2698;return _0x4d8d37?t[_0x410103(0x234)]['deepClone'](_0x4d8d37):c();}function oe(_0xdba338,_0x5d99ae,_0x33b9ab){const _0x4ac9cc=_0x2c2698;let _0x159249=se(_0xdba338),_0x41ed85=_0x5d99ae??_0x159249,_0x34da82=_0x33b9ab??_0x41ed85;return{'startOffset':y(Math[_0x4ac9cc(0x278)](_0x41ed85,_0x34da82),_0x159249),'endOffset':y(Math['max'](_0x41ed85,_0x34da82),_0x159249)};}function y(_0x3ea16b,_0x522a60){const _0x195cc6=_0x2c2698;return Math[_0x195cc6(0x29d)](0x0,Math[_0x195cc6(0x278)](_0x3ea16b,_0x522a60));}function se(_0x53bb7a){const _0x18069e=_0x2c2698;return _0x53bb7a['dataStream'][_0x18069e(0x245)](''+t[_0x18069e(0x1eb)][_0x18069e(0x207)]+t[_0x18069e(0x1eb)][_0x18069e(0x1c9)])?Math['max'](0x0,_0x53bb7a[_0x18069e(0x210)][_0x18069e(0x1fa)]-0x2):_0x53bb7a['dataStream'][_0x18069e(0x245)](t[_0x18069e(0x1eb)]['SECTION_BREAK'])?Math[_0x18069e(0x29d)](0x0,_0x53bb7a[_0x18069e(0x210)][_0x18069e(0x1fa)]-0x1):_0x53bb7a['dataStream'][_0x18069e(0x1fa)];}function ce(_0x17505c,_0x14b570,_0x5889bc,_0x28773d){_0x5889bc>_0x14b570&&de(_0x17505c,_0x14b570,_0x5889bc),ue(_0x17505c,_0x14b570,_0x28773d);}function le(_0x25bad0,_0x143347,_0x1cbffb){const _0x10a291=_0x2c2698;var _0x2cd37f,_0x321a63;let _0x192f93=T(_0x25bad0),_0x2b8b00=(_0x2cd37f=_0x192f93[_0x10a291(0x215)])==null?void 0x0:_0x2cd37f[_0x10a291(0x190)](_0x41bd70=>_0x41bd70[_0x10a291(0x29c)]===_0x143347&&g(_0x41bd70));if(!_0x2b8b00)return null;let _0x2ec84e=(0x0,t[_0x10a291(0x282)])(_0x2b8b00);return ce(_0x192f93,_0x2ec84e[_0x10a291(0x23b)],_0x2ec84e[_0x10a291(0x2a6)],_0x1cbffb),_0x192f93['customRanges']=(_0x321a63=_0x192f93[_0x10a291(0x215)])==null?void 0x0:_0x321a63[_0x10a291(0x18a)](_0x55c2a7=>_0x55c2a7['rangeId']!==_0x143347),_0x2ec84e[_0x10a291(0x23b)]+_0x1cbffb[_0x10a291(0x1fa)];}function ue(_0x43cca9,_0x40b317,_0x34c8d7){const _0x415876=_0x2c2698;_0x34c8d7&&(_0x43cca9[_0x415876(0x210)]=''+_0x43cca9[_0x415876(0x210)][_0x415876(0x25f)](0x0,_0x40b317)+_0x34c8d7+_0x43cca9[_0x415876(0x210)][_0x415876(0x25f)](_0x40b317),fe(_0x43cca9,_0x40b317,_0x34c8d7[_0x415876(0x1fa)]));}function de(_0x3d30e2,_0x25c199,_0x4e8d8e){const _0x46e59a=_0x2c2698;let _0x229fb1=_0x4e8d8e-_0x25c199;_0x3d30e2['dataStream']=''+_0x3d30e2['dataStream'][_0x46e59a(0x25f)](0x0,_0x25c199)+_0x3d30e2[_0x46e59a(0x210)][_0x46e59a(0x25f)](_0x4e8d8e),pe(_0x3d30e2,_0x25c199,_0x229fb1);}function fe(_0x165325,_0xc087bd,_0x10e32a){const _0x534ee6=_0x2c2698;_0x165325[_0x534ee6(0x187)]=b(_0x165325[_0x534ee6(0x187)],_0xc087bd,_0x10e32a),_0x165325[_0x534ee6(0x251)]=b(_0x165325[_0x534ee6(0x251)],_0xc087bd,_0x10e32a),_0x165325[_0x534ee6(0x1a1)]=b(_0x165325[_0x534ee6(0x1a1)],_0xc087bd,_0x10e32a),_0x165325[_0x534ee6(0x202)]=me(_0x165325['textRuns'],_0xc087bd,_0x10e32a),_0x165325[_0x534ee6(0x1c3)]=he(_0x165325[_0x534ee6(0x1c3)],_0xc087bd,_0x10e32a),_0x165325[_0x534ee6(0x1e6)]=S(_0x165325[_0x534ee6(0x1e6)],_0xc087bd,_0x10e32a),_0x165325['customRanges']=S(_0x165325['customRanges'],_0xc087bd,_0x10e32a),_0x165325[_0x534ee6(0x2b1)]=S(_0x165325['customDecorations'],_0xc087bd,_0x10e32a),_0x165325[_0x534ee6(0x223)]=S(_0x165325['blockRanges'],_0xc087bd,_0x10e32a);}function pe(_0x37b8c9,_0xb85d62,_0x55b0ad){const _0x2dcaa1=_0x2c2698;var _0xfaf606,_0x23d73f;_0x37b8c9[_0x2dcaa1(0x187)]=x(_0x37b8c9[_0x2dcaa1(0x187)],_0xb85d62,_0x55b0ad),_0x37b8c9['sectionBreaks']=x(_0x37b8c9[_0x2dcaa1(0x251)],_0xb85d62,_0x55b0ad),_0x37b8c9[_0x2dcaa1(0x1a1)]=x(_0x37b8c9[_0x2dcaa1(0x1a1)],_0xb85d62,_0x55b0ad),_0x37b8c9[_0x2dcaa1(0x202)]=(_0xfaf606=w((_0x23d73f=_0x37b8c9[_0x2dcaa1(0x202)])==null?void 0x0:_0x23d73f[_0x2dcaa1(0x185)](_0x3a2a1e=>({..._0x3a2a1e,'startIndex':_0x3a2a1e['st'],'endIndex':_0x3a2a1e['ed']})),_0xb85d62,_0x55b0ad))==null?void 0x0:_0xfaf606['map'](_0x244a81=>{let {startIndex:_0x550fdf,endIndex:_0x1814e4,..._0x2ee73c}=_0x244a81;return{..._0x2ee73c,'st':_0x550fdf,'ed':_0x1814e4};}),_0x37b8c9['tables']=w(_0x37b8c9['tables'],_0xb85d62,_0x55b0ad),_0x37b8c9[_0x2dcaa1(0x1e6)]=C(_0x37b8c9['columnGroups'],_0xb85d62,_0x55b0ad),_0x37b8c9['customRanges']=C(_0x37b8c9[_0x2dcaa1(0x215)],_0xb85d62,_0x55b0ad),_0x37b8c9[_0x2dcaa1(0x2b1)]=C(_0x37b8c9[_0x2dcaa1(0x2b1)],_0xb85d62,_0x55b0ad),_0x37b8c9['blockRanges']=C(_0x37b8c9[_0x2dcaa1(0x223)],_0xb85d62,_0x55b0ad);}function b(_0x547243,_0x2d281e,_0x1e83f3){const _0x1e3827=_0x2c2698;return _0x547243==null?void 0x0:_0x547243['map'](_0x1a3fb5=>_0x1a3fb5['startIndex']>=_0x2d281e?{..._0x1a3fb5,'startIndex':_0x1a3fb5[_0x1e3827(0x17b)]+_0x1e83f3}:_0x1a3fb5);}function x(_0x16ab0e,_0x464ef0,_0x146fdc){const _0x582571=_0x2c2698;let _0x3d48df=_0x464ef0+_0x146fdc;return _0x16ab0e==null?void 0x0:_0x16ab0e['map'](_0x5a8316=>_0x5a8316[_0x582571(0x17b)]>=_0x464ef0&&_0x5a8316[_0x582571(0x17b)]<_0x3d48df?null:_0x5a8316[_0x582571(0x17b)]>=_0x3d48df?{..._0x5a8316,'startIndex':_0x5a8316[_0x582571(0x17b)]-_0x146fdc}:_0x5a8316)[_0x582571(0x18a)](_0x220c25=>_0x220c25!=null);}function me(_0x3d1652,_0x2da7ec,_0x566d9c){const _0x1239f8=_0x2c2698;return _0x3d1652==null?void 0x0:_0x3d1652[_0x1239f8(0x185)](_0x24a220=>_0x24a220['st']>=_0x2da7ec?{..._0x24a220,'st':_0x24a220['st']+_0x566d9c,'ed':_0x24a220['ed']+_0x566d9c}:_0x24a220['ed']>_0x2da7ec?{..._0x24a220,'ed':_0x24a220['ed']+_0x566d9c}:_0x24a220);}function S(_0x1c7464,_0x46b90e,_0x9798a2){const _0x425f29=_0x2c2698;return _0x1c7464==null?void 0x0:_0x1c7464[_0x425f29(0x185)](_0x16a7c5=>(0x0,t[_0x425f29(0x1d0)])(_0x16a7c5,_0x46b90e,_0x9798a2));}function he(_0x493dfa,_0x1c0c6b,_0x4eb096){const _0x2a243e=_0x2c2698;return _0x493dfa==null?void 0x0:_0x493dfa['map'](_0x1716c0=>(0x0,t[_0x2a243e(0x288)])(_0x1716c0,_0x1c0c6b,_0x4eb096));}function C(_0x549071,_0x462fb7,_0x24d714){const _0x1dec85=_0x2c2698;return _0x549071==null?void 0x0:_0x549071[_0x1dec85(0x185)](_0x177c6d=>(0x0,t[_0x1dec85(0x274)])(_0x177c6d,_0x462fb7,_0x24d714))['filter'](_0x2a39c0=>_0x2a39c0!=null);}function w(_0xea7b3f,_0x56ac9a,_0x41bc27){const _0x176d5a=_0x2c2698;return _0xea7b3f==null?void 0x0:_0xea7b3f['map'](_0xb27753=>(0x0,t['shiftExclusiveRangeOnDelete'])(_0xb27753,_0x56ac9a,_0x41bc27))[_0x176d5a(0x18a)](_0x4bd418=>_0x4bd418!=null);}function T(_0x2c0c07){const _0x51afc3=_0x2c2698;if(!_0x2c0c07['body'])throw Error(_0x51afc3(0x28a));return _0x2c0c07[_0x51afc3(0x1ea)];}function E(_0x60cd02){'@babel/helpers - typeof';const _0x1a6bfa=_0x2c2698;return E=typeof Symbol==_0x1a6bfa(0x249)&&typeof Symbol['iterator']==_0x1a6bfa(0x24d)?function(_0x531d23){return typeof _0x531d23;}:function(_0x3fbaed){const _0x12dcb1=_0x1a6bfa;return _0x3fbaed&&typeof Symbol==_0x12dcb1(0x249)&&_0x3fbaed['constructor']===Symbol&&_0x3fbaed!==Symbol[_0x12dcb1(0x204)]?'symbol':typeof _0x3fbaed;},E(_0x60cd02);}function ge(_0x11f2eb,_0x12244c){const _0x3a457f=_0x2c2698;if(E(_0x11f2eb)!='object'||!_0x11f2eb)return _0x11f2eb;var _0x52d115=_0x11f2eb[Symbol['toPrimitive']];if(_0x52d115!==void 0x0){var _0x36e4e0=_0x52d115[_0x3a457f(0x248)](_0x11f2eb,_0x12244c||'default');if(E(_0x36e4e0)!=_0x3a457f(0x23d))return _0x36e4e0;throw TypeError(_0x3a457f(0x2b2));}return(_0x12244c===_0x3a457f(0x247)?String:Number)(_0x11f2eb);}function _e(_0x35cb5e){const _0x2654d3=_0x2c2698;var _0x4ffb45=ge(_0x35cb5e,_0x2654d3(0x247));return E(_0x4ffb45)==_0x2654d3(0x24d)?_0x4ffb45:_0x4ffb45+'';}function D(_0x43ff16,_0x4aa61a,_0x2721f5){return(_0x4aa61a=_e(_0x4aa61a))in _0x43ff16?Object['defineProperty'](_0x43ff16,_0x4aa61a,{'value':_0x2721f5,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x43ff16[_0x4aa61a]=_0x2721f5,_0x43ff16;}var O=class extends t['Disposable']{constructor(..._0x52033e){const _0x1c0c89=_0x2c2698;super(..._0x52033e),D(this,_0x1c0c89(0x1d4),new Map()),D(this,_0x1c0c89(0x1f1),new Map()),D(this,_0x1c0c89(0x212),new Map()),D(this,_0x1c0c89(0x28d),new i[(_0x1c0c89(0x1a0))]()),D(this,_0x1c0c89(0x238),this[_0x1c0c89(0x28d)]['asObservable']());}['getFormula'](_0x477a65,_0x39c40a){const _0x7cb1a0=_0x2c2698;var _0x357011;let _0x1bca3f=(_0x357011=this['_resources'][_0x7cb1a0(0x2a5)](_0x477a65))==null?void 0x0:_0x357011[_0x7cb1a0(0x276)][_0x39c40a];return _0x1bca3f?t[_0x7cb1a0(0x234)][_0x7cb1a0(0x25d)](_0x1bca3f):void 0x0;}[_0x2c2698(0x2a0)](_0x2db78a){const _0x557fa4=_0x2c2698;var _0x130e3a;return t['Tools']['deepClone'](((_0x130e3a=this[_0x557fa4(0x1d4)][_0x557fa4(0x2a5)](_0x2db78a))==null?void 0x0:_0x130e3a['formulas'])??{});}['getResource'](_0x4a7211){const _0x5a0d90=_0x2c2698;let _0x1d0aae=this['_resources'][_0x5a0d90(0x2a5)](_0x4a7211);return _0x1d0aae?t[_0x5a0d90(0x234)][_0x5a0d90(0x25d)](_0x1d0aae):void 0x0;}[_0x2c2698(0x229)](_0x5098bc,_0x2aa882,_0x1a9c6c){return this['setFormulas'](_0x5098bc,{[_0x2aa882]:_0x1a9c6c});}['setResource'](_0x8e15ec,_0x197414){const _0x2f872b=_0x2c2698;return this[_0x2f872b(0x212)][_0x2f872b(0x27f)](_0x8e15ec)||!l(_0x197414)?!0x1:(this[_0x2f872b(0x1d4)]['set'](_0x8e15ec,t[_0x2f872b(0x234)]['deepClone'](_0x197414)),this[_0x2f872b(0x28d)]['next']({'unitId':_0x8e15ec}),!0x0);}[_0x2c2698(0x1ae)](_0x3b9dc0,_0x560dbb){const _0x5ee787=_0x2c2698;if(this[_0x5ee787(0x212)][_0x5ee787(0x27f)](_0x3b9dc0)||!Object[_0x5ee787(0x23c)](_0x560dbb)[_0x5ee787(0x1fa)]||!l({'schemaVersion':0x1,'formulas':_0x560dbb}))return!0x1;let _0x564ebd=this['_resources'][_0x5ee787(0x2a5)](_0x3b9dc0)??c(),_0xf6c0a7=t['Tools'][_0x5ee787(0x25d)](_0x564ebd);return Object[_0x5ee787(0x1c4)](_0xf6c0a7[_0x5ee787(0x276)],t['Tools']['deepClone'](_0x560dbb)),this[_0x5ee787(0x1d4)][_0x5ee787(0x255)](_0x3b9dc0,_0xf6c0a7),this[_0x5ee787(0x28d)][_0x5ee787(0x219)]({'unitId':_0x3b9dc0,'rangeIds':Object[_0x5ee787(0x23c)](_0x560dbb)}),!0x0;}[_0x2c2698(0x192)](_0x28ce46,_0x41b1b3){const _0x540b61=_0x2c2698;if(this[_0x540b61(0x212)][_0x540b61(0x27f)](_0x28ce46))return!0x1;let _0x141f38=this[_0x540b61(0x1d4)][_0x540b61(0x2a5)](_0x28ce46);if(!(_0x141f38!=null&&_0x141f38[_0x540b61(0x276)][_0x41b1b3]))return!0x1;let _0x1f5168=t[_0x540b61(0x234)][_0x540b61(0x25d)](_0x141f38);return delete _0x1f5168['formulas'][_0x41b1b3],this[_0x540b61(0x1d4)][_0x540b61(0x255)](_0x28ce46,_0x1f5168),this[_0x540b61(0x28d)]['next']({'unitId':_0x28ce46,'rangeIds':[_0x41b1b3]}),!0x0;}[_0x2c2698(0x25e)](_0x201107,_0x626720){const _0xc3fd9b=_0x2c2698;return _0x626720&&typeof _0x626720=='object'&&_0xc3fd9b(0x1a8)in _0x626720&&_0x626720[_0xc3fd9b(0x1a8)]!==0x1?(this['_preserveInvalid'](_0x201107,_0x626720,_0xc3fd9b(0x262)),!0x1):l(_0x626720)?(this['_resources'][_0xc3fd9b(0x255)](_0x201107,t['Tools']['deepClone'](_0x626720)),this[_0xc3fd9b(0x1f1)][_0xc3fd9b(0x1cc)](_0x201107),this[_0xc3fd9b(0x212)][_0xc3fd9b(0x1cc)](_0x201107),this[_0xc3fd9b(0x28d)]['next']({'unitId':_0x201107}),!0x0):(this[_0xc3fd9b(0x226)](_0x201107,_0x626720,_0xc3fd9b(0x1e0)),!0x1);}[_0x2c2698(0x1c8)](_0x45386f){const _0x5a09c2=_0x2c2698;let _0x4a034d=this[_0x5a09c2(0x1d4)][_0x5a09c2(0x2a5)](_0x45386f);return _0x4a034d?t['Tools']['deepClone'](_0x4a034d):this[_0x5a09c2(0x1f1)]['has'](_0x45386f)?t[_0x5a09c2(0x234)]['deepClone'](this[_0x5a09c2(0x1f1)][_0x5a09c2(0x2a5)](_0x45386f)):c();}[_0x2c2698(0x26c)](_0x113778){const _0x2fb7f2=_0x2c2698;return this['_loadErrors'][_0x2fb7f2(0x2a5)](_0x113778);}[_0x2c2698(0x233)](_0xa55bfa){const _0x4cf869=_0x2c2698;this[_0x4cf869(0x1d4)][_0x4cf869(0x1cc)](_0xa55bfa),this[_0x4cf869(0x1f1)][_0x4cf869(0x1cc)](_0xa55bfa),this['_loadErrors'][_0x4cf869(0x1cc)](_0xa55bfa),this[_0x4cf869(0x28d)][_0x4cf869(0x219)]({'unitId':_0xa55bfa});}[_0x2c2698(0x1ce)](){const _0x51953e=_0x2c2698;this[_0x51953e(0x1d4)][_0x51953e(0x28f)](),this[_0x51953e(0x1f1)][_0x51953e(0x28f)](),this['_loadErrors'][_0x51953e(0x28f)](),this[_0x51953e(0x28d)]['complete'](),super['dispose']();}[_0x2c2698(0x226)](_0x3d57a9,_0x480193,_0x38ea16){const _0x4b2c49=_0x2c2698;this[_0x4b2c49(0x1d4)][_0x4b2c49(0x1cc)](_0x3d57a9),this[_0x4b2c49(0x1f1)]['set'](_0x3d57a9,t[_0x4b2c49(0x234)][_0x4b2c49(0x25d)](_0x480193)),this[_0x4b2c49(0x212)][_0x4b2c49(0x255)](_0x3d57a9,_0x38ea16),this[_0x4b2c49(0x28d)]['next']({'unitId':_0x3d57a9});}};let ve=function(_0x3fde6c){const _0x1b5a80=_0x2c2698;return _0x3fde6c[_0x1b5a80(0x21d)]=_0x1b5a80(0x27a),_0x3fde6c['PENDING']=_0x1b5a80(0x21f),_0x3fde6c[_0x1b5a80(0x1b3)]=_0x1b5a80(0x1c1),_0x3fde6c[_0x1b5a80(0x213)]='error',_0x3fde6c;}({});function k(_0xaf6c7e,_0x1d750a){return function(_0x38ed59,_0x1c3f59){_0x1d750a(_0x38ed59,_0x1c3f59,_0xaf6c7e);};}function A(_0x5d8413,_0x79c087,_0x135d89,_0x456b93){const _0x1cc2c2=_0x2c2698;var _0x1eee21=arguments[_0x1cc2c2(0x1fa)],_0x202ad8=_0x1eee21<0x3?_0x79c087:_0x456b93===null?_0x456b93=Object[_0x1cc2c2(0x2ae)](_0x79c087,_0x135d89):_0x456b93,_0x21ea6c;if(typeof Reflect==_0x1cc2c2(0x23d)&&typeof Reflect[_0x1cc2c2(0x1b1)]==_0x1cc2c2(0x249))_0x202ad8=Reflect['decorate'](_0x5d8413,_0x79c087,_0x135d89,_0x456b93);else{for(var _0x40b6a2=_0x5d8413[_0x1cc2c2(0x1fa)]-0x1;_0x40b6a2>=0x0;_0x40b6a2--)(_0x21ea6c=_0x5d8413[_0x40b6a2])&&(_0x202ad8=(_0x1eee21<0x3?_0x21ea6c(_0x202ad8):_0x1eee21>0x3?_0x21ea6c(_0x79c087,_0x135d89,_0x202ad8):_0x21ea6c(_0x79c087,_0x135d89))||_0x202ad8);}return _0x1eee21>0x3&&_0x202ad8&&Object[_0x1cc2c2(0x1b2)](_0x79c087,_0x135d89,_0x202ad8),_0x202ad8;}let j=class extends t[_0x2c2698(0x188)]{constructor(_0x42790e,_0xde12ae,_0x5f4cb9){const _0xac216c=_0x2c2698;super(),this[_0xac216c(0x1f7)]=_0x42790e,this[_0xac216c(0x263)]=_0xde12ae,this[_0xac216c(0x17f)]=_0x5f4cb9,D(this,'_registrations',new Map()),D(this,_0xac216c(0x1fb),new Map()),D(this,_0xac216c(0x1e5),new i['Subject']()),D(this,_0xac216c(0x27b),this[_0xac216c(0x1e5)][_0xac216c(0x19f)]()),this[_0xac216c(0x1d6)](this[_0xac216c(0x263)][_0xac216c(0x1ed)][_0xac216c(0x298)](_0x25b1af=>{const _0x1bc3e5=_0xac216c;for(let _0x4718b6 of Object[_0x1bc3e5(0x291)](_0x25b1af))for(let _0x2ee61c of Object['values'](_0x4718b6))_0x2ee61c[_0x1bc3e5(0x1db)](_0x30661c=>this[_0x1bc3e5(0x2a2)](_0x30661c));}));}['syncUnit'](_0x2f0846){const _0x1d1f1a=_0x2c2698;var _0xefcf8;let _0x589cc3=_0x2f0846[_0x1d1f1a(0x273)](),_0x4115df=((_0xefcf8=_0x2f0846[_0x1d1f1a(0x19a)]()[_0x1d1f1a(0x1ea)])==null||(_0xefcf8=_0xefcf8['customRanges'])==null?void 0x0:_0xefcf8[_0x1d1f1a(0x18a)](g))??[],_0xf3c001=this[_0x1d1f1a(0x1f7)][_0x1d1f1a(0x2a0)](_0x589cc3),_0x20da0f=new Set();for(let _0x50515b of _0x4115df){let _0x11c441=_0xf3c001[_0x50515b[_0x1d1f1a(0x29c)]];_0x11c441&&(_0x20da0f[_0x1d1f1a(0x1cb)](M(_0x589cc3,_0x50515b[_0x1d1f1a(0x29c)])),this[_0x1d1f1a(0x1fe)]({'unitId':_0x589cc3,'rangeId':_0x50515b[_0x1d1f1a(0x29c)]},_0x11c441));}for(let _0x539be3 of Array[_0x1d1f1a(0x21b)](this[_0x1d1f1a(0x26a)][_0x1d1f1a(0x291)]()))_0x539be3[_0x1d1f1a(0x237)]===_0x589cc3&&!_0x20da0f[_0x1d1f1a(0x27f)](M(_0x539be3[_0x1d1f1a(0x237)],_0x539be3['rangeId']))&&this[_0x1d1f1a(0x26b)](_0x539be3);}[_0x2c2698(0x1fe)](_0x2a7fa6,_0x44ed71){const _0x3654dd=_0x2c2698;let _0x46dec1=M(_0x2a7fa6[_0x3654dd(0x237)],_0x2a7fa6[_0x3654dd(0x29c)]),_0x4ad95f=this['_registrations']['get'](_0x46dec1),_0x1d1846=this[_0x3654dd(0x17f)][_0x3654dd(0x272)](_0x2a7fa6['unitId']);if(_0x4ad95f&&_0x4ad95f['config'][_0x3654dd(0x261)]===_0x44ed71['formula']&&_0x4ad95f[_0x3654dd(0x1dc)]===_0x1d1846){_0x4ad95f['config']=_0x44ed71;let _0x37afac=_0x4ad95f[_0x3654dd(0x244)]?this[_0x3654dd(0x263)]['getFormulaValueSync'](_0x4ad95f[_0x3654dd(0x237)],_0x4ad95f[_0x3654dd(0x237)],_0x4ad95f['formulaId'])??void 0x0:void 0x0;_0x4ad95f[_0x3654dd(0x267)]=_0x37afac,this[_0x3654dd(0x1f2)](_0x46dec1,N(_0x44ed71,_0x37afac));return;}_0x4ad95f!=null&&_0x4ad95f[_0x3654dd(0x244)]&&this['_deleteRegistration'](_0x4ad95f);let _0x9cdb59={..._0x2a7fa6,'config':_0x44ed71,'referenceRevision':_0x1d1846,'presentation':N(_0x44ed71,void 0x0)};if(this['_registrations'][_0x3654dd(0x255)](_0x46dec1,_0x9cdb59),!_0x44ed71[_0x3654dd(0x261)]['trim']())return;let _0x3f484e=this[_0x3654dd(0x263)]['registerFormulaWithRange'](_0x2a7fa6[_0x3654dd(0x237)],_0x2a7fa6[_0x3654dd(0x237)],_0x44ed71['formula'],void 0x0,{'rangeId':_0x2a7fa6['rangeId']},r[_0x3654dd(0x286)][_0x3654dd(0x1d3)],_0x2a7fa6[_0x3654dd(0x29c)]);_0x9cdb59['formulaId']=_0x3f484e,this['_formulaKeys']['set'](_0x3f484e,_0x46dec1);}['unregister'](_0x165184){const _0x588090=_0x2c2698;let _0x15bb92=M(_0x165184[_0x588090(0x237)],_0x165184['rangeId']),_0x290510=this[_0x588090(0x26a)][_0x588090(0x2a5)](_0x15bb92);_0x290510&&(this[_0x588090(0x1f4)](_0x290510),this['_registrations'][_0x588090(0x1cc)](_0x15bb92));}[_0x2c2698(0x1e7)](_0x297718){const _0x543565=_0x2c2698;for(let _0x14fc41 of Array[_0x543565(0x21b)](this[_0x543565(0x26a)]['values']()))_0x14fc41[_0x543565(0x237)]===_0x297718&&this['unregister'](_0x14fc41);}[_0x2c2698(0x225)](_0x19ed6f){const _0x155f29=_0x2c2698;var _0x5488a4;return(_0x5488a4=this[_0x155f29(0x26a)][_0x155f29(0x2a5)](M(_0x19ed6f[_0x155f29(0x237)],_0x19ed6f['rangeId'])))==null?void 0x0:_0x5488a4[_0x155f29(0x1bc)];}['getResult'](_0x5e59e0){const _0xfc09b3=_0x2c2698;let _0x863604=this[_0xfc09b3(0x26a)]['get'](M(_0x5e59e0[_0xfc09b3(0x237)],_0x5e59e0['rangeId']));return _0x863604?P(_0x863604):void 0x0;}[_0x2c2698(0x1e4)](){const _0x3d95da=_0x2c2698;return Array['from'](this[_0x3d95da(0x26a)][_0x3d95da(0x291)](),_0x23d98d=>({'identity':{'unitId':_0x23d98d[_0x3d95da(0x237)],'rangeId':_0x23d98d[_0x3d95da(0x29c)]},'config':_0x23d98d[_0x3d95da(0x1b0)],'referenceRevision':_0x23d98d[_0x3d95da(0x1dc)],..._0x23d98d[_0x3d95da(0x267)]?{'liveResult':_0x23d98d[_0x3d95da(0x267)]}:null}));}[_0x2c2698(0x1ce)](){const _0x4e9717=_0x2c2698;for(let _0x4f6e7d of this[_0x4e9717(0x26a)][_0x4e9717(0x291)]())this[_0x4e9717(0x1f4)](_0x4f6e7d);this[_0x4e9717(0x26a)][_0x4e9717(0x28f)](),this[_0x4e9717(0x1fb)][_0x4e9717(0x28f)](),this[_0x4e9717(0x1e5)]['complete'](),super[_0x4e9717(0x1ce)]();}['_updateFormulaResult'](_0x405f4d){const _0x429373=_0x2c2698;let _0x890a54=this[_0x429373(0x1fb)]['get'](_0x405f4d[_0x429373(0x244)]),_0x3b35fa=_0x890a54?this['_registrations']['get'](_0x890a54):void 0x0;_0x890a54&&_0x3b35fa&&(_0x3b35fa[_0x429373(0x267)]=_0x405f4d,this[_0x429373(0x1f2)](_0x890a54,N(_0x3b35fa[_0x429373(0x1b0)],_0x405f4d)));}['_setPresentation'](_0x2199d9,_0x30c236){const _0x5de2e0=_0x2c2698;var _0x200910,_0x2802bb;let _0xc10590=this['_registrations'][_0x5de2e0(0x2a5)](_0x2199d9);if(!_0xc10590||ye(_0xc10590[_0x5de2e0(0x1bc)],_0x30c236))return;let _0x103a28=_0xc10590[_0x5de2e0(0x1bc)],_0x5da62b=P(_0xc10590);_0xc10590['presentation']=_0x30c236,this[_0x5de2e0(0x1e5)][_0x5de2e0(0x219)]({'unitId':_0xc10590[_0x5de2e0(0x237)],'rangeId':_0xc10590[_0x5de2e0(0x29c)],'presentation':_0x30c236,'previousPresentation':_0x103a28,'result':P(_0xc10590),'previousResult':{..._0x5da62b,..._0x103a28,'value':(_0x200910=_0x103a28['cell'])==null?void 0x0:_0x200910['v'],'valueType':((_0x2802bb=_0x103a28[_0x5de2e0(0x29a)])==null?void 0x0:_0x2802bb['t'])??void 0x0}});}[_0x2c2698(0x1f4)](_0x1da55d){const _0x52fff7=_0x2c2698;_0x1da55d['formulaId']&&(this[_0x52fff7(0x263)][_0x52fff7(0x2ad)](_0x1da55d[_0x52fff7(0x237)],_0x1da55d[_0x52fff7(0x237)],[_0x1da55d[_0x52fff7(0x244)]]),this[_0x52fff7(0x1fb)][_0x52fff7(0x1cc)](_0x1da55d[_0x52fff7(0x244)]));}};j=A([k(0x0,(0x0,t[_0x2c2698(0x256)])(O)),k(0x1,(0x0,t['Inject'])(r['RegisterOtherFormulaService'])),k(0x2,(0x0,t['Inject'])(e['HostExternalReferenceModel']))],j);function M(_0x22c0f3,_0x42ed4f){return _0x22c0f3+'\x00'+_0x42ed4f;}function N(_0x451926,_0x37f977){const _0x57557f=_0x2c2698;return(0x0,e[_0x57557f(0x264)])({'numberFormat':_0x451926[_0x57557f(0x1e9)],'lastValue':_0x451926[_0x57557f(0x257)],'result':_0x37f977});}function P(_0x4847be){const _0x9cea2f=_0x2c2698;var _0x79fff3,_0xa3c0f8,_0x23187c;let _0x5d179f=_0x4847be[_0x9cea2f(0x1bc)],_0x295893=_0x4847be['config'][_0x9cea2f(0x261)][_0x9cea2f(0x299)]()?_0x5d179f[_0x9cea2f(0x1ad)]||_0x5d179f[_0x9cea2f(0x29a)]==null?_0x9cea2f(0x21f):((_0x79fff3=_0x4847be[_0x9cea2f(0x267)])==null?void 0x0:_0x79fff3[_0x9cea2f(0x1e2)])===r['FormulaResultStatus']['ERROR']?'error':'success':'empty';return{..._0x5d179f,'status':_0x295893,'value':(_0xa3c0f8=_0x5d179f[_0x9cea2f(0x29a)])==null?void 0x0:_0xa3c0f8['v'],'valueType':((_0x23187c=_0x5d179f[_0x9cea2f(0x29a)])==null?void 0x0:_0x23187c['t'])??void 0x0};}function ye(_0x2bf8bb,_0x35e5f7){const _0x12a70a=_0x2c2698;var _0x44bea2,_0x410223,_0x3ce78a,_0x149f10;return _0x2bf8bb[_0x12a70a(0x224)]===_0x35e5f7[_0x12a70a(0x224)]&&_0x2bf8bb[_0x12a70a(0x252)]===_0x35e5f7[_0x12a70a(0x252)]&&_0x2bf8bb[_0x12a70a(0x23f)]===_0x35e5f7[_0x12a70a(0x23f)]&&_0x2bf8bb[_0x12a70a(0x239)]===_0x35e5f7[_0x12a70a(0x239)]&&_0x2bf8bb[_0x12a70a(0x1ad)]===_0x35e5f7[_0x12a70a(0x1ad)]&&((_0x44bea2=_0x2bf8bb['cell'])==null?void 0x0:_0x44bea2['t'])===((_0x410223=_0x35e5f7['cell'])==null?void 0x0:_0x410223['t'])&&Object['is']((_0x3ce78a=_0x2bf8bb[_0x12a70a(0x29a)])==null?void 0x0:_0x3ce78a['v'],(_0x149f10=_0x35e5f7[_0x12a70a(0x29a)])==null?void 0x0:_0x149f10['v']);}const F={'id':_0x2c2698(0x18f),'type':t[_0x2c2698(0x1ff)][_0x2c2698(0x1e3)],'handler':(_0x2ee4de,_0x5738ca)=>!(_0x5738ca!=null&&_0x5738ca[_0x2c2698(0x237)])||!_0x5738ca[_0x2c2698(0x29c)]||!_0x5738ca[_0x2c2698(0x1b0)]?!0x1:_0x2ee4de[_0x2c2698(0x2a5)](O)[_0x2c2698(0x229)](_0x5738ca[_0x2c2698(0x237)],_0x5738ca[_0x2c2698(0x29c)],_0x5738ca[_0x2c2698(0x1b0)])},I={'id':_0x2c2698(0x29f),'type':t[_0x2c2698(0x1ff)][_0x2c2698(0x1e3)],'handler':(_0x59137a,_0x197a3e)=>!(_0x197a3e!=null&&_0x197a3e['unitId'])||!_0x197a3e['rangeId']?!0x1:_0x59137a[_0x2c2698(0x2a5)](O)['removeFormula'](_0x197a3e[_0x2c2698(0x237)],_0x197a3e[_0x2c2698(0x29c)])},L={'id':_0x2c2698(0x281),'type':t[_0x2c2698(0x1ff)][_0x2c2698(0x1e3)],'handler':(_0x1750ca,_0x2cc4a8)=>!(_0x2cc4a8!=null&&_0x2cc4a8[_0x2c2698(0x237)])||!_0x2cc4a8[_0x2c2698(0x253)]?!0x1:_0x1750ca[_0x2c2698(0x2a5)](O)[_0x2c2698(0x269)](_0x2cc4a8[_0x2c2698(0x237)],_0x2cc4a8[_0x2c2698(0x253)])},R={'id':_0x2c2698(0x209),'type':t[_0x2c2698(0x1ff)][_0x2c2698(0x1e3)],'handler':(_0x5fbcb9,_0x4aef74)=>{const _0x2a6e6c=_0x2c2698;if(!(_0x4aef74!=null&&_0x4aef74[_0x2a6e6c(0x237)])||!_0x4aef74[_0x2a6e6c(0x28e)][_0x2a6e6c(0x1fa)])return!0x1;let _0x22012b=_0x5fbcb9[_0x2a6e6c(0x2a5)](O),_0x583383=_0x5fbcb9[_0x2a6e6c(0x2a5)](e[_0x2a6e6c(0x1ba)]),_0x3372ec=_0x22012b['getResource'](_0x4aef74[_0x2a6e6c(0x237)]);if(!_0x3372ec)return!0x1;let _0x33f340=t[_0x2a6e6c(0x234)][_0x2a6e6c(0x25d)](_0x3372ec),_0x46ce0d=!0x1;for(let _0x2214b4 of _0x4aef74[_0x2a6e6c(0x28e)]){var _0xbead03,_0x3d553e,_0x3c286d,_0x302db6;let _0x47ddca=_0x33f340[_0x2a6e6c(0x276)][_0x2214b4[_0x2a6e6c(0x29c)]];_0x47ddca&&_0x47ddca['formula']===_0x2214b4['expectedFormula']&&((_0xbead03=_0x47ddca[_0x2a6e6c(0x1e9)])==null?void 0x0:_0xbead03[_0x2a6e6c(0x23f)])===_0x2214b4['expectedNumberFormat']&&_0x583383['getRevision'](_0x4aef74[_0x2a6e6c(0x237)])===_0x2214b4[_0x2a6e6c(0x222)]&&(((_0x3d553e=_0x47ddca[_0x2a6e6c(0x257)])==null?void 0x0:_0x3d553e['v'])!==_0x2214b4[_0x2a6e6c(0x257)]['v']||((_0x3c286d=_0x47ddca[_0x2a6e6c(0x257)])==null?void 0x0:_0x3c286d['t'])!==_0x2214b4[_0x2a6e6c(0x257)]['t']||((_0x302db6=_0x47ddca[_0x2a6e6c(0x257)])==null?void 0x0:_0x302db6[_0x2a6e6c(0x23f)])!==_0x2214b4[_0x2a6e6c(0x257)][_0x2a6e6c(0x23f)])&&(_0x47ddca[_0x2a6e6c(0x257)]=t[_0x2a6e6c(0x234)][_0x2a6e6c(0x25d)](_0x2214b4[_0x2a6e6c(0x257)]),_0x46ce0d=!0x0);}return!_0x46ce0d||_0x22012b[_0x2a6e6c(0x269)](_0x4aef74[_0x2a6e6c(0x237)],_0x33f340);}},z={'id':_0x2c2698(0x1c7),'type':t[_0x2c2698(0x1ff)][_0x2c2698(0x25a)],'handler':(_0x444c8e,_0x399975)=>{const _0x229011=_0x2c2698;if(!(_0x399975!=null&&_0x399975[_0x229011(0x261)]['trim']()))return!0x1;let _0x1aab99=K(_0x444c8e,_0x399975['unitId'],'');if(!_0x1aab99)return!0x1;let _0x577df6=xe(_0x399975[_0x229011(0x23e)],_0x1aab99['body'],be(_0x444c8e,_0x1aab99[_0x229011(0x237)]));if(!_0x577df6)return!0x1;let _0x8644c3=Se(_0x444c8e,_0x1aab99[_0x229011(0x237)],_0x399975['formula'],_0x399975[_0x229011(0x1b5)]??[]);if(!_0x8644c3)return!0x1;let _0x1ce83c=Ce(_0x1aab99['body'],_0x1aab99['model'],_0x1aab99[_0x229011(0x237)]),_0x39c0df=we({'documentData':_0x1aab99[_0x229011(0x1a2)],'resource':_0x1aab99[_0x229011(0x253)],'rangeId':_0x1ce83c,'config':{'formula':_0x399975['formula'],..._0x399975[_0x229011(0x1e9)]?{'numberFormat':_0x399975[_0x229011(0x1e9)]}:null},'startOffset':_0x577df6[_0x229011(0x23b)],'endOffset':_0x577df6[_0x229011(0x2a6)]});if(!_0x39c0df)return!0x1;let _0x38269c=(0x0,e['buildUpsertHostExternalReferenceMutations'])(_0x444c8e,_0x1aab99[_0x229011(0x237)],_0x8644c3);return!_0x38269c||!q({'accessor':_0x444c8e,'document':_0x1aab99[_0x229011(0x22e)],'unitId':_0x1aab99[_0x229011(0x237)],'trigger':z['id'],'rangeId':_0x1ce83c,'previousResource':_0x1aab99[_0x229011(0x253)],'nextResource':_0x39c0df['nextResource'],'previousDocumentData':_0x1aab99[_0x229011(0x1a2)],'nextDocumentData':_0x39c0df[_0x229011(0x217)],'cursorOffset':_0x39c0df[_0x229011(0x29b)],'externalMutations':_0x38269c})?!0x1:{'rangeId':_0x1ce83c,'startOffset':_0x39c0df[_0x229011(0x29b)]-0x1,'endOffset':_0x39c0df[_0x229011(0x29b)]};}},B={'id':'docs-formula.command.update','type':t[_0x2c2698(0x1ff)][_0x2c2698(0x25a)],'handler':(_0x1e2d4e,_0x1ea6e6)=>{const _0xb0a6df=_0x2c2698;if(!(_0x1ea6e6!=null&&_0x1ea6e6[_0xb0a6df(0x29c)])||!_0x1ea6e6[_0xb0a6df(0x261)][_0xb0a6df(0x299)]())return!0x1;let _0x5db81c=K(_0x1e2d4e,_0x1ea6e6['unitId'],''),_0x3b228e=_0x5db81c==null?void 0x0:_0x5db81c[_0xb0a6df(0x211)][_0xb0a6df(0x1da)](_0x5db81c[_0xb0a6df(0x237)],_0x1ea6e6['rangeId']),_0x474560=_0x5db81c?_(_0x5db81c[_0xb0a6df(0x1a2)][_0xb0a6df(0x1ea)],_0x1ea6e6[_0xb0a6df(0x29c)]):void 0x0;if(!_0x5db81c||!_0x3b228e||!_0x474560)return!0x1;let _0x46a982=Se(_0x1e2d4e,_0x5db81c[_0xb0a6df(0x237)],_0x1ea6e6[_0xb0a6df(0x261)],_0x1ea6e6[_0xb0a6df(0x1b5)]??[]);if(!_0x46a982)return!0x1;let _0x3ec6d4=(0x0,e[_0xb0a6df(0x1bf)])(_0x1e2d4e,_0x5db81c[_0xb0a6df(0x237)],_0x46a982);if(!_0x3ec6d4)return!0x1;let _0x4fc009=je(_0x5db81c['resource']);return _0x4fc009[_0xb0a6df(0x276)][_0x1ea6e6[_0xb0a6df(0x29c)]]={'formula':_0x1ea6e6['formula'],..._0x1ea6e6[_0xb0a6df(0x1e9)]?{'numberFormat':_0x1ea6e6[_0xb0a6df(0x1e9)]}:_0x3b228e[_0xb0a6df(0x1e9)]?{'numberFormat':_0x3b228e[_0xb0a6df(0x1e9)]}:null},q({'accessor':_0x1e2d4e,'document':_0x5db81c[_0xb0a6df(0x22e)],'unitId':_0x5db81c['unitId'],'trigger':B['id'],'rangeId':_0x1ea6e6[_0xb0a6df(0x29c)],'previousResource':_0x5db81c['resource'],'nextResource':_0x4fc009,'cursorOffset':_0x474560[_0xb0a6df(0x19e)]+0x1,'externalMutations':_0x3ec6d4});}},V={'id':'docs-formula.command.set-number-format','type':t[_0x2c2698(0x1ff)][_0x2c2698(0x25a)],'handler':(_0xcd6272,_0x4dc728)=>{const _0x25d8d8=_0x2c2698;if(!(_0x4dc728!=null&&_0x4dc728[_0x25d8d8(0x29c)]))return!0x1;let _0x3a087f=K(_0xcd6272,_0x4dc728[_0x25d8d8(0x237)],''),_0x59bc24=_0x3a087f==null?void 0x0:_0x3a087f[_0x25d8d8(0x211)]['getFormula'](_0x3a087f['unitId'],_0x4dc728[_0x25d8d8(0x29c)]),_0x15017a=_0x3a087f?_(_0x3a087f[_0x25d8d8(0x1a2)][_0x25d8d8(0x1ea)],_0x4dc728['rangeId']):void 0x0;if(!_0x3a087f||!_0x59bc24||!_0x15017a)return!0x1;let _0x1e599d=je(_0x3a087f[_0x25d8d8(0x253)]);return _0x1e599d[_0x25d8d8(0x276)][_0x4dc728[_0x25d8d8(0x29c)]]={..._0x59bc24,..._0x4dc728[_0x25d8d8(0x1e9)]?{'numberFormat':_0x4dc728['numberFormat']}:null},_0x4dc728[_0x25d8d8(0x1e9)]||delete _0x1e599d[_0x25d8d8(0x276)][_0x4dc728[_0x25d8d8(0x29c)]][_0x25d8d8(0x1e9)],q({'accessor':_0xcd6272,'document':_0x3a087f[_0x25d8d8(0x22e)],'unitId':_0x3a087f['unitId'],'trigger':V['id'],'rangeId':_0x4dc728[_0x25d8d8(0x29c)],'previousResource':_0x3a087f[_0x25d8d8(0x253)],'nextResource':_0x1e599d,'cursorOffset':_0x15017a[_0x25d8d8(0x19e)]+0x1,'externalMutations':{}});}},H={'id':'docs-formula.command.remove','type':t[_0x2c2698(0x1ff)][_0x2c2698(0x25a)],'handler':(_0x5de58a,_0x44e2be)=>G(_0x5de58a,_0x44e2be,'',H['id'])},U={'id':_0x2c2698(0x20b),'type':t['CommandType'][_0x2c2698(0x25a)],'handler':(_0x6854e0,_0xe009a5)=>G(_0x6854e0,_0xe009a5,(_0xe009a5==null?void 0x0:_0xe009a5[_0x2c2698(0x224)])??'',U['id'])},W={'id':_0x2c2698(0x25b),'type':t[_0x2c2698(0x1ff)][_0x2c2698(0x25a)],'handler':(_0x512d20,_0x3d0a6d)=>{const _0x33c37a=_0x2c2698;if(!(_0x3d0a6d!=null&&_0x3d0a6d[_0x33c37a(0x29c)]))return!0x1;let _0x507d17=K(_0x512d20,_0x3d0a6d[_0x33c37a(0x237)],'');if(!_0x507d17)return!0x1;let _0x13e956=_0x512d20[_0x33c37a(0x2a5)](j)[_0x33c37a(0x2af)]({'unitId':_0x507d17['unitId'],'rangeId':_0x3d0a6d[_0x33c37a(0x29c)]});return _0x13e956?G(_0x512d20,_0x3d0a6d,_0x13e956['text'],W['id']):!0x1;}};function G(_0x7521c7,_0x4719a5,_0x5a5229,_0x5f2fb6){const _0x47216f=_0x2c2698;if(!(_0x4719a5!=null&&_0x4719a5['rangeId']))return!0x1;let _0x371b00=K(_0x7521c7,_0x4719a5[_0x47216f(0x237)],'');if(!_0x371b00)return!0x1;let _0x55b986=h({'documentData':_0x371b00[_0x47216f(0x1a2)],'resource':_0x371b00[_0x47216f(0x253)],'rangeId':_0x4719a5['rangeId'],'text':_0x5a5229});return _0x55b986?q({'accessor':_0x7521c7,'document':_0x371b00['document'],'unitId':_0x371b00[_0x47216f(0x237)],'trigger':_0x5f2fb6,'rangeId':_0x4719a5[_0x47216f(0x29c)],'previousResource':_0x371b00['resource'],'nextResource':_0x55b986[_0x47216f(0x18e)],'previousDocumentData':_0x371b00[_0x47216f(0x1a2)],'nextDocumentData':_0x55b986[_0x47216f(0x217)],'cursorOffset':_0x55b986[_0x47216f(0x29b)],'externalMutations':{}}):!0x1;}function K(_0x2b8826,_0x494511,_0x49ca18){const _0x229715=_0x2c2698;if(_0x49ca18)return null;let _0x2bc228=_0x2b8826[_0x229715(0x2a5)](t[_0x229715(0x201)]),_0x3ac0ae=(_0x494511?_0x2bc228[_0x229715(0x1cd)](_0x494511,t['UniverInstanceType'][_0x229715(0x1b8)]):_0x2bc228[_0x229715(0x297)](t['UniverInstanceType'][_0x229715(0x1b8)]))??null;if(!_0x3ac0ae)return null;let _0x158362=_0x3ac0ae[_0x229715(0x19a)](),_0x4ac99b=_0x158362[_0x229715(0x1ea)];if(_0x158362['disabled']||!_0x4ac99b)return null;let _0x3f98af=_0x2b8826[_0x229715(0x2a5)](O);return _0x3f98af[_0x229715(0x26c)](_0x3ac0ae['getUnitId']())?null:{'document':_0x3ac0ae,'body':_0x4ac99b,'documentData':_0x158362,'model':_0x3f98af,'resource':_0x3f98af[_0x229715(0x1b4)](_0x3ac0ae[_0x229715(0x273)]())??c(),'unitId':_0x3ac0ae[_0x229715(0x273)]()};}function be(_0x5eb42e,_0x41814c){const _0x4d1d=_0x2c2698;var _0x5f052e;return(_0x5f052e=_0x5eb42e[_0x4d1d(0x2a5)](n['DocSelectionManagerService'])[_0x4d1d(0x28c)]({'subUnitId':_0x41814c,'unitId':_0x41814c}))==null?void 0x0:_0x5f052e[0x0];}function xe(_0x5c88e6,_0x28ac7c,_0x18b425){const _0x417379=_0x2c2698;if((_0x5c88e6==null?void 0x0:_0x5c88e6[_0x417379(0x1ca)])===_0x417379(0x271)){var _0x268b8a;let _0xf3d5a8=((_0x268b8a=_0x28ac7c[_0x417379(0x187)])==null?void 0x0:_0x268b8a[_0x417379(0x18a)](_0x273e7e=>_0x273e7e[_0x417379(0x193)]===_0x5c88e6[_0x417379(0x193)]))??[];if(_0xf3d5a8[_0x417379(0x1fa)]!==0x1)return null;let _0x5e2800=_0xf3d5a8[0x0],_0x31795c=(0x0,t[_0x417379(0x2ab)])(_0x28ac7c,_0x5e2800),_0x2a5f04=_0x5e2800[_0x417379(0x17b)]-_0x31795c,_0x56f743=_0x5c88e6[_0x417379(0x280)]==='end'?_0x2a5f04:_0x5c88e6[_0x417379(0x280)];if(!Number[_0x417379(0x20e)](_0x56f743)||_0x56f743<0x0||_0x56f743>_0x2a5f04)return null;let _0x180e01=_0x31795c+_0x56f743;return{'startOffset':_0x180e01,'endOffset':_0x180e01};}if((_0x5c88e6==null?void 0x0:_0x5c88e6[_0x417379(0x1ca)])==='range')return!Number[_0x417379(0x20e)](_0x5c88e6['startOffset'])||!Number['isInteger'](_0x5c88e6[_0x417379(0x2a6)])?null:{'startOffset':Math[_0x417379(0x278)](_0x5c88e6[_0x417379(0x23b)],_0x5c88e6[_0x417379(0x2a6)]),'endOffset':Math[_0x417379(0x29d)](_0x5c88e6['startOffset'],_0x5c88e6[_0x417379(0x2a6)])};let _0x37acc4=(_0x5c88e6==null?void 0x0:_0x5c88e6[_0x417379(0x1ca)])==='selection'?_0x5c88e6['selection']:_0x18b425;return!_0x37acc4||_0x37acc4[_0x417379(0x189)]?null:{'startOffset':Math[_0x417379(0x278)](_0x37acc4[_0x417379(0x23b)],_0x37acc4['endOffset']),'endOffset':Math[_0x417379(0x29d)](_0x37acc4[_0x417379(0x23b)],_0x37acc4['endOffset'])};}function Se(_0xff1bd8,_0x332146,_0xee3248,_0x2e96d6){const _0xd2aa7d=_0x2c2698;let _0x22046b=_0xff1bd8[_0xd2aa7d(0x2a5)](r[_0xd2aa7d(0x194)]),_0x19b5a5=_0xee3248[_0xd2aa7d(0x20c)]('=')?_0xee3248[_0xd2aa7d(0x25f)](0x1):_0xee3248,_0x528edf=_0x22046b['sequenceNodesBuilder'](_0x19b5a5);if(!_0x528edf)return null;let _0x43a723=_0xff1bd8[_0xd2aa7d(0x2a5)](e[_0xd2aa7d(0x1ba)]),_0x499056=(0x0,e['resolveHostFormulaExternalReferences'])({'qualifiers':(0x0,e[_0xd2aa7d(0x1f5)])(_0x528edf),'explicitReferences':_0x2e96d6??[],'resolveBinding':_0x27a0f9=>_0x43a723[_0xd2aa7d(0x243)](_0x332146,_0x27a0f9)});return _0x499056['status']===_0xd2aa7d(0x23a)?_0x499056['references']:null;}function Ce(_0x1ab10c,_0x11b003,_0x453a80){const _0x341ffb=_0x2c2698;var _0x4563a4;let _0x34b9ba=(0x0,t[_0x341ffb(0x22d)])(0x6);for(;_0x1ab10c!=null&&(_0x4563a4=_0x1ab10c[_0x341ffb(0x215)])!=null&&_0x4563a4[_0x341ffb(0x1af)](_0x44b484=>_0x44b484[_0x341ffb(0x29c)]===_0x34b9ba)||_0x11b003['getFormula'](_0x453a80,_0x34b9ba);)_0x34b9ba=(0x0,t['generateRandomId'])(0x6);return _0x34b9ba;}function we(_0x18f723){try{return te(_0x18f723);}catch(_0x2aae80){if(_0x2aae80 instanceof m)return null;throw _0x2aae80;}}function Te(_0x55c857){const _0x43ae36=_0x2c2698;let _0x72849c=_0x55c857[_0x43ae36(0x1aa)]&&_0x55c857['nextDocumentData']?De(_0x55c857[_0x43ae36(0x22e)],_0x55c857['unitId'],_0x55c857['previousDocumentData'],_0x55c857[_0x43ae36(0x217)],_0x55c857[_0x43ae36(0x29b)],_0x55c857[_0x43ae36(0x198)]):null;return _0x55c857[_0x43ae36(0x1aa)]&&_0x55c857[_0x43ae36(0x217)]&&!_0x72849c?null:{'documentRedo':_0x72849c,'resourceRedo':{'id':L['id'],'params':{'unitId':_0x55c857[_0x43ae36(0x237)],'resource':_0x55c857[_0x43ae36(0x18e)]}},'resourceUndo':{'id':L['id'],'params':{'unitId':_0x55c857['unitId'],'resource':_0x55c857[_0x43ae36(0x24a)]}}};}function Ee(_0x44f967,_0x431bf4,_0x57e931,_0x353f43){const _0x51d19d=_0x2c2698;_0x353f43[_0x51d19d(0x1c6)]({'id':_0x44f967[_0x51d19d(0x198)]+':'+_0x44f967['rangeId'],'unitID':_0x44f967[_0x51d19d(0x237)],'redoMutations':[..._0x44f967[_0x51d19d(0x1f9)][_0x51d19d(0x1e1)]?[_0x44f967[_0x51d19d(0x1f9)]['redoMutation']]:[],..._0x431bf4[_0x51d19d(0x20d)]?[_0x431bf4[_0x51d19d(0x20d)]]:[],_0x431bf4[_0x51d19d(0x18b)]],'undoMutations':[_0x431bf4['resourceUndo'],..._0x57e931?[_0x57e931]:[],..._0x44f967[_0x51d19d(0x1f9)][_0x51d19d(0x1a9)]?[_0x44f967[_0x51d19d(0x1f9)][_0x51d19d(0x1a9)]]:[]]});}function q(_0xdb1ec0){const _0x3f8b20=_0x2c2698;let _0x5395a7=_0xdb1ec0['accessor'][_0x3f8b20(0x2a5)](t[_0x3f8b20(0x17d)]),_0x248f6b=_0xdb1ec0[_0x3f8b20(0x195)][_0x3f8b20(0x2a5)](t[_0x3f8b20(0x1a3)]),_0x441fda=_0xdb1ec0[_0x3f8b20(0x195)][_0x3f8b20(0x2a5)](n[_0x3f8b20(0x24b)]),_0x43dc30=Te(_0xdb1ec0);if(!_0x43dc30)return!0x1;let _0x37f9d7=!0x1,_0x3b4192=null,_0x26486f=!0x1;try{if(_0xdb1ec0[_0x3f8b20(0x1f9)][_0x3f8b20(0x1e1)]){if(!_0x5395a7[_0x3f8b20(0x227)](_0xdb1ec0['externalMutations'][_0x3f8b20(0x1e1)]['id'],_0xdb1ec0[_0x3f8b20(0x1f9)][_0x3f8b20(0x1e1)]['params']))return!0x1;_0x37f9d7=!0x0;}if(_0x43dc30[_0x3f8b20(0x20d)]){let _0x348552=_0x5395a7[_0x3f8b20(0x227)](_0x43dc30['documentRedo']['id'],_0x43dc30[_0x3f8b20(0x20d)][_0x3f8b20(0x22f)]);if(!_0x348552)return J(_0x5395a7,_0xdb1ec0[_0x3f8b20(0x1f9)],_0x37f9d7),!0x1;_0x3b4192={'id':n[_0x3f8b20(0x1de)]['id'],'params':{..._0x348552,'noHistory':!0x0,'noNeedSetTextRange':!0x0,'segmentId':''}};}if(!_0x5395a7['syncExecuteCommand'](_0x43dc30['resourceRedo']['id'],_0x43dc30['resourceRedo'][_0x3f8b20(0x22f)]))return Oe(_0x5395a7,_0x3b4192),J(_0x5395a7,_0xdb1ec0[_0x3f8b20(0x1f9)],_0x37f9d7),!0x1;_0x26486f=!0x0,Ee(_0xdb1ec0,_0x43dc30,_0x3b4192,_0x248f6b);}catch(_0x40b367){throw _0x26486f&&_0x5395a7[_0x3f8b20(0x227)](_0x43dc30[_0x3f8b20(0x283)]['id'],_0x43dc30['resourceUndo'][_0x3f8b20(0x22f)]),Oe(_0x5395a7,_0x3b4192),J(_0x5395a7,_0xdb1ec0[_0x3f8b20(0x1f9)],_0x37f9d7),_0x40b367;}return _0x441fda[_0x3f8b20(0x216)]([{'startOffset':_0xdb1ec0['cursorOffset'],'endOffset':_0xdb1ec0[_0x3f8b20(0x29b)],'segmentId':''}],{'unitId':_0xdb1ec0[_0x3f8b20(0x237)],'subUnitId':_0xdb1ec0[_0x3f8b20(0x237)]},!0x1,{[n[_0x3f8b20(0x277)]]:!0x0}),!0x0;}function De(_0x35f0c7,_0x3d689c,_0x55931f,_0x2a6908,_0x2969d9,_0x13b9fd){const _0xfa0bc2=_0x2c2698;let _0x12203f=ke(_0x55931f,_0x2a6908,(0x0,t[_0xfa0bc2(0x21c)])(_0x35f0c7,''));return _0x12203f?{'id':n[_0xfa0bc2(0x1de)]['id'],'params':{'unitId':_0x3d689c,'actions':_0x12203f,'segmentId':'','textRanges':[{'startOffset':_0x2969d9,'endOffset':_0x2969d9,'collapsed':!0x0,'segmentId':''}],'isEditing':!0x1,'noHistory':!0x0,'noNeedSetTextRange':!0x0,'trigger':_0x13b9fd}}:null;}function Oe(_0x3cad7d,_0x2491fd){const _0x3e8db2=_0x2c2698;_0x2491fd&&_0x3cad7d[_0x3e8db2(0x227)](_0x2491fd['id'],_0x2491fd[_0x3e8db2(0x22f)]);}function _0x2a36(_0x386f3c,_0x41480a){_0x386f3c=_0x386f3c-0x17b;const _0x3a688f=_0x3a68();let _0x2a36ae=_0x3a688f[_0x386f3c];return _0x2a36ae;}function J(_0x3a8ac4,_0x123027,_0x58e16a){const _0x901fc=_0x2c2698;_0x58e16a&&_0x123027[_0x901fc(0x1a9)]&&_0x3a8ac4['syncExecuteCommand'](_0x123027['undoMutation']['id'],_0x123027['undoMutation']['params']);}function ke(_0x3b987b,_0x5cc0e1,_0x47ce74){const _0x30acf0=_0x2c2698;let _0x3bd638=_0x3b987b[_0x30acf0(0x1ea)],_0xedd45b=_0x5cc0e1[_0x30acf0(0x1ea)],_0x2119f6=Ae(_0x3bd638==null?void 0x0:_0x3bd638[_0x30acf0(0x210)],_0xedd45b==null?void 0x0:_0xedd45b['dataStream']);if(!_0x2119f6||!_0xedd45b)return null;let _0x19d8fc=new t['TextX']();return _0x19d8fc['retain'](_0x2119f6[_0x30acf0(0x295)]),_0x2119f6[_0x30acf0(0x268)]>0x0&&_0x19d8fc['insert'](_0x2119f6[_0x30acf0(0x268)],(0x0,t[_0x30acf0(0x296)])(_0xedd45b,_0x2119f6['start'],_0x2119f6[_0x30acf0(0x295)]+_0x2119f6['insertLength'],!0x1)),_0x2119f6[_0x30acf0(0x18c)]>0x0&&_0x19d8fc[_0x30acf0(0x1cc)](_0x2119f6[_0x30acf0(0x18c)]),t[_0x30acf0(0x1df)][_0x30acf0(0x1ab)]()[_0x30acf0(0x254)](_0x19d8fc[_0x30acf0(0x1c8)](),_0x47ce74);}function Ae(_0x34b944,_0x5d0f10){const _0x425121=_0x2c2698;if(_0x34b944==null||_0x5d0f10==null||_0x34b944===_0x5d0f10)return null;let _0x28c1fa=0x0;for(;_0x28c1fa<_0x34b944['length']&&_0x28c1fa<_0x5d0f10[_0x425121(0x1fa)]&&_0x34b944[_0x28c1fa]===_0x5d0f10[_0x28c1fa];)_0x28c1fa+=0x1;let _0x21c81f=_0x34b944[_0x425121(0x1fa)],_0x50cd9e=_0x5d0f10[_0x425121(0x1fa)];for(;_0x21c81f>_0x28c1fa&&_0x50cd9e>_0x28c1fa&&_0x34b944[_0x21c81f-0x1]===_0x5d0f10[_0x50cd9e-0x1];)--_0x21c81f,--_0x50cd9e;return{'start':_0x28c1fa,'deleteLength':_0x21c81f-_0x28c1fa,'insertLength':_0x50cd9e-_0x28c1fa};}function je(_0x3ecc0c){const _0x58e24b=_0x2c2698;return{'schemaVersion':0x1,'formulas':Object['fromEntries'](Object[_0x58e24b(0x1bb)](_0x3ecc0c[_0x58e24b(0x276)])[_0x58e24b(0x185)](([_0x4070bb,_0x1b0044])=>[_0x4070bb,{..._0x1b0044,..._0x1b0044[_0x58e24b(0x1e9)]?{'numberFormat':{..._0x1b0044[_0x58e24b(0x1e9)]}}:null,..._0x1b0044[_0x58e24b(0x257)]?{'lastValue':{..._0x1b0044[_0x58e24b(0x257)]}}:null}]))};}let Y=class extends t['Disposable']{constructor(_0x369fed,_0x56c54d,_0x38dc56,_0x4c3e06){const _0x109dda=_0x2c2698;super(),this['_instanceService']=_0x369fed,this['_commandService']=_0x56c54d,this[_0x109dda(0x1f7)]=_0x38dc56,this[_0x109dda(0x218)]=_0x4c3e06,D(this,_0x109dda(0x265),new Set()),D(this,'_syncScheduled',!0x1),D(this,'_isDisposed',!0x1),this[_0x109dda(0x275)][_0x109dda(0x20f)](t[_0x109dda(0x197)]['UNIVER_DOC'])[_0x109dda(0x1db)](_0x9525d9=>this[_0x109dda(0x218)][_0x109dda(0x1bd)](_0x9525d9)),this[_0x109dda(0x1d6)](this[_0x109dda(0x1f7)][_0x109dda(0x238)][_0x109dda(0x298)](({unitId:_0x52bc7c})=>this[_0x109dda(0x20a)](_0x52bc7c))),this[_0x109dda(0x1d6)](this[_0x109dda(0x275)][_0x109dda(0x1dd)][_0x109dda(0x298)](({unit:_0x2f2779})=>{const _0x12a0db=_0x109dda;_0x2f2779['type']===t[_0x12a0db(0x197)]['UNIVER_DOC']&&this[_0x12a0db(0x191)](_0x2f2779[_0x12a0db(0x273)]());})),this[_0x109dda(0x1d6)](this[_0x109dda(0x275)][_0x109dda(0x1cf)]['subscribe'](_0x2df9f5=>{const _0x42bce0=_0x109dda;this[_0x42bce0(0x218)][_0x42bce0(0x1e7)](_0x2df9f5['getUnitId']());})),this[_0x109dda(0x1d6)](this[_0x109dda(0x2a3)][_0x109dda(0x2a1)](_0x14f438=>{const _0x3dd7e2=_0x109dda;if(_0x14f438['id']===n[_0x3dd7e2(0x1de)]['id']&&Me(_0x14f438['params'])){let _0x798a5d=_0x14f438[_0x3dd7e2(0x22f)];_0x798a5d[_0x3dd7e2(0x189)]||this[_0x3dd7e2(0x20a)](_0x798a5d[_0x3dd7e2(0x237)]);}}));}[_0x2c2698(0x1ce)](){const _0x3c7a1a=_0x2c2698;this[_0x3c7a1a(0x266)]=!0x0,super['dispose']();}[_0x2c2698(0x191)](_0x361ba3){const _0x34467d=_0x2c2698;this[_0x34467d(0x265)]['add'](_0x361ba3),!this['_syncScheduled']&&(this[_0x34467d(0x1f6)]=!0x0,queueMicrotask(()=>{const _0x23687f=_0x34467d;if(this[_0x23687f(0x1f6)]=!0x1,this[_0x23687f(0x266)])return;let _0x1f655b=Array[_0x23687f(0x21b)](this[_0x23687f(0x265)]);this[_0x23687f(0x265)][_0x23687f(0x28f)](),_0x1f655b['forEach'](_0x43a183=>this[_0x23687f(0x20a)](_0x43a183));}));}[_0x2c2698(0x20a)](_0x4fbf7b){const _0x1c2371=_0x2c2698;let _0x5925ea=this[_0x1c2371(0x275)][_0x1c2371(0x1cd)](_0x4fbf7b,t['UniverInstanceType'][_0x1c2371(0x1b8)]);_0x5925ea&&this[_0x1c2371(0x218)][_0x1c2371(0x1bd)](_0x5925ea);}};Y=A([k(0x0,t[_0x2c2698(0x201)]),k(0x1,t['ICommandService']),k(0x2,(0x0,t[_0x2c2698(0x256)])(O)),k(0x3,(0x0,t[_0x2c2698(0x256)])(j))],Y);function Me(_0xeb589d){const _0x47de4b=_0x2c2698;return typeof _0xeb589d==_0x47de4b(0x23d)&&!!_0xeb589d&&_0x47de4b(0x237)in _0xeb589d&&typeof _0xeb589d[_0x47de4b(0x237)]=='string'&&(!(_0x47de4b(0x189)in _0xeb589d)||_0xeb589d[_0x47de4b(0x189)]===void 0x0||typeof _0xeb589d[_0x47de4b(0x189)]==_0x47de4b(0x247));}let X=class extends t[_0x2c2698(0x188)]{constructor(_0x588264,_0x57ecf4){const _0x58b07d=_0x2c2698;super(),this[_0x58b07d(0x258)]=_0x588264,this[_0x58b07d(0x1ec)]=_0x57ecf4,this[_0x58b07d(0x1d6)](this['_resourceManagerService'][_0x58b07d(0x246)]({'pluginName':o,'businesses':[t[_0x58b07d(0x197)][_0x58b07d(0x1b8)]],'toJson':_0x34878f=>JSON[_0x58b07d(0x1c0)](this[_0x58b07d(0x1ec)]['serialize'](_0x34878f)),'parseJson':_0x91539a=>JSON[_0x58b07d(0x1f0)](_0x91539a),'onLoad':(_0x37e25a,_0x201680)=>{this['_docFormulaModel']['load'](_0x37e25a,_0x201680);},'onUnLoad':_0xf3e349=>this[_0x58b07d(0x1ec)]['removeUnit'](_0xf3e349)}));}};X=A([k(0x0,t[_0x2c2698(0x1b9)]),k(0x1,(0x0,t['Inject'])(O))],X);var Ne=_0x2c2698(0x270),Pe=_0x2c2698(0x289);const Fe={};let Z=class extends t[_0x2c2698(0x188)]{constructor(_0x4fc25c,_0x48b10e,_0x1045f8){const _0x221170=_0x2c2698;super(),this['_univerInstanceService']=_0x4fc25c,this[_0x221170(0x19d)]=_0x48b10e,this['disposeWithMe'](_0x1045f8['register']({'resolve':(_0x409b14,_0x236398)=>{const _0x291442=_0x221170;var _0x25ea98;return((_0x25ea98=_0x236398[_0x291442(0x215)])==null?void 0x0:_0x25ea98['filter'](g)['map'](_0x5a0ccf=>({'startOffset':_0x5a0ccf['startIndex'],'endOffset':_0x5a0ccf[_0x291442(0x19e)]+0x1,'text':this[_0x291442(0x1fd)](_0x409b14,_0x5a0ccf[_0x291442(0x29c)])})))??[];}})),this['disposeWithMe'](this[_0x221170(0x19d)][_0x221170(0x27b)]['subscribe'](({unitId:_0x251f70})=>{const _0x2381ff=_0x221170;_0x1045f8[_0x2381ff(0x294)](_0x251f70);}));}[_0x2c2698(0x1fd)](_0x1fddee,_0x23f5b7){const _0x3aae5f=_0x2c2698;var _0x3515cd;return((_0x3515cd=this['_formulaService'][_0x3aae5f(0x2af)]({'unitId':_0x1fddee,'rangeId':_0x23f5b7}))==null?void 0x0:_0x3515cd['text'])??'';}[_0x2c2698(0x290)](_0x589e70,_0xa07766,_0x4c6785){const _0xba70ce=_0x2c2698;var _0x37f454;let _0x36830d=this[_0xba70ce(0x220)][_0xba70ce(0x1cd)](_0x589e70,t[_0xba70ce(0x197)][_0xba70ce(0x1b8)]),_0x1cff54=_0x36830d==null?void 0x0:_0x36830d['getBody']();if(!_0x1cff54)return'';let _0xeb1ae3=_0x1cff54[_0xba70ce(0x210)][_0xba70ce(0x25f)](_0xa07766,_0x4c6785),_0x4f82ae=((_0x37f454=_0x1cff54[_0xba70ce(0x215)])==null?void 0x0:_0x37f454[_0xba70ce(0x18a)](_0x8ccdb4=>g(_0x8ccdb4)&&_0x8ccdb4[_0xba70ce(0x17b)]>=_0xa07766&&_0x8ccdb4[_0xba70ce(0x19e)]<_0x4c6785)[_0xba70ce(0x29e)]((_0x4c1bfe,_0x2bde22)=>_0x2bde22[_0xba70ce(0x17b)]-_0x4c1bfe['startIndex']))??[];for(let _0x339fbd of _0x4f82ae){let _0xfb670e=_0x339fbd['startIndex']-_0xa07766,_0xa6f126=_0x339fbd[_0xba70ce(0x19e)]-_0xa07766+0x1;_0xeb1ae3=''+_0xeb1ae3['slice'](0x0,_0xfb670e)+this[_0xba70ce(0x1fd)](_0x589e70,_0x339fbd['rangeId'])+_0xeb1ae3['slice'](_0xa6f126);}return _0xeb1ae3;}['degradeDocumentData'](_0x2daa0e){return Ie(_0x2daa0e);}[_0x2c2698(0x2aa)](_0x22da95,_0x2bb8ee,_0xfbdc79={}){const _0x274791=_0x2c2698;var _0x222c71;return re({'id':_0x22da95,'body':_0x2bb8ee,'documentStyle':{}},(((_0x222c71=_0x2bb8ee[_0x274791(0x215)])==null?void 0x0:_0x222c71['filter'](g))??[])[_0x274791(0x185)](_0x334c2c=>({'rangeId':_0x334c2c[_0x274791(0x29c)],'text':_0xfbdc79[_0x334c2c[_0x274791(0x29c)]]??this['resolveFormula'](_0x22da95,_0x334c2c[_0x274791(0x29c)])})))[_0x274791(0x1ea)]??{'dataStream':''};}};Z=A([k(0x0,t[_0x2c2698(0x201)]),k(0x1,(0x0,t[_0x2c2698(0x256)])(j)),k(0x2,(0x0,t[_0x2c2698(0x256)])(n[_0x2c2698(0x236)]))],Z);function Ie(_0x34ac46){const _0x73c9e1=_0x2c2698;var _0x18a5be,_0x4fcade;let _0x2ee10c=Le(_0x34ac46),_0xfb2877=re(_0x34ac46,(((_0x18a5be=_0x34ac46[_0x73c9e1(0x1ea)])==null||(_0x18a5be=_0x18a5be['customRanges'])==null?void 0x0:_0x18a5be[_0x73c9e1(0x18a)](g))??[])[_0x73c9e1(0x185)](_0x860824=>({'rangeId':_0x860824[_0x73c9e1(0x29c)],'text':Re(_0x2ee10c==null?void 0x0:_0x2ee10c[_0x73c9e1(0x276)][_0x860824[_0x73c9e1(0x29c)]])})));return _0xfb2877[_0x73c9e1(0x1d8)]=(_0x4fcade=_0xfb2877[_0x73c9e1(0x1d8)])==null?void 0x0:_0x4fcade[_0x73c9e1(0x18a)](_0x53ec87=>_0x53ec87[_0x73c9e1(0x1d9)]!==o),_0xfb2877;}function Le(_0x5e3613){const _0x413b8c=_0x2c2698;var _0x117e98;let _0x13cd27=(_0x117e98=_0x5e3613[_0x413b8c(0x1d8)])==null||(_0x117e98=_0x117e98[_0x413b8c(0x190)](_0x3e7efa=>_0x3e7efa[_0x413b8c(0x1d9)]===_0x413b8c(0x1b6)))==null?void 0x0:_0x117e98[_0x413b8c(0x250)];if(_0x13cd27)try{let _0x2fc529=JSON[_0x413b8c(0x1f0)](_0x13cd27);return l(_0x2fc529)?_0x2fc529:void 0x0;}catch{return;}}function _0x3a68(){const _0x3bb270=['object','target','pattern','_injector','number','_config','resolveBinding','formulaId','endsWith','registerPluginResource','string','call','function','previousResource','DocSelectionManagerService','eligible','symbol','onStarting','436fSvVcX','data','sectionBreaks','color','resource','editOp','set','Inject','lastValue','_resourceManagerService','24JxcgDR','COMMAND','docs-formula.command.convert-to-text','ConvertDocFormulaToTextCommand','deepClone','load','slice','Module','formula','unsupported-version','_registrationService','resolveFormulaResultPresentation','_pendingUnitIds','_isDisposed','liveResult','insertLength','setResource','_registrations','unregister','getLoadError','BLOCK_START','UniverProFormulaEnginePlugin','every','@univerjs-pro/docs-formula','paragraph','getRevision','getUnitId','shiftInclusiveRangeOnDelete','_instanceService','formulas','DOC_SELECTION_OPTION_PRESERVE_CARET','min','buildInsertDocFormulaActions','empty','presentationChanged$','findDocFormulaRange','InsertDocFormulaCommand','TABLE_ROW_START','has','position','docs-formula.mutation.set-resource','getCustomRangeInterval','resourceUndo','7263549OBeAzE','_cacheEligibilityService','OtherFormulaBizType','UniverDocsPlugin','shiftExclusiveRangeOnInsert','1.0.3','Document\x20main\x20body\x20is\x20required\x20to\x20insert\x20Doc\x20Formula.','boolean','getTextRanges','_change$','updates','clear','resolveText','values','isDocFormulaConfig','createEmptyDocFormulaResource','notifyTextChanged','start','getBodySliceForTextXAction','getCurrentUnitOfType','subscribe','trim','cell','cursorOffset','rangeId','max','sort','docs-formula.mutation.remove-formula','getFormulas','onCommandExecuted','_updateFormulaResult','_commandService','Doc\x20Formula\x20range\x20cannot\x20cross\x20document\x20structure\x20boundaries','get','endOffset','DOC_FORMULA_CUSTOM_RANGE_KIND','8931LyTOmz','TABLE_END','degradeBody','getParagraphContentStartOffset','COLUMN_END','deleteFormula','getOwnPropertyDescriptor','getResult','wholeEntity','customDecorations','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','startIndex','COLUMN_GROUP_START','ICommandService','setConfig','_hostExternalReferenceModel','identity','isDocFormulaRange','UpdateDocFormulaCommand','degradeDocFormulaDocumentData','24040560HrxVcQ','map','UniverDocsFormulaPlugin','paragraphs','Disposable','segmentId','filter','resourceRedo','deleteLength','push','nextResource','docs-formula.mutation.set-formula','find','_queueSync','removeFormula','paragraphId','LexerTreeBuilder','accessor','Plugin','UniverInstanceType','trigger','InvalidDocFormulaInsertRangeError','getSnapshot','COLUMN_START','rangeType','_formulaService','endIndex','asObservable','Subject','customBlocks','documentData','IUndoRedoService','TABLE_ROW_END','SetDocFormulaNumberFormatCommand','RemoveDocFormulaMutation','merge','schemaVersion','undoMutation','previousDocumentData','getInstance','3935624JhkMLA','stale','setFormulas','some','config','decorate','defineProperty','SUCCESS','getResource','externalReferences','DOC_FORMULA_PLUGIN','toFormulaLastValue','UNIVER_DOC','IResourceManagerService','HostExternalReferenceModel','entries','presentation','syncUnit','touchDependencies','buildUpsertHostExternalReferenceMutations','stringify','success','DocFormulaDisplayTextService','tables','assign','isArray','pushUndoRedo','docs-formula.command.insert','serialize','SECTION_BREAK','type','add','delete','getUnit','dispose','unitDisposed$','shiftInclusiveRangeOnInsert','SetDocFormulaResourceMutation','DocFormulaResultStatus','DOC','_resources','767662wNjcjL','disposeWithMe','docs-formula.config','resources','name','getFormula','forEach','referenceRevision','unitAdded$','RichTextEditingMutation','JSONX','invalid-resource','redoMutation','status','MUTATION','getRegisteredFormulas','_presentationChanged$','columnGroups','unregisterUnit','includes','numberFormat','body','DataStreamTreeTokenType','_docFormulaModel','formulaResult$','3897868NmIUbS','CellValueType','parse','_rawResources','_setPresentation','assess','_deleteRegistration','collectFormulaExternalReferenceQualifiers','_syncScheduled','_model','324995PsBuEx','externalMutations','length','_formulaKeys','SetDocFormulaLastValuesMutation','resolveFormula','register','CommandType','buildRemoveDocFormulaActions','IUniverInstanceService','textRuns','DOC_FORMULA_SCHEMA_VERSION','prototype','5qGhvGY','CUSTOM','PARAGRAPH','DocFormulaResourceController','docs-formula.mutation.set-last-values','_syncUnit','docs-formula.command.replace-with-text','startsWith','documentRedo','isInteger','getAllUnitsForType','dataStream','model','_loadErrors','ERROR','RemoveDocFormulaCommand','customRanges','replaceDocRanges','nextDocumentData','_service','next','ReplaceDocFormulaWithTextCommand','from','getRichTextEditPath','EMPTY','DocFormulaLifecycleController','pending','_univerInstanceService','collectMutations','expectedReferenceRevision','blockRanges','text','getPresentation','_preserveInvalid','syncExecuteCommand','toStringTag','setFormula','DependentOn','registerProvider','_configService','generateRandomId','document','params','SetDocFormulaMutation','univer-docs-formula','DocFormulaService','removeUnit','Tools','TABLE_CELL_START','DocTextResolverService','unitId','change$','source','resolved','startOffset','keys'];_0x3a68=function(){return _0x3bb270;};return _0x3a68();}function Re(_0x36fe76){const _0x2d5fa4=_0x2c2698;return _0x36fe76?(0x0,e[_0x2d5fa4(0x264)])({'lastValue':_0x36fe76[_0x2d5fa4(0x257)],'numberFormat':_0x36fe76[_0x2d5fa4(0x1e9)]})[_0x2d5fa4(0x224)]:'';}let Q=class extends t[_0x2c2698(0x188)]{constructor(_0xccb89a,_0x1609d4,_0xd2d306){const _0x3165fe=_0x2c2698;super(),this[_0x3165fe(0x19d)]=_0xccb89a,this[_0x3165fe(0x285)]=_0x1609d4,this[_0x3165fe(0x1d6)](_0xd2d306[_0x3165fe(0x22b)](this));}[_0x2c2698(0x221)](_0x1193b4){const _0x57bc1b=_0x2c2698;let _0x49e971=new Map();for(let _0x29c276 of this['_formulaService'][_0x57bc1b(0x1e4)]()){var _0x5ecdbb;if(!this[_0x57bc1b(0x285)][_0x57bc1b(0x1f3)](_0x29c276[_0x57bc1b(0x1b0)]['formula'],_0x29c276[_0x57bc1b(0x267)])[_0x57bc1b(0x24c)])continue;let _0x3104f5=(0x0,e['getScalarFormulaResultCell'])(_0x29c276[_0x57bc1b(0x267)]),_0x5d7ff4=_0x3104f5?(0x0,e[_0x57bc1b(0x1b7)])(_0x3104f5):null;if(!_0x5d7ff4||ze(_0x29c276[_0x57bc1b(0x1b0)][_0x57bc1b(0x257)],_0x5d7ff4))continue;let _0x49f4f2=_0x49e971[_0x57bc1b(0x2a5)](_0x29c276[_0x57bc1b(0x180)]['unitId'])??[];_0x49f4f2[_0x57bc1b(0x18d)]({'rangeId':_0x29c276[_0x57bc1b(0x180)][_0x57bc1b(0x29c)],'expectedFormula':_0x29c276[_0x57bc1b(0x1b0)][_0x57bc1b(0x261)],'expectedNumberFormat':(_0x5ecdbb=_0x29c276['config']['numberFormat'])==null?void 0x0:_0x5ecdbb[_0x57bc1b(0x23f)],'expectedReferenceRevision':_0x29c276['referenceRevision'],'lastValue':_0x5d7ff4}),_0x49e971[_0x57bc1b(0x255)](_0x29c276[_0x57bc1b(0x180)][_0x57bc1b(0x237)],_0x49f4f2);}return Array['from'](_0x49e971,([_0x286abf,_0x5a9966])=>({'id':R['id'],'params':{'unitId':_0x286abf,'updates':_0x5a9966}}));}};Q=A([k(0x0,(0x0,t[_0x2c2698(0x256)])(j)),k(0x1,(0x0,t[_0x2c2698(0x256)])(e['FormulaCacheEligibilityService'])),k(0x2,(0x0,t['Inject'])(e['FormulaLastValuePersistenceService']))],Q);function ze(_0x1389a4,_0x119bed){const _0x26cdca=_0x2c2698;return(_0x1389a4==null?void 0x0:_0x1389a4['v'])===_0x119bed['v']&&(_0x1389a4==null?void 0x0:_0x1389a4['t'])===_0x119bed['t']&&(_0x1389a4==null?void 0x0:_0x1389a4['pattern'])===_0x119bed[_0x26cdca(0x23f)];}let $=class extends t[_0x2c2698(0x196)]{constructor(_0x4b93f8=Fe,_0x41964a,_0x486e33,_0x1c8596){const _0x20ea00=_0x2c2698;super(),this[_0x20ea00(0x242)]=_0x4b93f8,this[_0x20ea00(0x240)]=_0x41964a,this[_0x20ea00(0x2a3)]=_0x486e33,this['_configService']=_0x1c8596;let {..._0x48c077}=(0x0,t[_0x20ea00(0x1a7)])({},Fe,this['_config']);this[_0x20ea00(0x22c)][_0x20ea00(0x17e)](_0x20ea00(0x1d7),_0x48c077);}[_0x2c2698(0x24e)](){const _0x2f9aca=_0x2c2698;this[_0x2f9aca(0x240)][_0x2f9aca(0x1cb)]([O]),this[_0x2f9aca(0x240)][_0x2f9aca(0x1cb)]([j]),this[_0x2f9aca(0x240)]['add']([X]),this[_0x2f9aca(0x240)][_0x2f9aca(0x1cb)]([Y]),this[_0x2f9aca(0x240)][_0x2f9aca(0x1cb)]([Q]),this[_0x2f9aca(0x240)][_0x2f9aca(0x1cb)]([Z]),(0x0,t[_0x2f9aca(0x1be)])(this['_injector'],[[O],[X],[Y],[Q],[Z]]),[F,I,L,R,z,B,V,H,U,W]['forEach'](_0x5371a5=>this[_0x2f9aca(0x1d6)](this[_0x2f9aca(0x2a3)]['registerCommand'](_0x5371a5)));}};D($,'pluginName',o),D($,'packageName',Ne),D($,'version',Pe),D($,_0x2c2698(0x1ca),t[_0x2c2698(0x197)][_0x2c2698(0x1b8)]),$=A([(0x0,t[_0x2c2698(0x22a)])(a['UniverLicensePlugin'],e[_0x2c2698(0x26e)],n[_0x2c2698(0x287)]),k(0x1,(0x0,t[_0x2c2698(0x256)])(t['Injector'])),k(0x2,t[_0x2c2698(0x17d)]),k(0x3,t['IConfigService'])],$),exports[_0x2c2698(0x25c)]=W,exports[_0x2c2698(0x2a7)]=s,exports['DOC_FORMULA_OBJECT_REPLACEMENT']='',exports[_0x2c2698(0x1b6)]=o,exports[_0x2c2698(0x203)]=0x1,Object[_0x2c2698(0x1b2)](exports,_0x2c2698(0x1c2),{'enumerable':!0x0,'get':function(){return Z;}}),Object[_0x2c2698(0x1b2)](exports,_0x2c2698(0x21e),{'enumerable':!0x0,'get':function(){return Y;}}),exports['DocFormulaModel']=O,Object[_0x2c2698(0x1b2)](exports,_0x2c2698(0x208),{'enumerable':!0x0,'get':function(){return X;}}),exports[_0x2c2698(0x1d2)]=ve,Object[_0x2c2698(0x1b2)](exports,_0x2c2698(0x232),{'enumerable':!0x0,'get':function(){return j;}}),exports[_0x2c2698(0x27d)]=z,exports[_0x2c2698(0x199)]=m,exports[_0x2c2698(0x214)]=H,exports[_0x2c2698(0x1a6)]=I,exports[_0x2c2698(0x21a)]=U,exports[_0x2c2698(0x1fc)]=R,exports[_0x2c2698(0x230)]=F,exports[_0x2c2698(0x1a5)]=V,exports[_0x2c2698(0x1d1)]=L,Object[_0x2c2698(0x1b2)](exports,_0x2c2698(0x186),{'enumerable':!0x0,'get':function(){return $;}}),exports[_0x2c2698(0x182)]=B,exports['assertSafeDocFormulaInsertRange']=ie,exports[_0x2c2698(0x279)]=te,exports[_0x2c2698(0x200)]=h,exports['buildUpdateDocFormulaActions']=ne,exports[_0x2c2698(0x293)]=c,exports[_0x2c2698(0x183)]=Ie,exports[_0x2c2698(0x27c)]=_,exports[_0x2c2698(0x292)]=u,exports[_0x2c2698(0x181)]=g,exports['isDocFormulaResource']=l,exports['isFormulaLastValue']=d;
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;
package/lib/es/facade.js CHANGED
@@ -1 +1 @@
1
- var _0x38b32e=_0x4561;(function(_0x2a55bc,_0x264147){var _0x470037=_0x4561,_0x517040=_0x2a55bc();while(!![]){try{var _0x514f82=-parseInt(_0x470037(0xc0))/0x1*(-parseInt(_0x470037(0xda))/0x2)+-parseInt(_0x470037(0xcf))/0x3+-parseInt(_0x470037(0xed))/0x4+parseInt(_0x470037(0xe9))/0x5*(-parseInt(_0x470037(0xfc))/0x6)+parseInt(_0x470037(0xe8))/0x7+-parseInt(_0x470037(0x10b))/0x8*(-parseInt(_0x470037(0xe5))/0x9)+parseInt(_0x470037(0xfb))/0xa*(parseInt(_0x470037(0xc1))/0xb);if(_0x514f82===_0x264147)break;else _0x517040['push'](_0x517040['shift']());}catch(_0x5a25cf){_0x517040['push'](_0x517040['shift']());}}}(_0x15d1,0x1b993));import{ConvertDocFormulaToTextCommand as _0x312162,DocFormulaDisplayTextService as _0x6b6aca,DocFormulaModel as _0x26bebb,DocFormulaService as _0xa7e990,InsertDocFormulaCommand as _0x19c95b,RemoveDocFormulaCommand as _0x569ec3,ReplaceDocFormulaWithTextCommand as _0x278615,SetDocFormulaNumberFormatCommand as _0x7e41be,UpdateDocFormulaCommand as _0x13989d,isDocFormulaRange as _0x24b8b0}from'@univerjs-pro/docs-formula';import{ICommandService as _0x74e3c5,IResourceLoaderService as _0x239261,IUniverInstanceService as _0x484a6c,Inject as _0x53a887,UniverInstanceType as _0x104ec2}from'@univerjs/core';import{FDocument as _0x4d8a90,FDocumentParagraph as _0x2a2428,FDocumentTextRange as _0x41761d}from'@univerjs/docs/facade';function v(_0x134583,_0x40180f){return function(_0x2625b7,_0x5143fb){_0x40180f(_0x2625b7,_0x5143fb,_0x134583);};}function y(_0x3253e2,_0x407b3c,_0x133c89,_0x1e9250){var _0x3e03a2=_0x4561,_0x379687=arguments[_0x3e03a2(0xe0)],_0xa1f198=_0x379687<0x3?_0x407b3c:_0x1e9250===null?_0x1e9250=Object[_0x3e03a2(0xf7)](_0x407b3c,_0x133c89):_0x1e9250,_0x29c215;if(typeof Reflect==_0x3e03a2(0xd5)&&typeof Reflect['decorate']==_0x3e03a2(0xfe))_0xa1f198=Reflect[_0x3e03a2(0xc3)](_0x3253e2,_0x407b3c,_0x133c89,_0x1e9250);else{for(var _0x1e1f74=_0x3253e2[_0x3e03a2(0xe0)]-0x1;_0x1e1f74>=0x0;_0x1e1f74--)(_0x29c215=_0x3253e2[_0x1e1f74])&&(_0xa1f198=(_0x379687<0x3?_0x29c215(_0xa1f198):_0x379687>0x3?_0x29c215(_0x407b3c,_0x133c89,_0xa1f198):_0x29c215(_0x407b3c,_0x133c89))||_0xa1f198);}return _0x379687>0x3&&_0xa1f198&&Object[_0x3e03a2(0xce)](_0x407b3c,_0x133c89,_0xa1f198),_0xa1f198;}let b=class{constructor(_0x590907,_0x1ad6a5,_0x4621ab,_0x18a018,_0x312dea,_0x367f97){var _0x17b5fc=_0x4561;this['_unitId']=_0x590907,this[_0x17b5fc(0xcc)]=_0x1ad6a5,this[_0x17b5fc(0x100)]=_0x4621ab,this['_model']=_0x18a018,this[_0x17b5fc(0x108)]=_0x312dea,this[_0x17b5fc(0xd1)]=_0x367f97;}['getId'](){return this['_rangeId'];}[_0x38b32e(0xdc)](){var _0x39c12d=_0x38b32e;let _0x4d7f88=this['_getCustomRange']();return _0x4d7f88?{'endOffset':_0x4d7f88[_0x39c12d(0x105)]+0x1,'rangeId':_0x4d7f88[_0x39c12d(0xf8)],'startOffset':_0x4d7f88[_0x39c12d(0xd0)]}:null;}[_0x38b32e(0xbe)](){var _0x5ed2fc=_0x38b32e,_0x29a6d2;return((_0x29a6d2=this['_model'][_0x5ed2fc(0xbe)](this[_0x5ed2fc(0xd2)],this[_0x5ed2fc(0xcc)]))==null?void 0x0:_0x29a6d2[_0x5ed2fc(0xec)])??'';}['getConfig'](){var _0xb99bc9=_0x38b32e;return this[_0xb99bc9(0xeb)]['getFormula'](this[_0xb99bc9(0xd2)],this[_0xb99bc9(0xcc)])??null;}[_0x38b32e(0xd6)](){var _0x3b2e44=_0x38b32e;return this[_0x3b2e44(0x108)]['getResult']({'unitId':this[_0x3b2e44(0xd2)],'rangeId':this[_0x3b2e44(0xcc)]})??null;}[_0x38b32e(0xc8)](){var _0x23187f=_0x38b32e;let _0x3b6dac=this[_0x23187f(0xdc)](),_0x34cfaa=this['getConfig'](),_0xf4068a=this[_0x23187f(0xd6)]();return!_0x3b6dac||!_0x34cfaa||!_0xf4068a?null:{..._0x3b6dac,'config':_0x34cfaa,'formula':_0x34cfaa[_0x23187f(0xec)],'result':_0xf4068a,'type':_0x23187f(0xec)};}[_0x38b32e(0xbd)](_0x4da93a){var _0x2159f5=_0x38b32e;return this[_0x2159f5(0x100)][_0x2159f5(0xc7)](_0x13989d['id'],{'externalReferences':_0x4da93a['externalReferences'],'formula':_0x4da93a['formula'],'numberFormat':_0x4da93a['numberFormat'],'rangeId':this['_rangeId'],'unitId':this['_unitId']});}[_0x38b32e(0xc4)](_0x3eaf40){var _0x2cdf03=_0x38b32e;return this[_0x2cdf03(0x100)][_0x2cdf03(0xc7)](_0x7e41be['id'],{'numberFormat':_0x3eaf40,'rangeId':this['_rangeId'],'unitId':this[_0x2cdf03(0xd2)]});}[_0x38b32e(0xcb)](){var _0x2f2924=_0x38b32e;return this['_commandService']['syncExecuteCommand'](_0x569ec3['id'],{'rangeId':this[_0x2f2924(0xcc)],'unitId':this[_0x2f2924(0xd2)]});}[_0x38b32e(0xdd)](_0x2f73cd){var _0x160b0b=_0x38b32e;return this[_0x160b0b(0x100)][_0x160b0b(0xc7)](_0x278615['id'],{'rangeId':this[_0x160b0b(0xcc)],'text':_0x2f73cd,'unitId':this[_0x160b0b(0xd2)]});}[_0x38b32e(0xc5)](){var _0x257d5a=_0x38b32e;return this['_commandService'][_0x257d5a(0xc7)](_0x312162['id'],{'rangeId':this[_0x257d5a(0xcc)],'unitId':this[_0x257d5a(0xd2)]});}['_getCustomRange'](){var _0x2ed791=_0x38b32e,_0x19491f;let _0x184036=this['_univerInstanceService']['getUnit'](this[_0x2ed791(0xd2)],_0x104ec2['UNIVER_DOC']);return _0x184036==null||(_0x19491f=_0x184036['getSnapshot']()[_0x2ed791(0xf0)])==null||(_0x19491f=_0x19491f[_0x2ed791(0xd3)])==null?void 0x0:_0x19491f[_0x2ed791(0xff)](_0x5aa3db=>_0x5aa3db[_0x2ed791(0xf8)]===this[_0x2ed791(0xcc)]&&_0x24b8b0(_0x5aa3db));}};b=y([v(0x2,_0x74e3c5),v(0x3,_0x53a887(_0x26bebb)),v(0x4,_0x53a887(_0xa7e990)),v(0x5,_0x484a6c)],b);function _0x4561(_0x407f3e,_0x2291ea){_0x407f3e=_0x407f3e-0xbd;var _0x15d1ba=_0x15d1();var _0x45618b=_0x15d1ba[_0x407f3e];return _0x45618b;}function _0x15d1(){var _0x48c2c3=['update','getFormula','Document\x20','8353KRrYzX','198IiZwmM','end','decorate','setNumberFormat','convertToText','getSegmentId','syncExecuteCommand','describe','get','_document','remove','_rangeId','degradeDocumentData','defineProperty','117345yXMiYQ','startIndex','_univerInstanceService','_unitId','customRanges','createInstance','object','getResult','_docsFormulaCommandService','_injector','symbol','4SGTrFc','toPrimitive','getRange','replaceWithText','getId','numberFormat','length','constructor','insertFormula','_insert','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','2010969CEiwUB','_docsFormulaModel','_initialize','637112RXugTh','25RYKEHI','startOffset','_model','formula','775516TpOfDw','_docsFormulaResourceLoaderService','extend','body','appendFormula','paragraph','getFormulas','prototype','getBody','\x20could\x20not\x20be\x20serialized.','getOwnPropertyDescriptor','rangeId','_createFormula','range','41780OXJSzy','72396nubRqn','map','function','find','_commandService','_getCompleteRanges','_docsFormulaDisplayTextService','saveUnit','getFormulaAt','endIndex','externalReferences','some','_service','string','replaceWithFormula','8gvuYaF'];_0x15d1=function(){return _0x48c2c3;};return _0x15d1();}function x(_0x36bdc1){'@babel/helpers - typeof';var _0x400e42=_0x38b32e;return x=typeof Symbol==_0x400e42(0xfe)&&typeof Symbol['iterator']==_0x400e42(0xd9)?function(_0xbd9e8e){return typeof _0xbd9e8e;}:function(_0x545c15){var _0x43260f=_0x400e42;return _0x545c15&&typeof Symbol==_0x43260f(0xfe)&&_0x545c15[_0x43260f(0xe1)]===Symbol&&_0x545c15!==Symbol[_0x43260f(0xf4)]?_0x43260f(0xd9):typeof _0x545c15;},x(_0x36bdc1);}function S(_0x56e557,_0x5bef39){var _0x164dd3=_0x38b32e;if(x(_0x56e557)!=_0x164dd3(0xd5)||!_0x56e557)return _0x56e557;var _0x17182b=_0x56e557[Symbol[_0x164dd3(0xdb)]];if(_0x17182b!==void 0x0){var _0x484c32=_0x17182b['call'](_0x56e557,_0x5bef39||'default');if(x(_0x484c32)!=_0x164dd3(0xd5))return _0x484c32;throw TypeError(_0x164dd3(0xe4));}return(_0x5bef39===_0x164dd3(0x109)?String:Number)(_0x56e557);}function C(_0x4485df){var _0x3027c0=_0x38b32e,_0x6bca0c=S(_0x4485df,_0x3027c0(0x109));return x(_0x6bca0c)==_0x3027c0(0xd9)?_0x6bca0c:_0x6bca0c+'';}function w(_0x1128c1,_0x1052ec,_0x88439){return(_0x1052ec=C(_0x1052ec))in _0x1128c1?Object['defineProperty'](_0x1128c1,_0x1052ec,{'value':_0x88439,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x1128c1[_0x1052ec]=_0x88439,_0x1128c1;}var T=class extends _0x4d8a90{constructor(..._0x241c73){var _0x7a79c0=_0x38b32e;super(..._0x241c73),w(this,_0x7a79c0(0xd7),void 0x0),w(this,_0x7a79c0(0x102),void 0x0),w(this,_0x7a79c0(0xe6),void 0x0),w(this,_0x7a79c0(0xee),void 0x0);}[_0x38b32e(0xe7)](_0x4ac44d){var _0x1f6f26=_0x38b32e;this[_0x1f6f26(0xd7)]=_0x4ac44d[_0x1f6f26(0xc9)](_0x74e3c5),this['_docsFormulaDisplayTextService']=_0x4ac44d[_0x1f6f26(0xc9)](_0x6b6aca),this[_0x1f6f26(0xe6)]=_0x4ac44d[_0x1f6f26(0xc9)](_0x26bebb),this['_docsFormulaResourceLoaderService']=_0x4ac44d[_0x1f6f26(0xc9)](_0x239261);}[_0x38b32e(0xf3)](){var _0x618c93=_0x38b32e;return this[_0x618c93(0x101)]()[_0x618c93(0xfd)](_0x5162c1=>this[_0x618c93(0xf9)](_0x5162c1[_0x618c93(0xf8)]));}[_0x38b32e(0xbe)](_0x531890){var _0x577890=_0x38b32e;return this[_0x577890(0x101)]()[_0x577890(0x107)](_0x22cb30=>_0x22cb30[_0x577890(0xf8)]===_0x531890)?this[_0x577890(0xf9)](_0x531890):null;}[_0x38b32e(0x104)](_0x8256b1){var _0xa0950d=_0x38b32e;let _0x1aa805=this[_0xa0950d(0x101)]()[_0xa0950d(0xff)](_0x5e8080=>_0x5e8080[_0xa0950d(0xd0)]<=_0x8256b1&&_0x8256b1<=_0x5e8080[_0xa0950d(0x105)]);return _0x1aa805?this['_createFormula'](_0x1aa805[_0xa0950d(0xf8)]):null;}['saveFormulaDisplayTextSnapshot'](){var _0x4c47ad=_0x38b32e;let _0x505b94=this[_0x4c47ad(0xee)][_0x4c47ad(0x103)](this['id']);if(!_0x505b94)throw Error(_0x4c47ad(0xbf)+this['id']+_0x4c47ad(0xf6));return this['_docsFormulaDisplayTextService'][_0x4c47ad(0xcd)](_0x505b94);}[_0x38b32e(0xe2)](_0x3900cc){var _0x451c3a=_0x38b32e;return this[_0x451c3a(0xe3)]({'externalReferences':_0x3900cc[_0x451c3a(0x106)],'formula':_0x3900cc[_0x451c3a(0xec)],'numberFormat':_0x3900cc[_0x451c3a(0xdf)],'target':{'type':_0x451c3a(0xfa),'startOffset':_0x3900cc[_0x451c3a(0xea)],'endOffset':_0x3900cc['endOffset']},'unitId':this[_0x451c3a(0xde)]()});}[_0x38b32e(0xe3)](_0x25065a){var _0x371503=_0x38b32e;let _0x5e9d57=this[_0x371503(0xd7)][_0x371503(0xc7)](_0x19c95b['id'],_0x25065a);return _0x5e9d57?this[_0x371503(0xf9)](_0x5e9d57['rangeId']):null;}[_0x38b32e(0x101)](){var _0x4d24f1=_0x38b32e,_0x593c16;let _0x15b049=this['_docsFormulaModel'][_0x4d24f1(0xf3)](this[_0x4d24f1(0xde)]());return((_0x593c16=this[_0x4d24f1(0xf5)]('')[_0x4d24f1(0xd3)])==null?void 0x0:_0x593c16['filter'](_0x28b6fe=>_0x24b8b0(_0x28b6fe)&&_0x15b049[_0x28b6fe[_0x4d24f1(0xf8)]]!=null))??[];}[_0x38b32e(0xf9)](_0x281ff7){var _0x3d49fa=_0x38b32e;return this['_injector']['createInstance'](b,this[_0x3d49fa(0xde)](),_0x281ff7);}};_0x4d8a90['extend'](T);var E=class extends _0x2a2428{constructor(..._0x5a040e){super(..._0x5a040e),w(this,'_docsFormulaCommandService',void 0x0);}[_0x38b32e(0xe7)](_0x29fb2b){var _0x498f43=_0x38b32e;this['_docsFormulaCommandService']=_0x29fb2b[_0x498f43(0xc9)](_0x74e3c5);}[_0x38b32e(0xe2)](_0x32a28b,_0x5bf8ea,_0x9f300f={}){var _0xeb405c=_0x38b32e;return this[_0xeb405c(0xe3)](_0x32a28b,_0x5bf8ea,_0x9f300f);}[_0x38b32e(0xf1)](_0x118368,_0x31cd2d={}){var _0x4a8cdb=_0x38b32e;return this['_insert'](_0x4a8cdb(0xc2),_0x118368,_0x31cd2d);}[_0x38b32e(0xe3)](_0xf92f73,_0xab3353,_0x48e051){var _0x596832=_0x38b32e;if(this[_0x596832(0xc6)]())return null;let _0x18bae9={'externalReferences':_0x48e051[_0x596832(0x106)],'formula':_0xab3353,'numberFormat':_0x48e051['numberFormat'],'target':{'type':_0x596832(0xf2),'paragraphId':this[_0x596832(0xde)](),'position':_0xf92f73},'unitId':this['_document']['getId']()},_0x22948d=this[_0x596832(0xd7)]['syncExecuteCommand'](_0x19c95b['id'],_0x18bae9);return _0x22948d?this[_0x596832(0xd8)][_0x596832(0xd4)](b,this['_document']['getId'](),_0x22948d[_0x596832(0xf8)]):null;}};_0x2a2428[_0x38b32e(0xef)](E);var D=class extends _0x41761d{constructor(..._0x455eba){var _0x5e90fb=_0x38b32e;super(..._0x455eba),w(this,_0x5e90fb(0xd7),void 0x0);}[_0x38b32e(0xe7)](_0x48f6e6){var _0x573c9e=_0x38b32e;this['_docsFormulaCommandService']=_0x48f6e6[_0x573c9e(0xc9)](_0x74e3c5);}[_0x38b32e(0x10a)](_0x2b10bc,_0x2b282f={}){var _0x421f78=_0x38b32e;let {endOffset:_0x1f1ad3,segmentId:_0x45d6e6,startOffset:_0x4656e6}=this[_0x421f78(0xdc)]();return _0x45d6e6?null:this[_0x421f78(0xe3)](_0x4656e6,_0x1f1ad3,_0x2b10bc,_0x2b282f);}[_0x38b32e(0xe3)](_0x125945,_0x128cd7,_0x3a61aa,_0x49eb96){var _0x1d3439=_0x38b32e;let _0x31b51f={'externalReferences':_0x49eb96[_0x1d3439(0x106)],'formula':_0x3a61aa,'numberFormat':_0x49eb96['numberFormat'],'target':{'type':_0x1d3439(0xfa),'startOffset':_0x125945,'endOffset':_0x128cd7},'unitId':this[_0x1d3439(0xca)]['getId']()},_0x42a2df=this[_0x1d3439(0xd7)]['syncExecuteCommand'](_0x19c95b['id'],_0x31b51f);return _0x42a2df?this[_0x1d3439(0xd8)][_0x1d3439(0xd4)](b,this[_0x1d3439(0xca)][_0x1d3439(0xde)](),_0x42a2df[_0x1d3439(0xf8)]):null;}};_0x41761d['extend'](D);export{b as FDocumentFormula};
1
+ var _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};