{% set pending = pending if pending is defined else None %} {% set readonly = readonly if readonly is defined else False %} {% set settings_dict = settings if settings is defined else {} %} {% set provided_step = step if step is defined else (active_step if active_step is defined else 'book') %} {% set current_step = provided_step %} {% if current_step in ['settings', 'upload', ''] %}{% set current_step = 'book' %}{% endif %} {% if current_step not in ['book', 'chapters', 'entities'] %}{% set current_step = 'book' %}{% endif %} {% set step_number = {'book': 1, 'chapters': 2, 'entities': 3} %} {% set step_titles = { 'book': 'Book parameters', 'chapters': 'Select chapters', 'entities': 'Review entities' } %} {% set step_hints = { 'book': 'Choose your source file or paste text, then set the defaults used for chapter analysis and speaker casting.', 'chapters': "Choose which chapters to convert. We'll analyse entities automatically when you continue.", 'entities': 'Assign pronunciations, voices, and manual overrides before queueing the conversion.' } %} {% set navigation_labels = { 'book': 'Book parameters', 'chapters': 'Chapters', 'entities': 'Entities' } %} {% set total_steps = 3 %} {% set current_index = step_number[current_step] %} {% set is_open = open if open is defined else False %} {% set prepare_url_template = url_for('main.wizard_start', pending_id='__pending__') %} {% set cancel_url_template = url_for('main.wizard_cancel', pending_id='__pending__') %} {% set analyze_url_template = url_for('main.wizard_update', pending_id='__pending__') %}