@univerjs-pro/sheets-shape 0.22.1 → 0.23.0-insiders.20260522-e8f2a3b

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/facade.js CHANGED
@@ -1 +1 @@
1
- const _0x4296b1=_0x26cd;(function(_0x11a5d5,_0x5933f5){const _0x997147=_0x26cd,_0x5beee3=_0x11a5d5();while(!![]){try{const _0x439401=parseInt(_0x997147(0x1b4))/0x1+-parseInt(_0x997147(0x1ae))/0x2+-parseInt(_0x997147(0x19e))/0x3+-parseInt(_0x997147(0x1c2))/0x4*(parseInt(_0x997147(0x18d))/0x5)+-parseInt(_0x997147(0x1cc))/0x6*(parseInt(_0x997147(0x1ee))/0x7)+-parseInt(_0x997147(0x188))/0x8*(-parseInt(_0x997147(0x1c8))/0x9)+-parseInt(_0x997147(0x1a4))/0xa*(-parseInt(_0x997147(0x190))/0xb);if(_0x439401===_0x5933f5)break;else _0x5beee3['push'](_0x5beee3['shift']());}catch(_0x29eaf4){_0x5beee3['push'](_0x5beee3['shift']());}}}(_0x5bfe,0x595f7));function _0x26cd(_0xfe032f,_0x713fc4){_0xfe032f=_0xfe032f-0x16d;const _0x5bfe3d=_0x5bfe();let _0x26cd83=_0x5bfe3d[_0xfe032f];return _0x26cd83;}import{ConnectorCoordinateTransform,ShapeArrowSizeEnum,ShapeArrowTypeEnum,ShapeFillEnum,ShapeGradientTypeEnum,ShapeLineCapEnum,ShapeLineDashEnum,ShapeLineJoinEnum,ShapeLineTypeEnum,ShapeTypeEnum,computeConnectorRouteLayout,getBasicShapeRotateBound,isConnectorShape,routeConnectorLineShape}from'@univerjs-pro/engine-shape';import{FEnum}from'@univerjs/core/facade';import{DEFAULT_SHAPE_HEIGHT,DEFAULT_SHAPE_WIDTH,InsertShapeCommand,SetShapeDrawingDataCommand,SheetsShapeService,UpdateConnectorRelationCommand}from'@univerjs-pro/sheets-shape';import{DrawingTypeEnum,generateRandomId}from'@univerjs/core';import{IDrawingManagerService}from'@univerjs/drawing';function _0x5bfe(){const _0x38145f=['type','removeShape','insertShape','ShapeLineCapEnum','shapeData','executeCommand','function','_injector','getConnectionSiteList','SolidFill','setStartArrowSize','\x20and\x20subUnitId\x20','updateContext','default','extend','worldRect','gradientAngle','colorStops\x20is\x20required\x20and\x20should\x20contain\x20at\x20least\x20one\x20color\x20stop.','symbol','gradientType','ShapeLineTypeEnum','8ZFdEUZ','parse','DRAWING_SHAPE','ang','_resolveExistingOrFreeEndpoint','85ZBBizl','height','newConnector','2962212aUratN','gradientStops','dashType','getWorkbook','sin','fillType','flipX','getShapeModel','setNoneFill','getPosition','size','setEndArrowType','adjustValues','left','579720flBQMy','getUnitId','toPrimitive','setStrokeColor','getSize','shape','20jNrRfB','length','stringify','flipY','string',',\x20but\x20expected\x20a\x20connector\x20shape\x20type.','lineJoinType','ShapeGradientTypeEnum','shapeId','get','941798UtfsNP','getEndConnectInfo','ShapeArrowTypeEnum','Skeleton\x20for\x20unitId\x20','Invalid\x20shape\x20type\x20for\x20connector.\x20Received\x20','ensureSkeleton','625093PQSgek','setStrokeLineCapType','transform','keys','getSheetId','newShape','fill','getConnectorLinePoints','width','entries','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','setStrokeLineJoinType','from','_preloadShapeProperties','6164fkaPgq','rotation','_commandService','setStrokeLineDashType','color','getAdjustNames','4182471ghtBAB','call','getAdjustPoints','getShapeRelation','311994agMSRI','iterator','startArrow','setStrokeLineType','setStrokeOpacity','getAdjustValueByName','build','top','ShapeLineJoinEnum','drawId','setHeight','getDrawingByParam','setShapeSolidFill','object','\x20not\x20found','cos','ShapeLineDashEnum','setShapeType','stroke','getShapeData','setWidth','shapeType','opacity','setPosition','connectShapes','abs','localToWorld','getStartConnectInfo','getDrawingPoints','getShapeType','unitId','connectionSiteIndex','Shape\x20type\x20is\x20required.\x20Please\x20call\x20setShapeType()\x20before\x20build().','prototype','77vBAHdu','updateShape','getShapeId','getConnectionSites','_resolveEndpoints','subUnitId','find','endArrow'];_0x5bfe=function(){return _0x38145f;};return _0x5bfe();}import{SheetSkeletonService,convertPositionCellToSheetOverGrid}from'@univerjs/sheets';import{ISheetDrawingService,RemoveSheetDrawingCommand}from'@univerjs/sheets-drawing';import{FWorksheet}from'@univerjs/sheets/facade';var FSheetsShapeEnumMixin=class extends FEnum{get['ShapeTypeEnum'](){return ShapeTypeEnum;}get['ShapeFillEnum'](){return ShapeFillEnum;}get[_0x4296b1(0x1ab)](){return ShapeGradientTypeEnum;}get[_0x4296b1(0x187)](){return ShapeLineTypeEnum;}get[_0x4296b1(0x1dc)](){return ShapeLineDashEnum;}get[_0x4296b1(0x176)](){return ShapeLineCapEnum;}get[_0x4296b1(0x1d4)](){return ShapeLineJoinEnum;}get[_0x4296b1(0x1b0)](){return ShapeArrowTypeEnum;}get['ShapeArrowSizeEnum'](){return ShapeArrowSizeEnum;}};FEnum[_0x4296b1(0x181)](FSheetsShapeEnumMixin);function _typeof(_0xd175e8){'@babel/helpers - typeof';const _0x53c326=_0x4296b1;return _typeof=_0x53c326(0x179)==typeof Symbol&&_0x53c326(0x185)==typeof Symbol[_0x53c326(0x1cd)]?function(_0x261472){return typeof _0x261472;}:function(_0xb8e2e5){const _0x34ce11=_0x53c326;return _0xb8e2e5&&_0x34ce11(0x179)==typeof Symbol&&_0xb8e2e5['constructor']===Symbol&&_0xb8e2e5!==Symbol[_0x34ce11(0x1ed)]?_0x34ce11(0x185):typeof _0xb8e2e5;},_typeof(_0xd175e8);}function toPrimitive(_0x42ffe3,_0x2193ff){const _0x543da3=_0x4296b1;if(_0x543da3(0x1d9)!=_typeof(_0x42ffe3)||!_0x42ffe3)return _0x42ffe3;var _0x1f93a5=_0x42ffe3[Symbol[_0x543da3(0x1a0)]];if(void 0x0!==_0x1f93a5){var _0x4819c1=_0x1f93a5[_0x543da3(0x1c9)](_0x42ffe3,_0x2193ff||_0x543da3(0x180));if('object'!=_typeof(_0x4819c1))return _0x4819c1;throw new TypeError(_0x543da3(0x1be));}return(_0x543da3(0x1a8)===_0x2193ff?String:Number)(_0x42ffe3);}function toPropertyKey(_0x52c7bd){const _0x4502a3=_0x4296b1;var _0x711b55=toPrimitive(_0x52c7bd,'string');return _0x4502a3(0x185)==_typeof(_0x711b55)?_0x711b55:_0x711b55+'';}function _defineProperty(_0x101f93,_0x301b06,_0x28d40c){return(_0x301b06=toPropertyKey(_0x301b06))in _0x101f93?Object['defineProperty'](_0x101f93,_0x301b06,{'value':_0x28d40c,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x101f93[_0x301b06]=_0x28d40c,_0x101f93;}var FShape=class{constructor(_0x24e252,_0x2d85e6,_0x4ad9e6,_0xd4c48b){const _0x266ae0=_0x4296b1;_defineProperty(this,_0x266ae0(0x1ea),void 0x0),_defineProperty(this,'subUnitId',void 0x0),_defineProperty(this,_0x266ae0(0x1d5),void 0x0),_defineProperty(this,'x',0x0),_defineProperty(this,'y',0x0),_defineProperty(this,_0x266ae0(0x1bc),DEFAULT_SHAPE_WIDTH),_defineProperty(this,_0x266ae0(0x18e),DEFAULT_SHAPE_HEIGHT),_defineProperty(this,_0x266ae0(0x1e1),void 0x0),_defineProperty(this,_0x266ae0(0x177),{}),_defineProperty(this,'_injector',void 0x0),this[_0x266ae0(0x1ea)]=_0x24e252,this['subUnitId']=_0x2d85e6,this[_0x266ae0(0x1d5)]=_0x4ad9e6||generateRandomId(),this[_0x266ae0(0x17a)]=_0xd4c48b;}[_0x4296b1(0x1e3)](_0x4b97e9,_0x140d84,_0x5a849e,_0x332ded){const _0x2c163d=_0x4296b1,_0x81bec1=this[_0x2c163d(0x17a)][_0x2c163d(0x1ad)](SheetSkeletonService)['ensureSkeleton'](this[_0x2c163d(0x1ea)],this['subUnitId']);if(!_0x81bec1)throw new Error('Skeleton\x20for\x20unitId\x20'+this[_0x2c163d(0x1ea)]+'\x20and\x20subUnitId\x20'+this[_0x2c163d(0x170)]+'\x20not\x20found');const {transform:_0x547883}=convertPositionCellToSheetOverGrid(this['unitId'],this['subUnitId'],{'row':_0x4b97e9,'column':_0x140d84,'rowOffset':_0x5a849e,'columnOffset':_0x332ded},0x1,0x1,_0x81bec1);return this['x']=_0x547883[_0x2c163d(0x19d)],this['y']=_0x547883[_0x2c163d(0x1d3)],this;}['setAbsolutePosition'](_0x30e167,_0x4a894a){return this['x']=_0x30e167,this['y']=_0x4a894a,this;}[_0x4296b1(0x1dd)](_0x489677){const _0x4b04c3=_0x4296b1;return this[_0x4b04c3(0x1e1)]=_0x489677,this;}[_0x4296b1(0x1d8)](_0x1899dc,_0x42aac6){const _0x405364=_0x4296b1;if(!this[_0x405364(0x177)]['fill'])this['shapeData'][_0x405364(0x1ba)]={};this[_0x405364(0x177)][_0x405364(0x1ba)][_0x405364(0x195)]=ShapeFillEnum[_0x405364(0x17c)];if(_0x1899dc!==void 0x0)this[_0x405364(0x177)][_0x405364(0x1ba)][_0x405364(0x1c6)]=_0x1899dc;if(_0x42aac6!==void 0x0)this[_0x405364(0x177)][_0x405364(0x1ba)][_0x405364(0x1e2)]=_0x42aac6;return this;}['setShapeGradientFill'](_0x75a39d,_0x4efb58,_0x2c4d6f){const _0x9da8d2=_0x4296b1;if(_0x4efb58===void 0x0||_0x4efb58['length']===0x0)throw new Error(_0x9da8d2(0x184));if(!this[_0x9da8d2(0x177)][_0x9da8d2(0x1ba)])this[_0x9da8d2(0x177)][_0x9da8d2(0x1ba)]={};this[_0x9da8d2(0x177)][_0x9da8d2(0x1ba)][_0x9da8d2(0x191)]=_0x4efb58,this[_0x9da8d2(0x177)][_0x9da8d2(0x1ba)][_0x9da8d2(0x195)]=ShapeFillEnum['GradientFill'],this['shapeData'][_0x9da8d2(0x1ba)][_0x9da8d2(0x186)]=_0x75a39d;if(_0x2c4d6f!==void 0x0)this['shapeData'][_0x9da8d2(0x1ba)][_0x9da8d2(0x183)]=_0x2c4d6f;return this;}[_0x4296b1(0x198)](){const _0x26c4d6=_0x4296b1;return this[_0x26c4d6(0x177)]['fill']={'fillType':ShapeFillEnum['NoFill']},this;}[_0x4296b1(0x1a1)](_0x52eb5c){const _0x12f2e7=_0x4296b1;if(!this[_0x12f2e7(0x177)][_0x12f2e7(0x1de)])this[_0x12f2e7(0x177)][_0x12f2e7(0x1de)]={};return this[_0x12f2e7(0x177)]['stroke'][_0x12f2e7(0x1c6)]=_0x52eb5c,this;}['setStrokeWidth'](_0x308bea){const _0x4e06f9=_0x4296b1;if(!this[_0x4e06f9(0x177)][_0x4e06f9(0x1de)])this['shapeData']['stroke']={};return this[_0x4e06f9(0x177)]['stroke'][_0x4e06f9(0x1bc)]=_0x308bea,this;}[_0x4296b1(0x1c5)](_0x4df6c0){const _0x15c4fc=_0x4296b1;if(!this[_0x15c4fc(0x177)]['stroke'])this['shapeData'][_0x15c4fc(0x1de)]={};return this['shapeData'][_0x15c4fc(0x1de)][_0x15c4fc(0x192)]=_0x4df6c0,this;}[_0x4296b1(0x1bf)](_0x508c3f){const _0x1e8420=_0x4296b1;if(!this[_0x1e8420(0x177)][_0x1e8420(0x1de)])this[_0x1e8420(0x177)][_0x1e8420(0x1de)]={};return this[_0x1e8420(0x177)][_0x1e8420(0x1de)][_0x1e8420(0x1aa)]=_0x508c3f,this;}[_0x4296b1(0x1b5)](_0x1af8ef){const _0x1bfd1f=_0x4296b1;if(!this[_0x1bfd1f(0x177)][_0x1bfd1f(0x1de)])this[_0x1bfd1f(0x177)][_0x1bfd1f(0x1de)]={};return this[_0x1bfd1f(0x177)]['stroke']['capType']=_0x1af8ef,this;}[_0x4296b1(0x1d0)](_0x5d22d1){const _0xe8716b=_0x4296b1;if(!this[_0xe8716b(0x177)][_0xe8716b(0x1de)])this[_0xe8716b(0x177)]['stroke']={};return this[_0xe8716b(0x177)][_0xe8716b(0x1de)][_0xe8716b(0x1e2)]=_0x5d22d1,this;}[_0x4296b1(0x1cf)](_0x1fc1e4){const _0x36f9b3=_0x4296b1;if(!this[_0x36f9b3(0x177)]['stroke'])this[_0x36f9b3(0x177)][_0x36f9b3(0x1de)]={};return this[_0x36f9b3(0x177)][_0x36f9b3(0x1de)]['lineStrokeType']=_0x1fc1e4,this;}[_0x4296b1(0x1e0)](_0x45ea76){const _0xba6e4d=_0x4296b1;return this[_0xba6e4d(0x1bc)]=_0x45ea76,this;}[_0x4296b1(0x1d6)](_0x4987e2){const _0x58758c=_0x4296b1;return this[_0x58758c(0x18e)]=_0x4987e2,this;}['isLineShape'](){const _0xcc2e99=_0x4296b1,_0x295e09=this['_injector'][_0xcc2e99(0x1ad)](SheetsShapeService)[_0xcc2e99(0x197)](this[_0xcc2e99(0x1ea)],this[_0xcc2e99(0x170)],this[_0xcc2e99(0x1d5)]);if(_0x295e09)return isConnectorShape(_0x295e09[_0xcc2e99(0x1e9)]());if(this[_0xcc2e99(0x1e1)])return isConnectorShape(this[_0xcc2e99(0x1e1)]);return![];}[_0x4296b1(0x16e)](){const _0xd83d62=_0x4296b1,_0x2ed5f7=this['_injector']['get'](SheetsShapeService)[_0xd83d62(0x197)](this['unitId'],this[_0xd83d62(0x170)],this[_0xd83d62(0x1d5)]);if(!_0x2ed5f7)return[];const _0x441a09=this[_0xd83d62(0x17a)][_0xd83d62(0x1ad)](IDrawingManagerService)[_0xd83d62(0x1d7)]({'unitId':this['unitId'],'subUnitId':this[_0xd83d62(0x170)],'drawingId':this[_0xd83d62(0x1d5)]});if(!(_0x441a09===null||_0x441a09===void 0x0?void 0x0:_0x441a09['transform']))return[];const {width:width=0x0,height:height=0x0}=_0x441a09[_0xd83d62(0x1b6)];return _0x2ed5f7['updateContext']({'width':width,'height':height}),_0x2ed5f7[_0xd83d62(0x17b)]();}[_0x4296b1(0x1ca)](){const _0x4a736a=_0x4296b1,_0x58a463=this[_0x4a736a(0x17a)][_0x4a736a(0x1ad)](SheetsShapeService)[_0x4a736a(0x197)](this[_0x4a736a(0x1ea)],this[_0x4a736a(0x170)],this[_0x4a736a(0x1d5)]);if(!_0x58a463)return[];const _0x310927=this[_0x4a736a(0x17a)][_0x4a736a(0x1ad)](IDrawingManagerService)[_0x4a736a(0x1d7)]({'unitId':this['unitId'],'subUnitId':this[_0x4a736a(0x170)],'drawingId':this['drawId']});if(!(_0x310927===null||_0x310927===void 0x0?void 0x0:_0x310927[_0x4a736a(0x1b6)]))return[];const {width:width=0x0,height:height=0x0}=_0x310927['transform'];return _0x58a463[_0x4a736a(0x17f)]({'width':width,'height':height}),_0x58a463[_0x4a736a(0x1e8)]();}[_0x4296b1(0x1bb)](){const _0xc19b01=_0x4296b1,_0x227083=this[_0xc19b01(0x17a)]['get'](SheetsShapeService)[_0xc19b01(0x197)](this['unitId'],this['subUnitId'],this[_0xc19b01(0x1d5)]);if(!_0x227083)return[];if(!isConnectorShape(_0x227083[_0xc19b01(0x1e9)]()))return[];const _0x23795a=this[_0xc19b01(0x17a)][_0xc19b01(0x1ad)](IDrawingManagerService)[_0xc19b01(0x1d7)]({'unitId':this[_0xc19b01(0x1ea)],'subUnitId':this[_0xc19b01(0x170)],'drawingId':this['drawId']});if(!(_0x23795a===null||_0x23795a===void 0x0?void 0x0:_0x23795a[_0xc19b01(0x1b6)]))return[];const {width:width=0x0,height:height=0x0}=_0x23795a[_0xc19b01(0x1b6)];return _0x227083[_0xc19b01(0x17f)]({'width':width,'height':height}),_0x227083[_0xc19b01(0x1bb)]();}[_0x4296b1(0x1e7)](){const _0x589962=_0x4296b1;var _0x1a2caf;const _0x4239ee=this['_injector'][_0x589962(0x1ad)](SheetsShapeService)[_0x589962(0x197)](this['unitId'],this['subUnitId'],this[_0x589962(0x1d5)]);if(!_0x4239ee)return null;return(_0x1a2caf=_0x4239ee[_0x589962(0x1e7)]())!==null&&_0x1a2caf!==void 0x0?_0x1a2caf:null;}[_0x4296b1(0x1af)](){const _0x45bb25=_0x4296b1;var _0x207fbd;const _0xe1c07f=this[_0x45bb25(0x17a)][_0x45bb25(0x1ad)](SheetsShapeService)[_0x45bb25(0x197)](this[_0x45bb25(0x1ea)],this['subUnitId'],this[_0x45bb25(0x1d5)]);if(!_0xe1c07f)return null;return(_0x207fbd=_0xe1c07f['getEndConnectInfo']())!==null&&_0x207fbd!==void 0x0?_0x207fbd:null;}['build'](){const _0x5ddd54=_0x4296b1;var _0x30e3a6,_0x1cedc9;if(!this[_0x5ddd54(0x1e1)])throw new Error(_0x5ddd54(0x1ec));if(this['x']===0x0||this['y']===0x0){const _0xc90448=this[_0x5ddd54(0x17a)][_0x5ddd54(0x1ad)](SheetSkeletonService)[_0x5ddd54(0x1b3)](this[_0x5ddd54(0x1ea)],this[_0x5ddd54(0x170)]);if(!_0xc90448)throw new Error(_0x5ddd54(0x1b1)+this['unitId']+_0x5ddd54(0x17e)+this[_0x5ddd54(0x170)]+_0x5ddd54(0x1da));const {transform:_0x21cf9d}=convertPositionCellToSheetOverGrid(this[_0x5ddd54(0x1ea)],this[_0x5ddd54(0x170)],{'row':0x1,'column':0x1,'rowOffset':0x0,'columnOffset':0x0},0x1,0x1,_0xc90448);this['x']=this['x']>0x0?this['x']:_0x21cf9d[_0x5ddd54(0x19d)],this['y']=this['y']>0x0?this['y']:_0x21cf9d['top'];}return this[_0x5ddd54(0x1bc)]=(_0x30e3a6=this[_0x5ddd54(0x1bc)])!==null&&_0x30e3a6!==void 0x0?_0x30e3a6:DEFAULT_SHAPE_WIDTH,this[_0x5ddd54(0x18e)]=(_0x1cedc9=this[_0x5ddd54(0x18e)])!==null&&_0x1cedc9!==void 0x0?_0x1cedc9:DEFAULT_SHAPE_HEIGHT,{'unitId':this[_0x5ddd54(0x1ea)],'subUnitId':this['subUnitId'],'shapeId':this['drawId'],'shapeType':this['shapeType'],'shapeData':Object[_0x5ddd54(0x1b7)](this[_0x5ddd54(0x177)])[_0x5ddd54(0x1a5)]>0x0?this[_0x5ddd54(0x177)]:void 0x0,'x':this['x'],'y':this['y'],'width':this['width'],'height':this['height']};}[_0x4296b1(0x16d)](){return this['drawId'];}[_0x4296b1(0x1e9)](){const _0xb9b10d=_0x4296b1;return this[_0xb9b10d(0x1e1)];}[_0x4296b1(0x1df)](){const _0x380fff=_0x4296b1;return this[_0x380fff(0x177)];}[_0x4296b1(0x199)](){return{'x':this['x'],'y':this['y']};}[_0x4296b1(0x1a2)](){const _0x4b024c=_0x4296b1;return{'width':this[_0x4b024c(0x1bc)],'height':this['height']};}},FConnectorShape=class extends FShape{constructor(_0x545d83,_0x2e3df6,_0x3437e8,_0x3b9d35){const _0x1dfb4e=_0x4296b1;super(_0x545d83,_0x2e3df6,_0x3437e8,_0x3b9d35),_defineProperty(this,_0x1dfb4e(0x177),{});}['setShapeType'](_0x38dd2d){const _0x302968=_0x4296b1;if(!isConnectorShape(_0x38dd2d))throw new Error(_0x302968(0x1b2)+_0x38dd2d+_0x302968(0x1a9));return super[_0x302968(0x1dd)](_0x38dd2d),this;}['setStartArrowType'](_0xd2b8ec){const _0x4f48ba=_0x4296b1;var _0x2df4c5,_0x2f88e9;if(!((_0x2df4c5=this[_0x4f48ba(0x177)])===null||_0x2df4c5===void 0x0?void 0x0:_0x2df4c5['ln']))this[_0x4f48ba(0x177)]['ln']={};if(!((_0x2f88e9=this[_0x4f48ba(0x177)])===null||_0x2f88e9===void 0x0||(_0x2f88e9=_0x2f88e9['ln'])===null||_0x2f88e9===void 0x0?void 0x0:_0x2f88e9[_0x4f48ba(0x1ce)]))this[_0x4f48ba(0x177)]['ln'][_0x4f48ba(0x1ce)]={};return this['shapeData']['ln'][_0x4f48ba(0x1ce)]['type']=_0xd2b8ec,this;}[_0x4296b1(0x19b)](_0x5302af){const _0x4053a6=_0x4296b1;var _0x3588cf,_0x590902;if(!((_0x3588cf=this[_0x4053a6(0x177)])===null||_0x3588cf===void 0x0?void 0x0:_0x3588cf['ln']))this[_0x4053a6(0x177)]['ln']={};if(!((_0x590902=this['shapeData'])===null||_0x590902===void 0x0||(_0x590902=_0x590902['ln'])===null||_0x590902===void 0x0?void 0x0:_0x590902['endArrow']))this[_0x4053a6(0x177)]['ln'][_0x4053a6(0x172)]={};return this[_0x4053a6(0x177)]['ln'][_0x4053a6(0x172)][_0x4053a6(0x173)]=_0x5302af,this;}[_0x4296b1(0x17d)](_0x2e5bd4){const _0x5ec447=_0x4296b1;var _0xda075e,_0x3a1207;if(!((_0xda075e=this[_0x5ec447(0x177)])===null||_0xda075e===void 0x0?void 0x0:_0xda075e['ln']))this['shapeData']['ln']={};if(!((_0x3a1207=this[_0x5ec447(0x177)])===null||_0x3a1207===void 0x0||(_0x3a1207=_0x3a1207['ln'])===null||_0x3a1207===void 0x0?void 0x0:_0x3a1207[_0x5ec447(0x1ce)]))this[_0x5ec447(0x177)]['ln'][_0x5ec447(0x1ce)]={};return this['shapeData']['ln'][_0x5ec447(0x1ce)][_0x5ec447(0x19a)]=_0x2e5bd4,this;}['setEndArrowSize'](_0x17dd49){const _0x479f1c=_0x4296b1;var _0x444d95,_0x4b808d;if(!((_0x444d95=this[_0x479f1c(0x177)])===null||_0x444d95===void 0x0?void 0x0:_0x444d95['ln']))this[_0x479f1c(0x177)]['ln']={};if(!((_0x4b808d=this[_0x479f1c(0x177)])===null||_0x4b808d===void 0x0||(_0x4b808d=_0x4b808d['ln'])===null||_0x4b808d===void 0x0?void 0x0:_0x4b808d['endArrow']))this[_0x479f1c(0x177)]['ln']['endArrow']={};return this['shapeData']['ln'][_0x479f1c(0x172)][_0x479f1c(0x19a)]=_0x17dd49,this;}[_0x4296b1(0x1d2)](){return super['build']();}[_0x4296b1(0x1af)](){var _0x510935;return((_0x510935=this['shapeData'])===null||_0x510935===void 0x0||(_0x510935=_0x510935['relation'])===null||_0x510935===void 0x0?void 0x0:_0x510935['to'])||null;}[_0x4296b1(0x1e7)](){const _0x123950=_0x4296b1;var _0x43b1ba;return((_0x43b1ba=this[_0x123950(0x177)])===null||_0x43b1ba===void 0x0||(_0x43b1ba=_0x43b1ba['relation'])===null||_0x43b1ba===void 0x0?void 0x0:_0x43b1ba[_0x123950(0x1c0)])||null;}};function computeConnectionPointInfo(_0x3aabea,_0x5ee288,_0x51e515,_0x7e8a40,_0x380c1d,_0x122970){const _0x3184ab=_0x4296b1,_0x43671c=_0x380c1d[_0x3184ab(0x197)](_0x3aabea,_0x5ee288,_0x51e515);if(!_0x43671c)return null;const _0x5f4c3=_0x122970[_0x3184ab(0x1d7)]({'unitId':_0x3aabea,'subUnitId':_0x5ee288,'drawingId':_0x51e515});if(!(_0x5f4c3===null||_0x5f4c3===void 0x0?void 0x0:_0x5f4c3[_0x3184ab(0x1b6)]))return null;const {left:left=0x0,top:top=0x0,width:width=0x0,height:height=0x0,flipX:flipX=![],flipY:flipY=![],angle:_0x13eca9}=_0x5f4c3[_0x3184ab(0x1b6)];_0x43671c[_0x3184ab(0x17f)]({'width':width,'height':height});const _0xcef540=_0x43671c[_0x3184ab(0x17b)]()[_0x3184ab(0x171)](_0x641d2d=>_0x641d2d['index']===_0x7e8a40);if(!_0xcef540)return null;let _0x29dd94=flipX?width-_0xcef540['x']:_0xcef540['x'],_0x48d2a7=flipY?height-_0xcef540['y']:_0xcef540['y'];if(_0x13eca9&&_0x13eca9!==0x0){const _0x2a2f29=_0x13eca9*Math['PI']/0xb4,_0x3e3f40=Math[_0x3184ab(0x1db)](_0x2a2f29),_0x2f288e=Math[_0x3184ab(0x194)](_0x2a2f29),_0x288407=width/0x2,_0x20f3af=height/0x2,_0x536eeb=_0x29dd94-_0x288407,_0x1bdb50=_0x48d2a7-_0x20f3af;_0x29dd94=_0x288407+_0x536eeb*_0x3e3f40-_0x1bdb50*_0x2f288e,_0x48d2a7=_0x20f3af+_0x536eeb*_0x2f288e+_0x1bdb50*_0x3e3f40;}_0x29dd94+=left,_0x48d2a7+=top;let _0x498542=_0xcef540[_0x3184ab(0x18b)]/0xea60;if(flipX)_0x498542=0xb4-_0x498542;if(flipY)_0x498542=-_0x498542;_0x498542+=_0x13eca9||0x0,_0x498542=(_0x498542%0x168+0x168)%0x168;const _0x7df8cb=getBasicShapeRotateBound({'left':left,'top':top,'width':width,'height':height},_0x13eca9||0x0);return{'point':{'x':_0x29dd94,'y':_0x48d2a7},'angle':_0x498542,'bounds':_0x7df8cb};}function calculateFreeEndpointAngle(_0x382f26,_0x49e5df){const _0x45635b=_0x4296b1,_0x32d072=_0x49e5df['x']-_0x382f26['x'],_0x30b5e5=_0x49e5df['y']-_0x382f26['y'];if(Math[_0x45635b(0x1e5)](_0x32d072)>=Math['abs'](_0x30b5e5))return _0x32d072>=0x0?0xb4:0x0;return _0x30b5e5>=0x0?0x10e:0x5a;}function computeFreeEndpointInfo(_0x502745,_0x3f0c48,_0x3651d2,_0x419f03,_0x355d1a,_0x2d3e3b,_0x4b7aa0){const _0x2a71a1=_0x4296b1,_0x27091f=_0x2d3e3b[_0x2a71a1(0x197)](_0x502745,_0x3f0c48,_0x3651d2);if(!_0x27091f)return null;const _0x2098c1=_0x4b7aa0['getDrawingByParam']({'unitId':_0x502745,'subUnitId':_0x3f0c48,'drawingId':_0x3651d2});if(!(_0x2098c1===null||_0x2098c1===void 0x0?void 0x0:_0x2098c1[_0x2a71a1(0x1b6)]))return null;const {left:left=0x0,top:top=0x0,width:width=0x0,height:height=0x0,flipX:flipX=![],flipY:flipY=![]}=_0x2098c1['transform'];_0x27091f[_0x2a71a1(0x17f)]({'width':width,'height':height});const _0x434dee=_0x27091f[_0x2a71a1(0x1bb)]();if(_0x434dee[_0x2a71a1(0x1a5)]<0x2)return null;const _0x1f585a=_0x419f03?_0x434dee[0x0]:_0x434dee[_0x434dee[_0x2a71a1(0x1a5)]-0x1],_0x2db3a1=new ConnectorCoordinateTransform({'left':left,'top':top,'width':width,'height':height,'flipX':flipX,'flipY':flipY})[_0x2a71a1(0x1e6)](_0x1f585a);return{'point':_0x2db3a1,'angle':calculateFreeEndpointAngle(_0x355d1a['point'],_0x2db3a1),'bounds':{'left':_0x2db3a1['x'],'top':_0x2db3a1['y'],'width':0x0,'height':0x0}};}var FWorksheetShapeMixin=class extends FWorksheet{async[_0x4296b1(0x175)](_0x59fdfd){const _0x2e0bcb=_0x4296b1,{unitId:_0x5a542e,subUnitId:_0x127d02,shapeId:_0x31b02a,shapeType:_0x5537b9,shapeData:_0x11494a,x:_0xbe9019,y:_0x570793,width:_0x502b7a,height:_0x29d44b}=_0x59fdfd;return this['_commandService'][_0x2e0bcb(0x178)](InsertShapeCommand['id'],{'unitId':_0x5a542e,'subUnitId':_0x127d02,'shapeId':_0x31b02a,'shapeType':_0x5537b9,'shapeData':_0x11494a,'position':{'x':_0xbe9019,'y':_0x570793},'width':_0x502b7a,'height':_0x29d44b});}async[_0x4296b1(0x1ef)](_0x415ccd){const _0x408cb4=_0x4296b1,{unitId:_0x39eab7,subUnitId:_0x59024b,shapeId:_0x1c6674,shapeType:_0x35f437,shapeData:_0x36b1be,x:_0x253a1a,y:_0x28b9ce,width:_0x56e549,height:_0x13b20a}=_0x415ccd;return this[_0x408cb4(0x1c4)][_0x408cb4(0x178)](SetShapeDrawingDataCommand['id'],{'unitId':_0x39eab7,'subUnitId':_0x59024b,'shapeId':_0x1c6674,'shapeType':_0x35f437,'shapeData':_0x36b1be,'position':{'x':_0x253a1a,'y':_0x28b9ce},'width':_0x56e549,'height':_0x13b20a});}[_0x4296b1(0x1b9)](_0x3e1d0b){const _0xfdf40=_0x4296b1,_0x2c4d69=this[_0xfdf40(0x193)]()[_0xfdf40(0x19f)](),_0x4bda6b=this[_0xfdf40(0x1b8)]();if(_0x3e1d0b){const _0x187976=new FShape(_0x2c4d69,_0x4bda6b,_0x3e1d0b[_0xfdf40(0x1d5)],this[_0xfdf40(0x17a)]);return this['_preloadShapeProperties'](_0x187976,_0x2c4d69,_0x4bda6b,_0x3e1d0b['drawId']),_0x187976;}return new FShape(_0x2c4d69,_0x4bda6b,generateRandomId(),this[_0xfdf40(0x17a)]);}[_0x4296b1(0x18f)](_0x2bf1f3){const _0x2d9923=_0x4296b1,_0x185826=this[_0x2d9923(0x193)]()[_0x2d9923(0x19f)](),_0x51c78f=this[_0x2d9923(0x1b8)]();if(_0x2bf1f3){const _0x4c5b91=new FConnectorShape(_0x185826,_0x51c78f,_0x2bf1f3[_0x2d9923(0x1d5)],this[_0x2d9923(0x17a)]);return this[_0x2d9923(0x1c1)](_0x4c5b91,_0x185826,_0x51c78f,_0x2bf1f3[_0x2d9923(0x1d5)]),_0x4c5b91;}return new FConnectorShape(_0x185826,_0x51c78f,generateRandomId(),this['_injector']);}['getShapes'](){const _0x27b81a=_0x4296b1,_0x183efd=this[_0x27b81a(0x17a)]['get'](ISheetDrawingService),_0x1b6ff2=this[_0x27b81a(0x193)]()[_0x27b81a(0x19f)](),_0x58579e=this[_0x27b81a(0x1b8)](),_0x4e9109=_0x183efd['getDrawingData'](_0x1b6ff2,_0x58579e);if(!_0x4e9109)return[];const _0x2bdffc=[];for(const [_0x7993b8,_0x4a8792]of Object[_0x27b81a(0x1bd)](_0x4e9109))if(_0x4a8792&&_0x4a8792['drawingType']===DrawingTypeEnum[_0x27b81a(0x18a)]){const _0x15d2c1=new FShape(_0x1b6ff2,_0x58579e,_0x7993b8,this[_0x27b81a(0x17a)]);this[_0x27b81a(0x1c1)](_0x15d2c1,_0x1b6ff2,_0x58579e,_0x7993b8),_0x2bdffc['push'](_0x15d2c1);}return _0x2bdffc;}[_0x4296b1(0x174)](_0x140c0e){const _0x590d17=_0x4296b1,{unitId:_0x5398c5,subUnitId:_0x2c1a0a,drawId:_0x39da9c}=_0x140c0e;return this[_0x590d17(0x1c4)][_0x590d17(0x178)](RemoveSheetDrawingCommand['id'],{'unitId':_0x5398c5,'drawings':[{'unitId':_0x5398c5,'subUnitId':_0x2c1a0a,'drawingId':_0x39da9c,'drawingType':DrawingTypeEnum['DRAWING_SHAPE']}]});}async[_0x4296b1(0x1e4)](_0x149288){const _0x31e303=_0x4296b1,{connector:_0xb6bcee,startTarget:_0x151dbe,endTarget:_0x3c4595}=_0x149288;if(!_0x151dbe&&!_0x3c4595)return![];const _0x1b26e7=this[_0x31e303(0x193)]()[_0x31e303(0x19f)](),_0xbb405f=this[_0x31e303(0x1b8)](),_0x2694c0=this['_injector']['get'](SheetsShapeService),_0x1f1d63=this[_0x31e303(0x17a)][_0x31e303(0x1ad)](IDrawingManagerService),_0xb504c=_0x2694c0['getShapeModel'](_0x1b26e7,_0xbb405f,_0xb6bcee[_0x31e303(0x1d5)]);if(!_0xb504c)return![];const _0x4a4471=_0xb504c[_0x31e303(0x1e9)](),_0x1efcde=_0xb504c[_0x31e303(0x1cb)](),_0x37ac88={};for(const _0x36ae1b of _0xb504c[_0x31e303(0x1c7)]()){const _0x3fe095=_0xb504c[_0x31e303(0x1d1)](_0x36ae1b);if(_0x3fe095!==void 0x0)_0x37ac88[_0x36ae1b]=_0x3fe095;}const {startInfo:_0x29ec96,endInfo:_0x28b1ea}=this[_0x31e303(0x16f)](_0x1b26e7,_0xbb405f,_0xb6bcee,_0xb504c,_0x151dbe,_0x3c4595,_0x2694c0,_0x1f1d63,_0x1efcde);if(!_0x29ec96||!_0x28b1ea)return![];const _0x42224d=computeConnectorRouteLayout(routeConnectorLineShape(_0x29ec96,_0x28b1ea,_0x4a4471),_0x4a4471),_0x48d06d={};if(_0x151dbe)_0x48d06d[_0x31e303(0x1c0)]={'shapeId':_0x151dbe[_0x31e303(0x1a3)][_0x31e303(0x1d5)],'cxnIndex':_0x151dbe['connectionSiteIndex']};else{if(_0x1efcde===null||_0x1efcde===void 0x0?void 0x0:_0x1efcde[_0x31e303(0x1c0)])_0x48d06d['from']=_0x1efcde[_0x31e303(0x1c0)];}if(_0x3c4595)_0x48d06d['to']={'shapeId':_0x3c4595[_0x31e303(0x1a3)]['drawId'],'cxnIndex':_0x3c4595['connectionSiteIndex']};else{if(_0x1efcde===null||_0x1efcde===void 0x0?void 0x0:_0x1efcde['to'])_0x48d06d['to']=_0x1efcde['to'];}return this['_commandService']['executeCommand'](UpdateConnectorRelationCommand['id'],{'unitId':_0x1b26e7,'subUnitId':_0xbb405f,'connectorShapeId':_0xb6bcee[_0x31e303(0x1d5)],'width':_0x42224d[_0x31e303(0x182)][_0x31e303(0x1bc)],'height':_0x42224d['worldRect'][_0x31e303(0x18e)],'left':_0x42224d[_0x31e303(0x182)][_0x31e303(0x19d)],'top':_0x42224d[_0x31e303(0x182)][_0x31e303(0x1d3)],'flipX':_0x42224d['worldRect'][_0x31e303(0x196)]||![],'flipY':_0x42224d[_0x31e303(0x182)][_0x31e303(0x1a7)]||![],'oldAdjustValues':_0x37ac88,'newAdjustValues':_0x42224d[_0x31e303(0x19c)],'newLineType':_0x42224d['lineType'],'oldLineType':_0x4a4471,'rotation':_0x42224d[_0x31e303(0x1c3)],'oldRelation':_0x1efcde,'newRelation':_0x48d06d});}[_0x4296b1(0x1c1)](_0x334790,_0x767677,_0x1f7997,_0x68ffac){const _0xd7caa5=_0x4296b1,_0x59a1bf=this[_0xd7caa5(0x17a)][_0xd7caa5(0x1ad)](IDrawingManagerService)[_0xd7caa5(0x1d7)]({'unitId':_0x767677,'subUnitId':_0x1f7997,'drawingId':_0x68ffac});if(_0x59a1bf===null||_0x59a1bf===void 0x0?void 0x0:_0x59a1bf[_0xd7caa5(0x1b6)]){var _0x4b61b8,_0x112f1e,_0x3fc427,_0x10ba6f;_0x334790['x']=(_0x4b61b8=_0x59a1bf[_0xd7caa5(0x1b6)]['left'])!==null&&_0x4b61b8!==void 0x0?_0x4b61b8:0x0,_0x334790['y']=(_0x112f1e=_0x59a1bf[_0xd7caa5(0x1b6)][_0xd7caa5(0x1d3)])!==null&&_0x112f1e!==void 0x0?_0x112f1e:0x0,_0x334790[_0xd7caa5(0x1bc)]=(_0x3fc427=_0x59a1bf[_0xd7caa5(0x1b6)]['width'])!==null&&_0x3fc427!==void 0x0?_0x3fc427:_0x334790[_0xd7caa5(0x1bc)],_0x334790['height']=(_0x10ba6f=_0x59a1bf[_0xd7caa5(0x1b6)][_0xd7caa5(0x18e)])!==null&&_0x10ba6f!==void 0x0?_0x10ba6f:_0x334790[_0xd7caa5(0x18e)];}const _0x261fed=this['_injector'][_0xd7caa5(0x1ad)](SheetsShapeService)[_0xd7caa5(0x197)](_0x767677,_0x1f7997,_0x68ffac);if(_0x261fed){_0x334790[_0xd7caa5(0x1e1)]=_0x261fed['getShapeType']();const _0x1ad07e=_0x261fed[_0xd7caa5(0x1df)]();if(_0x1ad07e)_0x334790[_0xd7caa5(0x177)]=JSON[_0xd7caa5(0x189)](JSON[_0xd7caa5(0x1a6)](_0x1ad07e));}}[_0x4296b1(0x16f)](_0x43c675,_0x11c40f,_0x18bc0f,_0x1134ce,_0x12a4d8,_0x44bb2b,_0x537a15,_0x4a3154,_0x920042){const _0x2f10ed=_0x4296b1;let _0x4c6609=null,_0x446331=null;if(_0x12a4d8)_0x4c6609=computeConnectionPointInfo(_0x43c675,_0x11c40f,_0x12a4d8['shape']['drawId'],_0x12a4d8['connectionSiteIndex'],_0x537a15,_0x4a3154);if(_0x44bb2b)_0x446331=computeConnectionPointInfo(_0x43c675,_0x11c40f,_0x44bb2b[_0x2f10ed(0x1a3)]['drawId'],_0x44bb2b[_0x2f10ed(0x1eb)],_0x537a15,_0x4a3154);if(!_0x4c6609)_0x4c6609=this[_0x2f10ed(0x18c)](_0x43c675,_0x11c40f,_0x18bc0f['drawId'],!![],_0x446331,_0x920042===null||_0x920042===void 0x0?void 0x0:_0x920042['from'],_0x537a15,_0x4a3154);if(!_0x446331)_0x446331=this['_resolveExistingOrFreeEndpoint'](_0x43c675,_0x11c40f,_0x18bc0f[_0x2f10ed(0x1d5)],![],_0x4c6609,_0x920042===null||_0x920042===void 0x0?void 0x0:_0x920042['to'],_0x537a15,_0x4a3154);return{'startInfo':_0x4c6609,'endInfo':_0x446331};}[_0x4296b1(0x18c)](_0x335f37,_0x2905b5,_0x315790,_0x566a80,_0x2a802b,_0x5445e4,_0x2398c7,_0x22811f){const _0x2788c6=_0x4296b1;if(_0x5445e4){const _0x1dc872=computeConnectionPointInfo(_0x335f37,_0x2905b5,_0x5445e4[_0x2788c6(0x1ac)],_0x5445e4['cxnIndex'],_0x2398c7,_0x22811f);if(_0x1dc872)return _0x1dc872;}if(!_0x2a802b)return null;return computeFreeEndpointInfo(_0x335f37,_0x2905b5,_0x315790,_0x566a80,_0x2a802b,_0x2398c7,_0x22811f);}};FWorksheet[_0x4296b1(0x181)](FWorksheetShapeMixin);export{FConnectorShape,FShape};
1
+ const _0x53a71e=_0x5b4f;(function(_0x548cfa,_0x4235c9){const _0x2ed275=_0x5b4f,_0x50ba62=_0x548cfa();while(!![]){try{const _0x1db6b8=-parseInt(_0x2ed275(0x210))/0x1+-parseInt(_0x2ed275(0x1d7))/0x2+-parseInt(_0x2ed275(0x20a))/0x3*(parseInt(_0x2ed275(0x1e0))/0x4)+parseInt(_0x2ed275(0x216))/0x5+-parseInt(_0x2ed275(0x1c4))/0x6+-parseInt(_0x2ed275(0x1e2))/0x7*(parseInt(_0x2ed275(0x1eb))/0x8)+parseInt(_0x2ed275(0x227))/0x9;if(_0x1db6b8===_0x4235c9)break;else _0x50ba62['push'](_0x50ba62['shift']());}catch(_0x31afde){_0x50ba62['push'](_0x50ba62['shift']());}}}(_0x4fec,0xeae00));import{ConnectorCoordinateTransform as _0x2b99d0,ShapeArrowSizeEnum as _0x3c66d1,ShapeArrowTypeEnum as _0x19b334,ShapeFillEnum as _0x599b76,ShapeGradientTypeEnum as _0x378d1f,ShapeLineCapEnum as _0x41de1f,ShapeLineDashEnum as _0x371bb5,ShapeLineJoinEnum as _0x113cba,ShapeLineTypeEnum as _0x4ba80a,ShapeTypeEnum as _0x3ee61a,computeConnectorRouteLayout as _0x161e4a,getBasicShapeRotateBound as _0x3428de,isConnectorShape as _0x2dda75,routeConnectorLineShape as _0x1250a}from'@univerjs-pro/engine-shape';import{FEnum as _0x278735}from'@univerjs/core/facade';import{DEFAULT_SHAPE_HEIGHT as _0x152a18,DEFAULT_SHAPE_WIDTH as _0x10534a,InsertShapeCommand as _0xa7036e,SetShapeDrawingDataCommand as _0x1bda4b,SheetsShapeService as _0x10209e,UpdateConnectorRelationCommand as _0x503e9e}from'@univerjs-pro/sheets-shape';import{DrawingTypeEnum as _0x15d1ae,generateRandomId as _0x319fad}from'@univerjs/core';import{IDrawingManagerService as _0x239cba}from'@univerjs/drawing';import{SheetSkeletonService as _0x410ec5,convertPositionCellToSheetOverGrid as _0x1d244d}from'@univerjs/sheets';import{ISheetDrawingService as _0x72c741,RemoveSheetDrawingCommand as _0x36ca0b}from'@univerjs/sheets-drawing';import{FWorksheet as _0x228e93}from'@univerjs/sheets/facade';var k=class extends _0x278735{get['ShapeTypeEnum'](){return _0x3ee61a;}get[_0x53a71e(0x211)](){return _0x599b76;}get[_0x53a71e(0x1f2)](){return _0x378d1f;}get[_0x53a71e(0x1c3)](){return _0x4ba80a;}get[_0x53a71e(0x1c2)](){return _0x371bb5;}get[_0x53a71e(0x236)](){return _0x41de1f;}get[_0x53a71e(0x23c)](){return _0x113cba;}get[_0x53a71e(0x1d9)](){return _0x19b334;}get['ShapeArrowSizeEnum'](){return _0x3c66d1;}};function _0x5b4f(_0x119010,_0x32b75f){_0x119010=_0x119010-0x1c1;const _0x4fec5f=_0x4fec();let _0x5b4f3d=_0x4fec5f[_0x119010];return _0x5b4f3d;}_0x278735[_0x53a71e(0x1d5)](k);function _0x4fec(){const _0x1fb1e1=['build','width','connectionSiteIndex','shapeId','shapeData','_injector','1137gzbOkb','_resolveEndpoints','stroke',',\x20but\x20expected\x20a\x20connector\x20shape\x20type.','setShapeGradientFill','default','910829CaVIau','ShapeFillEnum','transform','setStrokeLineType','setNoneFill','setStartArrowType','5490540SPmtrA','NoFill','getConnectionSiteList','getStartConnectInfo','index','Invalid\x20shape\x20type\x20for\x20connector.\x20Received\x20','gradientStops','sin','getAdjustPoints','color','getShapeType','abs','getConnectorLinePoints','left','getShapeId','function','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','43826778kVoCPM','worldRect','shape','getSize','isLineShape','gradientType','_commandService','getWorkbook','flipX','fill','getShapeModel','rotation','setShapeSolidFill','setShapeType','getSheetId','ShapeLineCapEnum','top','keys','getAdjustNames','setStrokeLineCapType','setEndArrowType','ShapeLineJoinEnum','GradientFill','relation','string','Skeleton\x20for\x20unitId\x20','setStrokeColor','ShapeLineDashEnum','ShapeLineTypeEnum','4899978xFLqrN','getShapeRelation','getShapes','setStrokeLineJoinType','get','setStrokeLineDashType','adjustValues','_preloadShapeProperties','defineProperty','push','subUnitId','getUnitId','prototype','flipY','updateContext','setPosition','stringify','extend','updateShape','541976DjsCIg','getPosition','ShapeArrowTypeEnum','getEndConnectInfo','opacity','getDrawingPoints','call','type','height','11612jROGgs','fillType','4039NhEGPd','unitId','object','gradientAngle','lineStrokeType','localToWorld','cos','cxnIndex','endArrow','26440UdksUI','find','DRAWING_SHAPE','_resolveExistingOrFreeEndpoint','symbol','iterator','from','ShapeGradientTypeEnum','shapeType','drawId','executeCommand','drawingType','getConnectionSites','setStrokeOpacity','lineType','removeShape','dashType','insertShape','getDrawingByParam','lineJoinType','\x20and\x20subUnitId\x20','startArrow','point','capType','size'];_0x4fec=function(){return _0x1fb1e1;};return _0x4fec();}function A(_0x8cf55d){'@babel/helpers - typeof';const _0x23a40b=_0x53a71e;return A=typeof Symbol==_0x23a40b(0x225)&&typeof Symbol[_0x23a40b(0x1f0)]=='symbol'?function(_0x2a0666){return typeof _0x2a0666;}:function(_0x18166a){const _0x4a08c5=_0x23a40b;return _0x18166a&&typeof Symbol==_0x4a08c5(0x225)&&_0x18166a['constructor']===Symbol&&_0x18166a!==Symbol[_0x4a08c5(0x1d0)]?_0x4a08c5(0x1ef):typeof _0x18166a;},A(_0x8cf55d);}function j(_0xe1e119,_0x47bfe5){const _0x286c9c=_0x53a71e;if(A(_0xe1e119)!=_0x286c9c(0x1e4)||!_0xe1e119)return _0xe1e119;var _0x1d1fbc=_0xe1e119[Symbol['toPrimitive']];if(_0x1d1fbc!==void 0x0){var _0x4a1957=_0x1d1fbc[_0x286c9c(0x1dd)](_0xe1e119,_0x47bfe5||_0x286c9c(0x20f));if(A(_0x4a1957)!='object')return _0x4a1957;throw TypeError(_0x286c9c(0x226));}return(_0x47bfe5===_0x286c9c(0x23f)?String:Number)(_0xe1e119);}function M(_0x21e035){const _0x2bf7f9=_0x53a71e;var _0x2503d7=j(_0x21e035,'string');return A(_0x2503d7)==_0x2bf7f9(0x1ef)?_0x2503d7:_0x2503d7+'';}function N(_0x1847bb,_0x12f94d,_0x4040af){const _0x2f9eed=_0x53a71e;return(_0x12f94d=M(_0x12f94d))in _0x1847bb?Object[_0x2f9eed(0x1cc)](_0x1847bb,_0x12f94d,{'value':_0x4040af,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x1847bb[_0x12f94d]=_0x4040af,_0x1847bb;}var P=class{constructor(_0x209d66,_0x5b5b42,_0x4a89e9,_0x12e756){const _0x73fc4a=_0x53a71e;N(this,_0x73fc4a(0x1e3),void 0x0),N(this,_0x73fc4a(0x1ce),void 0x0),N(this,'drawId',void 0x0),N(this,'x',0x0),N(this,'y',0x0),N(this,_0x73fc4a(0x205),_0x10534a),N(this,_0x73fc4a(0x1df),_0x152a18),N(this,_0x73fc4a(0x1f3),void 0x0),N(this,_0x73fc4a(0x208),{}),N(this,_0x73fc4a(0x209),void 0x0),this[_0x73fc4a(0x1e3)]=_0x209d66,this[_0x73fc4a(0x1ce)]=_0x5b5b42,this[_0x73fc4a(0x1f4)]=_0x4a89e9||_0x319fad(),this[_0x73fc4a(0x209)]=_0x12e756;}[_0x53a71e(0x1d3)](_0x3a10de,_0x3a71dd,_0x23e801,_0x412df5){const _0x498568=_0x53a71e;let _0x54230e=this[_0x498568(0x209)][_0x498568(0x1c8)](_0x410ec5)['ensureSkeleton'](this[_0x498568(0x1e3)],this['subUnitId']);if(!_0x54230e)throw Error(_0x498568(0x240)+this[_0x498568(0x1e3)]+_0x498568(0x1ff)+this[_0x498568(0x1ce)]+'\x20not\x20found');let {transform:_0x19331e}=_0x1d244d(this[_0x498568(0x1e3)],this[_0x498568(0x1ce)],{'row':_0x3a10de,'column':_0x3a71dd,'rowOffset':_0x23e801,'columnOffset':_0x412df5},0x1,0x1,_0x54230e);return this['x']=_0x19331e[_0x498568(0x223)],this['y']=_0x19331e['top'],this;}['setAbsolutePosition'](_0x1ae126,_0x22898b){return this['x']=_0x1ae126,this['y']=_0x22898b,this;}[_0x53a71e(0x234)](_0x513fcf){const _0xda8724=_0x53a71e;return this[_0xda8724(0x1f3)]=_0x513fcf,this;}[_0x53a71e(0x233)](_0x5a7aec,_0xa6e4a8){const _0x1bd20e=_0x53a71e;return this[_0x1bd20e(0x208)]['fill']||(this[_0x1bd20e(0x208)][_0x1bd20e(0x230)]={}),this['shapeData'][_0x1bd20e(0x230)][_0x1bd20e(0x1e1)]=_0x599b76['SolidFill'],_0x5a7aec!==void 0x0&&(this[_0x1bd20e(0x208)][_0x1bd20e(0x230)][_0x1bd20e(0x21f)]=_0x5a7aec),_0xa6e4a8!==void 0x0&&(this[_0x1bd20e(0x208)][_0x1bd20e(0x230)][_0x1bd20e(0x1db)]=_0xa6e4a8),this;}[_0x53a71e(0x20e)](_0x124fdf,_0x39597f,_0x12b286){const _0x12658a=_0x53a71e;if(_0x39597f===void 0x0||_0x39597f['length']===0x0)throw Error('colorStops\x20is\x20required\x20and\x20should\x20contain\x20at\x20least\x20one\x20color\x20stop.');return this[_0x12658a(0x208)][_0x12658a(0x230)]||(this[_0x12658a(0x208)]['fill']={}),this[_0x12658a(0x208)]['fill'][_0x12658a(0x21c)]=_0x39597f,this[_0x12658a(0x208)][_0x12658a(0x230)][_0x12658a(0x1e1)]=_0x599b76[_0x12658a(0x23d)],this[_0x12658a(0x208)][_0x12658a(0x230)][_0x12658a(0x22c)]=_0x124fdf,_0x12b286!==void 0x0&&(this[_0x12658a(0x208)][_0x12658a(0x230)][_0x12658a(0x1e5)]=_0x12b286),this;}[_0x53a71e(0x214)](){const _0x1d4468=_0x53a71e;return this[_0x1d4468(0x208)]['fill']={'fillType':_0x599b76[_0x1d4468(0x217)]},this;}[_0x53a71e(0x1c1)](_0x34162){const _0x5e8160=_0x53a71e;return this[_0x5e8160(0x208)][_0x5e8160(0x20c)]||(this[_0x5e8160(0x208)][_0x5e8160(0x20c)]={}),this['shapeData'][_0x5e8160(0x20c)][_0x5e8160(0x21f)]=_0x34162,this;}['setStrokeWidth'](_0x4e89a1){const _0x36cd0a=_0x53a71e;return this['shapeData'][_0x36cd0a(0x20c)]||(this[_0x36cd0a(0x208)][_0x36cd0a(0x20c)]={}),this[_0x36cd0a(0x208)][_0x36cd0a(0x20c)][_0x36cd0a(0x205)]=_0x4e89a1,this;}[_0x53a71e(0x1c9)](_0x516fd3){const _0xcc7f66=_0x53a71e;return this[_0xcc7f66(0x208)][_0xcc7f66(0x20c)]||(this[_0xcc7f66(0x208)]['stroke']={}),this[_0xcc7f66(0x208)][_0xcc7f66(0x20c)][_0xcc7f66(0x1fb)]=_0x516fd3,this;}[_0x53a71e(0x1c7)](_0x5ccd28){const _0x256932=_0x53a71e;return this[_0x256932(0x208)][_0x256932(0x20c)]||(this[_0x256932(0x208)][_0x256932(0x20c)]={}),this[_0x256932(0x208)][_0x256932(0x20c)][_0x256932(0x1fe)]=_0x5ccd28,this;}[_0x53a71e(0x23a)](_0x3ed12f){const _0x2ad745=_0x53a71e;return this[_0x2ad745(0x208)][_0x2ad745(0x20c)]||(this['shapeData'][_0x2ad745(0x20c)]={}),this[_0x2ad745(0x208)][_0x2ad745(0x20c)][_0x2ad745(0x202)]=_0x3ed12f,this;}[_0x53a71e(0x1f8)](_0x161fe3){const _0x233ca5=_0x53a71e;return this[_0x233ca5(0x208)][_0x233ca5(0x20c)]||(this[_0x233ca5(0x208)][_0x233ca5(0x20c)]={}),this[_0x233ca5(0x208)]['stroke']['opacity']=_0x161fe3,this;}[_0x53a71e(0x213)](_0x21e58a){const _0x3c3861=_0x53a71e;return this['shapeData'][_0x3c3861(0x20c)]||(this['shapeData'][_0x3c3861(0x20c)]={}),this[_0x3c3861(0x208)][_0x3c3861(0x20c)][_0x3c3861(0x1e6)]=_0x21e58a,this;}['setWidth'](_0x31707d){return this['width']=_0x31707d,this;}['setHeight'](_0x35ab27){return this['height']=_0x35ab27,this;}[_0x53a71e(0x22b)](){const _0x3938e7=_0x53a71e;let _0x2b4f63=this[_0x3938e7(0x209)][_0x3938e7(0x1c8)](_0x10209e)[_0x3938e7(0x231)](this['unitId'],this[_0x3938e7(0x1ce)],this[_0x3938e7(0x1f4)]);return _0x2b4f63?_0x2dda75(_0x2b4f63[_0x3938e7(0x220)]()):this[_0x3938e7(0x1f3)]?_0x2dda75(this[_0x3938e7(0x1f3)]):!0x1;}[_0x53a71e(0x1f7)](){const _0x37fd23=_0x53a71e;let _0x21b42b=this[_0x37fd23(0x209)][_0x37fd23(0x1c8)](_0x10209e)[_0x37fd23(0x231)](this[_0x37fd23(0x1e3)],this['subUnitId'],this[_0x37fd23(0x1f4)]);if(!_0x21b42b)return[];let _0x5dbc36=this[_0x37fd23(0x209)]['get'](_0x239cba)[_0x37fd23(0x1fd)]({'unitId':this[_0x37fd23(0x1e3)],'subUnitId':this[_0x37fd23(0x1ce)],'drawingId':this['drawId']});if(!(_0x5dbc36!=null&&_0x5dbc36[_0x37fd23(0x212)]))return[];let {width:_0x45edf3=0x0,height:_0x8fc96f=0x0}=_0x5dbc36['transform'];return _0x21b42b['updateContext']({'width':_0x45edf3,'height':_0x8fc96f}),_0x21b42b[_0x37fd23(0x218)]();}[_0x53a71e(0x21e)](){const _0x584622=_0x53a71e;let _0x127f69=this[_0x584622(0x209)][_0x584622(0x1c8)](_0x10209e)['getShapeModel'](this[_0x584622(0x1e3)],this[_0x584622(0x1ce)],this[_0x584622(0x1f4)]);if(!_0x127f69)return[];let _0x5c05fd=this['_injector'][_0x584622(0x1c8)](_0x239cba)[_0x584622(0x1fd)]({'unitId':this[_0x584622(0x1e3)],'subUnitId':this[_0x584622(0x1ce)],'drawingId':this['drawId']});if(!(_0x5c05fd!=null&&_0x5c05fd[_0x584622(0x212)]))return[];let {width:_0x1c6fe6=0x0,height:_0x44be14=0x0}=_0x5c05fd[_0x584622(0x212)];return _0x127f69[_0x584622(0x1d2)]({'width':_0x1c6fe6,'height':_0x44be14}),_0x127f69[_0x584622(0x1dc)]();}[_0x53a71e(0x222)](){const _0x1359bb=_0x53a71e;let _0x1ac366=this['_injector'][_0x1359bb(0x1c8)](_0x10209e)[_0x1359bb(0x231)](this[_0x1359bb(0x1e3)],this[_0x1359bb(0x1ce)],this[_0x1359bb(0x1f4)]);if(!_0x1ac366||!_0x2dda75(_0x1ac366[_0x1359bb(0x220)]()))return[];let _0x2db257=this[_0x1359bb(0x209)][_0x1359bb(0x1c8)](_0x239cba)[_0x1359bb(0x1fd)]({'unitId':this[_0x1359bb(0x1e3)],'subUnitId':this[_0x1359bb(0x1ce)],'drawingId':this[_0x1359bb(0x1f4)]});if(!(_0x2db257!=null&&_0x2db257[_0x1359bb(0x212)]))return[];let {width:_0x18c6e2=0x0,height:_0x5e852a=0x0}=_0x2db257['transform'];return _0x1ac366[_0x1359bb(0x1d2)]({'width':_0x18c6e2,'height':_0x5e852a}),_0x1ac366[_0x1359bb(0x222)]();}[_0x53a71e(0x219)](){const _0x113d1f=_0x53a71e;var _0x1f2f17;let _0x2b9c62=this[_0x113d1f(0x209)][_0x113d1f(0x1c8)](_0x10209e)['getShapeModel'](this[_0x113d1f(0x1e3)],this['subUnitId'],this['drawId']);return _0x2b9c62?(_0x1f2f17=_0x2b9c62[_0x113d1f(0x219)]())==null?null:_0x1f2f17:null;}['getEndConnectInfo'](){const _0x404072=_0x53a71e;var _0x1712cf;let _0x577ae2=this['_injector'][_0x404072(0x1c8)](_0x10209e)[_0x404072(0x231)](this['unitId'],this[_0x404072(0x1ce)],this[_0x404072(0x1f4)]);return _0x577ae2?(_0x1712cf=_0x577ae2[_0x404072(0x1da)]())==null?null:_0x1712cf:null;}[_0x53a71e(0x204)](){const _0x2ec05d=_0x53a71e;var _0x7986fd,_0x558229;if(!this[_0x2ec05d(0x1f3)])throw Error('Shape\x20type\x20is\x20required.\x20Please\x20call\x20setShapeType()\x20before\x20build().');if(this['x']===0x0||this['y']===0x0){let _0x55b44d=this[_0x2ec05d(0x209)][_0x2ec05d(0x1c8)](_0x410ec5)['ensureSkeleton'](this['unitId'],this[_0x2ec05d(0x1ce)]);if(!_0x55b44d)throw Error(_0x2ec05d(0x240)+this[_0x2ec05d(0x1e3)]+'\x20and\x20subUnitId\x20'+this['subUnitId']+'\x20not\x20found');let {transform:_0x54cad3}=_0x1d244d(this[_0x2ec05d(0x1e3)],this[_0x2ec05d(0x1ce)],{'row':0x1,'column':0x1,'rowOffset':0x0,'columnOffset':0x0},0x1,0x1,_0x55b44d);this['x']=this['x']>0x0?this['x']:_0x54cad3[_0x2ec05d(0x223)],this['y']=this['y']>0x0?this['y']:_0x54cad3['top'];}return this[_0x2ec05d(0x205)]=(_0x7986fd=this[_0x2ec05d(0x205)])==null?_0x10534a:_0x7986fd,this['height']=(_0x558229=this[_0x2ec05d(0x1df)])==null?_0x152a18:_0x558229,{'unitId':this['unitId'],'subUnitId':this[_0x2ec05d(0x1ce)],'shapeId':this['drawId'],'shapeType':this[_0x2ec05d(0x1f3)],'shapeData':Object[_0x2ec05d(0x238)](this[_0x2ec05d(0x208)])['length']>0x0?this[_0x2ec05d(0x208)]:void 0x0,'x':this['x'],'y':this['y'],'width':this[_0x2ec05d(0x205)],'height':this[_0x2ec05d(0x1df)]};}[_0x53a71e(0x224)](){const _0x2cc42a=_0x53a71e;return this[_0x2cc42a(0x1f4)];}['getShapeType'](){const _0x49a5ea=_0x53a71e;return this[_0x49a5ea(0x1f3)];}['getShapeData'](){const _0x3ccb5f=_0x53a71e;return this[_0x3ccb5f(0x208)];}[_0x53a71e(0x1d8)](){return{'x':this['x'],'y':this['y']};}[_0x53a71e(0x22a)](){const _0x259fd0=_0x53a71e;return{'width':this[_0x259fd0(0x205)],'height':this['height']};}},F=class extends P{constructor(_0x2a5ad5,_0x5d7311,_0x57f052,_0x4b13f0){const _0x354968=_0x53a71e;super(_0x2a5ad5,_0x5d7311,_0x57f052,_0x4b13f0),N(this,_0x354968(0x208),{});}[_0x53a71e(0x234)](_0x4e075a){const _0x3fc638=_0x53a71e;if(!_0x2dda75(_0x4e075a))throw Error(_0x3fc638(0x21b)+_0x4e075a+_0x3fc638(0x20d));return super[_0x3fc638(0x234)](_0x4e075a),this;}[_0x53a71e(0x215)](_0xe3d4ed){const _0x1dcbca=_0x53a71e;var _0x4fb7f6,_0x5aaffc;return(_0x4fb7f6=this['shapeData'])!=null&&_0x4fb7f6['ln']||(this[_0x1dcbca(0x208)]['ln']={}),!((_0x5aaffc=this[_0x1dcbca(0x208)])==null||(_0x5aaffc=_0x5aaffc['ln'])==null)&&_0x5aaffc[_0x1dcbca(0x200)]||(this[_0x1dcbca(0x208)]['ln'][_0x1dcbca(0x200)]={}),this['shapeData']['ln'][_0x1dcbca(0x200)][_0x1dcbca(0x1de)]=_0xe3d4ed,this;}[_0x53a71e(0x23b)](_0x17b453){const _0x213c6f=_0x53a71e;var _0x341f92,_0x50eea0;return(_0x341f92=this[_0x213c6f(0x208)])!=null&&_0x341f92['ln']||(this[_0x213c6f(0x208)]['ln']={}),!((_0x50eea0=this[_0x213c6f(0x208)])==null||(_0x50eea0=_0x50eea0['ln'])==null)&&_0x50eea0[_0x213c6f(0x1ea)]||(this['shapeData']['ln'][_0x213c6f(0x1ea)]={}),this[_0x213c6f(0x208)]['ln'][_0x213c6f(0x1ea)]['type']=_0x17b453,this;}['setStartArrowSize'](_0x22168a){const _0xad2fd=_0x53a71e;var _0x5422b7,_0xa59c3d;return(_0x5422b7=this['shapeData'])!=null&&_0x5422b7['ln']||(this[_0xad2fd(0x208)]['ln']={}),!((_0xa59c3d=this['shapeData'])==null||(_0xa59c3d=_0xa59c3d['ln'])==null)&&_0xa59c3d[_0xad2fd(0x200)]||(this['shapeData']['ln'][_0xad2fd(0x200)]={}),this[_0xad2fd(0x208)]['ln'][_0xad2fd(0x200)][_0xad2fd(0x203)]=_0x22168a,this;}['setEndArrowSize'](_0x2e3325){const _0x58ece8=_0x53a71e;var _0x41bf98,_0x35bd3c;return(_0x41bf98=this['shapeData'])!=null&&_0x41bf98['ln']||(this['shapeData']['ln']={}),!((_0x35bd3c=this[_0x58ece8(0x208)])==null||(_0x35bd3c=_0x35bd3c['ln'])==null)&&_0x35bd3c[_0x58ece8(0x1ea)]||(this[_0x58ece8(0x208)]['ln']['endArrow']={}),this['shapeData']['ln'][_0x58ece8(0x1ea)][_0x58ece8(0x203)]=_0x2e3325,this;}[_0x53a71e(0x204)](){return super['build']();}[_0x53a71e(0x1da)](){const _0x19d841=_0x53a71e;var _0x10ce6b;return((_0x10ce6b=this[_0x19d841(0x208)])==null||(_0x10ce6b=_0x10ce6b[_0x19d841(0x23e)])==null?void 0x0:_0x10ce6b['to'])||null;}[_0x53a71e(0x219)](){const _0x597c24=_0x53a71e;var _0x2ad4e0;return((_0x2ad4e0=this[_0x597c24(0x208)])==null||(_0x2ad4e0=_0x2ad4e0[_0x597c24(0x23e)])==null?void 0x0:_0x2ad4e0[_0x597c24(0x1f1)])||null;}};function I(_0x186afe,_0x2dad16,_0x33ddf3,_0x5c3b1d,_0x1a0476,_0x3780a2){const _0x507fcb=_0x53a71e;let _0x2c632a=_0x1a0476[_0x507fcb(0x231)](_0x186afe,_0x2dad16,_0x33ddf3);if(!_0x2c632a)return null;let _0x496e2c=_0x3780a2[_0x507fcb(0x1fd)]({'unitId':_0x186afe,'subUnitId':_0x2dad16,'drawingId':_0x33ddf3});if(!(_0x496e2c!=null&&_0x496e2c['transform']))return null;let {left:_0x143e3a=0x0,top:_0x275474=0x0,width:_0x30abc9=0x0,height:_0x5f5241=0x0,flipX:_0x373280=!0x1,flipY:_0x1e58f9=!0x1,angle:_0x4fae79}=_0x496e2c[_0x507fcb(0x212)];_0x2c632a[_0x507fcb(0x1d2)]({'width':_0x30abc9,'height':_0x5f5241});let _0x116155=_0x2c632a[_0x507fcb(0x218)]()[_0x507fcb(0x1ec)](_0x387ab9=>_0x387ab9[_0x507fcb(0x21a)]===_0x5c3b1d);if(!_0x116155)return null;let _0x1905c7=_0x373280?_0x30abc9-_0x116155['x']:_0x116155['x'],_0x2a22d5=_0x1e58f9?_0x5f5241-_0x116155['y']:_0x116155['y'];if(_0x4fae79&&_0x4fae79!==0x0){let _0x23cde8=_0x4fae79*Math['PI']/0xb4,_0x3c8784=Math[_0x507fcb(0x1e8)](_0x23cde8),_0x3afee3=Math[_0x507fcb(0x21d)](_0x23cde8),_0x1aa8b8=_0x30abc9/0x2,_0x22e9c9=_0x5f5241/0x2,_0x554b12=_0x1905c7-_0x1aa8b8,_0x41d943=_0x2a22d5-_0x22e9c9;_0x1905c7=_0x1aa8b8+_0x554b12*_0x3c8784-_0x41d943*_0x3afee3,_0x2a22d5=_0x22e9c9+_0x554b12*_0x3afee3+_0x41d943*_0x3c8784;}_0x1905c7+=_0x143e3a,_0x2a22d5+=_0x275474;let _0xf14aa5=_0x116155['ang']/0xea60;_0x373280&&(_0xf14aa5=0xb4-_0xf14aa5),_0x1e58f9&&(_0xf14aa5=-_0xf14aa5),_0xf14aa5+=_0x4fae79||0x0,_0xf14aa5=(_0xf14aa5%0x168+0x168)%0x168;let _0x3c0688=_0x3428de({'left':_0x143e3a,'top':_0x275474,'width':_0x30abc9,'height':_0x5f5241},_0x4fae79||0x0);return{'point':{'x':_0x1905c7,'y':_0x2a22d5},'angle':_0xf14aa5,'bounds':_0x3c0688};}function L(_0x325ab8,_0x3810c9){const _0x5ceccd=_0x53a71e;let _0x96e989=_0x3810c9['x']-_0x325ab8['x'],_0x133482=_0x3810c9['y']-_0x325ab8['y'];return Math['abs'](_0x96e989)>=Math[_0x5ceccd(0x221)](_0x133482)?_0x96e989>=0x0?0xb4:0x0:_0x133482>=0x0?0x10e:0x5a;}function R(_0x289b6a,_0x242f7c,_0x3ab7ac,_0x118598,_0x65ea21,_0x300dea,_0x22ea47){const _0x1887ac=_0x53a71e;let _0x1310c6=_0x300dea['getShapeModel'](_0x289b6a,_0x242f7c,_0x3ab7ac);if(!_0x1310c6)return null;let _0x2bec98=_0x22ea47[_0x1887ac(0x1fd)]({'unitId':_0x289b6a,'subUnitId':_0x242f7c,'drawingId':_0x3ab7ac});if(!(_0x2bec98!=null&&_0x2bec98[_0x1887ac(0x212)]))return null;let {left:_0x5f4e9e=0x0,top:_0x29939f=0x0,width:_0x273b64=0x0,height:_0x110a8a=0x0,flipX:_0x47a126=!0x1,flipY:_0x5b05dc=!0x1}=_0x2bec98['transform'];_0x1310c6[_0x1887ac(0x1d2)]({'width':_0x273b64,'height':_0x110a8a});let _0x914f61=_0x1310c6[_0x1887ac(0x222)]();if(_0x914f61['length']<0x2)return null;let _0x3cecc1=_0x118598?_0x914f61[0x0]:_0x914f61[_0x914f61['length']-0x1],_0x2b3317=new _0x2b99d0({'left':_0x5f4e9e,'top':_0x29939f,'width':_0x273b64,'height':_0x110a8a,'flipX':_0x47a126,'flipY':_0x5b05dc})[_0x1887ac(0x1e7)](_0x3cecc1);return{'point':_0x2b3317,'angle':L(_0x65ea21[_0x1887ac(0x201)],_0x2b3317),'bounds':{'left':_0x2b3317['x'],'top':_0x2b3317['y'],'width':0x0,'height':0x0}};}var z=class extends _0x228e93{async[_0x53a71e(0x1fc)](_0x5b5b6b){const _0x1ff077=_0x53a71e;let {unitId:_0x2c3cbd,subUnitId:_0x4e7e32,shapeId:_0x14bd0a,shapeType:_0xb5fef4,shapeData:_0x412631,x:_0x9aeed4,y:_0x270639,width:_0x396422,height:_0x38b869}=_0x5b5b6b;return this[_0x1ff077(0x22d)]['executeCommand'](_0xa7036e['id'],{'unitId':_0x2c3cbd,'subUnitId':_0x4e7e32,'shapeId':_0x14bd0a,'shapeType':_0xb5fef4,'shapeData':_0x412631,'position':{'x':_0x9aeed4,'y':_0x270639},'width':_0x396422,'height':_0x38b869});}async[_0x53a71e(0x1d6)](_0x220291){const _0x1f1c52=_0x53a71e;let {unitId:_0x21bd64,subUnitId:_0x2c36a7,shapeId:_0x369bfc,shapeType:_0x1fe88f,shapeData:_0x3154ba,x:_0x34763a,y:_0x4c4692,width:_0x3dad38,height:_0x229323}=_0x220291;return this[_0x1f1c52(0x22d)]['executeCommand'](_0x1bda4b['id'],{'unitId':_0x21bd64,'subUnitId':_0x2c36a7,'shapeId':_0x369bfc,'shapeType':_0x1fe88f,'shapeData':_0x3154ba,'position':{'x':_0x34763a,'y':_0x4c4692},'width':_0x3dad38,'height':_0x229323});}['newShape'](_0x1bcc0c){const _0x46dbf7=_0x53a71e;let _0x5a95ba=this['getWorkbook']()['getUnitId'](),_0x434ed1=this[_0x46dbf7(0x235)]();if(_0x1bcc0c){let _0x3446b2=new P(_0x5a95ba,_0x434ed1,_0x1bcc0c['drawId'],this['_injector']);return this['_preloadShapeProperties'](_0x3446b2,_0x5a95ba,_0x434ed1,_0x1bcc0c[_0x46dbf7(0x1f4)]),_0x3446b2;}return new P(_0x5a95ba,_0x434ed1,_0x319fad(),this[_0x46dbf7(0x209)]);}['newConnector'](_0x1d6756){const _0x9756c2=_0x53a71e;let _0x49f9d9=this[_0x9756c2(0x22e)]()[_0x9756c2(0x1cf)](),_0x1d919a=this[_0x9756c2(0x235)]();if(_0x1d6756){let _0x3ad7ae=new F(_0x49f9d9,_0x1d919a,_0x1d6756[_0x9756c2(0x1f4)],this['_injector']);return this[_0x9756c2(0x1cb)](_0x3ad7ae,_0x49f9d9,_0x1d919a,_0x1d6756[_0x9756c2(0x1f4)]),_0x3ad7ae;}return new F(_0x49f9d9,_0x1d919a,_0x319fad(),this['_injector']);}[_0x53a71e(0x1c6)](){const _0xd4c2e1=_0x53a71e;let _0x1e230f=this[_0xd4c2e1(0x209)][_0xd4c2e1(0x1c8)](_0x72c741),_0x1fa833=this[_0xd4c2e1(0x22e)]()['getUnitId'](),_0x20a187=this['getSheetId'](),_0x248732=_0x1e230f['getDrawingData'](_0x1fa833,_0x20a187);if(!_0x248732)return[];let _0x425c29=[];for(let [_0x1ea2ab,_0x43c7f1]of Object['entries'](_0x248732))if(_0x43c7f1&&_0x43c7f1[_0xd4c2e1(0x1f6)]===_0x15d1ae[_0xd4c2e1(0x1ed)]){let _0x50bc6d=new P(_0x1fa833,_0x20a187,_0x1ea2ab,this[_0xd4c2e1(0x209)]);this[_0xd4c2e1(0x1cb)](_0x50bc6d,_0x1fa833,_0x20a187,_0x1ea2ab),_0x425c29[_0xd4c2e1(0x1cd)](_0x50bc6d);}return _0x425c29;}[_0x53a71e(0x1fa)](_0x2615fb){const _0x158b79=_0x53a71e;let {unitId:_0x46da34,subUnitId:_0x50d2ec,drawId:_0x3f1dfd}=_0x2615fb;return this[_0x158b79(0x22d)][_0x158b79(0x1f5)](_0x36ca0b['id'],{'unitId':_0x46da34,'drawings':[{'unitId':_0x46da34,'subUnitId':_0x50d2ec,'drawingId':_0x3f1dfd,'drawingType':_0x15d1ae[_0x158b79(0x1ed)]}]});}async['connectShapes'](_0x2fa497){const _0x24db6d=_0x53a71e;let {connector:_0x7bcf9a,startTarget:_0x25fa50,endTarget:_0x9ca551}=_0x2fa497;if(!_0x25fa50&&!_0x9ca551)return!0x1;let _0x4f8af2=this[_0x24db6d(0x22e)]()[_0x24db6d(0x1cf)](),_0x3c3c1b=this['getSheetId'](),_0x402d90=this[_0x24db6d(0x209)][_0x24db6d(0x1c8)](_0x10209e),_0x37bb56=this['_injector'][_0x24db6d(0x1c8)](_0x239cba),_0x45ce67=_0x402d90[_0x24db6d(0x231)](_0x4f8af2,_0x3c3c1b,_0x7bcf9a[_0x24db6d(0x1f4)]);if(!_0x45ce67)return!0x1;let _0x1b4071=_0x45ce67[_0x24db6d(0x220)](),_0x56a7c4=_0x45ce67[_0x24db6d(0x1c5)](),_0x44b4f={};for(let _0x3d997b of _0x45ce67[_0x24db6d(0x239)]()){let _0x394433=_0x45ce67['getAdjustValueByName'](_0x3d997b);_0x394433!==void 0x0&&(_0x44b4f[_0x3d997b]=_0x394433);}let {startInfo:_0x3ee900,endInfo:_0x3293d4}=this['_resolveEndpoints'](_0x4f8af2,_0x3c3c1b,_0x7bcf9a,_0x45ce67,_0x25fa50,_0x9ca551,_0x402d90,_0x37bb56,_0x56a7c4);if(!_0x3ee900||!_0x3293d4)return!0x1;let _0x1dfc1a=_0x161e4a(_0x1250a(_0x3ee900,_0x3293d4,_0x1b4071),_0x1b4071),_0x293547={};return _0x25fa50?_0x293547['from']={'shapeId':_0x25fa50[_0x24db6d(0x229)][_0x24db6d(0x1f4)],'cxnIndex':_0x25fa50[_0x24db6d(0x206)]}:_0x56a7c4!=null&&_0x56a7c4[_0x24db6d(0x1f1)]&&(_0x293547[_0x24db6d(0x1f1)]=_0x56a7c4[_0x24db6d(0x1f1)]),_0x9ca551?_0x293547['to']={'shapeId':_0x9ca551[_0x24db6d(0x229)][_0x24db6d(0x1f4)],'cxnIndex':_0x9ca551[_0x24db6d(0x206)]}:_0x56a7c4!=null&&_0x56a7c4['to']&&(_0x293547['to']=_0x56a7c4['to']),this[_0x24db6d(0x22d)][_0x24db6d(0x1f5)](_0x503e9e['id'],{'unitId':_0x4f8af2,'subUnitId':_0x3c3c1b,'connectorShapeId':_0x7bcf9a[_0x24db6d(0x1f4)],'width':_0x1dfc1a[_0x24db6d(0x228)][_0x24db6d(0x205)],'height':_0x1dfc1a[_0x24db6d(0x228)][_0x24db6d(0x1df)],'left':_0x1dfc1a['worldRect'][_0x24db6d(0x223)],'top':_0x1dfc1a[_0x24db6d(0x228)][_0x24db6d(0x237)],'flipX':_0x1dfc1a['worldRect'][_0x24db6d(0x22f)]||!0x1,'flipY':_0x1dfc1a[_0x24db6d(0x228)][_0x24db6d(0x1d1)]||!0x1,'oldAdjustValues':_0x44b4f,'newAdjustValues':_0x1dfc1a[_0x24db6d(0x1ca)],'newLineType':_0x1dfc1a[_0x24db6d(0x1f9)],'oldLineType':_0x1b4071,'rotation':_0x1dfc1a[_0x24db6d(0x232)],'oldRelation':_0x56a7c4,'newRelation':_0x293547});}['_preloadShapeProperties'](_0x5f0e62,_0x3de026,_0x1fd47f,_0x47f523){const _0x32c47d=_0x53a71e;let _0x166861=this['_injector'][_0x32c47d(0x1c8)](_0x239cba)[_0x32c47d(0x1fd)]({'unitId':_0x3de026,'subUnitId':_0x1fd47f,'drawingId':_0x47f523});if(_0x166861!=null&&_0x166861[_0x32c47d(0x212)]){var _0x4d68e1,_0x1fc277,_0x26ed37,_0x2eb884;_0x5f0e62['x']=(_0x4d68e1=_0x166861['transform'][_0x32c47d(0x223)])==null?0x0:_0x4d68e1,_0x5f0e62['y']=(_0x1fc277=_0x166861['transform'][_0x32c47d(0x237)])==null?0x0:_0x1fc277,_0x5f0e62[_0x32c47d(0x205)]=(_0x26ed37=_0x166861[_0x32c47d(0x212)][_0x32c47d(0x205)])==null?_0x5f0e62[_0x32c47d(0x205)]:_0x26ed37,_0x5f0e62[_0x32c47d(0x1df)]=(_0x2eb884=_0x166861['transform'][_0x32c47d(0x1df)])==null?_0x5f0e62['height']:_0x2eb884;}let _0x243e1d=this[_0x32c47d(0x209)][_0x32c47d(0x1c8)](_0x10209e)[_0x32c47d(0x231)](_0x3de026,_0x1fd47f,_0x47f523);if(_0x243e1d){_0x5f0e62[_0x32c47d(0x1f3)]=_0x243e1d[_0x32c47d(0x220)]();let _0x167110=_0x243e1d['getShapeData']();_0x167110&&(_0x5f0e62[_0x32c47d(0x208)]=JSON['parse'](JSON[_0x32c47d(0x1d4)](_0x167110)));}}[_0x53a71e(0x20b)](_0x15082c,_0x5a38c9,_0x1d835b,_0x218aed,_0x144efc,_0x452af0,_0x1f6639,_0x5096b5,_0x571fd9){const _0x4d3551=_0x53a71e;let _0x2cab44=null,_0x3aea6b=null;return _0x144efc&&(_0x2cab44=I(_0x15082c,_0x5a38c9,_0x144efc[_0x4d3551(0x229)]['drawId'],_0x144efc['connectionSiteIndex'],_0x1f6639,_0x5096b5)),_0x452af0&&(_0x3aea6b=I(_0x15082c,_0x5a38c9,_0x452af0[_0x4d3551(0x229)][_0x4d3551(0x1f4)],_0x452af0['connectionSiteIndex'],_0x1f6639,_0x5096b5)),_0x2cab44||(_0x2cab44=this['_resolveExistingOrFreeEndpoint'](_0x15082c,_0x5a38c9,_0x1d835b[_0x4d3551(0x1f4)],!0x0,_0x3aea6b,_0x571fd9==null?void 0x0:_0x571fd9['from'],_0x1f6639,_0x5096b5)),_0x3aea6b||(_0x3aea6b=this[_0x4d3551(0x1ee)](_0x15082c,_0x5a38c9,_0x1d835b[_0x4d3551(0x1f4)],!0x1,_0x2cab44,_0x571fd9==null?void 0x0:_0x571fd9['to'],_0x1f6639,_0x5096b5)),{'startInfo':_0x2cab44,'endInfo':_0x3aea6b};}['_resolveExistingOrFreeEndpoint'](_0x262dc0,_0x1a760d,_0x45da39,_0x1765ce,_0x31bcb0,_0x2a82ed,_0x56cc66,_0x130dea){const _0x43b478=_0x53a71e;if(_0x2a82ed){let _0x3347c0=I(_0x262dc0,_0x1a760d,_0x2a82ed[_0x43b478(0x207)],_0x2a82ed[_0x43b478(0x1e9)],_0x56cc66,_0x130dea);if(_0x3347c0)return _0x3347c0;}return _0x31bcb0?R(_0x262dc0,_0x1a760d,_0x45da39,_0x1765ce,_0x31bcb0,_0x56cc66,_0x130dea):null;}};_0x228e93['extend'](z);export{F as FConnectorShape,P as FShape};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x341a97=_0x16de;(function(_0x4f3524,_0x5b9a4a){const _0x593e3c=_0x16de,_0x3614b0=_0x4f3524();while(!![]){try{const _0x224736=-parseInt(_0x593e3c(0x11a))/0x1*(parseInt(_0x593e3c(0x150))/0x2)+-parseInt(_0x593e3c(0x184))/0x3+parseInt(_0x593e3c(0x175))/0x4*(-parseInt(_0x593e3c(0x11e))/0x5)+-parseInt(_0x593e3c(0x1a4))/0x6+-parseInt(_0x593e3c(0x190))/0x7+-parseInt(_0x593e3c(0x15c))/0x8*(parseInt(_0x593e3c(0x142))/0x9)+parseInt(_0x593e3c(0x111))/0xa;if(_0x224736===_0x5b9a4a)break;else _0x3614b0['push'](_0x3614b0['shift']());}catch(_0x2d68e5){_0x3614b0['push'](_0x3614b0['shift']());}}}(_0x2d10,0x95c63));import{ShapeModel,computeConnectorRouteLayout,getBasicShapeRotateBound,isConnectorShape,routeConnectorLineShape}from'@univerjs-pro/engine-shape';import{CommandType,DependentOn,Disposable,DrawingTypeEnum,ICommandService,IConfigService,IResourceManagerService,IUndoRedoService,IUniverInstanceService,Inject,Injector,Plugin,UniverInstanceType,generateRandomId,merge,sequenceExecute,touchDependencies}from'@univerjs/core';import{SheetInterceptorService,SheetSkeletonService,getSheetCommandTarget}from'@univerjs/sheets';import{ClearSheetDrawingTransformerOperation,DrawingApplyType,ISheetDrawingService,InsertSheetDrawingCommand,RemoveSheetDrawingCommand,SetDrawingApplyMutation,SetSheetDrawingCommand,transformToAxisAlignPosition,transformToDrawingPosition}from'@univerjs/sheets-drawing';import{UniverLicensePlugin}from'@univerjs-pro/license';import{IDrawingManagerService}from'@univerjs/drawing';const DEFAULT_SHAPE_WIDTH=0xc8,DEFAULT_SHAPE_HEIGHT=0xc8;function _typeof(_0x2669e1){'@babel/helpers - typeof';const _0x37c67b=_0x16de;return _typeof=_0x37c67b(0x159)==typeof Symbol&&'symbol'==typeof Symbol[_0x37c67b(0x156)]?function(_0x5e5feb){return typeof _0x5e5feb;}:function(_0x4c746f){const _0x1c219e=_0x37c67b;return _0x4c746f&&_0x1c219e(0x159)==typeof Symbol&&_0x4c746f[_0x1c219e(0x185)]===Symbol&&_0x4c746f!==Symbol[_0x1c219e(0x117)]?_0x1c219e(0x135):typeof _0x4c746f;},_typeof(_0x2669e1);}function toPrimitive(_0x54ee,_0x25aac4){const _0x53f496=_0x16de;if(_0x53f496(0x168)!=_typeof(_0x54ee)||!_0x54ee)return _0x54ee;var _0x2f5eee=_0x54ee[Symbol[_0x53f496(0x174)]];if(void 0x0!==_0x2f5eee){var _0x5366eb=_0x2f5eee[_0x53f496(0x18b)](_0x54ee,_0x25aac4||'default');if(_0x53f496(0x168)!=_typeof(_0x5366eb))return _0x5366eb;throw new TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x53f496(0x126)===_0x25aac4?String:Number)(_0x54ee);}function toPropertyKey(_0x36e67c){const _0x24f02e=_0x16de;var _0x2791d2=toPrimitive(_0x36e67c,_0x24f02e(0x126));return _0x24f02e(0x135)==_typeof(_0x2791d2)?_0x2791d2:_0x2791d2+'';}function _defineProperty(_0x1cc10b,_0x29ad56,_0x3472fc){return(_0x29ad56=toPropertyKey(_0x29ad56))in _0x1cc10b?Object['defineProperty'](_0x1cc10b,_0x29ad56,{'value':_0x3472fc,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x1cc10b[_0x29ad56]=_0x3472fc,_0x1cc10b;}var SheetShapeModelManager=class extends Disposable{constructor(){const _0x272193=_0x16de;super(),_defineProperty(this,'_shapes',new Map()),_defineProperty(this,_0x272193(0x141),new Set()),_defineProperty(this,'_groupIds',new Set());}[_0x341a97(0x187)](_0x279b3a,_0x57ee2c,_0x587886){const _0x3cda98=_0x341a97,_0x8a372f=new ShapeModel(_0x279b3a,_0x57ee2c,_0x587886);this[_0x3cda98(0x13e)][_0x3cda98(0x119)](_0x57ee2c,_0x8a372f);if(isConnectorShape(_0x279b3a))this['_linesIds'][_0x3cda98(0x1ab)](_0x57ee2c);return _0x8a372f;}[_0x341a97(0x148)](_0x24a515){const _0x52779c=_0x341a97,_0x49a4f5=[];for(const _0x74d4ae of this[_0x52779c(0x141)]){const _0x111d4f=this[_0x52779c(0x13e)][_0x52779c(0x17f)](_0x74d4ae);if(_0x111d4f){const _0x4c0fb5=_0x111d4f['getShapeRelation']();if(_0x4c0fb5){var _0x3e2c62,_0x65980d;if(((_0x3e2c62=_0x4c0fb5[_0x52779c(0x11d)])===null||_0x3e2c62===void 0x0?void 0x0:_0x3e2c62['shapeId'])===_0x24a515)_0x49a4f5[_0x52779c(0x12d)]({..._0x4c0fb5[_0x52779c(0x11d)],'lineShapeId':_0x74d4ae,'isFrom':!![]});if(((_0x65980d=_0x4c0fb5['to'])===null||_0x65980d===void 0x0?void 0x0:_0x65980d[_0x52779c(0x125)])===_0x24a515)_0x49a4f5[_0x52779c(0x12d)]({..._0x4c0fb5['to'],'lineShapeId':_0x74d4ae,'isFrom':![]});}}}return _0x49a4f5;}[_0x341a97(0x12e)](_0x427227){const _0x5a542c=_0x341a97,_0x184419=this[_0x5a542c(0x13e)][_0x5a542c(0x17f)](_0x427227);if(_0x184419)return _0x184419['getShapeRelation']();}[_0x341a97(0x144)](_0x267b0e){const _0x5dd0c7=_0x341a97,_0x100caf=this[_0x5dd0c7(0x13e)][_0x5dd0c7(0x17f)](_0x267b0e);if(_0x100caf)return _0x100caf['getShapeType']();}[_0x341a97(0x12a)](_0x5bb6ba){const _0x1462c5=_0x341a97;return this['_shapes'][_0x1462c5(0x192)](_0x5bb6ba);}[_0x341a97(0x127)](_0x5a795d){const _0x52ee82=_0x341a97,_0x2e986a=this[_0x52ee82(0x13e)][_0x52ee82(0x17f)](_0x5a795d);if(!_0x2e986a)return;if(isConnectorShape(_0x2e986a[_0x52ee82(0x144)]()))this['_linesIds'][_0x52ee82(0x121)](_0x5a795d);this[_0x52ee82(0x13e)][_0x52ee82(0x121)](_0x5a795d);}[_0x341a97(0x131)](){const _0x474c3c=_0x341a97,_0x2955f3=[];return this[_0x474c3c(0x13e)]['forEach'](_0x44a1f8=>{const _0x51d558=_0x474c3c;_0x2955f3[_0x51d558(0x12d)](_0x44a1f8[_0x51d558(0x131)]());}),_0x2955f3;}['fromJSON'](_0x42f7a0){const _0x5a1bfd=_0x341a97;for(const _0x581ddf of _0x42f7a0){const {id:_0x5bde8a,shapeType:_0x489eb4}=_0x581ddf,_0x20fde0=this[_0x5a1bfd(0x187)](_0x489eb4,_0x5bde8a,_0x581ddf[_0x5a1bfd(0x176)]);if(_0x20fde0&&_0x20fde0[_0x5a1bfd(0x151)]())this[_0x5a1bfd(0x141)]['add'](_0x5bde8a);}}[_0x341a97(0x15b)](){const _0xd97997=_0x341a97;if(this[_0xd97997(0x166)])return;this[_0xd97997(0x13e)][_0xd97997(0x116)](_0x3468b4=>{const _0x42e427=_0xd97997;_0x3468b4[_0x42e427(0x15b)]();}),this[_0xd97997(0x13e)][_0xd97997(0x1a5)](),this[_0xd97997(0x141)][_0xd97997(0x1a5)](),this[_0xd97997(0x170)][_0xd97997(0x1a5)](),super['dispose']();}};function __decorateParam(_0x9bd393,_0x2844da){return function(_0x1827c0,_0x20c69a){_0x2844da(_0x1827c0,_0x20c69a,_0x9bd393);};}function __decorate(_0x2ae185,_0x46abe8,_0x254137,_0x114744){const _0x265121=_0x341a97;var _0x81c0e2=arguments[_0x265121(0x17c)],_0x55803d=_0x81c0e2<0x3?_0x46abe8:_0x114744===null?_0x114744=Object[_0x265121(0x12b)](_0x46abe8,_0x254137):_0x114744,_0x7744f1;if(typeof Reflect===_0x265121(0x168)&&typeof Reflect[_0x265121(0x122)]===_0x265121(0x159))_0x55803d=Reflect[_0x265121(0x122)](_0x2ae185,_0x46abe8,_0x254137,_0x114744);else{for(var _0x4934bb=_0x2ae185[_0x265121(0x17c)]-0x1;_0x4934bb>=0x0;_0x4934bb--)if(_0x7744f1=_0x2ae185[_0x4934bb])_0x55803d=(_0x81c0e2<0x3?_0x7744f1(_0x55803d):_0x81c0e2>0x3?_0x7744f1(_0x46abe8,_0x254137,_0x55803d):_0x7744f1(_0x46abe8,_0x254137))||_0x55803d;}return _0x81c0e2>0x3&&_0x55803d&&Object[_0x265121(0x194)](_0x46abe8,_0x254137,_0x55803d),_0x55803d;}const SHEET_SHAPE_PLUGIN=_0x341a97(0x186);let SheetsShapeService=class SheetsShapeService extends Disposable{constructor(_0x32407f){const _0x4c878e=_0x341a97;super(),this['_resourcesManagerService']=_0x32407f,_defineProperty(this,_0x4c878e(0x1a8),new Map()),this[_0x4c878e(0x183)]();}[_0x341a97(0x147)](_0x559ca7,_0x46b586){const _0x4d05a5=_0x341a97;let _0x46bc41=this['_shapeModelManagerMap'][_0x4d05a5(0x17f)](_0x559ca7);!_0x46bc41&&(_0x46bc41=new Map(),this[_0x4d05a5(0x1a8)][_0x4d05a5(0x119)](_0x559ca7,_0x46bc41));let _0x1daa2e=_0x46bc41[_0x4d05a5(0x17f)](_0x46b586);return!_0x1daa2e&&(_0x1daa2e=new SheetShapeModelManager(),_0x46bc41[_0x4d05a5(0x119)](_0x46b586,_0x1daa2e)),_0x1daa2e;}[_0x341a97(0x124)](_0xd1e571,_0x1027b7,_0x25a95a,_0x323e0b,_0x37da63){const _0x4dd39d=_0x341a97;this['_ensureShapeModelManager'](_0xd1e571,_0x1027b7)[_0x4dd39d(0x187)](_0x25a95a,_0x323e0b,_0x37da63);}[_0x341a97(0x127)](_0x4d38fa,_0x2e6a61,_0x24019c){const _0x48ef05=_0x341a97;this[_0x48ef05(0x147)](_0x4d38fa,_0x2e6a61)[_0x48ef05(0x127)](_0x24019c);}[_0x341a97(0x172)](_0x5b832f,_0x55bb92,_0x10bbbb){const _0xda7489=_0x341a97;return this[_0xda7489(0x147)](_0x5b832f,_0x55bb92)['getShapeType'](_0x10bbbb);}[_0x341a97(0x144)](_0x316469,_0x1806bb,_0x47b36e){const _0x3584b0=_0x341a97;return this[_0x3584b0(0x147)](_0x316469,_0x1806bb)[_0x3584b0(0x144)](_0x47b36e);}['hasShape'](_0x558732,_0x2b279a,_0x18d227){const _0x5b6701=_0x341a97;return this[_0x5b6701(0x147)](_0x558732,_0x2b279a)[_0x5b6701(0x12a)](_0x18d227);}[_0x341a97(0x18e)](_0x210b74,_0x24cda0,_0x1b8332){const _0x234d88=_0x341a97;return this[_0x234d88(0x147)](_0x210b74,_0x24cda0)[_0x234d88(0x144)](_0x1b8332);}[_0x341a97(0x19b)](_0x3f9f2d,_0x10abdb,_0x11fc0b){const _0x2a3bc9=_0x341a97,_0x3714bd=this[_0x2a3bc9(0x147)](_0x3f9f2d,_0x10abdb);if(!_0x3714bd[_0x2a3bc9(0x144)](_0x11fc0b))return;const _0x8588ad=_0x3714bd[_0x2a3bc9(0x13e)][_0x2a3bc9(0x17f)](_0x11fc0b);if(!_0x8588ad)return;return _0x8588ad[_0x2a3bc9(0x1a0)]();}[_0x341a97(0x16d)](_0x3c22e0,_0x1d9b4b,_0x515c85){return this['_ensureShapeModelManager'](_0x3c22e0,_0x1d9b4b)['_shapes']['get'](_0x515c85);}['getBasicShapeRelation'](_0x1bde01,_0x1e0f6e,_0x359289){return this['_ensureShapeModelManager'](_0x1bde01,_0x1e0f6e)['getBasicShapeRelation'](_0x359289);}[_0x341a97(0x12e)](_0x5efbda,_0x526671,_0x96b5b2){const _0x2ac4c4=_0x341a97,_0x4a3792=this[_0x2ac4c4(0x147)](_0x5efbda,_0x526671)[_0x2ac4c4(0x13e)][_0x2ac4c4(0x17f)](_0x96b5b2);if(!_0x4a3792)return;return _0x4a3792[_0x2ac4c4(0x18a)]();}[_0x341a97(0x198)](){}[_0x341a97(0x161)](_0x271158){const _0x1e14e4=_0x341a97,_0x37f95b={},_0x29ce57=this[_0x1e14e4(0x1a8)]['get'](_0x271158);if(_0x29ce57)_0x29ce57['forEach']((_0x2871ed,_0x1e9600)=>{const _0x4abc43=_0x1e14e4,_0x5384fd=_0x2871ed['toJSON']();if(_0x5384fd[_0x4abc43(0x17c)]>0x0)_0x37f95b[_0x1e9600]=_0x5384fd;});return JSON[_0x1e14e4(0x158)](_0x37f95b);}['_deserializeShapeForUnit'](_0x21f8f9,_0x1cf0fc){const _0x3fa576=_0x341a97;Object[_0x3fa576(0x118)](_0x1cf0fc)['forEach'](_0x5a9d62=>{const _0xa800df=_0x3fa576;this[_0xa800df(0x147)](_0x21f8f9,_0x5a9d62)['fromJSON'](_0x1cf0fc[_0x5a9d62]);});}[_0x341a97(0x131)](){const _0x4e5855=_0x341a97,_0x5beba2={};return this[_0x4e5855(0x1a8)][_0x4e5855(0x116)]((_0x153e29,_0x1bcbd6)=>{const _0x1ae90c=_0x4e5855;_0x5beba2[_0x1bcbd6]={},_0x153e29[_0x1ae90c(0x116)]((_0x296f6d,_0x28794d)=>{_0x5beba2[_0x1bcbd6][_0x28794d]=_0x296f6d['toJSON']();});}),_0x5beba2;}[_0x341a97(0x191)](_0x46108a){const _0x2221cf=_0x341a97;Object[_0x2221cf(0x118)](_0x46108a)[_0x2221cf(0x116)](_0x2b780b=>{const _0x5c191c=_0x46108a[_0x2b780b];Object['keys'](_0x5c191c)['forEach'](_0x168f91=>{const _0x42adc3=_0x16de;this['_ensureShapeModelManager'](_0x2b780b,_0x168f91)[_0x42adc3(0x191)](_0x5c191c[_0x168f91]);});});}['_initSnapshot'](){const _0x937193=_0x341a97;this[_0x937193(0x11b)][_0x937193(0x15e)]({'pluginName':SHEET_SHAPE_PLUGIN,'businesses':[UniverInstanceType[_0x937193(0x162)]],'toJson':_0x220d32=>this[_0x937193(0x161)](_0x220d32),'parseJson':_0x458af6=>JSON[_0x937193(0x14c)](_0x458af6),'onLoad':(_0x48b65a,_0x387713)=>{this['_deserializeShapeForUnit'](_0x48b65a,_0x387713);},'onUnLoad':_0x314f15=>{const _0x90b8ef=_0x937193,_0x3d7235=this[_0x90b8ef(0x1a8)][_0x90b8ef(0x17f)](_0x314f15);_0x3d7235&&(_0x3d7235[_0x90b8ef(0x116)](_0x35e3c3=>{const _0x249525=_0x90b8ef;_0x35e3c3[_0x249525(0x15b)]();}),this[_0x90b8ef(0x1a8)]['delete'](_0x314f15));}});}[_0x341a97(0x15b)](){const _0x235e58=_0x341a97;this[_0x235e58(0x1a8)]['forEach'](_0xec4182=>{const _0x445d10=_0x235e58;_0xec4182[_0x445d10(0x116)](_0x904b00=>{_0x904b00['dispose']();});});}};function _0x16de(_0x402efb,_0x2ea7c8){_0x402efb=_0x402efb-0x110;const _0x2d10cc=_0x2d10();let _0x16deec=_0x2d10cc[_0x402efb];return _0x16deec;}SheetsShapeService=__decorate([__decorateParam(0x0,IResourceManagerService)],SheetsShapeService);function _0x2d10(){const _0x4c1a7c=['get','sheet.command.set-shape-text-vertical-toggle','startX','fill','_initSnapshot','3167433KJfYbE','constructor','SHEET_SHAPE_PLUGIN','addShape','getAdjustValueByName','_addLineFollowShapeUpdates','getShapeRelation','call','getCellIndexAndOffsetByPosition','setShapeData','getShapeTypeById','registerCommand','5653774MGPmwG','fromJSON','has','getEndConnectInfo','defineProperty','setConfig','isHorizontal','pushUndoRedo','setShapeType','sheet.command.update-shape-type','@univerjs-pro/sheets-shape','getShapeDataById','rotateEnabled','Fail\x20to\x20get\x20shape\x20model,\x20get:\x20','ang','type','getShapeData','getDrawingByParam','ensureSkeleton','preRedos','3054546iKzjbQ','clear','_sheetsShapeService','adjustValues','_shapeModelManagerMap','MUTATION','worldRect','add','cxnIndex','45180070FIWdck','0.22.1','getDrawingData','sheet.command.update-line-shape-resize','width','forEach','prototype','keys','set','1srcwpK','_resourcesManagerService','_commandService','from','155MQXZrd','sheet.command.toggle-shape-flip','_addLineRerouteUpdates','delete','decorate','_injector','insertShape','shapeId','string','removeShape','_getConnectPointInfo','lineShapeId','hasShape','getOwnPropertyDescriptor','index','push','getLineShapeRelation','drawingType','getCellWithCoordByIndex','toJSON','onStarting','flipX','redos','symbol','sheet.mutation.update-shape-type','data','_drawingManagerService','_configService','COMMAND','top','DRAWING_SHAPE','flipY','_shapes','result','position','_linesIds','2486853XWgQPU','startY','getShapeType','pluginName','undos','_ensureShapeModelManager','getBasicShapeRelation','left','getSkeleton','getStartConnectInfo','parse','packageName','getBatchUpdateOp','_initCommandInterceptor','1303970XjErvP','isLineShape','sheets-shape.config','getConnectionSiteList','onCommandExecute','params','iterator','UPDATE','stringify','function','range','dispose','16INLsCw','getShapeTextData','registerPluginResource','cos','_initCommands','_serializeShapeForUnit','UNIVER_SHEET','preUndos','_sheetSkeletonService','height','_disposed','INSERT','object','borderEnabled','_config','interceptCommand','disposeWithMe','getShapeModel','getAdjustNames','lineType','_groupIds','_sheetInterceptorService','getBasicShapeType','removeLinePoints','toPrimitive','42236DLVzpz','shapeData','angle','isFrom','filter','resizeEnabled','sheet.command.update-connector-relation','length','relation','transform'];_0x2d10=function(){return _0x4c1a7c;};return _0x2d10();}const InsertSheetsShapeMutation={'id':'sheet.mutation.insert-shape','type':CommandType[_0x341a97(0x1a9)],'handler':(_0x1d32c0,_0x5360ae)=>{const _0x2138b1=_0x341a97,{unitId:_0x4ec7e5,subUnitId:_0x42eec3,shapeType:_0x2227f2,shapeId:_0x63442d,shapeData:_0x201495}=_0x5360ae;return _0x1d32c0['get'](SheetsShapeService)[_0x2138b1(0x124)](_0x4ec7e5,_0x42eec3,_0x2227f2,_0x63442d,_0x201495),!![];}},RemoveSheetsShapeMutation={'id':'sheet.mutation.remove-shape','type':CommandType[_0x341a97(0x1a9)],'handler':(_0x526b66,_0x3097df)=>{const _0x3dd609=_0x341a97,{unitId:_0xa54f39,subUnitId:_0x1de393,shapeId:_0x32c41c}=_0x3097df;return _0x526b66[_0x3dd609(0x17f)](SheetsShapeService)[_0x3dd609(0x127)](_0xa54f39,_0x1de393,_0x32c41c),!![];}},InsertShapeCommand={'type':CommandType[_0x341a97(0x13a)],'id':'sheet.command.insert-shape','handler':(_0x4c0466,_0x396c57)=>{const _0x5c8558=_0x341a97;var _0x2de56b,_0x94cb09;const _0x515c34=getSheetCommandTarget(_0x4c0466['get'](IUniverInstanceService),_0x396c57);if(!_0x515c34)return![];const _0x4db599=_0x4c0466['get'](SheetSkeletonService),{unitId:_0x31dcc9,subUnitId:_0x319fce}=_0x515c34,_0x4824ec=_0x4db599[_0x5c8558(0x1a2)](_0x31dcc9,_0x319fce);if(!_0x4824ec)return![];const _0x923d1a=_0x4c0466['get'](ICommandService),_0x3fd453=_0x4c0466[_0x5c8558(0x17f)](IUndoRedoService),_0x230197=_0x4c0466[_0x5c8558(0x17f)](SheetInterceptorService),_0x20770b=_0x4c0466[_0x5c8558(0x17f)](ISheetDrawingService),{shapeType:_0x1a0f34,shapeData:_0x34bcb3}=_0x396c57,_0x6a9ffe=_0x396c57[_0x5c8558(0x125)]||generateRandomId(),_0x4c7fd6={'unitId':_0x31dcc9,'subUnitId':_0x319fce,'shapeId':_0x6a9ffe,'shapeType':_0x1a0f34,'shapeData':_0x34bcb3},_0x3d0e0e=_0x396c57[_0x5c8558(0x115)]||0xc8,_0x57c21f=_0x396c57[_0x5c8558(0x165)]||0xc8;let _0x48aa94=0x0,_0x56c44c=0x0,_0x42c8ab={'row':0x0,'rowOffset':0x0,'column':0x0,'columnOffset':0x0},_0x2c12d3={'row':0x0,'rowOffset':0x0,'column':0x0,'columnOffset':0x0};if(_0x396c57[_0x5c8558(0x140)]){const {x:_0x24fce8,y:_0x43d395}=_0x396c57['position'];_0x48aa94=_0x24fce8,_0x56c44c=_0x43d395,_0x42c8ab=_0x4824ec[_0x5c8558(0x18c)](_0x24fce8,_0x43d395),_0x2c12d3=_0x4824ec[_0x5c8558(0x18c)](_0x24fce8+_0x3d0e0e,_0x43d395+_0x57c21f);}else{if(_0x396c57[_0x5c8558(0x15a)]){const {startRow:_0x4590e4,startColumn:_0x497a90}=_0x396c57['range'],_0xedbba0=0xa,_0x53194e=0xa;_0x42c8ab={'row':_0x4590e4,'rowOffset':_0xedbba0,'column':_0x497a90,'columnOffset':_0x53194e};const _0x299300=_0x4824ec[_0x5c8558(0x130)](_0x4590e4,_0x497a90);_0x48aa94=_0x299300[_0x5c8558(0x181)]+_0x53194e,_0x56c44c=_0x299300[_0x5c8558(0x143)]+_0xedbba0,_0x2c12d3=_0x4824ec[_0x5c8558(0x18c)](_0x48aa94+_0x3d0e0e,_0x56c44c+_0x57c21f);}}const _0x1f6228={'from':_0x42c8ab,'to':_0x2c12d3},_0x4769a2={'unitId':_0x31dcc9,'subUnitId':_0x319fce,'drawingId':_0x6a9ffe,'drawingType':DrawingTypeEnum[_0x5c8558(0x13c)],'sheetTransform':_0x1f6228,'transform':{'left':_0x48aa94,'top':_0x56c44c,'width':_0x3d0e0e,'height':_0x57c21f},'data':{'shapeType':_0x1a0f34,'shapeData':_0x34bcb3},'axisAlignSheetTransform':_0x1f6228,'allowTransform':!![]};isConnectorShape(_0x1a0f34)&&(_0x4769a2[_0x5c8558(0x137)][_0x5c8558(0x182)]=![],_0x4769a2[_0x5c8558(0x137)]['rotateEnabled']=![],_0x4769a2[_0x5c8558(0x137)]['resizeEnabled']=![],_0x4769a2['data'][_0x5c8558(0x169)]=![],_0x4769a2[_0x5c8558(0x17e)][_0x5c8558(0x19c)]=![],_0x4769a2[_0x5c8558(0x17e)][_0x5c8558(0x17a)]=![],_0x4769a2[_0x5c8558(0x17e)][_0x5c8558(0x169)]=![]);const {undo:_0x451dbc,redo:_0x21dcc2,objects:_0x3eb3ff}=_0x20770b['getBatchAddOp']([_0x4769a2]),_0x817e0d=_0x230197[_0x5c8558(0x154)]({'id':InsertSheetDrawingCommand['id'],'params':{'unitId':_0x31dcc9,'drawings':[_0x4769a2]}}),_0x45f808=[...(_0x2de56b=_0x817e0d['preRedos'])!==null&&_0x2de56b!==void 0x0?_0x2de56b:[],{'id':SetDrawingApplyMutation['id'],'params':{'unitId':_0x31dcc9,'subUnitId':_0x319fce,'op':_0x21dcc2,'objects':_0x3eb3ff,'type':DrawingApplyType[_0x5c8558(0x167)]}},{'id':ClearSheetDrawingTransformerOperation['id'],'params':[_0x31dcc9]},..._0x817e0d[_0x5c8558(0x134)],{'id':InsertSheetsShapeMutation['id'],'params':_0x4c7fd6}],_0x50d74a=[{'id':RemoveSheetsShapeMutation['id'],'params':{'unitId':_0x31dcc9,'subUnitId':_0x319fce,'shapeId':_0x6a9ffe}},...(_0x94cb09=_0x817e0d['preUndos'])!==null&&_0x94cb09!==void 0x0?_0x94cb09:[],{'id':SetDrawingApplyMutation['id'],'params':{'unitId':_0x31dcc9,'subUnitId':_0x319fce,'op':_0x451dbc,'objects':_0x3eb3ff,'type':DrawingApplyType['REMOVE']}},{'id':ClearSheetDrawingTransformerOperation['id'],'params':[_0x31dcc9]},..._0x817e0d[_0x5c8558(0x146)]];if(sequenceExecute(_0x45f808,_0x923d1a)[_0x5c8558(0x13f)])return _0x3fd453['pushUndoRedo']({'unitID':_0x31dcc9,'undoMutations':_0x50d74a,'redoMutations':_0x45f808}),!![];return![];}},UpdateSheetsShapeDataMutation={'id':'sheet.mutation.update-shape-data','type':CommandType[_0x341a97(0x1a9)],'handler':(_0x4fe054,_0x4135f5)=>{const _0x43f2a3=_0x341a97,{unitId:_0x5ea515,subUnitId:_0x5b4115,shapeType:_0x3bfdb2,shapeId:_0x3d543c,shapeData:_0x3e0d5d}=_0x4135f5,_0x11a179=_0x4fe054[_0x43f2a3(0x17f)](SheetsShapeService)['getShapeModel'](_0x5ea515,_0x5b4115,_0x3d543c);if(_0x11a179){if(_0x3bfdb2!==void 0x0)_0x11a179[_0x43f2a3(0x198)](_0x3bfdb2);if(_0x3e0d5d)_0x11a179===null||_0x11a179===void 0x0||_0x11a179['setShapeData'](_0x3e0d5d,!![]);}return!![];}},SetShapeDrawingDataCommand={'type':CommandType[_0x341a97(0x13a)],'id':'sheet.command.set-shape-drawing-data','handler':(_0x11dafe,_0x20fba0)=>{const _0x441b0d=_0x341a97;var _0x4a088f,_0x32f7ab;const _0x3fcd4c=getSheetCommandTarget(_0x11dafe['get'](IUniverInstanceService),_0x20fba0);if(!_0x3fcd4c)return![];const _0x1bca65=_0x11dafe['get'](SheetSkeletonService),{unitId:_0x4eab77,subUnitId:_0x745007}=_0x3fcd4c,_0x4ac798=_0x1bca65['ensureSkeleton'](_0x4eab77,_0x745007);if(!_0x4ac798)return![];const _0x552c21=_0x11dafe['get'](SheetsShapeService),{shapeId:_0x32a5b2,shapeType:_0x4f6aa6,shapeData:_0x469cbc,position:_0x42a4f8,width:_0x18c5de,height:_0x366661}=_0x20fba0,_0x22b269=_0x552c21[_0x441b0d(0x16d)](_0x4eab77,_0x745007,_0x32a5b2);if(!_0x22b269)return![];const _0xb405a1=_0x11dafe[_0x441b0d(0x17f)](ICommandService),_0x4951db=_0x11dafe['get'](IUndoRedoService),_0xd72277=_0x11dafe[_0x441b0d(0x17f)](SheetInterceptorService),_0xd92001=_0x11dafe[_0x441b0d(0x17f)](ISheetDrawingService),_0x46f7ad={'unitId':_0x4eab77,'subUnitId':_0x745007,'shapeId':_0x32a5b2,'shapeType':_0x4f6aa6,'shapeData':_0x469cbc},_0x20873c=_0x22b269[_0x441b0d(0x144)](),_0x555d73=_0x22b269[_0x441b0d(0x1a0)](),{x:_0x5a0711,y:_0x34ea67}=_0x42a4f8,_0x14c47f={'from':_0x4ac798['getCellIndexAndOffsetByPosition'](_0x5a0711,_0x34ea67),'to':_0x4ac798['getCellIndexAndOffsetByPosition'](_0x5a0711+_0x18c5de,_0x34ea67+_0x366661)},_0x54e06b={'unitId':_0x4eab77,'subUnitId':_0x745007,'drawingId':_0x32a5b2,'drawingType':DrawingTypeEnum['DRAWING_SHAPE'],'sheetTransform':_0x14c47f,'transform':{'left':_0x5a0711,'top':_0x34ea67,'width':_0x18c5de,'height':_0x366661},'data':{'shapeType':_0x4f6aa6,'shapeData':_0x469cbc},'axisAlignSheetTransform':_0x14c47f,'allowTransform':!![]};isConnectorShape(_0x4f6aa6)&&(_0x54e06b['data'][_0x441b0d(0x182)]=![],_0x54e06b[_0x441b0d(0x137)][_0x441b0d(0x19c)]=![],_0x54e06b[_0x441b0d(0x137)][_0x441b0d(0x17a)]=![],_0x54e06b[_0x441b0d(0x137)][_0x441b0d(0x169)]=![],_0x54e06b['transform'][_0x441b0d(0x19c)]=![],_0x54e06b[_0x441b0d(0x17e)][_0x441b0d(0x17a)]=![],_0x54e06b['transform'][_0x441b0d(0x169)]=![]);const {undo:_0x512cb0,redo:_0x457490,objects:_0x2c0519}=_0xd92001[_0x441b0d(0x14e)]([_0x54e06b]),_0x248a34=_0xd72277['onCommandExecute']({'id':SetSheetDrawingCommand['id'],'params':{'unitId':_0x4eab77,'drawings':[_0x54e06b]}}),_0x4bb8cd=[...(_0x4a088f=_0x248a34[_0x441b0d(0x1a3)])!==null&&_0x4a088f!==void 0x0?_0x4a088f:[],{'id':SetDrawingApplyMutation['id'],'params':{'unitId':_0x4eab77,'subUnitId':_0x745007,'op':_0x457490,'objects':_0x2c0519,'type':DrawingApplyType[_0x441b0d(0x157)]}},{'id':ClearSheetDrawingTransformerOperation['id'],'params':[_0x4eab77]},..._0x248a34[_0x441b0d(0x134)],{'id':UpdateSheetsShapeDataMutation['id'],'params':_0x46f7ad}],_0x101770=[...(_0x32f7ab=_0x248a34[_0x441b0d(0x163)])!==null&&_0x32f7ab!==void 0x0?_0x32f7ab:[],{'id':SetDrawingApplyMutation['id'],'params':{'unitId':_0x4eab77,'subUnitId':_0x745007,'op':_0x512cb0,'objects':_0x2c0519,'type':DrawingApplyType[_0x441b0d(0x157)]}},{'id':ClearSheetDrawingTransformerOperation['id'],'params':[_0x4eab77]},..._0x248a34[_0x441b0d(0x146)],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x4eab77,'subUnitId':_0x745007,'shapeType':_0x20873c,'shapeId':_0x32a5b2,'shapeData':_0x555d73}}];if(sequenceExecute(_0x4bb8cd,_0xb405a1)[_0x441b0d(0x13f)])return _0x4951db[_0x441b0d(0x197)]({'unitID':_0x4eab77,'undoMutations':_0x101770,'redoMutations':_0x4bb8cd}),!![];return![];}},ToggleSheetsShapeFlipCommand={'type':CommandType[_0x341a97(0x13a)],'id':_0x341a97(0x11f),'handler':(_0x15961c,_0x210597)=>{const _0x16ff56=_0x341a97;var _0x3a851a,_0x5eca0a;const _0xd7cde9=getSheetCommandTarget(_0x15961c['get'](IUniverInstanceService),_0x210597);if(!_0xd7cde9)return![];const _0x226829=_0x15961c[_0x16ff56(0x17f)](SheetSkeletonService),{unitId:_0x116fa8,subUnitId:_0x239305}=_0xd7cde9,_0x56efe4=_0x226829[_0x16ff56(0x14a)](_0x116fa8,_0x239305);if(!_0x56efe4)return![];const _0x1e0228=_0x15961c['get'](ISheetDrawingService),{shapeId:_0x121cec,flipH:_0x427530,flipV:_0x1dc414}=_0x210597,_0x392f0f=_0x1e0228[_0x16ff56(0x1a1)]({'unitId':_0x116fa8,'subUnitId':_0x239305,'drawingId':_0x121cec});if(!_0x392f0f)return![];const _0x1d28d0=_0x15961c[_0x16ff56(0x17f)](SheetsShapeService)[_0x16ff56(0x16d)](_0x116fa8,_0x239305,_0x121cec);if(!_0x1d28d0)return![];const _0xacb2cd=_0x15961c['get'](ICommandService),_0x49a2c5=_0x15961c['get'](IUndoRedoService),_0x35bacc=_0x15961c['get'](SheetInterceptorService),_0x486c91={..._0x392f0f[_0x16ff56(0x17e)]};if(_0x427530!==void 0x0)_0x486c91[_0x16ff56(0x133)]=!_0x486c91[_0x16ff56(0x133)];if(_0x1dc414!==void 0x0)_0x486c91[_0x16ff56(0x13d)]=!_0x486c91['flipY'];const _0x5e9727=transformToDrawingPosition(_0x486c91,_0x56efe4),_0x35b72d=transformToAxisAlignPosition(_0x486c91,_0x56efe4),_0x4ffc74=_0x1d28d0[_0x16ff56(0x144)](),_0xc05404=_0x1d28d0['getShapeData'](),_0x18960f={'unitId':_0x116fa8,'subUnitId':_0x239305,'drawingId':_0x121cec,'drawingType':DrawingTypeEnum['DRAWING_SHAPE'],'sheetTransform':_0x5e9727,'transform':_0x486c91,'data':{'shapeType':_0x4ffc74,'shapeData':_0xc05404},'axisAlignSheetTransform':_0x35b72d,'allowTransform':!![]},{undo:_0x212cfb,redo:_0x103f5a,objects:_0x419ed7}=_0x1e0228[_0x16ff56(0x14e)]([_0x18960f]),_0x6575d3=_0x35bacc['onCommandExecute']({'id':SetSheetDrawingCommand['id'],'params':{'unitId':_0x116fa8,'drawings':[_0x18960f]}}),_0x27948e=[...(_0x3a851a=_0x6575d3[_0x16ff56(0x1a3)])!==null&&_0x3a851a!==void 0x0?_0x3a851a:[],{'id':SetDrawingApplyMutation['id'],'params':{'unitId':_0x116fa8,'subUnitId':_0x239305,'op':_0x103f5a,'objects':_0x419ed7,'type':DrawingApplyType[_0x16ff56(0x157)]}},{'id':ClearSheetDrawingTransformerOperation['id'],'params':[_0x116fa8]},..._0x6575d3[_0x16ff56(0x134)]],_0x194211=[...(_0x5eca0a=_0x6575d3['preUndos'])!==null&&_0x5eca0a!==void 0x0?_0x5eca0a:[],{'id':SetDrawingApplyMutation['id'],'params':{'unitId':_0x116fa8,'subUnitId':_0x239305,'op':_0x212cfb,'objects':_0x419ed7,'type':DrawingApplyType[_0x16ff56(0x157)]}},{'id':ClearSheetDrawingTransformerOperation['id'],'params':[_0x116fa8]},..._0x6575d3[_0x16ff56(0x146)]];if(isConnectorShape(_0x4ffc74)){const _0x5a17fb=_0x1d28d0['getShapeRelation']();if(_0x5a17fb){const _0x4d4559={..._0x5a17fb};_0x4d4559[_0x16ff56(0x11d)]=void 0x0,_0x4d4559['to']=void 0x0,_0x27948e[_0x16ff56(0x12d)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x116fa8,'subUnitId':_0x239305,'shapeId':_0x121cec,'shapeType':_0x4ffc74,'shapeData':{'relation':_0x4d4559}}}),_0x194211['push']({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x116fa8,'subUnitId':_0x239305,'shapeId':_0x121cec,'shapeType':_0x4ffc74,'shapeData':{'relation':_0x5a17fb}}});}}if(sequenceExecute(_0x27948e,_0xacb2cd)[_0x16ff56(0x13f)])return _0x49a2c5[_0x16ff56(0x197)]({'unitID':_0x116fa8,'undoMutations':_0x194211,'redoMutations':_0x27948e}),!![];return![];}},SetSheetsShapeRotateCommand={'type':CommandType[_0x341a97(0x13a)],'id':'sheet.command.set-shape-rotate','handler':(_0x26cd92,_0x7a8ba7)=>{const _0x2d6af2=_0x341a97;var _0x4b96b8,_0x55972b;const _0xe82bad=getSheetCommandTarget(_0x26cd92[_0x2d6af2(0x17f)](IUniverInstanceService),_0x7a8ba7);if(!_0xe82bad)return![];const _0x24a1a5=_0x26cd92[_0x2d6af2(0x17f)](SheetSkeletonService),{unitId:_0x3acd4d,subUnitId:_0x4d34e0}=_0xe82bad,_0x3ad027=_0x24a1a5[_0x2d6af2(0x14a)](_0x3acd4d,_0x4d34e0);if(!_0x3ad027)return![];const _0xb0da03=_0x26cd92['get'](ISheetDrawingService),{shapeId:_0xceb1c9,rotate:_0xcfdb3b}=_0x7a8ba7,_0x157100=_0xb0da03['getDrawingByParam']({'unitId':_0x3acd4d,'subUnitId':_0x4d34e0,'drawingId':_0xceb1c9});if(!_0x157100)return![];const _0x37271b=_0x26cd92[_0x2d6af2(0x17f)](SheetsShapeService)[_0x2d6af2(0x16d)](_0x3acd4d,_0x4d34e0,_0xceb1c9);if(!_0x37271b)return![];const _0x574c07=_0x26cd92[_0x2d6af2(0x17f)](ICommandService),_0x1dd945=_0x26cd92[_0x2d6af2(0x17f)](IUndoRedoService),_0x545699=_0x26cd92[_0x2d6af2(0x17f)](SheetInterceptorService),_0x2de8e2={..._0x157100['transform']};if(_0xcfdb3b!==void 0x0)_0x2de8e2[_0x2d6af2(0x177)]=(_0x2de8e2[_0x2d6af2(0x177)]||0x0)+_0xcfdb3b;const _0x44d370=transformToDrawingPosition(_0x2de8e2,_0x3ad027),_0x5c390e=transformToAxisAlignPosition(_0x2de8e2,_0x3ad027),_0x54b1b3=_0x37271b[_0x2d6af2(0x144)](),_0x3f8622=_0x37271b[_0x2d6af2(0x1a0)](),_0x7e192d={'unitId':_0x3acd4d,'subUnitId':_0x4d34e0,'drawingId':_0xceb1c9,'drawingType':DrawingTypeEnum[_0x2d6af2(0x13c)],'sheetTransform':_0x44d370,'transform':_0x2de8e2,'data':{'shapeType':_0x54b1b3,'shapeData':_0x3f8622},'axisAlignSheetTransform':_0x5c390e,'allowTransform':!![]},{undo:_0x4a7256,redo:_0x54d9cb,objects:_0xfccf9a}=_0xb0da03[_0x2d6af2(0x14e)]([_0x7e192d]),_0x323277=_0x545699[_0x2d6af2(0x154)]({'id':SetSheetDrawingCommand['id'],'params':{'unitId':_0x3acd4d,'drawings':[_0x7e192d]}}),_0x466e57=[...(_0x4b96b8=_0x323277[_0x2d6af2(0x1a3)])!==null&&_0x4b96b8!==void 0x0?_0x4b96b8:[],{'id':SetDrawingApplyMutation['id'],'params':{'unitId':_0x3acd4d,'subUnitId':_0x4d34e0,'op':_0x54d9cb,'objects':_0xfccf9a,'type':DrawingApplyType[_0x2d6af2(0x157)]}},{'id':ClearSheetDrawingTransformerOperation['id'],'params':[_0x3acd4d]},..._0x323277['redos']],_0x59aa1c=[...(_0x55972b=_0x323277['preUndos'])!==null&&_0x55972b!==void 0x0?_0x55972b:[],{'id':SetDrawingApplyMutation['id'],'params':{'unitId':_0x3acd4d,'subUnitId':_0x4d34e0,'op':_0x4a7256,'objects':_0xfccf9a,'type':DrawingApplyType[_0x2d6af2(0x157)]}},{'id':ClearSheetDrawingTransformerOperation['id'],'params':[_0x3acd4d]},..._0x323277[_0x2d6af2(0x146)]];if(sequenceExecute(_0x466e57,_0x574c07)[_0x2d6af2(0x13f)])return _0x1dd945[_0x2d6af2(0x197)]({'unitID':_0x3acd4d,'undoMutations':_0x59aa1c,'redoMutations':_0x466e57}),!![];return![];}},SetSheetsShapeTextVerticalToggleCommand={'type':CommandType[_0x341a97(0x13a)],'id':_0x341a97(0x180),'handler':(_0x2fc3c0,_0x83e9e8)=>{const _0x408c64=_0x341a97;var _0x11b845;const _0x155142=getSheetCommandTarget(_0x2fc3c0[_0x408c64(0x17f)](IUniverInstanceService),_0x83e9e8);if(!_0x155142)return![];const {unitId:_0x20614c,subUnitId:_0x37a35d}=_0x155142,{shapeId:_0x4a49ea}=_0x83e9e8,_0x35f10c=_0x2fc3c0[_0x408c64(0x17f)](SheetsShapeService)['getShapeModel'](_0x20614c,_0x37a35d,_0x4a49ea);if(!_0x35f10c)return![];const _0xd1dce5=_0x35f10c[_0x408c64(0x15d)](),_0x10f4f0=(_0x11b845=_0xd1dce5===null||_0xd1dce5===void 0x0?void 0x0:_0xd1dce5[_0x408c64(0x196)])!==null&&_0x11b845!==void 0x0?_0x11b845:!![],_0xd70d8a=!_0x10f4f0,_0x21756a=_0x2fc3c0[_0x408c64(0x17f)](ICommandService),_0x5c2fb7=_0x2fc3c0[_0x408c64(0x17f)](IUndoRedoService),_0x2ce2a9={'unitId':_0x20614c,'subUnitId':_0x37a35d,'shapeId':_0x4a49ea,'shapeData':{'shapeText':{'isHorizontal':_0xd70d8a}}},_0x453dc5={'unitId':_0x20614c,'subUnitId':_0x37a35d,'shapeId':_0x4a49ea,'shapeData':{'shapeText':{'isHorizontal':_0x10f4f0}}},_0x5ca4a2=[{'id':UpdateSheetsShapeDataMutation['id'],'params':_0x2ce2a9}],_0x5e4330=[{'id':UpdateSheetsShapeDataMutation['id'],'params':_0x453dc5}];if(sequenceExecute(_0x5ca4a2,_0x21756a)['result'])return _0x5c2fb7[_0x408c64(0x197)]({'unitID':_0x20614c,'undoMutations':_0x5e4330,'redoMutations':_0x5ca4a2}),!![];return![];}},UpdateConnectorRelationCommand={'type':CommandType[_0x341a97(0x13a)],'id':_0x341a97(0x17b),'handler':(_0x46efbc,_0x30959f)=>{const _0x1938ab=_0x341a97;var _0x16e480,_0x56ad39,_0x14b513,_0x54064f;const _0x153ded=getSheetCommandTarget(_0x46efbc[_0x1938ab(0x17f)](IUniverInstanceService),_0x30959f);if(!_0x153ded)return![];const _0x317455=_0x46efbc['get'](SheetSkeletonService),{unitId:_0x45c90e,subUnitId:_0x4153c6}=_0x153ded,_0x4b8984=_0x317455['getSkeleton'](_0x45c90e,_0x4153c6);if(!_0x4b8984)return![];const _0x1e370b=_0x46efbc[_0x1938ab(0x17f)](ISheetDrawingService),{connectorShapeId:_0xc75386,width:_0x4e428a,height:_0x4dd56b,left:_0x53385a,top:_0x47794d,flipX:_0x42826e,flipY:_0x50f0d5,rotation:_0x3896c1,oldAdjustValues:_0x5ddb7e,newAdjustValues:_0x154331,oldLineType:_0x2975cf,newLineType:_0x8ef532,oldRelation:_0x3163b7,newRelation:_0x35a282}=_0x30959f,_0x2bff1e=_0x1e370b['getDrawingByParam']({'unitId':_0x45c90e,'subUnitId':_0x4153c6,'drawingId':_0xc75386});if(!_0x2bff1e)return![];const _0x346660=_0x46efbc[_0x1938ab(0x17f)](SheetsShapeService)[_0x1938ab(0x16d)](_0x45c90e,_0x4153c6,_0xc75386);if(!_0x346660)return![];const _0x3a4bb6=_0x46efbc[_0x1938ab(0x17f)](ICommandService),_0x45d8b1=_0x46efbc[_0x1938ab(0x17f)](IUndoRedoService),_0x45b2fb=_0x46efbc[_0x1938ab(0x17f)](SheetInterceptorService),_0x490df8={..._0x2bff1e['transform'],'width':_0x4e428a,'height':_0x4dd56b,'left':_0x53385a,'top':_0x47794d,'flipX':_0x42826e,'flipY':_0x50f0d5,'angle':(_0x16e480=_0x3896c1!==null&&_0x3896c1!==void 0x0?_0x3896c1:(_0x56ad39=_0x2bff1e[_0x1938ab(0x17e)])===null||_0x56ad39===void 0x0?void 0x0:_0x56ad39[_0x1938ab(0x177)])!==null&&_0x16e480!==void 0x0?_0x16e480:0x0},_0x4c9ec7=transformToDrawingPosition(_0x490df8,_0x4b8984),_0x473bca=transformToAxisAlignPosition(_0x490df8,_0x4b8984),_0x51c1f7=_0x346660[_0x1938ab(0x144)](),_0x4cb55e=_0x346660[_0x1938ab(0x1a0)](),_0x1f286c={'unitId':_0x45c90e,'subUnitId':_0x4153c6,'drawingId':_0xc75386,'drawingType':DrawingTypeEnum[_0x1938ab(0x13c)],'sheetTransform':_0x4c9ec7,'transform':_0x490df8,'data':{'shapeType':_0x8ef532||_0x2975cf||_0x51c1f7,'shapeData':{..._0x4cb55e,'adjustValues':_0x154331||_0x5ddb7e||(_0x4cb55e===null||_0x4cb55e===void 0x0?void 0x0:_0x4cb55e[_0x1938ab(0x1a7)]),'relation':_0x35a282||_0x3163b7||(_0x4cb55e===null||_0x4cb55e===void 0x0?void 0x0:_0x4cb55e[_0x1938ab(0x17d)])}},'axisAlignSheetTransform':_0x473bca,'allowTransform':!![]},{undo:_0xcf3d79,redo:_0x307c1b,objects:_0x341393}=_0x1e370b[_0x1938ab(0x14e)]([_0x1f286c]),_0x4a8d0c=_0x45b2fb['onCommandExecute']({'id':SetSheetDrawingCommand['id'],'params':{'unitId':_0x45c90e,'drawings':[_0x1f286c]}}),_0x34e09f=[...(_0x14b513=_0x4a8d0c[_0x1938ab(0x1a3)])!==null&&_0x14b513!==void 0x0?_0x14b513:[],{'id':SetDrawingApplyMutation['id'],'params':{'unitId':_0x45c90e,'subUnitId':_0x4153c6,'op':_0x307c1b,'objects':_0x341393,'type':DrawingApplyType[_0x1938ab(0x157)]}},{'id':ClearSheetDrawingTransformerOperation['id'],'params':[_0x45c90e]},..._0x4a8d0c[_0x1938ab(0x134)],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x45c90e,'subUnitId':_0x4153c6,'shapeId':_0xc75386,'shapeType':_0x8ef532,'shapeData':{'adjustValues':_0x154331,'relation':_0x35a282}}}],_0x5c9f86=[...(_0x54064f=_0x4a8d0c['preUndos'])!==null&&_0x54064f!==void 0x0?_0x54064f:[],{'id':SetDrawingApplyMutation['id'],'params':{'unitId':_0x45c90e,'subUnitId':_0x4153c6,'op':_0xcf3d79,'objects':_0x341393,'type':DrawingApplyType[_0x1938ab(0x157)]}},{'id':ClearSheetDrawingTransformerOperation['id'],'params':[_0x45c90e]},..._0x4a8d0c[_0x1938ab(0x146)],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x45c90e,'subUnitId':_0x4153c6,'shapeId':_0xc75386,'shapeType':_0x51c1f7,'shapeData':{..._0x4cb55e,'adjustValues':_0x5ddb7e||(_0x4cb55e===null||_0x4cb55e===void 0x0?void 0x0:_0x4cb55e[_0x1938ab(0x1a7)]),'relation':_0x3163b7||(_0x4cb55e===null||_0x4cb55e===void 0x0?void 0x0:_0x4cb55e[_0x1938ab(0x17d)])}}}];if(sequenceExecute(_0x34e09f,_0x3a4bb6)[_0x1938ab(0x13f)])return _0x45d8b1[_0x1938ab(0x197)]({'unitID':_0x45c90e,'undoMutations':_0x5c9f86,'redoMutations':_0x34e09f}),!![];return![];}},UpdateLineShapeResizeCommand={'type':CommandType['COMMAND'],'id':_0x341a97(0x114),'handler':(_0x1f13ce,_0x42dec3)=>{const _0x146e4a=_0x341a97;var _0x17fba3,_0x5b7ce6;const _0x4ce93b=getSheetCommandTarget(_0x1f13ce['get'](IUniverInstanceService),_0x42dec3);if(!_0x4ce93b)return![];const _0x3e63bb=_0x1f13ce[_0x146e4a(0x17f)](SheetSkeletonService),{unitId:_0x20b49b,subUnitId:_0x5a9bb0}=_0x4ce93b,_0x2cc0ee=_0x3e63bb['getSkeleton'](_0x20b49b,_0x5a9bb0);if(!_0x2cc0ee)return![];const _0x2eab1b=_0x1f13ce['get'](ISheetDrawingService),{shapeId:_0x1551b2,width:_0xba5c2c,height:_0x12f435,left:_0x2de522,top:_0x4b0e11,flipX:_0x24a8e0,flipY:_0x20ab62,angle:_0x4d649d,oldAdjustValues:_0x204c6b,newAdjustValues:_0x34fce7,oldLineType:_0x18686f,newLineType:_0x8b81c4}=_0x42dec3,_0x57d9d6=_0x2eab1b[_0x146e4a(0x1a1)]({'unitId':_0x20b49b,'subUnitId':_0x5a9bb0,'drawingId':_0x1551b2});if(!_0x57d9d6)return![];const _0x2400b4=_0x1f13ce[_0x146e4a(0x17f)](SheetsShapeService)['getShapeModel'](_0x20b49b,_0x5a9bb0,_0x1551b2);if(!_0x2400b4)return![];const _0x8621d0=_0x1f13ce['get'](ICommandService),_0x5d95f3=_0x1f13ce[_0x146e4a(0x17f)](IUndoRedoService),_0x4c15da=_0x1f13ce[_0x146e4a(0x17f)](SheetInterceptorService),_0x336f73={..._0x57d9d6['transform'],'width':_0xba5c2c,'height':_0x12f435,'left':_0x2de522,'top':_0x4b0e11,'flipX':_0x24a8e0,'flipY':_0x20ab62,'angle':_0x4d649d},_0xe4bdd0=transformToDrawingPosition(_0x336f73,_0x2cc0ee),_0x48a849=transformToAxisAlignPosition(_0x336f73,_0x2cc0ee),_0x92cc2a=_0x2400b4['getShapeType'](),_0x3f58e3=_0x2400b4[_0x146e4a(0x1a0)](),_0x98ff93={'unitId':_0x20b49b,'subUnitId':_0x5a9bb0,'drawingId':_0x1551b2,'drawingType':DrawingTypeEnum[_0x146e4a(0x13c)],'sheetTransform':_0xe4bdd0,'transform':_0x336f73,'data':{'shapeType':_0x8b81c4||_0x18686f||_0x92cc2a,'shapeData':{..._0x3f58e3,'adjustValues':_0x34fce7||_0x204c6b||(_0x3f58e3===null||_0x3f58e3===void 0x0?void 0x0:_0x3f58e3[_0x146e4a(0x1a7)])}},'axisAlignSheetTransform':_0x48a849,'allowTransform':!![]},{undo:_0xb8eb7b,redo:_0x5520e5,objects:_0x173ef0}=_0x2eab1b[_0x146e4a(0x14e)]([_0x98ff93]),_0x35bc12=_0x4c15da[_0x146e4a(0x154)]({'id':SetSheetDrawingCommand['id'],'params':{'unitId':_0x20b49b,'drawings':[_0x98ff93]}}),_0x2ab597=[...(_0x17fba3=_0x35bc12[_0x146e4a(0x1a3)])!==null&&_0x17fba3!==void 0x0?_0x17fba3:[],{'id':SetDrawingApplyMutation['id'],'params':{'unitId':_0x20b49b,'subUnitId':_0x5a9bb0,'op':_0x5520e5,'objects':_0x173ef0,'type':DrawingApplyType[_0x146e4a(0x157)]}},{'id':ClearSheetDrawingTransformerOperation['id'],'params':[_0x20b49b]},..._0x35bc12[_0x146e4a(0x134)],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x20b49b,'subUnitId':_0x5a9bb0,'shapeId':_0x1551b2,'shapeType':_0x8b81c4,'shapeData':{'adjustValues':_0x34fce7}}}],_0x3b08e4=[...(_0x5b7ce6=_0x35bc12[_0x146e4a(0x163)])!==null&&_0x5b7ce6!==void 0x0?_0x5b7ce6:[],{'id':SetDrawingApplyMutation['id'],'params':{'unitId':_0x20b49b,'subUnitId':_0x5a9bb0,'op':_0xb8eb7b,'objects':_0x173ef0,'type':DrawingApplyType['UPDATE']}},{'id':ClearSheetDrawingTransformerOperation['id'],'params':[_0x20b49b]},..._0x35bc12[_0x146e4a(0x146)],{'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x20b49b,'subUnitId':_0x5a9bb0,'shapeId':_0x1551b2,'shapeType':_0x92cc2a,'shapeData':{..._0x3f58e3,'adjustValues':_0x204c6b||(_0x3f58e3===null||_0x3f58e3===void 0x0?void 0x0:_0x3f58e3['adjustValues'])}}}];if(sequenceExecute(_0x2ab597,_0x8621d0)[_0x146e4a(0x13f)])return _0x5d95f3['pushUndoRedo']({'unitID':_0x20b49b,'undoMutations':_0x3b08e4,'redoMutations':_0x2ab597}),!![];return![];}},UpdateSheetsShapeTypeMutation={'id':_0x341a97(0x136),'type':CommandType[_0x341a97(0x1a9)],'handler':(_0x1a4d66,_0x5f0800)=>{const _0x374d14=_0x341a97,{unitId:_0x44794d,subUnitId:_0x11b27c,shapeType:_0x5462e4,shapeId:_0x167f93,shapeData:_0x3f0d8a}=_0x5f0800,_0x4630b9=_0x1a4d66[_0x374d14(0x17f)](SheetsShapeService)['getShapeModel'](_0x44794d,_0x11b27c,_0x167f93);if(_0x4630b9){_0x4630b9[_0x374d14(0x198)](_0x5462e4);if(_0x3f0d8a)_0x4630b9===null||_0x4630b9===void 0x0||_0x4630b9[_0x374d14(0x18d)](_0x3f0d8a);}return!![];}},UpdateSheetsShapeTypeCommand={'id':_0x341a97(0x199),'type':CommandType[_0x341a97(0x13a)],'handler':(_0x1f98e9,_0x2b8649)=>{const _0x572eb4=_0x341a97;if(!_0x2b8649)return![];const _0x10e09e=_0x1f98e9['get'](ICommandService),_0x122434=_0x1f98e9[_0x572eb4(0x17f)](SheetsShapeService),_0x5c42f2=_0x1f98e9[_0x572eb4(0x17f)](IUndoRedoService),_0x261d1a=[],_0x5f9b68=[],{unitId:_0x1a0385,subUnitId:_0x4b33ef,shapeId:_0x32001a,shapeType:_0x1ea431,shapeData:_0x22e565}=_0x2b8649,_0xa5638=_0x122434['getShapeModel'](_0x1a0385,_0x4b33ef,_0x32001a);if(_0xa5638){const _0x261ede=_0xa5638['getShapeType'](),_0x5460fb=Object['assign']({},_0xa5638[_0x572eb4(0x1a0)]()),_0x3a8d7c={'unitId':_0x1a0385,'subUnitId':_0x4b33ef,'shapeId':_0x32001a,'shapeType':_0x1ea431,'shapeData':_0x22e565},_0x461769={'unitId':_0x1a0385,'subUnitId':_0x4b33ef,'shapeId':_0x32001a,'shapeType':_0x261ede,'shapeData':_0x5460fb};_0x261d1a[_0x572eb4(0x12d)]({'id':UpdateSheetsShapeTypeMutation['id'],'params':_0x3a8d7c}),_0x5f9b68[_0x572eb4(0x12d)]({'id':UpdateSheetsShapeTypeMutation['id'],'params':_0x461769});if(_0x261d1a['every'](_0x4fc471=>_0x10e09e['syncExecuteCommand'](_0x4fc471['id'],_0x4fc471[_0x572eb4(0x155)])))_0x5c42f2['pushUndoRedo']({'unitID':_0x1a0385,'redoMutations':[..._0x261d1a],'undoMutations':[..._0x5f9b68]});return!![];}return![];}};var name=_0x341a97(0x19a),version=_0x341a97(0x112);const SHEETS_SHAPE_PLUGIN_CONFIG_KEY=_0x341a97(0x152),configSymbol=Symbol(SHEETS_SHAPE_PLUGIN_CONFIG_KEY),defaultPluginConfig={};let SheetsShapeController=class SheetsShapeController extends Disposable{constructor(_0x55ecd7,_0x2780d7,_0x2427e8,_0x5bd2f,_0x2c5182){const _0x432e5a=_0x341a97;super(),this[_0x432e5a(0x11c)]=_0x55ecd7,this[_0x432e5a(0x171)]=_0x2780d7,this[_0x432e5a(0x164)]=_0x2427e8,this[_0x432e5a(0x1a6)]=_0x5bd2f,this[_0x432e5a(0x138)]=_0x2c5182,this[_0x432e5a(0x160)](),this[_0x432e5a(0x14f)]();}[_0x341a97(0x160)](){const _0x21a786=_0x341a97;[InsertShapeCommand,SetShapeDrawingDataCommand,ToggleSheetsShapeFlipCommand,SetSheetsShapeRotateCommand,SetSheetsShapeTextVerticalToggleCommand,UpdateConnectorRelationCommand,UpdateLineShapeResizeCommand,InsertSheetsShapeMutation,RemoveSheetsShapeMutation,UpdateSheetsShapeTypeMutation,UpdateSheetsShapeDataMutation][_0x21a786(0x116)](_0x29f886=>this[_0x21a786(0x16c)](this[_0x21a786(0x11c)][_0x21a786(0x18f)](_0x29f886)));}['_initCommandInterceptor'](){const _0x25fcf4=_0x341a97;this['disposeWithMe'](this[_0x25fcf4(0x171)][_0x25fcf4(0x16b)]({'getMutations':_0x2d12b5=>{const _0x26fbb5=_0x25fcf4;if(_0x2d12b5['id']===RemoveSheetDrawingCommand['id']){const {drawings:_0x10f03a}=_0x2d12b5[_0x26fbb5(0x155)],_0x23e175=_0x10f03a[_0x26fbb5(0x179)](_0x1d903c=>_0x1d903c[_0x26fbb5(0x12f)]===DrawingTypeEnum['DRAWING_SHAPE']);if(_0x23e175[_0x26fbb5(0x17c)]===0x0)return{'preRedos':[],'redos':[],'preUndos':[],'undos':[]};const _0x3484da=[],_0x3e5bb2=[];return _0x23e175[_0x26fbb5(0x116)](_0x35020a=>{const _0x4f0835=_0x26fbb5,{unitId:_0x39af9f,subUnitId:_0xaf745,drawingId:_0x18c98a}=_0x35020a,_0x4550d7=this[_0x4f0835(0x1a6)]['getShapeModel'](_0x39af9f,_0xaf745,_0x18c98a);if(!_0x4550d7)throw new TypeError(_0x4f0835(0x19d)+_0x4550d7);_0x3484da['push']({'id':RemoveSheetsShapeMutation['id'],'params':{'unitId':_0x39af9f,'subUnitId':_0xaf745,'shapeId':_0x18c98a}}),_0x3e5bb2[_0x4f0835(0x12d)]({'id':InsertSheetsShapeMutation['id'],'params':{'unitId':_0x39af9f,'subUnitId':_0xaf745,'shapeId':_0x18c98a,'shapeType':_0x4550d7[_0x4f0835(0x144)](),'shapeData':_0x4550d7[_0x4f0835(0x1a0)]()}});const _0x13aba7=this[_0x4f0835(0x1a6)][_0x4f0835(0x148)](_0x39af9f,_0xaf745,_0x18c98a);if(_0x13aba7)for(const _0x5002e7 of _0x13aba7){const _0x21c301=_0x5002e7[_0x4f0835(0x129)],_0x5d795c=_0x5002e7[_0x4f0835(0x178)],_0x3165cf=_0x5d795c?{'from':void 0x0}:{'to':void 0x0},_0x4efe4b=_0x5d795c?{'from':{'shapeId':_0x5002e7[_0x4f0835(0x125)],'cxnIndex':_0x5002e7[_0x4f0835(0x110)]}}:{'to':{'shapeId':_0x5002e7[_0x4f0835(0x125)],'cxnIndex':_0x5002e7[_0x4f0835(0x110)]}};_0x3484da['push']({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x39af9f,'subUnitId':_0xaf745,'shapeId':_0x21c301,'shapeData':{'relation':_0x3165cf}}}),_0x3e5bb2[_0x4f0835(0x12d)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x39af9f,'subUnitId':_0xaf745,'shapeId':_0x21c301,'shapeData':{'relation':_0x4efe4b}}});}}),{'preRedos':_0x3484da,'redos':[],'preUndos':[],'undos':_0x3e5bb2};}if(_0x2d12b5['id']===SetSheetDrawingCommand['id']){const {drawings:_0x318d17}=_0x2d12b5[_0x26fbb5(0x155)],_0x1a5143=_0x318d17[_0x26fbb5(0x179)](_0x3f8f45=>_0x3f8f45[_0x26fbb5(0x12f)]===DrawingTypeEnum[_0x26fbb5(0x13c)]);if(_0x1a5143[_0x26fbb5(0x17c)]===0x0)return{'preRedos':[],'redos':[],'preUndos':[],'undos':[]};const _0x13dbef=[],_0x42792b=[];for(const _0x7e791f of _0x1a5143){const {unitId:_0x234d0e,subUnitId:_0x2e9720,drawingId:_0xb56d0e,transform:_0x78dd7e}=_0x7e791f;if(!_0x234d0e||!_0x2e9720||!_0xb56d0e||!_0x78dd7e)continue;const _0x421265=this[_0x26fbb5(0x1a6)][_0x26fbb5(0x16d)](_0x234d0e,_0x2e9720,_0xb56d0e);if(!_0x421265)throw new TypeError('Fail\x20to\x20get\x20shape\x20model,\x20get:\x20'+_0x421265);if(isConnectorShape(_0x421265['getShapeType']())){const _0x38c47f=this[_0x26fbb5(0x1a6)]['getLineShapeRelation'](_0x234d0e,_0x2e9720,_0xb56d0e),_0x259fe4={'from':void 0x0,'to':void 0x0};_0x38c47f&&(_0x13dbef['push']({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x234d0e,'subUnitId':_0x2e9720,'shapeId':_0xb56d0e,'shapeData':{'relation':_0x259fe4}}}),_0x42792b[_0x26fbb5(0x12d)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x234d0e,'subUnitId':_0x2e9720,'shapeId':_0xb56d0e,'shapeData':{'relation':_0x38c47f}}}));}else{const _0x4e7133=this['_sheetsShapeService'][_0x26fbb5(0x148)](_0x234d0e,_0x2e9720,_0xb56d0e);if(_0x4e7133&&_0x4e7133[_0x26fbb5(0x17c)]>0x0)for(const _0x16a20f of _0x4e7133){const _0x1434e2=_0x16a20f[_0x26fbb5(0x129)],_0x1eee69=_0x16a20f['isFrom'],_0x22d791=this[_0x26fbb5(0x1a6)][_0x26fbb5(0x16d)](_0x234d0e,_0x2e9720,_0x1434e2);if(!_0x22d791)continue;const _0x5bea7b=_0x22d791[_0x26fbb5(0x14b)](),_0x31c2e0=_0x22d791['getEndConnectInfo']();if(_0x5bea7b&&_0x31c2e0)this[_0x26fbb5(0x120)](_0x234d0e,_0x2e9720,_0x1434e2,_0x22d791,_0x5bea7b,_0x31c2e0,_0x13dbef,_0x42792b,_0xb56d0e,_0x78dd7e);else this[_0x26fbb5(0x189)](_0x234d0e,_0x2e9720,_0x1434e2,_0x22d791,_0x1eee69?_0x5bea7b:_0x31c2e0,_0x1eee69,_0x13dbef,_0x42792b,_0xb56d0e,_0x78dd7e);}}}return{'preRedos':[],'redos':_0x13dbef,'preUndos':_0x42792b,'undos':[]};}return{'preRedos':[],'redos':[],'preUndos':[],'undos':[]};}}));}[_0x341a97(0x128)](_0x53b388,_0x58614f,_0xe14842,_0x5d5a26,_0x47e603){const _0x46f1ec=_0x341a97;if(!_0x58614f||!_0xe14842)return null;const {shapeId:_0x46bdce,cxnIndex:_0x261feb}=_0x53b388,_0x1b1757=this[_0x46f1ec(0x1a6)]['getShapeModel'](_0x58614f,_0xe14842,_0x46bdce);if(!_0x1b1757)return null;const _0x4bf59c=this['_drawingManagerService'][_0x46f1ec(0x1a1)]({'unitId':_0x58614f,'subUnitId':_0xe14842,'drawingId':_0x46bdce});if(!(_0x4bf59c===null||_0x4bf59c===void 0x0?void 0x0:_0x4bf59c[_0x46f1ec(0x17e)]))return null;let {left:left=0x0,top:top=0x0,width:width=0x0,height:height=0x0,flipX:flipX=![],flipY:flipY=![],angle:_0x5b5bac}=_0x4bf59c[_0x46f1ec(0x17e)];if(_0x47e603&&_0x5d5a26===_0x46bdce){var _0x259e62,_0x445f7c,_0x1590e7,_0x14f501,_0x42aff3,_0x17cd8b,_0x45b485;left=(_0x259e62=_0x47e603['left'])!==null&&_0x259e62!==void 0x0?_0x259e62:left,top=(_0x445f7c=_0x47e603[_0x46f1ec(0x13b)])!==null&&_0x445f7c!==void 0x0?_0x445f7c:top,width=(_0x1590e7=_0x47e603[_0x46f1ec(0x115)])!==null&&_0x1590e7!==void 0x0?_0x1590e7:width,height=(_0x14f501=_0x47e603[_0x46f1ec(0x165)])!==null&&_0x14f501!==void 0x0?_0x14f501:height,flipX=(_0x42aff3=_0x47e603['flipX'])!==null&&_0x42aff3!==void 0x0?_0x42aff3:flipX,flipY=(_0x17cd8b=_0x47e603[_0x46f1ec(0x13d)])!==null&&_0x17cd8b!==void 0x0?_0x17cd8b:flipY,_0x5b5bac=(_0x45b485=_0x47e603[_0x46f1ec(0x177)])!==null&&_0x45b485!==void 0x0?_0x45b485:_0x5b5bac;}_0x1b1757['updateContext']({'width':width,'height':height});const _0x27df96=_0x1b1757[_0x46f1ec(0x153)]()['find'](_0x793e08=>_0x793e08[_0x46f1ec(0x12c)]===_0x261feb);if(!_0x27df96)return null;let _0x1c22a3=flipX?width-_0x27df96['x']:_0x27df96['x'],_0x49b04d=flipY?height-_0x27df96['y']:_0x27df96['y'];if(_0x5b5bac!==0x0&&_0x5b5bac!==void 0x0&&_0x5b5bac!==null){const _0x334e1d=_0x5b5bac*Math['PI']/0xb4,_0x388bf4=Math[_0x46f1ec(0x15f)](_0x334e1d),_0x1fdb65=Math['sin'](_0x334e1d),_0x17c5b5=width/0x2,_0x4cd26f=height/0x2,_0x712111=_0x1c22a3-_0x17c5b5,_0x3cac0c=_0x49b04d-_0x4cd26f;_0x1c22a3=_0x17c5b5+_0x712111*_0x388bf4-_0x3cac0c*_0x1fdb65,_0x49b04d=_0x4cd26f+_0x712111*_0x1fdb65+_0x3cac0c*_0x388bf4;}_0x1c22a3+=left,_0x49b04d+=top;let _0x42b729=_0x27df96[_0x46f1ec(0x19e)]/0xea60;if(flipX)_0x42b729=0xb4-_0x42b729;if(flipY)_0x42b729=-_0x42b729;_0x42b729+=_0x5b5bac||0x0,_0x42b729=(_0x42b729%0x168+0x168)%0x168;const _0x3e27e2=getBasicShapeRotateBound({'left':left,'top':top,'width':width,'height':height},_0x5b5bac||0x0);return{'point':{'x':_0x1c22a3,'y':_0x49b04d},'angle':_0x42b729,'bounds':_0x3e27e2};}[_0x341a97(0x120)](_0x898107,_0x120937,_0x25dd1d,_0x529417,_0x13b2a7,_0x1fce68,_0x324e27,_0x360b13,_0x5af694,_0x21d4c0){const _0x159015=_0x341a97,_0x4df202=this[_0x159015(0x164)][_0x159015(0x14a)](_0x898107,_0x120937);if(!_0x4df202)return;const _0x100869=_0x529417[_0x159015(0x18a)](),_0x1c80c6=_0x529417[_0x159015(0x16e)](),_0x47609e={},_0x21c28d={};_0x1c80c6[_0x159015(0x116)](_0x10c5a6=>{const _0x4230ad=_0x159015,_0x20c6ab=_0x529417[_0x4230ad(0x188)](_0x10c5a6);_0x21c28d[_0x10c5a6]=_0x20c6ab!==null&&_0x20c6ab!==void 0x0?_0x20c6ab:0x0;});const _0x1da5ba=this[_0x159015(0x128)](_0x13b2a7,_0x898107,_0x120937,_0x5af694,_0x21d4c0),_0x50a22f=this[_0x159015(0x128)](_0x1fce68,_0x898107,_0x120937,_0x5af694,_0x21d4c0);if(_0x1da5ba&&_0x50a22f){const _0x5932ad=_0x529417['getShapeType'](),_0x483feb=routeConnectorLineShape(_0x1da5ba,_0x50a22f,_0x5932ad);let _0x24e160=_0x5932ad;if(_0x483feb){const _0x29572c=computeConnectorRouteLayout(_0x483feb,_0x529417[_0x159015(0x144)]()),_0x795777=this['_drawingManagerService'][_0x159015(0x113)](_0x898107,_0x120937);if(_0x795777&&_0x795777[_0x25dd1d]){const _0x4a0b79=_0x795777[_0x25dd1d];_0x24e160=_0x29572c[_0x159015(0x16f)];for(const [_0x520860,_0x3ec193]of Object['entries'](_0x29572c[_0x159015(0x1a7)]))_0x47609e[_0x520860]=_0x3ec193;const _0x142e68={..._0x4a0b79[_0x159015(0x17e)],'width':_0x29572c['worldRect'][_0x159015(0x115)],'height':_0x29572c[_0x159015(0x1aa)]['height'],'left':_0x29572c['worldRect'][_0x159015(0x149)],'top':_0x29572c[_0x159015(0x1aa)][_0x159015(0x13b)],'flipX':_0x29572c[_0x159015(0x1aa)]['flipX'],'flipY':_0x29572c[_0x159015(0x1aa)]['flipY'],'angle':_0x29572c['rotation']},_0x496876=transformToDrawingPosition(_0x142e68,_0x4df202),_0x563867=transformToAxisAlignPosition(_0x142e68,_0x4df202),_0xc3d02c={'unitId':_0x898107,'subUnitId':_0x120937,'drawingType':DrawingTypeEnum[_0x159015(0x13c)],'drawingId':_0x25dd1d,'transform':_0x142e68,'sheetTransform':_0x496876,'axisAlignSheetTransform':_0x563867},{unitId:_0x53cd12,subUnitId:_0x4f6a54,undo:_0x2821c6,redo:_0x255e66,objects:_0x2be59}=this['_drawingManagerService'][_0x159015(0x14e)]([_0xc3d02c]);_0x324e27[_0x159015(0x12d)]({'id':SetDrawingApplyMutation['id'],'params':{'unitId':_0x53cd12,'subUnitId':_0x4f6a54,'op':_0x255e66,'objects':_0x2be59,'type':DrawingApplyType['UPDATE']}}),_0x360b13[_0x159015(0x12d)]({'id':SetDrawingApplyMutation['id'],'params':{'unitId':_0x53cd12,'subUnitId':_0x4f6a54,'op':_0x2821c6,'objects':_0x2be59,'type':DrawingApplyType[_0x159015(0x157)]}});}_0x529417[_0x159015(0x173)]();}_0x324e27[_0x159015(0x12d)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x898107,'subUnitId':_0x120937,'shapeId':_0x25dd1d,'shapeType':_0x24e160,'shapeData':{'adjustValues':_0x47609e,'relation':_0x100869}}}),_0x360b13[_0x159015(0x12d)]({'id':UpdateSheetsShapeDataMutation['id'],'params':{'unitId':_0x898107,'subUnitId':_0x120937,'shapeId':_0x25dd1d,'shapeType':_0x5932ad,'shapeData':{'adjustValues':_0x21c28d,'relation':_0x100869}}});}}[_0x341a97(0x189)](_0x5480a9,_0x301915,_0x7a7d8f,_0x49169d,_0x1e727e,_0xda7fa4,_0x4e0bf1,_0x2bee4b,_0x5a6d8c,_0x3592c0){const _0x5e402d=_0x341a97;var _0x20610f;if(!_0x1e727e)return;const _0x2fa567=this[_0x5e402d(0x164)]['getSkeleton'](_0x5480a9,_0x301915);if(!_0x2fa567)return;const _0x5effe1=(_0x20610f=this['_drawingManagerService']['getDrawingByParam']({'unitId':_0x5480a9,'subUnitId':_0x301915,'drawingId':_0x5a6d8c}))===null||_0x20610f===void 0x0?void 0x0:_0x20610f[_0x5e402d(0x17e)];if(!_0x5effe1)return;const _0x1882e7=_0x5effe1['left']!==_0x3592c0[_0x5e402d(0x149)]||_0x5effe1[_0x5e402d(0x13b)]!==_0x3592c0[_0x5e402d(0x13b)],_0x5b6c71=_0x5effe1[_0x5e402d(0x115)]!==_0x3592c0[_0x5e402d(0x115)]||_0x5effe1[_0x5e402d(0x165)]!==_0x3592c0['height'],_0x2907c2=_0x5effe1[_0x5e402d(0x133)]!==_0x3592c0[_0x5e402d(0x133)]||_0x5effe1['flipY']!==_0x3592c0['flipY'],_0x58427a=_0x5effe1[_0x5e402d(0x177)]!==_0x3592c0[_0x5e402d(0x177)];if(_0x1882e7&&!_0x5b6c71&&!_0x2907c2&&!_0x58427a){var _0x1f1678,_0x4c76aa,_0x5cdb31,_0x396f07;const _0x427697=((_0x1f1678=_0x3592c0[_0x5e402d(0x149)])!==null&&_0x1f1678!==void 0x0?_0x1f1678:0x0)-((_0x4c76aa=_0x5effe1[_0x5e402d(0x149)])!==null&&_0x4c76aa!==void 0x0?_0x4c76aa:0x0),_0x3b95c5=((_0x5cdb31=_0x3592c0[_0x5e402d(0x13b)])!==null&&_0x5cdb31!==void 0x0?_0x5cdb31:0x0)-((_0x396f07=_0x5effe1['top'])!==null&&_0x396f07!==void 0x0?_0x396f07:0x0),_0x47411d=this[_0x5e402d(0x138)][_0x5e402d(0x113)](_0x5480a9,_0x301915);if(_0x47411d&&_0x47411d[_0x7a7d8f]){var _0x16e103,_0x46f685,_0x5d0ac4,_0x340f8a;const _0x4f4001=_0x47411d[_0x7a7d8f],_0xc77154={..._0x4f4001[_0x5e402d(0x17e)],'left':((_0x16e103=(_0x46f685=_0x4f4001[_0x5e402d(0x17e)])===null||_0x46f685===void 0x0?void 0x0:_0x46f685['left'])!==null&&_0x16e103!==void 0x0?_0x16e103:0x0)+_0x427697,'top':((_0x5d0ac4=(_0x340f8a=_0x4f4001['transform'])===null||_0x340f8a===void 0x0?void 0x0:_0x340f8a[_0x5e402d(0x13b)])!==null&&_0x5d0ac4!==void 0x0?_0x5d0ac4:0x0)+_0x3b95c5},_0x44a130=transformToDrawingPosition(_0xc77154,_0x2fa567),_0x49b020=transformToAxisAlignPosition(_0xc77154,_0x2fa567),_0xc01ac2={'unitId':_0x5480a9,'subUnitId':_0x301915,'drawingType':DrawingTypeEnum['DRAWING_SHAPE'],'drawingId':_0x7a7d8f,'transform':_0xc77154,'sheetTransform':_0x44a130,'axisAlignSheetTransform':_0x49b020},{unitId:_0x10f4ff,subUnitId:_0x2e7741,undo:_0x50b8a9,redo:_0x30b010,objects:_0x49212e}=this[_0x5e402d(0x138)][_0x5e402d(0x14e)]([_0xc01ac2]);_0x4e0bf1[_0x5e402d(0x12d)]({'id':SetDrawingApplyMutation['id'],'params':{'unitId':_0x10f4ff,'subUnitId':_0x2e7741,'op':_0x30b010,'objects':_0x49212e,'type':DrawingApplyType[_0x5e402d(0x157)]}}),_0x2bee4b[_0x5e402d(0x12d)]({'id':SetDrawingApplyMutation['id'],'params':{'unitId':_0x10f4ff,'subUnitId':_0x2e7741,'op':_0x50b8a9,'objects':_0x49212e,'type':DrawingApplyType[_0x5e402d(0x157)]}});}}else{const _0x5e9645=_0x49169d[_0x5e402d(0x14b)](),_0x36fe34=_0x49169d[_0x5e402d(0x193)]();this[_0x5e402d(0x120)](_0x5480a9,_0x301915,_0x7a7d8f,_0x49169d,_0x5e9645,_0x36fe34,_0x4e0bf1,_0x2bee4b,_0x5a6d8c,_0x3592c0);}}};SheetsShapeController=__decorate([__decorateParam(0x0,ICommandService),__decorateParam(0x1,Inject(SheetInterceptorService)),__decorateParam(0x2,Inject(SheetSkeletonService)),__decorateParam(0x3,Inject(SheetsShapeService)),__decorateParam(0x4,Inject(IDrawingManagerService))],SheetsShapeController);let UniverSheetsShapePlugin=class UniverSheetsShapePlugin extends Plugin{constructor(_0x3b452b=defaultPluginConfig,_0x2ff48,_0x48da89,_0x399d6d){const _0xb82596=_0x341a97;super(),this[_0xb82596(0x16a)]=_0x3b452b,this[_0xb82596(0x123)]=_0x2ff48,this['_commandService']=_0x48da89,this[_0xb82596(0x139)]=_0x399d6d;const {..._0x2351fb}=merge({},defaultPluginConfig,this[_0xb82596(0x16a)]);this[_0xb82596(0x139)][_0xb82596(0x195)](SHEETS_SHAPE_PLUGIN_CONFIG_KEY,_0x2351fb);}[_0x341a97(0x132)](){const _0x9bcc93=_0x341a97,_0x582692=this[_0x9bcc93(0x123)];[[SheetShapeModelManager],[SheetsShapeService],[SheetsShapeController]][_0x9bcc93(0x116)](_0x2aa18b=>_0x582692['add'](_0x2aa18b)),touchDependencies(_0x582692,[[SheetsShapeService],[SheetsShapeController]]);}};_defineProperty(UniverSheetsShapePlugin,_0x341a97(0x19f),UniverInstanceType[_0x341a97(0x162)]),_defineProperty(UniverSheetsShapePlugin,_0x341a97(0x145),_0x341a97(0x186)),_defineProperty(UniverSheetsShapePlugin,_0x341a97(0x14d),name),_defineProperty(UniverSheetsShapePlugin,'version',version),UniverSheetsShapePlugin=__decorate([DependentOn(UniverLicensePlugin),__decorateParam(0x1,Inject(Injector)),__decorateParam(0x2,ICommandService),__decorateParam(0x3,IConfigService)],UniverSheetsShapePlugin);export{DEFAULT_SHAPE_HEIGHT,DEFAULT_SHAPE_WIDTH,InsertShapeCommand,InsertSheetsShapeMutation,RemoveSheetsShapeMutation,SetShapeDrawingDataCommand,SetSheetsShapeRotateCommand,SetSheetsShapeTextVerticalToggleCommand,SheetsShapeService,ToggleSheetsShapeFlipCommand,UniverSheetsShapePlugin,UpdateConnectorRelationCommand,UpdateLineShapeResizeCommand,UpdateSheetsShapeDataMutation,UpdateSheetsShapeTypeCommand,UpdateSheetsShapeTypeMutation};
1
+ const _0x512b51=_0x179d;(function(_0x382b1c,_0x48929a){const _0x15bed0=_0x179d,_0x23f11b=_0x382b1c();while(!![]){try{const _0x547fcf=parseInt(_0x15bed0(0x194))/0x1+parseInt(_0x15bed0(0x1af))/0x2*(-parseInt(_0x15bed0(0x16e))/0x3)+parseInt(_0x15bed0(0x171))/0x4*(parseInt(_0x15bed0(0x1c5))/0x5)+-parseInt(_0x15bed0(0x16c))/0x6+-parseInt(_0x15bed0(0x142))/0x7+-parseInt(_0x15bed0(0x133))/0x8+parseInt(_0x15bed0(0x132))/0x9;if(_0x547fcf===_0x48929a)break;else _0x23f11b['push'](_0x23f11b['shift']());}catch(_0x4c0cc1){_0x23f11b['push'](_0x23f11b['shift']());}}}(_0x2bd3,0xbccc7));import{ShapeModel as _0x539393,computeConnectorRouteLayout as _0x53ea60,getBasicShapeRotateBound as _0x3f9875,isConnectorShape as _0x44e0a0,routeConnectorLineShape as _0x57608a}from'@univerjs-pro/engine-shape';import{CommandType as _0x3c457f,DependentOn as _0x2fb975,Disposable as _0x323530,DrawingTypeEnum as _0xffd1c5,ICommandService as _0x2e35da,IConfigService as _0x41dbf0,IResourceManagerService as _0x3b1e0d,IUndoRedoService as _0x590e53,IUniverInstanceService as _0x4ebb5d,Inject as _0x58bda7,Injector as _0xd2222d,Plugin as _0x267a9d,UniverInstanceType as _0x42d255,generateRandomId as _0x22e48d,merge as _0x5a49a6,sequenceExecute as _0x225a77,touchDependencies as _0x335bd8}from'@univerjs/core';import{SheetInterceptorService as _0x45fb65,SheetSkeletonService as _0x201469,getSheetCommandTarget as _0x2c1f42}from'@univerjs/sheets';import{ClearSheetDrawingTransformerOperation as _0x4190d0,DrawingApplyType as _0x122a53,ISheetDrawingService as _0x2370a3,InsertSheetDrawingCommand as _0x36b211,RemoveSheetDrawingCommand as _0x5429d4,SetDrawingApplyMutation as _0xc02322,SetSheetDrawingCommand as _0x44e6e9,transformToAxisAlignPosition as _0x5ecd9d,transformToDrawingPosition as _0x12dfb9}from'@univerjs/sheets-drawing';import{UniverLicensePlugin as _0x51b0d2}from'@univerjs-pro/license';import{IDrawingManagerService as _0x297748}from'@univerjs/drawing';const I=0xc8,L=0xc8;function R(_0x4db63f){'@babel/helpers - typeof';const _0xaf5962=_0x179d;return R=typeof Symbol=='function'&&typeof Symbol[_0xaf5962(0x16d)]==_0xaf5962(0x172)?function(_0x3d5db3){return typeof _0x3d5db3;}:function(_0x388c4a){const _0x496bed=_0xaf5962;return _0x388c4a&&typeof Symbol==_0x496bed(0x143)&&_0x388c4a[_0x496bed(0x180)]===Symbol&&_0x388c4a!==Symbol[_0x496bed(0x196)]?_0x496bed(0x172):typeof _0x388c4a;},R(_0x4db63f);}function z(_0x242e76,_0x4b6613){const _0x521aa7=_0x179d;if(R(_0x242e76)!='object'||!_0x242e76)return _0x242e76;var _0x2c34ba=_0x242e76[Symbol[_0x521aa7(0x164)]];if(_0x2c34ba!==void 0x0){var _0x167837=_0x2c34ba[_0x521aa7(0x146)](_0x242e76,_0x4b6613||_0x521aa7(0x1be));if(R(_0x167837)!='object')return _0x167837;throw TypeError(_0x521aa7(0x190));}return(_0x4b6613===_0x521aa7(0x1ac)?String:Number)(_0x242e76);}function B(_0x379398){const _0x25955b=_0x179d;var _0x552cf3=z(_0x379398,_0x25955b(0x1ac));return R(_0x552cf3)==_0x25955b(0x172)?_0x552cf3:_0x552cf3+'';}function V(_0x418c6f,_0x1b6d98,_0x7a40eb){const _0x2c46b7=_0x179d;return(_0x1b6d98=B(_0x1b6d98))in _0x418c6f?Object[_0x2c46b7(0x15d)](_0x418c6f,_0x1b6d98,{'value':_0x7a40eb,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x418c6f[_0x1b6d98]=_0x7a40eb,_0x418c6f;}var H=class extends _0x323530{constructor(){const _0x3a9bb8=_0x179d;super(),V(this,'_shapes',new Map()),V(this,_0x3a9bb8(0x1c4),new Set()),V(this,_0x3a9bb8(0x17e),new Set());}['addShape'](_0x1ef791,_0x86938c,_0x1d23d5){const _0x91a7=_0x179d;let _0x2aec27=new _0x539393(_0x1ef791,_0x86938c,_0x1d23d5);return this[_0x91a7(0x137)][_0x91a7(0x17b)](_0x86938c,_0x2aec27),_0x44e0a0(_0x1ef791)&&this[_0x91a7(0x1c4)][_0x91a7(0x1c0)](_0x86938c),_0x2aec27;}[_0x512b51(0x1c3)](_0x371185){const _0x5c1530=_0x512b51;let _0x51e6e3=[];for(let _0x166966 of this[_0x5c1530(0x1c4)]){let _0x29f7e5=this[_0x5c1530(0x137)]['get'](_0x166966);if(_0x29f7e5){let _0x1b0f80=_0x29f7e5[_0x5c1530(0x183)]();if(_0x1b0f80){var _0x2328e4,_0x514189;((_0x2328e4=_0x1b0f80[_0x5c1530(0x1b4)])==null?void 0x0:_0x2328e4[_0x5c1530(0x189)])===_0x371185&&_0x51e6e3['push']({..._0x1b0f80[_0x5c1530(0x1b4)],'lineShapeId':_0x166966,'isFrom':!0x0}),((_0x514189=_0x1b0f80['to'])==null?void 0x0:_0x514189[_0x5c1530(0x189)])===_0x371185&&_0x51e6e3['push']({..._0x1b0f80['to'],'lineShapeId':_0x166966,'isFrom':!0x1});}}}return _0x51e6e3;}['getLineShapeRelation'](_0x39189b){const _0x5997b2=_0x512b51;let _0x42c930=this[_0x5997b2(0x137)][_0x5997b2(0x174)](_0x39189b);if(_0x42c930)return _0x42c930['getShapeRelation']();}[_0x512b51(0x156)](_0x3abecb){let _0x47cfca=this['_shapes']['get'](_0x3abecb);if(_0x47cfca)return _0x47cfca['getShapeType']();}[_0x512b51(0x145)](_0x1ee104){const _0x2232e6=_0x512b51;return this[_0x2232e6(0x137)][_0x2232e6(0x1bf)](_0x1ee104);}[_0x512b51(0x147)](_0x5d2276){const _0x1b7f21=_0x512b51;let _0x2667ce=this[_0x1b7f21(0x137)][_0x1b7f21(0x174)](_0x5d2276);_0x2667ce&&(_0x44e0a0(_0x2667ce[_0x1b7f21(0x156)]())&&this[_0x1b7f21(0x1c4)][_0x1b7f21(0x138)](_0x5d2276),this['_shapes'][_0x1b7f21(0x138)](_0x5d2276));}[_0x512b51(0x170)](){const _0x325991=_0x512b51;let _0x2cda6a=[];return this[_0x325991(0x137)][_0x325991(0x1cc)](_0x4fbff6=>{const _0x4f52c4=_0x325991;_0x2cda6a[_0x4f52c4(0x1b7)](_0x4fbff6[_0x4f52c4(0x170)]());}),_0x2cda6a;}['fromJSON'](_0x106b45){const _0x4bdf29=_0x512b51;for(let _0x5f3884 of _0x106b45){let {id:_0x47413c,shapeType:_0x552978}=_0x5f3884,_0x4900bc=this['addShape'](_0x552978,_0x47413c,_0x5f3884['shapeData']);_0x4900bc&&_0x4900bc['isLineShape']()&&this[_0x4bdf29(0x1c4)][_0x4bdf29(0x1c0)](_0x47413c);}}[_0x512b51(0x13c)](){const _0x373d3b=_0x512b51;this['_disposed']||(this[_0x373d3b(0x137)][_0x373d3b(0x1cc)](_0x55a6d4=>{_0x55a6d4['dispose']();}),this['_shapes'][_0x373d3b(0x166)](),this[_0x373d3b(0x1c4)][_0x373d3b(0x166)](),this[_0x373d3b(0x17e)][_0x373d3b(0x166)](),super[_0x373d3b(0x13c)]());}};function U(_0x187843,_0x4e3f4f){return function(_0x489f14,_0x3ec347){_0x4e3f4f(_0x489f14,_0x3ec347,_0x187843);};}function W(_0x3b6945,_0x32b06f,_0x367cc9,_0x295512){const _0x402420=_0x512b51;var _0x2f838a=arguments[_0x402420(0x176)],_0x5f9059=_0x2f838a<0x3?_0x32b06f:_0x295512===null?_0x295512=Object['getOwnPropertyDescriptor'](_0x32b06f,_0x367cc9):_0x295512,_0x4e09f0;if(typeof Reflect==_0x402420(0x19b)&&typeof Reflect[_0x402420(0x1b0)]=='function')_0x5f9059=Reflect[_0x402420(0x1b0)](_0x3b6945,_0x32b06f,_0x367cc9,_0x295512);else{for(var _0x38d594=_0x3b6945['length']-0x1;_0x38d594>=0x0;_0x38d594--)(_0x4e09f0=_0x3b6945[_0x38d594])&&(_0x5f9059=(_0x2f838a<0x3?_0x4e09f0(_0x5f9059):_0x2f838a>0x3?_0x4e09f0(_0x32b06f,_0x367cc9,_0x5f9059):_0x4e09f0(_0x32b06f,_0x367cc9))||_0x5f9059);}return _0x2f838a>0x3&&_0x5f9059&&Object[_0x402420(0x15d)](_0x32b06f,_0x367cc9,_0x5f9059),_0x5f9059;}let G=class extends _0x323530{constructor(_0x536bcf){const _0x3a020d=_0x512b51;super(),this[_0x3a020d(0x163)]=_0x536bcf,V(this,_0x3a020d(0x1b3),new Map()),this[_0x3a020d(0x1ae)]();}[_0x512b51(0x169)](_0x5a454a,_0x19a185){const _0x5a9c88=_0x512b51;let _0x3d7a95=this[_0x5a9c88(0x1b3)][_0x5a9c88(0x174)](_0x5a454a);_0x3d7a95||(_0x3d7a95=new Map(),this[_0x5a9c88(0x1b3)]['set'](_0x5a454a,_0x3d7a95));let _0x2ee51c=_0x3d7a95[_0x5a9c88(0x174)](_0x19a185);return _0x2ee51c||(_0x2ee51c=new H(),_0x3d7a95[_0x5a9c88(0x17b)](_0x19a185,_0x2ee51c)),_0x2ee51c;}[_0x512b51(0x1b6)](_0x528ff7,_0x222146,_0x5d267d,_0x31a0f1,_0x56f2f3){const _0x24d98d=_0x512b51;this[_0x24d98d(0x169)](_0x528ff7,_0x222146)['addShape'](_0x5d267d,_0x31a0f1,_0x56f2f3);}[_0x512b51(0x147)](_0x28a3c1,_0x297b8b,_0xb9b8f){const _0x5b0b4f=_0x512b51;this[_0x5b0b4f(0x169)](_0x28a3c1,_0x297b8b)['removeShape'](_0xb9b8f);}[_0x512b51(0x1a2)](_0x3ec16c,_0x1cbab4,_0xc6def){const _0x37c8c9=_0x512b51;return this[_0x37c8c9(0x169)](_0x3ec16c,_0x1cbab4)[_0x37c8c9(0x156)](_0xc6def);}[_0x512b51(0x156)](_0x3acb6b,_0x2a1bed,_0xe890d4){return this['_ensureShapeModelManager'](_0x3acb6b,_0x2a1bed)['getShapeType'](_0xe890d4);}[_0x512b51(0x145)](_0x4f6b0e,_0x1b731f,_0x15bfc4){const _0x392e24=_0x512b51;return this[_0x392e24(0x169)](_0x4f6b0e,_0x1b731f)[_0x392e24(0x145)](_0x15bfc4);}['getShapeTypeById'](_0x33e92b,_0x3d3c07,_0x161406){const _0x155d4a=_0x512b51;return this[_0x155d4a(0x169)](_0x33e92b,_0x3d3c07)[_0x155d4a(0x156)](_0x161406);}[_0x512b51(0x177)](_0x22d80a,_0x1b6035,_0x34ff51){const _0x399a96=_0x512b51;let _0x1d5255=this[_0x399a96(0x169)](_0x22d80a,_0x1b6035);if(!_0x1d5255[_0x399a96(0x156)](_0x34ff51))return;let _0x1959f5=_0x1d5255[_0x399a96(0x137)][_0x399a96(0x174)](_0x34ff51);if(_0x1959f5)return _0x1959f5['getShapeData']();}['getShapeModel'](_0x4a243b,_0x4eac26,_0x1ec5ec){const _0x571b4e=_0x512b51;return this[_0x571b4e(0x169)](_0x4a243b,_0x4eac26)[_0x571b4e(0x137)][_0x571b4e(0x174)](_0x1ec5ec);}[_0x512b51(0x1c3)](_0x3f024e,_0x5619d3,_0x17f784){const _0x2eded0=_0x512b51;return this[_0x2eded0(0x169)](_0x3f024e,_0x5619d3)[_0x2eded0(0x1c3)](_0x17f784);}['getLineShapeRelation'](_0x590404,_0x4b23df,_0x132bd5){const _0x27e236=_0x512b51;let _0x4f648d=this[_0x27e236(0x169)](_0x590404,_0x4b23df)[_0x27e236(0x137)][_0x27e236(0x174)](_0x132bd5);if(_0x4f648d)return _0x4f648d[_0x27e236(0x183)]();}['setShapeType'](){}[_0x512b51(0x14d)](_0x362830){const _0x4a3f88=_0x512b51;let _0x3de8bd={},_0x5dc1c1=this[_0x4a3f88(0x1b3)][_0x4a3f88(0x174)](_0x362830);return _0x5dc1c1&&_0x5dc1c1[_0x4a3f88(0x1cc)]((_0x25a62a,_0x3af9b9)=>{let _0x4946c3=_0x25a62a['toJSON']();_0x4946c3['length']>0x0&&(_0x3de8bd[_0x3af9b9]=_0x4946c3);}),JSON[_0x4a3f88(0x1c6)](_0x3de8bd);}[_0x512b51(0x1bd)](_0x46d7c4,_0x975dfb){const _0x7d55f5=_0x512b51;Object[_0x7d55f5(0x18f)](_0x975dfb)['forEach'](_0x141e9e=>{const _0x225a38=_0x7d55f5;this[_0x225a38(0x169)](_0x46d7c4,_0x141e9e)[_0x225a38(0x198)](_0x975dfb[_0x141e9e]);});}[_0x512b51(0x170)](){const _0x33512e=_0x512b51;let _0x14504f={};return this[_0x33512e(0x1b3)][_0x33512e(0x1cc)]((_0x459daf,_0x42d312)=>{const _0x5708de=_0x33512e;_0x14504f[_0x42d312]={},_0x459daf[_0x5708de(0x1cc)]((_0x2eed48,_0x4536cd)=>{const _0x1ae5ce=_0x5708de;_0x14504f[_0x42d312][_0x4536cd]=_0x2eed48[_0x1ae5ce(0x170)]();});}),_0x14504f;}[_0x512b51(0x198)](_0x3ff47f){const _0x1a2f98=_0x512b51;Object[_0x1a2f98(0x18f)](_0x3ff47f)[_0x1a2f98(0x1cc)](_0x4c5b1f=>{const _0xad5ceb=_0x1a2f98;let _0x351c70=_0x3ff47f[_0x4c5b1f];Object[_0xad5ceb(0x18f)](_0x351c70)[_0xad5ceb(0x1cc)](_0x420d4c=>{const _0x26d897=_0xad5ceb;this['_ensureShapeModelManager'](_0x4c5b1f,_0x420d4c)[_0x26d897(0x198)](_0x351c70[_0x420d4c]);});});}[_0x512b51(0x1ae)](){const _0xcbdf3a=_0x512b51;this[_0xcbdf3a(0x163)][_0xcbdf3a(0x16b)]({'pluginName':_0xcbdf3a(0x135),'businesses':[_0x42d255[_0xcbdf3a(0x179)]],'toJson':_0x52d19b=>this[_0xcbdf3a(0x14d)](_0x52d19b),'parseJson':_0x19237c=>JSON[_0xcbdf3a(0x17d)](_0x19237c),'onLoad':(_0x145a9c,_0x5289aa)=>{this['_deserializeShapeForUnit'](_0x145a9c,_0x5289aa);},'onUnLoad':_0x2d8e9c=>{const _0x1495e5=_0xcbdf3a;let _0xff63db=this['_shapeModelManagerMap']['get'](_0x2d8e9c);_0xff63db&&(_0xff63db['forEach'](_0x614035=>{const _0x5ee440=_0x179d;_0x614035[_0x5ee440(0x13c)]();}),this[_0x1495e5(0x1b3)][_0x1495e5(0x138)](_0x2d8e9c));}});}[_0x512b51(0x13c)](){const _0x42243d=_0x512b51;this[_0x42243d(0x1b3)][_0x42243d(0x1cc)](_0x331eb6=>{const _0x1fe9c4=_0x42243d;_0x331eb6[_0x1fe9c4(0x1cc)](_0x121108=>{const _0x542cf1=_0x1fe9c4;_0x121108[_0x542cf1(0x13c)]();});});}};G=W([U(0x0,_0x3b1e0d)],G);const K={'id':'sheet.mutation.insert-shape','type':_0x3c457f['MUTATION'],'handler':(_0x3f2fd8,_0x53e0cc)=>{const _0x24caae=_0x512b51;let {unitId:_0x18d44d,subUnitId:_0x3aea64,shapeType:_0x3f2321,shapeId:_0x241ead,shapeData:_0x3a8d80}=_0x53e0cc;return _0x3f2fd8[_0x24caae(0x174)](G)['insertShape'](_0x18d44d,_0x3aea64,_0x3f2321,_0x241ead,_0x3a8d80),!0x0;}},q={'id':_0x512b51(0x195),'type':_0x3c457f['MUTATION'],'handler':(_0x419e99,_0x398fb5)=>{const _0x332cc7=_0x512b51;let {unitId:_0x2f63bc,subUnitId:_0x39f3c7,shapeId:_0x222601}=_0x398fb5;return _0x419e99['get'](G)[_0x332cc7(0x147)](_0x2f63bc,_0x39f3c7,_0x222601),!0x0;}},J={'type':_0x3c457f[_0x512b51(0x144)],'id':_0x512b51(0x15f),'handler':(_0x5f5324,_0x30038f)=>{const _0xf41747=_0x512b51;var _0x2b4154,_0x58461a;let _0x5dad07=_0x2c1f42(_0x5f5324[_0xf41747(0x174)](_0x4ebb5d),_0x30038f);if(!_0x5dad07)return!0x1;let _0xf472c0=_0x5f5324[_0xf41747(0x174)](_0x201469),{unitId:_0x523320,subUnitId:_0x3d4fd7}=_0x5dad07,_0x5dc9a6=_0xf472c0[_0xf41747(0x167)](_0x523320,_0x3d4fd7);if(!_0x5dc9a6)return!0x1;let _0xce9dd8=_0x5f5324['get'](_0x2e35da),_0x125412=_0x5f5324[_0xf41747(0x174)](_0x590e53),_0x24743c=_0x5f5324[_0xf41747(0x174)](_0x45fb65),_0x13080a=_0x5f5324[_0xf41747(0x174)](_0x2370a3),{shapeType:_0x5e1d0d,shapeData:_0x26fcb4}=_0x30038f,_0x20774e=_0x30038f[_0xf41747(0x189)]||_0x22e48d(),_0x4ade14={'unitId':_0x523320,'subUnitId':_0x3d4fd7,'shapeId':_0x20774e,'shapeType':_0x5e1d0d,'shapeData':_0x26fcb4},_0x56c5b1=_0x30038f[_0xf41747(0x152)]||0xc8,_0x5286b8=_0x30038f['height']||0xc8,_0x1b1177=0x0,_0x44e264=0x0,_0x4d657a={'row':0x0,'rowOffset':0x0,'column':0x0,'columnOffset':0x0},_0x134b13={'row':0x0,'rowOffset':0x0,'column':0x0,'columnOffset':0x0};if(_0x30038f['position']){let {x:_0x230458,y:_0x16c985}=_0x30038f[_0xf41747(0x1a5)];_0x1b1177=_0x230458,_0x44e264=_0x16c985,_0x4d657a=_0x5dc9a6[_0xf41747(0x188)](_0x230458,_0x16c985),_0x134b13=_0x5dc9a6[_0xf41747(0x188)](_0x230458+_0x56c5b1,_0x16c985+_0x5286b8);}else{if(_0x30038f['range']){let {startRow:_0x59b176,startColumn:_0x5eefbf}=_0x30038f[_0xf41747(0x18a)];_0x4d657a={'row':_0x59b176,'rowOffset':0xa,'column':_0x5eefbf,'columnOffset':0xa};let _0x30b978=_0x5dc9a6[_0xf41747(0x160)](_0x59b176,_0x5eefbf);_0x1b1177=_0x30b978[_0xf41747(0x17c)]+0xa,_0x44e264=_0x30b978[_0xf41747(0x1ab)]+0xa,_0x134b13=_0x5dc9a6['getCellIndexAndOffsetByPosition'](_0x1b1177+_0x56c5b1,_0x44e264+_0x5286b8);}}let _0x2d3526={'from':_0x4d657a,'to':_0x134b13},_0x1cec4e={'unitId':_0x523320,'subUnitId':_0x3d4fd7,'drawingId':_0x20774e,'drawingType':_0xffd1c5[_0xf41747(0x18c)],'sheetTransform':_0x2d3526,'transform':{'left':_0x1b1177,'top':_0x44e264,'width':_0x56c5b1,'height':_0x5286b8},'data':{'shapeType':_0x5e1d0d,'shapeData':_0x26fcb4},'axisAlignSheetTransform':_0x2d3526,'allowTransform':!0x0};_0x44e0a0(_0x5e1d0d)&&(_0x1cec4e[_0xf41747(0x141)][_0xf41747(0x15a)]=!0x1,_0x1cec4e[_0xf41747(0x141)][_0xf41747(0x1a9)]=!0x1,_0x1cec4e['data'][_0xf41747(0x13a)]=!0x1,_0x1cec4e['data'][_0xf41747(0x182)]=!0x1,_0x1cec4e['transform'][_0xf41747(0x1a9)]=!0x1,_0x1cec4e[_0xf41747(0x149)]['resizeEnabled']=!0x1,_0x1cec4e[_0xf41747(0x149)][_0xf41747(0x182)]=!0x1);let {undo:_0x55c2f4,redo:_0x5bed09,objects:_0x4e5f02}=_0x13080a[_0xf41747(0x1b1)]([_0x1cec4e]),_0x5a7c71=_0x24743c[_0xf41747(0x1a3)]({'id':_0x36b211['id'],'params':{'unitId':_0x523320,'drawings':[_0x1cec4e]}}),_0x2b9685=[...(_0x2b4154=_0x5a7c71['preRedos'])==null?[]:_0x2b4154,{'id':_0xc02322['id'],'params':{'unitId':_0x523320,'subUnitId':_0x3d4fd7,'op':_0x5bed09,'objects':_0x4e5f02,'type':_0x122a53[_0xf41747(0x1ad)]}},{'id':_0x4190d0['id'],'params':[_0x523320]},..._0x5a7c71['redos'],{'id':K['id'],'params':_0x4ade14}],_0xff4ea0=[{'id':q['id'],'params':{'unitId':_0x523320,'subUnitId':_0x3d4fd7,'shapeId':_0x20774e}},...(_0x58461a=_0x5a7c71['preUndos'])==null?[]:_0x58461a,{'id':_0xc02322['id'],'params':{'unitId':_0x523320,'subUnitId':_0x3d4fd7,'op':_0x55c2f4,'objects':_0x4e5f02,'type':_0x122a53[_0xf41747(0x18e)]}},{'id':_0x4190d0['id'],'params':[_0x523320]},..._0x5a7c71[_0xf41747(0x16a)]];return _0x225a77(_0x2b9685,_0xce9dd8)[_0xf41747(0x175)]?(_0x125412['pushUndoRedo']({'unitID':_0x523320,'undoMutations':_0xff4ea0,'redoMutations':_0x2b9685}),!0x0):!0x1;}},Y={'id':_0x512b51(0x199),'type':_0x3c457f['MUTATION'],'handler':(_0x4b08b9,_0x47a97a)=>{const _0x404a88=_0x512b51;let {unitId:_0x6b91b1,subUnitId:_0x2d88e1,shapeType:_0x101015,shapeId:_0x29af3e,shapeData:_0x377eff}=_0x47a97a,_0x487db8=_0x4b08b9['get'](G)[_0x404a88(0x14e)](_0x6b91b1,_0x2d88e1,_0x29af3e);return _0x487db8&&(_0x101015!==void 0x0&&_0x487db8[_0x404a88(0x1b2)](_0x101015),_0x377eff&&(_0x487db8==null||_0x487db8[_0x404a88(0x14f)](_0x377eff,!0x0))),!0x0;}},ee={'type':_0x3c457f[_0x512b51(0x144)],'id':_0x512b51(0x1a8),'handler':(_0x19e3c5,_0x191f96)=>{const _0x7f43c4=_0x512b51;var _0x5220c9,_0x118d61;let _0x40ab1d=_0x2c1f42(_0x19e3c5[_0x7f43c4(0x174)](_0x4ebb5d),_0x191f96);if(!_0x40ab1d)return!0x1;let _0x1d3b65=_0x19e3c5[_0x7f43c4(0x174)](_0x201469),{unitId:_0x583ca8,subUnitId:_0x38a88f}=_0x40ab1d,_0x425754=_0x1d3b65['ensureSkeleton'](_0x583ca8,_0x38a88f);if(!_0x425754)return!0x1;let _0x1ce584=_0x19e3c5[_0x7f43c4(0x174)](G),{shapeId:_0x41ff0a,shapeType:_0x5f1ef5,shapeData:_0x3d890a,position:_0xc0f259,width:_0x5b079d,height:_0x4fca28}=_0x191f96,_0x540771=_0x1ce584[_0x7f43c4(0x14e)](_0x583ca8,_0x38a88f,_0x41ff0a);if(!_0x540771)return!0x1;let _0x5cb651=_0x19e3c5['get'](_0x2e35da),_0x2680ef=_0x19e3c5[_0x7f43c4(0x174)](_0x590e53),_0x39936b=_0x19e3c5[_0x7f43c4(0x174)](_0x45fb65),_0x17e2e7=_0x19e3c5['get'](_0x2370a3),_0x630f1a={'unitId':_0x583ca8,'subUnitId':_0x38a88f,'shapeId':_0x41ff0a,'shapeType':_0x5f1ef5,'shapeData':_0x3d890a},_0x10800f=_0x540771[_0x7f43c4(0x156)](),_0x524ff5=_0x540771[_0x7f43c4(0x15c)](),{x:_0x2e3052,y:_0x367141}=_0xc0f259,_0x54252c={'from':_0x425754[_0x7f43c4(0x188)](_0x2e3052,_0x367141),'to':_0x425754[_0x7f43c4(0x188)](_0x2e3052+_0x5b079d,_0x367141+_0x4fca28)},_0x1fbc39={'unitId':_0x583ca8,'subUnitId':_0x38a88f,'drawingId':_0x41ff0a,'drawingType':_0xffd1c5[_0x7f43c4(0x18c)],'sheetTransform':_0x54252c,'transform':{'left':_0x2e3052,'top':_0x367141,'width':_0x5b079d,'height':_0x4fca28},'data':{'shapeType':_0x5f1ef5,'shapeData':_0x3d890a},'axisAlignSheetTransform':_0x54252c,'allowTransform':!0x0};_0x44e0a0(_0x5f1ef5)&&(_0x1fbc39[_0x7f43c4(0x141)]['fill']=!0x1,_0x1fbc39[_0x7f43c4(0x141)][_0x7f43c4(0x1a9)]=!0x1,_0x1fbc39[_0x7f43c4(0x141)][_0x7f43c4(0x13a)]=!0x1,_0x1fbc39[_0x7f43c4(0x141)][_0x7f43c4(0x182)]=!0x1,_0x1fbc39[_0x7f43c4(0x149)][_0x7f43c4(0x1a9)]=!0x1,_0x1fbc39[_0x7f43c4(0x149)][_0x7f43c4(0x13a)]=!0x1,_0x1fbc39[_0x7f43c4(0x149)][_0x7f43c4(0x182)]=!0x1);let {undo:_0x50163f,redo:_0x3371c3,objects:_0x57751b}=_0x17e2e7[_0x7f43c4(0x154)]([_0x1fbc39]),_0x2f03a6=_0x39936b['onCommandExecute']({'id':_0x44e6e9['id'],'params':{'unitId':_0x583ca8,'drawings':[_0x1fbc39]}}),_0x54a60f=[...(_0x5220c9=_0x2f03a6[_0x7f43c4(0x1ca)])==null?[]:_0x5220c9,{'id':_0xc02322['id'],'params':{'unitId':_0x583ca8,'subUnitId':_0x38a88f,'op':_0x3371c3,'objects':_0x57751b,'type':_0x122a53[_0x7f43c4(0x148)]}},{'id':_0x4190d0['id'],'params':[_0x583ca8]},..._0x2f03a6[_0x7f43c4(0x131)],{'id':Y['id'],'params':_0x630f1a}],_0x250281=[...(_0x118d61=_0x2f03a6[_0x7f43c4(0x13e)])==null?[]:_0x118d61,{'id':_0xc02322['id'],'params':{'unitId':_0x583ca8,'subUnitId':_0x38a88f,'op':_0x50163f,'objects':_0x57751b,'type':_0x122a53[_0x7f43c4(0x148)]}},{'id':_0x4190d0['id'],'params':[_0x583ca8]},..._0x2f03a6[_0x7f43c4(0x16a)],{'id':Y['id'],'params':{'unitId':_0x583ca8,'subUnitId':_0x38a88f,'shapeType':_0x10800f,'shapeId':_0x41ff0a,'shapeData':_0x524ff5}}];return _0x225a77(_0x54a60f,_0x5cb651)[_0x7f43c4(0x175)]?(_0x2680ef['pushUndoRedo']({'unitID':_0x583ca8,'undoMutations':_0x250281,'redoMutations':_0x54a60f}),!0x0):!0x1;}},te={'type':_0x3c457f[_0x512b51(0x144)],'id':_0x512b51(0x1b9),'handler':(_0x4bcc82,_0x384376)=>{const _0x58e79b=_0x512b51;var _0x2a64bf,_0x34849a;let _0x17715b=_0x2c1f42(_0x4bcc82[_0x58e79b(0x174)](_0x4ebb5d),_0x384376);if(!_0x17715b)return!0x1;let _0x3d7201=_0x4bcc82[_0x58e79b(0x174)](_0x201469),{unitId:_0xe55b5d,subUnitId:_0x1bf1be}=_0x17715b,_0x2c2d85=_0x3d7201[_0x58e79b(0x1c2)](_0xe55b5d,_0x1bf1be);if(!_0x2c2d85)return!0x1;let _0x2f4b85=_0x4bcc82[_0x58e79b(0x174)](_0x2370a3),{shapeId:_0x11c653,flipH:_0xf6cea1,flipV:_0x267303}=_0x384376,_0xf3c567=_0x2f4b85[_0x58e79b(0x14c)]({'unitId':_0xe55b5d,'subUnitId':_0x1bf1be,'drawingId':_0x11c653});if(!_0xf3c567)return!0x1;let _0x30e79f=_0x4bcc82[_0x58e79b(0x174)](G)[_0x58e79b(0x14e)](_0xe55b5d,_0x1bf1be,_0x11c653);if(!_0x30e79f)return!0x1;let _0x392c2a=_0x4bcc82[_0x58e79b(0x174)](_0x2e35da),_0x51b03f=_0x4bcc82[_0x58e79b(0x174)](_0x590e53),_0x42e650=_0x4bcc82['get'](_0x45fb65),_0x2af794={..._0xf3c567[_0x58e79b(0x149)]};_0xf6cea1!==void 0x0&&(_0x2af794[_0x58e79b(0x153)]=!_0x2af794[_0x58e79b(0x153)]),_0x267303!==void 0x0&&(_0x2af794[_0x58e79b(0x187)]=!_0x2af794[_0x58e79b(0x187)]);let _0x225f04=_0x12dfb9(_0x2af794,_0x2c2d85),_0x2523ad=_0x5ecd9d(_0x2af794,_0x2c2d85),_0x1b8ced=_0x30e79f['getShapeType'](),_0x26a5b2=_0x30e79f[_0x58e79b(0x15c)](),_0x5d4877={'unitId':_0xe55b5d,'subUnitId':_0x1bf1be,'drawingId':_0x11c653,'drawingType':_0xffd1c5['DRAWING_SHAPE'],'sheetTransform':_0x225f04,'transform':_0x2af794,'data':{'shapeType':_0x1b8ced,'shapeData':_0x26a5b2},'axisAlignSheetTransform':_0x2523ad,'allowTransform':!0x0},{undo:_0x3e972b,redo:_0x46ad7d,objects:_0xe53f80}=_0x2f4b85['getBatchUpdateOp']([_0x5d4877]),_0x440553=_0x42e650[_0x58e79b(0x1a3)]({'id':_0x44e6e9['id'],'params':{'unitId':_0xe55b5d,'drawings':[_0x5d4877]}}),_0x1760e7=[...(_0x2a64bf=_0x440553['preRedos'])==null?[]:_0x2a64bf,{'id':_0xc02322['id'],'params':{'unitId':_0xe55b5d,'subUnitId':_0x1bf1be,'op':_0x46ad7d,'objects':_0xe53f80,'type':_0x122a53[_0x58e79b(0x148)]}},{'id':_0x4190d0['id'],'params':[_0xe55b5d]},..._0x440553[_0x58e79b(0x131)]],_0x167770=[...(_0x34849a=_0x440553[_0x58e79b(0x13e)])==null?[]:_0x34849a,{'id':_0xc02322['id'],'params':{'unitId':_0xe55b5d,'subUnitId':_0x1bf1be,'op':_0x3e972b,'objects':_0xe53f80,'type':_0x122a53['UPDATE']}},{'id':_0x4190d0['id'],'params':[_0xe55b5d]},..._0x440553[_0x58e79b(0x16a)]];if(_0x44e0a0(_0x1b8ced)){let _0x3e1fd2=_0x30e79f['getShapeRelation']();if(_0x3e1fd2){let _0x126765={..._0x3e1fd2};_0x126765['from']=void 0x0,_0x126765['to']=void 0x0,_0x1760e7[_0x58e79b(0x1b7)]({'id':Y['id'],'params':{'unitId':_0xe55b5d,'subUnitId':_0x1bf1be,'shapeId':_0x11c653,'shapeType':_0x1b8ced,'shapeData':{'relation':_0x126765}}}),_0x167770[_0x58e79b(0x1b7)]({'id':Y['id'],'params':{'unitId':_0xe55b5d,'subUnitId':_0x1bf1be,'shapeId':_0x11c653,'shapeType':_0x1b8ced,'shapeData':{'relation':_0x3e1fd2}}});}}return _0x225a77(_0x1760e7,_0x392c2a)[_0x58e79b(0x175)]?(_0x51b03f[_0x58e79b(0x15e)]({'unitID':_0xe55b5d,'undoMutations':_0x167770,'redoMutations':_0x1760e7}),!0x0):!0x1;}},X={'type':_0x3c457f[_0x512b51(0x144)],'id':_0x512b51(0x19d),'handler':(_0x510bb8,_0x3d49d1)=>{const _0x522fdf=_0x512b51;var _0x5b64c8,_0x2a6ade;let _0x14d655=_0x2c1f42(_0x510bb8[_0x522fdf(0x174)](_0x4ebb5d),_0x3d49d1);if(!_0x14d655)return!0x1;let _0xeba525=_0x510bb8['get'](_0x201469),{unitId:_0x38699b,subUnitId:_0x84990}=_0x14d655,_0x109c1f=_0xeba525[_0x522fdf(0x1c2)](_0x38699b,_0x84990);if(!_0x109c1f)return!0x1;let _0x249078=_0x510bb8[_0x522fdf(0x174)](_0x2370a3),{shapeId:_0x36028e,rotate:_0x1c74cc}=_0x3d49d1,_0x482e9b=_0x249078['getDrawingByParam']({'unitId':_0x38699b,'subUnitId':_0x84990,'drawingId':_0x36028e});if(!_0x482e9b)return!0x1;let _0x5eec09=_0x510bb8[_0x522fdf(0x174)](G)['getShapeModel'](_0x38699b,_0x84990,_0x36028e);if(!_0x5eec09)return!0x1;let _0x5a6d1b=_0x510bb8[_0x522fdf(0x174)](_0x2e35da),_0x539afc=_0x510bb8[_0x522fdf(0x174)](_0x590e53),_0x11a2e9=_0x510bb8[_0x522fdf(0x174)](_0x45fb65),_0x23d7aa={..._0x482e9b[_0x522fdf(0x149)]};_0x1c74cc!==void 0x0&&(_0x23d7aa['angle']=(_0x23d7aa[_0x522fdf(0x1a1)]||0x0)+_0x1c74cc);let _0x4bf5f5=_0x12dfb9(_0x23d7aa,_0x109c1f),_0x32d65d=_0x5ecd9d(_0x23d7aa,_0x109c1f),_0x68ee65=_0x5eec09[_0x522fdf(0x156)](),_0x19d613=_0x5eec09[_0x522fdf(0x15c)](),_0x420a07={'unitId':_0x38699b,'subUnitId':_0x84990,'drawingId':_0x36028e,'drawingType':_0xffd1c5['DRAWING_SHAPE'],'sheetTransform':_0x4bf5f5,'transform':_0x23d7aa,'data':{'shapeType':_0x68ee65,'shapeData':_0x19d613},'axisAlignSheetTransform':_0x32d65d,'allowTransform':!0x0},{undo:_0x5e9cb0,redo:_0x3b98c6,objects:_0x3d32d8}=_0x249078[_0x522fdf(0x154)]([_0x420a07]),_0x57c6d1=_0x11a2e9[_0x522fdf(0x1a3)]({'id':_0x44e6e9['id'],'params':{'unitId':_0x38699b,'drawings':[_0x420a07]}}),_0x10a6f4=[...(_0x5b64c8=_0x57c6d1[_0x522fdf(0x1ca)])==null?[]:_0x5b64c8,{'id':_0xc02322['id'],'params':{'unitId':_0x38699b,'subUnitId':_0x84990,'op':_0x3b98c6,'objects':_0x3d32d8,'type':_0x122a53[_0x522fdf(0x148)]}},{'id':_0x4190d0['id'],'params':[_0x38699b]},..._0x57c6d1[_0x522fdf(0x131)]],_0x4ad1f9=[...(_0x2a6ade=_0x57c6d1[_0x522fdf(0x13e)])==null?[]:_0x2a6ade,{'id':_0xc02322['id'],'params':{'unitId':_0x38699b,'subUnitId':_0x84990,'op':_0x5e9cb0,'objects':_0x3d32d8,'type':_0x122a53[_0x522fdf(0x148)]}},{'id':_0x4190d0['id'],'params':[_0x38699b]},..._0x57c6d1[_0x522fdf(0x16a)]];return _0x225a77(_0x10a6f4,_0x5a6d1b)[_0x522fdf(0x175)]?(_0x539afc[_0x522fdf(0x15e)]({'unitID':_0x38699b,'undoMutations':_0x4ad1f9,'redoMutations':_0x10a6f4}),!0x0):!0x1;}},Z={'type':_0x3c457f[_0x512b51(0x144)],'id':'sheet.command.set-shape-text-vertical-toggle','handler':(_0x1f2550,_0x100770)=>{const _0x18a35c=_0x512b51;var _0x4a9c81;let _0x21aeb5=_0x2c1f42(_0x1f2550[_0x18a35c(0x174)](_0x4ebb5d),_0x100770);if(!_0x21aeb5)return!0x1;let {unitId:_0x49510d,subUnitId:_0x2e57bb}=_0x21aeb5,{shapeId:_0x40b70c}=_0x100770,_0x339f54=_0x1f2550[_0x18a35c(0x174)](G)[_0x18a35c(0x14e)](_0x49510d,_0x2e57bb,_0x40b70c);if(!_0x339f54)return!0x1;let _0x890917=_0x339f54[_0x18a35c(0x162)](),_0x511ae1=(_0x4a9c81=_0x890917==null?void 0x0:_0x890917[_0x18a35c(0x193)])==null?!0x0:_0x4a9c81,_0x27125e=!_0x511ae1,_0x90e105=_0x1f2550[_0x18a35c(0x174)](_0x2e35da),_0x3777e7=_0x1f2550['get'](_0x590e53),_0x2ec0d1={'unitId':_0x49510d,'subUnitId':_0x2e57bb,'shapeId':_0x40b70c,'shapeData':{'shapeText':{'isHorizontal':_0x27125e}}},_0x53a66a={'unitId':_0x49510d,'subUnitId':_0x2e57bb,'shapeId':_0x40b70c,'shapeData':{'shapeText':{'isHorizontal':_0x511ae1}}},_0x19a5ac=[{'id':Y['id'],'params':_0x2ec0d1}],_0x3c4d8e=[{'id':Y['id'],'params':_0x53a66a}];return _0x225a77(_0x19a5ac,_0x90e105)[_0x18a35c(0x175)]?(_0x3777e7[_0x18a35c(0x15e)]({'unitID':_0x49510d,'undoMutations':_0x3c4d8e,'redoMutations':_0x19a5ac}),!0x0):!0x1;}},ne={'type':_0x3c457f['COMMAND'],'id':'sheet.command.update-connector-relation','handler':(_0x3be2d6,_0x2efafe)=>{const _0x446b04=_0x512b51;var _0x1d5c32,_0x70ea29,_0x4a0da1,_0x14702f;let _0x248169=_0x2c1f42(_0x3be2d6['get'](_0x4ebb5d),_0x2efafe);if(!_0x248169)return!0x1;let _0x1dc135=_0x3be2d6[_0x446b04(0x174)](_0x201469),{unitId:_0x5724a1,subUnitId:_0x3a5ce0}=_0x248169,_0x2fd9dd=_0x1dc135['getSkeleton'](_0x5724a1,_0x3a5ce0);if(!_0x2fd9dd)return!0x1;let _0x1251f4=_0x3be2d6['get'](_0x2370a3),{connectorShapeId:_0x121b55,width:_0x1723c7,height:_0x1f7bc8,left:_0x40cd54,top:_0x82ac3e,flipX:_0x99ed68,flipY:_0x32042e,rotation:_0x50651f,oldAdjustValues:_0x30f6a4,newAdjustValues:_0x25e242,oldLineType:_0x377f53,newLineType:_0x11cb54,oldRelation:_0x1da08e,newRelation:_0x5c6b21}=_0x2efafe,_0x12656e=_0x1251f4[_0x446b04(0x14c)]({'unitId':_0x5724a1,'subUnitId':_0x3a5ce0,'drawingId':_0x121b55});if(!_0x12656e)return!0x1;let _0x34aa7c=_0x3be2d6[_0x446b04(0x174)](G)[_0x446b04(0x14e)](_0x5724a1,_0x3a5ce0,_0x121b55);if(!_0x34aa7c)return!0x1;let _0x2ccdd4=_0x3be2d6[_0x446b04(0x174)](_0x2e35da),_0x900659=_0x3be2d6['get'](_0x590e53),_0xee46e6=_0x3be2d6[_0x446b04(0x174)](_0x45fb65),_0x361ce8={..._0x12656e[_0x446b04(0x149)],'width':_0x1723c7,'height':_0x1f7bc8,'left':_0x40cd54,'top':_0x82ac3e,'flipX':_0x99ed68,'flipY':_0x32042e,'angle':(_0x1d5c32=_0x50651f==null?(_0x70ea29=_0x12656e[_0x446b04(0x149)])==null?void 0x0:_0x70ea29[_0x446b04(0x1a1)]:_0x50651f)==null?0x0:_0x1d5c32},_0x58b960=_0x12dfb9(_0x361ce8,_0x2fd9dd),_0x2bdb61=_0x5ecd9d(_0x361ce8,_0x2fd9dd),_0x18ff44=_0x34aa7c[_0x446b04(0x156)](),_0x286d1f=_0x34aa7c[_0x446b04(0x15c)](),_0x19c3bb={'unitId':_0x5724a1,'subUnitId':_0x3a5ce0,'drawingId':_0x121b55,'drawingType':_0xffd1c5[_0x446b04(0x18c)],'sheetTransform':_0x58b960,'transform':_0x361ce8,'data':{'shapeType':_0x11cb54||_0x377f53||_0x18ff44,'shapeData':{..._0x286d1f,'adjustValues':_0x25e242||_0x30f6a4||(_0x286d1f==null?void 0x0:_0x286d1f[_0x446b04(0x1ba)]),'relation':_0x5c6b21||_0x1da08e||(_0x286d1f==null?void 0x0:_0x286d1f[_0x446b04(0x18d)])}},'axisAlignSheetTransform':_0x2bdb61,'allowTransform':!0x0},{undo:_0x410672,redo:_0x5d5569,objects:_0x1fcdbb}=_0x1251f4['getBatchUpdateOp']([_0x19c3bb]),_0x35bfcf=_0xee46e6[_0x446b04(0x1a3)]({'id':_0x44e6e9['id'],'params':{'unitId':_0x5724a1,'drawings':[_0x19c3bb]}}),_0x3e92bb=[...(_0x4a0da1=_0x35bfcf[_0x446b04(0x1ca)])==null?[]:_0x4a0da1,{'id':_0xc02322['id'],'params':{'unitId':_0x5724a1,'subUnitId':_0x3a5ce0,'op':_0x5d5569,'objects':_0x1fcdbb,'type':_0x122a53[_0x446b04(0x148)]}},{'id':_0x4190d0['id'],'params':[_0x5724a1]},..._0x35bfcf[_0x446b04(0x131)],{'id':Y['id'],'params':{'unitId':_0x5724a1,'subUnitId':_0x3a5ce0,'shapeId':_0x121b55,'shapeType':_0x11cb54,'shapeData':{'adjustValues':_0x25e242,'relation':_0x5c6b21}}}],_0x1275c8=[...(_0x14702f=_0x35bfcf[_0x446b04(0x13e)])==null?[]:_0x14702f,{'id':_0xc02322['id'],'params':{'unitId':_0x5724a1,'subUnitId':_0x3a5ce0,'op':_0x410672,'objects':_0x1fcdbb,'type':_0x122a53[_0x446b04(0x148)]}},{'id':_0x4190d0['id'],'params':[_0x5724a1]},..._0x35bfcf['undos'],{'id':Y['id'],'params':{'unitId':_0x5724a1,'subUnitId':_0x3a5ce0,'shapeId':_0x121b55,'shapeType':_0x18ff44,'shapeData':{..._0x286d1f,'adjustValues':_0x30f6a4||(_0x286d1f==null?void 0x0:_0x286d1f[_0x446b04(0x1ba)]),'relation':_0x1da08e||(_0x286d1f==null?void 0x0:_0x286d1f[_0x446b04(0x18d)])}}}];return _0x225a77(_0x3e92bb,_0x2ccdd4)[_0x446b04(0x175)]?(_0x900659[_0x446b04(0x15e)]({'unitID':_0x5724a1,'undoMutations':_0x1275c8,'redoMutations':_0x3e92bb}),!0x0):!0x1;}},re={'type':_0x3c457f['COMMAND'],'id':'sheet.command.update-line-shape-resize','handler':(_0x5dc89a,_0x2820d3)=>{const _0xb4b563=_0x512b51;var _0x21bae2,_0x238109;let _0x439a25=_0x2c1f42(_0x5dc89a[_0xb4b563(0x174)](_0x4ebb5d),_0x2820d3);if(!_0x439a25)return!0x1;let _0x5c14f5=_0x5dc89a[_0xb4b563(0x174)](_0x201469),{unitId:_0x4ecd4c,subUnitId:_0x3476bc}=_0x439a25,_0x5ab603=_0x5c14f5[_0xb4b563(0x1c2)](_0x4ecd4c,_0x3476bc);if(!_0x5ab603)return!0x1;let _0x5c4247=_0x5dc89a[_0xb4b563(0x174)](_0x2370a3),{shapeId:_0x2a33df,width:_0xb8f57f,height:_0x3f4019,left:_0x20d115,top:_0x426fba,flipX:_0x2eae55,flipY:_0x4af7c5,angle:_0x4b10c4,oldAdjustValues:_0x155b14,newAdjustValues:_0x55325a,oldLineType:_0x44c858,newLineType:_0x4eeff6}=_0x2820d3,_0x143742=_0x5c4247[_0xb4b563(0x14c)]({'unitId':_0x4ecd4c,'subUnitId':_0x3476bc,'drawingId':_0x2a33df});if(!_0x143742)return!0x1;let _0x1cddf8=_0x5dc89a[_0xb4b563(0x174)](G)[_0xb4b563(0x14e)](_0x4ecd4c,_0x3476bc,_0x2a33df);if(!_0x1cddf8)return!0x1;let _0x2fb6eb=_0x5dc89a[_0xb4b563(0x174)](_0x2e35da),_0x36b413=_0x5dc89a['get'](_0x590e53),_0x189875=_0x5dc89a['get'](_0x45fb65),_0x5885a7={..._0x143742[_0xb4b563(0x149)],'width':_0xb8f57f,'height':_0x3f4019,'left':_0x20d115,'top':_0x426fba,'flipX':_0x2eae55,'flipY':_0x4af7c5,'angle':_0x4b10c4},_0x41a747=_0x12dfb9(_0x5885a7,_0x5ab603),_0x737f4b=_0x5ecd9d(_0x5885a7,_0x5ab603),_0x2eab9e=_0x1cddf8[_0xb4b563(0x156)](),_0x92d05=_0x1cddf8[_0xb4b563(0x15c)](),_0x15174a={'unitId':_0x4ecd4c,'subUnitId':_0x3476bc,'drawingId':_0x2a33df,'drawingType':_0xffd1c5[_0xb4b563(0x18c)],'sheetTransform':_0x41a747,'transform':_0x5885a7,'data':{'shapeType':_0x4eeff6||_0x44c858||_0x2eab9e,'shapeData':{..._0x92d05,'adjustValues':_0x55325a||_0x155b14||(_0x92d05==null?void 0x0:_0x92d05[_0xb4b563(0x1ba)])}},'axisAlignSheetTransform':_0x737f4b,'allowTransform':!0x0},{undo:_0x9f8815,redo:_0x897957,objects:_0x4a1319}=_0x5c4247['getBatchUpdateOp']([_0x15174a]),_0x158fbb=_0x189875['onCommandExecute']({'id':_0x44e6e9['id'],'params':{'unitId':_0x4ecd4c,'drawings':[_0x15174a]}}),_0xe54b9f=[...(_0x21bae2=_0x158fbb[_0xb4b563(0x1ca)])==null?[]:_0x21bae2,{'id':_0xc02322['id'],'params':{'unitId':_0x4ecd4c,'subUnitId':_0x3476bc,'op':_0x897957,'objects':_0x4a1319,'type':_0x122a53['UPDATE']}},{'id':_0x4190d0['id'],'params':[_0x4ecd4c]},..._0x158fbb[_0xb4b563(0x131)],{'id':Y['id'],'params':{'unitId':_0x4ecd4c,'subUnitId':_0x3476bc,'shapeId':_0x2a33df,'shapeType':_0x4eeff6,'shapeData':{'adjustValues':_0x55325a}}}],_0xec1246=[...(_0x238109=_0x158fbb[_0xb4b563(0x13e)])==null?[]:_0x238109,{'id':_0xc02322['id'],'params':{'unitId':_0x4ecd4c,'subUnitId':_0x3476bc,'op':_0x9f8815,'objects':_0x4a1319,'type':_0x122a53['UPDATE']}},{'id':_0x4190d0['id'],'params':[_0x4ecd4c]},..._0x158fbb[_0xb4b563(0x16a)],{'id':Y['id'],'params':{'unitId':_0x4ecd4c,'subUnitId':_0x3476bc,'shapeId':_0x2a33df,'shapeType':_0x2eab9e,'shapeData':{..._0x92d05,'adjustValues':_0x155b14||(_0x92d05==null?void 0x0:_0x92d05['adjustValues'])}}}];return _0x225a77(_0xe54b9f,_0x2fb6eb)[_0xb4b563(0x175)]?(_0x36b413[_0xb4b563(0x15e)]({'unitID':_0x4ecd4c,'undoMutations':_0xec1246,'redoMutations':_0xe54b9f}),!0x0):!0x1;}},Q={'id':_0x512b51(0x13b),'type':_0x3c457f[_0x512b51(0x17a)],'handler':(_0xb34323,_0x264f22)=>{const _0x2c3a2a=_0x512b51;let {unitId:_0x1b84cf,subUnitId:_0x406bae,shapeType:_0x29c73d,shapeId:_0x10639a,shapeData:_0x5bc8b0}=_0x264f22,_0x4d752c=_0xb34323[_0x2c3a2a(0x174)](G)[_0x2c3a2a(0x14e)](_0x1b84cf,_0x406bae,_0x10639a);return _0x4d752c&&(_0x4d752c[_0x2c3a2a(0x1b2)](_0x29c73d),_0x5bc8b0&&(_0x4d752c==null||_0x4d752c[_0x2c3a2a(0x14f)](_0x5bc8b0))),!0x0;}},ie={'id':'sheet.command.update-shape-type','type':_0x3c457f[_0x512b51(0x144)],'handler':(_0x1dc69e,_0x11402c)=>{const _0x37195c=_0x512b51;if(!_0x11402c)return!0x1;let _0x569677=_0x1dc69e['get'](_0x2e35da),_0x24df05=_0x1dc69e[_0x37195c(0x174)](G),_0x3eaafd=_0x1dc69e[_0x37195c(0x174)](_0x590e53),_0x195367=[],_0x3f6265=[],{unitId:_0x55e322,subUnitId:_0x3598bc,shapeId:_0x2ab345,shapeType:_0x391977,shapeData:_0x42c221}=_0x11402c,_0x1cfdcb=_0x24df05[_0x37195c(0x14e)](_0x55e322,_0x3598bc,_0x2ab345);if(_0x1cfdcb){let _0x10f42f=_0x1cfdcb[_0x37195c(0x156)](),_0x57d8d6=Object['assign']({},_0x1cfdcb[_0x37195c(0x15c)]()),_0x48b4fa={'unitId':_0x55e322,'subUnitId':_0x3598bc,'shapeId':_0x2ab345,'shapeType':_0x391977,'shapeData':_0x42c221},_0x5c5b3c={'unitId':_0x55e322,'subUnitId':_0x3598bc,'shapeId':_0x2ab345,'shapeType':_0x10f42f,'shapeData':_0x57d8d6};return _0x195367[_0x37195c(0x1b7)]({'id':Q['id'],'params':_0x48b4fa}),_0x3f6265['push']({'id':Q['id'],'params':_0x5c5b3c}),_0x195367['every'](_0x435aa8=>_0x569677[_0x37195c(0x136)](_0x435aa8['id'],_0x435aa8[_0x37195c(0x19e)]))&&_0x3eaafd[_0x37195c(0x15e)]({'unitID':_0x55e322,'redoMutations':[..._0x195367],'undoMutations':[..._0x3f6265]}),!0x0;}return!0x1;}};var ae=_0x512b51(0x1c9),oe=_0x512b51(0x1aa);const se=_0x512b51(0x1cd);Symbol(se);const ce={};let le=class extends _0x323530{constructor(_0x526ab3,_0x191366,_0x1ee160,_0x2ae15c,_0x65b5e0){const _0x13a197=_0x512b51;super(),this[_0x13a197(0x150)]=_0x526ab3,this['_sheetInterceptorService']=_0x191366,this[_0x13a197(0x1b5)]=_0x1ee160,this[_0x13a197(0x197)]=_0x2ae15c,this['_drawingManagerService']=_0x65b5e0,this[_0x13a197(0x1bc)](),this[_0x13a197(0x18b)]();}[_0x512b51(0x1bc)](){const _0x1cb0d3=_0x512b51;[J,ee,te,X,Z,ne,re,K,q,Q,Y][_0x1cb0d3(0x1cc)](_0x433f6a=>this['disposeWithMe'](this[_0x1cb0d3(0x150)][_0x1cb0d3(0x14a)](_0x433f6a)));}['_initCommandInterceptor'](){const _0x55e380=_0x512b51;this[_0x55e380(0x19c)](this[_0x55e380(0x168)][_0x55e380(0x1a4)]({'getMutations':_0x22a0f5=>{const _0x23a977=_0x55e380;if(_0x22a0f5['id']===_0x5429d4['id']){let {drawings:_0x4fe4bd}=_0x22a0f5[_0x23a977(0x19e)],_0x326048=_0x4fe4bd['filter'](_0x53bd68=>_0x53bd68[_0x23a977(0x165)]===_0xffd1c5[_0x23a977(0x18c)]);if(_0x326048[_0x23a977(0x176)]===0x0)return{'preRedos':[],'redos':[],'preUndos':[],'undos':[]};let _0x4e01b8=[],_0x267815=[];return _0x326048[_0x23a977(0x1cc)](_0x3d8d31=>{const _0x1c872d=_0x23a977;let {unitId:_0x453ffa,subUnitId:_0xbc855f,drawingId:_0x2cd1cc}=_0x3d8d31,_0x5b8e3d=this[_0x1c872d(0x197)][_0x1c872d(0x14e)](_0x453ffa,_0xbc855f,_0x2cd1cc);if(!_0x5b8e3d)throw TypeError(_0x1c872d(0x140)+_0x5b8e3d);_0x4e01b8['push']({'id':q['id'],'params':{'unitId':_0x453ffa,'subUnitId':_0xbc855f,'shapeId':_0x2cd1cc}}),_0x267815[_0x1c872d(0x1b7)]({'id':K['id'],'params':{'unitId':_0x453ffa,'subUnitId':_0xbc855f,'shapeId':_0x2cd1cc,'shapeType':_0x5b8e3d['getShapeType'](),'shapeData':_0x5b8e3d[_0x1c872d(0x15c)]()}});let _0x287a6f=this[_0x1c872d(0x197)][_0x1c872d(0x1c3)](_0x453ffa,_0xbc855f,_0x2cd1cc);if(_0x287a6f)for(let _0x190100 of _0x287a6f){let _0x18884c=_0x190100[_0x1c872d(0x1a6)],_0x39c4ca=_0x190100['isFrom'],_0x18496d=_0x39c4ca?{'from':void 0x0}:{'to':void 0x0},_0x355aad=_0x39c4ca?{'from':{'shapeId':_0x190100['shapeId'],'cxnIndex':_0x190100[_0x1c872d(0x1a0)]}}:{'to':{'shapeId':_0x190100[_0x1c872d(0x189)],'cxnIndex':_0x190100[_0x1c872d(0x1a0)]}};_0x4e01b8[_0x1c872d(0x1b7)]({'id':Y['id'],'params':{'unitId':_0x453ffa,'subUnitId':_0xbc855f,'shapeId':_0x18884c,'shapeData':{'relation':_0x18496d}}}),_0x267815['push']({'id':Y['id'],'params':{'unitId':_0x453ffa,'subUnitId':_0xbc855f,'shapeId':_0x18884c,'shapeData':{'relation':_0x355aad}}});}}),{'preRedos':_0x4e01b8,'redos':[],'preUndos':[],'undos':_0x267815};}if(_0x22a0f5['id']===_0x44e6e9['id']){let {drawings:_0x24d8bc}=_0x22a0f5[_0x23a977(0x19e)],_0x146227=_0x24d8bc[_0x23a977(0x19f)](_0x348081=>_0x348081['drawingType']===_0xffd1c5[_0x23a977(0x18c)]);if(_0x146227[_0x23a977(0x176)]===0x0)return{'preRedos':[],'redos':[],'preUndos':[],'undos':[]};let _0x12d78c=[],_0x3fb012=[];for(let _0x3792f9 of _0x146227){let {unitId:_0x4234f5,subUnitId:_0x382a42,drawingId:_0x32297d,transform:_0x13b1b0}=_0x3792f9;if(!_0x4234f5||!_0x382a42||!_0x32297d||!_0x13b1b0)continue;let _0x2bbf5e=this[_0x23a977(0x197)]['getShapeModel'](_0x4234f5,_0x382a42,_0x32297d);if(!_0x2bbf5e)throw TypeError(_0x23a977(0x140)+_0x2bbf5e);if(_0x44e0a0(_0x2bbf5e[_0x23a977(0x156)]())){let _0x2fc1d2=this[_0x23a977(0x197)][_0x23a977(0x1b8)](_0x4234f5,_0x382a42,_0x32297d);_0x2fc1d2&&(_0x12d78c['push']({'id':Y['id'],'params':{'unitId':_0x4234f5,'subUnitId':_0x382a42,'shapeId':_0x32297d,'shapeData':{'relation':{'from':void 0x0,'to':void 0x0}}}}),_0x3fb012[_0x23a977(0x1b7)]({'id':Y['id'],'params':{'unitId':_0x4234f5,'subUnitId':_0x382a42,'shapeId':_0x32297d,'shapeData':{'relation':_0x2fc1d2}}}));}else{let _0x3666be=this[_0x23a977(0x197)][_0x23a977(0x1c3)](_0x4234f5,_0x382a42,_0x32297d);if(_0x3666be&&_0x3666be[_0x23a977(0x176)]>0x0)for(let _0x3dfd4a of _0x3666be){let _0x5052a7=_0x3dfd4a[_0x23a977(0x1a6)],_0x2b9676=_0x3dfd4a['isFrom'],_0x4486eb=this[_0x23a977(0x197)][_0x23a977(0x14e)](_0x4234f5,_0x382a42,_0x5052a7);if(!_0x4486eb)continue;let _0x4d4935=_0x4486eb[_0x23a977(0x192)](),_0x376052=_0x4486eb[_0x23a977(0x186)]();_0x4d4935&&_0x376052?this[_0x23a977(0x12f)](_0x4234f5,_0x382a42,_0x5052a7,_0x4486eb,_0x4d4935,_0x376052,_0x12d78c,_0x3fb012,_0x32297d,_0x13b1b0):this[_0x23a977(0x151)](_0x4234f5,_0x382a42,_0x5052a7,_0x4486eb,_0x2b9676?_0x4d4935:_0x376052,_0x2b9676,_0x12d78c,_0x3fb012,_0x32297d,_0x13b1b0);}}}return{'preRedos':[],'redos':_0x12d78c,'preUndos':_0x3fb012,'undos':[]};}return{'preRedos':[],'redos':[],'preUndos':[],'undos':[]};}}));}[_0x512b51(0x1c7)](_0xcf244,_0x426ebd,_0x3cda26,_0x4efea3,_0x5cc764){const _0x42fb9a=_0x512b51;if(!_0x426ebd||!_0x3cda26)return null;let {shapeId:_0x221f45,cxnIndex:_0x163c08}=_0xcf244,_0x103fe9=this['_sheetsShapeService'][_0x42fb9a(0x14e)](_0x426ebd,_0x3cda26,_0x221f45);if(!_0x103fe9)return null;let _0x5413fe=this[_0x42fb9a(0x173)][_0x42fb9a(0x14c)]({'unitId':_0x426ebd,'subUnitId':_0x3cda26,'drawingId':_0x221f45});if(!(_0x5413fe!=null&&_0x5413fe[_0x42fb9a(0x149)]))return null;let {left:_0x54e5bd=0x0,top:_0x2bb85c=0x0,width:_0x8877f1=0x0,height:_0x47d145=0x0,flipX:_0x1ee916=!0x1,flipY:_0x2437fb=!0x1,angle:_0x4e8c92}=_0x5413fe[_0x42fb9a(0x149)];if(_0x5cc764&&_0x4efea3===_0x221f45){var _0x2f63d3,_0x2c54c8,_0x33697c,_0xf39421,_0x201e74,_0x6632c0,_0x4af7a1;_0x54e5bd=(_0x2f63d3=_0x5cc764[_0x42fb9a(0x17f)])==null?_0x54e5bd:_0x2f63d3,_0x2bb85c=(_0x2c54c8=_0x5cc764[_0x42fb9a(0x157)])==null?_0x2bb85c:_0x2c54c8,_0x8877f1=(_0x33697c=_0x5cc764[_0x42fb9a(0x152)])==null?_0x8877f1:_0x33697c,_0x47d145=(_0xf39421=_0x5cc764[_0x42fb9a(0x178)])==null?_0x47d145:_0xf39421,_0x1ee916=(_0x201e74=_0x5cc764['flipX'])==null?_0x1ee916:_0x201e74,_0x2437fb=(_0x6632c0=_0x5cc764['flipY'])==null?_0x2437fb:_0x6632c0,_0x4e8c92=(_0x4af7a1=_0x5cc764[_0x42fb9a(0x1a1)])==null?_0x4e8c92:_0x4af7a1;}_0x103fe9[_0x42fb9a(0x1cb)]({'width':_0x8877f1,'height':_0x47d145});let _0x8738ac=_0x103fe9[_0x42fb9a(0x134)]()[_0x42fb9a(0x1bb)](_0x59a4a3=>_0x59a4a3[_0x42fb9a(0x1a7)]===_0x163c08);if(!_0x8738ac)return null;let _0x2b0a01=_0x1ee916?_0x8877f1-_0x8738ac['x']:_0x8738ac['x'],_0x4fba2e=_0x2437fb?_0x47d145-_0x8738ac['y']:_0x8738ac['y'];if(_0x4e8c92!==0x0&&_0x4e8c92!=null){let _0x5a96b0=_0x4e8c92*Math['PI']/0xb4,_0xe3409d=Math[_0x42fb9a(0x161)](_0x5a96b0),_0x4c35ed=Math[_0x42fb9a(0x181)](_0x5a96b0),_0x51889c=_0x8877f1/0x2,_0xe672ff=_0x47d145/0x2,_0x277ad5=_0x2b0a01-_0x51889c,_0x24302c=_0x4fba2e-_0xe672ff;_0x2b0a01=_0x51889c+_0x277ad5*_0xe3409d-_0x24302c*_0x4c35ed,_0x4fba2e=_0xe672ff+_0x277ad5*_0x4c35ed+_0x24302c*_0xe3409d;}_0x2b0a01+=_0x54e5bd,_0x4fba2e+=_0x2bb85c;let _0x1fb383=_0x8738ac[_0x42fb9a(0x185)]/0xea60;_0x1ee916&&(_0x1fb383=0xb4-_0x1fb383),_0x2437fb&&(_0x1fb383=-_0x1fb383),_0x1fb383+=_0x4e8c92||0x0,_0x1fb383=(_0x1fb383%0x168+0x168)%0x168;let _0x505517=_0x3f9875({'left':_0x54e5bd,'top':_0x2bb85c,'width':_0x8877f1,'height':_0x47d145},_0x4e8c92||0x0);return{'point':{'x':_0x2b0a01,'y':_0x4fba2e},'angle':_0x1fb383,'bounds':_0x505517};}[_0x512b51(0x12f)](_0x3194f9,_0x4d8232,_0x5115b9,_0x29c5ee,_0x2bb355,_0x47e41d,_0x1b25fd,_0x16c08a,_0x2afd71,_0x481ae6){const _0x9a7d4c=_0x512b51;let _0x387ca6=this['_sheetSkeletonService'][_0x9a7d4c(0x1c2)](_0x3194f9,_0x4d8232);if(!_0x387ca6)return;let _0x2fffd5=_0x29c5ee[_0x9a7d4c(0x183)](),_0x4d5af7=_0x29c5ee[_0x9a7d4c(0x158)](),_0x446bb7={},_0x4fe3ba={};_0x4d5af7[_0x9a7d4c(0x1cc)](_0x5a98c3=>{const _0x5e522a=_0x9a7d4c;let _0x4f6490=_0x29c5ee[_0x5e522a(0x130)](_0x5a98c3);_0x4fe3ba[_0x5a98c3]=_0x4f6490==null?0x0:_0x4f6490;});let _0x452bbb=this['_getConnectPointInfo'](_0x2bb355,_0x3194f9,_0x4d8232,_0x2afd71,_0x481ae6),_0x36502e=this[_0x9a7d4c(0x1c7)](_0x47e41d,_0x3194f9,_0x4d8232,_0x2afd71,_0x481ae6);if(_0x452bbb&&_0x36502e){let _0xc5141a=_0x29c5ee[_0x9a7d4c(0x156)](),_0x46fe3b=_0x57608a(_0x452bbb,_0x36502e,_0xc5141a),_0x4b1e60=_0xc5141a;if(_0x46fe3b){let _0x37f1f9=_0x53ea60(_0x46fe3b,_0x29c5ee[_0x9a7d4c(0x156)]()),_0x1eb269=this['_drawingManagerService'][_0x9a7d4c(0x184)](_0x3194f9,_0x4d8232);if(_0x1eb269&&_0x1eb269[_0x5115b9]){let _0x139dea=_0x1eb269[_0x5115b9];_0x4b1e60=_0x37f1f9[_0x9a7d4c(0x1c8)];for(let [_0x355e0f,_0x3d0c17]of Object[_0x9a7d4c(0x16f)](_0x37f1f9[_0x9a7d4c(0x1ba)]))_0x446bb7[_0x355e0f]=_0x3d0c17;let _0x5463a4={..._0x139dea[_0x9a7d4c(0x149)],'width':_0x37f1f9[_0x9a7d4c(0x13f)][_0x9a7d4c(0x152)],'height':_0x37f1f9[_0x9a7d4c(0x13f)][_0x9a7d4c(0x178)],'left':_0x37f1f9['worldRect'][_0x9a7d4c(0x17f)],'top':_0x37f1f9[_0x9a7d4c(0x13f)][_0x9a7d4c(0x157)],'flipX':_0x37f1f9[_0x9a7d4c(0x13f)][_0x9a7d4c(0x153)],'flipY':_0x37f1f9[_0x9a7d4c(0x13f)][_0x9a7d4c(0x187)],'angle':_0x37f1f9['rotation']},_0x3b1216=_0x12dfb9(_0x5463a4,_0x387ca6),_0x127488=_0x5ecd9d(_0x5463a4,_0x387ca6),_0x4cd311={'unitId':_0x3194f9,'subUnitId':_0x4d8232,'drawingType':_0xffd1c5['DRAWING_SHAPE'],'drawingId':_0x5115b9,'transform':_0x5463a4,'sheetTransform':_0x3b1216,'axisAlignSheetTransform':_0x127488},{unitId:_0x20bf8b,subUnitId:_0x11cacf,undo:_0x4ba948,redo:_0xa46ba,objects:_0x4e1805}=this[_0x9a7d4c(0x173)][_0x9a7d4c(0x154)]([_0x4cd311]);_0x1b25fd[_0x9a7d4c(0x1b7)]({'id':_0xc02322['id'],'params':{'unitId':_0x20bf8b,'subUnitId':_0x11cacf,'op':_0xa46ba,'objects':_0x4e1805,'type':_0x122a53[_0x9a7d4c(0x148)]}}),_0x16c08a[_0x9a7d4c(0x1b7)]({'id':_0xc02322['id'],'params':{'unitId':_0x20bf8b,'subUnitId':_0x11cacf,'op':_0x4ba948,'objects':_0x4e1805,'type':_0x122a53['UPDATE']}});}_0x29c5ee[_0x9a7d4c(0x14b)]();}_0x1b25fd[_0x9a7d4c(0x1b7)]({'id':Y['id'],'params':{'unitId':_0x3194f9,'subUnitId':_0x4d8232,'shapeId':_0x5115b9,'shapeType':_0x4b1e60,'shapeData':{'adjustValues':_0x446bb7,'relation':_0x2fffd5}}}),_0x16c08a[_0x9a7d4c(0x1b7)]({'id':Y['id'],'params':{'unitId':_0x3194f9,'subUnitId':_0x4d8232,'shapeId':_0x5115b9,'shapeType':_0xc5141a,'shapeData':{'adjustValues':_0x4fe3ba,'relation':_0x2fffd5}}});}}[_0x512b51(0x151)](_0x23c43a,_0x9b3df6,_0x2fb58e,_0x570c5c,_0x33cb2b,_0x17fa2a,_0x1b17f8,_0x4d8294,_0x42729c,_0x22a34d){const _0x20ea64=_0x512b51;var _0x16fb1b;if(!_0x33cb2b)return;let _0x46e49e=this[_0x20ea64(0x1b5)][_0x20ea64(0x1c2)](_0x23c43a,_0x9b3df6);if(!_0x46e49e)return;let _0x5dfb1b=(_0x16fb1b=this[_0x20ea64(0x173)][_0x20ea64(0x14c)]({'unitId':_0x23c43a,'subUnitId':_0x9b3df6,'drawingId':_0x42729c}))==null?void 0x0:_0x16fb1b['transform'];if(!_0x5dfb1b)return;let _0x41ae05=_0x5dfb1b['left']!==_0x22a34d[_0x20ea64(0x17f)]||_0x5dfb1b[_0x20ea64(0x157)]!==_0x22a34d[_0x20ea64(0x157)],_0xda8c66=_0x5dfb1b[_0x20ea64(0x152)]!==_0x22a34d[_0x20ea64(0x152)]||_0x5dfb1b[_0x20ea64(0x178)]!==_0x22a34d['height'],_0x10c29e=_0x5dfb1b[_0x20ea64(0x153)]!==_0x22a34d[_0x20ea64(0x153)]||_0x5dfb1b[_0x20ea64(0x187)]!==_0x22a34d[_0x20ea64(0x187)],_0x39c8a1=_0x5dfb1b[_0x20ea64(0x1a1)]!==_0x22a34d[_0x20ea64(0x1a1)];if(_0x41ae05&&!_0xda8c66&&!_0x10c29e&&!_0x39c8a1){var _0xa8fde5,_0x377d13,_0x161284,_0x4dde54;let _0x314b59=((_0xa8fde5=_0x22a34d[_0x20ea64(0x17f)])==null?0x0:_0xa8fde5)-((_0x377d13=_0x5dfb1b[_0x20ea64(0x17f)])==null?0x0:_0x377d13),_0x5a63e0=((_0x161284=_0x22a34d[_0x20ea64(0x157)])==null?0x0:_0x161284)-((_0x4dde54=_0x5dfb1b['top'])==null?0x0:_0x4dde54),_0x20493e=this[_0x20ea64(0x173)][_0x20ea64(0x184)](_0x23c43a,_0x9b3df6);if(_0x20493e&&_0x20493e[_0x2fb58e]){var _0xfb0a27,_0x4293e8,_0x2eb8c0,_0x1b0489;let _0x375aad=_0x20493e[_0x2fb58e],_0x45d6ef={..._0x375aad[_0x20ea64(0x149)],'left':((_0xfb0a27=(_0x4293e8=_0x375aad[_0x20ea64(0x149)])==null?void 0x0:_0x4293e8[_0x20ea64(0x17f)])==null?0x0:_0xfb0a27)+_0x314b59,'top':((_0x2eb8c0=(_0x1b0489=_0x375aad[_0x20ea64(0x149)])==null?void 0x0:_0x1b0489[_0x20ea64(0x157)])==null?0x0:_0x2eb8c0)+_0x5a63e0},_0xb80d11=_0x12dfb9(_0x45d6ef,_0x46e49e),_0x4bc594=_0x5ecd9d(_0x45d6ef,_0x46e49e),_0x204ec0={'unitId':_0x23c43a,'subUnitId':_0x9b3df6,'drawingType':_0xffd1c5[_0x20ea64(0x18c)],'drawingId':_0x2fb58e,'transform':_0x45d6ef,'sheetTransform':_0xb80d11,'axisAlignSheetTransform':_0x4bc594},{unitId:_0x4fcde8,subUnitId:_0x3025db,undo:_0x33f540,redo:_0x4e9a36,objects:_0x5ec4a2}=this[_0x20ea64(0x173)]['getBatchUpdateOp']([_0x204ec0]);_0x1b17f8['push']({'id':_0xc02322['id'],'params':{'unitId':_0x4fcde8,'subUnitId':_0x3025db,'op':_0x4e9a36,'objects':_0x5ec4a2,'type':_0x122a53[_0x20ea64(0x148)]}}),_0x4d8294[_0x20ea64(0x1b7)]({'id':_0xc02322['id'],'params':{'unitId':_0x4fcde8,'subUnitId':_0x3025db,'op':_0x33f540,'objects':_0x5ec4a2,'type':_0x122a53[_0x20ea64(0x148)]}});}}else{let _0x22ee04=_0x570c5c[_0x20ea64(0x192)](),_0x5d70b7=_0x570c5c['getEndConnectInfo']();this[_0x20ea64(0x12f)](_0x23c43a,_0x9b3df6,_0x2fb58e,_0x570c5c,_0x22ee04,_0x5d70b7,_0x1b17f8,_0x4d8294,_0x42729c,_0x22a34d);}}};le=W([U(0x0,_0x2e35da),U(0x1,_0x58bda7(_0x45fb65)),U(0x2,_0x58bda7(_0x201469)),U(0x3,_0x58bda7(G)),U(0x4,_0x58bda7(_0x297748))],le);let $=class extends _0x267a9d{constructor(_0x2f5d48=ce,_0x1be76e,_0x4aac28,_0x536534){const _0x12334c=_0x512b51;super(),this[_0x12334c(0x139)]=_0x2f5d48,this['_injector']=_0x1be76e,this[_0x12334c(0x150)]=_0x4aac28,this[_0x12334c(0x159)]=_0x536534;let {..._0x1a080b}=_0x5a49a6({},ce,this[_0x12334c(0x139)]);this[_0x12334c(0x159)][_0x12334c(0x13d)](se,_0x1a080b);}[_0x512b51(0x15b)](){const _0x4e176b=_0x512b51;let _0x35211e=this[_0x4e176b(0x191)];[[H],[G],[le]][_0x4e176b(0x1cc)](_0x1fe2d5=>_0x35211e[_0x4e176b(0x1c0)](_0x1fe2d5)),_0x335bd8(_0x35211e,[[G],[le]]);}};function _0x2bd3(){const _0x35a3ed=['flipY','getCellIndexAndOffsetByPosition','shapeId','range','_initCommandInterceptor','DRAWING_SHAPE','relation','REMOVE','keys','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','_injector','getStartConnectInfo','isHorizontal','244936Georss','sheet.mutation.remove-shape','prototype','_sheetsShapeService','fromJSON','sheet.mutation.update-shape-data','pluginName','object','disposeWithMe','sheet.command.set-shape-rotate','params','filter','cxnIndex','angle','getBasicShapeType','onCommandExecute','interceptCommand','position','lineShapeId','index','sheet.command.set-shape-drawing-data','rotateEnabled','0.23.0-insiders.20260522-e8f2a3b','startY','string','INSERT','_initSnapshot','2shdLHD','decorate','getBatchAddOp','setShapeType','_shapeModelManagerMap','from','_sheetSkeletonService','insertShape','push','getLineShapeRelation','sheet.command.toggle-shape-flip','adjustValues','find','_initCommands','_deserializeShapeForUnit','default','has','add','packageName','getSkeleton','getBasicShapeRelation','_linesIds','5371580AuLGui','stringify','_getConnectPointInfo','lineType','@univerjs-pro/sheets-shape','preRedos','updateContext','forEach','sheets-shape.config','_addLineRerouteUpdates','getAdjustValueByName','redos','27930339BeBvWF','8584752cpLhpl','getConnectionSiteList','SHEET_SHAPE_PLUGIN','syncExecuteCommand','_shapes','delete','_config','resizeEnabled','sheet.mutation.update-shape-type','dispose','setConfig','preUndos','worldRect','Fail\x20to\x20get\x20shape\x20model,\x20get:\x20','data','3605931fUIvHU','function','COMMAND','hasShape','call','removeShape','UPDATE','transform','registerCommand','removeLinePoints','getDrawingByParam','_serializeShapeForUnit','getShapeModel','setShapeData','_commandService','_addLineFollowShapeUpdates','width','flipX','getBatchUpdateOp','type','getShapeType','top','getAdjustNames','_configService','fill','onStarting','getShapeData','defineProperty','pushUndoRedo','sheet.command.insert-shape','getCellWithCoordByIndex','cos','getShapeTextData','_resourcesManagerService','toPrimitive','drawingType','clear','ensureSkeleton','_sheetInterceptorService','_ensureShapeModelManager','undos','registerPluginResource','6100728RPJAqs','iterator','3132867ZiwptR','entries','toJSON','4FMgxHZ','symbol','_drawingManagerService','get','result','length','getShapeDataById','height','UNIVER_SHEET','MUTATION','set','startX','parse','_groupIds','left','constructor','sin','borderEnabled','getShapeRelation','getDrawingData','ang','getEndConnectInfo'];_0x2bd3=function(){return _0x35a3ed;};return _0x2bd3();}function _0x179d(_0x3c4983,_0x1ed318){_0x3c4983=_0x3c4983-0x12f;const _0x2bd31f=_0x2bd3();let _0x179d9b=_0x2bd31f[_0x3c4983];return _0x179d9b;}V($,_0x512b51(0x155),_0x42d255[_0x512b51(0x179)]),V($,_0x512b51(0x19a),'SHEET_SHAPE_PLUGIN'),V($,_0x512b51(0x1c1),ae),V($,'version',oe),$=W([_0x2fb975(_0x51b0d2),U(0x1,_0x58bda7(_0xd2222d)),U(0x2,_0x2e35da),U(0x3,_0x41dbf0)],$);export{L as DEFAULT_SHAPE_HEIGHT,I as DEFAULT_SHAPE_WIDTH,J as InsertShapeCommand,K as InsertSheetsShapeMutation,q as RemoveSheetsShapeMutation,ee as SetShapeDrawingDataCommand,X as SetSheetsShapeRotateCommand,Z as SetSheetsShapeTextVerticalToggleCommand,G as SheetsShapeService,te as ToggleSheetsShapeFlipCommand,$ as UniverSheetsShapePlugin,ne as UpdateConnectorRelationCommand,re as UpdateLineShapeResizeCommand,Y as UpdateSheetsShapeDataMutation,ie as UpdateSheetsShapeTypeCommand,Q as UpdateSheetsShapeTypeMutation};
@@ -1,6 +1,6 @@
1
- export { type IInsertSheetsShapeCommandParams, InsertShapeCommand } from './commands/command/add-shape-command';
2
- export { type ISetShapeDrawingDataCommandParams, SetShapeDrawingDataCommand } from './commands/command/set-shape-drawing-data-command';
3
- export { type IUpdateSheetsShapeFlipCommandParams, ToggleSheetsShapeFlipCommand } from './commands/command/set-shape-flip-command';
1
+ export { type IInsertSheetsShapeCommandParams, InsertShapeCommand } from './commands/command/add-shape.command';
2
+ export { type ISetShapeDrawingDataCommandParams, SetShapeDrawingDataCommand } from './commands/command/set-shape-drawing-data.command';
3
+ export { type IUpdateSheetsShapeFlipCommandParams, ToggleSheetsShapeFlipCommand } from './commands/command/set-shape-flip.command';
4
4
  export { type IUpdateSheetsShapeRotateCommandParams, SetSheetsShapeRotateCommand } from './commands/command/set-shape-rotate.command';
5
5
  export { type ISetSheetsShapeTextVerticalToggleCommandParams, SetSheetsShapeTextVerticalToggleCommand } from './commands/command/set-shape-text-vertical-toggle.command';
6
6
  export { type IUpdateConnectorRelationCommandParams, UpdateConnectorRelationCommand } from './commands/command/update-connector-relation.command';