"),n.document.close(),n.focus(),!0};t.getAdConfig=function(){var e=window.cdaaas&&window.cdaaas.SETTINGS||{},t={adUnit:e.TAG_MANAGER_AD_UNIT,adCustomData:e.TAG_MANAGER_AD_CUSTOM_DATA,adCmsId:e.TAG_MANAGER_AD_CMS_ID,adAccountId:e.TAG_MANAGER_AD_ACCOUNT_ID,extras:e.TAG_MANAGER_AD_EXTRAS,gaProductUA:e.PRODUCT_UA},n={width:"100%",height:"100%",adUnit:t.adUnit,adCmsId:t.adCmsId,adAccountId:t.adAccountId,ga:{productUA:t.gaProductUA,extras:{dimension1:"web"}}},r=["ambient=web","tipo_pagina=multi-content"];if(t.adCustomData&&r.push(t.adCustomData),t.extras){if("object"===o(t.extras)){var c=[];for(var i in t.extras)c.push(encodeURIComponent(i+"="+t.extras[i]));r.push("tvg_Extras=".concat(c.join(",")))}"string"==typeof t.extras&&r.push("tvg_Extras=".concat(t.extras))}return n.adCustomData=r.join("&"),n};var r=function(e,t){var n=document.createElement("script");n.type="text/javascript",n.defer=!0,n.charset="utf-8",n.src=e,n.onload=n.onreadystatechange=function(){(t&&!this.readyState||"complete"==this.readyState)&&t()},document.getElementsByTagName("head")[0].appendChild(n)};t.loadScript=r;var c=function(e,t){var n=document.createElement("link");n.type="text/css",n.rel="stylesheet",n.media="screen,print",n.href=e,n.onload=n.onreadystatechange=function(){(t&&!this.readyState||"complete"==this.readyState)&&t()},document.getElementsByTagName("head")[0].appendChild(n)};t.loadStyle=c;t.loadAssets=function(e,t){e.forEach(function(e){switch(e.type){case"stylesheet":c(e.src,t);break;case"script":r(e.src,t)}})};t.whenAvailable=function(e,t){window.setTimeout(function n(){window[e]?t():window.setTimeout(n,50)},50)}},,,,,,,,,function(e,t,n){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.adsLazyload=function(){var e=document.querySelectorAll(".ads--lazy");if(0===e.length)return;var t=!0,n=!1,r=void 0;try{for(var c,i=function(){var e=c.value;window.ScrollSpy.add({el:e,offset:200,callback:function(){(0,o.whenAvailable)("bannerLazyLoading",function(){!function(e){var t=e.getAttribute("data-id");e.setAttribute("id",t),setTimeout(window.bannerLazyLoading(t),0)}(e)})}})},a=e[Symbol.iterator]();!(t=(c=a.next()).done);t=!0)i()}catch(e){n=!0,r=e}finally{try{t||null==a.return||a.return()}finally{if(n)throw r}}};var o=n(0)},function(e,t,n){"use strict";var o,r,c;function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}!function(n,a){"object"==i(t)&&void 0!==e?a(t):(r=[t],void 0===(c="function"==typeof(o=a)?o.apply(t,r):o)||(e.exports=c))}(0,function(e){var t,n,o=[];function r(e){var t=!0;return function(){t&&(e(),t=!1,setTimeout(function(){return t=!0},150))}}function c(e){var t=i();return e.el.getBoundingClientRect()[e.reference]+t-e.offset}function i(){if("undefined"!=typeof pageYOffset)return pageYOffset;var e=document.documentElement;return(e=e.clientHeight?e:document.body).scrollTop}function a(){}function d(){var e;e=document.body.offsetHeight,n!==e&&(n=e,function(){t=window.innerHeight;for(var e=0,n=o;e=l.pos))break;l.callback&&l.callback(),o.shift()}o.length||(window.removeEventListener("scroll",r(d)),window.removeEventListener("resize",r(a)))}e.add=function(e){if(!e.el)throw new Error("[@globocom/scrollspy] item.el is required");var i=Object.assign({offset:200,reference:"top",pos:0},e);i.pos=c(i);var l=o.findIndex(function(e){return e.pos>i.pos});o.splice(-1===l?o.length:l,0,i),1===o.length&&(t=window.innerHeight,n=document.body?document.body.offsetHeight:0,window.addEventListener("scroll",r(d)),window.addEventListener("resize",r(a))),u()},e.clean=function(){o=[]},e.debug=function(){return o.forEach(function(e,t){var n="2px dashed "+(t%2?"red":"blue"),o=document.createElement("div"),r=["top: "+e.pos+";","width: 100%;","position: absolute;","border-top: "+n+";"].join("");e.el.style.border=n,o.className="debug-line",o.setAttribute("style",r),document.body.appendChild(o)}),o},e.getItems=function(){return o.map(function(e){return e})},Object.defineProperty(e,"__esModule",{value:!0})})},function(e,t,n){"use strict";var o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var o=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};o.get||o.set?Object.defineProperty(t,n,o):t[n]=e[n]}return t.default=e,t}(n(11)),r=n(10);n(9),window.ScrollSpy=o,document.addEventListener("bannerLazyLoadingReady",r.adsLazyload)}]);!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=2)}([,function(e,t,n){},function(e,t,n){"use strict";n(1)}]);!function(t){var e={};function o(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,o),i.l=!0,i.exports}o.m=t,o.c=e,o.d=function(t,e,r){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(o.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)o.d(r,i,function(e){return t[e]}.bind(null,i));return r},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=4)}([function(t,e,o){var r=o(2)();t.exports=r;try{regeneratorRuntime=r}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},function(t,e){function o(t,e,o,r,i,n,a){try{var s=t[n](a),c=s.value}catch(t){return void o(t)}s.done?e(c):Promise.resolve(c).then(r,i)}t.exports=function(t){return function(){var e=this,r=arguments;return new Promise(function(i,n){var a=t.apply(e,r);function s(t){o(a,i,n,s,c,"next",t)}function c(t){o(a,i,n,s,c,"throw",t)}s(void 0)})}},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,o){var r=o(3).default;function i(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */t.exports=i=function(){return o},t.exports.__esModule=!0,t.exports.default=t.exports;var e,o={},n=Object.prototype,a=n.hasOwnProperty,s=Object.defineProperty||function(t,e,o){t[e]=o.value},c="function"==typeof Symbol?Symbol:{},u=c.iterator||"@@iterator",l=c.asyncIterator||"@@asyncIterator",d=c.toStringTag||"@@toStringTag";function p(t,e,o){return Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{p({},"")}catch(e){p=function(t,e,o){return t[e]=o}}function h(t,e,o,r){var i=e&&e.prototype instanceof w?e:w,n=Object.create(i.prototype),a=new C(r||[]);return s(n,"_invoke",{value:E(t,o,a)}),n}function f(t,e,o){try{return{type:"normal",arg:t.call(e,o)}}catch(t){return{type:"throw",arg:t}}}o.wrap=h;var g="suspendedStart",v="suspendedYield",y="executing",_="completed",m={};function w(){}function O(){}function b(){}var L={};p(L,u,function(){return this});var G=Object.getPrototypeOf,x=G&&G(G(j([])));x&&x!==n&&a.call(x,u)&&(L=x);var S=b.prototype=w.prototype=Object.create(L);function D(t){["next","throw","return"].forEach(function(e){p(t,e,function(t){return this._invoke(e,t)})})}function k(t,e){function o(i,n,s,c){var u=f(t[i],t,n);if("throw"!==u.type){var l=u.arg,d=l.value;return d&&"object"==r(d)&&a.call(d,"__await")?e.resolve(d.__await).then(function(t){o("next",t,s,c)},function(t){o("throw",t,s,c)}):e.resolve(d).then(function(t){l.value=t,s(l)},function(t){return o("throw",t,s,c)})}c(u.arg)}var i;s(this,"_invoke",{value:function(t,r){function n(){return new e(function(e,i){o(t,r,e,i)})}return i=i?i.then(n,n):n()}})}function E(t,o,r){var i=g;return function(n,a){if(i===y)throw Error("Generator is already running");if(i===_){if("throw"===n)throw a;return{value:e,done:!0}}for(r.method=n,r.arg=a;;){var s=r.delegate;if(s){var c=N(s,r);if(c){if(c===m)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===g)throw i=_,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=y;var u=f(t,o,r);if("normal"===u.type){if(i=r.done?_:v,u.arg===m)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(i=_,r.method="throw",r.arg=u.arg)}}}function N(t,o){var r=o.method,i=t.iterator[r];if(i===e)return o.delegate=null,"throw"===r&&t.iterator.return&&(o.method="return",o.arg=e,N(t,o),"throw"===o.method)||"return"!==r&&(o.method="throw",o.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var n=f(i,t.iterator,o.arg);if("throw"===n.type)return o.method="throw",o.arg=n.arg,o.delegate=null,m;var a=n.arg;return a?a.done?(o[t.resultName]=a.value,o.next=t.nextLoc,"return"!==o.method&&(o.method="next",o.arg=e),o.delegate=null,m):a:(o.method="throw",o.arg=new TypeError("iterator result is not an object"),o.delegate=null,m)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function j(t){if(t||""===t){var o=t[u];if(o)return o.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,n=function o(){for(;++i=0;--i){var n=this.tryEntries[i],s=n.completion;if("root"===n.tryLoc)return r("end");if(n.tryLoc<=this.prev){var c=a.call(n,"catchLoc"),u=a.call(n,"finallyLoc");if(c&&u){if(this.prev=0;--o){var r=this.tryEntries[o];if(r.tryLoc<=this.prev&&a.call(r,"finallyLoc")&&this.prev=0;--e){var o=this.tryEntries[e];if(o.finallyLoc===t)return this.complete(o.completion,o.afterLoc),I(o),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var o=this.tryEntries[e];if(o.tryLoc===t){var r=o.completion;if("throw"===r.type){var i=r.arg;I(o)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,o,r){return this.delegate={iterator:j(t),resultName:o,nextLoc:r},"next"===this.method&&(this.arg=e),m}},o}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){function o(e){"@babel/helpers - typeof";return t.exports=o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,o(e)}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,o){"use strict";o.r(e);var r=o(1),i=o.n(r),n=o(0),a=o.n(n);const s="debug",c=Object.freeze({oglobo:{id:"3981",id_simple:"6907",cod_prod:"OG03",isOidcLogin:!1,isNewLoginService:!0,productGroup:"oglobo"},valor:{id:"6668",id_simple:"6908",cod_prod:"valordigital",isOidcLogin:!1,isNewLoginService:!1,productGroup:""},valoroneinterno:{id:"7097",id_simple:"6908",cod_prod:" valor-one",isOidcLogin:!1,isNewLoginService:!0,productGroup:""},monet:{id:"6618",id_simple:"6618",cod_prod:"monet",isOidcLogin:!1,isNewLoginService:!1,productGroup:""},autoesporte:{id:"6613",id_simple:"6613",cod_prod:"auto-esporte",isOidcLogin:!1,isNewLoginService:!1,productGroup:""},vogue:{id:"6614",id_simple:"6614",cod_prod:"vogue",isOidcLogin:!1,isNewLoginService:!1,productGroup:""},glamour:{id:"6616",id_simple:"6616",cod_prod:"glamour",isOidcLogin:!1,isNewLoginService:!1,productGroup:""},casavogue:{id:"6610",id_simple:"6610",cod_prod:"casa-vogue",isOidcLogin:!1,isNewLoginService:!1,productGroup:""},marieclaire:{id:"6609",id_simple:"6609",cod_prod:"marie-claire",isOidcLogin:!1,isNewLoginService:!1,productGroup:""},globorural:{id:"6621",id_simple:"6612",cod_prod:"globo-rural",isOidcLogin:!1,isNewLoginService:!1,productGroup:""},gq:{id:"6622",id_simple:"6622",cod_prod:"gq",isOidcLogin:!1,isNewLoginService:!1,productGroup:""},crescer:{id:"6620",id_simple:"6620",cod_prod:"crescer",isOidcLogin:!1,isNewLoginService:!1,productGroup:""},galileu:{id:"6697",id_simple:"6697",cod_prod:"galileu",isOidcLogin:!1,isNewLoginService:!1,productGroup:""},epocanegocios:{id:"6611",id_simple:"6611",cod_prod:"epoca-negocios",isOidcLogin:!1,isNewLoginService:!1,productGroup:""},casaejardim:{id:"6619",id_simple:"6619",cod_prod:"casa-jardim",isOidcLogin:!1,isNewLoginService:!1,productGroup:""},quem:{id:"6697",id_simple:"6697",cod_prod:"quem",isOidcLogin:!1,isNewLoginService:!1,productGroup:""},pegn:{id:"6615",id_simple:"6615",cod_prod:"pequenas-empresas",isOidcLogin:!1,isNewLoginService:!1,productGroup:""}}),u=Object.freeze({prod:{API_INFOGLOBO:"https://api.infoglobo.com.br/",MODE:"production"},qa:{API_INFOGLOBO:"https://apiqlt-ig.infoglobo.com.br/",MODE:"production"}}),l=5e3,d="UserDataGloboId";class p{constructor(t="oglobo",e="prod",o=!1){this.tenant=t,this.config={...c[t],...u[e]},this.config.MODE===s||this.config.MODE,this._setData({autorizado:!1,logado:!1,motivo:"",glbid:"",uuid:"",access_token:""})}async getData(){const t=this._getAccessToken(),e=this._getCookieCache(),o=this._getGLOBOID(),r=this._getGLBID(),i=this._getUTP();if(r||t)if(this._isCookieCacheValid()){const t=this._getCookieCacheData(e);this._setData(t),this.LOG("Cache setado",this.data)}else{if(t&&(this._setData({access_token:t}),this.LOG("Access Token setado",this.data)),r&&(this._setData({logado:!0,glbid:r}),this.LOG("GLBID setado",this.data)),o){const t=this._getGLOBOIDData(o);this._setData({...t,uuid:t.globoId}),this.LOG("GLOBO_ID setado",this.data)}if(i){const t=this._getUTPData(i);this._setData(t),this.LOG("_utp setado",this.data)}else await this._getBarramentoData();this._setCookieCache()}else p.eraseCookie(d);return this.data}static getCookie(t){var e=" "+document.cookie,o=" "+t+"=",r=e.indexOf(o);if(-1===r)return null;var i=r+o.length,n=e.indexOf(";",i);return-1!==n?e.substring(i,n):e.substring(i)}static setCookie(t,e,o){var r="";if(o){var i=new Date;i.setTime(i.getTime()+24*o*60*60*1e3),r="; expires="+i.toUTCString()}document.cookie=t+"="+(e||"")+r+"; path=/"}static eraseCookie(t){document.cookie=t+"=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;"}_setData(t){"object"==typeof t&&(this.data={...this.data,...t})}_getUTPData(t){try{const e=decodeURIComponent(atob(t));return JSON.parse(e)}catch(t){throw new Error("[infoglobo-user-lib] Erro na conversão do cookie _utp")}}_getGLOBOIDData(t){try{const e=atob(t.split(".")[1]);return JSON.parse(e)}catch(t){throw new Error("[infoglobo-user-lib] Erro na conversão do cookie GLOBO_ID")}}_getCookieCacheData(t){try{return JSON.parse(t)}catch(t){throw new Error(`[infoglobo-user-lib] Erro na conversão do cookie ${d}`)}}async _getBarramentoData(){return new Promise((t,e)=>{setTimeout(async()=>{if(this.data.glbid||this.data.access_token)try{const t=this._getUTP(),o=this._getGLOBOID();if(o){const t=this._getGLOBOIDData(o);this._setData({...t,uuid:t.globoId}),this.LOG("Timeout GLOBO_ID setado",this.data)}if(t){const e=this._getUTPData(t);this._setData(e),this.LOG("Timeout _utp setado",this.data)}else this.data.access_token?await this._fetchDataV4(this.data.access_token):await this._fetchData()}catch(t){e(t)}t(this.data)},l)})}async _fetchData(){try{const t=`${this.config.API_INFOGLOBO}relacionamento/v3/funcionalidade/${this.config.id}/autorizacao-acesso`,e={ipUsuario:"127.0.0.1","token-autenticacao":this.data.glbid,codigoProduto:this.config.cod_prod},o=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","ig-requestid":`infoglobo-user-lib-${(new Date).getTime()}`},body:JSON.stringify(e)}),r=await o.json();this._setData(r),this.LOG("Timeout Barramento v3 setado",this.data)}catch(t){throw new Error("[infoglobo-user-lib] Erro ao consultar a API")}}async _fetchDataV4(t){try{const e=`${this.config.API_INFOGLOBO}relacionamento/v4/autorizacao-acesso/${this.config.id_simple}/solicitacao-autorizacao/`,o={"token-acesso":t,codigoProduto:this.config.cod_prod},r=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","ig-requestid":`infoglobo-user-lib-${(new Date).getTime()}`},body:JSON.stringify(o)}),i=await r.json();this._setData(i),this.LOG("Timeout Barramento v4 setado",this.data)}catch(t){throw new Error("[infoglobo-user-lib] Erro ao consultar a API Barramento v4")}}_getAccessToken(){const t=`globoid-tokens-${window.oidcSettings.clientId}`,e=window.localStorage.getItem(t);return e?JSON.parse(e).access_token:void 0}_getGLBID(){return p.getCookie("GLBID")}_getUTP(){return p.getCookie("_utp")}_getGLOBOID(){return p.getCookie("GLOBO_ID")}_getCookieCache(){return p.getCookie(d)}_setCookieCache(){p.setCookie(d,JSON.stringify(this.data),1)}_isCookieCacheValid(){const t=this._getCookieCache(),e=this._getGLOBOID();if(t&&e){const o=this._getCookieCacheData(t),r=this._getGLOBOIDData(e);return o.globoId===r.globoId}return!1}LOG(t="",e={}){this.config.MODE===s&&console.log("[infoglobo-user-lib]",t,e)}}var h=p,f=function(){var t=window.location.hostname;return t.includes("local.globo.com")||t.includes("localhost")||t.includes(".qa.globoi.com")||t.includes(".qa01.globoi.com")||t.includes(".dev.globoi.com")?"qa":"prod"};if(window.tenant){var g=function(){var t=i()(a.a.mark(function t(){var e,o,r,i;return a.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=new h(v,y,!0),t.next=3,e.getData();case 3:o=t.sent,r=o.autorizado||!1,i=null,window.tp&&window.tp.customVariables&&(i=window.tp.customVariables.exAssinante),OneSignal.push(function(){OneSignal.sendTag("autorizado",r),null!==i&&OneSignal.sendTag("ex-assinante",i)});case 8:case"end":return t.stop()}},t)}));return function(){return t.apply(this,arguments)}}(),v=window.tenant?window.tenant:null,y=window.glb&&"function"==typeof window.glb.getCurrentEnv?window.glb.getCurrentEnv():f(),_=window.OneSignalConfig&&window.OneSignalConfig.tenantsNotReq?window.OneSignalConfig.tenantsNotReq:[];window.addEventListener("load",function(){v&&!_.includes(v)?(g(),console.log("[ONESIGNAL] Tenant ".concat(v," - Sending tag to Onesignal"))):v?console.log("[ONESIGNAL] Tenant ".concat(v," - Tag not sent to Onesignal")):console.log("[ONESIGNAL] Tenant no definido - Tag not sent to Onesignal")})}}]);!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=0)}([function(e,t,r){"use strict";r.r(t);r(1)},function(e,t,r){}]);!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=3)}([,,,function(e,t,r){"use strict";r.r(t);r(4)},function(e,t,r){}]);!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";n.r(t);n(1);window.addEventListener("load",()=>{let e=document.createElement("BUTTON");e.classList.add("btn-fullbanner-close"),e.setAttribute("width","10px"),e.setAttribute("height","10px"),document.querySelector("#mc-container-top").appendChild(e),document.querySelector(".btn-fullbanner-close").addEventListener("click",e=>e.target.parentNode.classList.remove("banner-scroll-fixed")),document.querySelector(".btn-fullbanner-close").addEventListener("click",e=>e.target.parentNode.classList.add("banner-hide"))})},function(e,t,n){}]);!function(e){var t={};function r(o){if(t[o])return t[o].exports;var n=t[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,r),n.l=!0,n.exports}r.m=e,r.c=t,r.d=function(e,t,o){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(o,n,function(t){return e[t]}.bind(null,n));return o},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=16)}([function(e,t,r){var o=r(15)();e.exports=o;try{regeneratorRuntime=o}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=o:Function("r","regeneratorRuntime = r")(o)}},function(e,t){function r(e,t,r,o,n,i,a){try{var s=e[i](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(o,n)}e.exports=function(e){return function(){var t=this,o=arguments;return new Promise(function(n,i){var a=e.apply(t,o);function s(e){r(a,n,i,s,c,"next",e)}function c(e){r(a,n,i,s,c,"throw",e)}s(void 0)})}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){var o=r(11),n=r(12),i=r(13),a=r(14);e.exports=function(e){return o(e)||n(e)||i(e)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){function r(t){"@babel/helpers - typeof";return e.exports=r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,r(t)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){var o=r(3).default,n=r(10);e.exports=function(e){var t=n(e,"string");return"symbol"==o(t)?t:t+""},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=Array(t);r{setTimeout(async()=>{if(this.data.glbid||this.data.access_token)try{const e=this._getUTP(),r=this._getGLOBOID();if(r){const e=this._getGLOBOIDData(r);this._setData({...e,uuid:e.globoId}),this.LOG("Timeout GLOBO_ID setado",this.data)}if(e){const t=this._getUTPData(e);this._setData(t),this.LOG("Timeout _utp setado",this.data)}else this.data.access_token?await this._fetchDataV4(this.data.access_token):await this._fetchData()}catch(e){t(e)}e(this.data)},v)})}async _fetchData(){try{const e=`${this.config.API_INFOGLOBO}relacionamento/v3/funcionalidade/${this.config.id}/autorizacao-acesso`,t={ipUsuario:"127.0.0.1","token-autenticacao":this.data.glbid,codigoProduto:this.config.cod_prod},r=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","ig-requestid":`infoglobo-user-lib-${(new Date).getTime()}`},body:JSON.stringify(t)}),o=await r.json();this._setData(o),this.LOG("Timeout Barramento v3 setado",this.data)}catch(e){throw new Error("[infoglobo-user-lib] Erro ao consultar a API")}}async _fetchDataV4(e){try{const t=`${this.config.API_INFOGLOBO}relacionamento/v4/autorizacao-acesso/${this.config.id_simple}/solicitacao-autorizacao/`,r={"token-acesso":e,codigoProduto:this.config.cod_prod},o=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","ig-requestid":`infoglobo-user-lib-${(new Date).getTime()}`},body:JSON.stringify(r)}),n=await o.json();this._setData(n),this.LOG("Timeout Barramento v4 setado",this.data)}catch(e){throw new Error("[infoglobo-user-lib] Erro ao consultar a API Barramento v4")}}_getAccessToken(){const e=`globoid-tokens-${window.oidcSettings.clientId}`,t=window.localStorage.getItem(e);return t?JSON.parse(t).access_token:void 0}_getGLBID(){return b.getCookie("GLBID")}_getUTP(){return b.getCookie("_utp")}_getGLOBOID(){return b.getCookie("GLOBO_ID")}_getCookieCache(){return b.getCookie(_)}_setCookieCache(){b.setCookie(_,JSON.stringify(this.data),1)}_isCookieCacheValid(){const e=this._getCookieCache(),t=this._getGLOBOID();if(e&&t){const r=this._getCookieCacheData(e),o=this._getGLOBOIDData(t);return r.globoId===o.globoId}return!1}LOG(e="",t={}){this.config.MODE===y&&console.log("[infoglobo-user-lib]",e,t)}}var w=b;function O(e){return w.getCookie(e)}var x=function(){var e=window.location.hostname;return e.includes("local.globo.com")||e.includes("localhost")||e.includes(".qa.globoi.com")||e.includes(".qa01.globoi.com")||e.includes(".dev.globoi.com")?"qa":"prod"},L=function(){for(var e=new Set,t=document.getElementsByTagName("a"),r=0;r=120))break}return Array.from(e)};function S(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,o)}return r}function k(e){for(var t=1;t0&&(this.feed.dataset.type="news",t.sections.map(function(t){var r=e.form.querySelector(".myfeed__input[name='".concat(t.section_name,"']"));r&&(r.checked=!0,e.saveButton.disabled=!1)}))}}},{key:"showWarningNoArticles",value:function(){var e=this.userPreferences.preferences.sections,t=a()(document.querySelectorAll(".myfeed__label")).some(function(t){return e.some(function(e){return t.textContent===e.section_name})});e&&e.length>0&&t?(this.feed.dataset.type="news",document.querySelector(".myfeed__alert").textContent="Desculpe, não temos nenhuma notícia com os assuntos do seu interesse nesse momento.",document.querySelector(".myfeed__alert").style.display="block",this.feed.querySelector("footer").style.display="none"):(this.feed.dataset.type="fav",document.querySelector(".myfeed__alert").textContent="")}},{key:"updateArticlesRender",value:function(){var e=this,t=!!this.userPreferences.preferences,r=!!this.userPreferences.articles;if(t&&r){var o=this.userPreferences.articles;o.length>0?(o.map(function(t){var r=e.template.content.cloneNode(!0),o=t.title,n=(t.hat,t.image),i=t.image94,a=t.url,s=t.section;if(r.querySelector(".myfeed__hat a").innerHTML=s,r.querySelector(".myfeed__subject a").innerHTML=o,r.querySelectorAll(".myfeed__link").forEach(function(t){return t.href="".concat(a,"?interno_origem=home").concat(e.tenant,"&interno_midia=assuntosfavoritos&interno_campanha=urlmateriaassuntosfavoritos")}),i||n)r.querySelector(".myfeed__photo").src=i||n,r.querySelector(".myfeed__photo").alt=o;else{var c=r.querySelector(".myfeed__picture");c.parentNode.removeChild(c)}e.container.appendChild(r)}),this.feed.dataset.type="news",document.querySelector(".myfeed__alert").textContent="",this.showLess()):this.showWarningNoArticles()}}},{key:"clearUserPreferences",value:function(){var e=c()(h.a.mark(function e(){var t;return h.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t={preferences:[],tenant:this.tenant,uuid:this.userId},e.next=3,this.requestUserPreferences({method:"POST",body:JSON.stringify(t)});case 3:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"editOrClearPreferences",value:function(){var e=this,t=this.feed.querySelector(".myfeed__edit"),r=this.feed.querySelector(".myfeed__clean");t.addEventListener("click",function(t){t.preventDefault(),e.feed.dataset.type="fav",e.feed.querySelector("footer").style.display="none",document.querySelector(".myfeed__alert").style.display="none"}),r.addEventListener("click",function(){var t=c()(h.a.mark(function t(r){return h.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r.preventDefault(),e.userSelection=a()(e.form.querySelectorAll(".myfeed__input:checked")),e.userSelection.map(function(e){e.checked=!1}),t.prev=3,t.next=6,e.clearUserPreferences();case 6:e.saveButton.disabled=!0,t.next=12;break;case 9:t.prev=9,t.t0=t.catch(3),e.saveButton.disabled=!1;case 12:case"end":return t.stop()}},t,null,[[3,9]])}));return function(e){return t.apply(this,arguments)}}())}},{key:"requestUserPreferences",value:function(){var e=c()(h.a.mark(function e(){var t,r,o,n,i,a,s,c,u,l,d=arguments;return h.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=d.length>0&&void 0!==d[0]?d[0]:{method:"GET"},r=window.object_localstorage,""!==(o=(o=localStorage.getItem(r))||"")?(n=JSON.parse(o),i=n.access_token,a={"Content-Type":"application/json",Authorization:"Bearer ".concat(i)}):a={"Content-Type":"application/json",Authorization:"Bearer"},(s=L())&&s.length>0&&(a["Custom-URLs"]=s.join(",")),c=k(k({},t),{},{headers:a}),e.next=10,fetch(this.userPreferencesUrl(),c);case 10:return u=e.sent,e.next=13,u.json();case 13:return l=e.sent,e.abrupt("return",l);case 15:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"hideItems",value:function(){this.form.classList.add("feed_hidden"),this.feed.querySelector(".myfeed__loginspan").classList.add("feed_hidden")}},{key:"saveUserPreferences",value:function(){var e=this;this.saveButton.addEventListener("click",function(t){t.preventDefault(),e.userSelection=a()(e.form.querySelectorAll(".myfeed__input:checked")),e.userSectionPreferences=e.userSelection.map(function(e){return{section_name:e.value,section_id:e.dataset.sectionid}});var r={preferences:e.userSectionPreferences,tenant:e.tenant,uuid:e.userId};e.sendData(r)})}},{key:"sendData",value:function(){var e=c()(h.a.mark(function e(t){var r;return h.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.requestUserPreferences({method:"POST",body:JSON.stringify(t)});case 2:r=e.sent,this.userPreferences=r,this.clearArticles(),this.updateArticlesRender();case 6:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"showMore",value:function(){var e=document.querySelectorAll(".myfeed__card");if(e.length>3){for(var t=Math.ceil(e.length/2);t3){for(var t=Math.ceil(e.length/2);t=0;--n){var i=this.tryEntries[n],s=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var c=a.call(i,"catchLoc"),u=a.call(i,"finallyLoc");if(c&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&a.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),_}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var o=r.completion;if("throw"===o.type){var n=o.arg;C(r)}return n}}throw Error("illegal catch attempt")},delegateYield:function(e,r,o){return this.delegate={iterator:q(e),resultName:r,nextLoc:o},"next"===this.method&&(this.arg=t),_}},r}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){"use strict";r.r(t);r(17);var o=r(9);document.addEventListener("DOMContentLoaded",function(e){e.preventDefault();var t=document.querySelector(".myfeed");new o.default(t).init()})},function(e,t,r){}]);!function(t){var e={};function i(s){if(e[s])return e[s].exports;var o=e[s]={i:s,l:!1,exports:{}};return t[s].call(o.exports,o,o.exports,i),o.l=!0,o.exports}i.m=t,i.c=e,i.d=function(t,e,s){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:s})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var s=Object.create(null);if(i.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)i.d(s,o,function(e){return t[e]}.bind(null,o));return s},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=12)}([function(t,e){function i(e){"@babel/helpers - typeof";return t.exports=i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,i(e)}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){t.exports=function(t){return t&&t.__esModule?t:{default:t}},t.exports.__esModule=!0,t.exports.default=t.exports},,,function(t,e,i){},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;e.default={chart:{plotBorderWidth:1,plotBorderColor:"#ccc",backgroundColor:null,spacingLeft:1,spacingRight:1,spacingTop:0,spacingBottom:1},colors:["#69c8eb","#a4d200","#d20000"],credits:{enabled:!1},global:{useUTC:!1},loading:{labelStyle:{padding:"4px 10px",backgroundColor:"#006699",color:"#ffffff",display:"inline-block",height:"30px",lineHeight:"30px","*display":"inline","*zoom":1,top:"50%",marginTop:"-15px",borderRadius:"4px",position:"relative"},style:{opacity:1}},lang:{loading:"Carregando...",months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],rangeSelectorFrom:"De",rangeSelectorTo:"para",rangeSelectorZoom:null,weekdays:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado"]},navigator:{enabled:!1,handles:{backgroundColor:"#eee",borderColor:"#999"},outlineWidth:1,outlineColor:"#bbb",series:{type:"line",lineColor:"#bbb",fillOpacity:0},xAxis:{gridLineColor:"#000",gridLineWidth:0,labels:{enabled:!1,style:{fontFamily:"opensans, Arial, Helvetica, Sans-serif"}}}},plotOptions:{area:{fillOpacity:.12}},rangeSelector:{inputEnabled:!1,enabled:!1,inputDateFormat:"%d %b, %Y",inputEditDateFormat:"%d-%m-%Y",buttons:[{type:"month",count:1,text:"1m"},{type:"month",count:3,text:"3m"},{type:"month",count:6,text:"6m"},{type:"month",count:9,text:"9m"},{type:"year",count:1,text:"12m"},{type:"all",count:1,text:"Tudo"}]},scrollbar:{enabled:!1,barBackgroundColor:"#dadada",barBorderWidth:0,rifleColor:"#999",trackBackgroundColor:"#f0f0f0",trackBorderColor:"#dadada",buttonBackgroundColor:"none",buttonBorderRadius:0,buttonBorderColor:"#dadada"},subtitle:{align:"right",style:{color:"#666666",fontSize:"11px",fontFamily:"opensans, Arial, Helvetica, Sans-serif"},y:38},title:{align:"right",useHTML:!0,style:{fontSize:"23px",fontWeight:"bold",color:"#555555",fontFamily:"opensans, Arial, Helvetica, Sans-serif",top:0},y:22},xAxis:{dateTimeLabelFormats:{second:"%H:%M:%S",minute:"%H:%M",hour:"%H:%M",day:"%d/%m",week:"%d/%m/%Y",month:"%m/%Y",year:"%Y"},gridLineColor:"#ccc",gridLineDashStyle:"dot",gridZIndex:3,gridLineWidth:1,labels:{style:{color:"#555555",fontSize:"12px",fontWeight:"normal",fontFamily:"opensans, Arial, Helvetica, Sans-serif"},y:16},lineWidth:0},yAxis:{gridLineColor:"#ccc",gridLineDashStyle:"dot",gridLineWidth:1,gridZIndex:3,opposite:!1,labels:{style:{color:"#555555",fontSize:"12px",fontWeight:"normal",fontFamily:"opensans, Arial, Helvetica, Sans-serif"},align:"left",x:10},showLastLabel:!1}}},function(t,e,i){var s;!function(o,n){"object"==typeof t&&t.exports?t.exports=o.document?n(o):n:void 0===(s=function(){return n(o)}.call(e,i,e,t))||(t.exports=s)}("undefined"!=typeof window?window:this,function(t){var e=function(){var e=void 0===t?window:t,i=e.document,s=e.navigator&&e.navigator.userAgent||"",o=i&&i.createElementNS&&!!i.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,n=/(edge|msie|trident)/i.test(s)&&!e.opera,r=-1!==s.indexOf("Firefox"),a=-1!==s.indexOf("Chrome"),h=r&&4>parseInt(s.split("Firefox/")[1],10);return e.Highcharts?e.Highcharts.error(16,!0):{product:"Highstock",version:"6.2.0",deg2rad:2*Math.PI/360,doc:i,hasBidiBug:h,hasTouch:i&&void 0!==i.documentElement.ontouchstart,isMS:n,isWebKit:-1!==s.indexOf("AppleWebKit"),isFirefox:r,isChrome:a,isSafari:!a&&-1!==s.indexOf("Safari"),isTouchDevice:/(Mobile|Android|Windows Phone)/.test(s),SVG_NS:"http://www.w3.org/2000/svg",chartCount:0,seriesTypes:{},symbolSizes:{},svg:o,win:e,marginNames:["plotTop","marginRight","marginBottom","plotLeft"],noop:function(){},charts:[]}}();!function(t){t.timers=[];var e=t.charts,i=t.doc,s=t.win;t.error=function(e,i){if(e=t.isNumber(e)?"Highcharts error #"+e+": www.highcharts.com/errors/"+e:e,i)throw Error(e);s.console&&console.log(e)},t.Fx=function(t,e,i){this.options=e,this.elem=t,this.prop=i},t.Fx.prototype={dSetter:function(){var t,e=this.paths[0],i=this.paths[1],s=[],o=this.now,n=e.length;if(1===o)s=this.toD;else if(n===i.length&&1>o)for(;n--;)t=parseFloat(e[n]),s[n]=isNaN(t)?i[n]:o*parseFloat(i[n]-t)+t;else s=i;this.elem.attr("d",s,null,!0)},update:function(){var t=this.elem,e=this.prop,i=this.now,s=this.options.step;this[e+"Setter"]?this[e+"Setter"]():t.attr?t.element&&t.attr(e,i,null,!0):t.style[e]=i+this.unit,s&&s.call(t,i,this)},run:function(e,i,o){var n=this,r=n.options,a=function(t){return!a.stopped&&n.step(t)},h=s.requestAnimationFrame||function(t){setTimeout(t,13)},l=function(){for(var e=0;e=a+this.startTime?(this.now=this.end,this.pos=1,this.update(),i=h[this.prop]=!0,t.objectEach(h,function(t){!0!==t&&(i=!1)}),i&&r&&r.call(n),e=!1):(this.pos=o.easing((s-this.startTime)/a),this.now=this.start+(this.end-this.start)*this.pos,this.update(),e=!0),e},initPath:function(e,i,s){function o(t){var e,i;for(c=t.length;c--;)e="M"===t[c]||"L"===t[c],i=/[a-zA-Z]/.test(t[c+3]),e&&i&&t.splice(c+1,0,t[c+1],t[c+2],t[c+1],t[c+2])}function n(t,e){for(;t.lengtht&&-1/0=s&&(i=[1/s]))),o=0;o=e||!n&&r<=(i[o]+(i[o+1]||i[o]))/2));o++);return t.correctFloat(a*s,-Math.round(Math.log(.001)/Math.LN10))},t.stableSort=function(t,e){var i,s,o=t.length;for(s=0;si&&(i=t[e]);return i},t.destroyObjectProperties=function(e,i){t.objectEach(e,function(t,s){t&&t!==i&&t.destroy&&t.destroy(),delete e[s]})},t.discardElement=function(e){var i=t.garbageBin;i||(i=t.createElement("div")),e&&i.appendChild(e),i.innerHTML=""},t.correctFloat=function(t,e){return parseFloat(t.toPrecision(e||14))},t.setAnimation=function(e,i){i.renderer.globalAnimation=t.pick(e,i.options.chart.animation,!0)},t.animObject=function(e){return t.isObject(e)?t.merge(e):{duration:e?500:0}},t.timeUnits={millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,week:6048e5,month:24192e5,year:314496e5},t.numberFormat=function(e,i,s,o){e=+e||0,i=+i;var n,r,a=t.defaultOptions.lang,h=(e.toString().split(".")[1]||"").split("e")[0].length,l=e.toString().split("e");return-1===i?i=Math.min(h,20):t.isNumber(i)?i&&l[1]&&0>l[1]&&(0<=(n=i+ +l[1])?(l[0]=(+l[0]).toExponential(n).split("e")[0],i=n):(l[0]=l[0].split(".")[0]||0,e=20>i?(l[0]*Math.pow(10,l[1])).toFixed(i):0,l[1]=0)):i=2,r=(Math.abs(l[1]?l[0]:e)+Math.pow(10,-Math.max(i,h)-1)).toFixed(i),n=3<(h=String(t.pInt(r))).length?h.length%3:0,s=t.pick(s,a.decimalPoint),o=t.pick(o,a.thousandsSep),e=(0>e?"-":"")+(n?h.substr(0,n)+o:""),e+=h.substr(n).replace(/(\d{3})(?=\d)/g,"$1"+o),i&&(e+=s+r.slice(-i)),l[1]&&0!=+e&&(e+="e"+l[1]),e},Math.easeInOutSine=function(t){return-.5*(Math.cos(Math.PI*t)-1)},t.getStyle=function(e,i,o){return"width"===i?Math.max(0,Math.min(e.offsetWidth,e.scrollWidth)-t.getStyle(e,"padding-left")-t.getStyle(e,"padding-right")):"height"===i?Math.max(0,Math.min(e.offsetHeight,e.scrollHeight)-t.getStyle(e,"padding-top")-t.getStyle(e,"padding-bottom")):(s.getComputedStyle||t.error(27,!0),(e=s.getComputedStyle(e,void 0))&&(e=e.getPropertyValue(i),t.pick(o,"opacity"!==i)&&(e=t.pInt(e))),e)},t.inArray=function(e,i,s){return(t.indexOfPolyfill||Array.prototype.indexOf).call(i,e,s)},t.grep=function(e,i){return(t.filterPolyfill||Array.prototype.filter).call(e,i)},t.find=Array.prototype.find?function(t,e){return t.find(e)}:function(t,e){var i,s=t.length;for(i=0;i>16,(65280&e)>>8,255&e,1]:4===i&&(o=[(3840&e)>>4|(3840&e)>>8,(240&e)>>4|240&e,(15&e)<<4|15&e,1])),!o)for(n=this.parsers.length;n--&&!o;)(i=(r=this.parsers[n]).regex.exec(e))&&(o=r.parse(i));this.rgba=o||[]},get:function(t){var s,n=this.input,r=this.rgba;return this.stops?((s=o(n)).stops=[].concat(s.stops),e(this.stops,function(e,i){s.stops[i]=[s.stops[i][0],e.get(t)]})):s=r&&i(r[0])?"rgb"===t||!t&&1===r[3]?"rgb("+r[0]+","+r[1]+","+r[2]+")":"a"===t?r[3]:"rgba("+r.join(",")+")":n,s},brighten:function(t){var s,o=this.rgba;if(this.stops)e(this.stops,function(e){e.brighten(t)});else if(i(t)&&0!==t)for(s=0;3>s;s++)o[s]+=n(255*t),0>o[s]&&(o[s]=0),255i.width)&&(i={width:0,height:0})}else i=this.htmlGetBBox();if(a.isSVG&&(t=i.width,a=i.height,x&&(i.height=a={"11px,17":14,"13px,20":16}[l&&l.fontSize+","+Math.round(a)]||a),e&&(i.width=Math.abs(a*Math.sin(s))+Math.abs(t*Math.cos(s)),i.height=Math.abs(a*Math.cos(s))+Math.abs(t*Math.sin(s)))),r&&0]*>/g,"").replace(/</g,"<").replace(/>/g,">")))},textSetter:function(t){t!==this.textStr&&(delete this.bBox,this.textStr=t,this.added&&this.renderer.buildText(this))},fillSetter:function(t,e,i){"string"==typeof t?i.setAttribute(e,t):t&&this.complexColor(t,e,i)},visibilitySetter:function(t,e,i){"inherit"===t?i.removeAttribute(e):this[e]!==t&&i.setAttribute(e,t),this[e]=t},zIndexSetter:function(t,e){var i,s,o,n,r=this.renderer,a=this.parentGroup,h=(a||r).element||r.box,l=this.element;r=h===r.box;if(i=this.added,c(t)?(l.setAttribute("data-z-index",t),t=+t,this[e]===t&&(i=!1)):c(this[e])&&l.removeAttribute("data-z-index"),this[e]=t,i){for((t=this.zIndex)&&a&&(a.handleZ=!0),n=(e=h.childNodes).length-1;0<=n&&!s;n--)i=(a=e[n]).getAttribute("data-z-index"),o=!c(i),a!==l&&(0>t&&o&&!r&&!n?(h.insertBefore(l,e[n]),s=!0):(O(i)<=t||o&&(!c(t)||0<=t))&&(h.insertBefore(l,e[n+1]||null),s=!0));s||(h.insertBefore(l,e[r?3:0]||null),s=!0)}return s},_defaultSetter:function(t,e,i){i.setAttribute(e,t)}}),e.prototype.yGetter=e.prototype.xGetter,e.prototype.translateXSetter=e.prototype.translateYSetter=e.prototype.rotationSetter=e.prototype.verticalAlignSetter=e.prototype.rotationOriginXSetter=e.prototype.rotationOriginYSetter=e.prototype.scaleXSetter=e.prototype.scaleYSetter=e.prototype.matrixSetter=function(t,e){this[e]=t,this.doTransform=!0},e.prototype["stroke-widthSetter"]=e.prototype.strokeSetter=function(t,i,s){this[i]=t,this.stroke&&this["stroke-width"]?(e.prototype.fillSetter.call(this,this.stroke,"stroke",s),s.setAttribute("stroke-width",this["stroke-width"]),this.hasStroke=!0):"stroke-width"===i&&0===t&&this.hasStroke&&(s.removeAttribute("stroke"),this.hasStroke=!1)},i=t.SVGRenderer=function(){this.init.apply(this,arguments)},f(i.prototype,{Element:e,SVG_NS:z,init:function(t,e,i,o,r,a){var l,c;l=(o=this.createElement("svg").attr({version:"1.1",class:"highcharts-root"}).css(this.getStyle(o))).element,t.appendChild(l),n(t,"dir","ltr"),-1===t.innerHTML.indexOf("xmlns")&&n(l,"xmlns",this.SVG_NS),this.isSVG=!0,this.box=l,this.boxWrapper=o,this.alignedObjects=[],this.url=(k||A)&&u.getElementsByTagName("base").length?R.location.href.split("#")[0].replace(/<[^>]*>/g,"").replace(/([\('\)])/g,"\\$1").replace(/ /g,"%20"):"",this.createElement("desc").add().element.appendChild(u.createTextNode("Created with Highstock 6.2.0")),this.defs=this.createElement("defs").add(),this.allowHTML=a,this.forExport=r,this.gradients={},this.cache={},this.cacheKeys=[],this.imgCount=0,this.setSize(e,i,!1),k&&t.getBoundingClientRect&&((e=function(){h(t,{left:0,top:0}),c=t.getBoundingClientRect(),h(t,{left:Math.ceil(c.left)-c.left+"px",top:Math.ceil(c.top)-c.top+"px"})})(),this.unSubPixelFix=s(R,"resize",e))},getStyle:function(t){return this.style=f({fontFamily:'"Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif',fontSize:"12px"},t)},setStyle:function(t){this.boxWrapper.css(this.getStyle(t))},isHidden:function(){return!this.boxWrapper.getBBox().width},destroy:function(){var t=this.defs;return this.box=null,this.boxWrapper=this.boxWrapper.destroy(),p(this.gradients||{}),this.gradients=null,t&&(this.defs=t.destroy()),this.unSubPixelFix&&this.unSubPixelFix(),this.alignedObjects=null},createElement:function(t){var e=new this.Element;return e.init(this,t),e},draw:P,getRadialAttr:function(t,e){return{cx:t[0]-t[2]/2+e.cx*t[2],cy:t[1]-t[2]/2+e.cy*t[2],r:e.r*t[2]}},truncate:function(t,e,i,s,o,n,r){var a,h,l,c=this,d=t.rotation,p=s?1:0,g=(i||s).length,f=g,m=[],x=function(t){e.firstChild&&e.removeChild(e.firstChild),t&&e.appendChild(u.createTextNode(t))},v=function(n,a){if(void 0===m[a=a||n])if(e.getSubStringLength)try{m[a]=o+e.getSubStringLength(0,s?a+1:a)}catch(t){}else c.getSpanWidth&&(x(r(i||s,n)),m[a]=o+c.getSpanWidth(t,e));return m[a]};if(t.rotation=0,h=v(e.textContent.length),l=o+h>n){for(;p<=g;)f=Math.ceil((p+g)/2),s&&(a=r(s,f)),h=v(f,a&&a.length-1),p===g?p=g+1:h>n?g=f-1:p=f;0===g?x(""):i&&g===i.length-1||x(a||r(i||s,f))}return s&&s.splice(0,f),t.actualWidth=h,t.rotation=d,l},escapes:{"&":"&","<":"<",">":">","'":"'",'"':"""},buildText:function(t){var e,i,s,o=t.element,r=this,a=r.forExport,l=L(t.textStr,"").toString(),c=-1!==l.indexOf("<"),d=o.childNodes,p=n(o,"x"),f=t.styles,m=t.textWidth,v=f&&f.lineHeight,b=f&&f.textOutline,k=f&&"ellipsis"===f.textOverflow,M=f&&"nowrap"===f.whiteSpace,w=f&&f.fontSize,S=d.length,A=(f=m&&!t.added&&this.box,function(t){var e;return e=/(px|em)$/.test(t&&t.style.fontSize)?t.style.fontSize:w||r.style.fontSize||12,v?O(v):r.fontMetrics(e,t.getAttribute("style")?t:o).h}),T=function(t,e){return C(r.escapes,function(i,s){e&&-1!==y(i,e)||(t=t.toString().replace(new RegExp(i,"g"),s))}),t},P=function(t,e){var i;if(i=t.indexOf("<"),-1!==(i=(t=t.substring(i,t.indexOf(">")-i)).indexOf(e+"="))&&(i=i+e.length+1,'"'===(e=t.charAt(i))||"'"===e))return(t=t.substring(i+1)).substring(0,t.indexOf(e))};if((i=[l,k,M,v,b,w,m].join())!==t.textCache){for(t.textCache=i;S--;)o.removeChild(d[S]);c||b||k||m||-1!==l.indexOf(" ")?(f&&f.appendChild(o),l=c?l.replace(/<(b|strong)>/g,'').replace(/<(i|em)>/g,'').replace(//g,"").split(//g):[l],l=x(l,function(t){return""!==t}),g(l,function(i,l){var c,d=0,f=0;i=i.replace(/^\s+|\s+$/g,"").replace(//g,"|||"),c=i.split("|||"),g(c,function(i){if(""!==i||1===c.length){var g,x,v={},y=u.createElementNS(r.SVG_NS,"tspan");if((g=P(i,"class"))&&n(y,"class",g),(g=P(i,"style"))&&(g=g.replace(/(;| |^)color([ :])/,"$1fill$2"),n(y,"style",g)),(x=P(i,"href"))&&!a&&(n(y,"onclick",'location.href="'+x+'"'),n(y,"class","highcharts-anchor"),h(y,{cursor:"pointer"}))," "!==(i=T(i.replace(/<[a-zA-Z\/](.|\n)*?>/g,"")||" "))){if(y.appendChild(u.createTextNode(i)),d?v.dx=0:l&&null!==p&&(v.x=p),n(y,v),o.appendChild(y),!d&&s&&(!I&&a&&h(y,{display:"block"}),n(y,"dy",A(y))),m){var b=i.replace(/([^\^])-/g,"$1- ").split(" ");v=!M&&(1Math.abs(o.end-o.start-2*Math.PI));var l=Math.cos(n),d=Math.sin(n),p=Math.cos(h);h=Math.sin(h);return r=["M",t+r*l,e+a*d,"A",r,a,0,o=.001>o.end-n-Math.PI?0:1,1,t+r*p,e+a*h],c(i)&&r.push(s?"M":"L",t+i*p,e+i*h,"A",i,i,0,o,0,t+i*l,e+i*d),r.push(s?"":"Z"),r},callout:function(t,e,i,s,o){var n,r=Math.min(o&&o.r||0,i,s),a=r+6,h=o&&o.anchorX;return o=o&&o.anchorY,n=["M",t+r,e,"L",t+i-r,e,"C",t+i,e,t+i,e,t+i,e+r,"L",t+i,e+s-r,"C",t+i,e+s,t+i,e+s,t+i-r,e+s,"L",t+r,e+s,"C",t,e+s,t,e+s,t,e+s-r,"L",t,e+r,"C",t,e,t,e,t+r,e],h&&h>i?o>e+a&&oh?o>e+a&&os&&h>t+a&&ho&&h>t+a&&h(t=/px/.test(t)?O(t):/em/.test(t)?parseFloat(t)*(e?this.fontMetrics(null,e.parentNode).f:16):12)?t+3:Math.round(1.2*t),b:Math.round(.8*e),f:t}},rotCorr:function(t,e,i){var s=t;return e&&i&&(s=Math.max(s*Math.cos(e*d),4)),{x:-t/3*Math.sin(e*d),y:s}},label:function(i,s,o,n,r,a,h,l,d){var p,u,m,x,v,y,b,k,M,w,S,A,P,C=this,L=C.g("button"!==d&&"label"),O=L.text=C.text("",0,0,h).attr({zIndex:1}),B=0,I=3,z=0,E={},R=/^url\((.*?)\)$/.test(n),W=R;d&&L.addClass("highcharts-"+d),W=R,w=function(){return(k||0)%2/2},S=function(){var t=O.element.style,e={};u=(void 0===m||void 0===x||b)&&c(O.textStr)&&O.getBBox(),L.width=(m||u.width||0)+2*I+z,L.height=(x||u.height||0)+2*I,M=I+C.fontMetrics(t&&t.fontSize,O).b,W&&(p||(L.box=p=C.symbols[n]||R?C.symbol(n):C.rect(),p.addClass(("button"===d?"":"highcharts-label-box")+(d?" highcharts-"+d+"-box":"")),p.add(L),t=w(),e.x=t,e.y=(l?-M:0)+t),e.width=Math.round(L.width),e.height=Math.round(L.height),p.attr(f(e,E)),E={})},A=function(){var t,e=z+I;t=l?0:M,c(m)&&u&&("center"===b||"right"===b)&&(e+={center:.5,right:1}[b]*(m-u.width)),e===O.x&&t===O.y||(O.attr("x",e),O.hasBoxWidthChanged&&(u=O.getBBox(!0),S()),void 0!==t&&O.attr("y",t)),O.x=e,O.y=t},P=function(t,e){p?p.attr(t,e):E[t]=e},L.onAdd=function(){O.add(L),L.attr({text:i||0===i?i:"",x:s,y:o}),p&&c(r)&&L.attr({anchorX:r,anchorY:a})},L.widthSetter=function(e){m=t.isNumber(e)?e:null},L.heightSetter=function(t){x=t},L["text-alignSetter"]=function(t){b=t},L.paddingSetter=function(t){c(t)&&t!==I&&(I=L.padding=t,A())},L.paddingLeftSetter=function(t){c(t)&&t!==z&&(z=t,A())},L.alignSetter=function(t){(t={left:0,center:.5,right:1}[t])!==B&&(B=t,u&&L.attr({x:v}))},L.textSetter=function(t){void 0!==t&&O.textSetter(t),S(),A()},L["stroke-widthSetter"]=function(t,e){t&&(W=!0),k=this["stroke-width"]=t,P(e,t)},L.strokeSetter=L.fillSetter=L.rSetter=function(t,e){"r"!==e&&("fill"===e&&t&&(W=!0),L[e]=t),P(e,t)},L.anchorXSetter=function(t,e){r=L.anchorX=t,P(e,Math.round(t)-w()-v)},L.anchorYSetter=function(t,e){a=L.anchorY=t,P(e,t-y)},L.xSetter=function(t){L.x=t,B&&(t-=B*((m||u.width)+2*I),L["forceAnimate:x"]=!0),v=Math.round(t),L.attr("translateX",v)},L.ySetter=function(t){y=L.y=Math.round(t),L.attr("translateY",y)};var N=L.css;return f(L,{css:function(t){if(t){var e={};t=T(t),g(L.textProps,function(i){void 0!==t[i]&&(e[i]=t[i],delete t[i])}),O.css(e),"width"in e&&S()}return N.call(L,t)},getBBox:function(){return{width:u.width+2*I,height:u.height+2*I,x:u.x-I,y:u.y-I}},shadow:function(t){return t&&(S(),p&&p.shadow(t)),L},destroy:function(){D(L.element,"mouseenter"),D(L.element,"mouseleave"),O&&(O=O.destroy()),p&&(p=p.destroy()),e.prototype.destroy.call(L),L=C=S=A=P=null}})}}),t.Renderer=i}(e),function(t){var e=t.attr,i=t.createElement,s=t.css,o=t.defined,n=t.each,r=t.extend,a=t.isFirefox,h=t.isMS,l=t.isWebKit,c=t.pick,d=t.pInt,p=t.SVGRenderer,u=t.win,g=t.wrap;r(t.SVGElement.prototype,{htmlCss:function(t){var e="SPAN"===this.element.tagName&&t&&"width"in t,i=c(e&&t.width,void 0);return e&&(delete t.width,this.textWidth=i,this.htmlUpdateTransform()),t&&"ellipsis"===t.textOverflow&&(t.whiteSpace="nowrap",t.overflow="hidden"),this.styles=r(this.styles,t),s(this.element,t),this},htmlGetBBox:function(){var t=this.element;return{x:t.offsetLeft,y:t.offsetTop,width:t.offsetWidth,height:t.offsetHeight}},htmlUpdateTransform:function(){if(this.added){var t=this.renderer,e=this.element,i=this.translateX||0,r=this.translateY||0,a=this.x||0,h=this.y||0,l=this.textAlign||"left",c={left:0,center:.5,right:1}[l],p=(g=this.styles)&&g.whiteSpace;if(s(e,{marginLeft:i,marginTop:r}),this.shadows&&n(this.shadows,function(t){s(t,{marginLeft:i+1,marginTop:r+1})}),this.inverted&&n(e.childNodes,function(i){t.invertChild(i,e)}),"SPAN"===e.tagName){var u,g=this.rotation,f=this.textWidth&&d(this.textWidth),m=[g,l,e.innerHTML,this.textWidth,this.textAlign].join();(u=f!==this.oldTextWidth)&&!(u=f>this.oldTextWidth)&&((u=this.textPxLength)||(s(e,{width:"",whiteSpace:p||"nowrap"}),u=e.offsetWidth),u=u>f),u&&/[ \-]/.test(e.textContent||e.innerText)?(s(e,{width:f+"px",display:"block",whiteSpace:p||"normal"}),this.oldTextWidth=f,this.hasBoxWidthChanged=!0):this.hasBoxWidthChanged=!1,m!==this.cTT&&(p=t.fontMetrics(e.style.fontSize).b,!o(g)||g===(this.oldRotation||0)&&l===this.oldAlign||this.setSpanRotation(g,c,p),this.getSpanCorrection(!o(g)&&this.textPxLength||e.offsetWidth,p,c,g,l)),s(e,{left:a+(this.xCorr||0)+"px",top:h+(this.yCorr||0)+"px"}),this.cTT=m,this.oldRotation=g,this.oldAlign=l}}else this.alignOnAdd=!0},setSpanRotation:function(t,e,i){var o={},n=this.renderer.getTransformKey();o[n]=o.transform="rotate("+t+"deg)",o[n+(a?"Origin":"-origin")]=o.transformOrigin=100*e+"% "+i+"px",s(this.element,o)},getSpanCorrection:function(t,e,i){this.xCorr=-t*i,this.yCorr=-e}}),r(p.prototype,{getTransformKey:function(){return h&&!/Edge/.test(u.navigator.userAgent)?"-ms-transform":l?"-webkit-transform":a?"MozTransform":u.opera?"-o-transform":""},html:function(t,s,o){var a=this.createElement("span"),h=a.element,l=a.renderer,d=l.isSVG,p=function(t,e){n(["opacity","visibility"],function(i){g(t,i+"Setter",function(t,i,s,o){t.call(this,i,s,o),e[s]=i})}),t.addedSetters=!0};return a.textSetter=function(t){t!==h.innerHTML&&delete this.bBox,this.textStr=t,h.innerHTML=c(t,""),a.doTransform=!0},d&&p(a,a.element.style),a.xSetter=a.ySetter=a.alignSetter=a.rotationSetter=function(t,e){"align"===e&&(e="textAlign"),a[e]=t,a.doTransform=!0},a.afterSetters=function(){this.doTransform&&(this.htmlUpdateTransform(),this.doTransform=!1)},a.attr({text:t,x:Math.round(s),y:Math.round(o)}).css({fontFamily:this.style.fontFamily,fontSize:this.style.fontSize,position:"absolute"}),h.style.whiteSpace="nowrap",a.css=a.htmlCss,d&&(a.add=function(t){var s,o=l.box.parentNode,c=[];if(this.parentGroup=t){if(!(s=t.div)){for(;t;)c.push(t),t=t.parentGroup;n(c.reverse(),function(t){function n(e,i){t[i]=e,"translateX"===i?h.left=e+"px":h.top=e+"px",t.doTransform=!0}var h,l=e(t.element,"class");l&&(l={className:l}),s=t.div=t.div||i("div",l,{position:"absolute",left:(t.translateX||0)+"px",top:(t.translateY||0)+"px",display:t.display,opacity:t.opacity,pointerEvents:t.styles&&t.styles.pointerEvents},s||o),h=s.style,r(t,{classSetter:function(t){return function(e){this.element.setAttribute("class",e),t.className=e}}(s),on:function(){return c[0].div&&a.on.apply({element:c[0].div},arguments),t},translateXSetter:n,translateYSetter:n}),t.addedSetters||p(t,h)})}}else s=o;return s.appendChild(h),a.added=!0,a.alignOnAdd&&a.htmlUpdateTransform(),a}),a}})}(e),function(t){var e=t.defined,i=t.each,s=t.extend,o=t.merge,n=t.pick,r=t.timeUnits,a=t.win;t.Time=function(t){this.update(t,!1)},t.Time.prototype={defaultOptions:{},update:function(t){var e=n(t&&t.useUTC,!0),i=this;this.options=t=o(!0,this.options||{},t),this.Date=t.Date||a.Date,this.timezoneOffset=(this.useUTC=e)&&t.timezoneOffset,this.getTimezoneOffset=this.timezoneOffsetFunction(),(this.variableTimezone=!(e&&!t.getTimezoneOffset&&!t.timezone))||this.timezoneOffset?(this.get=function(t,e){var s=e.getTime(),o=s-i.getTimezoneOffset(e);return e.setTime(o),t=e["getUTC"+t](),e.setTime(s),t},this.set=function(t,e,s){var o;"Milliseconds"===t||"Seconds"===t||"Minutes"===t&&0==e.getTimezoneOffset()%60?e["set"+t](s):(o=i.getTimezoneOffset(e),o=e.getTime()-o,e.setTime(o),e["setUTC"+t](s),t=i.getTimezoneOffset(e),o=e.getTime()+t,e.setTime(o))}):e?(this.get=function(t,e){return e["getUTC"+t]()},this.set=function(t,e,i){return e["setUTC"+t](i)}):(this.get=function(t,e){return e["get"+t]()},this.set=function(t,e,i){return e["set"+t](i)})},makeTime:function(e,i,s,o,r,a){var h,l,c;return this.useUTC?(h=this.Date.UTC.apply(0,arguments),h+=l=this.getTimezoneOffset(h),l!==(c=this.getTimezoneOffset(h))?h+=c-l:l-36e5!==this.getTimezoneOffset(h-36e5)||t.isSafari||(h-=36e5)):h=new this.Date(e,i,n(s,1),n(o,0),n(r,0),n(a,0)).getTime(),h},timezoneOffsetFunction:function(){var e=this,i=this.options,s=a.moment;if(!this.useUTC)return function(t){return 6e4*new Date(t).getTimezoneOffset()};if(i.timezone){if(s)return function(t){return 6e4*-s.tz(t,i.timezone).utcOffset()};t.error(25)}return this.useUTC&&i.getTimezoneOffset?function(t){return 6e4*i.getTimezoneOffset(t)}:function(){return 6e4*(e.timezoneOffset||0)}},dateFormat:function(e,i,s){if(!t.defined(i)||isNaN(i))return t.defaultOptions.lang.invalidDate||"";e=t.pick(e,"%Y-%m-%d %H:%M:%S");var o=this,n=new this.Date(i),r=this.get("Hours",n),a=this.get("Day",n),h=this.get("Date",n),l=this.get("Month",n),c=this.get("FullYear",n),d=t.defaultOptions.lang,p=d.weekdays,u=d.shortWeekdays,g=t.pad;n=t.extend({a:u?u[a]:p[a].substr(0,3),A:p[a],d:g(h),e:g(h,2," "),w:a,b:d.shortMonths[l],B:d.months[l],m:g(l+1),o:l+1,y:c.toString().substr(2,2),Y:c,H:g(r),k:r,I:g(r%12||12),l:r%12||12,M:g(o.get("Minutes",n)),p:12>r?"AM":"PM",P:12>r?"am":"pm",S:g(n.getSeconds()),L:g(Math.floor(i%1e3),3)},t.dateFormats);return t.objectEach(n,function(t,s){for(;-1!==e.indexOf("%"+s);)e=e.replace("%"+s,"function"==typeof t?t.call(o,i):t)}),s?e.substr(0,1).toUpperCase()+e.substr(1):e},resolveDTLFormat:function(e){return t.isObject(e,!0)?e:{main:(e=t.splat(e))[0],from:e[1],to:e[2]}},getTimeTicks:function(t,o,a,h){var l,c,d=this,p=[],u={};l=new d.Date(o);var g,f=t.unitRange,m=t.count||1;if(h=n(h,1),e(o)){d.set("Milliseconds",l,f>=r.second?0:m*Math.floor(d.get("Milliseconds",l)/m)),f>=r.second&&d.set("Seconds",l,f>=r.minute?0:m*Math.floor(d.get("Seconds",l)/m)),f>=r.minute&&d.set("Minutes",l,f>=r.hour?0:m*Math.floor(d.get("Minutes",l)/m)),f>=r.hour&&d.set("Hours",l,f>=r.day?0:m*Math.floor(d.get("Hours",l)/m)),f>=r.day&&d.set("Date",l,f>=r.month?1:m*Math.floor(d.get("Date",l)/m)),f>=r.month&&(d.set("Month",l,f>=r.year?0:m*Math.floor(d.get("Month",l)/m)),c=d.get("FullYear",l)),f>=r.year&&d.set("FullYear",l,c-c%m),f===r.week&&(c=d.get("Day",l),d.set("Date",l,d.get("Date",l)-c+h+(c4*r.month||d.getTimezoneOffset(o)!==d.getTimezoneOffset(a)),o=l.getTime(),l=1;op.length&&i(p,function(t){0==t%18e5&&"000000000"===d.dateFormat("%H%M%S%L",t)&&(u[t]="day")})}return p.info=s(t,{higherRanks:u,totalRange:f*m}),p}}}(e),function(t){var e=t.color,i=t.merge;t.defaultOptions={colors:"#7cb5ec #434348 #90ed7d #f7a35c #8085e9 #f15c80 #e4d354 #2b908f #f45b5b #91e8e1".split(" "),symbols:["circle","diamond","square","triangle","triangle-down"],lang:{loading:"Loading...",months:"January February March April May June July August September October November December".split(" "),shortMonths:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),weekdays:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),decimalPoint:".",numericSymbols:"kMGTPE".split(""),resetZoom:"Reset zoom",resetZoomTitle:"Reset zoom level 1:1",thousandsSep:" "},global:{},time:t.Time.prototype.defaultOptions,chart:{borderRadius:0,defaultSeriesType:"line",ignoreHiddenSeries:!0,spacing:[10,10,15,10],resetZoomButton:{theme:{zIndex:6},position:{align:"right",x:-10,y:10}},width:null,height:null,borderColor:"#335cad",backgroundColor:"#ffffff",plotBorderColor:"#cccccc"},title:{text:"Chart title",align:"center",margin:15,widthAdjust:-44},subtitle:{text:"",align:"center",widthAdjust:-44},plotOptions:{},labels:{style:{position:"absolute",color:"#333333"}},legend:{enabled:!0,align:"center",alignColumns:!0,layout:"horizontal",labelFormatter:function(){return this.name},borderColor:"#999999",borderRadius:0,navigation:{activeColor:"#003399",inactiveColor:"#cccccc"},itemStyle:{color:"#333333",fontSize:"12px",fontWeight:"bold",textOverflow:"ellipsis"},itemHoverStyle:{color:"#000000"},itemHiddenStyle:{color:"#cccccc"},shadow:!1,itemCheckboxStyle:{position:"absolute",width:"13px",height:"13px"},squareSymbol:!0,symbolPadding:5,verticalAlign:"bottom",x:0,y:0,title:{style:{fontWeight:"bold"}}},loading:{labelStyle:{fontWeight:"bold",position:"relative",top:"45%"},style:{position:"absolute",backgroundColor:"#ffffff",opacity:.5,textAlign:"center"}},tooltip:{enabled:!0,animation:t.svg,borderRadius:3,dateTimeLabelFormats:{millisecond:"%A, %b %e, %H:%M:%S.%L",second:"%A, %b %e, %H:%M:%S",minute:"%A, %b %e, %H:%M",hour:"%A, %b %e, %H:%M",day:"%A, %b %e, %Y",week:"Week from %A, %b %e, %Y",month:"%B %Y",year:"%Y"},footerFormat:"",padding:8,snap:t.isTouchDevice?25:10,backgroundColor:e("#f7f7f7").setOpacity(.85).get(),borderWidth:1,headerFormat:'{point.key}
',pointFormat:'● {series.name}: {point.y}
',shadow:!0,style:{color:"#333333",cursor:"default",fontSize:"12px",pointerEvents:"none",whiteSpace:"nowrap"}},credits:{enabled:!0,href:"https://www.highcharts.com",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},style:{cursor:"pointer",color:"#999999",fontSize:"9px"},text:"Highcharts.com"}},t.setOptions=function(e){return t.defaultOptions=i(!0,t.defaultOptions,e),t.time.update(i(t.defaultOptions.global,t.defaultOptions.time),!1),t.defaultOptions},t.getOptions=function(){return t.defaultOptions},t.defaultPlotOptions=t.defaultOptions.plotOptions,t.time=new t.Time(i(t.defaultOptions.global,t.defaultOptions.time)),t.dateFormat=function(e,i,s){return t.time.dateFormat(e,i,s)}}(e),function(t){var e=t.correctFloat,i=t.defined,s=t.destroyObjectProperties,o=t.fireEvent,n=t.isNumber,r=t.merge,a=t.pick,h=t.deg2rad;t.Tick=function(t,e,i,s,o){this.axis=t,this.pos=e,this.type=i||"",this.isNewLabel=this.isNew=!0,this.parameters=o||{},this.tickmarkOffset=this.parameters.tickmarkOffset,this.options=this.parameters.options,i||s||this.addLabel()},t.Tick.prototype={addLabel:function(){var s,o,n,h,l=this,c=l.axis,d=c.options,p=c.chart,u=c.categories,g=c.names,f=l.pos,m=a(l.options&&l.options.labels,d.labels),x=f===(b=c.tickPositions)[0],v=f===b[b.length-1],y=(u=this.parameters.category||(u?a(u[f],g[f],f):f),l.label),b=b.info;c.isDatetimeAxis&&b&&(s=(o=p.time.resolveDTLFormat(d.dateTimeLabelFormats[!d.grid&&b.higherRanks[f]||b.unitName])).main),l.isFirst=x,l.isLast=v,l.formatCtx={axis:c,chart:p,isFirst:x,isLast:v,dateTimeLabelFormat:s,tickPositionInfo:b,value:c.isLog?e(c.lin2log(u)):u,pos:f},d=c.labelFormatter.call(l.formatCtx,this.formatCtx),(h=o&&o.list)&&(l.shortenLabel=function(){for(n=0;nd&&o-p*ur&&(e=Math.round((n-o)/Math.cos(d*h))):(n=o+(1-p)*u,o-p*ur&&(f=r-t.x+f*p,m=-1),(f=Math.min(g,f))f||i.autoRotation&&(c.styles||{}).width)&&(e=f)),e&&(this.shortenLabel?this.shortenLabel():(x.width=e,(s.style||{}).textOverflow||(x.textOverflow="ellipsis"),c.css(x)))},getPosition:function(e,i,s,n){var r=this.axis,a=r.chart,h=n&&a.oldChartHeight||a.chartHeight;return e={x:e?t.correctFloat(r.translate(i+s,null,null,n)+r.transB):r.left+r.offset+(r.opposite?(n&&a.oldChartWidth||a.chartWidth)-r.right-r.left:0),y:e?h-r.bottom+r.offset-(r.opposite?r.height:0):t.correctFloat(h-r.translate(i+s,null,null,n)-r.transB)},o(this,"afterGetPosition",{pos:e}),e},getLabelPosition:function(t,e,s,n,r,a,l,c){var d=this.axis,p=d.transA,u=d.reversed,g=d.staggerLines,f=d.tickRotCorr||{x:0,y:0},m=r.y,x=n||d.reserveSpaceDefault?0:-d.labelOffset*("center"===d.labelAlign?.5:1),v={};return i(m)||(m=0===d.side?s.rotation?-8:-s.getBBox().height:2===d.side?f.y+8:Math.cos(s.rotation*h)*(f.y-s.getBBox(!1,0).height/2)),t=t+r.x+x+f.x-(a&&n?a*p*(u?-1:1):0),e=e+m-(a&&!n?a*p*(u?1:-1):0),g&&(s=l/(c||1)%g,d.opposite&&(s=g-s-1),e+=d.labelOffset/g*s),v.x=t,v.y=Math.round(e),o(this,"afterGetLabelPosition",{pos:v}),v},getMarkPath:function(t,e,i,s,o,n){return n.crispLine(["M",t,e,"L",t+(o?0:-i),e+(o?i:0)],s)},renderGridLine:function(t,e,i){var s=this.axis,o=s.options,n=this.gridLine,r={},h=this.pos,l=this.type,c=a(this.tickmarkOffset,s.tickmarkOffset),d=s.chart.renderer,p=l?l+"Grid":"grid",u=o[p+"LineWidth"],g=o[p+"LineColor"];o=o[p+"LineDashStyle"];n||(r.stroke=g,r["stroke-width"]=u,o&&(r.dashstyle=o),l||(r.zIndex=1),t&&(e=0),this.gridLine=n=d.path().attr(r).addClass("highcharts-"+(l?l+"-":"")+"grid-line").add(s.gridGroup)),n&&(i=s.getPlotLinePath(h+c,n.strokeWidth()*i,t,"pass"))&&n[t||this.isNew?"attr":"animate"]({d:i,opacity:e})},renderMark:function(t,e,i){var s=this.axis,o=s.options,n=s.chart.renderer,r=this.type,h=r?r+"Tick":"tick",l=s.tickSize(h),c=this.mark,d=!c,p=t.x;t=t.y;var u=a(o[h+"Width"],!r&&s.isXAxis?1:0);o=o[h+"Color"];l&&(s.opposite&&(l[0]=-l[0]),d&&(this.mark=c=n.path().addClass("highcharts-"+(r?r+"-":"")+"tick").add(s.axisGroup),c.attr({stroke:o,"stroke-width":u})),c[d?"attr":"animate"]({d:this.getMarkPath(p,t,l[0],c.strokeWidth()*i,s.horiz,n),opacity:e}))},renderLabel:function(t,e,i,s){var o=(d=this.axis).horiz,r=d.options,h=this.label,l=r.labels,c=l.step,d=a(this.tickmarkOffset,d.tickmarkOffset),p=!0,u=t.x;t=t.y,h&&n(u)&&(h.xy=t=this.getLabelPosition(u,t,h,o,l,d,s,c),this.isFirst&&!this.isLast&&!a(r.showFirstLabel,1)||this.isLast&&!this.isFirst&&!a(r.showLastLabel,1)?p=!1:!o||l.step||l.rotation||e||0===i||this.handleOverflow(t),c&&s%c&&(p=!1),p&&n(t.y)?(t.opacity=i,h[this.isNewLabel?"attr":"animate"](t),this.isNewLabel=!1):(h.attr("y",-9999),this.isNewLabel=!0))},render:function(e,i,s){var o=(l=this.axis).horiz,n=this.pos,r=a(this.tickmarkOffset,l.tickmarkOffset),h=(r=(n=this.getPosition(o,n,r,i)).x,n.y),l=o&&r===l.pos+l.len||!o&&h===l.pos?-1:1;s=a(s,1),this.isActive=!0,this.renderGridLine(i,s,l),this.renderMark(n,s,l),this.renderLabel(n,i,s,e),this.isNew=!1,t.fireEvent(this,"afterRender")},destroy:function(){s(this,this.axis)}}}(e);var i=function(t){var e=t.addEvent,i=t.animObject,s=t.arrayMax,o=t.arrayMin,n=t.color,r=t.correctFloat,a=t.defaultOptions,h=t.defined,l=t.deg2rad,c=t.destroyObjectProperties,d=t.each,p=t.extend,u=t.fireEvent,g=t.format,f=t.getMagnitude,m=t.grep,x=t.inArray,v=t.isArray,y=t.isNumber,b=t.isString,k=t.merge,M=t.normalizeTickInterval,w=t.objectEach,S=t.pick,A=t.removeEvent,T=t.splat,P=t.syncTimeout,C=t.Tick,L=function(){this.init.apply(this,arguments)};return t.extend(L.prototype,{defaultOptions:{dateTimeLabelFormats:{millisecond:{main:"%H:%M:%S.%L",range:!1},second:{main:"%H:%M:%S",range:!1},minute:{main:"%H:%M",range:!1},hour:{main:"%H:%M",range:!1},day:{main:"%e. %b"},week:{main:"%e. %b"},month:{main:"%b '%y"},year:{main:"%Y"}},endOnTick:!1,labels:{enabled:!0,indentation:10,x:0,style:{color:"#666666",cursor:"default",fontSize:"11px"}},maxPadding:.01,minorTickLength:2,minorTickPosition:"outside",minPadding:.01,startOfWeek:1,startOnTick:!1,tickLength:10,tickPixelInterval:100,tickmarkPlacement:"between",tickPosition:"outside",title:{align:"middle",style:{color:"#666666"}},type:"linear",minorGridLineColor:"#f2f2f2",minorGridLineWidth:1,minorTickColor:"#999999",lineColor:"#ccd6eb",lineWidth:1,gridLineColor:"#e6e6e6",tickColor:"#ccd6eb"},defaultYAxisOptions:{endOnTick:!0,maxPadding:.05,minPadding:.05,tickPixelInterval:72,showLastLabel:!0,labels:{x:-8},startOnTick:!0,title:{rotation:270,text:"Values"},stackLabels:{allowOverlap:!1,enabled:!1,formatter:function(){return t.numberFormat(this.total,-1)},style:{color:"#000000",fontSize:"11px",fontWeight:"bold",textOutline:"1px contrast"}},gridLineWidth:1,lineWidth:0},defaultLeftAxisOptions:{labels:{x:-15},title:{rotation:270}},defaultRightAxisOptions:{labels:{x:15},title:{rotation:90}},defaultBottomAxisOptions:{labels:{autoRotation:[-45],x:0},title:{rotation:0}},defaultTopAxisOptions:{labels:{autoRotation:[-45],x:0},title:{rotation:0}},init:function(t,i){var s=i.isX,o=this;o.chart=t,o.horiz=t.inverted&&!o.isZAxis?!s:s,o.isXAxis=s,o.coll=o.coll||(s?"xAxis":"yAxis"),u(this,"init",{userOptions:i}),o.opposite=i.opposite,o.side=i.side||(o.horiz?o.opposite?0:2:o.opposite?1:3),o.setOptions(i);var n=this.options,r=n.type;o.labelFormatter=n.labels.formatter||o.defaultLabelFormatter,o.userOptions=i,o.minPixelPadding=0,o.reversed=n.reversed,o.visible=!1!==n.visible,o.zoomEnabled=!1!==n.zoomEnabled,o.hasNames="category"===r||!0===n.categories,o.categories=n.categories||o.hasNames,o.names||(o.names=[],o.names.keys={}),o.plotLinesAndBandsGroups={},o.isLog="logarithmic"===r,o.isDatetimeAxis="datetime"===r,o.positiveValuesOnly=o.isLog&&!o.allowNegativeLog,o.isLinked=h(n.linkedTo),o.ticks={},o.labelEdge=[],o.minorTicks={},o.plotLinesAndBands=[],o.alternateBands={},o.len=0,o.minRange=o.userMinRange=n.minRange||n.maxZoom,o.range=n.range,o.offset=n.offset||0,o.stacks={},o.oldStacks={},o.stacksTouched=0,o.max=null,o.min=null,o.crosshair=S(n.crosshair,T(t.options.tooltip.crosshairs)[s?0:1],!1),i=o.options.events,-1===x(o,t.axes)&&(s?t.axes.splice(t.xAxis.length,0,o):t.axes.push(o),t[o.coll].push(o)),o.series=o.series||[],t.inverted&&!o.isZAxis&&s&&void 0===o.reversed&&(o.reversed=!0),w(i,function(t,i){e(o,i,t)}),o.lin2log=n.linearToLogConverter||o.lin2log,o.isLog&&(o.val2lin=o.log2lin,o.lin2val=o.lin2log),u(this,"afterInit")},setOptions:function(t){this.options=k(this.defaultOptions,"yAxis"===this.coll&&this.defaultYAxisOptions,[this.defaultTopAxisOptions,this.defaultRightAxisOptions,this.defaultBottomAxisOptions,this.defaultLeftAxisOptions][this.side],k(a[this.coll],t)),u(this,"afterSetOptions",{userOptions:t})},defaultLabelFormatter:function(){var e,i=this.axis,s=this.value,o=i.chart.time,n=i.categories,r=this.dateTimeLabelFormat,h=(l=a.lang).numericSymbols,l=l.numericSymbolMagnitude||1e3,c=h&&h.length,d=i.options.labels.format;i=i.isLog?Math.abs(s):i.tickInterval;if(d)e=g(d,this,o);else if(n)e=s;else if(r)e=o.dateFormat(r,s);else if(c&&1e3<=i)for(;c--&&void 0===e;)i>=(o=Math.pow(l,c+1))&&0==10*s%o&&null!==h[c]&&0!==s&&(e=t.numberFormat(s/o,-1)+h[c]);return void 0===e&&(e=1e4<=Math.abs(s)?t.numberFormat(s,-1):t.numberFormat(s,-1,void 0,"")),e},getSeriesExtremes:function(){var t=this,e=t.chart;u(this,"getSeriesExtremes",null,function(){t.hasVisibleSeries=!1,t.dataMin=t.dataMax=t.threshold=null,t.softThreshold=!t.isXAxis,t.buildStacks&&t.buildStacks(),d(t.series,function(i){if(i.visible||!e.options.chart.ignoreHiddenSeries){var n,r=i.options,a=r.threshold;t.hasVisibleSeries=!0,t.positiveValuesOnly&&0>=a&&(a=null),t.isXAxis?(r=i.xData).length&&(i=o(r),n=s(r),y(i)||i instanceof Date||(r=m(r,y),i=o(r),n=s(r)),r.length&&(t.dataMin=Math.min(S(t.dataMin,r[0],i),i),t.dataMax=Math.max(S(t.dataMax,r[0],n),n))):(i.getExtremes(),n=i.dataMax,i=i.dataMin,h(i)&&h(n)&&(t.dataMin=Math.min(S(t.dataMin,i),i),t.dataMax=Math.max(S(t.dataMax,n),n)),h(a)&&(t.threshold=a),(!r.softThreshold||t.positiveValuesOnly)&&(t.softThreshold=!1))}})}),u(this,"afterGetSeriesExtremes")},translate:function(t,e,i,s,o,n){var r=this.linkedParent||this,a=1,h=0,l=s?r.oldTransA:r.transA;s=s?r.oldMin:r.min;var c=r.minPixelPadding;return o=(r.isOrdinal||r.isBroken||r.isLog&&o)&&r.lin2val,l||(l=r.transA),i&&(a*=-1,h=r.len),r.reversed&&(h-=(a*=-1)*(r.sector||r.len)),e?(t=(t*a+h-c)/l+s,o&&(t=r.lin2val(t))):(o&&(t=r.val2lin(t)),t=y(s)?a*(t-s)*l+h+a*c+(y(n)?l*n:0):void 0),t},toPixels:function(t,e){return this.translate(t,!1,!this.horiz,null,!0)+(e?0:this.pos)},toValue:function(t,e){return this.translate(t-(e?0:this.pos),!0,!this.horiz,null,!0)},getPlotLinePath:function(t,e,i,s,o){var n,r,a,h=this.chart,l=this.left,c=this.top,d=i&&h.oldChartHeight||h.chartHeight,p=i&&h.oldChartWidth||h.chartWidth;n=this.transB;var u=function(t,e,i){return("pass"!==s&&ti)&&(s?t=Math.min(Math.max(e,t),i):a=!0),t};return o=S(o,this.translate(t,null,null,i)),o=Math.min(Math.max(-1e5,o),1e5),t=i=Math.round(o+n),n=r=Math.round(d-o-n),y(o)?this.horiz?(n=c,r=d-this.bottom,t=i=u(t,l,l+this.width)):(t=l,i=p-this.right,n=r=u(n,c,c+this.height)):(a=!0,s=!1),a&&!s?null:h.renderer.crispLine(["M",t,n,"L",i,r],e||1)},getLinearTickPositions:function(t,e,i){var s,o=r(Math.floor(e/t)*t);i=r(Math.ceil(i/t)*t);var n,a=[];if(r(o+t)===o&&(n=20),this.single)return[e];for(e=o;e<=i&&(a.push(e),(e=r(e+t,n))!==s);)s=e;return a},getMinorTickInterval:function(){var t=this.options;return!0===t.minorTicks?S(t.minorTickInterval,"auto"):!1===t.minorTicks?null:t.minorTickInterval},getMinorTickPositions:function(){var t=this,e=t.options,i=t.tickPositions,s=t.minorTickInterval,o=[],n=t.pointRangePadding||0,r=t.min-n,a=(n=t.max+n)-r;if(a&&a/s=this.minRange,t=[p-(t=((l=this.minRange)-u+p)/2),S(c.min,p-t)],e&&(t[2]=this.isLog?this.log2lin(this.dataMin):this.dataMin),u=[(p=s(t))+l,S(c.max,p+l)],e&&(u[2]=this.isLog?this.log2lin(this.dataMax):this.dataMax),(u=o(u))-p=T?(i=T,b=0):a.dataMax<=T&&(s=T,v=0)),a.min=S(o,i,a.dataMin),a.max=S(n,s,a.dataMax)),p&&(a.positiveValuesOnly&&!e&&0>=Math.min(a.min,S(a.dataMin,a.min))&&t.error(10,1),a.min=r(a.log2lin(a.min),15),a.max=r(a.log2lin(a.max),15)),a.range&&h(a.max)&&(a.userMin=a.min=o=Math.max(a.dataMin,a.minFromRange()),a.userMax=n=a.max,a.range=null),u(a,"foundExtremes"),a.beforePadding&&a.beforePadding(),a.adjustForMinRange(),!(A||a.axisPointRange||a.usePercentage||x)&&h(a.min)&&h(a.max)&&(l=a.max-a.min)&&(!h(o)&&b&&(a.min-=l*b),!h(n)&&v&&(a.max+=l*v)),y(c.softMin)&&!y(a.userMin)&&(a.min=Math.min(a.min,c.softMin)),y(c.softMax)&&!y(a.userMax)&&(a.max=Math.max(a.max,c.softMax)),y(c.floor)&&(a.min=Math.max(a.min,c.floor)),y(c.ceiling)&&(a.max=Math.min(a.max,c.ceiling)),P&&h(a.dataMin)&&(T=T||0,!h(o)&&a.min=T?a.min=T:!h(n)&&a.max>T&&a.dataMax<=T&&(a.max=T)),a.tickInterval=a.min===a.max||void 0===a.min||void 0===a.max?1:x&&!k&&w===a.linkedParent.options.tickPixelInterval?k=a.linkedParent.tickInterval:S(k,this.tickAmount?(a.max-a.min)/Math.max(this.tickAmount-1,1):void 0,A?1:(a.max-a.min)*w/Math.max(a.len,w)),m&&!e&&d(a.series,function(t){t.processData(a.min!==a.oldMin||a.max!==a.oldMax)}),a.setAxisTranslation(!0),a.beforeSetTickPositions&&a.beforeSetTickPositions(),a.postProcessTickInterval&&(a.tickInterval=a.postProcessTickInterval(a.tickInterval)),a.pointRange&&!k&&(a.tickInterval=Math.max(a.pointRange,a.tickInterval)),e=S(c.minTickInterval,a.isDatetimeAxis&&a.closestPointRange),!k&&a.tickIntervala.tickInterval&&1e3a.max)),!!this.tickAmount)),this.tickAmount||(a.tickInterval=a.unsquish()),this.setTickPositions()},setTickPositions:function(){var e,i=this.options,s=i.tickPositions;e=this.getMinorTickInterval();var o=i.tickPositioner,n=i.startOnTick,r=i.endOnTick;this.tickmarkOffset=this.categories&&"between"===i.tickmarkPlacement&&1===this.tickInterval?.5:0,this.minorTickInterval="auto"===e&&this.tickInterval?this.tickInterval/5:e,this.single=this.min===this.max&&h(this.min)&&!this.tickAmount&&(parseInt(this.min,10)===this.min||!1!==i.allowDecimals),this.tickPositions=e=s&&s.slice(),!e&&(!this.ordinalPositions&&(this.max-this.min)/this.tickInterval>Math.max(2*this.len,200)?(e=[this.min,this.max],t.error(19)):e=this.isDatetimeAxis?this.getTimeTicks(this.normalizeTimeTickInterval(this.tickInterval,i.units),this.min,this.max,i.startOfWeek,this.ordinalPositions,this.closestPointRange,!0):this.isLog?this.getLogTickPositions(this.tickInterval,this.min,this.max):this.getLinearTickPositions(this.tickInterval,this.min,this.max),e.length>this.len&&((e=[e[0],e.pop()])[0]===e[1]&&(e.length=1)),this.tickPositions=e,o&&(o=o.apply(this,[this.min,this.max])))&&(this.tickPositions=e=o),this.paddedTicks=e.slice(0),this.trimTicks(e,n,r),this.isLinked||(this.single&&2>e.length&&(this.min-=.5,this.max+=.5),s||o||this.adjustTickAmount()),u(this,"afterSetTickPositions")},trimTicks:function(t,e,i){var s=t[0],o=t[t.length-1],n=this.minPointOffset||0;if(!this.isLinked){if(e&&-1/0!==s)this.min=s;else for(;this.min-n>t[0];)t.shift();if(i)this.max=o;else for(;this.max+ne&&(this.finalTickAmt=e,e=5),this.tickAmount=e},adjustTickAmount:function(){var t=this.tickInterval,e=this.tickPositions,i=this.tickAmount,s=this.finalTickAmt,o=e&&e.length,n=S(this.threshold,this.softThreshold?0:null);if(this.hasData()){if(oi&&(this.tickInterval*=2,this.setTickPositions());if(h(s)){for(t=i=e.length;t--;)(3===s&&1==t%2||2>=s&&0o&&(t=o)),h(s)&&(eo&&(e=o))),this.displayBtn=void 0!==t||void 0!==e,this.setExtremes(t,e,!1,void 0,{trigger:"zoom"})),!0},setAxisSize:function(){var e=this.chart,i=(a=this.options).offsets||[0,0,0,0],s=this.horiz,o=this.width=Math.round(t.relativeLength(S(a.width,e.plotWidth-i[3]+i[1]),e.plotWidth)),n=this.height=Math.round(t.relativeLength(S(a.height,e.plotHeight-i[0]+i[2]),e.plotHeight)),r=this.top=Math.round(t.relativeLength(S(a.top,e.plotTop+i[0]),e.plotHeight,e.plotTop)),a=this.left=Math.round(t.relativeLength(S(a.left,e.plotLeft+i[3]),e.plotWidth,e.plotLeft));this.bottom=e.chartHeight-n-r,this.right=e.chartWidth-o-a,this.len=Math.max(s?o:n,0),this.pos=s?a:r},getExtremes:function(){var t=this.isLog;return{min:t?r(this.lin2log(this.min)):this.min,max:t?r(this.lin2log(this.max)):this.max,dataMin:this.dataMin,dataMax:this.dataMax,userMin:this.userMin,userMax:this.userMax}},getThreshold:function(t){var e=(i=this.isLog)?this.lin2log(this.min):this.min,i=i?this.lin2log(this.max):this.max;return null===t||-1/0===t?t=e:1/0===t?t=i:e>t?t=e:it?"right":195t?"left":"center"},tickSize:function(t){var e=this.options,i=e[t+"Length"],s=S(e[t+"Width"],"tick"===t&&this.isXAxis?1:0);if(s&&i)return"inside"===e[t+"Position"]&&(i=-i),[i,s]},labelMetrics:function(){var t=this.tickPositions&&this.tickPositions[0]||0;return this.chart.renderer.fontMetrics(this.options.labels.style&&this.options.labels.style.fontSize,this.ticks[t]&&this.ticks[t].label)},unsquish:function(){var t,e,i,s=this.options.labels,o=this.horiz,n=this.tickInterval,a=n,c=this.len/(((this.categories?1:0)+this.max-this.min)/n),p=s.rotation,u=this.labelMetrics(),g=Number.MAX_VALUE,f=function(t){return t=1<(t/=c||1)?Math.ceil(t):1,r(t*n)};return o?(i=!s.staggerLines&&!s.step&&(h(p)?[p]:c=i)&&((s=(e=f(Math.abs(u.h/Math.sin(l*i))))+Math.abs(i/360))(s.step||0)&&!s.rotation&&(this.staggerLines||1)*this.len/o||!i&&(s.style&&parseInt(s.style.width,10)||n&&n-e.spacing[3]||.33*e.chartWidth)},renderUnsquish:function(){var t,e,i,s=this.chart,o=s.renderer,n=this.tickPositions,r=this.ticks,a=this.options.labels,h=a&&a.style||{},l=this.horiz,c=this.getSlotWidth(),p=Math.max(1,Math.round(c-2*(a.padding||5))),u={},g=this.labelMetrics(),f=a.style&&a.style.textOverflow,m=0;if(b(a.rotation)||(u.rotation=a.rotation||0),d(n,function(t){(t=r[t])&&t.label&&t.label.textPxLength>m&&(m=t.label.textPxLength)}),this.maxLabelLength=m,this.autoRotation)m>p&&m>g.h?u.rotation=this.labelRotation:this.labelRotation=0;else if(c&&(t=p,!f))for(e="clip",p=n.length;!l&&p--;)i=n[p],(i=r[i].label)&&(i.styles&&"ellipsis"===i.styles.textOverflow?i.css({textOverflow:"clip"}):i.textPxLength>c&&i.css({width:c+"px"}),i.getBBox().height>this.len/n.length-(g.h-g.f)&&(i.specificTextOverflow="ellipsis"));u.rotation&&(t=m>.5*s.chartHeight?.33*s.chartHeight:m,f||(e="ellipsis")),(this.labelAlign=a.align||this.autoLabelAlign(this.labelRotation))&&(u.align=this.labelAlign),d(n,function(i){var s=(i=r[i])&&i.label,o=h.width,n={};s&&(s.attr(u),i.shortenLabel?i.shortenLabel():t&&!o&&"nowrap"!==h.whiteSpace&&(t=this.min&&t<=this.max)&&(s[t]||(s[t]=new C(this,t)),o&&s[t].isNew&&s[t].render(e,!0,-1),s[t].render(e))},render:function(){var e,s,o=this,n=o.chart,r=o.options,a=o.isLog,h=o.isLinked,l=o.tickPositions,c=o.axisTitle,p=o.ticks,g=o.minorTicks,f=o.alternateBands,m=r.stackLabels,x=r.alternateGridColor,v=o.tickmarkOffset,b=o.axisLine,k=o.showAxis,M=i(n.renderer.globalAnimation);o.labelEdge.length=0,o.overlap=!1,d([p,g,f],function(t){w(t,function(t){t.isActive=!1})}),(o.hasData()||h)&&(o.minorTickInterval&&!o.categories&&d(o.getMinorTickPositions(),function(t){o.renderMinorTick(t)}),l.length&&(d(l,function(t,e){o.renderTick(t,e)}),v&&(0===o.min||o.single)&&(p[-1]||(p[-1]=new C(o,-1,null,!0)),p[-1].render(-1))),x&&d(l,function(i,r){s=void 0!==l[r+1]?l[r+1]+v:o.max-v,0==r%2&&ie&&(!a||g<=r)&&void 0!==g&&c.push(g),g>r&&(f=!0),g=u}else e=this.lin2log(e),r=this.lin2log(r),t=a?this.getMinorTickInterval():h.tickInterval,t=n("auto"===t?null:t,this._minorAutoInterval,h.tickPixelInterval/(a?5:1)*(r-e)/((a?l/this.tickPositions.length:l)||1)),t=o(t,null,i(t)),c=s(this.getLinearTickPositions(t,e,r),this.log2lin),a||(this._minorAutoInterval=t/5);return a||(this.tickInterval=t),c},e.prototype.log2lin=function(t){return Math.log(t)/Math.LN10},e.prototype.lin2log=function(t){return Math.pow(10,t)}}(e),function(t,e){var i=t.arrayMax,s=t.arrayMin,o=t.defined,n=t.destroyObjectProperties,r=t.each,a=t.erase,h=t.merge,l=t.pick;t.PlotLineOrBand=function(t,e){this.axis=t,e&&(this.options=e,this.id=e.id)},t.PlotLineOrBand.prototype={render:function(){t.fireEvent(this,"render");var e=this,i=e.axis,s=i.horiz,n=e.options,r=n.label,a=e.label,c=n.to,d=n.from,p=n.value,u=o(d)&&o(c),g=o(p),f=e.svgElem,m=!f,x=[],v=n.color,y=l(n.zIndex,0),b=n.events,k=(x={class:"highcharts-plot-"+(u?"band ":"line ")+(n.className||"")},{}),M=i.chart.renderer,w=u?"bands":"lines";if(i.isLog&&(d=i.log2lin(d),c=i.log2lin(c),p=i.log2lin(p)),g?(x.stroke=v,x["stroke-width"]=n.width,n.dashStyle&&(x.dashstyle=n.dashStyle)):u&&(v&&(x.fill=v),n.borderWidth&&(x.stroke=n.borderColor,x["stroke-width"]=n.borderWidth)),k.zIndex=y,w+="-"+y,(v=i.plotLinesAndBandsGroups[w])||(i.plotLinesAndBandsGroups[w]=v=M.g("plot-"+w).attr(k).add()),m&&(e.svgElem=f=M.path().attr(x).add(v)),g)x=i.getPlotLinePath(p,f.strokeWidth());else{if(!u)return;x=i.getPlotBandPath(d,c,n)}return m&&x&&x.length?(f.attr({d:x}),b&&t.objectEach(b,function(t,i){f.on(i,function(t){b[i].apply(e,[t])})})):f&&(x?(f.show(),f.animate({d:x})):(f.hide(),a&&(e.label=a=a.destroy()))),r&&o(r.text)&&x&&x.length&&0this.max&&e>this.max,o&&s)for(t&&(i=o.toString()===s.toString(),a=0),t=0;td-l?d:d-l);else{if(!c)return!1;a[t]=Math.max(o,s+l+i>e?s:s+l)}}.apply(0,g)?!1!==function(t,e,i,s){var o;return se-r?o=!1:a[t]=se-i/2?e-i-2:s-i/2,o}.apply(0,f)||o||(x(!0),v()):o?a.x=a.y=0:(x(!0),v())};return(n.inverted||1m&&(c=!1),t=(e.series&&e.series.yAxis&&e.series.yAxis.pos)+(e.plotY||0),t-=g,e.isHeader&&(t=o?-p:a.plotHeight+p),r.push({target:t,rank:e.isHeader?1:0,size:i.tt.getBBox().height+1,point:e,x:m,tt:f})}}),this.cleanSplit(),t.distribute(r,a.plotHeight+p),i(r,function(t){var e=t.point,i=e.series;t.tt.attr({visibility:void 0===t.pos?"hidden":"inherit",x:c||e.isHeader?t.x:e.plotX+a.plotLeft+h(d.distance,16),y:t.pos+g,anchorX:e.isHeader?e.plotX+a.plotLeft:e.plotX+i.xAxis.pos,anchorY:e.isHeader?a.plotTop+a.plotHeight/2:e.plotY+i.yAxis.pos})})},updatePosition:function(t){var e,i=this.chart,s=this.getLabel(),o=(this.options.positioner||this.getPosition).call(this,s.width,s.height,t),n=t.plotX+i.plotLeft;t=t.plotY+i.plotTop,this.outside&&(e=(this.options.borderWidth||0)+2*this.distance,this.renderer.setSize(s.width+e,s.height+e,!1),n+=i.pointer.chartPosition.left-o.x,t+=i.pointer.chartPosition.top-o.y),this.move(Math.round(o.x),Math.round(o.y||0),n,t)},getDateFormat:function(t,e,i,s){var o,n,r=this.chart.time,a=r.dateFormat("%m-%d %H:%M:%S.%L",e),h={millisecond:15,second:12,minute:9,hour:6,day:3},l="millisecond";for(n in d){if(t===d.week&&+r.dateFormat("%w",e)===i&&"00:00:00.000"===a.substr(6)){n="week";break}if(d[n]>t){n=l;break}if(h[n]&&a.substr(h[n])!=="01-01 00:00:00.000".substr(h[n]))break;"week"!==n&&(l=n)}return n&&(o=r.resolveDTLFormat(s[n]).main),o},getXDateFormat:function(t,e,i){e=e.dateTimeLabelFormats;var s=i&&i.closestPointRange;return(s?this.getDateFormat(s,t.x,i.options.startOfWeek,e):e.day)||e.year},tooltipFooterHeaderFormatter:function(t,e){e=e?"footer":"header";var s=t.series,r=s.tooltipOptions,a=r.xDateFormat,h=s.xAxis,l=h&&"datetime"===h.options.type&&n(t.key),c=r[e+"Format"];return l&&!a&&(a=this.getXDateFormat(t,r,h)),l&&a&&i(t.point&&t.point.tooltipDateKeys||["key"],function(t){c=c.replace("{point."+t+"}","{point."+t+":"+a+"}")}),o(c,{point:t,series:s},this.chart.time)},bodyFormatter:function(t){return r(t,function(t){var e=t.series.tooltipOptions;return(e[(t.point.formatPrefix||"point")+"Formatter"]||t.point.tooltipFormatter).call(t.point,e[(t.point.formatPrefix||"point")+"Format"])})}}}(e),function(t){var e=t.addEvent,i=t.attr,s=t.charts,o=t.color,n=t.css,r=t.defined,a=t.each,h=t.extend,l=t.find,c=t.fireEvent,d=t.isNumber,p=t.isObject,u=t.offset,g=t.pick,f=t.splat,m=t.Tooltip;t.Pointer=function(t,e){this.init(t,e)},t.Pointer.prototype={init:function(t,e){this.options=e,this.chart=t,this.runChartClick=e.chart.events&&!!e.chart.events.click,this.pinchDown=[],this.lastValidTouch={},m&&(t.tooltip=new m(t,e.tooltip),this.followTouchMove=g(e.tooltip.followTouchMove,!0)),this.setDOMEvents()},zoomOption:function(t){var e=(s=this.chart).options.chart,i=e.zoomType||"",s=s.inverted;/touch/.test(t.type)&&(i=g(e.pinchType,i)),this.zoomX=t=/x/.test(i),this.zoomY=i=/y/.test(i),this.zoomHor=t&&!s||i&&s,this.zoomVert=i&&!s||t&&s,this.hasZoom=t||i},normalize:function(t,e){var i;return i=t.touches?t.touches.length?t.touches.item(0):t.changedTouches[0]:t,e||(this.chartPosition=e=u(this.chart.container)),h(t,{chartX:Math.round(i.pageX-e.left),chartY:Math.round(i.pageY-e.top)})},getCoordinates:function(t){var e={xAxis:[],yAxis:[]};return a(this.chart.axes,function(i){e[i.isXAxis?"xAxis":"yAxis"].push({axis:i,value:i.toValue(t[i.horiz?"chartX":"chartY"])})}),e},findNearestKDPoint:function(t,e,i){var s;return a(t,function(t){var o=!(t.noSharedTooltip&&e)&&0>t.options.findNearestPointBy.indexOf("y");if(t=t.searchPoint(i,o),(o=p(t,!0))&&!(o=!p(s,!0))){o=s.distX-t.distX;var n=s.dist-t.dist,r=(t.series.group&&t.series.group.zIndex)-(s.series.group&&s.series.group.zIndex);o=0<(0!==o&&e?o:0!==n?n:0!==r?r:s.series.index>t.series.index?-1:1)}o&&(s=t)}),s},getPointFromEvent:function(t){t=t.target;for(var e;t&&!e;)e=t.point,t=t.parentNode;return e},getChartCoordinatesFromPoint:function(t,e){var i=(s=t.series).xAxis,s=s.yAxis,o=g(t.clientX,t.plotX),n=t.shapeArgs;return i&&s?e?{chartX:i.len+i.pos-o,chartY:s.len+s.pos-t.plotY}:{chartX:o+i.pos,chartY:t.plotY+s.pos}:n&&n.x&&n.y?{chartX:n.x,chartY:n.y}:void 0},getHoverData:function(e,i,s,o,n,r,h){var c,d=[],u=h&&h.isBoosting;return o=!(!o||!e),h=i&&!i.stickyTracking?[i]:t.grep(s,function(t){return t.visible&&!(!n&&t.directTouch)&&g(t.options.enableMouseTracking,!0)&&t.stickyTracking}),i=(c=o?e:this.findNearestKDPoint(h,n,r))&&c.series,c&&(n&&!i.noSharedTooltip?(h=t.grep(s,function(t){return t.visible&&!(!n&&t.directTouch)&&g(t.options.enableMouseTracking,!0)&&!t.noSharedTooltip}),a(h,function(t){var e=l(t.points,function(t){return t.x===c.x&&!t.isNull});p(e)&&(u&&(e=t.getPoint(e)),d.push(e))})):d.push(c)),{hoverPoint:c,hoverSeries:i,hoverPoints:d}},runPointActions:function(i,o){var n,r=this.chart,h=r.tooltip&&r.tooltip.options.enabled?r.tooltip:void 0,l=!!h&&h.shared,c=(d=o||r.hoverPoint)&&d.series||r.hoverSeries,d=(c=this.getHoverData(d,c,r.series,"touchmove"!==i.type&&(!!o||c&&c.directTouch&&this.isDirectTouch),l,i,{isBoosting:r.isBoosting})).hoverPoint;if(n=c.hoverPoints,o=(c=c.hoverSeries)&&c.tooltipOptions.followPointer,l=l&&c&&!c.noSharedTooltip,d&&(d!==r.hoverPoint||h&&h.isHidden)){if(a(r.hoverPoints||[],function(e){-1===t.inArray(e,n)&&e.setState()}),a(n||[],function(t){t.setState("hover")}),r.hoverSeries!==c&&c.onMouseOver(),r.hoverPoint&&r.hoverPoint.firePointEvent("mouseOut"),!d.series)return;d.firePointEvent("mouseOver"),r.hoverPoints=n,r.hoverPoint=d,h&&h.refresh(l?n:d,i)}else o&&h&&!h.isHidden&&(d=h.getAnchor([{}],i),h.updatePosition({plotX:d[0],plotY:d[1]}));this.unDocMouseMove||(this.unDocMouseMove=e(r.container.ownerDocument,"mousemove",function(e){var i=s[t.hoverChartIndex];i&&i.pointer.onDocumentMouseMove(e)})),a(r.axes,function(e){var s=g(e.crosshair.snap,!0),o=s?t.find(n,function(t){return t.series[e.coll]===e}):void 0;o||!s?e.drawCrosshair(i,o):e.hideCrosshair()})},reset:function(t,e){var i=this.chart,s=i.hoverSeries,o=i.hoverPoint,n=i.hoverPoints,r=i.tooltip,h=r&&r.shared?n:o;t&&h&&a(f(h),function(e){e.series.isCartesian&&void 0===e.plotX&&(t=!1)}),t?r&&h&&(r.refresh(h),r.shared&&n?a(n,function(t){t.setState(t.state,!0),t.series.isCartesian&&(t.series.xAxis.crosshair&&t.series.xAxis.drawCrosshair(null,t),t.series.yAxis.crosshair&&t.series.yAxis.drawCrosshair(null,t))}):o&&(o.setState(o.state,!0),a(i.axes,function(t){t.crosshair&&t.drawCrosshair(null,o)}))):(o&&o.onMouseOut(),n&&a(n,function(t){t.setState()}),s&&s.onMouseOut(),r&&r.hide(e),this.unDocMouseMove&&(this.unDocMouseMove=this.unDocMouseMove()),a(i.axes,function(t){t.hideCrosshair()}),this.hoverX=i.hoverPoints=i.hoverPoint=null)},scaleGroups:function(t,e){var i,s=this.chart;a(s.series,function(o){i=t||o.getPlotBox(),o.xAxis&&o.xAxis.zoomEnabled&&o.group&&(o.group.attr(i),o.markerGroup&&(o.markerGroup.attr(i),o.markerGroup.clip(e?s.clipRect:null)),o.dataLabelsGroup&&o.dataLabelsGroup.attr(i))}),s.clipRect.attr(e||s.clipBox)},dragStart:function(t){var e=this.chart;e.mouseIsDown=t.type,e.cancelClick=!1,e.mouseDownX=this.mouseDownX=t.chartX,e.mouseDownY=this.mouseDownY=t.chartY},drag:function(t){var e,i=this.chart,s=i.options.chart,n=t.chartX,r=t.chartY,a=this.zoomHor,h=this.zoomVert,l=i.plotLeft,c=i.plotTop,d=i.plotWidth,p=i.plotHeight,u=this.selectionMarker,g=this.mouseDownX,f=this.mouseDownY,m=s.panKey&&t[s.panKey+"Key"];u&&u.touch||(nl+d&&(n=l+d),rc+p&&(r=c+p),this.hasDragged=Math.sqrt(Math.pow(g-n,2)+Math.pow(f-r,2)),10y.max&&(e=y.max-h,c=!0),c?(M-=.8*(M-r[p][0]),b||(S-=.8*(S-r[p][1])),i()):r[p]=[M,S],v||(n[p]=l-m,n[f]=h),n=v?1/x:x,o[f]=h,o[p]=e,s[v?t?"scaleY":"scaleX":"scale"+u]=x,s["translate"+u]=n*m+(M-n*k)},pinch:function(t){var e=this,a=e.chart,h=e.pinchDown,l=t.touches,c=l.length,d=e.lastValidTouch,p=e.hasZoom,u=e.selectionMarker,g={},f=1===c&&(e.inClass(t.target,"highcharts-tracker")&&a.runTrackerClick||e.runChartClick),m={};1t-6&&rl?this.maxItemWidth:t.itemWidth;s&&this.itemX-i+e>l&&(this.itemX=i,this.itemY+=r+this.lastLineHeight+n,this.lastLineHeight=0),this.lastItemY=r+this.itemY+n,this.lastLineHeight=Math.max(o,this.lastLineHeight),t._legendItemPos=[this.itemX,this.itemY],s?this.itemX+=e:(this.itemY+=r+o+n,this.lastLineHeight=o),this.offsetWidth=h||Math.max((s?this.itemX-i-(t.checkbox?0:a):e)+i,this.offsetWidth)},getAllItems:function(){var t=[];return n(this.chart.series,function(e){var i=e&&e.options;e&&c(i.showInLegend,!o(i.linkedTo)&&void 0,!0)&&(t=t.concat(e.legendItems||("point"===i.legendType?e.data:e)))}),r(this,"afterGetAllItems",{allItems:t}),t},getAlignment:function(){var t=this.options;return this.proximate?t.align.charAt(0)+"tv":t.floating?"":t.align.charAt(0)+t.verticalAlign.charAt(0)+t.layout.charAt(0)},adjustMargins:function(t,e){var i=this.chart,s=this.options,r=this.getAlignment();r&&n([/(lth|ct|rth)/,/(rtv|rm|rbv)/,/(rbh|cb|lbh)/,/(lbv|lm|ltv)/],function(n,a){n.test(r)&&!o(t[a])&&(i[h[a]]=Math.max(i[h[a]],i.legend[(a+1)%2?"legendHeight":"legendWidth"]+[1,-1,-1,1][a]*s[a%2?"x":"y"]+c(s.margin,12)+e[a]+(0===a&&void 0!==i.options.title.margin?i.titleOffset+i.options.title.margin:0)))})},proximatePositions:function(){var e=this.chart,i=[],s="left"===this.options.align;n(this.allItems,function(o){var n,r;n=s,o.xAxis&&o.points&&(o.xAxis.options.reversed&&(n=!n),n=t.find(n?o.points:o.points.slice(0).reverse(),function(e){return t.isNumber(e.plotY)}),r=o.legendGroup.getBBox().height,i.push({target:o.visible?(n?n.plotY:o.xAxis.height)-.3*r:e.plotHeight,size:r,item:o}))},this),t.distribute(i,e.plotHeight),n(i,function(t){t.item._legendItemPos[1]=e.plotTop-e.spacing[0]+t.pos})},render:function(){var t,e,i,s=this.chart,o=s.renderer,r=this.group,a=this.box,h=this.options,c=this.padding;this.itemX=c,this.itemY=this.initialItemY,this.lastItemY=this.offsetWidth=0,r||(this.group=r=o.g("legend").attr({zIndex:7}).add(),this.contentGroup=o.g().attr({zIndex:1}).add(r),this.scrollGroup=o.g().add(this.contentGroup)),this.renderTitle(),t=this.getAllItems(),p(t,function(t,e){return(t.options&&t.options.legendIndex||0)-(e.options&&e.options.legendIndex||0)}),h.reversed&&t.reverse(),this.allItems=t,this.display=e=!!t.length,this.itemHeight=this.totalItemWidth=this.maxItemWidth=this.lastLineHeight=0,n(t,this.renderItem,this),n(t,this.layoutItem,this),t=(h.width||this.offsetWidth)+c,i=this.lastItemY+this.lastLineHeight+this.titleHeight,i=this.handleOverflow(i),i+=c,a||(this.box=a=o.rect().addClass("highcharts-legend-box").attr({r:h.borderRadius}).add(r),a.isNew=!0),a.attr({stroke:h.borderColor,"stroke-width":h.borderWidth||0,fill:h.backgroundColor||"none"}).shadow(h.shadow),0l&&!1!==p.enabled?(this.clipHeight=e=Math.max(l-20-this.titleHeight-h,0),this.currentPage=c(this.currentPage,1),this.fullHeight=t,n(x,function(t,s){var o=t._legendItemPos[1],n=Math.round(t.legendItem.getBBox().height),r=m.length;(!r||o-m[r-1]>e&&(i||o)!==m[r-1])&&(m.push(i||o),r++),t.pageIx=r-1,i&&(x[s-1].pageIx=r-1),s===x.length-1&&o+n-m[r-1]>e&&(m.push(o),t.pageIx=r),o!==i&&(i=o)}),d||(d=s.clipRect=o.clipRect(0,h,9999,0),s.contentGroup.clip(d)),v(e),f||(this.nav=f=o.g().attr({zIndex:1}).add(this.group),this.up=o.symbol("triangle",0,0,g,g).on("click",function(){s.scroll(-1,u)}).add(f),this.pager=o.text("",15,10).addClass("highcharts-legend-navigation").css(p.style).add(f),this.down=o.symbol("triangle-down",0,0,g,g).on("click",function(){s.scroll(1,u)}).add(f)),s.scroll(0),t=l):f&&(v(),this.nav=f.destroy(),this.scrollGroup.attr({translateY:1}),this.clipHeight=0),t},scroll:function(t,e){var i=this.pages,s=i.length;t=this.currentPage+t;var o=this.clipHeight,n=this.options.navigation,r=this.pager,a=this.padding;t>s&&(t=s),0r&&("string"===(s=typeof e[0])?i.name=e[0]:"number"===s&&(i.x=e[0]),l++);c=t.value;)t=e[++s];return this.nonZonedColor||(this.nonZonedColor=this.color),this.color=t&&t.color&&!this.options.color?t.color:this.nonZonedColor,t},destroy:function(){var t,e=this.series.chart,i=e.hoverPoints;for(t in e.pointCount--,i&&(this.setState(),o(i,this),i.length||(e.hoverPoints=null)),this===e.hoverPoint&&this.onMouseOut(),(this.graphic||this.dataLabel||this.dataLabels)&&(p(this),this.destroyElements()),this.legendItem&&e.legend.destroyItem(this),this)this[t]=null},destroyElements:function(){for(var t,e=["graphic","dataLabel","dataLabelUpper","connector","shadowGroup"],s=6;s--;)this[t=e[s]]&&(this[t]=this[t].destroy());this.dataLabels&&(i(this.dataLabels,function(t){t.element&&t.destroy()}),delete this.dataLabels),this.connectors&&(i(this.connectors,function(t){t.element&&t.destroy()}),delete this.connectors)},getLabelConfig:function(){return{x:this.category,y:this.y,color:this.color,colorIndex:this.colorIndex,key:this.name||this.category,series:this.series,point:this,percentage:this.percentage,total:this.total||this.stackTotal}},tooltipFormatter:function(t){var e=this.series,s=e.tooltipOptions,o=l(s.valueDecimals,""),n=s.valuePrefix||"",a=s.valueSuffix||"";return i(e.pointArrayMap||["y"],function(e){e="{point."+e,(n||a)&&(t=t.replace(RegExp(e+"}","g"),n+e+"}"+a)),t=t.replace(RegExp(e+"}","g"),e+":,."+o+"f}")}),r(t,{point:this,series:this.series},e.chart.time)},firePointEvent:function(t,e,i){var s=this,o=this.series.options;(o.point.events[t]||s.options&&s.options.events&&s.options.events[t])&&this.importEvents(),"click"===t&&o.allowPointSelect&&(i=function(t){s.select&&s.select(null,t.ctrlKey||t.metaKey||t.shiftKey)}),n(this,t,e,i)},visible:!0}}(e),function(t){var e=t.addEvent,i=t.animObject,s=t.arrayMax,o=t.arrayMin,n=t.correctFloat,r=t.defaultOptions,a=t.defaultPlotOptions,h=t.defined,l=t.each,c=t.erase,d=t.extend,p=t.fireEvent,u=t.grep,g=t.isArray,f=t.isNumber,m=t.isString,x=t.merge,v=t.objectEach,y=t.pick,b=t.removeEvent,k=t.splat,M=t.SVGElement,w=t.syncTimeout,S=t.win;t.Series=t.seriesType("line",null,{lineWidth:2,allowPointSelect:!1,showCheckbox:!1,animation:{duration:1e3},events:{},marker:{lineWidth:0,lineColor:"#ffffff",enabledThreshold:2,radius:4,states:{normal:{animation:!0},hover:{animation:{duration:50},enabled:!0,radiusPlus:2,lineWidthPlus:1},select:{fillColor:"#cccccc",lineColor:"#000000",lineWidth:2}}},point:{events:{}},dataLabels:{align:"center",formatter:function(){return null===this.y?"":t.numberFormat(this.y,-1)},style:{fontSize:"11px",fontWeight:"bold",color:"contrast",textOutline:"1px contrast"},verticalAlign:"bottom",x:0,y:0,padding:5},cropThreshold:300,pointRange:0,softThreshold:!0,states:{normal:{animation:!0},hover:{animation:{duration:50},lineWidthPlus:1,marker:{},halo:{size:10,opacity:.25}},select:{}},stickyTracking:!0,turboThreshold:1e3,findNearestPointBy:"x"},{isCartesian:!0,pointClass:t.Point,sorted:!0,requireSorting:!0,directTouch:!1,axisTypes:["xAxis","yAxis"],colorCounter:0,parallelArrays:["x","y"],coll:"series",init:function(t,i){var s,o,n=this,r=t.series;n.chart=t,n.options=i=n.setOptions(i),n.linkedSeries=[],n.bindAxes(),d(n,{name:i.name,state:"",visible:!1!==i.visible,selected:!0===i.selected}),s=i.events,v(s,function(t,i){e(n,i,t)}),(s&&s.click||i.point&&i.point.events&&i.point.events.click||i.allowPointSelect)&&(t.runTrackerClick=!0),n.getColor(),n.getSymbol(),l(n.parallelArrays,function(t){n[t+"Data"]=[]}),n.setData(i.data,!1),n.isCartesian&&(t.hasCartesianSeries=!0),r.length&&(o=r[r.length-1]),n._i=y(o&&o._i,-1)+1,t.orderSeries(this.insert(r)),p(this,"afterInit")},insert:function(t){var e,i=this.options.index;if(f(i)){for(e=t.length;e--;)if(i>=y(t[e].options.index,t[e]._i)){t.splice(e+1,0,this);break}-1===e&&t.unshift(this),e+=1}else t.push(this);return y(e,t.length-1)},bindAxes:function(){var e,i=this,s=i.options,o=i.chart;l(i.axisTypes||[],function(n){l(o[n],function(t){e=t.options,(s[n]===e.index||void 0!==s[n]&&s[n]===e.id||void 0===s[n]&&0===e.index)&&(i.insert(t.series),i[n]=t,t.isDirty=!0)}),i[n]||i.optionalAxis===n||t.error(18,!0)})},updateParallelArrays:function(t,e){var i=t.series,s=arguments,o=f(e)?function(s){var o="y"===s&&i.toYData?i.toYData(t):t[s];i[s+"Data"][e]=o}:function(t){Array.prototype[e].apply(i[t+"Data"],Array.prototype.slice.call(s,2))};l(i.parallelArrays,o)},autoIncrement:function(){var t,e=this.options,i=this.xIncrement,s=e.pointIntervalUnit,o=this.chart.time;i=y(i,e.pointStart,0);return this.pointInterval=t=y(this.pointInterval,e.pointInterval,1),s&&(e=new o.Date(i),"day"===s?o.set("Date",e,o.get("Date",e)+t):"month"===s?o.set("Month",e,o.get("Month",e)+t):"year"===s&&o.set("FullYear",e,o.get("FullYear",e)+t),t=e.getTime()-i),this.xIncrement=i+t,i},setOptions:function(t){var e=this.chart,i=e.options,s=i.plotOptions,o=(e.userOptions||{}).plotOptions||{},n=s[this.type];return this.userOptions=t,e=x(n,s.series,t),this.tooltipOptions=x(r.tooltip,r.plotOptions.series&&r.plotOptions.series.tooltip,r.plotOptions[this.type].tooltip,i.tooltip.userOptions,s.series&&s.series.tooltip,s[this.type].tooltip,t.tooltip),this.stickyTracking=y(t.stickyTracking,o[this.type]&&o[this.type].stickyTracking,o.series&&o.series.stickyTracking,!(!this.tooltipOptions.shared||this.noSharedTooltip)||e.stickyTracking),null===n.marker&&delete e.marker,this.zoneAxis=e.zoneAxis,t=this.zones=(e.zones||[]).slice(),!e.negativeColor&&!e.negativeFillColor||e.zones||t.push({value:e[this.zoneAxis+"Threshold"]||e.threshold||0,className:"highcharts-negative",color:e.negativeColor,fillColor:e.negativeFillColor}),t.length&&h(t[t.length-1].value)&&t.push({color:this.color,fillColor:this.fillColor}),p(this,"afterSetOptions",{options:e}),e},getName:function(){return this.name||"Series "+(this.index+1)},getCyclic:function(t,e,i){var s,o=this.chart,n=this.userOptions,r=t+"Index",a=t+"Counter",l=i?i.length:y(o.options.chart[t+"Count"],o[t+"Count"]);e||(s=y(n[r],n["_"+r]),h(s)||(o.series.length||(o[a]=0),n["_"+r]=s=o[a]%l,o[a]+=1),i&&(e=i[s])),void 0!==s&&(this[r]=s),this[t]=e},getColor:function(){this.options.colorByPoint?this.options.color=null:this.getCyclic("color",this.options.color||a[this.type].color,this.chart.options.colors)},getSymbol:function(){this.getCyclic("symbol",this.options.marker.symbol,this.chart.options.symbols)},drawLegendSymbol:t.LegendSymbolMixin.drawLineMarker,updateData:function(e){var i,s,o,n=this.options,r=this.points,a=[],h=this.requireSorting;if(l(e,function(e){var s;s=t.defined(e)&&this.pointClass.prototype.optionsToObject.call({series:this},e).x,f(s)&&(-1===(s=t.inArray(s,this.xData,o))||r[s].touched?a.push(e):e!==n.data[s]?(r[s].update(e,!1,null,!1),r[s].touched=!0,h&&(o=s+1)):r[s]&&(r[s].touched=!0),i=!0)},this),i)for(e=r.length;e--;)(s=r[e]).touched||s.remove(!1),s.touched=!1;else{if(e.length!==r.length)return!1;l(e,function(t,e){r[e].update&&t!==n.data[e]&&r[e].update(t,!1,null,!1)})}return l(a,function(t){this.addPoint(t,!1)},this),!0},setData:function(e,i,s,o){var n,r,a=this,h=a.points,c=h&&h.length||0,d=a.options,p=a.chart,u=null,x=a.xAxis,v=d.turboThreshold,b=this.xData,k=this.yData,M=(n=a.pointArrayMap)&&n.length;if(n=(e=e||[]).length,i=y(i,!0),!1!==o&&n&&c&&!a.cropped&&!a.hasGroupedData&&a.visible&&!a.isSeriesBoosting&&(r=this.updateData(e)),!r){if(a.xIncrement=null,a.colorCounter=0,l(this.parallelArrays,function(t){a[t+"Data"].length=0}),v&&n>v){for(s=0;null===u&&sh||this.forceCrop)&&(s[n-1]d?(s=[],o=[]):this.yData&&(s[0]d)&&(s=(i=this.cropData(this.xData,this.yData,c,d)).xData,o=i.yData,i=i.start,r=!0)),h=s.length||1;--h;)0<(n=f?g(s[h])-g(s[h-1]):s[h]-s[h-1])&&(void 0===a||nn&&m&&(t.error(15),m=!1);this.cropped=r,this.cropStart=i,this.processedXData=s,this.processedYData=o,this.closestPointRange=a},cropData:function(t,e,i,s,o){var n,r=t.length,a=0,h=r;for(o=y(o,this.cropShoulder,1),n=0;n=i){a=Math.max(0,n-o);break}for(i=n;is){h=i+o;break}return{xData:t.slice(a,h),yData:e.slice(a,h),start:a,end:h}},generatePoints:function(){var t,e,i,s,o=(u=this.options).data,n=this.data,r=this.processedXData,a=this.processedYData,h=this.pointClass,l=r.length,c=this.cropStart||0,p=this.hasGroupedData,u=u.keys,g=[];for(n||p||((n=[]).length=o.length,n=this.data=n),u&&p&&(this.options.keys=!1),s=0;s=p&&(l[a-m]||n)<=u,i&&n)if(i=r.length)for(;i--;)"number"==typeof r[i]&&(c[d++]=r[i]);else c[d++]=r;this.dataMin=o(c),this.dataMax=s(c)},translate:function(){this.processedXData||this.processData(),this.generatePoints();var t,e,i,s,o=this.options,r=o.stacking,a=this.xAxis,l=a.categories,c=this.yAxis,d=this.points,u=d.length,g=!!this.modifyValue,m=o.pointPlacement,x="between"===m||f(m),v=o.threshold,b=o.startFromThreshold?v:0,k=Number.MAX_VALUE;for("between"===m&&(m=.5),f(m)&&(m*=y(o.pointRange||a.pointRange)),o=0;o=S&&(M.isNull=!0),M.plotX=t=n(Math.min(Math.max(-1e5,a.translate(w,0,0,0,1,m,"flags"===this.type)),1e5)),r&&this.visible&&!M.isNull&&T&&T[w]&&(s=this.getStackIndicator(s,w,this.index),e=(S=(A=T[w]).points[s.key])[0],S=S[1],e===b&&s.key===T[w].base&&(e=y(f(v)&&v,c.min)),c.positiveValuesOnly&&0>=e&&(e=null),M.total=M.stackTotal=A.total,M.percentage=A.total&&M.y/A.total*100,M.stackY=S,A.setOffset(this.pointXOffset||0,this.barW||0)),M.yBottom=h(e)?Math.min(Math.max(-1e5,c.translate(e,0,1,0,1)),1e5):null,g&&(S=this.modifyValue(S,M)),M.plotY=e="number"==typeof S&&1/0!==S?Math.min(Math.max(-1e5,c.translate(S,0,1,0,1)),1e5):void 0,M.isInside=void 0!==e&&0<=e&&e<=c.len&&0<=t&&t<=a.len,M.clientX=x?n(a.translate(w,0,0,0,1,m)):t,M.negative=M.y<(v||0),M.category=l&&void 0!==l[M.x]?l[M.x]:M.x,M.isNull||(void 0!==i&&(k=Math.min(k,Math.abs(t-i))),i=t),M.zone=this.zones.length&&M.getZone()}this.closestPointRangePx=k,p(this,"afterTranslate")},getValidPoints:function(t,e){var i=this.chart;return u(t||this.points||[],function(t){return!(e&&!i.isInsidePlot(t.plotX,t.plotY,i.inverted))&&!t.isNull})},setClip:function(t){var e=this.chart,i=this.options,s=e.renderer,o=e.inverted,n=this.clipBox,r=n||e.clipBox,a=this.sharedClipKey||["_sharedClip",t&&t.duration,t&&t.easing,r.height,i.xAxis,i.yAxis].join(),h=e[a],l=e[a+"m"];h||(t&&(r.width=0,o&&(r.x=e.plotSizeX),e[a+"m"]=l=s.clipRect(o?e.plotSizeX+99:-99,o?-e.plotLeft:-e.plotTop,99,o?e.chartWidth:e.chartHeight)),e[a]=h=s.clipRect(r),h.count={length:0}),t&&!h.count[this.index]&&(h.count[this.index]=!0,h.count.length+=1),!1!==i.clip&&(this.group.clip(t||n?h:e.clipRect),this.markerGroup.clip(l),this.sharedClipKey=a),t||(h.count[this.index]&&(delete h.count[this.index],--h.count.length),0===h.count.length&&a&&e[a]&&(n||(e[a]=e[a].destroy()),e[a+"m"]&&(e[a+"m"]=e[a+"m"].destroy())))},animate:function(t){var e,s=this.chart,o=i(this.options.animation);t?this.setClip(o):((t=s[e=this.sharedClipKey])&&t.animate({width:s.plotSizeX,x:0},o),s[e+"m"]&&s[e+"m"].animate({width:s.plotSizeX+99,x:0},o),this.animate=null)},afterAnimate:function(){this.setClip(),p(this,"afterAnimate"),this.finishedAnimating=!0},drawPoints:function(){var t,e,i,s,o,n,r,a,h=this.points,l=this.chart,c=this.options.marker,d=this[this.specialGroup]||this.markerGroup,p=y(c.enabled,!!this.xAxis.isRadial||null,this.closestPointRangePx>=c.enabledThreshold*c.radius);if(!1!==c.enabled||this._hasPointMarkers)for(t=0;to&&e.shadow)),r&&(r.startX=i.xMap,r.isArea=i.isArea)})},getZonesGraphs:function(t){return l(this.zones,function(e,i){t.push(["zone-graph-"+i,"highcharts-graph highcharts-zone-graph-"+i+" "+(e.className||""),e.color||this.color,e.dashStyle||this.options.dashStyle])},this),t},applyZones:function(){var t,e,i,s,o,n,r,a,h,c=this,d=this.chart,p=d.renderer,u=this.zones,g=this.clips||[],f=this.graph,m=this.area,x=Math.max(d.chartWidth,d.chartHeight),v=this[(this.zoneAxis||"y")+"Axis"],b=d.inverted,k=!1;u.length&&(f||m)&&v&&void 0!==v.min&&(o=v.reversed,n=v.horiz,f&&!this.showLine&&f.hide(),m&&m.hide(),s=v.getExtremes(),l(u,function(l,u){t=o?n?d.plotWidth:0:n?0:v.toPixels(s.min),t=Math.min(Math.max(y(e,t),0),x),e=Math.min(Math.max(Math.round(v.toPixels(y(l.value,s.max),!0)),0),x),k&&(t=e=v.toPixels(s.max)),r=Math.abs(t-e),a=Math.min(t,e),h=Math.max(t,e),v.isXAxis?(i={x:b?h:a,y:0,width:r,height:x},n||(i.x=d.plotHeight-i.x)):(i={x:0,y:b?h:a,width:x,height:r},n&&(i.y=d.plotWidth-i.y)),b&&p.isVML&&(i=v.isXAxis?{x:0,y:o?a:h,height:i.width,width:d.chartWidth}:{x:i.y-d.plotLeft-d.spacingBox.x,y:0,width:i.height,height:d.chartHeight}),g[u]?g[u].animate(i):(g[u]=p.clipRect(i),f&&c["zone-graph-"+u].clip(g[u]),m&&c["zone-area-"+u].clip(g[u])),k=l.value>s.max,c.resetZones&&0===e&&(e=void 0)}),this.clips=g)},invertGroups:function(t){function i(){l(["group","markerGroup"],function(e){o[e]&&(n.renderer.isVML&&o[e].attr({width:o.yAxis.len,height:o.xAxis.len}),o[e].width=o.yAxis.len,o[e].height=o.xAxis.len,o[e].invert(t))})}var s,o=this,n=o.chart;o.xAxis&&(s=e(n,"resize",i),e(o,"destroy",s),i(),o.invertGroups=i)},plotGroup:function(t,e,i,s,o){var n=this[t],r=!n;return r&&(this[t]=n=this.chart.renderer.g().attr({zIndex:s||.1}).add(o)),n.addClass("highcharts-"+e+" highcharts-series-"+this.index+" highcharts-"+this.type+"-series "+(h(this.colorIndex)?"highcharts-color-"+this.colorIndex+" ":"")+(this.options.className||"")+(n.hasClass("highcharts-tracker")?" highcharts-tracker":""),!0),n.attr({visibility:i})[r?"attr":"animate"](this.getPlotBox()),n},getPlotBox:function(){var t=this.chart,e=this.xAxis,i=this.yAxis;return t.inverted&&(e=i,i=this.xAxis),{translateX:e?e.left:t.plotLeft,translateY:i?i.top:t.plotTop,scaleX:1,scaleY:1}},render:function(){var t,e=this,s=e.chart,o=e.options,n=!!e.animate&&s.renderer.isSVG&&i(o.animation).duration,r=e.visible?"inherit":"hidden",a=o.zIndex,h=e.hasRendered,l=s.seriesGroup,c=s.inverted;t=e.plotGroup("group","series",r,a,l),e.markerGroup=e.plotGroup("markerGroup","markers",r,a,l),n&&e.animate(!0),t.inverted=!!e.isCartesian&&c,e.drawGraph&&(e.drawGraph(),e.applyZones()),e.drawDataLabels&&e.drawDataLabels(),e.visible&&e.drawPoints(),e.drawTracker&&!1!==e.options.enableMouseTracking&&e.drawTracker(),e.invertGroups(c),!1===o.clip||e.sharedClipKey||h||t.clip(s.clipRect),n&&e.animate(),h||(e.animationTimeout=w(function(){e.afterAnimate()},n)),e.isDirty=!1,e.hasRendered=!0,p(e,"afterRender")},redraw:function(){var t=this.chart,e=this.isDirty||this.isDirtyData,i=this.group,s=this.xAxis,o=this.yAxis;i&&(t.inverted&&i.attr({width:t.plotWidth,height:t.plotHeight}),i.animate({translateX:y(s&&s.left,t.plotLeft),translateY:y(o&&o.top,t.plotTop)})),this.translate(),this.render(),e&&delete this.kdTree},kdAxisArray:["clientX","plotY"],searchPoint:function(t,e){var i=this.xAxis,s=this.yAxis,o=this.chart.inverted;return this.searchKDTree({clientX:o?i.len-t.chartY+i.pos:t.chartX-i.pos,plotY:o?s.len-t.chartX+s.pos:t.chartY-s.pos},e)},buildKDTree:function(){this.buildingKdTree=!0;var t=this,e=-1(u=e[u]-p[u])?"left":"right",d=0>u?"right":"left",r[c]&&(g=(c=t(e,r[c],a+1,l))[n]a;)r--;this.updateParallelArrays(o,"splice",r,0,0),this.updateParallelArrays(o,r),d&&o.name&&(d[a]=o.name),p.splice(r,0,t),n&&(this.data.splice(r,0,null),this.processData()),"point"===h.legendType&&this.generatePoints(),i&&(l[0]&&l[0].remove?l[0].remove(!1):(l.shift(),this.updateParallelArrays(o,"shift"),p.shift())),this.isDirtyData=this.isDirty=!0,e&&c.redraw(s)},removePoint:function(t,e,i){var s=this,o=s.data,n=o[t],r=s.points,a=s.chart,h=function(){r&&r.length===o.length&&r.splice(t,1),o.splice(t,1),s.options.data.splice(t,1),s.updateParallelArrays(n||{series:s},"splice",t,1),n&&n.destroy(),s.isDirty=!0,s.isDirtyData=!0,e&&a.redraw()};k(i,a),e=x(e,!0),n?n.firePointEvent("remove",null,h):h()},remove:function(t,e,i){function s(){o.destroy(),o.remove=null,n.isDirtyLegend=n.isDirtyBox=!0,n.linkSeries(),x(t,!0)&&n.redraw(e)}var o=this,n=o.chart;!1!==i?c(o,"remove",null,s):s()},update:function(e,i){var s,o=this,n=o.chart,r=o.userOptions,h=o.oldType||o.type,p=e.type||r.type||n.options.chart.type,u=b[h].prototype,g=["group","markerGroup","dataLabelsGroup"],m=["navigatorSeries","baseSeries"],v=o.finishedAnimating&&{animation:!1},y=["data","name","turboThreshold"],k=t.keys(e),M=0t&&n>l?a=2*l-(n=Math.max(t,l)):ns&&a>l?n=2*l-(a=Math.max(s,l)):a=Math.abs(e)&&.5t.closestPointRange*t.xAxis.transA,r=(o=t.borderWidth=h(i.borderWidth,o?0:1),t.yAxis),a=i.threshold,c=t.translatedThreshold=r.getThreshold(a),d=h(i.minPointLength,5),p=t.getColumnMetrics(),u=p.width,g=t.barW=Math.max(u,1+2*o),f=t.pointXOffset=p.offset;e.inverted&&(c-=.5),i.pointPadding&&(g=Math.ceil(g)),l.prototype.translate.apply(t),s(t.points,function(i){var s,o=h(i.yBottom,c),l=999+Math.abs(o),p=u,m=(l=Math.min(Math.max(-l,i.plotY),r.len+l),i.plotX+f),x=g,v=Math.min(l,o),y=Math.max(l,o)-v;d&&Math.abs(y)d?o-d:c-(s?d:0)),n(i.options.pointWidth)&&(p=x=Math.ceil(i.options.pointWidth),m-=Math.round((p-u)/2)),i.barX=m,i.pointWidth=p,i.tooltipPos=e.inverted?[r.len+r.pos-e.plotLeft-l,t.xAxis.len-m-x/2,y]:[m+x/2,l+r.pos-e.plotTop,y],i.shapeType="rect",i.shapeArgs=t.crispCol.apply(t,i.isNull?[m,c,x,0]:[m,v,x,y])})},getSymbol:t.noop,drawLegendSymbol:t.LegendSymbolMixin.drawRectangle,drawGraph:function(){this.group[this.dense?"addClass":"removeClass"]("highcharts-dense-data")},pointAttribs:function(t,e){var s,o=this.options;s=(c=this.pointAttrToOptions||{}).stroke||"borderColor";var n=c["stroke-width"]||"borderWidth",r=t&&t.color||this.color,h=t&&t[s]||o[s]||this.color||r,l=t&&t[n]||o[n]||this[n]||0,c=o.dashStyle;return t&&this.zones.length&&(r=t.getZone(),r=t.options.color||r&&r.color||this.color),e&&(e=(t=a(o.states[e],t.options.states&&t.options.states[e]||{})).brightness,r=t.color||void 0!==e&&i(r).brighten(t.brightness).get()||r,h=t[s]||h,l=t[n]||l,c=t.dashStyle||c),s={fill:r,stroke:h,"stroke-width":l},c&&(s.dashstyle=c),s},drawPoints:function(){var t,e=this,i=this.chart,o=e.options,n=i.renderer,h=o.animationLimit||250;s(e.points,function(s){var l=s.graphic,c=l&&i.pointCount● {series.name}
',pointFormat:"x: {point.x}
y: {point.y}
"}},{sorted:!1,requireSorting:!1,noSharedTooltip:!0,trackerGroups:["group","markerGroup","dataLabelsGroup"],takeOrdinalPosition:!1,drawGraph:function(){this.options.lineWidth&&e.prototype.drawGraph.call(this)}})}(e),function(t){var e=t.deg2rad,i=t.isNumber,s=t.pick,o=t.relativeLength;t.CenteredSeriesMixin={getCenter:function(){var t,e,i=this.options,n=this.chart,r=2*(i.slicedOffset||0),a=n.plotWidth-2*r,h=(n=n.plotHeight-2*r,i.center),l=(h=[s(h[0],"50%"),s(h[1],"50%"),i.size||"100%",i.innerSize||0],Math.min(a,n));for(t=0;4>t;++t)e=h[t],i=2>t||2===t&&/%$/.test(e),h[t]=o(e,[a,n,l,h[2]][t])+(i?r:0);return h[3]>h[2]&&(h[3]=h[2]),h},getStartAndEndRadians:function(t,s){return t=i(t)?t:0,s=i(s)&&s>t&&360>s-t?s:t+360,{start:e*(t+-90),end:e*(s+-90)}}}}(e),function(t){var e=t.addEvent,i=t.CenteredSeriesMixin,s=t.defined,o=t.each,n=t.extend,r=i.getStartAndEndRadians,a=t.inArray,h=t.noop,l=t.pick,c=t.Point,d=t.Series,p=t.seriesType,u=t.setAnimation;p("pie","line",{center:[null,null],clip:!1,colorByPoint:!0,dataLabels:{allowOverlap:!0,distance:30,enabled:!0,formatter:function(){return this.point.isNull?void 0:this.point.name},x:0},ignoreHiddenPoint:!0,legendType:"point",marker:null,size:null,showInLegend:!1,slicedOffset:10,stickyTracking:!1,tooltip:{followPointer:!0},borderColor:"#ffffff",borderWidth:1,states:{hover:{brightness:.1}}},{isCartesian:!1,requireSorting:!1,directTouch:!0,noSharedTooltip:!0,trackerGroups:["group","dataLabelsGroup"],axisTypes:[],pointAttribs:t.seriesTypes.column.prototype.pointAttribs,animate:function(t){var e=this,i=e.points,s=e.startAngleRad;t||(o(i,function(t){var i=t.graphic,o=t.shapeArgs;i&&(i.attr({r:t.startR||e.center[3]/2,start:s,end:s}),i.animate({r:o.r,start:o.start,end:o.end},e.options.animation))}),e.animate=null)},updateTotals:function(){var t,e,i=0,s=this.points,o=s.length,n=this.options.ignoreHiddenPoint;for(t=0;t1.5*Math.PI?s-=2*Math.PI:s<-Math.PI/2&&(s+=2*Math.PI),a.slicedTranslation={translateX:Math.round(Math.cos(s)*c),translateY:Math.round(Math.sin(s)*c)},i=Math.cos(s)*t[2]/2,o=Math.sin(s)*t[2]/2,a.tooltipPos=[t[0]+.7*i,t[1]+.7*o],a.half=s<-Math.PI/2||s>Math.PI/2?1:0,a.angle=s,e=Math.min(d,a.labelDistance/5),a.labelPos=[t[0]+i+Math.cos(s)*a.labelDistance,t[1]+o+Math.sin(s)*a.labelDistance,t[0]+i+Math.cos(s)*e,t[1]+o+Math.sin(s)*e,t[0]+i,t[1]+o,0>a.labelDistance?"center":a.half?"right":"left",s]},drawGraph:null,drawPoints:function(){var t,e,i,s,r=this,a=r.chart.renderer,h=r.options.shadow;h&&!r.shadowGroup&&(r.shadowGroup=a.g("shadow").add(r.group)),o(r.points,function(o){if(e=o.graphic,o.isNull)e&&(o.graphic=e.destroy());else{s=o.shapeArgs,t=o.getTranslate();var l=o.shadowGroup;h&&!l&&(l=o.shadowGroup=a.g("shadow").add(r.shadowGroup)),l&&l.attr(t),i=r.pointAttribs(o,o.selected&&"select"),e?e.setRadialReference(r.center).attr(i).animate(n(s,t)):(o.graphic=e=a[o.shapeType](s).setRadialReference(r.center).attr(t).add(r.group),e.attr(i).attr({"stroke-linejoin":"round"}).shadow(h,l)),e.attr({visibility:o.visible?"inherit":"hidden"}),e.addClass(o.getClassName())}})},searchPoint:h,sortByAngle:function(t,e){t.sort(function(t,i){return void 0!==t.angle&&(i.angle-t.angle)*e})},drawLegendSymbol:t.LegendSymbolMixin.drawRectangle,getCenter:i.getCenter,getSymbol:h},{init:function(){c.prototype.init.apply(this,arguments);var t,i=this;return i.name=l(i.name,"Slice"),e(i,"select",t=function(t){i.slice("select"===t.type)}),e(i,"unselect",t),i},isValid:function(){return t.isNumber(this.y,!0)&&0<=this.y},setVisible:function(t,e){var i=this,s=i.series,n=s.chart,r=s.options.ignoreHiddenPoint;e=l(e,r),t!==i.visible&&(i.visible=i.options.visible=t=void 0===t?!i.visible:t,s.options.data[a(i,s.data)]=i.options,o(["graphic","dataLabel","connector","shadowGroup"],function(e){i[e]&&i[e][t?"show":"hide"](!0)}),i.legendItem&&n.legend.colorizeItem(i,t),t||"hover"!==i.state||i.setState(""),r&&(s.isDirty=!0),e&&n.redraw())},slice:function(t,e,i){var o=this.series;u(i,o.chart),l(e,!0),this.sliced=this.options.sliced=s(t)?t:!this.sliced,o.options.data[a(this,o.data)]=this.options,this.graphic.animate(this.getTranslate()),this.shadowGroup&&this.shadowGroup.animate(this.getTranslate())},getTranslate:function(){return this.sliced?this.slicedTranslation:{translateX:0,translateY:0}},haloPath:function(t){var e=this.shapeArgs;return this.sliced||!this.visible?[]:this.series.chart.renderer.symbols.arc(e.x,e.y,e.r+t,e.r+t,{innerR:this.shapeArgs.r-1,start:e.start,end:e.end})}})}(e),function(t){var e=t.addEvent,i=t.arrayMax,s=t.defined,o=t.each,n=t.extend,r=t.format,a=t.map,h=t.merge,l=t.noop,c=t.pick,d=t.relativeLength,p=t.Series,u=t.seriesTypes,g=t.some,f=t.stableSort,m=t.isArray,x=t.splat;t.distribute=function(e,i,s){function n(t,e){return t.target-e.target}var r,h,l=!0,d=e,p=[];h=0;var u=d.reducedLen||i;for(r=e.length;r--;)h+=e[r].size;if(h>u){for(f(e,function(t,e){return(e.rank||0)-(t.rank||0)}),h=r=0;h<=u;)h+=e[r].size,r++;p=e.splice(r-1,e.length)}for(f(e,n),e=a(e,function(t){return{size:t.size,targets:[t.target],align:c(t.align,.5)}});l;){for(r=e.length;r--;)l=e[r],h=(Math.min.apply(0,l.targets)+Math.max.apply(0,l.targets))/2,l.pos=Math.min(Math.max(0,h-l.size*l.align),i-l.size);for(r=e.length,l=!1;r--;)0e[r].pos&&(e[r-1].size+=e[r].size,e[r-1].targets=e[r-1].targets.concat(e[r].targets),e[r-1].align=.5,e[r-1].pos+e[r-1].size>i&&(e[r-1].pos=i-e[r-1].size),e.splice(r,1),l=!0)}d.push.apply(d,p),r=0,g(e,function(e){var n=0;if(g(e.targets,function(){if(d[r].pos=e.pos+n,Math.abs(d[r].pos-d[r].target)>s)return o(d.slice(0,r+1),function(t){delete t.pos}),d.reducedLen=(d.reducedLen||i)-.1*i,d.reducedLen>.1*i&&t.distribute(d,i,s),!0;n+=d[r].size,r++}))return!0}),f(d,n)},p.prototype.drawDataLabels=function(){function i(t,e){var i,s=[];if(m(t)&&!m(e))s=a(t,function(t){return h(t,e)});else if(m(e)&&!m(t))s=a(e,function(e){return h(t,e)});else if(m(t)||m(e))for(i=Math.max(t.length,e.length);i--;)s[i]=h(t[i],e[i]);else s=h(t,e);return s}var n,l,d=this,p=d.chart,u=d.options,g=u.dataLabels,f=d.points,v=d.hasRendered||0,y=c(g.defer,!!u.animation),b=p.renderer;g=i(i(p.options.plotOptions&&p.options.plotOptions.series&&p.options.plotOptions.series.dataLabels,p.options.plotOptions&&p.options.plotOptions[d.type]&&p.options.plotOptions[d.type].dataLabels),g);(m(g)||g.enabled||d._hasPointLabels)&&(l=d.plotGroup("dataLabelsGroup","data-labels",y&&!v?"hidden":"visible",g.zIndex||6),y&&(l.attr({opacity:+v}),v||e(d,"afterAnimate",function(){d.visible&&l.show(!0),l[u.animation?"animate":"attr"]({opacity:1},{duration:200})})),o(f,function(e){n=x(i(g,e.dlOptions||e.options&&e.options.dataLabels)),o(n,function(i,o){var n,a,h,g,f=i.enabled&&!e.isNull&&function(t,e){var i=e.filter;return!i||(e=i.operator,t=t[i.property],i=i.value,">"===e&&t>i||"<"===e&&t="===e&&t>=i||"<="===e&&t<=i||"=="===e&&t==i||"==="===e&&t===i)}(e,i),m=e.dataLabels?e.dataLabels[o]:e.dataLabel,x=e.connectors?e.connectors[o]:e.connector,v=!m;f&&(n=e.getLabelConfig(),a=i[e.formatPrefix+"Format"]||i.format,n=s(a)?r(a,n,p.time):(i[e.formatPrefix+"Formatter"]||i.formatter).call(n,i),a=i.style,h=i.rotation,a.color=c(i.color,a.color,d.color,"#000000"),"contrast"===a.color&&(e.contrastColor=b.getContrast(e.color||d.color),a.color=i.inside||0>c(i.distance,e.labelDistance)||u.stacking?e.contrastColor:"#000000"),u.cursor&&(a.cursor=u.cursor),g={fill:i.backgroundColor,stroke:i.borderColor,"stroke-width":i.borderWidth,r:i.borderRadius||0,rotation:h,padding:i.padding,zIndex:1},t.objectEach(g,function(t,e){void 0===t&&delete g[e]})),!m||f&&s(n)?f&&s(n)&&(m?g.text=n:(e.dataLabels=e.dataLabels||[],m=e.dataLabels[o]=h?b.text(n,0,-9999).addClass("highcharts-data-label"):b.label(n,0,-9999,i.shape,null,null,i.useHTML,null,"data-label"),o||(e.dataLabel=m),m.addClass(" highcharts-data-label-color-"+e.colorIndex+" "+(i.className||"")+(i.useHTML?" highcharts-tracker":""))),m.options=i,m.attr(g),m.css(a).shadow(i.shadow),m.added||m.add(l),d.alignDataLabel(e,m,i,null,v)):(e.dataLabel=e.dataLabel.destroy(),e.dataLabels&&(1===e.dataLabels.length?delete e.dataLabels:delete e.dataLabels[o]),o||delete e.dataLabel,x&&(e.connector=e.connector.destroy(),e.connectors&&(1===e.connectors.length?delete e.connectors:delete e.connectors[o])))})})),t.fireEvent(this,"afterDrawDataLabels")},p.prototype.alignDataLabel=function(t,e,i,s,o){var r,a=this.chart,h=a.inverted,l=c(t.dlBox&&t.dlBox.centerX,t.plotX,-9999),d=c(t.plotY,-9999),p=e.getBBox(),u=i.rotation,g=i.align,f=this.visible&&(t.series.forceDL||a.isInsidePlot(l,Math.round(d),h)||s&&a.isInsidePlot(l,h?s.x+1:s.y+s.height-1,h)),m="justify"===c(i.overflow,"justify");f&&(r=i.style.fontSize,r=a.renderer.fontMetrics(r,e).b,s=n({x:h?this.yAxis.len-d:l,y:Math.round(h?this.xAxis.len-l:d),width:0,height:0},s),n(i,{width:p.width,height:p.height}),u?(m=!1,l=a.renderer.rotCorr(r,u),l={x:s.x+i.x+s.width/2+l.x,y:s.y+i.y+{top:0,middle:.5,bottom:1}[i.verticalAlign]*s.height},e[o?"attr":"animate"](l).attr({align:g}),d=180<(d=(u+720)%360)&&360>d,"left"===g?l.y-=d?p.height:0:"center"===g?(l.x-=p.width/2,l.y-=p.height/2):"right"===g&&(l.x-=p.width,l.y-=d?0:p.height),e.placed=!0,e.alignAttr=l):(e.align(i,null,s),l=e.alignAttr),m&&0<=s.height?t.isLabelJustified=this.justifyDataLabel(e,i,l,p,s,o):c(i.crop,!0)&&(f=a.isInsidePlot(l.x,l.y)&&a.isInsidePlot(l.x+p.width,l.y+p.height)),i.shape&&!u)&&e[o?"attr":"animate"]({anchorX:h?a.plotWidth-t.plotY:t.plotX,anchorY:h?a.plotHeight-t.plotX:t.plotY}),f||(e.attr({y:-9999}),e.placed=!1)},p.prototype.justifyDataLabel=function(t,e,i,s,o,n){var r,a,h=this.chart,l=e.align,c=e.verticalAlign,d=t.box?0:t.padding||0;return 0>(r=i.x+d)&&("right"===l?e.align="left":e.x=-r,a=!0),(r=i.x+s.width-d)>h.plotWidth&&("left"===l?e.align="right":e.x=h.plotWidth-r,a=!0),0>(r=i.y+d)&&("bottom"===c?e.verticalAlign="top":e.y=-r,a=!0),(r=i.y+s.height-d)>h.plotHeight&&("top"===c?e.verticalAlign="bottom":e.y=h.plotHeight-r,a=!0),a&&(t.placed=!n,t.align(e,null,o)),a},u.pie&&(u.pie.prototype.drawDataLabels=function(){var e,n,r,a,h,l,d,u,g,f,m=this,x=m.data,v=m.chart,y=m.options.dataLabels,b=c(y.connectorPadding,10),k=c(y.connectorWidth,1),M=v.plotWidth,w=v.plotHeight,S=Math.round(v.chartWidth/3),A=m.center,T=A[2]/2,P=A[1],C=[[],[]],L=[0,0,0,0];m.visible&&(y.enabled||m._hasPointLabels)&&(o(x,function(t){t.dataLabel&&t.visible&&t.dataLabel.shortened&&(t.dataLabel.attr({width:"auto"}).css({width:"auto",textOverflow:"clip"}),t.dataLabel.shortened=!1)}),p.prototype.drawDataLabels.apply(m),o(x,function(t){t.dataLabel&&(t.visible?(C[t.half].push(t),t.dataLabel._pos=null,!s(y.style.width)&&!s(t.options.dataLabels&&t.options.dataLabels.style&&t.options.dataLabels.style.width)&&t.dataLabel.getBBox().width>S&&(t.dataLabel.css({width:.7*S}),t.dataLabel.shortened=!0)):(t.dataLabel=t.dataLabel.destroy(),t.dataLabels&&1===t.dataLabels.length&&delete t.dataLabels))}),o(C,function(i,n){var p,x,k,S=i.length,C=[];if(S)for(m.sortByAngle(i,n-.5),0e.bottom-2?p:u,n,e),r._attr={visibility:g,align:h[6]},r._pos={x:d+y.x+({left:b,right:-b}[h[6]]||0),y:u+y.y-10},h.x=d,h.y=u,c(y.crop,!0)&&(a=r.getBBox().width,p=null,d-aM-b&&0===n&&(p=Math.round(d+a-M+b),L[1]=Math.max(p,L[1])),0>u-l/2?L[0]=Math.max(Math.round(l/2-u),L[0]):u+l/2>w&&(L[2]=Math.max(Math.round(u+l/2-w),L[2])),r.sideOverflow=p)}),0===i(L)||this.verifyDataLabelOverflow(L))&&(this.placeDataLabels(),k&&o(this.points,function(t){var e;n=t.connector,(r=t.dataLabel)&&r._pos&&t.visible&&0c(this.translatedThreshold,r.yAxis.len)),d=c(i.inside,!!this.options.stacking);a&&(0>(s=h(a)).y&&(s.height+=s.y,s.y=0),0<(a=s.y+s.height-r.yAxis.len)&&(s.height-=a),n&&(s={x:r.yAxis.len-s.y-s.height,y:r.xAxis.len-s.x-s.width,width:s.height,height:s.width}),d||(n?(s.x+=l?0:s.width,s.width=0):(s.y+=l?s.height:0,s.height=0))),i.align=c(i.align,!n||d?"center":l?"right":"left"),i.verticalAlign=c(i.verticalAlign,n||d?"middle":l?"top":"bottom"),p.prototype.alignDataLabel.call(this,t,e,i,s,o),t.isLabelJustified&&t.contrastColor&&e.css({color:t.contrastColor})})}(e),function(t){var e=t.Chart,i=t.each,s=t.isArray,o=t.objectEach,n=t.pick;(t=t.addEvent)(e,"render",function(){var t=[];i(this.labelCollectors||[],function(e){t=t.concat(e())}),i(this.yAxis||[],function(e){e.options.stackLabels&&!e.options.stackLabels.allowOverlap&&o(e.stacks,function(e){o(e,function(e){t.push(e.label)})})}),i(this.series||[],function(e){var o=e.options.dataLabels;e.visible&&(!1!==o.enabled||e._hasPointLabels)&&i(e.points,function(e){if(e.visible){var o=s(e.dataLabels)?e.dataLabels:e.dataLabel?[e.dataLabel]:[];i(o,function(i){var s=i.options;i.labelrank=n(s.labelrank,e.labelrank,e.shapeArgs&&e.shapeArgs.height),s.allowOverlap||t.push(i)})}})}),this.hideOverlappingLabels(t)}),e.prototype.hideOverlappingLabels=function(t){var e,s,o,n,r,a,h=t.length,l=this.renderer,c=function(t,e,i,s,o,n,r,a){return!(o>t+i||o+re+s||n+athis.pointCount))},pan:function(t,e){var i,s=this,o=s.hoverPoints;o&&h(o,function(t){t.setState()}),h("xy"===e?[1,0]:[1],function(e){var o,n=(e=s[e?"xAxis":"yAxis"][0]).horiz,r=t[n?"chartX":"chartY"],a=s[n=n?"mouseDownX":"mouseDownY"],h=(e.pointRange||0)/2,l=e.reversed&&!s.inverted||!e.reversed&&s.inverted?-1:1,c=e.getExtremes(),d=e.toValue(a-r,!0)+h*l;a=(o=(l=e.toValue(a+e.len-r,!0)-h*l)=r(i.minWidth,0)&&this.chartHeight>=r(i.minHeight,0)}).call(this)&&e.push(t._id)},e.prototype.currentOptions=function(e){var i={};return function e(i,r,h,l){var c;t.objectEach(i,function(t,i){if(!l&&-1r.length||void 0===i)return t.call(this,e,i,s,o);for(u=r.length,l=0;ls,r[l]5*a||g){if(r[l]>v){for(d=t.call(this,e,r[f],r[l],o);d.length&&d[0]<=v;)d.shift();d.length&&(v=d[d.length-1]),x=x.concat(d)}f=l+1}if(g)break}if(t=d.info,h&&t.unitRange<=c.hour){for(l=x.length-1,f=1;fs?b-1:b,k=void 0;h--;)f=l[h],s=Math.abs(k-f),k&&s<.8*y&&(null===p||s<.8*p)?(m[x[h]]&&!m[x[h+1]]?(s=h+1,k=f):s=h,x.splice(s,1)):k=f}return x}),a(i.prototype,{beforeSetTickPositions:function(){var t,e,i,s,o,a=[],h=!1,c=(u=this.getExtremes()).min,d=u.max,p=this.isXAxis&&!!this.options.breaks,u=this.options.ordinal,g=Number.MAX_VALUE,f=this.chart.options.chart.ignoreHiddenSeries;if(i="highcharts-navigator-xaxis"===this.options.className,!this.options.overscroll||this.max!==this.dataMax||this.chart.mouseIsDown&&!i||this.eventArgs&&(!this.eventArgs||"navigator"===this.eventArgs.trigger)||(this.max+=this.options.overscroll,!i&&n(this.userMin)&&(this.min+=this.options.overscroll)),u||p){if(r(this.series,function(i,s){if(e=[],!(f&&!1===i.visible||!1===i.takeOrdinalPosition&&!p)&&(a=a.concat(i.processedXData),t=a.length,a.sort(function(t,e){return t-e}),g=Math.min(g,l(i.closestPointRange,g)),t)){for(s=0;si||d-a[a.length-1]>i)&&(h=!0)}else this.options.overscroll&&(2===t?g=a[1]-a[0]:1===t?(g=this.options.overscroll,a=[a[0],a[0]+g]):g=this.overscrollPointsRange);h?(this.options.overscroll&&(this.overscrollPointsRange=g,a=a.concat(this.getOverscrollPositions())),this.ordinalPositions=a,i=this.ordinal2lin(Math.max(c,a[0]),!0),s=Math.max(this.ordinal2lin(Math.min(d,a[a.length-1]),!0),1),this.ordinalSlope=d=(d-c)/(s-i),this.ordinalOffset=c-i*d):(this.overscrollPointsRange=l(this.closestPointRange,this.overscrollPointsRange),this.ordinalPositions=this.ordinalSlope=this.ordinalOffset=void 0)}this.isOrdinal=u&&h,this.groupIntervalFactor=null},val2lin:function(t,e){var i=this.ordinalPositions;if(i){var s,o,n=i.length;for(s=n;s--;)if(i[s]===t){o=s;break}for(s=n-1;s--;)if(t>i[s]||0===s){o=s+(t=(t-i[s])/(i[s+1]-i[s]));break}e=e?o:this.ordinalSlope*(o||0)+this.ordinalOffset}else e=t;return e},lin2val:function(t,e){var i=this.ordinalPositions;if(i){var s,o=this.ordinalSlope,n=this.ordinalOffset,r=i.length-1;if(e)0>t?t=i[0]:t>r?t=i[r]:s=t-(r=Math.floor(t));else for(;r--;)if(t>=(e=o*r+n)){s=(t-e)/((o=o*(r+1)+n)-e);break}return void 0!==s&&void 0!==i[r]?i[r]+(s?s*(i[r+1]-i[r]):0):t}return t},getExtendedPositions:function(){var t,e,s=this,o=s.chart,n=s.series[0].currentDataGrouping,a=s.ordinalIndex,l=n?n.count+n.unitName:"raw",c=s.options.overscroll,d=s.getExtremes();return a||(a=s.ordinalIndex={}),a[l]||(t={series:[],chart:o,getExtremes:function(){return{min:d.dataMin,max:d.dataMax+c}},options:{ordinal:!0},val2lin:i.prototype.val2lin,ordinal2lin:i.prototype.ordinal2lin},r(s.series,function(i){(e={xAxis:t,xData:i.xData.slice(),chart:o,destroyGroupedData:h}).xData=e.xData.concat(s.getOverscrollPositions()),e.options={dataGrouping:n?{enabled:!0,forced:!0,approximation:"open",units:[[n.unitName,[n.count]]]}:{enabled:!1}},i.processData.apply(e),t.series.push(e)}),s.beforeSetTickPositions.apply(t),a[l]=t.ordinalPositions),a[l]},getOverscrollPositions:function(){var e=this.options.overscroll,i=this.overscrollPointsRange,s=[],o=this.dataMax;if(t.defined(i))for(s.push(o);o<=this.dataMax+e;)o+=i,s.push(o);return s},getGroupIntervalFactor:function(t,e,i){var s,o=(i=i.processedXData).length,n=[];if(!(s=this.groupIntervalFactor)){for(s=0;sl?(g=m,h=i.ordinalPositions?i:m):(g=i.ordinalPositions?i:m,h=m),d>(m=h.ordinalPositions)[m.length-1]&&m.push(d),this.fixedRange=u-p,(l=i.toFixedRange(null,null,f.apply(g,[x.apply(g,[p,!0])+l,!0]),f.apply(h,[x.apply(h,[u,!0])+l,!0]))).min>=Math.min(c.dataMin,p)&&l.max<=Math.max(d,u)+s&&i.setExtremes(l.min,l.max,!0,!1,{trigger:"pan"}),this.mouseDownX=n,o(this.container,{cursor:"move"})):a=!0}else a=!0;a&&(s&&(i.max=i.dataMax+s),t.apply(this,Array.prototype.slice.call(arguments,1)))})}(e),function(t){function e(t){t.apply(this),this.drawBreaks(this.xAxis,["x"]),this.drawBreaks(this.yAxis,s(this.pointArrayMap,["y"]))}var i=t.addEvent,s=t.pick,o=t.wrap,n=t.each,r=t.extend,a=t.isArray,h=t.fireEvent,l=t.Axis,c=t.Series;r(l.prototype,{isInBreak:function(t,e){var i=t.repeat||1/0,s=t.from,o=t.to-t.from;return e=e>=s?(e-s)%i:i-(s-e)%i,t.inclusive?e<=o:e=t)break;if(o.isInBreak(e,t)){s-=t-e.from;break}}return s}var o=this,r=a(t)&&!!t.length;o.isDirty=o.isBroken!==r,o.isBroken=r,o.options.breaks=o.userOptions.breaks=t,o.forceRedraw=!0,r||o.val2lin!==i||(delete o.val2lin,delete o.lin2val),r&&(o.userOptions.ordinal=!1,o.val2lin=i,o.lin2val=function(t){var e,i;for(i=0;i=t);i++)e.tou;)r-=i;for(;re.to||o>e.from&&ae.from&&ae.from&&a>e.to&&ai&&(i=e);o--;)s[o+1].x-s[o].x>i&&(e=(s[o].x+s[o+1].x)/2,s.splice(o+1,0,{isNull:!0,x:e}),this.options.stacking&&((e=n.stacks[this.stackKey][e]=new t.StackItem(n,n.options.stackLabels,!1,e,this.stack)).total=0));return this.getGraphPath(s)},o(t.seriesTypes.column.prototype,"drawPoints",e),o(t.Series.prototype,"drawPoints",e)}(e),function(t){var e=t.addEvent,i=t.arrayMax,s=t.arrayMin,o=t.Axis,n=t.defaultPlotOptions,r=t.defined,a=t.each,h=t.extend,l=t.format,c=t.isNumber,d=t.merge,p=t.pick,u=t.Point,g=t.Series,f=t.Tooltip,m=t.wrap,x=g.prototype,v=x.processData,y=x.generatePoints,b={approximation:"average",groupPixelWidth:2,dateTimeLabelFormats:{millisecond:["%A, %b %e, %H:%M:%S.%L","%A, %b %e, %H:%M:%S.%L","-%H:%M:%S.%L"],second:["%A, %b %e, %H:%M:%S","%A, %b %e, %H:%M:%S","-%H:%M:%S"],minute:["%A, %b %e, %H:%M","%A, %b %e, %H:%M","-%H:%M"],hour:["%A, %b %e, %H:%M","%A, %b %e, %H:%M","-%H:%M"],day:["%A, %b %e, %Y","%A, %b %e","-%A, %b %e, %Y"],week:["Week from %A, %b %e, %Y","%A, %b %e","-%A, %b %e, %Y"],month:["%B %Y","%B","-%B %Y"],year:["%Y","%Y","-%Y"]}},k={line:{},spline:{},area:{},areaspline:{},column:{approximation:"sum",groupPixelWidth:10},arearange:{approximation:"range"},areasplinerange:{approximation:"range"},columnrange:{approximation:"range",groupPixelWidth:10},candlestick:{approximation:"ohlc",groupPixelWidth:10},ohlc:{approximation:"ohlc",groupPixelWidth:5}},M=t.defaultDataGroupingUnits=[["millisecond",[1,2,5,10,20,25,50,100,200,500]],["second",[1,2,5,10,15,30]],["minute",[1,2,5,10,15,30]],["hour",[1,2,3,4,6,8,12]],["day",[1]],["week",[1]],["month",[1,3,6]],["year",null]],w=t.approximations={sum:function(t){var e,i=t.length;if(!i&&t.hasNulls)e=null;else if(i)for(e=0;i--;)e+=t[i];return e},average:function(t){var e=t.length;return t=w.sum(t),c(t)&&e&&(t/=e),t},averages:function(){var t=[];return a(arguments,function(e){t.push(w.average(e))}),void 0===t[0]?void 0:t},open:function(t){return t.length?t[0]:t.hasNulls?null:void 0},high:function(t){return t.length?i(t):t.hasNulls?null:void 0},low:function(t){return t.length?s(t):t.hasNulls?null:void 0},close:function(t){return t.length?t[t.length-1]:t.hasNulls?null:void 0},ohlc:function(t,e,i,s){if(t=w.open(t),e=w.high(e),i=w.low(i),s=w.close(s),c(t)||c(e)||c(i)||c(s))return[t,e,i,s]},range:function(t,e){return t=w.low(t),e=w.high(e),c(t)||c(e)?[t,e]:null===t&&null===e?null:void 0}};x.groupData=function(t,e,i,s){var o,n,h=this,l=h.data,p=h.options.data,u=[],g=[],f=[],m=t.length,x=!!e,v=[];s="function"==typeof s?s:w[s]||k[h.type]&&w[k[h.type].approximation]||w[b.approximation];var y,M,S=h.pointArrayMap,A=S&&S.length,T=["x"].concat(S||["y"]),P=0,C=0;for(A?a(S,function(){v.push([])}):v.push([]),y=A||1,M=0;M<=m&&!(t[M]>=i[0]);M++);for(;M<=m;M++){for(;void 0!==i[P+1]&&t[M]>=i[P+1]||M===m;){for(o=i[P],h.dataGroupInfo={start:C,length:v[0].length},n=s.apply(h,v),r(h.dataGroupInfo.options)||(h.dataGroupInfo.options=d(h.pointClass.prototype.optionsToObject.call({series:h},h.options.data[C])),a(T,function(t){delete h.dataGroupInfo.options[t]})),void 0!==n&&(u.push(o),g.push(n),f.push(h.dataGroupInfo)),C=M,o=0;othis.chart.plotSizeX/o||s&&e.forced)&&(n=!0);return n?o:0},o.prototype.setDataGrouping=function(t,e){var i;if(e=p(e,!0),t||(t={forced:!1,units:null}),this instanceof o)for(i=this.series.length;i--;)this.series[i].update({dataGrouping:t},!1);else a(this.chart.options.series,function(e){e.dataGrouping=t},!1);this.ordinalSlope=null,e&&this.chart.redraw()}}(e),function(t){var e=t.each,i=t.Point,s=t.seriesType,o=t.seriesTypes;s("ohlc","column",{lineWidth:1,tooltip:{pointFormat:'● {series.name}
Open: {point.open}
High: {point.high}
Low: {point.low}
Close: {point.close}
'},threshold:null,states:{hover:{lineWidth:3}},stickyTracking:!0},{directTouch:!1,pointArrayMap:["open","high","low","close"],toYData:function(t){return[t.open,t.high,t.low,t.close]},pointValKey:"close",pointAttrToOptions:{stroke:"color","stroke-width":"lineWidth"},init:function(){o.column.prototype.init.apply(this,arguments),this.options.stacking=!1},pointAttribs:function(t,e){e=o.column.prototype.pointAttribs.call(this,t,e);var i=this.options;return delete e.fill,!t.options.color&&i.upColor&&t.opens&&(e-=Math.round((o-s)/2),s=o),e=p[t](e,i,s,o),r&&n&&(e.push("M","circle"===t?e[1]-e[4]:e[1]+e[4]/2,i>n?i:i+o,"L",r,n),e=e.concat(p.circle(r-1,n-1,2,2))),e}}var s=t.addEvent,o=t.each,n=t.merge,r=t.noop,a=t.Renderer,h=t.Series,l=t.seriesType,c=t.TrackerMixin,d=t.VMLRenderer,p=t.SVGRenderer.prototype.symbols;l("flags","column",{pointRange:0,allowOverlapX:!1,shape:"flag",stackDistance:12,textAlign:"center",tooltip:{pointFormat:"{point.text}
"},threshold:null,y:-30,fillColor:"#ffffff",lineWidth:1,states:{hover:{lineColor:"#000000",fillColor:"#ccd6eb"}},style:{fontSize:"11px",fontWeight:"bold"}},{sorted:!1,noSharedTooltip:!0,allowDG:!1,takeOrdinalPosition:!1,trackerGroups:["markerGroup"],forceCrop:!0,init:h.prototype.init,pointAttribs:function(t,e){var i=this.options,s=t&&t.color||this.color,o=i.lineColor,n=t&&t.lineWidth;return t=t&&t.fillColor||i.fillColor,e&&(t=i.states[e].fillColor,o=i.states[e].lineColor,n=i.states[e].lineWidth),{fill:t||s,stroke:o||s,"stroke-width":n||i.lineWidth||0}},translate:e.translate,getPlotBox:e.getPlotBox,drawPoints:function(){var e,i,s,r,a,h,l,c,d=this.points,p=this.chart,u=p.renderer,g=p.inverted,f=this.options,m=f.y,x=this.yAxis,v={},y=[];for(r=d.length;r--;)a=d[r],c=(g?a.plotY:a.plotX)>this.xAxis.len,e=a.plotX,h=a.stackIndex,s=a.options.shape||f.shape,void 0!==(i=a.plotY)&&(i=a.plotY+m-(void 0!==h&&h*f.stackDistance)),a.anchorX=h?void 0:a.plotX,l=h?void 0:a.plotY,h=a.graphic,void 0!==i&&0<=e&&!c?(h||(h=a.graphic=u.label("",null,null,s,null,null,f.useHTML).attr(this.pointAttribs(a)).css(n(f.style,a.style)).attr({align:"flag"===s?"left":"center",width:f.width,height:f.height,"text-align":f.textAlign}).addClass("highcharts-point").add(this.markerGroup),a.graphic.div&&(a.graphic.div.point=a),h.shadow(f.shadow),h.isNew=!0),0u))););e(p,function(t,e){var s;t.plotX+=k,(void 0===t.plotY||v)&&(0<=t.plotX&&t.plotX<=y.len?v?(t.plotY=y.translate(t.x,0,1,0,1),t.plotX=i(t.y)?b.translate(t.y,0,0,0,1):0):t.plotY=d.chartHeight-y.bottom-(y.opposite?y.height:0)+y.offset-b.top:t.shapeArgs={}),(n=p[e-1])&&n.plotX===t.plotX&&(void 0===n.stackIndex&&(n.stackIndex=0),s=n.stackIndex+1),t.stackIndex=s}),this.onSeries=g}}}(e)),function(t){function e(t,e,i){this.init(t,e,i)}var i,s=t.addEvent,o=t.Axis,n=t.correctFloat,r=t.defaultOptions,a=t.defined,h=t.destroyObjectProperties,l=t.each,c=t.fireEvent,d=t.hasTouch,p=t.merge,u=t.pick,g=t.removeEvent,f={height:t.isTouchDevice?20:14,barBorderRadius:0,buttonBorderRadius:0,liveRedraw:void 0,margin:10,minWidth:6,step:.2,zIndex:3,barBackgroundColor:"#cccccc",barBorderWidth:1,barBorderColor:"#cccccc",buttonArrowColor:"#333333",buttonBackgroundColor:"#e6e6e6",buttonBorderColor:"#cccccc",buttonBorderWidth:1,rifleColor:"#333333",trackBackgroundColor:"#f2f2f2",trackBorderColor:"#f2f2f2",trackBorderWidth:1};r.scrollbar=p(!0,f,r.scrollbar),t.swapXY=i=function(t,e){var i,s=t.length;if(e)for(e=0;e=s?this.scrollbarRifles.hide():this.scrollbarRifles.show(!0),!1===o.showFull&&(0>=t&&1<=e?this.group.hide():this.group.show()),this.rendered=!0)},initEvents:function(){var t=this;t.mouseMoveHandler=function(e){var i=t.chart.pointer.normalize(e),s=t.options.vertical?"chartY":"chartX",o=t.initPositions;!t.grabbedCenter||e.touches&&0===e.touches[0][s]||(s=(i=t.cursorToScrollbarPosition(i)[s])-(s=t[s]),t.hasDragged=!0,t.updatePosition(o[0]+s,o[1]+s),t.hasDragged&&c(t,"changed",{from:t.from,to:t.to,trigger:"scrollbar",DOMType:e.type,DOMEvent:e}))},t.mouseUpHandler=function(e){t.hasDragged&&c(t,"changed",{from:t.from,to:t.to,trigger:"scrollbar",DOMType:e.type,DOMEvent:e}),t.grabbedCenter=t.hasDragged=t.chartX=t.chartY=null},t.mouseDownHandler=function(e){e=t.chart.pointer.normalize(e),e=t.cursorToScrollbarPosition(e),t.chartX=e.chartX,t.chartY=e.chartY,t.initPositions=[t.from,t.to],t.grabbedCenter=!0},t.buttonToMinClick=function(e){var i=n(t.to-t.from)*t.options.step;t.updatePosition(n(t.from-i),n(t.to-i)),c(t,"changed",{from:t.from,to:t.to,trigger:"scrollbar",DOMEvent:e})},t.buttonToMaxClick=function(e){var i=(t.to-t.from)*t.options.step;t.updatePosition(t.from+i,t.to+i),c(t,"changed",{from:t.from,to:t.to,trigger:"scrollbar",DOMEvent:e})},t.trackClick=function(e){var i=t.chart.pointer.normalize(e),s=t.to-t.from,o=t.y+t.scrollbarTop,n=t.x+t.scrollbarLeft;t.options.vertical&&i.chartY>o||!t.options.vertical&&i.chartX>n?t.updatePosition(t.from+s,t.to+s):t.updatePosition(t.from-s,t.to-s),c(t,"changed",{from:t.from,to:t.to,trigger:"scrollbar",DOMEvent:e})}},cursorToScrollbarPosition:function(t){var e=(e=this.options).minWidth>this.calculatedWidth?e.minWidth:0;return{chartX:(t.chartX-this.x-this.xOffset)/(this.barWidth-e),chartY:(t.chartY-this.y-this.yOffset)/(this.barWidth-e)}},updatePosition:function(t,e){1t&&(e=n(e-t),t=0),this.from=t,this.to=e},update:function(t){this.destroy(),this.init(this.chart.renderer,p(!0,this.options,t),this.chart)},addEvents:function(){var t=this.options.inverted?[1,0]:[0,1],e=this.scrollbarButtons,i=this.scrollbarGroup.element,o=this.mouseDownHandler,n=this.mouseMoveHandler,r=this.mouseUpHandler;t=[[e[t[0]].element,"click",this.buttonToMinClick],[e[t[1]].element,"click",this.buttonToMaxClick],[this.track.element,"click",this.trackClick],[i,"mousedown",o],[i.ownerDocument,"mousemove",n],[i.ownerDocument,"mouseup",r]];d&&t.push([i,"touchstart",o],[i.ownerDocument,"touchmove",n],[i.ownerDocument,"touchend",r]),l(t,function(t){s.apply(null,t)}),this._events=t},removeEvents:function(){l(this._events,function(t){g.apply(null,t)}),this._events.length=0},destroy:function(){var t=this.chart.scroller;this.removeEvents(),l(["track","scrollbarRifles","scrollbar","scrollbarGroup","group"],function(t){this[t]&&this[t].destroy&&(this[t]=this[t].destroy())},this),t&&this===t.scrollbar&&(t.scrollbar=null,h(t.scrollbarButtons))}},s(o,"afterInit",function(){var t=this;t.options&&t.options.scrollbar&&t.options.scrollbar.enabled&&(t.options.scrollbar.vertical=!t.horiz,t.options.startOnTick=t.options.endOnTick=!1,t.scrollbar=new e(t.chart.renderer,t.options.scrollbar,t.chart),s(t.scrollbar,"changed",function(e){var i,s=Math.min(u(t.options.min,t.min),t.min,t.dataMin),o=Math.max(u(t.options.max,t.max),t.max,t.dataMax)-s;t.horiz&&!t.reversed||!t.horiz&&t.reversed?(i=s+o*this.to,s+=o*this.from):(i=s+o*(1-this.from),s+=o*(1-this.to)),t.setExtremes(s,i,!0,!1,e)}))}),s(o,"afterRender",function(){var t=Math.min(u(this.options.min,this.min),this.min,u(this.dataMin,this.min)),e=Math.max(u(this.options.max,this.max),this.max,u(this.dataMax,this.max)),i=this.scrollbar,s=this.titleOffset||0;i&&(this.horiz?(i.position(this.left,this.top+this.height+2+this.chart.scrollbarsOffsets[1]+(this.opposite?0:s+this.axisTitleMargin+this.offset),this.width,this.height),s=1):(i.position(this.left+this.width+2+this.chart.scrollbarsOffsets[0]+(this.opposite?s+this.axisTitleMargin+this.offset:0),this.top,this.width,this.height),s=0),(!this.opposite&&!this.horiz||this.opposite&&this.horiz)&&(this.chart.scrollbarsOffsets[s]+=this.scrollbar.size+this.scrollbar.options.margin),isNaN(t)||isNaN(e)||!a(this.min)||!a(this.max)?i.setRange(0,0):(s=(this.min-t)/(e-t),t=(this.max-t)/(e-t),this.horiz&&!this.reversed||!this.horiz&&this.reversed?i.setRange(s,t):i.setRange(1-t,1-s)))}),s(o,"afterGetOffset",function(){var t=this.horiz?2:1,e=this.scrollbar;e&&(this.chart.scrollbarsOffsets=[0,0],this.chart.axisOffset[t]+=e.size+e.options.margin)}),t.Scrollbar=e}(e),function(t){function e(t){this.init(t)}var i=t.addEvent,s=t.Axis,o=t.Chart,n=t.color,r=t.defaultOptions,a=t.defined,h=t.destroyObjectProperties,l=t.each,c=t.erase,d=t.error,p=t.extend,u=t.grep,g=t.hasTouch,f=t.isArray,m=t.isNumber,x=t.isObject,v=t.isTouchDevice,y=t.merge,b=t.pick,k=t.removeEvent,M=t.Scrollbar,w=t.Series,S=t.seriesTypes,A=t.wrap,T=[].concat(t.defaultDataGroupingUnits),P=function(t){var e=u(arguments,m);if(e.length)return Math[t].apply(0,e)};T[4]=["day",[1,2,3,4]],T[5]=["week",[1,2,3]],S=void 0===S.areaspline?"line":"areaspline",p(r,{navigator:{height:40,margin:25,maskInside:!0,handles:{width:7,height:15,symbols:["navigator-handle","navigator-handle"],enabled:!0,lineWidth:1,backgroundColor:"#f2f2f2",borderColor:"#999999"},maskFill:n("#6685c2").setOpacity(.3).get(),outlineColor:"#cccccc",outlineWidth:1,series:{type:S,fillOpacity:.05,lineWidth:1,compare:null,dataGrouping:{approximation:"average",enabled:!0,groupPixelWidth:2,smoothed:!0,units:T},dataLabels:{enabled:!1,zIndex:2},id:"highcharts-navigator-series",className:"highcharts-navigator-series",lineColor:null,marker:{enabled:!1},pointRange:0,threshold:null},xAxis:{overscroll:0,className:"highcharts-navigator-xaxis",tickLength:0,lineWidth:0,gridLineColor:"#e6e6e6",gridLineWidth:1,tickPixelInterval:200,labels:{align:"left",style:{color:"#999999"},x:3,y:-4},crosshair:!1},yAxis:{className:"highcharts-navigator-yaxis",gridLineWidth:0,startOnTick:!1,endOnTick:!1,minPadding:.1,maxPadding:.1,labels:{enabled:!1},crosshair:!1,title:{text:null},tickLength:0,tickWidth:0}}}),t.Renderer.prototype.symbols["navigator-handle"]=function(t,e,i,s,o){return t=o.width/2,e=Math.round(t/3)+.5,["M",-t-1,.5,"L",t,.5,"L",t,(o=o.height)+.5,"L",-t-1,o+.5,"L",-t-1,.5,"M",-e,4,"L",-e,o-3,"M",e-1,4,"L",e-1,o-3]},e.prototype={drawHandle:function(t,e,i,s){var o=this.navigatorOptions.handles.height;this.handles[e][s](i?{translateX:Math.round(this.left+this.height/2),translateY:Math.round(this.top+parseInt(t,10)+.5-o)}:{translateX:Math.round(this.left+parseInt(t,10)),translateY:Math.round(this.top+this.height/2-o/2-1)})},drawOutline:function(t,e,i,s){var o=this.navigatorOptions.maskInside,n=(r=this.outline.strokeWidth())/2,r=r%2/2,a=this.outlineHeight,h=this.scrollbarHeight,l=this.size,c=this.left-h,d=this.top;i?t=["M",(c-=n)+a,d-h-r,"L",c+a,i=d+e+r,"L",c,i,"L",c,e=d+t+r,"L",c+a,e,"L",c+a,d+l+h].concat(o?["M",c+a,i-n,"L",c+a,e+n]:[]):t=["M",c,d+=n,"L",t+=c+h-r,d,"L",t,d+a,"L",e+=c+h-r,d+a,"L",e,d,"L",c+l+2*h,d].concat(o?["M",t-n,d,"L",e+n,d]:[]),this.outline[s]({d:t})},drawMasks:function(t,e,i,s){var o,n,r,a,h=this.left,c=this.top,d=this.height;i?(r=[h,h,h],a=[c,c+t,c+e],n=[d,d,d],o=[t,e-t,this.size-e]):(r=[h,h+t,h+e],a=[c,c,c],n=[t,e-t,this.size-e],o=[d,d,d]),l(this.shades,function(t,e){t[s]({x:r[e],y:a[e],width:n[e],height:o[e]})})},renderElements:function(){var t,e=this,i=e.navigatorOptions,s=i.maskInside,o=e.chart,n=o.inverted,r=o.renderer;e.navigatorGroup=t=r.g("navigator").attr({zIndex:8,visibility:"hidden"}).add();var a={cursor:n?"ns-resize":"ew-resize"};l([!s,s,!s],function(s,o){e.shades[o]=r.rect().addClass("highcharts-navigator-mask"+(1===o?"-inside":"-outside")).attr({fill:s?i.maskFill:"rgba(0,0,0,0)"}).css(1===o&&a).add(t)}),e.outline=r.path().addClass("highcharts-navigator-outline").attr({"stroke-width":i.outlineWidth,stroke:i.outlineColor}).add(t),i.handles.enabled&&l([0,1],function(s){i.handles.inverted=o.inverted,e.handles[s]=r.symbol(i.handles.symbols[s],-i.handles.width/2-1,0,i.handles.width,i.handles.height,i.handles),e.handles[s].attr({zIndex:7-s}).addClass("highcharts-navigator-handle highcharts-navigator-handle-"+["left","right"][s]).add(t);var n=i.handles;e.handles[s].attr({fill:n.backgroundColor,stroke:n.borderColor,"stroke-width":n.lineWidth}).css(a)})},update:function(t){l(this.series||[],function(t){t.baseSeries&&delete t.baseSeries.navigatorSeries}),this.destroy(),y(!0,this.chart.options.navigator,this.options,t),this.init(this.chart)},render:function(e,i,s,o){var n,r,h,l=this.chart,c=this.scrollbarHeight,d=this.xAxis;n=d.fake?l.xAxis[0]:d;var p,u=this.navigatorEnabled,g=this.rendered;r=l.inverted;var f,x=l.xAxis[0].minRange,v=l.xAxis[0].options.maxRange;if(!this.hasDragged||a(s)){if(!m(e)||!m(i)){if(!g)return;s=0,o=b(d.width,n.width)}this.left=b(d.left,l.plotLeft+c+(r?l.plotWidth:0)),this.size=p=h=b(d.len,(r?l.plotHeight:l.plotWidth)-2*c),l=r?c:h+2*c,s=b(s,d.toPixels(e,!0)),o=b(o,d.toPixels(i,!0)),m(s)&&1/0!==Math.abs(s)||(s=0,o=l),e=d.toValue(s,!0),i=d.toValue(o,!0),(f=Math.abs(t.correctFloat(i-e)))v&&(this.grabbedLeft?s=d.toPixels(i-v,!0):this.grabbedRight&&(o=d.toPixels(e+v,!0))),this.zoomedMax=Math.min(Math.max(s,o,0),p),this.zoomedMin=Math.min(Math.max(this.fixedWidth?this.zoomedMax-this.fixedWidth:Math.min(s,o),0),p),this.range=this.zoomedMax-this.zoomedMin,p=Math.round(this.zoomedMax),s=Math.round(this.zoomedMin),u&&(this.navigatorGroup.attr({visibility:"visible"}),g=g&&!this.hasDragged?"animate":"attr",this.drawMasks(s,p,r,g),this.drawOutline(s,p,r,g),this.navigatorOptions.handles.enabled&&(this.drawHandle(s,0,r,g),this.drawHandle(p,1,r,g))),this.scrollbar&&(r?(r=this.top-c,n=this.left-c+(u||!n.opposite?0:(n.titleOffset||0)+n.axisTitleMargin),c=h+2*c):(r=this.top+(u?this.height:-c),n=this.left-c),this.scrollbar.position(n,r,l,c),this.scrollbar.setRange(this.zoomedMin/(h||1),this.zoomedMax/(h||1))),this.rendered=!0}},addMouseEvents:function(){var t,e,s=this,o=s.chart,n=o.container,r=[];s.mouseMoveHandler=t=function(t){s.onMouseMove(t)},s.mouseUpHandler=e=function(t){s.onMouseUp(t)},(r=s.getPartsEvents("mousedown")).push(i(n,"mousemove",t),i(n.ownerDocument,"mouseup",e)),g&&(r.push(i(n,"touchmove",t),i(n.ownerDocument,"touchend",e)),r.concat(s.getPartsEvents("touchstart"))),s.eventsToUnbind=r,s.series&&s.series[0]&&r.push(i(s.series[0].xAxis,"foundExtremes",function(){o.navigator.modifyNavigatorAxisExtremes()}))},getPartsEvents:function(t){var e=this,s=[];return l(["shades","handles"],function(o){l(e[o],function(n,r){s.push(i(n.element,t,function(t){e[o+"Mousedown"](t,r)}))})}),s},shadesMousedown:function(t,e){t=this.chart.pointer.normalize(t);var i,s,o=this.chart,n=this.xAxis,r=this.zoomedMin,h=this.left,l=this.size,c=this.range,d=t.chartX;o.inverted&&(d=t.chartY,h=this.top),1===e?(this.grabbedCenter=d,this.fixedWidth=c,this.dragOffset=d-r):(t=d-h-c/2,0===e?t=Math.max(0,t):2===e&&t+c>=l&&(t=l-c,this.reversedExtremes?(t-=c,s=this.getUnionExtremes().dataMin):i=this.getUnionExtremes().dataMax),t!==r&&(this.fixedWidth=c,e=n.toFixedRange(t,t+c,s,i),a(e.min)&&o.xAxis[0].setExtremes(Math.min(e.min,e.max),Math.max(e.min,e.max),!0,null,{trigger:"navigator"})))},handlesMousedown:function(t,e){this.chart.pointer.normalize(t);var i=(t=this.chart).xAxis[0],s=this.reversedExtremes;0===e?(this.grabbedLeft=!0,this.otherHandlePos=this.zoomedMax,this.fixedExtreme=s?i.min:i.max):(this.grabbedRight=!0,this.otherHandlePos=this.zoomedMin,this.fixedExtreme=s?i.max:i.min),t.fixedRange=null},onMouseMove:function(e){var i=this,s=i.chart,o=i.left,n=i.navigatorSize,r=i.range,a=i.dragOffset,h=s.inverted;e.touches&&0===e.touches[0].pageX||(s=(e=s.pointer.normalize(e)).chartX,h&&(o=i.top,s=e.chartY),i.grabbedLeft?(i.hasDragged=!0,i.render(0,0,s-o,i.otherHandlePos)):i.grabbedRight?(i.hasDragged=!0,i.render(0,0,i.otherHandlePos,s-o)):i.grabbedCenter&&(i.hasDragged=!0,sn+a-r&&(s=n+a-r),i.render(0,0,s-a,s-a+r)),i.hasDragged&&i.scrollbar&&b(i.scrollbar.options.liveRedraw,t.svg&&!v&&!this.chart.isBoosting)&&(e.DOMType=e.type,setTimeout(function(){i.onMouseUp(e)},0)))},onMouseUp:function(t){var e,i,s=this.chart,o=this.xAxis,n=this.scrollbar,r=t.DOMEvent||t;(!this.hasDragged||n&&n.hasDragged)&&"scrollbar"!==t.trigger||(n=this.getUnionExtremes(),this.zoomedMin===this.otherHandlePos?e=this.fixedExtreme:this.zoomedMax===this.otherHandlePos&&(i=this.fixedExtreme),this.zoomedMax===this.size&&(i=this.reversedExtremes?n.dataMin:n.dataMax),0===this.zoomedMin&&(e=this.reversedExtremes?n.dataMax:n.dataMin),o=o.toFixedRange(this.zoomedMin,this.zoomedMax,e,i),a(o.min)&&s.xAxis[0].setExtremes(Math.min(o.min,o.max),Math.max(o.min,o.max),!0,!this.hasDragged&&null,{trigger:"navigator",triggerOp:"navigator-drag",DOMEvent:r})),"mousemove"!==t.DOMType&&(this.grabbedLeft=this.grabbedRight=this.grabbedCenter=this.fixedWidth=this.fixedExtreme=this.otherHandlePos=this.hasDragged=this.dragOffset=null)},removeEvents:function(){this.eventsToUnbind&&(l(this.eventsToUnbind,function(t){t()}),this.eventsToUnbind=void 0),this.removeBaseSeriesEvents()},removeBaseSeriesEvents:function(){var t=this.baseSeries||[];this.navigatorEnabled&&t[0]&&(!1!==this.navigatorOptions.adaptToUpdatedData&&l(t,function(t){k(t,"updatedData",this.updatedDataHandler)},this),t[0].xAxis&&k(t[0].xAxis,"foundExtremes",this.modifyBaseAxisExtremes))},init:function(t){var e=(r=t.options).navigator,o=e.enabled,n=(l=r.scrollbar).enabled,r=o?e.height:0,a=n?l.height:0;this.handles=[],this.shades=[],this.chart=t,this.setBaseSeries(),this.height=r,this.scrollbarHeight=a,this.scrollbarEnabled=n,this.navigatorEnabled=o,this.navigatorOptions=e,this.scrollbarOptions=l,this.outlineHeight=r+a,this.opposite=b(e.opposite,!o&&t.inverted);var h=this,l=(o=h.baseSeries,t.xAxis.length),c=(n=t.yAxis.length,o&&o[0]&&o[0].xAxis||t.xAxis[0]||{options:{}});t.isDirtyBox=!0,h.navigatorEnabled?(h.xAxis=new s(t,y({breaks:c.options.breaks,ordinal:c.options.ordinal},e.xAxis,{id:"navigator-x-axis",yAxis:"navigator-y-axis",isX:!0,type:"datetime",index:l,isInternal:!0,offset:0,keepOrdinalPadding:!0,startOnTick:!1,endOnTick:!1,minPadding:0,maxPadding:0,zoomEnabled:!1},t.inverted?{offsets:[a,0,-a,0],width:r}:{offsets:[0,-a,0,a],height:r})),h.yAxis=new s(t,y(e.yAxis,{id:"navigator-y-axis",alignTicks:!1,offset:0,index:n,isInternal:!0,zoomEnabled:!1},t.inverted?{width:r}:{height:r})),o||e.series.data?h.updateNavigatorSeries(!1):0===t.series.length&&(h.unbindRedraw=i(t,"beforeRedraw",function(){0t.inArray(i,c))||(i&&(k(i,"updatedData",a.updatedDataHandler),delete i.navigatorSeries),e.chart&&e.destroy(),!1)});c&&c.length&&l(c,function(t){var e=t.navigatorSeries,l=p({color:t.color,visible:t.visible},f(d)?r.navigator.series:d);e&&!1===a.navigatorOptions.adaptToUpdatedData||(u.name="Navigator "+c.length,s=t.options||{},n=s.navigatorOptions||{},o=y(s,u,l,n),l=n.data||l.data,a.hasNavigatorData=a.hasNavigatorData||!!l,o.data=l||s.data&&s.data.slice(0),e&&e.options?e.update(o,i):(t.navigatorSeries=h.initSeries(o),t.navigatorSeries.baseSeries=t,g.push(t.navigatorSeries)))}),(!d.data||c&&c.length)&&!f(d)||(a.hasNavigatorData=!1,d=t.splat(d),l(d,function(t,e){u.name="Navigator "+(g.length+1),(o=y(r.navigator.series,{color:h.series[e]&&!h.series[e].options.isInternal&&h.series[e].color||h.options.colors[e]||h.options.colors[0]},u,t)).data=t.data,o.data&&(a.hasNavigatorData=!0,g.push(h.initSeries(o)))})),e&&this.addBaseSeriesEvents()},addBaseSeriesEvents:function(){var t=this,e=t.baseSeries||[];e[0]&&e[0].xAxis&&i(e[0].xAxis,"foundExtremes",this.modifyBaseAxisExtremes),l(e,function(e){i(e,"show",function(){this.navigatorSeries&&this.navigatorSeries.setVisible(!0,!1)}),i(e,"hide",function(){this.navigatorSeries&&this.navigatorSeries.setVisible(!1,!1)}),!1!==this.navigatorOptions.adaptToUpdatedData&&e.xAxis&&i(e,"updatedData",this.updatedDataHandler),i(e,"remove",function(){this.navigatorSeries&&(c(t.series,this.navigatorSeries),a(this.navigatorSeries.options)&&this.navigatorSeries.remove(!1),delete this.navigatorSeries)})},this)},getBaseSeriesMin:function(e){return t.reduce(this.baseSeries,function(t,e){return Math.min(t,e.xData[0])},e)},modifyNavigatorAxisExtremes:function(){var t,e=this.xAxis;e.getExtremes&&(!(t=this.getUnionExtremes(!0))||t.dataMin===e.min&&t.dataMax===e.max||(e.min=t.dataMin,e.max=t.dataMax))},modifyBaseAxisExtremes:function(){var t,e,i=this.chart.navigator,s=(n=this.getExtremes()).dataMin,o=n.dataMax,n=n.max-n.min,r=i.stickToMin,a=i.stickToMax,h=b(this.options.overscroll,0),l=i.series&&i.series[0],c=!!this.setExtremes;this.eventArgs&&"rangeSelectorButton"===this.eventArgs.trigger||(r&&(t=(e=s)+n),a&&(t=o+h,r||(e=Math.max(t-n,i.getBaseSeriesMin(l&&l.xData?l.xData[0]:-Number.MAX_VALUE)))),c&&(r||a)&&m(e)&&(this.min=this.userMin=e,this.max=this.userMax=t)),i.stickToMin=i.stickToMax=null},updatedDataHandler:function(){var t=this.chart.navigator,e=this.navigatorSeries,i=t.getBaseSeriesMin(this.xData[0]);t.stickToMax=t.reversedExtremes?0===Math.round(t.zoomedMin):Math.round(t.zoomedMax)>=Math.round(t.size),t.stickToMin=m(this.xAxis.min)&&this.xAxis.min<=i&&(!this.chart.fixedRange||!t.stickToMax),e&&!t.hasNavigatorData&&(e.options.pointStart=this.xData[0],e.setData(this.options.data,!1,null,!1))},addChartEvents:function(){this.eventsToUnbind||(this.eventsToUnbind=[]),this.eventsToUnbind.push(i(this.chart,"redraw",function(){var t=this.navigator,e=t&&(t.baseSeries&&t.baseSeries[0]&&t.baseSeries[0].xAxis||t.scrollbar&&this.xAxis[0]);e&&t.render(e.min,e.max)}),i(this.chart,"getMargins",function(){var t=this.navigator,e=t.opposite?"plotTop":"marginBottom";this.inverted&&(e=t.opposite?"marginRight":"plotLeft"),this[e]=(this[e]||0)+(t.navigatorEnabled||!this.inverted?t.outlineHeight:0)+t.navigatorOptions.margin}))},destroy:function(){this.removeEvents(),this.xAxis&&(c(this.chart.xAxis,this.xAxis),c(this.chart.axes,this.xAxis)),this.yAxis&&(c(this.chart.yAxis,this.yAxis),c(this.chart.axes,this.yAxis)),l(this.series||[],function(t){t.destroy&&t.destroy()}),l("series xAxis yAxis shades outline scrollbarTrack scrollbarRifles scrollbarGroup scrollbar navigatorGroup rendered".split(" "),function(t){this[t]&&this[t].destroy&&this[t].destroy(),this[t]=null},this),l([this.handles],function(t){h(t)},this)}},t.Navigator=e,A(s.prototype,"zoom",function(t,e,i){var s,o=this.chart,n=(l=o.options).chart.zoomType,r=l.chart.pinchType,h=l.navigator,l=l.rangeSelector;return this.isXAxis&&(h&&h.enabled||l&&l.enabled)&&(!v&&"x"===n||v&&"x"===r?o.resetZoomButton="blocked":"y"===n?s=!1:(!v&&"xy"===n||v&&"xy"===r)&&this.options.range&&(o=this.previousZoom,a(e)?this.previousZoom=[this.min,this.max]:o&&(e=o[0],i=o[1],delete this.previousZoom))),void 0!==s?s:t.call(this,e,i)}),i(o,"beforeRender",function(){var t=this.options;(t.navigator.enabled||t.scrollbar.enabled)&&(this.scroller=this.navigator=new e(this))}),i(o,"afterSetChartSize",function(){var t,e,i,s,o=this.legend,n=this.navigator;n&&(e=o&&o.options,i=n.xAxis,s=n.yAxis,t=n.scrollbarHeight,this.inverted?(n.left=n.opposite?this.chartWidth-t-n.height:this.spacing[3]+t,n.top=this.plotTop+t):(n.left=this.plotLeft+t,n.top=n.navigatorOptions.top||this.chartHeight-n.height-t-this.spacing[2]-(this.rangeSelector&&this.extraBottomMargin?this.rangeSelector.getHeight():0)-(e&&"bottom"===e.verticalAlign&&e.enabled&&!e.floating?o.legendHeight+b(e.margin,10):0)),i&&s&&(this.inverted?i.options.left=s.options.left=n.left:i.options.top=s.options.top=n.top,i.setAxisSize(),s.setAxisSize()))}),i(o,"update",function(t){var e=t.options.navigator||{},i=t.options.scrollbar||{};this.navigator||this.scroller||!e.enabled&&!i.enabled||(y(!0,this.options.navigator,e),y(!0,this.options.scrollbar,i),delete t.options.navigator,delete t.options.scrollbar)}),i(o,"afterUpdate",function(){this.navigator||this.scroller||!this.options.navigator.enabled&&!this.options.scrollbar.enabled||(this.scroller=this.navigator=new e(this))}),A(w.prototype,"addPoint",function(t,e,i,s,o){var n=this.options.turboThreshold;n&&this.xData.length>n&&x(e,!0)&&this.chart.navigator&&d(20,!0),t.call(this,e,i,s,o)}),i(o,"afterAddSeries",function(){this.navigator&&this.navigator.setBaseSeries(null,!1)}),i(w,"afterUpdate",function(){this.chart.navigator&&!this.options.isInternal&&this.chart.navigator.setBaseSeries(null,!1)}),o.prototype.callbacks.push(function(t){var e=t.navigator;e&&t.xAxis[0]&&(t=t.xAxis[0].getExtremes(),e.render(t.min,t.max))})}(e),function(t){function e(t){this.init(t)}var i=t.addEvent,s=t.Axis,o=t.Chart,n=t.css,r=t.createElement,a=t.defaultOptions,h=t.defined,l=t.destroyObjectProperties,c=t.discardElement,d=t.each,p=t.extend,u=t.fireEvent,g=t.isNumber,f=t.merge,m=t.pick,x=t.pInt,v=t.splat,y=t.wrap;p(a,{rangeSelector:{verticalAlign:"top",buttonTheme:{"stroke-width":0,width:28,height:18,padding:2,zIndex:7},floating:!1,x:0,y:0,height:void 0,inputPosition:{align:"right",x:0,y:0},buttonPosition:{align:"left",x:0,y:0},labelStyle:{color:"#666666"}}}),a.lang=f(a.lang,{rangeSelectorZoom:"Zoom",rangeSelectorFrom:"From",rangeSelectorTo:"To"}),e.prototype={clickButton:function(t,e){var o,n,r,a,h,l=this,c=l.chart,p=l.buttonOptions[t],u=c.xAxis[0],f=(k=c.scroller&&c.scroller.getUnionExtremes()||u||{}).dataMin,x=k.dataMax,y=u&&Math.round(Math.min(u.max,m(x,u.max))),b=p.type,k=p._range,M=p.dataGrouping;if(null!==f&&null!==x){if(c.fixedRange=k,M&&(this.forcedDataGrouping=!0,s.prototype.setDataGrouping.call(u||{chart:this.chart},M,!1),this.frozenStates=p.preserveDataGrouping),"month"===b||"year"===b)u?(b={range:p,max:y,chart:c,dataMin:f,dataMax:x},o=u.minFromRange.call(b),g(b.newMax)&&(y=b.newMax)):k=p;else if(k)o=Math.max(y-k,f),y=Math.min(o+k,x);else if("ytd"===b){if(!u)return void i(c,"beforeRender",function(){l.clickButton(t)});void 0===x&&(f=Number.MAX_VALUE,x=Number.MIN_VALUE,d(c.series,function(t){t=t.xData,f=Math.min(t[0],f),x=Math.max(t[t.length-1],x)}),e=!1),o=r=(y=l.getYTDExtremes(x,f,c.time.useUTC)).min,y=y.max}else"all"===b&&u&&(o=f,y=x);o+=p._offsetMin,y+=p._offsetMax,l.setSelected(t),u?u.setExtremes(o,y,m(e,1),null,{trigger:"rangeSelectorButton",rangeSelectorButton:p}):(n=v(c.options.xAxis)[0],h=n.range,n.range=k,a=n.min,n.min=r,i(c,"load",function(){n.range=h,n.min=a}))}},setSelected:function(t){this.selected=this.options.selected=t},defaultButtons:[{type:"month",count:1,text:"1m"},{type:"month",count:3,text:"3m"},{type:"month",count:6,text:"6m"},{type:"ytd",text:"YTD"},{type:"year",count:1,text:"1y"},{type:"all",text:"All"}],init:function(t){var e=this,s=t.options.rangeSelector,o=s.buttons||[].concat(e.defaultButtons),n=s.selected,r=function(){var t=e.minInput,i=e.maxInput;t&&t.blur&&u(t,"blur"),i&&i.blur&&u(i,"blur")};e.chart=t,e.options=s,e.buttons=[],t.extraTopMargin=s.height,e.buttonOptions=o,this.unMouseDown=i(t.container,"mousedown",r),this.unResize=i(t,"resize",r),d(o,e.computeButtonRange),void 0!==n&&o[n]&&this.clickButton(n,!1),i(t,"load",function(){t.xAxis&&t.xAxis[0]&&i(t.xAxis[0],"setExtremes",function(i){this.max-this.min!==t.fixedRange&&"rangeSelectorButton"!==i.trigger&&"updatedData"!==i.trigger&&e.forcedDataGrouping&&!e.frozenStates&&this.setDataGrouping(!1,!1)})})},updateButtonStates:function(){var t,e=this,i=(t=this.chart).xAxis[0],s=Math.round(i.max-i.min),o=!i.hasVisibleSeries,n=t.scroller&&t.scroller.getUnionExtremes()||i,r=n.dataMin,a=n.dataMax,h=(t=e.getYTDExtremes(a,r,t.time.useUTC)).min,l=t.max,c=e.selected,p=g(c),u=e.options.allButtonsEnabled,f=e.buttons;d(e.buttonOptions,function(t,n){var d=t._range,g=t.type,m=t.count||1,x=f[n],v=0;t=t._offsetMax-t._offsetMin,n=n===c;var y=d>a-r,b=d=864e5*{month:28,year:365}[g]*m-t&&s-36e5<=864e5*{month:31,year:366}[g]*m+t?d=!0:"ytd"===g?(d=l-h+t===s,k=!n):"all"===g&&(d=i.max-i.min>=a-r,M=!n&&p&&d),g=!u&&(y||b||M||o),m=n&&d||d&&!p&&!k||n&&e.frozenStates,g?v=3:m&&(p=!0,v=2),x.state!==v&&x.setState(v)})},computeButtonRange:function(t){var e=t.type,i=t.count||1,s={millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,week:6048e5};s[e]?t._range=s[e]*i:"month"!==e&&"year"!==e||(t._range=864e5*{month:30,year:365}[e]*i),t._offsetMin=m(t.offsetMin,0),t._offsetMax=m(t.offsetMax,0),t._range+=t._offsetMax-t._offsetMin},setInputValue:function(t,e){var i=this.chart.options.rangeSelector,s=this.chart.time,o=this[t+"Input"];h(e)&&(o.previousValue=o.HCTime,o.HCTime=e),o.value=s.dateFormat(i.inputEditDateFormat||"%Y-%m-%d",o.HCTime),this[t+"DateBox"].attr({text:s.dateFormat(i.inputDateFormat||"%b %e, %Y",o.HCTime)})},showInput:function(t){var e=this.inputGroup,i=this[t+"DateBox"];n(this[t+"Input"],{left:e.translateX+i.x+"px",top:e.translateY+"px",width:i.width-2+"px",height:i.height-2+"px",border:"2px solid silver"})},hideInput:function(t){n(this[t+"Input"],{border:0,width:"1px",height:"1px"}),this.setInputValue(t)},drawInput:function(t){function e(){var t=i.value,e=(d.inputDateParser||Date.parse)(t),s=h.xAxis[0],n=(r=h.scroller&&h.scroller.xAxis?h.scroller.xAxis:s).dataMin,r=r.dataMax;e!==i.previousValue&&(i.previousValue=e,g(e)||(e=t.split("-"),e=Date.UTC(x(e[0]),x(e[1])-1,x(e[2]))),g(e)&&(h.time.useUTC||(e+=6e4*(new Date).getTimezoneOffset()),m?e>o.maxInput.HCTime?e=void 0:er&&(e=r),void 0!==e&&s.setExtremes(m?e:s.min,m?s.max:e,void 0,void 0,{trigger:"rangeSelectorInput"})))}var i,s,o=this,h=o.chart,l=h.renderer.style||{},c=h.renderer,d=h.options.rangeSelector,u=o.div,m="min"===t,v=this.inputGroup;this[t+"Label"]=s=c.label(a.lang[m?"rangeSelectorFrom":"rangeSelectorTo"],this.inputGroup.offset).addClass("highcharts-range-label").attr({padding:2}).add(v),v.offset+=s.width+5,this[t+"DateBox"]=c=c.label("",v.offset).addClass("highcharts-range-input").attr({padding:2,width:d.inputBoxWidth||90,height:d.inputBoxHeight||17,"text-align":"center",stroke:d.inputBoxBorderColor||"#cccccc","stroke-width":1}).on("click",function(){o.showInput(t),o[t+"Input"].focus()}).add(v),v.offset+=c.width+(m?10:0),this[t+"Input"]=i=r("input",{name:t,className:"highcharts-range-selector",type:"text"},{top:h.plotTop+"px"},u),s.css(f(l,d.labelStyle)),c.css(f({color:"#333333"},l,d.inputStyle)),n(i,p({position:"absolute",border:0,width:"1px",height:"1px",padding:0,textAlign:"center",fontSize:l.fontSize,fontFamily:l.fontFamily,top:"-9999em"},d.inputStyle)),i.onfocus=function(){o.showInput(t)},i.onblur=function(){o.hideInput(t)},i.onchange=e,i.onkeypress=function(t){13===t.keyCode&&e()}},getPosition:function(){var t,e=(t=this.chart).options.rangeSelector;return{buttonTop:(t="top"===e.verticalAlign?t.plotTop-t.axisOffset[0]:0)+e.buttonPosition.y,inputTop:t+e.inputPosition.y-10}},getYTDExtremes:function(t,e,i){var s=this.chart.time,o=new s.Date(t),n=s.get("FullYear",o);return i=i?s.Date.UTC(n,0,1):+new s.Date(n,0,1),e=Math.max(e||0,i),o=o.getTime(),{max:Math.min(t||o,o),min:e}},render:function(t,e){var i,s,o=this,n=o.chart,h=n.renderer,l=n.container,c=(x=n.options).exporting&&!1!==x.exporting.enabled&&x.navigation&&x.navigation.buttonOptions,p=a.lang,u=o.div,g=x.rangeSelector,f=m(x.chart.style&&x.chart.style.zIndex,0)+1,x=g.floating,v=o.buttons,y=(u=o.inputGroup,g.buttonTheme),b=g.buttonPosition,k=g.inputPosition,M=g.inputEnabled,w=y&&y.states,S=n.plotLeft,A=o.buttonGroup;s=o.rendered;var T,P=o.options.verticalAlign,C=n.legend,L=C&&C.options,O=b.y,D=k.y,B=s||!1,I=B?"animate":"attr",z=0,E=0;!1!==g.enabled&&(s||(o.group=s=h.g("range-selector-group").attr({zIndex:7}).add(),o.buttonGroup=A=h.g("range-selector-buttons").add(s),o.zoomText=h.text(p.rangeSelectorZoom,0,15).css(g.labelStyle).add(A),d(o.buttonOptions,function(t,e){v[e]=h.button(t.text,0,0,function(){var i,s=t.events&&t.events.click;s&&(i=s.call(t)),!1!==i&&o.clickButton(e),o.isActive=!0},y,w&&w.hover,w&&w.select,w&&w.disabled).attr({"text-align":"center"}).add(A)}),!1!==M&&(o.div=u=r("div",null,{position:"relative",height:0,zIndex:f}),l.parentNode.insertBefore(u,l),o.inputGroup=u=h.g("input-group").add(s),u.offset=0,o.drawInput("min"),o.drawInput("max"))),o.zoomText[I]({x:m(S+b.x,S)}),i=m(S+b.x,S)+o.zoomText.getBBox().width+5,d(o.buttonOptions,function(t,e){v[e][I]({x:i}),i+=v[e].width+m(g.buttonSpacing,5)}),S=n.plotLeft-n.spacing[3],o.updateButtonStates(),c&&this.titleCollision(n)&&"top"===P&&"right"===b.align&&b.y+A.getBBox().height-12<(c.y||0)+c.height&&(z=-40),"left"===b.align?T=b.x-n.spacing[3]:"right"===b.align&&(T=b.x+z-n.spacing[1]),A.align({y:b.y,width:A.getBBox().width,align:b.align,x:T},!0,n.spacingBox),o.group.placed=B,o.buttonGroup.placed=B,!1!==M&&(z=c&&this.titleCollision(n)&&"top"===P&&"right"===k.align&&k.y-u.getBBox().height-12<(c.y||0)+c.height+n.spacing[0]?-40:0,"left"===k.align?T=S:"right"===k.align&&(T=-Math.max(n.axisOffset[1],-z)),u.align({y:k.y,width:u.getBBox().width,align:k.align,x:k.x+T-2},!0,n.spacingBox),l=u.alignAttr.translateX+u.alignOptions.x-z+u.getBBox().x+2,c=u.alignOptions.width,p=A.alignAttr.translateX+A.getBBox().x,T=A.getBBox().width+20,(k.align===b.align||p+T>l&&l+c>p&&O=-z?0:-z),translateY:u.alignAttr.translateY+A.getBBox().height+10}),o.setInputValue("min",t),o.setInputValue("max",e),o.inputGroup.placed=B),o.group.align({verticalAlign:P},!0,n.spacingBox),t=o.group.getBBox().height+20,e=o.group.alignAttr.translateY,"bottom"===P&&(E=e-(t=t+(C=L&&"bottom"===L.verticalAlign&&L.enabled&&!L.floating?C.legendHeight+m(L.margin,10):0)-20)-(x?0:g.y)-10),"top"===P?(x&&(E=0),n.titleOffset&&(E=n.titleOffset+n.options.title.margin),E+=n.margin[0]-n.spacing[0]||0):"middle"===P&&(D===O?E=0>D?e+void 0:e:(D||O)&&(E=0>D||0>O?E-Math.min(D,O):e-t+NaN)),o.group.translate(g.x,g.y+Math.floor(E)),!1!==M&&(o.minInput.style.marginTop=o.group.translateY+"px",o.maxInput.style.marginTop=o.group.translateY+"px"),o.rendered=!0)},getHeight:function(){var t=this.options,e=this.group,i=t.y,s=t.buttonPosition.y;t=t.inputPosition.y,e=e?e.getBBox(!0).height+13+i:0,i=Math.min(t,s);return(0>t&&0>s||0i&&(s?t=e-o:e=t+o),g(t)&&g(e)||(t=e=void 0),{min:t,max:e}},s.prototype.minFromRange=function(){var t,e,i,s=this.range,o={month:"Month",year:"FullYear"}[s.type],n=this.max,r=function(t,e){var i=new Date(t),s=i["get"+o]();return i["set"+o](s+e),s===i["get"+o]()&&i.setDate(0),i.getTime()-t};return g(s)?(t=n-s,i=s):(t=n+r(n,-s.count),this.chart&&(this.chart.fixedRange=n-t)),e=m(this.dataMin,Number.MIN_VALUE),g(t)||(t=e),t<=e&&(t=e,void 0===i&&(i=r(t,s.count)),this.newMax=Math.min(t+i,this.dataMax)),g(n)||(t=void 0),t},i(o,"afterGetContainer",function(){this.options.rangeSelector.enabled&&(this.rangeSelector=new e(this))}),y(o.prototype,"render",function(t,e,i){var s=this.axes,o=this.rangeSelector;o&&(d(s,function(t){t.updateNames(),t.setScale()}),this.getAxisMargins(),o.render(),s=o.options.verticalAlign,o.options.floating||("bottom"===s?this.extraBottomMargin=!0:"middle"!==s&&(this.extraTopMargin=!0))),t.call(this,e,i)}),i(o,"update",function(t){var i=t.options.rangeSelector;t=this.rangeSelector;var s=this.extraBottomMargin,o=this.extraTopMargin;i&&i.enabled&&!h(t)&&(this.options.rangeSelector.enabled=!0,this.rangeSelector=new e(this)),this.extraTopMargin=this.extraBottomMargin=!1,t&&(t.render(),i=i&&i.verticalAlign||t.options&&t.options.verticalAlign,t.options.floating||("bottom"===i?this.extraBottomMargin=!0:"middle"!==i&&(this.extraTopMargin=!0)),this.extraBottomMargin!==s||this.extraTopMargin!==o)&&(this.isDirtyBox=!0)}),y(o.prototype,"redraw",function(t,e,i){var s=this.rangeSelector;s&&!s.options.floating&&(s.render(),"bottom"===(s=s.options.verticalAlign)?this.extraBottomMargin=!0:"middle"!==s&&(this.extraTopMargin=!0)),t.call(this,e,i)}),i(o,"getMargins",function(){var t=this.rangeSelector;t&&(t=t.getHeight(),this.extraTopMargin&&(this.plotTop+=t),this.extraBottomMargin&&(this.marginBottom+=t))}),o.prototype.callbacks.push(function(t){function e(){s=t.xAxis[0].getExtremes(),g(s.min)&&r.render(s.min,s.max)}var s,o,n,r=t.rangeSelector;r&&(n=i(t.xAxis[0],"afterSetExtremes",function(t){r.render(t.min,t.max)}),o=i(t,"redraw",e),e()),i(t,"destroy",function(){r&&(o(),n())})}),t.RangeSelector=e}(e),function(t){var e=t.addEvent,i=t.arrayMax,s=t.arrayMin,o=t.Axis,n=t.Chart,r=t.defined,a=t.each,h=t.extend,l=t.format,c=t.grep,d=t.inArray,p=t.isNumber,u=t.isString,g=t.map,f=t.merge,m=t.pick,x=t.Point,v=t.Renderer,y=t.Series,b=t.splat,k=t.SVGRenderer,M=t.VMLRenderer,w=t.wrap,S=y.prototype,A=S.init,T=S.processData,P=x.prototype.tooltipFormatter;t.StockChart=t.stockChart=function(e,i,s){var o,r=u(e)||e.nodeName,a=arguments[r?1:0],h=a.series,l=t.getOptions(),c=m(a.navigator&&a.navigator.enabled,l.navigator.enabled,!0),d=c?{startOnTick:!1,endOnTick:!1}:null,p={marker:{enabled:!1,radius:2}},x={shadow:!1,borderWidth:0};return a.xAxis=g(b(a.xAxis||{}),function(t,e){return f({minPadding:0,maxPadding:0,overscroll:0,ordinal:!0,title:{text:null},labels:{overflow:"justify"},showLastLabel:!0},l.xAxis,l.xAxis&&l.xAxis[e],t,{type:"datetime",categories:null},d)}),a.yAxis=g(b(a.yAxis||{}),function(t,e){return o=m(t.opposite,!0),f({labels:{y:-2},opposite:o,showLastLabel:!(!t.categories&&"category"!==t.type),title:{text:null}},l.yAxis,l.yAxis&&l.yAxis[e],t)}),a.series=null,(a=f({chart:{panning:!0,pinchType:"x"},navigator:{enabled:c},scrollbar:{enabled:m(l.scrollbar.enabled,!0)},rangeSelector:{enabled:m(l.rangeSelector.enabled,!0)},title:{text:null},tooltip:{split:m(l.tooltip.split,!0),crosshairs:!0},legend:{enabled:!1},plotOptions:{line:p,spline:p,area:p,areaspline:p,arearange:p,areasplinerange:p,column:x,columnrange:x,candlestick:x,ohlc:x}},a,{isStock:!0})).series=h,r?new n(e,a,s):new n(a,i)},w(o.prototype,"autoLabelAlign",function(t){var e=this.chart,i=this.options,s=(e=e._labelPanes=e._labelPanes||{},this.options.labels);return this.chart.options.isStock&&"yAxis"===this.coll&&(!e[i=i.top+","+i.height]&&s.enabled)?(15===s.x&&(s.x=0),void 0===s.align&&(s.align="right"),e[i]=this,"right"):t.apply(this,[].slice.call(arguments,1))}),e(o,"destroy",function(){var t=this.chart,e=this.options&&this.options.top+","+this.options.height;e&&t._labelPanes&&t._labelPanes[e]===this&&delete t._labelPanes[e]}),w(o.prototype,"getPlotLinePath",function(e,i,s,o,n,h){var l,c,f,x,v,y,b=this,k=this.isLinked&&!this.series?this.linkedParent.series:this.series,M=b.chart,w=M.renderer,S=b.left,A=b.top,T=[],P=[];return"xAxis"!==b.coll&&"yAxis"!==b.coll?e.apply(this,[].slice.call(arguments,1)):(P=function(t){var e="xAxis"===t?"yAxis":"xAxis";return t=b.options[e],p(t)?[M[e][t]]:u(t)?[M.get(t)]:g(k,function(t){return t[e]})}(b.coll),a(b.isXAxis?M.yAxis:M.xAxis,function(t){if(!r(t.options.id)||-1===t.options.id.indexOf("navigator")){var e=t.isXAxis?"yAxis":"xAxis";e=r(t.options[e])?M[e][t.options[e]]:M[e][0];b===e&&P.push(t)}}),v=P.length?[]:[b.isXAxis?M.yAxis[0]:M.xAxis[0]],a(P,function(e){-1!==d(e,v)||t.find(v,function(t){return t.pos===e.pos&&t.len===e.len})||v.push(e)}),y=m(h,b.translate(i,null,null,o)),p(y)&&(b.horiz?a(v,function(t){var e;c=t.pos,x=c+t.len,l=f=Math.round(y+b.transB),"pass"!==n&&(lS+b.width)&&(n?l=f=Math.min(Math.max(S,l),S+b.width):e=!0),e||T.push("M",l,c,"L",f,x)}):a(v,function(t){var e;l=t.pos,f=l+t.len,c=x=Math.round(A+b.height-y),"pass"!==n&&(cA+b.height)&&(n?c=x=Math.min(Math.max(A,c),b.top+b.height):e=!0),e||T.push("M",l,c,"L",f,x)})),0c?"hidden":"visible"}),o=p.getBBox(),n?(f&&!e||!f&&e)&&(d=p.y-o.height):d=p.y-o.height/2,n?(e=i-o.x,i=i+this.width-o.x):(e="left"===this.labelAlign?i:0,i="right"===this.labelAlign?i+this.width:s.chartWidth),p.translateX=i&&(v=-(p.translateX+o.width-i)),p.attr({x:t+v,y:d,anchorX:n?t:this.opposite?0:s.chartWidth,anchorY:n?this.opposite?s.chartHeight:0:d+o.height/2})}}),S.init=function(){A.apply(this,arguments),this.setCompare(this.options.compare)},S.setCompare=function(t){this.modifyValue="value"===t||"percent"===t?function(e,i){var s=this.compareValue;if(void 0!==e&&void 0!==s)return e="value"===t?e-s:e/s*100-(100===this.options.compareBase?0:100),i&&(i.change=e),e}:null,this.userOptions.compare=t,this.chart.hasRendered&&(this.isDirty=!0)},S.processData=function(){var t,e,i,s,o,n=-1,r=!0===this.options.compareStart?0:1;if(T.apply(this,arguments),this.xAxis&&this.processedYData)for(e=this.processedXData,s=(i=this.processedYData).length,this.pointArrayMap&&(-1===(n=d("close",this.pointArrayMap))&&(n=d(this.pointValKey||"y",this.pointArrayMap))),t=0;t=this.xAxis.min&&0!==o){this.compareValue=o;break}},w(S,"getExtremes",function(t){var e;t.apply(this,[].slice.call(arguments,1)),this.modifyValue&&(e=[this.modifyValue(this.dataMin),this.modifyValue(this.dataMax)],this.dataMin=s(e),this.dataMax=i(e))}),o.prototype.setCompare=function(t,e){this.isXAxis||(a(this.series,function(e){e.setCompare(t)}),m(e,!0)&&this.chart.redraw())},x.prototype.tooltipFormatter=function(e){return e=e.replace("{point.change}",(00?Math.min(e[i].y,t):e[i].y;return{series:e,min:t}}},{key:"getConfig",value:function(){var t=this.transformSeries();return{chart:{type:"area",height:180},title:{text:null},legend:{enabled:!1},series:[{name:"day",data:t.series,fillColor:{linearGradient:[0,0,0,150],stops:[[0,"#68c8eb"],[1,"white"]]}}],yAxis:{labels:{formatter:function(){return r.default.numberFormat(this.value,0,",",".")}},min:t.min},xAxis:{},tooltip:{borderWidth:0,borderRadius:1,backgroundColor:"white",shadow:!0,useHTML:!0,formatter:function(){var t=Math.round(1e4*this.y)/1e4;t=r.default.numberFormat(t,0,",",".");var e=r.default.dateFormat("%H:%M",this.x);return'\n \n
'.concat(t,'
\n
').concat(e,"
\n
\n ")}}}}}]),t}();e.default=h},function(t,e,i){"use strict";var s=i(1)(i(11));i(4),new s.default}]);!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=0)}([function(e,t,r){"use strict";r.r(t);r(1);document.addEventListener("DOMContentLoaded",function(){let e=document.querySelectorAll(".card-wildcard-listagem");if(e)for(let t=0;t