<commit_before>requirejs_config =
    baseUrl: app_settings.static_path + 'vendor'
    paths:
        app: '../js'
    shim:
        bootstrap:
            deps: ['jquery']
        backbone:
            deps: ['underscore', 'jquery']
            exports: 'Backbone'
        'typeahead.bundle':
            deps: ['jquery']
        TweenLite:
            deps: ['CSSPlugin', 'EasePack']
        'leaflet.markercluster':
            deps: ['leaflet']
        'bootstrap-datetimepicker':
            deps: ['bootstrap']
        'iexhr':
            deps: ['jquery']

requirejs.config requirejs_config

PAGE_SIZE = 1000
DEBUG_STATE = app_settings.debug_state

window.get_ie_version = ->
    is_internet_explorer = ->
        window.navigator.appName is "Microsoft Internet Explorer"

    if not is_internet_explorer()
        return false

    matches = new RegExp(" MSIE ([0-9]+)\\.([0-9])").exec window.navigator.userAgent
    return parseInt matches[1]

if app_settings.sentry_url
    requirejs ['raven'], (Raven) ->
        Raven.config(app_settings.sentry_url, {}).install();

requirejs ['app/models', 'app/widgets', 'app/views', 'app/p13n', 'app/map', 'app/landing', 'app/color','backbone', 'backbone.marionette', 'jquery', 'app/uservoice', 'app/transit', 'app/debug', 'iexhr'], (Models, widgets, views, p13n, MapView, landing_page, ColorMatcher, Backbone, Marionette, $, uservoice, transit, debug, iexhr) ->

    class AppControl
        constructor: (app_models) ->
            _.extend @, Backbone.Events

            # Units currently on the map
            @units = app_models.units
            # Services in the cart
            @services = app_models.selected_services
            # Selected units (always of length one)
            @selected_units = app_models.selected_units
            # Selected events (always of length one)
            @selected_events = app_models.selected_events
            @search_results = app_models.search_results
            @search_state = app_models.search_state

            @listenTo p13n, 'change', (path, val) ->
                if path.pop() == 'city'<commit_msg>Fix bug in p13n change listener.<commit_after>requirejs_config =
    baseUrl: app_settings.static_path + 'vendor'
    paths:
        app: '../js'
    shim:
        bootstrap:
            deps: ['jquery']
        backbone:
            deps: ['underscore', 'jquery']
            exports: 'Backbone'
        'typeahead.bundle':
            deps: ['jquery']
        TweenLite:
            deps: ['CSSPlugin', 'EasePack']
        'leaflet.markercluster':
            deps: ['leaflet']
        'bootstrap-datetimepicker':
            deps: ['bootstrap']
        'iexhr':
            deps: ['jquery']

requirejs.config requirejs_config

PAGE_SIZE = 1000
DEBUG_STATE = app_settings.debug_state

window.get_ie_version = ->
    is_internet_explorer = ->
        window.navigator.appName is "Microsoft Internet Explorer"

    if not is_internet_explorer()
        return false

    matches = new RegExp(" MSIE ([0-9]+)\\.([0-9])").exec window.navigator.userAgent
    return parseInt matches[1]

if app_settings.sentry_url
    requirejs ['raven'], (Raven) ->
        Raven.config(app_settings.sentry_url, {}).install();

requirejs ['app/models', 'app/widgets', 'app/views', 'app/p13n', 'app/map', 'app/landing', 'app/color','backbone', 'backbone.marionette', 'jquery', 'app/uservoice', 'app/transit', 'app/debug', 'iexhr'], (Models, widgets, views, p13n, MapView, landing_page, ColorMatcher, Backbone, Marionette, $, uservoice, transit, debug, iexhr) ->

    class AppControl
        constructor: (app_models) ->
            _.extend @, Backbone.Events

            # Units currently on the map
            @units = app_models.units
            # Services in the cart
            @services = app_models.selected_services
            # Selected units (always of length one)
            @selected_units = app_models.selected_units
            # Selected events (always of length one)
            @selected_events = app_models.selected_events
            @search_results = app_models.search_results
            @search_state = app_models.search_state

            @listenTo p13n, 'change', (path, val) ->
                if path[path.length - 1] == 'city'
{'fraction_non_alphanumeric': 0.12564705882352942, 'fraction_numerical': 0.007764705882352941, 'mean_word_length': 2.4337641357027464, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, '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': '4389787', 'n_tokens_mistral': 1306, 'n_tokens_neox': 1265, 'n_words': 287}