@univerjs-pro/sheets-shape 0.21.0 → 0.21.1-insiders.20260509-bf98cad
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 +21 -15
- package/lib/cjs/facade.js +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/es/facade.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/facade.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +13 -14
package/README.md
CHANGED
|
@@ -1,30 +1,36 @@
|
|
|
1
1
|
# @univerjs-pro/sheets-shape
|
|
2
2
|
|
|
3
|
-
[](https://npmjs.
|
|
4
|
-
[](https://npmjs.com/package/@univerjs-pro/sheets-shape)
|
|
4
|
+
[](https://npmjs.com/package/@univerjs-pro/sheets-shape)
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
`@univerjs-pro/sheets-shape` provides shape and drawing model integration for Univer Sheets.
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
## Package Overview
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
| Package | UMD global | CSS | Locales | Facade entry |
|
|
11
|
+
| --- | --- | :---: | :---: | :---: |
|
|
12
|
+
| `@univerjs-pro/sheets-shape` | `UniverProSheetsShape` | No | No | Yes |
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
# Using npm
|
|
16
|
-
npm install @univerjs-pro/sheets-shape-ui @univerjs-pro/sheets-shape
|
|
14
|
+
## Installation
|
|
17
15
|
|
|
18
|
-
|
|
19
|
-
pnpm add @univerjs-pro/sheets-shape
|
|
16
|
+
```sh
|
|
17
|
+
pnpm add @univerjs-pro/sheets-shape
|
|
18
|
+
# or
|
|
19
|
+
npm install @univerjs-pro/sheets-shape
|
|
20
20
|
```
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
Keep all `@univerjs/*` and `@univerjs-pro/*` packages on the same version.
|
|
23
|
+
|
|
24
|
+
## Usage
|
|
23
25
|
|
|
24
26
|
```ts
|
|
25
27
|
import { UniverSheetsShapePlugin } from '@univerjs-pro/sheets-shape';
|
|
26
|
-
import { UniverSheetsShapeUIPlugin } from '@univerjs-pro/sheets-shape-ui';
|
|
27
28
|
|
|
28
29
|
univer.registerPlugin(UniverSheetsShapePlugin);
|
|
29
|
-
univer.registerPlugin(UniverSheetsShapeUIPlugin);
|
|
30
30
|
```
|
|
31
|
+
|
|
32
|
+
## Resources
|
|
33
|
+
|
|
34
|
+
- [Documentation](https://docs.univer.ai/guides/pro)
|
|
35
|
+
- [NPM package](https://npmjs.com/package/@univerjs-pro/sheets-shape)
|
|
36
|
+
|
package/lib/cjs/facade.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x2ffec3=_0x136b;(function(_0x5b702c,_0x4695c9){const _0x3fceb8=_0x136b,_0x581608=_0x5b702c();while(!![]){try{const _0x5083fd=-parseInt(_0x3fceb8(0x1b4))/0x1*(-parseInt(_0x3fceb8(0x221))/0x2)+-parseInt(_0x3fceb8(0x202))/0x3*(-parseInt(_0x3fceb8(0x22a))/0x4)+-parseInt(_0x3fceb8(0x20b))/0x5+-parseInt(_0x3fceb8(0x214))/0x6+-parseInt(_0x3fceb8(0x204))/0x7+-parseInt(_0x3fceb8(0x205))/0x8+parseInt(_0x3fceb8(0x1d8))/0x9*(parseInt(_0x3fceb8(0x1c4))/0xa);if(_0x5083fd===_0x4695c9)break;else _0x581608['push'](_0x581608['shift']());}catch(_0x418462){_0x581608['push'](_0x581608['shift']());}}}(_0x1762,0x67805),Object[_0x2ffec3(0x229)](exports,Symbol[_0x2ffec3(0x1b6)],{'value':_0x2ffec3(0x1ec)}));function _0x136b(_0x7be385,_0x1b9db4){_0x7be385=_0x7be385-0x1ab;const _0x1762b3=_0x1762();let _0x136b31=_0x1762b3[_0x7be385];return _0x136b31;}let _univerjs_pro_engine_shape=require('@univerjs-pro/engine-shape'),_univerjs_core_facade=require('@univerjs/core/facade'),_univerjs_pro_sheets_shape=require('@univerjs-pro/sheets-shape'),_univerjs_core=require('@univerjs/core'),_univerjs_drawing=require('@univerjs/drawing'),_univerjs_sheets=require('@univerjs/sheets'),_univerjs_sheets_drawing=require('@univerjs/sheets-drawing'),_univerjs_sheets_facade=require('@univerjs/sheets/facade');var FSheetsShapeEnumMixin=class extends _univerjs_core_facade[_0x2ffec3(0x1b7)]{get['ShapeTypeEnum'](){const _0x20746e=_0x2ffec3;return _univerjs_pro_engine_shape[_0x20746e(0x1ee)];}get[_0x2ffec3(0x225)](){const _0x2adb10=_0x2ffec3;return _univerjs_pro_engine_shape[_0x2adb10(0x225)];}get['ShapeGradientTypeEnum'](){const _0x6bfb64=_0x2ffec3;return _univerjs_pro_engine_shape[_0x6bfb64(0x222)];}get[_0x2ffec3(0x218)](){const _0x10f16b=_0x2ffec3;return _univerjs_pro_engine_shape[_0x10f16b(0x218)];}get[_0x2ffec3(0x23d)](){const _0x50438a=_0x2ffec3;return _univerjs_pro_engine_shape[_0x50438a(0x23d)];}get[_0x2ffec3(0x1e8)](){const _0x1e8d6b=_0x2ffec3;return _univerjs_pro_engine_shape[_0x1e8d6b(0x1e8)];}get[_0x2ffec3(0x233)](){const _0x5ebf9d=_0x2ffec3;return _univerjs_pro_engine_shape[_0x5ebf9d(0x233)];}get[_0x2ffec3(0x20a)](){return _univerjs_pro_engine_shape['ShapeArrowTypeEnum'];}get[_0x2ffec3(0x22f)](){return _univerjs_pro_engine_shape['ShapeArrowSizeEnum'];}};_univerjs_core_facade[_0x2ffec3(0x1b7)]['extend'](FSheetsShapeEnumMixin);function _typeof(_0x4f96e1){'@babel/helpers - typeof';const _0xfc47=_0x2ffec3;return _typeof='function'==typeof Symbol&&_0xfc47(0x1f6)==typeof Symbol[_0xfc47(0x1e5)]?function(_0x4175be){return typeof _0x4175be;}:function(_0x9607ff){const _0x1c511d=_0xfc47;return _0x9607ff&&_0x1c511d(0x1fc)==typeof Symbol&&_0x9607ff['constructor']===Symbol&&_0x9607ff!==Symbol[_0x1c511d(0x217)]?_0x1c511d(0x1f6):typeof _0x9607ff;},_typeof(_0x4f96e1);}function toPrimitive(_0x45ad38,_0x5a69df){const _0x3b5e84=_0x2ffec3;if(_0x3b5e84(0x23a)!=_typeof(_0x45ad38)||!_0x45ad38)return _0x45ad38;var _0x35142a=_0x45ad38[Symbol[_0x3b5e84(0x1f7)]];if(void 0x0!==_0x35142a){var _0x2bd39f=_0x35142a[_0x3b5e84(0x1db)](_0x45ad38,_0x5a69df||_0x3b5e84(0x20f));if(_0x3b5e84(0x23a)!=_typeof(_0x2bd39f))return _0x2bd39f;throw new TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return('string'===_0x5a69df?String:Number)(_0x45ad38);}function toPropertyKey(_0x420af5){const _0x17764f=_0x2ffec3;var _0x2e2fe2=toPrimitive(_0x420af5,_0x17764f(0x200));return _0x17764f(0x1f6)==_typeof(_0x2e2fe2)?_0x2e2fe2:_0x2e2fe2+'';}function _defineProperty(_0x490f3c,_0x260caf,_0x3d6419){const _0x19bca9=_0x2ffec3;return(_0x260caf=toPropertyKey(_0x260caf))in _0x490f3c?Object[_0x19bca9(0x229)](_0x490f3c,_0x260caf,{'value':_0x3d6419,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x490f3c[_0x260caf]=_0x3d6419,_0x490f3c;}var FShape=class{constructor(_0x609e53,_0xd65334,_0x22a753,_0x5b721b){const _0x2f60e7=_0x2ffec3;_defineProperty(this,'unitId',void 0x0),_defineProperty(this,_0x2f60e7(0x21c),void 0x0),_defineProperty(this,_0x2f60e7(0x227),void 0x0),_defineProperty(this,'x',0x0),_defineProperty(this,'y',0x0),_defineProperty(this,_0x2f60e7(0x1e6),_univerjs_pro_sheets_shape['DEFAULT_SHAPE_WIDTH']),_defineProperty(this,_0x2f60e7(0x1d2),_univerjs_pro_sheets_shape['DEFAULT_SHAPE_HEIGHT']),_defineProperty(this,_0x2f60e7(0x1fe),void 0x0),_defineProperty(this,_0x2f60e7(0x1ef),{}),_defineProperty(this,_0x2f60e7(0x1f4),void 0x0),this[_0x2f60e7(0x1bf)]=_0x609e53,this[_0x2f60e7(0x21c)]=_0xd65334,this[_0x2f60e7(0x227)]=_0x22a753||(0x0,_univerjs_core[_0x2f60e7(0x232)])(),this[_0x2f60e7(0x1f4)]=_0x5b721b;}[_0x2ffec3(0x1b8)](_0x1ca459,_0x45789a,_0x2ecb6c,_0x9b8b56){const _0x5984f8=_0x2ffec3,_0x25473f=this[_0x5984f8(0x1f4)][_0x5984f8(0x234)](_univerjs_sheets[_0x5984f8(0x22c)])[_0x5984f8(0x201)](this[_0x5984f8(0x1bf)],this[_0x5984f8(0x21c)]);if(!_0x25473f)throw new Error(_0x5984f8(0x1e3)+this[_0x5984f8(0x1bf)]+_0x5984f8(0x230)+this[_0x5984f8(0x21c)]+'\x20not\x20found');const {transform:_0x23f7ec}=(0x0,_univerjs_sheets[_0x5984f8(0x1f1)])(this[_0x5984f8(0x1bf)],this['subUnitId'],{'row':_0x1ca459,'column':_0x45789a,'rowOffset':_0x2ecb6c,'columnOffset':_0x9b8b56},0x1,0x1,_0x25473f);return this['x']=_0x23f7ec[_0x5984f8(0x1c9)],this['y']=_0x23f7ec[_0x5984f8(0x1eb)],this;}[_0x2ffec3(0x23c)](_0x44bb90,_0x5c9914){return this['x']=_0x44bb90,this['y']=_0x5c9914,this;}[_0x2ffec3(0x21a)](_0x48e5d3){const _0x141748=_0x2ffec3;return this[_0x141748(0x1fe)]=_0x48e5d3,this;}[_0x2ffec3(0x1c2)](_0x5e22b1,_0x9e734a){const _0x196f91=_0x2ffec3;if(!this[_0x196f91(0x1ef)][_0x196f91(0x1f2)])this[_0x196f91(0x1ef)][_0x196f91(0x1f2)]={};this[_0x196f91(0x1ef)][_0x196f91(0x1f2)][_0x196f91(0x1de)]=_univerjs_pro_engine_shape[_0x196f91(0x225)][_0x196f91(0x21e)];if(_0x5e22b1!==void 0x0)this[_0x196f91(0x1ef)][_0x196f91(0x1f2)]['color']=_0x5e22b1;if(_0x9e734a!==void 0x0)this['shapeData']['fill'][_0x196f91(0x219)]=_0x9e734a;return this;}[_0x2ffec3(0x1af)](_0x583f50,_0xaaae75,_0x5285b8){const _0x4007e6=_0x2ffec3;if(_0xaaae75===void 0x0||_0xaaae75[_0x4007e6(0x1bc)]===0x0)throw new Error(_0x4007e6(0x1cf));if(!this[_0x4007e6(0x1ef)][_0x4007e6(0x1f2)])this[_0x4007e6(0x1ef)][_0x4007e6(0x1f2)]={};this[_0x4007e6(0x1ef)][_0x4007e6(0x1f2)][_0x4007e6(0x21d)]=_0xaaae75,this['shapeData'][_0x4007e6(0x1f2)]['fillType']=_univerjs_pro_engine_shape[_0x4007e6(0x225)][_0x4007e6(0x1d5)],this[_0x4007e6(0x1ef)][_0x4007e6(0x1f2)][_0x4007e6(0x226)]=_0x583f50;if(_0x5285b8!==void 0x0)this[_0x4007e6(0x1ef)][_0x4007e6(0x1f2)][_0x4007e6(0x1dd)]=_0x5285b8;return this;}[_0x2ffec3(0x1f3)](){const _0x5ee519=_0x2ffec3;return this[_0x5ee519(0x1ef)][_0x5ee519(0x1f2)]={'fillType':_univerjs_pro_engine_shape[_0x5ee519(0x225)][_0x5ee519(0x210)]},this;}[_0x2ffec3(0x228)](_0x58e0c6){const _0x554a70=_0x2ffec3;if(!this[_0x554a70(0x1ef)]['stroke'])this[_0x554a70(0x1ef)][_0x554a70(0x1ed)]={};return this['shapeData'][_0x554a70(0x1ed)][_0x554a70(0x21f)]=_0x58e0c6,this;}[_0x2ffec3(0x1cb)](_0x14c66d){const _0xff80cf=_0x2ffec3;if(!this[_0xff80cf(0x1ef)]['stroke'])this['shapeData'][_0xff80cf(0x1ed)]={};return this['shapeData'][_0xff80cf(0x1ed)]['width']=_0x14c66d,this;}['setStrokeLineDashType'](_0x171a96){const _0x264f9d=_0x2ffec3;if(!this[_0x264f9d(0x1ef)][_0x264f9d(0x1ed)])this['shapeData']['stroke']={};return this['shapeData'][_0x264f9d(0x1ed)][_0x264f9d(0x1be)]=_0x171a96,this;}[_0x2ffec3(0x1f8)](_0x29dbe6){const _0x701adb=_0x2ffec3;if(!this[_0x701adb(0x1ef)][_0x701adb(0x1ed)])this['shapeData'][_0x701adb(0x1ed)]={};return this[_0x701adb(0x1ef)]['stroke']['lineJoinType']=_0x29dbe6,this;}['setStrokeLineCapType'](_0x2985cf){const _0xb3e2f1=_0x2ffec3;if(!this['shapeData'][_0xb3e2f1(0x1ed)])this[_0xb3e2f1(0x1ef)][_0xb3e2f1(0x1ed)]={};return this['shapeData']['stroke']['capType']=_0x2985cf,this;}['setStrokeOpacity'](_0x26600e){const _0x2be987=_0x2ffec3;if(!this[_0x2be987(0x1ef)][_0x2be987(0x1ed)])this[_0x2be987(0x1ef)][_0x2be987(0x1ed)]={};return this[_0x2be987(0x1ef)]['stroke'][_0x2be987(0x219)]=_0x26600e,this;}[_0x2ffec3(0x224)](_0x20a087){const _0x294dc5=_0x2ffec3;if(!this[_0x294dc5(0x1ef)][_0x294dc5(0x1ed)])this[_0x294dc5(0x1ef)][_0x294dc5(0x1ed)]={};return this['shapeData'][_0x294dc5(0x1ed)]['lineStrokeType']=_0x20a087,this;}['setWidth'](_0x4a25e1){return this['width']=_0x4a25e1,this;}['setHeight'](_0x3103fd){const _0x202043=_0x2ffec3;return this[_0x202043(0x1d2)]=_0x3103fd,this;}[_0x2ffec3(0x209)](){const _0x2c46e7=_0x2ffec3,_0x10a163=this['_injector'][_0x2c46e7(0x234)](_univerjs_pro_sheets_shape['SheetsShapeService'])['getShapeModel'](this[_0x2c46e7(0x1bf)],this[_0x2c46e7(0x21c)],this[_0x2c46e7(0x227)]);if(_0x10a163)return(0x0,_univerjs_pro_engine_shape[_0x2c46e7(0x206)])(_0x10a163[_0x2c46e7(0x1ac)]());if(this[_0x2c46e7(0x1fe)])return(0x0,_univerjs_pro_engine_shape[_0x2c46e7(0x206)])(this['shapeType']);return![];}[_0x2ffec3(0x1da)](){const _0x12b69f=_0x2ffec3,_0x542a3f=this['_injector'][_0x12b69f(0x234)](_univerjs_pro_sheets_shape[_0x12b69f(0x1ff)])[_0x12b69f(0x1b2)](this[_0x12b69f(0x1bf)],this[_0x12b69f(0x21c)],this[_0x12b69f(0x227)]);if(!_0x542a3f)return[];const _0x35545b=this[_0x12b69f(0x1f4)][_0x12b69f(0x234)](_univerjs_drawing['IDrawingManagerService'])['getDrawingByParam']({'unitId':this[_0x12b69f(0x1bf)],'subUnitId':this[_0x12b69f(0x21c)],'drawingId':this[_0x12b69f(0x227)]});if(!(_0x35545b===null||_0x35545b===void 0x0?void 0x0:_0x35545b[_0x12b69f(0x1cd)]))return[];const {width:width=0x0,height:height=0x0}=_0x35545b[_0x12b69f(0x1cd)];return _0x542a3f[_0x12b69f(0x1bb)]({'width':width,'height':height}),_0x542a3f[_0x12b69f(0x208)]();}[_0x2ffec3(0x1d0)](){const _0x375f4d=_0x2ffec3,_0x1bedb5=this[_0x375f4d(0x1f4)][_0x375f4d(0x234)](_univerjs_pro_sheets_shape[_0x375f4d(0x1ff)])['getShapeModel'](this[_0x375f4d(0x1bf)],this[_0x375f4d(0x21c)],this['drawId']);if(!_0x1bedb5)return[];const _0x3936cb=this[_0x375f4d(0x1f4)][_0x375f4d(0x234)](_univerjs_drawing[_0x375f4d(0x1c1)])[_0x375f4d(0x212)]({'unitId':this[_0x375f4d(0x1bf)],'subUnitId':this['subUnitId'],'drawingId':this[_0x375f4d(0x227)]});if(!(_0x3936cb===null||_0x3936cb===void 0x0?void 0x0:_0x3936cb[_0x375f4d(0x1cd)]))return[];const {width:width=0x0,height:height=0x0}=_0x3936cb[_0x375f4d(0x1cd)];return _0x1bedb5[_0x375f4d(0x1bb)]({'width':width,'height':height}),_0x1bedb5[_0x375f4d(0x1ad)]();}['getConnectorLinePoints'](){const _0x3215d8=_0x2ffec3,_0x583338=this[_0x3215d8(0x1f4)][_0x3215d8(0x234)](_univerjs_pro_sheets_shape['SheetsShapeService'])[_0x3215d8(0x1b2)](this[_0x3215d8(0x1bf)],this['subUnitId'],this[_0x3215d8(0x227)]);if(!_0x583338)return[];if(!(0x0,_univerjs_pro_engine_shape[_0x3215d8(0x206)])(_0x583338[_0x3215d8(0x1ac)]()))return[];const _0x41a8c8=this[_0x3215d8(0x1f4)][_0x3215d8(0x234)](_univerjs_drawing[_0x3215d8(0x1c1)])['getDrawingByParam']({'unitId':this['unitId'],'subUnitId':this[_0x3215d8(0x21c)],'drawingId':this['drawId']});if(!(_0x41a8c8===null||_0x41a8c8===void 0x0?void 0x0:_0x41a8c8[_0x3215d8(0x1cd)]))return[];const {width:width=0x0,height:height=0x0}=_0x41a8c8[_0x3215d8(0x1cd)];return _0x583338[_0x3215d8(0x1bb)]({'width':width,'height':height}),_0x583338['getConnectorLinePoints']();}[_0x2ffec3(0x1ba)](){const _0x40960a=_0x2ffec3;var _0x4dd45b;const _0x213a4c=this[_0x40960a(0x1f4)][_0x40960a(0x234)](_univerjs_pro_sheets_shape[_0x40960a(0x1ff)])[_0x40960a(0x1b2)](this[_0x40960a(0x1bf)],this[_0x40960a(0x21c)],this[_0x40960a(0x227)]);if(!_0x213a4c)return null;return(_0x4dd45b=_0x213a4c['getStartConnectInfo']())!==null&&_0x4dd45b!==void 0x0?_0x4dd45b:null;}[_0x2ffec3(0x1ab)](){const _0x1432cc=_0x2ffec3;var _0x56d483;const _0x46a9eb=this[_0x1432cc(0x1f4)][_0x1432cc(0x234)](_univerjs_pro_sheets_shape[_0x1432cc(0x1ff)])[_0x1432cc(0x1b2)](this[_0x1432cc(0x1bf)],this[_0x1432cc(0x21c)],this[_0x1432cc(0x227)]);if(!_0x46a9eb)return null;return(_0x56d483=_0x46a9eb[_0x1432cc(0x1ab)]())!==null&&_0x56d483!==void 0x0?_0x56d483:null;}[_0x2ffec3(0x231)](){const _0x4bced2=_0x2ffec3;var _0x531efe,_0x5952ad;if(!this[_0x4bced2(0x1fe)])throw new Error(_0x4bced2(0x1ae));if(this['x']===0x0||this['y']===0x0){const _0x9f74f4=this[_0x4bced2(0x1f4)]['get'](_univerjs_sheets[_0x4bced2(0x22c)])[_0x4bced2(0x201)](this[_0x4bced2(0x1bf)],this[_0x4bced2(0x21c)]);if(!_0x9f74f4)throw new Error(_0x4bced2(0x1e3)+this[_0x4bced2(0x1bf)]+_0x4bced2(0x230)+this[_0x4bced2(0x21c)]+'\x20not\x20found');const {transform:_0x1d29e0}=(0x0,_univerjs_sheets[_0x4bced2(0x1f1)])(this[_0x4bced2(0x1bf)],this[_0x4bced2(0x21c)],{'row':0x1,'column':0x1,'rowOffset':0x0,'columnOffset':0x0},0x1,0x1,_0x9f74f4);this['x']=this['x']>0x0?this['x']:_0x1d29e0['left'],this['y']=this['y']>0x0?this['y']:_0x1d29e0[_0x4bced2(0x1eb)];}return this['width']=(_0x531efe=this[_0x4bced2(0x1e6)])!==null&&_0x531efe!==void 0x0?_0x531efe:_univerjs_pro_sheets_shape['DEFAULT_SHAPE_WIDTH'],this['height']=(_0x5952ad=this[_0x4bced2(0x1d2)])!==null&&_0x5952ad!==void 0x0?_0x5952ad:_univerjs_pro_sheets_shape[_0x4bced2(0x1ea)],{'unitId':this[_0x4bced2(0x1bf)],'subUnitId':this[_0x4bced2(0x21c)],'shapeId':this[_0x4bced2(0x227)],'shapeType':this[_0x4bced2(0x1fe)],'shapeData':Object[_0x4bced2(0x220)](this[_0x4bced2(0x1ef)])[_0x4bced2(0x1bc)]>0x0?this[_0x4bced2(0x1ef)]:void 0x0,'x':this['x'],'y':this['y'],'width':this['width'],'height':this[_0x4bced2(0x1d2)]};}[_0x2ffec3(0x1b9)](){return this['drawId'];}['getShapeType'](){const _0x3137c0=_0x2ffec3;return this[_0x3137c0(0x1fe)];}[_0x2ffec3(0x1c7)](){const _0x1b031d=_0x2ffec3;return this[_0x1b031d(0x1ef)];}[_0x2ffec3(0x1c6)](){return{'x':this['x'],'y':this['y']};}[_0x2ffec3(0x1d1)](){const _0x4e1088=_0x2ffec3;return{'width':this[_0x4e1088(0x1e6)],'height':this['height']};}},FConnectorShape=class extends FShape{constructor(_0xa8374e,_0xc26624,_0x5f2d0f,_0x25ac2f){const _0x471e36=_0x2ffec3;super(_0xa8374e,_0xc26624,_0x5f2d0f,_0x25ac2f),_defineProperty(this,_0x471e36(0x1ef),{});}[_0x2ffec3(0x21a)](_0x5d046f){const _0x195888=_0x2ffec3;if(!(0x0,_univerjs_pro_engine_shape[_0x195888(0x206)])(_0x5d046f))throw new Error(_0x195888(0x215)+_0x5d046f+',\x20but\x20expected\x20a\x20connector\x20shape\x20type.');return super[_0x195888(0x21a)](_0x5d046f),this;}[_0x2ffec3(0x1df)](_0x522e99){const _0x2a577b=_0x2ffec3;var _0x30921f,_0xaa4441;if(!((_0x30921f=this['shapeData'])===null||_0x30921f===void 0x0?void 0x0:_0x30921f['ln']))this[_0x2a577b(0x1ef)]['ln']={};if(!((_0xaa4441=this[_0x2a577b(0x1ef)])===null||_0xaa4441===void 0x0||(_0xaa4441=_0xaa4441['ln'])===null||_0xaa4441===void 0x0?void 0x0:_0xaa4441[_0x2a577b(0x216)]))this[_0x2a577b(0x1ef)]['ln']['startArrow']={};return this['shapeData']['ln'][_0x2a577b(0x216)][_0x2a577b(0x1dc)]=_0x522e99,this;}[_0x2ffec3(0x223)](_0x33aa95){const _0x11a8a0=_0x2ffec3;var _0x1cba40,_0x2f2d37;if(!((_0x1cba40=this['shapeData'])===null||_0x1cba40===void 0x0?void 0x0:_0x1cba40['ln']))this['shapeData']['ln']={};if(!((_0x2f2d37=this[_0x11a8a0(0x1ef)])===null||_0x2f2d37===void 0x0||(_0x2f2d37=_0x2f2d37['ln'])===null||_0x2f2d37===void 0x0?void 0x0:_0x2f2d37['endArrow']))this[_0x11a8a0(0x1ef)]['ln'][_0x11a8a0(0x22e)]={};return this[_0x11a8a0(0x1ef)]['ln']['endArrow'][_0x11a8a0(0x1dc)]=_0x33aa95,this;}[_0x2ffec3(0x238)](_0x4cbbbf){const _0x2ac2bb=_0x2ffec3;var _0x1b867d,_0x21cc50;if(!((_0x1b867d=this[_0x2ac2bb(0x1ef)])===null||_0x1b867d===void 0x0?void 0x0:_0x1b867d['ln']))this[_0x2ac2bb(0x1ef)]['ln']={};if(!((_0x21cc50=this[_0x2ac2bb(0x1ef)])===null||_0x21cc50===void 0x0||(_0x21cc50=_0x21cc50['ln'])===null||_0x21cc50===void 0x0?void 0x0:_0x21cc50[_0x2ac2bb(0x216)]))this[_0x2ac2bb(0x1ef)]['ln'][_0x2ac2bb(0x216)]={};return this[_0x2ac2bb(0x1ef)]['ln']['startArrow']['size']=_0x4cbbbf,this;}['setEndArrowSize'](_0x267b6e){const _0x43be7a=_0x2ffec3;var _0x2ec096,_0x32bc94;if(!((_0x2ec096=this[_0x43be7a(0x1ef)])===null||_0x2ec096===void 0x0?void 0x0:_0x2ec096['ln']))this[_0x43be7a(0x1ef)]['ln']={};if(!((_0x32bc94=this[_0x43be7a(0x1ef)])===null||_0x32bc94===void 0x0||(_0x32bc94=_0x32bc94['ln'])===null||_0x32bc94===void 0x0?void 0x0:_0x32bc94[_0x43be7a(0x22e)]))this[_0x43be7a(0x1ef)]['ln']['endArrow']={};return this['shapeData']['ln'][_0x43be7a(0x22e)]['size']=_0x267b6e,this;}[_0x2ffec3(0x231)](){return super['build']();}['getEndConnectInfo'](){const _0x250e51=_0x2ffec3;var _0x461ba1;return((_0x461ba1=this['shapeData'])===null||_0x461ba1===void 0x0||(_0x461ba1=_0x461ba1[_0x250e51(0x1c0)])===null||_0x461ba1===void 0x0?void 0x0:_0x461ba1['to'])||null;}['getStartConnectInfo'](){const _0x245385=_0x2ffec3;var _0x37d791;return((_0x37d791=this[_0x245385(0x1ef)])===null||_0x37d791===void 0x0||(_0x37d791=_0x37d791[_0x245385(0x1c0)])===null||_0x37d791===void 0x0?void 0x0:_0x37d791[_0x245385(0x22b)])||null;}};function computeConnectionPointInfo(_0x3785f1,_0x369367,_0x1b3c45,_0x40077f,_0x178da2,_0x3b45e2){const _0x539e08=_0x2ffec3,_0x8c18d2=_0x178da2[_0x539e08(0x1b2)](_0x3785f1,_0x369367,_0x1b3c45);if(!_0x8c18d2)return null;const _0x4e4e43=_0x3b45e2[_0x539e08(0x212)]({'unitId':_0x3785f1,'subUnitId':_0x369367,'drawingId':_0x1b3c45});if(!(_0x4e4e43===null||_0x4e4e43===void 0x0?void 0x0:_0x4e4e43[_0x539e08(0x1cd)]))return null;const {left:left=0x0,top:top=0x0,width:width=0x0,height:height=0x0,flipX:flipX=![],flipY:flipY=![],angle:_0x998d82}=_0x4e4e43[_0x539e08(0x1cd)];_0x8c18d2[_0x539e08(0x1bb)]({'width':width,'height':height});const _0x3eb5e2=_0x8c18d2['getConnectionSiteList']()[_0x539e08(0x1f5)](_0xabcbe9=>_0xabcbe9[_0x539e08(0x1d7)]===_0x40077f);if(!_0x3eb5e2)return null;let _0x152a86=flipX?width-_0x3eb5e2['x']:_0x3eb5e2['x'],_0x3aec65=flipY?height-_0x3eb5e2['y']:_0x3eb5e2['y'];if(_0x998d82&&_0x998d82!==0x0){const _0x5cecb9=_0x998d82*Math['PI']/0xb4,_0x2dcff8=Math['cos'](_0x5cecb9),_0x16d1ce=Math['sin'](_0x5cecb9),_0x133899=width/0x2,_0x42ee57=height/0x2,_0x3be980=_0x152a86-_0x133899,_0x6545ad=_0x3aec65-_0x42ee57;_0x152a86=_0x133899+_0x3be980*_0x2dcff8-_0x6545ad*_0x16d1ce,_0x3aec65=_0x42ee57+_0x3be980*_0x16d1ce+_0x6545ad*_0x2dcff8;}_0x152a86+=left,_0x3aec65+=top;let _0x3f1cae=_0x3eb5e2[_0x539e08(0x20c)]/0xea60;if(flipX)_0x3f1cae=0xb4-_0x3f1cae;if(flipY)_0x3f1cae=-_0x3f1cae;_0x3f1cae+=_0x998d82||0x0,_0x3f1cae=(_0x3f1cae%0x168+0x168)%0x168;const _0x291937=(0x0,_univerjs_pro_engine_shape[_0x539e08(0x1c3)])({'left':left,'top':top,'width':width,'height':height},_0x998d82||0x0);return{'point':{'x':_0x152a86,'y':_0x3aec65},'angle':_0x3f1cae,'bounds':_0x291937};}function calculateFreeEndpointAngle(_0x9e5594,_0x57d4c4){const _0x3fb5f0=_0x2ffec3,_0x519bbc=_0x57d4c4['x']-_0x9e5594['x'],_0x409414=_0x57d4c4['y']-_0x9e5594['y'];if(Math[_0x3fb5f0(0x1b0)](_0x519bbc)>=Math[_0x3fb5f0(0x1b0)](_0x409414))return _0x519bbc>=0x0?0xb4:0x0;return _0x409414>=0x0?0x10e:0x5a;}function computeFreeEndpointInfo(_0x3adc35,_0x5ccc42,_0x3827c4,_0x14ba6c,_0x5df9ac,_0x54eeb3,_0x30c027){const _0xe5e940=_0x2ffec3,_0x2c2212=_0x54eeb3[_0xe5e940(0x1b2)](_0x3adc35,_0x5ccc42,_0x3827c4);if(!_0x2c2212)return null;const _0x38624d=_0x30c027[_0xe5e940(0x212)]({'unitId':_0x3adc35,'subUnitId':_0x5ccc42,'drawingId':_0x3827c4});if(!(_0x38624d===null||_0x38624d===void 0x0?void 0x0:_0x38624d['transform']))return null;const {left:left=0x0,top:top=0x0,width:width=0x0,height:height=0x0,flipX:flipX=![],flipY:flipY=![]}=_0x38624d[_0xe5e940(0x1cd)];_0x2c2212[_0xe5e940(0x1bb)]({'width':width,'height':height});const _0x5f3f83=_0x2c2212['getConnectorLinePoints']();if(_0x5f3f83[_0xe5e940(0x1bc)]<0x2)return null;const _0x58fb7e=_0x14ba6c?_0x5f3f83[0x0]:_0x5f3f83[_0x5f3f83[_0xe5e940(0x1bc)]-0x1],_0x3a7b6a=new _univerjs_pro_engine_shape[(_0xe5e940(0x1f0))]({'left':left,'top':top,'width':width,'height':height,'flipX':flipX,'flipY':flipY})['localToWorld'](_0x58fb7e);return{'point':_0x3a7b6a,'angle':calculateFreeEndpointAngle(_0x5df9ac[_0xe5e940(0x207)],_0x3a7b6a),'bounds':{'left':_0x3a7b6a['x'],'top':_0x3a7b6a['y'],'width':0x0,'height':0x0}};}var FWorksheetShapeMixin=class extends _univerjs_sheets_facade[_0x2ffec3(0x22d)]{async['insertShape'](_0xd384ba){const _0x7dc525=_0x2ffec3,{unitId:_0x5902ad,subUnitId:_0x5bb4dc,shapeId:_0x5c1b63,shapeType:_0x49b8cc,shapeData:_0x249465,x:_0x3904e6,y:_0x30cd7c,width:_0x1d0a6d,height:_0x33c68d}=_0xd384ba;return this[_0x7dc525(0x1e0)][_0x7dc525(0x1fa)](_univerjs_pro_sheets_shape[_0x7dc525(0x23e)]['id'],{'unitId':_0x5902ad,'subUnitId':_0x5bb4dc,'shapeId':_0x5c1b63,'shapeType':_0x49b8cc,'shapeData':_0x249465,'position':{'x':_0x3904e6,'y':_0x30cd7c},'width':_0x1d0a6d,'height':_0x33c68d});}async[_0x2ffec3(0x1d3)](_0x28d65a){const _0x999cec=_0x2ffec3,{unitId:_0x2ff084,subUnitId:_0x5ab35c,shapeId:_0x77b81a,shapeType:_0x25a6a7,shapeData:_0x1d465b,x:_0x2d86da,y:_0x27ed09,width:_0x1091d2,height:_0x3430c2}=_0x28d65a;return this[_0x999cec(0x1e0)][_0x999cec(0x1fa)](_univerjs_pro_sheets_shape[_0x999cec(0x237)]['id'],{'unitId':_0x2ff084,'subUnitId':_0x5ab35c,'shapeId':_0x77b81a,'shapeType':_0x25a6a7,'shapeData':_0x1d465b,'position':{'x':_0x2d86da,'y':_0x27ed09},'width':_0x1091d2,'height':_0x3430c2});}[_0x2ffec3(0x1cc)](_0x5e17f8){const _0x2470c0=_0x2ffec3,_0x54c54d=this['getWorkbook']()[_0x2470c0(0x203)](),_0x539370=this[_0x2470c0(0x1b5)]();if(_0x5e17f8){const _0x442321=new FShape(_0x54c54d,_0x539370,_0x5e17f8['drawId'],this[_0x2470c0(0x1f4)]);return this[_0x2470c0(0x1d4)](_0x442321,_0x54c54d,_0x539370,_0x5e17f8[_0x2470c0(0x227)]),_0x442321;}return new FShape(_0x54c54d,_0x539370,(0x0,_univerjs_core[_0x2470c0(0x232)])(),this['_injector']);}[_0x2ffec3(0x239)](_0x5ad95b){const _0x22916d=_0x2ffec3,_0x2ae157=this[_0x22916d(0x1e9)]()['getUnitId'](),_0x3492c2=this[_0x22916d(0x1b5)]();if(_0x5ad95b){const _0x5baaca=new FConnectorShape(_0x2ae157,_0x3492c2,_0x5ad95b[_0x22916d(0x227)],this['_injector']);return this['_preloadShapeProperties'](_0x5baaca,_0x2ae157,_0x3492c2,_0x5ad95b['drawId']),_0x5baaca;}return new FConnectorShape(_0x2ae157,_0x3492c2,(0x0,_univerjs_core['generateRandomId'])(),this[_0x22916d(0x1f4)]);}['getShapes'](){const _0x58046d=_0x2ffec3,_0x58aa40=this['_injector'][_0x58046d(0x234)](_univerjs_sheets_drawing[_0x58046d(0x23b)]),_0x45175d=this[_0x58046d(0x1e9)]()['getUnitId'](),_0x554037=this['getSheetId'](),_0x395a2b=_0x58aa40['getDrawingData'](_0x45175d,_0x554037);if(!_0x395a2b)return[];const _0x14df61=[];for(const [_0x237f96,_0x2375e2]of Object[_0x58046d(0x1f9)](_0x395a2b))if(_0x2375e2&&_0x2375e2[_0x58046d(0x1e4)]===_univerjs_core[_0x58046d(0x1d6)][_0x58046d(0x20d)]){const _0x5e9580=new FShape(_0x45175d,_0x554037,_0x237f96,this[_0x58046d(0x1f4)]);this[_0x58046d(0x1d4)](_0x5e9580,_0x45175d,_0x554037,_0x237f96),_0x14df61[_0x58046d(0x1e7)](_0x5e9580);}return _0x14df61;}[_0x2ffec3(0x211)](_0x5f5837){const _0x4ab94a=_0x2ffec3,{unitId:_0x3b94eb,subUnitId:_0x5abaf9,drawId:_0x56c15a}=_0x5f5837;return this[_0x4ab94a(0x1e0)][_0x4ab94a(0x1fa)](_univerjs_sheets_drawing['RemoveSheetDrawingCommand']['id'],{'unitId':_0x3b94eb,'drawings':[{'unitId':_0x3b94eb,'subUnitId':_0x5abaf9,'drawingId':_0x56c15a,'drawingType':_univerjs_core[_0x4ab94a(0x1d6)][_0x4ab94a(0x20d)]}]});}async[_0x2ffec3(0x1e2)](_0x192161){const _0x457f11=_0x2ffec3,{connector:_0x414499,startTarget:_0x445909,endTarget:_0x24f5b2}=_0x192161;if(!_0x445909&&!_0x24f5b2)return![];const _0xf8c9e3=this['getWorkbook']()[_0x457f11(0x203)](),_0xf73122=this[_0x457f11(0x1b5)](),_0x41a5f8=this[_0x457f11(0x1f4)]['get'](_univerjs_pro_sheets_shape['SheetsShapeService']),_0x5c7812=this[_0x457f11(0x1f4)]['get'](_univerjs_drawing[_0x457f11(0x1c1)]),_0x3f0a14=_0x41a5f8[_0x457f11(0x1b2)](_0xf8c9e3,_0xf73122,_0x414499[_0x457f11(0x227)]);if(!_0x3f0a14)return![];const _0x3bc632=_0x3f0a14[_0x457f11(0x1ac)](),_0x2fdacd=_0x3f0a14[_0x457f11(0x236)](),_0x7cbf3a={};for(const _0x9822f0 of _0x3f0a14['getAdjustNames']()){const _0x177c0d=_0x3f0a14[_0x457f11(0x1ca)](_0x9822f0);if(_0x177c0d!==void 0x0)_0x7cbf3a[_0x9822f0]=_0x177c0d;}const {startInfo:_0x3e3792,endInfo:_0x1ab492}=this[_0x457f11(0x1b3)](_0xf8c9e3,_0xf73122,_0x414499,_0x3f0a14,_0x445909,_0x24f5b2,_0x41a5f8,_0x5c7812,_0x2fdacd);if(!_0x3e3792||!_0x1ab492)return![];const _0x482c3c=(0x0,_univerjs_pro_engine_shape['computeConnectorRouteLayout'])((0x0,_univerjs_pro_engine_shape['routeConnectorLineShape'])(_0x3e3792,_0x1ab492,_0x3bc632),_0x3bc632),_0x3565cf={};if(_0x445909)_0x3565cf[_0x457f11(0x22b)]={'shapeId':_0x445909[_0x457f11(0x21b)]['drawId'],'cxnIndex':_0x445909[_0x457f11(0x1b1)]};else{if(_0x2fdacd===null||_0x2fdacd===void 0x0?void 0x0:_0x2fdacd[_0x457f11(0x22b)])_0x3565cf[_0x457f11(0x22b)]=_0x2fdacd['from'];}if(_0x24f5b2)_0x3565cf['to']={'shapeId':_0x24f5b2[_0x457f11(0x21b)][_0x457f11(0x227)],'cxnIndex':_0x24f5b2['connectionSiteIndex']};else{if(_0x2fdacd===null||_0x2fdacd===void 0x0?void 0x0:_0x2fdacd['to'])_0x3565cf['to']=_0x2fdacd['to'];}return this[_0x457f11(0x1e0)][_0x457f11(0x1fa)](_univerjs_pro_sheets_shape['UpdateConnectorRelationCommand']['id'],{'unitId':_0xf8c9e3,'subUnitId':_0xf73122,'connectorShapeId':_0x414499[_0x457f11(0x227)],'width':_0x482c3c[_0x457f11(0x1c8)][_0x457f11(0x1e6)],'height':_0x482c3c['worldRect'][_0x457f11(0x1d2)],'left':_0x482c3c[_0x457f11(0x1c8)][_0x457f11(0x1c9)],'top':_0x482c3c['worldRect'][_0x457f11(0x1eb)],'flipX':_0x482c3c[_0x457f11(0x1c8)][_0x457f11(0x1fd)]||![],'flipY':_0x482c3c[_0x457f11(0x1c8)][_0x457f11(0x20e)]||![],'oldAdjustValues':_0x7cbf3a,'newAdjustValues':_0x482c3c['adjustValues'],'newLineType':_0x482c3c[_0x457f11(0x213)],'oldLineType':_0x3bc632,'rotation':_0x482c3c[_0x457f11(0x1fb)],'oldRelation':_0x2fdacd,'newRelation':_0x3565cf});}[_0x2ffec3(0x1d4)](_0x5ca3ec,_0x59b3c8,_0x44d61f,_0x3555ab){const _0x314b43=_0x2ffec3,_0x5e49a6=this['_injector']['get'](_univerjs_drawing[_0x314b43(0x1c1)])[_0x314b43(0x212)]({'unitId':_0x59b3c8,'subUnitId':_0x44d61f,'drawingId':_0x3555ab});if(_0x5e49a6===null||_0x5e49a6===void 0x0?void 0x0:_0x5e49a6['transform']){var _0x496830,_0x28adb5,_0x2e0d73,_0x20bbaa;_0x5ca3ec['x']=(_0x496830=_0x5e49a6[_0x314b43(0x1cd)][_0x314b43(0x1c9)])!==null&&_0x496830!==void 0x0?_0x496830:0x0,_0x5ca3ec['y']=(_0x28adb5=_0x5e49a6['transform'][_0x314b43(0x1eb)])!==null&&_0x28adb5!==void 0x0?_0x28adb5:0x0,_0x5ca3ec[_0x314b43(0x1e6)]=(_0x2e0d73=_0x5e49a6['transform']['width'])!==null&&_0x2e0d73!==void 0x0?_0x2e0d73:_0x5ca3ec[_0x314b43(0x1e6)],_0x5ca3ec[_0x314b43(0x1d2)]=(_0x20bbaa=_0x5e49a6[_0x314b43(0x1cd)][_0x314b43(0x1d2)])!==null&&_0x20bbaa!==void 0x0?_0x20bbaa:_0x5ca3ec[_0x314b43(0x1d2)];}const _0x2069de=this[_0x314b43(0x1f4)][_0x314b43(0x234)](_univerjs_pro_sheets_shape[_0x314b43(0x1ff)])[_0x314b43(0x1b2)](_0x59b3c8,_0x44d61f,_0x3555ab);if(_0x2069de){_0x5ca3ec['shapeType']=_0x2069de['getShapeType']();const _0x2171c5=_0x2069de['getShapeData']();if(_0x2171c5)_0x5ca3ec[_0x314b43(0x1ef)]=JSON[_0x314b43(0x1c5)](JSON[_0x314b43(0x1e1)](_0x2171c5));}}['_resolveEndpoints'](_0x1ed238,_0x13dd3c,_0x2f04ff,_0x2001e4,_0x10fa30,_0x3acb1e,_0x509d96,_0x1478e8,_0x4bc141){const _0x111a7e=_0x2ffec3;let _0x52afea=null,_0xb35596=null;if(_0x10fa30)_0x52afea=computeConnectionPointInfo(_0x1ed238,_0x13dd3c,_0x10fa30[_0x111a7e(0x21b)][_0x111a7e(0x227)],_0x10fa30[_0x111a7e(0x1b1)],_0x509d96,_0x1478e8);if(_0x3acb1e)_0xb35596=computeConnectionPointInfo(_0x1ed238,_0x13dd3c,_0x3acb1e[_0x111a7e(0x21b)][_0x111a7e(0x227)],_0x3acb1e[_0x111a7e(0x1b1)],_0x509d96,_0x1478e8);if(!_0x52afea)_0x52afea=this[_0x111a7e(0x1bd)](_0x1ed238,_0x13dd3c,_0x2f04ff[_0x111a7e(0x227)],!![],_0xb35596,_0x4bc141===null||_0x4bc141===void 0x0?void 0x0:_0x4bc141[_0x111a7e(0x22b)],_0x509d96,_0x1478e8);if(!_0xb35596)_0xb35596=this[_0x111a7e(0x1bd)](_0x1ed238,_0x13dd3c,_0x2f04ff[_0x111a7e(0x227)],![],_0x52afea,_0x4bc141===null||_0x4bc141===void 0x0?void 0x0:_0x4bc141['to'],_0x509d96,_0x1478e8);return{'startInfo':_0x52afea,'endInfo':_0xb35596};}[_0x2ffec3(0x1bd)](_0x2add09,_0x44a59b,_0x51b94a,_0x5ab7ad,_0x356251,_0x131ee9,_0x119271,_0x1ca4c5){const _0x2f9f39=_0x2ffec3;if(_0x131ee9){const _0x59942e=computeConnectionPointInfo(_0x2add09,_0x44a59b,_0x131ee9[_0x2f9f39(0x1ce)],_0x131ee9[_0x2f9f39(0x235)],_0x119271,_0x1ca4c5);if(_0x59942e)return _0x59942e;}if(!_0x356251)return null;return computeFreeEndpointInfo(_0x2add09,_0x44a59b,_0x51b94a,_0x5ab7ad,_0x356251,_0x119271,_0x1ca4c5);}};function _0x1762(){const _0x289783=['cxnIndex','getShapeRelation','SetShapeDrawingDataCommand','setStartArrowSize','newConnector','object','ISheetDrawingService','setAbsolutePosition','ShapeLineDashEnum','InsertShapeCommand','getEndConnectInfo','getShapeType','getDrawingPoints','Shape\x20type\x20is\x20required.\x20Please\x20call\x20setShapeType()\x20before\x20build().','setShapeGradientFill','abs','connectionSiteIndex','getShapeModel','_resolveEndpoints','1bVLFPy','getSheetId','toStringTag','FEnum','setPosition','getShapeId','getStartConnectInfo','updateContext','length','_resolveExistingOrFreeEndpoint','dashType','unitId','relation','IDrawingManagerService','setShapeSolidFill','getBasicShapeRotateBound','180ANYmpl','parse','getPosition','getShapeData','worldRect','left','getAdjustValueByName','setStrokeWidth','newShape','transform','shapeId','colorStops\x20is\x20required\x20and\x20should\x20contain\x20at\x20least\x20one\x20color\x20stop.','getAdjustPoints','getSize','height','updateShape','_preloadShapeProperties','GradientFill','DrawingTypeEnum','index','646614ieTwxj','FShape','getConnectionSites','call','type','gradientAngle','fillType','setStartArrowType','_commandService','stringify','connectShapes','Skeleton\x20for\x20unitId\x20','drawingType','iterator','width','push','ShapeLineCapEnum','getWorkbook','DEFAULT_SHAPE_HEIGHT','top','Module','stroke','ShapeTypeEnum','shapeData','ConnectorCoordinateTransform','convertPositionCellToSheetOverGrid','fill','setNoneFill','_injector','find','symbol','toPrimitive','setStrokeLineJoinType','entries','executeCommand','rotation','function','flipX','shapeType','SheetsShapeService','string','ensureSkeleton','33WaJejL','getUnitId','3912048qZuGME','4922824TtxSvX','isConnectorShape','point','getConnectionSiteList','isLineShape','ShapeArrowTypeEnum','672985EgmvHK','ang','DRAWING_SHAPE','flipY','default','NoFill','removeShape','getDrawingByParam','lineType','1650612aqfCpH','Invalid\x20shape\x20type\x20for\x20connector.\x20Received\x20','startArrow','prototype','ShapeLineTypeEnum','opacity','setShapeType','shape','subUnitId','gradientStops','SolidFill','color','keys','1271474NtJUjE','ShapeGradientTypeEnum','setEndArrowType','setStrokeLineType','ShapeFillEnum','gradientType','drawId','setStrokeColor','defineProperty','28688ZMtrWe','from','SheetSkeletonService','FWorksheet','endArrow','ShapeArrowSizeEnum','\x20and\x20subUnitId\x20','build','generateRandomId','ShapeLineJoinEnum','get'];_0x1762=function(){return _0x289783;};return _0x1762();}_univerjs_sheets_facade[_0x2ffec3(0x22d)]['extend'](FWorksheetShapeMixin),exports['FConnectorShape']=FConnectorShape,exports[_0x2ffec3(0x1d9)]=FShape;
|
|
1
|
+
const _0x5f28e4=_0x4b4a;function _0x4b4a(_0xdd7243,_0x3b2fc8){_0xdd7243=_0xdd7243-0x1ae;const _0xf4400c=_0xf440();let _0x4b4a13=_0xf4400c[_0xdd7243];return _0x4b4a13;}(function(_0x4e29a3,_0x1b47a5){const _0x2a377e=_0x4b4a,_0x28d00d=_0x4e29a3();while(!![]){try{const _0x54e6a8=-parseInt(_0x2a377e(0x1b8))/0x1*(-parseInt(_0x2a377e(0x1ff))/0x2)+-parseInt(_0x2a377e(0x1d1))/0x3*(-parseInt(_0x2a377e(0x22b))/0x4)+-parseInt(_0x2a377e(0x1b6))/0x5*(-parseInt(_0x2a377e(0x1d0))/0x6)+parseInt(_0x2a377e(0x224))/0x7+parseInt(_0x2a377e(0x225))/0x8*(-parseInt(_0x2a377e(0x223))/0x9)+-parseInt(_0x2a377e(0x1de))/0xa+-parseInt(_0x2a377e(0x239))/0xb;if(_0x54e6a8===_0x1b47a5)break;else _0x28d00d['push'](_0x28d00d['shift']());}catch(_0xd979ac){_0x28d00d['push'](_0x28d00d['shift']());}}}(_0xf440,0x2d9b3),Object['defineProperty'](exports,Symbol[_0x5f28e4(0x233)],{'value':_0x5f28e4(0x1b2)}));let _univerjs_pro_engine_shape=require('@univerjs-pro/engine-shape'),_univerjs_core_facade=require('@univerjs/core/facade'),_univerjs_pro_sheets_shape=require('@univerjs-pro/sheets-shape'),_univerjs_core=require('@univerjs/core'),_univerjs_drawing=require('@univerjs/drawing'),_univerjs_sheets=require('@univerjs/sheets'),_univerjs_sheets_drawing=require('@univerjs/sheets-drawing'),_univerjs_sheets_facade=require('@univerjs/sheets/facade');var FSheetsShapeEnumMixin=class extends _univerjs_core_facade[_0x5f28e4(0x1e7)]{get[_0x5f28e4(0x218)](){const _0x3c0706=_0x5f28e4;return _univerjs_pro_engine_shape[_0x3c0706(0x218)];}get['ShapeFillEnum'](){const _0x250f67=_0x5f28e4;return _univerjs_pro_engine_shape[_0x250f67(0x1c8)];}get[_0x5f28e4(0x20f)](){const _0x22ab7a=_0x5f28e4;return _univerjs_pro_engine_shape[_0x22ab7a(0x20f)];}get['ShapeLineTypeEnum'](){return _univerjs_pro_engine_shape['ShapeLineTypeEnum'];}get[_0x5f28e4(0x1f9)](){const _0x1d3ba3=_0x5f28e4;return _univerjs_pro_engine_shape[_0x1d3ba3(0x1f9)];}get[_0x5f28e4(0x1d2)](){return _univerjs_pro_engine_shape['ShapeLineCapEnum'];}get[_0x5f28e4(0x1d9)](){const _0x307143=_0x5f28e4;return _univerjs_pro_engine_shape[_0x307143(0x1d9)];}get[_0x5f28e4(0x213)](){const _0x36a7c5=_0x5f28e4;return _univerjs_pro_engine_shape[_0x36a7c5(0x213)];}get[_0x5f28e4(0x1ee)](){return _univerjs_pro_engine_shape['ShapeArrowSizeEnum'];}};_univerjs_core_facade[_0x5f28e4(0x1e7)][_0x5f28e4(0x20e)](FSheetsShapeEnumMixin);function _typeof(_0x4b6f77){'@babel/helpers - typeof';const _0x3c40a2=_0x5f28e4;return _typeof=_0x3c40a2(0x1e3)==typeof Symbol&&_0x3c40a2(0x1f1)==typeof Symbol[_0x3c40a2(0x1e4)]?function(_0xe5f408){return typeof _0xe5f408;}:function(_0x4ffe3f){const _0x2fe933=_0x3c40a2;return _0x4ffe3f&&_0x2fe933(0x1e3)==typeof Symbol&&_0x4ffe3f['constructor']===Symbol&&_0x4ffe3f!==Symbol[_0x2fe933(0x1ec)]?_0x2fe933(0x1f1):typeof _0x4ffe3f;},_typeof(_0x4b6f77);}function toPrimitive(_0x436e45,_0xced21a){const _0x2ad02c=_0x5f28e4;if(_0x2ad02c(0x1bb)!=_typeof(_0x436e45)||!_0x436e45)return _0x436e45;var _0xcb8c3=_0x436e45[Symbol['toPrimitive']];if(void 0x0!==_0xcb8c3){var _0x588504=_0xcb8c3[_0x2ad02c(0x23d)](_0x436e45,_0xced21a||_0x2ad02c(0x21c));if(_0x2ad02c(0x1bb)!=_typeof(_0x588504))return _0x588504;throw new TypeError(_0x2ad02c(0x20b));}return(_0x2ad02c(0x1f8)===_0xced21a?String:Number)(_0x436e45);}function toPropertyKey(_0x46d17e){const _0x53b6b5=_0x5f28e4;var _0x555df5=toPrimitive(_0x46d17e,_0x53b6b5(0x1f8));return _0x53b6b5(0x1f1)==_typeof(_0x555df5)?_0x555df5:_0x555df5+'';}function _defineProperty(_0x53e7ef,_0x4bfe99,_0x7a059a){const _0x36a84f=_0x5f28e4;return(_0x4bfe99=toPropertyKey(_0x4bfe99))in _0x53e7ef?Object[_0x36a84f(0x209)](_0x53e7ef,_0x4bfe99,{'value':_0x7a059a,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x53e7ef[_0x4bfe99]=_0x7a059a,_0x53e7ef;}var FShape=class{constructor(_0x45f6b2,_0x4ab7c8,_0x4efe34,_0x1b5452){const _0x296258=_0x5f28e4;_defineProperty(this,_0x296258(0x1cf),void 0x0),_defineProperty(this,'subUnitId',void 0x0),_defineProperty(this,_0x296258(0x1b1),void 0x0),_defineProperty(this,'x',0x0),_defineProperty(this,'y',0x0),_defineProperty(this,_0x296258(0x222),_univerjs_pro_sheets_shape[_0x296258(0x1f5)]),_defineProperty(this,'height',_univerjs_pro_sheets_shape[_0x296258(0x210)]),_defineProperty(this,'shapeType',void 0x0),_defineProperty(this,'shapeData',{}),_defineProperty(this,_0x296258(0x1f2),void 0x0),this[_0x296258(0x1cf)]=_0x45f6b2,this[_0x296258(0x1b0)]=_0x4ab7c8,this['drawId']=_0x4efe34||(0x0,_univerjs_core[_0x296258(0x21a)])(),this[_0x296258(0x1f2)]=_0x1b5452;}['setPosition'](_0x92929f,_0x5dc10a,_0x56d532,_0x137226){const _0x56b368=_0x5f28e4,_0x3f89f7=this[_0x56b368(0x1f2)]['get'](_univerjs_sheets[_0x56b368(0x22d)])[_0x56b368(0x220)](this['unitId'],this[_0x56b368(0x1b0)]);if(!_0x3f89f7)throw new Error(_0x56b368(0x23a)+this[_0x56b368(0x1cf)]+_0x56b368(0x20c)+this[_0x56b368(0x1b0)]+_0x56b368(0x232));const {transform:_0xfb957b}=(0x0,_univerjs_sheets['convertPositionCellToSheetOverGrid'])(this[_0x56b368(0x1cf)],this[_0x56b368(0x1b0)],{'row':_0x92929f,'column':_0x5dc10a,'rowOffset':_0x56d532,'columnOffset':_0x137226},0x1,0x1,_0x3f89f7);return this['x']=_0xfb957b['left'],this['y']=_0xfb957b[_0x56b368(0x226)],this;}[_0x5f28e4(0x1e1)](_0x54f4dd,_0x2819c1){return this['x']=_0x54f4dd,this['y']=_0x2819c1,this;}['setShapeType'](_0xfe1f89){const _0x35c1a6=_0x5f28e4;return this[_0x35c1a6(0x1ca)]=_0xfe1f89,this;}[_0x5f28e4(0x212)](_0x46f500,_0x4dcfe2){const _0x11450a=_0x5f28e4;if(!this[_0x11450a(0x235)][_0x11450a(0x21b)])this['shapeData'][_0x11450a(0x21b)]={};this[_0x11450a(0x235)][_0x11450a(0x21b)]['fillType']=_univerjs_pro_engine_shape[_0x11450a(0x1c8)][_0x11450a(0x1e9)];if(_0x46f500!==void 0x0)this[_0x11450a(0x235)][_0x11450a(0x21b)]['color']=_0x46f500;if(_0x4dcfe2!==void 0x0)this[_0x11450a(0x235)]['fill'][_0x11450a(0x22f)]=_0x4dcfe2;return this;}[_0x5f28e4(0x214)](_0x3c1c97,_0x5b3d7b,_0x35d5aa){const _0xa32d88=_0x5f28e4;if(_0x5b3d7b===void 0x0||_0x5b3d7b[_0xa32d88(0x1ef)]===0x0)throw new Error(_0xa32d88(0x23b));if(!this['shapeData'][_0xa32d88(0x21b)])this['shapeData'][_0xa32d88(0x21b)]={};this['shapeData'][_0xa32d88(0x21b)][_0xa32d88(0x217)]=_0x5b3d7b,this[_0xa32d88(0x235)][_0xa32d88(0x21b)]['fillType']=_univerjs_pro_engine_shape[_0xa32d88(0x1c8)][_0xa32d88(0x1c0)],this[_0xa32d88(0x235)]['fill'][_0xa32d88(0x1c9)]=_0x3c1c97;if(_0x35d5aa!==void 0x0)this[_0xa32d88(0x235)][_0xa32d88(0x21b)][_0xa32d88(0x1bf)]=_0x35d5aa;return this;}[_0x5f28e4(0x21e)](){const _0xa7af5d=_0x5f28e4;return this['shapeData'][_0xa7af5d(0x21b)]={'fillType':_univerjs_pro_engine_shape[_0xa7af5d(0x1c8)][_0xa7af5d(0x20d)]},this;}['setStrokeColor'](_0x4624c2){const _0x1e2df2=_0x5f28e4;if(!this[_0x1e2df2(0x235)]['stroke'])this['shapeData'][_0x1e2df2(0x1c5)]={};return this['shapeData'][_0x1e2df2(0x1c5)]['color']=_0x4624c2,this;}[_0x5f28e4(0x1e8)](_0x5ea8b2){const _0x4bc76d=_0x5f28e4;if(!this[_0x4bc76d(0x235)][_0x4bc76d(0x1c5)])this[_0x4bc76d(0x235)]['stroke']={};return this['shapeData'][_0x4bc76d(0x1c5)][_0x4bc76d(0x222)]=_0x5ea8b2,this;}[_0x5f28e4(0x1d5)](_0x5f56b9){const _0x3a77b8=_0x5f28e4;if(!this['shapeData'][_0x3a77b8(0x1c5)])this[_0x3a77b8(0x235)]['stroke']={};return this[_0x3a77b8(0x235)][_0x3a77b8(0x1c5)]['dashType']=_0x5f56b9,this;}[_0x5f28e4(0x1b3)](_0x501d5e){const _0x23c280=_0x5f28e4;if(!this[_0x23c280(0x235)]['stroke'])this[_0x23c280(0x235)]['stroke']={};return this[_0x23c280(0x235)][_0x23c280(0x1c5)][_0x23c280(0x20a)]=_0x501d5e,this;}['setStrokeLineCapType'](_0x262cff){const _0x9c8ae3=_0x5f28e4;if(!this[_0x9c8ae3(0x235)]['stroke'])this[_0x9c8ae3(0x235)][_0x9c8ae3(0x1c5)]={};return this[_0x9c8ae3(0x235)]['stroke'][_0x9c8ae3(0x227)]=_0x262cff,this;}[_0x5f28e4(0x204)](_0x2112b8){const _0x4c8068=_0x5f28e4;if(!this['shapeData'][_0x4c8068(0x1c5)])this[_0x4c8068(0x235)]['stroke']={};return this[_0x4c8068(0x235)][_0x4c8068(0x1c5)]['opacity']=_0x2112b8,this;}[_0x5f28e4(0x1e2)](_0x400f68){const _0x2cbe79=_0x5f28e4;if(!this[_0x2cbe79(0x235)]['stroke'])this[_0x2cbe79(0x235)][_0x2cbe79(0x1c5)]={};return this[_0x2cbe79(0x235)][_0x2cbe79(0x1c5)]['lineStrokeType']=_0x400f68,this;}[_0x5f28e4(0x1cc)](_0x6941c5){const _0x174c3a=_0x5f28e4;return this[_0x174c3a(0x222)]=_0x6941c5,this;}[_0x5f28e4(0x1c3)](_0x3ea71d){const _0x1c4640=_0x5f28e4;return this[_0x1c4640(0x21d)]=_0x3ea71d,this;}[_0x5f28e4(0x1bd)](){const _0x4c5b57=_0x5f28e4,_0x1d3d0f=this[_0x4c5b57(0x1f2)][_0x4c5b57(0x1b7)](_univerjs_pro_sheets_shape[_0x4c5b57(0x215)])[_0x4c5b57(0x1bc)](this[_0x4c5b57(0x1cf)],this[_0x4c5b57(0x1b0)],this['drawId']);if(_0x1d3d0f)return(0x0,_univerjs_pro_engine_shape[_0x4c5b57(0x1fc)])(_0x1d3d0f[_0x4c5b57(0x23c)]());if(this[_0x4c5b57(0x1ca)])return(0x0,_univerjs_pro_engine_shape[_0x4c5b57(0x1fc)])(this['shapeType']);return![];}['getConnectionSites'](){const _0x479939=_0x5f28e4,_0x10cd5d=this[_0x479939(0x1f2)]['get'](_univerjs_pro_sheets_shape[_0x479939(0x215)])[_0x479939(0x1bc)](this['unitId'],this[_0x479939(0x1b0)],this[_0x479939(0x1b1)]);if(!_0x10cd5d)return[];const _0x425bd2=this[_0x479939(0x1f2)][_0x479939(0x1b7)](_univerjs_drawing[_0x479939(0x208)])[_0x479939(0x1be)]({'unitId':this[_0x479939(0x1cf)],'subUnitId':this[_0x479939(0x1b0)],'drawingId':this[_0x479939(0x1b1)]});if(!(_0x425bd2===null||_0x425bd2===void 0x0?void 0x0:_0x425bd2['transform']))return[];const {width:width=0x0,height:height=0x0}=_0x425bd2['transform'];return _0x10cd5d[_0x479939(0x229)]({'width':width,'height':height}),_0x10cd5d[_0x479939(0x1ae)]();}['getAdjustPoints'](){const _0x4f5dc8=_0x5f28e4,_0x2556eb=this[_0x4f5dc8(0x1f2)][_0x4f5dc8(0x1b7)](_univerjs_pro_sheets_shape[_0x4f5dc8(0x215)])['getShapeModel'](this[_0x4f5dc8(0x1cf)],this[_0x4f5dc8(0x1b0)],this[_0x4f5dc8(0x1b1)]);if(!_0x2556eb)return[];const _0x3bbd12=this[_0x4f5dc8(0x1f2)]['get'](_univerjs_drawing[_0x4f5dc8(0x208)])[_0x4f5dc8(0x1be)]({'unitId':this[_0x4f5dc8(0x1cf)],'subUnitId':this['subUnitId'],'drawingId':this[_0x4f5dc8(0x1b1)]});if(!(_0x3bbd12===null||_0x3bbd12===void 0x0?void 0x0:_0x3bbd12[_0x4f5dc8(0x1e6)]))return[];const {width:width=0x0,height:height=0x0}=_0x3bbd12[_0x4f5dc8(0x1e6)];return _0x2556eb[_0x4f5dc8(0x229)]({'width':width,'height':height}),_0x2556eb[_0x4f5dc8(0x1b5)]();}[_0x5f28e4(0x1c6)](){const _0x3fa437=_0x5f28e4,_0x4c45ff=this['_injector']['get'](_univerjs_pro_sheets_shape[_0x3fa437(0x215)])[_0x3fa437(0x1bc)](this['unitId'],this[_0x3fa437(0x1b0)],this[_0x3fa437(0x1b1)]);if(!_0x4c45ff)return[];if(!(0x0,_univerjs_pro_engine_shape['isConnectorShape'])(_0x4c45ff[_0x3fa437(0x23c)]()))return[];const _0x1310cb=this[_0x3fa437(0x1f2)][_0x3fa437(0x1b7)](_univerjs_drawing[_0x3fa437(0x208)])['getDrawingByParam']({'unitId':this[_0x3fa437(0x1cf)],'subUnitId':this['subUnitId'],'drawingId':this[_0x3fa437(0x1b1)]});if(!(_0x1310cb===null||_0x1310cb===void 0x0?void 0x0:_0x1310cb[_0x3fa437(0x1e6)]))return[];const {width:width=0x0,height:height=0x0}=_0x1310cb[_0x3fa437(0x1e6)];return _0x4c45ff[_0x3fa437(0x229)]({'width':width,'height':height}),_0x4c45ff['getConnectorLinePoints']();}['getStartConnectInfo'](){const _0x11c935=_0x5f28e4;var _0x36edd1;const _0x455036=this['_injector']['get'](_univerjs_pro_sheets_shape[_0x11c935(0x215)])[_0x11c935(0x1bc)](this[_0x11c935(0x1cf)],this[_0x11c935(0x1b0)],this[_0x11c935(0x1b1)]);if(!_0x455036)return null;return(_0x36edd1=_0x455036[_0x11c935(0x1db)]())!==null&&_0x36edd1!==void 0x0?_0x36edd1:null;}[_0x5f28e4(0x1fa)](){const _0x134788=_0x5f28e4;var _0x5b008e;const _0x250e8e=this['_injector'][_0x134788(0x1b7)](_univerjs_pro_sheets_shape['SheetsShapeService'])[_0x134788(0x1bc)](this[_0x134788(0x1cf)],this[_0x134788(0x1b0)],this[_0x134788(0x1b1)]);if(!_0x250e8e)return null;return(_0x5b008e=_0x250e8e['getEndConnectInfo']())!==null&&_0x5b008e!==void 0x0?_0x5b008e:null;}[_0x5f28e4(0x1df)](){const _0x4792f5=_0x5f28e4;var _0xf71132,_0x26f1e2;if(!this[_0x4792f5(0x1ca)])throw new Error('Shape\x20type\x20is\x20required.\x20Please\x20call\x20setShapeType()\x20before\x20build().');if(this['x']===0x0||this['y']===0x0){const _0x2f090b=this[_0x4792f5(0x1f2)][_0x4792f5(0x1b7)](_univerjs_sheets[_0x4792f5(0x22d)])[_0x4792f5(0x220)](this[_0x4792f5(0x1cf)],this[_0x4792f5(0x1b0)]);if(!_0x2f090b)throw new Error(_0x4792f5(0x23a)+this[_0x4792f5(0x1cf)]+_0x4792f5(0x20c)+this[_0x4792f5(0x1b0)]+_0x4792f5(0x232));const {transform:_0x4b1f59}=(0x0,_univerjs_sheets['convertPositionCellToSheetOverGrid'])(this[_0x4792f5(0x1cf)],this[_0x4792f5(0x1b0)],{'row':0x1,'column':0x1,'rowOffset':0x0,'columnOffset':0x0},0x1,0x1,_0x2f090b);this['x']=this['x']>0x0?this['x']:_0x4b1f59[_0x4792f5(0x21f)],this['y']=this['y']>0x0?this['y']:_0x4b1f59[_0x4792f5(0x226)];}return this[_0x4792f5(0x222)]=(_0xf71132=this[_0x4792f5(0x222)])!==null&&_0xf71132!==void 0x0?_0xf71132:_univerjs_pro_sheets_shape[_0x4792f5(0x1f5)],this[_0x4792f5(0x21d)]=(_0x26f1e2=this[_0x4792f5(0x21d)])!==null&&_0x26f1e2!==void 0x0?_0x26f1e2:_univerjs_pro_sheets_shape[_0x4792f5(0x210)],{'unitId':this[_0x4792f5(0x1cf)],'subUnitId':this[_0x4792f5(0x1b0)],'shapeId':this[_0x4792f5(0x1b1)],'shapeType':this[_0x4792f5(0x1ca)],'shapeData':Object[_0x4792f5(0x1ed)](this['shapeData'])['length']>0x0?this[_0x4792f5(0x235)]:void 0x0,'x':this['x'],'y':this['y'],'width':this[_0x4792f5(0x222)],'height':this[_0x4792f5(0x21d)]};}[_0x5f28e4(0x1e0)](){const _0x42676c=_0x5f28e4;return this[_0x42676c(0x1b1)];}[_0x5f28e4(0x23c)](){return this['shapeType'];}[_0x5f28e4(0x1dc)](){const _0x5156de=_0x5f28e4;return this[_0x5156de(0x235)];}[_0x5f28e4(0x1d7)](){return{'x':this['x'],'y':this['y']};}[_0x5f28e4(0x1ba)](){const _0x127073=_0x5f28e4;return{'width':this[_0x127073(0x222)],'height':this['height']};}},FConnectorShape=class extends FShape{constructor(_0x3b17e1,_0x4b81a4,_0x11f84a,_0x5e0865){const _0x232041=_0x5f28e4;super(_0x3b17e1,_0x4b81a4,_0x11f84a,_0x5e0865),_defineProperty(this,_0x232041(0x235),{});}[_0x5f28e4(0x221)](_0xbe77d8){const _0x19e913=_0x5f28e4;if(!(0x0,_univerjs_pro_engine_shape[_0x19e913(0x1fc)])(_0xbe77d8))throw new Error(_0x19e913(0x1f6)+_0xbe77d8+',\x20but\x20expected\x20a\x20connector\x20shape\x20type.');return super[_0x19e913(0x221)](_0xbe77d8),this;}[_0x5f28e4(0x219)](_0x21f57d){const _0x31abed=_0x5f28e4;var _0xc758f,_0x4efc6e;if(!((_0xc758f=this[_0x31abed(0x235)])===null||_0xc758f===void 0x0?void 0x0:_0xc758f['ln']))this[_0x31abed(0x235)]['ln']={};if(!((_0x4efc6e=this[_0x31abed(0x235)])===null||_0x4efc6e===void 0x0||(_0x4efc6e=_0x4efc6e['ln'])===null||_0x4efc6e===void 0x0?void 0x0:_0x4efc6e[_0x31abed(0x200)]))this[_0x31abed(0x235)]['ln'][_0x31abed(0x200)]={};return this[_0x31abed(0x235)]['ln'][_0x31abed(0x200)]['type']=_0x21f57d,this;}['setEndArrowType'](_0x245e0b){const _0x1e3a83=_0x5f28e4;var _0x5a84a1,_0x56b15d;if(!((_0x5a84a1=this[_0x1e3a83(0x235)])===null||_0x5a84a1===void 0x0?void 0x0:_0x5a84a1['ln']))this[_0x1e3a83(0x235)]['ln']={};if(!((_0x56b15d=this['shapeData'])===null||_0x56b15d===void 0x0||(_0x56b15d=_0x56b15d['ln'])===null||_0x56b15d===void 0x0?void 0x0:_0x56b15d['endArrow']))this[_0x1e3a83(0x235)]['ln'][_0x1e3a83(0x1c7)]={};return this['shapeData']['ln'][_0x1e3a83(0x1c7)][_0x1e3a83(0x216)]=_0x245e0b,this;}['setStartArrowSize'](_0x29afd1){const _0x4f1c6e=_0x5f28e4;var _0x25a5dc,_0x24201e;if(!((_0x25a5dc=this[_0x4f1c6e(0x235)])===null||_0x25a5dc===void 0x0?void 0x0:_0x25a5dc['ln']))this[_0x4f1c6e(0x235)]['ln']={};if(!((_0x24201e=this[_0x4f1c6e(0x235)])===null||_0x24201e===void 0x0||(_0x24201e=_0x24201e['ln'])===null||_0x24201e===void 0x0?void 0x0:_0x24201e[_0x4f1c6e(0x200)]))this[_0x4f1c6e(0x235)]['ln'][_0x4f1c6e(0x200)]={};return this[_0x4f1c6e(0x235)]['ln'][_0x4f1c6e(0x200)][_0x4f1c6e(0x237)]=_0x29afd1,this;}[_0x5f28e4(0x1c1)](_0x1ff0ba){const _0x1231e6=_0x5f28e4;var _0x5de6ff,_0x10434b;if(!((_0x5de6ff=this[_0x1231e6(0x235)])===null||_0x5de6ff===void 0x0?void 0x0:_0x5de6ff['ln']))this['shapeData']['ln']={};if(!((_0x10434b=this['shapeData'])===null||_0x10434b===void 0x0||(_0x10434b=_0x10434b['ln'])===null||_0x10434b===void 0x0?void 0x0:_0x10434b[_0x1231e6(0x1c7)]))this['shapeData']['ln'][_0x1231e6(0x1c7)]={};return this['shapeData']['ln'][_0x1231e6(0x1c7)][_0x1231e6(0x237)]=_0x1ff0ba,this;}[_0x5f28e4(0x1df)](){const _0xb5e9d0=_0x5f28e4;return super[_0xb5e9d0(0x1df)]();}[_0x5f28e4(0x1fa)](){const _0x308e93=_0x5f28e4;var _0x72d2af;return((_0x72d2af=this['shapeData'])===null||_0x72d2af===void 0x0||(_0x72d2af=_0x72d2af[_0x308e93(0x1f0)])===null||_0x72d2af===void 0x0?void 0x0:_0x72d2af['to'])||null;}[_0x5f28e4(0x1db)](){const _0x949489=_0x5f28e4;var _0x1e1018;return((_0x1e1018=this[_0x949489(0x235)])===null||_0x1e1018===void 0x0||(_0x1e1018=_0x1e1018['relation'])===null||_0x1e1018===void 0x0?void 0x0:_0x1e1018[_0x949489(0x228)])||null;}};function computeConnectionPointInfo(_0x14e104,_0x3505e2,_0x2b080b,_0x381a0a,_0x204365,_0x4fc939){const _0x5e3e24=_0x5f28e4,_0x2a48b1=_0x204365[_0x5e3e24(0x1bc)](_0x14e104,_0x3505e2,_0x2b080b);if(!_0x2a48b1)return null;const _0x31cd40=_0x4fc939['getDrawingByParam']({'unitId':_0x14e104,'subUnitId':_0x3505e2,'drawingId':_0x2b080b});if(!(_0x31cd40===null||_0x31cd40===void 0x0?void 0x0:_0x31cd40[_0x5e3e24(0x1e6)]))return null;const {left:left=0x0,top:top=0x0,width:width=0x0,height:height=0x0,flipX:flipX=![],flipY:flipY=![],angle:_0x119406}=_0x31cd40[_0x5e3e24(0x1e6)];_0x2a48b1[_0x5e3e24(0x229)]({'width':width,'height':height});const _0x52a21f=_0x2a48b1[_0x5e3e24(0x1ae)]()['find'](_0x13608b=>_0x13608b['index']===_0x381a0a);if(!_0x52a21f)return null;let _0x2949c0=flipX?width-_0x52a21f['x']:_0x52a21f['x'],_0x493c4b=flipY?height-_0x52a21f['y']:_0x52a21f['y'];if(_0x119406&&_0x119406!==0x0){const _0x59bf55=_0x119406*Math['PI']/0xb4,_0xce44e3=Math[_0x5e3e24(0x1da)](_0x59bf55),_0x4ae554=Math['sin'](_0x59bf55),_0x2178a1=width/0x2,_0x5a62da=height/0x2,_0x3a02cd=_0x2949c0-_0x2178a1,_0x19479c=_0x493c4b-_0x5a62da;_0x2949c0=_0x2178a1+_0x3a02cd*_0xce44e3-_0x19479c*_0x4ae554,_0x493c4b=_0x5a62da+_0x3a02cd*_0x4ae554+_0x19479c*_0xce44e3;}_0x2949c0+=left,_0x493c4b+=top;let _0x3c47e0=_0x52a21f['ang']/0xea60;if(flipX)_0x3c47e0=0xb4-_0x3c47e0;if(flipY)_0x3c47e0=-_0x3c47e0;_0x3c47e0+=_0x119406||0x0,_0x3c47e0=(_0x3c47e0%0x168+0x168)%0x168;const _0x36b91f=(0x0,_univerjs_pro_engine_shape[_0x5e3e24(0x1ea)])({'left':left,'top':top,'width':width,'height':height},_0x119406||0x0);return{'point':{'x':_0x2949c0,'y':_0x493c4b},'angle':_0x3c47e0,'bounds':_0x36b91f};}function calculateFreeEndpointAngle(_0x546dca,_0x4471b){const _0x4c1b83=_0x5f28e4,_0x56a7c8=_0x4471b['x']-_0x546dca['x'],_0x409ef7=_0x4471b['y']-_0x546dca['y'];if(Math['abs'](_0x56a7c8)>=Math[_0x4c1b83(0x22c)](_0x409ef7))return _0x56a7c8>=0x0?0xb4:0x0;return _0x409ef7>=0x0?0x10e:0x5a;}function _0xf440(){const _0x2f17af=['string','ShapeLineDashEnum','getEndConnectInfo','_resolveExistingOrFreeEndpoint','isConnectorShape','FConnectorShape','getUnitId','22214CQUsNa','startArrow','_resolveEndpoints','InsertShapeCommand','DRAWING_SHAPE','setStrokeOpacity','getShapes','FWorksheet','routeConnectorLineShape','IDrawingManagerService','defineProperty','lineJoinType','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','\x20and\x20subUnitId\x20','NoFill','extend','ShapeGradientTypeEnum','DEFAULT_SHAPE_HEIGHT','point','setShapeSolidFill','ShapeArrowTypeEnum','setShapeGradientFill','SheetsShapeService','type','gradientStops','ShapeTypeEnum','setStartArrowType','generateRandomId','fill','default','height','setNoneFill','left','ensureSkeleton','setShapeType','width','9aGwDIF','37135zDpuuG','1056360tIVsoc','top','capType','from','updateContext','flipX','382556ZrzEPl','abs','SheetSkeletonService','newConnector','opacity','shape','worldRect','\x20not\x20found','toStringTag','adjustValues','shapeData','removeShape','size','entries','4239774NElTWM','Skeleton\x20for\x20unitId\x20','colorStops\x20is\x20required\x20and\x20should\x20contain\x20at\x20least\x20one\x20color\x20stop.','getShapeType','call','getWorkbook','getConnectionSiteList','getDrawingData','subUnitId','drawId','Module','setStrokeLineJoinType','getSheetId','getDrawingPoints','25juBXYP','get','31zSsndW','executeCommand','getSize','object','getShapeModel','isLineShape','getDrawingByParam','gradientAngle','GradientFill','setEndArrowSize','_preloadShapeProperties','setHeight','getAdjustNames','stroke','getConnectorLinePoints','endArrow','ShapeFillEnum','gradientType','shapeType','flipY','setWidth','DrawingTypeEnum','UpdateConnectorRelationCommand','unitId','335970cjvJYq','6lmCYJt','ShapeLineCapEnum','SetShapeDrawingDataCommand','computeConnectorRouteLayout','setStrokeLineDashType','connectionSiteIndex','getPosition','newShape','ShapeLineJoinEnum','cos','getStartConnectInfo','getShapeData','getShapeRelation','1165930VPPeyB','build','getShapeId','setAbsolutePosition','setStrokeLineType','function','iterator','rotation','transform','FEnum','setStrokeWidth','SolidFill','getBasicShapeRotateBound','cxnIndex','prototype','keys','ShapeArrowSizeEnum','length','relation','symbol','_injector','drawingType','RemoveSheetDrawingCommand','DEFAULT_SHAPE_WIDTH','Invalid\x20shape\x20type\x20for\x20connector.\x20Received\x20','_commandService'];_0xf440=function(){return _0x2f17af;};return _0xf440();}function computeFreeEndpointInfo(_0x57dfaf,_0x1cf142,_0xd3ee96,_0x370556,_0x3aad75,_0x2ab7f0,_0x45a474){const _0x24ca62=_0x5f28e4,_0x474bc8=_0x2ab7f0[_0x24ca62(0x1bc)](_0x57dfaf,_0x1cf142,_0xd3ee96);if(!_0x474bc8)return null;const _0x223cc3=_0x45a474[_0x24ca62(0x1be)]({'unitId':_0x57dfaf,'subUnitId':_0x1cf142,'drawingId':_0xd3ee96});if(!(_0x223cc3===null||_0x223cc3===void 0x0?void 0x0:_0x223cc3[_0x24ca62(0x1e6)]))return null;const {left:left=0x0,top:top=0x0,width:width=0x0,height:height=0x0,flipX:flipX=![],flipY:flipY=![]}=_0x223cc3[_0x24ca62(0x1e6)];_0x474bc8[_0x24ca62(0x229)]({'width':width,'height':height});const _0x1c7b68=_0x474bc8[_0x24ca62(0x1c6)]();if(_0x1c7b68[_0x24ca62(0x1ef)]<0x2)return null;const _0x3000fd=_0x370556?_0x1c7b68[0x0]:_0x1c7b68[_0x1c7b68['length']-0x1],_0x2b94e5=new _univerjs_pro_engine_shape['ConnectorCoordinateTransform']({'left':left,'top':top,'width':width,'height':height,'flipX':flipX,'flipY':flipY})['localToWorld'](_0x3000fd);return{'point':_0x2b94e5,'angle':calculateFreeEndpointAngle(_0x3aad75[_0x24ca62(0x211)],_0x2b94e5),'bounds':{'left':_0x2b94e5['x'],'top':_0x2b94e5['y'],'width':0x0,'height':0x0}};}var FWorksheetShapeMixin=class extends _univerjs_sheets_facade[_0x5f28e4(0x206)]{async['insertShape'](_0x1de7bb){const _0x5a6905=_0x5f28e4,{unitId:_0xfae7d8,subUnitId:_0xad36c1,shapeId:_0x551c20,shapeType:_0x1d1738,shapeData:_0x6e1b04,x:_0x505e0d,y:_0x18c82c,width:_0x57ebe7,height:_0x2d141d}=_0x1de7bb;return this[_0x5a6905(0x1f7)][_0x5a6905(0x1b9)](_univerjs_pro_sheets_shape[_0x5a6905(0x202)]['id'],{'unitId':_0xfae7d8,'subUnitId':_0xad36c1,'shapeId':_0x551c20,'shapeType':_0x1d1738,'shapeData':_0x6e1b04,'position':{'x':_0x505e0d,'y':_0x18c82c},'width':_0x57ebe7,'height':_0x2d141d});}async['updateShape'](_0x577afc){const _0x5efa3f=_0x5f28e4,{unitId:_0x339f75,subUnitId:_0x1c52ad,shapeId:_0x2e00b6,shapeType:_0x34186d,shapeData:_0x431fd7,x:_0x30b49e,y:_0x370ecd,width:_0x12699e,height:_0x206a18}=_0x577afc;return this['_commandService'][_0x5efa3f(0x1b9)](_univerjs_pro_sheets_shape[_0x5efa3f(0x1d3)]['id'],{'unitId':_0x339f75,'subUnitId':_0x1c52ad,'shapeId':_0x2e00b6,'shapeType':_0x34186d,'shapeData':_0x431fd7,'position':{'x':_0x30b49e,'y':_0x370ecd},'width':_0x12699e,'height':_0x206a18});}[_0x5f28e4(0x1d8)](_0x1bb3d1){const _0x3b7ac5=_0x5f28e4,_0xcdfbb3=this['getWorkbook']()[_0x3b7ac5(0x1fe)](),_0x36e8d9=this[_0x3b7ac5(0x1b4)]();if(_0x1bb3d1){const _0x263683=new FShape(_0xcdfbb3,_0x36e8d9,_0x1bb3d1[_0x3b7ac5(0x1b1)],this[_0x3b7ac5(0x1f2)]);return this[_0x3b7ac5(0x1c2)](_0x263683,_0xcdfbb3,_0x36e8d9,_0x1bb3d1['drawId']),_0x263683;}return new FShape(_0xcdfbb3,_0x36e8d9,(0x0,_univerjs_core[_0x3b7ac5(0x21a)])(),this[_0x3b7ac5(0x1f2)]);}[_0x5f28e4(0x22e)](_0x2fbe6d){const _0x438fcd=_0x5f28e4,_0x4ed66d=this['getWorkbook']()[_0x438fcd(0x1fe)](),_0x29fb7f=this['getSheetId']();if(_0x2fbe6d){const _0x5140a1=new FConnectorShape(_0x4ed66d,_0x29fb7f,_0x2fbe6d['drawId'],this['_injector']);return this['_preloadShapeProperties'](_0x5140a1,_0x4ed66d,_0x29fb7f,_0x2fbe6d[_0x438fcd(0x1b1)]),_0x5140a1;}return new FConnectorShape(_0x4ed66d,_0x29fb7f,(0x0,_univerjs_core[_0x438fcd(0x21a)])(),this[_0x438fcd(0x1f2)]);}[_0x5f28e4(0x205)](){const _0x402195=_0x5f28e4,_0x2ea201=this['_injector'][_0x402195(0x1b7)](_univerjs_sheets_drawing['ISheetDrawingService']),_0x3d7043=this[_0x402195(0x23e)]()[_0x402195(0x1fe)](),_0x32cb47=this[_0x402195(0x1b4)](),_0x5ee2f1=_0x2ea201[_0x402195(0x1af)](_0x3d7043,_0x32cb47);if(!_0x5ee2f1)return[];const _0x1227c2=[];for(const [_0x4cd201,_0xd4f01]of Object[_0x402195(0x238)](_0x5ee2f1))if(_0xd4f01&&_0xd4f01[_0x402195(0x1f3)]===_univerjs_core['DrawingTypeEnum']['DRAWING_SHAPE']){const _0x191526=new FShape(_0x3d7043,_0x32cb47,_0x4cd201,this[_0x402195(0x1f2)]);this[_0x402195(0x1c2)](_0x191526,_0x3d7043,_0x32cb47,_0x4cd201),_0x1227c2['push'](_0x191526);}return _0x1227c2;}[_0x5f28e4(0x236)](_0x1d16c9){const _0x3f0bb6=_0x5f28e4,{unitId:_0x54e449,subUnitId:_0x5c55d7,drawId:_0xf1dcfb}=_0x1d16c9;return this['_commandService']['executeCommand'](_univerjs_sheets_drawing[_0x3f0bb6(0x1f4)]['id'],{'unitId':_0x54e449,'drawings':[{'unitId':_0x54e449,'subUnitId':_0x5c55d7,'drawingId':_0xf1dcfb,'drawingType':_univerjs_core[_0x3f0bb6(0x1cd)][_0x3f0bb6(0x203)]}]});}async['connectShapes'](_0x1d84a0){const _0x4b6a5f=_0x5f28e4,{connector:_0x3c1f59,startTarget:_0x4bde99,endTarget:_0x508e63}=_0x1d84a0;if(!_0x4bde99&&!_0x508e63)return![];const _0x2951cc=this['getWorkbook']()[_0x4b6a5f(0x1fe)](),_0x11a345=this[_0x4b6a5f(0x1b4)](),_0x1edf7b=this['_injector'][_0x4b6a5f(0x1b7)](_univerjs_pro_sheets_shape[_0x4b6a5f(0x215)]),_0x50a0bc=this['_injector'][_0x4b6a5f(0x1b7)](_univerjs_drawing[_0x4b6a5f(0x208)]),_0x50abc8=_0x1edf7b[_0x4b6a5f(0x1bc)](_0x2951cc,_0x11a345,_0x3c1f59[_0x4b6a5f(0x1b1)]);if(!_0x50abc8)return![];const _0x36ef8e=_0x50abc8[_0x4b6a5f(0x23c)](),_0x1b18e8=_0x50abc8[_0x4b6a5f(0x1dd)](),_0x3f87be={};for(const _0x2ee263 of _0x50abc8[_0x4b6a5f(0x1c4)]()){const _0x234110=_0x50abc8['getAdjustValueByName'](_0x2ee263);if(_0x234110!==void 0x0)_0x3f87be[_0x2ee263]=_0x234110;}const {startInfo:_0x317991,endInfo:_0x5ab4b6}=this[_0x4b6a5f(0x201)](_0x2951cc,_0x11a345,_0x3c1f59,_0x50abc8,_0x4bde99,_0x508e63,_0x1edf7b,_0x50a0bc,_0x1b18e8);if(!_0x317991||!_0x5ab4b6)return![];const _0x3e0572=(0x0,_univerjs_pro_engine_shape[_0x4b6a5f(0x1d4)])((0x0,_univerjs_pro_engine_shape[_0x4b6a5f(0x207)])(_0x317991,_0x5ab4b6,_0x36ef8e),_0x36ef8e),_0x4d1078={};if(_0x4bde99)_0x4d1078[_0x4b6a5f(0x228)]={'shapeId':_0x4bde99[_0x4b6a5f(0x230)][_0x4b6a5f(0x1b1)],'cxnIndex':_0x4bde99[_0x4b6a5f(0x1d6)]};else{if(_0x1b18e8===null||_0x1b18e8===void 0x0?void 0x0:_0x1b18e8[_0x4b6a5f(0x228)])_0x4d1078['from']=_0x1b18e8['from'];}if(_0x508e63)_0x4d1078['to']={'shapeId':_0x508e63['shape']['drawId'],'cxnIndex':_0x508e63[_0x4b6a5f(0x1d6)]};else{if(_0x1b18e8===null||_0x1b18e8===void 0x0?void 0x0:_0x1b18e8['to'])_0x4d1078['to']=_0x1b18e8['to'];}return this[_0x4b6a5f(0x1f7)]['executeCommand'](_univerjs_pro_sheets_shape[_0x4b6a5f(0x1ce)]['id'],{'unitId':_0x2951cc,'subUnitId':_0x11a345,'connectorShapeId':_0x3c1f59['drawId'],'width':_0x3e0572[_0x4b6a5f(0x231)][_0x4b6a5f(0x222)],'height':_0x3e0572[_0x4b6a5f(0x231)][_0x4b6a5f(0x21d)],'left':_0x3e0572[_0x4b6a5f(0x231)][_0x4b6a5f(0x21f)],'top':_0x3e0572[_0x4b6a5f(0x231)][_0x4b6a5f(0x226)],'flipX':_0x3e0572['worldRect'][_0x4b6a5f(0x22a)]||![],'flipY':_0x3e0572['worldRect'][_0x4b6a5f(0x1cb)]||![],'oldAdjustValues':_0x3f87be,'newAdjustValues':_0x3e0572[_0x4b6a5f(0x234)],'newLineType':_0x3e0572['lineType'],'oldLineType':_0x36ef8e,'rotation':_0x3e0572[_0x4b6a5f(0x1e5)],'oldRelation':_0x1b18e8,'newRelation':_0x4d1078});}['_preloadShapeProperties'](_0x1b32e5,_0x260465,_0x3e1631,_0x2b5551){const _0x1a97e8=_0x5f28e4,_0x2bdbba=this['_injector'][_0x1a97e8(0x1b7)](_univerjs_drawing[_0x1a97e8(0x208)])['getDrawingByParam']({'unitId':_0x260465,'subUnitId':_0x3e1631,'drawingId':_0x2b5551});if(_0x2bdbba===null||_0x2bdbba===void 0x0?void 0x0:_0x2bdbba[_0x1a97e8(0x1e6)]){var _0x59c930,_0x53737d,_0x47544f,_0x3ad73a;_0x1b32e5['x']=(_0x59c930=_0x2bdbba['transform'][_0x1a97e8(0x21f)])!==null&&_0x59c930!==void 0x0?_0x59c930:0x0,_0x1b32e5['y']=(_0x53737d=_0x2bdbba[_0x1a97e8(0x1e6)][_0x1a97e8(0x226)])!==null&&_0x53737d!==void 0x0?_0x53737d:0x0,_0x1b32e5[_0x1a97e8(0x222)]=(_0x47544f=_0x2bdbba[_0x1a97e8(0x1e6)][_0x1a97e8(0x222)])!==null&&_0x47544f!==void 0x0?_0x47544f:_0x1b32e5['width'],_0x1b32e5[_0x1a97e8(0x21d)]=(_0x3ad73a=_0x2bdbba['transform'][_0x1a97e8(0x21d)])!==null&&_0x3ad73a!==void 0x0?_0x3ad73a:_0x1b32e5[_0x1a97e8(0x21d)];}const _0x3c7e51=this[_0x1a97e8(0x1f2)]['get'](_univerjs_pro_sheets_shape[_0x1a97e8(0x215)])[_0x1a97e8(0x1bc)](_0x260465,_0x3e1631,_0x2b5551);if(_0x3c7e51){_0x1b32e5[_0x1a97e8(0x1ca)]=_0x3c7e51[_0x1a97e8(0x23c)]();const _0x2cc53c=_0x3c7e51['getShapeData']();if(_0x2cc53c)_0x1b32e5[_0x1a97e8(0x235)]=JSON['parse'](JSON['stringify'](_0x2cc53c));}}[_0x5f28e4(0x201)](_0x425916,_0x3670c3,_0x37b979,_0x5823b4,_0x28ab5c,_0x4ff452,_0x53f328,_0x22d7cb,_0x4f7d68){const _0x112eef=_0x5f28e4;let _0x1c77a7=null,_0x857f6b=null;if(_0x28ab5c)_0x1c77a7=computeConnectionPointInfo(_0x425916,_0x3670c3,_0x28ab5c[_0x112eef(0x230)]['drawId'],_0x28ab5c[_0x112eef(0x1d6)],_0x53f328,_0x22d7cb);if(_0x4ff452)_0x857f6b=computeConnectionPointInfo(_0x425916,_0x3670c3,_0x4ff452['shape'][_0x112eef(0x1b1)],_0x4ff452[_0x112eef(0x1d6)],_0x53f328,_0x22d7cb);if(!_0x1c77a7)_0x1c77a7=this['_resolveExistingOrFreeEndpoint'](_0x425916,_0x3670c3,_0x37b979[_0x112eef(0x1b1)],!![],_0x857f6b,_0x4f7d68===null||_0x4f7d68===void 0x0?void 0x0:_0x4f7d68[_0x112eef(0x228)],_0x53f328,_0x22d7cb);if(!_0x857f6b)_0x857f6b=this[_0x112eef(0x1fb)](_0x425916,_0x3670c3,_0x37b979[_0x112eef(0x1b1)],![],_0x1c77a7,_0x4f7d68===null||_0x4f7d68===void 0x0?void 0x0:_0x4f7d68['to'],_0x53f328,_0x22d7cb);return{'startInfo':_0x1c77a7,'endInfo':_0x857f6b};}[_0x5f28e4(0x1fb)](_0x2dfc71,_0x471f0f,_0x3048f5,_0x55d672,_0x172888,_0x532ee5,_0x2ca457,_0xa22b2a){const _0x567813=_0x5f28e4;if(_0x532ee5){const _0x1c39d5=computeConnectionPointInfo(_0x2dfc71,_0x471f0f,_0x532ee5['shapeId'],_0x532ee5[_0x567813(0x1eb)],_0x2ca457,_0xa22b2a);if(_0x1c39d5)return _0x1c39d5;}if(!_0x172888)return null;return computeFreeEndpointInfo(_0x2dfc71,_0x471f0f,_0x3048f5,_0x55d672,_0x172888,_0x2ca457,_0xa22b2a);}};_univerjs_sheets_facade[_0x5f28e4(0x206)][_0x5f28e4(0x20e)](FWorksheetShapeMixin),exports[_0x5f28e4(0x1fd)]=FConnectorShape,exports['FShape']=FShape;
|
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x1420e0=_0x1b33;(function(_0x2f619f,_0x382120){const _0x22ed93=_0x1b33,_0x10a848=_0x2f619f();while(!![]){try{const _0x1aa6c7=parseInt(_0x22ed93(0x1ad))/0x1*(parseInt(_0x22ed93(0x224))/0x2)+-parseInt(_0x22ed93(0x1d8))/0x3+parseInt(_0x22ed93(0x1ae))/0x4+-parseInt(_0x22ed93(0x16e))/0x5+-parseInt(_0x22ed93(0x17c))/0x6*(-parseInt(_0x22ed93(0x1ab))/0x7)+parseInt(_0x22ed93(0x22f))/0x8*(-parseInt(_0x22ed93(0x1a8))/0x9)+-parseInt(_0x22ed93(0x1b7))/0xa*(-parseInt(_0x22ed93(0x19e))/0xb);if(_0x1aa6c7===_0x382120)break;else _0x10a848['push'](_0x10a848['shift']());}catch(_0x21cd83){_0x10a848['push'](_0x10a848['shift']());}}}(_0x5df6,0x67ebd),Object[_0x1420e0(0x1c8)](exports,Symbol[_0x1420e0(0x1a6)],{'value':_0x1420e0(0x1b0)}));let _univerjs_pro_engine_shape=require('@univerjs-pro/engine-shape'),_univerjs_core=require('@univerjs/core'),_univerjs_sheets=require('@univerjs/sheets'),_univerjs_sheets_drawing=require('@univerjs/sheets-drawing'),_univerjs_pro_license=require('@univerjs-pro/license'),_univerjs_drawing=require('@univerjs/drawing');const DEFAULT_SHAPE_WIDTH=0xc8,DEFAULT_SHAPE_HEIGHT=0xc8;function _typeof(_0x358621){'@babel/helpers - typeof';const _0x3fb051=_0x1420e0;return _typeof=_0x3fb051(0x1f1)==typeof Symbol&&_0x3fb051(0x1c2)==typeof Symbol[_0x3fb051(0x215)]?function(_0x5b8544){return typeof _0x5b8544;}:function(_0x35b1b5){const _0x3f80ca=_0x3fb051;return _0x35b1b5&&'function'==typeof Symbol&&_0x35b1b5[_0x3f80ca(0x190)]===Symbol&&_0x35b1b5!==Symbol[_0x3f80ca(0x1af)]?_0x3f80ca(0x1c2):typeof _0x35b1b5;},_typeof(_0x358621);}function toPrimitive(_0x54d9dc,_0xe72839){const _0x3ed171=_0x1420e0;if(_0x3ed171(0x1f9)!=_typeof(_0x54d9dc)||!_0x54d9dc)return _0x54d9dc;var _0x35e0df=_0x54d9dc[Symbol[_0x3ed171(0x16a)]];if(void 0x0!==_0x35e0df){var _0xab6c46=_0x35e0df[_0x3ed171(0x1b5)](_0x54d9dc,_0xe72839||_0x3ed171(0x202));if(_0x3ed171(0x1f9)!=_typeof(_0xab6c46))return _0xab6c46;throw new TypeError(_0x3ed171(0x1d5));}return(_0x3ed171(0x180)===_0xe72839?String:Number)(_0x54d9dc);}function toPropertyKey(_0x18a995){const _0x3d36af=_0x1420e0;var _0x47824c=toPrimitive(_0x18a995,_0x3d36af(0x180));return _0x3d36af(0x1c2)==_typeof(_0x47824c)?_0x47824c:_0x47824c+'';}function _defineProperty(_0x40f6a6,_0x45df40,_0x5759a){const _0x3a14d0=_0x1420e0;return(_0x45df40=toPropertyKey(_0x45df40))in _0x40f6a6?Object[_0x3a14d0(0x1c8)](_0x40f6a6,_0x45df40,{'value':_0x5759a,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x40f6a6[_0x45df40]=_0x5759a,_0x40f6a6;}var SheetShapeModelManager=class extends _univerjs_core[_0x1420e0(0x177)]{constructor(){const _0xc3d89a=_0x1420e0;super(),_defineProperty(this,'_shapes',new Map()),_defineProperty(this,_0xc3d89a(0x176),new Set()),_defineProperty(this,_0xc3d89a(0x168),new Set());}['addShape'](_0x26c406,_0x2012bf,_0x5a00f7){const _0x5b3e95=_0x1420e0,_0x597f52=new _univerjs_pro_engine_shape['ShapeModel'](_0x26c406,_0x2012bf,_0x5a00f7);this[_0x5b3e95(0x1b6)][_0x5b3e95(0x1ed)](_0x2012bf,_0x597f52);if((0x0,_univerjs_pro_engine_shape[_0x5b3e95(0x1fd)])(_0x26c406))this['_linesIds'][_0x5b3e95(0x1f6)](_0x2012bf);return _0x597f52;}[_0x1420e0(0x1d1)](_0x2c825d){const _0x3c17cb=_0x1420e0,_0x2a4ff4=[];for(const _0x519f72 of this[_0x3c17cb(0x176)]){const _0x4273ab=this['_shapes']['get'](_0x519f72);if(_0x4273ab){const _0x11cc56=_0x4273ab[_0x3c17cb(0x1c1)]();if(_0x11cc56){var _0x4b7214,_0x569048;if(((_0x4b7214=_0x11cc56[_0x3c17cb(0x1cc)])===null||_0x4b7214===void 0x0?void 0x0:_0x4b7214[_0x3c17cb(0x22d)])===_0x2c825d)_0x2a4ff4['push']({..._0x11cc56[_0x3c17cb(0x1cc)],'lineShapeId':_0x519f72,'isFrom':!![]});if(((_0x569048=_0x11cc56['to'])===null||_0x569048===void 0x0?void 0x0:_0x569048[_0x3c17cb(0x22d)])===_0x2c825d)_0x2a4ff4[_0x3c17cb(0x20e)]({..._0x11cc56['to'],'lineShapeId':_0x519f72,'isFrom':![]});}}}return _0x2a4ff4;}[_0x1420e0(0x179)](_0x51a018){const _0x26dcf9=_0x1420e0,_0x2354b1=this[_0x26dcf9(0x1b6)]['get'](_0x51a018);if(_0x2354b1)return _0x2354b1[_0x26dcf9(0x1c1)]();}[_0x1420e0(0x1db)](_0x401d94){const _0x1434dc=_0x1420e0,_0x119729=this[_0x1434dc(0x1b6)][_0x1434dc(0x213)](_0x401d94);if(_0x119729)return _0x119729[_0x1434dc(0x1db)]();}[_0x1420e0(0x18b)](_0x471836){const _0x1978da=_0x1420e0;return this[_0x1978da(0x1b6)]['has'](_0x471836);}[_0x1420e0(0x1a3)](_0x348e60){const _0x2baf07=_0x1420e0,_0xdf8036=this[_0x2baf07(0x1b6)][_0x2baf07(0x213)](_0x348e60);if(!_0xdf8036)return;if((0x0,_univerjs_pro_engine_shape[_0x2baf07(0x1fd)])(_0xdf8036[_0x2baf07(0x1db)]()))this[_0x2baf07(0x176)][_0x2baf07(0x1ff)](_0x348e60);this[_0x2baf07(0x1b6)][_0x2baf07(0x1ff)](_0x348e60);}['toJSON'](){const _0x529fd2=_0x1420e0,_0x5dcef0=[];return this[_0x529fd2(0x1b6)][_0x529fd2(0x22a)](_0xb338fd=>{const _0x3e38e5=_0x529fd2;_0x5dcef0['push'](_0xb338fd[_0x3e38e5(0x16b)]());}),_0x5dcef0;}[_0x1420e0(0x1bc)](_0x4009b9){const _0xf6fa07=_0x1420e0;for(const _0x10bf92 of _0x4009b9){const {id:_0x2e11ec,shapeType:_0xaa0a2e}=_0x10bf92,_0x1417a6=this[_0xf6fa07(0x1ef)](_0xaa0a2e,_0x2e11ec,_0x10bf92[_0xf6fa07(0x1b1)]);if(_0x1417a6&&_0x1417a6[_0xf6fa07(0x1a7)]())this[_0xf6fa07(0x176)]['add'](_0x2e11ec);}}[_0x1420e0(0x22c)](){const _0x33659c=_0x1420e0;if(this[_0x33659c(0x1d2)])return;this[_0x33659c(0x1b6)][_0x33659c(0x22a)](_0x5e52d3=>{const _0x409e66=_0x33659c;_0x5e52d3[_0x409e66(0x22c)]();}),this['_shapes'][_0x33659c(0x227)](),this[_0x33659c(0x176)][_0x33659c(0x227)](),this[_0x33659c(0x168)][_0x33659c(0x227)](),super[_0x33659c(0x22c)]();}};function __decorateParam(_0x52f759,_0x31c012){return function(_0x295cca,_0x578971){_0x31c012(_0x295cca,_0x578971,_0x52f759);};}function __decorate(_0x1c3f1d,_0xb68cd6,_0x5171e4,_0x2b6bf1){const _0x112065=_0x1420e0;var _0x897924=arguments[_0x112065(0x206)],_0x4d69a3=_0x897924<0x3?_0xb68cd6:_0x2b6bf1===null?_0x2b6bf1=Object[_0x112065(0x1ec)](_0xb68cd6,_0x5171e4):_0x2b6bf1,_0x55ec87;if(typeof Reflect===_0x112065(0x1f9)&&typeof Reflect[_0x112065(0x1c4)]===_0x112065(0x1f1))_0x4d69a3=Reflect[_0x112065(0x1c4)](_0x1c3f1d,_0xb68cd6,_0x5171e4,_0x2b6bf1);else{for(var _0x5cb865=_0x1c3f1d[_0x112065(0x206)]-0x1;_0x5cb865>=0x0;_0x5cb865--)if(_0x55ec87=_0x1c3f1d[_0x5cb865])_0x4d69a3=(_0x897924<0x3?_0x55ec87(_0x4d69a3):_0x897924>0x3?_0x55ec87(_0xb68cd6,_0x5171e4,_0x4d69a3):_0x55ec87(_0xb68cd6,_0x5171e4))||_0x4d69a3;}return _0x897924>0x3&&_0x4d69a3&&Object['defineProperty'](_0xb68cd6,_0x5171e4,_0x4d69a3),_0x4d69a3;}const SHEET_SHAPE_PLUGIN=_0x1420e0(0x172);function _0x5df6(){const _0x2304d8=['UniverLicensePlugin','SetDrawingApplyMutation','UpdateLineShapeResizeCommand','add','rotateEnabled','CommandType','object','entries','packageName','routeConnectorLineShape','isConnectorShape','updateContext','delete','sheet.command.update-connector-relation','SheetsShapeService','default','_sheetInterceptorService','params','angle','length','transformToDrawingPosition','getAdjustNames','getSheetCommandTarget','setShapeData','sheet.command.insert-shape','sequenceExecute','UniverInstanceType','push','UNIVER_SHEET','worldRect','getBasicShapeType','data','get','_addLineRerouteUpdates','iterator','flipX','_serializeShapeForUnit','_initSnapshot','merge','transformToAxisAlignPosition','rotation','0.21.0','getDrawingByParam','_ensureShapeModelManager','left','_commandService','InsertShapeCommand','find','pushUndoRedo','50VLeKLN','width','sheet.command.set-shape-drawing-data','clear','every','fill','forEach','removeLinePoints','dispose','shapeId','MUTATION','184BOhWfu','syncExecuteCommand','SheetSkeletonService','IConfigService','drawingType','sheet.command.update-line-shape-resize','position','_groupIds','getBatchUpdateOp','toPrimitive','toJSON','isFrom','getEndConnectInfo','1450655ndbNKM','getSkeleton','getDrawingData','redos','SHEET_SHAPE_PLUGIN','DrawingTypeEnum','INSERT','index','_linesIds','Disposable','filter','getLineShapeRelation','startY','_resourcesManagerService','57918EQqsPN','adjustValues','transform','disposeWithMe','string','SetSheetDrawingCommand','UniverSheetsShapePlugin','@univerjs-pro/sheets-shape','UpdateSheetsShapeTypeMutation','IUniverInstanceService','keys','onCommandExecute','ISheetDrawingService','sheet.mutation.insert-shape','preRedos','hasShape','Fail\x20to\x20get\x20shape\x20model,\x20get:\x20','SetSheetsShapeTextVerticalToggleCommand','InsertSheetDrawingCommand','cos','constructor','RemoveSheetDrawingCommand','getShapeTextData','DRAWING_SHAPE','touchDependencies','flipY','_sheetsShapeService','generateRandomId','COMMAND','lineShapeId','borderEnabled','Inject','relation','REMOVE','11wLIgBp','version','sheet.mutation.update-shape-data','sheet.mutation.update-shape-type','DependentOn','removeShape','getShapeModel','sheet.command.toggle-shape-flip','toStringTag','isLineShape','251658Tpbcdx','_shapeModelManagerMap','parse','196NdXYcY','DrawingApplyType','29675KxAaYj','2110780zGFsuU','prototype','Module','shapeData','cxnIndex','preUndos','sin','call','_shapes','5172740htCncm','ensureSkeleton','UPDATE','sheet.command.update-shape-type','sheets-shape.config','fromJSON','ToggleSheetsShapeFlipCommand','getStartConnectInfo','_addLineFollowShapeUpdates','IUndoRedoService','getShapeRelation','symbol','InsertSheetsShapeMutation','decorate','SheetInterceptorService','range','_config','defineProperty','undos','sheet.mutation.remove-shape','onStarting','from','_sheetSkeletonService','insertShape','_injector','interceptCommand','getBasicShapeRelation','_disposed','_initCommands','Plugin','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','pluginName','getCellIndexAndOffsetByPosition','2094630RzlwmS','SetShapeDrawingDataCommand','height','getShapeType','getShapeData','resizeEnabled','startX','_configService','type','_deserializeShapeForUnit','UpdateSheetsShapeTypeCommand','sheet.command.set-shape-rotate','top','setShapeType','assign','_drawingManagerService','getCellWithCoordByIndex','_initCommandInterceptor','ClearSheetDrawingTransformerOperation','DEFAULT_SHAPE_HEIGHT','getOwnPropertyDescriptor','set','_getConnectPointInfo','addShape','ICommandService','function','getShapeDataById'];_0x5df6=function(){return _0x2304d8;};return _0x5df6();}let SheetsShapeService=class SheetsShapeService extends _univerjs_core[_0x1420e0(0x177)]{constructor(_0x4d1272){const _0x23026b=_0x1420e0;super(),this['_resourcesManagerService']=_0x4d1272,_defineProperty(this,'_shapeModelManagerMap',new Map()),this[_0x23026b(0x218)]();}[_0x1420e0(0x21e)](_0x488e2d,_0x52275f){const _0xc9f119=_0x1420e0;let _0x37ac1c=this['_shapeModelManagerMap'][_0xc9f119(0x213)](_0x488e2d);!_0x37ac1c&&(_0x37ac1c=new Map(),this[_0xc9f119(0x1a9)][_0xc9f119(0x1ed)](_0x488e2d,_0x37ac1c));let _0x1d1168=_0x37ac1c[_0xc9f119(0x213)](_0x52275f);return!_0x1d1168&&(_0x1d1168=new SheetShapeModelManager(),_0x37ac1c[_0xc9f119(0x1ed)](_0x52275f,_0x1d1168)),_0x1d1168;}['insertShape'](_0x159ed0,_0x46e076,_0x4ea77f,_0x7f9541,_0x494e80){const _0x1c87d8=_0x1420e0;this[_0x1c87d8(0x21e)](_0x159ed0,_0x46e076)[_0x1c87d8(0x1ef)](_0x4ea77f,_0x7f9541,_0x494e80);}['removeShape'](_0x3bba0d,_0x2d7cbe,_0x2d2b8b){const _0x16ed4f=_0x1420e0;this[_0x16ed4f(0x21e)](_0x3bba0d,_0x2d7cbe)[_0x16ed4f(0x1a3)](_0x2d2b8b);}[_0x1420e0(0x211)](_0x26f7e6,_0x406325,_0x11cc7d){const _0x463055=_0x1420e0;return this[_0x463055(0x21e)](_0x26f7e6,_0x406325)[_0x463055(0x1db)](_0x11cc7d);}[_0x1420e0(0x1db)](_0x23629d,_0x5bff6d,_0x53d876){const _0x35a2b2=_0x1420e0;return this['_ensureShapeModelManager'](_0x23629d,_0x5bff6d)[_0x35a2b2(0x1db)](_0x53d876);}['hasShape'](_0x308879,_0x5f01ab,_0x1e1baf){return this['_ensureShapeModelManager'](_0x308879,_0x5f01ab)['hasShape'](_0x1e1baf);}['getShapeTypeById'](_0x53bd53,_0x3ce88c,_0x5816ba){const _0x4e28fe=_0x1420e0;return this[_0x4e28fe(0x21e)](_0x53bd53,_0x3ce88c)[_0x4e28fe(0x1db)](_0x5816ba);}[_0x1420e0(0x1f2)](_0x53765e,_0x214fb5,_0x34c58d){const _0x19d94f=_0x1420e0,_0x45d603=this['_ensureShapeModelManager'](_0x53765e,_0x214fb5);if(!_0x45d603['getShapeType'](_0x34c58d))return;const _0x3b54b9=_0x45d603[_0x19d94f(0x1b6)]['get'](_0x34c58d);if(!_0x3b54b9)return;return _0x3b54b9[_0x19d94f(0x1dc)]();}[_0x1420e0(0x1a4)](_0x5113eb,_0x5b4fbb,_0x27e019){const _0x27d3c0=_0x1420e0;return this[_0x27d3c0(0x21e)](_0x5113eb,_0x5b4fbb)[_0x27d3c0(0x1b6)]['get'](_0x27e019);}[_0x1420e0(0x1d1)](_0x5b4025,_0x2ee420,_0x57d2e6){const _0x4fe2b3=_0x1420e0;return this[_0x4fe2b3(0x21e)](_0x5b4025,_0x2ee420)[_0x4fe2b3(0x1d1)](_0x57d2e6);}[_0x1420e0(0x179)](_0x1f112b,_0xd84fc,_0xc127ee){const _0x464517=_0x1420e0,_0x1bbd27=this[_0x464517(0x21e)](_0x1f112b,_0xd84fc)[_0x464517(0x1b6)][_0x464517(0x213)](_0xc127ee);if(!_0x1bbd27)return;return _0x1bbd27[_0x464517(0x1c1)]();}[_0x1420e0(0x1e5)](){}['_serializeShapeForUnit'](_0x566b8a){const _0x274051=_0x1420e0,_0x5b40ee={},_0x15ba9f=this[_0x274051(0x1a9)][_0x274051(0x213)](_0x566b8a);if(_0x15ba9f)_0x15ba9f[_0x274051(0x22a)]((_0xb33b5e,_0x4bf0df)=>{const _0x458443=_0x274051,_0x2f1df6=_0xb33b5e[_0x458443(0x16b)]();if(_0x2f1df6[_0x458443(0x206)]>0x0)_0x5b40ee[_0x4bf0df]=_0x2f1df6;});return JSON['stringify'](_0x5b40ee);}[_0x1420e0(0x1e1)](_0x3cfc64,_0x2d23fb){const _0x5a4ce4=_0x1420e0;Object[_0x5a4ce4(0x186)](_0x2d23fb)[_0x5a4ce4(0x22a)](_0x1bc69d=>{const _0x35495f=_0x5a4ce4;this[_0x35495f(0x21e)](_0x3cfc64,_0x1bc69d)[_0x35495f(0x1bc)](_0x2d23fb[_0x1bc69d]);});}['toJSON'](){const _0x56fd81=_0x1420e0,_0x3c76d2={};return this[_0x56fd81(0x1a9)][_0x56fd81(0x22a)]((_0x865f39,_0xb6a8e7)=>{const _0x217ce5=_0x56fd81;_0x3c76d2[_0xb6a8e7]={},_0x865f39[_0x217ce5(0x22a)]((_0x3fa35b,_0xe5c7b)=>{_0x3c76d2[_0xb6a8e7][_0xe5c7b]=_0x3fa35b['toJSON']();});}),_0x3c76d2;}['fromJSON'](_0x3bc791){const _0x85bfe2=_0x1420e0;Object[_0x85bfe2(0x186)](_0x3bc791)[_0x85bfe2(0x22a)](_0x5639a5=>{const _0xc0330=_0x85bfe2,_0x5a8809=_0x3bc791[_0x5639a5];Object[_0xc0330(0x186)](_0x5a8809)['forEach'](_0x1a2131=>{const _0x5108e9=_0xc0330;this[_0x5108e9(0x21e)](_0x5639a5,_0x1a2131)[_0x5108e9(0x1bc)](_0x5a8809[_0x1a2131]);});});}['_initSnapshot'](){const _0x588ce0=_0x1420e0;this[_0x588ce0(0x17b)]['registerPluginResource']({'pluginName':SHEET_SHAPE_PLUGIN,'businesses':[_univerjs_core[_0x588ce0(0x20d)][_0x588ce0(0x20f)]],'toJson':_0x6237b2=>this[_0x588ce0(0x217)](_0x6237b2),'parseJson':_0x2fd96d=>JSON[_0x588ce0(0x1aa)](_0x2fd96d),'onLoad':(_0x1f0462,_0x116a0c)=>{const _0x4d807e=_0x588ce0;this[_0x4d807e(0x1e1)](_0x1f0462,_0x116a0c);},'onUnLoad':_0x1e8ab3=>{const _0x2b344c=_0x588ce0,_0x296bc2=this[_0x2b344c(0x1a9)][_0x2b344c(0x213)](_0x1e8ab3);_0x296bc2&&(_0x296bc2[_0x2b344c(0x22a)](_0xf29c45=>{_0xf29c45['dispose']();}),this['_shapeModelManagerMap'][_0x2b344c(0x1ff)](_0x1e8ab3));}});}[_0x1420e0(0x22c)](){const _0x4a6cf3=_0x1420e0;this[_0x4a6cf3(0x1a9)][_0x4a6cf3(0x22a)](_0x23bc75=>{const _0x32e20f=_0x4a6cf3;_0x23bc75[_0x32e20f(0x22a)](_0x2eb625=>{const _0x3b5ca1=_0x32e20f;_0x2eb625[_0x3b5ca1(0x22c)]();});});}};SheetsShapeService=__decorate([__decorateParam(0x0,_univerjs_core['IResourceManagerService'])],SheetsShapeService);const InsertSheetsShapeMutation={'id':_0x1420e0(0x189),'type':_univerjs_core['CommandType'][_0x1420e0(0x22e)],'handler':(_0x32e0bf,_0x4046ea)=>{const _0x528ada=_0x1420e0,{unitId:_0x3d69ff,subUnitId:_0x65eb3f,shapeType:_0x1a2508,shapeId:_0x4ce2b1,shapeData:_0x14bbbf}=_0x4046ea;return _0x32e0bf['get'](SheetsShapeService)[_0x528ada(0x1ce)](_0x3d69ff,_0x65eb3f,_0x1a2508,_0x4ce2b1,_0x14bbbf),!![];}},RemoveSheetsShapeMutation={'id':_0x1420e0(0x1ca),'type':_univerjs_core[_0x1420e0(0x1f8)][_0x1420e0(0x22e)],'handler':(_0x4e2a79,_0x5458b7)=>{const _0x505240=_0x1420e0,{unitId:_0x54e5c3,subUnitId:_0x4082e7,shapeId:_0x324dd8}=_0x5458b7;return _0x4e2a79['get'](SheetsShapeService)[_0x505240(0x1a3)](_0x54e5c3,_0x4082e7,_0x324dd8),!![];}},InsertShapeCommand={'type':_univerjs_core[_0x1420e0(0x1f8)][_0x1420e0(0x198)],'id':_0x1420e0(0x20b),'handler':(_0x1ec85d,_0x4a1676)=>{const _0x20dbad=_0x1420e0;var _0x9093c5,_0x1bab8f;const _0x1bc01d=(0x0,_univerjs_sheets[_0x20dbad(0x209)])(_0x1ec85d[_0x20dbad(0x213)](_univerjs_core[_0x20dbad(0x185)]),_0x4a1676);if(!_0x1bc01d)return![];const _0x18ec6b=_0x1ec85d['get'](_univerjs_sheets[_0x20dbad(0x231)]),{unitId:_0x1d8a7d,subUnitId:_0x17013d}=_0x1bc01d,_0x4c5bcb=_0x18ec6b[_0x20dbad(0x1b8)](_0x1d8a7d,_0x17013d);if(!_0x4c5bcb)return![];const _0x455c8a=_0x1ec85d['get'](_univerjs_core[_0x20dbad(0x1f0)]),_0x296b63=_0x1ec85d[_0x20dbad(0x213)](_univerjs_core[_0x20dbad(0x1c0)]),_0x50cb4d=_0x1ec85d[_0x20dbad(0x213)](_univerjs_sheets[_0x20dbad(0x1c5)]),_0x4a2b1f=_0x1ec85d[_0x20dbad(0x213)](_univerjs_sheets_drawing[_0x20dbad(0x188)]),{shapeType:_0x3fa59d,shapeData:_0x56b599}=_0x4a1676,_0x44e505=_0x4a1676[_0x20dbad(0x22d)]||(0x0,_univerjs_core[_0x20dbad(0x197)])(),_0x3f4ef6={'unitId':_0x1d8a7d,'subUnitId':_0x17013d,'shapeId':_0x44e505,'shapeType':_0x3fa59d,'shapeData':_0x56b599},_0x308769=_0x4a1676[_0x20dbad(0x225)]||0xc8,_0x1158dd=_0x4a1676[_0x20dbad(0x1da)]||0xc8;let _0x3ba561=0x0,_0x5882c0=0x0,_0x38e48d={'row':0x0,'rowOffset':0x0,'column':0x0,'columnOffset':0x0},_0x10a76a={'row':0x0,'rowOffset':0x0,'column':0x0,'columnOffset':0x0};if(_0x4a1676[_0x20dbad(0x167)]){const {x:_0x4a05dd,y:_0x1ebd1e}=_0x4a1676[_0x20dbad(0x167)];_0x3ba561=_0x4a05dd,_0x5882c0=_0x1ebd1e,_0x38e48d=_0x4c5bcb[_0x20dbad(0x1d7)](_0x4a05dd,_0x1ebd1e),_0x10a76a=_0x4c5bcb['getCellIndexAndOffsetByPosition'](_0x4a05dd+_0x308769,_0x1ebd1e+_0x1158dd);}else{if(_0x4a1676[_0x20dbad(0x1c6)]){const {startRow:_0xf5416c,startColumn:_0x1c93c7}=_0x4a1676[_0x20dbad(0x1c6)],_0x53885a=0xa,_0x4a903e=0xa;_0x38e48d={'row':_0xf5416c,'rowOffset':_0x53885a,'column':_0x1c93c7,'columnOffset':_0x4a903e};const _0x40979f=_0x4c5bcb[_0x20dbad(0x1e8)](_0xf5416c,_0x1c93c7);_0x3ba561=_0x40979f[_0x20dbad(0x1de)]+_0x4a903e,_0x5882c0=_0x40979f[_0x20dbad(0x17a)]+_0x53885a,_0x10a76a=_0x4c5bcb[_0x20dbad(0x1d7)](_0x3ba561+_0x308769,_0x5882c0+_0x1158dd);}}const _0x4f6c3d={'from':_0x38e48d,'to':_0x10a76a},_0x47ea37={'unitId':_0x1d8a7d,'subUnitId':_0x17013d,'drawingId':_0x44e505,'drawingType':_univerjs_core[_0x20dbad(0x173)]['DRAWING_SHAPE'],'sheetTransform':_0x4f6c3d,'transform':{'left':_0x3ba561,'top':_0x5882c0,'width':_0x308769,'height':_0x1158dd},'data':{'shapeType':_0x3fa59d,'shapeData':_0x56b599},'axisAlignSheetTransform':_0x4f6c3d,'allowTransform':!![]};(0x0,_univerjs_pro_engine_shape[_0x20dbad(0x1fd)])(_0x3fa59d)&&(_0x47ea37[_0x20dbad(0x212)][_0x20dbad(0x229)]=![],_0x47ea37[_0x20dbad(0x212)][_0x20dbad(0x1f7)]=![],_0x47ea37[_0x20dbad(0x212)]['resizeEnabled']=![],_0x47ea37[_0x20dbad(0x212)][_0x20dbad(0x19a)]=![],_0x47ea37[_0x20dbad(0x17e)][_0x20dbad(0x1f7)]=![],_0x47ea37[_0x20dbad(0x17e)]['resizeEnabled']=![],_0x47ea37['transform']['borderEnabled']=![]);const {undo:_0x312f2a,redo:_0x4b338e,objects:_0x7bc37e}=_0x4a2b1f['getBatchAddOp']([_0x47ea37]),_0x4c8216=_0x50cb4d[_0x20dbad(0x187)]({'id':_univerjs_sheets_drawing[_0x20dbad(0x18e)]['id'],'params':{'unitId':_0x1d8a7d,'drawings':[_0x47ea37]}}),_0x24f90c=[...(_0x9093c5=_0x4c8216[_0x20dbad(0x18a)])!==null&&_0x9093c5!==void 0x0?_0x9093c5:[],{'id':_univerjs_sheets_drawing[_0x20dbad(0x1f4)]['id'],'params':{'unitId':_0x1d8a7d,'subUnitId':_0x17013d,'op':_0x4b338e,'objects':_0x7bc37e,'type':_univerjs_sheets_drawing[_0x20dbad(0x1ac)][_0x20dbad(0x174)]}},{'id':_univerjs_sheets_drawing[_0x20dbad(0x1ea)]['id'],'params':[_0x1d8a7d]},..._0x4c8216[_0x20dbad(0x171)],{'id':InsertSheetsShapeMutation['id'],'params':_0x3f4ef6}],_0x4c0c0d=[{'id':RemoveSheetsShapeMutation['id'],'params':{'unitId':_0x1d8a7d,'subUnitId':_0x17013d,'shapeId':_0x44e505}},...(_0x1bab8f=_0x4c8216['preUndos'])!==null&&_0x1bab8f!==void 0x0?_0x1bab8f:[],{'id':_univerjs_sheets_drawing['SetDrawingApplyMutation']['id'],'params':{'unitId':_0x1d8a7d,'subUnitId':_0x17013d,'op':_0x312f2a,'objects':_0x7bc37e,'type':_univerjs_sheets_drawing[_0x20dbad(0x1ac)][_0x20dbad(0x19d)]}},{'id':_univerjs_sheets_drawing[_0x20dbad(0x1ea)]['id'],'params':[_0x1d8a7d]},..._0x4c8216[_0x20dbad(0x1c9)]];if((0x0,_univerjs_core['sequenceExecute'])(_0x24f90c,_0x455c8a))return _0x296b63[_0x20dbad(0x223)]({'unitID':_0x1d8a7d,'undoMutations':_0x4c0c0d,'redoMutations':_0x24f90c}),!![];return![];}},UpdateSheetsShapeDataMutation={'id':_0x1420e0(0x1a0),'type':_univerjs_core[_0x1420e0(0x1f8)][_0x1420e0(0x22e)],'handler':(_0x355d0a,_0x22505b)=>{const _0x1f08bb=_0x1420e0,{unitId:_0x45d6f6,subUnitId:_0x464833,shapeType:_0x3f774f,shapeId:_0x21fe2f,shapeData:_0x43c6b2}=_0x22505b,_0x534714=_0x355d0a[_0x1f08bb(0x213)](SheetsShapeService)['getShapeModel'](_0x45d6f6,_0x464833,_0x21fe2f);if(_0x534714){if(_0x3f774f!==void 0x0)_0x534714[_0x1f08bb(0x1e5)](_0x3f774f);if(_0x43c6b2)_0x534714===null||_0x534714===void 0x0||_0x534714[_0x1f08bb(0x20a)](_0x43c6b2,!![]);}return!![];}},SetShapeDrawingDataCommand={'type':_univerjs_core[_0x1420e0(0x1f8)][_0x1420e0(0x198)],'id':_0x1420e0(0x226),'handler':(_0x5e9978,_0x3e0dea)=>{const _0x24032f=_0x1420e0;var _0xc68246,_0x5c5f16;const _0x27eb3f=(0x0,_univerjs_sheets[_0x24032f(0x209)])(_0x5e9978['get'](_univerjs_core['IUniverInstanceService']),_0x3e0dea);if(!_0x27eb3f)return![];const _0x1b42e2=_0x5e9978[_0x24032f(0x213)](_univerjs_sheets['SheetSkeletonService']),{unitId:_0x5ef547,subUnitId:_0x5b7e24}=_0x27eb3f,_0x24cb25=_0x1b42e2[_0x24032f(0x1b8)](_0x5ef547,_0x5b7e24);if(!_0x24cb25)return![];const _0x3b2bfd=_0x5e9978['get'](SheetsShapeService),{shapeId:_0x2fa39e,shapeType:_0x1636dd,shapeData:_0x131f96,position:_0x3bcd38,width:_0x2f4668,height:_0x1dac5d}=_0x3e0dea,_0x432d67=_0x3b2bfd[_0x24032f(0x1a4)](_0x5ef547,_0x5b7e24,_0x2fa39e);if(!_0x432d67)return![];const _0x381288=_0x5e9978['get'](_univerjs_core['ICommandService']),_0x366765=_0x5e9978[_0x24032f(0x213)](_univerjs_core[_0x24032f(0x1c0)]),_0x4a6817=_0x5e9978['get'](_univerjs_sheets[_0x24032f(0x1c5)]),_0x24b6ab=_0x5e9978['get'](_univerjs_sheets_drawing[_0x24032f(0x188)]),_0x248edb={'unitId':_0x5ef547,'subUnitId':_0x5b7e24,'shapeId':_0x2fa39e,'shapeType':_0x1636dd,'shapeData':_0x131f96},_0x5947c2=_0x432d67[_0x24032f(0x1db)](),_0x4b114f=_0x432d67[_0x24032f(0x1dc)](),{x:_0x52f072,y:_0x3babc1}=_0x3bcd38,_0x5a2f0b={'from':_0x24cb25['getCellIndexAndOffsetByPosition'](_0x52f072,_0x3babc1),'to':_0x24cb25[_0x24032f(0x1d7)](_0x52f072+_0x2f4668,_0x3babc1+_0x1dac5d)},_0x492306={'unitId':_0x5ef547,'subUnitId':_0x5b7e24,'drawingId':_0x2fa39e,'drawingType':_univerjs_core[_0x24032f(0x173)][_0x24032f(0x193)],'sheetTransform':_0x5a2f0b,'transform':{'left':_0x52f072,'top':_0x3babc1,'width':_0x2f4668,'height':_0x1dac5d},'data':{'shapeType':_0x1636dd,'shapeData':_0x131f96},'axisAlignSheetTransform':_0x5a2f0b,'allowTransform':!![]};(0x0,_univerjs_pro_engine_shape['isConnectorShape'])(_0x1636dd)&&(_0x492306[_0x24032f(0x212)][_0x24032f(0x229)]=![],_0x492306[_0x24032f(0x212)][_0x24032f(0x1f7)]=![],_0x492306['data']['resizeEnabled']=![],_0x492306[_0x24032f(0x212)]['borderEnabled']=![],_0x492306[_0x24032f(0x17e)][_0x24032f(0x1f7)]=![],_0x492306['transform'][_0x24032f(0x1dd)]=![],_0x492306[_0x24032f(0x17e)]['borderEnabled']=![]);const {undo:_0x25b483,redo:_0x347ec5,objects:_0x3d8b53}=_0x24b6ab['getBatchUpdateOp']([_0x492306]),_0x13366e=_0x4a6817['onCommandExecute']({'id':_univerjs_sheets_drawing['SetSheetDrawingCommand']['id'],'params':{'unitId':_0x5ef547,'drawings':[_0x492306]}}),_0x249f63=[...(_0xc68246=_0x13366e['preRedos'])!==null&&_0xc68246!==void 0x0?_0xc68246:[],{'id':_univerjs_sheets_drawing[_0x24032f(0x1f4)]['id'],'params':{'unitId':_0x5ef547,'subUnitId':_0x5b7e24,'op':_0x347ec5,'objects':_0x3d8b53,'type':_univerjs_sheets_drawing[_0x24032f(0x1ac)]['UPDATE']}},{'id':_univerjs_sheets_drawing[_0x24032f(0x1ea)]['id'],'params':[_0x5ef547]},..._0x13366e[_0x24032f(0x171)],{'id':UpdateSheetsShapeDataMutation['id'],'params':_0x248edb}],_0x361894=[...(_0x5c5f16=_0x13366e[_0x24032f(0x1b3)])!==null&&_0x5c5f16!==void 0x0?_0x5c5f16:[],{'id':_univerjs_sheets_drawing['SetDrawingApplyMutation']['id'],'params':{'unitId':_0x5ef547,'subUnitId':_0x5b7e24,'op':_0x25b483,'objects':_0x3d8b53,'type':_univerjs_sheets_drawing[_0x24032f(0x1ac)][_0x24032f(0x1b9)]}},{'id':_univerjs_sheets_drawing['ClearSheetDrawingTransformerOperation']['id'],'params':[_0x5ef547]},..._0x13366e[_0x24032f(0x1c9)],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x5ef547,'subUnitId':_0x5b7e24,'shapeType':_0x5947c2,'shapeId':_0x2fa39e,'shapeData':_0x4b114f}}];if((0x0,_univerjs_core[_0x24032f(0x20c)])(_0x249f63,_0x381288))return _0x366765['pushUndoRedo']({'unitID':_0x5ef547,'undoMutations':_0x361894,'redoMutations':_0x249f63}),!![];return![];}},ToggleSheetsShapeFlipCommand={'type':_univerjs_core['CommandType'][_0x1420e0(0x198)],'id':_0x1420e0(0x1a5),'handler':(_0x14019a,_0x26a869)=>{const _0x4b2205=_0x1420e0;var _0x54be8d,_0xa679b0;const _0x40a6da=(0x0,_univerjs_sheets[_0x4b2205(0x209)])(_0x14019a['get'](_univerjs_core['IUniverInstanceService']),_0x26a869);if(!_0x40a6da)return![];const _0xf8dc51=_0x14019a[_0x4b2205(0x213)](_univerjs_sheets[_0x4b2205(0x231)]),{unitId:_0x510d76,subUnitId:_0x3248dc}=_0x40a6da,_0x11a34f=_0xf8dc51['getSkeleton'](_0x510d76,_0x3248dc);if(!_0x11a34f)return![];const _0x33c2d2=_0x14019a['get'](_univerjs_sheets_drawing[_0x4b2205(0x188)]),{shapeId:_0x278acb,flipH:_0x13c202,flipV:_0x54e872}=_0x26a869,_0x84ba81=_0x33c2d2['getDrawingByParam']({'unitId':_0x510d76,'subUnitId':_0x3248dc,'drawingId':_0x278acb});if(!_0x84ba81)return![];const _0x33f705=_0x14019a[_0x4b2205(0x213)](SheetsShapeService)[_0x4b2205(0x1a4)](_0x510d76,_0x3248dc,_0x278acb);if(!_0x33f705)return![];const _0x3567cd=_0x14019a['get'](_univerjs_core[_0x4b2205(0x1f0)]),_0x6958d=_0x14019a[_0x4b2205(0x213)](_univerjs_core[_0x4b2205(0x1c0)]),_0xa938bc=_0x14019a[_0x4b2205(0x213)](_univerjs_sheets[_0x4b2205(0x1c5)]),_0x2e51ed={..._0x84ba81[_0x4b2205(0x17e)]};if(_0x13c202!==void 0x0)_0x2e51ed[_0x4b2205(0x216)]=!_0x2e51ed[_0x4b2205(0x216)];if(_0x54e872!==void 0x0)_0x2e51ed[_0x4b2205(0x195)]=!_0x2e51ed[_0x4b2205(0x195)];const _0x81acdb=(0x0,_univerjs_sheets_drawing[_0x4b2205(0x207)])(_0x2e51ed,_0x11a34f),_0x589a57=(0x0,_univerjs_sheets_drawing[_0x4b2205(0x21a)])(_0x2e51ed,_0x11a34f),_0x5887b2=_0x33f705['getShapeType'](),_0x48f5b9=_0x33f705[_0x4b2205(0x1dc)](),_0xcecbf7={'unitId':_0x510d76,'subUnitId':_0x3248dc,'drawingId':_0x278acb,'drawingType':_univerjs_core[_0x4b2205(0x173)][_0x4b2205(0x193)],'sheetTransform':_0x81acdb,'transform':_0x2e51ed,'data':{'shapeType':_0x5887b2,'shapeData':_0x48f5b9},'axisAlignSheetTransform':_0x589a57,'allowTransform':!![]},{undo:_0x480291,redo:_0x5ea5e2,objects:_0x489f57}=_0x33c2d2[_0x4b2205(0x169)]([_0xcecbf7]),_0x57ccf4=_0xa938bc['onCommandExecute']({'id':_univerjs_sheets_drawing[_0x4b2205(0x181)]['id'],'params':{'unitId':_0x510d76,'drawings':[_0xcecbf7]}}),_0x292df1=[...(_0x54be8d=_0x57ccf4['preRedos'])!==null&&_0x54be8d!==void 0x0?_0x54be8d:[],{'id':_univerjs_sheets_drawing[_0x4b2205(0x1f4)]['id'],'params':{'unitId':_0x510d76,'subUnitId':_0x3248dc,'op':_0x5ea5e2,'objects':_0x489f57,'type':_univerjs_sheets_drawing[_0x4b2205(0x1ac)][_0x4b2205(0x1b9)]}},{'id':_univerjs_sheets_drawing[_0x4b2205(0x1ea)]['id'],'params':[_0x510d76]},..._0x57ccf4['redos']],_0x27425c=[...(_0xa679b0=_0x57ccf4[_0x4b2205(0x1b3)])!==null&&_0xa679b0!==void 0x0?_0xa679b0:[],{'id':_univerjs_sheets_drawing['SetDrawingApplyMutation']['id'],'params':{'unitId':_0x510d76,'subUnitId':_0x3248dc,'op':_0x480291,'objects':_0x489f57,'type':_univerjs_sheets_drawing[_0x4b2205(0x1ac)][_0x4b2205(0x1b9)]}},{'id':_univerjs_sheets_drawing['ClearSheetDrawingTransformerOperation']['id'],'params':[_0x510d76]},..._0x57ccf4[_0x4b2205(0x1c9)]];if((0x0,_univerjs_pro_engine_shape[_0x4b2205(0x1fd)])(_0x5887b2)){const _0x1a5eb1=_0x33f705[_0x4b2205(0x1c1)]();if(_0x1a5eb1){const _0x29b7a4={..._0x1a5eb1};_0x29b7a4[_0x4b2205(0x1cc)]=void 0x0,_0x29b7a4['to']=void 0x0,_0x292df1[_0x4b2205(0x20e)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x510d76,'subUnitId':_0x3248dc,'shapeId':_0x278acb,'shapeType':_0x5887b2,'shapeData':{'relation':_0x29b7a4}}}),_0x27425c[_0x4b2205(0x20e)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x510d76,'subUnitId':_0x3248dc,'shapeId':_0x278acb,'shapeType':_0x5887b2,'shapeData':{'relation':_0x1a5eb1}}});}}if((0x0,_univerjs_core[_0x4b2205(0x20c)])(_0x292df1,_0x3567cd))return _0x6958d[_0x4b2205(0x223)]({'unitID':_0x510d76,'undoMutations':_0x27425c,'redoMutations':_0x292df1}),!![];return![];}},SetSheetsShapeRotateCommand={'type':_univerjs_core[_0x1420e0(0x1f8)]['COMMAND'],'id':_0x1420e0(0x1e3),'handler':(_0x3ba85d,_0x3680d8)=>{const _0x2e9a38=_0x1420e0;var _0x58183c,_0x40f7ad;const _0x5342f5=(0x0,_univerjs_sheets[_0x2e9a38(0x209)])(_0x3ba85d[_0x2e9a38(0x213)](_univerjs_core[_0x2e9a38(0x185)]),_0x3680d8);if(!_0x5342f5)return![];const _0x335e76=_0x3ba85d['get'](_univerjs_sheets[_0x2e9a38(0x231)]),{unitId:_0x3b77cc,subUnitId:_0x254053}=_0x5342f5,_0xbf7160=_0x335e76[_0x2e9a38(0x16f)](_0x3b77cc,_0x254053);if(!_0xbf7160)return![];const _0x1fee37=_0x3ba85d['get'](_univerjs_sheets_drawing[_0x2e9a38(0x188)]),{shapeId:_0x1d5370,rotate:_0x289360}=_0x3680d8,_0xeb7497=_0x1fee37[_0x2e9a38(0x21d)]({'unitId':_0x3b77cc,'subUnitId':_0x254053,'drawingId':_0x1d5370});if(!_0xeb7497)return![];const _0x145fe5=_0x3ba85d[_0x2e9a38(0x213)](SheetsShapeService)[_0x2e9a38(0x1a4)](_0x3b77cc,_0x254053,_0x1d5370);if(!_0x145fe5)return![];const _0x3681a9=_0x3ba85d[_0x2e9a38(0x213)](_univerjs_core[_0x2e9a38(0x1f0)]),_0x22d91e=_0x3ba85d[_0x2e9a38(0x213)](_univerjs_core[_0x2e9a38(0x1c0)]),_0x152eb6=_0x3ba85d['get'](_univerjs_sheets[_0x2e9a38(0x1c5)]),_0x541e03={..._0xeb7497['transform']};if(_0x289360!==void 0x0)_0x541e03['angle']=(_0x541e03[_0x2e9a38(0x205)]||0x0)+_0x289360;const _0x2f500b=(0x0,_univerjs_sheets_drawing[_0x2e9a38(0x207)])(_0x541e03,_0xbf7160),_0x226bf0=(0x0,_univerjs_sheets_drawing[_0x2e9a38(0x21a)])(_0x541e03,_0xbf7160),_0xdc3e8d=_0x145fe5[_0x2e9a38(0x1db)](),_0x205522=_0x145fe5[_0x2e9a38(0x1dc)](),_0x5a52ba={'unitId':_0x3b77cc,'subUnitId':_0x254053,'drawingId':_0x1d5370,'drawingType':_univerjs_core['DrawingTypeEnum'][_0x2e9a38(0x193)],'sheetTransform':_0x2f500b,'transform':_0x541e03,'data':{'shapeType':_0xdc3e8d,'shapeData':_0x205522},'axisAlignSheetTransform':_0x226bf0,'allowTransform':!![]},{undo:_0x11ef47,redo:_0x3d2bc0,objects:_0x46a5c3}=_0x1fee37[_0x2e9a38(0x169)]([_0x5a52ba]),_0x1ed942=_0x152eb6['onCommandExecute']({'id':_univerjs_sheets_drawing[_0x2e9a38(0x181)]['id'],'params':{'unitId':_0x3b77cc,'drawings':[_0x5a52ba]}}),_0x15efe9=[...(_0x58183c=_0x1ed942[_0x2e9a38(0x18a)])!==null&&_0x58183c!==void 0x0?_0x58183c:[],{'id':_univerjs_sheets_drawing[_0x2e9a38(0x1f4)]['id'],'params':{'unitId':_0x3b77cc,'subUnitId':_0x254053,'op':_0x3d2bc0,'objects':_0x46a5c3,'type':_univerjs_sheets_drawing[_0x2e9a38(0x1ac)]['UPDATE']}},{'id':_univerjs_sheets_drawing[_0x2e9a38(0x1ea)]['id'],'params':[_0x3b77cc]},..._0x1ed942[_0x2e9a38(0x171)]],_0xfbc159=[...(_0x40f7ad=_0x1ed942['preUndos'])!==null&&_0x40f7ad!==void 0x0?_0x40f7ad:[],{'id':_univerjs_sheets_drawing[_0x2e9a38(0x1f4)]['id'],'params':{'unitId':_0x3b77cc,'subUnitId':_0x254053,'op':_0x11ef47,'objects':_0x46a5c3,'type':_univerjs_sheets_drawing[_0x2e9a38(0x1ac)][_0x2e9a38(0x1b9)]}},{'id':_univerjs_sheets_drawing[_0x2e9a38(0x1ea)]['id'],'params':[_0x3b77cc]},..._0x1ed942[_0x2e9a38(0x1c9)]];if((0x0,_univerjs_core[_0x2e9a38(0x20c)])(_0x15efe9,_0x3681a9))return _0x22d91e[_0x2e9a38(0x223)]({'unitID':_0x3b77cc,'undoMutations':_0xfbc159,'redoMutations':_0x15efe9}),!![];return![];}},SetSheetsShapeTextVerticalToggleCommand={'type':_univerjs_core[_0x1420e0(0x1f8)][_0x1420e0(0x198)],'id':'sheet.command.set-shape-text-vertical-toggle','handler':(_0x440e3e,_0x5be371)=>{const _0x224c10=_0x1420e0;var _0x43e645;const _0x2d74cc=(0x0,_univerjs_sheets[_0x224c10(0x209)])(_0x440e3e[_0x224c10(0x213)](_univerjs_core['IUniverInstanceService']),_0x5be371);if(!_0x2d74cc)return![];const {unitId:_0x260faa,subUnitId:_0x5f2bfe}=_0x2d74cc,{shapeId:_0x547441}=_0x5be371,_0xb4cca=_0x440e3e[_0x224c10(0x213)](SheetsShapeService)[_0x224c10(0x1a4)](_0x260faa,_0x5f2bfe,_0x547441);if(!_0xb4cca)return![];const _0x1de426=_0xb4cca[_0x224c10(0x192)](),_0x5a50fc=(_0x43e645=_0x1de426===null||_0x1de426===void 0x0?void 0x0:_0x1de426['isHorizontal'])!==null&&_0x43e645!==void 0x0?_0x43e645:!![],_0x32e0b6=!_0x5a50fc,_0x4637dc=_0x440e3e[_0x224c10(0x213)](_univerjs_core[_0x224c10(0x1f0)]),_0x36c598=_0x440e3e[_0x224c10(0x213)](_univerjs_core['IUndoRedoService']),_0xfc92af={'unitId':_0x260faa,'subUnitId':_0x5f2bfe,'shapeId':_0x547441,'shapeData':{'shapeText':{'isHorizontal':_0x32e0b6}}},_0x1ff2e0={'unitId':_0x260faa,'subUnitId':_0x5f2bfe,'shapeId':_0x547441,'shapeData':{'shapeText':{'isHorizontal':_0x5a50fc}}},_0x329f2f=[{'id':UpdateSheetsShapeDataMutation['id'],'params':_0xfc92af}],_0xaabd90=[{'id':UpdateSheetsShapeDataMutation['id'],'params':_0x1ff2e0}];if((0x0,_univerjs_core[_0x224c10(0x20c)])(_0x329f2f,_0x4637dc))return _0x36c598[_0x224c10(0x223)]({'unitID':_0x260faa,'undoMutations':_0xaabd90,'redoMutations':_0x329f2f}),!![];return![];}},UpdateConnectorRelationCommand={'type':_univerjs_core['CommandType']['COMMAND'],'id':_0x1420e0(0x200),'handler':(_0x4eb513,_0x362320)=>{const _0x15e06e=_0x1420e0;var _0x5640d4,_0x4ad50c,_0x1038f1,_0x192ba2;const _0x33be35=(0x0,_univerjs_sheets[_0x15e06e(0x209)])(_0x4eb513[_0x15e06e(0x213)](_univerjs_core['IUniverInstanceService']),_0x362320);if(!_0x33be35)return![];const _0x7a71ae=_0x4eb513[_0x15e06e(0x213)](_univerjs_sheets['SheetSkeletonService']),{unitId:_0x2dbe18,subUnitId:_0x52c4fa}=_0x33be35,_0x5d0cbf=_0x7a71ae[_0x15e06e(0x16f)](_0x2dbe18,_0x52c4fa);if(!_0x5d0cbf)return![];const _0x8b1d25=_0x4eb513['get'](_univerjs_sheets_drawing[_0x15e06e(0x188)]),{connectorShapeId:_0x38da2d,width:_0x2b6899,height:_0x4f788e,left:_0x5bc50a,top:_0x3c1209,flipX:_0x306f31,flipY:_0x334239,rotation:_0x168e6b,oldAdjustValues:_0x421338,newAdjustValues:_0x215d64,oldLineType:_0x34c8f5,newLineType:_0x1278e6,oldRelation:_0x3dd505,newRelation:_0x3edda8}=_0x362320,_0x34bee5=_0x8b1d25['getDrawingByParam']({'unitId':_0x2dbe18,'subUnitId':_0x52c4fa,'drawingId':_0x38da2d});if(!_0x34bee5)return![];const _0x380d24=_0x4eb513[_0x15e06e(0x213)](SheetsShapeService)[_0x15e06e(0x1a4)](_0x2dbe18,_0x52c4fa,_0x38da2d);if(!_0x380d24)return![];const _0x2e5336=_0x4eb513['get'](_univerjs_core[_0x15e06e(0x1f0)]),_0x4fead8=_0x4eb513[_0x15e06e(0x213)](_univerjs_core[_0x15e06e(0x1c0)]),_0x596cea=_0x4eb513['get'](_univerjs_sheets['SheetInterceptorService']),_0x1f5784={..._0x34bee5[_0x15e06e(0x17e)],'width':_0x2b6899,'height':_0x4f788e,'left':_0x5bc50a,'top':_0x3c1209,'flipX':_0x306f31,'flipY':_0x334239,'angle':(_0x5640d4=_0x168e6b!==null&&_0x168e6b!==void 0x0?_0x168e6b:(_0x4ad50c=_0x34bee5[_0x15e06e(0x17e)])===null||_0x4ad50c===void 0x0?void 0x0:_0x4ad50c['angle'])!==null&&_0x5640d4!==void 0x0?_0x5640d4:0x0},_0x297944=(0x0,_univerjs_sheets_drawing[_0x15e06e(0x207)])(_0x1f5784,_0x5d0cbf),_0x139106=(0x0,_univerjs_sheets_drawing['transformToAxisAlignPosition'])(_0x1f5784,_0x5d0cbf),_0x4a69bb=_0x380d24[_0x15e06e(0x1db)](),_0x5afa1d=_0x380d24[_0x15e06e(0x1dc)](),_0x2890ac={'unitId':_0x2dbe18,'subUnitId':_0x52c4fa,'drawingId':_0x38da2d,'drawingType':_univerjs_core['DrawingTypeEnum']['DRAWING_SHAPE'],'sheetTransform':_0x297944,'transform':_0x1f5784,'data':{'shapeType':_0x1278e6||_0x34c8f5||_0x4a69bb,'shapeData':{..._0x5afa1d,'adjustValues':_0x215d64||_0x421338||(_0x5afa1d===null||_0x5afa1d===void 0x0?void 0x0:_0x5afa1d[_0x15e06e(0x17d)]),'relation':_0x3edda8||_0x3dd505||(_0x5afa1d===null||_0x5afa1d===void 0x0?void 0x0:_0x5afa1d['relation'])}},'axisAlignSheetTransform':_0x139106,'allowTransform':!![]},{undo:_0xd8b5e,redo:_0x17777d,objects:_0x2f2a06}=_0x8b1d25['getBatchUpdateOp']([_0x2890ac]),_0x5829b2=_0x596cea[_0x15e06e(0x187)]({'id':_univerjs_sheets_drawing[_0x15e06e(0x181)]['id'],'params':{'unitId':_0x2dbe18,'drawings':[_0x2890ac]}}),_0x492e70=[...(_0x1038f1=_0x5829b2[_0x15e06e(0x18a)])!==null&&_0x1038f1!==void 0x0?_0x1038f1:[],{'id':_univerjs_sheets_drawing[_0x15e06e(0x1f4)]['id'],'params':{'unitId':_0x2dbe18,'subUnitId':_0x52c4fa,'op':_0x17777d,'objects':_0x2f2a06,'type':_univerjs_sheets_drawing['DrawingApplyType'][_0x15e06e(0x1b9)]}},{'id':_univerjs_sheets_drawing['ClearSheetDrawingTransformerOperation']['id'],'params':[_0x2dbe18]},..._0x5829b2[_0x15e06e(0x171)],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x2dbe18,'subUnitId':_0x52c4fa,'shapeId':_0x38da2d,'shapeType':_0x1278e6,'shapeData':{'adjustValues':_0x215d64,'relation':_0x3edda8}}}],_0x4e0305=[...(_0x192ba2=_0x5829b2['preUndos'])!==null&&_0x192ba2!==void 0x0?_0x192ba2:[],{'id':_univerjs_sheets_drawing[_0x15e06e(0x1f4)]['id'],'params':{'unitId':_0x2dbe18,'subUnitId':_0x52c4fa,'op':_0xd8b5e,'objects':_0x2f2a06,'type':_univerjs_sheets_drawing[_0x15e06e(0x1ac)][_0x15e06e(0x1b9)]}},{'id':_univerjs_sheets_drawing[_0x15e06e(0x1ea)]['id'],'params':[_0x2dbe18]},..._0x5829b2[_0x15e06e(0x1c9)],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x2dbe18,'subUnitId':_0x52c4fa,'shapeId':_0x38da2d,'shapeType':_0x4a69bb,'shapeData':{..._0x5afa1d,'adjustValues':_0x421338||(_0x5afa1d===null||_0x5afa1d===void 0x0?void 0x0:_0x5afa1d[_0x15e06e(0x17d)]),'relation':_0x3dd505||(_0x5afa1d===null||_0x5afa1d===void 0x0?void 0x0:_0x5afa1d[_0x15e06e(0x19c)])}}}];if((0x0,_univerjs_core['sequenceExecute'])(_0x492e70,_0x2e5336))return _0x4fead8[_0x15e06e(0x223)]({'unitID':_0x2dbe18,'undoMutations':_0x4e0305,'redoMutations':_0x492e70}),!![];return![];}},UpdateLineShapeResizeCommand={'type':_univerjs_core[_0x1420e0(0x1f8)][_0x1420e0(0x198)],'id':_0x1420e0(0x166),'handler':(_0x525feb,_0x27c507)=>{const _0x4684ee=_0x1420e0;var _0xa0adb0,_0x2631ae;const _0x3b782e=(0x0,_univerjs_sheets[_0x4684ee(0x209)])(_0x525feb[_0x4684ee(0x213)](_univerjs_core[_0x4684ee(0x185)]),_0x27c507);if(!_0x3b782e)return![];const _0xc1caf7=_0x525feb['get'](_univerjs_sheets[_0x4684ee(0x231)]),{unitId:_0x31eeca,subUnitId:_0x59cc16}=_0x3b782e,_0x49bae5=_0xc1caf7[_0x4684ee(0x16f)](_0x31eeca,_0x59cc16);if(!_0x49bae5)return![];const _0x549530=_0x525feb[_0x4684ee(0x213)](_univerjs_sheets_drawing[_0x4684ee(0x188)]),{shapeId:_0x18140a,width:_0x1aa7bd,height:_0x35e005,left:_0x461ecb,top:_0x42342d,flipX:_0xf38230,flipY:_0x3b86b8,angle:_0x4a260f,oldAdjustValues:_0x220c98,newAdjustValues:_0x84817a,oldLineType:_0x530996,newLineType:_0x434319}=_0x27c507,_0x518793=_0x549530[_0x4684ee(0x21d)]({'unitId':_0x31eeca,'subUnitId':_0x59cc16,'drawingId':_0x18140a});if(!_0x518793)return![];const _0x5b29a8=_0x525feb[_0x4684ee(0x213)](SheetsShapeService)[_0x4684ee(0x1a4)](_0x31eeca,_0x59cc16,_0x18140a);if(!_0x5b29a8)return![];const _0x225b22=_0x525feb[_0x4684ee(0x213)](_univerjs_core[_0x4684ee(0x1f0)]),_0x4299e8=_0x525feb['get'](_univerjs_core['IUndoRedoService']),_0x2b2e92=_0x525feb[_0x4684ee(0x213)](_univerjs_sheets[_0x4684ee(0x1c5)]),_0x1ee49d={..._0x518793['transform'],'width':_0x1aa7bd,'height':_0x35e005,'left':_0x461ecb,'top':_0x42342d,'flipX':_0xf38230,'flipY':_0x3b86b8,'angle':_0x4a260f},_0x296ffe=(0x0,_univerjs_sheets_drawing['transformToDrawingPosition'])(_0x1ee49d,_0x49bae5),_0x1cd480=(0x0,_univerjs_sheets_drawing[_0x4684ee(0x21a)])(_0x1ee49d,_0x49bae5),_0x490b68=_0x5b29a8[_0x4684ee(0x1db)](),_0x2aaff1=_0x5b29a8['getShapeData'](),_0x25373d={'unitId':_0x31eeca,'subUnitId':_0x59cc16,'drawingId':_0x18140a,'drawingType':_univerjs_core['DrawingTypeEnum'][_0x4684ee(0x193)],'sheetTransform':_0x296ffe,'transform':_0x1ee49d,'data':{'shapeType':_0x434319||_0x530996||_0x490b68,'shapeData':{..._0x2aaff1,'adjustValues':_0x84817a||_0x220c98||(_0x2aaff1===null||_0x2aaff1===void 0x0?void 0x0:_0x2aaff1['adjustValues'])}},'axisAlignSheetTransform':_0x1cd480,'allowTransform':!![]},{undo:_0xf3631b,redo:_0x5ac03e,objects:_0x59c2f1}=_0x549530[_0x4684ee(0x169)]([_0x25373d]),_0x53bf91=_0x2b2e92[_0x4684ee(0x187)]({'id':_univerjs_sheets_drawing['SetSheetDrawingCommand']['id'],'params':{'unitId':_0x31eeca,'drawings':[_0x25373d]}}),_0xaff803=[...(_0xa0adb0=_0x53bf91[_0x4684ee(0x18a)])!==null&&_0xa0adb0!==void 0x0?_0xa0adb0:[],{'id':_univerjs_sheets_drawing[_0x4684ee(0x1f4)]['id'],'params':{'unitId':_0x31eeca,'subUnitId':_0x59cc16,'op':_0x5ac03e,'objects':_0x59c2f1,'type':_univerjs_sheets_drawing[_0x4684ee(0x1ac)]['UPDATE']}},{'id':_univerjs_sheets_drawing[_0x4684ee(0x1ea)]['id'],'params':[_0x31eeca]},..._0x53bf91[_0x4684ee(0x171)],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x31eeca,'subUnitId':_0x59cc16,'shapeId':_0x18140a,'shapeType':_0x434319,'shapeData':{'adjustValues':_0x84817a}}}],_0x20cf47=[...(_0x2631ae=_0x53bf91['preUndos'])!==null&&_0x2631ae!==void 0x0?_0x2631ae:[],{'id':_univerjs_sheets_drawing[_0x4684ee(0x1f4)]['id'],'params':{'unitId':_0x31eeca,'subUnitId':_0x59cc16,'op':_0xf3631b,'objects':_0x59c2f1,'type':_univerjs_sheets_drawing['DrawingApplyType'][_0x4684ee(0x1b9)]}},{'id':_univerjs_sheets_drawing[_0x4684ee(0x1ea)]['id'],'params':[_0x31eeca]},..._0x53bf91['undos'],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x31eeca,'subUnitId':_0x59cc16,'shapeId':_0x18140a,'shapeType':_0x490b68,'shapeData':{..._0x2aaff1,'adjustValues':_0x220c98||(_0x2aaff1===null||_0x2aaff1===void 0x0?void 0x0:_0x2aaff1[_0x4684ee(0x17d)])}}}];if((0x0,_univerjs_core[_0x4684ee(0x20c)])(_0xaff803,_0x225b22))return _0x4299e8[_0x4684ee(0x223)]({'unitID':_0x31eeca,'undoMutations':_0x20cf47,'redoMutations':_0xaff803}),!![];return![];}},UpdateSheetsShapeTypeMutation={'id':_0x1420e0(0x1a1),'type':_univerjs_core[_0x1420e0(0x1f8)][_0x1420e0(0x22e)],'handler':(_0x5b685f,_0x15702b)=>{const _0x32eea6=_0x1420e0,{unitId:_0x5329f8,subUnitId:_0x1ab9e4,shapeType:_0xfa0262,shapeId:_0x3719d6,shapeData:_0x457848}=_0x15702b,_0x46187a=_0x5b685f[_0x32eea6(0x213)](SheetsShapeService)[_0x32eea6(0x1a4)](_0x5329f8,_0x1ab9e4,_0x3719d6);if(_0x46187a){_0x46187a[_0x32eea6(0x1e5)](_0xfa0262);if(_0x457848)_0x46187a===null||_0x46187a===void 0x0||_0x46187a[_0x32eea6(0x20a)](_0x457848);}return!![];}},UpdateSheetsShapeTypeCommand={'id':_0x1420e0(0x1ba),'type':_univerjs_core[_0x1420e0(0x1f8)]['COMMAND'],'handler':(_0x37769b,_0x7b7a8d)=>{const _0x37990c=_0x1420e0;if(!_0x7b7a8d)return![];const _0x20f6bf=_0x37769b[_0x37990c(0x213)](_univerjs_core[_0x37990c(0x1f0)]),_0xe91832=_0x37769b[_0x37990c(0x213)](SheetsShapeService),_0xb9379c=_0x37769b[_0x37990c(0x213)](_univerjs_core[_0x37990c(0x1c0)]),_0x22f571=[],_0xa6826e=[],{unitId:_0x1c353f,subUnitId:_0xd930,shapeId:_0x23a87c,shapeType:_0x170501,shapeData:_0x1d8c75}=_0x7b7a8d,_0x3639b2=_0xe91832[_0x37990c(0x1a4)](_0x1c353f,_0xd930,_0x23a87c);if(_0x3639b2){const _0x73f1b1=_0x3639b2[_0x37990c(0x1db)](),_0x101830=Object[_0x37990c(0x1e6)]({},_0x3639b2[_0x37990c(0x1dc)]()),_0x1ae753={'unitId':_0x1c353f,'subUnitId':_0xd930,'shapeId':_0x23a87c,'shapeType':_0x170501,'shapeData':_0x1d8c75},_0x306af3={'unitId':_0x1c353f,'subUnitId':_0xd930,'shapeId':_0x23a87c,'shapeType':_0x73f1b1,'shapeData':_0x101830};_0x22f571[_0x37990c(0x20e)]({'id':UpdateSheetsShapeTypeMutation['id'],'params':_0x1ae753}),_0xa6826e[_0x37990c(0x20e)]({'id':UpdateSheetsShapeTypeMutation['id'],'params':_0x306af3});if(_0x22f571[_0x37990c(0x228)](_0x45fc4a=>_0x20f6bf[_0x37990c(0x230)](_0x45fc4a['id'],_0x45fc4a[_0x37990c(0x204)])))_0xb9379c[_0x37990c(0x223)]({'unitID':_0x1c353f,'redoMutations':[..._0x22f571],'undoMutations':[..._0xa6826e]});return!![];}return![];}};var name=_0x1420e0(0x183),version=_0x1420e0(0x21c);const SHEETS_SHAPE_PLUGIN_CONFIG_KEY=_0x1420e0(0x1bb),configSymbol=Symbol(SHEETS_SHAPE_PLUGIN_CONFIG_KEY),defaultPluginConfig={};let SheetsShapeController=class SheetsShapeController extends _univerjs_core['Disposable']{constructor(_0x56a11c,_0x2a209f,_0x3bb5e4,_0x126ee7,_0x1403fd){const _0x1595e6=_0x1420e0;super(),this[_0x1595e6(0x220)]=_0x56a11c,this[_0x1595e6(0x203)]=_0x2a209f,this[_0x1595e6(0x1cd)]=_0x3bb5e4,this[_0x1595e6(0x196)]=_0x126ee7,this[_0x1595e6(0x1e7)]=_0x1403fd,this[_0x1595e6(0x1d3)](),this[_0x1595e6(0x1e9)]();}[_0x1420e0(0x1d3)](){const _0x194010=_0x1420e0;[InsertShapeCommand,SetShapeDrawingDataCommand,ToggleSheetsShapeFlipCommand,SetSheetsShapeRotateCommand,SetSheetsShapeTextVerticalToggleCommand,UpdateConnectorRelationCommand,UpdateLineShapeResizeCommand,InsertSheetsShapeMutation,RemoveSheetsShapeMutation,UpdateSheetsShapeTypeMutation,UpdateSheetsShapeDataMutation][_0x194010(0x22a)](_0x44f473=>this[_0x194010(0x17f)](this[_0x194010(0x220)]['registerCommand'](_0x44f473)));}[_0x1420e0(0x1e9)](){const _0x30725f=_0x1420e0;this[_0x30725f(0x17f)](this[_0x30725f(0x203)][_0x30725f(0x1d0)]({'getMutations':_0xf74401=>{const _0x23c418=_0x30725f;if(_0xf74401['id']===_univerjs_sheets_drawing[_0x23c418(0x191)]['id']){const {drawings:_0x57b065}=_0xf74401[_0x23c418(0x204)],_0x37974c=_0x57b065[_0x23c418(0x178)](_0xda25a=>_0xda25a[_0x23c418(0x165)]===_univerjs_core[_0x23c418(0x173)][_0x23c418(0x193)]);if(_0x37974c[_0x23c418(0x206)]===0x0)return{'preRedos':[],'redos':[],'preUndos':[],'undos':[]};const _0x11946e=[],_0x2a459c=[];return _0x37974c[_0x23c418(0x22a)](_0x1f2cd2=>{const _0x3eba57=_0x23c418,{unitId:_0x1ff829,subUnitId:_0x47d40b,drawingId:_0x12a753}=_0x1f2cd2,_0x1050ef=this[_0x3eba57(0x196)]['getShapeModel'](_0x1ff829,_0x47d40b,_0x12a753);if(!_0x1050ef)throw new TypeError('Fail\x20to\x20get\x20shape\x20model,\x20get:\x20'+_0x1050ef);_0x11946e[_0x3eba57(0x20e)]({'id':RemoveSheetsShapeMutation['id'],'params':{'unitId':_0x1ff829,'subUnitId':_0x47d40b,'shapeId':_0x12a753}}),_0x2a459c[_0x3eba57(0x20e)]({'id':InsertSheetsShapeMutation['id'],'params':{'unitId':_0x1ff829,'subUnitId':_0x47d40b,'shapeId':_0x12a753,'shapeType':_0x1050ef[_0x3eba57(0x1db)](),'shapeData':_0x1050ef['getShapeData']()}});const _0x558fa5=this[_0x3eba57(0x196)][_0x3eba57(0x1d1)](_0x1ff829,_0x47d40b,_0x12a753);if(_0x558fa5)for(const _0x37f22a of _0x558fa5){const _0x275ecd=_0x37f22a[_0x3eba57(0x199)],_0x2d03ba=_0x37f22a[_0x3eba57(0x16c)],_0x475c2a=_0x2d03ba?{'from':void 0x0}:{'to':void 0x0},_0xdac302=_0x2d03ba?{'from':{'shapeId':_0x37f22a[_0x3eba57(0x22d)],'cxnIndex':_0x37f22a['cxnIndex']}}:{'to':{'shapeId':_0x37f22a[_0x3eba57(0x22d)],'cxnIndex':_0x37f22a[_0x3eba57(0x1b2)]}};_0x11946e[_0x3eba57(0x20e)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x1ff829,'subUnitId':_0x47d40b,'shapeId':_0x275ecd,'shapeData':{'relation':_0x475c2a}}}),_0x2a459c[_0x3eba57(0x20e)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x1ff829,'subUnitId':_0x47d40b,'shapeId':_0x275ecd,'shapeData':{'relation':_0xdac302}}});}}),{'preRedos':_0x11946e,'redos':[],'preUndos':[],'undos':_0x2a459c};}if(_0xf74401['id']===_univerjs_sheets_drawing[_0x23c418(0x181)]['id']){const {drawings:_0x107b15}=_0xf74401[_0x23c418(0x204)],_0x2ee127=_0x107b15['filter'](_0x1bbdb2=>_0x1bbdb2['drawingType']===_univerjs_core[_0x23c418(0x173)][_0x23c418(0x193)]);if(_0x2ee127['length']===0x0)return{'preRedos':[],'redos':[],'preUndos':[],'undos':[]};const _0x324608=[],_0x55e846=[];for(const _0x3af4ca of _0x2ee127){const {unitId:_0x2187f8,subUnitId:_0x438c40,drawingId:_0x34ffab,transform:_0x287769}=_0x3af4ca;if(!_0x2187f8||!_0x438c40||!_0x34ffab||!_0x287769)continue;const _0xe2a395=this[_0x23c418(0x196)][_0x23c418(0x1a4)](_0x2187f8,_0x438c40,_0x34ffab);if(!_0xe2a395)throw new TypeError(_0x23c418(0x18c)+_0xe2a395);if((0x0,_univerjs_pro_engine_shape[_0x23c418(0x1fd)])(_0xe2a395['getShapeType']())){const _0x4b430f=this[_0x23c418(0x196)][_0x23c418(0x179)](_0x2187f8,_0x438c40,_0x34ffab),_0x991449={'from':void 0x0,'to':void 0x0};_0x4b430f&&(_0x324608['push']({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x2187f8,'subUnitId':_0x438c40,'shapeId':_0x34ffab,'shapeData':{'relation':_0x991449}}}),_0x55e846['push']({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x2187f8,'subUnitId':_0x438c40,'shapeId':_0x34ffab,'shapeData':{'relation':_0x4b430f}}}));}else{const _0x3b3971=this['_sheetsShapeService'][_0x23c418(0x1d1)](_0x2187f8,_0x438c40,_0x34ffab);if(_0x3b3971&&_0x3b3971['length']>0x0)for(const _0x57634f of _0x3b3971){const _0x35b1f7=_0x57634f[_0x23c418(0x199)],_0x43ae34=_0x57634f[_0x23c418(0x16c)],_0x445751=this[_0x23c418(0x196)][_0x23c418(0x1a4)](_0x2187f8,_0x438c40,_0x35b1f7);if(!_0x445751)continue;const _0xc66c81=_0x445751['getStartConnectInfo'](),_0x5ee475=_0x445751[_0x23c418(0x16d)]();if(_0xc66c81&&_0x5ee475)this[_0x23c418(0x214)](_0x2187f8,_0x438c40,_0x35b1f7,_0x445751,_0xc66c81,_0x5ee475,_0x324608,_0x55e846,_0x34ffab,_0x287769);else this['_addLineFollowShapeUpdates'](_0x2187f8,_0x438c40,_0x35b1f7,_0x445751,_0x43ae34?_0xc66c81:_0x5ee475,_0x43ae34,_0x324608,_0x55e846,_0x34ffab,_0x287769);}}}return{'preRedos':[],'redos':_0x324608,'preUndos':_0x55e846,'undos':[]};}return{'preRedos':[],'redos':[],'preUndos':[],'undos':[]};}}));}['_getConnectPointInfo'](_0x23e598,_0x112464,_0x49d323,_0xe0daf1,_0x2129af){const _0x58f200=_0x1420e0;if(!_0x112464||!_0x49d323)return null;const {shapeId:_0x1b3159,cxnIndex:_0x1ac1b7}=_0x23e598,_0x4b6402=this[_0x58f200(0x196)][_0x58f200(0x1a4)](_0x112464,_0x49d323,_0x1b3159);if(!_0x4b6402)return null;const _0x48332d=this[_0x58f200(0x1e7)]['getDrawingByParam']({'unitId':_0x112464,'subUnitId':_0x49d323,'drawingId':_0x1b3159});if(!(_0x48332d===null||_0x48332d===void 0x0?void 0x0:_0x48332d[_0x58f200(0x17e)]))return null;let {left:left=0x0,top:top=0x0,width:width=0x0,height:height=0x0,flipX:flipX=![],flipY:flipY=![],angle:_0x44c441}=_0x48332d[_0x58f200(0x17e)];if(_0x2129af&&_0xe0daf1===_0x1b3159){var _0x319c3c,_0x28d7bf,_0x33c618,_0x29f397,_0x5054b3,_0x442c4d,_0x448fc6;left=(_0x319c3c=_0x2129af['left'])!==null&&_0x319c3c!==void 0x0?_0x319c3c:left,top=(_0x28d7bf=_0x2129af[_0x58f200(0x1e4)])!==null&&_0x28d7bf!==void 0x0?_0x28d7bf:top,width=(_0x33c618=_0x2129af['width'])!==null&&_0x33c618!==void 0x0?_0x33c618:width,height=(_0x29f397=_0x2129af[_0x58f200(0x1da)])!==null&&_0x29f397!==void 0x0?_0x29f397:height,flipX=(_0x5054b3=_0x2129af[_0x58f200(0x216)])!==null&&_0x5054b3!==void 0x0?_0x5054b3:flipX,flipY=(_0x442c4d=_0x2129af[_0x58f200(0x195)])!==null&&_0x442c4d!==void 0x0?_0x442c4d:flipY,_0x44c441=(_0x448fc6=_0x2129af['angle'])!==null&&_0x448fc6!==void 0x0?_0x448fc6:_0x44c441;}_0x4b6402[_0x58f200(0x1fe)]({'width':width,'height':height});const _0x2e392a=_0x4b6402['getConnectionSiteList']()[_0x58f200(0x222)](_0x19849f=>_0x19849f[_0x58f200(0x175)]===_0x1ac1b7);if(!_0x2e392a)return null;let _0x2783d9=flipX?width-_0x2e392a['x']:_0x2e392a['x'],_0x593c29=flipY?height-_0x2e392a['y']:_0x2e392a['y'];if(_0x44c441!==0x0&&_0x44c441!==void 0x0&&_0x44c441!==null){const _0x42917e=_0x44c441*Math['PI']/0xb4,_0x381b99=Math[_0x58f200(0x18f)](_0x42917e),_0x1bd614=Math[_0x58f200(0x1b4)](_0x42917e),_0x2d6e60=width/0x2,_0x40ad50=height/0x2,_0x26a94=_0x2783d9-_0x2d6e60,_0x2fb494=_0x593c29-_0x40ad50;_0x2783d9=_0x2d6e60+_0x26a94*_0x381b99-_0x2fb494*_0x1bd614,_0x593c29=_0x40ad50+_0x26a94*_0x1bd614+_0x2fb494*_0x381b99;}_0x2783d9+=left,_0x593c29+=top;let _0x1c629f=_0x2e392a['ang']/0xea60;if(flipX)_0x1c629f=0xb4-_0x1c629f;if(flipY)_0x1c629f=-_0x1c629f;_0x1c629f+=_0x44c441||0x0,_0x1c629f=(_0x1c629f%0x168+0x168)%0x168;const _0x563d15=(0x0,_univerjs_pro_engine_shape['getBasicShapeRotateBound'])({'left':left,'top':top,'width':width,'height':height},_0x44c441||0x0);return{'point':{'x':_0x2783d9,'y':_0x593c29},'angle':_0x1c629f,'bounds':_0x563d15};}['_addLineRerouteUpdates'](_0x284d02,_0x1b409a,_0x262172,_0x4389e6,_0x170e6f,_0x344fec,_0x94b8e6,_0x257874,_0x3a8b6c,_0x528ad9){const _0x4a2e3a=_0x1420e0,_0x1a3968=this[_0x4a2e3a(0x1cd)][_0x4a2e3a(0x16f)](_0x284d02,_0x1b409a);if(!_0x1a3968)return;const _0x4f8077=_0x4389e6[_0x4a2e3a(0x1c1)](),_0x366386=_0x4389e6[_0x4a2e3a(0x208)](),_0x267bbd={},_0x193d1b={};_0x366386[_0x4a2e3a(0x22a)](_0x281126=>{const _0x3c14d1=_0x4389e6['getAdjustValueByName'](_0x281126);_0x193d1b[_0x281126]=_0x3c14d1!==null&&_0x3c14d1!==void 0x0?_0x3c14d1:0x0;});const _0x487775=this['_getConnectPointInfo'](_0x170e6f,_0x284d02,_0x1b409a,_0x3a8b6c,_0x528ad9),_0x198691=this[_0x4a2e3a(0x1ee)](_0x344fec,_0x284d02,_0x1b409a,_0x3a8b6c,_0x528ad9);if(_0x487775&&_0x198691){const _0x15e11b=_0x4389e6['getShapeType'](),_0x47f842=(0x0,_univerjs_pro_engine_shape[_0x4a2e3a(0x1fc)])(_0x487775,_0x198691,_0x15e11b);let _0x4bef90=_0x15e11b;if(_0x47f842){const _0x416cb5=(0x0,_univerjs_pro_engine_shape['computeConnectorRouteLayout'])(_0x47f842,_0x4389e6[_0x4a2e3a(0x1db)]()),_0x30cb59=this[_0x4a2e3a(0x1e7)][_0x4a2e3a(0x170)](_0x284d02,_0x1b409a);if(_0x30cb59&&_0x30cb59[_0x262172]){const _0x140854=_0x30cb59[_0x262172];_0x4bef90=_0x416cb5['lineType'];for(const [_0x352507,_0x3492ad]of Object[_0x4a2e3a(0x1fa)](_0x416cb5['adjustValues']))_0x267bbd[_0x352507]=_0x3492ad;const _0x3ebd2f={..._0x140854[_0x4a2e3a(0x17e)],'width':_0x416cb5[_0x4a2e3a(0x210)][_0x4a2e3a(0x225)],'height':_0x416cb5[_0x4a2e3a(0x210)][_0x4a2e3a(0x1da)],'left':_0x416cb5[_0x4a2e3a(0x210)][_0x4a2e3a(0x21f)],'top':_0x416cb5[_0x4a2e3a(0x210)][_0x4a2e3a(0x1e4)],'flipX':_0x416cb5['worldRect'][_0x4a2e3a(0x216)],'flipY':_0x416cb5[_0x4a2e3a(0x210)][_0x4a2e3a(0x195)],'angle':_0x416cb5[_0x4a2e3a(0x21b)]},_0x13af0b=(0x0,_univerjs_sheets_drawing['transformToDrawingPosition'])(_0x3ebd2f,_0x1a3968),_0x3ce060=(0x0,_univerjs_sheets_drawing[_0x4a2e3a(0x21a)])(_0x3ebd2f,_0x1a3968),_0xe41bf8={'unitId':_0x284d02,'subUnitId':_0x1b409a,'drawingType':_univerjs_core[_0x4a2e3a(0x173)][_0x4a2e3a(0x193)],'drawingId':_0x262172,'transform':_0x3ebd2f,'sheetTransform':_0x13af0b,'axisAlignSheetTransform':_0x3ce060},{unitId:_0x35505b,subUnitId:_0x42b7e0,undo:_0x880f00,redo:_0xa7273f,objects:_0x39f1b3}=this[_0x4a2e3a(0x1e7)][_0x4a2e3a(0x169)]([_0xe41bf8]);_0x94b8e6[_0x4a2e3a(0x20e)]({'id':_univerjs_sheets_drawing[_0x4a2e3a(0x1f4)]['id'],'params':{'unitId':_0x35505b,'subUnitId':_0x42b7e0,'op':_0xa7273f,'objects':_0x39f1b3,'type':_univerjs_sheets_drawing['DrawingApplyType'][_0x4a2e3a(0x1b9)]}}),_0x257874[_0x4a2e3a(0x20e)]({'id':_univerjs_sheets_drawing[_0x4a2e3a(0x1f4)]['id'],'params':{'unitId':_0x35505b,'subUnitId':_0x42b7e0,'op':_0x880f00,'objects':_0x39f1b3,'type':_univerjs_sheets_drawing[_0x4a2e3a(0x1ac)]['UPDATE']}});}_0x4389e6[_0x4a2e3a(0x22b)]();}_0x94b8e6[_0x4a2e3a(0x20e)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x284d02,'subUnitId':_0x1b409a,'shapeId':_0x262172,'shapeType':_0x4bef90,'shapeData':{'adjustValues':_0x267bbd,'relation':_0x4f8077}}}),_0x257874['push']({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x284d02,'subUnitId':_0x1b409a,'shapeId':_0x262172,'shapeType':_0x15e11b,'shapeData':{'adjustValues':_0x193d1b,'relation':_0x4f8077}}});}}[_0x1420e0(0x1bf)](_0xf9d972,_0x10fb4c,_0x597c3b,_0x3fcac3,_0x47b474,_0x39f437,_0x494f6c,_0x2fee9b,_0xcdd3fb,_0x37ed32){const _0x276d0a=_0x1420e0;var _0x1b7661;if(!_0x47b474)return;const _0x4f54af=this[_0x276d0a(0x1cd)][_0x276d0a(0x16f)](_0xf9d972,_0x10fb4c);if(!_0x4f54af)return;const _0x1a971f=(_0x1b7661=this[_0x276d0a(0x1e7)]['getDrawingByParam']({'unitId':_0xf9d972,'subUnitId':_0x10fb4c,'drawingId':_0xcdd3fb}))===null||_0x1b7661===void 0x0?void 0x0:_0x1b7661['transform'];if(!_0x1a971f)return;const _0x48c759=_0x1a971f[_0x276d0a(0x21f)]!==_0x37ed32['left']||_0x1a971f['top']!==_0x37ed32[_0x276d0a(0x1e4)],_0x401e8e=_0x1a971f[_0x276d0a(0x225)]!==_0x37ed32[_0x276d0a(0x225)]||_0x1a971f['height']!==_0x37ed32['height'],_0x2a308f=_0x1a971f[_0x276d0a(0x216)]!==_0x37ed32[_0x276d0a(0x216)]||_0x1a971f[_0x276d0a(0x195)]!==_0x37ed32[_0x276d0a(0x195)],_0x1d2c1f=_0x1a971f['angle']!==_0x37ed32[_0x276d0a(0x205)];if(_0x48c759&&!_0x401e8e&&!_0x2a308f&&!_0x1d2c1f){var _0x6b548e,_0x11ed4c,_0x5e1a37,_0x299761;const _0x661232=((_0x6b548e=_0x37ed32[_0x276d0a(0x21f)])!==null&&_0x6b548e!==void 0x0?_0x6b548e:0x0)-((_0x11ed4c=_0x1a971f['left'])!==null&&_0x11ed4c!==void 0x0?_0x11ed4c:0x0),_0x240349=((_0x5e1a37=_0x37ed32[_0x276d0a(0x1e4)])!==null&&_0x5e1a37!==void 0x0?_0x5e1a37:0x0)-((_0x299761=_0x1a971f['top'])!==null&&_0x299761!==void 0x0?_0x299761:0x0),_0x448d72=this['_drawingManagerService'][_0x276d0a(0x170)](_0xf9d972,_0x10fb4c);if(_0x448d72&&_0x448d72[_0x597c3b]){var _0x1ec79b,_0x122468,_0x424294,_0x158a17;const _0x2c8b78=_0x448d72[_0x597c3b],_0xe0f0b4={..._0x2c8b78[_0x276d0a(0x17e)],'left':((_0x1ec79b=(_0x122468=_0x2c8b78['transform'])===null||_0x122468===void 0x0?void 0x0:_0x122468[_0x276d0a(0x21f)])!==null&&_0x1ec79b!==void 0x0?_0x1ec79b:0x0)+_0x661232,'top':((_0x424294=(_0x158a17=_0x2c8b78[_0x276d0a(0x17e)])===null||_0x158a17===void 0x0?void 0x0:_0x158a17[_0x276d0a(0x1e4)])!==null&&_0x424294!==void 0x0?_0x424294:0x0)+_0x240349},_0x4c5c0b=(0x0,_univerjs_sheets_drawing['transformToDrawingPosition'])(_0xe0f0b4,_0x4f54af),_0x3689cf=(0x0,_univerjs_sheets_drawing[_0x276d0a(0x21a)])(_0xe0f0b4,_0x4f54af),_0x4d4d01={'unitId':_0xf9d972,'subUnitId':_0x10fb4c,'drawingType':_univerjs_core['DrawingTypeEnum']['DRAWING_SHAPE'],'drawingId':_0x597c3b,'transform':_0xe0f0b4,'sheetTransform':_0x4c5c0b,'axisAlignSheetTransform':_0x3689cf},{unitId:_0x46cda8,subUnitId:_0x25493b,undo:_0x309932,redo:_0x23b41e,objects:_0x25bdac}=this[_0x276d0a(0x1e7)][_0x276d0a(0x169)]([_0x4d4d01]);_0x494f6c[_0x276d0a(0x20e)]({'id':_univerjs_sheets_drawing[_0x276d0a(0x1f4)]['id'],'params':{'unitId':_0x46cda8,'subUnitId':_0x25493b,'op':_0x23b41e,'objects':_0x25bdac,'type':_univerjs_sheets_drawing['DrawingApplyType'][_0x276d0a(0x1b9)]}}),_0x2fee9b[_0x276d0a(0x20e)]({'id':_univerjs_sheets_drawing[_0x276d0a(0x1f4)]['id'],'params':{'unitId':_0x46cda8,'subUnitId':_0x25493b,'op':_0x309932,'objects':_0x25bdac,'type':_univerjs_sheets_drawing[_0x276d0a(0x1ac)]['UPDATE']}});}}else{const _0x4b6bea=_0x3fcac3[_0x276d0a(0x1be)](),_0x2e86b4=_0x3fcac3['getEndConnectInfo']();this[_0x276d0a(0x214)](_0xf9d972,_0x10fb4c,_0x597c3b,_0x3fcac3,_0x4b6bea,_0x2e86b4,_0x494f6c,_0x2fee9b,_0xcdd3fb,_0x37ed32);}}};function _0x1b33(_0x435406,_0xcccff1){_0x435406=_0x435406-0x165;const _0x5df675=_0x5df6();let _0x1b3367=_0x5df675[_0x435406];return _0x1b3367;}SheetsShapeController=__decorate([__decorateParam(0x0,_univerjs_core[_0x1420e0(0x1f0)]),__decorateParam(0x1,(0x0,_univerjs_core[_0x1420e0(0x19b)])(_univerjs_sheets['SheetInterceptorService'])),__decorateParam(0x2,(0x0,_univerjs_core['Inject'])(_univerjs_sheets['SheetSkeletonService'])),__decorateParam(0x3,(0x0,_univerjs_core[_0x1420e0(0x19b)])(SheetsShapeService)),__decorateParam(0x4,(0x0,_univerjs_core[_0x1420e0(0x19b)])(_univerjs_drawing['IDrawingManagerService']))],SheetsShapeController);let UniverSheetsShapePlugin=class UniverSheetsShapePlugin extends _univerjs_core[_0x1420e0(0x1d4)]{constructor(_0x59ac3b=defaultPluginConfig,_0x3e3722,_0x3d01c0,_0x9b7bdf){const _0x26f04d=_0x1420e0;super(),this[_0x26f04d(0x1c7)]=_0x59ac3b,this[_0x26f04d(0x1cf)]=_0x3e3722,this['_commandService']=_0x3d01c0,this['_configService']=_0x9b7bdf;const {..._0x5c4f33}=(0x0,_univerjs_core[_0x26f04d(0x219)])({},defaultPluginConfig,this[_0x26f04d(0x1c7)]);this[_0x26f04d(0x1df)]['setConfig'](SHEETS_SHAPE_PLUGIN_CONFIG_KEY,_0x5c4f33);}[_0x1420e0(0x1cb)](){const _0x2b30aa=_0x1420e0,_0x515c2a=this[_0x2b30aa(0x1cf)];[[SheetShapeModelManager],[SheetsShapeService],[SheetsShapeController]][_0x2b30aa(0x22a)](_0x405fb0=>_0x515c2a[_0x2b30aa(0x1f6)](_0x405fb0)),(0x0,_univerjs_core[_0x2b30aa(0x194)])(_0x515c2a,[[SheetsShapeService],[SheetsShapeController]]);}};_defineProperty(UniverSheetsShapePlugin,_0x1420e0(0x1e0),_univerjs_core[_0x1420e0(0x20d)][_0x1420e0(0x20f)]),_defineProperty(UniverSheetsShapePlugin,_0x1420e0(0x1d6),'SHEET_SHAPE_PLUGIN'),_defineProperty(UniverSheetsShapePlugin,_0x1420e0(0x1fb),name),_defineProperty(UniverSheetsShapePlugin,_0x1420e0(0x19f),version),UniverSheetsShapePlugin=__decorate([(0x0,_univerjs_core[_0x1420e0(0x1a2)])(_univerjs_pro_license[_0x1420e0(0x1f3)]),__decorateParam(0x1,(0x0,_univerjs_core[_0x1420e0(0x19b)])(_univerjs_core['Injector'])),__decorateParam(0x2,_univerjs_core['ICommandService']),__decorateParam(0x3,_univerjs_core[_0x1420e0(0x232)])],UniverSheetsShapePlugin),exports[_0x1420e0(0x1eb)]=DEFAULT_SHAPE_HEIGHT,exports['DEFAULT_SHAPE_WIDTH']=DEFAULT_SHAPE_WIDTH,exports[_0x1420e0(0x221)]=InsertShapeCommand,exports[_0x1420e0(0x1c3)]=InsertSheetsShapeMutation,exports['RemoveSheetsShapeMutation']=RemoveSheetsShapeMutation,exports[_0x1420e0(0x1d9)]=SetShapeDrawingDataCommand,exports['SetSheetsShapeRotateCommand']=SetSheetsShapeRotateCommand,exports[_0x1420e0(0x18d)]=SetSheetsShapeTextVerticalToggleCommand,Object[_0x1420e0(0x1c8)](exports,_0x1420e0(0x201),{'enumerable':!![],'get':function(){return SheetsShapeService;}}),exports[_0x1420e0(0x1bd)]=ToggleSheetsShapeFlipCommand,Object[_0x1420e0(0x1c8)](exports,_0x1420e0(0x182),{'enumerable':!![],'get':function(){return UniverSheetsShapePlugin;}}),exports['UpdateConnectorRelationCommand']=UpdateConnectorRelationCommand,exports[_0x1420e0(0x1f5)]=UpdateLineShapeResizeCommand,exports['UpdateSheetsShapeDataMutation']=UpdateSheetsShapeDataMutation,exports[_0x1420e0(0x1e2)]=UpdateSheetsShapeTypeCommand,exports[_0x1420e0(0x184)]=UpdateSheetsShapeTypeMutation;
|
|
1
|
+
const _0x29928d=_0x8c1b;(function(_0x5c483d,_0x131fbb){const _0x23f053=_0x8c1b,_0x5f101a=_0x5c483d();while(!![]){try{const _0x51a86d=-parseInt(_0x23f053(0x1c7))/0x1*(parseInt(_0x23f053(0x1dd))/0x2)+-parseInt(_0x23f053(0x1fb))/0x3+parseInt(_0x23f053(0x1b7))/0x4+-parseInt(_0x23f053(0x1a7))/0x5+-parseInt(_0x23f053(0x230))/0x6*(parseInt(_0x23f053(0x211))/0x7)+parseInt(_0x23f053(0x1d2))/0x8*(-parseInt(_0x23f053(0x20c))/0x9)+-parseInt(_0x23f053(0x189))/0xa*(-parseInt(_0x23f053(0x21a))/0xb);if(_0x51a86d===_0x131fbb)break;else _0x5f101a['push'](_0x5f101a['shift']());}catch(_0x47c667){_0x5f101a['push'](_0x5f101a['shift']());}}}(_0x48d2,0xac6fc),Object['defineProperty'](exports,Symbol[_0x29928d(0x19e)],{'value':_0x29928d(0x1b4)}));function _0x8c1b(_0x4369ee,_0x148a3d){_0x4369ee=_0x4369ee-0x180;const _0x48d2d4=_0x48d2();let _0x8c1b44=_0x48d2d4[_0x4369ee];return _0x8c1b44;}let _univerjs_pro_engine_shape=require('@univerjs-pro/engine-shape'),_univerjs_core=require('@univerjs/core'),_univerjs_sheets=require('@univerjs/sheets'),_univerjs_sheets_drawing=require('@univerjs/sheets-drawing'),_univerjs_pro_license=require('@univerjs-pro/license'),_univerjs_drawing=require('@univerjs/drawing');const DEFAULT_SHAPE_WIDTH=0xc8,DEFAULT_SHAPE_HEIGHT=0xc8;function _typeof(_0x5e631d){'@babel/helpers - typeof';const _0x1b2a60=_0x29928d;return _typeof=_0x1b2a60(0x195)==typeof Symbol&&_0x1b2a60(0x240)==typeof Symbol[_0x1b2a60(0x19a)]?function(_0x11856e){return typeof _0x11856e;}:function(_0x8cec78){const _0x337558=_0x1b2a60;return _0x8cec78&&_0x337558(0x195)==typeof Symbol&&_0x8cec78[_0x337558(0x1fe)]===Symbol&&_0x8cec78!==Symbol['prototype']?_0x337558(0x240):typeof _0x8cec78;},_typeof(_0x5e631d);}function toPrimitive(_0x4e8caf,_0x3640d8){const _0x2a456b=_0x29928d;if(_0x2a456b(0x197)!=_typeof(_0x4e8caf)||!_0x4e8caf)return _0x4e8caf;var _0x5c4e2c=_0x4e8caf[Symbol[_0x2a456b(0x1b8)]];if(void 0x0!==_0x5c4e2c){var _0x283dfe=_0x5c4e2c[_0x2a456b(0x18b)](_0x4e8caf,_0x3640d8||'default');if(_0x2a456b(0x197)!=_typeof(_0x283dfe))return _0x283dfe;throw new TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x2a456b(0x1e3)===_0x3640d8?String:Number)(_0x4e8caf);}function toPropertyKey(_0x4a02b4){var _0x33489f=toPrimitive(_0x4a02b4,'string');return'symbol'==_typeof(_0x33489f)?_0x33489f:_0x33489f+'';}function _defineProperty(_0x13a90d,_0xf48cb4,_0x5b07c7){const _0x5c7c2a=_0x29928d;return(_0xf48cb4=toPropertyKey(_0xf48cb4))in _0x13a90d?Object[_0x5c7c2a(0x1e0)](_0x13a90d,_0xf48cb4,{'value':_0x5b07c7,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x13a90d[_0xf48cb4]=_0x5b07c7,_0x13a90d;}var SheetShapeModelManager=class extends _univerjs_core[_0x29928d(0x1d1)]{constructor(){const _0x42bc46=_0x29928d;super(),_defineProperty(this,_0x42bc46(0x202),new Map()),_defineProperty(this,_0x42bc46(0x232),new Set()),_defineProperty(this,_0x42bc46(0x1a5),new Set());}[_0x29928d(0x23c)](_0x25957e,_0x13d311,_0x121c58){const _0x392a20=_0x29928d,_0x1e271b=new _univerjs_pro_engine_shape['ShapeModel'](_0x25957e,_0x13d311,_0x121c58);this[_0x392a20(0x202)]['set'](_0x13d311,_0x1e271b);if((0x0,_univerjs_pro_engine_shape['isConnectorShape'])(_0x25957e))this[_0x392a20(0x232)]['add'](_0x13d311);return _0x1e271b;}[_0x29928d(0x193)](_0xdb1b16){const _0x306a94=_0x29928d,_0x1468cc=[];for(const _0x549534 of this[_0x306a94(0x232)]){const _0x6bee8d=this[_0x306a94(0x202)][_0x306a94(0x222)](_0x549534);if(_0x6bee8d){const _0x1d237a=_0x6bee8d['getShapeRelation']();if(_0x1d237a){var _0x5db1b3,_0x3422c4;if(((_0x5db1b3=_0x1d237a['from'])===null||_0x5db1b3===void 0x0?void 0x0:_0x5db1b3[_0x306a94(0x1de)])===_0xdb1b16)_0x1468cc[_0x306a94(0x1a9)]({..._0x1d237a[_0x306a94(0x19b)],'lineShapeId':_0x549534,'isFrom':!![]});if(((_0x3422c4=_0x1d237a['to'])===null||_0x3422c4===void 0x0?void 0x0:_0x3422c4[_0x306a94(0x1de)])===_0xdb1b16)_0x1468cc[_0x306a94(0x1a9)]({..._0x1d237a['to'],'lineShapeId':_0x549534,'isFrom':![]});}}}return _0x1468cc;}[_0x29928d(0x1f2)](_0x35982d){const _0x4f6a84=_0x29928d,_0x2344d2=this['_shapes'][_0x4f6a84(0x222)](_0x35982d);if(_0x2344d2)return _0x2344d2[_0x4f6a84(0x190)]();}[_0x29928d(0x1a6)](_0x4bcc4b){const _0x222897=_0x29928d,_0x14770c=this['_shapes'][_0x222897(0x222)](_0x4bcc4b);if(_0x14770c)return _0x14770c['getShapeType']();}[_0x29928d(0x18d)](_0x35dec2){const _0x46a787=_0x29928d;return this['_shapes'][_0x46a787(0x1bf)](_0x35dec2);}[_0x29928d(0x191)](_0x392cb3){const _0x48d887=_0x29928d,_0x19dc9b=this['_shapes'][_0x48d887(0x222)](_0x392cb3);if(!_0x19dc9b)return;if((0x0,_univerjs_pro_engine_shape[_0x48d887(0x18e)])(_0x19dc9b['getShapeType']()))this[_0x48d887(0x232)][_0x48d887(0x1e9)](_0x392cb3);this[_0x48d887(0x202)][_0x48d887(0x1e9)](_0x392cb3);}[_0x29928d(0x1f6)](){const _0x3459af=_0x29928d,_0x494c94=[];return this[_0x3459af(0x202)]['forEach'](_0x4bbb8e=>{const _0x228a72=_0x3459af;_0x494c94['push'](_0x4bbb8e[_0x228a72(0x1f6)]());}),_0x494c94;}[_0x29928d(0x1c3)](_0x3228c2){const _0x18808c=_0x29928d;for(const _0x43e47f of _0x3228c2){const {id:_0x3ae05e,shapeType:_0x336356}=_0x43e47f,_0x8ce0bd=this['addShape'](_0x336356,_0x3ae05e,_0x43e47f['shapeData']);if(_0x8ce0bd&&_0x8ce0bd['isLineShape']())this[_0x18808c(0x232)][_0x18808c(0x198)](_0x3ae05e);}}[_0x29928d(0x238)](){const _0x3b6019=_0x29928d;if(this[_0x3b6019(0x1f5)])return;this['_shapes']['forEach'](_0x200ca4=>{const _0x393bc8=_0x3b6019;_0x200ca4[_0x393bc8(0x238)]();}),this[_0x3b6019(0x202)][_0x3b6019(0x1a1)](),this[_0x3b6019(0x232)][_0x3b6019(0x1a1)](),this[_0x3b6019(0x1a5)][_0x3b6019(0x1a1)](),super[_0x3b6019(0x238)]();}};function __decorateParam(_0x30d320,_0x25af28){return function(_0x5ad222,_0xebb9f4){_0x25af28(_0x5ad222,_0xebb9f4,_0x30d320);};}function __decorate(_0x1850a1,_0x7c019,_0x104dc3,_0x442629){const _0x4e0626=_0x29928d;var _0x3c9596=arguments[_0x4e0626(0x224)],_0x52fd70=_0x3c9596<0x3?_0x7c019:_0x442629===null?_0x442629=Object[_0x4e0626(0x182)](_0x7c019,_0x104dc3):_0x442629,_0x43eae3;if(typeof Reflect===_0x4e0626(0x197)&&typeof Reflect[_0x4e0626(0x220)]===_0x4e0626(0x195))_0x52fd70=Reflect['decorate'](_0x1850a1,_0x7c019,_0x104dc3,_0x442629);else{for(var _0x3e14b0=_0x1850a1[_0x4e0626(0x224)]-0x1;_0x3e14b0>=0x0;_0x3e14b0--)if(_0x43eae3=_0x1850a1[_0x3e14b0])_0x52fd70=(_0x3c9596<0x3?_0x43eae3(_0x52fd70):_0x3c9596>0x3?_0x43eae3(_0x7c019,_0x104dc3,_0x52fd70):_0x43eae3(_0x7c019,_0x104dc3))||_0x52fd70;}return _0x3c9596>0x3&&_0x52fd70&&Object[_0x4e0626(0x1e0)](_0x7c019,_0x104dc3,_0x52fd70),_0x52fd70;}const SHEET_SHAPE_PLUGIN='SHEET_SHAPE_PLUGIN';let SheetsShapeService=class SheetsShapeService extends _univerjs_core['Disposable']{constructor(_0x2c2fbd){const _0x19034c=_0x29928d;super(),this[_0x19034c(0x1b9)]=_0x2c2fbd,_defineProperty(this,_0x19034c(0x1e8),new Map()),this[_0x19034c(0x208)]();}[_0x29928d(0x1cf)](_0x3a9cb0,_0x285da5){const _0x442194=_0x29928d;let _0x45328c=this[_0x442194(0x1e8)]['get'](_0x3a9cb0);!_0x45328c&&(_0x45328c=new Map(),this['_shapeModelManagerMap']['set'](_0x3a9cb0,_0x45328c));let _0x140bbf=_0x45328c[_0x442194(0x222)](_0x285da5);return!_0x140bbf&&(_0x140bbf=new SheetShapeModelManager(),_0x45328c[_0x442194(0x19d)](_0x285da5,_0x140bbf)),_0x140bbf;}[_0x29928d(0x23a)](_0x41dcd0,_0x2cbe80,_0x16a69d,_0x22392b,_0x648d7f){const _0x5698af=_0x29928d;this[_0x5698af(0x1cf)](_0x41dcd0,_0x2cbe80)[_0x5698af(0x23c)](_0x16a69d,_0x22392b,_0x648d7f);}['removeShape'](_0x2c08c6,_0x57d7ad,_0x5180d8){const _0x371761=_0x29928d;this[_0x371761(0x1cf)](_0x2c08c6,_0x57d7ad)[_0x371761(0x191)](_0x5180d8);}['getBasicShapeType'](_0x1e1b6b,_0x4f2e9f,_0x51a2d8){const _0x2331a3=_0x29928d;return this['_ensureShapeModelManager'](_0x1e1b6b,_0x4f2e9f)[_0x2331a3(0x1a6)](_0x51a2d8);}[_0x29928d(0x1a6)](_0x2cd852,_0x54013c,_0x13b193){const _0x2c5cf7=_0x29928d;return this['_ensureShapeModelManager'](_0x2cd852,_0x54013c)[_0x2c5cf7(0x1a6)](_0x13b193);}[_0x29928d(0x18d)](_0x22bd36,_0x30cfd3,_0xce6a68){const _0x2e7432=_0x29928d;return this[_0x2e7432(0x1cf)](_0x22bd36,_0x30cfd3)['hasShape'](_0xce6a68);}[_0x29928d(0x196)](_0x28adf6,_0x38d193,_0x2302bc){const _0x3840b5=_0x29928d;return this[_0x3840b5(0x1cf)](_0x28adf6,_0x38d193)['getShapeType'](_0x2302bc);}[_0x29928d(0x200)](_0x166178,_0x2811ec,_0x3a81f4){const _0x517589=_0x29928d,_0x22063c=this['_ensureShapeModelManager'](_0x166178,_0x2811ec);if(!_0x22063c[_0x517589(0x1a6)](_0x3a81f4))return;const _0x235e1a=_0x22063c['_shapes'][_0x517589(0x222)](_0x3a81f4);if(!_0x235e1a)return;return _0x235e1a['getShapeData']();}[_0x29928d(0x1d0)](_0x29d5b5,_0x2660a0,_0x30b267){const _0x7e0e29=_0x29928d;return this[_0x7e0e29(0x1cf)](_0x29d5b5,_0x2660a0)[_0x7e0e29(0x202)][_0x7e0e29(0x222)](_0x30b267);}['getBasicShapeRelation'](_0x295a48,_0x14d182,_0x3e73f8){const _0x2453a9=_0x29928d;return this[_0x2453a9(0x1cf)](_0x295a48,_0x14d182)[_0x2453a9(0x193)](_0x3e73f8);}[_0x29928d(0x1f2)](_0x7af7e5,_0x4ad735,_0x5757c0){const _0x1dae7f=_0x29928d,_0x49dae4=this[_0x1dae7f(0x1cf)](_0x7af7e5,_0x4ad735)[_0x1dae7f(0x202)][_0x1dae7f(0x222)](_0x5757c0);if(!_0x49dae4)return;return _0x49dae4[_0x1dae7f(0x190)]();}['setShapeType'](){}[_0x29928d(0x1c9)](_0x71de06){const _0x5ab207=_0x29928d,_0x137240={},_0x396d2f=this[_0x5ab207(0x1e8)][_0x5ab207(0x222)](_0x71de06);if(_0x396d2f)_0x396d2f[_0x5ab207(0x1ae)]((_0x1e6c11,_0x116bca)=>{const _0x179121=_0x5ab207,_0x5bcc47=_0x1e6c11[_0x179121(0x1f6)]();if(_0x5bcc47[_0x179121(0x224)]>0x0)_0x137240[_0x116bca]=_0x5bcc47;});return JSON[_0x5ab207(0x234)](_0x137240);}[_0x29928d(0x20a)](_0x1dbd3d,_0x422d2f){const _0x5081a6=_0x29928d;Object[_0x5081a6(0x1fd)](_0x422d2f)[_0x5081a6(0x1ae)](_0x4d2ae9=>{const _0x2dd202=_0x5081a6;this[_0x2dd202(0x1cf)](_0x1dbd3d,_0x4d2ae9)[_0x2dd202(0x1c3)](_0x422d2f[_0x4d2ae9]);});}['toJSON'](){const _0x14250e=_0x29928d,_0x4d8336={};return this[_0x14250e(0x1e8)][_0x14250e(0x1ae)]((_0x2b6954,_0x8ee0f1)=>{const _0x382c83=_0x14250e;_0x4d8336[_0x8ee0f1]={},_0x2b6954[_0x382c83(0x1ae)]((_0x56af6e,_0x260804)=>{const _0x18dba7=_0x382c83;_0x4d8336[_0x8ee0f1][_0x260804]=_0x56af6e[_0x18dba7(0x1f6)]();});}),_0x4d8336;}[_0x29928d(0x1c3)](_0x3f5c40){const _0x473aa0=_0x29928d;Object[_0x473aa0(0x1fd)](_0x3f5c40)['forEach'](_0x5cefb7=>{const _0x2c74c7=_0x3f5c40[_0x5cefb7];Object['keys'](_0x2c74c7)['forEach'](_0x26a9e2=>{const _0xffed8a=_0x8c1b;this[_0xffed8a(0x1cf)](_0x5cefb7,_0x26a9e2)[_0xffed8a(0x1c3)](_0x2c74c7[_0x26a9e2]);});});}['_initSnapshot'](){const _0x55933c=_0x29928d;this['_resourcesManagerService']['registerPluginResource']({'pluginName':SHEET_SHAPE_PLUGIN,'businesses':[_univerjs_core[_0x55933c(0x22d)]['UNIVER_SHEET']],'toJson':_0x473321=>this[_0x55933c(0x1c9)](_0x473321),'parseJson':_0x50eb46=>JSON['parse'](_0x50eb46),'onLoad':(_0x2a0776,_0x50c4d5)=>{const _0x5c9aa3=_0x55933c;this[_0x5c9aa3(0x20a)](_0x2a0776,_0x50c4d5);},'onUnLoad':_0x71d14f=>{const _0x53d22b=_0x55933c,_0x175102=this[_0x53d22b(0x1e8)][_0x53d22b(0x222)](_0x71d14f);_0x175102&&(_0x175102['forEach'](_0x2719b9=>{const _0x28931d=_0x53d22b;_0x2719b9[_0x28931d(0x238)]();}),this[_0x53d22b(0x1e8)][_0x53d22b(0x1e9)](_0x71d14f));}});}[_0x29928d(0x238)](){const _0x1033ad=_0x29928d;this[_0x1033ad(0x1e8)][_0x1033ad(0x1ae)](_0x307c90=>{const _0x420cae=_0x1033ad;_0x307c90[_0x420cae(0x1ae)](_0x388375=>{_0x388375['dispose']();});});}};function _0x48d2(){const _0x2f1c78=['toStringTag','DEFAULT_SHAPE_HEIGHT','filter','clear','sheet.mutation.update-shape-type','pushUndoRedo','SheetsShapeService','_groupIds','getShapeType','5128940cVdVjB','ISheetDrawingService','push','computeConnectorRouteLayout','IDrawingManagerService','_addLineFollowShapeUpdates','sheet.command.toggle-shape-flip','forEach','generateRandomId','DrawingTypeEnum','flipX','SHEET_SHAPE_PLUGIN','interceptCommand','Module','ToggleSheetsShapeFlipCommand','data','5007424LgwSKS','toPrimitive','_resourcesManagerService','version','getBatchUpdateOp','packageName','getEndConnectInfo','REMOVE','has','result','sequenceExecute','_initCommands','fromJSON','IUndoRedoService','RemoveSheetDrawingCommand','_initCommandInterceptor','1CoUauo','sheet.mutation.insert-shape','_serializeShapeForUnit','lineType','ang','SetSheetsShapeRotateCommand','ensureSkeleton','@univerjs-pro/sheets-shape','_ensureShapeModelManager','getShapeModel','Disposable','7584mvHBiO','UpdateSheetsShapeTypeMutation','resizeEnabled','top','sheet.command.update-line-shape-resize','UPDATE','params','IUniverInstanceService','getDrawingByParam','undos','sheet.command.update-shape-type','1537226CcBTcA','shapeId','registerCommand','defineProperty','SheetSkeletonService','fill','string','UpdateLineShapeResizeCommand','_configService','_getConnectPointInfo','InsertSheetsShapeMutation','_shapeModelManagerMap','delete','getShapeData','UNIVER_SHEET','SetDrawingApplyMutation','ClearSheetDrawingTransformerOperation','updateContext','disposeWithMe','position','SetSheetDrawingCommand','getLineShapeRelation','transform','_commandService','_disposed','toJSON','merge','flipY','DRAWING_SHAPE','redos','800931fonQuf','getStartConnectInfo','keys','constructor','getSkeleton','getShapeDataById','isFrom','_shapes','INSERT','_drawingManagerService','removeLinePoints','width','getDrawingData','_initSnapshot','rotation','_deserializeShapeForUnit','_sheetInterceptorService','2061UwlcSg','transformToDrawingPosition','adjustValues','Injector','Fail\x20to\x20get\x20shape\x20model,\x20get:\x20','413NdRvZi','sheet.command.update-connector-relation','setShapeData','Inject','IConfigService','ICommandService','RemoveSheetsShapeMutation','UpdateSheetsShapeDataMutation','setShapeType','55KfhjyZ','left','startX','_sheetsShapeService','lineShapeId','getConnectionSiteList','decorate','borderEnabled','get','getCellWithCoordByIndex','length','type','_injector','DrawingApplyType','isHorizontal','UniverLicensePlugin','preRedos','getCellIndexAndOffsetByPosition','every','UniverInstanceType','sheet.mutation.update-shape-data','UniverSheetsShapePlugin','119274wtqwYY','COMMAND','_linesIds','_sheetSkeletonService','stringify','InsertShapeCommand','Plugin','UpdateSheetsShapeTypeCommand','dispose','_addLineRerouteUpdates','insertShape','angle','addShape','SheetInterceptorService','getSheetCommandTarget','sheets-shape.config','symbol','height','SetSheetsShapeTextVerticalToggleCommand','startY','relation','preUndos','cxnIndex','getOwnPropertyDescriptor','sheet.mutation.remove-shape','worldRect','range','onCommandExecute','getAdjustValueByName','DependentOn','5811550iDQawb','transformToAxisAlignPosition','call','getBatchAddOp','hasShape','isConnectorShape','drawingType','getShapeRelation','removeShape','MUTATION','getBasicShapeRelation','CommandType','function','getShapeTypeById','object','add','rotateEnabled','iterator','from','sin','set'];_0x48d2=function(){return _0x2f1c78;};return _0x48d2();}SheetsShapeService=__decorate([__decorateParam(0x0,_univerjs_core['IResourceManagerService'])],SheetsShapeService);const InsertSheetsShapeMutation={'id':_0x29928d(0x1c8),'type':_univerjs_core[_0x29928d(0x194)][_0x29928d(0x192)],'handler':(_0x57de4d,_0x515d63)=>{const _0x592389=_0x29928d,{unitId:_0x4cf7ba,subUnitId:_0x3afc07,shapeType:_0x56b5b7,shapeId:_0x4041b1,shapeData:_0x358ea0}=_0x515d63;return _0x57de4d[_0x592389(0x222)](SheetsShapeService)[_0x592389(0x23a)](_0x4cf7ba,_0x3afc07,_0x56b5b7,_0x4041b1,_0x358ea0),!![];}},RemoveSheetsShapeMutation={'id':_0x29928d(0x183),'type':_univerjs_core[_0x29928d(0x194)]['MUTATION'],'handler':(_0x16a799,_0x2eeee7)=>{const _0x2c148f=_0x29928d,{unitId:_0x48c262,subUnitId:_0x9969ff,shapeId:_0x5108b6}=_0x2eeee7;return _0x16a799['get'](SheetsShapeService)[_0x2c148f(0x191)](_0x48c262,_0x9969ff,_0x5108b6),!![];}},InsertShapeCommand={'type':_univerjs_core[_0x29928d(0x194)][_0x29928d(0x231)],'id':'sheet.command.insert-shape','handler':(_0x3fa658,_0x448169)=>{const _0x58fa31=_0x29928d;var _0x16bdf5,_0x51eaa5;const _0x454bba=(0x0,_univerjs_sheets[_0x58fa31(0x23e)])(_0x3fa658[_0x58fa31(0x222)](_univerjs_core[_0x58fa31(0x1d9)]),_0x448169);if(!_0x454bba)return![];const _0x12aa41=_0x3fa658[_0x58fa31(0x222)](_univerjs_sheets[_0x58fa31(0x1e1)]),{unitId:_0x4f9551,subUnitId:_0x5d044b}=_0x454bba,_0x4c8fc0=_0x12aa41[_0x58fa31(0x1cd)](_0x4f9551,_0x5d044b);if(!_0x4c8fc0)return![];const _0x4d2be2=_0x3fa658[_0x58fa31(0x222)](_univerjs_core[_0x58fa31(0x216)]),_0x587348=_0x3fa658[_0x58fa31(0x222)](_univerjs_core[_0x58fa31(0x1c4)]),_0x4e769b=_0x3fa658['get'](_univerjs_sheets['SheetInterceptorService']),_0x159b90=_0x3fa658['get'](_univerjs_sheets_drawing[_0x58fa31(0x1a8)]),{shapeType:_0x3f289c,shapeData:_0x10ab3e}=_0x448169,_0x185d93=_0x448169[_0x58fa31(0x1de)]||(0x0,_univerjs_core[_0x58fa31(0x1af)])(),_0x24d69d={'unitId':_0x4f9551,'subUnitId':_0x5d044b,'shapeId':_0x185d93,'shapeType':_0x3f289c,'shapeData':_0x10ab3e},_0x3f4a84=_0x448169['width']||0xc8,_0x175cb4=_0x448169['height']||0xc8;let _0x42c004=0x0,_0x2ba3aa=0x0,_0x404331={'row':0x0,'rowOffset':0x0,'column':0x0,'columnOffset':0x0},_0x283065={'row':0x0,'rowOffset':0x0,'column':0x0,'columnOffset':0x0};if(_0x448169[_0x58fa31(0x1f0)]){const {x:_0x17e0f8,y:_0x51664e}=_0x448169['position'];_0x42c004=_0x17e0f8,_0x2ba3aa=_0x51664e,_0x404331=_0x4c8fc0[_0x58fa31(0x22b)](_0x17e0f8,_0x51664e),_0x283065=_0x4c8fc0[_0x58fa31(0x22b)](_0x17e0f8+_0x3f4a84,_0x51664e+_0x175cb4);}else{if(_0x448169[_0x58fa31(0x185)]){const {startRow:_0x3cbe16,startColumn:_0x3905fb}=_0x448169[_0x58fa31(0x185)],_0x30f7e8=0xa,_0x342f4d=0xa;_0x404331={'row':_0x3cbe16,'rowOffset':_0x30f7e8,'column':_0x3905fb,'columnOffset':_0x342f4d};const _0x462b0c=_0x4c8fc0[_0x58fa31(0x223)](_0x3cbe16,_0x3905fb);_0x42c004=_0x462b0c[_0x58fa31(0x21c)]+_0x342f4d,_0x2ba3aa=_0x462b0c[_0x58fa31(0x243)]+_0x30f7e8,_0x283065=_0x4c8fc0[_0x58fa31(0x22b)](_0x42c004+_0x3f4a84,_0x2ba3aa+_0x175cb4);}}const _0x1d7900={'from':_0x404331,'to':_0x283065},_0xc3fe99={'unitId':_0x4f9551,'subUnitId':_0x5d044b,'drawingId':_0x185d93,'drawingType':_univerjs_core[_0x58fa31(0x1b0)][_0x58fa31(0x1f9)],'sheetTransform':_0x1d7900,'transform':{'left':_0x42c004,'top':_0x2ba3aa,'width':_0x3f4a84,'height':_0x175cb4},'data':{'shapeType':_0x3f289c,'shapeData':_0x10ab3e},'axisAlignSheetTransform':_0x1d7900,'allowTransform':!![]};(0x0,_univerjs_pro_engine_shape['isConnectorShape'])(_0x3f289c)&&(_0xc3fe99['data'][_0x58fa31(0x1e2)]=![],_0xc3fe99[_0x58fa31(0x1b6)][_0x58fa31(0x199)]=![],_0xc3fe99[_0x58fa31(0x1b6)][_0x58fa31(0x1d4)]=![],_0xc3fe99[_0x58fa31(0x1b6)][_0x58fa31(0x221)]=![],_0xc3fe99[_0x58fa31(0x1f3)][_0x58fa31(0x199)]=![],_0xc3fe99[_0x58fa31(0x1f3)]['resizeEnabled']=![],_0xc3fe99['transform']['borderEnabled']=![]);const {undo:_0x5595aa,redo:_0x58a97b,objects:_0xbd95dc}=_0x159b90[_0x58fa31(0x18c)]([_0xc3fe99]),_0x3b5275=_0x4e769b['onCommandExecute']({'id':_univerjs_sheets_drawing['InsertSheetDrawingCommand']['id'],'params':{'unitId':_0x4f9551,'drawings':[_0xc3fe99]}}),_0x1ee7d4=[...(_0x16bdf5=_0x3b5275[_0x58fa31(0x22a)])!==null&&_0x16bdf5!==void 0x0?_0x16bdf5:[],{'id':_univerjs_sheets_drawing[_0x58fa31(0x1ec)]['id'],'params':{'unitId':_0x4f9551,'subUnitId':_0x5d044b,'op':_0x58a97b,'objects':_0xbd95dc,'type':_univerjs_sheets_drawing['DrawingApplyType'][_0x58fa31(0x203)]}},{'id':_univerjs_sheets_drawing[_0x58fa31(0x1ed)]['id'],'params':[_0x4f9551]},..._0x3b5275[_0x58fa31(0x1fa)],{'id':InsertSheetsShapeMutation['id'],'params':_0x24d69d}],_0x52a208=[{'id':RemoveSheetsShapeMutation['id'],'params':{'unitId':_0x4f9551,'subUnitId':_0x5d044b,'shapeId':_0x185d93}},...(_0x51eaa5=_0x3b5275['preUndos'])!==null&&_0x51eaa5!==void 0x0?_0x51eaa5:[],{'id':_univerjs_sheets_drawing[_0x58fa31(0x1ec)]['id'],'params':{'unitId':_0x4f9551,'subUnitId':_0x5d044b,'op':_0x5595aa,'objects':_0xbd95dc,'type':_univerjs_sheets_drawing[_0x58fa31(0x227)][_0x58fa31(0x1be)]}},{'id':_univerjs_sheets_drawing[_0x58fa31(0x1ed)]['id'],'params':[_0x4f9551]},..._0x3b5275[_0x58fa31(0x1db)]];if((0x0,_univerjs_core['sequenceExecute'])(_0x1ee7d4,_0x4d2be2)[_0x58fa31(0x1c0)])return _0x587348[_0x58fa31(0x1a3)]({'unitID':_0x4f9551,'undoMutations':_0x52a208,'redoMutations':_0x1ee7d4}),!![];return![];}},UpdateSheetsShapeDataMutation={'id':_0x29928d(0x22e),'type':_univerjs_core[_0x29928d(0x194)][_0x29928d(0x192)],'handler':(_0x38dbca,_0x11bdea)=>{const _0x2ef5fc=_0x29928d,{unitId:_0x443b51,subUnitId:_0x4d249d,shapeType:_0x397a5a,shapeId:_0x40ce66,shapeData:_0x231e2e}=_0x11bdea,_0x58d2a5=_0x38dbca[_0x2ef5fc(0x222)](SheetsShapeService)[_0x2ef5fc(0x1d0)](_0x443b51,_0x4d249d,_0x40ce66);if(_0x58d2a5){if(_0x397a5a!==void 0x0)_0x58d2a5[_0x2ef5fc(0x219)](_0x397a5a);if(_0x231e2e)_0x58d2a5===null||_0x58d2a5===void 0x0||_0x58d2a5[_0x2ef5fc(0x213)](_0x231e2e,!![]);}return!![];}},SetShapeDrawingDataCommand={'type':_univerjs_core[_0x29928d(0x194)][_0x29928d(0x231)],'id':'sheet.command.set-shape-drawing-data','handler':(_0x4f0eae,_0x53ecd1)=>{const _0x1486c2=_0x29928d;var _0xa86350,_0x35cf97;const _0x4cec96=(0x0,_univerjs_sheets[_0x1486c2(0x23e)])(_0x4f0eae[_0x1486c2(0x222)](_univerjs_core[_0x1486c2(0x1d9)]),_0x53ecd1);if(!_0x4cec96)return![];const _0x30be07=_0x4f0eae[_0x1486c2(0x222)](_univerjs_sheets[_0x1486c2(0x1e1)]),{unitId:_0x4cef26,subUnitId:_0x1b6e4d}=_0x4cec96,_0x3c7f3f=_0x30be07['ensureSkeleton'](_0x4cef26,_0x1b6e4d);if(!_0x3c7f3f)return![];const _0x2021d9=_0x4f0eae[_0x1486c2(0x222)](SheetsShapeService),{shapeId:_0x48200c,shapeType:_0x3b5be9,shapeData:_0xc360,position:_0x31402b,width:_0x5bc09d,height:_0x25f922}=_0x53ecd1,_0x5d3178=_0x2021d9[_0x1486c2(0x1d0)](_0x4cef26,_0x1b6e4d,_0x48200c);if(!_0x5d3178)return![];const _0x1cd8e5=_0x4f0eae[_0x1486c2(0x222)](_univerjs_core['ICommandService']),_0x7fdf24=_0x4f0eae[_0x1486c2(0x222)](_univerjs_core[_0x1486c2(0x1c4)]),_0x35e135=_0x4f0eae[_0x1486c2(0x222)](_univerjs_sheets[_0x1486c2(0x23d)]),_0x57e8fe=_0x4f0eae[_0x1486c2(0x222)](_univerjs_sheets_drawing[_0x1486c2(0x1a8)]),_0x155444={'unitId':_0x4cef26,'subUnitId':_0x1b6e4d,'shapeId':_0x48200c,'shapeType':_0x3b5be9,'shapeData':_0xc360},_0x498a18=_0x5d3178[_0x1486c2(0x1a6)](),_0x4d666f=_0x5d3178[_0x1486c2(0x1ea)](),{x:_0x3619d5,y:_0x3709d9}=_0x31402b,_0x35a999={'from':_0x3c7f3f[_0x1486c2(0x22b)](_0x3619d5,_0x3709d9),'to':_0x3c7f3f['getCellIndexAndOffsetByPosition'](_0x3619d5+_0x5bc09d,_0x3709d9+_0x25f922)},_0x5d22aa={'unitId':_0x4cef26,'subUnitId':_0x1b6e4d,'drawingId':_0x48200c,'drawingType':_univerjs_core[_0x1486c2(0x1b0)][_0x1486c2(0x1f9)],'sheetTransform':_0x35a999,'transform':{'left':_0x3619d5,'top':_0x3709d9,'width':_0x5bc09d,'height':_0x25f922},'data':{'shapeType':_0x3b5be9,'shapeData':_0xc360},'axisAlignSheetTransform':_0x35a999,'allowTransform':!![]};(0x0,_univerjs_pro_engine_shape[_0x1486c2(0x18e)])(_0x3b5be9)&&(_0x5d22aa[_0x1486c2(0x1b6)][_0x1486c2(0x1e2)]=![],_0x5d22aa[_0x1486c2(0x1b6)][_0x1486c2(0x199)]=![],_0x5d22aa['data'][_0x1486c2(0x1d4)]=![],_0x5d22aa[_0x1486c2(0x1b6)][_0x1486c2(0x221)]=![],_0x5d22aa[_0x1486c2(0x1f3)][_0x1486c2(0x199)]=![],_0x5d22aa[_0x1486c2(0x1f3)][_0x1486c2(0x1d4)]=![],_0x5d22aa[_0x1486c2(0x1f3)][_0x1486c2(0x221)]=![]);const {undo:_0x978154,redo:_0x39f6df,objects:_0x14019f}=_0x57e8fe[_0x1486c2(0x1bb)]([_0x5d22aa]),_0x702921=_0x35e135[_0x1486c2(0x186)]({'id':_univerjs_sheets_drawing[_0x1486c2(0x1f1)]['id'],'params':{'unitId':_0x4cef26,'drawings':[_0x5d22aa]}}),_0x1895fd=[...(_0xa86350=_0x702921[_0x1486c2(0x22a)])!==null&&_0xa86350!==void 0x0?_0xa86350:[],{'id':_univerjs_sheets_drawing['SetDrawingApplyMutation']['id'],'params':{'unitId':_0x4cef26,'subUnitId':_0x1b6e4d,'op':_0x39f6df,'objects':_0x14019f,'type':_univerjs_sheets_drawing[_0x1486c2(0x227)][_0x1486c2(0x1d7)]}},{'id':_univerjs_sheets_drawing[_0x1486c2(0x1ed)]['id'],'params':[_0x4cef26]},..._0x702921[_0x1486c2(0x1fa)],{'id':UpdateSheetsShapeDataMutation['id'],'params':_0x155444}],_0x401452=[...(_0x35cf97=_0x702921[_0x1486c2(0x180)])!==null&&_0x35cf97!==void 0x0?_0x35cf97:[],{'id':_univerjs_sheets_drawing[_0x1486c2(0x1ec)]['id'],'params':{'unitId':_0x4cef26,'subUnitId':_0x1b6e4d,'op':_0x978154,'objects':_0x14019f,'type':_univerjs_sheets_drawing[_0x1486c2(0x227)][_0x1486c2(0x1d7)]}},{'id':_univerjs_sheets_drawing['ClearSheetDrawingTransformerOperation']['id'],'params':[_0x4cef26]},..._0x702921[_0x1486c2(0x1db)],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x4cef26,'subUnitId':_0x1b6e4d,'shapeType':_0x498a18,'shapeId':_0x48200c,'shapeData':_0x4d666f}}];if((0x0,_univerjs_core[_0x1486c2(0x1c1)])(_0x1895fd,_0x1cd8e5)[_0x1486c2(0x1c0)])return _0x7fdf24[_0x1486c2(0x1a3)]({'unitID':_0x4cef26,'undoMutations':_0x401452,'redoMutations':_0x1895fd}),!![];return![];}},ToggleSheetsShapeFlipCommand={'type':_univerjs_core[_0x29928d(0x194)][_0x29928d(0x231)],'id':_0x29928d(0x1ad),'handler':(_0x1d9653,_0x112bf1)=>{const _0x266971=_0x29928d;var _0x2cb9e1,_0xa5154;const _0x5ad161=(0x0,_univerjs_sheets[_0x266971(0x23e)])(_0x1d9653[_0x266971(0x222)](_univerjs_core[_0x266971(0x1d9)]),_0x112bf1);if(!_0x5ad161)return![];const _0x34674d=_0x1d9653[_0x266971(0x222)](_univerjs_sheets['SheetSkeletonService']),{unitId:_0x2aa667,subUnitId:_0x5ac094}=_0x5ad161,_0x5da6cd=_0x34674d[_0x266971(0x1ff)](_0x2aa667,_0x5ac094);if(!_0x5da6cd)return![];const _0x285cfd=_0x1d9653[_0x266971(0x222)](_univerjs_sheets_drawing[_0x266971(0x1a8)]),{shapeId:_0x8f2127,flipH:_0x3813b6,flipV:_0xa0a14d}=_0x112bf1,_0x5d35fe=_0x285cfd[_0x266971(0x1da)]({'unitId':_0x2aa667,'subUnitId':_0x5ac094,'drawingId':_0x8f2127});if(!_0x5d35fe)return![];const _0x4e8cea=_0x1d9653[_0x266971(0x222)](SheetsShapeService)[_0x266971(0x1d0)](_0x2aa667,_0x5ac094,_0x8f2127);if(!_0x4e8cea)return![];const _0xa2b92d=_0x1d9653[_0x266971(0x222)](_univerjs_core['ICommandService']),_0x46eb08=_0x1d9653[_0x266971(0x222)](_univerjs_core[_0x266971(0x1c4)]),_0x59b9dc=_0x1d9653[_0x266971(0x222)](_univerjs_sheets[_0x266971(0x23d)]),_0x10f584={..._0x5d35fe[_0x266971(0x1f3)]};if(_0x3813b6!==void 0x0)_0x10f584[_0x266971(0x1b1)]=!_0x10f584['flipX'];if(_0xa0a14d!==void 0x0)_0x10f584[_0x266971(0x1f8)]=!_0x10f584[_0x266971(0x1f8)];const _0x55d9cc=(0x0,_univerjs_sheets_drawing[_0x266971(0x20d)])(_0x10f584,_0x5da6cd),_0x755c7=(0x0,_univerjs_sheets_drawing['transformToAxisAlignPosition'])(_0x10f584,_0x5da6cd),_0x247471=_0x4e8cea[_0x266971(0x1a6)](),_0x16b1f1=_0x4e8cea[_0x266971(0x1ea)](),_0x2873be={'unitId':_0x2aa667,'subUnitId':_0x5ac094,'drawingId':_0x8f2127,'drawingType':_univerjs_core['DrawingTypeEnum'][_0x266971(0x1f9)],'sheetTransform':_0x55d9cc,'transform':_0x10f584,'data':{'shapeType':_0x247471,'shapeData':_0x16b1f1},'axisAlignSheetTransform':_0x755c7,'allowTransform':!![]},{undo:_0x10bcbb,redo:_0x2ddb26,objects:_0x388781}=_0x285cfd[_0x266971(0x1bb)]([_0x2873be]),_0x3632cf=_0x59b9dc[_0x266971(0x186)]({'id':_univerjs_sheets_drawing[_0x266971(0x1f1)]['id'],'params':{'unitId':_0x2aa667,'drawings':[_0x2873be]}}),_0x5dddc4=[...(_0x2cb9e1=_0x3632cf[_0x266971(0x22a)])!==null&&_0x2cb9e1!==void 0x0?_0x2cb9e1:[],{'id':_univerjs_sheets_drawing[_0x266971(0x1ec)]['id'],'params':{'unitId':_0x2aa667,'subUnitId':_0x5ac094,'op':_0x2ddb26,'objects':_0x388781,'type':_univerjs_sheets_drawing[_0x266971(0x227)]['UPDATE']}},{'id':_univerjs_sheets_drawing[_0x266971(0x1ed)]['id'],'params':[_0x2aa667]},..._0x3632cf[_0x266971(0x1fa)]],_0x66f1ca=[...(_0xa5154=_0x3632cf[_0x266971(0x180)])!==null&&_0xa5154!==void 0x0?_0xa5154:[],{'id':_univerjs_sheets_drawing['SetDrawingApplyMutation']['id'],'params':{'unitId':_0x2aa667,'subUnitId':_0x5ac094,'op':_0x10bcbb,'objects':_0x388781,'type':_univerjs_sheets_drawing[_0x266971(0x227)][_0x266971(0x1d7)]}},{'id':_univerjs_sheets_drawing[_0x266971(0x1ed)]['id'],'params':[_0x2aa667]},..._0x3632cf[_0x266971(0x1db)]];if((0x0,_univerjs_pro_engine_shape[_0x266971(0x18e)])(_0x247471)){const _0x100eca=_0x4e8cea[_0x266971(0x190)]();if(_0x100eca){const _0x2ee605={..._0x100eca};_0x2ee605[_0x266971(0x19b)]=void 0x0,_0x2ee605['to']=void 0x0,_0x5dddc4[_0x266971(0x1a9)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x2aa667,'subUnitId':_0x5ac094,'shapeId':_0x8f2127,'shapeType':_0x247471,'shapeData':{'relation':_0x2ee605}}}),_0x66f1ca[_0x266971(0x1a9)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x2aa667,'subUnitId':_0x5ac094,'shapeId':_0x8f2127,'shapeType':_0x247471,'shapeData':{'relation':_0x100eca}}});}}if((0x0,_univerjs_core[_0x266971(0x1c1)])(_0x5dddc4,_0xa2b92d)[_0x266971(0x1c0)])return _0x46eb08[_0x266971(0x1a3)]({'unitID':_0x2aa667,'undoMutations':_0x66f1ca,'redoMutations':_0x5dddc4}),!![];return![];}},SetSheetsShapeRotateCommand={'type':_univerjs_core[_0x29928d(0x194)]['COMMAND'],'id':'sheet.command.set-shape-rotate','handler':(_0xd483a,_0x8b4f41)=>{const _0x2db71e=_0x29928d;var _0x96e5f1,_0x2594a5;const _0xb1a790=(0x0,_univerjs_sheets[_0x2db71e(0x23e)])(_0xd483a['get'](_univerjs_core[_0x2db71e(0x1d9)]),_0x8b4f41);if(!_0xb1a790)return![];const _0x1d5eb7=_0xd483a['get'](_univerjs_sheets[_0x2db71e(0x1e1)]),{unitId:_0x72d3fd,subUnitId:_0x139a7c}=_0xb1a790,_0x240cab=_0x1d5eb7[_0x2db71e(0x1ff)](_0x72d3fd,_0x139a7c);if(!_0x240cab)return![];const _0x330852=_0xd483a[_0x2db71e(0x222)](_univerjs_sheets_drawing['ISheetDrawingService']),{shapeId:_0x52f3a6,rotate:_0xa4f2a6}=_0x8b4f41,_0x1b9b63=_0x330852[_0x2db71e(0x1da)]({'unitId':_0x72d3fd,'subUnitId':_0x139a7c,'drawingId':_0x52f3a6});if(!_0x1b9b63)return![];const _0x1a1a9c=_0xd483a[_0x2db71e(0x222)](SheetsShapeService)[_0x2db71e(0x1d0)](_0x72d3fd,_0x139a7c,_0x52f3a6);if(!_0x1a1a9c)return![];const _0x36da14=_0xd483a[_0x2db71e(0x222)](_univerjs_core['ICommandService']),_0x5668e2=_0xd483a[_0x2db71e(0x222)](_univerjs_core['IUndoRedoService']),_0x45cdfc=_0xd483a[_0x2db71e(0x222)](_univerjs_sheets[_0x2db71e(0x23d)]),_0x210d53={..._0x1b9b63[_0x2db71e(0x1f3)]};if(_0xa4f2a6!==void 0x0)_0x210d53[_0x2db71e(0x23b)]=(_0x210d53[_0x2db71e(0x23b)]||0x0)+_0xa4f2a6;const _0x153270=(0x0,_univerjs_sheets_drawing[_0x2db71e(0x20d)])(_0x210d53,_0x240cab),_0x25094e=(0x0,_univerjs_sheets_drawing[_0x2db71e(0x18a)])(_0x210d53,_0x240cab),_0x26f297=_0x1a1a9c[_0x2db71e(0x1a6)](),_0x5e3432=_0x1a1a9c[_0x2db71e(0x1ea)](),_0x41da61={'unitId':_0x72d3fd,'subUnitId':_0x139a7c,'drawingId':_0x52f3a6,'drawingType':_univerjs_core[_0x2db71e(0x1b0)][_0x2db71e(0x1f9)],'sheetTransform':_0x153270,'transform':_0x210d53,'data':{'shapeType':_0x26f297,'shapeData':_0x5e3432},'axisAlignSheetTransform':_0x25094e,'allowTransform':!![]},{undo:_0x12b4e4,redo:_0x5140ef,objects:_0x3dc519}=_0x330852[_0x2db71e(0x1bb)]([_0x41da61]),_0x3328ee=_0x45cdfc[_0x2db71e(0x186)]({'id':_univerjs_sheets_drawing[_0x2db71e(0x1f1)]['id'],'params':{'unitId':_0x72d3fd,'drawings':[_0x41da61]}}),_0x2e3d03=[...(_0x96e5f1=_0x3328ee[_0x2db71e(0x22a)])!==null&&_0x96e5f1!==void 0x0?_0x96e5f1:[],{'id':_univerjs_sheets_drawing[_0x2db71e(0x1ec)]['id'],'params':{'unitId':_0x72d3fd,'subUnitId':_0x139a7c,'op':_0x5140ef,'objects':_0x3dc519,'type':_univerjs_sheets_drawing[_0x2db71e(0x227)][_0x2db71e(0x1d7)]}},{'id':_univerjs_sheets_drawing[_0x2db71e(0x1ed)]['id'],'params':[_0x72d3fd]},..._0x3328ee[_0x2db71e(0x1fa)]],_0x40014b=[...(_0x2594a5=_0x3328ee[_0x2db71e(0x180)])!==null&&_0x2594a5!==void 0x0?_0x2594a5:[],{'id':_univerjs_sheets_drawing[_0x2db71e(0x1ec)]['id'],'params':{'unitId':_0x72d3fd,'subUnitId':_0x139a7c,'op':_0x12b4e4,'objects':_0x3dc519,'type':_univerjs_sheets_drawing['DrawingApplyType'][_0x2db71e(0x1d7)]}},{'id':_univerjs_sheets_drawing['ClearSheetDrawingTransformerOperation']['id'],'params':[_0x72d3fd]},..._0x3328ee[_0x2db71e(0x1db)]];if((0x0,_univerjs_core[_0x2db71e(0x1c1)])(_0x2e3d03,_0x36da14)[_0x2db71e(0x1c0)])return _0x5668e2[_0x2db71e(0x1a3)]({'unitID':_0x72d3fd,'undoMutations':_0x40014b,'redoMutations':_0x2e3d03}),!![];return![];}},SetSheetsShapeTextVerticalToggleCommand={'type':_univerjs_core[_0x29928d(0x194)]['COMMAND'],'id':'sheet.command.set-shape-text-vertical-toggle','handler':(_0x5f3cee,_0x1c6a93)=>{const _0x4e2bc3=_0x29928d;var _0x1de90e;const _0x22a613=(0x0,_univerjs_sheets[_0x4e2bc3(0x23e)])(_0x5f3cee[_0x4e2bc3(0x222)](_univerjs_core[_0x4e2bc3(0x1d9)]),_0x1c6a93);if(!_0x22a613)return![];const {unitId:_0x4bc659,subUnitId:_0x46fd24}=_0x22a613,{shapeId:_0x591a2d}=_0x1c6a93,_0x14fc44=_0x5f3cee[_0x4e2bc3(0x222)](SheetsShapeService)[_0x4e2bc3(0x1d0)](_0x4bc659,_0x46fd24,_0x591a2d);if(!_0x14fc44)return![];const _0x44e882=_0x14fc44['getShapeTextData'](),_0x370675=(_0x1de90e=_0x44e882===null||_0x44e882===void 0x0?void 0x0:_0x44e882[_0x4e2bc3(0x228)])!==null&&_0x1de90e!==void 0x0?_0x1de90e:!![],_0x1b7545=!_0x370675,_0xd15d88=_0x5f3cee[_0x4e2bc3(0x222)](_univerjs_core[_0x4e2bc3(0x216)]),_0x974866=_0x5f3cee[_0x4e2bc3(0x222)](_univerjs_core[_0x4e2bc3(0x1c4)]),_0x1b1c33={'unitId':_0x4bc659,'subUnitId':_0x46fd24,'shapeId':_0x591a2d,'shapeData':{'shapeText':{'isHorizontal':_0x1b7545}}},_0x1f740f={'unitId':_0x4bc659,'subUnitId':_0x46fd24,'shapeId':_0x591a2d,'shapeData':{'shapeText':{'isHorizontal':_0x370675}}},_0x34235f=[{'id':UpdateSheetsShapeDataMutation['id'],'params':_0x1b1c33}],_0x39c6b8=[{'id':UpdateSheetsShapeDataMutation['id'],'params':_0x1f740f}];if((0x0,_univerjs_core['sequenceExecute'])(_0x34235f,_0xd15d88)[_0x4e2bc3(0x1c0)])return _0x974866[_0x4e2bc3(0x1a3)]({'unitID':_0x4bc659,'undoMutations':_0x39c6b8,'redoMutations':_0x34235f}),!![];return![];}},UpdateConnectorRelationCommand={'type':_univerjs_core[_0x29928d(0x194)][_0x29928d(0x231)],'id':_0x29928d(0x212),'handler':(_0x301203,_0xc99bfc)=>{const _0x19c178=_0x29928d;var _0x245172,_0x50fb87,_0x238d62,_0x113c98;const _0x1eaa97=(0x0,_univerjs_sheets[_0x19c178(0x23e)])(_0x301203['get'](_univerjs_core[_0x19c178(0x1d9)]),_0xc99bfc);if(!_0x1eaa97)return![];const _0x50c35c=_0x301203[_0x19c178(0x222)](_univerjs_sheets[_0x19c178(0x1e1)]),{unitId:_0x2265a9,subUnitId:_0x4733eb}=_0x1eaa97,_0x3ecb27=_0x50c35c['getSkeleton'](_0x2265a9,_0x4733eb);if(!_0x3ecb27)return![];const _0x2f625a=_0x301203['get'](_univerjs_sheets_drawing[_0x19c178(0x1a8)]),{connectorShapeId:_0x1c446b,width:_0x9855e4,height:_0x5cfde1,left:_0x57bbd2,top:_0x26216f,flipX:_0x4e373b,flipY:_0x5ed040,rotation:_0x3d84b1,oldAdjustValues:_0x26bb64,newAdjustValues:_0x123963,oldLineType:_0x430437,newLineType:_0x2dc7dd,oldRelation:_0x5791b7,newRelation:_0x71c1c9}=_0xc99bfc,_0x2b49d3=_0x2f625a[_0x19c178(0x1da)]({'unitId':_0x2265a9,'subUnitId':_0x4733eb,'drawingId':_0x1c446b});if(!_0x2b49d3)return![];const _0x2f13f4=_0x301203[_0x19c178(0x222)](SheetsShapeService)[_0x19c178(0x1d0)](_0x2265a9,_0x4733eb,_0x1c446b);if(!_0x2f13f4)return![];const _0x5bdbd1=_0x301203[_0x19c178(0x222)](_univerjs_core[_0x19c178(0x216)]),_0x2c2f6c=_0x301203[_0x19c178(0x222)](_univerjs_core[_0x19c178(0x1c4)]),_0x5c1a8b=_0x301203[_0x19c178(0x222)](_univerjs_sheets[_0x19c178(0x23d)]),_0x50a6c8={..._0x2b49d3[_0x19c178(0x1f3)],'width':_0x9855e4,'height':_0x5cfde1,'left':_0x57bbd2,'top':_0x26216f,'flipX':_0x4e373b,'flipY':_0x5ed040,'angle':(_0x245172=_0x3d84b1!==null&&_0x3d84b1!==void 0x0?_0x3d84b1:(_0x50fb87=_0x2b49d3[_0x19c178(0x1f3)])===null||_0x50fb87===void 0x0?void 0x0:_0x50fb87[_0x19c178(0x23b)])!==null&&_0x245172!==void 0x0?_0x245172:0x0},_0x468978=(0x0,_univerjs_sheets_drawing[_0x19c178(0x20d)])(_0x50a6c8,_0x3ecb27),_0x26f728=(0x0,_univerjs_sheets_drawing['transformToAxisAlignPosition'])(_0x50a6c8,_0x3ecb27),_0x59aa45=_0x2f13f4[_0x19c178(0x1a6)](),_0x466ad9=_0x2f13f4['getShapeData'](),_0x2e7a0d={'unitId':_0x2265a9,'subUnitId':_0x4733eb,'drawingId':_0x1c446b,'drawingType':_univerjs_core[_0x19c178(0x1b0)][_0x19c178(0x1f9)],'sheetTransform':_0x468978,'transform':_0x50a6c8,'data':{'shapeType':_0x2dc7dd||_0x430437||_0x59aa45,'shapeData':{..._0x466ad9,'adjustValues':_0x123963||_0x26bb64||(_0x466ad9===null||_0x466ad9===void 0x0?void 0x0:_0x466ad9[_0x19c178(0x20e)]),'relation':_0x71c1c9||_0x5791b7||(_0x466ad9===null||_0x466ad9===void 0x0?void 0x0:_0x466ad9[_0x19c178(0x244)])}},'axisAlignSheetTransform':_0x26f728,'allowTransform':!![]},{undo:_0x24f76f,redo:_0x474a36,objects:_0x412fcc}=_0x2f625a[_0x19c178(0x1bb)]([_0x2e7a0d]),_0xad644c=_0x5c1a8b[_0x19c178(0x186)]({'id':_univerjs_sheets_drawing[_0x19c178(0x1f1)]['id'],'params':{'unitId':_0x2265a9,'drawings':[_0x2e7a0d]}}),_0x33e277=[...(_0x238d62=_0xad644c[_0x19c178(0x22a)])!==null&&_0x238d62!==void 0x0?_0x238d62:[],{'id':_univerjs_sheets_drawing[_0x19c178(0x1ec)]['id'],'params':{'unitId':_0x2265a9,'subUnitId':_0x4733eb,'op':_0x474a36,'objects':_0x412fcc,'type':_univerjs_sheets_drawing[_0x19c178(0x227)]['UPDATE']}},{'id':_univerjs_sheets_drawing[_0x19c178(0x1ed)]['id'],'params':[_0x2265a9]},..._0xad644c[_0x19c178(0x1fa)],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x2265a9,'subUnitId':_0x4733eb,'shapeId':_0x1c446b,'shapeType':_0x2dc7dd,'shapeData':{'adjustValues':_0x123963,'relation':_0x71c1c9}}}],_0x568648=[...(_0x113c98=_0xad644c[_0x19c178(0x180)])!==null&&_0x113c98!==void 0x0?_0x113c98:[],{'id':_univerjs_sheets_drawing[_0x19c178(0x1ec)]['id'],'params':{'unitId':_0x2265a9,'subUnitId':_0x4733eb,'op':_0x24f76f,'objects':_0x412fcc,'type':_univerjs_sheets_drawing[_0x19c178(0x227)][_0x19c178(0x1d7)]}},{'id':_univerjs_sheets_drawing['ClearSheetDrawingTransformerOperation']['id'],'params':[_0x2265a9]},..._0xad644c[_0x19c178(0x1db)],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x2265a9,'subUnitId':_0x4733eb,'shapeId':_0x1c446b,'shapeType':_0x59aa45,'shapeData':{..._0x466ad9,'adjustValues':_0x26bb64||(_0x466ad9===null||_0x466ad9===void 0x0?void 0x0:_0x466ad9[_0x19c178(0x20e)]),'relation':_0x5791b7||(_0x466ad9===null||_0x466ad9===void 0x0?void 0x0:_0x466ad9[_0x19c178(0x244)])}}}];if((0x0,_univerjs_core[_0x19c178(0x1c1)])(_0x33e277,_0x5bdbd1)[_0x19c178(0x1c0)])return _0x2c2f6c[_0x19c178(0x1a3)]({'unitID':_0x2265a9,'undoMutations':_0x568648,'redoMutations':_0x33e277}),!![];return![];}},UpdateLineShapeResizeCommand={'type':_univerjs_core[_0x29928d(0x194)][_0x29928d(0x231)],'id':_0x29928d(0x1d6),'handler':(_0x373fef,_0x373cb2)=>{const _0x107a25=_0x29928d;var _0x30015d,_0x313844;const _0x2784ba=(0x0,_univerjs_sheets[_0x107a25(0x23e)])(_0x373fef[_0x107a25(0x222)](_univerjs_core[_0x107a25(0x1d9)]),_0x373cb2);if(!_0x2784ba)return![];const _0x34ef25=_0x373fef[_0x107a25(0x222)](_univerjs_sheets[_0x107a25(0x1e1)]),{unitId:_0x929d9,subUnitId:_0x34fc3a}=_0x2784ba,_0x58d205=_0x34ef25[_0x107a25(0x1ff)](_0x929d9,_0x34fc3a);if(!_0x58d205)return![];const _0x595aa5=_0x373fef[_0x107a25(0x222)](_univerjs_sheets_drawing[_0x107a25(0x1a8)]),{shapeId:_0x431883,width:_0x5d015f,height:_0x5484ae,left:_0x4e4ade,top:_0x132fbd,flipX:_0x3769a9,flipY:_0x6b8b95,angle:_0x5b76af,oldAdjustValues:_0x3414dc,newAdjustValues:_0x39f74e,oldLineType:_0x5e94ff,newLineType:_0x331ba0}=_0x373cb2,_0xf4c877=_0x595aa5[_0x107a25(0x1da)]({'unitId':_0x929d9,'subUnitId':_0x34fc3a,'drawingId':_0x431883});if(!_0xf4c877)return![];const _0x2bc29b=_0x373fef[_0x107a25(0x222)](SheetsShapeService)['getShapeModel'](_0x929d9,_0x34fc3a,_0x431883);if(!_0x2bc29b)return![];const _0x122e58=_0x373fef[_0x107a25(0x222)](_univerjs_core[_0x107a25(0x216)]),_0x3c07cb=_0x373fef[_0x107a25(0x222)](_univerjs_core[_0x107a25(0x1c4)]),_0x1b33e6=_0x373fef[_0x107a25(0x222)](_univerjs_sheets['SheetInterceptorService']),_0x286a1a={..._0xf4c877[_0x107a25(0x1f3)],'width':_0x5d015f,'height':_0x5484ae,'left':_0x4e4ade,'top':_0x132fbd,'flipX':_0x3769a9,'flipY':_0x6b8b95,'angle':_0x5b76af},_0x2ca742=(0x0,_univerjs_sheets_drawing[_0x107a25(0x20d)])(_0x286a1a,_0x58d205),_0x1e50f7=(0x0,_univerjs_sheets_drawing[_0x107a25(0x18a)])(_0x286a1a,_0x58d205),_0x505ff2=_0x2bc29b['getShapeType'](),_0x231eb6=_0x2bc29b[_0x107a25(0x1ea)](),_0x1bbecf={'unitId':_0x929d9,'subUnitId':_0x34fc3a,'drawingId':_0x431883,'drawingType':_univerjs_core[_0x107a25(0x1b0)]['DRAWING_SHAPE'],'sheetTransform':_0x2ca742,'transform':_0x286a1a,'data':{'shapeType':_0x331ba0||_0x5e94ff||_0x505ff2,'shapeData':{..._0x231eb6,'adjustValues':_0x39f74e||_0x3414dc||(_0x231eb6===null||_0x231eb6===void 0x0?void 0x0:_0x231eb6[_0x107a25(0x20e)])}},'axisAlignSheetTransform':_0x1e50f7,'allowTransform':!![]},{undo:_0x5709ba,redo:_0x53fdb8,objects:_0xfa63ea}=_0x595aa5[_0x107a25(0x1bb)]([_0x1bbecf]),_0x553e95=_0x1b33e6[_0x107a25(0x186)]({'id':_univerjs_sheets_drawing[_0x107a25(0x1f1)]['id'],'params':{'unitId':_0x929d9,'drawings':[_0x1bbecf]}}),_0x394bf9=[...(_0x30015d=_0x553e95[_0x107a25(0x22a)])!==null&&_0x30015d!==void 0x0?_0x30015d:[],{'id':_univerjs_sheets_drawing['SetDrawingApplyMutation']['id'],'params':{'unitId':_0x929d9,'subUnitId':_0x34fc3a,'op':_0x53fdb8,'objects':_0xfa63ea,'type':_univerjs_sheets_drawing[_0x107a25(0x227)][_0x107a25(0x1d7)]}},{'id':_univerjs_sheets_drawing[_0x107a25(0x1ed)]['id'],'params':[_0x929d9]},..._0x553e95[_0x107a25(0x1fa)],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x929d9,'subUnitId':_0x34fc3a,'shapeId':_0x431883,'shapeType':_0x331ba0,'shapeData':{'adjustValues':_0x39f74e}}}],_0x4a5986=[...(_0x313844=_0x553e95[_0x107a25(0x180)])!==null&&_0x313844!==void 0x0?_0x313844:[],{'id':_univerjs_sheets_drawing[_0x107a25(0x1ec)]['id'],'params':{'unitId':_0x929d9,'subUnitId':_0x34fc3a,'op':_0x5709ba,'objects':_0xfa63ea,'type':_univerjs_sheets_drawing['DrawingApplyType'][_0x107a25(0x1d7)]}},{'id':_univerjs_sheets_drawing['ClearSheetDrawingTransformerOperation']['id'],'params':[_0x929d9]},..._0x553e95[_0x107a25(0x1db)],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x929d9,'subUnitId':_0x34fc3a,'shapeId':_0x431883,'shapeType':_0x505ff2,'shapeData':{..._0x231eb6,'adjustValues':_0x3414dc||(_0x231eb6===null||_0x231eb6===void 0x0?void 0x0:_0x231eb6['adjustValues'])}}}];if((0x0,_univerjs_core[_0x107a25(0x1c1)])(_0x394bf9,_0x122e58)[_0x107a25(0x1c0)])return _0x3c07cb[_0x107a25(0x1a3)]({'unitID':_0x929d9,'undoMutations':_0x4a5986,'redoMutations':_0x394bf9}),!![];return![];}},UpdateSheetsShapeTypeMutation={'id':_0x29928d(0x1a2),'type':_univerjs_core[_0x29928d(0x194)]['MUTATION'],'handler':(_0x32e0a6,_0x531c38)=>{const _0x185215=_0x29928d,{unitId:_0x2e95cb,subUnitId:_0x1accfa,shapeType:_0x8618f7,shapeId:_0x2d943b,shapeData:_0x1c736b}=_0x531c38,_0x5d3530=_0x32e0a6['get'](SheetsShapeService)[_0x185215(0x1d0)](_0x2e95cb,_0x1accfa,_0x2d943b);if(_0x5d3530){_0x5d3530[_0x185215(0x219)](_0x8618f7);if(_0x1c736b)_0x5d3530===null||_0x5d3530===void 0x0||_0x5d3530['setShapeData'](_0x1c736b);}return!![];}},UpdateSheetsShapeTypeCommand={'id':_0x29928d(0x1dc),'type':_univerjs_core[_0x29928d(0x194)][_0x29928d(0x231)],'handler':(_0x27ad8e,_0x56d106)=>{const _0xfd37f5=_0x29928d;if(!_0x56d106)return![];const _0x2939d9=_0x27ad8e[_0xfd37f5(0x222)](_univerjs_core[_0xfd37f5(0x216)]),_0x45e77d=_0x27ad8e[_0xfd37f5(0x222)](SheetsShapeService),_0x5ba2de=_0x27ad8e[_0xfd37f5(0x222)](_univerjs_core[_0xfd37f5(0x1c4)]),_0xf0c297=[],_0x5b3123=[],{unitId:_0xeae4a8,subUnitId:_0x5981eb,shapeId:_0x46e9e6,shapeType:_0x148c7c,shapeData:_0x31fd63}=_0x56d106,_0x57435f=_0x45e77d['getShapeModel'](_0xeae4a8,_0x5981eb,_0x46e9e6);if(_0x57435f){const _0x28cde6=_0x57435f['getShapeType'](),_0x5065eb=Object['assign']({},_0x57435f[_0xfd37f5(0x1ea)]()),_0x27d9b5={'unitId':_0xeae4a8,'subUnitId':_0x5981eb,'shapeId':_0x46e9e6,'shapeType':_0x148c7c,'shapeData':_0x31fd63},_0x524023={'unitId':_0xeae4a8,'subUnitId':_0x5981eb,'shapeId':_0x46e9e6,'shapeType':_0x28cde6,'shapeData':_0x5065eb};_0xf0c297['push']({'id':UpdateSheetsShapeTypeMutation['id'],'params':_0x27d9b5}),_0x5b3123[_0xfd37f5(0x1a9)]({'id':UpdateSheetsShapeTypeMutation['id'],'params':_0x524023});if(_0xf0c297[_0xfd37f5(0x22c)](_0xf86217=>_0x2939d9['syncExecuteCommand'](_0xf86217['id'],_0xf86217[_0xfd37f5(0x1d8)])))_0x5ba2de['pushUndoRedo']({'unitID':_0xeae4a8,'redoMutations':[..._0xf0c297],'undoMutations':[..._0x5b3123]});return!![];}return![];}};var name=_0x29928d(0x1ce),version='0.21.1-insiders.20260509-bf98cad';const SHEETS_SHAPE_PLUGIN_CONFIG_KEY=_0x29928d(0x23f),configSymbol=Symbol(SHEETS_SHAPE_PLUGIN_CONFIG_KEY),defaultPluginConfig={};let SheetsShapeController=class SheetsShapeController extends _univerjs_core[_0x29928d(0x1d1)]{constructor(_0x12375a,_0x5e9558,_0x191879,_0x3b0863,_0x2e7e6c){const _0x4fef35=_0x29928d;super(),this['_commandService']=_0x12375a,this['_sheetInterceptorService']=_0x5e9558,this[_0x4fef35(0x233)]=_0x191879,this[_0x4fef35(0x21d)]=_0x3b0863,this['_drawingManagerService']=_0x2e7e6c,this[_0x4fef35(0x1c2)](),this[_0x4fef35(0x1c6)]();}[_0x29928d(0x1c2)](){const _0x59ca80=_0x29928d;[InsertShapeCommand,SetShapeDrawingDataCommand,ToggleSheetsShapeFlipCommand,SetSheetsShapeRotateCommand,SetSheetsShapeTextVerticalToggleCommand,UpdateConnectorRelationCommand,UpdateLineShapeResizeCommand,InsertSheetsShapeMutation,RemoveSheetsShapeMutation,UpdateSheetsShapeTypeMutation,UpdateSheetsShapeDataMutation][_0x59ca80(0x1ae)](_0x70118f=>this[_0x59ca80(0x1ef)](this['_commandService'][_0x59ca80(0x1df)](_0x70118f)));}[_0x29928d(0x1c6)](){const _0x56ff9b=_0x29928d;this[_0x56ff9b(0x1ef)](this[_0x56ff9b(0x20b)][_0x56ff9b(0x1b3)]({'getMutations':_0x3111ad=>{const _0x25ce23=_0x56ff9b;if(_0x3111ad['id']===_univerjs_sheets_drawing[_0x25ce23(0x1c5)]['id']){const {drawings:_0x595927}=_0x3111ad[_0x25ce23(0x1d8)],_0x1c1b0c=_0x595927[_0x25ce23(0x1a0)](_0x1f2dab=>_0x1f2dab['drawingType']===_univerjs_core['DrawingTypeEnum']['DRAWING_SHAPE']);if(_0x1c1b0c['length']===0x0)return{'preRedos':[],'redos':[],'preUndos':[],'undos':[]};const _0x190018=[],_0x314433=[];return _0x1c1b0c[_0x25ce23(0x1ae)](_0xfa38c5=>{const _0x529c7f=_0x25ce23,{unitId:_0x5deff4,subUnitId:_0xcf2b55,drawingId:_0x5bdf09}=_0xfa38c5,_0x3b7858=this[_0x529c7f(0x21d)][_0x529c7f(0x1d0)](_0x5deff4,_0xcf2b55,_0x5bdf09);if(!_0x3b7858)throw new TypeError(_0x529c7f(0x210)+_0x3b7858);_0x190018['push']({'id':RemoveSheetsShapeMutation['id'],'params':{'unitId':_0x5deff4,'subUnitId':_0xcf2b55,'shapeId':_0x5bdf09}}),_0x314433[_0x529c7f(0x1a9)]({'id':InsertSheetsShapeMutation['id'],'params':{'unitId':_0x5deff4,'subUnitId':_0xcf2b55,'shapeId':_0x5bdf09,'shapeType':_0x3b7858['getShapeType'](),'shapeData':_0x3b7858[_0x529c7f(0x1ea)]()}});const _0x33d580=this[_0x529c7f(0x21d)][_0x529c7f(0x193)](_0x5deff4,_0xcf2b55,_0x5bdf09);if(_0x33d580)for(const _0x3b56d7 of _0x33d580){const _0x5b310f=_0x3b56d7[_0x529c7f(0x21e)],_0x473af0=_0x3b56d7[_0x529c7f(0x201)],_0x134da9=_0x473af0?{'from':void 0x0}:{'to':void 0x0},_0x1284e8=_0x473af0?{'from':{'shapeId':_0x3b56d7[_0x529c7f(0x1de)],'cxnIndex':_0x3b56d7[_0x529c7f(0x181)]}}:{'to':{'shapeId':_0x3b56d7['shapeId'],'cxnIndex':_0x3b56d7[_0x529c7f(0x181)]}};_0x190018[_0x529c7f(0x1a9)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x5deff4,'subUnitId':_0xcf2b55,'shapeId':_0x5b310f,'shapeData':{'relation':_0x134da9}}}),_0x314433[_0x529c7f(0x1a9)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x5deff4,'subUnitId':_0xcf2b55,'shapeId':_0x5b310f,'shapeData':{'relation':_0x1284e8}}});}}),{'preRedos':_0x190018,'redos':[],'preUndos':[],'undos':_0x314433};}if(_0x3111ad['id']===_univerjs_sheets_drawing['SetSheetDrawingCommand']['id']){const {drawings:_0x2fd172}=_0x3111ad[_0x25ce23(0x1d8)],_0x29e4eb=_0x2fd172[_0x25ce23(0x1a0)](_0x337633=>_0x337633[_0x25ce23(0x18f)]===_univerjs_core[_0x25ce23(0x1b0)]['DRAWING_SHAPE']);if(_0x29e4eb[_0x25ce23(0x224)]===0x0)return{'preRedos':[],'redos':[],'preUndos':[],'undos':[]};const _0x4e71bc=[],_0x40fffe=[];for(const _0x3de8f4 of _0x29e4eb){const {unitId:_0x46b1d3,subUnitId:_0x38a156,drawingId:_0x3a3c0b,transform:_0x28c50c}=_0x3de8f4;if(!_0x46b1d3||!_0x38a156||!_0x3a3c0b||!_0x28c50c)continue;const _0x1f3b78=this[_0x25ce23(0x21d)]['getShapeModel'](_0x46b1d3,_0x38a156,_0x3a3c0b);if(!_0x1f3b78)throw new TypeError(_0x25ce23(0x210)+_0x1f3b78);if((0x0,_univerjs_pro_engine_shape[_0x25ce23(0x18e)])(_0x1f3b78['getShapeType']())){const _0x69abb5=this[_0x25ce23(0x21d)][_0x25ce23(0x1f2)](_0x46b1d3,_0x38a156,_0x3a3c0b),_0x258ca8={'from':void 0x0,'to':void 0x0};_0x69abb5&&(_0x4e71bc[_0x25ce23(0x1a9)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x46b1d3,'subUnitId':_0x38a156,'shapeId':_0x3a3c0b,'shapeData':{'relation':_0x258ca8}}}),_0x40fffe['push']({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x46b1d3,'subUnitId':_0x38a156,'shapeId':_0x3a3c0b,'shapeData':{'relation':_0x69abb5}}}));}else{const _0x47d1d2=this[_0x25ce23(0x21d)][_0x25ce23(0x193)](_0x46b1d3,_0x38a156,_0x3a3c0b);if(_0x47d1d2&&_0x47d1d2['length']>0x0)for(const _0x57f477 of _0x47d1d2){const _0x421672=_0x57f477[_0x25ce23(0x21e)],_0x3b7ebd=_0x57f477[_0x25ce23(0x201)],_0x59dba2=this[_0x25ce23(0x21d)]['getShapeModel'](_0x46b1d3,_0x38a156,_0x421672);if(!_0x59dba2)continue;const _0x21ea5e=_0x59dba2[_0x25ce23(0x1fc)](),_0x47cc08=_0x59dba2[_0x25ce23(0x1bd)]();if(_0x21ea5e&&_0x47cc08)this['_addLineRerouteUpdates'](_0x46b1d3,_0x38a156,_0x421672,_0x59dba2,_0x21ea5e,_0x47cc08,_0x4e71bc,_0x40fffe,_0x3a3c0b,_0x28c50c);else this[_0x25ce23(0x1ac)](_0x46b1d3,_0x38a156,_0x421672,_0x59dba2,_0x3b7ebd?_0x21ea5e:_0x47cc08,_0x3b7ebd,_0x4e71bc,_0x40fffe,_0x3a3c0b,_0x28c50c);}}}return{'preRedos':[],'redos':_0x4e71bc,'preUndos':_0x40fffe,'undos':[]};}return{'preRedos':[],'redos':[],'preUndos':[],'undos':[]};}}));}[_0x29928d(0x1e6)](_0x43f695,_0x143029,_0x2c49f8,_0x245a3f,_0x4c2a1e){const _0x75b6ff=_0x29928d;if(!_0x143029||!_0x2c49f8)return null;const {shapeId:_0x2b4759,cxnIndex:_0x418bdf}=_0x43f695,_0x1d7c58=this[_0x75b6ff(0x21d)][_0x75b6ff(0x1d0)](_0x143029,_0x2c49f8,_0x2b4759);if(!_0x1d7c58)return null;const _0x349244=this[_0x75b6ff(0x204)][_0x75b6ff(0x1da)]({'unitId':_0x143029,'subUnitId':_0x2c49f8,'drawingId':_0x2b4759});if(!(_0x349244===null||_0x349244===void 0x0?void 0x0:_0x349244[_0x75b6ff(0x1f3)]))return null;let {left:left=0x0,top:top=0x0,width:width=0x0,height:height=0x0,flipX:flipX=![],flipY:flipY=![],angle:_0x3c6644}=_0x349244[_0x75b6ff(0x1f3)];if(_0x4c2a1e&&_0x245a3f===_0x2b4759){var _0x878e56,_0x32982d,_0x2fb24d,_0x143ce1,_0xecd219,_0x55145,_0x5a10fb;left=(_0x878e56=_0x4c2a1e['left'])!==null&&_0x878e56!==void 0x0?_0x878e56:left,top=(_0x32982d=_0x4c2a1e[_0x75b6ff(0x1d5)])!==null&&_0x32982d!==void 0x0?_0x32982d:top,width=(_0x2fb24d=_0x4c2a1e[_0x75b6ff(0x206)])!==null&&_0x2fb24d!==void 0x0?_0x2fb24d:width,height=(_0x143ce1=_0x4c2a1e[_0x75b6ff(0x241)])!==null&&_0x143ce1!==void 0x0?_0x143ce1:height,flipX=(_0xecd219=_0x4c2a1e[_0x75b6ff(0x1b1)])!==null&&_0xecd219!==void 0x0?_0xecd219:flipX,flipY=(_0x55145=_0x4c2a1e['flipY'])!==null&&_0x55145!==void 0x0?_0x55145:flipY,_0x3c6644=(_0x5a10fb=_0x4c2a1e[_0x75b6ff(0x23b)])!==null&&_0x5a10fb!==void 0x0?_0x5a10fb:_0x3c6644;}_0x1d7c58[_0x75b6ff(0x1ee)]({'width':width,'height':height});const _0xeb1000=_0x1d7c58[_0x75b6ff(0x21f)]()['find'](_0x363f60=>_0x363f60['index']===_0x418bdf);if(!_0xeb1000)return null;let _0x1655ea=flipX?width-_0xeb1000['x']:_0xeb1000['x'],_0x3923f1=flipY?height-_0xeb1000['y']:_0xeb1000['y'];if(_0x3c6644!==0x0&&_0x3c6644!==void 0x0&&_0x3c6644!==null){const _0x103e86=_0x3c6644*Math['PI']/0xb4,_0x5f1989=Math['cos'](_0x103e86),_0x579212=Math[_0x75b6ff(0x19c)](_0x103e86),_0x310c44=width/0x2,_0x1a21dd=height/0x2,_0x58bdcc=_0x1655ea-_0x310c44,_0x519957=_0x3923f1-_0x1a21dd;_0x1655ea=_0x310c44+_0x58bdcc*_0x5f1989-_0x519957*_0x579212,_0x3923f1=_0x1a21dd+_0x58bdcc*_0x579212+_0x519957*_0x5f1989;}_0x1655ea+=left,_0x3923f1+=top;let _0x4a3368=_0xeb1000[_0x75b6ff(0x1cb)]/0xea60;if(flipX)_0x4a3368=0xb4-_0x4a3368;if(flipY)_0x4a3368=-_0x4a3368;_0x4a3368+=_0x3c6644||0x0,_0x4a3368=(_0x4a3368%0x168+0x168)%0x168;const _0x418f3=(0x0,_univerjs_pro_engine_shape['getBasicShapeRotateBound'])({'left':left,'top':top,'width':width,'height':height},_0x3c6644||0x0);return{'point':{'x':_0x1655ea,'y':_0x3923f1},'angle':_0x4a3368,'bounds':_0x418f3};}['_addLineRerouteUpdates'](_0x2bedcc,_0x49adff,_0x44ea60,_0x14ec06,_0x16a350,_0xa7c17a,_0x1e5133,_0x26b5b4,_0x1b2b22,_0x5798b0){const _0x132022=_0x29928d,_0x281be9=this[_0x132022(0x233)][_0x132022(0x1ff)](_0x2bedcc,_0x49adff);if(!_0x281be9)return;const _0x269390=_0x14ec06[_0x132022(0x190)](),_0x5e428f=_0x14ec06['getAdjustNames'](),_0x1bf558={},_0x245a05={};_0x5e428f[_0x132022(0x1ae)](_0x2792ff=>{const _0x396461=_0x132022,_0x27fe24=_0x14ec06[_0x396461(0x187)](_0x2792ff);_0x245a05[_0x2792ff]=_0x27fe24!==null&&_0x27fe24!==void 0x0?_0x27fe24:0x0;});const _0x49c62b=this[_0x132022(0x1e6)](_0x16a350,_0x2bedcc,_0x49adff,_0x1b2b22,_0x5798b0),_0x5510e1=this[_0x132022(0x1e6)](_0xa7c17a,_0x2bedcc,_0x49adff,_0x1b2b22,_0x5798b0);if(_0x49c62b&&_0x5510e1){const _0x4bb872=_0x14ec06[_0x132022(0x1a6)](),_0x558b3d=(0x0,_univerjs_pro_engine_shape['routeConnectorLineShape'])(_0x49c62b,_0x5510e1,_0x4bb872);let _0x285e75=_0x4bb872;if(_0x558b3d){const _0xdad72f=(0x0,_univerjs_pro_engine_shape[_0x132022(0x1aa)])(_0x558b3d,_0x14ec06[_0x132022(0x1a6)]()),_0x114a00=this[_0x132022(0x204)]['getDrawingData'](_0x2bedcc,_0x49adff);if(_0x114a00&&_0x114a00[_0x44ea60]){const _0x374d51=_0x114a00[_0x44ea60];_0x285e75=_0xdad72f[_0x132022(0x1ca)];for(const [_0x62fdfb,_0x14150c]of Object['entries'](_0xdad72f['adjustValues']))_0x1bf558[_0x62fdfb]=_0x14150c;const _0x5401d8={..._0x374d51['transform'],'width':_0xdad72f[_0x132022(0x184)][_0x132022(0x206)],'height':_0xdad72f[_0x132022(0x184)][_0x132022(0x241)],'left':_0xdad72f['worldRect'][_0x132022(0x21b)],'top':_0xdad72f[_0x132022(0x184)][_0x132022(0x1d5)],'flipX':_0xdad72f[_0x132022(0x184)][_0x132022(0x1b1)],'flipY':_0xdad72f['worldRect'][_0x132022(0x1f8)],'angle':_0xdad72f[_0x132022(0x209)]},_0x300d71=(0x0,_univerjs_sheets_drawing[_0x132022(0x20d)])(_0x5401d8,_0x281be9),_0x300d7b=(0x0,_univerjs_sheets_drawing['transformToAxisAlignPosition'])(_0x5401d8,_0x281be9),_0x24b809={'unitId':_0x2bedcc,'subUnitId':_0x49adff,'drawingType':_univerjs_core[_0x132022(0x1b0)][_0x132022(0x1f9)],'drawingId':_0x44ea60,'transform':_0x5401d8,'sheetTransform':_0x300d71,'axisAlignSheetTransform':_0x300d7b},{unitId:_0x1d7f58,subUnitId:_0x2bd44d,undo:_0x56dcfc,redo:_0x2d1d09,objects:_0x4405f6}=this[_0x132022(0x204)][_0x132022(0x1bb)]([_0x24b809]);_0x1e5133['push']({'id':_univerjs_sheets_drawing[_0x132022(0x1ec)]['id'],'params':{'unitId':_0x1d7f58,'subUnitId':_0x2bd44d,'op':_0x2d1d09,'objects':_0x4405f6,'type':_univerjs_sheets_drawing[_0x132022(0x227)][_0x132022(0x1d7)]}}),_0x26b5b4[_0x132022(0x1a9)]({'id':_univerjs_sheets_drawing[_0x132022(0x1ec)]['id'],'params':{'unitId':_0x1d7f58,'subUnitId':_0x2bd44d,'op':_0x56dcfc,'objects':_0x4405f6,'type':_univerjs_sheets_drawing[_0x132022(0x227)][_0x132022(0x1d7)]}});}_0x14ec06[_0x132022(0x205)]();}_0x1e5133[_0x132022(0x1a9)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x2bedcc,'subUnitId':_0x49adff,'shapeId':_0x44ea60,'shapeType':_0x285e75,'shapeData':{'adjustValues':_0x1bf558,'relation':_0x269390}}}),_0x26b5b4['push']({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x2bedcc,'subUnitId':_0x49adff,'shapeId':_0x44ea60,'shapeType':_0x4bb872,'shapeData':{'adjustValues':_0x245a05,'relation':_0x269390}}});}}['_addLineFollowShapeUpdates'](_0x174e6e,_0x4a4b7a,_0x38b5a5,_0x170b30,_0x1034b1,_0x417571,_0x2d92a9,_0x59e71f,_0x1a3d2c,_0x461253){const _0xb80b17=_0x29928d;var _0x5195f6;if(!_0x1034b1)return;const _0x4f2037=this[_0xb80b17(0x233)]['getSkeleton'](_0x174e6e,_0x4a4b7a);if(!_0x4f2037)return;const _0x187e60=(_0x5195f6=this[_0xb80b17(0x204)][_0xb80b17(0x1da)]({'unitId':_0x174e6e,'subUnitId':_0x4a4b7a,'drawingId':_0x1a3d2c}))===null||_0x5195f6===void 0x0?void 0x0:_0x5195f6['transform'];if(!_0x187e60)return;const _0x4c00b2=_0x187e60[_0xb80b17(0x21b)]!==_0x461253[_0xb80b17(0x21b)]||_0x187e60[_0xb80b17(0x1d5)]!==_0x461253['top'],_0x1a7687=_0x187e60['width']!==_0x461253[_0xb80b17(0x206)]||_0x187e60[_0xb80b17(0x241)]!==_0x461253[_0xb80b17(0x241)],_0x2a5f73=_0x187e60[_0xb80b17(0x1b1)]!==_0x461253[_0xb80b17(0x1b1)]||_0x187e60['flipY']!==_0x461253[_0xb80b17(0x1f8)],_0x1ac224=_0x187e60[_0xb80b17(0x23b)]!==_0x461253[_0xb80b17(0x23b)];if(_0x4c00b2&&!_0x1a7687&&!_0x2a5f73&&!_0x1ac224){var _0x483d27,_0x42b28b,_0x16c45b,_0xd49a2b;const _0x304d75=((_0x483d27=_0x461253[_0xb80b17(0x21b)])!==null&&_0x483d27!==void 0x0?_0x483d27:0x0)-((_0x42b28b=_0x187e60[_0xb80b17(0x21b)])!==null&&_0x42b28b!==void 0x0?_0x42b28b:0x0),_0x5c4ab0=((_0x16c45b=_0x461253['top'])!==null&&_0x16c45b!==void 0x0?_0x16c45b:0x0)-((_0xd49a2b=_0x187e60['top'])!==null&&_0xd49a2b!==void 0x0?_0xd49a2b:0x0),_0x44ca67=this[_0xb80b17(0x204)][_0xb80b17(0x207)](_0x174e6e,_0x4a4b7a);if(_0x44ca67&&_0x44ca67[_0x38b5a5]){var _0x2a15d2,_0x548b27,_0x4a1a70,_0x2bd1ce;const _0x4c4bac=_0x44ca67[_0x38b5a5],_0x5d9e52={..._0x4c4bac['transform'],'left':((_0x2a15d2=(_0x548b27=_0x4c4bac[_0xb80b17(0x1f3)])===null||_0x548b27===void 0x0?void 0x0:_0x548b27[_0xb80b17(0x21b)])!==null&&_0x2a15d2!==void 0x0?_0x2a15d2:0x0)+_0x304d75,'top':((_0x4a1a70=(_0x2bd1ce=_0x4c4bac[_0xb80b17(0x1f3)])===null||_0x2bd1ce===void 0x0?void 0x0:_0x2bd1ce[_0xb80b17(0x1d5)])!==null&&_0x4a1a70!==void 0x0?_0x4a1a70:0x0)+_0x5c4ab0},_0xe94a52=(0x0,_univerjs_sheets_drawing[_0xb80b17(0x20d)])(_0x5d9e52,_0x4f2037),_0x462614=(0x0,_univerjs_sheets_drawing['transformToAxisAlignPosition'])(_0x5d9e52,_0x4f2037),_0x281d64={'unitId':_0x174e6e,'subUnitId':_0x4a4b7a,'drawingType':_univerjs_core[_0xb80b17(0x1b0)][_0xb80b17(0x1f9)],'drawingId':_0x38b5a5,'transform':_0x5d9e52,'sheetTransform':_0xe94a52,'axisAlignSheetTransform':_0x462614},{unitId:_0x236cdb,subUnitId:_0x29f12b,undo:_0x3bf74c,redo:_0x3d0267,objects:_0x2ec99c}=this[_0xb80b17(0x204)][_0xb80b17(0x1bb)]([_0x281d64]);_0x2d92a9['push']({'id':_univerjs_sheets_drawing[_0xb80b17(0x1ec)]['id'],'params':{'unitId':_0x236cdb,'subUnitId':_0x29f12b,'op':_0x3d0267,'objects':_0x2ec99c,'type':_univerjs_sheets_drawing[_0xb80b17(0x227)][_0xb80b17(0x1d7)]}}),_0x59e71f[_0xb80b17(0x1a9)]({'id':_univerjs_sheets_drawing[_0xb80b17(0x1ec)]['id'],'params':{'unitId':_0x236cdb,'subUnitId':_0x29f12b,'op':_0x3bf74c,'objects':_0x2ec99c,'type':_univerjs_sheets_drawing[_0xb80b17(0x227)][_0xb80b17(0x1d7)]}});}}else{const _0x38aeee=_0x170b30['getStartConnectInfo'](),_0x1255da=_0x170b30['getEndConnectInfo']();this[_0xb80b17(0x239)](_0x174e6e,_0x4a4b7a,_0x38b5a5,_0x170b30,_0x38aeee,_0x1255da,_0x2d92a9,_0x59e71f,_0x1a3d2c,_0x461253);}}};SheetsShapeController=__decorate([__decorateParam(0x0,_univerjs_core[_0x29928d(0x216)]),__decorateParam(0x1,(0x0,_univerjs_core[_0x29928d(0x214)])(_univerjs_sheets[_0x29928d(0x23d)])),__decorateParam(0x2,(0x0,_univerjs_core[_0x29928d(0x214)])(_univerjs_sheets['SheetSkeletonService'])),__decorateParam(0x3,(0x0,_univerjs_core['Inject'])(SheetsShapeService)),__decorateParam(0x4,(0x0,_univerjs_core[_0x29928d(0x214)])(_univerjs_drawing[_0x29928d(0x1ab)]))],SheetsShapeController);let UniverSheetsShapePlugin=class UniverSheetsShapePlugin extends _univerjs_core[_0x29928d(0x236)]{constructor(_0x19b7d9=defaultPluginConfig,_0x147e1d,_0x110406,_0x166c96){const _0x25a90a=_0x29928d;super(),this['_config']=_0x19b7d9,this['_injector']=_0x147e1d,this[_0x25a90a(0x1f4)]=_0x110406,this[_0x25a90a(0x1e5)]=_0x166c96;const {..._0x6f2a90}=(0x0,_univerjs_core[_0x25a90a(0x1f7)])({},defaultPluginConfig,this['_config']);this[_0x25a90a(0x1e5)]['setConfig'](SHEETS_SHAPE_PLUGIN_CONFIG_KEY,_0x6f2a90);}['onStarting'](){const _0x542a20=_0x29928d,_0x38e60f=this[_0x542a20(0x226)];[[SheetShapeModelManager],[SheetsShapeService],[SheetsShapeController]][_0x542a20(0x1ae)](_0x4c0a7c=>_0x38e60f[_0x542a20(0x198)](_0x4c0a7c)),(0x0,_univerjs_core['touchDependencies'])(_0x38e60f,[[SheetsShapeService],[SheetsShapeController]]);}};_defineProperty(UniverSheetsShapePlugin,_0x29928d(0x225),_univerjs_core[_0x29928d(0x22d)][_0x29928d(0x1eb)]),_defineProperty(UniverSheetsShapePlugin,'pluginName',_0x29928d(0x1b2)),_defineProperty(UniverSheetsShapePlugin,_0x29928d(0x1bc),name),_defineProperty(UniverSheetsShapePlugin,_0x29928d(0x1ba),version),UniverSheetsShapePlugin=__decorate([(0x0,_univerjs_core[_0x29928d(0x188)])(_univerjs_pro_license[_0x29928d(0x229)]),__decorateParam(0x1,(0x0,_univerjs_core[_0x29928d(0x214)])(_univerjs_core[_0x29928d(0x20f)])),__decorateParam(0x2,_univerjs_core[_0x29928d(0x216)]),__decorateParam(0x3,_univerjs_core[_0x29928d(0x215)])],UniverSheetsShapePlugin),exports[_0x29928d(0x19f)]=DEFAULT_SHAPE_HEIGHT,exports['DEFAULT_SHAPE_WIDTH']=DEFAULT_SHAPE_WIDTH,exports[_0x29928d(0x235)]=InsertShapeCommand,exports[_0x29928d(0x1e7)]=InsertSheetsShapeMutation,exports[_0x29928d(0x217)]=RemoveSheetsShapeMutation,exports['SetShapeDrawingDataCommand']=SetShapeDrawingDataCommand,exports[_0x29928d(0x1cc)]=SetSheetsShapeRotateCommand,exports[_0x29928d(0x242)]=SetSheetsShapeTextVerticalToggleCommand,Object[_0x29928d(0x1e0)](exports,_0x29928d(0x1a4),{'enumerable':!![],'get':function(){return SheetsShapeService;}}),exports[_0x29928d(0x1b5)]=ToggleSheetsShapeFlipCommand,Object[_0x29928d(0x1e0)](exports,_0x29928d(0x22f),{'enumerable':!![],'get':function(){return UniverSheetsShapePlugin;}}),exports['UpdateConnectorRelationCommand']=UpdateConnectorRelationCommand,exports[_0x29928d(0x1e4)]=UpdateLineShapeResizeCommand,exports[_0x29928d(0x218)]=UpdateSheetsShapeDataMutation,exports[_0x29928d(0x237)]=UpdateSheetsShapeTypeCommand,exports[_0x29928d(0x1d3)]=UpdateSheetsShapeTypeMutation;
|