@univerjs-pro/docs-formula 1.4.0 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -7
- package/lib/cjs/facade.js +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/es/facade.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/facade.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +10 -10
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
|
|
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
|
+
function _0x14b8(_0x3328b4,_0x11e9b7){_0x3328b4=_0x3328b4-0x151;const _0x2336ee=_0x2336();let _0x14b850=_0x2336ee[_0x3328b4];return _0x14b850;}const _0x22fd62=_0x14b8;(function(_0x1092cf,_0x54249b){const _0x748e90=_0x14b8,_0x4d5b86=_0x1092cf();while(!![]){try{const _0x291588=-parseInt(_0x748e90(0x1a5))/0x1*(parseInt(_0x748e90(0x158))/0x2)+-parseInt(_0x748e90(0x17d))/0x3+parseInt(_0x748e90(0x181))/0x4+-parseInt(_0x748e90(0x166))/0x5*(parseInt(_0x748e90(0x19f))/0x6)+-parseInt(_0x748e90(0x19e))/0x7*(parseInt(_0x748e90(0x160))/0x8)+parseInt(_0x748e90(0x196))/0x9+parseInt(_0x748e90(0x1b5))/0xa*(parseInt(_0x748e90(0x184))/0xb);if(_0x291588===_0x54249b)break;else _0x4d5b86['push'](_0x4d5b86['shift']());}catch(_0x502c4d){_0x4d5b86['push'](_0x4d5b86['shift']());}}}(_0x2336,0xdd60c),Object[_0x22fd62(0x182)](exports,Symbol[_0x22fd62(0x1a2)],{'value':'Module'}));let e=require('@univerjs-pro/docs-formula'),t=require('@univerjs/core'),n=require('@univerjs/docs/facade');function r(_0x463c85,_0x20b0b9){return function(_0x440cd3,_0x2873ba){_0x20b0b9(_0x440cd3,_0x2873ba,_0x463c85);};}function i(_0x2ec2ca,_0xeafc66,_0xd5317c,_0x1f5b45){const _0x1ab65d=_0x22fd62;var _0x4aa187=arguments[_0x1ab65d(0x17b)],_0x550d87=_0x4aa187<0x3?_0xeafc66:_0x1f5b45===null?_0x1f5b45=Object[_0x1ab65d(0x19c)](_0xeafc66,_0xd5317c):_0x1f5b45,_0x36fb12;if(typeof Reflect==_0x1ab65d(0x1ab)&&typeof Reflect[_0x1ab65d(0x17c)]==_0x1ab65d(0x157))_0x550d87=Reflect[_0x1ab65d(0x17c)](_0x2ec2ca,_0xeafc66,_0xd5317c,_0x1f5b45);else{for(var _0x206832=_0x2ec2ca[_0x1ab65d(0x17b)]-0x1;_0x206832>=0x0;_0x206832--)(_0x36fb12=_0x2ec2ca[_0x206832])&&(_0x550d87=(_0x4aa187<0x3?_0x36fb12(_0x550d87):_0x4aa187>0x3?_0x36fb12(_0xeafc66,_0xd5317c,_0x550d87):_0x36fb12(_0xeafc66,_0xd5317c))||_0x550d87);}return _0x4aa187>0x3&&_0x550d87&&Object['defineProperty'](_0xeafc66,_0xd5317c,_0x550d87),_0x550d87;}let a=class{constructor(_0x42e61d,_0x491ed8,_0x25bdf5,_0x4235cb,_0x71665c,_0xec8242){const _0x37cec4=_0x22fd62;this[_0x37cec4(0x19a)]=_0x42e61d,this[_0x37cec4(0x156)]=_0x491ed8,this['_commandService']=_0x25bdf5,this[_0x37cec4(0x179)]=_0x4235cb,this[_0x37cec4(0x168)]=_0x71665c,this['_univerInstanceService']=_0xec8242;}['getId'](){const _0x2ad7af=_0x22fd62;return this[_0x2ad7af(0x156)];}['getRange'](){const _0xa317dd=_0x22fd62;let _0x2add90=this[_0xa317dd(0x19b)]();return _0x2add90?{'endOffset':_0x2add90[_0xa317dd(0x1b1)]+0x1,'rangeId':_0x2add90[_0xa317dd(0x15c)],'startOffset':_0x2add90[_0xa317dd(0x177)]}:null;}[_0x22fd62(0x15d)](){const _0x51e1cb=_0x22fd62;var _0x3f3b46;return((_0x3f3b46=this[_0x51e1cb(0x179)]['getFormula'](this[_0x51e1cb(0x19a)],this[_0x51e1cb(0x156)]))==null?void 0x0:_0x3f3b46[_0x51e1cb(0x1ac)])??'';}[_0x22fd62(0x178)](){const _0x3ec22c=_0x22fd62;return this[_0x3ec22c(0x179)][_0x3ec22c(0x15d)](this[_0x3ec22c(0x19a)],this[_0x3ec22c(0x156)])??null;}['getResult'](){const _0x57ab24=_0x22fd62;return this['_service'][_0x57ab24(0x1aa)]({'unitId':this[_0x57ab24(0x19a)],'rangeId':this['_rangeId']})??null;}[_0x22fd62(0x18f)](){const _0x3d9380=_0x22fd62;let _0x16032f=this['getRange'](),_0x36fbc6=this[_0x3d9380(0x178)](),_0x28eee0=this[_0x3d9380(0x1aa)]();return!_0x16032f||!_0x36fbc6||!_0x28eee0?null:{..._0x16032f,'config':_0x36fbc6,'formula':_0x36fbc6['formula'],'result':_0x28eee0,'type':_0x3d9380(0x1ac)};}['update'](_0x313e8c){const _0x392623=_0x22fd62;return this['_commandService'][_0x392623(0x16b)](e[_0x392623(0x165)]['id'],{'externalReferences':_0x313e8c['externalReferences'],'formula':_0x313e8c[_0x392623(0x1ac)],'numberFormat':_0x313e8c[_0x392623(0x176)],'rangeId':this[_0x392623(0x156)],'unitId':this[_0x392623(0x19a)]});}[_0x22fd62(0x16d)](_0x1cb7d2){const _0x206bf8=_0x22fd62;return this[_0x206bf8(0x1b6)][_0x206bf8(0x16b)](e[_0x206bf8(0x18d)]['id'],{'numberFormat':_0x1cb7d2,'rangeId':this[_0x206bf8(0x156)],'unitId':this[_0x206bf8(0x19a)]});}[_0x22fd62(0x18b)](){const _0x452c1f=_0x22fd62;return this[_0x452c1f(0x1b6)]['syncExecuteCommand'](e[_0x452c1f(0x18a)]['id'],{'rangeId':this[_0x452c1f(0x156)],'unitId':this[_0x452c1f(0x19a)]});}[_0x22fd62(0x152)](_0x592482){const _0x4e82c1=_0x22fd62;return this[_0x4e82c1(0x1b6)][_0x4e82c1(0x16b)](e[_0x4e82c1(0x194)]['id'],{'rangeId':this['_rangeId'],'text':_0x592482,'unitId':this['_unitId']});}[_0x22fd62(0x1a3)](){const _0x2fae31=_0x22fd62;return this['_commandService']['syncExecuteCommand'](e[_0x2fae31(0x192)]['id'],{'rangeId':this[_0x2fae31(0x156)],'unitId':this[_0x2fae31(0x19a)]});}['_getCustomRange'](){const _0x5ea964=_0x22fd62;var _0x2d7c70;let _0x117abc=this[_0x5ea964(0x185)][_0x5ea964(0x1ae)](this[_0x5ea964(0x19a)],t[_0x5ea964(0x175)][_0x5ea964(0x1b7)]);return _0x117abc==null||(_0x2d7c70=_0x117abc['getSnapshot']()[_0x5ea964(0x16f)])==null||(_0x2d7c70=_0x2d7c70['customRanges'])==null?void 0x0:_0x2d7c70[_0x5ea964(0x1ad)](_0x1ad2f1=>_0x1ad2f1['rangeId']===this[_0x5ea964(0x156)]&&(0x0,e[_0x5ea964(0x1a9)])(_0x1ad2f1));}};a=i([r(0x2,t[_0x22fd62(0x1b4)]),r(0x3,(0x0,t[_0x22fd62(0x154)])(e['DocFormulaModel'])),r(0x4,(0x0,t[_0x22fd62(0x154)])(e[_0x22fd62(0x18e)])),r(0x5,t[_0x22fd62(0x1a1)])],a);function o(_0x507b86){'@babel/helpers - typeof';const _0x32e9bb=_0x22fd62;return o=typeof Symbol==_0x32e9bb(0x157)&&typeof Symbol[_0x32e9bb(0x1a0)]==_0x32e9bb(0x16e)?function(_0x3d82d9){return typeof _0x3d82d9;}:function(_0xb2c22f){const _0x427646=_0x32e9bb;return _0xb2c22f&&typeof Symbol==_0x427646(0x157)&&_0xb2c22f['constructor']===Symbol&&_0xb2c22f!==Symbol[_0x427646(0x172)]?'symbol':typeof _0xb2c22f;},o(_0x507b86);}function s(_0x3ca885,_0x2c9b3d){const _0xdc8060=_0x22fd62;if(o(_0x3ca885)!=_0xdc8060(0x1ab)||!_0x3ca885)return _0x3ca885;var _0x332663;if(typeof Symbol<'u'&&(_0x332663=_0x3ca885[Symbol[_0xdc8060(0x1b0)]])!==void 0x0){var _0x558849=_0x332663[_0xdc8060(0x188)](_0x3ca885,_0x2c9b3d||_0xdc8060(0x170));if(o(_0x558849)!=_0xdc8060(0x1ab))return _0x558849;throw TypeError(_0xdc8060(0x18c));}return(_0x2c9b3d===_0xdc8060(0x193)?String:Number)(_0x3ca885);}function c(_0x48a575){const _0x53e85b=_0x22fd62;var _0x279b10=s(_0x48a575,_0x53e85b(0x193));return o(_0x279b10)==_0x53e85b(0x16e)?_0x279b10:_0x279b10+'';}function l(_0x5259fb,_0x857ebe,_0x1dbe2c){const _0x40b63b=_0x22fd62;return(_0x857ebe=c(_0x857ebe))in _0x5259fb?Object[_0x40b63b(0x182)](_0x5259fb,_0x857ebe,{'value':_0x1dbe2c,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x5259fb[_0x857ebe]=_0x1dbe2c,_0x5259fb;}var u=class extends n[_0x22fd62(0x191)]{constructor(..._0x395399){const _0x5ddb69=_0x22fd62;super(..._0x395399),l(this,'_docsFormulaCommandService',void 0x0),l(this,'_docsFormulaDisplayTextService',void 0x0),l(this,_0x5ddb69(0x199),void 0x0),l(this,_0x5ddb69(0x171),void 0x0);}[_0x22fd62(0x15b)](_0x3d64af){const _0x8d2f31=_0x22fd62;this[_0x8d2f31(0x174)]=_0x3d64af[_0x8d2f31(0x17a)](t[_0x8d2f31(0x1b4)]),this[_0x8d2f31(0x159)]=_0x3d64af[_0x8d2f31(0x17a)](e[_0x8d2f31(0x198)]),this['_docsFormulaModel']=_0x3d64af[_0x8d2f31(0x17a)](e['DocFormulaModel']),this[_0x8d2f31(0x171)]=_0x3d64af[_0x8d2f31(0x17a)](t['IResourceLoaderService']);}[_0x22fd62(0x1a6)](){const _0x1cc794=_0x22fd62;return this[_0x1cc794(0x1af)]()[_0x1cc794(0x15f)](_0x5c57cd=>this[_0x1cc794(0x186)](_0x5c57cd[_0x1cc794(0x15c)]));}[_0x22fd62(0x15d)](_0x17065a){const _0x3678fa=_0x22fd62;return this[_0x3678fa(0x1af)]()[_0x3678fa(0x15a)](_0x37571c=>_0x37571c[_0x3678fa(0x15c)]===_0x17065a)?this['_createFormula'](_0x17065a):null;}[_0x22fd62(0x17f)](_0x35251f){const _0x2881ad=_0x22fd62;let _0x5832b3=this[_0x2881ad(0x1af)]()[_0x2881ad(0x1ad)](_0xbf9abb=>_0xbf9abb[_0x2881ad(0x177)]<=_0x35251f&&_0x35251f<=_0xbf9abb['endIndex']);return _0x5832b3?this['_createFormula'](_0x5832b3[_0x2881ad(0x15c)]):null;}['saveFormulaDisplayTextSnapshot'](){const _0x217f14=_0x22fd62;let _0x4ee98a=this[_0x217f14(0x171)][_0x217f14(0x15e)](this['id']);if(!_0x4ee98a)throw Error(_0x217f14(0x169)+this['id']+_0x217f14(0x161));return this[_0x217f14(0x159)][_0x217f14(0x167)](_0x4ee98a);}[_0x22fd62(0x180)](_0x30816b){const _0x475f3c=_0x22fd62;return this[_0x475f3c(0x1b2)]({'externalReferences':_0x30816b[_0x475f3c(0x189)],'formula':_0x30816b[_0x475f3c(0x1ac)],'numberFormat':_0x30816b[_0x475f3c(0x176)],'target':{'type':_0x475f3c(0x1b3),'startOffset':_0x30816b[_0x475f3c(0x1a8)],'endOffset':_0x30816b[_0x475f3c(0x19d)]},'unitId':this[_0x475f3c(0x151)]()});}['_insert'](_0x3293a7){const _0x51e09f=_0x22fd62;let _0x4d4ca8=this[_0x51e09f(0x174)]['syncExecuteCommand'](e[_0x51e09f(0x164)]['id'],_0x3293a7);return _0x4d4ca8?this[_0x51e09f(0x186)](_0x4d4ca8[_0x51e09f(0x15c)]):null;}[_0x22fd62(0x1af)](){const _0x2410de=_0x22fd62;var _0x4a6586;let _0x40f312=this['_docsFormulaModel'][_0x2410de(0x1a6)](this['getId']());return((_0x4a6586=this['getBody']('')[_0x2410de(0x16c)])==null?void 0x0:_0x4a6586[_0x2410de(0x1a4)](_0x453a24=>(0x0,e[_0x2410de(0x1a9)])(_0x453a24)&&_0x40f312[_0x453a24[_0x2410de(0x15c)]]!=null))??[];}[_0x22fd62(0x186)](_0x2be7ba){const _0x231ddf=_0x22fd62;return this[_0x231ddf(0x190)][_0x231ddf(0x183)](a,this[_0x231ddf(0x151)](),_0x2be7ba);}};n[_0x22fd62(0x191)][_0x22fd62(0x162)](u);var d=class extends n[_0x22fd62(0x17e)]{constructor(..._0x358441){const _0x1c6e6d=_0x22fd62;super(..._0x358441),l(this,_0x1c6e6d(0x174),void 0x0);}[_0x22fd62(0x15b)](_0x165a6c){const _0x56ff04=_0x22fd62;this[_0x56ff04(0x174)]=_0x165a6c[_0x56ff04(0x17a)](t['ICommandService']);}[_0x22fd62(0x180)](_0x47531d,_0xe6c6fb,_0x3775ef={}){const _0x16297a=_0x22fd62;return this[_0x16297a(0x1b2)](_0x47531d,_0xe6c6fb,_0x3775ef);}[_0x22fd62(0x16a)](_0x471fa1,_0x461870={}){const _0x1c03c8=_0x22fd62;return this['_insert'](_0x1c03c8(0x1a7),_0x471fa1,_0x461870);}[_0x22fd62(0x1b2)](_0x26d9ce,_0x4e5c1d,_0x3f7083){const _0x1dc14f=_0x22fd62;if(this[_0x1dc14f(0x173)]())return null;let _0x38fa3a={'externalReferences':_0x3f7083[_0x1dc14f(0x189)],'formula':_0x4e5c1d,'numberFormat':_0x3f7083['numberFormat'],'target':{'type':_0x1dc14f(0x197),'paragraphId':this[_0x1dc14f(0x151)](),'position':_0x26d9ce},'unitId':this[_0x1dc14f(0x195)]['getId']()},_0x2af173=this[_0x1dc14f(0x174)][_0x1dc14f(0x16b)](e['InsertDocFormulaCommand']['id'],_0x38fa3a);return _0x2af173?this['_injector'][_0x1dc14f(0x183)](a,this['_document'][_0x1dc14f(0x151)](),_0x2af173['rangeId']):null;}};n[_0x22fd62(0x17e)][_0x22fd62(0x162)](d);var f=class extends n[_0x22fd62(0x187)]{constructor(..._0x525506){const _0x301352=_0x22fd62;super(..._0x525506),l(this,_0x301352(0x174),void 0x0);}[_0x22fd62(0x15b)](_0x5df22f){const _0x241c31=_0x22fd62;this[_0x241c31(0x174)]=_0x5df22f['get'](t[_0x241c31(0x1b4)]);}[_0x22fd62(0x163)](_0x56336d,_0x2b140b={}){const _0x5c9fa7=_0x22fd62;let {endOffset:_0x2eeb7e,segmentId:_0x5b07c9,startOffset:_0x4df627}=this[_0x5c9fa7(0x153)]();return _0x5b07c9?null:this[_0x5c9fa7(0x1b2)](_0x4df627,_0x2eeb7e,_0x56336d,_0x2b140b);}[_0x22fd62(0x1b2)](_0x14846e,_0x30b1a8,_0x2acd6a,_0x42ea99){const _0x5b766e=_0x22fd62;let _0x4a9c31={'externalReferences':_0x42ea99['externalReferences'],'formula':_0x2acd6a,'numberFormat':_0x42ea99[_0x5b766e(0x176)],'target':{'type':_0x5b766e(0x1b3),'startOffset':_0x14846e,'endOffset':_0x30b1a8},'unitId':this[_0x5b766e(0x195)][_0x5b766e(0x151)]()},_0x467106=this[_0x5b766e(0x174)][_0x5b766e(0x16b)](e[_0x5b766e(0x164)]['id'],_0x4a9c31);return _0x467106?this['_injector'][_0x5b766e(0x183)](a,this[_0x5b766e(0x195)][_0x5b766e(0x151)](),_0x467106[_0x5b766e(0x15c)]):null;}};function _0x2336(){const _0x212138=['syncExecuteCommand','customRanges','setNumberFormat','symbol','body','default','_docsFormulaResourceLoaderService','prototype','getSegmentId','_docsFormulaCommandService','UniverInstanceType','numberFormat','startIndex','getConfig','_model','get','length','decorate','2969121vDFaSE','FDocumentParagraph','getFormulaAt','insertFormula','7247692sNXjVt','defineProperty','createInstance','1793qRHNIQ','_univerInstanceService','_createFormula','FDocumentTextRange','call','externalReferences','RemoveDocFormulaCommand','remove','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','SetDocFormulaNumberFormatCommand','DocFormulaService','describe','_injector','FDocument','ConvertDocFormulaToTextCommand','string','ReplaceDocFormulaWithTextCommand','_document','1708614KRYEeu','paragraph','DocFormulaDisplayTextService','_docsFormulaModel','_unitId','_getCustomRange','getOwnPropertyDescriptor','endOffset','7wrHKxu','6VZSNAc','iterator','IUniverInstanceService','toStringTag','convertToText','filter','2735FUOxxq','getFormulas','end','startOffset','isDocFormulaRange','getResult','object','formula','find','getUnit','_getCompleteRanges','toPrimitive','endIndex','_insert','range','ICommandService','88430uQLBet','_commandService','UNIVER_DOC','getId','replaceWithText','getRange','Inject','FDocumentFormula','_rangeId','function','4JQXROo','_docsFormulaDisplayTextService','some','_initialize','rangeId','getFormula','saveUnit','map','2676480XKoGYf','\x20could\x20not\x20be\x20serialized.','extend','replaceWithFormula','InsertDocFormulaCommand','UpdateDocFormulaCommand','6033385LTVUBA','degradeDocumentData','_service','Document\x20','appendFormula'];_0x2336=function(){return _0x212138;};return _0x2336();}n[_0x22fd62(0x187)][_0x22fd62(0x162)](f),Object['defineProperty'](exports,_0x22fd62(0x155),{'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 _0x4b9f04=_0x3404;(function(_0x4d9a0b,_0x2174bc){const _0x91f1=_0x3404,_0x17b5b8=_0x4d9a0b();while(!![]){try{const _0x37f929=parseInt(_0x91f1(0x18b))/0x1+-parseInt(_0x91f1(0x23e))/0x2*(-parseInt(_0x91f1(0x22b))/0x3)+-parseInt(_0x91f1(0x234))/0x4*(parseInt(_0x91f1(0x21b))/0x5)+parseInt(_0x91f1(0x21c))/0x6*(-parseInt(_0x91f1(0x17f))/0x7)+parseInt(_0x91f1(0x219))/0x8+parseInt(_0x91f1(0x205))/0x9+parseInt(_0x91f1(0x150))/0xa*(-parseInt(_0x91f1(0x183))/0xb);if(_0x37f929===_0x2174bc)break;else _0x17b5b8['push'](_0x17b5b8['shift']());}catch(_0x5dcd89){_0x17b5b8['push'](_0x17b5b8['shift']());}}}(_0x17d4,0x2f299),Object[_0x4b9f04(0x1a1)](exports,Symbol[_0x4b9f04(0x149)],{'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=_0x4b9f04(0x1f5),s='univer-docs-formula';function c(){return{'formulas':{}};}function l(_0x258f57){const _0x53afc1=_0x4b9f04;return!_0x258f57||typeof _0x258f57!=_0x53afc1(0x1ff)||!(_0x53afc1(0x15c)in _0x258f57)||!_0x258f57['formulas']||typeof _0x258f57[_0x53afc1(0x15c)]!=_0x53afc1(0x1ff)||Array[_0x53afc1(0x14c)](_0x258f57['formulas'])?!0x1:Object[_0x53afc1(0x194)](_0x258f57[_0x53afc1(0x15c)])[_0x53afc1(0x1f7)](([_0x5d727b,_0x6f8c1e])=>_0x5d727b[_0x53afc1(0x16a)]>0x0&&u(_0x6f8c1e));}function u(_0x47377d){const _0xe04e07=_0x4b9f04;return!_0x47377d||typeof _0x47377d!=_0xe04e07(0x1ff)||!f(_0x47377d,['formula',_0xe04e07(0x240),_0xe04e07(0x209)])||!('formula'in _0x47377d)||typeof _0x47377d[_0xe04e07(0x1bd)]!=_0xe04e07(0x1c9)||!_0x47377d[_0xe04e07(0x1bd)][_0xe04e07(0x1b8)]()||_0xe04e07(0x240)in _0x47377d&&_0x47377d[_0xe04e07(0x240)]!=null&&(typeof _0x47377d['numberFormat']!=_0xe04e07(0x1ff)||!f(_0x47377d['numberFormat'],[_0xe04e07(0x1a0)])||!('pattern'in _0x47377d[_0xe04e07(0x240)])||typeof _0x47377d[_0xe04e07(0x240)][_0xe04e07(0x1a0)]!=_0xe04e07(0x1c9))?!0x1:!('lastValue'in _0x47377d)||_0x47377d[_0xe04e07(0x209)]==null||d(_0x47377d[_0xe04e07(0x209)]);}function d(_0x2f0a1f){const _0x17570b=_0x4b9f04;return!_0x2f0a1f||typeof _0x2f0a1f!=_0x17570b(0x1ff)||!f(_0x2f0a1f,['v','t','pattern'])||!('v'in _0x2f0a1f)||_0x2f0a1f['v']!==null&&typeof _0x2f0a1f['v']!=_0x17570b(0x1c9)&&typeof _0x2f0a1f['v']!='number'&&typeof _0x2f0a1f['v']!=_0x17570b(0x1ce)||'t'in _0x2f0a1f&&_0x2f0a1f['t']!=null&&!ee(_0x2f0a1f['t'])?!0x1:!(_0x17570b(0x1a0)in _0x2f0a1f)||_0x2f0a1f[_0x17570b(0x1a0)]==null||typeof _0x2f0a1f[_0x17570b(0x1a0)]==_0x17570b(0x1c9);}function f(_0x1cf300,_0x2b00f4){const _0xffc28a=_0x4b9f04;let _0x45bea4=new Set(_0x2b00f4);return Object['keys'](_0x1cf300)[_0xffc28a(0x1f7)](_0x35771b=>_0x45bea4['has'](_0x35771b));}function ee(_0x4814e3){const _0x1fd78b=_0x4b9f04;return typeof _0x4814e3=='number'&&Object[_0x1fd78b(0x231)](t[_0x1fd78b(0x1d3)])[_0x1fd78b(0x220)](_0x4814e3);}const p=new Set([t[_0x4b9f04(0x191)][_0x4b9f04(0x1d4)],t[_0x4b9f04(0x191)][_0x4b9f04(0x1ea)],t['DataStreamTreeTokenType'][_0x4b9f04(0x18f)],t[_0x4b9f04(0x191)][_0x4b9f04(0x1f3)],t['DataStreamTreeTokenType'][_0x4b9f04(0x1ae)],t[_0x4b9f04(0x191)][_0x4b9f04(0x202)],t[_0x4b9f04(0x191)][_0x4b9f04(0x178)],t[_0x4b9f04(0x191)][_0x4b9f04(0x159)],t[_0x4b9f04(0x191)][_0x4b9f04(0x1fa)],t[_0x4b9f04(0x191)][_0x4b9f04(0x16d)],t[_0x4b9f04(0x191)]['COLUMN_GROUP_END'],t[_0x4b9f04(0x191)][_0x4b9f04(0x14f)],t[_0x4b9f04(0x191)][_0x4b9f04(0x1c1)],t[_0x4b9f04(0x191)]['CUSTOM_BLOCK']]);var m=class extends Error{constructor(){const _0x55322d=_0x4b9f04;super(_0x55322d(0x271));}};function te(_0x171c57){const _0x3d88e4=_0x4b9f04;var _0xda6145,_0xdc09cf;let _0x392fa5=t[_0x3d88e4(0x192)][_0x3d88e4(0x161)](_0x171c57['documentData']),_0x2bf7ee=T(_0x392fa5),{startOffset:_0x96cc88,endOffset:_0x5bc11b}=oe(_0x2bf7ee,_0x171c57[_0x3d88e4(0x1dd)],_0x171c57[_0x3d88e4(0x27b)]);ie(_0x2bf7ee,_0x96cc88,_0x5bc11b);let _0x531d6e=((_0xda6145=_0x2bf7ee[_0x3d88e4(0x18d)])==null?void 0x0:_0xda6145['filter'](_0x57daf1=>{const _0xd4676d=_0x3d88e4;if(!g(_0x57daf1))return!0x1;let _0x19a41b=(0x0,t[_0xd4676d(0x19f)])(_0x57daf1);return _0x19a41b[_0xd4676d(0x27b)]>_0x96cc88&&_0x19a41b[_0xd4676d(0x1dd)]<_0x5bc11b;})['map'](_0x32ed03=>_0x32ed03[_0x3d88e4(0x25f)]))??[];ce(_0x2bf7ee,_0x96cc88,_0x5bc11b,''),_0x2bf7ee[_0x3d88e4(0x18d)]=[...((_0xdc09cf=_0x2bf7ee['customRanges'])==null?void 0x0:_0xdc09cf[_0x3d88e4(0x1c3)](_0x586d2c=>!_0x531d6e[_0x3d88e4(0x220)](_0x586d2c['rangeId'])&&_0x586d2c[_0x3d88e4(0x25f)]!==_0x171c57[_0x3d88e4(0x25f)]))??[],ae(_0x171c57[_0x3d88e4(0x25f)],_0x96cc88)][_0x3d88e4(0x14b)]((_0x5459c5,_0x132c6c)=>_0x5459c5[_0x3d88e4(0x1be)]-_0x132c6c['startIndex']);let _0x28f17a=v(_0x171c57[_0x3d88e4(0x277)]);return _0x531d6e[_0x3d88e4(0x21f)](_0x1fd2a8=>{const _0x246f8c=_0x3d88e4;delete _0x28f17a[_0x246f8c(0x15c)][_0x1fd2a8];}),_0x28f17a[_0x3d88e4(0x15c)][_0x171c57[_0x3d88e4(0x25f)]]=t[_0x3d88e4(0x192)][_0x3d88e4(0x161)](_0x171c57[_0x3d88e4(0x26e)]),{'nextDocumentData':_0x392fa5,'nextResource':_0x28f17a,'cursorOffset':_0x96cc88+0x1};}function ne(_0x42a8ed){const _0xb8a94e=_0x4b9f04;var _0x3524f6,_0x55c0de;let _0x65544c=t[_0xb8a94e(0x192)][_0xb8a94e(0x161)](_0x42a8ed['documentData']),_0x1c086a=(_0x3524f6=T(_0x65544c)['customRanges'])==null?void 0x0:_0x3524f6[_0xb8a94e(0x227)](_0x5cad55=>_0x5cad55[_0xb8a94e(0x25f)]===_0x42a8ed[_0xb8a94e(0x25f)]&&g(_0x5cad55));if(!_0x1c086a||!((_0x55c0de=_0x42a8ed['resource'])!=null&&_0x55c0de[_0xb8a94e(0x15c)][_0x42a8ed['rangeId']]))return null;let _0x3d6687=v(_0x42a8ed['resource']);return _0x3d6687['formulas'][_0x42a8ed['rangeId']]=t['Tools'][_0xb8a94e(0x161)](_0x42a8ed['config']),{'nextDocumentData':_0x65544c,'nextResource':_0x3d6687,'cursorOffset':_0x1c086a[_0xb8a94e(0x181)]+0x1};}function h(_0x3f6fc8){const _0x4cb19f=_0x4b9f04;let _0x439751=t[_0x4cb19f(0x192)][_0x4cb19f(0x161)](_0x3f6fc8['documentData']),_0x92bcdb=le(_0x439751,_0x3f6fc8[_0x4cb19f(0x25f)],_0x3f6fc8[_0x4cb19f(0x186)]??'');if(_0x92bcdb==null)return null;let _0x9f2cd6=v(_0x3f6fc8[_0x4cb19f(0x277)]);return delete _0x9f2cd6[_0x4cb19f(0x15c)][_0x3f6fc8['rangeId']],{'nextDocumentData':_0x439751,'nextResource':_0x9f2cd6,'cursorOffset':_0x92bcdb};}function re(_0x1e8653,_0x14dba8){const _0x18dc64=_0x4b9f04;var _0x1f8c66;let _0x10a11b=t[_0x18dc64(0x192)][_0x18dc64(0x161)](_0x1e8653),_0x2a8147=_0x10a11b[_0x18dc64(0x182)];if(!_0x2a8147)return _0x10a11b;let _0x3e58d8=new Map(_0x14dba8['map'](_0x172e69=>[_0x172e69['rangeId'],_0x172e69['text']])),_0x5504ac=((_0x1f8c66=_0x2a8147['customRanges'])==null?void 0x0:_0x1f8c66['filter'](_0x295883=>g(_0x295883)&&_0x3e58d8[_0x18dc64(0x160)](_0x295883[_0x18dc64(0x25f)]))[_0x18dc64(0x14b)]((_0x1d03d9,_0x3926ad)=>_0x3926ad[_0x18dc64(0x1be)]-_0x1d03d9[_0x18dc64(0x1be)]))??[];for(let _0x4e26d4 of _0x5504ac)le(_0x10a11b,_0x4e26d4[_0x18dc64(0x25f)],_0x3e58d8['get'](_0x4e26d4[_0x18dc64(0x25f)])??'');return _0x10a11b;}function g(_0xa72537){const _0x3bac19=_0x4b9f04;var _0x3004a0;return(_0xa72537==null?void 0x0:_0xa72537[_0x3bac19(0x166)])===t[_0x3bac19(0x239)]['CUSTOM']&&_0xa72537[_0x3bac19(0x1bb)]===!0x0&&((_0x3004a0=_0xa72537[_0x3bac19(0x242)])==null?void 0x0:_0x3004a0[_0x3bac19(0x170)])===_0x3bac19(0x24c);}function _(_0x23fada,_0x350069){const _0x4b516b=_0x4b9f04;var _0x2aba4a;return _0x23fada==null||(_0x2aba4a=_0x23fada[_0x4b516b(0x18d)])==null?void 0x0:_0x2aba4a['find'](_0x1d5493=>_0x1d5493[_0x4b516b(0x25f)]===_0x350069&&g(_0x1d5493));}function ie(_0x1e4cd9,_0x3eaf67,_0x54196c){const _0x50f65e=_0x4b9f04;if(_0x3eaf67===_0x54196c){if(p['has'](_0x1e4cd9['dataStream'][_0x3eaf67]))throw new m();}else{for(let _0x3a3a93=_0x3eaf67;_0x3a3a93<_0x54196c;_0x3a3a93++)if(_0x1e4cd9[_0x50f65e(0x275)][_0x3a3a93]===t[_0x50f65e(0x191)][_0x50f65e(0x265)]||p['has'](_0x1e4cd9[_0x50f65e(0x275)][_0x3a3a93]))throw new m();}}function _0x17d4(){const _0x46e941=['toPrimitive','COMMAND','getFormulaValueSync','getCurrentUnitOfType','_loadErrors','_pendingUnitIds','TABLE_CELL_END','symbol','setResource','updates','getSnapshot','documentRedo','_registrations','cell','UniverInstanceType','_hostExternalReferenceModel','trim','getBodySliceForTextXAction','UNIVER_DOC','wholeEntity','_formulaKeys','formula','startIndex','error','_injector','BLOCK_END','DocTextResolverService','filter','position','sequenceNodesBuilder','load','pending','getPresentation','string','docs-formula.command.remove','startsWith','buildRemoveDocFormulaActions','replaceDocRanges','boolean','shiftExclusiveRangeOnDelete','externalMutations','status','insert','CellValueType','SECTION_BREAK','SUCCESS','getUnit','DocFormulaLifecycleController','asObservable','_syncUnit','resolveFormula','fromEntries','start','startOffset','PENDING','getUnitId','identity','clear','resolveBinding','max','ICommandService','change$','_updateFormulaResult','from','JSONX','docs-formula.mutation.set-formula','TABLE_START','decorate','redoMutation','sectionBreaks','SetDocFormulaNumberFormatCommand','CommandType','expectedFormula','RegisterOtherFormulaService','type','TABLE_CELL_START','Document\x20main\x20body\x20is\x20required\x20to\x20insert\x20Doc\x20Formula.','DOC_FORMULA_PLUGIN','_docFormulaModel','every','buildUpsertHostExternalReferenceMutations','references','COLUMN_START','IResourceManagerService','subscribe','_univerInstanceService','UniverDocsPlugin','object','_resources','resourceUndo','TABLE_ROW_END','packageName','resourceRedo','826128xYqYQk','expectedNumberFormat','model','removeUnit','lastValue','registerProvider','_instanceService','_rawResources','_preserveInvalid','serialize','degradeDocFormulaDocumentData','map','trigger','getLoadError','stale','tables','formulaResult$','ERROR','push','DependentOn','1405632znfJkq','getResource','1045ZznrGo','42DbmXFy','@univerjs-pro/docs-formula','documentData','forEach','includes','assertSafeDocFormulaInsertRange','buildInsertDocFormulaActions','syncExecuteCommand','expectedReferenceRevision','MUTATION','setFormulas','find','_formulaService','unitId','DOC_FORMULA_CUSTOM_RANGE_KIND','444051KKvqKD','set','presentation','isInteger','_resourceManagerService','getResult','values','add','RemoveDocFormulaMutation','1108uAIKQo','parse','IUndoRedoService','IUniverInstanceService','function','CustomRangeType','getRevision','customDecorations','next','_presentationChanged$','2ljvZEt','eligible','numberFormat','min','properties','previousResource','success','InsertDocFormulaCommand','_config','register','externalReferences','target','cursorOffset','docs-formula.mutation.set-resource','univer-docs-formula','SetDocFormulaMutation','EMPTY','getFormula','customBlocks','docs-formula.command.replace-with-text','Disposable','_queueSync','UpdateDocFormulaCommand','_configService','UniverProFormulaEnginePlugin','registerFormulaWithRange','findDocFormulaRange','keys','resources','getAllUnitsForType','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','empty','formulaId','rangeId','disposeWithMe','DocFormulaDisplayTextService','_model','getOwnPropertyDescriptor','syncUnit','PARAGRAPH','blockRanges','liveResult','getRichTextEditPath','onStarting','getTextRanges','FormulaCacheEligibilityService','nextResource','InvalidDocFormulaInsertRangeError','config','_service','_deleteRegistration','Doc\x20Formula\x20range\x20cannot\x20cross\x20document\x20structure\x20boundaries','onCommandExecuted','_registrationService','color','dataStream','removeFormula','resource','registerPluginResource','paragraphs','_commandService','endOffset','RichTextEditingMutation','columnGroups','toStringTag','getScalarFormulaResultCell','sort','isArray','FormulaLastValuePersistenceService','Injector','BLOCK_START','80wGcdks','stringify','name','slice','iterator','HostExternalReferenceModel','collectFormulaExternalReferenceQualifiers','getBody','docs-formula.command.insert','COLUMN_GROUP_START','shiftInclusiveRangeOnInsert','TextX','formulas','resolveFormulaResultPresentation','selection','DOC_FORMULA_OBJECT_REPLACEMENT','has','deepClone','getInstance','delete','textRuns','paragraphId','rangeType','setFormula','params','CUSTOM','length','OtherFormulaBizType','getParagraphContentStartOffset','COLUMN_END','UniverDocsFormulaPlugin','Plugin','kind','complete','editOp','nextDocumentData','unregister','document','assign','assess','TABLE_END','unitAdded$','SetDocFormulaLastValuesMutation','degradeDocumentData','segmentId','FormulaResultStatus','invalid-resource','296723vnnLJJ','_setPresentation','endIndex','body','251042JzHhuF','setConfig','_isDisposed','text','Inject','endsWith','unregisterUnit','notifyTextChanged','314856sXaBRU','accessor','customRanges','RemoveDocFormulaCommand','TABLE_ROW_START','_syncScheduled','DataStreamTreeTokenType','Tools','getFormulas','entries','ReplaceDocFormulaWithTextCommand','_change$','previousDocumentData','referenceRevision','source','getRegisteredFormulas','insertLength','UniverLicensePlugin','dispose','DocSelectionManagerService','getCustomRangeInterval','pattern','defineProperty','get','DOC','DOC_SELECTION_OPTION_PRESERVE_CARET','undoMutation','docs-formula.mutation.set-last-values','merge'];_0x17d4=function(){return _0x46e941;};return _0x17d4();}function ae(_0x5bb7aa,_0x503981){const _0x59e1c6=_0x4b9f04;return{'startIndex':_0x503981,'endIndex':_0x503981,'rangeId':_0x5bb7aa,'rangeType':t[_0x59e1c6(0x239)][_0x59e1c6(0x169)],'wholeEntity':!0x0,'properties':{'kind':s}};}function v(_0x10d2b3){const _0x2ab609=_0x4b9f04;return _0x10d2b3?t[_0x2ab609(0x192)][_0x2ab609(0x161)](_0x10d2b3):c();}function oe(_0x135698,_0x2041f7,_0x42cd85){const _0x47713d=_0x4b9f04;let _0x37b0c4=se(_0x135698),_0x3527b2=_0x2041f7??_0x37b0c4,_0x802398=_0x42cd85??_0x3527b2;return{'startOffset':y(Math[_0x47713d(0x241)](_0x3527b2,_0x802398),_0x37b0c4),'endOffset':y(Math[_0x47713d(0x1e3)](_0x3527b2,_0x802398),_0x37b0c4)};}function y(_0x48d6b3,_0x50fa48){const _0x144489=_0x4b9f04;return Math[_0x144489(0x1e3)](0x0,Math[_0x144489(0x241)](_0x48d6b3,_0x50fa48));}function se(_0x22f9cf){const _0x5f44aa=_0x4b9f04;return _0x22f9cf[_0x5f44aa(0x275)][_0x5f44aa(0x188)](''+t['DataStreamTreeTokenType'][_0x5f44aa(0x265)]+t['DataStreamTreeTokenType'][_0x5f44aa(0x1d4)])?Math[_0x5f44aa(0x1e3)](0x0,_0x22f9cf[_0x5f44aa(0x275)][_0x5f44aa(0x16a)]-0x2):_0x22f9cf[_0x5f44aa(0x275)][_0x5f44aa(0x188)](t['DataStreamTreeTokenType']['SECTION_BREAK'])?Math['max'](0x0,_0x22f9cf[_0x5f44aa(0x275)][_0x5f44aa(0x16a)]-0x1):_0x22f9cf[_0x5f44aa(0x275)]['length'];}function ce(_0x2fe717,_0x5b9fb0,_0x59b346,_0x1ef176){_0x59b346>_0x5b9fb0&&de(_0x2fe717,_0x5b9fb0,_0x59b346),ue(_0x2fe717,_0x5b9fb0,_0x1ef176);}function le(_0x179f23,_0x248268,_0x1b3fca){const _0x4a3893=_0x4b9f04;var _0x2c0f1e,_0x5441b6;let _0x134c84=T(_0x179f23),_0x3ec975=(_0x2c0f1e=_0x134c84[_0x4a3893(0x18d)])==null?void 0x0:_0x2c0f1e['find'](_0x15fe1a=>_0x15fe1a[_0x4a3893(0x25f)]===_0x248268&&g(_0x15fe1a));if(!_0x3ec975)return null;let _0x36003a=(0x0,t[_0x4a3893(0x19f)])(_0x3ec975);return ce(_0x134c84,_0x36003a[_0x4a3893(0x1dd)],_0x36003a['endOffset'],_0x1b3fca),_0x134c84['customRanges']=(_0x5441b6=_0x134c84['customRanges'])==null?void 0x0:_0x5441b6[_0x4a3893(0x1c3)](_0x1772d5=>_0x1772d5[_0x4a3893(0x25f)]!==_0x248268),_0x36003a[_0x4a3893(0x1dd)]+_0x1b3fca[_0x4a3893(0x16a)];}function ue(_0x1e20c8,_0x1528a8,_0x2003f2){const _0x19ce71=_0x4b9f04;_0x2003f2&&(_0x1e20c8[_0x19ce71(0x275)]=''+_0x1e20c8[_0x19ce71(0x275)][_0x19ce71(0x153)](0x0,_0x1528a8)+_0x2003f2+_0x1e20c8['dataStream'][_0x19ce71(0x153)](_0x1528a8),fe(_0x1e20c8,_0x1528a8,_0x2003f2['length']));}function de(_0x554a1c,_0x425e70,_0x1d9259){const _0x5e24b1=_0x4b9f04;let _0x1b2fb3=_0x1d9259-_0x425e70;_0x554a1c[_0x5e24b1(0x275)]=''+_0x554a1c[_0x5e24b1(0x275)][_0x5e24b1(0x153)](0x0,_0x425e70)+_0x554a1c[_0x5e24b1(0x275)][_0x5e24b1(0x153)](_0x1d9259),pe(_0x554a1c,_0x425e70,_0x1b2fb3);}function fe(_0x2fe708,_0x3729f4,_0x426bac){const _0x45187f=_0x4b9f04;_0x2fe708[_0x45187f(0x279)]=b(_0x2fe708[_0x45187f(0x279)],_0x3729f4,_0x426bac),_0x2fe708['sectionBreaks']=b(_0x2fe708['sectionBreaks'],_0x3729f4,_0x426bac),_0x2fe708[_0x45187f(0x250)]=b(_0x2fe708[_0x45187f(0x250)],_0x3729f4,_0x426bac),_0x2fe708[_0x45187f(0x164)]=me(_0x2fe708[_0x45187f(0x164)],_0x3729f4,_0x426bac),_0x2fe708['tables']=he(_0x2fe708['tables'],_0x3729f4,_0x426bac),_0x2fe708[_0x45187f(0x148)]=S(_0x2fe708[_0x45187f(0x148)],_0x3729f4,_0x426bac),_0x2fe708[_0x45187f(0x18d)]=S(_0x2fe708[_0x45187f(0x18d)],_0x3729f4,_0x426bac),_0x2fe708[_0x45187f(0x23b)]=S(_0x2fe708['customDecorations'],_0x3729f4,_0x426bac),_0x2fe708[_0x45187f(0x266)]=S(_0x2fe708['blockRanges'],_0x3729f4,_0x426bac);}function pe(_0x108b94,_0x2c937e,_0x3311c6){const _0x244356=_0x4b9f04;var _0x38e6c3,_0x2963b9;_0x108b94[_0x244356(0x279)]=x(_0x108b94[_0x244356(0x279)],_0x2c937e,_0x3311c6),_0x108b94[_0x244356(0x1ed)]=x(_0x108b94['sectionBreaks'],_0x2c937e,_0x3311c6),_0x108b94[_0x244356(0x250)]=x(_0x108b94[_0x244356(0x250)],_0x2c937e,_0x3311c6),_0x108b94[_0x244356(0x164)]=(_0x38e6c3=w((_0x2963b9=_0x108b94['textRuns'])==null?void 0x0:_0x2963b9[_0x244356(0x210)](_0x2f1c78=>({..._0x2f1c78,'startIndex':_0x2f1c78['st'],'endIndex':_0x2f1c78['ed']})),_0x2c937e,_0x3311c6))==null?void 0x0:_0x38e6c3['map'](_0xc8756=>{let {startIndex:_0xf79755,endIndex:_0x1ba621,..._0x50af6f}=_0xc8756;return{..._0x50af6f,'st':_0xf79755,'ed':_0x1ba621};}),_0x108b94[_0x244356(0x214)]=w(_0x108b94['tables'],_0x2c937e,_0x3311c6),_0x108b94[_0x244356(0x148)]=C(_0x108b94[_0x244356(0x148)],_0x2c937e,_0x3311c6),_0x108b94[_0x244356(0x18d)]=C(_0x108b94['customRanges'],_0x2c937e,_0x3311c6),_0x108b94[_0x244356(0x23b)]=C(_0x108b94[_0x244356(0x23b)],_0x2c937e,_0x3311c6),_0x108b94['blockRanges']=C(_0x108b94[_0x244356(0x266)],_0x2c937e,_0x3311c6);}function b(_0x465167,_0x43b6f8,_0x571306){const _0x1ab714=_0x4b9f04;return _0x465167==null?void 0x0:_0x465167[_0x1ab714(0x210)](_0x589233=>_0x589233['startIndex']>=_0x43b6f8?{..._0x589233,'startIndex':_0x589233[_0x1ab714(0x1be)]+_0x571306}:_0x589233);}function x(_0x523113,_0xd3c2e1,_0x366a40){const _0x252e86=_0x4b9f04;let _0x58cd85=_0xd3c2e1+_0x366a40;return _0x523113==null?void 0x0:_0x523113[_0x252e86(0x210)](_0x366274=>_0x366274['startIndex']>=_0xd3c2e1&&_0x366274[_0x252e86(0x1be)]<_0x58cd85?null:_0x366274[_0x252e86(0x1be)]>=_0x58cd85?{..._0x366274,'startIndex':_0x366274[_0x252e86(0x1be)]-_0x366a40}:_0x366274)['filter'](_0xc0ad35=>_0xc0ad35!=null);}function me(_0x2005e5,_0x1fb804,_0xe7d868){const _0x5cbac0=_0x4b9f04;return _0x2005e5==null?void 0x0:_0x2005e5[_0x5cbac0(0x210)](_0x88d907=>_0x88d907['st']>=_0x1fb804?{..._0x88d907,'st':_0x88d907['st']+_0xe7d868,'ed':_0x88d907['ed']+_0xe7d868}:_0x88d907['ed']>_0x1fb804?{..._0x88d907,'ed':_0x88d907['ed']+_0xe7d868}:_0x88d907);}function S(_0x5b289b,_0x42b074,_0x23cb50){const _0x1c23e6=_0x4b9f04;return _0x5b289b==null?void 0x0:_0x5b289b['map'](_0x54efce=>(0x0,t[_0x1c23e6(0x15a)])(_0x54efce,_0x42b074,_0x23cb50));}function he(_0xc7ead4,_0x1debde,_0x3d9985){const _0x5220d0=_0x4b9f04;return _0xc7ead4==null?void 0x0:_0xc7ead4[_0x5220d0(0x210)](_0x36ccd3=>(0x0,t['shiftExclusiveRangeOnInsert'])(_0x36ccd3,_0x1debde,_0x3d9985));}function C(_0x478903,_0x5bcd0c,_0x5b06bf){const _0x5d7b29=_0x4b9f04;return _0x478903==null?void 0x0:_0x478903[_0x5d7b29(0x210)](_0x43580d=>(0x0,t['shiftInclusiveRangeOnDelete'])(_0x43580d,_0x5bcd0c,_0x5b06bf))[_0x5d7b29(0x1c3)](_0x3499d8=>_0x3499d8!=null);}function w(_0x216499,_0x206350,_0xbd0d8){const _0xc7404b=_0x4b9f04;return _0x216499==null?void 0x0:_0x216499[_0xc7404b(0x210)](_0x54eb34=>(0x0,t[_0xc7404b(0x1cf)])(_0x54eb34,_0x206350,_0xbd0d8))[_0xc7404b(0x1c3)](_0x271855=>_0x271855!=null);}function T(_0x2f37f9){const _0x4e81e6=_0x4b9f04;if(!_0x2f37f9['body'])throw Error(_0x4e81e6(0x1f4));return _0x2f37f9[_0x4e81e6(0x182)];}function E(_0x42faee){'@babel/helpers - typeof';const _0x54c17d=_0x4b9f04;return E=typeof Symbol==_0x54c17d(0x238)&&typeof Symbol[_0x54c17d(0x154)]==_0x54c17d(0x1af)?function(_0x174415){return typeof _0x174415;}:function(_0x4c089f){const _0x56101d=_0x54c17d;return _0x4c089f&&typeof Symbol=='function'&&_0x4c089f['constructor']===Symbol&&_0x4c089f!==Symbol['prototype']?_0x56101d(0x1af):typeof _0x4c089f;},E(_0x42faee);}function ge(_0x492f9f,_0x3034e7){const _0x161473=_0x4b9f04;if(E(_0x492f9f)!=_0x161473(0x1ff)||!_0x492f9f)return _0x492f9f;var _0x5f0013;if(typeof Symbol<'u'&&(_0x5f0013=_0x492f9f[Symbol[_0x161473(0x1a8)]])!==void 0x0){var _0x830d23=_0x5f0013['call'](_0x492f9f,_0x3034e7||'default');if(E(_0x830d23)!=_0x161473(0x1ff))return _0x830d23;throw TypeError(_0x161473(0x25c));}return(_0x3034e7===_0x161473(0x1c9)?String:Number)(_0x492f9f);}function _e(_0x5e7792){const _0x2adb20=_0x4b9f04;var _0x363aa4=ge(_0x5e7792,_0x2adb20(0x1c9));return E(_0x363aa4)==_0x2adb20(0x1af)?_0x363aa4:_0x363aa4+'';}function D(_0x35c511,_0x440ece,_0x272a6a){return(_0x440ece=_e(_0x440ece))in _0x35c511?Object['defineProperty'](_0x35c511,_0x440ece,{'value':_0x272a6a,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x35c511[_0x440ece]=_0x272a6a,_0x35c511;}var O=class extends t[_0x4b9f04(0x252)]{constructor(..._0x4f4887){const _0x4a3f0e=_0x4b9f04;super(..._0x4f4887),D(this,'_resources',new Map()),D(this,'_rawResources',new Map()),D(this,_0x4a3f0e(0x1ac),new Map()),D(this,'_change$',new i['Subject']()),D(this,_0x4a3f0e(0x1e5),this['_change$'][_0x4a3f0e(0x1d8)]());}[_0x4b9f04(0x24f)](_0x359615,_0x3c13bc){const _0x2065b5=_0x4b9f04;var _0xdc6f56;let _0x11a8d7=(_0xdc6f56=this[_0x2065b5(0x200)][_0x2065b5(0x1a2)](_0x359615))==null?void 0x0:_0xdc6f56['formulas'][_0x3c13bc];return _0x11a8d7?t[_0x2065b5(0x192)][_0x2065b5(0x161)](_0x11a8d7):void 0x0;}[_0x4b9f04(0x193)](_0x57a7d7){const _0x52aa5c=_0x4b9f04;var _0x5d2437;return t[_0x52aa5c(0x192)][_0x52aa5c(0x161)](((_0x5d2437=this[_0x52aa5c(0x200)]['get'](_0x57a7d7))==null?void 0x0:_0x5d2437[_0x52aa5c(0x15c)])??{});}[_0x4b9f04(0x21a)](_0xfac344){const _0x52b988=_0x4b9f04;let _0x5b8b9c=this[_0x52b988(0x200)][_0x52b988(0x1a2)](_0xfac344);return _0x5b8b9c?t[_0x52b988(0x192)][_0x52b988(0x161)](_0x5b8b9c):void 0x0;}[_0x4b9f04(0x167)](_0x96fa14,_0x7a2820,_0x47aa6c){return this['setFormulas'](_0x96fa14,{[_0x7a2820]:_0x47aa6c});}[_0x4b9f04(0x1b0)](_0x2c5274,_0x273f55){const _0x2304c7=_0x4b9f04;return this['_loadErrors'][_0x2304c7(0x160)](_0x2c5274)||!l(_0x273f55)?!0x1:(this[_0x2304c7(0x200)][_0x2304c7(0x22c)](_0x2c5274,{'formulas':t[_0x2304c7(0x192)][_0x2304c7(0x161)](_0x273f55[_0x2304c7(0x15c)])}),this[_0x2304c7(0x196)][_0x2304c7(0x23c)]({'unitId':_0x2c5274}),!0x0);}[_0x4b9f04(0x226)](_0x429370,_0x200779){const _0x575d86=_0x4b9f04;if(this[_0x575d86(0x1ac)][_0x575d86(0x160)](_0x429370)||!Object[_0x575d86(0x259)](_0x200779)['length']||!l({'formulas':_0x200779}))return!0x1;let _0x51bd7=this[_0x575d86(0x200)][_0x575d86(0x1a2)](_0x429370)??c(),_0x2ed616=t[_0x575d86(0x192)][_0x575d86(0x161)](_0x51bd7);return Object[_0x575d86(0x176)](_0x2ed616[_0x575d86(0x15c)],t['Tools']['deepClone'](_0x200779)),this[_0x575d86(0x200)][_0x575d86(0x22c)](_0x429370,_0x2ed616),this[_0x575d86(0x196)][_0x575d86(0x23c)]({'unitId':_0x429370,'rangeIds':Object[_0x575d86(0x259)](_0x200779)}),!0x0;}[_0x4b9f04(0x276)](_0x16e39f,_0x212158){const _0x47f2fd=_0x4b9f04;if(this[_0x47f2fd(0x1ac)][_0x47f2fd(0x160)](_0x16e39f))return!0x1;let _0x29cf45=this[_0x47f2fd(0x200)][_0x47f2fd(0x1a2)](_0x16e39f);if(!(_0x29cf45!=null&&_0x29cf45[_0x47f2fd(0x15c)][_0x212158]))return!0x1;let _0x33233c=t['Tools'][_0x47f2fd(0x161)](_0x29cf45);return delete _0x33233c[_0x47f2fd(0x15c)][_0x212158],this['_resources']['set'](_0x16e39f,_0x33233c),this[_0x47f2fd(0x196)]['next']({'unitId':_0x16e39f,'rangeIds':[_0x212158]}),!0x0;}[_0x4b9f04(0x1c6)](_0x27fa56,_0x24867d){const _0x19d805=_0x4b9f04;return l(_0x24867d)?(this[_0x19d805(0x200)][_0x19d805(0x22c)](_0x27fa56,{'formulas':t[_0x19d805(0x192)][_0x19d805(0x161)](_0x24867d[_0x19d805(0x15c)])}),this['_rawResources']['delete'](_0x27fa56),this[_0x19d805(0x1ac)][_0x19d805(0x163)](_0x27fa56),this['_change$']['next']({'unitId':_0x27fa56}),!0x0):(this[_0x19d805(0x20d)](_0x27fa56,_0x24867d,_0x19d805(0x17e)),!0x1);}[_0x4b9f04(0x20e)](_0x2b2402){const _0x284962=_0x4b9f04;let _0x102793=this[_0x284962(0x200)][_0x284962(0x1a2)](_0x2b2402);return _0x102793?t['Tools'][_0x284962(0x161)](_0x102793):this[_0x284962(0x20c)][_0x284962(0x160)](_0x2b2402)?t[_0x284962(0x192)][_0x284962(0x161)](this[_0x284962(0x20c)]['get'](_0x2b2402)):c();}['getLoadError'](_0x52bf9f){const _0x2be50e=_0x4b9f04;return this['_loadErrors'][_0x2be50e(0x1a2)](_0x52bf9f);}[_0x4b9f04(0x208)](_0x2d4b3a){const _0x470d8f=_0x4b9f04;this[_0x470d8f(0x200)]['delete'](_0x2d4b3a),this[_0x470d8f(0x20c)]['delete'](_0x2d4b3a),this['_loadErrors'][_0x470d8f(0x163)](_0x2d4b3a),this['_change$'][_0x470d8f(0x23c)]({'unitId':_0x2d4b3a});}[_0x4b9f04(0x19d)](){const _0x54118a=_0x4b9f04;this[_0x54118a(0x200)]['clear'](),this['_rawResources'][_0x54118a(0x1e1)](),this[_0x54118a(0x1ac)][_0x54118a(0x1e1)](),this[_0x54118a(0x196)]['complete'](),super[_0x54118a(0x19d)]();}['_preserveInvalid'](_0x2ffd33,_0xf83a45,_0x9a2c3){const _0x49a3ad=_0x4b9f04;this[_0x49a3ad(0x200)]['delete'](_0x2ffd33),this[_0x49a3ad(0x20c)][_0x49a3ad(0x22c)](_0x2ffd33,t[_0x49a3ad(0x192)]['deepClone'](_0xf83a45)),this[_0x49a3ad(0x1ac)]['set'](_0x2ffd33,_0x9a2c3),this[_0x49a3ad(0x196)][_0x49a3ad(0x23c)]({'unitId':_0x2ffd33});}};let ve=function(_0x1670ca){const _0xcf4eea=_0x4b9f04;return _0x1670ca[_0xcf4eea(0x24e)]=_0xcf4eea(0x25d),_0x1670ca[_0xcf4eea(0x1de)]='pending',_0x1670ca[_0xcf4eea(0x1d5)]=_0xcf4eea(0x244),_0x1670ca[_0xcf4eea(0x216)]=_0xcf4eea(0x1bf),_0x1670ca;}({});function k(_0x54c02e,_0x25ed9f){return function(_0x1c2db3,_0x5213f1){_0x25ed9f(_0x1c2db3,_0x5213f1,_0x54c02e);};}function A(_0x4ca975,_0x1ea85e,_0x49f1a1,_0x32f0a9){const _0x2048c7=_0x4b9f04;var _0x19f2c7=arguments[_0x2048c7(0x16a)],_0x2da447=_0x19f2c7<0x3?_0x1ea85e:_0x32f0a9===null?_0x32f0a9=Object[_0x2048c7(0x263)](_0x1ea85e,_0x49f1a1):_0x32f0a9,_0x328781;if(typeof Reflect=='object'&&typeof Reflect[_0x2048c7(0x1eb)]==_0x2048c7(0x238))_0x2da447=Reflect[_0x2048c7(0x1eb)](_0x4ca975,_0x1ea85e,_0x49f1a1,_0x32f0a9);else{for(var _0x148a97=_0x4ca975[_0x2048c7(0x16a)]-0x1;_0x148a97>=0x0;_0x148a97--)(_0x328781=_0x4ca975[_0x148a97])&&(_0x2da447=(_0x19f2c7<0x3?_0x328781(_0x2da447):_0x19f2c7>0x3?_0x328781(_0x1ea85e,_0x49f1a1,_0x2da447):_0x328781(_0x1ea85e,_0x49f1a1))||_0x2da447);}return _0x19f2c7>0x3&&_0x2da447&&Object[_0x2048c7(0x1a1)](_0x1ea85e,_0x49f1a1,_0x2da447),_0x2da447;}let j=class extends t[_0x4b9f04(0x252)]{constructor(_0x23a585,_0x40792f,_0x2f5e01){const _0x6fdf3b=_0x4b9f04;super(),this[_0x6fdf3b(0x262)]=_0x23a585,this[_0x6fdf3b(0x273)]=_0x40792f,this[_0x6fdf3b(0x1b7)]=_0x2f5e01,D(this,'_registrations',new Map()),D(this,_0x6fdf3b(0x1bc),new Map()),D(this,_0x6fdf3b(0x23d),new i['Subject']()),D(this,'presentationChanged$',this[_0x6fdf3b(0x23d)]['asObservable']()),this[_0x6fdf3b(0x260)](this[_0x6fdf3b(0x273)][_0x6fdf3b(0x215)]['subscribe'](_0x356131=>{const _0x3c0e7d=_0x6fdf3b;for(let _0x43ca30 of Object[_0x3c0e7d(0x231)](_0x356131))for(let _0x2dec0d of Object['values'](_0x43ca30))_0x2dec0d[_0x3c0e7d(0x21f)](_0x8094b8=>this[_0x3c0e7d(0x1e6)](_0x8094b8));}));}[_0x4b9f04(0x264)](_0x2af3ae){const _0x183183=_0x4b9f04;var _0xe4bc59;let _0x27dbda=_0x2af3ae['getUnitId'](),_0x598be3=((_0xe4bc59=_0x2af3ae['getSnapshot']()[_0x183183(0x182)])==null||(_0xe4bc59=_0xe4bc59['customRanges'])==null?void 0x0:_0xe4bc59[_0x183183(0x1c3)](g))??[],_0x310a1e=this['_model'][_0x183183(0x193)](_0x27dbda),_0x49a26b=new Set();for(let _0x12bd42 of _0x598be3){let _0x9992d=_0x310a1e[_0x12bd42[_0x183183(0x25f)]];_0x9992d&&(_0x49a26b['add'](M(_0x27dbda,_0x12bd42[_0x183183(0x25f)])),this['register']({'unitId':_0x27dbda,'rangeId':_0x12bd42[_0x183183(0x25f)]},_0x9992d));}for(let _0x1e2b24 of Array['from'](this[_0x183183(0x1b4)][_0x183183(0x231)]()))_0x1e2b24['unitId']===_0x27dbda&&!_0x49a26b[_0x183183(0x160)](M(_0x1e2b24[_0x183183(0x229)],_0x1e2b24['rangeId']))&&this[_0x183183(0x174)](_0x1e2b24);}[_0x4b9f04(0x247)](_0x455613,_0x37ae30){const _0x446b2a=_0x4b9f04;let _0x2767aa=M(_0x455613[_0x446b2a(0x229)],_0x455613[_0x446b2a(0x25f)]),_0x42cddd=this[_0x446b2a(0x1b4)][_0x446b2a(0x1a2)](_0x2767aa),_0x66b4e0=this['_hostExternalReferenceModel']['getRevision'](_0x455613[_0x446b2a(0x229)]);if(_0x42cddd&&_0x42cddd[_0x446b2a(0x26e)]['formula']===_0x37ae30[_0x446b2a(0x1bd)]&&_0x42cddd['referenceRevision']===_0x66b4e0){_0x42cddd[_0x446b2a(0x26e)]=_0x37ae30;let _0x9eef01=_0x42cddd[_0x446b2a(0x25e)]?this[_0x446b2a(0x273)][_0x446b2a(0x1aa)](_0x42cddd[_0x446b2a(0x229)],_0x42cddd[_0x446b2a(0x229)],_0x42cddd[_0x446b2a(0x25e)])??void 0x0:void 0x0;_0x42cddd[_0x446b2a(0x267)]=_0x9eef01,this['_setPresentation'](_0x2767aa,N(_0x37ae30,_0x9eef01));return;}_0x42cddd!=null&&_0x42cddd['formulaId']&&this['_deleteRegistration'](_0x42cddd);let _0x2dec2a={..._0x455613,'config':_0x37ae30,'referenceRevision':_0x66b4e0,'presentation':N(_0x37ae30,void 0x0)};if(this[_0x446b2a(0x1b4)][_0x446b2a(0x22c)](_0x2767aa,_0x2dec2a),!_0x37ae30['formula'][_0x446b2a(0x1b8)]())return;let _0x1fce3e=this[_0x446b2a(0x273)][_0x446b2a(0x257)](_0x455613[_0x446b2a(0x229)],_0x455613[_0x446b2a(0x229)],_0x37ae30[_0x446b2a(0x1bd)],void 0x0,{'rangeId':_0x455613[_0x446b2a(0x25f)]},r[_0x446b2a(0x16b)][_0x446b2a(0x1a3)],_0x455613[_0x446b2a(0x25f)]);_0x2dec2a[_0x446b2a(0x25e)]=_0x1fce3e,this[_0x446b2a(0x1bc)][_0x446b2a(0x22c)](_0x1fce3e,_0x2767aa);}['unregister'](_0x984034){const _0x377cab=_0x4b9f04;let _0x29a0f2=M(_0x984034[_0x377cab(0x229)],_0x984034[_0x377cab(0x25f)]),_0x5e4458=this[_0x377cab(0x1b4)][_0x377cab(0x1a2)](_0x29a0f2);_0x5e4458&&(this['_deleteRegistration'](_0x5e4458),this[_0x377cab(0x1b4)]['delete'](_0x29a0f2));}['unregisterUnit'](_0x12164a){const _0x515ffc=_0x4b9f04;for(let _0x19a62b of Array[_0x515ffc(0x1e7)](this['_registrations'][_0x515ffc(0x231)]()))_0x19a62b[_0x515ffc(0x229)]===_0x12164a&&this[_0x515ffc(0x174)](_0x19a62b);}[_0x4b9f04(0x1c8)](_0x1aa98e){const _0xd40a2=_0x4b9f04;var _0x2c22db;return(_0x2c22db=this[_0xd40a2(0x1b4)]['get'](M(_0x1aa98e[_0xd40a2(0x229)],_0x1aa98e[_0xd40a2(0x25f)])))==null?void 0x0:_0x2c22db['presentation'];}['getResult'](_0x28fe86){const _0x3836f0=_0x4b9f04;let _0x8d79f9=this[_0x3836f0(0x1b4)][_0x3836f0(0x1a2)](M(_0x28fe86[_0x3836f0(0x229)],_0x28fe86[_0x3836f0(0x25f)]));return _0x8d79f9?P(_0x8d79f9):void 0x0;}[_0x4b9f04(0x19a)](){const _0x434124=_0x4b9f04;return Array[_0x434124(0x1e7)](this[_0x434124(0x1b4)][_0x434124(0x231)](),_0x35390d=>({'identity':{'unitId':_0x35390d[_0x434124(0x229)],'rangeId':_0x35390d[_0x434124(0x25f)]},'config':_0x35390d['config'],'referenceRevision':_0x35390d[_0x434124(0x198)],..._0x35390d['liveResult']?{'liveResult':_0x35390d[_0x434124(0x267)]}:null}));}[_0x4b9f04(0x19d)](){const _0x336307=_0x4b9f04;for(let _0x5c0e2a of this['_registrations'][_0x336307(0x231)]())this['_deleteRegistration'](_0x5c0e2a);this[_0x336307(0x1b4)][_0x336307(0x1e1)](),this[_0x336307(0x1bc)]['clear'](),this[_0x336307(0x23d)][_0x336307(0x171)](),super[_0x336307(0x19d)]();}['_updateFormulaResult'](_0x3d4a32){const _0x5adcfd=_0x4b9f04;let _0x125632=this[_0x5adcfd(0x1bc)][_0x5adcfd(0x1a2)](_0x3d4a32[_0x5adcfd(0x25e)]),_0x392d46=_0x125632?this[_0x5adcfd(0x1b4)][_0x5adcfd(0x1a2)](_0x125632):void 0x0;_0x125632&&_0x392d46&&(_0x392d46[_0x5adcfd(0x267)]=_0x3d4a32,this[_0x5adcfd(0x180)](_0x125632,N(_0x392d46[_0x5adcfd(0x26e)],_0x3d4a32)));}[_0x4b9f04(0x180)](_0x2147cc,_0x1fc847){const _0x144f2a=_0x4b9f04;var _0x534588,_0x586ada;let _0xe517bd=this[_0x144f2a(0x1b4)]['get'](_0x2147cc);if(!_0xe517bd||ye(_0xe517bd[_0x144f2a(0x22d)],_0x1fc847))return;let _0x21e9ca=_0xe517bd[_0x144f2a(0x22d)],_0x59ccd1=P(_0xe517bd);_0xe517bd[_0x144f2a(0x22d)]=_0x1fc847,this[_0x144f2a(0x23d)][_0x144f2a(0x23c)]({'unitId':_0xe517bd[_0x144f2a(0x229)],'rangeId':_0xe517bd[_0x144f2a(0x25f)],'presentation':_0x1fc847,'previousPresentation':_0x21e9ca,'result':P(_0xe517bd),'previousResult':{..._0x59ccd1,..._0x21e9ca,'value':(_0x534588=_0x21e9ca[_0x144f2a(0x1b5)])==null?void 0x0:_0x534588['v'],'valueType':((_0x586ada=_0x21e9ca['cell'])==null?void 0x0:_0x586ada['t'])??void 0x0}});}[_0x4b9f04(0x270)](_0x830796){const _0x4f56cb=_0x4b9f04;_0x830796[_0x4f56cb(0x25e)]&&(this[_0x4f56cb(0x273)]['deleteFormula'](_0x830796[_0x4f56cb(0x229)],_0x830796[_0x4f56cb(0x229)],[_0x830796[_0x4f56cb(0x25e)]]),this['_formulaKeys']['delete'](_0x830796[_0x4f56cb(0x25e)]));}};j=A([k(0x0,(0x0,t['Inject'])(O)),k(0x1,(0x0,t['Inject'])(r[_0x4b9f04(0x1f1)])),k(0x2,(0x0,t[_0x4b9f04(0x187)])(e[_0x4b9f04(0x155)]))],j);function M(_0x56d6fa,_0x1f26b1){return _0x56d6fa+'\x00'+_0x1f26b1;}function N(_0x44049e,_0x110505){const _0xf533a6=_0x4b9f04;return(0x0,e[_0xf533a6(0x15d)])({'numberFormat':_0x44049e[_0xf533a6(0x240)],'lastValue':_0x44049e['lastValue'],'result':_0x110505});}function P(_0x1333ff){const _0x589c5b=_0x4b9f04;var _0xb5344b,_0x37532d,_0x1cb4b7;let _0x2b14c8=_0x1333ff['presentation'],_0x3f01aa=_0x1333ff[_0x589c5b(0x26e)][_0x589c5b(0x1bd)][_0x589c5b(0x1b8)]()?_0x2b14c8[_0x589c5b(0x213)]||_0x2b14c8[_0x589c5b(0x1b5)]==null?_0x589c5b(0x1c7):((_0xb5344b=_0x1333ff['liveResult'])==null?void 0x0:_0xb5344b[_0x589c5b(0x1d1)])===r[_0x589c5b(0x17d)]['ERROR']?'error':_0x589c5b(0x244):_0x589c5b(0x25d);return{..._0x2b14c8,'status':_0x3f01aa,'value':(_0x37532d=_0x2b14c8[_0x589c5b(0x1b5)])==null?void 0x0:_0x37532d['v'],'valueType':((_0x1cb4b7=_0x2b14c8[_0x589c5b(0x1b5)])==null?void 0x0:_0x1cb4b7['t'])??void 0x0};}function ye(_0x10dd63,_0x339f07){const _0x155063=_0x4b9f04;var _0x52f30c,_0x234330,_0x1c4271,_0x1406da;return _0x10dd63[_0x155063(0x186)]===_0x339f07[_0x155063(0x186)]&&_0x10dd63[_0x155063(0x274)]===_0x339f07[_0x155063(0x274)]&&_0x10dd63[_0x155063(0x1a0)]===_0x339f07['pattern']&&_0x10dd63[_0x155063(0x199)]===_0x339f07['source']&&_0x10dd63['stale']===_0x339f07[_0x155063(0x213)]&&((_0x52f30c=_0x10dd63['cell'])==null?void 0x0:_0x52f30c['t'])===((_0x234330=_0x339f07['cell'])==null?void 0x0:_0x234330['t'])&&Object['is']((_0x1c4271=_0x10dd63['cell'])==null?void 0x0:_0x1c4271['v'],(_0x1406da=_0x339f07[_0x155063(0x1b5)])==null?void 0x0:_0x1406da['v']);}function _0x3404(_0x40387d,_0x1e68e6){_0x40387d=_0x40387d-0x147;const _0x17d407=_0x17d4();let _0x3404b6=_0x17d407[_0x40387d];return _0x3404b6;}const F={'id':_0x4b9f04(0x1e9),'type':t[_0x4b9f04(0x1ef)][_0x4b9f04(0x225)],'handler':(_0x4e9c71,_0x3f3809)=>!(_0x3f3809!=null&&_0x3f3809[_0x4b9f04(0x229)])||!_0x3f3809[_0x4b9f04(0x25f)]||!_0x3f3809['config']?!0x1:_0x4e9c71[_0x4b9f04(0x1a2)](O)[_0x4b9f04(0x167)](_0x3f3809[_0x4b9f04(0x229)],_0x3f3809[_0x4b9f04(0x25f)],_0x3f3809[_0x4b9f04(0x26e)])},I={'id':'docs-formula.mutation.remove-formula','type':t[_0x4b9f04(0x1ef)]['MUTATION'],'handler':(_0x2f8e22,_0x52d641)=>!(_0x52d641!=null&&_0x52d641[_0x4b9f04(0x229)])||!_0x52d641['rangeId']?!0x1:_0x2f8e22['get'](O)[_0x4b9f04(0x276)](_0x52d641[_0x4b9f04(0x229)],_0x52d641[_0x4b9f04(0x25f)])},L={'id':_0x4b9f04(0x24b),'type':t[_0x4b9f04(0x1ef)][_0x4b9f04(0x225)],'handler':(_0x157657,_0x259aa4)=>!(_0x259aa4!=null&&_0x259aa4[_0x4b9f04(0x229)])||!_0x259aa4[_0x4b9f04(0x277)]?!0x1:_0x157657[_0x4b9f04(0x1a2)](O)[_0x4b9f04(0x1b0)](_0x259aa4[_0x4b9f04(0x229)],_0x259aa4[_0x4b9f04(0x277)])},R={'id':_0x4b9f04(0x1a6),'type':t[_0x4b9f04(0x1ef)]['MUTATION'],'handler':(_0x332c97,_0x3bbd68)=>{const _0x316be7=_0x4b9f04;if(!(_0x3bbd68!=null&&_0x3bbd68['unitId'])||!_0x3bbd68[_0x316be7(0x1b1)][_0x316be7(0x16a)])return!0x1;let _0x3b4b8d=_0x332c97[_0x316be7(0x1a2)](O),_0x55849e=_0x332c97[_0x316be7(0x1a2)](e[_0x316be7(0x155)]),_0x5b0352=_0x3b4b8d[_0x316be7(0x21a)](_0x3bbd68['unitId']);if(!_0x5b0352)return!0x1;let _0x49eb6e=t['Tools'][_0x316be7(0x161)](_0x5b0352),_0x2d7509=!0x1;for(let _0x2c7920 of _0x3bbd68[_0x316be7(0x1b1)]){var _0x771d9f,_0x2ba3b3,_0x17835b,_0x2afc78;let _0xab70c2=_0x49eb6e['formulas'][_0x2c7920[_0x316be7(0x25f)]];_0xab70c2&&_0xab70c2['formula']===_0x2c7920[_0x316be7(0x1f0)]&&((_0x771d9f=_0xab70c2[_0x316be7(0x240)])==null?void 0x0:_0x771d9f[_0x316be7(0x1a0)])===_0x2c7920[_0x316be7(0x206)]&&_0x55849e[_0x316be7(0x23a)](_0x3bbd68[_0x316be7(0x229)])===_0x2c7920[_0x316be7(0x224)]&&(((_0x2ba3b3=_0xab70c2['lastValue'])==null?void 0x0:_0x2ba3b3['v'])!==_0x2c7920['lastValue']['v']||((_0x17835b=_0xab70c2[_0x316be7(0x209)])==null?void 0x0:_0x17835b['t'])!==_0x2c7920['lastValue']['t']||((_0x2afc78=_0xab70c2[_0x316be7(0x209)])==null?void 0x0:_0x2afc78[_0x316be7(0x1a0)])!==_0x2c7920[_0x316be7(0x209)][_0x316be7(0x1a0)])&&(_0xab70c2['lastValue']=t['Tools'][_0x316be7(0x161)](_0x2c7920[_0x316be7(0x209)]),_0x2d7509=!0x0);}return!_0x2d7509||_0x3b4b8d[_0x316be7(0x1b0)](_0x3bbd68['unitId'],_0x49eb6e);}},z={'id':_0x4b9f04(0x158),'type':t['CommandType']['COMMAND'],'handler':(_0x32cef4,_0x2e6a73)=>{const _0x2d7bc1=_0x4b9f04;if(!(_0x2e6a73!=null&&_0x2e6a73[_0x2d7bc1(0x1bd)][_0x2d7bc1(0x1b8)]()))return!0x1;let _0x3e6d8c=K(_0x32cef4,_0x2e6a73[_0x2d7bc1(0x229)],'');if(!_0x3e6d8c)return!0x1;let _0x54526f=xe(_0x2e6a73[_0x2d7bc1(0x249)],_0x3e6d8c['body'],be(_0x32cef4,_0x3e6d8c['unitId']));if(!_0x54526f)return!0x1;let _0x3fb60d=Se(_0x32cef4,_0x3e6d8c['unitId'],_0x2e6a73[_0x2d7bc1(0x1bd)],_0x2e6a73[_0x2d7bc1(0x248)]??[]);if(!_0x3fb60d)return!0x1;let _0x114c3e=Ce(_0x3e6d8c['body'],_0x3e6d8c[_0x2d7bc1(0x207)],_0x3e6d8c[_0x2d7bc1(0x229)]),_0x2155e2=we({'documentData':_0x3e6d8c[_0x2d7bc1(0x21e)],'resource':_0x3e6d8c[_0x2d7bc1(0x277)],'rangeId':_0x114c3e,'config':{'formula':_0x2e6a73[_0x2d7bc1(0x1bd)],..._0x2e6a73[_0x2d7bc1(0x240)]?{'numberFormat':_0x2e6a73[_0x2d7bc1(0x240)]}:null},'startOffset':_0x54526f[_0x2d7bc1(0x1dd)],'endOffset':_0x54526f[_0x2d7bc1(0x27b)]});if(!_0x2155e2)return!0x1;let _0x52ba01=(0x0,e[_0x2d7bc1(0x1f8)])(_0x32cef4,_0x3e6d8c[_0x2d7bc1(0x229)],_0x3fb60d);return!_0x52ba01||!q({'accessor':_0x32cef4,'document':_0x3e6d8c[_0x2d7bc1(0x175)],'unitId':_0x3e6d8c[_0x2d7bc1(0x229)],'trigger':z['id'],'rangeId':_0x114c3e,'previousResource':_0x3e6d8c['resource'],'nextResource':_0x2155e2[_0x2d7bc1(0x26c)],'previousDocumentData':_0x3e6d8c[_0x2d7bc1(0x21e)],'nextDocumentData':_0x2155e2[_0x2d7bc1(0x173)],'cursorOffset':_0x2155e2[_0x2d7bc1(0x24a)],'externalMutations':_0x52ba01})?!0x1:{'rangeId':_0x114c3e,'startOffset':_0x2155e2[_0x2d7bc1(0x24a)]-0x1,'endOffset':_0x2155e2[_0x2d7bc1(0x24a)]};}},B={'id':'docs-formula.command.update','type':t[_0x4b9f04(0x1ef)][_0x4b9f04(0x1a9)],'handler':(_0x5ef187,_0x51c876)=>{const _0x37e2ce=_0x4b9f04;if(!(_0x51c876!=null&&_0x51c876[_0x37e2ce(0x25f)])||!_0x51c876[_0x37e2ce(0x1bd)][_0x37e2ce(0x1b8)]())return!0x1;let _0x5ab835=K(_0x5ef187,_0x51c876[_0x37e2ce(0x229)],''),_0x1f7f29=_0x5ab835==null?void 0x0:_0x5ab835[_0x37e2ce(0x207)][_0x37e2ce(0x24f)](_0x5ab835['unitId'],_0x51c876['rangeId']),_0x1054fe=_0x5ab835?_(_0x5ab835[_0x37e2ce(0x21e)][_0x37e2ce(0x182)],_0x51c876[_0x37e2ce(0x25f)]):void 0x0;if(!_0x5ab835||!_0x1f7f29||!_0x1054fe)return!0x1;let _0x355507=Se(_0x5ef187,_0x5ab835[_0x37e2ce(0x229)],_0x51c876[_0x37e2ce(0x1bd)],_0x51c876[_0x37e2ce(0x248)]??[]);if(!_0x355507)return!0x1;let _0x59b14b=(0x0,e[_0x37e2ce(0x1f8)])(_0x5ef187,_0x5ab835[_0x37e2ce(0x229)],_0x355507);if(!_0x59b14b)return!0x1;let _0x143cf0=je(_0x5ab835['resource']);return _0x143cf0[_0x37e2ce(0x15c)][_0x51c876[_0x37e2ce(0x25f)]]={'formula':_0x51c876[_0x37e2ce(0x1bd)],..._0x51c876[_0x37e2ce(0x240)]?{'numberFormat':_0x51c876['numberFormat']}:_0x1f7f29['numberFormat']?{'numberFormat':_0x1f7f29[_0x37e2ce(0x240)]}:null},q({'accessor':_0x5ef187,'document':_0x5ab835[_0x37e2ce(0x175)],'unitId':_0x5ab835[_0x37e2ce(0x229)],'trigger':B['id'],'rangeId':_0x51c876[_0x37e2ce(0x25f)],'previousResource':_0x5ab835['resource'],'nextResource':_0x143cf0,'cursorOffset':_0x1054fe[_0x37e2ce(0x181)]+0x1,'externalMutations':_0x59b14b});}},V={'id':'docs-formula.command.set-number-format','type':t['CommandType']['COMMAND'],'handler':(_0x3c6f1c,_0x59d9c7)=>{const _0x77e472=_0x4b9f04;if(!(_0x59d9c7!=null&&_0x59d9c7[_0x77e472(0x25f)]))return!0x1;let _0x57b631=K(_0x3c6f1c,_0x59d9c7[_0x77e472(0x229)],''),_0x2eec3f=_0x57b631==null?void 0x0:_0x57b631[_0x77e472(0x207)]['getFormula'](_0x57b631[_0x77e472(0x229)],_0x59d9c7[_0x77e472(0x25f)]),_0x4a41a1=_0x57b631?_(_0x57b631[_0x77e472(0x21e)][_0x77e472(0x182)],_0x59d9c7[_0x77e472(0x25f)]):void 0x0;if(!_0x57b631||!_0x2eec3f||!_0x4a41a1)return!0x1;let _0x5da187=je(_0x57b631[_0x77e472(0x277)]);return _0x5da187[_0x77e472(0x15c)][_0x59d9c7[_0x77e472(0x25f)]]={..._0x2eec3f,..._0x59d9c7['numberFormat']?{'numberFormat':_0x59d9c7[_0x77e472(0x240)]}:null},_0x59d9c7['numberFormat']||delete _0x5da187[_0x77e472(0x15c)][_0x59d9c7[_0x77e472(0x25f)]][_0x77e472(0x240)],q({'accessor':_0x3c6f1c,'document':_0x57b631['document'],'unitId':_0x57b631[_0x77e472(0x229)],'trigger':V['id'],'rangeId':_0x59d9c7[_0x77e472(0x25f)],'previousResource':_0x57b631['resource'],'nextResource':_0x5da187,'cursorOffset':_0x4a41a1[_0x77e472(0x181)]+0x1,'externalMutations':{}});}},H={'id':_0x4b9f04(0x1ca),'type':t['CommandType'][_0x4b9f04(0x1a9)],'handler':(_0x31af68,_0x14c20a)=>G(_0x31af68,_0x14c20a,'',H['id'])},U={'id':_0x4b9f04(0x251),'type':t[_0x4b9f04(0x1ef)][_0x4b9f04(0x1a9)],'handler':(_0x31a8cb,_0xe05f8d)=>G(_0x31a8cb,_0xe05f8d,(_0xe05f8d==null?void 0x0:_0xe05f8d[_0x4b9f04(0x186)])??'',U['id'])},W={'id':'docs-formula.command.convert-to-text','type':t[_0x4b9f04(0x1ef)]['COMMAND'],'handler':(_0x30c70d,_0x1e815d)=>{const _0x4ec407=_0x4b9f04;if(!(_0x1e815d!=null&&_0x1e815d[_0x4ec407(0x25f)]))return!0x1;let _0x284af0=K(_0x30c70d,_0x1e815d[_0x4ec407(0x229)],'');if(!_0x284af0)return!0x1;let _0x51b364=_0x30c70d['get'](j)[_0x4ec407(0x230)]({'unitId':_0x284af0[_0x4ec407(0x229)],'rangeId':_0x1e815d['rangeId']});return _0x51b364?G(_0x30c70d,_0x1e815d,_0x51b364[_0x4ec407(0x186)],W['id']):!0x1;}};function G(_0x39ecda,_0x5b1dd2,_0x2709c4,_0x1b265c){const _0x4f75e8=_0x4b9f04;if(!(_0x5b1dd2!=null&&_0x5b1dd2[_0x4f75e8(0x25f)]))return!0x1;let _0x1ca4b1=K(_0x39ecda,_0x5b1dd2[_0x4f75e8(0x229)],'');if(!_0x1ca4b1)return!0x1;let _0x520d60=h({'documentData':_0x1ca4b1[_0x4f75e8(0x21e)],'resource':_0x1ca4b1[_0x4f75e8(0x277)],'rangeId':_0x5b1dd2['rangeId'],'text':_0x2709c4});return _0x520d60?q({'accessor':_0x39ecda,'document':_0x1ca4b1['document'],'unitId':_0x1ca4b1[_0x4f75e8(0x229)],'trigger':_0x1b265c,'rangeId':_0x5b1dd2[_0x4f75e8(0x25f)],'previousResource':_0x1ca4b1[_0x4f75e8(0x277)],'nextResource':_0x520d60[_0x4f75e8(0x26c)],'previousDocumentData':_0x1ca4b1['documentData'],'nextDocumentData':_0x520d60[_0x4f75e8(0x173)],'cursorOffset':_0x520d60[_0x4f75e8(0x24a)],'externalMutations':{}}):!0x1;}function K(_0x6ae8e4,_0x3b7c11,_0x3479f7){const _0x41042a=_0x4b9f04;if(_0x3479f7)return null;let _0xe37420=_0x6ae8e4[_0x41042a(0x1a2)](t['IUniverInstanceService']),_0x4cd1c8=(_0x3b7c11?_0xe37420[_0x41042a(0x1d6)](_0x3b7c11,t['UniverInstanceType'][_0x41042a(0x1ba)]):_0xe37420[_0x41042a(0x1ab)](t[_0x41042a(0x1b6)]['UNIVER_DOC']))??null;if(!_0x4cd1c8)return null;let _0x466173=_0x4cd1c8[_0x41042a(0x1b2)](),_0x5399f7=_0x466173['body'];if(_0x466173['disabled']||!_0x5399f7)return null;let _0x19406b=_0x6ae8e4[_0x41042a(0x1a2)](O);return _0x19406b[_0x41042a(0x212)](_0x4cd1c8[_0x41042a(0x1df)]())?null:{'document':_0x4cd1c8,'body':_0x5399f7,'documentData':_0x466173,'model':_0x19406b,'resource':_0x19406b['getResource'](_0x4cd1c8[_0x41042a(0x1df)]())??c(),'unitId':_0x4cd1c8[_0x41042a(0x1df)]()};}function be(_0x5c624c,_0x577e76){const _0x520ee6=_0x4b9f04;var _0x20c769;return(_0x20c769=_0x5c624c[_0x520ee6(0x1a2)](n[_0x520ee6(0x19e)])[_0x520ee6(0x26a)]({'subUnitId':_0x577e76,'unitId':_0x577e76}))==null?void 0x0:_0x20c769[0x0];}function xe(_0x11640d,_0x5a2597,_0x38ac02){const _0xccfe89=_0x4b9f04;if((_0x11640d==null?void 0x0:_0x11640d[_0xccfe89(0x1f2)])==='paragraph'){var _0x490c5a;let _0x32911a=((_0x490c5a=_0x5a2597[_0xccfe89(0x279)])==null?void 0x0:_0x490c5a[_0xccfe89(0x1c3)](_0x5f23c1=>_0x5f23c1[_0xccfe89(0x165)]===_0x11640d[_0xccfe89(0x165)]))??[];if(_0x32911a[_0xccfe89(0x16a)]!==0x1)return null;let _0x2cafa7=_0x32911a[0x0],_0x5cdb33=(0x0,t[_0xccfe89(0x16c)])(_0x5a2597,_0x2cafa7),_0x7b1891=_0x2cafa7[_0xccfe89(0x1be)]-_0x5cdb33,_0x2261ab=_0x11640d[_0xccfe89(0x1c4)]==='end'?_0x7b1891:_0x11640d['position'];if(!Number[_0xccfe89(0x22e)](_0x2261ab)||_0x2261ab<0x0||_0x2261ab>_0x7b1891)return null;let _0x59c326=_0x5cdb33+_0x2261ab;return{'startOffset':_0x59c326,'endOffset':_0x59c326};}if((_0x11640d==null?void 0x0:_0x11640d[_0xccfe89(0x1f2)])==='range')return!Number['isInteger'](_0x11640d[_0xccfe89(0x1dd)])||!Number[_0xccfe89(0x22e)](_0x11640d[_0xccfe89(0x27b)])?null:{'startOffset':Math['min'](_0x11640d['startOffset'],_0x11640d[_0xccfe89(0x27b)]),'endOffset':Math[_0xccfe89(0x1e3)](_0x11640d['startOffset'],_0x11640d[_0xccfe89(0x27b)])};let _0x1937ff=(_0x11640d==null?void 0x0:_0x11640d[_0xccfe89(0x1f2)])===_0xccfe89(0x15e)?_0x11640d['selection']:_0x38ac02;return!_0x1937ff||_0x1937ff[_0xccfe89(0x17c)]?null:{'startOffset':Math[_0xccfe89(0x241)](_0x1937ff[_0xccfe89(0x1dd)],_0x1937ff['endOffset']),'endOffset':Math[_0xccfe89(0x1e3)](_0x1937ff['startOffset'],_0x1937ff[_0xccfe89(0x27b)])};}function Se(_0x34fb30,_0x3e839e,_0x4c15c5,_0x5cca2f){const _0x58f250=_0x4b9f04;let _0x4cdc40=_0x34fb30[_0x58f250(0x1a2)](r['LexerTreeBuilder']),_0x30377a=_0x4c15c5[_0x58f250(0x1cb)]('=')?_0x4c15c5['slice'](0x1):_0x4c15c5,_0x1defa1=_0x4cdc40[_0x58f250(0x1c5)](_0x30377a);if(!_0x1defa1)return null;let _0x1d983a=_0x34fb30[_0x58f250(0x1a2)](e['HostExternalReferenceModel']),_0x29c41b=(0x0,e['resolveHostFormulaExternalReferences'])({'qualifiers':(0x0,e[_0x58f250(0x156)])(_0x1defa1),'explicitReferences':_0x5cca2f??[],'resolveBinding':_0x3d0265=>_0x1d983a[_0x58f250(0x1e2)](_0x3e839e,_0x3d0265)});return _0x29c41b[_0x58f250(0x1d1)]==='resolved'?_0x29c41b[_0x58f250(0x1f9)]:null;}function Ce(_0x5a747f,_0x3a0f0c,_0x29e591){const _0x20d904=_0x4b9f04;var _0x2473fd;let _0x26091d=(0x0,t['generateRandomId'])(0x6);for(;_0x5a747f!=null&&(_0x2473fd=_0x5a747f['customRanges'])!=null&&_0x2473fd['some'](_0x2d32ce=>_0x2d32ce[_0x20d904(0x25f)]===_0x26091d)||_0x3a0f0c[_0x20d904(0x24f)](_0x29e591,_0x26091d);)_0x26091d=(0x0,t['generateRandomId'])(0x6);return _0x26091d;}function we(_0x54d1ce){try{return te(_0x54d1ce);}catch(_0x29b55b){if(_0x29b55b instanceof m)return null;throw _0x29b55b;}}function Te(_0x582cf1){const _0x45d374=_0x4b9f04;let _0x2f5d03=_0x582cf1['previousDocumentData']&&_0x582cf1['nextDocumentData']?De(_0x582cf1[_0x45d374(0x175)],_0x582cf1[_0x45d374(0x229)],_0x582cf1['previousDocumentData'],_0x582cf1[_0x45d374(0x173)],_0x582cf1[_0x45d374(0x24a)],_0x582cf1[_0x45d374(0x211)]):null;return _0x582cf1[_0x45d374(0x197)]&&_0x582cf1['nextDocumentData']&&!_0x2f5d03?null:{'documentRedo':_0x2f5d03,'resourceRedo':{'id':L['id'],'params':{'unitId':_0x582cf1[_0x45d374(0x229)],'resource':_0x582cf1[_0x45d374(0x26c)]}},'resourceUndo':{'id':L['id'],'params':{'unitId':_0x582cf1[_0x45d374(0x229)],'resource':_0x582cf1[_0x45d374(0x243)]}}};}function Ee(_0x5bc113,_0x44d8b8,_0x274d64,_0x2a744b){const _0x2b6e9e=_0x4b9f04;_0x2a744b['pushUndoRedo']({'id':_0x5bc113[_0x2b6e9e(0x211)]+':'+_0x5bc113['rangeId'],'unitID':_0x5bc113['unitId'],'redoMutations':[..._0x5bc113['externalMutations'][_0x2b6e9e(0x1ec)]?[_0x5bc113[_0x2b6e9e(0x1d0)][_0x2b6e9e(0x1ec)]]:[],..._0x44d8b8[_0x2b6e9e(0x1b3)]?[_0x44d8b8[_0x2b6e9e(0x1b3)]]:[],_0x44d8b8['resourceRedo']],'undoMutations':[_0x44d8b8[_0x2b6e9e(0x201)],..._0x274d64?[_0x274d64]:[],..._0x5bc113[_0x2b6e9e(0x1d0)][_0x2b6e9e(0x1a5)]?[_0x5bc113[_0x2b6e9e(0x1d0)][_0x2b6e9e(0x1a5)]]:[]]});}function q(_0x3257f1){const _0x41054b=_0x4b9f04;let _0x527630=_0x3257f1[_0x41054b(0x18c)][_0x41054b(0x1a2)](t[_0x41054b(0x1e4)]),_0x5f5515=_0x3257f1['accessor'][_0x41054b(0x1a2)](t[_0x41054b(0x236)]),_0x4981a0=_0x3257f1[_0x41054b(0x18c)][_0x41054b(0x1a2)](n[_0x41054b(0x19e)]),_0x23449c=Te(_0x3257f1);if(!_0x23449c)return!0x1;let _0x2e9577=!0x1,_0x1d5217=null,_0x380127=!0x1;try{if(_0x3257f1[_0x41054b(0x1d0)][_0x41054b(0x1ec)]){if(!_0x527630[_0x41054b(0x223)](_0x3257f1[_0x41054b(0x1d0)][_0x41054b(0x1ec)]['id'],_0x3257f1['externalMutations']['redoMutation']['params']))return!0x1;_0x2e9577=!0x0;}if(_0x23449c[_0x41054b(0x1b3)]){let _0x543cd7=_0x527630[_0x41054b(0x223)](_0x23449c[_0x41054b(0x1b3)]['id'],_0x23449c[_0x41054b(0x1b3)][_0x41054b(0x168)]);if(!_0x543cd7)return J(_0x527630,_0x3257f1[_0x41054b(0x1d0)],_0x2e9577),!0x1;_0x1d5217={'id':n['RichTextEditingMutation']['id'],'params':{..._0x543cd7,'noHistory':!0x0,'noNeedSetTextRange':!0x0,'segmentId':''}};}if(!_0x527630[_0x41054b(0x223)](_0x23449c[_0x41054b(0x204)]['id'],_0x23449c['resourceRedo'][_0x41054b(0x168)]))return Oe(_0x527630,_0x1d5217),J(_0x527630,_0x3257f1[_0x41054b(0x1d0)],_0x2e9577),!0x1;_0x380127=!0x0,Ee(_0x3257f1,_0x23449c,_0x1d5217,_0x5f5515);}catch(_0x4e3e8a){throw _0x380127&&_0x527630['syncExecuteCommand'](_0x23449c[_0x41054b(0x201)]['id'],_0x23449c[_0x41054b(0x201)][_0x41054b(0x168)]),Oe(_0x527630,_0x1d5217),J(_0x527630,_0x3257f1[_0x41054b(0x1d0)],_0x2e9577),_0x4e3e8a;}return _0x4981a0[_0x41054b(0x1cd)]([{'startOffset':_0x3257f1[_0x41054b(0x24a)],'endOffset':_0x3257f1[_0x41054b(0x24a)],'segmentId':''}],{'unitId':_0x3257f1['unitId'],'subUnitId':_0x3257f1[_0x41054b(0x229)]},!0x1,{[n[_0x41054b(0x1a4)]]:!0x0}),!0x0;}function De(_0x2ba4d8,_0x3d9a72,_0x211732,_0x2497e5,_0x3e18c5,_0x463f59){const _0x2cc5ce=_0x4b9f04;let _0x3394ea=ke(_0x211732,_0x2497e5,(0x0,t[_0x2cc5ce(0x268)])(_0x2ba4d8,''));return _0x3394ea?{'id':n[_0x2cc5ce(0x147)]['id'],'params':{'unitId':_0x3d9a72,'actions':_0x3394ea,'segmentId':'','textRanges':[{'startOffset':_0x3e18c5,'endOffset':_0x3e18c5,'collapsed':!0x0,'segmentId':''}],'isEditing':!0x1,'noHistory':!0x0,'noNeedSetTextRange':!0x0,'trigger':_0x463f59}}:null;}function Oe(_0x181aa2,_0x506c87){const _0x41b728=_0x4b9f04;_0x506c87&&_0x181aa2[_0x41b728(0x223)](_0x506c87['id'],_0x506c87[_0x41b728(0x168)]);}function J(_0x240026,_0x55ca6f,_0x490bb0){const _0x104ed1=_0x4b9f04;_0x490bb0&&_0x55ca6f[_0x104ed1(0x1a5)]&&_0x240026[_0x104ed1(0x223)](_0x55ca6f[_0x104ed1(0x1a5)]['id'],_0x55ca6f[_0x104ed1(0x1a5)][_0x104ed1(0x168)]);}function ke(_0x37407c,_0x157632,_0x1622bb){const _0x498c0f=_0x4b9f04;let _0x579a24=_0x37407c['body'],_0x5da5d1=_0x157632[_0x498c0f(0x182)],_0x47c72a=Ae(_0x579a24==null?void 0x0:_0x579a24[_0x498c0f(0x275)],_0x5da5d1==null?void 0x0:_0x5da5d1[_0x498c0f(0x275)]);if(!_0x47c72a||!_0x5da5d1)return null;let _0x5f51f0=new t[(_0x498c0f(0x15b))]();return _0x5f51f0['retain'](_0x47c72a[_0x498c0f(0x1dc)]),_0x47c72a[_0x498c0f(0x19b)]>0x0&&_0x5f51f0[_0x498c0f(0x1d2)](_0x47c72a[_0x498c0f(0x19b)],(0x0,t[_0x498c0f(0x1b9)])(_0x5da5d1,_0x47c72a[_0x498c0f(0x1dc)],_0x47c72a[_0x498c0f(0x1dc)]+_0x47c72a[_0x498c0f(0x19b)],!0x1)),_0x47c72a['deleteLength']>0x0&&_0x5f51f0[_0x498c0f(0x163)](_0x47c72a['deleteLength']),t[_0x498c0f(0x1e8)][_0x498c0f(0x162)]()[_0x498c0f(0x172)](_0x5f51f0[_0x498c0f(0x20e)](),_0x1622bb);}function Ae(_0x83ed2e,_0x198a02){const _0x2810c4=_0x4b9f04;if(_0x83ed2e==null||_0x198a02==null||_0x83ed2e===_0x198a02)return null;let _0x13569f=0x0;for(;_0x13569f<_0x83ed2e[_0x2810c4(0x16a)]&&_0x13569f<_0x198a02[_0x2810c4(0x16a)]&&_0x83ed2e[_0x13569f]===_0x198a02[_0x13569f];)_0x13569f+=0x1;let _0x3f0f08=_0x83ed2e[_0x2810c4(0x16a)],_0x59bf98=_0x198a02['length'];for(;_0x3f0f08>_0x13569f&&_0x59bf98>_0x13569f&&_0x83ed2e[_0x3f0f08-0x1]===_0x198a02[_0x59bf98-0x1];)--_0x3f0f08,--_0x59bf98;return{'start':_0x13569f,'deleteLength':_0x3f0f08-_0x13569f,'insertLength':_0x59bf98-_0x13569f};}function je(_0xf05c8c){const _0x14cedd=_0x4b9f04;return{'formulas':Object[_0x14cedd(0x1db)](Object[_0x14cedd(0x194)](_0xf05c8c[_0x14cedd(0x15c)])['map'](([_0x348761,_0x55417e])=>[_0x348761,{..._0x55417e,..._0x55417e[_0x14cedd(0x240)]?{'numberFormat':{..._0x55417e[_0x14cedd(0x240)]}}:null,..._0x55417e[_0x14cedd(0x209)]?{'lastValue':{..._0x55417e[_0x14cedd(0x209)]}}:null}]))};}let Y=class extends t['Disposable']{constructor(_0x4aaaae,_0x4b2cf9,_0x13a365,_0x9a9485){const _0x273298=_0x4b9f04;super(),this[_0x273298(0x20b)]=_0x4aaaae,this[_0x273298(0x27a)]=_0x4b2cf9,this[_0x273298(0x262)]=_0x13a365,this[_0x273298(0x26f)]=_0x9a9485,D(this,_0x273298(0x1ad),new Set()),D(this,_0x273298(0x190),!0x1),D(this,'_isDisposed',!0x1),this[_0x273298(0x20b)][_0x273298(0x25b)](t['UniverInstanceType']['UNIVER_DOC'])['forEach'](_0x16651b=>this[_0x273298(0x26f)][_0x273298(0x264)](_0x16651b)),this[_0x273298(0x260)](this[_0x273298(0x262)][_0x273298(0x1e5)][_0x273298(0x1fc)](({unitId:_0x11245c})=>this[_0x273298(0x1d9)](_0x11245c))),this[_0x273298(0x260)](this[_0x273298(0x20b)][_0x273298(0x179)]['subscribe'](({unit:_0x52203a})=>{const _0x19c2fc=_0x273298;_0x52203a[_0x19c2fc(0x1f2)]===t[_0x19c2fc(0x1b6)][_0x19c2fc(0x1ba)]&&this['_queueSync'](_0x52203a['getUnitId']());})),this[_0x273298(0x260)](this[_0x273298(0x20b)]['unitDisposed$'][_0x273298(0x1fc)](_0x5d4a28=>{const _0x459f06=_0x273298;this[_0x459f06(0x26f)][_0x459f06(0x189)](_0x5d4a28[_0x459f06(0x1df)]());})),this[_0x273298(0x260)](this[_0x273298(0x27a)][_0x273298(0x272)](_0x184d3b=>{const _0x349101=_0x273298;if(_0x184d3b['id']===n[_0x349101(0x147)]['id']&&Me(_0x184d3b[_0x349101(0x168)])){let _0x28029d=_0x184d3b['params'];_0x28029d[_0x349101(0x17c)]||this[_0x349101(0x1d9)](_0x28029d['unitId']);}}));}['dispose'](){const _0x2fde1d=_0x4b9f04;this[_0x2fde1d(0x185)]=!0x0,super[_0x2fde1d(0x19d)]();}[_0x4b9f04(0x253)](_0x7ceffa){const _0x169979=_0x4b9f04;this[_0x169979(0x1ad)][_0x169979(0x232)](_0x7ceffa),this[_0x169979(0x190)]||(this['_syncScheduled']=!0x0,queueMicrotask(()=>{const _0x1a3651=_0x169979;if(this['_syncScheduled']=!0x1,this[_0x1a3651(0x185)])return;let _0x9b9ab0=Array[_0x1a3651(0x1e7)](this[_0x1a3651(0x1ad)]);this['_pendingUnitIds'][_0x1a3651(0x1e1)](),_0x9b9ab0['forEach'](_0x3d9787=>this['_syncUnit'](_0x3d9787));}));}[_0x4b9f04(0x1d9)](_0x4cf32e){const _0x2d6662=_0x4b9f04;let _0x18533d=this[_0x2d6662(0x20b)]['getUnit'](_0x4cf32e,t['UniverInstanceType'][_0x2d6662(0x1ba)]);_0x18533d&&this['_service']['syncUnit'](_0x18533d);}};Y=A([k(0x0,t['IUniverInstanceService']),k(0x1,t[_0x4b9f04(0x1e4)]),k(0x2,(0x0,t[_0x4b9f04(0x187)])(O)),k(0x3,(0x0,t[_0x4b9f04(0x187)])(j))],Y);function Me(_0x552ca8){const _0x4a21ff=_0x4b9f04;return typeof _0x552ca8=='object'&&!!_0x552ca8&&'unitId'in _0x552ca8&&typeof _0x552ca8[_0x4a21ff(0x229)]==_0x4a21ff(0x1c9)&&(!(_0x4a21ff(0x17c)in _0x552ca8)||_0x552ca8['segmentId']===void 0x0||typeof _0x552ca8['segmentId']==_0x4a21ff(0x1c9));}let X=class extends t[_0x4b9f04(0x252)]{constructor(_0x5787b0,_0x4a8541){const _0x1b83c6=_0x4b9f04;super(),this[_0x1b83c6(0x22f)]=_0x5787b0,this[_0x1b83c6(0x1f6)]=_0x4a8541,this['disposeWithMe'](this['_resourceManagerService'][_0x1b83c6(0x278)]({'pluginName':o,'businesses':[t[_0x1b83c6(0x1b6)]['UNIVER_DOC']],'toJson':_0x2a48dc=>JSON[_0x1b83c6(0x151)](this[_0x1b83c6(0x1f6)][_0x1b83c6(0x20e)](_0x2a48dc)),'parseJson':_0x32daf9=>JSON[_0x1b83c6(0x235)](_0x32daf9),'onLoad':(_0x18cc18,_0x509a18)=>{const _0x1f1b07=_0x1b83c6;this[_0x1f1b07(0x1f6)]['load'](_0x18cc18,_0x509a18);},'onUnLoad':_0x44129c=>this[_0x1b83c6(0x1f6)]['removeUnit'](_0x44129c)}));}};X=A([k(0x0,t[_0x4b9f04(0x1fb)]),k(0x1,(0x0,t[_0x4b9f04(0x187)])(O))],X);var Ne=_0x4b9f04(0x21d),Pe='1.5.0';const Fe={};let Z=class extends t[_0x4b9f04(0x252)]{constructor(_0x3283e0,_0x483ea3,_0x533a81){const _0x19b68b=_0x4b9f04;super(),this[_0x19b68b(0x1fd)]=_0x3283e0,this['_formulaService']=_0x483ea3,this[_0x19b68b(0x260)](_0x533a81[_0x19b68b(0x247)]({'resolve':(_0x594e4a,_0x24f7d5)=>{const _0x5ad52a=_0x19b68b;var _0xcfaff8;return((_0xcfaff8=_0x24f7d5[_0x5ad52a(0x18d)])==null?void 0x0:_0xcfaff8[_0x5ad52a(0x1c3)](g)[_0x5ad52a(0x210)](_0x59dcfa=>({'startOffset':_0x59dcfa[_0x5ad52a(0x1be)],'endOffset':_0x59dcfa['endIndex']+0x1,'text':this[_0x5ad52a(0x1da)](_0x594e4a,_0x59dcfa[_0x5ad52a(0x25f)])})))??[];}})),this[_0x19b68b(0x260)](this[_0x19b68b(0x228)]['presentationChanged$'][_0x19b68b(0x1fc)](({unitId:_0x87fc6f})=>{const _0xfca772=_0x19b68b;_0x533a81[_0xfca772(0x18a)](_0x87fc6f);}));}[_0x4b9f04(0x1da)](_0x797a40,_0xdd9698){const _0x2e775e=_0x4b9f04;var _0x40a0b6;return((_0x40a0b6=this[_0x2e775e(0x228)]['getResult']({'unitId':_0x797a40,'rangeId':_0xdd9698}))==null?void 0x0:_0x40a0b6['text'])??'';}['resolveText'](_0x1023d0,_0x25aa65,_0x5df1cd){const _0x18e9b9=_0x4b9f04;var _0x4788cb;let _0x572dc8=this[_0x18e9b9(0x1fd)][_0x18e9b9(0x1d6)](_0x1023d0,t[_0x18e9b9(0x1b6)][_0x18e9b9(0x1ba)]),_0x44237a=_0x572dc8==null?void 0x0:_0x572dc8[_0x18e9b9(0x157)]();if(!_0x44237a)return'';let _0x4d8742=_0x44237a[_0x18e9b9(0x275)][_0x18e9b9(0x153)](_0x25aa65,_0x5df1cd),_0x159df6=((_0x4788cb=_0x44237a[_0x18e9b9(0x18d)])==null?void 0x0:_0x4788cb['filter'](_0x7318e5=>g(_0x7318e5)&&_0x7318e5[_0x18e9b9(0x1be)]>=_0x25aa65&&_0x7318e5[_0x18e9b9(0x181)]<_0x5df1cd)['sort']((_0x3cc9ce,_0x4e9436)=>_0x4e9436[_0x18e9b9(0x1be)]-_0x3cc9ce['startIndex']))??[];for(let _0x41b042 of _0x159df6){let _0x1ff12b=_0x41b042['startIndex']-_0x25aa65,_0x574d69=_0x41b042['endIndex']-_0x25aa65+0x1;_0x4d8742=''+_0x4d8742[_0x18e9b9(0x153)](0x0,_0x1ff12b)+this[_0x18e9b9(0x1da)](_0x1023d0,_0x41b042[_0x18e9b9(0x25f)])+_0x4d8742[_0x18e9b9(0x153)](_0x574d69);}return _0x4d8742;}[_0x4b9f04(0x17b)](_0x5eb1bc){return Ie(_0x5eb1bc);}['degradeBody'](_0x2d0ace,_0x5983f2,_0x12aec3={}){const _0x128f4=_0x4b9f04;var _0x2dca89;return re({'id':_0x2d0ace,'body':_0x5983f2,'documentStyle':{}},(((_0x2dca89=_0x5983f2[_0x128f4(0x18d)])==null?void 0x0:_0x2dca89[_0x128f4(0x1c3)](g))??[])['map'](_0x64ad21=>({'rangeId':_0x64ad21[_0x128f4(0x25f)],'text':_0x12aec3[_0x64ad21['rangeId']]??this[_0x128f4(0x1da)](_0x2d0ace,_0x64ad21['rangeId'])})))[_0x128f4(0x182)]??{'dataStream':''};}};Z=A([k(0x0,t[_0x4b9f04(0x237)]),k(0x1,(0x0,t[_0x4b9f04(0x187)])(j)),k(0x2,(0x0,t['Inject'])(n[_0x4b9f04(0x1c2)]))],Z);function Ie(_0x49f761){const _0x108de7=_0x4b9f04;var _0x29accb,_0x122542;let _0x1bca3e=Le(_0x49f761),_0x20f767=re(_0x49f761,(((_0x29accb=_0x49f761['body'])==null||(_0x29accb=_0x29accb[_0x108de7(0x18d)])==null?void 0x0:_0x29accb['filter'](g))??[])['map'](_0x54e06c=>({'rangeId':_0x54e06c['rangeId'],'text':Re(_0x1bca3e==null?void 0x0:_0x1bca3e['formulas'][_0x54e06c['rangeId']])})));return _0x20f767['resources']=(_0x122542=_0x20f767[_0x108de7(0x25a)])==null?void 0x0:_0x122542['filter'](_0x27d1a1=>_0x27d1a1['name']!==o),_0x20f767;}function Le(_0x1e0a90){const _0xca178c=_0x4b9f04;var _0x39c91e;let _0x3aa704=(_0x39c91e=_0x1e0a90[_0xca178c(0x25a)])==null||(_0x39c91e=_0x39c91e[_0xca178c(0x227)](_0x54a97a=>_0x54a97a[_0xca178c(0x152)]===_0xca178c(0x1f5)))==null?void 0x0:_0x39c91e['data'];if(_0x3aa704)try{let _0x9db9d1=JSON['parse'](_0x3aa704);return l(_0x9db9d1)?_0x9db9d1:void 0x0;}catch{return;}}function Re(_0x1b0a5d){const _0x3032e1=_0x4b9f04;return _0x1b0a5d?(0x0,e[_0x3032e1(0x15d)])({'lastValue':_0x1b0a5d[_0x3032e1(0x209)],'numberFormat':_0x1b0a5d[_0x3032e1(0x240)]})[_0x3032e1(0x186)]:'';}let Q=class extends t[_0x4b9f04(0x252)]{constructor(_0x4623dd,_0xeb2919,_0x988872){const _0x32d3eb=_0x4b9f04;super(),this[_0x32d3eb(0x228)]=_0x4623dd,this['_cacheEligibilityService']=_0xeb2919,this['disposeWithMe'](_0x988872[_0x32d3eb(0x20a)](this));}['collectMutations'](_0x2ac4b1){const _0x5e31cb=_0x4b9f04;let _0x2f0a3b=new Map();for(let _0x196809 of this['_formulaService'][_0x5e31cb(0x19a)]()){var _0x76607;if(!this['_cacheEligibilityService'][_0x5e31cb(0x177)](_0x196809[_0x5e31cb(0x26e)][_0x5e31cb(0x1bd)],_0x196809[_0x5e31cb(0x267)])[_0x5e31cb(0x23f)])continue;let _0x243b6c=(0x0,e[_0x5e31cb(0x14a)])(_0x196809[_0x5e31cb(0x267)]),_0x5db64f=_0x243b6c?(0x0,e['toFormulaLastValue'])(_0x243b6c):null;if(!_0x5db64f||ze(_0x196809['config'][_0x5e31cb(0x209)],_0x5db64f))continue;let _0x30e403=_0x2f0a3b[_0x5e31cb(0x1a2)](_0x196809[_0x5e31cb(0x1e0)][_0x5e31cb(0x229)])??[];_0x30e403[_0x5e31cb(0x217)]({'rangeId':_0x196809[_0x5e31cb(0x1e0)][_0x5e31cb(0x25f)],'expectedFormula':_0x196809[_0x5e31cb(0x26e)][_0x5e31cb(0x1bd)],'expectedNumberFormat':(_0x76607=_0x196809[_0x5e31cb(0x26e)][_0x5e31cb(0x240)])==null?void 0x0:_0x76607[_0x5e31cb(0x1a0)],'expectedReferenceRevision':_0x196809['referenceRevision'],'lastValue':_0x5db64f}),_0x2f0a3b[_0x5e31cb(0x22c)](_0x196809[_0x5e31cb(0x1e0)][_0x5e31cb(0x229)],_0x30e403);}return Array[_0x5e31cb(0x1e7)](_0x2f0a3b,([_0x4edf0b,_0xd52c29])=>({'id':R['id'],'params':{'unitId':_0x4edf0b,'updates':_0xd52c29}}));}};Q=A([k(0x0,(0x0,t[_0x4b9f04(0x187)])(j)),k(0x1,(0x0,t[_0x4b9f04(0x187)])(e[_0x4b9f04(0x26b)])),k(0x2,(0x0,t[_0x4b9f04(0x187)])(e[_0x4b9f04(0x14d)]))],Q);function ze(_0x3f071a,_0x58aa8f){const _0x3f4dbf=_0x4b9f04;return(_0x3f071a==null?void 0x0:_0x3f071a['v'])===_0x58aa8f['v']&&(_0x3f071a==null?void 0x0:_0x3f071a['t'])===_0x58aa8f['t']&&(_0x3f071a==null?void 0x0:_0x3f071a[_0x3f4dbf(0x1a0)])===_0x58aa8f[_0x3f4dbf(0x1a0)];}let $=class extends t[_0x4b9f04(0x16f)]{constructor(_0x2de2e3=Fe,_0x5b435d,_0x24cc5a,_0xfdf2bb){const _0x28f03b=_0x4b9f04;super(),this['_config']=_0x2de2e3,this[_0x28f03b(0x1c0)]=_0x5b435d,this[_0x28f03b(0x27a)]=_0x24cc5a,this[_0x28f03b(0x255)]=_0xfdf2bb;let {..._0xaaa20a}=(0x0,t[_0x28f03b(0x1a7)])({},Fe,this[_0x28f03b(0x246)]);this[_0x28f03b(0x255)][_0x28f03b(0x184)]('docs-formula.config',_0xaaa20a);}[_0x4b9f04(0x269)](){const _0x4544b1=_0x4b9f04;this['_injector']['add']([O]),this[_0x4544b1(0x1c0)]['add']([j]),this[_0x4544b1(0x1c0)][_0x4544b1(0x232)]([X]),this['_injector'][_0x4544b1(0x232)]([Y]),this['_injector']['add']([Q]),this[_0x4544b1(0x1c0)]['add']([Z]),(0x0,t['touchDependencies'])(this[_0x4544b1(0x1c0)],[[O],[X],[Y],[Q],[Z]]),[F,I,L,R,z,B,V,H,U,W][_0x4544b1(0x21f)](_0x4a7751=>this[_0x4544b1(0x260)](this[_0x4544b1(0x27a)]['registerCommand'](_0x4a7751)));}};D($,'pluginName',o),D($,_0x4b9f04(0x203),Ne),D($,'version',Pe),D($,_0x4b9f04(0x1f2),t[_0x4b9f04(0x1b6)][_0x4b9f04(0x1ba)]),$=A([(0x0,t[_0x4b9f04(0x218)])(a[_0x4b9f04(0x19c)],e[_0x4b9f04(0x256)],n[_0x4b9f04(0x1fe)]),k(0x1,(0x0,t[_0x4b9f04(0x187)])(t[_0x4b9f04(0x14e)])),k(0x2,t[_0x4b9f04(0x1e4)]),k(0x3,t['IConfigService'])],$),exports['ConvertDocFormulaToTextCommand']=W,exports[_0x4b9f04(0x22a)]=s,exports[_0x4b9f04(0x15f)]='',exports['DOC_FORMULA_PLUGIN']=o,Object[_0x4b9f04(0x1a1)](exports,_0x4b9f04(0x261),{'enumerable':!0x0,'get':function(){return Z;}}),Object['defineProperty'](exports,_0x4b9f04(0x1d7),{'enumerable':!0x0,'get':function(){return Y;}}),exports['DocFormulaModel']=O,Object[_0x4b9f04(0x1a1)](exports,'DocFormulaResourceController',{'enumerable':!0x0,'get':function(){return X;}}),exports['DocFormulaResultStatus']=ve,Object[_0x4b9f04(0x1a1)](exports,'DocFormulaService',{'enumerable':!0x0,'get':function(){return j;}}),exports[_0x4b9f04(0x245)]=z,exports[_0x4b9f04(0x26d)]=m,exports[_0x4b9f04(0x18e)]=H,exports[_0x4b9f04(0x233)]=I,exports[_0x4b9f04(0x195)]=U,exports[_0x4b9f04(0x17a)]=R,exports[_0x4b9f04(0x24d)]=F,exports[_0x4b9f04(0x1ee)]=V,exports['SetDocFormulaResourceMutation']=L,Object['defineProperty'](exports,_0x4b9f04(0x16e),{'enumerable':!0x0,'get':function(){return $;}}),exports[_0x4b9f04(0x254)]=B,exports[_0x4b9f04(0x221)]=ie,exports[_0x4b9f04(0x222)]=te,exports[_0x4b9f04(0x1cc)]=h,exports['buildUpdateDocFormulaActions']=ne,exports['createEmptyDocFormulaResource']=c,exports[_0x4b9f04(0x20f)]=Ie,exports[_0x4b9f04(0x258)]=_,exports['isDocFormulaConfig']=u,exports['isDocFormulaRange']=g,exports['isDocFormulaResource']=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 _0x4e8d1d=_0xf76d;function _0x3633(){var _0xc53dc7=['_docsFormulaDisplayTextService','customRanges','742016OgXaYr','setNumberFormat','_initialize','prototype','_createFormula','map','update','_getCompleteRanges','getFormulas','iterator','convertToText','_rangeId','get','getRange','_model','replaceWithText','symbol','startOffset','6cuuNFe','string','replaceWithFormula','startIndex','describe','_docsFormulaCommandService','getBody','_commandService','find','length','_insert','96289QLBCZB','createInstance','end','UNIVER_DOC','object','defineProperty','function','rangeId','syncExecuteCommand','3brbyHD','_docsFormulaModel','getSegmentId','degradeDocumentData','body','_univerInstanceService','567278WYaVeo','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','_injector','remove','_getCustomRange','range','extend','toPrimitive','appendFormula','getConfig','some','saveFormulaDisplayTextSnapshot','120635MEFBoL','62657pUpWko','getId','_service','2473560NMdnIY','call','formula','36ZgyRSH','5114950xzafyz','paragraph','numberFormat','getFormulaAt','default','_docsFormulaResourceLoaderService','getSnapshot','_document','insertFormula','endOffset','_unitId','endIndex','Document\x20','externalReferences','getFormula','saveUnit','decorate'];_0x3633=function(){return _0xc53dc7;};return _0x3633();}(function(_0x4b27be,_0x5eae59){var _0x1bd2f8=_0xf76d,_0x31e262=_0x4b27be();while(!![]){try{var _0x5e0f1=-parseInt(_0x1bd2f8(0x164))/0x1+-parseInt(_0x1bd2f8(0x173))/0x2*(-parseInt(_0x1bd2f8(0x16d))/0x3)+parseInt(_0x1bd2f8(0x186))/0x4*(parseInt(_0x1bd2f8(0x17f))/0x5)+-parseInt(_0x1bd2f8(0x159))/0x6*(parseInt(_0x1bd2f8(0x180))/0x7)+parseInt(_0x1bd2f8(0x147))/0x8+parseInt(_0x1bd2f8(0x183))/0x9+-parseInt(_0x1bd2f8(0x187))/0xa;if(_0x5e0f1===_0x5eae59)break;else _0x31e262['push'](_0x31e262['shift']());}catch(_0x3269d8){_0x31e262['push'](_0x31e262['shift']());}}}(_0x3633,0x3d6f7));import{ConvertDocFormulaToTextCommand as _0x3c527c,DocFormulaDisplayTextService as _0x43e9b5,DocFormulaModel as _0x5e08ca,DocFormulaService as _0x421237,InsertDocFormulaCommand as _0x3c045b,RemoveDocFormulaCommand as _0x37e065,ReplaceDocFormulaWithTextCommand as _0x2c2385,SetDocFormulaNumberFormatCommand as _0x492dd2,UpdateDocFormulaCommand as _0x3c604f,isDocFormulaRange as _0x19981d}from'@univerjs-pro/docs-formula';import{ICommandService as _0x549850,IResourceLoaderService as _0x312cab,IUniverInstanceService as _0x207dd1,Inject as _0x23a08b,UniverInstanceType as _0x46a90a}from'@univerjs/core';import{FDocument as _0x1ac644,FDocumentParagraph as _0x44e6e4,FDocumentTextRange as _0x4618e9}from'@univerjs/docs/facade';function v(_0x334af9,_0xad1b93){return function(_0x16c0a9,_0x23d6a7){_0xad1b93(_0x16c0a9,_0x23d6a7,_0x334af9);};}function y(_0x2111c7,_0x24bf90,_0x1ab771,_0x2707c5){var _0x3f40f2=_0xf76d,_0x4c55aa=arguments['length'],_0x19139e=_0x4c55aa<0x3?_0x24bf90:_0x2707c5===null?_0x2707c5=Object['getOwnPropertyDescriptor'](_0x24bf90,_0x1ab771):_0x2707c5,_0x3f17fd;if(typeof Reflect==_0x3f40f2(0x168)&&typeof Reflect[_0x3f40f2(0x144)]==_0x3f40f2(0x16a))_0x19139e=Reflect[_0x3f40f2(0x144)](_0x2111c7,_0x24bf90,_0x1ab771,_0x2707c5);else{for(var _0x34fd4b=_0x2111c7[_0x3f40f2(0x162)]-0x1;_0x34fd4b>=0x0;_0x34fd4b--)(_0x3f17fd=_0x2111c7[_0x34fd4b])&&(_0x19139e=(_0x4c55aa<0x3?_0x3f17fd(_0x19139e):_0x4c55aa>0x3?_0x3f17fd(_0x24bf90,_0x1ab771,_0x19139e):_0x3f17fd(_0x24bf90,_0x1ab771))||_0x19139e);}return _0x4c55aa>0x3&&_0x19139e&&Object[_0x3f40f2(0x169)](_0x24bf90,_0x1ab771,_0x19139e),_0x19139e;}let b=class{constructor(_0xe4cb1,_0x59071d,_0x38b188,_0x25b3e5,_0x1c9ec0,_0x4953d0){var _0x13e345=_0xf76d;this[_0x13e345(0x191)]=_0xe4cb1,this[_0x13e345(0x152)]=_0x59071d,this[_0x13e345(0x160)]=_0x38b188,this['_model']=_0x25b3e5,this[_0x13e345(0x182)]=_0x1c9ec0,this[_0x13e345(0x172)]=_0x4953d0;}[_0x4e8d1d(0x181)](){var _0x46b880=_0x4e8d1d;return this[_0x46b880(0x152)];}['getRange'](){var _0x377138=_0x4e8d1d;let _0x2189c5=this[_0x377138(0x177)]();return _0x2189c5?{'endOffset':_0x2189c5[_0x377138(0x192)]+0x1,'rangeId':_0x2189c5[_0x377138(0x16b)],'startOffset':_0x2189c5[_0x377138(0x15c)]}:null;}[_0x4e8d1d(0x195)](){var _0x3f7d78=_0x4e8d1d,_0x207919;return((_0x207919=this[_0x3f7d78(0x155)][_0x3f7d78(0x195)](this[_0x3f7d78(0x191)],this[_0x3f7d78(0x152)]))==null?void 0x0:_0x207919['formula'])??'';}['getConfig'](){var _0x448d71=_0x4e8d1d;return this[_0x448d71(0x155)][_0x448d71(0x195)](this[_0x448d71(0x191)],this[_0x448d71(0x152)])??null;}['getResult'](){var _0x5f5100=_0x4e8d1d;return this[_0x5f5100(0x182)]['getResult']({'unitId':this[_0x5f5100(0x191)],'rangeId':this[_0x5f5100(0x152)]})??null;}[_0x4e8d1d(0x15d)](){var _0x495312=_0x4e8d1d;let _0xd4cba5=this['getRange'](),_0x435634=this[_0x495312(0x17c)](),_0x340c9a=this['getResult']();return!_0xd4cba5||!_0x435634||!_0x340c9a?null:{..._0xd4cba5,'config':_0x435634,'formula':_0x435634[_0x495312(0x185)],'result':_0x340c9a,'type':_0x495312(0x185)};}[_0x4e8d1d(0x14d)](_0xeced81){var _0x5e87e6=_0x4e8d1d;return this['_commandService'][_0x5e87e6(0x16c)](_0x3c604f['id'],{'externalReferences':_0xeced81[_0x5e87e6(0x194)],'formula':_0xeced81[_0x5e87e6(0x185)],'numberFormat':_0xeced81[_0x5e87e6(0x189)],'rangeId':this[_0x5e87e6(0x152)],'unitId':this[_0x5e87e6(0x191)]});}[_0x4e8d1d(0x148)](_0x22f63d){var _0x337a27=_0x4e8d1d;return this[_0x337a27(0x160)][_0x337a27(0x16c)](_0x492dd2['id'],{'numberFormat':_0x22f63d,'rangeId':this[_0x337a27(0x152)],'unitId':this[_0x337a27(0x191)]});}[_0x4e8d1d(0x176)](){var _0x1d4cdc=_0x4e8d1d;return this[_0x1d4cdc(0x160)][_0x1d4cdc(0x16c)](_0x37e065['id'],{'rangeId':this[_0x1d4cdc(0x152)],'unitId':this[_0x1d4cdc(0x191)]});}[_0x4e8d1d(0x156)](_0x1fe20a){var _0x2f9b08=_0x4e8d1d;return this[_0x2f9b08(0x160)][_0x2f9b08(0x16c)](_0x2c2385['id'],{'rangeId':this[_0x2f9b08(0x152)],'text':_0x1fe20a,'unitId':this[_0x2f9b08(0x191)]});}[_0x4e8d1d(0x151)](){var _0x828606=_0x4e8d1d;return this[_0x828606(0x160)]['syncExecuteCommand'](_0x3c527c['id'],{'rangeId':this['_rangeId'],'unitId':this[_0x828606(0x191)]});}[_0x4e8d1d(0x177)](){var _0x1c7838=_0x4e8d1d,_0x9740a8;let _0x4bee25=this['_univerInstanceService']['getUnit'](this[_0x1c7838(0x191)],_0x46a90a[_0x1c7838(0x167)]);return _0x4bee25==null||(_0x9740a8=_0x4bee25[_0x1c7838(0x18d)]()[_0x1c7838(0x171)])==null||(_0x9740a8=_0x9740a8[_0x1c7838(0x146)])==null?void 0x0:_0x9740a8[_0x1c7838(0x161)](_0x2c4f82=>_0x2c4f82[_0x1c7838(0x16b)]===this[_0x1c7838(0x152)]&&_0x19981d(_0x2c4f82));}};function _0xf76d(_0x2e5ab8,_0x5f5a47){_0x2e5ab8=_0x2e5ab8-0x144;var _0x363350=_0x3633();var _0xf76d62=_0x363350[_0x2e5ab8];return _0xf76d62;}b=y([v(0x2,_0x549850),v(0x3,_0x23a08b(_0x5e08ca)),v(0x4,_0x23a08b(_0x421237)),v(0x5,_0x207dd1)],b);function x(_0x29dbc1){'@babel/helpers - typeof';var _0x18fceb=_0x4e8d1d;return x=typeof Symbol==_0x18fceb(0x16a)&&typeof Symbol[_0x18fceb(0x150)]==_0x18fceb(0x157)?function(_0x191f9b){return typeof _0x191f9b;}:function(_0x197c1f){var _0x1a8856=_0x18fceb;return _0x197c1f&&typeof Symbol==_0x1a8856(0x16a)&&_0x197c1f['constructor']===Symbol&&_0x197c1f!==Symbol[_0x1a8856(0x14a)]?_0x1a8856(0x157):typeof _0x197c1f;},x(_0x29dbc1);}function S(_0x473d74,_0x4fcc0d){var _0x529981=_0x4e8d1d;if(x(_0x473d74)!='object'||!_0x473d74)return _0x473d74;var _0x24c97b;if(typeof Symbol<'u'&&(_0x24c97b=_0x473d74[Symbol[_0x529981(0x17a)]])!==void 0x0){var _0x3392c6=_0x24c97b[_0x529981(0x184)](_0x473d74,_0x4fcc0d||_0x529981(0x18b));if(x(_0x3392c6)!=_0x529981(0x168))return _0x3392c6;throw TypeError(_0x529981(0x174));}return(_0x4fcc0d==='string'?String:Number)(_0x473d74);}function C(_0x1f4030){var _0x5eb068=_0x4e8d1d,_0x507509=S(_0x1f4030,_0x5eb068(0x15a));return x(_0x507509)==_0x5eb068(0x157)?_0x507509:_0x507509+'';}function w(_0x227b8f,_0x594c15,_0x3fc39e){return(_0x594c15=C(_0x594c15))in _0x227b8f?Object['defineProperty'](_0x227b8f,_0x594c15,{'value':_0x3fc39e,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x227b8f[_0x594c15]=_0x3fc39e,_0x227b8f;}var T=class extends _0x1ac644{constructor(..._0x516a2b){var _0x5df59d=_0x4e8d1d;super(..._0x516a2b),w(this,_0x5df59d(0x15e),void 0x0),w(this,_0x5df59d(0x145),void 0x0),w(this,_0x5df59d(0x16e),void 0x0),w(this,'_docsFormulaResourceLoaderService',void 0x0);}[_0x4e8d1d(0x149)](_0x2a9ab1){var _0x5cc953=_0x4e8d1d;this[_0x5cc953(0x15e)]=_0x2a9ab1['get'](_0x549850),this['_docsFormulaDisplayTextService']=_0x2a9ab1['get'](_0x43e9b5),this[_0x5cc953(0x16e)]=_0x2a9ab1[_0x5cc953(0x153)](_0x5e08ca),this[_0x5cc953(0x18c)]=_0x2a9ab1[_0x5cc953(0x153)](_0x312cab);}[_0x4e8d1d(0x14f)](){var _0xfc6774=_0x4e8d1d;return this[_0xfc6774(0x14e)]()[_0xfc6774(0x14c)](_0x208ef7=>this['_createFormula'](_0x208ef7[_0xfc6774(0x16b)]));}[_0x4e8d1d(0x195)](_0x13b033){var _0x57ce81=_0x4e8d1d;return this['_getCompleteRanges']()[_0x57ce81(0x17d)](_0x31bb84=>_0x31bb84[_0x57ce81(0x16b)]===_0x13b033)?this[_0x57ce81(0x14b)](_0x13b033):null;}[_0x4e8d1d(0x18a)](_0x3bbd59){var _0x60af2c=_0x4e8d1d;let _0x396893=this['_getCompleteRanges']()[_0x60af2c(0x161)](_0x196783=>_0x196783[_0x60af2c(0x15c)]<=_0x3bbd59&&_0x3bbd59<=_0x196783[_0x60af2c(0x192)]);return _0x396893?this[_0x60af2c(0x14b)](_0x396893[_0x60af2c(0x16b)]):null;}[_0x4e8d1d(0x17e)](){var _0x565f7a=_0x4e8d1d;let _0x207bca=this['_docsFormulaResourceLoaderService'][_0x565f7a(0x196)](this['id']);if(!_0x207bca)throw Error(_0x565f7a(0x193)+this['id']+'\x20could\x20not\x20be\x20serialized.');return this[_0x565f7a(0x145)][_0x565f7a(0x170)](_0x207bca);}[_0x4e8d1d(0x18f)](_0x391539){var _0x45fdfa=_0x4e8d1d;return this[_0x45fdfa(0x163)]({'externalReferences':_0x391539[_0x45fdfa(0x194)],'formula':_0x391539['formula'],'numberFormat':_0x391539[_0x45fdfa(0x189)],'target':{'type':_0x45fdfa(0x178),'startOffset':_0x391539[_0x45fdfa(0x158)],'endOffset':_0x391539[_0x45fdfa(0x190)]},'unitId':this[_0x45fdfa(0x181)]()});}[_0x4e8d1d(0x163)](_0x2e8b83){var _0x974750=_0x4e8d1d;let _0x5c0316=this[_0x974750(0x15e)]['syncExecuteCommand'](_0x3c045b['id'],_0x2e8b83);return _0x5c0316?this['_createFormula'](_0x5c0316[_0x974750(0x16b)]):null;}[_0x4e8d1d(0x14e)](){var _0x273fd4=_0x4e8d1d,_0xfad6d2;let _0x188bcf=this[_0x273fd4(0x16e)][_0x273fd4(0x14f)](this[_0x273fd4(0x181)]());return((_0xfad6d2=this[_0x273fd4(0x15f)]('')['customRanges'])==null?void 0x0:_0xfad6d2['filter'](_0x526892=>_0x19981d(_0x526892)&&_0x188bcf[_0x526892[_0x273fd4(0x16b)]]!=null))??[];}[_0x4e8d1d(0x14b)](_0x289242){var _0x4ba4ae=_0x4e8d1d;return this[_0x4ba4ae(0x175)]['createInstance'](b,this[_0x4ba4ae(0x181)](),_0x289242);}};_0x1ac644[_0x4e8d1d(0x179)](T);var E=class extends _0x44e6e4{constructor(..._0x5716df){var _0xa2aa34=_0x4e8d1d;super(..._0x5716df),w(this,_0xa2aa34(0x15e),void 0x0);}['_initialize'](_0x1d697f){var _0xcc815b=_0x4e8d1d;this['_docsFormulaCommandService']=_0x1d697f[_0xcc815b(0x153)](_0x549850);}[_0x4e8d1d(0x18f)](_0x2a4f4a,_0x3710d8,_0x1512ff={}){var _0x345d43=_0x4e8d1d;return this[_0x345d43(0x163)](_0x2a4f4a,_0x3710d8,_0x1512ff);}[_0x4e8d1d(0x17b)](_0x4c9c07,_0x26aa01={}){var _0x3e7d9e=_0x4e8d1d;return this[_0x3e7d9e(0x163)](_0x3e7d9e(0x166),_0x4c9c07,_0x26aa01);}[_0x4e8d1d(0x163)](_0x3159dc,_0x4062a2,_0x427c34){var _0x2a3313=_0x4e8d1d;if(this[_0x2a3313(0x16f)]())return null;let _0x3581df={'externalReferences':_0x427c34[_0x2a3313(0x194)],'formula':_0x4062a2,'numberFormat':_0x427c34[_0x2a3313(0x189)],'target':{'type':_0x2a3313(0x188),'paragraphId':this['getId'](),'position':_0x3159dc},'unitId':this[_0x2a3313(0x18e)][_0x2a3313(0x181)]()},_0x8a3f0c=this[_0x2a3313(0x15e)][_0x2a3313(0x16c)](_0x3c045b['id'],_0x3581df);return _0x8a3f0c?this[_0x2a3313(0x175)]['createInstance'](b,this[_0x2a3313(0x18e)][_0x2a3313(0x181)](),_0x8a3f0c[_0x2a3313(0x16b)]):null;}};_0x44e6e4[_0x4e8d1d(0x179)](E);var D=class extends _0x4618e9{constructor(..._0x2797e2){var _0x5c3edf=_0x4e8d1d;super(..._0x2797e2),w(this,_0x5c3edf(0x15e),void 0x0);}[_0x4e8d1d(0x149)](_0x45312a){var _0x5a4e91=_0x4e8d1d;this[_0x5a4e91(0x15e)]=_0x45312a[_0x5a4e91(0x153)](_0x549850);}[_0x4e8d1d(0x15b)](_0x1e5aab,_0x3c65c2={}){var _0x46eed9=_0x4e8d1d;let {endOffset:_0x574388,segmentId:_0x1f9318,startOffset:_0x116856}=this[_0x46eed9(0x154)]();return _0x1f9318?null:this['_insert'](_0x116856,_0x574388,_0x1e5aab,_0x3c65c2);}['_insert'](_0x21d069,_0x5141dd,_0x4604ab,_0x12c9f8){var _0x5626fe=_0x4e8d1d;let _0x3f32b6={'externalReferences':_0x12c9f8[_0x5626fe(0x194)],'formula':_0x4604ab,'numberFormat':_0x12c9f8[_0x5626fe(0x189)],'target':{'type':_0x5626fe(0x178),'startOffset':_0x21d069,'endOffset':_0x5141dd},'unitId':this[_0x5626fe(0x18e)][_0x5626fe(0x181)]()},_0x294159=this['_docsFormulaCommandService'][_0x5626fe(0x16c)](_0x3c045b['id'],_0x3f32b6);return _0x294159?this[_0x5626fe(0x175)][_0x5626fe(0x165)](b,this[_0x5626fe(0x18e)][_0x5626fe(0x181)](),_0x294159['rangeId']):null;}};_0x4618e9[_0x4e8d1d(0x179)](D);export{b as FDocumentFormula};
|