• Resolve the UUID of the document that should handle a chat-card button or edit-action click.

    Chat-card templates name the handler document inconsistently: the standard test/fate cards use data-doc-uuid, the combat/injury cards use data-handler-actor-uuid (the responding actor) or data-handler-uuid, and the opposed-test cards use data-action-handler-uuid. Rather than rename attributes across every template (which would risk regressions and break any in-flight chat messages), the dispatcher normalizes the reader here.

    Pure function — no DOM or Foundry globals — so it is unit-testable. The renderChatMessageHTML hook in sohl.ts calls this with the clicked element's dataset.

    Precedence (most specific / legacy first):

    1. data-doc-uuid (standard-test, fate, edit-action cards)
    2. data-handler-uuid (damage, injury, attack-result cards)
    3. data-handler-actor-uuid (attack-card defender responder)
    4. data-action-handler-uuid (opposed-request / opposed-result cards)

    Parameters

    • dataset: DOMStringMap

      The dataset of the clicked button or anchor element.

    Returns string | null

    The resolved document UUID, or null if none is present.