@mlightcad/libredwg-converter 3.12.2 → 3.12.3
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(D,r){typeof exports=="object"&&typeof module<"u"?r(exports,require("@mlightcad/data-model")):typeof define=="function"&&define.amd?define(["exports","@mlightcad/data-model"],r):(D=typeof globalThis<"u"?globalThis:D||self,r(D["libredwg-converter"]={},D.dataModel))})(this,(function(D,r){"use strict";class y{convert(e){const t=this.createEntity(e);return t&&this.processCommonAttrs(e,t),t}createEntity(e){return e.type=="3DFACE"?this.convertFace(e):e.type=="ARC"?this.convertArc(e):e.type=="ATTDEF"?this.convertAttributeDefinition(e):e.type=="ATTRIB"?this.convertAttribute(e):e.type=="CIRCLE"?this.convertCirle(e):e.type=="DIMENSION"?this.convertDimension(e):e.type=="ELLIPSE"?this.convertEllipse(e):e.type=="HATCH"?this.convertHatch(e):e.type=="IMAGE"?this.convertImage(e):e.type=="LEADER"?this.convertLeader(e):e.type=="LINE"?this.convertLine(e):e.type=="LWPOLYLINE"?this.convertLWPolyline(e):e.type=="MLINE"?this.convertMLine(e):e.type=="MTEXT"?this.convertMText(e):e.type=="MULTILEADER"||e.type=="MLEADER"?this.convertMLeader(e):e.type=="POINT"?this.convertPoint(e):e.type=="POLYLINE2D"?this.convertPolyline2d(e):e.type=="POLYLINE3D"?this.convertPolyline3d(e):e.type=="RAY"?this.convertRay(e):e.type=="SPLINE"?this.convertSpline(e):e.type=="ACAD_TABLE"?this.convertTable(e):e.type=="TEXT"?this.convertText(e):e.type=="TOLERANCE"?this.convertTolerance(e):e.type=="SHAPE"?this.convertShape(e):e.type=="SOLID"?this.convertSolid(e):e.type=="VIEWPORT"?this.convertViewport(e):e.type=="WIPEOUT"?this.convertWipeout(e):e.type=="XLINE"?this.convertXline(e):e.type=="INSERT"?this.convertBlockReference(e):e.type=="ACAD_PROXY_ENTITY"?this.convertProxyEntity(e):e.type=="OLE2FRAME"?this.convertOle2Frame(e):e.type=="OLEFRAME"?this.convertOleFrame(e):null}convertProxyEntity(e){const t=new r.AcDbProxyEntity;if(t.proxyEntityClassId=e.proxyEntityClassId,e.originalDxfName&&(t.originalDxfName=e.originalDxfName),e.applicationEntityClassId!=null&&(t.applicationEntityClassId=e.applicationEntityClassId),e.objectDrawingFormat!=null&&(t.objectDrawingFormat=e.objectDrawingFormat),e.originalDataFormat!=null&&(t.originalDataFormat=e.originalDataFormat),e.graphicsData){const o=r.acdbHexStringsToBytes([e.graphicsData]),n=e.graphicsDataSize??o.length;t.setProxyGraphic(o.subarray(0,n))}return t}convertFace(e){const t=new r.AcDbFace;return e.corner1&&t.setVertexAt(0,e.corner1),e.corner2&&t.setVertexAt(1,e.corner2),e.corner3&&t.setVertexAt(2,e.corner3),e.corner4&&t.setVertexAt(3,e.corner4),t.setEdgeInvisibilities(e.flag),t}convertArc(e){const t=e.extrusionDirection??r.AcGeVector3d.Z_AXIS;return new r.AcDbArc(r.acgeTransformOcsPointToWcs(e.center,t),e.radius,e.startAngle,e.endAngle,t)}convertCirle(e){const t=e.extrusionDirection??r.AcGeVector3d.Z_AXIS;return new r.AcDbCircle(r.acgeTransformOcsPointToWcs(e.center,t),e.radius,t)}convertEllipse(e){const t=new r.AcGeVector3d(e.majorAxisEndPoint),o=t.length();return new r.AcDbEllipse(e.center,e.extrusionDirection??r.AcGeVector3d.Z_AXIS,t,o,o*e.axisRatio,e.startAngle,e.endAngle)}convertLine(e){const t=e.startPoint,o=e.endPoint;return new r.AcDbLine(new r.AcGePoint3d(t.x,t.y,t.z),new r.AcGePoint3d(o.x,o.y,o.z))}convertSpline(e){return r.AcDbSpline.fromDwgSpline(e)}convertPoint(e){const t=new r.AcDbPoint;return t.position=e.position,t}convertShape(e){const t=e.extrusionDirection??r.AcGeVector3d.Z_AXIS,o=new r.AcDbShape;return o.position=r.acgeTransformOcsPointToWcs(e.insertionPoint,t),o.size=e.size,o.shapeNumber=e.shapeNumber,e.styleName&&(o.styleName=e.styleName),o.rotation=e.rotation??0,o.widthFactor=e.xScale??1,o.oblique=e.obliqueAngle??0,o.thickness=e.thickness??0,o.normal.copy(t),o}convertSolid(e){const t=new r.AcDbSolid;return t.setPointAt(0,{...e.corner1,z:0}),t.setPointAt(1,{...e.corner2,z:0}),t.setPointAt(2,{...e.corner3,z:0}),t.setPointAt(3,e.corner4?{...e.corner4,z:0}:{...e.corner3,z:0}),t.thickness=e.thickness??0,t}convertLWPolyline(e){const t=new r.AcDbPolyline;t.closed=!!(e.flag&512);const o=e.constantWidth??-1;return e.vertices.forEach((n,i)=>{t.addVertexAt(i,new r.AcGePoint2d(n.x,n.y),n.bulge,n.startWidth??o,n.endWidth??o)}),t}convertPolyline2d(e){const t=!!(e.flag&1),o=!!(e.flag&16),n=!!(e.flag&64),i=!!(e.flag&32),s=[],l=[],a=[];if(e.vertices.map(c=>{if(!(c.flag&16))if(n&&c.flag&128)if(c.flag&64)s.push({x:c.x,y:c.y,z:c.z}),l.push(c.bulge??0);else{const f=[];c.polyfaceIndex0!=null&&c.polyfaceIndex0!=0&&f.push(Math.abs(c.polyfaceIndex0)-1),c.polyfaceIndex1!=null&&c.polyfaceIndex1!=0&&f.push(Math.abs(c.polyfaceIndex1)-1),c.polyfaceIndex2!=null&&c.polyfaceIndex2!=0&&f.push(Math.abs(c.polyfaceIndex2)-1),c.polyfaceIndex3!=null&&c.polyfaceIndex3!=0&&f.push(Math.abs(c.polyfaceIndex3)-1),f.length>=3&&a.push(f)}else s.push({x:c.x,y:c.y,z:c.z}),l.push(c.bulge??0)}),o){const c=e.meshMVertexCount??2,f=e.meshNVertexCount??2;return new r.AcDbPolygonMesh(c,f,s,t,i)}else{if(n)return new r.AcDbPolyFaceMesh(s,a);{let c=r.AcDbPoly2dType.SimplePoly;return e.flag&2?c=r.AcDbPoly2dType.FitCurvePoly:e.flag&4&&(e.smoothType==6?c=r.AcDbPoly2dType.CubicSplinePoly:e.smoothType==5&&(c=r.AcDbPoly2dType.QuadSplinePoly)),new r.AcDb2dPolyline(c,s,0,t,e.startWidth,e.endWidth,l)}}}convertPolyline3d(e){const t=!!(e.flag&1),o=[];e.vertices.map(i=>{i.flag&16||o.push({x:i.x,y:i.y,z:i.z})});let n=r.AcDbPoly3dType.SimplePoly;return e.flag&4&&(e.smoothType==6?n=r.AcDbPoly3dType.CubicSplinePoly:e.smoothType==5&&(n=r.AcDbPoly3dType.QuadSplinePoly)),new r.AcDb3dPolyline(n,o,t)}convertHatch(e){var n;const t=new r.AcDbHatch;if((n=e.definitionLines)==null||n.forEach(i=>{t.definitionLines.push({angle:i.angle,base:i.base,offset:i.offset,dashLengths:i.numberOfDashLengths>0?i.dashLengths:[]})}),t.isSolidFill=e.solidFill==1,t.hatchStyle=e.hatchStyle,t.patternName=e.patternName,t.patternType=e.patternType,t.patternAngle=e.patternAngle==null?0:e.patternAngle,t.patternScale=e.patternScale==null?0:e.patternScale,e.boundaryPaths.forEach(i=>{if(i.boundaryPathTypeFlag&2){const l=i,a=new r.AcGePolyline2d;a.closed=l.isClosed,l.vertices.forEach((c,f)=>{a.addVertexAt(f,{x:c.x,y:c.y,bulge:c.bulge})}),t.add(a)}else{const l=i,a=[];l.edges.forEach(f=>{if(f!=null){if(f.type==1){const u=f;a.push(new r.AcGeLine2d(u.start,u.end))}else if(f.type==2){const u=f;a.push(new r.AcGeCircArc2d(u.center,u.radius,u.startAngle,u.endAngle,!u.isCCW))}else if(f.type==3){const u=f;new r.AcGeVector2d().subVectors(u.end,u.center);const d=Math.sqrt(Math.pow(u.end.x,2)+Math.pow(u.end.y,2)),g=d*u.lengthOfMinorAxis;let A=u.startAngle,b=u.endAngle;const x=Math.atan2(u.end.y,u.end.x);u.isCCW||(A=Math.PI*2-A,b=Math.PI*2-b),a.push(new r.AcGeEllipseArc2d({...u.center,z:0},d,g,A,b,!u.isCCW,x))}else if(f.type==4){const u=r.AcGeSpline3d.fromDwgSplineEdge(f);u&&a.push(u)}}});const c=r.AcGeLoop2d.buildFromEdges(a);c.length==0&&a.length>0?t.add(new r.AcGeLoop2d(a)):c.forEach(f=>t.add(f))}}),e.gradientFlag){const i=e;if(t.hatchObjectType=r.AcDbHatchObjectType.GradientObject,t.gradientName=i.gradientName,t.gradientAngle=i.gradientRotation??0,t.gradientShift=i.gradientDefinition??0,t.gradientOneColorMode=i.gradientColorFlag==1,t.shadeTintValue=i.colorTint??0,i.gradientColors){const s=i.gradientColors.length;s>1?(t.gradientStartColor=i.gradientColors[0].rgb,t.gradientEndColor=i.gradientColors[1].rgb):s>0&&(t.gradientStartColor=i.gradientColors[0].rgb)}}return t}convertTable(e){const t=new r.AcDbTable(e.name,e.rowCount,e.columnCount);return t.tableStyleId=e.tableStyleId,t.owningBlockRecordId=e.blockRecordHandle,e.directionVector&&(t.horizontalDirection=new r.AcGeVector3d(e.directionVector)),t.attachmentPoint=e.attachmentPoint,t.position.copy(e.startPoint),t.tableValueFlag=e.tableValue,t.tableOverrideFlag=e.overrideFlag,t.borderColorOverrideFlag=e.borderColorOverrideFlag,t.borderLineweightOverrideFlag=e.borderLineWeightOverrideFlag,t.borderVisibilityOverrideFlag=e.borderVisibilityOverrideFlag,e.columnWidthArr.forEach((o,n)=>t.setColumnWidth(n,o)),e.rowHeightArr.forEach((o,n)=>t.setRowHeight(n,o)),e.cells.forEach((o,n)=>{t.setCell(n,o)}),t}convertText(e){const t=new r.AcDbText;t.textString=e.text,t.styleName=e.styleName,t.height=e.textHeight,t.position.copy(e.startPoint);const o=!e.endPoint||e.endPoint.x===0&&e.endPoint.y===0&&(e.endPoint.z??0)===0;return e.endPoint&&!o?t.alignmentPoint.copy(e.endPoint):t.alignmentPoint.copy(e.startPoint),t.rotation=e.rotation,t.oblique=e.obliqueAngle??0,t.thickness=e.thickness,t.horizontalMode=e.halign,t.verticalMode=e.valign,t.widthFactor=e.xScale??1,t}convertTolerance(e){const t=new r.AcDbFcf;return t.location.copy(e.insertionPoint),t.text=e.text,t.dimensionStyle=e.styleName??"",e.extrusionDirection&&t.normal.copy(e.extrusionDirection),e.xAxisDirection&&t.direction.copy(e.xAxisDirection),t}convertMText(e){const t=new r.AcDbMText;return t.contents=e.text,e.styleName!=null&&(t.styleName=e.styleName),t.height=e.textHeight,t.width=e.rectWidth,t.rotation=e.rotation||0,t.location=e.insertionPoint,t.attachmentPoint=e.attachmentPoint,e.direction&&(t.direction=new r.AcGeVector3d(e.direction)),t.drawingDirection=e.drawingDirection,e.extentsWidth!=null&&e.extentsWidth>0&&(t.extentsWidth=e.extentsWidth),t}convertLeader(e){const t=new r.AcDbLeader;return e.vertices.forEach(o=>{t.appendVertex(o)}),t.hasArrowHead=e.isArrowheadEnabled,t.hasHookLine=e.isHooklineExists,t.isHookLineSameDirection=e.isHooklineSameDirection,t.isSplined=e.isSpline,t.dimensionStyle=e.styleName??"",t.annoType=e.leaderCreationFlag,e.textHeight!=null&&(t.textHeight=e.textHeight),e.textWidth!=null&&(t.textWidth=e.textWidth),e.byBlockColor!=null&&(t.byBlockColor=e.byBlockColor),e.associatedAnnotation&&(t.associatedAnnotation=e.associatedAnnotation),e.normal&&(t.normal=e.normal),e.horizontalDirection&&(t.horizontalDirection=e.horizontalDirection),e.offsetFromBlock&&(t.offsetFromBlock=e.offsetFromBlock),e.offsetFromAnnotation&&(t.offsetFromAnnotation=e.offsetFromAnnotation),t}convertMLine(e){const t=new r.AcDbMLine;return t.styleName=e.mlineStyle||"STANDARD",t.scale=e.scale,t.flags=e.flags,t.justification=e.justification,t.startPosition=e.startPoint,t.normal=e.extrusionDirection??r.AcGeVector3d.Z_AXIS,t.styleCount=e.numberOfLines??0,t.segments=(e.vertices??[]).map(o=>({position:o.vertex,direction:o.vertexDirection,miterDirection:o.miterDirection,elements:(o.lines??[]).map(n=>({parameterCount:n.numberOfSegmentParams,parameters:n.segmentParams??[],fillCount:n.numberOfAreaFillParams,fillParameters:n.areaFillParams??[]}))})),t}convertMLeader(e){var S,P;const t=new r.AcDbMLeader,o=e;t.version=e.version,t.leaderStyleId=e.leaderStyleId,e.leaderStyleId&&(t.mleaderStyleId=e.leaderStyleId),t.propertyOverrideFlag=e.propertyOverrideFlag,t.leaderLineType=e.leaderLineType??r.AcDbMLeaderLineType.StraightLeader,e.leaderLineColor!=null&&(t.leaderLineColor=this.convertMLeaderEntityColor(e.leaderLineColor)),t.leaderLineTypeId=e.leaderLineTypeId,t.leaderLineWeight=e.leaderLineWeight,t.landingEnabled=e.landingEnabled,t.doglegEnabled=e.doglegEnabled??!1,t.doglegLength=e.doglegLength??0,t.arrowheadId=e.arrowheadId,t.arrowheadSize=e.arrowheadSize,t.textStyleId=e.textStyleId,t.textLeftAttachmentType=e.textLeftAttachmentType,t.textRightAttachmentType=e.textRightAttachmentType,t.textAngleType=e.textAngleType,t.textAlignmentType=e.textAlignmentType,e.textColor!=null&&(t.textColor=this.convertMLeaderEntityColor(e.textColor)),t.textFrameEnabled=e.textFrameEnabled,t.landingGap=e.landingGap,t.textAttachment=e.textAttachment,t.textFlowDirection=e.textFlowDirection,this.isValidHandleId(e.blockContentId)&&(t.blockContentId=e.blockContentId),e.blockContentColor!=null&&(t.blockContentColor=this.convertMLeaderEntityColor(e.blockContentColor)),t.blockContentRotation=e.blockContentRotation,t.blockContentConnectionType=e.blockContentConnectionType,t.annotativeScaleEnabled=e.annotativeScaleEnabled,t.arrowheadOverrides=e.arrowheadOverrides?e.arrowheadOverrides.map(p=>({...p})):[],t.blockAttributes=e.blockAttributes?e.blockAttributes.map(p=>({...p})):[],t.textDirectionNegative=e.textDirectionNegative,t.textAlignInIPE=e.textAlignInIPE,t.bottomTextAttachmentDirection=e.bottomTextAttachmentDirection,t.topTextAttachmentDirection=e.topTextAttachmentDirection,t.contentScale=e.contentScale,t.textLineSpacingStyle=e.textLineSpacingStyle,e.textBackgroundColor!=null&&(t.textBackgroundColor=this.convertMLeaderEntityColor(e.textBackgroundColor)),t.textBackgroundScaleFactor=e.textBackgroundScaleFactor,t.textBackgroundTransparency=e.textBackgroundTransparency,t.textBackgroundColorOn=e.textBackgroundColorOn,t.textFillOn=e.textFillOn,t.textColumnType=e.textColumnType,t.textUseAutoHeight=e.textUseAutoHeight,t.textColumnWidth=e.textColumnWidth,t.textColumnGutterWidth=e.textColumnGutterWidth,t.textColumnFlowReversed=e.textColumnFlowReversed,t.textColumnHeight=e.textColumnHeight,t.textUseWordBreak=e.textUseWordBreak,t.hasMText=e.hasMText,t.hasBlock=e.hasBlock,t.planeNormalReversed=e.planeNormalReversed,e.blockContentScale&&(t.blockContentScale=new r.AcGeVector3d(e.blockContentScale)),e.contentBasePosition&&(t.contentBasePosition=new r.AcGePoint3d().copy(e.contentBasePosition)),e.textAnchor&&(t.textAnchor=new r.AcGePoint3d().copy(e.textAnchor)),e.planeOrigin&&(t.planeOrigin=new r.AcGePoint3d().copy(e.planeOrigin)),e.planeXAxisDirection&&(t.planeXAxisDirection=new r.AcGeVector3d(e.planeXAxisDirection)),e.planeYAxisDirection&&(t.planeYAxisDirection=new r.AcGeVector3d(e.planeYAxisDirection));const n=o.textContent,i=n&&typeof n=="object"?n:void 0,s=typeof n=="string"&&n.length>0||this.readString(i??{},["text","contents"])!=null||this.readString(o,["text","contents","mtext"])!=null,l=e.contentType??(s?r.AcDbMLeaderContentType.MTextContent:e.blockContent?r.AcDbMLeaderContentType.BlockContent:r.AcDbMLeaderContentType.NoneContent);t.contentType=l;const a=this.readPoint(o,["normal","extrusionDirection"]);a&&(t.normal=a);const c=this.readString(i??{},["styleName","textStyleName","textStyle"])??this.readString(o,["textStyleName","textStyle","styleName"]);c&&(t.textStyleName=c);const f=this.readPositiveNumber(i??{},["textHeight","height"])??this.readPositiveNumber(o,["textHeight","mtextHeight","textContentHeight"])??this.readPositiveNumber(o,["arrowheadSize","contentScale"]);f!=null&&(t.textHeight=f);const u=this.readPositiveNumber(i??{},["textWidth","width"])??this.readPositiveNumber(o,["textWidth","mtextWidth","textContentWidth"]);u!=null&&(t.textWidth=u),t.textLineSpacingFactor=this.readNumber(i??{},["lineSpacingFactor","textLineSpacingFactor"])??this.readNumber(o,["textLineSpacingFactor"])??t.textLineSpacingFactor;const h=this.readNumber(i??{},["textRotation","rotation"])??this.readNumber(o,["textRotation","mtextRotation","textContentRotation"]);h!=null&&(t.textRotation=h);const d=this.readPoint(o,["textDirection","mtextDirection","textDirectionVector"]);d&&(t.textDirection=d);const g=this.readNumber(o,["textAttachmentPoint","attachmentPoint"]);g!=null&&g!==0&&(t.textAttachmentPoint=g);const A=e.textAttachmentDirection;A!=null&&(t.textAttachmentDirection=A);const b=this.readNumber(o,["textDrawingDirection","drawingDirection"]);b!=null&&(t.textDrawingDirection=b);const x=typeof n=="string"?n:this.readString(i??{},["text","contents"])??this.readString(o,["text","contents","mtext"]),C=this.readPoint(i??{},["anchorPoint","textAnchor","textLocation","textPosition","textAnchorPoint"])??this.readPoint(o,["textAnchor","textLocation","textPosition","textAnchorPoint","contentBasePosition"]);if(x!=null&&C&&(t.mtextContent={text:x,anchorPoint:C}),e.blockContent){const p=e.blockContent,I=e.blockContent.blockContentId;if(this.isValidHandleId(I)){const m=this.readMLeaderEntityColor(p,["color"]);t.blockContent={blockContentId:I,normal:this.readPoint(p,["normal"]),position:e.blockContent.position,scale:this.readPoint(p,["scale"]),rotation:this.readNumber(p,["rotation"]),color:m,transformationMatrix:Array.isArray(e.blockContent.transformationMatrix)?e.blockContent.transformationMatrix:[]}}}else this.isValidHandleId(e.blockContentId)&&(t.blockContent={blockContentId:e.blockContentId,scale:e.blockContentScale,rotation:e.blockContentRotation,color:t.blockContentColor,transformationMatrix:[]});return(S=this.readMLeaderLeaders(o))==null||S.forEach(p=>{t.addLeader({lastLeaderLinePoint:p.lastLeaderLinePoint,lastLeaderLinePointSet:p.lastLeaderLinePointSet,doglegVector:p.doglegVector,doglegVectorSet:p.doglegVectorSet,doglegLength:p.doglegLength??e.doglegLength,breaks:p.breaks,leaderBranchIndex:p.leaderBranchIndex,leaderLines:p.leaderLines})}),t.numberOfLeaders===0&&((P=this.readLeaderLineArray(o))==null||P.forEach(p=>{t.addLeader({doglegLength:e.doglegLength}),t.addLeaderLine(t.numberOfLeaders-1,p)})),t.numberOfLeaders===0&&e.contentBasePosition&&t.addLeader({lastLeaderLinePoint:e.contentBasePosition,lastLeaderLinePointSet:!0,doglegLength:e.doglegLength}),t}convertDimension(e){if(e.subclassMarker=="AcDbAlignedDimension"){const t=e,o=new r.AcDbAlignedDimension(t.subDefinitionPoint1,t.subDefinitionPoint2,t.definitionPoint);return t.insertionPoint&&(o.dimBlockPosition={x:t.insertionPoint.x,y:t.insertionPoint.y,z:0}),o.rotation=t.rotationAngle,this.processDimensionCommonAttrs(e,o),o}else if(e.subclassMarker=="AcDbRotatedDimension"){const t=e,o=new r.AcDbRotatedDimension(t.subDefinitionPoint1,t.subDefinitionPoint2,t.definitionPoint);return t.insertionPoint&&(o.dimBlockPosition={x:t.insertionPoint.x,y:t.insertionPoint.y,z:0}),o.rotation=t.rotationAngle,this.processDimensionCommonAttrs(e,o),o}else if(e.subclassMarker=="AcDb3PointAngularDimension"){const t=e,o=new r.AcDb3PointAngularDimension(t.centerPoint,t.subDefinitionPoint1,t.subDefinitionPoint2,t.definitionPoint);return this.processDimensionCommonAttrs(e,o),o}else if(e.subclassMarker=="AcDb2LineAngularDimension"){const t=e,o=t.definitionPoint??t.arcPoint??t.subDefinitionPoint2,n=t.centerPoint??t.subDefinitionPoint2??t.subDefinitionPoint1,i=n??o,s=t.subDefinitionPoint1??n??o,l=t.subDefinitionPoint2??n??o;if(!o||!t.name)return null;const a=new r.AcDb3PointAngularDimension(i,s,l,o);return this.processDimensionCommonAttrs(e,a),a}else if(e.subclassMarker=="AcDbOrdinateDimension"){const t=e,o=new r.AcDbOrdinateDimension(t.subDefinitionPoint1,t.subDefinitionPoint2);return this.processDimensionCommonAttrs(e,o),o}else if(e.subclassMarker=="AcDbRadialDimension"){const t=e,o=new r.AcDbRadialDimension(t.definitionPoint,t.centerPoint,t.leaderLength);return this.processDimensionCommonAttrs(e,o),o}else if(e.subclassMarker=="AcDbDiametricDimension"){const t=e,o=new r.AcDbDiametricDimension(t.definitionPoint,t.centerPoint,t.leaderLength);return this.processDimensionCommonAttrs(e,o),o}return null}processImage(e,t){t.position.copy(e.position),t.brightness=e.brightness,t.contrast=e.contrast,t.fade=e.fade,t.imageSize.copy(e.imageSize),t.imageDefId=e.imageDefHandle,t.isClipped=e.clipping>0,t.isShownClipped=(e.flags&4)!==0,t.isImageShown=(e.flags&3)!==0,t.isImageTransparent=(e.flags&8)!==0,e.clippingBoundaryPath.forEach(o=>{t.clipBoundary.push(new r.AcGePoint2d(o))}),t.clipBoundaryType=e.clippingBoundaryType,t.width=Math.sqrt(e.uPixel.x**2+e.uPixel.y**2+e.uPixel.z**2)*e.imageSize.x,t.height=Math.sqrt(e.vPixel.x**2+e.vPixel.y**2+e.vPixel.z**2)*e.imageSize.y,t.rotation=Math.atan2(e.uPixel.y,e.uPixel.x)}convertImage(e){const t=new r.AcDbRasterImage;return this.processImage(e,t),t}convertWipeout(e){const t=new r.AcDbWipeout;return this.processImage(e,t),t}convertOleFrame(e){const t=new r.AcDbOleFrame;if(t.oleVersion=e.flag??0,e.binaryData){const o=r.acdbHexStringsToBytes([e.binaryData]);t.loadOleObjectFromDxf(e.dataSize,o)}return t}convertOle2Frame(e){const t=new r.AcDbOle2Frame;if(t.oleVersion=e.oleVersion??0,t.userType=e.oleClient??"",e.leftUpPoint&&t.upperLeftCorner.copy(e.leftUpPoint),e.rightDownPoint&&t.lowerRightCorner.copy(e.rightDownPoint),t.setLockAspect(e.lockAspect??0),t.oleObjectType=e.oleObjectType??r.AcDbOleObjectType.Embedded,t.tileMode=e.tileModeDescriptor??r.AcDbOleTileMode.ModelSpace,e.binaryData){const o=r.acdbHexStringsToBytes([e.binaryData]);t.loadOleObjectFromDxf(e.dataSize,o)}return t}convertViewport(e){const t=new r.AcDbViewport;t.number=e.viewportId,t.centerPoint.copy(e.viewportCenter),t.height=e.height,t.width=e.width,t.viewCenter.copy(e.displayCenter),t.viewHeight=e.viewHeight,e.targetPoint&&t.viewTarget.copy(e.targetPoint),e.viewTwistAngle!=null&&(t.viewTwistAngle=e.viewTwistAngle);const o=1e-6,n=Math.abs(t.centerPoint.x)<o&&Math.abs(t.centerPoint.y)<o,i=t.viewTarget,s=Math.abs(i.x)<o&&Math.abs(i.y)<o,l=Number.isFinite(t.height)&&Number.isFinite(t.viewHeight)&&Math.abs(t.viewHeight-t.height)<o;return n&&s&&l&&t.centerPoint.copy(t.viewCenter),t}convertRay(e){const t=new r.AcDbRay;return t.basePoint.copy(e.firstPoint),t.unitDir.copy(e.unitDirection),t}convertXline(e){const t=new r.AcDbXline;return t.basePoint.copy(e.firstPoint),t.unitDir.copy(e.unitDirection),t}convertAttributeCommon(e,t){const o=e.text;t.textString=o.text,t.styleName=o.styleName,t.height=o.textHeight,t.position.copy(o.startPoint);const n=e.alignmentPoint??o.endPoint,i=!n||n.x===0&&n.y===0&&(n.z??0)===0;n&&!i?t.alignmentPoint.copy(n):t.alignmentPoint.copy(o.startPoint),t.rotation=o.rotation,t.oblique=o.obliqueAngle??0,t.thickness=o.thickness,t.horizontalMode=o.halign,t.verticalMode=o.valign,t.widthFactor=o.xScale??1,t.tag=e.tag,t.fieldLength=e.fieldLength,t.isInvisible=(e.flags&r.AcDbAttributeFlags.Invisible)!==0,t.isConst=(e.flags&r.AcDbAttributeFlags.Const)!==0,t.isVerifiable=(e.flags&r.AcDbAttributeFlags.Verifiable)!==0,t.isPreset=(e.flags&r.AcDbAttributeFlags.Preset)!==0,t.lockPositionInBlock=e.lockPositionFlag,t.isReallyLocked=e.isReallyLocked,t.isMTextAttribute=(e.mtextFlag&r.AcDbAttributeMTextFlag.MultiLine)!==0,t.isConstMTextAttribute=(e.mtextFlag&r.AcDbAttributeMTextFlag.ConstMultiLine)!==0}convertAttribute(e){const t=new r.AcDbAttribute;return this.convertAttributeCommon(e,t),t}convertAttributeDefinition(e){const t=new r.AcDbAttributeDefinition;return this.convertAttributeCommon(e,t),t.prompt=e.prompt,t}convertBlockReference(e){const t=new r.AcDbBlockReference(e.name);return e.insertionPoint&&t.position.copy(e.insertionPoint),t.scaleFactors.x=e.xScale,t.scaleFactors.y=e.yScale,t.scaleFactors.z=e.zScale,t.rotation=e.rotation,t.normal.copy(e.extrusionDirection),e.columnCount!=null&&(t.columnCount=e.columnCount),e.rowCount!=null&&(t.rowCount=e.rowCount),e.columnSpacing!=null&&(t.columnSpacing=e.columnSpacing),e.rowSpacing!=null&&(t.rowSpacing=e.rowSpacing),e.handle!=null&&(t.objectId=e.handle),e.attribs&&e.attribs.forEach(o=>{const n=this.convert(o);n instanceof r.AcDbAttribute&&t.appendAttributes(n)}),t}processDimensionCommonAttrs(e,t){t.dimBlockId=e.name,t.textPosition.copy(e.textPoint),t.textRotation=e.textRotation||0,e.textLineSpacingFactor&&(t.textLineSpacingFactor=e.textLineSpacingFactor),e.textLineSpacingStyle&&(t.textLineSpacingStyle=e.textLineSpacingStyle),t.dimensionStyleName=e.styleName,t.dimensionText=e.text||"",t.measurement=e.measurement}processCommonAttrs(e,t){if(t.layer=e.layer||"0",t.objectId=e.handle,e.ownerBlockRecordSoftId!=null&&(t.ownerId=e.ownerBlockRecordSoftId),e.lineType!=null&&(t.lineType=e.lineType),e.lineweight!=null&&(t.lineWeight=e.lineweight),e.lineTypeScale!=null&&(t.linetypeScale=e.lineTypeScale),e.color!=null||e.colorIndex!=null||e.colorName){const o=new r.AcCmColor;e.color!=null&&o.setRGBValue(e.color),e.colorIndex!=null&&(e.color==null||e.colorIndex===7)&&(o.colorIndex=e.colorIndex),e.colorName&&(o.colorName=e.colorName),t.color=o}if(e.isVisible!=null&&(t.visibility=e.isVisible),e.transparency!=null){const o=new r.AcCmTransparency;o.method=e.transparencyType,(o.isByBlock||o.isByBlock)&&(o.alpha=e.transparency),t.transparency=o}}convertMLeaderEntityColor(e){return r.acdbDecodeMLeaderStyleRawColor(e)}readMLeaderEntityColor(e,t){for(const o of t){const n=e[o];if(typeof n=="number"&&Number.isFinite(n))return r.acdbDecodeMLeaderStyleRawColor(n)}}isValidHandleId(e){return e!=null&&e!==""&&e!=="0"}readNumber(e,t){for(const o of t){const n=e[o];if(typeof n=="number"&&Number.isFinite(n))return n}}readPositiveNumber(e,t){const o=this.readNumber(e,t);return o!=null&&o>0?o:void 0}readString(e,t){for(const o of t){const n=e[o];if(typeof n=="string")return n}}readBoolean(e,t){for(const o of t){const n=e[o];if(typeof n=="boolean")return n;if(typeof n=="number")return n!==0}}readPoint(e,t){for(const o of t){const n=e[o];if(this.isPointLike(n))return n;if(Array.isArray(n)&&typeof n[0]=="number"&&typeof n[1]=="number")return{x:n[0],y:n[1],z:n[2]??0}}}readLeaderLineArray(e){const t=e.leaderLines;if(Array.isArray(t))return t.map(n=>{if(!n||typeof n!="object")return;const i=n.vertices;return Array.isArray(i)?i.filter(s=>this.isPointLike(s)):void 0}).filter(n=>!!n&&n.length>0);const o=e.vertices;if(Array.isArray(o)){const n=o.filter(i=>this.isPointLike(i));return n.length>0?[n]:void 0}}readMLeaderLeaders(e){const t=e.leaderSections;if(!Array.isArray(t))return;const o=[];return t.forEach(n=>{if(!n||typeof n!="object")return;const i=n,s=i.leaderLines,l=Array.isArray(s)?s.reduce((g,A)=>{const b=this.readMLeaderLine(A);return b&&g.push(b),g},[]):void 0,a={},c=this.readPoint(i,["lastLeaderLinePoint"]),f=this.readPoint(i,["doglegVector"]),u=this.readNumber(i,["doglegLength"]),h=this.readMLeaderBreaks(i.breaks),d=this.readNumber(i,["leaderBranchIndex"]);c&&(a.lastLeaderLinePoint=c),i.lastLeaderLinePointSet!=null&&(a.lastLeaderLinePointSet=this.readBoolean(i,["lastLeaderLinePointSet"])),f&&(a.doglegVector=f),i.doglegVectorSet!=null&&(a.doglegVectorSet=this.readBoolean(i,["doglegVectorSet"])),u!=null&&(a.doglegLength=u),h&&(a.breaks=h),d!=null&&(a.leaderBranchIndex=d),l&&(a.leaderLines=l),o.push(a)}),o}readMLeaderLine(e){if(!e||typeof e!="object")return;const t=e,o=t.vertices,n=Array.isArray(o)?o.filter(a=>this.isPointLike(a)):[],i=this.readMLeaderBreaks(t.breaks),s=Array.isArray(t.breakPointIndexes)?t.breakPointIndexes.filter(a=>typeof a=="number"):void 0,l=this.readNumber(t,["leaderLineIndex"]);return n.length>0||i&&i.length>0?{vertices:n,breakPointIndexes:s,leaderLineIndex:l,breaks:i}:void 0}readMLeaderBreaks(e){if(!Array.isArray(e))return;const t=e.map(o=>{if(!o||typeof o!="object")return;const n=o,i=this.readPoint(n,["start"]),s=this.readPoint(n,["end"]),l=this.readNumber(n,["index"]);if(!i||!s)return;const a={start:i,end:s};return l!=null&&(a.index=l),a}).filter(o=>!!o);return t.length>0?t:void 0}isPointLike(e){return!!e&&typeof e=="object"&&typeof e.x=="number"&&typeof e.y=="number"}}class L{convertMLeaderStyle(e){const t=new r.AcDbMLeaderStyle;return t.unknown1=e.unknown1,e.contentType!=null&&(t.contentType=e.contentType),e.drawMLeaderOrderType!=null&&(t.drawMLeaderOrderType=e.drawMLeaderOrderType),e.drawLeaderOrderType!=null&&(t.drawLeaderOrderType=e.drawLeaderOrderType),e.maxLeaderSegmentPoints!=null&&(t.maxLeaderSegmentPoints=e.maxLeaderSegmentPoints),e.firstSegmentAngleConstraint!=null&&(t.firstSegmentAngleConstraint=e.firstSegmentAngleConstraint),e.secondSegmentAngleConstraint!=null&&(t.secondSegmentAngleConstraint=e.secondSegmentAngleConstraint),e.leaderLineType!=null&&(t.leaderLineType=e.leaderLineType),e.leaderLineColor!=null&&(t.leaderLineColor=r.acdbDecodeMLeaderStyleRawColor(e.leaderLineColor)),t.leaderLineTypeId=e.leaderLineTypeId,e.leaderLineWeight!=null&&(t.leaderLineWeight=e.leaderLineWeight),e.landingEnabled!=null&&(t.landingEnabled=e.landingEnabled),e.landingGap!=null&&(t.landingGap=e.landingGap),e.doglegEnabled!=null&&(t.doglegEnabled=e.doglegEnabled),e.doglegLength!=null&&(t.doglegLength=e.doglegLength),e.description!=null&&(t.description=e.description),t.arrowheadId=e.arrowheadId,e.arrowheadSize!=null&&(t.arrowheadSize=e.arrowheadSize),e.defaultMTextContents!=null&&(t.defaultMTextContents=e.defaultMTextContents),t.textStyleId=e.textStyleId,e.textLeftAttachmentType!=null&&(t.textLeftAttachmentType=e.textLeftAttachmentType),e.textAngleType!=null&&(t.textAngleType=e.textAngleType),e.textAlignmentType!=null&&(t.textAlignmentType=e.textAlignmentType),e.textRightAttachmentType!=null&&(t.textRightAttachmentType=e.textRightAttachmentType),e.textColor!=null&&(t.textColor=r.acdbDecodeMLeaderStyleRawColor(e.textColor)),e.textHeight!=null&&(t.textHeight=e.textHeight),e.textFrameEnabled!=null&&(t.textFrameEnabled=e.textFrameEnabled),e.textAlignAlwaysLeft!=null&&(t.textAlignAlwaysLeft=e.textAlignAlwaysLeft),e.alignSpace!=null&&(t.alignSpace=e.alignSpace),t.blockContentId=e.blockContentId,e.blockContentColor!=null&&(t.blockContentColor=r.acdbDecodeMLeaderStyleRawColor(e.blockContentColor)),e.blockContentScale&&(t.blockContentScale={x:e.blockContentScale.x,y:e.blockContentScale.y,z:e.blockContentScale.z??1}),e.blockContentScaleEnabled!=null&&(t.blockContentScaleEnabled=e.blockContentScaleEnabled),e.blockContentRotation!=null&&(t.blockContentRotation=e.blockContentRotation),e.blockContentRotationEnabled!=null&&(t.blockContentRotationEnabled=e.blockContentRotationEnabled),e.blockContentConnectionType!=null&&(t.blockContentConnectionType=e.blockContentConnectionType),e.scale!=null&&(t.scale=e.scale),e.overwritePropertyValue!=null&&(t.overwritePropertyValue=e.overwritePropertyValue),e.annotative!=null&&(t.annotative=e.annotative),e.breakGapSize!=null&&(t.breakGapSize=e.breakGapSize),e.textAttachmentDirection!=null&&(t.textAttachmentDirection=e.textAttachmentDirection),e.bottomTextAttachmentDirection!=null&&(t.bottomTextAttachmentDirection=e.bottomTextAttachmentDirection),e.topTextAttachmentDirection!=null&&(t.topTextAttachmentDirection=e.topTextAttachmentDirection),t.unknown2=e.unknown2,this.processCommonAttrs(e,t),t}convertLayerFilter(e){var o;const t=new r.AcDbLayerFilter;return(o=e.layerNames)!=null&&o.length&&(t.layerNames=e.layerNames),this.processCommonAttrs(e,t),t}convertLayerIndex(e){var o,n,i;const t=new r.AcDbLayerIndex;return e.timeStamp!=null&&(t.lastUpdatedAt=e.timeStamp,t.lastUpdatedAtU=e.timeStamp),(o=e.layerNames)!=null&&o.length&&(t.layerNames=e.layerNames),(n=e.idBufferIds)!=null&&n.length&&(t.idBufferIds=e.idBufferIds),(i=e.idBufferEntryCounts)!=null&&i.length&&(t.idBufferEntryCounts=e.idBufferEntryCounts),t.isUptoDate=!0,this.processCommonAttrs(e,t),t}processCommonAttrs(e,t){t.objectId=e.handle,e.ownerHandle!=null&&(t.ownerId=e.ownerHandle)}}const E="*MODEL_SPACE";class w extends r.AcDbDatabaseConverter{constructor(e={}){super(e),this.config.useWorker=!0,this.config.parserWorkerUrl||(this.config.parserWorkerUrl="/assets/libredwg-parser-worker.js")}async parse(e,t){const o=this.config,n=this.getParserWorkerTimeout(e,t);if(o.useWorker&&o.parserWorkerUrl){const i=r.acdbCreateWorkerApi({workerUrl:o.parserWorkerUrl,timeout:n,maxConcurrentWorkers:1}),s=await i.execute(e);return i.destroy(),r.AcDbOpenDatabaseError.throwOnWorkerParseFailure(s),s.data}else throw new Error("dwg converter can run in web worker only!")}getFonts(e){var i,s,l;const t=new Map;e.tables.BLOCK_RECORD.entries.forEach(a=>{t.set(a.name,a)});const o=new Map;for(const a of((i=e.tables.DIMSTYLE)==null?void 0:i.entries)??[]){const c=a.DIMTXSTY;o.set(a.name,typeof c=="string"&&c?c:r.DEFAULT_TEXT_STYLE)}const n=[...e.entities??[]];for(const a of e.tables.BLOCK_RECORD.entries)(s=a.entities)!=null&&s.length&&n.push(...a.entities);return new r.AcDbFontNameCollector({styles:e.tables.STYLE.entries.map(a=>({name:a.name,font:a.font,bigFont:a.bigFont,extendedFont:a.extendedFont,standardFlag:a.standardFlag})),textStyleVar:((l=e.header)==null?void 0:l.TEXTSTYLE)??r.DEFAULT_TEXT_STYLE}).collect(n,{getEntityFontInfo:a=>{if(a.type=="MTEXT"){const c=a;return{styleName:c.styleName,formattedText:c.text,resolveStyle:!0}}if(a.type=="TEXT"||a.type=="ATTRIB"||a.type=="ATTDEF")return{styleName:a.styleName,resolveStyle:!0};if(a.type=="SHAPE")return{styleName:a.styleName,resolveStyle:!0};if(a.type=="MULTILEADER"||a.type=="MLEADER"){const c=a,f=typeof c.textContent=="string"?c.textContent:"";return{styleName:typeof c.textStyleName=="string"?c.textStyleName:typeof c.styleName=="string"?c.styleName:void 0,formattedText:f,resolveStyle:!0}}if(a.type=="TOLERANCE"){const c=a;return{styleName:this.resolveDimStyleTextStyle(o,c.styleName),formattedText:typeof c.text=="string"?c.text:"",resolveStyle:!0}}if(a.type=="INSERT")return{blockName:a.name};if(a.type=="DIMENSION"){const c=a;return c.name?{blockName:c.name}:null}return null},getBlockEntities:a=>{var c;return(c=t.get(a))==null?void 0:c.entities}})}resolveDimStyleTextStyle(e,t){const o=t==null?void 0:t.trim();if(!o)return;const n=e.get(o);if(n)return n;const i=o.toUpperCase();for(const[s,l]of e)if(s.toUpperCase()===i)return l}processLineTypes(e,t){e.tables.LTYPE.entries.forEach(n=>{const i={name:n.name,description:n.description,standardFlag:n.standardFlag,totalPatternLength:n.totalPatternLength,pattern:n.pattern},s=new r.AcDbLinetypeTableRecord(i);this.processCommonTableEntryAttrs(n,s),t.tables.linetypeTable.add(s)})}processTextStyles(e,t){e.tables.STYLE.entries.forEach(n=>{const i={name:n.name,standardFlag:n.standardFlag,fixedTextHeight:n.fixedTextHeight,widthFactor:n.widthFactor,obliqueAngle:n.obliqueAngle,textGenerationFlag:n.textGenerationFlag,lastHeight:n.lastHeight,font:n.font,bigFont:n.bigFont,extendedFont:n.extendedFont},s=new r.AcDbTextStyleTableRecord(i);this.processCommonTableEntryAttrs(n,s),t.tables.textStyleTable.add(s)}),t.ensureTextStyleDefaults()}processDimStyles(e,t){e.tables.DIMSTYLE.entries.forEach(n=>{const i={name:n.name,ownerId:n.ownerHandle,dimpost:n.DIMPOST||"",dimapost:n.DIMAPOST||"",dimscale:n.DIMSCALE,dimasz:n.DIMASZ,dimexo:n.DIMEXO,dimdli:n.DIMDLI,dimexe:n.DIMEXE,dimrnd:n.DIMRND,dimdle:n.DIMDLE,dimtp:n.DIMTP,dimtm:n.DIMTM,dimtxt:n.DIMTXT,dimcen:n.DIMCEN,dimtsz:n.DIMTSZ,dimaltf:n.DIMALTF,dimlfac:n.DIMLFAC,dimtvp:n.DIMTVP,dimtfac:n.DIMTFAC,dimgap:n.DIMGAP,dimaltrnd:n.DIMALTRND,dimtol:n.DIMTOL==null||n.DIMTOL==0?0:1,dimlim:n.DIMLIM==null||n.DIMLIM==0?0:1,dimtih:n.DIMTIH==null||n.DIMTIH==0?0:1,dimtoh:n.DIMTOH==null||n.DIMTOH==0?0:1,dimse1:n.DIMSE1==null||n.DIMSE1==0?0:1,dimse2:n.DIMSE2==null||n.DIMSE2==0?0:1,dimtad:n.DIMTAD,dimzin:n.DIMZIN,dimazin:n.DIMAZIN,dimalt:n.DIMALT,dimaltd:n.DIMALTD,dimtofl:n.DIMTOFL,dimsah:n.DIMSAH,dimtix:n.DIMTIX,dimsoxd:n.DIMSOXD,dimclrd:n.DIMCLRD,dimclre:n.DIMCLRE,dimclrt:n.DIMCLRT,dimadec:n.DIMADEC||0,dimunit:n.DIMUNIT||2,dimdec:n.DIMDEC,dimtdec:n.DIMTDEC,dimaltu:n.DIMALTU,dimalttd:n.DIMALTTD,dimaunit:n.DIMAUNIT,dimfrac:n.DIMFRAC,dimlunit:n.DIMLUNIT,dimdsep:n.DIMDSEP||".",dimtmove:n.DIMTMOVE||0,dimjust:n.DIMJUST,dimsd1:n.DIMSD1,dimsd2:n.DIMSD2,dimtolj:n.DIMTOLJ,dimtzin:n.DIMTZIN,dimaltz:n.DIMALTZ,dimalttz:n.DIMALTTZ,dimfit:n.DIMFIT||0,dimupt:n.DIMUPT,dimatfit:n.DIMATFIT,dimtxsty:r.DEFAULT_TEXT_STYLE,dimldrblk:"",dimblk:n.DIMBLK||"",dimblk1:n.DIMBLK1||"",dimblk2:n.DIMBLK2||"",dimlwd:n.DIMLWD,dimlwe:n.DIMLWE},s=new r.AcDbDimStyleTableRecord(i);this.processCommonTableEntryAttrs(n,s),t.tables.dimStyleTable.add(s)})}processLayers(e,t){e.tables.LAYER.entries.forEach(n=>{const i=new r.AcCmColor;i.colorIndex=n.colorIndex;const s=new r.AcDbLayerTableRecord({name:n.name,standardFlags:n.standardFlag,linetype:n.lineType,lineWeight:n.lineweight,isOff:n.off,color:i,isPlottable:n.plotFlag!=0});this.processCommonTableEntryAttrs(n,s),t.tables.layerTable.add(s)})}processViewports(e,t){e.tables.VPORT.entries.forEach(n=>{const i=new r.AcDbViewportTableRecord;this.processCommonTableEntryAttrs(n,i),n.circleSides&&(i.circleSides=n.circleSides),i.standardFlag=n.standardFlag,i.center.copy(n.center??r.VPORT_FALLBACK_CENTER_2D),i.lowerLeftCorner.copy(n.lowerLeftCorner??r.VPORT_FALLBACK_LLC),i.upperRightCorner.copy(n.upperRightCorner??r.VPORT_FALLBACK_URC),n.snapBasePoint&&i.snapBase.copy(n.snapBasePoint),n.snapRotationAngle&&(i.snapAngle=n.snapRotationAngle),n.snapSpacing&&i.snapIncrements.copy(n.snapSpacing),n.majorGridLines&&(i.gridMajor=n.majorGridLines),n.gridSpacing&&i.gridIncrements.copy(n.gridSpacing),n.backgroundObjectId&&(i.backgroundObjectId=n.backgroundObjectId),i.gsView.center.copy(n.center??r.VPORT_FALLBACK_CENTER_2D),i.gsView.viewDirectionFromTarget.copy(n.viewDirectionFromTarget??r.VPORT_FALLBACK_VIEW_DIR),i.gsView.viewTarget.copy(n.viewTarget??r.VPORT_FALLBACK_VIEW_TARGET),n.lensLength&&(i.gsView.lensLength=n.lensLength),n.frontClippingPlane&&(i.gsView.frontClippingPlane=n.frontClippingPlane),n.backClippingPlane&&(i.gsView.backClippingPlane=n.backClippingPlane),n.viewHeight&&(i.gsView.viewHeight=n.viewHeight);const s=n.aspectRatio;s!=null&&Number.isFinite(s)&&s>0&&(i.gsView.aspectRatio=s),n.viewTwistAngle&&(i.gsView.viewTwistAngle=n.viewTwistAngle),n.frozenLayers&&(i.gsView.frozenLayers=n.frozenLayers),n.styleSheet&&(i.gsView.styleSheet=n.styleSheet),n.renderMode&&(i.gsView.renderMode=n.renderMode),n.viewMode&&(i.gsView.viewMode=n.viewMode),n.ucsIconSetting&&(i.gsView.ucsIconSetting=n.ucsIconSetting),n.ucsOrigin&&i.gsView.ucsOrigin.copy(n.ucsOrigin),n.ucsXAxis&&i.gsView.ucsXAxis.copy(n.ucsXAxis),n.ucsYAxis&&i.gsView.ucsYAxis.copy(n.ucsYAxis),n.orthographicType&&(i.gsView.orthographicType=n.orthographicType),n.shadePlotSetting&&(i.gsView.shadePlotSetting=n.shadePlotSetting),n.shadePlotObjectId&&(i.gsView.shadePlotObjectId=n.shadePlotObjectId),n.visualStyleObjectId&&(i.gsView.visualStyleObjectId=n.visualStyleObjectId),n.isDefaultLightingOn&&(i.gsView.isDefaultLightingOn=n.isDefaultLightingOn),n.defaultLightingType&&(i.gsView.defaultLightingType=n.defaultLightingType),n.brightness&&(i.gsView.brightness=n.brightness),n.contrast&&(i.gsView.contrast=n.contrast),n.ambientColor&&(i.gsView.ambientColor=n.ambientColor),t.tables.viewportTable.add(i)})}processBlockTables(e,t){e.tables.BLOCK_RECORD.entries.forEach(n=>{let i=t.tables.blockTable.getAt(n.name);i||(i=new r.AcDbBlockTableRecord,i.objectId=n.handle,i.name=n.name,i.ownerId=n.ownerHandle,i.layoutId=n.layout,i.flags=r.AcDbBlockTableRecord.sanitizeImportedFlags(n.flags??0),i.blockInsertUnits=n.insertionUnits,i.explodability=n.explodability,i.blockScaling=n.scalability,t.tables.blockTable.add(i)),n.bmpPreview&&(i.previewIcon=r.acdbHexStringsToBytes([n.bmpPreview])),i.origin.copy(n.basePoint),!i.isModelSapce&&n.entities&&n.entities.length>0&&this.processEntitiesInBlock(n.entities,i)})}processBlocks(e,t){}async processEntitiesInBlock(e,t){const o=new y,n=e.length,i=[];for(let s=0;s<n;s++){const l=e[s],a=o.convert(l);a&&i.push(a)}t.appendEntity(i)}async processEntities(e,t,o,n,i){const s=new y;let l=[];e.tables.BLOCK_RECORD.entries.forEach(u=>{this.isModelSpace(u.name)&&(l=u.entities)});const a=l.length,c=new r.AcDbBatchProcessing(a,100-n.value,o);this.config.convertByEntityType&&(l=this.groupAndFlattenByType(l));const f=t.tables.blockTable.modelSpace;await c.processChunk(async(u,h)=>{const d=[];for(let g=u;g<h;g++){const A=l[g],b=s.convert(A);b&&d.push(b)}if(f.appendEntity(d),i){let g=n.value+h/a*(100-n.value);g>100&&(g=100),await i(g,"ENTITY","IN-PROGRESS")}})}processClasses(e,t){var o;(o=e.classes)!=null&&o.length&&(t.classes=e.classes.map(n=>({name:n.dxfName,cppClassName:n.cppName,appName:n.appName,proxyFlag:n.capabilitiesFlag,instanceCount:n.instanceCount,wasProxy:n.wasAProxyFlag,isEntity:n.isAnEntityFlag})))}processHeader(e,t){const o=e.thumbnailImage;o!=null&&o.length&&(t.thumbnailImage=o);const n=e.header;n.CECOLOR&&(n.CECOLOR.index>=0&&n.CECOLOR.index<=256?t.cecolor.colorIndex=n.CECOLOR.index:t.cecolor.setRGBValue(n.CECOLOR.rgb)),t.angbase=n.ANGBASE??0,t.angdir=n.ANGDIR??0,t.aunits=n.AUNITS??0,n.AUPREC!=null&&(t.auprec=n.AUPREC),n.LUNITS!=null&&(t.lunits=n.LUNITS),n.LUPREC!=null&&(t.luprec=n.LUPREC),n.UNITMODE!=null&&(t.unitmode=n.UNITMODE),n.MEASUREMENT!=null&&(t.measurement=n.MEASUREMENT),t.celtype=n.CELTYPE??r.ByLayer,t.celtscale=n.CELTSCALE??1,t.ltscale=n.LTSCALE??1,n.EXTMAX&&(t.extmax=n.EXTMAX),n.EXTMIN&&(t.extmin=n.EXTMIN),t.insunits=n.INSUNITS??1,t.pdmode=n.PDMODE??0,t.pdsize=n.PDSIZE??0,t.textstyle=n.TEXTSTYLE??r.DEFAULT_TEXT_STYLE;const i=this.normalizeHeaderStringValue(n.CMLEADERSTYLE)??r.DEFAULT_MLEADER_STYLE;t.cmleaderstyle=i}processCommonTableEntryAttrs(e,t){t.name=e.name,t.objectId=e.handle,e.ownerHandle!=null&&(t.ownerId=e.ownerHandle)}processObjects(e,t){this.processLayouts(e,t),this.processImageDefs(e,t),this.processLayerFilters(e,t),this.processLayerIndexes(e,t),this.processLayerFilterTree(e,t),this.processMLeaderStyles(e,t)}processLayerFilterTree(e,t){const o=e.objects.DICTIONARY,n=e.objects.XRECORD;if(!(o!=null&&o.length)||!(n!=null&&n.length))return;const i=c=>c?String(c).trim().toUpperCase():"",s=new Map;o.forEach(c=>{const f={},u=c.entries??{};for(const h in u){const d=u[h];h&&d&&(f[h]=i(String(d)))}s.set(i(c.handle),{handle:i(c.handle),ownerObjectId:i(c.ownerHandle),entries:f})});const l=new Map;n.forEach(c=>{l.set(i(c.handle),{handle:i(c.handle),ownerObjectId:i(c.ownerHandle),extensionDictionaryId:i(c.extensionDictionary),data:(c.data??[]).map(f=>({code:Number(f.code),value:f.value}))})});const a=r.acdbReadLayerFilterTree({dictionaries:s,xrecords:l});a.root.getNestedFilters().length>0&&(t.layerFilters=a)}processLayouts(e,t){const o=t.objects.layout;e.objects.LAYOUT.forEach(i=>{const s=new r.AcDbLayout;s.layoutName=i.layoutName,s.tabOrder=i.tabOrder;const l=t.tables.blockTable.newIterator();s.objectId=i.handle;for(const a of l)if(a.layoutId===s.objectId){s.blockTableRecordId=a.objectId;break}s.blockTableRecordId||i.layoutName==="Model"&&(s.blockTableRecordId=t.tables.blockTable.modelSpace.objectId),s.limits.min.copy(i.minLimit),s.limits.max.copy(i.maxLimit),s.extents.min.copy(i.minExtent),s.extents.max.copy(i.maxExtent),i.viewportId&&s.viewportArray.push(i.viewportId),this.processCommonObjectAttrs(i,s),o.setAt(s.layoutName,s)})}processImageDefs(e,t){const o=t.objects.imageDefinition;e.objects.IMAGEDEF.forEach(i=>{const s=new r.AcDbRasterImageDef;s.sourceFileName=i.fileName,this.processCommonObjectAttrs(i,s),o.setAt(s.objectId,s)})}processLayerFilters(e,t){const o=e.objects.LAYER_FILTER;if(!(o!=null&&o.length))return;const n=t.objects.layerFilter,i=new L;o.forEach(s=>{const l=i.convertLayerFilter(s);n.setAt(l.objectId,l)})}processLayerIndexes(e,t){const o=e.objects.LAYER_INDEX;if(!(o!=null&&o.length))return;const n=t.objects.layerIndex,i=new L;o.forEach(s=>{const l=i.convertLayerIndex(s);n.setAt(l.objectId,l)})}processMLeaderStyles(e,t){const o=e.objects.MLEADERSTYLE;if(!(o!=null&&o.length))return;const n=t.objects.mleaderStyle,i=new L;o.forEach(s=>{const l=i.convertMLeaderStyle(s);n.setAt(l.objectId,l)})}processCommonObjectAttrs(e,t){t.objectId=e.handle,e.ownerHandle!=null&&(t.ownerId=e.ownerHandle)}groupAndFlattenByType(e){const t={},o=[];for(const i of e)t[i.type]||(t[i.type]=[],o.push(i.type)),t[i.type].push(i);const n=[];for(const i of o)n.push(...t[i]);return n}isModelSpace(e){return e&&e.toUpperCase()==E}normalizeHeaderStringValue(e){if(typeof e!="string")return;const t=e.trim();return t.length>0?t:void 0}}D.AcDbLibreDwgConverter=w,Object.defineProperty(D,Symbol.toStringTag,{value:"Module"})}));
|
|
1
|
+
(function(D,r){typeof exports=="object"&&typeof module<"u"?r(exports,require("@mlightcad/data-model")):typeof define=="function"&&define.amd?define(["exports","@mlightcad/data-model"],r):(D=typeof globalThis<"u"?globalThis:D||self,r(D["libredwg-converter"]={},D.dataModel))})(this,(function(D,r){"use strict";class y{convert(e){const t=this.createEntity(e);return t&&this.processCommonAttrs(e,t),t}createEntity(e){return e.type=="3DFACE"?this.convertFace(e):e.type=="ARC"?this.convertArc(e):e.type=="ATTDEF"?this.convertAttributeDefinition(e):e.type=="ATTRIB"?this.convertAttribute(e):e.type=="CIRCLE"?this.convertCirle(e):e.type=="DIMENSION"?this.convertDimension(e):e.type=="ELLIPSE"?this.convertEllipse(e):e.type=="HATCH"?this.convertHatch(e):e.type=="IMAGE"?this.convertImage(e):e.type=="LEADER"?this.convertLeader(e):e.type=="LINE"?this.convertLine(e):e.type=="LWPOLYLINE"?this.convertLWPolyline(e):e.type=="MLINE"?this.convertMLine(e):e.type=="MTEXT"?this.convertMText(e):e.type=="MULTILEADER"||e.type=="MLEADER"?this.convertMLeader(e):e.type=="POINT"?this.convertPoint(e):e.type=="POLYLINE2D"?this.convertPolyline2d(e):e.type=="POLYLINE3D"?this.convertPolyline3d(e):e.type=="RAY"?this.convertRay(e):e.type=="SPLINE"?this.convertSpline(e):e.type=="ACAD_TABLE"?this.convertTable(e):e.type=="TEXT"?this.convertText(e):e.type=="TOLERANCE"?this.convertTolerance(e):e.type=="SHAPE"?this.convertShape(e):e.type=="SOLID"?this.convertSolid(e):e.type=="VIEWPORT"?this.convertViewport(e):e.type=="WIPEOUT"?this.convertWipeout(e):e.type=="XLINE"?this.convertXline(e):e.type=="INSERT"?this.convertBlockReference(e):e.type=="ACAD_PROXY_ENTITY"?this.convertProxyEntity(e):e.type=="OLE2FRAME"?this.convertOle2Frame(e):e.type=="OLEFRAME"?this.convertOleFrame(e):null}convertProxyEntity(e){const t=new r.AcDbProxyEntity;if(t.proxyEntityClassId=e.proxyEntityClassId,e.originalDxfName&&(t.originalDxfName=e.originalDxfName),e.applicationEntityClassId!=null&&(t.applicationEntityClassId=e.applicationEntityClassId),e.objectDrawingFormat!=null&&(t.objectDrawingFormat=e.objectDrawingFormat),e.originalDataFormat!=null&&(t.originalDataFormat=e.originalDataFormat),e.graphicsData){const o=r.acdbHexStringsToBytes([e.graphicsData]),n=e.graphicsDataSize??o.length;t.setProxyGraphic(o.subarray(0,n))}return t}convertFace(e){const t=new r.AcDbFace;return e.corner1&&t.setVertexAt(0,e.corner1),e.corner2&&t.setVertexAt(1,e.corner2),e.corner3&&t.setVertexAt(2,e.corner3),e.corner4&&t.setVertexAt(3,e.corner4),t.setEdgeInvisibilities(e.flag),t}convertArc(e){const t=e.extrusionDirection??r.AcGeVector3d.Z_AXIS;return new r.AcDbArc(r.acgeTransformOcsPointToWcs(e.center,t),e.radius,e.startAngle,e.endAngle,t)}convertCirle(e){const t=e.extrusionDirection??r.AcGeVector3d.Z_AXIS;return new r.AcDbCircle(r.acgeTransformOcsPointToWcs(e.center,t),e.radius,t)}convertEllipse(e){const t=new r.AcGeVector3d(e.majorAxisEndPoint),o=t.length();return new r.AcDbEllipse(e.center,e.extrusionDirection??r.AcGeVector3d.Z_AXIS,t,o,o*e.axisRatio,e.startAngle,e.endAngle)}convertLine(e){const t=e.startPoint,o=e.endPoint;return new r.AcDbLine(new r.AcGePoint3d(t.x,t.y,t.z),new r.AcGePoint3d(o.x,o.y,o.z))}convertSpline(e){return r.AcDbSpline.fromDwgSpline(e)}convertPoint(e){const t=new r.AcDbPoint;return t.position=e.position,t}convertShape(e){const t=e.extrusionDirection??r.AcGeVector3d.Z_AXIS,o=new r.AcDbShape;return o.position=r.acgeTransformOcsPointToWcs(e.insertionPoint,t),o.size=e.size,o.shapeNumber=e.shapeNumber,e.styleName&&(o.styleName=e.styleName),o.rotation=e.rotation??0,o.widthFactor=e.xScale??1,o.oblique=e.obliqueAngle??0,o.thickness=e.thickness??0,o.normal.copy(t),o}convertSolid(e){const t=new r.AcDbSolid;return t.setPointAt(0,{...e.corner1,z:0}),t.setPointAt(1,{...e.corner2,z:0}),t.setPointAt(2,{...e.corner3,z:0}),t.setPointAt(3,e.corner4?{...e.corner4,z:0}:{...e.corner3,z:0}),t.thickness=e.thickness??0,t}convertLWPolyline(e){const t=new r.AcDbPolyline;t.closed=!!(e.flag&512);const o=e.constantWidth??-1;return e.vertices.forEach((n,i)=>{t.addVertexAt(i,new r.AcGePoint2d(n.x,n.y),n.bulge,n.startWidth??o,n.endWidth??o)}),t}convertPolyline2d(e){const t=!!(e.flag&1),o=!!(e.flag&16),n=!!(e.flag&64),i=!!(e.flag&32),s=[],l=[],a=[];if(e.vertices.map(c=>{if(!(c.flag&16))if(n&&c.flag&128)if(c.flag&64)s.push({x:c.x,y:c.y,z:c.z}),l.push(c.bulge??0);else{const f=[];c.polyfaceIndex0!=null&&c.polyfaceIndex0!=0&&f.push(Math.abs(c.polyfaceIndex0)-1),c.polyfaceIndex1!=null&&c.polyfaceIndex1!=0&&f.push(Math.abs(c.polyfaceIndex1)-1),c.polyfaceIndex2!=null&&c.polyfaceIndex2!=0&&f.push(Math.abs(c.polyfaceIndex2)-1),c.polyfaceIndex3!=null&&c.polyfaceIndex3!=0&&f.push(Math.abs(c.polyfaceIndex3)-1),f.length>=3&&a.push(f)}else s.push({x:c.x,y:c.y,z:c.z}),l.push(c.bulge??0)}),o){const c=e.meshMVertexCount??2,f=e.meshNVertexCount??2;return new r.AcDbPolygonMesh(c,f,s,t,i)}else{if(n)return new r.AcDbPolyFaceMesh(s,a);{let c=r.AcDbPoly2dType.SimplePoly;return e.flag&2?c=r.AcDbPoly2dType.FitCurvePoly:e.flag&4&&(e.smoothType==6?c=r.AcDbPoly2dType.CubicSplinePoly:e.smoothType==5&&(c=r.AcDbPoly2dType.QuadSplinePoly)),new r.AcDb2dPolyline(c,s,0,t,e.startWidth,e.endWidth,l)}}}convertPolyline3d(e){const t=!!(e.flag&1),o=[];e.vertices.map(i=>{i.flag&16||o.push({x:i.x,y:i.y,z:i.z})});let n=r.AcDbPoly3dType.SimplePoly;return e.flag&4&&(e.smoothType==6?n=r.AcDbPoly3dType.CubicSplinePoly:e.smoothType==5&&(n=r.AcDbPoly3dType.QuadSplinePoly)),new r.AcDb3dPolyline(n,o,t)}convertHatch(e){var n;const t=new r.AcDbHatch;if((n=e.definitionLines)==null||n.forEach(i=>{t.definitionLines.push({angle:i.angle,base:i.base,offset:i.offset,dashLengths:i.numberOfDashLengths>0?i.dashLengths:[]})}),t.isSolidFill=e.solidFill==1,t.hatchStyle=e.hatchStyle,t.patternName=e.patternName,t.patternType=e.patternType,t.patternAngle=e.patternAngle==null?0:e.patternAngle,t.patternScale=e.patternScale==null?0:e.patternScale,e.boundaryPaths.forEach(i=>{if(i.boundaryPathTypeFlag&2){const l=i,a=new r.AcGePolyline2d;a.closed=l.isClosed,l.vertices.forEach((c,f)=>{a.addVertexAt(f,{x:c.x,y:c.y,bulge:c.bulge})}),t.add(a)}else{const l=i,a=[];l.edges.forEach(f=>{if(f!=null){if(f.type==1){const u=f;a.push(new r.AcGeLine2d(u.start,u.end))}else if(f.type==2){const u=f;a.push(new r.AcGeCircArc2d(u.center,u.radius,u.startAngle,u.endAngle,!u.isCCW))}else if(f.type==3){const u=f;new r.AcGeVector2d().subVectors(u.end,u.center);const d=Math.sqrt(Math.pow(u.end.x,2)+Math.pow(u.end.y,2)),g=d*u.lengthOfMinorAxis;let A=u.startAngle,b=u.endAngle;const x=Math.atan2(u.end.y,u.end.x);u.isCCW||(A=Math.PI*2-A,b=Math.PI*2-b),a.push(new r.AcGeEllipseArc2d({...u.center,z:0},d,g,A,b,!u.isCCW,x))}else if(f.type==4){const u=r.AcGeSpline3d.fromDwgSplineEdge(f);u&&a.push(u)}}});const c=r.AcGeLoop2d.buildFromEdges(a);c.length==0&&a.length>0?t.add(new r.AcGeLoop2d(a)):c.forEach(f=>t.add(f))}}),e.gradientFlag){const i=e;if(t.hatchObjectType=r.AcDbHatchObjectType.GradientObject,t.gradientName=i.gradientName,t.gradientAngle=i.gradientRotation??0,t.gradientShift=i.gradientDefinition??0,t.gradientOneColorMode=i.gradientColorFlag==1,t.shadeTintValue=i.colorTint??0,i.gradientColors){const s=i.gradientColors.length;s>1?(t.gradientStartColor=i.gradientColors[0].rgb,t.gradientEndColor=i.gradientColors[1].rgb):s>0&&(t.gradientStartColor=i.gradientColors[0].rgb)}}return t}convertTable(e){const t=new r.AcDbTable(e.name,e.rowCount,e.columnCount);return t.tableStyleId=e.tableStyleId,t.owningBlockRecordId=e.blockRecordHandle,e.directionVector&&(t.horizontalDirection=new r.AcGeVector3d(e.directionVector)),t.attachmentPoint=e.attachmentPoint,t.position.copy(e.startPoint),t.tableValueFlag=e.tableValue,t.tableOverrideFlag=e.overrideFlag,t.borderColorOverrideFlag=e.borderColorOverrideFlag,t.borderLineweightOverrideFlag=e.borderLineWeightOverrideFlag,t.borderVisibilityOverrideFlag=e.borderVisibilityOverrideFlag,e.columnWidthArr.forEach((o,n)=>t.setColumnWidth(n,o)),e.rowHeightArr.forEach((o,n)=>t.setRowHeight(n,o)),e.cells.forEach((o,n)=>{t.setCell(n,o)}),t}convertText(e){const t=new r.AcDbText;t.textString=e.text,t.styleName=e.styleName,t.height=e.textHeight,t.position.copy(e.startPoint);const o=!e.endPoint||e.endPoint.x===0&&e.endPoint.y===0&&(e.endPoint.z??0)===0;return e.endPoint&&!o?t.alignmentPoint.copy(e.endPoint):t.alignmentPoint.copy(e.startPoint),t.rotation=e.rotation,t.oblique=e.obliqueAngle??0,t.thickness=e.thickness,t.horizontalMode=e.halign,t.verticalMode=e.valign,t.widthFactor=e.xScale??1,t}convertTolerance(e){const t=new r.AcDbFcf;return t.location.copy(e.insertionPoint),t.text=e.text,t.dimensionStyle=e.styleName??"",e.extrusionDirection&&t.normal.copy(e.extrusionDirection),e.xAxisDirection&&t.direction.copy(e.xAxisDirection),t}convertMText(e){const t=new r.AcDbMText;return t.contents=e.text,e.styleName!=null&&(t.styleName=e.styleName),t.height=e.textHeight,t.width=e.rectWidth,t.rotation=e.rotation||0,t.location=e.insertionPoint,t.attachmentPoint=e.attachmentPoint,e.direction&&(t.direction=new r.AcGeVector3d(e.direction)),t.drawingDirection=e.drawingDirection,e.extentsWidth!=null&&e.extentsWidth>0&&(t.extentsWidth=e.extentsWidth),t}convertLeader(e){const t=new r.AcDbLeader;return e.vertices.forEach(o=>{t.appendVertex(o)}),t.hasArrowHead=e.isArrowheadEnabled,t.hasHookLine=e.isHooklineExists,t.isHookLineSameDirection=e.isHooklineSameDirection,t.isSplined=e.isSpline,t.dimensionStyle=e.styleName??"",t.annoType=e.leaderCreationFlag,e.textHeight!=null&&(t.textHeight=e.textHeight),e.textWidth!=null&&(t.textWidth=e.textWidth),e.byBlockColor!=null&&(t.byBlockColor=e.byBlockColor),e.associatedAnnotation&&(t.associatedAnnotation=e.associatedAnnotation),e.normal&&(t.normal=e.normal),e.horizontalDirection&&(t.horizontalDirection=e.horizontalDirection),e.offsetFromBlock&&(t.offsetFromBlock=e.offsetFromBlock),e.offsetFromAnnotation&&(t.offsetFromAnnotation=e.offsetFromAnnotation),t}convertMLine(e){const t=new r.AcDbMLine;return t.styleName=e.mlineStyle||"STANDARD",t.scale=e.scale,t.flags=e.flags,t.justification=e.justification,t.startPosition=e.startPoint,t.normal=e.extrusionDirection??r.AcGeVector3d.Z_AXIS,t.styleCount=e.numberOfLines??0,t.segments=(e.vertices??[]).map(o=>({position:o.vertex,direction:o.vertexDirection,miterDirection:o.miterDirection,elements:(o.lines??[]).map(n=>({parameterCount:n.numberOfSegmentParams,parameters:n.segmentParams??[],fillCount:n.numberOfAreaFillParams,fillParameters:n.areaFillParams??[]}))})),t}convertMLeader(e){var S,P;const t=new r.AcDbMLeader,o=e;t.version=e.version,t.leaderStyleId=e.leaderStyleId,e.leaderStyleId&&(t.mleaderStyleId=e.leaderStyleId),t.propertyOverrideFlag=e.propertyOverrideFlag,t.leaderLineType=e.leaderLineType??r.AcDbMLeaderLineType.StraightLeader,e.leaderLineColor!=null&&(t.leaderLineColor=this.convertMLeaderEntityColor(e.leaderLineColor)),t.leaderLineTypeId=e.leaderLineTypeId,t.leaderLineWeight=e.leaderLineWeight,t.landingEnabled=e.landingEnabled,t.doglegEnabled=e.doglegEnabled??!1,t.doglegLength=e.doglegLength??0,t.arrowheadId=e.arrowheadId,t.arrowheadSize=e.arrowheadSize,t.textStyleId=e.textStyleId,t.textLeftAttachmentType=e.textLeftAttachmentType,t.textRightAttachmentType=e.textRightAttachmentType,t.textAngleType=e.textAngleType,t.textAlignmentType=e.textAlignmentType,e.textColor!=null&&(t.textColor=this.convertMLeaderEntityColor(e.textColor)),t.textFrameEnabled=e.textFrameEnabled,t.landingGap=e.landingGap,t.textAttachment=e.textAttachment,t.textFlowDirection=e.textFlowDirection,this.isValidHandleId(e.blockContentId)&&(t.blockContentId=e.blockContentId),e.blockContentColor!=null&&(t.blockContentColor=this.convertMLeaderEntityColor(e.blockContentColor)),t.blockContentRotation=e.blockContentRotation,t.blockContentConnectionType=e.blockContentConnectionType,t.annotativeScaleEnabled=e.annotativeScaleEnabled,t.arrowheadOverrides=e.arrowheadOverrides?e.arrowheadOverrides.map(p=>({...p})):[],t.blockAttributes=e.blockAttributes?e.blockAttributes.map(p=>({...p})):[],t.textDirectionNegative=e.textDirectionNegative,t.textAlignInIPE=e.textAlignInIPE,t.bottomTextAttachmentDirection=e.bottomTextAttachmentDirection,t.topTextAttachmentDirection=e.topTextAttachmentDirection,t.contentScale=e.contentScale,t.textLineSpacingStyle=e.textLineSpacingStyle,e.textBackgroundColor!=null&&(t.textBackgroundColor=this.convertMLeaderEntityColor(e.textBackgroundColor)),t.textBackgroundScaleFactor=e.textBackgroundScaleFactor,t.textBackgroundTransparency=e.textBackgroundTransparency,t.textBackgroundColorOn=e.textBackgroundColorOn,t.textFillOn=e.textFillOn,t.textColumnType=e.textColumnType,t.textUseAutoHeight=e.textUseAutoHeight,t.textColumnWidth=e.textColumnWidth,t.textColumnGutterWidth=e.textColumnGutterWidth,t.textColumnFlowReversed=e.textColumnFlowReversed,t.textColumnHeight=e.textColumnHeight,t.textUseWordBreak=e.textUseWordBreak,t.hasMText=e.hasMText,t.hasBlock=e.hasBlock,t.planeNormalReversed=e.planeNormalReversed,e.blockContentScale&&(t.blockContentScale=new r.AcGeVector3d(e.blockContentScale)),e.contentBasePosition&&(t.contentBasePosition=new r.AcGePoint3d().copy(e.contentBasePosition)),e.textAnchor&&(t.textAnchor=new r.AcGePoint3d().copy(e.textAnchor)),e.planeOrigin&&(t.planeOrigin=new r.AcGePoint3d().copy(e.planeOrigin)),e.planeXAxisDirection&&(t.planeXAxisDirection=new r.AcGeVector3d(e.planeXAxisDirection)),e.planeYAxisDirection&&(t.planeYAxisDirection=new r.AcGeVector3d(e.planeYAxisDirection));const n=o.textContent,i=n&&typeof n=="object"?n:void 0,s=typeof n=="string"&&n.length>0||this.readString(i??{},["text","contents"])!=null||this.readString(o,["text","contents","mtext"])!=null,l=e.contentType??(s?r.AcDbMLeaderContentType.MTextContent:e.blockContent?r.AcDbMLeaderContentType.BlockContent:r.AcDbMLeaderContentType.NoneContent);t.contentType=l;const a=this.readPoint(o,["normal","extrusionDirection"]);a&&(t.normal=a);const c=this.readString(i??{},["styleName","textStyleName","textStyle"])??this.readString(o,["textStyleName","textStyle","styleName"]);c&&(t.textStyleName=c);const f=this.readPositiveNumber(i??{},["textHeight","height"])??this.readPositiveNumber(o,["textHeight","mtextHeight","textContentHeight"])??this.readPositiveNumber(o,["arrowheadSize","contentScale"]);f!=null&&(t.textHeight=f);const u=this.readPositiveNumber(i??{},["textWidth","width"])??this.readPositiveNumber(o,["textWidth","mtextWidth","textContentWidth"]);u!=null&&(t.textWidth=u),t.textLineSpacingFactor=this.readNumber(i??{},["lineSpacingFactor","textLineSpacingFactor"])??this.readNumber(o,["textLineSpacingFactor"])??t.textLineSpacingFactor;const h=this.readNumber(i??{},["textRotation","rotation"])??this.readNumber(o,["textRotation","mtextRotation","textContentRotation"]);h!=null&&(t.textRotation=h);const d=this.readPoint(o,["textDirection","mtextDirection","textDirectionVector"]);d&&(t.textDirection=d);const g=this.readNumber(o,["textAttachmentPoint","attachmentPoint"]);g!=null&&g!==0&&(t.textAttachmentPoint=g);const A=e.textAttachmentDirection;A!=null&&(t.textAttachmentDirection=A);const b=this.readNumber(o,["textDrawingDirection","drawingDirection"]);b!=null&&(t.textDrawingDirection=b);const x=typeof n=="string"?n:this.readString(i??{},["text","contents"])??this.readString(o,["text","contents","mtext"]),C=this.readPoint(i??{},["anchorPoint","textAnchor","textLocation","textPosition","textAnchorPoint"])??this.readPoint(o,["textAnchor","textLocation","textPosition","textAnchorPoint","contentBasePosition"]);if(x!=null&&C&&(t.mtextContent={text:x,anchorPoint:C}),e.blockContent){const p=e.blockContent,I=e.blockContent.blockContentId;if(this.isValidHandleId(I)){const m=this.readMLeaderEntityColor(p,["color"]);t.blockContent={blockContentId:I,normal:this.readPoint(p,["normal"]),position:e.blockContent.position,scale:this.readPoint(p,["scale"]),rotation:this.readNumber(p,["rotation"]),color:m,transformationMatrix:Array.isArray(e.blockContent.transformationMatrix)?e.blockContent.transformationMatrix:[]}}}else this.isValidHandleId(e.blockContentId)&&(t.blockContent={blockContentId:e.blockContentId,scale:e.blockContentScale,rotation:e.blockContentRotation,color:t.blockContentColor,transformationMatrix:[]});return(S=this.readMLeaderLeaders(o))==null||S.forEach(p=>{t.addLeader({lastLeaderLinePoint:p.lastLeaderLinePoint,lastLeaderLinePointSet:p.lastLeaderLinePointSet,doglegVector:p.doglegVector,doglegVectorSet:p.doglegVectorSet,doglegLength:p.doglegLength??e.doglegLength,breaks:p.breaks,leaderBranchIndex:p.leaderBranchIndex,leaderLines:p.leaderLines})}),t.numberOfLeaders===0&&((P=this.readLeaderLineArray(o))==null||P.forEach(p=>{t.addLeader({doglegLength:e.doglegLength}),t.addLeaderLine(t.numberOfLeaders-1,p)})),t.numberOfLeaders===0&&e.contentBasePosition&&t.addLeader({lastLeaderLinePoint:e.contentBasePosition,lastLeaderLinePointSet:!0,doglegLength:e.doglegLength}),t}convertDimension(e){if(e.subclassMarker=="AcDbAlignedDimension"){const t=e,o=new r.AcDbAlignedDimension(t.subDefinitionPoint1,t.subDefinitionPoint2,t.definitionPoint);return t.insertionPoint&&(o.dimBlockPosition={x:t.insertionPoint.x,y:t.insertionPoint.y,z:0}),o.rotation=t.rotationAngle,this.processDimensionCommonAttrs(e,o),o}else if(e.subclassMarker=="AcDbRotatedDimension"){const t=e,o=new r.AcDbRotatedDimension(t.subDefinitionPoint1,t.subDefinitionPoint2,t.definitionPoint);return t.insertionPoint&&(o.dimBlockPosition={x:t.insertionPoint.x,y:t.insertionPoint.y,z:0}),o.rotation=t.rotationAngle,this.processDimensionCommonAttrs(e,o),o}else if(e.subclassMarker=="AcDb3PointAngularDimension"){const t=e,o=new r.AcDb3PointAngularDimension(t.centerPoint,t.subDefinitionPoint1,t.subDefinitionPoint2,t.definitionPoint);return this.processDimensionCommonAttrs(e,o),o}else if(e.subclassMarker=="AcDb2LineAngularDimension"){const t=e,o=t.definitionPoint??t.arcPoint??t.subDefinitionPoint2,n=t.centerPoint??t.subDefinitionPoint2??t.subDefinitionPoint1,i=n??o,s=t.subDefinitionPoint1??n??o,l=t.subDefinitionPoint2??n??o;if(!o||!t.name)return null;const a=new r.AcDb3PointAngularDimension(i,s,l,o);return this.processDimensionCommonAttrs(e,a),a}else if(e.subclassMarker=="AcDbOrdinateDimension"){const t=e,o=new r.AcDbOrdinateDimension(t.subDefinitionPoint1,t.subDefinitionPoint2);return this.processDimensionCommonAttrs(e,o),o}else if(e.subclassMarker=="AcDbRadialDimension"){const t=e,o=new r.AcDbRadialDimension(t.definitionPoint,t.centerPoint,t.leaderLength);return this.processDimensionCommonAttrs(e,o),o}else if(e.subclassMarker=="AcDbDiametricDimension"){const t=e,o=new r.AcDbDiametricDimension(t.definitionPoint,t.centerPoint,t.leaderLength);return this.processDimensionCommonAttrs(e,o),o}return null}processImage(e,t){t.position.copy(e.position),t.brightness=e.brightness,t.contrast=e.contrast,t.fade=e.fade,t.imageSize.copy(e.imageSize),t.imageDefId=e.imageDefHandle,t.isClipped=e.clipping>0,t.isShownClipped=(e.flags&4)!==0,t.isImageShown=(e.flags&3)!==0,t.isImageTransparent=(e.flags&8)!==0,e.clippingBoundaryPath.forEach(o=>{t.clipBoundary.push(new r.AcGePoint2d(o))}),t.clipBoundaryType=e.clippingBoundaryType,t.width=Math.sqrt(e.uPixel.x**2+e.uPixel.y**2+e.uPixel.z**2)*e.imageSize.x,t.height=Math.sqrt(e.vPixel.x**2+e.vPixel.y**2+e.vPixel.z**2)*e.imageSize.y,t.rotation=Math.atan2(e.uPixel.y,e.uPixel.x)}convertImage(e){const t=new r.AcDbRasterImage;return this.processImage(e,t),t}convertWipeout(e){const t=new r.AcDbWipeout;return this.processImage(e,t),t}convertOleFrame(e){const t=new r.AcDbOleFrame;if(t.oleVersion=e.flag??0,e.binaryData){const o=r.acdbHexStringsToBytes([e.binaryData]);t.loadOleObjectFromDxf(e.dataSize,o)}return t}convertOle2Frame(e){const t=new r.AcDbOle2Frame;if(t.oleVersion=e.oleVersion??0,t.userType=e.oleClient??"",e.leftUpPoint&&t.upperLeftCorner.copy(e.leftUpPoint),e.rightDownPoint&&t.lowerRightCorner.copy(e.rightDownPoint),t.setLockAspect(e.lockAspect??0),t.oleObjectType=e.oleObjectType??r.AcDbOleObjectType.Embedded,t.tileMode=e.tileModeDescriptor??r.AcDbOleTileMode.ModelSpace,e.binaryData){const o=r.acdbHexStringsToBytes([e.binaryData]);t.loadOleObjectFromDxf(e.dataSize,o)}return t}convertViewport(e){const t=new r.AcDbViewport;t.number=e.viewportId,t.centerPoint.copy(e.viewportCenter),t.height=e.height,t.width=e.width,t.viewCenter.copy(e.displayCenter),t.viewHeight=e.viewHeight,e.targetPoint&&t.viewTarget.copy(e.targetPoint),e.viewTwistAngle!=null&&(t.viewTwistAngle=e.viewTwistAngle);const o=1e-6,n=Math.abs(t.centerPoint.x)<o&&Math.abs(t.centerPoint.y)<o,i=t.viewTarget,s=Math.abs(i.x)<o&&Math.abs(i.y)<o,l=Number.isFinite(t.height)&&Number.isFinite(t.viewHeight)&&Math.abs(t.viewHeight-t.height)<o;return n&&s&&l&&t.centerPoint.copy(t.viewCenter),t}convertRay(e){const t=new r.AcDbRay;return t.basePoint.copy(e.firstPoint),t.unitDir.copy(e.unitDirection),t}convertXline(e){const t=new r.AcDbXline;return t.basePoint.copy(e.firstPoint),t.unitDir.copy(e.unitDirection),t}convertAttributeCommon(e,t){const o=e.text;t.textString=o.text,t.styleName=o.styleName,t.height=o.textHeight,t.position.copy(o.startPoint);const n=e.alignmentPoint??o.endPoint,i=!n||n.x===0&&n.y===0&&(n.z??0)===0;n&&!i?t.alignmentPoint.copy(n):t.alignmentPoint.copy(o.startPoint),t.rotation=o.rotation,t.oblique=o.obliqueAngle??0,t.thickness=o.thickness,t.horizontalMode=o.halign,t.verticalMode=o.valign,t.widthFactor=o.xScale??1,t.tag=e.tag,t.fieldLength=e.fieldLength,t.isInvisible=(e.flags&r.AcDbAttributeFlags.Invisible)!==0,t.isConst=(e.flags&r.AcDbAttributeFlags.Const)!==0,t.isVerifiable=(e.flags&r.AcDbAttributeFlags.Verifiable)!==0,t.isPreset=(e.flags&r.AcDbAttributeFlags.Preset)!==0,t.lockPositionInBlock=e.lockPositionFlag,t.isReallyLocked=e.isReallyLocked,t.isMTextAttribute=(e.mtextFlag&r.AcDbAttributeMTextFlag.MultiLine)!==0,t.isConstMTextAttribute=(e.mtextFlag&r.AcDbAttributeMTextFlag.ConstMultiLine)!==0}convertAttribute(e){const t=new r.AcDbAttribute;return this.convertAttributeCommon(e,t),t}convertAttributeDefinition(e){const t=new r.AcDbAttributeDefinition;return this.convertAttributeCommon(e,t),t.prompt=e.prompt,t}convertBlockReference(e){const t=new r.AcDbBlockReference(e.name);return e.insertionPoint&&t.position.copy(e.insertionPoint),t.scaleFactors.x=e.xScale,t.scaleFactors.y=e.yScale,t.scaleFactors.z=e.zScale,t.rotation=e.rotation,t.normal.copy(e.extrusionDirection),e.columnCount!=null&&(t.columnCount=e.columnCount),e.rowCount!=null&&(t.rowCount=e.rowCount),e.columnSpacing!=null&&(t.columnSpacing=e.columnSpacing),e.rowSpacing!=null&&(t.rowSpacing=e.rowSpacing),e.handle!=null&&(t.objectId=e.handle),e.attribs&&e.attribs.forEach(o=>{const n=this.convert(o);n instanceof r.AcDbAttribute&&t.appendAttributes(n)}),t}processDimensionCommonAttrs(e,t){t.dimBlockId=e.name,t.textPosition.copy(e.textPoint),t.textRotation=e.textRotation||0,e.textLineSpacingFactor&&(t.textLineSpacingFactor=e.textLineSpacingFactor),e.textLineSpacingStyle&&(t.textLineSpacingStyle=e.textLineSpacingStyle),t.dimensionStyleName=e.styleName,t.dimensionText=e.text||"",t.measurement=e.measurement}processCommonAttrs(e,t){if(t.layer=e.layer||"0",t.objectId=e.handle,e.ownerBlockRecordSoftId!=null&&(t.ownerId=e.ownerBlockRecordSoftId),e.lineType!=null&&(t.lineType=e.lineType),e.lineweight!=null&&(t.lineWeight=e.lineweight),e.lineTypeScale!=null&&(t.linetypeScale=e.lineTypeScale),e.color!=null||e.colorIndex!=null||e.colorName){const o=new r.AcCmColor;e.color!=null&&o.setRGBValue(e.color),e.colorIndex!=null&&(e.color==null||e.colorIndex===7)&&(o.colorIndex=e.colorIndex),e.colorName&&(o.colorName=e.colorName),t.color=o}if(e.isVisible!=null&&(t.visibility=e.isVisible),e.transparency!=null){const o=new r.AcCmTransparency;o.method=e.transparencyType,(o.isByBlock||o.isByBlock)&&(o.alpha=e.transparency),t.transparency=o}}convertMLeaderEntityColor(e){return r.acdbDecodeMLeaderStyleRawColor(e)}readMLeaderEntityColor(e,t){for(const o of t){const n=e[o];if(typeof n=="number"&&Number.isFinite(n))return r.acdbDecodeMLeaderStyleRawColor(n)}}isValidHandleId(e){return e!=null&&e!==""&&e!=="0"}readNumber(e,t){for(const o of t){const n=e[o];if(typeof n=="number"&&Number.isFinite(n))return n}}readPositiveNumber(e,t){const o=this.readNumber(e,t);return o!=null&&o>0?o:void 0}readString(e,t){for(const o of t){const n=e[o];if(typeof n=="string")return n}}readBoolean(e,t){for(const o of t){const n=e[o];if(typeof n=="boolean")return n;if(typeof n=="number")return n!==0}}readPoint(e,t){for(const o of t){const n=e[o];if(this.isPointLike(n))return n;if(Array.isArray(n)&&typeof n[0]=="number"&&typeof n[1]=="number")return{x:n[0],y:n[1],z:n[2]??0}}}readLeaderLineArray(e){const t=e.leaderLines;if(Array.isArray(t))return t.map(n=>{if(!n||typeof n!="object")return;const i=n.vertices;return Array.isArray(i)?i.filter(s=>this.isPointLike(s)):void 0}).filter(n=>!!n&&n.length>0);const o=e.vertices;if(Array.isArray(o)){const n=o.filter(i=>this.isPointLike(i));return n.length>0?[n]:void 0}}readMLeaderLeaders(e){const t=e.leaderSections;if(!Array.isArray(t))return;const o=[];return t.forEach(n=>{if(!n||typeof n!="object")return;const i=n,s=i.leaderLines,l=Array.isArray(s)?s.reduce((g,A)=>{const b=this.readMLeaderLine(A);return b&&g.push(b),g},[]):void 0,a={},c=this.readPoint(i,["lastLeaderLinePoint"]),f=this.readPoint(i,["doglegVector"]),u=this.readNumber(i,["doglegLength"]),h=this.readMLeaderBreaks(i.breaks),d=this.readNumber(i,["leaderBranchIndex"]);c&&(a.lastLeaderLinePoint=c),i.lastLeaderLinePointSet!=null&&(a.lastLeaderLinePointSet=this.readBoolean(i,["lastLeaderLinePointSet"])),f&&(a.doglegVector=f),i.doglegVectorSet!=null&&(a.doglegVectorSet=this.readBoolean(i,["doglegVectorSet"])),u!=null&&(a.doglegLength=u),h&&(a.breaks=h),d!=null&&(a.leaderBranchIndex=d),l&&(a.leaderLines=l),o.push(a)}),o}readMLeaderLine(e){if(!e||typeof e!="object")return;const t=e,o=t.vertices,n=Array.isArray(o)?o.filter(a=>this.isPointLike(a)):[],i=this.readMLeaderBreaks(t.breaks),s=Array.isArray(t.breakPointIndexes)?t.breakPointIndexes.filter(a=>typeof a=="number"):void 0,l=this.readNumber(t,["leaderLineIndex"]);return n.length>0||i&&i.length>0?{vertices:n,breakPointIndexes:s,leaderLineIndex:l,breaks:i}:void 0}readMLeaderBreaks(e){if(!Array.isArray(e))return;const t=e.map(o=>{if(!o||typeof o!="object")return;const n=o,i=this.readPoint(n,["start"]),s=this.readPoint(n,["end"]),l=this.readNumber(n,["index"]);if(!i||!s)return;const a={start:i,end:s};return l!=null&&(a.index=l),a}).filter(o=>!!o);return t.length>0?t:void 0}isPointLike(e){return!!e&&typeof e=="object"&&typeof e.x=="number"&&typeof e.y=="number"}}class L{convertMLeaderStyle(e){const t=new r.AcDbMLeaderStyle;return t.unknown1=e.unknown1,e.contentType!=null&&(t.contentType=e.contentType),e.drawMLeaderOrderType!=null&&(t.drawMLeaderOrderType=e.drawMLeaderOrderType),e.drawLeaderOrderType!=null&&(t.drawLeaderOrderType=e.drawLeaderOrderType),e.maxLeaderSegmentPoints!=null&&(t.maxLeaderSegmentPoints=e.maxLeaderSegmentPoints),e.firstSegmentAngleConstraint!=null&&(t.firstSegmentAngleConstraint=e.firstSegmentAngleConstraint),e.secondSegmentAngleConstraint!=null&&(t.secondSegmentAngleConstraint=e.secondSegmentAngleConstraint),e.leaderLineType!=null&&(t.leaderLineType=e.leaderLineType),e.leaderLineColor!=null&&(t.leaderLineColor=r.acdbDecodeMLeaderStyleRawColor(e.leaderLineColor)),t.leaderLineTypeId=e.leaderLineTypeId,e.leaderLineWeight!=null&&(t.leaderLineWeight=e.leaderLineWeight),e.landingEnabled!=null&&(t.landingEnabled=e.landingEnabled),e.landingGap!=null&&(t.landingGap=e.landingGap),e.doglegEnabled!=null&&(t.doglegEnabled=e.doglegEnabled),e.doglegLength!=null&&(t.doglegLength=e.doglegLength),e.description!=null&&(t.description=e.description),t.arrowheadId=e.arrowheadId,e.arrowheadSize!=null&&(t.arrowheadSize=e.arrowheadSize),e.defaultMTextContents!=null&&(t.defaultMTextContents=e.defaultMTextContents),t.textStyleId=e.textStyleId,e.textLeftAttachmentType!=null&&(t.textLeftAttachmentType=e.textLeftAttachmentType),e.textAngleType!=null&&(t.textAngleType=e.textAngleType),e.textAlignmentType!=null&&(t.textAlignmentType=e.textAlignmentType),e.textRightAttachmentType!=null&&(t.textRightAttachmentType=e.textRightAttachmentType),e.textColor!=null&&(t.textColor=r.acdbDecodeMLeaderStyleRawColor(e.textColor)),e.textHeight!=null&&(t.textHeight=e.textHeight),e.textFrameEnabled!=null&&(t.textFrameEnabled=e.textFrameEnabled),e.textAlignAlwaysLeft!=null&&(t.textAlignAlwaysLeft=e.textAlignAlwaysLeft),e.alignSpace!=null&&(t.alignSpace=e.alignSpace),t.blockContentId=e.blockContentId,e.blockContentColor!=null&&(t.blockContentColor=r.acdbDecodeMLeaderStyleRawColor(e.blockContentColor)),e.blockContentScale&&(t.blockContentScale={x:e.blockContentScale.x,y:e.blockContentScale.y,z:e.blockContentScale.z??1}),e.blockContentScaleEnabled!=null&&(t.blockContentScaleEnabled=e.blockContentScaleEnabled),e.blockContentRotation!=null&&(t.blockContentRotation=e.blockContentRotation),e.blockContentRotationEnabled!=null&&(t.blockContentRotationEnabled=e.blockContentRotationEnabled),e.blockContentConnectionType!=null&&(t.blockContentConnectionType=e.blockContentConnectionType),e.scale!=null&&(t.scale=e.scale),e.overwritePropertyValue!=null&&(t.overwritePropertyValue=e.overwritePropertyValue),e.annotative!=null&&(t.annotative=e.annotative),e.breakGapSize!=null&&(t.breakGapSize=e.breakGapSize),e.textAttachmentDirection!=null&&(t.textAttachmentDirection=e.textAttachmentDirection),e.bottomTextAttachmentDirection!=null&&(t.bottomTextAttachmentDirection=e.bottomTextAttachmentDirection),e.topTextAttachmentDirection!=null&&(t.topTextAttachmentDirection=e.topTextAttachmentDirection),t.unknown2=e.unknown2,this.processCommonAttrs(e,t),t}convertLayerFilter(e){var o;const t=new r.AcDbLayerFilter;return(o=e.layerNames)!=null&&o.length&&(t.layerNames=e.layerNames),this.processCommonAttrs(e,t),t}convertLayerIndex(e){var o,n,i;const t=new r.AcDbLayerIndex;return e.timeStamp!=null&&(t.lastUpdatedAt=e.timeStamp,t.lastUpdatedAtU=e.timeStamp),(o=e.layerNames)!=null&&o.length&&(t.layerNames=e.layerNames),(n=e.idBufferIds)!=null&&n.length&&(t.idBufferIds=e.idBufferIds),(i=e.idBufferEntryCounts)!=null&&i.length&&(t.idBufferEntryCounts=e.idBufferEntryCounts),t.isUptoDate=!0,this.processCommonAttrs(e,t),t}processCommonAttrs(e,t){t.objectId=e.handle,e.ownerHandle!=null&&(t.ownerId=e.ownerHandle)}}const E="*MODEL_SPACE";class w extends r.AcDbDatabaseConverter{constructor(e={}){super(e),this.config.useWorker=!0,this.config.parserWorkerUrl||(this.config.parserWorkerUrl="/assets/libredwg-parser-worker.js")}async parse(e,t){const o=this.config,n=this.getParserWorkerTimeout(e,t);if(o.useWorker&&o.parserWorkerUrl){const i=r.acdbCreateWorkerApi({workerUrl:o.parserWorkerUrl,timeout:n,maxConcurrentWorkers:1}),s=await i.execute(e);return i.destroy(),r.AcDbOpenDatabaseError.throwOnWorkerParseFailure(s),s.data}else throw new Error("dwg converter can run in web worker only!")}getFonts(e){var i,s,l;const t=new Map;e.tables.BLOCK_RECORD.entries.forEach(a=>{t.set(a.name,a)});const o=new Map;for(const a of((i=e.tables.DIMSTYLE)==null?void 0:i.entries)??[]){const c=a.DIMTXSTY;o.set(a.name,typeof c=="string"&&c?c:r.DEFAULT_TEXT_STYLE)}const n=[...e.entities??[]];for(const a of e.tables.BLOCK_RECORD.entries)(s=a.entities)!=null&&s.length&&n.push(...a.entities);return new r.AcDbFontNameCollector({styles:e.tables.STYLE.entries.map(a=>({name:a.name,font:a.font,bigFont:a.bigFont,extendedFont:a.extendedFont,standardFlag:a.standardFlag})),textStyleVar:((l=e.header)==null?void 0:l.TEXTSTYLE)??r.DEFAULT_TEXT_STYLE,includeAllNamedStyleFonts:!1}).collect(n,{getEntityFontInfo:a=>{if(a.type=="MTEXT"){const c=a;return{styleName:c.styleName,formattedText:c.text,resolveStyle:!0}}if(a.type=="TEXT"||a.type=="ATTRIB"||a.type=="ATTDEF")return{styleName:a.styleName,resolveStyle:!0};if(a.type=="SHAPE")return{styleName:a.styleName,resolveStyle:!0};if(a.type=="MULTILEADER"||a.type=="MLEADER"){const c=a,f=typeof c.textContent=="string"?c.textContent:"";return{styleName:typeof c.textStyleName=="string"?c.textStyleName:typeof c.styleName=="string"?c.styleName:void 0,formattedText:f,resolveStyle:!0}}if(a.type=="TOLERANCE"){const c=a;return{styleName:this.resolveDimStyleTextStyle(o,c.styleName),formattedText:typeof c.text=="string"?c.text:"",resolveStyle:!0}}if(a.type=="INSERT")return{blockName:a.name};if(a.type=="DIMENSION"){const c=a;return c.name?{blockName:c.name}:null}return null},getBlockEntities:a=>{var c;return(c=t.get(a))==null?void 0:c.entities}})}resolveDimStyleTextStyle(e,t){const o=t==null?void 0:t.trim();if(!o)return;const n=e.get(o);if(n)return n;const i=o.toUpperCase();for(const[s,l]of e)if(s.toUpperCase()===i)return l}processLineTypes(e,t){e.tables.LTYPE.entries.forEach(n=>{const i={name:n.name,description:n.description,standardFlag:n.standardFlag,totalPatternLength:n.totalPatternLength,pattern:n.pattern},s=new r.AcDbLinetypeTableRecord(i);this.processCommonTableEntryAttrs(n,s),t.tables.linetypeTable.add(s)})}processTextStyles(e,t){e.tables.STYLE.entries.forEach(n=>{const i={name:n.name,standardFlag:n.standardFlag,fixedTextHeight:n.fixedTextHeight,widthFactor:n.widthFactor,obliqueAngle:n.obliqueAngle,textGenerationFlag:n.textGenerationFlag,lastHeight:n.lastHeight,font:n.font,bigFont:n.bigFont,extendedFont:n.extendedFont},s=new r.AcDbTextStyleTableRecord(i);this.processCommonTableEntryAttrs(n,s),t.tables.textStyleTable.add(s)}),t.ensureTextStyleDefaults()}processDimStyles(e,t){e.tables.DIMSTYLE.entries.forEach(n=>{const i={name:n.name,ownerId:n.ownerHandle,dimpost:n.DIMPOST||"",dimapost:n.DIMAPOST||"",dimscale:n.DIMSCALE,dimasz:n.DIMASZ,dimexo:n.DIMEXO,dimdli:n.DIMDLI,dimexe:n.DIMEXE,dimrnd:n.DIMRND,dimdle:n.DIMDLE,dimtp:n.DIMTP,dimtm:n.DIMTM,dimtxt:n.DIMTXT,dimcen:n.DIMCEN,dimtsz:n.DIMTSZ,dimaltf:n.DIMALTF,dimlfac:n.DIMLFAC,dimtvp:n.DIMTVP,dimtfac:n.DIMTFAC,dimgap:n.DIMGAP,dimaltrnd:n.DIMALTRND,dimtol:n.DIMTOL==null||n.DIMTOL==0?0:1,dimlim:n.DIMLIM==null||n.DIMLIM==0?0:1,dimtih:n.DIMTIH==null||n.DIMTIH==0?0:1,dimtoh:n.DIMTOH==null||n.DIMTOH==0?0:1,dimse1:n.DIMSE1==null||n.DIMSE1==0?0:1,dimse2:n.DIMSE2==null||n.DIMSE2==0?0:1,dimtad:n.DIMTAD,dimzin:n.DIMZIN,dimazin:n.DIMAZIN,dimalt:n.DIMALT,dimaltd:n.DIMALTD,dimtofl:n.DIMTOFL,dimsah:n.DIMSAH,dimtix:n.DIMTIX,dimsoxd:n.DIMSOXD,dimclrd:n.DIMCLRD,dimclre:n.DIMCLRE,dimclrt:n.DIMCLRT,dimadec:n.DIMADEC||0,dimunit:n.DIMUNIT||2,dimdec:n.DIMDEC,dimtdec:n.DIMTDEC,dimaltu:n.DIMALTU,dimalttd:n.DIMALTTD,dimaunit:n.DIMAUNIT,dimfrac:n.DIMFRAC,dimlunit:n.DIMLUNIT,dimdsep:n.DIMDSEP||".",dimtmove:n.DIMTMOVE||0,dimjust:n.DIMJUST,dimsd1:n.DIMSD1,dimsd2:n.DIMSD2,dimtolj:n.DIMTOLJ,dimtzin:n.DIMTZIN,dimaltz:n.DIMALTZ,dimalttz:n.DIMALTTZ,dimfit:n.DIMFIT||0,dimupt:n.DIMUPT,dimatfit:n.DIMATFIT,dimtxsty:r.DEFAULT_TEXT_STYLE,dimldrblk:"",dimblk:n.DIMBLK||"",dimblk1:n.DIMBLK1||"",dimblk2:n.DIMBLK2||"",dimlwd:n.DIMLWD,dimlwe:n.DIMLWE},s=new r.AcDbDimStyleTableRecord(i);this.processCommonTableEntryAttrs(n,s),t.tables.dimStyleTable.add(s)})}processLayers(e,t){e.tables.LAYER.entries.forEach(n=>{const i=new r.AcCmColor;i.colorIndex=n.colorIndex;const s=new r.AcDbLayerTableRecord({name:n.name,standardFlags:n.standardFlag,linetype:n.lineType,lineWeight:n.lineweight,isOff:n.off,color:i,isPlottable:n.plotFlag!=0});this.processCommonTableEntryAttrs(n,s),t.tables.layerTable.add(s)})}processViewports(e,t){e.tables.VPORT.entries.forEach(n=>{const i=new r.AcDbViewportTableRecord;this.processCommonTableEntryAttrs(n,i),n.circleSides&&(i.circleSides=n.circleSides),i.standardFlag=n.standardFlag,i.center.copy(n.center??r.VPORT_FALLBACK_CENTER_2D),i.lowerLeftCorner.copy(n.lowerLeftCorner??r.VPORT_FALLBACK_LLC),i.upperRightCorner.copy(n.upperRightCorner??r.VPORT_FALLBACK_URC),n.snapBasePoint&&i.snapBase.copy(n.snapBasePoint),n.snapRotationAngle&&(i.snapAngle=n.snapRotationAngle),n.snapSpacing&&i.snapIncrements.copy(n.snapSpacing),n.majorGridLines&&(i.gridMajor=n.majorGridLines),n.gridSpacing&&i.gridIncrements.copy(n.gridSpacing),n.backgroundObjectId&&(i.backgroundObjectId=n.backgroundObjectId),i.gsView.center.copy(n.center??r.VPORT_FALLBACK_CENTER_2D),i.gsView.viewDirectionFromTarget.copy(n.viewDirectionFromTarget??r.VPORT_FALLBACK_VIEW_DIR),i.gsView.viewTarget.copy(n.viewTarget??r.VPORT_FALLBACK_VIEW_TARGET),n.lensLength&&(i.gsView.lensLength=n.lensLength),n.frontClippingPlane&&(i.gsView.frontClippingPlane=n.frontClippingPlane),n.backClippingPlane&&(i.gsView.backClippingPlane=n.backClippingPlane),n.viewHeight&&(i.gsView.viewHeight=n.viewHeight);const s=n.aspectRatio;s!=null&&Number.isFinite(s)&&s>0&&(i.gsView.aspectRatio=s),n.viewTwistAngle&&(i.gsView.viewTwistAngle=n.viewTwistAngle),n.frozenLayers&&(i.gsView.frozenLayers=n.frozenLayers),n.styleSheet&&(i.gsView.styleSheet=n.styleSheet),n.renderMode&&(i.gsView.renderMode=n.renderMode),n.viewMode&&(i.gsView.viewMode=n.viewMode),n.ucsIconSetting&&(i.gsView.ucsIconSetting=n.ucsIconSetting),n.ucsOrigin&&i.gsView.ucsOrigin.copy(n.ucsOrigin),n.ucsXAxis&&i.gsView.ucsXAxis.copy(n.ucsXAxis),n.ucsYAxis&&i.gsView.ucsYAxis.copy(n.ucsYAxis),n.orthographicType&&(i.gsView.orthographicType=n.orthographicType),n.shadePlotSetting&&(i.gsView.shadePlotSetting=n.shadePlotSetting),n.shadePlotObjectId&&(i.gsView.shadePlotObjectId=n.shadePlotObjectId),n.visualStyleObjectId&&(i.gsView.visualStyleObjectId=n.visualStyleObjectId),n.isDefaultLightingOn&&(i.gsView.isDefaultLightingOn=n.isDefaultLightingOn),n.defaultLightingType&&(i.gsView.defaultLightingType=n.defaultLightingType),n.brightness&&(i.gsView.brightness=n.brightness),n.contrast&&(i.gsView.contrast=n.contrast),n.ambientColor&&(i.gsView.ambientColor=n.ambientColor),t.tables.viewportTable.add(i)})}processBlockTables(e,t){e.tables.BLOCK_RECORD.entries.forEach(n=>{let i=t.tables.blockTable.getAt(n.name);i||(i=new r.AcDbBlockTableRecord,i.objectId=n.handle,i.name=n.name,i.ownerId=n.ownerHandle,i.layoutId=n.layout,i.flags=r.AcDbBlockTableRecord.sanitizeImportedFlags(n.flags??0),i.blockInsertUnits=n.insertionUnits,i.explodability=n.explodability,i.blockScaling=n.scalability,t.tables.blockTable.add(i)),n.bmpPreview&&(i.previewIcon=r.acdbHexStringsToBytes([n.bmpPreview])),i.origin.copy(n.basePoint),!i.isModelSapce&&n.entities&&n.entities.length>0&&this.processEntitiesInBlock(n.entities,i)})}processBlocks(e,t){}async processEntitiesInBlock(e,t){const o=new y,n=e.length,i=[];for(let s=0;s<n;s++){const l=e[s],a=o.convert(l);a&&i.push(a)}t.appendEntity(i)}async processEntities(e,t,o,n,i){const s=new y;let l=[];e.tables.BLOCK_RECORD.entries.forEach(u=>{this.isModelSpace(u.name)&&(l=u.entities)});const a=l.length,c=new r.AcDbBatchProcessing(a,100-n.value,o);this.config.convertByEntityType&&(l=this.groupAndFlattenByType(l));const f=t.tables.blockTable.modelSpace;await c.processChunk(async(u,h)=>{const d=[];for(let g=u;g<h;g++){const A=l[g],b=s.convert(A);b&&d.push(b)}if(f.appendEntity(d),i){let g=n.value+h/a*(100-n.value);g>100&&(g=100),await i(g,"ENTITY","IN-PROGRESS")}})}processClasses(e,t){var o;(o=e.classes)!=null&&o.length&&(t.classes=e.classes.map(n=>({name:n.dxfName,cppClassName:n.cppName,appName:n.appName,proxyFlag:n.capabilitiesFlag,instanceCount:n.instanceCount,wasProxy:n.wasAProxyFlag,isEntity:n.isAnEntityFlag})))}processHeader(e,t){const o=e.thumbnailImage;o!=null&&o.length&&(t.thumbnailImage=o);const n=e.header;n.CECOLOR&&(n.CECOLOR.index>=0&&n.CECOLOR.index<=256?t.cecolor.colorIndex=n.CECOLOR.index:t.cecolor.setRGBValue(n.CECOLOR.rgb)),t.angbase=n.ANGBASE??0,t.angdir=n.ANGDIR??0,t.aunits=n.AUNITS??0,n.AUPREC!=null&&(t.auprec=n.AUPREC),n.LUNITS!=null&&(t.lunits=n.LUNITS),n.LUPREC!=null&&(t.luprec=n.LUPREC),n.UNITMODE!=null&&(t.unitmode=n.UNITMODE),n.MEASUREMENT!=null&&(t.measurement=n.MEASUREMENT),t.celtype=n.CELTYPE??r.ByLayer,t.celtscale=n.CELTSCALE??1,t.ltscale=n.LTSCALE??1,n.EXTMAX&&(t.extmax=n.EXTMAX),n.EXTMIN&&(t.extmin=n.EXTMIN),t.insunits=n.INSUNITS??1,t.pdmode=n.PDMODE??0,t.pdsize=n.PDSIZE??0,t.textstyle=n.TEXTSTYLE??r.DEFAULT_TEXT_STYLE;const i=this.normalizeHeaderStringValue(n.CMLEADERSTYLE)??r.DEFAULT_MLEADER_STYLE;t.cmleaderstyle=i}processCommonTableEntryAttrs(e,t){t.name=e.name,t.objectId=e.handle,e.ownerHandle!=null&&(t.ownerId=e.ownerHandle)}processObjects(e,t){this.processLayouts(e,t),this.processImageDefs(e,t),this.processLayerFilters(e,t),this.processLayerIndexes(e,t),this.processLayerFilterTree(e,t),this.processMLeaderStyles(e,t)}processLayerFilterTree(e,t){const o=e.objects.DICTIONARY,n=e.objects.XRECORD;if(!(o!=null&&o.length)||!(n!=null&&n.length))return;const i=c=>c?String(c).trim().toUpperCase():"",s=new Map;o.forEach(c=>{const f={},u=c.entries??{};for(const h in u){const d=u[h];h&&d&&(f[h]=i(String(d)))}s.set(i(c.handle),{handle:i(c.handle),ownerObjectId:i(c.ownerHandle),entries:f})});const l=new Map;n.forEach(c=>{l.set(i(c.handle),{handle:i(c.handle),ownerObjectId:i(c.ownerHandle),extensionDictionaryId:i(c.extensionDictionary),data:(c.data??[]).map(f=>({code:Number(f.code),value:f.value}))})});const a=r.acdbReadLayerFilterTree({dictionaries:s,xrecords:l});a.root.getNestedFilters().length>0&&(t.layerFilters=a)}processLayouts(e,t){const o=t.objects.layout;e.objects.LAYOUT.forEach(i=>{const s=new r.AcDbLayout;s.layoutName=i.layoutName,s.tabOrder=i.tabOrder;const l=t.tables.blockTable.newIterator();s.objectId=i.handle;for(const a of l)if(a.layoutId===s.objectId){s.blockTableRecordId=a.objectId;break}s.blockTableRecordId||i.layoutName==="Model"&&(s.blockTableRecordId=t.tables.blockTable.modelSpace.objectId),s.limits.min.copy(i.minLimit),s.limits.max.copy(i.maxLimit),s.extents.min.copy(i.minExtent),s.extents.max.copy(i.maxExtent),i.viewportId&&s.viewportArray.push(i.viewportId),this.processCommonObjectAttrs(i,s),o.setAt(s.layoutName,s)})}processImageDefs(e,t){const o=t.objects.imageDefinition;e.objects.IMAGEDEF.forEach(i=>{const s=new r.AcDbRasterImageDef;s.sourceFileName=i.fileName,this.processCommonObjectAttrs(i,s),o.setAt(s.objectId,s)})}processLayerFilters(e,t){const o=e.objects.LAYER_FILTER;if(!(o!=null&&o.length))return;const n=t.objects.layerFilter,i=new L;o.forEach(s=>{const l=i.convertLayerFilter(s);n.setAt(l.objectId,l)})}processLayerIndexes(e,t){const o=e.objects.LAYER_INDEX;if(!(o!=null&&o.length))return;const n=t.objects.layerIndex,i=new L;o.forEach(s=>{const l=i.convertLayerIndex(s);n.setAt(l.objectId,l)})}processMLeaderStyles(e,t){const o=e.objects.MLEADERSTYLE;if(!(o!=null&&o.length))return;const n=t.objects.mleaderStyle,i=new L;o.forEach(s=>{const l=i.convertMLeaderStyle(s);n.setAt(l.objectId,l)})}processCommonObjectAttrs(e,t){t.objectId=e.handle,e.ownerHandle!=null&&(t.ownerId=e.ownerHandle)}groupAndFlattenByType(e){const t={},o=[];for(const i of e)t[i.type]||(t[i.type]=[],o.push(i.type)),t[i.type].push(i);const n=[];for(const i of o)n.push(...t[i]);return n}isModelSpace(e){return e&&e.toUpperCase()==E}normalizeHeaderStringValue(e){if(typeof e!="string")return;const t=e.trim();return t.length>0?t:void 0}}D.AcDbLibreDwgConverter=w,Object.defineProperty(D,Symbol.toStringTag,{value:"Module"})}));
|
|
@@ -7,9 +7,11 @@ export declare class AcDbLibreDwgConverter extends AcDbDatabaseConverter<DwgData
|
|
|
7
7
|
constructor(config?: AcDbDatabaseConverterConfig);
|
|
8
8
|
protected parse(data: ArrayBuffer, timeout?: number): Promise<AcDbParsingTaskResult<DwgDatabase>>;
|
|
9
9
|
/**
|
|
10
|
-
* Gets
|
|
10
|
+
* Gets fonts referenced by the drawing: shape-definition STYLE fonts plus
|
|
11
|
+
* fonts used by entities in model/paper space and block definitions.
|
|
12
|
+
* Unused named STYLE table fonts are not included.
|
|
11
13
|
* @param dwg dwg database model
|
|
12
|
-
* @returns
|
|
14
|
+
* @returns Normalized font names to preload
|
|
13
15
|
*/
|
|
14
16
|
protected getFonts(dwg: DwgDatabase): string[];
|
|
15
17
|
private resolveDimStyleTextStyle;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcDbLibreDwgConverter.d.ts","sourceRoot":"","sources":["../src/AcDbLibreDwgConverter.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,8BAA8B,EAE9B,YAAY,EACZ,qBAAqB,EACrB,2BAA2B,EAkB3B,qBAAqB,EAkBtB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAIL,WAA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EAAE,WAAW,EAAE,GAAG,EAAE,YAAY;YAIhD,sBAAsB;IAkBpC;;;;OAIG;cACa,eAAe,CAC7B,KAAK,EAAE,WAAW,EAClB,EAAE,EAAE,YAAY,EAChB,gBAAgB,EAAE,MAAM,EACxB,eAAe,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,EAClC,QAAQ,CAAC,EAAE,8BAA8B;IAgD3C,SAAS,CAAC,cAAc,CAAC,KAAK,EAAE,WAAW,EAAE,EAAE,EAAE,YAAY;IAe7D,SAAS,CAAC,aAAa,CAAC,KAAK,EAAE,WAAW,EAAE,EAAE,EAAE,YAAY;IAwC5D,OAAO,CAAC,4BAA4B;IAWpC,SAAS,CAAC,cAAc,CAAC,KAAK,EAAE,WAAW,EAAE,EAAE,EAAE,YAAY;IAS7D;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,sBAAsB;IA8C9B,OAAO,CAAC,cAAc;IAwCtB,OAAO,CAAC,gBAAgB;IAWxB,OAAO,CAAC,mBAAmB;IAY3B,OAAO,CAAC,mBAAmB;IAY3B,OAAO,CAAC,oBAAoB;IAY5B,OAAO,CAAC,wBAAwB;IAUhC;;;;;;;;;;;;OAYG;IACH,OAAO,CAAC,qBAAqB;IAmB7B,OAAO,CAAC,YAAY;IAIpB,OAAO,CAAC,0BAA0B;CAKnC"}
|
|
@@ -133,9 +133,11 @@ var AcDbLibreDwgConverter = /** @class */ (function (_super) {
|
|
|
133
133
|
});
|
|
134
134
|
};
|
|
135
135
|
/**
|
|
136
|
-
* Gets
|
|
136
|
+
* Gets fonts referenced by the drawing: shape-definition STYLE fonts plus
|
|
137
|
+
* fonts used by entities in model/paper space and block definitions.
|
|
138
|
+
* Unused named STYLE table fonts are not included.
|
|
137
139
|
* @param dwg dwg database model
|
|
138
|
-
* @returns
|
|
140
|
+
* @returns Normalized font names to preload
|
|
139
141
|
*/
|
|
140
142
|
AcDbLibreDwgConverter.prototype.getFonts = function (dwg) {
|
|
141
143
|
var e_1, _a, e_2, _b;
|
|
@@ -186,7 +188,10 @@ var AcDbLibreDwgConverter = /** @class */ (function (_super) {
|
|
|
186
188
|
extendedFont: style.extendedFont,
|
|
187
189
|
standardFlag: style.standardFlag
|
|
188
190
|
}); }),
|
|
189
|
-
textStyleVar: (_h = (_g = dwg.header) === null || _g === void 0 ? void 0 : _g.TEXTSTYLE) !== null && _h !== void 0 ? _h : DEFAULT_TEXT_STYLE
|
|
191
|
+
textStyleVar: (_h = (_g = dwg.header) === null || _g === void 0 ? void 0 : _g.TEXTSTYLE) !== null && _h !== void 0 ? _h : DEFAULT_TEXT_STYLE,
|
|
192
|
+
// Large DWGs often list many unused STYLE fonts; only preload shapes plus
|
|
193
|
+
// fonts referenced by the entity walk (used styles / inline overrides).
|
|
194
|
+
includeAllNamedStyleFonts: false
|
|
190
195
|
}).collect(rootEntities, {
|
|
191
196
|
getEntityFontInfo: function (entity) {
|
|
192
197
|
if (entity.type == 'MTEXT') {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcDbLibreDwgConverter.js","sourceRoot":"","sources":["../src/AcDbLibreDwgConverter.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EACL,SAAS,EACT,mBAAmB,EAEnB,oBAAoB,EAEpB,mBAAmB,EAEnB,qBAAqB,EAErB,uBAAuB,EAQvB,qBAAqB,EACrB,qBAAqB,EAErB,oBAAoB,EACpB,UAAU,EACV,uBAAuB,EAGvB,qBAAqB,EAErB,kBAAkB,EAClB,uBAAuB,EAEvB,wBAAwB,EAExB,uBAAuB,EAIvB,OAAO,EACP,qBAAqB,EACrB,kBAAkB,EAClB,wBAAwB,EACxB,kBAAkB,EAClB,kBAAkB,EAClB,uBAAuB,EACvB,0BAA0B,EAC3B,MAAM,uBAAuB,CAAA;AAa9B,OAAO,EAAE,mBAAmB,EAAE,MAA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AAK,CAAA,4BAAA,+CAAE,CAAC;gBAAtB,IAAM,IAAI,kBAAA;gBACb,MAAM,CAAC,IAAI,OAAX,MAAM,2BAAS,MAAM,CAAC,IAAI,CAAC,WAAC;YAC9B,CAAC;;;;;;;;;QACD,OAAO,MAAM,CAAA;IACf,CAAC;IAEO,4CAAY,GAApB,UAAqB,IAAY;QAC/B,OAAO,IAAI,IAAI,IAAI,CAAC,WAAW,EAAE,IAAI,WAAW,CAAA;IAClD,CAAC;IAEO,0DAA0B,GAAlC,UAAmC,KAAc;QAC/C,IAAI,OAAO,KAAK,KAAK,QAAQ;YAAE,OAAO,SAAS,CAAA;QAC/C,IAAM,OAAO,GAAG,KAAK,CAAC,IAAI,EAAE,CAAA;QAC5B,OAAO,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAA;IACjD,CAAC;IACH,4BAAC;AAAD,CAAC,AA9xBD,CAA2C,qBAAqB,GA8xB/D"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mlightcad/libredwg-converter",
|
|
3
|
-
"version": "3.12.
|
|
3
|
+
"version": "3.12.3",
|
|
4
4
|
"license": "GPL-3.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"vite": "^6.4.3",
|
|
42
|
-
"@mlightcad/data-model": "1.12.
|
|
42
|
+
"@mlightcad/data-model": "1.12.3"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
|
-
"@mlightcad/data-model": "1.12.
|
|
45
|
+
"@mlightcad/data-model": "1.12.3"
|
|
46
46
|
},
|
|
47
47
|
"scripts": {
|
|
48
48
|
"analyze": "pnpm run analyze:lib && pnpm run analyze:worker",
|