<commit_before>angular.module('hsgc', [])
  .config(['$httpProvider', '$sceProvider', function($httpProvider, $sceProvider) {
    //$sceProvider.enabled(false);
    $httpProvider.defaults.headers.get =  {
        'Accept': 'application/json',
        //'HSGC-Client': "hsgc-widget-angular-client",
        //'HSGC-Client-Version': ""
      };
  }]);

hsgcWidgets = {
  init: function(options) {
    var defaults = {
      env: "prod",
      keyStrategy: "unity",
      apiRoot: "http://api.hsgamecenter.com/v1.2/",
      unityRoot: "http://unity.nfhsnetwork.com/v1/",
      datacastLoaded: function() {},
      beforeLoadDatacast: function(gameKey, publisherKey, cb) { cb(); },
      fullBoxScoreFirstLoaded: function() { },
      datacastLoadError: function() { },
      datacastPaymentRequired: function(data) { }
    };
    var config = angular.extend(defaults, options);

    if (config.env == "stage") {
      config.apiRoot = "http://api.gray.hsgamecenter.com/v1.2/";
      config.unityRoot = "http://unity.stage.nfhsnetwork.com/v1/";
    } else if (config.env == "dev") {
      config.apiRoot = "http://api.gamecenter.dev/";
      //config.unityRoot = "http://localhost:3000/v1/";
      config.unityRoot = "http://unity.stage.nfhsnetwork.com/v1/";
    }//otherwise use default

    angular.extend(hsgcWidgets, config);
    angular.bootstrap(document, ['hsgc']);
  }
};

hsgcWidgets.networkAuthorize = function(gameKey, publisherKey, cb) {
  nfhs.auth.datacast(gameKey, publisherKey, function(auth) {
    if (auth.authorized) {
      cb();
    } else {
      if (!hsgcWidgets.upsold) {
        hsgcWidgets.upsold = true;<commit_msg>Point to cloudfront for unity prod<commit_after>angular.module('hsgc', [])
  .config(['$httpProvider', '$sceProvider', function($httpProvider, $sceProvider) {
    //$sceProvider.enabled(false);
    $httpProvider.defaults.headers.get =  {
        'Accept': 'application/json',
        //'HSGC-Client': "hsgc-widget-angular-client",
        //'HSGC-Client-Version': ""
      };
  }]);

hsgcWidgets = {
  init: function(options) {
    var defaults = {
      env: "prod",
      keyStrategy: "unity",
      apiRoot: "http://api.hsgamecenter.com/v1.2/",
      unityRoot: "http://cfunity.nfhsnetwork.com/v1/",
      datacastLoaded: function() {},
      beforeLoadDatacast: function(gameKey, publisherKey, cb) { cb(); },
      fullBoxScoreFirstLoaded: function() { },
      datacastLoadError: function() { },
      datacastPaymentRequired: function(data) { }
    };
    var config = angular.extend(defaults, options);

    if (config.env == "stage") {
      config.apiRoot = "http://api.gray.hsgamecenter.com/v1.2/";
      config.unityRoot = "http://unity.stage.nfhsnetwork.com/v1/";
    } else if (config.env == "dev") {
      config.apiRoot = "http://api.gamecenter.dev/";
      //config.unityRoot = "http://localhost:3000/v1/";
      config.unityRoot = "http://unity.stage.nfhsnetwork.com/v1/";
    }//otherwise use default

    angular.extend(hsgcWidgets, config);
    angular.bootstrap(document, ['hsgc']);
  }
};

hsgcWidgets.networkAuthorize = function(gameKey, publisherKey, cb) {
  nfhs.auth.datacast(gameKey, publisherKey, function(auth) {
    if (auth.authorized) {
      cb();
    } else {
      if (!hsgcWidgets.upsold) {
        hsgcWidgets.upsold = true;
{'fraction_non_alphanumeric': 0.1752046074568051, 'fraction_numerical': 0.007274931797514398, 'mean_word_length': 3.064039408866995, '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': '2187640', 'n_tokens_mistral': 1129, 'n_tokens_neox': 1113, 'n_words': 166}