{#if lang === 'mermaid'} {#if mermaidHtml}
{:else}
{code}
{/if} {:else}
{lang}
{#if lang.toLowerCase() === 'python' || lang.toLowerCase() === 'py' || (lang === '' && checkPythonCode(code))} {#if executing}
Running
{:else if run}
{ code = _code; await tick(); executePython(code); }}>{$i18n.t('Run')}
{/if} {/if} {#if save}
{saved ? $i18n.t('Saved') : $i18n.t('Save')}
{/if}
{copied ? $i18n.t('Copied') : $i18n.t('Copy')}
{ saveCode(); }} on:change={(e) => { _code = e.detail.value; }} />
{#if executing || stdout || stderr || result || files}
{#if executing}
STDOUT/STDERR
Running...
{:else} {#if stdout || stderr}
STDOUT/STDERR
{stdout || stderr}
{/if} {#if result || files}
RESULT
{#if result}
{`${JSON.stringify(result)}`}
{/if} {#if files}
{#each files as file} {#if file.type.startsWith('image')}
{/if} {/each}
{/if}
{/if} {/if}
{/if} {/if}