(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/ATZVrYXwU');
  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":"line","polar":false,"style":{"fontFamily":"Telesans Agate-Regular","fontSize":"14px"},"parallelAxes":{"stackLabels":{"style":{"fontSize":"14px"}}}},"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":"Employment has boomed among over-50s"},"subtitle":{"align":"left","x":10,"style":{"fontFamily":"Austin News Deck-Italic","color":"#666666","fontSize":"22px","fontWeight":"normal","fontStyle":"normal","fill":"#666666","width":"566px"},"text":"They made up most of the increase in jobs over the past decade"},"plotOptions":{"series":{"allowPointSelect":true,"states":{"select":{"color":"#EFFFEF","borderColor":"black","dashStyle":"dot"}},"marker":{"enabled":false},"lineWidth":3,"label":{"style":{"font-weight":"bold","fontFamily":"Telesans Agate-Regular","fontSize":"14px"}},"events":{}},"area":{"fillOpacity":0.2,"marker":{"enabled":false,"symbol":"diamond"},"dataLabels":{"style":{"fontSize":"14px"}},"label":{"style":{"font-weight":"bold","fontFamily":"Telesans Agate-Regular","fontSize":"14px"}}},"line":{"marker":{"symbol":"diamond"}}},"exporting":{"enabled":false},"credits":{"href":"","position":{"x":-7,"y":-3},"style":{"cursor":"pointer","color":"#999999","fontSize":"10px","fontFamily":"Telesans Agate-Regular"},"text":"Source: ONS"},"colors":["#0021af","#17e698","#2f114f","#fff7b3","#ff77b7","#96efff","#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":"line"}],"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,"valueSuffix":"m"},"caption":{"style":{"fontFamily":"Telesans Agate-Regular","color":"#666666","fontSize":"18px","fontWeight":"normal","fontStyle":"normal","fill":"#666666","width":"610px"}},"stockTools":{"gui":{"enabled":false}},"navigation":{"bindingsClassName":"tools-container","events":{}},"labels":{"items":[],"style":{"color":"#333333","position":"absolute","fontFamily":"Telesans Agate-Regular","fontSize":"14px"}},"pane":{"background":[]},"responsive":{"rules":[]},"yAxis":{"title":{"useHTML":true,"text":"Employment, millions"}},"xAxis":{"lineColor":"black","tickColor":"black"},"annotations":[],"data":{"csv":"null;50+\nMay 2010;8.12\nJune 2010;8.13\nJuly 2010;8.21\nAugust 2010;8.21\nSeptember 2010;8.24\nOctober 2010;8.21\nNovember 2010;8.23\nDecember 2010;8.24\nJanuary 2011;8.29\nFebruary 2011;8.31\nMarch 2011;8.31\nApril 2011;8.32\nMay 2011;8.34\nJune 2011;8.32\nJuly 2011;8.3\nAugust 2011;8.28\nSeptember 2011;8.31\nOctober 2011;8.34\nNovember 2011;8.36\nDecember 2011;8.35\nJanuary 2012;8.37\nFebruary 2012;8.36\nMarch 2012;8.41\nApril 2012;8.45\nMay 2012;8.47\nJune 2012;8.52\nJuly 2012;8.54\nAugust 2012;8.56\nSeptember 2012;8.57\nOctober 2012;8.58\nNovember 2012;8.64\nDecember 2012;8.69\nJanuary 2013;8.69\nFebruary 2013;8.7\nMarch 2013;8.71\nApril 2013;8.73\nMay 2013;8.74\nJune 2013;8.81\nJuly 2013;8.84\nAugust 2013;8.87\nSeptember 2013;8.91\nOctober 2013;8.98\nNovember 2013;9.01\nDecember 2013;9.03\nJanuary 2014;9.02\nFebruary 2014;9.09\nMarch 2014;9.1\nApril 2014;9.11\nMay 2014;9.16\nJune 2014;9.13\nJuly 2014;9.17\nAugust 2014;9.19\nSeptember 2014;9.22\nOctober 2014;9.24\nNovember 2014;9.27\nDecember 2014;9.28\nJanuary 2015;9.33\nFebruary 2015;9.39\nMarch 2015;9.42\nApril 2015;9.41\nMay 2015;9.35\nJune 2015;9.41\nJuly 2015;9.46\nAugust 2015;9.44\nSeptember 2015;9.51\nOctober 2015;9.57\nNovember 2015;9.62\nDecember 2015;9.63\nJanuary 2016;9.63\nFebruary 2016;9.63\nMarch 2016;9.64\nApril 2016;9.69\nMay 2016;9.76\nJune 2016;9.78\nJuly 2016;9.78\nAugust 2016;9.83\nSeptember 2016;9.87\nOctober 2016;9.86\nNovember 2016;9.87\nDecember 2016;9.87\nJanuary 2017;9.89\nFebruary 2017;9.88\nMarch 2017;9.94\nApril 2017;9.93\nMay 2017;9.95\nJune 2017;9.95\nJuly 2017;9.95\nAugust 2017;9.98\nSeptember 2017;10.01\nOctober 2017;10.03\nNovember 2017;10.08\nDecember 2017;10.06\nJanuary 2018;10.11\nFebruary 2018;10.12\nMarch 2018;10.15\nApril 2018;10.2\nMay 2018;10.2\nJune 2018;10.23\nJuly 2018;10.27\nAugust 2018;10.29\nSeptember 2018;10.32\nOctober 2018;10.31\nNovember 2018;10.34\nDecember 2018;10.38\nJanuary 2019;10.43\nFebruary 2019;10.44\nMarch 2019;10.45\nApril 2019;10.5\nMay 2019;10.52\nJune 2019;10.59\nJuly 2019;10.57\nAugust 2019;10.57\nSeptember 2019;10.56\nOctober 2019;10.56\nNovember 2019;10.62\nDecember 2019;10.61\nJanuary 2020;10.65\nFebruary 2020;10.7\nMarch 2020;10.76\nApril 2020;10.7\nMay 2020;10.62","seriesMapping":[{"x":0,"y":1}]}};
  
  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-ATZVrYXwU', 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();
  }

}());
