@grapecity-software/spread-sheets-shapes
Version:
SpreadJS Shape plugin
12 lines • 920 kB
JavaScript
/*!
*
* SpreadJS Library 18.2.5
*
* Copyright(c) GrapeCity Software inc. All rights reserved.
*
* Licensed under the SpreadJS Commercial License.
* info.xa@grapecity.com
* https://www.grapecity.com.cn/developer/spreadjs
*
*/
!function(t){"object"==typeof module&&"object"==typeof module.exports?module.exports=t(require("@grapecity-software/spread-sheets")):"function"==typeof define&&define.amd?define(["@grapecity-software/spread-sheets"],t):"object"==typeof exports?exports.Spread=t(require("@grapecity-software/spread-sheets")):t(GC)}((function(t){!function(){"use strict";var V,n={"./dist/plugins/shape/cameraShape.js":function(t,V,n){var i,e,r,c,o,s,d,a,h,u,x,f,y,l,g=this&&this.qKr||(A=function(t,V){return A=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,V){t.__proto__=V}||function(t,V){for(var n in V)Object.prototype.hasOwnProperty.call(V,n)&&(t[n]=V[n])},A(t,V)},function(t,V){if("function"!=typeof V&&null!==V)throw new TypeError("Class extends value "+String(V)+" is not a constructor or null");function n(){this.constructor=t}A(t,V),t.prototype=null===V?Object.create(V):(n.prototype=V.prototype,new n)}),A;function p(t){return!!v(t)}function v(t){var V=t.nvPicPr.cNvPicPr,n=V&&V.extLst;return(0,e.findSJSExt)(n,(function(t){return!!t.cameraTool}))}function w(t){var V,n,i,e=t.eJ,r=t.Zc,c=e.shapes.all();for(V=0,n=c;V<n.length;V++)if((i=n[V]).name().toLowerCase()===r.toLowerCase())return i.ctV;return null}Object.defineProperty(V,"__esModule",{value:!0}),V.CameraShapeData=V.isCameraShapeNode=void 0,i=n("FloatingObject"),e=n("./dist/plugins/shape/shape.js"),r=n("Common"),c=n("./dist/plugins/shape/drawingInterface.js"),o=n("./dist/plugins/shape/ui/util.js"),s=n("Core"),d=s.util.n1,a=s.util.vo,V.isCameraShapeNode=p,h="data:image/bmp;base64,Qk1CAAAAAAAAAD4AAAAoAAAAAQAAAAEAAAABAAEAAAAAAAQAAADDDgAAww4AAAAAAAAAAAAAAAAAAP///wCAAAAA",u=i.Drawing.ARGBColor,x=r.Common.lt.ht,f=999,y=void 0,l=function(t){function V(V,n,i,e,r,c,o){var s,d=t.call(this,V,n,e,r,c,o)||this;return d.ttV=3,d.IeV=!1,(s=d).VtV="openUrl",s.ntV=f,s.Range=i,s.etV=!0,s.InitShapeFormat(),s.itV=0,d}return g(V,t),Object.defineProperty(V.prototype,"Type",{get:function(){return c.ShapeType.AutoShape},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"isRangeContainsImage",{get:function(){return this.IeV},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"Range",{get:function(){return this.Z5},set:function(t){this.Z5=t},enumerable:!1,configurable:!0}),V.prototype.QVV=function(t){var V=this,n=!V.AnV&&t;V.AnV=t,V.IeV=V.FeV(),n&&V.rtV===y&&0!==V.width&&0!==V.height&&(V.rtV=V.dtV())},V.prototype.dtV=function(){var t,V=this,n=V.AnV,i=V.eJ.zoom();if(n)return t=n.sheet.reV(n.cellRange),V.width===t.width/i&&V.height===t.height/i},V.prototype.FeV=function(){var t,V,n,i,e,r,c,o,s,d=this,a=d.AnV;if(a)for(V=(t=a.cellRange.row)+a.cellRange.rowCount-1,i=(n=a.cellRange.col)+a.cellRange.colCount-1,e=a.sheet,r=t;r<=V;r++)for(c=n;c<=i;c++){if((o=e.getValue(r,c))&&"SparklineExValue"===o.typeName&&o.value&&o.value.isBarcode)return!0;if((s=e.getCell(r,c)).backgroundImage())return!0}},V.prototype.InitShapeFormat=function(){var t=this;t.InitFillFormat(),t.InitLineFormat()},V.prototype.FromOOModel=function(V){var n=this;t.prototype.FromOOModel.call(this,V),n.FromCT_ShapeBase(V.pic),!1===V.isVisible&&(n._hidden=!0)},V.prototype.FromSJSOOModel=function(V,n){var i;t.prototype.FromSJSOOModel.call(this,V,n),this.FromSJSCT_ShapeBase(V)},V.prototype.ToOOModel=function(V,n){var i=this,e=t.prototype.ToOOModel.call(this,V);return e.pic=i.ToCT_ShapeBase(V,n),e},V.prototype.ToSJSOOModel=function(V,n){t.prototype.ToSJSOOModel.call(this,V,n),V.pic=this.ToSJSCT_ShapeBase(n)},V.prototype.FromCT_ShapeBase=function(t){var V,n;t&&(n=(V=this).otV=t,V.etV=!0,V.rtV=y,V.VtV=t.dblClickCommand,t.cellRange&&(V.Range=t.cellRange),V.FromCT_ShapeNonVisual(n.nvPicPr),V.FromCT_ShapeStyle(n.blipFill),V.FromCT_ShapeProperties(n.spPr),V.AutoShapeType=f)},V.prototype.FromSJSCT_ShapeBase=function(t){var V,n;t&&((V=this).etV=!0,V.rtV=y,V.FromSJSCT_ShapeNonVisual(t.nvPicPr),V.atV(t.style,t),V.stV(t.spPr),V.AutoShapeType=f,(n=t.lossless)&&(V.VtV=n.dblClickCommand))},V.prototype.ToCT_ShapeBase=function(t,V){var n,i=this;return(n=(t=!1!==t)&&i.otV||{shapeType:1}).cellRange=i.htV(null==V?void 0:V.newWorkSheetName),n.dblClickCommand=i.VtV,n.nvPicPr=i.ToCT_ShapeNonVisual(t,V),n.spPr=i.ToCT_ShapeProperties(c.ShapeUtility.ToST_ShapeType(1),n.spPr||{},0!==i.AutoShapeType,t),n.spPr.prstGeom&&(n.blipFill={},n.blipFill.stretch={},n.blipFill.stretch.fillRect={}),n},V.prototype.ToSJSCT_ShapeBase=function(t){var V=this,n=V.ToSJSCT_ShapeNonVisual(t),i=V.ToSJSCT_ShapeProperties(c.ShapeUtility.ToST_ShapeType(1),!0),e=V.ToSJSCameraShapeBlipFill(),r={dblClickCommand:V.VtV};return{nvPicPr:n,blipFill:e,spPr:i,lossless:r}},V.prototype.ToCT_ShapeNonVisual=function(t,V){var n=this,i=n.otV,e=!1!==t&&i&&i.nvPicPr||{},r=e.cNvPr||{};return e.cNvPr=n.ToCT_NonVisualDrawingProps(r,V),e.cNvPicPr=n.ToCT_NonVisualDrawingShapeProps(e.cNvPicPr||{},null==V?void 0:V.newWorkSheetName),e},V.prototype.ToSJSCT_ShapeNonVisual=function(t){var V=this,n=V.ToSJSCT_NonVisualDrawingProps(),i=V.ToSJSCT_NonVisualDrawingShapeProps(t);return{cNvPr:n,cNvPicPr:i}},V.prototype.FromCT_ShapeNonVisual=function(t){var V=this;t&&(V.FromCT_NonVisualDrawingProps(t.cNvPr),V.FromCT_NonVisualDrawingShapeProps(t.cNvPicPr))},V.prototype.FromSJSCT_ShapeNonVisual=function(t){var V=this;t&&(V.FromSJSCT_NonVisualDrawingProps(t.cNvPr),V.FromSJSCT_NonVisualDrawingShapeProps(t.cNvPicPr))},V.prototype.FromCT_NonVisualDrawingShapeProps=function(t){var V,n=this;t&&(t.extLst&&t.extLst.ext&&(V=t.extLst.ext[0].cameraTool)&&(n.Z5=V.cellRange),n.FromAG_Locking(t&&t.picLocks))},V.prototype.FromSJSCT_NonVisualDrawingShapeProps=function(t){var V=this,n=t&&t.extLst,i=(0,e.findSJSExt)(n,(function(t){return!!t.cameraTool}));i&&(V.Z5=d(i.cameraTool.cellRange)),V.FromSJSAG_Locking(t&&t.picLocks)},V.prototype.htV=function(t){var V,n,i,e=this,r=(0,o.getRangeInfo)(e.eJ,e.Range);return x(t)||r.sheet.name()!==e.eJ.name()?e.Range:(n=(V=w(e)).getService(),i=V.id,n.setFormula(i,"range",e.Range),n.getFormula(i,"range",t))},V.prototype.ToCT_NonVisualDrawingShapeProps=function(t,V){var n,i=this,e=i.htV(V);return t.picLocks=i.ToAG_Locking(t.picLocks||{}),t.picLocks.noChangeArrowheads=!0,t.extLst={ext:[]},n={cameraTool:{cellRange:e,spid:i.toV}},t.extLst.ext.push(n),t},V.prototype.ToSJSCT_NonVisualDrawingShapeProps=function(t){var V=this,n=V.htV(t);return{picLocks:V.ToSJSAG_Locking({noChangeArrowheads:e.SJS_True}),extLst:{ext:[{uri:"{84589F7E-364E-4C9E-8A38-B11213B215E9}",cameraTool:{cellRange:a(n)}}]}}},V.prototype.ToSJSCameraShapeBlipFill=function(){var t={r_:[8],blipBlob:{blob:h}},V={fillRect:{}};return{blip:t,stretch:V}},V.prototype.InitFillFormat=function(){var t=this.S0t;t.Color.ColorType=2,t.Color.RGB=u.FromRgb(255,255,255),t.PatternColor.ColorType=3,t.PatternColor.ObjectThemeColor=0},V.prototype.InitLineFormat=function(){var t=this.Line;t.Color.ColorType=2,t.Color.RGB=u.FromRgb(0,0,0),t.Weight=.75,t.PatternColor.RGB=u.FromRgb(0,0,0)},V}(e.ShapeBaseData),V.CameraShapeData=l},"./dist/plugins/shape/cameraShapeView.js":function(t,V,n){var i,e,r,c,o,s,d,a,h,u,x,f,y,l,g,A,p,v=this&&this.qKr||(w=function(t,V){return w=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,V){t.__proto__=V}||function(t,V){for(var n in V)Object.prototype.hasOwnProperty.call(V,n)&&(t[n]=V[n])},w(t,V)},function(t,V){if("function"!=typeof V&&null!==V)throw new TypeError("Class extends value "+String(V)+" is not a constructor or null");function n(){this.constructor=t}w(t,V),t.prototype=null===V?Object.create(V):(n.prototype=V.prototype,new n)}),w;Object.defineProperty(V,"__esModule",{value:!0}),V.CameraShape=void 0,i=n("FloatingObject"),e=n("./dist/plugins/shape/drawingInterface.js"),r=n("./dist/plugins/shape/shape.interface.js"),c=n("./dist/plugins/shape/cameraShape.js"),o=n("./dist/plugins/shape/ui/util.js"),s=n("./dist/plugins/shape/shapeView.js"),d=n("./dist/plugins/shape/util/viewUtil.js"),a=n("./dist/plugins/shape/shapeStyleView.js"),h=e.ShapeUtility.syncShapeOptions,u=i.Drawing.UnitHelper.IsNullOrEmpty,x=void 0,f=999,y="range",l="rotate",g="angle",A="style",p=function(t){function V(V,n,i,e,o,s,d){var a,h,f=t.call(this)||this;return f.ttV=1,a=f,h=n&&V.eeV(n)||V.eeV("Picture ",!0),a.Mf=V,a.ytV=new c.CameraShapeData(V,h,i,e||0,o||0,s||200,d||160),s===x&&d===x&&(a.ytV.rtV=!0),a.yiV=r.ResizeMode.aspect,a.ytV.noChangeAspect=!0,a.RiV=!0,u(i)||(a.tnV(),a.Fct(i,!0)),delete a.RiV,f}return v(V,t),Object.defineProperty(V.prototype,"zIndex",{get:function(){var t=this;if(t.mnV)return t.mnV.zIndex(t.name())},enumerable:!1,configurable:!0}),V.prototype.tnV=function(){var t,V,n,i,r,c,o=this,s=o.Mf,a=s.zoom();o.VnV=!0,t=o.ytV,V=s.shapeLayers[0],(n=o.aiV)||(i=(0,d.getBuiltInShapeModelWhenInit)(t,e.AutoShapeType.rectangle,a)),r=(0,d.removeOldShapeUIWhenInitShapeUI)(o,V),h(i,t,V,n),(c=V.createCameraShape(i)).ttV=3,c.getShapeCenter(),c.hyperlink=t.ku,o.ZnV(c.id),t.ltV&&(o.flipX=!0),t.gtV&&(o.flipY=!0),(0,d.addNewShapeUIWhenInitShapeUI)(o,c,V,r),delete o.VnV},V.prototype.rsV=function(t){var V=this;t&&(t.angle&&V.rotate(t.angle),t.line&&V.j0V(t.line),t.fill&&V.VeV(t.fill))},V.prototype.rotate=function(t){var V=this;if((0,d.noArguments)(arguments))return V.ytV.Rotation;(0,d.rotateImp)(V,t)},V.prototype.style=function(t){var V,n,i,e=this;if((0,d.noArguments)(arguments))return e.getStyle(!0,!1);V=e.style(),e.DT("style",t),(n=t.fill)&&((0,d.adjustTransparentColor)(n),e.VeV(n)),(i=t.line)&&((0,d.adjustTransparentColor)(i),e.j0V(i)),e.enV("style",V),e.refresh()},V.prototype.getStyle=function(t,V){var n=this,i=new a.ShapeStyle;return i.fill=n.n0V(t,V),i.line=n.ydV(t,V),delete i.textEffect,delete i.textFrame,i},V.prototype.range=function(t){var V=this,n=V.ytV;if((0,d.noArguments)(arguments))return n.Range;V.Fct(t)},V.prototype.Fct=function(t,V){var n,i,e;void 0===V&&(V=!1),((e=(i=(n=this).ytV).Range)!==t||V)&&(n.DT("range",t),(0,o.setFormulaImp)(n,y,t,!0,!0),i.Range=(0,d.getFormula)(n,y)||t,this.usV("cameraCellRange",{value:t,oldValue:e}),n.ctV&&n.ctV.JrV(),n.mtV(),n.refresh())},V.prototype.GrV=function(t){var V=this,n=V.ytV.Range,i=(0,o.convertCalcReferenceToRangeInfo)(t,V.Mf);V.ytV.Range=(0,d.getFormula)(V,"range"),this.usV("cameraCellRange",{value:t,oldValue:n}),V.ytV.QVV(i),V.mtV(),V.sft&&V.sft.updateGroup(),V.ctV&&V.ctV.JrV()},V.prototype.mtV=function(){var t,V,n,i=this,e=i.ytV,r=e.AnV,c=i.Mf.zoom();e.rtV&&(r?(V=(t=r.sheet.reV(r.cellRange)).width>0?t.width/c:200,n=t.height>0?t.height/c:160,i.$l(V,n,!0)):"#REF!"===e.Range&&i.$l(0,0,!0))},V.prototype.type=function(){if((0,d.noArguments)(arguments))return f},V.prototype.postProcessShapeDataToJson=function(V,n){var i,e,r,c,o,s,d=this,a=d.ctV;function h(t,V,n){t.vmlStyle=V,t.anchor=n,t.cameraTool=!0,t.size={width:a.width,height:a.height}}t.prototype.postProcessShapeDataToJson.call(this,V),i=.75*a.left,e=.75*a.top,r=.75*a.width,c=.75*a.height,o=[d.startColumn(),d.startColumnOffset(),d.startRow(),d.startRowOffset(),d.endColumn(),d.endColumnOffset(),d.endRow(),d.endRowOffset()].toString(),s="position:absolute;margin-left:".concat(i,"pt;margin-top:").concat(e,"pt;width:").concat(r,"pt;height:").concat(c,"pt;z-index:").concat(d.zIndex+1,";visibility:visible;mso-wrap-style:square;"),h(n?V:V.shapeData.pic,s,o)},V.prototype.formulaFromJSON=function(V){var n,i,e,r;t.prototype.formulaFromJSON.call(this,V),(n=this).Fct(n.ytV.Range,!0),n.JrV(),i=n.ytV.AnV,e=n.Mf,i&&i.sheet&&e&&(r=i.sheet,V&&r!==e&&r.nre&&(r.nre(),n.afterRefSheetLazyLoaded()))},V.prototype.afterRefSheetLazyLoaded=function(){this.JrV()},V.prototype.OiV=function(t){return t.nvPicPr.cNvPr},V.prototype.DiV=function(t){return t.pic},V.prototype.doubleClickCommand=function(t){var V,n=this,i=n.ytV;if((0,d.noArguments)(arguments))return i.VtV;V=i.VtV,n.DT("doubleClickCommand",t),i.VtV=t,n.usV("cameraDoubleClickCommand",{value:t,oldValue:V})},V.prototype.QiV=function(t){var V=this;return t===l?(0,d.getFormula)(V,g):t.substr(0,5)===A?(0,d.getStyleFormula)(V,t,!1):""},V.prototype.ziV=function(t,V){var n=this;t===l?n.rotate(V):t.substring(0,5)===A&&(0,d.setStyleFormula)(n,t,V,!1)},V.prototype.WiV=function(t){return new V(t)},V.prototype.sdV=function(){t.prototype.sdV.call(this),this.JrV()},V.prototype.urV=function(){t.prototype.urV.call(this),this.JrV()},V.prototype.JrV=function(){var t=this.ctV;t&&(t.cameraImageCache=null)},V}(s.ShapeBase),V.CameraShape=p},"./dist/plugins/shape/connector.js":function(t,V,n){var i,e,r,c,o,s,d,a,h,u,x,f=this&&this.qKr||(y=function(t,V){return y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,V){t.__proto__=V}||function(t,V){for(var n in V)Object.prototype.hasOwnProperty.call(V,n)&&(t[n]=V[n])},y(t,V)},function(t,V){if("function"!=typeof V&&null!==V)throw new TypeError("Class extends value "+String(V)+" is not a constructor or null");function n(){this.constructor=t}y(t,V),t.prototype=null===V?Object.create(V):(n.prototype=V.prototype,new n)}),y;function l(t,V,n){var i,e,r,c;for(V=n[V]||V,i=0,e=t.length;i<e;i++){if((r=t[i]).Id===V)return r;if(r.GroupItems&&(c=l(r.GroupItems.Items,V,n)))return c}}function g(t,V){var n,i,e,r;for(n=0,i=t;n<i.length;n++){if((e=i[n]).jKe()===V)return e;if(e.GroupItems&&(r=g(e.GroupItems.Items,V)))return r}}function A(t,V,n){if(V)return V.__ID__?g(t,V.__ID__):l(t,V.id,n)}Object.defineProperty(V,"__esModule",{value:!0}),V.ConnectorShapeData=V.ConnectorFormatData=void 0,i=n("./dist/plugins/shape/shape.js"),e=n("./dist/plugins/shape/drawingInterface.js"),r=n("./dist/plugins/shape/shapeStyle.js"),c=n("FloatingObject"),o=n("./dist/plugins/shape/geometryService/controlPointService.js"),s=n("./dist/plugins/shape/util/sheetUtil.js"),d=Math.min,a=Math.abs,h=.5*o.ADJUSTMENT_UNIT,u=function(){function t(t,V){this.utV=-1,this.xtV=-1,this.eJ=t,this.ytV=V}return Object.defineProperty(t.prototype,"DrawingType",{get:function(){return 3},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"BeginConnected",{get:function(){return this.wtV},set:function(t){this.wtV=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"BeginConnectedShape",{get:function(){var t=this.wtV;return t&&this.eJ.shapes.get(t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"BeginConnectionSite",{get:function(){return this.utV},set:function(t){this.utV=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"EndConnected",{get:function(){return this.ptV},set:function(t){this.ptV=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"EndConnectedShape",{get:function(){var t=this.ptV;return t&&this.eJ.shapes.get(t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"EndConnectionSite",{get:function(){return this.xtV},set:function(t){this.xtV=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Type",{get:function(){return this._type},set:function(t){this._type=t},enumerable:!1,configurable:!0}),t.prototype.fromStartCxn=function(t,V,n){var i,e,r;t&&(e=(i=this).eJ,i.utV=t.idx,(r=A(V,t,n))?i.wtV=r.Name:e.LtV.push({target:i,beginId:t.id,beginUUID:t.__ID__,beginConnectionSite:t.idx}))},t.prototype.fromEndCxn=function(t,V,n){var i,e,r;t&&(e=(i=this).eJ,i.xtV=t.idx,(r=A(V,t,n))?i.ptV=r.Name:e.LtV.push({target:i,endId:t.id,endUUID:t.__ID__,endConnectionSite:t.idx}))},t.prototype.FromOOModel=function(t){var V=this,n=V.eJ,i=n.shapeLayers[0].model.idMaps,e=n.shapes.all().map((function(t){return t.ytV}));t.stCxn&&V.fromStartCxn(t.stCxn,e,i),t.endCxn&&V.fromEndCxn(t.endCxn,e,i)},t.prototype.FromSJSOOModel=function(t){var V,n,e,r,c=this,o=c.eJ,s=o.shapeLayers[0].model.idMaps,d=o.shapes.all().map((function(t){return t.ytV})),a=t.stCxn,h=t.endCxn;a&&(V=(0,i.getAttributeValueOrDefaultOfIntType)(a.idx),n=(0,i.getAttributeValueOrDefaultOfIntType)(a.id),c.utV=V,(e=l(d,n,s))?c.wtV=e.Name:o.LtV.push({target:c,beginId:n,beginConnectionSite:V})),h&&(V=(0,i.getAttributeValueOrDefaultOfIntType)(h.idx),n=(0,i.getAttributeValueOrDefaultOfIntType)(h.id),c.xtV=V,(r=l(d,n,s))?c.ptV=r.Name:o.LtV.push({target:c,endId:n,endConnectionSite:V}))},t.prototype.toStartCxnInfo=function(t){var V,n,i=this,e=i.wtV;if(e&&(V=i.eJ.shapes.get(e)))return n={idx:i.utV},t&&t.isServer?n.__ID__=V.jKe():n.id=V.ytV.Id,n},t.prototype.toEndCxnInfo=function(t){var V,n,i=this,e=i.ptV;if(e&&(V=i.eJ.shapes.get(e)))return n={idx:i.xtV},t&&t.isServer?n.__ID__=V.jKe():n.id=V.ytV.Id,n},t.prototype.ToOOModel=function(t){return{stCxn:this.toStartCxnInfo(t),endCxn:this.toEndCxnInfo(t)}},t.prototype.ToSJSOOModel=function(){var t,V=this,n={},i=V.eJ.shapes,e=V.wtV;return e&&(t=i.get(e))&&(n.stCxn={idx:V.utV,id:t.ytV.Id}),(e=V.ptV)&&(t=i.get(e))&&(n.endCxn={idx:V.xtV,id:t.ytV.Id}),n},t}(),V.ConnectorFormatData=u,x=function(t){function V(V,n,i,e,r,c,o){var s,h=t.call(this,V,n,d(e,c),d(r,o),a(e-c),a(r-o))||this;return h.ttV=1,(s=h).ftV=2,s.ltV=e>c,s.gtV=r>o,s.AtV=new u(V,s),s.ConnectorFormat.Type=i,s.InitLineFormat(),s.InitFillFormat(),s.PointNum=s.GetPointNumByType(i),h}return f(V,t),Object.defineProperty(V.prototype,"ConnectorFormat",{get:function(){return this.AtV},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"Connector",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"Type",{get:function(){return 0},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"AutoShapeType",{get:function(){return this.ntV},set:function(t){this.ntV=t},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"PointNum",{get:function(){return this.ftV},set:function(t){this.ftV=t,this.rdV(t-2)},enumerable:!1,configurable:!0}),V.prototype.rdV=function(t){var V,n=[];for(V=0;V<t;V++)n.push([o.ADJUSTMENT_NAME_PREFIX+(V+1),h]);this.idV=n},V.prototype.ToOOModel=function(V,n){V=!1!==V;var i=t.prototype.ToOOModel.call(this,V);return i.cxnSp=this.ToCT_ShapeBase(V,n),i},V.prototype.ToSJSOOModel=function(V,n){t.prototype.ToSJSOOModel.call(this,V,n),V.cxnSp=this.ToSJSCT_ShapeBase()},V.prototype.FromOOModel=function(V){var n=this;t.prototype.FromOOModel.call(n,V),n.FromCT_ShapeBase(V.cxnSp),!1===V.isVisible&&(n._hidden=!0)},V.prototype.FromSJSOOModel=function(V,n){var i=this;t.prototype.FromSJSOOModel.call(this,V,n),i.FromSJSCT_ShapeBase(V)},V.prototype.ToCT_ConnectorNonVisual=function(t,V){var n,i,e,r=this;return i=(n=(t=!1!==t)&&r.jtV&&r.jtV.nvCxnSpPr||{}).cNvPr||{},n.cNvPr=r.ToCT_NonVisualDrawingProps(i,V),n.cNvCxnSpPr=r.ConnectorFormat.ToOOModel(V),(e=n.cNvCxnSpPr).cxnSpLocks=r.ToAG_Locking(e.cxnSpLocks||{}),n},V.prototype.ToSJSCT_ConnectorNonVisual=function(){var t,V=this,n={};return n.cNvPr=V.ToSJSCT_NonVisualDrawingProps(),n.cNvCxnSpPr=V.ConnectorFormat.ToSJSOOModel(),(t=n.cNvCxnSpPr).cxnSpLocks=V.ToSJSAG_Locking(t.cxnSpLocks||{}),n},V.prototype.FromCT_ConnectorNonVisual=function(t){var V,n=this,i=t.cNvPr;n.btV(i.name),n.Id=i.id,n.Visible=!i.hidden,n.ku=i.hlinkClick,n.UKn(i.__ID__),n.AtV.FromOOModel(t.cNvCxnSpPr),V=t.cNvCxnSpPr,n.FromAG_Locking(V&&V.cxnSpLocks)},V.prototype.FromSJSCT_ConnectorNonVisual=function(t){var V,n=this,i=t.cNvPr;n.FromSJSCT_NonVisualDrawingProps(i),n.AtV.FromSJSOOModel(t.cNvCxnSpPr),V=t.cNvCxnSpPr,n.FromSJSAG_Locking(V&&V.cxnSpLocks)},V.prototype.FromCT_ShapeBase=function(t){var V,n=this,i=n.jtV=t;n.FromCT_ConnectorNonVisual(i.nvCxnSpPr),V=i.spPr.prstGeom.prst,n.AtV.Type=e.ShapeUtility.ToConnectorType(V),n.PointNum=e.ShapeUtility.GetConnectorPointNum(V),n.FromCT_ShapeStyle.call(n,i.style),n.FromCT_ShapeProperties.call(n,i.spPr)},V.prototype.FromSJSCT_ShapeBase=function(t){var V,n=this;n.FromSJSCT_ConnectorNonVisual(t.nvCxnSpPr),V=e.ST_ShapeType[t.spPr.prstGeom.prst],n.AtV.Type=e.ShapeUtility.ToConnectorType(V),n.PointNum=e.ShapeUtility.GetConnectorPointNum(V),n.atV(t.style,t),n.stV(t.spPr)},V.prototype.ToCT_ShapeBase=function(t,V){var n,i,r=this;return(n=(t=!1!==t)&&r.jtV||{shapeType:4}).nvCxnSpPr=r.ToCT_ConnectorNonVisual(t,V),i=n.spPr||{},n.spPr=r.ToCT_ShapeProperties(e.ShapeUtility.ToConnectorST_ShapeType(r.ConnectorFormat.Type,r.PointNum),i,!0,t),r.CorrectCT_Transform2D(n.spPr.xfrm),n.style=r.ToCT_ShapeStyle(t),n},V.prototype.ToSJSCT_ShapeBase=function(){var t=this,V={};return V.nvCxnSpPr=t.ToSJSCT_ConnectorNonVisual(),V.spPr=t.ToSJSCT_ShapeProperties(e.ShapeUtility.ToConnectorST_ShapeType(t.ConnectorFormat.Type,t.PointNum),!0),V.style=t.ToSJSCT_ShapeStyle(),V},V.prototype.CorrectCT_Transform2D=function(t){t.flipH=this.ltV,t.flipV=this.gtV},V.prototype.GetPointNumByType=function(t){return 2===t||1===t?3:1},V.prototype.InitLineFormat=function(){var t=this.Line;t.Color.ObjectThemeColor=4,t.Weight=.5,t.PatternColor.RGB=c.Drawing.ARGBColor.FromRgb(255,255,255)},V.prototype.InitFillFormat=function(){this.Fill.Color.ColorType=0},V.prototype.CreateDefaultShapeStyle=function(){return new r.ShapeStyleData(this,0,1,0,1)},V.prototype.mtV=function(){var t,V=this,n=V.eJ;V.height=(0,s.getY)(n,V.bottomAnchorRow,V.bottomAnchorRowOffset)-V.top,t=n.options.rightToLeft?(0,s.getX)(n,V.leftAnchorCol,V.leftAnchorColOffset):(0,s.getX)(n,V.rightAnchorCol,V.rightAnchorColOffset),V.width=t-V.left},V}(i.ShapeBaseData),V.ConnectorShapeData=x},"./dist/plugins/shape/connectorView.js":function(t,V,n){var i,e,r,c,o,s,d,a,h,u,x,f,y,l,g,A,p,v,w,j=this&&this.qKr||(b=function(t,V){return b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,V){t.__proto__=V}||function(t,V){for(var n in V)Object.prototype.hasOwnProperty.call(V,n)&&(t[n]=V[n])},b(t,V)},function(t,V){if("function"!=typeof V&&null!==V)throw new TypeError("Class extends value "+String(V)+" is not a constructor or null");function n(){this.constructor=t}b(t,V),t.prototype=null===V?Object.create(V):(n.prototype=V.prototype,new n)}),b;function L(t,V,n,i,e,r,c,o,s,d){var h=(0,a.flipPoint)(t,V,n,i,e,r,c,o),u=(0,a.rotatePoint)(h,s,d);return{x:(0,a.fixNumber)(u.x),y:(0,a.fixNumber)(u.y)}}function m(t){return t.map((function(t,V){return["adj"+(V+1),(0,r.convertAdjustmentValueToExcelUnit)(t,g,!0)]}))}function C(t,V,n){var i,e,r,c,o,s=t.ytV,d=t.Mf,a=d.THr({type:"updateShapeTransform",sheet:d,shape:t});null===(e=null===(i=d.parent)||void 0===i?void 0:i.suspendOp)||void 0===e||e.call(i),s.left=V.left/n,s.top=V.top/n,s.width=V.width/n,s.height=V.height/n,s.L0t=V.rot,s.ltV=V.flipH,s.gtV=V.flipV,s.ynV(),s.fnV(),null===(c=null===(r=d.parent)||void 0===r?void 0:r.resumeOp)||void 0===c||c.call(r),d.$Dr({type:"updateShapeTransform",sheet:d,shape:t},a),o=t.AsV("adjustments"),s.AdjustValues=m(V.adjs),t.usV("adjustments",{changingContext:o})}function R(t){return 2===t.length?M(t):I(t)}function I(t){var V,n,i,e,r,c,o,s,d,h,u,x,f=t[0],y=t.length,g=t[y-1],A=f.x,p=f.y,w=g.x,j=g.y,b=t[1],L=b.x,m=b.y,C=w-A,R=j-p,I=0,M={x:(A+w)/2,y:(p+j)/2};for((0,a.fixNumber)(A,5)===(0,a.fixNumber)(L,5)?(I=90,V=Math.PI/2):(0,a.fixNumber)(p,5)!==(0,a.fixNumber)(m,5)&&(I=180*(V=Math.atan2(m-p,L-A))/Math.PI,V<0&&(V+=2*Math.PI,I+=360)),I&&(V=-V,A=(f=(t=t.map((function(t){return(0,a.rotatePoint)(t,M,V)})))[0]).x,p=f.y,C=(w=(g=t[y-1]).x)-A,R=(j=g.y)-p),e=(n=C<0)?-1:1,r=(i=R<0)?-1:1,c=l(C),o=l(R),c<v&&(c=v),o<v&&(o=v),s=[],d=0;d<y-3;d++)h=t[d+1],d%2?s.push((h.y-p)/o*r):s.push((h.x-A)/c*e);return{rot:I,left:u=M.x-c/2,top:x=M.y-o/2,width:c,height:o,flipH:n,flipV:i,adjs:s}}function M(t){var V=t[0],n=t[1],i=y(V.x,n.x),e=y(V.y,n.y),r=l(n.x-V.x),c=l(n.y-V.y),o=V.x>n.x,s=V.y>n.y;return{rot:0,left:i,top:e,width:r,height:c,flipH:o,flipV:s,adjs:[]}}Object.defineProperty(V,"__esModule",{value:!0}),V.ConnectorShape=V.getConnectorProperties=V.syncShapeData=void 0,i=n("Common"),e=n("./dist/plugins/shape/drawingInterface.js"),r=n("./dist/plugins/shape/shape.js"),c=n("./dist/plugins/shape/ui/lines.js"),o=n("./dist/plugins/shape/connector.js"),s=n("./dist/plugins/shape/geometryService/controlPointService.js"),d=n("./dist/plugins/shape/shapeView.js"),a=n("./dist/plugins/shape/util/viewUtil.js"),h=n("./dist/plugins/shape/shapeStyleView.js"),u=i.Common.lt,x=u.ht,f=e.ShapeUtility.syncShapeOptions,y=Math.min,l=Math.abs,g=void 0,A={color:"color",linestyle:"lineStyle",width:"width",captype:"capType",jointype:"joinType",transparency:"transparency",compoundtype:"compoundType"},p=["color","linestyle","width","captype","jointype","transparency","compoundtype"],V.syncShapeData=C,v=4/3,V.getConnectorProperties=R,w=function(t){function V(V,n,i,e,r,c,s){var d,a=t.call(this)||this,h=a;return a.ttV=4,d=n&&V.eeV(n)||V.eeV("ConnectorShape ",!0),h.Mf=V,h.ytV=new o.ConnectorShapeData(V,d,i,e,r,c,s),h.RiV=!0,i!==g&&h.tnV(),delete h.RiV,a}return j(V,t),V.prototype.type=function(){if((0,a.noArguments)(arguments))return this.ytV.ConnectorFormat.Type},V.prototype.H0V=function(t){var V,n,i,e,r=this,c=r.ytV.Line;if((0,a.noArguments)(arguments))return{style:c.BeginArrowheadStyle,width:c.BeginArrowheadWidth,length:c.BeginArrowheadLength};x(t)||(V=r.ctV.options.endPoints.beginArrow,n=t.style,i=t.width,e=t.length,x(n)||(c.BeginArrowheadStyle=n,V.type=n),x(i)||(c.BeginArrowheadWidth=i,V.widthType=i),x(e)||(c.BeginArrowheadLength=e,V.lengthType=e))},V.prototype.Q0V=function(t){var V,n,i,e,r=this,c=r.ytV.Line;if((0,a.noArguments)(arguments))return{style:c.EndArrowheadStyle,width:c.EndArrowheadWidth,length:c.EndArrowheadLength};x(t)||(V=r.ctV.options.endPoints.endArrow,n=t.style,i=t.width,e=t.length,x(n)||(c.EndArrowheadStyle=n,V.type=n),x(i)||(c.EndArrowheadWidth=i,V.widthType=i),x(e)||(c.EndArrowheadLength=e,V.lengthType=e))},V.prototype.tnV=function(t){var V,n,i,e,r,c,o,s,d=this,h=d.Mf,u=d.ytV;d.VnV=!0,V=u.ConnectorFormat.Type,n=d.z0V(),e=d.KVV(),r=h.shapeLayers[0],0===V?c="Line":1!==V&&2!==V||(c="ZipLine"),o=h.zoom(),e=e.map((function(t){return{x:t.x*o,y:t.y*o}})),c&&(f(s={points:e,options:n},u,r),(i=r.createLine(c,s)).getShapeCenter(),i.hyperlink=u.ku,i.JVV=d,d.ZnV(i.id)),d.ctV=i,t||(0,a.syncConnectors)([d.startConnector(),d.endConnector()],d),d.gnV(),delete d.VnV},V.prototype.z0V=function(){var t=this,V=t.H0V(),n=t.Q0V();return{stroke:{type:1,color:t.ydV(!1,!1).color,width:1},endPoints:{beginArrow:{type:V.style,widthType:V.width,lengthType:V.length},endArrow:{type:n.style,widthType:n.width,lengthType:n.length}}}},V.prototype.getPoints=function(t){return this.KVV(t)},V.prototype.KVV=function(t){var V,n,i,e,r,c,o,s,d,a=this,h=a.Btn;return h&&!t||(n=(V=a.ytV).left||0,i=V.top||0,e=V.width||0,r=V.height||0,c=V.gtV,o=V.ltV,s=V.ConnectorFormat.Type,d=V.Rotation,0===s?h=a.Btn=a.G0V(i,n,e,r,c,o,d):1!==s&&2!==s||(h=a.Btn=a.J0V(i,n,e,r,c,o,d,V.AdjustValues))),h},V.prototype.G0V=function(t,V,n,i,e,r,c){var o,s,d,h,u,x,f,y;return e&&r?(o=V+n,s=t+i,d=V,h=t):e?(o=V,s=t+i,d=V+n,h=t):r?(o=V+n,s=t,d=V,h=t+i):(o=V,s=t,d=V+n,h=t+i),u={x:V+n/2,y:t+i/2},x=c/180*Math.PI,[f=(0,a.rotatePoint)({x:o,y:s},u,x),y=(0,a.rotatePoint)({x:d,y:h},u,x)]},V.prototype.W0V=function(t,V,n,i,e,r,c,o){var s,d,a;return[s=L(0,0,e,r,V,t,n,i,o,c),d=L(n,0,e,r,V,t,n,i,o,c),a=L(n,i,e,r,V,t,n,i,o,c)]},V.prototype.K0V=function(t,V,n,i,e,r,c,o,s){var d,a,h,u;return s||(s=[.5]),[d=L(0,0,e,r,V,t,n,i,o,c),a=L(n*s[0],0,e,r,V,t,n,i,o,c),h=L(n*s[0],i,e,r,V,t,n,i,o,c),u=L(n,i,e,r,V,t,n,i,o,c)]},V.prototype.$0V=function(t,V,n,i,e,r,c,o,s){var d=L(0,0,e,r,V,t,n,i,o,c),a=L(n*s[0],0,e,r,V,t,n,i,o,c),h=L(n*s[0],i*s[1],e,r,V,t,n,i,o,c),u=L(n,i*s[1],e,r,V,t,n,i,o,c),x=L(n,i,e,r,V,t,n,i,o,c);return[d,a,h,u,x]},V.prototype.tcV=function(t,V,n,i,e,r,c,o,s){var d=L(0,0,e,r,V,t,n,i,o,c),a=L(n*s[0],0,e,r,V,t,n,i,o,c),h=L(n*s[0],i*s[1],e,r,V,t,n,i,o,c),u=L(n*s[2],i*s[1],e,r,V,t,n,i,o,c),x=L(n*s[2],i,e,r,V,t,n,i,o,c),f=L(n,i,e,r,V,t,n,i,o,c);return[d,a,h,u,x,f]},V.prototype.VcV=function(t,V,n,i,e,r,c,o,s){var d;switch(this.ytV.PointNum){case 2:d=this.W0V;break;case 3:d=this.K0V;break;case 4:d=this.$0V;break;case 5:d=this.tcV}return d&&d(t,V,n,i,e,r,c,o,s)},V.prototype.J0V=function(t,V,n,i,e,r,c,o){var d,a={x:V+n/2,y:t+i/2},h=c/180*Math.PI;return o&&o.length>0&&(d=o.map((function(t){return t[1]/s.ADJUSTMENT_UNIT}))),this.VcV(t,V,n,i,e,r,h,a,d)},V.prototype.ncV=function(t){var V,n,i;for(t===g&&(t=this.ctV.getPoints()),V=[],n=0,i=t.length;n<i;n++)V.push({x:t[n].x,y:t[n].y});return V},V.prototype.ecV=function(){var t=[],V=R(this.ncV()),n=V.adjs;return n&&n.length&&n.forEach((function(V,n){t.push(["adj"+(n+1),V])})),t},V.prototype.OiV=function(t){return t.nvCxnSpPr.cNvPr},V.prototype.DiV=function(t){return t.cxnSp},V.prototype.preProcessShapeDataToJson=function(V,n){var i,e,r,c;t.prototype.preProcessShapeDataToJson.call(this,V,n),(i=this).ytV.PointNum=i.Btn.length-1,e=R(i.ncV()),r=i.ctV.angle,isNaN(r)||(e.rot=e.rot+r),c=i.Mf.zoom(),C(i,e,c)},V.prototype.nnV=function(t){var V,n,i,e=this,r=e.ytV,c=e.ncV(e.Btn);e.DT("points",{points:t},{points:c}),V=e.Mf.zoom(),n=e.AsV("presetGeometry"),e.Btn=t,e.ctV.setPoints(e.Btn,V),r.PointNum=e.Btn.length-1,e.usV("presetGeometry",{changingContext:n}),i=R(e.ncV()),C(e,i,V)},V.prototype.adjustments=function(t){var V,n,i,e,r,c,o,s,d,h=this;if((0,a.noArguments)(arguments))return(V=h.ecV())&&V.length>0?V.map((function(t){return t[1]})):[];t&&t.length>0&&h.Btn.length>2&&(n=h.x(),i=h.y(),o={x:n+(e=h.width())/2,y:i+(r=h.height())/2},s=(c=h.ytV.Rotation)/180*Math.PI,d=h.VcV(h.y(),h.x(),h.width(),h.height(),h.ytV.gtV,h.ytV.ltV,s,o,t),h.nnV(d),h.refresh())},V.prototype.QiV=function(t){var V,n,i,e,r,c,o=this;return"style"===t.substr(0,5)&&3===(V=t.split(".")).length&&(n=o.style(),i=V[1],e=V[2],"line"===i&&p.indexOf(e)>-1)?(r=A[e],c=n[i][r],(0,a.isFormula)(c)?c:""):""},V.prototype.ziV=function(t,V){var n,i,e,r,c,o=this;"style"===t.substr(0,5)&&3===(n=t.split(".")).length&&(i=o.style(),e=n[1],r=n[2],"line"===e&&p.indexOf(r)>-1&&(c=A[r],i[e][c]=V),o.style(i))},V.prototype.style=function(t){var V,n,i,e,r,c,o=this;if((0,a.noArguments)(arguments))return o.getStyle(!0,!1);V=o.style(),o.DT("style",t,V),(n=t.line)&&(i=o.AsV("line",o.ytV.Line),e=n.color,x(e)||o.j0V({color:e,lineStyle:n.lineStyle,width:n.width,capType:n.capType,joinType:n.joinType,compoundType:n.compoundType,transparency:n.transparency}),r=n.beginArrowheadStyle,x(r)||o.H0V({style:r,width:n.beginArrowheadWidth,length:n.beginArrowheadLength}),c=n.endArrowheadStyle,x(c)||o.Q0V({style:c,width:n.endArrowheadWidth,length:n.endArrowheadLength}),o.usV("line",{changingContext:i})),o.enV("style",V),o.refresh()},V.prototype.getStyle=function(t,V){var n,i=this,e=new h.ShapeStyle,r=e.line=i.ydV(t,V),c=i.H0V();return r.beginArrowheadStyle=c.style,r.beginArrowheadWidth=c.width,r.beginArrowheadLength=c.length,n=i.Q0V(),r.endArrowheadStyle=n.style,r.endArrowheadWidth=n.width,r.endArrowheadLength=n.length,delete e.fill,delete e.textEffect,delete e.textFrame,e},V.prototype.icV=function(t){var V,n,i=this,e=i.ctV;!i.ignoreLayoutConnection&&t&&t.length&&i.Mf&&(i.Mf.QnV(e),V=i.Mf.zoom(),n=e.getPoints().map((function(t){return{x:t.x/V,y:t.y/V}})),i.nnV(n)),i.refresh()},V.prototype.startConnector=function(t,V){var n,i,e,r,c,o,s,d,h,u=this,x=u.ytV.ConnectorFormat;if((0,a.noArguments)(arguments))return x.BeginConnected?{name:x.BeginConnected,index:x.BeginConnectionSite,shape:x.BeginConnectedShape}:null;n=u.ctV,i=u.startConnector(),u.DT("startConnector",{name:t?t.name:"",index:t?t.index:-1},i?{name:i.name,index:i.index}:null),r=u.AsV("startConnector",x),x.BeginConnected=t?t.name:"",x.BeginConnectionSite=t?t.index:-1,t&&(o=t.index,s=t.name,(d=u.Mf.shapes.get(s))&&(c={id:d.ctV.id,index:o},V||((h=(e=d.ctV.getActualConnectorPoints())[o])?n.moveStartPoint(h.x,h.y):c=null))),n.updateStartConnector(c),u.enV("startConnector",i),u.icV(e),u.usV("startConnector",{changingContext:r})},V.prototype.endConnector=function(t,V){var n,i,e,r,c,o,s,d,h,u=this,x=u.ytV.ConnectorFormat;if((0,a.noArguments)(arguments))return x.EndConnected?{name:x.EndConnected,index:x.EndConnectionSite,shape:x.EndConnectedShape}:null;n=u.ctV,i=u.endConnector(),u.DT("endConnector",{name:x.EndConnected,index:x.EndConnectionSite},i?{name:i.name,index:i.index}:null),r=u.AsV("endConnector",x),x.EndConnected=t?t.name:"",x.EndConnectionSite=t?t.index:-1,t&&(o=t.index,s=t.name,(d=u.Mf.shapes.get(s))&&(c={id:d.ctV.id,index:o},V||((h=(e=d.ctV.getActualConnectorPoints())[o])?n.moveEndPoint(h.x,h.y):c=null))),n.updateEndConnector(c),u.enV("endConnector",i),u.icV(e),u.usV("endConnector",{changingContext:r})},V.prototype.rsV=function(t,V){var n=this;t&&t.line&&n.j0V(t.line)},V.prototype.KiV=function(t){var V=this,n=V.ctV;!1!==(null==t?void 0:t.layoutConnectionLine)&&n instanceof c.ZipLine&&V.Mf.QnV(n)},V.prototype.t0V=function(t,V){var n=this;switch(t){case"startConnector":case"endConnector":n[t](V);break;case"points":n.nnV(V.points)}},V.prototype.WiV=function(t){return new V(t)},V}(d.ShapeBase),V.ConnectorShape=w},"./dist/plugins/shape/drawingInterface.js":function(t,V,n){var i,e,r,c,o,s,d,a,h,u,x,f,y,l,g,A,p,v,w,j,b,L,m,C,R,I,M,_,E,S,F,X,Y,O,T,P,N,D,U,q,k=this&&this.nJr||function(){return k=Object.assign||function(t){var V,n,i,e;for(n=1,i=arguments.length;n<i;n++)for(e in V=arguments[n])Object.prototype.hasOwnProperty.call(V,e)&&(t[e]=V[e]);return t},k.apply(this,arguments)};function B(t){return tt(t,!0,x,!0)}function Z(t){return+t.split(" ")[1]}function H(t){return[t.name,Z(t.fmla)]}function z(t){return{name:t[0],fmla:"val "+gt(t[1])}}function Q(t,V){return h(t)?V:t}function G(t,V,n){var i=V,e=n;switch(t){case s.TextDirection.vert:case s.TextDirection.wordArtVertRtl:case s.TextDirection.eaVert:i=2-n,e=V;break;case s.TextDirection.vert270:i=n,e=2-V;break;case s.TextDirection.wordArtVert:case s.TextDirection.eaVertLtr:i=n,e=V}return{hAlign:i,vAlign:e}}function J(t){var n,i,e,r=t.O0t[0],c=r?r.Algn:V.ST_TextAlignType.l,o=t.Inset,d={rIns:Q(o.right,y),lIns:Q(o.left,y),tIns:Q(o.top,f),bIns:Q(o.bottom,f),anchorCtr:Q(t.anchorCtr,!1),anchor:Q(t.anchor,V.ST_TextAnchoringType.t),vert:Q(t.vert,V.ST_TextVerticalType.horz),wrap:Q(t.wrap,V.ST_TextWrappingType.square),horzOverflow:Q(t.horzOverflow,V.ST_TextHorzOverflowType.overflow),vertOverflow:Q(t.vertOverflow,V.ST_TextVertOverflowType.overflow)},a=0,h=0,x=!1,l=!0,g=0,A=!1,p=s.TextDirection.horz;return d&&Object.keys(d).length>0&&(p=d.vert||0,n=[d.lIns,d.rIns,d.tIns,d.bIns].map(u),x=!d.horzOverflow,l=0!==d.wrap,i=d.anchor||0,A=!!d.anchorCtr,i>2&&(i=1),c>2&&(c=0),h=i,a=c),{center:A,hAlign:(e=G(p,a,h)).hAlign,vAlign:e.vAlign,overflow:x,wrap:l,angle:g,margins:n,textDirection:p}}function W(t){return{fontSize:t.Size,fontName:t.Name,bold:!!t.Bold,italic:!!t.Italic,color:B(t)}}function K(t){var V=t.O0t[0],n=(V.j0t&&V.j0t[0]||V).Font;return W(n)}function $(t){var V=[];return t.italic&&V.push("italic"),t.bold&&V.push("bold"),V.push(t.fontSize+"px"),V.push(t.fontName),V.join(" ")}function tt(t,n,i,e,r){var c,o,s,h;if(void 0===r&&(r=!1),o="transparent",!(c=t&&t.Color))return o;if(c.ColorType===V.SolidColorType.None)return i?"":o;if(c.ColorType===V.SolidColorType.Theme&&r){for(;!c.HasOwnColor()&&c.sft;)c=c.sft;return d[c.GetColorData().Value]}return(s=c.NoTransformedRGB)&&((h=c.GetColorData()).ApplyBrightness=!!e,s=a(s,h),o=n?V.Color.fromARGBColor(s).toRgbaString():V.Color.fromARGBColor(s).toRgbString()),o}function Vt(t){var V,n=t&&t.Color&&t.Color.Transparency;return isNaN(n)&&(n=0),{color:V=tt(t,!1,!0,!0),transparency:n}}function nt(t){var V=t.Color,n={color:tt(t,!1,!0,!1,!0)};return 0!==V.Brightness&&(n.brightness=V.Brightness),0!==V.TintAndShade&&(n.tint=V.TintAndShade),0!==V.Shade&&(n.shade=V.Shade),1!==V.SatMod&&(n.satMod=V.SatMod),n}function it(t,V){var n;return(D[N[t]]||[]).map((function(t){return t*V}))}function et(t){return P[t]}function rt(t){return T[t]}function ct(t){var n=V.FillType.Solid;return t.Type===V.FillType.Gradient?n=V.FillType.Gradient:t.Type===V.FillType.Picture&&(n=V.FillType.Picture),n}function ot(t){var V=1;return 0===t.Color.ColorType&&(V=0),V}function st(t){return!0===t.u0t?g.linear:t.Bft===V.ST_PathShadeType.circle?g.radial:void 0}function dt(t){return t.u0t?t.GradientAngle:void 0}function at(t){var V=st(t);return V===g.linear?ut(t):V===g.radial?xt(t):void 0}function ht(t){var V,n,i=t.GradientStops,e=[];for(V=0;V<i.Count;V++)n=i.Item(V),e.push({color:tt(n,!1,!0,!1),position:n.Position,transparency:n.Transparency,brightness:n.Color.Brightness});return e}function ut(t){var V=dt(t);if(t.Rft&&V%45==0)return V}function xt(t){return t.GradientStyle===V.GradientStyle.GradientFromCenter?p.fromCenter:t.GradientStyle===V.GradientStyle.GradientFromCorner?t.GradientVariant:void 0}function ft(t){var n,i=t.GradientStyle;return i===V.GradientStyle.GradientTopSpotlight?n=p.fromTopLeft:i===V.GradientStyle.GradientBottomSpotlight&&(n=p.fromBottomLeft),n}function yt(t){var n,i=t&&t.Fill;if(i)return i._type===V.FillType.Group&&t.XtV&&(i=t.XtV.Fill),n=Vt(i),{type:ct(i),solid:{type:ot(i),color:n.color,transparency:n.transparency},gradient:{type:st(i),angle:dt(i),direction:at(i),stops:ht(i)},picture:k({src:i.PictureFormat.PicSrc,transparency:i.PictureFormat.Transparency,tilePictureAsTexture:i.PictureFormat.PictureFormatType===V.PictureFormatType.TextureFill,offsetLeft:i.PictureFormat.Stretch.left,offsetRight:i.PictureFormat.Stretch.right,offsetTop:i.PictureFormat.Stretch.top,offsetBottom:i.PictureFormat.Stretch.bottom},i.PictureFormat.Tile)}}function lt(t,n){var i=yt(n);i.type===V.FillType.Gradient?(t.fill=i.gradient,h(t.fill.direction)&&(t.fill.direction=ft(n.Fill))):i.type===V.FillType.Picture?t.fill=i.picture:t.fill=i.solid}function gt(t){return parseInt(t,10)}Object.defineProperty(V,"__esModule",{value:!0}),V.ST_FontCollectionIndex=V.ConnectorType=V.ST_CompoundLine=V.ST_PresetLineDashVal=V.ST_TextHorzOverflowType=V.ST_TextVertOverflowType=V.ST_TextWrappingType=V.ST_TextVerticalType=V.ST_TextAnchoringType=V.ST_TextAlignType=V.ft=V.StatefulBase=V.ARGBColor=V.ThreeDFormat=V.ReflectionFormat=V.SoftEdgeFormat=V.GlowFormat=V.ShadowFormat=V.DrawingText=V.FontFormat=V.LineFormat=V.PictureFormat=V.PictureFormatType=V.FillFormat=V.ThreeDFormatStates=V.ColorFormat=V.GradientStyle=V.ColorType=V.GradientStop=V.GradientStops=V.ST_PathShadeType=V.FillType=V.DrawingType=V.Placement=V.SolidColorType=V.ThemeFont=V.ThemeColor=V.ShapeType=V.FormControlType=V.ListBoxSelectionType=V.TextureFillMirrorType=V.TextureFillAlignment=V.RadialGradientFillDirection=V.LinearGradientFillDirection=V.GradientFillType=V.AutoShapeType=V.Color=V.DrawingUtility=V.sR=V.SR=void 0,V.getWholeNumber=V.ST_EditAs=V.ShapeUtility=V.ShapeConstants=V.ArrowheadWidth=V.ArrowheadLength=V.ArrowheadStyle=V.CompoundType=V.LineJoinStyle=V.LineCapStyle=V.PresetLineDashStyle=V.CT_ShapeType=V.ST_SchemeColorVal=V.ST_ShapeType=void 0,i=n("Common"),e=n("./dist/plugins/shape/shape.res.en.js"),V.SR={en:e},r=new i.Common.ResourceManager(V.SR,"Shapes"),V.sR=r.getResource.bind(r),c=n("Core"),o=n("FloatingObject"),s=n("./dist/plugins/shape/shape.interface.js"),V.DrawingUtility=o.Drawing.DrawingUtility,V.Color=o.Drawing.DrawingColorHelper,d=o.Drawing.ThemeColorDict,a=o.Drawing.transformColor,h=i.Common.lt.ht,u=Math.round,x=void 0,f=4.8,y=9.6,function(t){t[t.none=0]="none",t[t.rectangle=1]="rectangle",t[t.parallelogram=2]="parallelogram",t[t.trapezoid=3]="trapezoid",t[t.diamond=4]="diamond",t[t.roundedRectangle=5]="roundedRectangle",t[t.octagon=6]="octagon",t[t.isoscelesTriangle=7]="isoscelesTriangle",t[t.rightTriangle=8]="rightTriangle",t[t.oval=9]="oval",t[t.hexagon=10]="hexagon",t[t.cross=11]="cross",t[t.regularPentagon=12]="regularPentagon",t[t.can=13]="can",t[t.cube=14]="cube",t[t.bevel=15]="bevel",t[t.foldedCorner=16]="foldedCorner",t[t.smileyFace=17]="smileyFace",t[t.donut=18]="donut",t[t.noSymbol=19]="noSymbol",t[t.blockArc=20]="blockArc",t[t.heart=21]="heart",t[t.lightningBolt=22]="lightningBolt",t[t.sun=23]="sun",t[t.moon=24]="moon",t[t.arc=25]="arc",t[t.doubleBracket=26]="doubleBracket",t[t.doubleBrace=27]="doubleBrace",t[t.plaque=28]="plaque",t[t.leftBracket=29]="leftBracket",t[t.rightBracket=30]="rightBracket",t[t.leftBrace=31]="leftBrace",t[t.rightBrace=32]="rightBrace",t[t.rightArrow=33]="rightArrow",t[t.leftArrow=34]="leftArrow",t[t.upArrow=35]="upArrow",t[t.downArrow=36]="downArrow",t[t.leftRightArrow=37]="leftRightArrow",t[t.upDownArrow=38]="upDownArrow",t[t.quadArrow=39]="quadArrow",t[t.leftRightUpArrow=40]="leftRightUpArrow",t[t.bentArrow=41]="bentArrow",t[t.uTurnArrow=42]="uTurnArrow",t[t.leftUpArrow=43]="leftUpArrow",t[t.bentUpArrow=44]="bentUpArrow",t[t.curvedRightArrow=45]="curvedRightArrow",t[t.curvedLeftArrow=46]="curvedLeftArrow",t[t.curvedUpArrow=47]="curvedUpArrow",t[t.curvedDownArrow=48]="curvedDownArrow",t[t.stripedRightArrow=49]="stripedRightArrow",t[t.notchedRightArrow=50]="notchedRightArrow",t[t.pentagon=51]="pentagon",t[t.chevron=52]="chevron",t[t.rightArrowCallout=53]="rightArrowCallout",t[t.leftArrowCallout=54]="leftArrowCallout",t[t.upArrowCallout=55]="upArrowCallout",t[t.downArrowCallout=56]="downArrowCallout",t[t.leftRightArrowCallout=57]="leftRightArrowCallout",t[t.upDownArrowCallout=58]="upDownArrowCallout",t[t.quadArrowCallout=59]="quadArrowCallout",t[t.circularArrow=60]="circularArrow",t[t.flowchartProcess=61]="flowchartProcess",t[t.flowchartAlternateProcess=62]="flowchartAlternateProcess",t[t.flowchartDecision=63]="flowchartDecision",t[t.flowchartData=64]="flowchartData",t[t.flowchartPredefinedProcess=65]="flowchartPredefinedProcess",t[t.flowchartInternalStorage=66]="flowchartInternalStorage",t[t.flowchartDocument=67]="flowchartDocument",t[t.flowchartMultidocument=68]="flowchartMultidocument",t[t.flowchartTerminator=69]="flowchartTerminator",t[t.flowchartPreparation=70]="flowchartPreparation",t[t.flowchartManualInput=71]="flowchartManualInput",t[t.flowchartManualOperation=72]="flowchartManualOperation",t[t.flowchartConnector=73]="flowchartConnector",t[t.flowchartOffpageConnector=74]="flowchartOffpageConnector",t[t.flowchartCard=75]="flowchartCard",t[t.flowchartPunchedTape=76]="flowchartPunchedTape",t[t.flowchartSummingJunction=77]="flowchartSummingJunction",t[t.flowchartOr=78]="flowchartOr",t[t.flowchartCollate=79]="flowchartCollate",t[t.flowchartSort=80]="flowchartSort",t[t.flowchartExtract=81]="flowchartExtract",t[t.flowchartMerge=82]="flowchartMerge",t[t.flowchartStoredData=83]="flowchartStoredData",t[t.flowchartDelay=84]="flowchartDelay",t[t.flowchartSequentialAccessStorage=85]="flowchartSequentialAccessStorage",t[t.flowchartMagneticDisk=86]="flowchartMagneticDisk",t[t.flowchartDirectAccessStorage=87]="flowchartDirectAccessStorage",t[t.flowchartDisplay=88]="flowchartDisplay",t[t.explosion1=89]="explosion1",t[t.explosion2=90]="explosion2",t[t.shape4pointStar=91]="shape4pointStar",t[t.shape5pointStar=92]="shape5pointStar",t[t.shape8pointStar=93]="shape8pointStar",t[t.shape16pointStar=94]="shape16pointStar",t[t.shape24pointStar=95]="shape24pointStar",t[t.shape32pointStar=96]="shape32pointStar",t[t.upRibbon=97]="upRibbon",t[t.downRibbon=98]="downRibbon",t[t.curvedUpRibbon=99]="curvedUpRibbon",t[t.curvedDownRibbon=100]="curvedDownRibbon",t[t.verticalScroll=101]="verticalScroll",t[t.horizontalScroll=102]="horizontalScroll",t[t.wave=103]="wave",t[t.doubleWave=104]="doubleWave",t[t.rectangularCallout=105]="rectangularCallout",t[t.roundedRectangularCallout=106]="roundedRectangularCallout",t[t.ovalCallout=107]="ovalCallout",t[t.cloudCallout=108]="cloudCallout",t[t.lineCallout1=109]="lineCallout1",t[t.lineCallout2=110]="lineCallout2",t[t.lineCallout3=111]="lineCallout3",t[t.lineCallout4=112]="lineCallout4",t[t.lineCallout1AccentBar=113]="lineCallout1AccentBar",t[t.lineCallout2AccentBar=114]="lineCallout2AccentBar",t[t.lineCallout3AccentBar=115]="lineCallout3AccentBar",t[t.lineCallout4AccentBar=116]="lineCallout4AccentBar",t[t.lineCallout1NoBorder=117]="lineCallout1NoBorder",t[t.lineCallout2NoBorder=118]="lineCallout2NoBorder",t[t.lineCallout3NoBorder=119]="lineCallout3NoBorder",t[t.lineCallout4NoBorder=120]="lineCallout4NoBorder",t[t.lineCallout1BorderandAccentBar=121]="lineCallout1BorderandAccentBar",t[t.lineCallout2BorderandAccentBar=122]="lineCallout2BorderandAccentBar",t[t.lineCallout3BorderandAccentBar=123]="lineCallout3BorderandAccentBar",t[t.lineCallout4BorderandAccentBar=124]="lineCallout4BorderandAccentBar",t[t.actionButtonCustom=125]="actionButtonCustom",t[t.actionButtonHome=126]="actionButtonHome",t[t.actionButtonHelp=127]="actionButtonHelp",t[t.actionButtonInformation=128]="actionButtonInformation",t[t.actionButtonBackorPrevious=129]="actionButtonBackorPrevious",t[t.actionButtonForwardorNext=130]="actionButtonForwardorNext",t[t.actionButtonBeginning=131]="actionButtonBeginning",t[t.actionButtonEnd=132]="actionButtonEnd",t[t.actionButtonReturn=133]="actionButtonReturn",t[t.actionButtonDocument=134]="actionButtonDocument",t[t.actionButtonSound=135]="actionButtonSound",t[t.actionButtonMovie=136]="actionButtonMovie",t[t.balloon=137]="balloon",t[t.flowchartOfflineStorage=138]="flowchartOfflineStorage",t[t.leftRightRibbon=139]="leftRightRibbon",t[t.diagonalStripe=140]="diagonalStripe",t[t.pie=141]="pie",t[t.nonIsoscelesTrapezoid=142]="nonIsoscelesTrapezoid",t[t.decagon=143]="decagon",t[t.heptagon=144]="heptagon",t[t.dodecagon=145]="dodecagon",t[t.star6Point=146]="star6Point",t[t.star7Point=147]="star7Point",t[t.star10Point=148]="star10Point",t[t.star12Point=149]="star12Point",t[t.round1Rectangle=150]="round1Rectangle",t[t.round2SameRectangle=151]="round2SameRectangle",t[t.round2DiagRectangle=152]="round2DiagRectangle",t[t.snipRoundRectangle=153]="snipRoundRectangle",t[t.snip1Rectangle=154]="snip1Rectangle",t[t.snip2SameRectangle=155]="snip2SameRectangle",t[t.snip2DiagRectangle=156]="snip2DiagRectangle",t[t.frame=157]="frame",t[t.halfFrame=158]="halfFrame",t[t.tear=159]="tear",t[t.chord=160]="chord",t[t.corner=161]="corner",t[t.mathPlus=162]="mathPlus",t[t.mathMinus=163]="mathMinus",t[t.mathMultiply=164]="mathMultiply",t[t.mathDivide=165]="mathDivide",t[t.mathEqual=166]="mathEqual",t[t.mathNotEqual=167]="mathNotEqual",t[t.cornerTabs=168]="cornerTabs",t[t.squareTabs=169]="squareTabs",t[t.plaqueTabs=170]="plaqueTabs",t[t.gear6=171]="gear6",t[t.gear9=172]="gear9",t[t.funnel=173]="funnel",t[t.pieWedge=174]="pieWedge",t[t.leftCircularArrow=175]="leftCircularArrow",t[t.leftRightCircularArrow=176]="leftRightCircularArrow",t[t.swooshArrow=177]="swooshArrow",t[t.cloud=178]="cloud",t[t.chartX=179]="chartX",t[t.chartStar=180]="chartStar",t[t.chartPlus=181]="chartPlus",t[t.lineInverse=182]="lineInverse",t[t.line=183]="line"}(l=V.AutoShapeType||(V.AutoShapeType={})),function(t){t[t.linear=0]="linear",t[t.radial=1]="radial"}(g=V.GradientFillType||(V.GradientFillType={})),function(t){t[t.linearRight=0]="linearRight",t[t.topLeftToBottomRight=45]="topLeftToBottomRight",t[t.linearDown=90]="linearDown",t[t.topRightToBottomLeft=135]="topRightToBottomLeft",t[t.linearLeft=180]="linearLeft",t[t.bottomRightToTopLeft=225]="bottomRightToTopLeft",t[t.linearUp=270]="linearUp",t[t.bottomLeftToTopRight=315]="bottomLeftToTopRight"}(A=V.LinearGradientFillDirection||(V.LinearGradientFillDirection={})),function(t){t[t.fromCenter=0]="fromCenter",t[t.fromTopLeft=1]="fromTopLeft",t[t.fromTopRight=2]="fromTopRight",t[t.fromBottomLeft=3]="fromBottomLeft",t[t.fromBottomRight=4]="fromBottomRight"}(p=V.RadialGradientFillDirection||(V.RadialGradientFillDirection={})),function(t){t[t.topLeft=0]="topLeft",t[t.top=1]="top",t[t.topRight=2]="topRight",t[t.left=3]="left",t[t.center=4]="center",t[t.right=5]="right",t[t.bottomLeft=6]="bottomLeft",t[t.bottom=7]="bottom",t[t.bottomRight=8]="bottomRight"}(v=V.TextureFillAlignment||(V.TextureFillAlignment={})),function(t){t[t.none=0]="none",t[t.horizontal=1]="horizontal",t[t.vertical=2]="vertical",t[t.both=3]="both"}(w=V.TextureFillMirrorType||(V.TextureFillMirrorType={})),function(t){t.single="single",t.multi="multi",t.extend="extended"}(j=V.ListBoxSelectionType||(V.ListBoxSelectionType={})),function(t){t.button="button",t.spinButton="spinButton",t.scrollBar="scrollBar",t.listBox="listBox",t.checkBox="checkBox",t.optionButton="optionButton",t.label="label",t.groupBox="groupBox",t.comboBox="comboBox"}(b=V.FormControlType||(V.FormControlType={})),function(t){t[t.AutoShape=0]="AutoShape",t[t.Chart=1]="Chart",t[t.Comment=2]="Comment",t[t.Group=3]="Group",t[t.Picture=4]="Picture",t[t.Slicer=5]="Slicer"}(L=V.ShapeType||(V.ShapeType={})),function(t){t[t.None=-1]="None",t[t.Light1=0]="Light1",t[t.Dark1=1]="Dark1",t[t.Light2=2]="Light2",t[t.Dark2=3]="Dark2",t[t.Accent1=4]="Accent1",t[t.Accent2=5]="Accent2",t[t.Accent3=6]="Accent3",t[t.Accent4=7]="Accent4",t[t.Accent5=8]="Accent5",t[t.Accent6=9]="Accent6",t[t.Hyperlink=10]="Hyperlink",t[t.FollowedHyperlink=11]="FollowedHyperlink"}(m=V.ThemeColor||(V.ThemeColor={})),V.ThemeFont=o.Drawing.ThemeFont,V.SolidColorType=o.Drawing.SolidColorType,V.Placement=o.Drawing.Placement,V.DrawingType=o.Drawing.DrawingType,V.FillType=o.Drawing.FillType,V.ST_PathShadeType=o.Drawing.ST_PathShadeType,V.GradientStops=o.Drawing.GradientStops,V.GradientStop=o.Drawing.GradientStop,V.ColorType=o.Drawing.ColorType,V.GradientStyle=o.Drawing.GradientStyle,V.ColorFormat=o.Drawing.ColorFormat,V.ThreeDFormatStates=o.Drawing.ThreeDFormatStates,V.FillFormat=o.Drawing.FillFormat,V.PictureFormatType=o.Drawing.PictureFormatType,V.PictureFormat=o.Drawing.PictureFormat,V.LineFormat=o.Drawing.LineFormat,V.FontFormat=o.Drawing.FontFormat,V.DrawingText=o.Drawing.DrawingText,V.ShadowFormat=o.Drawing.ShadowFormat,V.GlowFormat=o.Drawing.GlowFormat,V.SoftEdgeFormat=o.Drawing.SoftEdgeFormat,V.ReflectionFormat=o.Drawing.ReflectionFormat,V.ThreeDFormat=o.Drawing.ThreeDFormat,V.ARGBColor=o.Drawing.ARGBColor,V.StatefulBase=o.Drawing.StatefulBase,V.ft=i.Common.ft,V.ST_TextAlignType=o.Drawing.ST_TextAlignType,V.ST_TextAnchoringType=o.Drawing.ST_TextAnchoringType,V.ST_TextVerticalType=o.Drawing.ST_TextVerticalType,V.ST_TextWrappingType=o.Drawing.ST_TextWrappingType,V.ST_TextVertOverflowType=o.Drawing.ST_TextVertOverflowType,V.ST_TextHorzOverflowType=o.Drawing.ST_TextHorzOverflowType,V.ST_PresetLineDashVal=o.Drawing.ST_PresetLineDashVal,V.ST_CompoundLine=o.Drawing.ST_CompoundLine,function(t){t[t.straight=0]="straight",t[t.elbow=1]="elbow"}(C=V.ConnectorType||(V.ConnectorType={})),V.ST_FontCollectionIndex=o.Drawing.ST_FontCollectionIndex,function(t){t[t.line=0]="line",t[t.lineInv=1]="lineInv",t[t.triangle=2]="triangle",t[t.rtT