(function () {
  //Inject code v3.0.2

  var highcharts = document.createElement('script');

  var cdn = 'https://code.highcharts.com/';
  var loaded = 0;  
  var encodedUrl = encodeURI('https://https://app.everviz.com//show/N8uW7-ImD');
  var chartCreated = false;
  var scripts = [
    "highcharts.js",
    "modules/stock.js",
    "highcharts-more.js",
    "highcharts-3d.js",
    "modules/data.js",
    "modules/exporting.js",
    "modules/funnel.js",
    "modules/solid-gauge.js",
    "modules/export-data.js",
    "modules/accessibility.js"
    /* "modules/series-label.js" */
  ];

  var externalCSS = [
     
    "https://app.everviz.com/fonts/-kdRxC3Ef/font.css"
 ,
    "https://app.everviz.com/fonts/mIQoHgFro/font.css"
 ,
    "https://app.everviz.com/fonts/b7ssKVeRa/font.css"
  ];

  var extraScripts = [
  "https://code.highcharts.com/modules/annotations.js"
  ,"https://code.highcharts.com/modules/annotations-advanced.js"
  ];

  var options = {"chart":{"type":"area","polar":false,"style":{"fontFamily":"Telesans Agate-Regular","fontSize":"14px"},"parallelAxes":{"stackLabels":{"style":{"fontSize":"14px"}}},"height":560},"title":{"align":"left","x":10,"style":{"fontFamily":"Austin News Deck-Semibold","color":"#333333","fontSize":"22px","fontWeight":"normal","fontStyle":"normal","fill":"#333333","width":"566px"},"margin":15,"text":"The climb continues","useHTML":true},"subtitle":{"align":"left","x":10,"style":{"fontFamily":"Austin News Deck-Italic","color":"#666666","fontSize":"22px","fontWeight":"normal","fontStyle":"normal","fill":"#666666","width":"566px"},"text":"The total cost of the Government’s Covid-19 support schemes for businesses and individuals has passed £92bn","useHTML":true},"plotOptions":{"series":{"allowPointSelect":true,"states":{"select":{"color":"#EFFFEF","borderColor":"black","dashStyle":"dot"}},"marker":{"enabled":false},"lineWidth":3,"events":{},"label":{"style":{"font-weight":"bold","fontFamily":"Telesans Agate-Regular","fontSize":"14px"}},"stacking":"normal","animation":false},"area":{"fillOpacity":0.2,"marker":{"enabled":false,"symbol":"diamond"},"dataLabels":{"style":{"fontSize":"14px"}},"label":{"style":{"font-weight":"bold","fontFamily":"Telesans Agate-Regular","fontSize":"14px"}},"connectNulls":false}},"exporting":{"enabled":false},"credits":{"href":"","position":{"x":-7,"y":-3},"style":{"cursor":"pointer","color":"#999999","fontSize":"10px","fontFamily":"Telesans Agate-Regular"},"text":"Source: HM Treasury"},"colors":["#0021af","#3266ca","#64aae4","#96efff","#fff7b3","#ba5594","#ff77b7","#743372","#2f114f","#17e698","#f43939"],"legend":{"align":"left","verticalAlign":"top","itemMarginBottom":10,"x":-10,"symbolRadius":0,"floating":false,"itemStyle":{"fontFamily":"Telesans Agate-Regular","color":"#333333","fontSize":"14px","fontWeight":"normal","fontStyle":"normal","cursor":"pointer","textOverflow":"ellipsis"},"borderRadius":0,"squareSymbol":true,"shadow":false,"rtl":false,"reversed":false,"symbolPadding":4,"symbolHeight":12,"padding":8},"series":[{"data":[],"turboThreshold":0,"_colorIndex":0,"_symbolIndex":0,"type":"area"},{"data":[],"turboThreshold":0,"_colorIndex":1,"_symbolIndex":0,"type":"area"},{"data":[],"turboThreshold":0,"_colorIndex":2,"_symbolIndex":0,"type":"area"},{"data":[],"turboThreshold":0,"_colorIndex":3,"_symbolIndex":0,"type":"area"},{"data":[],"turboThreshold":0,"_colorIndex":4,"_symbolIndex":0,"type":"area"},{"data":[],"turboThreshold":0,"_colorIndex":5,"_symbolIndex":0,"type":"line"},{"data":[],"turboThreshold":0,"_colorIndex":6,"_symbolIndex":0,"type":"line"}],"yAxis":{"title":{"style":{"fontFamily":"\"Lucida Grande\", \"Lucida Sans Unicode\", Verdana, Arial, Helvetica, sans-serif","color":"#666666","fontSize":"14px","fontWeight":"normal","fontStyle":"normal"},"text":""},"labels":{"useHTML":false,"x":0,"maxStaggerLines":5,"padding":5,"rotation":0,"step":0,"format":"£{value}bn"},"stackLabels":{"style":{"fontSize":"14px"}}},"tooltip":{"pointFormat":"<span style=\"color:{point.color}\">■</span> {series.name}: <b>{point.y}</b><br/>","borderRadius":0,"borderWidth":1,"enabled":true,"headerFormat":"","shadow":false,"style":{"color":"#333333","cursor":"default","fontSize":"12px","pointerEvents":"none","whiteSpace":"nowrap","fontFamily":"Telesans Agate-Regular"},"padding":6,"valueDecimals":1,"valuePrefix":"£","valueSuffix":"bn"},"caption":{"style":{"fontFamily":"Telesans Agate-Regular","color":"#666666","fontSize":"18px","fontWeight":"normal","fontStyle":"normal","fill":"#666666","width":"610px"}},"xAxis":{"title":{"style":{"fontFamily":"\"Lucida Grande\", \"Lucida Sans Unicode\", Verdana, Arial, Helvetica, sans-serif","color":"#666666","fontSize":"14px","fontWeight":"normal","fontStyle":"normal"}},"labels":{"x":0,"y":21},"lineColor":"black","tickColor":"black"},"stockTools":{"gui":{"enabled":false}},"navigation":{"events":{},"bindingsClassName":"tools-container"},"labels":{"items":[],"style":{"color":"#333333","position":"absolute","fontFamily":"Telesans Agate-Regular","fontSize":"14px"}},"pane":{"background":[]},"responsive":{"rules":[]},"annotations":[],"data":{"csv":"To date;CJRS;Selfemployment income support scheme;Bounceback loans scheme;CBILS;CLBILS;Future Fund;Total\n23 April;4.5;0;0;;0;;4.5\n3 May;8;1.3;0;0;0;;9.3\n10 May;8;1.3;8.38;6.09;0.36;;24.13\n11 May;10.1;3.1;8.38;6.09;0.36;;28.03\n17 May;11.1;6.1;14.18;7.25;0.59;;39.22\n24 May;15;6.8;18.49;8.15;0.82;;49.26\n31 May;17.5;7.2;21.29;8.92;1.11;;56.02\n7 June;19.6;7.5;23.78;9.56;1.57;0.0559;62.0659\n14 June;20.8;7.6;26.34;10.11;1.77;0.146;66.766\n21 June;22.9;7.6;28.09;10.53;2.1;0.2362;71.4562\n28 June;25.5;7.7;29.51;11.07;2.33;0.3206;76.4306\n5 July;27.4;7.7;30.93;11.49;2.58;0.3799;80.4799\n12 July;28.7;7.8;31.7;11.85;2.73;0.4196;83.1996\n19 July;29.8;7.8;32.79;12.2;2.89;0.47;85.95\n26 July;31.7;7.8;33.68;12.65;3.1;0.512;89.442\n2 August;33.8;7.8;34.34;13.08;3.27;0.534;92.824","seriesMapping":[{"x":0,"y":1},{"x":0,"y":2},{"x":0,"y":3},{"x":0,"y":4},{"x":0,"y":5},{"x":0,"y":6},{"x":0,"y":7}]}};
  
  var templateDataSettings = {};

  var pluginCode = {};;

  if (options.data) {
    options.data.complete = function(options) {
      const keys = Object.keys(templateDataSettings || {});
      keys.forEach(function(key) {
        const serie = options.series[key];
        (serie.data || []).forEach(function(d, i) {
          if (templateDataSettings[key].data && templateDataSettings[key].data[i]) {
            merge(d, templateDataSettings[key].data[i]);
          }
        })
      })  
      return options;
    }
  }

  merge(options, pluginCode);

  function isNull(what){return(typeof what==='undefined'||what===null)}
  function isStr(what){return(typeof what==='string'||what instanceof String)}
  function isNum(what){return!isNaN(parseFloat(what))&&isFinite(what)}
  function isFn(what){return(what&&(typeof what==='function')||(what instanceof Function))}
  function isArr(what){return(!isNull(what)&&what.constructor.toString().indexOf('Array')>-1)}
  function isBool(what){return(what===!0||what===!1)}
  function isBasic(what){return!isArr(what)&&(isStr(what)||isNum(what)||isBool(what)||isFn(what))}
  function isObj(what){return what&&what.constructor.toString().indexOf('Object')>-1}
  function isEmptyObjectArray(arr){return isObj(arr[0])&&arr.some(function(b){return Object.keys(b).length===0})}
  function merge(a,b){if(!a||!b)return a||b;Object.keys(b).forEach(function(bk){if(isNull(b[bk])||isBasic(b[bk])){a[bk]=b[bk]}else if(isArr(b[bk])){if(isEmptyObjectArray(b[bk]))return;a[bk]=[];b[bk].forEach(function(i){if(isNull(i)||isBasic(i)){a[bk].push(i)}else{a[bk].push(merge(isArr(i)?[]:{},i))}})}else{a[bk]=a[bk]||{};merge(a[bk],b[bk])}});return a}

  function isScriptAlreadyIncluded(src){
    var scripts = document.getElementsByTagName("script");
    for (var i = 0; i < scripts.length; i++) {
      if (scripts[i].hasAttribute('src')) {
        const scriptTag = scripts[i].getAttribute('src') || '';
        if ((scriptTag.indexOf(src) >= 0) || 
            (scriptTag.indexOf('highcharts.src.js') > -1 && src === 'highcharts.js') ||
            ((scriptTag.indexOf('stock/highstock.js') > -1) && src === 'modules/highstock.js')) {
          return true;
        }
      }
    }
    return false;
  }

  function loadCSS() {
    var cssLength = externalCSS.length;
    for(var i=0; i < cssLength; i++) {
      var css = document.createElement('link');
      css.rel  = 'stylesheet';
      css.type = "text/css";
      css.href = externalCSS[i];
      document.body.appendChild(css);
    }
  }

  function createChart() {
    if(chartCreated) return;

    if (typeof window['Highcharts'] !== 'undefined') {
      

    if (options.yAxis && options.yAxis.length === 1) options.yAxis = options.yAxis[0];
    if (options.xAxis && options.xAxis.length === 1) options.xAxis = options.xAxis[0];
    if (options.zAxis && options.zAxis.length === 1) options.zAxis = options.zAxis[0];

    /*
// Sample of extending options:
Highcharts.merge(true, options, {
    chart: {
        backgroundColor: "#bada55"
    },
    plotOptions: {
        series: {
            cursor: "pointer",
            events: {
                click: function(event) {
                    alert(this.name + " clicked\n" +
                          "Alt: " + event.altKey + "\n" +
                          "Control: " + event.ctrlKey + "\n" +
                          "Shift: " + event.shiftKey + "\n");
                }
            }
        }
    }
});
*/


      if (options && (options.lang || options.global)) {
        Highcharts.setOptions({
          global: options.global || {},
          lang: options.lang || {}
        });
      }

      if (Highcharts.Annotation) {
        Highcharts.Annotation.ControlPoint.prototype.redraw = function (animation) {
          this.graphic[animation ? 'animate' : 'attr'](
              this.options.positioner ? this.options.positioner.call(this, this.target) : null
          );
        };
      }
      
      chartCreated = true;
      window.HighchartsCloud.hasLoaded = true;
      new Highcharts.Chart('highcharts-N8uW7-ImD', options);
    }
  }

  function check(scripts, cb) {
    if (loaded === scripts.length) {
      if (cb) {
        cb();
      } else {
        for (var i = 0; i < window.HighchartsCloud.ondone.length; i++) {
          try {
            window.HighchartsCloud.ondone[i]();
          } catch(e) {
            console.error(e);
          }
        }
      }
    }
  }

  function loadScript(s, scripts, cb) {
    if (!s) next();
    
    function next() {
      ++loaded;
      if (loaded < scripts.length) {
        loadScript(scripts[loaded], scripts, cb);
      }
      check(scripts, cb);
    }

    if (isScriptAlreadyIncluded(s)) {
      return next();
    }

    var n = document.createElement('script');

    n.onload = function () {
      next();
    };

    if (s.indexOf('https') >= 0) {
      n.src = s;
    } else {
      n.src = cdn + s;
    }
    document.body.appendChild(n);
  }

  function loadExtraScripts(){
    if (extraScripts.length > 0) {
      loaded = 0;
      loadScript(extraScripts[0], extraScripts);
    } else {
      check(scripts);
    }
  }

  function loadExtraScriptsAndMakeChart(){
    loaded = 0;
    if (extraScripts.length > 0) {
      loadScript(extraScripts[0], extraScripts, createChart);
    } else {
      check(extraScripts);
    }
  }

  if (typeof window['HighchartsCloud'] === 'undefined') {
    window.HighchartsCloud = {
      ondone: [createChart],
      hasWrapped: false,
      hasLoaded: false
    };

    loadScript(scripts[0], scripts, loadExtraScripts);
    loadCSS();

  } else {
    if (!window.HighchartsCloud.hasLoaded) window.HighchartsCloud.ondone.push(loadExtraScriptsAndMakeChart);
    else loadExtraScriptsAndMakeChart();
  }

}());
