<commit_before>// Copyright (c) ppy Pty Ltd <<EMAIL>>. Licensed under the GNU Affero General Public License v3.0.
// See the LICENCE file in the repository root for full licence text.

import { BeatmapIcon } from 'beatmap-icon';
import { BeatmapsetJson } from 'beatmapsets/beatmapset-json';
import BeatmapJsonExtended from 'interfaces/beatmap-json-extended';
import { route } from 'laroute';
import * as React from 'react';
import { StringWithComponent } from 'string-with-component';
import { UserLink } from 'user-link';
import { getArtist, getDiffRating, getTitle } from 'utils/beatmap-helper';

interface Props {
  beatmap: BeatmapJsonExtended;
  beatmapset: BeatmapsetJson;
}

const BeatmapInfo = (props: Props) => {
  const { beatmap, beatmapset } = props;
  const beatmapUrl = route('beatmaps.show', { beatmap: beatmap.id, mode: beatmap.mode });

  return (
    <div className='score-beatmap'>
      <h1 className='score-beatmap__title'>
        <a className='score-beatmap__link-plain' href={beatmapUrl}>
          {getTitle(beatmapset)}
          {' '}
          <span className='score-beatmap__artist'>
            {osu.trans('scores.show.beatmap.by', { artist: getArtist(beatmapset) })}
          </span>
        </a>
      </h1>

      <div className='score-beatmap__detail'>
        <span className='score-beatmap__detail-item'>
          <BeatmapIcon beatmap={beatmap} showConvertMode showTitle={false} />
        </span>

        <span className='score-beatmap__detail-item score-beatmap__detail-item--difficulty'>
          <span
            className='score-beatmap__star'
            style={osu.diffRatingColour(getDiffRating(beatmap.difficulty_rating))}
          >
            <span className='fas fa-star' />
          </span>
          {osu.formatNumber(beatmap.difficulty_rating)}
        </span>
<commit_msg>convert remaining diff color to spectrum-based<commit_after>// Copyright (c) ppy Pty Ltd <<EMAIL>>. Licensed under the GNU Affero General Public License v3.0.
// See the LICENCE file in the repository root for full licence text.

import { BeatmapIcon } from 'beatmap-icon';
import { BeatmapsetJson } from 'beatmapsets/beatmapset-json';
import BeatmapJsonExtended from 'interfaces/beatmap-json-extended';
import { route } from 'laroute';
import * as React from 'react';
import { StringWithComponent } from 'string-with-component';
import { UserLink } from 'user-link';
import { getArtist, getDiffColour, getTitle } from 'utils/beatmap-helper';

interface Props {
  beatmap: BeatmapJsonExtended;
  beatmapset: BeatmapsetJson;
}

const BeatmapInfo = (props: Props) => {
  const { beatmap, beatmapset } = props;
  const beatmapUrl = route('beatmaps.show', { beatmap: beatmap.id, mode: beatmap.mode });

  return (
    <div className='score-beatmap'>
      <h1 className='score-beatmap__title'>
        <a className='score-beatmap__link-plain' href={beatmapUrl}>
          {getTitle(beatmapset)}
          {' '}
          <span className='score-beatmap__artist'>
            {osu.trans('scores.show.beatmap.by', { artist: getArtist(beatmapset) })}
          </span>
        </a>
      </h1>

      <div className='score-beatmap__detail'>
        <span className='score-beatmap__detail-item'>
          <BeatmapIcon beatmap={beatmap} showConvertMode showTitle={false} />
        </span>

        <span className='score-beatmap__detail-item score-beatmap__detail-item--difficulty'>
          <span
            className='score-beatmap__star'
            style={{color: getDiffColour(beatmap.difficulty_rating)}}
          >
            <span className='fas fa-star' />
          </span>
          {osu.formatNumber(beatmap.difficulty_rating)}
        </span>

{'fraction_non_alphanumeric': 0.1262214983713355, 'fraction_numerical': 0.002171552660152009, 'mean_word_length': 3.221076746849943, 'pattern_counts': {'":': 0, '<': 39, '<?xml version=': 0, '>': 41, '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': '6607352', 'n_tokens_mistral': 1134, 'n_tokens_neox': 1109, 'n_words': 250}