<commit_before>import 'dart:html';
import 'dart:convert';

@MirrorsUsed(targets: 'risk.map')
import 'dart:mirrors';

import 'package:polymer/polymer.dart';
import 'package:risk/map.dart';


@CustomTag('risk-board')
class RiskBoard extends PolymerElement {
  final List<Country> countries = COUNTRIES;

  final Map<Country, String> svgPaths = toObservable({});

  @observable
  String selection;

  RiskBoard.created(): super.created() {
    HttpRequest.getString('svg-datas.json').then((json) {
      final svgDatas = JSON.decode(json);
      for (final c in countries) {
        svgPaths[c] = svgDatas[c.id];
      }
    });
  }

  countryClick(Event e, var detail, Element target) => target.classes.toggle(
      'selected');

  countryEnter(Event e, var detail, Element target) => selection = target.id;

  countryLeave(Event e, var detail, Element target) => selection = '';
}<commit_msg>avoid a variable declaration<commit_after>import 'dart:html';
import 'dart:convert';

@MirrorsUsed(targets: 'risk.map')
import 'dart:mirrors';

import 'package:polymer/polymer.dart';
import 'package:risk/map.dart';


@CustomTag('risk-board')
class RiskBoard extends PolymerElement {
  final List<Country> countries = COUNTRIES;

  final Map<Country, String> svgPaths = toObservable({});

  @observable
  String selection;

  RiskBoard.created(): super.created() {
    HttpRequest.getString('svg-datas.json').then(JSON.decode).then((svgDatas) {
      for (final c in countries) {
        svgPaths[c] = svgDatas[c.id];
      }
    });
  }

  countryClick(Event e, var detail, Element target) => target.classes.toggle(
      'selected');

  countryEnter(Event e, var detail, Element target) => selection = target.id;

  countryLeave(Event e, var detail, Element target) => selection = '';
}
{'fraction_non_alphanumeric': 0.14446318156267565, 'fraction_numerical': 0.0, 'mean_word_length': 4.410334346504559, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 13, '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': '4176181', 'n_tokens_mistral': 591, 'n_tokens_neox': 550, 'n_words': 130}