<commit_before><template>
	<v-container fluid>
		<AppTasks v-if="!loading" v-model="appTasksMenu">
			<AppTask
				:label="$t('quickTasks.edit.derivative')"
				:to="`/derivatives/${derivative.id}/edit`"
				icon="mdi-image-frame dem-overlay-edit"
			/>
			<!--
			Adding an @click="appTasksMenu = false" causes the dialog to instantly
			disappear because the AppTask isn't rendered anymore
			-->
			<AppTask
				:label="$t('quickTasks.delete.derivative')"
				:confirm="$t('quickTasks.delete.derivative.confirm')"
				icon="mdi-image-frame dem-overlay-delete"
				@cancel="appTasksMenu = false"
				@confirm="deleteDerivative"
			/>
			<AppTask
				:label="$t('quickTasks.add.images.to.derivative')"
				icon="mdi-camera dem-overlay-add"
				@click="appTasksMenu = false; dndDialog = true"
			/>
		</AppTasks>
		<DnDImage v-model="dndDialog" other-images-label="field.Derivative.images" @save="saveDndImages" />

		<SectionCard :loading="loading" :image="derivative.mainImage" :title="derivative.identifyingName">
			<div class="dem-fieldset">
				<v-row>
					<v-col v-if="derivative.series.id" cols="12" md="6">
						<FieldValue :label="$t('field.Derivative.series')">
							<ModelLink :model="derivative.series" view="SeriesView" />
						</FieldValue>
					</v-col>
					<v-col v-if="derivative.album.id" cols="12" md="6">
						<FieldValue :label="$t('field.Derivative.album')">
							<ModelLink :model="derivative.album" view="AlbumView" />
						</FieldValue>
					</v-col>
				</v-row>
				<v-row>
					<v-col v-if="derivative.artist.id" cols="12" md="6">
						<FieldValue :label="$t('field.Derivative.artist')">
							<ModelLink :model="derivative.artist" view="AuthorView" />
						</FieldValue>
					</v-col>
					<v-col v-if="derivative.source.id" cols="12" md="6">
						<FieldValue :label="$t('field.Derivative.source')">
							<ModelLink :model="derivative.source" view="DerivativeSourceView" />
						</FieldValue>
					</v-col>
				</v-row>
			</div>

			<div class="dem-fieldset">
				<v-row>
					<v-col cols="12" md="6">
						<FieldValue :label="$t('field.Derivative.type')">
							<ModelLink :model="derivative.type" view="DerivativeTypeView" />
						</FieldValue>
					</v-col>
					<v-col v-if="derivative.colours" cols="12" md="6">
						<FieldValue :label="$t('field.Derivative.colours')">
							{{ derivative.colours }}
						</FieldValue>
					</v-col>
				</v-row>
				<v-row>
					<v-col v-if="sizeSpec" cols="12" md="6">
						<FieldValue :label="$t('field.Derivative.size')">
							{{ sizeSpec }}
						</FieldValue>
					</v-col>
					<template v-if="!sizeSpec">
						<v-col cols="12" md="4">
							<FieldValue v-if="derivative.width" :label="$t('field.Derivative.width')">
								{{ derivative.width }}
							</FieldValue>
						</v-col>
						<v-col cols="12" md="4">
							<FieldValue v-if="derivative.height" :label="$t('field.Derivative.height')">
								{{ derivative.height }}
							</FieldValue>
						</v-col>
						<v-col cols="12" md="4">
							<FieldValue v-if="derivative.depth" :label="$t('field.Derivative.depth')">
								{{ derivative.depth }}
							</FieldValue>
						</v-col>
					</template>
				</v-row>
			</div>

			<div class="dem-fieldset">
				<v-row>
					<v-col cols="12" md="6" xl="3">
						<template v-if="derivative.number && derivative.total">
							<FieldValue :label="$t('field.Derivative.numberOverTotal')">
								{{ derivative.number }} / {{ derivative.total }}
							</FieldValue>
						</template>
						<template v-if="!derivative.number || !derivative.total">
							<FieldValue v-if="derivative.number" :label="$t('field.Derivative.number')">
								{{ derivative.number }}
							</FieldValue>
							<FieldValue v-if="derivative.total" :label="$t('field.Derivative.total')">
								{{ derivative.total }}
							</FieldValue>
						</template>
					</v-col>
					<v-col cols="12" md="6" xl="3">
						<FieldValue :label="$t('field.Derivative.signed.view')">
							{{ $t('field.Derivative.signed.value.' + derivative.signed) }}
						</FieldValue>
					</v-col>
					<v-col cols="12" md="6" xl="3"><commit_msg>Restoring #19 for the Vue frontend.<commit_after><template>
	<v-container fluid>
		<AppTasks v-if="!loading" v-model="appTasksMenu">
			<AppTask
				:label="$t('quickTasks.edit.derivative')"
				:to="`/derivatives/${derivative.id}/edit`"
				icon="mdi-image-frame dem-overlay-edit"
			/>
			<!--
			Adding an @click="appTasksMenu = false" causes the dialog to instantly
			disappear because the AppTask isn't rendered anymore
			-->
			<AppTask
				:label="$t('quickTasks.delete.derivative')"
				:confirm="$t('quickTasks.delete.derivative.confirm')"
				icon="mdi-image-frame dem-overlay-delete"
				@cancel="appTasksMenu = false"
				@confirm="deleteDerivative"
			/>
			<AppTask
				:label="$t('quickTasks.add.images.to.derivative')"
				icon="mdi-camera dem-overlay-add"
				@click="appTasksMenu = false; dndDialog = true"
			/>
		</AppTasks>
		<DnDImage v-model="dndDialog" other-images-label="field.Derivative.images" @save="saveDndImages" />

		<SectionCard :loading="loading" :image="derivative.mainImage" :title="derivative.identifyingName">
			<div class="dem-fieldset">
				<v-row>
					<v-col v-if="derivative.series.id" cols="12" md="6">
						<FieldValue :label="$t('field.Derivative.series')">
							<ModelLink :model="derivative.series" view="SeriesView" />
						</FieldValue>
					</v-col>
					<v-col v-if="derivative.album.id" cols="12" md="6">
						<FieldValue :label="$t('field.Derivative.album')">
							<ModelLink :model="derivative.album" view="AlbumView" />
						</FieldValue>
					</v-col>
				</v-row>
				<v-row>
					<v-col v-if="derivative.artist.id" cols="12" md="6">
						<FieldValue :label="$t('field.Derivative.artist')">
							<ModelLink :model="derivative.artist" view="AuthorView" />
						</FieldValue>
					</v-col>
					<v-col v-if="derivative.source.id" cols="12" md="6">
						<FieldValue :label="$t('field.Derivative.source')">
							<ModelLink :model="derivative.source" view="DerivativeSourceView" />
						</FieldValue>
					</v-col>
				</v-row>
			</div>

			<div class="dem-fieldset">
				<v-row>
					<v-col cols="12" md="6">
						<FieldValue :label="$t('field.Derivative.type')">
							<ModelLink :model="derivative.type" view="DerivativeTypeView" />
						</FieldValue>
					</v-col>
					<v-col v-if="derivative.colours" cols="12" md="6">
						<FieldValue :label="$t('field.Derivative.colours')">
							{{ derivative.colours }}
						</FieldValue>
					</v-col>
				</v-row>
				<v-row>
					<v-col v-if="sizeSpec" cols="12" md="6">
						<FieldValue :label="$t('field.Derivative.size')">
							{{ sizeSpec }}
						</FieldValue>
					</v-col>
					<template v-if="!sizeSpec">
						<v-col cols="12" md="4">
							<FieldValue v-if="derivative.width" :label="$t('field.Derivative.width')">
								{{ derivative.width }}
							</FieldValue>
						</v-col>
						<v-col cols="12" md="4">
							<FieldValue v-if="derivative.height" :label="$t('field.Derivative.height')">
								{{ derivative.height }}
							</FieldValue>
						</v-col>
						<v-col cols="12" md="4">
							<FieldValue v-if="derivative.depth" :label="$t('field.Derivative.depth')">
								{{ derivative.depth }}
							</FieldValue>
						</v-col>
					</template>
				</v-row>
			</div>

			<div class="dem-fieldset">
				<v-row>
					<v-col cols="12" md="6" xl="3">
						<template v-if="derivative.number && derivative.total">
							<FieldValue :label="$t('field.Derivative.numberOverTotal')">
								{{ $n(derivative.number) }} / {{ $n(derivative.total) }}
							</FieldValue>
						</template>
						<template v-if="!derivative.number || !derivative.total">
							<FieldValue v-if="derivative.number" :label="$t('field.Derivative.number')">
								{{ derivative.number }}
							</FieldValue>
							<FieldValue v-if="derivative.total" :label="$t('field.Derivative.total')">
								{{ derivative.total }}
							</FieldValue>
						</template>
					</v-col>
					<v-col cols="12" md="6" xl="3">
						<FieldValue :label="$t('field.Derivative.signed.view')">
							{{ $t('field.Derivative.signed.value.' + derivative.signed) }}
						</FieldValue>
					</v-col>
					<v-col cols="12" md="6" xl="3">
{'fraction_non_alphanumeric': 0.20401742497579864, 'fraction_numerical': 0.010406582768635044, 'mean_word_length': 2.964028776978417, 'pattern_counts': {'":': 0, '<': 179, '<?xml version=': 0, '>': 179, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6743887', 'n_tokens_mistral': 3966, 'n_tokens_neox': 2934, 'n_words': 430}