@univerjs-pro/docs-formula 1.3.1 → 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/types/common/const.d.ts +0 -1
- package/lib/types/common/type.d.ts +1 -3
- package/lib/types/index.d.ts +1 -1
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +12 -12
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 _0x3617b1=_0x864f;(function(_0x55025d,_0x252a1a){const _0x424668=_0x864f,_0x15fec7=_0x55025d();while(!![]){try{const _0x36db13=parseInt(_0x424668(0x1d6))/0x1+parseInt(_0x424668(0x1c2))/0x2+parseInt(_0x424668(0x1b7))/0x3*(parseInt(_0x424668(0x1a9))/0x4)+-parseInt(_0x424668(0x1a3))/0x5+parseInt(_0x424668(0x1b2))/0x6+-parseInt(_0x424668(0x19d))/0x7*(parseInt(_0x424668(0x1cf))/0x8)+-parseInt(_0x424668(0x1dc))/0x9;if(_0x36db13===_0x252a1a)break;else _0x15fec7['push'](_0x15fec7['shift']());}catch(_0x478d86){_0x15fec7['push'](_0x15fec7['shift']());}}}(_0x5da3,0xa9e91),Object[_0x3617b1(0x1ac)](exports,Symbol[_0x3617b1(0x1bc)],{'value':_0x3617b1(0x193)}));let e=require('@univerjs-pro/docs-formula'),t=require('@univerjs/core'),n=require('@univerjs/docs/facade');function _0x864f(_0x106c79,_0x3e3d0c){_0x106c79=_0x106c79-0x18a;const _0x5da3b5=_0x5da3();let _0x864f2b=_0x5da3b5[_0x106c79];return _0x864f2b;}function r(_0x329875,_0x3e7810){return function(_0x3eb7ed,_0x228124){_0x3e7810(_0x3eb7ed,_0x228124,_0x329875);};}function i(_0x14a0bf,_0x1ab442,_0x548fbf,_0x110c19){const _0x3e8fc1=_0x3617b1;var _0x1aee8c=arguments[_0x3e8fc1(0x1e2)],_0x31b1c3=_0x1aee8c<0x3?_0x1ab442:_0x110c19===null?_0x110c19=Object['getOwnPropertyDescriptor'](_0x1ab442,_0x548fbf):_0x110c19,_0x2ed32f;if(typeof Reflect==_0x3e8fc1(0x192)&&typeof Reflect[_0x3e8fc1(0x1c9)]==_0x3e8fc1(0x19e))_0x31b1c3=Reflect['decorate'](_0x14a0bf,_0x1ab442,_0x548fbf,_0x110c19);else{for(var _0x50d1f7=_0x14a0bf[_0x3e8fc1(0x1e2)]-0x1;_0x50d1f7>=0x0;_0x50d1f7--)(_0x2ed32f=_0x14a0bf[_0x50d1f7])&&(_0x31b1c3=(_0x1aee8c<0x3?_0x2ed32f(_0x31b1c3):_0x1aee8c>0x3?_0x2ed32f(_0x1ab442,_0x548fbf,_0x31b1c3):_0x2ed32f(_0x1ab442,_0x548fbf))||_0x31b1c3);}return _0x1aee8c>0x3&&_0x31b1c3&&Object[_0x3e8fc1(0x1ac)](_0x1ab442,_0x548fbf,_0x31b1c3),_0x31b1c3;}let a=class{constructor(_0x16a283,_0xa8f61f,_0x18d708,_0x11d7d3,_0x2dc8b8,_0x59a17c){const _0x5e6fe8=_0x3617b1;this['_unitId']=_0x16a283,this['_rangeId']=_0xa8f61f,this[_0x5e6fe8(0x197)]=_0x18d708,this[_0x5e6fe8(0x1a6)]=_0x11d7d3,this['_service']=_0x2dc8b8,this[_0x5e6fe8(0x1c6)]=_0x59a17c;}['getId'](){const _0x21a1d0=_0x3617b1;return this[_0x21a1d0(0x1cd)];}[_0x3617b1(0x1a8)](){const _0x45f24d=_0x3617b1;let _0x1ce2e7=this[_0x45f24d(0x1d2)]();return _0x1ce2e7?{'endOffset':_0x1ce2e7[_0x45f24d(0x1a2)]+0x1,'rangeId':_0x1ce2e7[_0x45f24d(0x1e0)],'startOffset':_0x1ce2e7[_0x45f24d(0x1c0)]}:null;}['getFormula'](){const _0x363ceb=_0x3617b1;var _0x1da745;return((_0x1da745=this[_0x363ceb(0x1a6)][_0x363ceb(0x1b9)](this['_unitId'],this[_0x363ceb(0x1cd)]))==null?void 0x0:_0x1da745['formula'])??'';}[_0x3617b1(0x1c5)](){const _0xab2613=_0x3617b1;return this[_0xab2613(0x1a6)][_0xab2613(0x1b9)](this['_unitId'],this[_0xab2613(0x1cd)])??null;}['getResult'](){const _0x5ca197=_0x3617b1;return this[_0x5ca197(0x1ab)][_0x5ca197(0x1a7)]({'unitId':this['_unitId'],'rangeId':this[_0x5ca197(0x1cd)]})??null;}[_0x3617b1(0x1df)](){const _0x332b2b=_0x3617b1;let _0x33bba2=this[_0x332b2b(0x1a8)](),_0x170e30=this[_0x332b2b(0x1c5)](),_0xb81b4d=this[_0x332b2b(0x1a7)]();return!_0x33bba2||!_0x170e30||!_0xb81b4d?null:{..._0x33bba2,'config':_0x170e30,'formula':_0x170e30['formula'],'result':_0xb81b4d,'type':_0x332b2b(0x1db)};}['update'](_0x40ec96){const _0x8384c4=_0x3617b1;return this[_0x8384c4(0x197)][_0x8384c4(0x1c8)](e[_0x8384c4(0x1ae)]['id'],{'externalReferences':_0x40ec96['externalReferences'],'formula':_0x40ec96[_0x8384c4(0x1db)],'numberFormat':_0x40ec96[_0x8384c4(0x1ce)],'rangeId':this[_0x8384c4(0x1cd)],'unitId':this[_0x8384c4(0x1a0)]});}[_0x3617b1(0x1ad)](_0x4c516f){const _0x1c4bfd=_0x3617b1;return this[_0x1c4bfd(0x197)]['syncExecuteCommand'](e[_0x1c4bfd(0x1c4)]['id'],{'numberFormat':_0x4c516f,'rangeId':this['_rangeId'],'unitId':this[_0x1c4bfd(0x1a0)]});}[_0x3617b1(0x1b1)](){const _0x379059=_0x3617b1;return this[_0x379059(0x197)][_0x379059(0x1c8)](e[_0x379059(0x199)]['id'],{'rangeId':this['_rangeId'],'unitId':this[_0x379059(0x1a0)]});}['replaceWithText'](_0x16de30){const _0x49b723=_0x3617b1;return this[_0x49b723(0x197)][_0x49b723(0x1c8)](e[_0x49b723(0x1ca)]['id'],{'rangeId':this[_0x49b723(0x1cd)],'text':_0x16de30,'unitId':this['_unitId']});}[_0x3617b1(0x1d8)](){const _0x42abf4=_0x3617b1;return this[_0x42abf4(0x197)][_0x42abf4(0x1c8)](e[_0x42abf4(0x1d4)]['id'],{'rangeId':this[_0x42abf4(0x1cd)],'unitId':this['_unitId']});}[_0x3617b1(0x1d2)](){const _0x36fc41=_0x3617b1;var _0x101c79;let _0x28681=this[_0x36fc41(0x1c6)][_0x36fc41(0x1b3)](this[_0x36fc41(0x1a0)],t['UniverInstanceType']['UNIVER_DOC']);return _0x28681==null||(_0x101c79=_0x28681[_0x36fc41(0x1d1)]()[_0x36fc41(0x1d5)])==null||(_0x101c79=_0x101c79['customRanges'])==null?void 0x0:_0x101c79[_0x36fc41(0x1be)](_0x150fe9=>_0x150fe9[_0x36fc41(0x1e0)]===this[_0x36fc41(0x1cd)]&&(0x0,e[_0x36fc41(0x1dd)])(_0x150fe9));}};a=i([r(0x2,t[_0x3617b1(0x1aa)]),r(0x3,(0x0,t['Inject'])(e[_0x3617b1(0x1b4)])),r(0x4,(0x0,t[_0x3617b1(0x191)])(e[_0x3617b1(0x19a)])),r(0x5,t[_0x3617b1(0x1d3)])],a);function o(_0x14a26b){'@babel/helpers - typeof';const _0x538487=_0x3617b1;return o=typeof Symbol==_0x538487(0x19e)&&typeof Symbol[_0x538487(0x1af)]==_0x538487(0x190)?function(_0x2c8783){return typeof _0x2c8783;}:function(_0x1e04cc){const _0x5c8584=_0x538487;return _0x1e04cc&&typeof Symbol==_0x5c8584(0x19e)&&_0x1e04cc[_0x5c8584(0x1a4)]===Symbol&&_0x1e04cc!==Symbol[_0x5c8584(0x19c)]?_0x5c8584(0x190):typeof _0x1e04cc;},o(_0x14a26b);}function s(_0x20813e,_0x46d305){const _0x33625a=_0x3617b1;if(o(_0x20813e)!=_0x33625a(0x192)||!_0x20813e)return _0x20813e;var _0x6b3902=_0x20813e[Symbol['toPrimitive']];if(_0x6b3902!==void 0x0){var _0x35f7a8=_0x6b3902['call'](_0x20813e,_0x46d305||_0x33625a(0x1b6));if(o(_0x35f7a8)!=_0x33625a(0x192))return _0x35f7a8;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x46d305===_0x33625a(0x1ba)?String:Number)(_0x20813e);}function c(_0x11762f){const _0x2dc5d5=_0x3617b1;var _0x2cae8e=s(_0x11762f,'string');return o(_0x2cae8e)==_0x2dc5d5(0x190)?_0x2cae8e:_0x2cae8e+'';}function l(_0x2c248e,_0x535a47,_0x5be253){const _0x2ad50f=_0x3617b1;return(_0x535a47=c(_0x535a47))in _0x2c248e?Object[_0x2ad50f(0x1ac)](_0x2c248e,_0x535a47,{'value':_0x5be253,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x2c248e[_0x535a47]=_0x5be253,_0x2c248e;}var u=class extends n[_0x3617b1(0x1bf)]{constructor(..._0x2f585c){const _0x57eba2=_0x3617b1;super(..._0x2f585c),l(this,_0x57eba2(0x196),void 0x0),l(this,'_docsFormulaDisplayTextService',void 0x0),l(this,'_docsFormulaModel',void 0x0),l(this,'_docsFormulaResourceLoaderService',void 0x0);}[_0x3617b1(0x198)](_0x44bb84){const _0x40c20d=_0x3617b1;this[_0x40c20d(0x196)]=_0x44bb84['get'](t['ICommandService']),this['_docsFormulaDisplayTextService']=_0x44bb84[_0x40c20d(0x1da)](e[_0x40c20d(0x1e3)]),this[_0x40c20d(0x1a5)]=_0x44bb84[_0x40c20d(0x1da)](e[_0x40c20d(0x1b4)]),this[_0x40c20d(0x1a1)]=_0x44bb84[_0x40c20d(0x1da)](t['IResourceLoaderService']);}[_0x3617b1(0x19f)](){const _0x33a947=_0x3617b1;return this[_0x33a947(0x1bb)]()[_0x33a947(0x1e1)](_0x59a18f=>this[_0x33a947(0x18f)](_0x59a18f[_0x33a947(0x1e0)]));}[_0x3617b1(0x1b9)](_0x5a11cf){const _0xef22f1=_0x3617b1;return this[_0xef22f1(0x1bb)]()[_0xef22f1(0x1e5)](_0x4e53f3=>_0x4e53f3['rangeId']===_0x5a11cf)?this[_0xef22f1(0x18f)](_0x5a11cf):null;}['getFormulaAt'](_0x1020d9){const _0x9928a2=_0x3617b1;let _0x4ffa4e=this[_0x9928a2(0x1bb)]()['find'](_0x524f67=>_0x524f67['startIndex']<=_0x1020d9&&_0x1020d9<=_0x524f67[_0x9928a2(0x1a2)]);return _0x4ffa4e?this[_0x9928a2(0x18f)](_0x4ffa4e[_0x9928a2(0x1e0)]):null;}['saveFormulaDisplayTextSnapshot'](){const _0x3d3dc8=_0x3617b1;let _0x2ca50f=this[_0x3d3dc8(0x1a1)]['saveUnit'](this['id']);if(!_0x2ca50f)throw Error(_0x3d3dc8(0x1e4)+this['id']+_0x3d3dc8(0x18c));return this[_0x3d3dc8(0x18d)][_0x3d3dc8(0x1de)](_0x2ca50f);}['insertFormula'](_0x9c0d42){const _0x3f69c4=_0x3617b1;return this[_0x3f69c4(0x1d0)]({'externalReferences':_0x9c0d42['externalReferences'],'formula':_0x9c0d42[_0x3f69c4(0x1db)],'numberFormat':_0x9c0d42[_0x3f69c4(0x1ce)],'target':{'type':'range','startOffset':_0x9c0d42['startOffset'],'endOffset':_0x9c0d42[_0x3f69c4(0x1cc)]},'unitId':this[_0x3f69c4(0x1c7)]()});}[_0x3617b1(0x1d0)](_0x329841){const _0x37017e=_0x3617b1;let _0x2a9d70=this[_0x37017e(0x196)]['syncExecuteCommand'](e[_0x37017e(0x1c3)]['id'],_0x329841);return _0x2a9d70?this[_0x37017e(0x18f)](_0x2a9d70['rangeId']):null;}[_0x3617b1(0x1bb)](){const _0x4cb166=_0x3617b1;var _0x30c8b2;let _0x3e5f71=this['_docsFormulaModel'][_0x4cb166(0x19f)](this[_0x4cb166(0x1c7)]());return((_0x30c8b2=this[_0x4cb166(0x1b5)]('')['customRanges'])==null?void 0x0:_0x30c8b2[_0x4cb166(0x1b8)](_0x3902c2=>(0x0,e[_0x4cb166(0x1dd)])(_0x3902c2)&&_0x3e5f71[_0x3902c2['rangeId']]!=null))??[];}[_0x3617b1(0x18f)](_0x252c95){const _0xcd600a=_0x3617b1;return this[_0xcd600a(0x1c1)][_0xcd600a(0x1cb)](a,this[_0xcd600a(0x1c7)](),_0x252c95);}};n[_0x3617b1(0x1bf)][_0x3617b1(0x1b0)](u);var d=class extends n[_0x3617b1(0x18e)]{constructor(..._0x57a73f){const _0x5b3d85=_0x3617b1;super(..._0x57a73f),l(this,_0x5b3d85(0x196),void 0x0);}[_0x3617b1(0x198)](_0x208a65){const _0x24749d=_0x3617b1;this[_0x24749d(0x196)]=_0x208a65[_0x24749d(0x1da)](t[_0x24749d(0x1aa)]);}[_0x3617b1(0x1bd)](_0x5a1269,_0x5030e6,_0x2deb8e={}){const _0x1ae5b9=_0x3617b1;return this[_0x1ae5b9(0x1d0)](_0x5a1269,_0x5030e6,_0x2deb8e);}[_0x3617b1(0x195)](_0x2aa429,_0x5f1748={}){const _0x154e68=_0x3617b1;return this[_0x154e68(0x1d0)](_0x154e68(0x1d9),_0x2aa429,_0x5f1748);}[_0x3617b1(0x1d0)](_0xbcf0b8,_0x1064f1,_0x2af73a){const _0xc88842=_0x3617b1;if(this[_0xc88842(0x194)]())return null;let _0xb6b11a={'externalReferences':_0x2af73a[_0xc88842(0x18b)],'formula':_0x1064f1,'numberFormat':_0x2af73a['numberFormat'],'target':{'type':'paragraph','paragraphId':this[_0xc88842(0x1c7)](),'position':_0xbcf0b8},'unitId':this['_document'][_0xc88842(0x1c7)]()},_0x263918=this[_0xc88842(0x196)][_0xc88842(0x1c8)](e[_0xc88842(0x1c3)]['id'],_0xb6b11a);return _0x263918?this['_injector'][_0xc88842(0x1cb)](a,this[_0xc88842(0x1d7)]['getId'](),_0x263918[_0xc88842(0x1e0)]):null;}};n[_0x3617b1(0x18e)][_0x3617b1(0x1b0)](d);var f=class extends n[_0x3617b1(0x19b)]{constructor(..._0xcf07ac){super(..._0xcf07ac),l(this,'_docsFormulaCommandService',void 0x0);}[_0x3617b1(0x198)](_0x1f3680){const _0x3995b1=_0x3617b1;this[_0x3995b1(0x196)]=_0x1f3680[_0x3995b1(0x1da)](t[_0x3995b1(0x1aa)]);}[_0x3617b1(0x18a)](_0x28dea5,_0x514ddb={}){const _0x30535a=_0x3617b1;let {endOffset:_0x268b7f,segmentId:_0x21945e,startOffset:_0x15b996}=this[_0x30535a(0x1a8)]();return _0x21945e?null:this['_insert'](_0x15b996,_0x268b7f,_0x28dea5,_0x514ddb);}[_0x3617b1(0x1d0)](_0x5a3526,_0x433ba6,_0x33aff0,_0x1044ce){const _0x1d44e8=_0x3617b1;let _0x57a768={'externalReferences':_0x1044ce[_0x1d44e8(0x18b)],'formula':_0x33aff0,'numberFormat':_0x1044ce[_0x1d44e8(0x1ce)],'target':{'type':'range','startOffset':_0x5a3526,'endOffset':_0x433ba6},'unitId':this['_document'][_0x1d44e8(0x1c7)]()},_0x358b98=this[_0x1d44e8(0x196)][_0x1d44e8(0x1c8)](e[_0x1d44e8(0x1c3)]['id'],_0x57a768);return _0x358b98?this[_0x1d44e8(0x1c1)][_0x1d44e8(0x1cb)](a,this[_0x1d44e8(0x1d7)][_0x1d44e8(0x1c7)](),_0x358b98[_0x1d44e8(0x1e0)]):null;}};function _0x5da3(){const _0x48a75b=['_getCustomRange','IUniverInstanceService','ConvertDocFormulaToTextCommand','body','764458oFuijQ','_document','convertToText','end','get','formula','9921537mODWpM','isDocFormulaRange','degradeDocumentData','describe','rangeId','map','length','DocFormulaDisplayTextService','Document\x20','some','replaceWithFormula','externalReferences','\x20could\x20not\x20be\x20serialized.','_docsFormulaDisplayTextService','FDocumentParagraph','_createFormula','symbol','Inject','object','Module','getSegmentId','appendFormula','_docsFormulaCommandService','_commandService','_initialize','RemoveDocFormulaCommand','DocFormulaService','FDocumentTextRange','prototype','228557FMKfXb','function','getFormulas','_unitId','_docsFormulaResourceLoaderService','endIndex','4326880HIWirr','constructor','_docsFormulaModel','_model','getResult','getRange','427436NTEYzw','ICommandService','_service','defineProperty','setNumberFormat','UpdateDocFormulaCommand','iterator','extend','remove','7218504pukdhv','getUnit','DocFormulaModel','getBody','default','30oAaGHV','filter','getFormula','string','_getCompleteRanges','toStringTag','insertFormula','find','FDocument','startIndex','_injector','365314MmXufg','InsertDocFormulaCommand','SetDocFormulaNumberFormatCommand','getConfig','_univerInstanceService','getId','syncExecuteCommand','decorate','ReplaceDocFormulaWithTextCommand','createInstance','endOffset','_rangeId','numberFormat','136aQsIZx','_insert','getSnapshot'];_0x5da3=function(){return _0x48a75b;};return _0x5da3();}n[_0x3617b1(0x19b)][_0x3617b1(0x1b0)](f),Object[_0x3617b1(0x1ac)](exports,'FDocumentFormula',{'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 _0x4136c9=_0x44d8;(function(_0x3e5984,_0x38f9f5){const _0x22882d=_0x44d8,_0x14de2f=_0x3e5984();while(!![]){try{const _0x1d7ed1=parseInt(_0x22882d(0x10f))/0x1*(-parseInt(_0x22882d(0x184))/0x2)+parseInt(_0x22882d(0x1b6))/0x3+parseInt(_0x22882d(0x12d))/0x4*(-parseInt(_0x22882d(0x1b2))/0x5)+parseInt(_0x22882d(0x17a))/0x6+parseInt(_0x22882d(0x22d))/0x7+-parseInt(_0x22882d(0x15b))/0x8+parseInt(_0x22882d(0x158))/0x9;if(_0x1d7ed1===_0x38f9f5)break;else _0x14de2f['push'](_0x14de2f['shift']());}catch(_0x501898){_0x14de2f['push'](_0x14de2f['shift']());}}}(_0xa4cb,0xc8069),Object['defineProperty'](exports,Symbol['toStringTag'],{'value':_0x4136c9(0x119)}));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=_0x4136c9(0x116),s=_0x4136c9(0x111);function c(){return{'schemaVersion':0x1,'formulas':{}};}function l(_0x48aa19){const _0x431d20=_0x4136c9;return!_0x48aa19||typeof _0x48aa19!='object'||!f(_0x48aa19,['schemaVersion','formulas'])||!('schemaVersion'in _0x48aa19)||_0x48aa19[_0x431d20(0x13f)]!==0x1||!(_0x431d20(0x1e2)in _0x48aa19)||!_0x48aa19[_0x431d20(0x1e2)]||typeof _0x48aa19['formulas']!=_0x431d20(0x217)||Array[_0x431d20(0x139)](_0x48aa19[_0x431d20(0x1e2)])?!0x1:Object[_0x431d20(0x176)](_0x48aa19[_0x431d20(0x1e2)])[_0x431d20(0x123)](([_0x2c0f29,_0x1f87e2])=>_0x2c0f29[_0x431d20(0x13a)]>0x0&&u(_0x1f87e2));}function u(_0x4722b4){const _0x161dbb=_0x4136c9;return!_0x4722b4||typeof _0x4722b4!='object'||!f(_0x4722b4,[_0x161dbb(0x220),_0x161dbb(0x20b),_0x161dbb(0x145)])||!('formula'in _0x4722b4)||typeof _0x4722b4[_0x161dbb(0x220)]!='string'||!_0x4722b4['formula']['trim']()||'numberFormat'in _0x4722b4&&_0x4722b4[_0x161dbb(0x20b)]!=null&&(typeof _0x4722b4[_0x161dbb(0x20b)]!=_0x161dbb(0x217)||!f(_0x4722b4[_0x161dbb(0x20b)],[_0x161dbb(0x168)])||!(_0x161dbb(0x168)in _0x4722b4[_0x161dbb(0x20b)])||typeof _0x4722b4[_0x161dbb(0x20b)][_0x161dbb(0x168)]!=_0x161dbb(0x122))?!0x1:!(_0x161dbb(0x145)in _0x4722b4)||_0x4722b4[_0x161dbb(0x145)]==null||d(_0x4722b4[_0x161dbb(0x145)]);}function d(_0x2d63d3){const _0x2a56ff=_0x4136c9;return!_0x2d63d3||typeof _0x2d63d3!='object'||!f(_0x2d63d3,['v','t',_0x2a56ff(0x168)])||!('v'in _0x2d63d3)||_0x2d63d3['v']!==null&&typeof _0x2d63d3['v']!=_0x2a56ff(0x122)&&typeof _0x2d63d3['v']!=_0x2a56ff(0x12e)&&typeof _0x2d63d3['v']!=_0x2a56ff(0x199)||'t'in _0x2d63d3&&_0x2d63d3['t']!=null&&!ee(_0x2d63d3['t'])?!0x1:!('pattern'in _0x2d63d3)||_0x2d63d3[_0x2a56ff(0x168)]==null||typeof _0x2d63d3[_0x2a56ff(0x168)]==_0x2a56ff(0x122);}function f(_0x1db214,_0x5a53b7){const _0x1d578f=_0x4136c9;let _0x42d851=new Set(_0x5a53b7);return Object['keys'](_0x1db214)[_0x1d578f(0x123)](_0x5e5070=>_0x42d851[_0x1d578f(0x156)](_0x5e5070));}function ee(_0x205d1f){const _0x1df62a=_0x4136c9;return typeof _0x205d1f==_0x1df62a(0x12e)&&Object[_0x1df62a(0x14d)](t[_0x1df62a(0x204)])['includes'](_0x205d1f);}const p=new Set([t[_0x4136c9(0x1a8)][_0x4136c9(0x104)],t[_0x4136c9(0x1a8)][_0x4136c9(0x142)],t[_0x4136c9(0x1a8)][_0x4136c9(0x170)],t[_0x4136c9(0x1a8)][_0x4136c9(0x130)],t[_0x4136c9(0x1a8)]['TABLE_CELL_END'],t[_0x4136c9(0x1a8)][_0x4136c9(0x140)],t['DataStreamTreeTokenType'][_0x4136c9(0x102)],t['DataStreamTreeTokenType'][_0x4136c9(0x18a)],t[_0x4136c9(0x1a8)][_0x4136c9(0x214)],t[_0x4136c9(0x1a8)][_0x4136c9(0xf6)],t['DataStreamTreeTokenType']['COLUMN_GROUP_END'],t[_0x4136c9(0x1a8)][_0x4136c9(0x118)],t['DataStreamTreeTokenType'][_0x4136c9(0x10a)],t[_0x4136c9(0x1a8)][_0x4136c9(0x1b0)]]);var m=class extends Error{constructor(){const _0x20dd4a=_0x4136c9;super(_0x20dd4a(0x162));}};function te(_0x4f3603){const _0x1d859d=_0x4136c9;var _0x4ff60d,_0x123cf3;let _0x2230c7=t[_0x1d859d(0x21e)][_0x1d859d(0x187)](_0x4f3603[_0x1d859d(0x1bd)]),_0x184c70=T(_0x2230c7),{startOffset:_0x532163,endOffset:_0x18bce5}=oe(_0x184c70,_0x4f3603[_0x1d859d(0x16f)],_0x4f3603['endOffset']);ie(_0x184c70,_0x532163,_0x18bce5);let _0x429675=((_0x4ff60d=_0x184c70['customRanges'])==null?void 0x0:_0x4ff60d[_0x1d859d(0x1e1)](_0x2593cc=>{const _0x283782=_0x1d859d;if(!g(_0x2593cc))return!0x1;let _0x32963b=(0x0,t[_0x283782(0x1d7)])(_0x2593cc);return _0x32963b[_0x283782(0x22e)]>_0x532163&&_0x32963b['startOffset']<_0x18bce5;})['map'](_0x386667=>_0x386667['rangeId']))??[];ce(_0x184c70,_0x532163,_0x18bce5,''),_0x184c70[_0x1d859d(0x103)]=[...((_0x123cf3=_0x184c70[_0x1d859d(0x103)])==null?void 0x0:_0x123cf3['filter'](_0x145b56=>!_0x429675[_0x1d859d(0x18d)](_0x145b56[_0x1d859d(0xf3)])&&_0x145b56[_0x1d859d(0xf3)]!==_0x4f3603[_0x1d859d(0xf3)]))??[],ae(_0x4f3603[_0x1d859d(0xf3)],_0x532163)][_0x1d859d(0x1e4)]((_0xe409bd,_0x7049ad)=>_0xe409bd[_0x1d859d(0x1fe)]-_0x7049ad['startIndex']);let _0x29776a=v(_0x4f3603[_0x1d859d(0x148)]);return _0x429675['forEach'](_0x265f99=>{const _0x462d16=_0x1d859d;delete _0x29776a[_0x462d16(0x1e2)][_0x265f99];}),_0x29776a[_0x1d859d(0x1e2)][_0x4f3603[_0x1d859d(0xf3)]]=t[_0x1d859d(0x21e)][_0x1d859d(0x187)](_0x4f3603['config']),{'nextDocumentData':_0x2230c7,'nextResource':_0x29776a,'cursorOffset':_0x532163+0x1};}function ne(_0x7771c7){const _0x18145c=_0x4136c9;var _0x4a619e,_0x401c8a;let _0x787051=t[_0x18145c(0x21e)][_0x18145c(0x187)](_0x7771c7[_0x18145c(0x1bd)]),_0x27618b=(_0x4a619e=T(_0x787051)['customRanges'])==null?void 0x0:_0x4a619e[_0x18145c(0x124)](_0x5beaa8=>_0x5beaa8[_0x18145c(0xf3)]===_0x7771c7[_0x18145c(0xf3)]&&g(_0x5beaa8));if(!_0x27618b||!((_0x401c8a=_0x7771c7[_0x18145c(0x148)])!=null&&_0x401c8a[_0x18145c(0x1e2)][_0x7771c7[_0x18145c(0xf3)]]))return null;let _0x1813e7=v(_0x7771c7[_0x18145c(0x148)]);return _0x1813e7[_0x18145c(0x1e2)][_0x7771c7[_0x18145c(0xf3)]]=t[_0x18145c(0x21e)][_0x18145c(0x187)](_0x7771c7[_0x18145c(0x1ab)]),{'nextDocumentData':_0x787051,'nextResource':_0x1813e7,'cursorOffset':_0x27618b['endIndex']+0x1};}function h(_0x171fa9){const _0x23d607=_0x4136c9;let _0x182109=t['Tools'][_0x23d607(0x187)](_0x171fa9[_0x23d607(0x1bd)]),_0x304647=le(_0x182109,_0x171fa9['rangeId'],_0x171fa9['text']??'');if(_0x304647==null)return null;let _0x565ff7=v(_0x171fa9[_0x23d607(0x148)]);return delete _0x565ff7[_0x23d607(0x1e2)][_0x171fa9[_0x23d607(0xf3)]],{'nextDocumentData':_0x182109,'nextResource':_0x565ff7,'cursorOffset':_0x304647};}function re(_0x6313b4,_0x4d82de){const _0x4554a8=_0x4136c9;var _0x5b0461;let _0x15b81a=t[_0x4554a8(0x21e)]['deepClone'](_0x6313b4),_0x22e464=_0x15b81a[_0x4554a8(0x1f5)];if(!_0x22e464)return _0x15b81a;let _0x1be1d9=new Map(_0x4d82de['map'](_0x5db669=>[_0x5db669[_0x4554a8(0xf3)],_0x5db669[_0x4554a8(0x137)]])),_0x7bfa42=((_0x5b0461=_0x22e464[_0x4554a8(0x103)])==null?void 0x0:_0x5b0461[_0x4554a8(0x1e1)](_0x264c02=>g(_0x264c02)&&_0x1be1d9[_0x4554a8(0x156)](_0x264c02['rangeId']))[_0x4554a8(0x1e4)]((_0x29e20e,_0x368894)=>_0x368894[_0x4554a8(0x1fe)]-_0x29e20e[_0x4554a8(0x1fe)]))??[];for(let _0x5d0feb of _0x7bfa42)le(_0x15b81a,_0x5d0feb[_0x4554a8(0xf3)],_0x1be1d9[_0x4554a8(0xfc)](_0x5d0feb['rangeId'])??'');return _0x15b81a;}function g(_0x3b6627){const _0x371d0f=_0x4136c9;var _0x17a584;return(_0x3b6627==null?void 0x0:_0x3b6627[_0x371d0f(0x1b8)])===t['CustomRangeType'][_0x371d0f(0x1c0)]&&_0x3b6627[_0x371d0f(0x117)]===!0x0&&((_0x17a584=_0x3b6627[_0x371d0f(0x19e)])==null?void 0x0:_0x17a584[_0x371d0f(0x164)])===_0x371d0f(0x111);}function _(_0x4a1284,_0x574b0c){const _0x4a4713=_0x4136c9;var _0x2f952b;return _0x4a1284==null||(_0x2f952b=_0x4a1284[_0x4a4713(0x103)])==null?void 0x0:_0x2f952b[_0x4a4713(0x124)](_0x5ea98c=>_0x5ea98c['rangeId']===_0x574b0c&&g(_0x5ea98c));}function _0xa4cb(){const _0xe8d34b=['default','previousResource','decorate','replaceDocRanges','registerProvider','accessor','getRevision','name','deleteLength','referenceRevision','createEmptyDocFormulaResource','_docFormulaModel','invalid-resource','onCommandExecuted','empty','set','unregister','resources','pending','min','getFormula','error','getCustomRangeInterval','eligible','constructor','presentationChanged$','disabled','CommandType','data','DOC_SELECTION_OPTION_PRESERVE_CARET','UniverProFormulaEnginePlugin','trim','filter','formulas','identity','sort','_commandService','HostExternalReferenceModel','asObservable','SetDocFormulaResourceMutation','_univerInstanceService','resolveFormula','getSnapshot','RichTextEditingMutation','ConvertDocFormulaToTextCommand','paragraph','Subject','getParagraphContentStartOffset','touchDependencies','docs-formula.config','pluginName','SetDocFormulaNumberFormatCommand','body','undoMutation','ReplaceDocFormulaWithTextCommand','SUCCESS','docs-formula.command.remove','complete','document','dispose','_hostExternalReferenceModel','startIndex','type','slice','buildUpdateDocFormulaActions','_service','assign','CellValueType','delete','serialize','expectedReferenceRevision','Disposable','fromEntries','docs-formula.command.replace-with-text','numberFormat','_setPresentation','docs-formula.mutation.set-formula','presentation','endIndex','getRegisteredFormulas','defineProperty','getPresentation','clear','COLUMN_START','color','DocTextResolverService','object','redoMutation','unregisterUnit','subscribe','from','cell','parse','Tools','getScalarFormulaResultCell','formula','success','registerFormulaWithRange','DependentOn','UniverLicensePlugin','unsupported-version','trigger','_change$','docs-formula.mutation.remove-formula','degradeDocFormulaDocumentData','SetDocFormulaMutation','nextResource','removeUnit','1201284NGmlhx','endOffset','insertLength','dataStream','assertSafeDocFormulaInsertRange','_model','rangeId','syncUnit','previousDocumentData','COLUMN_END','FormulaResultStatus','model','getTextRanges','degradeDocumentData','_preserveInvalid','get','LexerTreeBuilder','liveResult','COMMAND','_formulaKeys','IUndoRedoService','TABLE_END','customRanges','SECTION_BREAK','source','call','degradeBody','UniverDocsPlugin','getResource','BLOCK_END','add','resolveBinding','RemoveDocFormulaCommand','resolveFormulaResultPresentation','14533uNSvxe','UniverInstanceType','univer-docs-formula','EMPTY','_deleteRegistration','externalMutations','DocFormulaService','DOC_FORMULA_PLUGIN','wholeEntity','BLOCK_START','Module','getBody','getRichTextEditPath','_cacheEligibilityService','docs-formula.command.insert','isFormulaLastValue','keys','_rawResources','columnGroups','string','every','find','range','formulaId','buildUpsertHostExternalReferenceMutations','InvalidDocFormulaInsertRangeError','_resources','change$','PARAGRAPH','setResource','650472kSdXUh','number','CustomRangeType','TABLE_CELL_START','_injector','MUTATION','_isDisposed','expectedFormula','shiftExclusiveRangeOnDelete','PENDING','text','load','isArray','length','docs-formula.mutation.set-resource','docs-formula.command.convert-to-text','tables','getLoadError','schemaVersion','TABLE_ROW_END','version','TABLE_START','_registrations','IUniverInstanceService','lastValue','shiftInclusiveRangeOnDelete','end','resource','nextDocumentData','getFormulas','DocFormulaDisplayTextService','getUnitId','values','_syncUnit','1.3.1','segmentId','documentRedo','buildInsertDocFormulaActions','JSONX','SetDocFormulaLastValuesMutation','UpdateDocFormulaCommand','has','blockRanges','2848005UQDdwR','_configService','updates','2057552kDIbqF','toPrimitive','unitId','Document\x20main\x20body\x20is\x20required\x20to\x20insert\x20Doc\x20Formula.','_loadErrors','merge','function','Doc\x20Formula\x20range\x20cannot\x20cross\x20document\x20structure\x20boundaries','UNIVER_DOC','kind','notifyTextChanged','map','isInteger','pattern','docs-formula.command.set-number-format','position','getUnit','isDocFormulaResource','resolveText','resourceRedo','startOffset','TABLE_ROW_START','iterator','Inject','DocSelectionManagerService','DocFormulaLifecycleController','_presentationChanged$','entries','toFormulaLastValue','prototype','insert','3194172lhhEsG','_registrationService','max','UniverDocsFormulaPlugin','unitDisposed$','paragraphId','endsWith','resolved','symbol','ERROR','2cCBZYu','Plugin','start','deepClone','customBlocks','_resourceManagerService','COLUMN_GROUP_START','getResult','push','includes','findDocFormulaRange','InsertDocFormulaCommand','DocFormulaResultStatus','paragraphs','ICommandService','stale','setFormula','customDecorations','getFormulaValueSync','RegisterOtherFormulaService','_syncScheduled','boolean','_instanceService','docs-formula.mutation.set-last-values','assess','resolveHostFormulaExternalReferences','properties','references','_queueSync','forEach','resourceUndo','FormulaCacheEligibilityService','retain','_pendingUnitIds','registerPluginResource','sectionBreaks','DataStreamTreeTokenType','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','syncExecuteCommand','config','packageName','next','DOC_FORMULA_CUSTOM_RANGE_KIND','removeFormula','CUSTOM_BLOCK','register','20wiMDeT','_formulaService','status','generateRandomId','2163255ZkMLbX','cursorOffset','rangeType','externalReferences','selection','disposeWithMe','textRuns','documentData','params','startsWith','CUSTOM'];_0xa4cb=function(){return _0xe8d34b;};return _0xa4cb();}function ie(_0x419752,_0x1f6cdd,_0x45fce8){const _0x152432=_0x4136c9;if(_0x1f6cdd===_0x45fce8){if(p['has'](_0x419752['dataStream'][_0x1f6cdd]))throw new m();}else{for(let _0x7edd6e=_0x1f6cdd;_0x7edd6e<_0x45fce8;_0x7edd6e++)if(_0x419752['dataStream'][_0x7edd6e]===t[_0x152432(0x1a8)][_0x152432(0x12b)]||p[_0x152432(0x156)](_0x419752[_0x152432(0xf0)][_0x7edd6e]))throw new m();}}function ae(_0x186ad7,_0x4fc158){const _0xbb9349=_0x4136c9;return{'startIndex':_0x4fc158,'endIndex':_0x4fc158,'rangeId':_0x186ad7,'rangeType':t[_0xbb9349(0x12f)][_0xbb9349(0x1c0)],'wholeEntity':!0x0,'properties':{'kind':s}};}function v(_0x1c888a){const _0xb0612d=_0x4136c9;return _0x1c888a?t[_0xb0612d(0x21e)][_0xb0612d(0x187)](_0x1c888a):c();}function oe(_0x5b8508,_0x2b9c9d,_0x4b38db){const _0x4be517=_0x4136c9;let _0x44153c=se(_0x5b8508),_0x480bec=_0x2b9c9d??_0x44153c,_0x2fdf0e=_0x4b38db??_0x480bec;return{'startOffset':y(Math[_0x4be517(0x1d4)](_0x480bec,_0x2fdf0e),_0x44153c),'endOffset':y(Math[_0x4be517(0x17c)](_0x480bec,_0x2fdf0e),_0x44153c)};}function y(_0x189425,_0x3332c3){const _0x68b0ce=_0x4136c9;return Math[_0x68b0ce(0x17c)](0x0,Math[_0x68b0ce(0x1d4)](_0x189425,_0x3332c3));}function _0x44d8(_0x32ff33,_0x3c9752){_0x32ff33=_0x32ff33-0xf0;const _0xa4cb44=_0xa4cb();let _0x44d83c=_0xa4cb44[_0x32ff33];return _0x44d83c;}function se(_0x2eb1ff){const _0x4d2058=_0x4136c9;return _0x2eb1ff[_0x4d2058(0xf0)][_0x4d2058(0x180)](''+t[_0x4d2058(0x1a8)]['PARAGRAPH']+t[_0x4d2058(0x1a8)]['SECTION_BREAK'])?Math[_0x4d2058(0x17c)](0x0,_0x2eb1ff[_0x4d2058(0xf0)][_0x4d2058(0x13a)]-0x2):_0x2eb1ff[_0x4d2058(0xf0)][_0x4d2058(0x180)](t[_0x4d2058(0x1a8)][_0x4d2058(0x104)])?Math[_0x4d2058(0x17c)](0x0,_0x2eb1ff[_0x4d2058(0xf0)][_0x4d2058(0x13a)]-0x1):_0x2eb1ff[_0x4d2058(0xf0)][_0x4d2058(0x13a)];}function ce(_0x200f19,_0x257676,_0x278ad8,_0x513db6){_0x278ad8>_0x257676&&de(_0x200f19,_0x257676,_0x278ad8),ue(_0x200f19,_0x257676,_0x513db6);}function le(_0x4b03e0,_0x450b36,_0xb695c2){const _0x198b7f=_0x4136c9;var _0x4447d5,_0x2e1dbb;let _0x15e690=T(_0x4b03e0),_0x32d0db=(_0x4447d5=_0x15e690[_0x198b7f(0x103)])==null?void 0x0:_0x4447d5['find'](_0x140d40=>_0x140d40[_0x198b7f(0xf3)]===_0x450b36&&g(_0x140d40));if(!_0x32d0db)return null;let _0x5ac8ae=(0x0,t[_0x198b7f(0x1d7)])(_0x32d0db);return ce(_0x15e690,_0x5ac8ae[_0x198b7f(0x16f)],_0x5ac8ae[_0x198b7f(0x22e)],_0xb695c2),_0x15e690[_0x198b7f(0x103)]=(_0x2e1dbb=_0x15e690[_0x198b7f(0x103)])==null?void 0x0:_0x2e1dbb[_0x198b7f(0x1e1)](_0x40e9ce=>_0x40e9ce['rangeId']!==_0x450b36),_0x5ac8ae[_0x198b7f(0x16f)]+_0xb695c2['length'];}function ue(_0x4a996d,_0x56e7c8,_0x3edf38){const _0x28b539=_0x4136c9;_0x3edf38&&(_0x4a996d[_0x28b539(0xf0)]=''+_0x4a996d[_0x28b539(0xf0)][_0x28b539(0x200)](0x0,_0x56e7c8)+_0x3edf38+_0x4a996d[_0x28b539(0xf0)][_0x28b539(0x200)](_0x56e7c8),fe(_0x4a996d,_0x56e7c8,_0x3edf38[_0x28b539(0x13a)]));}function de(_0xba8461,_0x189a7e,_0x47a98e){const _0x577423=_0x4136c9;let _0x17e1e9=_0x47a98e-_0x189a7e;_0xba8461[_0x577423(0xf0)]=''+_0xba8461[_0x577423(0xf0)][_0x577423(0x200)](0x0,_0x189a7e)+_0xba8461['dataStream'][_0x577423(0x200)](_0x47a98e),pe(_0xba8461,_0x189a7e,_0x17e1e9);}function fe(_0x53d7a3,_0x5afe9d,_0x18f427){const _0x414032=_0x4136c9;_0x53d7a3[_0x414032(0x191)]=b(_0x53d7a3[_0x414032(0x191)],_0x5afe9d,_0x18f427),_0x53d7a3[_0x414032(0x1a7)]=b(_0x53d7a3[_0x414032(0x1a7)],_0x5afe9d,_0x18f427),_0x53d7a3[_0x414032(0x188)]=b(_0x53d7a3['customBlocks'],_0x5afe9d,_0x18f427),_0x53d7a3[_0x414032(0x1bc)]=me(_0x53d7a3['textRuns'],_0x5afe9d,_0x18f427),_0x53d7a3[_0x414032(0x13d)]=he(_0x53d7a3[_0x414032(0x13d)],_0x5afe9d,_0x18f427),_0x53d7a3[_0x414032(0x121)]=S(_0x53d7a3[_0x414032(0x121)],_0x5afe9d,_0x18f427),_0x53d7a3[_0x414032(0x103)]=S(_0x53d7a3[_0x414032(0x103)],_0x5afe9d,_0x18f427),_0x53d7a3[_0x414032(0x195)]=S(_0x53d7a3[_0x414032(0x195)],_0x5afe9d,_0x18f427),_0x53d7a3[_0x414032(0x157)]=S(_0x53d7a3['blockRanges'],_0x5afe9d,_0x18f427);}function pe(_0x58d4c7,_0x13abb0,_0x27aead){const _0x48fcaf=_0x4136c9;var _0xe34f0d,_0x21d36d;_0x58d4c7[_0x48fcaf(0x191)]=x(_0x58d4c7['paragraphs'],_0x13abb0,_0x27aead),_0x58d4c7[_0x48fcaf(0x1a7)]=x(_0x58d4c7['sectionBreaks'],_0x13abb0,_0x27aead),_0x58d4c7[_0x48fcaf(0x188)]=x(_0x58d4c7[_0x48fcaf(0x188)],_0x13abb0,_0x27aead),_0x58d4c7['textRuns']=(_0xe34f0d=w((_0x21d36d=_0x58d4c7[_0x48fcaf(0x1bc)])==null?void 0x0:_0x21d36d[_0x48fcaf(0x166)](_0x119060=>({..._0x119060,'startIndex':_0x119060['st'],'endIndex':_0x119060['ed']})),_0x13abb0,_0x27aead))==null?void 0x0:_0xe34f0d[_0x48fcaf(0x166)](_0x54191a=>{let {startIndex:_0xb8775f,endIndex:_0xb6a0d,..._0x38ddde}=_0x54191a;return{..._0x38ddde,'st':_0xb8775f,'ed':_0xb6a0d};}),_0x58d4c7[_0x48fcaf(0x13d)]=w(_0x58d4c7['tables'],_0x13abb0,_0x27aead),_0x58d4c7[_0x48fcaf(0x121)]=C(_0x58d4c7['columnGroups'],_0x13abb0,_0x27aead),_0x58d4c7['customRanges']=C(_0x58d4c7[_0x48fcaf(0x103)],_0x13abb0,_0x27aead),_0x58d4c7['customDecorations']=C(_0x58d4c7[_0x48fcaf(0x195)],_0x13abb0,_0x27aead),_0x58d4c7[_0x48fcaf(0x157)]=C(_0x58d4c7[_0x48fcaf(0x157)],_0x13abb0,_0x27aead);}function b(_0x59a7df,_0x3d0377,_0x293006){const _0x14035f=_0x4136c9;return _0x59a7df==null?void 0x0:_0x59a7df['map'](_0xccb6ca=>_0xccb6ca[_0x14035f(0x1fe)]>=_0x3d0377?{..._0xccb6ca,'startIndex':_0xccb6ca[_0x14035f(0x1fe)]+_0x293006}:_0xccb6ca);}function x(_0x1f134a,_0x2b2b72,_0x48a445){const _0x36c38d=_0x4136c9;let _0x3aa001=_0x2b2b72+_0x48a445;return _0x1f134a==null?void 0x0:_0x1f134a[_0x36c38d(0x166)](_0x28b69e=>_0x28b69e[_0x36c38d(0x1fe)]>=_0x2b2b72&&_0x28b69e[_0x36c38d(0x1fe)]<_0x3aa001?null:_0x28b69e[_0x36c38d(0x1fe)]>=_0x3aa001?{..._0x28b69e,'startIndex':_0x28b69e[_0x36c38d(0x1fe)]-_0x48a445}:_0x28b69e)['filter'](_0x3f023f=>_0x3f023f!=null);}function me(_0x1f3a81,_0x433aae,_0x39d0c1){const _0x52d4c7=_0x4136c9;return _0x1f3a81==null?void 0x0:_0x1f3a81[_0x52d4c7(0x166)](_0x2ccd6e=>_0x2ccd6e['st']>=_0x433aae?{..._0x2ccd6e,'st':_0x2ccd6e['st']+_0x39d0c1,'ed':_0x2ccd6e['ed']+_0x39d0c1}:_0x2ccd6e['ed']>_0x433aae?{..._0x2ccd6e,'ed':_0x2ccd6e['ed']+_0x39d0c1}:_0x2ccd6e);}function S(_0x28eeb6,_0x1cc37e,_0x18d218){const _0x1ffcfd=_0x4136c9;return _0x28eeb6==null?void 0x0:_0x28eeb6[_0x1ffcfd(0x166)](_0x3675d7=>(0x0,t['shiftInclusiveRangeOnInsert'])(_0x3675d7,_0x1cc37e,_0x18d218));}function he(_0x5760e4,_0xc05fb7,_0x3ff06){const _0x242ec8=_0x4136c9;return _0x5760e4==null?void 0x0:_0x5760e4[_0x242ec8(0x166)](_0x17da42=>(0x0,t['shiftExclusiveRangeOnInsert'])(_0x17da42,_0xc05fb7,_0x3ff06));}function C(_0x5e3fca,_0x4f25a3,_0xab582a){const _0x4f466a=_0x4136c9;return _0x5e3fca==null?void 0x0:_0x5e3fca['map'](_0x5dacba=>(0x0,t[_0x4f466a(0x146)])(_0x5dacba,_0x4f25a3,_0xab582a))[_0x4f466a(0x1e1)](_0xd1df59=>_0xd1df59!=null);}function w(_0xd6cc10,_0x33e713,_0x556778){const _0x1b5842=_0x4136c9;return _0xd6cc10==null?void 0x0:_0xd6cc10['map'](_0x20c2fb=>(0x0,t[_0x1b5842(0x135)])(_0x20c2fb,_0x33e713,_0x556778))[_0x1b5842(0x1e1)](_0x29a542=>_0x29a542!=null);}function T(_0x420b23){const _0x3df3eb=_0x4136c9;if(!_0x420b23[_0x3df3eb(0x1f5)])throw Error(_0x3df3eb(0x15e));return _0x420b23[_0x3df3eb(0x1f5)];}function E(_0x5079ff){'@babel/helpers - typeof';const _0x541b47=_0x4136c9;return E=typeof Symbol==_0x541b47(0x161)&&typeof Symbol[_0x541b47(0x171)]==_0x541b47(0x182)?function(_0x52e7c8){return typeof _0x52e7c8;}:function(_0x364c4f){const _0x3c1da2=_0x541b47;return _0x364c4f&&typeof Symbol==_0x3c1da2(0x161)&&_0x364c4f[_0x3c1da2(0x1d9)]===Symbol&&_0x364c4f!==Symbol[_0x3c1da2(0x178)]?_0x3c1da2(0x182):typeof _0x364c4f;},E(_0x5079ff);}function ge(_0x2fc47e,_0x1d45b2){const _0x564cb7=_0x4136c9;if(E(_0x2fc47e)!=_0x564cb7(0x217)||!_0x2fc47e)return _0x2fc47e;var _0x23d968=_0x2fc47e[Symbol[_0x564cb7(0x15c)]];if(_0x23d968!==void 0x0){var _0x3037ef=_0x23d968[_0x564cb7(0x106)](_0x2fc47e,_0x1d45b2||_0x564cb7(0x1c1));if(E(_0x3037ef)!=_0x564cb7(0x217))return _0x3037ef;throw TypeError(_0x564cb7(0x1a9));}return(_0x1d45b2===_0x564cb7(0x122)?String:Number)(_0x2fc47e);}function _e(_0x1764fe){const _0x449fe4=_0x4136c9;var _0x4a6c5c=ge(_0x1764fe,_0x449fe4(0x122));return E(_0x4a6c5c)==_0x449fe4(0x182)?_0x4a6c5c:_0x4a6c5c+'';}function D(_0x4c59eb,_0x134003,_0x5a2562){const _0x1d77cb=_0x4136c9;return(_0x134003=_e(_0x134003))in _0x4c59eb?Object[_0x1d77cb(0x211)](_0x4c59eb,_0x134003,{'value':_0x5a2562,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x4c59eb[_0x134003]=_0x5a2562,_0x4c59eb;}var O=class extends t[_0x4136c9(0x208)]{constructor(..._0x5703ca){const _0x2faeb1=_0x4136c9;super(..._0x5703ca),D(this,_0x2faeb1(0x129),new Map()),D(this,_0x2faeb1(0x120),new Map()),D(this,'_loadErrors',new Map()),D(this,_0x2faeb1(0x227),new i[(_0x2faeb1(0x1ef))]()),D(this,'change$',this['_change$'][_0x2faeb1(0x1e7)]());}[_0x4136c9(0x1d5)](_0x397915,_0x1f0f9a){const _0x249ad2=_0x4136c9;var _0x8e77c1;let _0x1cdb50=(_0x8e77c1=this['_resources'][_0x249ad2(0xfc)](_0x397915))==null?void 0x0:_0x8e77c1[_0x249ad2(0x1e2)][_0x1f0f9a];return _0x1cdb50?t[_0x249ad2(0x21e)][_0x249ad2(0x187)](_0x1cdb50):void 0x0;}[_0x4136c9(0x14a)](_0x348d75){const _0x2be6a5=_0x4136c9;var _0x2819de;return t[_0x2be6a5(0x21e)][_0x2be6a5(0x187)](((_0x2819de=this[_0x2be6a5(0x129)]['get'](_0x348d75))==null?void 0x0:_0x2819de[_0x2be6a5(0x1e2)])??{});}[_0x4136c9(0x109)](_0xbafebd){const _0x40683b=_0x4136c9;let _0x3d56a7=this[_0x40683b(0x129)][_0x40683b(0xfc)](_0xbafebd);return _0x3d56a7?t['Tools'][_0x40683b(0x187)](_0x3d56a7):void 0x0;}[_0x4136c9(0x194)](_0x583367,_0xddfc86,_0x1b3e0d){return this['setFormulas'](_0x583367,{[_0xddfc86]:_0x1b3e0d});}[_0x4136c9(0x12c)](_0x3e546d,_0x37f16f){const _0x2525c3=_0x4136c9;return this[_0x2525c3(0x15f)]['has'](_0x3e546d)||!l(_0x37f16f)?!0x1:(this[_0x2525c3(0x129)][_0x2525c3(0x1d0)](_0x3e546d,t[_0x2525c3(0x21e)][_0x2525c3(0x187)](_0x37f16f)),this[_0x2525c3(0x227)][_0x2525c3(0x1ad)]({'unitId':_0x3e546d}),!0x0);}['setFormulas'](_0x1b9e03,_0x4e115b){const _0xe065dc=_0x4136c9;if(this[_0xe065dc(0x15f)][_0xe065dc(0x156)](_0x1b9e03)||!Object[_0xe065dc(0x11f)](_0x4e115b)[_0xe065dc(0x13a)]||!l({'schemaVersion':0x1,'formulas':_0x4e115b}))return!0x1;let _0xb3346f=this[_0xe065dc(0x129)][_0xe065dc(0xfc)](_0x1b9e03)??c(),_0x1a2cf9=t['Tools'][_0xe065dc(0x187)](_0xb3346f);return Object[_0xe065dc(0x203)](_0x1a2cf9[_0xe065dc(0x1e2)],t['Tools']['deepClone'](_0x4e115b)),this[_0xe065dc(0x129)][_0xe065dc(0x1d0)](_0x1b9e03,_0x1a2cf9),this[_0xe065dc(0x227)][_0xe065dc(0x1ad)]({'unitId':_0x1b9e03,'rangeIds':Object[_0xe065dc(0x11f)](_0x4e115b)}),!0x0;}[_0x4136c9(0x1af)](_0x109a83,_0x5e4d92){const _0x31dc67=_0x4136c9;if(this[_0x31dc67(0x15f)][_0x31dc67(0x156)](_0x109a83))return!0x1;let _0x2f09fb=this[_0x31dc67(0x129)]['get'](_0x109a83);if(!(_0x2f09fb!=null&&_0x2f09fb[_0x31dc67(0x1e2)][_0x5e4d92]))return!0x1;let _0x3a223d=t[_0x31dc67(0x21e)][_0x31dc67(0x187)](_0x2f09fb);return delete _0x3a223d['formulas'][_0x5e4d92],this['_resources'][_0x31dc67(0x1d0)](_0x109a83,_0x3a223d),this[_0x31dc67(0x227)][_0x31dc67(0x1ad)]({'unitId':_0x109a83,'rangeIds':[_0x5e4d92]}),!0x0;}[_0x4136c9(0x138)](_0x2bfef3,_0x2671b0){const _0x235b38=_0x4136c9;return _0x2671b0&&typeof _0x2671b0==_0x235b38(0x217)&&_0x235b38(0x13f)in _0x2671b0&&_0x2671b0[_0x235b38(0x13f)]!==0x1?(this[_0x235b38(0xfb)](_0x2bfef3,_0x2671b0,_0x235b38(0x225)),!0x1):l(_0x2671b0)?(this['_resources']['set'](_0x2bfef3,t[_0x235b38(0x21e)][_0x235b38(0x187)](_0x2671b0)),this[_0x235b38(0x120)][_0x235b38(0x205)](_0x2bfef3),this['_loadErrors'][_0x235b38(0x205)](_0x2bfef3),this[_0x235b38(0x227)][_0x235b38(0x1ad)]({'unitId':_0x2bfef3}),!0x0):(this[_0x235b38(0xfb)](_0x2bfef3,_0x2671b0,_0x235b38(0x1cd)),!0x1);}[_0x4136c9(0x206)](_0x5762b7){const _0x4f66eb=_0x4136c9;let _0x41879b=this[_0x4f66eb(0x129)][_0x4f66eb(0xfc)](_0x5762b7);return _0x41879b?t[_0x4f66eb(0x21e)][_0x4f66eb(0x187)](_0x41879b):this[_0x4f66eb(0x120)]['has'](_0x5762b7)?t['Tools']['deepClone'](this['_rawResources'][_0x4f66eb(0xfc)](_0x5762b7)):c();}[_0x4136c9(0x13e)](_0x379775){const _0x128f18=_0x4136c9;return this[_0x128f18(0x15f)][_0x128f18(0xfc)](_0x379775);}[_0x4136c9(0x22c)](_0x16ed3a){const _0x53f0d5=_0x4136c9;this[_0x53f0d5(0x129)][_0x53f0d5(0x205)](_0x16ed3a),this[_0x53f0d5(0x120)]['delete'](_0x16ed3a),this[_0x53f0d5(0x15f)][_0x53f0d5(0x205)](_0x16ed3a),this[_0x53f0d5(0x227)]['next']({'unitId':_0x16ed3a});}['dispose'](){const _0x2d58cc=_0x4136c9;this[_0x2d58cc(0x129)]['clear'](),this[_0x2d58cc(0x120)]['clear'](),this[_0x2d58cc(0x15f)][_0x2d58cc(0x213)](),this[_0x2d58cc(0x227)][_0x2d58cc(0x1fa)](),super[_0x2d58cc(0x1fc)]();}[_0x4136c9(0xfb)](_0x1993c7,_0x174f0f,_0x1dadea){const _0x1e7233=_0x4136c9;this[_0x1e7233(0x129)]['delete'](_0x1993c7),this['_rawResources'][_0x1e7233(0x1d0)](_0x1993c7,t['Tools'][_0x1e7233(0x187)](_0x174f0f)),this[_0x1e7233(0x15f)][_0x1e7233(0x1d0)](_0x1993c7,_0x1dadea),this[_0x1e7233(0x227)][_0x1e7233(0x1ad)]({'unitId':_0x1993c7});}};let ve=function(_0x1ab16c){const _0x108bf1=_0x4136c9;return _0x1ab16c[_0x108bf1(0x112)]='empty',_0x1ab16c[_0x108bf1(0x136)]=_0x108bf1(0x1d3),_0x1ab16c[_0x108bf1(0x1f8)]=_0x108bf1(0x221),_0x1ab16c[_0x108bf1(0x183)]=_0x108bf1(0x1d6),_0x1ab16c;}({});function k(_0xfd9171,_0x590f97){return function(_0x3141b0,_0x3498e3){_0x590f97(_0x3141b0,_0x3498e3,_0xfd9171);};}function A(_0xb28121,_0x35677b,_0x17a412,_0x115b5e){const _0x540f56=_0x4136c9;var _0x245e88=arguments[_0x540f56(0x13a)],_0x329a14=_0x245e88<0x3?_0x35677b:_0x115b5e===null?_0x115b5e=Object['getOwnPropertyDescriptor'](_0x35677b,_0x17a412):_0x115b5e,_0xbd9777;if(typeof Reflect==_0x540f56(0x217)&&typeof Reflect['decorate']==_0x540f56(0x161))_0x329a14=Reflect[_0x540f56(0x1c3)](_0xb28121,_0x35677b,_0x17a412,_0x115b5e);else{for(var _0xed2bba=_0xb28121[_0x540f56(0x13a)]-0x1;_0xed2bba>=0x0;_0xed2bba--)(_0xbd9777=_0xb28121[_0xed2bba])&&(_0x329a14=(_0x245e88<0x3?_0xbd9777(_0x329a14):_0x245e88>0x3?_0xbd9777(_0x35677b,_0x17a412,_0x329a14):_0xbd9777(_0x35677b,_0x17a412))||_0x329a14);}return _0x245e88>0x3&&_0x329a14&&Object[_0x540f56(0x211)](_0x35677b,_0x17a412,_0x329a14),_0x329a14;}let j=class extends t[_0x4136c9(0x208)]{constructor(_0x455dd1,_0x1ca43e,_0x3722f2){const _0x4e1798=_0x4136c9;super(),this[_0x4e1798(0xf2)]=_0x455dd1,this[_0x4e1798(0x17b)]=_0x1ca43e,this[_0x4e1798(0x1fd)]=_0x3722f2,D(this,_0x4e1798(0x143),new Map()),D(this,'_formulaKeys',new Map()),D(this,_0x4e1798(0x175),new i['Subject']()),D(this,_0x4e1798(0x1da),this['_presentationChanged$']['asObservable']()),this[_0x4e1798(0x1bb)](this[_0x4e1798(0x17b)]['formulaResult$'][_0x4e1798(0x21a)](_0x4b5afc=>{const _0x1f87df=_0x4e1798;for(let _0xf6092b of Object[_0x1f87df(0x14d)](_0x4b5afc))for(let _0x38c703 of Object[_0x1f87df(0x14d)](_0xf6092b))_0x38c703['forEach'](_0x370874=>this['_updateFormulaResult'](_0x370874));}));}[_0x4136c9(0xf4)](_0x3cf136){const _0x9993a1=_0x4136c9;var _0x84b361;let _0x286558=_0x3cf136[_0x9993a1(0x14c)](),_0x306c2b=((_0x84b361=_0x3cf136[_0x9993a1(0x1eb)]()[_0x9993a1(0x1f5)])==null||(_0x84b361=_0x84b361[_0x9993a1(0x103)])==null?void 0x0:_0x84b361[_0x9993a1(0x1e1)](g))??[],_0x1de419=this[_0x9993a1(0xf2)]['getFormulas'](_0x286558),_0x1dee00=new Set();for(let _0x230d03 of _0x306c2b){let _0x54ed58=_0x1de419[_0x230d03['rangeId']];_0x54ed58&&(_0x1dee00[_0x9993a1(0x10b)](M(_0x286558,_0x230d03[_0x9993a1(0xf3)])),this['register']({'unitId':_0x286558,'rangeId':_0x230d03[_0x9993a1(0xf3)]},_0x54ed58));}for(let _0x4a2578 of Array[_0x9993a1(0x21b)](this[_0x9993a1(0x143)][_0x9993a1(0x14d)]()))_0x4a2578[_0x9993a1(0x15d)]===_0x286558&&!_0x1dee00[_0x9993a1(0x156)](M(_0x4a2578[_0x9993a1(0x15d)],_0x4a2578['rangeId']))&&this[_0x9993a1(0x1d1)](_0x4a2578);}['register'](_0x529387,_0x3765e9){const _0x5dbb02=_0x4136c9;let _0x2157b9=M(_0x529387[_0x5dbb02(0x15d)],_0x529387['rangeId']),_0x3b6fd9=this[_0x5dbb02(0x143)][_0x5dbb02(0xfc)](_0x2157b9),_0x5d25c0=this[_0x5dbb02(0x1fd)]['getRevision'](_0x529387['unitId']);if(_0x3b6fd9&&_0x3b6fd9[_0x5dbb02(0x1ab)][_0x5dbb02(0x220)]===_0x3765e9[_0x5dbb02(0x220)]&&_0x3b6fd9[_0x5dbb02(0x1ca)]===_0x5d25c0){_0x3b6fd9['config']=_0x3765e9;let _0x53bf6d=_0x3b6fd9[_0x5dbb02(0x126)]?this['_registrationService'][_0x5dbb02(0x196)](_0x3b6fd9['unitId'],_0x3b6fd9[_0x5dbb02(0x15d)],_0x3b6fd9[_0x5dbb02(0x126)])??void 0x0:void 0x0;_0x3b6fd9[_0x5dbb02(0xfe)]=_0x53bf6d,this['_setPresentation'](_0x2157b9,N(_0x3765e9,_0x53bf6d));return;}_0x3b6fd9!=null&&_0x3b6fd9['formulaId']&&this[_0x5dbb02(0x113)](_0x3b6fd9);let _0x4ebee0={..._0x529387,'config':_0x3765e9,'referenceRevision':_0x5d25c0,'presentation':N(_0x3765e9,void 0x0)};if(this[_0x5dbb02(0x143)][_0x5dbb02(0x1d0)](_0x2157b9,_0x4ebee0),!_0x3765e9[_0x5dbb02(0x220)][_0x5dbb02(0x1e0)]())return;let _0x554119=this[_0x5dbb02(0x17b)][_0x5dbb02(0x222)](_0x529387['unitId'],_0x529387[_0x5dbb02(0x15d)],_0x3765e9[_0x5dbb02(0x220)],void 0x0,{'rangeId':_0x529387[_0x5dbb02(0xf3)]},r['OtherFormulaBizType']['DOC'],_0x529387[_0x5dbb02(0xf3)]);_0x4ebee0[_0x5dbb02(0x126)]=_0x554119,this[_0x5dbb02(0x100)][_0x5dbb02(0x1d0)](_0x554119,_0x2157b9);}['unregister'](_0xd81a4f){const _0x2a8f21=_0x4136c9;let _0x1d82bd=M(_0xd81a4f[_0x2a8f21(0x15d)],_0xd81a4f[_0x2a8f21(0xf3)]),_0xb29512=this[_0x2a8f21(0x143)][_0x2a8f21(0xfc)](_0x1d82bd);_0xb29512&&(this['_deleteRegistration'](_0xb29512),this[_0x2a8f21(0x143)]['delete'](_0x1d82bd));}[_0x4136c9(0x219)](_0xfa4e82){const _0x3917db=_0x4136c9;for(let _0x53cf90 of Array[_0x3917db(0x21b)](this[_0x3917db(0x143)][_0x3917db(0x14d)]()))_0x53cf90[_0x3917db(0x15d)]===_0xfa4e82&&this[_0x3917db(0x1d1)](_0x53cf90);}[_0x4136c9(0x212)](_0x56f1a9){const _0x223f25=_0x4136c9;var _0x31d2f2;return(_0x31d2f2=this[_0x223f25(0x143)][_0x223f25(0xfc)](M(_0x56f1a9['unitId'],_0x56f1a9[_0x223f25(0xf3)])))==null?void 0x0:_0x31d2f2[_0x223f25(0x20e)];}[_0x4136c9(0x18b)](_0x1f3f73){const _0x16f5c0=_0x4136c9;let _0xfe70b9=this[_0x16f5c0(0x143)]['get'](M(_0x1f3f73[_0x16f5c0(0x15d)],_0x1f3f73[_0x16f5c0(0xf3)]));return _0xfe70b9?P(_0xfe70b9):void 0x0;}[_0x4136c9(0x210)](){const _0x22953e=_0x4136c9;return Array['from'](this[_0x22953e(0x143)][_0x22953e(0x14d)](),_0x2b8812=>({'identity':{'unitId':_0x2b8812[_0x22953e(0x15d)],'rangeId':_0x2b8812['rangeId']},'config':_0x2b8812['config'],'referenceRevision':_0x2b8812[_0x22953e(0x1ca)],..._0x2b8812[_0x22953e(0xfe)]?{'liveResult':_0x2b8812['liveResult']}:null}));}['dispose'](){const _0x4fb51c=_0x4136c9;for(let _0x37ef8d of this[_0x4fb51c(0x143)][_0x4fb51c(0x14d)]())this[_0x4fb51c(0x113)](_0x37ef8d);this[_0x4fb51c(0x143)]['clear'](),this[_0x4fb51c(0x100)][_0x4fb51c(0x213)](),this[_0x4fb51c(0x175)][_0x4fb51c(0x1fa)](),super[_0x4fb51c(0x1fc)]();}['_updateFormulaResult'](_0x3f31f0){const _0x10336e=_0x4136c9;let _0x5682ff=this[_0x10336e(0x100)][_0x10336e(0xfc)](_0x3f31f0['formulaId']),_0x1b4a8e=_0x5682ff?this[_0x10336e(0x143)][_0x10336e(0xfc)](_0x5682ff):void 0x0;_0x5682ff&&_0x1b4a8e&&(_0x1b4a8e['liveResult']=_0x3f31f0,this[_0x10336e(0x20c)](_0x5682ff,N(_0x1b4a8e[_0x10336e(0x1ab)],_0x3f31f0)));}[_0x4136c9(0x20c)](_0x5f447e,_0x5ba95a){const _0x57760f=_0x4136c9;var _0x1efbaf,_0x82c6cc;let _0x21d875=this[_0x57760f(0x143)][_0x57760f(0xfc)](_0x5f447e);if(!_0x21d875||ye(_0x21d875[_0x57760f(0x20e)],_0x5ba95a))return;let _0x4205b3=_0x21d875[_0x57760f(0x20e)],_0x56f037=P(_0x21d875);_0x21d875[_0x57760f(0x20e)]=_0x5ba95a,this[_0x57760f(0x175)][_0x57760f(0x1ad)]({'unitId':_0x21d875[_0x57760f(0x15d)],'rangeId':_0x21d875['rangeId'],'presentation':_0x5ba95a,'previousPresentation':_0x4205b3,'result':P(_0x21d875),'previousResult':{..._0x56f037,..._0x4205b3,'value':(_0x1efbaf=_0x4205b3['cell'])==null?void 0x0:_0x1efbaf['v'],'valueType':((_0x82c6cc=_0x4205b3['cell'])==null?void 0x0:_0x82c6cc['t'])??void 0x0}});}['_deleteRegistration'](_0x17cd7d){const _0x36f21e=_0x4136c9;_0x17cd7d['formulaId']&&(this[_0x36f21e(0x17b)]['deleteFormula'](_0x17cd7d[_0x36f21e(0x15d)],_0x17cd7d['unitId'],[_0x17cd7d['formulaId']]),this[_0x36f21e(0x100)][_0x36f21e(0x205)](_0x17cd7d[_0x36f21e(0x126)]));}};j=A([k(0x0,(0x0,t[_0x4136c9(0x172)])(O)),k(0x1,(0x0,t['Inject'])(r[_0x4136c9(0x197)])),k(0x2,(0x0,t[_0x4136c9(0x172)])(e[_0x4136c9(0x1e6)]))],j);function M(_0x42b4e5,_0x4dd9f1){return _0x42b4e5+'\x00'+_0x4dd9f1;}function N(_0x5a9378,_0x509cf0){const _0x1fcc46=_0x4136c9;return(0x0,e['resolveFormulaResultPresentation'])({'numberFormat':_0x5a9378['numberFormat'],'lastValue':_0x5a9378[_0x1fcc46(0x145)],'result':_0x509cf0});}function P(_0x19a063){const _0x5ce060=_0x4136c9;var _0x18e637,_0x451c99,_0x41091b;let _0x589fe1=_0x19a063[_0x5ce060(0x20e)],_0x1a6feb=_0x19a063[_0x5ce060(0x1ab)]['formula'][_0x5ce060(0x1e0)]()?_0x589fe1[_0x5ce060(0x193)]||_0x589fe1[_0x5ce060(0x21c)]==null?'pending':((_0x18e637=_0x19a063[_0x5ce060(0xfe)])==null?void 0x0:_0x18e637['status'])===r[_0x5ce060(0xf7)][_0x5ce060(0x183)]?_0x5ce060(0x1d6):_0x5ce060(0x221):_0x5ce060(0x1cf);return{..._0x589fe1,'status':_0x1a6feb,'value':(_0x451c99=_0x589fe1[_0x5ce060(0x21c)])==null?void 0x0:_0x451c99['v'],'valueType':((_0x41091b=_0x589fe1[_0x5ce060(0x21c)])==null?void 0x0:_0x41091b['t'])??void 0x0};}function ye(_0x522e9f,_0xab45f8){const _0x599d32=_0x4136c9;var _0x4e23a5,_0x350cc1,_0x358783,_0x5f1115;return _0x522e9f['text']===_0xab45f8[_0x599d32(0x137)]&&_0x522e9f['color']===_0xab45f8[_0x599d32(0x215)]&&_0x522e9f[_0x599d32(0x168)]===_0xab45f8['pattern']&&_0x522e9f[_0x599d32(0x105)]===_0xab45f8[_0x599d32(0x105)]&&_0x522e9f[_0x599d32(0x193)]===_0xab45f8[_0x599d32(0x193)]&&((_0x4e23a5=_0x522e9f['cell'])==null?void 0x0:_0x4e23a5['t'])===((_0x350cc1=_0xab45f8[_0x599d32(0x21c)])==null?void 0x0:_0x350cc1['t'])&&Object['is']((_0x358783=_0x522e9f[_0x599d32(0x21c)])==null?void 0x0:_0x358783['v'],(_0x5f1115=_0xab45f8[_0x599d32(0x21c)])==null?void 0x0:_0x5f1115['v']);}const F={'id':_0x4136c9(0x20d),'type':t[_0x4136c9(0x1dc)][_0x4136c9(0x132)],'handler':(_0x2c1f8a,_0x55197a)=>!(_0x55197a!=null&&_0x55197a[_0x4136c9(0x15d)])||!_0x55197a[_0x4136c9(0xf3)]||!_0x55197a['config']?!0x1:_0x2c1f8a['get'](O)[_0x4136c9(0x194)](_0x55197a[_0x4136c9(0x15d)],_0x55197a[_0x4136c9(0xf3)],_0x55197a['config'])},I={'id':_0x4136c9(0x228),'type':t[_0x4136c9(0x1dc)]['MUTATION'],'handler':(_0x29345f,_0x455f48)=>!(_0x455f48!=null&&_0x455f48[_0x4136c9(0x15d)])||!_0x455f48[_0x4136c9(0xf3)]?!0x1:_0x29345f[_0x4136c9(0xfc)](O)[_0x4136c9(0x1af)](_0x455f48['unitId'],_0x455f48[_0x4136c9(0xf3)])},L={'id':_0x4136c9(0x13b),'type':t[_0x4136c9(0x1dc)][_0x4136c9(0x132)],'handler':(_0x5f0216,_0x34ed4a)=>!(_0x34ed4a!=null&&_0x34ed4a[_0x4136c9(0x15d)])||!_0x34ed4a[_0x4136c9(0x148)]?!0x1:_0x5f0216[_0x4136c9(0xfc)](O)[_0x4136c9(0x12c)](_0x34ed4a['unitId'],_0x34ed4a[_0x4136c9(0x148)])},R={'id':_0x4136c9(0x19b),'type':t['CommandType']['MUTATION'],'handler':(_0x3a278c,_0x644878)=>{const _0x4c7d40=_0x4136c9;if(!(_0x644878!=null&&_0x644878[_0x4c7d40(0x15d)])||!_0x644878[_0x4c7d40(0x15a)][_0x4c7d40(0x13a)])return!0x1;let _0x5859c7=_0x3a278c[_0x4c7d40(0xfc)](O),_0x14a26a=_0x3a278c[_0x4c7d40(0xfc)](e[_0x4c7d40(0x1e6)]),_0x3a4a61=_0x5859c7['getResource'](_0x644878[_0x4c7d40(0x15d)]);if(!_0x3a4a61)return!0x1;let _0x307728=t[_0x4c7d40(0x21e)][_0x4c7d40(0x187)](_0x3a4a61),_0x4c0829=!0x1;for(let _0x1c958b of _0x644878[_0x4c7d40(0x15a)]){var _0xc9a8eb,_0x28b28e,_0x1654dd,_0x12cd1c;let _0x3a2f18=_0x307728[_0x4c7d40(0x1e2)][_0x1c958b[_0x4c7d40(0xf3)]];_0x3a2f18&&_0x3a2f18[_0x4c7d40(0x220)]===_0x1c958b[_0x4c7d40(0x134)]&&((_0xc9a8eb=_0x3a2f18[_0x4c7d40(0x20b)])==null?void 0x0:_0xc9a8eb[_0x4c7d40(0x168)])===_0x1c958b['expectedNumberFormat']&&_0x14a26a[_0x4c7d40(0x1c7)](_0x644878[_0x4c7d40(0x15d)])===_0x1c958b[_0x4c7d40(0x207)]&&(((_0x28b28e=_0x3a2f18[_0x4c7d40(0x145)])==null?void 0x0:_0x28b28e['v'])!==_0x1c958b[_0x4c7d40(0x145)]['v']||((_0x1654dd=_0x3a2f18[_0x4c7d40(0x145)])==null?void 0x0:_0x1654dd['t'])!==_0x1c958b['lastValue']['t']||((_0x12cd1c=_0x3a2f18[_0x4c7d40(0x145)])==null?void 0x0:_0x12cd1c[_0x4c7d40(0x168)])!==_0x1c958b[_0x4c7d40(0x145)][_0x4c7d40(0x168)])&&(_0x3a2f18[_0x4c7d40(0x145)]=t['Tools'][_0x4c7d40(0x187)](_0x1c958b[_0x4c7d40(0x145)]),_0x4c0829=!0x0);}return!_0x4c0829||_0x5859c7['setResource'](_0x644878['unitId'],_0x307728);}},z={'id':_0x4136c9(0x11d),'type':t[_0x4136c9(0x1dc)][_0x4136c9(0xff)],'handler':(_0x1525f8,_0x20155b)=>{const _0x599377=_0x4136c9;if(!(_0x20155b!=null&&_0x20155b[_0x599377(0x220)][_0x599377(0x1e0)]()))return!0x1;let _0x218d2f=K(_0x1525f8,_0x20155b['unitId'],'');if(!_0x218d2f)return!0x1;let _0x44e536=xe(_0x20155b['target'],_0x218d2f['body'],be(_0x1525f8,_0x218d2f[_0x599377(0x15d)]));if(!_0x44e536)return!0x1;let _0x1e3d18=Se(_0x1525f8,_0x218d2f['unitId'],_0x20155b['formula'],_0x20155b[_0x599377(0x1b9)]??[]);if(!_0x1e3d18)return!0x1;let _0x29979a=Ce(_0x218d2f[_0x599377(0x1f5)],_0x218d2f['model'],_0x218d2f['unitId']),_0x1f33c4=we({'documentData':_0x218d2f['documentData'],'resource':_0x218d2f[_0x599377(0x148)],'rangeId':_0x29979a,'config':{'formula':_0x20155b[_0x599377(0x220)],..._0x20155b['numberFormat']?{'numberFormat':_0x20155b[_0x599377(0x20b)]}:null},'startOffset':_0x44e536[_0x599377(0x16f)],'endOffset':_0x44e536['endOffset']});if(!_0x1f33c4)return!0x1;let _0x19f95c=(0x0,e[_0x599377(0x127)])(_0x1525f8,_0x218d2f[_0x599377(0x15d)],_0x1e3d18);return!_0x19f95c||!q({'accessor':_0x1525f8,'document':_0x218d2f[_0x599377(0x1fb)],'unitId':_0x218d2f[_0x599377(0x15d)],'trigger':z['id'],'rangeId':_0x29979a,'previousResource':_0x218d2f[_0x599377(0x148)],'nextResource':_0x1f33c4[_0x599377(0x22b)],'previousDocumentData':_0x218d2f[_0x599377(0x1bd)],'nextDocumentData':_0x1f33c4[_0x599377(0x149)],'cursorOffset':_0x1f33c4[_0x599377(0x1b7)],'externalMutations':_0x19f95c})?!0x1:{'rangeId':_0x29979a,'startOffset':_0x1f33c4[_0x599377(0x1b7)]-0x1,'endOffset':_0x1f33c4[_0x599377(0x1b7)]};}},B={'id':'docs-formula.command.update','type':t[_0x4136c9(0x1dc)][_0x4136c9(0xff)],'handler':(_0x171447,_0x51c6d8)=>{const _0x40d10d=_0x4136c9;if(!(_0x51c6d8!=null&&_0x51c6d8['rangeId'])||!_0x51c6d8[_0x40d10d(0x220)]['trim']())return!0x1;let _0x2d64a5=K(_0x171447,_0x51c6d8['unitId'],''),_0x3cc3bf=_0x2d64a5==null?void 0x0:_0x2d64a5['model'][_0x40d10d(0x1d5)](_0x2d64a5[_0x40d10d(0x15d)],_0x51c6d8[_0x40d10d(0xf3)]),_0x1140ec=_0x2d64a5?_(_0x2d64a5[_0x40d10d(0x1bd)]['body'],_0x51c6d8[_0x40d10d(0xf3)]):void 0x0;if(!_0x2d64a5||!_0x3cc3bf||!_0x1140ec)return!0x1;let _0x2f0908=Se(_0x171447,_0x2d64a5[_0x40d10d(0x15d)],_0x51c6d8[_0x40d10d(0x220)],_0x51c6d8[_0x40d10d(0x1b9)]??[]);if(!_0x2f0908)return!0x1;let _0x365b2c=(0x0,e[_0x40d10d(0x127)])(_0x171447,_0x2d64a5[_0x40d10d(0x15d)],_0x2f0908);if(!_0x365b2c)return!0x1;let _0x186c01=je(_0x2d64a5['resource']);return _0x186c01[_0x40d10d(0x1e2)][_0x51c6d8[_0x40d10d(0xf3)]]={'formula':_0x51c6d8[_0x40d10d(0x220)],..._0x51c6d8[_0x40d10d(0x20b)]?{'numberFormat':_0x51c6d8[_0x40d10d(0x20b)]}:_0x3cc3bf[_0x40d10d(0x20b)]?{'numberFormat':_0x3cc3bf[_0x40d10d(0x20b)]}:null},q({'accessor':_0x171447,'document':_0x2d64a5[_0x40d10d(0x1fb)],'unitId':_0x2d64a5[_0x40d10d(0x15d)],'trigger':B['id'],'rangeId':_0x51c6d8['rangeId'],'previousResource':_0x2d64a5[_0x40d10d(0x148)],'nextResource':_0x186c01,'cursorOffset':_0x1140ec[_0x40d10d(0x20f)]+0x1,'externalMutations':_0x365b2c});}},V={'id':_0x4136c9(0x169),'type':t[_0x4136c9(0x1dc)]['COMMAND'],'handler':(_0x5c12f,_0x5afc6f)=>{const _0x2a4f35=_0x4136c9;if(!(_0x5afc6f!=null&&_0x5afc6f[_0x2a4f35(0xf3)]))return!0x1;let _0x3ed5c6=K(_0x5c12f,_0x5afc6f[_0x2a4f35(0x15d)],''),_0x5b7929=_0x3ed5c6==null?void 0x0:_0x3ed5c6[_0x2a4f35(0xf8)][_0x2a4f35(0x1d5)](_0x3ed5c6[_0x2a4f35(0x15d)],_0x5afc6f[_0x2a4f35(0xf3)]),_0x44d3ed=_0x3ed5c6?_(_0x3ed5c6[_0x2a4f35(0x1bd)][_0x2a4f35(0x1f5)],_0x5afc6f[_0x2a4f35(0xf3)]):void 0x0;if(!_0x3ed5c6||!_0x5b7929||!_0x44d3ed)return!0x1;let _0x36a215=je(_0x3ed5c6[_0x2a4f35(0x148)]);return _0x36a215[_0x2a4f35(0x1e2)][_0x5afc6f[_0x2a4f35(0xf3)]]={..._0x5b7929,..._0x5afc6f[_0x2a4f35(0x20b)]?{'numberFormat':_0x5afc6f['numberFormat']}:null},_0x5afc6f[_0x2a4f35(0x20b)]||delete _0x36a215[_0x2a4f35(0x1e2)][_0x5afc6f[_0x2a4f35(0xf3)]][_0x2a4f35(0x20b)],q({'accessor':_0x5c12f,'document':_0x3ed5c6[_0x2a4f35(0x1fb)],'unitId':_0x3ed5c6[_0x2a4f35(0x15d)],'trigger':V['id'],'rangeId':_0x5afc6f[_0x2a4f35(0xf3)],'previousResource':_0x3ed5c6[_0x2a4f35(0x148)],'nextResource':_0x36a215,'cursorOffset':_0x44d3ed['endIndex']+0x1,'externalMutations':{}});}},H={'id':_0x4136c9(0x1f9),'type':t[_0x4136c9(0x1dc)][_0x4136c9(0xff)],'handler':(_0x518ca0,_0x2782f1)=>G(_0x518ca0,_0x2782f1,'',H['id'])},U={'id':_0x4136c9(0x20a),'type':t['CommandType'][_0x4136c9(0xff)],'handler':(_0x19e0c0,_0x144f6f)=>G(_0x19e0c0,_0x144f6f,(_0x144f6f==null?void 0x0:_0x144f6f[_0x4136c9(0x137)])??'',U['id'])},W={'id':_0x4136c9(0x13c),'type':t[_0x4136c9(0x1dc)][_0x4136c9(0xff)],'handler':(_0x32dcb8,_0x38e17d)=>{const _0x3f9184=_0x4136c9;if(!(_0x38e17d!=null&&_0x38e17d['rangeId']))return!0x1;let _0x16623e=K(_0x32dcb8,_0x38e17d[_0x3f9184(0x15d)],'');if(!_0x16623e)return!0x1;let _0x48c49c=_0x32dcb8['get'](j)[_0x3f9184(0x18b)]({'unitId':_0x16623e[_0x3f9184(0x15d)],'rangeId':_0x38e17d[_0x3f9184(0xf3)]});return _0x48c49c?G(_0x32dcb8,_0x38e17d,_0x48c49c[_0x3f9184(0x137)],W['id']):!0x1;}};function G(_0x1d3fd6,_0x33d2b0,_0x5d23c1,_0x576f5d){const _0x353db2=_0x4136c9;if(!(_0x33d2b0!=null&&_0x33d2b0[_0x353db2(0xf3)]))return!0x1;let _0x3d0c66=K(_0x1d3fd6,_0x33d2b0[_0x353db2(0x15d)],'');if(!_0x3d0c66)return!0x1;let _0x3c3a0d=h({'documentData':_0x3d0c66[_0x353db2(0x1bd)],'resource':_0x3d0c66['resource'],'rangeId':_0x33d2b0[_0x353db2(0xf3)],'text':_0x5d23c1});return _0x3c3a0d?q({'accessor':_0x1d3fd6,'document':_0x3d0c66[_0x353db2(0x1fb)],'unitId':_0x3d0c66[_0x353db2(0x15d)],'trigger':_0x576f5d,'rangeId':_0x33d2b0[_0x353db2(0xf3)],'previousResource':_0x3d0c66[_0x353db2(0x148)],'nextResource':_0x3c3a0d[_0x353db2(0x22b)],'previousDocumentData':_0x3d0c66[_0x353db2(0x1bd)],'nextDocumentData':_0x3c3a0d[_0x353db2(0x149)],'cursorOffset':_0x3c3a0d[_0x353db2(0x1b7)],'externalMutations':{}}):!0x1;}function K(_0x238528,_0x1eeb4d,_0x4c4141){const _0x54cde0=_0x4136c9;if(_0x4c4141)return null;let _0x22c8ee=_0x238528['get'](t['IUniverInstanceService']),_0x38f689=(_0x1eeb4d?_0x22c8ee[_0x54cde0(0x16b)](_0x1eeb4d,t['UniverInstanceType'][_0x54cde0(0x163)]):_0x22c8ee['getCurrentUnitOfType'](t[_0x54cde0(0x110)][_0x54cde0(0x163)]))??null;if(!_0x38f689)return null;let _0x2251ee=_0x38f689[_0x54cde0(0x1eb)](),_0x3d2d37=_0x2251ee[_0x54cde0(0x1f5)];if(_0x2251ee[_0x54cde0(0x1db)]||!_0x3d2d37)return null;let _0x1cd282=_0x238528[_0x54cde0(0xfc)](O);return _0x1cd282[_0x54cde0(0x13e)](_0x38f689[_0x54cde0(0x14c)]())?null:{'document':_0x38f689,'body':_0x3d2d37,'documentData':_0x2251ee,'model':_0x1cd282,'resource':_0x1cd282[_0x54cde0(0x109)](_0x38f689[_0x54cde0(0x14c)]())??c(),'unitId':_0x38f689[_0x54cde0(0x14c)]()};}function be(_0x1b3364,_0x1e9c6a){const _0x5c658c=_0x4136c9;var _0x57a419;return(_0x57a419=_0x1b3364[_0x5c658c(0xfc)](n[_0x5c658c(0x173)])[_0x5c658c(0xf9)]({'subUnitId':_0x1e9c6a,'unitId':_0x1e9c6a}))==null?void 0x0:_0x57a419[0x0];}function xe(_0x44f283,_0xfb75ce,_0x5a87e7){const _0x50084b=_0x4136c9;if((_0x44f283==null?void 0x0:_0x44f283['type'])===_0x50084b(0x1ee)){var _0x1df23a;let _0xa17099=((_0x1df23a=_0xfb75ce[_0x50084b(0x191)])==null?void 0x0:_0x1df23a[_0x50084b(0x1e1)](_0x349a75=>_0x349a75['paragraphId']===_0x44f283[_0x50084b(0x17f)]))??[];if(_0xa17099[_0x50084b(0x13a)]!==0x1)return null;let _0x1735a4=_0xa17099[0x0],_0x4fa515=(0x0,t[_0x50084b(0x1f0)])(_0xfb75ce,_0x1735a4),_0x578f23=_0x1735a4['startIndex']-_0x4fa515,_0x3e9e19=_0x44f283[_0x50084b(0x16a)]===_0x50084b(0x147)?_0x578f23:_0x44f283[_0x50084b(0x16a)];if(!Number['isInteger'](_0x3e9e19)||_0x3e9e19<0x0||_0x3e9e19>_0x578f23)return null;let _0x95e009=_0x4fa515+_0x3e9e19;return{'startOffset':_0x95e009,'endOffset':_0x95e009};}if((_0x44f283==null?void 0x0:_0x44f283['type'])===_0x50084b(0x125))return!Number[_0x50084b(0x167)](_0x44f283[_0x50084b(0x16f)])||!Number['isInteger'](_0x44f283[_0x50084b(0x22e)])?null:{'startOffset':Math[_0x50084b(0x1d4)](_0x44f283['startOffset'],_0x44f283[_0x50084b(0x22e)]),'endOffset':Math[_0x50084b(0x17c)](_0x44f283[_0x50084b(0x16f)],_0x44f283[_0x50084b(0x22e)])};let _0x497772=(_0x44f283==null?void 0x0:_0x44f283[_0x50084b(0x1ff)])===_0x50084b(0x1ba)?_0x44f283[_0x50084b(0x1ba)]:_0x5a87e7;return!_0x497772||_0x497772[_0x50084b(0x150)]?null:{'startOffset':Math[_0x50084b(0x1d4)](_0x497772[_0x50084b(0x16f)],_0x497772['endOffset']),'endOffset':Math[_0x50084b(0x17c)](_0x497772[_0x50084b(0x16f)],_0x497772[_0x50084b(0x22e)])};}function Se(_0x4f9074,_0x49b196,_0x3aeadb,_0x252683){const _0x4abcfc=_0x4136c9;let _0x45144a=_0x4f9074[_0x4abcfc(0xfc)](r[_0x4abcfc(0xfd)]),_0xa17bbe=_0x3aeadb[_0x4abcfc(0x1bf)]('=')?_0x3aeadb[_0x4abcfc(0x200)](0x1):_0x3aeadb,_0x1af408=_0x45144a['sequenceNodesBuilder'](_0xa17bbe);if(!_0x1af408)return null;let _0x3a2065=_0x4f9074[_0x4abcfc(0xfc)](e['HostExternalReferenceModel']),_0x3d4a61=(0x0,e[_0x4abcfc(0x19d)])({'qualifiers':(0x0,e['collectFormulaExternalReferenceQualifiers'])(_0x1af408),'explicitReferences':_0x252683??[],'resolveBinding':_0xf321ed=>_0x3a2065[_0x4abcfc(0x10c)](_0x49b196,_0xf321ed)});return _0x3d4a61[_0x4abcfc(0x1b4)]===_0x4abcfc(0x181)?_0x3d4a61[_0x4abcfc(0x19f)]:null;}function Ce(_0x9f8668,_0x489570,_0xaf196d){const _0x5bfb81=_0x4136c9;var _0xb90fef;let _0x57cf1f=(0x0,t[_0x5bfb81(0x1b5)])(0x6);for(;_0x9f8668!=null&&(_0xb90fef=_0x9f8668[_0x5bfb81(0x103)])!=null&&_0xb90fef['some'](_0x48dd82=>_0x48dd82[_0x5bfb81(0xf3)]===_0x57cf1f)||_0x489570[_0x5bfb81(0x1d5)](_0xaf196d,_0x57cf1f);)_0x57cf1f=(0x0,t['generateRandomId'])(0x6);return _0x57cf1f;}function we(_0x940fd4){try{return te(_0x940fd4);}catch(_0x35a542){if(_0x35a542 instanceof m)return null;throw _0x35a542;}}function Te(_0x32b8a8){const _0x4938c4=_0x4136c9;let _0x29e9fa=_0x32b8a8['previousDocumentData']&&_0x32b8a8[_0x4938c4(0x149)]?De(_0x32b8a8[_0x4938c4(0x1fb)],_0x32b8a8['unitId'],_0x32b8a8[_0x4938c4(0xf5)],_0x32b8a8[_0x4938c4(0x149)],_0x32b8a8[_0x4938c4(0x1b7)],_0x32b8a8[_0x4938c4(0x226)]):null;return _0x32b8a8[_0x4938c4(0xf5)]&&_0x32b8a8['nextDocumentData']&&!_0x29e9fa?null:{'documentRedo':_0x29e9fa,'resourceRedo':{'id':L['id'],'params':{'unitId':_0x32b8a8[_0x4938c4(0x15d)],'resource':_0x32b8a8[_0x4938c4(0x22b)]}},'resourceUndo':{'id':L['id'],'params':{'unitId':_0x32b8a8[_0x4938c4(0x15d)],'resource':_0x32b8a8[_0x4938c4(0x1c2)]}}};}function Ee(_0x2e2d18,_0x54164e,_0xfa144e,_0x19f9b7){const _0x20747=_0x4136c9;_0x19f9b7['pushUndoRedo']({'id':_0x2e2d18[_0x20747(0x226)]+':'+_0x2e2d18['rangeId'],'unitID':_0x2e2d18[_0x20747(0x15d)],'redoMutations':[..._0x2e2d18['externalMutations'][_0x20747(0x218)]?[_0x2e2d18['externalMutations']['redoMutation']]:[],..._0x54164e[_0x20747(0x151)]?[_0x54164e[_0x20747(0x151)]]:[],_0x54164e[_0x20747(0x16e)]],'undoMutations':[_0x54164e[_0x20747(0x1a2)],..._0xfa144e?[_0xfa144e]:[],..._0x2e2d18[_0x20747(0x114)][_0x20747(0x1f6)]?[_0x2e2d18[_0x20747(0x114)]['undoMutation']]:[]]});}function q(_0xce4ebf){const _0x4308ef=_0x4136c9;let _0xff7027=_0xce4ebf[_0x4308ef(0x1c6)]['get'](t[_0x4308ef(0x192)]),_0x7d8434=_0xce4ebf[_0x4308ef(0x1c6)][_0x4308ef(0xfc)](t[_0x4308ef(0x101)]),_0x22041e=_0xce4ebf[_0x4308ef(0x1c6)]['get'](n['DocSelectionManagerService']),_0x2262b0=Te(_0xce4ebf);if(!_0x2262b0)return!0x1;let _0x66684=!0x1,_0x46e40a=null,_0x5360a9=!0x1;try{if(_0xce4ebf['externalMutations'][_0x4308ef(0x218)]){if(!_0xff7027[_0x4308ef(0x1aa)](_0xce4ebf[_0x4308ef(0x114)][_0x4308ef(0x218)]['id'],_0xce4ebf['externalMutations'][_0x4308ef(0x218)][_0x4308ef(0x1be)]))return!0x1;_0x66684=!0x0;}if(_0x2262b0['documentRedo']){let _0x257469=_0xff7027[_0x4308ef(0x1aa)](_0x2262b0['documentRedo']['id'],_0x2262b0['documentRedo'][_0x4308ef(0x1be)]);if(!_0x257469)return J(_0xff7027,_0xce4ebf[_0x4308ef(0x114)],_0x66684),!0x1;_0x46e40a={'id':n['RichTextEditingMutation']['id'],'params':{..._0x257469,'noHistory':!0x0,'noNeedSetTextRange':!0x0,'segmentId':''}};}if(!_0xff7027[_0x4308ef(0x1aa)](_0x2262b0[_0x4308ef(0x16e)]['id'],_0x2262b0[_0x4308ef(0x16e)][_0x4308ef(0x1be)]))return Oe(_0xff7027,_0x46e40a),J(_0xff7027,_0xce4ebf[_0x4308ef(0x114)],_0x66684),!0x1;_0x5360a9=!0x0,Ee(_0xce4ebf,_0x2262b0,_0x46e40a,_0x7d8434);}catch(_0x210e00){throw _0x5360a9&&_0xff7027[_0x4308ef(0x1aa)](_0x2262b0[_0x4308ef(0x1a2)]['id'],_0x2262b0[_0x4308ef(0x1a2)][_0x4308ef(0x1be)]),Oe(_0xff7027,_0x46e40a),J(_0xff7027,_0xce4ebf[_0x4308ef(0x114)],_0x66684),_0x210e00;}return _0x22041e[_0x4308ef(0x1c4)]([{'startOffset':_0xce4ebf['cursorOffset'],'endOffset':_0xce4ebf['cursorOffset'],'segmentId':''}],{'unitId':_0xce4ebf[_0x4308ef(0x15d)],'subUnitId':_0xce4ebf[_0x4308ef(0x15d)]},!0x1,{[n[_0x4308ef(0x1de)]]:!0x0}),!0x0;}function De(_0x321e03,_0x32b96d,_0x5cd652,_0x348d18,_0x140365,_0x1fd783){const _0x5c8f30=_0x4136c9;let _0x4ef001=ke(_0x5cd652,_0x348d18,(0x0,t[_0x5c8f30(0x11b)])(_0x321e03,''));return _0x4ef001?{'id':n[_0x5c8f30(0x1ec)]['id'],'params':{'unitId':_0x32b96d,'actions':_0x4ef001,'segmentId':'','textRanges':[{'startOffset':_0x140365,'endOffset':_0x140365,'collapsed':!0x0,'segmentId':''}],'isEditing':!0x1,'noHistory':!0x0,'noNeedSetTextRange':!0x0,'trigger':_0x1fd783}}:null;}function Oe(_0x3e6a9d,_0x107345){const _0x3865ff=_0x4136c9;_0x107345&&_0x3e6a9d[_0x3865ff(0x1aa)](_0x107345['id'],_0x107345[_0x3865ff(0x1be)]);}function J(_0x584c4a,_0x56bb66,_0x4e3c6f){const _0x3cbca1=_0x4136c9;_0x4e3c6f&&_0x56bb66[_0x3cbca1(0x1f6)]&&_0x584c4a[_0x3cbca1(0x1aa)](_0x56bb66[_0x3cbca1(0x1f6)]['id'],_0x56bb66[_0x3cbca1(0x1f6)]['params']);}function ke(_0xb2dea5,_0x284eba,_0x1f8932){const _0x2f21b9=_0x4136c9;let _0x46e83f=_0xb2dea5['body'],_0x51df84=_0x284eba[_0x2f21b9(0x1f5)],_0x58a87f=Ae(_0x46e83f==null?void 0x0:_0x46e83f[_0x2f21b9(0xf0)],_0x51df84==null?void 0x0:_0x51df84[_0x2f21b9(0xf0)]);if(!_0x58a87f||!_0x51df84)return null;let _0x5adb7c=new t['TextX']();return _0x5adb7c[_0x2f21b9(0x1a4)](_0x58a87f[_0x2f21b9(0x186)]),_0x58a87f[_0x2f21b9(0x22f)]>0x0&&_0x5adb7c[_0x2f21b9(0x179)](_0x58a87f[_0x2f21b9(0x22f)],(0x0,t['getBodySliceForTextXAction'])(_0x51df84,_0x58a87f[_0x2f21b9(0x186)],_0x58a87f[_0x2f21b9(0x186)]+_0x58a87f['insertLength'],!0x1)),_0x58a87f[_0x2f21b9(0x1c9)]>0x0&&_0x5adb7c['delete'](_0x58a87f[_0x2f21b9(0x1c9)]),t[_0x2f21b9(0x153)]['getInstance']()['editOp'](_0x5adb7c[_0x2f21b9(0x206)](),_0x1f8932);}function Ae(_0x2780b6,_0x312fd3){const _0x2675a3=_0x4136c9;if(_0x2780b6==null||_0x312fd3==null||_0x2780b6===_0x312fd3)return null;let _0x40eb16=0x0;for(;_0x40eb16<_0x2780b6[_0x2675a3(0x13a)]&&_0x40eb16<_0x312fd3[_0x2675a3(0x13a)]&&_0x2780b6[_0x40eb16]===_0x312fd3[_0x40eb16];)_0x40eb16+=0x1;let _0x1a2f15=_0x2780b6[_0x2675a3(0x13a)],_0x513fd8=_0x312fd3[_0x2675a3(0x13a)];for(;_0x1a2f15>_0x40eb16&&_0x513fd8>_0x40eb16&&_0x2780b6[_0x1a2f15-0x1]===_0x312fd3[_0x513fd8-0x1];)--_0x1a2f15,--_0x513fd8;return{'start':_0x40eb16,'deleteLength':_0x1a2f15-_0x40eb16,'insertLength':_0x513fd8-_0x40eb16};}function je(_0x161713){const _0x26904f=_0x4136c9;return{'schemaVersion':0x1,'formulas':Object[_0x26904f(0x209)](Object[_0x26904f(0x176)](_0x161713[_0x26904f(0x1e2)])[_0x26904f(0x166)](([_0x2686a6,_0x414fff])=>[_0x2686a6,{..._0x414fff,..._0x414fff[_0x26904f(0x20b)]?{'numberFormat':{..._0x414fff[_0x26904f(0x20b)]}}:null,..._0x414fff['lastValue']?{'lastValue':{..._0x414fff[_0x26904f(0x145)]}}:null}]))};}let Y=class extends t['Disposable']{constructor(_0x3df394,_0x16d376,_0x537328,_0x34aee8){const _0x1c2cf5=_0x4136c9;super(),this[_0x1c2cf5(0x19a)]=_0x3df394,this[_0x1c2cf5(0x1e5)]=_0x16d376,this[_0x1c2cf5(0xf2)]=_0x537328,this[_0x1c2cf5(0x202)]=_0x34aee8,D(this,_0x1c2cf5(0x1a5),new Set()),D(this,'_syncScheduled',!0x1),D(this,_0x1c2cf5(0x133),!0x1),this[_0x1c2cf5(0x19a)]['getAllUnitsForType'](t[_0x1c2cf5(0x110)][_0x1c2cf5(0x163)])[_0x1c2cf5(0x1a1)](_0x44d67a=>this[_0x1c2cf5(0x202)][_0x1c2cf5(0xf4)](_0x44d67a)),this[_0x1c2cf5(0x1bb)](this[_0x1c2cf5(0xf2)][_0x1c2cf5(0x12a)][_0x1c2cf5(0x21a)](({unitId:_0x50b220})=>this[_0x1c2cf5(0x14e)](_0x50b220))),this['disposeWithMe'](this[_0x1c2cf5(0x19a)]['unitAdded$'][_0x1c2cf5(0x21a)](({unit:_0x43a644})=>{const _0x559b2b=_0x1c2cf5;_0x43a644['type']===t[_0x559b2b(0x110)][_0x559b2b(0x163)]&&this[_0x559b2b(0x1a0)](_0x43a644['getUnitId']());})),this[_0x1c2cf5(0x1bb)](this[_0x1c2cf5(0x19a)][_0x1c2cf5(0x17e)]['subscribe'](_0x58c6aa=>{const _0x1c77e7=_0x1c2cf5;this[_0x1c77e7(0x202)][_0x1c77e7(0x219)](_0x58c6aa[_0x1c77e7(0x14c)]());})),this[_0x1c2cf5(0x1bb)](this[_0x1c2cf5(0x1e5)][_0x1c2cf5(0x1ce)](_0x14a8c1=>{const _0x2ce598=_0x1c2cf5;if(_0x14a8c1['id']===n['RichTextEditingMutation']['id']&&Me(_0x14a8c1[_0x2ce598(0x1be)])){let _0x241738=_0x14a8c1[_0x2ce598(0x1be)];_0x241738[_0x2ce598(0x150)]||this[_0x2ce598(0x14e)](_0x241738['unitId']);}}));}[_0x4136c9(0x1fc)](){const _0x5c2a17=_0x4136c9;this['_isDisposed']=!0x0,super[_0x5c2a17(0x1fc)]();}[_0x4136c9(0x1a0)](_0x2d1038){const _0x238633=_0x4136c9;this[_0x238633(0x1a5)][_0x238633(0x10b)](_0x2d1038),!this[_0x238633(0x198)]&&(this[_0x238633(0x198)]=!0x0,queueMicrotask(()=>{const _0x461301=_0x238633;if(this[_0x461301(0x198)]=!0x1,this['_isDisposed'])return;let _0x5770b2=Array[_0x461301(0x21b)](this[_0x461301(0x1a5)]);this['_pendingUnitIds'][_0x461301(0x213)](),_0x5770b2[_0x461301(0x1a1)](_0x2aef85=>this['_syncUnit'](_0x2aef85));}));}[_0x4136c9(0x14e)](_0x1f16e5){const _0x4e9d3f=_0x4136c9;let _0x4f6b43=this[_0x4e9d3f(0x19a)][_0x4e9d3f(0x16b)](_0x1f16e5,t['UniverInstanceType'][_0x4e9d3f(0x163)]);_0x4f6b43&&this[_0x4e9d3f(0x202)][_0x4e9d3f(0xf4)](_0x4f6b43);}};Y=A([k(0x0,t['IUniverInstanceService']),k(0x1,t[_0x4136c9(0x192)]),k(0x2,(0x0,t[_0x4136c9(0x172)])(O)),k(0x3,(0x0,t[_0x4136c9(0x172)])(j))],Y);function Me(_0x32d9cb){const _0x1355ed=_0x4136c9;return typeof _0x32d9cb==_0x1355ed(0x217)&&!!_0x32d9cb&&_0x1355ed(0x15d)in _0x32d9cb&&typeof _0x32d9cb[_0x1355ed(0x15d)]==_0x1355ed(0x122)&&(!(_0x1355ed(0x150)in _0x32d9cb)||_0x32d9cb[_0x1355ed(0x150)]===void 0x0||typeof _0x32d9cb[_0x1355ed(0x150)]==_0x1355ed(0x122));}let X=class extends t[_0x4136c9(0x208)]{constructor(_0x192be5,_0x33c170){const _0xf190e4=_0x4136c9;super(),this[_0xf190e4(0x189)]=_0x192be5,this['_docFormulaModel']=_0x33c170,this[_0xf190e4(0x1bb)](this[_0xf190e4(0x189)][_0xf190e4(0x1a6)]({'pluginName':o,'businesses':[t[_0xf190e4(0x110)][_0xf190e4(0x163)]],'toJson':_0x57c662=>JSON['stringify'](this[_0xf190e4(0x1cc)][_0xf190e4(0x206)](_0x57c662)),'parseJson':_0x36a906=>JSON[_0xf190e4(0x21d)](_0x36a906),'onLoad':(_0x45d560,_0x26328b)=>{const _0xb9c2a0=_0xf190e4;this[_0xb9c2a0(0x1cc)]['load'](_0x45d560,_0x26328b);},'onUnLoad':_0x34ffde=>this[_0xf190e4(0x1cc)]['removeUnit'](_0x34ffde)}));}};X=A([k(0x0,t['IResourceManagerService']),k(0x1,(0x0,t[_0x4136c9(0x172)])(O))],X);var Ne='@univerjs-pro/docs-formula',Pe=_0x4136c9(0x14f);const Fe={};let Z=class extends t[_0x4136c9(0x208)]{constructor(_0x103a66,_0x21ab71,_0x49291f){const _0x29b623=_0x4136c9;super(),this[_0x29b623(0x1e9)]=_0x103a66,this['_formulaService']=_0x21ab71,this[_0x29b623(0x1bb)](_0x49291f[_0x29b623(0x1b1)]({'resolve':(_0x3f7cd8,_0x21e500)=>{const _0x434c9f=_0x29b623;var _0x112eb6;return((_0x112eb6=_0x21e500[_0x434c9f(0x103)])==null?void 0x0:_0x112eb6['filter'](g)[_0x434c9f(0x166)](_0x5d904c=>({'startOffset':_0x5d904c[_0x434c9f(0x1fe)],'endOffset':_0x5d904c['endIndex']+0x1,'text':this['resolveFormula'](_0x3f7cd8,_0x5d904c[_0x434c9f(0xf3)])})))??[];}})),this[_0x29b623(0x1bb)](this[_0x29b623(0x1b3)][_0x29b623(0x1da)][_0x29b623(0x21a)](({unitId:_0x2b8fd7})=>{const _0x2927df=_0x29b623;_0x49291f[_0x2927df(0x165)](_0x2b8fd7);}));}[_0x4136c9(0x1ea)](_0x3b2fb5,_0xeab22f){const _0x1f8efd=_0x4136c9;var _0x71aefd;return((_0x71aefd=this[_0x1f8efd(0x1b3)][_0x1f8efd(0x18b)]({'unitId':_0x3b2fb5,'rangeId':_0xeab22f}))==null?void 0x0:_0x71aefd[_0x1f8efd(0x137)])??'';}[_0x4136c9(0x16d)](_0x19cd77,_0x2ca7d2,_0xfa185b){const _0x29e26b=_0x4136c9;var _0x19d577;let _0x6f54b3=this['_univerInstanceService'][_0x29e26b(0x16b)](_0x19cd77,t[_0x29e26b(0x110)][_0x29e26b(0x163)]),_0x124251=_0x6f54b3==null?void 0x0:_0x6f54b3[_0x29e26b(0x11a)]();if(!_0x124251)return'';let _0x16d5f4=_0x124251['dataStream'][_0x29e26b(0x200)](_0x2ca7d2,_0xfa185b),_0x3143bb=((_0x19d577=_0x124251[_0x29e26b(0x103)])==null?void 0x0:_0x19d577[_0x29e26b(0x1e1)](_0x44bf06=>g(_0x44bf06)&&_0x44bf06[_0x29e26b(0x1fe)]>=_0x2ca7d2&&_0x44bf06[_0x29e26b(0x20f)]<_0xfa185b)[_0x29e26b(0x1e4)]((_0x4f9b94,_0x3a9025)=>_0x3a9025[_0x29e26b(0x1fe)]-_0x4f9b94[_0x29e26b(0x1fe)]))??[];for(let _0x53113a of _0x3143bb){let _0x47a57b=_0x53113a[_0x29e26b(0x1fe)]-_0x2ca7d2,_0x107300=_0x53113a['endIndex']-_0x2ca7d2+0x1;_0x16d5f4=''+_0x16d5f4[_0x29e26b(0x200)](0x0,_0x47a57b)+this[_0x29e26b(0x1ea)](_0x19cd77,_0x53113a[_0x29e26b(0xf3)])+_0x16d5f4[_0x29e26b(0x200)](_0x107300);}return _0x16d5f4;}[_0x4136c9(0xfa)](_0x382dba){return Ie(_0x382dba);}[_0x4136c9(0x107)](_0x1077fa,_0x3f8a67,_0x523294={}){const _0x2f9798=_0x4136c9;var _0x1eb81b;return re({'id':_0x1077fa,'body':_0x3f8a67,'documentStyle':{}},(((_0x1eb81b=_0x3f8a67['customRanges'])==null?void 0x0:_0x1eb81b[_0x2f9798(0x1e1)](g))??[])['map'](_0x1adec7=>({'rangeId':_0x1adec7['rangeId'],'text':_0x523294[_0x1adec7[_0x2f9798(0xf3)]]??this[_0x2f9798(0x1ea)](_0x1077fa,_0x1adec7[_0x2f9798(0xf3)])})))[_0x2f9798(0x1f5)]??{'dataStream':''};}};Z=A([k(0x0,t[_0x4136c9(0x144)]),k(0x1,(0x0,t[_0x4136c9(0x172)])(j)),k(0x2,(0x0,t['Inject'])(n[_0x4136c9(0x216)]))],Z);function Ie(_0x7c15ae){const _0x6ad3e2=_0x4136c9;var _0x3ccb43,_0x55ef02;let _0x5df77d=Le(_0x7c15ae),_0xefeb35=re(_0x7c15ae,(((_0x3ccb43=_0x7c15ae[_0x6ad3e2(0x1f5)])==null||(_0x3ccb43=_0x3ccb43['customRanges'])==null?void 0x0:_0x3ccb43['filter'](g))??[])[_0x6ad3e2(0x166)](_0x16326c=>({'rangeId':_0x16326c['rangeId'],'text':Re(_0x5df77d==null?void 0x0:_0x5df77d[_0x6ad3e2(0x1e2)][_0x16326c[_0x6ad3e2(0xf3)]])})));return _0xefeb35[_0x6ad3e2(0x1d2)]=(_0x55ef02=_0xefeb35['resources'])==null?void 0x0:_0x55ef02[_0x6ad3e2(0x1e1)](_0x39bfda=>_0x39bfda['name']!==o),_0xefeb35;}function Le(_0x28b1d1){const _0x3e9459=_0x4136c9;var _0x3fe929;let _0xd5029f=(_0x3fe929=_0x28b1d1[_0x3e9459(0x1d2)])==null||(_0x3fe929=_0x3fe929[_0x3e9459(0x124)](_0x44ab29=>_0x44ab29[_0x3e9459(0x1c8)]===_0x3e9459(0x116)))==null?void 0x0:_0x3fe929[_0x3e9459(0x1dd)];if(_0xd5029f)try{let _0x4af4a7=JSON[_0x3e9459(0x21d)](_0xd5029f);return l(_0x4af4a7)?_0x4af4a7:void 0x0;}catch{return;}}function Re(_0x2494fb){const _0xa07cb3=_0x4136c9;return _0x2494fb?(0x0,e[_0xa07cb3(0x10e)])({'lastValue':_0x2494fb[_0xa07cb3(0x145)],'numberFormat':_0x2494fb[_0xa07cb3(0x20b)]})[_0xa07cb3(0x137)]:'';}let Q=class extends t['Disposable']{constructor(_0x4cb7d4,_0x5a799f,_0x4355de){const _0x120a06=_0x4136c9;super(),this[_0x120a06(0x1b3)]=_0x4cb7d4,this[_0x120a06(0x11c)]=_0x5a799f,this[_0x120a06(0x1bb)](_0x4355de[_0x120a06(0x1c5)](this));}['collectMutations'](_0x40ce32){const _0x564847=_0x4136c9;let _0x272cbc=new Map();for(let _0x29296f of this['_formulaService'][_0x564847(0x210)]()){var _0x2215b0;if(!this[_0x564847(0x11c)][_0x564847(0x19c)](_0x29296f['config'][_0x564847(0x220)],_0x29296f[_0x564847(0xfe)])[_0x564847(0x1d8)])continue;let _0xf492ec=(0x0,e[_0x564847(0x21f)])(_0x29296f[_0x564847(0xfe)]),_0x32e529=_0xf492ec?(0x0,e[_0x564847(0x177)])(_0xf492ec):null;if(!_0x32e529||ze(_0x29296f[_0x564847(0x1ab)][_0x564847(0x145)],_0x32e529))continue;let _0x5866d6=_0x272cbc[_0x564847(0xfc)](_0x29296f[_0x564847(0x1e3)][_0x564847(0x15d)])??[];_0x5866d6[_0x564847(0x18c)]({'rangeId':_0x29296f[_0x564847(0x1e3)][_0x564847(0xf3)],'expectedFormula':_0x29296f[_0x564847(0x1ab)][_0x564847(0x220)],'expectedNumberFormat':(_0x2215b0=_0x29296f[_0x564847(0x1ab)][_0x564847(0x20b)])==null?void 0x0:_0x2215b0['pattern'],'expectedReferenceRevision':_0x29296f['referenceRevision'],'lastValue':_0x32e529}),_0x272cbc[_0x564847(0x1d0)](_0x29296f[_0x564847(0x1e3)][_0x564847(0x15d)],_0x5866d6);}return Array[_0x564847(0x21b)](_0x272cbc,([_0x26fd66,_0x47d124])=>({'id':R['id'],'params':{'unitId':_0x26fd66,'updates':_0x47d124}}));}};Q=A([k(0x0,(0x0,t[_0x4136c9(0x172)])(j)),k(0x1,(0x0,t[_0x4136c9(0x172)])(e[_0x4136c9(0x1a3)])),k(0x2,(0x0,t[_0x4136c9(0x172)])(e['FormulaLastValuePersistenceService']))],Q);function ze(_0x480a9e,_0x85b674){const _0x46ee50=_0x4136c9;return(_0x480a9e==null?void 0x0:_0x480a9e['v'])===_0x85b674['v']&&(_0x480a9e==null?void 0x0:_0x480a9e['t'])===_0x85b674['t']&&(_0x480a9e==null?void 0x0:_0x480a9e[_0x46ee50(0x168)])===_0x85b674[_0x46ee50(0x168)];}let $=class extends t[_0x4136c9(0x185)]{constructor(_0x35655f=Fe,_0x59b549,_0x41fc24,_0x40e3c8){const _0x26f9ae=_0x4136c9;super(),this['_config']=_0x35655f,this[_0x26f9ae(0x131)]=_0x59b549,this['_commandService']=_0x41fc24,this[_0x26f9ae(0x159)]=_0x40e3c8;let {..._0x1e8557}=(0x0,t[_0x26f9ae(0x160)])({},Fe,this['_config']);this[_0x26f9ae(0x159)]['setConfig'](_0x26f9ae(0x1f2),_0x1e8557);}['onStarting'](){const _0x4fccd0=_0x4136c9;this[_0x4fccd0(0x131)]['add']([O]),this[_0x4fccd0(0x131)]['add']([j]),this[_0x4fccd0(0x131)][_0x4fccd0(0x10b)]([X]),this[_0x4fccd0(0x131)][_0x4fccd0(0x10b)]([Y]),this[_0x4fccd0(0x131)][_0x4fccd0(0x10b)]([Q]),this['_injector'][_0x4fccd0(0x10b)]([Z]),(0x0,t[_0x4fccd0(0x1f1)])(this[_0x4fccd0(0x131)],[[O],[X],[Y],[Q],[Z]]),[F,I,L,R,z,B,V,H,U,W]['forEach'](_0x18aecb=>this['disposeWithMe'](this[_0x4fccd0(0x1e5)]['registerCommand'](_0x18aecb)));}};D($,_0x4136c9(0x1f3),o),D($,_0x4136c9(0x1ac),Ne),D($,_0x4136c9(0x141),Pe),D($,'type',t[_0x4136c9(0x110)][_0x4136c9(0x163)]),$=A([(0x0,t[_0x4136c9(0x223)])(a[_0x4136c9(0x224)],e[_0x4136c9(0x1df)],n[_0x4136c9(0x108)]),k(0x1,(0x0,t[_0x4136c9(0x172)])(t['Injector'])),k(0x2,t[_0x4136c9(0x192)]),k(0x3,t['IConfigService'])],$),exports[_0x4136c9(0x1ed)]=W,exports[_0x4136c9(0x1ae)]=s,exports['DOC_FORMULA_OBJECT_REPLACEMENT']='',exports[_0x4136c9(0x116)]=o,exports['DOC_FORMULA_SCHEMA_VERSION']=0x1,Object['defineProperty'](exports,_0x4136c9(0x14b),{'enumerable':!0x0,'get':function(){return Z;}}),Object[_0x4136c9(0x211)](exports,_0x4136c9(0x174),{'enumerable':!0x0,'get':function(){return Y;}}),exports['DocFormulaModel']=O,Object[_0x4136c9(0x211)](exports,'DocFormulaResourceController',{'enumerable':!0x0,'get':function(){return X;}}),exports[_0x4136c9(0x190)]=ve,Object[_0x4136c9(0x211)](exports,_0x4136c9(0x115),{'enumerable':!0x0,'get':function(){return j;}}),exports[_0x4136c9(0x18f)]=z,exports[_0x4136c9(0x128)]=m,exports[_0x4136c9(0x10d)]=H,exports['RemoveDocFormulaMutation']=I,exports[_0x4136c9(0x1f7)]=U,exports[_0x4136c9(0x154)]=R,exports[_0x4136c9(0x22a)]=F,exports[_0x4136c9(0x1f4)]=V,exports[_0x4136c9(0x1e8)]=L,Object[_0x4136c9(0x211)](exports,_0x4136c9(0x17d),{'enumerable':!0x0,'get':function(){return $;}}),exports[_0x4136c9(0x155)]=B,exports[_0x4136c9(0xf1)]=ie,exports[_0x4136c9(0x152)]=te,exports['buildRemoveDocFormulaActions']=h,exports[_0x4136c9(0x201)]=ne,exports[_0x4136c9(0x1cb)]=c,exports[_0x4136c9(0x229)]=Ie,exports[_0x4136c9(0x18e)]=_,exports['isDocFormulaConfig']=u,exports['isDocFormulaRange']=g,exports[_0x4136c9(0x16c)]=l,exports[_0x4136c9(0x11e)]=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 _0x2b355b=_0x3a44;(function(_0x3b99bc,_0x4a9c94){var _0x205c82=_0x3a44,_0x4bf381=_0x3b99bc();while(!![]){try{var _0x3785b0=-parseInt(_0x205c82(0x1d2))/0x1*(-parseInt(_0x205c82(0x190))/0x2)+-parseInt(_0x205c82(0x19f))/0x3+parseInt(_0x205c82(0x1ac))/0x4+-parseInt(_0x205c82(0x18a))/0x5+parseInt(_0x205c82(0x1b3))/0x6+parseInt(_0x205c82(0x192))/0x7+-parseInt(_0x205c82(0x193))/0x8;if(_0x3785b0===_0x4a9c94)break;else _0x4bf381['push'](_0x4bf381['shift']());}catch(_0x4d233e){_0x4bf381['push'](_0x4bf381['shift']());}}}(_0x3b5e,0x58081));import{ConvertDocFormulaToTextCommand as _0x2d4520,DocFormulaDisplayTextService as _0xb17991,DocFormulaModel as _0x32fc45,DocFormulaService as _0x5bf394,InsertDocFormulaCommand as _0x3e5dad,RemoveDocFormulaCommand as _0x3eeb8c,ReplaceDocFormulaWithTextCommand as _0x497f52,SetDocFormulaNumberFormatCommand as _0x5dba3c,UpdateDocFormulaCommand as _0x9bf949,isDocFormulaRange as _0x3a1bb9}from'@univerjs-pro/docs-formula';import{ICommandService as _0x128e28,IResourceLoaderService as _0xcfcf25,IUniverInstanceService as _0x23abd6,Inject as _0x2f2ecf,UniverInstanceType as _0x5a4427}from'@univerjs/core';import{FDocument as _0x1cb9b3,FDocumentParagraph as _0x477006,FDocumentTextRange as _0xe94339}from'@univerjs/docs/facade';function v(_0x558cab,_0x40a1cc){return function(_0x4af14b,_0x55fda7){_0x40a1cc(_0x4af14b,_0x55fda7,_0x558cab);};}function y(_0x3795b2,_0x507c35,_0x2038e8,_0x1aaa30){var _0xef8a6c=_0x3a44,_0x3016e6=arguments['length'],_0x36f69a=_0x3016e6<0x3?_0x507c35:_0x1aaa30===null?_0x1aaa30=Object['getOwnPropertyDescriptor'](_0x507c35,_0x2038e8):_0x1aaa30,_0x217356;if(typeof Reflect==_0xef8a6c(0x1b1)&&typeof Reflect[_0xef8a6c(0x1c7)]==_0xef8a6c(0x1bf))_0x36f69a=Reflect['decorate'](_0x3795b2,_0x507c35,_0x2038e8,_0x1aaa30);else{for(var _0x48fc6d=_0x3795b2[_0xef8a6c(0x1c5)]-0x1;_0x48fc6d>=0x0;_0x48fc6d--)(_0x217356=_0x3795b2[_0x48fc6d])&&(_0x36f69a=(_0x3016e6<0x3?_0x217356(_0x36f69a):_0x3016e6>0x3?_0x217356(_0x507c35,_0x2038e8,_0x36f69a):_0x217356(_0x507c35,_0x2038e8))||_0x36f69a);}return _0x3016e6>0x3&&_0x36f69a&&Object[_0xef8a6c(0x1a3)](_0x507c35,_0x2038e8,_0x36f69a),_0x36f69a;}let b=class{constructor(_0x533d09,_0x2d879f,_0x2451b0,_0x3272f3,_0x280091,_0x1d3e0e){var _0x2e43d7=_0x3a44;this[_0x2e43d7(0x1a8)]=_0x533d09,this[_0x2e43d7(0x1c1)]=_0x2d879f,this[_0x2e43d7(0x1ab)]=_0x2451b0,this['_model']=_0x3272f3,this['_service']=_0x280091,this[_0x2e43d7(0x1b9)]=_0x1d3e0e;}[_0x2b355b(0x1b2)](){var _0x524c58=_0x2b355b;return this[_0x524c58(0x1c1)];}[_0x2b355b(0x19c)](){var _0x59abd3=_0x2b355b;let _0x321151=this[_0x59abd3(0x18b)]();return _0x321151?{'endOffset':_0x321151['endIndex']+0x1,'rangeId':_0x321151[_0x59abd3(0x195)],'startOffset':_0x321151[_0x59abd3(0x199)]}:null;}[_0x2b355b(0x1b8)](){var _0x2e643a=_0x2b355b,_0x1b162e;return((_0x1b162e=this[_0x2e643a(0x1cf)][_0x2e643a(0x1b8)](this[_0x2e643a(0x1a8)],this[_0x2e643a(0x1c1)]))==null?void 0x0:_0x1b162e[_0x2e643a(0x19e)])??'';}[_0x2b355b(0x197)](){var _0x351545=_0x2b355b;return this[_0x351545(0x1cf)][_0x351545(0x1b8)](this[_0x351545(0x1a8)],this[_0x351545(0x1c1)])??null;}['getResult'](){var _0x469f77=_0x2b355b;return this['_service'][_0x469f77(0x1ae)]({'unitId':this[_0x469f77(0x1a8)],'rangeId':this['_rangeId']})??null;}['describe'](){var _0x42f651=_0x2b355b;let _0x147ae0=this[_0x42f651(0x19c)](),_0x187639=this[_0x42f651(0x197)](),_0x3f2874=this['getResult']();return!_0x147ae0||!_0x187639||!_0x3f2874?null:{..._0x147ae0,'config':_0x187639,'formula':_0x187639[_0x42f651(0x19e)],'result':_0x3f2874,'type':_0x42f651(0x19e)};}['update'](_0x45ecf7){var _0x23646f=_0x2b355b;return this['_commandService'][_0x23646f(0x18c)](_0x9bf949['id'],{'externalReferences':_0x45ecf7['externalReferences'],'formula':_0x45ecf7[_0x23646f(0x19e)],'numberFormat':_0x45ecf7['numberFormat'],'rangeId':this[_0x23646f(0x1c1)],'unitId':this[_0x23646f(0x1a8)]});}[_0x2b355b(0x1a5)](_0x2ae9e6){var _0x1acf0f=_0x2b355b;return this[_0x1acf0f(0x1ab)][_0x1acf0f(0x18c)](_0x5dba3c['id'],{'numberFormat':_0x2ae9e6,'rangeId':this['_rangeId'],'unitId':this['_unitId']});}[_0x2b355b(0x19a)](){var _0x349c08=_0x2b355b;return this[_0x349c08(0x1ab)]['syncExecuteCommand'](_0x3eeb8c['id'],{'rangeId':this[_0x349c08(0x1c1)],'unitId':this[_0x349c08(0x1a8)]});}[_0x2b355b(0x1c9)](_0x3d05f6){var _0x55f668=_0x2b355b;return this[_0x55f668(0x1ab)][_0x55f668(0x18c)](_0x497f52['id'],{'rangeId':this[_0x55f668(0x1c1)],'text':_0x3d05f6,'unitId':this[_0x55f668(0x1a8)]});}[_0x2b355b(0x1cc)](){var _0x4a2b0a=_0x2b355b;return this[_0x4a2b0a(0x1ab)]['syncExecuteCommand'](_0x2d4520['id'],{'rangeId':this[_0x4a2b0a(0x1c1)],'unitId':this[_0x4a2b0a(0x1a8)]});}['_getCustomRange'](){var _0x4b8c6e=_0x2b355b,_0x18a5d5;let _0x161d28=this[_0x4b8c6e(0x1b9)][_0x4b8c6e(0x1c2)](this[_0x4b8c6e(0x1a8)],_0x5a4427[_0x4b8c6e(0x1b4)]);return _0x161d28==null||(_0x18a5d5=_0x161d28['getSnapshot']()['body'])==null||(_0x18a5d5=_0x18a5d5[_0x4b8c6e(0x1cd)])==null?void 0x0:_0x18a5d5[_0x4b8c6e(0x1d1)](_0x1f7d5e=>_0x1f7d5e[_0x4b8c6e(0x195)]===this[_0x4b8c6e(0x1c1)]&&_0x3a1bb9(_0x1f7d5e));}};b=y([v(0x2,_0x128e28),v(0x3,_0x2f2ecf(_0x32fc45)),v(0x4,_0x2f2ecf(_0x5bf394)),v(0x5,_0x23abd6)],b);function x(_0x32b2e8){'@babel/helpers - typeof';var _0x2b02d8=_0x2b355b;return x=typeof Symbol=='function'&&typeof Symbol[_0x2b02d8(0x1a1)]=='symbol'?function(_0x396b3e){return typeof _0x396b3e;}:function(_0x504d0f){var _0x12042d=_0x2b02d8;return _0x504d0f&&typeof Symbol==_0x12042d(0x1bf)&&_0x504d0f[_0x12042d(0x1b7)]===Symbol&&_0x504d0f!==Symbol[_0x12042d(0x18f)]?_0x12042d(0x1a6):typeof _0x504d0f;},x(_0x32b2e8);}function S(_0x395844,_0x4f7aa0){var _0x8dafe9=_0x2b355b;if(x(_0x395844)!=_0x8dafe9(0x1b1)||!_0x395844)return _0x395844;var _0x5d5e5e=_0x395844[Symbol[_0x8dafe9(0x198)]];if(_0x5d5e5e!==void 0x0){var _0x59d213=_0x5d5e5e[_0x8dafe9(0x1ce)](_0x395844,_0x4f7aa0||_0x8dafe9(0x191));if(x(_0x59d213)!='object')return _0x59d213;throw TypeError(_0x8dafe9(0x1c6));}return(_0x4f7aa0===_0x8dafe9(0x1c0)?String:Number)(_0x395844);}function C(_0x38fd36){var _0x3fff0d=_0x2b355b,_0x3e2604=S(_0x38fd36,_0x3fff0d(0x1c0));return x(_0x3e2604)==_0x3fff0d(0x1a6)?_0x3e2604:_0x3e2604+'';}function w(_0x1313de,_0x2c3e53,_0x5b5c4f){var _0x27a84d=_0x2b355b;return(_0x2c3e53=C(_0x2c3e53))in _0x1313de?Object[_0x27a84d(0x1a3)](_0x1313de,_0x2c3e53,{'value':_0x5b5c4f,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x1313de[_0x2c3e53]=_0x5b5c4f,_0x1313de;}var T=class extends _0x1cb9b3{constructor(..._0x2d01d5){var _0x77f48a=_0x2b355b;super(..._0x2d01d5),w(this,_0x77f48a(0x1bd),void 0x0),w(this,_0x77f48a(0x1b6),void 0x0),w(this,_0x77f48a(0x1ca),void 0x0),w(this,_0x77f48a(0x18e),void 0x0);}['_initialize'](_0x1bc0b6){var _0x6493a8=_0x2b355b;this[_0x6493a8(0x1bd)]=_0x1bc0b6[_0x6493a8(0x196)](_0x128e28),this[_0x6493a8(0x1b6)]=_0x1bc0b6[_0x6493a8(0x196)](_0xb17991),this[_0x6493a8(0x1ca)]=_0x1bc0b6[_0x6493a8(0x196)](_0x32fc45),this['_docsFormulaResourceLoaderService']=_0x1bc0b6[_0x6493a8(0x196)](_0xcfcf25);}[_0x2b355b(0x1b0)](){var _0x488e46=_0x2b355b;return this[_0x488e46(0x1d0)]()[_0x488e46(0x1c4)](_0x3cdc72=>this[_0x488e46(0x1aa)](_0x3cdc72['rangeId']));}[_0x2b355b(0x1b8)](_0x2efd01){var _0x38170d=_0x2b355b;return this[_0x38170d(0x1d0)]()[_0x38170d(0x1a9)](_0x29dc0d=>_0x29dc0d[_0x38170d(0x195)]===_0x2efd01)?this[_0x38170d(0x1aa)](_0x2efd01):null;}[_0x2b355b(0x19b)](_0x3febe2){var _0x167dad=_0x2b355b;let _0x431509=this[_0x167dad(0x1d0)]()['find'](_0x560648=>_0x560648['startIndex']<=_0x3febe2&&_0x3febe2<=_0x560648['endIndex']);return _0x431509?this[_0x167dad(0x1aa)](_0x431509[_0x167dad(0x195)]):null;}[_0x2b355b(0x1be)](){var _0x4aa8c1=_0x2b355b;let _0x28a557=this[_0x4aa8c1(0x18e)][_0x4aa8c1(0x1d4)](this['id']);if(!_0x28a557)throw Error(_0x4aa8c1(0x18d)+this['id']+_0x4aa8c1(0x1d5));return this['_docsFormulaDisplayTextService'][_0x4aa8c1(0x1af)](_0x28a557);}[_0x2b355b(0x1c8)](_0x41d33d){var _0x191160=_0x2b355b;return this[_0x191160(0x1a2)]({'externalReferences':_0x41d33d[_0x191160(0x1bb)],'formula':_0x41d33d['formula'],'numberFormat':_0x41d33d[_0x191160(0x1b5)],'target':{'type':_0x191160(0x1a7),'startOffset':_0x41d33d[_0x191160(0x1ba)],'endOffset':_0x41d33d['endOffset']},'unitId':this[_0x191160(0x1b2)]()});}[_0x2b355b(0x1a2)](_0x46ed4e){var _0x120a7d=_0x2b355b;let _0x132226=this['_docsFormulaCommandService'][_0x120a7d(0x18c)](_0x3e5dad['id'],_0x46ed4e);return _0x132226?this[_0x120a7d(0x1aa)](_0x132226['rangeId']):null;}[_0x2b355b(0x1d0)](){var _0x1d58c3=_0x2b355b,_0x116043;let _0xb34047=this[_0x1d58c3(0x1ca)]['getFormulas'](this[_0x1d58c3(0x1b2)]());return((_0x116043=this[_0x1d58c3(0x1c3)]('')[_0x1d58c3(0x1cd)])==null?void 0x0:_0x116043['filter'](_0x258602=>_0x3a1bb9(_0x258602)&&_0xb34047[_0x258602[_0x1d58c3(0x195)]]!=null))??[];}['_createFormula'](_0x3cadc1){var _0x59c9da=_0x2b355b;return this[_0x59c9da(0x1a0)]['createInstance'](b,this[_0x59c9da(0x1b2)](),_0x3cadc1);}};_0x1cb9b3['extend'](T);function _0x3b5e(){var _0x290e25=['_insert','defineProperty','createInstance','setNumberFormat','symbol','range','_unitId','some','_createFormula','_commandService','2256652GmuLhb','end','getResult','degradeDocumentData','getFormulas','object','getId','794124FRKoMV','UNIVER_DOC','numberFormat','_docsFormulaDisplayTextService','constructor','getFormula','_univerInstanceService','startOffset','externalReferences','_document','_docsFormulaCommandService','saveFormulaDisplayTextSnapshot','function','string','_rangeId','getUnit','getBody','map','length','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','decorate','insertFormula','replaceWithText','_docsFormulaModel','getSegmentId','convertToText','customRanges','call','_model','_getCompleteRanges','find','5VqnOuw','replaceWithFormula','saveUnit','\x20could\x20not\x20be\x20serialized.','365840jGNHzE','_getCustomRange','syncExecuteCommand','Document\x20','_docsFormulaResourceLoaderService','prototype','106250feYDGj','default','2654498EkXvZH','6966968rLuuwy','_initialize','rangeId','get','getConfig','toPrimitive','startIndex','remove','getFormulaAt','getRange','extend','formula','110220RQLZiJ','_injector','iterator'];_0x3b5e=function(){return _0x290e25;};return _0x3b5e();}var E=class extends _0x477006{constructor(..._0x13cc1b){var _0x23ef8e=_0x2b355b;super(..._0x13cc1b),w(this,_0x23ef8e(0x1bd),void 0x0);}['_initialize'](_0x374214){var _0x5e1903=_0x2b355b;this[_0x5e1903(0x1bd)]=_0x374214[_0x5e1903(0x196)](_0x128e28);}[_0x2b355b(0x1c8)](_0x4ddb55,_0x1026ca,_0x1c34e6={}){return this['_insert'](_0x4ddb55,_0x1026ca,_0x1c34e6);}['appendFormula'](_0x560153,_0x1392d0={}){var _0x40d68b=_0x2b355b;return this['_insert'](_0x40d68b(0x1ad),_0x560153,_0x1392d0);}[_0x2b355b(0x1a2)](_0x1b3211,_0x5a92bb,_0x22039c){var _0x11d99d=_0x2b355b;if(this[_0x11d99d(0x1cb)]())return null;let _0x1f8ec8={'externalReferences':_0x22039c[_0x11d99d(0x1bb)],'formula':_0x5a92bb,'numberFormat':_0x22039c[_0x11d99d(0x1b5)],'target':{'type':'paragraph','paragraphId':this['getId'](),'position':_0x1b3211},'unitId':this['_document']['getId']()},_0x33cff7=this[_0x11d99d(0x1bd)][_0x11d99d(0x18c)](_0x3e5dad['id'],_0x1f8ec8);return _0x33cff7?this['_injector'][_0x11d99d(0x1a4)](b,this[_0x11d99d(0x1bc)][_0x11d99d(0x1b2)](),_0x33cff7[_0x11d99d(0x195)]):null;}};function _0x3a44(_0x3dbffd,_0xdf1336){_0x3dbffd=_0x3dbffd-0x18a;var _0x3b5e39=_0x3b5e();var _0x3a44fe=_0x3b5e39[_0x3dbffd];return _0x3a44fe;}_0x477006[_0x2b355b(0x19d)](E);var D=class extends _0xe94339{constructor(..._0x4a40e1){var _0x610aa9=_0x2b355b;super(..._0x4a40e1),w(this,_0x610aa9(0x1bd),void 0x0);}[_0x2b355b(0x194)](_0x280f5d){var _0x37780b=_0x2b355b;this[_0x37780b(0x1bd)]=_0x280f5d['get'](_0x128e28);}[_0x2b355b(0x1d3)](_0x36cb09,_0x40b437={}){var _0x6b855b=_0x2b355b;let {endOffset:_0x32b929,segmentId:_0x353e47,startOffset:_0x2d07d4}=this[_0x6b855b(0x19c)]();return _0x353e47?null:this[_0x6b855b(0x1a2)](_0x2d07d4,_0x32b929,_0x36cb09,_0x40b437);}[_0x2b355b(0x1a2)](_0x5c1fcd,_0xac1fe0,_0x121cff,_0x1afa9a){var _0x1306de=_0x2b355b;let _0x8edbb6={'externalReferences':_0x1afa9a[_0x1306de(0x1bb)],'formula':_0x121cff,'numberFormat':_0x1afa9a[_0x1306de(0x1b5)],'target':{'type':_0x1306de(0x1a7),'startOffset':_0x5c1fcd,'endOffset':_0xac1fe0},'unitId':this[_0x1306de(0x1bc)]['getId']()},_0x3b6c94=this[_0x1306de(0x1bd)][_0x1306de(0x18c)](_0x3e5dad['id'],_0x8edbb6);return _0x3b6c94?this[_0x1306de(0x1a0)][_0x1306de(0x1a4)](b,this[_0x1306de(0x1bc)][_0x1306de(0x1b2)](),_0x3b6c94['rangeId']):null;}};_0xe94339[_0x2b355b(0x19d)](D);export{b as FDocumentFormula};
|
|
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};
|