@univerjs-pro/sheets-shape 0.22.0 → 0.22.1
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 +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/es/facade.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/facade.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +8 -8
package/lib/cjs/facade.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x2d7b2e=_0x6a60;function _0x6a60(_0x25794b,_0xfb9792){_0x25794b=_0x25794b-0xf4;const _0x36eef6=_0x36ee();let _0x6a6081=_0x36eef6[_0x25794b];return _0x6a6081;}(function(_0x561cb6,_0x3859af){const _0x5af7e1=_0x6a60,_0x1bb1df=_0x561cb6();while(!![]){try{const _0x424b9f=parseInt(_0x5af7e1(0x14c))/0x1+parseInt(_0x5af7e1(0x14e))/0x2*(parseInt(_0x5af7e1(0x172))/0x3)+-parseInt(_0x5af7e1(0x129))/0x4*(-parseInt(_0x5af7e1(0x152))/0x5)+-parseInt(_0x5af7e1(0x13c))/0x6*(parseInt(_0x5af7e1(0xfc))/0x7)+parseInt(_0x5af7e1(0x156))/0x8*(-parseInt(_0x5af7e1(0x18e))/0x9)+parseInt(_0x5af7e1(0x12d))/0xa*(-parseInt(_0x5af7e1(0x189))/0xb)+-parseInt(_0x5af7e1(0xf7))/0xc*(parseInt(_0x5af7e1(0x126))/0xd);if(_0x424b9f===_0x3859af)break;else _0x1bb1df['push'](_0x1bb1df['shift']());}catch(_0x3259bc){_0x1bb1df['push'](_0x1bb1df['shift']());}}}(_0x36ee,0x4826e),Object[_0x2d7b2e(0x123)](exports,Symbol[_0x2d7b2e(0x169)],{'value':_0x2d7b2e(0x12c)}));let _univerjs_pro_engine_shape=require('@univerjs-pro/engine-shape'),_univerjs_core_facade=require('@univerjs/core/facade'),_univerjs_pro_sheets_shape=require('@univerjs-pro/sheets-shape'),_univerjs_core=require('@univerjs/core'),_univerjs_drawing=require('@univerjs/drawing'),_univerjs_sheets=require('@univerjs/sheets'),_univerjs_sheets_drawing=require('@univerjs/sheets-drawing'),_univerjs_sheets_facade=require('@univerjs/sheets/facade');var FSheetsShapeEnumMixin=class extends _univerjs_core_facade[_0x2d7b2e(0x165)]{get['ShapeTypeEnum'](){const _0x51845f=_0x2d7b2e;return _univerjs_pro_engine_shape[_0x51845f(0x139)];}get[_0x2d7b2e(0xf9)](){return _univerjs_pro_engine_shape['ShapeFillEnum'];}get[_0x2d7b2e(0xf8)](){const _0x27f3c5=_0x2d7b2e;return _univerjs_pro_engine_shape[_0x27f3c5(0xf8)];}get['ShapeLineTypeEnum'](){const _0xf9c5d6=_0x2d7b2e;return _univerjs_pro_engine_shape[_0xf9c5d6(0x17c)];}get[_0x2d7b2e(0x107)](){const _0x22c146=_0x2d7b2e;return _univerjs_pro_engine_shape[_0x22c146(0x107)];}get[_0x2d7b2e(0x122)](){return _univerjs_pro_engine_shape['ShapeLineCapEnum'];}get[_0x2d7b2e(0x155)](){const _0x58ebed=_0x2d7b2e;return _univerjs_pro_engine_shape[_0x58ebed(0x155)];}get[_0x2d7b2e(0x135)](){const _0x28b827=_0x2d7b2e;return _univerjs_pro_engine_shape[_0x28b827(0x135)];}get['ShapeArrowSizeEnum'](){const _0x53ed59=_0x2d7b2e;return _univerjs_pro_engine_shape[_0x53ed59(0x18b)];}};_univerjs_core_facade[_0x2d7b2e(0x165)][_0x2d7b2e(0x124)](FSheetsShapeEnumMixin);function _typeof(_0x2d9e0a){'@babel/helpers - typeof';const _0x5b75e2=_0x2d7b2e;return _typeof='function'==typeof Symbol&&_0x5b75e2(0x18d)==typeof Symbol[_0x5b75e2(0x125)]?function(_0x8232f){return typeof _0x8232f;}:function(_0x2c721f){const _0x423e54=_0x5b75e2;return _0x2c721f&&_0x423e54(0x11c)==typeof Symbol&&_0x2c721f['constructor']===Symbol&&_0x2c721f!==Symbol[_0x423e54(0x16a)]?'symbol':typeof _0x2c721f;},_typeof(_0x2d9e0a);}function toPrimitive(_0x5996eb,_0x164e25){const _0x292430=_0x2d7b2e;if(_0x292430(0xff)!=_typeof(_0x5996eb)||!_0x5996eb)return _0x5996eb;var _0x8fd060=_0x5996eb[Symbol[_0x292430(0x161)]];if(void 0x0!==_0x8fd060){var _0x5485e2=_0x8fd060[_0x292430(0x112)](_0x5996eb,_0x164e25||'default');if('object'!=_typeof(_0x5485e2))return _0x5485e2;throw new TypeError(_0x292430(0x104));}return(_0x292430(0x110)===_0x164e25?String:Number)(_0x5996eb);}function toPropertyKey(_0x59d8ec){const _0x3a9a65=_0x2d7b2e;var _0x548625=toPrimitive(_0x59d8ec,_0x3a9a65(0x110));return _0x3a9a65(0x18d)==_typeof(_0x548625)?_0x548625:_0x548625+'';}function _0x36ee(){const _0x5e196c=['getConnectionSiteList','lineType','\x20not\x20found','setStrokeWidth','setWidth','setShapeGradientFill','477orHaUc','setStrokeColor','getShapeData','_commandService','type','_resolveEndpoints','setNoneFill','top','updateContext','push','ShapeLineTypeEnum','getStartConnectInfo','Skeleton\x20for\x20unitId\x20','setShapeSolidFill','DRAWING_SHAPE','endArrow','DrawingTypeEnum','executeCommand','stringify','from','gradientType','length','transform','622490VsfWVX','find','ShapeArrowSizeEnum','newShape','symbol','27ukQTjU','relation','generateRandomId','SolidFill','colorStops\x20is\x20required\x20and\x20should\x20contain\x20at\x20least\x20one\x20color\x20stop.','shape','width','opacity','convertPositionCellToSheetOverGrid','NoFill','469428SWkztv','ShapeGradientTypeEnum','ShapeFillEnum','getWorkbook','getConnectionSites','1603ICFvbi','worldRect','FConnectorShape','object','getShapeModel','isConnectorShape','getSheetId','getSize','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','\x20and\x20subUnitId\x20','index','ShapeLineDashEnum','setStrokeLineJoinType','SheetSkeletonService','setStrokeLineDashType','getBasicShapeRotateBound','setStrokeLineType','getShapeType','fill','get','string','gradientAngle','call','rotation','ensureSkeleton','unitId','Invalid\x20shape\x20type\x20for\x20connector.\x20Received\x20','ConnectorCoordinateTransform','left','point','_injector','flipY','function','ang',',\x20but\x20expected\x20a\x20connector\x20shape\x20type.','fillType','getConnectorLinePoints','setEndArrowType','ShapeLineCapEnum','defineProperty','extend','iterator','65GgqtDQ','startArrow','SetShapeDrawingDataCommand','4luTqtu','setPosition','routeConnectorLineShape','Module','10PMWmAd','keys','size','Shape\x20type\x20is\x20required.\x20Please\x20call\x20setShapeType()\x20before\x20build().','getEndConnectInfo','getAdjustValueByName','GradientFill','subUnitId','ShapeArrowTypeEnum','shapeData','cxnIndex','flipX','ShapeTypeEnum','getDrawingData','height','5976JGUgNX','drawingType','adjustValues','gradientStops','parse','setStrokeLineCapType','setShapeType','FWorksheet','FShape','drawId','_resolveExistingOrFreeEndpoint','abs','setStrokeOpacity','ISheetDrawingService','build','setStartArrowSize','527880FLXygC','dashType','6070OzJxSh','lineJoinType','_preloadShapeProperties','getUnitId','1125165yTvGia','connectionSiteIndex','isLineShape','ShapeLineJoinEnum','1225800kxwgOS','updateShape','getDrawingPoints','DEFAULT_SHAPE_WIDTH','getPosition','DEFAULT_SHAPE_HEIGHT','sin','UpdateConnectorRelationCommand','getAdjustPoints','shapeType','computeConnectorRouteLayout','toPrimitive','SheetsShapeService','entries','getDrawingByParam','FEnum','stroke','IDrawingManagerService','lineStrokeType','toStringTag','prototype','getAdjustNames'];_0x36ee=function(){return _0x5e196c;};return _0x36ee();}function _defineProperty(_0x53c341,_0x3d7122,_0x49190c){const _0x13fd3e=_0x2d7b2e;return(_0x3d7122=toPropertyKey(_0x3d7122))in _0x53c341?Object[_0x13fd3e(0x123)](_0x53c341,_0x3d7122,{'value':_0x49190c,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x53c341[_0x3d7122]=_0x49190c,_0x53c341;}var FShape=class{constructor(_0x451bee,_0x16e586,_0x385439,_0x8bc4e2){const _0x40c86c=_0x2d7b2e;_defineProperty(this,_0x40c86c(0x115),void 0x0),_defineProperty(this,_0x40c86c(0x134),void 0x0),_defineProperty(this,_0x40c86c(0x145),void 0x0),_defineProperty(this,'x',0x0),_defineProperty(this,'y',0x0),_defineProperty(this,_0x40c86c(0x194),_univerjs_pro_sheets_shape[_0x40c86c(0x159)]),_defineProperty(this,'height',_univerjs_pro_sheets_shape[_0x40c86c(0x15b)]),_defineProperty(this,_0x40c86c(0x15f),void 0x0),_defineProperty(this,_0x40c86c(0x136),{}),_defineProperty(this,'_injector',void 0x0),this[_0x40c86c(0x115)]=_0x451bee,this['subUnitId']=_0x16e586,this[_0x40c86c(0x145)]=_0x385439||(0x0,_univerjs_core[_0x40c86c(0x190)])(),this['_injector']=_0x8bc4e2;}[_0x2d7b2e(0x12a)](_0x4787e9,_0x2ffe0f,_0x4e8957,_0x1ce24d){const _0x10e118=_0x2d7b2e,_0x303b12=this[_0x10e118(0x11a)]['get'](_univerjs_sheets[_0x10e118(0x109)])[_0x10e118(0x114)](this[_0x10e118(0x115)],this[_0x10e118(0x134)]);if(!_0x303b12)throw new Error(_0x10e118(0x17e)+this[_0x10e118(0x115)]+_0x10e118(0x105)+this[_0x10e118(0x134)]+_0x10e118(0x16e));const {transform:_0x1cfad4}=(0x0,_univerjs_sheets[_0x10e118(0xf5)])(this[_0x10e118(0x115)],this['subUnitId'],{'row':_0x4787e9,'column':_0x2ffe0f,'rowOffset':_0x4e8957,'columnOffset':_0x1ce24d},0x1,0x1,_0x303b12);return this['x']=_0x1cfad4['left'],this['y']=_0x1cfad4['top'],this;}['setAbsolutePosition'](_0x1f9e04,_0x2f5c73){return this['x']=_0x1f9e04,this['y']=_0x2f5c73,this;}[_0x2d7b2e(0x142)](_0x47001e){return this['shapeType']=_0x47001e,this;}[_0x2d7b2e(0x17f)](_0x5d18ff,_0xf1b8d9){const _0x502280=_0x2d7b2e;if(!this[_0x502280(0x136)][_0x502280(0x10e)])this[_0x502280(0x136)]['fill']={};this[_0x502280(0x136)][_0x502280(0x10e)][_0x502280(0x11f)]=_univerjs_pro_engine_shape['ShapeFillEnum'][_0x502280(0x191)];if(_0x5d18ff!==void 0x0)this[_0x502280(0x136)][_0x502280(0x10e)]['color']=_0x5d18ff;if(_0xf1b8d9!==void 0x0)this[_0x502280(0x136)][_0x502280(0x10e)]['opacity']=_0xf1b8d9;return this;}[_0x2d7b2e(0x171)](_0x4388ad,_0x9391d1,_0x3f805b){const _0xb4a396=_0x2d7b2e;if(_0x9391d1===void 0x0||_0x9391d1[_0xb4a396(0x187)]===0x0)throw new Error(_0xb4a396(0x192));if(!this[_0xb4a396(0x136)][_0xb4a396(0x10e)])this[_0xb4a396(0x136)][_0xb4a396(0x10e)]={};this[_0xb4a396(0x136)]['fill'][_0xb4a396(0x13f)]=_0x9391d1,this['shapeData'][_0xb4a396(0x10e)][_0xb4a396(0x11f)]=_univerjs_pro_engine_shape[_0xb4a396(0xf9)][_0xb4a396(0x133)],this[_0xb4a396(0x136)][_0xb4a396(0x10e)][_0xb4a396(0x186)]=_0x4388ad;if(_0x3f805b!==void 0x0)this[_0xb4a396(0x136)][_0xb4a396(0x10e)][_0xb4a396(0x111)]=_0x3f805b;return this;}[_0x2d7b2e(0x178)](){const _0x190256=_0x2d7b2e;return this[_0x190256(0x136)][_0x190256(0x10e)]={'fillType':_univerjs_pro_engine_shape[_0x190256(0xf9)][_0x190256(0xf6)]},this;}[_0x2d7b2e(0x173)](_0x489aae){const _0x23e51f=_0x2d7b2e;if(!this[_0x23e51f(0x136)]['stroke'])this[_0x23e51f(0x136)][_0x23e51f(0x166)]={};return this[_0x23e51f(0x136)][_0x23e51f(0x166)]['color']=_0x489aae,this;}[_0x2d7b2e(0x16f)](_0x3f074c){const _0x5921fc=_0x2d7b2e;if(!this[_0x5921fc(0x136)][_0x5921fc(0x166)])this[_0x5921fc(0x136)][_0x5921fc(0x166)]={};return this[_0x5921fc(0x136)][_0x5921fc(0x166)][_0x5921fc(0x194)]=_0x3f074c,this;}[_0x2d7b2e(0x10a)](_0x39c6ae){const _0xf02d82=_0x2d7b2e;if(!this[_0xf02d82(0x136)][_0xf02d82(0x166)])this[_0xf02d82(0x136)][_0xf02d82(0x166)]={};return this[_0xf02d82(0x136)][_0xf02d82(0x166)][_0xf02d82(0x14d)]=_0x39c6ae,this;}[_0x2d7b2e(0x108)](_0x5aed1e){const _0x2c28cb=_0x2d7b2e;if(!this['shapeData'][_0x2c28cb(0x166)])this[_0x2c28cb(0x136)][_0x2c28cb(0x166)]={};return this[_0x2c28cb(0x136)][_0x2c28cb(0x166)][_0x2c28cb(0x14f)]=_0x5aed1e,this;}[_0x2d7b2e(0x141)](_0x46236c){const _0x3119ff=_0x2d7b2e;if(!this[_0x3119ff(0x136)][_0x3119ff(0x166)])this[_0x3119ff(0x136)][_0x3119ff(0x166)]={};return this['shapeData']['stroke']['capType']=_0x46236c,this;}[_0x2d7b2e(0x148)](_0x805c77){const _0x35fbb3=_0x2d7b2e;if(!this[_0x35fbb3(0x136)][_0x35fbb3(0x166)])this[_0x35fbb3(0x136)][_0x35fbb3(0x166)]={};return this[_0x35fbb3(0x136)][_0x35fbb3(0x166)][_0x35fbb3(0xf4)]=_0x805c77,this;}[_0x2d7b2e(0x10c)](_0x346053){const _0x190371=_0x2d7b2e;if(!this[_0x190371(0x136)][_0x190371(0x166)])this[_0x190371(0x136)]['stroke']={};return this[_0x190371(0x136)][_0x190371(0x166)][_0x190371(0x168)]=_0x346053,this;}[_0x2d7b2e(0x170)](_0x2b9349){const _0x1e8e02=_0x2d7b2e;return this[_0x1e8e02(0x194)]=_0x2b9349,this;}['setHeight'](_0x1a8b4e){const _0x230bd6=_0x2d7b2e;return this[_0x230bd6(0x13b)]=_0x1a8b4e,this;}[_0x2d7b2e(0x154)](){const _0x35e60b=_0x2d7b2e,_0x3aa4ab=this[_0x35e60b(0x11a)][_0x35e60b(0x10f)](_univerjs_pro_sheets_shape['SheetsShapeService'])[_0x35e60b(0x100)](this[_0x35e60b(0x115)],this[_0x35e60b(0x134)],this[_0x35e60b(0x145)]);if(_0x3aa4ab)return(0x0,_univerjs_pro_engine_shape[_0x35e60b(0x101)])(_0x3aa4ab[_0x35e60b(0x10d)]());if(this[_0x35e60b(0x15f)])return(0x0,_univerjs_pro_engine_shape[_0x35e60b(0x101)])(this['shapeType']);return![];}[_0x2d7b2e(0xfb)](){const _0x4f4fff=_0x2d7b2e,_0x443db6=this['_injector'][_0x4f4fff(0x10f)](_univerjs_pro_sheets_shape[_0x4f4fff(0x162)])['getShapeModel'](this['unitId'],this[_0x4f4fff(0x134)],this[_0x4f4fff(0x145)]);if(!_0x443db6)return[];const _0x4660a1=this['_injector'][_0x4f4fff(0x10f)](_univerjs_drawing[_0x4f4fff(0x167)])[_0x4f4fff(0x164)]({'unitId':this[_0x4f4fff(0x115)],'subUnitId':this[_0x4f4fff(0x134)],'drawingId':this[_0x4f4fff(0x145)]});if(!(_0x4660a1===null||_0x4660a1===void 0x0?void 0x0:_0x4660a1[_0x4f4fff(0x188)]))return[];const {width:width=0x0,height:height=0x0}=_0x4660a1[_0x4f4fff(0x188)];return _0x443db6[_0x4f4fff(0x17a)]({'width':width,'height':height}),_0x443db6['getConnectionSiteList']();}[_0x2d7b2e(0x15e)](){const _0x597c8a=_0x2d7b2e,_0x248f00=this[_0x597c8a(0x11a)]['get'](_univerjs_pro_sheets_shape['SheetsShapeService'])[_0x597c8a(0x100)](this[_0x597c8a(0x115)],this[_0x597c8a(0x134)],this[_0x597c8a(0x145)]);if(!_0x248f00)return[];const _0x186c06=this[_0x597c8a(0x11a)]['get'](_univerjs_drawing[_0x597c8a(0x167)])['getDrawingByParam']({'unitId':this[_0x597c8a(0x115)],'subUnitId':this[_0x597c8a(0x134)],'drawingId':this['drawId']});if(!(_0x186c06===null||_0x186c06===void 0x0?void 0x0:_0x186c06[_0x597c8a(0x188)]))return[];const {width:width=0x0,height:height=0x0}=_0x186c06['transform'];return _0x248f00[_0x597c8a(0x17a)]({'width':width,'height':height}),_0x248f00[_0x597c8a(0x158)]();}[_0x2d7b2e(0x120)](){const _0x30b1fa=_0x2d7b2e,_0x1883e1=this[_0x30b1fa(0x11a)][_0x30b1fa(0x10f)](_univerjs_pro_sheets_shape[_0x30b1fa(0x162)])[_0x30b1fa(0x100)](this[_0x30b1fa(0x115)],this[_0x30b1fa(0x134)],this['drawId']);if(!_0x1883e1)return[];if(!(0x0,_univerjs_pro_engine_shape[_0x30b1fa(0x101)])(_0x1883e1['getShapeType']()))return[];const _0x4fc532=this[_0x30b1fa(0x11a)]['get'](_univerjs_drawing['IDrawingManagerService'])['getDrawingByParam']({'unitId':this['unitId'],'subUnitId':this[_0x30b1fa(0x134)],'drawingId':this[_0x30b1fa(0x145)]});if(!(_0x4fc532===null||_0x4fc532===void 0x0?void 0x0:_0x4fc532[_0x30b1fa(0x188)]))return[];const {width:width=0x0,height:height=0x0}=_0x4fc532[_0x30b1fa(0x188)];return _0x1883e1['updateContext']({'width':width,'height':height}),_0x1883e1[_0x30b1fa(0x120)]();}[_0x2d7b2e(0x17d)](){const _0x3de0dc=_0x2d7b2e;var _0x5e217b;const _0x3eaf49=this[_0x3de0dc(0x11a)][_0x3de0dc(0x10f)](_univerjs_pro_sheets_shape['SheetsShapeService'])[_0x3de0dc(0x100)](this[_0x3de0dc(0x115)],this[_0x3de0dc(0x134)],this['drawId']);if(!_0x3eaf49)return null;return(_0x5e217b=_0x3eaf49[_0x3de0dc(0x17d)]())!==null&&_0x5e217b!==void 0x0?_0x5e217b:null;}[_0x2d7b2e(0x131)](){const _0x112565=_0x2d7b2e;var _0x27ebbc;const _0x11ae32=this[_0x112565(0x11a)][_0x112565(0x10f)](_univerjs_pro_sheets_shape[_0x112565(0x162)])[_0x112565(0x100)](this[_0x112565(0x115)],this[_0x112565(0x134)],this[_0x112565(0x145)]);if(!_0x11ae32)return null;return(_0x27ebbc=_0x11ae32[_0x112565(0x131)]())!==null&&_0x27ebbc!==void 0x0?_0x27ebbc:null;}[_0x2d7b2e(0x14a)](){const _0x32852a=_0x2d7b2e;var _0x3f1dbe,_0xfaa018;if(!this[_0x32852a(0x15f)])throw new Error(_0x32852a(0x130));if(this['x']===0x0||this['y']===0x0){const _0x1c17f0=this[_0x32852a(0x11a)][_0x32852a(0x10f)](_univerjs_sheets[_0x32852a(0x109)])['ensureSkeleton'](this[_0x32852a(0x115)],this['subUnitId']);if(!_0x1c17f0)throw new Error(_0x32852a(0x17e)+this[_0x32852a(0x115)]+_0x32852a(0x105)+this[_0x32852a(0x134)]+_0x32852a(0x16e));const {transform:_0x24304d}=(0x0,_univerjs_sheets[_0x32852a(0xf5)])(this[_0x32852a(0x115)],this[_0x32852a(0x134)],{'row':0x1,'column':0x1,'rowOffset':0x0,'columnOffset':0x0},0x1,0x1,_0x1c17f0);this['x']=this['x']>0x0?this['x']:_0x24304d[_0x32852a(0x118)],this['y']=this['y']>0x0?this['y']:_0x24304d[_0x32852a(0x179)];}return this[_0x32852a(0x194)]=(_0x3f1dbe=this['width'])!==null&&_0x3f1dbe!==void 0x0?_0x3f1dbe:_univerjs_pro_sheets_shape['DEFAULT_SHAPE_WIDTH'],this['height']=(_0xfaa018=this[_0x32852a(0x13b)])!==null&&_0xfaa018!==void 0x0?_0xfaa018:_univerjs_pro_sheets_shape[_0x32852a(0x15b)],{'unitId':this[_0x32852a(0x115)],'subUnitId':this[_0x32852a(0x134)],'shapeId':this[_0x32852a(0x145)],'shapeType':this[_0x32852a(0x15f)],'shapeData':Object[_0x32852a(0x12e)](this[_0x32852a(0x136)])[_0x32852a(0x187)]>0x0?this['shapeData']:void 0x0,'x':this['x'],'y':this['y'],'width':this[_0x32852a(0x194)],'height':this[_0x32852a(0x13b)]};}['getShapeId'](){const _0x308fe3=_0x2d7b2e;return this[_0x308fe3(0x145)];}[_0x2d7b2e(0x10d)](){const _0x19bd56=_0x2d7b2e;return this[_0x19bd56(0x15f)];}[_0x2d7b2e(0x174)](){const _0x20b98b=_0x2d7b2e;return this[_0x20b98b(0x136)];}[_0x2d7b2e(0x15a)](){return{'x':this['x'],'y':this['y']};}[_0x2d7b2e(0x103)](){const _0x4a6c78=_0x2d7b2e;return{'width':this[_0x4a6c78(0x194)],'height':this[_0x4a6c78(0x13b)]};}},FConnectorShape=class extends FShape{constructor(_0x892e5f,_0x37b044,_0x38e792,_0x546b85){super(_0x892e5f,_0x37b044,_0x38e792,_0x546b85),_defineProperty(this,'shapeData',{});}[_0x2d7b2e(0x142)](_0x29cf55){const _0x3d85d0=_0x2d7b2e;if(!(0x0,_univerjs_pro_engine_shape[_0x3d85d0(0x101)])(_0x29cf55))throw new Error(_0x3d85d0(0x116)+_0x29cf55+_0x3d85d0(0x11e));return super[_0x3d85d0(0x142)](_0x29cf55),this;}['setStartArrowType'](_0x299d18){const _0x38632b=_0x2d7b2e;var _0x327244,_0x4f6a67;if(!((_0x327244=this[_0x38632b(0x136)])===null||_0x327244===void 0x0?void 0x0:_0x327244['ln']))this[_0x38632b(0x136)]['ln']={};if(!((_0x4f6a67=this[_0x38632b(0x136)])===null||_0x4f6a67===void 0x0||(_0x4f6a67=_0x4f6a67['ln'])===null||_0x4f6a67===void 0x0?void 0x0:_0x4f6a67[_0x38632b(0x127)]))this[_0x38632b(0x136)]['ln']['startArrow']={};return this['shapeData']['ln'][_0x38632b(0x127)][_0x38632b(0x176)]=_0x299d18,this;}[_0x2d7b2e(0x121)](_0x235342){const _0x1b790c=_0x2d7b2e;var _0x188003,_0x1c746f;if(!((_0x188003=this[_0x1b790c(0x136)])===null||_0x188003===void 0x0?void 0x0:_0x188003['ln']))this['shapeData']['ln']={};if(!((_0x1c746f=this[_0x1b790c(0x136)])===null||_0x1c746f===void 0x0||(_0x1c746f=_0x1c746f['ln'])===null||_0x1c746f===void 0x0?void 0x0:_0x1c746f[_0x1b790c(0x181)]))this[_0x1b790c(0x136)]['ln'][_0x1b790c(0x181)]={};return this[_0x1b790c(0x136)]['ln']['endArrow'][_0x1b790c(0x176)]=_0x235342,this;}[_0x2d7b2e(0x14b)](_0x4381c4){const _0x55ecf9=_0x2d7b2e;var _0x1c126b,_0x3440bd;if(!((_0x1c126b=this[_0x55ecf9(0x136)])===null||_0x1c126b===void 0x0?void 0x0:_0x1c126b['ln']))this[_0x55ecf9(0x136)]['ln']={};if(!((_0x3440bd=this[_0x55ecf9(0x136)])===null||_0x3440bd===void 0x0||(_0x3440bd=_0x3440bd['ln'])===null||_0x3440bd===void 0x0?void 0x0:_0x3440bd['startArrow']))this[_0x55ecf9(0x136)]['ln']['startArrow']={};return this[_0x55ecf9(0x136)]['ln'][_0x55ecf9(0x127)][_0x55ecf9(0x12f)]=_0x4381c4,this;}['setEndArrowSize'](_0x23a339){const _0x2f9d53=_0x2d7b2e;var _0x3ab94d,_0x1ce263;if(!((_0x3ab94d=this[_0x2f9d53(0x136)])===null||_0x3ab94d===void 0x0?void 0x0:_0x3ab94d['ln']))this['shapeData']['ln']={};if(!((_0x1ce263=this[_0x2f9d53(0x136)])===null||_0x1ce263===void 0x0||(_0x1ce263=_0x1ce263['ln'])===null||_0x1ce263===void 0x0?void 0x0:_0x1ce263[_0x2f9d53(0x181)]))this[_0x2f9d53(0x136)]['ln'][_0x2f9d53(0x181)]={};return this[_0x2f9d53(0x136)]['ln'][_0x2f9d53(0x181)][_0x2f9d53(0x12f)]=_0x23a339,this;}[_0x2d7b2e(0x14a)](){const _0x374aa8=_0x2d7b2e;return super[_0x374aa8(0x14a)]();}['getEndConnectInfo'](){const _0x4af340=_0x2d7b2e;var _0x20fea5;return((_0x20fea5=this[_0x4af340(0x136)])===null||_0x20fea5===void 0x0||(_0x20fea5=_0x20fea5[_0x4af340(0x18f)])===null||_0x20fea5===void 0x0?void 0x0:_0x20fea5['to'])||null;}[_0x2d7b2e(0x17d)](){const _0x3d24d8=_0x2d7b2e;var _0x4be542;return((_0x4be542=this[_0x3d24d8(0x136)])===null||_0x4be542===void 0x0||(_0x4be542=_0x4be542[_0x3d24d8(0x18f)])===null||_0x4be542===void 0x0?void 0x0:_0x4be542[_0x3d24d8(0x185)])||null;}};function computeConnectionPointInfo(_0x158d16,_0x598cf7,_0x36fa82,_0x3c833f,_0x29e155,_0x3e548a){const _0x23d48f=_0x2d7b2e,_0x2343ff=_0x29e155[_0x23d48f(0x100)](_0x158d16,_0x598cf7,_0x36fa82);if(!_0x2343ff)return null;const _0x3844ec=_0x3e548a[_0x23d48f(0x164)]({'unitId':_0x158d16,'subUnitId':_0x598cf7,'drawingId':_0x36fa82});if(!(_0x3844ec===null||_0x3844ec===void 0x0?void 0x0:_0x3844ec[_0x23d48f(0x188)]))return null;const {left:left=0x0,top:top=0x0,width:width=0x0,height:height=0x0,flipX:flipX=![],flipY:flipY=![],angle:_0x26d7a1}=_0x3844ec[_0x23d48f(0x188)];_0x2343ff[_0x23d48f(0x17a)]({'width':width,'height':height});const _0x305b69=_0x2343ff[_0x23d48f(0x16c)]()[_0x23d48f(0x18a)](_0x1eb7a0=>_0x1eb7a0[_0x23d48f(0x106)]===_0x3c833f);if(!_0x305b69)return null;let _0x148849=flipX?width-_0x305b69['x']:_0x305b69['x'],_0x11d593=flipY?height-_0x305b69['y']:_0x305b69['y'];if(_0x26d7a1&&_0x26d7a1!==0x0){const _0x45ec9a=_0x26d7a1*Math['PI']/0xb4,_0x4d1220=Math['cos'](_0x45ec9a),_0x24e76e=Math[_0x23d48f(0x15c)](_0x45ec9a),_0x4bec12=width/0x2,_0x505c02=height/0x2,_0x2d194a=_0x148849-_0x4bec12,_0x501cc9=_0x11d593-_0x505c02;_0x148849=_0x4bec12+_0x2d194a*_0x4d1220-_0x501cc9*_0x24e76e,_0x11d593=_0x505c02+_0x2d194a*_0x24e76e+_0x501cc9*_0x4d1220;}_0x148849+=left,_0x11d593+=top;let _0x4bce2d=_0x305b69[_0x23d48f(0x11d)]/0xea60;if(flipX)_0x4bce2d=0xb4-_0x4bce2d;if(flipY)_0x4bce2d=-_0x4bce2d;_0x4bce2d+=_0x26d7a1||0x0,_0x4bce2d=(_0x4bce2d%0x168+0x168)%0x168;const _0x3a2645=(0x0,_univerjs_pro_engine_shape[_0x23d48f(0x10b)])({'left':left,'top':top,'width':width,'height':height},_0x26d7a1||0x0);return{'point':{'x':_0x148849,'y':_0x11d593},'angle':_0x4bce2d,'bounds':_0x3a2645};}function calculateFreeEndpointAngle(_0x5fd981,_0x5b92a8){const _0xde95b=_0x2d7b2e,_0x3db834=_0x5b92a8['x']-_0x5fd981['x'],_0x27b9a4=_0x5b92a8['y']-_0x5fd981['y'];if(Math[_0xde95b(0x147)](_0x3db834)>=Math[_0xde95b(0x147)](_0x27b9a4))return _0x3db834>=0x0?0xb4:0x0;return _0x27b9a4>=0x0?0x10e:0x5a;}function computeFreeEndpointInfo(_0x33dc70,_0x10b3ff,_0x5e21c1,_0x2d52db,_0x3ae86a,_0x55b8ac,_0x267e11){const _0x1071b9=_0x2d7b2e,_0x305ea9=_0x55b8ac['getShapeModel'](_0x33dc70,_0x10b3ff,_0x5e21c1);if(!_0x305ea9)return null;const _0x267283=_0x267e11[_0x1071b9(0x164)]({'unitId':_0x33dc70,'subUnitId':_0x10b3ff,'drawingId':_0x5e21c1});if(!(_0x267283===null||_0x267283===void 0x0?void 0x0:_0x267283[_0x1071b9(0x188)]))return null;const {left:left=0x0,top:top=0x0,width:width=0x0,height:height=0x0,flipX:flipX=![],flipY:flipY=![]}=_0x267283[_0x1071b9(0x188)];_0x305ea9[_0x1071b9(0x17a)]({'width':width,'height':height});const _0x13fbaf=_0x305ea9[_0x1071b9(0x120)]();if(_0x13fbaf[_0x1071b9(0x187)]<0x2)return null;const _0x498ce3=_0x2d52db?_0x13fbaf[0x0]:_0x13fbaf[_0x13fbaf[_0x1071b9(0x187)]-0x1],_0x23c44c=new _univerjs_pro_engine_shape[(_0x1071b9(0x117))]({'left':left,'top':top,'width':width,'height':height,'flipX':flipX,'flipY':flipY})['localToWorld'](_0x498ce3);return{'point':_0x23c44c,'angle':calculateFreeEndpointAngle(_0x3ae86a[_0x1071b9(0x119)],_0x23c44c),'bounds':{'left':_0x23c44c['x'],'top':_0x23c44c['y'],'width':0x0,'height':0x0}};}var FWorksheetShapeMixin=class extends _univerjs_sheets_facade[_0x2d7b2e(0x143)]{async['insertShape'](_0x50d735){const _0x2f4f18=_0x2d7b2e,{unitId:_0x567fca,subUnitId:_0x58e423,shapeId:_0x3ccbd8,shapeType:_0x168973,shapeData:_0x328810,x:_0x487adf,y:_0x1f5d5d,width:_0x2d3334,height:_0x5f36ba}=_0x50d735;return this[_0x2f4f18(0x175)]['executeCommand'](_univerjs_pro_sheets_shape['InsertShapeCommand']['id'],{'unitId':_0x567fca,'subUnitId':_0x58e423,'shapeId':_0x3ccbd8,'shapeType':_0x168973,'shapeData':_0x328810,'position':{'x':_0x487adf,'y':_0x1f5d5d},'width':_0x2d3334,'height':_0x5f36ba});}async[_0x2d7b2e(0x157)](_0x31ea2d){const _0x2fd384=_0x2d7b2e,{unitId:_0x233731,subUnitId:_0x10fbfc,shapeId:_0x50aec6,shapeType:_0x4c5ca0,shapeData:_0x502755,x:_0x24a966,y:_0x207eaf,width:_0xc4d0d8,height:_0xb6b469}=_0x31ea2d;return this[_0x2fd384(0x175)][_0x2fd384(0x183)](_univerjs_pro_sheets_shape[_0x2fd384(0x128)]['id'],{'unitId':_0x233731,'subUnitId':_0x10fbfc,'shapeId':_0x50aec6,'shapeType':_0x4c5ca0,'shapeData':_0x502755,'position':{'x':_0x24a966,'y':_0x207eaf},'width':_0xc4d0d8,'height':_0xb6b469});}[_0x2d7b2e(0x18c)](_0x308a27){const _0x171ff3=_0x2d7b2e,_0x557fb2=this['getWorkbook']()[_0x171ff3(0x151)](),_0x3793f4=this['getSheetId']();if(_0x308a27){const _0x4cf3d4=new FShape(_0x557fb2,_0x3793f4,_0x308a27[_0x171ff3(0x145)],this[_0x171ff3(0x11a)]);return this[_0x171ff3(0x150)](_0x4cf3d4,_0x557fb2,_0x3793f4,_0x308a27[_0x171ff3(0x145)]),_0x4cf3d4;}return new FShape(_0x557fb2,_0x3793f4,(0x0,_univerjs_core[_0x171ff3(0x190)])(),this['_injector']);}['newConnector'](_0xf5d752){const _0x2dae03=_0x2d7b2e,_0x39e4db=this[_0x2dae03(0xfa)]()['getUnitId'](),_0x1fc8ab=this[_0x2dae03(0x102)]();if(_0xf5d752){const _0xbba2c6=new FConnectorShape(_0x39e4db,_0x1fc8ab,_0xf5d752[_0x2dae03(0x145)],this[_0x2dae03(0x11a)]);return this[_0x2dae03(0x150)](_0xbba2c6,_0x39e4db,_0x1fc8ab,_0xf5d752['drawId']),_0xbba2c6;}return new FConnectorShape(_0x39e4db,_0x1fc8ab,(0x0,_univerjs_core['generateRandomId'])(),this[_0x2dae03(0x11a)]);}['getShapes'](){const _0x3425be=_0x2d7b2e,_0x40b9cf=this[_0x3425be(0x11a)][_0x3425be(0x10f)](_univerjs_sheets_drawing[_0x3425be(0x149)]),_0x259a37=this[_0x3425be(0xfa)]()[_0x3425be(0x151)](),_0x544cf7=this['getSheetId'](),_0x32d61d=_0x40b9cf[_0x3425be(0x13a)](_0x259a37,_0x544cf7);if(!_0x32d61d)return[];const _0x4e1045=[];for(const [_0x1e9cb1,_0x5ae722]of Object[_0x3425be(0x163)](_0x32d61d))if(_0x5ae722&&_0x5ae722[_0x3425be(0x13d)]===_univerjs_core[_0x3425be(0x182)][_0x3425be(0x180)]){const _0x1dd18b=new FShape(_0x259a37,_0x544cf7,_0x1e9cb1,this[_0x3425be(0x11a)]);this[_0x3425be(0x150)](_0x1dd18b,_0x259a37,_0x544cf7,_0x1e9cb1),_0x4e1045[_0x3425be(0x17b)](_0x1dd18b);}return _0x4e1045;}['removeShape'](_0x185546){const _0x215422=_0x2d7b2e,{unitId:_0x26148a,subUnitId:_0x394563,drawId:_0x2d3198}=_0x185546;return this[_0x215422(0x175)][_0x215422(0x183)](_univerjs_sheets_drawing['RemoveSheetDrawingCommand']['id'],{'unitId':_0x26148a,'drawings':[{'unitId':_0x26148a,'subUnitId':_0x394563,'drawingId':_0x2d3198,'drawingType':_univerjs_core[_0x215422(0x182)][_0x215422(0x180)]}]});}async['connectShapes'](_0x3a0ca8){const _0x2143c9=_0x2d7b2e,{connector:_0x448c7c,startTarget:_0x1173a8,endTarget:_0x1921e7}=_0x3a0ca8;if(!_0x1173a8&&!_0x1921e7)return![];const _0x55504c=this['getWorkbook']()[_0x2143c9(0x151)](),_0x11c3f=this['getSheetId'](),_0x3ef40a=this[_0x2143c9(0x11a)][_0x2143c9(0x10f)](_univerjs_pro_sheets_shape[_0x2143c9(0x162)]),_0x4b6a69=this[_0x2143c9(0x11a)][_0x2143c9(0x10f)](_univerjs_drawing['IDrawingManagerService']),_0x5d3b31=_0x3ef40a[_0x2143c9(0x100)](_0x55504c,_0x11c3f,_0x448c7c[_0x2143c9(0x145)]);if(!_0x5d3b31)return![];const _0x62c186=_0x5d3b31['getShapeType'](),_0x347715=_0x5d3b31['getShapeRelation'](),_0x1ec0cb={};for(const _0x7c9635 of _0x5d3b31[_0x2143c9(0x16b)]()){const _0x41833b=_0x5d3b31[_0x2143c9(0x132)](_0x7c9635);if(_0x41833b!==void 0x0)_0x1ec0cb[_0x7c9635]=_0x41833b;}const {startInfo:_0x2664c9,endInfo:_0x3dcbf9}=this['_resolveEndpoints'](_0x55504c,_0x11c3f,_0x448c7c,_0x5d3b31,_0x1173a8,_0x1921e7,_0x3ef40a,_0x4b6a69,_0x347715);if(!_0x2664c9||!_0x3dcbf9)return![];const _0x555fa1=(0x0,_univerjs_pro_engine_shape[_0x2143c9(0x160)])((0x0,_univerjs_pro_engine_shape[_0x2143c9(0x12b)])(_0x2664c9,_0x3dcbf9,_0x62c186),_0x62c186),_0x4e81cd={};if(_0x1173a8)_0x4e81cd['from']={'shapeId':_0x1173a8['shape'][_0x2143c9(0x145)],'cxnIndex':_0x1173a8[_0x2143c9(0x153)]};else{if(_0x347715===null||_0x347715===void 0x0?void 0x0:_0x347715[_0x2143c9(0x185)])_0x4e81cd['from']=_0x347715[_0x2143c9(0x185)];}if(_0x1921e7)_0x4e81cd['to']={'shapeId':_0x1921e7[_0x2143c9(0x193)][_0x2143c9(0x145)],'cxnIndex':_0x1921e7[_0x2143c9(0x153)]};else{if(_0x347715===null||_0x347715===void 0x0?void 0x0:_0x347715['to'])_0x4e81cd['to']=_0x347715['to'];}return this[_0x2143c9(0x175)]['executeCommand'](_univerjs_pro_sheets_shape[_0x2143c9(0x15d)]['id'],{'unitId':_0x55504c,'subUnitId':_0x11c3f,'connectorShapeId':_0x448c7c[_0x2143c9(0x145)],'width':_0x555fa1['worldRect'][_0x2143c9(0x194)],'height':_0x555fa1[_0x2143c9(0xfd)][_0x2143c9(0x13b)],'left':_0x555fa1['worldRect'][_0x2143c9(0x118)],'top':_0x555fa1[_0x2143c9(0xfd)][_0x2143c9(0x179)],'flipX':_0x555fa1[_0x2143c9(0xfd)][_0x2143c9(0x138)]||![],'flipY':_0x555fa1[_0x2143c9(0xfd)][_0x2143c9(0x11b)]||![],'oldAdjustValues':_0x1ec0cb,'newAdjustValues':_0x555fa1[_0x2143c9(0x13e)],'newLineType':_0x555fa1[_0x2143c9(0x16d)],'oldLineType':_0x62c186,'rotation':_0x555fa1[_0x2143c9(0x113)],'oldRelation':_0x347715,'newRelation':_0x4e81cd});}[_0x2d7b2e(0x150)](_0x353b95,_0x3ec829,_0x4a8eda,_0x296fb6){const _0x3b7003=_0x2d7b2e,_0x395f8b=this[_0x3b7003(0x11a)][_0x3b7003(0x10f)](_univerjs_drawing[_0x3b7003(0x167)])['getDrawingByParam']({'unitId':_0x3ec829,'subUnitId':_0x4a8eda,'drawingId':_0x296fb6});if(_0x395f8b===null||_0x395f8b===void 0x0?void 0x0:_0x395f8b[_0x3b7003(0x188)]){var _0x55979a,_0x25493d,_0x1e38e0,_0x4b4fed;_0x353b95['x']=(_0x55979a=_0x395f8b['transform'][_0x3b7003(0x118)])!==null&&_0x55979a!==void 0x0?_0x55979a:0x0,_0x353b95['y']=(_0x25493d=_0x395f8b[_0x3b7003(0x188)][_0x3b7003(0x179)])!==null&&_0x25493d!==void 0x0?_0x25493d:0x0,_0x353b95[_0x3b7003(0x194)]=(_0x1e38e0=_0x395f8b[_0x3b7003(0x188)][_0x3b7003(0x194)])!==null&&_0x1e38e0!==void 0x0?_0x1e38e0:_0x353b95[_0x3b7003(0x194)],_0x353b95[_0x3b7003(0x13b)]=(_0x4b4fed=_0x395f8b[_0x3b7003(0x188)][_0x3b7003(0x13b)])!==null&&_0x4b4fed!==void 0x0?_0x4b4fed:_0x353b95[_0x3b7003(0x13b)];}const _0x29de72=this[_0x3b7003(0x11a)]['get'](_univerjs_pro_sheets_shape[_0x3b7003(0x162)])[_0x3b7003(0x100)](_0x3ec829,_0x4a8eda,_0x296fb6);if(_0x29de72){_0x353b95[_0x3b7003(0x15f)]=_0x29de72[_0x3b7003(0x10d)]();const _0x475cd8=_0x29de72['getShapeData']();if(_0x475cd8)_0x353b95[_0x3b7003(0x136)]=JSON[_0x3b7003(0x140)](JSON[_0x3b7003(0x184)](_0x475cd8));}}[_0x2d7b2e(0x177)](_0x1804fa,_0x144b42,_0xc40324,_0x45390b,_0x12dfd5,_0x159759,_0x471964,_0x54ee0f,_0x7b2172){const _0x40b0fd=_0x2d7b2e;let _0x43c803=null,_0x38ac3c=null;if(_0x12dfd5)_0x43c803=computeConnectionPointInfo(_0x1804fa,_0x144b42,_0x12dfd5[_0x40b0fd(0x193)][_0x40b0fd(0x145)],_0x12dfd5[_0x40b0fd(0x153)],_0x471964,_0x54ee0f);if(_0x159759)_0x38ac3c=computeConnectionPointInfo(_0x1804fa,_0x144b42,_0x159759['shape'][_0x40b0fd(0x145)],_0x159759[_0x40b0fd(0x153)],_0x471964,_0x54ee0f);if(!_0x43c803)_0x43c803=this[_0x40b0fd(0x146)](_0x1804fa,_0x144b42,_0xc40324[_0x40b0fd(0x145)],!![],_0x38ac3c,_0x7b2172===null||_0x7b2172===void 0x0?void 0x0:_0x7b2172[_0x40b0fd(0x185)],_0x471964,_0x54ee0f);if(!_0x38ac3c)_0x38ac3c=this['_resolveExistingOrFreeEndpoint'](_0x1804fa,_0x144b42,_0xc40324[_0x40b0fd(0x145)],![],_0x43c803,_0x7b2172===null||_0x7b2172===void 0x0?void 0x0:_0x7b2172['to'],_0x471964,_0x54ee0f);return{'startInfo':_0x43c803,'endInfo':_0x38ac3c};}[_0x2d7b2e(0x146)](_0x5eb03b,_0x572a8a,_0x393703,_0x53eb6d,_0x3f0699,_0x9831fb,_0x5cfaeb,_0x10549a){const _0x48b901=_0x2d7b2e;if(_0x9831fb){const _0x4c7dce=computeConnectionPointInfo(_0x5eb03b,_0x572a8a,_0x9831fb['shapeId'],_0x9831fb[_0x48b901(0x137)],_0x5cfaeb,_0x10549a);if(_0x4c7dce)return _0x4c7dce;}if(!_0x3f0699)return null;return computeFreeEndpointInfo(_0x5eb03b,_0x572a8a,_0x393703,_0x53eb6d,_0x3f0699,_0x5cfaeb,_0x10549a);}};_univerjs_sheets_facade['FWorksheet'][_0x2d7b2e(0x124)](FWorksheetShapeMixin),exports[_0x2d7b2e(0xfe)]=FConnectorShape,exports[_0x2d7b2e(0x144)]=FShape;
|
|
1
|
+
const _0x5442c3=_0x1248;(function(_0x3a5918,_0x5cdec4){const _0x1d52b9=_0x1248,_0x1fa75c=_0x3a5918();while(!![]){try{const _0xb9d1f5=parseInt(_0x1d52b9(0xa5))/0x1+-parseInt(_0x1d52b9(0x136))/0x2*(-parseInt(_0x1d52b9(0xed))/0x3)+-parseInt(_0x1d52b9(0x106))/0x4+-parseInt(_0x1d52b9(0x122))/0x5*(-parseInt(_0x1d52b9(0x102))/0x6)+-parseInt(_0x1d52b9(0xd8))/0x7*(parseInt(_0x1d52b9(0x109))/0x8)+-parseInt(_0x1d52b9(0xff))/0x9+-parseInt(_0x1d52b9(0xc2))/0xa*(-parseInt(_0x1d52b9(0x141))/0xb);if(_0xb9d1f5===_0x5cdec4)break;else _0x1fa75c['push'](_0x1fa75c['shift']());}catch(_0x4132dc){_0x1fa75c['push'](_0x1fa75c['shift']());}}}(_0x241b,0xd3447),Object[_0x5442c3(0xc0)](exports,Symbol['toStringTag'],{'value':_0x5442c3(0xf2)}));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[_0x5442c3(0xb8)]{get['ShapeTypeEnum'](){return _univerjs_pro_engine_shape['ShapeTypeEnum'];}get[_0x5442c3(0x12f)](){const _0x3511ae=_0x5442c3;return _univerjs_pro_engine_shape[_0x3511ae(0x12f)];}get[_0x5442c3(0xb0)](){const _0x517074=_0x5442c3;return _univerjs_pro_engine_shape[_0x517074(0xb0)];}get[_0x5442c3(0x105)](){const _0xaf2175=_0x5442c3;return _univerjs_pro_engine_shape[_0xaf2175(0x105)];}get[_0x5442c3(0xd2)](){const _0x1a4181=_0x5442c3;return _univerjs_pro_engine_shape[_0x1a4181(0xd2)];}get['ShapeLineCapEnum'](){const _0x52498b=_0x5442c3;return _univerjs_pro_engine_shape[_0x52498b(0xc5)];}get[_0x5442c3(0x12a)](){const _0x284e07=_0x5442c3;return _univerjs_pro_engine_shape[_0x284e07(0x12a)];}get['ShapeArrowTypeEnum'](){const _0x56eb3d=_0x5442c3;return _univerjs_pro_engine_shape[_0x56eb3d(0xc3)];}get[_0x5442c3(0xe7)](){const _0x11b1a1=_0x5442c3;return _univerjs_pro_engine_shape[_0x11b1a1(0xe7)];}};function _0x241b(){const _0x293a54=['startArrow','updateContext','object','ShapeGradientTypeEnum','from','lineJoinType','FConnectorShape','RemoveSheetDrawingCommand','_resolveExistingOrFreeEndpoint','find','\x20and\x20subUnitId\x20','FEnum','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','convertPositionCellToSheetOverGrid','generateRandomId','getAdjustValueByName','executeCommand','shapeId','ang','defineProperty','color','6689270IkcKPd','ShapeArrowTypeEnum','keys','ShapeLineCapEnum','point','computeConnectorRouteLayout','relation','routeConnectorLineShape','fillType','IDrawingManagerService','SheetsShapeService','getShapeModel','toPrimitive','GradientFill','isConnectorShape','extend','ShapeLineDashEnum','getSheetId','_injector','ISheetDrawingService','isLineShape','setEndArrowSize','1558277TBUHUP','stroke','setStrokeLineDashType','Skeleton\x20for\x20unitId\x20','function','\x20not\x20found','NoFill','setStrokeOpacity','default','setWidth','size','_preloadShapeProperties','setEndArrowType','setNoneFill','setStrokeColor','ShapeArrowSizeEnum','type','setStrokeLineCapType','cxnIndex','top','abs','144wxZeMt','fill','build','setPosition','setStrokeWidth','Module','Shape\x20type\x20is\x20required.\x20Please\x20call\x20setShapeType()\x20before\x20build().','symbol','setShapeGradientFill','getConnectionSiteList','unitId','get','UpdateConnectorRelationCommand','DrawingTypeEnum','getConnectorLinePoints','cos','DRAWING_SHAPE','_commandService','8707167qSeoPn','getShapeType','SetShapeDrawingDataCommand','1576194uhiLCo','getPosition','localToWorld','ShapeLineTypeEnum','2176568JtulFc','getEndConnectInfo','getSize','56SsjIBZ','gradientStops','shape','getWorkbook','removeShape','getShapeRelation','flipX','lineType','drawingType','parse','Invalid\x20shape\x20type\x20for\x20connector.\x20Received\x20','SheetSkeletonService','worldRect','opacity','width','setShapeType','gradientType','lineStrokeType','drawId','setAbsolutePosition','height','transform','rotation','setHeight','getStartConnectInfo','10cJkXnL','left','getShapeData','DEFAULT_SHAPE_HEIGHT','newShape','newConnector','endArrow','string','ShapeLineJoinEnum','adjustValues','getBasicShapeRotateBound',',\x20but\x20expected\x20a\x20connector\x20shape\x20type.','index','ShapeFillEnum','setStartArrowSize','subUnitId','getConnectionSites','ConnectorCoordinateTransform','FWorksheet','getAdjustNames','3588ywCnvZ','iterator','prototype','sin','getDrawingByParam','shapeType','connectionSiteIndex','push','ensureSkeleton','shapeData','getAdjustPoints','33kCyXrg','_resolveEndpoints','1316942FyVoPA','connectShapes','gradientAngle','DEFAULT_SHAPE_WIDTH','insertShape','getUnitId','setStrokeLineType','length'];_0x241b=function(){return _0x293a54;};return _0x241b();}_univerjs_core_facade['FEnum'][_0x5442c3(0xd1)](FSheetsShapeEnumMixin);function _typeof(_0x2953e1){'@babel/helpers - typeof';const _0x66df18=_0x5442c3;return _typeof=_0x66df18(0xdc)==typeof Symbol&&'symbol'==typeof Symbol[_0x66df18(0x137)]?function(_0x3b02d4){return typeof _0x3b02d4;}:function(_0x42e88b){const _0x5881c7=_0x66df18;return _0x42e88b&&_0x5881c7(0xdc)==typeof Symbol&&_0x42e88b['constructor']===Symbol&&_0x42e88b!==Symbol[_0x5881c7(0x138)]?_0x5881c7(0xf4):typeof _0x42e88b;},_typeof(_0x2953e1);}function toPrimitive(_0x52d0e8,_0x2f0c3f){const _0x4056dc=_0x5442c3;if(_0x4056dc(0xaf)!=_typeof(_0x52d0e8)||!_0x52d0e8)return _0x52d0e8;var _0x1964e9=_0x52d0e8[Symbol[_0x4056dc(0xce)]];if(void 0x0!==_0x1964e9){var _0x126a80=_0x1964e9['call'](_0x52d0e8,_0x2f0c3f||_0x4056dc(0xe0));if(_0x4056dc(0xaf)!=_typeof(_0x126a80))return _0x126a80;throw new TypeError(_0x4056dc(0xb9));}return(_0x4056dc(0x129)===_0x2f0c3f?String:Number)(_0x52d0e8);}function toPropertyKey(_0x8c7a2c){const _0x4e5901=_0x5442c3;var _0x3d89cb=toPrimitive(_0x8c7a2c,_0x4e5901(0x129));return _0x4e5901(0xf4)==_typeof(_0x3d89cb)?_0x3d89cb:_0x3d89cb+'';}function _defineProperty(_0x374609,_0x4ad8f3,_0xc9b810){const _0x69ccc5=_0x5442c3;return(_0x4ad8f3=toPropertyKey(_0x4ad8f3))in _0x374609?Object[_0x69ccc5(0xc0)](_0x374609,_0x4ad8f3,{'value':_0xc9b810,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x374609[_0x4ad8f3]=_0xc9b810,_0x374609;}var FShape=class{constructor(_0x4fa148,_0x1031dc,_0x11c36e,_0x278a89){const _0x106085=_0x5442c3;_defineProperty(this,_0x106085(0xf7),void 0x0),_defineProperty(this,_0x106085(0x131),void 0x0),_defineProperty(this,_0x106085(0x11b),void 0x0),_defineProperty(this,'x',0x0),_defineProperty(this,'y',0x0),_defineProperty(this,_0x106085(0x117),_univerjs_pro_sheets_shape['DEFAULT_SHAPE_WIDTH']),_defineProperty(this,'height',_univerjs_pro_sheets_shape[_0x106085(0x125)]),_defineProperty(this,'shapeType',void 0x0),_defineProperty(this,_0x106085(0x13f),{}),_defineProperty(this,_0x106085(0xd4),void 0x0),this[_0x106085(0xf7)]=_0x4fa148,this[_0x106085(0x131)]=_0x1031dc,this[_0x106085(0x11b)]=_0x11c36e||(0x0,_univerjs_core[_0x106085(0xbb)])(),this[_0x106085(0xd4)]=_0x278a89;}[_0x5442c3(0xf0)](_0x399ff7,_0x48db75,_0x5ec902,_0x514b5d){const _0x31c3ba=_0x5442c3,_0x2e89ee=this[_0x31c3ba(0xd4)][_0x31c3ba(0xf8)](_univerjs_sheets[_0x31c3ba(0x114)])[_0x31c3ba(0x13e)](this['unitId'],this[_0x31c3ba(0x131)]);if(!_0x2e89ee)throw new Error(_0x31c3ba(0xdb)+this[_0x31c3ba(0xf7)]+_0x31c3ba(0xb7)+this[_0x31c3ba(0x131)]+_0x31c3ba(0xdd));const {transform:_0x299f71}=(0x0,_univerjs_sheets[_0x31c3ba(0xba)])(this['unitId'],this['subUnitId'],{'row':_0x399ff7,'column':_0x48db75,'rowOffset':_0x5ec902,'columnOffset':_0x514b5d},0x1,0x1,_0x2e89ee);return this['x']=_0x299f71['left'],this['y']=_0x299f71[_0x31c3ba(0xeb)],this;}[_0x5442c3(0x11c)](_0x185812,_0x1b8831){return this['x']=_0x185812,this['y']=_0x1b8831,this;}[_0x5442c3(0x118)](_0x5a56ff){const _0x57fca2=_0x5442c3;return this[_0x57fca2(0x13b)]=_0x5a56ff,this;}['setShapeSolidFill'](_0x2a97cc,_0x46bd07){const _0x2363c7=_0x5442c3;if(!this[_0x2363c7(0x13f)][_0x2363c7(0xee)])this[_0x2363c7(0x13f)][_0x2363c7(0xee)]={};this[_0x2363c7(0x13f)][_0x2363c7(0xee)][_0x2363c7(0xca)]=_univerjs_pro_engine_shape[_0x2363c7(0x12f)]['SolidFill'];if(_0x2a97cc!==void 0x0)this['shapeData'][_0x2363c7(0xee)]['color']=_0x2a97cc;if(_0x46bd07!==void 0x0)this[_0x2363c7(0x13f)]['fill'][_0x2363c7(0x116)]=_0x46bd07;return this;}[_0x5442c3(0xf5)](_0x9298d4,_0x3314b3,_0x36242d){const _0xee3250=_0x5442c3;if(_0x3314b3===void 0x0||_0x3314b3['length']===0x0)throw new Error('colorStops\x20is\x20required\x20and\x20should\x20contain\x20at\x20least\x20one\x20color\x20stop.');if(!this[_0xee3250(0x13f)][_0xee3250(0xee)])this[_0xee3250(0x13f)][_0xee3250(0xee)]={};this['shapeData'][_0xee3250(0xee)][_0xee3250(0x10a)]=_0x3314b3,this['shapeData']['fill'][_0xee3250(0xca)]=_univerjs_pro_engine_shape[_0xee3250(0x12f)][_0xee3250(0xcf)],this[_0xee3250(0x13f)][_0xee3250(0xee)][_0xee3250(0x119)]=_0x9298d4;if(_0x36242d!==void 0x0)this[_0xee3250(0x13f)]['fill'][_0xee3250(0xa7)]=_0x36242d;return this;}[_0x5442c3(0xe5)](){const _0xb63866=_0x5442c3;return this['shapeData'][_0xb63866(0xee)]={'fillType':_univerjs_pro_engine_shape['ShapeFillEnum'][_0xb63866(0xde)]},this;}[_0x5442c3(0xe6)](_0x5c1429){const _0x39b56e=_0x5442c3;if(!this['shapeData'][_0x39b56e(0xd9)])this[_0x39b56e(0x13f)][_0x39b56e(0xd9)]={};return this[_0x39b56e(0x13f)][_0x39b56e(0xd9)][_0x39b56e(0xc1)]=_0x5c1429,this;}[_0x5442c3(0xf1)](_0x3d505e){const _0x47b846=_0x5442c3;if(!this[_0x47b846(0x13f)][_0x47b846(0xd9)])this[_0x47b846(0x13f)][_0x47b846(0xd9)]={};return this[_0x47b846(0x13f)][_0x47b846(0xd9)][_0x47b846(0x117)]=_0x3d505e,this;}[_0x5442c3(0xda)](_0x1dcb0a){const _0x5e8092=_0x5442c3;if(!this[_0x5e8092(0x13f)][_0x5e8092(0xd9)])this[_0x5e8092(0x13f)]['stroke']={};return this[_0x5e8092(0x13f)][_0x5e8092(0xd9)]['dashType']=_0x1dcb0a,this;}['setStrokeLineJoinType'](_0x287792){const _0x4a22ec=_0x5442c3;if(!this['shapeData'][_0x4a22ec(0xd9)])this[_0x4a22ec(0x13f)][_0x4a22ec(0xd9)]={};return this[_0x4a22ec(0x13f)][_0x4a22ec(0xd9)][_0x4a22ec(0xb2)]=_0x287792,this;}[_0x5442c3(0xe9)](_0x1de5c1){const _0x1a7f62=_0x5442c3;if(!this['shapeData']['stroke'])this[_0x1a7f62(0x13f)][_0x1a7f62(0xd9)]={};return this['shapeData'][_0x1a7f62(0xd9)]['capType']=_0x1de5c1,this;}[_0x5442c3(0xdf)](_0x4df5d8){const _0x42e9b1=_0x5442c3;if(!this[_0x42e9b1(0x13f)]['stroke'])this[_0x42e9b1(0x13f)]['stroke']={};return this[_0x42e9b1(0x13f)]['stroke']['opacity']=_0x4df5d8,this;}[_0x5442c3(0xab)](_0x445394){const _0x234b8a=_0x5442c3;if(!this[_0x234b8a(0x13f)]['stroke'])this[_0x234b8a(0x13f)][_0x234b8a(0xd9)]={};return this[_0x234b8a(0x13f)][_0x234b8a(0xd9)][_0x234b8a(0x11a)]=_0x445394,this;}[_0x5442c3(0xe1)](_0x1b7a2c){const _0x4b6ec2=_0x5442c3;return this[_0x4b6ec2(0x117)]=_0x1b7a2c,this;}[_0x5442c3(0x120)](_0x805436){const _0x29b537=_0x5442c3;return this[_0x29b537(0x11d)]=_0x805436,this;}[_0x5442c3(0xd6)](){const _0x125ba5=_0x5442c3,_0x13f90e=this[_0x125ba5(0xd4)]['get'](_univerjs_pro_sheets_shape[_0x125ba5(0xcc)])['getShapeModel'](this[_0x125ba5(0xf7)],this[_0x125ba5(0x131)],this[_0x125ba5(0x11b)]);if(_0x13f90e)return(0x0,_univerjs_pro_engine_shape[_0x125ba5(0xd0)])(_0x13f90e[_0x125ba5(0x100)]());if(this['shapeType'])return(0x0,_univerjs_pro_engine_shape[_0x125ba5(0xd0)])(this[_0x125ba5(0x13b)]);return![];}[_0x5442c3(0x132)](){const _0x49da3e=_0x5442c3,_0x13da92=this[_0x49da3e(0xd4)]['get'](_univerjs_pro_sheets_shape['SheetsShapeService'])[_0x49da3e(0xcd)](this['unitId'],this[_0x49da3e(0x131)],this[_0x49da3e(0x11b)]);if(!_0x13da92)return[];const _0x201acf=this[_0x49da3e(0xd4)]['get'](_univerjs_drawing[_0x49da3e(0xcb)])[_0x49da3e(0x13a)]({'unitId':this['unitId'],'subUnitId':this[_0x49da3e(0x131)],'drawingId':this[_0x49da3e(0x11b)]});if(!(_0x201acf===null||_0x201acf===void 0x0?void 0x0:_0x201acf[_0x49da3e(0x11e)]))return[];const {width:width=0x0,height:height=0x0}=_0x201acf[_0x49da3e(0x11e)];return _0x13da92[_0x49da3e(0xae)]({'width':width,'height':height}),_0x13da92[_0x49da3e(0xf6)]();}[_0x5442c3(0x140)](){const _0x13daac=_0x5442c3,_0x227789=this[_0x13daac(0xd4)][_0x13daac(0xf8)](_univerjs_pro_sheets_shape[_0x13daac(0xcc)])['getShapeModel'](this[_0x13daac(0xf7)],this[_0x13daac(0x131)],this[_0x13daac(0x11b)]);if(!_0x227789)return[];const _0x2d7b20=this[_0x13daac(0xd4)][_0x13daac(0xf8)](_univerjs_drawing['IDrawingManagerService'])[_0x13daac(0x13a)]({'unitId':this[_0x13daac(0xf7)],'subUnitId':this[_0x13daac(0x131)],'drawingId':this[_0x13daac(0x11b)]});if(!(_0x2d7b20===null||_0x2d7b20===void 0x0?void 0x0:_0x2d7b20[_0x13daac(0x11e)]))return[];const {width:width=0x0,height:height=0x0}=_0x2d7b20[_0x13daac(0x11e)];return _0x227789[_0x13daac(0xae)]({'width':width,'height':height}),_0x227789['getDrawingPoints']();}[_0x5442c3(0xfb)](){const _0x3339db=_0x5442c3,_0x227451=this[_0x3339db(0xd4)][_0x3339db(0xf8)](_univerjs_pro_sheets_shape['SheetsShapeService'])[_0x3339db(0xcd)](this[_0x3339db(0xf7)],this[_0x3339db(0x131)],this[_0x3339db(0x11b)]);if(!_0x227451)return[];if(!(0x0,_univerjs_pro_engine_shape[_0x3339db(0xd0)])(_0x227451[_0x3339db(0x100)]()))return[];const _0x3768f3=this['_injector'][_0x3339db(0xf8)](_univerjs_drawing['IDrawingManagerService'])[_0x3339db(0x13a)]({'unitId':this[_0x3339db(0xf7)],'subUnitId':this[_0x3339db(0x131)],'drawingId':this[_0x3339db(0x11b)]});if(!(_0x3768f3===null||_0x3768f3===void 0x0?void 0x0:_0x3768f3[_0x3339db(0x11e)]))return[];const {width:width=0x0,height:height=0x0}=_0x3768f3[_0x3339db(0x11e)];return _0x227451[_0x3339db(0xae)]({'width':width,'height':height}),_0x227451[_0x3339db(0xfb)]();}[_0x5442c3(0x121)](){const _0x355ce9=_0x5442c3;var _0x48a617;const _0x2da111=this[_0x355ce9(0xd4)][_0x355ce9(0xf8)](_univerjs_pro_sheets_shape[_0x355ce9(0xcc)])[_0x355ce9(0xcd)](this[_0x355ce9(0xf7)],this[_0x355ce9(0x131)],this[_0x355ce9(0x11b)]);if(!_0x2da111)return null;return(_0x48a617=_0x2da111['getStartConnectInfo']())!==null&&_0x48a617!==void 0x0?_0x48a617:null;}[_0x5442c3(0x107)](){const _0x54a13f=_0x5442c3;var _0x58ec3b;const _0x127668=this[_0x54a13f(0xd4)][_0x54a13f(0xf8)](_univerjs_pro_sheets_shape[_0x54a13f(0xcc)])[_0x54a13f(0xcd)](this['unitId'],this[_0x54a13f(0x131)],this['drawId']);if(!_0x127668)return null;return(_0x58ec3b=_0x127668['getEndConnectInfo']())!==null&&_0x58ec3b!==void 0x0?_0x58ec3b:null;}['build'](){const _0x4fd5fc=_0x5442c3;var _0x585427,_0x23184c;if(!this[_0x4fd5fc(0x13b)])throw new Error(_0x4fd5fc(0xf3));if(this['x']===0x0||this['y']===0x0){const _0x3c27a7=this['_injector'][_0x4fd5fc(0xf8)](_univerjs_sheets[_0x4fd5fc(0x114)])[_0x4fd5fc(0x13e)](this['unitId'],this[_0x4fd5fc(0x131)]);if(!_0x3c27a7)throw new Error('Skeleton\x20for\x20unitId\x20'+this['unitId']+_0x4fd5fc(0xb7)+this['subUnitId']+_0x4fd5fc(0xdd));const {transform:_0x727bbc}=(0x0,_univerjs_sheets[_0x4fd5fc(0xba)])(this['unitId'],this[_0x4fd5fc(0x131)],{'row':0x1,'column':0x1,'rowOffset':0x0,'columnOffset':0x0},0x1,0x1,_0x3c27a7);this['x']=this['x']>0x0?this['x']:_0x727bbc['left'],this['y']=this['y']>0x0?this['y']:_0x727bbc['top'];}return this[_0x4fd5fc(0x117)]=(_0x585427=this['width'])!==null&&_0x585427!==void 0x0?_0x585427:_univerjs_pro_sheets_shape[_0x4fd5fc(0xa8)],this[_0x4fd5fc(0x11d)]=(_0x23184c=this[_0x4fd5fc(0x11d)])!==null&&_0x23184c!==void 0x0?_0x23184c:_univerjs_pro_sheets_shape[_0x4fd5fc(0x125)],{'unitId':this[_0x4fd5fc(0xf7)],'subUnitId':this[_0x4fd5fc(0x131)],'shapeId':this['drawId'],'shapeType':this['shapeType'],'shapeData':Object[_0x4fd5fc(0xc4)](this[_0x4fd5fc(0x13f)])['length']>0x0?this[_0x4fd5fc(0x13f)]:void 0x0,'x':this['x'],'y':this['y'],'width':this[_0x4fd5fc(0x117)],'height':this[_0x4fd5fc(0x11d)]};}['getShapeId'](){return this['drawId'];}[_0x5442c3(0x100)](){const _0x1a2ef4=_0x5442c3;return this[_0x1a2ef4(0x13b)];}['getShapeData'](){return this['shapeData'];}[_0x5442c3(0x103)](){return{'x':this['x'],'y':this['y']};}[_0x5442c3(0x108)](){const _0xe5d32e=_0x5442c3;return{'width':this[_0xe5d32e(0x117)],'height':this[_0xe5d32e(0x11d)]};}},FConnectorShape=class extends FShape{constructor(_0x1f757c,_0x4a3531,_0x44c2ff,_0x17b105){const _0x2cc282=_0x5442c3;super(_0x1f757c,_0x4a3531,_0x44c2ff,_0x17b105),_defineProperty(this,_0x2cc282(0x13f),{});}[_0x5442c3(0x118)](_0x5947aa){const _0x48f336=_0x5442c3;if(!(0x0,_univerjs_pro_engine_shape[_0x48f336(0xd0)])(_0x5947aa))throw new Error(_0x48f336(0x113)+_0x5947aa+_0x48f336(0x12d));return super[_0x48f336(0x118)](_0x5947aa),this;}['setStartArrowType'](_0x5e8245){const _0x50a7c8=_0x5442c3;var _0x5763ad,_0x2d19e8;if(!((_0x5763ad=this[_0x50a7c8(0x13f)])===null||_0x5763ad===void 0x0?void 0x0:_0x5763ad['ln']))this[_0x50a7c8(0x13f)]['ln']={};if(!((_0x2d19e8=this[_0x50a7c8(0x13f)])===null||_0x2d19e8===void 0x0||(_0x2d19e8=_0x2d19e8['ln'])===null||_0x2d19e8===void 0x0?void 0x0:_0x2d19e8['startArrow']))this[_0x50a7c8(0x13f)]['ln'][_0x50a7c8(0xad)]={};return this[_0x50a7c8(0x13f)]['ln'][_0x50a7c8(0xad)]['type']=_0x5e8245,this;}[_0x5442c3(0xe4)](_0x34ceb2){const _0x1963b2=_0x5442c3;var _0x1f29dd,_0x3052bf;if(!((_0x1f29dd=this[_0x1963b2(0x13f)])===null||_0x1f29dd===void 0x0?void 0x0:_0x1f29dd['ln']))this['shapeData']['ln']={};if(!((_0x3052bf=this[_0x1963b2(0x13f)])===null||_0x3052bf===void 0x0||(_0x3052bf=_0x3052bf['ln'])===null||_0x3052bf===void 0x0?void 0x0:_0x3052bf['endArrow']))this['shapeData']['ln'][_0x1963b2(0x128)]={};return this[_0x1963b2(0x13f)]['ln'][_0x1963b2(0x128)][_0x1963b2(0xe8)]=_0x34ceb2,this;}[_0x5442c3(0x130)](_0x1cdf06){const _0x2a0551=_0x5442c3;var _0x240e1f,_0xdc5569;if(!((_0x240e1f=this['shapeData'])===null||_0x240e1f===void 0x0?void 0x0:_0x240e1f['ln']))this[_0x2a0551(0x13f)]['ln']={};if(!((_0xdc5569=this[_0x2a0551(0x13f)])===null||_0xdc5569===void 0x0||(_0xdc5569=_0xdc5569['ln'])===null||_0xdc5569===void 0x0?void 0x0:_0xdc5569['startArrow']))this[_0x2a0551(0x13f)]['ln'][_0x2a0551(0xad)]={};return this[_0x2a0551(0x13f)]['ln']['startArrow'][_0x2a0551(0xe2)]=_0x1cdf06,this;}[_0x5442c3(0xd7)](_0x4d0614){const _0x5ec4ec=_0x5442c3;var _0x3332e0,_0x117455;if(!((_0x3332e0=this[_0x5ec4ec(0x13f)])===null||_0x3332e0===void 0x0?void 0x0:_0x3332e0['ln']))this[_0x5ec4ec(0x13f)]['ln']={};if(!((_0x117455=this['shapeData'])===null||_0x117455===void 0x0||(_0x117455=_0x117455['ln'])===null||_0x117455===void 0x0?void 0x0:_0x117455[_0x5ec4ec(0x128)]))this[_0x5ec4ec(0x13f)]['ln'][_0x5ec4ec(0x128)]={};return this['shapeData']['ln']['endArrow'][_0x5ec4ec(0xe2)]=_0x4d0614,this;}[_0x5442c3(0xef)](){const _0x16c4bd=_0x5442c3;return super[_0x16c4bd(0xef)]();}[_0x5442c3(0x107)](){const _0x5b856a=_0x5442c3;var _0x488799;return((_0x488799=this[_0x5b856a(0x13f)])===null||_0x488799===void 0x0||(_0x488799=_0x488799[_0x5b856a(0xc8)])===null||_0x488799===void 0x0?void 0x0:_0x488799['to'])||null;}[_0x5442c3(0x121)](){const _0x2469ba=_0x5442c3;var _0x4b31e7;return((_0x4b31e7=this[_0x2469ba(0x13f)])===null||_0x4b31e7===void 0x0||(_0x4b31e7=_0x4b31e7['relation'])===null||_0x4b31e7===void 0x0?void 0x0:_0x4b31e7[_0x2469ba(0xb1)])||null;}};function computeConnectionPointInfo(_0x292534,_0x21effd,_0x793618,_0x36bf46,_0x5c0fe0,_0x2f09db){const _0x26c442=_0x5442c3,_0x1e48f8=_0x5c0fe0[_0x26c442(0xcd)](_0x292534,_0x21effd,_0x793618);if(!_0x1e48f8)return null;const _0x816967=_0x2f09db[_0x26c442(0x13a)]({'unitId':_0x292534,'subUnitId':_0x21effd,'drawingId':_0x793618});if(!(_0x816967===null||_0x816967===void 0x0?void 0x0:_0x816967[_0x26c442(0x11e)]))return null;const {left:left=0x0,top:top=0x0,width:width=0x0,height:height=0x0,flipX:flipX=![],flipY:flipY=![],angle:_0x18c731}=_0x816967[_0x26c442(0x11e)];_0x1e48f8['updateContext']({'width':width,'height':height});const _0x46c3da=_0x1e48f8[_0x26c442(0xf6)]()[_0x26c442(0xb6)](_0x3f2646=>_0x3f2646[_0x26c442(0x12e)]===_0x36bf46);if(!_0x46c3da)return null;let _0x3bf018=flipX?width-_0x46c3da['x']:_0x46c3da['x'],_0x5ad37d=flipY?height-_0x46c3da['y']:_0x46c3da['y'];if(_0x18c731&&_0x18c731!==0x0){const _0x1f7bd3=_0x18c731*Math['PI']/0xb4,_0x641cc8=Math[_0x26c442(0xfc)](_0x1f7bd3),_0x521518=Math[_0x26c442(0x139)](_0x1f7bd3),_0x10ab57=width/0x2,_0xdaa01f=height/0x2,_0xb5b163=_0x3bf018-_0x10ab57,_0xec9f90=_0x5ad37d-_0xdaa01f;_0x3bf018=_0x10ab57+_0xb5b163*_0x641cc8-_0xec9f90*_0x521518,_0x5ad37d=_0xdaa01f+_0xb5b163*_0x521518+_0xec9f90*_0x641cc8;}_0x3bf018+=left,_0x5ad37d+=top;let _0x2473b6=_0x46c3da[_0x26c442(0xbf)]/0xea60;if(flipX)_0x2473b6=0xb4-_0x2473b6;if(flipY)_0x2473b6=-_0x2473b6;_0x2473b6+=_0x18c731||0x0,_0x2473b6=(_0x2473b6%0x168+0x168)%0x168;const _0x559801=(0x0,_univerjs_pro_engine_shape[_0x26c442(0x12c)])({'left':left,'top':top,'width':width,'height':height},_0x18c731||0x0);return{'point':{'x':_0x3bf018,'y':_0x5ad37d},'angle':_0x2473b6,'bounds':_0x559801};}function calculateFreeEndpointAngle(_0x29648d,_0x543df5){const _0xcb9ee9=_0x5442c3,_0x59b6b7=_0x543df5['x']-_0x29648d['x'],_0x57f8d5=_0x543df5['y']-_0x29648d['y'];if(Math[_0xcb9ee9(0xec)](_0x59b6b7)>=Math[_0xcb9ee9(0xec)](_0x57f8d5))return _0x59b6b7>=0x0?0xb4:0x0;return _0x57f8d5>=0x0?0x10e:0x5a;}function _0x1248(_0x11ea8b,_0x4e7ba0){_0x11ea8b=_0x11ea8b-0xa5;const _0x241b51=_0x241b();let _0x124804=_0x241b51[_0x11ea8b];return _0x124804;}function computeFreeEndpointInfo(_0x314cb1,_0x33f93f,_0xbb9d4e,_0x40c9ec,_0x1499f3,_0x3ba23b,_0x15dbd0){const _0x1d078d=_0x5442c3,_0x4a7f55=_0x3ba23b['getShapeModel'](_0x314cb1,_0x33f93f,_0xbb9d4e);if(!_0x4a7f55)return null;const _0x32bbaa=_0x15dbd0[_0x1d078d(0x13a)]({'unitId':_0x314cb1,'subUnitId':_0x33f93f,'drawingId':_0xbb9d4e});if(!(_0x32bbaa===null||_0x32bbaa===void 0x0?void 0x0:_0x32bbaa[_0x1d078d(0x11e)]))return null;const {left:left=0x0,top:top=0x0,width:width=0x0,height:height=0x0,flipX:flipX=![],flipY:flipY=![]}=_0x32bbaa[_0x1d078d(0x11e)];_0x4a7f55[_0x1d078d(0xae)]({'width':width,'height':height});const _0x5a02dc=_0x4a7f55[_0x1d078d(0xfb)]();if(_0x5a02dc[_0x1d078d(0xac)]<0x2)return null;const _0x50ee95=_0x40c9ec?_0x5a02dc[0x0]:_0x5a02dc[_0x5a02dc[_0x1d078d(0xac)]-0x1],_0x3eba1e=new _univerjs_pro_engine_shape[(_0x1d078d(0x133))]({'left':left,'top':top,'width':width,'height':height,'flipX':flipX,'flipY':flipY})[_0x1d078d(0x104)](_0x50ee95);return{'point':_0x3eba1e,'angle':calculateFreeEndpointAngle(_0x1499f3[_0x1d078d(0xc6)],_0x3eba1e),'bounds':{'left':_0x3eba1e['x'],'top':_0x3eba1e['y'],'width':0x0,'height':0x0}};}var FWorksheetShapeMixin=class extends _univerjs_sheets_facade[_0x5442c3(0x134)]{async[_0x5442c3(0xa9)](_0x1b3ba1){const _0x28efb8=_0x5442c3,{unitId:_0x59e587,subUnitId:_0x3d2410,shapeId:_0x4e41ab,shapeType:_0x2b6980,shapeData:_0xbd1b35,x:_0x4e896d,y:_0x399f47,width:_0x1dd19e,height:_0x492657}=_0x1b3ba1;return this[_0x28efb8(0xfe)][_0x28efb8(0xbd)](_univerjs_pro_sheets_shape['InsertShapeCommand']['id'],{'unitId':_0x59e587,'subUnitId':_0x3d2410,'shapeId':_0x4e41ab,'shapeType':_0x2b6980,'shapeData':_0xbd1b35,'position':{'x':_0x4e896d,'y':_0x399f47},'width':_0x1dd19e,'height':_0x492657});}async['updateShape'](_0x220534){const _0x2b3c5d=_0x5442c3,{unitId:_0x5df1d3,subUnitId:_0x2dbb2c,shapeId:_0x3d9bae,shapeType:_0x15eb6e,shapeData:_0x11f358,x:_0x31f62a,y:_0x37f7db,width:_0x3f960c,height:_0x22b3cd}=_0x220534;return this[_0x2b3c5d(0xfe)]['executeCommand'](_univerjs_pro_sheets_shape[_0x2b3c5d(0x101)]['id'],{'unitId':_0x5df1d3,'subUnitId':_0x2dbb2c,'shapeId':_0x3d9bae,'shapeType':_0x15eb6e,'shapeData':_0x11f358,'position':{'x':_0x31f62a,'y':_0x37f7db},'width':_0x3f960c,'height':_0x22b3cd});}[_0x5442c3(0x126)](_0x125650){const _0x1ba368=_0x5442c3,_0x589ed6=this['getWorkbook']()[_0x1ba368(0xaa)](),_0x3328ba=this[_0x1ba368(0xd3)]();if(_0x125650){const _0x4c97ec=new FShape(_0x589ed6,_0x3328ba,_0x125650[_0x1ba368(0x11b)],this[_0x1ba368(0xd4)]);return this['_preloadShapeProperties'](_0x4c97ec,_0x589ed6,_0x3328ba,_0x125650[_0x1ba368(0x11b)]),_0x4c97ec;}return new FShape(_0x589ed6,_0x3328ba,(0x0,_univerjs_core[_0x1ba368(0xbb)])(),this[_0x1ba368(0xd4)]);}[_0x5442c3(0x127)](_0x280a91){const _0x14b906=_0x5442c3,_0x15babb=this[_0x14b906(0x10c)]()[_0x14b906(0xaa)](),_0x5bcce9=this['getSheetId']();if(_0x280a91){const _0x4f3363=new FConnectorShape(_0x15babb,_0x5bcce9,_0x280a91[_0x14b906(0x11b)],this[_0x14b906(0xd4)]);return this[_0x14b906(0xe3)](_0x4f3363,_0x15babb,_0x5bcce9,_0x280a91[_0x14b906(0x11b)]),_0x4f3363;}return new FConnectorShape(_0x15babb,_0x5bcce9,(0x0,_univerjs_core[_0x14b906(0xbb)])(),this[_0x14b906(0xd4)]);}['getShapes'](){const _0x1aa2cf=_0x5442c3,_0x428dc9=this[_0x1aa2cf(0xd4)][_0x1aa2cf(0xf8)](_univerjs_sheets_drawing[_0x1aa2cf(0xd5)]),_0x247e4a=this[_0x1aa2cf(0x10c)]()[_0x1aa2cf(0xaa)](),_0x1d760c=this[_0x1aa2cf(0xd3)](),_0xc60a2b=_0x428dc9['getDrawingData'](_0x247e4a,_0x1d760c);if(!_0xc60a2b)return[];const _0x498a91=[];for(const [_0x5cdbdc,_0x539c2c]of Object['entries'](_0xc60a2b))if(_0x539c2c&&_0x539c2c[_0x1aa2cf(0x111)]===_univerjs_core[_0x1aa2cf(0xfa)][_0x1aa2cf(0xfd)]){const _0x3a9607=new FShape(_0x247e4a,_0x1d760c,_0x5cdbdc,this[_0x1aa2cf(0xd4)]);this[_0x1aa2cf(0xe3)](_0x3a9607,_0x247e4a,_0x1d760c,_0x5cdbdc),_0x498a91[_0x1aa2cf(0x13d)](_0x3a9607);}return _0x498a91;}[_0x5442c3(0x10d)](_0x4245e7){const _0x267aa9=_0x5442c3,{unitId:_0x256d26,subUnitId:_0x4e5937,drawId:_0x4aff82}=_0x4245e7;return this[_0x267aa9(0xfe)][_0x267aa9(0xbd)](_univerjs_sheets_drawing[_0x267aa9(0xb4)]['id'],{'unitId':_0x256d26,'drawings':[{'unitId':_0x256d26,'subUnitId':_0x4e5937,'drawingId':_0x4aff82,'drawingType':_univerjs_core['DrawingTypeEnum'][_0x267aa9(0xfd)]}]});}async[_0x5442c3(0xa6)](_0x274dea){const _0x2cbdca=_0x5442c3,{connector:_0x1aabcd,startTarget:_0x51fd0d,endTarget:_0x4c6a55}=_0x274dea;if(!_0x51fd0d&&!_0x4c6a55)return![];const _0x35a219=this[_0x2cbdca(0x10c)]()[_0x2cbdca(0xaa)](),_0x325724=this[_0x2cbdca(0xd3)](),_0x5d7836=this[_0x2cbdca(0xd4)][_0x2cbdca(0xf8)](_univerjs_pro_sheets_shape[_0x2cbdca(0xcc)]),_0x563bba=this['_injector'][_0x2cbdca(0xf8)](_univerjs_drawing[_0x2cbdca(0xcb)]),_0x1f42a6=_0x5d7836[_0x2cbdca(0xcd)](_0x35a219,_0x325724,_0x1aabcd[_0x2cbdca(0x11b)]);if(!_0x1f42a6)return![];const _0x6dd330=_0x1f42a6['getShapeType'](),_0xd374d5=_0x1f42a6[_0x2cbdca(0x10e)](),_0x4c23a2={};for(const _0x4038ab of _0x1f42a6[_0x2cbdca(0x135)]()){const _0x20220a=_0x1f42a6[_0x2cbdca(0xbc)](_0x4038ab);if(_0x20220a!==void 0x0)_0x4c23a2[_0x4038ab]=_0x20220a;}const {startInfo:_0x271fd0,endInfo:_0x2df382}=this[_0x2cbdca(0x142)](_0x35a219,_0x325724,_0x1aabcd,_0x1f42a6,_0x51fd0d,_0x4c6a55,_0x5d7836,_0x563bba,_0xd374d5);if(!_0x271fd0||!_0x2df382)return![];const _0x528d32=(0x0,_univerjs_pro_engine_shape[_0x2cbdca(0xc7)])((0x0,_univerjs_pro_engine_shape[_0x2cbdca(0xc9)])(_0x271fd0,_0x2df382,_0x6dd330),_0x6dd330),_0xd329d0={};if(_0x51fd0d)_0xd329d0[_0x2cbdca(0xb1)]={'shapeId':_0x51fd0d[_0x2cbdca(0x10b)]['drawId'],'cxnIndex':_0x51fd0d[_0x2cbdca(0x13c)]};else{if(_0xd374d5===null||_0xd374d5===void 0x0?void 0x0:_0xd374d5[_0x2cbdca(0xb1)])_0xd329d0[_0x2cbdca(0xb1)]=_0xd374d5[_0x2cbdca(0xb1)];}if(_0x4c6a55)_0xd329d0['to']={'shapeId':_0x4c6a55[_0x2cbdca(0x10b)]['drawId'],'cxnIndex':_0x4c6a55[_0x2cbdca(0x13c)]};else{if(_0xd374d5===null||_0xd374d5===void 0x0?void 0x0:_0xd374d5['to'])_0xd329d0['to']=_0xd374d5['to'];}return this['_commandService'][_0x2cbdca(0xbd)](_univerjs_pro_sheets_shape[_0x2cbdca(0xf9)]['id'],{'unitId':_0x35a219,'subUnitId':_0x325724,'connectorShapeId':_0x1aabcd[_0x2cbdca(0x11b)],'width':_0x528d32[_0x2cbdca(0x115)][_0x2cbdca(0x117)],'height':_0x528d32['worldRect'][_0x2cbdca(0x11d)],'left':_0x528d32[_0x2cbdca(0x115)][_0x2cbdca(0x123)],'top':_0x528d32[_0x2cbdca(0x115)][_0x2cbdca(0xeb)],'flipX':_0x528d32[_0x2cbdca(0x115)][_0x2cbdca(0x10f)]||![],'flipY':_0x528d32[_0x2cbdca(0x115)]['flipY']||![],'oldAdjustValues':_0x4c23a2,'newAdjustValues':_0x528d32[_0x2cbdca(0x12b)],'newLineType':_0x528d32[_0x2cbdca(0x110)],'oldLineType':_0x6dd330,'rotation':_0x528d32[_0x2cbdca(0x11f)],'oldRelation':_0xd374d5,'newRelation':_0xd329d0});}[_0x5442c3(0xe3)](_0x242ea8,_0x123d02,_0x33cbc7,_0x5be4d5){const _0x122a68=_0x5442c3,_0x1a75db=this[_0x122a68(0xd4)][_0x122a68(0xf8)](_univerjs_drawing[_0x122a68(0xcb)])[_0x122a68(0x13a)]({'unitId':_0x123d02,'subUnitId':_0x33cbc7,'drawingId':_0x5be4d5});if(_0x1a75db===null||_0x1a75db===void 0x0?void 0x0:_0x1a75db[_0x122a68(0x11e)]){var _0x586bc9,_0x4d4bd5,_0x470fcb,_0x317cdd;_0x242ea8['x']=(_0x586bc9=_0x1a75db[_0x122a68(0x11e)][_0x122a68(0x123)])!==null&&_0x586bc9!==void 0x0?_0x586bc9:0x0,_0x242ea8['y']=(_0x4d4bd5=_0x1a75db[_0x122a68(0x11e)][_0x122a68(0xeb)])!==null&&_0x4d4bd5!==void 0x0?_0x4d4bd5:0x0,_0x242ea8[_0x122a68(0x117)]=(_0x470fcb=_0x1a75db[_0x122a68(0x11e)][_0x122a68(0x117)])!==null&&_0x470fcb!==void 0x0?_0x470fcb:_0x242ea8[_0x122a68(0x117)],_0x242ea8[_0x122a68(0x11d)]=(_0x317cdd=_0x1a75db['transform'][_0x122a68(0x11d)])!==null&&_0x317cdd!==void 0x0?_0x317cdd:_0x242ea8['height'];}const _0x561c89=this['_injector']['get'](_univerjs_pro_sheets_shape[_0x122a68(0xcc)])['getShapeModel'](_0x123d02,_0x33cbc7,_0x5be4d5);if(_0x561c89){_0x242ea8['shapeType']=_0x561c89['getShapeType']();const _0x4f46b5=_0x561c89[_0x122a68(0x124)]();if(_0x4f46b5)_0x242ea8[_0x122a68(0x13f)]=JSON[_0x122a68(0x112)](JSON['stringify'](_0x4f46b5));}}[_0x5442c3(0x142)](_0x291050,_0x5dcb77,_0x2b4dc0,_0x8aafb2,_0x867326,_0x11b0f0,_0x326d06,_0x2008ca,_0x37b4ea){const _0x537f64=_0x5442c3;let _0xe514b8=null,_0x5c6303=null;if(_0x867326)_0xe514b8=computeConnectionPointInfo(_0x291050,_0x5dcb77,_0x867326['shape'][_0x537f64(0x11b)],_0x867326['connectionSiteIndex'],_0x326d06,_0x2008ca);if(_0x11b0f0)_0x5c6303=computeConnectionPointInfo(_0x291050,_0x5dcb77,_0x11b0f0[_0x537f64(0x10b)][_0x537f64(0x11b)],_0x11b0f0[_0x537f64(0x13c)],_0x326d06,_0x2008ca);if(!_0xe514b8)_0xe514b8=this[_0x537f64(0xb5)](_0x291050,_0x5dcb77,_0x2b4dc0[_0x537f64(0x11b)],!![],_0x5c6303,_0x37b4ea===null||_0x37b4ea===void 0x0?void 0x0:_0x37b4ea[_0x537f64(0xb1)],_0x326d06,_0x2008ca);if(!_0x5c6303)_0x5c6303=this['_resolveExistingOrFreeEndpoint'](_0x291050,_0x5dcb77,_0x2b4dc0[_0x537f64(0x11b)],![],_0xe514b8,_0x37b4ea===null||_0x37b4ea===void 0x0?void 0x0:_0x37b4ea['to'],_0x326d06,_0x2008ca);return{'startInfo':_0xe514b8,'endInfo':_0x5c6303};}['_resolveExistingOrFreeEndpoint'](_0x2a896f,_0x38e0f9,_0x4186ed,_0x1435de,_0x38626c,_0x4d7835,_0x5b4a78,_0x3aea29){const _0x443fd6=_0x5442c3;if(_0x4d7835){const _0x3ec722=computeConnectionPointInfo(_0x2a896f,_0x38e0f9,_0x4d7835[_0x443fd6(0xbe)],_0x4d7835[_0x443fd6(0xea)],_0x5b4a78,_0x3aea29);if(_0x3ec722)return _0x3ec722;}if(!_0x38626c)return null;return computeFreeEndpointInfo(_0x2a896f,_0x38e0f9,_0x4186ed,_0x1435de,_0x38626c,_0x5b4a78,_0x3aea29);}};_univerjs_sheets_facade[_0x5442c3(0x134)][_0x5442c3(0xd1)](FWorksheetShapeMixin),exports[_0x5442c3(0xb3)]=FConnectorShape,exports['FShape']=FShape;
|
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x3add6b=_0x515c;function _0x515c(_0x1783e1,_0x30bb4f){_0x1783e1=_0x1783e1-0x14d;const _0x1fbb04=_0x1fbb();let _0x515c56=_0x1fbb04[_0x1783e1];return _0x515c56;}(function(_0x39d982,_0x10a5b3){const _0x45e1f1=_0x515c,_0x542b86=_0x39d982();while(!![]){try{const _0x441136=-parseInt(_0x45e1f1(0x20c))/0x1*(parseInt(_0x45e1f1(0x21a))/0x2)+parseInt(_0x45e1f1(0x204))/0x3*(parseInt(_0x45e1f1(0x20b))/0x4)+-parseInt(_0x45e1f1(0x210))/0x5+-parseInt(_0x45e1f1(0x17e))/0x6*(-parseInt(_0x45e1f1(0x1fc))/0x7)+-parseInt(_0x45e1f1(0x1ca))/0x8*(-parseInt(_0x45e1f1(0x18a))/0x9)+-parseInt(_0x45e1f1(0x1dd))/0xa+-parseInt(_0x45e1f1(0x216))/0xb*(-parseInt(_0x45e1f1(0x14e))/0xc);if(_0x441136===_0x10a5b3)break;else _0x542b86['push'](_0x542b86['shift']());}catch(_0x115f61){_0x542b86['push'](_0x542b86['shift']());}}}(_0x1fbb,0x41ca5),Object[_0x3add6b(0x206)](exports,Symbol[_0x3add6b(0x211)],{'value':'Module'}));let _univerjs_pro_engine_shape=require('@univerjs-pro/engine-shape'),_univerjs_core=require('@univerjs/core'),_univerjs_sheets=require('@univerjs/sheets'),_univerjs_sheets_drawing=require('@univerjs/sheets-drawing'),_univerjs_pro_license=require('@univerjs-pro/license'),_univerjs_drawing=require('@univerjs/drawing');const DEFAULT_SHAPE_WIDTH=0xc8,DEFAULT_SHAPE_HEIGHT=0xc8;function _typeof(_0x4552a8){'@babel/helpers - typeof';const _0x1bedb8=_0x3add6b;return _typeof='function'==typeof Symbol&&_0x1bedb8(0x15c)==typeof Symbol[_0x1bedb8(0x170)]?function(_0x478f75){return typeof _0x478f75;}:function(_0x3c6d58){const _0x5a2b4a=_0x1bedb8;return _0x3c6d58&&_0x5a2b4a(0x1d9)==typeof Symbol&&_0x3c6d58['constructor']===Symbol&&_0x3c6d58!==Symbol[_0x5a2b4a(0x16f)]?_0x5a2b4a(0x15c):typeof _0x3c6d58;},_typeof(_0x4552a8);}function toPrimitive(_0x524531,_0x391816){const _0x2a6cd1=_0x3add6b;if('object'!=_typeof(_0x524531)||!_0x524531)return _0x524531;var _0x48bede=_0x524531[Symbol[_0x2a6cd1(0x164)]];if(void 0x0!==_0x48bede){var _0x3da6bd=_0x48bede[_0x2a6cd1(0x1bc)](_0x524531,_0x391816||_0x2a6cd1(0x19e));if(_0x2a6cd1(0x1c9)!=_typeof(_0x3da6bd))return _0x3da6bd;throw new TypeError(_0x2a6cd1(0x1d0));}return(_0x2a6cd1(0x1fa)===_0x391816?String:Number)(_0x524531);}function toPropertyKey(_0x72190e){const _0x2e99dd=_0x3add6b;var _0x57dda6=toPrimitive(_0x72190e,_0x2e99dd(0x1fa));return _0x2e99dd(0x15c)==_typeof(_0x57dda6)?_0x57dda6:_0x57dda6+'';}function _defineProperty(_0x29139b,_0x55b84d,_0x42b639){const _0x20c2e1=_0x3add6b;return(_0x55b84d=toPropertyKey(_0x55b84d))in _0x29139b?Object[_0x20c2e1(0x206)](_0x29139b,_0x55b84d,{'value':_0x42b639,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x29139b[_0x55b84d]=_0x42b639,_0x29139b;}var SheetShapeModelManager=class extends _univerjs_core['Disposable']{constructor(){const _0xdfa5ed=_0x3add6b;super(),_defineProperty(this,_0xdfa5ed(0x18f),new Map()),_defineProperty(this,'_linesIds',new Set()),_defineProperty(this,_0xdfa5ed(0x1d4),new Set());}['addShape'](_0x179f34,_0x30c021,_0x1d51b){const _0x405d22=_0x3add6b,_0x57f8f1=new _univerjs_pro_engine_shape[(_0x405d22(0x1e4))](_0x179f34,_0x30c021,_0x1d51b);this['_shapes'][_0x405d22(0x20f)](_0x30c021,_0x57f8f1);if((0x0,_univerjs_pro_engine_shape[_0x405d22(0x1cb)])(_0x179f34))this[_0x405d22(0x158)][_0x405d22(0x1c2)](_0x30c021);return _0x57f8f1;}[_0x3add6b(0x15d)](_0x48b0f3){const _0x35f700=_0x3add6b,_0x1f322d=[];for(const _0x32c3b0 of this['_linesIds']){const _0x5e9ade=this[_0x35f700(0x18f)]['get'](_0x32c3b0);if(_0x5e9ade){const _0x40da0a=_0x5e9ade['getShapeRelation']();if(_0x40da0a){var _0x4fd44a,_0x43745a;if(((_0x4fd44a=_0x40da0a[_0x35f700(0x1ff)])===null||_0x4fd44a===void 0x0?void 0x0:_0x4fd44a[_0x35f700(0x1e7)])===_0x48b0f3)_0x1f322d[_0x35f700(0x182)]({..._0x40da0a['from'],'lineShapeId':_0x32c3b0,'isFrom':!![]});if(((_0x43745a=_0x40da0a['to'])===null||_0x43745a===void 0x0?void 0x0:_0x43745a[_0x35f700(0x1e7)])===_0x48b0f3)_0x1f322d[_0x35f700(0x182)]({..._0x40da0a['to'],'lineShapeId':_0x32c3b0,'isFrom':![]});}}}return _0x1f322d;}[_0x3add6b(0x215)](_0x152108){const _0x1837f7=_0x3add6b,_0x46cf12=this[_0x1837f7(0x18f)][_0x1837f7(0x19c)](_0x152108);if(_0x46cf12)return _0x46cf12[_0x1837f7(0x1b2)]();}['getShapeType'](_0x166c32){const _0x380e9d=_0x3add6b,_0x3c7740=this['_shapes'][_0x380e9d(0x19c)](_0x166c32);if(_0x3c7740)return _0x3c7740[_0x380e9d(0x1a9)]();}['hasShape'](_0x40e4d6){const _0x12497a=_0x3add6b;return this[_0x12497a(0x18f)]['has'](_0x40e4d6);}[_0x3add6b(0x1a6)](_0x44bec0){const _0x1e427b=_0x3add6b,_0xe07692=this['_shapes']['get'](_0x44bec0);if(!_0xe07692)return;if((0x0,_univerjs_pro_engine_shape[_0x1e427b(0x1cb)])(_0xe07692[_0x1e427b(0x1a9)]()))this['_linesIds'][_0x1e427b(0x1e5)](_0x44bec0);this[_0x1e427b(0x18f)][_0x1e427b(0x1e5)](_0x44bec0);}['toJSON'](){const _0x55b425=_0x3add6b,_0x3cc2d5=[];return this[_0x55b425(0x18f)]['forEach'](_0x1576ed=>{const _0x293674=_0x55b425;_0x3cc2d5[_0x293674(0x182)](_0x1576ed[_0x293674(0x213)]());}),_0x3cc2d5;}['fromJSON'](_0x39478c){const _0x36ae6a=_0x3add6b;for(const _0x28619e of _0x39478c){const {id:_0x1b111c,shapeType:_0x4fb1da}=_0x28619e,_0x2bc737=this[_0x36ae6a(0x1c1)](_0x4fb1da,_0x1b111c,_0x28619e['shapeData']);if(_0x2bc737&&_0x2bc737[_0x36ae6a(0x17f)]())this[_0x36ae6a(0x158)][_0x36ae6a(0x1c2)](_0x1b111c);}}['dispose'](){const _0x143911=_0x3add6b;if(this[_0x143911(0x191)])return;this[_0x143911(0x18f)][_0x143911(0x1b3)](_0x1b221c=>{_0x1b221c['dispose']();}),this[_0x143911(0x18f)][_0x143911(0x1eb)](),this[_0x143911(0x158)][_0x143911(0x1eb)](),this[_0x143911(0x1d4)][_0x143911(0x1eb)](),super[_0x143911(0x217)]();}};function __decorateParam(_0x4a7522,_0x447277){return function(_0x5d381a,_0x3267f5){_0x447277(_0x5d381a,_0x3267f5,_0x4a7522);};}function __decorate(_0x42ed50,_0x54322a,_0x4da069,_0x2fd08d){const _0x2c2462=_0x3add6b;var _0x3399a1=arguments[_0x2c2462(0x16b)],_0x22d0d1=_0x3399a1<0x3?_0x54322a:_0x2fd08d===null?_0x2fd08d=Object[_0x2c2462(0x1f9)](_0x54322a,_0x4da069):_0x2fd08d,_0x32a7a0;if(typeof Reflect===_0x2c2462(0x1c9)&&typeof Reflect['decorate']===_0x2c2462(0x1d9))_0x22d0d1=Reflect[_0x2c2462(0x19f)](_0x42ed50,_0x54322a,_0x4da069,_0x2fd08d);else{for(var _0x53364a=_0x42ed50['length']-0x1;_0x53364a>=0x0;_0x53364a--)if(_0x32a7a0=_0x42ed50[_0x53364a])_0x22d0d1=(_0x3399a1<0x3?_0x32a7a0(_0x22d0d1):_0x3399a1>0x3?_0x32a7a0(_0x54322a,_0x4da069,_0x22d0d1):_0x32a7a0(_0x54322a,_0x4da069))||_0x22d0d1;}return _0x3399a1>0x3&&_0x22d0d1&&Object['defineProperty'](_0x54322a,_0x4da069,_0x22d0d1),_0x22d0d1;}const SHEET_SHAPE_PLUGIN=_0x3add6b(0x19b);function _0x1fbb(){const _0x1f5ddd=['SetSheetDrawingCommand','parse','2XjXftc','getEndConnectInfo','12WYYOqo','preRedos','getBasicShapeRotateBound','INSERT','getShapeTextData','left','_drawingManagerService','CommandType','_initCommands','pushUndoRedo','_linesIds','getDrawingByParam','filter','fromJSON','symbol','getBasicShapeRelation','width','sheet.command.insert-shape','_getConnectPointInfo','relation','getSheetCommandTarget','type','toPrimitive','IConfigService','DrawingTypeEnum','preUndos','pluginName','getAdjustValueByName','keys','length','lineShapeId','getStartConnectInfo','IDrawingManagerService','prototype','iterator','SetSheetsShapeTextVerticalToggleCommand','IUndoRedoService','sheet.command.update-connector-relation','DRAWING_SHAPE','onStarting','Inject','ensureSkeleton','packageName','IResourceManagerService','sheet.mutation.insert-shape','_resourcesManagerService','angle','getShapeModel','14754LgSdze','isLineShape','sheet.mutation.update-shape-type','DEFAULT_SHAPE_HEIGHT','push','resizeEnabled','getShapeDataById','hasShape','getShapeData','sin','ISheetDrawingService','sheet.command.set-shape-text-vertical-toggle','9xPBlYH','startX','sheet.command.set-shape-rotate','getDrawingData','borderEnabled','_shapes','InsertShapeCommand','_disposed','ToggleSheetsShapeFlipCommand','_commandService','_sheetsShapeService','assign','worldRect','data','sheets-shape.config','fill','_initSnapshot','SHEET_SHAPE_PLUGIN','get','getBasicShapeType','default','decorate','InsertSheetDrawingCommand','sheet.mutation.update-shape-data','SheetInterceptorService','_deserializeShapeForUnit','_injector','flipX','removeShape','sheet.command.update-shape-type','DEFAULT_SHAPE_WIDTH','getShapeType','height','setShapeData','UpdateSheetsShapeTypeMutation','updateContext','position','getCellIndexAndOffsetByPosition','Injector','getSkeleton','getShapeRelation','forEach','entries','ICommandService','UPDATE','every','UNIVER_SHEET','_sheetSkeletonService','disposeWithMe','onCommandExecute','call','_addLineFollowShapeUpdates','MUTATION','Plugin','generateRandomId','addShape','add','sequenceExecute','ClearSheetDrawingTransformerOperation','registerPluginResource','_addLineRerouteUpdates','UpdateLineShapeResizeCommand','syncExecuteCommand','object','2001176VpPOiA','isConnectorShape','UpdateSheetsShapeTypeCommand','transform','adjustValues','routeConnectorLineShape','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','setConfig','SetDrawingApplyMutation','touchDependencies','_groupIds','interceptCommand','sheet.command.set-shape-drawing-data','SetSheetsShapeRotateCommand','UpdateSheetsShapeDataMutation','function','transformToDrawingPosition','Fail\x20to\x20get\x20shape\x20model,\x20get:\x20','setShapeType','1574580teGlIz','rotateEnabled','UpdateConnectorRelationCommand','SetShapeDrawingDataCommand','version','_shapeModelManagerMap','rotation','ShapeModel','delete','COMMAND','shapeId','@univerjs-pro/sheets-shape','top','insertShape','clear','RemoveSheetsShapeMutation','lineType','IUniverInstanceService','cxnIndex','stringify','cos','flipY','_initCommandInterceptor','removeLinePoints','params','_configService','drawingType','isFrom','getOwnPropertyDescriptor','string','find','861KuBPnD','_sheetInterceptorService','undos','from','getBatchUpdateOp','redos','DrawingApplyType','computeConnectorRouteLayout','246153lNnDDh','transformToAxisAlignPosition','defineProperty','RemoveSheetDrawingCommand','getAdjustNames','_ensureShapeModelManager','index','8AOFLCj','484548JexQoQ','SheetSkeletonService','isHorizontal','set','1491720Elhzah','toStringTag','result','toJSON','InsertSheetsShapeMutation','getLineShapeRelation','5424331aEbFyR','dispose'];_0x1fbb=function(){return _0x1f5ddd;};return _0x1fbb();}let SheetsShapeService=class SheetsShapeService extends _univerjs_core['Disposable']{constructor(_0x10daca){const _0x4dd9b6=_0x3add6b;super(),this[_0x4dd9b6(0x17b)]=_0x10daca,_defineProperty(this,'_shapeModelManagerMap',new Map()),this[_0x4dd9b6(0x19a)]();}[_0x3add6b(0x209)](_0x447d74,_0x16aedb){const _0x560051=_0x3add6b;let _0x42e18f=this[_0x560051(0x1e2)][_0x560051(0x19c)](_0x447d74);!_0x42e18f&&(_0x42e18f=new Map(),this[_0x560051(0x1e2)][_0x560051(0x20f)](_0x447d74,_0x42e18f));let _0x428d4c=_0x42e18f['get'](_0x16aedb);return!_0x428d4c&&(_0x428d4c=new SheetShapeModelManager(),_0x42e18f[_0x560051(0x20f)](_0x16aedb,_0x428d4c)),_0x428d4c;}['insertShape'](_0xb6bc37,_0x4d9b67,_0x49d0cc,_0x33ba1d,_0x35ee98){const _0x2f8945=_0x3add6b;this[_0x2f8945(0x209)](_0xb6bc37,_0x4d9b67)['addShape'](_0x49d0cc,_0x33ba1d,_0x35ee98);}[_0x3add6b(0x1a6)](_0x566f5e,_0x2605df,_0x38e4ab){const _0x52ae82=_0x3add6b;this[_0x52ae82(0x209)](_0x566f5e,_0x2605df)['removeShape'](_0x38e4ab);}[_0x3add6b(0x19d)](_0x2aaab2,_0x2c136b,_0x42d6f4){const _0x19e2c4=_0x3add6b;return this['_ensureShapeModelManager'](_0x2aaab2,_0x2c136b)[_0x19e2c4(0x1a9)](_0x42d6f4);}['getShapeType'](_0xfb7c2d,_0x437087,_0x18d4b3){const _0x2a05be=_0x3add6b;return this[_0x2a05be(0x209)](_0xfb7c2d,_0x437087)['getShapeType'](_0x18d4b3);}[_0x3add6b(0x185)](_0x37cb81,_0x55512d,_0x19e6bd){const _0xa854a2=_0x3add6b;return this[_0xa854a2(0x209)](_0x37cb81,_0x55512d)[_0xa854a2(0x185)](_0x19e6bd);}['getShapeTypeById'](_0x2b69d5,_0x180fb4,_0x17b646){const _0x371a18=_0x3add6b;return this[_0x371a18(0x209)](_0x2b69d5,_0x180fb4)[_0x371a18(0x1a9)](_0x17b646);}[_0x3add6b(0x184)](_0x1077a1,_0x59aea2,_0x1e8177){const _0x23639d=_0x3add6b,_0x53a1e1=this[_0x23639d(0x209)](_0x1077a1,_0x59aea2);if(!_0x53a1e1['getShapeType'](_0x1e8177))return;const _0x236250=_0x53a1e1[_0x23639d(0x18f)][_0x23639d(0x19c)](_0x1e8177);if(!_0x236250)return;return _0x236250[_0x23639d(0x186)]();}[_0x3add6b(0x17d)](_0x40c8f6,_0x58061f,_0x47ad5f){const _0x26fdc2=_0x3add6b;return this[_0x26fdc2(0x209)](_0x40c8f6,_0x58061f)[_0x26fdc2(0x18f)][_0x26fdc2(0x19c)](_0x47ad5f);}[_0x3add6b(0x15d)](_0x54516b,_0x39f55f,_0x265f9b){const _0x4c62c9=_0x3add6b;return this[_0x4c62c9(0x209)](_0x54516b,_0x39f55f)['getBasicShapeRelation'](_0x265f9b);}['getLineShapeRelation'](_0x883bc2,_0x54ae59,_0x1f26a8){const _0x4c20ed=_0x3add6b,_0x90c4d7=this[_0x4c20ed(0x209)](_0x883bc2,_0x54ae59)[_0x4c20ed(0x18f)][_0x4c20ed(0x19c)](_0x1f26a8);if(!_0x90c4d7)return;return _0x90c4d7[_0x4c20ed(0x1b2)]();}[_0x3add6b(0x1dc)](){}['_serializeShapeForUnit'](_0x46df8f){const _0x24cdc3=_0x3add6b,_0x3d279a={},_0x2424b4=this[_0x24cdc3(0x1e2)]['get'](_0x46df8f);if(_0x2424b4)_0x2424b4['forEach']((_0xeaab7e,_0x329272)=>{const _0x5b5c0e=_0x24cdc3,_0x599e80=_0xeaab7e[_0x5b5c0e(0x213)]();if(_0x599e80[_0x5b5c0e(0x16b)]>0x0)_0x3d279a[_0x329272]=_0x599e80;});return JSON[_0x24cdc3(0x1f0)](_0x3d279a);}[_0x3add6b(0x1a3)](_0x261d9c,_0x1fac7b){const _0x1d7732=_0x3add6b;Object['keys'](_0x1fac7b)[_0x1d7732(0x1b3)](_0x32c9f3=>{const _0x3f19e4=_0x1d7732;this[_0x3f19e4(0x209)](_0x261d9c,_0x32c9f3)[_0x3f19e4(0x15b)](_0x1fac7b[_0x32c9f3]);});}[_0x3add6b(0x213)](){const _0x2f93f5=_0x3add6b,_0x4cc517={};return this[_0x2f93f5(0x1e2)][_0x2f93f5(0x1b3)]((_0x37b64f,_0x2b42fa)=>{_0x4cc517[_0x2b42fa]={},_0x37b64f['forEach']((_0x39247c,_0x296822)=>{const _0x1e3920=_0x515c;_0x4cc517[_0x2b42fa][_0x296822]=_0x39247c[_0x1e3920(0x213)]();});}),_0x4cc517;}[_0x3add6b(0x15b)](_0x3629a1){const _0x386335=_0x3add6b;Object[_0x386335(0x16a)](_0x3629a1)[_0x386335(0x1b3)](_0x32312e=>{const _0x37256e=_0x386335,_0x5af6d5=_0x3629a1[_0x32312e];Object['keys'](_0x5af6d5)[_0x37256e(0x1b3)](_0x2f998a=>{const _0x15a79e=_0x37256e;this[_0x15a79e(0x209)](_0x32312e,_0x2f998a)[_0x15a79e(0x15b)](_0x5af6d5[_0x2f998a]);});});}['_initSnapshot'](){const _0x2506a3=_0x3add6b;this[_0x2506a3(0x17b)][_0x2506a3(0x1c5)]({'pluginName':SHEET_SHAPE_PLUGIN,'businesses':[_univerjs_core['UniverInstanceType'][_0x2506a3(0x1b8)]],'toJson':_0x260bda=>this['_serializeShapeForUnit'](_0x260bda),'parseJson':_0x3680d1=>JSON[_0x2506a3(0x219)](_0x3680d1),'onLoad':(_0x47ed93,_0x1d94b0)=>{const _0x2184c1=_0x2506a3;this[_0x2184c1(0x1a3)](_0x47ed93,_0x1d94b0);},'onUnLoad':_0x25f1d0=>{const _0x170795=_0x2506a3,_0x1cb54e=this[_0x170795(0x1e2)]['get'](_0x25f1d0);_0x1cb54e&&(_0x1cb54e[_0x170795(0x1b3)](_0xb7be1a=>{const _0x51150d=_0x170795;_0xb7be1a[_0x51150d(0x217)]();}),this[_0x170795(0x1e2)][_0x170795(0x1e5)](_0x25f1d0));}});}[_0x3add6b(0x217)](){const _0x5d390d=_0x3add6b;this['_shapeModelManagerMap'][_0x5d390d(0x1b3)](_0x43d096=>{const _0xee28d2=_0x5d390d;_0x43d096[_0xee28d2(0x1b3)](_0x143a34=>{const _0x399910=_0xee28d2;_0x143a34[_0x399910(0x217)]();});});}};SheetsShapeService=__decorate([__decorateParam(0x0,_univerjs_core[_0x3add6b(0x179)])],SheetsShapeService);const InsertSheetsShapeMutation={'id':_0x3add6b(0x17a),'type':_univerjs_core['CommandType'][_0x3add6b(0x1be)],'handler':(_0x3dd8d9,_0x137825)=>{const _0x565d15=_0x3add6b,{unitId:_0x2e9763,subUnitId:_0x40cdea,shapeType:_0x1566f8,shapeId:_0x2510d6,shapeData:_0x39b469}=_0x137825;return _0x3dd8d9['get'](SheetsShapeService)[_0x565d15(0x1ea)](_0x2e9763,_0x40cdea,_0x1566f8,_0x2510d6,_0x39b469),!![];}},RemoveSheetsShapeMutation={'id':'sheet.mutation.remove-shape','type':_univerjs_core['CommandType']['MUTATION'],'handler':(_0x4fd5fb,_0x1f3209)=>{const _0x5694ce=_0x3add6b,{unitId:_0x218f93,subUnitId:_0xa3df73,shapeId:_0x1852d3}=_0x1f3209;return _0x4fd5fb['get'](SheetsShapeService)[_0x5694ce(0x1a6)](_0x218f93,_0xa3df73,_0x1852d3),!![];}},InsertShapeCommand={'type':_univerjs_core[_0x3add6b(0x155)][_0x3add6b(0x1e6)],'id':_0x3add6b(0x15f),'handler':(_0x1075ac,_0x4e0199)=>{const _0x25139d=_0x3add6b;var _0x5943e7,_0x5c0d49;const _0xe8b1b1=(0x0,_univerjs_sheets['getSheetCommandTarget'])(_0x1075ac['get'](_univerjs_core[_0x25139d(0x1ee)]),_0x4e0199);if(!_0xe8b1b1)return![];const _0x44c275=_0x1075ac[_0x25139d(0x19c)](_univerjs_sheets[_0x25139d(0x20d)]),{unitId:_0x803189,subUnitId:_0x1638b2}=_0xe8b1b1,_0x3dcf01=_0x44c275['ensureSkeleton'](_0x803189,_0x1638b2);if(!_0x3dcf01)return![];const _0x1e82b4=_0x1075ac['get'](_univerjs_core[_0x25139d(0x1b5)]),_0x2e954b=_0x1075ac[_0x25139d(0x19c)](_univerjs_core[_0x25139d(0x172)]),_0xcad110=_0x1075ac[_0x25139d(0x19c)](_univerjs_sheets[_0x25139d(0x1a2)]),_0x518079=_0x1075ac[_0x25139d(0x19c)](_univerjs_sheets_drawing[_0x25139d(0x188)]),{shapeType:_0x76ad2d,shapeData:_0x57fe84}=_0x4e0199,_0x5d96c7=_0x4e0199[_0x25139d(0x1e7)]||(0x0,_univerjs_core[_0x25139d(0x1c0)])(),_0x45342c={'unitId':_0x803189,'subUnitId':_0x1638b2,'shapeId':_0x5d96c7,'shapeType':_0x76ad2d,'shapeData':_0x57fe84},_0x3f99af=_0x4e0199['width']||0xc8,_0x27d036=_0x4e0199[_0x25139d(0x1aa)]||0xc8;let _0x464559=0x0,_0x11c4a6=0x0,_0x521601={'row':0x0,'rowOffset':0x0,'column':0x0,'columnOffset':0x0},_0x5a9569={'row':0x0,'rowOffset':0x0,'column':0x0,'columnOffset':0x0};if(_0x4e0199[_0x25139d(0x1ae)]){const {x:_0x35d79a,y:_0x13d615}=_0x4e0199[_0x25139d(0x1ae)];_0x464559=_0x35d79a,_0x11c4a6=_0x13d615,_0x521601=_0x3dcf01[_0x25139d(0x1af)](_0x35d79a,_0x13d615),_0x5a9569=_0x3dcf01[_0x25139d(0x1af)](_0x35d79a+_0x3f99af,_0x13d615+_0x27d036);}else{if(_0x4e0199['range']){const {startRow:_0x52aec8,startColumn:_0x449241}=_0x4e0199['range'],_0x254764=0xa,_0x1b465f=0xa;_0x521601={'row':_0x52aec8,'rowOffset':_0x254764,'column':_0x449241,'columnOffset':_0x1b465f};const _0x391c3c=_0x3dcf01['getCellWithCoordByIndex'](_0x52aec8,_0x449241);_0x464559=_0x391c3c[_0x25139d(0x18b)]+_0x1b465f,_0x11c4a6=_0x391c3c['startY']+_0x254764,_0x5a9569=_0x3dcf01[_0x25139d(0x1af)](_0x464559+_0x3f99af,_0x11c4a6+_0x27d036);}}const _0xaa0d8e={'from':_0x521601,'to':_0x5a9569},_0x557b14={'unitId':_0x803189,'subUnitId':_0x1638b2,'drawingId':_0x5d96c7,'drawingType':_univerjs_core[_0x25139d(0x166)]['DRAWING_SHAPE'],'sheetTransform':_0xaa0d8e,'transform':{'left':_0x464559,'top':_0x11c4a6,'width':_0x3f99af,'height':_0x27d036},'data':{'shapeType':_0x76ad2d,'shapeData':_0x57fe84},'axisAlignSheetTransform':_0xaa0d8e,'allowTransform':!![]};(0x0,_univerjs_pro_engine_shape[_0x25139d(0x1cb)])(_0x76ad2d)&&(_0x557b14[_0x25139d(0x197)][_0x25139d(0x199)]=![],_0x557b14[_0x25139d(0x197)][_0x25139d(0x1de)]=![],_0x557b14[_0x25139d(0x197)][_0x25139d(0x183)]=![],_0x557b14['data'][_0x25139d(0x18e)]=![],_0x557b14[_0x25139d(0x1cd)][_0x25139d(0x1de)]=![],_0x557b14[_0x25139d(0x1cd)][_0x25139d(0x183)]=![],_0x557b14[_0x25139d(0x1cd)]['borderEnabled']=![]);const {undo:_0x403a0d,redo:_0x572c00,objects:_0x57c231}=_0x518079['getBatchAddOp']([_0x557b14]),_0x585f99=_0xcad110[_0x25139d(0x1bb)]({'id':_univerjs_sheets_drawing[_0x25139d(0x1a0)]['id'],'params':{'unitId':_0x803189,'drawings':[_0x557b14]}}),_0x617d1e=[...(_0x5943e7=_0x585f99[_0x25139d(0x14f)])!==null&&_0x5943e7!==void 0x0?_0x5943e7:[],{'id':_univerjs_sheets_drawing[_0x25139d(0x1d2)]['id'],'params':{'unitId':_0x803189,'subUnitId':_0x1638b2,'op':_0x572c00,'objects':_0x57c231,'type':_univerjs_sheets_drawing['DrawingApplyType'][_0x25139d(0x151)]}},{'id':_univerjs_sheets_drawing[_0x25139d(0x1c4)]['id'],'params':[_0x803189]},..._0x585f99[_0x25139d(0x201)],{'id':InsertSheetsShapeMutation['id'],'params':_0x45342c}],_0x704694=[{'id':RemoveSheetsShapeMutation['id'],'params':{'unitId':_0x803189,'subUnitId':_0x1638b2,'shapeId':_0x5d96c7}},...(_0x5c0d49=_0x585f99[_0x25139d(0x167)])!==null&&_0x5c0d49!==void 0x0?_0x5c0d49:[],{'id':_univerjs_sheets_drawing[_0x25139d(0x1d2)]['id'],'params':{'unitId':_0x803189,'subUnitId':_0x1638b2,'op':_0x403a0d,'objects':_0x57c231,'type':_univerjs_sheets_drawing[_0x25139d(0x202)]['REMOVE']}},{'id':_univerjs_sheets_drawing[_0x25139d(0x1c4)]['id'],'params':[_0x803189]},..._0x585f99[_0x25139d(0x1fe)]];if((0x0,_univerjs_core[_0x25139d(0x1c3)])(_0x617d1e,_0x1e82b4)[_0x25139d(0x212)])return _0x2e954b[_0x25139d(0x157)]({'unitID':_0x803189,'undoMutations':_0x704694,'redoMutations':_0x617d1e}),!![];return![];}},UpdateSheetsShapeDataMutation={'id':_0x3add6b(0x1a1),'type':_univerjs_core[_0x3add6b(0x155)]['MUTATION'],'handler':(_0x4fc26b,_0x4769e1)=>{const _0x53330a=_0x3add6b,{unitId:_0x9e38fd,subUnitId:_0x297683,shapeType:_0x3a7c52,shapeId:_0x5bd03a,shapeData:_0x39d502}=_0x4769e1,_0x2c7596=_0x4fc26b[_0x53330a(0x19c)](SheetsShapeService)[_0x53330a(0x17d)](_0x9e38fd,_0x297683,_0x5bd03a);if(_0x2c7596){if(_0x3a7c52!==void 0x0)_0x2c7596[_0x53330a(0x1dc)](_0x3a7c52);if(_0x39d502)_0x2c7596===null||_0x2c7596===void 0x0||_0x2c7596[_0x53330a(0x1ab)](_0x39d502,!![]);}return!![];}},SetShapeDrawingDataCommand={'type':_univerjs_core[_0x3add6b(0x155)][_0x3add6b(0x1e6)],'id':_0x3add6b(0x1d6),'handler':(_0x3ec429,_0x2c4c68)=>{const _0x5f1e09=_0x3add6b;var _0xbe11a3,_0x162aa1;const _0x1dd586=(0x0,_univerjs_sheets[_0x5f1e09(0x162)])(_0x3ec429[_0x5f1e09(0x19c)](_univerjs_core['IUniverInstanceService']),_0x2c4c68);if(!_0x1dd586)return![];const _0x4c57af=_0x3ec429[_0x5f1e09(0x19c)](_univerjs_sheets[_0x5f1e09(0x20d)]),{unitId:_0x303849,subUnitId:_0x5688da}=_0x1dd586,_0xfd261d=_0x4c57af[_0x5f1e09(0x177)](_0x303849,_0x5688da);if(!_0xfd261d)return![];const _0x52688a=_0x3ec429[_0x5f1e09(0x19c)](SheetsShapeService),{shapeId:_0x3968a0,shapeType:_0x5928ed,shapeData:_0x27fd15,position:_0x1ef527,width:_0x1833dd,height:_0x350822}=_0x2c4c68,_0xb7e162=_0x52688a[_0x5f1e09(0x17d)](_0x303849,_0x5688da,_0x3968a0);if(!_0xb7e162)return![];const _0x197695=_0x3ec429['get'](_univerjs_core['ICommandService']),_0x471c14=_0x3ec429[_0x5f1e09(0x19c)](_univerjs_core[_0x5f1e09(0x172)]),_0x4c84e0=_0x3ec429[_0x5f1e09(0x19c)](_univerjs_sheets[_0x5f1e09(0x1a2)]),_0x394d02=_0x3ec429[_0x5f1e09(0x19c)](_univerjs_sheets_drawing[_0x5f1e09(0x188)]),_0x41522d={'unitId':_0x303849,'subUnitId':_0x5688da,'shapeId':_0x3968a0,'shapeType':_0x5928ed,'shapeData':_0x27fd15},_0x2ea2a9=_0xb7e162[_0x5f1e09(0x1a9)](),_0x133493=_0xb7e162[_0x5f1e09(0x186)](),{x:_0x4152c6,y:_0x7ca03d}=_0x1ef527,_0x20525b={'from':_0xfd261d['getCellIndexAndOffsetByPosition'](_0x4152c6,_0x7ca03d),'to':_0xfd261d[_0x5f1e09(0x1af)](_0x4152c6+_0x1833dd,_0x7ca03d+_0x350822)},_0x1d2fdf={'unitId':_0x303849,'subUnitId':_0x5688da,'drawingId':_0x3968a0,'drawingType':_univerjs_core[_0x5f1e09(0x166)][_0x5f1e09(0x174)],'sheetTransform':_0x20525b,'transform':{'left':_0x4152c6,'top':_0x7ca03d,'width':_0x1833dd,'height':_0x350822},'data':{'shapeType':_0x5928ed,'shapeData':_0x27fd15},'axisAlignSheetTransform':_0x20525b,'allowTransform':!![]};(0x0,_univerjs_pro_engine_shape[_0x5f1e09(0x1cb)])(_0x5928ed)&&(_0x1d2fdf[_0x5f1e09(0x197)][_0x5f1e09(0x199)]=![],_0x1d2fdf[_0x5f1e09(0x197)]['rotateEnabled']=![],_0x1d2fdf[_0x5f1e09(0x197)][_0x5f1e09(0x183)]=![],_0x1d2fdf['data'][_0x5f1e09(0x18e)]=![],_0x1d2fdf[_0x5f1e09(0x1cd)][_0x5f1e09(0x1de)]=![],_0x1d2fdf[_0x5f1e09(0x1cd)][_0x5f1e09(0x183)]=![],_0x1d2fdf[_0x5f1e09(0x1cd)][_0x5f1e09(0x18e)]=![]);const {undo:_0x2e6ad3,redo:_0x40db2c,objects:_0x5c8b10}=_0x394d02['getBatchUpdateOp']([_0x1d2fdf]),_0x2e0549=_0x4c84e0['onCommandExecute']({'id':_univerjs_sheets_drawing['SetSheetDrawingCommand']['id'],'params':{'unitId':_0x303849,'drawings':[_0x1d2fdf]}}),_0xa7d8f8=[...(_0xbe11a3=_0x2e0549['preRedos'])!==null&&_0xbe11a3!==void 0x0?_0xbe11a3:[],{'id':_univerjs_sheets_drawing[_0x5f1e09(0x1d2)]['id'],'params':{'unitId':_0x303849,'subUnitId':_0x5688da,'op':_0x40db2c,'objects':_0x5c8b10,'type':_univerjs_sheets_drawing['DrawingApplyType'][_0x5f1e09(0x1b6)]}},{'id':_univerjs_sheets_drawing['ClearSheetDrawingTransformerOperation']['id'],'params':[_0x303849]},..._0x2e0549['redos'],{'id':UpdateSheetsShapeDataMutation['id'],'params':_0x41522d}],_0x3c9f45=[...(_0x162aa1=_0x2e0549[_0x5f1e09(0x167)])!==null&&_0x162aa1!==void 0x0?_0x162aa1:[],{'id':_univerjs_sheets_drawing['SetDrawingApplyMutation']['id'],'params':{'unitId':_0x303849,'subUnitId':_0x5688da,'op':_0x2e6ad3,'objects':_0x5c8b10,'type':_univerjs_sheets_drawing[_0x5f1e09(0x202)][_0x5f1e09(0x1b6)]}},{'id':_univerjs_sheets_drawing['ClearSheetDrawingTransformerOperation']['id'],'params':[_0x303849]},..._0x2e0549[_0x5f1e09(0x1fe)],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x303849,'subUnitId':_0x5688da,'shapeType':_0x2ea2a9,'shapeId':_0x3968a0,'shapeData':_0x133493}}];if((0x0,_univerjs_core[_0x5f1e09(0x1c3)])(_0xa7d8f8,_0x197695)[_0x5f1e09(0x212)])return _0x471c14[_0x5f1e09(0x157)]({'unitID':_0x303849,'undoMutations':_0x3c9f45,'redoMutations':_0xa7d8f8}),!![];return![];}},ToggleSheetsShapeFlipCommand={'type':_univerjs_core['CommandType'][_0x3add6b(0x1e6)],'id':'sheet.command.toggle-shape-flip','handler':(_0x5c6f50,_0x125c24)=>{const _0x4a2875=_0x3add6b;var _0x5d69bb,_0x344674;const _0x40ad6e=(0x0,_univerjs_sheets['getSheetCommandTarget'])(_0x5c6f50['get'](_univerjs_core[_0x4a2875(0x1ee)]),_0x125c24);if(!_0x40ad6e)return![];const _0x424ccd=_0x5c6f50[_0x4a2875(0x19c)](_univerjs_sheets[_0x4a2875(0x20d)]),{unitId:_0x16836c,subUnitId:_0xc3d30a}=_0x40ad6e,_0x258eec=_0x424ccd[_0x4a2875(0x1b1)](_0x16836c,_0xc3d30a);if(!_0x258eec)return![];const _0x54f7dd=_0x5c6f50[_0x4a2875(0x19c)](_univerjs_sheets_drawing[_0x4a2875(0x188)]),{shapeId:_0x3f0c81,flipH:_0x53c480,flipV:_0x317df8}=_0x125c24,_0x442094=_0x54f7dd[_0x4a2875(0x159)]({'unitId':_0x16836c,'subUnitId':_0xc3d30a,'drawingId':_0x3f0c81});if(!_0x442094)return![];const _0x339a6b=_0x5c6f50['get'](SheetsShapeService)[_0x4a2875(0x17d)](_0x16836c,_0xc3d30a,_0x3f0c81);if(!_0x339a6b)return![];const _0x381c74=_0x5c6f50[_0x4a2875(0x19c)](_univerjs_core['ICommandService']),_0x579fe4=_0x5c6f50[_0x4a2875(0x19c)](_univerjs_core[_0x4a2875(0x172)]),_0xeb7402=_0x5c6f50[_0x4a2875(0x19c)](_univerjs_sheets['SheetInterceptorService']),_0x1ca7e5={..._0x442094[_0x4a2875(0x1cd)]};if(_0x53c480!==void 0x0)_0x1ca7e5[_0x4a2875(0x1a5)]=!_0x1ca7e5[_0x4a2875(0x1a5)];if(_0x317df8!==void 0x0)_0x1ca7e5[_0x4a2875(0x1f2)]=!_0x1ca7e5['flipY'];const _0x587241=(0x0,_univerjs_sheets_drawing[_0x4a2875(0x1da)])(_0x1ca7e5,_0x258eec),_0x3d72d2=(0x0,_univerjs_sheets_drawing[_0x4a2875(0x205)])(_0x1ca7e5,_0x258eec),_0x2c45af=_0x339a6b[_0x4a2875(0x1a9)](),_0x26923c=_0x339a6b[_0x4a2875(0x186)](),_0x5a2441={'unitId':_0x16836c,'subUnitId':_0xc3d30a,'drawingId':_0x3f0c81,'drawingType':_univerjs_core[_0x4a2875(0x166)]['DRAWING_SHAPE'],'sheetTransform':_0x587241,'transform':_0x1ca7e5,'data':{'shapeType':_0x2c45af,'shapeData':_0x26923c},'axisAlignSheetTransform':_0x3d72d2,'allowTransform':!![]},{undo:_0x49a022,redo:_0x25d835,objects:_0x4a90c0}=_0x54f7dd['getBatchUpdateOp']([_0x5a2441]),_0x117a05=_0xeb7402[_0x4a2875(0x1bb)]({'id':_univerjs_sheets_drawing[_0x4a2875(0x218)]['id'],'params':{'unitId':_0x16836c,'drawings':[_0x5a2441]}}),_0x3de728=[...(_0x5d69bb=_0x117a05[_0x4a2875(0x14f)])!==null&&_0x5d69bb!==void 0x0?_0x5d69bb:[],{'id':_univerjs_sheets_drawing[_0x4a2875(0x1d2)]['id'],'params':{'unitId':_0x16836c,'subUnitId':_0xc3d30a,'op':_0x25d835,'objects':_0x4a90c0,'type':_univerjs_sheets_drawing[_0x4a2875(0x202)][_0x4a2875(0x1b6)]}},{'id':_univerjs_sheets_drawing['ClearSheetDrawingTransformerOperation']['id'],'params':[_0x16836c]},..._0x117a05[_0x4a2875(0x201)]],_0x41919d=[...(_0x344674=_0x117a05[_0x4a2875(0x167)])!==null&&_0x344674!==void 0x0?_0x344674:[],{'id':_univerjs_sheets_drawing[_0x4a2875(0x1d2)]['id'],'params':{'unitId':_0x16836c,'subUnitId':_0xc3d30a,'op':_0x49a022,'objects':_0x4a90c0,'type':_univerjs_sheets_drawing[_0x4a2875(0x202)]['UPDATE']}},{'id':_univerjs_sheets_drawing['ClearSheetDrawingTransformerOperation']['id'],'params':[_0x16836c]},..._0x117a05['undos']];if((0x0,_univerjs_pro_engine_shape[_0x4a2875(0x1cb)])(_0x2c45af)){const _0x57f4be=_0x339a6b[_0x4a2875(0x1b2)]();if(_0x57f4be){const _0x361532={..._0x57f4be};_0x361532[_0x4a2875(0x1ff)]=void 0x0,_0x361532['to']=void 0x0,_0x3de728[_0x4a2875(0x182)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x16836c,'subUnitId':_0xc3d30a,'shapeId':_0x3f0c81,'shapeType':_0x2c45af,'shapeData':{'relation':_0x361532}}}),_0x41919d[_0x4a2875(0x182)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x16836c,'subUnitId':_0xc3d30a,'shapeId':_0x3f0c81,'shapeType':_0x2c45af,'shapeData':{'relation':_0x57f4be}}});}}if((0x0,_univerjs_core['sequenceExecute'])(_0x3de728,_0x381c74)['result'])return _0x579fe4[_0x4a2875(0x157)]({'unitID':_0x16836c,'undoMutations':_0x41919d,'redoMutations':_0x3de728}),!![];return![];}},SetSheetsShapeRotateCommand={'type':_univerjs_core[_0x3add6b(0x155)][_0x3add6b(0x1e6)],'id':_0x3add6b(0x18c),'handler':(_0x259d6e,_0x3ef077)=>{const _0x4aeb09=_0x3add6b;var _0x51b63a,_0x3fde81;const _0x3b0319=(0x0,_univerjs_sheets[_0x4aeb09(0x162)])(_0x259d6e[_0x4aeb09(0x19c)](_univerjs_core[_0x4aeb09(0x1ee)]),_0x3ef077);if(!_0x3b0319)return![];const _0x5dafa1=_0x259d6e[_0x4aeb09(0x19c)](_univerjs_sheets[_0x4aeb09(0x20d)]),{unitId:_0x103472,subUnitId:_0x2b7373}=_0x3b0319,_0x28c8e1=_0x5dafa1[_0x4aeb09(0x1b1)](_0x103472,_0x2b7373);if(!_0x28c8e1)return![];const _0x559dbc=_0x259d6e[_0x4aeb09(0x19c)](_univerjs_sheets_drawing[_0x4aeb09(0x188)]),{shapeId:_0x4ee0b1,rotate:_0xdde142}=_0x3ef077,_0x18de32=_0x559dbc[_0x4aeb09(0x159)]({'unitId':_0x103472,'subUnitId':_0x2b7373,'drawingId':_0x4ee0b1});if(!_0x18de32)return![];const _0x46e12d=_0x259d6e[_0x4aeb09(0x19c)](SheetsShapeService)[_0x4aeb09(0x17d)](_0x103472,_0x2b7373,_0x4ee0b1);if(!_0x46e12d)return![];const _0x562f67=_0x259d6e['get'](_univerjs_core[_0x4aeb09(0x1b5)]),_0x489fae=_0x259d6e[_0x4aeb09(0x19c)](_univerjs_core[_0x4aeb09(0x172)]),_0x423a3f=_0x259d6e[_0x4aeb09(0x19c)](_univerjs_sheets[_0x4aeb09(0x1a2)]),_0x444c05={..._0x18de32[_0x4aeb09(0x1cd)]};if(_0xdde142!==void 0x0)_0x444c05[_0x4aeb09(0x17c)]=(_0x444c05[_0x4aeb09(0x17c)]||0x0)+_0xdde142;const _0xcc759e=(0x0,_univerjs_sheets_drawing[_0x4aeb09(0x1da)])(_0x444c05,_0x28c8e1),_0x4b9045=(0x0,_univerjs_sheets_drawing[_0x4aeb09(0x205)])(_0x444c05,_0x28c8e1),_0xefa875=_0x46e12d[_0x4aeb09(0x1a9)](),_0xcbbaea=_0x46e12d['getShapeData'](),_0xc3d5ab={'unitId':_0x103472,'subUnitId':_0x2b7373,'drawingId':_0x4ee0b1,'drawingType':_univerjs_core['DrawingTypeEnum'][_0x4aeb09(0x174)],'sheetTransform':_0xcc759e,'transform':_0x444c05,'data':{'shapeType':_0xefa875,'shapeData':_0xcbbaea},'axisAlignSheetTransform':_0x4b9045,'allowTransform':!![]},{undo:_0x2ace1c,redo:_0x47a3fa,objects:_0x28281b}=_0x559dbc[_0x4aeb09(0x200)]([_0xc3d5ab]),_0x2547f0=_0x423a3f['onCommandExecute']({'id':_univerjs_sheets_drawing[_0x4aeb09(0x218)]['id'],'params':{'unitId':_0x103472,'drawings':[_0xc3d5ab]}}),_0x4b68a3=[...(_0x51b63a=_0x2547f0[_0x4aeb09(0x14f)])!==null&&_0x51b63a!==void 0x0?_0x51b63a:[],{'id':_univerjs_sheets_drawing['SetDrawingApplyMutation']['id'],'params':{'unitId':_0x103472,'subUnitId':_0x2b7373,'op':_0x47a3fa,'objects':_0x28281b,'type':_univerjs_sheets_drawing['DrawingApplyType']['UPDATE']}},{'id':_univerjs_sheets_drawing[_0x4aeb09(0x1c4)]['id'],'params':[_0x103472]},..._0x2547f0[_0x4aeb09(0x201)]],_0x3156ec=[...(_0x3fde81=_0x2547f0[_0x4aeb09(0x167)])!==null&&_0x3fde81!==void 0x0?_0x3fde81:[],{'id':_univerjs_sheets_drawing[_0x4aeb09(0x1d2)]['id'],'params':{'unitId':_0x103472,'subUnitId':_0x2b7373,'op':_0x2ace1c,'objects':_0x28281b,'type':_univerjs_sheets_drawing['DrawingApplyType'][_0x4aeb09(0x1b6)]}},{'id':_univerjs_sheets_drawing[_0x4aeb09(0x1c4)]['id'],'params':[_0x103472]},..._0x2547f0['undos']];if((0x0,_univerjs_core[_0x4aeb09(0x1c3)])(_0x4b68a3,_0x562f67)[_0x4aeb09(0x212)])return _0x489fae[_0x4aeb09(0x157)]({'unitID':_0x103472,'undoMutations':_0x3156ec,'redoMutations':_0x4b68a3}),!![];return![];}},SetSheetsShapeTextVerticalToggleCommand={'type':_univerjs_core[_0x3add6b(0x155)][_0x3add6b(0x1e6)],'id':_0x3add6b(0x189),'handler':(_0x40078f,_0xa2bbd9)=>{const _0x48c241=_0x3add6b;var _0x22ea11;const _0xdddfb6=(0x0,_univerjs_sheets[_0x48c241(0x162)])(_0x40078f[_0x48c241(0x19c)](_univerjs_core[_0x48c241(0x1ee)]),_0xa2bbd9);if(!_0xdddfb6)return![];const {unitId:_0x7c9b4b,subUnitId:_0x3af391}=_0xdddfb6,{shapeId:_0x1eae7a}=_0xa2bbd9,_0x13a02b=_0x40078f[_0x48c241(0x19c)](SheetsShapeService)[_0x48c241(0x17d)](_0x7c9b4b,_0x3af391,_0x1eae7a);if(!_0x13a02b)return![];const _0x219329=_0x13a02b[_0x48c241(0x152)](),_0x10f9f7=(_0x22ea11=_0x219329===null||_0x219329===void 0x0?void 0x0:_0x219329[_0x48c241(0x20e)])!==null&&_0x22ea11!==void 0x0?_0x22ea11:!![],_0x440b82=!_0x10f9f7,_0x20d11d=_0x40078f['get'](_univerjs_core[_0x48c241(0x1b5)]),_0x3cd189=_0x40078f[_0x48c241(0x19c)](_univerjs_core[_0x48c241(0x172)]),_0x5d79cc={'unitId':_0x7c9b4b,'subUnitId':_0x3af391,'shapeId':_0x1eae7a,'shapeData':{'shapeText':{'isHorizontal':_0x440b82}}},_0x42c252={'unitId':_0x7c9b4b,'subUnitId':_0x3af391,'shapeId':_0x1eae7a,'shapeData':{'shapeText':{'isHorizontal':_0x10f9f7}}},_0x135f7c=[{'id':UpdateSheetsShapeDataMutation['id'],'params':_0x5d79cc}],_0x32a5df=[{'id':UpdateSheetsShapeDataMutation['id'],'params':_0x42c252}];if((0x0,_univerjs_core['sequenceExecute'])(_0x135f7c,_0x20d11d)[_0x48c241(0x212)])return _0x3cd189[_0x48c241(0x157)]({'unitID':_0x7c9b4b,'undoMutations':_0x32a5df,'redoMutations':_0x135f7c}),!![];return![];}},UpdateConnectorRelationCommand={'type':_univerjs_core[_0x3add6b(0x155)][_0x3add6b(0x1e6)],'id':_0x3add6b(0x173),'handler':(_0x49c640,_0x4710fe)=>{const _0x5d7a29=_0x3add6b;var _0x49b101,_0x501213,_0x386e18,_0x197845;const _0x4f6c3c=(0x0,_univerjs_sheets[_0x5d7a29(0x162)])(_0x49c640[_0x5d7a29(0x19c)](_univerjs_core[_0x5d7a29(0x1ee)]),_0x4710fe);if(!_0x4f6c3c)return![];const _0x2faa21=_0x49c640[_0x5d7a29(0x19c)](_univerjs_sheets[_0x5d7a29(0x20d)]),{unitId:_0x350b3a,subUnitId:_0x145dcc}=_0x4f6c3c,_0x897e57=_0x2faa21['getSkeleton'](_0x350b3a,_0x145dcc);if(!_0x897e57)return![];const _0x5208a7=_0x49c640[_0x5d7a29(0x19c)](_univerjs_sheets_drawing['ISheetDrawingService']),{connectorShapeId:_0x5d3e32,width:_0x1540d5,height:_0x499870,left:_0x3ef48c,top:_0xf5a222,flipX:_0x332790,flipY:_0x1c7697,rotation:_0x85d6c5,oldAdjustValues:_0x9b446f,newAdjustValues:_0x3fe026,oldLineType:_0x10b24f,newLineType:_0x4d70ba,oldRelation:_0x565128,newRelation:_0x291c64}=_0x4710fe,_0x599d10=_0x5208a7[_0x5d7a29(0x159)]({'unitId':_0x350b3a,'subUnitId':_0x145dcc,'drawingId':_0x5d3e32});if(!_0x599d10)return![];const _0x39a213=_0x49c640[_0x5d7a29(0x19c)](SheetsShapeService)[_0x5d7a29(0x17d)](_0x350b3a,_0x145dcc,_0x5d3e32);if(!_0x39a213)return![];const _0x3d6cc1=_0x49c640[_0x5d7a29(0x19c)](_univerjs_core[_0x5d7a29(0x1b5)]),_0x1c0fcb=_0x49c640[_0x5d7a29(0x19c)](_univerjs_core[_0x5d7a29(0x172)]),_0x3d0d19=_0x49c640['get'](_univerjs_sheets[_0x5d7a29(0x1a2)]),_0x55279d={..._0x599d10['transform'],'width':_0x1540d5,'height':_0x499870,'left':_0x3ef48c,'top':_0xf5a222,'flipX':_0x332790,'flipY':_0x1c7697,'angle':(_0x49b101=_0x85d6c5!==null&&_0x85d6c5!==void 0x0?_0x85d6c5:(_0x501213=_0x599d10[_0x5d7a29(0x1cd)])===null||_0x501213===void 0x0?void 0x0:_0x501213[_0x5d7a29(0x17c)])!==null&&_0x49b101!==void 0x0?_0x49b101:0x0},_0x16eb27=(0x0,_univerjs_sheets_drawing['transformToDrawingPosition'])(_0x55279d,_0x897e57),_0x2811bf=(0x0,_univerjs_sheets_drawing[_0x5d7a29(0x205)])(_0x55279d,_0x897e57),_0x36c698=_0x39a213[_0x5d7a29(0x1a9)](),_0x44579f=_0x39a213[_0x5d7a29(0x186)](),_0x4afc7f={'unitId':_0x350b3a,'subUnitId':_0x145dcc,'drawingId':_0x5d3e32,'drawingType':_univerjs_core[_0x5d7a29(0x166)][_0x5d7a29(0x174)],'sheetTransform':_0x16eb27,'transform':_0x55279d,'data':{'shapeType':_0x4d70ba||_0x10b24f||_0x36c698,'shapeData':{..._0x44579f,'adjustValues':_0x3fe026||_0x9b446f||(_0x44579f===null||_0x44579f===void 0x0?void 0x0:_0x44579f[_0x5d7a29(0x1ce)]),'relation':_0x291c64||_0x565128||(_0x44579f===null||_0x44579f===void 0x0?void 0x0:_0x44579f[_0x5d7a29(0x161)])}},'axisAlignSheetTransform':_0x2811bf,'allowTransform':!![]},{undo:_0x4f3272,redo:_0x501f35,objects:_0x11fd68}=_0x5208a7[_0x5d7a29(0x200)]([_0x4afc7f]),_0x3091e4=_0x3d0d19[_0x5d7a29(0x1bb)]({'id':_univerjs_sheets_drawing['SetSheetDrawingCommand']['id'],'params':{'unitId':_0x350b3a,'drawings':[_0x4afc7f]}}),_0x5ac546=[...(_0x386e18=_0x3091e4[_0x5d7a29(0x14f)])!==null&&_0x386e18!==void 0x0?_0x386e18:[],{'id':_univerjs_sheets_drawing[_0x5d7a29(0x1d2)]['id'],'params':{'unitId':_0x350b3a,'subUnitId':_0x145dcc,'op':_0x501f35,'objects':_0x11fd68,'type':_univerjs_sheets_drawing[_0x5d7a29(0x202)][_0x5d7a29(0x1b6)]}},{'id':_univerjs_sheets_drawing[_0x5d7a29(0x1c4)]['id'],'params':[_0x350b3a]},..._0x3091e4[_0x5d7a29(0x201)],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x350b3a,'subUnitId':_0x145dcc,'shapeId':_0x5d3e32,'shapeType':_0x4d70ba,'shapeData':{'adjustValues':_0x3fe026,'relation':_0x291c64}}}],_0x132a5d=[...(_0x197845=_0x3091e4['preUndos'])!==null&&_0x197845!==void 0x0?_0x197845:[],{'id':_univerjs_sheets_drawing[_0x5d7a29(0x1d2)]['id'],'params':{'unitId':_0x350b3a,'subUnitId':_0x145dcc,'op':_0x4f3272,'objects':_0x11fd68,'type':_univerjs_sheets_drawing[_0x5d7a29(0x202)][_0x5d7a29(0x1b6)]}},{'id':_univerjs_sheets_drawing['ClearSheetDrawingTransformerOperation']['id'],'params':[_0x350b3a]},..._0x3091e4[_0x5d7a29(0x1fe)],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x350b3a,'subUnitId':_0x145dcc,'shapeId':_0x5d3e32,'shapeType':_0x36c698,'shapeData':{..._0x44579f,'adjustValues':_0x9b446f||(_0x44579f===null||_0x44579f===void 0x0?void 0x0:_0x44579f[_0x5d7a29(0x1ce)]),'relation':_0x565128||(_0x44579f===null||_0x44579f===void 0x0?void 0x0:_0x44579f[_0x5d7a29(0x161)])}}}];if((0x0,_univerjs_core[_0x5d7a29(0x1c3)])(_0x5ac546,_0x3d6cc1)[_0x5d7a29(0x212)])return _0x1c0fcb[_0x5d7a29(0x157)]({'unitID':_0x350b3a,'undoMutations':_0x132a5d,'redoMutations':_0x5ac546}),!![];return![];}},UpdateLineShapeResizeCommand={'type':_univerjs_core[_0x3add6b(0x155)][_0x3add6b(0x1e6)],'id':'sheet.command.update-line-shape-resize','handler':(_0x497f6c,_0x5a33b6)=>{const _0x2bf45c=_0x3add6b;var _0x23d722,_0x250112;const _0x16a45f=(0x0,_univerjs_sheets[_0x2bf45c(0x162)])(_0x497f6c['get'](_univerjs_core[_0x2bf45c(0x1ee)]),_0x5a33b6);if(!_0x16a45f)return![];const _0x54ce1e=_0x497f6c[_0x2bf45c(0x19c)](_univerjs_sheets[_0x2bf45c(0x20d)]),{unitId:_0x5e6e5a,subUnitId:_0x12b9dd}=_0x16a45f,_0x39305d=_0x54ce1e[_0x2bf45c(0x1b1)](_0x5e6e5a,_0x12b9dd);if(!_0x39305d)return![];const _0x10e7bb=_0x497f6c['get'](_univerjs_sheets_drawing[_0x2bf45c(0x188)]),{shapeId:_0x240387,width:_0x55f688,height:_0x803263,left:_0x3a77a8,top:_0x11150e,flipX:_0x558c7d,flipY:_0x3b9075,angle:_0x514859,oldAdjustValues:_0x12c713,newAdjustValues:_0x7d0cb3,oldLineType:_0x3bf08a,newLineType:_0xd15ac0}=_0x5a33b6,_0x301db8=_0x10e7bb[_0x2bf45c(0x159)]({'unitId':_0x5e6e5a,'subUnitId':_0x12b9dd,'drawingId':_0x240387});if(!_0x301db8)return![];const _0x2ea41c=_0x497f6c[_0x2bf45c(0x19c)](SheetsShapeService)[_0x2bf45c(0x17d)](_0x5e6e5a,_0x12b9dd,_0x240387);if(!_0x2ea41c)return![];const _0x30c55b=_0x497f6c[_0x2bf45c(0x19c)](_univerjs_core[_0x2bf45c(0x1b5)]),_0x15f39a=_0x497f6c['get'](_univerjs_core[_0x2bf45c(0x172)]),_0x9e0980=_0x497f6c[_0x2bf45c(0x19c)](_univerjs_sheets[_0x2bf45c(0x1a2)]),_0x37d840={..._0x301db8[_0x2bf45c(0x1cd)],'width':_0x55f688,'height':_0x803263,'left':_0x3a77a8,'top':_0x11150e,'flipX':_0x558c7d,'flipY':_0x3b9075,'angle':_0x514859},_0x5772c8=(0x0,_univerjs_sheets_drawing[_0x2bf45c(0x1da)])(_0x37d840,_0x39305d),_0x392031=(0x0,_univerjs_sheets_drawing['transformToAxisAlignPosition'])(_0x37d840,_0x39305d),_0x57c8e0=_0x2ea41c[_0x2bf45c(0x1a9)](),_0x4f7318=_0x2ea41c['getShapeData'](),_0x3cd205={'unitId':_0x5e6e5a,'subUnitId':_0x12b9dd,'drawingId':_0x240387,'drawingType':_univerjs_core['DrawingTypeEnum'][_0x2bf45c(0x174)],'sheetTransform':_0x5772c8,'transform':_0x37d840,'data':{'shapeType':_0xd15ac0||_0x3bf08a||_0x57c8e0,'shapeData':{..._0x4f7318,'adjustValues':_0x7d0cb3||_0x12c713||(_0x4f7318===null||_0x4f7318===void 0x0?void 0x0:_0x4f7318[_0x2bf45c(0x1ce)])}},'axisAlignSheetTransform':_0x392031,'allowTransform':!![]},{undo:_0x1fb088,redo:_0x138ec5,objects:_0x2a6927}=_0x10e7bb['getBatchUpdateOp']([_0x3cd205]),_0x17eeb4=_0x9e0980[_0x2bf45c(0x1bb)]({'id':_univerjs_sheets_drawing[_0x2bf45c(0x218)]['id'],'params':{'unitId':_0x5e6e5a,'drawings':[_0x3cd205]}}),_0x5ed9e7=[...(_0x23d722=_0x17eeb4['preRedos'])!==null&&_0x23d722!==void 0x0?_0x23d722:[],{'id':_univerjs_sheets_drawing[_0x2bf45c(0x1d2)]['id'],'params':{'unitId':_0x5e6e5a,'subUnitId':_0x12b9dd,'op':_0x138ec5,'objects':_0x2a6927,'type':_univerjs_sheets_drawing[_0x2bf45c(0x202)][_0x2bf45c(0x1b6)]}},{'id':_univerjs_sheets_drawing[_0x2bf45c(0x1c4)]['id'],'params':[_0x5e6e5a]},..._0x17eeb4[_0x2bf45c(0x201)],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x5e6e5a,'subUnitId':_0x12b9dd,'shapeId':_0x240387,'shapeType':_0xd15ac0,'shapeData':{'adjustValues':_0x7d0cb3}}}],_0x38d2bf=[...(_0x250112=_0x17eeb4[_0x2bf45c(0x167)])!==null&&_0x250112!==void 0x0?_0x250112:[],{'id':_univerjs_sheets_drawing['SetDrawingApplyMutation']['id'],'params':{'unitId':_0x5e6e5a,'subUnitId':_0x12b9dd,'op':_0x1fb088,'objects':_0x2a6927,'type':_univerjs_sheets_drawing['DrawingApplyType'][_0x2bf45c(0x1b6)]}},{'id':_univerjs_sheets_drawing[_0x2bf45c(0x1c4)]['id'],'params':[_0x5e6e5a]},..._0x17eeb4['undos'],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x5e6e5a,'subUnitId':_0x12b9dd,'shapeId':_0x240387,'shapeType':_0x57c8e0,'shapeData':{..._0x4f7318,'adjustValues':_0x12c713||(_0x4f7318===null||_0x4f7318===void 0x0?void 0x0:_0x4f7318[_0x2bf45c(0x1ce)])}}}];if((0x0,_univerjs_core['sequenceExecute'])(_0x5ed9e7,_0x30c55b)['result'])return _0x15f39a[_0x2bf45c(0x157)]({'unitID':_0x5e6e5a,'undoMutations':_0x38d2bf,'redoMutations':_0x5ed9e7}),!![];return![];}},UpdateSheetsShapeTypeMutation={'id':_0x3add6b(0x180),'type':_univerjs_core[_0x3add6b(0x155)][_0x3add6b(0x1be)],'handler':(_0xf8147d,_0x2272b0)=>{const _0xa656e3=_0x3add6b,{unitId:_0xd4648b,subUnitId:_0x2cc9d6,shapeType:_0x563ddc,shapeId:_0x547677,shapeData:_0x591146}=_0x2272b0,_0x112450=_0xf8147d[_0xa656e3(0x19c)](SheetsShapeService)[_0xa656e3(0x17d)](_0xd4648b,_0x2cc9d6,_0x547677);if(_0x112450){_0x112450[_0xa656e3(0x1dc)](_0x563ddc);if(_0x591146)_0x112450===null||_0x112450===void 0x0||_0x112450[_0xa656e3(0x1ab)](_0x591146);}return!![];}},UpdateSheetsShapeTypeCommand={'id':_0x3add6b(0x1a7),'type':_univerjs_core[_0x3add6b(0x155)][_0x3add6b(0x1e6)],'handler':(_0x2f2267,_0x394350)=>{const _0x52e7c1=_0x3add6b;if(!_0x394350)return![];const _0x8bbc71=_0x2f2267['get'](_univerjs_core[_0x52e7c1(0x1b5)]),_0x566921=_0x2f2267[_0x52e7c1(0x19c)](SheetsShapeService),_0x4b713a=_0x2f2267[_0x52e7c1(0x19c)](_univerjs_core[_0x52e7c1(0x172)]),_0x40b593=[],_0x21593e=[],{unitId:_0x53b7ab,subUnitId:_0x3073fb,shapeId:_0x3cdd05,shapeType:_0x22eb3f,shapeData:_0x5133b0}=_0x394350,_0x5e02e2=_0x566921[_0x52e7c1(0x17d)](_0x53b7ab,_0x3073fb,_0x3cdd05);if(_0x5e02e2){const _0x4fc9a3=_0x5e02e2[_0x52e7c1(0x1a9)](),_0x5acd2b=Object[_0x52e7c1(0x195)]({},_0x5e02e2[_0x52e7c1(0x186)]()),_0x4327f4={'unitId':_0x53b7ab,'subUnitId':_0x3073fb,'shapeId':_0x3cdd05,'shapeType':_0x22eb3f,'shapeData':_0x5133b0},_0x281fe1={'unitId':_0x53b7ab,'subUnitId':_0x3073fb,'shapeId':_0x3cdd05,'shapeType':_0x4fc9a3,'shapeData':_0x5acd2b};_0x40b593[_0x52e7c1(0x182)]({'id':UpdateSheetsShapeTypeMutation['id'],'params':_0x4327f4}),_0x21593e[_0x52e7c1(0x182)]({'id':UpdateSheetsShapeTypeMutation['id'],'params':_0x281fe1});if(_0x40b593[_0x52e7c1(0x1b7)](_0x4f9229=>_0x8bbc71[_0x52e7c1(0x1c8)](_0x4f9229['id'],_0x4f9229[_0x52e7c1(0x1f5)])))_0x4b713a[_0x52e7c1(0x157)]({'unitID':_0x53b7ab,'redoMutations':[..._0x40b593],'undoMutations':[..._0x21593e]});return!![];}return![];}};var name=_0x3add6b(0x1e8),version='0.22.0';const SHEETS_SHAPE_PLUGIN_CONFIG_KEY=_0x3add6b(0x198),configSymbol=Symbol(SHEETS_SHAPE_PLUGIN_CONFIG_KEY),defaultPluginConfig={};let SheetsShapeController=class SheetsShapeController extends _univerjs_core['Disposable']{constructor(_0x1e1b9a,_0x354826,_0x3e9a27,_0x354ed8,_0x3764d2){const _0x26cadc=_0x3add6b;super(),this[_0x26cadc(0x193)]=_0x1e1b9a,this[_0x26cadc(0x1fd)]=_0x354826,this[_0x26cadc(0x1b9)]=_0x3e9a27,this[_0x26cadc(0x194)]=_0x354ed8,this['_drawingManagerService']=_0x3764d2,this[_0x26cadc(0x156)](),this['_initCommandInterceptor']();}['_initCommands'](){const _0x327cb3=_0x3add6b;[InsertShapeCommand,SetShapeDrawingDataCommand,ToggleSheetsShapeFlipCommand,SetSheetsShapeRotateCommand,SetSheetsShapeTextVerticalToggleCommand,UpdateConnectorRelationCommand,UpdateLineShapeResizeCommand,InsertSheetsShapeMutation,RemoveSheetsShapeMutation,UpdateSheetsShapeTypeMutation,UpdateSheetsShapeDataMutation][_0x327cb3(0x1b3)](_0x23e021=>this[_0x327cb3(0x1ba)](this[_0x327cb3(0x193)]['registerCommand'](_0x23e021)));}[_0x3add6b(0x1f3)](){const _0x1ba492=_0x3add6b;this['disposeWithMe'](this[_0x1ba492(0x1fd)][_0x1ba492(0x1d5)]({'getMutations':_0xaf68d3=>{const _0x3c58c6=_0x1ba492;if(_0xaf68d3['id']===_univerjs_sheets_drawing[_0x3c58c6(0x207)]['id']){const {drawings:_0x543e22}=_0xaf68d3[_0x3c58c6(0x1f5)],_0x20aa5e=_0x543e22[_0x3c58c6(0x15a)](_0x45ec6e=>_0x45ec6e[_0x3c58c6(0x1f7)]===_univerjs_core[_0x3c58c6(0x166)]['DRAWING_SHAPE']);if(_0x20aa5e[_0x3c58c6(0x16b)]===0x0)return{'preRedos':[],'redos':[],'preUndos':[],'undos':[]};const _0x41974d=[],_0x5ef199=[];return _0x20aa5e[_0x3c58c6(0x1b3)](_0x4d5b1d=>{const _0x2566d1=_0x3c58c6,{unitId:_0x4cf296,subUnitId:_0x3ac355,drawingId:_0x51b56e}=_0x4d5b1d,_0x59a594=this[_0x2566d1(0x194)][_0x2566d1(0x17d)](_0x4cf296,_0x3ac355,_0x51b56e);if(!_0x59a594)throw new TypeError(_0x2566d1(0x1db)+_0x59a594);_0x41974d['push']({'id':RemoveSheetsShapeMutation['id'],'params':{'unitId':_0x4cf296,'subUnitId':_0x3ac355,'shapeId':_0x51b56e}}),_0x5ef199['push']({'id':InsertSheetsShapeMutation['id'],'params':{'unitId':_0x4cf296,'subUnitId':_0x3ac355,'shapeId':_0x51b56e,'shapeType':_0x59a594['getShapeType'](),'shapeData':_0x59a594[_0x2566d1(0x186)]()}});const _0x1fdeaf=this[_0x2566d1(0x194)][_0x2566d1(0x15d)](_0x4cf296,_0x3ac355,_0x51b56e);if(_0x1fdeaf)for(const _0x499980 of _0x1fdeaf){const _0x3f2c90=_0x499980['lineShapeId'],_0x3daaff=_0x499980[_0x2566d1(0x1f8)],_0x586e03=_0x3daaff?{'from':void 0x0}:{'to':void 0x0},_0x28122a=_0x3daaff?{'from':{'shapeId':_0x499980[_0x2566d1(0x1e7)],'cxnIndex':_0x499980[_0x2566d1(0x1ef)]}}:{'to':{'shapeId':_0x499980[_0x2566d1(0x1e7)],'cxnIndex':_0x499980[_0x2566d1(0x1ef)]}};_0x41974d['push']({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x4cf296,'subUnitId':_0x3ac355,'shapeId':_0x3f2c90,'shapeData':{'relation':_0x586e03}}}),_0x5ef199[_0x2566d1(0x182)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x4cf296,'subUnitId':_0x3ac355,'shapeId':_0x3f2c90,'shapeData':{'relation':_0x28122a}}});}}),{'preRedos':_0x41974d,'redos':[],'preUndos':[],'undos':_0x5ef199};}if(_0xaf68d3['id']===_univerjs_sheets_drawing['SetSheetDrawingCommand']['id']){const {drawings:_0x39eba2}=_0xaf68d3['params'],_0x57903f=_0x39eba2[_0x3c58c6(0x15a)](_0x4ae2c7=>_0x4ae2c7[_0x3c58c6(0x1f7)]===_univerjs_core['DrawingTypeEnum']['DRAWING_SHAPE']);if(_0x57903f[_0x3c58c6(0x16b)]===0x0)return{'preRedos':[],'redos':[],'preUndos':[],'undos':[]};const _0x50828a=[],_0x5796b5=[];for(const _0x558bf6 of _0x57903f){const {unitId:_0x1e6e0b,subUnitId:_0x367016,drawingId:_0x3be320,transform:_0x31438b}=_0x558bf6;if(!_0x1e6e0b||!_0x367016||!_0x3be320||!_0x31438b)continue;const _0x3b8c6a=this[_0x3c58c6(0x194)][_0x3c58c6(0x17d)](_0x1e6e0b,_0x367016,_0x3be320);if(!_0x3b8c6a)throw new TypeError('Fail\x20to\x20get\x20shape\x20model,\x20get:\x20'+_0x3b8c6a);if((0x0,_univerjs_pro_engine_shape[_0x3c58c6(0x1cb)])(_0x3b8c6a[_0x3c58c6(0x1a9)]())){const _0x20f437=this[_0x3c58c6(0x194)][_0x3c58c6(0x215)](_0x1e6e0b,_0x367016,_0x3be320),_0x442c7a={'from':void 0x0,'to':void 0x0};_0x20f437&&(_0x50828a[_0x3c58c6(0x182)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x1e6e0b,'subUnitId':_0x367016,'shapeId':_0x3be320,'shapeData':{'relation':_0x442c7a}}}),_0x5796b5[_0x3c58c6(0x182)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x1e6e0b,'subUnitId':_0x367016,'shapeId':_0x3be320,'shapeData':{'relation':_0x20f437}}}));}else{const _0x33aba3=this[_0x3c58c6(0x194)][_0x3c58c6(0x15d)](_0x1e6e0b,_0x367016,_0x3be320);if(_0x33aba3&&_0x33aba3['length']>0x0)for(const _0x16f177 of _0x33aba3){const _0x4f8d92=_0x16f177[_0x3c58c6(0x16c)],_0x1e2a8b=_0x16f177[_0x3c58c6(0x1f8)],_0x311adb=this['_sheetsShapeService'][_0x3c58c6(0x17d)](_0x1e6e0b,_0x367016,_0x4f8d92);if(!_0x311adb)continue;const _0x149747=_0x311adb[_0x3c58c6(0x16d)](),_0x2b72e3=_0x311adb[_0x3c58c6(0x14d)]();if(_0x149747&&_0x2b72e3)this[_0x3c58c6(0x1c6)](_0x1e6e0b,_0x367016,_0x4f8d92,_0x311adb,_0x149747,_0x2b72e3,_0x50828a,_0x5796b5,_0x3be320,_0x31438b);else this[_0x3c58c6(0x1bd)](_0x1e6e0b,_0x367016,_0x4f8d92,_0x311adb,_0x1e2a8b?_0x149747:_0x2b72e3,_0x1e2a8b,_0x50828a,_0x5796b5,_0x3be320,_0x31438b);}}}return{'preRedos':[],'redos':_0x50828a,'preUndos':_0x5796b5,'undos':[]};}return{'preRedos':[],'redos':[],'preUndos':[],'undos':[]};}}));}['_getConnectPointInfo'](_0x25643b,_0x46f0b9,_0x48b762,_0xafd522,_0x3f3299){const _0x4c77d8=_0x3add6b;if(!_0x46f0b9||!_0x48b762)return null;const {shapeId:_0x4c058d,cxnIndex:_0x25caa7}=_0x25643b,_0x593c89=this[_0x4c77d8(0x194)][_0x4c77d8(0x17d)](_0x46f0b9,_0x48b762,_0x4c058d);if(!_0x593c89)return null;const _0x3b3b71=this['_drawingManagerService'][_0x4c77d8(0x159)]({'unitId':_0x46f0b9,'subUnitId':_0x48b762,'drawingId':_0x4c058d});if(!(_0x3b3b71===null||_0x3b3b71===void 0x0?void 0x0:_0x3b3b71[_0x4c77d8(0x1cd)]))return null;let {left:left=0x0,top:top=0x0,width:width=0x0,height:height=0x0,flipX:flipX=![],flipY:flipY=![],angle:_0x92a12d}=_0x3b3b71[_0x4c77d8(0x1cd)];if(_0x3f3299&&_0xafd522===_0x4c058d){var _0x5df30a,_0x4ecda0,_0x28b43c,_0xe64303,_0x1430e2,_0x2bc499,_0xf4e884;left=(_0x5df30a=_0x3f3299[_0x4c77d8(0x153)])!==null&&_0x5df30a!==void 0x0?_0x5df30a:left,top=(_0x4ecda0=_0x3f3299[_0x4c77d8(0x1e9)])!==null&&_0x4ecda0!==void 0x0?_0x4ecda0:top,width=(_0x28b43c=_0x3f3299[_0x4c77d8(0x15e)])!==null&&_0x28b43c!==void 0x0?_0x28b43c:width,height=(_0xe64303=_0x3f3299[_0x4c77d8(0x1aa)])!==null&&_0xe64303!==void 0x0?_0xe64303:height,flipX=(_0x1430e2=_0x3f3299[_0x4c77d8(0x1a5)])!==null&&_0x1430e2!==void 0x0?_0x1430e2:flipX,flipY=(_0x2bc499=_0x3f3299[_0x4c77d8(0x1f2)])!==null&&_0x2bc499!==void 0x0?_0x2bc499:flipY,_0x92a12d=(_0xf4e884=_0x3f3299[_0x4c77d8(0x17c)])!==null&&_0xf4e884!==void 0x0?_0xf4e884:_0x92a12d;}_0x593c89[_0x4c77d8(0x1ad)]({'width':width,'height':height});const _0x309c26=_0x593c89['getConnectionSiteList']()[_0x4c77d8(0x1fb)](_0x2be185=>_0x2be185[_0x4c77d8(0x20a)]===_0x25caa7);if(!_0x309c26)return null;let _0x234e48=flipX?width-_0x309c26['x']:_0x309c26['x'],_0x47bf0f=flipY?height-_0x309c26['y']:_0x309c26['y'];if(_0x92a12d!==0x0&&_0x92a12d!==void 0x0&&_0x92a12d!==null){const _0x16e867=_0x92a12d*Math['PI']/0xb4,_0x8a0016=Math[_0x4c77d8(0x1f1)](_0x16e867),_0x31a210=Math[_0x4c77d8(0x187)](_0x16e867),_0x8660a=width/0x2,_0x1bed8f=height/0x2,_0x402b23=_0x234e48-_0x8660a,_0x40b42e=_0x47bf0f-_0x1bed8f;_0x234e48=_0x8660a+_0x402b23*_0x8a0016-_0x40b42e*_0x31a210,_0x47bf0f=_0x1bed8f+_0x402b23*_0x31a210+_0x40b42e*_0x8a0016;}_0x234e48+=left,_0x47bf0f+=top;let _0x553e22=_0x309c26['ang']/0xea60;if(flipX)_0x553e22=0xb4-_0x553e22;if(flipY)_0x553e22=-_0x553e22;_0x553e22+=_0x92a12d||0x0,_0x553e22=(_0x553e22%0x168+0x168)%0x168;const _0x6aae94=(0x0,_univerjs_pro_engine_shape[_0x4c77d8(0x150)])({'left':left,'top':top,'width':width,'height':height},_0x92a12d||0x0);return{'point':{'x':_0x234e48,'y':_0x47bf0f},'angle':_0x553e22,'bounds':_0x6aae94};}[_0x3add6b(0x1c6)](_0x12d5ce,_0x183e35,_0x5d8308,_0xf46256,_0x1a1025,_0x494579,_0x365852,_0x903636,_0x59cbd4,_0x22c3ef){const _0x2c538c=_0x3add6b,_0x1d6df6=this[_0x2c538c(0x1b9)][_0x2c538c(0x1b1)](_0x12d5ce,_0x183e35);if(!_0x1d6df6)return;const _0xf02145=_0xf46256[_0x2c538c(0x1b2)](),_0x148bd0=_0xf46256[_0x2c538c(0x208)](),_0x2faddf={},_0x2fd3bd={};_0x148bd0[_0x2c538c(0x1b3)](_0x4324f3=>{const _0x1f4925=_0x2c538c,_0x47f34e=_0xf46256[_0x1f4925(0x169)](_0x4324f3);_0x2fd3bd[_0x4324f3]=_0x47f34e!==null&&_0x47f34e!==void 0x0?_0x47f34e:0x0;});const _0x6c0fd6=this[_0x2c538c(0x160)](_0x1a1025,_0x12d5ce,_0x183e35,_0x59cbd4,_0x22c3ef),_0x5b71d=this[_0x2c538c(0x160)](_0x494579,_0x12d5ce,_0x183e35,_0x59cbd4,_0x22c3ef);if(_0x6c0fd6&&_0x5b71d){const _0x2ccea2=_0xf46256[_0x2c538c(0x1a9)](),_0x417950=(0x0,_univerjs_pro_engine_shape[_0x2c538c(0x1cf)])(_0x6c0fd6,_0x5b71d,_0x2ccea2);let _0x46c71b=_0x2ccea2;if(_0x417950){const _0x42d4ea=(0x0,_univerjs_pro_engine_shape[_0x2c538c(0x203)])(_0x417950,_0xf46256[_0x2c538c(0x1a9)]()),_0x45aa57=this[_0x2c538c(0x154)]['getDrawingData'](_0x12d5ce,_0x183e35);if(_0x45aa57&&_0x45aa57[_0x5d8308]){const _0x2118ab=_0x45aa57[_0x5d8308];_0x46c71b=_0x42d4ea[_0x2c538c(0x1ed)];for(const [_0xc2e28,_0x13f7cb]of Object[_0x2c538c(0x1b4)](_0x42d4ea[_0x2c538c(0x1ce)]))_0x2faddf[_0xc2e28]=_0x13f7cb;const _0x378a3e={..._0x2118ab[_0x2c538c(0x1cd)],'width':_0x42d4ea[_0x2c538c(0x196)]['width'],'height':_0x42d4ea['worldRect'][_0x2c538c(0x1aa)],'left':_0x42d4ea[_0x2c538c(0x196)][_0x2c538c(0x153)],'top':_0x42d4ea[_0x2c538c(0x196)][_0x2c538c(0x1e9)],'flipX':_0x42d4ea[_0x2c538c(0x196)][_0x2c538c(0x1a5)],'flipY':_0x42d4ea[_0x2c538c(0x196)][_0x2c538c(0x1f2)],'angle':_0x42d4ea[_0x2c538c(0x1e3)]},_0x3a4f4e=(0x0,_univerjs_sheets_drawing[_0x2c538c(0x1da)])(_0x378a3e,_0x1d6df6),_0x89ae4a=(0x0,_univerjs_sheets_drawing[_0x2c538c(0x205)])(_0x378a3e,_0x1d6df6),_0x1eeec={'unitId':_0x12d5ce,'subUnitId':_0x183e35,'drawingType':_univerjs_core[_0x2c538c(0x166)][_0x2c538c(0x174)],'drawingId':_0x5d8308,'transform':_0x378a3e,'sheetTransform':_0x3a4f4e,'axisAlignSheetTransform':_0x89ae4a},{unitId:_0x51dba2,subUnitId:_0x2cb218,undo:_0x59ad7b,redo:_0x1fed6b,objects:_0x1620d4}=this[_0x2c538c(0x154)][_0x2c538c(0x200)]([_0x1eeec]);_0x365852['push']({'id':_univerjs_sheets_drawing[_0x2c538c(0x1d2)]['id'],'params':{'unitId':_0x51dba2,'subUnitId':_0x2cb218,'op':_0x1fed6b,'objects':_0x1620d4,'type':_univerjs_sheets_drawing[_0x2c538c(0x202)]['UPDATE']}}),_0x903636['push']({'id':_univerjs_sheets_drawing[_0x2c538c(0x1d2)]['id'],'params':{'unitId':_0x51dba2,'subUnitId':_0x2cb218,'op':_0x59ad7b,'objects':_0x1620d4,'type':_univerjs_sheets_drawing[_0x2c538c(0x202)][_0x2c538c(0x1b6)]}});}_0xf46256[_0x2c538c(0x1f4)]();}_0x365852['push']({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x12d5ce,'subUnitId':_0x183e35,'shapeId':_0x5d8308,'shapeType':_0x46c71b,'shapeData':{'adjustValues':_0x2faddf,'relation':_0xf02145}}}),_0x903636['push']({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x12d5ce,'subUnitId':_0x183e35,'shapeId':_0x5d8308,'shapeType':_0x2ccea2,'shapeData':{'adjustValues':_0x2fd3bd,'relation':_0xf02145}}});}}[_0x3add6b(0x1bd)](_0x144415,_0x1a37fc,_0x3422ce,_0x51db20,_0x18b466,_0x96e6b3,_0x12cceb,_0x7ab5f1,_0x26bb36,_0xc8edb2){const _0x4c79cd=_0x3add6b;var _0x30901f;if(!_0x18b466)return;const _0x45b588=this['_sheetSkeletonService'][_0x4c79cd(0x1b1)](_0x144415,_0x1a37fc);if(!_0x45b588)return;const _0x2302cc=(_0x30901f=this[_0x4c79cd(0x154)]['getDrawingByParam']({'unitId':_0x144415,'subUnitId':_0x1a37fc,'drawingId':_0x26bb36}))===null||_0x30901f===void 0x0?void 0x0:_0x30901f[_0x4c79cd(0x1cd)];if(!_0x2302cc)return;const _0x26d524=_0x2302cc[_0x4c79cd(0x153)]!==_0xc8edb2[_0x4c79cd(0x153)]||_0x2302cc[_0x4c79cd(0x1e9)]!==_0xc8edb2['top'],_0x24df88=_0x2302cc[_0x4c79cd(0x15e)]!==_0xc8edb2[_0x4c79cd(0x15e)]||_0x2302cc['height']!==_0xc8edb2[_0x4c79cd(0x1aa)],_0x2a27b8=_0x2302cc[_0x4c79cd(0x1a5)]!==_0xc8edb2[_0x4c79cd(0x1a5)]||_0x2302cc[_0x4c79cd(0x1f2)]!==_0xc8edb2['flipY'],_0x5ae2ea=_0x2302cc[_0x4c79cd(0x17c)]!==_0xc8edb2['angle'];if(_0x26d524&&!_0x24df88&&!_0x2a27b8&&!_0x5ae2ea){var _0x59dba2,_0x3c975a,_0x16653,_0x57cf0a;const _0x41cb96=((_0x59dba2=_0xc8edb2[_0x4c79cd(0x153)])!==null&&_0x59dba2!==void 0x0?_0x59dba2:0x0)-((_0x3c975a=_0x2302cc[_0x4c79cd(0x153)])!==null&&_0x3c975a!==void 0x0?_0x3c975a:0x0),_0x2f7e3a=((_0x16653=_0xc8edb2['top'])!==null&&_0x16653!==void 0x0?_0x16653:0x0)-((_0x57cf0a=_0x2302cc[_0x4c79cd(0x1e9)])!==null&&_0x57cf0a!==void 0x0?_0x57cf0a:0x0),_0x29f4fa=this[_0x4c79cd(0x154)][_0x4c79cd(0x18d)](_0x144415,_0x1a37fc);if(_0x29f4fa&&_0x29f4fa[_0x3422ce]){var _0x7b6b13,_0x5e297c,_0x2fcb0f,_0x58d495;const _0x2b390c=_0x29f4fa[_0x3422ce],_0x3b951b={..._0x2b390c['transform'],'left':((_0x7b6b13=(_0x5e297c=_0x2b390c['transform'])===null||_0x5e297c===void 0x0?void 0x0:_0x5e297c['left'])!==null&&_0x7b6b13!==void 0x0?_0x7b6b13:0x0)+_0x41cb96,'top':((_0x2fcb0f=(_0x58d495=_0x2b390c[_0x4c79cd(0x1cd)])===null||_0x58d495===void 0x0?void 0x0:_0x58d495[_0x4c79cd(0x1e9)])!==null&&_0x2fcb0f!==void 0x0?_0x2fcb0f:0x0)+_0x2f7e3a},_0x4237e5=(0x0,_univerjs_sheets_drawing[_0x4c79cd(0x1da)])(_0x3b951b,_0x45b588),_0xe78956=(0x0,_univerjs_sheets_drawing['transformToAxisAlignPosition'])(_0x3b951b,_0x45b588),_0x41ab14={'unitId':_0x144415,'subUnitId':_0x1a37fc,'drawingType':_univerjs_core['DrawingTypeEnum'][_0x4c79cd(0x174)],'drawingId':_0x3422ce,'transform':_0x3b951b,'sheetTransform':_0x4237e5,'axisAlignSheetTransform':_0xe78956},{unitId:_0x27e9e5,subUnitId:_0x420853,undo:_0x3ed800,redo:_0x1c48d4,objects:_0x44dbdd}=this[_0x4c79cd(0x154)][_0x4c79cd(0x200)]([_0x41ab14]);_0x12cceb[_0x4c79cd(0x182)]({'id':_univerjs_sheets_drawing[_0x4c79cd(0x1d2)]['id'],'params':{'unitId':_0x27e9e5,'subUnitId':_0x420853,'op':_0x1c48d4,'objects':_0x44dbdd,'type':_univerjs_sheets_drawing[_0x4c79cd(0x202)][_0x4c79cd(0x1b6)]}}),_0x7ab5f1[_0x4c79cd(0x182)]({'id':_univerjs_sheets_drawing[_0x4c79cd(0x1d2)]['id'],'params':{'unitId':_0x27e9e5,'subUnitId':_0x420853,'op':_0x3ed800,'objects':_0x44dbdd,'type':_univerjs_sheets_drawing[_0x4c79cd(0x202)][_0x4c79cd(0x1b6)]}});}}else{const _0x1e0cea=_0x51db20[_0x4c79cd(0x16d)](),_0x5ead65=_0x51db20[_0x4c79cd(0x14d)]();this['_addLineRerouteUpdates'](_0x144415,_0x1a37fc,_0x3422ce,_0x51db20,_0x1e0cea,_0x5ead65,_0x12cceb,_0x7ab5f1,_0x26bb36,_0xc8edb2);}}};SheetsShapeController=__decorate([__decorateParam(0x0,_univerjs_core[_0x3add6b(0x1b5)]),__decorateParam(0x1,(0x0,_univerjs_core[_0x3add6b(0x176)])(_univerjs_sheets[_0x3add6b(0x1a2)])),__decorateParam(0x2,(0x0,_univerjs_core[_0x3add6b(0x176)])(_univerjs_sheets['SheetSkeletonService'])),__decorateParam(0x3,(0x0,_univerjs_core[_0x3add6b(0x176)])(SheetsShapeService)),__decorateParam(0x4,(0x0,_univerjs_core[_0x3add6b(0x176)])(_univerjs_drawing[_0x3add6b(0x16e)]))],SheetsShapeController);let UniverSheetsShapePlugin=class UniverSheetsShapePlugin extends _univerjs_core[_0x3add6b(0x1bf)]{constructor(_0x5133b5=defaultPluginConfig,_0x4cfe22,_0x1da6b8,_0x476ac8){const _0x52dc15=_0x3add6b;super(),this['_config']=_0x5133b5,this[_0x52dc15(0x1a4)]=_0x4cfe22,this['_commandService']=_0x1da6b8,this[_0x52dc15(0x1f6)]=_0x476ac8;const {..._0x326bc2}=(0x0,_univerjs_core['merge'])({},defaultPluginConfig,this['_config']);this[_0x52dc15(0x1f6)][_0x52dc15(0x1d1)](SHEETS_SHAPE_PLUGIN_CONFIG_KEY,_0x326bc2);}[_0x3add6b(0x175)](){const _0x4b1d7b=_0x3add6b,_0x1c6b30=this[_0x4b1d7b(0x1a4)];[[SheetShapeModelManager],[SheetsShapeService],[SheetsShapeController]][_0x4b1d7b(0x1b3)](_0x1e7242=>_0x1c6b30['add'](_0x1e7242)),(0x0,_univerjs_core[_0x4b1d7b(0x1d3)])(_0x1c6b30,[[SheetsShapeService],[SheetsShapeController]]);}};_defineProperty(UniverSheetsShapePlugin,_0x3add6b(0x163),_univerjs_core['UniverInstanceType'][_0x3add6b(0x1b8)]),_defineProperty(UniverSheetsShapePlugin,_0x3add6b(0x168),'SHEET_SHAPE_PLUGIN'),_defineProperty(UniverSheetsShapePlugin,_0x3add6b(0x178),name),_defineProperty(UniverSheetsShapePlugin,_0x3add6b(0x1e1),version),UniverSheetsShapePlugin=__decorate([(0x0,_univerjs_core['DependentOn'])(_univerjs_pro_license['UniverLicensePlugin']),__decorateParam(0x1,(0x0,_univerjs_core[_0x3add6b(0x176)])(_univerjs_core[_0x3add6b(0x1b0)])),__decorateParam(0x2,_univerjs_core[_0x3add6b(0x1b5)]),__decorateParam(0x3,_univerjs_core[_0x3add6b(0x165)])],UniverSheetsShapePlugin),exports[_0x3add6b(0x181)]=DEFAULT_SHAPE_HEIGHT,exports[_0x3add6b(0x1a8)]=DEFAULT_SHAPE_WIDTH,exports[_0x3add6b(0x190)]=InsertShapeCommand,exports[_0x3add6b(0x214)]=InsertSheetsShapeMutation,exports[_0x3add6b(0x1ec)]=RemoveSheetsShapeMutation,exports[_0x3add6b(0x1e0)]=SetShapeDrawingDataCommand,exports[_0x3add6b(0x1d7)]=SetSheetsShapeRotateCommand,exports[_0x3add6b(0x171)]=SetSheetsShapeTextVerticalToggleCommand,Object[_0x3add6b(0x206)](exports,'SheetsShapeService',{'enumerable':!![],'get':function(){return SheetsShapeService;}}),exports[_0x3add6b(0x192)]=ToggleSheetsShapeFlipCommand,Object[_0x3add6b(0x206)](exports,'UniverSheetsShapePlugin',{'enumerable':!![],'get':function(){return UniverSheetsShapePlugin;}}),exports[_0x3add6b(0x1df)]=UpdateConnectorRelationCommand,exports[_0x3add6b(0x1c7)]=UpdateLineShapeResizeCommand,exports[_0x3add6b(0x1d8)]=UpdateSheetsShapeDataMutation,exports[_0x3add6b(0x1cc)]=UpdateSheetsShapeTypeCommand,exports[_0x3add6b(0x1ac)]=UpdateSheetsShapeTypeMutation;
|
|
1
|
+
const _0x2c3098=_0x1dca;(function(_0x268f23,_0x4f516c){const _0x459c8e=_0x1dca,_0x1dbdc6=_0x268f23();while(!![]){try{const _0x437ae7=parseInt(_0x459c8e(0x181))/0x1*(parseInt(_0x459c8e(0x1a4))/0x2)+-parseInt(_0x459c8e(0x127))/0x3*(parseInt(_0x459c8e(0x101))/0x4)+parseInt(_0x459c8e(0x1a5))/0x5+-parseInt(_0x459c8e(0x179))/0x6*(parseInt(_0x459c8e(0x132))/0x7)+-parseInt(_0x459c8e(0x153))/0x8+parseInt(_0x459c8e(0x189))/0x9*(parseInt(_0x459c8e(0x138))/0xa)+parseInt(_0x459c8e(0x160))/0xb*(parseInt(_0x459c8e(0x186))/0xc);if(_0x437ae7===_0x4f516c)break;else _0x1dbdc6['push'](_0x1dbdc6['shift']());}catch(_0x28e5bf){_0x1dbdc6['push'](_0x1dbdc6['shift']());}}}(_0x4947,0x8bb63),Object[_0x2c3098(0xf4)](exports,Symbol['toStringTag'],{'value':_0x2c3098(0x191)}));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(_0x237cd0){'@babel/helpers - typeof';const _0x3906e4=_0x2c3098;return _typeof='function'==typeof Symbol&&_0x3906e4(0x14a)==typeof Symbol[_0x3906e4(0x125)]?function(_0x398848){return typeof _0x398848;}:function(_0x182618){const _0x264c1f=_0x3906e4;return _0x182618&&'function'==typeof Symbol&&_0x182618['constructor']===Symbol&&_0x182618!==Symbol['prototype']?_0x264c1f(0x14a):typeof _0x182618;},_typeof(_0x237cd0);}function toPrimitive(_0x4c8fcc,_0x223503){const _0x46495d=_0x2c3098;if(_0x46495d(0x1bd)!=_typeof(_0x4c8fcc)||!_0x4c8fcc)return _0x4c8fcc;var _0x4d2906=_0x4c8fcc[Symbol[_0x46495d(0x16c)]];if(void 0x0!==_0x4d2906){var _0x2ea2ce=_0x4d2906[_0x46495d(0x194)](_0x4c8fcc,_0x223503||_0x46495d(0x13b));if('object'!=_typeof(_0x2ea2ce))return _0x2ea2ce;throw new TypeError(_0x46495d(0x14e));}return(_0x46495d(0x1aa)===_0x223503?String:Number)(_0x4c8fcc);}function toPropertyKey(_0x1fc676){const _0xb688d9=_0x2c3098;var _0x80c68=toPrimitive(_0x1fc676,_0xb688d9(0x1aa));return _0xb688d9(0x14a)==_typeof(_0x80c68)?_0x80c68:_0x80c68+'';}function _defineProperty(_0x159d74,_0x25c224,_0x13ca1e){return(_0x25c224=toPropertyKey(_0x25c224))in _0x159d74?Object['defineProperty'](_0x159d74,_0x25c224,{'value':_0x13ca1e,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x159d74[_0x25c224]=_0x13ca1e,_0x159d74;}var SheetShapeModelManager=class extends _univerjs_core[_0x2c3098(0x102)]{constructor(){const _0x1d6b8f=_0x2c3098;super(),_defineProperty(this,_0x1d6b8f(0x112),new Map()),_defineProperty(this,_0x1d6b8f(0x109),new Set()),_defineProperty(this,_0x1d6b8f(0x18e),new Set());}[_0x2c3098(0x18c)](_0x220c70,_0x5e6ad9,_0x244554){const _0x36b46b=_0x2c3098,_0x528a3e=new _univerjs_pro_engine_shape[(_0x36b46b(0x117))](_0x220c70,_0x5e6ad9,_0x244554);this[_0x36b46b(0x112)]['set'](_0x5e6ad9,_0x528a3e);if((0x0,_univerjs_pro_engine_shape[_0x36b46b(0x1b3)])(_0x220c70))this['_linesIds']['add'](_0x5e6ad9);return _0x528a3e;}[_0x2c3098(0x149)](_0x58312c){const _0xae1da8=_0x2c3098,_0x4acf6f=[];for(const _0x29c432 of this['_linesIds']){const _0xac72d6=this['_shapes'][_0xae1da8(0x162)](_0x29c432);if(_0xac72d6){const _0x4f5340=_0xac72d6[_0xae1da8(0x1a2)]();if(_0x4f5340){var _0xa7fae5,_0x1454e9;if(((_0xa7fae5=_0x4f5340['from'])===null||_0xa7fae5===void 0x0?void 0x0:_0xa7fae5['shapeId'])===_0x58312c)_0x4acf6f[_0xae1da8(0x115)]({..._0x4f5340['from'],'lineShapeId':_0x29c432,'isFrom':!![]});if(((_0x1454e9=_0x4f5340['to'])===null||_0x1454e9===void 0x0?void 0x0:_0x1454e9[_0xae1da8(0x143)])===_0x58312c)_0x4acf6f[_0xae1da8(0x115)]({..._0x4f5340['to'],'lineShapeId':_0x29c432,'isFrom':![]});}}}return _0x4acf6f;}[_0x2c3098(0x187)](_0x37ecfd){const _0x55e247=_0x2c3098,_0x40a6ec=this[_0x55e247(0x112)][_0x55e247(0x162)](_0x37ecfd);if(_0x40a6ec)return _0x40a6ec[_0x55e247(0x1a2)]();}['getShapeType'](_0x11e0cd){const _0x4cf979=_0x2c3098,_0x48b9b1=this[_0x4cf979(0x112)][_0x4cf979(0x162)](_0x11e0cd);if(_0x48b9b1)return _0x48b9b1['getShapeType']();}[_0x2c3098(0x140)](_0x59ea70){const _0x4f8164=_0x2c3098;return this[_0x4f8164(0x112)][_0x4f8164(0x1a9)](_0x59ea70);}[_0x2c3098(0x169)](_0x5823f2){const _0x4b718=_0x2c3098,_0x588ed5=this[_0x4b718(0x112)][_0x4b718(0x162)](_0x5823f2);if(!_0x588ed5)return;if((0x0,_univerjs_pro_engine_shape['isConnectorShape'])(_0x588ed5['getShapeType']()))this[_0x4b718(0x109)][_0x4b718(0x147)](_0x5823f2);this[_0x4b718(0x112)][_0x4b718(0x147)](_0x5823f2);}[_0x2c3098(0x123)](){const _0x4b8843=_0x2c3098,_0xeca6a4=[];return this[_0x4b8843(0x112)]['forEach'](_0x3886e3=>{const _0x7c3b50=_0x4b8843;_0xeca6a4[_0x7c3b50(0x115)](_0x3886e3[_0x7c3b50(0x123)]());}),_0xeca6a4;}[_0x2c3098(0x124)](_0x613061){const _0x52cc5c=_0x2c3098;for(const _0x5f570d of _0x613061){const {id:_0x403e8b,shapeType:_0x14b885}=_0x5f570d,_0x1c3405=this[_0x52cc5c(0x18c)](_0x14b885,_0x403e8b,_0x5f570d[_0x52cc5c(0x184)]);if(_0x1c3405&&_0x1c3405[_0x52cc5c(0x15d)]())this['_linesIds'][_0x52cc5c(0x126)](_0x403e8b);}}[_0x2c3098(0xfe)](){const _0xf89905=_0x2c3098;if(this[_0xf89905(0x165)])return;this[_0xf89905(0x112)][_0xf89905(0x14d)](_0xf41e14=>{const _0x27c9b0=_0xf89905;_0xf41e14[_0x27c9b0(0xfe)]();}),this[_0xf89905(0x112)][_0xf89905(0x158)](),this[_0xf89905(0x109)]['clear'](),this[_0xf89905(0x18e)][_0xf89905(0x158)](),super[_0xf89905(0xfe)]();}};function __decorateParam(_0x5beb04,_0x23231d){return function(_0x1cb6c7,_0x17efa9){_0x23231d(_0x1cb6c7,_0x17efa9,_0x5beb04);};}function __decorate(_0x52de11,_0x147622,_0x377675,_0xbe6ed){const _0x1938f5=_0x2c3098;var _0x1072b0=arguments['length'],_0xdadf7d=_0x1072b0<0x3?_0x147622:_0xbe6ed===null?_0xbe6ed=Object[_0x1938f5(0x107)](_0x147622,_0x377675):_0xbe6ed,_0x5054b8;if(typeof Reflect==='object'&&typeof Reflect[_0x1938f5(0x11f)]===_0x1938f5(0x155))_0xdadf7d=Reflect[_0x1938f5(0x11f)](_0x52de11,_0x147622,_0x377675,_0xbe6ed);else{for(var _0x3b89ce=_0x52de11[_0x1938f5(0x1b5)]-0x1;_0x3b89ce>=0x0;_0x3b89ce--)if(_0x5054b8=_0x52de11[_0x3b89ce])_0xdadf7d=(_0x1072b0<0x3?_0x5054b8(_0xdadf7d):_0x1072b0>0x3?_0x5054b8(_0x147622,_0x377675,_0xdadf7d):_0x5054b8(_0x147622,_0x377675))||_0xdadf7d;}return _0x1072b0>0x3&&_0xdadf7d&&Object[_0x1938f5(0xf4)](_0x147622,_0x377675,_0xdadf7d),_0xdadf7d;}const SHEET_SHAPE_PLUGIN='SHEET_SHAPE_PLUGIN';let SheetsShapeService=class SheetsShapeService extends _univerjs_core[_0x2c3098(0x102)]{constructor(_0x1c1996){const _0x3f131d=_0x2c3098;super(),this[_0x3f131d(0x195)]=_0x1c1996,_defineProperty(this,_0x3f131d(0xfd),new Map()),this['_initSnapshot']();}['_ensureShapeModelManager'](_0xea311c,_0x310c06){const _0x14e515=_0x2c3098;let _0x262026=this[_0x14e515(0xfd)][_0x14e515(0x162)](_0xea311c);!_0x262026&&(_0x262026=new Map(),this[_0x14e515(0xfd)][_0x14e515(0x19c)](_0xea311c,_0x262026));let _0xfe83d0=_0x262026[_0x14e515(0x162)](_0x310c06);return!_0xfe83d0&&(_0xfe83d0=new SheetShapeModelManager(),_0x262026['set'](_0x310c06,_0xfe83d0)),_0xfe83d0;}[_0x2c3098(0x134)](_0xc791b0,_0x14f95d,_0x4b1933,_0x5d0d3d,_0x732e90){const _0x50e1f9=_0x2c3098;this['_ensureShapeModelManager'](_0xc791b0,_0x14f95d)[_0x50e1f9(0x18c)](_0x4b1933,_0x5d0d3d,_0x732e90);}[_0x2c3098(0x169)](_0x29e007,_0x59638f,_0x857e7b){this['_ensureShapeModelManager'](_0x29e007,_0x59638f)['removeShape'](_0x857e7b);}[_0x2c3098(0x1a6)](_0x2cd5b5,_0x22fcfe,_0x2d78ad){const _0x149f13=_0x2c3098;return this[_0x149f13(0x159)](_0x2cd5b5,_0x22fcfe)[_0x149f13(0x111)](_0x2d78ad);}[_0x2c3098(0x111)](_0x40a825,_0x307ebc,_0xc37226){const _0x7c3628=_0x2c3098;return this[_0x7c3628(0x159)](_0x40a825,_0x307ebc)[_0x7c3628(0x111)](_0xc37226);}[_0x2c3098(0x140)](_0x103e4b,_0x208e49,_0x53dd0e){const _0x31d64f=_0x2c3098;return this[_0x31d64f(0x159)](_0x103e4b,_0x208e49)[_0x31d64f(0x140)](_0x53dd0e);}[_0x2c3098(0x173)](_0x2ed8df,_0x3c10ca,_0x4efb6e){const _0x231702=_0x2c3098;return this['_ensureShapeModelManager'](_0x2ed8df,_0x3c10ca)[_0x231702(0x111)](_0x4efb6e);}['getShapeDataById'](_0x4a8994,_0x329d6f,_0x588acb){const _0x347518=_0x2c3098,_0x2dcf9d=this[_0x347518(0x159)](_0x4a8994,_0x329d6f);if(!_0x2dcf9d[_0x347518(0x111)](_0x588acb))return;const _0x244304=_0x2dcf9d['_shapes'][_0x347518(0x162)](_0x588acb);if(!_0x244304)return;return _0x244304[_0x347518(0x154)]();}[_0x2c3098(0xfa)](_0x5d154c,_0x348098,_0x2233e1){const _0x3c63e4=_0x2c3098;return this[_0x3c63e4(0x159)](_0x5d154c,_0x348098)[_0x3c63e4(0x112)][_0x3c63e4(0x162)](_0x2233e1);}['getBasicShapeRelation'](_0x5b7c12,_0x216f43,_0x4321f0){const _0x368906=_0x2c3098;return this[_0x368906(0x159)](_0x5b7c12,_0x216f43)[_0x368906(0x149)](_0x4321f0);}[_0x2c3098(0x187)](_0x3bd66f,_0x59ab7f,_0x349fab){const _0xfb6cf5=_0x2c3098,_0x51883c=this[_0xfb6cf5(0x159)](_0x3bd66f,_0x59ab7f)[_0xfb6cf5(0x112)]['get'](_0x349fab);if(!_0x51883c)return;return _0x51883c[_0xfb6cf5(0x1a2)]();}[_0x2c3098(0x1b0)](){}['_serializeShapeForUnit'](_0x2a3088){const _0xc3bf32=_0x2c3098,_0xe812eb={},_0x237822=this[_0xc3bf32(0xfd)][_0xc3bf32(0x162)](_0x2a3088);if(_0x237822)_0x237822[_0xc3bf32(0x14d)]((_0x363efe,_0x9872e9)=>{const _0x180d87=_0xc3bf32,_0x33e43b=_0x363efe[_0x180d87(0x123)]();if(_0x33e43b[_0x180d87(0x1b5)]>0x0)_0xe812eb[_0x9872e9]=_0x33e43b;});return JSON[_0xc3bf32(0x170)](_0xe812eb);}['_deserializeShapeForUnit'](_0x277544,_0x112458){const _0x1c9b56=_0x2c3098;Object[_0x1c9b56(0x157)](_0x112458)['forEach'](_0x19cec0=>{const _0x252afe=_0x1c9b56;this['_ensureShapeModelManager'](_0x277544,_0x19cec0)[_0x252afe(0x124)](_0x112458[_0x19cec0]);});}[_0x2c3098(0x123)](){const _0x38ffbe=_0x2c3098,_0x45ddbd={};return this[_0x38ffbe(0xfd)][_0x38ffbe(0x14d)]((_0x5bdbd4,_0x334a6d)=>{const _0x2bec2e=_0x38ffbe;_0x45ddbd[_0x334a6d]={},_0x5bdbd4[_0x2bec2e(0x14d)]((_0x28790a,_0x4f5b3c)=>{const _0x516f76=_0x2bec2e;_0x45ddbd[_0x334a6d][_0x4f5b3c]=_0x28790a[_0x516f76(0x123)]();});}),_0x45ddbd;}[_0x2c3098(0x124)](_0x1b6d2e){const _0x4c110b=_0x2c3098;Object[_0x4c110b(0x157)](_0x1b6d2e)[_0x4c110b(0x14d)](_0x2f7041=>{const _0x40683f=_0x4c110b,_0x1d4b5c=_0x1b6d2e[_0x2f7041];Object[_0x40683f(0x157)](_0x1d4b5c)[_0x40683f(0x14d)](_0x2f0766=>{const _0x37832d=_0x40683f;this[_0x37832d(0x159)](_0x2f7041,_0x2f0766)[_0x37832d(0x124)](_0x1d4b5c[_0x2f0766]);});});}['_initSnapshot'](){const _0xa42324=_0x2c3098;this[_0xa42324(0x195)][_0xa42324(0x11d)]({'pluginName':SHEET_SHAPE_PLUGIN,'businesses':[_univerjs_core[_0xa42324(0x104)]['UNIVER_SHEET']],'toJson':_0x5e90fc=>this['_serializeShapeForUnit'](_0x5e90fc),'parseJson':_0x34559f=>JSON['parse'](_0x34559f),'onLoad':(_0x240b5d,_0x79cf20)=>{const _0x1fe5db=_0xa42324;this[_0x1fe5db(0x185)](_0x240b5d,_0x79cf20);},'onUnLoad':_0xa1625a=>{const _0x426f99=_0xa42324,_0x3e55d3=this[_0x426f99(0xfd)][_0x426f99(0x162)](_0xa1625a);_0x3e55d3&&(_0x3e55d3[_0x426f99(0x14d)](_0x5a476d=>{const _0x4a79af=_0x426f99;_0x5a476d[_0x4a79af(0xfe)]();}),this['_shapeModelManagerMap'][_0x426f99(0x147)](_0xa1625a));}});}['dispose'](){const _0x4e47ae=_0x2c3098;this['_shapeModelManagerMap'][_0x4e47ae(0x14d)](_0x1ac5ff=>{const _0x569a1b=_0x4e47ae;_0x1ac5ff[_0x569a1b(0x14d)](_0x8a19e9=>{const _0x6ab528=_0x569a1b;_0x8a19e9[_0x6ab528(0xfe)]();});});}};SheetsShapeService=__decorate([__decorateParam(0x0,_univerjs_core['IResourceManagerService'])],SheetsShapeService);function _0x4947(){const _0x1ecc6a=['REMOVE','ShapeModel','pushUndoRedo','getAdjustValueByName','_sheetsShapeService','entries','undos','registerPluginResource','Fail\x20to\x20get\x20shape\x20model,\x20get:\x20','decorate','preRedos','removeLinePoints','lineType','toJSON','fromJSON','iterator','add','20709anTjxJ','sheet.command.set-shape-rotate','RemoveSheetsShapeMutation','CommandType','IUndoRedoService','sheet.mutation.remove-shape','SetSheetDrawingCommand','startY','getCellIndexAndOffsetByPosition','UpdateLineShapeResizeCommand','@univerjs-pro/sheets-shape','2086XZqveG','redos','insertShape','getDrawingData','rotation','UniverSheetsShapePlugin','370HjRLYb','UpdateConnectorRelationCommand','data','default','_addLineFollowShapeUpdates','sheet.command.toggle-shape-flip','SheetSkeletonService','startX','hasShape','computeConnectorRouteLayout','IUniverInstanceService','shapeId','sheet.mutation.update-shape-data','height','borderEnabled','delete','InsertSheetDrawingCommand','getBasicShapeRelation','symbol','assign','sheet.command.update-connector-relation','forEach','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','lineShapeId','range','SetSheetsShapeTextVerticalToggleCommand','version','5015008dLYYOw','getShapeData','function','top','keys','clear','_ensureShapeModelManager','DEFAULT_SHAPE_WIDTH','UpdateSheetsShapeDataMutation','IDrawingManagerService','isLineShape','cos','params','77uRxMyA','ClearSheetDrawingTransformerOperation','get','_injector','filter','_disposed','generateRandomId','SetShapeDrawingDataCommand','isFrom','removeShape','_initCommands','IConfigService','toPrimitive','result','drawingType','routeConnectorLineShape','stringify','interceptCommand','ICommandService','getShapeTypeById','INSERT','setConfig','UniverLicensePlugin','worldRect','sheets-shape.config','8424lHJqFR','getDrawingByParam','getShapeTextData','DependentOn','_sheetSkeletonService','ToggleSheetsShapeFlipCommand','fill','relation','40133EDRHwC','UPDATE','COMMAND','shapeData','_deserializeShapeForUnit','1566168QkEYvH','getLineShapeRelation','SheetsShapeService','90567RAWcKl','rotateEnabled','resizeEnabled','addShape','InsertSheetsShapeMutation','_groupIds','SheetInterceptorService','left','Module','ensureSkeleton','DEFAULT_SHAPE_HEIGHT','call','_resourcesManagerService','getEndConnectInfo','_config','DRAWING_SHAPE','find','getBatchUpdateOp','disposeWithMe','set','registerCommand','setShapeData','getSkeleton','adjustValues','_drawingManagerService','getShapeRelation','type','28JYrzds','1161185TDgvMR','getBasicShapeType','ang','every','has','string','sheet.command.update-shape-type','SetDrawingApplyMutation','width','sequenceExecute','_configService','setShapeType','DrawingApplyType','getSheetCommandTarget','isConnectorShape','getStartConnectInfo','length','UpdateSheetsShapeTypeCommand','preUndos','UNIVER_SHEET','_sheetInterceptorService','Inject','flipX','_addLineRerouteUpdates','object','defineProperty','sheet.command.insert-shape','_getConnectPointInfo','SHEET_SHAPE_PLUGIN','ISheetDrawingService','InsertShapeCommand','getShapeModel','angle','index','_shapeModelManagerMap','dispose','transform','DrawingTypeEnum','268iVRqxx','Disposable','flipY','UniverInstanceType','pluginName','sheet.mutation.insert-shape','getOwnPropertyDescriptor','MUTATION','_linesIds','transformToAxisAlignPosition','packageName','onStarting','_commandService','getBatchAddOp','transformToDrawingPosition','sheet.command.update-line-shape-resize','getShapeType','_shapes','position','onCommandExecute','push'];_0x4947=function(){return _0x1ecc6a;};return _0x4947();}const InsertSheetsShapeMutation={'id':_0x2c3098(0x106),'type':_univerjs_core[_0x2c3098(0x12a)]['MUTATION'],'handler':(_0x3e7a99,_0x19ba93)=>{const _0x5a53c2=_0x2c3098,{unitId:_0x219dd1,subUnitId:_0x1d0edb,shapeType:_0x25c365,shapeId:_0x32a8b0,shapeData:_0x1cf631}=_0x19ba93;return _0x3e7a99[_0x5a53c2(0x162)](SheetsShapeService)['insertShape'](_0x219dd1,_0x1d0edb,_0x25c365,_0x32a8b0,_0x1cf631),!![];}},RemoveSheetsShapeMutation={'id':_0x2c3098(0x12c),'type':_univerjs_core[_0x2c3098(0x12a)][_0x2c3098(0x108)],'handler':(_0x4de2f2,_0x3ce882)=>{const {unitId:_0x193429,subUnitId:_0x67cf33,shapeId:_0x43d0af}=_0x3ce882;return _0x4de2f2['get'](SheetsShapeService)['removeShape'](_0x193429,_0x67cf33,_0x43d0af),!![];}},InsertShapeCommand={'type':_univerjs_core[_0x2c3098(0x12a)][_0x2c3098(0x183)],'id':_0x2c3098(0xf5),'handler':(_0x3913df,_0x5b22d5)=>{const _0x45c591=_0x2c3098;var _0x3cf2a7,_0x1b7e4e;const _0x2dc967=(0x0,_univerjs_sheets[_0x45c591(0x1b2)])(_0x3913df[_0x45c591(0x162)](_univerjs_core[_0x45c591(0x142)]),_0x5b22d5);if(!_0x2dc967)return![];const _0x7c9365=_0x3913df[_0x45c591(0x162)](_univerjs_sheets[_0x45c591(0x13e)]),{unitId:_0x3cd814,subUnitId:_0x8eda44}=_0x2dc967,_0x3ae8c9=_0x7c9365[_0x45c591(0x192)](_0x3cd814,_0x8eda44);if(!_0x3ae8c9)return![];const _0x14d573=_0x3913df['get'](_univerjs_core[_0x45c591(0x172)]),_0x430f08=_0x3913df['get'](_univerjs_core[_0x45c591(0x12b)]),_0x18afc9=_0x3913df['get'](_univerjs_sheets[_0x45c591(0x18f)]),_0x59ad2d=_0x3913df[_0x45c591(0x162)](_univerjs_sheets_drawing[_0x45c591(0xf8)]),{shapeType:_0x1d7d1f,shapeData:_0x53e699}=_0x5b22d5,_0x996d8d=_0x5b22d5[_0x45c591(0x143)]||(0x0,_univerjs_core[_0x45c591(0x166)])(),_0x103ae0={'unitId':_0x3cd814,'subUnitId':_0x8eda44,'shapeId':_0x996d8d,'shapeType':_0x1d7d1f,'shapeData':_0x53e699},_0x1c288e=_0x5b22d5[_0x45c591(0x1ad)]||0xc8,_0x34a229=_0x5b22d5['height']||0xc8;let _0xb83389=0x0,_0x9d4d7d=0x0,_0x4ceda7={'row':0x0,'rowOffset':0x0,'column':0x0,'columnOffset':0x0},_0x1a4105={'row':0x0,'rowOffset':0x0,'column':0x0,'columnOffset':0x0};if(_0x5b22d5[_0x45c591(0x113)]){const {x:_0x5ec9fb,y:_0x1f64aa}=_0x5b22d5[_0x45c591(0x113)];_0xb83389=_0x5ec9fb,_0x9d4d7d=_0x1f64aa,_0x4ceda7=_0x3ae8c9['getCellIndexAndOffsetByPosition'](_0x5ec9fb,_0x1f64aa),_0x1a4105=_0x3ae8c9[_0x45c591(0x12f)](_0x5ec9fb+_0x1c288e,_0x1f64aa+_0x34a229);}else{if(_0x5b22d5[_0x45c591(0x150)]){const {startRow:_0x28da70,startColumn:_0x57bb45}=_0x5b22d5[_0x45c591(0x150)],_0x5a389e=0xa,_0x8b410a=0xa;_0x4ceda7={'row':_0x28da70,'rowOffset':_0x5a389e,'column':_0x57bb45,'columnOffset':_0x8b410a};const _0x5dae10=_0x3ae8c9['getCellWithCoordByIndex'](_0x28da70,_0x57bb45);_0xb83389=_0x5dae10[_0x45c591(0x13f)]+_0x8b410a,_0x9d4d7d=_0x5dae10[_0x45c591(0x12e)]+_0x5a389e,_0x1a4105=_0x3ae8c9[_0x45c591(0x12f)](_0xb83389+_0x1c288e,_0x9d4d7d+_0x34a229);}}const _0x4a540f={'from':_0x4ceda7,'to':_0x1a4105},_0x594c4d={'unitId':_0x3cd814,'subUnitId':_0x8eda44,'drawingId':_0x996d8d,'drawingType':_univerjs_core[_0x45c591(0x100)][_0x45c591(0x198)],'sheetTransform':_0x4a540f,'transform':{'left':_0xb83389,'top':_0x9d4d7d,'width':_0x1c288e,'height':_0x34a229},'data':{'shapeType':_0x1d7d1f,'shapeData':_0x53e699},'axisAlignSheetTransform':_0x4a540f,'allowTransform':!![]};(0x0,_univerjs_pro_engine_shape['isConnectorShape'])(_0x1d7d1f)&&(_0x594c4d['data'][_0x45c591(0x17f)]=![],_0x594c4d[_0x45c591(0x13a)]['rotateEnabled']=![],_0x594c4d[_0x45c591(0x13a)]['resizeEnabled']=![],_0x594c4d[_0x45c591(0x13a)][_0x45c591(0x146)]=![],_0x594c4d[_0x45c591(0xff)][_0x45c591(0x18a)]=![],_0x594c4d[_0x45c591(0xff)][_0x45c591(0x18b)]=![],_0x594c4d[_0x45c591(0xff)][_0x45c591(0x146)]=![]);const {undo:_0x25ae57,redo:_0x288a73,objects:_0x2d4d40}=_0x59ad2d[_0x45c591(0x10e)]([_0x594c4d]),_0x4a0df5=_0x18afc9[_0x45c591(0x114)]({'id':_univerjs_sheets_drawing[_0x45c591(0x148)]['id'],'params':{'unitId':_0x3cd814,'drawings':[_0x594c4d]}}),_0x5541b8=[...(_0x3cf2a7=_0x4a0df5[_0x45c591(0x120)])!==null&&_0x3cf2a7!==void 0x0?_0x3cf2a7:[],{'id':_univerjs_sheets_drawing[_0x45c591(0x1ac)]['id'],'params':{'unitId':_0x3cd814,'subUnitId':_0x8eda44,'op':_0x288a73,'objects':_0x2d4d40,'type':_univerjs_sheets_drawing[_0x45c591(0x1b1)][_0x45c591(0x174)]}},{'id':_univerjs_sheets_drawing['ClearSheetDrawingTransformerOperation']['id'],'params':[_0x3cd814]},..._0x4a0df5[_0x45c591(0x133)],{'id':InsertSheetsShapeMutation['id'],'params':_0x103ae0}],_0x2130e0=[{'id':RemoveSheetsShapeMutation['id'],'params':{'unitId':_0x3cd814,'subUnitId':_0x8eda44,'shapeId':_0x996d8d}},...(_0x1b7e4e=_0x4a0df5[_0x45c591(0x1b7)])!==null&&_0x1b7e4e!==void 0x0?_0x1b7e4e:[],{'id':_univerjs_sheets_drawing[_0x45c591(0x1ac)]['id'],'params':{'unitId':_0x3cd814,'subUnitId':_0x8eda44,'op':_0x25ae57,'objects':_0x2d4d40,'type':_univerjs_sheets_drawing[_0x45c591(0x1b1)][_0x45c591(0x116)]}},{'id':_univerjs_sheets_drawing[_0x45c591(0x161)]['id'],'params':[_0x3cd814]},..._0x4a0df5[_0x45c591(0x11c)]];if((0x0,_univerjs_core[_0x45c591(0x1ae)])(_0x5541b8,_0x14d573)[_0x45c591(0x16d)])return _0x430f08[_0x45c591(0x118)]({'unitID':_0x3cd814,'undoMutations':_0x2130e0,'redoMutations':_0x5541b8}),!![];return![];}},UpdateSheetsShapeDataMutation={'id':_0x2c3098(0x144),'type':_univerjs_core[_0x2c3098(0x12a)][_0x2c3098(0x108)],'handler':(_0x4e80fb,_0x5ecc24)=>{const _0x36c208=_0x2c3098,{unitId:_0x3316b6,subUnitId:_0x1563bb,shapeType:_0x314fdf,shapeId:_0x466e66,shapeData:_0xbd375e}=_0x5ecc24,_0x280722=_0x4e80fb[_0x36c208(0x162)](SheetsShapeService)[_0x36c208(0xfa)](_0x3316b6,_0x1563bb,_0x466e66);if(_0x280722){if(_0x314fdf!==void 0x0)_0x280722[_0x36c208(0x1b0)](_0x314fdf);if(_0xbd375e)_0x280722===null||_0x280722===void 0x0||_0x280722['setShapeData'](_0xbd375e,!![]);}return!![];}},SetShapeDrawingDataCommand={'type':_univerjs_core[_0x2c3098(0x12a)][_0x2c3098(0x183)],'id':'sheet.command.set-shape-drawing-data','handler':(_0x23fec3,_0x4ac82c)=>{const _0x704fc5=_0x2c3098;var _0x5bb307,_0x5bdc57;const _0x165a33=(0x0,_univerjs_sheets[_0x704fc5(0x1b2)])(_0x23fec3['get'](_univerjs_core[_0x704fc5(0x142)]),_0x4ac82c);if(!_0x165a33)return![];const _0x1a9acd=_0x23fec3[_0x704fc5(0x162)](_univerjs_sheets['SheetSkeletonService']),{unitId:_0x54f8d7,subUnitId:_0x4b7d9e}=_0x165a33,_0x33ee29=_0x1a9acd['ensureSkeleton'](_0x54f8d7,_0x4b7d9e);if(!_0x33ee29)return![];const _0x5613f8=_0x23fec3[_0x704fc5(0x162)](SheetsShapeService),{shapeId:_0x28b13c,shapeType:_0x4f741a,shapeData:_0x364b81,position:_0x3fdbde,width:_0xa8a6e2,height:_0x2f3026}=_0x4ac82c,_0xbcd0e5=_0x5613f8[_0x704fc5(0xfa)](_0x54f8d7,_0x4b7d9e,_0x28b13c);if(!_0xbcd0e5)return![];const _0x399db8=_0x23fec3[_0x704fc5(0x162)](_univerjs_core[_0x704fc5(0x172)]),_0x3948b9=_0x23fec3['get'](_univerjs_core[_0x704fc5(0x12b)]),_0xa0c8f8=_0x23fec3[_0x704fc5(0x162)](_univerjs_sheets[_0x704fc5(0x18f)]),_0x24fe74=_0x23fec3[_0x704fc5(0x162)](_univerjs_sheets_drawing[_0x704fc5(0xf8)]),_0x1244d3={'unitId':_0x54f8d7,'subUnitId':_0x4b7d9e,'shapeId':_0x28b13c,'shapeType':_0x4f741a,'shapeData':_0x364b81},_0x51f3a9=_0xbcd0e5['getShapeType'](),_0x4ecb6b=_0xbcd0e5[_0x704fc5(0x154)](),{x:_0x5b9579,y:_0x2200a8}=_0x3fdbde,_0x21f02a={'from':_0x33ee29[_0x704fc5(0x12f)](_0x5b9579,_0x2200a8),'to':_0x33ee29[_0x704fc5(0x12f)](_0x5b9579+_0xa8a6e2,_0x2200a8+_0x2f3026)},_0x186724={'unitId':_0x54f8d7,'subUnitId':_0x4b7d9e,'drawingId':_0x28b13c,'drawingType':_univerjs_core[_0x704fc5(0x100)][_0x704fc5(0x198)],'sheetTransform':_0x21f02a,'transform':{'left':_0x5b9579,'top':_0x2200a8,'width':_0xa8a6e2,'height':_0x2f3026},'data':{'shapeType':_0x4f741a,'shapeData':_0x364b81},'axisAlignSheetTransform':_0x21f02a,'allowTransform':!![]};(0x0,_univerjs_pro_engine_shape[_0x704fc5(0x1b3)])(_0x4f741a)&&(_0x186724[_0x704fc5(0x13a)][_0x704fc5(0x17f)]=![],_0x186724[_0x704fc5(0x13a)][_0x704fc5(0x18a)]=![],_0x186724[_0x704fc5(0x13a)][_0x704fc5(0x18b)]=![],_0x186724[_0x704fc5(0x13a)][_0x704fc5(0x146)]=![],_0x186724[_0x704fc5(0xff)][_0x704fc5(0x18a)]=![],_0x186724[_0x704fc5(0xff)][_0x704fc5(0x18b)]=![],_0x186724[_0x704fc5(0xff)]['borderEnabled']=![]);const {undo:_0x322fa7,redo:_0x570bf4,objects:_0x55a888}=_0x24fe74['getBatchUpdateOp']([_0x186724]),_0x1a9450=_0xa0c8f8[_0x704fc5(0x114)]({'id':_univerjs_sheets_drawing['SetSheetDrawingCommand']['id'],'params':{'unitId':_0x54f8d7,'drawings':[_0x186724]}}),_0x40ff06=[...(_0x5bb307=_0x1a9450['preRedos'])!==null&&_0x5bb307!==void 0x0?_0x5bb307:[],{'id':_univerjs_sheets_drawing['SetDrawingApplyMutation']['id'],'params':{'unitId':_0x54f8d7,'subUnitId':_0x4b7d9e,'op':_0x570bf4,'objects':_0x55a888,'type':_univerjs_sheets_drawing['DrawingApplyType'][_0x704fc5(0x182)]}},{'id':_univerjs_sheets_drawing[_0x704fc5(0x161)]['id'],'params':[_0x54f8d7]},..._0x1a9450[_0x704fc5(0x133)],{'id':UpdateSheetsShapeDataMutation['id'],'params':_0x1244d3}],_0x1f0d77=[...(_0x5bdc57=_0x1a9450[_0x704fc5(0x1b7)])!==null&&_0x5bdc57!==void 0x0?_0x5bdc57:[],{'id':_univerjs_sheets_drawing[_0x704fc5(0x1ac)]['id'],'params':{'unitId':_0x54f8d7,'subUnitId':_0x4b7d9e,'op':_0x322fa7,'objects':_0x55a888,'type':_univerjs_sheets_drawing['DrawingApplyType']['UPDATE']}},{'id':_univerjs_sheets_drawing[_0x704fc5(0x161)]['id'],'params':[_0x54f8d7]},..._0x1a9450[_0x704fc5(0x11c)],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x54f8d7,'subUnitId':_0x4b7d9e,'shapeType':_0x51f3a9,'shapeId':_0x28b13c,'shapeData':_0x4ecb6b}}];if((0x0,_univerjs_core['sequenceExecute'])(_0x40ff06,_0x399db8)[_0x704fc5(0x16d)])return _0x3948b9['pushUndoRedo']({'unitID':_0x54f8d7,'undoMutations':_0x1f0d77,'redoMutations':_0x40ff06}),!![];return![];}},ToggleSheetsShapeFlipCommand={'type':_univerjs_core[_0x2c3098(0x12a)][_0x2c3098(0x183)],'id':_0x2c3098(0x13d),'handler':(_0x18fc87,_0x2268d9)=>{const _0x3b5c1b=_0x2c3098;var _0x558b41,_0x7ba1aa;const _0x479c3b=(0x0,_univerjs_sheets[_0x3b5c1b(0x1b2)])(_0x18fc87['get'](_univerjs_core[_0x3b5c1b(0x142)]),_0x2268d9);if(!_0x479c3b)return![];const _0x13ed8e=_0x18fc87[_0x3b5c1b(0x162)](_univerjs_sheets[_0x3b5c1b(0x13e)]),{unitId:_0x3d0f4d,subUnitId:_0x49ddbc}=_0x479c3b,_0x5c7b77=_0x13ed8e[_0x3b5c1b(0x19f)](_0x3d0f4d,_0x49ddbc);if(!_0x5c7b77)return![];const _0x2eb382=_0x18fc87['get'](_univerjs_sheets_drawing[_0x3b5c1b(0xf8)]),{shapeId:_0x491d7f,flipH:_0x324aa2,flipV:_0x22f520}=_0x2268d9,_0x340783=_0x2eb382[_0x3b5c1b(0x17a)]({'unitId':_0x3d0f4d,'subUnitId':_0x49ddbc,'drawingId':_0x491d7f});if(!_0x340783)return![];const _0x52ab24=_0x18fc87[_0x3b5c1b(0x162)](SheetsShapeService)[_0x3b5c1b(0xfa)](_0x3d0f4d,_0x49ddbc,_0x491d7f);if(!_0x52ab24)return![];const _0x43938a=_0x18fc87[_0x3b5c1b(0x162)](_univerjs_core['ICommandService']),_0x1258bc=_0x18fc87['get'](_univerjs_core[_0x3b5c1b(0x12b)]),_0x1ceda8=_0x18fc87[_0x3b5c1b(0x162)](_univerjs_sheets[_0x3b5c1b(0x18f)]),_0x4ec536={..._0x340783[_0x3b5c1b(0xff)]};if(_0x324aa2!==void 0x0)_0x4ec536[_0x3b5c1b(0x1bb)]=!_0x4ec536[_0x3b5c1b(0x1bb)];if(_0x22f520!==void 0x0)_0x4ec536['flipY']=!_0x4ec536[_0x3b5c1b(0x103)];const _0x5ab014=(0x0,_univerjs_sheets_drawing[_0x3b5c1b(0x10f)])(_0x4ec536,_0x5c7b77),_0x1dc46b=(0x0,_univerjs_sheets_drawing[_0x3b5c1b(0x10a)])(_0x4ec536,_0x5c7b77),_0x1f7f7a=_0x52ab24[_0x3b5c1b(0x111)](),_0x471c9d=_0x52ab24[_0x3b5c1b(0x154)](),_0x2f7ef8={'unitId':_0x3d0f4d,'subUnitId':_0x49ddbc,'drawingId':_0x491d7f,'drawingType':_univerjs_core[_0x3b5c1b(0x100)][_0x3b5c1b(0x198)],'sheetTransform':_0x5ab014,'transform':_0x4ec536,'data':{'shapeType':_0x1f7f7a,'shapeData':_0x471c9d},'axisAlignSheetTransform':_0x1dc46b,'allowTransform':!![]},{undo:_0x201a39,redo:_0x317b1,objects:_0x742360}=_0x2eb382['getBatchUpdateOp']([_0x2f7ef8]),_0x3b87e7=_0x1ceda8[_0x3b5c1b(0x114)]({'id':_univerjs_sheets_drawing[_0x3b5c1b(0x12d)]['id'],'params':{'unitId':_0x3d0f4d,'drawings':[_0x2f7ef8]}}),_0x465881=[...(_0x558b41=_0x3b87e7[_0x3b5c1b(0x120)])!==null&&_0x558b41!==void 0x0?_0x558b41:[],{'id':_univerjs_sheets_drawing[_0x3b5c1b(0x1ac)]['id'],'params':{'unitId':_0x3d0f4d,'subUnitId':_0x49ddbc,'op':_0x317b1,'objects':_0x742360,'type':_univerjs_sheets_drawing[_0x3b5c1b(0x1b1)][_0x3b5c1b(0x182)]}},{'id':_univerjs_sheets_drawing[_0x3b5c1b(0x161)]['id'],'params':[_0x3d0f4d]},..._0x3b87e7[_0x3b5c1b(0x133)]],_0x244ae4=[...(_0x7ba1aa=_0x3b87e7['preUndos'])!==null&&_0x7ba1aa!==void 0x0?_0x7ba1aa:[],{'id':_univerjs_sheets_drawing['SetDrawingApplyMutation']['id'],'params':{'unitId':_0x3d0f4d,'subUnitId':_0x49ddbc,'op':_0x201a39,'objects':_0x742360,'type':_univerjs_sheets_drawing[_0x3b5c1b(0x1b1)]['UPDATE']}},{'id':_univerjs_sheets_drawing[_0x3b5c1b(0x161)]['id'],'params':[_0x3d0f4d]},..._0x3b87e7[_0x3b5c1b(0x11c)]];if((0x0,_univerjs_pro_engine_shape[_0x3b5c1b(0x1b3)])(_0x1f7f7a)){const _0x166933=_0x52ab24[_0x3b5c1b(0x1a2)]();if(_0x166933){const _0x276b32={..._0x166933};_0x276b32['from']=void 0x0,_0x276b32['to']=void 0x0,_0x465881['push']({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x3d0f4d,'subUnitId':_0x49ddbc,'shapeId':_0x491d7f,'shapeType':_0x1f7f7a,'shapeData':{'relation':_0x276b32}}}),_0x244ae4['push']({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x3d0f4d,'subUnitId':_0x49ddbc,'shapeId':_0x491d7f,'shapeType':_0x1f7f7a,'shapeData':{'relation':_0x166933}}});}}if((0x0,_univerjs_core[_0x3b5c1b(0x1ae)])(_0x465881,_0x43938a)[_0x3b5c1b(0x16d)])return _0x1258bc['pushUndoRedo']({'unitID':_0x3d0f4d,'undoMutations':_0x244ae4,'redoMutations':_0x465881}),!![];return![];}},SetSheetsShapeRotateCommand={'type':_univerjs_core[_0x2c3098(0x12a)][_0x2c3098(0x183)],'id':_0x2c3098(0x128),'handler':(_0x5a7a89,_0x94c525)=>{const _0x4da424=_0x2c3098;var _0x205f1e,_0x116ee9;const _0x26d153=(0x0,_univerjs_sheets[_0x4da424(0x1b2)])(_0x5a7a89['get'](_univerjs_core['IUniverInstanceService']),_0x94c525);if(!_0x26d153)return![];const _0x4c8c6d=_0x5a7a89[_0x4da424(0x162)](_univerjs_sheets['SheetSkeletonService']),{unitId:_0x3da7fd,subUnitId:_0xdcdbbe}=_0x26d153,_0x515a06=_0x4c8c6d['getSkeleton'](_0x3da7fd,_0xdcdbbe);if(!_0x515a06)return![];const _0x18548e=_0x5a7a89['get'](_univerjs_sheets_drawing[_0x4da424(0xf8)]),{shapeId:_0x418aa9,rotate:_0x1753d5}=_0x94c525,_0x1cbdd7=_0x18548e[_0x4da424(0x17a)]({'unitId':_0x3da7fd,'subUnitId':_0xdcdbbe,'drawingId':_0x418aa9});if(!_0x1cbdd7)return![];const _0xa9618a=_0x5a7a89[_0x4da424(0x162)](SheetsShapeService)['getShapeModel'](_0x3da7fd,_0xdcdbbe,_0x418aa9);if(!_0xa9618a)return![];const _0xa8bd8d=_0x5a7a89[_0x4da424(0x162)](_univerjs_core['ICommandService']),_0x2e6c6d=_0x5a7a89[_0x4da424(0x162)](_univerjs_core['IUndoRedoService']),_0x14bc3f=_0x5a7a89[_0x4da424(0x162)](_univerjs_sheets[_0x4da424(0x18f)]),_0x148046={..._0x1cbdd7[_0x4da424(0xff)]};if(_0x1753d5!==void 0x0)_0x148046[_0x4da424(0xfb)]=(_0x148046[_0x4da424(0xfb)]||0x0)+_0x1753d5;const _0x1ecae2=(0x0,_univerjs_sheets_drawing['transformToDrawingPosition'])(_0x148046,_0x515a06),_0x4705d2=(0x0,_univerjs_sheets_drawing[_0x4da424(0x10a)])(_0x148046,_0x515a06),_0x447682=_0xa9618a[_0x4da424(0x111)](),_0x23ed82=_0xa9618a['getShapeData'](),_0x42a6f9={'unitId':_0x3da7fd,'subUnitId':_0xdcdbbe,'drawingId':_0x418aa9,'drawingType':_univerjs_core['DrawingTypeEnum']['DRAWING_SHAPE'],'sheetTransform':_0x1ecae2,'transform':_0x148046,'data':{'shapeType':_0x447682,'shapeData':_0x23ed82},'axisAlignSheetTransform':_0x4705d2,'allowTransform':!![]},{undo:_0x29196a,redo:_0x5ee9c9,objects:_0x1b5239}=_0x18548e[_0x4da424(0x19a)]([_0x42a6f9]),_0x331c11=_0x14bc3f[_0x4da424(0x114)]({'id':_univerjs_sheets_drawing[_0x4da424(0x12d)]['id'],'params':{'unitId':_0x3da7fd,'drawings':[_0x42a6f9]}}),_0x437027=[...(_0x205f1e=_0x331c11[_0x4da424(0x120)])!==null&&_0x205f1e!==void 0x0?_0x205f1e:[],{'id':_univerjs_sheets_drawing['SetDrawingApplyMutation']['id'],'params':{'unitId':_0x3da7fd,'subUnitId':_0xdcdbbe,'op':_0x5ee9c9,'objects':_0x1b5239,'type':_univerjs_sheets_drawing[_0x4da424(0x1b1)][_0x4da424(0x182)]}},{'id':_univerjs_sheets_drawing[_0x4da424(0x161)]['id'],'params':[_0x3da7fd]},..._0x331c11[_0x4da424(0x133)]],_0x31b074=[...(_0x116ee9=_0x331c11['preUndos'])!==null&&_0x116ee9!==void 0x0?_0x116ee9:[],{'id':_univerjs_sheets_drawing[_0x4da424(0x1ac)]['id'],'params':{'unitId':_0x3da7fd,'subUnitId':_0xdcdbbe,'op':_0x29196a,'objects':_0x1b5239,'type':_univerjs_sheets_drawing[_0x4da424(0x1b1)]['UPDATE']}},{'id':_univerjs_sheets_drawing[_0x4da424(0x161)]['id'],'params':[_0x3da7fd]},..._0x331c11[_0x4da424(0x11c)]];if((0x0,_univerjs_core[_0x4da424(0x1ae)])(_0x437027,_0xa8bd8d)[_0x4da424(0x16d)])return _0x2e6c6d[_0x4da424(0x118)]({'unitID':_0x3da7fd,'undoMutations':_0x31b074,'redoMutations':_0x437027}),!![];return![];}},SetSheetsShapeTextVerticalToggleCommand={'type':_univerjs_core[_0x2c3098(0x12a)]['COMMAND'],'id':'sheet.command.set-shape-text-vertical-toggle','handler':(_0x2c43fb,_0x5ba8b5)=>{const _0x7dd3e0=_0x2c3098;var _0x3522f0;const _0xcd7ae=(0x0,_univerjs_sheets[_0x7dd3e0(0x1b2)])(_0x2c43fb[_0x7dd3e0(0x162)](_univerjs_core[_0x7dd3e0(0x142)]),_0x5ba8b5);if(!_0xcd7ae)return![];const {unitId:_0xb2bdc7,subUnitId:_0x579a16}=_0xcd7ae,{shapeId:_0x395e35}=_0x5ba8b5,_0x263140=_0x2c43fb['get'](SheetsShapeService)['getShapeModel'](_0xb2bdc7,_0x579a16,_0x395e35);if(!_0x263140)return![];const _0x8eaaed=_0x263140[_0x7dd3e0(0x17b)](),_0x579c6d=(_0x3522f0=_0x8eaaed===null||_0x8eaaed===void 0x0?void 0x0:_0x8eaaed['isHorizontal'])!==null&&_0x3522f0!==void 0x0?_0x3522f0:!![],_0x54f8ac=!_0x579c6d,_0x365eb5=_0x2c43fb[_0x7dd3e0(0x162)](_univerjs_core[_0x7dd3e0(0x172)]),_0x12c421=_0x2c43fb[_0x7dd3e0(0x162)](_univerjs_core['IUndoRedoService']),_0x201a54={'unitId':_0xb2bdc7,'subUnitId':_0x579a16,'shapeId':_0x395e35,'shapeData':{'shapeText':{'isHorizontal':_0x54f8ac}}},_0x57e1db={'unitId':_0xb2bdc7,'subUnitId':_0x579a16,'shapeId':_0x395e35,'shapeData':{'shapeText':{'isHorizontal':_0x579c6d}}},_0x5d06db=[{'id':UpdateSheetsShapeDataMutation['id'],'params':_0x201a54}],_0x2e71d0=[{'id':UpdateSheetsShapeDataMutation['id'],'params':_0x57e1db}];if((0x0,_univerjs_core[_0x7dd3e0(0x1ae)])(_0x5d06db,_0x365eb5)[_0x7dd3e0(0x16d)])return _0x12c421[_0x7dd3e0(0x118)]({'unitID':_0xb2bdc7,'undoMutations':_0x2e71d0,'redoMutations':_0x5d06db}),!![];return![];}},UpdateConnectorRelationCommand={'type':_univerjs_core['CommandType']['COMMAND'],'id':_0x2c3098(0x14c),'handler':(_0x4f7d3e,_0x55a96e)=>{const _0x4e10f2=_0x2c3098;var _0x500789,_0x39ad21,_0x51b0b9,_0x1b0d25;const _0x53bcf9=(0x0,_univerjs_sheets['getSheetCommandTarget'])(_0x4f7d3e['get'](_univerjs_core[_0x4e10f2(0x142)]),_0x55a96e);if(!_0x53bcf9)return![];const _0x292353=_0x4f7d3e[_0x4e10f2(0x162)](_univerjs_sheets[_0x4e10f2(0x13e)]),{unitId:_0x2f26a6,subUnitId:_0x26cba0}=_0x53bcf9,_0x34fc1f=_0x292353[_0x4e10f2(0x19f)](_0x2f26a6,_0x26cba0);if(!_0x34fc1f)return![];const _0x3debb2=_0x4f7d3e['get'](_univerjs_sheets_drawing[_0x4e10f2(0xf8)]),{connectorShapeId:_0x2c559a,width:_0xfaff0d,height:_0x57e81d,left:_0x4bc074,top:_0x66f05a,flipX:_0x1dcb8e,flipY:_0x5b1cb2,rotation:_0x5d0eee,oldAdjustValues:_0x18b153,newAdjustValues:_0x4d2500,oldLineType:_0x351faf,newLineType:_0x96a465,oldRelation:_0x2e265b,newRelation:_0x2ba02a}=_0x55a96e,_0x3be335=_0x3debb2[_0x4e10f2(0x17a)]({'unitId':_0x2f26a6,'subUnitId':_0x26cba0,'drawingId':_0x2c559a});if(!_0x3be335)return![];const _0x95bf8a=_0x4f7d3e[_0x4e10f2(0x162)](SheetsShapeService)[_0x4e10f2(0xfa)](_0x2f26a6,_0x26cba0,_0x2c559a);if(!_0x95bf8a)return![];const _0x4955ef=_0x4f7d3e[_0x4e10f2(0x162)](_univerjs_core[_0x4e10f2(0x172)]),_0x3a498e=_0x4f7d3e['get'](_univerjs_core['IUndoRedoService']),_0x2f4ff4=_0x4f7d3e['get'](_univerjs_sheets[_0x4e10f2(0x18f)]),_0x50f5fd={..._0x3be335[_0x4e10f2(0xff)],'width':_0xfaff0d,'height':_0x57e81d,'left':_0x4bc074,'top':_0x66f05a,'flipX':_0x1dcb8e,'flipY':_0x5b1cb2,'angle':(_0x500789=_0x5d0eee!==null&&_0x5d0eee!==void 0x0?_0x5d0eee:(_0x39ad21=_0x3be335[_0x4e10f2(0xff)])===null||_0x39ad21===void 0x0?void 0x0:_0x39ad21[_0x4e10f2(0xfb)])!==null&&_0x500789!==void 0x0?_0x500789:0x0},_0x178143=(0x0,_univerjs_sheets_drawing[_0x4e10f2(0x10f)])(_0x50f5fd,_0x34fc1f),_0xa44899=(0x0,_univerjs_sheets_drawing[_0x4e10f2(0x10a)])(_0x50f5fd,_0x34fc1f),_0x452493=_0x95bf8a[_0x4e10f2(0x111)](),_0x4250e3=_0x95bf8a[_0x4e10f2(0x154)](),_0x141e2b={'unitId':_0x2f26a6,'subUnitId':_0x26cba0,'drawingId':_0x2c559a,'drawingType':_univerjs_core[_0x4e10f2(0x100)][_0x4e10f2(0x198)],'sheetTransform':_0x178143,'transform':_0x50f5fd,'data':{'shapeType':_0x96a465||_0x351faf||_0x452493,'shapeData':{..._0x4250e3,'adjustValues':_0x4d2500||_0x18b153||(_0x4250e3===null||_0x4250e3===void 0x0?void 0x0:_0x4250e3[_0x4e10f2(0x1a0)]),'relation':_0x2ba02a||_0x2e265b||(_0x4250e3===null||_0x4250e3===void 0x0?void 0x0:_0x4250e3[_0x4e10f2(0x180)])}},'axisAlignSheetTransform':_0xa44899,'allowTransform':!![]},{undo:_0x2d19a0,redo:_0x2cc265,objects:_0x199d0f}=_0x3debb2[_0x4e10f2(0x19a)]([_0x141e2b]),_0x1593d3=_0x2f4ff4['onCommandExecute']({'id':_univerjs_sheets_drawing['SetSheetDrawingCommand']['id'],'params':{'unitId':_0x2f26a6,'drawings':[_0x141e2b]}}),_0x8ddece=[...(_0x51b0b9=_0x1593d3['preRedos'])!==null&&_0x51b0b9!==void 0x0?_0x51b0b9:[],{'id':_univerjs_sheets_drawing[_0x4e10f2(0x1ac)]['id'],'params':{'unitId':_0x2f26a6,'subUnitId':_0x26cba0,'op':_0x2cc265,'objects':_0x199d0f,'type':_univerjs_sheets_drawing[_0x4e10f2(0x1b1)][_0x4e10f2(0x182)]}},{'id':_univerjs_sheets_drawing[_0x4e10f2(0x161)]['id'],'params':[_0x2f26a6]},..._0x1593d3[_0x4e10f2(0x133)],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x2f26a6,'subUnitId':_0x26cba0,'shapeId':_0x2c559a,'shapeType':_0x96a465,'shapeData':{'adjustValues':_0x4d2500,'relation':_0x2ba02a}}}],_0x252f6d=[...(_0x1b0d25=_0x1593d3['preUndos'])!==null&&_0x1b0d25!==void 0x0?_0x1b0d25:[],{'id':_univerjs_sheets_drawing['SetDrawingApplyMutation']['id'],'params':{'unitId':_0x2f26a6,'subUnitId':_0x26cba0,'op':_0x2d19a0,'objects':_0x199d0f,'type':_univerjs_sheets_drawing[_0x4e10f2(0x1b1)][_0x4e10f2(0x182)]}},{'id':_univerjs_sheets_drawing[_0x4e10f2(0x161)]['id'],'params':[_0x2f26a6]},..._0x1593d3['undos'],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x2f26a6,'subUnitId':_0x26cba0,'shapeId':_0x2c559a,'shapeType':_0x452493,'shapeData':{..._0x4250e3,'adjustValues':_0x18b153||(_0x4250e3===null||_0x4250e3===void 0x0?void 0x0:_0x4250e3[_0x4e10f2(0x1a0)]),'relation':_0x2e265b||(_0x4250e3===null||_0x4250e3===void 0x0?void 0x0:_0x4250e3[_0x4e10f2(0x180)])}}}];if((0x0,_univerjs_core[_0x4e10f2(0x1ae)])(_0x8ddece,_0x4955ef)[_0x4e10f2(0x16d)])return _0x3a498e['pushUndoRedo']({'unitID':_0x2f26a6,'undoMutations':_0x252f6d,'redoMutations':_0x8ddece}),!![];return![];}},UpdateLineShapeResizeCommand={'type':_univerjs_core[_0x2c3098(0x12a)][_0x2c3098(0x183)],'id':_0x2c3098(0x110),'handler':(_0x411e01,_0x11eaa1)=>{const _0x270858=_0x2c3098;var _0x3b20b0,_0x5e36ed;const _0x139225=(0x0,_univerjs_sheets[_0x270858(0x1b2)])(_0x411e01['get'](_univerjs_core['IUniverInstanceService']),_0x11eaa1);if(!_0x139225)return![];const _0x2b66f7=_0x411e01[_0x270858(0x162)](_univerjs_sheets['SheetSkeletonService']),{unitId:_0x5eb53a,subUnitId:_0x3c9a98}=_0x139225,_0x177168=_0x2b66f7[_0x270858(0x19f)](_0x5eb53a,_0x3c9a98);if(!_0x177168)return![];const _0x6f0bf1=_0x411e01[_0x270858(0x162)](_univerjs_sheets_drawing[_0x270858(0xf8)]),{shapeId:_0x21bbaf,width:_0x144932,height:_0x3af195,left:_0xff2f83,top:_0x52474d,flipX:_0x5a20da,flipY:_0x865f25,angle:_0x4fcb27,oldAdjustValues:_0x3f7430,newAdjustValues:_0x3a20e2,oldLineType:_0x43c630,newLineType:_0x1679d9}=_0x11eaa1,_0x420218=_0x6f0bf1[_0x270858(0x17a)]({'unitId':_0x5eb53a,'subUnitId':_0x3c9a98,'drawingId':_0x21bbaf});if(!_0x420218)return![];const _0x6bf69d=_0x411e01[_0x270858(0x162)](SheetsShapeService)[_0x270858(0xfa)](_0x5eb53a,_0x3c9a98,_0x21bbaf);if(!_0x6bf69d)return![];const _0x1b4465=_0x411e01[_0x270858(0x162)](_univerjs_core[_0x270858(0x172)]),_0x19c9ac=_0x411e01['get'](_univerjs_core[_0x270858(0x12b)]),_0x52da51=_0x411e01['get'](_univerjs_sheets[_0x270858(0x18f)]),_0x19d9be={..._0x420218['transform'],'width':_0x144932,'height':_0x3af195,'left':_0xff2f83,'top':_0x52474d,'flipX':_0x5a20da,'flipY':_0x865f25,'angle':_0x4fcb27},_0x1472f4=(0x0,_univerjs_sheets_drawing[_0x270858(0x10f)])(_0x19d9be,_0x177168),_0x915e27=(0x0,_univerjs_sheets_drawing[_0x270858(0x10a)])(_0x19d9be,_0x177168),_0x567296=_0x6bf69d['getShapeType'](),_0x527778=_0x6bf69d[_0x270858(0x154)](),_0x38f0ea={'unitId':_0x5eb53a,'subUnitId':_0x3c9a98,'drawingId':_0x21bbaf,'drawingType':_univerjs_core[_0x270858(0x100)]['DRAWING_SHAPE'],'sheetTransform':_0x1472f4,'transform':_0x19d9be,'data':{'shapeType':_0x1679d9||_0x43c630||_0x567296,'shapeData':{..._0x527778,'adjustValues':_0x3a20e2||_0x3f7430||(_0x527778===null||_0x527778===void 0x0?void 0x0:_0x527778[_0x270858(0x1a0)])}},'axisAlignSheetTransform':_0x915e27,'allowTransform':!![]},{undo:_0x207937,redo:_0x3d74dc,objects:_0x1583ab}=_0x6f0bf1['getBatchUpdateOp']([_0x38f0ea]),_0x4d69f2=_0x52da51[_0x270858(0x114)]({'id':_univerjs_sheets_drawing['SetSheetDrawingCommand']['id'],'params':{'unitId':_0x5eb53a,'drawings':[_0x38f0ea]}}),_0x455b7f=[...(_0x3b20b0=_0x4d69f2[_0x270858(0x120)])!==null&&_0x3b20b0!==void 0x0?_0x3b20b0:[],{'id':_univerjs_sheets_drawing[_0x270858(0x1ac)]['id'],'params':{'unitId':_0x5eb53a,'subUnitId':_0x3c9a98,'op':_0x3d74dc,'objects':_0x1583ab,'type':_univerjs_sheets_drawing['DrawingApplyType']['UPDATE']}},{'id':_univerjs_sheets_drawing['ClearSheetDrawingTransformerOperation']['id'],'params':[_0x5eb53a]},..._0x4d69f2['redos'],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x5eb53a,'subUnitId':_0x3c9a98,'shapeId':_0x21bbaf,'shapeType':_0x1679d9,'shapeData':{'adjustValues':_0x3a20e2}}}],_0x21eb60=[...(_0x5e36ed=_0x4d69f2[_0x270858(0x1b7)])!==null&&_0x5e36ed!==void 0x0?_0x5e36ed:[],{'id':_univerjs_sheets_drawing[_0x270858(0x1ac)]['id'],'params':{'unitId':_0x5eb53a,'subUnitId':_0x3c9a98,'op':_0x207937,'objects':_0x1583ab,'type':_univerjs_sheets_drawing[_0x270858(0x1b1)][_0x270858(0x182)]}},{'id':_univerjs_sheets_drawing[_0x270858(0x161)]['id'],'params':[_0x5eb53a]},..._0x4d69f2['undos'],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x5eb53a,'subUnitId':_0x3c9a98,'shapeId':_0x21bbaf,'shapeType':_0x567296,'shapeData':{..._0x527778,'adjustValues':_0x3f7430||(_0x527778===null||_0x527778===void 0x0?void 0x0:_0x527778[_0x270858(0x1a0)])}}}];if((0x0,_univerjs_core['sequenceExecute'])(_0x455b7f,_0x1b4465)[_0x270858(0x16d)])return _0x19c9ac[_0x270858(0x118)]({'unitID':_0x5eb53a,'undoMutations':_0x21eb60,'redoMutations':_0x455b7f}),!![];return![];}},UpdateSheetsShapeTypeMutation={'id':'sheet.mutation.update-shape-type','type':_univerjs_core[_0x2c3098(0x12a)][_0x2c3098(0x108)],'handler':(_0x2c6ee8,_0x1f689f)=>{const _0x4be658=_0x2c3098,{unitId:_0x1553d6,subUnitId:_0x31cbd0,shapeType:_0x560252,shapeId:_0x8675f6,shapeData:_0x224202}=_0x1f689f,_0x54439b=_0x2c6ee8['get'](SheetsShapeService)[_0x4be658(0xfa)](_0x1553d6,_0x31cbd0,_0x8675f6);if(_0x54439b){_0x54439b[_0x4be658(0x1b0)](_0x560252);if(_0x224202)_0x54439b===null||_0x54439b===void 0x0||_0x54439b[_0x4be658(0x19e)](_0x224202);}return!![];}},UpdateSheetsShapeTypeCommand={'id':_0x2c3098(0x1ab),'type':_univerjs_core['CommandType']['COMMAND'],'handler':(_0x5055de,_0x9f6078)=>{const _0x5e3a81=_0x2c3098;if(!_0x9f6078)return![];const _0x4aac43=_0x5055de[_0x5e3a81(0x162)](_univerjs_core[_0x5e3a81(0x172)]),_0xbce55=_0x5055de[_0x5e3a81(0x162)](SheetsShapeService),_0x49a0a6=_0x5055de[_0x5e3a81(0x162)](_univerjs_core[_0x5e3a81(0x12b)]),_0x40e0a5=[],_0x1f9b1c=[],{unitId:_0x3449da,subUnitId:_0x343888,shapeId:_0x15d7cd,shapeType:_0x70c365,shapeData:_0x5a0e64}=_0x9f6078,_0x49ffa5=_0xbce55[_0x5e3a81(0xfa)](_0x3449da,_0x343888,_0x15d7cd);if(_0x49ffa5){const _0x1ffaf6=_0x49ffa5['getShapeType'](),_0x3a0d56=Object[_0x5e3a81(0x14b)]({},_0x49ffa5[_0x5e3a81(0x154)]()),_0x489fab={'unitId':_0x3449da,'subUnitId':_0x343888,'shapeId':_0x15d7cd,'shapeType':_0x70c365,'shapeData':_0x5a0e64},_0x44c049={'unitId':_0x3449da,'subUnitId':_0x343888,'shapeId':_0x15d7cd,'shapeType':_0x1ffaf6,'shapeData':_0x3a0d56};_0x40e0a5['push']({'id':UpdateSheetsShapeTypeMutation['id'],'params':_0x489fab}),_0x1f9b1c['push']({'id':UpdateSheetsShapeTypeMutation['id'],'params':_0x44c049});if(_0x40e0a5[_0x5e3a81(0x1a8)](_0x1c91f4=>_0x4aac43['syncExecuteCommand'](_0x1c91f4['id'],_0x1c91f4[_0x5e3a81(0x15f)])))_0x49a0a6[_0x5e3a81(0x118)]({'unitID':_0x3449da,'redoMutations':[..._0x40e0a5],'undoMutations':[..._0x1f9b1c]});return!![];}return![];}};var name=_0x2c3098(0x131),version='0.22.1';const SHEETS_SHAPE_PLUGIN_CONFIG_KEY=_0x2c3098(0x178),configSymbol=Symbol(SHEETS_SHAPE_PLUGIN_CONFIG_KEY),defaultPluginConfig={};let SheetsShapeController=class SheetsShapeController extends _univerjs_core['Disposable']{constructor(_0x4babb1,_0x3fe68a,_0x42ad40,_0x2df5d2,_0x1239db){const _0x15c355=_0x2c3098;super(),this['_commandService']=_0x4babb1,this[_0x15c355(0x1b9)]=_0x3fe68a,this[_0x15c355(0x17d)]=_0x42ad40,this[_0x15c355(0x11a)]=_0x2df5d2,this[_0x15c355(0x1a1)]=_0x1239db,this[_0x15c355(0x16a)](),this['_initCommandInterceptor']();}[_0x2c3098(0x16a)](){const _0x5cb22f=_0x2c3098;[InsertShapeCommand,SetShapeDrawingDataCommand,ToggleSheetsShapeFlipCommand,SetSheetsShapeRotateCommand,SetSheetsShapeTextVerticalToggleCommand,UpdateConnectorRelationCommand,UpdateLineShapeResizeCommand,InsertSheetsShapeMutation,RemoveSheetsShapeMutation,UpdateSheetsShapeTypeMutation,UpdateSheetsShapeDataMutation][_0x5cb22f(0x14d)](_0x16141e=>this[_0x5cb22f(0x19b)](this['_commandService'][_0x5cb22f(0x19d)](_0x16141e)));}['_initCommandInterceptor'](){const _0x490cd7=_0x2c3098;this[_0x490cd7(0x19b)](this[_0x490cd7(0x1b9)][_0x490cd7(0x171)]({'getMutations':_0xf337e6=>{const _0x58872d=_0x490cd7;if(_0xf337e6['id']===_univerjs_sheets_drawing['RemoveSheetDrawingCommand']['id']){const {drawings:_0x744fd}=_0xf337e6[_0x58872d(0x15f)],_0x5e58c3=_0x744fd['filter'](_0xf0076e=>_0xf0076e['drawingType']===_univerjs_core[_0x58872d(0x100)][_0x58872d(0x198)]);if(_0x5e58c3[_0x58872d(0x1b5)]===0x0)return{'preRedos':[],'redos':[],'preUndos':[],'undos':[]};const _0x28946d=[],_0x444e77=[];return _0x5e58c3[_0x58872d(0x14d)](_0x508c96=>{const _0x2e5240=_0x58872d,{unitId:_0x2cf76b,subUnitId:_0x31b49f,drawingId:_0x347039}=_0x508c96,_0x30e6d4=this[_0x2e5240(0x11a)][_0x2e5240(0xfa)](_0x2cf76b,_0x31b49f,_0x347039);if(!_0x30e6d4)throw new TypeError(_0x2e5240(0x11e)+_0x30e6d4);_0x28946d['push']({'id':RemoveSheetsShapeMutation['id'],'params':{'unitId':_0x2cf76b,'subUnitId':_0x31b49f,'shapeId':_0x347039}}),_0x444e77[_0x2e5240(0x115)]({'id':InsertSheetsShapeMutation['id'],'params':{'unitId':_0x2cf76b,'subUnitId':_0x31b49f,'shapeId':_0x347039,'shapeType':_0x30e6d4[_0x2e5240(0x111)](),'shapeData':_0x30e6d4[_0x2e5240(0x154)]()}});const _0x5a3b9d=this[_0x2e5240(0x11a)][_0x2e5240(0x149)](_0x2cf76b,_0x31b49f,_0x347039);if(_0x5a3b9d)for(const _0x11974a of _0x5a3b9d){const _0x44ebd6=_0x11974a[_0x2e5240(0x14f)],_0x133a4a=_0x11974a[_0x2e5240(0x168)],_0x23b25c=_0x133a4a?{'from':void 0x0}:{'to':void 0x0},_0x55da6d=_0x133a4a?{'from':{'shapeId':_0x11974a[_0x2e5240(0x143)],'cxnIndex':_0x11974a['cxnIndex']}}:{'to':{'shapeId':_0x11974a[_0x2e5240(0x143)],'cxnIndex':_0x11974a['cxnIndex']}};_0x28946d[_0x2e5240(0x115)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x2cf76b,'subUnitId':_0x31b49f,'shapeId':_0x44ebd6,'shapeData':{'relation':_0x23b25c}}}),_0x444e77[_0x2e5240(0x115)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x2cf76b,'subUnitId':_0x31b49f,'shapeId':_0x44ebd6,'shapeData':{'relation':_0x55da6d}}});}}),{'preRedos':_0x28946d,'redos':[],'preUndos':[],'undos':_0x444e77};}if(_0xf337e6['id']===_univerjs_sheets_drawing[_0x58872d(0x12d)]['id']){const {drawings:_0x3ce4e4}=_0xf337e6[_0x58872d(0x15f)],_0xa0cb28=_0x3ce4e4[_0x58872d(0x164)](_0x183dbb=>_0x183dbb[_0x58872d(0x16e)]===_univerjs_core[_0x58872d(0x100)]['DRAWING_SHAPE']);if(_0xa0cb28[_0x58872d(0x1b5)]===0x0)return{'preRedos':[],'redos':[],'preUndos':[],'undos':[]};const _0x48bd7f=[],_0x1d0f06=[];for(const _0x564291 of _0xa0cb28){const {unitId:_0x4279cf,subUnitId:_0x457e8c,drawingId:_0x3baeb3,transform:_0x5cdfc5}=_0x564291;if(!_0x4279cf||!_0x457e8c||!_0x3baeb3||!_0x5cdfc5)continue;const _0x5bc0d9=this[_0x58872d(0x11a)][_0x58872d(0xfa)](_0x4279cf,_0x457e8c,_0x3baeb3);if(!_0x5bc0d9)throw new TypeError(_0x58872d(0x11e)+_0x5bc0d9);if((0x0,_univerjs_pro_engine_shape[_0x58872d(0x1b3)])(_0x5bc0d9[_0x58872d(0x111)]())){const _0x45a164=this[_0x58872d(0x11a)]['getLineShapeRelation'](_0x4279cf,_0x457e8c,_0x3baeb3),_0x2070b1={'from':void 0x0,'to':void 0x0};_0x45a164&&(_0x48bd7f[_0x58872d(0x115)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x4279cf,'subUnitId':_0x457e8c,'shapeId':_0x3baeb3,'shapeData':{'relation':_0x2070b1}}}),_0x1d0f06[_0x58872d(0x115)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x4279cf,'subUnitId':_0x457e8c,'shapeId':_0x3baeb3,'shapeData':{'relation':_0x45a164}}}));}else{const _0x329671=this['_sheetsShapeService'][_0x58872d(0x149)](_0x4279cf,_0x457e8c,_0x3baeb3);if(_0x329671&&_0x329671[_0x58872d(0x1b5)]>0x0)for(const _0x35fee4 of _0x329671){const _0x3b8230=_0x35fee4[_0x58872d(0x14f)],_0x376a0f=_0x35fee4['isFrom'],_0x386800=this['_sheetsShapeService'][_0x58872d(0xfa)](_0x4279cf,_0x457e8c,_0x3b8230);if(!_0x386800)continue;const _0x267544=_0x386800[_0x58872d(0x1b4)](),_0x10ce4c=_0x386800[_0x58872d(0x196)]();if(_0x267544&&_0x10ce4c)this[_0x58872d(0x1bc)](_0x4279cf,_0x457e8c,_0x3b8230,_0x386800,_0x267544,_0x10ce4c,_0x48bd7f,_0x1d0f06,_0x3baeb3,_0x5cdfc5);else this['_addLineFollowShapeUpdates'](_0x4279cf,_0x457e8c,_0x3b8230,_0x386800,_0x376a0f?_0x267544:_0x10ce4c,_0x376a0f,_0x48bd7f,_0x1d0f06,_0x3baeb3,_0x5cdfc5);}}}return{'preRedos':[],'redos':_0x48bd7f,'preUndos':_0x1d0f06,'undos':[]};}return{'preRedos':[],'redos':[],'preUndos':[],'undos':[]};}}));}[_0x2c3098(0xf6)](_0x208cb4,_0x4916c0,_0x4aef09,_0x5b7669,_0x297d4a){const _0x17b2a9=_0x2c3098;if(!_0x4916c0||!_0x4aef09)return null;const {shapeId:_0x57642b,cxnIndex:_0x32c09b}=_0x208cb4,_0x1f7def=this[_0x17b2a9(0x11a)][_0x17b2a9(0xfa)](_0x4916c0,_0x4aef09,_0x57642b);if(!_0x1f7def)return null;const _0x1871a8=this['_drawingManagerService']['getDrawingByParam']({'unitId':_0x4916c0,'subUnitId':_0x4aef09,'drawingId':_0x57642b});if(!(_0x1871a8===null||_0x1871a8===void 0x0?void 0x0:_0x1871a8['transform']))return null;let {left:left=0x0,top:top=0x0,width:width=0x0,height:height=0x0,flipX:flipX=![],flipY:flipY=![],angle:_0x1629ff}=_0x1871a8[_0x17b2a9(0xff)];if(_0x297d4a&&_0x5b7669===_0x57642b){var _0x13de63,_0x1c8685,_0x5d73d9,_0x4e732a,_0x50bc2a,_0x3110cf,_0x4d3c05;left=(_0x13de63=_0x297d4a[_0x17b2a9(0x190)])!==null&&_0x13de63!==void 0x0?_0x13de63:left,top=(_0x1c8685=_0x297d4a[_0x17b2a9(0x156)])!==null&&_0x1c8685!==void 0x0?_0x1c8685:top,width=(_0x5d73d9=_0x297d4a[_0x17b2a9(0x1ad)])!==null&&_0x5d73d9!==void 0x0?_0x5d73d9:width,height=(_0x4e732a=_0x297d4a['height'])!==null&&_0x4e732a!==void 0x0?_0x4e732a:height,flipX=(_0x50bc2a=_0x297d4a[_0x17b2a9(0x1bb)])!==null&&_0x50bc2a!==void 0x0?_0x50bc2a:flipX,flipY=(_0x3110cf=_0x297d4a[_0x17b2a9(0x103)])!==null&&_0x3110cf!==void 0x0?_0x3110cf:flipY,_0x1629ff=(_0x4d3c05=_0x297d4a[_0x17b2a9(0xfb)])!==null&&_0x4d3c05!==void 0x0?_0x4d3c05:_0x1629ff;}_0x1f7def['updateContext']({'width':width,'height':height});const _0x5aa436=_0x1f7def['getConnectionSiteList']()[_0x17b2a9(0x199)](_0x251a77=>_0x251a77[_0x17b2a9(0xfc)]===_0x32c09b);if(!_0x5aa436)return null;let _0x41a0ef=flipX?width-_0x5aa436['x']:_0x5aa436['x'],_0x3b7f01=flipY?height-_0x5aa436['y']:_0x5aa436['y'];if(_0x1629ff!==0x0&&_0x1629ff!==void 0x0&&_0x1629ff!==null){const _0x590ad9=_0x1629ff*Math['PI']/0xb4,_0x4fcdb5=Math[_0x17b2a9(0x15e)](_0x590ad9),_0x176420=Math['sin'](_0x590ad9),_0x1190b0=width/0x2,_0x29683d=height/0x2,_0x6f6aa8=_0x41a0ef-_0x1190b0,_0x5203b2=_0x3b7f01-_0x29683d;_0x41a0ef=_0x1190b0+_0x6f6aa8*_0x4fcdb5-_0x5203b2*_0x176420,_0x3b7f01=_0x29683d+_0x6f6aa8*_0x176420+_0x5203b2*_0x4fcdb5;}_0x41a0ef+=left,_0x3b7f01+=top;let _0x4f1a56=_0x5aa436[_0x17b2a9(0x1a7)]/0xea60;if(flipX)_0x4f1a56=0xb4-_0x4f1a56;if(flipY)_0x4f1a56=-_0x4f1a56;_0x4f1a56+=_0x1629ff||0x0,_0x4f1a56=(_0x4f1a56%0x168+0x168)%0x168;const _0x1417f7=(0x0,_univerjs_pro_engine_shape['getBasicShapeRotateBound'])({'left':left,'top':top,'width':width,'height':height},_0x1629ff||0x0);return{'point':{'x':_0x41a0ef,'y':_0x3b7f01},'angle':_0x4f1a56,'bounds':_0x1417f7};}[_0x2c3098(0x1bc)](_0x38384b,_0x490268,_0x208631,_0x1c5824,_0x51457c,_0x324038,_0x242238,_0x174131,_0x2f8bae,_0x499af6){const _0x118bdd=_0x2c3098,_0x5c5e9b=this[_0x118bdd(0x17d)][_0x118bdd(0x19f)](_0x38384b,_0x490268);if(!_0x5c5e9b)return;const _0x5d259e=_0x1c5824['getShapeRelation'](),_0x4687cf=_0x1c5824['getAdjustNames'](),_0x2ad0f9={},_0x3d70fd={};_0x4687cf[_0x118bdd(0x14d)](_0x186201=>{const _0x142cda=_0x118bdd,_0x5b43a5=_0x1c5824[_0x142cda(0x119)](_0x186201);_0x3d70fd[_0x186201]=_0x5b43a5!==null&&_0x5b43a5!==void 0x0?_0x5b43a5:0x0;});const _0x2f51ff=this['_getConnectPointInfo'](_0x51457c,_0x38384b,_0x490268,_0x2f8bae,_0x499af6),_0x950da4=this[_0x118bdd(0xf6)](_0x324038,_0x38384b,_0x490268,_0x2f8bae,_0x499af6);if(_0x2f51ff&&_0x950da4){const _0xaa7333=_0x1c5824[_0x118bdd(0x111)](),_0x31646d=(0x0,_univerjs_pro_engine_shape[_0x118bdd(0x16f)])(_0x2f51ff,_0x950da4,_0xaa7333);let _0x38014f=_0xaa7333;if(_0x31646d){const _0x5ef1e6=(0x0,_univerjs_pro_engine_shape[_0x118bdd(0x141)])(_0x31646d,_0x1c5824[_0x118bdd(0x111)]()),_0xff7540=this['_drawingManagerService'][_0x118bdd(0x135)](_0x38384b,_0x490268);if(_0xff7540&&_0xff7540[_0x208631]){const _0x276764=_0xff7540[_0x208631];_0x38014f=_0x5ef1e6[_0x118bdd(0x122)];for(const [_0x5a56ae,_0x432f7f]of Object[_0x118bdd(0x11b)](_0x5ef1e6[_0x118bdd(0x1a0)]))_0x2ad0f9[_0x5a56ae]=_0x432f7f;const _0xf6d96b={..._0x276764[_0x118bdd(0xff)],'width':_0x5ef1e6['worldRect']['width'],'height':_0x5ef1e6[_0x118bdd(0x177)]['height'],'left':_0x5ef1e6[_0x118bdd(0x177)]['left'],'top':_0x5ef1e6[_0x118bdd(0x177)][_0x118bdd(0x156)],'flipX':_0x5ef1e6[_0x118bdd(0x177)][_0x118bdd(0x1bb)],'flipY':_0x5ef1e6[_0x118bdd(0x177)][_0x118bdd(0x103)],'angle':_0x5ef1e6[_0x118bdd(0x136)]},_0x1efb20=(0x0,_univerjs_sheets_drawing[_0x118bdd(0x10f)])(_0xf6d96b,_0x5c5e9b),_0x4c75f8=(0x0,_univerjs_sheets_drawing['transformToAxisAlignPosition'])(_0xf6d96b,_0x5c5e9b),_0x51d458={'unitId':_0x38384b,'subUnitId':_0x490268,'drawingType':_univerjs_core[_0x118bdd(0x100)][_0x118bdd(0x198)],'drawingId':_0x208631,'transform':_0xf6d96b,'sheetTransform':_0x1efb20,'axisAlignSheetTransform':_0x4c75f8},{unitId:_0x4a759c,subUnitId:_0x140a0c,undo:_0xbc0549,redo:_0x816eeb,objects:_0x9f19cf}=this[_0x118bdd(0x1a1)][_0x118bdd(0x19a)]([_0x51d458]);_0x242238[_0x118bdd(0x115)]({'id':_univerjs_sheets_drawing[_0x118bdd(0x1ac)]['id'],'params':{'unitId':_0x4a759c,'subUnitId':_0x140a0c,'op':_0x816eeb,'objects':_0x9f19cf,'type':_univerjs_sheets_drawing[_0x118bdd(0x1b1)][_0x118bdd(0x182)]}}),_0x174131[_0x118bdd(0x115)]({'id':_univerjs_sheets_drawing[_0x118bdd(0x1ac)]['id'],'params':{'unitId':_0x4a759c,'subUnitId':_0x140a0c,'op':_0xbc0549,'objects':_0x9f19cf,'type':_univerjs_sheets_drawing[_0x118bdd(0x1b1)][_0x118bdd(0x182)]}});}_0x1c5824[_0x118bdd(0x121)]();}_0x242238[_0x118bdd(0x115)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x38384b,'subUnitId':_0x490268,'shapeId':_0x208631,'shapeType':_0x38014f,'shapeData':{'adjustValues':_0x2ad0f9,'relation':_0x5d259e}}}),_0x174131[_0x118bdd(0x115)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x38384b,'subUnitId':_0x490268,'shapeId':_0x208631,'shapeType':_0xaa7333,'shapeData':{'adjustValues':_0x3d70fd,'relation':_0x5d259e}}});}}[_0x2c3098(0x13c)](_0x308fa6,_0xaf2cc0,_0x161273,_0x501393,_0x27df0e,_0x4ddf32,_0x3bea8a,_0x177e5d,_0x508f04,_0xaa141){const _0x512091=_0x2c3098;var _0x2d52d2;if(!_0x27df0e)return;const _0x369884=this[_0x512091(0x17d)][_0x512091(0x19f)](_0x308fa6,_0xaf2cc0);if(!_0x369884)return;const _0x48f556=(_0x2d52d2=this[_0x512091(0x1a1)][_0x512091(0x17a)]({'unitId':_0x308fa6,'subUnitId':_0xaf2cc0,'drawingId':_0x508f04}))===null||_0x2d52d2===void 0x0?void 0x0:_0x2d52d2[_0x512091(0xff)];if(!_0x48f556)return;const _0x406872=_0x48f556[_0x512091(0x190)]!==_0xaa141[_0x512091(0x190)]||_0x48f556[_0x512091(0x156)]!==_0xaa141[_0x512091(0x156)],_0x1d1c1f=_0x48f556[_0x512091(0x1ad)]!==_0xaa141[_0x512091(0x1ad)]||_0x48f556[_0x512091(0x145)]!==_0xaa141[_0x512091(0x145)],_0x1a9444=_0x48f556[_0x512091(0x1bb)]!==_0xaa141[_0x512091(0x1bb)]||_0x48f556[_0x512091(0x103)]!==_0xaa141[_0x512091(0x103)],_0x2fc438=_0x48f556[_0x512091(0xfb)]!==_0xaa141[_0x512091(0xfb)];if(_0x406872&&!_0x1d1c1f&&!_0x1a9444&&!_0x2fc438){var _0x573b93,_0x2a24a2,_0x229618,_0x29a1e1;const _0x276b96=((_0x573b93=_0xaa141[_0x512091(0x190)])!==null&&_0x573b93!==void 0x0?_0x573b93:0x0)-((_0x2a24a2=_0x48f556[_0x512091(0x190)])!==null&&_0x2a24a2!==void 0x0?_0x2a24a2:0x0),_0x1d7459=((_0x229618=_0xaa141[_0x512091(0x156)])!==null&&_0x229618!==void 0x0?_0x229618:0x0)-((_0x29a1e1=_0x48f556[_0x512091(0x156)])!==null&&_0x29a1e1!==void 0x0?_0x29a1e1:0x0),_0x1d211c=this['_drawingManagerService'][_0x512091(0x135)](_0x308fa6,_0xaf2cc0);if(_0x1d211c&&_0x1d211c[_0x161273]){var _0x5e3f47,_0x287cb6,_0x3eb034,_0x204fee;const _0x20516b=_0x1d211c[_0x161273],_0x1f3830={..._0x20516b['transform'],'left':((_0x5e3f47=(_0x287cb6=_0x20516b['transform'])===null||_0x287cb6===void 0x0?void 0x0:_0x287cb6[_0x512091(0x190)])!==null&&_0x5e3f47!==void 0x0?_0x5e3f47:0x0)+_0x276b96,'top':((_0x3eb034=(_0x204fee=_0x20516b[_0x512091(0xff)])===null||_0x204fee===void 0x0?void 0x0:_0x204fee[_0x512091(0x156)])!==null&&_0x3eb034!==void 0x0?_0x3eb034:0x0)+_0x1d7459},_0x48ad3f=(0x0,_univerjs_sheets_drawing[_0x512091(0x10f)])(_0x1f3830,_0x369884),_0x3235a3=(0x0,_univerjs_sheets_drawing[_0x512091(0x10a)])(_0x1f3830,_0x369884),_0x2f2724={'unitId':_0x308fa6,'subUnitId':_0xaf2cc0,'drawingType':_univerjs_core[_0x512091(0x100)][_0x512091(0x198)],'drawingId':_0x161273,'transform':_0x1f3830,'sheetTransform':_0x48ad3f,'axisAlignSheetTransform':_0x3235a3},{unitId:_0x2103fc,subUnitId:_0x28e3ca,undo:_0x5c533e,redo:_0x233304,objects:_0x5b37af}=this['_drawingManagerService'][_0x512091(0x19a)]([_0x2f2724]);_0x3bea8a['push']({'id':_univerjs_sheets_drawing[_0x512091(0x1ac)]['id'],'params':{'unitId':_0x2103fc,'subUnitId':_0x28e3ca,'op':_0x233304,'objects':_0x5b37af,'type':_univerjs_sheets_drawing[_0x512091(0x1b1)][_0x512091(0x182)]}}),_0x177e5d[_0x512091(0x115)]({'id':_univerjs_sheets_drawing[_0x512091(0x1ac)]['id'],'params':{'unitId':_0x2103fc,'subUnitId':_0x28e3ca,'op':_0x5c533e,'objects':_0x5b37af,'type':_univerjs_sheets_drawing[_0x512091(0x1b1)][_0x512091(0x182)]}});}}else{const _0x18e5da=_0x501393[_0x512091(0x1b4)](),_0x23fbb1=_0x501393[_0x512091(0x196)]();this['_addLineRerouteUpdates'](_0x308fa6,_0xaf2cc0,_0x161273,_0x501393,_0x18e5da,_0x23fbb1,_0x3bea8a,_0x177e5d,_0x508f04,_0xaa141);}}};function _0x1dca(_0x1c70e8,_0xe3a771){_0x1c70e8=_0x1c70e8-0xf4;const _0x494705=_0x4947();let _0x1dca4f=_0x494705[_0x1c70e8];return _0x1dca4f;}SheetsShapeController=__decorate([__decorateParam(0x0,_univerjs_core['ICommandService']),__decorateParam(0x1,(0x0,_univerjs_core[_0x2c3098(0x1ba)])(_univerjs_sheets['SheetInterceptorService'])),__decorateParam(0x2,(0x0,_univerjs_core['Inject'])(_univerjs_sheets[_0x2c3098(0x13e)])),__decorateParam(0x3,(0x0,_univerjs_core[_0x2c3098(0x1ba)])(SheetsShapeService)),__decorateParam(0x4,(0x0,_univerjs_core[_0x2c3098(0x1ba)])(_univerjs_drawing[_0x2c3098(0x15c)]))],SheetsShapeController);let UniverSheetsShapePlugin=class UniverSheetsShapePlugin extends _univerjs_core['Plugin']{constructor(_0xfb6b35=defaultPluginConfig,_0x3854b0,_0x1730e9,_0x146b63){const _0x4f4dea=_0x2c3098;super(),this[_0x4f4dea(0x197)]=_0xfb6b35,this[_0x4f4dea(0x163)]=_0x3854b0,this[_0x4f4dea(0x10d)]=_0x1730e9,this[_0x4f4dea(0x1af)]=_0x146b63;const {..._0x55dc87}=(0x0,_univerjs_core['merge'])({},defaultPluginConfig,this[_0x4f4dea(0x197)]);this['_configService'][_0x4f4dea(0x175)](SHEETS_SHAPE_PLUGIN_CONFIG_KEY,_0x55dc87);}[_0x2c3098(0x10c)](){const _0x2f49a4=_0x2c3098,_0x397c63=this[_0x2f49a4(0x163)];[[SheetShapeModelManager],[SheetsShapeService],[SheetsShapeController]]['forEach'](_0xb86c88=>_0x397c63[_0x2f49a4(0x126)](_0xb86c88)),(0x0,_univerjs_core['touchDependencies'])(_0x397c63,[[SheetsShapeService],[SheetsShapeController]]);}};_defineProperty(UniverSheetsShapePlugin,_0x2c3098(0x1a3),_univerjs_core[_0x2c3098(0x104)][_0x2c3098(0x1b8)]),_defineProperty(UniverSheetsShapePlugin,_0x2c3098(0x105),_0x2c3098(0xf7)),_defineProperty(UniverSheetsShapePlugin,_0x2c3098(0x10b),name),_defineProperty(UniverSheetsShapePlugin,_0x2c3098(0x152),version),UniverSheetsShapePlugin=__decorate([(0x0,_univerjs_core[_0x2c3098(0x17c)])(_univerjs_pro_license[_0x2c3098(0x176)]),__decorateParam(0x1,(0x0,_univerjs_core['Inject'])(_univerjs_core['Injector'])),__decorateParam(0x2,_univerjs_core[_0x2c3098(0x172)]),__decorateParam(0x3,_univerjs_core[_0x2c3098(0x16b)])],UniverSheetsShapePlugin),exports[_0x2c3098(0x193)]=DEFAULT_SHAPE_HEIGHT,exports[_0x2c3098(0x15a)]=DEFAULT_SHAPE_WIDTH,exports[_0x2c3098(0xf9)]=InsertShapeCommand,exports[_0x2c3098(0x18d)]=InsertSheetsShapeMutation,exports[_0x2c3098(0x129)]=RemoveSheetsShapeMutation,exports[_0x2c3098(0x167)]=SetShapeDrawingDataCommand,exports['SetSheetsShapeRotateCommand']=SetSheetsShapeRotateCommand,exports[_0x2c3098(0x151)]=SetSheetsShapeTextVerticalToggleCommand,Object[_0x2c3098(0xf4)](exports,_0x2c3098(0x188),{'enumerable':!![],'get':function(){return SheetsShapeService;}}),exports[_0x2c3098(0x17e)]=ToggleSheetsShapeFlipCommand,Object[_0x2c3098(0xf4)](exports,_0x2c3098(0x137),{'enumerable':!![],'get':function(){return UniverSheetsShapePlugin;}}),exports[_0x2c3098(0x139)]=UpdateConnectorRelationCommand,exports[_0x2c3098(0x130)]=UpdateLineShapeResizeCommand,exports[_0x2c3098(0x15b)]=UpdateSheetsShapeDataMutation,exports[_0x2c3098(0x1b6)]=UpdateSheetsShapeTypeCommand,exports['UpdateSheetsShapeTypeMutation']=UpdateSheetsShapeTypeMutation;
|