<commit_before>//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// Creates Centered Server Message
//------------------------------------------------------------------------------
d3plus.ui.message = function(vars,message) {

  var message = vars.messages.value ? message : null

  if (vars.messages.style == "large") {
    var font = vars.style.message,
        position = "center"
  }
  else {

    if (vars.footer.value) {
      var font = vars.style.footer
    }
    else if (vars.title.value) {
      var font = vars.style.title
    }
    else if (vars.title.sub.value) {
      var font = vars.style.title.sub
    }
    else if (vars.title.total.value) {
      var font = vars.style.title.total
    }
    else {
      var font = vars.style.footer
    }

    var position = font.position

  }

  var font = {
    "color": font["font-color"],
    "font-family": font["font-family"],
    "font-weight": font["font-weight"],
    "font-size": font["font-size"]+"px",
    "padding": font.padding+"px"
  }

  var background = vars.style.background != "none" ? vars.style.background : "white"

  function style(elem) {

    elem
      .style(font)
      .style("position","absolute")
      .style("background",background)
      .style("text-align","center")
      .style("left",function(){
        return position == "center" ? "50%" : "0px"
      })
      .style("width",function(){
        return position == "center" ? "auto" : vars.width.value+"px"
      })
      .style("margin-left",function(){
        return position == "center" ? -this.offsetWidth/2+"px" : "0px"
      })
      .style("top",function(){
        if (position == "center") {
          return "50%";
        }
        else if (position == "top") {
          return "0px"
        }
        else {
          return "auto"
        }
      })
      .style("bottom",function(){
        if (position == "bottom") {
          return "0px"
        }
        else {
          return "auto"
        }
      })
      .style("margin-top",function(){
        if (vars.messages.style == "large") {
          var height = this.offsetHeight
          return -height/2+"px"
        }
        return "0px"
      })

  }

  // Enter Message Group
  vars.g.message = vars.parent.selectAll("div#d3plus_message")
    .data(["message"])

  vars.g.message.enter().append("div")
    .attr("id","d3plus_message")
    .attr("opacity",0)

  var opacity = message ? 1 : 0,
      text = message ? message : vars.g.message.text(),
      display = message ? "inline-block" : "none"

  vars.g.message
    .text(text)
    .call(style)
    // .transition().duration(vars.style.timing.mouseevents)
    .style("opacity",opacity)
    .style("display",display)

}
<commit_msg>made internal error messages always display in center<commit_after>//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// Creates Centered Server Message
//------------------------------------------------------------------------------
d3plus.ui.message = function(vars,message) {

  var message = vars.messages.value ? message : null,
      size = message == vars.internal_error ? "large" : vars.messages.style

  if (size == "large") {
    var font = vars.style.message,
        position = "center"
  }
  else {

    if (vars.footer.value) {
      var font = vars.style.footer
    }
    else if (vars.title.value) {
      var font = vars.style.title
    }
    else if (vars.title.sub.value) {
      var font = vars.style.title.sub
    }
    else if (vars.title.total.value) {
      var font = vars.style.title.total
    }
    else {
      var font = vars.style.footer
    }

    var position = font.position

  }

  var font = {
    "color": font["font-color"],
    "font-family": font["font-family"],
    "font-weight": font["font-weight"],
    "font-size": font["font-size"]+"px",
    "padding": font.padding+"px"
  }

  var background = vars.style.background != "none" ? vars.style.background : "white"

  function style(elem) {

    elem
      .style(font)
      .style("position","absolute")
      .style("background",background)
      .style("text-align","center")
      .style("left",function(){
        return position == "center" ? "50%" : "0px"
      })
      .style("width",function(){
        return position == "center" ? "auto" : vars.width.value+"px"
      })
      .style("margin-left",function(){
        return position == "center" ? -this.offsetWidth/2+"px" : "0px"
      })
      .style("top",function(){
        if (position == "center") {
          return "50%";
        }
        else if (position == "top") {
          return "0px"
        }
        else {
          return "auto"
        }
      })
      .style("bottom",function(){
        if (position == "bottom") {
          return "0px"
        }
        else {
          return "auto"
        }
      })
      .style("margin-top",function(){
        if (size == "large") {
          var height = this.offsetHeight
          return -height/2+"px"
        }
        return "0px"
      })

  }

  // Enter Message Group
  vars.g.message = vars.parent.selectAll("div#d3plus_message")
    .data(["message"])

  vars.g.message.enter().append("div")
    .attr("id","d3plus_message")
    .attr("opacity",0)

  var opacity = message ? 1 : 0,
      text = message ? message : vars.g.message.text(),
      display = message ? "inline-block" : "none"

  vars.g.message
    .text(text)
    .call(style)
    // .transition().duration(vars.style.timing.mouseevents)
    .style("opacity",opacity)
    .style("display",display)

}

{'fraction_non_alphanumeric': 0.21445263347114865, 'fraction_numerical': 0.006111810174366349, 'mean_word_length': 2.0075675675675675, 'pattern_counts': {'":': 10, '<': 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': '5279158', 'n_tokens_mistral': 1728, 'n_tokens_neox': 1689, 'n_words': 326}