@univerjs-pro/sheets-shape 0.21.1-insiders.20260509-3a60311 → 0.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/cjs/facade.js CHANGED
@@ -1 +1 @@
1
- function _0x10fe(_0x15ea56,_0x3619d8){_0x15ea56=_0x15ea56-0x1d9;const _0x2d8413=_0x2d84();let _0x10fe83=_0x2d8413[_0x15ea56];return _0x10fe83;}const _0x4eb413=_0x10fe;(function(_0x27ff79,_0x4ae1a9){const _0x4c13a0=_0x10fe,_0x1a49cc=_0x27ff79();while(!![]){try{const _0x2fccac=parseInt(_0x4c13a0(0x1ee))/0x1*(-parseInt(_0x4c13a0(0x1ec))/0x2)+-parseInt(_0x4c13a0(0x242))/0x3+parseInt(_0x4c13a0(0x265))/0x4*(-parseInt(_0x4c13a0(0x257))/0x5)+parseInt(_0x4c13a0(0x23b))/0x6*(parseInt(_0x4c13a0(0x20e))/0x7)+parseInt(_0x4c13a0(0x241))/0x8+-parseInt(_0x4c13a0(0x251))/0x9*(-parseInt(_0x4c13a0(0x237))/0xa)+parseInt(_0x4c13a0(0x270))/0xb;if(_0x2fccac===_0x4ae1a9)break;else _0x1a49cc['push'](_0x1a49cc['shift']());}catch(_0x23649b){_0x1a49cc['push'](_0x1a49cc['shift']());}}}(_0x2d84,0xa3178),Object[_0x4eb413(0x236)](exports,Symbol[_0x4eb413(0x235)],{'value':_0x4eb413(0x1f2)}));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[_0x4eb413(0x245)]{get[_0x4eb413(0x26a)](){const _0x130049=_0x4eb413;return _univerjs_pro_engine_shape[_0x130049(0x26a)];}get[_0x4eb413(0x1da)](){const _0x25a595=_0x4eb413;return _univerjs_pro_engine_shape[_0x25a595(0x1da)];}get[_0x4eb413(0x200)](){const _0x240665=_0x4eb413;return _univerjs_pro_engine_shape[_0x240665(0x200)];}get[_0x4eb413(0x1e7)](){const _0x192b89=_0x4eb413;return _univerjs_pro_engine_shape[_0x192b89(0x1e7)];}get[_0x4eb413(0x1f0)](){const _0x35e1e6=_0x4eb413;return _univerjs_pro_engine_shape[_0x35e1e6(0x1f0)];}get[_0x4eb413(0x26b)](){const _0x14fee2=_0x4eb413;return _univerjs_pro_engine_shape[_0x14fee2(0x26b)];}get[_0x4eb413(0x24f)](){return _univerjs_pro_engine_shape['ShapeLineJoinEnum'];}get['ShapeArrowTypeEnum'](){const _0x5a044c=_0x4eb413;return _univerjs_pro_engine_shape[_0x5a044c(0x239)];}get[_0x4eb413(0x243)](){return _univerjs_pro_engine_shape['ShapeArrowSizeEnum'];}};_univerjs_core_facade['FEnum'][_0x4eb413(0x1e5)](FSheetsShapeEnumMixin);function _typeof(_0x391656){'@babel/helpers - typeof';const _0x5d7052=_0x4eb413;return _typeof=_0x5d7052(0x1de)==typeof Symbol&&'symbol'==typeof Symbol[_0x5d7052(0x1dd)]?function(_0x2e3d37){return typeof _0x2e3d37;}:function(_0xb892c5){const _0x19ead1=_0x5d7052;return _0xb892c5&&_0x19ead1(0x1de)==typeof Symbol&&_0xb892c5[_0x19ead1(0x246)]===Symbol&&_0xb892c5!==Symbol['prototype']?_0x19ead1(0x230):typeof _0xb892c5;},_typeof(_0x391656);}function toPrimitive(_0x3b4f4e,_0x3a9ca3){const _0x34ce66=_0x4eb413;if(_0x34ce66(0x1e4)!=_typeof(_0x3b4f4e)||!_0x3b4f4e)return _0x3b4f4e;var _0x253cec=_0x3b4f4e[Symbol[_0x34ce66(0x20f)]];if(void 0x0!==_0x253cec){var _0x2cd378=_0x253cec[_0x34ce66(0x266)](_0x3b4f4e,_0x3a9ca3||_0x34ce66(0x1f7));if(_0x34ce66(0x1e4)!=_typeof(_0x2cd378))return _0x2cd378;throw new TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x34ce66(0x233)===_0x3a9ca3?String:Number)(_0x3b4f4e);}function toPropertyKey(_0x3c879f){const _0x14b826=_0x4eb413;var _0x172e9e=toPrimitive(_0x3c879f,_0x14b826(0x233));return _0x14b826(0x230)==_typeof(_0x172e9e)?_0x172e9e:_0x172e9e+'';}function _defineProperty(_0x2dffaf,_0x1561ee,_0x3b119e){const _0x11bac7=_0x4eb413;return(_0x1561ee=toPropertyKey(_0x1561ee))in _0x2dffaf?Object[_0x11bac7(0x236)](_0x2dffaf,_0x1561ee,{'value':_0x3b119e,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x2dffaf[_0x1561ee]=_0x3b119e,_0x2dffaf;}var FShape=class{constructor(_0x440619,_0x126d40,_0x3c0532,_0x458cd0){const _0x1dc156=_0x4eb413;_defineProperty(this,'unitId',void 0x0),_defineProperty(this,_0x1dc156(0x20b),void 0x0),_defineProperty(this,_0x1dc156(0x25a),void 0x0),_defineProperty(this,'x',0x0),_defineProperty(this,'y',0x0),_defineProperty(this,'width',_univerjs_pro_sheets_shape[_0x1dc156(0x24d)]),_defineProperty(this,_0x1dc156(0x249),_univerjs_pro_sheets_shape[_0x1dc156(0x220)]),_defineProperty(this,_0x1dc156(0x1fb),void 0x0),_defineProperty(this,'shapeData',{}),_defineProperty(this,'_injector',void 0x0),this[_0x1dc156(0x232)]=_0x440619,this[_0x1dc156(0x20b)]=_0x126d40,this[_0x1dc156(0x25a)]=_0x3c0532||(0x0,_univerjs_core['generateRandomId'])(),this[_0x1dc156(0x25f)]=_0x458cd0;}[_0x4eb413(0x260)](_0x4f9d5f,_0x5a7c33,_0x4a461b,_0x3c2f3f){const _0x5001ad=_0x4eb413,_0x44e894=this[_0x5001ad(0x25f)][_0x5001ad(0x259)](_univerjs_sheets['SheetSkeletonService'])['ensureSkeleton'](this[_0x5001ad(0x232)],this[_0x5001ad(0x20b)]);if(!_0x44e894)throw new Error('Skeleton\x20for\x20unitId\x20'+this[_0x5001ad(0x232)]+'\x20and\x20subUnitId\x20'+this[_0x5001ad(0x20b)]+_0x5001ad(0x212));const {transform:_0x90fdae}=(0x0,_univerjs_sheets[_0x5001ad(0x214)])(this[_0x5001ad(0x232)],this[_0x5001ad(0x20b)],{'row':_0x4f9d5f,'column':_0x5a7c33,'rowOffset':_0x4a461b,'columnOffset':_0x3c2f3f},0x1,0x1,_0x44e894);return this['x']=_0x90fdae['left'],this['y']=_0x90fdae[_0x5001ad(0x269)],this;}[_0x4eb413(0x1e8)](_0x168cea,_0x38a19b){return this['x']=_0x168cea,this['y']=_0x38a19b,this;}['setShapeType'](_0xfcce7d){const _0xa880c2=_0x4eb413;return this[_0xa880c2(0x1fb)]=_0xfcce7d,this;}[_0x4eb413(0x211)](_0x5c35b1,_0x3cdcb5){const _0x30a77e=_0x4eb413;if(!this[_0x30a77e(0x263)]['fill'])this['shapeData'][_0x30a77e(0x24e)]={};this[_0x30a77e(0x263)][_0x30a77e(0x24e)][_0x30a77e(0x258)]=_univerjs_pro_engine_shape[_0x30a77e(0x1da)][_0x30a77e(0x25b)];if(_0x5c35b1!==void 0x0)this[_0x30a77e(0x263)][_0x30a77e(0x24e)][_0x30a77e(0x20d)]=_0x5c35b1;if(_0x3cdcb5!==void 0x0)this[_0x30a77e(0x263)][_0x30a77e(0x24e)]['opacity']=_0x3cdcb5;return this;}[_0x4eb413(0x1fd)](_0x41c035,_0x185c87,_0x1ae710){const _0x588cd1=_0x4eb413;if(_0x185c87===void 0x0||_0x185c87['length']===0x0)throw new Error(_0x588cd1(0x1f9));if(!this[_0x588cd1(0x263)][_0x588cd1(0x24e)])this['shapeData'][_0x588cd1(0x24e)]={};this[_0x588cd1(0x263)][_0x588cd1(0x24e)]['gradientStops']=_0x185c87,this['shapeData'][_0x588cd1(0x24e)][_0x588cd1(0x258)]=_univerjs_pro_engine_shape['ShapeFillEnum'][_0x588cd1(0x208)],this[_0x588cd1(0x263)][_0x588cd1(0x24e)][_0x588cd1(0x264)]=_0x41c035;if(_0x1ae710!==void 0x0)this[_0x588cd1(0x263)][_0x588cd1(0x24e)]['gradientAngle']=_0x1ae710;return this;}[_0x4eb413(0x207)](){const _0xf86569=_0x4eb413;return this[_0xf86569(0x263)][_0xf86569(0x24e)]={'fillType':_univerjs_pro_engine_shape[_0xf86569(0x1da)][_0xf86569(0x21e)]},this;}['setStrokeColor'](_0x39e319){const _0x2a99a3=_0x4eb413;if(!this[_0x2a99a3(0x263)][_0x2a99a3(0x234)])this[_0x2a99a3(0x263)][_0x2a99a3(0x234)]={};return this[_0x2a99a3(0x263)][_0x2a99a3(0x234)][_0x2a99a3(0x20d)]=_0x39e319,this;}[_0x4eb413(0x20c)](_0x5596a1){const _0x4bd1c3=_0x4eb413;if(!this['shapeData']['stroke'])this[_0x4bd1c3(0x263)][_0x4bd1c3(0x234)]={};return this[_0x4bd1c3(0x263)][_0x4bd1c3(0x234)][_0x4bd1c3(0x203)]=_0x5596a1,this;}[_0x4eb413(0x210)](_0x1709a6){const _0x17ec36=_0x4eb413;if(!this['shapeData'][_0x17ec36(0x234)])this['shapeData']['stroke']={};return this[_0x17ec36(0x263)][_0x17ec36(0x234)][_0x17ec36(0x1fa)]=_0x1709a6,this;}['setStrokeLineJoinType'](_0x1a2cd3){const _0x4472c7=_0x4eb413;if(!this['shapeData'][_0x4472c7(0x234)])this[_0x4472c7(0x263)][_0x4472c7(0x234)]={};return this[_0x4472c7(0x263)][_0x4472c7(0x234)][_0x4472c7(0x1f3)]=_0x1a2cd3,this;}['setStrokeLineCapType'](_0x152c61){const _0x3a1da8=_0x4eb413;if(!this[_0x3a1da8(0x263)][_0x3a1da8(0x234)])this[_0x3a1da8(0x263)][_0x3a1da8(0x234)]={};return this[_0x3a1da8(0x263)]['stroke']['capType']=_0x152c61,this;}['setStrokeOpacity'](_0x5f0004){const _0x6bbb8b=_0x4eb413;if(!this[_0x6bbb8b(0x263)]['stroke'])this['shapeData'][_0x6bbb8b(0x234)]={};return this[_0x6bbb8b(0x263)][_0x6bbb8b(0x234)][_0x6bbb8b(0x1db)]=_0x5f0004,this;}[_0x4eb413(0x215)](_0x275a00){const _0x5417b8=_0x4eb413;if(!this[_0x5417b8(0x263)][_0x5417b8(0x234)])this[_0x5417b8(0x263)][_0x5417b8(0x234)]={};return this['shapeData'][_0x5417b8(0x234)]['lineStrokeType']=_0x275a00,this;}['setWidth'](_0x2ad9fb){const _0x3b672a=_0x4eb413;return this[_0x3b672a(0x203)]=_0x2ad9fb,this;}['setHeight'](_0x500a19){return this['height']=_0x500a19,this;}[_0x4eb413(0x21a)](){const _0x1727d7=_0x4eb413,_0x58110c=this['_injector'][_0x1727d7(0x259)](_univerjs_pro_sheets_shape[_0x1727d7(0x1ed)])[_0x1727d7(0x23a)](this['unitId'],this[_0x1727d7(0x20b)],this[_0x1727d7(0x25a)]);if(_0x58110c)return(0x0,_univerjs_pro_engine_shape['isConnectorShape'])(_0x58110c[_0x1727d7(0x26e)]());if(this['shapeType'])return(0x0,_univerjs_pro_engine_shape[_0x1727d7(0x22a)])(this[_0x1727d7(0x1fb)]);return![];}['getConnectionSites'](){const _0x590866=_0x4eb413,_0x1936d9=this[_0x590866(0x25f)]['get'](_univerjs_pro_sheets_shape['SheetsShapeService'])[_0x590866(0x23a)](this['unitId'],this[_0x590866(0x20b)],this[_0x590866(0x25a)]);if(!_0x1936d9)return[];const _0x3ce3df=this['_injector'][_0x590866(0x259)](_univerjs_drawing[_0x590866(0x238)])[_0x590866(0x255)]({'unitId':this[_0x590866(0x232)],'subUnitId':this[_0x590866(0x20b)],'drawingId':this['drawId']});if(!(_0x3ce3df===null||_0x3ce3df===void 0x0?void 0x0:_0x3ce3df['transform']))return[];const {width:width=0x0,height:height=0x0}=_0x3ce3df[_0x590866(0x24c)];return _0x1936d9[_0x590866(0x1f1)]({'width':width,'height':height}),_0x1936d9[_0x590866(0x24a)]();}[_0x4eb413(0x25e)](){const _0x2517c2=_0x4eb413,_0xb1a379=this[_0x2517c2(0x25f)][_0x2517c2(0x259)](_univerjs_pro_sheets_shape[_0x2517c2(0x1ed)])[_0x2517c2(0x23a)](this[_0x2517c2(0x232)],this[_0x2517c2(0x20b)],this['drawId']);if(!_0xb1a379)return[];const _0xd14b76=this[_0x2517c2(0x25f)][_0x2517c2(0x259)](_univerjs_drawing[_0x2517c2(0x238)])[_0x2517c2(0x255)]({'unitId':this[_0x2517c2(0x232)],'subUnitId':this[_0x2517c2(0x20b)],'drawingId':this['drawId']});if(!(_0xd14b76===null||_0xd14b76===void 0x0?void 0x0:_0xd14b76['transform']))return[];const {width:width=0x0,height:height=0x0}=_0xd14b76[_0x2517c2(0x24c)];return _0xb1a379[_0x2517c2(0x1f1)]({'width':width,'height':height}),_0xb1a379[_0x2517c2(0x250)]();}[_0x4eb413(0x1fe)](){const _0x3afa01=_0x4eb413,_0x32db49=this[_0x3afa01(0x25f)]['get'](_univerjs_pro_sheets_shape[_0x3afa01(0x1ed)])[_0x3afa01(0x23a)](this[_0x3afa01(0x232)],this['subUnitId'],this[_0x3afa01(0x25a)]);if(!_0x32db49)return[];if(!(0x0,_univerjs_pro_engine_shape[_0x3afa01(0x22a)])(_0x32db49[_0x3afa01(0x26e)]()))return[];const _0x565fe6=this['_injector'][_0x3afa01(0x259)](_univerjs_drawing[_0x3afa01(0x238)])[_0x3afa01(0x255)]({'unitId':this[_0x3afa01(0x232)],'subUnitId':this[_0x3afa01(0x20b)],'drawingId':this[_0x3afa01(0x25a)]});if(!(_0x565fe6===null||_0x565fe6===void 0x0?void 0x0:_0x565fe6[_0x3afa01(0x24c)]))return[];const {width:width=0x0,height:height=0x0}=_0x565fe6[_0x3afa01(0x24c)];return _0x32db49['updateContext']({'width':width,'height':height}),_0x32db49[_0x3afa01(0x1fe)]();}[_0x4eb413(0x1e0)](){const _0x41e4f5=_0x4eb413;var _0x67eb0d;const _0x1214c5=this[_0x41e4f5(0x25f)][_0x41e4f5(0x259)](_univerjs_pro_sheets_shape['SheetsShapeService'])[_0x41e4f5(0x23a)](this['unitId'],this[_0x41e4f5(0x20b)],this[_0x41e4f5(0x25a)]);if(!_0x1214c5)return null;return(_0x67eb0d=_0x1214c5[_0x41e4f5(0x1e0)]())!==null&&_0x67eb0d!==void 0x0?_0x67eb0d:null;}[_0x4eb413(0x1ea)](){const _0x3a8899=_0x4eb413;var _0x945c68;const _0x180b5b=this[_0x3a8899(0x25f)][_0x3a8899(0x259)](_univerjs_pro_sheets_shape[_0x3a8899(0x1ed)])[_0x3a8899(0x23a)](this['unitId'],this['subUnitId'],this[_0x3a8899(0x25a)]);if(!_0x180b5b)return null;return(_0x945c68=_0x180b5b[_0x3a8899(0x1ea)]())!==null&&_0x945c68!==void 0x0?_0x945c68:null;}[_0x4eb413(0x221)](){const _0x6b3584=_0x4eb413;var _0x576f66,_0x2a9dfc;if(!this[_0x6b3584(0x1fb)])throw new Error(_0x6b3584(0x1f5));if(this['x']===0x0||this['y']===0x0){const _0x7534f6=this['_injector'][_0x6b3584(0x259)](_univerjs_sheets[_0x6b3584(0x231)])[_0x6b3584(0x226)](this[_0x6b3584(0x232)],this['subUnitId']);if(!_0x7534f6)throw new Error(_0x6b3584(0x1eb)+this[_0x6b3584(0x232)]+_0x6b3584(0x252)+this[_0x6b3584(0x20b)]+'\x20not\x20found');const {transform:_0x4d592e}=(0x0,_univerjs_sheets['convertPositionCellToSheetOverGrid'])(this[_0x6b3584(0x232)],this[_0x6b3584(0x20b)],{'row':0x1,'column':0x1,'rowOffset':0x0,'columnOffset':0x0},0x1,0x1,_0x7534f6);this['x']=this['x']>0x0?this['x']:_0x4d592e[_0x6b3584(0x267)],this['y']=this['y']>0x0?this['y']:_0x4d592e[_0x6b3584(0x269)];}return this[_0x6b3584(0x203)]=(_0x576f66=this['width'])!==null&&_0x576f66!==void 0x0?_0x576f66:_univerjs_pro_sheets_shape[_0x6b3584(0x24d)],this[_0x6b3584(0x249)]=(_0x2a9dfc=this['height'])!==null&&_0x2a9dfc!==void 0x0?_0x2a9dfc:_univerjs_pro_sheets_shape[_0x6b3584(0x220)],{'unitId':this[_0x6b3584(0x232)],'subUnitId':this[_0x6b3584(0x20b)],'shapeId':this['drawId'],'shapeType':this[_0x6b3584(0x1fb)],'shapeData':Object[_0x6b3584(0x225)](this[_0x6b3584(0x263)])['length']>0x0?this[_0x6b3584(0x263)]:void 0x0,'x':this['x'],'y':this['y'],'width':this[_0x6b3584(0x203)],'height':this[_0x6b3584(0x249)]};}[_0x4eb413(0x22b)](){const _0x30a64e=_0x4eb413;return this[_0x30a64e(0x25a)];}[_0x4eb413(0x26e)](){const _0x368a44=_0x4eb413;return this[_0x368a44(0x1fb)];}[_0x4eb413(0x213)](){const _0x2321b8=_0x4eb413;return this[_0x2321b8(0x263)];}['getPosition'](){return{'x':this['x'],'y':this['y']};}[_0x4eb413(0x201)](){const _0x413000=_0x4eb413;return{'width':this[_0x413000(0x203)],'height':this['height']};}},FConnectorShape=class extends FShape{constructor(_0x52eb75,_0x14f948,_0x435624,_0x25b345){const _0x458fcc=_0x4eb413;super(_0x52eb75,_0x14f948,_0x435624,_0x25b345),_defineProperty(this,_0x458fcc(0x263),{});}['setShapeType'](_0x396efb){const _0x29abf7=_0x4eb413;if(!(0x0,_univerjs_pro_engine_shape['isConnectorShape'])(_0x396efb))throw new Error('Invalid\x20shape\x20type\x20for\x20connector.\x20Received\x20'+_0x396efb+_0x29abf7(0x23d));return super[_0x29abf7(0x26c)](_0x396efb),this;}[_0x4eb413(0x22f)](_0x2bc89a){const _0x4c8b5f=_0x4eb413;var _0x12dfb8,_0x495d12;if(!((_0x12dfb8=this['shapeData'])===null||_0x12dfb8===void 0x0?void 0x0:_0x12dfb8['ln']))this[_0x4c8b5f(0x263)]['ln']={};if(!((_0x495d12=this[_0x4c8b5f(0x263)])===null||_0x495d12===void 0x0||(_0x495d12=_0x495d12['ln'])===null||_0x495d12===void 0x0?void 0x0:_0x495d12[_0x4c8b5f(0x1ff)]))this[_0x4c8b5f(0x263)]['ln'][_0x4c8b5f(0x1ff)]={};return this[_0x4c8b5f(0x263)]['ln'][_0x4c8b5f(0x1ff)][_0x4c8b5f(0x23e)]=_0x2bc89a,this;}[_0x4eb413(0x1ef)](_0x2c3aaf){const _0x12919d=_0x4eb413;var _0x19aa71,_0x3efcaa;if(!((_0x19aa71=this[_0x12919d(0x263)])===null||_0x19aa71===void 0x0?void 0x0:_0x19aa71['ln']))this['shapeData']['ln']={};if(!((_0x3efcaa=this[_0x12919d(0x263)])===null||_0x3efcaa===void 0x0||(_0x3efcaa=_0x3efcaa['ln'])===null||_0x3efcaa===void 0x0?void 0x0:_0x3efcaa['endArrow']))this[_0x12919d(0x263)]['ln'][_0x12919d(0x247)]={};return this['shapeData']['ln'][_0x12919d(0x247)]['type']=_0x2c3aaf,this;}[_0x4eb413(0x1f8)](_0x22daca){const _0x3495b9=_0x4eb413;var _0x2633c3,_0x3c0e91;if(!((_0x2633c3=this['shapeData'])===null||_0x2633c3===void 0x0?void 0x0:_0x2633c3['ln']))this[_0x3495b9(0x263)]['ln']={};if(!((_0x3c0e91=this[_0x3495b9(0x263)])===null||_0x3c0e91===void 0x0||(_0x3c0e91=_0x3c0e91['ln'])===null||_0x3c0e91===void 0x0?void 0x0:_0x3c0e91[_0x3495b9(0x1ff)]))this[_0x3495b9(0x263)]['ln'][_0x3495b9(0x1ff)]={};return this[_0x3495b9(0x263)]['ln'][_0x3495b9(0x1ff)][_0x3495b9(0x218)]=_0x22daca,this;}['setEndArrowSize'](_0x532033){const _0x119deb=_0x4eb413;var _0x1cede3,_0x477694;if(!((_0x1cede3=this[_0x119deb(0x263)])===null||_0x1cede3===void 0x0?void 0x0:_0x1cede3['ln']))this['shapeData']['ln']={};if(!((_0x477694=this[_0x119deb(0x263)])===null||_0x477694===void 0x0||(_0x477694=_0x477694['ln'])===null||_0x477694===void 0x0?void 0x0:_0x477694[_0x119deb(0x247)]))this[_0x119deb(0x263)]['ln'][_0x119deb(0x247)]={};return this[_0x119deb(0x263)]['ln'][_0x119deb(0x247)][_0x119deb(0x218)]=_0x532033,this;}[_0x4eb413(0x221)](){const _0x4a4c3d=_0x4eb413;return super[_0x4a4c3d(0x221)]();}[_0x4eb413(0x1ea)](){const _0x47b117=_0x4eb413;var _0x2d830b;return((_0x2d830b=this[_0x47b117(0x263)])===null||_0x2d830b===void 0x0||(_0x2d830b=_0x2d830b[_0x47b117(0x224)])===null||_0x2d830b===void 0x0?void 0x0:_0x2d830b['to'])||null;}['getStartConnectInfo'](){const _0x39ef95=_0x4eb413;var _0x16f5e7;return((_0x16f5e7=this[_0x39ef95(0x263)])===null||_0x16f5e7===void 0x0||(_0x16f5e7=_0x16f5e7[_0x39ef95(0x224)])===null||_0x16f5e7===void 0x0?void 0x0:_0x16f5e7[_0x39ef95(0x26d)])||null;}};function computeConnectionPointInfo(_0x42add1,_0x482274,_0x2d591e,_0x43159d,_0x43ed8a,_0x2fc54a){const _0x23dd46=_0x4eb413,_0x17cead=_0x43ed8a['getShapeModel'](_0x42add1,_0x482274,_0x2d591e);if(!_0x17cead)return null;const _0x2f48b9=_0x2fc54a[_0x23dd46(0x255)]({'unitId':_0x42add1,'subUnitId':_0x482274,'drawingId':_0x2d591e});if(!(_0x2f48b9===null||_0x2f48b9===void 0x0?void 0x0:_0x2f48b9[_0x23dd46(0x24c)]))return null;const {left:left=0x0,top:top=0x0,width:width=0x0,height:height=0x0,flipX:flipX=![],flipY:flipY=![],angle:_0x13a251}=_0x2f48b9['transform'];_0x17cead[_0x23dd46(0x1f1)]({'width':width,'height':height});const _0x11736b=_0x17cead['getConnectionSiteList']()[_0x23dd46(0x24b)](_0x49e657=>_0x49e657[_0x23dd46(0x1d9)]===_0x43159d);if(!_0x11736b)return null;let _0x71b825=flipX?width-_0x11736b['x']:_0x11736b['x'],_0x50686a=flipY?height-_0x11736b['y']:_0x11736b['y'];if(_0x13a251&&_0x13a251!==0x0){const _0x58e244=_0x13a251*Math['PI']/0xb4,_0x389f52=Math['cos'](_0x58e244),_0x2782d7=Math[_0x23dd46(0x256)](_0x58e244),_0xeafce7=width/0x2,_0x1ecee3=height/0x2,_0x4f7c13=_0x71b825-_0xeafce7,_0x433eb9=_0x50686a-_0x1ecee3;_0x71b825=_0xeafce7+_0x4f7c13*_0x389f52-_0x433eb9*_0x2782d7,_0x50686a=_0x1ecee3+_0x4f7c13*_0x2782d7+_0x433eb9*_0x389f52;}_0x71b825+=left,_0x50686a+=top;let _0x4717c2=_0x11736b[_0x23dd46(0x21f)]/0xea60;if(flipX)_0x4717c2=0xb4-_0x4717c2;if(flipY)_0x4717c2=-_0x4717c2;_0x4717c2+=_0x13a251||0x0,_0x4717c2=(_0x4717c2%0x168+0x168)%0x168;const _0xc7be70=(0x0,_univerjs_pro_engine_shape[_0x23dd46(0x223)])({'left':left,'top':top,'width':width,'height':height},_0x13a251||0x0);return{'point':{'x':_0x71b825,'y':_0x50686a},'angle':_0x4717c2,'bounds':_0xc7be70};}function calculateFreeEndpointAngle(_0x408dc4,_0x39948c){const _0x4c63d0=_0x4eb413,_0x25afcf=_0x39948c['x']-_0x408dc4['x'],_0x169bfd=_0x39948c['y']-_0x408dc4['y'];if(Math[_0x4c63d0(0x22e)](_0x25afcf)>=Math[_0x4c63d0(0x22e)](_0x169bfd))return _0x25afcf>=0x0?0xb4:0x0;return _0x169bfd>=0x0?0x10e:0x5a;}function computeFreeEndpointInfo(_0x15440c,_0x30cc88,_0x23940f,_0x123ce2,_0x3ca110,_0xaee4fd,_0x1cc485){const _0x573f5c=_0x4eb413,_0x7d3410=_0xaee4fd[_0x573f5c(0x23a)](_0x15440c,_0x30cc88,_0x23940f);if(!_0x7d3410)return null;const _0x5bb04f=_0x1cc485[_0x573f5c(0x255)]({'unitId':_0x15440c,'subUnitId':_0x30cc88,'drawingId':_0x23940f});if(!(_0x5bb04f===null||_0x5bb04f===void 0x0?void 0x0:_0x5bb04f[_0x573f5c(0x24c)]))return null;const {left:left=0x0,top:top=0x0,width:width=0x0,height:height=0x0,flipX:flipX=![],flipY:flipY=![]}=_0x5bb04f[_0x573f5c(0x24c)];_0x7d3410[_0x573f5c(0x1f1)]({'width':width,'height':height});const _0x374c85=_0x7d3410[_0x573f5c(0x1fe)]();if(_0x374c85[_0x573f5c(0x204)]<0x2)return null;const _0x3bebb5=_0x123ce2?_0x374c85[0x0]:_0x374c85[_0x374c85[_0x573f5c(0x204)]-0x1],_0x39a0c1=new _univerjs_pro_engine_shape['ConnectorCoordinateTransform']({'left':left,'top':top,'width':width,'height':height,'flipX':flipX,'flipY':flipY})['localToWorld'](_0x3bebb5);return{'point':_0x39a0c1,'angle':calculateFreeEndpointAngle(_0x3ca110[_0x573f5c(0x229)],_0x39a0c1),'bounds':{'left':_0x39a0c1['x'],'top':_0x39a0c1['y'],'width':0x0,'height':0x0}};}function _0x2d84(){const _0x5c1627=['shapeId',',\x20but\x20expected\x20a\x20connector\x20shape\x20type.','type','parse','shape','3211488cFOfrh','2287122ONvFGN','ShapeArrowSizeEnum','stringify','FEnum','constructor','endArrow','executeCommand','height','getConnectionSiteList','find','transform','DEFAULT_SHAPE_WIDTH','fill','ShapeLineJoinEnum','getDrawingPoints','5229SQabQa','\x20and\x20subUnitId\x20','FWorksheet','UpdateConnectorRelationCommand','getDrawingByParam','sin','775dJXlsn','fillType','get','drawId','SolidFill','_commandService','worldRect','getAdjustPoints','_injector','setPosition','getAdjustNames','push','shapeData','gradientType','25924VweGzW','call','left','connectionSiteIndex','top','ShapeTypeEnum','ShapeLineCapEnum','setShapeType','from','getShapeType','getShapeRelation','26302012tsybeB','index','ShapeFillEnum','opacity','_resolveExistingOrFreeEndpoint','iterator','function','getShapes','getStartConnectInfo','DrawingTypeEnum','getWorkbook','updateShape','object','extend','_resolveEndpoints','ShapeLineTypeEnum','setAbsolutePosition','insertShape','getEndConnectInfo','Skeleton\x20for\x20unitId\x20','26dGsOpS','SheetsShapeService','102199DQzUWQ','setEndArrowType','ShapeLineDashEnum','updateContext','Module','lineJoinType','adjustValues','Shape\x20type\x20is\x20required.\x20Please\x20call\x20setShapeType()\x20before\x20build().','_preloadShapeProperties','default','setStartArrowSize','colorStops\x20is\x20required\x20and\x20should\x20contain\x20at\x20least\x20one\x20color\x20stop.','dashType','shapeType','routeConnectorLineShape','setShapeGradientFill','getConnectorLinePoints','startArrow','ShapeGradientTypeEnum','getSize','FShape','width','length','cxnIndex','connectShapes','setNoneFill','GradientFill','flipX','getUnitId','subUnitId','setStrokeWidth','color','285817qoVvZx','toPrimitive','setStrokeLineDashType','setShapeSolidFill','\x20not\x20found','getShapeData','convertPositionCellToSheetOverGrid','setStrokeLineType','SetShapeDrawingDataCommand','drawingType','size','getSheetId','isLineShape','newShape','computeConnectorRouteLayout','ISheetDrawingService','NoFill','ang','DEFAULT_SHAPE_HEIGHT','build','lineType','getBasicShapeRotateBound','relation','keys','ensureSkeleton','flipY','RemoveSheetDrawingCommand','point','isConnectorShape','getShapeId','DRAWING_SHAPE','generateRandomId','abs','setStartArrowType','symbol','SheetSkeletonService','unitId','string','stroke','toStringTag','defineProperty','16010yUsGIx','IDrawingManagerService','ShapeArrowTypeEnum','getShapeModel','6IPYGcu'];_0x2d84=function(){return _0x5c1627;};return _0x2d84();}var FWorksheetShapeMixin=class extends _univerjs_sheets_facade[_0x4eb413(0x253)]{async[_0x4eb413(0x1e9)](_0x3950cb){const _0x40050b=_0x4eb413,{unitId:_0x3cdd48,subUnitId:_0x320e87,shapeId:_0x3a0269,shapeType:_0x5ab47f,shapeData:_0x296742,x:_0x1710f9,y:_0x19c760,width:_0x47564b,height:_0x3fdeed}=_0x3950cb;return this[_0x40050b(0x25c)]['executeCommand'](_univerjs_pro_sheets_shape['InsertShapeCommand']['id'],{'unitId':_0x3cdd48,'subUnitId':_0x320e87,'shapeId':_0x3a0269,'shapeType':_0x5ab47f,'shapeData':_0x296742,'position':{'x':_0x1710f9,'y':_0x19c760},'width':_0x47564b,'height':_0x3fdeed});}async[_0x4eb413(0x1e3)](_0x5ae73e){const _0x17b0cb=_0x4eb413,{unitId:_0x2ea6f5,subUnitId:_0x2f03f9,shapeId:_0x187d55,shapeType:_0x24c377,shapeData:_0x173aee,x:_0x33d39b,y:_0x3b8a1e,width:_0x213103,height:_0x1bece6}=_0x5ae73e;return this[_0x17b0cb(0x25c)][_0x17b0cb(0x248)](_univerjs_pro_sheets_shape[_0x17b0cb(0x216)]['id'],{'unitId':_0x2ea6f5,'subUnitId':_0x2f03f9,'shapeId':_0x187d55,'shapeType':_0x24c377,'shapeData':_0x173aee,'position':{'x':_0x33d39b,'y':_0x3b8a1e},'width':_0x213103,'height':_0x1bece6});}[_0x4eb413(0x21b)](_0x4fe067){const _0x51b6c8=_0x4eb413,_0x2f4f13=this[_0x51b6c8(0x1e2)]()[_0x51b6c8(0x20a)](),_0x50d051=this[_0x51b6c8(0x219)]();if(_0x4fe067){const _0x112209=new FShape(_0x2f4f13,_0x50d051,_0x4fe067[_0x51b6c8(0x25a)],this[_0x51b6c8(0x25f)]);return this[_0x51b6c8(0x1f6)](_0x112209,_0x2f4f13,_0x50d051,_0x4fe067['drawId']),_0x112209;}return new FShape(_0x2f4f13,_0x50d051,(0x0,_univerjs_core[_0x51b6c8(0x22d)])(),this['_injector']);}['newConnector'](_0x325ec3){const _0x518092=_0x4eb413,_0x274ddb=this[_0x518092(0x1e2)]()[_0x518092(0x20a)](),_0x1df111=this['getSheetId']();if(_0x325ec3){const _0x4a8c4b=new FConnectorShape(_0x274ddb,_0x1df111,_0x325ec3['drawId'],this[_0x518092(0x25f)]);return this[_0x518092(0x1f6)](_0x4a8c4b,_0x274ddb,_0x1df111,_0x325ec3[_0x518092(0x25a)]),_0x4a8c4b;}return new FConnectorShape(_0x274ddb,_0x1df111,(0x0,_univerjs_core[_0x518092(0x22d)])(),this[_0x518092(0x25f)]);}[_0x4eb413(0x1df)](){const _0xcc24ff=_0x4eb413,_0x553367=this['_injector'][_0xcc24ff(0x259)](_univerjs_sheets_drawing[_0xcc24ff(0x21d)]),_0x2534a9=this[_0xcc24ff(0x1e2)]()[_0xcc24ff(0x20a)](),_0x1cc135=this['getSheetId'](),_0x4ab956=_0x553367['getDrawingData'](_0x2534a9,_0x1cc135);if(!_0x4ab956)return[];const _0x52f6d7=[];for(const [_0x558b76,_0x1d970c]of Object['entries'](_0x4ab956))if(_0x1d970c&&_0x1d970c[_0xcc24ff(0x217)]===_univerjs_core[_0xcc24ff(0x1e1)][_0xcc24ff(0x22c)]){const _0x3c14fe=new FShape(_0x2534a9,_0x1cc135,_0x558b76,this[_0xcc24ff(0x25f)]);this[_0xcc24ff(0x1f6)](_0x3c14fe,_0x2534a9,_0x1cc135,_0x558b76),_0x52f6d7[_0xcc24ff(0x262)](_0x3c14fe);}return _0x52f6d7;}['removeShape'](_0x2d3d8a){const _0x5d731e=_0x4eb413,{unitId:_0x288d4f,subUnitId:_0x1daf79,drawId:_0x23136f}=_0x2d3d8a;return this[_0x5d731e(0x25c)][_0x5d731e(0x248)](_univerjs_sheets_drawing[_0x5d731e(0x228)]['id'],{'unitId':_0x288d4f,'drawings':[{'unitId':_0x288d4f,'subUnitId':_0x1daf79,'drawingId':_0x23136f,'drawingType':_univerjs_core[_0x5d731e(0x1e1)][_0x5d731e(0x22c)]}]});}async[_0x4eb413(0x206)](_0x446edc){const _0x445810=_0x4eb413,{connector:_0x255050,startTarget:_0x1a8cb0,endTarget:_0x1ea6ac}=_0x446edc;if(!_0x1a8cb0&&!_0x1ea6ac)return![];const _0x5429e0=this['getWorkbook']()[_0x445810(0x20a)](),_0x1c5b23=this[_0x445810(0x219)](),_0x56c898=this[_0x445810(0x25f)][_0x445810(0x259)](_univerjs_pro_sheets_shape[_0x445810(0x1ed)]),_0x4c1a83=this['_injector']['get'](_univerjs_drawing['IDrawingManagerService']),_0x3c479b=_0x56c898[_0x445810(0x23a)](_0x5429e0,_0x1c5b23,_0x255050[_0x445810(0x25a)]);if(!_0x3c479b)return![];const _0x26a41e=_0x3c479b[_0x445810(0x26e)](),_0x3856d2=_0x3c479b[_0x445810(0x26f)](),_0x3b2900={};for(const _0x329765 of _0x3c479b[_0x445810(0x261)]()){const _0x249b29=_0x3c479b['getAdjustValueByName'](_0x329765);if(_0x249b29!==void 0x0)_0x3b2900[_0x329765]=_0x249b29;}const {startInfo:_0x3aaf4c,endInfo:_0x3a9d54}=this[_0x445810(0x1e6)](_0x5429e0,_0x1c5b23,_0x255050,_0x3c479b,_0x1a8cb0,_0x1ea6ac,_0x56c898,_0x4c1a83,_0x3856d2);if(!_0x3aaf4c||!_0x3a9d54)return![];const _0x458a74=(0x0,_univerjs_pro_engine_shape[_0x445810(0x21c)])((0x0,_univerjs_pro_engine_shape[_0x445810(0x1fc)])(_0x3aaf4c,_0x3a9d54,_0x26a41e),_0x26a41e),_0x592751={};if(_0x1a8cb0)_0x592751[_0x445810(0x26d)]={'shapeId':_0x1a8cb0[_0x445810(0x240)][_0x445810(0x25a)],'cxnIndex':_0x1a8cb0[_0x445810(0x268)]};else{if(_0x3856d2===null||_0x3856d2===void 0x0?void 0x0:_0x3856d2[_0x445810(0x26d)])_0x592751[_0x445810(0x26d)]=_0x3856d2['from'];}if(_0x1ea6ac)_0x592751['to']={'shapeId':_0x1ea6ac['shape'][_0x445810(0x25a)],'cxnIndex':_0x1ea6ac[_0x445810(0x268)]};else{if(_0x3856d2===null||_0x3856d2===void 0x0?void 0x0:_0x3856d2['to'])_0x592751['to']=_0x3856d2['to'];}return this[_0x445810(0x25c)][_0x445810(0x248)](_univerjs_pro_sheets_shape[_0x445810(0x254)]['id'],{'unitId':_0x5429e0,'subUnitId':_0x1c5b23,'connectorShapeId':_0x255050[_0x445810(0x25a)],'width':_0x458a74[_0x445810(0x25d)][_0x445810(0x203)],'height':_0x458a74[_0x445810(0x25d)][_0x445810(0x249)],'left':_0x458a74[_0x445810(0x25d)]['left'],'top':_0x458a74[_0x445810(0x25d)][_0x445810(0x269)],'flipX':_0x458a74[_0x445810(0x25d)][_0x445810(0x209)]||![],'flipY':_0x458a74[_0x445810(0x25d)][_0x445810(0x227)]||![],'oldAdjustValues':_0x3b2900,'newAdjustValues':_0x458a74[_0x445810(0x1f4)],'newLineType':_0x458a74[_0x445810(0x222)],'oldLineType':_0x26a41e,'rotation':_0x458a74['rotation'],'oldRelation':_0x3856d2,'newRelation':_0x592751});}[_0x4eb413(0x1f6)](_0x353fa3,_0x1c4c33,_0x1bbe81,_0x1a879d){const _0x7d501c=_0x4eb413,_0x49c087=this[_0x7d501c(0x25f)]['get'](_univerjs_drawing[_0x7d501c(0x238)])[_0x7d501c(0x255)]({'unitId':_0x1c4c33,'subUnitId':_0x1bbe81,'drawingId':_0x1a879d});if(_0x49c087===null||_0x49c087===void 0x0?void 0x0:_0x49c087['transform']){var _0x13d3aa,_0x41ced9,_0x2488d0,_0x3e2b52;_0x353fa3['x']=(_0x13d3aa=_0x49c087[_0x7d501c(0x24c)][_0x7d501c(0x267)])!==null&&_0x13d3aa!==void 0x0?_0x13d3aa:0x0,_0x353fa3['y']=(_0x41ced9=_0x49c087[_0x7d501c(0x24c)][_0x7d501c(0x269)])!==null&&_0x41ced9!==void 0x0?_0x41ced9:0x0,_0x353fa3['width']=(_0x2488d0=_0x49c087['transform'][_0x7d501c(0x203)])!==null&&_0x2488d0!==void 0x0?_0x2488d0:_0x353fa3[_0x7d501c(0x203)],_0x353fa3['height']=(_0x3e2b52=_0x49c087[_0x7d501c(0x24c)][_0x7d501c(0x249)])!==null&&_0x3e2b52!==void 0x0?_0x3e2b52:_0x353fa3['height'];}const _0x1649bc=this[_0x7d501c(0x25f)]['get'](_univerjs_pro_sheets_shape[_0x7d501c(0x1ed)])[_0x7d501c(0x23a)](_0x1c4c33,_0x1bbe81,_0x1a879d);if(_0x1649bc){_0x353fa3[_0x7d501c(0x1fb)]=_0x1649bc['getShapeType']();const _0xe0f10f=_0x1649bc[_0x7d501c(0x213)]();if(_0xe0f10f)_0x353fa3[_0x7d501c(0x263)]=JSON[_0x7d501c(0x23f)](JSON[_0x7d501c(0x244)](_0xe0f10f));}}['_resolveEndpoints'](_0x2467b2,_0x4ca2ed,_0x51acd7,_0x440a92,_0x1f6ff8,_0x39b647,_0x506289,_0x44a860,_0x4432c6){const _0x4c40bb=_0x4eb413;let _0x585cfa=null,_0x3f2825=null;if(_0x1f6ff8)_0x585cfa=computeConnectionPointInfo(_0x2467b2,_0x4ca2ed,_0x1f6ff8[_0x4c40bb(0x240)][_0x4c40bb(0x25a)],_0x1f6ff8[_0x4c40bb(0x268)],_0x506289,_0x44a860);if(_0x39b647)_0x3f2825=computeConnectionPointInfo(_0x2467b2,_0x4ca2ed,_0x39b647[_0x4c40bb(0x240)][_0x4c40bb(0x25a)],_0x39b647[_0x4c40bb(0x268)],_0x506289,_0x44a860);if(!_0x585cfa)_0x585cfa=this['_resolveExistingOrFreeEndpoint'](_0x2467b2,_0x4ca2ed,_0x51acd7[_0x4c40bb(0x25a)],!![],_0x3f2825,_0x4432c6===null||_0x4432c6===void 0x0?void 0x0:_0x4432c6[_0x4c40bb(0x26d)],_0x506289,_0x44a860);if(!_0x3f2825)_0x3f2825=this['_resolveExistingOrFreeEndpoint'](_0x2467b2,_0x4ca2ed,_0x51acd7[_0x4c40bb(0x25a)],![],_0x585cfa,_0x4432c6===null||_0x4432c6===void 0x0?void 0x0:_0x4432c6['to'],_0x506289,_0x44a860);return{'startInfo':_0x585cfa,'endInfo':_0x3f2825};}[_0x4eb413(0x1dc)](_0x25e035,_0x21f838,_0x55598d,_0x5aa750,_0x14ac25,_0x5cb57e,_0x1e07c1,_0x48316c){const _0xb595b8=_0x4eb413;if(_0x5cb57e){const _0x3035d9=computeConnectionPointInfo(_0x25e035,_0x21f838,_0x5cb57e[_0xb595b8(0x23c)],_0x5cb57e[_0xb595b8(0x205)],_0x1e07c1,_0x48316c);if(_0x3035d9)return _0x3035d9;}if(!_0x14ac25)return null;return computeFreeEndpointInfo(_0x25e035,_0x21f838,_0x55598d,_0x5aa750,_0x14ac25,_0x1e07c1,_0x48316c);}};_univerjs_sheets_facade['FWorksheet'][_0x4eb413(0x1e5)](FWorksheetShapeMixin),exports['FConnectorShape']=FConnectorShape,exports[_0x4eb413(0x202)]=FShape;
1
+ const _0x2d7b2e=_0x6a60;function _0x6a60(_0x25794b,_0xfb9792){_0x25794b=_0x25794b-0xf4;const _0x36eef6=_0x36ee();let _0x6a6081=_0x36eef6[_0x25794b];return _0x6a6081;}(function(_0x561cb6,_0x3859af){const _0x5af7e1=_0x6a60,_0x1bb1df=_0x561cb6();while(!![]){try{const _0x424b9f=parseInt(_0x5af7e1(0x14c))/0x1+parseInt(_0x5af7e1(0x14e))/0x2*(parseInt(_0x5af7e1(0x172))/0x3)+-parseInt(_0x5af7e1(0x129))/0x4*(-parseInt(_0x5af7e1(0x152))/0x5)+-parseInt(_0x5af7e1(0x13c))/0x6*(parseInt(_0x5af7e1(0xfc))/0x7)+parseInt(_0x5af7e1(0x156))/0x8*(-parseInt(_0x5af7e1(0x18e))/0x9)+parseInt(_0x5af7e1(0x12d))/0xa*(-parseInt(_0x5af7e1(0x189))/0xb)+-parseInt(_0x5af7e1(0xf7))/0xc*(parseInt(_0x5af7e1(0x126))/0xd);if(_0x424b9f===_0x3859af)break;else _0x1bb1df['push'](_0x1bb1df['shift']());}catch(_0x3259bc){_0x1bb1df['push'](_0x1bb1df['shift']());}}}(_0x36ee,0x4826e),Object[_0x2d7b2e(0x123)](exports,Symbol[_0x2d7b2e(0x169)],{'value':_0x2d7b2e(0x12c)}));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[_0x2d7b2e(0x165)]{get['ShapeTypeEnum'](){const _0x51845f=_0x2d7b2e;return _univerjs_pro_engine_shape[_0x51845f(0x139)];}get[_0x2d7b2e(0xf9)](){return _univerjs_pro_engine_shape['ShapeFillEnum'];}get[_0x2d7b2e(0xf8)](){const _0x27f3c5=_0x2d7b2e;return _univerjs_pro_engine_shape[_0x27f3c5(0xf8)];}get['ShapeLineTypeEnum'](){const _0xf9c5d6=_0x2d7b2e;return _univerjs_pro_engine_shape[_0xf9c5d6(0x17c)];}get[_0x2d7b2e(0x107)](){const _0x22c146=_0x2d7b2e;return _univerjs_pro_engine_shape[_0x22c146(0x107)];}get[_0x2d7b2e(0x122)](){return _univerjs_pro_engine_shape['ShapeLineCapEnum'];}get[_0x2d7b2e(0x155)](){const _0x58ebed=_0x2d7b2e;return _univerjs_pro_engine_shape[_0x58ebed(0x155)];}get[_0x2d7b2e(0x135)](){const _0x28b827=_0x2d7b2e;return _univerjs_pro_engine_shape[_0x28b827(0x135)];}get['ShapeArrowSizeEnum'](){const _0x53ed59=_0x2d7b2e;return _univerjs_pro_engine_shape[_0x53ed59(0x18b)];}};_univerjs_core_facade[_0x2d7b2e(0x165)][_0x2d7b2e(0x124)](FSheetsShapeEnumMixin);function _typeof(_0x2d9e0a){'@babel/helpers - typeof';const _0x5b75e2=_0x2d7b2e;return _typeof='function'==typeof Symbol&&_0x5b75e2(0x18d)==typeof Symbol[_0x5b75e2(0x125)]?function(_0x8232f){return typeof _0x8232f;}:function(_0x2c721f){const _0x423e54=_0x5b75e2;return _0x2c721f&&_0x423e54(0x11c)==typeof Symbol&&_0x2c721f['constructor']===Symbol&&_0x2c721f!==Symbol[_0x423e54(0x16a)]?'symbol':typeof _0x2c721f;},_typeof(_0x2d9e0a);}function toPrimitive(_0x5996eb,_0x164e25){const _0x292430=_0x2d7b2e;if(_0x292430(0xff)!=_typeof(_0x5996eb)||!_0x5996eb)return _0x5996eb;var _0x8fd060=_0x5996eb[Symbol[_0x292430(0x161)]];if(void 0x0!==_0x8fd060){var _0x5485e2=_0x8fd060[_0x292430(0x112)](_0x5996eb,_0x164e25||'default');if('object'!=_typeof(_0x5485e2))return _0x5485e2;throw new TypeError(_0x292430(0x104));}return(_0x292430(0x110)===_0x164e25?String:Number)(_0x5996eb);}function toPropertyKey(_0x59d8ec){const _0x3a9a65=_0x2d7b2e;var _0x548625=toPrimitive(_0x59d8ec,_0x3a9a65(0x110));return _0x3a9a65(0x18d)==_typeof(_0x548625)?_0x548625:_0x548625+'';}function _0x36ee(){const _0x5e196c=['getConnectionSiteList','lineType','\x20not\x20found','setStrokeWidth','setWidth','setShapeGradientFill','477orHaUc','setStrokeColor','getShapeData','_commandService','type','_resolveEndpoints','setNoneFill','top','updateContext','push','ShapeLineTypeEnum','getStartConnectInfo','Skeleton\x20for\x20unitId\x20','setShapeSolidFill','DRAWING_SHAPE','endArrow','DrawingTypeEnum','executeCommand','stringify','from','gradientType','length','transform','622490VsfWVX','find','ShapeArrowSizeEnum','newShape','symbol','27ukQTjU','relation','generateRandomId','SolidFill','colorStops\x20is\x20required\x20and\x20should\x20contain\x20at\x20least\x20one\x20color\x20stop.','shape','width','opacity','convertPositionCellToSheetOverGrid','NoFill','469428SWkztv','ShapeGradientTypeEnum','ShapeFillEnum','getWorkbook','getConnectionSites','1603ICFvbi','worldRect','FConnectorShape','object','getShapeModel','isConnectorShape','getSheetId','getSize','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','\x20and\x20subUnitId\x20','index','ShapeLineDashEnum','setStrokeLineJoinType','SheetSkeletonService','setStrokeLineDashType','getBasicShapeRotateBound','setStrokeLineType','getShapeType','fill','get','string','gradientAngle','call','rotation','ensureSkeleton','unitId','Invalid\x20shape\x20type\x20for\x20connector.\x20Received\x20','ConnectorCoordinateTransform','left','point','_injector','flipY','function','ang',',\x20but\x20expected\x20a\x20connector\x20shape\x20type.','fillType','getConnectorLinePoints','setEndArrowType','ShapeLineCapEnum','defineProperty','extend','iterator','65GgqtDQ','startArrow','SetShapeDrawingDataCommand','4luTqtu','setPosition','routeConnectorLineShape','Module','10PMWmAd','keys','size','Shape\x20type\x20is\x20required.\x20Please\x20call\x20setShapeType()\x20before\x20build().','getEndConnectInfo','getAdjustValueByName','GradientFill','subUnitId','ShapeArrowTypeEnum','shapeData','cxnIndex','flipX','ShapeTypeEnum','getDrawingData','height','5976JGUgNX','drawingType','adjustValues','gradientStops','parse','setStrokeLineCapType','setShapeType','FWorksheet','FShape','drawId','_resolveExistingOrFreeEndpoint','abs','setStrokeOpacity','ISheetDrawingService','build','setStartArrowSize','527880FLXygC','dashType','6070OzJxSh','lineJoinType','_preloadShapeProperties','getUnitId','1125165yTvGia','connectionSiteIndex','isLineShape','ShapeLineJoinEnum','1225800kxwgOS','updateShape','getDrawingPoints','DEFAULT_SHAPE_WIDTH','getPosition','DEFAULT_SHAPE_HEIGHT','sin','UpdateConnectorRelationCommand','getAdjustPoints','shapeType','computeConnectorRouteLayout','toPrimitive','SheetsShapeService','entries','getDrawingByParam','FEnum','stroke','IDrawingManagerService','lineStrokeType','toStringTag','prototype','getAdjustNames'];_0x36ee=function(){return _0x5e196c;};return _0x36ee();}function _defineProperty(_0x53c341,_0x3d7122,_0x49190c){const _0x13fd3e=_0x2d7b2e;return(_0x3d7122=toPropertyKey(_0x3d7122))in _0x53c341?Object[_0x13fd3e(0x123)](_0x53c341,_0x3d7122,{'value':_0x49190c,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x53c341[_0x3d7122]=_0x49190c,_0x53c341;}var FShape=class{constructor(_0x451bee,_0x16e586,_0x385439,_0x8bc4e2){const _0x40c86c=_0x2d7b2e;_defineProperty(this,_0x40c86c(0x115),void 0x0),_defineProperty(this,_0x40c86c(0x134),void 0x0),_defineProperty(this,_0x40c86c(0x145),void 0x0),_defineProperty(this,'x',0x0),_defineProperty(this,'y',0x0),_defineProperty(this,_0x40c86c(0x194),_univerjs_pro_sheets_shape[_0x40c86c(0x159)]),_defineProperty(this,'height',_univerjs_pro_sheets_shape[_0x40c86c(0x15b)]),_defineProperty(this,_0x40c86c(0x15f),void 0x0),_defineProperty(this,_0x40c86c(0x136),{}),_defineProperty(this,'_injector',void 0x0),this[_0x40c86c(0x115)]=_0x451bee,this['subUnitId']=_0x16e586,this[_0x40c86c(0x145)]=_0x385439||(0x0,_univerjs_core[_0x40c86c(0x190)])(),this['_injector']=_0x8bc4e2;}[_0x2d7b2e(0x12a)](_0x4787e9,_0x2ffe0f,_0x4e8957,_0x1ce24d){const _0x10e118=_0x2d7b2e,_0x303b12=this[_0x10e118(0x11a)]['get'](_univerjs_sheets[_0x10e118(0x109)])[_0x10e118(0x114)](this[_0x10e118(0x115)],this[_0x10e118(0x134)]);if(!_0x303b12)throw new Error(_0x10e118(0x17e)+this[_0x10e118(0x115)]+_0x10e118(0x105)+this[_0x10e118(0x134)]+_0x10e118(0x16e));const {transform:_0x1cfad4}=(0x0,_univerjs_sheets[_0x10e118(0xf5)])(this[_0x10e118(0x115)],this['subUnitId'],{'row':_0x4787e9,'column':_0x2ffe0f,'rowOffset':_0x4e8957,'columnOffset':_0x1ce24d},0x1,0x1,_0x303b12);return this['x']=_0x1cfad4['left'],this['y']=_0x1cfad4['top'],this;}['setAbsolutePosition'](_0x1f9e04,_0x2f5c73){return this['x']=_0x1f9e04,this['y']=_0x2f5c73,this;}[_0x2d7b2e(0x142)](_0x47001e){return this['shapeType']=_0x47001e,this;}[_0x2d7b2e(0x17f)](_0x5d18ff,_0xf1b8d9){const _0x502280=_0x2d7b2e;if(!this[_0x502280(0x136)][_0x502280(0x10e)])this[_0x502280(0x136)]['fill']={};this[_0x502280(0x136)][_0x502280(0x10e)][_0x502280(0x11f)]=_univerjs_pro_engine_shape['ShapeFillEnum'][_0x502280(0x191)];if(_0x5d18ff!==void 0x0)this[_0x502280(0x136)][_0x502280(0x10e)]['color']=_0x5d18ff;if(_0xf1b8d9!==void 0x0)this[_0x502280(0x136)][_0x502280(0x10e)]['opacity']=_0xf1b8d9;return this;}[_0x2d7b2e(0x171)](_0x4388ad,_0x9391d1,_0x3f805b){const _0xb4a396=_0x2d7b2e;if(_0x9391d1===void 0x0||_0x9391d1[_0xb4a396(0x187)]===0x0)throw new Error(_0xb4a396(0x192));if(!this[_0xb4a396(0x136)][_0xb4a396(0x10e)])this[_0xb4a396(0x136)][_0xb4a396(0x10e)]={};this[_0xb4a396(0x136)]['fill'][_0xb4a396(0x13f)]=_0x9391d1,this['shapeData'][_0xb4a396(0x10e)][_0xb4a396(0x11f)]=_univerjs_pro_engine_shape[_0xb4a396(0xf9)][_0xb4a396(0x133)],this[_0xb4a396(0x136)][_0xb4a396(0x10e)][_0xb4a396(0x186)]=_0x4388ad;if(_0x3f805b!==void 0x0)this[_0xb4a396(0x136)][_0xb4a396(0x10e)][_0xb4a396(0x111)]=_0x3f805b;return this;}[_0x2d7b2e(0x178)](){const _0x190256=_0x2d7b2e;return this[_0x190256(0x136)][_0x190256(0x10e)]={'fillType':_univerjs_pro_engine_shape[_0x190256(0xf9)][_0x190256(0xf6)]},this;}[_0x2d7b2e(0x173)](_0x489aae){const _0x23e51f=_0x2d7b2e;if(!this[_0x23e51f(0x136)]['stroke'])this[_0x23e51f(0x136)][_0x23e51f(0x166)]={};return this[_0x23e51f(0x136)][_0x23e51f(0x166)]['color']=_0x489aae,this;}[_0x2d7b2e(0x16f)](_0x3f074c){const _0x5921fc=_0x2d7b2e;if(!this[_0x5921fc(0x136)][_0x5921fc(0x166)])this[_0x5921fc(0x136)][_0x5921fc(0x166)]={};return this[_0x5921fc(0x136)][_0x5921fc(0x166)][_0x5921fc(0x194)]=_0x3f074c,this;}[_0x2d7b2e(0x10a)](_0x39c6ae){const _0xf02d82=_0x2d7b2e;if(!this[_0xf02d82(0x136)][_0xf02d82(0x166)])this[_0xf02d82(0x136)][_0xf02d82(0x166)]={};return this[_0xf02d82(0x136)][_0xf02d82(0x166)][_0xf02d82(0x14d)]=_0x39c6ae,this;}[_0x2d7b2e(0x108)](_0x5aed1e){const _0x2c28cb=_0x2d7b2e;if(!this['shapeData'][_0x2c28cb(0x166)])this[_0x2c28cb(0x136)][_0x2c28cb(0x166)]={};return this[_0x2c28cb(0x136)][_0x2c28cb(0x166)][_0x2c28cb(0x14f)]=_0x5aed1e,this;}[_0x2d7b2e(0x141)](_0x46236c){const _0x3119ff=_0x2d7b2e;if(!this[_0x3119ff(0x136)][_0x3119ff(0x166)])this[_0x3119ff(0x136)][_0x3119ff(0x166)]={};return this['shapeData']['stroke']['capType']=_0x46236c,this;}[_0x2d7b2e(0x148)](_0x805c77){const _0x35fbb3=_0x2d7b2e;if(!this[_0x35fbb3(0x136)][_0x35fbb3(0x166)])this[_0x35fbb3(0x136)][_0x35fbb3(0x166)]={};return this[_0x35fbb3(0x136)][_0x35fbb3(0x166)][_0x35fbb3(0xf4)]=_0x805c77,this;}[_0x2d7b2e(0x10c)](_0x346053){const _0x190371=_0x2d7b2e;if(!this[_0x190371(0x136)][_0x190371(0x166)])this[_0x190371(0x136)]['stroke']={};return this[_0x190371(0x136)][_0x190371(0x166)][_0x190371(0x168)]=_0x346053,this;}[_0x2d7b2e(0x170)](_0x2b9349){const _0x1e8e02=_0x2d7b2e;return this[_0x1e8e02(0x194)]=_0x2b9349,this;}['setHeight'](_0x1a8b4e){const _0x230bd6=_0x2d7b2e;return this[_0x230bd6(0x13b)]=_0x1a8b4e,this;}[_0x2d7b2e(0x154)](){const _0x35e60b=_0x2d7b2e,_0x3aa4ab=this[_0x35e60b(0x11a)][_0x35e60b(0x10f)](_univerjs_pro_sheets_shape['SheetsShapeService'])[_0x35e60b(0x100)](this[_0x35e60b(0x115)],this[_0x35e60b(0x134)],this[_0x35e60b(0x145)]);if(_0x3aa4ab)return(0x0,_univerjs_pro_engine_shape[_0x35e60b(0x101)])(_0x3aa4ab[_0x35e60b(0x10d)]());if(this[_0x35e60b(0x15f)])return(0x0,_univerjs_pro_engine_shape[_0x35e60b(0x101)])(this['shapeType']);return![];}[_0x2d7b2e(0xfb)](){const _0x4f4fff=_0x2d7b2e,_0x443db6=this['_injector'][_0x4f4fff(0x10f)](_univerjs_pro_sheets_shape[_0x4f4fff(0x162)])['getShapeModel'](this['unitId'],this[_0x4f4fff(0x134)],this[_0x4f4fff(0x145)]);if(!_0x443db6)return[];const _0x4660a1=this['_injector'][_0x4f4fff(0x10f)](_univerjs_drawing[_0x4f4fff(0x167)])[_0x4f4fff(0x164)]({'unitId':this[_0x4f4fff(0x115)],'subUnitId':this[_0x4f4fff(0x134)],'drawingId':this[_0x4f4fff(0x145)]});if(!(_0x4660a1===null||_0x4660a1===void 0x0?void 0x0:_0x4660a1[_0x4f4fff(0x188)]))return[];const {width:width=0x0,height:height=0x0}=_0x4660a1[_0x4f4fff(0x188)];return _0x443db6[_0x4f4fff(0x17a)]({'width':width,'height':height}),_0x443db6['getConnectionSiteList']();}[_0x2d7b2e(0x15e)](){const _0x597c8a=_0x2d7b2e,_0x248f00=this[_0x597c8a(0x11a)]['get'](_univerjs_pro_sheets_shape['SheetsShapeService'])[_0x597c8a(0x100)](this[_0x597c8a(0x115)],this[_0x597c8a(0x134)],this[_0x597c8a(0x145)]);if(!_0x248f00)return[];const _0x186c06=this[_0x597c8a(0x11a)]['get'](_univerjs_drawing[_0x597c8a(0x167)])['getDrawingByParam']({'unitId':this[_0x597c8a(0x115)],'subUnitId':this[_0x597c8a(0x134)],'drawingId':this['drawId']});if(!(_0x186c06===null||_0x186c06===void 0x0?void 0x0:_0x186c06[_0x597c8a(0x188)]))return[];const {width:width=0x0,height:height=0x0}=_0x186c06['transform'];return _0x248f00[_0x597c8a(0x17a)]({'width':width,'height':height}),_0x248f00[_0x597c8a(0x158)]();}[_0x2d7b2e(0x120)](){const _0x30b1fa=_0x2d7b2e,_0x1883e1=this[_0x30b1fa(0x11a)][_0x30b1fa(0x10f)](_univerjs_pro_sheets_shape[_0x30b1fa(0x162)])[_0x30b1fa(0x100)](this[_0x30b1fa(0x115)],this[_0x30b1fa(0x134)],this['drawId']);if(!_0x1883e1)return[];if(!(0x0,_univerjs_pro_engine_shape[_0x30b1fa(0x101)])(_0x1883e1['getShapeType']()))return[];const _0x4fc532=this[_0x30b1fa(0x11a)]['get'](_univerjs_drawing['IDrawingManagerService'])['getDrawingByParam']({'unitId':this['unitId'],'subUnitId':this[_0x30b1fa(0x134)],'drawingId':this[_0x30b1fa(0x145)]});if(!(_0x4fc532===null||_0x4fc532===void 0x0?void 0x0:_0x4fc532[_0x30b1fa(0x188)]))return[];const {width:width=0x0,height:height=0x0}=_0x4fc532[_0x30b1fa(0x188)];return _0x1883e1['updateContext']({'width':width,'height':height}),_0x1883e1[_0x30b1fa(0x120)]();}[_0x2d7b2e(0x17d)](){const _0x3de0dc=_0x2d7b2e;var _0x5e217b;const _0x3eaf49=this[_0x3de0dc(0x11a)][_0x3de0dc(0x10f)](_univerjs_pro_sheets_shape['SheetsShapeService'])[_0x3de0dc(0x100)](this[_0x3de0dc(0x115)],this[_0x3de0dc(0x134)],this['drawId']);if(!_0x3eaf49)return null;return(_0x5e217b=_0x3eaf49[_0x3de0dc(0x17d)]())!==null&&_0x5e217b!==void 0x0?_0x5e217b:null;}[_0x2d7b2e(0x131)](){const _0x112565=_0x2d7b2e;var _0x27ebbc;const _0x11ae32=this[_0x112565(0x11a)][_0x112565(0x10f)](_univerjs_pro_sheets_shape[_0x112565(0x162)])[_0x112565(0x100)](this[_0x112565(0x115)],this[_0x112565(0x134)],this[_0x112565(0x145)]);if(!_0x11ae32)return null;return(_0x27ebbc=_0x11ae32[_0x112565(0x131)]())!==null&&_0x27ebbc!==void 0x0?_0x27ebbc:null;}[_0x2d7b2e(0x14a)](){const _0x32852a=_0x2d7b2e;var _0x3f1dbe,_0xfaa018;if(!this[_0x32852a(0x15f)])throw new Error(_0x32852a(0x130));if(this['x']===0x0||this['y']===0x0){const _0x1c17f0=this[_0x32852a(0x11a)][_0x32852a(0x10f)](_univerjs_sheets[_0x32852a(0x109)])['ensureSkeleton'](this[_0x32852a(0x115)],this['subUnitId']);if(!_0x1c17f0)throw new Error(_0x32852a(0x17e)+this[_0x32852a(0x115)]+_0x32852a(0x105)+this[_0x32852a(0x134)]+_0x32852a(0x16e));const {transform:_0x24304d}=(0x0,_univerjs_sheets[_0x32852a(0xf5)])(this[_0x32852a(0x115)],this[_0x32852a(0x134)],{'row':0x1,'column':0x1,'rowOffset':0x0,'columnOffset':0x0},0x1,0x1,_0x1c17f0);this['x']=this['x']>0x0?this['x']:_0x24304d[_0x32852a(0x118)],this['y']=this['y']>0x0?this['y']:_0x24304d[_0x32852a(0x179)];}return this[_0x32852a(0x194)]=(_0x3f1dbe=this['width'])!==null&&_0x3f1dbe!==void 0x0?_0x3f1dbe:_univerjs_pro_sheets_shape['DEFAULT_SHAPE_WIDTH'],this['height']=(_0xfaa018=this[_0x32852a(0x13b)])!==null&&_0xfaa018!==void 0x0?_0xfaa018:_univerjs_pro_sheets_shape[_0x32852a(0x15b)],{'unitId':this[_0x32852a(0x115)],'subUnitId':this[_0x32852a(0x134)],'shapeId':this[_0x32852a(0x145)],'shapeType':this[_0x32852a(0x15f)],'shapeData':Object[_0x32852a(0x12e)](this[_0x32852a(0x136)])[_0x32852a(0x187)]>0x0?this['shapeData']:void 0x0,'x':this['x'],'y':this['y'],'width':this[_0x32852a(0x194)],'height':this[_0x32852a(0x13b)]};}['getShapeId'](){const _0x308fe3=_0x2d7b2e;return this[_0x308fe3(0x145)];}[_0x2d7b2e(0x10d)](){const _0x19bd56=_0x2d7b2e;return this[_0x19bd56(0x15f)];}[_0x2d7b2e(0x174)](){const _0x20b98b=_0x2d7b2e;return this[_0x20b98b(0x136)];}[_0x2d7b2e(0x15a)](){return{'x':this['x'],'y':this['y']};}[_0x2d7b2e(0x103)](){const _0x4a6c78=_0x2d7b2e;return{'width':this[_0x4a6c78(0x194)],'height':this[_0x4a6c78(0x13b)]};}},FConnectorShape=class extends FShape{constructor(_0x892e5f,_0x37b044,_0x38e792,_0x546b85){super(_0x892e5f,_0x37b044,_0x38e792,_0x546b85),_defineProperty(this,'shapeData',{});}[_0x2d7b2e(0x142)](_0x29cf55){const _0x3d85d0=_0x2d7b2e;if(!(0x0,_univerjs_pro_engine_shape[_0x3d85d0(0x101)])(_0x29cf55))throw new Error(_0x3d85d0(0x116)+_0x29cf55+_0x3d85d0(0x11e));return super[_0x3d85d0(0x142)](_0x29cf55),this;}['setStartArrowType'](_0x299d18){const _0x38632b=_0x2d7b2e;var _0x327244,_0x4f6a67;if(!((_0x327244=this[_0x38632b(0x136)])===null||_0x327244===void 0x0?void 0x0:_0x327244['ln']))this[_0x38632b(0x136)]['ln']={};if(!((_0x4f6a67=this[_0x38632b(0x136)])===null||_0x4f6a67===void 0x0||(_0x4f6a67=_0x4f6a67['ln'])===null||_0x4f6a67===void 0x0?void 0x0:_0x4f6a67[_0x38632b(0x127)]))this[_0x38632b(0x136)]['ln']['startArrow']={};return this['shapeData']['ln'][_0x38632b(0x127)][_0x38632b(0x176)]=_0x299d18,this;}[_0x2d7b2e(0x121)](_0x235342){const _0x1b790c=_0x2d7b2e;var _0x188003,_0x1c746f;if(!((_0x188003=this[_0x1b790c(0x136)])===null||_0x188003===void 0x0?void 0x0:_0x188003['ln']))this['shapeData']['ln']={};if(!((_0x1c746f=this[_0x1b790c(0x136)])===null||_0x1c746f===void 0x0||(_0x1c746f=_0x1c746f['ln'])===null||_0x1c746f===void 0x0?void 0x0:_0x1c746f[_0x1b790c(0x181)]))this[_0x1b790c(0x136)]['ln'][_0x1b790c(0x181)]={};return this[_0x1b790c(0x136)]['ln']['endArrow'][_0x1b790c(0x176)]=_0x235342,this;}[_0x2d7b2e(0x14b)](_0x4381c4){const _0x55ecf9=_0x2d7b2e;var _0x1c126b,_0x3440bd;if(!((_0x1c126b=this[_0x55ecf9(0x136)])===null||_0x1c126b===void 0x0?void 0x0:_0x1c126b['ln']))this[_0x55ecf9(0x136)]['ln']={};if(!((_0x3440bd=this[_0x55ecf9(0x136)])===null||_0x3440bd===void 0x0||(_0x3440bd=_0x3440bd['ln'])===null||_0x3440bd===void 0x0?void 0x0:_0x3440bd['startArrow']))this[_0x55ecf9(0x136)]['ln']['startArrow']={};return this[_0x55ecf9(0x136)]['ln'][_0x55ecf9(0x127)][_0x55ecf9(0x12f)]=_0x4381c4,this;}['setEndArrowSize'](_0x23a339){const _0x2f9d53=_0x2d7b2e;var _0x3ab94d,_0x1ce263;if(!((_0x3ab94d=this[_0x2f9d53(0x136)])===null||_0x3ab94d===void 0x0?void 0x0:_0x3ab94d['ln']))this['shapeData']['ln']={};if(!((_0x1ce263=this[_0x2f9d53(0x136)])===null||_0x1ce263===void 0x0||(_0x1ce263=_0x1ce263['ln'])===null||_0x1ce263===void 0x0?void 0x0:_0x1ce263[_0x2f9d53(0x181)]))this[_0x2f9d53(0x136)]['ln'][_0x2f9d53(0x181)]={};return this[_0x2f9d53(0x136)]['ln'][_0x2f9d53(0x181)][_0x2f9d53(0x12f)]=_0x23a339,this;}[_0x2d7b2e(0x14a)](){const _0x374aa8=_0x2d7b2e;return super[_0x374aa8(0x14a)]();}['getEndConnectInfo'](){const _0x4af340=_0x2d7b2e;var _0x20fea5;return((_0x20fea5=this[_0x4af340(0x136)])===null||_0x20fea5===void 0x0||(_0x20fea5=_0x20fea5[_0x4af340(0x18f)])===null||_0x20fea5===void 0x0?void 0x0:_0x20fea5['to'])||null;}[_0x2d7b2e(0x17d)](){const _0x3d24d8=_0x2d7b2e;var _0x4be542;return((_0x4be542=this[_0x3d24d8(0x136)])===null||_0x4be542===void 0x0||(_0x4be542=_0x4be542[_0x3d24d8(0x18f)])===null||_0x4be542===void 0x0?void 0x0:_0x4be542[_0x3d24d8(0x185)])||null;}};function computeConnectionPointInfo(_0x158d16,_0x598cf7,_0x36fa82,_0x3c833f,_0x29e155,_0x3e548a){const _0x23d48f=_0x2d7b2e,_0x2343ff=_0x29e155[_0x23d48f(0x100)](_0x158d16,_0x598cf7,_0x36fa82);if(!_0x2343ff)return null;const _0x3844ec=_0x3e548a[_0x23d48f(0x164)]({'unitId':_0x158d16,'subUnitId':_0x598cf7,'drawingId':_0x36fa82});if(!(_0x3844ec===null||_0x3844ec===void 0x0?void 0x0:_0x3844ec[_0x23d48f(0x188)]))return null;const {left:left=0x0,top:top=0x0,width:width=0x0,height:height=0x0,flipX:flipX=![],flipY:flipY=![],angle:_0x26d7a1}=_0x3844ec[_0x23d48f(0x188)];_0x2343ff[_0x23d48f(0x17a)]({'width':width,'height':height});const _0x305b69=_0x2343ff[_0x23d48f(0x16c)]()[_0x23d48f(0x18a)](_0x1eb7a0=>_0x1eb7a0[_0x23d48f(0x106)]===_0x3c833f);if(!_0x305b69)return null;let _0x148849=flipX?width-_0x305b69['x']:_0x305b69['x'],_0x11d593=flipY?height-_0x305b69['y']:_0x305b69['y'];if(_0x26d7a1&&_0x26d7a1!==0x0){const _0x45ec9a=_0x26d7a1*Math['PI']/0xb4,_0x4d1220=Math['cos'](_0x45ec9a),_0x24e76e=Math[_0x23d48f(0x15c)](_0x45ec9a),_0x4bec12=width/0x2,_0x505c02=height/0x2,_0x2d194a=_0x148849-_0x4bec12,_0x501cc9=_0x11d593-_0x505c02;_0x148849=_0x4bec12+_0x2d194a*_0x4d1220-_0x501cc9*_0x24e76e,_0x11d593=_0x505c02+_0x2d194a*_0x24e76e+_0x501cc9*_0x4d1220;}_0x148849+=left,_0x11d593+=top;let _0x4bce2d=_0x305b69[_0x23d48f(0x11d)]/0xea60;if(flipX)_0x4bce2d=0xb4-_0x4bce2d;if(flipY)_0x4bce2d=-_0x4bce2d;_0x4bce2d+=_0x26d7a1||0x0,_0x4bce2d=(_0x4bce2d%0x168+0x168)%0x168;const _0x3a2645=(0x0,_univerjs_pro_engine_shape[_0x23d48f(0x10b)])({'left':left,'top':top,'width':width,'height':height},_0x26d7a1||0x0);return{'point':{'x':_0x148849,'y':_0x11d593},'angle':_0x4bce2d,'bounds':_0x3a2645};}function calculateFreeEndpointAngle(_0x5fd981,_0x5b92a8){const _0xde95b=_0x2d7b2e,_0x3db834=_0x5b92a8['x']-_0x5fd981['x'],_0x27b9a4=_0x5b92a8['y']-_0x5fd981['y'];if(Math[_0xde95b(0x147)](_0x3db834)>=Math[_0xde95b(0x147)](_0x27b9a4))return _0x3db834>=0x0?0xb4:0x0;return _0x27b9a4>=0x0?0x10e:0x5a;}function computeFreeEndpointInfo(_0x33dc70,_0x10b3ff,_0x5e21c1,_0x2d52db,_0x3ae86a,_0x55b8ac,_0x267e11){const _0x1071b9=_0x2d7b2e,_0x305ea9=_0x55b8ac['getShapeModel'](_0x33dc70,_0x10b3ff,_0x5e21c1);if(!_0x305ea9)return null;const _0x267283=_0x267e11[_0x1071b9(0x164)]({'unitId':_0x33dc70,'subUnitId':_0x10b3ff,'drawingId':_0x5e21c1});if(!(_0x267283===null||_0x267283===void 0x0?void 0x0:_0x267283[_0x1071b9(0x188)]))return null;const {left:left=0x0,top:top=0x0,width:width=0x0,height:height=0x0,flipX:flipX=![],flipY:flipY=![]}=_0x267283[_0x1071b9(0x188)];_0x305ea9[_0x1071b9(0x17a)]({'width':width,'height':height});const _0x13fbaf=_0x305ea9[_0x1071b9(0x120)]();if(_0x13fbaf[_0x1071b9(0x187)]<0x2)return null;const _0x498ce3=_0x2d52db?_0x13fbaf[0x0]:_0x13fbaf[_0x13fbaf[_0x1071b9(0x187)]-0x1],_0x23c44c=new _univerjs_pro_engine_shape[(_0x1071b9(0x117))]({'left':left,'top':top,'width':width,'height':height,'flipX':flipX,'flipY':flipY})['localToWorld'](_0x498ce3);return{'point':_0x23c44c,'angle':calculateFreeEndpointAngle(_0x3ae86a[_0x1071b9(0x119)],_0x23c44c),'bounds':{'left':_0x23c44c['x'],'top':_0x23c44c['y'],'width':0x0,'height':0x0}};}var FWorksheetShapeMixin=class extends _univerjs_sheets_facade[_0x2d7b2e(0x143)]{async['insertShape'](_0x50d735){const _0x2f4f18=_0x2d7b2e,{unitId:_0x567fca,subUnitId:_0x58e423,shapeId:_0x3ccbd8,shapeType:_0x168973,shapeData:_0x328810,x:_0x487adf,y:_0x1f5d5d,width:_0x2d3334,height:_0x5f36ba}=_0x50d735;return this[_0x2f4f18(0x175)]['executeCommand'](_univerjs_pro_sheets_shape['InsertShapeCommand']['id'],{'unitId':_0x567fca,'subUnitId':_0x58e423,'shapeId':_0x3ccbd8,'shapeType':_0x168973,'shapeData':_0x328810,'position':{'x':_0x487adf,'y':_0x1f5d5d},'width':_0x2d3334,'height':_0x5f36ba});}async[_0x2d7b2e(0x157)](_0x31ea2d){const _0x2fd384=_0x2d7b2e,{unitId:_0x233731,subUnitId:_0x10fbfc,shapeId:_0x50aec6,shapeType:_0x4c5ca0,shapeData:_0x502755,x:_0x24a966,y:_0x207eaf,width:_0xc4d0d8,height:_0xb6b469}=_0x31ea2d;return this[_0x2fd384(0x175)][_0x2fd384(0x183)](_univerjs_pro_sheets_shape[_0x2fd384(0x128)]['id'],{'unitId':_0x233731,'subUnitId':_0x10fbfc,'shapeId':_0x50aec6,'shapeType':_0x4c5ca0,'shapeData':_0x502755,'position':{'x':_0x24a966,'y':_0x207eaf},'width':_0xc4d0d8,'height':_0xb6b469});}[_0x2d7b2e(0x18c)](_0x308a27){const _0x171ff3=_0x2d7b2e,_0x557fb2=this['getWorkbook']()[_0x171ff3(0x151)](),_0x3793f4=this['getSheetId']();if(_0x308a27){const _0x4cf3d4=new FShape(_0x557fb2,_0x3793f4,_0x308a27[_0x171ff3(0x145)],this[_0x171ff3(0x11a)]);return this[_0x171ff3(0x150)](_0x4cf3d4,_0x557fb2,_0x3793f4,_0x308a27[_0x171ff3(0x145)]),_0x4cf3d4;}return new FShape(_0x557fb2,_0x3793f4,(0x0,_univerjs_core[_0x171ff3(0x190)])(),this['_injector']);}['newConnector'](_0xf5d752){const _0x2dae03=_0x2d7b2e,_0x39e4db=this[_0x2dae03(0xfa)]()['getUnitId'](),_0x1fc8ab=this[_0x2dae03(0x102)]();if(_0xf5d752){const _0xbba2c6=new FConnectorShape(_0x39e4db,_0x1fc8ab,_0xf5d752[_0x2dae03(0x145)],this[_0x2dae03(0x11a)]);return this[_0x2dae03(0x150)](_0xbba2c6,_0x39e4db,_0x1fc8ab,_0xf5d752['drawId']),_0xbba2c6;}return new FConnectorShape(_0x39e4db,_0x1fc8ab,(0x0,_univerjs_core['generateRandomId'])(),this[_0x2dae03(0x11a)]);}['getShapes'](){const _0x3425be=_0x2d7b2e,_0x40b9cf=this[_0x3425be(0x11a)][_0x3425be(0x10f)](_univerjs_sheets_drawing[_0x3425be(0x149)]),_0x259a37=this[_0x3425be(0xfa)]()[_0x3425be(0x151)](),_0x544cf7=this['getSheetId'](),_0x32d61d=_0x40b9cf[_0x3425be(0x13a)](_0x259a37,_0x544cf7);if(!_0x32d61d)return[];const _0x4e1045=[];for(const [_0x1e9cb1,_0x5ae722]of Object[_0x3425be(0x163)](_0x32d61d))if(_0x5ae722&&_0x5ae722[_0x3425be(0x13d)]===_univerjs_core[_0x3425be(0x182)][_0x3425be(0x180)]){const _0x1dd18b=new FShape(_0x259a37,_0x544cf7,_0x1e9cb1,this[_0x3425be(0x11a)]);this[_0x3425be(0x150)](_0x1dd18b,_0x259a37,_0x544cf7,_0x1e9cb1),_0x4e1045[_0x3425be(0x17b)](_0x1dd18b);}return _0x4e1045;}['removeShape'](_0x185546){const _0x215422=_0x2d7b2e,{unitId:_0x26148a,subUnitId:_0x394563,drawId:_0x2d3198}=_0x185546;return this[_0x215422(0x175)][_0x215422(0x183)](_univerjs_sheets_drawing['RemoveSheetDrawingCommand']['id'],{'unitId':_0x26148a,'drawings':[{'unitId':_0x26148a,'subUnitId':_0x394563,'drawingId':_0x2d3198,'drawingType':_univerjs_core[_0x215422(0x182)][_0x215422(0x180)]}]});}async['connectShapes'](_0x3a0ca8){const _0x2143c9=_0x2d7b2e,{connector:_0x448c7c,startTarget:_0x1173a8,endTarget:_0x1921e7}=_0x3a0ca8;if(!_0x1173a8&&!_0x1921e7)return![];const _0x55504c=this['getWorkbook']()[_0x2143c9(0x151)](),_0x11c3f=this['getSheetId'](),_0x3ef40a=this[_0x2143c9(0x11a)][_0x2143c9(0x10f)](_univerjs_pro_sheets_shape[_0x2143c9(0x162)]),_0x4b6a69=this[_0x2143c9(0x11a)][_0x2143c9(0x10f)](_univerjs_drawing['IDrawingManagerService']),_0x5d3b31=_0x3ef40a[_0x2143c9(0x100)](_0x55504c,_0x11c3f,_0x448c7c[_0x2143c9(0x145)]);if(!_0x5d3b31)return![];const _0x62c186=_0x5d3b31['getShapeType'](),_0x347715=_0x5d3b31['getShapeRelation'](),_0x1ec0cb={};for(const _0x7c9635 of _0x5d3b31[_0x2143c9(0x16b)]()){const _0x41833b=_0x5d3b31[_0x2143c9(0x132)](_0x7c9635);if(_0x41833b!==void 0x0)_0x1ec0cb[_0x7c9635]=_0x41833b;}const {startInfo:_0x2664c9,endInfo:_0x3dcbf9}=this['_resolveEndpoints'](_0x55504c,_0x11c3f,_0x448c7c,_0x5d3b31,_0x1173a8,_0x1921e7,_0x3ef40a,_0x4b6a69,_0x347715);if(!_0x2664c9||!_0x3dcbf9)return![];const _0x555fa1=(0x0,_univerjs_pro_engine_shape[_0x2143c9(0x160)])((0x0,_univerjs_pro_engine_shape[_0x2143c9(0x12b)])(_0x2664c9,_0x3dcbf9,_0x62c186),_0x62c186),_0x4e81cd={};if(_0x1173a8)_0x4e81cd['from']={'shapeId':_0x1173a8['shape'][_0x2143c9(0x145)],'cxnIndex':_0x1173a8[_0x2143c9(0x153)]};else{if(_0x347715===null||_0x347715===void 0x0?void 0x0:_0x347715[_0x2143c9(0x185)])_0x4e81cd['from']=_0x347715[_0x2143c9(0x185)];}if(_0x1921e7)_0x4e81cd['to']={'shapeId':_0x1921e7[_0x2143c9(0x193)][_0x2143c9(0x145)],'cxnIndex':_0x1921e7[_0x2143c9(0x153)]};else{if(_0x347715===null||_0x347715===void 0x0?void 0x0:_0x347715['to'])_0x4e81cd['to']=_0x347715['to'];}return this[_0x2143c9(0x175)]['executeCommand'](_univerjs_pro_sheets_shape[_0x2143c9(0x15d)]['id'],{'unitId':_0x55504c,'subUnitId':_0x11c3f,'connectorShapeId':_0x448c7c[_0x2143c9(0x145)],'width':_0x555fa1['worldRect'][_0x2143c9(0x194)],'height':_0x555fa1[_0x2143c9(0xfd)][_0x2143c9(0x13b)],'left':_0x555fa1['worldRect'][_0x2143c9(0x118)],'top':_0x555fa1[_0x2143c9(0xfd)][_0x2143c9(0x179)],'flipX':_0x555fa1[_0x2143c9(0xfd)][_0x2143c9(0x138)]||![],'flipY':_0x555fa1[_0x2143c9(0xfd)][_0x2143c9(0x11b)]||![],'oldAdjustValues':_0x1ec0cb,'newAdjustValues':_0x555fa1[_0x2143c9(0x13e)],'newLineType':_0x555fa1[_0x2143c9(0x16d)],'oldLineType':_0x62c186,'rotation':_0x555fa1[_0x2143c9(0x113)],'oldRelation':_0x347715,'newRelation':_0x4e81cd});}[_0x2d7b2e(0x150)](_0x353b95,_0x3ec829,_0x4a8eda,_0x296fb6){const _0x3b7003=_0x2d7b2e,_0x395f8b=this[_0x3b7003(0x11a)][_0x3b7003(0x10f)](_univerjs_drawing[_0x3b7003(0x167)])['getDrawingByParam']({'unitId':_0x3ec829,'subUnitId':_0x4a8eda,'drawingId':_0x296fb6});if(_0x395f8b===null||_0x395f8b===void 0x0?void 0x0:_0x395f8b[_0x3b7003(0x188)]){var _0x55979a,_0x25493d,_0x1e38e0,_0x4b4fed;_0x353b95['x']=(_0x55979a=_0x395f8b['transform'][_0x3b7003(0x118)])!==null&&_0x55979a!==void 0x0?_0x55979a:0x0,_0x353b95['y']=(_0x25493d=_0x395f8b[_0x3b7003(0x188)][_0x3b7003(0x179)])!==null&&_0x25493d!==void 0x0?_0x25493d:0x0,_0x353b95[_0x3b7003(0x194)]=(_0x1e38e0=_0x395f8b[_0x3b7003(0x188)][_0x3b7003(0x194)])!==null&&_0x1e38e0!==void 0x0?_0x1e38e0:_0x353b95[_0x3b7003(0x194)],_0x353b95[_0x3b7003(0x13b)]=(_0x4b4fed=_0x395f8b[_0x3b7003(0x188)][_0x3b7003(0x13b)])!==null&&_0x4b4fed!==void 0x0?_0x4b4fed:_0x353b95[_0x3b7003(0x13b)];}const _0x29de72=this[_0x3b7003(0x11a)]['get'](_univerjs_pro_sheets_shape[_0x3b7003(0x162)])[_0x3b7003(0x100)](_0x3ec829,_0x4a8eda,_0x296fb6);if(_0x29de72){_0x353b95[_0x3b7003(0x15f)]=_0x29de72[_0x3b7003(0x10d)]();const _0x475cd8=_0x29de72['getShapeData']();if(_0x475cd8)_0x353b95[_0x3b7003(0x136)]=JSON[_0x3b7003(0x140)](JSON[_0x3b7003(0x184)](_0x475cd8));}}[_0x2d7b2e(0x177)](_0x1804fa,_0x144b42,_0xc40324,_0x45390b,_0x12dfd5,_0x159759,_0x471964,_0x54ee0f,_0x7b2172){const _0x40b0fd=_0x2d7b2e;let _0x43c803=null,_0x38ac3c=null;if(_0x12dfd5)_0x43c803=computeConnectionPointInfo(_0x1804fa,_0x144b42,_0x12dfd5[_0x40b0fd(0x193)][_0x40b0fd(0x145)],_0x12dfd5[_0x40b0fd(0x153)],_0x471964,_0x54ee0f);if(_0x159759)_0x38ac3c=computeConnectionPointInfo(_0x1804fa,_0x144b42,_0x159759['shape'][_0x40b0fd(0x145)],_0x159759[_0x40b0fd(0x153)],_0x471964,_0x54ee0f);if(!_0x43c803)_0x43c803=this[_0x40b0fd(0x146)](_0x1804fa,_0x144b42,_0xc40324[_0x40b0fd(0x145)],!![],_0x38ac3c,_0x7b2172===null||_0x7b2172===void 0x0?void 0x0:_0x7b2172[_0x40b0fd(0x185)],_0x471964,_0x54ee0f);if(!_0x38ac3c)_0x38ac3c=this['_resolveExistingOrFreeEndpoint'](_0x1804fa,_0x144b42,_0xc40324[_0x40b0fd(0x145)],![],_0x43c803,_0x7b2172===null||_0x7b2172===void 0x0?void 0x0:_0x7b2172['to'],_0x471964,_0x54ee0f);return{'startInfo':_0x43c803,'endInfo':_0x38ac3c};}[_0x2d7b2e(0x146)](_0x5eb03b,_0x572a8a,_0x393703,_0x53eb6d,_0x3f0699,_0x9831fb,_0x5cfaeb,_0x10549a){const _0x48b901=_0x2d7b2e;if(_0x9831fb){const _0x4c7dce=computeConnectionPointInfo(_0x5eb03b,_0x572a8a,_0x9831fb['shapeId'],_0x9831fb[_0x48b901(0x137)],_0x5cfaeb,_0x10549a);if(_0x4c7dce)return _0x4c7dce;}if(!_0x3f0699)return null;return computeFreeEndpointInfo(_0x5eb03b,_0x572a8a,_0x393703,_0x53eb6d,_0x3f0699,_0x5cfaeb,_0x10549a);}};_univerjs_sheets_facade['FWorksheet'][_0x2d7b2e(0x124)](FWorksheetShapeMixin),exports[_0x2d7b2e(0xfe)]=FConnectorShape,exports[_0x2d7b2e(0x144)]=FShape;
package/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- const _0x4d1f56=_0x428c;(function(_0x1b053e,_0x29bd91){const _0x56de25=_0x428c,_0x1ee2a3=_0x1b053e();while(!![]){try{const _0x57ff04=parseInt(_0x56de25(0x10e))/0x1*(-parseInt(_0x56de25(0xcc))/0x2)+parseInt(_0x56de25(0x142))/0x3+-parseInt(_0x56de25(0xd5))/0x4+-parseInt(_0x56de25(0x13a))/0x5*(parseInt(_0x56de25(0x10d))/0x6)+parseInt(_0x56de25(0xa0))/0x7*(-parseInt(_0x56de25(0x12a))/0x8)+parseInt(_0x56de25(0x140))/0x9*(-parseInt(_0x56de25(0x12e))/0xa)+parseInt(_0x56de25(0x12f))/0xb*(parseInt(_0x56de25(0x150))/0xc);if(_0x57ff04===_0x29bd91)break;else _0x1ee2a3['push'](_0x1ee2a3['shift']());}catch(_0x1337e2){_0x1ee2a3['push'](_0x1ee2a3['shift']());}}}(_0x2656,0xd7ad5),Object[_0x4d1f56(0x127)](exports,Symbol['toStringTag'],{'value':_0x4d1f56(0x10a)}));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(_0x51eef8){'@babel/helpers - typeof';const _0x1fd4d9=_0x4d1f56;return _typeof=_0x1fd4d9(0xc5)==typeof Symbol&&_0x1fd4d9(0x10f)==typeof Symbol[_0x1fd4d9(0xba)]?function(_0xb3523){return typeof _0xb3523;}:function(_0x8087da){const _0x3afae6=_0x1fd4d9;return _0x8087da&&_0x3afae6(0xc5)==typeof Symbol&&_0x8087da['constructor']===Symbol&&_0x8087da!==Symbol[_0x3afae6(0x10b)]?'symbol':typeof _0x8087da;},_typeof(_0x51eef8);}function toPrimitive(_0x8018e2,_0x59cf83){const _0x270189=_0x4d1f56;if(_0x270189(0xed)!=_typeof(_0x8018e2)||!_0x8018e2)return _0x8018e2;var _0x2d36b2=_0x8018e2[Symbol['toPrimitive']];if(void 0x0!==_0x2d36b2){var _0x133445=_0x2d36b2['call'](_0x8018e2,_0x59cf83||_0x270189(0x114));if(_0x270189(0xed)!=_typeof(_0x133445))return _0x133445;throw new TypeError(_0x270189(0xf1));}return(_0x270189(0x139)===_0x59cf83?String:Number)(_0x8018e2);}function toPropertyKey(_0x555045){var _0x45d451=toPrimitive(_0x555045,'string');return'symbol'==_typeof(_0x45d451)?_0x45d451:_0x45d451+'';}function _defineProperty(_0x58d1fa,_0x21a3ae,_0x20c1e8){const _0x3c98dd=_0x4d1f56;return(_0x21a3ae=toPropertyKey(_0x21a3ae))in _0x58d1fa?Object[_0x3c98dd(0x127)](_0x58d1fa,_0x21a3ae,{'value':_0x20c1e8,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x58d1fa[_0x21a3ae]=_0x20c1e8,_0x58d1fa;}var SheetShapeModelManager=class extends _univerjs_core[_0x4d1f56(0x157)]{constructor(){super(),_defineProperty(this,'_shapes',new Map()),_defineProperty(this,'_linesIds',new Set()),_defineProperty(this,'_groupIds',new Set());}['addShape'](_0x1fc1b4,_0x14caea,_0x273882){const _0x260bf4=_0x4d1f56,_0xca9b1a=new _univerjs_pro_engine_shape[(_0x260bf4(0xd7))](_0x1fc1b4,_0x14caea,_0x273882);this[_0x260bf4(0xc6)][_0x260bf4(0x102)](_0x14caea,_0xca9b1a);if((0x0,_univerjs_pro_engine_shape[_0x260bf4(0xc3)])(_0x1fc1b4))this[_0x260bf4(0x11f)][_0x260bf4(0xcb)](_0x14caea);return _0xca9b1a;}['getBasicShapeRelation'](_0xc5e975){const _0x4d48c3=_0x4d1f56,_0x2c5f8d=[];for(const _0xe27681 of this[_0x4d48c3(0x11f)]){const _0x35250c=this[_0x4d48c3(0xc6)][_0x4d48c3(0x131)](_0xe27681);if(_0x35250c){const _0x169e26=_0x35250c[_0x4d48c3(0xb1)]();if(_0x169e26){var _0x2941c5,_0x4c2099;if(((_0x2941c5=_0x169e26[_0x4d48c3(0x111)])===null||_0x2941c5===void 0x0?void 0x0:_0x2941c5['shapeId'])===_0xc5e975)_0x2c5f8d['push']({..._0x169e26[_0x4d48c3(0x111)],'lineShapeId':_0xe27681,'isFrom':!![]});if(((_0x4c2099=_0x169e26['to'])===null||_0x4c2099===void 0x0?void 0x0:_0x4c2099[_0x4d48c3(0xdd)])===_0xc5e975)_0x2c5f8d[_0x4d48c3(0x143)]({..._0x169e26['to'],'lineShapeId':_0xe27681,'isFrom':![]});}}}return _0x2c5f8d;}['getLineShapeRelation'](_0x1c0635){const _0x212867=_0x4d1f56,_0x4ab8ea=this[_0x212867(0xc6)][_0x212867(0x131)](_0x1c0635);if(_0x4ab8ea)return _0x4ab8ea[_0x212867(0xb1)]();}[_0x4d1f56(0xbf)](_0x441b33){const _0x568317=_0x4d1f56,_0x43106e=this[_0x568317(0xc6)][_0x568317(0x131)](_0x441b33);if(_0x43106e)return _0x43106e['getShapeType']();}[_0x4d1f56(0x128)](_0x30b6a7){const _0x7e8fc6=_0x4d1f56;return this[_0x7e8fc6(0xc6)][_0x7e8fc6(0x9a)](_0x30b6a7);}[_0x4d1f56(0x9c)](_0x41556c){const _0x34b66b=_0x4d1f56,_0x25aa7a=this[_0x34b66b(0xc6)]['get'](_0x41556c);if(!_0x25aa7a)return;if((0x0,_univerjs_pro_engine_shape[_0x34b66b(0xc3)])(_0x25aa7a[_0x34b66b(0xbf)]()))this[_0x34b66b(0x11f)][_0x34b66b(0x104)](_0x41556c);this[_0x34b66b(0xc6)][_0x34b66b(0x104)](_0x41556c);}[_0x4d1f56(0xf5)](){const _0x56209d=_0x4d1f56,_0x4e27c1=[];return this[_0x56209d(0xc6)]['forEach'](_0x371a18=>{const _0x39aad1=_0x56209d;_0x4e27c1[_0x39aad1(0x143)](_0x371a18[_0x39aad1(0xf5)]());}),_0x4e27c1;}[_0x4d1f56(0x14e)](_0x39e8f9){const _0x3bc344=_0x4d1f56;for(const _0x335873 of _0x39e8f9){const {id:_0x143148,shapeType:_0x32cfe4}=_0x335873,_0x41d635=this['addShape'](_0x32cfe4,_0x143148,_0x335873['shapeData']);if(_0x41d635&&_0x41d635[_0x3bc344(0xc9)]())this[_0x3bc344(0x11f)][_0x3bc344(0xcb)](_0x143148);}}['dispose'](){const _0x5ad654=_0x4d1f56;if(this[_0x5ad654(0x133)])return;this[_0x5ad654(0xc6)][_0x5ad654(0x12d)](_0x143c98=>{const _0xed0b36=_0x5ad654;_0x143c98[_0xed0b36(0x121)]();}),this[_0x5ad654(0xc6)][_0x5ad654(0xf6)](),this[_0x5ad654(0x11f)][_0x5ad654(0xf6)](),this['_groupIds'][_0x5ad654(0xf6)](),super[_0x5ad654(0x121)]();}};function __decorateParam(_0x3258b4,_0x53d334){return function(_0x124c8e,_0x1380a9){_0x53d334(_0x124c8e,_0x1380a9,_0x3258b4);};}function __decorate(_0x2ceb5e,_0x4157b8,_0x1f4665,_0x375696){const _0x906f2b=_0x4d1f56;var _0x4d59c9=arguments[_0x906f2b(0x12b)],_0x179c1e=_0x4d59c9<0x3?_0x4157b8:_0x375696===null?_0x375696=Object[_0x906f2b(0x152)](_0x4157b8,_0x1f4665):_0x375696,_0x57f45d;if(typeof Reflect===_0x906f2b(0xed)&&typeof Reflect['decorate']===_0x906f2b(0xc5))_0x179c1e=Reflect[_0x906f2b(0xcf)](_0x2ceb5e,_0x4157b8,_0x1f4665,_0x375696);else{for(var _0xb0dea0=_0x2ceb5e[_0x906f2b(0x12b)]-0x1;_0xb0dea0>=0x0;_0xb0dea0--)if(_0x57f45d=_0x2ceb5e[_0xb0dea0])_0x179c1e=(_0x4d59c9<0x3?_0x57f45d(_0x179c1e):_0x4d59c9>0x3?_0x57f45d(_0x4157b8,_0x1f4665,_0x179c1e):_0x57f45d(_0x4157b8,_0x1f4665))||_0x179c1e;}return _0x4d59c9>0x3&&_0x179c1e&&Object[_0x906f2b(0x127)](_0x4157b8,_0x1f4665,_0x179c1e),_0x179c1e;}function _0x428c(_0x2ed016,_0x232e9d){_0x2ed016=_0x2ed016-0x96;const _0x265637=_0x2656();let _0x428cb1=_0x265637[_0x2ed016];return _0x428cb1;}function _0x2656(){const _0x31e201=['MUTATION','_ensureShapeModelManager','ClearSheetDrawingTransformerOperation','getShapeTextData','getShapeModel','worldRect','_sheetSkeletonService','object','sheet.command.set-shape-text-vertical-toggle','every','SheetSkeletonService','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','relation','pluginName','getBasicShapeType','toJSON','clear','SetDrawingApplyMutation','getBatchUpdateOp','ensureSkeleton','updateContext','data','getAdjustValueByName','_sheetsShapeService','ang','find','sin','getSkeleton','set','startX','delete','getBasicShapeRelation','UniverLicensePlugin','height','UniverSheetsShapePlugin','Fail\x20to\x20get\x20shape\x20model,\x20get:\x20','Module','prototype','cos','204odfmxC','536962HtRahE','symbol','type','from','isFrom','packageName','default','@univerjs-pro/sheets-shape','SetSheetsShapeRotateCommand','getShapeData','SHEET_SHAPE_PLUGIN','onCommandExecute','setShapeType','0.21.1-insiders.20260509-3a60311','flipY','DrawingApplyType','_commandService','_linesIds','flipX','dispose','getSheetCommandTarget','ToggleSheetsShapeFlipCommand','registerCommand','_shapeModelManagerMap','cxnIndex','defineProperty','hasShape','adjustValues','40dRCSuH','length','UpdateConnectorRelationCommand','forEach','2010fboYRx','18314802qrEGlw','sheet.mutation.update-shape-type','get','DrawingTypeEnum','_disposed','insertShape','top','transform','_resourcesManagerService','sheet.command.update-line-shape-resize','string','14590GASMuA','sheet.command.set-shape-rotate','InsertShapeCommand','sheets-shape.config','redos','getAdjustNames','51939hLooow','IUniverInstanceService','2952201zSymHj','push','CommandType','_drawingManagerService','touchDependencies','SetSheetsShapeTextVerticalToggleCommand','undos','borderEnabled','assign','_addLineRerouteUpdates','COMMAND','DRAWING_SHAPE','fromJSON','registerPluginResource','36RFnPim','UPDATE','getOwnPropertyDescriptor','getStartConnectInfo','getDrawingByParam','SheetsShapeService','lineShapeId','Disposable','SetShapeDrawingDataCommand','ISheetDrawingService','position','_initSnapshot','drawingType','index','routeConnectorLineShape','_sheetInterceptorService','getLineShapeRelation','has','_addLineFollowShapeUpdates','removeShape','DependentOn','fill','SheetInterceptorService','1484042QYNKJP','_injector','Injector','startY','computeConnectorRouteLayout','left','merge','InsertSheetDrawingCommand','IUndoRedoService','REMOVE','UpdateLineShapeResizeCommand','IConfigService','preRedos','ICommandService','UniverInstanceType','disposeWithMe','addShape','getShapeRelation','width','UpdateSheetsShapeTypeMutation','interceptCommand','stringify','entries','INSERT','SetSheetDrawingCommand','angle','iterator','_serializeShapeForUnit','_initCommands','syncExecuteCommand','InsertSheetsShapeMutation','getShapeType','transformToAxisAlignPosition','IDrawingManagerService','UNIVER_SHEET','isConnectorShape','isHorizontal','function','_shapes','Inject','setShapeData','isLineShape','getBasicShapeRotateBound','add','6ZcuTmg','rotation','RemoveSheetDrawingCommand','decorate','_config','sequenceExecute','filter','keys','_initCommandInterceptor','4662004ITZmGI','preUndos','ShapeModel','IResourceManagerService','onStarting','transformToDrawingPosition','range','getCellIndexAndOffsetByPosition','shapeId','resizeEnabled','result','version','rotateEnabled','_deserializeShapeForUnit','params','pushUndoRedo','_getConnectPointInfo'];_0x2656=function(){return _0x31e201;};return _0x2656();}const SHEET_SHAPE_PLUGIN=_0x4d1f56(0x118);let SheetsShapeService=class SheetsShapeService extends _univerjs_core[_0x4d1f56(0x157)]{constructor(_0x20e3d1){const _0x372367=_0x4d1f56;super(),this['_resourcesManagerService']=_0x20e3d1,_defineProperty(this,_0x372367(0x125),new Map()),this['_initSnapshot']();}['_ensureShapeModelManager'](_0x781396,_0x75e4e8){const _0x4be5b4=_0x4d1f56;let _0x166381=this[_0x4be5b4(0x125)][_0x4be5b4(0x131)](_0x781396);!_0x166381&&(_0x166381=new Map(),this[_0x4be5b4(0x125)][_0x4be5b4(0x102)](_0x781396,_0x166381));let _0x3b5540=_0x166381[_0x4be5b4(0x131)](_0x75e4e8);return!_0x3b5540&&(_0x3b5540=new SheetShapeModelManager(),_0x166381[_0x4be5b4(0x102)](_0x75e4e8,_0x3b5540)),_0x3b5540;}[_0x4d1f56(0x134)](_0x396754,_0x169069,_0x1c8609,_0x13217a,_0x328858){const _0x3783a0=_0x4d1f56;this[_0x3783a0(0xe7)](_0x396754,_0x169069)[_0x3783a0(0xb0)](_0x1c8609,_0x13217a,_0x328858);}[_0x4d1f56(0x9c)](_0x2b70a3,_0xded2b2,_0x488fd3){const _0x4f67ef=_0x4d1f56;this[_0x4f67ef(0xe7)](_0x2b70a3,_0xded2b2)[_0x4f67ef(0x9c)](_0x488fd3);}[_0x4d1f56(0xf4)](_0x387daf,_0x1246e6,_0x4e929b){const _0x362ae7=_0x4d1f56;return this[_0x362ae7(0xe7)](_0x387daf,_0x1246e6)[_0x362ae7(0xbf)](_0x4e929b);}[_0x4d1f56(0xbf)](_0x43a23e,_0x116567,_0x483c53){const _0xa4c85f=_0x4d1f56;return this[_0xa4c85f(0xe7)](_0x43a23e,_0x116567)[_0xa4c85f(0xbf)](_0x483c53);}['hasShape'](_0x18d4f7,_0x577447,_0x5b3143){const _0x6bf9d0=_0x4d1f56;return this['_ensureShapeModelManager'](_0x18d4f7,_0x577447)[_0x6bf9d0(0x128)](_0x5b3143);}['getShapeTypeById'](_0x426981,_0x35abb0,_0x3d276e){const _0x2fa681=_0x4d1f56;return this[_0x2fa681(0xe7)](_0x426981,_0x35abb0)['getShapeType'](_0x3d276e);}['getShapeDataById'](_0x51816f,_0x2e46df,_0x2fda8c){const _0x3fbf43=_0x4d1f56,_0x559ed7=this[_0x3fbf43(0xe7)](_0x51816f,_0x2e46df);if(!_0x559ed7[_0x3fbf43(0xbf)](_0x2fda8c))return;const _0x3cc101=_0x559ed7[_0x3fbf43(0xc6)][_0x3fbf43(0x131)](_0x2fda8c);if(!_0x3cc101)return;return _0x3cc101[_0x3fbf43(0x117)]();}['getShapeModel'](_0x4a5635,_0x1035fa,_0x1b1c98){const _0x4981cf=_0x4d1f56;return this[_0x4981cf(0xe7)](_0x4a5635,_0x1035fa)['_shapes']['get'](_0x1b1c98);}[_0x4d1f56(0x105)](_0x26876a,_0x474e41,_0x3879ba){const _0x5936e8=_0x4d1f56;return this[_0x5936e8(0xe7)](_0x26876a,_0x474e41)[_0x5936e8(0x105)](_0x3879ba);}[_0x4d1f56(0x99)](_0x55efa7,_0x3d0ec4,_0x1b8295){const _0x196f1a=_0x4d1f56,_0x2dab75=this[_0x196f1a(0xe7)](_0x55efa7,_0x3d0ec4)[_0x196f1a(0xc6)][_0x196f1a(0x131)](_0x1b8295);if(!_0x2dab75)return;return _0x2dab75[_0x196f1a(0xb1)]();}[_0x4d1f56(0x11a)](){}['_serializeShapeForUnit'](_0x4c0c05){const _0x10094d=_0x4d1f56,_0x33585b={},_0xe0ed9f=this[_0x10094d(0x125)][_0x10094d(0x131)](_0x4c0c05);if(_0xe0ed9f)_0xe0ed9f[_0x10094d(0x12d)]((_0x5b20bb,_0x3c0600)=>{const _0x5b6d6d=_0x5b20bb['toJSON']();if(_0x5b6d6d['length']>0x0)_0x33585b[_0x3c0600]=_0x5b6d6d;});return JSON[_0x10094d(0xb5)](_0x33585b);}[_0x4d1f56(0xe2)](_0x159c3d,_0x213961){const _0x56560a=_0x4d1f56;Object[_0x56560a(0xd3)](_0x213961)[_0x56560a(0x12d)](_0x2ff712=>{const _0x27f9c1=_0x56560a;this[_0x27f9c1(0xe7)](_0x159c3d,_0x2ff712)[_0x27f9c1(0x14e)](_0x213961[_0x2ff712]);});}['toJSON'](){const _0x32ab1f=_0x4d1f56,_0x46c1f1={};return this[_0x32ab1f(0x125)][_0x32ab1f(0x12d)]((_0x202995,_0x32ad3e)=>{const _0x37ace4=_0x32ab1f;_0x46c1f1[_0x32ad3e]={},_0x202995[_0x37ace4(0x12d)]((_0x3175b7,_0x51fe80)=>{const _0x3a9a77=_0x37ace4;_0x46c1f1[_0x32ad3e][_0x51fe80]=_0x3175b7[_0x3a9a77(0xf5)]();});}),_0x46c1f1;}[_0x4d1f56(0x14e)](_0x17a911){const _0x5cc6a9=_0x4d1f56;Object[_0x5cc6a9(0xd3)](_0x17a911)['forEach'](_0x36063c=>{const _0x34dbb6=_0x5cc6a9,_0x19f726=_0x17a911[_0x36063c];Object[_0x34dbb6(0xd3)](_0x19f726)[_0x34dbb6(0x12d)](_0x412c8a=>{this['_ensureShapeModelManager'](_0x36063c,_0x412c8a)['fromJSON'](_0x19f726[_0x412c8a]);});});}[_0x4d1f56(0x15b)](){const _0x3bf417=_0x4d1f56;this[_0x3bf417(0x137)][_0x3bf417(0x14f)]({'pluginName':SHEET_SHAPE_PLUGIN,'businesses':[_univerjs_core[_0x3bf417(0xae)][_0x3bf417(0xc2)]],'toJson':_0x5c4f11=>this[_0x3bf417(0xbb)](_0x5c4f11),'parseJson':_0x1f0882=>JSON['parse'](_0x1f0882),'onLoad':(_0x33a20f,_0x1d8b25)=>{const _0x566130=_0x3bf417;this[_0x566130(0xe2)](_0x33a20f,_0x1d8b25);},'onUnLoad':_0x3b516d=>{const _0x5b93de=_0x3bf417,_0x150007=this['_shapeModelManagerMap'][_0x5b93de(0x131)](_0x3b516d);_0x150007&&(_0x150007[_0x5b93de(0x12d)](_0x1c069f=>{_0x1c069f['dispose']();}),this['_shapeModelManagerMap']['delete'](_0x3b516d));}});}[_0x4d1f56(0x121)](){const _0x4dfce7=_0x4d1f56;this['_shapeModelManagerMap'][_0x4dfce7(0x12d)](_0x5bb1db=>{const _0x4a0f29=_0x4dfce7;_0x5bb1db[_0x4a0f29(0x12d)](_0xfa9b27=>{const _0x44f1fd=_0x4a0f29;_0xfa9b27[_0x44f1fd(0x121)]();});});}};SheetsShapeService=__decorate([__decorateParam(0x0,_univerjs_core[_0x4d1f56(0xd8)])],SheetsShapeService);const InsertSheetsShapeMutation={'id':'sheet.mutation.insert-shape','type':_univerjs_core['CommandType'][_0x4d1f56(0xe6)],'handler':(_0xc6b7dc,_0x293d8e)=>{const _0x13d058=_0x4d1f56,{unitId:_0x309564,subUnitId:_0x45e746,shapeType:_0x224b6b,shapeId:_0x250392,shapeData:_0x44c5a6}=_0x293d8e;return _0xc6b7dc[_0x13d058(0x131)](SheetsShapeService)[_0x13d058(0x134)](_0x309564,_0x45e746,_0x224b6b,_0x250392,_0x44c5a6),!![];}},RemoveSheetsShapeMutation={'id':'sheet.mutation.remove-shape','type':_univerjs_core[_0x4d1f56(0x144)][_0x4d1f56(0xe6)],'handler':(_0x1e5467,_0x22f03b)=>{const {unitId:_0x55e0ba,subUnitId:_0x372248,shapeId:_0x297df3}=_0x22f03b;return _0x1e5467['get'](SheetsShapeService)['removeShape'](_0x55e0ba,_0x372248,_0x297df3),!![];}},InsertShapeCommand={'type':_univerjs_core[_0x4d1f56(0x144)][_0x4d1f56(0x14c)],'id':'sheet.command.insert-shape','handler':(_0x2565cd,_0x436126)=>{const _0x18c615=_0x4d1f56;var _0x2ba158,_0x384d34;const _0x493f4c=(0x0,_univerjs_sheets[_0x18c615(0x122)])(_0x2565cd[_0x18c615(0x131)](_univerjs_core[_0x18c615(0x141)]),_0x436126);if(!_0x493f4c)return![];const _0x11ff41=_0x2565cd[_0x18c615(0x131)](_univerjs_sheets[_0x18c615(0xf0)]),{unitId:_0x4e3aee,subUnitId:_0x3c90e8}=_0x493f4c,_0x5c4fe6=_0x11ff41[_0x18c615(0xf9)](_0x4e3aee,_0x3c90e8);if(!_0x5c4fe6)return![];const _0x45de85=_0x2565cd[_0x18c615(0x131)](_univerjs_core[_0x18c615(0xad)]),_0x52308f=_0x2565cd['get'](_univerjs_core[_0x18c615(0xa8)]),_0x41af80=_0x2565cd[_0x18c615(0x131)](_univerjs_sheets[_0x18c615(0x9f)]),_0x5463b2=_0x2565cd[_0x18c615(0x131)](_univerjs_sheets_drawing[_0x18c615(0x159)]),{shapeType:_0x21b956,shapeData:_0x3d3d4e}=_0x436126,_0x5d4baf=_0x436126[_0x18c615(0xdd)]||(0x0,_univerjs_core['generateRandomId'])(),_0x1bf085={'unitId':_0x4e3aee,'subUnitId':_0x3c90e8,'shapeId':_0x5d4baf,'shapeType':_0x21b956,'shapeData':_0x3d3d4e},_0x5c8e63=_0x436126[_0x18c615(0xb2)]||0xc8,_0x155cf2=_0x436126[_0x18c615(0x107)]||0xc8;let _0x5106a2=0x0,_0x270033=0x0,_0xc5306f={'row':0x0,'rowOffset':0x0,'column':0x0,'columnOffset':0x0},_0x575f60={'row':0x0,'rowOffset':0x0,'column':0x0,'columnOffset':0x0};if(_0x436126[_0x18c615(0x15a)]){const {x:_0x158ff2,y:_0x74b8f7}=_0x436126[_0x18c615(0x15a)];_0x5106a2=_0x158ff2,_0x270033=_0x74b8f7,_0xc5306f=_0x5c4fe6[_0x18c615(0xdc)](_0x158ff2,_0x74b8f7),_0x575f60=_0x5c4fe6[_0x18c615(0xdc)](_0x158ff2+_0x5c8e63,_0x74b8f7+_0x155cf2);}else{if(_0x436126[_0x18c615(0xdb)]){const {startRow:_0x5df88e,startColumn:_0x2d7660}=_0x436126[_0x18c615(0xdb)],_0x40355c=0xa,_0x5b4bc6=0xa;_0xc5306f={'row':_0x5df88e,'rowOffset':_0x40355c,'column':_0x2d7660,'columnOffset':_0x5b4bc6};const _0x11aa29=_0x5c4fe6['getCellWithCoordByIndex'](_0x5df88e,_0x2d7660);_0x5106a2=_0x11aa29[_0x18c615(0x103)]+_0x5b4bc6,_0x270033=_0x11aa29[_0x18c615(0xa3)]+_0x40355c,_0x575f60=_0x5c4fe6[_0x18c615(0xdc)](_0x5106a2+_0x5c8e63,_0x270033+_0x155cf2);}}const _0x3554b1={'from':_0xc5306f,'to':_0x575f60},_0x56a460={'unitId':_0x4e3aee,'subUnitId':_0x3c90e8,'drawingId':_0x5d4baf,'drawingType':_univerjs_core['DrawingTypeEnum']['DRAWING_SHAPE'],'sheetTransform':_0x3554b1,'transform':{'left':_0x5106a2,'top':_0x270033,'width':_0x5c8e63,'height':_0x155cf2},'data':{'shapeType':_0x21b956,'shapeData':_0x3d3d4e},'axisAlignSheetTransform':_0x3554b1,'allowTransform':!![]};(0x0,_univerjs_pro_engine_shape[_0x18c615(0xc3)])(_0x21b956)&&(_0x56a460['data'][_0x18c615(0x9e)]=![],_0x56a460[_0x18c615(0xfb)]['rotateEnabled']=![],_0x56a460[_0x18c615(0xfb)][_0x18c615(0xde)]=![],_0x56a460[_0x18c615(0xfb)][_0x18c615(0x149)]=![],_0x56a460[_0x18c615(0x136)]['rotateEnabled']=![],_0x56a460[_0x18c615(0x136)][_0x18c615(0xde)]=![],_0x56a460['transform'][_0x18c615(0x149)]=![]);const {undo:_0x148980,redo:_0x1575d7,objects:_0x3ef2be}=_0x5463b2['getBatchAddOp']([_0x56a460]),_0x244601=_0x41af80[_0x18c615(0x119)]({'id':_univerjs_sheets_drawing[_0x18c615(0xa7)]['id'],'params':{'unitId':_0x4e3aee,'drawings':[_0x56a460]}}),_0x787bce=[...(_0x2ba158=_0x244601[_0x18c615(0xac)])!==null&&_0x2ba158!==void 0x0?_0x2ba158:[],{'id':_univerjs_sheets_drawing[_0x18c615(0xf7)]['id'],'params':{'unitId':_0x4e3aee,'subUnitId':_0x3c90e8,'op':_0x1575d7,'objects':_0x3ef2be,'type':_univerjs_sheets_drawing[_0x18c615(0x11d)][_0x18c615(0xb7)]}},{'id':_univerjs_sheets_drawing['ClearSheetDrawingTransformerOperation']['id'],'params':[_0x4e3aee]},..._0x244601['redos'],{'id':InsertSheetsShapeMutation['id'],'params':_0x1bf085}],_0x5e392f=[{'id':RemoveSheetsShapeMutation['id'],'params':{'unitId':_0x4e3aee,'subUnitId':_0x3c90e8,'shapeId':_0x5d4baf}},...(_0x384d34=_0x244601[_0x18c615(0xd6)])!==null&&_0x384d34!==void 0x0?_0x384d34:[],{'id':_univerjs_sheets_drawing[_0x18c615(0xf7)]['id'],'params':{'unitId':_0x4e3aee,'subUnitId':_0x3c90e8,'op':_0x148980,'objects':_0x3ef2be,'type':_univerjs_sheets_drawing['DrawingApplyType'][_0x18c615(0xa9)]}},{'id':_univerjs_sheets_drawing[_0x18c615(0xe8)]['id'],'params':[_0x4e3aee]},..._0x244601[_0x18c615(0x148)]];if((0x0,_univerjs_core[_0x18c615(0xd1)])(_0x787bce,_0x45de85)[_0x18c615(0xdf)])return _0x52308f[_0x18c615(0xe4)]({'unitID':_0x4e3aee,'undoMutations':_0x5e392f,'redoMutations':_0x787bce}),!![];return![];}},UpdateSheetsShapeDataMutation={'id':'sheet.mutation.update-shape-data','type':_univerjs_core[_0x4d1f56(0x144)][_0x4d1f56(0xe6)],'handler':(_0x16dc8d,_0x2a40c2)=>{const _0x34d6b7=_0x4d1f56,{unitId:_0x166e85,subUnitId:_0x6a3024,shapeType:_0x2f829f,shapeId:_0x26e23e,shapeData:_0x1c0b03}=_0x2a40c2,_0x27a1cb=_0x16dc8d[_0x34d6b7(0x131)](SheetsShapeService)[_0x34d6b7(0xea)](_0x166e85,_0x6a3024,_0x26e23e);if(_0x27a1cb){if(_0x2f829f!==void 0x0)_0x27a1cb[_0x34d6b7(0x11a)](_0x2f829f);if(_0x1c0b03)_0x27a1cb===null||_0x27a1cb===void 0x0||_0x27a1cb[_0x34d6b7(0xc8)](_0x1c0b03,!![]);}return!![];}},SetShapeDrawingDataCommand={'type':_univerjs_core[_0x4d1f56(0x144)][_0x4d1f56(0x14c)],'id':'sheet.command.set-shape-drawing-data','handler':(_0x3b18d7,_0x1cd4b0)=>{const _0x4b894a=_0x4d1f56;var _0x310cad,_0x1dcadb;const _0x19d4e6=(0x0,_univerjs_sheets['getSheetCommandTarget'])(_0x3b18d7[_0x4b894a(0x131)](_univerjs_core[_0x4b894a(0x141)]),_0x1cd4b0);if(!_0x19d4e6)return![];const _0x55e253=_0x3b18d7[_0x4b894a(0x131)](_univerjs_sheets[_0x4b894a(0xf0)]),{unitId:_0x1a308d,subUnitId:_0x50fe28}=_0x19d4e6,_0x34c5a8=_0x55e253[_0x4b894a(0xf9)](_0x1a308d,_0x50fe28);if(!_0x34c5a8)return![];const _0x32d43b=_0x3b18d7['get'](SheetsShapeService),{shapeId:_0x34fa0f,shapeType:_0x122c0f,shapeData:_0x514851,position:_0x27d4d1,width:_0x7e85e5,height:_0x37e263}=_0x1cd4b0,_0x2b4627=_0x32d43b[_0x4b894a(0xea)](_0x1a308d,_0x50fe28,_0x34fa0f);if(!_0x2b4627)return![];const _0x1d88ac=_0x3b18d7[_0x4b894a(0x131)](_univerjs_core[_0x4b894a(0xad)]),_0x450df7=_0x3b18d7[_0x4b894a(0x131)](_univerjs_core['IUndoRedoService']),_0x519dc1=_0x3b18d7[_0x4b894a(0x131)](_univerjs_sheets[_0x4b894a(0x9f)]),_0x3efab1=_0x3b18d7[_0x4b894a(0x131)](_univerjs_sheets_drawing[_0x4b894a(0x159)]),_0x40842f={'unitId':_0x1a308d,'subUnitId':_0x50fe28,'shapeId':_0x34fa0f,'shapeType':_0x122c0f,'shapeData':_0x514851},_0x543ec6=_0x2b4627[_0x4b894a(0xbf)](),_0xeeb71b=_0x2b4627[_0x4b894a(0x117)](),{x:_0x1751e5,y:_0x103bdb}=_0x27d4d1,_0x3f7b8d={'from':_0x34c5a8[_0x4b894a(0xdc)](_0x1751e5,_0x103bdb),'to':_0x34c5a8[_0x4b894a(0xdc)](_0x1751e5+_0x7e85e5,_0x103bdb+_0x37e263)},_0x3251fc={'unitId':_0x1a308d,'subUnitId':_0x50fe28,'drawingId':_0x34fa0f,'drawingType':_univerjs_core[_0x4b894a(0x132)][_0x4b894a(0x14d)],'sheetTransform':_0x3f7b8d,'transform':{'left':_0x1751e5,'top':_0x103bdb,'width':_0x7e85e5,'height':_0x37e263},'data':{'shapeType':_0x122c0f,'shapeData':_0x514851},'axisAlignSheetTransform':_0x3f7b8d,'allowTransform':!![]};(0x0,_univerjs_pro_engine_shape[_0x4b894a(0xc3)])(_0x122c0f)&&(_0x3251fc['data'][_0x4b894a(0x9e)]=![],_0x3251fc[_0x4b894a(0xfb)][_0x4b894a(0xe1)]=![],_0x3251fc['data'][_0x4b894a(0xde)]=![],_0x3251fc['data']['borderEnabled']=![],_0x3251fc[_0x4b894a(0x136)][_0x4b894a(0xe1)]=![],_0x3251fc[_0x4b894a(0x136)][_0x4b894a(0xde)]=![],_0x3251fc['transform'][_0x4b894a(0x149)]=![]);const {undo:_0x4c6ff2,redo:_0x42f530,objects:_0x2db1b5}=_0x3efab1['getBatchUpdateOp']([_0x3251fc]),_0x398357=_0x519dc1[_0x4b894a(0x119)]({'id':_univerjs_sheets_drawing[_0x4b894a(0xb8)]['id'],'params':{'unitId':_0x1a308d,'drawings':[_0x3251fc]}}),_0x1e72dc=[...(_0x310cad=_0x398357[_0x4b894a(0xac)])!==null&&_0x310cad!==void 0x0?_0x310cad:[],{'id':_univerjs_sheets_drawing['SetDrawingApplyMutation']['id'],'params':{'unitId':_0x1a308d,'subUnitId':_0x50fe28,'op':_0x42f530,'objects':_0x2db1b5,'type':_univerjs_sheets_drawing[_0x4b894a(0x11d)]['UPDATE']}},{'id':_univerjs_sheets_drawing[_0x4b894a(0xe8)]['id'],'params':[_0x1a308d]},..._0x398357[_0x4b894a(0x13e)],{'id':UpdateSheetsShapeDataMutation['id'],'params':_0x40842f}],_0x23d458=[...(_0x1dcadb=_0x398357['preUndos'])!==null&&_0x1dcadb!==void 0x0?_0x1dcadb:[],{'id':_univerjs_sheets_drawing[_0x4b894a(0xf7)]['id'],'params':{'unitId':_0x1a308d,'subUnitId':_0x50fe28,'op':_0x4c6ff2,'objects':_0x2db1b5,'type':_univerjs_sheets_drawing[_0x4b894a(0x11d)][_0x4b894a(0x151)]}},{'id':_univerjs_sheets_drawing[_0x4b894a(0xe8)]['id'],'params':[_0x1a308d]},..._0x398357[_0x4b894a(0x148)],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x1a308d,'subUnitId':_0x50fe28,'shapeType':_0x543ec6,'shapeId':_0x34fa0f,'shapeData':_0xeeb71b}}];if((0x0,_univerjs_core['sequenceExecute'])(_0x1e72dc,_0x1d88ac)['result'])return _0x450df7[_0x4b894a(0xe4)]({'unitID':_0x1a308d,'undoMutations':_0x23d458,'redoMutations':_0x1e72dc}),!![];return![];}},ToggleSheetsShapeFlipCommand={'type':_univerjs_core[_0x4d1f56(0x144)][_0x4d1f56(0x14c)],'id':'sheet.command.toggle-shape-flip','handler':(_0x58e135,_0x126c74)=>{const _0x56d77d=_0x4d1f56;var _0x1fbeb7,_0x3b4aec;const _0x522e6f=(0x0,_univerjs_sheets[_0x56d77d(0x122)])(_0x58e135[_0x56d77d(0x131)](_univerjs_core[_0x56d77d(0x141)]),_0x126c74);if(!_0x522e6f)return![];const _0x3712a3=_0x58e135[_0x56d77d(0x131)](_univerjs_sheets[_0x56d77d(0xf0)]),{unitId:_0x59fdea,subUnitId:_0x56ce22}=_0x522e6f,_0x21a098=_0x3712a3['getSkeleton'](_0x59fdea,_0x56ce22);if(!_0x21a098)return![];const _0x385137=_0x58e135[_0x56d77d(0x131)](_univerjs_sheets_drawing[_0x56d77d(0x159)]),{shapeId:_0x35811c,flipH:_0x2d2769,flipV:_0x21147}=_0x126c74,_0x113fb7=_0x385137[_0x56d77d(0x154)]({'unitId':_0x59fdea,'subUnitId':_0x56ce22,'drawingId':_0x35811c});if(!_0x113fb7)return![];const _0x1038de=_0x58e135[_0x56d77d(0x131)](SheetsShapeService)[_0x56d77d(0xea)](_0x59fdea,_0x56ce22,_0x35811c);if(!_0x1038de)return![];const _0x4af112=_0x58e135['get'](_univerjs_core[_0x56d77d(0xad)]),_0x4f05c3=_0x58e135[_0x56d77d(0x131)](_univerjs_core[_0x56d77d(0xa8)]),_0x2b0538=_0x58e135[_0x56d77d(0x131)](_univerjs_sheets[_0x56d77d(0x9f)]),_0x1c4350={..._0x113fb7[_0x56d77d(0x136)]};if(_0x2d2769!==void 0x0)_0x1c4350[_0x56d77d(0x120)]=!_0x1c4350[_0x56d77d(0x120)];if(_0x21147!==void 0x0)_0x1c4350['flipY']=!_0x1c4350[_0x56d77d(0x11c)];const _0x1a4200=(0x0,_univerjs_sheets_drawing[_0x56d77d(0xda)])(_0x1c4350,_0x21a098),_0x56d884=(0x0,_univerjs_sheets_drawing[_0x56d77d(0xc0)])(_0x1c4350,_0x21a098),_0xd5f06e=_0x1038de[_0x56d77d(0xbf)](),_0xa8403d=_0x1038de['getShapeData'](),_0x5ab420={'unitId':_0x59fdea,'subUnitId':_0x56ce22,'drawingId':_0x35811c,'drawingType':_univerjs_core['DrawingTypeEnum'][_0x56d77d(0x14d)],'sheetTransform':_0x1a4200,'transform':_0x1c4350,'data':{'shapeType':_0xd5f06e,'shapeData':_0xa8403d},'axisAlignSheetTransform':_0x56d884,'allowTransform':!![]},{undo:_0xa72063,redo:_0x436e1d,objects:_0x549a41}=_0x385137[_0x56d77d(0xf8)]([_0x5ab420]),_0x1e3a85=_0x2b0538['onCommandExecute']({'id':_univerjs_sheets_drawing[_0x56d77d(0xb8)]['id'],'params':{'unitId':_0x59fdea,'drawings':[_0x5ab420]}}),_0x336149=[...(_0x1fbeb7=_0x1e3a85[_0x56d77d(0xac)])!==null&&_0x1fbeb7!==void 0x0?_0x1fbeb7:[],{'id':_univerjs_sheets_drawing[_0x56d77d(0xf7)]['id'],'params':{'unitId':_0x59fdea,'subUnitId':_0x56ce22,'op':_0x436e1d,'objects':_0x549a41,'type':_univerjs_sheets_drawing[_0x56d77d(0x11d)][_0x56d77d(0x151)]}},{'id':_univerjs_sheets_drawing[_0x56d77d(0xe8)]['id'],'params':[_0x59fdea]},..._0x1e3a85[_0x56d77d(0x13e)]],_0x2306a3=[...(_0x3b4aec=_0x1e3a85[_0x56d77d(0xd6)])!==null&&_0x3b4aec!==void 0x0?_0x3b4aec:[],{'id':_univerjs_sheets_drawing[_0x56d77d(0xf7)]['id'],'params':{'unitId':_0x59fdea,'subUnitId':_0x56ce22,'op':_0xa72063,'objects':_0x549a41,'type':_univerjs_sheets_drawing[_0x56d77d(0x11d)][_0x56d77d(0x151)]}},{'id':_univerjs_sheets_drawing[_0x56d77d(0xe8)]['id'],'params':[_0x59fdea]},..._0x1e3a85[_0x56d77d(0x148)]];if((0x0,_univerjs_pro_engine_shape[_0x56d77d(0xc3)])(_0xd5f06e)){const _0x26284f=_0x1038de[_0x56d77d(0xb1)]();if(_0x26284f){const _0x551019={..._0x26284f};_0x551019[_0x56d77d(0x111)]=void 0x0,_0x551019['to']=void 0x0,_0x336149['push']({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x59fdea,'subUnitId':_0x56ce22,'shapeId':_0x35811c,'shapeType':_0xd5f06e,'shapeData':{'relation':_0x551019}}}),_0x2306a3[_0x56d77d(0x143)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x59fdea,'subUnitId':_0x56ce22,'shapeId':_0x35811c,'shapeType':_0xd5f06e,'shapeData':{'relation':_0x26284f}}});}}if((0x0,_univerjs_core[_0x56d77d(0xd1)])(_0x336149,_0x4af112)[_0x56d77d(0xdf)])return _0x4f05c3[_0x56d77d(0xe4)]({'unitID':_0x59fdea,'undoMutations':_0x2306a3,'redoMutations':_0x336149}),!![];return![];}},SetSheetsShapeRotateCommand={'type':_univerjs_core[_0x4d1f56(0x144)][_0x4d1f56(0x14c)],'id':_0x4d1f56(0x13b),'handler':(_0x2f8fd8,_0x346d90)=>{const _0x50945e=_0x4d1f56;var _0x371d2d,_0x12e3ed;const _0x51d8d5=(0x0,_univerjs_sheets[_0x50945e(0x122)])(_0x2f8fd8['get'](_univerjs_core[_0x50945e(0x141)]),_0x346d90);if(!_0x51d8d5)return![];const _0x3bb54d=_0x2f8fd8[_0x50945e(0x131)](_univerjs_sheets[_0x50945e(0xf0)]),{unitId:_0x4f70a2,subUnitId:_0xccc16b}=_0x51d8d5,_0x214ff3=_0x3bb54d[_0x50945e(0x101)](_0x4f70a2,_0xccc16b);if(!_0x214ff3)return![];const _0x26dfa3=_0x2f8fd8[_0x50945e(0x131)](_univerjs_sheets_drawing[_0x50945e(0x159)]),{shapeId:_0x306b57,rotate:_0x3d35ad}=_0x346d90,_0x24b72d=_0x26dfa3[_0x50945e(0x154)]({'unitId':_0x4f70a2,'subUnitId':_0xccc16b,'drawingId':_0x306b57});if(!_0x24b72d)return![];const _0x4cba3a=_0x2f8fd8['get'](SheetsShapeService)[_0x50945e(0xea)](_0x4f70a2,_0xccc16b,_0x306b57);if(!_0x4cba3a)return![];const _0x3179a6=_0x2f8fd8[_0x50945e(0x131)](_univerjs_core[_0x50945e(0xad)]),_0x44cea9=_0x2f8fd8[_0x50945e(0x131)](_univerjs_core[_0x50945e(0xa8)]),_0x54ab95=_0x2f8fd8['get'](_univerjs_sheets['SheetInterceptorService']),_0x3857e3={..._0x24b72d[_0x50945e(0x136)]};if(_0x3d35ad!==void 0x0)_0x3857e3[_0x50945e(0xb9)]=(_0x3857e3[_0x50945e(0xb9)]||0x0)+_0x3d35ad;const _0x1cefbb=(0x0,_univerjs_sheets_drawing['transformToDrawingPosition'])(_0x3857e3,_0x214ff3),_0xd1eb56=(0x0,_univerjs_sheets_drawing[_0x50945e(0xc0)])(_0x3857e3,_0x214ff3),_0x4f5dfb=_0x4cba3a['getShapeType'](),_0x46b724=_0x4cba3a['getShapeData'](),_0x305f18={'unitId':_0x4f70a2,'subUnitId':_0xccc16b,'drawingId':_0x306b57,'drawingType':_univerjs_core['DrawingTypeEnum'][_0x50945e(0x14d)],'sheetTransform':_0x1cefbb,'transform':_0x3857e3,'data':{'shapeType':_0x4f5dfb,'shapeData':_0x46b724},'axisAlignSheetTransform':_0xd1eb56,'allowTransform':!![]},{undo:_0x1a3c41,redo:_0x13cc05,objects:_0x559f0d}=_0x26dfa3[_0x50945e(0xf8)]([_0x305f18]),_0x46ad9c=_0x54ab95[_0x50945e(0x119)]({'id':_univerjs_sheets_drawing[_0x50945e(0xb8)]['id'],'params':{'unitId':_0x4f70a2,'drawings':[_0x305f18]}}),_0x2a123d=[...(_0x371d2d=_0x46ad9c[_0x50945e(0xac)])!==null&&_0x371d2d!==void 0x0?_0x371d2d:[],{'id':_univerjs_sheets_drawing[_0x50945e(0xf7)]['id'],'params':{'unitId':_0x4f70a2,'subUnitId':_0xccc16b,'op':_0x13cc05,'objects':_0x559f0d,'type':_univerjs_sheets_drawing[_0x50945e(0x11d)][_0x50945e(0x151)]}},{'id':_univerjs_sheets_drawing[_0x50945e(0xe8)]['id'],'params':[_0x4f70a2]},..._0x46ad9c[_0x50945e(0x13e)]],_0x3b04c9=[...(_0x12e3ed=_0x46ad9c[_0x50945e(0xd6)])!==null&&_0x12e3ed!==void 0x0?_0x12e3ed:[],{'id':_univerjs_sheets_drawing[_0x50945e(0xf7)]['id'],'params':{'unitId':_0x4f70a2,'subUnitId':_0xccc16b,'op':_0x1a3c41,'objects':_0x559f0d,'type':_univerjs_sheets_drawing[_0x50945e(0x11d)][_0x50945e(0x151)]}},{'id':_univerjs_sheets_drawing['ClearSheetDrawingTransformerOperation']['id'],'params':[_0x4f70a2]},..._0x46ad9c[_0x50945e(0x148)]];if((0x0,_univerjs_core[_0x50945e(0xd1)])(_0x2a123d,_0x3179a6)[_0x50945e(0xdf)])return _0x44cea9[_0x50945e(0xe4)]({'unitID':_0x4f70a2,'undoMutations':_0x3b04c9,'redoMutations':_0x2a123d}),!![];return![];}},SetSheetsShapeTextVerticalToggleCommand={'type':_univerjs_core[_0x4d1f56(0x144)][_0x4d1f56(0x14c)],'id':_0x4d1f56(0xee),'handler':(_0x567e2c,_0x599005)=>{const _0x30ba39=_0x4d1f56;var _0x5ea3b9;const _0x227c89=(0x0,_univerjs_sheets[_0x30ba39(0x122)])(_0x567e2c['get'](_univerjs_core['IUniverInstanceService']),_0x599005);if(!_0x227c89)return![];const {unitId:_0x2a5943,subUnitId:_0x5fb6ae}=_0x227c89,{shapeId:_0x1d15e4}=_0x599005,_0x35ec45=_0x567e2c[_0x30ba39(0x131)](SheetsShapeService)[_0x30ba39(0xea)](_0x2a5943,_0x5fb6ae,_0x1d15e4);if(!_0x35ec45)return![];const _0x458452=_0x35ec45[_0x30ba39(0xe9)](),_0x5771a5=(_0x5ea3b9=_0x458452===null||_0x458452===void 0x0?void 0x0:_0x458452[_0x30ba39(0xc4)])!==null&&_0x5ea3b9!==void 0x0?_0x5ea3b9:!![],_0xe7b00d=!_0x5771a5,_0x1d9c26=_0x567e2c['get'](_univerjs_core['ICommandService']),_0x58aab6=_0x567e2c['get'](_univerjs_core[_0x30ba39(0xa8)]),_0x3fc3ca={'unitId':_0x2a5943,'subUnitId':_0x5fb6ae,'shapeId':_0x1d15e4,'shapeData':{'shapeText':{'isHorizontal':_0xe7b00d}}},_0x1eefdf={'unitId':_0x2a5943,'subUnitId':_0x5fb6ae,'shapeId':_0x1d15e4,'shapeData':{'shapeText':{'isHorizontal':_0x5771a5}}},_0xe99523=[{'id':UpdateSheetsShapeDataMutation['id'],'params':_0x3fc3ca}],_0x4c7ebe=[{'id':UpdateSheetsShapeDataMutation['id'],'params':_0x1eefdf}];if((0x0,_univerjs_core[_0x30ba39(0xd1)])(_0xe99523,_0x1d9c26)[_0x30ba39(0xdf)])return _0x58aab6[_0x30ba39(0xe4)]({'unitID':_0x2a5943,'undoMutations':_0x4c7ebe,'redoMutations':_0xe99523}),!![];return![];}},UpdateConnectorRelationCommand={'type':_univerjs_core[_0x4d1f56(0x144)]['COMMAND'],'id':'sheet.command.update-connector-relation','handler':(_0x4d509e,_0x308f51)=>{const _0x570227=_0x4d1f56;var _0x4b1737,_0x515c41,_0xb56c63,_0x10b561;const _0x8f83d5=(0x0,_univerjs_sheets[_0x570227(0x122)])(_0x4d509e[_0x570227(0x131)](_univerjs_core[_0x570227(0x141)]),_0x308f51);if(!_0x8f83d5)return![];const _0x33515b=_0x4d509e[_0x570227(0x131)](_univerjs_sheets[_0x570227(0xf0)]),{unitId:_0x2389b0,subUnitId:_0x115ecc}=_0x8f83d5,_0x5293b1=_0x33515b[_0x570227(0x101)](_0x2389b0,_0x115ecc);if(!_0x5293b1)return![];const _0xa5e320=_0x4d509e['get'](_univerjs_sheets_drawing[_0x570227(0x159)]),{connectorShapeId:_0x5f59f2,width:_0x161ee7,height:_0x551160,left:_0x499f73,top:_0x411241,flipX:_0x1d7ebc,flipY:_0x28eee1,rotation:_0x153914,oldAdjustValues:_0x380cbb,newAdjustValues:_0x4ee41b,oldLineType:_0x41c063,newLineType:_0x4f8e34,oldRelation:_0x24b8c6,newRelation:_0x22a1bc}=_0x308f51,_0x26f58f=_0xa5e320[_0x570227(0x154)]({'unitId':_0x2389b0,'subUnitId':_0x115ecc,'drawingId':_0x5f59f2});if(!_0x26f58f)return![];const _0x1eef60=_0x4d509e['get'](SheetsShapeService)['getShapeModel'](_0x2389b0,_0x115ecc,_0x5f59f2);if(!_0x1eef60)return![];const _0x126610=_0x4d509e[_0x570227(0x131)](_univerjs_core['ICommandService']),_0x4ba704=_0x4d509e[_0x570227(0x131)](_univerjs_core[_0x570227(0xa8)]),_0x19b12e=_0x4d509e['get'](_univerjs_sheets[_0x570227(0x9f)]),_0x311ab0={..._0x26f58f[_0x570227(0x136)],'width':_0x161ee7,'height':_0x551160,'left':_0x499f73,'top':_0x411241,'flipX':_0x1d7ebc,'flipY':_0x28eee1,'angle':(_0x4b1737=_0x153914!==null&&_0x153914!==void 0x0?_0x153914:(_0x515c41=_0x26f58f['transform'])===null||_0x515c41===void 0x0?void 0x0:_0x515c41[_0x570227(0xb9)])!==null&&_0x4b1737!==void 0x0?_0x4b1737:0x0},_0x24c81a=(0x0,_univerjs_sheets_drawing[_0x570227(0xda)])(_0x311ab0,_0x5293b1),_0x247215=(0x0,_univerjs_sheets_drawing['transformToAxisAlignPosition'])(_0x311ab0,_0x5293b1),_0x525b45=_0x1eef60[_0x570227(0xbf)](),_0xecb7a7=_0x1eef60[_0x570227(0x117)](),_0x206c08={'unitId':_0x2389b0,'subUnitId':_0x115ecc,'drawingId':_0x5f59f2,'drawingType':_univerjs_core[_0x570227(0x132)][_0x570227(0x14d)],'sheetTransform':_0x24c81a,'transform':_0x311ab0,'data':{'shapeType':_0x4f8e34||_0x41c063||_0x525b45,'shapeData':{..._0xecb7a7,'adjustValues':_0x4ee41b||_0x380cbb||(_0xecb7a7===null||_0xecb7a7===void 0x0?void 0x0:_0xecb7a7[_0x570227(0x129)]),'relation':_0x22a1bc||_0x24b8c6||(_0xecb7a7===null||_0xecb7a7===void 0x0?void 0x0:_0xecb7a7[_0x570227(0xf2)])}},'axisAlignSheetTransform':_0x247215,'allowTransform':!![]},{undo:_0x45c987,redo:_0x472c0c,objects:_0x520881}=_0xa5e320[_0x570227(0xf8)]([_0x206c08]),_0x390f9e=_0x19b12e[_0x570227(0x119)]({'id':_univerjs_sheets_drawing[_0x570227(0xb8)]['id'],'params':{'unitId':_0x2389b0,'drawings':[_0x206c08]}}),_0x4c9a30=[...(_0xb56c63=_0x390f9e['preRedos'])!==null&&_0xb56c63!==void 0x0?_0xb56c63:[],{'id':_univerjs_sheets_drawing[_0x570227(0xf7)]['id'],'params':{'unitId':_0x2389b0,'subUnitId':_0x115ecc,'op':_0x472c0c,'objects':_0x520881,'type':_univerjs_sheets_drawing[_0x570227(0x11d)][_0x570227(0x151)]}},{'id':_univerjs_sheets_drawing[_0x570227(0xe8)]['id'],'params':[_0x2389b0]},..._0x390f9e[_0x570227(0x13e)],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x2389b0,'subUnitId':_0x115ecc,'shapeId':_0x5f59f2,'shapeType':_0x4f8e34,'shapeData':{'adjustValues':_0x4ee41b,'relation':_0x22a1bc}}}],_0x354b17=[...(_0x10b561=_0x390f9e['preUndos'])!==null&&_0x10b561!==void 0x0?_0x10b561:[],{'id':_univerjs_sheets_drawing['SetDrawingApplyMutation']['id'],'params':{'unitId':_0x2389b0,'subUnitId':_0x115ecc,'op':_0x45c987,'objects':_0x520881,'type':_univerjs_sheets_drawing[_0x570227(0x11d)][_0x570227(0x151)]}},{'id':_univerjs_sheets_drawing[_0x570227(0xe8)]['id'],'params':[_0x2389b0]},..._0x390f9e[_0x570227(0x148)],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x2389b0,'subUnitId':_0x115ecc,'shapeId':_0x5f59f2,'shapeType':_0x525b45,'shapeData':{..._0xecb7a7,'adjustValues':_0x380cbb||(_0xecb7a7===null||_0xecb7a7===void 0x0?void 0x0:_0xecb7a7[_0x570227(0x129)]),'relation':_0x24b8c6||(_0xecb7a7===null||_0xecb7a7===void 0x0?void 0x0:_0xecb7a7['relation'])}}}];if((0x0,_univerjs_core[_0x570227(0xd1)])(_0x4c9a30,_0x126610)[_0x570227(0xdf)])return _0x4ba704[_0x570227(0xe4)]({'unitID':_0x2389b0,'undoMutations':_0x354b17,'redoMutations':_0x4c9a30}),!![];return![];}},UpdateLineShapeResizeCommand={'type':_univerjs_core[_0x4d1f56(0x144)][_0x4d1f56(0x14c)],'id':_0x4d1f56(0x138),'handler':(_0x1b89bf,_0x1c92b7)=>{const _0x6ef1ad=_0x4d1f56;var _0x375fd9,_0x29abd0;const _0x4aaf19=(0x0,_univerjs_sheets['getSheetCommandTarget'])(_0x1b89bf[_0x6ef1ad(0x131)](_univerjs_core[_0x6ef1ad(0x141)]),_0x1c92b7);if(!_0x4aaf19)return![];const _0x4c1a6f=_0x1b89bf['get'](_univerjs_sheets['SheetSkeletonService']),{unitId:_0x426a9c,subUnitId:_0x1cef7f}=_0x4aaf19,_0x2ba993=_0x4c1a6f['getSkeleton'](_0x426a9c,_0x1cef7f);if(!_0x2ba993)return![];const _0x45aabe=_0x1b89bf[_0x6ef1ad(0x131)](_univerjs_sheets_drawing[_0x6ef1ad(0x159)]),{shapeId:_0x16c8a8,width:_0x37d12c,height:_0x22406e,left:_0x4edae4,top:_0x2f2697,flipX:_0x2c4e49,flipY:_0x5c916b,angle:_0xbfa27a,oldAdjustValues:_0x3cc924,newAdjustValues:_0x7c3d41,oldLineType:_0x4ced09,newLineType:_0x38f2b4}=_0x1c92b7,_0x1f70ad=_0x45aabe[_0x6ef1ad(0x154)]({'unitId':_0x426a9c,'subUnitId':_0x1cef7f,'drawingId':_0x16c8a8});if(!_0x1f70ad)return![];const _0x19bdab=_0x1b89bf['get'](SheetsShapeService)['getShapeModel'](_0x426a9c,_0x1cef7f,_0x16c8a8);if(!_0x19bdab)return![];const _0x740982=_0x1b89bf[_0x6ef1ad(0x131)](_univerjs_core[_0x6ef1ad(0xad)]),_0x1fb3b7=_0x1b89bf[_0x6ef1ad(0x131)](_univerjs_core[_0x6ef1ad(0xa8)]),_0x13b7c3=_0x1b89bf[_0x6ef1ad(0x131)](_univerjs_sheets[_0x6ef1ad(0x9f)]),_0x34643a={..._0x1f70ad[_0x6ef1ad(0x136)],'width':_0x37d12c,'height':_0x22406e,'left':_0x4edae4,'top':_0x2f2697,'flipX':_0x2c4e49,'flipY':_0x5c916b,'angle':_0xbfa27a},_0x538b26=(0x0,_univerjs_sheets_drawing[_0x6ef1ad(0xda)])(_0x34643a,_0x2ba993),_0x528862=(0x0,_univerjs_sheets_drawing[_0x6ef1ad(0xc0)])(_0x34643a,_0x2ba993),_0x5aa573=_0x19bdab[_0x6ef1ad(0xbf)](),_0x2a9243=_0x19bdab[_0x6ef1ad(0x117)](),_0x4daee4={'unitId':_0x426a9c,'subUnitId':_0x1cef7f,'drawingId':_0x16c8a8,'drawingType':_univerjs_core[_0x6ef1ad(0x132)][_0x6ef1ad(0x14d)],'sheetTransform':_0x538b26,'transform':_0x34643a,'data':{'shapeType':_0x38f2b4||_0x4ced09||_0x5aa573,'shapeData':{..._0x2a9243,'adjustValues':_0x7c3d41||_0x3cc924||(_0x2a9243===null||_0x2a9243===void 0x0?void 0x0:_0x2a9243[_0x6ef1ad(0x129)])}},'axisAlignSheetTransform':_0x528862,'allowTransform':!![]},{undo:_0x4de186,redo:_0x66d499,objects:_0x4b3cd7}=_0x45aabe[_0x6ef1ad(0xf8)]([_0x4daee4]),_0x5c3c47=_0x13b7c3[_0x6ef1ad(0x119)]({'id':_univerjs_sheets_drawing[_0x6ef1ad(0xb8)]['id'],'params':{'unitId':_0x426a9c,'drawings':[_0x4daee4]}}),_0x2e4afd=[...(_0x375fd9=_0x5c3c47[_0x6ef1ad(0xac)])!==null&&_0x375fd9!==void 0x0?_0x375fd9:[],{'id':_univerjs_sheets_drawing['SetDrawingApplyMutation']['id'],'params':{'unitId':_0x426a9c,'subUnitId':_0x1cef7f,'op':_0x66d499,'objects':_0x4b3cd7,'type':_univerjs_sheets_drawing['DrawingApplyType'][_0x6ef1ad(0x151)]}},{'id':_univerjs_sheets_drawing['ClearSheetDrawingTransformerOperation']['id'],'params':[_0x426a9c]},..._0x5c3c47[_0x6ef1ad(0x13e)],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x426a9c,'subUnitId':_0x1cef7f,'shapeId':_0x16c8a8,'shapeType':_0x38f2b4,'shapeData':{'adjustValues':_0x7c3d41}}}],_0x1d4303=[...(_0x29abd0=_0x5c3c47[_0x6ef1ad(0xd6)])!==null&&_0x29abd0!==void 0x0?_0x29abd0:[],{'id':_univerjs_sheets_drawing[_0x6ef1ad(0xf7)]['id'],'params':{'unitId':_0x426a9c,'subUnitId':_0x1cef7f,'op':_0x4de186,'objects':_0x4b3cd7,'type':_univerjs_sheets_drawing['DrawingApplyType']['UPDATE']}},{'id':_univerjs_sheets_drawing[_0x6ef1ad(0xe8)]['id'],'params':[_0x426a9c]},..._0x5c3c47[_0x6ef1ad(0x148)],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x426a9c,'subUnitId':_0x1cef7f,'shapeId':_0x16c8a8,'shapeType':_0x5aa573,'shapeData':{..._0x2a9243,'adjustValues':_0x3cc924||(_0x2a9243===null||_0x2a9243===void 0x0?void 0x0:_0x2a9243[_0x6ef1ad(0x129)])}}}];if((0x0,_univerjs_core['sequenceExecute'])(_0x2e4afd,_0x740982)[_0x6ef1ad(0xdf)])return _0x1fb3b7[_0x6ef1ad(0xe4)]({'unitID':_0x426a9c,'undoMutations':_0x1d4303,'redoMutations':_0x2e4afd}),!![];return![];}},UpdateSheetsShapeTypeMutation={'id':_0x4d1f56(0x130),'type':_univerjs_core['CommandType'][_0x4d1f56(0xe6)],'handler':(_0x18185f,_0x502298)=>{const _0x32523c=_0x4d1f56,{unitId:_0x20d057,subUnitId:_0xdd9be9,shapeType:_0x640c4b,shapeId:_0x441d6d,shapeData:_0x44a345}=_0x502298,_0x343aa4=_0x18185f[_0x32523c(0x131)](SheetsShapeService)['getShapeModel'](_0x20d057,_0xdd9be9,_0x441d6d);if(_0x343aa4){_0x343aa4[_0x32523c(0x11a)](_0x640c4b);if(_0x44a345)_0x343aa4===null||_0x343aa4===void 0x0||_0x343aa4[_0x32523c(0xc8)](_0x44a345);}return!![];}},UpdateSheetsShapeTypeCommand={'id':'sheet.command.update-shape-type','type':_univerjs_core[_0x4d1f56(0x144)][_0x4d1f56(0x14c)],'handler':(_0xebca63,_0x5316a5)=>{const _0x5ab96d=_0x4d1f56;if(!_0x5316a5)return![];const _0x42ba21=_0xebca63['get'](_univerjs_core['ICommandService']),_0xc8503a=_0xebca63[_0x5ab96d(0x131)](SheetsShapeService),_0x35c55c=_0xebca63[_0x5ab96d(0x131)](_univerjs_core['IUndoRedoService']),_0x36a3e9=[],_0x42ffa0=[],{unitId:_0x3c0d34,subUnitId:_0x1efb3a,shapeId:_0x4d888b,shapeType:_0x54a6c0,shapeData:_0x1fe973}=_0x5316a5,_0x5b24e8=_0xc8503a['getShapeModel'](_0x3c0d34,_0x1efb3a,_0x4d888b);if(_0x5b24e8){const _0x4fa246=_0x5b24e8[_0x5ab96d(0xbf)](),_0xf38c84=Object[_0x5ab96d(0x14a)]({},_0x5b24e8[_0x5ab96d(0x117)]()),_0x2d623e={'unitId':_0x3c0d34,'subUnitId':_0x1efb3a,'shapeId':_0x4d888b,'shapeType':_0x54a6c0,'shapeData':_0x1fe973},_0x56410f={'unitId':_0x3c0d34,'subUnitId':_0x1efb3a,'shapeId':_0x4d888b,'shapeType':_0x4fa246,'shapeData':_0xf38c84};_0x36a3e9[_0x5ab96d(0x143)]({'id':UpdateSheetsShapeTypeMutation['id'],'params':_0x2d623e}),_0x42ffa0[_0x5ab96d(0x143)]({'id':UpdateSheetsShapeTypeMutation['id'],'params':_0x56410f});if(_0x36a3e9[_0x5ab96d(0xef)](_0x53aba8=>_0x42ba21[_0x5ab96d(0xbd)](_0x53aba8['id'],_0x53aba8[_0x5ab96d(0xe3)])))_0x35c55c[_0x5ab96d(0xe4)]({'unitID':_0x3c0d34,'redoMutations':[..._0x36a3e9],'undoMutations':[..._0x42ffa0]});return!![];}return![];}};var name=_0x4d1f56(0x115),version=_0x4d1f56(0x11b);const SHEETS_SHAPE_PLUGIN_CONFIG_KEY=_0x4d1f56(0x13d),configSymbol=Symbol(SHEETS_SHAPE_PLUGIN_CONFIG_KEY),defaultPluginConfig={};let SheetsShapeController=class SheetsShapeController extends _univerjs_core[_0x4d1f56(0x157)]{constructor(_0x240a46,_0x279054,_0x4c4003,_0xf7c2a9,_0x559d09){const _0x41f88b=_0x4d1f56;super(),this['_commandService']=_0x240a46,this[_0x41f88b(0x98)]=_0x279054,this[_0x41f88b(0xec)]=_0x4c4003,this['_sheetsShapeService']=_0xf7c2a9,this[_0x41f88b(0x145)]=_0x559d09,this[_0x41f88b(0xbc)](),this['_initCommandInterceptor']();}['_initCommands'](){const _0x2d635a=_0x4d1f56;[InsertShapeCommand,SetShapeDrawingDataCommand,ToggleSheetsShapeFlipCommand,SetSheetsShapeRotateCommand,SetSheetsShapeTextVerticalToggleCommand,UpdateConnectorRelationCommand,UpdateLineShapeResizeCommand,InsertSheetsShapeMutation,RemoveSheetsShapeMutation,UpdateSheetsShapeTypeMutation,UpdateSheetsShapeDataMutation][_0x2d635a(0x12d)](_0x9169e7=>this[_0x2d635a(0xaf)](this[_0x2d635a(0x11e)][_0x2d635a(0x124)](_0x9169e7)));}[_0x4d1f56(0xd4)](){const _0x11bbb1=_0x4d1f56;this[_0x11bbb1(0xaf)](this['_sheetInterceptorService'][_0x11bbb1(0xb4)]({'getMutations':_0x4ee21f=>{const _0x1739f1=_0x11bbb1;if(_0x4ee21f['id']===_univerjs_sheets_drawing[_0x1739f1(0xce)]['id']){const {drawings:_0x2d81e2}=_0x4ee21f[_0x1739f1(0xe3)],_0x1e3fd0=_0x2d81e2[_0x1739f1(0xd2)](_0x2395a4=>_0x2395a4[_0x1739f1(0x15c)]===_univerjs_core['DrawingTypeEnum'][_0x1739f1(0x14d)]);if(_0x1e3fd0[_0x1739f1(0x12b)]===0x0)return{'preRedos':[],'redos':[],'preUndos':[],'undos':[]};const _0x23981f=[],_0x530c9a=[];return _0x1e3fd0['forEach'](_0x5639a0=>{const _0x1abd6a=_0x1739f1,{unitId:_0x5e9b17,subUnitId:_0x18210d,drawingId:_0x1b58bc}=_0x5639a0,_0x47a1d6=this[_0x1abd6a(0xfd)][_0x1abd6a(0xea)](_0x5e9b17,_0x18210d,_0x1b58bc);if(!_0x47a1d6)throw new TypeError(_0x1abd6a(0x109)+_0x47a1d6);_0x23981f[_0x1abd6a(0x143)]({'id':RemoveSheetsShapeMutation['id'],'params':{'unitId':_0x5e9b17,'subUnitId':_0x18210d,'shapeId':_0x1b58bc}}),_0x530c9a[_0x1abd6a(0x143)]({'id':InsertSheetsShapeMutation['id'],'params':{'unitId':_0x5e9b17,'subUnitId':_0x18210d,'shapeId':_0x1b58bc,'shapeType':_0x47a1d6[_0x1abd6a(0xbf)](),'shapeData':_0x47a1d6[_0x1abd6a(0x117)]()}});const _0x2d2761=this[_0x1abd6a(0xfd)]['getBasicShapeRelation'](_0x5e9b17,_0x18210d,_0x1b58bc);if(_0x2d2761)for(const _0x2d3c60 of _0x2d2761){const _0x3c537e=_0x2d3c60[_0x1abd6a(0x156)],_0x371db0=_0x2d3c60[_0x1abd6a(0x112)],_0xe1a351=_0x371db0?{'from':void 0x0}:{'to':void 0x0},_0x4a47c7=_0x371db0?{'from':{'shapeId':_0x2d3c60[_0x1abd6a(0xdd)],'cxnIndex':_0x2d3c60['cxnIndex']}}:{'to':{'shapeId':_0x2d3c60['shapeId'],'cxnIndex':_0x2d3c60[_0x1abd6a(0x126)]}};_0x23981f[_0x1abd6a(0x143)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x5e9b17,'subUnitId':_0x18210d,'shapeId':_0x3c537e,'shapeData':{'relation':_0xe1a351}}}),_0x530c9a[_0x1abd6a(0x143)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x5e9b17,'subUnitId':_0x18210d,'shapeId':_0x3c537e,'shapeData':{'relation':_0x4a47c7}}});}}),{'preRedos':_0x23981f,'redos':[],'preUndos':[],'undos':_0x530c9a};}if(_0x4ee21f['id']===_univerjs_sheets_drawing[_0x1739f1(0xb8)]['id']){const {drawings:_0x189326}=_0x4ee21f[_0x1739f1(0xe3)],_0x40ef38=_0x189326[_0x1739f1(0xd2)](_0x3888e8=>_0x3888e8[_0x1739f1(0x15c)]===_univerjs_core[_0x1739f1(0x132)]['DRAWING_SHAPE']);if(_0x40ef38['length']===0x0)return{'preRedos':[],'redos':[],'preUndos':[],'undos':[]};const _0x24e1fc=[],_0x4ad29e=[];for(const _0x2fbcbc of _0x40ef38){const {unitId:_0x12c18d,subUnitId:_0x161cb9,drawingId:_0x4f115c,transform:_0x4c999a}=_0x2fbcbc;if(!_0x12c18d||!_0x161cb9||!_0x4f115c||!_0x4c999a)continue;const _0x105a2a=this[_0x1739f1(0xfd)][_0x1739f1(0xea)](_0x12c18d,_0x161cb9,_0x4f115c);if(!_0x105a2a)throw new TypeError('Fail\x20to\x20get\x20shape\x20model,\x20get:\x20'+_0x105a2a);if((0x0,_univerjs_pro_engine_shape['isConnectorShape'])(_0x105a2a[_0x1739f1(0xbf)]())){const _0x4b36a4=this[_0x1739f1(0xfd)]['getLineShapeRelation'](_0x12c18d,_0x161cb9,_0x4f115c),_0x142fc7={'from':void 0x0,'to':void 0x0};_0x4b36a4&&(_0x24e1fc[_0x1739f1(0x143)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x12c18d,'subUnitId':_0x161cb9,'shapeId':_0x4f115c,'shapeData':{'relation':_0x142fc7}}}),_0x4ad29e[_0x1739f1(0x143)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x12c18d,'subUnitId':_0x161cb9,'shapeId':_0x4f115c,'shapeData':{'relation':_0x4b36a4}}}));}else{const _0x4796be=this[_0x1739f1(0xfd)][_0x1739f1(0x105)](_0x12c18d,_0x161cb9,_0x4f115c);if(_0x4796be&&_0x4796be[_0x1739f1(0x12b)]>0x0)for(const _0x4c0f64 of _0x4796be){const _0x3831e6=_0x4c0f64[_0x1739f1(0x156)],_0x580233=_0x4c0f64['isFrom'],_0xae1c03=this['_sheetsShapeService'][_0x1739f1(0xea)](_0x12c18d,_0x161cb9,_0x3831e6);if(!_0xae1c03)continue;const _0x2756d7=_0xae1c03[_0x1739f1(0x153)](),_0x4c7308=_0xae1c03['getEndConnectInfo']();if(_0x2756d7&&_0x4c7308)this['_addLineRerouteUpdates'](_0x12c18d,_0x161cb9,_0x3831e6,_0xae1c03,_0x2756d7,_0x4c7308,_0x24e1fc,_0x4ad29e,_0x4f115c,_0x4c999a);else this[_0x1739f1(0x9b)](_0x12c18d,_0x161cb9,_0x3831e6,_0xae1c03,_0x580233?_0x2756d7:_0x4c7308,_0x580233,_0x24e1fc,_0x4ad29e,_0x4f115c,_0x4c999a);}}}return{'preRedos':[],'redos':_0x24e1fc,'preUndos':_0x4ad29e,'undos':[]};}return{'preRedos':[],'redos':[],'preUndos':[],'undos':[]};}}));}[_0x4d1f56(0xe5)](_0xe57f1e,_0x5c6063,_0xa5c9c4,_0x341a30,_0x4375d8){const _0xc3246e=_0x4d1f56;if(!_0x5c6063||!_0xa5c9c4)return null;const {shapeId:_0x6f665e,cxnIndex:_0x2de82a}=_0xe57f1e,_0xc92f73=this['_sheetsShapeService'][_0xc3246e(0xea)](_0x5c6063,_0xa5c9c4,_0x6f665e);if(!_0xc92f73)return null;const _0x5a864a=this[_0xc3246e(0x145)][_0xc3246e(0x154)]({'unitId':_0x5c6063,'subUnitId':_0xa5c9c4,'drawingId':_0x6f665e});if(!(_0x5a864a===null||_0x5a864a===void 0x0?void 0x0:_0x5a864a[_0xc3246e(0x136)]))return null;let {left:left=0x0,top:top=0x0,width:width=0x0,height:height=0x0,flipX:flipX=![],flipY:flipY=![],angle:_0x88b8e2}=_0x5a864a['transform'];if(_0x4375d8&&_0x341a30===_0x6f665e){var _0x370ed0,_0x33fe69,_0x1f8701,_0x4d45c6,_0x14139f,_0x1a501e,_0x3dadd8;left=(_0x370ed0=_0x4375d8[_0xc3246e(0xa5)])!==null&&_0x370ed0!==void 0x0?_0x370ed0:left,top=(_0x33fe69=_0x4375d8[_0xc3246e(0x135)])!==null&&_0x33fe69!==void 0x0?_0x33fe69:top,width=(_0x1f8701=_0x4375d8[_0xc3246e(0xb2)])!==null&&_0x1f8701!==void 0x0?_0x1f8701:width,height=(_0x4d45c6=_0x4375d8[_0xc3246e(0x107)])!==null&&_0x4d45c6!==void 0x0?_0x4d45c6:height,flipX=(_0x14139f=_0x4375d8['flipX'])!==null&&_0x14139f!==void 0x0?_0x14139f:flipX,flipY=(_0x1a501e=_0x4375d8['flipY'])!==null&&_0x1a501e!==void 0x0?_0x1a501e:flipY,_0x88b8e2=(_0x3dadd8=_0x4375d8[_0xc3246e(0xb9)])!==null&&_0x3dadd8!==void 0x0?_0x3dadd8:_0x88b8e2;}_0xc92f73[_0xc3246e(0xfa)]({'width':width,'height':height});const _0x35d3c1=_0xc92f73['getConnectionSiteList']()[_0xc3246e(0xff)](_0x1c2bd2=>_0x1c2bd2[_0xc3246e(0x96)]===_0x2de82a);if(!_0x35d3c1)return null;let _0xd019dd=flipX?width-_0x35d3c1['x']:_0x35d3c1['x'],_0x1e5c51=flipY?height-_0x35d3c1['y']:_0x35d3c1['y'];if(_0x88b8e2!==0x0&&_0x88b8e2!==void 0x0&&_0x88b8e2!==null){const _0x572fbc=_0x88b8e2*Math['PI']/0xb4,_0x4c5ace=Math[_0xc3246e(0x10c)](_0x572fbc),_0x1021df=Math[_0xc3246e(0x100)](_0x572fbc),_0x2b511b=width/0x2,_0x164fe1=height/0x2,_0xab7929=_0xd019dd-_0x2b511b,_0x39e5f3=_0x1e5c51-_0x164fe1;_0xd019dd=_0x2b511b+_0xab7929*_0x4c5ace-_0x39e5f3*_0x1021df,_0x1e5c51=_0x164fe1+_0xab7929*_0x1021df+_0x39e5f3*_0x4c5ace;}_0xd019dd+=left,_0x1e5c51+=top;let _0x4d567d=_0x35d3c1[_0xc3246e(0xfe)]/0xea60;if(flipX)_0x4d567d=0xb4-_0x4d567d;if(flipY)_0x4d567d=-_0x4d567d;_0x4d567d+=_0x88b8e2||0x0,_0x4d567d=(_0x4d567d%0x168+0x168)%0x168;const _0x5c4fa5=(0x0,_univerjs_pro_engine_shape[_0xc3246e(0xca)])({'left':left,'top':top,'width':width,'height':height},_0x88b8e2||0x0);return{'point':{'x':_0xd019dd,'y':_0x1e5c51},'angle':_0x4d567d,'bounds':_0x5c4fa5};}[_0x4d1f56(0x14b)](_0x5c1722,_0x2f081b,_0x3653ee,_0x455610,_0x430c7d,_0x56a13e,_0x300cc5,_0x368212,_0x383dc5,_0x398704){const _0x26d1eb=_0x4d1f56,_0x3daf45=this[_0x26d1eb(0xec)][_0x26d1eb(0x101)](_0x5c1722,_0x2f081b);if(!_0x3daf45)return;const _0x407baa=_0x455610[_0x26d1eb(0xb1)](),_0x2289d3=_0x455610[_0x26d1eb(0x13f)](),_0x95cc4c={},_0x491970={};_0x2289d3[_0x26d1eb(0x12d)](_0x23787b=>{const _0x36b056=_0x26d1eb,_0x2677e4=_0x455610[_0x36b056(0xfc)](_0x23787b);_0x491970[_0x23787b]=_0x2677e4!==null&&_0x2677e4!==void 0x0?_0x2677e4:0x0;});const _0x406443=this[_0x26d1eb(0xe5)](_0x430c7d,_0x5c1722,_0x2f081b,_0x383dc5,_0x398704),_0x573bb9=this[_0x26d1eb(0xe5)](_0x56a13e,_0x5c1722,_0x2f081b,_0x383dc5,_0x398704);if(_0x406443&&_0x573bb9){const _0x54c238=_0x455610[_0x26d1eb(0xbf)](),_0x3f2906=(0x0,_univerjs_pro_engine_shape[_0x26d1eb(0x97)])(_0x406443,_0x573bb9,_0x54c238);let _0xe51b59=_0x54c238;if(_0x3f2906){const _0x4ac4ba=(0x0,_univerjs_pro_engine_shape[_0x26d1eb(0xa4)])(_0x3f2906,_0x455610[_0x26d1eb(0xbf)]()),_0x559b2a=this['_drawingManagerService']['getDrawingData'](_0x5c1722,_0x2f081b);if(_0x559b2a&&_0x559b2a[_0x3653ee]){const _0x3b8936=_0x559b2a[_0x3653ee];_0xe51b59=_0x4ac4ba['lineType'];for(const [_0x3a1bbd,_0x22041e]of Object[_0x26d1eb(0xb6)](_0x4ac4ba[_0x26d1eb(0x129)]))_0x95cc4c[_0x3a1bbd]=_0x22041e;const _0x4bf2d4={..._0x3b8936[_0x26d1eb(0x136)],'width':_0x4ac4ba['worldRect'][_0x26d1eb(0xb2)],'height':_0x4ac4ba[_0x26d1eb(0xeb)][_0x26d1eb(0x107)],'left':_0x4ac4ba[_0x26d1eb(0xeb)][_0x26d1eb(0xa5)],'top':_0x4ac4ba[_0x26d1eb(0xeb)][_0x26d1eb(0x135)],'flipX':_0x4ac4ba[_0x26d1eb(0xeb)][_0x26d1eb(0x120)],'flipY':_0x4ac4ba[_0x26d1eb(0xeb)][_0x26d1eb(0x11c)],'angle':_0x4ac4ba[_0x26d1eb(0xcd)]},_0x421575=(0x0,_univerjs_sheets_drawing[_0x26d1eb(0xda)])(_0x4bf2d4,_0x3daf45),_0x4f24b4=(0x0,_univerjs_sheets_drawing[_0x26d1eb(0xc0)])(_0x4bf2d4,_0x3daf45),_0x4f68f4={'unitId':_0x5c1722,'subUnitId':_0x2f081b,'drawingType':_univerjs_core[_0x26d1eb(0x132)][_0x26d1eb(0x14d)],'drawingId':_0x3653ee,'transform':_0x4bf2d4,'sheetTransform':_0x421575,'axisAlignSheetTransform':_0x4f24b4},{unitId:_0x42ca10,subUnitId:_0x1dba11,undo:_0x2bc19c,redo:_0x2f87d5,objects:_0x5864a1}=this[_0x26d1eb(0x145)][_0x26d1eb(0xf8)]([_0x4f68f4]);_0x300cc5[_0x26d1eb(0x143)]({'id':_univerjs_sheets_drawing[_0x26d1eb(0xf7)]['id'],'params':{'unitId':_0x42ca10,'subUnitId':_0x1dba11,'op':_0x2f87d5,'objects':_0x5864a1,'type':_univerjs_sheets_drawing[_0x26d1eb(0x11d)][_0x26d1eb(0x151)]}}),_0x368212[_0x26d1eb(0x143)]({'id':_univerjs_sheets_drawing['SetDrawingApplyMutation']['id'],'params':{'unitId':_0x42ca10,'subUnitId':_0x1dba11,'op':_0x2bc19c,'objects':_0x5864a1,'type':_univerjs_sheets_drawing[_0x26d1eb(0x11d)][_0x26d1eb(0x151)]}});}_0x455610['removeLinePoints']();}_0x300cc5[_0x26d1eb(0x143)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x5c1722,'subUnitId':_0x2f081b,'shapeId':_0x3653ee,'shapeType':_0xe51b59,'shapeData':{'adjustValues':_0x95cc4c,'relation':_0x407baa}}}),_0x368212[_0x26d1eb(0x143)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x5c1722,'subUnitId':_0x2f081b,'shapeId':_0x3653ee,'shapeType':_0x54c238,'shapeData':{'adjustValues':_0x491970,'relation':_0x407baa}}});}}['_addLineFollowShapeUpdates'](_0x5d5517,_0x55575c,_0x5c333a,_0x22d20b,_0xad7de7,_0x1dccbf,_0x5a25d2,_0x19170b,_0x557a0d,_0xcbe3c9){const _0x16d055=_0x4d1f56;var _0x463d40;if(!_0xad7de7)return;const _0xa34ebe=this['_sheetSkeletonService']['getSkeleton'](_0x5d5517,_0x55575c);if(!_0xa34ebe)return;const _0x12c3ea=(_0x463d40=this[_0x16d055(0x145)][_0x16d055(0x154)]({'unitId':_0x5d5517,'subUnitId':_0x55575c,'drawingId':_0x557a0d}))===null||_0x463d40===void 0x0?void 0x0:_0x463d40['transform'];if(!_0x12c3ea)return;const _0x422772=_0x12c3ea['left']!==_0xcbe3c9[_0x16d055(0xa5)]||_0x12c3ea[_0x16d055(0x135)]!==_0xcbe3c9[_0x16d055(0x135)],_0x248647=_0x12c3ea[_0x16d055(0xb2)]!==_0xcbe3c9[_0x16d055(0xb2)]||_0x12c3ea[_0x16d055(0x107)]!==_0xcbe3c9[_0x16d055(0x107)],_0x195d66=_0x12c3ea[_0x16d055(0x120)]!==_0xcbe3c9[_0x16d055(0x120)]||_0x12c3ea[_0x16d055(0x11c)]!==_0xcbe3c9[_0x16d055(0x11c)],_0x5d3664=_0x12c3ea[_0x16d055(0xb9)]!==_0xcbe3c9['angle'];if(_0x422772&&!_0x248647&&!_0x195d66&&!_0x5d3664){var _0x396084,_0x1ef841,_0x40cdd7,_0x67790d;const _0x1e92e6=((_0x396084=_0xcbe3c9[_0x16d055(0xa5)])!==null&&_0x396084!==void 0x0?_0x396084:0x0)-((_0x1ef841=_0x12c3ea[_0x16d055(0xa5)])!==null&&_0x1ef841!==void 0x0?_0x1ef841:0x0),_0x21ef29=((_0x40cdd7=_0xcbe3c9[_0x16d055(0x135)])!==null&&_0x40cdd7!==void 0x0?_0x40cdd7:0x0)-((_0x67790d=_0x12c3ea[_0x16d055(0x135)])!==null&&_0x67790d!==void 0x0?_0x67790d:0x0),_0x4a93d5=this['_drawingManagerService']['getDrawingData'](_0x5d5517,_0x55575c);if(_0x4a93d5&&_0x4a93d5[_0x5c333a]){var _0x45f007,_0x10d7ce,_0x53a9c1,_0x1a15b0;const _0x333d8b=_0x4a93d5[_0x5c333a],_0xc1b17f={..._0x333d8b[_0x16d055(0x136)],'left':((_0x45f007=(_0x10d7ce=_0x333d8b[_0x16d055(0x136)])===null||_0x10d7ce===void 0x0?void 0x0:_0x10d7ce[_0x16d055(0xa5)])!==null&&_0x45f007!==void 0x0?_0x45f007:0x0)+_0x1e92e6,'top':((_0x53a9c1=(_0x1a15b0=_0x333d8b[_0x16d055(0x136)])===null||_0x1a15b0===void 0x0?void 0x0:_0x1a15b0['top'])!==null&&_0x53a9c1!==void 0x0?_0x53a9c1:0x0)+_0x21ef29},_0x332c4b=(0x0,_univerjs_sheets_drawing[_0x16d055(0xda)])(_0xc1b17f,_0xa34ebe),_0x317396=(0x0,_univerjs_sheets_drawing[_0x16d055(0xc0)])(_0xc1b17f,_0xa34ebe),_0x32ab34={'unitId':_0x5d5517,'subUnitId':_0x55575c,'drawingType':_univerjs_core[_0x16d055(0x132)][_0x16d055(0x14d)],'drawingId':_0x5c333a,'transform':_0xc1b17f,'sheetTransform':_0x332c4b,'axisAlignSheetTransform':_0x317396},{unitId:_0x60cf34,subUnitId:_0x409fac,undo:_0x43897f,redo:_0x2fc3d6,objects:_0x2139de}=this[_0x16d055(0x145)][_0x16d055(0xf8)]([_0x32ab34]);_0x5a25d2[_0x16d055(0x143)]({'id':_univerjs_sheets_drawing[_0x16d055(0xf7)]['id'],'params':{'unitId':_0x60cf34,'subUnitId':_0x409fac,'op':_0x2fc3d6,'objects':_0x2139de,'type':_univerjs_sheets_drawing[_0x16d055(0x11d)][_0x16d055(0x151)]}}),_0x19170b[_0x16d055(0x143)]({'id':_univerjs_sheets_drawing[_0x16d055(0xf7)]['id'],'params':{'unitId':_0x60cf34,'subUnitId':_0x409fac,'op':_0x43897f,'objects':_0x2139de,'type':_univerjs_sheets_drawing[_0x16d055(0x11d)][_0x16d055(0x151)]}});}}else{const _0x473633=_0x22d20b[_0x16d055(0x153)](),_0x52bcf1=_0x22d20b['getEndConnectInfo']();this['_addLineRerouteUpdates'](_0x5d5517,_0x55575c,_0x5c333a,_0x22d20b,_0x473633,_0x52bcf1,_0x5a25d2,_0x19170b,_0x557a0d,_0xcbe3c9);}}};SheetsShapeController=__decorate([__decorateParam(0x0,_univerjs_core[_0x4d1f56(0xad)]),__decorateParam(0x1,(0x0,_univerjs_core['Inject'])(_univerjs_sheets[_0x4d1f56(0x9f)])),__decorateParam(0x2,(0x0,_univerjs_core[_0x4d1f56(0xc7)])(_univerjs_sheets['SheetSkeletonService'])),__decorateParam(0x3,(0x0,_univerjs_core[_0x4d1f56(0xc7)])(SheetsShapeService)),__decorateParam(0x4,(0x0,_univerjs_core[_0x4d1f56(0xc7)])(_univerjs_drawing[_0x4d1f56(0xc1)]))],SheetsShapeController);let UniverSheetsShapePlugin=class UniverSheetsShapePlugin extends _univerjs_core['Plugin']{constructor(_0x4043b8=defaultPluginConfig,_0x533d7d,_0x2032a0,_0x4d2b53){const _0x373c06=_0x4d1f56;super(),this['_config']=_0x4043b8,this[_0x373c06(0xa1)]=_0x533d7d,this[_0x373c06(0x11e)]=_0x2032a0,this['_configService']=_0x4d2b53;const {..._0x1a7860}=(0x0,_univerjs_core[_0x373c06(0xa6)])({},defaultPluginConfig,this[_0x373c06(0xd0)]);this['_configService']['setConfig'](SHEETS_SHAPE_PLUGIN_CONFIG_KEY,_0x1a7860);}[_0x4d1f56(0xd9)](){const _0xb48ee6=_0x4d1f56,_0x1a2d5b=this[_0xb48ee6(0xa1)];[[SheetShapeModelManager],[SheetsShapeService],[SheetsShapeController]]['forEach'](_0x35c4d3=>_0x1a2d5b['add'](_0x35c4d3)),(0x0,_univerjs_core[_0xb48ee6(0x146)])(_0x1a2d5b,[[SheetsShapeService],[SheetsShapeController]]);}};_defineProperty(UniverSheetsShapePlugin,_0x4d1f56(0x110),_univerjs_core[_0x4d1f56(0xae)][_0x4d1f56(0xc2)]),_defineProperty(UniverSheetsShapePlugin,_0x4d1f56(0xf3),_0x4d1f56(0x118)),_defineProperty(UniverSheetsShapePlugin,_0x4d1f56(0x113),name),_defineProperty(UniverSheetsShapePlugin,_0x4d1f56(0xe0),version),UniverSheetsShapePlugin=__decorate([(0x0,_univerjs_core[_0x4d1f56(0x9d)])(_univerjs_pro_license[_0x4d1f56(0x106)]),__decorateParam(0x1,(0x0,_univerjs_core[_0x4d1f56(0xc7)])(_univerjs_core[_0x4d1f56(0xa2)])),__decorateParam(0x2,_univerjs_core[_0x4d1f56(0xad)]),__decorateParam(0x3,_univerjs_core[_0x4d1f56(0xab)])],UniverSheetsShapePlugin),exports['DEFAULT_SHAPE_HEIGHT']=DEFAULT_SHAPE_HEIGHT,exports['DEFAULT_SHAPE_WIDTH']=DEFAULT_SHAPE_WIDTH,exports[_0x4d1f56(0x13c)]=InsertShapeCommand,exports[_0x4d1f56(0xbe)]=InsertSheetsShapeMutation,exports['RemoveSheetsShapeMutation']=RemoveSheetsShapeMutation,exports[_0x4d1f56(0x158)]=SetShapeDrawingDataCommand,exports[_0x4d1f56(0x116)]=SetSheetsShapeRotateCommand,exports[_0x4d1f56(0x147)]=SetSheetsShapeTextVerticalToggleCommand,Object['defineProperty'](exports,_0x4d1f56(0x155),{'enumerable':!![],'get':function(){return SheetsShapeService;}}),exports[_0x4d1f56(0x123)]=ToggleSheetsShapeFlipCommand,Object['defineProperty'](exports,_0x4d1f56(0x108),{'enumerable':!![],'get':function(){return UniverSheetsShapePlugin;}}),exports[_0x4d1f56(0x12c)]=UpdateConnectorRelationCommand,exports[_0x4d1f56(0xaa)]=UpdateLineShapeResizeCommand,exports['UpdateSheetsShapeDataMutation']=UpdateSheetsShapeDataMutation,exports['UpdateSheetsShapeTypeCommand']=UpdateSheetsShapeTypeCommand,exports[_0x4d1f56(0xb3)]=UpdateSheetsShapeTypeMutation;
1
+ const _0x3add6b=_0x515c;function _0x515c(_0x1783e1,_0x30bb4f){_0x1783e1=_0x1783e1-0x14d;const _0x1fbb04=_0x1fbb();let _0x515c56=_0x1fbb04[_0x1783e1];return _0x515c56;}(function(_0x39d982,_0x10a5b3){const _0x45e1f1=_0x515c,_0x542b86=_0x39d982();while(!![]){try{const _0x441136=-parseInt(_0x45e1f1(0x20c))/0x1*(parseInt(_0x45e1f1(0x21a))/0x2)+parseInt(_0x45e1f1(0x204))/0x3*(parseInt(_0x45e1f1(0x20b))/0x4)+-parseInt(_0x45e1f1(0x210))/0x5+-parseInt(_0x45e1f1(0x17e))/0x6*(-parseInt(_0x45e1f1(0x1fc))/0x7)+-parseInt(_0x45e1f1(0x1ca))/0x8*(-parseInt(_0x45e1f1(0x18a))/0x9)+-parseInt(_0x45e1f1(0x1dd))/0xa+-parseInt(_0x45e1f1(0x216))/0xb*(-parseInt(_0x45e1f1(0x14e))/0xc);if(_0x441136===_0x10a5b3)break;else _0x542b86['push'](_0x542b86['shift']());}catch(_0x115f61){_0x542b86['push'](_0x542b86['shift']());}}}(_0x1fbb,0x41ca5),Object[_0x3add6b(0x206)](exports,Symbol[_0x3add6b(0x211)],{'value':'Module'}));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(_0x4552a8){'@babel/helpers - typeof';const _0x1bedb8=_0x3add6b;return _typeof='function'==typeof Symbol&&_0x1bedb8(0x15c)==typeof Symbol[_0x1bedb8(0x170)]?function(_0x478f75){return typeof _0x478f75;}:function(_0x3c6d58){const _0x5a2b4a=_0x1bedb8;return _0x3c6d58&&_0x5a2b4a(0x1d9)==typeof Symbol&&_0x3c6d58['constructor']===Symbol&&_0x3c6d58!==Symbol[_0x5a2b4a(0x16f)]?_0x5a2b4a(0x15c):typeof _0x3c6d58;},_typeof(_0x4552a8);}function toPrimitive(_0x524531,_0x391816){const _0x2a6cd1=_0x3add6b;if('object'!=_typeof(_0x524531)||!_0x524531)return _0x524531;var _0x48bede=_0x524531[Symbol[_0x2a6cd1(0x164)]];if(void 0x0!==_0x48bede){var _0x3da6bd=_0x48bede[_0x2a6cd1(0x1bc)](_0x524531,_0x391816||_0x2a6cd1(0x19e));if(_0x2a6cd1(0x1c9)!=_typeof(_0x3da6bd))return _0x3da6bd;throw new TypeError(_0x2a6cd1(0x1d0));}return(_0x2a6cd1(0x1fa)===_0x391816?String:Number)(_0x524531);}function toPropertyKey(_0x72190e){const _0x2e99dd=_0x3add6b;var _0x57dda6=toPrimitive(_0x72190e,_0x2e99dd(0x1fa));return _0x2e99dd(0x15c)==_typeof(_0x57dda6)?_0x57dda6:_0x57dda6+'';}function _defineProperty(_0x29139b,_0x55b84d,_0x42b639){const _0x20c2e1=_0x3add6b;return(_0x55b84d=toPropertyKey(_0x55b84d))in _0x29139b?Object[_0x20c2e1(0x206)](_0x29139b,_0x55b84d,{'value':_0x42b639,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x29139b[_0x55b84d]=_0x42b639,_0x29139b;}var SheetShapeModelManager=class extends _univerjs_core['Disposable']{constructor(){const _0xdfa5ed=_0x3add6b;super(),_defineProperty(this,_0xdfa5ed(0x18f),new Map()),_defineProperty(this,'_linesIds',new Set()),_defineProperty(this,_0xdfa5ed(0x1d4),new Set());}['addShape'](_0x179f34,_0x30c021,_0x1d51b){const _0x405d22=_0x3add6b,_0x57f8f1=new _univerjs_pro_engine_shape[(_0x405d22(0x1e4))](_0x179f34,_0x30c021,_0x1d51b);this['_shapes'][_0x405d22(0x20f)](_0x30c021,_0x57f8f1);if((0x0,_univerjs_pro_engine_shape[_0x405d22(0x1cb)])(_0x179f34))this[_0x405d22(0x158)][_0x405d22(0x1c2)](_0x30c021);return _0x57f8f1;}[_0x3add6b(0x15d)](_0x48b0f3){const _0x35f700=_0x3add6b,_0x1f322d=[];for(const _0x32c3b0 of this['_linesIds']){const _0x5e9ade=this[_0x35f700(0x18f)]['get'](_0x32c3b0);if(_0x5e9ade){const _0x40da0a=_0x5e9ade['getShapeRelation']();if(_0x40da0a){var _0x4fd44a,_0x43745a;if(((_0x4fd44a=_0x40da0a[_0x35f700(0x1ff)])===null||_0x4fd44a===void 0x0?void 0x0:_0x4fd44a[_0x35f700(0x1e7)])===_0x48b0f3)_0x1f322d[_0x35f700(0x182)]({..._0x40da0a['from'],'lineShapeId':_0x32c3b0,'isFrom':!![]});if(((_0x43745a=_0x40da0a['to'])===null||_0x43745a===void 0x0?void 0x0:_0x43745a[_0x35f700(0x1e7)])===_0x48b0f3)_0x1f322d[_0x35f700(0x182)]({..._0x40da0a['to'],'lineShapeId':_0x32c3b0,'isFrom':![]});}}}return _0x1f322d;}[_0x3add6b(0x215)](_0x152108){const _0x1837f7=_0x3add6b,_0x46cf12=this[_0x1837f7(0x18f)][_0x1837f7(0x19c)](_0x152108);if(_0x46cf12)return _0x46cf12[_0x1837f7(0x1b2)]();}['getShapeType'](_0x166c32){const _0x380e9d=_0x3add6b,_0x3c7740=this['_shapes'][_0x380e9d(0x19c)](_0x166c32);if(_0x3c7740)return _0x3c7740[_0x380e9d(0x1a9)]();}['hasShape'](_0x40e4d6){const _0x12497a=_0x3add6b;return this[_0x12497a(0x18f)]['has'](_0x40e4d6);}[_0x3add6b(0x1a6)](_0x44bec0){const _0x1e427b=_0x3add6b,_0xe07692=this['_shapes']['get'](_0x44bec0);if(!_0xe07692)return;if((0x0,_univerjs_pro_engine_shape[_0x1e427b(0x1cb)])(_0xe07692[_0x1e427b(0x1a9)]()))this['_linesIds'][_0x1e427b(0x1e5)](_0x44bec0);this[_0x1e427b(0x18f)][_0x1e427b(0x1e5)](_0x44bec0);}['toJSON'](){const _0x55b425=_0x3add6b,_0x3cc2d5=[];return this[_0x55b425(0x18f)]['forEach'](_0x1576ed=>{const _0x293674=_0x55b425;_0x3cc2d5[_0x293674(0x182)](_0x1576ed[_0x293674(0x213)]());}),_0x3cc2d5;}['fromJSON'](_0x39478c){const _0x36ae6a=_0x3add6b;for(const _0x28619e of _0x39478c){const {id:_0x1b111c,shapeType:_0x4fb1da}=_0x28619e,_0x2bc737=this[_0x36ae6a(0x1c1)](_0x4fb1da,_0x1b111c,_0x28619e['shapeData']);if(_0x2bc737&&_0x2bc737[_0x36ae6a(0x17f)]())this[_0x36ae6a(0x158)][_0x36ae6a(0x1c2)](_0x1b111c);}}['dispose'](){const _0x143911=_0x3add6b;if(this[_0x143911(0x191)])return;this[_0x143911(0x18f)][_0x143911(0x1b3)](_0x1b221c=>{_0x1b221c['dispose']();}),this[_0x143911(0x18f)][_0x143911(0x1eb)](),this[_0x143911(0x158)][_0x143911(0x1eb)](),this[_0x143911(0x1d4)][_0x143911(0x1eb)](),super[_0x143911(0x217)]();}};function __decorateParam(_0x4a7522,_0x447277){return function(_0x5d381a,_0x3267f5){_0x447277(_0x5d381a,_0x3267f5,_0x4a7522);};}function __decorate(_0x42ed50,_0x54322a,_0x4da069,_0x2fd08d){const _0x2c2462=_0x3add6b;var _0x3399a1=arguments[_0x2c2462(0x16b)],_0x22d0d1=_0x3399a1<0x3?_0x54322a:_0x2fd08d===null?_0x2fd08d=Object[_0x2c2462(0x1f9)](_0x54322a,_0x4da069):_0x2fd08d,_0x32a7a0;if(typeof Reflect===_0x2c2462(0x1c9)&&typeof Reflect['decorate']===_0x2c2462(0x1d9))_0x22d0d1=Reflect[_0x2c2462(0x19f)](_0x42ed50,_0x54322a,_0x4da069,_0x2fd08d);else{for(var _0x53364a=_0x42ed50['length']-0x1;_0x53364a>=0x0;_0x53364a--)if(_0x32a7a0=_0x42ed50[_0x53364a])_0x22d0d1=(_0x3399a1<0x3?_0x32a7a0(_0x22d0d1):_0x3399a1>0x3?_0x32a7a0(_0x54322a,_0x4da069,_0x22d0d1):_0x32a7a0(_0x54322a,_0x4da069))||_0x22d0d1;}return _0x3399a1>0x3&&_0x22d0d1&&Object['defineProperty'](_0x54322a,_0x4da069,_0x22d0d1),_0x22d0d1;}const SHEET_SHAPE_PLUGIN=_0x3add6b(0x19b);function _0x1fbb(){const _0x1f5ddd=['SetSheetDrawingCommand','parse','2XjXftc','getEndConnectInfo','12WYYOqo','preRedos','getBasicShapeRotateBound','INSERT','getShapeTextData','left','_drawingManagerService','CommandType','_initCommands','pushUndoRedo','_linesIds','getDrawingByParam','filter','fromJSON','symbol','getBasicShapeRelation','width','sheet.command.insert-shape','_getConnectPointInfo','relation','getSheetCommandTarget','type','toPrimitive','IConfigService','DrawingTypeEnum','preUndos','pluginName','getAdjustValueByName','keys','length','lineShapeId','getStartConnectInfo','IDrawingManagerService','prototype','iterator','SetSheetsShapeTextVerticalToggleCommand','IUndoRedoService','sheet.command.update-connector-relation','DRAWING_SHAPE','onStarting','Inject','ensureSkeleton','packageName','IResourceManagerService','sheet.mutation.insert-shape','_resourcesManagerService','angle','getShapeModel','14754LgSdze','isLineShape','sheet.mutation.update-shape-type','DEFAULT_SHAPE_HEIGHT','push','resizeEnabled','getShapeDataById','hasShape','getShapeData','sin','ISheetDrawingService','sheet.command.set-shape-text-vertical-toggle','9xPBlYH','startX','sheet.command.set-shape-rotate','getDrawingData','borderEnabled','_shapes','InsertShapeCommand','_disposed','ToggleSheetsShapeFlipCommand','_commandService','_sheetsShapeService','assign','worldRect','data','sheets-shape.config','fill','_initSnapshot','SHEET_SHAPE_PLUGIN','get','getBasicShapeType','default','decorate','InsertSheetDrawingCommand','sheet.mutation.update-shape-data','SheetInterceptorService','_deserializeShapeForUnit','_injector','flipX','removeShape','sheet.command.update-shape-type','DEFAULT_SHAPE_WIDTH','getShapeType','height','setShapeData','UpdateSheetsShapeTypeMutation','updateContext','position','getCellIndexAndOffsetByPosition','Injector','getSkeleton','getShapeRelation','forEach','entries','ICommandService','UPDATE','every','UNIVER_SHEET','_sheetSkeletonService','disposeWithMe','onCommandExecute','call','_addLineFollowShapeUpdates','MUTATION','Plugin','generateRandomId','addShape','add','sequenceExecute','ClearSheetDrawingTransformerOperation','registerPluginResource','_addLineRerouteUpdates','UpdateLineShapeResizeCommand','syncExecuteCommand','object','2001176VpPOiA','isConnectorShape','UpdateSheetsShapeTypeCommand','transform','adjustValues','routeConnectorLineShape','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','setConfig','SetDrawingApplyMutation','touchDependencies','_groupIds','interceptCommand','sheet.command.set-shape-drawing-data','SetSheetsShapeRotateCommand','UpdateSheetsShapeDataMutation','function','transformToDrawingPosition','Fail\x20to\x20get\x20shape\x20model,\x20get:\x20','setShapeType','1574580teGlIz','rotateEnabled','UpdateConnectorRelationCommand','SetShapeDrawingDataCommand','version','_shapeModelManagerMap','rotation','ShapeModel','delete','COMMAND','shapeId','@univerjs-pro/sheets-shape','top','insertShape','clear','RemoveSheetsShapeMutation','lineType','IUniverInstanceService','cxnIndex','stringify','cos','flipY','_initCommandInterceptor','removeLinePoints','params','_configService','drawingType','isFrom','getOwnPropertyDescriptor','string','find','861KuBPnD','_sheetInterceptorService','undos','from','getBatchUpdateOp','redos','DrawingApplyType','computeConnectorRouteLayout','246153lNnDDh','transformToAxisAlignPosition','defineProperty','RemoveSheetDrawingCommand','getAdjustNames','_ensureShapeModelManager','index','8AOFLCj','484548JexQoQ','SheetSkeletonService','isHorizontal','set','1491720Elhzah','toStringTag','result','toJSON','InsertSheetsShapeMutation','getLineShapeRelation','5424331aEbFyR','dispose'];_0x1fbb=function(){return _0x1f5ddd;};return _0x1fbb();}let SheetsShapeService=class SheetsShapeService extends _univerjs_core['Disposable']{constructor(_0x10daca){const _0x4dd9b6=_0x3add6b;super(),this[_0x4dd9b6(0x17b)]=_0x10daca,_defineProperty(this,'_shapeModelManagerMap',new Map()),this[_0x4dd9b6(0x19a)]();}[_0x3add6b(0x209)](_0x447d74,_0x16aedb){const _0x560051=_0x3add6b;let _0x42e18f=this[_0x560051(0x1e2)][_0x560051(0x19c)](_0x447d74);!_0x42e18f&&(_0x42e18f=new Map(),this[_0x560051(0x1e2)][_0x560051(0x20f)](_0x447d74,_0x42e18f));let _0x428d4c=_0x42e18f['get'](_0x16aedb);return!_0x428d4c&&(_0x428d4c=new SheetShapeModelManager(),_0x42e18f[_0x560051(0x20f)](_0x16aedb,_0x428d4c)),_0x428d4c;}['insertShape'](_0xb6bc37,_0x4d9b67,_0x49d0cc,_0x33ba1d,_0x35ee98){const _0x2f8945=_0x3add6b;this[_0x2f8945(0x209)](_0xb6bc37,_0x4d9b67)['addShape'](_0x49d0cc,_0x33ba1d,_0x35ee98);}[_0x3add6b(0x1a6)](_0x566f5e,_0x2605df,_0x38e4ab){const _0x52ae82=_0x3add6b;this[_0x52ae82(0x209)](_0x566f5e,_0x2605df)['removeShape'](_0x38e4ab);}[_0x3add6b(0x19d)](_0x2aaab2,_0x2c136b,_0x42d6f4){const _0x19e2c4=_0x3add6b;return this['_ensureShapeModelManager'](_0x2aaab2,_0x2c136b)[_0x19e2c4(0x1a9)](_0x42d6f4);}['getShapeType'](_0xfb7c2d,_0x437087,_0x18d4b3){const _0x2a05be=_0x3add6b;return this[_0x2a05be(0x209)](_0xfb7c2d,_0x437087)['getShapeType'](_0x18d4b3);}[_0x3add6b(0x185)](_0x37cb81,_0x55512d,_0x19e6bd){const _0xa854a2=_0x3add6b;return this[_0xa854a2(0x209)](_0x37cb81,_0x55512d)[_0xa854a2(0x185)](_0x19e6bd);}['getShapeTypeById'](_0x2b69d5,_0x180fb4,_0x17b646){const _0x371a18=_0x3add6b;return this[_0x371a18(0x209)](_0x2b69d5,_0x180fb4)[_0x371a18(0x1a9)](_0x17b646);}[_0x3add6b(0x184)](_0x1077a1,_0x59aea2,_0x1e8177){const _0x23639d=_0x3add6b,_0x53a1e1=this[_0x23639d(0x209)](_0x1077a1,_0x59aea2);if(!_0x53a1e1['getShapeType'](_0x1e8177))return;const _0x236250=_0x53a1e1[_0x23639d(0x18f)][_0x23639d(0x19c)](_0x1e8177);if(!_0x236250)return;return _0x236250[_0x23639d(0x186)]();}[_0x3add6b(0x17d)](_0x40c8f6,_0x58061f,_0x47ad5f){const _0x26fdc2=_0x3add6b;return this[_0x26fdc2(0x209)](_0x40c8f6,_0x58061f)[_0x26fdc2(0x18f)][_0x26fdc2(0x19c)](_0x47ad5f);}[_0x3add6b(0x15d)](_0x54516b,_0x39f55f,_0x265f9b){const _0x4c62c9=_0x3add6b;return this[_0x4c62c9(0x209)](_0x54516b,_0x39f55f)['getBasicShapeRelation'](_0x265f9b);}['getLineShapeRelation'](_0x883bc2,_0x54ae59,_0x1f26a8){const _0x4c20ed=_0x3add6b,_0x90c4d7=this[_0x4c20ed(0x209)](_0x883bc2,_0x54ae59)[_0x4c20ed(0x18f)][_0x4c20ed(0x19c)](_0x1f26a8);if(!_0x90c4d7)return;return _0x90c4d7[_0x4c20ed(0x1b2)]();}[_0x3add6b(0x1dc)](){}['_serializeShapeForUnit'](_0x46df8f){const _0x24cdc3=_0x3add6b,_0x3d279a={},_0x2424b4=this[_0x24cdc3(0x1e2)]['get'](_0x46df8f);if(_0x2424b4)_0x2424b4['forEach']((_0xeaab7e,_0x329272)=>{const _0x5b5c0e=_0x24cdc3,_0x599e80=_0xeaab7e[_0x5b5c0e(0x213)]();if(_0x599e80[_0x5b5c0e(0x16b)]>0x0)_0x3d279a[_0x329272]=_0x599e80;});return JSON[_0x24cdc3(0x1f0)](_0x3d279a);}[_0x3add6b(0x1a3)](_0x261d9c,_0x1fac7b){const _0x1d7732=_0x3add6b;Object['keys'](_0x1fac7b)[_0x1d7732(0x1b3)](_0x32c9f3=>{const _0x3f19e4=_0x1d7732;this[_0x3f19e4(0x209)](_0x261d9c,_0x32c9f3)[_0x3f19e4(0x15b)](_0x1fac7b[_0x32c9f3]);});}[_0x3add6b(0x213)](){const _0x2f93f5=_0x3add6b,_0x4cc517={};return this[_0x2f93f5(0x1e2)][_0x2f93f5(0x1b3)]((_0x37b64f,_0x2b42fa)=>{_0x4cc517[_0x2b42fa]={},_0x37b64f['forEach']((_0x39247c,_0x296822)=>{const _0x1e3920=_0x515c;_0x4cc517[_0x2b42fa][_0x296822]=_0x39247c[_0x1e3920(0x213)]();});}),_0x4cc517;}[_0x3add6b(0x15b)](_0x3629a1){const _0x386335=_0x3add6b;Object[_0x386335(0x16a)](_0x3629a1)[_0x386335(0x1b3)](_0x32312e=>{const _0x37256e=_0x386335,_0x5af6d5=_0x3629a1[_0x32312e];Object['keys'](_0x5af6d5)[_0x37256e(0x1b3)](_0x2f998a=>{const _0x15a79e=_0x37256e;this[_0x15a79e(0x209)](_0x32312e,_0x2f998a)[_0x15a79e(0x15b)](_0x5af6d5[_0x2f998a]);});});}['_initSnapshot'](){const _0x2506a3=_0x3add6b;this[_0x2506a3(0x17b)][_0x2506a3(0x1c5)]({'pluginName':SHEET_SHAPE_PLUGIN,'businesses':[_univerjs_core['UniverInstanceType'][_0x2506a3(0x1b8)]],'toJson':_0x260bda=>this['_serializeShapeForUnit'](_0x260bda),'parseJson':_0x3680d1=>JSON[_0x2506a3(0x219)](_0x3680d1),'onLoad':(_0x47ed93,_0x1d94b0)=>{const _0x2184c1=_0x2506a3;this[_0x2184c1(0x1a3)](_0x47ed93,_0x1d94b0);},'onUnLoad':_0x25f1d0=>{const _0x170795=_0x2506a3,_0x1cb54e=this[_0x170795(0x1e2)]['get'](_0x25f1d0);_0x1cb54e&&(_0x1cb54e[_0x170795(0x1b3)](_0xb7be1a=>{const _0x51150d=_0x170795;_0xb7be1a[_0x51150d(0x217)]();}),this[_0x170795(0x1e2)][_0x170795(0x1e5)](_0x25f1d0));}});}[_0x3add6b(0x217)](){const _0x5d390d=_0x3add6b;this['_shapeModelManagerMap'][_0x5d390d(0x1b3)](_0x43d096=>{const _0xee28d2=_0x5d390d;_0x43d096[_0xee28d2(0x1b3)](_0x143a34=>{const _0x399910=_0xee28d2;_0x143a34[_0x399910(0x217)]();});});}};SheetsShapeService=__decorate([__decorateParam(0x0,_univerjs_core[_0x3add6b(0x179)])],SheetsShapeService);const InsertSheetsShapeMutation={'id':_0x3add6b(0x17a),'type':_univerjs_core['CommandType'][_0x3add6b(0x1be)],'handler':(_0x3dd8d9,_0x137825)=>{const _0x565d15=_0x3add6b,{unitId:_0x2e9763,subUnitId:_0x40cdea,shapeType:_0x1566f8,shapeId:_0x2510d6,shapeData:_0x39b469}=_0x137825;return _0x3dd8d9['get'](SheetsShapeService)[_0x565d15(0x1ea)](_0x2e9763,_0x40cdea,_0x1566f8,_0x2510d6,_0x39b469),!![];}},RemoveSheetsShapeMutation={'id':'sheet.mutation.remove-shape','type':_univerjs_core['CommandType']['MUTATION'],'handler':(_0x4fd5fb,_0x1f3209)=>{const _0x5694ce=_0x3add6b,{unitId:_0x218f93,subUnitId:_0xa3df73,shapeId:_0x1852d3}=_0x1f3209;return _0x4fd5fb['get'](SheetsShapeService)[_0x5694ce(0x1a6)](_0x218f93,_0xa3df73,_0x1852d3),!![];}},InsertShapeCommand={'type':_univerjs_core[_0x3add6b(0x155)][_0x3add6b(0x1e6)],'id':_0x3add6b(0x15f),'handler':(_0x1075ac,_0x4e0199)=>{const _0x25139d=_0x3add6b;var _0x5943e7,_0x5c0d49;const _0xe8b1b1=(0x0,_univerjs_sheets['getSheetCommandTarget'])(_0x1075ac['get'](_univerjs_core[_0x25139d(0x1ee)]),_0x4e0199);if(!_0xe8b1b1)return![];const _0x44c275=_0x1075ac[_0x25139d(0x19c)](_univerjs_sheets[_0x25139d(0x20d)]),{unitId:_0x803189,subUnitId:_0x1638b2}=_0xe8b1b1,_0x3dcf01=_0x44c275['ensureSkeleton'](_0x803189,_0x1638b2);if(!_0x3dcf01)return![];const _0x1e82b4=_0x1075ac['get'](_univerjs_core[_0x25139d(0x1b5)]),_0x2e954b=_0x1075ac[_0x25139d(0x19c)](_univerjs_core[_0x25139d(0x172)]),_0xcad110=_0x1075ac[_0x25139d(0x19c)](_univerjs_sheets[_0x25139d(0x1a2)]),_0x518079=_0x1075ac[_0x25139d(0x19c)](_univerjs_sheets_drawing[_0x25139d(0x188)]),{shapeType:_0x76ad2d,shapeData:_0x57fe84}=_0x4e0199,_0x5d96c7=_0x4e0199[_0x25139d(0x1e7)]||(0x0,_univerjs_core[_0x25139d(0x1c0)])(),_0x45342c={'unitId':_0x803189,'subUnitId':_0x1638b2,'shapeId':_0x5d96c7,'shapeType':_0x76ad2d,'shapeData':_0x57fe84},_0x3f99af=_0x4e0199['width']||0xc8,_0x27d036=_0x4e0199[_0x25139d(0x1aa)]||0xc8;let _0x464559=0x0,_0x11c4a6=0x0,_0x521601={'row':0x0,'rowOffset':0x0,'column':0x0,'columnOffset':0x0},_0x5a9569={'row':0x0,'rowOffset':0x0,'column':0x0,'columnOffset':0x0};if(_0x4e0199[_0x25139d(0x1ae)]){const {x:_0x35d79a,y:_0x13d615}=_0x4e0199[_0x25139d(0x1ae)];_0x464559=_0x35d79a,_0x11c4a6=_0x13d615,_0x521601=_0x3dcf01[_0x25139d(0x1af)](_0x35d79a,_0x13d615),_0x5a9569=_0x3dcf01[_0x25139d(0x1af)](_0x35d79a+_0x3f99af,_0x13d615+_0x27d036);}else{if(_0x4e0199['range']){const {startRow:_0x52aec8,startColumn:_0x449241}=_0x4e0199['range'],_0x254764=0xa,_0x1b465f=0xa;_0x521601={'row':_0x52aec8,'rowOffset':_0x254764,'column':_0x449241,'columnOffset':_0x1b465f};const _0x391c3c=_0x3dcf01['getCellWithCoordByIndex'](_0x52aec8,_0x449241);_0x464559=_0x391c3c[_0x25139d(0x18b)]+_0x1b465f,_0x11c4a6=_0x391c3c['startY']+_0x254764,_0x5a9569=_0x3dcf01[_0x25139d(0x1af)](_0x464559+_0x3f99af,_0x11c4a6+_0x27d036);}}const _0xaa0d8e={'from':_0x521601,'to':_0x5a9569},_0x557b14={'unitId':_0x803189,'subUnitId':_0x1638b2,'drawingId':_0x5d96c7,'drawingType':_univerjs_core[_0x25139d(0x166)]['DRAWING_SHAPE'],'sheetTransform':_0xaa0d8e,'transform':{'left':_0x464559,'top':_0x11c4a6,'width':_0x3f99af,'height':_0x27d036},'data':{'shapeType':_0x76ad2d,'shapeData':_0x57fe84},'axisAlignSheetTransform':_0xaa0d8e,'allowTransform':!![]};(0x0,_univerjs_pro_engine_shape[_0x25139d(0x1cb)])(_0x76ad2d)&&(_0x557b14[_0x25139d(0x197)][_0x25139d(0x199)]=![],_0x557b14[_0x25139d(0x197)][_0x25139d(0x1de)]=![],_0x557b14[_0x25139d(0x197)][_0x25139d(0x183)]=![],_0x557b14['data'][_0x25139d(0x18e)]=![],_0x557b14[_0x25139d(0x1cd)][_0x25139d(0x1de)]=![],_0x557b14[_0x25139d(0x1cd)][_0x25139d(0x183)]=![],_0x557b14[_0x25139d(0x1cd)]['borderEnabled']=![]);const {undo:_0x403a0d,redo:_0x572c00,objects:_0x57c231}=_0x518079['getBatchAddOp']([_0x557b14]),_0x585f99=_0xcad110[_0x25139d(0x1bb)]({'id':_univerjs_sheets_drawing[_0x25139d(0x1a0)]['id'],'params':{'unitId':_0x803189,'drawings':[_0x557b14]}}),_0x617d1e=[...(_0x5943e7=_0x585f99[_0x25139d(0x14f)])!==null&&_0x5943e7!==void 0x0?_0x5943e7:[],{'id':_univerjs_sheets_drawing[_0x25139d(0x1d2)]['id'],'params':{'unitId':_0x803189,'subUnitId':_0x1638b2,'op':_0x572c00,'objects':_0x57c231,'type':_univerjs_sheets_drawing['DrawingApplyType'][_0x25139d(0x151)]}},{'id':_univerjs_sheets_drawing[_0x25139d(0x1c4)]['id'],'params':[_0x803189]},..._0x585f99[_0x25139d(0x201)],{'id':InsertSheetsShapeMutation['id'],'params':_0x45342c}],_0x704694=[{'id':RemoveSheetsShapeMutation['id'],'params':{'unitId':_0x803189,'subUnitId':_0x1638b2,'shapeId':_0x5d96c7}},...(_0x5c0d49=_0x585f99[_0x25139d(0x167)])!==null&&_0x5c0d49!==void 0x0?_0x5c0d49:[],{'id':_univerjs_sheets_drawing[_0x25139d(0x1d2)]['id'],'params':{'unitId':_0x803189,'subUnitId':_0x1638b2,'op':_0x403a0d,'objects':_0x57c231,'type':_univerjs_sheets_drawing[_0x25139d(0x202)]['REMOVE']}},{'id':_univerjs_sheets_drawing[_0x25139d(0x1c4)]['id'],'params':[_0x803189]},..._0x585f99[_0x25139d(0x1fe)]];if((0x0,_univerjs_core[_0x25139d(0x1c3)])(_0x617d1e,_0x1e82b4)[_0x25139d(0x212)])return _0x2e954b[_0x25139d(0x157)]({'unitID':_0x803189,'undoMutations':_0x704694,'redoMutations':_0x617d1e}),!![];return![];}},UpdateSheetsShapeDataMutation={'id':_0x3add6b(0x1a1),'type':_univerjs_core[_0x3add6b(0x155)]['MUTATION'],'handler':(_0x4fc26b,_0x4769e1)=>{const _0x53330a=_0x3add6b,{unitId:_0x9e38fd,subUnitId:_0x297683,shapeType:_0x3a7c52,shapeId:_0x5bd03a,shapeData:_0x39d502}=_0x4769e1,_0x2c7596=_0x4fc26b[_0x53330a(0x19c)](SheetsShapeService)[_0x53330a(0x17d)](_0x9e38fd,_0x297683,_0x5bd03a);if(_0x2c7596){if(_0x3a7c52!==void 0x0)_0x2c7596[_0x53330a(0x1dc)](_0x3a7c52);if(_0x39d502)_0x2c7596===null||_0x2c7596===void 0x0||_0x2c7596[_0x53330a(0x1ab)](_0x39d502,!![]);}return!![];}},SetShapeDrawingDataCommand={'type':_univerjs_core[_0x3add6b(0x155)][_0x3add6b(0x1e6)],'id':_0x3add6b(0x1d6),'handler':(_0x3ec429,_0x2c4c68)=>{const _0x5f1e09=_0x3add6b;var _0xbe11a3,_0x162aa1;const _0x1dd586=(0x0,_univerjs_sheets[_0x5f1e09(0x162)])(_0x3ec429[_0x5f1e09(0x19c)](_univerjs_core['IUniverInstanceService']),_0x2c4c68);if(!_0x1dd586)return![];const _0x4c57af=_0x3ec429[_0x5f1e09(0x19c)](_univerjs_sheets[_0x5f1e09(0x20d)]),{unitId:_0x303849,subUnitId:_0x5688da}=_0x1dd586,_0xfd261d=_0x4c57af[_0x5f1e09(0x177)](_0x303849,_0x5688da);if(!_0xfd261d)return![];const _0x52688a=_0x3ec429[_0x5f1e09(0x19c)](SheetsShapeService),{shapeId:_0x3968a0,shapeType:_0x5928ed,shapeData:_0x27fd15,position:_0x1ef527,width:_0x1833dd,height:_0x350822}=_0x2c4c68,_0xb7e162=_0x52688a[_0x5f1e09(0x17d)](_0x303849,_0x5688da,_0x3968a0);if(!_0xb7e162)return![];const _0x197695=_0x3ec429['get'](_univerjs_core['ICommandService']),_0x471c14=_0x3ec429[_0x5f1e09(0x19c)](_univerjs_core[_0x5f1e09(0x172)]),_0x4c84e0=_0x3ec429[_0x5f1e09(0x19c)](_univerjs_sheets[_0x5f1e09(0x1a2)]),_0x394d02=_0x3ec429[_0x5f1e09(0x19c)](_univerjs_sheets_drawing[_0x5f1e09(0x188)]),_0x41522d={'unitId':_0x303849,'subUnitId':_0x5688da,'shapeId':_0x3968a0,'shapeType':_0x5928ed,'shapeData':_0x27fd15},_0x2ea2a9=_0xb7e162[_0x5f1e09(0x1a9)](),_0x133493=_0xb7e162[_0x5f1e09(0x186)](),{x:_0x4152c6,y:_0x7ca03d}=_0x1ef527,_0x20525b={'from':_0xfd261d['getCellIndexAndOffsetByPosition'](_0x4152c6,_0x7ca03d),'to':_0xfd261d[_0x5f1e09(0x1af)](_0x4152c6+_0x1833dd,_0x7ca03d+_0x350822)},_0x1d2fdf={'unitId':_0x303849,'subUnitId':_0x5688da,'drawingId':_0x3968a0,'drawingType':_univerjs_core[_0x5f1e09(0x166)][_0x5f1e09(0x174)],'sheetTransform':_0x20525b,'transform':{'left':_0x4152c6,'top':_0x7ca03d,'width':_0x1833dd,'height':_0x350822},'data':{'shapeType':_0x5928ed,'shapeData':_0x27fd15},'axisAlignSheetTransform':_0x20525b,'allowTransform':!![]};(0x0,_univerjs_pro_engine_shape[_0x5f1e09(0x1cb)])(_0x5928ed)&&(_0x1d2fdf[_0x5f1e09(0x197)][_0x5f1e09(0x199)]=![],_0x1d2fdf[_0x5f1e09(0x197)]['rotateEnabled']=![],_0x1d2fdf[_0x5f1e09(0x197)][_0x5f1e09(0x183)]=![],_0x1d2fdf['data'][_0x5f1e09(0x18e)]=![],_0x1d2fdf[_0x5f1e09(0x1cd)][_0x5f1e09(0x1de)]=![],_0x1d2fdf[_0x5f1e09(0x1cd)][_0x5f1e09(0x183)]=![],_0x1d2fdf[_0x5f1e09(0x1cd)][_0x5f1e09(0x18e)]=![]);const {undo:_0x2e6ad3,redo:_0x40db2c,objects:_0x5c8b10}=_0x394d02['getBatchUpdateOp']([_0x1d2fdf]),_0x2e0549=_0x4c84e0['onCommandExecute']({'id':_univerjs_sheets_drawing['SetSheetDrawingCommand']['id'],'params':{'unitId':_0x303849,'drawings':[_0x1d2fdf]}}),_0xa7d8f8=[...(_0xbe11a3=_0x2e0549['preRedos'])!==null&&_0xbe11a3!==void 0x0?_0xbe11a3:[],{'id':_univerjs_sheets_drawing[_0x5f1e09(0x1d2)]['id'],'params':{'unitId':_0x303849,'subUnitId':_0x5688da,'op':_0x40db2c,'objects':_0x5c8b10,'type':_univerjs_sheets_drawing['DrawingApplyType'][_0x5f1e09(0x1b6)]}},{'id':_univerjs_sheets_drawing['ClearSheetDrawingTransformerOperation']['id'],'params':[_0x303849]},..._0x2e0549['redos'],{'id':UpdateSheetsShapeDataMutation['id'],'params':_0x41522d}],_0x3c9f45=[...(_0x162aa1=_0x2e0549[_0x5f1e09(0x167)])!==null&&_0x162aa1!==void 0x0?_0x162aa1:[],{'id':_univerjs_sheets_drawing['SetDrawingApplyMutation']['id'],'params':{'unitId':_0x303849,'subUnitId':_0x5688da,'op':_0x2e6ad3,'objects':_0x5c8b10,'type':_univerjs_sheets_drawing[_0x5f1e09(0x202)][_0x5f1e09(0x1b6)]}},{'id':_univerjs_sheets_drawing['ClearSheetDrawingTransformerOperation']['id'],'params':[_0x303849]},..._0x2e0549[_0x5f1e09(0x1fe)],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x303849,'subUnitId':_0x5688da,'shapeType':_0x2ea2a9,'shapeId':_0x3968a0,'shapeData':_0x133493}}];if((0x0,_univerjs_core[_0x5f1e09(0x1c3)])(_0xa7d8f8,_0x197695)[_0x5f1e09(0x212)])return _0x471c14[_0x5f1e09(0x157)]({'unitID':_0x303849,'undoMutations':_0x3c9f45,'redoMutations':_0xa7d8f8}),!![];return![];}},ToggleSheetsShapeFlipCommand={'type':_univerjs_core['CommandType'][_0x3add6b(0x1e6)],'id':'sheet.command.toggle-shape-flip','handler':(_0x5c6f50,_0x125c24)=>{const _0x4a2875=_0x3add6b;var _0x5d69bb,_0x344674;const _0x40ad6e=(0x0,_univerjs_sheets['getSheetCommandTarget'])(_0x5c6f50['get'](_univerjs_core[_0x4a2875(0x1ee)]),_0x125c24);if(!_0x40ad6e)return![];const _0x424ccd=_0x5c6f50[_0x4a2875(0x19c)](_univerjs_sheets[_0x4a2875(0x20d)]),{unitId:_0x16836c,subUnitId:_0xc3d30a}=_0x40ad6e,_0x258eec=_0x424ccd[_0x4a2875(0x1b1)](_0x16836c,_0xc3d30a);if(!_0x258eec)return![];const _0x54f7dd=_0x5c6f50[_0x4a2875(0x19c)](_univerjs_sheets_drawing[_0x4a2875(0x188)]),{shapeId:_0x3f0c81,flipH:_0x53c480,flipV:_0x317df8}=_0x125c24,_0x442094=_0x54f7dd[_0x4a2875(0x159)]({'unitId':_0x16836c,'subUnitId':_0xc3d30a,'drawingId':_0x3f0c81});if(!_0x442094)return![];const _0x339a6b=_0x5c6f50['get'](SheetsShapeService)[_0x4a2875(0x17d)](_0x16836c,_0xc3d30a,_0x3f0c81);if(!_0x339a6b)return![];const _0x381c74=_0x5c6f50[_0x4a2875(0x19c)](_univerjs_core['ICommandService']),_0x579fe4=_0x5c6f50[_0x4a2875(0x19c)](_univerjs_core[_0x4a2875(0x172)]),_0xeb7402=_0x5c6f50[_0x4a2875(0x19c)](_univerjs_sheets['SheetInterceptorService']),_0x1ca7e5={..._0x442094[_0x4a2875(0x1cd)]};if(_0x53c480!==void 0x0)_0x1ca7e5[_0x4a2875(0x1a5)]=!_0x1ca7e5[_0x4a2875(0x1a5)];if(_0x317df8!==void 0x0)_0x1ca7e5[_0x4a2875(0x1f2)]=!_0x1ca7e5['flipY'];const _0x587241=(0x0,_univerjs_sheets_drawing[_0x4a2875(0x1da)])(_0x1ca7e5,_0x258eec),_0x3d72d2=(0x0,_univerjs_sheets_drawing[_0x4a2875(0x205)])(_0x1ca7e5,_0x258eec),_0x2c45af=_0x339a6b[_0x4a2875(0x1a9)](),_0x26923c=_0x339a6b[_0x4a2875(0x186)](),_0x5a2441={'unitId':_0x16836c,'subUnitId':_0xc3d30a,'drawingId':_0x3f0c81,'drawingType':_univerjs_core[_0x4a2875(0x166)]['DRAWING_SHAPE'],'sheetTransform':_0x587241,'transform':_0x1ca7e5,'data':{'shapeType':_0x2c45af,'shapeData':_0x26923c},'axisAlignSheetTransform':_0x3d72d2,'allowTransform':!![]},{undo:_0x49a022,redo:_0x25d835,objects:_0x4a90c0}=_0x54f7dd['getBatchUpdateOp']([_0x5a2441]),_0x117a05=_0xeb7402[_0x4a2875(0x1bb)]({'id':_univerjs_sheets_drawing[_0x4a2875(0x218)]['id'],'params':{'unitId':_0x16836c,'drawings':[_0x5a2441]}}),_0x3de728=[...(_0x5d69bb=_0x117a05[_0x4a2875(0x14f)])!==null&&_0x5d69bb!==void 0x0?_0x5d69bb:[],{'id':_univerjs_sheets_drawing[_0x4a2875(0x1d2)]['id'],'params':{'unitId':_0x16836c,'subUnitId':_0xc3d30a,'op':_0x25d835,'objects':_0x4a90c0,'type':_univerjs_sheets_drawing[_0x4a2875(0x202)][_0x4a2875(0x1b6)]}},{'id':_univerjs_sheets_drawing['ClearSheetDrawingTransformerOperation']['id'],'params':[_0x16836c]},..._0x117a05[_0x4a2875(0x201)]],_0x41919d=[...(_0x344674=_0x117a05[_0x4a2875(0x167)])!==null&&_0x344674!==void 0x0?_0x344674:[],{'id':_univerjs_sheets_drawing[_0x4a2875(0x1d2)]['id'],'params':{'unitId':_0x16836c,'subUnitId':_0xc3d30a,'op':_0x49a022,'objects':_0x4a90c0,'type':_univerjs_sheets_drawing[_0x4a2875(0x202)]['UPDATE']}},{'id':_univerjs_sheets_drawing['ClearSheetDrawingTransformerOperation']['id'],'params':[_0x16836c]},..._0x117a05['undos']];if((0x0,_univerjs_pro_engine_shape[_0x4a2875(0x1cb)])(_0x2c45af)){const _0x57f4be=_0x339a6b[_0x4a2875(0x1b2)]();if(_0x57f4be){const _0x361532={..._0x57f4be};_0x361532[_0x4a2875(0x1ff)]=void 0x0,_0x361532['to']=void 0x0,_0x3de728[_0x4a2875(0x182)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x16836c,'subUnitId':_0xc3d30a,'shapeId':_0x3f0c81,'shapeType':_0x2c45af,'shapeData':{'relation':_0x361532}}}),_0x41919d[_0x4a2875(0x182)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x16836c,'subUnitId':_0xc3d30a,'shapeId':_0x3f0c81,'shapeType':_0x2c45af,'shapeData':{'relation':_0x57f4be}}});}}if((0x0,_univerjs_core['sequenceExecute'])(_0x3de728,_0x381c74)['result'])return _0x579fe4[_0x4a2875(0x157)]({'unitID':_0x16836c,'undoMutations':_0x41919d,'redoMutations':_0x3de728}),!![];return![];}},SetSheetsShapeRotateCommand={'type':_univerjs_core[_0x3add6b(0x155)][_0x3add6b(0x1e6)],'id':_0x3add6b(0x18c),'handler':(_0x259d6e,_0x3ef077)=>{const _0x4aeb09=_0x3add6b;var _0x51b63a,_0x3fde81;const _0x3b0319=(0x0,_univerjs_sheets[_0x4aeb09(0x162)])(_0x259d6e[_0x4aeb09(0x19c)](_univerjs_core[_0x4aeb09(0x1ee)]),_0x3ef077);if(!_0x3b0319)return![];const _0x5dafa1=_0x259d6e[_0x4aeb09(0x19c)](_univerjs_sheets[_0x4aeb09(0x20d)]),{unitId:_0x103472,subUnitId:_0x2b7373}=_0x3b0319,_0x28c8e1=_0x5dafa1[_0x4aeb09(0x1b1)](_0x103472,_0x2b7373);if(!_0x28c8e1)return![];const _0x559dbc=_0x259d6e[_0x4aeb09(0x19c)](_univerjs_sheets_drawing[_0x4aeb09(0x188)]),{shapeId:_0x4ee0b1,rotate:_0xdde142}=_0x3ef077,_0x18de32=_0x559dbc[_0x4aeb09(0x159)]({'unitId':_0x103472,'subUnitId':_0x2b7373,'drawingId':_0x4ee0b1});if(!_0x18de32)return![];const _0x46e12d=_0x259d6e[_0x4aeb09(0x19c)](SheetsShapeService)[_0x4aeb09(0x17d)](_0x103472,_0x2b7373,_0x4ee0b1);if(!_0x46e12d)return![];const _0x562f67=_0x259d6e['get'](_univerjs_core[_0x4aeb09(0x1b5)]),_0x489fae=_0x259d6e[_0x4aeb09(0x19c)](_univerjs_core[_0x4aeb09(0x172)]),_0x423a3f=_0x259d6e[_0x4aeb09(0x19c)](_univerjs_sheets[_0x4aeb09(0x1a2)]),_0x444c05={..._0x18de32[_0x4aeb09(0x1cd)]};if(_0xdde142!==void 0x0)_0x444c05[_0x4aeb09(0x17c)]=(_0x444c05[_0x4aeb09(0x17c)]||0x0)+_0xdde142;const _0xcc759e=(0x0,_univerjs_sheets_drawing[_0x4aeb09(0x1da)])(_0x444c05,_0x28c8e1),_0x4b9045=(0x0,_univerjs_sheets_drawing[_0x4aeb09(0x205)])(_0x444c05,_0x28c8e1),_0xefa875=_0x46e12d[_0x4aeb09(0x1a9)](),_0xcbbaea=_0x46e12d['getShapeData'](),_0xc3d5ab={'unitId':_0x103472,'subUnitId':_0x2b7373,'drawingId':_0x4ee0b1,'drawingType':_univerjs_core['DrawingTypeEnum'][_0x4aeb09(0x174)],'sheetTransform':_0xcc759e,'transform':_0x444c05,'data':{'shapeType':_0xefa875,'shapeData':_0xcbbaea},'axisAlignSheetTransform':_0x4b9045,'allowTransform':!![]},{undo:_0x2ace1c,redo:_0x47a3fa,objects:_0x28281b}=_0x559dbc[_0x4aeb09(0x200)]([_0xc3d5ab]),_0x2547f0=_0x423a3f['onCommandExecute']({'id':_univerjs_sheets_drawing[_0x4aeb09(0x218)]['id'],'params':{'unitId':_0x103472,'drawings':[_0xc3d5ab]}}),_0x4b68a3=[...(_0x51b63a=_0x2547f0[_0x4aeb09(0x14f)])!==null&&_0x51b63a!==void 0x0?_0x51b63a:[],{'id':_univerjs_sheets_drawing['SetDrawingApplyMutation']['id'],'params':{'unitId':_0x103472,'subUnitId':_0x2b7373,'op':_0x47a3fa,'objects':_0x28281b,'type':_univerjs_sheets_drawing['DrawingApplyType']['UPDATE']}},{'id':_univerjs_sheets_drawing[_0x4aeb09(0x1c4)]['id'],'params':[_0x103472]},..._0x2547f0[_0x4aeb09(0x201)]],_0x3156ec=[...(_0x3fde81=_0x2547f0[_0x4aeb09(0x167)])!==null&&_0x3fde81!==void 0x0?_0x3fde81:[],{'id':_univerjs_sheets_drawing[_0x4aeb09(0x1d2)]['id'],'params':{'unitId':_0x103472,'subUnitId':_0x2b7373,'op':_0x2ace1c,'objects':_0x28281b,'type':_univerjs_sheets_drawing['DrawingApplyType'][_0x4aeb09(0x1b6)]}},{'id':_univerjs_sheets_drawing[_0x4aeb09(0x1c4)]['id'],'params':[_0x103472]},..._0x2547f0['undos']];if((0x0,_univerjs_core[_0x4aeb09(0x1c3)])(_0x4b68a3,_0x562f67)[_0x4aeb09(0x212)])return _0x489fae[_0x4aeb09(0x157)]({'unitID':_0x103472,'undoMutations':_0x3156ec,'redoMutations':_0x4b68a3}),!![];return![];}},SetSheetsShapeTextVerticalToggleCommand={'type':_univerjs_core[_0x3add6b(0x155)][_0x3add6b(0x1e6)],'id':_0x3add6b(0x189),'handler':(_0x40078f,_0xa2bbd9)=>{const _0x48c241=_0x3add6b;var _0x22ea11;const _0xdddfb6=(0x0,_univerjs_sheets[_0x48c241(0x162)])(_0x40078f[_0x48c241(0x19c)](_univerjs_core[_0x48c241(0x1ee)]),_0xa2bbd9);if(!_0xdddfb6)return![];const {unitId:_0x7c9b4b,subUnitId:_0x3af391}=_0xdddfb6,{shapeId:_0x1eae7a}=_0xa2bbd9,_0x13a02b=_0x40078f[_0x48c241(0x19c)](SheetsShapeService)[_0x48c241(0x17d)](_0x7c9b4b,_0x3af391,_0x1eae7a);if(!_0x13a02b)return![];const _0x219329=_0x13a02b[_0x48c241(0x152)](),_0x10f9f7=(_0x22ea11=_0x219329===null||_0x219329===void 0x0?void 0x0:_0x219329[_0x48c241(0x20e)])!==null&&_0x22ea11!==void 0x0?_0x22ea11:!![],_0x440b82=!_0x10f9f7,_0x20d11d=_0x40078f['get'](_univerjs_core[_0x48c241(0x1b5)]),_0x3cd189=_0x40078f[_0x48c241(0x19c)](_univerjs_core[_0x48c241(0x172)]),_0x5d79cc={'unitId':_0x7c9b4b,'subUnitId':_0x3af391,'shapeId':_0x1eae7a,'shapeData':{'shapeText':{'isHorizontal':_0x440b82}}},_0x42c252={'unitId':_0x7c9b4b,'subUnitId':_0x3af391,'shapeId':_0x1eae7a,'shapeData':{'shapeText':{'isHorizontal':_0x10f9f7}}},_0x135f7c=[{'id':UpdateSheetsShapeDataMutation['id'],'params':_0x5d79cc}],_0x32a5df=[{'id':UpdateSheetsShapeDataMutation['id'],'params':_0x42c252}];if((0x0,_univerjs_core['sequenceExecute'])(_0x135f7c,_0x20d11d)[_0x48c241(0x212)])return _0x3cd189[_0x48c241(0x157)]({'unitID':_0x7c9b4b,'undoMutations':_0x32a5df,'redoMutations':_0x135f7c}),!![];return![];}},UpdateConnectorRelationCommand={'type':_univerjs_core[_0x3add6b(0x155)][_0x3add6b(0x1e6)],'id':_0x3add6b(0x173),'handler':(_0x49c640,_0x4710fe)=>{const _0x5d7a29=_0x3add6b;var _0x49b101,_0x501213,_0x386e18,_0x197845;const _0x4f6c3c=(0x0,_univerjs_sheets[_0x5d7a29(0x162)])(_0x49c640[_0x5d7a29(0x19c)](_univerjs_core[_0x5d7a29(0x1ee)]),_0x4710fe);if(!_0x4f6c3c)return![];const _0x2faa21=_0x49c640[_0x5d7a29(0x19c)](_univerjs_sheets[_0x5d7a29(0x20d)]),{unitId:_0x350b3a,subUnitId:_0x145dcc}=_0x4f6c3c,_0x897e57=_0x2faa21['getSkeleton'](_0x350b3a,_0x145dcc);if(!_0x897e57)return![];const _0x5208a7=_0x49c640[_0x5d7a29(0x19c)](_univerjs_sheets_drawing['ISheetDrawingService']),{connectorShapeId:_0x5d3e32,width:_0x1540d5,height:_0x499870,left:_0x3ef48c,top:_0xf5a222,flipX:_0x332790,flipY:_0x1c7697,rotation:_0x85d6c5,oldAdjustValues:_0x9b446f,newAdjustValues:_0x3fe026,oldLineType:_0x10b24f,newLineType:_0x4d70ba,oldRelation:_0x565128,newRelation:_0x291c64}=_0x4710fe,_0x599d10=_0x5208a7[_0x5d7a29(0x159)]({'unitId':_0x350b3a,'subUnitId':_0x145dcc,'drawingId':_0x5d3e32});if(!_0x599d10)return![];const _0x39a213=_0x49c640[_0x5d7a29(0x19c)](SheetsShapeService)[_0x5d7a29(0x17d)](_0x350b3a,_0x145dcc,_0x5d3e32);if(!_0x39a213)return![];const _0x3d6cc1=_0x49c640[_0x5d7a29(0x19c)](_univerjs_core[_0x5d7a29(0x1b5)]),_0x1c0fcb=_0x49c640[_0x5d7a29(0x19c)](_univerjs_core[_0x5d7a29(0x172)]),_0x3d0d19=_0x49c640['get'](_univerjs_sheets[_0x5d7a29(0x1a2)]),_0x55279d={..._0x599d10['transform'],'width':_0x1540d5,'height':_0x499870,'left':_0x3ef48c,'top':_0xf5a222,'flipX':_0x332790,'flipY':_0x1c7697,'angle':(_0x49b101=_0x85d6c5!==null&&_0x85d6c5!==void 0x0?_0x85d6c5:(_0x501213=_0x599d10[_0x5d7a29(0x1cd)])===null||_0x501213===void 0x0?void 0x0:_0x501213[_0x5d7a29(0x17c)])!==null&&_0x49b101!==void 0x0?_0x49b101:0x0},_0x16eb27=(0x0,_univerjs_sheets_drawing['transformToDrawingPosition'])(_0x55279d,_0x897e57),_0x2811bf=(0x0,_univerjs_sheets_drawing[_0x5d7a29(0x205)])(_0x55279d,_0x897e57),_0x36c698=_0x39a213[_0x5d7a29(0x1a9)](),_0x44579f=_0x39a213[_0x5d7a29(0x186)](),_0x4afc7f={'unitId':_0x350b3a,'subUnitId':_0x145dcc,'drawingId':_0x5d3e32,'drawingType':_univerjs_core[_0x5d7a29(0x166)][_0x5d7a29(0x174)],'sheetTransform':_0x16eb27,'transform':_0x55279d,'data':{'shapeType':_0x4d70ba||_0x10b24f||_0x36c698,'shapeData':{..._0x44579f,'adjustValues':_0x3fe026||_0x9b446f||(_0x44579f===null||_0x44579f===void 0x0?void 0x0:_0x44579f[_0x5d7a29(0x1ce)]),'relation':_0x291c64||_0x565128||(_0x44579f===null||_0x44579f===void 0x0?void 0x0:_0x44579f[_0x5d7a29(0x161)])}},'axisAlignSheetTransform':_0x2811bf,'allowTransform':!![]},{undo:_0x4f3272,redo:_0x501f35,objects:_0x11fd68}=_0x5208a7[_0x5d7a29(0x200)]([_0x4afc7f]),_0x3091e4=_0x3d0d19[_0x5d7a29(0x1bb)]({'id':_univerjs_sheets_drawing['SetSheetDrawingCommand']['id'],'params':{'unitId':_0x350b3a,'drawings':[_0x4afc7f]}}),_0x5ac546=[...(_0x386e18=_0x3091e4[_0x5d7a29(0x14f)])!==null&&_0x386e18!==void 0x0?_0x386e18:[],{'id':_univerjs_sheets_drawing[_0x5d7a29(0x1d2)]['id'],'params':{'unitId':_0x350b3a,'subUnitId':_0x145dcc,'op':_0x501f35,'objects':_0x11fd68,'type':_univerjs_sheets_drawing[_0x5d7a29(0x202)][_0x5d7a29(0x1b6)]}},{'id':_univerjs_sheets_drawing[_0x5d7a29(0x1c4)]['id'],'params':[_0x350b3a]},..._0x3091e4[_0x5d7a29(0x201)],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x350b3a,'subUnitId':_0x145dcc,'shapeId':_0x5d3e32,'shapeType':_0x4d70ba,'shapeData':{'adjustValues':_0x3fe026,'relation':_0x291c64}}}],_0x132a5d=[...(_0x197845=_0x3091e4['preUndos'])!==null&&_0x197845!==void 0x0?_0x197845:[],{'id':_univerjs_sheets_drawing[_0x5d7a29(0x1d2)]['id'],'params':{'unitId':_0x350b3a,'subUnitId':_0x145dcc,'op':_0x4f3272,'objects':_0x11fd68,'type':_univerjs_sheets_drawing[_0x5d7a29(0x202)][_0x5d7a29(0x1b6)]}},{'id':_univerjs_sheets_drawing['ClearSheetDrawingTransformerOperation']['id'],'params':[_0x350b3a]},..._0x3091e4[_0x5d7a29(0x1fe)],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x350b3a,'subUnitId':_0x145dcc,'shapeId':_0x5d3e32,'shapeType':_0x36c698,'shapeData':{..._0x44579f,'adjustValues':_0x9b446f||(_0x44579f===null||_0x44579f===void 0x0?void 0x0:_0x44579f[_0x5d7a29(0x1ce)]),'relation':_0x565128||(_0x44579f===null||_0x44579f===void 0x0?void 0x0:_0x44579f[_0x5d7a29(0x161)])}}}];if((0x0,_univerjs_core[_0x5d7a29(0x1c3)])(_0x5ac546,_0x3d6cc1)[_0x5d7a29(0x212)])return _0x1c0fcb[_0x5d7a29(0x157)]({'unitID':_0x350b3a,'undoMutations':_0x132a5d,'redoMutations':_0x5ac546}),!![];return![];}},UpdateLineShapeResizeCommand={'type':_univerjs_core[_0x3add6b(0x155)][_0x3add6b(0x1e6)],'id':'sheet.command.update-line-shape-resize','handler':(_0x497f6c,_0x5a33b6)=>{const _0x2bf45c=_0x3add6b;var _0x23d722,_0x250112;const _0x16a45f=(0x0,_univerjs_sheets[_0x2bf45c(0x162)])(_0x497f6c['get'](_univerjs_core[_0x2bf45c(0x1ee)]),_0x5a33b6);if(!_0x16a45f)return![];const _0x54ce1e=_0x497f6c[_0x2bf45c(0x19c)](_univerjs_sheets[_0x2bf45c(0x20d)]),{unitId:_0x5e6e5a,subUnitId:_0x12b9dd}=_0x16a45f,_0x39305d=_0x54ce1e[_0x2bf45c(0x1b1)](_0x5e6e5a,_0x12b9dd);if(!_0x39305d)return![];const _0x10e7bb=_0x497f6c['get'](_univerjs_sheets_drawing[_0x2bf45c(0x188)]),{shapeId:_0x240387,width:_0x55f688,height:_0x803263,left:_0x3a77a8,top:_0x11150e,flipX:_0x558c7d,flipY:_0x3b9075,angle:_0x514859,oldAdjustValues:_0x12c713,newAdjustValues:_0x7d0cb3,oldLineType:_0x3bf08a,newLineType:_0xd15ac0}=_0x5a33b6,_0x301db8=_0x10e7bb[_0x2bf45c(0x159)]({'unitId':_0x5e6e5a,'subUnitId':_0x12b9dd,'drawingId':_0x240387});if(!_0x301db8)return![];const _0x2ea41c=_0x497f6c[_0x2bf45c(0x19c)](SheetsShapeService)[_0x2bf45c(0x17d)](_0x5e6e5a,_0x12b9dd,_0x240387);if(!_0x2ea41c)return![];const _0x30c55b=_0x497f6c[_0x2bf45c(0x19c)](_univerjs_core[_0x2bf45c(0x1b5)]),_0x15f39a=_0x497f6c['get'](_univerjs_core[_0x2bf45c(0x172)]),_0x9e0980=_0x497f6c[_0x2bf45c(0x19c)](_univerjs_sheets[_0x2bf45c(0x1a2)]),_0x37d840={..._0x301db8[_0x2bf45c(0x1cd)],'width':_0x55f688,'height':_0x803263,'left':_0x3a77a8,'top':_0x11150e,'flipX':_0x558c7d,'flipY':_0x3b9075,'angle':_0x514859},_0x5772c8=(0x0,_univerjs_sheets_drawing[_0x2bf45c(0x1da)])(_0x37d840,_0x39305d),_0x392031=(0x0,_univerjs_sheets_drawing['transformToAxisAlignPosition'])(_0x37d840,_0x39305d),_0x57c8e0=_0x2ea41c[_0x2bf45c(0x1a9)](),_0x4f7318=_0x2ea41c['getShapeData'](),_0x3cd205={'unitId':_0x5e6e5a,'subUnitId':_0x12b9dd,'drawingId':_0x240387,'drawingType':_univerjs_core['DrawingTypeEnum'][_0x2bf45c(0x174)],'sheetTransform':_0x5772c8,'transform':_0x37d840,'data':{'shapeType':_0xd15ac0||_0x3bf08a||_0x57c8e0,'shapeData':{..._0x4f7318,'adjustValues':_0x7d0cb3||_0x12c713||(_0x4f7318===null||_0x4f7318===void 0x0?void 0x0:_0x4f7318[_0x2bf45c(0x1ce)])}},'axisAlignSheetTransform':_0x392031,'allowTransform':!![]},{undo:_0x1fb088,redo:_0x138ec5,objects:_0x2a6927}=_0x10e7bb['getBatchUpdateOp']([_0x3cd205]),_0x17eeb4=_0x9e0980[_0x2bf45c(0x1bb)]({'id':_univerjs_sheets_drawing[_0x2bf45c(0x218)]['id'],'params':{'unitId':_0x5e6e5a,'drawings':[_0x3cd205]}}),_0x5ed9e7=[...(_0x23d722=_0x17eeb4['preRedos'])!==null&&_0x23d722!==void 0x0?_0x23d722:[],{'id':_univerjs_sheets_drawing[_0x2bf45c(0x1d2)]['id'],'params':{'unitId':_0x5e6e5a,'subUnitId':_0x12b9dd,'op':_0x138ec5,'objects':_0x2a6927,'type':_univerjs_sheets_drawing[_0x2bf45c(0x202)][_0x2bf45c(0x1b6)]}},{'id':_univerjs_sheets_drawing[_0x2bf45c(0x1c4)]['id'],'params':[_0x5e6e5a]},..._0x17eeb4[_0x2bf45c(0x201)],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x5e6e5a,'subUnitId':_0x12b9dd,'shapeId':_0x240387,'shapeType':_0xd15ac0,'shapeData':{'adjustValues':_0x7d0cb3}}}],_0x38d2bf=[...(_0x250112=_0x17eeb4[_0x2bf45c(0x167)])!==null&&_0x250112!==void 0x0?_0x250112:[],{'id':_univerjs_sheets_drawing['SetDrawingApplyMutation']['id'],'params':{'unitId':_0x5e6e5a,'subUnitId':_0x12b9dd,'op':_0x1fb088,'objects':_0x2a6927,'type':_univerjs_sheets_drawing['DrawingApplyType'][_0x2bf45c(0x1b6)]}},{'id':_univerjs_sheets_drawing[_0x2bf45c(0x1c4)]['id'],'params':[_0x5e6e5a]},..._0x17eeb4['undos'],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x5e6e5a,'subUnitId':_0x12b9dd,'shapeId':_0x240387,'shapeType':_0x57c8e0,'shapeData':{..._0x4f7318,'adjustValues':_0x12c713||(_0x4f7318===null||_0x4f7318===void 0x0?void 0x0:_0x4f7318[_0x2bf45c(0x1ce)])}}}];if((0x0,_univerjs_core['sequenceExecute'])(_0x5ed9e7,_0x30c55b)['result'])return _0x15f39a[_0x2bf45c(0x157)]({'unitID':_0x5e6e5a,'undoMutations':_0x38d2bf,'redoMutations':_0x5ed9e7}),!![];return![];}},UpdateSheetsShapeTypeMutation={'id':_0x3add6b(0x180),'type':_univerjs_core[_0x3add6b(0x155)][_0x3add6b(0x1be)],'handler':(_0xf8147d,_0x2272b0)=>{const _0xa656e3=_0x3add6b,{unitId:_0xd4648b,subUnitId:_0x2cc9d6,shapeType:_0x563ddc,shapeId:_0x547677,shapeData:_0x591146}=_0x2272b0,_0x112450=_0xf8147d[_0xa656e3(0x19c)](SheetsShapeService)[_0xa656e3(0x17d)](_0xd4648b,_0x2cc9d6,_0x547677);if(_0x112450){_0x112450[_0xa656e3(0x1dc)](_0x563ddc);if(_0x591146)_0x112450===null||_0x112450===void 0x0||_0x112450[_0xa656e3(0x1ab)](_0x591146);}return!![];}},UpdateSheetsShapeTypeCommand={'id':_0x3add6b(0x1a7),'type':_univerjs_core[_0x3add6b(0x155)][_0x3add6b(0x1e6)],'handler':(_0x2f2267,_0x394350)=>{const _0x52e7c1=_0x3add6b;if(!_0x394350)return![];const _0x8bbc71=_0x2f2267['get'](_univerjs_core[_0x52e7c1(0x1b5)]),_0x566921=_0x2f2267[_0x52e7c1(0x19c)](SheetsShapeService),_0x4b713a=_0x2f2267[_0x52e7c1(0x19c)](_univerjs_core[_0x52e7c1(0x172)]),_0x40b593=[],_0x21593e=[],{unitId:_0x53b7ab,subUnitId:_0x3073fb,shapeId:_0x3cdd05,shapeType:_0x22eb3f,shapeData:_0x5133b0}=_0x394350,_0x5e02e2=_0x566921[_0x52e7c1(0x17d)](_0x53b7ab,_0x3073fb,_0x3cdd05);if(_0x5e02e2){const _0x4fc9a3=_0x5e02e2[_0x52e7c1(0x1a9)](),_0x5acd2b=Object[_0x52e7c1(0x195)]({},_0x5e02e2[_0x52e7c1(0x186)]()),_0x4327f4={'unitId':_0x53b7ab,'subUnitId':_0x3073fb,'shapeId':_0x3cdd05,'shapeType':_0x22eb3f,'shapeData':_0x5133b0},_0x281fe1={'unitId':_0x53b7ab,'subUnitId':_0x3073fb,'shapeId':_0x3cdd05,'shapeType':_0x4fc9a3,'shapeData':_0x5acd2b};_0x40b593[_0x52e7c1(0x182)]({'id':UpdateSheetsShapeTypeMutation['id'],'params':_0x4327f4}),_0x21593e[_0x52e7c1(0x182)]({'id':UpdateSheetsShapeTypeMutation['id'],'params':_0x281fe1});if(_0x40b593[_0x52e7c1(0x1b7)](_0x4f9229=>_0x8bbc71[_0x52e7c1(0x1c8)](_0x4f9229['id'],_0x4f9229[_0x52e7c1(0x1f5)])))_0x4b713a[_0x52e7c1(0x157)]({'unitID':_0x53b7ab,'redoMutations':[..._0x40b593],'undoMutations':[..._0x21593e]});return!![];}return![];}};var name=_0x3add6b(0x1e8),version='0.22.0';const SHEETS_SHAPE_PLUGIN_CONFIG_KEY=_0x3add6b(0x198),configSymbol=Symbol(SHEETS_SHAPE_PLUGIN_CONFIG_KEY),defaultPluginConfig={};let SheetsShapeController=class SheetsShapeController extends _univerjs_core['Disposable']{constructor(_0x1e1b9a,_0x354826,_0x3e9a27,_0x354ed8,_0x3764d2){const _0x26cadc=_0x3add6b;super(),this[_0x26cadc(0x193)]=_0x1e1b9a,this[_0x26cadc(0x1fd)]=_0x354826,this[_0x26cadc(0x1b9)]=_0x3e9a27,this[_0x26cadc(0x194)]=_0x354ed8,this['_drawingManagerService']=_0x3764d2,this[_0x26cadc(0x156)](),this['_initCommandInterceptor']();}['_initCommands'](){const _0x327cb3=_0x3add6b;[InsertShapeCommand,SetShapeDrawingDataCommand,ToggleSheetsShapeFlipCommand,SetSheetsShapeRotateCommand,SetSheetsShapeTextVerticalToggleCommand,UpdateConnectorRelationCommand,UpdateLineShapeResizeCommand,InsertSheetsShapeMutation,RemoveSheetsShapeMutation,UpdateSheetsShapeTypeMutation,UpdateSheetsShapeDataMutation][_0x327cb3(0x1b3)](_0x23e021=>this[_0x327cb3(0x1ba)](this[_0x327cb3(0x193)]['registerCommand'](_0x23e021)));}[_0x3add6b(0x1f3)](){const _0x1ba492=_0x3add6b;this['disposeWithMe'](this[_0x1ba492(0x1fd)][_0x1ba492(0x1d5)]({'getMutations':_0xaf68d3=>{const _0x3c58c6=_0x1ba492;if(_0xaf68d3['id']===_univerjs_sheets_drawing[_0x3c58c6(0x207)]['id']){const {drawings:_0x543e22}=_0xaf68d3[_0x3c58c6(0x1f5)],_0x20aa5e=_0x543e22[_0x3c58c6(0x15a)](_0x45ec6e=>_0x45ec6e[_0x3c58c6(0x1f7)]===_univerjs_core[_0x3c58c6(0x166)]['DRAWING_SHAPE']);if(_0x20aa5e[_0x3c58c6(0x16b)]===0x0)return{'preRedos':[],'redos':[],'preUndos':[],'undos':[]};const _0x41974d=[],_0x5ef199=[];return _0x20aa5e[_0x3c58c6(0x1b3)](_0x4d5b1d=>{const _0x2566d1=_0x3c58c6,{unitId:_0x4cf296,subUnitId:_0x3ac355,drawingId:_0x51b56e}=_0x4d5b1d,_0x59a594=this[_0x2566d1(0x194)][_0x2566d1(0x17d)](_0x4cf296,_0x3ac355,_0x51b56e);if(!_0x59a594)throw new TypeError(_0x2566d1(0x1db)+_0x59a594);_0x41974d['push']({'id':RemoveSheetsShapeMutation['id'],'params':{'unitId':_0x4cf296,'subUnitId':_0x3ac355,'shapeId':_0x51b56e}}),_0x5ef199['push']({'id':InsertSheetsShapeMutation['id'],'params':{'unitId':_0x4cf296,'subUnitId':_0x3ac355,'shapeId':_0x51b56e,'shapeType':_0x59a594['getShapeType'](),'shapeData':_0x59a594[_0x2566d1(0x186)]()}});const _0x1fdeaf=this[_0x2566d1(0x194)][_0x2566d1(0x15d)](_0x4cf296,_0x3ac355,_0x51b56e);if(_0x1fdeaf)for(const _0x499980 of _0x1fdeaf){const _0x3f2c90=_0x499980['lineShapeId'],_0x3daaff=_0x499980[_0x2566d1(0x1f8)],_0x586e03=_0x3daaff?{'from':void 0x0}:{'to':void 0x0},_0x28122a=_0x3daaff?{'from':{'shapeId':_0x499980[_0x2566d1(0x1e7)],'cxnIndex':_0x499980[_0x2566d1(0x1ef)]}}:{'to':{'shapeId':_0x499980[_0x2566d1(0x1e7)],'cxnIndex':_0x499980[_0x2566d1(0x1ef)]}};_0x41974d['push']({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x4cf296,'subUnitId':_0x3ac355,'shapeId':_0x3f2c90,'shapeData':{'relation':_0x586e03}}}),_0x5ef199[_0x2566d1(0x182)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x4cf296,'subUnitId':_0x3ac355,'shapeId':_0x3f2c90,'shapeData':{'relation':_0x28122a}}});}}),{'preRedos':_0x41974d,'redos':[],'preUndos':[],'undos':_0x5ef199};}if(_0xaf68d3['id']===_univerjs_sheets_drawing['SetSheetDrawingCommand']['id']){const {drawings:_0x39eba2}=_0xaf68d3['params'],_0x57903f=_0x39eba2[_0x3c58c6(0x15a)](_0x4ae2c7=>_0x4ae2c7[_0x3c58c6(0x1f7)]===_univerjs_core['DrawingTypeEnum']['DRAWING_SHAPE']);if(_0x57903f[_0x3c58c6(0x16b)]===0x0)return{'preRedos':[],'redos':[],'preUndos':[],'undos':[]};const _0x50828a=[],_0x5796b5=[];for(const _0x558bf6 of _0x57903f){const {unitId:_0x1e6e0b,subUnitId:_0x367016,drawingId:_0x3be320,transform:_0x31438b}=_0x558bf6;if(!_0x1e6e0b||!_0x367016||!_0x3be320||!_0x31438b)continue;const _0x3b8c6a=this[_0x3c58c6(0x194)][_0x3c58c6(0x17d)](_0x1e6e0b,_0x367016,_0x3be320);if(!_0x3b8c6a)throw new TypeError('Fail\x20to\x20get\x20shape\x20model,\x20get:\x20'+_0x3b8c6a);if((0x0,_univerjs_pro_engine_shape[_0x3c58c6(0x1cb)])(_0x3b8c6a[_0x3c58c6(0x1a9)]())){const _0x20f437=this[_0x3c58c6(0x194)][_0x3c58c6(0x215)](_0x1e6e0b,_0x367016,_0x3be320),_0x442c7a={'from':void 0x0,'to':void 0x0};_0x20f437&&(_0x50828a[_0x3c58c6(0x182)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x1e6e0b,'subUnitId':_0x367016,'shapeId':_0x3be320,'shapeData':{'relation':_0x442c7a}}}),_0x5796b5[_0x3c58c6(0x182)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x1e6e0b,'subUnitId':_0x367016,'shapeId':_0x3be320,'shapeData':{'relation':_0x20f437}}}));}else{const _0x33aba3=this[_0x3c58c6(0x194)][_0x3c58c6(0x15d)](_0x1e6e0b,_0x367016,_0x3be320);if(_0x33aba3&&_0x33aba3['length']>0x0)for(const _0x16f177 of _0x33aba3){const _0x4f8d92=_0x16f177[_0x3c58c6(0x16c)],_0x1e2a8b=_0x16f177[_0x3c58c6(0x1f8)],_0x311adb=this['_sheetsShapeService'][_0x3c58c6(0x17d)](_0x1e6e0b,_0x367016,_0x4f8d92);if(!_0x311adb)continue;const _0x149747=_0x311adb[_0x3c58c6(0x16d)](),_0x2b72e3=_0x311adb[_0x3c58c6(0x14d)]();if(_0x149747&&_0x2b72e3)this[_0x3c58c6(0x1c6)](_0x1e6e0b,_0x367016,_0x4f8d92,_0x311adb,_0x149747,_0x2b72e3,_0x50828a,_0x5796b5,_0x3be320,_0x31438b);else this[_0x3c58c6(0x1bd)](_0x1e6e0b,_0x367016,_0x4f8d92,_0x311adb,_0x1e2a8b?_0x149747:_0x2b72e3,_0x1e2a8b,_0x50828a,_0x5796b5,_0x3be320,_0x31438b);}}}return{'preRedos':[],'redos':_0x50828a,'preUndos':_0x5796b5,'undos':[]};}return{'preRedos':[],'redos':[],'preUndos':[],'undos':[]};}}));}['_getConnectPointInfo'](_0x25643b,_0x46f0b9,_0x48b762,_0xafd522,_0x3f3299){const _0x4c77d8=_0x3add6b;if(!_0x46f0b9||!_0x48b762)return null;const {shapeId:_0x4c058d,cxnIndex:_0x25caa7}=_0x25643b,_0x593c89=this[_0x4c77d8(0x194)][_0x4c77d8(0x17d)](_0x46f0b9,_0x48b762,_0x4c058d);if(!_0x593c89)return null;const _0x3b3b71=this['_drawingManagerService'][_0x4c77d8(0x159)]({'unitId':_0x46f0b9,'subUnitId':_0x48b762,'drawingId':_0x4c058d});if(!(_0x3b3b71===null||_0x3b3b71===void 0x0?void 0x0:_0x3b3b71[_0x4c77d8(0x1cd)]))return null;let {left:left=0x0,top:top=0x0,width:width=0x0,height:height=0x0,flipX:flipX=![],flipY:flipY=![],angle:_0x92a12d}=_0x3b3b71[_0x4c77d8(0x1cd)];if(_0x3f3299&&_0xafd522===_0x4c058d){var _0x5df30a,_0x4ecda0,_0x28b43c,_0xe64303,_0x1430e2,_0x2bc499,_0xf4e884;left=(_0x5df30a=_0x3f3299[_0x4c77d8(0x153)])!==null&&_0x5df30a!==void 0x0?_0x5df30a:left,top=(_0x4ecda0=_0x3f3299[_0x4c77d8(0x1e9)])!==null&&_0x4ecda0!==void 0x0?_0x4ecda0:top,width=(_0x28b43c=_0x3f3299[_0x4c77d8(0x15e)])!==null&&_0x28b43c!==void 0x0?_0x28b43c:width,height=(_0xe64303=_0x3f3299[_0x4c77d8(0x1aa)])!==null&&_0xe64303!==void 0x0?_0xe64303:height,flipX=(_0x1430e2=_0x3f3299[_0x4c77d8(0x1a5)])!==null&&_0x1430e2!==void 0x0?_0x1430e2:flipX,flipY=(_0x2bc499=_0x3f3299[_0x4c77d8(0x1f2)])!==null&&_0x2bc499!==void 0x0?_0x2bc499:flipY,_0x92a12d=(_0xf4e884=_0x3f3299[_0x4c77d8(0x17c)])!==null&&_0xf4e884!==void 0x0?_0xf4e884:_0x92a12d;}_0x593c89[_0x4c77d8(0x1ad)]({'width':width,'height':height});const _0x309c26=_0x593c89['getConnectionSiteList']()[_0x4c77d8(0x1fb)](_0x2be185=>_0x2be185[_0x4c77d8(0x20a)]===_0x25caa7);if(!_0x309c26)return null;let _0x234e48=flipX?width-_0x309c26['x']:_0x309c26['x'],_0x47bf0f=flipY?height-_0x309c26['y']:_0x309c26['y'];if(_0x92a12d!==0x0&&_0x92a12d!==void 0x0&&_0x92a12d!==null){const _0x16e867=_0x92a12d*Math['PI']/0xb4,_0x8a0016=Math[_0x4c77d8(0x1f1)](_0x16e867),_0x31a210=Math[_0x4c77d8(0x187)](_0x16e867),_0x8660a=width/0x2,_0x1bed8f=height/0x2,_0x402b23=_0x234e48-_0x8660a,_0x40b42e=_0x47bf0f-_0x1bed8f;_0x234e48=_0x8660a+_0x402b23*_0x8a0016-_0x40b42e*_0x31a210,_0x47bf0f=_0x1bed8f+_0x402b23*_0x31a210+_0x40b42e*_0x8a0016;}_0x234e48+=left,_0x47bf0f+=top;let _0x553e22=_0x309c26['ang']/0xea60;if(flipX)_0x553e22=0xb4-_0x553e22;if(flipY)_0x553e22=-_0x553e22;_0x553e22+=_0x92a12d||0x0,_0x553e22=(_0x553e22%0x168+0x168)%0x168;const _0x6aae94=(0x0,_univerjs_pro_engine_shape[_0x4c77d8(0x150)])({'left':left,'top':top,'width':width,'height':height},_0x92a12d||0x0);return{'point':{'x':_0x234e48,'y':_0x47bf0f},'angle':_0x553e22,'bounds':_0x6aae94};}[_0x3add6b(0x1c6)](_0x12d5ce,_0x183e35,_0x5d8308,_0xf46256,_0x1a1025,_0x494579,_0x365852,_0x903636,_0x59cbd4,_0x22c3ef){const _0x2c538c=_0x3add6b,_0x1d6df6=this[_0x2c538c(0x1b9)][_0x2c538c(0x1b1)](_0x12d5ce,_0x183e35);if(!_0x1d6df6)return;const _0xf02145=_0xf46256[_0x2c538c(0x1b2)](),_0x148bd0=_0xf46256[_0x2c538c(0x208)](),_0x2faddf={},_0x2fd3bd={};_0x148bd0[_0x2c538c(0x1b3)](_0x4324f3=>{const _0x1f4925=_0x2c538c,_0x47f34e=_0xf46256[_0x1f4925(0x169)](_0x4324f3);_0x2fd3bd[_0x4324f3]=_0x47f34e!==null&&_0x47f34e!==void 0x0?_0x47f34e:0x0;});const _0x6c0fd6=this[_0x2c538c(0x160)](_0x1a1025,_0x12d5ce,_0x183e35,_0x59cbd4,_0x22c3ef),_0x5b71d=this[_0x2c538c(0x160)](_0x494579,_0x12d5ce,_0x183e35,_0x59cbd4,_0x22c3ef);if(_0x6c0fd6&&_0x5b71d){const _0x2ccea2=_0xf46256[_0x2c538c(0x1a9)](),_0x417950=(0x0,_univerjs_pro_engine_shape[_0x2c538c(0x1cf)])(_0x6c0fd6,_0x5b71d,_0x2ccea2);let _0x46c71b=_0x2ccea2;if(_0x417950){const _0x42d4ea=(0x0,_univerjs_pro_engine_shape[_0x2c538c(0x203)])(_0x417950,_0xf46256[_0x2c538c(0x1a9)]()),_0x45aa57=this[_0x2c538c(0x154)]['getDrawingData'](_0x12d5ce,_0x183e35);if(_0x45aa57&&_0x45aa57[_0x5d8308]){const _0x2118ab=_0x45aa57[_0x5d8308];_0x46c71b=_0x42d4ea[_0x2c538c(0x1ed)];for(const [_0xc2e28,_0x13f7cb]of Object[_0x2c538c(0x1b4)](_0x42d4ea[_0x2c538c(0x1ce)]))_0x2faddf[_0xc2e28]=_0x13f7cb;const _0x378a3e={..._0x2118ab[_0x2c538c(0x1cd)],'width':_0x42d4ea[_0x2c538c(0x196)]['width'],'height':_0x42d4ea['worldRect'][_0x2c538c(0x1aa)],'left':_0x42d4ea[_0x2c538c(0x196)][_0x2c538c(0x153)],'top':_0x42d4ea[_0x2c538c(0x196)][_0x2c538c(0x1e9)],'flipX':_0x42d4ea[_0x2c538c(0x196)][_0x2c538c(0x1a5)],'flipY':_0x42d4ea[_0x2c538c(0x196)][_0x2c538c(0x1f2)],'angle':_0x42d4ea[_0x2c538c(0x1e3)]},_0x3a4f4e=(0x0,_univerjs_sheets_drawing[_0x2c538c(0x1da)])(_0x378a3e,_0x1d6df6),_0x89ae4a=(0x0,_univerjs_sheets_drawing[_0x2c538c(0x205)])(_0x378a3e,_0x1d6df6),_0x1eeec={'unitId':_0x12d5ce,'subUnitId':_0x183e35,'drawingType':_univerjs_core[_0x2c538c(0x166)][_0x2c538c(0x174)],'drawingId':_0x5d8308,'transform':_0x378a3e,'sheetTransform':_0x3a4f4e,'axisAlignSheetTransform':_0x89ae4a},{unitId:_0x51dba2,subUnitId:_0x2cb218,undo:_0x59ad7b,redo:_0x1fed6b,objects:_0x1620d4}=this[_0x2c538c(0x154)][_0x2c538c(0x200)]([_0x1eeec]);_0x365852['push']({'id':_univerjs_sheets_drawing[_0x2c538c(0x1d2)]['id'],'params':{'unitId':_0x51dba2,'subUnitId':_0x2cb218,'op':_0x1fed6b,'objects':_0x1620d4,'type':_univerjs_sheets_drawing[_0x2c538c(0x202)]['UPDATE']}}),_0x903636['push']({'id':_univerjs_sheets_drawing[_0x2c538c(0x1d2)]['id'],'params':{'unitId':_0x51dba2,'subUnitId':_0x2cb218,'op':_0x59ad7b,'objects':_0x1620d4,'type':_univerjs_sheets_drawing[_0x2c538c(0x202)][_0x2c538c(0x1b6)]}});}_0xf46256[_0x2c538c(0x1f4)]();}_0x365852['push']({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x12d5ce,'subUnitId':_0x183e35,'shapeId':_0x5d8308,'shapeType':_0x46c71b,'shapeData':{'adjustValues':_0x2faddf,'relation':_0xf02145}}}),_0x903636['push']({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x12d5ce,'subUnitId':_0x183e35,'shapeId':_0x5d8308,'shapeType':_0x2ccea2,'shapeData':{'adjustValues':_0x2fd3bd,'relation':_0xf02145}}});}}[_0x3add6b(0x1bd)](_0x144415,_0x1a37fc,_0x3422ce,_0x51db20,_0x18b466,_0x96e6b3,_0x12cceb,_0x7ab5f1,_0x26bb36,_0xc8edb2){const _0x4c79cd=_0x3add6b;var _0x30901f;if(!_0x18b466)return;const _0x45b588=this['_sheetSkeletonService'][_0x4c79cd(0x1b1)](_0x144415,_0x1a37fc);if(!_0x45b588)return;const _0x2302cc=(_0x30901f=this[_0x4c79cd(0x154)]['getDrawingByParam']({'unitId':_0x144415,'subUnitId':_0x1a37fc,'drawingId':_0x26bb36}))===null||_0x30901f===void 0x0?void 0x0:_0x30901f[_0x4c79cd(0x1cd)];if(!_0x2302cc)return;const _0x26d524=_0x2302cc[_0x4c79cd(0x153)]!==_0xc8edb2[_0x4c79cd(0x153)]||_0x2302cc[_0x4c79cd(0x1e9)]!==_0xc8edb2['top'],_0x24df88=_0x2302cc[_0x4c79cd(0x15e)]!==_0xc8edb2[_0x4c79cd(0x15e)]||_0x2302cc['height']!==_0xc8edb2[_0x4c79cd(0x1aa)],_0x2a27b8=_0x2302cc[_0x4c79cd(0x1a5)]!==_0xc8edb2[_0x4c79cd(0x1a5)]||_0x2302cc[_0x4c79cd(0x1f2)]!==_0xc8edb2['flipY'],_0x5ae2ea=_0x2302cc[_0x4c79cd(0x17c)]!==_0xc8edb2['angle'];if(_0x26d524&&!_0x24df88&&!_0x2a27b8&&!_0x5ae2ea){var _0x59dba2,_0x3c975a,_0x16653,_0x57cf0a;const _0x41cb96=((_0x59dba2=_0xc8edb2[_0x4c79cd(0x153)])!==null&&_0x59dba2!==void 0x0?_0x59dba2:0x0)-((_0x3c975a=_0x2302cc[_0x4c79cd(0x153)])!==null&&_0x3c975a!==void 0x0?_0x3c975a:0x0),_0x2f7e3a=((_0x16653=_0xc8edb2['top'])!==null&&_0x16653!==void 0x0?_0x16653:0x0)-((_0x57cf0a=_0x2302cc[_0x4c79cd(0x1e9)])!==null&&_0x57cf0a!==void 0x0?_0x57cf0a:0x0),_0x29f4fa=this[_0x4c79cd(0x154)][_0x4c79cd(0x18d)](_0x144415,_0x1a37fc);if(_0x29f4fa&&_0x29f4fa[_0x3422ce]){var _0x7b6b13,_0x5e297c,_0x2fcb0f,_0x58d495;const _0x2b390c=_0x29f4fa[_0x3422ce],_0x3b951b={..._0x2b390c['transform'],'left':((_0x7b6b13=(_0x5e297c=_0x2b390c['transform'])===null||_0x5e297c===void 0x0?void 0x0:_0x5e297c['left'])!==null&&_0x7b6b13!==void 0x0?_0x7b6b13:0x0)+_0x41cb96,'top':((_0x2fcb0f=(_0x58d495=_0x2b390c[_0x4c79cd(0x1cd)])===null||_0x58d495===void 0x0?void 0x0:_0x58d495[_0x4c79cd(0x1e9)])!==null&&_0x2fcb0f!==void 0x0?_0x2fcb0f:0x0)+_0x2f7e3a},_0x4237e5=(0x0,_univerjs_sheets_drawing[_0x4c79cd(0x1da)])(_0x3b951b,_0x45b588),_0xe78956=(0x0,_univerjs_sheets_drawing['transformToAxisAlignPosition'])(_0x3b951b,_0x45b588),_0x41ab14={'unitId':_0x144415,'subUnitId':_0x1a37fc,'drawingType':_univerjs_core['DrawingTypeEnum'][_0x4c79cd(0x174)],'drawingId':_0x3422ce,'transform':_0x3b951b,'sheetTransform':_0x4237e5,'axisAlignSheetTransform':_0xe78956},{unitId:_0x27e9e5,subUnitId:_0x420853,undo:_0x3ed800,redo:_0x1c48d4,objects:_0x44dbdd}=this[_0x4c79cd(0x154)][_0x4c79cd(0x200)]([_0x41ab14]);_0x12cceb[_0x4c79cd(0x182)]({'id':_univerjs_sheets_drawing[_0x4c79cd(0x1d2)]['id'],'params':{'unitId':_0x27e9e5,'subUnitId':_0x420853,'op':_0x1c48d4,'objects':_0x44dbdd,'type':_univerjs_sheets_drawing[_0x4c79cd(0x202)][_0x4c79cd(0x1b6)]}}),_0x7ab5f1[_0x4c79cd(0x182)]({'id':_univerjs_sheets_drawing[_0x4c79cd(0x1d2)]['id'],'params':{'unitId':_0x27e9e5,'subUnitId':_0x420853,'op':_0x3ed800,'objects':_0x44dbdd,'type':_univerjs_sheets_drawing[_0x4c79cd(0x202)][_0x4c79cd(0x1b6)]}});}}else{const _0x1e0cea=_0x51db20[_0x4c79cd(0x16d)](),_0x5ead65=_0x51db20[_0x4c79cd(0x14d)]();this['_addLineRerouteUpdates'](_0x144415,_0x1a37fc,_0x3422ce,_0x51db20,_0x1e0cea,_0x5ead65,_0x12cceb,_0x7ab5f1,_0x26bb36,_0xc8edb2);}}};SheetsShapeController=__decorate([__decorateParam(0x0,_univerjs_core[_0x3add6b(0x1b5)]),__decorateParam(0x1,(0x0,_univerjs_core[_0x3add6b(0x176)])(_univerjs_sheets[_0x3add6b(0x1a2)])),__decorateParam(0x2,(0x0,_univerjs_core[_0x3add6b(0x176)])(_univerjs_sheets['SheetSkeletonService'])),__decorateParam(0x3,(0x0,_univerjs_core[_0x3add6b(0x176)])(SheetsShapeService)),__decorateParam(0x4,(0x0,_univerjs_core[_0x3add6b(0x176)])(_univerjs_drawing[_0x3add6b(0x16e)]))],SheetsShapeController);let UniverSheetsShapePlugin=class UniverSheetsShapePlugin extends _univerjs_core[_0x3add6b(0x1bf)]{constructor(_0x5133b5=defaultPluginConfig,_0x4cfe22,_0x1da6b8,_0x476ac8){const _0x52dc15=_0x3add6b;super(),this['_config']=_0x5133b5,this[_0x52dc15(0x1a4)]=_0x4cfe22,this['_commandService']=_0x1da6b8,this[_0x52dc15(0x1f6)]=_0x476ac8;const {..._0x326bc2}=(0x0,_univerjs_core['merge'])({},defaultPluginConfig,this['_config']);this[_0x52dc15(0x1f6)][_0x52dc15(0x1d1)](SHEETS_SHAPE_PLUGIN_CONFIG_KEY,_0x326bc2);}[_0x3add6b(0x175)](){const _0x4b1d7b=_0x3add6b,_0x1c6b30=this[_0x4b1d7b(0x1a4)];[[SheetShapeModelManager],[SheetsShapeService],[SheetsShapeController]][_0x4b1d7b(0x1b3)](_0x1e7242=>_0x1c6b30['add'](_0x1e7242)),(0x0,_univerjs_core[_0x4b1d7b(0x1d3)])(_0x1c6b30,[[SheetsShapeService],[SheetsShapeController]]);}};_defineProperty(UniverSheetsShapePlugin,_0x3add6b(0x163),_univerjs_core['UniverInstanceType'][_0x3add6b(0x1b8)]),_defineProperty(UniverSheetsShapePlugin,_0x3add6b(0x168),'SHEET_SHAPE_PLUGIN'),_defineProperty(UniverSheetsShapePlugin,_0x3add6b(0x178),name),_defineProperty(UniverSheetsShapePlugin,_0x3add6b(0x1e1),version),UniverSheetsShapePlugin=__decorate([(0x0,_univerjs_core['DependentOn'])(_univerjs_pro_license['UniverLicensePlugin']),__decorateParam(0x1,(0x0,_univerjs_core[_0x3add6b(0x176)])(_univerjs_core[_0x3add6b(0x1b0)])),__decorateParam(0x2,_univerjs_core[_0x3add6b(0x1b5)]),__decorateParam(0x3,_univerjs_core[_0x3add6b(0x165)])],UniverSheetsShapePlugin),exports[_0x3add6b(0x181)]=DEFAULT_SHAPE_HEIGHT,exports[_0x3add6b(0x1a8)]=DEFAULT_SHAPE_WIDTH,exports[_0x3add6b(0x190)]=InsertShapeCommand,exports[_0x3add6b(0x214)]=InsertSheetsShapeMutation,exports[_0x3add6b(0x1ec)]=RemoveSheetsShapeMutation,exports[_0x3add6b(0x1e0)]=SetShapeDrawingDataCommand,exports[_0x3add6b(0x1d7)]=SetSheetsShapeRotateCommand,exports[_0x3add6b(0x171)]=SetSheetsShapeTextVerticalToggleCommand,Object[_0x3add6b(0x206)](exports,'SheetsShapeService',{'enumerable':!![],'get':function(){return SheetsShapeService;}}),exports[_0x3add6b(0x192)]=ToggleSheetsShapeFlipCommand,Object[_0x3add6b(0x206)](exports,'UniverSheetsShapePlugin',{'enumerable':!![],'get':function(){return UniverSheetsShapePlugin;}}),exports[_0x3add6b(0x1df)]=UpdateConnectorRelationCommand,exports[_0x3add6b(0x1c7)]=UpdateLineShapeResizeCommand,exports[_0x3add6b(0x1d8)]=UpdateSheetsShapeDataMutation,exports[_0x3add6b(0x1cc)]=UpdateSheetsShapeTypeCommand,exports[_0x3add6b(0x1ac)]=UpdateSheetsShapeTypeMutation;