@univerjs-pro/sheets-shape 0.20.1-insiders.20260418-3a69981 → 0.21.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
- const _0x702ed3=_0x1468;(function(_0x4fed16,_0x330ce9){const _0x705d08=_0x1468,_0x200af7=_0x4fed16();while(!![]){try{const _0x553d5c=-parseInt(_0x705d08(0x162))/0x1+parseInt(_0x705d08(0x1a7))/0x2+parseInt(_0x705d08(0x13e))/0x3+-parseInt(_0x705d08(0x130))/0x4*(-parseInt(_0x705d08(0x168))/0x5)+parseInt(_0x705d08(0x18c))/0x6*(parseInt(_0x705d08(0x151))/0x7)+-parseInt(_0x705d08(0x122))/0x8*(-parseInt(_0x705d08(0x171))/0x9)+-parseInt(_0x705d08(0x194))/0xa;if(_0x553d5c===_0x330ce9)break;else _0x200af7['push'](_0x200af7['shift']());}catch(_0x2390e5){_0x200af7['push'](_0x200af7['shift']());}}}(_0xc5c5,0xb54fe),Object[_0x702ed3(0x121)](exports,Symbol[_0x702ed3(0x17a)],{'value':_0x702ed3(0x19e)}));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[_0x702ed3(0x15d)]{get[_0x702ed3(0x15c)](){const _0x1fed1e=_0x702ed3;return _univerjs_pro_engine_shape[_0x1fed1e(0x15c)];}get[_0x702ed3(0x136)](){const _0x3dc9fd=_0x702ed3;return _univerjs_pro_engine_shape[_0x3dc9fd(0x136)];}get[_0x702ed3(0x1b8)](){return _univerjs_pro_engine_shape['ShapeGradientTypeEnum'];}get[_0x702ed3(0x125)](){return _univerjs_pro_engine_shape['ShapeLineTypeEnum'];}get[_0x702ed3(0x1a2)](){const _0xf91348=_0x702ed3;return _univerjs_pro_engine_shape[_0xf91348(0x1a2)];}get['ShapeLineCapEnum'](){return _univerjs_pro_engine_shape['ShapeLineCapEnum'];}get[_0x702ed3(0x177)](){const _0x356569=_0x702ed3;return _univerjs_pro_engine_shape[_0x356569(0x177)];}get['ShapeArrowTypeEnum'](){const _0x5a3984=_0x702ed3;return _univerjs_pro_engine_shape[_0x5a3984(0x1bc)];}get[_0x702ed3(0x170)](){const _0x5509a9=_0x702ed3;return _univerjs_pro_engine_shape[_0x5509a9(0x170)];}};function _0x1468(_0x23702c,_0x5345d7){_0x23702c=_0x23702c-0x11e;const _0xc5c5d2=_0xc5c5();let _0x146831=_0xc5c5d2[_0x23702c];return _0x146831;}_univerjs_core_facade[_0x702ed3(0x15d)][_0x702ed3(0x1b1)](FSheetsShapeEnumMixin);function _typeof(_0x5b1ab0){'@babel/helpers - typeof';const _0x4e1ac7=_0x702ed3;return _typeof=_0x4e1ac7(0x133)==typeof Symbol&&_0x4e1ac7(0x164)==typeof Symbol[_0x4e1ac7(0x1a4)]?function(_0x1140d5){return typeof _0x1140d5;}:function(_0x294da4){const _0xf7973c=_0x4e1ac7;return _0x294da4&&_0xf7973c(0x133)==typeof Symbol&&_0x294da4[_0xf7973c(0x16f)]===Symbol&&_0x294da4!==Symbol['prototype']?_0xf7973c(0x164):typeof _0x294da4;},_typeof(_0x5b1ab0);}function toPrimitive(_0x12aa5d,_0x5dcb9b){const _0x12631a=_0x702ed3;if(_0x12631a(0x199)!=_typeof(_0x12aa5d)||!_0x12aa5d)return _0x12aa5d;var _0x44e8c8=_0x12aa5d[Symbol[_0x12631a(0x132)]];if(void 0x0!==_0x44e8c8){var _0x37ec51=_0x44e8c8[_0x12631a(0x131)](_0x12aa5d,_0x5dcb9b||_0x12631a(0x12a));if(_0x12631a(0x199)!=_typeof(_0x37ec51))return _0x37ec51;throw new TypeError(_0x12631a(0x14c));}return(_0x12631a(0x140)===_0x5dcb9b?String:Number)(_0x12aa5d);}function toPropertyKey(_0x39bdaa){const _0xf30f28=_0x702ed3;var _0x5e6fc4=toPrimitive(_0x39bdaa,_0xf30f28(0x140));return _0xf30f28(0x164)==_typeof(_0x5e6fc4)?_0x5e6fc4:_0x5e6fc4+'';}function _defineProperty(_0x59beda,_0x518f9e,_0x2fe8fa){return(_0x518f9e=toPropertyKey(_0x518f9e))in _0x59beda?Object['defineProperty'](_0x59beda,_0x518f9e,{'value':_0x2fe8fa,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x59beda[_0x518f9e]=_0x2fe8fa,_0x59beda;}var FShape=class{constructor(_0x25746c,_0x177c6f,_0x8f77d8,_0xc55d75){const _0xbf558b=_0x702ed3;_defineProperty(this,'unitId',void 0x0),_defineProperty(this,'subUnitId',void 0x0),_defineProperty(this,_0xbf558b(0x14d),void 0x0),_defineProperty(this,'x',0x0),_defineProperty(this,'y',0x0),_defineProperty(this,'width',_univerjs_pro_sheets_shape[_0xbf558b(0x126)]),_defineProperty(this,_0xbf558b(0x16c),_univerjs_pro_sheets_shape[_0xbf558b(0x183)]),_defineProperty(this,_0xbf558b(0x182),void 0x0),_defineProperty(this,_0xbf558b(0x190),{}),_defineProperty(this,'_injector',void 0x0),this[_0xbf558b(0x161)]=_0x25746c,this['subUnitId']=_0x177c6f,this[_0xbf558b(0x14d)]=_0x8f77d8||(0x0,_univerjs_core[_0xbf558b(0x1b4)])(),this[_0xbf558b(0x149)]=_0xc55d75;}[_0x702ed3(0x19f)](_0x542c59,_0x2f4044,_0x1bf234,_0x1bc8f0){const _0x3cc16d=_0x702ed3,_0x495a6e=this[_0x3cc16d(0x149)][_0x3cc16d(0x17f)](_univerjs_sheets[_0x3cc16d(0x19c)])[_0x3cc16d(0x12c)](this[_0x3cc16d(0x161)],this['subUnitId']);if(!_0x495a6e)throw new Error(_0x3cc16d(0x178)+this[_0x3cc16d(0x161)]+_0x3cc16d(0x18b)+this[_0x3cc16d(0x127)]+'\x20not\x20found');const {transform:_0x125392}=(0x0,_univerjs_sheets[_0x3cc16d(0x175)])(this[_0x3cc16d(0x161)],this[_0x3cc16d(0x127)],{'row':_0x542c59,'column':_0x2f4044,'rowOffset':_0x1bf234,'columnOffset':_0x1bc8f0},0x1,0x1,_0x495a6e);return this['x']=_0x125392['left'],this['y']=_0x125392[_0x3cc16d(0x12b)],this;}[_0x702ed3(0x169)](_0x3f2f6a,_0xc4628e){return this['x']=_0x3f2f6a,this['y']=_0xc4628e,this;}[_0x702ed3(0x19d)](_0x1776ff){const _0x5988f3=_0x702ed3;return this[_0x5988f3(0x182)]=_0x1776ff,this;}[_0x702ed3(0x1a1)](_0x384d70,_0x46074c){const _0x3cb39d=_0x702ed3;if(!this[_0x3cb39d(0x190)][_0x3cb39d(0x15a)])this['shapeData'][_0x3cb39d(0x15a)]={};this[_0x3cb39d(0x190)][_0x3cb39d(0x15a)][_0x3cb39d(0x150)]=_univerjs_pro_engine_shape[_0x3cb39d(0x136)][_0x3cb39d(0x13f)];if(_0x384d70!==void 0x0)this[_0x3cb39d(0x190)][_0x3cb39d(0x15a)][_0x3cb39d(0x1b0)]=_0x384d70;if(_0x46074c!==void 0x0)this[_0x3cb39d(0x190)][_0x3cb39d(0x15a)][_0x3cb39d(0x13b)]=_0x46074c;return this;}[_0x702ed3(0x139)](_0x3b0d24,_0x155f95,_0x1cdcc6){const _0xe8ad05=_0x702ed3;if(_0x155f95===void 0x0||_0x155f95[_0xe8ad05(0x160)]===0x0)throw new Error(_0xe8ad05(0x172));if(!this['shapeData'][_0xe8ad05(0x15a)])this[_0xe8ad05(0x190)][_0xe8ad05(0x15a)]={};this[_0xe8ad05(0x190)][_0xe8ad05(0x15a)][_0xe8ad05(0x1a0)]=_0x155f95,this[_0xe8ad05(0x190)][_0xe8ad05(0x15a)][_0xe8ad05(0x150)]=_univerjs_pro_engine_shape[_0xe8ad05(0x136)][_0xe8ad05(0x185)],this[_0xe8ad05(0x190)][_0xe8ad05(0x15a)][_0xe8ad05(0x1b6)]=_0x3b0d24;if(_0x1cdcc6!==void 0x0)this[_0xe8ad05(0x190)]['fill'][_0xe8ad05(0x1b5)]=_0x1cdcc6;return this;}[_0x702ed3(0x176)](){const _0x246cf3=_0x702ed3;return this['shapeData'][_0x246cf3(0x15a)]={'fillType':_univerjs_pro_engine_shape[_0x246cf3(0x136)][_0x246cf3(0x154)]},this;}[_0x702ed3(0x129)](_0x3fa2cd){const _0x31fb33=_0x702ed3;if(!this[_0x31fb33(0x190)][_0x31fb33(0x195)])this[_0x31fb33(0x190)][_0x31fb33(0x195)]={};return this[_0x31fb33(0x190)][_0x31fb33(0x195)][_0x31fb33(0x1b0)]=_0x3fa2cd,this;}[_0x702ed3(0x16a)](_0x555d9f){const _0x1cbf5d=_0x702ed3;if(!this[_0x1cbf5d(0x190)][_0x1cbf5d(0x195)])this['shapeData'][_0x1cbf5d(0x195)]={};return this[_0x1cbf5d(0x190)][_0x1cbf5d(0x195)][_0x1cbf5d(0x16b)]=_0x555d9f,this;}[_0x702ed3(0x18f)](_0x45600d){const _0xd7d6c1=_0x702ed3;if(!this[_0xd7d6c1(0x190)][_0xd7d6c1(0x195)])this[_0xd7d6c1(0x190)][_0xd7d6c1(0x195)]={};return this[_0xd7d6c1(0x190)]['stroke'][_0xd7d6c1(0x1bb)]=_0x45600d,this;}[_0x702ed3(0x123)](_0x323742){const _0x5e80d1=_0x702ed3;if(!this[_0x5e80d1(0x190)]['stroke'])this['shapeData'][_0x5e80d1(0x195)]={};return this[_0x5e80d1(0x190)][_0x5e80d1(0x195)][_0x5e80d1(0x1a3)]=_0x323742,this;}[_0x702ed3(0x143)](_0x59af36){const _0x3dce63=_0x702ed3;if(!this[_0x3dce63(0x190)][_0x3dce63(0x195)])this[_0x3dce63(0x190)][_0x3dce63(0x195)]={};return this[_0x3dce63(0x190)][_0x3dce63(0x195)][_0x3dce63(0x17c)]=_0x59af36,this;}['setStrokeOpacity'](_0x4c5de3){const _0x2d08c1=_0x702ed3;if(!this['shapeData'][_0x2d08c1(0x195)])this[_0x2d08c1(0x190)][_0x2d08c1(0x195)]={};return this[_0x2d08c1(0x190)][_0x2d08c1(0x195)][_0x2d08c1(0x13b)]=_0x4c5de3,this;}[_0x702ed3(0x14e)](_0xd4cac1){const _0x12dd4b=_0x702ed3;if(!this[_0x12dd4b(0x190)][_0x12dd4b(0x195)])this[_0x12dd4b(0x190)][_0x12dd4b(0x195)]={};return this[_0x12dd4b(0x190)][_0x12dd4b(0x195)][_0x12dd4b(0x18d)]=_0xd4cac1,this;}['setWidth'](_0x4abf7e){const _0x1c79b2=_0x702ed3;return this[_0x1c79b2(0x16b)]=_0x4abf7e,this;}[_0x702ed3(0x189)](_0xb67d76){const _0x57a3d6=_0x702ed3;return this[_0x57a3d6(0x16c)]=_0xb67d76,this;}[_0x702ed3(0x165)](){const _0x285523=_0x702ed3,_0x5a5491=this[_0x285523(0x149)][_0x285523(0x17f)](_univerjs_pro_sheets_shape['SheetsShapeService'])['getShapeModel'](this[_0x285523(0x161)],this['subUnitId'],this[_0x285523(0x14d)]);if(_0x5a5491)return(0x0,_univerjs_pro_engine_shape[_0x285523(0x188)])(_0x5a5491[_0x285523(0x196)]());if(this[_0x285523(0x182)])return(0x0,_univerjs_pro_engine_shape[_0x285523(0x188)])(this[_0x285523(0x182)]);return![];}[_0x702ed3(0x17e)](){const _0x34f685=_0x702ed3,_0x12ff04=this[_0x34f685(0x149)][_0x34f685(0x17f)](_univerjs_pro_sheets_shape[_0x34f685(0x1a6)])[_0x34f685(0x1aa)](this[_0x34f685(0x161)],this[_0x34f685(0x127)],this[_0x34f685(0x14d)]);if(!_0x12ff04)return[];const _0x6105b5=this[_0x34f685(0x149)][_0x34f685(0x17f)](_univerjs_drawing[_0x34f685(0x158)])[_0x34f685(0x12e)]({'unitId':this[_0x34f685(0x161)],'subUnitId':this[_0x34f685(0x127)],'drawingId':this[_0x34f685(0x14d)]});if(!(_0x6105b5===null||_0x6105b5===void 0x0?void 0x0:_0x6105b5[_0x34f685(0x186)]))return[];const {width:width=0x0,height:height=0x0}=_0x6105b5[_0x34f685(0x186)];return _0x12ff04[_0x34f685(0x146)]({'width':width,'height':height}),_0x12ff04['getConnectionSiteList']();}[_0x702ed3(0x19a)](){const _0x194f1a=_0x702ed3,_0x3a1ab0=this[_0x194f1a(0x149)][_0x194f1a(0x17f)](_univerjs_pro_sheets_shape[_0x194f1a(0x1a6)])['getShapeModel'](this[_0x194f1a(0x161)],this[_0x194f1a(0x127)],this['drawId']);if(!_0x3a1ab0)return[];const _0x5943fa=this[_0x194f1a(0x149)][_0x194f1a(0x17f)](_univerjs_drawing[_0x194f1a(0x158)])[_0x194f1a(0x12e)]({'unitId':this[_0x194f1a(0x161)],'subUnitId':this[_0x194f1a(0x127)],'drawingId':this[_0x194f1a(0x14d)]});if(!(_0x5943fa===null||_0x5943fa===void 0x0?void 0x0:_0x5943fa['transform']))return[];const {width:width=0x0,height:height=0x0}=_0x5943fa[_0x194f1a(0x186)];return _0x3a1ab0['updateContext']({'width':width,'height':height}),_0x3a1ab0['getDrawingPoints']();}[_0x702ed3(0x13d)](){const _0x4b673d=_0x702ed3,_0x4b56ac=this[_0x4b673d(0x149)][_0x4b673d(0x17f)](_univerjs_pro_sheets_shape['SheetsShapeService'])[_0x4b673d(0x1aa)](this[_0x4b673d(0x161)],this['subUnitId'],this['drawId']);if(!_0x4b56ac)return[];if(!(0x0,_univerjs_pro_engine_shape['isConnectorShape'])(_0x4b56ac[_0x4b673d(0x196)]()))return[];const _0x4caf5d=this[_0x4b673d(0x149)][_0x4b673d(0x17f)](_univerjs_drawing[_0x4b673d(0x158)])[_0x4b673d(0x12e)]({'unitId':this[_0x4b673d(0x161)],'subUnitId':this[_0x4b673d(0x127)],'drawingId':this[_0x4b673d(0x14d)]});if(!(_0x4caf5d===null||_0x4caf5d===void 0x0?void 0x0:_0x4caf5d['transform']))return[];const {width:width=0x0,height:height=0x0}=_0x4caf5d['transform'];return _0x4b56ac['updateContext']({'width':width,'height':height}),_0x4b56ac[_0x4b673d(0x13d)]();}[_0x702ed3(0x155)](){const _0x33b814=_0x702ed3;var _0x211748;const _0x49823c=this[_0x33b814(0x149)][_0x33b814(0x17f)](_univerjs_pro_sheets_shape['SheetsShapeService'])[_0x33b814(0x1aa)](this[_0x33b814(0x161)],this[_0x33b814(0x127)],this[_0x33b814(0x14d)]);if(!_0x49823c)return null;return(_0x211748=_0x49823c[_0x33b814(0x155)]())!==null&&_0x211748!==void 0x0?_0x211748:null;}['getEndConnectInfo'](){const _0x26ff25=_0x702ed3;var _0x3d3a6d;const _0x22f3f5=this[_0x26ff25(0x149)][_0x26ff25(0x17f)](_univerjs_pro_sheets_shape[_0x26ff25(0x1a6)])[_0x26ff25(0x1aa)](this[_0x26ff25(0x161)],this[_0x26ff25(0x127)],this['drawId']);if(!_0x22f3f5)return null;return(_0x3d3a6d=_0x22f3f5['getEndConnectInfo']())!==null&&_0x3d3a6d!==void 0x0?_0x3d3a6d:null;}[_0x702ed3(0x19b)](){const _0x1f8afc=_0x702ed3;var _0x7e32d7,_0x50834b;if(!this[_0x1f8afc(0x182)])throw new Error(_0x1f8afc(0x198));if(this['x']===0x0||this['y']===0x0){const _0x96203e=this[_0x1f8afc(0x149)][_0x1f8afc(0x17f)](_univerjs_sheets[_0x1f8afc(0x19c)])['ensureSkeleton'](this[_0x1f8afc(0x161)],this[_0x1f8afc(0x127)]);if(!_0x96203e)throw new Error('Skeleton\x20for\x20unitId\x20'+this[_0x1f8afc(0x161)]+_0x1f8afc(0x18b)+this[_0x1f8afc(0x127)]+_0x1f8afc(0x1a9));const {transform:_0x15a70c}=(0x0,_univerjs_sheets[_0x1f8afc(0x175)])(this['unitId'],this[_0x1f8afc(0x127)],{'row':0x1,'column':0x1,'rowOffset':0x0,'columnOffset':0x0},0x1,0x1,_0x96203e);this['x']=this['x']>0x0?this['x']:_0x15a70c[_0x1f8afc(0x145)],this['y']=this['y']>0x0?this['y']:_0x15a70c[_0x1f8afc(0x12b)];}return this[_0x1f8afc(0x16b)]=(_0x7e32d7=this[_0x1f8afc(0x16b)])!==null&&_0x7e32d7!==void 0x0?_0x7e32d7:_univerjs_pro_sheets_shape['DEFAULT_SHAPE_WIDTH'],this['height']=(_0x50834b=this[_0x1f8afc(0x16c)])!==null&&_0x50834b!==void 0x0?_0x50834b:_univerjs_pro_sheets_shape[_0x1f8afc(0x183)],{'unitId':this[_0x1f8afc(0x161)],'subUnitId':this['subUnitId'],'shapeId':this[_0x1f8afc(0x14d)],'shapeType':this['shapeType'],'shapeData':Object['keys'](this[_0x1f8afc(0x190)])[_0x1f8afc(0x160)]>0x0?this[_0x1f8afc(0x190)]:void 0x0,'x':this['x'],'y':this['y'],'width':this[_0x1f8afc(0x16b)],'height':this['height']};}[_0x702ed3(0x15b)](){return this['drawId'];}[_0x702ed3(0x196)](){const _0x4f01d3=_0x702ed3;return this[_0x4f01d3(0x182)];}[_0x702ed3(0x11e)](){return this['shapeData'];}[_0x702ed3(0x1a5)](){return{'x':this['x'],'y':this['y']};}[_0x702ed3(0x187)](){const _0x5eecd8=_0x702ed3;return{'width':this[_0x5eecd8(0x16b)],'height':this['height']};}},FConnectorShape=class extends FShape{constructor(_0x5e608e,_0x521a01,_0x6bdc9b,_0x5dc03a){const _0x34ffe8=_0x702ed3;super(_0x5e608e,_0x521a01,_0x6bdc9b,_0x5dc03a),_defineProperty(this,_0x34ffe8(0x190),{});}[_0x702ed3(0x19d)](_0x3f1ec4){const _0x258ef7=_0x702ed3;if(!(0x0,_univerjs_pro_engine_shape[_0x258ef7(0x188)])(_0x3f1ec4))throw new Error('Invalid\x20shape\x20type\x20for\x20connector.\x20Received\x20'+_0x3f1ec4+_0x258ef7(0x157));return super[_0x258ef7(0x19d)](_0x3f1ec4),this;}[_0x702ed3(0x1ab)](_0x17f4cd){const _0x2cba6e=_0x702ed3;var _0x559825,_0x392f65;if(!((_0x559825=this[_0x2cba6e(0x190)])===null||_0x559825===void 0x0?void 0x0:_0x559825['ln']))this['shapeData']['ln']={};if(!((_0x392f65=this[_0x2cba6e(0x190)])===null||_0x392f65===void 0x0||(_0x392f65=_0x392f65['ln'])===null||_0x392f65===void 0x0?void 0x0:_0x392f65[_0x2cba6e(0x13a)]))this[_0x2cba6e(0x190)]['ln']['startArrow']={};return this[_0x2cba6e(0x190)]['ln'][_0x2cba6e(0x13a)][_0x2cba6e(0x14f)]=_0x17f4cd,this;}[_0x702ed3(0x181)](_0x920e63){const _0x59e1dc=_0x702ed3;var _0x55e53b,_0x38563f;if(!((_0x55e53b=this['shapeData'])===null||_0x55e53b===void 0x0?void 0x0:_0x55e53b['ln']))this[_0x59e1dc(0x190)]['ln']={};if(!((_0x38563f=this[_0x59e1dc(0x190)])===null||_0x38563f===void 0x0||(_0x38563f=_0x38563f['ln'])===null||_0x38563f===void 0x0?void 0x0:_0x38563f[_0x59e1dc(0x141)]))this[_0x59e1dc(0x190)]['ln'][_0x59e1dc(0x141)]={};return this[_0x59e1dc(0x190)]['ln'][_0x59e1dc(0x141)][_0x59e1dc(0x14f)]=_0x920e63,this;}[_0x702ed3(0x184)](_0x1a4f37){const _0x3a871b=_0x702ed3;var _0x1f6f81,_0x3471c0;if(!((_0x1f6f81=this[_0x3a871b(0x190)])===null||_0x1f6f81===void 0x0?void 0x0:_0x1f6f81['ln']))this['shapeData']['ln']={};if(!((_0x3471c0=this['shapeData'])===null||_0x3471c0===void 0x0||(_0x3471c0=_0x3471c0['ln'])===null||_0x3471c0===void 0x0?void 0x0:_0x3471c0[_0x3a871b(0x13a)]))this[_0x3a871b(0x190)]['ln'][_0x3a871b(0x13a)]={};return this[_0x3a871b(0x190)]['ln'][_0x3a871b(0x13a)][_0x3a871b(0x163)]=_0x1a4f37,this;}[_0x702ed3(0x13c)](_0x15192c){const _0x272d3e=_0x702ed3;var _0x2c5dda,_0x4cdd34;if(!((_0x2c5dda=this[_0x272d3e(0x190)])===null||_0x2c5dda===void 0x0?void 0x0:_0x2c5dda['ln']))this['shapeData']['ln']={};if(!((_0x4cdd34=this[_0x272d3e(0x190)])===null||_0x4cdd34===void 0x0||(_0x4cdd34=_0x4cdd34['ln'])===null||_0x4cdd34===void 0x0?void 0x0:_0x4cdd34[_0x272d3e(0x141)]))this[_0x272d3e(0x190)]['ln'][_0x272d3e(0x141)]={};return this[_0x272d3e(0x190)]['ln'][_0x272d3e(0x141)][_0x272d3e(0x163)]=_0x15192c,this;}[_0x702ed3(0x19b)](){return super['build']();}[_0x702ed3(0x134)](){const _0x5b3bc0=_0x702ed3;var _0x203cd2;return((_0x203cd2=this[_0x5b3bc0(0x190)])===null||_0x203cd2===void 0x0||(_0x203cd2=_0x203cd2[_0x5b3bc0(0x16e)])===null||_0x203cd2===void 0x0?void 0x0:_0x203cd2['to'])||null;}[_0x702ed3(0x155)](){const _0x24f246=_0x702ed3;var _0x4c71d3;return((_0x4c71d3=this[_0x24f246(0x190)])===null||_0x4c71d3===void 0x0||(_0x4c71d3=_0x4c71d3[_0x24f246(0x16e)])===null||_0x4c71d3===void 0x0?void 0x0:_0x4c71d3[_0x24f246(0x135)])||null;}};function computeConnectionPointInfo(_0x34edd7,_0x4a93ef,_0xe003ea,_0x4a75c3,_0x520cc0,_0x10dab6){const _0x543b2a=_0x702ed3,_0x3203d3=_0x520cc0[_0x543b2a(0x1aa)](_0x34edd7,_0x4a93ef,_0xe003ea);if(!_0x3203d3)return null;const _0x15c07e=_0x10dab6[_0x543b2a(0x12e)]({'unitId':_0x34edd7,'subUnitId':_0x4a93ef,'drawingId':_0xe003ea});if(!(_0x15c07e===null||_0x15c07e===void 0x0?void 0x0:_0x15c07e[_0x543b2a(0x186)]))return null;const {left:left=0x0,top:top=0x0,width:width=0x0,height:height=0x0,flipX:flipX=![],flipY:flipY=![],angle:_0x252e36}=_0x15c07e[_0x543b2a(0x186)];_0x3203d3[_0x543b2a(0x146)]({'width':width,'height':height});const _0x5210f5=_0x3203d3[_0x543b2a(0x120)]()[_0x543b2a(0x153)](_0x2f2ef8=>_0x2f2ef8[_0x543b2a(0x12f)]===_0x4a75c3);if(!_0x5210f5)return null;let _0x137f83=flipX?width-_0x5210f5['x']:_0x5210f5['x'],_0x444be7=flipY?height-_0x5210f5['y']:_0x5210f5['y'];if(_0x252e36&&_0x252e36!==0x0){const _0x1d175d=_0x252e36*Math['PI']/0xb4,_0x5086f0=Math[_0x543b2a(0x1ad)](_0x1d175d),_0xff300b=Math['sin'](_0x1d175d),_0x2f105f=width/0x2,_0x4f5a68=height/0x2,_0x5f2fe5=_0x137f83-_0x2f105f,_0x2ae64f=_0x444be7-_0x4f5a68;_0x137f83=_0x2f105f+_0x5f2fe5*_0x5086f0-_0x2ae64f*_0xff300b,_0x444be7=_0x4f5a68+_0x5f2fe5*_0xff300b+_0x2ae64f*_0x5086f0;}_0x137f83+=left,_0x444be7+=top;let _0x3e948b=_0x5210f5['ang']/0xea60;if(flipX)_0x3e948b=0xb4-_0x3e948b;if(flipY)_0x3e948b=-_0x3e948b;_0x3e948b+=_0x252e36||0x0,_0x3e948b=(_0x3e948b%0x168+0x168)%0x168;const _0x3e0599=(0x0,_univerjs_pro_engine_shape[_0x543b2a(0x17d)])({'left':left,'top':top,'width':width,'height':height},_0x252e36||0x0);return{'point':{'x':_0x137f83,'y':_0x444be7},'angle':_0x3e948b,'bounds':_0x3e0599};}function calculateFreeEndpointAngle(_0x38ef97,_0x973d2d){const _0x27374f=_0x702ed3,_0x1aa9e1=_0x973d2d['x']-_0x38ef97['x'],_0x4f17d0=_0x973d2d['y']-_0x38ef97['y'];if(Math['abs'](_0x1aa9e1)>=Math[_0x27374f(0x1b3)](_0x4f17d0))return _0x1aa9e1>=0x0?0xb4:0x0;return _0x4f17d0>=0x0?0x10e:0x5a;}function computeFreeEndpointInfo(_0x271d39,_0x168ac3,_0x3064bc,_0x1def36,_0x23cd5b,_0x1787ec,_0x5b257c){const _0x41215a=_0x702ed3,_0x3eb8eb=_0x1787ec[_0x41215a(0x1aa)](_0x271d39,_0x168ac3,_0x3064bc);if(!_0x3eb8eb)return null;const _0x535bcc=_0x5b257c[_0x41215a(0x12e)]({'unitId':_0x271d39,'subUnitId':_0x168ac3,'drawingId':_0x3064bc});if(!(_0x535bcc===null||_0x535bcc===void 0x0?void 0x0:_0x535bcc[_0x41215a(0x186)]))return null;const {left:left=0x0,top:top=0x0,width:width=0x0,height:height=0x0,flipX:flipX=![],flipY:flipY=![]}=_0x535bcc[_0x41215a(0x186)];_0x3eb8eb[_0x41215a(0x146)]({'width':width,'height':height});const _0x4ea071=_0x3eb8eb[_0x41215a(0x13d)]();if(_0x4ea071['length']<0x2)return null;const _0x5a4434=_0x1def36?_0x4ea071[0x0]:_0x4ea071[_0x4ea071[_0x41215a(0x160)]-0x1],_0x48f274=new _univerjs_pro_engine_shape[(_0x41215a(0x15e))]({'left':left,'top':top,'width':width,'height':height,'flipX':flipX,'flipY':flipY})[_0x41215a(0x180)](_0x5a4434);return{'point':_0x48f274,'angle':calculateFreeEndpointAngle(_0x23cd5b[_0x41215a(0x18a)],_0x48f274),'bounds':{'left':_0x48f274['x'],'top':_0x48f274['y'],'width':0x0,'height':0x0}};}function _0xc5c5(){const _0x57ea18=['function','getEndConnectInfo','from','ShapeFillEnum','DRAWING_SHAPE','routeConnectorLineShape','setShapeGradientFill','startArrow','opacity','setEndArrowSize','getConnectorLinePoints','1263582UNluQk','SolidFill','string','endArrow','FShape','setStrokeLineCapType','UpdateConnectorRelationCommand','left','updateContext','entries','shape','_injector','getSheetId','cxnIndex','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','drawId','setStrokeLineType','type','fillType','7kvRtzb','flipY','find','NoFill','getStartConnectInfo','_preloadShapeProperties',',\x20but\x20expected\x20a\x20connector\x20shape\x20type.','IDrawingManagerService','stringify','fill','getShapeId','ShapeTypeEnum','FEnum','ConnectorCoordinateTransform','DrawingTypeEnum','length','unitId','754779yXGPzl','size','symbol','isLineShape','worldRect','lineType','670DYsHKw','setAbsolutePosition','setStrokeWidth','width','height','getUnitId','relation','constructor','ShapeArrowSizeEnum','2068119cdhdmc','colorStops\x20is\x20required\x20and\x20should\x20contain\x20at\x20least\x20one\x20color\x20stop.','parse','getWorkbook','convertPositionCellToSheetOverGrid','setNoneFill','ShapeLineJoinEnum','Skeleton\x20for\x20unitId\x20','removeShape','toStringTag','_commandService','capType','getBasicShapeRotateBound','getConnectionSites','get','localToWorld','setEndArrowType','shapeType','DEFAULT_SHAPE_HEIGHT','setStartArrowSize','GradientFill','transform','getSize','isConnectorShape','setHeight','point','\x20and\x20subUnitId\x20','128670PMKjSe','lineStrokeType','connectShapes','setStrokeLineDashType','shapeData','getAdjustValueByName','_resolveEndpoints','InsertShapeCommand','9534000qjkUCc','stroke','getShapeType','_resolveExistingOrFreeEndpoint','Shape\x20type\x20is\x20required.\x20Please\x20call\x20setShapeType()\x20before\x20build().','object','getAdjustPoints','build','SheetSkeletonService','setShapeType','Module','setPosition','gradientStops','setShapeSolidFill','ShapeLineDashEnum','lineJoinType','iterator','getPosition','SheetsShapeService','385446NgpDsO','insertShape','\x20not\x20found','getShapeModel','setStartArrowType','rotation','cos','shapeId','connectionSiteIndex','color','extend','SetShapeDrawingDataCommand','abs','generateRandomId','gradientAngle','gradientType','FConnectorShape','ShapeGradientTypeEnum','newConnector','flipX','dashType','ShapeArrowTypeEnum','getShapeData','getShapes','getConnectionSiteList','defineProperty','40QAHQEv','setStrokeLineJoinType','executeCommand','ShapeLineTypeEnum','DEFAULT_SHAPE_WIDTH','subUnitId','ISheetDrawingService','setStrokeColor','default','top','ensureSkeleton','push','getDrawingByParam','index','19896qiKdBM','call','toPrimitive'];_0xc5c5=function(){return _0x57ea18;};return _0xc5c5();}var FWorksheetShapeMixin=class extends _univerjs_sheets_facade['FWorksheet']{async[_0x702ed3(0x1a8)](_0x31e2d9){const _0x3f94a1=_0x702ed3,{unitId:_0x2b5b18,subUnitId:_0x4ec428,shapeId:_0x18e310,shapeType:_0x218ae6,shapeData:_0x4419ce,x:_0x5a7544,y:_0x4ee4e0,width:_0x3a38d0,height:_0x410715}=_0x31e2d9;return this['_commandService'][_0x3f94a1(0x124)](_univerjs_pro_sheets_shape[_0x3f94a1(0x193)]['id'],{'unitId':_0x2b5b18,'subUnitId':_0x4ec428,'shapeId':_0x18e310,'shapeType':_0x218ae6,'shapeData':_0x4419ce,'position':{'x':_0x5a7544,'y':_0x4ee4e0},'width':_0x3a38d0,'height':_0x410715});}async['updateShape'](_0x189a81){const _0x53a87a=_0x702ed3,{unitId:_0xfdb576,subUnitId:_0x125c96,shapeId:_0x2c226b,shapeType:_0x5d7a60,shapeData:_0x27ec9a,x:_0x369323,y:_0x5ea641,width:_0x3ffe15,height:_0x525426}=_0x189a81;return this[_0x53a87a(0x17b)]['executeCommand'](_univerjs_pro_sheets_shape[_0x53a87a(0x1b2)]['id'],{'unitId':_0xfdb576,'subUnitId':_0x125c96,'shapeId':_0x2c226b,'shapeType':_0x5d7a60,'shapeData':_0x27ec9a,'position':{'x':_0x369323,'y':_0x5ea641},'width':_0x3ffe15,'height':_0x525426});}['newShape'](_0x5d4091){const _0x2acbf9=_0x702ed3,_0xd70e74=this[_0x2acbf9(0x174)]()['getUnitId'](),_0x4f3ef1=this['getSheetId']();if(_0x5d4091){const _0x22e428=new FShape(_0xd70e74,_0x4f3ef1,_0x5d4091[_0x2acbf9(0x14d)],this[_0x2acbf9(0x149)]);return this[_0x2acbf9(0x156)](_0x22e428,_0xd70e74,_0x4f3ef1,_0x5d4091['drawId']),_0x22e428;}return new FShape(_0xd70e74,_0x4f3ef1,(0x0,_univerjs_core['generateRandomId'])(),this[_0x2acbf9(0x149)]);}[_0x702ed3(0x1b9)](_0x2f90ac){const _0x2bddc6=_0x702ed3,_0x108f59=this[_0x2bddc6(0x174)]()[_0x2bddc6(0x16d)](),_0x41e9bf=this[_0x2bddc6(0x14a)]();if(_0x2f90ac){const _0x4f4aed=new FConnectorShape(_0x108f59,_0x41e9bf,_0x2f90ac[_0x2bddc6(0x14d)],this['_injector']);return this[_0x2bddc6(0x156)](_0x4f4aed,_0x108f59,_0x41e9bf,_0x2f90ac[_0x2bddc6(0x14d)]),_0x4f4aed;}return new FConnectorShape(_0x108f59,_0x41e9bf,(0x0,_univerjs_core[_0x2bddc6(0x1b4)])(),this[_0x2bddc6(0x149)]);}[_0x702ed3(0x11f)](){const _0x88512f=_0x702ed3,_0x572618=this[_0x88512f(0x149)]['get'](_univerjs_sheets_drawing[_0x88512f(0x128)]),_0x1634b7=this[_0x88512f(0x174)]()[_0x88512f(0x16d)](),_0x1f48f6=this[_0x88512f(0x14a)](),_0x53c3c6=_0x572618['getDrawingData'](_0x1634b7,_0x1f48f6);if(!_0x53c3c6)return[];const _0x263845=[];for(const [_0x3fd05c,_0xc395b0]of Object[_0x88512f(0x147)](_0x53c3c6))if(_0xc395b0&&_0xc395b0['drawingType']===_univerjs_core[_0x88512f(0x15f)][_0x88512f(0x137)]){const _0x423b46=new FShape(_0x1634b7,_0x1f48f6,_0x3fd05c,this['_injector']);this[_0x88512f(0x156)](_0x423b46,_0x1634b7,_0x1f48f6,_0x3fd05c),_0x263845[_0x88512f(0x12d)](_0x423b46);}return _0x263845;}[_0x702ed3(0x179)](_0x5ac9d4){const _0x46e997=_0x702ed3,{unitId:_0x4cc4aa,subUnitId:_0xc6e2e7,drawId:_0x512137}=_0x5ac9d4;return this['_commandService'][_0x46e997(0x124)](_univerjs_sheets_drawing['RemoveSheetDrawingCommand']['id'],{'unitId':_0x4cc4aa,'drawings':[{'unitId':_0x4cc4aa,'subUnitId':_0xc6e2e7,'drawingId':_0x512137,'drawingType':_univerjs_core[_0x46e997(0x15f)][_0x46e997(0x137)]}]});}async[_0x702ed3(0x18e)](_0x131132){const _0x572e89=_0x702ed3,{connector:_0x19bff4,startTarget:_0x2aa2c5,endTarget:_0x3038ac}=_0x131132;if(!_0x2aa2c5&&!_0x3038ac)return![];const _0xfa9b33=this[_0x572e89(0x174)]()['getUnitId'](),_0x18b67b=this['getSheetId'](),_0x4823b4=this[_0x572e89(0x149)][_0x572e89(0x17f)](_univerjs_pro_sheets_shape['SheetsShapeService']),_0x5b48aa=this[_0x572e89(0x149)]['get'](_univerjs_drawing[_0x572e89(0x158)]),_0x16c0dd=_0x4823b4[_0x572e89(0x1aa)](_0xfa9b33,_0x18b67b,_0x19bff4[_0x572e89(0x14d)]);if(!_0x16c0dd)return![];const _0x2acfc8=_0x16c0dd['getShapeType'](),_0x38171e=_0x16c0dd['getShapeRelation'](),_0x201afa={};for(const _0x548fc8 of _0x16c0dd['getAdjustNames']()){const _0x5ea38a=_0x16c0dd[_0x572e89(0x191)](_0x548fc8);if(_0x5ea38a!==void 0x0)_0x201afa[_0x548fc8]=_0x5ea38a;}const {startInfo:_0xf4550,endInfo:_0x24b3ea}=this[_0x572e89(0x192)](_0xfa9b33,_0x18b67b,_0x19bff4,_0x16c0dd,_0x2aa2c5,_0x3038ac,_0x4823b4,_0x5b48aa,_0x38171e);if(!_0xf4550||!_0x24b3ea)return![];const _0x22111a=(0x0,_univerjs_pro_engine_shape['computeConnectorRouteLayout'])((0x0,_univerjs_pro_engine_shape[_0x572e89(0x138)])(_0xf4550,_0x24b3ea,_0x2acfc8),_0x2acfc8),_0x36cbb8={};if(_0x2aa2c5)_0x36cbb8[_0x572e89(0x135)]={'shapeId':_0x2aa2c5[_0x572e89(0x148)][_0x572e89(0x14d)],'cxnIndex':_0x2aa2c5[_0x572e89(0x1af)]};else{if(_0x38171e===null||_0x38171e===void 0x0?void 0x0:_0x38171e[_0x572e89(0x135)])_0x36cbb8[_0x572e89(0x135)]=_0x38171e[_0x572e89(0x135)];}if(_0x3038ac)_0x36cbb8['to']={'shapeId':_0x3038ac[_0x572e89(0x148)][_0x572e89(0x14d)],'cxnIndex':_0x3038ac[_0x572e89(0x1af)]};else{if(_0x38171e===null||_0x38171e===void 0x0?void 0x0:_0x38171e['to'])_0x36cbb8['to']=_0x38171e['to'];}return this[_0x572e89(0x17b)][_0x572e89(0x124)](_univerjs_pro_sheets_shape[_0x572e89(0x144)]['id'],{'unitId':_0xfa9b33,'subUnitId':_0x18b67b,'connectorShapeId':_0x19bff4[_0x572e89(0x14d)],'width':_0x22111a['worldRect'][_0x572e89(0x16b)],'height':_0x22111a[_0x572e89(0x166)]['height'],'left':_0x22111a[_0x572e89(0x166)][_0x572e89(0x145)],'top':_0x22111a[_0x572e89(0x166)][_0x572e89(0x12b)],'flipX':_0x22111a[_0x572e89(0x166)][_0x572e89(0x1ba)]||![],'flipY':_0x22111a[_0x572e89(0x166)][_0x572e89(0x152)]||![],'oldAdjustValues':_0x201afa,'newAdjustValues':_0x22111a['adjustValues'],'newLineType':_0x22111a[_0x572e89(0x167)],'oldLineType':_0x2acfc8,'rotation':_0x22111a[_0x572e89(0x1ac)],'oldRelation':_0x38171e,'newRelation':_0x36cbb8});}[_0x702ed3(0x156)](_0x24355b,_0x1b7a17,_0x271db5,_0x5e0f00){const _0x5b840b=_0x702ed3,_0x4cf52c=this[_0x5b840b(0x149)][_0x5b840b(0x17f)](_univerjs_drawing[_0x5b840b(0x158)])[_0x5b840b(0x12e)]({'unitId':_0x1b7a17,'subUnitId':_0x271db5,'drawingId':_0x5e0f00});if(_0x4cf52c===null||_0x4cf52c===void 0x0?void 0x0:_0x4cf52c['transform']){var _0x2f3660,_0x2e4ebe,_0x5071aa,_0x59f21f;_0x24355b['x']=(_0x2f3660=_0x4cf52c[_0x5b840b(0x186)]['left'])!==null&&_0x2f3660!==void 0x0?_0x2f3660:0x0,_0x24355b['y']=(_0x2e4ebe=_0x4cf52c[_0x5b840b(0x186)][_0x5b840b(0x12b)])!==null&&_0x2e4ebe!==void 0x0?_0x2e4ebe:0x0,_0x24355b[_0x5b840b(0x16b)]=(_0x5071aa=_0x4cf52c[_0x5b840b(0x186)][_0x5b840b(0x16b)])!==null&&_0x5071aa!==void 0x0?_0x5071aa:_0x24355b['width'],_0x24355b[_0x5b840b(0x16c)]=(_0x59f21f=_0x4cf52c[_0x5b840b(0x186)][_0x5b840b(0x16c)])!==null&&_0x59f21f!==void 0x0?_0x59f21f:_0x24355b[_0x5b840b(0x16c)];}const _0x12060e=this[_0x5b840b(0x149)][_0x5b840b(0x17f)](_univerjs_pro_sheets_shape[_0x5b840b(0x1a6)])[_0x5b840b(0x1aa)](_0x1b7a17,_0x271db5,_0x5e0f00);if(_0x12060e){_0x24355b[_0x5b840b(0x182)]=_0x12060e[_0x5b840b(0x196)]();const _0x4e3443=_0x12060e[_0x5b840b(0x11e)]();if(_0x4e3443)_0x24355b[_0x5b840b(0x190)]=JSON[_0x5b840b(0x173)](JSON[_0x5b840b(0x159)](_0x4e3443));}}[_0x702ed3(0x192)](_0x47ebaa,_0x29e0bd,_0x1b3ffc,_0x60d974,_0x51306a,_0x479b02,_0x2cc558,_0x179da4,_0x11300c){const _0x5114ea=_0x702ed3;let _0x568d09=null,_0x2fb90e=null;if(_0x51306a)_0x568d09=computeConnectionPointInfo(_0x47ebaa,_0x29e0bd,_0x51306a['shape'][_0x5114ea(0x14d)],_0x51306a[_0x5114ea(0x1af)],_0x2cc558,_0x179da4);if(_0x479b02)_0x2fb90e=computeConnectionPointInfo(_0x47ebaa,_0x29e0bd,_0x479b02[_0x5114ea(0x148)][_0x5114ea(0x14d)],_0x479b02['connectionSiteIndex'],_0x2cc558,_0x179da4);if(!_0x568d09)_0x568d09=this[_0x5114ea(0x197)](_0x47ebaa,_0x29e0bd,_0x1b3ffc[_0x5114ea(0x14d)],!![],_0x2fb90e,_0x11300c===null||_0x11300c===void 0x0?void 0x0:_0x11300c[_0x5114ea(0x135)],_0x2cc558,_0x179da4);if(!_0x2fb90e)_0x2fb90e=this[_0x5114ea(0x197)](_0x47ebaa,_0x29e0bd,_0x1b3ffc['drawId'],![],_0x568d09,_0x11300c===null||_0x11300c===void 0x0?void 0x0:_0x11300c['to'],_0x2cc558,_0x179da4);return{'startInfo':_0x568d09,'endInfo':_0x2fb90e};}['_resolveExistingOrFreeEndpoint'](_0x113e3a,_0x451eba,_0x24195f,_0x6e5973,_0x2d1f1a,_0x21ab43,_0x426a10,_0x3489da){const _0x55efb1=_0x702ed3;if(_0x21ab43){const _0x4d2a1c=computeConnectionPointInfo(_0x113e3a,_0x451eba,_0x21ab43[_0x55efb1(0x1ae)],_0x21ab43[_0x55efb1(0x14b)],_0x426a10,_0x3489da);if(_0x4d2a1c)return _0x4d2a1c;}if(!_0x2d1f1a)return null;return computeFreeEndpointInfo(_0x113e3a,_0x451eba,_0x24195f,_0x6e5973,_0x2d1f1a,_0x426a10,_0x3489da);}};_univerjs_sheets_facade['FWorksheet'][_0x702ed3(0x1b1)](FWorksheetShapeMixin),exports[_0x702ed3(0x1b7)]=FConnectorShape,exports[_0x702ed3(0x142)]=FShape;
1
+ const _0x2ffec3=_0x136b;(function(_0x5b702c,_0x4695c9){const _0x3fceb8=_0x136b,_0x581608=_0x5b702c();while(!![]){try{const _0x5083fd=-parseInt(_0x3fceb8(0x1b4))/0x1*(-parseInt(_0x3fceb8(0x221))/0x2)+-parseInt(_0x3fceb8(0x202))/0x3*(-parseInt(_0x3fceb8(0x22a))/0x4)+-parseInt(_0x3fceb8(0x20b))/0x5+-parseInt(_0x3fceb8(0x214))/0x6+-parseInt(_0x3fceb8(0x204))/0x7+-parseInt(_0x3fceb8(0x205))/0x8+parseInt(_0x3fceb8(0x1d8))/0x9*(parseInt(_0x3fceb8(0x1c4))/0xa);if(_0x5083fd===_0x4695c9)break;else _0x581608['push'](_0x581608['shift']());}catch(_0x418462){_0x581608['push'](_0x581608['shift']());}}}(_0x1762,0x67805),Object[_0x2ffec3(0x229)](exports,Symbol[_0x2ffec3(0x1b6)],{'value':_0x2ffec3(0x1ec)}));function _0x136b(_0x7be385,_0x1b9db4){_0x7be385=_0x7be385-0x1ab;const _0x1762b3=_0x1762();let _0x136b31=_0x1762b3[_0x7be385];return _0x136b31;}let _univerjs_pro_engine_shape=require('@univerjs-pro/engine-shape'),_univerjs_core_facade=require('@univerjs/core/facade'),_univerjs_pro_sheets_shape=require('@univerjs-pro/sheets-shape'),_univerjs_core=require('@univerjs/core'),_univerjs_drawing=require('@univerjs/drawing'),_univerjs_sheets=require('@univerjs/sheets'),_univerjs_sheets_drawing=require('@univerjs/sheets-drawing'),_univerjs_sheets_facade=require('@univerjs/sheets/facade');var FSheetsShapeEnumMixin=class extends _univerjs_core_facade[_0x2ffec3(0x1b7)]{get['ShapeTypeEnum'](){const _0x20746e=_0x2ffec3;return _univerjs_pro_engine_shape[_0x20746e(0x1ee)];}get[_0x2ffec3(0x225)](){const _0x2adb10=_0x2ffec3;return _univerjs_pro_engine_shape[_0x2adb10(0x225)];}get['ShapeGradientTypeEnum'](){const _0x6bfb64=_0x2ffec3;return _univerjs_pro_engine_shape[_0x6bfb64(0x222)];}get[_0x2ffec3(0x218)](){const _0x10f16b=_0x2ffec3;return _univerjs_pro_engine_shape[_0x10f16b(0x218)];}get[_0x2ffec3(0x23d)](){const _0x50438a=_0x2ffec3;return _univerjs_pro_engine_shape[_0x50438a(0x23d)];}get[_0x2ffec3(0x1e8)](){const _0x1e8d6b=_0x2ffec3;return _univerjs_pro_engine_shape[_0x1e8d6b(0x1e8)];}get[_0x2ffec3(0x233)](){const _0x5ebf9d=_0x2ffec3;return _univerjs_pro_engine_shape[_0x5ebf9d(0x233)];}get[_0x2ffec3(0x20a)](){return _univerjs_pro_engine_shape['ShapeArrowTypeEnum'];}get[_0x2ffec3(0x22f)](){return _univerjs_pro_engine_shape['ShapeArrowSizeEnum'];}};_univerjs_core_facade[_0x2ffec3(0x1b7)]['extend'](FSheetsShapeEnumMixin);function _typeof(_0x4f96e1){'@babel/helpers - typeof';const _0xfc47=_0x2ffec3;return _typeof='function'==typeof Symbol&&_0xfc47(0x1f6)==typeof Symbol[_0xfc47(0x1e5)]?function(_0x4175be){return typeof _0x4175be;}:function(_0x9607ff){const _0x1c511d=_0xfc47;return _0x9607ff&&_0x1c511d(0x1fc)==typeof Symbol&&_0x9607ff['constructor']===Symbol&&_0x9607ff!==Symbol[_0x1c511d(0x217)]?_0x1c511d(0x1f6):typeof _0x9607ff;},_typeof(_0x4f96e1);}function toPrimitive(_0x45ad38,_0x5a69df){const _0x3b5e84=_0x2ffec3;if(_0x3b5e84(0x23a)!=_typeof(_0x45ad38)||!_0x45ad38)return _0x45ad38;var _0x35142a=_0x45ad38[Symbol[_0x3b5e84(0x1f7)]];if(void 0x0!==_0x35142a){var _0x2bd39f=_0x35142a[_0x3b5e84(0x1db)](_0x45ad38,_0x5a69df||_0x3b5e84(0x20f));if(_0x3b5e84(0x23a)!=_typeof(_0x2bd39f))return _0x2bd39f;throw new TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return('string'===_0x5a69df?String:Number)(_0x45ad38);}function toPropertyKey(_0x420af5){const _0x17764f=_0x2ffec3;var _0x2e2fe2=toPrimitive(_0x420af5,_0x17764f(0x200));return _0x17764f(0x1f6)==_typeof(_0x2e2fe2)?_0x2e2fe2:_0x2e2fe2+'';}function _defineProperty(_0x490f3c,_0x260caf,_0x3d6419){const _0x19bca9=_0x2ffec3;return(_0x260caf=toPropertyKey(_0x260caf))in _0x490f3c?Object[_0x19bca9(0x229)](_0x490f3c,_0x260caf,{'value':_0x3d6419,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x490f3c[_0x260caf]=_0x3d6419,_0x490f3c;}var FShape=class{constructor(_0x609e53,_0xd65334,_0x22a753,_0x5b721b){const _0x2f60e7=_0x2ffec3;_defineProperty(this,'unitId',void 0x0),_defineProperty(this,_0x2f60e7(0x21c),void 0x0),_defineProperty(this,_0x2f60e7(0x227),void 0x0),_defineProperty(this,'x',0x0),_defineProperty(this,'y',0x0),_defineProperty(this,_0x2f60e7(0x1e6),_univerjs_pro_sheets_shape['DEFAULT_SHAPE_WIDTH']),_defineProperty(this,_0x2f60e7(0x1d2),_univerjs_pro_sheets_shape['DEFAULT_SHAPE_HEIGHT']),_defineProperty(this,_0x2f60e7(0x1fe),void 0x0),_defineProperty(this,_0x2f60e7(0x1ef),{}),_defineProperty(this,_0x2f60e7(0x1f4),void 0x0),this[_0x2f60e7(0x1bf)]=_0x609e53,this[_0x2f60e7(0x21c)]=_0xd65334,this[_0x2f60e7(0x227)]=_0x22a753||(0x0,_univerjs_core[_0x2f60e7(0x232)])(),this[_0x2f60e7(0x1f4)]=_0x5b721b;}[_0x2ffec3(0x1b8)](_0x1ca459,_0x45789a,_0x2ecb6c,_0x9b8b56){const _0x5984f8=_0x2ffec3,_0x25473f=this[_0x5984f8(0x1f4)][_0x5984f8(0x234)](_univerjs_sheets[_0x5984f8(0x22c)])[_0x5984f8(0x201)](this[_0x5984f8(0x1bf)],this[_0x5984f8(0x21c)]);if(!_0x25473f)throw new Error(_0x5984f8(0x1e3)+this[_0x5984f8(0x1bf)]+_0x5984f8(0x230)+this[_0x5984f8(0x21c)]+'\x20not\x20found');const {transform:_0x23f7ec}=(0x0,_univerjs_sheets[_0x5984f8(0x1f1)])(this[_0x5984f8(0x1bf)],this['subUnitId'],{'row':_0x1ca459,'column':_0x45789a,'rowOffset':_0x2ecb6c,'columnOffset':_0x9b8b56},0x1,0x1,_0x25473f);return this['x']=_0x23f7ec[_0x5984f8(0x1c9)],this['y']=_0x23f7ec[_0x5984f8(0x1eb)],this;}[_0x2ffec3(0x23c)](_0x44bb90,_0x5c9914){return this['x']=_0x44bb90,this['y']=_0x5c9914,this;}[_0x2ffec3(0x21a)](_0x48e5d3){const _0x141748=_0x2ffec3;return this[_0x141748(0x1fe)]=_0x48e5d3,this;}[_0x2ffec3(0x1c2)](_0x5e22b1,_0x9e734a){const _0x196f91=_0x2ffec3;if(!this[_0x196f91(0x1ef)][_0x196f91(0x1f2)])this[_0x196f91(0x1ef)][_0x196f91(0x1f2)]={};this[_0x196f91(0x1ef)][_0x196f91(0x1f2)][_0x196f91(0x1de)]=_univerjs_pro_engine_shape[_0x196f91(0x225)][_0x196f91(0x21e)];if(_0x5e22b1!==void 0x0)this[_0x196f91(0x1ef)][_0x196f91(0x1f2)]['color']=_0x5e22b1;if(_0x9e734a!==void 0x0)this['shapeData']['fill'][_0x196f91(0x219)]=_0x9e734a;return this;}[_0x2ffec3(0x1af)](_0x583f50,_0xaaae75,_0x5285b8){const _0x4007e6=_0x2ffec3;if(_0xaaae75===void 0x0||_0xaaae75[_0x4007e6(0x1bc)]===0x0)throw new Error(_0x4007e6(0x1cf));if(!this[_0x4007e6(0x1ef)][_0x4007e6(0x1f2)])this[_0x4007e6(0x1ef)][_0x4007e6(0x1f2)]={};this[_0x4007e6(0x1ef)][_0x4007e6(0x1f2)][_0x4007e6(0x21d)]=_0xaaae75,this['shapeData'][_0x4007e6(0x1f2)]['fillType']=_univerjs_pro_engine_shape[_0x4007e6(0x225)][_0x4007e6(0x1d5)],this[_0x4007e6(0x1ef)][_0x4007e6(0x1f2)][_0x4007e6(0x226)]=_0x583f50;if(_0x5285b8!==void 0x0)this[_0x4007e6(0x1ef)][_0x4007e6(0x1f2)][_0x4007e6(0x1dd)]=_0x5285b8;return this;}[_0x2ffec3(0x1f3)](){const _0x5ee519=_0x2ffec3;return this[_0x5ee519(0x1ef)][_0x5ee519(0x1f2)]={'fillType':_univerjs_pro_engine_shape[_0x5ee519(0x225)][_0x5ee519(0x210)]},this;}[_0x2ffec3(0x228)](_0x58e0c6){const _0x554a70=_0x2ffec3;if(!this[_0x554a70(0x1ef)]['stroke'])this[_0x554a70(0x1ef)][_0x554a70(0x1ed)]={};return this['shapeData'][_0x554a70(0x1ed)][_0x554a70(0x21f)]=_0x58e0c6,this;}[_0x2ffec3(0x1cb)](_0x14c66d){const _0xff80cf=_0x2ffec3;if(!this[_0xff80cf(0x1ef)]['stroke'])this['shapeData'][_0xff80cf(0x1ed)]={};return this['shapeData'][_0xff80cf(0x1ed)]['width']=_0x14c66d,this;}['setStrokeLineDashType'](_0x171a96){const _0x264f9d=_0x2ffec3;if(!this[_0x264f9d(0x1ef)][_0x264f9d(0x1ed)])this['shapeData']['stroke']={};return this['shapeData'][_0x264f9d(0x1ed)][_0x264f9d(0x1be)]=_0x171a96,this;}[_0x2ffec3(0x1f8)](_0x29dbe6){const _0x701adb=_0x2ffec3;if(!this[_0x701adb(0x1ef)][_0x701adb(0x1ed)])this['shapeData'][_0x701adb(0x1ed)]={};return this[_0x701adb(0x1ef)]['stroke']['lineJoinType']=_0x29dbe6,this;}['setStrokeLineCapType'](_0x2985cf){const _0xb3e2f1=_0x2ffec3;if(!this['shapeData'][_0xb3e2f1(0x1ed)])this[_0xb3e2f1(0x1ef)][_0xb3e2f1(0x1ed)]={};return this['shapeData']['stroke']['capType']=_0x2985cf,this;}['setStrokeOpacity'](_0x26600e){const _0x2be987=_0x2ffec3;if(!this[_0x2be987(0x1ef)][_0x2be987(0x1ed)])this[_0x2be987(0x1ef)][_0x2be987(0x1ed)]={};return this[_0x2be987(0x1ef)]['stroke'][_0x2be987(0x219)]=_0x26600e,this;}[_0x2ffec3(0x224)](_0x20a087){const _0x294dc5=_0x2ffec3;if(!this[_0x294dc5(0x1ef)][_0x294dc5(0x1ed)])this[_0x294dc5(0x1ef)][_0x294dc5(0x1ed)]={};return this['shapeData'][_0x294dc5(0x1ed)]['lineStrokeType']=_0x20a087,this;}['setWidth'](_0x4a25e1){return this['width']=_0x4a25e1,this;}['setHeight'](_0x3103fd){const _0x202043=_0x2ffec3;return this[_0x202043(0x1d2)]=_0x3103fd,this;}[_0x2ffec3(0x209)](){const _0x2c46e7=_0x2ffec3,_0x10a163=this['_injector'][_0x2c46e7(0x234)](_univerjs_pro_sheets_shape['SheetsShapeService'])['getShapeModel'](this[_0x2c46e7(0x1bf)],this[_0x2c46e7(0x21c)],this[_0x2c46e7(0x227)]);if(_0x10a163)return(0x0,_univerjs_pro_engine_shape[_0x2c46e7(0x206)])(_0x10a163[_0x2c46e7(0x1ac)]());if(this[_0x2c46e7(0x1fe)])return(0x0,_univerjs_pro_engine_shape[_0x2c46e7(0x206)])(this['shapeType']);return![];}[_0x2ffec3(0x1da)](){const _0x12b69f=_0x2ffec3,_0x542a3f=this['_injector'][_0x12b69f(0x234)](_univerjs_pro_sheets_shape[_0x12b69f(0x1ff)])[_0x12b69f(0x1b2)](this[_0x12b69f(0x1bf)],this[_0x12b69f(0x21c)],this[_0x12b69f(0x227)]);if(!_0x542a3f)return[];const _0x35545b=this[_0x12b69f(0x1f4)][_0x12b69f(0x234)](_univerjs_drawing['IDrawingManagerService'])['getDrawingByParam']({'unitId':this[_0x12b69f(0x1bf)],'subUnitId':this[_0x12b69f(0x21c)],'drawingId':this[_0x12b69f(0x227)]});if(!(_0x35545b===null||_0x35545b===void 0x0?void 0x0:_0x35545b[_0x12b69f(0x1cd)]))return[];const {width:width=0x0,height:height=0x0}=_0x35545b[_0x12b69f(0x1cd)];return _0x542a3f[_0x12b69f(0x1bb)]({'width':width,'height':height}),_0x542a3f[_0x12b69f(0x208)]();}[_0x2ffec3(0x1d0)](){const _0x375f4d=_0x2ffec3,_0x1bedb5=this[_0x375f4d(0x1f4)][_0x375f4d(0x234)](_univerjs_pro_sheets_shape[_0x375f4d(0x1ff)])['getShapeModel'](this[_0x375f4d(0x1bf)],this[_0x375f4d(0x21c)],this['drawId']);if(!_0x1bedb5)return[];const _0x3936cb=this[_0x375f4d(0x1f4)][_0x375f4d(0x234)](_univerjs_drawing[_0x375f4d(0x1c1)])[_0x375f4d(0x212)]({'unitId':this[_0x375f4d(0x1bf)],'subUnitId':this['subUnitId'],'drawingId':this[_0x375f4d(0x227)]});if(!(_0x3936cb===null||_0x3936cb===void 0x0?void 0x0:_0x3936cb[_0x375f4d(0x1cd)]))return[];const {width:width=0x0,height:height=0x0}=_0x3936cb[_0x375f4d(0x1cd)];return _0x1bedb5[_0x375f4d(0x1bb)]({'width':width,'height':height}),_0x1bedb5[_0x375f4d(0x1ad)]();}['getConnectorLinePoints'](){const _0x3215d8=_0x2ffec3,_0x583338=this[_0x3215d8(0x1f4)][_0x3215d8(0x234)](_univerjs_pro_sheets_shape['SheetsShapeService'])[_0x3215d8(0x1b2)](this[_0x3215d8(0x1bf)],this['subUnitId'],this[_0x3215d8(0x227)]);if(!_0x583338)return[];if(!(0x0,_univerjs_pro_engine_shape[_0x3215d8(0x206)])(_0x583338[_0x3215d8(0x1ac)]()))return[];const _0x41a8c8=this[_0x3215d8(0x1f4)][_0x3215d8(0x234)](_univerjs_drawing[_0x3215d8(0x1c1)])['getDrawingByParam']({'unitId':this['unitId'],'subUnitId':this[_0x3215d8(0x21c)],'drawingId':this['drawId']});if(!(_0x41a8c8===null||_0x41a8c8===void 0x0?void 0x0:_0x41a8c8[_0x3215d8(0x1cd)]))return[];const {width:width=0x0,height:height=0x0}=_0x41a8c8[_0x3215d8(0x1cd)];return _0x583338[_0x3215d8(0x1bb)]({'width':width,'height':height}),_0x583338['getConnectorLinePoints']();}[_0x2ffec3(0x1ba)](){const _0x40960a=_0x2ffec3;var _0x4dd45b;const _0x213a4c=this[_0x40960a(0x1f4)][_0x40960a(0x234)](_univerjs_pro_sheets_shape[_0x40960a(0x1ff)])[_0x40960a(0x1b2)](this[_0x40960a(0x1bf)],this[_0x40960a(0x21c)],this[_0x40960a(0x227)]);if(!_0x213a4c)return null;return(_0x4dd45b=_0x213a4c['getStartConnectInfo']())!==null&&_0x4dd45b!==void 0x0?_0x4dd45b:null;}[_0x2ffec3(0x1ab)](){const _0x1432cc=_0x2ffec3;var _0x56d483;const _0x46a9eb=this[_0x1432cc(0x1f4)][_0x1432cc(0x234)](_univerjs_pro_sheets_shape[_0x1432cc(0x1ff)])[_0x1432cc(0x1b2)](this[_0x1432cc(0x1bf)],this[_0x1432cc(0x21c)],this[_0x1432cc(0x227)]);if(!_0x46a9eb)return null;return(_0x56d483=_0x46a9eb[_0x1432cc(0x1ab)]())!==null&&_0x56d483!==void 0x0?_0x56d483:null;}[_0x2ffec3(0x231)](){const _0x4bced2=_0x2ffec3;var _0x531efe,_0x5952ad;if(!this[_0x4bced2(0x1fe)])throw new Error(_0x4bced2(0x1ae));if(this['x']===0x0||this['y']===0x0){const _0x9f74f4=this[_0x4bced2(0x1f4)]['get'](_univerjs_sheets[_0x4bced2(0x22c)])[_0x4bced2(0x201)](this[_0x4bced2(0x1bf)],this[_0x4bced2(0x21c)]);if(!_0x9f74f4)throw new Error(_0x4bced2(0x1e3)+this[_0x4bced2(0x1bf)]+_0x4bced2(0x230)+this[_0x4bced2(0x21c)]+'\x20not\x20found');const {transform:_0x1d29e0}=(0x0,_univerjs_sheets[_0x4bced2(0x1f1)])(this[_0x4bced2(0x1bf)],this[_0x4bced2(0x21c)],{'row':0x1,'column':0x1,'rowOffset':0x0,'columnOffset':0x0},0x1,0x1,_0x9f74f4);this['x']=this['x']>0x0?this['x']:_0x1d29e0['left'],this['y']=this['y']>0x0?this['y']:_0x1d29e0[_0x4bced2(0x1eb)];}return this['width']=(_0x531efe=this[_0x4bced2(0x1e6)])!==null&&_0x531efe!==void 0x0?_0x531efe:_univerjs_pro_sheets_shape['DEFAULT_SHAPE_WIDTH'],this['height']=(_0x5952ad=this[_0x4bced2(0x1d2)])!==null&&_0x5952ad!==void 0x0?_0x5952ad:_univerjs_pro_sheets_shape[_0x4bced2(0x1ea)],{'unitId':this[_0x4bced2(0x1bf)],'subUnitId':this[_0x4bced2(0x21c)],'shapeId':this[_0x4bced2(0x227)],'shapeType':this[_0x4bced2(0x1fe)],'shapeData':Object[_0x4bced2(0x220)](this[_0x4bced2(0x1ef)])[_0x4bced2(0x1bc)]>0x0?this[_0x4bced2(0x1ef)]:void 0x0,'x':this['x'],'y':this['y'],'width':this['width'],'height':this[_0x4bced2(0x1d2)]};}[_0x2ffec3(0x1b9)](){return this['drawId'];}['getShapeType'](){const _0x3137c0=_0x2ffec3;return this[_0x3137c0(0x1fe)];}[_0x2ffec3(0x1c7)](){const _0x1b031d=_0x2ffec3;return this[_0x1b031d(0x1ef)];}[_0x2ffec3(0x1c6)](){return{'x':this['x'],'y':this['y']};}[_0x2ffec3(0x1d1)](){const _0x4e1088=_0x2ffec3;return{'width':this[_0x4e1088(0x1e6)],'height':this['height']};}},FConnectorShape=class extends FShape{constructor(_0xa8374e,_0xc26624,_0x5f2d0f,_0x25ac2f){const _0x471e36=_0x2ffec3;super(_0xa8374e,_0xc26624,_0x5f2d0f,_0x25ac2f),_defineProperty(this,_0x471e36(0x1ef),{});}[_0x2ffec3(0x21a)](_0x5d046f){const _0x195888=_0x2ffec3;if(!(0x0,_univerjs_pro_engine_shape[_0x195888(0x206)])(_0x5d046f))throw new Error(_0x195888(0x215)+_0x5d046f+',\x20but\x20expected\x20a\x20connector\x20shape\x20type.');return super[_0x195888(0x21a)](_0x5d046f),this;}[_0x2ffec3(0x1df)](_0x522e99){const _0x2a577b=_0x2ffec3;var _0x30921f,_0xaa4441;if(!((_0x30921f=this['shapeData'])===null||_0x30921f===void 0x0?void 0x0:_0x30921f['ln']))this[_0x2a577b(0x1ef)]['ln']={};if(!((_0xaa4441=this[_0x2a577b(0x1ef)])===null||_0xaa4441===void 0x0||(_0xaa4441=_0xaa4441['ln'])===null||_0xaa4441===void 0x0?void 0x0:_0xaa4441[_0x2a577b(0x216)]))this[_0x2a577b(0x1ef)]['ln']['startArrow']={};return this['shapeData']['ln'][_0x2a577b(0x216)][_0x2a577b(0x1dc)]=_0x522e99,this;}[_0x2ffec3(0x223)](_0x33aa95){const _0x11a8a0=_0x2ffec3;var _0x1cba40,_0x2f2d37;if(!((_0x1cba40=this['shapeData'])===null||_0x1cba40===void 0x0?void 0x0:_0x1cba40['ln']))this['shapeData']['ln']={};if(!((_0x2f2d37=this[_0x11a8a0(0x1ef)])===null||_0x2f2d37===void 0x0||(_0x2f2d37=_0x2f2d37['ln'])===null||_0x2f2d37===void 0x0?void 0x0:_0x2f2d37['endArrow']))this[_0x11a8a0(0x1ef)]['ln'][_0x11a8a0(0x22e)]={};return this[_0x11a8a0(0x1ef)]['ln']['endArrow'][_0x11a8a0(0x1dc)]=_0x33aa95,this;}[_0x2ffec3(0x238)](_0x4cbbbf){const _0x2ac2bb=_0x2ffec3;var _0x1b867d,_0x21cc50;if(!((_0x1b867d=this[_0x2ac2bb(0x1ef)])===null||_0x1b867d===void 0x0?void 0x0:_0x1b867d['ln']))this[_0x2ac2bb(0x1ef)]['ln']={};if(!((_0x21cc50=this[_0x2ac2bb(0x1ef)])===null||_0x21cc50===void 0x0||(_0x21cc50=_0x21cc50['ln'])===null||_0x21cc50===void 0x0?void 0x0:_0x21cc50[_0x2ac2bb(0x216)]))this[_0x2ac2bb(0x1ef)]['ln'][_0x2ac2bb(0x216)]={};return this[_0x2ac2bb(0x1ef)]['ln']['startArrow']['size']=_0x4cbbbf,this;}['setEndArrowSize'](_0x267b6e){const _0x43be7a=_0x2ffec3;var _0x2ec096,_0x32bc94;if(!((_0x2ec096=this[_0x43be7a(0x1ef)])===null||_0x2ec096===void 0x0?void 0x0:_0x2ec096['ln']))this[_0x43be7a(0x1ef)]['ln']={};if(!((_0x32bc94=this[_0x43be7a(0x1ef)])===null||_0x32bc94===void 0x0||(_0x32bc94=_0x32bc94['ln'])===null||_0x32bc94===void 0x0?void 0x0:_0x32bc94[_0x43be7a(0x22e)]))this[_0x43be7a(0x1ef)]['ln']['endArrow']={};return this['shapeData']['ln'][_0x43be7a(0x22e)]['size']=_0x267b6e,this;}[_0x2ffec3(0x231)](){return super['build']();}['getEndConnectInfo'](){const _0x250e51=_0x2ffec3;var _0x461ba1;return((_0x461ba1=this['shapeData'])===null||_0x461ba1===void 0x0||(_0x461ba1=_0x461ba1[_0x250e51(0x1c0)])===null||_0x461ba1===void 0x0?void 0x0:_0x461ba1['to'])||null;}['getStartConnectInfo'](){const _0x245385=_0x2ffec3;var _0x37d791;return((_0x37d791=this[_0x245385(0x1ef)])===null||_0x37d791===void 0x0||(_0x37d791=_0x37d791[_0x245385(0x1c0)])===null||_0x37d791===void 0x0?void 0x0:_0x37d791[_0x245385(0x22b)])||null;}};function computeConnectionPointInfo(_0x3785f1,_0x369367,_0x1b3c45,_0x40077f,_0x178da2,_0x3b45e2){const _0x539e08=_0x2ffec3,_0x8c18d2=_0x178da2[_0x539e08(0x1b2)](_0x3785f1,_0x369367,_0x1b3c45);if(!_0x8c18d2)return null;const _0x4e4e43=_0x3b45e2[_0x539e08(0x212)]({'unitId':_0x3785f1,'subUnitId':_0x369367,'drawingId':_0x1b3c45});if(!(_0x4e4e43===null||_0x4e4e43===void 0x0?void 0x0:_0x4e4e43[_0x539e08(0x1cd)]))return null;const {left:left=0x0,top:top=0x0,width:width=0x0,height:height=0x0,flipX:flipX=![],flipY:flipY=![],angle:_0x998d82}=_0x4e4e43[_0x539e08(0x1cd)];_0x8c18d2[_0x539e08(0x1bb)]({'width':width,'height':height});const _0x3eb5e2=_0x8c18d2['getConnectionSiteList']()[_0x539e08(0x1f5)](_0xabcbe9=>_0xabcbe9[_0x539e08(0x1d7)]===_0x40077f);if(!_0x3eb5e2)return null;let _0x152a86=flipX?width-_0x3eb5e2['x']:_0x3eb5e2['x'],_0x3aec65=flipY?height-_0x3eb5e2['y']:_0x3eb5e2['y'];if(_0x998d82&&_0x998d82!==0x0){const _0x5cecb9=_0x998d82*Math['PI']/0xb4,_0x2dcff8=Math['cos'](_0x5cecb9),_0x16d1ce=Math['sin'](_0x5cecb9),_0x133899=width/0x2,_0x42ee57=height/0x2,_0x3be980=_0x152a86-_0x133899,_0x6545ad=_0x3aec65-_0x42ee57;_0x152a86=_0x133899+_0x3be980*_0x2dcff8-_0x6545ad*_0x16d1ce,_0x3aec65=_0x42ee57+_0x3be980*_0x16d1ce+_0x6545ad*_0x2dcff8;}_0x152a86+=left,_0x3aec65+=top;let _0x3f1cae=_0x3eb5e2[_0x539e08(0x20c)]/0xea60;if(flipX)_0x3f1cae=0xb4-_0x3f1cae;if(flipY)_0x3f1cae=-_0x3f1cae;_0x3f1cae+=_0x998d82||0x0,_0x3f1cae=(_0x3f1cae%0x168+0x168)%0x168;const _0x291937=(0x0,_univerjs_pro_engine_shape[_0x539e08(0x1c3)])({'left':left,'top':top,'width':width,'height':height},_0x998d82||0x0);return{'point':{'x':_0x152a86,'y':_0x3aec65},'angle':_0x3f1cae,'bounds':_0x291937};}function calculateFreeEndpointAngle(_0x9e5594,_0x57d4c4){const _0x3fb5f0=_0x2ffec3,_0x519bbc=_0x57d4c4['x']-_0x9e5594['x'],_0x409414=_0x57d4c4['y']-_0x9e5594['y'];if(Math[_0x3fb5f0(0x1b0)](_0x519bbc)>=Math[_0x3fb5f0(0x1b0)](_0x409414))return _0x519bbc>=0x0?0xb4:0x0;return _0x409414>=0x0?0x10e:0x5a;}function computeFreeEndpointInfo(_0x3adc35,_0x5ccc42,_0x3827c4,_0x14ba6c,_0x5df9ac,_0x54eeb3,_0x30c027){const _0xe5e940=_0x2ffec3,_0x2c2212=_0x54eeb3[_0xe5e940(0x1b2)](_0x3adc35,_0x5ccc42,_0x3827c4);if(!_0x2c2212)return null;const _0x38624d=_0x30c027[_0xe5e940(0x212)]({'unitId':_0x3adc35,'subUnitId':_0x5ccc42,'drawingId':_0x3827c4});if(!(_0x38624d===null||_0x38624d===void 0x0?void 0x0:_0x38624d['transform']))return null;const {left:left=0x0,top:top=0x0,width:width=0x0,height:height=0x0,flipX:flipX=![],flipY:flipY=![]}=_0x38624d[_0xe5e940(0x1cd)];_0x2c2212[_0xe5e940(0x1bb)]({'width':width,'height':height});const _0x5f3f83=_0x2c2212['getConnectorLinePoints']();if(_0x5f3f83[_0xe5e940(0x1bc)]<0x2)return null;const _0x58fb7e=_0x14ba6c?_0x5f3f83[0x0]:_0x5f3f83[_0x5f3f83[_0xe5e940(0x1bc)]-0x1],_0x3a7b6a=new _univerjs_pro_engine_shape[(_0xe5e940(0x1f0))]({'left':left,'top':top,'width':width,'height':height,'flipX':flipX,'flipY':flipY})['localToWorld'](_0x58fb7e);return{'point':_0x3a7b6a,'angle':calculateFreeEndpointAngle(_0x5df9ac[_0xe5e940(0x207)],_0x3a7b6a),'bounds':{'left':_0x3a7b6a['x'],'top':_0x3a7b6a['y'],'width':0x0,'height':0x0}};}var FWorksheetShapeMixin=class extends _univerjs_sheets_facade[_0x2ffec3(0x22d)]{async['insertShape'](_0xd384ba){const _0x7dc525=_0x2ffec3,{unitId:_0x5902ad,subUnitId:_0x5bb4dc,shapeId:_0x5c1b63,shapeType:_0x49b8cc,shapeData:_0x249465,x:_0x3904e6,y:_0x30cd7c,width:_0x1d0a6d,height:_0x33c68d}=_0xd384ba;return this[_0x7dc525(0x1e0)][_0x7dc525(0x1fa)](_univerjs_pro_sheets_shape[_0x7dc525(0x23e)]['id'],{'unitId':_0x5902ad,'subUnitId':_0x5bb4dc,'shapeId':_0x5c1b63,'shapeType':_0x49b8cc,'shapeData':_0x249465,'position':{'x':_0x3904e6,'y':_0x30cd7c},'width':_0x1d0a6d,'height':_0x33c68d});}async[_0x2ffec3(0x1d3)](_0x28d65a){const _0x999cec=_0x2ffec3,{unitId:_0x2ff084,subUnitId:_0x5ab35c,shapeId:_0x77b81a,shapeType:_0x25a6a7,shapeData:_0x1d465b,x:_0x2d86da,y:_0x27ed09,width:_0x1091d2,height:_0x3430c2}=_0x28d65a;return this[_0x999cec(0x1e0)][_0x999cec(0x1fa)](_univerjs_pro_sheets_shape[_0x999cec(0x237)]['id'],{'unitId':_0x2ff084,'subUnitId':_0x5ab35c,'shapeId':_0x77b81a,'shapeType':_0x25a6a7,'shapeData':_0x1d465b,'position':{'x':_0x2d86da,'y':_0x27ed09},'width':_0x1091d2,'height':_0x3430c2});}[_0x2ffec3(0x1cc)](_0x5e17f8){const _0x2470c0=_0x2ffec3,_0x54c54d=this['getWorkbook']()[_0x2470c0(0x203)](),_0x539370=this[_0x2470c0(0x1b5)]();if(_0x5e17f8){const _0x442321=new FShape(_0x54c54d,_0x539370,_0x5e17f8['drawId'],this[_0x2470c0(0x1f4)]);return this[_0x2470c0(0x1d4)](_0x442321,_0x54c54d,_0x539370,_0x5e17f8[_0x2470c0(0x227)]),_0x442321;}return new FShape(_0x54c54d,_0x539370,(0x0,_univerjs_core[_0x2470c0(0x232)])(),this['_injector']);}[_0x2ffec3(0x239)](_0x5ad95b){const _0x22916d=_0x2ffec3,_0x2ae157=this[_0x22916d(0x1e9)]()['getUnitId'](),_0x3492c2=this[_0x22916d(0x1b5)]();if(_0x5ad95b){const _0x5baaca=new FConnectorShape(_0x2ae157,_0x3492c2,_0x5ad95b[_0x22916d(0x227)],this['_injector']);return this['_preloadShapeProperties'](_0x5baaca,_0x2ae157,_0x3492c2,_0x5ad95b['drawId']),_0x5baaca;}return new FConnectorShape(_0x2ae157,_0x3492c2,(0x0,_univerjs_core['generateRandomId'])(),this[_0x22916d(0x1f4)]);}['getShapes'](){const _0x58046d=_0x2ffec3,_0x58aa40=this['_injector'][_0x58046d(0x234)](_univerjs_sheets_drawing[_0x58046d(0x23b)]),_0x45175d=this[_0x58046d(0x1e9)]()['getUnitId'](),_0x554037=this['getSheetId'](),_0x395a2b=_0x58aa40['getDrawingData'](_0x45175d,_0x554037);if(!_0x395a2b)return[];const _0x14df61=[];for(const [_0x237f96,_0x2375e2]of Object[_0x58046d(0x1f9)](_0x395a2b))if(_0x2375e2&&_0x2375e2[_0x58046d(0x1e4)]===_univerjs_core[_0x58046d(0x1d6)][_0x58046d(0x20d)]){const _0x5e9580=new FShape(_0x45175d,_0x554037,_0x237f96,this[_0x58046d(0x1f4)]);this[_0x58046d(0x1d4)](_0x5e9580,_0x45175d,_0x554037,_0x237f96),_0x14df61[_0x58046d(0x1e7)](_0x5e9580);}return _0x14df61;}[_0x2ffec3(0x211)](_0x5f5837){const _0x4ab94a=_0x2ffec3,{unitId:_0x3b94eb,subUnitId:_0x5abaf9,drawId:_0x56c15a}=_0x5f5837;return this[_0x4ab94a(0x1e0)][_0x4ab94a(0x1fa)](_univerjs_sheets_drawing['RemoveSheetDrawingCommand']['id'],{'unitId':_0x3b94eb,'drawings':[{'unitId':_0x3b94eb,'subUnitId':_0x5abaf9,'drawingId':_0x56c15a,'drawingType':_univerjs_core[_0x4ab94a(0x1d6)][_0x4ab94a(0x20d)]}]});}async[_0x2ffec3(0x1e2)](_0x192161){const _0x457f11=_0x2ffec3,{connector:_0x414499,startTarget:_0x445909,endTarget:_0x24f5b2}=_0x192161;if(!_0x445909&&!_0x24f5b2)return![];const _0xf8c9e3=this['getWorkbook']()[_0x457f11(0x203)](),_0xf73122=this[_0x457f11(0x1b5)](),_0x41a5f8=this[_0x457f11(0x1f4)]['get'](_univerjs_pro_sheets_shape['SheetsShapeService']),_0x5c7812=this[_0x457f11(0x1f4)]['get'](_univerjs_drawing[_0x457f11(0x1c1)]),_0x3f0a14=_0x41a5f8[_0x457f11(0x1b2)](_0xf8c9e3,_0xf73122,_0x414499[_0x457f11(0x227)]);if(!_0x3f0a14)return![];const _0x3bc632=_0x3f0a14[_0x457f11(0x1ac)](),_0x2fdacd=_0x3f0a14[_0x457f11(0x236)](),_0x7cbf3a={};for(const _0x9822f0 of _0x3f0a14['getAdjustNames']()){const _0x177c0d=_0x3f0a14[_0x457f11(0x1ca)](_0x9822f0);if(_0x177c0d!==void 0x0)_0x7cbf3a[_0x9822f0]=_0x177c0d;}const {startInfo:_0x3e3792,endInfo:_0x1ab492}=this[_0x457f11(0x1b3)](_0xf8c9e3,_0xf73122,_0x414499,_0x3f0a14,_0x445909,_0x24f5b2,_0x41a5f8,_0x5c7812,_0x2fdacd);if(!_0x3e3792||!_0x1ab492)return![];const _0x482c3c=(0x0,_univerjs_pro_engine_shape['computeConnectorRouteLayout'])((0x0,_univerjs_pro_engine_shape['routeConnectorLineShape'])(_0x3e3792,_0x1ab492,_0x3bc632),_0x3bc632),_0x3565cf={};if(_0x445909)_0x3565cf[_0x457f11(0x22b)]={'shapeId':_0x445909[_0x457f11(0x21b)]['drawId'],'cxnIndex':_0x445909[_0x457f11(0x1b1)]};else{if(_0x2fdacd===null||_0x2fdacd===void 0x0?void 0x0:_0x2fdacd[_0x457f11(0x22b)])_0x3565cf[_0x457f11(0x22b)]=_0x2fdacd['from'];}if(_0x24f5b2)_0x3565cf['to']={'shapeId':_0x24f5b2[_0x457f11(0x21b)][_0x457f11(0x227)],'cxnIndex':_0x24f5b2['connectionSiteIndex']};else{if(_0x2fdacd===null||_0x2fdacd===void 0x0?void 0x0:_0x2fdacd['to'])_0x3565cf['to']=_0x2fdacd['to'];}return this[_0x457f11(0x1e0)][_0x457f11(0x1fa)](_univerjs_pro_sheets_shape['UpdateConnectorRelationCommand']['id'],{'unitId':_0xf8c9e3,'subUnitId':_0xf73122,'connectorShapeId':_0x414499[_0x457f11(0x227)],'width':_0x482c3c[_0x457f11(0x1c8)][_0x457f11(0x1e6)],'height':_0x482c3c['worldRect'][_0x457f11(0x1d2)],'left':_0x482c3c[_0x457f11(0x1c8)][_0x457f11(0x1c9)],'top':_0x482c3c['worldRect'][_0x457f11(0x1eb)],'flipX':_0x482c3c[_0x457f11(0x1c8)][_0x457f11(0x1fd)]||![],'flipY':_0x482c3c[_0x457f11(0x1c8)][_0x457f11(0x20e)]||![],'oldAdjustValues':_0x7cbf3a,'newAdjustValues':_0x482c3c['adjustValues'],'newLineType':_0x482c3c[_0x457f11(0x213)],'oldLineType':_0x3bc632,'rotation':_0x482c3c[_0x457f11(0x1fb)],'oldRelation':_0x2fdacd,'newRelation':_0x3565cf});}[_0x2ffec3(0x1d4)](_0x5ca3ec,_0x59b3c8,_0x44d61f,_0x3555ab){const _0x314b43=_0x2ffec3,_0x5e49a6=this['_injector']['get'](_univerjs_drawing[_0x314b43(0x1c1)])[_0x314b43(0x212)]({'unitId':_0x59b3c8,'subUnitId':_0x44d61f,'drawingId':_0x3555ab});if(_0x5e49a6===null||_0x5e49a6===void 0x0?void 0x0:_0x5e49a6['transform']){var _0x496830,_0x28adb5,_0x2e0d73,_0x20bbaa;_0x5ca3ec['x']=(_0x496830=_0x5e49a6[_0x314b43(0x1cd)][_0x314b43(0x1c9)])!==null&&_0x496830!==void 0x0?_0x496830:0x0,_0x5ca3ec['y']=(_0x28adb5=_0x5e49a6['transform'][_0x314b43(0x1eb)])!==null&&_0x28adb5!==void 0x0?_0x28adb5:0x0,_0x5ca3ec[_0x314b43(0x1e6)]=(_0x2e0d73=_0x5e49a6['transform']['width'])!==null&&_0x2e0d73!==void 0x0?_0x2e0d73:_0x5ca3ec[_0x314b43(0x1e6)],_0x5ca3ec[_0x314b43(0x1d2)]=(_0x20bbaa=_0x5e49a6[_0x314b43(0x1cd)][_0x314b43(0x1d2)])!==null&&_0x20bbaa!==void 0x0?_0x20bbaa:_0x5ca3ec[_0x314b43(0x1d2)];}const _0x2069de=this[_0x314b43(0x1f4)][_0x314b43(0x234)](_univerjs_pro_sheets_shape[_0x314b43(0x1ff)])[_0x314b43(0x1b2)](_0x59b3c8,_0x44d61f,_0x3555ab);if(_0x2069de){_0x5ca3ec['shapeType']=_0x2069de['getShapeType']();const _0x2171c5=_0x2069de['getShapeData']();if(_0x2171c5)_0x5ca3ec[_0x314b43(0x1ef)]=JSON[_0x314b43(0x1c5)](JSON[_0x314b43(0x1e1)](_0x2171c5));}}['_resolveEndpoints'](_0x1ed238,_0x13dd3c,_0x2f04ff,_0x2001e4,_0x10fa30,_0x3acb1e,_0x509d96,_0x1478e8,_0x4bc141){const _0x111a7e=_0x2ffec3;let _0x52afea=null,_0xb35596=null;if(_0x10fa30)_0x52afea=computeConnectionPointInfo(_0x1ed238,_0x13dd3c,_0x10fa30[_0x111a7e(0x21b)][_0x111a7e(0x227)],_0x10fa30[_0x111a7e(0x1b1)],_0x509d96,_0x1478e8);if(_0x3acb1e)_0xb35596=computeConnectionPointInfo(_0x1ed238,_0x13dd3c,_0x3acb1e[_0x111a7e(0x21b)][_0x111a7e(0x227)],_0x3acb1e[_0x111a7e(0x1b1)],_0x509d96,_0x1478e8);if(!_0x52afea)_0x52afea=this[_0x111a7e(0x1bd)](_0x1ed238,_0x13dd3c,_0x2f04ff[_0x111a7e(0x227)],!![],_0xb35596,_0x4bc141===null||_0x4bc141===void 0x0?void 0x0:_0x4bc141[_0x111a7e(0x22b)],_0x509d96,_0x1478e8);if(!_0xb35596)_0xb35596=this[_0x111a7e(0x1bd)](_0x1ed238,_0x13dd3c,_0x2f04ff[_0x111a7e(0x227)],![],_0x52afea,_0x4bc141===null||_0x4bc141===void 0x0?void 0x0:_0x4bc141['to'],_0x509d96,_0x1478e8);return{'startInfo':_0x52afea,'endInfo':_0xb35596};}[_0x2ffec3(0x1bd)](_0x2add09,_0x44a59b,_0x51b94a,_0x5ab7ad,_0x356251,_0x131ee9,_0x119271,_0x1ca4c5){const _0x2f9f39=_0x2ffec3;if(_0x131ee9){const _0x59942e=computeConnectionPointInfo(_0x2add09,_0x44a59b,_0x131ee9[_0x2f9f39(0x1ce)],_0x131ee9[_0x2f9f39(0x235)],_0x119271,_0x1ca4c5);if(_0x59942e)return _0x59942e;}if(!_0x356251)return null;return computeFreeEndpointInfo(_0x2add09,_0x44a59b,_0x51b94a,_0x5ab7ad,_0x356251,_0x119271,_0x1ca4c5);}};function _0x1762(){const _0x289783=['cxnIndex','getShapeRelation','SetShapeDrawingDataCommand','setStartArrowSize','newConnector','object','ISheetDrawingService','setAbsolutePosition','ShapeLineDashEnum','InsertShapeCommand','getEndConnectInfo','getShapeType','getDrawingPoints','Shape\x20type\x20is\x20required.\x20Please\x20call\x20setShapeType()\x20before\x20build().','setShapeGradientFill','abs','connectionSiteIndex','getShapeModel','_resolveEndpoints','1bVLFPy','getSheetId','toStringTag','FEnum','setPosition','getShapeId','getStartConnectInfo','updateContext','length','_resolveExistingOrFreeEndpoint','dashType','unitId','relation','IDrawingManagerService','setShapeSolidFill','getBasicShapeRotateBound','180ANYmpl','parse','getPosition','getShapeData','worldRect','left','getAdjustValueByName','setStrokeWidth','newShape','transform','shapeId','colorStops\x20is\x20required\x20and\x20should\x20contain\x20at\x20least\x20one\x20color\x20stop.','getAdjustPoints','getSize','height','updateShape','_preloadShapeProperties','GradientFill','DrawingTypeEnum','index','646614ieTwxj','FShape','getConnectionSites','call','type','gradientAngle','fillType','setStartArrowType','_commandService','stringify','connectShapes','Skeleton\x20for\x20unitId\x20','drawingType','iterator','width','push','ShapeLineCapEnum','getWorkbook','DEFAULT_SHAPE_HEIGHT','top','Module','stroke','ShapeTypeEnum','shapeData','ConnectorCoordinateTransform','convertPositionCellToSheetOverGrid','fill','setNoneFill','_injector','find','symbol','toPrimitive','setStrokeLineJoinType','entries','executeCommand','rotation','function','flipX','shapeType','SheetsShapeService','string','ensureSkeleton','33WaJejL','getUnitId','3912048qZuGME','4922824TtxSvX','isConnectorShape','point','getConnectionSiteList','isLineShape','ShapeArrowTypeEnum','672985EgmvHK','ang','DRAWING_SHAPE','flipY','default','NoFill','removeShape','getDrawingByParam','lineType','1650612aqfCpH','Invalid\x20shape\x20type\x20for\x20connector.\x20Received\x20','startArrow','prototype','ShapeLineTypeEnum','opacity','setShapeType','shape','subUnitId','gradientStops','SolidFill','color','keys','1271474NtJUjE','ShapeGradientTypeEnum','setEndArrowType','setStrokeLineType','ShapeFillEnum','gradientType','drawId','setStrokeColor','defineProperty','28688ZMtrWe','from','SheetSkeletonService','FWorksheet','endArrow','ShapeArrowSizeEnum','\x20and\x20subUnitId\x20','build','generateRandomId','ShapeLineJoinEnum','get'];_0x1762=function(){return _0x289783;};return _0x1762();}_univerjs_sheets_facade[_0x2ffec3(0x22d)]['extend'](FWorksheetShapeMixin),exports['FConnectorShape']=FConnectorShape,exports[_0x2ffec3(0x1d9)]=FShape;
package/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- const _0x1a5be4=_0x598a;function _0x532a(){const _0x47c4f8=['touchDependencies','sheet.command.set-shape-text-vertical-toggle','UpdateLineShapeResizeCommand','getAdjustValueByName','InsertSheetDrawingCommand','fill','getSheetCommandTarget','sheet.mutation.update-shape-type','setShapeType','UniverInstanceType','RemoveSheetDrawingCommand','getBasicShapeRelation','flipX','4570575XKRxCR','getShapeData','sheet.command.set-shape-rotate','_injector','getDrawingByParam','_serializeShapeForUnit','transformToDrawingPosition','ensureSkeleton','onStarting','get','getShapeRelation','clear','6mSGeOF','SheetsShapeService','ClearSheetDrawingTransformerOperation','getSkeleton','DrawingApplyType','removeShape','IUniverInstanceService','interceptCommand','UpdateSheetsShapeTypeCommand','DependentOn','getDrawingData','startX','setConfig','toJSON','set','undos','5895200tyzPrK','addShape','2807456QhGOSR','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','_drawingManagerService','@univerjs-pro/sheets-shape','getShapeModel','_initCommandInterceptor','packageName','drawingType','cxnIndex','382786vUTHZx','_sheetsShapeService','updateContext','call','pushUndoRedo','angle','ICommandService','borderEnabled','constructor','resizeEnabled','insertShape','sheet.mutation.insert-shape','CommandType','find','keys','_shapes','_sheetInterceptorService','startY','filter','_getConnectPointInfo','isLineShape','sheet.mutation.remove-shape','lineType','_config','_ensureShapeModelManager','232ZwGemg','SetDrawingApplyMutation','getEndConnectInfo','43766982rsUMUE','SheetSkeletonService','Fail\x20to\x20get\x20shape\x20model,\x20get:\x20','sheet.command.update-shape-type','fromJSON','_groupIds','SetSheetsShapeRotateCommand','ToggleSheetsShapeFlipCommand','isConnectorShape','lineShapeId','DrawingTypeEnum','getCellIndexAndOffsetByPosition','DRAWING_SHAPE','IUndoRedoService','index','toPrimitive','routeConnectorLineShape','4589106fJvSTH','DEFAULT_SHAPE_HEIGHT','setShapeData','transformToAxisAlignPosition','shapeData','getBasicShapeType','getShapeTextData','length','height','Plugin','cos','prototype','relation','COMMAND','assign','preRedos','_sheetSkeletonService','IDrawingManagerService','default','IConfigService','string','entries','decorate','INSERT','sheet.command.update-line-shape-resize','ISheetDrawingService','function','_initSnapshot','getBatchAddOp','version','Disposable','getOwnPropertyDescriptor','flipY','dispose','shapeId','iterator','0.20.1-insiders.20260418-3a69981','adjustValues','preUndos','from','MUTATION','disposeWithMe','UpdateSheetsShapeDataMutation','has','_commandService','SheetInterceptorService','generateRandomId','sheets-shape.config','getBatchUpdateOp','hasShape','_initCommands','Injector','forEach','transform','getStartConnectInfo','onCommandExecute','4123ttMDmB','left','toStringTag','Inject','sheet.command.update-connector-relation','_shapeModelManagerMap','isHorizontal','add','getBasicShapeRotateBound','_linesIds','sheet.command.set-shape-drawing-data','UPDATE','IResourceManagerService','redos','pluginName','worldRect','defineProperty','params','getShapeTypeById','_deserializeShapeForUnit','sheet.command.toggle-shape-flip','push','sheet.mutation.update-shape-data','rotateEnabled','ShapeModel','sheet.command.insert-shape','top','sin','object','SetSheetDrawingCommand','parse','removeLinePoints','position','isFrom','_configService','InsertShapeCommand','width','symbol','stringify','UpdateConnectorRelationCommand','_resourcesManagerService','UpdateSheetsShapeTypeMutation','_addLineRerouteUpdates','_addLineFollowShapeUpdates','getLineShapeRelation','sequenceExecute','getShapeType','data','ang','registerPluginResource','rotation'];_0x532a=function(){return _0x47c4f8;};return _0x532a();}(function(_0x3fc3db,_0x3d8d26){const _0x839917=_0x598a,_0x854388=_0x3fc3db();while(!![]){try{const _0x482042=parseInt(_0x839917(0x2b8))/0x1*(-parseInt(_0x839917(0x29d))/0x2)+-parseInt(_0x839917(0x291))/0x3+parseInt(_0x839917(0x2af))/0x4+-parseInt(_0x839917(0x2ad))/0x5+-parseInt(_0x839917(0x219))/0x6+parseInt(_0x839917(0x251))/0x7*(parseInt(_0x839917(0x205))/0x8)+parseInt(_0x839917(0x208))/0x9;if(_0x482042===_0x3d8d26)break;else _0x854388['push'](_0x854388['shift']());}catch(_0x44ccbd){_0x854388['push'](_0x854388['shift']());}}}(_0x532a,0xebe19),Object['defineProperty'](exports,Symbol[_0x1a5be4(0x253)],{'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(_0x566529){'@babel/helpers - typeof';const _0x217185=_0x1a5be4;return _typeof='function'==typeof Symbol&&_0x217185(0x276)==typeof Symbol[_0x217185(0x23c)]?function(_0xc11721){return typeof _0xc11721;}:function(_0x354429){const _0xfc3ea0=_0x217185;return _0x354429&&_0xfc3ea0(0x233)==typeof Symbol&&_0x354429[_0xfc3ea0(0x1f4)]===Symbol&&_0x354429!==Symbol[_0xfc3ea0(0x224)]?'symbol':typeof _0x354429;},_typeof(_0x566529);}function toPrimitive(_0x279901,_0x25b4c2){const _0x173330=_0x1a5be4;if(_0x173330(0x26d)!=_typeof(_0x279901)||!_0x279901)return _0x279901;var _0x21011b=_0x279901[Symbol[_0x173330(0x217)]];if(void 0x0!==_0x21011b){var _0x22f561=_0x21011b[_0x173330(0x1ef)](_0x279901,_0x25b4c2||_0x173330(0x22b));if(_0x173330(0x26d)!=_typeof(_0x22f561))return _0x22f561;throw new TypeError(_0x173330(0x2b0));}return(_0x173330(0x22d)===_0x25b4c2?String:Number)(_0x279901);}function toPropertyKey(_0xfd2687){const _0x41c9ea=_0x1a5be4;var _0x18462f=toPrimitive(_0xfd2687,_0x41c9ea(0x22d));return _0x41c9ea(0x276)==_typeof(_0x18462f)?_0x18462f:_0x18462f+'';}function _defineProperty(_0x61cef2,_0x4ef77a,_0x344f26){const _0x401458=_0x1a5be4;return(_0x4ef77a=toPropertyKey(_0x4ef77a))in _0x61cef2?Object[_0x401458(0x261)](_0x61cef2,_0x4ef77a,{'value':_0x344f26,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x61cef2[_0x4ef77a]=_0x344f26,_0x61cef2;}var SheetShapeModelManager=class extends _univerjs_core[_0x1a5be4(0x237)]{constructor(){const _0x30af62=_0x1a5be4;super(),_defineProperty(this,'_shapes',new Map()),_defineProperty(this,'_linesIds',new Set()),_defineProperty(this,_0x30af62(0x20d),new Set());}[_0x1a5be4(0x2ae)](_0x320613,_0x3ce82d,_0x1cf67c){const _0x3ba05b=_0x1a5be4,_0x280109=new _univerjs_pro_engine_shape[(_0x3ba05b(0x269))](_0x320613,_0x3ce82d,_0x1cf67c);this[_0x3ba05b(0x1fb)][_0x3ba05b(0x2ab)](_0x3ce82d,_0x280109);if((0x0,_univerjs_pro_engine_shape[_0x3ba05b(0x210)])(_0x320613))this[_0x3ba05b(0x25a)]['add'](_0x3ce82d);return _0x280109;}[_0x1a5be4(0x28f)](_0x45b9e2){const _0x5b2f4f=_0x1a5be4,_0x29872f=[];for(const _0x36877a of this['_linesIds']){const _0xe465ea=this[_0x5b2f4f(0x1fb)][_0x5b2f4f(0x29a)](_0x36877a);if(_0xe465ea){const _0x145034=_0xe465ea[_0x5b2f4f(0x29b)]();if(_0x145034){var _0x1ee39d,_0x34b283;if(((_0x1ee39d=_0x145034['from'])===null||_0x1ee39d===void 0x0?void 0x0:_0x1ee39d[_0x5b2f4f(0x23b)])===_0x45b9e2)_0x29872f['push']({..._0x145034[_0x5b2f4f(0x240)],'lineShapeId':_0x36877a,'isFrom':!![]});if(((_0x34b283=_0x145034['to'])===null||_0x34b283===void 0x0?void 0x0:_0x34b283[_0x5b2f4f(0x23b)])===_0x45b9e2)_0x29872f[_0x5b2f4f(0x266)]({..._0x145034['to'],'lineShapeId':_0x36877a,'isFrom':![]});}}}return _0x29872f;}[_0x1a5be4(0x27d)](_0x520243){const _0x3869a8=_0x1a5be4,_0x46f0b6=this['_shapes'][_0x3869a8(0x29a)](_0x520243);if(_0x46f0b6)return _0x46f0b6[_0x3869a8(0x29b)]();}[_0x1a5be4(0x27f)](_0x2d9c43){const _0x2cfc95=_0x1a5be4,_0x542c38=this[_0x2cfc95(0x1fb)]['get'](_0x2d9c43);if(_0x542c38)return _0x542c38[_0x2cfc95(0x27f)]();}['hasShape'](_0x541cb0){const _0x31d635=_0x1a5be4;return this['_shapes'][_0x31d635(0x244)](_0x541cb0);}[_0x1a5be4(0x2a2)](_0x4e28ed){const _0x3250a5=_0x1a5be4,_0x30d268=this[_0x3250a5(0x1fb)][_0x3250a5(0x29a)](_0x4e28ed);if(!_0x30d268)return;if((0x0,_univerjs_pro_engine_shape[_0x3250a5(0x210)])(_0x30d268[_0x3250a5(0x27f)]()))this[_0x3250a5(0x25a)]['delete'](_0x4e28ed);this[_0x3250a5(0x1fb)]['delete'](_0x4e28ed);}[_0x1a5be4(0x2aa)](){const _0x5f02bd=_0x1a5be4,_0x17b271=[];return this[_0x5f02bd(0x1fb)][_0x5f02bd(0x24d)](_0x5789ff=>{_0x17b271['push'](_0x5789ff['toJSON']());}),_0x17b271;}[_0x1a5be4(0x20c)](_0x54ffcf){const _0xdf571d=_0x1a5be4;for(const _0x38c6c4 of _0x54ffcf){const {id:_0x228c71,shapeType:_0x3a80e5}=_0x38c6c4,_0x401947=this[_0xdf571d(0x2ae)](_0x3a80e5,_0x228c71,_0x38c6c4[_0xdf571d(0x21d)]);if(_0x401947&&_0x401947[_0xdf571d(0x200)]())this['_linesIds'][_0xdf571d(0x258)](_0x228c71);}}[_0x1a5be4(0x23a)](){const _0xd43042=_0x1a5be4;if(this['_disposed'])return;this[_0xd43042(0x1fb)]['forEach'](_0x1fe556=>{const _0x1e6dde=_0xd43042;_0x1fe556[_0x1e6dde(0x23a)]();}),this['_shapes'][_0xd43042(0x29c)](),this[_0xd43042(0x25a)][_0xd43042(0x29c)](),this[_0xd43042(0x20d)][_0xd43042(0x29c)](),super[_0xd43042(0x23a)]();}};function __decorateParam(_0x5c90b8,_0xa4212c){return function(_0x5c6817,_0x1d2372){_0xa4212c(_0x5c6817,_0x1d2372,_0x5c90b8);};}function __decorate(_0x3f43d0,_0x582081,_0x273875,_0x191343){const _0x1a569b=_0x1a5be4;var _0xb2138b=arguments[_0x1a569b(0x220)],_0x200082=_0xb2138b<0x3?_0x582081:_0x191343===null?_0x191343=Object[_0x1a569b(0x238)](_0x582081,_0x273875):_0x191343,_0x25193d;if(typeof Reflect===_0x1a569b(0x26d)&&typeof Reflect['decorate']===_0x1a569b(0x233))_0x200082=Reflect[_0x1a569b(0x22f)](_0x3f43d0,_0x582081,_0x273875,_0x191343);else{for(var _0x50941b=_0x3f43d0[_0x1a569b(0x220)]-0x1;_0x50941b>=0x0;_0x50941b--)if(_0x25193d=_0x3f43d0[_0x50941b])_0x200082=(_0xb2138b<0x3?_0x25193d(_0x200082):_0xb2138b>0x3?_0x25193d(_0x582081,_0x273875,_0x200082):_0x25193d(_0x582081,_0x273875))||_0x200082;}return _0xb2138b>0x3&&_0x200082&&Object['defineProperty'](_0x582081,_0x273875,_0x200082),_0x200082;}const SHEET_SHAPE_PLUGIN='SHEET_SHAPE_PLUGIN';let SheetsShapeService=class SheetsShapeService extends _univerjs_core[_0x1a5be4(0x237)]{constructor(_0x186af2){const _0x3d9519=_0x1a5be4;super(),this[_0x3d9519(0x279)]=_0x186af2,_defineProperty(this,'_shapeModelManagerMap',new Map()),this[_0x3d9519(0x234)]();}[_0x1a5be4(0x204)](_0x2ae99c,_0x28a8e3){const _0x2388d1=_0x1a5be4;let _0x2b1950=this['_shapeModelManagerMap'][_0x2388d1(0x29a)](_0x2ae99c);!_0x2b1950&&(_0x2b1950=new Map(),this[_0x2388d1(0x256)][_0x2388d1(0x2ab)](_0x2ae99c,_0x2b1950));let _0x36e649=_0x2b1950[_0x2388d1(0x29a)](_0x28a8e3);return!_0x36e649&&(_0x36e649=new SheetShapeModelManager(),_0x2b1950[_0x2388d1(0x2ab)](_0x28a8e3,_0x36e649)),_0x36e649;}[_0x1a5be4(0x1f6)](_0x4e7dc5,_0x42de87,_0x111d1b,_0x53f332,_0x49000a){const _0x40745d=_0x1a5be4;this[_0x40745d(0x204)](_0x4e7dc5,_0x42de87)['addShape'](_0x111d1b,_0x53f332,_0x49000a);}[_0x1a5be4(0x2a2)](_0x56971c,_0x3c1b0a,_0x974114){const _0x23c6a6=_0x1a5be4;this[_0x23c6a6(0x204)](_0x56971c,_0x3c1b0a)[_0x23c6a6(0x2a2)](_0x974114);}[_0x1a5be4(0x21e)](_0x223bb6,_0x5c5a6b,_0x348c64){const _0x122c0b=_0x1a5be4;return this[_0x122c0b(0x204)](_0x223bb6,_0x5c5a6b)[_0x122c0b(0x27f)](_0x348c64);}[_0x1a5be4(0x27f)](_0x5a29a3,_0xc59a89,_0x133628){const _0x2cb9ae=_0x1a5be4;return this[_0x2cb9ae(0x204)](_0x5a29a3,_0xc59a89)[_0x2cb9ae(0x27f)](_0x133628);}[_0x1a5be4(0x24a)](_0x20b0fc,_0x591358,_0xce2532){const _0x20c7ed=_0x1a5be4;return this['_ensureShapeModelManager'](_0x20b0fc,_0x591358)[_0x20c7ed(0x24a)](_0xce2532);}[_0x1a5be4(0x263)](_0x55ae0b,_0x25345d,_0x5a52b6){const _0x1c1ad9=_0x1a5be4;return this[_0x1c1ad9(0x204)](_0x55ae0b,_0x25345d)[_0x1c1ad9(0x27f)](_0x5a52b6);}['getShapeDataById'](_0x49ebda,_0x48d57c,_0x2236fe){const _0x2f3c20=_0x1a5be4,_0x4c3f83=this[_0x2f3c20(0x204)](_0x49ebda,_0x48d57c);if(!_0x4c3f83[_0x2f3c20(0x27f)](_0x2236fe))return;const _0x19e5c0=_0x4c3f83[_0x2f3c20(0x1fb)][_0x2f3c20(0x29a)](_0x2236fe);if(!_0x19e5c0)return;return _0x19e5c0[_0x2f3c20(0x292)]();}['getShapeModel'](_0x2622ea,_0x27fa55,_0x4800c1){const _0x378870=_0x1a5be4;return this[_0x378870(0x204)](_0x2622ea,_0x27fa55)[_0x378870(0x1fb)][_0x378870(0x29a)](_0x4800c1);}['getBasicShapeRelation'](_0x410eeb,_0x904ec2,_0x3be30d){const _0x300853=_0x1a5be4;return this[_0x300853(0x204)](_0x410eeb,_0x904ec2)[_0x300853(0x28f)](_0x3be30d);}[_0x1a5be4(0x27d)](_0x132ae2,_0xcad3be,_0x1e326d){const _0x318fc3=_0x1a5be4,_0x25a246=this[_0x318fc3(0x204)](_0x132ae2,_0xcad3be)['_shapes'][_0x318fc3(0x29a)](_0x1e326d);if(!_0x25a246)return;return _0x25a246['getShapeRelation']();}[_0x1a5be4(0x28c)](){}[_0x1a5be4(0x296)](_0x4786bc){const _0x463ca6=_0x1a5be4,_0x41515e={},_0x54dfaf=this[_0x463ca6(0x256)]['get'](_0x4786bc);if(_0x54dfaf)_0x54dfaf[_0x463ca6(0x24d)]((_0xb74062,_0x42e5d3)=>{const _0x3ed07e=_0x463ca6,_0x37475f=_0xb74062['toJSON']();if(_0x37475f[_0x3ed07e(0x220)]>0x0)_0x41515e[_0x42e5d3]=_0x37475f;});return JSON[_0x463ca6(0x277)](_0x41515e);}[_0x1a5be4(0x264)](_0x101b78,_0x38bd9c){const _0x5cdb46=_0x1a5be4;Object['keys'](_0x38bd9c)[_0x5cdb46(0x24d)](_0x570bbb=>{const _0x12b717=_0x5cdb46;this[_0x12b717(0x204)](_0x101b78,_0x570bbb)[_0x12b717(0x20c)](_0x38bd9c[_0x570bbb]);});}[_0x1a5be4(0x2aa)](){const _0x578d8b=_0x1a5be4,_0x4fe243={};return this[_0x578d8b(0x256)][_0x578d8b(0x24d)]((_0x3e1aee,_0x24897c)=>{const _0x26dae2=_0x578d8b;_0x4fe243[_0x24897c]={},_0x3e1aee[_0x26dae2(0x24d)]((_0x4e5dd6,_0x203d73)=>{_0x4fe243[_0x24897c][_0x203d73]=_0x4e5dd6['toJSON']();});}),_0x4fe243;}[_0x1a5be4(0x20c)](_0x2dd50d){const _0x309240=_0x1a5be4;Object[_0x309240(0x1fa)](_0x2dd50d)[_0x309240(0x24d)](_0x38410c=>{const _0x2aff27=_0x309240,_0x397e4a=_0x2dd50d[_0x38410c];Object[_0x2aff27(0x1fa)](_0x397e4a)[_0x2aff27(0x24d)](_0x40ce8f=>{const _0x2aac15=_0x2aff27;this[_0x2aac15(0x204)](_0x38410c,_0x40ce8f)['fromJSON'](_0x397e4a[_0x40ce8f]);});});}[_0x1a5be4(0x234)](){const _0x3bfa47=_0x1a5be4;this[_0x3bfa47(0x279)][_0x3bfa47(0x282)]({'pluginName':SHEET_SHAPE_PLUGIN,'businesses':[_univerjs_core[_0x3bfa47(0x28d)]['UNIVER_SHEET']],'toJson':_0x5bae11=>this[_0x3bfa47(0x296)](_0x5bae11),'parseJson':_0x1f5e11=>JSON[_0x3bfa47(0x26f)](_0x1f5e11),'onLoad':(_0x506a72,_0x413d9e)=>{const _0x2127b2=_0x3bfa47;this[_0x2127b2(0x264)](_0x506a72,_0x413d9e);},'onUnLoad':_0x5c47b7=>{const _0x4e9f83=_0x3bfa47,_0x246384=this['_shapeModelManagerMap'][_0x4e9f83(0x29a)](_0x5c47b7);_0x246384&&(_0x246384[_0x4e9f83(0x24d)](_0x1361ff=>{const _0x4f2922=_0x4e9f83;_0x1361ff[_0x4f2922(0x23a)]();}),this[_0x4e9f83(0x256)]['delete'](_0x5c47b7));}});}['dispose'](){const _0xbe3049=_0x1a5be4;this[_0xbe3049(0x256)][_0xbe3049(0x24d)](_0x1f4b43=>{const _0x27a60f=_0xbe3049;_0x1f4b43[_0x27a60f(0x24d)](_0x340c01=>{const _0x13ab1c=_0x27a60f;_0x340c01[_0x13ab1c(0x23a)]();});});}};SheetsShapeService=__decorate([__decorateParam(0x0,_univerjs_core[_0x1a5be4(0x25d)])],SheetsShapeService);const InsertSheetsShapeMutation={'id':_0x1a5be4(0x1f7),'type':_univerjs_core[_0x1a5be4(0x1f8)]['MUTATION'],'handler':(_0x2c0a2a,_0x49dbaf)=>{const _0x509684=_0x1a5be4,{unitId:_0x93f634,subUnitId:_0x423dde,shapeType:_0x1e6f67,shapeId:_0xe967cc,shapeData:_0x3ae57b}=_0x49dbaf;return _0x2c0a2a[_0x509684(0x29a)](SheetsShapeService)[_0x509684(0x1f6)](_0x93f634,_0x423dde,_0x1e6f67,_0xe967cc,_0x3ae57b),!![];}},RemoveSheetsShapeMutation={'id':_0x1a5be4(0x201),'type':_univerjs_core['CommandType'][_0x1a5be4(0x241)],'handler':(_0x59ae93,_0x314fe3)=>{const _0x1624a6=_0x1a5be4,{unitId:_0x571be8,subUnitId:_0x14d8b1,shapeId:_0x392ac5}=_0x314fe3;return _0x59ae93['get'](SheetsShapeService)[_0x1624a6(0x2a2)](_0x571be8,_0x14d8b1,_0x392ac5),!![];}},InsertShapeCommand={'type':_univerjs_core[_0x1a5be4(0x1f8)][_0x1a5be4(0x226)],'id':_0x1a5be4(0x26a),'handler':(_0x27f252,_0x4744b4)=>{const _0x3b3e12=_0x1a5be4;var _0x526358,_0x3d1f99;const _0x195181=(0x0,_univerjs_sheets[_0x3b3e12(0x28a)])(_0x27f252[_0x3b3e12(0x29a)](_univerjs_core['IUniverInstanceService']),_0x4744b4);if(!_0x195181)return![];const _0x19cfaf=_0x27f252[_0x3b3e12(0x29a)](_univerjs_sheets[_0x3b3e12(0x209)]),{unitId:_0x509263,subUnitId:_0x5e7fd6}=_0x195181,_0x3ae48d=_0x19cfaf[_0x3b3e12(0x298)](_0x509263,_0x5e7fd6);if(!_0x3ae48d)return![];const _0x30ff03=_0x27f252[_0x3b3e12(0x29a)](_univerjs_core[_0x3b3e12(0x1f2)]),_0x4489f1=_0x27f252['get'](_univerjs_core[_0x3b3e12(0x215)]),_0x45a22d=_0x27f252[_0x3b3e12(0x29a)](_univerjs_sheets[_0x3b3e12(0x246)]),_0x59b551=_0x27f252['get'](_univerjs_sheets_drawing[_0x3b3e12(0x232)]),{shapeType:_0x4aa99e,shapeData:_0x30986d}=_0x4744b4,_0x1b23e5=_0x4744b4['shapeId']||(0x0,_univerjs_core[_0x3b3e12(0x247)])(),_0x5f1370={'unitId':_0x509263,'subUnitId':_0x5e7fd6,'shapeId':_0x1b23e5,'shapeType':_0x4aa99e,'shapeData':_0x30986d},_0x2bcb1b=_0x4744b4[_0x3b3e12(0x275)]||0xc8,_0x24f22f=_0x4744b4[_0x3b3e12(0x221)]||0xc8;let _0x1d31d9=0x0,_0x5bae79=0x0,_0x34eb63={'row':0x0,'rowOffset':0x0,'column':0x0,'columnOffset':0x0},_0x43361e={'row':0x0,'rowOffset':0x0,'column':0x0,'columnOffset':0x0};if(_0x4744b4[_0x3b3e12(0x271)]){const {x:_0x557b0,y:_0x50222f}=_0x4744b4[_0x3b3e12(0x271)];_0x1d31d9=_0x557b0,_0x5bae79=_0x50222f,_0x34eb63=_0x3ae48d[_0x3b3e12(0x213)](_0x557b0,_0x50222f),_0x43361e=_0x3ae48d[_0x3b3e12(0x213)](_0x557b0+_0x2bcb1b,_0x50222f+_0x24f22f);}else{if(_0x4744b4['range']){const {startRow:_0x131f3f,startColumn:_0x31ec10}=_0x4744b4['range'],_0x47e29c=0xa,_0x5d3e97=0xa;_0x34eb63={'row':_0x131f3f,'rowOffset':_0x47e29c,'column':_0x31ec10,'columnOffset':_0x5d3e97};const _0xa63a7f=_0x3ae48d['getCellWithCoordByIndex'](_0x131f3f,_0x31ec10);_0x1d31d9=_0xa63a7f[_0x3b3e12(0x2a8)]+_0x5d3e97,_0x5bae79=_0xa63a7f[_0x3b3e12(0x1fd)]+_0x47e29c,_0x43361e=_0x3ae48d[_0x3b3e12(0x213)](_0x1d31d9+_0x2bcb1b,_0x5bae79+_0x24f22f);}}const _0x20102d={'from':_0x34eb63,'to':_0x43361e},_0x400b65={'unitId':_0x509263,'subUnitId':_0x5e7fd6,'drawingId':_0x1b23e5,'drawingType':_univerjs_core[_0x3b3e12(0x212)]['DRAWING_SHAPE'],'sheetTransform':_0x20102d,'transform':{'left':_0x1d31d9,'top':_0x5bae79,'width':_0x2bcb1b,'height':_0x24f22f},'data':{'shapeType':_0x4aa99e,'shapeData':_0x30986d},'axisAlignSheetTransform':_0x20102d,'allowTransform':!![]};(0x0,_univerjs_pro_engine_shape['isConnectorShape'])(_0x4aa99e)&&(_0x400b65[_0x3b3e12(0x280)][_0x3b3e12(0x289)]=![],_0x400b65[_0x3b3e12(0x280)]['rotateEnabled']=![],_0x400b65[_0x3b3e12(0x280)][_0x3b3e12(0x1f5)]=![],_0x400b65['data'][_0x3b3e12(0x1f3)]=![],_0x400b65[_0x3b3e12(0x24e)][_0x3b3e12(0x268)]=![],_0x400b65[_0x3b3e12(0x24e)][_0x3b3e12(0x1f5)]=![],_0x400b65[_0x3b3e12(0x24e)]['borderEnabled']=![]);const {undo:_0x3c9daa,redo:_0xa865e2,objects:_0x337e78}=_0x59b551[_0x3b3e12(0x235)]([_0x400b65]),_0x29bbae=_0x45a22d[_0x3b3e12(0x250)]({'id':_univerjs_sheets_drawing[_0x3b3e12(0x288)]['id'],'params':{'unitId':_0x509263,'drawings':[_0x400b65]}}),_0x26a4d3=[...(_0x526358=_0x29bbae[_0x3b3e12(0x228)])!==null&&_0x526358!==void 0x0?_0x526358:[],{'id':_univerjs_sheets_drawing['SetDrawingApplyMutation']['id'],'params':{'unitId':_0x509263,'subUnitId':_0x5e7fd6,'op':_0xa865e2,'objects':_0x337e78,'type':_univerjs_sheets_drawing[_0x3b3e12(0x2a1)][_0x3b3e12(0x230)]}},{'id':_univerjs_sheets_drawing[_0x3b3e12(0x29f)]['id'],'params':[_0x509263]},..._0x29bbae[_0x3b3e12(0x25e)],{'id':InsertSheetsShapeMutation['id'],'params':_0x5f1370}],_0x1aa3e8=[{'id':RemoveSheetsShapeMutation['id'],'params':{'unitId':_0x509263,'subUnitId':_0x5e7fd6,'shapeId':_0x1b23e5}},...(_0x3d1f99=_0x29bbae[_0x3b3e12(0x23f)])!==null&&_0x3d1f99!==void 0x0?_0x3d1f99:[],{'id':_univerjs_sheets_drawing[_0x3b3e12(0x206)]['id'],'params':{'unitId':_0x509263,'subUnitId':_0x5e7fd6,'op':_0x3c9daa,'objects':_0x337e78,'type':_univerjs_sheets_drawing[_0x3b3e12(0x2a1)]['REMOVE']}},{'id':_univerjs_sheets_drawing[_0x3b3e12(0x29f)]['id'],'params':[_0x509263]},..._0x29bbae[_0x3b3e12(0x2ac)]];if((0x0,_univerjs_core[_0x3b3e12(0x27e)])(_0x26a4d3,_0x30ff03))return _0x4489f1[_0x3b3e12(0x1f0)]({'unitID':_0x509263,'undoMutations':_0x1aa3e8,'redoMutations':_0x26a4d3}),!![];return![];}},UpdateSheetsShapeDataMutation={'id':_0x1a5be4(0x267),'type':_univerjs_core[_0x1a5be4(0x1f8)]['MUTATION'],'handler':(_0x11cafa,_0x240b08)=>{const _0x3860b9=_0x1a5be4,{unitId:_0x355377,subUnitId:_0x29d162,shapeType:_0x6c4da8,shapeId:_0x385d68,shapeData:_0x29f277}=_0x240b08,_0x11a5a2=_0x11cafa[_0x3860b9(0x29a)](SheetsShapeService)[_0x3860b9(0x2b3)](_0x355377,_0x29d162,_0x385d68);if(_0x11a5a2){if(_0x6c4da8!==void 0x0)_0x11a5a2[_0x3860b9(0x28c)](_0x6c4da8);if(_0x29f277)_0x11a5a2===null||_0x11a5a2===void 0x0||_0x11a5a2[_0x3860b9(0x21b)](_0x29f277,!![]);}return!![];}},SetShapeDrawingDataCommand={'type':_univerjs_core[_0x1a5be4(0x1f8)]['COMMAND'],'id':_0x1a5be4(0x25b),'handler':(_0x396c66,_0xb875fd)=>{const _0x5ece5a=_0x1a5be4;var _0x52d38f,_0x4d1422;const _0x2dc782=(0x0,_univerjs_sheets[_0x5ece5a(0x28a)])(_0x396c66['get'](_univerjs_core[_0x5ece5a(0x2a3)]),_0xb875fd);if(!_0x2dc782)return![];const _0x42b7c9=_0x396c66[_0x5ece5a(0x29a)](_univerjs_sheets[_0x5ece5a(0x209)]),{unitId:_0x5114a6,subUnitId:_0x22ba16}=_0x2dc782,_0x5eccb1=_0x42b7c9[_0x5ece5a(0x298)](_0x5114a6,_0x22ba16);if(!_0x5eccb1)return![];const _0x4a6aeb=_0x396c66[_0x5ece5a(0x29a)](SheetsShapeService),{shapeId:_0x11e0ab,shapeType:_0x2e53e1,shapeData:_0x5b6431,position:_0x45e10f,width:_0x5a6b2b,height:_0x5a8f61}=_0xb875fd,_0x5ac57e=_0x4a6aeb[_0x5ece5a(0x2b3)](_0x5114a6,_0x22ba16,_0x11e0ab);if(!_0x5ac57e)return![];const _0x276271=_0x396c66['get'](_univerjs_core['ICommandService']),_0x264dcc=_0x396c66[_0x5ece5a(0x29a)](_univerjs_core[_0x5ece5a(0x215)]),_0x59e8a1=_0x396c66['get'](_univerjs_sheets['SheetInterceptorService']),_0x3196c4=_0x396c66[_0x5ece5a(0x29a)](_univerjs_sheets_drawing[_0x5ece5a(0x232)]),_0x21d896={'unitId':_0x5114a6,'subUnitId':_0x22ba16,'shapeId':_0x11e0ab,'shapeType':_0x2e53e1,'shapeData':_0x5b6431},_0x31eeee=_0x5ac57e['getShapeType'](),_0x43ddd9=_0x5ac57e[_0x5ece5a(0x292)](),{x:_0x38efba,y:_0x2a3bec}=_0x45e10f,_0x8417ea={'from':_0x5eccb1['getCellIndexAndOffsetByPosition'](_0x38efba,_0x2a3bec),'to':_0x5eccb1[_0x5ece5a(0x213)](_0x38efba+_0x5a6b2b,_0x2a3bec+_0x5a8f61)},_0xd75c12={'unitId':_0x5114a6,'subUnitId':_0x22ba16,'drawingId':_0x11e0ab,'drawingType':_univerjs_core[_0x5ece5a(0x212)]['DRAWING_SHAPE'],'sheetTransform':_0x8417ea,'transform':{'left':_0x38efba,'top':_0x2a3bec,'width':_0x5a6b2b,'height':_0x5a8f61},'data':{'shapeType':_0x2e53e1,'shapeData':_0x5b6431},'axisAlignSheetTransform':_0x8417ea,'allowTransform':!![]};(0x0,_univerjs_pro_engine_shape[_0x5ece5a(0x210)])(_0x2e53e1)&&(_0xd75c12['data'][_0x5ece5a(0x289)]=![],_0xd75c12['data'][_0x5ece5a(0x268)]=![],_0xd75c12[_0x5ece5a(0x280)]['resizeEnabled']=![],_0xd75c12[_0x5ece5a(0x280)][_0x5ece5a(0x1f3)]=![],_0xd75c12[_0x5ece5a(0x24e)][_0x5ece5a(0x268)]=![],_0xd75c12[_0x5ece5a(0x24e)][_0x5ece5a(0x1f5)]=![],_0xd75c12[_0x5ece5a(0x24e)]['borderEnabled']=![]);const {undo:_0x3de38e,redo:_0x459dc2,objects:_0x24b659}=_0x3196c4['getBatchUpdateOp']([_0xd75c12]),_0x5ae5d8=_0x59e8a1[_0x5ece5a(0x250)]({'id':_univerjs_sheets_drawing[_0x5ece5a(0x26e)]['id'],'params':{'unitId':_0x5114a6,'drawings':[_0xd75c12]}}),_0xb1029=[...(_0x52d38f=_0x5ae5d8[_0x5ece5a(0x228)])!==null&&_0x52d38f!==void 0x0?_0x52d38f:[],{'id':_univerjs_sheets_drawing['SetDrawingApplyMutation']['id'],'params':{'unitId':_0x5114a6,'subUnitId':_0x22ba16,'op':_0x459dc2,'objects':_0x24b659,'type':_univerjs_sheets_drawing['DrawingApplyType'][_0x5ece5a(0x25c)]}},{'id':_univerjs_sheets_drawing[_0x5ece5a(0x29f)]['id'],'params':[_0x5114a6]},..._0x5ae5d8['redos'],{'id':UpdateSheetsShapeDataMutation['id'],'params':_0x21d896}],_0x68e2ef=[...(_0x4d1422=_0x5ae5d8[_0x5ece5a(0x23f)])!==null&&_0x4d1422!==void 0x0?_0x4d1422:[],{'id':_univerjs_sheets_drawing[_0x5ece5a(0x206)]['id'],'params':{'unitId':_0x5114a6,'subUnitId':_0x22ba16,'op':_0x3de38e,'objects':_0x24b659,'type':_univerjs_sheets_drawing[_0x5ece5a(0x2a1)][_0x5ece5a(0x25c)]}},{'id':_univerjs_sheets_drawing[_0x5ece5a(0x29f)]['id'],'params':[_0x5114a6]},..._0x5ae5d8[_0x5ece5a(0x2ac)],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x5114a6,'subUnitId':_0x22ba16,'shapeType':_0x31eeee,'shapeId':_0x11e0ab,'shapeData':_0x43ddd9}}];if((0x0,_univerjs_core['sequenceExecute'])(_0xb1029,_0x276271))return _0x264dcc[_0x5ece5a(0x1f0)]({'unitID':_0x5114a6,'undoMutations':_0x68e2ef,'redoMutations':_0xb1029}),!![];return![];}},ToggleSheetsShapeFlipCommand={'type':_univerjs_core['CommandType'][_0x1a5be4(0x226)],'id':_0x1a5be4(0x265),'handler':(_0x51cfe4,_0x52a7ce)=>{const _0x55983e=_0x1a5be4;var _0x206c24,_0x284742;const _0x1deb34=(0x0,_univerjs_sheets[_0x55983e(0x28a)])(_0x51cfe4[_0x55983e(0x29a)](_univerjs_core[_0x55983e(0x2a3)]),_0x52a7ce);if(!_0x1deb34)return![];const _0x427ca1=_0x51cfe4[_0x55983e(0x29a)](_univerjs_sheets[_0x55983e(0x209)]),{unitId:_0x4b9c3a,subUnitId:_0xeda316}=_0x1deb34,_0x229e8f=_0x427ca1[_0x55983e(0x2a0)](_0x4b9c3a,_0xeda316);if(!_0x229e8f)return![];const _0x127d38=_0x51cfe4[_0x55983e(0x29a)](_univerjs_sheets_drawing[_0x55983e(0x232)]),{shapeId:_0x25d797,flipH:_0x35c0f9,flipV:_0x282ffa}=_0x52a7ce,_0x46212e=_0x127d38[_0x55983e(0x295)]({'unitId':_0x4b9c3a,'subUnitId':_0xeda316,'drawingId':_0x25d797});if(!_0x46212e)return![];const _0x1f470d=_0x51cfe4['get'](SheetsShapeService)['getShapeModel'](_0x4b9c3a,_0xeda316,_0x25d797);if(!_0x1f470d)return![];const _0x149e44=_0x51cfe4[_0x55983e(0x29a)](_univerjs_core[_0x55983e(0x1f2)]),_0x1d0630=_0x51cfe4[_0x55983e(0x29a)](_univerjs_core[_0x55983e(0x215)]),_0x5e6319=_0x51cfe4['get'](_univerjs_sheets[_0x55983e(0x246)]),_0x23ed2c={..._0x46212e[_0x55983e(0x24e)]};if(_0x35c0f9!==void 0x0)_0x23ed2c[_0x55983e(0x290)]=!_0x23ed2c[_0x55983e(0x290)];if(_0x282ffa!==void 0x0)_0x23ed2c[_0x55983e(0x239)]=!_0x23ed2c[_0x55983e(0x239)];const _0xb973b=(0x0,_univerjs_sheets_drawing['transformToDrawingPosition'])(_0x23ed2c,_0x229e8f),_0x55b65a=(0x0,_univerjs_sheets_drawing[_0x55983e(0x21c)])(_0x23ed2c,_0x229e8f),_0x48aeb7=_0x1f470d[_0x55983e(0x27f)](),_0x29b058=_0x1f470d[_0x55983e(0x292)](),_0x192c8f={'unitId':_0x4b9c3a,'subUnitId':_0xeda316,'drawingId':_0x25d797,'drawingType':_univerjs_core[_0x55983e(0x212)]['DRAWING_SHAPE'],'sheetTransform':_0xb973b,'transform':_0x23ed2c,'data':{'shapeType':_0x48aeb7,'shapeData':_0x29b058},'axisAlignSheetTransform':_0x55b65a,'allowTransform':!![]},{undo:_0x35b860,redo:_0x3c6abc,objects:_0x2bd5ca}=_0x127d38[_0x55983e(0x249)]([_0x192c8f]),_0x122732=_0x5e6319[_0x55983e(0x250)]({'id':_univerjs_sheets_drawing[_0x55983e(0x26e)]['id'],'params':{'unitId':_0x4b9c3a,'drawings':[_0x192c8f]}}),_0x54740c=[...(_0x206c24=_0x122732['preRedos'])!==null&&_0x206c24!==void 0x0?_0x206c24:[],{'id':_univerjs_sheets_drawing['SetDrawingApplyMutation']['id'],'params':{'unitId':_0x4b9c3a,'subUnitId':_0xeda316,'op':_0x3c6abc,'objects':_0x2bd5ca,'type':_univerjs_sheets_drawing[_0x55983e(0x2a1)]['UPDATE']}},{'id':_univerjs_sheets_drawing[_0x55983e(0x29f)]['id'],'params':[_0x4b9c3a]},..._0x122732[_0x55983e(0x25e)]],_0x47e4fa=[...(_0x284742=_0x122732[_0x55983e(0x23f)])!==null&&_0x284742!==void 0x0?_0x284742:[],{'id':_univerjs_sheets_drawing['SetDrawingApplyMutation']['id'],'params':{'unitId':_0x4b9c3a,'subUnitId':_0xeda316,'op':_0x35b860,'objects':_0x2bd5ca,'type':_univerjs_sheets_drawing['DrawingApplyType'][_0x55983e(0x25c)]}},{'id':_univerjs_sheets_drawing[_0x55983e(0x29f)]['id'],'params':[_0x4b9c3a]},..._0x122732[_0x55983e(0x2ac)]];if((0x0,_univerjs_pro_engine_shape[_0x55983e(0x210)])(_0x48aeb7)){const _0x1ed6eb=_0x1f470d[_0x55983e(0x29b)]();if(_0x1ed6eb){const _0x461afc={..._0x1ed6eb};_0x461afc[_0x55983e(0x240)]=void 0x0,_0x461afc['to']=void 0x0,_0x54740c[_0x55983e(0x266)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x4b9c3a,'subUnitId':_0xeda316,'shapeId':_0x25d797,'shapeType':_0x48aeb7,'shapeData':{'relation':_0x461afc}}}),_0x47e4fa[_0x55983e(0x266)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x4b9c3a,'subUnitId':_0xeda316,'shapeId':_0x25d797,'shapeType':_0x48aeb7,'shapeData':{'relation':_0x1ed6eb}}});}}if((0x0,_univerjs_core[_0x55983e(0x27e)])(_0x54740c,_0x149e44))return _0x1d0630[_0x55983e(0x1f0)]({'unitID':_0x4b9c3a,'undoMutations':_0x47e4fa,'redoMutations':_0x54740c}),!![];return![];}},SetSheetsShapeRotateCommand={'type':_univerjs_core[_0x1a5be4(0x1f8)][_0x1a5be4(0x226)],'id':_0x1a5be4(0x293),'handler':(_0xc908d1,_0x5c88df)=>{const _0x59883e=_0x1a5be4;var _0x43a25b,_0x605bf9;const _0x45b6f1=(0x0,_univerjs_sheets[_0x59883e(0x28a)])(_0xc908d1[_0x59883e(0x29a)](_univerjs_core[_0x59883e(0x2a3)]),_0x5c88df);if(!_0x45b6f1)return![];const _0x3dd8b2=_0xc908d1[_0x59883e(0x29a)](_univerjs_sheets[_0x59883e(0x209)]),{unitId:_0x2e7765,subUnitId:_0x5ea835}=_0x45b6f1,_0x228cca=_0x3dd8b2[_0x59883e(0x2a0)](_0x2e7765,_0x5ea835);if(!_0x228cca)return![];const _0x4b9a30=_0xc908d1['get'](_univerjs_sheets_drawing[_0x59883e(0x232)]),{shapeId:_0xaf86b6,rotate:_0x2247be}=_0x5c88df,_0x52fe28=_0x4b9a30[_0x59883e(0x295)]({'unitId':_0x2e7765,'subUnitId':_0x5ea835,'drawingId':_0xaf86b6});if(!_0x52fe28)return![];const _0x4a72e9=_0xc908d1[_0x59883e(0x29a)](SheetsShapeService)[_0x59883e(0x2b3)](_0x2e7765,_0x5ea835,_0xaf86b6);if(!_0x4a72e9)return![];const _0x43fc70=_0xc908d1[_0x59883e(0x29a)](_univerjs_core['ICommandService']),_0x24bb0c=_0xc908d1[_0x59883e(0x29a)](_univerjs_core[_0x59883e(0x215)]),_0xd20f9d=_0xc908d1[_0x59883e(0x29a)](_univerjs_sheets[_0x59883e(0x246)]),_0x9addd1={..._0x52fe28[_0x59883e(0x24e)]};if(_0x2247be!==void 0x0)_0x9addd1[_0x59883e(0x1f1)]=(_0x9addd1[_0x59883e(0x1f1)]||0x0)+_0x2247be;const _0x9014e8=(0x0,_univerjs_sheets_drawing[_0x59883e(0x297)])(_0x9addd1,_0x228cca),_0x14d782=(0x0,_univerjs_sheets_drawing['transformToAxisAlignPosition'])(_0x9addd1,_0x228cca),_0x30748c=_0x4a72e9[_0x59883e(0x27f)](),_0x25347f=_0x4a72e9[_0x59883e(0x292)](),_0x25ed77={'unitId':_0x2e7765,'subUnitId':_0x5ea835,'drawingId':_0xaf86b6,'drawingType':_univerjs_core[_0x59883e(0x212)][_0x59883e(0x214)],'sheetTransform':_0x9014e8,'transform':_0x9addd1,'data':{'shapeType':_0x30748c,'shapeData':_0x25347f},'axisAlignSheetTransform':_0x14d782,'allowTransform':!![]},{undo:_0x2e5c3e,redo:_0x306286,objects:_0x4f0d94}=_0x4b9a30['getBatchUpdateOp']([_0x25ed77]),_0x2c09c4=_0xd20f9d[_0x59883e(0x250)]({'id':_univerjs_sheets_drawing[_0x59883e(0x26e)]['id'],'params':{'unitId':_0x2e7765,'drawings':[_0x25ed77]}}),_0x541578=[...(_0x43a25b=_0x2c09c4[_0x59883e(0x228)])!==null&&_0x43a25b!==void 0x0?_0x43a25b:[],{'id':_univerjs_sheets_drawing['SetDrawingApplyMutation']['id'],'params':{'unitId':_0x2e7765,'subUnitId':_0x5ea835,'op':_0x306286,'objects':_0x4f0d94,'type':_univerjs_sheets_drawing['DrawingApplyType'][_0x59883e(0x25c)]}},{'id':_univerjs_sheets_drawing[_0x59883e(0x29f)]['id'],'params':[_0x2e7765]},..._0x2c09c4['redos']],_0x153c68=[...(_0x605bf9=_0x2c09c4[_0x59883e(0x23f)])!==null&&_0x605bf9!==void 0x0?_0x605bf9:[],{'id':_univerjs_sheets_drawing[_0x59883e(0x206)]['id'],'params':{'unitId':_0x2e7765,'subUnitId':_0x5ea835,'op':_0x2e5c3e,'objects':_0x4f0d94,'type':_univerjs_sheets_drawing[_0x59883e(0x2a1)]['UPDATE']}},{'id':_univerjs_sheets_drawing[_0x59883e(0x29f)]['id'],'params':[_0x2e7765]},..._0x2c09c4['undos']];if((0x0,_univerjs_core['sequenceExecute'])(_0x541578,_0x43fc70))return _0x24bb0c[_0x59883e(0x1f0)]({'unitID':_0x2e7765,'undoMutations':_0x153c68,'redoMutations':_0x541578}),!![];return![];}},SetSheetsShapeTextVerticalToggleCommand={'type':_univerjs_core['CommandType'][_0x1a5be4(0x226)],'id':_0x1a5be4(0x285),'handler':(_0x110a86,_0x3303ae)=>{const _0x386dd8=_0x1a5be4;var _0x41aaab;const _0x10c236=(0x0,_univerjs_sheets[_0x386dd8(0x28a)])(_0x110a86['get'](_univerjs_core[_0x386dd8(0x2a3)]),_0x3303ae);if(!_0x10c236)return![];const {unitId:_0x1d5d93,subUnitId:_0x5756d1}=_0x10c236,{shapeId:_0x1590b8}=_0x3303ae,_0x567e96=_0x110a86[_0x386dd8(0x29a)](SheetsShapeService)[_0x386dd8(0x2b3)](_0x1d5d93,_0x5756d1,_0x1590b8);if(!_0x567e96)return![];const _0x2357f2=_0x567e96[_0x386dd8(0x21f)](),_0x2b08a3=(_0x41aaab=_0x2357f2===null||_0x2357f2===void 0x0?void 0x0:_0x2357f2[_0x386dd8(0x257)])!==null&&_0x41aaab!==void 0x0?_0x41aaab:!![],_0x53f252=!_0x2b08a3,_0x5e6f3b=_0x110a86[_0x386dd8(0x29a)](_univerjs_core[_0x386dd8(0x1f2)]),_0x48fd11=_0x110a86[_0x386dd8(0x29a)](_univerjs_core[_0x386dd8(0x215)]),_0x2c8479={'unitId':_0x1d5d93,'subUnitId':_0x5756d1,'shapeId':_0x1590b8,'shapeData':{'shapeText':{'isHorizontal':_0x53f252}}},_0x17ca64={'unitId':_0x1d5d93,'subUnitId':_0x5756d1,'shapeId':_0x1590b8,'shapeData':{'shapeText':{'isHorizontal':_0x2b08a3}}},_0x3f54d2=[{'id':UpdateSheetsShapeDataMutation['id'],'params':_0x2c8479}],_0x4c77be=[{'id':UpdateSheetsShapeDataMutation['id'],'params':_0x17ca64}];if((0x0,_univerjs_core[_0x386dd8(0x27e)])(_0x3f54d2,_0x5e6f3b))return _0x48fd11[_0x386dd8(0x1f0)]({'unitID':_0x1d5d93,'undoMutations':_0x4c77be,'redoMutations':_0x3f54d2}),!![];return![];}},UpdateConnectorRelationCommand={'type':_univerjs_core[_0x1a5be4(0x1f8)][_0x1a5be4(0x226)],'id':_0x1a5be4(0x255),'handler':(_0x1a7fa7,_0x13a034)=>{const _0x24c18e=_0x1a5be4;var _0x3e58b8,_0x3e4e8a,_0x56c234,_0x1a02e4;const _0x562a02=(0x0,_univerjs_sheets[_0x24c18e(0x28a)])(_0x1a7fa7[_0x24c18e(0x29a)](_univerjs_core['IUniverInstanceService']),_0x13a034);if(!_0x562a02)return![];const _0x36eefb=_0x1a7fa7[_0x24c18e(0x29a)](_univerjs_sheets[_0x24c18e(0x209)]),{unitId:_0x2f2e9f,subUnitId:_0x292fbe}=_0x562a02,_0x5e38b1=_0x36eefb[_0x24c18e(0x2a0)](_0x2f2e9f,_0x292fbe);if(!_0x5e38b1)return![];const _0x1d8669=_0x1a7fa7[_0x24c18e(0x29a)](_univerjs_sheets_drawing[_0x24c18e(0x232)]),{connectorShapeId:_0x10113b,width:_0x9d827f,height:_0x34bcbe,left:_0x4c216a,top:_0x4bac26,flipX:_0x3568a5,flipY:_0x349eaf,rotation:_0x207216,oldAdjustValues:_0x59a4ab,newAdjustValues:_0x2588d6,oldLineType:_0x46d339,newLineType:_0x2cbd93,oldRelation:_0x7cd33a,newRelation:_0x1f49be}=_0x13a034,_0x5edd16=_0x1d8669[_0x24c18e(0x295)]({'unitId':_0x2f2e9f,'subUnitId':_0x292fbe,'drawingId':_0x10113b});if(!_0x5edd16)return![];const _0x5d62bb=_0x1a7fa7['get'](SheetsShapeService)[_0x24c18e(0x2b3)](_0x2f2e9f,_0x292fbe,_0x10113b);if(!_0x5d62bb)return![];const _0x4d5f91=_0x1a7fa7['get'](_univerjs_core[_0x24c18e(0x1f2)]),_0x227af9=_0x1a7fa7['get'](_univerjs_core[_0x24c18e(0x215)]),_0x2ce95c=_0x1a7fa7[_0x24c18e(0x29a)](_univerjs_sheets[_0x24c18e(0x246)]),_0x44aaad={..._0x5edd16[_0x24c18e(0x24e)],'width':_0x9d827f,'height':_0x34bcbe,'left':_0x4c216a,'top':_0x4bac26,'flipX':_0x3568a5,'flipY':_0x349eaf,'angle':(_0x3e58b8=_0x207216!==null&&_0x207216!==void 0x0?_0x207216:(_0x3e4e8a=_0x5edd16[_0x24c18e(0x24e)])===null||_0x3e4e8a===void 0x0?void 0x0:_0x3e4e8a[_0x24c18e(0x1f1)])!==null&&_0x3e58b8!==void 0x0?_0x3e58b8:0x0},_0x2bfcfe=(0x0,_univerjs_sheets_drawing[_0x24c18e(0x297)])(_0x44aaad,_0x5e38b1),_0x1e5299=(0x0,_univerjs_sheets_drawing[_0x24c18e(0x21c)])(_0x44aaad,_0x5e38b1),_0x3a7726=_0x5d62bb[_0x24c18e(0x27f)](),_0x6dd7cf=_0x5d62bb[_0x24c18e(0x292)](),_0x7ed12e={'unitId':_0x2f2e9f,'subUnitId':_0x292fbe,'drawingId':_0x10113b,'drawingType':_univerjs_core[_0x24c18e(0x212)][_0x24c18e(0x214)],'sheetTransform':_0x2bfcfe,'transform':_0x44aaad,'data':{'shapeType':_0x2cbd93||_0x46d339||_0x3a7726,'shapeData':{..._0x6dd7cf,'adjustValues':_0x2588d6||_0x59a4ab||(_0x6dd7cf===null||_0x6dd7cf===void 0x0?void 0x0:_0x6dd7cf[_0x24c18e(0x23e)]),'relation':_0x1f49be||_0x7cd33a||(_0x6dd7cf===null||_0x6dd7cf===void 0x0?void 0x0:_0x6dd7cf['relation'])}},'axisAlignSheetTransform':_0x1e5299,'allowTransform':!![]},{undo:_0x4198af,redo:_0x2ecb4b,objects:_0x4ea3fe}=_0x1d8669[_0x24c18e(0x249)]([_0x7ed12e]),_0x4f6d60=_0x2ce95c[_0x24c18e(0x250)]({'id':_univerjs_sheets_drawing[_0x24c18e(0x26e)]['id'],'params':{'unitId':_0x2f2e9f,'drawings':[_0x7ed12e]}}),_0x10be78=[...(_0x56c234=_0x4f6d60[_0x24c18e(0x228)])!==null&&_0x56c234!==void 0x0?_0x56c234:[],{'id':_univerjs_sheets_drawing[_0x24c18e(0x206)]['id'],'params':{'unitId':_0x2f2e9f,'subUnitId':_0x292fbe,'op':_0x2ecb4b,'objects':_0x4ea3fe,'type':_univerjs_sheets_drawing[_0x24c18e(0x2a1)][_0x24c18e(0x25c)]}},{'id':_univerjs_sheets_drawing[_0x24c18e(0x29f)]['id'],'params':[_0x2f2e9f]},..._0x4f6d60[_0x24c18e(0x25e)],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x2f2e9f,'subUnitId':_0x292fbe,'shapeId':_0x10113b,'shapeType':_0x2cbd93,'shapeData':{'adjustValues':_0x2588d6,'relation':_0x1f49be}}}],_0x3fd730=[...(_0x1a02e4=_0x4f6d60['preUndos'])!==null&&_0x1a02e4!==void 0x0?_0x1a02e4:[],{'id':_univerjs_sheets_drawing[_0x24c18e(0x206)]['id'],'params':{'unitId':_0x2f2e9f,'subUnitId':_0x292fbe,'op':_0x4198af,'objects':_0x4ea3fe,'type':_univerjs_sheets_drawing['DrawingApplyType'][_0x24c18e(0x25c)]}},{'id':_univerjs_sheets_drawing[_0x24c18e(0x29f)]['id'],'params':[_0x2f2e9f]},..._0x4f6d60[_0x24c18e(0x2ac)],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x2f2e9f,'subUnitId':_0x292fbe,'shapeId':_0x10113b,'shapeType':_0x3a7726,'shapeData':{..._0x6dd7cf,'adjustValues':_0x59a4ab||(_0x6dd7cf===null||_0x6dd7cf===void 0x0?void 0x0:_0x6dd7cf[_0x24c18e(0x23e)]),'relation':_0x7cd33a||(_0x6dd7cf===null||_0x6dd7cf===void 0x0?void 0x0:_0x6dd7cf[_0x24c18e(0x225)])}}}];if((0x0,_univerjs_core['sequenceExecute'])(_0x10be78,_0x4d5f91))return _0x227af9[_0x24c18e(0x1f0)]({'unitID':_0x2f2e9f,'undoMutations':_0x3fd730,'redoMutations':_0x10be78}),!![];return![];}},UpdateLineShapeResizeCommand={'type':_univerjs_core['CommandType'][_0x1a5be4(0x226)],'id':_0x1a5be4(0x231),'handler':(_0x4547a7,_0x59f476)=>{const _0x5756a3=_0x1a5be4;var _0x52e5a0,_0x5c6c1a;const _0x57a2b3=(0x0,_univerjs_sheets[_0x5756a3(0x28a)])(_0x4547a7['get'](_univerjs_core[_0x5756a3(0x2a3)]),_0x59f476);if(!_0x57a2b3)return![];const _0xbe192=_0x4547a7[_0x5756a3(0x29a)](_univerjs_sheets[_0x5756a3(0x209)]),{unitId:_0x3ca3b7,subUnitId:_0x3358fe}=_0x57a2b3,_0x316e0b=_0xbe192[_0x5756a3(0x2a0)](_0x3ca3b7,_0x3358fe);if(!_0x316e0b)return![];const _0x396511=_0x4547a7[_0x5756a3(0x29a)](_univerjs_sheets_drawing[_0x5756a3(0x232)]),{shapeId:_0x1ddca9,width:_0x1d25ef,height:_0x1cca2e,left:_0x4d486d,top:_0x36fc5a,flipX:_0x2ab733,flipY:_0x34290a,angle:_0x9d7152,oldAdjustValues:_0x5af7a9,newAdjustValues:_0x4125b0,oldLineType:_0x34d08e,newLineType:_0x2be283}=_0x59f476,_0x285352=_0x396511[_0x5756a3(0x295)]({'unitId':_0x3ca3b7,'subUnitId':_0x3358fe,'drawingId':_0x1ddca9});if(!_0x285352)return![];const _0x545098=_0x4547a7[_0x5756a3(0x29a)](SheetsShapeService)['getShapeModel'](_0x3ca3b7,_0x3358fe,_0x1ddca9);if(!_0x545098)return![];const _0x5d19e3=_0x4547a7[_0x5756a3(0x29a)](_univerjs_core['ICommandService']),_0x1446ce=_0x4547a7[_0x5756a3(0x29a)](_univerjs_core[_0x5756a3(0x215)]),_0x2cdb51=_0x4547a7[_0x5756a3(0x29a)](_univerjs_sheets[_0x5756a3(0x246)]),_0x2a984f={..._0x285352['transform'],'width':_0x1d25ef,'height':_0x1cca2e,'left':_0x4d486d,'top':_0x36fc5a,'flipX':_0x2ab733,'flipY':_0x34290a,'angle':_0x9d7152},_0x4a51e3=(0x0,_univerjs_sheets_drawing[_0x5756a3(0x297)])(_0x2a984f,_0x316e0b),_0x383784=(0x0,_univerjs_sheets_drawing['transformToAxisAlignPosition'])(_0x2a984f,_0x316e0b),_0xbaf9f1=_0x545098['getShapeType'](),_0x46c334=_0x545098[_0x5756a3(0x292)](),_0x1b18f3={'unitId':_0x3ca3b7,'subUnitId':_0x3358fe,'drawingId':_0x1ddca9,'drawingType':_univerjs_core[_0x5756a3(0x212)][_0x5756a3(0x214)],'sheetTransform':_0x4a51e3,'transform':_0x2a984f,'data':{'shapeType':_0x2be283||_0x34d08e||_0xbaf9f1,'shapeData':{..._0x46c334,'adjustValues':_0x4125b0||_0x5af7a9||(_0x46c334===null||_0x46c334===void 0x0?void 0x0:_0x46c334[_0x5756a3(0x23e)])}},'axisAlignSheetTransform':_0x383784,'allowTransform':!![]},{undo:_0x142d5b,redo:_0x189aa5,objects:_0x31c8d9}=_0x396511['getBatchUpdateOp']([_0x1b18f3]),_0x157814=_0x2cdb51[_0x5756a3(0x250)]({'id':_univerjs_sheets_drawing[_0x5756a3(0x26e)]['id'],'params':{'unitId':_0x3ca3b7,'drawings':[_0x1b18f3]}}),_0x43a31c=[...(_0x52e5a0=_0x157814['preRedos'])!==null&&_0x52e5a0!==void 0x0?_0x52e5a0:[],{'id':_univerjs_sheets_drawing[_0x5756a3(0x206)]['id'],'params':{'unitId':_0x3ca3b7,'subUnitId':_0x3358fe,'op':_0x189aa5,'objects':_0x31c8d9,'type':_univerjs_sheets_drawing[_0x5756a3(0x2a1)][_0x5756a3(0x25c)]}},{'id':_univerjs_sheets_drawing['ClearSheetDrawingTransformerOperation']['id'],'params':[_0x3ca3b7]},..._0x157814[_0x5756a3(0x25e)],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x3ca3b7,'subUnitId':_0x3358fe,'shapeId':_0x1ddca9,'shapeType':_0x2be283,'shapeData':{'adjustValues':_0x4125b0}}}],_0x1c3c01=[...(_0x5c6c1a=_0x157814[_0x5756a3(0x23f)])!==null&&_0x5c6c1a!==void 0x0?_0x5c6c1a:[],{'id':_univerjs_sheets_drawing[_0x5756a3(0x206)]['id'],'params':{'unitId':_0x3ca3b7,'subUnitId':_0x3358fe,'op':_0x142d5b,'objects':_0x31c8d9,'type':_univerjs_sheets_drawing['DrawingApplyType']['UPDATE']}},{'id':_univerjs_sheets_drawing[_0x5756a3(0x29f)]['id'],'params':[_0x3ca3b7]},..._0x157814[_0x5756a3(0x2ac)],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x3ca3b7,'subUnitId':_0x3358fe,'shapeId':_0x1ddca9,'shapeType':_0xbaf9f1,'shapeData':{..._0x46c334,'adjustValues':_0x5af7a9||(_0x46c334===null||_0x46c334===void 0x0?void 0x0:_0x46c334[_0x5756a3(0x23e)])}}}];if((0x0,_univerjs_core['sequenceExecute'])(_0x43a31c,_0x5d19e3))return _0x1446ce[_0x5756a3(0x1f0)]({'unitID':_0x3ca3b7,'undoMutations':_0x1c3c01,'redoMutations':_0x43a31c}),!![];return![];}},UpdateSheetsShapeTypeMutation={'id':_0x1a5be4(0x28b),'type':_univerjs_core['CommandType'][_0x1a5be4(0x241)],'handler':(_0x2956ad,_0x5f176f)=>{const _0x612ee=_0x1a5be4,{unitId:_0xfd703b,subUnitId:_0x21e373,shapeType:_0x503df4,shapeId:_0x43e2a3,shapeData:_0xd9e119}=_0x5f176f,_0x520352=_0x2956ad[_0x612ee(0x29a)](SheetsShapeService)[_0x612ee(0x2b3)](_0xfd703b,_0x21e373,_0x43e2a3);if(_0x520352){_0x520352[_0x612ee(0x28c)](_0x503df4);if(_0xd9e119)_0x520352===null||_0x520352===void 0x0||_0x520352[_0x612ee(0x21b)](_0xd9e119);}return!![];}},UpdateSheetsShapeTypeCommand={'id':_0x1a5be4(0x20b),'type':_univerjs_core[_0x1a5be4(0x1f8)][_0x1a5be4(0x226)],'handler':(_0x6d92c7,_0xb1fb85)=>{const _0x55b831=_0x1a5be4;if(!_0xb1fb85)return![];const _0x2bfd1a=_0x6d92c7[_0x55b831(0x29a)](_univerjs_core[_0x55b831(0x1f2)]),_0x236fa6=_0x6d92c7['get'](SheetsShapeService),_0x546e80=_0x6d92c7[_0x55b831(0x29a)](_univerjs_core[_0x55b831(0x215)]),_0x3b5bc7=[],_0x2af347=[],{unitId:_0x3e8901,subUnitId:_0xbbcd34,shapeId:_0x1b7649,shapeType:_0x2c898e,shapeData:_0xc621d7}=_0xb1fb85,_0x44af29=_0x236fa6[_0x55b831(0x2b3)](_0x3e8901,_0xbbcd34,_0x1b7649);if(_0x44af29){const _0x3edc79=_0x44af29['getShapeType'](),_0x4daa4e=Object[_0x55b831(0x227)]({},_0x44af29[_0x55b831(0x292)]()),_0x50bf7f={'unitId':_0x3e8901,'subUnitId':_0xbbcd34,'shapeId':_0x1b7649,'shapeType':_0x2c898e,'shapeData':_0xc621d7},_0x4847e7={'unitId':_0x3e8901,'subUnitId':_0xbbcd34,'shapeId':_0x1b7649,'shapeType':_0x3edc79,'shapeData':_0x4daa4e};_0x3b5bc7[_0x55b831(0x266)]({'id':UpdateSheetsShapeTypeMutation['id'],'params':_0x50bf7f}),_0x2af347[_0x55b831(0x266)]({'id':UpdateSheetsShapeTypeMutation['id'],'params':_0x4847e7});if(_0x3b5bc7['every'](_0x38b4e5=>_0x2bfd1a['syncExecuteCommand'](_0x38b4e5['id'],_0x38b4e5[_0x55b831(0x262)])))_0x546e80[_0x55b831(0x1f0)]({'unitID':_0x3e8901,'redoMutations':[..._0x3b5bc7],'undoMutations':[..._0x2af347]});return!![];}return![];}};var name=_0x1a5be4(0x2b2),version=_0x1a5be4(0x23d);const SHEETS_SHAPE_PLUGIN_CONFIG_KEY=_0x1a5be4(0x248),configSymbol=Symbol(SHEETS_SHAPE_PLUGIN_CONFIG_KEY),defaultPluginConfig={};let SheetsShapeController=class SheetsShapeController extends _univerjs_core[_0x1a5be4(0x237)]{constructor(_0x4dc10b,_0x4ed525,_0x3fc22d,_0x1691ca,_0xef359c){const _0x5afd30=_0x1a5be4;super(),this['_commandService']=_0x4dc10b,this['_sheetInterceptorService']=_0x4ed525,this[_0x5afd30(0x229)]=_0x3fc22d,this[_0x5afd30(0x1ed)]=_0x1691ca,this[_0x5afd30(0x2b1)]=_0xef359c,this[_0x5afd30(0x24b)](),this['_initCommandInterceptor']();}[_0x1a5be4(0x24b)](){const _0x209d73=_0x1a5be4;[InsertShapeCommand,SetShapeDrawingDataCommand,ToggleSheetsShapeFlipCommand,SetSheetsShapeRotateCommand,SetSheetsShapeTextVerticalToggleCommand,UpdateConnectorRelationCommand,UpdateLineShapeResizeCommand,InsertSheetsShapeMutation,RemoveSheetsShapeMutation,UpdateSheetsShapeTypeMutation,UpdateSheetsShapeDataMutation][_0x209d73(0x24d)](_0x43ab0a=>this[_0x209d73(0x242)](this[_0x209d73(0x245)]['registerCommand'](_0x43ab0a)));}[_0x1a5be4(0x2b4)](){const _0x17a011=_0x1a5be4;this[_0x17a011(0x242)](this[_0x17a011(0x1fc)][_0x17a011(0x2a4)]({'getMutations':_0x2136b3=>{const _0x54a32a=_0x17a011;if(_0x2136b3['id']===_univerjs_sheets_drawing[_0x54a32a(0x28e)]['id']){const {drawings:_0xd70784}=_0x2136b3[_0x54a32a(0x262)],_0x6b2147=_0xd70784[_0x54a32a(0x1fe)](_0x4f4d73=>_0x4f4d73['drawingType']===_univerjs_core[_0x54a32a(0x212)][_0x54a32a(0x214)]);if(_0x6b2147[_0x54a32a(0x220)]===0x0)return{'preRedos':[],'redos':[],'preUndos':[],'undos':[]};const _0x365796=[],_0x792f4f=[];return _0x6b2147['forEach'](_0x416928=>{const _0x10cd08=_0x54a32a,{unitId:_0x550e7d,subUnitId:_0x433a53,drawingId:_0x1b78a3}=_0x416928,_0x56c69a=this['_sheetsShapeService'][_0x10cd08(0x2b3)](_0x550e7d,_0x433a53,_0x1b78a3);if(!_0x56c69a)throw new TypeError(_0x10cd08(0x20a)+_0x56c69a);_0x365796[_0x10cd08(0x266)]({'id':RemoveSheetsShapeMutation['id'],'params':{'unitId':_0x550e7d,'subUnitId':_0x433a53,'shapeId':_0x1b78a3}}),_0x792f4f['push']({'id':InsertSheetsShapeMutation['id'],'params':{'unitId':_0x550e7d,'subUnitId':_0x433a53,'shapeId':_0x1b78a3,'shapeType':_0x56c69a[_0x10cd08(0x27f)](),'shapeData':_0x56c69a[_0x10cd08(0x292)]()}});const _0x1e223c=this[_0x10cd08(0x1ed)][_0x10cd08(0x28f)](_0x550e7d,_0x433a53,_0x1b78a3);if(_0x1e223c)for(const _0x3ad6fa of _0x1e223c){const _0x3f4b24=_0x3ad6fa[_0x10cd08(0x211)],_0x349a3e=_0x3ad6fa[_0x10cd08(0x272)],_0x3ed308=_0x349a3e?{'from':void 0x0}:{'to':void 0x0},_0x19c7db=_0x349a3e?{'from':{'shapeId':_0x3ad6fa['shapeId'],'cxnIndex':_0x3ad6fa[_0x10cd08(0x2b7)]}}:{'to':{'shapeId':_0x3ad6fa[_0x10cd08(0x23b)],'cxnIndex':_0x3ad6fa[_0x10cd08(0x2b7)]}};_0x365796[_0x10cd08(0x266)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x550e7d,'subUnitId':_0x433a53,'shapeId':_0x3f4b24,'shapeData':{'relation':_0x3ed308}}}),_0x792f4f[_0x10cd08(0x266)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x550e7d,'subUnitId':_0x433a53,'shapeId':_0x3f4b24,'shapeData':{'relation':_0x19c7db}}});}}),{'preRedos':_0x365796,'redos':[],'preUndos':[],'undos':_0x792f4f};}if(_0x2136b3['id']===_univerjs_sheets_drawing[_0x54a32a(0x26e)]['id']){const {drawings:_0x40fa64}=_0x2136b3['params'],_0x5cc09c=_0x40fa64[_0x54a32a(0x1fe)](_0x17d917=>_0x17d917[_0x54a32a(0x2b6)]===_univerjs_core[_0x54a32a(0x212)]['DRAWING_SHAPE']);if(_0x5cc09c[_0x54a32a(0x220)]===0x0)return{'preRedos':[],'redos':[],'preUndos':[],'undos':[]};const _0x37d0c5=[],_0x27a8b2=[];for(const _0x333f89 of _0x5cc09c){const {unitId:_0x75aa04,subUnitId:_0x3d5105,drawingId:_0x35fc37,transform:_0x4247cd}=_0x333f89;if(!_0x75aa04||!_0x3d5105||!_0x35fc37||!_0x4247cd)continue;const _0x211659=this[_0x54a32a(0x1ed)][_0x54a32a(0x2b3)](_0x75aa04,_0x3d5105,_0x35fc37);if(!_0x211659)throw new TypeError(_0x54a32a(0x20a)+_0x211659);if((0x0,_univerjs_pro_engine_shape[_0x54a32a(0x210)])(_0x211659[_0x54a32a(0x27f)]())){const _0x2edc2c=this[_0x54a32a(0x1ed)]['getLineShapeRelation'](_0x75aa04,_0x3d5105,_0x35fc37),_0x320123={'from':void 0x0,'to':void 0x0};_0x2edc2c&&(_0x37d0c5[_0x54a32a(0x266)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x75aa04,'subUnitId':_0x3d5105,'shapeId':_0x35fc37,'shapeData':{'relation':_0x320123}}}),_0x27a8b2[_0x54a32a(0x266)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x75aa04,'subUnitId':_0x3d5105,'shapeId':_0x35fc37,'shapeData':{'relation':_0x2edc2c}}}));}else{const _0x7922b0=this[_0x54a32a(0x1ed)]['getBasicShapeRelation'](_0x75aa04,_0x3d5105,_0x35fc37);if(_0x7922b0&&_0x7922b0[_0x54a32a(0x220)]>0x0)for(const _0x5c2d4d of _0x7922b0){const _0x2207a2=_0x5c2d4d[_0x54a32a(0x211)],_0x10f10d=_0x5c2d4d[_0x54a32a(0x272)],_0x3ee6f5=this[_0x54a32a(0x1ed)][_0x54a32a(0x2b3)](_0x75aa04,_0x3d5105,_0x2207a2);if(!_0x3ee6f5)continue;const _0x3cbf29=_0x3ee6f5[_0x54a32a(0x24f)](),_0x2145de=_0x3ee6f5[_0x54a32a(0x207)]();if(_0x3cbf29&&_0x2145de)this['_addLineRerouteUpdates'](_0x75aa04,_0x3d5105,_0x2207a2,_0x3ee6f5,_0x3cbf29,_0x2145de,_0x37d0c5,_0x27a8b2,_0x35fc37,_0x4247cd);else this['_addLineFollowShapeUpdates'](_0x75aa04,_0x3d5105,_0x2207a2,_0x3ee6f5,_0x10f10d?_0x3cbf29:_0x2145de,_0x10f10d,_0x37d0c5,_0x27a8b2,_0x35fc37,_0x4247cd);}}}return{'preRedos':[],'redos':_0x37d0c5,'preUndos':_0x27a8b2,'undos':[]};}return{'preRedos':[],'redos':[],'preUndos':[],'undos':[]};}}));}[_0x1a5be4(0x1ff)](_0x41e479,_0x401150,_0x3f252f,_0x5a493c,_0x360f52){const _0x15b166=_0x1a5be4;if(!_0x401150||!_0x3f252f)return null;const {shapeId:_0x13dd84,cxnIndex:_0x5b5fe6}=_0x41e479,_0x122064=this[_0x15b166(0x1ed)][_0x15b166(0x2b3)](_0x401150,_0x3f252f,_0x13dd84);if(!_0x122064)return null;const _0x5931be=this[_0x15b166(0x2b1)][_0x15b166(0x295)]({'unitId':_0x401150,'subUnitId':_0x3f252f,'drawingId':_0x13dd84});if(!(_0x5931be===null||_0x5931be===void 0x0?void 0x0:_0x5931be['transform']))return null;let {left:left=0x0,top:top=0x0,width:width=0x0,height:height=0x0,flipX:flipX=![],flipY:flipY=![],angle:_0x50b327}=_0x5931be[_0x15b166(0x24e)];if(_0x360f52&&_0x5a493c===_0x13dd84){var _0x31ea47,_0x337b0a,_0x4078dc,_0x3432da,_0x2fc23e,_0x3f89d9,_0x4b0bad;left=(_0x31ea47=_0x360f52[_0x15b166(0x252)])!==null&&_0x31ea47!==void 0x0?_0x31ea47:left,top=(_0x337b0a=_0x360f52['top'])!==null&&_0x337b0a!==void 0x0?_0x337b0a:top,width=(_0x4078dc=_0x360f52['width'])!==null&&_0x4078dc!==void 0x0?_0x4078dc:width,height=(_0x3432da=_0x360f52[_0x15b166(0x221)])!==null&&_0x3432da!==void 0x0?_0x3432da:height,flipX=(_0x2fc23e=_0x360f52[_0x15b166(0x290)])!==null&&_0x2fc23e!==void 0x0?_0x2fc23e:flipX,flipY=(_0x3f89d9=_0x360f52['flipY'])!==null&&_0x3f89d9!==void 0x0?_0x3f89d9:flipY,_0x50b327=(_0x4b0bad=_0x360f52[_0x15b166(0x1f1)])!==null&&_0x4b0bad!==void 0x0?_0x4b0bad:_0x50b327;}_0x122064[_0x15b166(0x1ee)]({'width':width,'height':height});const _0x3f320f=_0x122064['getConnectionSiteList']()[_0x15b166(0x1f9)](_0x528034=>_0x528034[_0x15b166(0x216)]===_0x5b5fe6);if(!_0x3f320f)return null;let _0x1259bc=flipX?width-_0x3f320f['x']:_0x3f320f['x'],_0x260742=flipY?height-_0x3f320f['y']:_0x3f320f['y'];if(_0x50b327!==0x0&&_0x50b327!==void 0x0&&_0x50b327!==null){const _0xd4eaa0=_0x50b327*Math['PI']/0xb4,_0x1afa39=Math[_0x15b166(0x223)](_0xd4eaa0),_0xd9e798=Math[_0x15b166(0x26c)](_0xd4eaa0),_0x16fd56=width/0x2,_0x24fcb1=height/0x2,_0x3bf309=_0x1259bc-_0x16fd56,_0x479286=_0x260742-_0x24fcb1;_0x1259bc=_0x16fd56+_0x3bf309*_0x1afa39-_0x479286*_0xd9e798,_0x260742=_0x24fcb1+_0x3bf309*_0xd9e798+_0x479286*_0x1afa39;}_0x1259bc+=left,_0x260742+=top;let _0x44b86c=_0x3f320f[_0x15b166(0x281)]/0xea60;if(flipX)_0x44b86c=0xb4-_0x44b86c;if(flipY)_0x44b86c=-_0x44b86c;_0x44b86c+=_0x50b327||0x0,_0x44b86c=(_0x44b86c%0x168+0x168)%0x168;const _0x7566af=(0x0,_univerjs_pro_engine_shape[_0x15b166(0x259)])({'left':left,'top':top,'width':width,'height':height},_0x50b327||0x0);return{'point':{'x':_0x1259bc,'y':_0x260742},'angle':_0x44b86c,'bounds':_0x7566af};}[_0x1a5be4(0x27b)](_0x5be42f,_0x57b21b,_0x5a861c,_0x16d6fb,_0x21bc22,_0x7ec55f,_0x4e2995,_0x1c9eff,_0x538752,_0x2bb206){const _0xa94ad0=_0x1a5be4,_0x431c80=this[_0xa94ad0(0x229)][_0xa94ad0(0x2a0)](_0x5be42f,_0x57b21b);if(!_0x431c80)return;const _0x2410b3=_0x16d6fb[_0xa94ad0(0x29b)](),_0xc3941=_0x16d6fb['getAdjustNames'](),_0x4e56bd={},_0x1d1100={};_0xc3941[_0xa94ad0(0x24d)](_0x2825d4=>{const _0x49bfb9=_0xa94ad0,_0x2e9f1e=_0x16d6fb[_0x49bfb9(0x287)](_0x2825d4);_0x1d1100[_0x2825d4]=_0x2e9f1e!==null&&_0x2e9f1e!==void 0x0?_0x2e9f1e:0x0;});const _0x141c6b=this[_0xa94ad0(0x1ff)](_0x21bc22,_0x5be42f,_0x57b21b,_0x538752,_0x2bb206),_0x173aac=this[_0xa94ad0(0x1ff)](_0x7ec55f,_0x5be42f,_0x57b21b,_0x538752,_0x2bb206);if(_0x141c6b&&_0x173aac){const _0x43987b=_0x16d6fb[_0xa94ad0(0x27f)](),_0x510464=(0x0,_univerjs_pro_engine_shape[_0xa94ad0(0x218)])(_0x141c6b,_0x173aac,_0x43987b);let _0x5a7abc=_0x43987b;if(_0x510464){const _0x4b6364=(0x0,_univerjs_pro_engine_shape['computeConnectorRouteLayout'])(_0x510464,_0x16d6fb[_0xa94ad0(0x27f)]()),_0x18f0ed=this[_0xa94ad0(0x2b1)]['getDrawingData'](_0x5be42f,_0x57b21b);if(_0x18f0ed&&_0x18f0ed[_0x5a861c]){const _0x3762d8=_0x18f0ed[_0x5a861c];_0x5a7abc=_0x4b6364[_0xa94ad0(0x202)];for(const [_0x2d1e0c,_0x29aafe]of Object[_0xa94ad0(0x22e)](_0x4b6364[_0xa94ad0(0x23e)]))_0x4e56bd[_0x2d1e0c]=_0x29aafe;const _0x70cb1d={..._0x3762d8[_0xa94ad0(0x24e)],'width':_0x4b6364[_0xa94ad0(0x260)][_0xa94ad0(0x275)],'height':_0x4b6364['worldRect'][_0xa94ad0(0x221)],'left':_0x4b6364['worldRect']['left'],'top':_0x4b6364['worldRect'][_0xa94ad0(0x26b)],'flipX':_0x4b6364[_0xa94ad0(0x260)][_0xa94ad0(0x290)],'flipY':_0x4b6364[_0xa94ad0(0x260)][_0xa94ad0(0x239)],'angle':_0x4b6364[_0xa94ad0(0x283)]},_0x12d309=(0x0,_univerjs_sheets_drawing[_0xa94ad0(0x297)])(_0x70cb1d,_0x431c80),_0x48135c=(0x0,_univerjs_sheets_drawing[_0xa94ad0(0x21c)])(_0x70cb1d,_0x431c80),_0x366c7a={'unitId':_0x5be42f,'subUnitId':_0x57b21b,'drawingType':_univerjs_core['DrawingTypeEnum'][_0xa94ad0(0x214)],'drawingId':_0x5a861c,'transform':_0x70cb1d,'sheetTransform':_0x12d309,'axisAlignSheetTransform':_0x48135c},{unitId:_0x15bbb6,subUnitId:_0x592985,undo:_0x204c29,redo:_0x36c349,objects:_0x2afb3e}=this[_0xa94ad0(0x2b1)][_0xa94ad0(0x249)]([_0x366c7a]);_0x4e2995[_0xa94ad0(0x266)]({'id':_univerjs_sheets_drawing[_0xa94ad0(0x206)]['id'],'params':{'unitId':_0x15bbb6,'subUnitId':_0x592985,'op':_0x36c349,'objects':_0x2afb3e,'type':_univerjs_sheets_drawing['DrawingApplyType'][_0xa94ad0(0x25c)]}}),_0x1c9eff[_0xa94ad0(0x266)]({'id':_univerjs_sheets_drawing['SetDrawingApplyMutation']['id'],'params':{'unitId':_0x15bbb6,'subUnitId':_0x592985,'op':_0x204c29,'objects':_0x2afb3e,'type':_univerjs_sheets_drawing['DrawingApplyType'][_0xa94ad0(0x25c)]}});}_0x16d6fb[_0xa94ad0(0x270)]();}_0x4e2995[_0xa94ad0(0x266)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x5be42f,'subUnitId':_0x57b21b,'shapeId':_0x5a861c,'shapeType':_0x5a7abc,'shapeData':{'adjustValues':_0x4e56bd,'relation':_0x2410b3}}}),_0x1c9eff[_0xa94ad0(0x266)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x5be42f,'subUnitId':_0x57b21b,'shapeId':_0x5a861c,'shapeType':_0x43987b,'shapeData':{'adjustValues':_0x1d1100,'relation':_0x2410b3}}});}}[_0x1a5be4(0x27c)](_0x156109,_0x5668d9,_0x274ff6,_0x321768,_0xcbfd53,_0x52954c,_0x3b0893,_0x36f6bf,_0x2c123f,_0x2bb174){const _0x51773a=_0x1a5be4;var _0x266e69;if(!_0xcbfd53)return;const _0xadbe67=this[_0x51773a(0x229)][_0x51773a(0x2a0)](_0x156109,_0x5668d9);if(!_0xadbe67)return;const _0x13aa1d=(_0x266e69=this['_drawingManagerService']['getDrawingByParam']({'unitId':_0x156109,'subUnitId':_0x5668d9,'drawingId':_0x2c123f}))===null||_0x266e69===void 0x0?void 0x0:_0x266e69[_0x51773a(0x24e)];if(!_0x13aa1d)return;const _0x335590=_0x13aa1d['left']!==_0x2bb174[_0x51773a(0x252)]||_0x13aa1d['top']!==_0x2bb174['top'],_0xbe6a07=_0x13aa1d[_0x51773a(0x275)]!==_0x2bb174[_0x51773a(0x275)]||_0x13aa1d[_0x51773a(0x221)]!==_0x2bb174['height'],_0x5c8647=_0x13aa1d['flipX']!==_0x2bb174[_0x51773a(0x290)]||_0x13aa1d[_0x51773a(0x239)]!==_0x2bb174[_0x51773a(0x239)],_0x56568c=_0x13aa1d[_0x51773a(0x1f1)]!==_0x2bb174['angle'];if(_0x335590&&!_0xbe6a07&&!_0x5c8647&&!_0x56568c){var _0x39f34a,_0x15f96f,_0x228d6e,_0x1d3688;const _0xb63746=((_0x39f34a=_0x2bb174[_0x51773a(0x252)])!==null&&_0x39f34a!==void 0x0?_0x39f34a:0x0)-((_0x15f96f=_0x13aa1d[_0x51773a(0x252)])!==null&&_0x15f96f!==void 0x0?_0x15f96f:0x0),_0x6ab70e=((_0x228d6e=_0x2bb174[_0x51773a(0x26b)])!==null&&_0x228d6e!==void 0x0?_0x228d6e:0x0)-((_0x1d3688=_0x13aa1d['top'])!==null&&_0x1d3688!==void 0x0?_0x1d3688:0x0),_0x1a7e03=this[_0x51773a(0x2b1)][_0x51773a(0x2a7)](_0x156109,_0x5668d9);if(_0x1a7e03&&_0x1a7e03[_0x274ff6]){var _0x6ded48,_0x2ae7c4,_0x57df0c,_0x2eed16;const _0x3a0ad2=_0x1a7e03[_0x274ff6],_0x3485a1={..._0x3a0ad2['transform'],'left':((_0x6ded48=(_0x2ae7c4=_0x3a0ad2['transform'])===null||_0x2ae7c4===void 0x0?void 0x0:_0x2ae7c4[_0x51773a(0x252)])!==null&&_0x6ded48!==void 0x0?_0x6ded48:0x0)+_0xb63746,'top':((_0x57df0c=(_0x2eed16=_0x3a0ad2[_0x51773a(0x24e)])===null||_0x2eed16===void 0x0?void 0x0:_0x2eed16[_0x51773a(0x26b)])!==null&&_0x57df0c!==void 0x0?_0x57df0c:0x0)+_0x6ab70e},_0x3f7201=(0x0,_univerjs_sheets_drawing[_0x51773a(0x297)])(_0x3485a1,_0xadbe67),_0x246e83=(0x0,_univerjs_sheets_drawing[_0x51773a(0x21c)])(_0x3485a1,_0xadbe67),_0x2a798f={'unitId':_0x156109,'subUnitId':_0x5668d9,'drawingType':_univerjs_core[_0x51773a(0x212)]['DRAWING_SHAPE'],'drawingId':_0x274ff6,'transform':_0x3485a1,'sheetTransform':_0x3f7201,'axisAlignSheetTransform':_0x246e83},{unitId:_0x495a59,subUnitId:_0xfa07d9,undo:_0x320f2a,redo:_0x1b7177,objects:_0x1a7017}=this[_0x51773a(0x2b1)]['getBatchUpdateOp']([_0x2a798f]);_0x3b0893[_0x51773a(0x266)]({'id':_univerjs_sheets_drawing[_0x51773a(0x206)]['id'],'params':{'unitId':_0x495a59,'subUnitId':_0xfa07d9,'op':_0x1b7177,'objects':_0x1a7017,'type':_univerjs_sheets_drawing['DrawingApplyType'][_0x51773a(0x25c)]}}),_0x36f6bf['push']({'id':_univerjs_sheets_drawing[_0x51773a(0x206)]['id'],'params':{'unitId':_0x495a59,'subUnitId':_0xfa07d9,'op':_0x320f2a,'objects':_0x1a7017,'type':_univerjs_sheets_drawing[_0x51773a(0x2a1)][_0x51773a(0x25c)]}});}}else{const _0x545c1b=_0x321768['getStartConnectInfo'](),_0xf16ede=_0x321768[_0x51773a(0x207)]();this[_0x51773a(0x27b)](_0x156109,_0x5668d9,_0x274ff6,_0x321768,_0x545c1b,_0xf16ede,_0x3b0893,_0x36f6bf,_0x2c123f,_0x2bb174);}}};function _0x598a(_0x46ed31,_0x457a08){_0x46ed31=_0x46ed31-0x1ed;const _0x532ac5=_0x532a();let _0x598abc=_0x532ac5[_0x46ed31];return _0x598abc;}SheetsShapeController=__decorate([__decorateParam(0x0,_univerjs_core[_0x1a5be4(0x1f2)]),__decorateParam(0x1,(0x0,_univerjs_core['Inject'])(_univerjs_sheets[_0x1a5be4(0x246)])),__decorateParam(0x2,(0x0,_univerjs_core['Inject'])(_univerjs_sheets[_0x1a5be4(0x209)])),__decorateParam(0x3,(0x0,_univerjs_core[_0x1a5be4(0x254)])(SheetsShapeService)),__decorateParam(0x4,(0x0,_univerjs_core[_0x1a5be4(0x254)])(_univerjs_drawing[_0x1a5be4(0x22a)]))],SheetsShapeController);let UniverSheetsShapePlugin=class UniverSheetsShapePlugin extends _univerjs_core[_0x1a5be4(0x222)]{constructor(_0x585342=defaultPluginConfig,_0x54015c,_0x17941d,_0x1a9479){const _0x1b3f24=_0x1a5be4;super(),this[_0x1b3f24(0x203)]=_0x585342,this['_injector']=_0x54015c,this[_0x1b3f24(0x245)]=_0x17941d,this[_0x1b3f24(0x273)]=_0x1a9479;const {..._0x2e6888}=(0x0,_univerjs_core['merge'])({},defaultPluginConfig,this['_config']);this['_configService'][_0x1b3f24(0x2a9)](SHEETS_SHAPE_PLUGIN_CONFIG_KEY,_0x2e6888);}[_0x1a5be4(0x299)](){const _0x1790a5=_0x1a5be4,_0x14e94c=this[_0x1790a5(0x294)];[[SheetShapeModelManager],[SheetsShapeService],[SheetsShapeController]][_0x1790a5(0x24d)](_0x1aee45=>_0x14e94c['add'](_0x1aee45)),(0x0,_univerjs_core[_0x1790a5(0x284)])(_0x14e94c,[[SheetsShapeService],[SheetsShapeController]]);}};_defineProperty(UniverSheetsShapePlugin,'type',_univerjs_core[_0x1a5be4(0x28d)]['UNIVER_SHEET']),_defineProperty(UniverSheetsShapePlugin,_0x1a5be4(0x25f),'SHEET_SHAPE_PLUGIN'),_defineProperty(UniverSheetsShapePlugin,_0x1a5be4(0x2b5),name),_defineProperty(UniverSheetsShapePlugin,_0x1a5be4(0x236),version),UniverSheetsShapePlugin=__decorate([(0x0,_univerjs_core[_0x1a5be4(0x2a6)])(_univerjs_pro_license['UniverLicensePlugin']),__decorateParam(0x1,(0x0,_univerjs_core['Inject'])(_univerjs_core[_0x1a5be4(0x24c)])),__decorateParam(0x2,_univerjs_core[_0x1a5be4(0x1f2)]),__decorateParam(0x3,_univerjs_core[_0x1a5be4(0x22c)])],UniverSheetsShapePlugin),exports[_0x1a5be4(0x21a)]=DEFAULT_SHAPE_HEIGHT,exports['DEFAULT_SHAPE_WIDTH']=DEFAULT_SHAPE_WIDTH,exports[_0x1a5be4(0x274)]=InsertShapeCommand,exports['InsertSheetsShapeMutation']=InsertSheetsShapeMutation,exports['RemoveSheetsShapeMutation']=RemoveSheetsShapeMutation,exports['SetShapeDrawingDataCommand']=SetShapeDrawingDataCommand,exports[_0x1a5be4(0x20e)]=SetSheetsShapeRotateCommand,exports['SetSheetsShapeTextVerticalToggleCommand']=SetSheetsShapeTextVerticalToggleCommand,Object[_0x1a5be4(0x261)](exports,_0x1a5be4(0x29e),{'enumerable':!![],'get':function(){return SheetsShapeService;}}),exports[_0x1a5be4(0x20f)]=ToggleSheetsShapeFlipCommand,Object[_0x1a5be4(0x261)](exports,'UniverSheetsShapePlugin',{'enumerable':!![],'get':function(){return UniverSheetsShapePlugin;}}),exports[_0x1a5be4(0x278)]=UpdateConnectorRelationCommand,exports[_0x1a5be4(0x286)]=UpdateLineShapeResizeCommand,exports[_0x1a5be4(0x243)]=UpdateSheetsShapeDataMutation,exports[_0x1a5be4(0x2a5)]=UpdateSheetsShapeTypeCommand,exports[_0x1a5be4(0x27a)]=UpdateSheetsShapeTypeMutation;
1
+ const _0x1420e0=_0x1b33;(function(_0x2f619f,_0x382120){const _0x22ed93=_0x1b33,_0x10a848=_0x2f619f();while(!![]){try{const _0x1aa6c7=parseInt(_0x22ed93(0x1ad))/0x1*(parseInt(_0x22ed93(0x224))/0x2)+-parseInt(_0x22ed93(0x1d8))/0x3+parseInt(_0x22ed93(0x1ae))/0x4+-parseInt(_0x22ed93(0x16e))/0x5+-parseInt(_0x22ed93(0x17c))/0x6*(-parseInt(_0x22ed93(0x1ab))/0x7)+parseInt(_0x22ed93(0x22f))/0x8*(-parseInt(_0x22ed93(0x1a8))/0x9)+-parseInt(_0x22ed93(0x1b7))/0xa*(-parseInt(_0x22ed93(0x19e))/0xb);if(_0x1aa6c7===_0x382120)break;else _0x10a848['push'](_0x10a848['shift']());}catch(_0x21cd83){_0x10a848['push'](_0x10a848['shift']());}}}(_0x5df6,0x67ebd),Object[_0x1420e0(0x1c8)](exports,Symbol[_0x1420e0(0x1a6)],{'value':_0x1420e0(0x1b0)}));let _univerjs_pro_engine_shape=require('@univerjs-pro/engine-shape'),_univerjs_core=require('@univerjs/core'),_univerjs_sheets=require('@univerjs/sheets'),_univerjs_sheets_drawing=require('@univerjs/sheets-drawing'),_univerjs_pro_license=require('@univerjs-pro/license'),_univerjs_drawing=require('@univerjs/drawing');const DEFAULT_SHAPE_WIDTH=0xc8,DEFAULT_SHAPE_HEIGHT=0xc8;function _typeof(_0x358621){'@babel/helpers - typeof';const _0x3fb051=_0x1420e0;return _typeof=_0x3fb051(0x1f1)==typeof Symbol&&_0x3fb051(0x1c2)==typeof Symbol[_0x3fb051(0x215)]?function(_0x5b8544){return typeof _0x5b8544;}:function(_0x35b1b5){const _0x3f80ca=_0x3fb051;return _0x35b1b5&&'function'==typeof Symbol&&_0x35b1b5[_0x3f80ca(0x190)]===Symbol&&_0x35b1b5!==Symbol[_0x3f80ca(0x1af)]?_0x3f80ca(0x1c2):typeof _0x35b1b5;},_typeof(_0x358621);}function toPrimitive(_0x54d9dc,_0xe72839){const _0x3ed171=_0x1420e0;if(_0x3ed171(0x1f9)!=_typeof(_0x54d9dc)||!_0x54d9dc)return _0x54d9dc;var _0x35e0df=_0x54d9dc[Symbol[_0x3ed171(0x16a)]];if(void 0x0!==_0x35e0df){var _0xab6c46=_0x35e0df[_0x3ed171(0x1b5)](_0x54d9dc,_0xe72839||_0x3ed171(0x202));if(_0x3ed171(0x1f9)!=_typeof(_0xab6c46))return _0xab6c46;throw new TypeError(_0x3ed171(0x1d5));}return(_0x3ed171(0x180)===_0xe72839?String:Number)(_0x54d9dc);}function toPropertyKey(_0x18a995){const _0x3d36af=_0x1420e0;var _0x47824c=toPrimitive(_0x18a995,_0x3d36af(0x180));return _0x3d36af(0x1c2)==_typeof(_0x47824c)?_0x47824c:_0x47824c+'';}function _defineProperty(_0x40f6a6,_0x45df40,_0x5759a){const _0x3a14d0=_0x1420e0;return(_0x45df40=toPropertyKey(_0x45df40))in _0x40f6a6?Object[_0x3a14d0(0x1c8)](_0x40f6a6,_0x45df40,{'value':_0x5759a,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x40f6a6[_0x45df40]=_0x5759a,_0x40f6a6;}var SheetShapeModelManager=class extends _univerjs_core[_0x1420e0(0x177)]{constructor(){const _0xc3d89a=_0x1420e0;super(),_defineProperty(this,'_shapes',new Map()),_defineProperty(this,_0xc3d89a(0x176),new Set()),_defineProperty(this,_0xc3d89a(0x168),new Set());}['addShape'](_0x26c406,_0x2012bf,_0x5a00f7){const _0x5b3e95=_0x1420e0,_0x597f52=new _univerjs_pro_engine_shape['ShapeModel'](_0x26c406,_0x2012bf,_0x5a00f7);this[_0x5b3e95(0x1b6)][_0x5b3e95(0x1ed)](_0x2012bf,_0x597f52);if((0x0,_univerjs_pro_engine_shape[_0x5b3e95(0x1fd)])(_0x26c406))this['_linesIds'][_0x5b3e95(0x1f6)](_0x2012bf);return _0x597f52;}[_0x1420e0(0x1d1)](_0x2c825d){const _0x3c17cb=_0x1420e0,_0x2a4ff4=[];for(const _0x519f72 of this[_0x3c17cb(0x176)]){const _0x4273ab=this['_shapes']['get'](_0x519f72);if(_0x4273ab){const _0x11cc56=_0x4273ab[_0x3c17cb(0x1c1)]();if(_0x11cc56){var _0x4b7214,_0x569048;if(((_0x4b7214=_0x11cc56[_0x3c17cb(0x1cc)])===null||_0x4b7214===void 0x0?void 0x0:_0x4b7214[_0x3c17cb(0x22d)])===_0x2c825d)_0x2a4ff4['push']({..._0x11cc56[_0x3c17cb(0x1cc)],'lineShapeId':_0x519f72,'isFrom':!![]});if(((_0x569048=_0x11cc56['to'])===null||_0x569048===void 0x0?void 0x0:_0x569048[_0x3c17cb(0x22d)])===_0x2c825d)_0x2a4ff4[_0x3c17cb(0x20e)]({..._0x11cc56['to'],'lineShapeId':_0x519f72,'isFrom':![]});}}}return _0x2a4ff4;}[_0x1420e0(0x179)](_0x51a018){const _0x26dcf9=_0x1420e0,_0x2354b1=this[_0x26dcf9(0x1b6)]['get'](_0x51a018);if(_0x2354b1)return _0x2354b1[_0x26dcf9(0x1c1)]();}[_0x1420e0(0x1db)](_0x401d94){const _0x1434dc=_0x1420e0,_0x119729=this[_0x1434dc(0x1b6)][_0x1434dc(0x213)](_0x401d94);if(_0x119729)return _0x119729[_0x1434dc(0x1db)]();}[_0x1420e0(0x18b)](_0x471836){const _0x1978da=_0x1420e0;return this[_0x1978da(0x1b6)]['has'](_0x471836);}[_0x1420e0(0x1a3)](_0x348e60){const _0x2baf07=_0x1420e0,_0xdf8036=this[_0x2baf07(0x1b6)][_0x2baf07(0x213)](_0x348e60);if(!_0xdf8036)return;if((0x0,_univerjs_pro_engine_shape[_0x2baf07(0x1fd)])(_0xdf8036[_0x2baf07(0x1db)]()))this[_0x2baf07(0x176)][_0x2baf07(0x1ff)](_0x348e60);this[_0x2baf07(0x1b6)][_0x2baf07(0x1ff)](_0x348e60);}['toJSON'](){const _0x529fd2=_0x1420e0,_0x5dcef0=[];return this[_0x529fd2(0x1b6)][_0x529fd2(0x22a)](_0xb338fd=>{const _0x3e38e5=_0x529fd2;_0x5dcef0['push'](_0xb338fd[_0x3e38e5(0x16b)]());}),_0x5dcef0;}[_0x1420e0(0x1bc)](_0x4009b9){const _0xf6fa07=_0x1420e0;for(const _0x10bf92 of _0x4009b9){const {id:_0x2e11ec,shapeType:_0xaa0a2e}=_0x10bf92,_0x1417a6=this[_0xf6fa07(0x1ef)](_0xaa0a2e,_0x2e11ec,_0x10bf92[_0xf6fa07(0x1b1)]);if(_0x1417a6&&_0x1417a6[_0xf6fa07(0x1a7)]())this[_0xf6fa07(0x176)]['add'](_0x2e11ec);}}[_0x1420e0(0x22c)](){const _0x33659c=_0x1420e0;if(this[_0x33659c(0x1d2)])return;this[_0x33659c(0x1b6)][_0x33659c(0x22a)](_0x5e52d3=>{const _0x409e66=_0x33659c;_0x5e52d3[_0x409e66(0x22c)]();}),this['_shapes'][_0x33659c(0x227)](),this[_0x33659c(0x176)][_0x33659c(0x227)](),this[_0x33659c(0x168)][_0x33659c(0x227)](),super[_0x33659c(0x22c)]();}};function __decorateParam(_0x52f759,_0x31c012){return function(_0x295cca,_0x578971){_0x31c012(_0x295cca,_0x578971,_0x52f759);};}function __decorate(_0x1c3f1d,_0xb68cd6,_0x5171e4,_0x2b6bf1){const _0x112065=_0x1420e0;var _0x897924=arguments[_0x112065(0x206)],_0x4d69a3=_0x897924<0x3?_0xb68cd6:_0x2b6bf1===null?_0x2b6bf1=Object[_0x112065(0x1ec)](_0xb68cd6,_0x5171e4):_0x2b6bf1,_0x55ec87;if(typeof Reflect===_0x112065(0x1f9)&&typeof Reflect[_0x112065(0x1c4)]===_0x112065(0x1f1))_0x4d69a3=Reflect[_0x112065(0x1c4)](_0x1c3f1d,_0xb68cd6,_0x5171e4,_0x2b6bf1);else{for(var _0x5cb865=_0x1c3f1d[_0x112065(0x206)]-0x1;_0x5cb865>=0x0;_0x5cb865--)if(_0x55ec87=_0x1c3f1d[_0x5cb865])_0x4d69a3=(_0x897924<0x3?_0x55ec87(_0x4d69a3):_0x897924>0x3?_0x55ec87(_0xb68cd6,_0x5171e4,_0x4d69a3):_0x55ec87(_0xb68cd6,_0x5171e4))||_0x4d69a3;}return _0x897924>0x3&&_0x4d69a3&&Object['defineProperty'](_0xb68cd6,_0x5171e4,_0x4d69a3),_0x4d69a3;}const SHEET_SHAPE_PLUGIN=_0x1420e0(0x172);function _0x5df6(){const _0x2304d8=['UniverLicensePlugin','SetDrawingApplyMutation','UpdateLineShapeResizeCommand','add','rotateEnabled','CommandType','object','entries','packageName','routeConnectorLineShape','isConnectorShape','updateContext','delete','sheet.command.update-connector-relation','SheetsShapeService','default','_sheetInterceptorService','params','angle','length','transformToDrawingPosition','getAdjustNames','getSheetCommandTarget','setShapeData','sheet.command.insert-shape','sequenceExecute','UniverInstanceType','push','UNIVER_SHEET','worldRect','getBasicShapeType','data','get','_addLineRerouteUpdates','iterator','flipX','_serializeShapeForUnit','_initSnapshot','merge','transformToAxisAlignPosition','rotation','0.21.0','getDrawingByParam','_ensureShapeModelManager','left','_commandService','InsertShapeCommand','find','pushUndoRedo','50VLeKLN','width','sheet.command.set-shape-drawing-data','clear','every','fill','forEach','removeLinePoints','dispose','shapeId','MUTATION','184BOhWfu','syncExecuteCommand','SheetSkeletonService','IConfigService','drawingType','sheet.command.update-line-shape-resize','position','_groupIds','getBatchUpdateOp','toPrimitive','toJSON','isFrom','getEndConnectInfo','1450655ndbNKM','getSkeleton','getDrawingData','redos','SHEET_SHAPE_PLUGIN','DrawingTypeEnum','INSERT','index','_linesIds','Disposable','filter','getLineShapeRelation','startY','_resourcesManagerService','57918EQqsPN','adjustValues','transform','disposeWithMe','string','SetSheetDrawingCommand','UniverSheetsShapePlugin','@univerjs-pro/sheets-shape','UpdateSheetsShapeTypeMutation','IUniverInstanceService','keys','onCommandExecute','ISheetDrawingService','sheet.mutation.insert-shape','preRedos','hasShape','Fail\x20to\x20get\x20shape\x20model,\x20get:\x20','SetSheetsShapeTextVerticalToggleCommand','InsertSheetDrawingCommand','cos','constructor','RemoveSheetDrawingCommand','getShapeTextData','DRAWING_SHAPE','touchDependencies','flipY','_sheetsShapeService','generateRandomId','COMMAND','lineShapeId','borderEnabled','Inject','relation','REMOVE','11wLIgBp','version','sheet.mutation.update-shape-data','sheet.mutation.update-shape-type','DependentOn','removeShape','getShapeModel','sheet.command.toggle-shape-flip','toStringTag','isLineShape','251658Tpbcdx','_shapeModelManagerMap','parse','196NdXYcY','DrawingApplyType','29675KxAaYj','2110780zGFsuU','prototype','Module','shapeData','cxnIndex','preUndos','sin','call','_shapes','5172740htCncm','ensureSkeleton','UPDATE','sheet.command.update-shape-type','sheets-shape.config','fromJSON','ToggleSheetsShapeFlipCommand','getStartConnectInfo','_addLineFollowShapeUpdates','IUndoRedoService','getShapeRelation','symbol','InsertSheetsShapeMutation','decorate','SheetInterceptorService','range','_config','defineProperty','undos','sheet.mutation.remove-shape','onStarting','from','_sheetSkeletonService','insertShape','_injector','interceptCommand','getBasicShapeRelation','_disposed','_initCommands','Plugin','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','pluginName','getCellIndexAndOffsetByPosition','2094630RzlwmS','SetShapeDrawingDataCommand','height','getShapeType','getShapeData','resizeEnabled','startX','_configService','type','_deserializeShapeForUnit','UpdateSheetsShapeTypeCommand','sheet.command.set-shape-rotate','top','setShapeType','assign','_drawingManagerService','getCellWithCoordByIndex','_initCommandInterceptor','ClearSheetDrawingTransformerOperation','DEFAULT_SHAPE_HEIGHT','getOwnPropertyDescriptor','set','_getConnectPointInfo','addShape','ICommandService','function','getShapeDataById'];_0x5df6=function(){return _0x2304d8;};return _0x5df6();}let SheetsShapeService=class SheetsShapeService extends _univerjs_core[_0x1420e0(0x177)]{constructor(_0x4d1272){const _0x23026b=_0x1420e0;super(),this['_resourcesManagerService']=_0x4d1272,_defineProperty(this,'_shapeModelManagerMap',new Map()),this[_0x23026b(0x218)]();}[_0x1420e0(0x21e)](_0x488e2d,_0x52275f){const _0xc9f119=_0x1420e0;let _0x37ac1c=this['_shapeModelManagerMap'][_0xc9f119(0x213)](_0x488e2d);!_0x37ac1c&&(_0x37ac1c=new Map(),this[_0xc9f119(0x1a9)][_0xc9f119(0x1ed)](_0x488e2d,_0x37ac1c));let _0x1d1168=_0x37ac1c[_0xc9f119(0x213)](_0x52275f);return!_0x1d1168&&(_0x1d1168=new SheetShapeModelManager(),_0x37ac1c[_0xc9f119(0x1ed)](_0x52275f,_0x1d1168)),_0x1d1168;}['insertShape'](_0x159ed0,_0x46e076,_0x4ea77f,_0x7f9541,_0x494e80){const _0x1c87d8=_0x1420e0;this[_0x1c87d8(0x21e)](_0x159ed0,_0x46e076)[_0x1c87d8(0x1ef)](_0x4ea77f,_0x7f9541,_0x494e80);}['removeShape'](_0x3bba0d,_0x2d7cbe,_0x2d2b8b){const _0x16ed4f=_0x1420e0;this[_0x16ed4f(0x21e)](_0x3bba0d,_0x2d7cbe)[_0x16ed4f(0x1a3)](_0x2d2b8b);}[_0x1420e0(0x211)](_0x26f7e6,_0x406325,_0x11cc7d){const _0x463055=_0x1420e0;return this[_0x463055(0x21e)](_0x26f7e6,_0x406325)[_0x463055(0x1db)](_0x11cc7d);}[_0x1420e0(0x1db)](_0x23629d,_0x5bff6d,_0x53d876){const _0x35a2b2=_0x1420e0;return this['_ensureShapeModelManager'](_0x23629d,_0x5bff6d)[_0x35a2b2(0x1db)](_0x53d876);}['hasShape'](_0x308879,_0x5f01ab,_0x1e1baf){return this['_ensureShapeModelManager'](_0x308879,_0x5f01ab)['hasShape'](_0x1e1baf);}['getShapeTypeById'](_0x53bd53,_0x3ce88c,_0x5816ba){const _0x4e28fe=_0x1420e0;return this[_0x4e28fe(0x21e)](_0x53bd53,_0x3ce88c)[_0x4e28fe(0x1db)](_0x5816ba);}[_0x1420e0(0x1f2)](_0x53765e,_0x214fb5,_0x34c58d){const _0x19d94f=_0x1420e0,_0x45d603=this['_ensureShapeModelManager'](_0x53765e,_0x214fb5);if(!_0x45d603['getShapeType'](_0x34c58d))return;const _0x3b54b9=_0x45d603[_0x19d94f(0x1b6)]['get'](_0x34c58d);if(!_0x3b54b9)return;return _0x3b54b9[_0x19d94f(0x1dc)]();}[_0x1420e0(0x1a4)](_0x5113eb,_0x5b4fbb,_0x27e019){const _0x27d3c0=_0x1420e0;return this[_0x27d3c0(0x21e)](_0x5113eb,_0x5b4fbb)[_0x27d3c0(0x1b6)]['get'](_0x27e019);}[_0x1420e0(0x1d1)](_0x5b4025,_0x2ee420,_0x57d2e6){const _0x4fe2b3=_0x1420e0;return this[_0x4fe2b3(0x21e)](_0x5b4025,_0x2ee420)[_0x4fe2b3(0x1d1)](_0x57d2e6);}[_0x1420e0(0x179)](_0x1f112b,_0xd84fc,_0xc127ee){const _0x464517=_0x1420e0,_0x1bbd27=this[_0x464517(0x21e)](_0x1f112b,_0xd84fc)[_0x464517(0x1b6)][_0x464517(0x213)](_0xc127ee);if(!_0x1bbd27)return;return _0x1bbd27[_0x464517(0x1c1)]();}[_0x1420e0(0x1e5)](){}['_serializeShapeForUnit'](_0x566b8a){const _0x274051=_0x1420e0,_0x5b40ee={},_0x15ba9f=this[_0x274051(0x1a9)][_0x274051(0x213)](_0x566b8a);if(_0x15ba9f)_0x15ba9f[_0x274051(0x22a)]((_0xb33b5e,_0x4bf0df)=>{const _0x458443=_0x274051,_0x2f1df6=_0xb33b5e[_0x458443(0x16b)]();if(_0x2f1df6[_0x458443(0x206)]>0x0)_0x5b40ee[_0x4bf0df]=_0x2f1df6;});return JSON['stringify'](_0x5b40ee);}[_0x1420e0(0x1e1)](_0x3cfc64,_0x2d23fb){const _0x5a4ce4=_0x1420e0;Object[_0x5a4ce4(0x186)](_0x2d23fb)[_0x5a4ce4(0x22a)](_0x1bc69d=>{const _0x35495f=_0x5a4ce4;this[_0x35495f(0x21e)](_0x3cfc64,_0x1bc69d)[_0x35495f(0x1bc)](_0x2d23fb[_0x1bc69d]);});}['toJSON'](){const _0x56fd81=_0x1420e0,_0x3c76d2={};return this[_0x56fd81(0x1a9)][_0x56fd81(0x22a)]((_0x865f39,_0xb6a8e7)=>{const _0x217ce5=_0x56fd81;_0x3c76d2[_0xb6a8e7]={},_0x865f39[_0x217ce5(0x22a)]((_0x3fa35b,_0xe5c7b)=>{_0x3c76d2[_0xb6a8e7][_0xe5c7b]=_0x3fa35b['toJSON']();});}),_0x3c76d2;}['fromJSON'](_0x3bc791){const _0x85bfe2=_0x1420e0;Object[_0x85bfe2(0x186)](_0x3bc791)[_0x85bfe2(0x22a)](_0x5639a5=>{const _0xc0330=_0x85bfe2,_0x5a8809=_0x3bc791[_0x5639a5];Object[_0xc0330(0x186)](_0x5a8809)['forEach'](_0x1a2131=>{const _0x5108e9=_0xc0330;this[_0x5108e9(0x21e)](_0x5639a5,_0x1a2131)[_0x5108e9(0x1bc)](_0x5a8809[_0x1a2131]);});});}['_initSnapshot'](){const _0x588ce0=_0x1420e0;this[_0x588ce0(0x17b)]['registerPluginResource']({'pluginName':SHEET_SHAPE_PLUGIN,'businesses':[_univerjs_core[_0x588ce0(0x20d)][_0x588ce0(0x20f)]],'toJson':_0x6237b2=>this[_0x588ce0(0x217)](_0x6237b2),'parseJson':_0x2fd96d=>JSON[_0x588ce0(0x1aa)](_0x2fd96d),'onLoad':(_0x1f0462,_0x116a0c)=>{const _0x4d807e=_0x588ce0;this[_0x4d807e(0x1e1)](_0x1f0462,_0x116a0c);},'onUnLoad':_0x1e8ab3=>{const _0x2b344c=_0x588ce0,_0x296bc2=this[_0x2b344c(0x1a9)][_0x2b344c(0x213)](_0x1e8ab3);_0x296bc2&&(_0x296bc2[_0x2b344c(0x22a)](_0xf29c45=>{_0xf29c45['dispose']();}),this['_shapeModelManagerMap'][_0x2b344c(0x1ff)](_0x1e8ab3));}});}[_0x1420e0(0x22c)](){const _0x4a6cf3=_0x1420e0;this[_0x4a6cf3(0x1a9)][_0x4a6cf3(0x22a)](_0x23bc75=>{const _0x32e20f=_0x4a6cf3;_0x23bc75[_0x32e20f(0x22a)](_0x2eb625=>{const _0x3b5ca1=_0x32e20f;_0x2eb625[_0x3b5ca1(0x22c)]();});});}};SheetsShapeService=__decorate([__decorateParam(0x0,_univerjs_core['IResourceManagerService'])],SheetsShapeService);const InsertSheetsShapeMutation={'id':_0x1420e0(0x189),'type':_univerjs_core['CommandType'][_0x1420e0(0x22e)],'handler':(_0x32e0bf,_0x4046ea)=>{const _0x528ada=_0x1420e0,{unitId:_0x3d69ff,subUnitId:_0x65eb3f,shapeType:_0x1a2508,shapeId:_0x4ce2b1,shapeData:_0x14bbbf}=_0x4046ea;return _0x32e0bf['get'](SheetsShapeService)[_0x528ada(0x1ce)](_0x3d69ff,_0x65eb3f,_0x1a2508,_0x4ce2b1,_0x14bbbf),!![];}},RemoveSheetsShapeMutation={'id':_0x1420e0(0x1ca),'type':_univerjs_core[_0x1420e0(0x1f8)][_0x1420e0(0x22e)],'handler':(_0x4e2a79,_0x5458b7)=>{const _0x505240=_0x1420e0,{unitId:_0x54e5c3,subUnitId:_0x4082e7,shapeId:_0x324dd8}=_0x5458b7;return _0x4e2a79['get'](SheetsShapeService)[_0x505240(0x1a3)](_0x54e5c3,_0x4082e7,_0x324dd8),!![];}},InsertShapeCommand={'type':_univerjs_core[_0x1420e0(0x1f8)][_0x1420e0(0x198)],'id':_0x1420e0(0x20b),'handler':(_0x1ec85d,_0x4a1676)=>{const _0x20dbad=_0x1420e0;var _0x9093c5,_0x1bab8f;const _0x1bc01d=(0x0,_univerjs_sheets[_0x20dbad(0x209)])(_0x1ec85d[_0x20dbad(0x213)](_univerjs_core[_0x20dbad(0x185)]),_0x4a1676);if(!_0x1bc01d)return![];const _0x18ec6b=_0x1ec85d['get'](_univerjs_sheets[_0x20dbad(0x231)]),{unitId:_0x1d8a7d,subUnitId:_0x17013d}=_0x1bc01d,_0x4c5bcb=_0x18ec6b[_0x20dbad(0x1b8)](_0x1d8a7d,_0x17013d);if(!_0x4c5bcb)return![];const _0x455c8a=_0x1ec85d['get'](_univerjs_core[_0x20dbad(0x1f0)]),_0x296b63=_0x1ec85d[_0x20dbad(0x213)](_univerjs_core[_0x20dbad(0x1c0)]),_0x50cb4d=_0x1ec85d[_0x20dbad(0x213)](_univerjs_sheets[_0x20dbad(0x1c5)]),_0x4a2b1f=_0x1ec85d[_0x20dbad(0x213)](_univerjs_sheets_drawing[_0x20dbad(0x188)]),{shapeType:_0x3fa59d,shapeData:_0x56b599}=_0x4a1676,_0x44e505=_0x4a1676[_0x20dbad(0x22d)]||(0x0,_univerjs_core[_0x20dbad(0x197)])(),_0x3f4ef6={'unitId':_0x1d8a7d,'subUnitId':_0x17013d,'shapeId':_0x44e505,'shapeType':_0x3fa59d,'shapeData':_0x56b599},_0x308769=_0x4a1676[_0x20dbad(0x225)]||0xc8,_0x1158dd=_0x4a1676[_0x20dbad(0x1da)]||0xc8;let _0x3ba561=0x0,_0x5882c0=0x0,_0x38e48d={'row':0x0,'rowOffset':0x0,'column':0x0,'columnOffset':0x0},_0x10a76a={'row':0x0,'rowOffset':0x0,'column':0x0,'columnOffset':0x0};if(_0x4a1676[_0x20dbad(0x167)]){const {x:_0x4a05dd,y:_0x1ebd1e}=_0x4a1676[_0x20dbad(0x167)];_0x3ba561=_0x4a05dd,_0x5882c0=_0x1ebd1e,_0x38e48d=_0x4c5bcb[_0x20dbad(0x1d7)](_0x4a05dd,_0x1ebd1e),_0x10a76a=_0x4c5bcb['getCellIndexAndOffsetByPosition'](_0x4a05dd+_0x308769,_0x1ebd1e+_0x1158dd);}else{if(_0x4a1676[_0x20dbad(0x1c6)]){const {startRow:_0xf5416c,startColumn:_0x1c93c7}=_0x4a1676[_0x20dbad(0x1c6)],_0x53885a=0xa,_0x4a903e=0xa;_0x38e48d={'row':_0xf5416c,'rowOffset':_0x53885a,'column':_0x1c93c7,'columnOffset':_0x4a903e};const _0x40979f=_0x4c5bcb[_0x20dbad(0x1e8)](_0xf5416c,_0x1c93c7);_0x3ba561=_0x40979f[_0x20dbad(0x1de)]+_0x4a903e,_0x5882c0=_0x40979f[_0x20dbad(0x17a)]+_0x53885a,_0x10a76a=_0x4c5bcb[_0x20dbad(0x1d7)](_0x3ba561+_0x308769,_0x5882c0+_0x1158dd);}}const _0x4f6c3d={'from':_0x38e48d,'to':_0x10a76a},_0x47ea37={'unitId':_0x1d8a7d,'subUnitId':_0x17013d,'drawingId':_0x44e505,'drawingType':_univerjs_core[_0x20dbad(0x173)]['DRAWING_SHAPE'],'sheetTransform':_0x4f6c3d,'transform':{'left':_0x3ba561,'top':_0x5882c0,'width':_0x308769,'height':_0x1158dd},'data':{'shapeType':_0x3fa59d,'shapeData':_0x56b599},'axisAlignSheetTransform':_0x4f6c3d,'allowTransform':!![]};(0x0,_univerjs_pro_engine_shape[_0x20dbad(0x1fd)])(_0x3fa59d)&&(_0x47ea37[_0x20dbad(0x212)][_0x20dbad(0x229)]=![],_0x47ea37[_0x20dbad(0x212)][_0x20dbad(0x1f7)]=![],_0x47ea37[_0x20dbad(0x212)]['resizeEnabled']=![],_0x47ea37[_0x20dbad(0x212)][_0x20dbad(0x19a)]=![],_0x47ea37[_0x20dbad(0x17e)][_0x20dbad(0x1f7)]=![],_0x47ea37[_0x20dbad(0x17e)]['resizeEnabled']=![],_0x47ea37['transform']['borderEnabled']=![]);const {undo:_0x312f2a,redo:_0x4b338e,objects:_0x7bc37e}=_0x4a2b1f['getBatchAddOp']([_0x47ea37]),_0x4c8216=_0x50cb4d[_0x20dbad(0x187)]({'id':_univerjs_sheets_drawing[_0x20dbad(0x18e)]['id'],'params':{'unitId':_0x1d8a7d,'drawings':[_0x47ea37]}}),_0x24f90c=[...(_0x9093c5=_0x4c8216[_0x20dbad(0x18a)])!==null&&_0x9093c5!==void 0x0?_0x9093c5:[],{'id':_univerjs_sheets_drawing[_0x20dbad(0x1f4)]['id'],'params':{'unitId':_0x1d8a7d,'subUnitId':_0x17013d,'op':_0x4b338e,'objects':_0x7bc37e,'type':_univerjs_sheets_drawing[_0x20dbad(0x1ac)][_0x20dbad(0x174)]}},{'id':_univerjs_sheets_drawing[_0x20dbad(0x1ea)]['id'],'params':[_0x1d8a7d]},..._0x4c8216[_0x20dbad(0x171)],{'id':InsertSheetsShapeMutation['id'],'params':_0x3f4ef6}],_0x4c0c0d=[{'id':RemoveSheetsShapeMutation['id'],'params':{'unitId':_0x1d8a7d,'subUnitId':_0x17013d,'shapeId':_0x44e505}},...(_0x1bab8f=_0x4c8216['preUndos'])!==null&&_0x1bab8f!==void 0x0?_0x1bab8f:[],{'id':_univerjs_sheets_drawing['SetDrawingApplyMutation']['id'],'params':{'unitId':_0x1d8a7d,'subUnitId':_0x17013d,'op':_0x312f2a,'objects':_0x7bc37e,'type':_univerjs_sheets_drawing[_0x20dbad(0x1ac)][_0x20dbad(0x19d)]}},{'id':_univerjs_sheets_drawing[_0x20dbad(0x1ea)]['id'],'params':[_0x1d8a7d]},..._0x4c8216[_0x20dbad(0x1c9)]];if((0x0,_univerjs_core['sequenceExecute'])(_0x24f90c,_0x455c8a))return _0x296b63[_0x20dbad(0x223)]({'unitID':_0x1d8a7d,'undoMutations':_0x4c0c0d,'redoMutations':_0x24f90c}),!![];return![];}},UpdateSheetsShapeDataMutation={'id':_0x1420e0(0x1a0),'type':_univerjs_core[_0x1420e0(0x1f8)][_0x1420e0(0x22e)],'handler':(_0x355d0a,_0x22505b)=>{const _0x1f08bb=_0x1420e0,{unitId:_0x45d6f6,subUnitId:_0x464833,shapeType:_0x3f774f,shapeId:_0x21fe2f,shapeData:_0x43c6b2}=_0x22505b,_0x534714=_0x355d0a[_0x1f08bb(0x213)](SheetsShapeService)['getShapeModel'](_0x45d6f6,_0x464833,_0x21fe2f);if(_0x534714){if(_0x3f774f!==void 0x0)_0x534714[_0x1f08bb(0x1e5)](_0x3f774f);if(_0x43c6b2)_0x534714===null||_0x534714===void 0x0||_0x534714[_0x1f08bb(0x20a)](_0x43c6b2,!![]);}return!![];}},SetShapeDrawingDataCommand={'type':_univerjs_core[_0x1420e0(0x1f8)][_0x1420e0(0x198)],'id':_0x1420e0(0x226),'handler':(_0x5e9978,_0x3e0dea)=>{const _0x24032f=_0x1420e0;var _0xc68246,_0x5c5f16;const _0x27eb3f=(0x0,_univerjs_sheets[_0x24032f(0x209)])(_0x5e9978['get'](_univerjs_core['IUniverInstanceService']),_0x3e0dea);if(!_0x27eb3f)return![];const _0x1b42e2=_0x5e9978[_0x24032f(0x213)](_univerjs_sheets['SheetSkeletonService']),{unitId:_0x5ef547,subUnitId:_0x5b7e24}=_0x27eb3f,_0x24cb25=_0x1b42e2[_0x24032f(0x1b8)](_0x5ef547,_0x5b7e24);if(!_0x24cb25)return![];const _0x3b2bfd=_0x5e9978['get'](SheetsShapeService),{shapeId:_0x2fa39e,shapeType:_0x1636dd,shapeData:_0x131f96,position:_0x3bcd38,width:_0x2f4668,height:_0x1dac5d}=_0x3e0dea,_0x432d67=_0x3b2bfd[_0x24032f(0x1a4)](_0x5ef547,_0x5b7e24,_0x2fa39e);if(!_0x432d67)return![];const _0x381288=_0x5e9978['get'](_univerjs_core['ICommandService']),_0x366765=_0x5e9978[_0x24032f(0x213)](_univerjs_core[_0x24032f(0x1c0)]),_0x4a6817=_0x5e9978['get'](_univerjs_sheets[_0x24032f(0x1c5)]),_0x24b6ab=_0x5e9978['get'](_univerjs_sheets_drawing[_0x24032f(0x188)]),_0x248edb={'unitId':_0x5ef547,'subUnitId':_0x5b7e24,'shapeId':_0x2fa39e,'shapeType':_0x1636dd,'shapeData':_0x131f96},_0x5947c2=_0x432d67[_0x24032f(0x1db)](),_0x4b114f=_0x432d67[_0x24032f(0x1dc)](),{x:_0x52f072,y:_0x3babc1}=_0x3bcd38,_0x5a2f0b={'from':_0x24cb25['getCellIndexAndOffsetByPosition'](_0x52f072,_0x3babc1),'to':_0x24cb25[_0x24032f(0x1d7)](_0x52f072+_0x2f4668,_0x3babc1+_0x1dac5d)},_0x492306={'unitId':_0x5ef547,'subUnitId':_0x5b7e24,'drawingId':_0x2fa39e,'drawingType':_univerjs_core[_0x24032f(0x173)][_0x24032f(0x193)],'sheetTransform':_0x5a2f0b,'transform':{'left':_0x52f072,'top':_0x3babc1,'width':_0x2f4668,'height':_0x1dac5d},'data':{'shapeType':_0x1636dd,'shapeData':_0x131f96},'axisAlignSheetTransform':_0x5a2f0b,'allowTransform':!![]};(0x0,_univerjs_pro_engine_shape['isConnectorShape'])(_0x1636dd)&&(_0x492306[_0x24032f(0x212)][_0x24032f(0x229)]=![],_0x492306[_0x24032f(0x212)][_0x24032f(0x1f7)]=![],_0x492306['data']['resizeEnabled']=![],_0x492306[_0x24032f(0x212)]['borderEnabled']=![],_0x492306[_0x24032f(0x17e)][_0x24032f(0x1f7)]=![],_0x492306['transform'][_0x24032f(0x1dd)]=![],_0x492306[_0x24032f(0x17e)]['borderEnabled']=![]);const {undo:_0x25b483,redo:_0x347ec5,objects:_0x3d8b53}=_0x24b6ab['getBatchUpdateOp']([_0x492306]),_0x13366e=_0x4a6817['onCommandExecute']({'id':_univerjs_sheets_drawing['SetSheetDrawingCommand']['id'],'params':{'unitId':_0x5ef547,'drawings':[_0x492306]}}),_0x249f63=[...(_0xc68246=_0x13366e['preRedos'])!==null&&_0xc68246!==void 0x0?_0xc68246:[],{'id':_univerjs_sheets_drawing[_0x24032f(0x1f4)]['id'],'params':{'unitId':_0x5ef547,'subUnitId':_0x5b7e24,'op':_0x347ec5,'objects':_0x3d8b53,'type':_univerjs_sheets_drawing[_0x24032f(0x1ac)]['UPDATE']}},{'id':_univerjs_sheets_drawing[_0x24032f(0x1ea)]['id'],'params':[_0x5ef547]},..._0x13366e[_0x24032f(0x171)],{'id':UpdateSheetsShapeDataMutation['id'],'params':_0x248edb}],_0x361894=[...(_0x5c5f16=_0x13366e[_0x24032f(0x1b3)])!==null&&_0x5c5f16!==void 0x0?_0x5c5f16:[],{'id':_univerjs_sheets_drawing['SetDrawingApplyMutation']['id'],'params':{'unitId':_0x5ef547,'subUnitId':_0x5b7e24,'op':_0x25b483,'objects':_0x3d8b53,'type':_univerjs_sheets_drawing[_0x24032f(0x1ac)][_0x24032f(0x1b9)]}},{'id':_univerjs_sheets_drawing['ClearSheetDrawingTransformerOperation']['id'],'params':[_0x5ef547]},..._0x13366e[_0x24032f(0x1c9)],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x5ef547,'subUnitId':_0x5b7e24,'shapeType':_0x5947c2,'shapeId':_0x2fa39e,'shapeData':_0x4b114f}}];if((0x0,_univerjs_core[_0x24032f(0x20c)])(_0x249f63,_0x381288))return _0x366765['pushUndoRedo']({'unitID':_0x5ef547,'undoMutations':_0x361894,'redoMutations':_0x249f63}),!![];return![];}},ToggleSheetsShapeFlipCommand={'type':_univerjs_core['CommandType'][_0x1420e0(0x198)],'id':_0x1420e0(0x1a5),'handler':(_0x14019a,_0x26a869)=>{const _0x4b2205=_0x1420e0;var _0x54be8d,_0xa679b0;const _0x40a6da=(0x0,_univerjs_sheets[_0x4b2205(0x209)])(_0x14019a['get'](_univerjs_core['IUniverInstanceService']),_0x26a869);if(!_0x40a6da)return![];const _0xf8dc51=_0x14019a[_0x4b2205(0x213)](_univerjs_sheets[_0x4b2205(0x231)]),{unitId:_0x510d76,subUnitId:_0x3248dc}=_0x40a6da,_0x11a34f=_0xf8dc51['getSkeleton'](_0x510d76,_0x3248dc);if(!_0x11a34f)return![];const _0x33c2d2=_0x14019a['get'](_univerjs_sheets_drawing[_0x4b2205(0x188)]),{shapeId:_0x278acb,flipH:_0x13c202,flipV:_0x54e872}=_0x26a869,_0x84ba81=_0x33c2d2['getDrawingByParam']({'unitId':_0x510d76,'subUnitId':_0x3248dc,'drawingId':_0x278acb});if(!_0x84ba81)return![];const _0x33f705=_0x14019a[_0x4b2205(0x213)](SheetsShapeService)[_0x4b2205(0x1a4)](_0x510d76,_0x3248dc,_0x278acb);if(!_0x33f705)return![];const _0x3567cd=_0x14019a['get'](_univerjs_core[_0x4b2205(0x1f0)]),_0x6958d=_0x14019a[_0x4b2205(0x213)](_univerjs_core[_0x4b2205(0x1c0)]),_0xa938bc=_0x14019a[_0x4b2205(0x213)](_univerjs_sheets[_0x4b2205(0x1c5)]),_0x2e51ed={..._0x84ba81[_0x4b2205(0x17e)]};if(_0x13c202!==void 0x0)_0x2e51ed[_0x4b2205(0x216)]=!_0x2e51ed[_0x4b2205(0x216)];if(_0x54e872!==void 0x0)_0x2e51ed[_0x4b2205(0x195)]=!_0x2e51ed[_0x4b2205(0x195)];const _0x81acdb=(0x0,_univerjs_sheets_drawing[_0x4b2205(0x207)])(_0x2e51ed,_0x11a34f),_0x589a57=(0x0,_univerjs_sheets_drawing[_0x4b2205(0x21a)])(_0x2e51ed,_0x11a34f),_0x5887b2=_0x33f705['getShapeType'](),_0x48f5b9=_0x33f705[_0x4b2205(0x1dc)](),_0xcecbf7={'unitId':_0x510d76,'subUnitId':_0x3248dc,'drawingId':_0x278acb,'drawingType':_univerjs_core[_0x4b2205(0x173)][_0x4b2205(0x193)],'sheetTransform':_0x81acdb,'transform':_0x2e51ed,'data':{'shapeType':_0x5887b2,'shapeData':_0x48f5b9},'axisAlignSheetTransform':_0x589a57,'allowTransform':!![]},{undo:_0x480291,redo:_0x5ea5e2,objects:_0x489f57}=_0x33c2d2[_0x4b2205(0x169)]([_0xcecbf7]),_0x57ccf4=_0xa938bc['onCommandExecute']({'id':_univerjs_sheets_drawing[_0x4b2205(0x181)]['id'],'params':{'unitId':_0x510d76,'drawings':[_0xcecbf7]}}),_0x292df1=[...(_0x54be8d=_0x57ccf4['preRedos'])!==null&&_0x54be8d!==void 0x0?_0x54be8d:[],{'id':_univerjs_sheets_drawing[_0x4b2205(0x1f4)]['id'],'params':{'unitId':_0x510d76,'subUnitId':_0x3248dc,'op':_0x5ea5e2,'objects':_0x489f57,'type':_univerjs_sheets_drawing[_0x4b2205(0x1ac)][_0x4b2205(0x1b9)]}},{'id':_univerjs_sheets_drawing[_0x4b2205(0x1ea)]['id'],'params':[_0x510d76]},..._0x57ccf4['redos']],_0x27425c=[...(_0xa679b0=_0x57ccf4[_0x4b2205(0x1b3)])!==null&&_0xa679b0!==void 0x0?_0xa679b0:[],{'id':_univerjs_sheets_drawing['SetDrawingApplyMutation']['id'],'params':{'unitId':_0x510d76,'subUnitId':_0x3248dc,'op':_0x480291,'objects':_0x489f57,'type':_univerjs_sheets_drawing[_0x4b2205(0x1ac)][_0x4b2205(0x1b9)]}},{'id':_univerjs_sheets_drawing['ClearSheetDrawingTransformerOperation']['id'],'params':[_0x510d76]},..._0x57ccf4[_0x4b2205(0x1c9)]];if((0x0,_univerjs_pro_engine_shape[_0x4b2205(0x1fd)])(_0x5887b2)){const _0x1a5eb1=_0x33f705[_0x4b2205(0x1c1)]();if(_0x1a5eb1){const _0x29b7a4={..._0x1a5eb1};_0x29b7a4[_0x4b2205(0x1cc)]=void 0x0,_0x29b7a4['to']=void 0x0,_0x292df1[_0x4b2205(0x20e)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x510d76,'subUnitId':_0x3248dc,'shapeId':_0x278acb,'shapeType':_0x5887b2,'shapeData':{'relation':_0x29b7a4}}}),_0x27425c[_0x4b2205(0x20e)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x510d76,'subUnitId':_0x3248dc,'shapeId':_0x278acb,'shapeType':_0x5887b2,'shapeData':{'relation':_0x1a5eb1}}});}}if((0x0,_univerjs_core[_0x4b2205(0x20c)])(_0x292df1,_0x3567cd))return _0x6958d[_0x4b2205(0x223)]({'unitID':_0x510d76,'undoMutations':_0x27425c,'redoMutations':_0x292df1}),!![];return![];}},SetSheetsShapeRotateCommand={'type':_univerjs_core[_0x1420e0(0x1f8)]['COMMAND'],'id':_0x1420e0(0x1e3),'handler':(_0x3ba85d,_0x3680d8)=>{const _0x2e9a38=_0x1420e0;var _0x58183c,_0x40f7ad;const _0x5342f5=(0x0,_univerjs_sheets[_0x2e9a38(0x209)])(_0x3ba85d[_0x2e9a38(0x213)](_univerjs_core[_0x2e9a38(0x185)]),_0x3680d8);if(!_0x5342f5)return![];const _0x335e76=_0x3ba85d['get'](_univerjs_sheets[_0x2e9a38(0x231)]),{unitId:_0x3b77cc,subUnitId:_0x254053}=_0x5342f5,_0xbf7160=_0x335e76[_0x2e9a38(0x16f)](_0x3b77cc,_0x254053);if(!_0xbf7160)return![];const _0x1fee37=_0x3ba85d['get'](_univerjs_sheets_drawing[_0x2e9a38(0x188)]),{shapeId:_0x1d5370,rotate:_0x289360}=_0x3680d8,_0xeb7497=_0x1fee37[_0x2e9a38(0x21d)]({'unitId':_0x3b77cc,'subUnitId':_0x254053,'drawingId':_0x1d5370});if(!_0xeb7497)return![];const _0x145fe5=_0x3ba85d[_0x2e9a38(0x213)](SheetsShapeService)[_0x2e9a38(0x1a4)](_0x3b77cc,_0x254053,_0x1d5370);if(!_0x145fe5)return![];const _0x3681a9=_0x3ba85d[_0x2e9a38(0x213)](_univerjs_core[_0x2e9a38(0x1f0)]),_0x22d91e=_0x3ba85d[_0x2e9a38(0x213)](_univerjs_core[_0x2e9a38(0x1c0)]),_0x152eb6=_0x3ba85d['get'](_univerjs_sheets[_0x2e9a38(0x1c5)]),_0x541e03={..._0xeb7497['transform']};if(_0x289360!==void 0x0)_0x541e03['angle']=(_0x541e03[_0x2e9a38(0x205)]||0x0)+_0x289360;const _0x2f500b=(0x0,_univerjs_sheets_drawing[_0x2e9a38(0x207)])(_0x541e03,_0xbf7160),_0x226bf0=(0x0,_univerjs_sheets_drawing[_0x2e9a38(0x21a)])(_0x541e03,_0xbf7160),_0xdc3e8d=_0x145fe5[_0x2e9a38(0x1db)](),_0x205522=_0x145fe5[_0x2e9a38(0x1dc)](),_0x5a52ba={'unitId':_0x3b77cc,'subUnitId':_0x254053,'drawingId':_0x1d5370,'drawingType':_univerjs_core['DrawingTypeEnum'][_0x2e9a38(0x193)],'sheetTransform':_0x2f500b,'transform':_0x541e03,'data':{'shapeType':_0xdc3e8d,'shapeData':_0x205522},'axisAlignSheetTransform':_0x226bf0,'allowTransform':!![]},{undo:_0x11ef47,redo:_0x3d2bc0,objects:_0x46a5c3}=_0x1fee37[_0x2e9a38(0x169)]([_0x5a52ba]),_0x1ed942=_0x152eb6['onCommandExecute']({'id':_univerjs_sheets_drawing[_0x2e9a38(0x181)]['id'],'params':{'unitId':_0x3b77cc,'drawings':[_0x5a52ba]}}),_0x15efe9=[...(_0x58183c=_0x1ed942[_0x2e9a38(0x18a)])!==null&&_0x58183c!==void 0x0?_0x58183c:[],{'id':_univerjs_sheets_drawing[_0x2e9a38(0x1f4)]['id'],'params':{'unitId':_0x3b77cc,'subUnitId':_0x254053,'op':_0x3d2bc0,'objects':_0x46a5c3,'type':_univerjs_sheets_drawing[_0x2e9a38(0x1ac)]['UPDATE']}},{'id':_univerjs_sheets_drawing[_0x2e9a38(0x1ea)]['id'],'params':[_0x3b77cc]},..._0x1ed942[_0x2e9a38(0x171)]],_0xfbc159=[...(_0x40f7ad=_0x1ed942['preUndos'])!==null&&_0x40f7ad!==void 0x0?_0x40f7ad:[],{'id':_univerjs_sheets_drawing[_0x2e9a38(0x1f4)]['id'],'params':{'unitId':_0x3b77cc,'subUnitId':_0x254053,'op':_0x11ef47,'objects':_0x46a5c3,'type':_univerjs_sheets_drawing[_0x2e9a38(0x1ac)][_0x2e9a38(0x1b9)]}},{'id':_univerjs_sheets_drawing[_0x2e9a38(0x1ea)]['id'],'params':[_0x3b77cc]},..._0x1ed942[_0x2e9a38(0x1c9)]];if((0x0,_univerjs_core[_0x2e9a38(0x20c)])(_0x15efe9,_0x3681a9))return _0x22d91e[_0x2e9a38(0x223)]({'unitID':_0x3b77cc,'undoMutations':_0xfbc159,'redoMutations':_0x15efe9}),!![];return![];}},SetSheetsShapeTextVerticalToggleCommand={'type':_univerjs_core[_0x1420e0(0x1f8)][_0x1420e0(0x198)],'id':'sheet.command.set-shape-text-vertical-toggle','handler':(_0x440e3e,_0x5be371)=>{const _0x224c10=_0x1420e0;var _0x43e645;const _0x2d74cc=(0x0,_univerjs_sheets[_0x224c10(0x209)])(_0x440e3e[_0x224c10(0x213)](_univerjs_core['IUniverInstanceService']),_0x5be371);if(!_0x2d74cc)return![];const {unitId:_0x260faa,subUnitId:_0x5f2bfe}=_0x2d74cc,{shapeId:_0x547441}=_0x5be371,_0xb4cca=_0x440e3e[_0x224c10(0x213)](SheetsShapeService)[_0x224c10(0x1a4)](_0x260faa,_0x5f2bfe,_0x547441);if(!_0xb4cca)return![];const _0x1de426=_0xb4cca[_0x224c10(0x192)](),_0x5a50fc=(_0x43e645=_0x1de426===null||_0x1de426===void 0x0?void 0x0:_0x1de426['isHorizontal'])!==null&&_0x43e645!==void 0x0?_0x43e645:!![],_0x32e0b6=!_0x5a50fc,_0x4637dc=_0x440e3e[_0x224c10(0x213)](_univerjs_core[_0x224c10(0x1f0)]),_0x36c598=_0x440e3e[_0x224c10(0x213)](_univerjs_core['IUndoRedoService']),_0xfc92af={'unitId':_0x260faa,'subUnitId':_0x5f2bfe,'shapeId':_0x547441,'shapeData':{'shapeText':{'isHorizontal':_0x32e0b6}}},_0x1ff2e0={'unitId':_0x260faa,'subUnitId':_0x5f2bfe,'shapeId':_0x547441,'shapeData':{'shapeText':{'isHorizontal':_0x5a50fc}}},_0x329f2f=[{'id':UpdateSheetsShapeDataMutation['id'],'params':_0xfc92af}],_0xaabd90=[{'id':UpdateSheetsShapeDataMutation['id'],'params':_0x1ff2e0}];if((0x0,_univerjs_core[_0x224c10(0x20c)])(_0x329f2f,_0x4637dc))return _0x36c598[_0x224c10(0x223)]({'unitID':_0x260faa,'undoMutations':_0xaabd90,'redoMutations':_0x329f2f}),!![];return![];}},UpdateConnectorRelationCommand={'type':_univerjs_core['CommandType']['COMMAND'],'id':_0x1420e0(0x200),'handler':(_0x4eb513,_0x362320)=>{const _0x15e06e=_0x1420e0;var _0x5640d4,_0x4ad50c,_0x1038f1,_0x192ba2;const _0x33be35=(0x0,_univerjs_sheets[_0x15e06e(0x209)])(_0x4eb513[_0x15e06e(0x213)](_univerjs_core['IUniverInstanceService']),_0x362320);if(!_0x33be35)return![];const _0x7a71ae=_0x4eb513[_0x15e06e(0x213)](_univerjs_sheets['SheetSkeletonService']),{unitId:_0x2dbe18,subUnitId:_0x52c4fa}=_0x33be35,_0x5d0cbf=_0x7a71ae[_0x15e06e(0x16f)](_0x2dbe18,_0x52c4fa);if(!_0x5d0cbf)return![];const _0x8b1d25=_0x4eb513['get'](_univerjs_sheets_drawing[_0x15e06e(0x188)]),{connectorShapeId:_0x38da2d,width:_0x2b6899,height:_0x4f788e,left:_0x5bc50a,top:_0x3c1209,flipX:_0x306f31,flipY:_0x334239,rotation:_0x168e6b,oldAdjustValues:_0x421338,newAdjustValues:_0x215d64,oldLineType:_0x34c8f5,newLineType:_0x1278e6,oldRelation:_0x3dd505,newRelation:_0x3edda8}=_0x362320,_0x34bee5=_0x8b1d25['getDrawingByParam']({'unitId':_0x2dbe18,'subUnitId':_0x52c4fa,'drawingId':_0x38da2d});if(!_0x34bee5)return![];const _0x380d24=_0x4eb513[_0x15e06e(0x213)](SheetsShapeService)[_0x15e06e(0x1a4)](_0x2dbe18,_0x52c4fa,_0x38da2d);if(!_0x380d24)return![];const _0x2e5336=_0x4eb513['get'](_univerjs_core[_0x15e06e(0x1f0)]),_0x4fead8=_0x4eb513[_0x15e06e(0x213)](_univerjs_core[_0x15e06e(0x1c0)]),_0x596cea=_0x4eb513['get'](_univerjs_sheets['SheetInterceptorService']),_0x1f5784={..._0x34bee5[_0x15e06e(0x17e)],'width':_0x2b6899,'height':_0x4f788e,'left':_0x5bc50a,'top':_0x3c1209,'flipX':_0x306f31,'flipY':_0x334239,'angle':(_0x5640d4=_0x168e6b!==null&&_0x168e6b!==void 0x0?_0x168e6b:(_0x4ad50c=_0x34bee5[_0x15e06e(0x17e)])===null||_0x4ad50c===void 0x0?void 0x0:_0x4ad50c['angle'])!==null&&_0x5640d4!==void 0x0?_0x5640d4:0x0},_0x297944=(0x0,_univerjs_sheets_drawing[_0x15e06e(0x207)])(_0x1f5784,_0x5d0cbf),_0x139106=(0x0,_univerjs_sheets_drawing['transformToAxisAlignPosition'])(_0x1f5784,_0x5d0cbf),_0x4a69bb=_0x380d24[_0x15e06e(0x1db)](),_0x5afa1d=_0x380d24[_0x15e06e(0x1dc)](),_0x2890ac={'unitId':_0x2dbe18,'subUnitId':_0x52c4fa,'drawingId':_0x38da2d,'drawingType':_univerjs_core['DrawingTypeEnum']['DRAWING_SHAPE'],'sheetTransform':_0x297944,'transform':_0x1f5784,'data':{'shapeType':_0x1278e6||_0x34c8f5||_0x4a69bb,'shapeData':{..._0x5afa1d,'adjustValues':_0x215d64||_0x421338||(_0x5afa1d===null||_0x5afa1d===void 0x0?void 0x0:_0x5afa1d[_0x15e06e(0x17d)]),'relation':_0x3edda8||_0x3dd505||(_0x5afa1d===null||_0x5afa1d===void 0x0?void 0x0:_0x5afa1d['relation'])}},'axisAlignSheetTransform':_0x139106,'allowTransform':!![]},{undo:_0xd8b5e,redo:_0x17777d,objects:_0x2f2a06}=_0x8b1d25['getBatchUpdateOp']([_0x2890ac]),_0x5829b2=_0x596cea[_0x15e06e(0x187)]({'id':_univerjs_sheets_drawing[_0x15e06e(0x181)]['id'],'params':{'unitId':_0x2dbe18,'drawings':[_0x2890ac]}}),_0x492e70=[...(_0x1038f1=_0x5829b2[_0x15e06e(0x18a)])!==null&&_0x1038f1!==void 0x0?_0x1038f1:[],{'id':_univerjs_sheets_drawing[_0x15e06e(0x1f4)]['id'],'params':{'unitId':_0x2dbe18,'subUnitId':_0x52c4fa,'op':_0x17777d,'objects':_0x2f2a06,'type':_univerjs_sheets_drawing['DrawingApplyType'][_0x15e06e(0x1b9)]}},{'id':_univerjs_sheets_drawing['ClearSheetDrawingTransformerOperation']['id'],'params':[_0x2dbe18]},..._0x5829b2[_0x15e06e(0x171)],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x2dbe18,'subUnitId':_0x52c4fa,'shapeId':_0x38da2d,'shapeType':_0x1278e6,'shapeData':{'adjustValues':_0x215d64,'relation':_0x3edda8}}}],_0x4e0305=[...(_0x192ba2=_0x5829b2['preUndos'])!==null&&_0x192ba2!==void 0x0?_0x192ba2:[],{'id':_univerjs_sheets_drawing[_0x15e06e(0x1f4)]['id'],'params':{'unitId':_0x2dbe18,'subUnitId':_0x52c4fa,'op':_0xd8b5e,'objects':_0x2f2a06,'type':_univerjs_sheets_drawing[_0x15e06e(0x1ac)][_0x15e06e(0x1b9)]}},{'id':_univerjs_sheets_drawing[_0x15e06e(0x1ea)]['id'],'params':[_0x2dbe18]},..._0x5829b2[_0x15e06e(0x1c9)],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x2dbe18,'subUnitId':_0x52c4fa,'shapeId':_0x38da2d,'shapeType':_0x4a69bb,'shapeData':{..._0x5afa1d,'adjustValues':_0x421338||(_0x5afa1d===null||_0x5afa1d===void 0x0?void 0x0:_0x5afa1d[_0x15e06e(0x17d)]),'relation':_0x3dd505||(_0x5afa1d===null||_0x5afa1d===void 0x0?void 0x0:_0x5afa1d[_0x15e06e(0x19c)])}}}];if((0x0,_univerjs_core['sequenceExecute'])(_0x492e70,_0x2e5336))return _0x4fead8[_0x15e06e(0x223)]({'unitID':_0x2dbe18,'undoMutations':_0x4e0305,'redoMutations':_0x492e70}),!![];return![];}},UpdateLineShapeResizeCommand={'type':_univerjs_core[_0x1420e0(0x1f8)][_0x1420e0(0x198)],'id':_0x1420e0(0x166),'handler':(_0x525feb,_0x27c507)=>{const _0x4684ee=_0x1420e0;var _0xa0adb0,_0x2631ae;const _0x3b782e=(0x0,_univerjs_sheets[_0x4684ee(0x209)])(_0x525feb[_0x4684ee(0x213)](_univerjs_core[_0x4684ee(0x185)]),_0x27c507);if(!_0x3b782e)return![];const _0xc1caf7=_0x525feb['get'](_univerjs_sheets[_0x4684ee(0x231)]),{unitId:_0x31eeca,subUnitId:_0x59cc16}=_0x3b782e,_0x49bae5=_0xc1caf7[_0x4684ee(0x16f)](_0x31eeca,_0x59cc16);if(!_0x49bae5)return![];const _0x549530=_0x525feb[_0x4684ee(0x213)](_univerjs_sheets_drawing[_0x4684ee(0x188)]),{shapeId:_0x18140a,width:_0x1aa7bd,height:_0x35e005,left:_0x461ecb,top:_0x42342d,flipX:_0xf38230,flipY:_0x3b86b8,angle:_0x4a260f,oldAdjustValues:_0x220c98,newAdjustValues:_0x84817a,oldLineType:_0x530996,newLineType:_0x434319}=_0x27c507,_0x518793=_0x549530[_0x4684ee(0x21d)]({'unitId':_0x31eeca,'subUnitId':_0x59cc16,'drawingId':_0x18140a});if(!_0x518793)return![];const _0x5b29a8=_0x525feb[_0x4684ee(0x213)](SheetsShapeService)[_0x4684ee(0x1a4)](_0x31eeca,_0x59cc16,_0x18140a);if(!_0x5b29a8)return![];const _0x225b22=_0x525feb[_0x4684ee(0x213)](_univerjs_core[_0x4684ee(0x1f0)]),_0x4299e8=_0x525feb['get'](_univerjs_core['IUndoRedoService']),_0x2b2e92=_0x525feb[_0x4684ee(0x213)](_univerjs_sheets[_0x4684ee(0x1c5)]),_0x1ee49d={..._0x518793['transform'],'width':_0x1aa7bd,'height':_0x35e005,'left':_0x461ecb,'top':_0x42342d,'flipX':_0xf38230,'flipY':_0x3b86b8,'angle':_0x4a260f},_0x296ffe=(0x0,_univerjs_sheets_drawing['transformToDrawingPosition'])(_0x1ee49d,_0x49bae5),_0x1cd480=(0x0,_univerjs_sheets_drawing[_0x4684ee(0x21a)])(_0x1ee49d,_0x49bae5),_0x490b68=_0x5b29a8[_0x4684ee(0x1db)](),_0x2aaff1=_0x5b29a8['getShapeData'](),_0x25373d={'unitId':_0x31eeca,'subUnitId':_0x59cc16,'drawingId':_0x18140a,'drawingType':_univerjs_core['DrawingTypeEnum'][_0x4684ee(0x193)],'sheetTransform':_0x296ffe,'transform':_0x1ee49d,'data':{'shapeType':_0x434319||_0x530996||_0x490b68,'shapeData':{..._0x2aaff1,'adjustValues':_0x84817a||_0x220c98||(_0x2aaff1===null||_0x2aaff1===void 0x0?void 0x0:_0x2aaff1['adjustValues'])}},'axisAlignSheetTransform':_0x1cd480,'allowTransform':!![]},{undo:_0xf3631b,redo:_0x5ac03e,objects:_0x59c2f1}=_0x549530[_0x4684ee(0x169)]([_0x25373d]),_0x53bf91=_0x2b2e92[_0x4684ee(0x187)]({'id':_univerjs_sheets_drawing['SetSheetDrawingCommand']['id'],'params':{'unitId':_0x31eeca,'drawings':[_0x25373d]}}),_0xaff803=[...(_0xa0adb0=_0x53bf91[_0x4684ee(0x18a)])!==null&&_0xa0adb0!==void 0x0?_0xa0adb0:[],{'id':_univerjs_sheets_drawing[_0x4684ee(0x1f4)]['id'],'params':{'unitId':_0x31eeca,'subUnitId':_0x59cc16,'op':_0x5ac03e,'objects':_0x59c2f1,'type':_univerjs_sheets_drawing[_0x4684ee(0x1ac)]['UPDATE']}},{'id':_univerjs_sheets_drawing[_0x4684ee(0x1ea)]['id'],'params':[_0x31eeca]},..._0x53bf91[_0x4684ee(0x171)],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x31eeca,'subUnitId':_0x59cc16,'shapeId':_0x18140a,'shapeType':_0x434319,'shapeData':{'adjustValues':_0x84817a}}}],_0x20cf47=[...(_0x2631ae=_0x53bf91['preUndos'])!==null&&_0x2631ae!==void 0x0?_0x2631ae:[],{'id':_univerjs_sheets_drawing[_0x4684ee(0x1f4)]['id'],'params':{'unitId':_0x31eeca,'subUnitId':_0x59cc16,'op':_0xf3631b,'objects':_0x59c2f1,'type':_univerjs_sheets_drawing['DrawingApplyType'][_0x4684ee(0x1b9)]}},{'id':_univerjs_sheets_drawing[_0x4684ee(0x1ea)]['id'],'params':[_0x31eeca]},..._0x53bf91['undos'],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x31eeca,'subUnitId':_0x59cc16,'shapeId':_0x18140a,'shapeType':_0x490b68,'shapeData':{..._0x2aaff1,'adjustValues':_0x220c98||(_0x2aaff1===null||_0x2aaff1===void 0x0?void 0x0:_0x2aaff1[_0x4684ee(0x17d)])}}}];if((0x0,_univerjs_core[_0x4684ee(0x20c)])(_0xaff803,_0x225b22))return _0x4299e8[_0x4684ee(0x223)]({'unitID':_0x31eeca,'undoMutations':_0x20cf47,'redoMutations':_0xaff803}),!![];return![];}},UpdateSheetsShapeTypeMutation={'id':_0x1420e0(0x1a1),'type':_univerjs_core[_0x1420e0(0x1f8)][_0x1420e0(0x22e)],'handler':(_0x5b685f,_0x15702b)=>{const _0x32eea6=_0x1420e0,{unitId:_0x5329f8,subUnitId:_0x1ab9e4,shapeType:_0xfa0262,shapeId:_0x3719d6,shapeData:_0x457848}=_0x15702b,_0x46187a=_0x5b685f[_0x32eea6(0x213)](SheetsShapeService)[_0x32eea6(0x1a4)](_0x5329f8,_0x1ab9e4,_0x3719d6);if(_0x46187a){_0x46187a[_0x32eea6(0x1e5)](_0xfa0262);if(_0x457848)_0x46187a===null||_0x46187a===void 0x0||_0x46187a[_0x32eea6(0x20a)](_0x457848);}return!![];}},UpdateSheetsShapeTypeCommand={'id':_0x1420e0(0x1ba),'type':_univerjs_core[_0x1420e0(0x1f8)]['COMMAND'],'handler':(_0x37769b,_0x7b7a8d)=>{const _0x37990c=_0x1420e0;if(!_0x7b7a8d)return![];const _0x20f6bf=_0x37769b[_0x37990c(0x213)](_univerjs_core[_0x37990c(0x1f0)]),_0xe91832=_0x37769b[_0x37990c(0x213)](SheetsShapeService),_0xb9379c=_0x37769b[_0x37990c(0x213)](_univerjs_core[_0x37990c(0x1c0)]),_0x22f571=[],_0xa6826e=[],{unitId:_0x1c353f,subUnitId:_0xd930,shapeId:_0x23a87c,shapeType:_0x170501,shapeData:_0x1d8c75}=_0x7b7a8d,_0x3639b2=_0xe91832[_0x37990c(0x1a4)](_0x1c353f,_0xd930,_0x23a87c);if(_0x3639b2){const _0x73f1b1=_0x3639b2[_0x37990c(0x1db)](),_0x101830=Object[_0x37990c(0x1e6)]({},_0x3639b2[_0x37990c(0x1dc)]()),_0x1ae753={'unitId':_0x1c353f,'subUnitId':_0xd930,'shapeId':_0x23a87c,'shapeType':_0x170501,'shapeData':_0x1d8c75},_0x306af3={'unitId':_0x1c353f,'subUnitId':_0xd930,'shapeId':_0x23a87c,'shapeType':_0x73f1b1,'shapeData':_0x101830};_0x22f571[_0x37990c(0x20e)]({'id':UpdateSheetsShapeTypeMutation['id'],'params':_0x1ae753}),_0xa6826e[_0x37990c(0x20e)]({'id':UpdateSheetsShapeTypeMutation['id'],'params':_0x306af3});if(_0x22f571[_0x37990c(0x228)](_0x45fc4a=>_0x20f6bf[_0x37990c(0x230)](_0x45fc4a['id'],_0x45fc4a[_0x37990c(0x204)])))_0xb9379c[_0x37990c(0x223)]({'unitID':_0x1c353f,'redoMutations':[..._0x22f571],'undoMutations':[..._0xa6826e]});return!![];}return![];}};var name=_0x1420e0(0x183),version=_0x1420e0(0x21c);const SHEETS_SHAPE_PLUGIN_CONFIG_KEY=_0x1420e0(0x1bb),configSymbol=Symbol(SHEETS_SHAPE_PLUGIN_CONFIG_KEY),defaultPluginConfig={};let SheetsShapeController=class SheetsShapeController extends _univerjs_core['Disposable']{constructor(_0x56a11c,_0x2a209f,_0x3bb5e4,_0x126ee7,_0x1403fd){const _0x1595e6=_0x1420e0;super(),this[_0x1595e6(0x220)]=_0x56a11c,this[_0x1595e6(0x203)]=_0x2a209f,this[_0x1595e6(0x1cd)]=_0x3bb5e4,this[_0x1595e6(0x196)]=_0x126ee7,this[_0x1595e6(0x1e7)]=_0x1403fd,this[_0x1595e6(0x1d3)](),this[_0x1595e6(0x1e9)]();}[_0x1420e0(0x1d3)](){const _0x194010=_0x1420e0;[InsertShapeCommand,SetShapeDrawingDataCommand,ToggleSheetsShapeFlipCommand,SetSheetsShapeRotateCommand,SetSheetsShapeTextVerticalToggleCommand,UpdateConnectorRelationCommand,UpdateLineShapeResizeCommand,InsertSheetsShapeMutation,RemoveSheetsShapeMutation,UpdateSheetsShapeTypeMutation,UpdateSheetsShapeDataMutation][_0x194010(0x22a)](_0x44f473=>this[_0x194010(0x17f)](this[_0x194010(0x220)]['registerCommand'](_0x44f473)));}[_0x1420e0(0x1e9)](){const _0x30725f=_0x1420e0;this[_0x30725f(0x17f)](this[_0x30725f(0x203)][_0x30725f(0x1d0)]({'getMutations':_0xf74401=>{const _0x23c418=_0x30725f;if(_0xf74401['id']===_univerjs_sheets_drawing[_0x23c418(0x191)]['id']){const {drawings:_0x57b065}=_0xf74401[_0x23c418(0x204)],_0x37974c=_0x57b065[_0x23c418(0x178)](_0xda25a=>_0xda25a[_0x23c418(0x165)]===_univerjs_core[_0x23c418(0x173)][_0x23c418(0x193)]);if(_0x37974c[_0x23c418(0x206)]===0x0)return{'preRedos':[],'redos':[],'preUndos':[],'undos':[]};const _0x11946e=[],_0x2a459c=[];return _0x37974c[_0x23c418(0x22a)](_0x1f2cd2=>{const _0x3eba57=_0x23c418,{unitId:_0x1ff829,subUnitId:_0x47d40b,drawingId:_0x12a753}=_0x1f2cd2,_0x1050ef=this[_0x3eba57(0x196)]['getShapeModel'](_0x1ff829,_0x47d40b,_0x12a753);if(!_0x1050ef)throw new TypeError('Fail\x20to\x20get\x20shape\x20model,\x20get:\x20'+_0x1050ef);_0x11946e[_0x3eba57(0x20e)]({'id':RemoveSheetsShapeMutation['id'],'params':{'unitId':_0x1ff829,'subUnitId':_0x47d40b,'shapeId':_0x12a753}}),_0x2a459c[_0x3eba57(0x20e)]({'id':InsertSheetsShapeMutation['id'],'params':{'unitId':_0x1ff829,'subUnitId':_0x47d40b,'shapeId':_0x12a753,'shapeType':_0x1050ef[_0x3eba57(0x1db)](),'shapeData':_0x1050ef['getShapeData']()}});const _0x558fa5=this[_0x3eba57(0x196)][_0x3eba57(0x1d1)](_0x1ff829,_0x47d40b,_0x12a753);if(_0x558fa5)for(const _0x37f22a of _0x558fa5){const _0x275ecd=_0x37f22a[_0x3eba57(0x199)],_0x2d03ba=_0x37f22a[_0x3eba57(0x16c)],_0x475c2a=_0x2d03ba?{'from':void 0x0}:{'to':void 0x0},_0xdac302=_0x2d03ba?{'from':{'shapeId':_0x37f22a[_0x3eba57(0x22d)],'cxnIndex':_0x37f22a['cxnIndex']}}:{'to':{'shapeId':_0x37f22a[_0x3eba57(0x22d)],'cxnIndex':_0x37f22a[_0x3eba57(0x1b2)]}};_0x11946e[_0x3eba57(0x20e)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x1ff829,'subUnitId':_0x47d40b,'shapeId':_0x275ecd,'shapeData':{'relation':_0x475c2a}}}),_0x2a459c[_0x3eba57(0x20e)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x1ff829,'subUnitId':_0x47d40b,'shapeId':_0x275ecd,'shapeData':{'relation':_0xdac302}}});}}),{'preRedos':_0x11946e,'redos':[],'preUndos':[],'undos':_0x2a459c};}if(_0xf74401['id']===_univerjs_sheets_drawing[_0x23c418(0x181)]['id']){const {drawings:_0x107b15}=_0xf74401[_0x23c418(0x204)],_0x2ee127=_0x107b15['filter'](_0x1bbdb2=>_0x1bbdb2['drawingType']===_univerjs_core[_0x23c418(0x173)][_0x23c418(0x193)]);if(_0x2ee127['length']===0x0)return{'preRedos':[],'redos':[],'preUndos':[],'undos':[]};const _0x324608=[],_0x55e846=[];for(const _0x3af4ca of _0x2ee127){const {unitId:_0x2187f8,subUnitId:_0x438c40,drawingId:_0x34ffab,transform:_0x287769}=_0x3af4ca;if(!_0x2187f8||!_0x438c40||!_0x34ffab||!_0x287769)continue;const _0xe2a395=this[_0x23c418(0x196)][_0x23c418(0x1a4)](_0x2187f8,_0x438c40,_0x34ffab);if(!_0xe2a395)throw new TypeError(_0x23c418(0x18c)+_0xe2a395);if((0x0,_univerjs_pro_engine_shape[_0x23c418(0x1fd)])(_0xe2a395['getShapeType']())){const _0x4b430f=this[_0x23c418(0x196)][_0x23c418(0x179)](_0x2187f8,_0x438c40,_0x34ffab),_0x991449={'from':void 0x0,'to':void 0x0};_0x4b430f&&(_0x324608['push']({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x2187f8,'subUnitId':_0x438c40,'shapeId':_0x34ffab,'shapeData':{'relation':_0x991449}}}),_0x55e846['push']({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x2187f8,'subUnitId':_0x438c40,'shapeId':_0x34ffab,'shapeData':{'relation':_0x4b430f}}}));}else{const _0x3b3971=this['_sheetsShapeService'][_0x23c418(0x1d1)](_0x2187f8,_0x438c40,_0x34ffab);if(_0x3b3971&&_0x3b3971['length']>0x0)for(const _0x57634f of _0x3b3971){const _0x35b1f7=_0x57634f[_0x23c418(0x199)],_0x43ae34=_0x57634f[_0x23c418(0x16c)],_0x445751=this[_0x23c418(0x196)][_0x23c418(0x1a4)](_0x2187f8,_0x438c40,_0x35b1f7);if(!_0x445751)continue;const _0xc66c81=_0x445751['getStartConnectInfo'](),_0x5ee475=_0x445751[_0x23c418(0x16d)]();if(_0xc66c81&&_0x5ee475)this[_0x23c418(0x214)](_0x2187f8,_0x438c40,_0x35b1f7,_0x445751,_0xc66c81,_0x5ee475,_0x324608,_0x55e846,_0x34ffab,_0x287769);else this['_addLineFollowShapeUpdates'](_0x2187f8,_0x438c40,_0x35b1f7,_0x445751,_0x43ae34?_0xc66c81:_0x5ee475,_0x43ae34,_0x324608,_0x55e846,_0x34ffab,_0x287769);}}}return{'preRedos':[],'redos':_0x324608,'preUndos':_0x55e846,'undos':[]};}return{'preRedos':[],'redos':[],'preUndos':[],'undos':[]};}}));}['_getConnectPointInfo'](_0x23e598,_0x112464,_0x49d323,_0xe0daf1,_0x2129af){const _0x58f200=_0x1420e0;if(!_0x112464||!_0x49d323)return null;const {shapeId:_0x1b3159,cxnIndex:_0x1ac1b7}=_0x23e598,_0x4b6402=this[_0x58f200(0x196)][_0x58f200(0x1a4)](_0x112464,_0x49d323,_0x1b3159);if(!_0x4b6402)return null;const _0x48332d=this[_0x58f200(0x1e7)]['getDrawingByParam']({'unitId':_0x112464,'subUnitId':_0x49d323,'drawingId':_0x1b3159});if(!(_0x48332d===null||_0x48332d===void 0x0?void 0x0:_0x48332d[_0x58f200(0x17e)]))return null;let {left:left=0x0,top:top=0x0,width:width=0x0,height:height=0x0,flipX:flipX=![],flipY:flipY=![],angle:_0x44c441}=_0x48332d[_0x58f200(0x17e)];if(_0x2129af&&_0xe0daf1===_0x1b3159){var _0x319c3c,_0x28d7bf,_0x33c618,_0x29f397,_0x5054b3,_0x442c4d,_0x448fc6;left=(_0x319c3c=_0x2129af['left'])!==null&&_0x319c3c!==void 0x0?_0x319c3c:left,top=(_0x28d7bf=_0x2129af[_0x58f200(0x1e4)])!==null&&_0x28d7bf!==void 0x0?_0x28d7bf:top,width=(_0x33c618=_0x2129af['width'])!==null&&_0x33c618!==void 0x0?_0x33c618:width,height=(_0x29f397=_0x2129af[_0x58f200(0x1da)])!==null&&_0x29f397!==void 0x0?_0x29f397:height,flipX=(_0x5054b3=_0x2129af[_0x58f200(0x216)])!==null&&_0x5054b3!==void 0x0?_0x5054b3:flipX,flipY=(_0x442c4d=_0x2129af[_0x58f200(0x195)])!==null&&_0x442c4d!==void 0x0?_0x442c4d:flipY,_0x44c441=(_0x448fc6=_0x2129af['angle'])!==null&&_0x448fc6!==void 0x0?_0x448fc6:_0x44c441;}_0x4b6402[_0x58f200(0x1fe)]({'width':width,'height':height});const _0x2e392a=_0x4b6402['getConnectionSiteList']()[_0x58f200(0x222)](_0x19849f=>_0x19849f[_0x58f200(0x175)]===_0x1ac1b7);if(!_0x2e392a)return null;let _0x2783d9=flipX?width-_0x2e392a['x']:_0x2e392a['x'],_0x593c29=flipY?height-_0x2e392a['y']:_0x2e392a['y'];if(_0x44c441!==0x0&&_0x44c441!==void 0x0&&_0x44c441!==null){const _0x42917e=_0x44c441*Math['PI']/0xb4,_0x381b99=Math[_0x58f200(0x18f)](_0x42917e),_0x1bd614=Math[_0x58f200(0x1b4)](_0x42917e),_0x2d6e60=width/0x2,_0x40ad50=height/0x2,_0x26a94=_0x2783d9-_0x2d6e60,_0x2fb494=_0x593c29-_0x40ad50;_0x2783d9=_0x2d6e60+_0x26a94*_0x381b99-_0x2fb494*_0x1bd614,_0x593c29=_0x40ad50+_0x26a94*_0x1bd614+_0x2fb494*_0x381b99;}_0x2783d9+=left,_0x593c29+=top;let _0x1c629f=_0x2e392a['ang']/0xea60;if(flipX)_0x1c629f=0xb4-_0x1c629f;if(flipY)_0x1c629f=-_0x1c629f;_0x1c629f+=_0x44c441||0x0,_0x1c629f=(_0x1c629f%0x168+0x168)%0x168;const _0x563d15=(0x0,_univerjs_pro_engine_shape['getBasicShapeRotateBound'])({'left':left,'top':top,'width':width,'height':height},_0x44c441||0x0);return{'point':{'x':_0x2783d9,'y':_0x593c29},'angle':_0x1c629f,'bounds':_0x563d15};}['_addLineRerouteUpdates'](_0x284d02,_0x1b409a,_0x262172,_0x4389e6,_0x170e6f,_0x344fec,_0x94b8e6,_0x257874,_0x3a8b6c,_0x528ad9){const _0x4a2e3a=_0x1420e0,_0x1a3968=this[_0x4a2e3a(0x1cd)][_0x4a2e3a(0x16f)](_0x284d02,_0x1b409a);if(!_0x1a3968)return;const _0x4f8077=_0x4389e6[_0x4a2e3a(0x1c1)](),_0x366386=_0x4389e6[_0x4a2e3a(0x208)](),_0x267bbd={},_0x193d1b={};_0x366386[_0x4a2e3a(0x22a)](_0x281126=>{const _0x3c14d1=_0x4389e6['getAdjustValueByName'](_0x281126);_0x193d1b[_0x281126]=_0x3c14d1!==null&&_0x3c14d1!==void 0x0?_0x3c14d1:0x0;});const _0x487775=this['_getConnectPointInfo'](_0x170e6f,_0x284d02,_0x1b409a,_0x3a8b6c,_0x528ad9),_0x198691=this[_0x4a2e3a(0x1ee)](_0x344fec,_0x284d02,_0x1b409a,_0x3a8b6c,_0x528ad9);if(_0x487775&&_0x198691){const _0x15e11b=_0x4389e6['getShapeType'](),_0x47f842=(0x0,_univerjs_pro_engine_shape[_0x4a2e3a(0x1fc)])(_0x487775,_0x198691,_0x15e11b);let _0x4bef90=_0x15e11b;if(_0x47f842){const _0x416cb5=(0x0,_univerjs_pro_engine_shape['computeConnectorRouteLayout'])(_0x47f842,_0x4389e6[_0x4a2e3a(0x1db)]()),_0x30cb59=this[_0x4a2e3a(0x1e7)][_0x4a2e3a(0x170)](_0x284d02,_0x1b409a);if(_0x30cb59&&_0x30cb59[_0x262172]){const _0x140854=_0x30cb59[_0x262172];_0x4bef90=_0x416cb5['lineType'];for(const [_0x352507,_0x3492ad]of Object[_0x4a2e3a(0x1fa)](_0x416cb5['adjustValues']))_0x267bbd[_0x352507]=_0x3492ad;const _0x3ebd2f={..._0x140854[_0x4a2e3a(0x17e)],'width':_0x416cb5[_0x4a2e3a(0x210)][_0x4a2e3a(0x225)],'height':_0x416cb5[_0x4a2e3a(0x210)][_0x4a2e3a(0x1da)],'left':_0x416cb5[_0x4a2e3a(0x210)][_0x4a2e3a(0x21f)],'top':_0x416cb5[_0x4a2e3a(0x210)][_0x4a2e3a(0x1e4)],'flipX':_0x416cb5['worldRect'][_0x4a2e3a(0x216)],'flipY':_0x416cb5[_0x4a2e3a(0x210)][_0x4a2e3a(0x195)],'angle':_0x416cb5[_0x4a2e3a(0x21b)]},_0x13af0b=(0x0,_univerjs_sheets_drawing['transformToDrawingPosition'])(_0x3ebd2f,_0x1a3968),_0x3ce060=(0x0,_univerjs_sheets_drawing[_0x4a2e3a(0x21a)])(_0x3ebd2f,_0x1a3968),_0xe41bf8={'unitId':_0x284d02,'subUnitId':_0x1b409a,'drawingType':_univerjs_core[_0x4a2e3a(0x173)][_0x4a2e3a(0x193)],'drawingId':_0x262172,'transform':_0x3ebd2f,'sheetTransform':_0x13af0b,'axisAlignSheetTransform':_0x3ce060},{unitId:_0x35505b,subUnitId:_0x42b7e0,undo:_0x880f00,redo:_0xa7273f,objects:_0x39f1b3}=this[_0x4a2e3a(0x1e7)][_0x4a2e3a(0x169)]([_0xe41bf8]);_0x94b8e6[_0x4a2e3a(0x20e)]({'id':_univerjs_sheets_drawing[_0x4a2e3a(0x1f4)]['id'],'params':{'unitId':_0x35505b,'subUnitId':_0x42b7e0,'op':_0xa7273f,'objects':_0x39f1b3,'type':_univerjs_sheets_drawing['DrawingApplyType'][_0x4a2e3a(0x1b9)]}}),_0x257874[_0x4a2e3a(0x20e)]({'id':_univerjs_sheets_drawing[_0x4a2e3a(0x1f4)]['id'],'params':{'unitId':_0x35505b,'subUnitId':_0x42b7e0,'op':_0x880f00,'objects':_0x39f1b3,'type':_univerjs_sheets_drawing[_0x4a2e3a(0x1ac)]['UPDATE']}});}_0x4389e6[_0x4a2e3a(0x22b)]();}_0x94b8e6[_0x4a2e3a(0x20e)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x284d02,'subUnitId':_0x1b409a,'shapeId':_0x262172,'shapeType':_0x4bef90,'shapeData':{'adjustValues':_0x267bbd,'relation':_0x4f8077}}}),_0x257874['push']({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x284d02,'subUnitId':_0x1b409a,'shapeId':_0x262172,'shapeType':_0x15e11b,'shapeData':{'adjustValues':_0x193d1b,'relation':_0x4f8077}}});}}[_0x1420e0(0x1bf)](_0xf9d972,_0x10fb4c,_0x597c3b,_0x3fcac3,_0x47b474,_0x39f437,_0x494f6c,_0x2fee9b,_0xcdd3fb,_0x37ed32){const _0x276d0a=_0x1420e0;var _0x1b7661;if(!_0x47b474)return;const _0x4f54af=this[_0x276d0a(0x1cd)][_0x276d0a(0x16f)](_0xf9d972,_0x10fb4c);if(!_0x4f54af)return;const _0x1a971f=(_0x1b7661=this[_0x276d0a(0x1e7)]['getDrawingByParam']({'unitId':_0xf9d972,'subUnitId':_0x10fb4c,'drawingId':_0xcdd3fb}))===null||_0x1b7661===void 0x0?void 0x0:_0x1b7661['transform'];if(!_0x1a971f)return;const _0x48c759=_0x1a971f[_0x276d0a(0x21f)]!==_0x37ed32['left']||_0x1a971f['top']!==_0x37ed32[_0x276d0a(0x1e4)],_0x401e8e=_0x1a971f[_0x276d0a(0x225)]!==_0x37ed32[_0x276d0a(0x225)]||_0x1a971f['height']!==_0x37ed32['height'],_0x2a308f=_0x1a971f[_0x276d0a(0x216)]!==_0x37ed32[_0x276d0a(0x216)]||_0x1a971f[_0x276d0a(0x195)]!==_0x37ed32[_0x276d0a(0x195)],_0x1d2c1f=_0x1a971f['angle']!==_0x37ed32[_0x276d0a(0x205)];if(_0x48c759&&!_0x401e8e&&!_0x2a308f&&!_0x1d2c1f){var _0x6b548e,_0x11ed4c,_0x5e1a37,_0x299761;const _0x661232=((_0x6b548e=_0x37ed32[_0x276d0a(0x21f)])!==null&&_0x6b548e!==void 0x0?_0x6b548e:0x0)-((_0x11ed4c=_0x1a971f['left'])!==null&&_0x11ed4c!==void 0x0?_0x11ed4c:0x0),_0x240349=((_0x5e1a37=_0x37ed32[_0x276d0a(0x1e4)])!==null&&_0x5e1a37!==void 0x0?_0x5e1a37:0x0)-((_0x299761=_0x1a971f['top'])!==null&&_0x299761!==void 0x0?_0x299761:0x0),_0x448d72=this['_drawingManagerService'][_0x276d0a(0x170)](_0xf9d972,_0x10fb4c);if(_0x448d72&&_0x448d72[_0x597c3b]){var _0x1ec79b,_0x122468,_0x424294,_0x158a17;const _0x2c8b78=_0x448d72[_0x597c3b],_0xe0f0b4={..._0x2c8b78[_0x276d0a(0x17e)],'left':((_0x1ec79b=(_0x122468=_0x2c8b78['transform'])===null||_0x122468===void 0x0?void 0x0:_0x122468[_0x276d0a(0x21f)])!==null&&_0x1ec79b!==void 0x0?_0x1ec79b:0x0)+_0x661232,'top':((_0x424294=(_0x158a17=_0x2c8b78[_0x276d0a(0x17e)])===null||_0x158a17===void 0x0?void 0x0:_0x158a17[_0x276d0a(0x1e4)])!==null&&_0x424294!==void 0x0?_0x424294:0x0)+_0x240349},_0x4c5c0b=(0x0,_univerjs_sheets_drawing['transformToDrawingPosition'])(_0xe0f0b4,_0x4f54af),_0x3689cf=(0x0,_univerjs_sheets_drawing[_0x276d0a(0x21a)])(_0xe0f0b4,_0x4f54af),_0x4d4d01={'unitId':_0xf9d972,'subUnitId':_0x10fb4c,'drawingType':_univerjs_core['DrawingTypeEnum']['DRAWING_SHAPE'],'drawingId':_0x597c3b,'transform':_0xe0f0b4,'sheetTransform':_0x4c5c0b,'axisAlignSheetTransform':_0x3689cf},{unitId:_0x46cda8,subUnitId:_0x25493b,undo:_0x309932,redo:_0x23b41e,objects:_0x25bdac}=this[_0x276d0a(0x1e7)][_0x276d0a(0x169)]([_0x4d4d01]);_0x494f6c[_0x276d0a(0x20e)]({'id':_univerjs_sheets_drawing[_0x276d0a(0x1f4)]['id'],'params':{'unitId':_0x46cda8,'subUnitId':_0x25493b,'op':_0x23b41e,'objects':_0x25bdac,'type':_univerjs_sheets_drawing['DrawingApplyType'][_0x276d0a(0x1b9)]}}),_0x2fee9b[_0x276d0a(0x20e)]({'id':_univerjs_sheets_drawing[_0x276d0a(0x1f4)]['id'],'params':{'unitId':_0x46cda8,'subUnitId':_0x25493b,'op':_0x309932,'objects':_0x25bdac,'type':_univerjs_sheets_drawing[_0x276d0a(0x1ac)]['UPDATE']}});}}else{const _0x4b6bea=_0x3fcac3[_0x276d0a(0x1be)](),_0x2e86b4=_0x3fcac3['getEndConnectInfo']();this[_0x276d0a(0x214)](_0xf9d972,_0x10fb4c,_0x597c3b,_0x3fcac3,_0x4b6bea,_0x2e86b4,_0x494f6c,_0x2fee9b,_0xcdd3fb,_0x37ed32);}}};function _0x1b33(_0x435406,_0xcccff1){_0x435406=_0x435406-0x165;const _0x5df675=_0x5df6();let _0x1b3367=_0x5df675[_0x435406];return _0x1b3367;}SheetsShapeController=__decorate([__decorateParam(0x0,_univerjs_core[_0x1420e0(0x1f0)]),__decorateParam(0x1,(0x0,_univerjs_core[_0x1420e0(0x19b)])(_univerjs_sheets['SheetInterceptorService'])),__decorateParam(0x2,(0x0,_univerjs_core['Inject'])(_univerjs_sheets['SheetSkeletonService'])),__decorateParam(0x3,(0x0,_univerjs_core[_0x1420e0(0x19b)])(SheetsShapeService)),__decorateParam(0x4,(0x0,_univerjs_core[_0x1420e0(0x19b)])(_univerjs_drawing['IDrawingManagerService']))],SheetsShapeController);let UniverSheetsShapePlugin=class UniverSheetsShapePlugin extends _univerjs_core[_0x1420e0(0x1d4)]{constructor(_0x59ac3b=defaultPluginConfig,_0x3e3722,_0x3d01c0,_0x9b7bdf){const _0x26f04d=_0x1420e0;super(),this[_0x26f04d(0x1c7)]=_0x59ac3b,this[_0x26f04d(0x1cf)]=_0x3e3722,this['_commandService']=_0x3d01c0,this['_configService']=_0x9b7bdf;const {..._0x5c4f33}=(0x0,_univerjs_core[_0x26f04d(0x219)])({},defaultPluginConfig,this[_0x26f04d(0x1c7)]);this[_0x26f04d(0x1df)]['setConfig'](SHEETS_SHAPE_PLUGIN_CONFIG_KEY,_0x5c4f33);}[_0x1420e0(0x1cb)](){const _0x2b30aa=_0x1420e0,_0x515c2a=this[_0x2b30aa(0x1cf)];[[SheetShapeModelManager],[SheetsShapeService],[SheetsShapeController]][_0x2b30aa(0x22a)](_0x405fb0=>_0x515c2a[_0x2b30aa(0x1f6)](_0x405fb0)),(0x0,_univerjs_core[_0x2b30aa(0x194)])(_0x515c2a,[[SheetsShapeService],[SheetsShapeController]]);}};_defineProperty(UniverSheetsShapePlugin,_0x1420e0(0x1e0),_univerjs_core[_0x1420e0(0x20d)][_0x1420e0(0x20f)]),_defineProperty(UniverSheetsShapePlugin,_0x1420e0(0x1d6),'SHEET_SHAPE_PLUGIN'),_defineProperty(UniverSheetsShapePlugin,_0x1420e0(0x1fb),name),_defineProperty(UniverSheetsShapePlugin,_0x1420e0(0x19f),version),UniverSheetsShapePlugin=__decorate([(0x0,_univerjs_core[_0x1420e0(0x1a2)])(_univerjs_pro_license[_0x1420e0(0x1f3)]),__decorateParam(0x1,(0x0,_univerjs_core[_0x1420e0(0x19b)])(_univerjs_core['Injector'])),__decorateParam(0x2,_univerjs_core['ICommandService']),__decorateParam(0x3,_univerjs_core[_0x1420e0(0x232)])],UniverSheetsShapePlugin),exports[_0x1420e0(0x1eb)]=DEFAULT_SHAPE_HEIGHT,exports['DEFAULT_SHAPE_WIDTH']=DEFAULT_SHAPE_WIDTH,exports[_0x1420e0(0x221)]=InsertShapeCommand,exports[_0x1420e0(0x1c3)]=InsertSheetsShapeMutation,exports['RemoveSheetsShapeMutation']=RemoveSheetsShapeMutation,exports[_0x1420e0(0x1d9)]=SetShapeDrawingDataCommand,exports['SetSheetsShapeRotateCommand']=SetSheetsShapeRotateCommand,exports[_0x1420e0(0x18d)]=SetSheetsShapeTextVerticalToggleCommand,Object[_0x1420e0(0x1c8)](exports,_0x1420e0(0x201),{'enumerable':!![],'get':function(){return SheetsShapeService;}}),exports[_0x1420e0(0x1bd)]=ToggleSheetsShapeFlipCommand,Object[_0x1420e0(0x1c8)](exports,_0x1420e0(0x182),{'enumerable':!![],'get':function(){return UniverSheetsShapePlugin;}}),exports['UpdateConnectorRelationCommand']=UpdateConnectorRelationCommand,exports[_0x1420e0(0x1f5)]=UpdateLineShapeResizeCommand,exports['UpdateSheetsShapeDataMutation']=UpdateSheetsShapeDataMutation,exports[_0x1420e0(0x1e2)]=UpdateSheetsShapeTypeCommand,exports[_0x1420e0(0x184)]=UpdateSheetsShapeTypeMutation;