{# Rewarded-advertisement modal (chat). A trigger with [data-watch-ad-trigger] opens it; the simulated ad runs through loading → playing → completed states (see RewardedAdService in main.js). Only the Continue button submits the real reward form — the backend stays the single source of truth for granting messages. The creative is populated from a real rewarded advertisement (CHAT placement) when one is passed in `rewarded_ad`; otherwise the built-in placeholder is shown. Pass: conversation, messaging_state, rewarded_ad. #} {% set ad = rewarded_ad %}
Watch this short advertisement to unlock {{ messaging_state.unlock_size }} additional messages.
{# Hidden until the ad completes — the user cannot skip it. #}Loading advertisement…
{{ ad.description if ad and ad.description else 'Build real-world projects. Start your career today.' }}
{# Only render a CTA when there is a real destination to open (else the fallback: no clickable-looking button that goes nowhere). It stays locked during playback and becomes active in the completed state. #} {% if ad and ad.redirect_url %} Available after advertisementUnlocks after the countdown.
{% endif %}Watching advertisement…
Please watch this advertisement to unlock +{{ messaging_state.unlock_size }} chat messages.
{# Circular animated countdown / progress indicator. #}Advertisement completed
Your reward has been unlocked.
{% if ad and ad.redirect_url %} {# Real click-through: opens the advertiser in a new tab (records a click via the existing analytics route) without interrupting the reward. #} {{ ad.title }} {# Shown only if the browser blocks the new tab on a repeat click. Never affects the reward — purely a UX hint. #}We couldn't open the advertiser's page because your browser blocked it. Please click the button again or allow pop-ups.
{% endif %}Reward
+{{ messaging_state.unlock_size }} Messages
Available after watching this advertisement.