```
import uuid
import random
import time
import json
from typing import List, Optional, Dict, Any
from enum import Enum
from abc import ABC, abstractmethod
import re

# Enums for predefined constants
class StrokeStyle(Enum):
    SOLID = "solid"
    DASHED = "dashed"
    DOTTED = "dotted"

class FillStyle(Enum):
    SOLID = "solid"
    HACHURE = "hachure"
    CROSS_HATCH = "cross-hatch"

class RoundnessType(Enum):
    NONE = 0
    MILD = 1
    MODERATE = 2
    ROUND = 3

class ArrowType(Enum):
    SHARP = "sharp"
    CURVED = "curved"
    ELBOW = "elbow"

class ArrowHead(Enum):
    NONE = "none"
    ARROW = "arrow"
    BAR = "bar"
    TRIANGLE = "triangle"

class FontStyle(Enum):
    COMIC_SANS = "Comic Sans"
    EXCALIFONT = "Excalifont"
    LILITA_ONE = "Lilita One"
    NUNITO = "Nunito"
    NORMAL = "Normal"  # Added 'Normal' for default

class FontFamily(Enum):
    HANDDRAWN = "handdrawn"
    NORMAL = "normal"
    CODE = "code"

class TextAlign(Enum):
    LEFT = "left"
    MIDDLE = "middle"
    RIGHT = "right"

class VerticalAlign(Enum):
    TOP = "top"
    MIDDLE = "middle"
    BOTTOM = "bottom"

# Base class for all elements
class ExcalidrawElement(ABC):
    def __init__(
        self,
        element_type: str,
        x: float,
        y: float,
        width: float,
        height: float,
        stroke_color: str = "#000000",
        background_color: str = "transparent",
        fill_style: FillStyle = FillStyle.SOLID,
        stroke_width: int = 1,
        stroke_style: StrokeStyle = StrokeStyle.SOLID,
        roughness: int = 1,
        opacity: int = 100,
        roundness_type: Optional[RoundnessType] = RoundnessType.NONE,
        angle: float = 0.0,  # Rotation in radians
    ):
        self.id = str(uuid.uuid4()).replace('-', '')
        self.type = element_type
        self.x = x
        self.y = y
        self.width = width
        self.height = height
        self.angle = angle  # Rotation in radians
        self.strokeColor = stroke_color
        self.backgroundColor = background_color
        self.fillStyle = fill_style.value if fill_style else "solid"
        self.strokeWidth = stroke_width
        self.strokeStyle = stroke_style.value if stroke_style else "solid"
        self.roughness = roughness
        self.opacity = opacity
        self.groupIds = []
        self.frameId = None
        self.index = ""  # To be set by the container
        self.roundness = {"type": roundness_type.value} if roundness_type and roundness_type != RoundnessType.NONE else None
        self.seed = random.randint(0, 2**32)
        self.version = 1
        self.versionNonce = random.randint(0, 2**32)
        self.isDeleted = False
        self.boundElements = None
        self.updated = int(time.time() * 1000)
        self.link = None
        self.locked = False

    @abstractmethod
    def to_dict(self, index: str) -> Dict[str, Any]:
        pass

# Rectangle element
class Rectangle(ExcalidrawElement):
    def __init__(self, **kwargs):
        super().__init__(element_type="rectangle", **kwargs)

    def to_dict(self, index: str) -> Dict[str, Any]:
        element = {
            "id": self.id,
            "type": self.type,
            "x": self.x,
            "y": self.y,
            "width": self.width,
            "height": self.height,
            "angle": self.angle,
            "strokeColor": self.strokeColor,
            "backgroundColor": self.backgroundColor,
            "fillStyle": self.fillStyle,
            "strokeWidth": self.strokeWidth,
            "strokeStyle": self.strokeStyle,
            "roughness": self.roughness,
            "opacity": self.opacity,
            "groupIds": self.groupIds,
            "frameId": self.frameId,
            "index": index,
            "seed": self.seed,
            "version": self.version,
            "versionNonce": self.versionNonce,
            "isDeleted": self.isDeleted,
            "boundElements": self.boundElements,
            "updated": self.updated,
            "link": self.link,
            "locked": self.locked,
        }
        if self.roundness is not None:
            element["roundness"] = self.roundness
        return element

# Diamond element
class Diamond(ExcalidrawElement):
    def __init__(self, **kwargs):
        super().__init__(element_type="diamond", **kwargs)

    def to_dict(self, index: str) -> Dict[str, Any]:
        element = {
            "id": self.id,
            "type": self.type,
            "x": self.x,
            "y": self.y,
            "width": self.width,
            "height": self.height,
            "angle": self.angle,
            "strokeColor": self.strokeColor,
            "backgroundColor": self.backgroundColor,
            "fillStyle": self.fillStyle,
            "strokeWidth": self.strokeWidth,
            "strokeStyle": self.strokeStyle,
            "roughness": self.roughness,
            "opacity": self.opacity,
            "groupIds": self.groupIds,
            "frameId": self.frameId,
            "index": index,
            "seed": self.seed,
            "version": self.version,
            "versionNonce": self.versionNonce,
            "isDeleted": self.isDeleted,
            "boundElements": self.boundElements,
            "updated": self.updated,
            "link": self.link,
            "locked": self.locked,
        }
        if self.roundness is not None:
            element["roundness"] = self.roundness
        return element

# Ellipse element
class Ellipse(ExcalidrawElement):
    def __init__(self, **kwargs):
        super().__init__(element_type="ellipse", **kwargs)
        # Ellipse does not use roundness

    def to_dict(self, index: str) -> Dict[str, Any]:
        element = {
            "id": self.id,
            "type": self.type,
            "x": self.x,
            "y": self.y,
            "width": self.width,
            "height": self.height,
            "angle": self.angle,
            "strokeColor": self.strokeColor,
            "backgroundColor": self.backgroundColor,
            "fillStyle": self.fillStyle,
            "strokeWidth": self.strokeWidth,
            "strokeStyle": self.strokeStyle,
            "roughness": self.roughness,
            "opacity": self.opacity,
            "groupIds": self.groupIds,
            "frameId": self.frameId,
            "index": index,
            "seed": self.seed,
            "version": self.version,
            "versionNonce": self.versionNonce,
            "isDeleted": self.isDeleted,
            "boundElements": self.boundElements,
            "updated": self.updated,
            "link": self.link,
            "locked": self.locked,
        }
        # Ellipse does not have roundness
        return element

# Arrow element
class Arrow(ExcalidrawElement):
    def __init__(
        self,
        x: float,
        y: float,
        width: float,
        height: float,
        stroke_color: str = "#000000",
        stroke_width: int = 1,
        stroke_style: StrokeStyle = StrokeStyle.SOLID,
        roughness: int = 1,
        opacity: int = 100,
        arrow_type: ArrowType = ArrowType.SHARP,
        arrow_head_left: ArrowHead = ArrowHead.NONE,
        arrow_head_right: ArrowHead = ArrowHead.ARROW,
        points: Optional[List[List[float]]] = None,
        angle: float = 0.0
    ):
        super().__init__(
            element_type="arrow",
            x=x,
            y=y,
            width=width,
            height=height,
            stroke_color=stroke_color,
            background_color="transparent",  # Arrows typically don't have background colors
            fill_style=FillStyle.SOLID,  # Not used for arrows but required by the base class
            stroke_width=stroke_width,
            stroke_style=stroke_style,
            roughness=roughness,
            opacity=opacity,
            roundness_type=None,  # Arrows don't have roundness
            angle=angle
        )
        self.points = points if points else [
            [0, 0],
            [width, height]
        ]
        self.lastCommittedPoint = None
        self.startBinding = None
        self.endBinding = None
        self.startArrowhead = arrow_head_left.value
        self.endArrowhead = arrow_head_right.value
        self.elbowed = arrow_type == ArrowType.ELBOW

    def to_dict(self, index: str) -> Dict[str, Any]:
        element = super().to_dict(index)
        element.update({
            "points": self.points,
            "lastCommittedPoint": self.lastCommittedPoint,
            "startBinding": self.startBinding,
            "endBinding": self.endBinding,
            "startArrowhead": self.startArrowhead,
            "endArrowhead": self.endArrowhead,
            "elbowed": self.elbowed,
        })
        return element

# Line element
class Line(ExcalidrawElement):
    def __init__(
        self,
        x: float,
        y: float,
        width: float,
        height: float,
        stroke_color: str = "#000000",
        background_color: str = "#b2f2bb",
        fill_style: FillStyle = FillStyle.SOLID,
        stroke_width: int = 2,
        stroke_style: StrokeStyle = StrokeStyle.SOLID,
        roughness: int = 1,
        opacity: int = 100,
        roundness_type: RoundnessType = RoundnessType.MODERATE,
        points: Optional[List[List[float]]] = None,
        angle: float = 0.0
    ):
        super().__init__(
            element_type="line",
            x=x,
            y=y,
            width=width,
            height=height,
            stroke_color=stroke_color,
            background_color=background_color,
            fill_style=fill_style,
            stroke_width=stroke_width,
            stroke_style=stroke_style,
            roughness=roughness,
            opacity=opacity,
            roundness_type=roundness_type,
            angle=angle
        )
        self.points = points if points else [
            [0, 0],
            [width, height]
        ]
        self.lastCommittedPoint = None
        self.startBinding = None
        self.endBinding = None
        self.startArrowhead = ArrowHead.NONE.value
        self.endArrowhead = ArrowHead.NONE.value
        self.elbowed = False  # Lines typically don't have elbowed paths unless specified

    def to_dict(self, index: str) -> Dict[str, Any]:
        element = super().to_dict(index)
        element.update({
            "points": self.points,
            "lastCommittedPoint": self.lastCommittedPoint,
            "startBinding": self.startBinding,
            "endBinding": self.endBinding,
            "startArrowhead": self.startArrowhead,
            "endArrowhead": self.endArrowhead,
            "elbowed": self.elbowed,
        })
        return element

# Text element
class Text(ExcalidrawElement):
    def __init__(
        self,
        x: float,
        y: float,
        text: str,
        font_size: int = 16,
        font_style: FontStyle = FontStyle.NORMAL,
        font_family: FontFamily = FontFamily.NORMAL,
        text_align: TextAlign = TextAlign.LEFT,
        vertical_align: VerticalAlign = VerticalAlign.TOP,
        line_height: float = 1.15,
        stroke_color: str = "#000000",
        background_color: str = "transparent",
        fill_style: FillStyle = FillStyle.SOLID,
        stroke_width: int = 2,
        stroke_style: StrokeStyle = StrokeStyle.SOLID,
        roughness: int = 1,
        opacity: int = 80,
        roundness_type: Optional[RoundnessType] = RoundnessType.NONE,
        angle: float = 0.0
    ):
        super().__init__(
            element_type="text",
            x=x,
            y=y,
            width=0,  # Width is auto-calculated if autoResize is True
            height=0,  # Height is auto-calculated if autoResize is True
            stroke_color=stroke_color,
            background_color=background_color,
            fill_style=fill_style,
            stroke_width=stroke_width,
            stroke_style=stroke_style,
            roughness=roughness,
            opacity=opacity,
            roundness_type=roundness_type,
            angle=angle
        )
        self.text = text
        self.fontSize = font_size
        self.fontStyle = font_style.value
        self.fontFamily = font_family.value
        self.textAlign = text_align.value
        self.verticalAlign = vertical_align.value
        self.lineHeight = line_height
        self.autoResize = True
        self.originalText = text
        self.containerId = None

    def to_dict(self, index: str) -> Dict[str, Any]:
        element = {
            "id": self.id,
            "type": self.type,
            "x": self.x,
            "y": self.y,
            "width": self.width,
            "height": self.height,
            "angle": self.angle,
            "strokeColor": self.strokeColor,
            "backgroundColor": self.backgroundColor,
            "fillStyle": self.fillStyle,
            "strokeWidth": self.strokeWidth,
            "strokeStyle": self.strokeStyle,
            "roughness": self.roughness,
            "opacity": self.opacity,
            "groupIds": self.groupIds,
            "frameId": self.frameId,
            "index": index,
            "seed": self.seed,
            "version": self.version,
            "versionNonce": self.versionNonce,
            "isDeleted": self.isDeleted,
            "boundElements": self.boundElements,
            "updated": self.updated,
            "link": self.link,
            "locked": self.locked,
            "text": self.text,
            "fontSize": self.fontSize,
            "fontFamily": self.fontFamily,
            "textAlign": self.textAlign,
            "verticalAlign": self.verticalAlign,
            "originalText": self.originalText,
            "autoResize": self.autoResize,
            "lineHeight": self.lineHeight
        }
        if self.roundness is not None:
            element["roundness"] = self.roundness
        if self.containerId:
            element["containerId"] = self.containerId
        return element

# Freedraw element
class Freedraw(ExcalidrawElement):
    def __init__(
        self,
        x: float,
        y: float,
        width: float,
        height: float,
        points: Optional[List[List[float]]] = None,
        stroke_color: str = "#000000",
        background_color: str = "transparent",
        fill_style: FillStyle = FillStyle.SOLID,
        stroke_width: int = 2,
        stroke_style: StrokeStyle = StrokeStyle.SOLID,
        roughness: int = 1,
        opacity: int = 100,
        roundness_type: Optional[RoundnessType] = RoundnessType.NONE,
        angle: float = 0.0
    ):
        super().__init__(
            element_type="freedraw",
            x=x,
            y=y,
            width=width,
            height=height,
            stroke_color=stroke_color,
            background_color=background_color,
            fill_style=fill_style,
            stroke_width=stroke_width,
            stroke_style=stroke_style,
            roughness=roughness,
            opacity=opacity,
            roundness_type=roundness_type,
            angle=angle
        )
        self.points = points if points else [
            [0, 0],
            [width, height]
        ]
        self.lastCommittedPoint = None
        self.startBinding = None
        self.endBinding = None
        self.startArrowhead = ArrowHead.NONE.value
        self.endArrowhead = ArrowHead.NONE.value
        self.elbowed = False  # Freedraw typically doesn't have elbowed paths

    def to_dict(self, index: str) -> Dict[str, Any]:
        element = super().to_dict(index)
        element.update({
            "points": self.points,
            "lastCommittedPoint": self.lastCommittedPoint,
            "startBinding": self.startBinding,
            "endBinding": self.endBinding,
            "startArrowhead": self.startArrowhead,
            "endArrowhead": self.endArrowhead,
            "elbowed": self.elbowed,
        })
        return element

# ExcalidrawDocument class
class ExcalidrawDocument:
    def __init__(
        self,
        grid_size: int = 20,
        grid_step: int = 5,
        grid_mode_enabled: bool = False,
        view_background_color: str = "#ffffff"
    ):
        self.elements: List[ExcalidrawElement] = []
        self.appState = {
            "gridSize": grid_size,
            "gridStep": grid_step,
            "gridModeEnabled": grid_mode_enabled,
            "viewBackgroundColor": view_background_color
        }
        self.files: Dict[str, Any] = {}
        self.index_counter = 0  # To keep track of ordering

    def add_rectangle(
        self,
        x: float,
        y: float,
        width: float,
        height: float,
        stroke_color: str = "#000000",
        background_color: str = "transparent",
        stroke_width: int = 1,
        stroke_style: StrokeStyle = StrokeStyle.SOLID,
        fill_style: FillStyle = FillStyle.SOLID,
        roughness: int = 1,
        opacity: int = 100,
        roundness_type: Optional[RoundnessType] = RoundnessType.NONE,
        angle: float = 0.0
    ) -> None:
        self._validate_color(stroke_color)
        self._validate_color(background_color)
        self._validate_dimensions(width, height)

        rectangle = Rectangle(
            x=x,
            y=y,
            width=width,
            height=height,
            stroke_color=stroke_color,
            background_color=background_color,
            stroke_width=stroke_width,
            stroke_style=stroke_style,
            fill_style=fill_style,
            roughness=roughness,
            opacity=opacity,
            roundness_type=roundness_type,
            angle=angle
        )
        self.elements.append(rectangle)

    def add_diamond(
        self,
        x: float,
        y: float,
        width: float,
        height: float,
        stroke_color: str = "#000000",
        background_color: str = "transparent",
        stroke_width: int = 1,
        stroke_style: StrokeStyle = StrokeStyle.SOLID,
        fill_style: FillStyle = FillStyle.SOLID,
        roughness: int = 1,
        opacity: int = 100,
        roundness_type: Optional[RoundnessType] = RoundnessType.NONE,
        angle: float = 0.0
    ) -> None:
        self._validate_color(stroke_color)
        self._validate_color(background_color)
        self._validate_dimensions(width, height)

        diamond = Diamond(
            x=x,
            y=y,
            width=width,
            height=height,
            stroke_color=stroke_color,
            background_color=background_color,
            stroke_width=stroke_width,
            stroke_style=stroke_style,
            fill_style=fill_style,
            roughness=roughness,
            opacity=opacity,
            roundness_type=roundness_type,
            angle=angle
        )
        self.elements.append(diamond)

    def add_ellipse(
        self,
        x: float,
        y: float,
        width: float,
        height: float,
        stroke_color: str = "#000000",
        background_color: str = "transparent",
        stroke_width: int = 1,
        stroke_style: StrokeStyle = StrokeStyle.SOLID,
        fill_style: FillStyle = FillStyle.SOLID,
        roughness: int = 1,
        opacity: int = 100,
        angle: float = 0.0
    ) -> None:
        self._validate_color(stroke_color)
        self._validate_color(background_color)
        self._validate_dimensions(width, height)

        ellipse = Ellipse(
            x=x,
            y=y,
            width=width,
            height=height,
            stroke_color=stroke_color,
            background_color=background_color,
            stroke_width=stroke_width,
            stroke_style=stroke_style,
            fill_style=fill_style,
            roughness=roughness,
            opacity=opacity,
            angle=angle
            # Ellipse does not use roundness
        )
        self.elements.append(ellipse)

    def add_arrow(
        self,
        x: float,
        y: float,
        width: float,
        height: float,
        stroke_color: str = "#000000",
        stroke_width: int = 1,
        stroke_style: StrokeStyle = StrokeStyle.SOLID,
        roughness: int = 1,
        opacity: int = 100,
        arrow_type: ArrowType = ArrowType.SHARP,
        arrow_head_left: ArrowHead = ArrowHead.NONE,
        arrow_head_right: ArrowHead = ArrowHead.ARROW,
        points: Optional[List[List[float]]] = None,
        angle: float = 0.0
    ) -> None:
        self._validate_color(stroke_color)
        self._validate_dimensions(width, height)

        arrow = Arrow(
            x=x,
            y=y,
            width=width,
            height=height,
            stroke_color=stroke_color,
            stroke_width=stroke_width,
            stroke_style=stroke_style,
            roughness=roughness,
            opacity=opacity,
            arrow_type=arrow_type,
            arrow_head_left=arrow_head_left,
            arrow_head_right=arrow_head_right,
            points=points,
            angle=angle
        )
        self.elements.append(arrow)

    def add_line(
        self,
        x: float,
        y: float,
        width: float,
        height: float,
        stroke_color: str = "#000000",
        background_color: str = "#b2f2bb",
        fill_style: FillStyle = FillStyle.SOLID,
        stroke_width: int = 2,
        stroke_style: StrokeStyle = StrokeStyle.SOLID,
        roughness: int = 1,
        opacity: int = 100,
        roundness_type: RoundnessType = RoundnessType.MODERATE,
        points: Optional[List[List[float]]] = None,
        angle: float = 0.0
    ) -> None:
        self._validate_color(stroke_color)
        self._validate_color(background_color)
        self._validate_dimensions(width, height)

        line = Line(
            x=x,
            y=y,
            width=width,
            height=height,
            stroke_color=stroke_color,
            background_color=background_color,
            fill_style=fill_style,
            stroke_width=stroke_width,
            stroke_style=stroke_style,
            roughness=roughness,
            opacity=opacity,
            roundness_type=roundness_type,
            points=points,
            angle=angle
        )
        self.elements.append(line)

    def add_text(
        self,
        x: float,
        y: float,
        text: str,
        font_size: int = 16,
        font_style: FontStyle = FontStyle.NORMAL,
        font_family: FontFamily = FontFamily.NORMAL,
        text_align: TextAlign = TextAlign.LEFT,
        vertical_align: VerticalAlign = VerticalAlign.TOP,
        line_height: float = 1.15,
        stroke_color: str = "#000000",
        background_color: str = "transparent",
        fill_style: FillStyle = FillStyle.SOLID,
        stroke_width: int = 2,
        stroke_style: StrokeStyle = StrokeStyle.SOLID,
        roughness: int = 1,
        opacity: int = 80,
        roundness_type: Optional[RoundnessType] = RoundnessType.NONE,
        angle: float = 0.0
    ) -> None:
        self._validate_color(stroke_color)
        self._validate_color(background_color)

        text_element = Text(
            x=x,
            y=y,
            text=text,
            font_size=font_size,
            font_style=font_style,
            font_family=font_family,
            text_align=text_align,
            vertical_align=vertical_align,
            line_height=line_height,
            stroke_color=stroke_color,
            background_color=background_color,
            fill_style=fill_style,
            stroke_width=stroke_width,
            stroke_style=stroke_style,
            roughness=roughness,
            opacity=opacity,
            roundness_type=roundness_type,
            angle=angle
        )
        self.elements.append(text_element)

    def add_freedraw(
        self,
        x: float,
        y: float,
        width: float,
        height: float,
        points: Optional[List[List[float]]] = None,
        stroke_color: str = "#000000",
        background_color: str = "transparent",
        fill_style: FillStyle = FillStyle.SOLID,
        stroke_width: int = 2,
        stroke_style: StrokeStyle = StrokeStyle.SOLID,
        roughness: int = 1,
        opacity: int = 100,
        roundness_type: Optional[RoundnessType] = RoundnessType.NONE,
        angle: float = 0.0
    ) -> None:
        self._validate_color(stroke_color)
        self._validate_color(background_color)
        self._validate_dimensions(width, height)

        freedraw_element = Freedraw(
            x=x,
            y=y,
            width=width,
            height=height,
            points=points,
            stroke_color=stroke_color,
            background_color=background_color,
            fill_style=fill_style,
            stroke_width=stroke_width,
            stroke_style=stroke_style,
            roughness=roughness,
            opacity=opacity,
            roundness_type=roundness_type,
            angle=angle
        )
        self.elements.append(freedraw_element)

    def set_app_state(
        self,
        grid_size: Optional[int] = None,
        grid_step: Optional[int] = None,
        grid_mode_enabled: Optional[bool] = None,
        view_background_color: Optional[str] = None
    ) -> None:
        if grid_size is not None:
            self.appState["gridSize"] = grid_size
        if grid_step is not None:
            self.appState["gridStep"] = grid_step
        if grid_mode_enabled is not None:
            self.appState["gridModeEnabled"] = grid_mode_enabled
        if view_background_color is not None:
            self._validate_color(view_background_color)
            self.appState["viewBackgroundColor"] = view_background_color

    def to_json(self) -> str:
        excalidraw_json = {
            "type": "excalidraw",
            "version": 2,
            "source": "https://excalidraw.com",
            "elements": [],
            "appState": self.appState,
            "files": self.files
        }

        for element in self.elements:
            self.index_counter += 1
            # Generate index like aA, aB, ..., aZ, aAA, aAB, etc.
            suffix = ""
            num = self.index_counter
            while num > 0:
                num, rem = divmod(num - 1, 26)
                suffix = chr(65 + rem) + suffix
            prefix = 'a'
            index = f"{prefix}{suffix}"
            excalidraw_json["elements"].append(element.to_dict(index=index))

        return json.dumps(excalidraw_json, indent=2)

    def _validate_color(self, color: str) -> None:
        if not re.fullmatch(r"#(?:[0-9a-fA-F]{3}){1,2}", color):
            raise ValueError(f"Invalid color code: {color}")

    def _validate_dimensions(self, width: float, height: float) -> None:
        if width <= 0 or height <= 0:
            raise ValueError("Width and height must be positive numbers.")
```

extend this to allow adding images, here is an example excalidraw that has 2 images:
```
{
  "type": "excalidraw",
  "version": 2,
  "source": "https://excalidraw.com",
  "elements": [
    {
      "id": "QIKBTDO6hFh3mN8uR8S9s",
      "type": "image",
      "x": -1246.840577990733,
      "y": 36.73726456668044,
      "width": 150,
      "height": 150,
      "angle": 0,
      "strokeColor": "transparent",
      "backgroundColor": "#ffec99",
      "fillStyle": "cross-hatch",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 50,
      "groupIds": [],
      "frameId": null,
      "index": "a5",
      "roundness": null,
      "seed": 1237394127,
      "version": 6,
      "versionNonce": 954057551,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1727830689991,
      "link": null,
      "locked": false,
      "status": "saved",
      "fileId": "434ac9b72010b4e981539df729db47e7de3b49ad",
      "scale": [
        1,
        1
      ]
    },
    {
      "id": "agV6NU-wt2jWT2mfx_lHR",
      "type": "image",
      "x": -833.0405901977642,
      "y": 87.33727067019606,
      "width": 220,
      "height": 250,
      "angle": 0,
      "strokeColor": "transparent",
      "backgroundColor": "#ffec99",
      "fillStyle": "cross-hatch",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 50,
      "groupIds": [],
      "frameId": null,
      "index": "a6",
      "roundness": null,
      "seed": 1873968015,
      "version": 32,
      "versionNonce": 745669999,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1727830704791,
      "link": null,
      "locked": false,
      "status": "saved",
      "fileId": "6a8d7b3fa376f8f988ba55a21ab817495d76dcfd",
      "scale": [
        1,
        1
      ]
    }
  ],
  "appState": {
    "gridSize": 20,
    "gridStep": 5,
    "gridModeEnabled": false,
    "viewBackgroundColor": "#ffffff"
  },
  "files": {
    "434ac9b72010b4e981539df729db47e7de3b49ad": {
      "mimeType": "image/svg+xml",
      "id": "434ac9b72010b4e981539df729db47e7de3b49ad",
      "dataURL": "data:image/svg+xml;base64,PHN2ZyB4bWWY9IiNTVkciLz4KCjwvc3ZnPg==",
      "created": 1727830689682,
      "lastRetrieved": 1727830689682
    },
    "6a8d7b3fa376f8f988ba55a21ab817495d76dcfd": {
      "mimeType": "image/jpeg",
      "id": "6a8d7b3fa376f8f988ba55a21ab817495d76dcfd",
      "dataURL": "data:image/jpeg;base64,/9j/4AAQSkZJPhHYiFQIENjK5X//Z",
      "created": 1727830703720,
      "lastRetrieved": 1727830703720
    }
  }
}
```
basically, it supports jpeg,jpg, png,svg,avif,webp,gif,bmp, ico, jfif, svgz, pjpeg, pjp, dib where mime types and base64 data are stored as element