<commit_before>{% load i18n %}

<div class="row">
  <div class="col-xs-12 col-md-8">
    <div class="form-group">
      <div class="input-group">
        <input id="id_meeting_place"
          class="form-control"
          maxlength="300"
          name="meeting_place"
          type="text"
          placeholder="{% trans 'Postal code, Prefecture, City or Address' %}"
          required/>
        <span class="input-group-addon input-loc">
          <span class="btn btn-link input-loc-btn" onClick="getnow(); return false;">
            <span class="fa fa-compass"></span>
          </span>
        </span>
        <span class="input-group-btn">
          <button class="btn btn-primary input-loc-btn_2" onClick="getlatlng(); return false;">
            {% trans "Search" %}
          </button>
        </span>
      </div>

      <form id="bound_data" action="{% url 'event:range_search' %}" method="post">
        {% csrf_token %}
        <div class="row">
          <div class="checkbox col-xs-12 col-md-8">
            {% for tag in all_tags %}
              <label>
                <input type="checkbox" checked name="tags" value="{{ tag.pk }}" {% if tag.pk in checked_tags %}checked{% endif %}>{{ tag.name }}
              </label>
            {% endfor %}
          </div>
          <div class="col-xs-12 col-md-4" id="filter_submit">
            <button class="btn btn-primary input-loc-btn_2 input-loc-btn_3" onClick="get_events(); return false;">
              {% trans "Search with filters" %}
            </button>
          </div>
          <input id="ne_lat" type="hidden" name="ne_lat" value="">
          <input id="sw_lat" type="hidden" name="sw_lat" value="">
          <input id="ne_lng" type="hidden" name="ne_lng" value="">
          <input id="sw_lng" type="hidden" name="sw_lng" value="">
       </div>
      </form>

      <div id="map_canvas2" class="center-block"></div>

    </div>
  </div>
  <div class="col-xs-12 col-md-4">
    <div id="map-event-list">

    </div>
  </div>
    <script id="map-event-template" type="text/template">
      <section class="inner">
      [[#events_in_range]]
        <div class="media">
          <div class="media-left">
            <a href="/event/[[id]]">
              <div class="media-object custom_thumbnail list-thumbnail" style="background-image: url([[img]]);">
              </div>
            </a>
          </div>
          <div class="media-body">
            <div class="event-info pull-left">
              <div>
                <span class="label label-[[label_brand]]" style="margin-right: 1em;">
                  [[status]]
                </span>
                <i class="fa fa-calendar" aria-hidden="true"></i>
                  [[start_time]]
                <i class="fa fa-map-marker" aria-hidden="true"></i>
                  [[place]]
              </div>
              <div class="media-heading">
                <a href="/event/[[id]]">
                  <h5>[[name]]</h5>
                </a>
              </div>
            </div>
          </div>
          <input type="hidden" value="[[markernum]]">
        </div>
        [[/events_in_range]]
      </section>
    </script>
</div>

<script type="text/javascript">
  // XXX: dup: gmap
  var gmap;
  var geocoder;
  var markers = [];
  var map_event_template;
  var currentWindow;
  var currentWindowInfo = {
    lat: '',
    lng: ''
  };

  function initialize() {
    var lat = 35.7291213;
    var lng = 139.7191322;
    var latlng = new google.maps.LatLng(lat,lng);

    var opts = {
      zoom: 15,
      center: latlng,
      mapTypeId: google.maps.MapTypeId.ROADMAP
    };
    gmap = new google.maps.Map(document.getElementById("map_canvas2"), opts);
    gmap.setCenter(latlng);
    google.maps.event.addListener(gmap, 'idle', function() {
      get_events();
    });
    geocoder = new google.maps.Geocoder();
  }

  function getnow() {
    navigator.geolocation.getCurrentPosition(function(position) {
      // 緯度経度の取得
      var now = new google.maps.LatLng(
        position.coords.latitude,
        position.coords.longitude
      );

      gmap.setCenter(now);
      $('#id_meeting_place').val(position.formatted_address);
      geocoder.geocode({location: now}, function(results, status) {
          if (status == google.maps.GeocoderStatus.OK) {
            $('#id_meeting_place').val(results[0].formatted_address);
          }
      });
    }, function() {
      alert('{% trans "Failed to get location." %}');
    });
  }

  function getlatlng(){
    //検索した時
    var address = document.getElementById("id_meeting_place").value;
    geocoder.geocode({address: address}, function(results, status) {
        if (status == google.maps.GeocoderStatus.OK) {
          gmap.setCenter(results[0].geometry.location);
          get_events();
        } else {
          alert('{% trans "Failed to get information." %}');
        }
    });
  }

  function get_events(){<commit_msg>[COSME] Fix indent<commit_after>{% load i18n %}

<div class="row">
  <div class="col-xs-12 col-md-8">
    <div class="form-group">
      <div class="input-group">
        <input id="id_meeting_place"
          class="form-control"
          maxlength="300"
          name="meeting_place"
          type="text"
          placeholder="{% trans 'Postal code, Prefecture, City or Address' %}"
          required/>
        <span class="input-group-addon input-loc">
          <span class="btn btn-link input-loc-btn" onClick="getnow(); return false;">
            <span class="fa fa-compass"></span>
          </span>
        </span>
        <span class="input-group-btn">
          <button class="btn btn-primary input-loc-btn_2" onClick="getlatlng(); return false;">
            {% trans "Search" %}
          </button>
        </span>
      </div>

      <form id="bound_data" action="{% url 'event:range_search' %}" method="post">
        {% csrf_token %}
        <div class="row">
          <div class="checkbox col-xs-12 col-md-8">
            {% for tag in all_tags %}
              <label>
                <input type="checkbox" checked name="tags" value="{{ tag.pk }}" {% if tag.pk in checked_tags %}checked{% endif %}>{{ tag.name }}
              </label>
            {% endfor %}
          </div>
          <div class="col-xs-12 col-md-4" id="filter_submit">
            <button class="btn btn-primary input-loc-btn_2 input-loc-btn_3" onClick="get_events(); return false;">
              {% trans "Search with filters" %}
            </button>
          </div>
          <input id="ne_lat" type="hidden" name="ne_lat" value="">
          <input id="sw_lat" type="hidden" name="sw_lat" value="">
          <input id="ne_lng" type="hidden" name="ne_lng" value="">
          <input id="sw_lng" type="hidden" name="sw_lng" value="">
       </div>
      </form>

      <div id="map_canvas2" class="center-block"></div>

    </div>
  </div>
  <div class="col-xs-12 col-md-4">
    <div id="map-event-list">

    </div>
  </div>
    <script id="map-event-template" type="text/template">
      <section class="inner">
      [[#events_in_range]]
        <div class="media">
          <div class="media-left">
            <a href="/event/[[id]]">
              <div class="media-object custom_thumbnail list-thumbnail" style="background-image: url([[img]]);">
              </div>
            </a>
          </div>
          <div class="media-body">
            <div class="event-info pull-left">
              <div>
                <span class="label label-[[label_brand]]" style="margin-right: 1em;">
                  [[status]]
                </span>
                <i class="fa fa-calendar" aria-hidden="true"></i>
                  [[start_time]]
                <i class="fa fa-map-marker" aria-hidden="true"></i>
                  [[place]]
              </div>
              <div class="media-heading">
                <a href="/event/[[id]]">
                  <h5>[[name]]</h5>
                </a>
              </div>
            </div>
          </div>
          <input type="hidden" value="[[markernum]]">
        </div>
        [[/events_in_range]]
      </section>
    </script>
</div>

<script type="text/javascript">
  // XXX: dup: gmap
  var gmap;
  var geocoder;
  var markers = [];
  var map_event_template;
  var currentWindow;
  var currentWindowInfo = {
    lat: '',
    lng: ''
  };

  function initialize() {
    var lat = 35.7291213;
    var lng = 139.7191322;
    var latlng = new google.maps.LatLng(lat,lng);

    var opts = {
      zoom: 15,
      center: latlng,
      mapTypeId: google.maps.MapTypeId.ROADMAP
    };
    gmap = new google.maps.Map(document.getElementById("map_canvas2"), opts);
    gmap.setCenter(latlng);
    google.maps.event.addListener(gmap, 'idle', function() {
      get_events();
    });
    geocoder = new google.maps.Geocoder();
  }

  function getnow() {
    navigator.geolocation.getCurrentPosition(function(position) {
      // 緯度経度の取得
      var now = new google.maps.LatLng(
        position.coords.latitude,
        position.coords.longitude
      );

      gmap.setCenter(now);
      $('#id_meeting_place').val(position.formatted_address);
      geocoder.geocode({location: now}, function(results, status) {
          if (status == google.maps.GeocoderStatus.OK) {
            $('#id_meeting_place').val(results[0].formatted_address);
          }
      });
    }, function() {
      alert('{% trans "Failed to get location." %}');
    });
  }

  function getlatlng(){
    //検索した時
    var address = document.getElementById("id_meeting_place").value;
    geocoder.geocode({address: address}, function(results, status) {
      if (status == google.maps.GeocoderStatus.OK) {
        gmap.setCenter(results[0].geometry.location);
        get_events();
      } else {
        alert('{% trans "Failed to get information." %}');
      }
    });
  }

  function get_events(){
{'fraction_non_alphanumeric': 0.16874556333029103, 'fraction_numerical': 0.009735320961362945, 'mean_word_length': 2.0223720502604965, 'pattern_counts': {'":': 0, '<': 151, '<?xml version=': 0, '>': 151, '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': '1268488', 'n_tokens_mistral': 3229, 'n_tokens_neox': 3087, 'n_words': 613}