<commit_before>var getAppId              = require('../../config').getAppId;
var Login                 = require('./login').Login;
var showLocalTimeOnHover  = require('./utility').showLocalTimeOnHover;
var toJapanTimeIfNeeded   = require('./utility').toJapanTimeIfNeeded;
var template              = require('./utility').template;
var parseLoginIDList      = require('./utility').parseLoginIDList;
var texts_json            = require('../../autogenerated/texts').texts_json;
var isStorageSupported    = require('./storage').isStorageSupported;
var Store                 = require('./storage').Store;
var InScriptStore         = require('./storage').InScriptStore;
var CookieStorage         = require('./storage').CookieStorage;
var Localizable           = require('./storage').Localizable;
var TrafficSource         = require('../common_functions/traffic_source').TrafficSource;
var RiskClassification    = require('../common_functions/risk_classification').RiskClassification;
var checkClientsCountry   = require('../common_functions/country_base').checkClientsCountry;
var japanese_client       = require('../common_functions/country_base').japanese_client;
var FinancialAssessmentws = require('../websocket_pages/user/account/settings/financial_assessment').FinancialAssessmentws;
var ViewBalance           = require('../websocket_pages/user/viewbalance/viewbalance.init').ViewBalance;
var CashierJP             = require('../../binary_japan/cashier').CashierJP;
var Cookies               = require('../../lib/js-cookie');
var moment                = require('moment');
var MenuContent           = require('./menu_content').MenuContent;
var pjax                  = require('../../lib/pjax-lib');
var isVisible             = require('../common_functions/common_functions').isVisible;
require('../../lib/polyfills/array.includes');
require('../../lib/polyfills/string.includes');
require('../../lib/mmenu/jquery.mmenu.min.all.js');


var clock_started = false;

var SessionStore, LocalStore;
if (isStorageSupported(window.localStorage)) {
    LocalStore = new Store(window.localStorage);
}

if (isStorageSupported(window.sessionStorage)) {
    if (!LocalStore) {
        LocalStore = new Store(window.sessionStorage);
    }
    SessionStore = new Store(window.sessionStorage);
}

if (!SessionStore || !LocalStore) {
    if (!LocalStore) {
        LocalStore = new InScriptStore();
    }
    if (!SessionStore) {
        SessionStore = new InScriptStore();
    }
}

var TUser = (function () {
    var data = {};
    return {
        extend: function(ext) { $.extend(data, ext); },
        set: function(a) { data = a; },
        get: function() { return data; }
    };
})();

// texts_json should be available
// make texts object as Localizable
var texts = {};
for (var key in texts_json) {
    if (texts_json.hasOwnProperty(key)) {
        texts[key] = new Localizable(texts_json[key]);
    }
}

var GTM = (function() {
    "use strict";

    var gtm_applicable = function() {
        return (getAppId() === '1');
    };

    var gtm_data_layer_info = function(data) {
        var data_layer_info = {
            language  : page.language(),
            pageTitle : page_title(),
            pjax      : page.is_loaded_by_pjax,
            url       : document.URL,
            event     : 'page_load',
        };<commit_msg>Enable GTM on staging<commit_after>var getAppId              = require('../../config').getAppId;
var Login                 = require('./login').Login;
var showLocalTimeOnHover  = require('./utility').showLocalTimeOnHover;
var toJapanTimeIfNeeded   = require('./utility').toJapanTimeIfNeeded;
var template              = require('./utility').template;
var parseLoginIDList      = require('./utility').parseLoginIDList;
var texts_json            = require('../../autogenerated/texts').texts_json;
var isStorageSupported    = require('./storage').isStorageSupported;
var Store                 = require('./storage').Store;
var InScriptStore         = require('./storage').InScriptStore;
var CookieStorage         = require('./storage').CookieStorage;
var Localizable           = require('./storage').Localizable;
var TrafficSource         = require('../common_functions/traffic_source').TrafficSource;
var RiskClassification    = require('../common_functions/risk_classification').RiskClassification;
var checkClientsCountry   = require('../common_functions/country_base').checkClientsCountry;
var japanese_client       = require('../common_functions/country_base').japanese_client;
var FinancialAssessmentws = require('../websocket_pages/user/account/settings/financial_assessment').FinancialAssessmentws;
var ViewBalance           = require('../websocket_pages/user/viewbalance/viewbalance.init').ViewBalance;
var CashierJP             = require('../../binary_japan/cashier').CashierJP;
var Cookies               = require('../../lib/js-cookie');
var moment                = require('moment');
var MenuContent           = require('./menu_content').MenuContent;
var pjax                  = require('../../lib/pjax-lib');
var isVisible             = require('../common_functions/common_functions').isVisible;
require('../../lib/polyfills/array.includes');
require('../../lib/polyfills/string.includes');
require('../../lib/mmenu/jquery.mmenu.min.all.js');


var clock_started = false;

var SessionStore, LocalStore;
if (isStorageSupported(window.localStorage)) {
    LocalStore = new Store(window.localStorage);
}

if (isStorageSupported(window.sessionStorage)) {
    if (!LocalStore) {
        LocalStore = new Store(window.sessionStorage);
    }
    SessionStore = new Store(window.sessionStorage);
}

if (!SessionStore || !LocalStore) {
    if (!LocalStore) {
        LocalStore = new InScriptStore();
    }
    if (!SessionStore) {
        SessionStore = new InScriptStore();
    }
}

var TUser = (function () {
    var data = {};
    return {
        extend: function(ext) { $.extend(data, ext); },
        set: function(a) { data = a; },
        get: function() { return data; }
    };
})();

// texts_json should be available
// make texts object as Localizable
var texts = {};
for (var key in texts_json) {
    if (texts_json.hasOwnProperty(key)) {
        texts[key] = new Localizable(texts_json[key]);
    }
}

var GTM = (function() {
    "use strict";

    var gtm_applicable = function() {
        return /^(1|1098)$/.test(getAppId());
    };

    var gtm_data_layer_info = function(data) {
        var data_layer_info = {
            language  : page.language(),
            pageTitle : page_title(),
            pjax      : page.is_loaded_by_pjax,
            url       : document.URL,
            event     : 'page_load',
        };
{'fraction_non_alphanumeric': 0.14735421975715784, 'fraction_numerical': 0.000899415380002998, 'mean_word_length': 2.858877964141122, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4368979', 'n_tokens_mistral': 1892, 'n_tokens_neox': 1843, 'n_words': 350}