<!doctype html>
<title>Interpret Dashboard</title>
{% if has_local_url %}
    <a href="{{local_url}}" target="_blank">Open in new tab</a>
{% endif %}
<div style="height: 1000px;" id="{{app_id}}"></div>
<script type="text/javascript">{{ main_js}}</script>
<script defer type="text/javascript">
(function universalLoad(root, callback) {
      if(typeof exports === 'object' && typeof module === 'object') {
        // CommonJS2
        var interpretInline = require('inline-interpret-dashboard');
        callback(interpretInline);
      } else if(typeof define === 'function' && define.amd) {
        // AMD
        require(['inline-interpret-dashboard'], function(interpretInline) {
          callback(interpretInline);
        });
      } else if(typeof exports === 'object') {
        // CommonJS
        var interpretInline = require('inline-interpret-dashboard');
        callback(interpretInline);
      } else {
        // Browser
        callback(root['inline-interpret-dashboard']);
      }
    })(this, function(interpretInline) {
        var data = {{explanation|safe}};
        data.predictionUrl = data.predictionUrl ? data.predictionUrl : undefined;
        interpretInline.RenderDashboard("{{app_id}}", data);
    });

</script>