public function pastableFactsOfType(GedcomRecord $record, Collection $types): Collection
    {
        // The facts are stored in the session.
        return (new Collection(Session::get('clipboard', [])))
            ->flatten(1)
            ->reverse()
            ->map(static function (array $clipping) use ($record): Fact {
                return new Fact($clipping['factrec'], $record, md5($clipping['factrec']));
            })
            ->filter(static function (Fact $fact) use ($types): bool {
                return $types->contains($fact->getTag());
            });
    }