@univerjs-pro/docs-formula 1.4.0 → 1.5.1

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/README.md CHANGED
@@ -8,9 +8,9 @@
8
8
 
9
9
  ## Package Overview
10
10
 
11
- | Package | UMD global | CSS | Locales | Facade entry |
12
- | --- | --- | :---: | :---: | :---: |
13
- | `@univerjs-pro/docs-formula` | `UniverProDocsFormula` | No | No | Yes |
11
+ | Package | UMD global | CSS | Locales | Facade entry | Worker entry |
12
+ | --- | --- | :---: | :---: | :---: | :---: |
13
+ | `@univerjs-pro/docs-formula` | `UniverProDocsFormula` | No | No | Yes | No |
14
14
 
15
15
  ## Installation
16
16
 
@@ -20,10 +20,10 @@ pnpm add @univerjs-pro/docs-formula
20
20
  npm install @univerjs-pro/docs-formula
21
21
  ```
22
22
 
23
- Keep all `@univerjs/*` and `@univerjs-pro/*` packages on the same version.
24
-
25
23
  ## Usage
26
24
 
25
+ Start with the [integration setup](https://docs.univer.ai/) for your document type, including its required plugins, styles, and locale resources. The snippet below assumes that setup is complete.
26
+
27
27
  ```ts
28
28
  import { UniverDocsFormulaPlugin } from '@univerjs-pro/docs-formula';
29
29
 
@@ -35,10 +35,10 @@ Register `@univerjs-pro/docs-formula-ui` separately when the editor UI is requir
35
35
 
36
36
  ## Integration Notes
37
37
 
38
- - Keep all `@univerjs/*` and `@univerjs-pro/*` packages on the same version.
39
38
  - Import `@univerjs-pro/docs-formula/facade` when using the package through Univer Facade APIs.
40
39
 
41
40
  ## Resources
42
41
 
43
- - [Documentation](https://docs.univer.ai/guides/pro)
42
+ - [Documentation](https://docs.univer.ai)
44
43
  - [NPM package](https://npmjs.com/package/@univerjs-pro/docs-formula)
44
+ - [GitHub repository](https://github.com/dream-num/univer-pro)
package/lib/cjs/facade.js CHANGED
@@ -1 +1 @@
1
- const _0x4643a2=_0x2369;(function(_0x2f2c25,_0x271c15){const _0x2632d0=_0x2369,_0x4750ee=_0x2f2c25();while(!![]){try{const _0x83fef2=parseInt(_0x2632d0(0xad))/0x1*(-parseInt(_0x2632d0(0xe6))/0x2)+parseInt(_0x2632d0(0xd8))/0x3+-parseInt(_0x2632d0(0xe1))/0x4*(parseInt(_0x2632d0(0xc3))/0x5)+-parseInt(_0x2632d0(0xdb))/0x6*(-parseInt(_0x2632d0(0xb8))/0x7)+parseInt(_0x2632d0(0xd9))/0x8*(-parseInt(_0x2632d0(0x100))/0x9)+-parseInt(_0x2632d0(0xfe))/0xa*(-parseInt(_0x2632d0(0xfc))/0xb)+parseInt(_0x2632d0(0xc7))/0xc;if(_0x83fef2===_0x271c15)break;else _0x4750ee['push'](_0x4750ee['shift']());}catch(_0x1b74d5){_0x4750ee['push'](_0x4750ee['shift']());}}}(_0x595f,0xe5457),Object[_0x4643a2(0xe4)](exports,Symbol[_0x4643a2(0xde)],{'value':_0x4643a2(0xb3)}));function _0x595f(){const _0x29b753=['_insert','_commandService','rangeId','\x20could\x20not\x20be\x20serialized.','map','getResult','IUniverInstanceService','find','_service','2279010PsPsDc','3002272oAxXhu','IResourceLoaderService','996CQvtZj','formula','decorate','toStringTag','_docsFormulaModel','_rangeId','6917840jxTYeD','DocFormulaModel','paragraph','defineProperty','endIndex','3103602PTfeVt','convertToText','_createFormula','ICommandService','replaceWithFormula','length','getRange','startIndex','getSnapshot','startOffset','symbol','_unitId','_univerInstanceService','endOffset','isDocFormulaRange','get','getFormula','end','_injector','UpdateDocFormulaCommand','_document','_initialize','11ENNiQj','FDocumentFormula','7829450thhEOA','getFormulas','18lsbfPk','default','iterator','FDocument','customRanges','_getCustomRange','_docsFormulaResourceLoaderService','_docsFormulaCommandService','function','saveUnit','getConfig','DocFormulaService','remove','numberFormat','constructor','1HOkWrj','saveFormulaDisplayTextSnapshot','DocFormulaDisplayTextService','getSegmentId','SetDocFormulaNumberFormatCommand','range','Module','Inject','insertFormula','object','FDocumentTextRange','76937suvEyr','FDocumentParagraph','externalReferences','getId','UNIVER_DOC','call','ReplaceDocFormulaWithTextCommand','createInstance','RemoveDocFormulaCommand','getFormulaAt','_docsFormulaDisplayTextService','5LmJbLR','string','_getCompleteRanges','getOwnPropertyDescriptor','19245636RzfKlg','_model','describe','syncExecuteCommand','UniverInstanceType','extend','degradeDocumentData','InsertDocFormulaCommand'];_0x595f=function(){return _0x29b753;};return _0x595f();}let e=require('@univerjs-pro/docs-formula'),t=require('@univerjs/core'),n=require('@univerjs/docs/facade');function r(_0x5c8156,_0x123349){return function(_0x2dbfb2,_0x135729){_0x123349(_0x2dbfb2,_0x135729,_0x5c8156);};}function i(_0x15574c,_0x5155b3,_0x3eacd5,_0x58b042){const _0x329cde=_0x4643a2;var _0x114ff0=arguments[_0x329cde(0xeb)],_0x20b1e4=_0x114ff0<0x3?_0x5155b3:_0x58b042===null?_0x58b042=Object[_0x329cde(0xc6)](_0x5155b3,_0x3eacd5):_0x58b042,_0x1a3f9f;if(typeof Reflect==_0x329cde(0xb6)&&typeof Reflect[_0x329cde(0xdd)]==_0x329cde(0xa6))_0x20b1e4=Reflect[_0x329cde(0xdd)](_0x15574c,_0x5155b3,_0x3eacd5,_0x58b042);else{for(var _0x559fbe=_0x15574c['length']-0x1;_0x559fbe>=0x0;_0x559fbe--)(_0x1a3f9f=_0x15574c[_0x559fbe])&&(_0x20b1e4=(_0x114ff0<0x3?_0x1a3f9f(_0x20b1e4):_0x114ff0>0x3?_0x1a3f9f(_0x5155b3,_0x3eacd5,_0x20b1e4):_0x1a3f9f(_0x5155b3,_0x3eacd5))||_0x20b1e4);}return _0x114ff0>0x3&&_0x20b1e4&&Object[_0x329cde(0xe4)](_0x5155b3,_0x3eacd5,_0x20b1e4),_0x20b1e4;}let a=class{constructor(_0x3f53d6,_0x1843cf,_0x54890e,_0x58428a,_0x2bec04,_0x103c8f){const _0x35b52d=_0x4643a2;this[_0x35b52d(0xf1)]=_0x3f53d6,this[_0x35b52d(0xe0)]=_0x1843cf,this[_0x35b52d(0xd0)]=_0x54890e,this[_0x35b52d(0xc8)]=_0x58428a,this[_0x35b52d(0xd7)]=_0x2bec04,this[_0x35b52d(0xf2)]=_0x103c8f;}[_0x4643a2(0xbb)](){return this['_rangeId'];}['getRange'](){const _0x2e9bef=_0x4643a2;let _0x15286=this[_0x2e9bef(0x105)]();return _0x15286?{'endOffset':_0x15286['endIndex']+0x1,'rangeId':_0x15286['rangeId'],'startOffset':_0x15286[_0x2e9bef(0xed)]}:null;}[_0x4643a2(0xf6)](){const _0x7822a=_0x4643a2;var _0x39c604;return((_0x39c604=this['_model']['getFormula'](this['_unitId'],this[_0x7822a(0xe0)]))==null?void 0x0:_0x39c604[_0x7822a(0xdc)])??'';}[_0x4643a2(0xa8)](){const _0x2ee095=_0x4643a2;return this['_model']['getFormula'](this[_0x2ee095(0xf1)],this[_0x2ee095(0xe0)])??null;}[_0x4643a2(0xd4)](){const _0x371527=_0x4643a2;return this[_0x371527(0xd7)]['getResult']({'unitId':this[_0x371527(0xf1)],'rangeId':this[_0x371527(0xe0)]})??null;}[_0x4643a2(0xc9)](){const _0x3b59d6=_0x4643a2;let _0x2f2243=this[_0x3b59d6(0xec)](),_0x5ebf70=this[_0x3b59d6(0xa8)](),_0x25ab31=this[_0x3b59d6(0xd4)]();return!_0x2f2243||!_0x5ebf70||!_0x25ab31?null:{..._0x2f2243,'config':_0x5ebf70,'formula':_0x5ebf70[_0x3b59d6(0xdc)],'result':_0x25ab31,'type':_0x3b59d6(0xdc)};}['update'](_0x12810c){const _0x1833b4=_0x4643a2;return this[_0x1833b4(0xd0)][_0x1833b4(0xca)](e[_0x1833b4(0xf9)]['id'],{'externalReferences':_0x12810c['externalReferences'],'formula':_0x12810c[_0x1833b4(0xdc)],'numberFormat':_0x12810c[_0x1833b4(0xab)],'rangeId':this['_rangeId'],'unitId':this[_0x1833b4(0xf1)]});}['setNumberFormat'](_0xabf427){const _0x5c2999=_0x4643a2;return this['_commandService'][_0x5c2999(0xca)](e[_0x5c2999(0xb1)]['id'],{'numberFormat':_0xabf427,'rangeId':this[_0x5c2999(0xe0)],'unitId':this[_0x5c2999(0xf1)]});}[_0x4643a2(0xaa)](){const _0x3630a6=_0x4643a2;return this[_0x3630a6(0xd0)][_0x3630a6(0xca)](e[_0x3630a6(0xc0)]['id'],{'rangeId':this['_rangeId'],'unitId':this[_0x3630a6(0xf1)]});}['replaceWithText'](_0x1fece7){const _0x5db265=_0x4643a2;return this[_0x5db265(0xd0)][_0x5db265(0xca)](e[_0x5db265(0xbe)]['id'],{'rangeId':this[_0x5db265(0xe0)],'text':_0x1fece7,'unitId':this[_0x5db265(0xf1)]});}[_0x4643a2(0xe7)](){const _0x383cb5=_0x4643a2;return this['_commandService'][_0x383cb5(0xca)](e['ConvertDocFormulaToTextCommand']['id'],{'rangeId':this[_0x383cb5(0xe0)],'unitId':this[_0x383cb5(0xf1)]});}[_0x4643a2(0x105)](){const _0x22c819=_0x4643a2;var _0x5aebb1;let _0x5efe4f=this[_0x22c819(0xf2)]['getUnit'](this[_0x22c819(0xf1)],t[_0x22c819(0xcb)][_0x22c819(0xbc)]);return _0x5efe4f==null||(_0x5aebb1=_0x5efe4f[_0x22c819(0xee)]()['body'])==null||(_0x5aebb1=_0x5aebb1[_0x22c819(0x104)])==null?void 0x0:_0x5aebb1['find'](_0x1d349c=>_0x1d349c['rangeId']===this[_0x22c819(0xe0)]&&(0x0,e[_0x22c819(0xf4)])(_0x1d349c));}};a=i([r(0x2,t[_0x4643a2(0xe9)]),r(0x3,(0x0,t[_0x4643a2(0xb4)])(e[_0x4643a2(0xe2)])),r(0x4,(0x0,t[_0x4643a2(0xb4)])(e[_0x4643a2(0xa9)])),r(0x5,t[_0x4643a2(0xd5)])],a);function o(_0x49cfc1){'@babel/helpers - typeof';const _0x7b7d74=_0x4643a2;return o=typeof Symbol==_0x7b7d74(0xa6)&&typeof Symbol[_0x7b7d74(0x102)]==_0x7b7d74(0xf0)?function(_0x5d298a){return typeof _0x5d298a;}:function(_0xf3aa7c){const _0x4c1284=_0x7b7d74;return _0xf3aa7c&&typeof Symbol==_0x4c1284(0xa6)&&_0xf3aa7c[_0x4c1284(0xac)]===Symbol&&_0xf3aa7c!==Symbol['prototype']?'symbol':typeof _0xf3aa7c;},o(_0x49cfc1);}function s(_0x1022a,_0x38d43d){const _0x13adb7=_0x4643a2;if(o(_0x1022a)!='object'||!_0x1022a)return _0x1022a;var _0x489a97=_0x1022a[Symbol['toPrimitive']];if(_0x489a97!==void 0x0){var _0x3d2700=_0x489a97[_0x13adb7(0xbd)](_0x1022a,_0x38d43d||_0x13adb7(0x101));if(o(_0x3d2700)!=_0x13adb7(0xb6))return _0x3d2700;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x38d43d===_0x13adb7(0xc4)?String:Number)(_0x1022a);}function c(_0x39bfe0){const _0x170c06=_0x4643a2;var _0x587f3e=s(_0x39bfe0,'string');return o(_0x587f3e)==_0x170c06(0xf0)?_0x587f3e:_0x587f3e+'';}function l(_0x43135a,_0x2bb039,_0x283fed){const _0x57370f=_0x4643a2;return(_0x2bb039=c(_0x2bb039))in _0x43135a?Object[_0x57370f(0xe4)](_0x43135a,_0x2bb039,{'value':_0x283fed,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x43135a[_0x2bb039]=_0x283fed,_0x43135a;}var u=class extends n['FDocument']{constructor(..._0x1d9a5a){const _0x52fc85=_0x4643a2;super(..._0x1d9a5a),l(this,_0x52fc85(0x107),void 0x0),l(this,_0x52fc85(0xc2),void 0x0),l(this,_0x52fc85(0xdf),void 0x0),l(this,'_docsFormulaResourceLoaderService',void 0x0);}[_0x4643a2(0xfb)](_0x3e12cb){const _0x29cecd=_0x4643a2;this[_0x29cecd(0x107)]=_0x3e12cb[_0x29cecd(0xf5)](t[_0x29cecd(0xe9)]),this[_0x29cecd(0xc2)]=_0x3e12cb[_0x29cecd(0xf5)](e[_0x29cecd(0xaf)]),this[_0x29cecd(0xdf)]=_0x3e12cb[_0x29cecd(0xf5)](e['DocFormulaModel']),this[_0x29cecd(0x106)]=_0x3e12cb[_0x29cecd(0xf5)](t[_0x29cecd(0xda)]);}[_0x4643a2(0xff)](){const _0x1b456d=_0x4643a2;return this[_0x1b456d(0xc5)]()[_0x1b456d(0xd3)](_0x2a10da=>this[_0x1b456d(0xe8)](_0x2a10da[_0x1b456d(0xd1)]));}['getFormula'](_0x272930){const _0x4366d8=_0x4643a2;return this[_0x4366d8(0xc5)]()['some'](_0x33cb8f=>_0x33cb8f['rangeId']===_0x272930)?this['_createFormula'](_0x272930):null;}[_0x4643a2(0xc1)](_0x217e08){const _0x878192=_0x4643a2;let _0x460d57=this[_0x878192(0xc5)]()[_0x878192(0xd6)](_0x88dc79=>_0x88dc79['startIndex']<=_0x217e08&&_0x217e08<=_0x88dc79[_0x878192(0xe5)]);return _0x460d57?this['_createFormula'](_0x460d57[_0x878192(0xd1)]):null;}[_0x4643a2(0xae)](){const _0x3d2590=_0x4643a2;let _0x474044=this[_0x3d2590(0x106)][_0x3d2590(0xa7)](this['id']);if(!_0x474044)throw Error('Document\x20'+this['id']+_0x3d2590(0xd2));return this[_0x3d2590(0xc2)][_0x3d2590(0xcd)](_0x474044);}[_0x4643a2(0xb5)](_0x1c0c63){const _0x1e3088=_0x4643a2;return this[_0x1e3088(0xcf)]({'externalReferences':_0x1c0c63[_0x1e3088(0xba)],'formula':_0x1c0c63[_0x1e3088(0xdc)],'numberFormat':_0x1c0c63[_0x1e3088(0xab)],'target':{'type':'range','startOffset':_0x1c0c63[_0x1e3088(0xef)],'endOffset':_0x1c0c63[_0x1e3088(0xf3)]},'unitId':this[_0x1e3088(0xbb)]()});}[_0x4643a2(0xcf)](_0x204fcc){const _0x4dd2f3=_0x4643a2;let _0x1cfbc9=this[_0x4dd2f3(0x107)][_0x4dd2f3(0xca)](e['InsertDocFormulaCommand']['id'],_0x204fcc);return _0x1cfbc9?this[_0x4dd2f3(0xe8)](_0x1cfbc9[_0x4dd2f3(0xd1)]):null;}[_0x4643a2(0xc5)](){const _0x4026c9=_0x4643a2;var _0x57adcb;let _0x45e907=this[_0x4026c9(0xdf)]['getFormulas'](this[_0x4026c9(0xbb)]());return((_0x57adcb=this['getBody']('')[_0x4026c9(0x104)])==null?void 0x0:_0x57adcb['filter'](_0x2c06b2=>(0x0,e[_0x4026c9(0xf4)])(_0x2c06b2)&&_0x45e907[_0x2c06b2['rangeId']]!=null))??[];}[_0x4643a2(0xe8)](_0x58d520){const _0x3d2424=_0x4643a2;return this[_0x3d2424(0xf8)][_0x3d2424(0xbf)](a,this[_0x3d2424(0xbb)](),_0x58d520);}};n[_0x4643a2(0x103)]['extend'](u);function _0x2369(_0x3e6191,_0x3a67b5){_0x3e6191=_0x3e6191-0xa6;const _0x595fc8=_0x595f();let _0x2369f3=_0x595fc8[_0x3e6191];return _0x2369f3;}var d=class extends n[_0x4643a2(0xb9)]{constructor(..._0x5edfc4){super(..._0x5edfc4),l(this,'_docsFormulaCommandService',void 0x0);}['_initialize'](_0x3eefb9){const _0x19089c=_0x4643a2;this[_0x19089c(0x107)]=_0x3eefb9[_0x19089c(0xf5)](t[_0x19089c(0xe9)]);}[_0x4643a2(0xb5)](_0x4b3638,_0x3f14a9,_0x256c39={}){const _0x45dbfc=_0x4643a2;return this[_0x45dbfc(0xcf)](_0x4b3638,_0x3f14a9,_0x256c39);}['appendFormula'](_0x3508d6,_0x2a0613={}){const _0x5a3145=_0x4643a2;return this[_0x5a3145(0xcf)](_0x5a3145(0xf7),_0x3508d6,_0x2a0613);}[_0x4643a2(0xcf)](_0x52b236,_0x49b965,_0x18d09d){const _0x386658=_0x4643a2;if(this[_0x386658(0xb0)]())return null;let _0x386a99={'externalReferences':_0x18d09d[_0x386658(0xba)],'formula':_0x49b965,'numberFormat':_0x18d09d[_0x386658(0xab)],'target':{'type':_0x386658(0xe3),'paragraphId':this[_0x386658(0xbb)](),'position':_0x52b236},'unitId':this[_0x386658(0xfa)][_0x386658(0xbb)]()},_0x2c0df1=this[_0x386658(0x107)][_0x386658(0xca)](e[_0x386658(0xce)]['id'],_0x386a99);return _0x2c0df1?this[_0x386658(0xf8)][_0x386658(0xbf)](a,this[_0x386658(0xfa)][_0x386658(0xbb)](),_0x2c0df1[_0x386658(0xd1)]):null;}};n[_0x4643a2(0xb9)][_0x4643a2(0xcc)](d);var f=class extends n['FDocumentTextRange']{constructor(..._0x247ded){const _0x11b153=_0x4643a2;super(..._0x247ded),l(this,_0x11b153(0x107),void 0x0);}[_0x4643a2(0xfb)](_0x632d20){const _0x40dd4e=_0x4643a2;this[_0x40dd4e(0x107)]=_0x632d20['get'](t[_0x40dd4e(0xe9)]);}[_0x4643a2(0xea)](_0x3634c5,_0x2064cf={}){const _0x5d271e=_0x4643a2;let {endOffset:_0x2d8c82,segmentId:_0x34740d,startOffset:_0x120a0a}=this['getRange']();return _0x34740d?null:this[_0x5d271e(0xcf)](_0x120a0a,_0x2d8c82,_0x3634c5,_0x2064cf);}[_0x4643a2(0xcf)](_0xa7be89,_0x3c3024,_0x387c7b,_0x47a8f4){const _0x2e98fe=_0x4643a2;let _0x44cf71={'externalReferences':_0x47a8f4[_0x2e98fe(0xba)],'formula':_0x387c7b,'numberFormat':_0x47a8f4[_0x2e98fe(0xab)],'target':{'type':_0x2e98fe(0xb2),'startOffset':_0xa7be89,'endOffset':_0x3c3024},'unitId':this[_0x2e98fe(0xfa)][_0x2e98fe(0xbb)]()},_0x22a96d=this['_docsFormulaCommandService'][_0x2e98fe(0xca)](e[_0x2e98fe(0xce)]['id'],_0x44cf71);return _0x22a96d?this['_injector'][_0x2e98fe(0xbf)](a,this[_0x2e98fe(0xfa)]['getId'](),_0x22a96d[_0x2e98fe(0xd1)]):null;}};n[_0x4643a2(0xb7)][_0x4643a2(0xcc)](f),Object['defineProperty'](exports,_0x4643a2(0xfd),{'enumerable':!0x0,'get':function(){return a;}});
1
+ const _0x1a02cb=_0x1ba6;(function(_0x2ee12c,_0xfb0cca){const _0xd8d411=_0x1ba6,_0x54184c=_0x2ee12c();while(!![]){try{const _0x3c16c9=parseInt(_0xd8d411(0x1f4))/0x1+parseInt(_0xd8d411(0x1f9))/0x2*(parseInt(_0xd8d411(0x204))/0x3)+parseInt(_0xd8d411(0x212))/0x4+parseInt(_0xd8d411(0x221))/0x5*(-parseInt(_0xd8d411(0x236))/0x6)+parseInt(_0xd8d411(0x1fb))/0x7+-parseInt(_0xd8d411(0x213))/0x8+-parseInt(_0xd8d411(0x1f3))/0x9*(parseInt(_0xd8d411(0x1fd))/0xa);if(_0x3c16c9===_0xfb0cca)break;else _0x54184c['push'](_0x54184c['shift']());}catch(_0x172b75){_0x54184c['push'](_0x54184c['shift']());}}}(_0x5132,0x9c622),Object[_0x1a02cb(0x1ec)](exports,Symbol[_0x1a02cb(0x22b)],{'value':_0x1a02cb(0x241)}));let e=require('@univerjs-pro/docs-formula'),t=require('@univerjs/core'),n=require('@univerjs/docs/facade');function r(_0x2384c3,_0x2c4df2){return function(_0x2eb2ab,_0x239d8c){_0x2c4df2(_0x2eb2ab,_0x239d8c,_0x2384c3);};}function i(_0x4f18ec,_0x1c7f20,_0x10d039,_0x1da1dc){const _0x188c2d=_0x1a02cb;var _0x1fc610=arguments[_0x188c2d(0x1f2)],_0x182e7e=_0x1fc610<0x3?_0x1c7f20:_0x1da1dc===null?_0x1da1dc=Object[_0x188c2d(0x21b)](_0x1c7f20,_0x10d039):_0x1da1dc,_0x287fa3;if(typeof Reflect=='object'&&typeof Reflect[_0x188c2d(0x1f8)]==_0x188c2d(0x247))_0x182e7e=Reflect[_0x188c2d(0x1f8)](_0x4f18ec,_0x1c7f20,_0x10d039,_0x1da1dc);else{for(var _0x7ab561=_0x4f18ec['length']-0x1;_0x7ab561>=0x0;_0x7ab561--)(_0x287fa3=_0x4f18ec[_0x7ab561])&&(_0x182e7e=(_0x1fc610<0x3?_0x287fa3(_0x182e7e):_0x1fc610>0x3?_0x287fa3(_0x1c7f20,_0x10d039,_0x182e7e):_0x287fa3(_0x1c7f20,_0x10d039))||_0x182e7e);}return _0x1fc610>0x3&&_0x182e7e&&Object[_0x188c2d(0x1ec)](_0x1c7f20,_0x10d039,_0x182e7e),_0x182e7e;}let a=class{constructor(_0x5d3138,_0x696f4c,_0x589554,_0x511285,_0x4ad7ff,_0x55a03f){const _0x1e8441=_0x1a02cb;this[_0x1e8441(0x249)]=_0x5d3138,this[_0x1e8441(0x217)]=_0x696f4c,this[_0x1e8441(0x208)]=_0x589554,this[_0x1e8441(0x240)]=_0x511285,this[_0x1e8441(0x1f7)]=_0x4ad7ff,this[_0x1e8441(0x22f)]=_0x55a03f;}['getId'](){const _0x3488cd=_0x1a02cb;return this[_0x3488cd(0x217)];}[_0x1a02cb(0x1eb)](){const _0x1f9ea1=_0x1a02cb;let _0x2bf973=this[_0x1f9ea1(0x21d)]();return _0x2bf973?{'endOffset':_0x2bf973['endIndex']+0x1,'rangeId':_0x2bf973[_0x1f9ea1(0x201)],'startOffset':_0x2bf973[_0x1f9ea1(0x21a)]}:null;}[_0x1a02cb(0x23e)](){const _0x758694=_0x1a02cb;var _0x20641c;return((_0x20641c=this[_0x758694(0x240)][_0x758694(0x23e)](this[_0x758694(0x249)],this['_rangeId']))==null?void 0x0:_0x20641c['formula'])??'';}[_0x1a02cb(0x21e)](){const _0x58106f=_0x1a02cb;return this[_0x58106f(0x240)][_0x58106f(0x23e)](this['_unitId'],this[_0x58106f(0x217)])??null;}[_0x1a02cb(0x21c)](){const _0x4dfceb=_0x1a02cb;return this[_0x4dfceb(0x1f7)][_0x4dfceb(0x21c)]({'unitId':this[_0x4dfceb(0x249)],'rangeId':this[_0x4dfceb(0x217)]})??null;}[_0x1a02cb(0x1ea)](){const _0x24f4e4=_0x1a02cb;let _0x45a6cf=this[_0x24f4e4(0x1eb)](),_0x581996=this[_0x24f4e4(0x21e)](),_0xa3bd01=this[_0x24f4e4(0x21c)]();return!_0x45a6cf||!_0x581996||!_0xa3bd01?null:{..._0x45a6cf,'config':_0x581996,'formula':_0x581996['formula'],'result':_0xa3bd01,'type':_0x24f4e4(0x206)};}[_0x1a02cb(0x214)](_0x52b993){const _0x4bfc6a=_0x1a02cb;return this[_0x4bfc6a(0x208)][_0x4bfc6a(0x245)](e[_0x4bfc6a(0x1ed)]['id'],{'externalReferences':_0x52b993[_0x4bfc6a(0x224)],'formula':_0x52b993['formula'],'numberFormat':_0x52b993[_0x4bfc6a(0x1e9)],'rangeId':this[_0x4bfc6a(0x217)],'unitId':this[_0x4bfc6a(0x249)]});}[_0x1a02cb(0x1e5)](_0x20f692){const _0x54ce5d=_0x1a02cb;return this[_0x54ce5d(0x208)]['syncExecuteCommand'](e[_0x54ce5d(0x223)]['id'],{'numberFormat':_0x20f692,'rangeId':this[_0x54ce5d(0x217)],'unitId':this[_0x54ce5d(0x249)]});}[_0x1a02cb(0x230)](){const _0x3d746a=_0x1a02cb;return this[_0x3d746a(0x208)]['syncExecuteCommand'](e[_0x3d746a(0x242)]['id'],{'rangeId':this[_0x3d746a(0x217)],'unitId':this['_unitId']});}[_0x1a02cb(0x231)](_0x2a3929){const _0x1969f9=_0x1a02cb;return this['_commandService']['syncExecuteCommand'](e[_0x1969f9(0x24b)]['id'],{'rangeId':this['_rangeId'],'text':_0x2a3929,'unitId':this[_0x1969f9(0x249)]});}[_0x1a02cb(0x23a)](){const _0x62a61a=_0x1a02cb;return this[_0x62a61a(0x208)][_0x62a61a(0x245)](e[_0x62a61a(0x202)]['id'],{'rangeId':this[_0x62a61a(0x217)],'unitId':this[_0x62a61a(0x249)]});}[_0x1a02cb(0x21d)](){const _0x2ad560=_0x1a02cb;var _0x106921;let _0x1d0d2a=this[_0x2ad560(0x22f)][_0x2ad560(0x205)](this[_0x2ad560(0x249)],t[_0x2ad560(0x1ee)][_0x2ad560(0x219)]);return _0x1d0d2a==null||(_0x106921=_0x1d0d2a[_0x2ad560(0x243)]()[_0x2ad560(0x234)])==null||(_0x106921=_0x106921[_0x2ad560(0x20a)])==null?void 0x0:_0x106921['find'](_0x3c58c0=>_0x3c58c0[_0x2ad560(0x201)]===this[_0x2ad560(0x217)]&&(0x0,e[_0x2ad560(0x20e)])(_0x3c58c0));}};a=i([r(0x2,t[_0x1a02cb(0x1fa)]),r(0x3,(0x0,t[_0x1a02cb(0x203)])(e[_0x1a02cb(0x1ef)])),r(0x4,(0x0,t[_0x1a02cb(0x203)])(e[_0x1a02cb(0x200)])),r(0x5,t[_0x1a02cb(0x216)])],a);function o(_0x21e8a2){'@babel/helpers - typeof';const _0xb27ea7=_0x1a02cb;return o=typeof Symbol==_0xb27ea7(0x247)&&typeof Symbol[_0xb27ea7(0x1e6)]=='symbol'?function(_0x465ab1){return typeof _0x465ab1;}:function(_0x4b03c1){const _0x2812f9=_0xb27ea7;return _0x4b03c1&&typeof Symbol=='function'&&_0x4b03c1[_0x2812f9(0x20b)]===Symbol&&_0x4b03c1!==Symbol[_0x2812f9(0x1e8)]?'symbol':typeof _0x4b03c1;},o(_0x21e8a2);}function s(_0x22d281,_0x36b43e){const _0x365a34=_0x1a02cb;if(o(_0x22d281)!=_0x365a34(0x225)||!_0x22d281)return _0x22d281;var _0x57f754;if(typeof Symbol<'u'&&(_0x57f754=_0x22d281[Symbol[_0x365a34(0x209)]])!==void 0x0){var _0x3cb851=_0x57f754[_0x365a34(0x232)](_0x22d281,_0x36b43e||_0x365a34(0x222));if(o(_0x3cb851)!=_0x365a34(0x225))return _0x3cb851;throw TypeError(_0x365a34(0x1f1));}return(_0x36b43e===_0x365a34(0x233)?String:Number)(_0x22d281);}function c(_0xba3f6){const _0x307c64=_0x1a02cb;var _0x40f93d=s(_0xba3f6,_0x307c64(0x233));return o(_0x40f93d)=='symbol'?_0x40f93d:_0x40f93d+'';}function l(_0x21e0b0,_0x828249,_0x48827a){const _0x51ee2e=_0x1a02cb;return(_0x828249=c(_0x828249))in _0x21e0b0?Object[_0x51ee2e(0x1ec)](_0x21e0b0,_0x828249,{'value':_0x48827a,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x21e0b0[_0x828249]=_0x48827a,_0x21e0b0;}var u=class extends n['FDocument']{constructor(..._0x53ba3b){const _0x1cfabc=_0x1a02cb;super(..._0x53ba3b),l(this,_0x1cfabc(0x22a),void 0x0),l(this,'_docsFormulaDisplayTextService',void 0x0),l(this,_0x1cfabc(0x218),void 0x0),l(this,_0x1cfabc(0x246),void 0x0);}['_initialize'](_0x1a8104){const _0x576190=_0x1a02cb;this[_0x576190(0x22a)]=_0x1a8104[_0x576190(0x1fc)](t[_0x576190(0x1fa)]),this['_docsFormulaDisplayTextService']=_0x1a8104[_0x576190(0x1fc)](e[_0x576190(0x20c)]),this[_0x576190(0x218)]=_0x1a8104[_0x576190(0x1fc)](e[_0x576190(0x1ef)]),this[_0x576190(0x246)]=_0x1a8104[_0x576190(0x1fc)](t[_0x576190(0x24a)]);}[_0x1a02cb(0x1e7)](){const _0x2c4c20=_0x1a02cb;return this[_0x2c4c20(0x1ff)]()[_0x2c4c20(0x1f5)](_0x5bf35d=>this[_0x2c4c20(0x23c)](_0x5bf35d[_0x2c4c20(0x201)]));}['getFormula'](_0x355f4f){const _0x4aff87=_0x1a02cb;return this[_0x4aff87(0x1ff)]()[_0x4aff87(0x244)](_0x56ecc8=>_0x56ecc8[_0x4aff87(0x201)]===_0x355f4f)?this[_0x4aff87(0x23c)](_0x355f4f):null;}[_0x1a02cb(0x226)](_0x59accc){const _0x2533da=_0x1a02cb;let _0x4d8b7b=this[_0x2533da(0x1ff)]()[_0x2533da(0x21f)](_0x5c73f8=>_0x5c73f8[_0x2533da(0x21a)]<=_0x59accc&&_0x59accc<=_0x5c73f8[_0x2533da(0x227)]);return _0x4d8b7b?this[_0x2533da(0x23c)](_0x4d8b7b['rangeId']):null;}[_0x1a02cb(0x238)](){const _0x3d8378=_0x1a02cb;let _0x15e774=this['_docsFormulaResourceLoaderService']['saveUnit'](this['id']);if(!_0x15e774)throw Error(_0x3d8378(0x22c)+this['id']+_0x3d8378(0x239));return this['_docsFormulaDisplayTextService'][_0x3d8378(0x22d)](_0x15e774);}[_0x1a02cb(0x235)](_0x3ab6fd){const _0xc05bfd=_0x1a02cb;return this[_0xc05bfd(0x23b)]({'externalReferences':_0x3ab6fd[_0xc05bfd(0x224)],'formula':_0x3ab6fd['formula'],'numberFormat':_0x3ab6fd[_0xc05bfd(0x1e9)],'target':{'type':'range','startOffset':_0x3ab6fd[_0xc05bfd(0x20d)],'endOffset':_0x3ab6fd[_0xc05bfd(0x23f)]},'unitId':this[_0xc05bfd(0x248)]()});}[_0x1a02cb(0x23b)](_0x42d5dc){const _0x1a652a=_0x1a02cb;let _0x3e57bf=this[_0x1a652a(0x22a)][_0x1a652a(0x245)](e[_0x1a652a(0x22e)]['id'],_0x42d5dc);return _0x3e57bf?this[_0x1a652a(0x23c)](_0x3e57bf[_0x1a652a(0x201)]):null;}[_0x1a02cb(0x1ff)](){const _0x38005f=_0x1a02cb;var _0x266209;let _0x51e568=this[_0x38005f(0x218)][_0x38005f(0x1e7)](this[_0x38005f(0x248)]());return((_0x266209=this[_0x38005f(0x210)]('')[_0x38005f(0x20a)])==null?void 0x0:_0x266209[_0x38005f(0x215)](_0x4d8c5a=>(0x0,e[_0x38005f(0x20e)])(_0x4d8c5a)&&_0x51e568[_0x4d8c5a[_0x38005f(0x201)]]!=null))??[];}['_createFormula'](_0x38fa05){const _0x214868=_0x1a02cb;return this['_injector'][_0x214868(0x207)](a,this[_0x214868(0x248)](),_0x38fa05);}};n[_0x1a02cb(0x1f0)]['extend'](u);function _0x5132(){const _0x4826d4=['DocFormulaModel','FDocument','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','length','7461ujueey','1111568PrDUIy','map','end','_service','decorate','239354ZEzwpA','ICommandService','1511251XPULCB','get','5020MuGaLi','FDocumentTextRange','_getCompleteRanges','DocFormulaService','rangeId','ConvertDocFormulaToTextCommand','Inject','21eXzrwB','getUnit','formula','createInstance','_commandService','toPrimitive','customRanges','constructor','DocFormulaDisplayTextService','startOffset','isDocFormulaRange','_initialize','getBody','_injector','859284TlkEJz','839696SmUhwr','update','filter','IUniverInstanceService','_rangeId','_docsFormulaModel','UNIVER_DOC','startIndex','getOwnPropertyDescriptor','getResult','_getCustomRange','getConfig','find','paragraph','5jiMunx','default','SetDocFormulaNumberFormatCommand','externalReferences','object','getFormulaAt','endIndex','FDocumentFormula','_document','_docsFormulaCommandService','toStringTag','Document\x20','degradeDocumentData','InsertDocFormulaCommand','_univerInstanceService','remove','replaceWithText','call','string','body','insertFormula','7310130wbDtwH','FDocumentParagraph','saveFormulaDisplayTextSnapshot','\x20could\x20not\x20be\x20serialized.','convertToText','_insert','_createFormula','extend','getFormula','endOffset','_model','Module','RemoveDocFormulaCommand','getSnapshot','some','syncExecuteCommand','_docsFormulaResourceLoaderService','function','getId','_unitId','IResourceLoaderService','ReplaceDocFormulaWithTextCommand','replaceWithFormula','setNumberFormat','iterator','getFormulas','prototype','numberFormat','describe','getRange','defineProperty','UpdateDocFormulaCommand','UniverInstanceType'];_0x5132=function(){return _0x4826d4;};return _0x5132();}function _0x1ba6(_0x2fa8ec,_0x21be57){_0x2fa8ec=_0x2fa8ec-0x1e5;const _0x51327b=_0x5132();let _0x1ba6bc=_0x51327b[_0x2fa8ec];return _0x1ba6bc;}var d=class extends n[_0x1a02cb(0x237)]{constructor(..._0x37ab21){const _0x19e228=_0x1a02cb;super(..._0x37ab21),l(this,_0x19e228(0x22a),void 0x0);}['_initialize'](_0x20e183){const _0x1731cd=_0x1a02cb;this[_0x1731cd(0x22a)]=_0x20e183[_0x1731cd(0x1fc)](t['ICommandService']);}[_0x1a02cb(0x235)](_0x2d5973,_0x37c599,_0x2973ac={}){const _0x30f104=_0x1a02cb;return this[_0x30f104(0x23b)](_0x2d5973,_0x37c599,_0x2973ac);}['appendFormula'](_0x39aaf0,_0x149203={}){const _0x296133=_0x1a02cb;return this[_0x296133(0x23b)](_0x296133(0x1f6),_0x39aaf0,_0x149203);}['_insert'](_0x281c7f,_0x4cd9ed,_0xfebf27){const _0x5473c2=_0x1a02cb;if(this['getSegmentId']())return null;let _0x2b74fe={'externalReferences':_0xfebf27[_0x5473c2(0x224)],'formula':_0x4cd9ed,'numberFormat':_0xfebf27['numberFormat'],'target':{'type':_0x5473c2(0x220),'paragraphId':this[_0x5473c2(0x248)](),'position':_0x281c7f},'unitId':this[_0x5473c2(0x229)][_0x5473c2(0x248)]()},_0x5d6fac=this[_0x5473c2(0x22a)][_0x5473c2(0x245)](e[_0x5473c2(0x22e)]['id'],_0x2b74fe);return _0x5d6fac?this[_0x5473c2(0x211)][_0x5473c2(0x207)](a,this[_0x5473c2(0x229)]['getId'](),_0x5d6fac[_0x5473c2(0x201)]):null;}};n[_0x1a02cb(0x237)]['extend'](d);var f=class extends n[_0x1a02cb(0x1fe)]{constructor(..._0x2b7965){super(..._0x2b7965),l(this,'_docsFormulaCommandService',void 0x0);}[_0x1a02cb(0x20f)](_0x1c20ae){const _0x3f6379=_0x1a02cb;this[_0x3f6379(0x22a)]=_0x1c20ae[_0x3f6379(0x1fc)](t[_0x3f6379(0x1fa)]);}[_0x1a02cb(0x24c)](_0x25ef5b,_0x2fa72e={}){const _0x583c9c=_0x1a02cb;let {endOffset:_0x58d576,segmentId:_0x5a3c0a,startOffset:_0x185380}=this[_0x583c9c(0x1eb)]();return _0x5a3c0a?null:this[_0x583c9c(0x23b)](_0x185380,_0x58d576,_0x25ef5b,_0x2fa72e);}[_0x1a02cb(0x23b)](_0x5402af,_0x5dd817,_0x1c8f7,_0x38bf14){const _0x5dc2e8=_0x1a02cb;let _0x16ff5a={'externalReferences':_0x38bf14[_0x5dc2e8(0x224)],'formula':_0x1c8f7,'numberFormat':_0x38bf14[_0x5dc2e8(0x1e9)],'target':{'type':'range','startOffset':_0x5402af,'endOffset':_0x5dd817},'unitId':this[_0x5dc2e8(0x229)][_0x5dc2e8(0x248)]()},_0x57c209=this['_docsFormulaCommandService'][_0x5dc2e8(0x245)](e[_0x5dc2e8(0x22e)]['id'],_0x16ff5a);return _0x57c209?this['_injector'][_0x5dc2e8(0x207)](a,this[_0x5dc2e8(0x229)][_0x5dc2e8(0x248)](),_0x57c209[_0x5dc2e8(0x201)]):null;}};n[_0x1a02cb(0x1fe)][_0x1a02cb(0x23d)](f),Object[_0x1a02cb(0x1ec)](exports,_0x1a02cb(0x228),{'enumerable':!0x0,'get':function(){return a;}});
package/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- const _0x57036f=_0x2b8a;(function(_0x254e82,_0xf71dc){const _0x4e3b04=_0x2b8a,_0x3098e5=_0x254e82();while(!![]){try{const _0x4b9f08=parseInt(_0x4e3b04(0x129))/0x1*(parseInt(_0x4e3b04(0x1cb))/0x2)+parseInt(_0x4e3b04(0x17c))/0x3*(parseInt(_0x4e3b04(0x22f))/0x4)+parseInt(_0x4e3b04(0x154))/0x5+-parseInt(_0x4e3b04(0x13a))/0x6+parseInt(_0x4e3b04(0x212))/0x7*(parseInt(_0x4e3b04(0x20b))/0x8)+-parseInt(_0x4e3b04(0x13f))/0x9+-parseInt(_0x4e3b04(0x11b))/0xa;if(_0x4b9f08===_0xf71dc)break;else _0x3098e5['push'](_0x3098e5['shift']());}catch(_0x1c88f7){_0x3098e5['push'](_0x3098e5['shift']());}}}(_0x28b6,0x67869),Object[_0x57036f(0x165)](exports,Symbol[_0x57036f(0x199)],{'value':_0x57036f(0x158)}));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=_0x57036f(0x1a5),s='univer-docs-formula';function c(){return{'formulas':{}};}function l(_0x198848){const _0x2bf5a5=_0x57036f;return!_0x198848||typeof _0x198848!='object'||!(_0x2bf5a5(0x1f8)in _0x198848)||!_0x198848[_0x2bf5a5(0x1f8)]||typeof _0x198848[_0x2bf5a5(0x1f8)]!=_0x2bf5a5(0x190)||Array[_0x2bf5a5(0x18f)](_0x198848['formulas'])?!0x1:Object[_0x2bf5a5(0x217)](_0x198848['formulas'])[_0x2bf5a5(0x198)](([_0x28f63f,_0x39f4da])=>_0x28f63f[_0x2bf5a5(0x1e9)]>0x0&&u(_0x39f4da));}function _0x28b6(){const _0x19b437=['ConvertDocFormulaToTextCommand','set','UniverLicensePlugin','getCustomRangeInterval','getRegisteredFormulas','RichTextEditingMutation','docs-formula.mutation.set-resource','deleteFormula','lastValue','findDocFormulaRange','collectMutations','retain','formulaResult$','updates','position','type','get','_injector','Document\x20main\x20body\x20is\x20required\x20to\x20insert\x20Doc\x20Formula.','expectedNumberFormat','max','segmentId','pending','assign','previousResource','CustomRangeType','DocFormulaResourceController','endsWith','expectedReferenceRevision','RemoveDocFormulaCommand','LexerTreeBuilder','PENDING','accessor','insert','presentationChanged$','_configService','getPresentation','2247390QzowrK','getUnit','identity','DocTextResolverService','registerPluginResource','boolean','_deleteRegistration','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','_syncUnit','success','univer-docs-formula','formula','constructor','customRanges','168275PIgWxR','COLUMN_GROUP_START','resolveFormula','sort','touchDependencies','_formulaService','InsertDocFormulaCommand','getFormula','previousDocumentData','docs-formula.command.remove','invalid-resource','clear','OtherFormulaBizType','Inject','documentRedo','tables','RemoveDocFormulaMutation','2567304SHPjmK','DataStreamTreeTokenType','BLOCK_END','startOffset','next','6551631OlscJR','collectFormulaExternalReferenceQualifiers','resources','keys','FormulaCacheEligibilityService','getResource','_preserveInvalid','default','stringify','setConfig','degradeBody','startIndex','shiftInclusiveRangeOnInsert','function','_pendingUnitIds','syncUnit','status','redoMutation','insertLength','removeUnit','dataStream','560595emzXGc','_resources','_updateFormulaResult','disposeWithMe','Module','assertSafeDocFormulaInsertRange','ICommandService','_change$','subscribe','_service','symbol','resolveHostFormulaExternalReferences','docs-formula.mutation.set-formula','SetDocFormulaNumberFormatCommand','sectionBreaks','getCurrentUnitOfType','UniverProFormulaEnginePlugin','defineProperty','endOffset','DocFormulaResultStatus','Subject','getAllUnitsForType','UniverDocsPlugin','UniverInstanceType','_resourceManagerService','COLUMN_START','TextX','add','body','getSnapshot','error','serialize','values','start','resourceRedo','TABLE_START','docs-formula.mutation.set-last-values','COLUMN_GROUP_END','_instanceService','formulaId','3jrIWcV','documentData','_model','_syncScheduled','_formulaKeys','getFormulas','getScalarFormulaResultCell','text','Plugin','number','_setPresentation','COLUMN_END','syncExecuteCommand','endIndex','asObservable','docs-formula.command.update','shiftExclusiveRangeOnDelete','unregisterUnit','unitId','isArray','object','ERROR','paragraphId','_univerInstanceService','IResourceManagerService','_registrations','externalReferences','UniverDocsFormulaPlugin','every','toStringTag','COMMAND','_queueSync','liveResult','setFormulas','_config','deleteLength','customDecorations','buildUpdateDocFormulaActions','degradeDocumentData','source','Tools','DOC_FORMULA_PLUGIN','_rawResources','_isDisposed','end','getBody','docs-formula.command.convert-to-text','rangeId','find','selection','trim','columnGroups','_docFormulaModel','resolveFormulaResultPresentation','range','string','createEmptyDocFormulaResource','DocSelectionManagerService','decorate','setResource','register','@univerjs-pro/docs-formula','change$','target','UNIVER_DOC','disabled','paragraphs','document','EMPTY','resource','SetDocFormulaResourceMutation','eligible','stale','docs-formula.command.insert','nextDocumentData','docs-formula.command.set-number-format','pattern','cursorOffset','dispose','10LCQJyp','slice','removeFormula','textRuns','config','params','_commandService','undoMutation','trigger','TABLE_ROW_START','load','pluginName','customBlocks','HostExternalReferenceModel','from','degradeDocFormulaDocumentData','Doc\x20Formula\x20range\x20cannot\x20cross\x20document\x20structure\x20boundaries','isDocFormulaResource','unitDisposed$','getLoadError','wholeEntity','buildInsertDocFormulaActions','TABLE_CELL_END','TABLE_CELL_START','DOC_FORMULA_OBJECT_REPLACEMENT','docs-formula.config','numberFormat','_hostExternalReferenceModel','CUSTOM_BLOCK','startsWith','length','onCommandExecuted','empty','toFormulaLastValue','referenceRevision','registerFormulaWithRange','presentation','blockRanges','externalMutations','DocFormulaDisplayTextService','expectedFormula','1.4.0','delete','_registrationService','setFormula','formulas','TABLE_END','PARAGRAPH','push','registerProvider','JSONX','references','deepClone','isFormulaLastValue','Disposable','docs-formula.mutation.remove-formula','includes','Injector','filter','cell','resolveText','packageName','nextResource','DOC_FORMULA_CUSTOM_RANGE_KIND','32DyeNow','assess','SUCCESS','unregister','TABLE_ROW_END','name','_loadErrors','165151wgKbHb','DocFormulaModel','IUniverInstanceService','shiftExclusiveRangeOnInsert','DocFormulaService','entries','resolved','BLOCK_START','fromEntries','resolveBinding','getBodySliceForTextXAction','merge','_cacheEligibilityService','forEach','buildUpsertHostExternalReferenceMutations','getInstance','_presentationChanged$','RegisterOtherFormulaService','DOC','CommandType','shiftInclusiveRangeOnDelete','resourceUndo','has','docs-formula.command.replace-with-text','MUTATION','registerCommand','min','color','getUnitId','3027028jkQOVp','parse','SECTION_BREAK','call','model','InvalidDocFormulaInsertRangeError','map','getResult','isInteger','complete'];_0x28b6=function(){return _0x19b437;};return _0x28b6();}function u(_0x3689fe){const _0x2797da=_0x57036f;return!_0x3689fe||typeof _0x3689fe!=_0x2797da(0x190)||!f(_0x3689fe,[_0x2797da(0x126),_0x2797da(0x1e5),_0x2797da(0x241)])||!(_0x2797da(0x126)in _0x3689fe)||typeof _0x3689fe['formula']!='string'||!_0x3689fe[_0x2797da(0x126)]['trim']()||'numberFormat'in _0x3689fe&&_0x3689fe['numberFormat']!=null&&(typeof _0x3689fe[_0x2797da(0x1e5)]!=_0x2797da(0x190)||!f(_0x3689fe[_0x2797da(0x1e5)],[_0x2797da(0x1c8)])||!(_0x2797da(0x1c8)in _0x3689fe[_0x2797da(0x1e5)])||typeof _0x3689fe[_0x2797da(0x1e5)][_0x2797da(0x1c8)]!=_0x2797da(0x1b3))?!0x1:!('lastValue'in _0x3689fe)||_0x3689fe[_0x2797da(0x241)]==null||d(_0x3689fe[_0x2797da(0x241)]);}function d(_0x4a0ca2){const _0x2f250c=_0x57036f;return!_0x4a0ca2||typeof _0x4a0ca2!=_0x2f250c(0x190)||!f(_0x4a0ca2,['v','t',_0x2f250c(0x1c8)])||!('v'in _0x4a0ca2)||_0x4a0ca2['v']!==null&&typeof _0x4a0ca2['v']!=_0x2f250c(0x1b3)&&typeof _0x4a0ca2['v']!=_0x2f250c(0x185)&&typeof _0x4a0ca2['v']!=_0x2f250c(0x120)||'t'in _0x4a0ca2&&_0x4a0ca2['t']!=null&&!ee(_0x4a0ca2['t'])?!0x1:!(_0x2f250c(0x1c8)in _0x4a0ca2)||_0x4a0ca2[_0x2f250c(0x1c8)]==null||typeof _0x4a0ca2[_0x2f250c(0x1c8)]==_0x2f250c(0x1b3);}function f(_0x2b0787,_0x5ddd13){const _0x1459f6=_0x57036f;let _0x263dee=new Set(_0x5ddd13);return Object[_0x1459f6(0x142)](_0x2b0787)[_0x1459f6(0x198)](_0x25acbb=>_0x263dee[_0x1459f6(0x228)](_0x25acbb));}function ee(_0x43067f){const _0x1ae784=_0x57036f;return typeof _0x43067f==_0x1ae784(0x185)&&Object['values'](t['CellValueType'])[_0x1ae784(0x203)](_0x43067f);}const p=new Set([t[_0x57036f(0x13b)][_0x57036f(0x231)],t[_0x57036f(0x13b)][_0x57036f(0x177)],t[_0x57036f(0x13b)][_0x57036f(0x1d4)],t[_0x57036f(0x13b)][_0x57036f(0x1e2)],t[_0x57036f(0x13b)][_0x57036f(0x1e1)],t[_0x57036f(0x13b)][_0x57036f(0x20f)],t[_0x57036f(0x13b)][_0x57036f(0x1f9)],t['DataStreamTreeTokenType'][_0x57036f(0x12a)],t['DataStreamTreeTokenType'][_0x57036f(0x16d)],t[_0x57036f(0x13b)][_0x57036f(0x187)],t[_0x57036f(0x13b)][_0x57036f(0x179)],t['DataStreamTreeTokenType'][_0x57036f(0x219)],t['DataStreamTreeTokenType'][_0x57036f(0x13c)],t['DataStreamTreeTokenType'][_0x57036f(0x1e7)]]);var m=class extends Error{constructor(){const _0x388150=_0x57036f;super(_0x388150(0x1db));}};function te(_0x20a7c1){const _0x543f2e=_0x57036f;var _0x12709f,_0x6ea5fa;let _0xa2c206=t[_0x543f2e(0x1a4)][_0x543f2e(0x1ff)](_0x20a7c1[_0x543f2e(0x17d)]),_0x5a9912=T(_0xa2c206),{startOffset:_0x41a206,endOffset:_0x1a70bb}=oe(_0x5a9912,_0x20a7c1[_0x543f2e(0x13d)],_0x20a7c1[_0x543f2e(0x166)]);ie(_0x5a9912,_0x41a206,_0x1a70bb);let _0x5a47a5=((_0x12709f=_0x5a9912[_0x543f2e(0x128)])==null?void 0x0:_0x12709f[_0x543f2e(0x205)](_0x3aac3d=>{const _0x21b535=_0x543f2e;if(!g(_0x3aac3d))return!0x1;let _0x1f9967=(0x0,t[_0x21b535(0x23c)])(_0x3aac3d);return _0x1f9967['endOffset']>_0x41a206&&_0x1f9967['startOffset']<_0x1a70bb;})[_0x543f2e(0x235)](_0x1719ef=>_0x1719ef[_0x543f2e(0x1ab)]))??[];ce(_0x5a9912,_0x41a206,_0x1a70bb,''),_0x5a9912[_0x543f2e(0x128)]=[...((_0x6ea5fa=_0x5a9912[_0x543f2e(0x128)])==null?void 0x0:_0x6ea5fa[_0x543f2e(0x205)](_0x12a73d=>!_0x5a47a5[_0x543f2e(0x203)](_0x12a73d['rangeId'])&&_0x12a73d[_0x543f2e(0x1ab)]!==_0x20a7c1[_0x543f2e(0x1ab)]))??[],ae(_0x20a7c1['rangeId'],_0x41a206)][_0x543f2e(0x12c)]((_0x35eafc,_0x2ce919)=>_0x35eafc[_0x543f2e(0x14a)]-_0x2ce919['startIndex']);let _0x4d21c6=v(_0x20a7c1[_0x543f2e(0x1c1)]);return _0x5a47a5['forEach'](_0x1960b4=>{const _0x467023=_0x543f2e;delete _0x4d21c6[_0x467023(0x1f8)][_0x1960b4];}),_0x4d21c6['formulas'][_0x20a7c1['rangeId']]=t['Tools'][_0x543f2e(0x1ff)](_0x20a7c1[_0x543f2e(0x1cf)]),{'nextDocumentData':_0xa2c206,'nextResource':_0x4d21c6,'cursorOffset':_0x41a206+0x1};}function ne(_0x585bcd){const _0x37b904=_0x57036f;var _0xc1a636,_0x57ab45;let _0x42587b=t[_0x37b904(0x1a4)][_0x37b904(0x1ff)](_0x585bcd['documentData']),_0x5f4e97=(_0xc1a636=T(_0x42587b)['customRanges'])==null?void 0x0:_0xc1a636[_0x37b904(0x1ac)](_0x5b5f00=>_0x5b5f00[_0x37b904(0x1ab)]===_0x585bcd[_0x37b904(0x1ab)]&&g(_0x5b5f00));if(!_0x5f4e97||!((_0x57ab45=_0x585bcd['resource'])!=null&&_0x57ab45[_0x37b904(0x1f8)][_0x585bcd[_0x37b904(0x1ab)]]))return null;let _0x174420=v(_0x585bcd[_0x37b904(0x1c1)]);return _0x174420[_0x37b904(0x1f8)][_0x585bcd[_0x37b904(0x1ab)]]=t['Tools'][_0x37b904(0x1ff)](_0x585bcd[_0x37b904(0x1cf)]),{'nextDocumentData':_0x42587b,'nextResource':_0x174420,'cursorOffset':_0x5f4e97[_0x37b904(0x189)]+0x1};}function h(_0x501a93){const _0x1c750b=_0x57036f;let _0x4ab006=t[_0x1c750b(0x1a4)][_0x1c750b(0x1ff)](_0x501a93[_0x1c750b(0x17d)]),_0xf96224=le(_0x4ab006,_0x501a93[_0x1c750b(0x1ab)],_0x501a93['text']??'');if(_0xf96224==null)return null;let _0x2a903a=v(_0x501a93[_0x1c750b(0x1c1)]);return delete _0x2a903a[_0x1c750b(0x1f8)][_0x501a93[_0x1c750b(0x1ab)]],{'nextDocumentData':_0x4ab006,'nextResource':_0x2a903a,'cursorOffset':_0xf96224};}function re(_0x1d8fbc,_0x255c79){const _0x2bf1d1=_0x57036f;var _0x5a6013;let _0x48ddd4=t[_0x2bf1d1(0x1a4)][_0x2bf1d1(0x1ff)](_0x1d8fbc),_0x14f1f4=_0x48ddd4[_0x2bf1d1(0x170)];if(!_0x14f1f4)return _0x48ddd4;let _0x26019e=new Map(_0x255c79[_0x2bf1d1(0x235)](_0x14def8=>[_0x14def8[_0x2bf1d1(0x1ab)],_0x14def8[_0x2bf1d1(0x183)]])),_0x98ae75=((_0x5a6013=_0x14f1f4['customRanges'])==null?void 0x0:_0x5a6013[_0x2bf1d1(0x205)](_0x59aa1d=>g(_0x59aa1d)&&_0x26019e[_0x2bf1d1(0x228)](_0x59aa1d[_0x2bf1d1(0x1ab)]))[_0x2bf1d1(0x12c)]((_0x18d5eb,_0x19e7bd)=>_0x19e7bd['startIndex']-_0x18d5eb['startIndex']))??[];for(let _0x5727bd of _0x98ae75)le(_0x48ddd4,_0x5727bd[_0x2bf1d1(0x1ab)],_0x26019e[_0x2bf1d1(0x249)](_0x5727bd[_0x2bf1d1(0x1ab)])??'');return _0x48ddd4;}function g(_0x1921fb){const _0x2b9ddb=_0x57036f;var _0x522439;return(_0x1921fb==null?void 0x0:_0x1921fb['rangeType'])===t[_0x2b9ddb(0x252)]['CUSTOM']&&_0x1921fb[_0x2b9ddb(0x1df)]===!0x0&&((_0x522439=_0x1921fb['properties'])==null?void 0x0:_0x522439['kind'])===_0x2b9ddb(0x125);}function _(_0xa3f44f,_0xd31e3e){const _0x2be0e1=_0x57036f;var _0x9e9408;return _0xa3f44f==null||(_0x9e9408=_0xa3f44f[_0x2be0e1(0x128)])==null?void 0x0:_0x9e9408[_0x2be0e1(0x1ac)](_0x139bdc=>_0x139bdc[_0x2be0e1(0x1ab)]===_0xd31e3e&&g(_0x139bdc));}function ie(_0x65d671,_0x4c7179,_0xbbc528){const _0x36c2f9=_0x57036f;if(_0x4c7179===_0xbbc528){if(p['has'](_0x65d671[_0x36c2f9(0x153)][_0x4c7179]))throw new m();}else{for(let _0x2d02ce=_0x4c7179;_0x2d02ce<_0xbbc528;_0x2d02ce++)if(_0x65d671[_0x36c2f9(0x153)][_0x2d02ce]===t[_0x36c2f9(0x13b)][_0x36c2f9(0x1fa)]||p[_0x36c2f9(0x228)](_0x65d671[_0x36c2f9(0x153)][_0x2d02ce]))throw new m();}}function ae(_0x5d52ae,_0x462e67){const _0x5b4847=_0x57036f;return{'startIndex':_0x462e67,'endIndex':_0x462e67,'rangeId':_0x5d52ae,'rangeType':t[_0x5b4847(0x252)]['CUSTOM'],'wholeEntity':!0x0,'properties':{'kind':s}};}function v(_0x572b97){const _0x2a671f=_0x57036f;return _0x572b97?t['Tools'][_0x2a671f(0x1ff)](_0x572b97):c();}function oe(_0x4d01b0,_0x14b20f,_0xb5c155){const _0x499d6e=_0x57036f;let _0x28120f=se(_0x4d01b0),_0x245430=_0x14b20f??_0x28120f,_0x1f064f=_0xb5c155??_0x245430;return{'startOffset':y(Math[_0x499d6e(0x22c)](_0x245430,_0x1f064f),_0x28120f),'endOffset':y(Math[_0x499d6e(0x24d)](_0x245430,_0x1f064f),_0x28120f)};}function y(_0xfbc597,_0x5e34a3){const _0x20ae45=_0x57036f;return Math['max'](0x0,Math[_0x20ae45(0x22c)](_0xfbc597,_0x5e34a3));}function se(_0x5b0eec){const _0x1730dd=_0x57036f;return _0x5b0eec[_0x1730dd(0x153)][_0x1730dd(0x254)](''+t[_0x1730dd(0x13b)][_0x1730dd(0x1fa)]+t['DataStreamTreeTokenType']['SECTION_BREAK'])?Math[_0x1730dd(0x24d)](0x0,_0x5b0eec[_0x1730dd(0x153)]['length']-0x2):_0x5b0eec['dataStream'][_0x1730dd(0x254)](t[_0x1730dd(0x13b)][_0x1730dd(0x231)])?Math[_0x1730dd(0x24d)](0x0,_0x5b0eec['dataStream'][_0x1730dd(0x1e9)]-0x1):_0x5b0eec['dataStream']['length'];}function ce(_0x59e646,_0x4b6749,_0x3e9f67,_0x5b823b){_0x3e9f67>_0x4b6749&&de(_0x59e646,_0x4b6749,_0x3e9f67),ue(_0x59e646,_0x4b6749,_0x5b823b);}function le(_0x49899b,_0x2e73ad,_0x353c3f){const _0x1512c9=_0x57036f;var _0x55696f,_0x39bd5c;let _0x4aaab0=T(_0x49899b),_0x24cf10=(_0x55696f=_0x4aaab0[_0x1512c9(0x128)])==null?void 0x0:_0x55696f[_0x1512c9(0x1ac)](_0x196762=>_0x196762[_0x1512c9(0x1ab)]===_0x2e73ad&&g(_0x196762));if(!_0x24cf10)return null;let _0x44c534=(0x0,t['getCustomRangeInterval'])(_0x24cf10);return ce(_0x4aaab0,_0x44c534['startOffset'],_0x44c534[_0x1512c9(0x166)],_0x353c3f),_0x4aaab0['customRanges']=(_0x39bd5c=_0x4aaab0['customRanges'])==null?void 0x0:_0x39bd5c[_0x1512c9(0x205)](_0x2fff54=>_0x2fff54[_0x1512c9(0x1ab)]!==_0x2e73ad),_0x44c534[_0x1512c9(0x13d)]+_0x353c3f['length'];}function ue(_0x4758ad,_0x108af6,_0x2b9727){const _0x32f0d6=_0x57036f;_0x2b9727&&(_0x4758ad[_0x32f0d6(0x153)]=''+_0x4758ad['dataStream']['slice'](0x0,_0x108af6)+_0x2b9727+_0x4758ad[_0x32f0d6(0x153)][_0x32f0d6(0x1cc)](_0x108af6),fe(_0x4758ad,_0x108af6,_0x2b9727[_0x32f0d6(0x1e9)]));}function de(_0x38e62f,_0x293c2c,_0x50e01a){const _0x524b61=_0x57036f;let _0x578f93=_0x50e01a-_0x293c2c;_0x38e62f[_0x524b61(0x153)]=''+_0x38e62f[_0x524b61(0x153)][_0x524b61(0x1cc)](0x0,_0x293c2c)+_0x38e62f[_0x524b61(0x153)][_0x524b61(0x1cc)](_0x50e01a),pe(_0x38e62f,_0x293c2c,_0x578f93);}function fe(_0x50a0fd,_0x4da0d7,_0xa07a2){const _0x33ca2b=_0x57036f;_0x50a0fd[_0x33ca2b(0x1be)]=b(_0x50a0fd[_0x33ca2b(0x1be)],_0x4da0d7,_0xa07a2),_0x50a0fd[_0x33ca2b(0x162)]=b(_0x50a0fd[_0x33ca2b(0x162)],_0x4da0d7,_0xa07a2),_0x50a0fd[_0x33ca2b(0x1d7)]=b(_0x50a0fd[_0x33ca2b(0x1d7)],_0x4da0d7,_0xa07a2),_0x50a0fd[_0x33ca2b(0x1ce)]=me(_0x50a0fd[_0x33ca2b(0x1ce)],_0x4da0d7,_0xa07a2),_0x50a0fd[_0x33ca2b(0x138)]=he(_0x50a0fd[_0x33ca2b(0x138)],_0x4da0d7,_0xa07a2),_0x50a0fd['columnGroups']=S(_0x50a0fd[_0x33ca2b(0x1af)],_0x4da0d7,_0xa07a2),_0x50a0fd['customRanges']=S(_0x50a0fd[_0x33ca2b(0x128)],_0x4da0d7,_0xa07a2),_0x50a0fd[_0x33ca2b(0x1a0)]=S(_0x50a0fd['customDecorations'],_0x4da0d7,_0xa07a2),_0x50a0fd[_0x33ca2b(0x1f0)]=S(_0x50a0fd[_0x33ca2b(0x1f0)],_0x4da0d7,_0xa07a2);}function pe(_0x353ea7,_0x1de379,_0x5a7eb4){const _0x45c2be=_0x57036f;var _0x22f075,_0x635ac6;_0x353ea7['paragraphs']=x(_0x353ea7[_0x45c2be(0x1be)],_0x1de379,_0x5a7eb4),_0x353ea7[_0x45c2be(0x162)]=x(_0x353ea7[_0x45c2be(0x162)],_0x1de379,_0x5a7eb4),_0x353ea7[_0x45c2be(0x1d7)]=x(_0x353ea7[_0x45c2be(0x1d7)],_0x1de379,_0x5a7eb4),_0x353ea7['textRuns']=(_0x22f075=w((_0x635ac6=_0x353ea7[_0x45c2be(0x1ce)])==null?void 0x0:_0x635ac6[_0x45c2be(0x235)](_0x5d7f25=>({..._0x5d7f25,'startIndex':_0x5d7f25['st'],'endIndex':_0x5d7f25['ed']})),_0x1de379,_0x5a7eb4))==null?void 0x0:_0x22f075[_0x45c2be(0x235)](_0x1fc7c8=>{let {startIndex:_0x529b86,endIndex:_0x488f4f,..._0x5021d7}=_0x1fc7c8;return{..._0x5021d7,'st':_0x529b86,'ed':_0x488f4f};}),_0x353ea7[_0x45c2be(0x138)]=w(_0x353ea7[_0x45c2be(0x138)],_0x1de379,_0x5a7eb4),_0x353ea7[_0x45c2be(0x1af)]=C(_0x353ea7[_0x45c2be(0x1af)],_0x1de379,_0x5a7eb4),_0x353ea7[_0x45c2be(0x128)]=C(_0x353ea7[_0x45c2be(0x128)],_0x1de379,_0x5a7eb4),_0x353ea7[_0x45c2be(0x1a0)]=C(_0x353ea7[_0x45c2be(0x1a0)],_0x1de379,_0x5a7eb4),_0x353ea7[_0x45c2be(0x1f0)]=C(_0x353ea7['blockRanges'],_0x1de379,_0x5a7eb4);}function b(_0x51b54f,_0x374355,_0x2d334d){const _0x2960b9=_0x57036f;return _0x51b54f==null?void 0x0:_0x51b54f[_0x2960b9(0x235)](_0x4d250b=>_0x4d250b[_0x2960b9(0x14a)]>=_0x374355?{..._0x4d250b,'startIndex':_0x4d250b[_0x2960b9(0x14a)]+_0x2d334d}:_0x4d250b);}function x(_0x321983,_0x5bb277,_0x255241){const _0x142753=_0x57036f;let _0x3f4a86=_0x5bb277+_0x255241;return _0x321983==null?void 0x0:_0x321983[_0x142753(0x235)](_0xe484e4=>_0xe484e4[_0x142753(0x14a)]>=_0x5bb277&&_0xe484e4[_0x142753(0x14a)]<_0x3f4a86?null:_0xe484e4['startIndex']>=_0x3f4a86?{..._0xe484e4,'startIndex':_0xe484e4['startIndex']-_0x255241}:_0xe484e4)['filter'](_0x2c3edb=>_0x2c3edb!=null);}function me(_0x5f260a,_0x5bf876,_0x4f581d){const _0x332f4a=_0x57036f;return _0x5f260a==null?void 0x0:_0x5f260a[_0x332f4a(0x235)](_0x1614ca=>_0x1614ca['st']>=_0x5bf876?{..._0x1614ca,'st':_0x1614ca['st']+_0x4f581d,'ed':_0x1614ca['ed']+_0x4f581d}:_0x1614ca['ed']>_0x5bf876?{..._0x1614ca,'ed':_0x1614ca['ed']+_0x4f581d}:_0x1614ca);}function S(_0x2ff8d8,_0x32a097,_0x3ca3c3){const _0x245bfb=_0x57036f;return _0x2ff8d8==null?void 0x0:_0x2ff8d8[_0x245bfb(0x235)](_0x5991d4=>(0x0,t[_0x245bfb(0x14b)])(_0x5991d4,_0x32a097,_0x3ca3c3));}function he(_0x3ec9be,_0x3c1938,_0x57fda0){const _0x4e71bc=_0x57036f;return _0x3ec9be==null?void 0x0:_0x3ec9be[_0x4e71bc(0x235)](_0x404e48=>(0x0,t[_0x4e71bc(0x215)])(_0x404e48,_0x3c1938,_0x57fda0));}function C(_0x2e1e72,_0x10921c,_0x569044){const _0x4caaa9=_0x57036f;return _0x2e1e72==null?void 0x0:_0x2e1e72[_0x4caaa9(0x235)](_0x55c876=>(0x0,t[_0x4caaa9(0x226)])(_0x55c876,_0x10921c,_0x569044))['filter'](_0x4eeae8=>_0x4eeae8!=null);}function w(_0x26e8fb,_0x2180c6,_0x2a021f){const _0x3763b7=_0x57036f;return _0x26e8fb==null?void 0x0:_0x26e8fb[_0x3763b7(0x235)](_0x2c6d6b=>(0x0,t[_0x3763b7(0x18c)])(_0x2c6d6b,_0x2180c6,_0x2a021f))[_0x3763b7(0x205)](_0x2da3a4=>_0x2da3a4!=null);}function T(_0x1e75fa){const _0x9d0866=_0x57036f;if(!_0x1e75fa[_0x9d0866(0x170)])throw Error(_0x9d0866(0x24b));return _0x1e75fa[_0x9d0866(0x170)];}function E(_0xa5edae){'@babel/helpers - typeof';const _0x37774a=_0x57036f;return E=typeof Symbol==_0x37774a(0x14c)&&typeof Symbol['iterator']==_0x37774a(0x15e)?function(_0x525b26){return typeof _0x525b26;}:function(_0x2e2623){const _0x58daeb=_0x37774a;return _0x2e2623&&typeof Symbol=='function'&&_0x2e2623[_0x58daeb(0x127)]===Symbol&&_0x2e2623!==Symbol['prototype']?_0x58daeb(0x15e):typeof _0x2e2623;},E(_0xa5edae);}function ge(_0x1b49fa,_0x28159b){const _0x213627=_0x57036f;if(E(_0x1b49fa)!=_0x213627(0x190)||!_0x1b49fa)return _0x1b49fa;var _0x3f6eba=_0x1b49fa[Symbol['toPrimitive']];if(_0x3f6eba!==void 0x0){var _0x48a12e=_0x3f6eba[_0x213627(0x232)](_0x1b49fa,_0x28159b||_0x213627(0x146));if(E(_0x48a12e)!=_0x213627(0x190))return _0x48a12e;throw TypeError(_0x213627(0x122));}return(_0x28159b==='string'?String:Number)(_0x1b49fa);}function _e(_0x1ab8d1){const _0x3c3002=_0x57036f;var _0x47d9a9=ge(_0x1ab8d1,_0x3c3002(0x1b3));return E(_0x47d9a9)=='symbol'?_0x47d9a9:_0x47d9a9+'';}function D(_0x5ad5a9,_0x258f6b,_0x202e56){return(_0x258f6b=_e(_0x258f6b))in _0x5ad5a9?Object['defineProperty'](_0x5ad5a9,_0x258f6b,{'value':_0x202e56,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x5ad5a9[_0x258f6b]=_0x202e56,_0x5ad5a9;}var O=class extends t[_0x57036f(0x201)]{constructor(..._0x2c2c01){const _0x5d8079=_0x57036f;super(..._0x2c2c01),D(this,_0x5d8079(0x155),new Map()),D(this,_0x5d8079(0x1a6),new Map()),D(this,_0x5d8079(0x211),new Map()),D(this,_0x5d8079(0x15b),new i[(_0x5d8079(0x168))]()),D(this,'change$',this[_0x5d8079(0x15b)][_0x5d8079(0x18a)]());}['getFormula'](_0x540e47,_0x5bebc1){const _0x372990=_0x57036f;var _0x475be9;let _0x437f5e=(_0x475be9=this[_0x372990(0x155)][_0x372990(0x249)](_0x540e47))==null?void 0x0:_0x475be9[_0x372990(0x1f8)][_0x5bebc1];return _0x437f5e?t[_0x372990(0x1a4)][_0x372990(0x1ff)](_0x437f5e):void 0x0;}[_0x57036f(0x181)](_0x3c3a99){const _0xe18170=_0x57036f;var _0x526763;return t[_0xe18170(0x1a4)][_0xe18170(0x1ff)](((_0x526763=this[_0xe18170(0x155)][_0xe18170(0x249)](_0x3c3a99))==null?void 0x0:_0x526763['formulas'])??{});}[_0x57036f(0x144)](_0x112162){const _0x523252=_0x57036f;let _0xf56fda=this['_resources']['get'](_0x112162);return _0xf56fda?t[_0x523252(0x1a4)][_0x523252(0x1ff)](_0xf56fda):void 0x0;}[_0x57036f(0x1f7)](_0x518f1d,_0x268a64,_0x295e65){const _0xd4a836=_0x57036f;return this[_0xd4a836(0x19d)](_0x518f1d,{[_0x268a64]:_0x295e65});}['setResource'](_0x3fe90f,_0x18076f){const _0x21f06a=_0x57036f;return this[_0x21f06a(0x211)][_0x21f06a(0x228)](_0x3fe90f)||!l(_0x18076f)?!0x1:(this[_0x21f06a(0x155)][_0x21f06a(0x23a)](_0x3fe90f,{'formulas':t[_0x21f06a(0x1a4)]['deepClone'](_0x18076f['formulas'])}),this[_0x21f06a(0x15b)]['next']({'unitId':_0x3fe90f}),!0x0);}[_0x57036f(0x19d)](_0x2f7f81,_0x126cb2){const _0x257199=_0x57036f;if(this[_0x257199(0x211)][_0x257199(0x228)](_0x2f7f81)||!Object[_0x257199(0x142)](_0x126cb2)[_0x257199(0x1e9)]||!l({'formulas':_0x126cb2}))return!0x1;let _0x462345=this[_0x257199(0x155)][_0x257199(0x249)](_0x2f7f81)??c(),_0xa7028c=t[_0x257199(0x1a4)]['deepClone'](_0x462345);return Object[_0x257199(0x250)](_0xa7028c[_0x257199(0x1f8)],t[_0x257199(0x1a4)][_0x257199(0x1ff)](_0x126cb2)),this[_0x257199(0x155)][_0x257199(0x23a)](_0x2f7f81,_0xa7028c),this[_0x257199(0x15b)]['next']({'unitId':_0x2f7f81,'rangeIds':Object[_0x257199(0x142)](_0x126cb2)}),!0x0;}[_0x57036f(0x1cd)](_0x13a8bc,_0x5abf5c){const _0x206efc=_0x57036f;if(this[_0x206efc(0x211)]['has'](_0x13a8bc))return!0x1;let _0x95e74e=this[_0x206efc(0x155)][_0x206efc(0x249)](_0x13a8bc);if(!(_0x95e74e!=null&&_0x95e74e[_0x206efc(0x1f8)][_0x5abf5c]))return!0x1;let _0x234122=t['Tools'][_0x206efc(0x1ff)](_0x95e74e);return delete _0x234122[_0x206efc(0x1f8)][_0x5abf5c],this[_0x206efc(0x155)]['set'](_0x13a8bc,_0x234122),this[_0x206efc(0x15b)][_0x206efc(0x13e)]({'unitId':_0x13a8bc,'rangeIds':[_0x5abf5c]}),!0x0;}[_0x57036f(0x1d5)](_0x26e8cd,_0x2de6eb){const _0x3da554=_0x57036f;return l(_0x2de6eb)?(this[_0x3da554(0x155)][_0x3da554(0x23a)](_0x26e8cd,{'formulas':t['Tools'][_0x3da554(0x1ff)](_0x2de6eb[_0x3da554(0x1f8)])}),this['_rawResources']['delete'](_0x26e8cd),this[_0x3da554(0x211)][_0x3da554(0x1f5)](_0x26e8cd),this[_0x3da554(0x15b)][_0x3da554(0x13e)]({'unitId':_0x26e8cd}),!0x0):(this['_preserveInvalid'](_0x26e8cd,_0x2de6eb,_0x3da554(0x133)),!0x1);}[_0x57036f(0x173)](_0x3e3820){const _0xf8b306=_0x57036f;let _0xd937d0=this[_0xf8b306(0x155)][_0xf8b306(0x249)](_0x3e3820);return _0xd937d0?t[_0xf8b306(0x1a4)][_0xf8b306(0x1ff)](_0xd937d0):this['_rawResources']['has'](_0x3e3820)?t[_0xf8b306(0x1a4)][_0xf8b306(0x1ff)](this[_0xf8b306(0x1a6)]['get'](_0x3e3820)):c();}[_0x57036f(0x1de)](_0x558248){const _0x57d5a6=_0x57036f;return this[_0x57d5a6(0x211)][_0x57d5a6(0x249)](_0x558248);}[_0x57036f(0x152)](_0x21e4f6){const _0x1a0e27=_0x57036f;this[_0x1a0e27(0x155)][_0x1a0e27(0x1f5)](_0x21e4f6),this[_0x1a0e27(0x1a6)][_0x1a0e27(0x1f5)](_0x21e4f6),this[_0x1a0e27(0x211)][_0x1a0e27(0x1f5)](_0x21e4f6),this[_0x1a0e27(0x15b)][_0x1a0e27(0x13e)]({'unitId':_0x21e4f6});}['dispose'](){const _0x327a64=_0x57036f;this[_0x327a64(0x155)][_0x327a64(0x134)](),this['_rawResources']['clear'](),this[_0x327a64(0x211)][_0x327a64(0x134)](),this[_0x327a64(0x15b)][_0x327a64(0x238)](),super[_0x327a64(0x1ca)]();}[_0x57036f(0x145)](_0x41b389,_0x569187,_0x19b8f8){const _0x3b6546=_0x57036f;this[_0x3b6546(0x155)]['delete'](_0x41b389),this[_0x3b6546(0x1a6)][_0x3b6546(0x23a)](_0x41b389,t[_0x3b6546(0x1a4)][_0x3b6546(0x1ff)](_0x569187)),this[_0x3b6546(0x211)][_0x3b6546(0x23a)](_0x41b389,_0x19b8f8),this[_0x3b6546(0x15b)][_0x3b6546(0x13e)]({'unitId':_0x41b389});}};let ve=function(_0x759e82){const _0x429321=_0x57036f;return _0x759e82[_0x429321(0x1c0)]=_0x429321(0x1eb),_0x759e82[_0x429321(0x115)]=_0x429321(0x24f),_0x759e82[_0x429321(0x20d)]='success',_0x759e82['ERROR']=_0x429321(0x172),_0x759e82;}({});function k(_0x4751df,_0x1405c7){return function(_0x24fa9f,_0x3e3294){_0x1405c7(_0x24fa9f,_0x3e3294,_0x4751df);};}function A(_0x3c9b42,_0xc966a0,_0x3f7cc0,_0xb8a2be){const _0x5ce6de=_0x57036f;var _0x1fb7fd=arguments[_0x5ce6de(0x1e9)],_0x4282b4=_0x1fb7fd<0x3?_0xc966a0:_0xb8a2be===null?_0xb8a2be=Object['getOwnPropertyDescriptor'](_0xc966a0,_0x3f7cc0):_0xb8a2be,_0x4ea11d;if(typeof Reflect==_0x5ce6de(0x190)&&typeof Reflect[_0x5ce6de(0x1b6)]==_0x5ce6de(0x14c))_0x4282b4=Reflect[_0x5ce6de(0x1b6)](_0x3c9b42,_0xc966a0,_0x3f7cc0,_0xb8a2be);else{for(var _0x50e500=_0x3c9b42[_0x5ce6de(0x1e9)]-0x1;_0x50e500>=0x0;_0x50e500--)(_0x4ea11d=_0x3c9b42[_0x50e500])&&(_0x4282b4=(_0x1fb7fd<0x3?_0x4ea11d(_0x4282b4):_0x1fb7fd>0x3?_0x4ea11d(_0xc966a0,_0x3f7cc0,_0x4282b4):_0x4ea11d(_0xc966a0,_0x3f7cc0))||_0x4282b4);}return _0x1fb7fd>0x3&&_0x4282b4&&Object[_0x5ce6de(0x165)](_0xc966a0,_0x3f7cc0,_0x4282b4),_0x4282b4;}let j=class extends t[_0x57036f(0x201)]{constructor(_0x112aca,_0x27e2f8,_0x1ac8c4){const _0x5bd68e=_0x57036f;super(),this[_0x5bd68e(0x17e)]=_0x112aca,this[_0x5bd68e(0x1f6)]=_0x27e2f8,this['_hostExternalReferenceModel']=_0x1ac8c4,D(this,'_registrations',new Map()),D(this,'_formulaKeys',new Map()),D(this,_0x5bd68e(0x222),new i['Subject']()),D(this,_0x5bd68e(0x118),this[_0x5bd68e(0x222)][_0x5bd68e(0x18a)]()),this['disposeWithMe'](this[_0x5bd68e(0x1f6)][_0x5bd68e(0x245)][_0x5bd68e(0x15c)](_0x1a751a=>{const _0x333721=_0x5bd68e;for(let _0x3e9c75 of Object[_0x333721(0x174)](_0x1a751a))for(let _0x5ac20b of Object['values'](_0x3e9c75))_0x5ac20b['forEach'](_0x2cefa1=>this[_0x333721(0x156)](_0x2cefa1));}));}[_0x57036f(0x14e)](_0x21461f){const _0x27068b=_0x57036f;var _0x4bfaf6;let _0xc4f55b=_0x21461f['getUnitId'](),_0xf1061b=((_0x4bfaf6=_0x21461f['getSnapshot']()[_0x27068b(0x170)])==null||(_0x4bfaf6=_0x4bfaf6[_0x27068b(0x128)])==null?void 0x0:_0x4bfaf6[_0x27068b(0x205)](g))??[],_0x2fdea=this[_0x27068b(0x17e)][_0x27068b(0x181)](_0xc4f55b),_0x41a968=new Set();for(let _0x1257ef of _0xf1061b){let _0x564b40=_0x2fdea[_0x1257ef[_0x27068b(0x1ab)]];_0x564b40&&(_0x41a968[_0x27068b(0x16f)](M(_0xc4f55b,_0x1257ef[_0x27068b(0x1ab)])),this[_0x27068b(0x1b8)]({'unitId':_0xc4f55b,'rangeId':_0x1257ef['rangeId']},_0x564b40));}for(let _0x1ad50b of Array[_0x27068b(0x1d9)](this[_0x27068b(0x195)][_0x27068b(0x174)]()))_0x1ad50b['unitId']===_0xc4f55b&&!_0x41a968['has'](M(_0x1ad50b[_0x27068b(0x18e)],_0x1ad50b[_0x27068b(0x1ab)]))&&this['unregister'](_0x1ad50b);}[_0x57036f(0x1b8)](_0x5d15ff,_0x36be16){const _0x398c27=_0x57036f;let _0x1a7f20=M(_0x5d15ff[_0x398c27(0x18e)],_0x5d15ff[_0x398c27(0x1ab)]),_0x46e28d=this[_0x398c27(0x195)][_0x398c27(0x249)](_0x1a7f20),_0x39af1b=this[_0x398c27(0x1e6)]['getRevision'](_0x5d15ff[_0x398c27(0x18e)]);if(_0x46e28d&&_0x46e28d[_0x398c27(0x1cf)][_0x398c27(0x126)]===_0x36be16[_0x398c27(0x126)]&&_0x46e28d[_0x398c27(0x1ed)]===_0x39af1b){_0x46e28d['config']=_0x36be16;let _0x29a91e=_0x46e28d['formulaId']?this['_registrationService']['getFormulaValueSync'](_0x46e28d[_0x398c27(0x18e)],_0x46e28d[_0x398c27(0x18e)],_0x46e28d[_0x398c27(0x17b)])??void 0x0:void 0x0;_0x46e28d[_0x398c27(0x19c)]=_0x29a91e,this[_0x398c27(0x186)](_0x1a7f20,N(_0x36be16,_0x29a91e));return;}_0x46e28d!=null&&_0x46e28d[_0x398c27(0x17b)]&&this['_deleteRegistration'](_0x46e28d);let _0x54097d={..._0x5d15ff,'config':_0x36be16,'referenceRevision':_0x39af1b,'presentation':N(_0x36be16,void 0x0)};if(this[_0x398c27(0x195)]['set'](_0x1a7f20,_0x54097d),!_0x36be16[_0x398c27(0x126)]['trim']())return;let _0x56a902=this[_0x398c27(0x1f6)][_0x398c27(0x1ee)](_0x5d15ff[_0x398c27(0x18e)],_0x5d15ff['unitId'],_0x36be16[_0x398c27(0x126)],void 0x0,{'rangeId':_0x5d15ff['rangeId']},r[_0x398c27(0x135)][_0x398c27(0x224)],_0x5d15ff[_0x398c27(0x1ab)]);_0x54097d['formulaId']=_0x56a902,this['_formulaKeys']['set'](_0x56a902,_0x1a7f20);}[_0x57036f(0x20e)](_0x50b045){const _0x216c83=_0x57036f;let _0x2b808e=M(_0x50b045[_0x216c83(0x18e)],_0x50b045[_0x216c83(0x1ab)]),_0x2d901e=this['_registrations']['get'](_0x2b808e);_0x2d901e&&(this[_0x216c83(0x121)](_0x2d901e),this[_0x216c83(0x195)][_0x216c83(0x1f5)](_0x2b808e));}['unregisterUnit'](_0x5d4fa0){const _0x26475f=_0x57036f;for(let _0x5927d4 of Array[_0x26475f(0x1d9)](this[_0x26475f(0x195)]['values']()))_0x5927d4[_0x26475f(0x18e)]===_0x5d4fa0&&this[_0x26475f(0x20e)](_0x5927d4);}[_0x57036f(0x11a)](_0x172833){const _0x277857=_0x57036f;var _0x384959;return(_0x384959=this[_0x277857(0x195)][_0x277857(0x249)](M(_0x172833[_0x277857(0x18e)],_0x172833[_0x277857(0x1ab)])))==null?void 0x0:_0x384959[_0x277857(0x1ef)];}[_0x57036f(0x236)](_0x1f1da8){const _0x11fb5d=_0x57036f;let _0x28b34f=this[_0x11fb5d(0x195)][_0x11fb5d(0x249)](M(_0x1f1da8[_0x11fb5d(0x18e)],_0x1f1da8['rangeId']));return _0x28b34f?P(_0x28b34f):void 0x0;}['getRegisteredFormulas'](){const _0x2325df=_0x57036f;return Array[_0x2325df(0x1d9)](this[_0x2325df(0x195)][_0x2325df(0x174)](),_0x311f88=>({'identity':{'unitId':_0x311f88['unitId'],'rangeId':_0x311f88[_0x2325df(0x1ab)]},'config':_0x311f88['config'],'referenceRevision':_0x311f88['referenceRevision'],..._0x311f88[_0x2325df(0x19c)]?{'liveResult':_0x311f88['liveResult']}:null}));}[_0x57036f(0x1ca)](){const _0x5b4056=_0x57036f;for(let _0x3753d3 of this[_0x5b4056(0x195)][_0x5b4056(0x174)]())this['_deleteRegistration'](_0x3753d3);this[_0x5b4056(0x195)][_0x5b4056(0x134)](),this['_formulaKeys'][_0x5b4056(0x134)](),this[_0x5b4056(0x222)][_0x5b4056(0x238)](),super[_0x5b4056(0x1ca)]();}['_updateFormulaResult'](_0x220ab8){const _0xc8ad2a=_0x57036f;let _0x45ec69=this[_0xc8ad2a(0x180)][_0xc8ad2a(0x249)](_0x220ab8[_0xc8ad2a(0x17b)]),_0x3ceeb0=_0x45ec69?this[_0xc8ad2a(0x195)]['get'](_0x45ec69):void 0x0;_0x45ec69&&_0x3ceeb0&&(_0x3ceeb0['liveResult']=_0x220ab8,this[_0xc8ad2a(0x186)](_0x45ec69,N(_0x3ceeb0[_0xc8ad2a(0x1cf)],_0x220ab8)));}[_0x57036f(0x186)](_0x140253,_0x131055){const _0xf2a2be=_0x57036f;var _0x3dac4e,_0x15189e;let _0x34c049=this[_0xf2a2be(0x195)]['get'](_0x140253);if(!_0x34c049||ye(_0x34c049['presentation'],_0x131055))return;let _0x2a9a63=_0x34c049[_0xf2a2be(0x1ef)],_0x2d8393=P(_0x34c049);_0x34c049[_0xf2a2be(0x1ef)]=_0x131055,this[_0xf2a2be(0x222)][_0xf2a2be(0x13e)]({'unitId':_0x34c049[_0xf2a2be(0x18e)],'rangeId':_0x34c049['rangeId'],'presentation':_0x131055,'previousPresentation':_0x2a9a63,'result':P(_0x34c049),'previousResult':{..._0x2d8393,..._0x2a9a63,'value':(_0x3dac4e=_0x2a9a63[_0xf2a2be(0x206)])==null?void 0x0:_0x3dac4e['v'],'valueType':((_0x15189e=_0x2a9a63[_0xf2a2be(0x206)])==null?void 0x0:_0x15189e['t'])??void 0x0}});}[_0x57036f(0x121)](_0x4cdce1){const _0x4a4c48=_0x57036f;_0x4cdce1[_0x4a4c48(0x17b)]&&(this['_registrationService'][_0x4a4c48(0x240)](_0x4cdce1[_0x4a4c48(0x18e)],_0x4cdce1['unitId'],[_0x4cdce1['formulaId']]),this['_formulaKeys']['delete'](_0x4cdce1['formulaId']));}};function _0x2b8a(_0x3c17b4,_0x2011be){_0x3c17b4=_0x3c17b4-0x114;const _0x28b605=_0x28b6();let _0x2b8ab7=_0x28b605[_0x3c17b4];return _0x2b8ab7;}j=A([k(0x0,(0x0,t[_0x57036f(0x136)])(O)),k(0x1,(0x0,t['Inject'])(r[_0x57036f(0x223)])),k(0x2,(0x0,t[_0x57036f(0x136)])(e['HostExternalReferenceModel']))],j);function M(_0x55b324,_0xf3d7d1){return _0x55b324+'\x00'+_0xf3d7d1;}function N(_0x15ab1f,_0x11fbcf){const _0x69e002=_0x57036f;return(0x0,e[_0x69e002(0x1b1)])({'numberFormat':_0x15ab1f[_0x69e002(0x1e5)],'lastValue':_0x15ab1f[_0x69e002(0x241)],'result':_0x11fbcf});}function P(_0x30ee74){const _0x10752f=_0x57036f;var _0x1144db,_0x2773e7,_0x486267;let _0x17fca4=_0x30ee74[_0x10752f(0x1ef)],_0x25b9fd=_0x30ee74[_0x10752f(0x1cf)][_0x10752f(0x126)]['trim']()?_0x17fca4[_0x10752f(0x1c4)]||_0x17fca4['cell']==null?_0x10752f(0x24f):((_0x1144db=_0x30ee74[_0x10752f(0x19c)])==null?void 0x0:_0x1144db[_0x10752f(0x14f)])===r['FormulaResultStatus'][_0x10752f(0x191)]?_0x10752f(0x172):_0x10752f(0x124):_0x10752f(0x1eb);return{..._0x17fca4,'status':_0x25b9fd,'value':(_0x2773e7=_0x17fca4[_0x10752f(0x206)])==null?void 0x0:_0x2773e7['v'],'valueType':((_0x486267=_0x17fca4['cell'])==null?void 0x0:_0x486267['t'])??void 0x0};}function ye(_0x4f5217,_0x542940){const _0x2233d8=_0x57036f;var _0x7fe80c,_0x256302,_0x22c2af,_0x429fe5;return _0x4f5217[_0x2233d8(0x183)]===_0x542940[_0x2233d8(0x183)]&&_0x4f5217[_0x2233d8(0x22d)]===_0x542940[_0x2233d8(0x22d)]&&_0x4f5217[_0x2233d8(0x1c8)]===_0x542940['pattern']&&_0x4f5217['source']===_0x542940[_0x2233d8(0x1a3)]&&_0x4f5217[_0x2233d8(0x1c4)]===_0x542940['stale']&&((_0x7fe80c=_0x4f5217['cell'])==null?void 0x0:_0x7fe80c['t'])===((_0x256302=_0x542940[_0x2233d8(0x206)])==null?void 0x0:_0x256302['t'])&&Object['is']((_0x22c2af=_0x4f5217[_0x2233d8(0x206)])==null?void 0x0:_0x22c2af['v'],(_0x429fe5=_0x542940[_0x2233d8(0x206)])==null?void 0x0:_0x429fe5['v']);}const F={'id':_0x57036f(0x160),'type':t[_0x57036f(0x225)][_0x57036f(0x22a)],'handler':(_0x4e9206,_0x5b9afe)=>!(_0x5b9afe!=null&&_0x5b9afe[_0x57036f(0x18e)])||!_0x5b9afe[_0x57036f(0x1ab)]||!_0x5b9afe[_0x57036f(0x1cf)]?!0x1:_0x4e9206[_0x57036f(0x249)](O)[_0x57036f(0x1f7)](_0x5b9afe['unitId'],_0x5b9afe['rangeId'],_0x5b9afe['config'])},I={'id':_0x57036f(0x202),'type':t[_0x57036f(0x225)]['MUTATION'],'handler':(_0x3e5fc6,_0x1fc0a5)=>!(_0x1fc0a5!=null&&_0x1fc0a5[_0x57036f(0x18e)])||!_0x1fc0a5['rangeId']?!0x1:_0x3e5fc6[_0x57036f(0x249)](O)[_0x57036f(0x1cd)](_0x1fc0a5[_0x57036f(0x18e)],_0x1fc0a5[_0x57036f(0x1ab)])},L={'id':_0x57036f(0x23f),'type':t[_0x57036f(0x225)][_0x57036f(0x22a)],'handler':(_0x1ed5e5,_0x545aae)=>!(_0x545aae!=null&&_0x545aae[_0x57036f(0x18e)])||!_0x545aae[_0x57036f(0x1c1)]?!0x1:_0x1ed5e5[_0x57036f(0x249)](O)[_0x57036f(0x1b7)](_0x545aae[_0x57036f(0x18e)],_0x545aae[_0x57036f(0x1c1)])},R={'id':_0x57036f(0x178),'type':t[_0x57036f(0x225)][_0x57036f(0x22a)],'handler':(_0x266ea6,_0xdd0f18)=>{const _0xdbc335=_0x57036f;if(!(_0xdd0f18!=null&&_0xdd0f18['unitId'])||!_0xdd0f18[_0xdbc335(0x246)]['length'])return!0x1;let _0x467bf0=_0x266ea6[_0xdbc335(0x249)](O),_0x416199=_0x266ea6[_0xdbc335(0x249)](e[_0xdbc335(0x1d8)]),_0x327702=_0x467bf0[_0xdbc335(0x144)](_0xdd0f18[_0xdbc335(0x18e)]);if(!_0x327702)return!0x1;let _0x56893f=t[_0xdbc335(0x1a4)][_0xdbc335(0x1ff)](_0x327702),_0x5c4beb=!0x1;for(let _0x533de5 of _0xdd0f18['updates']){var _0x5b49fe,_0x5df55e,_0x5a730c,_0x4344cb;let _0x59e4a2=_0x56893f['formulas'][_0x533de5['rangeId']];_0x59e4a2&&_0x59e4a2['formula']===_0x533de5[_0xdbc335(0x1f3)]&&((_0x5b49fe=_0x59e4a2[_0xdbc335(0x1e5)])==null?void 0x0:_0x5b49fe[_0xdbc335(0x1c8)])===_0x533de5[_0xdbc335(0x24c)]&&_0x416199['getRevision'](_0xdd0f18[_0xdbc335(0x18e)])===_0x533de5[_0xdbc335(0x255)]&&(((_0x5df55e=_0x59e4a2[_0xdbc335(0x241)])==null?void 0x0:_0x5df55e['v'])!==_0x533de5['lastValue']['v']||((_0x5a730c=_0x59e4a2[_0xdbc335(0x241)])==null?void 0x0:_0x5a730c['t'])!==_0x533de5['lastValue']['t']||((_0x4344cb=_0x59e4a2[_0xdbc335(0x241)])==null?void 0x0:_0x4344cb[_0xdbc335(0x1c8)])!==_0x533de5[_0xdbc335(0x241)][_0xdbc335(0x1c8)])&&(_0x59e4a2[_0xdbc335(0x241)]=t[_0xdbc335(0x1a4)][_0xdbc335(0x1ff)](_0x533de5[_0xdbc335(0x241)]),_0x5c4beb=!0x0);}return!_0x5c4beb||_0x467bf0[_0xdbc335(0x1b7)](_0xdd0f18[_0xdbc335(0x18e)],_0x56893f);}},z={'id':_0x57036f(0x1c5),'type':t[_0x57036f(0x225)][_0x57036f(0x19a)],'handler':(_0x5db4f7,_0x314213)=>{const _0x2a6d6d=_0x57036f;if(!(_0x314213!=null&&_0x314213[_0x2a6d6d(0x126)][_0x2a6d6d(0x1ae)]()))return!0x1;let _0x1b9730=K(_0x5db4f7,_0x314213[_0x2a6d6d(0x18e)],'');if(!_0x1b9730)return!0x1;let _0x47ca6a=xe(_0x314213[_0x2a6d6d(0x1bb)],_0x1b9730[_0x2a6d6d(0x170)],be(_0x5db4f7,_0x1b9730[_0x2a6d6d(0x18e)]));if(!_0x47ca6a)return!0x1;let _0x21e0f2=Se(_0x5db4f7,_0x1b9730[_0x2a6d6d(0x18e)],_0x314213[_0x2a6d6d(0x126)],_0x314213[_0x2a6d6d(0x196)]??[]);if(!_0x21e0f2)return!0x1;let _0x236c0e=Ce(_0x1b9730[_0x2a6d6d(0x170)],_0x1b9730[_0x2a6d6d(0x233)],_0x1b9730[_0x2a6d6d(0x18e)]),_0x1ed2e1=we({'documentData':_0x1b9730[_0x2a6d6d(0x17d)],'resource':_0x1b9730['resource'],'rangeId':_0x236c0e,'config':{'formula':_0x314213['formula'],..._0x314213[_0x2a6d6d(0x1e5)]?{'numberFormat':_0x314213['numberFormat']}:null},'startOffset':_0x47ca6a['startOffset'],'endOffset':_0x47ca6a[_0x2a6d6d(0x166)]});if(!_0x1ed2e1)return!0x1;let _0x4ceb4a=(0x0,e['buildUpsertHostExternalReferenceMutations'])(_0x5db4f7,_0x1b9730[_0x2a6d6d(0x18e)],_0x21e0f2);return!_0x4ceb4a||!q({'accessor':_0x5db4f7,'document':_0x1b9730[_0x2a6d6d(0x1bf)],'unitId':_0x1b9730[_0x2a6d6d(0x18e)],'trigger':z['id'],'rangeId':_0x236c0e,'previousResource':_0x1b9730[_0x2a6d6d(0x1c1)],'nextResource':_0x1ed2e1[_0x2a6d6d(0x209)],'previousDocumentData':_0x1b9730[_0x2a6d6d(0x17d)],'nextDocumentData':_0x1ed2e1[_0x2a6d6d(0x1c6)],'cursorOffset':_0x1ed2e1[_0x2a6d6d(0x1c9)],'externalMutations':_0x4ceb4a})?!0x1:{'rangeId':_0x236c0e,'startOffset':_0x1ed2e1['cursorOffset']-0x1,'endOffset':_0x1ed2e1[_0x2a6d6d(0x1c9)]};}},B={'id':_0x57036f(0x18b),'type':t[_0x57036f(0x225)]['COMMAND'],'handler':(_0x2a465f,_0xa06e8d)=>{const _0x347957=_0x57036f;if(!(_0xa06e8d!=null&&_0xa06e8d[_0x347957(0x1ab)])||!_0xa06e8d['formula']['trim']())return!0x1;let _0x2226a8=K(_0x2a465f,_0xa06e8d[_0x347957(0x18e)],''),_0x279dfc=_0x2226a8==null?void 0x0:_0x2226a8['model'][_0x347957(0x130)](_0x2226a8[_0x347957(0x18e)],_0xa06e8d[_0x347957(0x1ab)]),_0x1177e5=_0x2226a8?_(_0x2226a8[_0x347957(0x17d)]['body'],_0xa06e8d[_0x347957(0x1ab)]):void 0x0;if(!_0x2226a8||!_0x279dfc||!_0x1177e5)return!0x1;let _0x30e5ff=Se(_0x2a465f,_0x2226a8[_0x347957(0x18e)],_0xa06e8d[_0x347957(0x126)],_0xa06e8d['externalReferences']??[]);if(!_0x30e5ff)return!0x1;let _0x5d448b=(0x0,e[_0x347957(0x220)])(_0x2a465f,_0x2226a8[_0x347957(0x18e)],_0x30e5ff);if(!_0x5d448b)return!0x1;let _0x93f6cb=je(_0x2226a8[_0x347957(0x1c1)]);return _0x93f6cb[_0x347957(0x1f8)][_0xa06e8d[_0x347957(0x1ab)]]={'formula':_0xa06e8d['formula'],..._0xa06e8d[_0x347957(0x1e5)]?{'numberFormat':_0xa06e8d[_0x347957(0x1e5)]}:_0x279dfc[_0x347957(0x1e5)]?{'numberFormat':_0x279dfc[_0x347957(0x1e5)]}:null},q({'accessor':_0x2a465f,'document':_0x2226a8[_0x347957(0x1bf)],'unitId':_0x2226a8[_0x347957(0x18e)],'trigger':B['id'],'rangeId':_0xa06e8d[_0x347957(0x1ab)],'previousResource':_0x2226a8[_0x347957(0x1c1)],'nextResource':_0x93f6cb,'cursorOffset':_0x1177e5[_0x347957(0x189)]+0x1,'externalMutations':_0x5d448b});}},V={'id':_0x57036f(0x1c7),'type':t[_0x57036f(0x225)][_0x57036f(0x19a)],'handler':(_0x1ec844,_0x1ed215)=>{const _0x286d7b=_0x57036f;if(!(_0x1ed215!=null&&_0x1ed215[_0x286d7b(0x1ab)]))return!0x1;let _0x440544=K(_0x1ec844,_0x1ed215['unitId'],''),_0x8cf1bc=_0x440544==null?void 0x0:_0x440544[_0x286d7b(0x233)][_0x286d7b(0x130)](_0x440544[_0x286d7b(0x18e)],_0x1ed215[_0x286d7b(0x1ab)]),_0x28aa89=_0x440544?_(_0x440544['documentData'][_0x286d7b(0x170)],_0x1ed215['rangeId']):void 0x0;if(!_0x440544||!_0x8cf1bc||!_0x28aa89)return!0x1;let _0x5088cd=je(_0x440544[_0x286d7b(0x1c1)]);return _0x5088cd[_0x286d7b(0x1f8)][_0x1ed215['rangeId']]={..._0x8cf1bc,..._0x1ed215[_0x286d7b(0x1e5)]?{'numberFormat':_0x1ed215[_0x286d7b(0x1e5)]}:null},_0x1ed215[_0x286d7b(0x1e5)]||delete _0x5088cd['formulas'][_0x1ed215[_0x286d7b(0x1ab)]][_0x286d7b(0x1e5)],q({'accessor':_0x1ec844,'document':_0x440544[_0x286d7b(0x1bf)],'unitId':_0x440544[_0x286d7b(0x18e)],'trigger':V['id'],'rangeId':_0x1ed215[_0x286d7b(0x1ab)],'previousResource':_0x440544[_0x286d7b(0x1c1)],'nextResource':_0x5088cd,'cursorOffset':_0x28aa89[_0x286d7b(0x189)]+0x1,'externalMutations':{}});}},H={'id':_0x57036f(0x132),'type':t[_0x57036f(0x225)][_0x57036f(0x19a)],'handler':(_0x62c754,_0x515bd6)=>G(_0x62c754,_0x515bd6,'',H['id'])},U={'id':_0x57036f(0x229),'type':t[_0x57036f(0x225)]['COMMAND'],'handler':(_0x597685,_0x4eca79)=>G(_0x597685,_0x4eca79,(_0x4eca79==null?void 0x0:_0x4eca79[_0x57036f(0x183)])??'',U['id'])},W={'id':_0x57036f(0x1aa),'type':t[_0x57036f(0x225)][_0x57036f(0x19a)],'handler':(_0x1d07a3,_0x3f0237)=>{const _0x550c2f=_0x57036f;if(!(_0x3f0237!=null&&_0x3f0237[_0x550c2f(0x1ab)]))return!0x1;let _0x4018f7=K(_0x1d07a3,_0x3f0237[_0x550c2f(0x18e)],'');if(!_0x4018f7)return!0x1;let _0x2c7868=_0x1d07a3[_0x550c2f(0x249)](j)[_0x550c2f(0x236)]({'unitId':_0x4018f7[_0x550c2f(0x18e)],'rangeId':_0x3f0237[_0x550c2f(0x1ab)]});return _0x2c7868?G(_0x1d07a3,_0x3f0237,_0x2c7868[_0x550c2f(0x183)],W['id']):!0x1;}};function G(_0x1324bc,_0x1e2def,_0x4c1af5,_0x33b0dc){const _0x531a32=_0x57036f;if(!(_0x1e2def!=null&&_0x1e2def[_0x531a32(0x1ab)]))return!0x1;let _0x1704ce=K(_0x1324bc,_0x1e2def['unitId'],'');if(!_0x1704ce)return!0x1;let _0x182477=h({'documentData':_0x1704ce[_0x531a32(0x17d)],'resource':_0x1704ce[_0x531a32(0x1c1)],'rangeId':_0x1e2def[_0x531a32(0x1ab)],'text':_0x4c1af5});return _0x182477?q({'accessor':_0x1324bc,'document':_0x1704ce[_0x531a32(0x1bf)],'unitId':_0x1704ce[_0x531a32(0x18e)],'trigger':_0x33b0dc,'rangeId':_0x1e2def[_0x531a32(0x1ab)],'previousResource':_0x1704ce[_0x531a32(0x1c1)],'nextResource':_0x182477[_0x531a32(0x209)],'previousDocumentData':_0x1704ce[_0x531a32(0x17d)],'nextDocumentData':_0x182477[_0x531a32(0x1c6)],'cursorOffset':_0x182477[_0x531a32(0x1c9)],'externalMutations':{}}):!0x1;}function K(_0x57c4e1,_0x334b17,_0x2e0da5){const _0x5202d6=_0x57036f;if(_0x2e0da5)return null;let _0x2a8500=_0x57c4e1[_0x5202d6(0x249)](t[_0x5202d6(0x214)]),_0x105854=(_0x334b17?_0x2a8500['getUnit'](_0x334b17,t[_0x5202d6(0x16b)][_0x5202d6(0x1bc)]):_0x2a8500[_0x5202d6(0x163)](t[_0x5202d6(0x16b)][_0x5202d6(0x1bc)]))??null;if(!_0x105854)return null;let _0x54c260=_0x105854[_0x5202d6(0x171)](),_0x1ac85c=_0x54c260[_0x5202d6(0x170)];if(_0x54c260[_0x5202d6(0x1bd)]||!_0x1ac85c)return null;let _0x535d5e=_0x57c4e1[_0x5202d6(0x249)](O);return _0x535d5e[_0x5202d6(0x1de)](_0x105854['getUnitId']())?null:{'document':_0x105854,'body':_0x1ac85c,'documentData':_0x54c260,'model':_0x535d5e,'resource':_0x535d5e[_0x5202d6(0x144)](_0x105854[_0x5202d6(0x22e)]())??c(),'unitId':_0x105854[_0x5202d6(0x22e)]()};}function be(_0x36e6c9,_0x408ba5){const _0x58baf4=_0x57036f;var _0x5bf9f0;return(_0x5bf9f0=_0x36e6c9[_0x58baf4(0x249)](n[_0x58baf4(0x1b5)])['getTextRanges']({'subUnitId':_0x408ba5,'unitId':_0x408ba5}))==null?void 0x0:_0x5bf9f0[0x0];}function xe(_0x58a5d7,_0x1c39cd,_0x29e614){const _0x14495f=_0x57036f;if((_0x58a5d7==null?void 0x0:_0x58a5d7['type'])==='paragraph'){var _0x2bffdf;let _0x5b67e7=((_0x2bffdf=_0x1c39cd['paragraphs'])==null?void 0x0:_0x2bffdf['filter'](_0x54f143=>_0x54f143[_0x14495f(0x192)]===_0x58a5d7[_0x14495f(0x192)]))??[];if(_0x5b67e7[_0x14495f(0x1e9)]!==0x1)return null;let _0x4799df=_0x5b67e7[0x0],_0x4d245a=(0x0,t['getParagraphContentStartOffset'])(_0x1c39cd,_0x4799df),_0x17bebf=_0x4799df[_0x14495f(0x14a)]-_0x4d245a,_0x5eab05=_0x58a5d7['position']===_0x14495f(0x1a8)?_0x17bebf:_0x58a5d7[_0x14495f(0x247)];if(!Number[_0x14495f(0x237)](_0x5eab05)||_0x5eab05<0x0||_0x5eab05>_0x17bebf)return null;let _0x5f2ef8=_0x4d245a+_0x5eab05;return{'startOffset':_0x5f2ef8,'endOffset':_0x5f2ef8};}if((_0x58a5d7==null?void 0x0:_0x58a5d7[_0x14495f(0x248)])===_0x14495f(0x1b2))return!Number[_0x14495f(0x237)](_0x58a5d7[_0x14495f(0x13d)])||!Number[_0x14495f(0x237)](_0x58a5d7[_0x14495f(0x166)])?null:{'startOffset':Math[_0x14495f(0x22c)](_0x58a5d7[_0x14495f(0x13d)],_0x58a5d7[_0x14495f(0x166)]),'endOffset':Math['max'](_0x58a5d7[_0x14495f(0x13d)],_0x58a5d7[_0x14495f(0x166)])};let _0x22d938=(_0x58a5d7==null?void 0x0:_0x58a5d7[_0x14495f(0x248)])===_0x14495f(0x1ad)?_0x58a5d7[_0x14495f(0x1ad)]:_0x29e614;return!_0x22d938||_0x22d938[_0x14495f(0x24e)]?null:{'startOffset':Math['min'](_0x22d938[_0x14495f(0x13d)],_0x22d938[_0x14495f(0x166)]),'endOffset':Math[_0x14495f(0x24d)](_0x22d938['startOffset'],_0x22d938[_0x14495f(0x166)])};}function Se(_0x35231b,_0x5c8cbb,_0x21d73b,_0x3bd143){const _0x46a225=_0x57036f;let _0x19a53f=_0x35231b[_0x46a225(0x249)](r[_0x46a225(0x114)]),_0x57c024=_0x21d73b[_0x46a225(0x1e8)]('=')?_0x21d73b[_0x46a225(0x1cc)](0x1):_0x21d73b,_0x2afda0=_0x19a53f['sequenceNodesBuilder'](_0x57c024);if(!_0x2afda0)return null;let _0x4e383a=_0x35231b[_0x46a225(0x249)](e[_0x46a225(0x1d8)]),_0x3069f9=(0x0,e[_0x46a225(0x15f)])({'qualifiers':(0x0,e[_0x46a225(0x140)])(_0x2afda0),'explicitReferences':_0x3bd143??[],'resolveBinding':_0x2e9c63=>_0x4e383a[_0x46a225(0x21b)](_0x5c8cbb,_0x2e9c63)});return _0x3069f9[_0x46a225(0x14f)]===_0x46a225(0x218)?_0x3069f9[_0x46a225(0x1fe)]:null;}function Ce(_0x33004e,_0x1a6185,_0x36b2f0){const _0x16c8b4=_0x57036f;var _0x5eaa81;let _0x154d3f=(0x0,t['generateRandomId'])(0x6);for(;_0x33004e!=null&&(_0x5eaa81=_0x33004e['customRanges'])!=null&&_0x5eaa81['some'](_0x4c3e5c=>_0x4c3e5c[_0x16c8b4(0x1ab)]===_0x154d3f)||_0x1a6185[_0x16c8b4(0x130)](_0x36b2f0,_0x154d3f);)_0x154d3f=(0x0,t['generateRandomId'])(0x6);return _0x154d3f;}function we(_0x41af35){try{return te(_0x41af35);}catch(_0xf2da2b){if(_0xf2da2b instanceof m)return null;throw _0xf2da2b;}}function Te(_0x5dc78b){const _0x365405=_0x57036f;let _0x16eae1=_0x5dc78b[_0x365405(0x131)]&&_0x5dc78b['nextDocumentData']?De(_0x5dc78b['document'],_0x5dc78b['unitId'],_0x5dc78b[_0x365405(0x131)],_0x5dc78b[_0x365405(0x1c6)],_0x5dc78b['cursorOffset'],_0x5dc78b['trigger']):null;return _0x5dc78b[_0x365405(0x131)]&&_0x5dc78b[_0x365405(0x1c6)]&&!_0x16eae1?null:{'documentRedo':_0x16eae1,'resourceRedo':{'id':L['id'],'params':{'unitId':_0x5dc78b[_0x365405(0x18e)],'resource':_0x5dc78b[_0x365405(0x209)]}},'resourceUndo':{'id':L['id'],'params':{'unitId':_0x5dc78b[_0x365405(0x18e)],'resource':_0x5dc78b[_0x365405(0x251)]}}};}function Ee(_0x143b9d,_0x16428d,_0x3aa2ac,_0x136a44){const _0x11b4b7=_0x57036f;_0x136a44['pushUndoRedo']({'id':_0x143b9d[_0x11b4b7(0x1d3)]+':'+_0x143b9d[_0x11b4b7(0x1ab)],'unitID':_0x143b9d['unitId'],'redoMutations':[..._0x143b9d['externalMutations'][_0x11b4b7(0x150)]?[_0x143b9d[_0x11b4b7(0x1f1)][_0x11b4b7(0x150)]]:[],..._0x16428d[_0x11b4b7(0x137)]?[_0x16428d[_0x11b4b7(0x137)]]:[],_0x16428d[_0x11b4b7(0x176)]],'undoMutations':[_0x16428d[_0x11b4b7(0x227)],..._0x3aa2ac?[_0x3aa2ac]:[],..._0x143b9d['externalMutations'][_0x11b4b7(0x1d2)]?[_0x143b9d[_0x11b4b7(0x1f1)][_0x11b4b7(0x1d2)]]:[]]});}function q(_0x34800a){const _0x1e8474=_0x57036f;let _0x1b4e95=_0x34800a['accessor']['get'](t[_0x1e8474(0x15a)]),_0x5a39c8=_0x34800a[_0x1e8474(0x116)][_0x1e8474(0x249)](t['IUndoRedoService']),_0x400e81=_0x34800a[_0x1e8474(0x116)][_0x1e8474(0x249)](n[_0x1e8474(0x1b5)]),_0x1c7e38=Te(_0x34800a);if(!_0x1c7e38)return!0x1;let _0x43f578=!0x1,_0x4ad47d=null,_0x4eab39=!0x1;try{if(_0x34800a[_0x1e8474(0x1f1)]['redoMutation']){if(!_0x1b4e95[_0x1e8474(0x188)](_0x34800a['externalMutations']['redoMutation']['id'],_0x34800a[_0x1e8474(0x1f1)][_0x1e8474(0x150)][_0x1e8474(0x1d0)]))return!0x1;_0x43f578=!0x0;}if(_0x1c7e38[_0x1e8474(0x137)]){let _0x5bf8f6=_0x1b4e95['syncExecuteCommand'](_0x1c7e38[_0x1e8474(0x137)]['id'],_0x1c7e38[_0x1e8474(0x137)]['params']);if(!_0x5bf8f6)return J(_0x1b4e95,_0x34800a[_0x1e8474(0x1f1)],_0x43f578),!0x1;_0x4ad47d={'id':n['RichTextEditingMutation']['id'],'params':{..._0x5bf8f6,'noHistory':!0x0,'noNeedSetTextRange':!0x0,'segmentId':''}};}if(!_0x1b4e95[_0x1e8474(0x188)](_0x1c7e38[_0x1e8474(0x176)]['id'],_0x1c7e38[_0x1e8474(0x176)][_0x1e8474(0x1d0)]))return Oe(_0x1b4e95,_0x4ad47d),J(_0x1b4e95,_0x34800a['externalMutations'],_0x43f578),!0x1;_0x4eab39=!0x0,Ee(_0x34800a,_0x1c7e38,_0x4ad47d,_0x5a39c8);}catch(_0x554836){throw _0x4eab39&&_0x1b4e95['syncExecuteCommand'](_0x1c7e38['resourceUndo']['id'],_0x1c7e38[_0x1e8474(0x227)][_0x1e8474(0x1d0)]),Oe(_0x1b4e95,_0x4ad47d),J(_0x1b4e95,_0x34800a[_0x1e8474(0x1f1)],_0x43f578),_0x554836;}return _0x400e81['replaceDocRanges']([{'startOffset':_0x34800a['cursorOffset'],'endOffset':_0x34800a[_0x1e8474(0x1c9)],'segmentId':''}],{'unitId':_0x34800a[_0x1e8474(0x18e)],'subUnitId':_0x34800a['unitId']},!0x1,{[n['DOC_SELECTION_OPTION_PRESERVE_CARET']]:!0x0}),!0x0;}function De(_0x5a4b42,_0x1ca09c,_0x29a878,_0x44c7d5,_0xe8738e,_0x3d4cfc){let _0x3978c8=ke(_0x29a878,_0x44c7d5,(0x0,t['getRichTextEditPath'])(_0x5a4b42,''));return _0x3978c8?{'id':n['RichTextEditingMutation']['id'],'params':{'unitId':_0x1ca09c,'actions':_0x3978c8,'segmentId':'','textRanges':[{'startOffset':_0xe8738e,'endOffset':_0xe8738e,'collapsed':!0x0,'segmentId':''}],'isEditing':!0x1,'noHistory':!0x0,'noNeedSetTextRange':!0x0,'trigger':_0x3d4cfc}}:null;}function Oe(_0x7e325a,_0x46dff2){const _0x9cc519=_0x57036f;_0x46dff2&&_0x7e325a[_0x9cc519(0x188)](_0x46dff2['id'],_0x46dff2['params']);}function J(_0x26571e,_0xd840be,_0x430e1e){const _0x3d071e=_0x57036f;_0x430e1e&&_0xd840be['undoMutation']&&_0x26571e[_0x3d071e(0x188)](_0xd840be[_0x3d071e(0x1d2)]['id'],_0xd840be[_0x3d071e(0x1d2)][_0x3d071e(0x1d0)]);}function ke(_0x4da3d6,_0x2c59eb,_0x1ba4a3){const _0xe27ffd=_0x57036f;let _0x86b9eb=_0x4da3d6['body'],_0x29af13=_0x2c59eb[_0xe27ffd(0x170)],_0x8ef916=Ae(_0x86b9eb==null?void 0x0:_0x86b9eb['dataStream'],_0x29af13==null?void 0x0:_0x29af13[_0xe27ffd(0x153)]);if(!_0x8ef916||!_0x29af13)return null;let _0x508708=new t[(_0xe27ffd(0x16e))]();return _0x508708[_0xe27ffd(0x244)](_0x8ef916[_0xe27ffd(0x175)]),_0x8ef916[_0xe27ffd(0x151)]>0x0&&_0x508708[_0xe27ffd(0x117)](_0x8ef916[_0xe27ffd(0x151)],(0x0,t[_0xe27ffd(0x21c)])(_0x29af13,_0x8ef916[_0xe27ffd(0x175)],_0x8ef916[_0xe27ffd(0x175)]+_0x8ef916[_0xe27ffd(0x151)],!0x1)),_0x8ef916[_0xe27ffd(0x19f)]>0x0&&_0x508708[_0xe27ffd(0x1f5)](_0x8ef916[_0xe27ffd(0x19f)]),t[_0xe27ffd(0x1fd)][_0xe27ffd(0x221)]()['editOp'](_0x508708[_0xe27ffd(0x173)](),_0x1ba4a3);}function Ae(_0x4c08e9,_0x43c1af){const _0x5ee3e6=_0x57036f;if(_0x4c08e9==null||_0x43c1af==null||_0x4c08e9===_0x43c1af)return null;let _0x4d3d00=0x0;for(;_0x4d3d00<_0x4c08e9[_0x5ee3e6(0x1e9)]&&_0x4d3d00<_0x43c1af['length']&&_0x4c08e9[_0x4d3d00]===_0x43c1af[_0x4d3d00];)_0x4d3d00+=0x1;let _0x17be3c=_0x4c08e9[_0x5ee3e6(0x1e9)],_0xdd18bb=_0x43c1af[_0x5ee3e6(0x1e9)];for(;_0x17be3c>_0x4d3d00&&_0xdd18bb>_0x4d3d00&&_0x4c08e9[_0x17be3c-0x1]===_0x43c1af[_0xdd18bb-0x1];)--_0x17be3c,--_0xdd18bb;return{'start':_0x4d3d00,'deleteLength':_0x17be3c-_0x4d3d00,'insertLength':_0xdd18bb-_0x4d3d00};}function je(_0x72d382){const _0x2f16ec=_0x57036f;return{'formulas':Object[_0x2f16ec(0x21a)](Object[_0x2f16ec(0x217)](_0x72d382[_0x2f16ec(0x1f8)])[_0x2f16ec(0x235)](([_0x2aacdb,_0x4d1bb1])=>[_0x2aacdb,{..._0x4d1bb1,..._0x4d1bb1['numberFormat']?{'numberFormat':{..._0x4d1bb1[_0x2f16ec(0x1e5)]}}:null,..._0x4d1bb1[_0x2f16ec(0x241)]?{'lastValue':{..._0x4d1bb1['lastValue']}}:null}]))};}let Y=class extends t['Disposable']{constructor(_0x15510b,_0x3deafa,_0x2bd4f5,_0x5007c3){const _0x16257b=_0x57036f;super(),this['_instanceService']=_0x15510b,this[_0x16257b(0x1d1)]=_0x3deafa,this[_0x16257b(0x17e)]=_0x2bd4f5,this[_0x16257b(0x15d)]=_0x5007c3,D(this,_0x16257b(0x14d),new Set()),D(this,_0x16257b(0x17f),!0x1),D(this,_0x16257b(0x1a7),!0x1),this[_0x16257b(0x17a)][_0x16257b(0x169)](t[_0x16257b(0x16b)][_0x16257b(0x1bc)])[_0x16257b(0x21f)](_0x2e2ed2=>this[_0x16257b(0x15d)][_0x16257b(0x14e)](_0x2e2ed2)),this[_0x16257b(0x157)](this['_model'][_0x16257b(0x1ba)][_0x16257b(0x15c)](({unitId:_0x4a0811})=>this[_0x16257b(0x123)](_0x4a0811))),this[_0x16257b(0x157)](this['_instanceService']['unitAdded$'][_0x16257b(0x15c)](({unit:_0x507160})=>{const _0x58ce50=_0x16257b;_0x507160['type']===t[_0x58ce50(0x16b)][_0x58ce50(0x1bc)]&&this[_0x58ce50(0x19b)](_0x507160[_0x58ce50(0x22e)]());})),this[_0x16257b(0x157)](this[_0x16257b(0x17a)][_0x16257b(0x1dd)][_0x16257b(0x15c)](_0x5ecf6f=>{const _0x3df91d=_0x16257b;this[_0x3df91d(0x15d)][_0x3df91d(0x18d)](_0x5ecf6f[_0x3df91d(0x22e)]());})),this[_0x16257b(0x157)](this['_commandService'][_0x16257b(0x1ea)](_0x3c6cdc=>{const _0x218763=_0x16257b;if(_0x3c6cdc['id']===n[_0x218763(0x23e)]['id']&&Me(_0x3c6cdc[_0x218763(0x1d0)])){let _0x39f8f7=_0x3c6cdc[_0x218763(0x1d0)];_0x39f8f7['segmentId']||this['_syncUnit'](_0x39f8f7[_0x218763(0x18e)]);}}));}[_0x57036f(0x1ca)](){const _0x1785a1=_0x57036f;this[_0x1785a1(0x1a7)]=!0x0,super[_0x1785a1(0x1ca)]();}[_0x57036f(0x19b)](_0x573440){const _0x5e394f=_0x57036f;this[_0x5e394f(0x14d)][_0x5e394f(0x16f)](_0x573440),this[_0x5e394f(0x17f)]||(this[_0x5e394f(0x17f)]=!0x0,queueMicrotask(()=>{const _0x2c1204=_0x5e394f;if(this['_syncScheduled']=!0x1,this[_0x2c1204(0x1a7)])return;let _0x5bbc86=Array['from'](this['_pendingUnitIds']);this[_0x2c1204(0x14d)][_0x2c1204(0x134)](),_0x5bbc86[_0x2c1204(0x21f)](_0x50ad15=>this[_0x2c1204(0x123)](_0x50ad15));}));}[_0x57036f(0x123)](_0x4a8bf8){const _0x33e0bd=_0x57036f;let _0x27438c=this[_0x33e0bd(0x17a)]['getUnit'](_0x4a8bf8,t[_0x33e0bd(0x16b)]['UNIVER_DOC']);_0x27438c&&this[_0x33e0bd(0x15d)][_0x33e0bd(0x14e)](_0x27438c);}};Y=A([k(0x0,t['IUniverInstanceService']),k(0x1,t[_0x57036f(0x15a)]),k(0x2,(0x0,t['Inject'])(O)),k(0x3,(0x0,t[_0x57036f(0x136)])(j))],Y);function Me(_0x40348b){const _0x3014f7=_0x57036f;return typeof _0x40348b==_0x3014f7(0x190)&&!!_0x40348b&&_0x3014f7(0x18e)in _0x40348b&&typeof _0x40348b['unitId']==_0x3014f7(0x1b3)&&(!(_0x3014f7(0x24e)in _0x40348b)||_0x40348b['segmentId']===void 0x0||typeof _0x40348b[_0x3014f7(0x24e)]==_0x3014f7(0x1b3));}let X=class extends t[_0x57036f(0x201)]{constructor(_0x43844c,_0x1fd9ec){const _0x3b3b1e=_0x57036f;super(),this[_0x3b3b1e(0x16c)]=_0x43844c,this[_0x3b3b1e(0x1b0)]=_0x1fd9ec,this[_0x3b3b1e(0x157)](this[_0x3b3b1e(0x16c)][_0x3b3b1e(0x11f)]({'pluginName':o,'businesses':[t[_0x3b3b1e(0x16b)][_0x3b3b1e(0x1bc)]],'toJson':_0x2dbfcf=>JSON[_0x3b3b1e(0x147)](this[_0x3b3b1e(0x1b0)][_0x3b3b1e(0x173)](_0x2dbfcf)),'parseJson':_0x559406=>JSON['parse'](_0x559406),'onLoad':(_0x5470f6,_0xc836b7)=>{const _0x50b117=_0x3b3b1e;this[_0x50b117(0x1b0)][_0x50b117(0x1d5)](_0x5470f6,_0xc836b7);},'onUnLoad':_0x1c2dd4=>this['_docFormulaModel'][_0x3b3b1e(0x152)](_0x1c2dd4)}));}};X=A([k(0x0,t[_0x57036f(0x194)]),k(0x1,(0x0,t[_0x57036f(0x136)])(O))],X);var Ne=_0x57036f(0x1b9),Pe=_0x57036f(0x1f4);const Fe={};let Z=class extends t[_0x57036f(0x201)]{constructor(_0x305462,_0x22e0d4,_0x461b2d){const _0xf37adf=_0x57036f;super(),this[_0xf37adf(0x193)]=_0x305462,this[_0xf37adf(0x12e)]=_0x22e0d4,this['disposeWithMe'](_0x461b2d['register']({'resolve':(_0x4e936e,_0x9cb95b)=>{const _0xb16bbd=_0xf37adf;var _0x805e91;return((_0x805e91=_0x9cb95b['customRanges'])==null?void 0x0:_0x805e91['filter'](g)['map'](_0x4afd0f=>({'startOffset':_0x4afd0f[_0xb16bbd(0x14a)],'endOffset':_0x4afd0f[_0xb16bbd(0x189)]+0x1,'text':this[_0xb16bbd(0x12b)](_0x4e936e,_0x4afd0f[_0xb16bbd(0x1ab)])})))??[];}})),this[_0xf37adf(0x157)](this[_0xf37adf(0x12e)][_0xf37adf(0x118)][_0xf37adf(0x15c)](({unitId:_0x37088a})=>{_0x461b2d['notifyTextChanged'](_0x37088a);}));}[_0x57036f(0x12b)](_0x4ec3fb,_0x276e57){const _0x1589d2=_0x57036f;var _0x57a985;return((_0x57a985=this[_0x1589d2(0x12e)][_0x1589d2(0x236)]({'unitId':_0x4ec3fb,'rangeId':_0x276e57}))==null?void 0x0:_0x57a985[_0x1589d2(0x183)])??'';}[_0x57036f(0x207)](_0x58b78f,_0x77ab1a,_0x2c0fca){const _0xaa7a5a=_0x57036f;var _0x57caad;let _0x181a30=this[_0xaa7a5a(0x193)][_0xaa7a5a(0x11c)](_0x58b78f,t[_0xaa7a5a(0x16b)][_0xaa7a5a(0x1bc)]),_0x5d7ef4=_0x181a30==null?void 0x0:_0x181a30[_0xaa7a5a(0x1a9)]();if(!_0x5d7ef4)return'';let _0x2954db=_0x5d7ef4['dataStream'][_0xaa7a5a(0x1cc)](_0x77ab1a,_0x2c0fca),_0x495083=((_0x57caad=_0x5d7ef4[_0xaa7a5a(0x128)])==null?void 0x0:_0x57caad[_0xaa7a5a(0x205)](_0x11e48c=>g(_0x11e48c)&&_0x11e48c['startIndex']>=_0x77ab1a&&_0x11e48c[_0xaa7a5a(0x189)]<_0x2c0fca)[_0xaa7a5a(0x12c)]((_0x2239e1,_0x5661c0)=>_0x5661c0[_0xaa7a5a(0x14a)]-_0x2239e1['startIndex']))??[];for(let _0x2f3b32 of _0x495083){let _0x34f6cb=_0x2f3b32[_0xaa7a5a(0x14a)]-_0x77ab1a,_0x47a4e3=_0x2f3b32[_0xaa7a5a(0x189)]-_0x77ab1a+0x1;_0x2954db=''+_0x2954db['slice'](0x0,_0x34f6cb)+this[_0xaa7a5a(0x12b)](_0x58b78f,_0x2f3b32[_0xaa7a5a(0x1ab)])+_0x2954db[_0xaa7a5a(0x1cc)](_0x47a4e3);}return _0x2954db;}[_0x57036f(0x1a2)](_0x1feab2){return Ie(_0x1feab2);}[_0x57036f(0x149)](_0x4af771,_0x29b3fc,_0x5dbf91={}){const _0x26f0a6=_0x57036f;var _0x5ecc0b;return re({'id':_0x4af771,'body':_0x29b3fc,'documentStyle':{}},(((_0x5ecc0b=_0x29b3fc[_0x26f0a6(0x128)])==null?void 0x0:_0x5ecc0b['filter'](g))??[])[_0x26f0a6(0x235)](_0x1833df=>({'rangeId':_0x1833df['rangeId'],'text':_0x5dbf91[_0x1833df[_0x26f0a6(0x1ab)]]??this[_0x26f0a6(0x12b)](_0x4af771,_0x1833df[_0x26f0a6(0x1ab)])})))[_0x26f0a6(0x170)]??{'dataStream':''};}};Z=A([k(0x0,t[_0x57036f(0x214)]),k(0x1,(0x0,t[_0x57036f(0x136)])(j)),k(0x2,(0x0,t[_0x57036f(0x136)])(n[_0x57036f(0x11e)]))],Z);function Ie(_0x163168){const _0x3341bf=_0x57036f;var _0x46bb01,_0xebcd1e;let _0x3135d8=Le(_0x163168),_0x19000b=re(_0x163168,(((_0x46bb01=_0x163168[_0x3341bf(0x170)])==null||(_0x46bb01=_0x46bb01[_0x3341bf(0x128)])==null?void 0x0:_0x46bb01[_0x3341bf(0x205)](g))??[])[_0x3341bf(0x235)](_0x98c41e=>({'rangeId':_0x98c41e[_0x3341bf(0x1ab)],'text':Re(_0x3135d8==null?void 0x0:_0x3135d8[_0x3341bf(0x1f8)][_0x98c41e['rangeId']])})));return _0x19000b[_0x3341bf(0x141)]=(_0xebcd1e=_0x19000b[_0x3341bf(0x141)])==null?void 0x0:_0xebcd1e[_0x3341bf(0x205)](_0x3de98f=>_0x3de98f[_0x3341bf(0x210)]!==o),_0x19000b;}function Le(_0x1f3a95){const _0x48c51e=_0x57036f;var _0x23271c;let _0x7117d1=(_0x23271c=_0x1f3a95[_0x48c51e(0x141)])==null||(_0x23271c=_0x23271c[_0x48c51e(0x1ac)](_0x1bee1b=>_0x1bee1b[_0x48c51e(0x210)]===_0x48c51e(0x1a5)))==null?void 0x0:_0x23271c['data'];if(_0x7117d1)try{let _0x132789=JSON[_0x48c51e(0x230)](_0x7117d1);return l(_0x132789)?_0x132789:void 0x0;}catch{return;}}function Re(_0x31d018){const _0x5cb1d9=_0x57036f;return _0x31d018?(0x0,e['resolveFormulaResultPresentation'])({'lastValue':_0x31d018[_0x5cb1d9(0x241)],'numberFormat':_0x31d018[_0x5cb1d9(0x1e5)]})[_0x5cb1d9(0x183)]:'';}let Q=class extends t[_0x57036f(0x201)]{constructor(_0x1c1db0,_0x3d13ca,_0x53ce0b){const _0xc471bc=_0x57036f;super(),this[_0xc471bc(0x12e)]=_0x1c1db0,this[_0xc471bc(0x21e)]=_0x3d13ca,this[_0xc471bc(0x157)](_0x53ce0b[_0xc471bc(0x1fc)](this));}[_0x57036f(0x243)](_0x390fd3){const _0xf61944=_0x57036f;let _0x28e86a=new Map();for(let _0x5a3708 of this[_0xf61944(0x12e)][_0xf61944(0x23d)]()){var _0x3b0b9e;if(!this[_0xf61944(0x21e)][_0xf61944(0x20c)](_0x5a3708[_0xf61944(0x1cf)][_0xf61944(0x126)],_0x5a3708[_0xf61944(0x19c)])[_0xf61944(0x1c3)])continue;let _0x13cf88=(0x0,e[_0xf61944(0x182)])(_0x5a3708[_0xf61944(0x19c)]),_0x5c77ba=_0x13cf88?(0x0,e[_0xf61944(0x1ec)])(_0x13cf88):null;if(!_0x5c77ba||ze(_0x5a3708[_0xf61944(0x1cf)]['lastValue'],_0x5c77ba))continue;let _0x2d0dda=_0x28e86a[_0xf61944(0x249)](_0x5a3708[_0xf61944(0x11d)][_0xf61944(0x18e)])??[];_0x2d0dda[_0xf61944(0x1fb)]({'rangeId':_0x5a3708[_0xf61944(0x11d)][_0xf61944(0x1ab)],'expectedFormula':_0x5a3708[_0xf61944(0x1cf)][_0xf61944(0x126)],'expectedNumberFormat':(_0x3b0b9e=_0x5a3708['config']['numberFormat'])==null?void 0x0:_0x3b0b9e[_0xf61944(0x1c8)],'expectedReferenceRevision':_0x5a3708['referenceRevision'],'lastValue':_0x5c77ba}),_0x28e86a[_0xf61944(0x23a)](_0x5a3708[_0xf61944(0x11d)][_0xf61944(0x18e)],_0x2d0dda);}return Array[_0xf61944(0x1d9)](_0x28e86a,([_0x379a02,_0x19656a])=>({'id':R['id'],'params':{'unitId':_0x379a02,'updates':_0x19656a}}));}};Q=A([k(0x0,(0x0,t[_0x57036f(0x136)])(j)),k(0x1,(0x0,t['Inject'])(e[_0x57036f(0x143)])),k(0x2,(0x0,t[_0x57036f(0x136)])(e['FormulaLastValuePersistenceService']))],Q);function ze(_0x1f7288,_0x710845){const _0x30271b=_0x57036f;return(_0x1f7288==null?void 0x0:_0x1f7288['v'])===_0x710845['v']&&(_0x1f7288==null?void 0x0:_0x1f7288['t'])===_0x710845['t']&&(_0x1f7288==null?void 0x0:_0x1f7288[_0x30271b(0x1c8)])===_0x710845[_0x30271b(0x1c8)];}let $=class extends t[_0x57036f(0x184)]{constructor(_0x36ea3d=Fe,_0x9038ae,_0x382b80,_0x1daf87){const _0x2d0f7d=_0x57036f;super(),this['_config']=_0x36ea3d,this['_injector']=_0x9038ae,this[_0x2d0f7d(0x1d1)]=_0x382b80,this[_0x2d0f7d(0x119)]=_0x1daf87;let {..._0x26ec24}=(0x0,t[_0x2d0f7d(0x21d)])({},Fe,this[_0x2d0f7d(0x19e)]);this[_0x2d0f7d(0x119)][_0x2d0f7d(0x148)](_0x2d0f7d(0x1e4),_0x26ec24);}['onStarting'](){const _0x513e71=_0x57036f;this[_0x513e71(0x24a)]['add']([O]),this['_injector'][_0x513e71(0x16f)]([j]),this['_injector'][_0x513e71(0x16f)]([X]),this[_0x513e71(0x24a)][_0x513e71(0x16f)]([Y]),this[_0x513e71(0x24a)][_0x513e71(0x16f)]([Q]),this['_injector'][_0x513e71(0x16f)]([Z]),(0x0,t[_0x513e71(0x12d)])(this[_0x513e71(0x24a)],[[O],[X],[Y],[Q],[Z]]),[F,I,L,R,z,B,V,H,U,W]['forEach'](_0x1f0aae=>this[_0x513e71(0x157)](this[_0x513e71(0x1d1)][_0x513e71(0x22b)](_0x1f0aae)));}};D($,_0x57036f(0x1d6),o),D($,_0x57036f(0x208),Ne),D($,'version',Pe),D($,'type',t[_0x57036f(0x16b)][_0x57036f(0x1bc)]),$=A([(0x0,t['DependentOn'])(a[_0x57036f(0x23b)],e[_0x57036f(0x164)],n[_0x57036f(0x16a)]),k(0x1,(0x0,t[_0x57036f(0x136)])(t[_0x57036f(0x204)])),k(0x2,t[_0x57036f(0x15a)]),k(0x3,t['IConfigService'])],$),exports[_0x57036f(0x239)]=W,exports[_0x57036f(0x20a)]=s,exports[_0x57036f(0x1e3)]='',exports[_0x57036f(0x1a5)]=o,Object[_0x57036f(0x165)](exports,_0x57036f(0x1f2),{'enumerable':!0x0,'get':function(){return Z;}}),Object[_0x57036f(0x165)](exports,'DocFormulaLifecycleController',{'enumerable':!0x0,'get':function(){return Y;}}),exports[_0x57036f(0x213)]=O,Object[_0x57036f(0x165)](exports,_0x57036f(0x253),{'enumerable':!0x0,'get':function(){return X;}}),exports[_0x57036f(0x167)]=ve,Object[_0x57036f(0x165)](exports,_0x57036f(0x216),{'enumerable':!0x0,'get':function(){return j;}}),exports[_0x57036f(0x12f)]=z,exports[_0x57036f(0x234)]=m,exports[_0x57036f(0x256)]=H,exports[_0x57036f(0x139)]=I,exports['ReplaceDocFormulaWithTextCommand']=U,exports['SetDocFormulaLastValuesMutation']=R,exports['SetDocFormulaMutation']=F,exports[_0x57036f(0x161)]=V,exports[_0x57036f(0x1c2)]=L,Object[_0x57036f(0x165)](exports,_0x57036f(0x197),{'enumerable':!0x0,'get':function(){return $;}}),exports['UpdateDocFormulaCommand']=B,exports[_0x57036f(0x159)]=ie,exports[_0x57036f(0x1e0)]=te,exports['buildRemoveDocFormulaActions']=h,exports[_0x57036f(0x1a1)]=ne,exports[_0x57036f(0x1b4)]=c,exports[_0x57036f(0x1da)]=Ie,exports[_0x57036f(0x242)]=_,exports['isDocFormulaConfig']=u,exports['isDocFormulaRange']=g,exports[_0x57036f(0x1dc)]=l,exports[_0x57036f(0x200)]=d;
1
+ const _0x324a21=_0x3d5d;(function(_0x5ba6a1,_0x31c6d1){const _0x30625f=_0x3d5d,_0x16e40d=_0x5ba6a1();while(!![]){try{const _0x3485ca=parseInt(_0x30625f(0x1e1))/0x1+parseInt(_0x30625f(0x14d))/0x2*(-parseInt(_0x30625f(0x16d))/0x3)+parseInt(_0x30625f(0x15a))/0x4*(-parseInt(_0x30625f(0x226))/0x5)+parseInt(_0x30625f(0x231))/0x6+-parseInt(_0x30625f(0x185))/0x7*(parseInt(_0x30625f(0x18e))/0x8)+parseInt(_0x30625f(0x256))/0x9+parseInt(_0x30625f(0x246))/0xa;if(_0x3485ca===_0x31c6d1)break;else _0x16e40d['push'](_0x16e40d['shift']());}catch(_0x1ecc5a){_0x16e40d['push'](_0x16e40d['shift']());}}}(_0x4b6d,0x9c17d),Object['defineProperty'](exports,Symbol[_0x324a21(0x22f)],{'value':'Module'}));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=_0x324a21(0x189),s=_0x324a21(0x16e);function c(){return{'formulas':{}};}function l(_0x2e167d){const _0xf8218d=_0x324a21;return!_0x2e167d||typeof _0x2e167d!=_0xf8218d(0x1f3)||!(_0xf8218d(0x172)in _0x2e167d)||!_0x2e167d['formulas']||typeof _0x2e167d[_0xf8218d(0x172)]!=_0xf8218d(0x1f3)||Array[_0xf8218d(0x197)](_0x2e167d[_0xf8218d(0x172)])?!0x1:Object[_0xf8218d(0x1dc)](_0x2e167d[_0xf8218d(0x172)])[_0xf8218d(0x1e3)](([_0x2a4b71,_0x55e737])=>_0x2a4b71[_0xf8218d(0x1b2)]>0x0&&u(_0x55e737));}function u(_0x5ebaa0){const _0x4e8a9a=_0x324a21;return!_0x5ebaa0||typeof _0x5ebaa0!=_0x4e8a9a(0x1f3)||!f(_0x5ebaa0,[_0x4e8a9a(0x192),'numberFormat',_0x4e8a9a(0x1f0)])||!('formula'in _0x5ebaa0)||typeof _0x5ebaa0['formula']!='string'||!_0x5ebaa0['formula'][_0x4e8a9a(0x13f)]()||'numberFormat'in _0x5ebaa0&&_0x5ebaa0[_0x4e8a9a(0x16b)]!=null&&(typeof _0x5ebaa0[_0x4e8a9a(0x16b)]!=_0x4e8a9a(0x1f3)||!f(_0x5ebaa0[_0x4e8a9a(0x16b)],[_0x4e8a9a(0x220)])||!(_0x4e8a9a(0x220)in _0x5ebaa0[_0x4e8a9a(0x16b)])||typeof _0x5ebaa0['numberFormat'][_0x4e8a9a(0x220)]!='string')?!0x1:!(_0x4e8a9a(0x1f0)in _0x5ebaa0)||_0x5ebaa0[_0x4e8a9a(0x1f0)]==null||d(_0x5ebaa0['lastValue']);}function d(_0x18244a){const _0x2e2713=_0x324a21;return!_0x18244a||typeof _0x18244a!=_0x2e2713(0x1f3)||!f(_0x18244a,['v','t',_0x2e2713(0x220)])||!('v'in _0x18244a)||_0x18244a['v']!==null&&typeof _0x18244a['v']!=_0x2e2713(0x175)&&typeof _0x18244a['v']!=_0x2e2713(0x130)&&typeof _0x18244a['v']!=_0x2e2713(0x1f4)||'t'in _0x18244a&&_0x18244a['t']!=null&&!ee(_0x18244a['t'])?!0x1:!('pattern'in _0x18244a)||_0x18244a['pattern']==null||typeof _0x18244a['pattern']==_0x2e2713(0x175);}function f(_0x255e26,_0x5b72fe){const _0x88f59b=_0x324a21;let _0x27977a=new Set(_0x5b72fe);return Object[_0x88f59b(0x16f)](_0x255e26)[_0x88f59b(0x1e3)](_0x36bf78=>_0x27977a['has'](_0x36bf78));}function ee(_0x4fd625){const _0xb20dfd=_0x324a21;return typeof _0x4fd625==_0xb20dfd(0x130)&&Object['values'](t['CellValueType'])[_0xb20dfd(0x143)](_0x4fd625);}const p=new Set([t[_0x324a21(0x21b)][_0x324a21(0x235)],t[_0x324a21(0x21b)][_0x324a21(0x16c)],t['DataStreamTreeTokenType'][_0x324a21(0x168)],t[_0x324a21(0x21b)][_0x324a21(0x1d5)],t[_0x324a21(0x21b)][_0x324a21(0x242)],t[_0x324a21(0x21b)]['TABLE_ROW_END'],t[_0x324a21(0x21b)]['TABLE_END'],t['DataStreamTreeTokenType'][_0x324a21(0x258)],t[_0x324a21(0x21b)]['COLUMN_START'],t[_0x324a21(0x21b)]['COLUMN_END'],t['DataStreamTreeTokenType']['COLUMN_GROUP_END'],t[_0x324a21(0x21b)][_0x324a21(0x208)],t[_0x324a21(0x21b)]['BLOCK_END'],t['DataStreamTreeTokenType']['CUSTOM_BLOCK']]);var m=class extends Error{constructor(){const _0x2eea5a=_0x324a21;super(_0x2eea5a(0x1a9));}};function te(_0xdeb0e){const _0x42cb53=_0x324a21;var _0x288187,_0x672744;let _0x11fdf4=t[_0x42cb53(0x158)][_0x42cb53(0x1db)](_0xdeb0e[_0x42cb53(0x200)]),_0x483978=T(_0x11fdf4),{startOffset:_0x1480aa,endOffset:_0x5dfcd6}=oe(_0x483978,_0xdeb0e[_0x42cb53(0x22d)],_0xdeb0e['endOffset']);ie(_0x483978,_0x1480aa,_0x5dfcd6);let _0x4f0709=((_0x288187=_0x483978[_0x42cb53(0x234)])==null?void 0x0:_0x288187[_0x42cb53(0x24b)](_0x1e9208=>{const _0x1bc03d=_0x42cb53;if(!g(_0x1e9208))return!0x1;let _0x4de243=(0x0,t[_0x1bc03d(0x174)])(_0x1e9208);return _0x4de243[_0x1bc03d(0x1d3)]>_0x1480aa&&_0x4de243[_0x1bc03d(0x22d)]<_0x5dfcd6;})[_0x42cb53(0x253)](_0x3f2949=>_0x3f2949[_0x42cb53(0x203)]))??[];ce(_0x483978,_0x1480aa,_0x5dfcd6,''),_0x483978[_0x42cb53(0x234)]=[...((_0x672744=_0x483978[_0x42cb53(0x234)])==null?void 0x0:_0x672744[_0x42cb53(0x24b)](_0x545eaa=>!_0x4f0709[_0x42cb53(0x143)](_0x545eaa[_0x42cb53(0x203)])&&_0x545eaa[_0x42cb53(0x203)]!==_0xdeb0e[_0x42cb53(0x203)]))??[],ae(_0xdeb0e[_0x42cb53(0x203)],_0x1480aa)][_0x42cb53(0x15e)]((_0x4f2dfe,_0x2a2cc6)=>_0x4f2dfe[_0x42cb53(0x190)]-_0x2a2cc6[_0x42cb53(0x190)]);let _0x432af0=v(_0xdeb0e[_0x42cb53(0x176)]);return _0x4f0709[_0x42cb53(0x169)](_0x69d7a8=>{const _0x32dffc=_0x42cb53;delete _0x432af0[_0x32dffc(0x172)][_0x69d7a8];}),_0x432af0[_0x42cb53(0x172)][_0xdeb0e['rangeId']]=t[_0x42cb53(0x158)][_0x42cb53(0x1db)](_0xdeb0e['config']),{'nextDocumentData':_0x11fdf4,'nextResource':_0x432af0,'cursorOffset':_0x1480aa+0x1};}function ne(_0x3a7124){const _0x507b9b=_0x324a21;var _0x1b6217,_0x15af80;let _0x502502=t[_0x507b9b(0x158)]['deepClone'](_0x3a7124['documentData']),_0x3f1b27=(_0x1b6217=T(_0x502502)['customRanges'])==null?void 0x0:_0x1b6217['find'](_0x126d56=>_0x126d56[_0x507b9b(0x203)]===_0x3a7124[_0x507b9b(0x203)]&&g(_0x126d56));if(!_0x3f1b27||!((_0x15af80=_0x3a7124[_0x507b9b(0x176)])!=null&&_0x15af80[_0x507b9b(0x172)][_0x3a7124[_0x507b9b(0x203)]]))return null;let _0x58138=v(_0x3a7124[_0x507b9b(0x176)]);return _0x58138[_0x507b9b(0x172)][_0x3a7124['rangeId']]=t[_0x507b9b(0x158)][_0x507b9b(0x1db)](_0x3a7124[_0x507b9b(0x15b)]),{'nextDocumentData':_0x502502,'nextResource':_0x58138,'cursorOffset':_0x3f1b27[_0x507b9b(0x1f2)]+0x1};}function h(_0x3dcfdd){const _0x3a6a65=_0x324a21;let _0x4b7f52=t[_0x3a6a65(0x158)][_0x3a6a65(0x1db)](_0x3dcfdd['documentData']),_0xc1504c=le(_0x4b7f52,_0x3dcfdd[_0x3a6a65(0x203)],_0x3dcfdd[_0x3a6a65(0x1de)]??'');if(_0xc1504c==null)return null;let _0x3dcc56=v(_0x3dcfdd[_0x3a6a65(0x176)]);return delete _0x3dcc56['formulas'][_0x3dcfdd[_0x3a6a65(0x203)]],{'nextDocumentData':_0x4b7f52,'nextResource':_0x3dcc56,'cursorOffset':_0xc1504c};}function re(_0x16d8d7,_0x231b56){const _0x500769=_0x324a21;var _0x5cd619;let _0x39122d=t[_0x500769(0x158)]['deepClone'](_0x16d8d7),_0x3161b0=_0x39122d[_0x500769(0x1cb)];if(!_0x3161b0)return _0x39122d;let _0x13589d=new Map(_0x231b56[_0x500769(0x253)](_0x437257=>[_0x437257[_0x500769(0x203)],_0x437257[_0x500769(0x1de)]])),_0x5efe7e=((_0x5cd619=_0x3161b0[_0x500769(0x234)])==null?void 0x0:_0x5cd619[_0x500769(0x24b)](_0x5bbfd6=>g(_0x5bbfd6)&&_0x13589d[_0x500769(0x132)](_0x5bbfd6['rangeId']))['sort']((_0x560ea7,_0x1a6e93)=>_0x1a6e93[_0x500769(0x190)]-_0x560ea7[_0x500769(0x190)]))??[];for(let _0x5c86ea of _0x5efe7e)le(_0x39122d,_0x5c86ea[_0x500769(0x203)],_0x13589d[_0x500769(0x239)](_0x5c86ea[_0x500769(0x203)])??'');return _0x39122d;}function g(_0x296353){const _0x2ecc09=_0x324a21;var _0x47428f;return(_0x296353==null?void 0x0:_0x296353[_0x2ecc09(0x22a)])===t['CustomRangeType'][_0x2ecc09(0x18b)]&&_0x296353[_0x2ecc09(0x171)]===!0x0&&((_0x47428f=_0x296353['properties'])==null?void 0x0:_0x47428f[_0x2ecc09(0x233)])===_0x2ecc09(0x16e);}function _(_0x24eaef,_0xe1f73){const _0x1e79ff=_0x324a21;var _0x268385;return _0x24eaef==null||(_0x268385=_0x24eaef[_0x1e79ff(0x234)])==null?void 0x0:_0x268385[_0x1e79ff(0x25c)](_0x1f0536=>_0x1f0536[_0x1e79ff(0x203)]===_0xe1f73&&g(_0x1f0536));}function ie(_0x3d5d3a,_0x5b6b6a,_0x552946){const _0x58d96f=_0x324a21;if(_0x5b6b6a===_0x552946){if(p['has'](_0x3d5d3a[_0x58d96f(0x247)][_0x5b6b6a]))throw new m();}else{for(let _0x190a75=_0x5b6b6a;_0x190a75<_0x552946;_0x190a75++)if(_0x3d5d3a['dataStream'][_0x190a75]===t[_0x58d96f(0x21b)]['PARAGRAPH']||p[_0x58d96f(0x132)](_0x3d5d3a[_0x58d96f(0x247)][_0x190a75]))throw new m();}}function ae(_0x5ac1e2,_0x499f4a){const _0xb3f0ad=_0x324a21;return{'startIndex':_0x499f4a,'endIndex':_0x499f4a,'rangeId':_0x5ac1e2,'rangeType':t[_0xb3f0ad(0x1d4)][_0xb3f0ad(0x18b)],'wholeEntity':!0x0,'properties':{'kind':s}};}function v(_0x5c00d5){const _0x4029dc=_0x324a21;return _0x5c00d5?t[_0x4029dc(0x158)][_0x4029dc(0x1db)](_0x5c00d5):c();}function oe(_0x12ca80,_0x1ec317,_0x3f1a81){const _0x42f6cd=_0x324a21;let _0x4e11c9=se(_0x12ca80),_0xe7c7c6=_0x1ec317??_0x4e11c9,_0x43d500=_0x3f1a81??_0xe7c7c6;return{'startOffset':y(Math['min'](_0xe7c7c6,_0x43d500),_0x4e11c9),'endOffset':y(Math[_0x42f6cd(0x15c)](_0xe7c7c6,_0x43d500),_0x4e11c9)};}function y(_0xdb7dbe,_0x22d87f){const _0x2ace4a=_0x324a21;return Math[_0x2ace4a(0x15c)](0x0,Math[_0x2ace4a(0x17d)](_0xdb7dbe,_0x22d87f));}function se(_0x1369b5){const _0xa254e5=_0x324a21;return _0x1369b5[_0xa254e5(0x247)]['endsWith'](''+t[_0xa254e5(0x21b)][_0xa254e5(0x205)]+t[_0xa254e5(0x21b)][_0xa254e5(0x235)])?Math[_0xa254e5(0x15c)](0x0,_0x1369b5[_0xa254e5(0x247)][_0xa254e5(0x1b2)]-0x2):_0x1369b5['dataStream'][_0xa254e5(0x23a)](t[_0xa254e5(0x21b)][_0xa254e5(0x235)])?Math['max'](0x0,_0x1369b5['dataStream'][_0xa254e5(0x1b2)]-0x1):_0x1369b5[_0xa254e5(0x247)]['length'];}function ce(_0x47f408,_0x3e11cb,_0xf15308,_0x1b168c){_0xf15308>_0x3e11cb&&de(_0x47f408,_0x3e11cb,_0xf15308),ue(_0x47f408,_0x3e11cb,_0x1b168c);}function le(_0x3da358,_0xb7f826,_0x485b69){const _0x4e0ad6=_0x324a21;var _0x43e4bc,_0x1d4e28;let _0x3536ef=T(_0x3da358),_0x3e57be=(_0x43e4bc=_0x3536ef[_0x4e0ad6(0x234)])==null?void 0x0:_0x43e4bc[_0x4e0ad6(0x25c)](_0x22aa6c=>_0x22aa6c['rangeId']===_0xb7f826&&g(_0x22aa6c));if(!_0x3e57be)return null;let _0x897b89=(0x0,t['getCustomRangeInterval'])(_0x3e57be);return ce(_0x3536ef,_0x897b89[_0x4e0ad6(0x22d)],_0x897b89[_0x4e0ad6(0x1d3)],_0x485b69),_0x3536ef[_0x4e0ad6(0x234)]=(_0x1d4e28=_0x3536ef[_0x4e0ad6(0x234)])==null?void 0x0:_0x1d4e28[_0x4e0ad6(0x24b)](_0x5ad5c0=>_0x5ad5c0[_0x4e0ad6(0x203)]!==_0xb7f826),_0x897b89[_0x4e0ad6(0x22d)]+_0x485b69[_0x4e0ad6(0x1b2)];}function ue(_0x39ea90,_0x176f46,_0x8f5d09){const _0x5344d2=_0x324a21;_0x8f5d09&&(_0x39ea90[_0x5344d2(0x247)]=''+_0x39ea90['dataStream']['slice'](0x0,_0x176f46)+_0x8f5d09+_0x39ea90[_0x5344d2(0x247)][_0x5344d2(0x209)](_0x176f46),fe(_0x39ea90,_0x176f46,_0x8f5d09[_0x5344d2(0x1b2)]));}function de(_0x313fc2,_0x4fadee,_0x2a5f88){const _0x4a40db=_0x324a21;let _0x4081d1=_0x2a5f88-_0x4fadee;_0x313fc2[_0x4a40db(0x247)]=''+_0x313fc2[_0x4a40db(0x247)][_0x4a40db(0x209)](0x0,_0x4fadee)+_0x313fc2[_0x4a40db(0x247)][_0x4a40db(0x209)](_0x2a5f88),pe(_0x313fc2,_0x4fadee,_0x4081d1);}function fe(_0x58dcf1,_0x134fe0,_0x295be1){const _0x517a55=_0x324a21;_0x58dcf1[_0x517a55(0x188)]=b(_0x58dcf1[_0x517a55(0x188)],_0x134fe0,_0x295be1),_0x58dcf1[_0x517a55(0x198)]=b(_0x58dcf1[_0x517a55(0x198)],_0x134fe0,_0x295be1),_0x58dcf1[_0x517a55(0x254)]=b(_0x58dcf1[_0x517a55(0x254)],_0x134fe0,_0x295be1),_0x58dcf1[_0x517a55(0x1d2)]=me(_0x58dcf1[_0x517a55(0x1d2)],_0x134fe0,_0x295be1),_0x58dcf1[_0x517a55(0x22c)]=he(_0x58dcf1[_0x517a55(0x22c)],_0x134fe0,_0x295be1),_0x58dcf1[_0x517a55(0x14f)]=S(_0x58dcf1['columnGroups'],_0x134fe0,_0x295be1),_0x58dcf1['customRanges']=S(_0x58dcf1[_0x517a55(0x234)],_0x134fe0,_0x295be1),_0x58dcf1[_0x517a55(0x18c)]=S(_0x58dcf1['customDecorations'],_0x134fe0,_0x295be1),_0x58dcf1[_0x517a55(0x1c9)]=S(_0x58dcf1['blockRanges'],_0x134fe0,_0x295be1);}function pe(_0x5e8fd5,_0x134662,_0x3d2004){const _0x34e200=_0x324a21;var _0x5d6b0a,_0xe5c93d;_0x5e8fd5[_0x34e200(0x188)]=x(_0x5e8fd5[_0x34e200(0x188)],_0x134662,_0x3d2004),_0x5e8fd5['sectionBreaks']=x(_0x5e8fd5[_0x34e200(0x198)],_0x134662,_0x3d2004),_0x5e8fd5[_0x34e200(0x254)]=x(_0x5e8fd5['customBlocks'],_0x134662,_0x3d2004),_0x5e8fd5['textRuns']=(_0x5d6b0a=w((_0xe5c93d=_0x5e8fd5[_0x34e200(0x1d2)])==null?void 0x0:_0xe5c93d['map'](_0x15f2c2=>({..._0x15f2c2,'startIndex':_0x15f2c2['st'],'endIndex':_0x15f2c2['ed']})),_0x134662,_0x3d2004))==null?void 0x0:_0x5d6b0a['map'](_0x10c8ea=>{let {startIndex:_0x56e3e9,endIndex:_0x3306c5,..._0x9a7b05}=_0x10c8ea;return{..._0x9a7b05,'st':_0x56e3e9,'ed':_0x3306c5};}),_0x5e8fd5[_0x34e200(0x22c)]=w(_0x5e8fd5[_0x34e200(0x22c)],_0x134662,_0x3d2004),_0x5e8fd5[_0x34e200(0x14f)]=C(_0x5e8fd5[_0x34e200(0x14f)],_0x134662,_0x3d2004),_0x5e8fd5[_0x34e200(0x234)]=C(_0x5e8fd5['customRanges'],_0x134662,_0x3d2004),_0x5e8fd5['customDecorations']=C(_0x5e8fd5['customDecorations'],_0x134662,_0x3d2004),_0x5e8fd5['blockRanges']=C(_0x5e8fd5[_0x34e200(0x1c9)],_0x134662,_0x3d2004);}function b(_0x50f98f,_0x385d73,_0x24c98e){const _0x4e4b1e=_0x324a21;return _0x50f98f==null?void 0x0:_0x50f98f[_0x4e4b1e(0x253)](_0x281a3c=>_0x281a3c['startIndex']>=_0x385d73?{..._0x281a3c,'startIndex':_0x281a3c['startIndex']+_0x24c98e}:_0x281a3c);}function x(_0x4c2ee2,_0x4e2f86,_0xe5f373){const _0x46cfb0=_0x324a21;let _0x188b3b=_0x4e2f86+_0xe5f373;return _0x4c2ee2==null?void 0x0:_0x4c2ee2['map'](_0x288620=>_0x288620['startIndex']>=_0x4e2f86&&_0x288620[_0x46cfb0(0x190)]<_0x188b3b?null:_0x288620[_0x46cfb0(0x190)]>=_0x188b3b?{..._0x288620,'startIndex':_0x288620[_0x46cfb0(0x190)]-_0xe5f373}:_0x288620)[_0x46cfb0(0x24b)](_0x41d2c7=>_0x41d2c7!=null);}function me(_0x8afe8c,_0x30a025,_0x2785c9){const _0x285352=_0x324a21;return _0x8afe8c==null?void 0x0:_0x8afe8c[_0x285352(0x253)](_0x988f1c=>_0x988f1c['st']>=_0x30a025?{..._0x988f1c,'st':_0x988f1c['st']+_0x2785c9,'ed':_0x988f1c['ed']+_0x2785c9}:_0x988f1c['ed']>_0x30a025?{..._0x988f1c,'ed':_0x988f1c['ed']+_0x2785c9}:_0x988f1c);}function S(_0x46a1c1,_0x303c45,_0x1c8f3e){const _0x766023=_0x324a21;return _0x46a1c1==null?void 0x0:_0x46a1c1[_0x766023(0x253)](_0x42ede1=>(0x0,t[_0x766023(0x223)])(_0x42ede1,_0x303c45,_0x1c8f3e));}function he(_0x47d0d4,_0xe03475,_0x3111f5){const _0x112115=_0x324a21;return _0x47d0d4==null?void 0x0:_0x47d0d4[_0x112115(0x253)](_0x19e131=>(0x0,t['shiftExclusiveRangeOnInsert'])(_0x19e131,_0xe03475,_0x3111f5));}function _0x3d5d(_0x65ade6,_0x2af80f){_0x65ade6=_0x65ade6-0x129;const _0x4b6d04=_0x4b6d();let _0x3d5d38=_0x4b6d04[_0x65ade6];return _0x3d5d38;}function C(_0x2bb81c,_0x5c1f25,_0x4693c0){const _0x14a91f=_0x324a21;return _0x2bb81c==null?void 0x0:_0x2bb81c[_0x14a91f(0x253)](_0xb0e9ef=>(0x0,t[_0x14a91f(0x1a3)])(_0xb0e9ef,_0x5c1f25,_0x4693c0))[_0x14a91f(0x24b)](_0x303d85=>_0x303d85!=null);}function w(_0x24cf3a,_0x8ee356,_0x55c638){const _0x3bb177=_0x324a21;return _0x24cf3a==null?void 0x0:_0x24cf3a['map'](_0x490e8a=>(0x0,t[_0x3bb177(0x170)])(_0x490e8a,_0x8ee356,_0x55c638))[_0x3bb177(0x24b)](_0xa44e3b=>_0xa44e3b!=null);}function T(_0x2037f7){const _0x593d9a=_0x324a21;if(!_0x2037f7[_0x593d9a(0x1cb)])throw Error(_0x593d9a(0x1da));return _0x2037f7[_0x593d9a(0x1cb)];}function E(_0x3ce2b7){'@babel/helpers - typeof';const _0x35b880=_0x324a21;return E=typeof Symbol==_0x35b880(0x215)&&typeof Symbol[_0x35b880(0x1ac)]==_0x35b880(0x1df)?function(_0x1afe85){return typeof _0x1afe85;}:function(_0x296b75){const _0x3f1bb7=_0x35b880;return _0x296b75&&typeof Symbol==_0x3f1bb7(0x215)&&_0x296b75['constructor']===Symbol&&_0x296b75!==Symbol[_0x3f1bb7(0x13d)]?_0x3f1bb7(0x1df):typeof _0x296b75;},E(_0x3ce2b7);}function ge(_0x33cbc5,_0x42505f){const _0x16cdb1=_0x324a21;if(E(_0x33cbc5)!=_0x16cdb1(0x1f3)||!_0x33cbc5)return _0x33cbc5;var _0x149202;if(typeof Symbol<'u'&&(_0x149202=_0x33cbc5[Symbol[_0x16cdb1(0x13c)]])!==void 0x0){var _0xd7ff33=_0x149202[_0x16cdb1(0x1bf)](_0x33cbc5,_0x42505f||_0x16cdb1(0x1f7));if(E(_0xd7ff33)!=_0x16cdb1(0x1f3))return _0xd7ff33;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x42505f===_0x16cdb1(0x175)?String:Number)(_0x33cbc5);}function _e(_0x2f1c41){const _0x2cb71e=_0x324a21;var _0x2dbe7e=ge(_0x2f1c41,_0x2cb71e(0x175));return E(_0x2dbe7e)==_0x2cb71e(0x1df)?_0x2dbe7e:_0x2dbe7e+'';}function D(_0x138028,_0xd4e9f9,_0x460df5){const _0x2f6bcf=_0x324a21;return(_0xd4e9f9=_e(_0xd4e9f9))in _0x138028?Object[_0x2f6bcf(0x1ea)](_0x138028,_0xd4e9f9,{'value':_0x460df5,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x138028[_0xd4e9f9]=_0x460df5,_0x138028;}var O=class extends t[_0x324a21(0x136)]{constructor(..._0x392305){const _0x1f698b=_0x324a21;super(..._0x392305),D(this,_0x1f698b(0x1d8),new Map()),D(this,_0x1f698b(0x13b),new Map()),D(this,'_loadErrors',new Map()),D(this,_0x1f698b(0x160),new i[(_0x1f698b(0x17b))]()),D(this,_0x1f698b(0x25b),this['_change$']['asObservable']());}[_0x324a21(0x1e7)](_0x5c0ffb,_0x191cdb){const _0x1ff018=_0x324a21;var _0x3f31d3;let _0xfde9a6=(_0x3f31d3=this['_resources'][_0x1ff018(0x239)](_0x5c0ffb))==null?void 0x0:_0x3f31d3[_0x1ff018(0x172)][_0x191cdb];return _0xfde9a6?t[_0x1ff018(0x158)]['deepClone'](_0xfde9a6):void 0x0;}[_0x324a21(0x1bd)](_0x13bdb5){const _0x306dfb=_0x324a21;var _0x56351e;return t[_0x306dfb(0x158)][_0x306dfb(0x1db)](((_0x56351e=this[_0x306dfb(0x1d8)][_0x306dfb(0x239)](_0x13bdb5))==null?void 0x0:_0x56351e[_0x306dfb(0x172)])??{});}[_0x324a21(0x21a)](_0x2f2c04){const _0x2147ed=_0x324a21;let _0x33ba29=this['_resources'][_0x2147ed(0x239)](_0x2f2c04);return _0x33ba29?t[_0x2147ed(0x158)][_0x2147ed(0x1db)](_0x33ba29):void 0x0;}['setFormula'](_0x2d7043,_0x4f745d,_0x7538da){const _0xc6c36d=_0x324a21;return this[_0xc6c36d(0x238)](_0x2d7043,{[_0x4f745d]:_0x7538da});}['setResource'](_0x14b949,_0x5ef467){const _0x150471=_0x324a21;return this[_0x150471(0x230)][_0x150471(0x132)](_0x14b949)||!l(_0x5ef467)?!0x1:(this[_0x150471(0x1d8)][_0x150471(0x1b7)](_0x14b949,{'formulas':t['Tools'][_0x150471(0x1db)](_0x5ef467[_0x150471(0x172)])}),this[_0x150471(0x160)][_0x150471(0x1bb)]({'unitId':_0x14b949}),!0x0);}[_0x324a21(0x238)](_0x1ced3e,_0x18df9b){const _0xbb0e75=_0x324a21;if(this[_0xbb0e75(0x230)][_0xbb0e75(0x132)](_0x1ced3e)||!Object[_0xbb0e75(0x16f)](_0x18df9b)[_0xbb0e75(0x1b2)]||!l({'formulas':_0x18df9b}))return!0x1;let _0x1e9fe6=this[_0xbb0e75(0x1d8)][_0xbb0e75(0x239)](_0x1ced3e)??c(),_0x14bd9f=t['Tools'][_0xbb0e75(0x1db)](_0x1e9fe6);return Object[_0xbb0e75(0x15f)](_0x14bd9f[_0xbb0e75(0x172)],t[_0xbb0e75(0x158)]['deepClone'](_0x18df9b)),this['_resources'][_0xbb0e75(0x1b7)](_0x1ced3e,_0x14bd9f),this[_0xbb0e75(0x160)][_0xbb0e75(0x1bb)]({'unitId':_0x1ced3e,'rangeIds':Object[_0xbb0e75(0x16f)](_0x18df9b)}),!0x0;}['removeFormula'](_0x463f4a,_0x5ab6c3){const _0x2c8c06=_0x324a21;if(this[_0x2c8c06(0x230)][_0x2c8c06(0x132)](_0x463f4a))return!0x1;let _0x38908a=this['_resources']['get'](_0x463f4a);if(!(_0x38908a!=null&&_0x38908a[_0x2c8c06(0x172)][_0x5ab6c3]))return!0x1;let _0x3ff2e6=t[_0x2c8c06(0x158)][_0x2c8c06(0x1db)](_0x38908a);return delete _0x3ff2e6[_0x2c8c06(0x172)][_0x5ab6c3],this[_0x2c8c06(0x1d8)][_0x2c8c06(0x1b7)](_0x463f4a,_0x3ff2e6),this[_0x2c8c06(0x160)][_0x2c8c06(0x1bb)]({'unitId':_0x463f4a,'rangeIds':[_0x5ab6c3]}),!0x0;}[_0x324a21(0x1ee)](_0x5bbf8,_0x21d75a){const _0x254ae9=_0x324a21;return l(_0x21d75a)?(this[_0x254ae9(0x1d8)][_0x254ae9(0x1b7)](_0x5bbf8,{'formulas':t['Tools'][_0x254ae9(0x1db)](_0x21d75a[_0x254ae9(0x172)])}),this[_0x254ae9(0x13b)][_0x254ae9(0x1ef)](_0x5bbf8),this[_0x254ae9(0x230)][_0x254ae9(0x1ef)](_0x5bbf8),this[_0x254ae9(0x160)]['next']({'unitId':_0x5bbf8}),!0x0):(this[_0x254ae9(0x259)](_0x5bbf8,_0x21d75a,_0x254ae9(0x14e)),!0x1);}[_0x324a21(0x12f)](_0x518743){const _0x30446a=_0x324a21;let _0xe34040=this[_0x30446a(0x1d8)][_0x30446a(0x239)](_0x518743);return _0xe34040?t[_0x30446a(0x158)][_0x30446a(0x1db)](_0xe34040):this[_0x30446a(0x13b)][_0x30446a(0x132)](_0x518743)?t[_0x30446a(0x158)]['deepClone'](this[_0x30446a(0x13b)][_0x30446a(0x239)](_0x518743)):c();}[_0x324a21(0x141)](_0x1d2ace){const _0x3e05f6=_0x324a21;return this[_0x3e05f6(0x230)][_0x3e05f6(0x239)](_0x1d2ace);}[_0x324a21(0x1d0)](_0x3ec96c){const _0xddaf4c=_0x324a21;this['_resources'][_0xddaf4c(0x1ef)](_0x3ec96c),this[_0xddaf4c(0x13b)][_0xddaf4c(0x1ef)](_0x3ec96c),this['_loadErrors'][_0xddaf4c(0x1ef)](_0x3ec96c),this[_0xddaf4c(0x160)][_0xddaf4c(0x1bb)]({'unitId':_0x3ec96c});}[_0x324a21(0x207)](){const _0x5467a6=_0x324a21;this[_0x5467a6(0x1d8)]['clear'](),this[_0x5467a6(0x13b)][_0x5467a6(0x20e)](),this[_0x5467a6(0x230)][_0x5467a6(0x20e)](),this['_change$'][_0x5467a6(0x1c7)](),super[_0x5467a6(0x207)]();}[_0x324a21(0x259)](_0x4b4883,_0x39dbf5,_0xfc9687){const _0xcb2b78=_0x324a21;this[_0xcb2b78(0x1d8)][_0xcb2b78(0x1ef)](_0x4b4883),this[_0xcb2b78(0x13b)][_0xcb2b78(0x1b7)](_0x4b4883,t[_0xcb2b78(0x158)][_0xcb2b78(0x1db)](_0x39dbf5)),this[_0xcb2b78(0x230)][_0xcb2b78(0x1b7)](_0x4b4883,_0xfc9687),this[_0xcb2b78(0x160)][_0xcb2b78(0x1bb)]({'unitId':_0x4b4883});}};let ve=function(_0xa2abac){const _0x19272a=_0x324a21;return _0xa2abac[_0x19272a(0x1ff)]=_0x19272a(0x24e),_0xa2abac[_0x19272a(0x12e)]=_0x19272a(0x228),_0xa2abac[_0x19272a(0x12b)]=_0x19272a(0x1fb),_0xa2abac[_0x19272a(0x1cf)]=_0x19272a(0x191),_0xa2abac;}({});function k(_0x5a2bf2,_0x57066e){return function(_0x4a7083,_0x14be1b){_0x57066e(_0x4a7083,_0x14be1b,_0x5a2bf2);};}function A(_0x378833,_0x5dfb00,_0x3f4f74,_0x2831de){const _0x2e8701=_0x324a21;var _0x3ce97e=arguments['length'],_0xe5c4b2=_0x3ce97e<0x3?_0x5dfb00:_0x2831de===null?_0x2831de=Object[_0x2e8701(0x155)](_0x5dfb00,_0x3f4f74):_0x2831de,_0x521669;if(typeof Reflect==_0x2e8701(0x1f3)&&typeof Reflect[_0x2e8701(0x236)]==_0x2e8701(0x215))_0xe5c4b2=Reflect[_0x2e8701(0x236)](_0x378833,_0x5dfb00,_0x3f4f74,_0x2831de);else{for(var _0x5f0a7c=_0x378833[_0x2e8701(0x1b2)]-0x1;_0x5f0a7c>=0x0;_0x5f0a7c--)(_0x521669=_0x378833[_0x5f0a7c])&&(_0xe5c4b2=(_0x3ce97e<0x3?_0x521669(_0xe5c4b2):_0x3ce97e>0x3?_0x521669(_0x5dfb00,_0x3f4f74,_0xe5c4b2):_0x521669(_0x5dfb00,_0x3f4f74))||_0xe5c4b2);}return _0x3ce97e>0x3&&_0xe5c4b2&&Object['defineProperty'](_0x5dfb00,_0x3f4f74,_0xe5c4b2),_0xe5c4b2;}let j=class extends t[_0x324a21(0x136)]{constructor(_0x1edb4f,_0x1036ef,_0x1abc90){const _0x26b80b=_0x324a21;super(),this[_0x26b80b(0x19d)]=_0x1edb4f,this[_0x26b80b(0x219)]=_0x1036ef,this[_0x26b80b(0x16a)]=_0x1abc90,D(this,_0x26b80b(0x1e2),new Map()),D(this,'_formulaKeys',new Map()),D(this,_0x26b80b(0x150),new i['Subject']()),D(this,_0x26b80b(0x153),this['_presentationChanged$']['asObservable']()),this['disposeWithMe'](this[_0x26b80b(0x219)]['formulaResult$'][_0x26b80b(0x19b)](_0x4e8fe8=>{const _0x5e117a=_0x26b80b;for(let _0x4bd241 of Object[_0x5e117a(0x1d6)](_0x4e8fe8))for(let _0x154c2b of Object[_0x5e117a(0x1d6)](_0x4bd241))_0x154c2b['forEach'](_0x22e15b=>this['_updateFormulaResult'](_0x22e15b));}));}[_0x324a21(0x152)](_0x3c65d0){const _0x521632=_0x324a21;var _0x994994;let _0xbc371c=_0x3c65d0[_0x521632(0x1a6)](),_0x1bb2c6=((_0x994994=_0x3c65d0[_0x521632(0x1b1)]()[_0x521632(0x1cb)])==null||(_0x994994=_0x994994[_0x521632(0x234)])==null?void 0x0:_0x994994[_0x521632(0x24b)](g))??[],_0x4dc1ad=this[_0x521632(0x19d)][_0x521632(0x1bd)](_0xbc371c),_0x5759f3=new Set();for(let _0x3602e7 of _0x1bb2c6){let _0x9dce8c=_0x4dc1ad[_0x3602e7['rangeId']];_0x9dce8c&&(_0x5759f3[_0x521632(0x237)](M(_0xbc371c,_0x3602e7[_0x521632(0x203)])),this[_0x521632(0x211)]({'unitId':_0xbc371c,'rangeId':_0x3602e7['rangeId']},_0x9dce8c));}for(let _0x31201f of Array[_0x521632(0x24c)](this['_registrations']['values']()))_0x31201f[_0x521632(0x23c)]===_0xbc371c&&!_0x5759f3['has'](M(_0x31201f['unitId'],_0x31201f[_0x521632(0x203)]))&&this[_0x521632(0x17c)](_0x31201f);}[_0x324a21(0x211)](_0x195085,_0x3a228a){const _0x4ed102=_0x324a21;let _0x1f02ce=M(_0x195085['unitId'],_0x195085[_0x4ed102(0x203)]),_0x4201b3=this[_0x4ed102(0x1e2)][_0x4ed102(0x239)](_0x1f02ce),_0x58eb6a=this[_0x4ed102(0x16a)][_0x4ed102(0x196)](_0x195085['unitId']);if(_0x4201b3&&_0x4201b3[_0x4ed102(0x15b)][_0x4ed102(0x192)]===_0x3a228a[_0x4ed102(0x192)]&&_0x4201b3[_0x4ed102(0x229)]===_0x58eb6a){_0x4201b3[_0x4ed102(0x15b)]=_0x3a228a;let _0xf08102=_0x4201b3['formulaId']?this[_0x4ed102(0x219)][_0x4ed102(0x138)](_0x4201b3[_0x4ed102(0x23c)],_0x4201b3[_0x4ed102(0x23c)],_0x4201b3[_0x4ed102(0x1e9)])??void 0x0:void 0x0;_0x4201b3[_0x4ed102(0x202)]=_0xf08102,this['_setPresentation'](_0x1f02ce,N(_0x3a228a,_0xf08102));return;}_0x4201b3!=null&&_0x4201b3[_0x4ed102(0x1e9)]&&this['_deleteRegistration'](_0x4201b3);let _0x56542d={..._0x195085,'config':_0x3a228a,'referenceRevision':_0x58eb6a,'presentation':N(_0x3a228a,void 0x0)};if(this[_0x4ed102(0x1e2)][_0x4ed102(0x1b7)](_0x1f02ce,_0x56542d),!_0x3a228a[_0x4ed102(0x192)][_0x4ed102(0x13f)]())return;let _0x1a9a68=this[_0x4ed102(0x219)]['registerFormulaWithRange'](_0x195085['unitId'],_0x195085[_0x4ed102(0x23c)],_0x3a228a[_0x4ed102(0x192)],void 0x0,{'rangeId':_0x195085[_0x4ed102(0x203)]},r[_0x4ed102(0x1e6)][_0x4ed102(0x21f)],_0x195085[_0x4ed102(0x203)]);_0x56542d[_0x4ed102(0x1e9)]=_0x1a9a68,this[_0x4ed102(0x183)][_0x4ed102(0x1b7)](_0x1a9a68,_0x1f02ce);}['unregister'](_0x22f9ea){const _0x4e6469=_0x324a21;let _0x44e000=M(_0x22f9ea[_0x4e6469(0x23c)],_0x22f9ea['rangeId']),_0x463d63=this[_0x4e6469(0x1e2)][_0x4e6469(0x239)](_0x44e000);_0x463d63&&(this[_0x4e6469(0x163)](_0x463d63),this['_registrations']['delete'](_0x44e000));}[_0x324a21(0x20f)](_0x489852){const _0x5699b2=_0x324a21;for(let _0x193f50 of Array['from'](this[_0x5699b2(0x1e2)][_0x5699b2(0x1d6)]()))_0x193f50['unitId']===_0x489852&&this['unregister'](_0x193f50);}[_0x324a21(0x1bc)](_0x12ef48){const _0x32aa79=_0x324a21;var _0x21e0ed;return(_0x21e0ed=this[_0x32aa79(0x1e2)][_0x32aa79(0x239)](M(_0x12ef48['unitId'],_0x12ef48[_0x32aa79(0x203)])))==null?void 0x0:_0x21e0ed[_0x32aa79(0x1c0)];}['getResult'](_0x528014){const _0x3ba098=_0x324a21;let _0x3d6db8=this['_registrations'][_0x3ba098(0x239)](M(_0x528014[_0x3ba098(0x23c)],_0x528014[_0x3ba098(0x203)]));return _0x3d6db8?P(_0x3d6db8):void 0x0;}[_0x324a21(0x161)](){const _0x45b06c=_0x324a21;return Array[_0x45b06c(0x24c)](this[_0x45b06c(0x1e2)][_0x45b06c(0x1d6)](),_0xeda0f8=>({'identity':{'unitId':_0xeda0f8[_0x45b06c(0x23c)],'rangeId':_0xeda0f8[_0x45b06c(0x203)]},'config':_0xeda0f8['config'],'referenceRevision':_0xeda0f8[_0x45b06c(0x229)],..._0xeda0f8['liveResult']?{'liveResult':_0xeda0f8[_0x45b06c(0x202)]}:null}));}[_0x324a21(0x207)](){const _0x4df891=_0x324a21;for(let _0x3909d4 of this[_0x4df891(0x1e2)][_0x4df891(0x1d6)]())this[_0x4df891(0x163)](_0x3909d4);this[_0x4df891(0x1e2)]['clear'](),this[_0x4df891(0x183)][_0x4df891(0x20e)](),this[_0x4df891(0x150)][_0x4df891(0x1c7)](),super[_0x4df891(0x207)]();}['_updateFormulaResult'](_0x1ac82c){const _0x17150b=_0x324a21;let _0xb54f3e=this[_0x17150b(0x183)][_0x17150b(0x239)](_0x1ac82c[_0x17150b(0x1e9)]),_0xd51501=_0xb54f3e?this[_0x17150b(0x1e2)][_0x17150b(0x239)](_0xb54f3e):void 0x0;_0xb54f3e&&_0xd51501&&(_0xd51501[_0x17150b(0x202)]=_0x1ac82c,this[_0x17150b(0x144)](_0xb54f3e,N(_0xd51501[_0x17150b(0x15b)],_0x1ac82c)));}['_setPresentation'](_0x58754b,_0x420f12){const _0x27949d=_0x324a21;var _0x49434e,_0x3314e5;let _0x208d86=this['_registrations'][_0x27949d(0x239)](_0x58754b);if(!_0x208d86||ye(_0x208d86[_0x27949d(0x1c0)],_0x420f12))return;let _0x1d1ab2=_0x208d86['presentation'],_0x53312d=P(_0x208d86);_0x208d86[_0x27949d(0x1c0)]=_0x420f12,this[_0x27949d(0x150)][_0x27949d(0x1bb)]({'unitId':_0x208d86[_0x27949d(0x23c)],'rangeId':_0x208d86[_0x27949d(0x203)],'presentation':_0x420f12,'previousPresentation':_0x1d1ab2,'result':P(_0x208d86),'previousResult':{..._0x53312d,..._0x1d1ab2,'value':(_0x49434e=_0x1d1ab2[_0x27949d(0x182)])==null?void 0x0:_0x49434e['v'],'valueType':((_0x3314e5=_0x1d1ab2[_0x27949d(0x182)])==null?void 0x0:_0x3314e5['t'])??void 0x0}});}[_0x324a21(0x163)](_0x14ef1b){const _0x2e2e3f=_0x324a21;_0x14ef1b[_0x2e2e3f(0x1e9)]&&(this[_0x2e2e3f(0x219)][_0x2e2e3f(0x1fd)](_0x14ef1b[_0x2e2e3f(0x23c)],_0x14ef1b[_0x2e2e3f(0x23c)],[_0x14ef1b[_0x2e2e3f(0x1e9)]]),this[_0x2e2e3f(0x183)][_0x2e2e3f(0x1ef)](_0x14ef1b['formulaId']));}};j=A([k(0x0,(0x0,t[_0x324a21(0x1ca)])(O)),k(0x1,(0x0,t['Inject'])(r[_0x324a21(0x241)])),k(0x2,(0x0,t['Inject'])(e[_0x324a21(0x212)]))],j);function M(_0x1c9ef3,_0x540cdd){return _0x1c9ef3+'\x00'+_0x540cdd;}function N(_0xab82e8,_0x4aa9c1){const _0x15afd6=_0x324a21;return(0x0,e[_0x15afd6(0x17e)])({'numberFormat':_0xab82e8['numberFormat'],'lastValue':_0xab82e8['lastValue'],'result':_0x4aa9c1});}function P(_0x52408b){const _0x4b2f63=_0x324a21;var _0xf5df18,_0x7efb6d,_0x51dfaf;let _0x42057e=_0x52408b[_0x4b2f63(0x1c0)],_0x25d3ba=_0x52408b[_0x4b2f63(0x15b)]['formula'][_0x4b2f63(0x13f)]()?_0x42057e[_0x4b2f63(0x135)]||_0x42057e[_0x4b2f63(0x182)]==null?_0x4b2f63(0x228):((_0xf5df18=_0x52408b[_0x4b2f63(0x202)])==null?void 0x0:_0xf5df18['status'])===r['FormulaResultStatus'][_0x4b2f63(0x1cf)]?_0x4b2f63(0x191):_0x4b2f63(0x1fb):_0x4b2f63(0x24e);return{..._0x42057e,'status':_0x25d3ba,'value':(_0x7efb6d=_0x42057e[_0x4b2f63(0x182)])==null?void 0x0:_0x7efb6d['v'],'valueType':((_0x51dfaf=_0x42057e[_0x4b2f63(0x182)])==null?void 0x0:_0x51dfaf['t'])??void 0x0};}function ye(_0x4e1599,_0x36ae10){const _0x32757c=_0x324a21;var _0x603325,_0x4d358b,_0x25cbb3,_0x2f2cd5;return _0x4e1599['text']===_0x36ae10[_0x32757c(0x1de)]&&_0x4e1599['color']===_0x36ae10['color']&&_0x4e1599['pattern']===_0x36ae10[_0x32757c(0x220)]&&_0x4e1599[_0x32757c(0x165)]===_0x36ae10[_0x32757c(0x165)]&&_0x4e1599[_0x32757c(0x135)]===_0x36ae10[_0x32757c(0x135)]&&((_0x603325=_0x4e1599['cell'])==null?void 0x0:_0x603325['t'])===((_0x4d358b=_0x36ae10[_0x32757c(0x182)])==null?void 0x0:_0x4d358b['t'])&&Object['is']((_0x25cbb3=_0x4e1599[_0x32757c(0x182)])==null?void 0x0:_0x25cbb3['v'],(_0x2f2cd5=_0x36ae10['cell'])==null?void 0x0:_0x2f2cd5['v']);}const F={'id':'docs-formula.mutation.set-formula','type':t[_0x324a21(0x1af)][_0x324a21(0x244)],'handler':(_0x2d3677,_0x487db2)=>!(_0x487db2!=null&&_0x487db2['unitId'])||!_0x487db2['rangeId']||!_0x487db2['config']?!0x1:_0x2d3677[_0x324a21(0x239)](O)[_0x324a21(0x20b)](_0x487db2['unitId'],_0x487db2[_0x324a21(0x203)],_0x487db2[_0x324a21(0x15b)])},I={'id':_0x324a21(0x13a),'type':t[_0x324a21(0x1af)][_0x324a21(0x244)],'handler':(_0x509dfa,_0x2e18c7)=>!(_0x2e18c7!=null&&_0x2e18c7[_0x324a21(0x23c)])||!_0x2e18c7[_0x324a21(0x203)]?!0x1:_0x509dfa[_0x324a21(0x239)](O)['removeFormula'](_0x2e18c7[_0x324a21(0x23c)],_0x2e18c7[_0x324a21(0x203)])},L={'id':_0x324a21(0x181),'type':t['CommandType'][_0x324a21(0x244)],'handler':(_0xadd8c7,_0x15542b)=>!(_0x15542b!=null&&_0x15542b['unitId'])||!_0x15542b[_0x324a21(0x176)]?!0x1:_0xadd8c7[_0x324a21(0x239)](O)[_0x324a21(0x186)](_0x15542b[_0x324a21(0x23c)],_0x15542b[_0x324a21(0x176)])},R={'id':_0x324a21(0x1ad),'type':t[_0x324a21(0x1af)][_0x324a21(0x244)],'handler':(_0x35e8df,_0x5eb625)=>{const _0x32e94b=_0x324a21;if(!(_0x5eb625!=null&&_0x5eb625[_0x32e94b(0x23c)])||!_0x5eb625[_0x32e94b(0x1ce)][_0x32e94b(0x1b2)])return!0x1;let _0x18e372=_0x35e8df['get'](O),_0x10e93c=_0x35e8df['get'](e[_0x32e94b(0x212)]),_0x2f7da6=_0x18e372[_0x32e94b(0x21a)](_0x5eb625[_0x32e94b(0x23c)]);if(!_0x2f7da6)return!0x1;let _0x2b4e09=t[_0x32e94b(0x158)]['deepClone'](_0x2f7da6),_0x13dbcd=!0x1;for(let _0x45dfea of _0x5eb625['updates']){var _0x12796c,_0x51744c,_0x3b78ed,_0x3ba7d3;let _0x25d5e1=_0x2b4e09[_0x32e94b(0x172)][_0x45dfea[_0x32e94b(0x203)]];_0x25d5e1&&_0x25d5e1[_0x32e94b(0x192)]===_0x45dfea[_0x32e94b(0x23b)]&&((_0x12796c=_0x25d5e1[_0x32e94b(0x16b)])==null?void 0x0:_0x12796c[_0x32e94b(0x220)])===_0x45dfea[_0x32e94b(0x25a)]&&_0x10e93c[_0x32e94b(0x196)](_0x5eb625['unitId'])===_0x45dfea['expectedReferenceRevision']&&(((_0x51744c=_0x25d5e1[_0x32e94b(0x1f0)])==null?void 0x0:_0x51744c['v'])!==_0x45dfea['lastValue']['v']||((_0x3b78ed=_0x25d5e1['lastValue'])==null?void 0x0:_0x3b78ed['t'])!==_0x45dfea[_0x32e94b(0x1f0)]['t']||((_0x3ba7d3=_0x25d5e1[_0x32e94b(0x1f0)])==null?void 0x0:_0x3ba7d3[_0x32e94b(0x220)])!==_0x45dfea[_0x32e94b(0x1f0)][_0x32e94b(0x220)])&&(_0x25d5e1[_0x32e94b(0x1f0)]=t[_0x32e94b(0x158)][_0x32e94b(0x1db)](_0x45dfea[_0x32e94b(0x1f0)]),_0x13dbcd=!0x0);}return!_0x13dbcd||_0x18e372[_0x32e94b(0x186)](_0x5eb625[_0x32e94b(0x23c)],_0x2b4e09);}},z={'id':_0x324a21(0x148),'type':t[_0x324a21(0x1af)][_0x324a21(0x23f)],'handler':(_0x12b36f,_0xd65c4b)=>{const _0x544e2b=_0x324a21;if(!(_0xd65c4b!=null&&_0xd65c4b[_0x544e2b(0x192)][_0x544e2b(0x13f)]()))return!0x1;let _0x423a8f=K(_0x12b36f,_0xd65c4b[_0x544e2b(0x23c)],'');if(!_0x423a8f)return!0x1;let _0x11620e=xe(_0xd65c4b[_0x544e2b(0x1eb)],_0x423a8f[_0x544e2b(0x1cb)],be(_0x12b36f,_0x423a8f[_0x544e2b(0x23c)]));if(!_0x11620e)return!0x1;let _0x106c11=Se(_0x12b36f,_0x423a8f[_0x544e2b(0x23c)],_0xd65c4b['formula'],_0xd65c4b[_0x544e2b(0x194)]??[]);if(!_0x106c11)return!0x1;let _0x597992=Ce(_0x423a8f[_0x544e2b(0x1cb)],_0x423a8f[_0x544e2b(0x149)],_0x423a8f[_0x544e2b(0x23c)]),_0x1ca7d9=we({'documentData':_0x423a8f[_0x544e2b(0x200)],'resource':_0x423a8f[_0x544e2b(0x176)],'rangeId':_0x597992,'config':{'formula':_0xd65c4b[_0x544e2b(0x192)],..._0xd65c4b['numberFormat']?{'numberFormat':_0xd65c4b['numberFormat']}:null},'startOffset':_0x11620e['startOffset'],'endOffset':_0x11620e[_0x544e2b(0x1d3)]});if(!_0x1ca7d9)return!0x1;let _0x59f444=(0x0,e[_0x544e2b(0x19e)])(_0x12b36f,_0x423a8f['unitId'],_0x106c11);return!_0x59f444||!q({'accessor':_0x12b36f,'document':_0x423a8f['document'],'unitId':_0x423a8f[_0x544e2b(0x23c)],'trigger':z['id'],'rangeId':_0x597992,'previousResource':_0x423a8f['resource'],'nextResource':_0x1ca7d9[_0x544e2b(0x1b6)],'previousDocumentData':_0x423a8f[_0x544e2b(0x200)],'nextDocumentData':_0x1ca7d9['nextDocumentData'],'cursorOffset':_0x1ca7d9[_0x544e2b(0x17a)],'externalMutations':_0x59f444})?!0x1:{'rangeId':_0x597992,'startOffset':_0x1ca7d9[_0x544e2b(0x17a)]-0x1,'endOffset':_0x1ca7d9['cursorOffset']};}},B={'id':'docs-formula.command.update','type':t[_0x324a21(0x1af)][_0x324a21(0x23f)],'handler':(_0x45a81a,_0x1bf174)=>{const _0x4bf0d2=_0x324a21;if(!(_0x1bf174!=null&&_0x1bf174[_0x4bf0d2(0x203)])||!_0x1bf174[_0x4bf0d2(0x192)][_0x4bf0d2(0x13f)]())return!0x1;let _0x58fc14=K(_0x45a81a,_0x1bf174[_0x4bf0d2(0x23c)],''),_0x4487ca=_0x58fc14==null?void 0x0:_0x58fc14[_0x4bf0d2(0x149)][_0x4bf0d2(0x1e7)](_0x58fc14[_0x4bf0d2(0x23c)],_0x1bf174[_0x4bf0d2(0x203)]),_0x502b61=_0x58fc14?_(_0x58fc14['documentData'][_0x4bf0d2(0x1cb)],_0x1bf174[_0x4bf0d2(0x203)]):void 0x0;if(!_0x58fc14||!_0x4487ca||!_0x502b61)return!0x1;let _0xa63ea3=Se(_0x45a81a,_0x58fc14[_0x4bf0d2(0x23c)],_0x1bf174['formula'],_0x1bf174[_0x4bf0d2(0x194)]??[]);if(!_0xa63ea3)return!0x1;let _0x4418e3=(0x0,e[_0x4bf0d2(0x19e)])(_0x45a81a,_0x58fc14[_0x4bf0d2(0x23c)],_0xa63ea3);if(!_0x4418e3)return!0x1;let _0x2da5fd=je(_0x58fc14['resource']);return _0x2da5fd[_0x4bf0d2(0x172)][_0x1bf174[_0x4bf0d2(0x203)]]={'formula':_0x1bf174[_0x4bf0d2(0x192)],..._0x1bf174[_0x4bf0d2(0x16b)]?{'numberFormat':_0x1bf174[_0x4bf0d2(0x16b)]}:_0x4487ca[_0x4bf0d2(0x16b)]?{'numberFormat':_0x4487ca[_0x4bf0d2(0x16b)]}:null},q({'accessor':_0x45a81a,'document':_0x58fc14[_0x4bf0d2(0x1c8)],'unitId':_0x58fc14[_0x4bf0d2(0x23c)],'trigger':B['id'],'rangeId':_0x1bf174[_0x4bf0d2(0x203)],'previousResource':_0x58fc14[_0x4bf0d2(0x176)],'nextResource':_0x2da5fd,'cursorOffset':_0x502b61[_0x4bf0d2(0x1f2)]+0x1,'externalMutations':_0x4418e3});}},V={'id':'docs-formula.command.set-number-format','type':t[_0x324a21(0x1af)]['COMMAND'],'handler':(_0x256bff,_0x1b3b92)=>{const _0x2848d9=_0x324a21;if(!(_0x1b3b92!=null&&_0x1b3b92[_0x2848d9(0x203)]))return!0x1;let _0x5d47d2=K(_0x256bff,_0x1b3b92['unitId'],''),_0x28f202=_0x5d47d2==null?void 0x0:_0x5d47d2[_0x2848d9(0x149)]['getFormula'](_0x5d47d2[_0x2848d9(0x23c)],_0x1b3b92['rangeId']),_0x5edbd3=_0x5d47d2?_(_0x5d47d2[_0x2848d9(0x200)][_0x2848d9(0x1cb)],_0x1b3b92[_0x2848d9(0x203)]):void 0x0;if(!_0x5d47d2||!_0x28f202||!_0x5edbd3)return!0x1;let _0x2709f1=je(_0x5d47d2['resource']);return _0x2709f1['formulas'][_0x1b3b92[_0x2848d9(0x203)]]={..._0x28f202,..._0x1b3b92[_0x2848d9(0x16b)]?{'numberFormat':_0x1b3b92[_0x2848d9(0x16b)]}:null},_0x1b3b92[_0x2848d9(0x16b)]||delete _0x2709f1['formulas'][_0x1b3b92[_0x2848d9(0x203)]][_0x2848d9(0x16b)],q({'accessor':_0x256bff,'document':_0x5d47d2[_0x2848d9(0x1c8)],'unitId':_0x5d47d2['unitId'],'trigger':V['id'],'rangeId':_0x1b3b92['rangeId'],'previousResource':_0x5d47d2[_0x2848d9(0x176)],'nextResource':_0x2709f1,'cursorOffset':_0x5edbd3[_0x2848d9(0x1f2)]+0x1,'externalMutations':{}});}},H={'id':_0x324a21(0x213),'type':t[_0x324a21(0x1af)][_0x324a21(0x23f)],'handler':(_0x511dc1,_0x82498f)=>G(_0x511dc1,_0x82498f,'',H['id'])},U={'id':_0x324a21(0x249),'type':t[_0x324a21(0x1af)][_0x324a21(0x23f)],'handler':(_0x1238cb,_0x398c40)=>G(_0x1238cb,_0x398c40,(_0x398c40==null?void 0x0:_0x398c40[_0x324a21(0x1de)])??'',U['id'])},W={'id':_0x324a21(0x1fa),'type':t[_0x324a21(0x1af)][_0x324a21(0x23f)],'handler':(_0x41a22f,_0x50dd8b)=>{const _0x7a9c9f=_0x324a21;if(!(_0x50dd8b!=null&&_0x50dd8b['rangeId']))return!0x1;let _0x285f1f=K(_0x41a22f,_0x50dd8b[_0x7a9c9f(0x23c)],'');if(!_0x285f1f)return!0x1;let _0x71f455=_0x41a22f[_0x7a9c9f(0x239)](j)['getResult']({'unitId':_0x285f1f[_0x7a9c9f(0x23c)],'rangeId':_0x50dd8b[_0x7a9c9f(0x203)]});return _0x71f455?G(_0x41a22f,_0x50dd8b,_0x71f455[_0x7a9c9f(0x1de)],W['id']):!0x1;}};function G(_0x2efaed,_0xe51ae9,_0x32eff4,_0x93e369){const _0xc88434=_0x324a21;if(!(_0xe51ae9!=null&&_0xe51ae9[_0xc88434(0x203)]))return!0x1;let _0x36f386=K(_0x2efaed,_0xe51ae9[_0xc88434(0x23c)],'');if(!_0x36f386)return!0x1;let _0x3720c7=h({'documentData':_0x36f386[_0xc88434(0x200)],'resource':_0x36f386[_0xc88434(0x176)],'rangeId':_0xe51ae9[_0xc88434(0x203)],'text':_0x32eff4});return _0x3720c7?q({'accessor':_0x2efaed,'document':_0x36f386[_0xc88434(0x1c8)],'unitId':_0x36f386['unitId'],'trigger':_0x93e369,'rangeId':_0xe51ae9[_0xc88434(0x203)],'previousResource':_0x36f386['resource'],'nextResource':_0x3720c7[_0xc88434(0x1b6)],'previousDocumentData':_0x36f386[_0xc88434(0x200)],'nextDocumentData':_0x3720c7[_0xc88434(0x1fe)],'cursorOffset':_0x3720c7[_0xc88434(0x17a)],'externalMutations':{}}):!0x1;}function K(_0x1ac87e,_0x3b088b,_0x19ed0e){const _0xea1790=_0x324a21;if(_0x19ed0e)return null;let _0x2ce4ac=_0x1ac87e[_0xea1790(0x239)](t[_0xea1790(0x1b4)]),_0x5c8c8f=(_0x3b088b?_0x2ce4ac[_0xea1790(0x24f)](_0x3b088b,t[_0xea1790(0x206)][_0xea1790(0x245)]):_0x2ce4ac[_0xea1790(0x1a2)](t[_0xea1790(0x206)][_0xea1790(0x245)]))??null;if(!_0x5c8c8f)return null;let _0xa2e016=_0x5c8c8f[_0xea1790(0x1b1)](),_0x5c47cb=_0xa2e016['body'];if(_0xa2e016[_0xea1790(0x1a4)]||!_0x5c47cb)return null;let _0x490a50=_0x1ac87e['get'](O);return _0x490a50[_0xea1790(0x141)](_0x5c8c8f[_0xea1790(0x1a6)]())?null:{'document':_0x5c8c8f,'body':_0x5c47cb,'documentData':_0xa2e016,'model':_0x490a50,'resource':_0x490a50[_0xea1790(0x21a)](_0x5c8c8f[_0xea1790(0x1a6)]())??c(),'unitId':_0x5c8c8f[_0xea1790(0x1a6)]()};}function _0x4b6d(){const _0x572864=['redoMutation','IUndoRedoService','_instanceService','complete','document','blockRanges','Inject','body','findDocFormulaRange','accessor','updates','ERROR','removeUnit','trigger','textRuns','endOffset','CustomRangeType','TABLE_CELL_START','values','_isDisposed','_resources','ReplaceDocFormulaWithTextCommand','Document\x20main\x20body\x20is\x20required\x20to\x20insert\x20Doc\x20Formula.','deepClone','entries','_pendingUnitIds','text','symbol','end','452886pmWNIq','_registrations','every','_formulaService','resources','OtherFormulaBizType','getFormula','_resourceManagerService','formulaId','defineProperty','target','TextX','_syncUnit','load','delete','lastValue','InsertDocFormulaCommand','endIndex','object','boolean','registerProvider','_queueSync','default','ConvertDocFormulaToTextCommand','data','docs-formula.command.convert-to-text','success','push','deleteFormula','nextDocumentData','EMPTY','documentData','DocFormulaModel','liveResult','rangeId','version','PARAGRAPH','UniverInstanceType','dispose','BLOCK_START','slice','DOC_SELECTION_OPTION_PRESERVE_CARET','setFormula','_service','params','clear','unregisterUnit','UniverDocsFormulaPlugin','register','HostExternalReferenceModel','docs-formula.command.remove','registerPluginResource','function','resolveFormula','resolveText','parse','_registrationService','getResource','DataStreamTreeTokenType','range','DocFormulaService','pushUndoRedo','DOC','pattern','getParagraphContentStartOffset','sequenceNodesBuilder','shiftInclusiveRangeOnInsert','ICommandService','setConfig','3436655YUeWyn','getInstance','pending','referenceRevision','rangeType','resourceUndo','tables','startOffset','buildRemoveDocFormulaActions','toStringTag','_loadErrors','5947416dxLTAa','paragraphId','kind','customRanges','SECTION_BREAK','decorate','add','setFormulas','get','endsWith','expectedFormula','unitId','UpdateDocFormulaCommand','Plugin','COMMAND','_configService','RegisterOtherFormulaService','TABLE_CELL_END','fromEntries','MUTATION','UNIVER_DOC','7958960BNXsln','dataStream','degradeDocumentData','docs-formula.command.replace-with-text','SetDocFormulaMutation','filter','from','collectFormulaExternalReferenceQualifiers','empty','getUnit','Injector','replaceDocRanges','resolveHostFormulaExternalReferences','map','customBlocks','position','2007918LEGCqa','SetDocFormulaNumberFormatCommand','COLUMN_GROUP_START','_preserveInvalid','expectedNumberFormat','change$','find','getBody','selection','SUCCESS','buildInsertDocFormulaActions','buildUpdateDocFormulaActions','PENDING','serialize','number','_docFormulaModel','has','merge','name','stale','Disposable','generateRandomId','getFormulaValueSync','insert','docs-formula.mutation.remove-formula','_rawResources','toPrimitive','prototype','editOp','trim','onCommandExecuted','getLoadError','_commandService','includes','_setPresentation','collectMutations','externalMutations','_univerInstanceService','docs-formula.command.insert','model','packageName','unitAdded$','identity','4onMQGl','invalid-resource','columnGroups','_presentationChanged$','RichTextEditingMutation','syncUnit','presentationChanged$','docs-formula.config','getOwnPropertyDescriptor','syncExecuteCommand','_config','Tools','getRichTextEditPath','4ukDeSs','config','max','onStarting','sort','assign','_change$','getRegisteredFormulas','notifyTextChanged','_deleteRegistration','assess','source','LexerTreeBuilder','getScalarFormulaResultCell','TABLE_ROW_START','forEach','_hostExternalReferenceModel','numberFormat','TABLE_START','1328535oIRgRJ','univer-docs-formula','keys','shiftExclusiveRangeOnDelete','wholeEntity','formulas','getResult','getCustomRangeInterval','string','resource','start','DocTextResolverService','DocSelectionManagerService','cursorOffset','Subject','unregister','min','resolveFormulaResultPresentation','_cacheEligibilityService','startsWith','docs-formula.mutation.set-resource','cell','_formulaKeys','getTextRanges','877597zlWUjJ','setResource','RemoveDocFormulaCommand','paragraphs','DOC_FORMULA_PLUGIN','disposeWithMe','CUSTOM','customDecorations','FormulaCacheEligibilityService','16ZjwMPi','degradeBody','startIndex','error','formula','isInteger','externalReferences','_injector','getRevision','isArray','sectionBreaks','segmentId','pluginName','subscribe','degradeDocFormulaDocumentData','_model','buildUpsertHostExternalReferenceMutations','eligible','unitDisposed$','IConfigService','getCurrentUnitOfType','shiftInclusiveRangeOnDelete','disabled','isDocFormulaResource','getUnitId','1.5.1','previousDocumentData','Doc\x20Formula\x20range\x20cannot\x20cross\x20document\x20structure\x20boundaries','resourceRedo','createEmptyDocFormulaResource','iterator','docs-formula.mutation.set-last-values','InvalidDocFormulaInsertRangeError','CommandType','documentRedo','getSnapshot','length','insertLength','IUniverInstanceService','UniverDocsPlugin','nextResource','set','stringify','deleteLength','@univerjs-pro/docs-formula','next','getPresentation','getFormulas','type','call','presentation','SetDocFormulaResourceMutation','_syncScheduled','undoMutation'];_0x4b6d=function(){return _0x572864;};return _0x4b6d();}function be(_0x4103f2,_0x418713){const _0x5f304d=_0x324a21;var _0x708464;return(_0x708464=_0x4103f2[_0x5f304d(0x239)](n['DocSelectionManagerService'])[_0x5f304d(0x184)]({'subUnitId':_0x418713,'unitId':_0x418713}))==null?void 0x0:_0x708464[0x0];}function xe(_0x1e794f,_0x4ead21,_0x405eba){const _0x49e375=_0x324a21;if((_0x1e794f==null?void 0x0:_0x1e794f[_0x49e375(0x1be)])==='paragraph'){var _0x36e586;let _0x537e35=((_0x36e586=_0x4ead21[_0x49e375(0x188)])==null?void 0x0:_0x36e586[_0x49e375(0x24b)](_0x1bfb7a=>_0x1bfb7a[_0x49e375(0x232)]===_0x1e794f[_0x49e375(0x232)]))??[];if(_0x537e35[_0x49e375(0x1b2)]!==0x1)return null;let _0x1fff43=_0x537e35[0x0],_0x27fe93=(0x0,t[_0x49e375(0x221)])(_0x4ead21,_0x1fff43),_0x21a97=_0x1fff43['startIndex']-_0x27fe93,_0x82cf6a=_0x1e794f[_0x49e375(0x255)]===_0x49e375(0x1e0)?_0x21a97:_0x1e794f[_0x49e375(0x255)];if(!Number['isInteger'](_0x82cf6a)||_0x82cf6a<0x0||_0x82cf6a>_0x21a97)return null;let _0x51b1fd=_0x27fe93+_0x82cf6a;return{'startOffset':_0x51b1fd,'endOffset':_0x51b1fd};}if((_0x1e794f==null?void 0x0:_0x1e794f['type'])===_0x49e375(0x21c))return!Number[_0x49e375(0x193)](_0x1e794f[_0x49e375(0x22d)])||!Number[_0x49e375(0x193)](_0x1e794f['endOffset'])?null:{'startOffset':Math['min'](_0x1e794f[_0x49e375(0x22d)],_0x1e794f[_0x49e375(0x1d3)]),'endOffset':Math[_0x49e375(0x15c)](_0x1e794f[_0x49e375(0x22d)],_0x1e794f[_0x49e375(0x1d3)])};let _0x4d8426=(_0x1e794f==null?void 0x0:_0x1e794f[_0x49e375(0x1be)])===_0x49e375(0x12a)?_0x1e794f[_0x49e375(0x12a)]:_0x405eba;return!_0x4d8426||_0x4d8426['segmentId']?null:{'startOffset':Math['min'](_0x4d8426[_0x49e375(0x22d)],_0x4d8426[_0x49e375(0x1d3)]),'endOffset':Math[_0x49e375(0x15c)](_0x4d8426['startOffset'],_0x4d8426[_0x49e375(0x1d3)])};}function Se(_0x39cb97,_0x201341,_0x2f3bb4,_0x32704d){const _0x234f2b=_0x324a21;let _0x54860f=_0x39cb97['get'](r[_0x234f2b(0x166)]),_0x4c7016=_0x2f3bb4[_0x234f2b(0x180)]('=')?_0x2f3bb4[_0x234f2b(0x209)](0x1):_0x2f3bb4,_0x8130fc=_0x54860f[_0x234f2b(0x222)](_0x4c7016);if(!_0x8130fc)return null;let _0x1a1e29=_0x39cb97['get'](e[_0x234f2b(0x212)]),_0x345e93=(0x0,e[_0x234f2b(0x252)])({'qualifiers':(0x0,e[_0x234f2b(0x24d)])(_0x8130fc),'explicitReferences':_0x32704d??[],'resolveBinding':_0x22c552=>_0x1a1e29['resolveBinding'](_0x201341,_0x22c552)});return _0x345e93['status']==='resolved'?_0x345e93['references']:null;}function Ce(_0x89dc6a,_0x52da9b,_0x1723db){const _0x1bc332=_0x324a21;var _0x4aebd2;let _0x9e699e=(0x0,t[_0x1bc332(0x137)])(0x6);for(;_0x89dc6a!=null&&(_0x4aebd2=_0x89dc6a[_0x1bc332(0x234)])!=null&&_0x4aebd2['some'](_0x35bf04=>_0x35bf04[_0x1bc332(0x203)]===_0x9e699e)||_0x52da9b['getFormula'](_0x1723db,_0x9e699e);)_0x9e699e=(0x0,t[_0x1bc332(0x137)])(0x6);return _0x9e699e;}function we(_0x120aa9){try{return te(_0x120aa9);}catch(_0x332ad3){if(_0x332ad3 instanceof m)return null;throw _0x332ad3;}}function Te(_0x6b9c62){const _0x31613b=_0x324a21;let _0x225f29=_0x6b9c62['previousDocumentData']&&_0x6b9c62[_0x31613b(0x1fe)]?De(_0x6b9c62[_0x31613b(0x1c8)],_0x6b9c62[_0x31613b(0x23c)],_0x6b9c62[_0x31613b(0x1a8)],_0x6b9c62[_0x31613b(0x1fe)],_0x6b9c62['cursorOffset'],_0x6b9c62[_0x31613b(0x1d1)]):null;return _0x6b9c62[_0x31613b(0x1a8)]&&_0x6b9c62[_0x31613b(0x1fe)]&&!_0x225f29?null:{'documentRedo':_0x225f29,'resourceRedo':{'id':L['id'],'params':{'unitId':_0x6b9c62['unitId'],'resource':_0x6b9c62[_0x31613b(0x1b6)]}},'resourceUndo':{'id':L['id'],'params':{'unitId':_0x6b9c62[_0x31613b(0x23c)],'resource':_0x6b9c62['previousResource']}}};}function Ee(_0x5d3016,_0xc36122,_0x109432,_0x37e737){const _0x32ebcb=_0x324a21;_0x37e737[_0x32ebcb(0x21e)]({'id':_0x5d3016[_0x32ebcb(0x1d1)]+':'+_0x5d3016[_0x32ebcb(0x203)],'unitID':_0x5d3016[_0x32ebcb(0x23c)],'redoMutations':[..._0x5d3016[_0x32ebcb(0x146)]['redoMutation']?[_0x5d3016['externalMutations']['redoMutation']]:[],..._0xc36122[_0x32ebcb(0x1b0)]?[_0xc36122[_0x32ebcb(0x1b0)]]:[],_0xc36122[_0x32ebcb(0x1aa)]],'undoMutations':[_0xc36122[_0x32ebcb(0x22b)],..._0x109432?[_0x109432]:[],..._0x5d3016['externalMutations'][_0x32ebcb(0x1c3)]?[_0x5d3016[_0x32ebcb(0x146)][_0x32ebcb(0x1c3)]]:[]]});}function q(_0x5b61e8){const _0xd60fb0=_0x324a21;let _0x4cb32b=_0x5b61e8[_0xd60fb0(0x1cd)]['get'](t[_0xd60fb0(0x224)]),_0x495cee=_0x5b61e8[_0xd60fb0(0x1cd)][_0xd60fb0(0x239)](t[_0xd60fb0(0x1c5)]),_0x4963f9=_0x5b61e8[_0xd60fb0(0x1cd)][_0xd60fb0(0x239)](n[_0xd60fb0(0x179)]),_0x49740c=Te(_0x5b61e8);if(!_0x49740c)return!0x1;let _0x75e22f=!0x1,_0x49b6fe=null,_0x831854=!0x1;try{if(_0x5b61e8['externalMutations'][_0xd60fb0(0x1c4)]){if(!_0x4cb32b[_0xd60fb0(0x156)](_0x5b61e8['externalMutations'][_0xd60fb0(0x1c4)]['id'],_0x5b61e8[_0xd60fb0(0x146)]['redoMutation'][_0xd60fb0(0x20d)]))return!0x1;_0x75e22f=!0x0;}if(_0x49740c[_0xd60fb0(0x1b0)]){let _0xacfa11=_0x4cb32b[_0xd60fb0(0x156)](_0x49740c[_0xd60fb0(0x1b0)]['id'],_0x49740c[_0xd60fb0(0x1b0)][_0xd60fb0(0x20d)]);if(!_0xacfa11)return J(_0x4cb32b,_0x5b61e8[_0xd60fb0(0x146)],_0x75e22f),!0x1;_0x49b6fe={'id':n[_0xd60fb0(0x151)]['id'],'params':{..._0xacfa11,'noHistory':!0x0,'noNeedSetTextRange':!0x0,'segmentId':''}};}if(!_0x4cb32b[_0xd60fb0(0x156)](_0x49740c[_0xd60fb0(0x1aa)]['id'],_0x49740c[_0xd60fb0(0x1aa)][_0xd60fb0(0x20d)]))return Oe(_0x4cb32b,_0x49b6fe),J(_0x4cb32b,_0x5b61e8[_0xd60fb0(0x146)],_0x75e22f),!0x1;_0x831854=!0x0,Ee(_0x5b61e8,_0x49740c,_0x49b6fe,_0x495cee);}catch(_0x4bdc4f){throw _0x831854&&_0x4cb32b[_0xd60fb0(0x156)](_0x49740c[_0xd60fb0(0x22b)]['id'],_0x49740c[_0xd60fb0(0x22b)][_0xd60fb0(0x20d)]),Oe(_0x4cb32b,_0x49b6fe),J(_0x4cb32b,_0x5b61e8[_0xd60fb0(0x146)],_0x75e22f),_0x4bdc4f;}return _0x4963f9[_0xd60fb0(0x251)]([{'startOffset':_0x5b61e8[_0xd60fb0(0x17a)],'endOffset':_0x5b61e8['cursorOffset'],'segmentId':''}],{'unitId':_0x5b61e8[_0xd60fb0(0x23c)],'subUnitId':_0x5b61e8[_0xd60fb0(0x23c)]},!0x1,{[n[_0xd60fb0(0x20a)]]:!0x0}),!0x0;}function De(_0x27551f,_0x2a02ce,_0x5bfaa6,_0x2a6c64,_0x324bcd,_0x326f85){const _0x486c30=_0x324a21;let _0x50192c=ke(_0x5bfaa6,_0x2a6c64,(0x0,t[_0x486c30(0x159)])(_0x27551f,''));return _0x50192c?{'id':n[_0x486c30(0x151)]['id'],'params':{'unitId':_0x2a02ce,'actions':_0x50192c,'segmentId':'','textRanges':[{'startOffset':_0x324bcd,'endOffset':_0x324bcd,'collapsed':!0x0,'segmentId':''}],'isEditing':!0x1,'noHistory':!0x0,'noNeedSetTextRange':!0x0,'trigger':_0x326f85}}:null;}function Oe(_0x25bfc6,_0xdf905e){const _0x24e08a=_0x324a21;_0xdf905e&&_0x25bfc6[_0x24e08a(0x156)](_0xdf905e['id'],_0xdf905e[_0x24e08a(0x20d)]);}function J(_0x2a5f12,_0x30aff5,_0x1a5bb9){const _0x41976=_0x324a21;_0x1a5bb9&&_0x30aff5[_0x41976(0x1c3)]&&_0x2a5f12[_0x41976(0x156)](_0x30aff5[_0x41976(0x1c3)]['id'],_0x30aff5['undoMutation'][_0x41976(0x20d)]);}function ke(_0x4bbfcb,_0x371823,_0x32845a){const _0x219069=_0x324a21;let _0x49a28a=_0x4bbfcb[_0x219069(0x1cb)],_0x31105d=_0x371823[_0x219069(0x1cb)],_0x4dc9b6=Ae(_0x49a28a==null?void 0x0:_0x49a28a['dataStream'],_0x31105d==null?void 0x0:_0x31105d[_0x219069(0x247)]);if(!_0x4dc9b6||!_0x31105d)return null;let _0xa3c99e=new t[(_0x219069(0x1ec))]();return _0xa3c99e['retain'](_0x4dc9b6[_0x219069(0x177)]),_0x4dc9b6[_0x219069(0x1b3)]>0x0&&_0xa3c99e[_0x219069(0x139)](_0x4dc9b6[_0x219069(0x1b3)],(0x0,t['getBodySliceForTextXAction'])(_0x31105d,_0x4dc9b6[_0x219069(0x177)],_0x4dc9b6[_0x219069(0x177)]+_0x4dc9b6[_0x219069(0x1b3)],!0x1)),_0x4dc9b6[_0x219069(0x1b9)]>0x0&&_0xa3c99e[_0x219069(0x1ef)](_0x4dc9b6[_0x219069(0x1b9)]),t['JSONX'][_0x219069(0x227)]()[_0x219069(0x13e)](_0xa3c99e[_0x219069(0x12f)](),_0x32845a);}function Ae(_0x50eee6,_0x18105a){const _0x40a2d2=_0x324a21;if(_0x50eee6==null||_0x18105a==null||_0x50eee6===_0x18105a)return null;let _0x42b199=0x0;for(;_0x42b199<_0x50eee6[_0x40a2d2(0x1b2)]&&_0x42b199<_0x18105a[_0x40a2d2(0x1b2)]&&_0x50eee6[_0x42b199]===_0x18105a[_0x42b199];)_0x42b199+=0x1;let _0x13472b=_0x50eee6[_0x40a2d2(0x1b2)],_0x45642b=_0x18105a[_0x40a2d2(0x1b2)];for(;_0x13472b>_0x42b199&&_0x45642b>_0x42b199&&_0x50eee6[_0x13472b-0x1]===_0x18105a[_0x45642b-0x1];)--_0x13472b,--_0x45642b;return{'start':_0x42b199,'deleteLength':_0x13472b-_0x42b199,'insertLength':_0x45642b-_0x42b199};}function je(_0x1e8965){const _0x5091dd=_0x324a21;return{'formulas':Object[_0x5091dd(0x243)](Object[_0x5091dd(0x1dc)](_0x1e8965[_0x5091dd(0x172)])[_0x5091dd(0x253)](([_0x5b6472,_0x2dac84])=>[_0x5b6472,{..._0x2dac84,..._0x2dac84[_0x5091dd(0x16b)]?{'numberFormat':{..._0x2dac84[_0x5091dd(0x16b)]}}:null,..._0x2dac84[_0x5091dd(0x1f0)]?{'lastValue':{..._0x2dac84[_0x5091dd(0x1f0)]}}:null}]))};}let Y=class extends t['Disposable']{constructor(_0x3d32be,_0x143e84,_0x22a6a5,_0x1b0b3e){const _0x124b3a=_0x324a21;super(),this['_instanceService']=_0x3d32be,this[_0x124b3a(0x142)]=_0x143e84,this[_0x124b3a(0x19d)]=_0x22a6a5,this[_0x124b3a(0x20c)]=_0x1b0b3e,D(this,_0x124b3a(0x1dd),new Set()),D(this,_0x124b3a(0x1c2),!0x1),D(this,_0x124b3a(0x1d7),!0x1),this[_0x124b3a(0x1c6)]['getAllUnitsForType'](t['UniverInstanceType']['UNIVER_DOC'])[_0x124b3a(0x169)](_0xaee7d5=>this[_0x124b3a(0x20c)][_0x124b3a(0x152)](_0xaee7d5)),this['disposeWithMe'](this[_0x124b3a(0x19d)]['change$']['subscribe'](({unitId:_0x410f7e})=>this[_0x124b3a(0x1ed)](_0x410f7e))),this[_0x124b3a(0x18a)](this[_0x124b3a(0x1c6)][_0x124b3a(0x14b)][_0x124b3a(0x19b)](({unit:_0x53043e})=>{const _0x595099=_0x124b3a;_0x53043e[_0x595099(0x1be)]===t[_0x595099(0x206)][_0x595099(0x245)]&&this[_0x595099(0x1f6)](_0x53043e[_0x595099(0x1a6)]());})),this[_0x124b3a(0x18a)](this[_0x124b3a(0x1c6)][_0x124b3a(0x1a0)][_0x124b3a(0x19b)](_0x1cdb18=>{const _0x3c421e=_0x124b3a;this[_0x3c421e(0x20c)][_0x3c421e(0x20f)](_0x1cdb18['getUnitId']());})),this[_0x124b3a(0x18a)](this[_0x124b3a(0x142)][_0x124b3a(0x140)](_0x2ebd55=>{const _0x468900=_0x124b3a;if(_0x2ebd55['id']===n['RichTextEditingMutation']['id']&&Me(_0x2ebd55[_0x468900(0x20d)])){let _0x6ce039=_0x2ebd55[_0x468900(0x20d)];_0x6ce039[_0x468900(0x199)]||this[_0x468900(0x1ed)](_0x6ce039[_0x468900(0x23c)]);}}));}['dispose'](){const _0x1902b9=_0x324a21;this[_0x1902b9(0x1d7)]=!0x0,super['dispose']();}[_0x324a21(0x1f6)](_0x594cbd){const _0x2ccbc7=_0x324a21;this[_0x2ccbc7(0x1dd)][_0x2ccbc7(0x237)](_0x594cbd),this[_0x2ccbc7(0x1c2)]||(this[_0x2ccbc7(0x1c2)]=!0x0,queueMicrotask(()=>{const _0x306cae=_0x2ccbc7;if(this[_0x306cae(0x1c2)]=!0x1,this['_isDisposed'])return;let _0x395bfb=Array[_0x306cae(0x24c)](this[_0x306cae(0x1dd)]);this[_0x306cae(0x1dd)][_0x306cae(0x20e)](),_0x395bfb[_0x306cae(0x169)](_0x34f441=>this[_0x306cae(0x1ed)](_0x34f441));}));}[_0x324a21(0x1ed)](_0x438619){const _0x18a9fc=_0x324a21;let _0x4df32c=this['_instanceService'][_0x18a9fc(0x24f)](_0x438619,t[_0x18a9fc(0x206)]['UNIVER_DOC']);_0x4df32c&&this[_0x18a9fc(0x20c)]['syncUnit'](_0x4df32c);}};Y=A([k(0x0,t[_0x324a21(0x1b4)]),k(0x1,t['ICommandService']),k(0x2,(0x0,t['Inject'])(O)),k(0x3,(0x0,t['Inject'])(j))],Y);function Me(_0x570982){const _0x41ce02=_0x324a21;return typeof _0x570982==_0x41ce02(0x1f3)&&!!_0x570982&&_0x41ce02(0x23c)in _0x570982&&typeof _0x570982[_0x41ce02(0x23c)]==_0x41ce02(0x175)&&(!(_0x41ce02(0x199)in _0x570982)||_0x570982[_0x41ce02(0x199)]===void 0x0||typeof _0x570982[_0x41ce02(0x199)]==_0x41ce02(0x175));}let X=class extends t['Disposable']{constructor(_0x5b1dc7,_0x36fc05){const _0x340a07=_0x324a21;super(),this[_0x340a07(0x1e8)]=_0x5b1dc7,this[_0x340a07(0x131)]=_0x36fc05,this[_0x340a07(0x18a)](this[_0x340a07(0x1e8)][_0x340a07(0x214)]({'pluginName':o,'businesses':[t[_0x340a07(0x206)][_0x340a07(0x245)]],'toJson':_0x5ce79b=>JSON[_0x340a07(0x1b8)](this['_docFormulaModel'][_0x340a07(0x12f)](_0x5ce79b)),'parseJson':_0x53ae85=>JSON[_0x340a07(0x218)](_0x53ae85),'onLoad':(_0x1d110c,_0x31feb0)=>{const _0x3bead0=_0x340a07;this[_0x3bead0(0x131)][_0x3bead0(0x1ee)](_0x1d110c,_0x31feb0);},'onUnLoad':_0x16dc6f=>this[_0x340a07(0x131)][_0x340a07(0x1d0)](_0x16dc6f)}));}};X=A([k(0x0,t['IResourceManagerService']),k(0x1,(0x0,t[_0x324a21(0x1ca)])(O))],X);var Ne=_0x324a21(0x1ba),Pe=_0x324a21(0x1a7);const Fe={};let Z=class extends t['Disposable']{constructor(_0x150ef8,_0xab4c54,_0x220a11){const _0x2a7163=_0x324a21;super(),this[_0x2a7163(0x147)]=_0x150ef8,this[_0x2a7163(0x1e4)]=_0xab4c54,this['disposeWithMe'](_0x220a11['register']({'resolve':(_0x2bddfe,_0x1b2957)=>{const _0x121169=_0x2a7163;var _0x561a4b;return((_0x561a4b=_0x1b2957['customRanges'])==null?void 0x0:_0x561a4b[_0x121169(0x24b)](g)[_0x121169(0x253)](_0x3e0b44=>({'startOffset':_0x3e0b44[_0x121169(0x190)],'endOffset':_0x3e0b44[_0x121169(0x1f2)]+0x1,'text':this[_0x121169(0x216)](_0x2bddfe,_0x3e0b44[_0x121169(0x203)])})))??[];}})),this[_0x2a7163(0x18a)](this['_formulaService'][_0x2a7163(0x153)][_0x2a7163(0x19b)](({unitId:_0x2a64b9})=>{const _0x3b4d1f=_0x2a7163;_0x220a11[_0x3b4d1f(0x162)](_0x2a64b9);}));}[_0x324a21(0x216)](_0x4c7eff,_0x24919b){const _0x35da39=_0x324a21;var _0x1cc268;return((_0x1cc268=this[_0x35da39(0x1e4)][_0x35da39(0x173)]({'unitId':_0x4c7eff,'rangeId':_0x24919b}))==null?void 0x0:_0x1cc268[_0x35da39(0x1de)])??'';}[_0x324a21(0x217)](_0x45e871,_0xc53716,_0x3a6b6e){const _0x158bdc=_0x324a21;var _0x53f3f2;let _0x511fe1=this[_0x158bdc(0x147)][_0x158bdc(0x24f)](_0x45e871,t[_0x158bdc(0x206)]['UNIVER_DOC']),_0x45c27d=_0x511fe1==null?void 0x0:_0x511fe1[_0x158bdc(0x129)]();if(!_0x45c27d)return'';let _0x513094=_0x45c27d['dataStream'][_0x158bdc(0x209)](_0xc53716,_0x3a6b6e),_0x15dd9f=((_0x53f3f2=_0x45c27d[_0x158bdc(0x234)])==null?void 0x0:_0x53f3f2['filter'](_0x485c37=>g(_0x485c37)&&_0x485c37[_0x158bdc(0x190)]>=_0xc53716&&_0x485c37['endIndex']<_0x3a6b6e)[_0x158bdc(0x15e)]((_0x329f1b,_0x525329)=>_0x525329[_0x158bdc(0x190)]-_0x329f1b[_0x158bdc(0x190)]))??[];for(let _0x1c4780 of _0x15dd9f){let _0x1655e4=_0x1c4780['startIndex']-_0xc53716,_0x6af0bb=_0x1c4780['endIndex']-_0xc53716+0x1;_0x513094=''+_0x513094[_0x158bdc(0x209)](0x0,_0x1655e4)+this[_0x158bdc(0x216)](_0x45e871,_0x1c4780[_0x158bdc(0x203)])+_0x513094[_0x158bdc(0x209)](_0x6af0bb);}return _0x513094;}[_0x324a21(0x248)](_0x25eb88){return Ie(_0x25eb88);}[_0x324a21(0x18f)](_0x662dc7,_0x571268,_0x4dd9e0={}){const _0x4ca689=_0x324a21;var _0x4a8f5b;return re({'id':_0x662dc7,'body':_0x571268,'documentStyle':{}},(((_0x4a8f5b=_0x571268['customRanges'])==null?void 0x0:_0x4a8f5b[_0x4ca689(0x24b)](g))??[])[_0x4ca689(0x253)](_0x2ef99f=>({'rangeId':_0x2ef99f[_0x4ca689(0x203)],'text':_0x4dd9e0[_0x2ef99f[_0x4ca689(0x203)]]??this['resolveFormula'](_0x662dc7,_0x2ef99f['rangeId'])})))[_0x4ca689(0x1cb)]??{'dataStream':''};}};Z=A([k(0x0,t['IUniverInstanceService']),k(0x1,(0x0,t[_0x324a21(0x1ca)])(j)),k(0x2,(0x0,t[_0x324a21(0x1ca)])(n[_0x324a21(0x178)]))],Z);function Ie(_0x123014){const _0x1e33db=_0x324a21;var _0x3be8a3,_0x7b745a;let _0x3c76fe=Le(_0x123014),_0x3979ff=re(_0x123014,(((_0x3be8a3=_0x123014[_0x1e33db(0x1cb)])==null||(_0x3be8a3=_0x3be8a3[_0x1e33db(0x234)])==null?void 0x0:_0x3be8a3[_0x1e33db(0x24b)](g))??[])[_0x1e33db(0x253)](_0x33e74b=>({'rangeId':_0x33e74b[_0x1e33db(0x203)],'text':Re(_0x3c76fe==null?void 0x0:_0x3c76fe[_0x1e33db(0x172)][_0x33e74b[_0x1e33db(0x203)]])})));return _0x3979ff[_0x1e33db(0x1e5)]=(_0x7b745a=_0x3979ff[_0x1e33db(0x1e5)])==null?void 0x0:_0x7b745a['filter'](_0x23ba74=>_0x23ba74[_0x1e33db(0x134)]!==o),_0x3979ff;}function Le(_0x3aef49){const _0x44f891=_0x324a21;var _0x505a44;let _0x2ef259=(_0x505a44=_0x3aef49[_0x44f891(0x1e5)])==null||(_0x505a44=_0x505a44[_0x44f891(0x25c)](_0x35571e=>_0x35571e['name']===_0x44f891(0x189)))==null?void 0x0:_0x505a44[_0x44f891(0x1f9)];if(_0x2ef259)try{let _0x18c853=JSON[_0x44f891(0x218)](_0x2ef259);return l(_0x18c853)?_0x18c853:void 0x0;}catch{return;}}function Re(_0x1f06c2){const _0x5e68e7=_0x324a21;return _0x1f06c2?(0x0,e[_0x5e68e7(0x17e)])({'lastValue':_0x1f06c2[_0x5e68e7(0x1f0)],'numberFormat':_0x1f06c2['numberFormat']})['text']:'';}let Q=class extends t[_0x324a21(0x136)]{constructor(_0x1c591a,_0x10a274,_0x448fb2){const _0x288d9f=_0x324a21;super(),this[_0x288d9f(0x1e4)]=_0x1c591a,this[_0x288d9f(0x17f)]=_0x10a274,this[_0x288d9f(0x18a)](_0x448fb2[_0x288d9f(0x1f5)](this));}[_0x324a21(0x145)](_0x56ef11){const _0x192e57=_0x324a21;let _0x494cbe=new Map();for(let _0x8cdaa8 of this[_0x192e57(0x1e4)][_0x192e57(0x161)]()){var _0x2ae4f8;if(!this['_cacheEligibilityService'][_0x192e57(0x164)](_0x8cdaa8[_0x192e57(0x15b)]['formula'],_0x8cdaa8[_0x192e57(0x202)])[_0x192e57(0x19f)])continue;let _0x1ea051=(0x0,e[_0x192e57(0x167)])(_0x8cdaa8[_0x192e57(0x202)]),_0x40c219=_0x1ea051?(0x0,e['toFormulaLastValue'])(_0x1ea051):null;if(!_0x40c219||ze(_0x8cdaa8['config'][_0x192e57(0x1f0)],_0x40c219))continue;let _0x1d4336=_0x494cbe['get'](_0x8cdaa8[_0x192e57(0x14c)][_0x192e57(0x23c)])??[];_0x1d4336[_0x192e57(0x1fc)]({'rangeId':_0x8cdaa8[_0x192e57(0x14c)][_0x192e57(0x203)],'expectedFormula':_0x8cdaa8[_0x192e57(0x15b)][_0x192e57(0x192)],'expectedNumberFormat':(_0x2ae4f8=_0x8cdaa8[_0x192e57(0x15b)][_0x192e57(0x16b)])==null?void 0x0:_0x2ae4f8['pattern'],'expectedReferenceRevision':_0x8cdaa8[_0x192e57(0x229)],'lastValue':_0x40c219}),_0x494cbe[_0x192e57(0x1b7)](_0x8cdaa8['identity'][_0x192e57(0x23c)],_0x1d4336);}return Array[_0x192e57(0x24c)](_0x494cbe,([_0x3ff49a,_0x147f6b])=>({'id':R['id'],'params':{'unitId':_0x3ff49a,'updates':_0x147f6b}}));}};Q=A([k(0x0,(0x0,t[_0x324a21(0x1ca)])(j)),k(0x1,(0x0,t['Inject'])(e[_0x324a21(0x18d)])),k(0x2,(0x0,t['Inject'])(e['FormulaLastValuePersistenceService']))],Q);function ze(_0x52569c,_0x4ea10c){const _0x470f44=_0x324a21;return(_0x52569c==null?void 0x0:_0x52569c['v'])===_0x4ea10c['v']&&(_0x52569c==null?void 0x0:_0x52569c['t'])===_0x4ea10c['t']&&(_0x52569c==null?void 0x0:_0x52569c[_0x470f44(0x220)])===_0x4ea10c['pattern'];}let $=class extends t[_0x324a21(0x23e)]{constructor(_0x3a9725=Fe,_0x28f9a4,_0x531121,_0x4dc356){const _0xd01f34=_0x324a21;super(),this[_0xd01f34(0x157)]=_0x3a9725,this[_0xd01f34(0x195)]=_0x28f9a4,this['_commandService']=_0x531121,this[_0xd01f34(0x240)]=_0x4dc356;let {..._0x44923f}=(0x0,t[_0xd01f34(0x133)])({},Fe,this['_config']);this[_0xd01f34(0x240)][_0xd01f34(0x225)](_0xd01f34(0x154),_0x44923f);}[_0x324a21(0x15d)](){const _0x538be2=_0x324a21;this[_0x538be2(0x195)]['add']([O]),this['_injector'][_0x538be2(0x237)]([j]),this[_0x538be2(0x195)][_0x538be2(0x237)]([X]),this[_0x538be2(0x195)]['add']([Y]),this[_0x538be2(0x195)][_0x538be2(0x237)]([Q]),this[_0x538be2(0x195)][_0x538be2(0x237)]([Z]),(0x0,t['touchDependencies'])(this[_0x538be2(0x195)],[[O],[X],[Y],[Q],[Z]]),[F,I,L,R,z,B,V,H,U,W][_0x538be2(0x169)](_0x5c5a38=>this[_0x538be2(0x18a)](this[_0x538be2(0x142)]['registerCommand'](_0x5c5a38)));}};D($,_0x324a21(0x19a),o),D($,_0x324a21(0x14a),Ne),D($,_0x324a21(0x204),Pe),D($,'type',t[_0x324a21(0x206)][_0x324a21(0x245)]),$=A([(0x0,t['DependentOn'])(a['UniverLicensePlugin'],e['UniverProFormulaEnginePlugin'],n[_0x324a21(0x1b5)]),k(0x1,(0x0,t['Inject'])(t[_0x324a21(0x250)])),k(0x2,t[_0x324a21(0x224)]),k(0x3,t[_0x324a21(0x1a1)])],$),exports[_0x324a21(0x1f8)]=W,exports['DOC_FORMULA_CUSTOM_RANGE_KIND']=s,exports['DOC_FORMULA_OBJECT_REPLACEMENT']='',exports[_0x324a21(0x189)]=o,Object[_0x324a21(0x1ea)](exports,'DocFormulaDisplayTextService',{'enumerable':!0x0,'get':function(){return Z;}}),Object[_0x324a21(0x1ea)](exports,'DocFormulaLifecycleController',{'enumerable':!0x0,'get':function(){return Y;}}),exports[_0x324a21(0x201)]=O,Object[_0x324a21(0x1ea)](exports,'DocFormulaResourceController',{'enumerable':!0x0,'get':function(){return X;}}),exports['DocFormulaResultStatus']=ve,Object[_0x324a21(0x1ea)](exports,_0x324a21(0x21d),{'enumerable':!0x0,'get':function(){return j;}}),exports[_0x324a21(0x1f1)]=z,exports[_0x324a21(0x1ae)]=m,exports[_0x324a21(0x187)]=H,exports['RemoveDocFormulaMutation']=I,exports[_0x324a21(0x1d9)]=U,exports['SetDocFormulaLastValuesMutation']=R,exports[_0x324a21(0x24a)]=F,exports[_0x324a21(0x257)]=V,exports[_0x324a21(0x1c1)]=L,Object['defineProperty'](exports,_0x324a21(0x210),{'enumerable':!0x0,'get':function(){return $;}}),exports[_0x324a21(0x23d)]=B,exports['assertSafeDocFormulaInsertRange']=ie,exports[_0x324a21(0x12c)]=te,exports[_0x324a21(0x22e)]=h,exports[_0x324a21(0x12d)]=ne,exports[_0x324a21(0x1ab)]=c,exports[_0x324a21(0x19c)]=Ie,exports[_0x324a21(0x1cc)]=_,exports['isDocFormulaConfig']=u,exports['isDocFormulaRange']=g,exports[_0x324a21(0x1a5)]=l,exports['isFormulaLastValue']=d;
package/lib/es/facade.js CHANGED
@@ -1 +1 @@
1
- var _0x20d659=_0xb20e;(function(_0x14e544,_0x219eb4){var _0x3091fd=_0xb20e,_0x45f06e=_0x14e544();while(!![]){try{var _0x130610=parseInt(_0x3091fd(0x163))/0x1+-parseInt(_0x3091fd(0x172))/0x2+-parseInt(_0x3091fd(0x187))/0x3*(-parseInt(_0x3091fd(0x16f))/0x4)+parseInt(_0x3091fd(0x17c))/0x5*(-parseInt(_0x3091fd(0x181))/0x6)+parseInt(_0x3091fd(0x14a))/0x7*(-parseInt(_0x3091fd(0x183))/0x8)+-parseInt(_0x3091fd(0x152))/0x9*(parseInt(_0x3091fd(0x176))/0xa)+parseInt(_0x3091fd(0x18c))/0xb;if(_0x130610===_0x219eb4)break;else _0x45f06e['push'](_0x45f06e['shift']());}catch(_0x45ee2a){_0x45f06e['push'](_0x45f06e['shift']());}}}(_0x5f3d,0x52a74));import{ConvertDocFormulaToTextCommand as _0x4caa07,DocFormulaDisplayTextService as _0x1d4bd8,DocFormulaModel as _0x189be6,DocFormulaService as _0x31512b,InsertDocFormulaCommand as _0x31330d,RemoveDocFormulaCommand as _0x1a9573,ReplaceDocFormulaWithTextCommand as _0x4c9eaf,SetDocFormulaNumberFormatCommand as _0x375602,UpdateDocFormulaCommand as _0xd65571,isDocFormulaRange as _0x16147b}from'@univerjs-pro/docs-formula';import{ICommandService as _0x4c28f3,IResourceLoaderService as _0x5b8a61,IUniverInstanceService as _0x4bd504,Inject as _0x46f8a8,UniverInstanceType as _0x419927}from'@univerjs/core';import{FDocument as _0x43ca7f,FDocumentParagraph as _0x57efe3,FDocumentTextRange as _0x19ea5f}from'@univerjs/docs/facade';function v(_0x2a4c99,_0x178377){return function(_0x3a9876,_0x30bcb2){_0x178377(_0x3a9876,_0x30bcb2,_0x2a4c99);};}function y(_0x55f846,_0x3aec45,_0x4b77af,_0x810172){var _0x104fd8=_0xb20e,_0x33662c=arguments[_0x104fd8(0x192)],_0x36fe5c=_0x33662c<0x3?_0x3aec45:_0x810172===null?_0x810172=Object[_0x104fd8(0x190)](_0x3aec45,_0x4b77af):_0x810172,_0x3127c7;if(typeof Reflect==_0x104fd8(0x150)&&typeof Reflect[_0x104fd8(0x151)]==_0x104fd8(0x185))_0x36fe5c=Reflect['decorate'](_0x55f846,_0x3aec45,_0x4b77af,_0x810172);else{for(var _0x3d1fba=_0x55f846[_0x104fd8(0x192)]-0x1;_0x3d1fba>=0x0;_0x3d1fba--)(_0x3127c7=_0x55f846[_0x3d1fba])&&(_0x36fe5c=(_0x33662c<0x3?_0x3127c7(_0x36fe5c):_0x33662c>0x3?_0x3127c7(_0x3aec45,_0x4b77af,_0x36fe5c):_0x3127c7(_0x3aec45,_0x4b77af))||_0x36fe5c);}return _0x33662c>0x3&&_0x36fe5c&&Object[_0x104fd8(0x197)](_0x3aec45,_0x4b77af,_0x36fe5c),_0x36fe5c;}let b=class{constructor(_0x4476eb,_0x2bf561,_0x616419,_0x3a9f10,_0x1c3f7e,_0x299373){var _0x29f7de=_0xb20e;this[_0x29f7de(0x18b)]=_0x4476eb,this[_0x29f7de(0x15b)]=_0x2bf561,this[_0x29f7de(0x156)]=_0x616419,this[_0x29f7de(0x154)]=_0x3a9f10,this[_0x29f7de(0x18e)]=_0x1c3f7e,this[_0x29f7de(0x169)]=_0x299373;}['getId'](){return this['_rangeId'];}[_0x20d659(0x184)](){var _0x3adf4b=_0x20d659;let _0x24b999=this[_0x3adf4b(0x155)]();return _0x24b999?{'endOffset':_0x24b999[_0x3adf4b(0x16a)]+0x1,'rangeId':_0x24b999[_0x3adf4b(0x16c)],'startOffset':_0x24b999['startIndex']}:null;}[_0x20d659(0x189)](){var _0x36ef22=_0x20d659,_0xdd72e7;return((_0xdd72e7=this['_model'][_0x36ef22(0x189)](this[_0x36ef22(0x18b)],this[_0x36ef22(0x15b)]))==null?void 0x0:_0xdd72e7['formula'])??'';}[_0x20d659(0x193)](){var _0x24f05f=_0x20d659;return this[_0x24f05f(0x154)][_0x24f05f(0x189)](this[_0x24f05f(0x18b)],this['_rangeId'])??null;}['getResult'](){var _0x1147ae=_0x20d659;return this[_0x1147ae(0x18e)]['getResult']({'unitId':this['_unitId'],'rangeId':this[_0x1147ae(0x15b)]})??null;}[_0x20d659(0x14c)](){var _0x361ec1=_0x20d659;let _0x496166=this[_0x361ec1(0x184)](),_0x5a4af9=this[_0x361ec1(0x193)](),_0x207041=this[_0x361ec1(0x165)]();return!_0x496166||!_0x5a4af9||!_0x207041?null:{..._0x496166,'config':_0x5a4af9,'formula':_0x5a4af9[_0x361ec1(0x18a)],'result':_0x207041,'type':_0x361ec1(0x18a)};}[_0x20d659(0x191)](_0x22156e){var _0x41f4f6=_0x20d659;return this[_0x41f4f6(0x156)]['syncExecuteCommand'](_0xd65571['id'],{'externalReferences':_0x22156e[_0x41f4f6(0x17f)],'formula':_0x22156e[_0x41f4f6(0x18a)],'numberFormat':_0x22156e[_0x41f4f6(0x158)],'rangeId':this[_0x41f4f6(0x15b)],'unitId':this[_0x41f4f6(0x18b)]});}[_0x20d659(0x195)](_0xb10cfd){var _0x396f50=_0x20d659;return this[_0x396f50(0x156)][_0x396f50(0x17d)](_0x375602['id'],{'numberFormat':_0xb10cfd,'rangeId':this['_rangeId'],'unitId':this[_0x396f50(0x18b)]});}[_0x20d659(0x159)](){var _0x205c95=_0x20d659;return this[_0x205c95(0x156)][_0x205c95(0x17d)](_0x1a9573['id'],{'rangeId':this[_0x205c95(0x15b)],'unitId':this[_0x205c95(0x18b)]});}['replaceWithText'](_0x455d44){var _0x20497a=_0x20d659;return this[_0x20497a(0x156)][_0x20497a(0x17d)](_0x4c9eaf['id'],{'rangeId':this[_0x20497a(0x15b)],'text':_0x455d44,'unitId':this[_0x20497a(0x18b)]});}[_0x20d659(0x18f)](){var _0x7c98d2=_0x20d659;return this['_commandService']['syncExecuteCommand'](_0x4caa07['id'],{'rangeId':this[_0x7c98d2(0x15b)],'unitId':this[_0x7c98d2(0x18b)]});}[_0x20d659(0x155)](){var _0x36fbca=_0x20d659,_0x130a20;let _0x5b62e4=this[_0x36fbca(0x169)][_0x36fbca(0x15a)](this[_0x36fbca(0x18b)],_0x419927[_0x36fbca(0x153)]);return _0x5b62e4==null||(_0x130a20=_0x5b62e4['getSnapshot']()['body'])==null||(_0x130a20=_0x130a20[_0x36fbca(0x164)])==null?void 0x0:_0x130a20[_0x36fbca(0x16d)](_0x1b5733=>_0x1b5733[_0x36fbca(0x16c)]===this['_rangeId']&&_0x16147b(_0x1b5733));}};b=y([v(0x2,_0x4c28f3),v(0x3,_0x46f8a8(_0x189be6)),v(0x4,_0x46f8a8(_0x31512b)),v(0x5,_0x4bd504)],b);function x(_0x4dd03c){'@babel/helpers - typeof';var _0x1374d1=_0x20d659;return x=typeof Symbol=='function'&&typeof Symbol[_0x1374d1(0x160)]=='symbol'?function(_0x2a09ef){return typeof _0x2a09ef;}:function(_0x719f2){var _0x1a73ef=_0x1374d1;return _0x719f2&&typeof Symbol=='function'&&_0x719f2[_0x1a73ef(0x15c)]===Symbol&&_0x719f2!==Symbol[_0x1a73ef(0x177)]?_0x1a73ef(0x161):typeof _0x719f2;},x(_0x4dd03c);}function S(_0x231e2a,_0x328ca1){var _0x4f0bea=_0x20d659;if(x(_0x231e2a)!=_0x4f0bea(0x150)||!_0x231e2a)return _0x231e2a;var _0xfb6c1b=_0x231e2a[Symbol['toPrimitive']];if(_0xfb6c1b!==void 0x0){var _0x108374=_0xfb6c1b[_0x4f0bea(0x149)](_0x231e2a,_0x328ca1||'default');if(x(_0x108374)!='object')return _0x108374;throw TypeError(_0x4f0bea(0x16b));}return(_0x328ca1===_0x4f0bea(0x174)?String:Number)(_0x231e2a);}function C(_0x432abc){var _0x2c3b18=_0x20d659,_0x5b6f43=S(_0x432abc,_0x2c3b18(0x174));return x(_0x5b6f43)==_0x2c3b18(0x161)?_0x5b6f43:_0x5b6f43+'';}function w(_0x1fd4ef,_0x352afd,_0x43da99){var _0x4b1911=_0x20d659;return(_0x352afd=C(_0x352afd))in _0x1fd4ef?Object[_0x4b1911(0x197)](_0x1fd4ef,_0x352afd,{'value':_0x43da99,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x1fd4ef[_0x352afd]=_0x43da99,_0x1fd4ef;}var T=class extends _0x43ca7f{constructor(..._0x186015){var _0x46a76f=_0x20d659;super(..._0x186015),w(this,_0x46a76f(0x180),void 0x0),w(this,_0x46a76f(0x182),void 0x0),w(this,'_docsFormulaModel',void 0x0),w(this,'_docsFormulaResourceLoaderService',void 0x0);}['_initialize'](_0x4c7ccb){var _0x85283b=_0x20d659;this[_0x85283b(0x180)]=_0x4c7ccb[_0x85283b(0x162)](_0x4c28f3),this[_0x85283b(0x182)]=_0x4c7ccb['get'](_0x1d4bd8),this[_0x85283b(0x166)]=_0x4c7ccb[_0x85283b(0x162)](_0x189be6),this[_0x85283b(0x14d)]=_0x4c7ccb['get'](_0x5b8a61);}[_0x20d659(0x15f)](){var _0xdf6f6c=_0x20d659;return this['_getCompleteRanges']()[_0xdf6f6c(0x17b)](_0x1e87ec=>this[_0xdf6f6c(0x14b)](_0x1e87ec[_0xdf6f6c(0x16c)]));}[_0x20d659(0x189)](_0x431a36){var _0x36770a=_0x20d659;return this['_getCompleteRanges']()['some'](_0x5c9692=>_0x5c9692[_0x36770a(0x16c)]===_0x431a36)?this[_0x36770a(0x14b)](_0x431a36):null;}['getFormulaAt'](_0x51cc17){var _0x2edc91=_0x20d659;let _0xfd8b2d=this[_0x2edc91(0x15e)]()[_0x2edc91(0x16d)](_0x3e79ac=>_0x3e79ac[_0x2edc91(0x148)]<=_0x51cc17&&_0x51cc17<=_0x3e79ac[_0x2edc91(0x16a)]);return _0xfd8b2d?this['_createFormula'](_0xfd8b2d[_0x2edc91(0x16c)]):null;}[_0x20d659(0x17a)](){var _0x132ff7=_0x20d659;let _0x441a5a=this[_0x132ff7(0x14d)][_0x132ff7(0x167)](this['id']);if(!_0x441a5a)throw Error('Document\x20'+this['id']+_0x132ff7(0x17e));return this['_docsFormulaDisplayTextService'][_0x132ff7(0x18d)](_0x441a5a);}[_0x20d659(0x168)](_0x8a15a4){var _0x384f60=_0x20d659;return this['_insert']({'externalReferences':_0x8a15a4[_0x384f60(0x17f)],'formula':_0x8a15a4[_0x384f60(0x18a)],'numberFormat':_0x8a15a4[_0x384f60(0x158)],'target':{'type':'range','startOffset':_0x8a15a4['startOffset'],'endOffset':_0x8a15a4[_0x384f60(0x194)]},'unitId':this[_0x384f60(0x188)]()});}[_0x20d659(0x14f)](_0x2b7520){var _0x116763=_0x20d659;let _0x14695c=this[_0x116763(0x180)][_0x116763(0x17d)](_0x31330d['id'],_0x2b7520);return _0x14695c?this[_0x116763(0x14b)](_0x14695c[_0x116763(0x16c)]):null;}['_getCompleteRanges'](){var _0xc35746=_0x20d659,_0x30167a;let _0x4b419d=this[_0xc35746(0x166)][_0xc35746(0x15f)](this['getId']());return((_0x30167a=this[_0xc35746(0x179)]('')[_0xc35746(0x164)])==null?void 0x0:_0x30167a[_0xc35746(0x157)](_0x10f21e=>_0x16147b(_0x10f21e)&&_0x4b419d[_0x10f21e[_0xc35746(0x16c)]]!=null))??[];}[_0x20d659(0x14b)](_0x3b1138){var _0x213477=_0x20d659;return this[_0x213477(0x178)][_0x213477(0x14e)](b,this[_0x213477(0x188)](),_0x3b1138);}};function _0xb20e(_0xfecdfa,_0x1661ff){_0xfecdfa=_0xfecdfa-0x148;var _0x5f3d13=_0x5f3d();var _0xb20e0b=_0x5f3d13[_0xfecdfa];return _0xb20e0b;}_0x43ca7f[_0x20d659(0x173)](T);var E=class extends _0x57efe3{constructor(..._0x4d7126){super(..._0x4d7126),w(this,'_docsFormulaCommandService',void 0x0);}[_0x20d659(0x175)](_0x2a763f){var _0x293b80=_0x20d659;this[_0x293b80(0x180)]=_0x2a763f[_0x293b80(0x162)](_0x4c28f3);}[_0x20d659(0x168)](_0x3852fd,_0x4ad99f,_0x1b96dd={}){var _0x26a57f=_0x20d659;return this[_0x26a57f(0x14f)](_0x3852fd,_0x4ad99f,_0x1b96dd);}[_0x20d659(0x16e)](_0x34038f,_0x5eb7c4={}){var _0x155e3f=_0x20d659;return this['_insert'](_0x155e3f(0x196),_0x34038f,_0x5eb7c4);}['_insert'](_0x5932fc,_0x561d0b,_0x1e5b6f){var _0x3d89cc=_0x20d659;if(this[_0x3d89cc(0x171)]())return null;let _0x4b1da6={'externalReferences':_0x1e5b6f[_0x3d89cc(0x17f)],'formula':_0x561d0b,'numberFormat':_0x1e5b6f[_0x3d89cc(0x158)],'target':{'type':_0x3d89cc(0x170),'paragraphId':this['getId'](),'position':_0x5932fc},'unitId':this[_0x3d89cc(0x186)]['getId']()},_0x1b61a3=this['_docsFormulaCommandService'][_0x3d89cc(0x17d)](_0x31330d['id'],_0x4b1da6);return _0x1b61a3?this[_0x3d89cc(0x178)]['createInstance'](b,this[_0x3d89cc(0x186)][_0x3d89cc(0x188)](),_0x1b61a3['rangeId']):null;}};_0x57efe3[_0x20d659(0x173)](E);var D=class extends _0x19ea5f{constructor(..._0x3a74d0){var _0xad80c9=_0x20d659;super(..._0x3a74d0),w(this,_0xad80c9(0x180),void 0x0);}[_0x20d659(0x175)](_0x278be9){this['_docsFormulaCommandService']=_0x278be9['get'](_0x4c28f3);}[_0x20d659(0x15d)](_0x54550e,_0x2b4315={}){var _0x28c48d=_0x20d659;let {endOffset:_0x4ce5e6,segmentId:_0x5288e6,startOffset:_0xd1ee8e}=this[_0x28c48d(0x184)]();return _0x5288e6?null:this['_insert'](_0xd1ee8e,_0x4ce5e6,_0x54550e,_0x2b4315);}[_0x20d659(0x14f)](_0x50dca8,_0x10f1d8,_0x4e69f2,_0x3a25bd){var _0x411c37=_0x20d659;let _0x2b2c4f={'externalReferences':_0x3a25bd[_0x411c37(0x17f)],'formula':_0x4e69f2,'numberFormat':_0x3a25bd[_0x411c37(0x158)],'target':{'type':'range','startOffset':_0x50dca8,'endOffset':_0x10f1d8},'unitId':this[_0x411c37(0x186)][_0x411c37(0x188)]()},_0x31ac43=this['_docsFormulaCommandService'][_0x411c37(0x17d)](_0x31330d['id'],_0x2b2c4f);return _0x31ac43?this['_injector']['createInstance'](b,this['_document'][_0x411c37(0x188)](),_0x31ac43[_0x411c37(0x16c)]):null;}};_0x19ea5f[_0x20d659(0x173)](D);export{b as FDocumentFormula};function _0x5f3d(){var _0x1c1eac=['filter','numberFormat','remove','getUnit','_rangeId','constructor','replaceWithFormula','_getCompleteRanges','getFormulas','iterator','symbol','get','156347NZbTwj','customRanges','getResult','_docsFormulaModel','saveUnit','insertFormula','_univerInstanceService','endIndex','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','rangeId','find','appendFormula','2892CGOSFt','paragraph','getSegmentId','1096224ZVUNnD','extend','string','_initialize','260nFEbnv','prototype','_injector','getBody','saveFormulaDisplayTextSnapshot','map','2542745GdgtUF','syncExecuteCommand','\x20could\x20not\x20be\x20serialized.','externalReferences','_docsFormulaCommandService','6phSubx','_docsFormulaDisplayTextService','304888wVSxfl','getRange','function','_document','570drBZCV','getId','getFormula','formula','_unitId','14823347pIKzxt','degradeDocumentData','_service','convertToText','getOwnPropertyDescriptor','update','length','getConfig','endOffset','setNumberFormat','end','defineProperty','startIndex','call','7QXOdOe','_createFormula','describe','_docsFormulaResourceLoaderService','createInstance','_insert','object','decorate','71991jevcNd','UNIVER_DOC','_model','_getCustomRange','_commandService'];_0x5f3d=function(){return _0x1c1eac;};return _0x5f3d();}
1
+ var _0x3a803d=_0x4c55;(function(_0xde343c,_0x2641e0){var _0xe311b6=_0x4c55,_0x7a802e=_0xde343c();while(!![]){try{var _0x29f1cf=parseInt(_0xe311b6(0xc9))/0x1+parseInt(_0xe311b6(0xf8))/0x2+-parseInt(_0xe311b6(0xe9))/0x3*(parseInt(_0xe311b6(0xf3))/0x4)+parseInt(_0xe311b6(0xf9))/0x5+parseInt(_0xe311b6(0xff))/0x6*(parseInt(_0xe311b6(0xcc))/0x7)+-parseInt(_0xe311b6(0xdd))/0x8+-parseInt(_0xe311b6(0xe6))/0x9;if(_0x29f1cf===_0x2641e0)break;else _0x7a802e['push'](_0x7a802e['shift']());}catch(_0xd2782c){_0x7a802e['push'](_0x7a802e['shift']());}}}(_0x3fa3,0xc89b3));import{ConvertDocFormulaToTextCommand as _0x4dc3b6,DocFormulaDisplayTextService as _0x44acd2,DocFormulaModel as _0x2217c6,DocFormulaService as _0x124ba9,InsertDocFormulaCommand as _0xcc371d,RemoveDocFormulaCommand as _0x21b7de,ReplaceDocFormulaWithTextCommand as _0x460db1,SetDocFormulaNumberFormatCommand as _0x582fd2,UpdateDocFormulaCommand as _0x59bdaf,isDocFormulaRange as _0x3ee5c9}from'@univerjs-pro/docs-formula';import{ICommandService as _0x29b40b,IResourceLoaderService as _0x3cc1a5,IUniverInstanceService as _0x3fa665,Inject as _0x1e7f0b,UniverInstanceType as _0xd4469a}from'@univerjs/core';import{FDocument as _0x4efe3d,FDocumentParagraph as _0x3ec53d,FDocumentTextRange as _0x5e91bd}from'@univerjs/docs/facade';function v(_0x36da73,_0x50c50b){return function(_0x2548a6,_0x21f6f2){_0x50c50b(_0x2548a6,_0x21f6f2,_0x36da73);};}function y(_0x4b2dd1,_0x300f69,_0x31f854,_0x33fee9){var _0x39cd8a=_0x4c55,_0x5987ad=arguments['length'],_0x86392c=_0x5987ad<0x3?_0x300f69:_0x33fee9===null?_0x33fee9=Object[_0x39cd8a(0x10b)](_0x300f69,_0x31f854):_0x33fee9,_0x2c7b28;if(typeof Reflect==_0x39cd8a(0x102)&&typeof Reflect[_0x39cd8a(0x100)]==_0x39cd8a(0x10e))_0x86392c=Reflect[_0x39cd8a(0x100)](_0x4b2dd1,_0x300f69,_0x31f854,_0x33fee9);else{for(var _0x52ad09=_0x4b2dd1[_0x39cd8a(0x105)]-0x1;_0x52ad09>=0x0;_0x52ad09--)(_0x2c7b28=_0x4b2dd1[_0x52ad09])&&(_0x86392c=(_0x5987ad<0x3?_0x2c7b28(_0x86392c):_0x5987ad>0x3?_0x2c7b28(_0x300f69,_0x31f854,_0x86392c):_0x2c7b28(_0x300f69,_0x31f854))||_0x86392c);}return _0x5987ad>0x3&&_0x86392c&&Object[_0x39cd8a(0xf1)](_0x300f69,_0x31f854,_0x86392c),_0x86392c;}let b=class{constructor(_0x24757e,_0x222f5f,_0x48c42a,_0x12304a,_0x4acc6c,_0x555797){var _0x495f69=_0x4c55;this[_0x495f69(0x109)]=_0x24757e,this['_rangeId']=_0x222f5f,this[_0x495f69(0xf5)]=_0x48c42a,this[_0x495f69(0x110)]=_0x12304a,this[_0x495f69(0xd7)]=_0x4acc6c,this['_univerInstanceService']=_0x555797;}['getId'](){var _0x37752f=_0x4c55;return this[_0x37752f(0x101)];}[_0x3a803d(0x10c)](){var _0x1d88df=_0x3a803d;let _0x214ac9=this[_0x1d88df(0xd3)]();return _0x214ac9?{'endOffset':_0x214ac9[_0x1d88df(0x106)]+0x1,'rangeId':_0x214ac9[_0x1d88df(0xeb)],'startOffset':_0x214ac9[_0x1d88df(0xe5)]}:null;}[_0x3a803d(0xea)](){var _0x4af4cd=_0x3a803d,_0x57693b;return((_0x57693b=this[_0x4af4cd(0x110)][_0x4af4cd(0xea)](this[_0x4af4cd(0x109)],this[_0x4af4cd(0x101)]))==null?void 0x0:_0x57693b['formula'])??'';}[_0x3a803d(0xf6)](){var _0x27f958=_0x3a803d;return this[_0x27f958(0x110)][_0x27f958(0xea)](this[_0x27f958(0x109)],this[_0x27f958(0x101)])??null;}[_0x3a803d(0xc6)](){var _0x347e93=_0x3a803d;return this[_0x347e93(0xd7)][_0x347e93(0xc6)]({'unitId':this['_unitId'],'rangeId':this[_0x347e93(0x101)]})??null;}['describe'](){var _0x4069cb=_0x3a803d;let _0x4f78ca=this[_0x4069cb(0x10c)](),_0x3cb615=this[_0x4069cb(0xf6)](),_0x2074e0=this['getResult']();return!_0x4f78ca||!_0x3cb615||!_0x2074e0?null:{..._0x4f78ca,'config':_0x3cb615,'formula':_0x3cb615['formula'],'result':_0x2074e0,'type':_0x4069cb(0xfc)};}[_0x3a803d(0xda)](_0x138879){var _0x55576a=_0x3a803d;return this[_0x55576a(0xf5)][_0x55576a(0xfa)](_0x59bdaf['id'],{'externalReferences':_0x138879[_0x55576a(0xe8)],'formula':_0x138879['formula'],'numberFormat':_0x138879[_0x55576a(0xed)],'rangeId':this['_rangeId'],'unitId':this[_0x55576a(0x109)]});}[_0x3a803d(0xc8)](_0x2499b0){var _0x3c4162=_0x3a803d;return this['_commandService'][_0x3c4162(0xfa)](_0x582fd2['id'],{'numberFormat':_0x2499b0,'rangeId':this['_rangeId'],'unitId':this['_unitId']});}[_0x3a803d(0xe2)](){var _0x54878c=_0x3a803d;return this['_commandService']['syncExecuteCommand'](_0x21b7de['id'],{'rangeId':this['_rangeId'],'unitId':this[_0x54878c(0x109)]});}['replaceWithText'](_0x49fc5e){var _0x230a71=_0x3a803d;return this['_commandService'][_0x230a71(0xfa)](_0x460db1['id'],{'rangeId':this[_0x230a71(0x101)],'text':_0x49fc5e,'unitId':this['_unitId']});}[_0x3a803d(0xd4)](){var _0x259aed=_0x3a803d;return this[_0x259aed(0xf5)]['syncExecuteCommand'](_0x4dc3b6['id'],{'rangeId':this[_0x259aed(0x101)],'unitId':this['_unitId']});}['_getCustomRange'](){var _0x17fa56=_0x3a803d,_0x1fea2d;let _0x331c67=this[_0x17fa56(0xd2)]['getUnit'](this[_0x17fa56(0x109)],_0xd4469a['UNIVER_DOC']);return _0x331c67==null||(_0x1fea2d=_0x331c67[_0x17fa56(0xce)]()[_0x17fa56(0xc7)])==null||(_0x1fea2d=_0x1fea2d[_0x17fa56(0xd5)])==null?void 0x0:_0x1fea2d['find'](_0x116d7d=>_0x116d7d['rangeId']===this[_0x17fa56(0x101)]&&_0x3ee5c9(_0x116d7d));}};function _0x3fa3(){var _0x364a24=['rangeId','createInstance','numberFormat','_insert','getFormulas','_docsFormulaResourceLoaderService','defineProperty','_docsFormulaModel','4976796KcPZAJ','saveFormulaDisplayTextSnapshot','_commandService','getConfig','getSegmentId','1768600faWCfa','5791790AmTlyN','syncExecuteCommand','map','formula','constructor','filter','6SwuMVl','decorate','_rangeId','object','_docsFormulaDisplayTextService','iterator','length','endIndex','_getCompleteRanges','getFormulaAt','_unitId','extend','getOwnPropertyDescriptor','getRange','insertFormula','function','symbol','_model','getResult','body','setNumberFormat','1262650QEgvhn','_injector','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','9308173JvwJnX','replaceWithFormula','getSnapshot','_document','_initialize','call','_univerInstanceService','_getCustomRange','convertToText','customRanges','get','_service','getId','_createFormula','update','toPrimitive','getBody','147240XmFbad','end','paragraph','saveUnit','some','remove','_docsFormulaCommandService','range','startIndex','22956840NNroqH','find','externalReferences','3mPacuv','getFormula'];_0x3fa3=function(){return _0x364a24;};return _0x3fa3();}b=y([v(0x2,_0x29b40b),v(0x3,_0x1e7f0b(_0x2217c6)),v(0x4,_0x1e7f0b(_0x124ba9)),v(0x5,_0x3fa665)],b);function x(_0x4c1ed2){'@babel/helpers - typeof';var _0x19be8f=_0x3a803d;return x=typeof Symbol==_0x19be8f(0x10e)&&typeof Symbol[_0x19be8f(0x104)]==_0x19be8f(0x10f)?function(_0x57b0d3){return typeof _0x57b0d3;}:function(_0x53e71d){var _0x2d9e60=_0x19be8f;return _0x53e71d&&typeof Symbol==_0x2d9e60(0x10e)&&_0x53e71d[_0x2d9e60(0xfd)]===Symbol&&_0x53e71d!==Symbol['prototype']?_0x2d9e60(0x10f):typeof _0x53e71d;},x(_0x4c1ed2);}function S(_0x4a20cd,_0x1eb92a){var _0x2892c5=_0x3a803d;if(x(_0x4a20cd)!=_0x2892c5(0x102)||!_0x4a20cd)return _0x4a20cd;var _0xd4074c;if(typeof Symbol<'u'&&(_0xd4074c=_0x4a20cd[Symbol[_0x2892c5(0xdb)]])!==void 0x0){var _0x265d26=_0xd4074c[_0x2892c5(0xd1)](_0x4a20cd,_0x1eb92a||'default');if(x(_0x265d26)!='object')return _0x265d26;throw TypeError(_0x2892c5(0xcb));}return(_0x1eb92a==='string'?String:Number)(_0x4a20cd);}function _0x4c55(_0x2f2233,_0x4740b8){_0x2f2233=_0x2f2233-0xc6;var _0x3fa37b=_0x3fa3();var _0x4c5561=_0x3fa37b[_0x2f2233];return _0x4c5561;}function C(_0x3092fb){var _0x1af065=_0x3a803d,_0x515731=S(_0x3092fb,'string');return x(_0x515731)==_0x1af065(0x10f)?_0x515731:_0x515731+'';}function w(_0x3b2482,_0x379d41,_0x21c9c0){var _0x31903b=_0x3a803d;return(_0x379d41=C(_0x379d41))in _0x3b2482?Object[_0x31903b(0xf1)](_0x3b2482,_0x379d41,{'value':_0x21c9c0,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x3b2482[_0x379d41]=_0x21c9c0,_0x3b2482;}var T=class extends _0x4efe3d{constructor(..._0x1ef66a){var _0x180f43=_0x3a803d;super(..._0x1ef66a),w(this,_0x180f43(0xe3),void 0x0),w(this,'_docsFormulaDisplayTextService',void 0x0),w(this,'_docsFormulaModel',void 0x0),w(this,_0x180f43(0xf0),void 0x0);}[_0x3a803d(0xd0)](_0x563508){var _0xb7aad=_0x3a803d;this[_0xb7aad(0xe3)]=_0x563508[_0xb7aad(0xd6)](_0x29b40b),this[_0xb7aad(0x103)]=_0x563508[_0xb7aad(0xd6)](_0x44acd2),this[_0xb7aad(0xf2)]=_0x563508[_0xb7aad(0xd6)](_0x2217c6),this[_0xb7aad(0xf0)]=_0x563508[_0xb7aad(0xd6)](_0x3cc1a5);}[_0x3a803d(0xef)](){var _0x1f7f64=_0x3a803d;return this['_getCompleteRanges']()[_0x1f7f64(0xfb)](_0x31aea4=>this['_createFormula'](_0x31aea4[_0x1f7f64(0xeb)]));}['getFormula'](_0x19b4c4){var _0x26f5b0=_0x3a803d;return this[_0x26f5b0(0x107)]()[_0x26f5b0(0xe1)](_0x988958=>_0x988958[_0x26f5b0(0xeb)]===_0x19b4c4)?this[_0x26f5b0(0xd9)](_0x19b4c4):null;}[_0x3a803d(0x108)](_0x34760c){var _0x52f910=_0x3a803d;let _0x3e0a10=this[_0x52f910(0x107)]()[_0x52f910(0xe7)](_0x390d03=>_0x390d03['startIndex']<=_0x34760c&&_0x34760c<=_0x390d03['endIndex']);return _0x3e0a10?this[_0x52f910(0xd9)](_0x3e0a10['rangeId']):null;}[_0x3a803d(0xf4)](){var _0x1969bc=_0x3a803d;let _0x13c4f1=this[_0x1969bc(0xf0)][_0x1969bc(0xe0)](this['id']);if(!_0x13c4f1)throw Error('Document\x20'+this['id']+'\x20could\x20not\x20be\x20serialized.');return this[_0x1969bc(0x103)]['degradeDocumentData'](_0x13c4f1);}[_0x3a803d(0x10d)](_0x338e17){var _0x1ef60c=_0x3a803d;return this[_0x1ef60c(0xee)]({'externalReferences':_0x338e17[_0x1ef60c(0xe8)],'formula':_0x338e17[_0x1ef60c(0xfc)],'numberFormat':_0x338e17[_0x1ef60c(0xed)],'target':{'type':_0x1ef60c(0xe4),'startOffset':_0x338e17['startOffset'],'endOffset':_0x338e17['endOffset']},'unitId':this[_0x1ef60c(0xd8)]()});}[_0x3a803d(0xee)](_0x3cfe70){var _0x5697be=_0x3a803d;let _0xbae152=this['_docsFormulaCommandService'][_0x5697be(0xfa)](_0xcc371d['id'],_0x3cfe70);return _0xbae152?this[_0x5697be(0xd9)](_0xbae152[_0x5697be(0xeb)]):null;}['_getCompleteRanges'](){var _0x5e9d4b=_0x3a803d,_0x2d10ce;let _0x62f609=this[_0x5e9d4b(0xf2)][_0x5e9d4b(0xef)](this[_0x5e9d4b(0xd8)]());return((_0x2d10ce=this[_0x5e9d4b(0xdc)]('')[_0x5e9d4b(0xd5)])==null?void 0x0:_0x2d10ce[_0x5e9d4b(0xfe)](_0x3cd0e5=>_0x3ee5c9(_0x3cd0e5)&&_0x62f609[_0x3cd0e5[_0x5e9d4b(0xeb)]]!=null))??[];}[_0x3a803d(0xd9)](_0x345772){var _0x36cea7=_0x3a803d;return this[_0x36cea7(0xca)][_0x36cea7(0xec)](b,this[_0x36cea7(0xd8)](),_0x345772);}};_0x4efe3d['extend'](T);var E=class extends _0x3ec53d{constructor(..._0x4be71d){var _0x9e05f9=_0x3a803d;super(..._0x4be71d),w(this,_0x9e05f9(0xe3),void 0x0);}['_initialize'](_0x2b96a7){var _0x22ea2d=_0x3a803d;this[_0x22ea2d(0xe3)]=_0x2b96a7['get'](_0x29b40b);}[_0x3a803d(0x10d)](_0x56bb57,_0xf79444,_0x5bcd73={}){var _0xfcf7d9=_0x3a803d;return this[_0xfcf7d9(0xee)](_0x56bb57,_0xf79444,_0x5bcd73);}['appendFormula'](_0x2e604a,_0x104c68={}){var _0x30d0a9=_0x3a803d;return this[_0x30d0a9(0xee)](_0x30d0a9(0xde),_0x2e604a,_0x104c68);}[_0x3a803d(0xee)](_0x370ae7,_0x19e2ef,_0x2a66ce){var _0x1e2d76=_0x3a803d;if(this[_0x1e2d76(0xf7)]())return null;let _0x3f1996={'externalReferences':_0x2a66ce[_0x1e2d76(0xe8)],'formula':_0x19e2ef,'numberFormat':_0x2a66ce[_0x1e2d76(0xed)],'target':{'type':_0x1e2d76(0xdf),'paragraphId':this['getId'](),'position':_0x370ae7},'unitId':this[_0x1e2d76(0xcf)][_0x1e2d76(0xd8)]()},_0x651e3e=this[_0x1e2d76(0xe3)][_0x1e2d76(0xfa)](_0xcc371d['id'],_0x3f1996);return _0x651e3e?this[_0x1e2d76(0xca)][_0x1e2d76(0xec)](b,this[_0x1e2d76(0xcf)][_0x1e2d76(0xd8)](),_0x651e3e[_0x1e2d76(0xeb)]):null;}};_0x3ec53d['extend'](E);var D=class extends _0x5e91bd{constructor(..._0x12cc1a){var _0xfbc239=_0x3a803d;super(..._0x12cc1a),w(this,_0xfbc239(0xe3),void 0x0);}[_0x3a803d(0xd0)](_0x57924c){var _0x505e43=_0x3a803d;this['_docsFormulaCommandService']=_0x57924c[_0x505e43(0xd6)](_0x29b40b);}[_0x3a803d(0xcd)](_0x413dfb,_0x944afc={}){var _0x51b458=_0x3a803d;let {endOffset:_0x3550be,segmentId:_0x3e5af3,startOffset:_0x45addf}=this[_0x51b458(0x10c)]();return _0x3e5af3?null:this[_0x51b458(0xee)](_0x45addf,_0x3550be,_0x413dfb,_0x944afc);}[_0x3a803d(0xee)](_0x2caa31,_0x50f2e0,_0x56252b,_0x14dd5b){var _0x409bd7=_0x3a803d;let _0x5490e7={'externalReferences':_0x14dd5b[_0x409bd7(0xe8)],'formula':_0x56252b,'numberFormat':_0x14dd5b[_0x409bd7(0xed)],'target':{'type':_0x409bd7(0xe4),'startOffset':_0x2caa31,'endOffset':_0x50f2e0},'unitId':this[_0x409bd7(0xcf)][_0x409bd7(0xd8)]()},_0xa8d631=this[_0x409bd7(0xe3)]['syncExecuteCommand'](_0xcc371d['id'],_0x5490e7);return _0xa8d631?this[_0x409bd7(0xca)][_0x409bd7(0xec)](b,this[_0x409bd7(0xcf)]['getId'](),_0xa8d631[_0x409bd7(0xeb)]):null;}};_0x5e91bd[_0x3a803d(0x10a)](D);export{b as FDocumentFormula};