{
  "version": 3,
  "sources": ["../../../../src/lib/shapes/geo/GeoShapeBody.tsx"],
  "sourcesContent": ["import { TLGeoShape } from '@tldraw/editor'\nimport { PatternFill } from '../shared/PatternFill'\nimport { GeoTypeDefinition, getGeoShapePath } from './getGeoShapePath'\n\nexport function GeoShapeBody({\n\tshape,\n\tshouldScale,\n\tforceSolid,\n\tstrokeColor,\n\tstrokeWidth: unscaledStrokeWidth,\n\tfillColor,\n\tpatternFillFallbackColor,\n\tcustomGeoTypes,\n}: {\n\tshape: TLGeoShape\n\tshouldScale: boolean\n\tforceSolid: boolean\n\tstrokeColor: string\n\tstrokeWidth: number\n\tfillColor: string\n\tpatternFillFallbackColor: string\n\tcustomGeoTypes?: Record<string, GeoTypeDefinition>\n}) {\n\tconst scaleToUse = shouldScale ? shape.props.scale : 1\n\tconst strokeWidth = unscaledStrokeWidth * scaleToUse\n\tconst { dash, fill } = shape.props\n\n\tconst path = getGeoShapePath(shape, unscaledStrokeWidth, customGeoTypes)\n\tconst fillPath =\n\t\tdash === 'draw' && !forceSolid\n\t\t\t? path.toDrawD({ strokeWidth, randomSeed: shape.id, passes: 1, offset: 0, onlyFilled: true })\n\t\t\t: path.toD({ onlyFilled: true })\n\n\treturn (\n\t\t<>\n\t\t\t{fill === 'none' ? null : fill === 'pattern' ? (\n\t\t\t\t<PatternFill\n\t\t\t\t\td={fillPath}\n\t\t\t\t\tfillColor={fillColor}\n\t\t\t\t\tpatternFillFallbackColor={patternFillFallbackColor}\n\t\t\t\t\tscale={scaleToUse}\n\t\t\t\t/>\n\t\t\t) : (\n\t\t\t\t<path fill={fillColor} d={fillPath} />\n\t\t\t)}\n\t\t\t{path.toSvg({\n\t\t\t\tstyle: dash,\n\t\t\t\tstrokeWidth,\n\t\t\t\tforceSolid,\n\t\t\t\trandomSeed: shape.id,\n\t\t\t\tprops: { fill: 'none', stroke: strokeColor },\n\t\t\t})}\n\t\t</>\n\t)\n}\n"],
  "mappings": "AAkCE,mBAEE,KAFF;AAjCF,SAAS,mBAAmB;AAC5B,SAA4B,uBAAuB;AAE5C,SAAS,aAAa;AAAA,EAC5B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,aAAa;AAAA,EACb;AAAA,EACA;AAAA,EACA;AACD,GASG;AACF,QAAM,aAAa,cAAc,MAAM,MAAM,QAAQ;AACrD,QAAM,cAAc,sBAAsB;AAC1C,QAAM,EAAE,MAAM,KAAK,IAAI,MAAM;AAE7B,QAAM,OAAO,gBAAgB,OAAO,qBAAqB,cAAc;AACvE,QAAM,WACL,SAAS,UAAU,CAAC,aACjB,KAAK,QAAQ,EAAE,aAAa,YAAY,MAAM,IAAI,QAAQ,GAAG,QAAQ,GAAG,YAAY,KAAK,CAAC,IAC1F,KAAK,IAAI,EAAE,YAAY,KAAK,CAAC;AAEjC,SACC,iCACE;AAAA,aAAS,SAAS,OAAO,SAAS,YAClC;AAAA,MAAC;AAAA;AAAA,QACA,GAAG;AAAA,QACH;AAAA,QACA;AAAA,QACA,OAAO;AAAA;AAAA,IACR,IAEA,oBAAC,UAAK,MAAM,WAAW,GAAG,UAAU;AAAA,IAEpC,KAAK,MAAM;AAAA,MACX,OAAO;AAAA,MACP;AAAA,MACA;AAAA,MACA,YAAY,MAAM;AAAA,MAClB,OAAO,EAAE,MAAM,QAAQ,QAAQ,YAAY;AAAA,IAC5C,CAAC;AAAA,KACF;AAEF;",
  "names": []
}
