@progress/kendo-charts 1.16.1-dev.202101080910 → 1.17.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- System.register("@progress/kendo-charts",["@progress/kendo-drawing"],function(Jc){var n;return{setters:[function(t){n=t.__useDefault?t.default:t}],execute:function(){function o(t){if(r[t])return r[t].exports;var e=r[t]={i:t,l:!1,exports:{}};return i[t].call(e.exports,e,e.exports,o),e.l=!0,e.exports}var i,r;r={},o.m=i=[function(t,e){t.exports=n},function(t,e,i){"use strict";i.r(e);var o={};i.d(o,"NAVIGATOR_AXIS",function(){return yl}),i.d(o,"NAVIGATOR_PANE",function(){return fl});var d="arc",a="#000",w="bottom",A="center",u="circle",y="date",f=10,s=/\{\d+:?/,S="left",l=Number.MAX_VALUE,c=-Number.MAX_VALUE,r="none",k="right",g="string",P="top",h="value",p="#fff",v="x",m="y";function x(t){return Array.isArray(t)}function n(t,e){for(var i=x(e)?e:[e],o=0;o<i.length;o++){var r=i[o];-1===t.className.indexOf(r)&&(t.className+=" "+r)}}var b=/\s+/g;function _(t,e){t&&t.className&&(t.className=t.className.replace(e,"").replace(b," "))}var C=i(0);function T(t){var e=.5;t.options.stroke&&C.drawing.util.defined(t.options.stroke.width)&&t.options.stroke.width%2==0&&(e=0);for(var i=0;i<t.segments.length;i++)t.segments[i].anchor().round(0).translate(e,e);return t}function M(t,e){return-t.x*e.y+t.y*e.x<0}function R(t){return"number"==typeof t&&!isNaN(t)}function O(t){return typeof t===g}function I(t){return R(t)||O(t)&&isFinite(t)}function j(t){return"function"==typeof t}var B="object",V="undefined";function L(t){for(var e=arguments,i=arguments.length,o=1;o<i;o++)!function t(e,i){for(var o in i){var r=i[o],n=typeof r,s=void 0;(s=n===B&&null!==r?r.constructor:null)&&s!==Array?r instanceof Date?e[o]=new Date(r.getTime()):j(r.clone)?e[o]=r.clone():(s=e[o],e[o]=typeof s===B&&s||{},t(e[o],r)):n!==V&&(e[o]=r)}return e}(t,e[o]);return t}function z(t){return"object"==typeof t}function E(t){return R(t)?t+"px":t}var F=/width|height|top|left|bottom|right/i;function D(t,e){var i,o=O(e)?[e]:e;if(x(o)){for(var r={},n=window.getComputedStyle(t),s=0;s<o.length;s++){var a=o[s];r[a]=(i=a,F.test(i)?parseFloat(n[a]):n[a])}return r}if(z(e))for(var p in e)t.style[p]=E(e[p])}function U(t,e){void 0===e&&(e=0);var i={top:0,right:0,bottom:0,left:0};return"number"==typeof t?i[P]=i[k]=i[w]=i[S]=t:(i[P]=t[P]||e,i[k]=t[k]||e,i[w]=t[w]||e,i[S]=t[S]||e),i}var H={format:function(t,e){return e},toString:function(t){return t},parseDate:function(t){return new Date(t)},firstDay:function(){return 0}},G=function(){},N={implementation:{configurable:!0}};G.register=function(t){H=t},N.implementation.get=function(){return H},Object.defineProperties(G,N);var q=G,X=/\{(\d+)(:[^\}]+)?\}/g,Y=function(t){this._intlService=t},W={intl:{configurable:!0}};W.intl.get=function(){return this._intlService||q.implementation},W.intl.set=function(t){this._intlService=t},Y.prototype.auto=function(t){for(var e=[],i=arguments.length-1;0<i--;)e[i]=arguments[i+1];var o=this.intl;return O(t)&&t.match(s)?o.format.apply(o,[t].concat(e)):o.toString(e[0],t)},Y.prototype.localeAuto=function(t,o,r){var n=this.intl;return O(t)&&t.match(s)?t.replace(X,function(t,e,i){e=o[parseInt(e,10)];return n.toString(e,i?i.substring(1):"",r)}):n.toString(o[0],t,r)},Object.defineProperties(Y.prototype,W);var Z=Y,K=function(t,e){void 0===e&&(e={}),this._intlService=e.intlService,this.sender=e.sender||t,this.format=new Z(e.intlService),this.chart=t,this.rtl=Boolean(e.rtl)},$={intl:{configurable:!0}};$.intl.get=function(){return this._intlService||q.implementation},$.intl.set=function(t){this._intlService=t,this.format.intl=t},K.prototype.notify=function(t,e){this.chart&&this.chart.trigger(t,e)},K.prototype.isPannable=function(t){var e=((this.chart||{}).options||{}).pannable;return e&&e.lock!==t},Object.defineProperties(K.prototype,$);var J,Q=K,N=function(){};N.register=function(t){J=t},N.create=function(t,e){if(J)return J.create(t,e)};var tt=N,et={compile:function(t){return t}},G=function(){};G.register=function(t){et=t},G.compile=function(t){return et.compile(t)};var it=G;function ot(t){var e;return void 0===t&&(t={}),t.template?t.template=e=it.compile(t.template):j(t.content)&&(e=t.content),e}var rt=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g,nt={};function st(t){if(nt[t])return nt[t];var r=[];return t.replace(rt,function(t,e,i,o){r.push(C.drawing.util.defined(e)?e:i||o)}),nt[t]=function(t){for(var e=t,i=0;i<r.length&&e;i++)e=e[r[i]];return e},nt[t]}function at(t,e){for(var i=t.length,o=[],r=0;r<i;r++)e(t[r])&&o.push(t[r]);return o}function pt(t,e){if(t.className)for(var i=e.split(" "),o=0;o<i.length;o++)if(-1!==t.className.indexOf(i[o]))return!0}nt[void 0]=function(t){return t};W=function(){this._map={}};W.prototype.get=function(t){return this._map[this._key(t)]},W.prototype.set=function(t,e){this._map[this._key(t)]=e},W.prototype._key=function(t){return t instanceof Date?t.getTime():t};var ht=W;function lt(t,e){if(e)return-1!==e.indexOf(t)}function ct(t,e,i){return C.drawing.util.round(t+(e-t)*i,3)}Y=function(t,e){this.observer=t,this.handlerMap=L({},this.handlerMap,e)};Y.prototype.trigger=function(t,e){var i,o=this.observer,r=this.handlerMap;return r[t]?i=this.callObserver(r[t],e):o.trigger&&(i=this.callObserver("trigger",t,e)),i},Y.prototype.callObserver=function(t){for(var e=[],i=arguments.length-1;0<i--;)e[i]=arguments[i+1];return this.observer[t].apply(this.observer,e)},Y.prototype.requiresHandlers=function(t){if(this.observer.requiresHandlers)return this.observer.requiresHandlers(t);for(var e=0;e<t.length;e++)if(this.handlerMap[t[e]])return!0};var ut=Y;function dt(t,e){for(var i=t.length,o=[],r=0;r<i;r++){var n=e(t[r]);C.drawing.util.defined(n)&&o.push(n)}return o}function gt(t){var e=0;return t.wheelDelta&&(e=0<(e=-t.wheelDelta/120)?Math.ceil(e):Math.floor(e)),t.detail&&(e=C.drawing.util.round(t.detail/3)),e}function ft(){}var $=C.drawing.util,yt=$.append,vt=$.bindEvents,mt=$.defined,xt=$.deg,bt=$.elementOffset,_t=$.elementSize,wt=$.eventElement,At=$.eventCoordinates,St=$.last,kt=$.limitValue,Pt=$.objectKey,Ct=$.rad,Tt=$.round,Mt=$.unbindEvents,Rt=$.valueOrDefault;ft.fetchFonts=function(i,o,r){void 0===r&&(r={depth:0}),!i||5<r.depth||!document.fonts||Object.keys(i).forEach(function(t){var e=i[t];"dataSource"!==t&&"$"!==t[0]&&e&&("font"===t?o.push(e):"object"==typeof e&&(r.depth++,ft.fetchFonts(e,o,r),r.depth--))})},ft.loadFonts=function(t,e){var i=[];if(0<t.length&&document.fonts){try{i=t.map(function(t){return document.fonts.load(t)})}catch(t){Object(C.logToConsole)(t)}Promise.all(i).then(e,e)}else e()},ft.preloadFonts=function(t,e){var i=[];ft.fetchFonts(t,i),ft.loadFonts(i,e)};var Ot=ft;function It(t,e){t=t.prototype;t.options?t.options=L({},t.options,e):t.options=e}function jt(t){for(var e=l,i=c,o=0,r=t.length;o<r;o++){var n=t[o];null!==n&&isFinite(n)&&(e=Math.min(e,n),i=Math.max(i,n))}return{min:e===l?void 0:e,max:i===c?void 0:i}}function Bt(t,e){for(var i=0;i<t.length;i++){var o=t[i];if(e(o,i,t))return o}}var Vt=C.geometry.Matrix,Lt=/matrix\((.*)\)/;function zt(t){var e=getComputedStyle(t).transform;return"none"===e?Vt.unit():function(){var t=e.match(Lt);if(null===t||2!==t.length)return Vt.unit();t=t[1].split(",").map(function(t){return parseFloat(t)});return new(Function.prototype.bind.apply(Vt,[null].concat(t)))}()}function Et(t){if(!t)return Vt.unit();for(var e=zt(t),i=t.parentElement;i;)var o=zt(i),e=e.multiplyCopy(o),i=i.parentElement;return e.b=e.c=e.e=e.f=0,e}function Ft(t,e){t=Tt(e-t,f-1);if(0===t){if(0===e)return.1;t=Math.abs(e)}e=Math.pow(10,Math.floor(Math.log(t)/Math.log(10))),t=Tt(t/e,f);return Tt(e*(t<1.904762?.2:t<4.761904?.5:t<9.523809?1:2),f)}var Dt,Ut=((Dt=C.Class)&&(Ht.__proto__=Dt),((Ht.prototype=Object.create(Dt&&Dt.prototype)).constructor=Ht).prototype.clone=function(){return new Ht(this.x,this.y)},Ht.prototype.equals=function(t){return t&&this.x===t.x&&this.y===t.y},Ht.prototype.rotate=function(t,e){var i=Ct(e),o=Math.cos(i),r=Math.sin(i),n=t.x,e=t.y,i=this.x,t=this.y;return this.x=Tt(n+(i-n)*o+(t-e)*r,3),this.y=Tt(e+(t-e)*o-(i-n)*r,3),this},Ht.prototype.multiply=function(t){return this.x*=t,this.y*=t,this},Ht.prototype.distanceTo=function(t){var e=this.x-t.x,t=this.y-t.y;return Math.sqrt(e*e+t*t)},Ht.onCircle=function(t,e,i){e=Ct(e);return new Ht(t.x-i*Math.cos(e),t.y-i*Math.sin(e))},Ht);function Ht(t,e){Dt.call(this),this.x=t||0,this.y=e||0}function Gt(t,e,i,o,r){r=Ct(r);return new Ut(i+(t-i)*Math.cos(r)+(e-o)*Math.sin(r),o-(t-i)*Math.sin(r)+(e-o)*Math.cos(r))}var Nt,qt=((Nt=C.Class)&&(Xt.__proto__=Nt),((Xt.prototype=Object.create(Nt&&Nt.prototype)).constructor=Xt).prototype.equals=function(t){return this.x1===t.x1&&this.x2===t.x2&&this.y1===t.y1&&this.y2===t.y2},Xt.prototype.width=function(){return this.x2-this.x1},Xt.prototype.height=function(){return this.y2-this.y1},Xt.prototype.translate=function(t,e){return this.x1+=t,this.x2+=t,this.y1+=e,this.y2+=e,this},Xt.prototype.move=function(t,e){var i=this.height(),o=this.width();return mt(t)&&(this.x1=t,this.x2=this.x1+o),mt(e)&&(this.y1=e,this.y2=this.y1+i),this},Xt.prototype.wrap=function(t){return this.x1=Math.min(this.x1,t.x1),this.y1=Math.min(this.y1,t.y1),this.x2=Math.max(this.x2,t.x2),this.y2=Math.max(this.y2,t.y2),this},Xt.prototype.wrapPoint=function(t){var e=x(t),i=e?t[0]:t.x,t=e?t[1]:t.y;return this.wrap(new Xt(i,t,i,t)),this},Xt.prototype.snapTo=function(t,e){return e!==v&&e||(this.x1=t.x1,this.x2=t.x2),e!==m&&e||(this.y1=t.y1,this.y2=t.y2),this},Xt.prototype.alignTo=function(t,e){var i,o,r=this.height(),n=this.width(),s=e===P||e===w?m:v,a=s==m?r:n;return e===A?(i=t.center(),o=this.center(),this.x1+=i.x-o.x,this.y1+=i.y-o.y):this[s+1]=e===P||e===S?t[s+1]-a:t[s+2],this.x2=this.x1+n,this.y2=this.y1+r,this},Xt.prototype.shrink=function(t,e){return this.x2-=t,this.y2-=e,this},Xt.prototype.expand=function(t,e){return this.shrink(-t,-e),this},Xt.prototype.pad=function(t){t=U(t);return this.x1-=t.left,this.x2+=t.right,this.y1-=t.top,this.y2+=t.bottom,this},Xt.prototype.unpad=function(t){t=U(t);return t.left=-t.left,t.top=-t.top,t.right=-t.right,t.bottom=-t.bottom,this.pad(t)},Xt.prototype.clone=function(){return new Xt(this.x1,this.y1,this.x2,this.y2)},Xt.prototype.center=function(){return new Ut(this.x1+this.width()/2,this.y1+this.height()/2)},Xt.prototype.containsPoint=function(t){return t.x>=this.x1&&t.x<=this.x2&&t.y>=this.y1&&t.y<=this.y2},Xt.prototype.points=function(){return[new Ut(this.x1,this.y1),new Ut(this.x2,this.y1),new Ut(this.x2,this.y2),new Ut(this.x1,this.y2)]},Xt.prototype.getHash=function(){return[this.x1,this.y1,this.x2,this.y2].join(",")},Xt.prototype.overlaps=function(t){return!(t.y2<this.y1||this.y2<t.y1||t.x2<this.x1||this.x2<t.x1)},Xt.prototype.rotate=function(t){var e=this.width(),i=this.height(),o=this.center(),r=o.x,n=o.y,s=Gt(0,0,r,n,t),a=Gt(e,0,r,n,t),o=Gt(e,i,r,n,t),t=Gt(0,i,r,n,t),e=Math.max(s.x,a.x,o.x,t.x)-Math.min(s.x,a.x,o.x,t.x),i=Math.max(s.y,a.y,o.y,t.y)-Math.min(s.y,a.y,o.y,t.y);return this.x2=this.x1+e,this.y2=this.y1+i,this},Xt.prototype.toRect=function(){return new C.geometry.Rect([this.x1,this.y1],[this.width(),this.height()])},Xt.prototype.hasSize=function(){return 0!==this.width()&&0!==this.height()},Xt.prototype.align=function(t,e,i){var o=e+1,r=e+2,n=e===v?"width":"height",e=this[n]();lt(i,[S,P])?(this[o]=t[o],this[r]=this[o]+e):lt(i,[k,w])?(this[r]=t[r],this[o]=this[r]-e):i===A&&(this[o]=t[o]+(t[n]()-e)/2,this[r]=this[o]+e)},Xt);function Xt(t,e,i,o){Nt.call(this),this.x1=t||0,this.y1=e||0,this.x2=i||0,this.y2=o||0}function Yt(t,e){return t-e}var Wt,Zt,Kt,$t=((Kt=C.Class)&&(ee.__proto__=Kt),((ee.prototype=Object.create(Kt&&Kt.prototype)).constructor=ee).prototype.clone=function(){return new ee(this.center,this.innerRadius,this.radius,this.startAngle,this.angle)},ee.prototype.middle=function(){return this.startAngle+this.angle/2},ee.prototype.setRadius=function(t,e){return e?this.innerRadius=t:this.radius=t,this},ee.prototype.point=function(t,e){var i=Ct(t),t=Math.cos(i),i=Math.sin(i),e=e?this.innerRadius:this.radius,t=Tt(this.center.x-t*e,3),e=Tt(this.center.y-i*e,3);return new Ut(t,e)},ee.prototype.adjacentBox=function(t,e,i){var o=this.clone().expand(t),r=o.middle(),n=o.point(r),s=e/2,a=i/2,t=Math.sin(Ct(r)),o=Math.cos(Ct(r)),r=n.x-s,n=n.y-a;return Math.abs(t)<.9&&(r+=s*-o/Math.abs(o)),Math.abs(o)<.9&&(n+=a*-t/Math.abs(t)),new qt(r,n,r+e,n+i)},ee.prototype.containsPoint=function(t){var e=this.center,i=this.innerRadius,o=this.radius,r=this.startAngle,n=this.startAngle+this.angle,s=t.x-e.x,a=t.y-e.y,t=new Ut(s,a),r=this.point(r),r=new Ut(r.x-e.x,r.y-e.y),n=this.point(n),e=new Ut(n.x-e.x,n.y-e.y),a=Tt(s*s+a*a,3);return(r.equals(t)||M(r,t))&&!M(e,t)&&i*i<=a&&a<=o*o},ee.prototype.getBBox=function(){for(var t=new qt(l,l,c,c),e=Tt(this.startAngle%360),i=Tt((e+this.angle)%360),o=this.innerRadius,r=[0,90,180,270,e,i].sort(Yt),n=r.indexOf(e),s=r.indexOf(i),a=e===i?r:n<s?r.slice(n,s+1):[].concat(r.slice(0,s+1),r.slice(n,r.length)),p=0;p<a.length;p++){var h=this.point(a[p]);t.wrapPoint(h),t.wrapPoint(h,o)}return o||t.wrapPoint(this.center),t},ee.prototype.expand=function(t){return this.radius+=t,this},ee),Jt=((Zt=$t)&&(te.__proto__=Zt),((te.prototype=Object.create(Zt&&Zt.prototype)).constructor=te).prototype.expand=function(t){return Zt.prototype.expand.call(this,t)},te.prototype.clone=function(){return new te(this.center,this.radius,this.startAngle,this.angle)},te.prototype.setRadius=function(t){return this.radius=t,this},te),K=((Wt=C.Class)&&(Qt.__proto__=Wt),((Qt.prototype=Object.create(Wt&&Wt.prototype)).constructor=Qt).prototype.createRing=function(t,e){var i=t.startAngle+180,o=t.angle+i;0<t.angle&&i===o&&(o+=.001);var r=new C.geometry.Point(t.center.x,t.center.y),n=Math.max(t.radius,0),t=Math.max(t.innerRadius,0),n=new C.geometry.Arc(r,{startAngle:i,endAngle:o,radiusX:n,radiusY:n}),e=C.drawing.Path.fromArc(n,e).close();return t?(n.radiusX=n.radiusY=t,n=n.pointAt(o),e.lineTo(n.x,n.y),e.arc(o,i,t,t,!0)):e.lineTo(r.x,r.y),e},Qt);function Qt(){Wt.apply(this,arguments)}function te(t,e,i,o){Zt.call(this,t,0,e,i,o)}function ee(t,e,i,o,r){Kt.call(this),this.center=t,this.innerRadius=e,this.radius=i,this.startAngle=o,this.angle=r}K.current=new K;var ie,oe=K,N=((ie=C.Class)&&(re.__proto__=ie),((re.prototype=Object.create(ie&&ie.prototype)).constructor=re).prototype.initUserOptions=function(t){return t},re.prototype.reflow=function(t){for(var e,i=this.children,o=0;o<i.length;o++){var r=i[o];r.reflow(t),e=e?e.wrap(r.box):r.box.clone()}this.box=e||t},re.prototype.destroy=function(){var t=this.children;this.animation&&this.animation.destroy();for(var e=0;e<t.length;e++)t[e].destroy()},re.prototype.getRoot=function(){var t=this.parent;return t?t.getRoot():null},re.prototype.getSender=function(){var t=this.getService();if(t)return t.sender},re.prototype.getService=function(){for(var t=this;t;){if(t.chartService)return t.chartService;t=t.parent}},re.prototype.translateChildren=function(t,e){for(var i=this.children,o=i.length,r=0;r<o;r++)i[r].box.translate(t,e)},re.prototype.append=function(){for(var t=arguments,e=0;e<arguments.length;e++){var i=t[e];this.children.push(i),i.parent=this}},re.prototype.renderVisual=function(){!1!==this.options.visible&&(this.createVisual(),this.addVisual(),this.renderChildren(),this.createAnimation(),this.renderComplete())},re.prototype.addVisual=function(){this.visual&&((this.visual.chartElement=this).parent&&this.parent.appendVisual(this.visual))},re.prototype.renderChildren=function(){for(var t=this.children,e=t.length,i=0;i<e;i++)t[i].renderVisual()},re.prototype.createVisual=function(){this.visual=new C.drawing.Group({zIndex:this.options.zIndex,visible:Rt(this.options.visible,!0)})},re.prototype.createAnimation=function(){this.visual&&this.options.animation&&(this.animation=C.drawing.Animation.create(this.visual,this.options.animation))},re.prototype.appendVisual=function(t){t.chartElement||(t.chartElement=this),t.options.noclip?this.clipRoot().visual.append(t):mt(t.options.zIndex)?this.stackRoot().stackVisual(t):this.isStackRoot?this.stackVisual(t):this.visual?this.visual.append(t):this.parent.appendVisual(t)},re.prototype.clipRoot=function(){return this.parent?this.parent.clipRoot():this},re.prototype.stackRoot=function(){return this.parent?this.parent.stackRoot():this},re.prototype.stackVisual=function(t){for(var e=t.options.zIndex||0,i=this.visual.children,o=i.length,r=0;r<o;r++){var n=i[r];if(Rt(n.options.zIndex,0)>e)break}this.visual.insert(r,t)},re.prototype.traverse=function(t){for(var e=this.children,i=e.length,o=0;o<i;o++){var r=e[o];t(r),r.traverse&&r.traverse(t)}},re.prototype.closest=function(t){for(var e=this,i=!1;e&&!i;)(i=t(e))||(e=e.parent);if(i)return e},re.prototype.renderComplete=function(){},re.prototype.hasHighlight=function(){var t=(this.options||{}).highlight;return!(!this.createHighlight||t&&!1===t.visible)},re.prototype.toggleHighlight=function(t,e){var i=this,o=(this.options||{}).highlight||{},r=o.visual,n=this._highlight;if(!n){var s={fill:{color:p,opacity:e||.2},stroke:{color:p,width:1,opacity:e||.2}};if(r){if(!(n=this._highlight=r(Object.assign(this.highlightVisualArgs(),{createVisual:function(){return i.createHighlight(s)},sender:this.getSender(),series:this.series,dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,runningTotal:this.runningTotal,total:this.total}))))return}else n=this._highlight=this.createHighlight(s);mt(n.options.zIndex)||(n.options.zIndex=Rt(o.zIndex,this.options.zIndex)),this.appendVisual(n)}n.visible(t)},re.prototype.createGradientOverlay=function(t,e,i){e=new C.drawing.Path(Object.assign({stroke:{color:"none"},fill:this.createGradient(i),closed:t.options.closed},e));return e.segments.elements(t.segments.elements()),e},re.prototype.createGradient=function(t){if(this.parent)return this.parent.createGradient(t)},re.prototype.supportsPointInactiveOpacity=function(){return!0},re);function re(t){ie.call(this),this.children=[],this.options=L({},this.options,this.initUserOptions(t))}N.prototype.options={};var ne,se=N,G=((ne=se)&&(ae.__proto__=ne),((ae.prototype=Object.create(ne&&ne.prototype)).constructor=ae).prototype.reflow=function(t){function e(){o.align(t,v,r.align),o.align(t,m,r.vAlign),o.paddingBox=i.clone().unpad(h).unpad(c)}var i,o=this,r=this.options,n=r.width,s=r.height,a=r.shrinkToFit,p=n&&s,h=r.margin,l=r.padding,c=r.border.width,u=t.clone();p&&(u.x2=u.x1+n,u.y2=u.y1+s),a&&u.unpad(h).unpad(c).unpad(l),ne.prototype.reflow.call(this,u),i=p?this.box=new qt(0,0,n,s):this.box,a&&p?(e(),u=this.contentBox=this.paddingBox.clone().unpad(l)):(u=this.contentBox=i.clone(),i.pad(l).pad(c).pad(h),e()),this.translateChildren(i.x1-u.x1+h.left+c+l.left,i.y1-u.y1+h.top+c+l.top);for(var d=this.children,g=0;g<d.length;g++){var f=d[g];f.reflow(f.box)}},ae.prototype.align=function(t,e,i){this.box.align(t,e,i)},ae.prototype.hasBox=function(){var t=this.options;return t.border.width||t.background},ae.prototype.createVisual=function(){ne.prototype.createVisual.call(this),this.options.visible&&this.hasBox()&&this.visual.append(C.drawing.Path.fromRect(this.paddingBox.toRect(),this.visualStyle()))},ae.prototype.visualStyle=function(){var t=this.options,e=t.border||{};return{stroke:{width:e.width,color:e.color,opacity:Rt(e.opacity,t.opacity),dashType:e.dashType},fill:{color:t.background,opacity:t.opacity},cursor:t.cursor}},ae);function ae(t){ne.call(this,t),this.options.margin=U(this.options.margin),this.options.padding=U(this.options.padding)}It(G,{align:S,vAlign:P,margin:{},padding:{},border:{color:a,width:0},background:"",shrinkToFit:!1,width:0,height:0,visible:!0});var pe,he=G,W=((pe=he)&&(le.__proto__=pe),((le.prototype=Object.create(pe&&pe.prototype)).constructor=le).prototype.getElement=function(){var t=this.options,e=this.paddingBox,i=t.type,o=t.rotation,r=e.center(),n=e.width()/2;if(!t.visible||!this.hasBox())return null;var s,a=this.visualStyle();return i===u?s=new C.drawing.Circle(new C.geometry.Circle([Tt(e.x1+n,3),Tt(e.y1+e.height()/2,3)],n),a):"triangle"===i?s=C.drawing.Path.fromPoints([[e.x1+n,e.y1],[e.x1,e.y2],[e.x2,e.y2]],a).close():"cross"===i?((s=new C.drawing.MultiPath(a)).moveTo(e.x1,e.y1).lineTo(e.x2,e.y2),s.moveTo(e.x1,e.y2).lineTo(e.x2,e.y1)):s=C.drawing.Path.fromRect(e.toRect(),a),o&&s.transform(C.geometry.transform().rotate(-o,[r.x,r.y])),s.options.zIndex=t.zIndex,s},le.prototype.createElement=function(){var t=this,e=this.options.visual,i=this.pointData||{};return e?e({value:i.value,dataItem:i.dataItem,sender:this.getSender(),series:i.series,category:i.category,rect:this.paddingBox.toRect(),options:this.visualOptions(),createVisual:function(){return t.getElement()}}):this.getElement()},le.prototype.visualOptions=function(){var t=this.options;return{background:t.background,border:t.border,margin:t.margin,padding:t.padding,type:t.type,size:t.width,visible:t.visible}},le.prototype.createVisual=function(){this.visual=this.createElement()},le);function le(t,e){pe.call(this,t),this.pointData=e}It(W,{type:u,align:A,vAlign:A});var ce=W,ue={glass:{type:"linear",rotation:0,stops:[{offset:0,color:p,opacity:0},{offset:.25,color:p,opacity:.3},{offset:1,color:p,opacity:0}]},sharpBevel:{type:"radial",stops:[{offset:0,color:p,opacity:.55},{offset:.65,color:p,opacity:0},{offset:.95,color:p,opacity:.25}]},roundedBevel:{type:"radial",stops:[{offset:.33,color:p,opacity:.06},{offset:.83,color:p,opacity:.2},{offset:.95,color:p,opacity:0}]},roundedGlass:{type:"radial",supportVML:!1,stops:[{offset:0,color:p,opacity:0},{offset:.5,color:p,opacity:.3},{offset:.99,color:p,opacity:0}]},sharpGlass:{type:"radial",supportVML:!1,stops:[{offset:0,color:p,opacity:.2},{offset:.15,color:p,opacity:.15},{offset:.17,color:p,opacity:.35},{offset:.85,color:p,opacity:.05},{offset:.87,color:p,opacity:.15},{offset:.99,color:p,opacity:0}]},bubbleShadow:{type:"radial",center:[.5,.5],radius:.5}};var de,Y=((de=se)&&(ge.__proto__=de),((ge.prototype=Object.create(de&&de.prototype)).constructor=ge).prototype.reflow=function(){var t=this.options,e=this.children,i=new qt(0,0,t.width,t.height);this.box=i.unpad(t.margin);for(var o=0;o<e.length;o++)e[o].reflow(i),i=function(t,e){if(t.x1===e.x1&&t.y1===e.y1&&t.x2===e.x2&&t.y2===e.y2)return e;var i=Math.min(t.x1,e.x1),o=Math.max(t.x1,e.x1),r=Math.min(t.x2,e.x2),n=Math.max(t.x2,e.x2),s=Math.min(t.y1,e.y1),a=Math.max(t.y1,e.y1),p=Math.min(t.y2,e.y2),h=Math.max(t.y2,e.y2),l=[];return l[0]=new qt(o,s,r,a),l[1]=new qt(i,a,o,p),l[2]=new qt(r,a,n,p),l[3]=new qt(o,p,r,h),t.x1===i&&t.y1===s||e.x1===i&&e.y1===s?(l[4]=new qt(i,s,o,a),l[5]=new qt(r,p,n,h)):(l[4]=new qt(r,s,n,a),l[5]=new qt(i,p,o,h)),at(l,function(t){return 0<t.height()&&0<t.width()})[0]}(i,e[o].box)||new qt},ge.prototype.createVisual=function(){this.visual=new C.drawing.Group,this.createBackground()},ge.prototype.createBackground=function(){var t=this.options,e=t.border||{},i=this.box.clone().pad(t.margin).unpad(e.width),t=C.drawing.Path.fromRect(i.toRect(),{stroke:{color:e.width?e.color:"",width:e.width,dashType:e.dashType},fill:{color:t.background,opacity:t.opacity},zIndex:-10});this.visual.append(t)},ge.prototype.getRoot=function(){return this},ge.prototype.createGradient=function(t){var e,s,i=this.gradients,o=Pt(t),r=ue[t.gradient];return i[o]?e=i[o]:(s=Object.assign({},r,t),"linear"===r.type?e=new C.drawing.LinearGradient(s):(t.innerRadius&&(s.stops=function(){for(var t=s.stops,e=s.innerRadius/s.radius*100,i=t.length,o=[],r=0;r<i;r++){var n=Object.assign({},t[r]);n.offset=(n.offset*(100-e)+e)/100,o.push(n)}return o}()),(e=new C.drawing.RadialGradient(s)).supportVML=!1!==r.supportVML),i[o]=e),e},ge.prototype.cleanGradients=function(){var t,e=this.gradients;for(t in e)e[t]._observers=[]},ge.prototype.size=function(){var t=this.options;return new qt(0,0,t.width,t.height)},ge);function ge(t){de.call(this,t);t=this.options;t.width=parseInt(t.width,10),t.height=parseInt(t.height,10),this.gradients={}}It(Y,{width:600,height:400,background:p,border:{color:a,width:0},margin:U(5),zIndex:-2});var fe,ye=Y,$=((fe=se)&&(ve.__proto__=fe),((ve.prototype=Object.create(fe&&fe.prototype)).constructor=ve).prototype._initDirection=function(){var t=this.options;t.vertical?(this.groupAxis=v,this.elementAxis=m,this.groupSizeField="width",this.elementSizeField="height",this.groupSpacing=t.spacing,this.elementSpacing=t.vSpacing):(this.groupAxis=m,this.elementAxis=v,this.groupSizeField="height",this.elementSizeField="width",this.groupSpacing=t.vSpacing,this.elementSpacing=t.spacing)},ve.prototype.reflow=function(t){this.box=t.clone(),this.reflowChildren()},ve.prototype.reflowChildren=function(){var t=this.box,e=this.elementAxis,i=this.groupAxis,o=this.elementSizeField,r=this.groupSizeField,n=this.groupOptions(),s=n.groups,a=n.groupsSize,p=n.maxGroupElementsSize,h=s.length,n=t[i+1]+this.alignStart(a,t[r]());if(h){for(var l=n,c=0;c<h;c++){for(var u=s[c],d=u.groupElements,g=t[e+1],f=d.length,y=0;y<f;y++){var v=d[y],m=this.elementSize(v),x=l+this.alignStart(m[r],u.groupSize),b=new qt;b[i+1]=x,b[i+2]=x+m[r],b[e+1]=g,b[e+2]=g+m[o],v.reflow(b),g+=m[o]+this.elementSpacing}l+=u.groupSize+this.groupSpacing}t[i+1]=n,t[i+2]=n+a,t[e+2]=t[e+1]+p}},ve.prototype.alignStart=function(t,e){var i=0,o=this.options.align;return o===k||o===w?i=e-t:o===A&&(i=(e-t)/2),i},ve.prototype.groupOptions=function(){for(var t=this.box,e=this.children,i=this.elementSizeField,o=this.groupSizeField,r=this.elementSpacing,n=this.groupSpacing,s=Tt(t[i]()),a=e.length,p=[],h=0,l=0,c=0,u=0,d=[],g=0;g<a;g++){var f=e[g];f.box||f.reflow(t);var y=this.elementSize(f);this.options.wrap&&Tt(l+r+y[i])>s&&(p.push({groupElements:d,groupSize:h,groupElementsSize:l}),u=Math.max(u,l),c+=n+h,l=h=0,d=[]),h=Math.max(h,y[o]),0<l&&(l+=r),l+=y[i],d.push(f)}return p.push({groupElements:d,groupSize:h,groupElementsSize:l}),{groups:p,groupsSize:c+=h,maxGroupElementsSize:u=Math.max(u,l)}},ve.prototype.elementSize=function(t){return{width:t.box.width(),height:t.box.height()}},ve.prototype.createVisual=function(){},ve);function ve(t){fe.call(this,t),this._initDirection()}It($,{vertical:!0,wrap:!0,vSpacing:0,spacing:0});var me,xe=$,be=C.drawing.Text,K=((me=se)&&(_e.__proto__=me),((_e.prototype=Object.create(me&&me.prototype)).constructor=_e).prototype.reflow=function(t){var e=this.options,e=e.size=C.drawing.util.measureText(this.content,{font:e.font});this.baseline=e.baseline,this.box=new qt(t.x1,t.y1,t.x1+e.width,t.y1+e.height)},_e.prototype.createVisual=function(){var t=this.options,e=t.font,i=t.color,o=t.opacity,t=t.cursor;this.visual=new be(this.content,this.box.toRect().topLeft(),{font:e,fill:{color:i,opacity:o},cursor:t})},_e);function _e(t,e){me.call(this,e),this.content=t,this.reflow(new qt)}It(K,{font:"12px sans-serif",color:a});var we=K;function Ae(t){var e=t.origin,t=t.bottomRight();return new qt(e.x,e.y,t.x,t.y)}var Se,ke,Pe=/\n/m,Ce=((ke=he)&&(Me.__proto__=ke),((Me.prototype=Object.create(ke&&ke.prototype)).constructor=Me).prototype._initContainer=function(){var t=this.options,e=String(this.content).split(Pe),i=new xe({vertical:!0,align:t.align,wrap:!1}),o=L({},t,{opacity:1,animation:null});this.container=i,this.append(i);for(var r=0;r<e.length;r++){var n=new we(e[r].trim(),o);i.append(n)}},Me.prototype.reflow=function(t){var e,i=this.options,o=i.visual;this.container.options.align=i.align,o&&!this._boxReflow?((e=t).hasSize()||(this._boxReflow=!0,this.reflow(e),this._boxReflow=!1,e=this.box),(o=this.visual=o(this.visualContext(e)))&&(e=Ae(o.clippedBBox()||new C.geometry.Rect),o.options.zIndex=i.zIndex),this.box=this.contentBox=this.paddingBox=e):(ke.prototype.reflow.call(this,t),i.rotation&&(e=U(i.margin),i=this.box.unpad(e),this.targetBox=t,this.normalBox=i.clone(),(i=this.rotate()).translate(e.left-e.right,e.top-e.bottom),this.rotatedBox=i.clone(),i.pad(e)))},Me.prototype.createVisual=function(){var t=this.options;this.visual=new C.drawing.Group({transform:this.rotationTransform(),zIndex:t.zIndex,noclip:t.noclip}),this.hasBox()&&(t=C.drawing.Path.fromRect(this.paddingBox.toRect(),this.visualStyle()),this.visual.append(t))},Me.prototype.renderVisual=function(){var t;this.options.visible&&(this.options.visual?((t=this.visual)&&!mt(t.options.noclip)&&(t.options.noclip=this.options.noclip),this.addVisual(),this.createAnimation()):ke.prototype.renderVisual.call(this))},Me.prototype.visualContext=function(t){var e=this,i={text:this.content,rect:t.toRect(),sender:this.getSender(),options:this.options,createVisual:function(){return e._boxReflow=!0,e.reflow(t),e._boxReflow=!1,e.getDefaultVisual()}};return this.data&&Object.assign(i,this.data),i},Me.prototype.getDefaultVisual=function(){this.createVisual(),this.renderChildren();var t=this.visual;return delete this.visual,t},Me.prototype.rotate=function(){var t=this.options;return this.box.rotate(t.rotation),this.align(this.targetBox,v,t.align),this.align(this.targetBox,m,t.vAlign),this.box},Me.prototype.rotationTransform=function(){var t=this.options.rotation;if(!t)return null;var e=this.normalBox.center(),i=e.x,o=e.y,e=this.rotatedBox.center();return C.geometry.transform().translate(e.x-i,e.y-o).rotate(t,[i,o])},Me),N=((Se=se)&&(Te.__proto__=Se),((Te.prototype=Object.create(Se&&Se.prototype)).constructor=Te).prototype.reflow=function(t){Se.prototype.reflow.call(this,t),this.box.snapTo(t,v)},Te.buildTitle=function(t,e,i){var o,t="string"==typeof t?{text:t}:t;return(t=Object.assign({visible:!0},i,t))&&t.visible&&t.text&&(o=new Te(t),e.append(o)),o},Te);function Te(t){Se.call(this,t),this.append(new Ce(this.options.text,Object.assign({},this.options,{vAlign:this.options.position})))}function Me(t,e,i){ke.call(this,e),this.content=t,this.data=i,this._initContainer(),!1!==this.options._autoReflow&&this.reflow(new qt)}It(N,{color:a,position:P,align:A,margin:U(5),padding:U(5)});var Re,Oe=N,G=((Re=Ce)&&(Ie.__proto__=Re),((Ie.prototype=Object.create(Re&&Re.prototype)).constructor=Ie).prototype.visualContext=function(t){t=Re.prototype.visualContext.call(this,t);return t.value=this.value,t.dataItem=this.dataItem,t.format=this.options.format,t.culture=this.options.culture,t},Ie.prototype.click=function(t,e){t.trigger("axisLabelClick",{element:wt(e),value:this.value,text:this.text,index:this.index,dataItem:this.dataItem,axis:this.parent.options})},Ie.prototype.rotate=function(){var t,e;return this.options.alignRotation!==A?(t=this.normalBox.toRect(),e=this.rotationTransform(),this.box=Ae(t.bbox(e.matrix()))):Re.prototype.rotate.call(this),this.box},Ie.prototype.rotationTransform=function(){var t=this.options,e=t.rotation;if(!e)return null;if(t.alignRotation===A)return Re.prototype.rotationTransform.call(this);var i=C.geometry.transform().rotate(e).matrix(),o=this.normalBox.toRect(),r=this.targetBox.toRect(),n=t.rotationOrigin||P,s=n===P||n===w?v:m,a=n===P||n===w?m:v,p=n===P||n===S?r.origin:r.bottomRight(),h=o.topLeft().transformCopy(i),l=o.topRight().transformCopy(i),t=o.bottomRight().transformCopy(i),n=o.bottomLeft().transformCopy(i),o=C.geometry.Rect.fromPoints(h,l,t,n),i={};i[a]=r.origin[a]-o.origin[a];var o=Math.abs(h[a]+i[a]-p[a]),a=Math.abs(l[a]+i[a]-p[a]),n=Tt(o,f)===Tt(a,f)?(c=h,l):a<o?(c=l,t):(c=h,n),c=c[s]+(n[s]-c[s])/2;return i[s]=r.center()[s]-c,C.geometry.transform().translate(i.x,i.y).rotate(e)},Ie);function Ie(t,e,i,o,r){Re.call(this,e,r),this.text=e,this.value=t,this.index=i,this.dataItem=o,this.reflow(new qt)}It(G,{_autoReflow:!1});var je,Be=G,W=((je=he)&&(Ve.__proto__=je),((Ve.prototype=Object.create(je&&je.prototype)).constructor=Ve).prototype.hide=function(){this.options.visible=!1},Ve.prototype.show=function(){this.options.visible=!0},Ve.prototype.render=function(){var t,e,i,o,r,n,s,a,p=this,h=this.options;h.visible&&(i=h.label,a=h.icon,o=new qt,r=function(){return p},n=a.size,s=this.fields.text,mt(i)&&i.visible&&((h=ot(i))?s=h(this.fields):i.format&&(s=this.chartService.format.auto(i.format,s)),i.color||(i.color="inside"===i.position?"#fff":a.background),this.label=new Ce(s,L({},i)),this.label.aliasFor=r,"inside"!==i.position||mt(n)||(a.type===u?n=Math.max(this.label.box.width(),this.label.box.height()):(t=this.label.box.width(),e=this.label.box.height()),o.wrap(this.label.box))),a.width=t||n||7,a.height=e||n||7,(a=new ce(L({},a))).aliasFor=r,this.marker=a,this.append(a),this.label&&this.append(this.label),a.reflow(new qt),this.wrapperBox=o.wrap(a.box))},Ve.prototype.reflow=function(t){var e,i,o,r=this.options,n=this.label,s=this.marker,a=this.wrapperBox,p=t.center(),h=r.line.length,l=r.position;r.visible&&(lt(l,[S,k])?l===S?(o=a.alignTo(t,l).translate(-h,t.center().y-a.center().y),r.line.visible&&(e=[t.x1,p.y],this.linePoints=[e,[o.x2,p.y]],i=o.clone().wrapPoint(e))):(o=a.alignTo(t,l).translate(h,t.center().y-a.center().y),r.line.visible&&(e=[t.x2,p.y],this.linePoints=[e,[o.x1,p.y]],i=o.clone().wrapPoint(e))):l===w?(o=a.alignTo(t,l).translate(t.center().x-a.center().x,h),r.line.visible&&(e=[p.x,t.y2],this.linePoints=[e,[p.x,o.y1]],i=o.clone().wrapPoint(e))):(o=a.alignTo(t,l).translate(t.center().x-a.center().x,-h),r.line.visible&&(e=[p.x,t.y1],this.linePoints=[e,[p.x,o.y2]],i=o.clone().wrapPoint(e))),s&&s.reflow(o),n&&(n.reflow(o),s&&("outside"===r.label.position&&n.box.alignTo(s.box,l),n.reflow(n.box))),this.contentBox=o,this.targetBox=t,this.box=i||o)},Ve.prototype.createVisual=function(){je.prototype.createVisual.call(this),this.visual.options.noclip=this.options.noclip,this.options.visible&&this.createLine()},Ve.prototype.renderVisual=function(){var e=this,t=this.options,i=t.visual;t.visible&&i?(this.visual=i(Object.assign(this.fields,{sender:this.getSender(),rect:this.targetBox.toRect(),options:{background:t.background,border:t.background,icon:t.icon,label:t.label,line:t.line,position:t.position,visible:t.visible},createVisual:function(){e.createVisual(),e.renderChildren();var t=e.visual;return delete e.visual,t}})),this.addVisual()):je.prototype.renderVisual.call(this)},Ve.prototype.createLine=function(){var t=this.options.line;this.linePoints&&(T(t=C.drawing.Path.fromPoints(this.linePoints,{stroke:{color:t.color,width:t.width,dashType:t.dashType}})),this.visual.append(t))},Ve.prototype.click=function(t,e){var i=this.eventArgs(e);t.trigger("noteClick",i)||e.preventDefault()},Ve.prototype.over=function(t,e){var i=this.eventArgs(e);t.trigger("noteHover",i)||e.preventDefault()},Ve.prototype.out=function(t,e){e=this.eventArgs(e);t.trigger("noteLeave",e)},Ve.prototype.eventArgs=function(t){var e=this.options;return Object.assign(this.fields,{element:wt(t),text:mt(e.label)?e.label.text:"",visual:this.visual})},Ve);function Ve(t,e,i){je.call(this,e),this.fields=t,this.chartService=i,this.render()}It(W,{icon:{visible:!0,type:u},label:{position:"inside",visible:!0,align:A,vAlign:A},line:{visible:!0},visible:!0,position:P,zIndex:2});var Le=W;function ze(t,e){var i=t.tickX,o=t.tickY,r=t.position,n=new C.drawing.Path({stroke:{width:e.width,color:e.color}});return t.vertical?n.moveTo(i,r).lineTo(i+e.size,r):n.moveTo(r,o).lineTo(r,o+e.size),T(n),n}function Ee(t,e){var i=t.lineStart,o=t.lineEnd,r=t.position,e=new C.drawing.Path({stroke:{width:e.width,color:e.color,dashType:e.dashType}});return t.vertical?e.moveTo(i,r).lineTo(o,r):e.moveTo(r,i).lineTo(r,o),T(e),e}var Fe,Y=((Fe=se)&&(De.__proto__=Fe),((De.prototype=Object.create(Fe&&Fe.prototype)).constructor=De).prototype.initFields=function(){},De.prototype.labelsRange=function(){return{min:this.options.labels.skip,max:this.labelsCount()}},De.prototype.createLabels=function(){var t=this.options,e=t.vertical?k:A,i=L({},t.labels,{align:e,zIndex:t.zIndex}),o=Math.max(1,i.step);if(this.clearLabels(),i.visible){var r=this.labelsRange(),e=i.rotation;z(e)&&(i.alignRotation=e.align,i.rotation=e.angle),"auto"===i.rotation&&(i.rotation=0,t.autoRotateLabels=!0);for(var n=r.min;n<r.max;n+=o){var s=this.createAxisLabel(n,i);s&&(this.append(s),this.labels.push(s))}}},De.prototype.clearLabels=function(){this.children=at(this.children,function(t){return!(t instanceof Be)}),this.labels=[]},De.prototype.clearTitle=function(){var e=this;this.title&&(this.children=at(this.children,function(t){return t!==e.title}),this.title=void 0)},De.prototype.clear=function(){this.clearLabels(),this.clearTitle()},De.prototype.lineBox=function(){var t=this.options,e=this.box,i=t.vertical,o=t.labels.mirror,r=o?e.x1:e.x2,o=o?e.y2:e.y1,t=t.line.width||0;return i?new qt(r,e.y1,r,e.y2-t):new qt(e.x1,o,e.x2-t,o)},De.prototype.createTitle=function(){var t=this.options,t=L({rotation:t.vertical?-90:0,text:"",zIndex:1,visualSize:!0},t.title);t.visible&&t.text&&(t=new Ce(t.text,t),this.append(t),this.title=t)},De.prototype.createNotes=function(){var t=this.options,e=t.notes,i=e.data||[];this.notes=[];for(var o=0;o<i.length;o++){var r=L({},e,i[o]);r.value=this.parseNoteValue(r.value);r=new Le({value:r.value,text:r.label.text,dataItem:r},r,this.chartService);r.options.visible&&(mt(r.options.position)?t.vertical&&!lt(r.options.position,[S,k])?r.options.position=t.reverse?S:k:t.vertical||lt(r.options.position,[P,w])||(r.options.position=t.reverse?w:P):t.vertical?r.options.position=t.reverse?S:k:r.options.position=t.reverse?w:P,this.append(r),this.notes.push(r))}},De.prototype.parseNoteValue=function(t){return t},De.prototype.renderVisual=function(){Fe.prototype.renderVisual.call(this),this.createPlotBands()},De.prototype.createVisual=function(){Fe.prototype.createVisual.call(this),this.createBackground(),this.createLine()},De.prototype.gridLinesVisual=function(){var t=this._gridLines;return t||(t=this._gridLines=new C.drawing.Group({zIndex:-2}),this.appendVisual(this._gridLines)),t},De.prototype.createTicks=function(s){var t=this.options,a=this.lineBox(),p=t.labels.mirror,e=t.majorTicks.visible?t.majorUnit:0,h={vertical:t.vertical};function i(t,e,i){var o=t.length,r=Math.max(1,e.step);if(e.visible)for(var n=e.skip;n<o;n+=r)mt(i)&&n%i==0||(h.tickX=p?a.x2:a.x2-e.size,h.tickY=p?a.y1-e.size:a.y1,h.position=t[n],s.append(ze(h,e)))}i(this.getMajorTickPositions(),t.majorTicks),i(this.getMinorTickPositions(),t.minorTicks,e/t.minorUnit)},De.prototype.createLine=function(){var t=this.options,e=t.line,i=this.lineBox();0<e.width&&e.visible&&((e=new C.drawing.Path({stroke:{width:e.width,color:e.color,dashType:e.dashType}})).moveTo(i.x1,i.y1).lineTo(i.x2,i.y2),t._alignLines&&T(e),(t=this._lineGroup=new C.drawing.Group).append(e),this.visual.append(t),this.createTicks(t))},De.prototype.getActualTickSize=function(){var t=this.options,e=0;return t.majorTicks.visible&&t.minorTicks.visible?e=Math.max(t.majorTicks.size,t.minorTicks.size):t.majorTicks.visible?e=t.majorTicks.size:t.minorTicks.visible&&(e=t.minorTicks.size),e},De.prototype.createBackground=function(){var t=this.options,e=this.box,t=t.background;t&&(this._backgroundPath=C.drawing.Path.fromRect(e.toRect(),{fill:{color:t},stroke:null}),this.visual.append(this._backgroundPath))},De.prototype.createPlotBands=function(){var e=this,t=this.options,i=t.plotBands||[],o=t.vertical,r=this.plotArea;if(0!==i.length){for(var n=this._plotbandGroup=new C.drawing.Group({zIndex:-1}),s=at(this.pane.axes,function(t){return t.options.vertical!==e.options.vertical})[0],a=0;a<i.length;a++){var p=i[a],h=void 0,l=void 0,c=p.label,u=void 0,l=o?(h=(s||r.axisX).lineBox(),this.getSlot(p.from,p.to,!0)):(h=this.getSlot(p.from,p.to,!0),(s||r.axisY).lineBox());c&&(c.vAlign=c.position||S,u=this.createPlotBandLabel(c,p,new qt(h.x1,l.y1,h.x2,l.y2))),0!==h.width()&&0!==l.height()&&(l=new C.geometry.Rect([h.x1,l.y1],[h.width(),l.height()]),p=C.drawing.Path.fromRect(l,{fill:{color:p.color,opacity:p.opacity},stroke:null}),n.append(p),u&&n.append(u))}this.appendVisual(n)}},De.prototype.createPlotBandLabel=function(t,e,i){if(!1===t.visible)return null;var o,r=t.text;return mt(t)&&t.visible&&((o=ot(t))?r=o({text:r,item:e}):t.format&&(r=this.chartService.format.auto(t.format,r)),t.color||(t.color=this.options.labels.color)),(t=new Ce(r,t)).reflow(i),t.renderVisual(),t.visual},De.prototype.createGridLines=function(t){var e=this.options,i=e.minorGridLines,o=e.majorGridLines,r=e.minorUnit,n=e.vertical,a=t.options.line.visible,e=o.visible?e.majorUnit:0,t=t.lineBox(),p=t[n?"y1":"x1"],h={lineStart:t[n?"x1":"y1"],lineEnd:t[n?"x2":"y2"],vertical:n},l=[],c=this.gridLinesVisual();function s(t,e,i){var o=t.length,r=Math.max(1,e.step);if(e.visible)for(var n=e.skip;n<o;n+=r){var s=Tt(t[n]);lt(s,l)||n%i==0||a&&p===s||(h.position=s,c.append(Ee(h,e)),l.push(s))}}return s(this.getMajorTickPositions(),o),s(this.getMinorTickPositions(),i,e/r),c.children},De.prototype.reflow=function(t){for(var e=this.options,i=this.labels,o=this.title,r=e.vertical,n=i.length,s=r?"width":"height",o=o?o.box[s]():0,a=this.getActualTickSize()+e.margin+o,p=((this.getRoot()||{}).box||t)[s](),h=0,l=0;l<n;l++){var c=i[l].box[s]();c+a<=p&&(h=Math.max(h,c))}this.box=r?new qt(t.x1,t.y1,t.x1+h+a,t.y2):new qt(t.x1,t.y1,t.x2,t.y1+h+a),this.arrangeTitle(),this.arrangeLabels(),this.arrangeNotes()},De.prototype.getLabelsTickPositions=function(){return this.getMajorTickPositions()},De.prototype.labelTickIndex=function(t){return t.index},De.prototype.arrangeLabels=function(){for(var t=this.options,e=this.labels,i=this.labelsBetweenTicks(),o=t.vertical,r=this.lineBox(),n=t.labels.mirror,s=this.getLabelsTickPositions(),a=this.getActualTickSize()+t.margin,p=0;p<e.length;p++){var h,l=e[p],c=this.labelTickIndex(l),u=o?l.box.height():l.box.width(),d=s[c]-u/2,g=void 0,f=void 0,y=void 0,g=o?(i&&(d=(f=s[c])+((y=s[c+1])-f)/2-u/2),h=r.x2,n?(h+=a,l.options.rotationOrigin=S):(h-=a+l.box.width(),l.options.rotationOrigin=k),l.box.move(h,d)):(y=i?(f=s[c],s[c+1]):(f=d)+u,u=r.y1,n?(u-=a+l.box.height(),l.options.rotationOrigin=w):(u+=a,l.options.rotationOrigin=P),new qt(f,u,y,u+l.box.height()));l.reflow(g)}},De.prototype.autoRotateLabels=function(){if(this.options.autoRotateLabels&&!this.options.vertical){for(var t,e=this.getMajorTickPositions(),i=this.labels,o=0;o<i.length;o++){var r=Math.abs(e[o+1]-e[o]),n=i[o].box;if(n.width()>r){if(n.height()>r){t=-90;break}t=-45}}if(t){for(var s=0;s<i.length;s++)i[s].options.rotation=t,i[s].reflow(new qt);return!0}}},De.prototype.arrangeTitle=function(){var t=this.options,e=this.title,i=t.labels.mirror,t=t.vertical;e&&(t?(e.options.align=i?k:S,e.options.vAlign=e.options.position):(e.options.align=e.options.position,e.options.vAlign=i?P:w),e.reflow(this.box))},De.prototype.arrangeNotes=function(){for(var t=0;t<this.notes.length;t++){var e=this.notes[t],i=e.options.value,o=void 0;mt(i)?(this.shouldRenderNote(i)?e.show():e.hide(),o=this.noteSlot(i)):e.hide(),e.reflow(o||this.lineBox())}},De.prototype.noteSlot=function(t){return this.getSlot(t)},De.prototype.alignTo=function(t){var e=t.lineBox(),i=this.options.vertical,t=i?m:v;this.box.snapTo(e,t),i?this.box.shrink(0,this.lineBox().height()-e.height()):this.box.shrink(this.lineBox().width()-e.width(),0),this.box[t+1]-=this.lineBox()[t+1]-e[t+1],this.box[t+2]-=this.lineBox()[t+2]-e[t+2]},De.prototype.axisLabelText=function(t,e,i){var o=ot(i),r=t;return o?r=o({value:t,dataItem:e,format:i.format,culture:i.culture}):i.format&&(r=this.chartService.format.localeAuto(i.format,[t],i.culture)),r},De.prototype.slot=function(t,e,i){i=this.getSlot(t,e,i);if(i)return i.toRect()},De.prototype.contentBox=function(){var t,e,i=this.box.clone(),o=this.labels;return o.length&&(t=this.options.vertical?m:v,this.chartService.isPannable(t)?(e=this.maxLabelOffset(),i[t+1]-=e.start,i[t+2]+=e.end):(o[0].options.visible&&i.wrap(o[0].box),(o=o[o.length-1]).options.visible&&i.wrap(o.box))),i},De.prototype.maxLabelOffset=function(){for(var t=this.options,e=t.vertical,t=t.reverse,i=this.labelsBetweenTicks(),o=this.getLabelsTickPositions(),r=e?m:v,n=this.labels,s=t?1:0,a=t?0:1,p=0,h=0,l=0;l<n.length;l++){var c=n[l],u=this.labelTickIndex(c),d=void 0,g=void 0;i?(d=o[u+s],g=o[u+a]):d=g=o[u],p=Math.max(p,d-c.box[r+1]),h=Math.max(h,c.box[r+2]-g)}return{start:p,end:h}},De.prototype.limitRange=function(t,e,i,o,r){var n=this.options;if(t<i&&r<0&&(!mt(n.min)||n.min<=i)||o<e&&0<r&&(!mt(n.max)||o<=n.max))return null;if(e<i&&0<r||o<t&&r<0)return{min:t,max:e};var s=e-t,a=t,n=e;return t<i&&r<0?(a=kt(t,i,o),n=kt(t+s,i+s,o)):o<e&&0<r&&(n=kt(e,i,o),a=kt(e-s,i,o-s)),{min:a,max:n}},De.prototype.valueRange=function(){return{min:this.seriesMin,max:this.seriesMax}},De.prototype.labelsBetweenTicks=function(){return!this.options.justified},De.prototype.prepareUserOptions=function(){},De);function De(t,e){void 0===e&&(e=new Q),Fe.call(this,t),this.chartService=e,this.options.visible||(this.options=L({},this.options,{labels:{visible:!1},line:{visible:!1},margin:0,majorTickSize:0,minorTickSize:0})),this.options.minorTicks=L({},{color:this.options.line.color,width:this.options.line.width,visible:this.options.minorTickType!==r},this.options.minorTicks,{size:this.options.minorTickSize,align:this.options.minorTickType}),this.options.majorTicks=L({},{color:this.options.line.color,width:this.options.line.width,visible:this.options.majorTickType!==r},this.options.majorTicks,{size:this.options.majorTickSize,align:this.options.majorTickType}),this.initFields(),this.options._deferLabels||this.createLabels(),this.createTitle(),this.createNotes()}It(Y,{labels:{visible:!0,rotation:0,mirror:!1,step:1,skip:0},line:{width:1,color:a,visible:!0},title:{visible:!0,position:A},majorTicks:{align:"outside",size:4,skip:0,step:1},minorTicks:{align:"outside",size:3,skip:0,step:1},axisCrossingValue:0,majorTickType:"outside",minorTickType:r,majorGridLines:{skip:0,step:1},minorGridLines:{visible:!1,width:1,color:a,skip:0,step:1},margin:5,visible:!0,reverse:!1,justified:!0,notes:{label:{text:""}},_alignLines:!0,_deferLabels:!1});var Ue=Y,He="milliseconds",Ge="seconds",Ne="minutes",qe="hours",Xe="days",Ye="weeks",We="months",Ze="years",Ke=1e3,$e=60*Ke,Je=60*$e,Qe=24*Je,ti=7*Qe,ei=31*Qe,ii=365*Qe,oi={years:ii,months:ei,weeks:ti,days:Qe,hours:Je,minutes:$e,seconds:Ke,milliseconds:1};function ri(t,e){return t.getTime()-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*$e}function ni(t,e){return new Date(t.getTime()+e)}function si(t){var e;return t instanceof Date?e=t:t&&(e=new Date(t)),e}function ai(t,e){return 0===e&&23===t.getHours()&&(t.setHours(t.getHours()+2),1)}function pi(t,e,i,o){var r,n,s=t;return t&&(n=(r=si(t)).getHours(),i===Ze?ai(s=new Date(r.getFullYear()+e,0,1),0):i===We?ai(s=new Date(r.getFullYear(),r.getMonth()+e,1),n):i===Ye?ai(s=pi(function(t,e){void 0===e&&(e=0);var i=0,o=t.getDay();if(!isNaN(o))for(;o!==e;)0===o?o=6:o--,i++;return ni(t,-i*Qe)}(r,o),7*e,Xe),n):i===Xe?ai(s=new Date(r.getFullYear(),r.getMonth(),r.getDate()+e),n):i===qe?(t=r,o=e,(n=new Date(t)).setMinutes(0,0,0),s=ni(n,(t.getTimezoneOffset()-n.getTimezoneOffset())*$e+o*Je)):i===Ne?0<(s=ni(r,e*$e)).getSeconds()&&s.setSeconds(0):i===Ge?s=ni(r,e*Ke):i===He&&(s=ni(r,e)),i!==He&&0<s.getMilliseconds()&&s.setMilliseconds(0)),s}function hi(t,e,i){return pi(si(t),0,e,i)}function li(t,e,i){t=si(t);return t&&hi(t,e,i).getTime()===t.getTime()?t:pi(t,1,e,i)}function ci(t,e){return t&&e?t.getTime()-e.getTime():-1}function ui(t,e){return t.getTime()-e}function di(t){if(x(t)){for(var e=[],i=0;i<t.length;i++)e.push(di(t[i]));return e}if(t)return si(t).getTime()}function gi(t,e){return t&&e?di(t)===di(e):t===e}function fi(t,e,i){return ri(t,e)/oi[i]}function yi(t,e,i,o){var r=si(t),t=si(e);return(i===We?r.getMonth()-t.getMonth()+12*(r.getFullYear()-t.getFullYear())+fi(r,new Date(r.getFullYear(),r.getMonth()),Xe)/new Date(r.getFullYear(),r.getMonth()+1,0).getDate():i===Ze?r.getFullYear()-t.getFullYear()+yi(r,new Date(r.getFullYear(),0),We,1)/12:i===Xe||i===Ye?fi(r,t,i):ui(r,e)/oi[i])/o}function vi(t,e,i){return i===Ze?e.getFullYear()-t.getFullYear():i===We?12*vi(t,e,Ze)+e.getMonth()-t.getMonth():i===Xe?Math.floor(ui(e,t)/Qe):Math.floor(ui(e,t)/oi[i])}function mi(t,e){return O(e)&&t.parseDate(e)||si(e)}function xi(t,e){if(x(e)){for(var i=[],o=0;o<e.length;o++)i.push(mi(t,e[o]));return i}return mi(t,e)}function bi(t,e){return R(t.weekStartDay)?t.weekStartDay:e.firstDay?e.firstDay():0}var _i,$=((_i=Ue)&&(wi.__proto__=_i),((wi.prototype=Object.create(_i&&_i.prototype)).constructor=wi).prototype.initFields=function(){this._ticks={}},wi.prototype.categoriesHash=function(){return""},wi.prototype.clone=function(){var t=new wi(Object.assign({},this.options,{categories:this.options.srcCategories}),this.chartService);return t.createLabels(),t},wi.prototype.initUserOptions=function(t){var e=t.categories||[],i=mt(t.min),o=mt(t.max);return t.srcCategories=t.categories=e,(i||o)&&e.length&&(i=i?Math.floor(t.min):0,e=o?t.justified?Math.floor(t.max)+1:Math.ceil(t.max):e.length,t.categories=t.categories.slice(i,e)),t},wi.prototype.rangeIndices=function(){var t=this.options,e=t.categories.length||1;return{min:R(t.min)?t.min%1:0,max:R(t.max)&&t.max%1!=0&&t.max<this.totalRange().max?e-(1-t.max%1):e-(t.justified?1:0)}},wi.prototype.totalRangeIndices=function(t){var e=this.options,i=R(e.min)?e.min:0;return e=R(e.max)?e.max:R(e.min)?i+e.categories.length:this.totalRange().max||1,t&&(t=this.totalRange(),i=kt(i,0,t.max),e=kt(e,0,t.max)),{min:i,max:e}},wi.prototype.range=function(){var t=this.options;return{min:R(t.min)?t.min:0,max:(R(t.max)?t:this.totalRange()).max}},wi.prototype.roundedRange=function(){return this.range()},wi.prototype.totalRange=function(){var t=this.options;return{min:0,max:Math.max(this._seriesMax||0,t.srcCategories.length)-(t.justified?1:0)}},wi.prototype.scaleOptions=function(){var t=this.rangeIndices(),e=t.min,i=t.max,t=this.lineBox();return{scale:(this.options.vertical?t.height():t.width())/(i-e||1)*(this.options.reverse?-1:1),box:t,min:e,max:i}},wi.prototype.arrangeLabels=function(){_i.prototype.arrangeLabels.call(this),this.hideOutOfRangeLabels()},wi.prototype.hideOutOfRangeLabels=function(){var t,e,i,o=this.box,r=this.labels;r.length&&(e=o[(t=this.options.vertical?m:v)+1],i=o[t+2],o=r[0],r=St(r),(o.box[t+1]>i||o.box[t+2]<e)&&(o.options.visible=!1),(r.box[t+1]>i||r.box[t+2]<e)&&(r.options.visible=!1))},wi.prototype.getMajorTickPositions=function(){return this.getTicks().majorTicks},wi.prototype.getMinorTickPositions=function(){return this.getTicks().minorTicks},wi.prototype.getLabelsTickPositions=function(){return this.getTicks().labelTicks},wi.prototype.tickIndices=function(t){for(var e=this.rangeIndices(),i=e.min,e=e.max,o=Math.ceil(e),r=Math.floor(i),n=[];r<=o;)n.push(r),r+=t;return n},wi.prototype.getTickPositions=function(t){for(var e=this.options,i=e.vertical,o=e.reverse,r=this.scaleOptions(),n=r.scale,e=r.box,s=r.min,a=e[(i?m:v)+(o?2:1)],p=this.tickIndices(t),h=[],l=0;l<p.length;l++)h.push(a+Tt(n*(p[l]-s),3));return h},wi.prototype.getTicks=function(){var t=this.options,e=this._ticks,i=this.rangeIndices(),o=this.lineBox(),i=o.getHash()+i.min+","+i.max+t.reverse+t.justified;return e._hash!==i&&(t=t.minorTicks.visible||t.minorGridLines.visible,e._hash=i,e.labelTicks=this.getTickPositions(1),e.majorTicks=this.filterOutOfRangePositions(e.labelTicks,o),e.minorTicks=t?this.filterOutOfRangePositions(this.getTickPositions(.5),o):[]),e},wi.prototype.filterOutOfRangePositions=function(t,e){if(!t.length)return t;for(var i=this.options.vertical?m:v,o=function(t){return e[i+1]<=t&&t<=e[i+2]},r=t.length-1,n=0;!o(t[n])&&n<=r;)n++;for(var s=r;!o(t[s])&&0<=s;)s--;return t.slice(n,s+1)},wi.prototype.getSlot=function(t,e,i){var o=this.options,r=o.reverse,n=o.justified,s=o.vertical,a=this.scaleOptions(),p=a.scale,h=a.box,l=a.min,c=s?m:v,u=h[c+(r?2:1)],o=h.clone(),a=!mt(e),s=Rt(t,0),t=Rt(e,s),t=Math.max(t-1,s),e=u+(s-l)*p,p=u+((t=Math.max(s,t))+1-l)*p;return a&&n&&(p=e),i&&(e=kt(e,h[c+1],h[c+2]),p=kt(p,h[c+1],h[c+2])),o[c+1]=r?p:e,o[c+2]=r?e:p,o},wi.prototype.limitSlot=function(t){var e=this.options.vertical?m:v,i=this.lineBox(),o=t.clone();return o[e+1]=kt(t[e+1],i[e+1],i[e+2]),o[e+2]=kt(t[e+2],i[e+1],i[e+2]),o},wi.prototype.slot=function(t,e,i){var o=Math.floor(this.options.min||0),t=t,e=e;return"string"==typeof t?t=this.categoryIndex(t):R(t)&&(t-=o),"string"==typeof e?e=this.categoryIndex(e):R(e)&&(e-=o),_i.prototype.slot.call(this,t,e,i)},wi.prototype.pointCategoryIndex=function(t){var e=this.options,i=e.reverse,o=e.justified,r=e.vertical?m:v,n=this.scaleOptions(),s=n.scale,a=n.box,e=n.min,n=n.max,n=i?n:e,e=a[r+1],a=a[r+2],r=t[r];if(r<e||a<r)return null;e=n+(r-e)/s,s=e%1;return o?e=Math.round(e):0==s&&0<e&&e--,Math.floor(e)},wi.prototype.getCategory=function(t){t=this.pointCategoryIndex(t);return null===t?null:this.options.categories[t]},wi.prototype.categoryIndex=function(t){return this.totalIndex(t)-Math.floor(this.options.min||0)},wi.prototype.categoryAt=function(t,e){var i=this.options;return(e?i.srcCategories:i.categories)[t]},wi.prototype.categoriesCount=function(){return(this.options.categories||[]).length},wi.prototype.translateRange=function(t){var e=this.options,i=this.lineBox(),i=e.vertical?i.height():i.width(),e=e.categories.length,i=Tt(t/(i/e),f);return{min:i,max:e+i}},wi.prototype.zoomRange=function(t){var e=this.totalRangeIndices(),i=this.totalRange(),o=i.min,r=i.max,i=kt(e.min+t,o,r),r=kt(e.max-t,o,r);if(0<r-i)return{min:i,max:r}},wi.prototype.scaleRange=function(t){var e=this.options.categories.length,t=t*e;return{min:-t,max:e+t}},wi.prototype.labelsCount=function(){var t=this.labelsRange();return t.max-t.min},wi.prototype.labelsRange=function(){var t=this.options,e=t.justified,i=t.labels,o=this.totalRangeIndices(!0),r=o.min,n=o.max,o=Math.floor(r),n=e?(r=Math.ceil(r),Math.floor(n)):(r=Math.floor(r),Math.ceil(n));return{min:(r>i.skip?i.skip+i.step*Math.ceil((r-i.skip)/i.step):i.skip)-o,max:(t.categories.length?n+(e?1:0):0)-o}},wi.prototype.createAxisLabel=function(t,e){var i=this.options,o=i.dataItems?i.dataItems[t]:null,r=Rt(i.categories[t],""),i=this.axisLabelText(r,o,e);return new Be(r,i,t,o,e)},wi.prototype.shouldRenderNote=function(t){var e=this.totalRangeIndices();return Math.floor(e.min)<=t&&t<=Math.ceil(e.max)},wi.prototype.noteSlot=function(t){var e=this.options,e=t-Math.floor(e.min||0);return this.getSlot(e)},wi.prototype.arrangeNotes=function(){_i.prototype.arrangeNotes.call(this),this.hideOutOfRangeNotes()},wi.prototype.hideOutOfRangeNotes=function(){var t=this.notes,e=this.box;if(t&&t.length)for(var i=this.options.vertical?m:v,o=e[i+1],r=e[i+2],n=0;n<t.length;n++){var s=t[n];s.box&&(r<s.box[i+1]||s.box[i+2]<o)&&s.hide()}},wi.prototype.pan=function(t){var e=this.totalRangeIndices(!0),i=this.scaleOptions().scale,o=Tt(t/i,f),t=this.totalRange(),i=e.min+o,e=e.max+o;return this.limitRange(i,e,0,t.max,o)},wi.prototype.pointsRange=function(t,e){var i=this.options,o=i.reverse,r=i.vertical?m:v,n=this.totalRangeIndices(!0),s=this.scaleOptions(),i=s.scale,o=s.box[r+(o?2:1)],t=t[r]-o,o=e[r]-o,t=n.min+t/i,o=n.min+o/i,i=Math.min(t,o),o=Math.max(t,o);if(.01<=o-i)return{min:i,max:o}},wi.prototype.valueRange=function(){return this.range()},wi.prototype.totalIndex=function(t){var e=this.options;return this._categoriesMap?this._categoriesMap.get(t):function(t,e){if(t instanceof Date){for(var i=e.length,o=0;o<i;o++)if(gi(e[o],t))return o;return-1}return e.indexOf(t)}(t,e.srcCategories)},wi.prototype.currentRangeIndices=function(){var t=this.options,e=0;return R(t.min)&&(e=Math.floor(t.min)),{min:e,max:R(t.max)?t.justified?Math.floor(t.max):Math.ceil(t.max)-1:this.totalCount()-1}},wi.prototype.mapCategories=function(){if(!this._categoriesMap)for(var t=this._categoriesMap=new ht,e=this.options.srcCategories,i=0;i<e.length;i++)t.set(e[i],i)},wi.prototype.totalCount=function(){return Math.max(this.options.srcCategories.length,this._seriesMax||0)},wi);function wi(){_i.apply(this,arguments)}It($,{type:"category",vertical:!1,majorGridLines:{visible:!1,width:1,color:a},labels:{zIndex:1},justified:!1,_deferLabels:!0});var Ai=$,K={milliseconds:"HH:mm:ss.fff",seconds:"HH:mm:ss",minutes:"HH:mm",hours:"HH:mm",days:"M/d",weeks:"M/d",months:"MMM 'yy",years:"yyyy"},Si=[He,Ge,Ne,qe,Xe,Ye,We,Ze],ki="fit";function Pi(t){var e=t._range;return e||((e=t._range=jt(t)).min=si(e.min),e.max=si(e.max)),e}function Ci(t){this.options=t}Ci.prototype.displayIndices=function(){return{min:0,max:1}},Ci.prototype.displayRange=function(){return{}},Ci.prototype.total=function(){return{}},Ci.prototype.valueRange=function(){return{}},Ci.prototype.valueIndex=function(){return-1},Ci.prototype.values=function(){return[]},Ci.prototype.totalIndex=function(){return-1},Ci.prototype.valuesCount=function(){return 0},Ci.prototype.totalCount=function(){return 0},Ci.prototype.dateAt=function(){return null};function Ti(t,e,i){(this.options=i).baseUnitStep=i.baseUnitStep||1;var o=i.roundToBaseUnit,r=i.justified;this.start=pi(t,0,i.baseUnit,i.weekStartDay);var n=this.roundToTotalStep(e),s=!r&&gi(e,n)&&!i.justifyEnd;this.end=this.roundToTotalStep(e,!r,s?1:0),t=i.min||t,this.valueStart=this.roundToTotalStep(t),this.displayStart=o?this.valueStart:t,(t=i.max)?(this.valueEnd=this.roundToTotalStep(t,!1,!r&&gi(t,this.roundToTotalStep(t))?-1:0),this.displayEnd=o?this.roundToTotalStep(t,!r):i.max):(this.valueEnd=n,this.displayEnd=o||s?this.end:e),this.valueEnd<this.valueStart&&(this.valueEnd=this.valueStart),this.displayEnd<=this.displayStart&&(this.displayEnd=this.roundToTotalStep(this.displayStart,!1,1))}function Mi(t,e,i){for(var o,r,n,s=Pi(t.categories),a=(t.max||s.max)-(t.min||s.min),p=t.autoBaseUnitSteps,h=t.maxDateGroups,l=t.baseUnit===ki,c=e?Si.indexOf(e):0,u=l?Si[c++]:t.baseUnit,d=a/oi[u],g=d;!r||h<=d;){for(o=o||p[u].slice(0);n=o.shift(),n&&e===u&&n<i;);if(n)d=g/(r=n);else{if(u===St(Si)){r=Math.ceil(g/h);break}if(!l){h<d&&(r=Math.ceil(g/h));break}u=Si[c++]||St(Si),g=a/oi[u],o=null}}t.baseUnitStep=r,t.baseUnit=u}function Ri(t){var e=(t.baseUnit||"").toLowerCase();return e===ki||lt(e,Si)||function(t){for(var e,i,o=t.categories,r=mt(o)?o.length:0,n=l,s=0;s<r;s++){var a,p=o[s];p&&e&&(0<(a=ri(p,e))&&(i=(n=Math.min(n,a))>=ii?Ze:ei-3*Qe<=n?We:ti<=n?Ye:Qe<=n?Xe:Je<=n?qe:$e<=n?Ne:Ge)),e=p}t.baseUnit=i||Xe}(t),e!==ki&&"auto"!==t.baseUnitStep||Mi(t),t}Ti.prototype.displayRange=function(){return{min:this.displayStart,max:this.displayEnd}},Ti.prototype.displayIndices=function(){var t,e,i;return this._indices||(t=(e=this.options).baseUnit,i=e.baseUnitStep,e=yi(this.displayStart,this.valueStart,t,i),i=yi(this.displayEnd,this.valueStart,t,i),this._indices={min:e,max:i}),this._indices},Ti.prototype.total=function(){return{min:this.start,max:this.end}},Ti.prototype.totalCount=function(){return this.totalIndex(this.end)+(this.options.justified?1:0)},Ti.prototype.valueRange=function(){return{min:this.valueStart,max:this.valueEnd}},Ti.prototype.valueIndex=function(t){var e=this.options;return Math.floor(yi(t,this.valueStart,e.baseUnit,e.baseUnitStep))},Ti.prototype.totalIndex=function(t){var e=this.options;return Math.floor(yi(t,this.start,e.baseUnit,e.baseUnitStep))},Ti.prototype.dateIndex=function(t){var e=this.options;return yi(t,this.valueStart,e.baseUnit,e.baseUnitStep)},Ti.prototype.valuesCount=function(){return this.valueIndex(this.valueEnd)+1},Ti.prototype.values=function(){var t=this._values;if(!t){var e=this.options,i=this.valueRange();this._values=t=[];for(var o=i.min;o<=i.max;)t.push(o),o=pi(o,e.baseUnitStep,e.baseUnit,e.weekStartDay)}return t},Ti.prototype.dateAt=function(t,e){var i=this.options;return pi(e?this.start:this.valueStart,i.baseUnitStep*t,i.baseUnit,i.weekStartDay)},Ti.prototype.roundToTotalStep=function(t,e,i){var o=this.options,r=o.baseUnit,n=o.baseUnitStep,s=o.weekStartDay,o=this.start,t=yi(t,o,r,n),t=e?Math.ceil(t):Math.floor(t);return i&&(t+=i),pi(o,t*n,r,s)};var Oi,N=((Oi=Ai)&&(Ii.__proto__=Oi),((Ii.prototype=Object.create(Oi&&Oi.prototype)).constructor=Ii).prototype.clone=function(){var t=new Ii(Object.assign({},this.options),this.chartService);return t.createLabels(),t},Ii.prototype.categoriesHash=function(){var t=this.dataRange.total().min;return this.options.baseUnit+this.options.baseUnitStep+t},Ii.prototype.initUserOptions=function(t){return t},Ii.prototype.initFields=function(){Oi.prototype.initFields.call(this);var t=this.chartService,e=t.intl,i=this.options,o=i.categories||[];o._parsed||((o=xi(e,o))._parsed=!0),i=L({roundToBaseUnit:!0},i,{categories:o,min:mi(e,i.min),max:mi(e,i.max),weekStartDay:bi(i,e)}),t.panning&&t.isPannable(i.vertical?m:v)&&(i.roundToBaseUnit=!1),i.userSetBaseUnit=i.userSetBaseUnit||i.baseUnit,i.userSetBaseUnitStep=i.userSetBaseUnitStep||i.baseUnitStep,0<((this.options=i).srcCategories=o).length?(e=Pi(o),t=i.maxDivisions,this.dataRange=new Ti(e.min,e.max,Ri(i)),t?(o=this.dataRange.displayRange(),Mi(o=Object.assign({},i,{justified:!0,roundToBaseUnit:!1,baseUnit:"fit",min:o.min,max:o.max,maxDateGroups:t}),(t=this.dataRange.options).baseUnit,t.baseUnitStep),this.divisionRange=new Ti(e.min,e.max,o)):this.divisionRange=this.dataRange):(i.baseUnit=i.baseUnit||Xe,this.dataRange=this.divisionRange=new Ci(i))},Ii.prototype.tickIndices=function(t){var e=this.dataRange,i=this.divisionRange,o=i.valuesCount();if(!this.options.maxDivisions||!o)return Oi.prototype.tickIndices.call(this,t);var r=[],n=i.values(),s=0;this.options.justified||(n=n.concat(i.dateAt(o)),s=.5);for(var a,p=0;p<n.length;p++)r.push(e.dateIndex(n[p])+s),1!==t&&1<=p&&(a=r.length-1,r.splice(p,0,r[a-1]+(r[a]-r[a-1])*t));return r},Ii.prototype.shouldRenderNote=function(t){var e=this.range(),i=this.options.categories||[];return 0<=ci(t,e.min)&&ci(t,e.max)<=0&&i.length},Ii.prototype.parseNoteValue=function(t){return mi(this.chartService.intl,t)},Ii.prototype.noteSlot=function(t){return this.getSlot(t)},Ii.prototype.translateRange=function(t){var e=this.options,i=e.baseUnit,o=e.weekStartDay,r=e.vertical,n=this.lineBox(),r=r?n.height():n.width(),n=this.range(),r=r/(n.max-n.min),t=Tt(t/r,f);return n.min&&n.max&&(r=ni(e.min||n.min,t),t=ni(e.max||n.max,t),n={min:pi(r,0,i,o),max:pi(t,0,i,o)}),n},Ii.prototype.scaleRange=function(t){var e=Math.abs(t),i=this.range(),o=i.min,r=i.max;if(o&&r){for(;e--;)var n=ui(o,r),n=Math.round(.1*n),r=t<0?(o=ni(o,n),ni(r,-n)):(o=ni(o,-n),ni(r,n));i={min:o,max:r}}return i},Ii.prototype.labelsRange=function(){return{min:this.options.labels.skip,max:this.divisionRange.valuesCount()}},Ii.prototype.pan=function(t){if(this.isEmpty())return null;var e=this.options,i=this.lineBox(),o=e.vertical?i.height():i.width(),r=this.dataRange.displayRange(),n=r.min,i=r.max,r=this.dataRange.total(),o=Tt(t/(o/(i-n)),f)*(e.reverse?-1:1),n=ni(n,o),i=ni(i,o),o=this.limitRange(di(n),di(i),di(r.min),di(r.max),o);return o?(o.min=si(o.min),o.max=si(o.max),o.baseUnit=e.baseUnit,o.baseUnitStep=e.baseUnitStep||1,o.userSetBaseUnit=e.userSetBaseUnit,o.userSetBaseUnitStep=e.userSetBaseUnitStep,o):void 0},Ii.prototype.pointsRange=function(t,e){if(this.isEmpty())return null;var i=Oi.prototype.pointsRange.call(this,t,e),o=this.dataRange.displayRange(),t=this.dataRange.displayIndices(),e=ui(o.max,o.min)/(t.max-t.min),t=this.options;return{min:ni(o.min,i.min*e),max:ni(o.min,i.max*e),baseUnit:t.userSetBaseUnit||t.baseUnit,baseUnitStep:t.userSetBaseUnitStep||t.baseUnitStep}},Ii.prototype.zoomRange=function(t){if(this.isEmpty())return null;var e=this.options,i=e.userSetBaseUnit===ki,o=this.dataRange.total(),r=this.dataRange.displayRange(),n=r.min,s=r.max,a=this.dataRange.options,p=a.weekStartDay,h=a.baseUnit,r=a.baseUnitStep,a=pi(n,t*r,h,p),t=pi(s,-t*r,h,p);if(i){var l,c,u=e.autoBaseUnitSteps,r=e.maxDateGroups,p=St(u[h])*r*oi[h],d=ui(s,n),i=ui(t,a),g=Si.indexOf(h);if(i<oi[h]&&h!==He)h=Si[g-1],a=ni(n,c=(d-(r-1)*(l=St(u[h]))*oi[h])/2),t=ni(s,-c);else if(p<i&&h!==Ze){var f=0;do{for(h=Si[++g],f=0,c=2*oi[h];l=u[h][f],f++,f<u[h].length&&c*l<d;);}while(h!==Ze&&c*l<d);0<(c=(c*l-d)/2)&&(a=ni(n,-c),t=ni(s,c),a=ni(a,kt(t,o.min,o.max)-t),t=ni(t,kt(a,o.min,o.max)-a))}}return a<o.min&&(a=o.min),t>o.max&&(t=o.max),a&&t&&0<ui(t,a)?{min:a,max:t,baseUnit:e.userSetBaseUnit||e.baseUnit,baseUnitStep:e.userSetBaseUnitStep||e.baseUnitStep}:void 0},Ii.prototype.range=function(){return this.dataRange.displayRange()},Ii.prototype.createAxisLabel=function(t,e){var i=this.options,o=i.dataItems&&!i.maxDivisions?i.dataItems[t]:null,r=this.divisionRange.dateAt(t),i=e.dateFormats[this.divisionRange.options.baseUnit];e.format=e.format||i;i=this.axisLabelText(r,o,e);if(i)return new Be(r,i,t,o,e)},Ii.prototype.categoryIndex=function(t){return this.dataRange.valueIndex(t)},Ii.prototype.slot=function(t,e,i){var o=this.dataRange,t=t,e=e;t instanceof Date&&(t=o.dateIndex(t)),e instanceof Date&&(e=o.dateIndex(e));i=this.getSlot(t,e,i);if(i)return i.toRect()},Ii.prototype.getSlot=function(t,e,i){return"object"==typeof t&&(t=this.categoryIndex(t)),"object"==typeof e&&(e=this.categoryIndex(e)),Oi.prototype.getSlot.call(this,t,e,i)},Ii.prototype.valueRange=function(){var t=Pi(this.options.srcCategories);return{min:si(t.min),max:si(t.max)}},Ii.prototype.categoryAt=function(t,e){return this.dataRange.dateAt(t,e)},Ii.prototype.categoriesCount=function(){return this.dataRange.valuesCount()},Ii.prototype.rangeIndices=function(){return this.dataRange.displayIndices()},Ii.prototype.labelsBetweenTicks=function(){return!this.divisionRange.options.justified},Ii.prototype.prepareUserOptions=function(){this.isEmpty()||(this.options.categories=this.dataRange.values())},Ii.prototype.getCategory=function(t){t=this.pointCategoryIndex(t);return null===t?null:this.dataRange.dateAt(t)},Ii.prototype.totalIndex=function(t){return this.dataRange.totalIndex(t)},Ii.prototype.currentRangeIndices=function(){var t=this.dataRange.valueRange();return{min:this.dataRange.totalIndex(t.min),max:this.dataRange.totalIndex(t.max)}},Ii.prototype.totalRange=function(){return this.dataRange.total()},Ii.prototype.totalCount=function(){return this.dataRange.totalCount()},Ii.prototype.isEmpty=function(){return!this.options.srcCategories.length},Ii.prototype.roundedRange=function(){if(!1!==this.options.roundToBaseUnit||this.isEmpty())return this.range();var t=this.options,e=Pi(t.srcCategories);return new Ti(e.min,e.max,Object.assign({},t,{justified:!1,roundToBaseUnit:!0,justifyEnd:t.justified})).displayRange()},Ii);function Ii(){Oi.apply(this,arguments)}It(N,{type:y,labels:{dateFormats:K},autoBaseUnitSteps:{milliseconds:[1,10,100],seconds:[1,2,5,15,30],minutes:[1,2,5,15,30],hours:[1,2,3],days:[1,2,3],weeks:[1,2],months:[1,2,3,6],years:[1,2,3,5,10,25,50]},maxDateGroups:10});var ji=N;function Bi(t,e){return Tt(Math.floor(t/e)*e,f)}function Vi(t,e){return Tt(Math.ceil(t/e)*e,f)}function Li(t){return Math.max(Math.min(t,3e5),-3e5)}var zi,Ei=Math.pow(10,1-f),G=((zi=Ue)&&(Fi.__proto__=zi),((Fi.prototype=Object.create(zi&&zi.prototype)).constructor=Fi).prototype.initUserOptions=function(t){var i,e,o,r,n,s,a,n=(a=t.seriesMin,i=t.seriesMax,o=(e=t).narrowRange,r=function(t){if(!t&&!i)return 0;if(0<=t&&0<=i){var e=t===i?0:t;if(!1===o||!o&&.2<(i-e)/i)return 0;e=Math.max(0,e-(i-e)/2)}else e=t;return e}(a),n=function(t,e,i){if(!t&&!e)return 1;if(t<=0&&e<=0){var o=t===e?0:e,r=Math.abs((o-t)/o);if(!1===i||!i&&.2<r)return 0;o=Math.min(0,o-(t-o)/2)}else o=e;return o}(a,i,o),s=Ft(r,n),!(a={majorUnit:s})!==e.roundToMajorUnit&&(r<0&&Di(r,s,1/3)&&(r-=s),0<n&&Di(n,s,1/3)&&(n+=s)),a.min=Bi(r,s),a.max=Vi(n,s),a);return this.totalOptions=(s=n,{min:mt((a=t).min)?Math.min(s.min,a.min):s.min,max:mt(a.max)?Math.max(s.max,a.max):s.max,majorUnit:s.majorUnit}),function(t,e){var i,o,r,n=e;e&&(function(t,e){for(var i=0;i<e.length;i++){var o=e[i];null===t[o]&&(t[o]=void 0)}}(e,["min","max"]),i=mt(e.min),o=mt(e.max),(r=i||o)&&e.min===e.max&&(0<e.min?e.min=0:e.max=1),e.majorUnit?(t.min=Bi(t.min,e.majorUnit),t.max=Vi(t.max,e.majorUnit)):r&&(n=L(t,e),t.majorUnit=Ft(n.min,n.max))),t.minorUnit=(n.majorUnit||t.majorUnit)/5;n=L(t,n);return n.min>=n.max&&(i&&!o?n.max=n.min+n.majorUnit:!i&&o&&(n.min=n.max-n.majorUnit)),n}(n,t)},Fi.prototype.initFields=function(){this.totalMin=this.totalOptions.min,this.totalMax=this.totalOptions.max,this.totalMajorUnit=this.totalOptions.majorUnit,this.seriesMin=this.options.seriesMin,this.seriesMax=this.options.seriesMax},Fi.prototype.clone=function(){return new Fi(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},Fi.prototype.startValue=function(){return 0},Fi.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},Fi.prototype.getDivisions=function(t){if(0===t)return 1;var e=this.options,e=e.max-e.min;return Math.floor(Tt(e/t,3))+1},Fi.prototype.getTickPositions=function(t,e){var i=this.options,o=i.vertical,r=i.reverse,n=this.lineBox(),s=t*((o?n.height():n.width())/(i.max-i.min)),a=this.getDivisions(t),p=(o?-1:1)*(r?-1:1),h=[],l=n[(o?m:v)+(1==p?1:2)],c=0;e&&(c=e/t);for(var u=0;u<a;u++)u%c!=0&&h.push(Tt(l,3)),l+=s*p;return h},Fi.prototype.getMajorTickPositions=function(){return this.getTickPositions(this.options.majorUnit)},Fi.prototype.getMinorTickPositions=function(){return this.getTickPositions(this.options.minorUnit)},Fi.prototype.getSlot=function(t,e,i){void 0===i&&(i=!1);var o,r=this.options,n=r.vertical,s=r.reverse,a=n?m:v,p=this.lineBox(),h=p[a+(s?2:1)],l=(s?-1:1)*((n?p.height():p.width())/(r.max-r.min)),p=new qt(p.x1,p.y1,p.x1,p.y1),t=t,e=e;return mt(t)||(t=e||0),mt(e)||(e=t||0),i&&(t=Math.max(Math.min(t,r.max),r.min),e=Math.max(Math.min(e,r.max),r.min)),r=n?(o=r.max-Math.max(t,e),r.max-Math.min(t,e)):(o=Math.min(t,e)-r.min,Math.max(t,e)-r.min),p[a+1]=Li(h+l*(s?r:o)),p[a+2]=Li(h+l*(s?o:r)),p},Fi.prototype.getValue=function(t){var e=this.options,i=e.vertical,o=e.reverse,r=Number(e.max),n=Number(e.min),s=i?m:v,a=this.lineBox(),e=a[s+(o?2:1)],a=i?a.height():a.width(),s=(o?-1:1)*(t[s]-e),e=(r-n)/a*s;return s<0||a<s?null:Tt(i?r-e:n+e,f)},Fi.prototype.translateRange=function(t){var e=this.options,i=e.vertical,o=e.reverse,r=e.max,n=e.min,e=this.lineBox(),e=i?e.height():e.width(),e=Tt(t/(e/(r-n)),f);return!i&&!o||i&&o||(e=-e),{min:n+e,max:r+e,offset:e}},Fi.prototype.scaleRange=function(t){var e=this.options,t=-t*e.majorUnit;return{min:e.min-t,max:e.max+t}},Fi.prototype.labelsCount=function(){return this.getDivisions(this.options.majorUnit)},Fi.prototype.createAxisLabel=function(t,e){var i=this.options,o=Tt(i.min+t*i.majorUnit,f),i=this.axisLabelText(o,null,e);return new Be(o,i,t,null,e)},Fi.prototype.shouldRenderNote=function(t){var e=this.range();return e.min<=t&&t<=e.max},Fi.prototype.pan=function(t){t=this.translateRange(t);return this.limitRange(t.min,t.max,this.totalMin,this.totalMax,t.offset)},Fi.prototype.pointsRange=function(t,e){var i=this.getValue(t),t=this.getValue(e),e=Math.min(i,t),t=Math.max(i,t);if(this.isValidRange(e,t))return{min:e,max:t}},Fi.prototype.zoomRange=function(t){var e=this.totalMin,i=this.totalMax,o=this.scaleRange(t),t=kt(o.min,e,i),i=kt(o.max,e,i);if(this.isValidRange(t,i))return{min:t,max:i}},Fi.prototype.isValidRange=function(t,e){return Ei<e-t},Fi);function Fi(t,e,i,o){zi.call(this,Object.assign({},i,{seriesMin:t,seriesMax:e}),o)}function Di(t,e,i){t=Tt(Math.abs(t%e),f);return 0===t||e*(1-i)<t}It(G,{type:"numeric",min:0,max:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:a},labels:{format:"#.####################"},zIndex:1});var Ui,Hi=G,W=((Ui=Ue)&&(Gi.__proto__=Ui),((Gi.prototype=Object.create(Ui&&Ui.prototype)).constructor=Gi).prototype.clone=function(){return new Gi(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},Gi.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},Gi.prototype.getDivisions=function(t){var e=this.options;return Math.floor(vi(e.min,e.max,e.baseUnit)/t+1)},Gi.prototype.getTickPositions=function(t){for(var e=this.options,i=e.vertical,o=this.lineBox(),r=(i?-1:1)*(e.reverse?-1:1),n=o[(i?m:v)+(1==r?1:2)],s=this.getDivisions(t),a=ui(e.max,e.min),p=(i?o.height():o.width())/a,h=e.weekStartDay||0,l=[n],c=1;c<s;c++){var u=n+ui(pi(e.min,c*t,e.baseUnit,h),e.min)*p*r;l.push(Tt(u,3))}return l},Gi.prototype.getMajorTickPositions=function(){return this.getTickPositions(this.options.majorUnit)},Gi.prototype.getMinorTickPositions=function(){return this.getTickPositions(this.options.minorUnit)},Gi.prototype.getSlot=function(t,e,i){return Hi.prototype.getSlot.call(this,mi(this.intlService,t),mi(this.intlService,e),i)},Gi.prototype.getValue=function(t){t=Hi.prototype.getValue.call(this,t);return null!==t?si(t):null},Gi.prototype.labelsCount=function(){return this.getDivisions(this.options.majorUnit)},Gi.prototype.createAxisLabel=function(t,e){var i=this.options,o=t*i.majorUnit,r=i.weekStartDay||0,n=i.min;0<o&&(n=pi(n,o,i.baseUnit,r));i=e.dateFormats[i.baseUnit];e.format=e.format||i;i=this.axisLabelText(n,null,e);return new Be(n,i,t,null,e)},Gi.prototype.translateRange=function(t,e){var i=this.options,o=i.baseUnit,r=i.weekStartDay||0,n=this.lineBox(),s=i.vertical?n.height():n.width(),n=this.range(),n=s/ui(n.max,n.min),t=Tt(t/n,f)*(i.reverse?-1:1),n=ni(i.min,t),i=ni(i.max,t);return e||(n=pi(n,0,o,r),i=pi(i,0,o,r)),{min:n,max:i,offset:t}},Gi.prototype.scaleRange=function(t){for(var e=this.options,i=e.min,o=e.max,r=Math.abs(t);r--;)var n=ui(i,o),n=Math.round(.1*n),o=t<0?(i=ni(i,n),ni(o,-n)):(i=ni(i,-n),ni(o,n));return{min:i,max:o}},Gi.prototype.shouldRenderNote=function(t){var e=this.range();return 0<=ci(t,e.min)&&ci(t,e.max)<=0},Gi.prototype.pan=function(t){t=this.translateRange(t,!0),t=this.limitRange(di(t.min),di(t.max),this.totalMin,this.totalMax,t.offset);if(t)return{min:si(t.min),max:si(t.max)}},Gi.prototype.pointsRange=function(t,e){var i=this.getValue(t),t=this.getValue(e),e=Math.min(i,t),t=Math.max(i,t);return{min:si(e),max:si(t)}},Gi.prototype.zoomRange=function(t){t=this.scaleRange(t);return{min:si(kt(di(t.min),this.totalMin,this.totalMax)),max:si(kt(di(t.max),this.totalMin,this.totalMax))}},Gi);function Gi(t,e,i,o){var r,n,s,a,p,h=si(t),l=si(e),c=o.intl,u=i||{};r=h,n=l,s=u=L(u||{},{min:mi(c,u.min),max:mi(c,u.max),axisCrossingValue:xi(c,u.axisCrossingValues||u.axisCrossingValue),weekStartDay:bi(u,c)}),t=s.min||r,e=s.max||n,i=s.baseUnit||(e&&t?(a=ri(e,t),p=qe,ii<=a?p=Ze:ei<=a?p=We:ti<=a?p=Ye:Qe<=a&&(p=Xe),p):qe),r=oi[i],n=s.weekStartDay||0,a=hi(di(t)-1,i,n)||si(e),p=li(di(e)+1,i,n),t=s.majorUnit||Vi(Ft(a.getTime(),p.getTime()),r)/r,e=vi(a,p,i),r=Vi(e,t)-e,e=Math.floor(r/2),r-=e,s.baseUnit||delete s.baseUnit,s.baseUnit=s.baseUnit||i,s.min=s.min||pi(a,-e,i,n),s.max=s.max||pi(p,r,i,n),s.minorUnit=s.minorUnit||t/5,s.majorUnit=t,u=s,Ui.call(this,u,o),this.intlService=c,this.seriesMin=h,this.seriesMax=l;c=u.weekStartDay||0;this.totalMin=di(hi(di(h)-1,u.baseUnit,c)),this.totalMax=di(li(di(l)+1,u.baseUnit,c))}It(W,{type:y,majorGridLines:{visible:!0,width:1,color:a},labels:{dateFormats:K}});var Ni,qi=W,Y=((Ni=Ue)&&(Xi.__proto__=Ni),((Xi.prototype=Object.create(Ni&&Ni.prototype)).constructor=Xi).prototype.clone=function(){return new Xi(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},Xi.prototype.startValue=function(){return this.options.min},Xi.prototype.getSlot=function(t,e,i){var o,r=this.options,n=this.logMin,s=this.logMax,a=r.reverse,p=r.vertical,h=r.majorUnit,l=p?m:v,c=this.lineBox(),u=c[l+(a?2:1)],d=(p?c.height():c.width())/(s-n)*(a?-1:1),c=new qt(c.x1,c.y1,c.x1,c.y1),t=t,e=e;return mt(t)||(t=e||1),mt(e)||(e=t||1),t<=0||e<=0?null:(i&&(t=Math.max(Math.min(t,r.max),r.min),e=Math.max(Math.min(e,r.max),r.min)),t=Wi(t,h),e=Wi(e,h),n=p?(o=s-Math.max(t,e),s-Math.min(t,e)):(o=Math.min(t,e)-n,Math.max(t,e)-n),c[l+1]=Li(u+d*(a?n:o)),c[l+2]=Li(u+d*(a?o:n)),c)},Xi.prototype.getValue=function(t){var e=this.options,i=this.logMin,o=this.logMax,r=e.reverse,n=e.vertical,s=e.majorUnit,a=this.lineBox(),p=n===r?1:-1,e=1==p?1:2,r=n?a.height():a.width(),o=(o-i)/r,n=n?m:v,e=a[n+e],e=p*(t[n]-e);if(e<0||r<e)return null;o=i+e*o;return Tt(Math.pow(s,o),f)},Xi.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},Xi.prototype.scaleRange=function(t){var e=this.options.majorUnit,t=-t;return{min:Math.pow(e,this.logMin-t),max:Math.pow(e,this.logMax+t)}},Xi.prototype.translateRange=function(t){var e=this.options,i=this.logMin,o=this.logMax,r=e.reverse,n=e.vertical,s=e.majorUnit,e=this.lineBox(),e=n?e.height():e.width(),e=Tt(t/(e/(o-i)),f);return!n&&!r||n&&r||(e=-e),{min:Math.pow(s,i+e),max:Math.pow(s,o+e),offset:e}},Xi.prototype.labelsCount=function(){var t=Math.floor(this.logMax);return Math.floor(t-this.logMin)+1},Xi.prototype.getMajorTickPositions=function(){var e=[];return this.traverseMajorTicksPositions(function(t){e.push(t)},{step:1,skip:0}),e},Xi.prototype.createTicks=function(i){var t=this.options,e=t.majorTicks,o=t.minorTicks,r=t.vertical,n=t.labels.mirror,s=this.lineBox(),a={vertical:r};function p(t,e){a.tickX=n?s.x2:s.x2-e.size,a.tickY=n?s.y1-e.size:s.y1,a.position=t,i.append(ze(a,e))}return e.visible&&this.traverseMajorTicksPositions(p,e),o.visible&&this.traverseMinorTicksPositions(p,o),[]},Xi.prototype.createGridLines=function(t){var e=this.options,i=e.minorGridLines,o=e.majorGridLines,e=e.vertical,t=t.lineBox(),r={lineStart:t[e?"x1":"y1"],lineEnd:t[e?"x2":"y2"],vertical:e},n=[],s=this.gridLinesVisual();function a(t,e){lt(t,n)||(r.position=t,s.append(Ee(r,e)),n.push(t))}return o.visible&&this.traverseMajorTicksPositions(a,o),i.visible&&this.traverseMinorTicksPositions(a,i),s.children},Xi.prototype.traverseMajorTicksPositions=function(t,e){for(var i=this._lineOptions(),o=i.lineStart,r=i.step,n=this.logMin,s=this.logMax,a=Math.ceil(n)+e.skip;a<=s;a+=e.step)t(Tt(o+r*(a-n),f),e)},Xi.prototype.traverseMinorTicksPositions=function(t,e){for(var i=this.options,o=i.min,r=i.max,n=i.minorUnit,s=i.majorUnit,i=this._lineOptions(),a=i.lineStart,p=i.step,h=this.logMin,l=this.logMax,c=Math.floor(h);c<l;c++)for(var u=this._minorIntervalOptions(c),d=e.skip;d<n;d+=e.step){var g=u.value+d*u.minorStep;if(r<g)break;o<=g&&t(Tt(a+p*(Wi(g,s)-h),f),e)}},Xi.prototype.createAxisLabel=function(t,e){var i=Math.ceil(this.logMin+t),o=Math.pow(this.options.majorUnit,i),i=this.axisLabelText(o,null,e);return new Be(o,i,t,null,e)},Xi.prototype.shouldRenderNote=function(t){var e=this.range();return e.min<=t&&t<=e.max},Xi.prototype.pan=function(t){t=this.translateRange(t);return this.limitRange(t.min,t.max,this.totalMin,this.totalMax,t.offset)},Xi.prototype.pointsRange=function(t,e){t=this.getValue(t),e=this.getValue(e);return{min:Math.min(t,e),max:Math.max(t,e)}},Xi.prototype.zoomRange=function(t){var e=this.options,i=this.totalMin,o=this.totalMax,r=this.scaleRange(t),n=kt(r.min,i,o),s=kt(r.max,i,o),t=e.majorUnit,r=n<s&&e.min&&e.max&&Tt(Wi(e.max,t)-Wi(e.min,t),f)<1,t=!(e.min===i&&e.max===o)&&1<=Tt(Wi(s,t)-Wi(n,t),f);if(r||t)return{min:n,max:s}},Xi.prototype._minorIntervalOptions=function(t){var e=this.options,i=e.minorUnit,o=e.majorUnit,e=Math.pow(o,t);return{value:e,minorStep:(Math.pow(o,t+1)-e)/i}},Xi.prototype._lineOptions=function(){var t=this.options,e=t.reverse,i=t.vertical,o=i?m:v,r=this.lineBox(),t=i===e?1:-1,e=1==t?1:2;return{step:t*((i?r.height():r.width())/(this.logMax-this.logMin)),lineStart:r[o+e],lineBox:r}},Xi);function Xi(t,e,i,o){var r,n,s,a,p,h,l,c=L({majorUnit:10,min:t,max:e},i),u=c.majorUnit,d=(l=Tt(Wi(p=e,h=u),f)%1,p<=0?h:0!=l&&(l<.3||.9<l)?Math.pow(h,Wi(p,h)+.2):Math.pow(h,Math.ceil(Wi(p,h)))),l=(r=t,s=(n=c).majorUnit,(a=r)<=0?a=e<=1?Math.pow(s,-2):1:n.narrowRange||(a=Math.pow(s,Math.floor(Wi(r,s)))),a),a=(p=l,h=d,n=i,s=(r=c).min,a=r.max,mt(r.axisCrossingValue)&&r.axisCrossingValue<=0&&Yi(),mt(n.max)?n.max<=0&&Yi():a=h,mt(n.min)?n.min<=0&&Yi():s=p,{min:s,max:a});c.max=a.max,c.min=a.min,c.minorUnit=i.minorUnit||Tt(u-1,f),Ni.call(this,c,o),this.totalMin=mt(i.min)?Math.min(l,i.min):l,this.totalMax=mt(i.max)?Math.max(d,i.max):d,this.logMin=Tt(Wi(a.min,u),f),this.logMax=Tt(Wi(a.max,u),f),this.seriesMin=t,this.seriesMax=e,this.createLabels()}function Yi(){throw new Error("Non positive values cannot be used for a logarithmic axis")}function Wi(t,e){return Math.log(t)/Math.log(e)}It(Y,{type:"log",majorUnit:10,minorUnit:1,axisCrossingValue:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:a},zIndex:1,_deferLabels:!0});var Zi,Ki=Y,$={createGridLines:function(t){var e,i=this.options,o=Math.abs(this.box.center().y-t.lineBox().y1),r=[],n=!1;return i.majorGridLines.visible&&(e=this.majorGridLineAngles(t),n=!0,r=this.renderMajorGridLines(e,o,i.majorGridLines)),i.minorGridLines.visible&&(e=this.minorGridLineAngles(t,n),yt(r,this.renderMinorGridLines(e,o,i.minorGridLines,t,n))),r},renderMajorGridLines:function(t,e,i){return this.renderGridLines(t,e,i)},renderMinorGridLines:function(t,e,i,o,r){r=this.radiusCallback&&this.radiusCallback(e,o,r);return this.renderGridLines(t,e,i,r)},renderGridLines:function(t,e,i,o){for(var r={stroke:{width:i.width,color:i.color,dashType:i.dashType}},i=this.box.center(),n=new C.geometry.Circle([i.x,i.y],e),s=this.gridLinesVisual(),a=0;a<t.length;a++){var p=new C.drawing.Path(r);o&&(n.radius=o(t[a])),p.moveTo(n.center).lineTo(n.pointAt(t[a]+180)),s.append(p)}return s.children},gridLineAngles:function(t,e,i,o,r){var n=this,r=this.intervals(e,i,o,r),t=t.options,s=t.visible&&!1!==(t.line||{}).visible;return dt(r,function(t){t=n.intervalAngle(t);if(!s||90!==t)return t})}},N=((Zi=Ai)&&($i.__proto__=Zi),(($i.prototype=Object.create(Zi&&Zi.prototype)).constructor=$i).prototype.range=function(){return{min:0,max:this.options.categories.length}},$i.prototype.reflow=function(t){this.box=t,this.reflowLabels()},$i.prototype.lineBox=function(){return this.box},$i.prototype.reflowLabels=function(){for(var t=this.labels,e=this.options.labels,i=e.skip||0,o=e.step||1,r=new qt,n=0;n<t.length;n++){t[n].reflow(r);var s=t[n].box;t[n].reflow(this.getSlot(i+n*o).adjacentBox(0,s.width(),s.height()))}},$i.prototype.intervals=function(t,e,i,o){void 0===o&&(o=!1);for(var r,n=this.options,s=n.categories.length/t||1,a=360/s,p=i||1,h=[],l=e||0;l<s;l+=p)r=n.reverse?360-l*a:l*a,r=Tt(r,3)%360,o&&lt(r,o)||h.push(r);return h},$i.prototype.majorIntervals=function(){return this.intervals(1)},$i.prototype.minorIntervals=function(){return this.intervals(.5)},$i.prototype.intervalAngle=function(t){return(360+t+this.options.startAngle)%360},$i.prototype.majorAngles=function(){var e=this;return dt(this.majorIntervals(),function(t){return e.intervalAngle(t)})},$i.prototype.createLine=function(){return[]},$i.prototype.majorGridLineAngles=function(t){var e=this.options.majorGridLines;return this.gridLineAngles(t,1,e.skip,e.step)},$i.prototype.minorGridLineAngles=function(t,e){var i=this.options,o=i.minorGridLines,i=i.majorGridLines,i=e?this.intervals(1,i.skip,i.step):null;return this.gridLineAngles(t,.5,o.skip,o.step,i)},$i.prototype.radiusCallback=function(e,t,i){if(t.options.type!==d){var t=Ct(360/(2*this.options.categories.length)),o=Math.cos(t)*e,r=this.majorAngles();return function(t){return!i&&lt(t,r)?e:o}}},$i.prototype.createPlotBands=function(){for(var t=this.options.plotBands||[],e=this._plotbandGroup=new C.drawing.Group({zIndex:-1}),i=0;i<t.length;i++){var o=t[i],r=this.plotBandSlot(o),n=this.getSlot(o.from),s=o.from-Math.floor(o.from);r.startAngle+=s*n.angle;var a=Math.ceil(o.to)-o.to;r.angle-=(a+s)*n.angle;o=oe.current.createRing(r,{fill:{color:o.color,opacity:o.opacity},stroke:{opacity:o.opacity}});e.append(o)}this.appendVisual(e)},$i.prototype.plotBandSlot=function(t){return this.getSlot(t.from,t.to-1)},$i.prototype.getSlot=function(t,e){var i=this.options,o=i.justified,r=this.box,n=this.majorAngles(),s=n.length,a=360/s,t=t;i.reverse&&!o&&(t=(t+1)%s);n=n[t=kt(Math.floor(t),0,s-1)];o&&(n-=a/2)<0&&(n+=360);t=a*(kt(Math.ceil(e||t),t,s-1)-t+1);return new $t(r.center(),0,r.height()/2,n,t)},$i.prototype.slot=function(t,e){var i=this.getSlot(t,e),t=i.startAngle+180,e=t+i.angle;return new C.geometry.Arc([i.center.x,i.center.y],{startAngle:t,endAngle:e,radiusX:i.radius,radiusY:i.radius})},$i.prototype.pointCategoryIndex=function(t){for(var e=this.options.categories.length,i=null,o=0;o<e;o++)if(this.getSlot(o).containsPoint(t)){i=o;break}return i},$i);function $i(){Zi.apply(this,arguments)}It(N,{startAngle:90,labels:{margin:U(10)},majorGridLines:{visible:!0},justified:!0}),L(N.prototype,$);var Ji,Qi=N,G=((Ji=Ue)&&(to.__proto__=Ji),((to.prototype=Object.create(Ji&&Ji.prototype)).constructor=to).prototype.getDivisions=function(t){return Hi.prototype.getDivisions.call(this,t)-1},to.prototype.reflow=function(t){this.box=t,this.reflowLabels()},to.prototype.reflowLabels=function(){for(var t=this.options,e=this.labels,i=this.options.labels,o=i.skip||0,i=i.step||1,r=new qt,n=this.intervals(t.majorUnit,o,i),s=0;s<e.length;s++){e[s].reflow(r);var a=e[s].box;e[s].reflow(this.getSlot(n[s]).adjacentBox(0,a.width(),a.height()))}},to.prototype.lineBox=function(){return this.box},to.prototype.intervals=function(t,e,i,o){void 0===o&&(o=!1);for(var r=this.options.min,n=this.getDivisions(t),s=[],a=i||1,p=e||0;p<n;p+=a){var h=(360+r+p*t)%360;o&&lt(h,o)||s.push(h)}return s},to.prototype.majorIntervals=function(){return this.intervals(this.options.majorUnit)},to.prototype.minorIntervals=function(){return this.intervals(this.options.minorUnit)},to.prototype.intervalAngle=function(t){return(540-t-this.options.startAngle)%360},to.prototype.createLine=function(){return[]},to.prototype.majorGridLineAngles=function(t){var e=this.options.majorGridLines;return this.gridLineAngles(t,this.options.majorUnit,e.skip,e.step)},to.prototype.minorGridLineAngles=function(t,e){var i=this.options,o=i.minorGridLines,r=i.majorGridLines,r=e?this.intervals(i.majorUnit,r.skip,r.step):null;return this.gridLineAngles(t,i.minorUnit,o.skip,o.step,r)},to.prototype.plotBandSlot=function(t){return this.getSlot(t.from,t.to)},to.prototype.getSlot=function(t,e){var i=this.options,o=this.box,r=i.startAngle,t=kt(t,i.min,i.max),e=kt(e||t,t,i.max);return i.reverse&&(t*=-1,e*=-1),(e=(540-e-r)%360)<(t=(540-t-r)%360)&&(r=t,t=e,e=r),new $t(o.center(),0,o.height()/2,t,e-t)},to.prototype.slot=function(t,e){void 0===e&&(e=t);var i=this.options,o=360-i.startAngle,r=this.getSlot(t,e),n=Math.min(t,e),e=Math.max(t,e),n=i.reverse?(s=n,e):(s=360-e,360-n),s=(s+o)%360;return n=(n+o)%360,new C.geometry.Arc([r.center.x,r.center.y],{startAngle:s,endAngle:n,radiusX:r.radius,radiusY:r.radius})},to.prototype.getValue=function(t){var e=this.options,i=this.box.center(),o=t.x-i.x,i=t.y-i.y,i=Math.round(xt(Math.atan2(i,o))),o=e.startAngle;return e.reverse||(i*=-1,o*=-1),(i+o+360)%360},to.prototype.valueRange=function(){return{min:0,max:2*Math.PI}},to);function to(t,e){Ji.call(this,t,e);e=this.options;e.minorUnit=e.minorUnit||e.majorUnit/2}It(G,{type:"polar",startAngle:0,reverse:!1,majorUnit:60,min:0,max:360,labels:{margin:U(10)},majorGridLines:{color:a,visible:!0,width:1},minorGridLines:{color:"#aaa"}}),L(G.prototype,$,{createPlotBands:Qi.prototype.createPlotBands,majorAngles:Qi.prototype.majorAngles,range:Hi.prototype.range,labelsCount:Hi.prototype.labelsCount,createAxisLabel:Hi.prototype.createAxisLabel});var eo=G;function io(t,e){return 180-Math.abs(Math.abs(t-e)-180)}var oo,K={options:{majorGridLines:{visible:!0}},createPlotBands:function(){var t=this.options,e=t.majorGridLines.type,i=t.plotBands;void 0===i&&(i=[]);for(var t=this.plotArea.polarAxis,o=t.majorAngles(),r=t.box.center(),n=this._plotbandGroup=new C.drawing.Group({zIndex:-1}),s=0;s<i.length;s++){var a=i[s],p={fill:{color:a.color,opacity:a.opacity},stroke:{opacity:a.opacity}},h=this.getSlot(a.from,a.to,!0),a=new $t(r,r.y-h.y2,r.y-h.y1,0,360),h=e===d?oe.current.createRing(a,p):C.drawing.Path.fromPoints(this.plotBandPoints(a,o),p).close();n.append(h)}this.appendVisual(n)},plotBandPoints:function(t,e){for(var i=[],o=[],r=[t.center.x,t.center.y],n=new C.geometry.Circle(r,t.innerRadius),s=new C.geometry.Circle(r,t.radius),a=0;a<e.length;a++)i.push(n.pointAt(e[a]+180)),o.push(s.pointAt(e[a]+180));return i.reverse(),i.push(i[0]),o.push(o[0]),o.concat(i)},createGridLines:function(t){var e=this.options,i=this.radarMajorGridLinePositions(),o=t.majorAngles(),r=t.box.center(),t=[];return e.majorGridLines.visible&&(t=this.renderGridLines(r,i,o,e.majorGridLines)),e.minorGridLines.visible&&(i=this.radarMinorGridLinePositions(),yt(t,this.renderGridLines(r,i,o,e.minorGridLines))),t},renderGridLines:function(t,e,i,o){var r={stroke:{width:o.width,color:o.color,dashType:o.dashType}},n=o.skip;void 0===n&&(n=0);var s=o.step;void 0===s&&(s=0);for(var a=this.gridLinesVisual(),p=n;p<e.length;p+=s){var h=t.y-e[p];if(0<h){var l=new C.geometry.Circle([t.x,t.y],h);if(o.type===d)a.append(new C.drawing.Circle(l,r));else{for(var c=new C.drawing.Path(r),u=0;u<i.length;u++)c.lineTo(l.pointAt(i[u]+180));c.close(),a.append(c)}}}return a.children},getValue:function(t){var i,e=this.lineBox(),o=this.plotArea.polarAxis,r=o.majorAngles(),n=o.box.center(),s=t.distanceTo(n),a=s;return this.options.majorGridLines.type!==d&&1<r.length&&(o=t.x-n.x,n=t.y-n.y,i=(xt(Math.atan2(n,o))+540)%360,r.sort(function(t,e){return io(t,i)-io(e,i)}),o=90-io(r[0],r[1])/2,r=180-io(i,r[0])-o,a=s*(Math.sin(Ct(r))/Math.sin(Ct(o)))),this.axisType().prototype.getValue.call(this,new Ut(e.x1,e.y2-a))}},W=((oo=Hi)&&(ro.__proto__=oo),((ro.prototype=Object.create(oo&&oo.prototype)).constructor=ro).prototype.radarMajorGridLinePositions=function(){return this.getTickPositions(this.options.majorUnit)},ro.prototype.radarMinorGridLinePositions=function(){var t=this.options,e=0;return t.majorGridLines.visible&&(e=t.majorUnit),this.getTickPositions(t.minorUnit,e)},ro.prototype.axisType=function(){return oo},ro);function ro(){oo.apply(this,arguments)}L(W.prototype,K);var no,so=W,Y=((no=Ki)&&(ao.__proto__=no),((ao.prototype=Object.create(no&&no.prototype)).constructor=ao).prototype.radarMajorGridLinePositions=function(){var e=[];return this.traverseMajorTicksPositions(function(t){e.push(t)},this.options.majorGridLines),e},ao.prototype.radarMinorGridLinePositions=function(){var e=[];return this.traverseMinorTicksPositions(function(t){e.push(t)},this.options.minorGridLines),e},ao.prototype.axisType=function(){return no},ao);function ao(){no.apply(this,arguments)}L(Y.prototype,K);var po=Y;function ho(t){return t<=0?-1:1}var lo,co,uo=((co=C.Class)&&(yo.__proto__=co),((yo.prototype=Object.create(co&&co.prototype)).constructor=yo).prototype.process=function(t){var e=t.slice(0),i=[],o=this.closed,r=e.length;if(2<r&&(this.removeDuplicates(0,e),r=e.length),r<2||2===r&&e[0].equals(e[1]))return i;var n,s=e[0],a=e[1],p=e[2];for(i.push(new C.geometry.Segment(s));s.equals(e[r-1]);)o=!0,e.pop(),r--;if(2===r){t=this.tangent(s,a,v,m);return St(i).controlOut(this.firstControlPoint(t,s,a,v,m)),i.push(new C.geometry.Segment(a,this.secondControlPoint(t,s,a,v,m))),i}o?(s=e[r-1],a=e[0],p=e[1],l=(n=this.controlPoints(s,a,p))[1],c=n[0]):(n=this.tangent(s,a,v,m),l=this.firstControlPoint(n,s,a,v,m));for(var h,l,c,u=l,d=0;d<=r-3;d++)this.removeDuplicates(d,e),d+3<=(r=e.length)&&(s=e[d],a=e[d+1],p=e[d+2],h=this.controlPoints(s,a,p),St(i).controlOut(u),u=h[1],h=h[0],i.push(new C.geometry.Segment(a,h)));return o?(s=e[r-2],a=e[r-1],p=e[0],l=this.controlPoints(s,a,p),St(i).controlOut(u),i.push(new C.geometry.Segment(a,l[0])),St(i).controlOut(l[1]),i.push(new C.geometry.Segment(p,c))):(c=this.tangent(a,p,v,m),St(i).controlOut(u),i.push(new C.geometry.Segment(p,this.secondControlPoint(c,a,p,v,m)))),i},yo.prototype.removeDuplicates=function(t,e){for(;e[t+1]&&(e[t].equals(e[t+1])||e[t+1].equals(e[t+2]));)e.splice(t+1,1)},yo.prototype.invertAxis=function(t,e,i){var o,r=!1;return t.x===e.x?r=!0:e.x===i.x?(e.y<i.y&&t.y<=e.y||i.y<e.y&&e.y<=t.y)&&(r=!0):(o=this.lineFunction(t,e),o=this.calculateFunction(o,i.x),t.y<=e.y&&i.y<=o||e.y<=t.y&&i.y>=o||(r=!0)),r},yo.prototype.isLine=function(t,e,i){var o=this.lineFunction(t,e),o=this.calculateFunction(o,i.x);return t.x===e.x&&e.x===i.x||Tt(o,1)===Tt(i.y,1)},yo.prototype.lineFunction=function(t,e){e=(e.y-t.y)/(e.x-t.x);return[t.y-e*t.x,e]},yo.prototype.controlPoints=function(t,e,i){var o,r=v,n=m,s=!1,a=!1;this.isLine(t,e,i)?o=this.tangent(t,e,v,m):(p={x:this.isMonotonicByField(t,e,i,v),y:this.isMonotonicByField(t,e,i,m)}).x&&p.y?(o=this.tangent(t,i,v,m),s=!0):(this.invertAxis(t,e,i)&&(r=m,n=v),p[r]?o=0:(o=.01*(i[n]<t[n]&&t[n]<=e[n]||t[n]<i[n]&&e[n]<=t[n]?ho((i[n]-t[n])*(e[r]-t[r])):-ho((i[r]-t[r])*(e[n]-t[n]))),a=!0));var p=this.secondControlPoint(o,t,e,r,n);a&&(a=r,r=n,n=a);n=this.firstControlPoint(o,e,i,r,n);return s&&(this.restrictControlPoint(t,e,p,o),this.restrictControlPoint(e,i,n,o)),[p,n]},yo.prototype.restrictControlPoint=function(t,e,i,o){t.y<e.y?e.y<i.y?(i.x=t.x+(e.y-t.y)/o,i.y=e.y):i.y<t.y&&(i.x=e.x-(e.y-t.y)/o,i.y=t.y):i.y<e.y?(i.x=t.x-(t.y-e.y)/o,i.y=e.y):t.y<i.y&&(i.x=e.x+(t.y-e.y)/o,i.y=t.y)},yo.prototype.tangent=function(t,e,i,o){i=e[i]-t[i],o=e[o]-t[o];return 0==i?0:o/i},yo.prototype.isMonotonicByField=function(t,e,i,o){return i[o]>e[o]&&e[o]>t[o]||i[o]<e[o]&&e[o]<t[o]},yo.prototype.firstControlPoint=function(t,e,i,o,r){var n=e[o],i=.333*(i[o]-n);return this.point(n+i,e[r]+i*t,o,r)},yo.prototype.secondControlPoint=function(t,e,i,o,r){var n=e[o],e=i[o],n=.333*(e-n);return this.point(e-n,i[r]-n*t,o,r)},yo.prototype.point=function(t,e,i,o){var r=new C.geometry.Point;return r[i]=t,r[o]=e,r},yo.prototype.calculateFunction=function(t,e){for(var i=t.length,o=0,r=0;r<i;r++)o+=Math.pow(e,r)*t[r];return o},yo),go=((lo=C.Class)&&(fo.__proto__=lo),((fo.prototype=Object.create(lo&&lo.prototype)).constructor=fo).prototype.value=function(t){var e=this._axis;return e.getCategory?e.getCategory(t):e.getValue(t)},fo.prototype.slot=function(t,e,i){return void 0===i&&(i=!0),this._axis.slot(t,e,i)},fo.prototype.range=function(){return this._axis.range()},fo.prototype.valueRange=function(){return this._axis.valueRange()},fo);function fo(t){lo.call(this),this._axis=t,this.options=t.options}function yo(t){co.call(this),this.closed=t}function vo(t,e){for(var i=0;i<e.length;i++)if(e[i].options.name===t)return e[i].prepareUserOptions(),new go(e[i])}N=function(t){this.visual=t.visual,this.chartsVisual=t.chartContainer.visual,this._pane=t};N.prototype.findAxisByName=function(t){return vo(t,this._pane.axes)};var mo,xo=N,bo=((mo=C.Class)&&(_o.__proto__=mo),(_o.prototype=Object.create(mo&&mo.prototype)).constructor=_o);function _o(t){mo.call(this),this._plotArea=t,this.visual=t.visual,this.backgroundVisual=t._bgVisual}function wo(t){for(var e=t.length,i=0,o=0;o<e;o++)R(t[o])&&i++;return i}var Ao={min:function(t){for(var e=t.length,i=l,o=0;o<e;o++){var r=t[o];R(r)&&(i=Math.min(i,r))}return i===l?t[0]:i},max:function(t){for(var e=t.length,i=c,o=0;o<e;o++){var r=t[o];R(r)&&(i=Math.max(i,r))}return i===c?t[0]:i},sum:function(t){for(var e=t.length,i=0,o=0;o<e;o++){var r=t[o];R(r)&&(i+=r)}return i},sumOrNull:function(t){var e=null;return wo(t)&&(e=Ao.sum(t)),e},count:function(t){for(var e=t.length,i=0,o=0;o<e;o++){var r=t[o];null!==r&&mt(r)&&i++}return i},avg:function(t){var e=wo(t),i=t[0];return 0<e&&(i=Ao.sum(t)/e),i},first:function(t){for(var e=t.length,i=0;i<e;i++){var o=t[i];if(null!==o&&mt(o))return o}return t[0]}},So=Ao;function ko(t,e){return null===e?e:st(t)(e)}var Po,$=((Po=C.Class)&&(Co.__proto__=Po),((Co.prototype=Object.create(Po&&Po.prototype)).constructor=Co).prototype.register=function(t,e,i){void 0===e&&(e=[h]),void 0===i&&(i={});for(var o=0;o<t.length;o++){var r=t[o];this._valueFields[r]=e,this._otherFields[r]=i,this._nullValue[r]=this._makeValue(e,null),this._undefinedValue[r]=this._makeValue(e,void 0)}},Co.prototype.canonicalFields=function(t){return this.valueFields(t).concat(this.otherFields(t))},Co.prototype.valueFields=function(t){return this._valueFields[t.type]||[h]},Co.prototype.otherFields=function(t){return this._otherFields[t.type]||[h]},Co.prototype.bindPoint=function(t,e,i){var o,r,n,s=t.data,a=mt(i)?i:s[e],p={valueFields:{value:a}},i=this.valueFields(t),s=this._otherFields[t.type];return null===a?o=this._nullValue[t.type]:mt(a)?Array.isArray(a)?(n=a.slice(i.length),o=this._bindFromArray(a,i),r=this._bindFromArray(n,s)):"object"==typeof a&&(e=this.sourceFields(t,i),n=this.sourceFields(t,s),o=this._bindFromObject(a,i,e),r=this._bindFromObject(a,s,n)):o=this._undefinedValue[t.type],mt(o)&&(1===i.length?p.valueFields.value=o[i[0]]:p.valueFields=o),p.fields=r||{},p},Co.prototype._makeValue=function(t,e){for(var i={},o=t.length,r=0;r<o;r++)i[t[r]]=e;return i},Co.prototype._bindFromArray=function(t,e){var i={};if(e)for(var o=Math.min(e.length,t.length),r=0;r<o;r++)i[e[r]]=t[r];return i},Co.prototype._bindFromObject=function(t,e,i){void 0===i&&(i=e);var o={};if(e)for(var r=e.length,n=0;n<r;n++){var s=e[n],a=i[n];null!==a&&(o[s]=ko(a,t))}return o},Co.prototype.sourceFields=function(t,e){var i=[];if(e)for(var o=e.length,r=0;r<o;r++){var n=e[r],s=n===h?"field":n+"Field";i.push(null!==t[s]?t[s]||n:null)}return i},Co);function Co(){Po.call(this),this._valueFields={},this._otherFields={},this._nullValue={},this._undefinedValue={}}$.current=new $;var To,Mo,Ro=$,Oo=/percent(?:\w*)\((\d+)\)/,Io=new RegExp("^stddev(?:\\((\\d+(?:\\.\\d+)?)\\))?$"),jo=((Mo=C.Class)&&(Zo.__proto__=Mo),((Zo.prototype=Object.create(Mo&&Mo.prototype)).constructor=Zo).prototype.initGlobalRanges=function(t,e,i){var o,r,n,s,a=e.data,p=Io.exec(t);p?(this.valueGetter=this.createValueGetter(e,i),o=this.getAverage(a),r=this.getStandardDeviation(a,o,!1),p=p[1]?parseFloat(p[1]):1,n={low:o.value-r*p,high:o.value+r*p},this.globalRange=function(){return n}):t.indexOf&&0<=t.indexOf("stderr")&&(this.valueGetter=this.createValueGetter(e,i),s=this.getStandardError(a,this.getAverage(a)),this.globalRange=function(t){return{low:t-s,high:t+s}})},Zo.prototype.createValueGetter=function(t,e){var i,o=t.data,r=Ro.current,n=r.valueFields(t),o=mt(o[0])?o[0]:{};return x(o)?i=st("["+(e?n.indexOf(e):0)+"]"):R(o)?i=st():"object"==typeof o&&(i=st(r.sourceFields(t,n)[n.indexOf(e)])),i},Zo.prototype.getErrorRange=function(t,e){if(!mt(e))return null;if(this.globalRange)return this.globalRange(t);if(x(e))o=t-e[0],r=t+e[1];else if(R(i=parseFloat(e)))o=t-i,r=t+i;else{if(!(i=Oo.exec(e)))throw new Error("Invalid ErrorBar value: "+e);var i=t*(parseFloat(i[1])/100),o=t-Math.abs(i),r=t+Math.abs(i)}return{low:o,high:r}},Zo.prototype.getStandardError=function(t,e){return this.getStandardDeviation(t,e,!0)/Math.sqrt(e.count)},Zo.prototype.getStandardDeviation=function(t,e,i){for(var o=t.length,i=i?e.count-1:e.count,r=0,n=0;n<o;n++){var s=this.valueGetter(t[n]);R(s)&&(r+=Math.pow(s-e.value,2))}return Math.sqrt(r/i)},Zo.prototype.getAverage=function(t){for(var e=t.length,i=0,o=0,r=0;r<e;r++){var n=this.valueGetter(t[r]);R(n)&&(i+=n,o++)}return{value:i/o,count:o}},Zo),Bo=(C.support.browser||{}).msie?.001:0,Vo="zero",Lo="interpolate",zo="bar",Eo="column",Fo="line",Do="pie",Uo="verticalLine",Ho=[zo,Eo,"ohlc","candlestick","boxPlot","verticalBoxPlot","bullet","rangeColumn","rangeBar","waterfall","horizontalWaterfall"],Go="drag",No="dragEnd",qo="zoom",Xo="zoomEnd",Yo="DOMMouseScroll mousewheel",G=((To=se)&&(Wo.__proto__=To),((Wo.prototype=Object.create(To&&To.prototype)).constructor=Wo).prototype.reflow=function(t){var e,i=this.options.endCaps,o=this.isVertical,r=this.getAxis().getSlot(this.low,this.high),n=t.center(),s=this.getCapsWidth(t,o),a=o?n.x:n.y,t=a-s,s=a+s;o?(e=[new Ut(n.x,r.y1),new Ut(n.x,r.y2)],i&&e.push(new Ut(t,r.y1),new Ut(s,r.y1),new Ut(t,r.y2),new Ut(s,r.y2)),this.box=new qt(t,r.y1,s,r.y2)):(e=[new Ut(r.x1,n.y),new Ut(r.x2,n.y)],i&&e.push(new Ut(r.x1,t),new Ut(r.x1,s),new Ut(r.x2,t),new Ut(r.x2,s)),this.box=new qt(r.x1,t,r.x2,s)),this.linePoints=e},Wo.prototype.getCapsWidth=function(t,e){t=e?t.width():t.height();return Math.min(Math.floor(t/2),4)||4},Wo.prototype.createVisual=function(){var e=this,t=this.options,i=t.visual;i?this.visual=i({low:this.low,high:this.high,rect:this.box.toRect(),sender:this.getSender(),options:{endCaps:t.endCaps,color:t.color,line:t.line},createVisual:function(){e.createDefaultVisual();var t=e.visual;return delete e.visual,t}}):this.createDefaultVisual()},Wo.prototype.createDefaultVisual=function(){var t=this.options,e=this.linePoints,i={stroke:{color:t.color,width:t.line.width,dashType:t.line.dashType}};To.prototype.createVisual.call(this);for(var o=0;o<e.length;o+=2){var r=new C.drawing.Path(i).moveTo(e[o].x,e[o].y).lineTo(e[o+1].x,e[o+1].y);T(r),this.visual.append(r)}},Wo);function Wo(t,e,i,o,r,n){To.call(this,n),this.low=t,this.high=e,this.isVertical=i,this.chart=o,this.series=r}function Zo(t,e,i){Mo.call(this),this.initGlobalRanges(t,e,i)}It(G,{animation:{type:"fadeIn",delay:600},endCaps:!0,line:{width:2},zIndex:1});var Ko,$o=G,Jo=((Ko=$o)&&(tr.__proto__=Ko),((tr.prototype=Object.create(Ko&&Ko.prototype)).constructor=tr).prototype.getAxis=function(){return this.chart.seriesValueAxis(this.series)},tr),Qo=5;function tr(){Ko.apply(this,arguments)}function er(t,e,i,o){void 0===i&&(i={}),void 0===o&&(o=!1);var r,n,s=i.defaults=i.defaults||{},a=i.depth=i.depth||0,p=!1;if(i.excluded=i.excluded||[],Qo<a)return null;for(r in t)!lt(r,i.excluded)&&t.hasOwnProperty(r)&&(j(n=t[r])?(p=!0,o||(t[r]=Rt(n(e),s[r]))):z(n)&&(o||(i.defaults=s[r]),i.depth++,p=er(n,e,i,o)||p,i.depth--));return p}function ir(t){for(var e=t.length,i=0,o=0;o<e;o++)i=Math.max(i,t[o].data.length);return i}var or,W=((or=se)&&(rr.__proto__=or),((rr.prototype=Object.create(or&&or.prototype)).constructor=rr).prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},rr.prototype.pointOptions=function(t,e){var i,o=this.seriesOptions[e];return o||(i=this.pointType().prototype.defaults,this.seriesOptions[e]=o=L({},i,{vertical:!this.options.invertAxes},t)),o},rr.prototype.plotValue=function(t){if(!t)return 0;if(this.options.isStacked100&&R(t.value)){for(var e=t.categoryIx,i=this.categoryPoints[e],o=[],r=0,n=0;n<i.length;n++){var s,a,p=i[n];p&&(s=t.series.stack,a=p.series.stack,s&&a&&s.group!==a.group||R(p.value)&&(r+=Math.abs(p.value),o.push(Math.abs(p.value))))}if(0<r)return t.value/r}return t.value},rr.prototype.plotRange=function(t,e){void 0===e&&(e=0);var i=this.categoryPoints[t.categoryIx];if(this.options.isStacked){for(var o=this.plotValue(t),r=0<=o,n=e,s=!1,a=0;a<i.length;a++){var p=i[a];if(t===p)break;var h=t.series.stack,l=p.series.stack;if(h&&l){if(typeof h===g&&h!==l)continue;if(h.group&&h.group!==l.group)continue}p=this.plotValue(p);(0<=p&&r||p<0&&!r)&&(n+=p,o+=p,s=!0,this.options.isStacked100&&(o=Math.min(o,1)))}return s&&(n-=e),[n,o]}e=t.series,e=this.seriesValueAxis(e),e=this.categoryAxisCrossingValue(e);return[e,I(t.value)?t.value:e]},rr.prototype.stackLimits=function(t,e){for(var i=l,o=c,r=0;r<this.categoryPoints.length;r++){var n=this.categoryPoints[r];if(n)for(var s=0;s<n.length;s++){var a=n[s];!a||a.series.stack!==e&&a.series.axis!==t||(a=this.plotRange(a,0)[1],mt(a)&&isFinite(a)&&(o=Math.max(o,a),i=Math.min(i,a)))}}return{min:i,max:o}},rr.prototype.updateStackRange=function(){var t=this.options,e=t.isStacked,i=t.series,o={};if(e)for(var r=0;r<i.length;r++){var n=i[r],s=n.axis,a=s+n.stack,p=o[a];p||(p=this.stackLimits(s,n.stack),(n=this.errorTotals)&&(n.negative.length&&(p.min=Math.min(p.min,jt(n.negative).min)),n.positive.length&&(p.max=Math.max(p.max,jt(n.positive).max))),p.min!==l||p.max!==c?o[a]=p:p=null),p&&(this.valueAxisRanges[s]=p)}},rr.prototype.addErrorBar=function(t,e,i){var o,r=t.value,n=t.series,s=t.seriesIx,a=t.options.errorBars,p=e.fields.errorLow,e=e.fields.errorHigh;R(p)&&R(e)?o={low:p,high:e}:a&&mt(a.value)&&(this.seriesErrorRanges=this.seriesErrorRanges||[],this.seriesErrorRanges[s]=this.seriesErrorRanges[s]||new jo(a.value,n,h),o=this.seriesErrorRanges[s].getErrorRange(r,a.value)),o&&(t.low=o.low,t.high=o.high,this.addPointErrorBar(t,i))},rr.prototype.addPointErrorBar=function(t,e){var i,o=!this.options.invertAxes,r=t.options.errorBars,n=t.series,s=t.low,a=t.high;this.options.isStacked?(s=(i=this.stackedErrorRange(t,e)).low,a=i.high):(e={categoryIx:e,series:n},this.updateRange({value:s},e),this.updateRange({value:a},e));r=new Jo(s,a,o,this,n,r);t.errorBars=[r],t.append(r)},rr.prototype.stackedErrorRange=function(t,e){var i=this.plotRange(t,0)[1]-t.value,o=t.low+i,i=t.high+i;return this.errorTotals=this.errorTotals||{positive:[],negative:[]},o<0&&(this.errorTotals.negative[e]=Math.min(this.errorTotals.negative[e]||0,o)),0<i&&(this.errorTotals.positive[e]=Math.max(this.errorTotals.positive[e]||0,i)),{low:o,high:i}},rr.prototype.addValue=function(t,e){var i=e.categoryIx,o=e.series,r=e.seriesIx,n=this.categoryPoints[i];n||(this.categoryPoints[i]=n=[]);var s=this.seriesPoints[r];s||(this.seriesPoints[r]=s=[]);r=this.createPoint(t,e);r&&(Object.assign(r,e),r.owner=this,r.noteText=t.fields.noteText,mt(r.dataItem)||(r.dataItem=o.data[i]),this.addErrorBar(r,t,i)),this.points.push(r),s.push(r),n.push(r),this.updateRange(t.valueFields,e)},rr.prototype.evalPointOptions=function(t,e,i,o,r,n){var s={defaults:r._defaults,excluded:["data","aggregate","_events","tooltip","content","template","visual","toggle","_outOfRangeMinPoint","_outOfRangeMaxPoint"]},a=this._evalSeries[n];mt(a)||(this._evalSeries[n]=a=er(t,{},s,!0));return a&&er(t=L({},t),{value:e,category:i,index:o,series:r,dataItem:r.data[o]},s),t},rr.prototype.updateRange=function(t,e){var i=e.series.axis,e=t.value,t=this.valueAxisRanges[i];isFinite(e)&&null!==e&&((t=this.valueAxisRanges[i]=t||{min:l,max:c}).min=Math.min(t.min,e),t.max=Math.max(t.max,e))},rr.prototype.seriesValueAxis=function(t){var e=this.plotArea,t=t.axis,e=t?e.namedValueAxes[t]:e.valueAxis;if(!e)throw new Error("Unable to locate value axis with name "+t);return e},rr.prototype.reflow=function(t){var s=this,a=this.categorySlots=[],p=this.points,h=this.categoryAxis,l=0;this.traverseDataPoints(function(t,e){var i=e.categoryIx,o=e.series,r=s.seriesValueAxis(o),n=p[l++],e=a[i];e||(a[i]=e=s.categorySlot(h,i,r)),n&&(o=s.plotRange(n,r.startValue()),(i=s.valueSlot(r,o))?(i=s.pointSlot(e,i),n.aboveAxis=s.aboveAxis(n,r),n.stackValue=o[1],s.options.isStacked100&&(n.percentage=s.plotValue(n)),s.reflowPoint(n,i)):n.visible=!1)}),this.reflowCategories(a),!this.options.clip&&this.options.limitPoints&&this.points.length&&this.limitPoints(),this.box=t},rr.prototype.valueSlot=function(t,e){return t.getSlot(e[0],e[1],!this.options.clip)},rr.prototype.limitPoints=function(){for(var t=this.categoryPoints,e=t[0].concat(St(t)),i=0;i<e.length;i++)e[i]&&this.limitPoint(e[i])},rr.prototype.limitPoint=function(t){var e=this.categoryAxis.limitSlot(t.box);e.equals(t.box)||t.reflow(e)},rr.prototype.aboveAxis=function(t,e){var i=this.categoryAxisCrossingValue(e),t=t.value;return e.options.reverse?t<i:i<=t},rr.prototype.categoryAxisCrossingValue=function(t){var e=this.categoryAxis,t=t.options;return[].concat(t.axisCrossingValues||t.axisCrossingValue)[e.axisIndex||0]||0},rr.prototype.reflowPoint=function(t,e){t.reflow(e)},rr.prototype.reflowCategories=function(){},rr.prototype.pointSlot=function(t,e){var i=this.options.invertAxes,o=i?e:t,e=i?t:e;return new qt(o.x1,e.y1,o.x2,e.y2)},rr.prototype.categorySlot=function(t,e){return t.getSlot(e)},rr.prototype.traverseDataPoints=function(t){for(var e=this.options.series,i=ir(e),o=e.length,r=0;r<o;r++)this._outOfRangeCallback(e[r],"_outOfRangeMinPoint",r,t);for(var n=0;n<i;n++)for(var s=0;s<o;s++){var a=e[s],p=this.categoryAxis.categoryAt(n);t(this._bindPoint(a,s,n),{category:p,categoryIx:n,categoriesCount:i,series:a,seriesIx:s})}for(var h=0;h<o;h++)this._outOfRangeCallback(e[h],"_outOfRangeMaxPoint",h,t)},rr.prototype._outOfRangeCallback=function(t,e,i,o){var r=t[e];r&&(e=r.categoryIx,o(this._bindPoint(t,i,e,r.item),{category:r.category,categoryIx:e,series:t,seriesIx:i,dataItem:r.item}))},rr.prototype._bindPoint=function(t,e,i,o){this._bindCache||(this._bindCache=[]);var r=this._bindCache[e];return(r=r||(this._bindCache[e]=[]))[i]||(r[i]=Ro.current.bindPoint(t,i,o))},rr.prototype.formatPointValue=function(t,e){return null===t.value?"":this.chartService.format.auto(e,t.value)},rr.prototype.pointValue=function(t){return t.valueFields.value},rr);function rr(t,e){or.call(this,e),this.plotArea=t,this.chartService=t.chartService,this.categoryAxis=t.seriesCategoryAxis(e.series[0]),this.valueAxisRanges={},this.points=[],this.categoryPoints=[],this.seriesPoints=[],this.seriesOptions=[],this._evalSeries=[],this.render()}It(W,{series:[],invertAxes:!1,isStacked:!1,clip:!0,limitPoints:!0});var nr,sr=W,ar={click:function(t,e){return t.trigger("seriesClick",this.eventArgs(e))},hover:function(t,e){return t.trigger("seriesHover",this.eventArgs(e))},over:function(t,e){return t.trigger("seriesOver",this.eventArgs(e))},out:function(t,e){return t.trigger("seriesLeave",this.eventArgs(e))},eventArgs:function(t){return{value:this.value,percentage:this.percentage,stackValue:this.stackValue,category:this.category,series:this.series,dataItem:this.dataItem,runningTotal:this.runningTotal,total:this.total,element:wt(t),originalEvent:t,point:this}}},K={createNote:function(){var t=this.options.notes,e=this.noteText||t.label.text;!1!==t.visible&&mt(e)&&null!==e&&(this.note=new Le({value:this.value,text:e,dataItem:this.dataItem,category:this.category,series:this.series},this.options.notes,this.owner.chartService),this.append(this.note))}},Y=((nr=se)&&(pr.__proto__=nr),((pr.prototype=Object.create(nr&&nr.prototype)).constructor=pr).prototype.render=function(){var t,e=this.options,i=e.markers,o=e.labels;this._rendered||(this._rendered=!0,i.visible&&i.size&&(this.marker=this.createMarker(),this.append(this.marker)),o.visible&&(t=ot(o),e=this.pointData(),i=this.value,t?i=t(e):o.format&&(i=this.formatValue(o.format)),this.label=new Ce(i,L({align:A,vAlign:A,margin:{left:5,right:5},zIndex:Rt(o.zIndex,this.series.zIndex)},o),e),this.append(this.label)),this.createNote(),this.errorBar&&this.append(this.errorBar))},pr.prototype.markerBorder=function(){var t=this.options.markers,e=t.background,t=L({color:this.color},t.border);return mt(t.color)||(t.color=new C.Color(e).brightness(.8).toHex()),t},pr.prototype.createVisual=function(){},pr.prototype.createMarker=function(){var t=this.options.markers;return new ce({type:t.type,width:t.size,height:t.size,rotation:t.rotation,background:t.background,border:this.markerBorder(),opacity:this.series.opacity||t.opacity,zIndex:Rt(t.zIndex,this.series.zIndex),animation:t.animation,visual:t.visual},{dataItem:this.dataItem,value:this.value,series:this.series,category:this.category})},pr.prototype.markerBox=function(){return this.marker||(this.marker=this.createMarker(),this.marker.reflow(this._childBox)),this.marker.box},pr.prototype.reflow=function(t){var e=this.options,i=this.aboveAxis,o=e.vertical;this.render();var r=(this.box=t).clone();if(o?i?r.y1-=r.height():r.y2+=r.height():i?r.x1+=r.width():r.x2-=r.width(),this._childBox=r,this.marker&&this.marker.reflow(r),this.reflowLabel(r),this.errorBars)for(var n=0;n<this.errorBars.length;n++)this.errorBars[n].reflow(r);this.note&&(i=this.markerBox(),e.markers.visible&&e.markers.size||(e=i.center(),i=new qt(e.x,e.y,e.x,e.y)),this.note.reflow(i))},pr.prototype.reflowLabel=function(t){var e=this.options,i=this.label,e=e.labels.position;i&&(e="below"===(e="above"===e?P:e)?w:e,i.reflow(t),i.box.alignTo(this.markerBox(),e),i.reflow(i.box))},pr.prototype.createHighlight=function(){var t=this.options.highlight.markers,e=this.markerBorder().color,i=this.options.markers,o=i.size+(i.border.width||0)+(t.border.width||0),t=new ce({type:i.type,width:o,height:o,rotation:i.rotation,background:t.color||e,border:{color:t.border.color,width:t.border.width,opacity:Rt(t.border.opacity,1)},opacity:Rt(t.opacity,1)});return t.reflow(this._childBox),t.getElement()},pr.prototype.highlightVisual=function(){return(this.marker||{}).visual},pr.prototype.highlightVisualArgs=function(){var t,e,i,o,r=this.marker;return r?(o=r.paddingBox.toRect(),t=r.visual):(i=(e=this.options.markers.size)/2,r=this.box.center(),o=new C.geometry.Rect([r.x-i,r.y-i],[e,e])),{options:this.options,rect:o,visual:t}},pr.prototype.tooltipAnchor=function(){var t=this.markerBox(),e=this.owner.pane.clipBox();if(!e||e.overlaps(t)){var i,o=t.x2+5,e=S,t=this.aboveAxis?(i=t.y1,w):(i=t.y2,P);return{point:new Ut(o,i),align:{horizontal:e,vertical:t}}}},pr.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},pr.prototype.overlapsBox=function(t){return this.markerBox().overlaps(t)},pr.prototype.unclipElements=function(){this.label&&(this.label.options.noclip=!0),this.note&&(this.note.options.noclip=!0)},pr.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,stackValue:this.stackValue,series:this.series}},pr);function pr(t,e){nr.call(this),this.value=t,this.options=e,this.aboveAxis=Rt(this.options.aboveAxis,!0),this.tooltipTracking=!0}Y.prototype.defaults={vertical:!0,markers:{visible:!0,background:p,size:8,type:u,border:{width:2},opacity:1},labels:{visible:!1,position:"above",margin:U(3),padding:U(4),animation:{type:"fadeIn",delay:600}},notes:{label:{}},highlight:{markers:{border:{color:"#fff",width:2}},zIndex:100},errorBars:{line:{width:1}}},L(Y.prototype,ar),L(Y.prototype,K);var hr,lr=Y,N=((hr=se)&&(cr.__proto__=hr),((cr.prototype=Object.create(hr&&hr.prototype)).constructor=cr).prototype.points=function(){return this.toGeometryPoints(this.linePoints)},cr.prototype.toGeometryPoints=function(t){for(var e=[],i=0,o=t.length;i<o;i++)t[i]&&!1!==t[i].visible&&e.push(t[i]._childBox.toRect().center());return e},cr.prototype.createVisual=function(){var t=this,e=this.series.visual;e?(this.visual=e({points:this.toGeometryPoints(this.linePoints),series:this.series,sender:this.getSender(),createVisual:function(){return t.segmentVisual(),t.visual}}),this.visual&&!mt(this.visual.options.zIndex)&&(this.visual.options.zIndex=this.series.zIndex)):this.segmentVisual()},cr.prototype.segmentVisual=function(){var t=this.options,e=this.series,i=e.color,o=e._defaults;j(i)&&o&&(i=o.color);e=C.drawing.Path.fromPoints(this.points(),{stroke:{color:i,width:e.width,opacity:e.opacity,dashType:e.dashType},zIndex:e.zIndex});t.closed&&e.close(),this.visual=e},cr.prototype.aliasFor=function(t,e){return this.parent.getNearestPoint(e.x,e.y,this.seriesIx)},cr);function cr(t,e,i){hr.call(this),this.linePoints=t,this.series=e,this.seriesIx=i}It(N,{closed:!1});var ur=N;function dr(t,e,i,o,r){var n=t.box,t=new C.geometry.Point;return t[e]=n[e+i],t[o]=n[o+r],t}var gr,$={calculateStepPoints:function(t){for(var e=this.parent.plotArea.seriesCategoryAxis(this.series).options,i=e.justified,o=e.vertical,e=e.reverse,r=o?v:m,n=o?m:v,s=e?2:1,a=s,p=dr(t[0],r,s,n,a),h=[p],l=1;l<t.length;l++){var c,u=dr(t[l],r,s,n,a);p[r]!==u[r]&&((c=new C.geometry.Point)[r]=p[r],c[n]=u[n],h.push(c,u)),p=u}return i?p!==St(h)&&h.push(p):h.push(dr(St(t),r,s,n,e?1:2)),h}},G=((gr=ur)&&(fr.__proto__=gr),((fr.prototype=Object.create(gr&&gr.prototype)).constructor=fr).prototype.points=function(){return this.calculateStepPoints(this.linePoints)},fr);function fr(){gr.apply(this,arguments)}L(G.prototype,$);var yr,vr,mr=G,xr=((vr=ur)&&(_r.__proto__=vr),((_r.prototype=Object.create(vr&&vr.prototype)).constructor=_r).prototype.segmentVisual=function(){var t=this.series,e=t._defaults,i=t.color;j(i)&&e&&(i=e.color);e=new uo(this.options.closed).process(this.points()),t=new C.drawing.Path({stroke:{color:i,width:t.width,opacity:t.opacity,dashType:t.dashType},zIndex:t.zIndex});t.segments.push.apply(t.segments,e),this.visual=t},_r),W={renderSegments:function(){var t,e=this.options,i=this.seriesPoints,o=e.series,r=i.length;this._segments=[];for(var n=0;n<r;n++){for(var s=o[n],a=this.sortPoints(i[n]),p=a.length,h=[],l=0;l<p;l++){var c=a[l];c?h.push(c):this.seriesMissingValues(s)!==Lo&&(1<h.length&&(t=this.createSegment(h,s,n,t),this._addSegment(t)),h=[])}1<h.length&&(t=this.createSegment(h,s,n,t),this._addSegment(t))}this.children.unshift.apply(this.children,this._segments)},_addSegment:function(t){this._segments.push(t),t.parent=this},sortPoints:function(t){return t},seriesMissingValues:function(t){t=t.missingValues;return!t&&this.options.isStacked?Vo:t||Lo},getNearestPoint:function(t,e,i){for(var o,r=new Ut(t,e),n=this.seriesPoints[i],s=l,a=0;a<n.length;a++){var p,h=n[a];h&&mt(h.value)&&null!==h.value&&!1!==h.visible&&((p=h.box.center().distanceTo(r))<s&&(o=h,s=p))}return o}},Y=((yr=C.drawing.Animation)&&(br.__proto__=yr),((br.prototype=Object.create(yr&&yr.prototype)).constructor=br).prototype.setup=function(){this._setEnd(this.options.box.x1)},br.prototype.step=function(t){var e=this.options.box;this._setEnd(ct(e.x1,e.x2,t))},br.prototype._setEnd=function(t){var e=this.element,i=e.segments,o=i[1].anchor(),i=i[2].anchor();e.suspend(),o.setX(t),e.resume(),i.setX(t)},br);function br(){yr.apply(this,arguments)}function _r(){vr.apply(this,arguments)}It(Y,{duration:600}),C.drawing.AnimationFactory.current.register("clip",Y);var wr=Y;function Ar(t){for(var e=0;e<t.length;e++)if(mt(t[e].zIndex))return!0}var Sr,N={createAnimation:function(){var t,e=this.getRoot();e&&!1!==(e.options||{}).transitions&&(t=e.size(),e=C.drawing.Path.fromRect(t.toRect()),this.visual.clip(e),this.animation=new wr(e,{box:t}),Ar(this.options.series)&&this._setChildrenAnimation(e))},_setChildrenAnimation:function(t){for(var e=this.animationPoints(),i=0;i<e.length;i++){var o=e[i];o&&o.visual&&mt(o.visual.options.zIndex)&&o.visual.clip(t)}}},G=((Sr=sr)&&(kr.__proto__=Sr),((kr.prototype=Object.create(Sr&&Sr.prototype)).constructor=kr).prototype.render=function(){Sr.prototype.render.call(this),this.updateStackRange(),this.renderSegments()},kr.prototype.pointType=function(){return lr},kr.prototype.createPoint=function(t,e){var i=e.categoryIx,o=e.category,r=e.series,n=e.seriesIx,s=this.seriesMissingValues(r),e=t.valueFields.value;if(!mt(e)||null===e){if(s!==Vo)return null;e=0}s=this.pointOptions(r,n),s=this.evalPointOptions(s,e,o,i,r,n),t=t.fields.color||r.color;j(r.color)&&(t=s.color);s=new lr(e,s);return s.color=t,this.append(s),s},kr.prototype.plotRange=function(t){var e=this.plotValue(t);if(this.options.isStacked)for(var i=t.categoryIx,o=this.categoryPoints[i],r=0;r<o.length;r++){var n=o[r];if(t===n)break;e+=this.plotValue(n),this.options.isStacked100&&(e=Math.min(e,1))}return[e,e]},kr.prototype.createSegment=function(t,e,i){var o=e.style;return new("step"===o?mr:"smooth"===o?xr:ur)(t,e,i)},kr.prototype.animationPoints=function(){for(var t=this.points,e=[],i=0;i<t.length;i++)e.push((t[i]||{}).marker);return e.concat(this._segments)},kr);function kr(){Sr.apply(this,arguments)}L(G.prototype,W,N);var Pr,Cr,Tr=G,Mr=((Cr=ur)&&(Or.__proto__=Cr),((Or.prototype=Object.create(Cr&&Cr.prototype)).constructor=Or).prototype.createVisual=function(){var t=this.series,e=t._defaults,i=t.line||{},o=t.color;j(o)&&e&&(o=e.color),this.visual=new C.drawing.Group({zIndex:t.zIndex}),this.createFill({fill:{color:o,opacity:t.opacity},stroke:null}),0<i.width&&!1!==i.visible&&this.createStroke({stroke:L({color:o,opacity:t.opacity,lineCap:"butt"},i)})},Or.prototype.strokeSegments=function(){return this._strokeSegments||(this._strokeSegments=this.createStrokeSegments())},Or.prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.points())},Or.prototype.stackSegments=function(){return(this.prevSegment||this).createStackSegments(this.stackPoints)},Or.prototype.createStackSegments=function(t){return this.segmentsFromPoints(this.toGeometryPoints(t)).reverse()},Or.prototype.segmentsFromPoints=function(t){return t.map(function(t){return new C.geometry.Segment(t)})},Or.prototype.createStroke=function(t){t=new C.drawing.Path(t);t.segments.push.apply(t.segments,this.strokeSegments()),this.visual.append(t)},Or.prototype.hasStackSegment=function(){return this.prevSegment||this.stackPoints&&this.stackPoints.length},Or.prototype.createFill=function(t){var e,i=this.strokeSegments(),o=i.slice(0),r=this.hasStackSegment();r&&(e=this.stackSegments(),yt(o,e));t=new C.drawing.Path(t);t.segments.push.apply(t.segments,o),!r&&1<i.length&&this.fillToAxes(t),this.visual.append(t)},Or.prototype.fillToAxes=function(t){var e=this.parent,i=e.options.invertAxes,o=e.seriesValueAxis(this.series),r=e.categoryAxisCrossingValue(o),e=o.getSlot(r,r,!0),o=this.strokeSegments(),r=o[0].anchor(),o=St(o).anchor(),e=i?e.x1:e.y1;i?t.lineTo(e,o.y).lineTo(e,r.y):t.lineTo(o.x,e).lineTo(r.x,e)},Or),Y=((Pr=Mr)&&(Rr.__proto__=Pr),((Rr.prototype=Object.create(Pr&&Pr.prototype)).constructor=Rr).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.calculateStepPoints(this.linePoints))},Rr.prototype.createStackSegments=function(t){return this.segmentsFromPoints(this.calculateStepPoints(t)).reverse()},Rr);function Rr(){Pr.apply(this,arguments)}function Or(t,e,i,o,r){Cr.call(this,t,e,i),this.prevSegment=o,this.stackPoints=r}L(Y.prototype,$);var Ir,jr,Br,Vr,Lr=Y,zr=((Vr=Mr)&&(Gr.__proto__=Vr),((Gr.prototype=Object.create(Vr&&Vr.prototype)).constructor=Gr).prototype.createStrokeSegments=function(){var t=new uo(this.options.closed),e=this.points();return t.process(e)},Gr.prototype.createStackSegments=function(){for(var t=this.strokeSegments(),e=[],i=t.length-1;0<=i;i--){var o=t[i];e.push(new C.geometry.Segment(o.anchor(),o.controlOut(),o.controlIn()))}return e},Gr),Er=((Br=Tr)&&(Hr.__proto__=Br),((Hr.prototype=Object.create(Br&&Br.prototype)).constructor=Hr).prototype.createSegment=function(t,e,i,o){var r,n,s=this.options.isStacked,a=(e.line||{}).style;return s&&0<i&&o&&("gap"!==this.seriesMissingValues(e)?(n=o.linePoints,r=o):n=this._gapStackPoints(t,i,a)),new("step"===a?Lr:"smooth"===a?zr:Mr)(t,e,i,r,n)},Hr.prototype.reflow=function(t){Br.prototype.reflow.call(this,t);var e=this._stackPoints;if(e)for(var i=0;i<e.length;i++){var o=e[i],r=this.categoryAxis.getSlot(o.categoryIx);o.reflow(r)}},Hr.prototype._gapStackPoints=function(t,e,i){var o=this.seriesPoints,r=t[0].categoryIx,t=t.length;r<0&&(r=0,t--);var n=r+t,s=this.seriesOptions[0]._outOfRangeMinPoint?1:0,a=[];this._stackPoints=this._stackPoints||[];for(var p=r;p<n;p++){for(var h,l=p+s,c=e,u=void 0;u=o[--c][l],0<c&&!u;);u?("step"!==i&&r<p&&!o[c][l-1]&&a.push(this._previousSegmentPoint(p,l,l-1,c)),a.push(u),"step"!==i&&p+1<n&&!o[c][l+1]&&a.push(this._previousSegmentPoint(p,l,l+1,c))):(h=this._createGapStackPoint(p),this._stackPoints.push(h),a.push(h))}return a},Hr.prototype._previousSegmentPoint=function(t,e,i,o){for(var r,n=this.seriesPoints,s=o;0<s&&!r;)r=n[--s][i];return r?r=n[s][e]:(r=this._createGapStackPoint(t),this._stackPoints.push(r)),r},Hr.prototype._createGapStackPoint=function(t){var e=this.pointOptions({},0),e=new lr(0,e);return e.categoryIx=t,e.series={},e},Hr.prototype.seriesMissingValues=function(t){return t.missingValues||Vo},Hr.prototype.supportsPointInactiveOpacity=function(){return!1},Hr),Fr=((jr=C.Class)&&(Ur.__proto__=jr),((Ur.prototype=Object.create(jr&&jr.prototype)).constructor=Ur).prototype.update=function(t){var e,i=this.axisRanges;for(e in t){var o=t[e],r=i[e];i[e]=r=r||{min:l,max:c},r.min=Math.min(r.min,o.min),r.max=Math.max(r.max,o.max)}},Ur.prototype.reset=function(t){this.axisRanges[t]=void 0},Ur.prototype.query=function(t){return this.axisRanges[t]},Ur),G=((Ir=se)&&(Dr.__proto__=Ir),((Dr.prototype=Object.create(Ir&&Ir.prototype)).constructor=Dr).prototype.createVisual=function(){this.textBox.options.noclip=this.options.noclip},Dr.prototype.reflow=function(t){var e=this.options,i=e.vertical,o=e.aboveAxis,r=this.children[0],n=r.options,s=r.box,a=r.options.padding,p=t;n.align=i?A:S,n.vAlign=i?P:A,"insideEnd"===e.position?i?(n.vAlign=P,!o&&s.height()<t.height()&&(n.vAlign=w)):n.align=o?k:S:e.position===A?(n.vAlign=A,n.align=A):"insideBase"===e.position?i?n.vAlign=o?w:P:n.align=o?S:k:"outsideEnd"===e.position&&(p=i?o?new qt(t.x1,t.y1-s.height(),t.x2,t.y1):new qt(t.x1,t.y2,t.x2,t.y2+s.height()):(n.align=A,o?new qt(t.x2,t.y1,t.x2+s.width(),t.y2):new qt(t.x1-s.width(),t.y1,t.x1,t.y2))),e.rotation||(i?a.left=a.right=(p.width()-r.contentBox.width())/2:a.top=a.bottom=(p.height()-r.contentBox.height())/2),r.reflow(p)},Dr.prototype.alignToClipBox=function(t){var e=this.options.vertical?m:v,i=e+"1",o=e+"2",r=this.children[0],e=this.parent.box;(e[i]<t[i]||t[o]<e[o])&&((r=r.paddingBox.clone())[i]=Math.max(e[i],t[i]),r[o]=Math.min(e[o],t[o]),this.reflow(r))},Dr);function Dr(t,e,i){Ir.call(this,e),this.textBox=new Ce(t,this.options,i),this.append(this.textBox)}function Ur(){jr.call(this),this.axisRanges={}}function Hr(){Br.apply(this,arguments)}function Gr(){Vr.apply(this,arguments)}It(G,{position:"outsideEnd",margin:U(3),padding:U(4),color:a,background:"",border:{width:1,color:""},aboveAxis:!0,vertical:!1,animation:{type:"fadeIn",delay:600},zIndex:2});var Nr=G;function qr(t){t=t.overlay;return t&&t.gradient&&"none"!==t.gradient}var Xr,Y=((Xr=se)&&(Yr.__proto__=Xr),((Yr.prototype=Object.create(Xr&&Xr.prototype)).constructor=Yr).prototype.render=function(){this._rendered||(this._rendered=!0,this.createLabel(),this.createNote(),this.errorBar&&this.append(this.errorBar))},Yr.prototype.createLabel=function(){var t,e,i=this.options,o=i.labels;o.visible&&(t=this.pointData(),e=(e=ot(o))?e(t):this.formatValue(o.format),this.label=new Nr(e,L({vertical:i.vertical},o),t),this.append(this.label))},Yr.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Yr.prototype.reflow=function(t){this.render();var e=this.label;if(this.box=t,e&&(e.options.aboveAxis=this.aboveAxis,e.reflow(t)),this.note&&this.note.reflow(t),this.errorBars)for(var i=0;i<this.errorBars.length;i++)this.errorBars[i].reflow(t)},Yr.prototype.createVisual=function(){var e=this,t=this.box,i=this.options,o=i.visual;!1!==this.visible&&(Xr.prototype.createVisual.call(this),o?(i=this.rectVisual=o({category:this.category,dataItem:this.dataItem,value:this.value,sender:this.getSender(),series:this.series,percentage:this.percentage,stackValue:this.stackValue,runningTotal:this.runningTotal,total:this.total,rect:t.toRect(),createVisual:function(){var t=new C.drawing.Group;return e.createRect(t),t},options:i}))&&this.visual.append(i):0<t.width()&&0<t.height()&&this.createRect(this.visual))},Yr.prototype.createRect=function(t){var e=this.options,i=e.border,o=(mt(i.opacity)?i:e).opacity,r=this.box.toRect();r.size.width=Math.round(r.size.width);r=this.rectVisual=C.drawing.Path.fromRect(r,{fill:{color:this.color,opacity:e.opacity},stroke:{color:this.getBorderColor(),width:i.width,opacity:o,dashType:i.dashType}}),o=this.box.width(),i=this.box.height();6<(e.vertical?o:i)&&(T(r),(o<1||i<1)&&(r.options.stroke.lineJoin="round")),t.append(r),qr(e)&&(e=this.createGradientOverlay(r,{baseColor:this.color},L({end:e.vertical?void 0:[0,1]},e.overlay)),t.append(e))},Yr.prototype.createHighlight=function(t){return T(C.drawing.Path.fromRect(this.box.toRect(),t))},Yr.prototype.highlightVisual=function(){return this.rectVisual},Yr.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this.rectVisual}},Yr.prototype.getBorderColor=function(){var t=this.color,e=this.options.border,i=e._brightness||.8,e=e.color;return mt(e)||(e=new C.Color(t).brightness(i).toHex()),e},Yr.prototype.tooltipAnchor=function(){var t,e,i,o,r=this.options,n=this.box,s=this.aboveAxis,a=this.owner.pane.clipBox()||n,p=S,h=P;return r.vertical?(t=Math.min(n.x2,a.x2)+5,s?o=Math.max(n.y1,a.y1):(o=Math.min(n.y2,a.y2),h=w)):(e=Math.max(n.x1,a.x1),i=Math.min(n.x2,a.x2),o=r.isStacked?(h=w,t=s?(p=k,i):e,Math.max(n.y1,a.y1)-5):(s?t=i+5:(t=e-5,p=k),Math.max(n.y1,a.y1))),{point:new Ut(t,o),align:{horizontal:p,vertical:h}}},Yr.prototype.overlapsBox=function(t){return this.box.overlaps(t)},Yr.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,stackValue:this.stackValue,runningTotal:this.runningTotal,total:this.total,series:this.series}},Yr);function Yr(t,e){Xr.call(this),this.options=e,this.color=e.color||p,this.aboveAxis=Rt(this.options.aboveAxis,!0),this.value=t}L(Y.prototype,ar),L(Y.prototype,K),Y.prototype.defaults={border:{width:1},vertical:!0,overlay:{gradient:"glass"},labels:{visible:!1,format:"{0}"},opacity:1,notes:{label:{}}};var Wr=Y;function Zr(t,e){t.forEach(e)}function Kr(t,e){for(var i=t.length,o=i-1;0<=o;o--)e(t[o],o-i-1)}var $r,G=(($r=se)&&(Jr.__proto__=$r),((Jr.prototype=Object.create($r&&$r.prototype)).constructor=Jr).prototype.reflow=function(o){var t=this.options,e=t.vertical,i=t.gap,r=t.spacing,n=this.children,s=n.length,a=e?m:v,t=s+i+r*(s-1),p=(e?o.height():o.width())/t,h=o[a+1]+i/2*p;this.forEach(n,function(t,e){var i=(t.box||o).clone();i[a+1]=h,i[a+2]=h+p,t.reflow(i),e<s-1&&(h+=p*r),h+=p})},Jr);function Jr(t){$r.call(this,t),this.forEach=t.rtl?Kr:Zr}It(G,{vertical:!1,gap:0,spacing:0});var Qr,tn=G,Y=((Qr=se)&&(en.__proto__=Qr),((en.prototype=Object.create(Qr&&Qr.prototype)).constructor=en).prototype.reflow=function(t){for(var e=this.options.vertical?v:m,i=this.children,o=i.length,r=this.box=new qt,n=0;n<o;n++){var s,a=i[n];!1!==a.visible&&((s=a.box.clone()).snapTo(t,e),0===n&&(r=this.box=s.clone()),a.reflow(s),r.wrap(s))}},en);function en(){Qr.apply(this,arguments)}It(Y,{vertical:!0});var on,rn=Y,G=((on=sr)&&(nn.__proto__=on),((nn.prototype=Object.create(on&&on.prototype)).constructor=nn).prototype.render=function(){on.prototype.render.call(this),this.updateStackRange()},nn.prototype.pointType=function(){return Wr},nn.prototype.clusterType=function(){return tn},nn.prototype.stackType=function(){return rn},nn.prototype.stackLimits=function(t,e){return on.prototype.stackLimits.call(this,t,e)},nn.prototype.createPoint=function(t,e){var i=e.categoryIx,o=e.category,r=e.series,n=e.seriesIx,s=this.options,a=this.children,p=s.isStacked,h=this.pointValue(t),l=this.pointOptions(r,n),e=l.labels;p&&"outsideEnd"===e.position&&(e.position="insideEnd"),l.isStacked=p;t=t.fields.color||r.color;h<0&&l.negativeColor&&(t=l.negativeColor),l=this.evalPointOptions(l,h,o,i,r,n),j(r.color)&&(t=l.color);l=new(this.pointType())(h,l);l.color=t;i=a[i];return i||(i=new(this.clusterType())({vertical:s.invertAxes,gap:s.gap,spacing:s.spacing,rtl:!s.invertAxes&&(this.chartService||{}).rtl}),this.append(i)),(p?this.getStackWrap(r,i):i).append(l),l},nn.prototype.getStackWrap=function(t,e){var i,t=t.stack,o=t&&t.group||t,r=e.children;if(typeof o===g){for(var n=0;n<r.length;n++)if(r[n]._stackGroup===o){i=r[n];break}}else i=r[0];return i||((i=new(this.stackType())({vertical:!this.options.invertAxes}))._stackGroup=o,e.append(i)),i},nn.prototype.categorySlot=function(t,e,i){var o=this.options,t=t.getSlot(e),e=i.startValue();return o.isStacked&&(e=i.getSlot(e,e,!0),t[(o=o.invertAxes?v:m)+1]=t[o+2]=e[o+1]),t},nn.prototype.reflowCategories=function(t){for(var e=this.children,i=e.length,o=0;o<i;o++)e[o].reflow(t[o])},nn.prototype.createAnimation=function(){this._setAnimationOptions(),on.prototype.createAnimation.call(this),Ar(this.options.series)&&this._setChildrenAnimation()},nn.prototype._setChildrenAnimation=function(){for(var t=this.points,e=0;e<t.length;e++){var i=t[e],o=i.visual;o&&mt(o.options.zIndex)&&(i.options.animation=this.options.animation,i.createAnimation())}},nn.prototype._setAnimationOptions=function(){var t,e=this.options,i=e.animation||{};t=e.isStacked?(t=this.seriesValueAxis(e.series[0])).getSlot(t.startValue()):this.categoryAxis.getSlot(0),i.origin=new C.geometry.Point(t.x1,t.y1),i.vertical=!e.invertAxes},nn);function nn(){on.apply(this,arguments)}It(G,{animation:{type:zo}});var sn,an=G,Y=((sn=se)&&(pn.__proto__=sn),((pn.prototype=Object.create(sn&&sn.prototype)).constructor=pn).prototype.reflow=function(t){var e=this.options,i=this.value,o=this.owner.seriesValueAxis(e),e=o.getSlot(i.open,i.close),o=o.getSlot(i.low,i.high);e.x1=o.x1=t.x1,e.x2=o.x2=t.x2,this.realBody=e;i=o.center().x,t=[];t.push([[i,o.y1],[i,e.y1]]),t.push([[i,e.y2],[i,o.y2]]),this.lines=t,this.box=o.clone().wrap(e),this._rendered||(this._rendered=!0,this.createNote()),this.reflowNote()},pn.prototype.reflowNote=function(){this.note&&this.note.reflow(this.box)},pn.prototype.createVisual=function(){sn.prototype.createVisual.call(this),this._mainVisual=this.mainVisual(this.options),this.visual.append(this._mainVisual),this.createOverlay()},pn.prototype.mainVisual=function(t){var e=new C.drawing.Group;return this.createBody(e,t),this.createLines(e,t),e},pn.prototype.createBody=function(t,e){var i=C.drawing.Path.fromRect(this.realBody.toRect(),{fill:{color:this.color,opacity:e.opacity},stroke:null});0<e.border.width&&i.options.set("stroke",{color:this.getBorderColor(),width:e.border.width,dashType:e.border.dashType,opacity:Rt(e.border.opacity,e.opacity)}),T(i),t.append(i),qr(e)&&t.append(this.createGradientOverlay(i,{baseColor:this.color},L({end:e.vertical?void 0:[0,1]},e.overlay)))},pn.prototype.createLines=function(t,e){this.drawLines(t,e,this.lines,e.line)},pn.prototype.drawLines=function(t,e,i,o){if(i)for(var r={stroke:{color:o.color||this.color,opacity:Rt(o.opacity,e.opacity),width:o.width,dashType:o.dashType,lineCap:"butt"}},n=0;n<i.length;n++){var s=C.drawing.Path.fromPoints(i[n],r);T(s),t.append(s)}},pn.prototype.getBorderColor=function(){var t=this.options.border,e=t.color;return mt(e)||(e=new C.Color(this.color).brightness(t._brightness).toHex()),e},pn.prototype.createOverlay=function(){var t=C.drawing.Path.fromRect(this.box.toRect(),{fill:{color:p,opacity:0},stroke:null});this.visual.append(t)},pn.prototype.createHighlight=function(){var t=this.options.highlight,e=this.color;this.color=t.color||this.color;t=this.mainVisual(L({},this.options,{line:{color:this.getBorderColor()}},t));return this.color=e,t},pn.prototype.highlightVisual=function(){return this._mainVisual},pn.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this._mainVisual}},pn.prototype.tooltipAnchor=function(){var t=this.box,e=this.owner.pane.clipBox()||t;return{point:new Ut(t.x2+5,Math.max(t.y1,e.y1)+5),align:{horizontal:S,vertical:P}}},pn.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},pn.prototype.overlapsBox=function(t){return this.box.overlaps(t)},pn);function pn(t,e){sn.call(this,e),this.value=t}It(Y,{vertical:!0,border:{_brightness:.8},line:{width:2},overlay:{gradient:"glass"},tooltip:{format:"<table><tr><th colspan='2'>{4:d}</th></tr><tr><td>Open:</td><td>{0:C}</td></tr><tr><td>High:</td><td>{1:C}</td></tr><tr><td>Low:</td><td>{2:C}</td></tr><tr><td>Close:</td><td>{3:C}</td></tr></table>"},highlight:{opacity:1,border:{width:1,opacity:1},line:{width:1,opacity:1}},notes:{visible:!0,label:{}}}),L(Y.prototype,ar),L(Y.prototype,K);var hn=Y;function ln(t){return wo(t)===t.length}var cn,G=((cn=sr)&&(un.__proto__=cn),((un.prototype=Object.create(cn&&cn.prototype)).constructor=un).prototype.reflowCategories=function(t){for(var e=this.children,i=e.length,o=0;o<i;o++)e[o].reflow(t[o])},un.prototype.addValue=function(t,e){var i,o=e.categoryIx,r=e.category,n=e.series,s=e.seriesIx,a=this.children,p=this.options,h=t.valueFields,l=ln(this.splitValue(h)),c=n.data[o],u=this.categoryPoints[o];u||(this.categoryPoints[o]=u=[]),l&&(i=this.createPoint(t,e));a=a[o];a||(a=new tn({vertical:p.invertAxes,gap:p.gap,spacing:p.spacing,rtl:!p.invertAxes&&(this.chartService||{}).rtl}),this.append(a)),i&&(this.updateRange(h,e),a.append(i),i.categoryIx=o,i.category=r,i.series=n,i.seriesIx=s,i.owner=this,i.dataItem=c,i.noteText=t.fields.noteText),this.points.push(i),u.push(i)},un.prototype.pointType=function(){return hn},un.prototype.createPoint=function(t,e){var i=e.categoryIx,o=e.category,r=e.series,n=e.seriesIx,s=this.pointType(),a=t.valueFields,p=L({},r),e=t.fields.color||r.color,p=this.evalPointOptions(p,a,o,i,r,n);"candlestick"===r.type&&a.open>a.close&&(e=t.fields.downColor||r.downColor||r.color),j(r.color)&&(e=p.color),p.vertical=!this.options.invertAxes;p=new s(a,p);return p.color=e,p},un.prototype.splitValue=function(t){return[t.low,t.open,t.close,t.high]},un.prototype.updateRange=function(t,e){var i=e.series.axis,e=this.splitValue(t),t=this.valueAxisRanges[i],t=this.valueAxisRanges[i]=t||{min:l,max:c};t=this.valueAxisRanges[i]={min:Math.min.apply(Math,e.concat([t.min])),max:Math.max.apply(Math,e.concat([t.max]))}},un.prototype.formatPointValue=function(t,e){var i=t.value;return this.chartService.format.auto(e,i.open,i.high,i.low,i.close,t.category)},un.prototype.animationPoints=function(){return this.points},un);function un(){cn.apply(this,arguments)}L(G.prototype,N);var dn,gn=G,Y=((dn=hn)&&(fn.__proto__=dn),((fn.prototype=Object.create(dn&&dn.prototype)).constructor=fn).prototype.reflow=function(t){var e,i,o=this.options,r=this.value,n=this.owner.seriesValueAxis(o);this.boxSlot=i=n.getSlot(r.q1,r.q3),this.realBody=i,this.reflowBoxSlot(t),this.whiskerSlot=e=n.getSlot(r.lower,r.upper),this.reflowWhiskerSlot(t);o=n.getSlot(r.median);r.mean&&(r=n.getSlot(r.mean),this.meanPoints=this.calcMeanPoints(t,r)),this.whiskerPoints=this.calcWhiskerPoints(i,e),this.medianPoints=this.calcMedianPoints(t,o),this.box=e.clone().wrap(i),this.reflowNote()},fn.prototype.reflowBoxSlot=function(t){this.boxSlot.x1=t.x1,this.boxSlot.x2=t.x2},fn.prototype.reflowWhiskerSlot=function(t){this.whiskerSlot.x1=t.x1,this.whiskerSlot.x2=t.x2},fn.prototype.calcMeanPoints=function(t,e){return[[[t.x1,e.y1],[t.x2,e.y1]]]},fn.prototype.calcWhiskerPoints=function(t,e){var i=e.center().x;return[[[i-5,e.y1],[i+5,e.y1],[i,e.y1],[i,t.y1]],[[i-5,e.y2],[i+5,e.y2],[i,e.y2],[i,t.y2]]]},fn.prototype.calcMedianPoints=function(t,e){return[[[t.x1,e.y1],[t.x2,e.y1]]]},fn.prototype.renderOutliers=function(t){for(var e=this.value,i=e.outliers||[],o=3*Math.abs(e.q3-e.q1),r=[],n=(t.markers,0),s=0;s<i.length;s++){var a=i[s],p=L({},(n=a<e.q3+o&&a>e.q1-o?t.outliers:t.extremes).border);mt(p.color)||(mt(this.color)?p.color=this.color:p.color=new C.Color(n.background).brightness(.8).toHex());p=new ce({type:n.type,width:n.size,height:n.size,rotation:n.rotation,background:n.background,border:p,opacity:n.opacity});p.value=a,r.push(p)}return this.reflowOutliers(r),r},fn.prototype.reflowOutliers=function(t){for(var e=this.owner.seriesValueAxis(this.options),i=this.box.center(),o=0;o<t.length;o++){var r=t[o].value,r=e.getSlot(r);this.options.vertical?r.move(i.x):r.move(void 0,i.y),this.box=this.box.wrap(r),t[o].reflow(r)}},fn.prototype.mainVisual=function(t){for(var e=dn.prototype.mainVisual.call(this,t),i=this.renderOutliers(t),o=0;o<i.length;o++){var r=i[o].getElement();r&&e.append(r)}return e},fn.prototype.createLines=function(t,e){this.drawLines(t,e,this.whiskerPoints,e.whiskers),this.drawLines(t,e,this.medianPoints,e.median),this.drawLines(t,e,this.meanPoints,e.mean)},fn.prototype.getBorderColor=function(){return(this.options.border||{}).color?this.options.border.color:this.color||dn.prototype.getBorderColor.call(this)},fn);function fn(t,e){dn.call(this,t,e),this.createNote()}It(Y,{border:{_brightness:.8},line:{width:2},median:{color:"#f6f6f6"},mean:{width:2,dashType:"dash",color:"#f6f6f6"},overlay:{gradient:"glass"},tooltip:{format:"<table><tr><th colspan='2'>{6:d}</th></tr><tr><td>Lower:</td><td>{0:C}</td></tr><tr><td>Q1:</td><td>{1:C}</td></tr><tr><td>Median:</td><td>{2:C}</td></tr><tr><td>Mean:</td><td>{5:C}</td></tr><tr><td>Q3:</td><td>{3:C}</td></tr><tr><td>Upper:</td><td>{4:C}</td></tr></table>"},highlight:{opacity:1,border:{width:1,opacity:1},line:{width:1,opacity:1}},notes:{visible:!0,label:{}},outliers:{visible:!0,size:8,type:"cross",background:p,border:{width:2,opacity:1},opacity:0},extremes:{visible:!0,size:8,type:u,background:p,border:{width:2,opacity:1},opacity:0}}),L(Y.prototype,ar);var yn,vn,mn,xn=Y,bn=((mn=xn)&&(kn.__proto__=mn),((kn.prototype=Object.create(mn&&mn.prototype)).constructor=kn).prototype.reflowBoxSlot=function(t){this.boxSlot.y1=t.y1,this.boxSlot.y2=t.y2},kn.prototype.reflowWhiskerSlot=function(t){this.whiskerSlot.y1=t.y1,this.whiskerSlot.y2=t.y2},kn.prototype.calcMeanPoints=function(t,e){return[[[e.x1,t.y1],[e.x1,t.y2]]]},kn.prototype.calcWhiskerPoints=function(t,e){var i=e.center().y;return[[[e.x1,i-5],[e.x1,i+5],[e.x1,i],[t.x1,i]],[[e.x2,i-5],[e.x2,i+5],[e.x2,i],[t.x2,i]]]},kn.prototype.calcMedianPoints=function(t,e){return[[[e.x1,t.y1],[e.x1,t.y2]]]},kn),_n=((vn=gn)&&(Sn.__proto__=vn),((Sn.prototype=Object.create(vn&&vn.prototype)).constructor=Sn).prototype.addValue=function(t,e){var i,o=e.categoryIx,r=e.category,n=e.series,s=e.seriesIx,a=this.children,p=this.options,h=t.valueFields,l=ln(this.splitValue(h)),c=n.data[o],u=this.categoryPoints[o];u||(this.categoryPoints[o]=u=[]),l&&(i=this.createPoint(t,e));a=a[o];a||(a=new tn({vertical:p.invertAxes,gap:p.gap,spacing:p.spacing,rtl:!p.invertAxes&&(this.chartService||{}).rtl}),this.append(a)),i&&(this.updateRange(h,e),a.append(i),i.categoryIx=o,i.category=r,i.series=n,i.seriesIx=s,i.owner=this,i.dataItem=c),this.points.push(i),u.push(i)},Sn.prototype.pointType=function(){return this.options.invertAxes?bn:xn},Sn.prototype.splitValue=function(t){return[t.lower,t.q1,t.median,t.q3,t.upper]},Sn.prototype.updateRange=function(t,e){var i=e.series.axis,o=this.valueAxisRanges[i],e=this.splitValue(t).concat(this.filterOutliers(t.outliers));mt(t.mean)&&(e=e.concat(t.mean)),o=this.valueAxisRanges[i]=o||{min:l,max:c},this.valueAxisRanges[i]={min:Math.min.apply(Math,e.concat([o.min])),max:Math.max.apply(Math,e.concat([o.max]))}},Sn.prototype.formatPointValue=function(t,e){var i=t.value;return this.chartService.format.auto(e,i.lower,i.q1,i.median,i.q3,i.upper,i.mean,t.category)},Sn.prototype.filterOutliers=function(t){for(var e=(t||[]).length,i=[],o=0;o<e;o++){var r=t[o];mt(r)&&null!==r&&i.push(r)}return i},Sn.prototype.supportsPointInactiveOpacity=function(){return!1},Sn),wn=((yn=$o)&&(An.__proto__=yn),((An.prototype=Object.create(yn&&yn.prototype)).constructor=An).prototype.getAxis=function(){var t=this.chart.seriesAxes(this.series);return this.isVertical?t.y:t.x},An);function An(){yn.apply(this,arguments)}function Sn(){vn.apply(this,arguments)}function kn(){mn.apply(this,arguments)}function Pn(t){return mt(t)&&null!==t}var Cn,G=((Cn=se)&&(Tn.__proto__=Cn),((Tn.prototype=Object.create(Cn&&Cn.prototype)).constructor=Tn).prototype._initFields=function(){this.xAxisRanges={},this.yAxisRanges={},this.points=[],this.seriesPoints=[],this.seriesOptions=[],this._evalSeries=[]},Tn.prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},Tn.prototype.addErrorBar=function(t,e,i){var o,r=t.value[e],n=e+"Value",s=e+"ErrorLow",a=e+"ErrorHigh",p=i.seriesIx,h=i.series,l=t.options.errorBars,s=i[s],a=i[a];R(r)&&(R(s)&&R(a)&&(o={low:s,high:a}),l&&mt(l[n])&&(this.seriesErrorRanges=this.seriesErrorRanges||{x:[],y:[]},this.seriesErrorRanges[e][p]=this.seriesErrorRanges[e][p]||new jo(l[n],h,e),o=this.seriesErrorRanges[e][p].getErrorRange(r,l[n])),o&&this.addPointErrorBar(o,t,e))},Tn.prototype.addPointErrorBar=function(t,e,i){var o=t.low,r=t.high,n=e.series,s=e.options.errorBars,a=i===m,t={};e[i+"Low"]=o,e[i+"High"]=r,e.errorBars=e.errorBars||[];s=new wn(o,r,a,this,n,s);e.errorBars.push(s),e.append(s),t[i]=o,this.updateRange(t,n),t[i]=r,this.updateRange(t,n)},Tn.prototype.addValue=function(t,e){var i,o=t.x,r=t.y,n=e.seriesIx,s=this.options.series[n],s=this.seriesMissingValues(s),n=this.seriesPoints[n],t=t;Pn(o)&&Pn(r)||(t=this.createMissingValue(t,s)),t&&((i=this.createPoint(t,e))&&(Object.assign(i,e),this.addErrorBar(i,v,e),this.addErrorBar(i,m,e)),this.updateRange(t,e.series)),this.points.push(i),n.push(i)},Tn.prototype.seriesMissingValues=function(t){return t.missingValues},Tn.prototype.createMissingValue=function(){},Tn.prototype.updateRange=function(t,e){var i=this.chartService.intl,o=e.xAxis,r=e.yAxis,n=t.x,s=t.y,e=this.xAxisRanges[o],t=this.yAxisRanges[r];Pn(n)&&(e=this.xAxisRanges[o]=e||{min:l,max:c},O(n)&&(n=mi(i,n)),e.min=Math.min(e.min,n),e.max=Math.max(e.max,n)),Pn(s)&&(t=this.yAxisRanges[r]=t||{min:l,max:c},O(s)&&(s=mi(i,s)),t.min=Math.min(t.min,s),t.max=Math.max(t.max,s))},Tn.prototype.evalPointOptions=function(t,e,i){var o=i.series,r=i.seriesIx,n={defaults:o._defaults,excluded:["data","tooltip","content","template","visual","toggle","_outOfRangeMinPoint","_outOfRangeMaxPoint"]},s=this._evalSeries[r];mt(s)||(this._evalSeries[r]=s=er(t,{},n,!0));r=t;return s&&er(r=L({},t),{value:e,series:o,dataItem:i.dataItem},n),r},Tn.prototype.pointType=function(){return lr},Tn.prototype.pointOptions=function(t,e){var i,o=this.seriesOptions[e];return o||(i=this.pointType().prototype.defaults,this.seriesOptions[e]=o=L({},i,{markers:{opacity:t.opacity},tooltip:{format:this.options.tooltip.format},labels:{format:this.options.labels.format}},t)),o},Tn.prototype.createPoint=function(t,e){var i=e.series,o=this.pointOptions(i,e.seriesIx),r=e.color||i.color,o=this.evalPointOptions(o,t,e);j(i.color)&&(r=o.color);o=new lr(t,o);return o.color=r,this.append(o),o},Tn.prototype.seriesAxes=function(t){var e=t.xAxis,i=t.yAxis,o=this.plotArea,t=e?o.namedXAxes[e]:o.axisX,o=i?o.namedYAxes[i]:o.axisY;if(!t)throw new Error("Unable to locate X axis with name "+e);if(!o)throw new Error("Unable to locate Y axis with name "+i);return{x:t,y:o}},Tn.prototype.reflow=function(t){var r=this,n=this.points,s=!this.options.clip,a=0;this.traverseDataPoints(function(t,e){var i=n[a++],o=r.seriesAxes(e.series),e=o.x.getSlot(t.x,t.x,s),t=o.y.getSlot(t.y,t.y,s);i&&(e&&t?(t=r.pointSlot(e,t),i.reflow(t)):i.visible=!1)}),this.box=t},Tn.prototype.pointSlot=function(t,e){return new qt(t.x1,e.y1,t.x2,e.y2)},Tn.prototype.traverseDataPoints=function(t){for(var e=this.options.series,i=this.seriesPoints,o=0;o<e.length;o++){var r=e[o];i[o]||(i[o]=[]);for(var n=0;n<r.data.length;n++){var s=this._bindPoint(r,o,n),a=s.valueFields,s=s.fields;t(a,L({pointIx:n,series:r,seriesIx:o,dataItem:r.data[n],owner:this},s))}}},Tn.prototype.formatPointValue=function(t,e){t=t.value;return this.chartService.format.auto(e,t.x,t.y)},Tn.prototype.animationPoints=function(){for(var t=this.points,e=[],i=0;i<t.length;i++)e.push((t[i]||{}).marker);return e},Tn);function Tn(t,e){Cn.call(this,e),this.plotArea=t,this.chartService=t.chartService,this._initFields(),this.render()}It(G,{series:[],tooltip:{format:"{0}, {1}"},labels:{format:"{0}, {1}"},clip:!0}),L(G.prototype,N,{_bindPoint:sr.prototype._bindPoint});var Mn,Rn=G,Y=((Mn=lr)&&(On.__proto__=Mn),((On.prototype=Object.create(Mn&&Mn.prototype)).constructor=On).prototype.createHighlight=function(){var t=this.options.highlight,e=t.border,i=this.options.markers,o=this.box.center(),r=(i.size+i.border.width+e.width)/2,n=new C.drawing.Group,s=new C.drawing.Circle(new C.geometry.Circle([o.x,o.y+r/5+e.width/2],r+e.width/2),{stroke:{color:"none"},fill:this.createGradient({gradient:"bubbleShadow",color:i.background,stops:[{offset:0,color:i.background,opacity:.3},{offset:1,color:i.background,opacity:0}]})}),t=new C.drawing.Circle(new C.geometry.Circle([o.x,o.y],r),{stroke:{color:e.color||new C.Color(i.background).brightness(.8).toHex(),width:e.width,opacity:e.opacity},fill:{color:i.background,opacity:t.opacity}});return n.append(s,t),n},On);function On(t,e){Mn.call(this,t,e),this.category=t.category}Y.prototype.defaults=L({},Y.prototype.defaults,{labels:{position:A},highlight:{opacity:1,border:{color:"#fff",width:2,opacity:1}}}),Y.prototype.defaults.highlight.zIndex=void 0;var In,jn=Y,G=((In=Rn)&&(Bn.__proto__=In),((Bn.prototype=Object.create(In&&In.prototype)).constructor=Bn).prototype._initFields=function(){this._maxSize=c,In.prototype._initFields.call(this)},Bn.prototype.addValue=function(t,e){null!==t.size&&(0<t.size||t.size<0&&e.series.negativeValues.visible)?(this._maxSize=Math.max(this._maxSize,Math.abs(t.size)),In.prototype.addValue.call(this,t,e)):(this.points.push(null),this.seriesPoints[e.seriesIx].push(null))},Bn.prototype.reflow=function(t){this.updateBubblesSize(t),In.prototype.reflow.call(this,t)},Bn.prototype.pointType=function(){return jn},Bn.prototype.createPoint=function(t,e){var i=e.series,o=i.data.length,r=e.pointIx*(600/o),n={delay:r,duration:600-r,type:"bubble"},o=e.color||i.color;t.size<0&&i.negativeValues.visible&&(o=Rt(i.negativeValues.color,o));n=L({labels:{animation:{delay:r,duration:600-r}}},this.pointOptions(i,e.seriesIx),{markers:{type:u,border:i.border,opacity:i.opacity,animation:n}}),n=this.evalPointOptions(n,t,e);j(i.color)&&(o=n.color),n.markers.background=o;n=new jn(t,n);return n.color=o,this.append(n),n},Bn.prototype.updateBubblesSize=function(t){for(var e=this.options.series,i=Math.min(t.width(),t.height()),o=0;o<e.length;o++)for(var r=e[o],n=this.seriesPoints[o],s=(r.minSize||Math.max(.02*i,10))/2,a=(r.maxSize||.2*i)/2,p=Math.PI*s*s,h=(Math.PI*a*a-p)/this._maxSize,l=0;l<n.length;l++){var c,u,d=n[l];d&&(u=Math.abs(d.value.size)*h,c=Math.sqrt((p+u)/Math.PI),u=Rt(d.options.zIndex,0)+(1-c/a),L(d.options,{zIndex:u,markers:{size:2*c,zIndex:u},labels:{zIndex:u+1}}))}},Bn.prototype.formatPointValue=function(t,e){var i=t.value;return this.chartService.format.auto(e,i.x,i.y,i.size,t.category)},Bn.prototype.createAnimation=function(){},Bn.prototype.createVisual=function(){},Bn);function Bn(){In.apply(this,arguments)}It(G,{tooltip:{format:"{3}"},labels:{format:"{3}"}});var Vn,Ln=G,Y=((Vn=ce)&&(zn.__proto__=Vn),(zn.prototype=Object.create(Vn&&Vn.prototype)).constructor=zn);function zn(){Vn.apply(this,arguments)}L(Y.prototype,ar);var En,Fn=Y,G=((En=se)&&(Dn.__proto__=En),((Dn.prototype=Object.create(En&&En.prototype)).constructor=Dn).prototype.render=function(){var t=this.options;this._rendered||(this._rendered=!0,mt(this.value.target)&&(this.target=new Fn({type:t.target.shape,background:t.target.color||this.color,opacity:t.opacity,zIndex:t.zIndex,border:t.target.border,vAlign:P,align:k}),this.target.value=this.value,this.target.dataItem=this.dataItem,this.target.series=this.series,this.append(this.target)),this.createNote())},Dn.prototype.reflow=function(t){this.render();var e=this.options,i=this.target,o=this.owner,r=e.invertAxes,n=o.seriesValueAxis(this.options),s=o.categorySlot(o.categoryAxis,e.categoryIx,n),o=n.getSlot(this.value.target),n=r?o:s,o=r?s:o;i&&(o=new qt(n.x1,o.y1,n.x2,o.y2),i.options.height=r?o.height():e.target.line.width,i.options.width=r?e.target.line.width:o.width(),i.reflow(o)),this.note&&this.note.reflow(t),this.box=t},Dn.prototype.createVisual=function(){En.prototype.createVisual.call(this);var t=this.options,e=C.drawing.Path.fromRect(this.box.toRect(),{fill:{color:this.color,opacity:t.opacity},stroke:null});0<t.border.width&&e.options.set("stroke",{color:t.border.color||this.color,width:t.border.width,dashType:t.border.dashType,opacity:Rt(t.border.opacity,t.opacity)}),T(this.bodyVisual=e),this.visual.append(e)},Dn.prototype.createAnimation=function(){this.bodyVisual&&(this.animation=C.drawing.Animation.create(this.bodyVisual,this.options.animation))},Dn.prototype.createHighlight=function(t){return C.drawing.Path.fromRect(this.box.toRect(),t)},Dn.prototype.highlightVisual=function(){return this.bodyVisual},Dn.prototype.highlightVisualArgs=function(){return{rect:this.box.toRect(),visual:this.bodyVisual,options:this.options}},Dn.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Dn);function Dn(t,e){En.call(this,e),this.aboveAxis=this.options.aboveAxis,this.color=e.color||p,this.value=t}G.prototype.tooltipAnchor=Wr.prototype.tooltipAnchor,It(G,{border:{width:1},vertical:!1,opacity:1,target:{shape:"",border:{width:0,color:"green"},line:{width:2}},tooltip:{format:"Current: {0}<br />Target: {1}"}}),L(G.prototype,ar),L(G.prototype,K);var Un,Hn=G,Y=((Un=sr)&&(Gn.__proto__=Un),((Gn.prototype=Object.create(Un&&Un.prototype)).constructor=Gn).prototype.reflowCategories=function(t){for(var e=this.children,i=e.length,o=0;o<i;o++)e[o].reflow(t[o])},Gn.prototype.plotRange=function(t){var e=t.series,e=this.seriesValueAxis(e),e=this.categoryAxisCrossingValue(e);return[e,t.value.current||e]},Gn.prototype.createPoint=function(t,e){var i=e.categoryIx,o=e.category,r=e.series,n=e.seriesIx,s=this.options,a=this.children,p=t.valueFields,e=L({vertical:!s.invertAxes,overlay:r.overlay,categoryIx:i,invertAxes:s.invertAxes},r),t=t.fields.color||r.color,e=this.evalPointOptions(e,p,o,i,r,n);j(r.color)&&(t=e.color);e=new Hn(p,e);e.color=t;i=a[i];return i||(i=new tn({vertical:s.invertAxes,gap:s.gap,spacing:s.spacing,rtl:!s.invertAxes&&(this.chartService||{}).rtl}),this.append(i)),i.append(e),e},Gn.prototype.updateRange=function(t,e){var i=t.current,o=t.target,t=e.series.axis,e=this.valueAxisRanges[t];mt(i)&&!isNaN(i)&&mt(o&&!isNaN(o))&&((e=this.valueAxisRanges[t]=e||{min:l,max:c}).min=Math.min(e.min,i,o),e.max=Math.max(e.max,i,o))},Gn.prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value.current,t.value.target)},Gn.prototype.pointValue=function(t){return t.valueFields.current},Gn.prototype.aboveAxis=function(t){return 0<t.value.current},Gn.prototype.createAnimation=function(){var t=this.points;this._setAnimationOptions();for(var e=0;e<t.length;e++){var i=t[e];i.options.animation=this.options.animation,i.createAnimation()}},Gn);function Gn(t,r){!function(){for(var t=r.series,e=0;e<t.length;e++){var i=t[e],o=i.data;!o||x(o[0])||z(o[0])||(i.data=[o])}}(),Un.call(this,t,r)}Y.prototype._setAnimationOptions=an.prototype._setAnimationOptions,It(Y,{animation:{type:zo}});var Nn,qn=Y,G=((Nn=C.Class)&&(Xn.__proto__=Nn),((Xn.prototype=Object.create(Nn&&Nn.prototype)).constructor=Xn).prototype.getStyle=function(t,e){var i=t.background,o=t.border.color;e&&(r=e.color||e.options.color,i=Rt(i,r),o=Rt(o,r));var r=U(t.padding||{},"auto");return{backgroundColor:i,borderColor:o,font:t.font,color:t.color,opacity:t.opacity,borderWidth:E(t.border.width),paddingTop:E(r.top),paddingBottom:E(r.bottom),paddingLeft:E(r.left),paddingRight:E(r.right)}},Xn.prototype.show=function(t,e,i){t.format=e.format;i=this.getStyle(e,i);t.style=i,!mt(e.color)&&180<new C.Color(i.backgroundColor).percBrightness()&&(t.className="k-chart-tooltip-inverse"),this.chartService.notify("showTooltip",t),this.visible=!0},Xn.prototype.hide=function(){this.chartService&&this.chartService.notify("hideTooltip"),this.visible=!1},Xn.prototype.destroy=function(){delete this.chartService},Xn);function Xn(t,e){Nn.call(this),this.chartService=t,this.options=L({},this.options,e)}It(G,{border:{width:1},opacity:1});var Yn,Y=G,G=((Yn=Y)&&(Wn.__proto__=Yn),((Wn.prototype=Object.create(Yn&&Yn.prototype)).constructor=Wn).prototype.initAxisName=function(){var t=this.crosshair.axis,t=t.plotArea.categoryAxis?t.getCategory?"categoryAxis":"valueAxis":t.options.vertical?"yAxis":"xAxis";this.axisName=t},Wn.prototype.showAt=function(t){var e=this.crosshair.axis,i=this.options,o=e[i.stickyMode?"getCategory":"getValue"](t),r=o;i.format?r=this.formatService.auto(i.format,o):e.options.type===y&&(r=this.formatService.auto(e.options.labels.dateFormats[e.options.baseUnit],o)),this.show({point:t,anchor:this.getAnchor(),crosshair:this.crosshair,value:r,axisName:this.axisName,axisIndex:this.crosshair.axis.axisIndex},this.options)},Wn.prototype.hide=function(){this.chartService.notify("hideTooltip",{crosshair:this.crosshair,axisName:this.axisName,axisIndex:this.crosshair.axis.axisIndex})},Wn.prototype.getAnchor=function(){var t,e,i=this.crosshair,o=this.options,r=o.position,n=o.padding,o=!i.axis.options.vertical,i=i.line.bbox(),n=o?(t=A,r===w?(e=P,i.bottomLeft().translate(0,n)):(e=w,i.topLeft().translate(0,-n))):(e=A,r===S?(t=k,i.topLeft().translate(-n,0)):(t=S,i.topRight().translate(n,0)));return{point:n,align:{horizontal:t,vertical:e}}},Wn);function Wn(t,e,i){Yn.call(this,t,i),this.crosshair=e,this.formatService=t.format,this.initAxisName()}It(G,{padding:10});var Zn,Kn=G,G=((Zn=se)&&($n.__proto__=Zn),(($n.prototype=Object.create(Zn&&Zn.prototype)).constructor=$n).prototype.showAt=function(t){this.point=t,this.moveLine(),this.line.visible(!0),this.tooltip&&this.tooltip.showAt(t)},$n.prototype.hide=function(){this.line.visible(!1),this.tooltip&&this.tooltip.hide()},$n.prototype.moveLine=function(){var t=this.axis,e=this.point,i=t.options.vertical,o=this.getBox(),r=i?m:v,n=new C.geometry.Point(o.x1,o.y1),i=i?new C.geometry.Point(o.x2,o.y1):new C.geometry.Point(o.x1,o.y2);e&&(this.stickyMode?(t=t.getSlot(t.pointCategoryIndex(e)),n[r]=i[r]=t.center()[r]):n[r]=i[r]=e[r]),this.box=o,this.line.moveTo(n).lineTo(i)},$n.prototype.getBox=function(){for(var t,e=this.axis,i=e.pane.axes,o=i.length,r=e.options.vertical,n=e.lineBox().clone(),e=r?v:m,s=0;s<o;s++){var a=i[s];a.options.vertical!==r&&(t?t.wrap(a.lineBox()):t=a.lineBox().clone())}return n[e+1]=t[e+1],n[e+2]=t[e+2],n},$n.prototype.createVisual=function(){Zn.prototype.createVisual.call(this);var t=this.options;this.line=new C.drawing.Path({stroke:{color:t.color,width:t.width,opacity:t.opacity,dashType:t.dashType},visible:!1}),this.moveLine(),this.visual.append(this.line)},$n.prototype.destroy=function(){this.tooltip&&this.tooltip.destroy(),Zn.prototype.destroy.call(this)},$n);function $n(t,e,i){Zn.call(this,i),this.axis=e,this.stickyMode=e instanceof Ai;e=this.options.tooltip;e.visible&&(this.tooltip=new Kn(t,this,L({},e,{stickyMode:this.stickyMode})))}It(G,{color:a,width:2,zIndex:-1,tooltip:{visible:!1}});var Jn,Qn=G,G=((Jn=se)&&(ts.__proto__=Jn),((ts.prototype=Object.create(Jn&&Jn.prototype)).constructor=ts).prototype.shouldClip=function(){for(var t=this.children,e=t.length,i=0;i<e;i++)if(!0===t[i].options.clip)return!0;return!1},ts.prototype._clipBox=function(){return this.pane.chartsBox()},ts.prototype.createVisual=function(){var t;this.visual=new C.drawing.Group({zIndex:0}),this.shouldClip()&&(t=(this.clipBox=this._clipBox()).toRect(),T(t=C.drawing.Path.fromRect(t)),this.visual.clip(t),this.unclipLabels())},ts.prototype.stackRoot=function(){return this},ts.prototype.unclipLabels=function(){for(var t=this.children,e=this.clipBox,i=0;i<t.length;i++)for(var o=t[i].points||{},r=o.length,n=0;n<r;n++){var s,a=o[n];a&&!1!==a.visible&&a.overlapsBox&&a.overlapsBox(e)&&(a.unclipElements?a.unclipElements():(s=a.label,a=a.note,s&&s.options.visible&&(s.alignToClipBox&&s.alignToClipBox(e),s.options.noclip=!0),a&&a.options.visible&&(a.options.noclip=!0)))}},ts.prototype.destroy=function(){Jn.prototype.destroy.call(this),delete this.parent},ts);function ts(t,e){Jn.call(this,t),this.pane=e}G.prototype.isStackRoot=!0;var es,is=G,G=((es=he)&&(rs.__proto__=es),((rs.prototype=Object.create(es&&es.prototype)).constructor=rs).prototype.createTitle=function(){var t=this.options.title;z(t)&&(t=L({},t,{align:t.position,position:P})),this.title=Oe.buildTitle(t,this,rs.prototype.options.title)},rs.prototype.appendAxis=function(t){this.content.append(t),this.axes.push(t),t.pane=this},rs.prototype.appendAxisAt=function(t,e){this.content.append(t),this.axes.splice(e,0,t),t.pane=this},rs.prototype.appendChart=function(t){this.chartContainer.parent!==this.content&&this.content.append(this.chartContainer),this.charts.push(t),this.chartContainer.append(t),t.pane=this},rs.prototype.empty=function(){var t=this.parent;if(t){for(var e=0;e<this.axes.length;e++)t.removeAxis(this.axes[e]);for(var i=0;i<this.charts.length;i++)t.removeChart(this.charts[i])}this.axes=[],this.charts=[],this.content.destroy(),this.content.children=[],this.chartContainer.children=[]},rs.prototype.reflow=function(t){var e;St(this.children)===this.content&&(e=this.children.pop()),es.prototype.reflow.call(this,t),e&&this.children.push(e),this.title&&(this.contentBox.y1+=this.title.box.height())},rs.prototype.visualStyle=function(){var t=es.prototype.visualStyle.call(this);return t.zIndex=-10,t},rs.prototype.renderComplete=function(){this.options.visible&&this.createGridLines()},rs.prototype.stackRoot=function(){return this},rs.prototype.clipRoot=function(){return this},rs.prototype.createGridLines=function(){for(var t,e=this.axes,i=e.concat(this.parent.axes),o=[],r=[],n=0;n<e.length;n++)for(var s=e[n],a=s.options.vertical,p=a?o:r,h=0;h<i.length;h++)0!==p.length||a!==(t=i[h]).options.vertical&&yt(p,s.createGridLines(t))},rs.prototype.refresh=function(){this.visual.clear(),this.content.parent=null,this.content.createGradient=this.createGradient.bind(this),this.content.renderVisual(),(this.content.parent=this).title&&this.visual.append(this.title.visual),this.visual.append(this.content.visual),this.renderComplete(),this.notifyRender()},rs.prototype.chartsBox=function(){for(var t=this.axes,e=t.length,i=new qt,o=0;o<e;o++){var r=t[o],n=r.options.vertical?m:v,r=r.lineBox();i[n+1]=r[n+1],i[n+2]=r[n+2]}if(0===i.x2)for(var s=this.parent.axes,a=s.length,p=0;p<a;p++){var h=s[p];h.options.vertical||(h=h.lineBox(),i.x1=h.x1,i.x2=h.x2)}return i},rs.prototype.clipBox=function(){return this.chartContainer.clipBox},rs.prototype.notifyRender=function(){var t=this.getService();t&&t.notify("paneRender",{pane:new xo(this),index:this.paneIndex,name:this.options.name})},rs),os=1;function rs(t){es.call(this,t),this.id="pane"+os++,this.createTitle(),this.content=new se,this.chartContainer=new is({},this),this.append(this.content),this.axes=[],this.charts=[]}G.prototype.isStackRoot=!0,It(G,{zIndex:-1,shrinkToFit:!0,title:{align:S},visible:!0});var ns=G;function ss(t,e){null!==e&&t.push(e)}function as(t,e,i){e=e.visible;if(mt(e))return e;t=t.pointVisibility;return t?t[i]:void 0}function ps(t){for(var e=t.data,i=[],o=0,r=0,n=0;n<e.length;n++){var s=Ro.current.bindPoint(t,n),a=s.valueFields.value;O(a)&&(a=parseFloat(a)),R(a)?(s.visible=!1!==as(t,s.fields,n),s.value=Math.abs(a),i.push(s),s.visible&&(o+=s.value),0!==a&&r++):i.push(null)}return{total:o,points:i,count:r}}function hs(t,e){return t&&e?t.toLowerCase()===e.toLowerCase():t===e}function ls(t,e){for(var i=[],o=[].concat(e),r=0;r<t.length;r++){var n=t[r];lt(n.type,o)&&i.push(n)}return i}function cs(t,e,i){if(null===e)return e;var o="_date_"+t,r=e[o];return r||(r=mi(i,st(t)(e)),e[o]=r),r}function us(t,e){t=t.type,e=e instanceof Date;return!t&&e||hs(t,y)}function ds(t){return 1===t.length?t[0]:t}var gs=/area/i;function fs(t,e){var i,o=Ro.current.bindPoint(t,null,e).valueFields;for(i in o)if(I(o[i]))return!0}function ys(t){for(var e,i,o=t.start,r=t.dir,n=t.min,s=t.max,a=t.getter,p=t.hasItem,h=t.series,l=o;p(l+=r)&&(e=fs(h,(i=a(l)).item)),n<=l&&l<=s&&!e;);if(e)return i}function vs(t,e,i,o,r){var n,s,a,p=e.min,h=e.max,l=0<p&&p<i,c=h+1<i;(l||c)&&(((e=t).missingValues||(gs.test(e.type)||e.stack?Vo:Lo))!==Lo?(l&&(n=o(p-1)),c&&(s=o(h+1))):(l&&(n=fs(t,(a=o(p-1)).item)?a:ys({start:p,dir:-1,min:0,max:i-1,getter:o,hasItem:r,series:t})),c&&(s=fs(t,(a=o(h+1)).item)?a:ys({start:h,dir:1,min:0,max:i-1,getter:o,hasItem:r,series:t}))),n&&(t._outOfRangeMinPoint=n),s&&(t._outOfRangeMaxPoint=s))}var ms,G=((ms=se)&&(xs.__proto__=ms),((xs.prototype=Object.create(ms&&ms.prototype)).constructor=xs).prototype.initFields=function(){},xs.prototype.initSeries=function(){for(var t=this.series,e=0;e<t.length;e++)t[e].index=e},xs.prototype.createPanes=function(){var t={title:{color:(this.options.title||{}).color}},e=[],i=this.options.panes||[],o=Math.max(i.length,1);for(var r,n,s=0;s<o;s++){var a=i[s]||{};n=t,O((r=a).title)&&(r.title={text:r.title}),r.title=L({},n.title,r.title);var p=new ns(a);p.paneIndex=s,e.push(p),this.append(p)}this.panes=e},xs.prototype.createCrosshairs=function(t){void 0===t&&(t=this.panes);for(var e=0;e<t.length;e++)for(var i=t[e],o=0;o<i.axes.length;o++){var r=i.axes[o];r.options.crosshair&&r.options.crosshair.visible&&(r=new Qn(this.chartService,r,r.options.crosshair),this.crosshairs.push(r),i.content.append(r))}},xs.prototype.removeCrosshairs=function(t){for(var e=this.crosshairs,i=t.axes,o=e.length-1;0<=o;o--)for(var r=0;r<i.length;r++)if(e[o].axis===i[r]){e.splice(o,1);break}},xs.prototype.hideCrosshairs=function(){for(var t=this.crosshairs,e=0;e<t.length;e++)t[e].hide()},xs.prototype.findPane=function(t){for(var e,i=this.panes,o=0;o<i.length;o++)if(i[o].options.name===t){e=i[o];break}return e||i[0]},xs.prototype.findPointPane=function(t){for(var e,i=this.panes,o=0;o<i.length;o++)if(i[o].box.containsPoint(t)){e=i[o];break}return e},xs.prototype.appendAxis=function(t){this.findPane(t.options.pane).appendAxis(t),this.axes.push(t),t.plotArea=this},xs.prototype.removeAxis=function(t){for(var e=[],i=0;i<this.axes.length;i++){var o=this.axes[i];t!==o?e.push(o):o.destroy()}this.axes=e},xs.prototype.appendChart=function(t,e){this.charts.push(t),e?e.appendChart(t):this.append(t)},xs.prototype.removeChart=function(t){for(var e=[],i=0;i<this.charts.length;i++){var o=this.charts[i];o!==t?e.push(o):o.destroy()}this.charts=e},xs.prototype.addToLegend=function(t){for(var e=t.length,i=this.options.legend,o=i.labels||{},r=i.inactiveItems||{},n=r.labels||{},s=[],a=0;a<e;a++){var p,h,l,c,u=t[a],d=!1!==u.visible;!1!==u.visibleInLegend&&(p=u.name,(l=!d&&ot(n)||ot(o))&&(p=l({text:Pn(p)?p:"",series:u})),c=u._defaults,j(h=u.color)&&c&&(h=c.color),c=l=void 0,c=d?(l={},h):(l={color:n.color,font:n.font},r.markers.color),Pn(p)&&""!==p&&s.push({text:p,labels:l,markerColor:c,series:u,active:d}))}yt(i.items,s)},xs.prototype.groupAxes=function(t){for(var e=[],i=[],o=0;o<t.length;o++)for(var r=t[o].axes,n=0;n<r.length;n++){var s=r[n];(s.options.vertical?i:e).push(s)}return{x:e,y:i,any:e.concat(i)}},xs.prototype.groupSeriesByPane=function(){for(var t=this.series,e={},i=0;i<t.length;i++){var o=t[i],r=this.seriesPaneName(o);e[r]?e[r].push(o):e[r]=[o]}return e},xs.prototype.filterVisibleSeries=function(t){for(var e=[],i=0;i<t.length;i++){var o=t[i];!1!==o.visible&&e.push(o)}return e},xs.prototype.reflow=function(t){var e=this.options.plotArea,i=this.panes,e=U(e.margin);this.box=t.clone().unpad(e),this.reflowPanes(),this.detachLabels(),this.reflowAxes(i),this.reflowCharts(i)},xs.prototype.redraw=function(t){var e=[].concat(t);this.initSeries();t=this.getRoot();t&&t.cleanGradients();for(var i=0;i<e.length;i++)this.removeCrosshairs(e[i]),e[i].empty();this.render(e),this.detachLabels(),this.reflowAxes(this.panes),this.reflowCharts(e),this.createCrosshairs(e);for(var o=0;o<e.length;o++)e[o].refresh()},xs.prototype.axisCrossingValues=function(t,e){for(var t=t.options,i=[].concat(t.axisCrossingValues||t.axisCrossingValue),o=e.length-i.length,r=i[0]||0,n=0;n<o;n++)i.push(r);return i},xs.prototype.alignAxisTo=function(t,e,i,o){var r=t.getSlot(i,i,!0),n=t.options.reverse?2:1,i=e.getSlot(o,o,!0),o=e.options.reverse?2:1,n=t.box.translate(i[v+o]-r[v+n],i[m+o]-r[m+n]);t.pane!==e.pane&&n.translate(0,t.pane.box.y1-e.pane.box.y1),t.reflow(n)},xs.prototype.alignAxes=function(t,e){for(var i=t[0],o=e[0],r=this.axisCrossingValues(i,e),n=this.axisCrossingValues(o,t),s={},a={},p={},h={},l=0;l<e.length;l++){var c=e[l],u=c.pane,d=u.id,g=!1!==c.options.visible,f=_s(t,u)||i,u=r;f!==i&&(u=this.axisCrossingValues(f,e)),this.alignAxisTo(c,f,n[l],u[l]),c.options._overlap||(Tt(c.lineBox().x1)===Tt(f.lineBox().x1)&&(s[d]&&c.reflow(c.box.alignTo(s[d].box,S).translate(-c.options.margin,0)),g&&(s[d]=c)),Tt(c.lineBox().x2)===Tt(f.lineBox().x2)&&(c._mirrored||(c.options.labels.mirror=!c.options.labels.mirror,c._mirrored=!0),this.alignAxisTo(c,f,n[l],u[l]),a[d]&&c.reflow(c.box.alignTo(a[d].box,k).translate(c.options.margin,0)),g&&(a[d]=c)),0!==l&&o.pane===c.pane&&(c.alignTo(o),c.reflow(c.box)))}for(var y=0;y<t.length;y++){var v=t[y],m=v.pane,x=m.id,b=!1!==v.options.visible,_=_s(e,m)||o,m=n;_!==o&&(m=this.axisCrossingValues(_,t)),this.alignAxisTo(v,_,r[y],m[y]),v.options._overlap||(Tt(v.lineBox().y1)===Tt(_.lineBox().y1)&&(v._mirrored||(v.options.labels.mirror=!v.options.labels.mirror,v._mirrored=!0),this.alignAxisTo(v,_,r[y],m[y]),p[x]&&v.reflow(v.box.alignTo(p[x].box,P).translate(0,-v.options.margin)),b&&(p[x]=v)),Tt(v.lineBox().y2,3)===Tt(_.lineBox().y2,3)&&(h[x]&&v.reflow(v.box.alignTo(h[x].box,w).translate(0,v.options.margin)),b&&(h[x]=v)),0!==y&&(v.alignTo(i),v.reflow(v.box)))}},xs.prototype.shrinkAxisWidth=function(t){for(var e=this.groupAxes(t).any,i=bs(e),o=0,r=0;r<t.length;r++){var n=t[r];0<n.axes.length&&(o=Math.max(o,i.width()-n.contentBox.width()))}if(0!==o)for(var s=0;s<e.length;s++){var a=e[s];a.options.vertical||a.reflow(a.box.shrink(o,0))}},xs.prototype.shrinkAxisHeight=function(t){for(var e,i=0;i<t.length;i++){var o=t[i],r=o.axes,n=Math.max(0,bs(r).height()-o.contentBox.height());if(0!==n){for(var s=0;s<r.length;s++){var a=r[s];a.options.vertical&&a.reflow(a.box.shrink(0,n))}e=!0}}return e},xs.prototype.fitAxes=function(t){for(var e=this.groupAxes(t).any,i=0,o=0;o<t.length;o++){var r=t[o],n=r.axes,s=r.contentBox;if(0<n.length)for(var r=bs(n),a=Math.max(s.y1-r.y1,s.y2-r.y2),i=Math.max(i,s.x1-r.x1),p=0;p<n.length;p++){var h=n[p];h.reflow(h.box.translate(0,a))}}for(var l=0;l<e.length;l++){var c=e[l];c.reflow(c.box.translate(i,0))}},xs.prototype.reflowAxes=function(t){for(var e=this.groupAxes(t),i=0;i<t.length;i++)this.reflowPaneAxes(t[i]);0<e.x.length&&0<e.y.length&&(this.alignAxes(e.x,e.y),this.shrinkAxisWidth(t),this.autoRotateAxisLabels(e),this.alignAxes(e.x,e.y),this.shrinkAxisWidth(t)&&this.alignAxes(e.x,e.y),this.shrinkAxisHeight(t),this.alignAxes(e.x,e.y),this.shrinkAxisHeight(t)&&this.alignAxes(e.x,e.y),this.fitAxes(t))},xs.prototype.autoRotateAxisLabels=function(t){for(var e,i=this.panes,o=ws(i),r=0;r<o.length;r++)o[r].autoRotateLabels()&&(e=!0);if(e){for(var n=0;n<i.length;n++)this.reflowPaneAxes(i[n]);0<t.x.length&&0<t.y.length&&(this.alignAxes(t.x,t.y),this.shrinkAxisWidth(i))}},xs.prototype.reflowPaneAxes=function(t){var e=t.axes,i=e.length;if(0<i)for(var o=0;o<i;o++)e[o].reflow(t.contentBox)},xs.prototype.reflowCharts=function(t){for(var e=this.charts,i=e.length,o=this.box,r=0;r<i;r++){var n=e[r].pane;n&&!lt(n,t)||e[r].reflow(o)}},xs.prototype.reflowPanes=function(){for(var t=this.box,e=this.panes,i=e.length,o=t.height(),r=0,n=t.y1,s=0;s<i;s++){var a=e[s],p=a.options.height;a.options.width=t.width(),a.options.height?(p.indexOf&&p.indexOf("%")&&(p=parseInt(p,10)/100,a.options.height=p*t.height()),a.reflow(t.clone()),o-=a.options.height):r++}for(var h=0;h<i;h++){var l=e[h];l.options.height||(l.options.height=o/r)}for(var c=0;c<i;c++){var u=e[c],d=t.clone().move(t.x1,n);u.reflow(d),n+=u.options.height}},xs.prototype.backgroundBox=function(){for(var t=this.axes,e=t.length,i=0;i<e;i++)for(var o=t[i],r=0;r<e;r++){var n,s=t[r];o.options.vertical!==s.options.vertical&&(s=o.lineBox().clone().wrap(s.lineBox()),n=n?n.wrap(s):s)}return n||this.box},xs.prototype.chartsBoxes=function(){for(var t=this.panes,e=[],i=0;i<t.length;i++)e.push(t[i].chartsBox());return e},xs.prototype.addBackgroundPaths=function(t){for(var e=this.chartsBoxes(),i=0;i<e.length;i++)t.paths.push(C.drawing.Path.fromRect(e[i].toRect()))},xs.prototype.backgroundContainsPoint=function(t){for(var e=this.chartsBoxes(),i=0;i<e.length;i++)if(e[i].containsPoint(t))return!0},xs.prototype.createVisual=function(){ms.prototype.createVisual.call(this);var t=this.options.plotArea,e=t.opacity,i=t.background,t=t.border;void 0===t&&(t={}),""!==i&&null!==i&&"none"!==i&&"transparent"!==i&&mt(i)||(i=p,e=0);t=this._bgVisual=new C.drawing.MultiPath({fill:{color:i,opacity:e},stroke:{color:t.width?t.color:"",width:t.width,dashType:t.dashType},zIndex:-1});this.addBackgroundPaths(t),this.appendVisual(t)},xs.prototype.pointsByCategoryIndex=function(t){var e=this.charts,i=[];if(null!==t)for(var o=0;o<e.length;o++)if("_navigator"!==e[o].pane.options.name){var r=e[o].categoryPoints[t];if(r&&r.length)for(var n=0;n<r.length;n++){var s=r[n];s&&mt(s.value)&&null!==s.value&&i.push(s)}}return i},xs.prototype.pointsBySeriesIndex=function(e){return this.filterPoints(function(t){return t.series.index===e})},xs.prototype.pointsBySeriesName=function(e){return this.filterPoints(function(t){return t.series.name===e})},xs.prototype.filterPoints=function(t){for(var e=this.charts,i=[],o=0;o<e.length;o++)for(var r=e[o].points,n=0;n<r.length;n++){var s=r[n];s&&!1!==s.visible&&t(s)&&i.push(s)}return i},xs.prototype.findPoint=function(t){for(var e=this.charts,i=0;i<e.length;i++)for(var o=e[i].points,r=0;r<o.length;r++){var n=o[r];if(n&&!1!==n.visible&&t(n))return n}},xs.prototype.paneByPoint=function(t){for(var e=this.panes,i=0;i<e.length;i++){var o=e[i];if(o.box.containsPoint(t))return o}},xs.prototype.detachLabels=function(){var t=this.groupAxes(this.panes),e=t.x,t=t.y;this.detachAxisGroupLabels(t,e),this.detachAxisGroupLabels(e,t)},xs.prototype.detachAxisGroupLabels=function(t,e){for(var i=0,o=0;o<t.length;o++){var r=t[o],n=r.pane,s=_s(e,n)||e[0],a=o+i,s=this.createLabelAxis(r,a,s);s&&(i++,r=n.axes.indexOf(r)+i,n.appendAxisAt(s,r))}},xs.prototype.createLabelAxis=function(t,e,i){var o=t.options.labels,r=o.position,n="end"!==r&&"start"!==r,o=o.visible;if(n||!1===o)return null;n=this.groupAxes(this.panes),o=i.options.vertical?n.x:n.y,n=this.axisCrossingValues(i,o),o="end"===r,r=i.range(),o=o?r.max:r.min;if(kt(n[e],r.min,r.max)-o==0)return null;n.splice(e+1,0,o),i.options.axisCrossingValues=n;n=t.clone();return t.clear(),n.options.name=void 0,n.options.line.visible=!1,n.options.crosshair=void 0,n.options.notes=void 0,n.options.plotBands=void 0,n},xs);function xs(t,e,i){ms.call(this,e),this.initFields(t,e),this.series=t,this.initSeries(),this.charts=[],this.options.legend=this.options.legend||{},this.options.legend.items=[],this.axes=[],this.crosshairs=[],this.chartService=i,this.originalOptions=e,this.createPanes(),this.render(),this.createCrosshairs()}function bs(t){for(var e,i=t.length,o=0;o<i;o++){var r=t[o],n=!1!==r.options.visible;(n||function(e){return!e.pane.axes.some(function(t){return t.options.vertical===e.options.vertical&&t!==e&&!1!==t.options.visible})}(r))&&(r=n?r.contentBox():r.lineBox(),e?e.wrap(r):e=r.clone())}return e||new qt}function _s(t,e){for(var i=0;i<t.length;i++){var o=t[i];if(o&&o.pane===e)return o}}var ws=function(t){return t.reduce(function(t,e){return t.concat(e.axes)},[])};It(G,{series:[],plotArea:{margin:{}},background:"",border:{color:a,width:0},legend:{inactiveItems:{labels:{color:"#919191"},markers:{color:"#919191"}}}});var As=G,Ss={hover:function(t,e){this._dispatchEvent(t,e,"plotAreaHover")},click:function(t,e){this._dispatchEvent(t,e,"plotAreaClick")}};var ks,Ps,Cs=((Ps=C.Class)&&(Ms.__proto__=Ps),((Ms.prototype=Object.create(Ps&&Ps.prototype)).constructor=Ms).prototype.aggregatePoints=function(t,e){var i=this._series,o=this._seriesFields,r=this._bindPoints(t||[]),n=r.dataItems[0],s={};!n||R(n)||x(n)||((t=function(){}).prototype=n,s=new t);for(var a=0;a<o.length;a++){var p=o[a],h=this._bindField(r.values,p.canonicalName),h=p.transform(h,i,r.dataItems,e);if(!(null===h||!z(h)||mt(h.length)||h instanceof Date)){s=h;break}mt(h)&&function(t,e){var i=s,o=t;if(-1<t.indexOf(".")){for(var r=t.split(".");1<r.length;)o=r.shift(),mt(i[o])||(i[o]={}),i=i[o];o=r.shift()}i[o]=e}(p.name,h)}return s},Ms.prototype._bindPoints=function(t){for(var e=this._binder,i=this._series,o=[],r=[],n=0;n<t.length;n++){var s=t[n];o.push(e.bindPoint(i,s)),r.push(i.data[s])}return{values:o,dataItems:r}},Ms.prototype._bindField=function(t,e){for(var i=[],o=t.length,r=0;r<o;r++){var n=t[r],s=n.valueFields,a=(mt(s[e])?s:n.fields)[e];i.push(a)}return i},Ms),G=((ks=C.Class)&&(Ts.__proto__=ks),((Ts.prototype=Object.create(ks&&ks.prototype)).constructor=Ts).prototype.register=function(t,e){for(var i=0;i<t.length;i++)this._defaults[t[i]]=e},Ts.prototype.query=function(t){return this._defaults[t]},Ts);function Ts(){ks.call(this),this._defaults={}}function Ms(t,e,i){Ps.call(this);var o=e.canonicalFields(t),r=e.valueFields(t),n=e.sourceFields(t,o),s=this._seriesFields=[],i=i.query(t.type),a=t.aggregate||i;this._series=t,this._binder=e;for(var p=0;p<o.length;p++){var h=o[p],l=void 0;if(z(a))l=a[h];else{if(0!==p&&!lt(h,r))break;l=a}l&&s.push({canonicalName:h,name:n[p],transform:j(l)?l:So[l]})}}G.current=new G;var Rs,Os=G,G=((Rs=Wr)&&(Is.__proto__=Rs),((Is.prototype=Object.create(Rs&&Rs.prototype)).constructor=Is).prototype.createLabel=function(){var t=this.options.labels,e=L({},t,t.from),t=L({},t,t.to);e.visible&&(this.labelFrom=this._createLabel(e),this.append(this.labelFrom)),t.visible&&(this.labelTo=this._createLabel(t),this.append(this.labelTo))},Is.prototype._createLabel=function(t){var e=ot(t),i=this.pointData(),e=e?e(i):this.formatValue(t.format);return new Nr(e,L({vertical:this.options.vertical},t),i)},Is.prototype.reflow=function(t){this.render();var e=this.labelFrom,i=this.labelTo,o=this.value;this.box=t,e&&(e.options.aboveAxis=o.from>o.to,e.reflow(t)),i&&(i.options.aboveAxis=o.to>o.from,i.reflow(t)),this.note&&this.note.reflow(t)},Is);function Is(){Rs.apply(this,arguments)}G.prototype.defaults=L({},G.prototype.defaults,{labels:{format:"{0} - {1}"},tooltip:{format:"{1}"}});var js,Bs=G,G=((js=an)&&(Vs.__proto__=js),((Vs.prototype=Object.create(js&&js.prototype)).constructor=Vs).prototype.pointType=function(){return Bs},Vs.prototype.pointValue=function(t){return t.valueFields},Vs.prototype.formatPointValue=function(t,e){return null===t.value.from&&null===t.value.to?"":this.chartService.format.auto(e,t.value.from,t.value.to)},Vs.prototype.plotRange=function(t){return t?[t.value.from,t.value.to]:0},Vs.prototype.updateRange=function(t,e){var i=e.series.axis,o=t.from,r=t.to,e=this.valueAxisRanges[i];null!==t&&R(o)&&R(r)&&((e=this.valueAxisRanges[i]=e||{min:l,max:c}).min=Math.min(e.min,o),e.max=Math.max(e.max,o),e.min=Math.min(e.min,r),e.max=Math.max(e.max,r))},Vs.prototype.aboveAxis=function(t){t=t.value;return t.from<t.to},Vs);function Vs(){js.apply(this,arguments)}G.prototype.plotLimits=sr.prototype.plotLimits;var Ls,zs,Es=G,Fs=((zs=lr)&&(Us.__proto__=zs),((Us.prototype=Object.create(zs&&zs.prototype)).constructor=Us).prototype.aliasFor=function(){return this.parent},Us),G=((Ls=se)&&(Ds.__proto__=Ls),((Ds.prototype=Object.create(Ls&&Ls.prototype)).constructor=Ds).prototype.render=function(){var t,e,i,o;this._rendered||(this._rendered=!0,o=(i=this.options).markers,t=i.labels,e=this.value,i=this.fromPoint=new Fs(e,L({},this.options,{labels:t.from,markers:o.from})),o=this.toPoint=new Fs(e,L({},this.options,{labels:t.to,markers:o.to})),this.copyFields(i),this.copyFields(o),this.append(i),this.append(o))},Ds.prototype.reflow=function(t){this.render();var e=t.from,t=t.to;this.positionLabels(e,t),this.fromPoint.reflow(e),this.toPoint.reflow(t),this.box=this.fromPoint.markerBox().clone().wrap(this.toPoint.markerBox())},Ds.prototype.createHighlight=function(){var t=new C.drawing.Group;return t.append(this.fromPoint.createHighlight()),t.append(this.toPoint.createHighlight()),t},Ds.prototype.highlightVisual=function(){return this.visual},Ds.prototype.highlightVisualArgs=function(){return{options:this.options,from:this.fromPoint.highlightVisualArgs(),to:this.toPoint.highlightVisualArgs()}},Ds.prototype.tooltipAnchor=function(){var t=this.owner.pane.clipBox();if(!t||t.overlaps(this.box)){var e,i,o=this.box,r=o.center(),t=S,r=this.options.vertical?(e=r.x,i=o.y1-5,w):(e=o.x2+5,i=r.y,A);return{point:new Ut(e,i),align:{horizontal:t,vertical:r}}}},Ds.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Ds.prototype.overlapsBox=function(t){return this.box.overlaps(t)},Ds.prototype.unclipElements=function(){this.fromPoint.unclipElements(),this.toPoint.unclipElements()},Ds.prototype.initLabelsFormat=function(){var t=this.options.labels;t.format||(t.from&&t.from.format||(t.from=Object.assign({},t.from,{format:"{0}"})),t.to&&t.to.format||(t.to=Object.assign({},t.to,{format:"{1}"})))},Ds.prototype.positionLabels=function(t,e){var i,o=this.options,r=o.labels,o=o.vertical;"auto"===r.position&&(t=o?e.y1<=t.y1?(i="above","below"):(i="below","above"):e.x1<=t.x1?(i=S,k):(i=k,S),r.from&&r.from.position||(this.fromPoint.options.labels.position=t),r.to&&r.to.position||(this.toPoint.options.labels.position=i))},Ds.prototype.copyFields=function(t){t.dataItem=this.dataItem,t.category=this.category,t.series=this.series,t.color=this.color,t.owner=this.owner},Ds);function Ds(t,e){Ls.call(this),this.value=t,this.options=e,this.aboveAxis=Rt(this.options.aboveAxis,!0),this.tooltipTracking=!0,this.initLabelsFormat()}function Us(){zs.apply(this,arguments)}L(G.prototype,ar),L(G.prototype,K),G.prototype.defaults={markers:{visible:!1,background:p,size:8,type:u,border:{width:2},opacity:1},labels:{visible:!1,margin:U(3),padding:U(4),animation:{type:"fadeIn",delay:600},position:"auto"},notes:{label:{}},highlight:{markers:{border:{color:p,width:2}},zIndex:100},tooltip:{format:"{0} - {1}"}};var Hs,Gs,Ns,qs=G,Xs=((Ns=Mr)&&(Ks.__proto__=Ns),((Ks.prototype=Object.create(Ns&&Ns.prototype)).constructor=Ks).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.toGeometryPoints(this.toPoints()))},Ks.prototype.stackSegments=function(){var t=this.fromSegments;return this.fromSegments||(t=this.fromSegments=this.segmentsFromPoints(this.toGeometryPoints(this.fromPoints().reverse()))),t},Ks.prototype.createStroke=function(t){var e=new C.drawing.Path(t),t=new C.drawing.Path(t);e.segments.push.apply(e.segments,this.strokeSegments()),t.segments.push.apply(t.segments,this.stackSegments()),this.visual.append(e),this.visual.append(t)},Ks.prototype.hasStackSegment=function(){return!0},Ks.prototype.fromPoints=function(){return this.linePoints.map(function(t){return t.fromPoint})},Ks.prototype.toPoints=function(){return this.linePoints.map(function(t){return t.toPoint})},Ks),Ys=((Gs=Xs)&&(Zs.__proto__=Gs),((Zs.prototype=Object.create(Gs&&Gs.prototype)).constructor=Zs).prototype.createStrokeSegments=function(){return this.createCurveSegments(this.toPoints())},Zs.prototype.stackSegments=function(){var t=this.fromSegments;return this.fromSegments||(t=this.fromSegments=this.createCurveSegments(this.fromPoints().reverse())),t},Zs.prototype.createCurveSegments=function(t){return(new uo).process(this.toGeometryPoints(t))},Zs),K=((Hs=Xs)&&(Ws.__proto__=Hs),((Ws.prototype=Object.create(Hs&&Hs.prototype)).constructor=Ws).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.calculateStepPoints(this.toPoints()))},Ws.prototype.stackSegments=function(){var t=this.fromSegments;return this.fromSegments||(t=this.fromSegments=this.segmentsFromPoints(this.calculateStepPoints(this.fromPoints()))).reverse(),t},Ws);function Ws(){Hs.apply(this,arguments)}function Zs(){Gs.apply(this,arguments)}function Ks(){Ns.apply(this,arguments)}L(K.prototype,$);var $s,Js=K,G=(($s=sr)&&(Qs.__proto__=$s),((Qs.prototype=Object.create($s&&$s.prototype)).constructor=Qs).prototype.render=function(){$s.prototype.render.call(this),this.renderSegments()},Qs.prototype.pointType=function(){return qs},Qs.prototype.createPoint=function(t,e){var i=e.categoryIx,o=e.category,r=e.series,n=e.seriesIx,s=t.valueFields;if(!Pn(s.from)&&!Pn(s.to)){if(this.seriesMissingValues(r)!==Vo)return null;s={from:0,to:0}}e=this.pointOptions(r,n),e=this.evalPointOptions(e,s,o,i,r,n),t=t.fields.color||r.color;j(r.color)&&(t=e.color);e=new qs(s,e);return e.color=t,this.append(e),e},Qs.prototype.createSegment=function(t,e,i){var o=(e.line||{}).style;return new("smooth"===o?Ys:"step"===o?Js:Xs)(t,e,i)},Qs.prototype.plotRange=function(t,e){return t?[t.value.from,t.value.to]:[e,e]},Qs.prototype.valueSlot=function(t,e){var i=t.getSlot(e[0],e[0],!this.options.clip),e=t.getSlot(e[1],e[1],!this.options.clip);if(i&&e)return{from:i,to:e}},Qs.prototype.pointSlot=function(t,e){var i,o=e.from,e=e.to,e=this.options.invertAxes?(i=new qt(o.x1,t.y1,o.x2,t.y2),new qt(e.x1,t.y1,e.x2,t.y2)):(i=new qt(t.x1,o.y1,t.x2,o.y2),new qt(t.x1,e.y1,t.x2,e.y2));return{from:i,to:e}},Qs.prototype.addValue=function(t,e){var i=t.valueFields;R(i.from)||(i.from=i.to),R(i.to)||(i.to=i.from),$s.prototype.addValue.call(this,t,e)},Qs.prototype.updateRange=function(t,e){var i;null!==t&&R(t.from)&&R(t.to)&&(i=e.series.axis,e=this.valueAxisRanges[i]=this.valueAxisRanges[i]||{min:l,max:c},i=t.from,t=t.to,e.min=Math.min(e.min,i,t),e.max=Math.max(e.max,i,t))},Qs.prototype.formatPointValue=function(t,e){t=t.value;return this.chartService.format.auto(e,t.from,t.to)},Qs.prototype.animationPoints=function(){for(var t=this.points,e=[],i=0;i<t.length;i++){var o=t[i];o&&(e.push((o.fromPoint||{}).marker),e.push((o.toPoint||{}).marker))}return e.concat(this._segments)},Qs);function Qs(){$s.apply(this,arguments)}L(G.prototype,W,N);var ta,ea,ia,oa=G,ra=((ia=hn)&&(pa.__proto__=ia),((pa.prototype=Object.create(ia&&ia.prototype)).constructor=pa).prototype.reflow=function(t){var e=this.options,i=this.value,o=this.owner.seriesValueAxis(e),r=[],n=[],s=[],a=o.getSlot(i.low,i.high),e=o.getSlot(i.open,i.open),i=o.getSlot(i.close,i.close);e.x1=i.x1=a.x1=t.x1,e.x2=i.x2=a.x2=t.x2;t=a.center().x;r.push([e.x1,e.y1]),r.push([t,e.y1]),n.push([t,i.y1]),n.push([i.x2,i.y1]),s.push([t,a.y1]),s.push([t,a.y2]),this.lines=[r,n,s],this.box=a.clone().wrap(e.clone().wrap(i)),this.reflowNote()},pa.prototype.createBody=function(){},pa),na=((ea=gn)&&(aa.__proto__=ea),((aa.prototype=Object.create(ea&&ea.prototype)).constructor=aa).prototype.pointType=function(){return ra},aa),$=((ta=se)&&(sa.__proto__=ta),((sa.prototype=Object.create(ta&&ta.prototype)).constructor=sa).prototype.linePoints=function(){var t,e=this.from,i=this.from.box,o=this.to.box,r=[];return e.isVertical?(t=e.aboveAxis?i.y1:i.y2,r.push([i.x1,t],[o.x2,t])):(e=e.aboveAxis?i.x2:i.x1,r.push([e,i.y1],[e,o.y2])),r},sa.prototype.createVisual=function(){ta.prototype.createVisual.call(this);var t=this.series.line||{},t=C.drawing.Path.fromPoints(this.linePoints(),{stroke:{color:t.color,width:t.width,opacity:t.opacity,dashType:t.dashType}});T(t),this.visual.append(t)},sa);function sa(t,e,i){ta.call(this),this.from=t,this.to=e,this.series=i}function aa(){ea.apply(this,arguments)}function pa(){ia.apply(this,arguments)}It($,{animation:{type:"fadeIn",delay:600}});var ha,la,ca=$,ua=((la=an)&&(ya.__proto__=la),((ya.prototype=Object.create(la&&la.prototype)).constructor=ya).prototype.render=function(){la.prototype.render.call(this),this.createSegments()},ya.prototype.traverseDataPoints=function(t){for(var e=this.options.series,i=ir(e),o=!this.options.invertAxes,r=0;r<e.length;r++)for(var n=e[r],s=0,a=0,p=0;p<i;p++){var h=Ro.current.bindPoint(n,p),l=h.valueFields.value,c=h.fields.summary,u=s,d=void 0;c?"total"===c.toLowerCase()?(u=0,d=h.valueFields.value=s):(d=u-(h.valueFields.value=a),a=0):R(l)&&(a+=l,d=s+=l),t(h,{category:this.categoryAxis.categoryAt(p),categoryIx:p,series:n,seriesIx:r,total:s,runningTotal:a,from:u,to:d,isVertical:o})}},ya.prototype.updateRange=function(t,e){la.prototype.updateRange.call(this,{value:e.to},e)},ya.prototype.aboveAxis=function(t){return 0<=t.value},ya.prototype.plotRange=function(t){return[t.from,t.to]},ya.prototype.createSegments=function(){for(var t=this.options.series,e=this.seriesPoints,i=this.segments=[],o=0;o<t.length;o++){var r=t[o],n=e[o];if(n)for(var s=void 0,a=0;a<n.length;a++){var p,h=n[a];h&&s&&(p=new ca(s,h,r),i.push(p),this.append(p)),s=h}}},ya),da=["area","verticalArea","rangeArea","verticalRangeArea"],ga=[Fo,Uo].concat(da),K=((ha=As)&&(fa.__proto__=ha),((fa.prototype=Object.create(ha&&ha.prototype)).constructor=fa).prototype.initFields=function(t){if(this.namedCategoryAxes={},this.namedValueAxes={},this.valueAxisRangeTracker=new Fr,0<t.length){this.invertAxes=lt(t[0].type,[zo,"bullet",Uo,"verticalArea","verticalRangeArea","rangeBar","horizontalWaterfall","verticalBoxPlot"]);for(var e=0;e<t.length;e++){var i=t[e].stack;if(i&&"100%"===i.type){this.stack100=!0;break}}}},fa.prototype.render=function(t){void 0===t&&(t=this.panes),this.createCategoryAxes(t),this.aggregateCategories(t),this.createCategoryAxesLabels(t),this.createCharts(t),this.createValueAxes(t)},fa.prototype.removeAxis=function(t){var e=t.options.name;ha.prototype.removeAxis.call(this,t),t instanceof Ai?delete this.namedCategoryAxes[e]:(this.valueAxisRangeTracker.reset(e),delete this.namedValueAxes[e]),t===this.categoryAxis&&delete this.categoryAxis,t===this.valueAxis&&delete this.valueAxis},fa.prototype.createCharts=function(t){for(var e=this.groupSeriesByPane(),i=0;i<t.length;i++){var o=t[i],r=e[o.options.name||"default"]||[];this.addToLegend(r);r=this.filterVisibleSeries(r);if(r)for(var n=this.groupSeriesByCategoryAxis(r),s=0;s<n.length;s++)this.createChartGroup(n[s],o)}},fa.prototype.createChartGroup=function(t,e){this.createAreaChart(ls(t,["area","verticalArea"]),e),this.createRangeAreaChart(ls(t,["rangeArea","verticalRangeArea"]),e),this.createBarChart(ls(t,[Eo,zo]),e),this.createRangeBarChart(ls(t,["rangeColumn","rangeBar"]),e),this.createBulletChart(ls(t,["bullet","verticalBullet"]),e),this.createCandlestickChart(ls(t,"candlestick"),e),this.createBoxPlotChart(ls(t,["boxPlot","verticalBoxPlot"]),e),this.createOHLCChart(ls(t,"ohlc"),e),this.createWaterfallChart(ls(t,["waterfall","horizontalWaterfall"]),e),this.createLineChart(ls(t,[Fo,Uo]),e)},fa.prototype.aggregateCategories=function(t){var e=this.srcSeries||this.series,i=[];this._currentPointsCache={},this._seriesPointsCache=this._seriesPointsCache||{};for(var o=0;o<e.length;o++){var r=e[o],n=this.seriesCategoryAxis(r),s=this.findPane(n.options.pane),r=(hs(n.options.type,y)||r.categoryField)&&lt(s,t)?this.aggregateSeries(r,n):this.filterSeries(r,n);i.push(r)}this._seriesPointsCache=this._currentPointsCache,this._currentPointsCache=null,this.srcSeries=e,this.series=i},fa.prototype.filterSeries=function(e,i){var t=(e.data||{}).length;if(i._seriesMax=Math.max(i._seriesMax||0,t),!R(i.options.min)&&!R(i.options.max))return e;var o=i.currentRangeIndices(),r=lt(e.type,ga),n=L({},e);return n.data=(n.data||[]).slice(o.min,o.max+1),r&&vs(n,o,t,function(t){return{item:e.data[t],category:i.categoryAt(t,!0),categoryIx:t-o.min}},function(t){return mt(e.data[t])}),n},fa.prototype.clearSeriesPointsCache=function(){this._seriesPointsCache={}},fa.prototype.seriesSourcePoints=function(t,e){var i=t.index+";"+e.categoriesHash();if(this._seriesPointsCache[i])return this._currentPointsCache[i]=this._seriesPointsCache[i],this._seriesPointsCache[i];var o=e.options,r=o.srcCategories,o=hs(o.type,y),n=t.data,s=o?cs:ko,a=[];o||e.mapCategories();for(var p=0;p<n.length;p++){var h,l=t.categoryField?s(t.categoryField,n[p],this.chartService.intl):r[p];mt(l)&&null!==l&&(a[h=e.totalIndex(l)]=a[h]||{items:[],category:l},a[h].items.push(p))}return this._currentPointsCache[i]=a},fa.prototype.aggregateSeries=function(t,o){if(!t.data.length)return t;for(var r=this.seriesSourcePoints(t,o),e=L({},t),n=new Cs(L({},t),Ro.current,Os.current),i=e.data=[],s=o.options.dataItems||[],a=o.currentRangeIndices(),p=function(t){var e=t-a.min,i=r[t];return(i=i||(r[t]={})).categoryIx=e,i.item||(t=o.categoryAt(t,!0),i.category=t,i.item=n.aggregatePoints(i.items,t)),i},h=a.min;h<=a.max;h++){var l=p(h);i[l.categoryIx]=l.item,l.items&&l.items.length&&(s[l.categoryIx]=l.item)}return lt(e.type,ga)&&vs(e,a,o.totalCount(),p,function(t){return r[t]}),o.options.dataItems=s,e},fa.prototype.appendChart=function(t,e){var i=t.options.series,o=this.seriesCategoryAxis(i[0]),r=o.options.categories,n=Math.max(0,ir(i)-r.length);if(0<n)for(r=o.options.categories=o.options.categories.slice(0);n--;)r.push("");this.valueAxisRangeTracker.update(t.valueAxisRanges),ha.prototype.appendChart.call(this,t,e)},fa.prototype.seriesPaneName=function(t){var e=this.options,i=t.axis,t=at([].concat(e.valueAxis),function(t){return t.name===i})[0],e=((e.panes||[{}])[0]||{}).name||"default";return(t||{}).pane||e},fa.prototype.seriesCategoryAxis=function(t){var e=t.categoryAxis,t=e?this.namedCategoryAxes[e]:this.categoryAxis;if(!t)throw new Error("Unable to locate category axis with name "+e);return t},fa.prototype.stackableChartOptions=function(t,e){t=t.stack;return{isStacked:t,isStacked100:t&&"100%"===t.type,clip:e.options.clip}},fa.prototype.groupSeriesByCategoryAxis=function(t){for(var e=[],i={},o=0;o<t.length;o++){var r=t[o].categoryAxis||"$$default$$";i.hasOwnProperty(r)||(i[r]=!0,e.push(r))}for(var n=[],s=0;s<e.length;s++){var a=function(t,e,i){return at(t,function(t){return 0===i&&!t.categoryAxis||t.categoryAxis===e})}(t,e[s],s);0!==a.length&&n.push(a)}return n},fa.prototype.createBarChart=function(t,e){var i;0!==t.length&&(i=t[0],i=new an(this,Object.assign({series:t,invertAxes:this.invertAxes,gap:i.gap,spacing:i.spacing},this.stackableChartOptions(i,e))),this.appendChart(i,e))},fa.prototype.createRangeBarChart=function(t,e){var i;0!==t.length&&(i=t[0],i=new Es(this,{series:t,invertAxes:this.invertAxes,gap:i.gap,spacing:i.spacing}),this.appendChart(i,e))},fa.prototype.createBulletChart=function(t,e){var i;0!==t.length&&(i=t[0],i=new qn(this,{series:t,invertAxes:this.invertAxes,gap:i.gap,spacing:i.spacing,clip:e.options.clip}),this.appendChart(i,e))},fa.prototype.createLineChart=function(t,e){var i;0!==t.length&&(i=t[0],i=new Tr(this,Object.assign({invertAxes:this.invertAxes,series:t},this.stackableChartOptions(i,e))),this.appendChart(i,e))},fa.prototype.createAreaChart=function(t,e){var i;0!==t.length&&(i=t[0],i=new Er(this,Object.assign({invertAxes:this.invertAxes,series:t},this.stackableChartOptions(i,e))),this.appendChart(i,e))},fa.prototype.createRangeAreaChart=function(t,e){0!==t.length&&(t=new oa(this,{invertAxes:this.invertAxes,series:t,clip:e.options.clip}),this.appendChart(t,e))},fa.prototype.createOHLCChart=function(t,e){var i;0!==t.length&&(i=t[0],i=new na(this,{invertAxes:this.invertAxes,gap:i.gap,series:t,spacing:i.spacing,clip:e.options.clip}),this.appendChart(i,e))},fa.prototype.createCandlestickChart=function(t,e){var i;0!==t.length&&(i=t[0],i=new gn(this,{invertAxes:this.invertAxes,gap:i.gap,series:t,spacing:i.spacing,clip:e.options.clip}),this.appendChart(i,e))},fa.prototype.createBoxPlotChart=function(t,e){var i;0!==t.length&&(i=t[0],i=new _n(this,{invertAxes:this.invertAxes,gap:i.gap,series:t,spacing:i.spacing,clip:e.options.clip}),this.appendChart(i,e))},fa.prototype.createWaterfallChart=function(t,e){var i;0!==t.length&&(i=t[0],i=new ua(this,{series:t,invertAxes:this.invertAxes,gap:i.gap,spacing:i.spacing}),this.appendChart(i,e))},fa.prototype.axisRequiresRounding=function(t,e){for(var i=ls(this.series,Ho),o=0;o<this.series.length;o++){var r,n=this.series[o];!lt(n.type,da)||(r=n.line)&&"step"===r.style&&i.push(n)}for(var s=0;s<i.length;s++){var a=i[s].categoryAxis||"";if(a===t||!a&&0===e)return!0}},fa.prototype.aggregatedAxis=function(t,e){for(var i=this.series,o=0;o<i.length;o++){var r=i[o].categoryAxis||"";if((r===t||!r&&0===e)&&i[o].categoryField)return!0}},fa.prototype.createCategoryAxesLabels=function(){for(var t=this.axes,e=0;e<t.length;e++)t[e]instanceof Ai&&t[e].createLabels()},fa.prototype.createCategoryAxes=function(t){for(var e=this.invertAxes,i=[].concat(this.options.categoryAxis),o=[],r=0;r<i.length;r++){var n=i[r];if(lt(this.findPane(n.pane),t)){var s=n.name,a=n.categories;void 0===a&&(a=[]),n=L({vertical:e,reverse:!e&&this.chartService.rtl,axisCrossingValue:e?l:0},n),mt(n.justified)||(n.justified=this.isJustified()),this.axisRequiresRounding(s,r)&&(n.justified=!1);var p=void 0,p=new(us(n,a[0])?ji:Ai)(n,this.chartService);if(i[r].categories=p.options.srcCategories,s){if(this.namedCategoryAxes[s])throw new Error("Category axis with name "+s+" is already defined");this.namedCategoryAxes[s]=p}p.axisIndex=r,o.push(p),this.appendAxis(p)}}var h=this.categoryAxis||o[0];this.categoryAxis=h,e?this.axisY=h:this.axisX=h},fa.prototype.isJustified=function(){for(var t=this.series,e=0;e<t.length;e++)if(!lt(t[e].type,da))return!1;return!0},fa.prototype.createValueAxes=function(t){var e=this.valueAxisRangeTracker,i=e.query(),o=[].concat(this.options.valueAxis),r=this.invertAxes,n={vertical:!r,reverse:r&&this.chartService.rtl},s=[];this.stack100&&(n.roundToMajorUnit=!1,n.labels={format:"P0"});for(var a=0;a<o.length;a++){var p=o[a];if(lt(this.findPane(p.pane),t)){var h=p.name,l=hs(p.type,"log")?{min:.1,max:1}:{min:0,max:1},l=e.query(h)||i||l;0===a&&l&&i&&(l.min=Math.min(l.min,i.min),l.max=Math.max(l.max,i.max));p=new(hs(p.type,"log")?Ki:Hi)(l.min,l.max,L({},n,p),this.chartService);if(h){if(this.namedValueAxes[h])throw new Error("Value axis with name "+h+" is already defined");this.namedValueAxes[h]=p}p.axisIndex=a,s.push(p),this.appendAxis(p)}}var c=this.valueAxis||s[0];this.valueAxis=c,r?this.axisX=c:this.axisY=c},fa.prototype._dispatchEvent=function(t,e,i){var o=t._eventCoordinates(e),r=new Ut(o.x,o.y),o=this.pointPane(r),n=[],s=[];if(o){for(var a=o.axes,p=0;p<a.length;p++){var h=a[p];h.getValue?ss(s,h.getValue(r)):ss(n,h.getCategory(r))}0===n.length&&ss(n,this.categoryAxis.getCategory(r)),0<n.length&&0<s.length&&t.trigger(i,{element:wt(e),originalEvent:e,category:ds(n),value:ds(s)})}},fa.prototype.pointPane=function(t){for(var e=this.panes,i=0;i<e.length;i++){var o=e[i];if(o.contentBox.containsPoint(t))return o}},fa.prototype.updateAxisOptions=function(t,e){va(this.options,t,e),va(this.originalOptions,t,e)},fa);function fa(){ha.apply(this,arguments)}function ya(){la.apply(this,arguments)}function va(t,e,i){L([].concat(e instanceof Ai?t.categoryAxis:t.valueAxis)[e.axisIndex],i)}It(K,{categoryAxis:{},valueAxis:{}}),L(K.prototype,Ss);var ma=K;function xa(){this._defaultPrevented=!0}var ba,_a=((ba=C.Class)&&(wa.__proto__=ba),((wa.prototype=Object.create(ba&&ba.prototype)).constructor=wa).prototype.destroy=function(){this._points=[]},wa.prototype.show=function(t,e){var i=[].concat(t);this.hide();for(var o=0;o<i.length;o++){var r=i[o];r&&r.toggleHighlight&&r.hasHighlight()&&(this.togglePointHighlight(r,!0,e),this._points.push(r))}},wa.prototype.togglePointHighlight=function(t,e,i){var o=(t.options.highlight||{}).toggle;o?(o(o={category:t.category,series:t.series,dataItem:t.dataItem,value:t.value,stackValue:t.stackValue,preventDefault:xa,visual:t.highlightVisual(),show:e}),o._defaultPrevented||t.toggleHighlight(e,i)):t.toggleHighlight(e,i)},wa.prototype.hide=function(){for(var t=this._points;t.length;)this.togglePointHighlight(t.pop(),!1)},wa.prototype.isHighlighted=function(t){for(var e=this._points,i=0;i<e.length;i++)if(t===e[i])return!0;return!1},wa);function wa(){ba.call(this),this._points=[]}function Aa(t,e){e=(e||"").toLowerCase(),t=t.event;return"none"===e&&!(t.ctrlKey||t.shiftKey||t.altKey)||t[e+"Key"]}function Sa(t){for(var e={},i=0;i<t.length;i++){var o=t[i];o.axis.options.name&&(e[o.axis.options.name]={min:o.range.min,max:o.range.max})}return e}var ka,N=((ka=C.Class)&&(Pa.__proto__=ka),((Pa.prototype=Object.create(ka&&ka.prototype)).constructor=Pa).prototype.start=function(t){return this._active=Aa(t,this.options.key),this._active},Pa.prototype.move=function(t){if(this._active){t=this.axisRanges=this._panAxes(t,v).concat(this._panAxes(t,m));if(t.length)return Sa(this.axisRanges=t)}},Pa.prototype.end=function(){var t=this._active;return this._active=!1,t},Pa.prototype.pan=function(){var t=this.plotArea,e=this.axisRanges;if(e.length){for(var i=0;i<e.length;i++){var o=e[i];t.updateAxisOptions(o.axis,o.range)}t.redraw(t.panes)}},Pa.prototype.destroy=function(){delete this.plotArea},Pa.prototype._panAxes=function(t,e){var i=this.plotArea,o=-t[e].delta,t=(this.options.lock||"").toLowerCase(),r=[];if(0!=o&&(t||"").toLowerCase()!==e)for(var n=i.axes,s=0;s<n.length;s++){var a,p=n[s];!(e===v&&!p.options.vertical||e===m&&p.options.vertical)||(a=p.pan(o))&&(a.limitRange=!0,r.push({axis:p,range:a}))}return r},Pa);function Pa(t,e){ka.call(this),this.plotArea=t,this.options=L({},this.options,e)}N.prototype.options={key:"none",lock:"none"};var Ca,Ta=N,G=((Ca=C.Class)&&(Ma.__proto__=Ca),((Ma.prototype=Object.create(Ca&&Ca.prototype)).constructor=Ma).prototype.createElement=function(){var t=this._marquee=document.createElement("div");t.className="k-marquee";var e=document.createElement("div");e.className="k-marquee-color",t.appendChild(e)},Ma.prototype.removeElement=function(){this._marquee.parentNode&&this._marquee.parentNode.removeChild(this._marquee)},Ma.prototype.setStyles=function(t){D(this._marquee,t)},Ma.prototype.start=function(t){if(Aa(t,this.options.key)){var e=this.chart,i=e._eventCoordinates(t),e=this._zoomPane=e._plotArea.paneByPoint(i),i=e?e.chartsBox().clone():null;if(e&&i){e=this._elementOffset();return i.translate(e.left,e.top),this._zoomPaneClipBox=i,document.body.appendChild(this._marquee),this.setStyles({left:t.pageX+1,top:t.pageY+1,width:0,height:0}),!0}}return!1},Ma.prototype._elementOffset=function(){var t=this.chart.element,e=D(t,["paddingLeft","paddingTop"]),i=e.paddingLeft,e=e.paddingTop,t=bt(t);return{left:i+t.left,top:e+t.top}},Ma.prototype.move=function(t){this._zoomPane&&this.setStyles(this._selectionPosition(t))},Ma.prototype.end=function(t){if(this._zoomPane){var e=this._elementOffset(),t=this._selectionPosition(t);t.left-=e.left,t.top-=e.top;e={x:t.left,y:t.top},t={x:t.left+t.width,y:t.top+t.height};return this._updateAxisRanges(e,t),this.removeElement(),delete this._zoomPane,Sa(this.axisRanges)}},Ma.prototype.zoom=function(){var t=this.axisRanges;if(t&&t.length){for(var e=this.chart._plotArea,i=0;i<t.length;i++){var o=t[i];e.updateAxisOptions(o.axis,o.range)}e.redraw(e.panes)}},Ma.prototype.destroy=function(){this.removeElement(),delete this._marquee,delete this.chart},Ma.prototype._updateAxisRanges=function(t,e){for(var i=(this.options.lock||"").toLowerCase(),o=[],r=this._zoomPane.axes,n=0;n<r.length;n++){var s=r[n],a=s.options.vertical;i===v&&!a||i===m&&a||!mt(s.axisIndex)||(a=s.pointsRange(t,e))&&o.push({axis:s,range:a})}this.axisRanges=o},Ma.prototype._selectionPosition=function(t){var e=this._zoomPaneClipBox,i={x:t.x.startLocation,y:t.y.startLocation},o=t.x.location,r=t.y.location,n=(this.options.lock||"").toLowerCase(),s=Math.min(i.x,o),a=Math.min(i.y,r),p=Math.abs(i.x-o),t=Math.abs(i.y-r);return n===v&&(s=e.x1,p=e.width()),n===m&&(a=e.y1,t=e.height()),o>e.x2&&(p=e.x2-i.x),o<e.x1&&(p=i.x-e.x1),r>e.y2&&(t=e.y2-i.y),r<e.y1&&(t=i.y-e.y1),{left:Math.max(s,e.x1),top:Math.max(a,e.y1),width:p,height:t}},Ma);function Ma(t,e){Ca.call(this),this.chart=t,this.options=L({},this.options,e),this.createElement()}G.prototype.options={key:"shift",lock:"none"};var Ra,Oa,Ia,ja,Ba=G,Va=((ja=C.Class)&&(Ha.__proto__=ja),((Ha.prototype=Object.create(ja&&ja.prototype)).constructor=Ha).prototype.updateRanges=function(t){for(var e=(this.options.lock||"").toLowerCase(),i=[],o=this.chart._plotArea.axes,r=0;r<o.length;r++){var n=o[r],s=n.options.vertical;e===v&&!s||e===m&&s||!n.zoomRange||(s=n.zoomRange(-t))&&i.push({axis:n,range:s})}return Sa(this.axisRanges=i)},Ha.prototype.zoom=function(){var t=this.axisRanges,e=this.chart._plotArea;if(t&&t.length&&e.updateAxisOptions){for(var i=0;i<t.length;i++){var o=t[i];e.updateAxisOptions(o.axis,o.range)}e.redraw(e.panes)}},Ha.prototype.destroy=function(){delete this.chart},Ha),La=((Ia=se)&&(Ua.__proto__=Ia),((Ua.prototype=Object.create(Ia&&Ia.prototype)).constructor=Ua).prototype.render=function(){var t=this.children,e=this.options,i=e.vertical;this.visual=new C.drawing.Layout(null,{spacing:i?0:e.spacing,lineSpacing:i?e.spacing:0,orientation:i?"vertical":"horizontal",reverse:e.rtl,alignItems:i?"start":"center"});for(var o=0;o<t.length;o++){var r=t[o];r.reflow(new qt),r.renderVisual()}},Ua.prototype.reflow=function(t){this.visual.rect(t.toRect()),this.visual.reflow();t=this.visual.clippedBBox();this.box=t?Ae(t):new qt},Ua.prototype.renderVisual=function(){this.addVisual()},Ua.prototype.createVisual=function(){},Ua),za=((Oa=he)&&(Da.__proto__=Oa),((Da.prototype=Object.create(Oa&&Oa.prototype)).constructor=Da).prototype.createContainer=function(){this.container=new xe({vertical:!1,wrap:!1,align:A,spacing:this.options.spacing}),this.append(this.container)},Da.prototype.createMarker=function(){this.container.append(new ce(this.markerOptions()))},Da.prototype.markerOptions=function(){var t=this.options,e=t.markerColor;return L({},t.markers,{background:e,border:{color:e}})},Da.prototype.createLabel=function(){var t=this.options,e=L({},t.labels);this.container.append(new Ce(t.text,e))},Da.prototype.renderComplete=function(){Oa.prototype.renderComplete.call(this);var t=this.options.cursor||{},t=this._itemOverlay=C.drawing.Path.fromRect(this.container.box.toRect(),{fill:{color:p,opacity:0},stroke:null,cursor:t.style||t});this.appendVisual(t)},Da.prototype.click=function(t,e){var i=this.eventArgs(e);!t.trigger("legendItemClick",i)&&e&&"contextmenu"===e.type&&e.preventDefault()},Da.prototype.over=function(t,e){e=this.eventArgs(e);return t.trigger("legendItemHover",e)||t._legendItemHover(e.seriesIndex,e.pointIndex),!0},Da.prototype.out=function(t,e){t._unsetActivePoint(),t.trigger("legendItemLeave",this.eventArgs(e))},Da.prototype.eventArgs=function(t){var e=this.options;return{element:wt(t),text:e.text,series:e.series,seriesIndex:e.series.index,pointIndex:e.pointIndex}},Da.prototype.renderVisual=function(){var e=this,t=this.options,i=t.visual;i?(this.visual=i({active:t.active,series:t.series,sender:this.getSender(),pointIndex:t.pointIndex,options:{markers:this.markerOptions(),labels:t.labels},createVisual:function(){e.createVisual(),e.renderChildren(),e.renderComplete();var t=e.visual;return delete e.visual,t}}),this.addVisual()):Oa.prototype.renderVisual.call(this)},Da),Ea="custom",$=((Ra=se)&&(Fa.__proto__=Ra),((Fa.prototype=Object.create(Ra&&Ra.prototype)).constructor=Fa).prototype.createContainers=function(){var t=this.options,e=t.position,i=t.align,o=e,r=A;e===Ea?o=S:lt(e,[P,w])?(o="start"===i?S:"end"===i?k:A,r=e):i&&("start"===i?r=P:"end"===i&&(r=w)),this.container=new he({margin:t.margin,padding:t.padding,background:t.background,border:t.border,vAlign:r,align:o,zIndex:t.zIndex,shrinkToFit:!0}),this.hasTitle()?this.itemsContainer=new he({vAlign:r,align:o,zIndex:t.zIndex,shrinkToFit:!0}):this.itemsContainer=this.container,this.append(this.container)},Fa.prototype.createItems=function(){var t=this.getService(),e=this.options,i=this.isVertical(),o=new La({vertical:i,spacing:e.spacing,rtl:t.rtl},t),r=e.items;e.reverse&&(r=r.slice(0).reverse());for(var n=r.length,s=0;s<n;s++){var a=r[s];o.append(new za(L({},{markers:e.markers,labels:e.labels,rtl:t.rtl},e.item,a)))}o.render(),this.itemsContainer.append(o)},Fa.prototype.isVertical=function(){var t=this.options,e=t.orientation,t=t.position;return t===Ea&&"horizontal"!==e||(mt(e)?"horizontal"!==e:lt(t,[S,k]))},Fa.prototype.hasItems=function(){return 0<this.container.children[0].children.length},Fa.prototype.reflow=function(t){var e=this.options,t=t.clone();this.hasItems()?(e.position===Ea?(this.containerCustomReflow(t),this.box=t):this.containerReflow(t),this.hasTitle()&&this.title.reflow(new qt(this.container.box.x1,this.title.box.y1,this.container.box.x2,this.title.box.y2))):this.box=t},Fa.prototype.containerReflow=function(t){var e=this.options,i=this.container,o=e.position,r=e.width,n=e.height,s=o===P||o===w?v:m,a=this.isVertical(),p=t.clone(),h=t.clone();o!==S&&o!==k||(h.y1=p.y1=0),a&&n?(h.y2=h.y1+n,h.align(p,m,i.options.vAlign)):!a&&r&&(h.x2=h.x1+r,h.align(p,v,i.options.align)),i.reflow(h);p=(h=i.box).clone();(e.offsetX||e.offsetY)&&(h.translate(e.offsetX,e.offsetY),i.reflow(h)),p[s+1]=t[s+1],p[s+2]=t[s+2],this.box=p},Fa.prototype.containerCustomReflow=function(t){var e=this.options,i=this.container,o=e.offsetX,r=e.offsetY,n=e.width,s=e.height,e=this.isVertical(),t=t.clone();e&&s?t.y2=t.y1+s:!e&&n&&(t.x2=t.x1+n),i.reflow(t),t=i.box,i.reflow(new qt(o,r,o+t.width(),r+t.height()))},Fa.prototype.renderVisual=function(){this.hasItems()&&Ra.prototype.renderVisual.call(this)},Fa.prototype.createLegendTitle=function(t){var e=L({},{color:a,position:P,align:A},t),i=e.text;t&&!1!==t.visible&&(mt(e)&&e.visible&&((t=ot(e))?i=t({text:i}):e.format&&(i=this.chartService.format.auto(e.format,i))),this.title=new Ce(i,e),this.createTitleLayout(),this.appendTitleLayoutContent())},Fa.prototype.createTitleLayout=function(){this.layout=new xe({vertical:!0,wrap:!1}),this.container.append(this.layout)},Fa.prototype.hasTitle=function(){return Boolean(this.options.title&&!1!==this.options.title.visible)},Fa.prototype.appendTitleLayoutContent=function(){this.options.title.position===w?(this.layout.append(this.itemsContainer),this.layout.append(this.title)):(this.layout.append(this.title),this.layout.append(this.itemsContainer))},Fa);function Fa(t,e){void 0===e&&(e={}),Ra.call(this,t),this.chartService=e,lt(this.options.position,[P,k,w,S,Ea])||(this.options.position=k),this.createContainers(),this.createLegendTitle(t.title),this.createItems()}function Da(t){Oa.call(this,t),this.createContainer(),t.rtl?(this.createLabel(),this.createMarker()):(this.createMarker(),this.createLabel())}function Ua(t,e){Ia.call(this,t),this.chartService=e}function Ha(t,e){ja.call(this),this.chart=t,this.options=L({},this.options,e)}It($,{position:k,items:[],offsetX:0,offsetY:0,margin:U(5),padding:U(5),border:{color:a,width:0},item:{cursor:"pointer",spacing:6},spacing:6,background:"",zIndex:1,markers:{border:{width:0},width:15,height:3,type:"rect",align:S,vAlign:A}});var Ga,Na=$,K=((Ga=C.Class)&&(qa.__proto__=Ga),((qa.prototype=Object.create(Ga&&Ga.prototype)).constructor=qa).prototype.register=function(t,e){this._registry.push({type:t,seriesTypes:e})},qa.prototype.create=function(t,e,i){for(var o,r=this._registry,n=r[0],s=0;s<r.length;s++){var a=r[s];if(0<(o=ls(t,a.seriesTypes)).length){n=a;break}}return new n.type(o,e,i)},qa);function qa(){Ga.call(this),this._registry=[]}K.current=new K;var Xa=K;function Ya(t){var e=document.createElement("div");return t&&(e.className=t),e}function Wa(t){for(var e=t;e&&!pt(e,"k-handle");)e=e.parentNode;return e}var Za,N=((Za=C.Class)&&(Ka.__proto__=Za),((Ka.prototype=Object.create(Za&&Za.prototype)).constructor=Ka).prototype.onPane=function(t){return this.categoryAxis.pane===t},Ka.prototype.createElements=function(){var t=this.options,e=this.wrapper=Ya("k-selector");D(e,{top:t.offset.top,left:t.offset.left,width:t.width,height:t.height,direction:"ltr"});var i=this.selection=Ya("k-selection");this.leftMask=Ya("k-mask"),this.rightMask=Ya("k-mask"),e.appendChild(this.leftMask),e.appendChild(this.rightMask),e.appendChild(i),i.appendChild(Ya("k-selection-bg"));var o=this.leftHandle=Ya("k-handle k-left-handle"),r=this.rightHandle=Ya("k-handle k-right-handle");o.appendChild(Ya()),r.appendChild(Ya()),i.appendChild(o),i.appendChild(r),this.chartElement.appendChild(e);var n=D(i,["borderLeftWidth","borderRightWidth","height"]),s=D(o,"height").height,i=D(r,"height").height;t.selection={border:{left:n.borderLeftWidth,right:n.borderRightWidth}},D(o,{top:(n.height-s)/2}),D(r,{top:(n.height-i)/2}),e.style.cssText=e.style.cssText},Ka.prototype.bindEvents=function(){var t;!1!==this.options.mousewheel&&(this._mousewheelHandler=this._mousewheel.bind(this),vt(this.wrapper,((t={})[Yo]=this._mousewheelHandler,t))),this._domEvents=tt.create(this.wrapper,{stopPropagation:!0,start:this._start.bind(this),move:this._move.bind(this),end:this._end.bind(this),tap:this._tap.bind(this),press:this._press.bind(this),gesturestart:this._gesturestart.bind(this),gesturechange:this._gesturechange.bind(this),gestureend:this._gestureend.bind(this)})},Ka.prototype.initOptions=function(){var t=this.options,e=this.categoryAxis.pane.chartsBox(),i=this.chart.chartService.intl;this._dateAxis&&L(t,{min:mi(i,t.min),max:mi(i,t.max),from:mi(i,t.from),to:mi(i,t.to)});var o=D(this.chartElement,["paddingLeft","paddingTop"]),i=o.paddingLeft,o=o.paddingTop;this.options=L({},{width:e.width(),height:e.height()+.1,padding:{left:i,top:o},offset:{left:e.x1+i,top:e.y1+o},from:t.min,to:t.max},t)},Ka.prototype.destroy=function(){var t;this._domEvents&&(this._domEvents.destroy(),delete this._domEvents),clearTimeout(this._mwTimeout),this._state=null,this.wrapper&&(this._mousewheelHandler&&(Mt(this.wrapper,((t={})[Yo]=this._mousewheelHandler,t)),this._mousewheelHandler=null),this.chartElement.removeChild(this.wrapper),this.wrapper=null)},Ka.prototype._rangeEventArgs=function(t){return{axis:this.categoryAxis.options,from:this._value(t.from),to:this._value(t.to)}},Ka.prototype._start=function(t){var e=this.options,i=wt(t);!this._state&&i&&(this.chart._unsetActivePoint(),this._state={moveTarget:Wa(i)||i,startLocation:t.x?t.x.location:0,range:{from:this._index(e.from),to:this._index(e.to)}},e=this._rangeEventArgs({from:this._index(e.from),to:this._index(e.to)}),this.trigger("selectStart",e)&&(this._state=null))},Ka.prototype._press=function(t){(t=this._state?this._state.moveTarget:Wa(wt(t)))&&n(t,"k-handle-active")},Ka.prototype._move=function(t){var e,i,o,r,n,s,a,p,h,l,c,u;this._state&&(l=this._state,h=this.options,c=this.categoryAxis,e=l.range,i=l.moveTarget,o=c.options.reverse,r=this._index(h.from),n=this._index(h.to),s=this._index(h.min),a=this._index(h.max),u=l.startLocation-t.x.location,p=e.from,h=e.to,l=e.to-e.from,t=D(this.wrapper,"width").width/(c.categoriesCount()-1),c=Math.round(u/t)*(o?-1:1),i&&(u=pt(i,"k-left-handle"),t=pt(i,"k-right-handle"),pt(i,"k-selection k-selection-bg")?(e.from=Math.min(Math.max(s,r-c),a-l),e.to=Math.min(e.from+l,a)):u&&!o||t&&o?(e.from=Math.min(Math.max(s,r-c),a-1),e.to=Math.max(e.from+1,e.to)):(u&&o||t&&!o)&&(e.to=Math.min(Math.max(s+1,n-c),a),e.from=Math.min(e.to-1,e.from)),e.from===p&&e.to===h||(this.move(e.from,e.to),this.trigger("select",this._rangeEventArgs(e)))))},Ka.prototype._end=function(){var t;this._state&&((t=this._state.moveTarget)&&_(t,"k-handle-active"),t=this._state.range,this.set(t.from,t.to),this.trigger("selectEnd",this._rangeEventArgs(t)),delete this._state)},Ka.prototype._tap=function(t){var e=this.options,i=this.categoryAxis,o=this.chart._eventCoordinates(t),r=i.pointCategoryIndex(new Ut(o.x,i.box.y1)),n=this._index(e.from),s=this._index(e.to),a=this._index(e.min),p=this._index(e.max),h=s-n,o=n+h/2,e={},s=3===t.event.which,r=Math.round(o-r);this._state||s||(this.chart._unsetActivePoint(),i.options.justified||r--,e.from=Math.min(Math.max(a,n-r),p-h),e.to=Math.min(e.from+h,p),this._start(t),this._state&&(this._state.range=e,this.trigger("select",this._rangeEventArgs(e)),this._end()))},Ka.prototype._mousewheel=function(t){var e,i=this,o=gt(t);this._start({target:this.selection}),this._state&&(e=this._state.range,t.preventDefault(),t.stopPropagation(),1<Math.abs(o)&&(o*=3),this.options.mousewheel.reverse&&(o*=-1),this.expand(o)&&this.trigger("select",{axis:this.categoryAxis.options,delta:o,originalEvent:t,from:this._value(e.from),to:this._value(e.to)}),this._mwTimeout&&clearTimeout(this._mwTimeout),this._mwTimeout=setTimeout(function(){i._end()},150))},Ka.prototype._gesturestart=function(t){var e=this.options;this._state={range:{from:this._index(e.from),to:this._index(e.to)}};e=this._rangeEventArgs(this._state.range);this.trigger("selectStart",e)?this._state=null:t.preventDefault()},Ka.prototype._gestureend=function(){this._state&&(this.trigger("selectEnd",this._rangeEventArgs(this._state.range)),delete this._state)},Ka.prototype._gesturechange=function(t){var e=this.chart,i=this._state,o=this.options,r=this.categoryAxis,n=i.range,s=e._toModelCoordinates(t.touches[0].x.location).x,i=e._toModelCoordinates(t.touches[1].x.location).x,e=Math.min(s,i),i=Math.max(s,i);t.preventDefault(),n.from=r.pointCategoryIndex(new Ut(e))||o.min,n.to=r.pointCategoryIndex(new Ut(i))||o.max,this.move(n.from,n.to),this.trigger("select",this._rangeEventArgs(n))},Ka.prototype._index=function(t){var e=t;return t instanceof Date&&(e=this.categoryAxis.categoryIndex(t)),e},Ka.prototype._value=function(t){var e=t;return this._dateAxis&&(e=this.categoryAxis.categoryAt(t))>this.options.max&&(e=this.options.max),e},Ka.prototype._slot=function(t){var e=this.categoryAxis,t=this._index(t);return e.getSlot(t,t,!0)},Ka.prototype.move=function(t,e){var i=this.options,o=this.categoryAxis.options.reverse,r=i.offset,n=i.padding,s=i.selection.border,a=o?e:t,t=o?t:e,e="x"+(o?2:1),o=this._slot(a),a=Tt(o[e]-r.left+n.left);D(this.leftMask,{width:a}),D(this.selection,{left:a}),o=this._slot(t);r=Tt(i.width-(o[e]-r.left+n.left));D(this.rightMask,{width:r});n=i.width-r;n!==i.width&&(n+=s.right),D(this.rightMask,{left:n}),D(this.selection,{width:Math.max(i.width-(a+r)-s.right,0)})},Ka.prototype.set=function(t,e){var i=this.options,o=this._index(i.min),r=this._index(i.max),o=kt(this._index(t),o,r),r=kt(this._index(e),o+1,r);i.visible&&this.move(o,r),i.from=this._value(o),i.to=this._value(r)},Ka.prototype.expand=function(t){var e=this.options,i=this._index(e.min),o=this._index(e.max),r=e.mousewheel.zoom,n=this._index(e.from),s=this._index(e.to),a={from:n,to:s},e=L({},a);if(this._state&&(a=this._state.range),r!==k&&(a.from=kt(kt(n-t,0,s-1),i,o)),r!==S&&(a.to=kt(kt(s+t,a.from+1,o),i,o)),a.from!==e.from||a.to!==e.to)return this.set(a.from,a.to),!0},Ka.prototype.trigger=function(t,e){return(this.observer||this.chart).trigger(t,e)},Ka);function Ka(t,e,i,o){Za.call(this);var r=t.element;this.options=L({},this.options,i),this.chart=t,this.observer=o,this.chartElement=r,this.categoryAxis=e,this._dateAxis=this.categoryAxis instanceof ji,this.initOptions(),this.visible=this.options.visible&&r.offsetHeight,this.visible&&(this.createElements(),this.set(this._index(this.options.from),this._index(this.options.to)),this.bindEvents())}It(N,{visible:!0,mousewheel:{zoom:"both"},min:c,max:l});var $a,Ja,Qa=N,tp=((Ja=Y)&&(ip.__proto__=Ja),((ip.prototype=Object.create(Ja&&Ja.prototype)).constructor=ip).prototype.show=function(t){var e,i;!t||!t.tooltipAnchor||this._current&&this._current===t||(e=L({},this.options,t.options.tooltip),(i=t.tooltipAnchor())?(this._current=t,Ja.prototype.show.call(this,{point:t,anchor:i},e,t)):this.hide())},ip.prototype.hide=function(){delete this._current,Ja.prototype.hide.call(this)},ip),G=(($a=Y)&&(ep.__proto__=$a),((ep.prototype=Object.create($a&&$a.prototype)).constructor=ep).prototype.showAt=function(t,e){var i,o=at(t,function(t){t=t.series.tooltip;return!t||!1!==t.visible});0<o.length&&(i=o[0],o=this.plotArea.categoryAxis.getSlot(i.categoryIx),o=e?this._slotAnchor(e,o):this._defaultAnchor(i,o),this.show({anchor:o,shared:!0,points:t,category:i.category,categoryText:this.formatService.auto(this.options.categoryFormat,i.category),series:this.plotArea.series},this.options))},ep.prototype._slotAnchor=function(t,e){return this.plotArea.categoryAxis.options.vertical||(t.x=e.center().x),{point:t,align:{horizontal:"left",vertical:"center"}}},ep.prototype._defaultAnchor=function(t,e){var i=t.owner.pane.chartsBox(),t=this.plotArea.categoryAxis.options.vertical,i=i.center(),e=e.center();return{point:t?new Ut(i.x,e.y):new Ut(e.x,i.y),align:{horizontal:"center",vertical:"center"}}},ep);function ep(t,e){$a.call(this,t.chartService,e),this.plotArea=t,this.formatService=t.chartService.format}function ip(){Ja.apply(this,arguments)}It(G,{categoryFormat:"{0:d}"});var op,rp=G,$=((op=C.drawing.Animation)&&(np.__proto__=op),((np.prototype=Object.create(op&&op.prototype)).constructor=np).prototype.setup=function(){var t,e=this.element,i=this.options;e.bbox()?(this.origin=i.origin,t=i.vertical?m:v,(i=this.fromScale=new C.geometry.Point(1,1))[t]=Bo,e.transform(C.geometry.transform().scale(i.x,i.y))):this.abort()},np.prototype.step=function(t){var e=ct(this.fromScale.x,1,t),t=ct(this.fromScale.y,1,t);this.element.transform(C.geometry.transform().scale(e,t,this.origin))},np.prototype.abort=function(){op.prototype.abort.call(this),this.element.transform(null)},np);function np(){op.apply(this,arguments)}It($,{duration:600}),C.drawing.AnimationFactory.current.register(zo,$);var sp,K=((sp=C.drawing.Animation)&&(ap.__proto__=sp),((ap.prototype=Object.create(sp&&sp.prototype)).constructor=ap).prototype.setup=function(){var t=this.center=this.element.bbox().center();this.element.transform(C.geometry.transform().scale(Bo,Bo,t))},ap.prototype.step=function(t){this.element.transform(C.geometry.transform().scale(t,t,this.center))},ap);function ap(){sp.apply(this,arguments)}It(K,{easing:"easeOutElastic"}),C.drawing.AnimationFactory.current.register("bubble",K);var pp,N=((pp=C.drawing.Animation)&&(hp.__proto__=pp),((hp.prototype=Object.create(pp&&pp.prototype)).constructor=hp).prototype.setup=function(){this.fadeTo=this.element.opacity(),this.element.opacity(0)},hp.prototype.step=function(t){this.element.opacity(t*this.fadeTo)},hp);function hp(){pp.apply(this,arguments)}It(N,{duration:200,easing:"linear"}),C.drawing.AnimationFactory.current.register("fadeIn",N);var lp,Y=((lp=C.drawing.Animation)&&(cp.__proto__=lp),((cp.prototype=Object.create(lp&&lp.prototype)).constructor=cp).prototype.setup=function(){this.element.transform(C.geometry.transform().scale(Bo,Bo,this.options.center))},cp.prototype.step=function(t){this.element.transform(C.geometry.transform().scale(t,t,this.options.center))},cp);function cp(){lp.apply(this,arguments)}It(Y,{easing:"easeOutElastic",duration:600}),C.drawing.AnimationFactory.current.register(Do,Y);var up,dp=Y,G=((up=Rn)&&(gp.__proto__=up),((gp.prototype=Object.create(up&&up.prototype)).constructor=gp).prototype.render=function(){up.prototype.render.call(this),this.renderSegments()},gp.prototype.createSegment=function(t,e,i){return new("smooth"===e.style?xr:ur)(t,e,i)},gp.prototype.animationPoints=function(){return up.prototype.animationPoints.call(this).concat(this._segments)},gp.prototype.createMissingValue=function(t,e){if(e===Vo){t={x:t.x,y:t.y};return Pn(t.x)||(t.x=0),Pn(t.y)||(t.y=0),t}},gp);function gp(){up.apply(this,arguments)}L(G.prototype,W);var fp,yp=G,$=((fp=As)&&(vp.__proto__=fp),((vp.prototype=Object.create(fp&&fp.prototype)).constructor=vp).prototype.initFields=function(){this.namedXAxes={},this.namedYAxes={},this.xAxisRangeTracker=new Fr,this.yAxisRangeTracker=new Fr},vp.prototype.render=function(t){void 0===t&&(t=this.panes);for(var e=this.groupSeriesByPane(),i=0;i<t.length;i++){var o=t[i],r=e[o.options.name||"default"]||[];this.addToLegend(r);r=this.filterVisibleSeries(r);r&&(this.createScatterChart(ls(r,"scatter"),o),this.createScatterLineChart(ls(r,"scatterLine"),o),this.createBubbleChart(ls(r,"bubble"),o))}this.createAxes(t)},vp.prototype.appendChart=function(t,e){this.xAxisRangeTracker.update(t.xAxisRanges),this.yAxisRangeTracker.update(t.yAxisRanges),fp.prototype.appendChart.call(this,t,e)},vp.prototype.removeAxis=function(t){var e=t.options.name;fp.prototype.removeAxis.call(this,t),t.options.vertical?(this.yAxisRangeTracker.reset(e),delete this.namedYAxes[e]):(this.xAxisRangeTracker.reset(e),delete this.namedXAxes[e]),t===this.axisX&&delete this.axisX,t===this.axisY&&delete this.axisY},vp.prototype.seriesPaneName=function(t){var e=this.options,i=t.xAxis,o=at([].concat(e.xAxis),function(t){return t.name===i})[0],r=t.yAxis,t=at([].concat(e.yAxis),function(t){return t.name===r})[0],e=(e.panes||[{}])[0].name||"default";return(o||{}).pane||(t||{}).pane||e},vp.prototype.createScatterChart=function(t,e){0<t.length&&this.appendChart(new Rn(this,{series:t,clip:e.options.clip}),e)},vp.prototype.createScatterLineChart=function(t,e){0<t.length&&this.appendChart(new yp(this,{series:t,clip:e.options.clip}),e)},vp.prototype.createBubbleChart=function(t,e){0<t.length&&this.appendChart(new Ln(this,{series:t,clip:e.options.clip}),e)},vp.prototype.createXYAxis=function(t,e,i){for(var o,r=t.name,n=e?this.namedYAxes:this.namedXAxes,s=e?this.yAxisRangeTracker:this.xAxisRangeTracker,a=L({reverse:!e&&this.chartService.rtl},t,{vertical:e}),p=hs(a.type,"log"),h=s.query(),t=p?{min:.1,max:1}:{min:0,max:1},t=s.query(r)||h||t,l=[a.min,a.max],c=this.series,u=0;u<c.length;u++){var d=c[u],g=d[e?"yAxis":"xAxis"];if(g===a.name||0===i&&!g){d=Ro.current.bindPoint(d,0).valueFields;l.push(d[e?"y":"x"]);break}}0===i&&h&&(t.min=Math.min(t.min,h.min),t.max=Math.max(t.max,h.max));for(var f=0;f<l.length;f++)if(l[f]instanceof Date){o=!0;break}t=new(hs(a.type,y)||!a.type&&o?qi:p?Ki:Hi)(t.min,t.max,a,this.chartService);if(t.axisIndex=i,r){if(n[r])throw new Error((e?"Y":"X")+" axis with name "+r+" is already defined");n[r]=t}return this.appendAxis(t),t},vp.prototype.createAxes=function(t){for(var e=this.options,i=[].concat(e.xAxis),o=[],r=[].concat(e.yAxis),n=[],s=0;s<i.length;s++)lt(this.findPane(i[s].pane),t)&&o.push(this.createXYAxis(i[s],!1,s));for(var a=0;a<r.length;a++)lt(this.findPane(r[a].pane),t)&&n.push(this.createXYAxis(r[a],!0,a));this.axisX=this.axisX||o[0],this.axisY=this.axisY||n[0]},vp.prototype._dispatchEvent=function(t,e,i){for(var o=t._eventCoordinates(e),r=new Ut(o.x,o.y),n=this.axes,s=n.length,a=[],p=[],h=0;h<s;h++){var l=n[h],c=l.options.vertical?p:a,l=l.getValue(r);null!==l&&c.push(l)}0<a.length&&0<p.length&&t.trigger(i,{element:wt(e),originalEvent:e,x:ds(a),y:ds(p)})},vp.prototype.updateAxisOptions=function(t,e){var i=t.options.vertical,o=this.groupAxes(this.panes),t=(i?o.y:o.x).indexOf(t);mp(this.options,t,i,e),mp(this.originalOptions,t,i,e)},vp);function vp(){fp.apply(this,arguments)}function mp(t,e,i,o){L([].concat(i?t.yAxis:t.xAxis)[e],o)}It($,{xAxis:{},yAxis:{}}),L($.prototype,Ss);var xp,bp=$,K=((xp=se)&&(Ap.__proto__=xp),((Ap.prototype=Object.create(xp&&xp.prototype)).constructor=Ap).prototype.render=function(){var t,e,i=this.options.labels,o=this.owner.chartService,r=this.value;this._rendered||!1===this.visible||(this._rendered=!0,e=ot(i),t=this.pointData(),e?r=e(t):i.format&&(r=o.format.auto(i.format,r)),i.visible&&(r||0===r)&&(i.position===A||"insideEnd"===i.position?(i.color||(e=new C.Color(this.options.color).percBrightness(),i.color=180<e?a:p),i.background||(i.background=this.options.color)):(o=o.theme.seriesDefaults.labels,i.color=i.color||o.color,i.background=i.background||o.background),this.label=new Ce(r,L({},i,{align:A,vAlign:"",animation:{type:"fadeIn",delay:this.animationDelay}}),t),this.append(this.label)))},Ap.prototype.reflow=function(t){this.render(),this.box=t,this.reflowLabel()},Ap.prototype.reflowLabel=function(){var t,e,i,o,r=this.options.labels,n=this.label,s=this.sector.clone(),a=r.distance,p=s.middle();n&&(e=n.box.height(),i=n.box.width(),r.position===A?(s.radius=Math.abs((s.radius-e)/2)+e,t=s.point(p),n.reflow(new qt(t.x,t.y-e/2,t.x,t.y))):"insideEnd"===r.position?(s.radius=s.radius-e/2,t=s.point(p),n.reflow(new qt(t.x,t.y-e/2,t.x,t.y))):((t=s.clone().expand(a).point(p)).x>=s.center.x?(o=t.x+i,n.orientation=k):(o=t.x-i,n.orientation=S),n.reflow(new qt(o,t.y-e,t.x,t.y))))},Ap.prototype.createVisual=function(){var t,e=this,i=this.sector,o=this.options;xp.prototype.createVisual.call(this),this.value&&(o.visual?(t=(i.startAngle+180)%360,(o=o.visual({category:this.category,dataItem:this.dataItem,value:this.value,series:this.series,percentage:this.percentage,center:new C.geometry.Point(i.center.x,i.center.y),radius:i.radius,innerRadius:i.innerRadius,startAngle:t,endAngle:t+i.angle,options:o,sender:this.getSender(),createVisual:function(){var t=new C.drawing.Group;return e.createSegmentVisual(t),t}}))&&this.visual.append(o)):this.createSegmentVisual(this.visual))},Ap.prototype.createSegmentVisual=function(t){var e=this.sector,i=this.options,o=i.border||{},r=0<o.width?{stroke:{color:o.color,width:o.width,opacity:o.opacity,dashType:o.dashType}}:{},n=i.color,o={color:n,opacity:i.opacity},r=this.createSegment(e,L({fill:o,stroke:{opacity:i.opacity},zIndex:i.zIndex},r));t.append(r),qr(i)&&t.append(this.createGradientOverlay(r,{baseColor:n,fallbackFill:o},L({center:[e.center.x,e.center.y],innerRadius:e.innerRadius,radius:e.radius,userSpace:!0},i.overlay)))},Ap.prototype.createSegment=function(t,e){return e.singleSegment?new C.drawing.Circle(new C.geometry.Circle(new C.geometry.Point(t.center.x,t.center.y),t.radius),e):oe.current.createRing(t,e)},Ap.prototype.createAnimation=function(){var t=this.options,e=this.sector.center;L(t,{animation:{center:[e.x,e.y],delay:this.animationDelay}}),xp.prototype.createAnimation.call(this)},Ap.prototype.createHighlight=function(t){var e=this.options.highlight||{},i=e.border||{};return this.createSegment(this.sector,L({},t,{fill:{color:e.color,opacity:e.opacity},stroke:{opacity:i.opacity,width:i.width,color:i.color}}))},Ap.prototype.highlightVisual=function(){return this.visual.children[0]},Ap.prototype.highlightVisualArgs=function(){var t=this.sector;return{options:this.options,radius:t.radius,innerRadius:t.innerRadius,center:new C.geometry.Point(t.center.x,t.center.y),startAngle:t.startAngle,endAngle:t.angle+t.startAngle,visual:this.visual}},Ap.prototype.tooltipAnchor=function(){var t=this.sector.clone().expand(5),e=t.middle();return{point:t.point(e),align:(t=Ct(e+180),e=Tt(Math.sin(t),f),t=Tt(Math.cos(t),f),{horizontal:Math.abs(e)>wp?A:t<0?k:S,vertical:Math.abs(e)<_p?A:e<0?w:P})}},Ap.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Ap.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,series:this.series,percentage:this.percentage}},Ap),_p=Tt(Ct(30),f),wp=Tt(Ct(60),f);function Ap(t,e,i){xp.call(this,i),this.value=t,this.sector=e}It(K,{color:p,overlay:{gradient:"roundedBevel"},border:{width:.5},labels:{visible:!1,distance:35,font:"12px sans-serif",margin:U(.5),align:u,zIndex:1,position:"outsideEnd"},animation:{type:Do},highlight:{visible:!0,border:{width:1}},visible:!0}),L(K.prototype,ar);var Sp,kp=K,Pp={createLegendItem:function(t,e,i){var o,r,n=this.options.legend||{},s=n.labels||{},a=n.inactiveItems||{},p=a.labels||{};i&&!1!==i.visibleInLegend&&(n=!(r=!1!==i.visible)&&ot(p)||ot(s),s=i.category,n&&(s=n({text:s,series:i.series,dataItem:i.dataItem,percentage:i.percentage,value:t})),a=r?(o={},e.color):(o={color:p.color,font:p.font},(a.markers||{}).color),Pn(s)&&""!==s&&this.legendItems.push({active:r,pointIndex:i.index,text:s,series:i.series,markerColor:a,labels:o}))}},N=((Sp=se)&&(Cp.__proto__=Sp),((Cp.prototype=Object.create(Sp&&Sp.prototype)).constructor=Cp).prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},Cp.prototype.traverseDataPoints=function(t){var e=this.options,i=this.plotArea.options.seriesColors;void 0===i&&(i=[]);for(var o=i.length,r=e.series,n=r.length,s=0;s<n;s++){var a=r[s],p=a.data,h=ps(a),l=h.total,c=h.points,h=h.count,u=360/l,d=void 0;isFinite(u)||(d=360/h);var g=void 0,g=(mt(a.startAngle)?a:e).startAngle;s!==n-1&&"outsideEnd"===a.labels.position&&(a.labels.position=A);for(var f=0;f<c.length;f++){var y,v,m,x,b,_=c[f];_&&(y=_.fields,v=_.value,m=_.visible,x=0!==v?d||v*u:0,b=1!==p.length&&Boolean(y.explode),j(a.color)||(a.color=y.color||i[f%o]),t(_.valueFields.value,new $t(null,0,0,g,x),{owner:this,category:mt(y.category)?y.category:"",index:f,series:a,seriesIx:s,dataItem:p[f],percentage:0!==l?v/l:0,explode:b,visibleInLegend:y.visibleInLegend,visible:m,zIndex:n-s,animationDelay:this.animationDelay(f,s,n)}),!1!==m&&(g+=x))}}},Cp.prototype.evalSegmentOptions=function(t,e,i){var o=i.series;er(t,{value:e,series:o,dataItem:i.dataItem,category:i.category,percentage:i.percentage},{defaults:o._defaults,excluded:["data","content","template","visual","toggle"]})},Cp.prototype.addValue=function(t,e,i){var o=L({},i.series,{index:i.index});this.evalSegmentOptions(o,t,i),this.createLegendItem(t,o,i),!1!==i.visible&&(o=new kp(t,e,o),Object.assign(o,i),this.append(o),this.points.push(o))},Cp.prototype.reflow=function(t){var e=this.options,i=this.points,o=this.seriesConfigs;void 0===o&&(o=[]);var r=i.length,n=t.clone(),s=Math.min(n.width(),n.height()),a=s/2,p=s-.85*s,h=new qt(n.x1,n.y1,n.x1+s,n.y1+s),s=h.center(),n=n.center(),l=e.series.length,c=[],u=[],p=Rt(e.padding,p);this.targetBox=t,p=a-5<p?a-5:p,h.translate(n.x-s.x,n.y-s.y);for(var d=a-p,g=new Ut(d+h.x1+p,d+h.y1+p),f=0;f<r;f++){var y,v=i[f],m=v.sector,x=v.seriesIx;m.radius=d,m.center=g,o.length&&(y=o[x],m.innerRadius=y.innerRadius,m.radius=y.radius),x===l-1&&v.explode&&(m.center=m.clone().setRadius(.15*m.radius).point(m.middle())),v.reflow(h);v=v.label;v&&"outsideEnd"===v.options.position&&x===l-1&&(v.orientation===k?u:c).push(v)}0<c.length&&(c.sort(this.labelComparator(!0)),this.leftLabelsReflow(c)),0<u.length&&(u.sort(this.labelComparator(!1)),this.rightLabelsReflow(u)),this.box=h},Cp.prototype.leftLabelsReflow=function(t){var e=this.distanceBetweenLabels(t);this.distributeLabels(e,t)},Cp.prototype.rightLabelsReflow=function(t){var e=this.distanceBetweenLabels(t);this.distributeLabels(e,t)},Cp.prototype.distanceBetweenLabels=function(t){var e=St(this.points),i=e.sector,o=t.length-1,e=i.radius+e.options.labels.distance,r=[],n=t[0].box,s=Tt(n.y1-(i.center.y-e-n.height()-n.height()/2));r.push(s);for(var a=0;a<o;a++){var p=t[a+1].box,n=t[a].box,s=Tt(p.y1-n.y2);r.push(s)}return s=Tt(i.center.y+e-t[o].box.y2-t[o].box.height()/2),r.push(s),r},Cp.prototype.distributeLabels=function(t,e){for(var i,o,r,n=t.length,s=0;s<n;s++)for(r=-t[s],i=o=s;0<r&&(0<=i||o<n);)r=this._takeDistance(t,s,--i,r),r=this._takeDistance(t,s,++o,r);this.reflowLabels(t,e)},Cp.prototype._takeDistance=function(t,e,i,o){var r=o;return 0<t[i]&&(r-=o=Math.min(t[i],r),t[i]-=o,t[e]+=o),r},Cp.prototype.reflowLabels=function(t,e){var i,o=St(this.points),r=o.sector,n=o.options.labels,s=e.length,a=n.distance,p=r.center.y-(r.radius+a)-e[0].box.height();t[0]+=2;for(var h=0;h<s;h++){var l=e[h],c=l.box;p+=t[h],i=this.hAlignLabel(c.x2,r.clone().expand(a),p,p+c.height(),l.orientation===k),l.orientation===k?(n.align!==u&&(i=r.radius+r.center.x+a),l.reflow(new qt(i+c.width(),p,i,p))):(n.align!==u&&(i=r.center.x-r.radius-a),l.reflow(new qt(i-c.width(),p,i,p))),p+=c.height()}},Cp.prototype.createVisual=function(){var t=this.options.connectors,e=this.points,i=e.length;Sp.prototype.createVisual.call(this),this._connectorLines=[];for(var o=0;o<i;o++){var r,n,s,a,p,h,l,c=e[o],u=c.sector,d=c.label,g=u.middle(),f=(c.options.connectors||{}).color||t.color;d&&(r=new C.drawing.Path({stroke:{color:f,width:t.width},animation:{type:"fadeIn",delay:c.animationDelay}}),"outsideEnd"===d.options.position&&(n=d.box,s=u.center,l=u.point(g),a=new Ut(n.x1,n.center().y),f=h=p=void 0,l=u.clone().expand(t.padding).point(g),r.moveTo(l.x,l.y),d.orientation===k?(f=Tp(s,l,a,h=new Ut(n.x1-t.padding,n.center().y)),a=new Ut(h.x-4,h.y),(f=f||a).x=Math.min(f.x,a.x),this.pointInCircle(f,u.center,u.radius+4)||f.x<u.center.x?(p=u.center.x+u.radius+4,c.options.labels.align===Eo||p<a.x?r.lineTo(p,l.y):r.lineTo(l.x+8,l.y),r.lineTo(a.x,h.y)):(f.y=h.y,r.lineTo(f.x,f.y))):(f=Tp(s,l,a,h=new Ut(n.x2+t.padding,n.center().y)),a=new Ut(h.x+4,h.y),(f=f||a).x=Math.max(f.x,a.x),this.pointInCircle(f,u.center,u.radius+4)||f.x>u.center.x?(p=u.center.x-u.radius-4,c.options.labels.align===Eo||p>a.x?r.lineTo(p,l.y):r.lineTo(l.x-8,l.y),r.lineTo(a.x,h.y)):(f.y=h.y,r.lineTo(f.x,f.y))),r.lineTo(h.x,h.y),this._connectorLines.push(r),this.visual.append(r)))}},Cp.prototype.renderVisual=function(){var t,e,i,o;Sp.prototype.renderVisual.call(this),Bt(this.options.series,function(t){return t.autoFit})&&(t=this.targetBox,e=this.box.center(),(i=this.visual.bbox())&&(o=i.bottomRight(),(o=Math.min((e.y-t.y1)/(e.y-i.origin.y),(t.y2-e.y)/(o.y-e.y),(e.x-t.x1)/(e.x-i.origin.x),(t.x2-e.x)/(o.x-e.x)))<1&&this.visual.transform(C.geometry.transform().scale(o,o,[e.x,e.y]))))},Cp.prototype.labelComparator=function(t){var i=t?-1:1;return function(t,e){return((t.parent.sector.middle()+270)%360-(e.parent.sector.middle()+270)%360)*i}},Cp.prototype.hAlignLabel=function(t,e,i,o,r){var n=e.radius,s=e.center,e=s.x,s=s.y,o=Math.min(Math.abs(s-i),Math.abs(s-o));return n<o?t:e+Math.sqrt(n*n-o*o)*(r?1:-1)},Cp.prototype.pointInCircle=function(t,e,i){return Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)<Math.pow(i,2)},Cp.prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value)},Cp.prototype.animationDelay=function(t){return 70*t},Cp.prototype.stackRoot=function(){return this},Cp);function Cp(t,e){Sp.call(this,e),this.plotArea=t,this.chartService=t.chartService,this.points=[],this.legendItems=[],this.render()}function Tp(t,e,i,o){var r,n=(o.x-i.x)*(t.y-i.y)-(o.y-i.y)*(t.x-i.x),i=(o.y-i.y)*(e.x-t.x)-(o.x-i.x)*(e.y-t.y);return 0!=i&&(r=n/i,r=new Ut(t.x+r*(e.x-t.x),t.y+r*(e.y-t.y))),r}It(N,{startAngle:90,connectors:{width:2,color:"#939393",padding:8},inactiveItems:{markers:{},labels:{}}}),L(N.prototype,Pp),N.prototype.isStackRoot=!0;var Mp,Rp,Op=N,Ip=((Rp=As)&&(Bp.__proto__=Rp),((Bp.prototype=Object.create(Rp&&Rp.prototype)).constructor=Bp).prototype.render=function(){this.createPieChart(this.series)},Bp.prototype.createPieChart=function(t){var e=t[0],e=new Op(this,{series:t,padding:e.padding,startAngle:e.startAngle,connectors:e.connectors,legend:this.options.legend});this.appendChart(e)},Bp.prototype.appendChart=function(t,e){Rp.prototype.appendChart.call(this,t,e),yt(this.options.legend.items,t.legendItems)},Bp),Y=((Mp=kp)&&(jp.__proto__=Mp),((jp.prototype=Object.create(Mp&&Mp.prototype)).constructor=jp).prototype.reflowLabel=function(){var t,e=this.options.labels,i=this.label,o=this.sector.clone(),r=o.middle();i&&(t=i.box.height(),e.position===A?(o.radius-=(o.radius-o.innerRadius)/2,r=o.point(r),i.reflow(new qt(r.x,r.y-t/2,r.x,r.y))):Mp.prototype.reflowLabel.call(this))},jp.prototype.createSegment=function(t,e){return oe.current.createRing(t,e)},jp);function jp(){Mp.apply(this,arguments)}function Bp(){Rp.apply(this,arguments)}It(Y,{overlay:{gradient:"roundedGlass"},labels:{position:A},animation:{type:Do}}),L(Y.prototype,ar);var Vp,Lp=Y,W=((Vp=Op)&&(zp.__proto__=Vp),((zp.prototype=Object.create(Vp&&Vp.prototype)).constructor=zp).prototype.addValue=function(t,e,i){var o=L({},i.series,{index:i.index});this.evalSegmentOptions(o,t,i),this.createLegendItem(t,o,i),t&&!1!==i.visible&&(o=new Lp(t,e,o),Object.assign(o,i),this.append(o),this.points.push(o))},zp.prototype.reflow=function(t){for(var e,i=this.options,o=t.clone(),r=Math.min(o.width(),o.height()),o=r/2,r=r-.85*r,n=i.series,s=n.length,r=Rt(i.padding,r),a=o-(r=o-5<r?o-5:r),p=0,h=0;h<s;h++){var l=n[h];0===h&&mt(l.holeSize)&&(e=l.holeSize,a-=l.holeSize),mt(l.size)?a-=l.size:p++,mt(l.margin)&&h!==s-1&&(a-=l.margin)}mt(e)||(a-=e=(o-r)/(s+.75)*.75);var c=e,u=0;this.seriesConfigs=[];for(var d=0;d<s;d++){var g=n[d],f=(c+=u)+Rt(g.size,a/p);this.seriesConfigs.push({innerRadius:c,radius:f}),u=g.margin||0,c=f}Vp.prototype.reflow.call(this,t)},zp.prototype.animationDelay=function(t,e,i){return 50*t+600*(e+1)/(i+1)},zp);function zp(){Vp.apply(this,arguments)}It(W,{startAngle:90,connectors:{width:2,color:"#939393",padding:8}});var Ep,Fp,Dp,Up=W,Hp=((Dp=Ip)&&(qp.__proto__=Dp),((qp.prototype=Object.create(Dp&&Dp.prototype)).constructor=qp).prototype.render=function(){this.createDonutChart(this.series)},qp.prototype.createDonutChart=function(t){var e=t[0],e=new Up(this,{series:t,padding:e.padding,connectors:e.connectors,legend:this.options.legend});this.appendChart(e)},qp),G=((Fp=As)&&(Np.__proto__=Fp),((Np.prototype=Object.create(Fp&&Fp.prototype)).constructor=Np).prototype.initFields=function(){this.valueAxisRangeTracker=new Fr},Np.prototype.render=function(){this.addToLegend(this.series),this.createPolarAxis(),this.createCharts(),this.createValueAxis()},Np.prototype.alignAxes=function(){var t=this.valueAxis,e=t.range(),i=t.options.reverse?e.max:e.min,e=t.getSlot(i),i=this.polarAxis.getSlot(0).center,e=t.box.translate(i.x-e.x1,i.y-e.y1);t.reflow(e)},Np.prototype.createValueAxis=function(){var t,e=this.valueAxisRangeTracker,i=e.query(),o=this.valueAxisOptions({roundToMajorUnit:!1,zIndex:-1}),r="log"===o.type?(t=po,{min:.1,max:1}):(t=so,{min:0,max:1}),r=e.query(name)||i||r;r&&i&&(r.min=Math.min(r.min,i.min),r.max=Math.max(r.max,i.max));o=new t(r.min,r.max,o,this.chartService);this.valueAxis=o,this.appendAxis(o)},Np.prototype.reflowAxes=function(){var t=this.options.plotArea,e=this.valueAxis,i=this.polarAxis,o=this.box,r=.15*Math.min(o.width(),o.height()),r=U(t.padding||{},r),o=o.clone().unpad(r),r=o.clone();r.y2=r.y1+Math.min(r.width(),r.height()),r.align(o,m,A);o=r.clone().shrink(0,r.height()/2);i.reflow(r),e.reflow(o);o=e.lineBox().height()-e.box.height();e.reflow(e.box.unpad({top:o})),this.axisBox=r,this.alignAxes(r)},Np.prototype.backgroundBox=function(){return this.box},Np.prototype.detachLabels=function(){},Np),$=((Ep=Rn)&&(Gp.__proto__=Ep),((Gp.prototype=Object.create(Ep&&Ep.prototype)).constructor=Gp).prototype.pointSlot=function(t,e){e=t.center.y-e.y1,e=Ut.onCircle(t.center,t.startAngle,e);return new qt(e.x,e.y,e.x,e.y)},Gp);function Gp(){Ep.apply(this,arguments)}function Np(){Fp.apply(this,arguments)}function qp(){Dp.apply(this,arguments)}It($,{clip:!1});var Xp,Yp=$,K=((Xp=yp)&&(Wp.__proto__=Xp),(Wp.prototype=Object.create(Xp&&Xp.prototype)).constructor=Wp);function Wp(){Xp.apply(this,arguments)}K.prototype.pointSlot=Yp.prototype.pointSlot,It(K,{clip:!1});var Zp,Kp,$p=K,Jp=((Kp=zr)&&(eh.__proto__=Kp),((eh.prototype=Object.create(Kp&&Kp.prototype)).constructor=eh).prototype.fillToAxes=function(t){var e=this._polarAxisCenter();t.lineTo(e.x,e.y)},eh.prototype._polarAxisCenter=function(){return this.parent.plotArea.polarAxis.box.center()},eh.prototype.strokeSegments=function(){var t,e,i,o=this._strokeSegments;return o||(t=this._polarAxisCenter(),e=new uo(!1),(i=this.points()).push(t),(o=this._strokeSegments=e.process(i)).pop()),o},eh),Qp=((Zp=Mr)&&(th.__proto__=Zp),((th.prototype=Object.create(Zp&&Zp.prototype)).constructor=th).prototype.fillToAxes=function(t){var e=this.parent.plotArea.polarAxis.box.center(),e=new C.geometry.Segment([e.x,e.y]);t.segments.unshift(e),t.segments.push(e)},th);function th(){Zp.apply(this,arguments)}function eh(){Kp.apply(this,arguments)}function ih(t,e){return t.value.x-e.value.x}var oh,rh,nh=((rh=$p)&&(ah.__proto__=rh),((ah.prototype=Object.create(rh&&rh.prototype)).constructor=ah).prototype.createSegment=function(t,e,i){return new("smooth"===(e.line||{}).style?Jp:Qp)(t,e,i)},ah.prototype.createMissingValue=function(t,e){var i;return Pn(t.x)&&e!==Lo&&(i={x:t.x,y:t.y},e===Vo&&(i.y=0)),i},ah.prototype.seriesMissingValues=function(t){return t.missingValues||Vo},ah.prototype._hasMissingValuesGap=function(){for(var t=this.options.series,e=0;e<t.length;e++)if("gap"===this.seriesMissingValues(t[e]))return!0},ah.prototype.sortPoints=function(t){if(t.sort(ih),this._hasMissingValuesGap())for(var e=0;e<t.length;e++){var i=t[e];i&&(Pn(i.value.y)||"gap"!==this.seriesMissingValues(i.series)||delete t[e])}return t},ah),N=((oh=G)&&(sh.__proto__=oh),((sh.prototype=Object.create(oh&&oh.prototype)).constructor=sh).prototype.createPolarAxis=function(){var t=new eo(this.options.xAxis,this.chartService);this.polarAxis=t,this.axisX=t,this.appendAxis(t)},sh.prototype.valueAxisOptions=function(t){return L(t,{majorGridLines:{type:d},minorGridLines:{type:d}},this.options.yAxis)},sh.prototype.createValueAxis=function(){oh.prototype.createValueAxis.call(this),this.axisY=this.valueAxis},sh.prototype.appendChart=function(t,e){this.valueAxisRangeTracker.update(t.yAxisRanges),As.prototype.appendChart.call(this,t,e)},sh.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createLineChart(ls(t,["polarLine"]),e),this.createScatterChart(ls(t,["polarScatter"]),e),this.createAreaChart(ls(t,["polarArea"]),e)},sh.prototype.createLineChart=function(t,e){0!==t.length&&(t=new $p(this,{series:t}),this.appendChart(t,e))},sh.prototype.createScatterChart=function(t,e){0!==t.length&&(t=new Yp(this,{series:t}),this.appendChart(t,e))},sh.prototype.createAreaChart=function(t,e){0!==t.length&&(t=new nh(this,{series:t}),this.appendChart(t,e))},sh.prototype._dispatchEvent=function(t,e,i){var o=t._eventCoordinates(e),r=new Ut(o.x,o.y),o=this.axisX.getValue(r),r=this.axisY.getValue(r);null!==o&&null!==r&&t.trigger(i,{element:wt(e),x:o,y:r})},sh.prototype.createCrosshairs=function(){},sh);function sh(){oh.apply(this,arguments)}function ah(){rh.apply(this,arguments)}It(N,{xAxis:{},yAxis:{}}),L(N.prototype,Ss);var ph,Y=N,W=((ph=Tr)&&(hh.__proto__=ph),((hh.prototype=Object.create(ph&&ph.prototype)).constructor=hh).prototype.pointSlot=function(t,e){e=t.center.y-e.y1,e=Ut.onCircle(t.center,t.middle(),e);return new qt(e.x,e.y,e.x,e.y)},hh.prototype.renderSegments=function(){if(ph.prototype.renderSegments.call(this),this._segments&&1<this._segments.length)for(var t=function(t){for(var e=[],i=0;i<t.length;i++){var o=t[i];e[o.seriesIx]=e[o.seriesIx]||[],e[o.seriesIx].push(o)}return e}(this._segments),e=0;e<t.length;e++){var i,o,r,n=t[e];n&&1<n.length&&(i=n[0].linePoints[0],o=St(n),r=St(o.linePoints),o=0===i.categoryIx,r=r.categoryIx===r.categoriesCount-1,o&&r&&St(n).linePoints.push(i))}},hh.prototype.createSegment=function(t,e,i){var o=new("smooth"===e.style?xr:ur)(t,e,i),i=this.seriesMissingValues(e);return t.length!==e.data.length&&i!==Lo||(o.options.closed=!0),o},hh);function hh(){ph.apply(this,arguments)}It(W,{clip:!1,limitPoints:!1});var lh,ch,uh,dh,gh=W,fh=((dh=zr)&&(_h.__proto__=dh),((_h.prototype=Object.create(dh&&dh.prototype)).constructor=_h).prototype.fillToAxes=function(){},_h),yh=((uh=Mr)&&(bh.__proto__=uh),((bh.prototype=Object.create(uh&&uh.prototype)).constructor=bh).prototype.fillToAxes=function(){},bh),vh=((ch=gh)&&(xh.__proto__=ch),((xh.prototype=Object.create(ch&&ch.prototype)).constructor=xh).prototype.createSegment=function(t,e,i,o){var r,n,s,a=this.options.isStacked,p=(e.line||{}).style;return a&&0<i&&o&&(n=o.linePoints.slice(0),r=o),"smooth"===p?(s=new fh(t,e,i,r,n)).options.closed=!0:(t.push(t[0]),s=new yh(t,e,i,r,n)),s},xh.prototype.seriesMissingValues=function(t){return t.missingValues||Vo},xh),$=((lh=Lp)&&(mh.__proto__=lh),(mh.prototype=Object.create(lh&&lh.prototype)).constructor=mh);function mh(t,e){lh.call(this,t,null,e)}function xh(){ch.apply(this,arguments)}function bh(){uh.apply(this,arguments)}function _h(){dh.apply(this,arguments)}It($,{overlay:{gradient:"none"},labels:{distance:10}});var wh,Ah=$,K=((wh=se)&&(Sh.__proto__=wh),((Sh.prototype=Object.create(wh&&wh.prototype)).constructor=Sh).prototype.reflow=function(i){var t=this.options,e=this.children,o=t.gap,r=t.spacing,t=e.length,t=t+o+r*(t-1),n=i.angle/t,s=i.startAngle+o/2*n;this.forEach(e,function(t){var e=i.clone();e.startAngle=s,e.angle=n,t.sector&&(e.radius=t.sector.radius),t.reflow(e),t.sector=e,s+=n+n*r})},Sh);function Sh(t){wh.call(this,t),this.forEach=t.rtl?Kr:Zr}It(K,{gap:1,spacing:0});var kh,Ph,Ch=K,Th=((Ph=se)&&(Rh.__proto__=Ph),((Rh.prototype=Object.create(Ph&&Ph.prototype)).constructor=Rh).prototype.reflow=function(t){var e=this.options.reverse,i=this.children,o=i.length,r=e?o-1:0,n=e?-1:1;this.box=new qt;for(var s=r;0<=s&&s<o;s+=n){var a=i[s].sector;a.startAngle=t.startAngle,a.angle=t.angle}},Rh),N=((kh=an)&&(Mh.__proto__=kh),((Mh.prototype=Object.create(kh&&kh.prototype)).constructor=Mh).prototype.pointType=function(){return Ah},Mh.prototype.clusterType=function(){return Ch},Mh.prototype.stackType=function(){return Th},Mh.prototype.categorySlot=function(t,e){return t.getSlot(e)},Mh.prototype.pointSlot=function(t,e){var i=t.clone(),t=t.center.y;return i.radius=t-e.y1,i.innerRadius=t-e.y2,i},Mh.prototype.reflowPoint=function(t,e){t.sector=e,t.reflow()},Mh.prototype.createAnimation=function(){this.options.animation.center=this.box.toRect().center(),kh.prototype.createAnimation.call(this)},Mh);function Mh(){kh.apply(this,arguments)}function Rh(){Ph.apply(this,arguments)}N.prototype.reflow=sr.prototype.reflow,It(N,{clip:!1,limitPoints:!1,animation:{type:"pie"}});var Oh,Ih=N,W=((Oh=G)&&(jh.__proto__=Oh),((jh.prototype=Object.create(Oh&&Oh.prototype)).constructor=jh).prototype.createPolarAxis=function(){var t=new Qi(this.options.categoryAxis,this.chartService);this.polarAxis=t,this.categoryAxis=t,this.appendAxis(t),this.aggregateCategories(),this.createCategoryAxesLabels()},jh.prototype.valueAxisOptions=function(t){return this._hasBarCharts&&L(t,{majorGridLines:{type:d},minorGridLines:{type:d}}),this._isStacked100&&L(t,{roundToMajorUnit:!1,labels:{format:"P0"}}),L(t,this.options.valueAxis)},jh.prototype.aggregateCategories=function(){ma.prototype.aggregateCategories.call(this,this.panes)},jh.prototype.createCategoryAxesLabels=function(){ma.prototype.createCategoryAxesLabels.call(this,this.panes)},jh.prototype.filterSeries=function(t){return t},jh.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createAreaChart(ls(t,["radarArea"]),e),this.createLineChart(ls(t,["radarLine"]),e),this.createBarChart(ls(t,["radarColumn"]),e)},jh.prototype.chartOptions=function(t){var e={series:t},i=t[0];return i&&(t=this.filterVisibleSeries(t),i=i.stack,e.isStacked=i&&1<t.length,e.isStacked100=i&&"100%"===i.type&&1<t.length,e.isStacked100&&(this._isStacked100=!0)),e},jh.prototype.createAreaChart=function(t,e){0!==t.length&&(t=new vh(this,this.chartOptions(t)),this.appendChart(t,e))},jh.prototype.createLineChart=function(t,e){0!==t.length&&(t=new gh(this,this.chartOptions(t)),this.appendChart(t,e))},jh.prototype.createBarChart=function(t,e){var i;0!==t.length&&(i=t[0],(t=this.chartOptions(t)).gap=i.gap,t.spacing=i.spacing,t=new Ih(this,t),this.appendChart(t,e),this._hasBarCharts=!0)},jh.prototype.seriesCategoryAxis=function(){return this.categoryAxis},jh.prototype._dispatchEvent=function(t,e,i){var o=t._eventCoordinates(e),r=new Ut(o.x,o.y),o=this.categoryAxis.getCategory(r),r=this.valueAxis.getValue(r);null!==o&&null!==r&&t.trigger(i,{element:wt(e),category:o,value:r})},jh.prototype.createCrosshairs=function(){},jh);function jh(){Oh.apply(this,arguments)}L(W.prototype,Ss,{appendChart:ma.prototype.appendChart,aggregateSeries:ma.prototype.aggregateSeries,seriesSourcePoints:ma.prototype.seriesSourcePoints}),It(W,{categoryAxis:{categories:[]},valueAxis:{}});var Bh,$=W,K=((Bh=se)&&(Vh.__proto__=Bh),((Vh.prototype=Object.create(Bh&&Bh.prototype)).constructor=Vh).prototype.reflow=function(t){var e=this.points,i=this.children[0];this.box=new qt(e[0].x,e[0].y,e[1].x,e[2].y),i&&i.reflow(new qt(t.x1,e[0].y,t.x2,e[2].y))},Vh.prototype.createVisual=function(){var t=this,e=this.options;Bh.prototype.createVisual.call(this),(e=e.visual?e.visual({category:this.category,dataItem:this.dataItem,value:this.value,series:this.series,percentage:this.percentage,points:this.points,options:e,sender:this.getSender(),createVisual:function(){return t.createPath()}}):this.createPath())&&this.visual.append(e)},Vh.prototype.createPath=function(){var t=this.options,e=t.border;return C.drawing.Path.fromPoints(this.points,{fill:{color:t.color,opacity:t.opacity},stroke:{color:e.color,opacity:e.opacity,width:e.width}}).close()},Vh.prototype.createHighlight=function(t){return C.drawing.Path.fromPoints(this.points,t)},Vh.prototype.highlightVisual=function(){return this.visual.children[0]},Vh.prototype.highlightVisualArgs=function(){var t=C.drawing.Path.fromPoints(this.points).close();return{options:this.options,path:t}},Vh.prototype.tooltipAnchor=function(){var t=this.box;return{point:new Ut(t.center().x,t.y1),align:{horizontal:"center",vertical:"top"}}},Vh.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Vh);function Vh(t,e,i){Bh.call(this,e),this.value=t,this.options.index=i.index}It(K,{color:p,border:{width:1}}),L(K.prototype,ar);var Lh,zh=K,N=((Lh=se)&&(Eh.__proto__=Lh),((Eh.prototype=Object.create(Lh&&Lh.prototype)).constructor=Eh).prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value)},Eh.prototype.render=function(){var t=this.options,e=this.plotArea.options.seriesColors;void 0===e&&(e=[]);var i=t.series[0],o=i.data;if(o)for(var t=ps(i),r=t.total,n=t.points,s=0;s<n.length;s++){var a,p,h=n[s];h&&(p=h.fields,j(i.color)||(i.color=p.color||e[s%e.length]),p=L({index:s,owner:this,series:i,dataItem:o[s],percentage:h.value/r},p,{visible:h.visible}),a=h.valueFields.value,h=this.createSegment(a,p),p=this.createLabel(a,p),h&&p&&h.append(p))}},Eh.prototype.evalSegmentOptions=function(t,e,i){var o=i.series;er(t,{value:e,series:o,dataItem:i.dataItem,index:i.index},{defaults:o._defaults,excluded:["data","content","template","toggle","visual"]})},Eh.prototype.createSegment=function(t,e){var i=L({},e.series);if(this.evalSegmentOptions(i,t,e),this.createLegendItem(t,i,e),!1!==e.visible){i=new zh(t,i,e);return Object.assign(i,e),this.append(i),this.points.push(i),i}},Eh.prototype.createLabel=function(t,e){var i=e.series,o=e.dataItem,r=L({},this.options.labels,i.labels),n=t;if(r.visible){var s=ot(r),o={dataItem:o,value:t,percentage:e.percentage,category:e.category,series:i};s?n=s(o):r.format&&(n=this.plotArea.chartService.format.auto(r.format,n)),r.color||(s=new C.Color(i.color).percBrightness(),r.color=180<s?a:p,r.background||(r.background=i.color)),this.evalSegmentOptions(r,t,e);o=new Ce(n,L({vAlign:r.position},r),o);return this.labels.push(o),o}},Eh.prototype.labelPadding=function(){for(var t=this.labels,e={left:0,right:0},i=0;i<t.length;i++){var o,r=t[i].options.align;r!==A&&(o=t[i].box.width(),r===S?e.left=Math.max(e.left,o):e.right=Math.max(e.right,o))}return e},Eh.prototype.dynamicSlopeReflow=function(t,e,i){for(var o=this.options,r=this.points,n=r.length,s=r[0],a=s,p=0;p<r.length;p++)r[p].percentage>a.percentage&&(a=r[p]);for(var h=s.percentage/a.percentage*e,l=(e-h)/2,c=0,u=0;u<n;u++){var d=r[u].percentage,g=r[u+1],f=g?g.percentage:d,y=r[u].points=[],v=o.dynamicHeight?i*d:i/n,g=kt(d?(e-h*(f/d))/2:f?0:e/2,0,e);y.push(new C.geometry.Point(t.x1+l,t.y1+c)),y.push(new C.geometry.Point(t.x1+e-l,t.y1+c)),y.push(new C.geometry.Point(t.x1+e-g,t.y1+v+c)),y.push(new C.geometry.Point(t.x1+g,t.y1+v+c)),l=g,c+=v+o.segmentSpacing,h=kt(e-2*g,0,e)}},Eh.prototype.constantSlopeReflow=function(t,e,i){for(var o=this.options,r=this.points,n=r.length,s=o.neckRatio<=1,a=s?o.neckRatio*e:e,p=s?0:(e-e/o.neckRatio)/2,h=((s?e:e-2*p)-a)/2,l=0,c=0;c<n;c++){var u=r[c].points=[],d=r[c].percentage,g=o.dynamicHeight?h*d:h/n,d=o.dynamicHeight?i*d:i/n;u.push(new C.geometry.Point(t.x1+p,t.y1+l)),u.push(new C.geometry.Point(t.x1+e-p,t.y1+l)),u.push(new C.geometry.Point(t.x1+e-p-g,t.y1+d+l)),u.push(new C.geometry.Point(t.x1+p+g,t.y1+d+l)),p+=g,l+=d+o.segmentSpacing}},Eh.prototype.reflow=function(t){var e=this.points,i=e.length;if(i){var o=this.options,r=t.clone().unpad(this.labelPadding()),n=r.height()-o.segmentSpacing*(i-1),s=r.width();o.dynamicSlope?this.dynamicSlopeReflow(r,s,n):this.constantSlopeReflow(r,s,n);for(var a=0;a<i;a++)e[a].reflow(t)}},Eh);function Eh(t,e){Lh.call(this,e),this.plotArea=t,this.points=[],this.labels=[],this.legendItems=[],this.render()}It(N,{neckRatio:.3,width:300,dynamicSlope:!1,dynamicHeight:!0,segmentSpacing:0,labels:{visible:!1,align:A,position:A,zIndex:1}}),L(N.prototype,Pp);var Fh,Dh=N,G=((Fh=As)&&(Uh.__proto__=Fh),((Uh.prototype=Object.create(Fh&&Fh.prototype)).constructor=Uh).prototype.render=function(){this.createFunnelChart(this.series)},Uh.prototype.createFunnelChart=function(t){var e=t[0],e=new Dh(this,{series:t,legend:this.options.legend,neckRatio:e.neckRatio,dynamicHeight:e.dynamicHeight,dynamicSlope:e.dynamicSlope,segmentSpacing:e.segmentSpacing,highlight:e.highlight});this.appendChart(e)},Uh.prototype.appendChart=function(t,e){Fh.prototype.appendChart.call(this,t,e),yt(this.options.legend.items,t.legendItems)},Uh),W="color",K="first",N="max";function Uh(){Fh.apply(this,arguments)}Xa.current.register(ma,[zo,Eo,Fo,Uo,"area","verticalArea","candlestick","ohlc","bullet","verticalBullet","boxPlot","verticalBoxPlot","rangeColumn","rangeBar","waterfall","horizontalWaterfall","rangeArea","verticalRangeArea"]),Xa.current.register(bp,["scatter","scatterLine","bubble"]),Xa.current.register(Ip,[Do]),Xa.current.register(Hp,["donut"]),Xa.current.register(G,["funnel"]),Xa.current.register(Y,["polarArea","polarLine","polarScatter"]),Xa.current.register($,["radarArea","radarColumn","radarLine"]),Ro.current.register([zo,Eo,Fo,Uo,"area","verticalArea"],[h],["category",W,"noteText","errorLow","errorHigh"]),Ro.current.register(["rangeColumn","rangeBar","rangeArea","verticalRangeArea"],["from","to"],["category",W,"noteText"]),Ro.current.register(["waterfall","horizontalWaterfall"],[h],["category",W,"noteText","summary"]),Ro.current.register(["polarArea","polarLine","polarScatter"],[v,m],[W]),Ro.current.register(["radarArea","radarColumn","radarLine"],[h],[W]),Ro.current.register(["funnel"],[h],["category",W,"visibleInLegend","visible"]),Os.current.register([zo,Eo,Fo,Uo,"area","verticalArea","waterfall","horizontalWaterfall"],{value:N,color:K,noteText:K,errorLow:"min",errorHigh:N}),Os.current.register(["rangeColumn","rangeBar","rangeArea","verticalRangeArea"],{from:"min",to:N,color:K,noteText:K}),Os.current.register(["radarArea","radarColumn","radarLine"],{value:N,color:K}),Ro.current.register(["scatter","scatterLine","bubble"],[v,m],[W,"noteText","xErrorLow","xErrorHigh","yErrorLow","yErrorHigh"]),Ro.current.register(["bubble"],[v,m,"size"],[W,"category","noteText"]),Ro.current.register(["candlestick","ohlc"],["open","high","low","close"],["category",W,"downColor","noteText"]),Os.current.register(["candlestick","ohlc"],{open:N,high:N,low:"min",close:N,color:K,downColor:K,noteText:K}),Ro.current.register(["boxPlot","verticalBoxPlot"],["lower","q1","median","q3","upper","mean","outliers"],["category",W,"noteText"]),Os.current.register(["boxPlot","verticalBoxPlot"],{lower:N,q1:N,median:N,q3:N,upper:N,mean:N,outliers:K,color:K,noteText:K}),Ro.current.register(["bullet","verticalBullet"],["current","target"],["category",W,"visibleInLegend","noteText"]),Os.current.register(["bullet","verticalBullet"],{current:N,target:N,color:K,noteText:K}),Ro.current.register([Do,"donut"],[h],["category",W,"explode","visibleInLegend","visible"]);var Hh,Gh=["category",h,v,m],K=((Hh=C.Class)&&(Nh.__proto__=Hh),((Nh.prototype=Object.create(Hh&&Hh.prototype)).constructor=Nh).prototype._initElement=function(t){for(this._setElementClass(t),t.style.position="relative";t.firstChild;)t.removeChild(t.firstChild);this.element=t},Nh.prototype._setElementClass=function(t){n(t,"k-chart")},Nh.prototype._initTheme=function(t,e){for(var i=[],o=t.series||[],r=0;r<o.length;r++)i.push(Object.assign({},o[r]));t.series=i,function(t){for(var e=Gh,i=0;i<e.length;i++){var o=e[i]+"Axes";t[o]&&(t[e[i]+"Axis"]=t[o],delete t[o])}}(t),this.applyDefaults(t,e),null===t.seriesColors&&delete t.seriesColors,this.options=L({},e,t),this.applySeriesColors()},Nh.prototype.getSize=function(){var t=this.options.chartArea||{};return{width:t.width?parseInt(t.width,10):Math.floor(this.element.offsetWidth),height:t.height?parseInt(t.height,10):Math.floor(this.element.offsetHeight)}},Nh.prototype.resize=function(t){var e=this.getSize(),i=this._size,o=0<e.width||0<e.height;t||o&&(!i||e.width!==i.width||e.height!==i.height)?(this._size=e,this._resize(e,t),this.trigger("resize",e)):o&&this._selections&&Bt(this._selections,function(t){return!t.visible})&&(this._destroySelections(),this._setupSelection())},Nh.prototype._resize=function(){this._noTransitionsRedraw()},Nh.prototype.redraw=function(t){var e;this.applyDefaults(this.options),this.applySeriesColors(),t?(t=(e=this._model._plotArea).findPane(t),e.redraw(t)):this._redraw()},Nh.prototype.getAxis=function(t){return vo(t,this._plotArea.axes)},Nh.prototype.findAxisByName=function(t){return this.getAxis(t)},Nh.prototype.findPaneByName=function(t){for(var e=this._plotArea.panes,i=0;i<e.length;i++)if(e[i].options.name===t)return new xo(e[i])},Nh.prototype.findPaneByIndex=function(t){var e=this._plotArea.panes;if(e[t])return new xo(e[t])},Nh.prototype.plotArea=function(){return new bo(this._plotArea)},Nh.prototype.toggleHighlight=function(t,e){var i,o=this._plotArea,r=(o.srcSeries||o.series||[])[0],n=j(e)?o.filterPoints(e):(z(e)?(n=e.series,i=e.category):n=i=e,"donut"===r.type?qh(o.pointsBySeriesName(n),i):r.type===Do||"funnel"===r.type?qh((o.charts[0]||{}).points,i):o.pointsBySeriesName(n));n&&this.togglePointsHighlight(t,n)},Nh.prototype.togglePointsHighlight=function(t,e){for(var i=this._highlight,o=0;o<e.length;o++)i.togglePointHighlight(e[o],t)},Nh.prototype.showTooltip=function(t){var e,i,o=this._sharedTooltip(),r=this._tooltip,n=this._plotArea;j(t)?(e=n.findPoint(t))&&o&&(i=e.categoryIx):o&&mt(t)&&(i=n.categoryAxis.categoryIndex(t)),o?0<=i&&(i=this._plotArea.pointsByCategoryIndex(i),r.showAt(i)):e&&r.show(e)},Nh.prototype.hideTooltip=function(){this._tooltip.hide()},Nh.prototype._initSurface=function(){var t=this.surface,e=this._surfaceWrap(),i=this.options.chartArea||{};i.width&&_t(e,{width:i.width}),i.height&&_t(e,{height:i.height}),t&&t.options.type===this.options.renderAs?(this.surface.clear(),this.surface.resize()):(this._destroySurface(),this.surface=C.drawing.Surface.create(e,{type:this.options.renderAs}),this.surface.bind("mouseenter",this._surfaceMouseenterHandler),this.surface.bind("mouseleave",this._surfaceMouseleaveHandler))},Nh.prototype._surfaceWrap=function(){return this.element},Nh.prototype._redraw=function(){var t=this._getModel();this._size={width:t.options.width,height:t.options.height},this._destroyView(),this._model=t,this._plotArea=t._plotArea,t.renderVisual(),!1!==this.options.transitions&&t.traverse(function(t){t.animation&&t.animation.setup()}),this._initSurface(),this.surface.draw(t.visual),!1!==this.options.transitions&&t.traverse(function(t){t.animation&&t.animation.play()}),this._tooltip=this._createTooltip(),this._highlight=new _a,this._setupSelection(),this._createPannable(),this._createZoomSelection(),this._createMousewheelZoom(),this.trigger("render"),Kh(this._plotArea.panes),this._navState||this._cancelDomEvents()},Nh.prototype.exportVisual=function(t){var e,i;return t&&(t.width||t.height||t.options)?(e=this.options,i=L({},t.options,{chartArea:{width:t.width,height:t.height}}),Zh(this._originalOptions,i),this.options=L({},this._originalOptions,i),this._initTheme(this.options,this._theme),this.bindCategories(),(i=this._getModel()).renderVisual(),Kh(i._plotArea.panes),i=i.visual,this.options=e):i=this.surface.exportVisual(),i},Nh.prototype._sharedTooltip=function(){return this._plotArea instanceof ma&&this.options.tooltip&&this.options.tooltip.shared},Nh.prototype._createPannable=function(){var t=this.options;!1!==t.pannable&&(this._pannable=new Ta(this._plotArea,t.pannable))},Nh.prototype._createZoomSelection=function(){var t=this.options.zoomable,e=(t||{}).selection;!1!==t&&!1!==e&&(this._zoomSelection=new Ba(this,e))},Nh.prototype._createMousewheelZoom=function(){var t=this.options.zoomable,e=(t||{}).mousewheel;!1!==t&&!1!==e&&(this._mousewheelZoom=new Va(this,e))},Nh.prototype._toggleDragZoomEvents=function(){var t=this.options.pannable,e=this.options.zoomable,i=(e||{}).mousewheel,t=!(t||!1!==e&&!1!==(e||{}).selection||this.requiresHandlers(["dragStart",Go,No])),e=(!1===e||!1===i)&&!this.requiresHandlers(["zoomStart",qo,Xo]),i=this.element;this._dragZoomEnabled&&t&&e?(i.style.touchAction=this._touchAction||"",this._dragZoomEnabled=!1):this._dragZoomEnabled||t&&e||(i.style.touchAction="none",this._dragZoomEnabled=!0),this._toggleDomEvents(!t,!e)},Nh.prototype._toggleDomEvents=function(t,e){var i=this.domEvents;i&&(i.toggleDrag&&i.toggleDrag(t),i.toggleZoom&&i.toggleZoom(e))},Nh.prototype._createTooltip=function(){var t=this.options.tooltip;return this._sharedTooltip()?this._createSharedTooltip(t):new tp(this.chartService,t)},Nh.prototype._createSharedTooltip=function(t){return new rp(this._plotArea,t)},Nh.prototype.applyDefaults=function(t,a){!function(t){var i,o,e,r=(a||{}).axisDefaults||{};function n(t){var e=(t||{}).color||o.color,t=L({},r,r[i],o,o[i],{line:{color:e},labels:{color:e},title:{color:e}},t);return delete t[i],t}for(var s=0;s<Gh.length;s++)i=Gh[s]+"Axis",o=t.axisDefaults||{},e=(e=[].concat(t[i])).map(n),t[i]=1<e.length?e:e[0]}(t),function(t,e){var i=t.series,o=i.length,r=t.seriesDefaults,n=L({},t.seriesDefaults),s=e?L({},e.seriesDefaults):{},a=L({},s);Xh(n),Xh(a);for(var p=0;p<o;p++){var h=i[p].type||t.seriesDefaults.type,h=L({data:[]},a,s[h],{tooltip:t.tooltip},n,r[h]);i[p]._defaults=h,i[p]=L({},h,i[p]),i[p].data=i[p].data||[]}}(t,a)},Nh.prototype.applySeriesColors=function(){for(var t=this.options,e=t.series,i=t.seriesColors||[],o=0;o<e.length;o++){var r=e[o],n=i[o%i.length],s=r._defaults;r.color=r.color||n,s&&(s.color=s.color||n)}},Nh.prototype._getModel=function(){var t=this.options,e=this._createPlotArea(),i=new ye(this._modelOptions());return i.chart=this,i._plotArea=e,Oe.buildTitle(t.title,i),t.legend&&t.legend.visible&&i.append(new Na(e.options.legend,this.chartService)),i.append(e),i.reflow(),i},Nh.prototype._modelOptions=function(){var t=this.options,e=this.getSize();return L({transitions:t.transitions,width:e.width||600,height:e.height||400},t.chartArea)},Nh.prototype._createPlotArea=function(t){var e=this.options;return Xa.current.create(t?[]:e.series,e,this.chartService)},Nh.prototype._setupSelection=function(){for(var t=this._plotArea.axes,e=this._selections=[],i=0;i<t.length;i++){var o,r=t[i],n=r.options;r instanceof Ai&&n.select&&!n.vertical&&(o=r.range(),n=new Qa(this,r,L({min:o.min,max:o.max},n.select)),e.push(n))}},Nh.prototype._selectStart=function(t){return this.trigger("selectStart",t)},Nh.prototype._select=function(t){return this.trigger("select",t)},Nh.prototype._selectEnd=function(t){return this.trigger("selectEnd",t)},Nh.prototype._initHandlers=function(){this._clickHandler=this._click.bind(this),this._mousewheelHandler=this._mousewheel.bind(this),this._mouseleaveHandler=this._mouseleave.bind(this),this._surfaceMouseenterHandler=this._mouseover.bind(this),this._surfaceMouseleaveHandler=this._mouseout.bind(this),this._mousemove=Object(C.throttle)(this._mousemove.bind(this),20)},Nh.prototype.addObserver=function(t){t&&this.observers.push(t)},Nh.prototype.removeObserver=function(t){t=this.observers.indexOf(t);0<=t&&this.observers.splice(t,1)},Nh.prototype.requiresHandlers=function(t){for(var e=this.observers,i=0;i<e.length;i++)if(e[i].requiresHandlers(t))return!0},Nh.prototype.trigger=function(t,e){void 0===e&&(e={}),"showTooltip"===t&&(e.anchor.point=this._toDocumentCoordinates(e.anchor.point));for(var i=(e.sender=this).observers,o=!1,r=0;r<i.length;r++)i[r].trigger(t,e)&&(o=!0);return o},Nh.prototype._attachEvents=function(){var t,e=this.element;this._touchAction=e.style.touchAction,vt(e,((t={}).contextmenu=this._clickHandler,t[Yo]=this._mousewheelHandler,t.mouseleave=this._mouseleaveHandler,t)),this._shouldAttachMouseMove()&&vt(e,((e={}).mousemove=this._mousemove,e)),this.domEvents=tt.create(this.element,{start:this._start.bind(this),move:this._move.bind(this),end:this._end.bind(this),tap:this._tap.bind(this),gesturestart:this._gesturestart.bind(this),gesturechange:this._gesturechange.bind(this),gestureend:this._gestureend.bind(this)}),this._toggleDragZoomEvents()},Nh.prototype._mouseleave=function(t){this._hoveredPoint&&(this._hoveredPoint.out(this,t),this._hoveredPoint=null),this._plotArea.hovered&&(this.trigger("plotAreaLeave"),this._plotArea.hovered=!1)},Nh.prototype._cancelDomEvents=function(){this.domEvents&&this.domEvents.cancel&&this.domEvents.cancel()},Nh.prototype._gesturestart=function(t){this._mousewheelZoom&&!this._stopChartHandlers(t)&&(this._gestureDistance=t.distance,this._unsetActivePoint(),this.surface.suspendTracking())},Nh.prototype._gestureend=function(t){this._zooming&&!this._stopChartHandlers(t)&&(this.surface&&this.surface.resumeTracking(),this._zooming=!1,this.trigger(Xo,{}))},Nh.prototype._gesturechange=function(t){var e,i=this._mousewheelZoom;i&&!this._stopChartHandlers(t)&&(t.preventDefault(),e=this._gestureDistance,e=-t.distance/e+1,.1<=Math.abs(e)&&(e=Math.round(10*e),this._gestureDistance=t.distance,t={delta:e,axisRanges:Yh(this._plotArea.axes),originalEvent:t},!this._zooming&&this.trigger("zoomStart",t)||(this._zooming||(this._zooming=!0),(t.axisRanges=i.updateRanges(e))&&!this.trigger(qo,t)&&i.zoom())))},Nh.prototype._mouseout=function(t){var e;!t.element||(e=this._drawingChartElement(t.element,t))&&e.leave&&e.leave(this,t.originalEvent)},Nh.prototype._start=function(t){var e=this._eventCoordinates(t);!this._stopChartHandlers(t)&&this._plotArea.backgroundContainsPoint(e)&&(this.requiresHandlers(["dragStart",Go,No])&&this._startNavigation(t,e,"dragStart"),this._pannable&&this._pannable.start(t)&&(this.surface.suspendTracking(),this._unsetActivePoint(),this._suppressHover=!0,this.chartService.panning=!0),this._zoomSelection&&this._zoomSelection.start(t)&&this.trigger("zoomStart",{axisRanges:Yh(this._plotArea.axes),originalEvent:t}))},Nh.prototype._move=function(t){var e=this._navState,i=this._pannable;if(!this._stopChartHandlers(t)){if(i){var o=i.move(t);o&&!this.trigger(Go,{axisRanges:o,originalEvent:t})&&i.pan()}else if(e){for(var r={},n=e.axes,s=0;s<n.length;s++){var a,p=n[s];!p.options.name||0!=(a=(a=p.options.vertical?t.y:t.x).startLocation-a.location)&&(r[p.options.name]=p.translateRange(a))}e.axisRanges=r,this.trigger(Go,{axisRanges:r,originalEvent:t})}this._zoomSelection&&this._zoomSelection.move(t)}},Nh.prototype._end=function(t){var e,i;this._stopChartHandlers(t)||((e=this._pannable)&&e.end(t)?(this.surface.resumeTracking(),this.trigger(No,{axisRanges:Yh(this._plotArea.axes),originalEvent:t}),this._suppressHover=!1,this.chartService.panning=!1):this._endNavigation(t,No),this._zoomSelection&&(i=this._zoomSelection.end(t))&&!this.trigger(qo,{axisRanges:i,originalEvent:t})&&(this._zoomSelection.zoom(),this.trigger(Xo,{axisRanges:i,originalEvent:t})))},Nh.prototype._stopChartHandlers=function(t){var e=this._selections||[];if(!e.length)return!1;var t=this._eventCoordinates(t),i=this._plotArea.paneByPoint(t);if(i)for(var o=0;o<e.length;o++)if(e[o].onPane(i))return!0},Nh.prototype._mousewheel=function(t){var e=this,i=gt(t),o=this._mousewheelZoom,r=this._eventCoordinates(t);if(!this._stopChartHandlers(t)&&this._plotArea.backgroundContainsPoint(r))if(o){var n={delta:i,axisRanges:Yh(this._plotArea.axes),originalEvent:t};!this._zooming&&this.trigger("zoomStart",n)||(t.preventDefault(),this._zooming||(this._unsetActivePoint(),this.surface.suspendTracking(),this._zooming=!0),this._mwTimeout&&clearTimeout(this._mwTimeout),n.axisRanges=o.updateRanges(i),n.axisRanges&&!this.trigger(qo,n)&&o.zoom(),this._mwTimeout=setTimeout(function(){e.trigger(Xo,n),e._zooming=!1,e.surface&&e.surface.resumeTracking()},150))}else{o=this._navState;if(o||this._startNavigation(t,r,"zoomStart")||(o=this._navState),o){var s=o.totalDelta||i;o.totalDelta=s+i;for(var a=this._navState.axes,p={},h=0;h<a.length;h++){var l=a[h],c=l.options.name;c&&(p[c]=l.scaleRange(-s))}this.trigger(qo,{delta:i,axisRanges:p,originalEvent:t}),this._mwTimeout&&clearTimeout(this._mwTimeout),this._mwTimeout=setTimeout(function(){e._endNavigation(t,Xo)},150)}}},Nh.prototype._startNavigation=function(t,e,i){var o=this._model._plotArea,r=o.findPointPane(e),e=o.axes.slice(0);r&&(o=Yh(e),this.trigger(i,{axisRanges:o,originalEvent:t})?this._cancelDomEvents():(this._suppressHover=!0,this._unsetActivePoint(),this._navState={axisRanges:o,pane:r,axes:e}))},Nh.prototype._endNavigation=function(t,e){this._navState&&(this.trigger(e,{axisRanges:this._navState.axisRanges,originalEvent:t}),this._suppressHover=!1,this._navState=null)},Nh.prototype._getChartElement=function(t,e){var i=this.surface.eventTarget(t);if(i)return this._drawingChartElement(i,t,e)},Nh.prototype._drawingChartElement=function(t,e,i){for(var o,r=t;r&&!o;)o=r.chartElement,r=r.parent;if(o)return o.aliasFor&&(o=o.aliasFor(e,this._eventCoordinates(e))),i&&(o=o.closest(i))&&o.aliasFor&&(o=o.aliasFor()),o},Nh.prototype._eventCoordinates=function(t){t=At(t);return this._toModelCoordinates(t.x,t.y)},Nh.prototype._elementPadding=function(){var t,e;return this._padding||(t=(e=D(this.element,["paddingLeft","paddingTop"])).paddingLeft,e=e.paddingTop,this._padding={top:e,left:t}),this._padding},Nh.prototype._toDocumentCoordinates=function(t){var e=this._elementPadding(),i=bt(this.element);return{left:Tt(t.x+e.left+i.left),top:Tt(t.y+e.top+i.top)}},Nh.prototype._toModelCoordinates=function(t,e){var i=this.element,o=bt(i),r=this._elementPadding(),i=Et(i).invert(),i=new C.geometry.Point(t-o.left-r.left,e-o.top-r.top).transform(i);return new Ut(i.x,i.y)},Nh.prototype._tap=function(t){var e=this,i=this.surface.eventTarget(t),o=this._drawingChartElement(i,t),r=this._sharedTooltip();this._startHover(i,t)||r||this._unsetActivePoint(),r&&this._trackSharedTooltip(this._eventCoordinates(t),t,!0),this._propagateClick(o,t),this.handlingTap=!0,setTimeout(function(){e.handlingTap=!1},0)},Nh.prototype._click=function(t){var e=this._getChartElement(t);this._propagateClick(e,t)},Nh.prototype._propagateClick=function(t,e){for(var i=t;i;)i.click&&i.click(this,e),i=i.parent},Nh.prototype._startHover=function(t,e){if(this._suppressHover)return!1;var i=this._drawingChartElement(t,e,function(t){return(t.hover||t.over)&&!(t instanceof As)}),o=this._activePoint,r=1<this._plotArea.series.length,t=this._hasInactiveOpacity();return this._updateHoveredPoint(i,e),i&&o!==i&&i.hover?(this._activePoint=i,this._sharedTooltip()||i.hover(this,e)||(this._displayTooltip(i),t?this._displayInactiveOpacity(i,r):this._highlight.show(i))):!i&&t&&(r&&this._activеChartInstance&&(this._updateSeriesOpacity(i,!0),this._applySeriesOpacity(this._activеChartInstance.children,null,!0),this._activеChartInstance=null),this._highlight&&this._highlight.hide(),this._activePoint=null),i},Nh.prototype._displayTooltip=function(t){L({},this.options.tooltip,t.options.tooltip).visible&&this._tooltip.show(t)},Nh.prototype._displayInactiveOpacity=function(t,e,i){var o=this._activеChartInstance=this._chartInstanceFromPoint(t);e?(this._updateSeriesOpacity(t),this._applySeriesOpacity(o.children,null,!0),this._applySeriesOpacity(o.children,t.series),this._highlight.show(i||t)):o.supportsPointInactiveOpacity()?(o=this._getInactivePoints(t,o))&&o.length&&this._highlight.show(o,1-this._getInactiveOpacityForSeries(t.series)):this._highlight.show(t)},Nh.prototype._getInactivePoints=function(e,t){return this._getAllPointsOfType(t,e.constructor).filter(function(t){return t!==e})},Nh.prototype._getAllPointsOfType=function(t,e){for(var i=[],o=0;o<t.children.length;o++){var r=t.children[o];r.constructor===e?i.push(r):r.children&&r.children.length&&(i=i.concat(this._getAllPointsOfType(r,e)))}return i},Nh.prototype._updateHoveredPoint=function(t,e){var i=this._hoveredPoint;i&&i!==t&&(i.out(this,e),this._hoveredPoint=null),t&&i!==t&&t.over&&(this._hoveredPoint=t).over(this,e)},Nh.prototype._updateSeriesOpacity=function(t,e){for(var i=this._plotArea,o=i.series.length,r=0;r<o;r++){var n=i.series[r],s=this._getDefaultOpacityForSeries(n),a=this._getInactiveOpacityForSeries(n);e||n===t.series?(n.opacity=s,n.line&&(n.line.opacity=s)):(n.defaultOpacity=s,n.opacity=a,n.line&&(n.line.opacity=a))}},Nh.prototype._applySeriesOpacity=function(t,e,i,o){for(var r=0;r<t.length;r++){var n,s=t[r],a=s.series||o;a&&s.visual&&(n=(o||s.series).opacity,a===e&&!i||s.visual.opacity(i?1:n)),s.children&&s.children.length&&this._applySeriesOpacity(s.children,e,i,s.series)}},Nh.prototype._chartInstanceFromPoint=function(t){for(var e=t.parent;e&&!e.plotArea;)e=e.parent;return e},Nh.prototype._hasInactiveOpacity=function(){var t=void 0!==this.options.seriesDefaults.highlight.inactiveOpacity,e=0<this.options.series.filter(function(t){return void 0!==t.highlight.inactiveOpacity}).length;return t||e},Nh.prototype._getInactiveOpacityForSeries=function(t){var e=this.options.seriesDefaults.highlight.inactiveOpacity;return t.highlight.inactiveOpacity||e||t.opacity||1},Nh.prototype._getDefaultOpacityForSeries=function(t){return t.defaultOpacity||t.opacity||1},Nh.prototype._mouseover=function(t){var t=this._startHover(t.element,t.originalEvent);t&&t.tooltipTracking&&!this._mouseMoveTrackHandler&&!this._sharedTooltip()&&(this._mouseMoveTrackHandler=this._mouseMoveTracking.bind(this),vt(document,((t={}).mousemove=this._mouseMoveTrackHandler,t)))},Nh.prototype._mouseMoveTracking=function(t){var e,i=this.options,o=this._tooltip,r=this._highlight,n=this._activePoint,s=this._eventCoordinates(t);this._plotArea.box.containsPoint(s)?n&&n.tooltipTracking&&n.series&&n.parent.getNearestPoint&&((e=n.parent.getNearestPoint(s.x,s.y,n.seriesIx))&&e!==n&&((this._activePoint=e).hover(this,t)||(L({},i.tooltip,e.options.tooltip).visible&&o.show(e),r.show(e)))):(Mt(document,((e={}).mousemove=this._mouseMoveTrackHandler,e)),this._unsetActivePoint(),this._mouseMoveTrackHandler=null)},Nh.prototype._mousemove=function(t){var e,i=this._eventCoordinates(t),o=this._plotArea;this._trackCrosshairs(i),o.hover&&((e=o.backgroundContainsPoint(i))?(o.hovered=!0,this._plotArea.hover(this,t)):o.hovered&&!e&&(this.trigger("plotAreaLeave"),o.hovered=!1)),this._sharedTooltip()&&this._trackSharedTooltip(i,t)},Nh.prototype._trackCrosshairs=function(t){for(var e=this._plotArea.crosshairs,i=0;i<e.length;i++){var o=e[i];o.box.containsPoint(t)?o.showAt(t):o.hide()}},Nh.prototype._trackSharedTooltip=function(t,e,i){var o,r,n,s,a,p,h;this._suppressHover||(o=this.options.tooltip,h=this._plotArea,p=this._plotArea.categoryAxis,r=this._tooltip,n=this._highlight,h.backgroundContainsPoint(t)?(s=p.pointCategoryIndex(t))!==this._tooltipCategoryIx||!this._sharedHighlight&&i?((h=(p=(a=h.pointsByCategoryIndex(s)).map(function(t){return t.eventArgs(e)}))[0]||{}).categoryPoints=p,0<a.length&&!this.trigger("seriesHover",h)?(o.visible&&r.showAt(a,t),n.show(a),this._sharedHighlight=!0):r.hide(),this._tooltipCategoryIx=s):i&&this._sharedHighlight&&(n.hide(),r.hide(),this._sharedHighlight=!1):this._sharedHighlight&&(n.hide(),r.hide(),this._tooltipCategoryIx=null,this._sharedHighlight=!1))},Nh.prototype.hideElements=function(t){var e=this._plotArea;this._mousemove.cancel(),e.hideCrosshairs(),this._unsetActivePoint(t)},Nh.prototype._unsetActivePoint=function(t){var e=this._tooltip,i=this._highlight;this._activePoint=null,this._hoveredPoint=null,!e||t&&t.keepTooltipOpen||e.hide(),this._tooltipCategoryIx=null,this._sharedHighlight=!1,i&&i.hide()},Nh.prototype._deferRedraw=function(){this._redraw()},Nh.prototype._clearRedrawTimeout=function(){this._redrawTimeout&&(clearInterval(this._redrawTimeout),this._redrawTimeout=null)},Nh.prototype.bindCategories=function(){for(var t=this.options,e=[].concat(t.categoryAxis),i=0;i<e.length;i++){var o=e[i];!1!==o.autoBind&&this.bindCategoryAxisFromSeries(o,i)}},Nh.prototype.bindCategoryAxisFromSeries=function(t,e){for(var i,o,r=this.options.series,n=r.length,s=new ht,a=[],p=!1,h=0;h<n;h++){var l=r[h],c=l.categoryAxis===t.name||!l.categoryAxis&&0===e,u=l.data,d=u.length,c=l.categoryField&&c,p=c||p;if(c&&0<d)for(var g=(i=us(t,ko(l.categoryField,u[0])))?cs:ko,f=0;f<d;f++){var y=u[f],v=g(l.categoryField,y,this.chartService.intl);!i&&s.get(v)||(a.push([v,y]),i||s.set(v,!0))}}0<a.length?(i&&(a=function(t){void 0===t&&(t=ci);for(var e=function(t,e){void 0===e&&(e=ci);for(var i=1,o=t.length;i<o;i++)if(e(t[i],t[i-1])<0){t.sort(e);break}return t}(a,t),i=e.length,o=0<i?[e[0]]:[],r=1;r<i;r++)0!==t(e[r],St(o))&&o.push(e[r]);return o}(function(t,e){return ci(t[0],e[0])})),o=function(t){for(var e=t.length,i=[],o=0;o<e;o++)for(var r=t[o],n=r.length,s=0;s<n;s++)i[s]=i[s]||[],i[s].push(r[s]);return i}(a),t.categories=o[0]):p&&(t.categories=[])},Nh.prototype._isBindable=function(t){for(var e=Ro.current.valueFields(t),i=!0,o=0;o<e.length;o++){var r=e[o];if(r===h?r="field":r+="Field",!mt(t[r])){i=!1;break}}return i},Nh.prototype._noTransitionsRedraw=function(){var t,e=this.options;!1!==e.transitions&&(t=!(e.transitions=!1)),this._redraw(),t&&(e.transitions=!0)},Nh.prototype._legendItemHover=function(e,i){var t=this._plotArea,o=this._highlight,r=(t.srcSeries||t.series)[e],n=lt(r.type,[Do,"donut","funnel"])?t.findPoint(function(t){return t.series.index===e&&t.index===i}):t.pointsBySeriesIndex(e);this._hasInactiveOpacity()&&r.visible?(r=1<t.series.length,t=n[0],this._displayInactiveOpacity(t,r,n)):o.show(n)},Nh.prototype._shouldAttachMouseMove=function(){return this._plotArea.crosshairs.length||this._tooltip&&this._sharedTooltip()||this.requiresHandlers(["plotAreaHover","plotAreaLeave"])},Nh.prototype.updateMouseMoveHandler=function(){var t;Mt(this.element,((t={}).mousemove=this._mousemove,t)),this._shouldAttachMouseMove()&&vt(this.element,((t={}).mousemove=this._mousemove,t))},Nh.prototype.applyOptions=function(t,e){Zh(this._originalOptions,t),this._originalOptions=L(this._originalOptions,t),this.options=L({},this._originalOptions),e&&(this._theme=e,this.chartService.theme=e),this._initTheme(this.options,this._theme),this._toggleDragZoomEvents()},Nh.prototype.setOptions=function(t,e){this.applyOptions(t,e),this.bindCategories(),this.redraw(),this.updateMouseMoveHandler()},Nh.prototype.setDirection=function(t){this.chartService.rtl=Boolean(t),this.surface&&"svg"===this.surface.type&&this._destroySurface()},Nh.prototype.setIntlService=function(t){this.chartService.intl=t},Nh.prototype.noTransitionsRedraw=function(){this._noTransitionsRedraw()},Nh.prototype.destroy=function(){var t;this._destroyed=!0,Mt(this.element,((t={}).contextmenu=this._clickHandler,t[Yo]=this._mousewheelHandler,t.mousemove=this._mousemove,t.mouseleave=this._mouseleaveHandler,t)),this.domEvents&&(this.domEvents.destroy(),delete this.domEvents),this._mouseMoveTrackHandler&&Mt(document,((t={}).mousemove=this._mouseMoveTrackHandler,t)),this._destroyView(),this._destroySurface(),this._clearRedrawTimeout()},Nh.prototype._destroySurface=function(){var t=this.surface;t&&(t.unbind("mouseenter",this._surfaceMouseenterHandler),t.unbind("mouseleave",this._surfaceMouseleaveHandler),t.destroy(),this.surface=null)},Nh.prototype._destroySelections=function(){var t=this._selections;if(t)for(;0<t.length;)t.shift().destroy()},Nh.prototype._destroyView=function(){var t=this._model;t&&(t.destroy(),this._model=null),this._unsetActivePoint(),this._destroySelections(),this._tooltip&&this._tooltip.destroy(),this._highlight&&this._highlight.destroy(),this._zoomSelection&&(this._zoomSelection.destroy(),delete this._zoomSelection),this._pannable&&(this._pannable.destroy(),delete this._pannable),this._mousewheelZoom&&(this._mousewheelZoom.destroy(),delete this._mousewheelZoom)},Nh);function Nh(t,e,i,o){var r=this;void 0===o&&(o={}),Hh.call(this),this.observers=[],this.addObserver(o.observer),this.chartService=new Q(this,o),this.chartService.theme=i,this._initElement(t);t=L({},this.options,e);this._originalOptions=L({},t),this._theme=i,this._initTheme(t,i),this._initHandlers(),this._initSurface(),this.bindCategories(),Ot.preloadFonts(e,function(){r.fontLoaded=!0,r._destroyed||(r.trigger("init"),r._redraw(),r._attachEvents())})}function qh(t,e){if(t)for(var i=0;i<t.length;i++)if(t[i].category===e)return[t[i]]}function Xh(t){delete t.bar,delete t.column,delete t.rangeColumn,delete t.line,delete t.verticalLine,delete t.pie,delete t.donut,delete t.area,delete t.verticalArea,delete t.scatter,delete t.scatterLine,delete t.bubble,delete t.candlestick,delete t.ohlc,delete t.boxPlot,delete t.bullet,delete t.verticalBullet,delete t.polarArea,delete t.polarLine,delete t.radarArea,delete t.radarLine,delete t.waterfall}function Yh(t){for(var e={},i=0;i<t.length;i++){var o=t[i],r=o.options.name;r&&(e[r]=o.range())}return e}var Wh=["data","categories"];function Zh(t,e){for(var i in e){var o,r,n;!lt(i,Wh)&&e.hasOwnProperty(i)&&(o=e[i],r=t[i],mt(r)&&((n=null===o)||!mt(o)?(delete t[i],n&&delete e[i]):r&&z(o)&&z(r)&&Zh(r,o)))}}function Kh(t){for(var e=0;e<t.length;e++)t[e].notifyRender()}It(K,{renderAs:"",chartArea:{},legend:{visible:!0,labels:{}},categoryAxis:{},seriesDefaults:{type:Eo,data:[],highlight:{visible:!0},labels:{},negativeValues:{visible:!1}},series:[],seriesColors:null,tooltip:{visible:!1},transitions:!0,valueAxis:{},plotArea:{},title:{},xAxis:{},yAxis:{},panes:[{}],pannable:!1,zoomable:!1});var $h,Jh=K,Qh=(($h=rp)&&(el.__proto__=$h),((el.prototype=Object.create($h&&$h.prototype)).constructor=el).prototype._slotAnchor=function(t,e){var i=this.plotArea.categoryAxis.options.vertical,o=i?{horizontal:"left",vertical:"center"}:{horizontal:"center",vertical:"bottom"};return{point:i?new Ut(this.plotArea.box.x2,e.center().y):new Ut(e.center().x,-2),align:o}},el.prototype._defaultAnchor=function(t,e){return this._slotAnchor({},e)},el),tl=[zo,"bullet"];function el(){$h.apply(this,arguments)}function il(t){for(var e=[],i=0;i<t.length;i++){var o=t[i];e[i]=o.style.display,o.style.display="none"}return e}function ol(t,e){for(var i=0;i<t.length;i++)t[i].style.display=e[i]}function rl(t){return R(t)?[t]:t}var nl,W=((nl=Jh)&&(sl.__proto__=nl),((sl.prototype=Object.create(nl&&nl.prototype)).constructor=sl).prototype._setElementClass=function(t){n(t,"k-sparkline")},sl.prototype._initElement=function(t){nl.prototype._initElement.call(this,t),this._initialWidth=Math.floor(_t(t).width)},sl.prototype._resize=function(){var t=this.element,e=il(t.childNodes);this._initialWidth=Math.floor(_t(t).width),ol(t.childNodes,e),nl.prototype._resize.call(this)},sl.prototype._modelOptions=function(){var t=this.options,e=this._surfaceWrap(),i=il(e.childNodes),o=document.createElement("span");o.innerHTML="&nbsp;",e.appendChild(o);t=L({width:this._autoWidth,height:_t(e).height,transitions:t.transitions},t.chartArea,{inline:!0,align:!1});return _t(e,{width:t.width,height:t.height}),e.removeChild(o),ol(e.childNodes,i),this.surface&&this.surface.resize(),t},sl.prototype._surfaceWrap=function(){var t;return this.stage||(t=this.stage=document.createElement("span"),this.element.appendChild(t)),this.stage},sl.prototype._createPlotArea=function(t){t=nl.prototype._createPlotArea.call(this,t);return this._autoWidth=this._initialWidth||this._calculateWidth(t),t},sl.prototype._calculateWidth=function(t){for(var e=this.options,i=U(e.chartArea.margin),o=t.charts,r=this._surfaceWrap(),n=0,s=0;s<o.length;s++){var a=o[s],p=(a.options.series||[])[0];if(p){if(p.type===zo)return 150;if("bullet"===p.type)return 150;if(p.type===Do)return _t(r).height;var h=a.categoryAxis;h&&(a=h.categoriesCount()*(!a.options.isStacked&&lt(p.type,[Eo,"verticalBullet"])?a.seriesOptions.length:1),n=Math.max(n,a))}}e=n*e.pointWidth;return 0<e&&(e+=i.left+i.right),e},sl.prototype._createSharedTooltip=function(t){return new Qh(this._plotArea,t)},sl.normalizeOptions=function(t){t=rl(t);return(t=x(t)?{seriesDefaults:{data:t}}:L({},t)).series||(t.series=[{data:rl(t.data)}]),L(t,{seriesDefaults:{type:t.type}}),(lt(t.series[0].type,tl)||lt(t.seriesDefaults.type,tl))&&(t=L({},{categoryAxis:{crosshair:{visible:!1}}},t)),t},sl);function sl(){nl.apply(this,arguments)}It(W,{chartArea:{margin:2},axisDefaults:{visible:!1,majorGridLines:{visible:!1},valueAxis:{narrowRange:!0}},seriesDefaults:{type:"line",area:{line:{width:.5}},bar:{stack:!0},padding:2,width:.5,overlay:{gradient:null},highlight:{visible:!1},border:{width:0},markers:{size:2,visible:!1}},tooltip:{visible:!0,shared:!0},categoryAxis:{crosshair:{visible:!0,tooltip:{visible:!1}}},legend:{visible:!1},transitions:!1,pointWidth:5,panes:[{clip:!1}]});var al,pl=W,hl=((al=C.drawing.Animation)&&(ll.__proto__=al),((ll.prototype=Object.create(al&&al.prototype)).constructor=ll).prototype.setup=function(){this._initialOpacity=parseFloat(D(this.element,"opacity").opacity)},ll.prototype.step=function(t){D(this.element,{opacity:String(ct(this._initialOpacity,0,t))})},ll.prototype.abort=function(){al.prototype.abort.call(this),D(this.element,{display:"none",opacity:String(this._initialOpacity)})},ll.prototype.cancel=function(){al.prototype.abort.call(this),D(this.element,{opacity:String(this._initialOpacity)})},ll);function ll(){al.apply(this,arguments)}function cl(t,e){var i=document.createElement("div");return i.className=t,e&&(i.style.cssText=e),i}var ul,K=((ul=C.Class)&&(dl.__proto__=ul),((dl.prototype=Object.create(ul&&ul.prototype)).constructor=dl).prototype.createElements=function(){var t=this.element=cl("k-navigator-hint","display: none; position: absolute; top: 1px; left: 1px;"),e=this.tooltip=cl("k-tooltip k-chart-tooltip"),i=this.scroll=cl("k-scroll");e.innerHTML="&nbsp;",t.appendChild(e),t.appendChild(i)},dl.prototype.show=function(t,e,i){var o=this.element,r=this.options,n=this.scroll,s=this.tooltip,a=si(di(t)+di(e-t)/2),p=.4*i.width(),h=i.center().x-p,l=(i.center().x-h)/(r.max-r.min),c=a-r.min,a=this.chartService.intl.format(r.format,t,e),r=ot(r);this.clearHideTimeout(),this._visible||(D(o,{visibility:"hidden",display:"block"}),this._visible=!0),r&&(a=r({from:t,to:e})),s.innerHTML=a,D(s,{left:i.center().x-s.offsetWidth/2,top:i.y1});s=D(s,["marginTop","borderTopWidth","height"]);D(n,{width:p,left:h+c*l,top:i.y1+s.marginTop+s.borderTopWidth+s.height/2}),D(o,{visibility:"visible"})},dl.prototype.clearHideTimeout=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this._hideAnimation&&this._hideAnimation.cancel()},dl.prototype.hide=function(){var t=this;this.clearHideTimeout(),this._hideTimeout=setTimeout(function(){t._visible=!1,t._hideAnimation=new hl(t.element),t._hideAnimation.setup(),t._hideAnimation.play()},this.options.hideDelay)},dl.prototype.destroy=function(){this.clearHideTimeout(),this.container&&this.container.removeChild(this.element),delete this.container,delete this.chartService,delete this.element,delete this.tooltip,delete this.scroll},dl);function dl(t,e,i){ul.call(this),this.options=L({},this.options,i),this.container=t,this.chartService=e;e=D(t,["paddingLeft","paddingTop"]);this.chartPadding={top:e.paddingTop,left:e.paddingLeft},this.createElements(),t.appendChild(this.element)}It(K,{format:"{0:d} - {1:d}",hideDelay:500});var gl=K,fl="_navigator",yl=fl;function vl(){}var ml,xl,bl=((xl=C.Class)&&(wl.__proto__=xl),((wl.prototype=Object.create(xl&&xl.prototype)).constructor=wl).prototype.parseDate=function(t){return mi(this.chart.chartService.intl,t)},wl.prototype.clean=function(){this.selection&&(this.selection.destroy(),this.selection=null),this.hint&&(this.hint.destroy(),this.hint=null)},wl.prototype.destroy=function(){this.chart&&(this.chart.removeObserver(this.chartObserver),delete this.chart),this.clean()},wl.prototype.redraw=function(){this._redrawSelf(),this.initSelection()},wl.prototype.initSelection=function(){var t=this.chart,e=this.options,i=this.mainAxis(),o=i.roundedRange(),r=o.min,n=o.max,s=e.select,a=s.from,p=s.to,o=s.mousewheel,s=(vl.prototype=i,new vl);0!==i.categoriesCount()&&(this.clean(),s.box=i.box,this.selection=new Qa(t,s,{min:r,max:n,from:a||r,to:p||n,mousewheel:Rt(o,{zoom:"left"}),visible:e.visible},new ut(this,{selectStart:"_selectStart",select:"_select",selectEnd:"_selectEnd"})),e.hint.visible&&(this.hint=new gl(t.element,t.chartService,{min:r,max:n,template:ot(e.hint),format:e.hint.format})))},wl.prototype.setRange=function(){var t=this.chart._createPlotArea(!0).namedCategoryAxes[yl].roundedRange(),e=t.min,i=t.max,o=this.options.select||{},t=o.from||e;t<e&&(t=e);e=o.to||i;i<e&&(e=i),this.options.select=L({},o,{from:t,to:e}),this.filterAxes()},wl.prototype._redrawSelf=function(t){var e=this.chart._plotArea;e&&e.redraw(St(e.panes),t)},wl.prototype.redrawSlaves=function(){var t=this.chart,e=t._plotArea,i=e.panes.slice(0,-1);e.srcSeries=t.options.series,e.options.categoryAxis=t.options.categoryAxis,e.clearSeriesPointsCache(),e.redraw(i)},wl.prototype._drag=function(t){var e=this.chart,i=this.selection,o=e._eventCoordinates(t.originalEvent),r=this.mainAxis(),n=r.roundedRange(),o=r.pane.box.containsPoint(o),e=e._plotArea.categoryAxis,t=t.axisRanges[e.options.name],e=this.options.select;t&&!o&&i&&(e=e.from&&e.to?di(e.to)-di(e.from):di(i.options.to)-di(i.options.from),t=si(kt(di(t.min),n.min,di(n.max)-e)),n=si(kt(di(t)+e,di(n.min)+e,n.max)),this.options.select={from:t,to:n},this.options.liveDrag&&(this.filterAxes(),this.redrawSlaves()),i.set(t,n),this.showHint(t,n))},wl.prototype._dragEnd=function(){this.filterAxes(),this.filter(),this.redrawSlaves(),this.hint&&this.hint.hide()},wl.prototype.readSelection=function(){var t=this.selection.options,e=t.from,i=t.to,t=this.options.select;t.from=e,t.to=i},wl.prototype.filterAxes=function(){var t=this.options.select;void 0===t&&(t={});for(var e=this.chart.options.categoryAxis,i=t.from,o=t.to,r=0;r<e.length;r++){var n=e[r];n.pane!==fl&&(n.min=i,n.max=o)}},wl.prototype.filter=function(){var t,e,i=this.chart,o=this.options.select;i.requiresHandlers(["navigatorFilter"])&&(t=this.mainAxis(),e={from:o.from,to:o.to},"category"!==t.options.type&&(i=new ji(L({baseUnit:"fit"},i.options.categoryAxis[0],{categories:[o.from,o.to]}),i.chartService).options,e.from=pi(i.min,-i.baseUnitStep,i.baseUnit),e.to=pi(i.max,i.baseUnitStep,i.baseUnit)),this.chart.trigger("navigatorFilter",e))},wl.prototype._zoom=function(t){var e=this.chart._plotArea.categoryAxis,i=this.selection,o=this.options,r=o.select,n=o.liveDrag,s=this.mainAxis(),a=t.delta;i&&(o=s.categoryIndex(i.options.from),s=s.categoryIndex(i.options.to),t.originalEvent.preventDefault(),1<Math.abs(a)&&(a*=3),1<s-o?(i.expand(a),this.readSelection()):(e.options.min=r.from,r.from=e.scaleRange(-t.delta).min),n&&(this.filterAxes(),this.redrawSlaves()),i.set(r.from,r.to),this.showHint(this.options.select.from,this.options.select.to))},wl.prototype._zoomEnd=function(t){this._dragEnd(t)},wl.prototype.showHint=function(t,e){var i=this.chart._plotArea;this.hint&&this.hint.show(t,e,i.backgroundBox())},wl.prototype._selectStart=function(t){return this.chart._selectStart(t)},wl.prototype._select=function(t){return this.showHint(t.from,t.to),this.chart._select(t)},wl.prototype._selectEnd=function(t){return this.hint&&this.hint.hide(),this.readSelection(),this.filterAxes(),this.filter(),this.redrawSlaves(),this.chart._selectEnd(t)},wl.prototype.mainAxis=function(){var t=this.chart._plotArea;if(t)return t.namedCategoryAxes[yl]},wl.prototype.select=function(t,e){var i=this.options.select;return t&&e&&(i.from=this.parseDate(t),i.to=this.parseDate(e),this.filterAxes(),this.filter(),this.redrawSlaves(),this.selection.set(t,e)),{from:i.from,to:i.to}},wl.setup=function(t,e){var i,o,r;void 0===t&&(t={}),void 0===e&&(e={}),t.__navi||(t.__navi=!0,i=L({},e.navigator,t.navigator),o=t.panes=[].concat(t.panes),r=L({},i.pane,{name:fl}),i.visible||(r.visible=!1,r.height=.1),o.push(r),wl.attachAxes(t,i),wl.attachSeries(t,i,e))},wl.attachAxes=function(t,e){var i=e.series||[],o=t.categoryAxis=[].concat(t.categoryAxis),r=t.valueAxis=[].concat(t.valueAxis),t=0===ls(i,Ho).length,i=L({type:"date",pane:fl,roundToBaseUnit:!t,justified:t,_collapse:!1,majorTicks:{visible:!0},tooltip:{visible:!1},labels:{step:1},autoBind:e.autoBindElements,autoBaseUnitSteps:{minutes:[1],hours:[1,2],days:[1,2],weeks:[],months:[1],years:[1]}}),t=e.categoryAxis;o.push(L({},i,{maxDateGroups:200},t,{name:yl,title:null,baseUnit:"fit",baseUnitStep:"auto",labels:{visible:!1},majorTicks:{visible:!1}}),L({},i,t,{name:yl+"_labels",maxDateGroups:20,baseUnitStep:"auto",labels:{position:""},plotBands:[],autoBaseUnitSteps:{minutes:[]},_overlap:!0}),L({},i,t,{name:yl+"_ticks",maxDateGroups:200,majorTicks:{width:.5},plotBands:[],title:null,labels:{visible:!1,mirror:!0},_overlap:!0})),r.push(L({name:yl,pane:fl,majorGridLines:{visible:!1},visible:!1},e.valueAxis))},wl.attachSeries=function(t,e,i){for(var o=t.series=t.series||[],r=[].concat(e.series||[]),n=i.seriesColors,s=e.seriesDefaults,a=0;a<r.length;a++)o.push(L({color:n[a%n.length],categoryField:e.dateField,visibleInLegend:!1,tooltip:{visible:!1}},s,r[a],{axis:yl,categoryAxis:yl,autoBind:e.autoBindElements}))},wl),W=((ml=Jh)&&(_l.__proto__=ml),((_l.prototype=Object.create(ml&&ml.prototype)).constructor=_l).prototype.applyDefaults=function(t,e){var i=_t(this.element).width||600,e=e,i={seriesDefaults:{categoryField:t.dateField},axisDefaults:{categoryAxis:{name:"default",majorGridLines:{visible:!1},labels:{step:2},majorTicks:{visible:!1},maxDateGroups:Math.floor(i/28)}}},e=e&&L({},e,i);bl.setup(t,e),ml.prototype.applyDefaults.call(this,t,e)},_l.prototype._setElementClass=function(t){n(t,"k-chart k-stockchart")},_l.prototype.setOptions=function(t){this.destroyNavigator(),ml.prototype.setOptions.call(this,t)},_l.prototype.noTransitionsRedraw=function(){var t=this.options.transitions;this.options.transitions=!1,this._fullRedraw(),this.options.transitions=t},_l.prototype._resize=function(){this.noTransitionsRedraw()},_l.prototype._redraw=function(){var t=this.navigator;!this._dirty()&&t&&t.options.partialRedraw?t.redrawSlaves():this._fullRedraw()},_l.prototype._dirty=function(){var t=this.options,e=at([].concat(t.series,t.navigator.series),function(t){return t&&t.visible}).length,t=this._seriesCount!==e;return this._seriesCount=e,t},_l.prototype._fullRedraw=function(){var t=this.navigator;t||(t=this.navigator=new bl(this),this.trigger("navigatorCreated",{navigator:t})),t.clean(),t.setRange(),ml.prototype._redraw.call(this),t.initSelection()},_l.prototype._trackSharedTooltip=function(t){var e=this._plotArea.paneByPoint(t);e&&e.options.name===fl?this._unsetActivePoint():ml.prototype._trackSharedTooltip.call(this,t)},_l.prototype.bindCategories=function(){ml.prototype.bindCategories.call(this),this.copyNavigatorCategories()},_l.prototype.copyNavigatorCategories=function(){for(var t,e=[].concat(this.options.categoryAxis),i=0;i<e.length;i++){var o=e[i];o.name===yl?t=o.categories:t&&o.pane===fl&&(o.categories=t)}},_l.prototype.destroyNavigator=function(){this.navigator&&(this.navigator.destroy(),this.navigator=null)},_l.prototype.destroy=function(){this.destroyNavigator(),ml.prototype.destroy.call(this)},_l.prototype._stopChartHandlers=function(t){var e=this._eventCoordinates(t),e=this._plotArea.paneByPoint(e);return ml.prototype._stopChartHandlers.call(this,t)||e&&e.options.name===fl},_l.prototype._toggleDragZoomEvents=function(){this._dragZoomEnabled||(this.element.style.touchAction="none",this._dragZoomEnabled=!0)},_l);function _l(){ml.apply(this,arguments)}function wl(t){xl.call(this),this.chart=t;var e=this.options=L({},this.options,t.options.navigator),i=e.select;i&&(i.from=this.parseDate(i.from),i.to=this.parseDate(i.to)),mt(e.hint.visible)||(e.hint.visible=e.visible),this.chartObserver=new ut(this,((e={})[Go]="_drag",e[No]="_dragEnd",e[qo]="_zoom",e[Xo]="_zoomEnd",e)),t.addObserver(this.chartObserver)}It(W,{dateField:"date",axisDefaults:{categoryAxis:{type:"date",baseUnit:"fit",justified:!0},valueAxis:{narrowRange:!0,labels:{format:"C"}}},navigator:{select:{},seriesDefaults:{markers:{visible:!1},tooltip:{visible:!0},line:{width:2}},hint:{},visible:!0},tooltip:{visible:!0},legend:{visible:!1}});var Al=W,Sl=Math.PI/180;function kl(t,e){var i=t.getOrigin(),o=t.getSize(),e=U(e);return t.setOrigin([i.x-e.left,i.y-e.top]),t.setSize([o.width+(e.left+e.right),o.height+(e.top+e.bottom)]),t}var Pl=C.drawing.Group,Cl=C.drawing.Path,Tl=C.drawing.Text;function Ml(t,e){var i=t.box,o=t.children[0].box,r=e.border||{},n=e.background||"",i=Cl.fromRect(new C.geometry.Rect([i.x1,i.y1],[i.width(),i.height()]),{stroke:{}}),o=new Tl(t.text,new C.geometry.Point(o.x1,o.y1),{font:e.font,fill:{color:e.color}}),e=kl(o.bbox().clone(),e.padding),r=Cl.fromRect(e,{stroke:{color:r.width?r.color:"",width:r.width,opacity:r.opacity,dashType:r.dashType,lineJoin:"round",lineCap:"round"},fill:{color:n}}),n=new Pl;return n.append(i),n.append(r),n.append(o),n}function Rl(t,e,i){var o=mt(t.from)?t.from:c,r=mt(t.to)?t.to:l;return t.from=Math.max(Math.min(r,o),e),t.to=Math.min(Math.max(r,o),i),t}function Ol(t,e){e=U(e);return e.left=-e.left,e.top=-e.top,e.right=-e.right,e.bottom=-e.bottom,kl(t,e)}var Il,jl=C.drawing.Path,Bl=C.drawing.Surface,K=((Il=C.Class)&&(Vl.__proto__=Il),((Vl.prototype=Object.create(Il&&Il.prototype)).constructor=Vl).prototype.destroy=function(){this.surface&&(this.surface.destroy(),this.surface=null),delete this.element,delete this.surfaceElement},Vl.prototype.value=function(t){var e=this.pointers[0];if(0===arguments.length)return e.value();e.value(t),this._setValueOptions(t)},Vl.prototype._draw=function(){var t=this.surface;t.clear(),t.draw(this._visuals)},Vl.prototype.exportVisual=function(){return this._visuals},Vl.prototype.allValues=function(t){var e=this.pointers,i=[];if(0===arguments.length){for(var o=0;o<e.length;o++)i.push(e[o].value());return i}if(x(t))for(var r=0;r<t.length;r++)R(t[r])&&e[r].value(t[r]);this._setValueOptions(t)},Vl.prototype._setValueOptions=function(t){for(var e=[].concat(this.options.pointer),i=[].concat(t),o=0;o<i.length;o++)e[o].value=i[o]},Vl.prototype.resize=function(){this.noTransitionsRedraw()},Vl.prototype.noTransitionsRedraw=function(){var t=this.options.transitions;this._toggleTransitions(!1),this.redraw(),this._toggleTransitions(t)},Vl.prototype.redraw=function(){var t=this._surfaceSize(),t=new C.geometry.Rect([0,0],[t.width,t.height]);this._initSurface(),this.gaugeArea=this._createGaugeArea(),this._createModel();t=Ol(t.bbox(),this._gaugeAreaMargin);this.reflow(t)},Vl.prototype.setOptions=function(t,e){this._originalOptions=L(this._originalOptions,t),this.options=L({},this._originalOptions),this._initTheme(e),this.redraw()},Vl.prototype.setDirection=function(t){this.contextService.rtl=Boolean(t),this.surface&&"svg"===this.surface.type&&(this.surface.destroy(),this.surface=null)},Vl.prototype.setIntlService=function(t){this.contextService.intl=t},Vl.prototype._initTheme=function(t){var e=t||this.theme||{};this.theme=e,this.options=L({},e,this.options);var t=this.options,i=t.pointer;if(x(i)){for(var o=[],r=0;r<i.length;r++)o.push(L({},e.pointer,i[r]));t.pointer=o}},Vl.prototype._createGaugeArea=function(){var t=this.options.gaugeArea,e=this.surface.size(),i=t.border||{},e=new C.geometry.Rect([0,0],[e.width,e.height]);return this._gaugeAreaMargin=t.margin||5,0<i.width&&(e=Ol(e,i.width)),jl.fromRect(e,{stroke:{color:i.width?i.color:"",width:i.width,dashType:i.dashType,lineJoin:"round",lineCap:"round"},fill:{color:t.background}})},Vl.prototype._initSurface=function(){var t=this.options,e=this.surface,i=this._surfaceElement(),o=this._surfaceSize();_t(i,o),e&&e.options.type===t.renderAs?(this.surface.clear(),this.surface.resize()):(e&&e.destroy(),this.surface=Bl.create(i,{type:t.renderAs}))},Vl.prototype._surfaceSize=function(){var t=this.options,e=this._getSize();return t.gaugeArea&&L(e,t.gaugeArea),e},Vl.prototype._surfaceElement=function(){return this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.element.appendChild(this.surfaceElement)),this.surfaceElement},Vl.prototype.getSize=function(){return this._getSize()},Vl.prototype._getSize=function(){var t=this.element,e=this._defaultSize(),i=t.offsetWidth,t=t.offsetHeight;return{width:i=i||e.width,height:t=t||e.height}},Vl.prototype._defaultSize=function(){return{width:200,height:200}},Vl.prototype._toggleTransitions=function(t){this.options.transitions=t;for(var e=0;e<this.pointers.length;e++)this.pointers[e].options.animation.transitions=t},Vl);function Vl(t,e,i,o){void 0===o&&(o={}),Il.call(this),this.element=t,this.theme=i,this.contextService=new Q(this,o),this._originalOptions=L({},this.options,e),this.options=L({},this._originalOptions),this._initTheme(i),this.redraw()}It(K,{plotArea:{},theme:"default",renderAs:"",pointer:{},scale:{},gaugeArea:{}});var Ll=K,zl=C.drawing.Path,El=C.drawing.Group,Fl=C.geometry.Point;function Dl(t,e,i,o){var r,n,s,a,p,h,l=e.length;if(o.visible)for(var c=i.mirror,u=i.lineBox,d=o.skip;d<l;d+=o.step)d%o.skipUnit!=0&&(i.tickX=c?u.x2:u.x2-o.size,i.tickY=c?u.y1-o.size:u.y1,i.position=e[d],t.append((n=o,h=h=p=a=s=void 0,a=(r=i).position,p=r.tickX,h=r.tickY,h=r.vertical?(s=new Fl(p,a),new Fl(p+n.size,a)):(s=new Fl(a,h),new Fl(a,h+n.size)),new zl({stroke:{color:n.color,width:n.width}}).moveTo(s).lineTo(h))))}var Ul,W=((Ul=Hi)&&(Hl.__proto__=Ul),((Hl.prototype=Object.create(Ul&&Ul.prototype)).constructor=Hl).prototype.initUserOptions=function(t){t=L({},this.options,t);return(t=L({},t,{labels:{mirror:t.mirror}})).majorUnit=t.majorUnit||Ft(t.min,t.max),t},Hl.prototype.initFields=function(){},Hl.prototype.render=function(){var t=this.elements=new El,e=this.renderLabels(),i=this.renderLine(),o=this.renderTicks(),r=this.renderRanges();return t.append(i,e,o,r),t},Hl.prototype.renderRanges=function(){for(var t=this.options,e=t.min,i=t.max,o=t.vertical,r=t.labels.mirror,n=t.ranges||[],s=new El,a=n.length,p=t.rangeSize||t.minorTicks.size/2,h=0;h<a;h++){var l=Rl(n[h],e,i),c=this.getSlot(l.from,l.to),u=o?this.lineBox():c,c=o?c:this.lineBox();o?u.x1-=p*(r?-1:1):c.y2+=p*(r?-1:1),s.append(zl.fromRect(new C.geometry.Rect([u.x1,c.y1],[u.x2-u.x1,c.y2-c.y1]),{fill:{color:l.color,opacity:l.opacity},stroke:{}}))}return s},Hl.prototype.renderLabels=function(){for(var t=this.labels,e=this.options,i=new El,o=0;o<t.length;o++)i.append(Ml(t[o],e.labels));return i},Hl.prototype.renderLine=function(){var t=this.options.line,e=this.lineBox(),i=new El;return 0<t.width&&t.visible&&((t=new zl({stroke:{color:t.color,dashType:t.dashType,width:t.width}})).moveTo(e.x1,e.y1).lineTo(e.x2,e.y2),i.append(t)),i},Hl.prototype.renderTicks=function(){var t=new El,e=this.options,i=e.majorTicks.visible?e.majorUnit:0,o={vertical:e.vertical,mirror:e.labels.mirror,lineBox:this.lineBox()};return Dl(t,this.getMajorTickPositions(),o,e.majorTicks),Dl(t,this.getMinorTickPositions(),o,L({},{skipUnit:i/e.minorUnit},e.minorTicks)),t},Hl);function Hl(t,e){t=t||{};!mt(t.reverse)&&!1===t.vertical&&(e||{}).rtl&&(t=Object.assign({},t,{reverse:!0})),Ul.call(this,0,1,t,e),this.options.minorUnit=this.options.minorUnit||this.options.majorUnit/10}It(W,{min:0,max:50,majorTicks:{size:15,align:"inside",color:a,width:.5,visible:!0},minorTicks:{size:10,align:"inside",color:a,width:.5,visible:!0},line:{width:.5},labels:{position:"inside",padding:2},mirror:!1,_alignLines:!1});var Gl,Nl=W,K=((Gl=C.Class)&&(ql.__proto__=Gl),((ql.prototype=Object.create(Gl&&Gl.prototype)).constructor=ql).prototype.value=function(t){var e=this.options,i=e.value;if(0===arguments.length)return i;var o=this.scale.options,i=o.min,o=o.max;e._oldValue=mt(e._oldValue)?e.value:i,e.value=kt(t,i,o),this.elements&&this.repaint()},ql);function ql(t,e){Gl.call(this);var i=t.options,o=i.min,i=i.max,e=this.options=L({},this.options,e);e.fill=e.color,this.scale=t,mt(e.value)?e.value=kt(e.value,o,i):e.value=o}It(K,{color:a});var Xl,W=K,K=((Xl=W)&&(Yl.__proto__=Xl),((Yl.prototype=Object.create(Xl&&Xl.prototype)).constructor=Yl).prototype.reflow=function(){var t,e,i,o=this.options,r=this.scale,n=r.options,s=n.mirror,a=n.vertical,p=r.lineBox(),h=o.track.size||o.size,n=o.size/2,r=U(o.margin),r=a?r[s?"left":"right"]:r[s?"bottom":"top"],r=s?-r:r;a?(i=new qt(p.x1+r,p.y1,p.x1+r,p.y2),s?i.x1-=h:i.x2+=h,"barPointer"!==o.shape&&(t=e=new qt(p.x2+r,p.y1-n,p.x2+r,p.y2+n))):(i=new qt(p.x1,p.y1-r,p.x2,p.y1-r),s?i.y2+=h:i.y1-=h,"barPointer"!==o.shape&&(t=e=new qt(p.x1-n,p.y1-r,p.x2+n,p.y1-r))),this.trackBox=i,this.pointerRangeBox=e,this.box=t||i.clone().pad(o.border.width)},Yl.prototype.getElementOptions=function(){var t=this.options;return{fill:{color:t.color,opacity:t.opacity},stroke:mt(t.border)?{color:t.border.width?t.border.color||t.color:"",width:t.border.width,dashType:t.border.dashType,opacity:t.opacity}:null}},Yl.prototype._margin=function(){var t=this.scale,e=this.options,i=t.options,t=i.mirror,i=i.vertical,e=U(e.margin);return i?e[t?"left":"right"]:e[t?"bottom":"top"]},Yl);function Yl(t,e){Xl.call(this,t,e),this.options=L({track:{visible:mt(e.track)}},this.options)}It(K,{shape:"barPointer",track:{border:{width:1}},color:a,border:{width:1},opacity:1,margin:U(3),animation:{type:"barPointer"},visible:!0});var Wl,Zl=K,K=((Wl=C.drawing.Animation)&&(Kl.__proto__=Wl),((Kl.prototype=Object.create(Wl&&Wl.prototype)).constructor=Kl).prototype.setup=function(){var t=this.options,e=t.margin,i=t.from,o=t.to,r=t.vertical,n=r?"x1":"y1";t.mirror===r?(i[n]-=e,o[n]-=e):(i[n]+=e,o[n]+=e);i=this.fromScale=new C.geometry.Point(i.x1,i.y1),o=this.toScale=new C.geometry.Point(o.x1,o.y1);0!==t.duration&&(t.duration=Math.max(i.distanceTo(o)/t.duration*1e3,1))},Kl.prototype.step=function(t){var e=ct(this.fromScale.x,this.toScale.x,t),t=ct(this.fromScale.y,this.toScale.y,t);this.element.transform(C.geometry.transform().translate(e,t))},Kl);function Kl(){Wl.apply(this,arguments)}It(K,{easing:"linear",duration:250}),C.drawing.AnimationFactory.current.register("arrowPointer",K);var $l,Jl,Ql=K,tc=C.geometry.Point,ec=C.drawing.Path,ic=((Jl=Zl)&&(rc.__proto__=Jl),((rc.prototype=Object.create(Jl&&Jl.prototype)).constructor=rc).prototype.pointerShape=function(){var t=this.scale,e=this.options.size,i=e/2,o=t.options.mirror?-1:1;return t.options.vertical?[new tc(0,0-i),new tc(0-o*e,0),new tc(0,0+i)]:[new tc(0-i,0),new tc(0,0+o*e),new tc(0+i,0)]},rc.prototype.repaint=function(){var t=this.scale,e=this.options,t=new Ql(this.elements,L(e.animation,{vertical:t.options.vertical,mirror:t.options.mirror,margin:this._margin(e.margin),from:t.getSlot(e._oldValue),to:t.getSlot(e.value)}));!1===e.animation.transitions&&(t.options.duration=0),t.setup(),t.play()},rc.prototype.render=function(){var t=this.scale,e=this.options,i=this.getElementOptions(),o=this.pointerShape(e.value);e.animation.type="arrowPointer";o=new ec({stroke:i.stroke,fill:i.fill}).moveTo(o[0]).lineTo(o[1]).lineTo(o[2]).close(),e=t.getSlot(e.value);return o.transform(C.geometry.transform().translate(e.x1,e.y1)),this.elements=o},rc),K=(($l=C.drawing.Animation)&&(oc.__proto__=$l),((oc.prototype=Object.create($l&&$l.prototype)).constructor=oc).prototype.setup=function(){var t=this.options,e=this.axis=t.vertical?m:v,i=this.to=t.newPoints[0][e],e=this.from=t.oldPoints[0][e];0!==t.duration&&(t.duration=Math.max(Math.abs(i-e)/t.speed*1e3,1)),this._set(e)},oc.prototype.step=function(t){t=ct(this.from,this.to,t);this._set(t)},oc.prototype._set=function(t){var e="set"+this.axis.toUpperCase(),i=this.options.newPoints;i[0][e](t),i[1][e](t)},oc);function oc(){$l.apply(this,arguments)}function rc(t,e){Jl.call(this,t,e),mt(this.options.size)||(this.options.size=.6*this.scale.options.majorTicks.size)}It(K,{easing:"linear",speed:250}),C.drawing.AnimationFactory.current.register("barPointer",K);var nc,sc,ac=K,pc=C.drawing.Group,hc=C.drawing.Path,lc=((sc=Zl)&&(dc.__proto__=sc),((dc.prototype=Object.create(sc&&sc.prototype)).constructor=dc).prototype.pointerShape=function(t){var e=this.scale,i=this.options,o=e.options,r=o.mirror,n=o.vertical,s=r===n?-1:1,a=i.size*s,o=e.getSlot(e.options.min),r=e.getSlot(t),i=n?m:v,e=n?v:m,t=this._margin()*s,s=new C.geometry.Point;s[i]=o[i+"1"],s[e]=o[e+"1"];o=new C.geometry.Point;o[i]=r[i+"1"],o[e]=r[e+"1"],n?(s.translate(t,0),o.translate(t,0)):(s.translate(0,t),o.translate(0,t));e=o.clone(),t=s.clone();return n?(e.translate(a,0),t.translate(a,0)):(e.translate(0,a),t.translate(0,a)),[s,o,e,t]},dc.prototype.repaint=function(){var t=this.scale,e=this.options,i=this.pointerShape(e.value),o=this.pointerPath,r=this.pointerShape(e._oldValue);o.moveTo(i[0]).lineTo(i[1]).lineTo(i[2]).lineTo(i[3]).close();i=new ac(o,L(e.animation,{reverse:t.options.reverse,vertical:t.options.vertical,oldPoints:[r[1],r[2]],newPoints:[i[1],i[2]]}));!1===e.animation.transitions&&(i.options.duration=0),i.setup(),i.play()},dc.prototype.render=function(){var t=new pc,e=this.getElementOptions();this.options.track.visible&&t.append(this.renderTrack());e=this.pointerPath=new hc({stroke:e.stroke,fill:e.fill});return t.append(e),this.elements=t},dc.prototype.renderTrack=function(){var t=this.options.track,e=t.border||{},i=this.trackBox.clone().pad(e.width||0);return new hc.fromRect(i.toRect(),{fill:{color:t.color,opacity:t.opacity},stroke:{color:e.width?e.color||t.color:"",width:e.width,dashType:e.dashType}})},dc),cc=C.drawing.Group,K=((nc=Ll)&&(uc.__proto__=nc),((uc.prototype=Object.create(nc&&nc.prototype)).constructor=uc).prototype.reflow=function(t){var e=this.pointers,i=t.origin.x,o=t.origin.y,t=new qt(i,o,i+t.width(),o+t.height());this.scale.reflow(t),this._shrinkScaleWidth(t);for(var r=0;r<e.length;r++)e[r].reflow();this.bbox=this._getBox(t),this._alignElements(),this._shrinkElements(),this._buildVisual(),this._draw()},uc.prototype._buildVisual=function(){var t=new cc,e=this.scale.render(),i=this.pointers;t.append(this.gaugeArea),t.append(e);for(var o=0;o<i.length;o++){var r=i[o];t.append(r.render()),r.value(r.options.value)}this._visuals=t},uc.prototype._createModel=function(){var t=this.options,e=this.scale=new Nl(t.scale,this.contextService);this.pointers=[];for(var i=x(i=t.pointer)?i:[i],o=0;o<i.length;o++){var r=L({},i[o],{animation:{transitions:t.transitions}}),n="arrow"===r.shape?ic:lc;this.pointers.push(new n(e,r))}},uc.prototype._defaultSize=function(){var t=this.options.scale.vertical;return{width:t?60:200,height:t?200:60}},uc.prototype._getBox=function(t){for(var e,i=this.scale,o=this.pointers,r=t.center(),n=o[0].box.clone().wrap(i.box),s=0;s<o.length;s++)n.wrap(o[s].box.clone());return n=i.options.vertical?(e=n.width()/2,new qt(r.x-e,t.y1,r.x+e,t.y2)):(e=n.height()/2,new qt(t.x1,r.y-e,t.x2,r.y+e))},uc.prototype._alignElements=function(){for(var t,e=this.scale,i=this.pointers,o=e.box,r=i[0].box.clone().wrap(e.box),n=this.bbox,s=0;s<i.length;s++)r.wrap(i[s].box.clone());e.options.vertical?(t=n.center().x-r.center().x,e.reflow(new qt(o.x1+t,n.y1,o.x2+t,n.y2))):(t=n.center().y-r.center().y,e.reflow(new qt(o.x1,o.y1+t,o.x2,o.y2+t)));for(var a=0;a<i.length;a++)i[a].reflow(this.bbox)},uc.prototype._shrinkScaleWidth=function(t){var e,i=this.scale;i.options.vertical||0<(e=i.contentBox().width()-t.width())&&(i.box.shrink(e,0),i.box.alignTo(t,"center"),i.reflow(i.box))},uc.prototype._shrinkElements=function(){for(var t=this.scale,e=this.pointers,i=t.box.clone(),o=t.options.vertical?"y":"x",r=e[0].box,n=0;n<e.length;n++)r.wrap(e[n].box.clone());i[o+1]+=Math.max(i[o+1]-r[o+1],0),i[o+2]-=Math.max(r[o+2]-i[o+2],0),t.reflow(i);for(var s=0;s<e.length;s++)e[s].reflow(this.bbox)},uc);function uc(){nc.apply(this,arguments)}function dc(t,e){sc.call(this,t,e),mt(this.options.size)||(this.options.size=.3*this.scale.options.majorTicks.size)}It(K,{transitions:!0,gaugeArea:{background:""},scale:{vertical:!0}});var gc=K,fc=C.drawing.Arc,yc=C.drawing.Path,vc=C.drawing.Group;function mc(t,e,i,o){var r=new vc,n=t.center,s=t.getRadiusX();if(o.visible)for(var a=0;a<e.length;a++){var p=t.pointAt(e[a]),h=new C.geometry.Point(n.x+s-o.size,n.y).rotate(e[a],n);r.append(new yc({stroke:{color:o.color,width:o.width}}).moveTo(p).lineTo(h))}return r}function xc(t,e,i,o){return{from:t,to:e,color:i,opacity:o}}var bc,K=((bc=Hi)&&(_c.__proto__=bc),((_c.prototype=Object.create(bc&&bc.prototype)).constructor=_c).prototype.initUserOptions=function(t){t=L({},this.options,t);return t.majorUnit=t.majorUnit||Ft(t.min,t.max),t.minorUnit=t.minorUnit||t.majorUnit/10,t},_c.prototype.initFields=function(){},_c.prototype.render=function(t,e){e=this.renderArc(t,e);this.bbox=e.bbox(),this.labelElements=this.renderLabels(),this.ticks=this.renderTicks(),this.ranges=this.renderRanges()},_c.prototype.reflow=function(t){var e=t.center(),t=Math.min(t.height(),t.width())/2;if(!mt(this.bbox))return this.render(e,t);this.bbox=this.arc.bbox(),this.radius(this.arc.getRadiusX()),this.repositionRanges(),this.renderLabels()},_c.prototype.slotAngle=function(t){var e=this.options,i=e.min,o=e.max,r=e.reverse,n=e.startAngle,s=e.endAngle,e=s-n;return(r?s-(t-i)/(o-i)*e:(t-i)/(o-i)*e+n)+180},_c.prototype.hasRanges=function(){var t=this.options.ranges;return t&&t.length},_c.prototype.ticksSize=function(){var t=this.options,e=t.majorTicks,i=t.minorTicks,t=0;return e.visible&&(t=e.size),i.visible&&(t=Math.max(i.size,t)),t},_c.prototype.renderLabels=function(){var t=this.options,e=this.arc.clone(),i=e.getRadiusX(),o=this.tickAngles(e,t.majorUnit),r=t.rangeSize=t.rangeSize||.1*i,n=new vc,s=.05*i;mt(t.rangeDistance)?s=t.rangeDistance:t.rangeDistance=s;var a=t.labels,p="inside"===a.position,h=mt(this.labelElements);p&&(i-=this.ticksSize(),this.hasRanges()&&!h&&(i-=r+s),e.setRadiusX(i).setRadiusY(i));for(var l=this.labels,c=l.length,a=U(a.padding),u=(a.left+a.right)/2,d=(a.top+a.bottom)/2,g=0;g<c;g++){var f=l[g],y=f.box.width()/2,v=f.box.height()/2,m=o[g],x=(m-180)*Sl,b=e.pointAt(m),m=b.x+Math.cos(x)*(y+u)*(p?1:-1),x=b.y+Math.sin(x)*(v+d)*(p?1:-1);f.reflow(new qt(m-y,x-v,m+y,x+v));m=new C.geometry.Point(f.box.x1,f.box.y1),y=void 0;h?(x=(y=this.labelElements.children[g]).bbox().origin,(v=y.transform()||C.geometry.transform()).translate(m.x-x.x,m.y-x.y),y.transform(v)):(y=Ml(f,t.labels),n.append(y)),this.bbox=C.geometry.Rect.union(this.bbox,y.bbox())}return n},_c.prototype.repositionRanges=function(){var t=this.ranges.children;if(0<t.length){var e=this.options,i=e.rangeDistance,o=e.rangeSize,e=this.getRangeRadius();"inside"===this.options.labels.position&&(e+=o+i);for(var r=e+o/2,n=0;n<t.length;n++)t[n]._geometry.setRadiusX(r).setRadiusY(r);this.bbox=C.geometry.Rect.union(this.bbox,this.ranges.bbox())}},_c.prototype.renderRanges=function(){var t=this.rangeSegments(),e=t.length,i=new vc;if(e){var o=this.options,r=o.rangeSize,n=o.reverse,o=o.rangeDistance,s=this.getRangeRadius();this.radius(this.radius()-r-o);for(var a=0;a<e;a++){var p=t[a],h=this.slotAngle(p[n?"to":"from"]),l=this.slotAngle(p[n?"from":"to"]);l-h!=0&&i.append(this.createRange(h,l,s,p))}}return i},_c.prototype.createRange=function(t,e,i,o){var r=this.options.rangeSize,e=new C.geometry.Arc(this.arc.center,{radiusX:i+r/2,radiusY:i+r/2,startAngle:t,endAngle:e});return new fc(e,{stroke:{width:r,color:o.color,opacity:o.opacity,lineCap:o.lineCap}})},_c.prototype.rangeSegments=function(){var t=this.options,e=t.ranges||[],i=e.length,o=[];if(i){var r=t.min,n=t.max,s=t.rangePlaceholderColor;o.push(xc(r,n,s));for(var a=0;a<i;a++)for(var p=Rl(e[a],r,n),h=o.length,l=0;l<h;l++){var c=o[l];if(c.from<=p.from&&p.from<=c.to){o.push(xc(p.from,p.to,p.color,p.opacity)),c.from<=p.to&&p.to<=c.to&&o.push(xc(p.to,c.to,s,p.opacity)),c.to=p.from;break}}}return o},_c.prototype.getRangeRadius=function(){var t=this.arc,e=this.options,i=e.rangeSize,o=e.rangeDistance,r=e.majorTicks.size;return"outside"===e.labels.position?t.getRadiusX()-r-o-i:t.getRadiusX()-i},_c.prototype.renderArc=function(t,e){var i=this.options;return this.arc=new C.geometry.Arc(t,{radiusX:e,radiusY:e,startAngle:i.startAngle+180,endAngle:i.endAngle+180})},_c.prototype.renderTicks=function(){var t=this.arc,e=this.options,i=t.clone();this.majorTickAngles=this.tickAngles(t,e.majorUnit),this.majorTicks=mc(i,this.majorTickAngles,e.majorUnit,e.majorTicks);var o=new vc;o.append(this.majorTicks);var r,n=e.majorTicks.size,s=e.minorTicks.size;return this._tickDifference=n-s,"outside"===e.labels.position&&(r=i.getRadiusX(),i.setRadiusX(r-n+s).setRadiusY(r-n+s)),this.minorTickAngles=this.normalizeTickAngles(this.tickAngles(t,e.minorUnit)),this.minorTicks=mc(i,this.minorTickAngles,e.minorUnit,e.minorTicks),o.append(this.minorTicks),o},_c.prototype.normalizeTickAngles=function(t){for(var e=this.options,i=e.majorUnit/e.minorUnit,o=t.length-1;0<=o;o--)o%i==0&&t.splice(o,1);return t},_c.prototype.tickAngles=function(t,e){var i=this.options,o=i.reverse,r=i.max-i.min,i=t.endAngle-t.startAngle,n=r/e,s=t.startAngle,a=i/n;o&&(s+=i,a=-a);for(var p=[],h=0;h<n;h++)p.push(Tt(s,3)),s+=a;return Tt(s)<=t.endAngle&&p.push(s),p},_c.prototype.radius=function(t){if(!t)return this.arc.getRadiusX();this.arc.setRadiusX(t).setRadiusY(t),this.repositionTicks(this.majorTicks.children,this.majorTickAngles),this.repositionTicks(this.minorTicks.children,this.minorTickAngles,!0)},_c.prototype.repositionTicks=function(t,e,i){var o=i&&this._tickDifference||0,r=this.arc,n=r.getRadiusX();i&&"outside"===this.options.labels.position&&0!==o&&(r=this.arc.clone()).setRadiusX(n-o).setRadiusY(n-o);for(var s=0;s<t.length;s++){var a=r.pointAt(e[s]),p=t[s].segments,h=a.x-p[0].anchor().x,p=a.y-p[0].anchor().y;t[s].transform((new C.geometry.transform).translate(h,p))}},_c);function _c(t,e){bc.call(this,0,1,t,e)}It(K,{min:0,max:100,majorTicks:{size:15,align:"inside",color:a,width:.5,visible:!0},minorTicks:{size:10,align:"inside",color:a,width:.5,visible:!0},startAngle:-30,endAngle:210,labels:{position:"inside",padding:2}});var wc,Ac=K,K=((wc=C.drawing.Animation)&&(Sc.__proto__=wc),((Sc.prototype=Object.create(wc&&wc.prototype)).constructor=Sc).prototype.step=function(t){var e=this.options,t=ct(e.oldAngle,e.newAngle,t);this.element.transform(C.geometry.transform().rotate(t,e.center))},Sc);function Sc(t,e){wc.call(this,t,e);e=this.options;e.duration=Math.max(Math.abs(e.newAngle-e.oldAngle)/e.duration*1e3,1)}It(K,{easing:"linear",duration:150}),C.drawing.AnimationFactory.current.register("radialPointer",K);var kc,Pc=K,Cc=C.drawing.Circle,Tc=C.drawing.Group,Mc=C.drawing.Path,K=((kc=W)&&(Rc.__proto__=kc),((Rc.prototype=Object.create(kc&&kc.prototype)).constructor=Rc).prototype.setAngle=function(t){this.elements.transform(C.geometry.transform().rotate(t,this.center))},Rc.prototype.repaint=function(){var t=this.scale,e=this.options,i=t.slotAngle(e._oldValue),t=t.slotAngle(e.value);!1===e.animation.transitions?this.setAngle(t):new Pc(this.elements,L(e.animation,{oldAngle:i,newAngle:t})).play()},Rc.prototype.render=function(){var t=this.scale,e=this.options,i=new Tc;return!1!==e.animation&&L(e.animation,{startAngle:0,center:t.arc.center,reverse:t.options.reverse}),i.append(this._renderNeedle(),this._renderCap()),this.elements=i,this.setAngle(Sl),i},Rc.prototype.reflow=function(t){var e=this.center=t.center,i=kt(this.options.length||1,.1,1.5),i=this.radius=t.getRadiusX()*i,i=this.capSize=Math.round(i*this.options.cap.size);this.bbox=C.geometry.Rect.fromPoints(new C.geometry.Point(e.x-i,e.y-i),new C.geometry.Point(e.x+i,e.y+i))},Rc.prototype._renderNeedle=function(){var t=this.scale.options.minorTicks.size,e=this.center,i=this.options.color,i=new Mc({fill:{color:i},stroke:{color:i,width:.5}});return i.moveTo(e.x+this.radius-t,e.y).lineTo(e.x,e.y-this.capSize/2).lineTo(e.x,e.y+this.capSize/2).close(),i},Rc.prototype._renderCap=function(){var t=this.options,e=t.cap.color||t.color,t=new C.geometry.Circle(this.center,this.capSize);return new Cc(t,{fill:{color:e},stroke:{color:e}})},Rc);function Rc(){kc.apply(this,arguments)}It(K,{cap:{size:.05},arrow:{width:16,height:14},animation:{type:"radialPointer",duration:150}});var Oc,Ic=K,jc=C.drawing.Group,K=((Oc=Ll)&&(Bc.__proto__=Oc),((Bc.prototype=Object.create(Oc&&Oc.prototype)).constructor=Bc).prototype.reflow=function(t){var e=this.pointers;this.scale.reflow(t),this._initialPlotArea=this.scale.bbox;for(var i=0;i<e.length;i++)e[i].reflow(this.scale.arc),this._initialPlotArea=C.geometry.Rect.union(this._initialPlotArea,e[i].bbox);this.fitScale(t),this.alignScale(t),this._buildVisual(this.gaugeArea,e,this.scale),this._draw()},Bc.prototype._buildVisual=function(t,e,i){var o=this._visuals=new jc;o.append(t),o.append(i.ticks),o.append(i.ranges),this._buildPointers(e),o.append(i.labelElements)},Bc.prototype._buildPointers=function(t){for(var e=0;e<t.length;e++){var i=t[e];i.render(),this._visuals.append(i.elements),i.value(i.options.value)}},Bc.prototype.fitScale=function(t){for(var e,i,o,r,n,s=this.scale.arc,a=this._initialPlotArea,a=Math.abs(this.getDiff(a,t)),p=Tt(a,3),h=Tt(-a,3),l=0,c=0;!(!(c++<100)||5<(l=n===o?l+1:0)||p!==r&&0<=(e=this.getPlotBox(p,t,s))&&e<=2||h!==r&&0<=(o=this.getPlotBox(h,t,s))&&o<=2||(r=0<e&&0<o?2*p:e<0&&o<0?2*h:Tt((p+h)/2||1,3),0<=(i=this.getPlotBox(r,t,s))&&i<=2));)n=o,0<i?(h=r,o=i):(p=r,e=i)},Bc.prototype.getPlotBox=function(t,e,i){var o=this.scale,r=this.pointers,n=i.getRadiusX(),s=i.clone();s.setRadiusX(n+t).setRadiusY(n+t),o.arc=s,o.reflow(e),this.plotBbox=o.bbox;for(var a=0;a<r.length;a++)r[a].reflow(s),this.plotBbox=C.geometry.Rect.union(this.plotBbox,r[a].bbox);return this.getDiff(this.plotBbox,e)},Bc.prototype.getDiff=function(t,e){return Math.min(e.width()-t.width(),e.height()-t.height())},Bc.prototype.alignScale=function(t){var e=this.plotBbox.center(),i=t.center(),o=e.x-i.x,i=e.y-i.y,r=this.scale,n=this.pointers;r.arc.center.x-=o,r.arc.center.y-=i,r.reflow(t);for(var s=0;s<n.length;s++)n[s].reflow(r.arc),this.plotBbox=C.geometry.Rect.union(r.bbox,n[s].bbox)},Bc.prototype._createModel=function(){var t=this.options,e=t.pointer,i=this.scale=new Ac(t.scale,this.contextService);this.pointers=[];for(var o=x(e)?e:[e],r=0;r<o.length;r++){var n=new Ic(i,L({},o[r],{animation:{transitions:t.transitions}}));this.pointers.push(n)}},Bc);function Bc(){Oc.apply(this,arguments)}It(K,{transitions:!0,gaugeArea:{background:""}});var Vc,Lc=K,K=((Vc=Ac)&&(zc.__proto__=Vc),((zc.prototype=Object.create(Vc&&Vc.prototype)).constructor=zc).prototype.rangeSegments=function(){var t=this.options;return[{from:t.min,to:t.max,color:t.rangePlaceholderColor,lineCap:t.rangeLineCap}]},zc.prototype.hasRanges=function(){return!0},zc.prototype.placeholderRangeAngle=function(t){var e=this.ranges.children[0].geometry();this.options.reverse?e.setEndAngle(t):e.setStartAngle(t)},zc.prototype.addRange=function(t,e,i){var o=this.options.reverse,r=this.slotAngle(o?e:t),e=this.slotAngle(o?t:e),i=this.createRange(r,e,this.getRangeRadius(),i);return this.ranges.append(i),i},zc);function zc(){Vc.apply(this,arguments)}It(K,{min:0,max:100,majorTicks:{visible:!1},minorTicks:{visible:!1},labels:{visible:!1},startAngle:0,endAngle:180,rangeLineCap:"round"});var Ec,Fc=K,K=((Ec=C.drawing.Animation)&&(Dc.__proto__=Ec),((Dc.prototype=Object.create(Ec&&Ec.prototype)).constructor=Dc).prototype.step=function(t){var e=this.options,i=this.startColor,o=this.color,r=ct(e.oldAngle,e.newAngle,t);this.element.angle(r),o&&(e=Tt(ct(i.r,o.r,t)),r=Tt(ct(i.g,o.g,t)),t=Tt(ct(i.b,o.b,t)),this.element.stroke(new C.Color(e,r,t).toHex()))},Dc);function Dc(t,e){Ec.call(this,t,e);var i=this.options,e=Math.abs(i.newAngle-i.oldAngle)/i.duration*1e3;i.duration=kt(e,150,800);e=t.elements.options.get("stroke.color"),t=t.currentColor();e!==t&&(this.startColor=new C.Color(e),this.color=new C.Color(t))}It(K,{easing:"linear",duration:150}),C.drawing.AnimationFactory.current.register("radialRangePointer",K);var Uc,Hc=K,W=((Uc=W)&&(Gc.__proto__=Uc),((Gc.prototype=Object.create(Uc&&Uc.prototype)).constructor=Gc).prototype.repaint=function(){var t=this.scale,e=this.options,i=t.slotAngle(e._oldValue),t=t.slotAngle(e.value);this.animation&&this.animation.abort(),!1===e.animation.transitions?(this.angle(t),this.stroke(this.currentColor())):(this.animation=new Hc(this,L(e.animation,{oldAngle:i,newAngle:t})),this.animation.play())},Gc.prototype.angle=function(t){var e=this.elements.geometry();this.scale.options.reverse?e.setStartAngle(t):e.setEndAngle(t),this.scale.placeholderRangeAngle(t)},Gc.prototype.stroke=function(t){this.elements.stroke(t)},Gc.prototype.render=function(){var t,e;this.elements||(t=this.scale,!1!==(e=this.options).animation&&L(e.animation,{startAngle:0,center:t.arc.center,reverse:t.options.reverse}),this.elements=t.addRange(t.options.min,this.options.value,{color:this.currentColor(),opacity:e.opacity,lineCap:t.options.rangeLineCap}))},Gc.prototype.currentColor=function(){var t=this.scale.options,e=t.min,i=t.max,o=this.options,r=o.colors,t=o.color,o=o.value,n=R(o)?o:e;if(r)for(var s=0;s<r.length;s++){var a=r[s],p=a.color,h=a.from;void 0===h&&(h=e);a=a.to;if(void 0===a&&(a=i),h<=n&&n<=a)return p}return t},Gc.prototype.reflow=function(){this.render(),this.bbox=this.elements.bbox()},Gc);function Gc(){Uc.apply(this,arguments)}It(W,{animation:{type:"radialRangePointer",duration:150}});function Nc(){return{icon:{border:{width:1}},label:{font:Zc,padding:3},line:{length:10,width:2},visible:!0}}function qc(t){return void 0===t&&(t={}),{axisDefaults:{labels:{font:Zc},notes:Nc(),title:{font:Kc,margin:5}},categoryAxis:{majorGridLines:{visible:!0}},navigator:{pane:{height:90,margin:{top:10}}},seriesDefaults:{visible:!0,labels:{font:"11px Arial, Helvetica, sans-serif"},overlay:t.gradients?{}:{gradient:"none"},area:{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.4},rangeArea:{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.4},verticalRangeArea:{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.4},bar:{gap:1.5,spacing:.4},boxPlot:{outliersField:"",meanField:"",border:{_brightness:.8,width:1},downColor:"#fff",gap:1,highlight:{border:{opacity:1,width:2},whiskers:{width:3},mean:{width:2},median:{width:2}},mean:{width:2},median:{width:2},spacing:.3,whiskers:{width:2}},bubble:{border:{width:0},labels:{background:"transparent"},opacity:.6},bullet:{gap:1.5,spacing:.4,target:{color:"#ff0000"}},candlestick:{border:{_brightness:.8,width:1},downColor:"#fff",gap:1,highlight:{border:{opacity:1,width:2},line:{width:2}},line:{color:"#000",width:1},spacing:.3},column:{gap:1.5,spacing:.4},pie:{labels:{background:"",color:"",padding:{top:5,bottom:5,left:7,right:7}}},donut:{margin:1},funnel:{labels:{background:"",color:"",padding:{top:5,bottom:5,left:7,right:7}}},horizontalWaterfall:{gap:.5,line:{color:"#000",width:1},spacing:.4},line:{width:2},notes:Nc(),ohlc:{gap:1,highlight:{line:{opacity:1,width:3}},line:{width:1},spacing:.3},radarArea:{line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.5},radarLine:{markers:{visible:!1},width:2},polarArea:{line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.5},polarLine:{markers:{visible:!1},width:2},rangeBar:{gap:1.5,spacing:.4},rangeColumn:{gap:1.5,spacing:.4},scatterLine:{width:1},verticalArea:{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.4},verticalBoxPlot:{outliersField:"",meanField:"",border:{_brightness:.8,width:1},downColor:"#fff",gap:1,highlight:{border:{opacity:1,width:2},whiskers:{width:3},mean:{width:2},median:{width:2}},mean:{width:2},median:{width:2},spacing:.3,whiskers:{width:2}},verticalBullet:{gap:1.5,spacing:.4,target:{color:"#ff0000"}},verticalLine:{width:2},waterfall:{gap:.5,line:{color:"#000",width:1},spacing:.4}},title:{font:Kc},legend:{labels:{font:Zc}}}}var Xc,Yc=W,Wc=((Xc=Lc)&&($c.__proto__=Xc),(($c.prototype=Object.create(Xc&&Xc.prototype)).constructor=$c).prototype._initTheme=function(t){Xc.prototype._initTheme.call(this,t),this.options.color=this.options.color||(this.theme.pointer||{}).color},$c.prototype._createModel=function(){var t=this.options,e=this.scale=new Fc(t.scale,this.contextService),t=new Yc(e,L({},{colors:t.colors,color:t.color,value:t.value,opacity:t.opacity,animation:{transitions:t.transitions}}));this.pointers=[t]},$c.prototype._buildPointers=function(t){for(var e=0;e<t.length;e++){var i=t[e];i.render(),i.value(i.options.value)}},$c.prototype._setValueOptions=function(t){this.options.value=t},$c.prototype.currentColor=function(){var t=this.pointers[0];if(t)return t.currentColor()},$c.prototype.centerLabelPosition=function(t,e){var i,o=this.getSize(),r=this.scale.arc.center,n=r.x-t/2,r=r.y-e/2;return t<o.width&&(i=n+t,n=Math.max(n,0),i>o.width&&(n-=i-o.width)),e<o.height&&(o=(i=this.scale.bbox).bottomRight().y,e=r+e,r=Math.max(r,i.origin.y),o<e&&(r-=e-o)),{left:n,top:r}},$c),W="Arial, Helvetica, sans-serif",Zc="12px "+W,Kc="16px "+W;function $c(){Xc.apply(this,arguments)}i.d(e,"autoMajorUnit",function(){return Ft}),i.d(e,"Point",function(){return Ut}),i.d(e,"Box",function(){return qt}),i.d(e,"Ring",function(){return $t}),i.d(e,"Sector",function(){return Jt}),i.d(e,"ShapeBuilder",function(){return oe}),i.d(e,"ShapeElement",function(){return ce}),i.d(e,"ChartElement",function(){return se}),i.d(e,"BoxElement",function(){return he}),i.d(e,"RootElement",function(){return ye}),i.d(e,"FloatElement",function(){return xe}),i.d(e,"Text",function(){return we}),i.d(e,"TextBox",function(){return Ce}),i.d(e,"Title",function(){return Oe}),i.d(e,"AxisLabel",function(){return Be}),i.d(e,"Axis",function(){return Ue}),i.d(e,"Note",function(){return Le}),i.d(e,"CategoryAxis",function(){return Ai}),i.d(e,"DateCategoryAxis",function(){return ji}),i.d(e,"DateValueAxis",function(){return qi}),i.d(e,"NumericAxis",function(){return Hi}),i.d(e,"LogarithmicAxis",function(){return Ki}),i.d(e,"PolarAxis",function(){return eo}),i.d(e,"RadarCategoryAxis",function(){return Qi}),i.d(e,"RadarNumericAxis",function(){return so}),i.d(e,"RadarLogarithmicAxis",function(){return po}),i.d(e,"CurveProcessor",function(){return uo}),i.d(e,"Gradients",function(){return ue}),i.d(e,"rectToBox",function(){return Ae}),i.d(e,"Aggregates",function(){return So}),i.d(e,"AreaChart",function(){return Er}),i.d(e,"AreaSegment",function(){return Mr}),i.d(e,"AxisGroupRangeTracker",function(){return Fr}),i.d(e,"Bar",function(){return Wr}),i.d(e,"BarChart",function(){return an}),i.d(e,"BarLabel",function(){return Nr}),i.d(e,"BoxPlotChart",function(){return _n}),i.d(e,"BoxPlot",function(){return xn}),i.d(e,"BubbleChart",function(){return Ln}),i.d(e,"Bullet",function(){return Hn}),i.d(e,"BulletChart",function(){return qn}),i.d(e,"CandlestickChart",function(){return gn}),i.d(e,"Candlestick",function(){return hn}),i.d(e,"CategoricalChart",function(){return sr}),i.d(e,"CategoricalErrorBar",function(){return Jo}),i.d(e,"CategoricalPlotArea",function(){return ma}),i.d(e,"Chart",function(){return Jh}),i.d(e,"ChartContainer",function(){return is}),i.d(e,"ClipAnimation",function(){return wr}),i.d(e,"ClusterLayout",function(){return tn}),i.d(e,"Crosshair",function(){return Qn}),i.d(e,"CrosshairTooltip",function(){return Kn}),i.d(e,"DefaultAggregates",function(){return Os}),i.d(e,"DonutChart",function(){return Up}),i.d(e,"DonutPlotArea",function(){return Hp}),i.d(e,"DonutSegment",function(){return Lp}),i.d(e,"ErrorBarBase",function(){return $o}),i.d(e,"ErrorRangeCalculator",function(){return jo}),i.d(e,"Highlight",function(){return _a}),i.d(e,"SharedTooltip",function(){return rp}),i.d(e,"Legend",function(){return Na}),i.d(e,"LegendItem",function(){return za}),i.d(e,"LegendLayout",function(){return La}),i.d(e,"LineChart",function(){return Tr}),i.d(e,"LinePoint",function(){return lr}),i.d(e,"LineSegment",function(){return ur}),i.d(e,"Pane",function(){return ns}),i.d(e,"PieAnimation",function(){return dp}),i.d(e,"PieChart",function(){return Op}),i.d(e,"PieChartMixin",function(){return Pp}),i.d(e,"PiePlotArea",function(){return Ip}),i.d(e,"PieSegment",function(){return kp}),i.d(e,"PlotAreaBase",function(){return As}),i.d(e,"PlotAreaEventsMixin",function(){return Ss}),i.d(e,"PlotAreaFactory",function(){return Xa}),i.d(e,"PointEventsMixin",function(){return ar}),i.d(e,"RangeBar",function(){return Bs}),i.d(e,"RangeBarChart",function(){return Es}),i.d(e,"RangeAreaPoint",function(){return qs}),i.d(e,"RangeAreaChart",function(){return oa}),i.d(e,"ScatterChart",function(){return Rn}),i.d(e,"ScatterErrorBar",function(){return wn}),i.d(e,"ScatterLineChart",function(){return yp}),i.d(e,"Selection",function(){return Qa}),i.d(e,"SeriesAggregator",function(){return Cs}),i.d(e,"SeriesBinder",function(){return Ro}),i.d(e,"SplineSegment",function(){return xr}),i.d(e,"SplineAreaSegment",function(){return zr}),i.d(e,"StackWrap",function(){return rn}),i.d(e,"Tooltip",function(){return tp}),i.d(e,"OHLCChart",function(){return na}),i.d(e,"OHLCPoint",function(){return ra}),i.d(e,"WaterfallChart",function(){return ua}),i.d(e,"WaterfallSegment",function(){return ca}),i.d(e,"XYPlotArea",function(){return bp}),i.d(e,"MousewheelZoom",function(){return Va}),i.d(e,"ZoomSelection",function(){return Ba}),i.d(e,"Pannable",function(){return Ta}),i.d(e,"ChartAxis",function(){return go}),i.d(e,"ChartPane",function(){return xo}),i.d(e,"ChartPlotArea",function(){return bo}),i.d(e,"findAxisByName",function(){return vo}),i.d(e,"anyHasZIndex",function(){return Ar}),i.d(e,"appendIfNotNull",function(){return ss}),i.d(e,"areNumbers",function(){return ln}),i.d(e,"bindSegments",function(){return ps}),i.d(e,"categoriesCount",function(){return ir}),i.d(e,"countNumbers",function(){return wo}),i.d(e,"equalsIgnoreCase",function(){return hs}),i.d(e,"evalOptions",function(){return er}),i.d(e,"filterSeriesByType",function(){return ls}),i.d(e,"getDateField",function(){return cs}),i.d(e,"getField",function(){return ko}),i.d(e,"hasGradientOverlay",function(){return qr}),i.d(e,"hasValue",function(){return Pn}),i.d(e,"isDateAxis",function(){return us}),i.d(e,"segmentVisible",function(){return as}),i.d(e,"singleItemOrArray",function(){return ds}),i.d(e,"createOutOfRangePoints",function(){return vs}),i.d(e,"ChartService",function(){return Q}),i.d(e,"DomEventsBuilder",function(){return tt}),i.d(e,"FormatService",function(){return Z}),i.d(e,"IntlService",function(){return q}),i.d(e,"TemplateService",function(){return it}),i.d(e,"Sparkline",function(){return pl}),i.d(e,"Navigator",function(){return bl}),i.d(e,"NavigatorHint",function(){return gl}),i.d(e,"StockChart",function(){return Al}),i.d(e,"constants",function(){return o}),i.d(e,"Gauge",function(){return Ll}),i.d(e,"LinearGauge",function(){return gc}),i.d(e,"LinearPointer",function(){return Zl}),i.d(e,"ArrowLinearPointer",function(){return ic}),i.d(e,"BarLinearPointer",function(){return lc}),i.d(e,"LinearScale",function(){return Nl}),i.d(e,"RadialGauge",function(){return Lc}),i.d(e,"RadialPointer",function(){return Ic}),i.d(e,"RadialScale",function(){return Ac}),i.d(e,"ArcGauge",function(){return Wc}),i.d(e,"RangePointer",function(){return Yc}),i.d(e,"ArcScale",function(){return Fc}),i.d(e,"addClass",function(){return n}),i.d(e,"removeClass",function(){return _}),i.d(e,"alignPathToPixel",function(){return T}),i.d(e,"clockwise",function(){return M}),i.d(e,"convertableToNumber",function(){return I}),i.d(e,"deepExtend",function(){return L}),i.d(e,"elementStyles",function(){return D}),i.d(e,"getSpacing",function(){return U}),i.d(e,"getTemplate",function(){return ot}),i.d(e,"getter",function(){return st}),i.d(e,"grep",function(){return at}),i.d(e,"hasClasses",function(){return pt}),i.d(e,"HashMap",function(){return ht}),i.d(e,"inArray",function(){return lt}),i.d(e,"interpolateValue",function(){return ct}),i.d(e,"InstanceObserver",function(){return ut}),i.d(e,"isArray",function(){return x}),i.d(e,"isFunction",function(){return j}),i.d(e,"isNumber",function(){return R}),i.d(e,"isObject",function(){return z}),i.d(e,"isString",function(){return O}),i.d(e,"map",function(){return dt}),i.d(e,"mousewheelDelta",function(){return gt}),i.d(e,"FontLoader",function(){return Ot}),i.d(e,"setDefaultOptions",function(){return It}),i.d(e,"sparseArrayLimits",function(){return jt}),i.d(e,"styleValue",function(){return E}),i.d(e,"find",function(){return Bt}),i.d(e,"elementScale",function(){return Et}),i.d(e,"append",function(){return yt}),i.d(e,"bindEvents",function(){return vt}),i.d(e,"Class",function(){return C.Class}),i.d(e,"defined",function(){return mt}),i.d(e,"deg",function(){return xt}),i.d(e,"elementOffset",function(){return bt}),i.d(e,"elementSize",function(){return _t}),i.d(e,"eventElement",function(){return wt}),i.d(e,"eventCoordinates",function(){return At}),i.d(e,"last",function(){return St}),i.d(e,"limitValue",function(){return kt}),i.d(e,"logToConsole",function(){return C.logToConsole}),i.d(e,"objectKey",function(){return Pt}),i.d(e,"rad",function(){return Ct}),i.d(e,"round",function(){return Tt}),i.d(e,"unbindEvents",function(){return Mt}),i.d(e,"valueOrDefault",function(){return Rt}),i.d(e,"chartBaseTheme",function(){return qc}),function(t){for(var e in t)Jc(e,t[e])}(e)}],o.c=r,o.d=function(t,e,i){o.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:i})},o.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},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=1)}}});
1
+ System.register("@progress/kendo-charts",["@progress/kendo-drawing"],function(Jc){var n;return{setters:[function(t){n=t.__useDefault?t.default:t}],execute:function(){function o(t){if(r[t])return r[t].exports;var e=r[t]={i:t,l:!1,exports:{}};return i[t].call(e.exports,e,e.exports,o),e.l=!0,e.exports}var i,r;r={},o.m=i=[function(t,e){t.exports=n},function(t,e,i){"use strict";i.r(e);var o={};i.d(o,"NAVIGATOR_AXIS",function(){return yl}),i.d(o,"NAVIGATOR_PANE",function(){return fl});var d="arc",a="#000",w="bottom",A="center",u="circle",y="date",f=10,s=/\{\d+:?/,S="left",l=Number.MAX_VALUE,c=-Number.MAX_VALUE,r="none",k="right",g="string",P="top",h="value",p="#fff",v="x",m="y";function x(t){return Array.isArray(t)}function n(t,e){for(var i=x(e)?e:[e],o=0;o<i.length;o++){var r=i[o];-1===t.className.indexOf(r)&&(t.className+=" "+r)}}var b=/\s+/g;function _(t,e){t&&t.className&&(t.className=t.className.replace(e,"").replace(b," "))}var C=i(0);function T(t){var e=.5;t.options.stroke&&C.drawing.util.defined(t.options.stroke.width)&&t.options.stroke.width%2==0&&(e=0);for(var i=0;i<t.segments.length;i++)t.segments[i].anchor().round(0).translate(e,e);return t}function M(t,e){return-t.x*e.y+t.y*e.x<0}function R(t){return"number"==typeof t&&!isNaN(t)}function O(t){return typeof t===g}function I(t){return R(t)||O(t)&&isFinite(t)}function j(t){return"function"==typeof t}var B="object",V="undefined";function L(t){for(var e=arguments,i=arguments.length,o=1;o<i;o++)!function t(e,i){for(var o in i){var r=i[o],n=typeof r,s=void 0;(s=n===B&&null!==r?r.constructor:null)&&s!==Array?r instanceof Date?e[o]=new Date(r.getTime()):j(r.clone)?e[o]=r.clone():(s=e[o],e[o]=typeof s===B&&s||{},t(e[o],r)):n!==V&&(e[o]=r)}return e}(t,e[o]);return t}function z(t){return"object"==typeof t}function E(t){return R(t)?t+"px":t}var F=/width|height|top|left|bottom|right/i;function D(t,e){var i,o=O(e)?[e]:e;if(x(o)){for(var r={},n=window.getComputedStyle(t),s=0;s<o.length;s++){var a=o[s];r[a]=(i=a,F.test(i)?parseFloat(n[a]):n[a])}return r}if(z(e))for(var p in e)t.style[p]=E(e[p])}function U(t,e){void 0===e&&(e=0);var i={top:0,right:0,bottom:0,left:0};return"number"==typeof t?i[P]=i[k]=i[w]=i[S]=t:(i[P]=t[P]||e,i[k]=t[k]||e,i[w]=t[w]||e,i[S]=t[S]||e),i}var H={format:function(t,e){return e},toString:function(t){return t},parseDate:function(t){return new Date(t)},firstDay:function(){return 0}},G=function(){},N={implementation:{configurable:!0}};G.register=function(t){H=t},N.implementation.get=function(){return H},Object.defineProperties(G,N);var q=G,X=/\{(\d+)(:[^\}]+)?\}/g,Y=function(t){this._intlService=t},W={intl:{configurable:!0}};W.intl.get=function(){return this._intlService||q.implementation},W.intl.set=function(t){this._intlService=t},Y.prototype.auto=function(t){for(var e=[],i=arguments.length-1;0<i--;)e[i]=arguments[i+1];var o=this.intl;return O(t)&&t.match(s)?o.format.apply(o,[t].concat(e)):o.toString(e[0],t)},Y.prototype.localeAuto=function(t,o,r){var n=this.intl;return O(t)&&t.match(s)?t.replace(X,function(t,e,i){e=o[parseInt(e,10)];return n.toString(e,i?i.substring(1):"",r)}):n.toString(o[0],t,r)},Object.defineProperties(Y.prototype,W);var Z=Y,K=function(t,e){void 0===e&&(e={}),this._intlService=e.intlService,this.sender=e.sender||t,this.format=new Z(e.intlService),this.chart=t,this.rtl=Boolean(e.rtl)},$={intl:{configurable:!0}};$.intl.get=function(){return this._intlService||q.implementation},$.intl.set=function(t){this._intlService=t,this.format.intl=t},K.prototype.notify=function(t,e){this.chart&&this.chart.trigger(t,e)},K.prototype.isPannable=function(t){var e=((this.chart||{}).options||{}).pannable;return e&&e.lock!==t},Object.defineProperties(K.prototype,$);var J,Q=K,N=function(){};N.register=function(t){J=t},N.create=function(t,e){if(J)return J.create(t,e)};var tt=N,et={compile:function(t){return t}},G=function(){};G.register=function(t){et=t},G.compile=function(t){return et.compile(t)};var it=G;function ot(t){var e;return void 0===t&&(t={}),t.template?t.template=e=it.compile(t.template):j(t.content)&&(e=t.content),e}var rt=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g,nt={};function st(t){if(nt[t])return nt[t];var r=[];return t.replace(rt,function(t,e,i,o){r.push(C.drawing.util.defined(e)?e:i||o)}),nt[t]=function(t){for(var e=t,i=0;i<r.length&&e;i++)e=e[r[i]];return e},nt[t]}function at(t,e){for(var i=t.length,o=[],r=0;r<i;r++)e(t[r])&&o.push(t[r]);return o}function pt(t,e){if(t.className)for(var i=e.split(" "),o=0;o<i.length;o++)if(-1!==t.className.indexOf(i[o]))return!0}nt[void 0]=function(t){return t};W=function(){this._map={}};W.prototype.get=function(t){return this._map[this._key(t)]},W.prototype.set=function(t,e){this._map[this._key(t)]=e},W.prototype._key=function(t){return t instanceof Date?t.getTime():t};var ht=W;function lt(t,e){if(e)return-1!==e.indexOf(t)}function ct(t,e,i){return C.drawing.util.round(t+(e-t)*i,3)}Y=function(t,e){this.observer=t,this.handlerMap=L({},this.handlerMap,e)};Y.prototype.trigger=function(t,e){var i,o=this.observer,r=this.handlerMap;return r[t]?i=this.callObserver(r[t],e):o.trigger&&(i=this.callObserver("trigger",t,e)),i},Y.prototype.callObserver=function(t){for(var e=[],i=arguments.length-1;0<i--;)e[i]=arguments[i+1];return this.observer[t].apply(this.observer,e)},Y.prototype.requiresHandlers=function(t){if(this.observer.requiresHandlers)return this.observer.requiresHandlers(t);for(var e=0;e<t.length;e++)if(this.handlerMap[t[e]])return!0};var ut=Y;function dt(t,e){for(var i=t.length,o=[],r=0;r<i;r++){var n=e(t[r]);C.drawing.util.defined(n)&&o.push(n)}return o}function gt(t){var e=0;return t.wheelDelta&&(e=0<(e=-t.wheelDelta/120)?Math.ceil(e):Math.floor(e)),t.detail&&(e=C.drawing.util.round(t.detail/3)),e}function ft(){}var $=C.drawing.util,yt=$.append,vt=$.bindEvents,mt=$.defined,xt=$.deg,bt=$.elementOffset,_t=$.elementSize,wt=$.eventElement,At=$.eventCoordinates,St=$.last,kt=$.limitValue,Pt=$.objectKey,Ct=$.rad,Tt=$.round,Mt=$.unbindEvents,Rt=$.valueOrDefault;ft.fetchFonts=function(i,o,r){void 0===r&&(r={depth:0}),!i||5<r.depth||!document.fonts||Object.keys(i).forEach(function(t){var e=i[t];"dataSource"!==t&&"$"!==t[0]&&e&&("font"===t?o.push(e):"object"==typeof e&&(r.depth++,ft.fetchFonts(e,o,r),r.depth--))})},ft.loadFonts=function(t,e){var i=[];if(0<t.length&&document.fonts){try{i=t.map(function(t){return document.fonts.load(t)})}catch(t){Object(C.logToConsole)(t)}Promise.all(i).then(e,e)}else e()},ft.preloadFonts=function(t,e){var i=[];ft.fetchFonts(t,i),ft.loadFonts(i,e)};var Ot=ft;function It(t,e){t=t.prototype;t.options?t.options=L({},t.options,e):t.options=e}function jt(t){for(var e=l,i=c,o=0,r=t.length;o<r;o++){var n=t[o];null!==n&&isFinite(n)&&(e=Math.min(e,n),i=Math.max(i,n))}return{min:e===l?void 0:e,max:i===c?void 0:i}}function Bt(t,e){for(var i=0;i<t.length;i++){var o=t[i];if(e(o,i,t))return o}}var Vt=C.geometry.Matrix,Lt=/matrix\((.*)\)/;function zt(t){var e=getComputedStyle(t).transform;return"none"===e?Vt.unit():function(){var t=e.match(Lt);if(null===t||2!==t.length)return Vt.unit();t=t[1].split(",").map(function(t){return parseFloat(t)});return new(Function.prototype.bind.apply(Vt,[null].concat(t)))}()}function Et(t){if(!t)return Vt.unit();for(var e=zt(t),i=t.parentElement;i;)var o=zt(i),e=e.multiplyCopy(o),i=i.parentElement;return e.b=e.c=e.e=e.f=0,e}function Ft(t,e){t=Tt(e-t,f-1);if(0===t){if(0===e)return.1;t=Math.abs(e)}e=Math.pow(10,Math.floor(Math.log(t)/Math.log(10))),t=Tt(t/e,f);return Tt(e*(t<1.904762?.2:t<4.761904?.5:t<9.523809?1:2),f)}var Dt,Ut=((Dt=C.Class)&&(Ht.__proto__=Dt),((Ht.prototype=Object.create(Dt&&Dt.prototype)).constructor=Ht).prototype.clone=function(){return new Ht(this.x,this.y)},Ht.prototype.equals=function(t){return t&&this.x===t.x&&this.y===t.y},Ht.prototype.rotate=function(t,e){var i=Ct(e),o=Math.cos(i),r=Math.sin(i),n=t.x,e=t.y,i=this.x,t=this.y;return this.x=Tt(n+(i-n)*o+(t-e)*r,3),this.y=Tt(e+(t-e)*o-(i-n)*r,3),this},Ht.prototype.multiply=function(t){return this.x*=t,this.y*=t,this},Ht.prototype.distanceTo=function(t){var e=this.x-t.x,t=this.y-t.y;return Math.sqrt(e*e+t*t)},Ht.onCircle=function(t,e,i){e=Ct(e);return new Ht(t.x-i*Math.cos(e),t.y-i*Math.sin(e))},Ht);function Ht(t,e){Dt.call(this),this.x=t||0,this.y=e||0}function Gt(t,e,i,o,r){r=Ct(r);return new Ut(i+(t-i)*Math.cos(r)+(e-o)*Math.sin(r),o-(t-i)*Math.sin(r)+(e-o)*Math.cos(r))}var Nt,qt=((Nt=C.Class)&&(Xt.__proto__=Nt),((Xt.prototype=Object.create(Nt&&Nt.prototype)).constructor=Xt).prototype.equals=function(t){return this.x1===t.x1&&this.x2===t.x2&&this.y1===t.y1&&this.y2===t.y2},Xt.prototype.width=function(){return this.x2-this.x1},Xt.prototype.height=function(){return this.y2-this.y1},Xt.prototype.translate=function(t,e){return this.x1+=t,this.x2+=t,this.y1+=e,this.y2+=e,this},Xt.prototype.move=function(t,e){var i=this.height(),o=this.width();return mt(t)&&(this.x1=t,this.x2=this.x1+o),mt(e)&&(this.y1=e,this.y2=this.y1+i),this},Xt.prototype.wrap=function(t){return this.x1=Math.min(this.x1,t.x1),this.y1=Math.min(this.y1,t.y1),this.x2=Math.max(this.x2,t.x2),this.y2=Math.max(this.y2,t.y2),this},Xt.prototype.wrapPoint=function(t){var e=x(t),i=e?t[0]:t.x,t=e?t[1]:t.y;return this.wrap(new Xt(i,t,i,t)),this},Xt.prototype.snapTo=function(t,e){return e!==v&&e||(this.x1=t.x1,this.x2=t.x2),e!==m&&e||(this.y1=t.y1,this.y2=t.y2),this},Xt.prototype.alignTo=function(t,e){var i,o,r=this.height(),n=this.width(),s=e===P||e===w?m:v,a=s==m?r:n;return e===A?(i=t.center(),o=this.center(),this.x1+=i.x-o.x,this.y1+=i.y-o.y):this[s+1]=e===P||e===S?t[s+1]-a:t[s+2],this.x2=this.x1+n,this.y2=this.y1+r,this},Xt.prototype.shrink=function(t,e){return this.x2-=t,this.y2-=e,this},Xt.prototype.expand=function(t,e){return this.shrink(-t,-e),this},Xt.prototype.pad=function(t){t=U(t);return this.x1-=t.left,this.x2+=t.right,this.y1-=t.top,this.y2+=t.bottom,this},Xt.prototype.unpad=function(t){t=U(t);return t.left=-t.left,t.top=-t.top,t.right=-t.right,t.bottom=-t.bottom,this.pad(t)},Xt.prototype.clone=function(){return new Xt(this.x1,this.y1,this.x2,this.y2)},Xt.prototype.center=function(){return new Ut(this.x1+this.width()/2,this.y1+this.height()/2)},Xt.prototype.containsPoint=function(t){return t.x>=this.x1&&t.x<=this.x2&&t.y>=this.y1&&t.y<=this.y2},Xt.prototype.points=function(){return[new Ut(this.x1,this.y1),new Ut(this.x2,this.y1),new Ut(this.x2,this.y2),new Ut(this.x1,this.y2)]},Xt.prototype.getHash=function(){return[this.x1,this.y1,this.x2,this.y2].join(",")},Xt.prototype.overlaps=function(t){return!(t.y2<this.y1||this.y2<t.y1||t.x2<this.x1||this.x2<t.x1)},Xt.prototype.rotate=function(t){var e=this.width(),i=this.height(),o=this.center(),r=o.x,n=o.y,s=Gt(0,0,r,n,t),a=Gt(e,0,r,n,t),o=Gt(e,i,r,n,t),t=Gt(0,i,r,n,t),e=Math.max(s.x,a.x,o.x,t.x)-Math.min(s.x,a.x,o.x,t.x),i=Math.max(s.y,a.y,o.y,t.y)-Math.min(s.y,a.y,o.y,t.y);return this.x2=this.x1+e,this.y2=this.y1+i,this},Xt.prototype.toRect=function(){return new C.geometry.Rect([this.x1,this.y1],[this.width(),this.height()])},Xt.prototype.hasSize=function(){return 0!==this.width()&&0!==this.height()},Xt.prototype.align=function(t,e,i){var o=e+1,r=e+2,n=e===v?"width":"height",e=this[n]();lt(i,[S,P])?(this[o]=t[o],this[r]=this[o]+e):lt(i,[k,w])?(this[r]=t[r],this[o]=this[r]-e):i===A&&(this[o]=t[o]+(t[n]()-e)/2,this[r]=this[o]+e)},Xt);function Xt(t,e,i,o){Nt.call(this),this.x1=t||0,this.y1=e||0,this.x2=i||0,this.y2=o||0}function Yt(t,e){return t-e}var Wt,Zt,Kt,$t=((Kt=C.Class)&&(ee.__proto__=Kt),((ee.prototype=Object.create(Kt&&Kt.prototype)).constructor=ee).prototype.clone=function(){return new ee(this.center,this.innerRadius,this.radius,this.startAngle,this.angle)},ee.prototype.middle=function(){return this.startAngle+this.angle/2},ee.prototype.setRadius=function(t,e){return e?this.innerRadius=t:this.radius=t,this},ee.prototype.point=function(t,e){var i=Ct(t),t=Math.cos(i),i=Math.sin(i),e=e?this.innerRadius:this.radius,t=Tt(this.center.x-t*e,3),e=Tt(this.center.y-i*e,3);return new Ut(t,e)},ee.prototype.adjacentBox=function(t,e,i){var o=this.clone().expand(t),r=o.middle(),n=o.point(r),s=e/2,a=i/2,t=Math.sin(Ct(r)),o=Math.cos(Ct(r)),r=n.x-s,n=n.y-a;return Math.abs(t)<.9&&(r+=s*-o/Math.abs(o)),Math.abs(o)<.9&&(n+=a*-t/Math.abs(t)),new qt(r,n,r+e,n+i)},ee.prototype.containsPoint=function(t){var e=this.center,i=this.innerRadius,o=this.radius,r=this.startAngle,n=this.startAngle+this.angle,s=t.x-e.x,a=t.y-e.y,t=new Ut(s,a),r=this.point(r),r=new Ut(r.x-e.x,r.y-e.y),n=this.point(n),e=new Ut(n.x-e.x,n.y-e.y),a=Tt(s*s+a*a,3);return(r.equals(t)||M(r,t))&&!M(e,t)&&i*i<=a&&a<=o*o},ee.prototype.getBBox=function(){for(var t=new qt(l,l,c,c),e=Tt(this.startAngle%360),i=Tt((e+this.angle)%360),o=this.innerRadius,r=[0,90,180,270,e,i].sort(Yt),n=r.indexOf(e),s=r.indexOf(i),a=e===i?r:n<s?r.slice(n,s+1):[].concat(r.slice(0,s+1),r.slice(n,r.length)),p=0;p<a.length;p++){var h=this.point(a[p]);t.wrapPoint(h),t.wrapPoint(h,o)}return o||t.wrapPoint(this.center),t},ee.prototype.expand=function(t){return this.radius+=t,this},ee),Jt=((Zt=$t)&&(te.__proto__=Zt),((te.prototype=Object.create(Zt&&Zt.prototype)).constructor=te).prototype.expand=function(t){return Zt.prototype.expand.call(this,t)},te.prototype.clone=function(){return new te(this.center,this.radius,this.startAngle,this.angle)},te.prototype.setRadius=function(t){return this.radius=t,this},te),K=((Wt=C.Class)&&(Qt.__proto__=Wt),((Qt.prototype=Object.create(Wt&&Wt.prototype)).constructor=Qt).prototype.createRing=function(t,e){var i=t.startAngle+180,o=t.angle+i;0<t.angle&&i===o&&(o+=.001);var r=new C.geometry.Point(t.center.x,t.center.y),n=Math.max(t.radius,0),t=Math.max(t.innerRadius,0),n=new C.geometry.Arc(r,{startAngle:i,endAngle:o,radiusX:n,radiusY:n}),e=C.drawing.Path.fromArc(n,e).close();return t?(n.radiusX=n.radiusY=t,n=n.pointAt(o),e.lineTo(n.x,n.y),e.arc(o,i,t,t,!0)):e.lineTo(r.x,r.y),e},Qt);function Qt(){Wt.apply(this,arguments)}function te(t,e,i,o){Zt.call(this,t,0,e,i,o)}function ee(t,e,i,o,r){Kt.call(this),this.center=t,this.innerRadius=e,this.radius=i,this.startAngle=o,this.angle=r}K.current=new K;var ie,oe=K,N=((ie=C.Class)&&(re.__proto__=ie),((re.prototype=Object.create(ie&&ie.prototype)).constructor=re).prototype.initUserOptions=function(t){return t},re.prototype.reflow=function(t){for(var e,i=this.children,o=0;o<i.length;o++){var r=i[o];r.reflow(t),e=e?e.wrap(r.box):r.box.clone()}this.box=e||t},re.prototype.destroy=function(){var t=this.children;this.animation&&this.animation.destroy();for(var e=0;e<t.length;e++)t[e].destroy()},re.prototype.getRoot=function(){var t=this.parent;return t?t.getRoot():null},re.prototype.getSender=function(){var t=this.getService();if(t)return t.sender},re.prototype.getService=function(){for(var t=this;t;){if(t.chartService)return t.chartService;t=t.parent}},re.prototype.translateChildren=function(t,e){for(var i=this.children,o=i.length,r=0;r<o;r++)i[r].box.translate(t,e)},re.prototype.append=function(){for(var t=arguments,e=0;e<arguments.length;e++){var i=t[e];this.children.push(i),i.parent=this}},re.prototype.renderVisual=function(){!1!==this.options.visible&&(this.createVisual(),this.addVisual(),this.renderChildren(),this.createAnimation(),this.renderComplete())},re.prototype.addVisual=function(){this.visual&&((this.visual.chartElement=this).parent&&this.parent.appendVisual(this.visual))},re.prototype.renderChildren=function(){for(var t=this.children,e=t.length,i=0;i<e;i++)t[i].renderVisual()},re.prototype.createVisual=function(){this.visual=new C.drawing.Group({zIndex:this.options.zIndex,visible:Rt(this.options.visible,!0)})},re.prototype.createAnimation=function(){this.visual&&this.options.animation&&(this.animation=C.drawing.Animation.create(this.visual,this.options.animation))},re.prototype.appendVisual=function(t){t.chartElement||(t.chartElement=this),t.options.noclip?this.clipRoot().visual.append(t):mt(t.options.zIndex)?this.stackRoot().stackVisual(t):this.isStackRoot?this.stackVisual(t):this.visual?this.visual.append(t):this.parent.appendVisual(t)},re.prototype.clipRoot=function(){return this.parent?this.parent.clipRoot():this},re.prototype.stackRoot=function(){return this.parent?this.parent.stackRoot():this},re.prototype.stackVisual=function(t){for(var e=t.options.zIndex||0,i=this.visual.children,o=i.length,r=0;r<o;r++){var n=i[r];if(Rt(n.options.zIndex,0)>e)break}this.visual.insert(r,t)},re.prototype.traverse=function(t){for(var e=this.children,i=e.length,o=0;o<i;o++){var r=e[o];t(r),r.traverse&&r.traverse(t)}},re.prototype.closest=function(t){for(var e=this,i=!1;e&&!i;)(i=t(e))||(e=e.parent);if(i)return e},re.prototype.renderComplete=function(){},re.prototype.hasHighlight=function(){var t=(this.options||{}).highlight;return!(!this.createHighlight||t&&!1===t.visible)},re.prototype.toggleHighlight=function(t,e){var i=this,o=(this.options||{}).highlight||{},r=o.visual,n=this._highlight;if(!n){var s={fill:{color:p,opacity:e||.2},stroke:{color:p,width:1,opacity:e||.2}};if(r){if(!(n=this._highlight=r(Object.assign(this.highlightVisualArgs(),{createVisual:function(){return i.createHighlight(s)},sender:this.getSender(),series:this.series,dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,runningTotal:this.runningTotal,total:this.total}))))return}else n=this._highlight=this.createHighlight(s);mt(n.options.zIndex)||(n.options.zIndex=Rt(o.zIndex,this.options.zIndex)),this.appendVisual(n)}n.visible(t)},re.prototype.createGradientOverlay=function(t,e,i){e=new C.drawing.Path(Object.assign({stroke:{color:"none"},fill:this.createGradient(i),closed:t.options.closed},e));return e.segments.elements(t.segments.elements()),e},re.prototype.createGradient=function(t){if(this.parent)return this.parent.createGradient(t)},re.prototype.supportsPointInactiveOpacity=function(){return!0},re);function re(t){ie.call(this),this.children=[],this.options=L({},this.options,this.initUserOptions(t))}N.prototype.options={};var ne,se=N,G=((ne=se)&&(ae.__proto__=ne),((ae.prototype=Object.create(ne&&ne.prototype)).constructor=ae).prototype.reflow=function(t){function e(){o.align(t,v,r.align),o.align(t,m,r.vAlign),o.paddingBox=i.clone().unpad(h).unpad(c)}var i,o=this,r=this.options,n=r.width,s=r.height,a=r.shrinkToFit,p=n&&s,h=r.margin,l=r.padding,c=r.border.width,u=t.clone();p&&(u.x2=u.x1+n,u.y2=u.y1+s),a&&u.unpad(h).unpad(c).unpad(l),ne.prototype.reflow.call(this,u),i=p?this.box=new qt(0,0,n,s):this.box,a&&p?(e(),u=this.contentBox=this.paddingBox.clone().unpad(l)):(u=this.contentBox=i.clone(),i.pad(l).pad(c).pad(h),e()),this.translateChildren(i.x1-u.x1+h.left+c+l.left,i.y1-u.y1+h.top+c+l.top);for(var d=this.children,g=0;g<d.length;g++){var f=d[g];f.reflow(f.box)}},ae.prototype.align=function(t,e,i){this.box.align(t,e,i)},ae.prototype.hasBox=function(){var t=this.options;return t.border.width||t.background},ae.prototype.createVisual=function(){ne.prototype.createVisual.call(this),this.options.visible&&this.hasBox()&&this.visual.append(C.drawing.Path.fromRect(this.paddingBox.toRect(),this.visualStyle()))},ae.prototype.visualStyle=function(){var t=this.options,e=t.border||{};return{stroke:{width:e.width,color:e.color,opacity:Rt(e.opacity,t.opacity),dashType:e.dashType},fill:{color:t.background,opacity:t.opacity},cursor:t.cursor}},ae);function ae(t){ne.call(this,t),this.options.margin=U(this.options.margin),this.options.padding=U(this.options.padding)}It(G,{align:S,vAlign:P,margin:{},padding:{},border:{color:a,width:0},background:"",shrinkToFit:!1,width:0,height:0,visible:!0});var pe,he=G,W=((pe=he)&&(le.__proto__=pe),((le.prototype=Object.create(pe&&pe.prototype)).constructor=le).prototype.getElement=function(){var t=this.options,e=this.paddingBox,i=t.type,o=t.rotation,r=e.center(),n=e.width()/2;if(!t.visible||!this.hasBox())return null;var s,a=this.visualStyle();return i===u?s=new C.drawing.Circle(new C.geometry.Circle([Tt(e.x1+n,3),Tt(e.y1+e.height()/2,3)],n),a):"triangle"===i?s=C.drawing.Path.fromPoints([[e.x1+n,e.y1],[e.x1,e.y2],[e.x2,e.y2]],a).close():"cross"===i?((s=new C.drawing.MultiPath(a)).moveTo(e.x1,e.y1).lineTo(e.x2,e.y2),s.moveTo(e.x1,e.y2).lineTo(e.x2,e.y1)):s=C.drawing.Path.fromRect(e.toRect(),a),o&&s.transform(C.geometry.transform().rotate(-o,[r.x,r.y])),s.options.zIndex=t.zIndex,s},le.prototype.createElement=function(){var t=this,e=this.options.visual,i=this.pointData||{};return e?e({value:i.value,dataItem:i.dataItem,sender:this.getSender(),series:i.series,category:i.category,rect:this.paddingBox.toRect(),options:this.visualOptions(),createVisual:function(){return t.getElement()}}):this.getElement()},le.prototype.visualOptions=function(){var t=this.options;return{background:t.background,border:t.border,margin:t.margin,padding:t.padding,type:t.type,size:t.width,visible:t.visible}},le.prototype.createVisual=function(){this.visual=this.createElement()},le);function le(t,e){pe.call(this,t),this.pointData=e}It(W,{type:u,align:A,vAlign:A});var ce=W,ue={glass:{type:"linear",rotation:0,stops:[{offset:0,color:p,opacity:0},{offset:.25,color:p,opacity:.3},{offset:1,color:p,opacity:0}]},sharpBevel:{type:"radial",stops:[{offset:0,color:p,opacity:.55},{offset:.65,color:p,opacity:0},{offset:.95,color:p,opacity:.25}]},roundedBevel:{type:"radial",stops:[{offset:.33,color:p,opacity:.06},{offset:.83,color:p,opacity:.2},{offset:.95,color:p,opacity:0}]},roundedGlass:{type:"radial",supportVML:!1,stops:[{offset:0,color:p,opacity:0},{offset:.5,color:p,opacity:.3},{offset:.99,color:p,opacity:0}]},sharpGlass:{type:"radial",supportVML:!1,stops:[{offset:0,color:p,opacity:.2},{offset:.15,color:p,opacity:.15},{offset:.17,color:p,opacity:.35},{offset:.85,color:p,opacity:.05},{offset:.87,color:p,opacity:.15},{offset:.99,color:p,opacity:0}]},bubbleShadow:{type:"radial",center:[.5,.5],radius:.5}};var de,Y=((de=se)&&(ge.__proto__=de),((ge.prototype=Object.create(de&&de.prototype)).constructor=ge).prototype.reflow=function(){var t=this.options,e=this.children,i=new qt(0,0,t.width,t.height);this.box=i.unpad(t.margin);for(var o=0;o<e.length;o++)e[o].reflow(i),i=function(t,e){if(t.x1===e.x1&&t.y1===e.y1&&t.x2===e.x2&&t.y2===e.y2)return e;var i=Math.min(t.x1,e.x1),o=Math.max(t.x1,e.x1),r=Math.min(t.x2,e.x2),n=Math.max(t.x2,e.x2),s=Math.min(t.y1,e.y1),a=Math.max(t.y1,e.y1),p=Math.min(t.y2,e.y2),h=Math.max(t.y2,e.y2),l=[];return l[0]=new qt(o,s,r,a),l[1]=new qt(i,a,o,p),l[2]=new qt(r,a,n,p),l[3]=new qt(o,p,r,h),t.x1===i&&t.y1===s||e.x1===i&&e.y1===s?(l[4]=new qt(i,s,o,a),l[5]=new qt(r,p,n,h)):(l[4]=new qt(r,s,n,a),l[5]=new qt(i,p,o,h)),at(l,function(t){return 0<t.height()&&0<t.width()})[0]}(i,e[o].box)||new qt},ge.prototype.createVisual=function(){this.visual=new C.drawing.Group,this.createBackground()},ge.prototype.createBackground=function(){var t=this.options,e=t.border||{},i=this.box.clone().pad(t.margin).unpad(e.width),t=C.drawing.Path.fromRect(i.toRect(),{stroke:{color:e.width?e.color:"",width:e.width,dashType:e.dashType},fill:{color:t.background,opacity:t.opacity},zIndex:-10});this.visual.append(t)},ge.prototype.getRoot=function(){return this},ge.prototype.createGradient=function(t){var e,s,i=this.gradients,o=Pt(t),r=ue[t.gradient];return i[o]?e=i[o]:(s=Object.assign({},r,t),"linear"===r.type?e=new C.drawing.LinearGradient(s):(t.innerRadius&&(s.stops=function(){for(var t=s.stops,e=s.innerRadius/s.radius*100,i=t.length,o=[],r=0;r<i;r++){var n=Object.assign({},t[r]);n.offset=(n.offset*(100-e)+e)/100,o.push(n)}return o}()),(e=new C.drawing.RadialGradient(s)).supportVML=!1!==r.supportVML),i[o]=e),e},ge.prototype.cleanGradients=function(){var t,e=this.gradients;for(t in e)e[t]._observers=[]},ge.prototype.size=function(){var t=this.options;return new qt(0,0,t.width,t.height)},ge);function ge(t){de.call(this,t);t=this.options;t.width=parseInt(t.width,10),t.height=parseInt(t.height,10),this.gradients={}}It(Y,{width:600,height:400,background:p,border:{color:a,width:0},margin:U(5),zIndex:-2});var fe,ye=Y,$=((fe=se)&&(ve.__proto__=fe),((ve.prototype=Object.create(fe&&fe.prototype)).constructor=ve).prototype._initDirection=function(){var t=this.options;t.vertical?(this.groupAxis=v,this.elementAxis=m,this.groupSizeField="width",this.elementSizeField="height",this.groupSpacing=t.spacing,this.elementSpacing=t.vSpacing):(this.groupAxis=m,this.elementAxis=v,this.groupSizeField="height",this.elementSizeField="width",this.groupSpacing=t.vSpacing,this.elementSpacing=t.spacing)},ve.prototype.reflow=function(t){this.box=t.clone(),this.reflowChildren()},ve.prototype.reflowChildren=function(){var t=this.box,e=this.elementAxis,i=this.groupAxis,o=this.elementSizeField,r=this.groupSizeField,n=this.groupOptions(),s=n.groups,a=n.groupsSize,p=n.maxGroupElementsSize,h=s.length,n=t[i+1]+this.alignStart(a,t[r]());if(h){for(var l=n,c=0;c<h;c++){for(var u=s[c],d=u.groupElements,g=t[e+1],f=d.length,y=0;y<f;y++){var v=d[y],m=this.elementSize(v),x=l+this.alignStart(m[r],u.groupSize),b=new qt;b[i+1]=x,b[i+2]=x+m[r],b[e+1]=g,b[e+2]=g+m[o],v.reflow(b),g+=m[o]+this.elementSpacing}l+=u.groupSize+this.groupSpacing}t[i+1]=n,t[i+2]=n+a,t[e+2]=t[e+1]+p}},ve.prototype.alignStart=function(t,e){var i=0,o=this.options.align;return o===k||o===w?i=e-t:o===A&&(i=(e-t)/2),i},ve.prototype.groupOptions=function(){for(var t=this.box,e=this.children,i=this.elementSizeField,o=this.groupSizeField,r=this.elementSpacing,n=this.groupSpacing,s=Tt(t[i]()),a=e.length,p=[],h=0,l=0,c=0,u=0,d=[],g=0;g<a;g++){var f=e[g];f.box||f.reflow(t);var y=this.elementSize(f);this.options.wrap&&Tt(l+r+y[i])>s&&(p.push({groupElements:d,groupSize:h,groupElementsSize:l}),u=Math.max(u,l),c+=n+h,l=h=0,d=[]),h=Math.max(h,y[o]),0<l&&(l+=r),l+=y[i],d.push(f)}return p.push({groupElements:d,groupSize:h,groupElementsSize:l}),{groups:p,groupsSize:c+=h,maxGroupElementsSize:u=Math.max(u,l)}},ve.prototype.elementSize=function(t){return{width:t.box.width(),height:t.box.height()}},ve.prototype.createVisual=function(){},ve);function ve(t){fe.call(this,t),this._initDirection()}It($,{vertical:!0,wrap:!0,vSpacing:0,spacing:0});var me,xe=$,be=C.drawing.Text,K=((me=se)&&(_e.__proto__=me),((_e.prototype=Object.create(me&&me.prototype)).constructor=_e).prototype.reflow=function(t){var e=this.options,e=e.size=C.drawing.util.measureText(this.content,{font:e.font});this.baseline=e.baseline,this.box=new qt(t.x1,t.y1,t.x1+e.width,t.y1+e.height)},_e.prototype.createVisual=function(){var t=this.options,e=t.font,i=t.color,o=t.opacity,t=t.cursor;this.visual=new be(this.content,this.box.toRect().topLeft(),{font:e,fill:{color:i,opacity:o},cursor:t})},_e);function _e(t,e){me.call(this,e),this.content=t,this.reflow(new qt)}It(K,{font:"12px sans-serif",color:a});var we=K;function Ae(t){var e=t.origin,t=t.bottomRight();return new qt(e.x,e.y,t.x,t.y)}var Se,ke,Pe=/\n/m,Ce=((ke=he)&&(Me.__proto__=ke),((Me.prototype=Object.create(ke&&ke.prototype)).constructor=Me).prototype._initContainer=function(){var t=this.options,e=String(this.content).split(Pe),i=new xe({vertical:!0,align:t.align,wrap:!1}),o=L({},t,{opacity:1,animation:null});this.container=i,this.append(i);for(var r=0;r<e.length;r++){var n=new we(e[r].trim(),o);i.append(n)}},Me.prototype.reflow=function(t){var e,i=this.options,o=i.visual;this.container.options.align=i.align,o&&!this._boxReflow?((e=t).hasSize()||(this._boxReflow=!0,this.reflow(e),this._boxReflow=!1,e=this.box),(o=this.visual=o(this.visualContext(e)))&&(e=Ae(o.clippedBBox()||new C.geometry.Rect),o.options.zIndex=i.zIndex),this.box=this.contentBox=this.paddingBox=e):(ke.prototype.reflow.call(this,t),i.rotation&&(e=U(i.margin),i=this.box.unpad(e),this.targetBox=t,this.normalBox=i.clone(),(i=this.rotate()).translate(e.left-e.right,e.top-e.bottom),this.rotatedBox=i.clone(),i.pad(e)))},Me.prototype.createVisual=function(){var t=this.options;this.visual=new C.drawing.Group({transform:this.rotationTransform(),zIndex:t.zIndex,noclip:t.noclip}),this.hasBox()&&(t=C.drawing.Path.fromRect(this.paddingBox.toRect(),this.visualStyle()),this.visual.append(t))},Me.prototype.renderVisual=function(){var t;this.options.visible&&(this.options.visual?((t=this.visual)&&!mt(t.options.noclip)&&(t.options.noclip=this.options.noclip),this.addVisual(),this.createAnimation()):ke.prototype.renderVisual.call(this))},Me.prototype.visualContext=function(t){var e=this,i={text:this.content,rect:t.toRect(),sender:this.getSender(),options:this.options,createVisual:function(){return e._boxReflow=!0,e.reflow(t),e._boxReflow=!1,e.getDefaultVisual()}};return this.data&&Object.assign(i,this.data),i},Me.prototype.getDefaultVisual=function(){this.createVisual(),this.renderChildren();var t=this.visual;return delete this.visual,t},Me.prototype.rotate=function(){var t=this.options;return this.box.rotate(t.rotation),this.align(this.targetBox,v,t.align),this.align(this.targetBox,m,t.vAlign),this.box},Me.prototype.rotationTransform=function(){var t=this.options.rotation;if(!t)return null;var e=this.normalBox.center(),i=e.x,o=e.y,e=this.rotatedBox.center();return C.geometry.transform().translate(e.x-i,e.y-o).rotate(t,[i,o])},Me),N=((Se=se)&&(Te.__proto__=Se),((Te.prototype=Object.create(Se&&Se.prototype)).constructor=Te).prototype.reflow=function(t){Se.prototype.reflow.call(this,t),this.box.snapTo(t,v)},Te.buildTitle=function(t,e,i){var o,t="string"==typeof t?{text:t}:t;return(t=Object.assign({visible:!0},i,t))&&t.visible&&t.text&&(o=new Te(t),e.append(o)),o},Te);function Te(t){Se.call(this,t),this.append(new Ce(this.options.text,Object.assign({},this.options,{vAlign:this.options.position})))}function Me(t,e,i){ke.call(this,e),this.content=t,this.data=i,this._initContainer(),!1!==this.options._autoReflow&&this.reflow(new qt)}It(N,{color:a,position:P,align:A,margin:U(5),padding:U(5)});var Re,Oe=N,G=((Re=Ce)&&(Ie.__proto__=Re),((Ie.prototype=Object.create(Re&&Re.prototype)).constructor=Ie).prototype.visualContext=function(t){t=Re.prototype.visualContext.call(this,t);return t.value=this.value,t.dataItem=this.dataItem,t.format=this.options.format,t.culture=this.options.culture,t},Ie.prototype.click=function(t,e){t.trigger("axisLabelClick",{element:wt(e),value:this.value,text:this.text,index:this.index,dataItem:this.dataItem,axis:this.parent.options})},Ie.prototype.rotate=function(){var t,e;return this.options.alignRotation!==A?(t=this.normalBox.toRect(),e=this.rotationTransform(),this.box=Ae(t.bbox(e.matrix()))):Re.prototype.rotate.call(this),this.box},Ie.prototype.rotationTransform=function(){var t=this.options,e=t.rotation;if(!e)return null;if(t.alignRotation===A)return Re.prototype.rotationTransform.call(this);var i=C.geometry.transform().rotate(e).matrix(),o=this.normalBox.toRect(),r=this.targetBox.toRect(),n=t.rotationOrigin||P,s=n===P||n===w?v:m,a=n===P||n===w?m:v,p=n===P||n===S?r.origin:r.bottomRight(),h=o.topLeft().transformCopy(i),l=o.topRight().transformCopy(i),t=o.bottomRight().transformCopy(i),n=o.bottomLeft().transformCopy(i),o=C.geometry.Rect.fromPoints(h,l,t,n),i={};i[a]=r.origin[a]-o.origin[a];var o=Math.abs(h[a]+i[a]-p[a]),a=Math.abs(l[a]+i[a]-p[a]),n=Tt(o,f)===Tt(a,f)?(c=h,l):a<o?(c=l,t):(c=h,n),c=c[s]+(n[s]-c[s])/2;return i[s]=r.center()[s]-c,C.geometry.transform().translate(i.x,i.y).rotate(e)},Ie);function Ie(t,e,i,o,r){Re.call(this,e,r),this.text=e,this.value=t,this.index=i,this.dataItem=o,this.reflow(new qt)}It(G,{_autoReflow:!1});var je,Be=G,W=((je=he)&&(Ve.__proto__=je),((Ve.prototype=Object.create(je&&je.prototype)).constructor=Ve).prototype.hide=function(){this.options.visible=!1},Ve.prototype.show=function(){this.options.visible=!0},Ve.prototype.render=function(){var t,e,i,o,r,n,s,a,p=this,h=this.options;h.visible&&(i=h.label,a=h.icon,o=new qt,r=function(){return p},n=a.size,s=this.fields.text,mt(i)&&i.visible&&((h=ot(i))?s=h(this.fields):i.format&&(s=this.chartService.format.auto(i.format,s)),i.color||(i.color="inside"===i.position?"#fff":a.background),this.label=new Ce(s,L({},i)),this.label.aliasFor=r,"inside"!==i.position||mt(n)||(a.type===u?n=Math.max(this.label.box.width(),this.label.box.height()):(t=this.label.box.width(),e=this.label.box.height()),o.wrap(this.label.box))),a.width=t||n||7,a.height=e||n||7,(a=new ce(L({},a))).aliasFor=r,this.marker=a,this.append(a),this.label&&this.append(this.label),a.reflow(new qt),this.wrapperBox=o.wrap(a.box))},Ve.prototype.reflow=function(t){var e,i,o,r=this.options,n=this.label,s=this.marker,a=this.wrapperBox,p=t.center(),h=r.line.length,l=r.position;r.visible&&(lt(l,[S,k])?l===S?(o=a.alignTo(t,l).translate(-h,t.center().y-a.center().y),r.line.visible&&(e=[t.x1,p.y],this.linePoints=[e,[o.x2,p.y]],i=o.clone().wrapPoint(e))):(o=a.alignTo(t,l).translate(h,t.center().y-a.center().y),r.line.visible&&(e=[t.x2,p.y],this.linePoints=[e,[o.x1,p.y]],i=o.clone().wrapPoint(e))):l===w?(o=a.alignTo(t,l).translate(t.center().x-a.center().x,h),r.line.visible&&(e=[p.x,t.y2],this.linePoints=[e,[p.x,o.y1]],i=o.clone().wrapPoint(e))):(o=a.alignTo(t,l).translate(t.center().x-a.center().x,-h),r.line.visible&&(e=[p.x,t.y1],this.linePoints=[e,[p.x,o.y2]],i=o.clone().wrapPoint(e))),s&&s.reflow(o),n&&(n.reflow(o),s&&("outside"===r.label.position&&n.box.alignTo(s.box,l),n.reflow(n.box))),this.contentBox=o,this.targetBox=t,this.box=i||o)},Ve.prototype.createVisual=function(){je.prototype.createVisual.call(this),this.visual.options.noclip=this.options.noclip,this.options.visible&&this.createLine()},Ve.prototype.renderVisual=function(){var e=this,t=this.options,i=t.visual;t.visible&&i?(this.visual=i(Object.assign(this.fields,{sender:this.getSender(),rect:this.targetBox.toRect(),options:{background:t.background,border:t.background,icon:t.icon,label:t.label,line:t.line,position:t.position,visible:t.visible},createVisual:function(){e.createVisual(),e.renderChildren();var t=e.visual;return delete e.visual,t}})),this.addVisual()):je.prototype.renderVisual.call(this)},Ve.prototype.createLine=function(){var t=this.options.line;this.linePoints&&(T(t=C.drawing.Path.fromPoints(this.linePoints,{stroke:{color:t.color,width:t.width,dashType:t.dashType}})),this.visual.append(t))},Ve.prototype.click=function(t,e){var i=this.eventArgs(e);t.trigger("noteClick",i)||e.preventDefault()},Ve.prototype.over=function(t,e){var i=this.eventArgs(e);t.trigger("noteHover",i)||e.preventDefault()},Ve.prototype.out=function(t,e){e=this.eventArgs(e);t.trigger("noteLeave",e)},Ve.prototype.eventArgs=function(t){var e=this.options;return Object.assign(this.fields,{element:wt(t),text:mt(e.label)?e.label.text:"",visual:this.visual})},Ve);function Ve(t,e,i){je.call(this,e),this.fields=t,this.chartService=i,this.render()}It(W,{icon:{visible:!0,type:u},label:{position:"inside",visible:!0,align:A,vAlign:A},line:{visible:!0},visible:!0,position:P,zIndex:2});var Le=W;function ze(t,e){var i=t.tickX,o=t.tickY,r=t.position,n=new C.drawing.Path({stroke:{width:e.width,color:e.color}});return t.vertical?n.moveTo(i,r).lineTo(i+e.size,r):n.moveTo(r,o).lineTo(r,o+e.size),T(n),n}function Ee(t,e){var i=t.lineStart,o=t.lineEnd,r=t.position,e=new C.drawing.Path({stroke:{width:e.width,color:e.color,dashType:e.dashType}});return t.vertical?e.moveTo(i,r).lineTo(o,r):e.moveTo(r,i).lineTo(r,o),T(e),e}var Fe,Y=((Fe=se)&&(De.__proto__=Fe),((De.prototype=Object.create(Fe&&Fe.prototype)).constructor=De).prototype.initFields=function(){},De.prototype.labelsRange=function(){return{min:this.options.labels.skip,max:this.labelsCount()}},De.prototype.createLabels=function(){var t=this.options,e=t.vertical?k:A,i=L({},t.labels,{align:e,zIndex:t.zIndex}),o=Math.max(1,i.step);if(this.clearLabels(),i.visible){var r=this.labelsRange(),e=i.rotation;z(e)&&(i.alignRotation=e.align,i.rotation=e.angle),"auto"===i.rotation&&(i.rotation=0,t.autoRotateLabels=!0);for(var n=r.min;n<r.max;n+=o){var s=this.createAxisLabel(n,i);s&&(this.append(s),this.labels.push(s))}}},De.prototype.clearLabels=function(){this.children=at(this.children,function(t){return!(t instanceof Be)}),this.labels=[]},De.prototype.clearTitle=function(){var e=this;this.title&&(this.children=at(this.children,function(t){return t!==e.title}),this.title=void 0)},De.prototype.clear=function(){this.clearLabels(),this.clearTitle()},De.prototype.lineBox=function(){var t=this.options,e=this.box,i=t.vertical,o=t.labels.mirror,r=o?e.x1:e.x2,o=o?e.y2:e.y1,t=t.line.width||0;return i?new qt(r,e.y1,r,e.y2-t):new qt(e.x1,o,e.x2-t,o)},De.prototype.createTitle=function(){var t=this.options,t=L({rotation:t.vertical?-90:0,text:"",zIndex:1,visualSize:!0},t.title);t.visible&&t.text&&(t=new Ce(t.text,t),this.append(t),this.title=t)},De.prototype.createNotes=function(){var t=this.options,e=t.notes,i=e.data||[];this.notes=[];for(var o=0;o<i.length;o++){var r=L({},e,i[o]);r.value=this.parseNoteValue(r.value);r=new Le({value:r.value,text:r.label.text,dataItem:r},r,this.chartService);r.options.visible&&(mt(r.options.position)?t.vertical&&!lt(r.options.position,[S,k])?r.options.position=t.reverse?S:k:t.vertical||lt(r.options.position,[P,w])||(r.options.position=t.reverse?w:P):t.vertical?r.options.position=t.reverse?S:k:r.options.position=t.reverse?w:P,this.append(r),this.notes.push(r))}},De.prototype.parseNoteValue=function(t){return t},De.prototype.renderVisual=function(){Fe.prototype.renderVisual.call(this),this.createPlotBands()},De.prototype.createVisual=function(){Fe.prototype.createVisual.call(this),this.createBackground(),this.createLine()},De.prototype.gridLinesVisual=function(){var t=this._gridLines;return t||(t=this._gridLines=new C.drawing.Group({zIndex:-2}),this.appendVisual(this._gridLines)),t},De.prototype.createTicks=function(s){var t=this.options,a=this.lineBox(),p=t.labels.mirror,e=t.majorTicks.visible?t.majorUnit:0,h={vertical:t.vertical};function i(t,e,i){var o=t.length,r=Math.max(1,e.step);if(e.visible)for(var n=e.skip;n<o;n+=r)mt(i)&&n%i==0||(h.tickX=p?a.x2:a.x2-e.size,h.tickY=p?a.y1-e.size:a.y1,h.position=t[n],s.append(ze(h,e)))}i(this.getMajorTickPositions(),t.majorTicks),i(this.getMinorTickPositions(),t.minorTicks,e/t.minorUnit)},De.prototype.createLine=function(){var t=this.options,e=t.line,i=this.lineBox();0<e.width&&e.visible&&((e=new C.drawing.Path({stroke:{width:e.width,color:e.color,dashType:e.dashType}})).moveTo(i.x1,i.y1).lineTo(i.x2,i.y2),t._alignLines&&T(e),(t=this._lineGroup=new C.drawing.Group).append(e),this.visual.append(t),this.createTicks(t))},De.prototype.getActualTickSize=function(){var t=this.options,e=0;return t.majorTicks.visible&&t.minorTicks.visible?e=Math.max(t.majorTicks.size,t.minorTicks.size):t.majorTicks.visible?e=t.majorTicks.size:t.minorTicks.visible&&(e=t.minorTicks.size),e},De.prototype.createBackground=function(){var t=this.options,e=this.box,t=t.background;t&&(this._backgroundPath=C.drawing.Path.fromRect(e.toRect(),{fill:{color:t},stroke:null}),this.visual.append(this._backgroundPath))},De.prototype.createPlotBands=function(){var e=this,t=this.options,i=t.plotBands||[],o=t.vertical,r=this.plotArea;if(0!==i.length){for(var n=this._plotbandGroup=new C.drawing.Group({zIndex:-1}),s=at(this.pane.axes,function(t){return t.options.vertical!==e.options.vertical})[0],a=0;a<i.length;a++){var p=i[a],h=void 0,l=void 0,c=p.label,u=void 0,l=o?(h=(s||r.axisX).lineBox(),this.getSlot(p.from,p.to,!0)):(h=this.getSlot(p.from,p.to,!0),(s||r.axisY).lineBox());c&&(c.vAlign=c.position||S,u=this.createPlotBandLabel(c,p,new qt(h.x1,l.y1,h.x2,l.y2))),0!==h.width()&&0!==l.height()&&(l=new C.geometry.Rect([h.x1,l.y1],[h.width(),l.height()]),p=C.drawing.Path.fromRect(l,{fill:{color:p.color,opacity:p.opacity},stroke:null}),n.append(p),u&&n.append(u))}this.appendVisual(n)}},De.prototype.createPlotBandLabel=function(t,e,i){if(!1===t.visible)return null;var o,r=t.text;return mt(t)&&t.visible&&((o=ot(t))?r=o({text:r,item:e}):t.format&&(r=this.chartService.format.auto(t.format,r)),t.color||(t.color=this.options.labels.color)),(t=new Ce(r,t)).reflow(i),t.renderVisual(),t.visual},De.prototype.createGridLines=function(t){var e=this.options,i=e.minorGridLines,o=e.majorGridLines,r=e.minorUnit,n=e.vertical,a=t.options.line.visible,e=o.visible?e.majorUnit:0,t=t.lineBox(),p=t[n?"y1":"x1"],h={lineStart:t[n?"x1":"y1"],lineEnd:t[n?"x2":"y2"],vertical:n},l=[],c=this.gridLinesVisual();function s(t,e,i){var o=t.length,r=Math.max(1,e.step);if(e.visible)for(var n=e.skip;n<o;n+=r){var s=Tt(t[n]);lt(s,l)||n%i==0||a&&p===s||(h.position=s,c.append(Ee(h,e)),l.push(s))}}return s(this.getMajorTickPositions(),o),s(this.getMinorTickPositions(),i,e/r),c.children},De.prototype.reflow=function(t){for(var e=this.options,i=this.labels,o=this.title,r=e.vertical,n=i.length,s=r?"width":"height",o=o?o.box[s]():0,a=this.getActualTickSize()+e.margin+o,p=((this.getRoot()||{}).box||t)[s](),h=0,l=0;l<n;l++){var c=i[l].box[s]();c+a<=p&&(h=Math.max(h,c))}this.box=r?new qt(t.x1,t.y1,t.x1+h+a,t.y2):new qt(t.x1,t.y1,t.x2,t.y1+h+a),this.arrangeTitle(),this.arrangeLabels(),this.arrangeNotes()},De.prototype.getLabelsTickPositions=function(){return this.getMajorTickPositions()},De.prototype.labelTickIndex=function(t){return t.index},De.prototype.arrangeLabels=function(){for(var t=this.options,e=this.labels,i=this.labelsBetweenTicks(),o=t.vertical,r=this.lineBox(),n=t.labels.mirror,s=this.getLabelsTickPositions(),a=this.getActualTickSize()+t.margin,p=0;p<e.length;p++){var h,l=e[p],c=this.labelTickIndex(l),u=o?l.box.height():l.box.width(),d=s[c]-u/2,g=void 0,f=void 0,y=void 0,g=o?(i&&(d=(f=s[c])+((y=s[c+1])-f)/2-u/2),h=r.x2,n?(h+=a,l.options.rotationOrigin=S):(h-=a+l.box.width(),l.options.rotationOrigin=k),l.box.move(h,d)):(y=i?(f=s[c],s[c+1]):(f=d)+u,u=r.y1,n?(u-=a+l.box.height(),l.options.rotationOrigin=w):(u+=a,l.options.rotationOrigin=P),new qt(f,u,y,u+l.box.height()));l.reflow(g)}},De.prototype.autoRotateLabels=function(){if(this.options.autoRotateLabels&&!this.options.vertical){for(var t,e=this.getMajorTickPositions(),i=this.labels,o=0;o<i.length;o++){var r=Math.abs(e[o+1]-e[o]),n=i[o].box;if(n.width()>r){if(n.height()>r){t=-90;break}t=-45}}if(t){for(var s=0;s<i.length;s++)i[s].options.rotation=t,i[s].reflow(new qt);return!0}}},De.prototype.arrangeTitle=function(){var t=this.options,e=this.title,i=t.labels.mirror,t=t.vertical;e&&(t?(e.options.align=i?k:S,e.options.vAlign=e.options.position):(e.options.align=e.options.position,e.options.vAlign=i?P:w),e.reflow(this.box))},De.prototype.arrangeNotes=function(){for(var t=0;t<this.notes.length;t++){var e=this.notes[t],i=e.options.value,o=void 0;mt(i)?(this.shouldRenderNote(i)?e.show():e.hide(),o=this.noteSlot(i)):e.hide(),e.reflow(o||this.lineBox())}},De.prototype.noteSlot=function(t){return this.getSlot(t)},De.prototype.alignTo=function(t){var e=t.lineBox(),i=this.options.vertical,t=i?m:v;this.box.snapTo(e,t),i?this.box.shrink(0,this.lineBox().height()-e.height()):this.box.shrink(this.lineBox().width()-e.width(),0),this.box[t+1]-=this.lineBox()[t+1]-e[t+1],this.box[t+2]-=this.lineBox()[t+2]-e[t+2]},De.prototype.axisLabelText=function(t,e,i){var o=ot(i),r=t;return o?r=o({value:t,dataItem:e,format:i.format,culture:i.culture}):i.format&&(r=this.chartService.format.localeAuto(i.format,[t],i.culture)),r},De.prototype.slot=function(t,e,i){i=this.getSlot(t,e,i);if(i)return i.toRect()},De.prototype.contentBox=function(){var t,e,i=this.box.clone(),o=this.labels;return o.length&&(t=this.options.vertical?m:v,this.chartService.isPannable(t)?(e=this.maxLabelOffset(),i[t+1]-=e.start,i[t+2]+=e.end):(o[0].options.visible&&i.wrap(o[0].box),(o=o[o.length-1]).options.visible&&i.wrap(o.box))),i},De.prototype.maxLabelOffset=function(){for(var t=this.options,e=t.vertical,t=t.reverse,i=this.labelsBetweenTicks(),o=this.getLabelsTickPositions(),r=e?m:v,n=this.labels,s=t?1:0,a=t?0:1,p=0,h=0,l=0;l<n.length;l++){var c=n[l],u=this.labelTickIndex(c),d=void 0,g=void 0;i?(d=o[u+s],g=o[u+a]):d=g=o[u],p=Math.max(p,d-c.box[r+1]),h=Math.max(h,c.box[r+2]-g)}return{start:p,end:h}},De.prototype.limitRange=function(t,e,i,o,r){var n=this.options;if(t<i&&r<0&&(!mt(n.min)||n.min<=i)||o<e&&0<r&&(!mt(n.max)||o<=n.max))return null;if(e<i&&0<r||o<t&&r<0)return{min:t,max:e};var s=e-t,a=t,n=e;return t<i&&r<0?(a=kt(t,i,o),n=kt(t+s,i+s,o)):o<e&&0<r&&(n=kt(e,i,o),a=kt(e-s,i,o-s)),{min:a,max:n}},De.prototype.valueRange=function(){return{min:this.seriesMin,max:this.seriesMax}},De.prototype.labelsBetweenTicks=function(){return!this.options.justified},De.prototype.prepareUserOptions=function(){},De);function De(t,e){void 0===e&&(e=new Q),Fe.call(this,t),this.chartService=e,this.options.visible||(this.options=L({},this.options,{labels:{visible:!1},line:{visible:!1},margin:0,majorTickSize:0,minorTickSize:0})),this.options.minorTicks=L({},{color:this.options.line.color,width:this.options.line.width,visible:this.options.minorTickType!==r},this.options.minorTicks,{size:this.options.minorTickSize,align:this.options.minorTickType}),this.options.majorTicks=L({},{color:this.options.line.color,width:this.options.line.width,visible:this.options.majorTickType!==r},this.options.majorTicks,{size:this.options.majorTickSize,align:this.options.majorTickType}),this.initFields(),this.options._deferLabels||this.createLabels(),this.createTitle(),this.createNotes()}It(Y,{labels:{visible:!0,rotation:0,mirror:!1,step:1,skip:0},line:{width:1,color:a,visible:!0},title:{visible:!0,position:A},majorTicks:{align:"outside",size:4,skip:0,step:1},minorTicks:{align:"outside",size:3,skip:0,step:1},axisCrossingValue:0,majorTickType:"outside",minorTickType:r,majorGridLines:{skip:0,step:1},minorGridLines:{visible:!1,width:1,color:a,skip:0,step:1},margin:5,visible:!0,reverse:!1,justified:!0,notes:{label:{text:""}},_alignLines:!0,_deferLabels:!1});var Ue=Y,He="milliseconds",Ge="seconds",Ne="minutes",qe="hours",Xe="days",Ye="weeks",We="months",Ze="years",Ke=1e3,$e=60*Ke,Je=60*$e,Qe=24*Je,ti=7*Qe,ei=31*Qe,ii=365*Qe,oi={years:ii,months:ei,weeks:ti,days:Qe,hours:Je,minutes:$e,seconds:Ke,milliseconds:1};function ri(t,e){return t.getTime()-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*$e}function ni(t,e){return new Date(t.getTime()+e)}function si(t){var e;return t instanceof Date?e=t:t&&(e=new Date(t)),e}function ai(t,e){return 0===e&&23===t.getHours()&&(t.setHours(t.getHours()+2),1)}function pi(t,e,i,o){var r,n,s=t;return t&&(n=(r=si(t)).getHours(),i===Ze?ai(s=new Date(r.getFullYear()+e,0,1),0):i===We?ai(s=new Date(r.getFullYear(),r.getMonth()+e,1),n):i===Ye?ai(s=pi(function(t,e){void 0===e&&(e=0);var i=0,o=t.getDay();if(!isNaN(o))for(;o!==e;)0===o?o=6:o--,i++;return ni(t,-i*Qe)}(r,o),7*e,Xe),n):i===Xe?ai(s=new Date(r.getFullYear(),r.getMonth(),r.getDate()+e),n):i===qe?(t=r,o=e,(n=new Date(t)).setMinutes(0,0,0),s=ni(n,(t.getTimezoneOffset()-n.getTimezoneOffset())*$e+o*Je)):i===Ne?0<(s=ni(r,e*$e)).getSeconds()&&s.setSeconds(0):i===Ge?s=ni(r,e*Ke):i===He&&(s=ni(r,e)),i!==He&&0<s.getMilliseconds()&&s.setMilliseconds(0)),s}function hi(t,e,i){return pi(si(t),0,e,i)}function li(t,e,i){t=si(t);return t&&hi(t,e,i).getTime()===t.getTime()?t:pi(t,1,e,i)}function ci(t,e){return t&&e?t.getTime()-e.getTime():-1}function ui(t,e){return t.getTime()-e}function di(t){if(x(t)){for(var e=[],i=0;i<t.length;i++)e.push(di(t[i]));return e}if(t)return si(t).getTime()}function gi(t,e){return t&&e?di(t)===di(e):t===e}function fi(t,e,i){return ri(t,e)/oi[i]}function yi(t,e,i,o){var r=si(t),t=si(e);return(i===We?r.getMonth()-t.getMonth()+12*(r.getFullYear()-t.getFullYear())+fi(r,new Date(r.getFullYear(),r.getMonth()),Xe)/new Date(r.getFullYear(),r.getMonth()+1,0).getDate():i===Ze?r.getFullYear()-t.getFullYear()+yi(r,new Date(r.getFullYear(),0),We,1)/12:i===Xe||i===Ye?fi(r,t,i):ui(r,e)/oi[i])/o}function vi(t,e,i){return i===Ze?e.getFullYear()-t.getFullYear():i===We?12*vi(t,e,Ze)+e.getMonth()-t.getMonth():i===Xe?Math.floor(ui(e,t)/Qe):Math.floor(ui(e,t)/oi[i])}function mi(t,e){return O(e)&&t.parseDate(e)||si(e)}function xi(t,e){if(x(e)){for(var i=[],o=0;o<e.length;o++)i.push(mi(t,e[o]));return i}return mi(t,e)}function bi(t,e){return R(t.weekStartDay)?t.weekStartDay:e.firstDay?e.firstDay():0}var _i,$=((_i=Ue)&&(wi.__proto__=_i),((wi.prototype=Object.create(_i&&_i.prototype)).constructor=wi).prototype.initFields=function(){this._ticks={}},wi.prototype.categoriesHash=function(){return""},wi.prototype.clone=function(){var t=new wi(Object.assign({},this.options,{categories:this.options.srcCategories}),this.chartService);return t.createLabels(),t},wi.prototype.initUserOptions=function(t){var e=t.categories||[],i=mt(t.min),o=mt(t.max);return t.srcCategories=t.categories=e,(i||o)&&e.length&&(i=i?Math.floor(t.min):0,e=o?t.justified?Math.floor(t.max)+1:Math.ceil(t.max):e.length,t.categories=t.categories.slice(i,e)),t},wi.prototype.rangeIndices=function(){var t=this.options,e=t.categories.length||1;return{min:R(t.min)?t.min%1:0,max:R(t.max)&&t.max%1!=0&&t.max<this.totalRange().max?e-(1-t.max%1):e-(t.justified?1:0)}},wi.prototype.totalRangeIndices=function(t){var e=this.options,i=R(e.min)?e.min:0;return e=R(e.max)?e.max:R(e.min)?i+e.categories.length:this.totalRange().max||1,t&&(t=this.totalRange(),i=kt(i,0,t.max),e=kt(e,0,t.max)),{min:i,max:e}},wi.prototype.range=function(){var t=this.options;return{min:R(t.min)?t.min:0,max:(R(t.max)?t:this.totalRange()).max}},wi.prototype.roundedRange=function(){return this.range()},wi.prototype.totalRange=function(){var t=this.options;return{min:0,max:Math.max(this._seriesMax||0,t.srcCategories.length)-(t.justified?1:0)}},wi.prototype.scaleOptions=function(){var t=this.rangeIndices(),e=t.min,i=t.max,t=this.lineBox();return{scale:(this.options.vertical?t.height():t.width())/(i-e||1)*(this.options.reverse?-1:1),box:t,min:e,max:i}},wi.prototype.arrangeLabels=function(){_i.prototype.arrangeLabels.call(this),this.hideOutOfRangeLabels()},wi.prototype.hideOutOfRangeLabels=function(){var t,e,i,o=this.box,r=this.labels;r.length&&(e=o[(t=this.options.vertical?m:v)+1],i=o[t+2],o=r[0],r=St(r),(o.box[t+1]>i||o.box[t+2]<e)&&(o.options.visible=!1),(r.box[t+1]>i||r.box[t+2]<e)&&(r.options.visible=!1))},wi.prototype.getMajorTickPositions=function(){return this.getTicks().majorTicks},wi.prototype.getMinorTickPositions=function(){return this.getTicks().minorTicks},wi.prototype.getLabelsTickPositions=function(){return this.getTicks().labelTicks},wi.prototype.tickIndices=function(t){for(var e=this.rangeIndices(),i=e.min,e=e.max,o=Math.ceil(e),r=Math.floor(i),n=[];r<=o;)n.push(r),r+=t;return n},wi.prototype.getTickPositions=function(t){for(var e=this.options,i=e.vertical,o=e.reverse,r=this.scaleOptions(),n=r.scale,e=r.box,s=r.min,a=e[(i?m:v)+(o?2:1)],p=this.tickIndices(t),h=[],l=0;l<p.length;l++)h.push(a+Tt(n*(p[l]-s),3));return h},wi.prototype.getTicks=function(){var t=this.options,e=this._ticks,i=this.rangeIndices(),o=this.lineBox(),i=o.getHash()+i.min+","+i.max+t.reverse+t.justified;return e._hash!==i&&(t=t.minorTicks.visible||t.minorGridLines.visible,e._hash=i,e.labelTicks=this.getTickPositions(1),e.majorTicks=this.filterOutOfRangePositions(e.labelTicks,o),e.minorTicks=t?this.filterOutOfRangePositions(this.getTickPositions(.5),o):[]),e},wi.prototype.filterOutOfRangePositions=function(t,e){if(!t.length)return t;for(var i=this.options.vertical?m:v,o=function(t){return e[i+1]<=t&&t<=e[i+2]},r=t.length-1,n=0;!o(t[n])&&n<=r;)n++;for(var s=r;!o(t[s])&&0<=s;)s--;return t.slice(n,s+1)},wi.prototype.getSlot=function(t,e,i){var o=this.options,r=o.reverse,n=o.justified,s=o.vertical,a=this.scaleOptions(),p=a.scale,h=a.box,l=a.min,c=s?m:v,u=h[c+(r?2:1)],o=h.clone(),a=!mt(e),s=Rt(t,0),t=Rt(e,s),t=Math.max(t-1,s),e=u+(s-l)*p,p=u+((t=Math.max(s,t))+1-l)*p;return a&&n&&(p=e),i&&(e=kt(e,h[c+1],h[c+2]),p=kt(p,h[c+1],h[c+2])),o[c+1]=r?p:e,o[c+2]=r?e:p,o},wi.prototype.limitSlot=function(t){var e=this.options.vertical?m:v,i=this.lineBox(),o=t.clone();return o[e+1]=kt(t[e+1],i[e+1],i[e+2]),o[e+2]=kt(t[e+2],i[e+1],i[e+2]),o},wi.prototype.slot=function(t,e,i){var o=Math.floor(this.options.min||0),t=t,e=e;return"string"==typeof t?t=this.categoryIndex(t):R(t)&&(t-=o),"string"==typeof e?e=this.categoryIndex(e):R(e)&&(e-=o),_i.prototype.slot.call(this,t,e,i)},wi.prototype.pointCategoryIndex=function(t){var e=this.options,i=e.reverse,o=e.justified,r=e.vertical?m:v,n=this.scaleOptions(),s=n.scale,a=n.box,e=n.min,n=n.max,n=i?n:e,e=a[r+1],a=a[r+2],r=t[r];if(r<e||a<r)return null;e=n+(r-e)/s,s=e%1;return o?e=Math.round(e):0==s&&0<e&&e--,Math.floor(e)},wi.prototype.getCategory=function(t){t=this.pointCategoryIndex(t);return null===t?null:this.options.categories[t]},wi.prototype.categoryIndex=function(t){return this.totalIndex(t)-Math.floor(this.options.min||0)},wi.prototype.categoryAt=function(t,e){var i=this.options;return(e?i.srcCategories:i.categories)[t]},wi.prototype.categoriesCount=function(){return(this.options.categories||[]).length},wi.prototype.translateRange=function(t){var e=this.options,i=this.lineBox(),i=e.vertical?i.height():i.width(),e=e.categories.length,i=Tt(t/(i/e),f);return{min:i,max:e+i}},wi.prototype.zoomRange=function(t){var e=this.totalRangeIndices(),i=this.totalRange(),o=i.min,r=i.max,i=kt(e.min+t,o,r),r=kt(e.max-t,o,r);if(0<r-i)return{min:i,max:r}},wi.prototype.scaleRange=function(t){var e=this.options.categories.length,t=t*e;return{min:-t,max:e+t}},wi.prototype.labelsCount=function(){var t=this.labelsRange();return t.max-t.min},wi.prototype.labelsRange=function(){var t=this.options,e=t.justified,i=t.labels,o=this.totalRangeIndices(!0),r=o.min,n=o.max,o=Math.floor(r),n=e?(r=Math.ceil(r),Math.floor(n)):(r=Math.floor(r),Math.ceil(n));return{min:(r>i.skip?i.skip+i.step*Math.ceil((r-i.skip)/i.step):i.skip)-o,max:(t.categories.length?n+(e?1:0):0)-o}},wi.prototype.createAxisLabel=function(t,e){var i=this.options,o=i.dataItems?i.dataItems[t]:null,r=Rt(i.categories[t],""),i=this.axisLabelText(r,o,e);return new Be(r,i,t,o,e)},wi.prototype.shouldRenderNote=function(t){var e=this.totalRangeIndices();return Math.floor(e.min)<=t&&t<=Math.ceil(e.max)},wi.prototype.noteSlot=function(t){var e=this.options,e=t-Math.floor(e.min||0);return this.getSlot(e)},wi.prototype.arrangeNotes=function(){_i.prototype.arrangeNotes.call(this),this.hideOutOfRangeNotes()},wi.prototype.hideOutOfRangeNotes=function(){var t=this.notes,e=this.box;if(t&&t.length)for(var i=this.options.vertical?m:v,o=e[i+1],r=e[i+2],n=0;n<t.length;n++){var s=t[n];s.box&&(r<s.box[i+1]||s.box[i+2]<o)&&s.hide()}},wi.prototype.pan=function(t){var e=this.totalRangeIndices(!0),i=this.scaleOptions().scale,o=Tt(t/i,f),t=this.totalRange(),i=e.min+o,e=e.max+o;return this.limitRange(i,e,0,t.max,o)},wi.prototype.pointsRange=function(t,e){var i=this.options,o=i.reverse,r=i.vertical?m:v,n=this.totalRangeIndices(!0),s=this.scaleOptions(),i=s.scale,o=s.box[r+(o?2:1)],t=t[r]-o,o=e[r]-o,t=n.min+t/i,o=n.min+o/i,i=Math.min(t,o),o=Math.max(t,o);if(.01<=o-i)return{min:i,max:o}},wi.prototype.valueRange=function(){return this.range()},wi.prototype.totalIndex=function(t){var e=this.options;return this._categoriesMap?this._categoriesMap.get(t):function(t,e){if(t instanceof Date){for(var i=e.length,o=0;o<i;o++)if(gi(e[o],t))return o;return-1}return e.indexOf(t)}(t,e.srcCategories)},wi.prototype.currentRangeIndices=function(){var t=this.options,e=0;return R(t.min)&&(e=Math.floor(t.min)),{min:e,max:R(t.max)?t.justified?Math.floor(t.max):Math.ceil(t.max)-1:this.totalCount()-1}},wi.prototype.mapCategories=function(){if(!this._categoriesMap)for(var t=this._categoriesMap=new ht,e=this.options.srcCategories,i=0;i<e.length;i++)t.set(e[i],i)},wi.prototype.totalCount=function(){return Math.max(this.options.srcCategories.length,this._seriesMax||0)},wi);function wi(){_i.apply(this,arguments)}It($,{type:"category",vertical:!1,majorGridLines:{visible:!1,width:1,color:a},labels:{zIndex:1},justified:!1,_deferLabels:!0});var Ai=$,K={milliseconds:"HH:mm:ss.fff",seconds:"HH:mm:ss",minutes:"HH:mm",hours:"HH:mm",days:"M/d",weeks:"M/d",months:"MMM 'yy",years:"yyyy"},Si=[He,Ge,Ne,qe,Xe,Ye,We,Ze],ki="fit";function Pi(t){var e=t._range;return e||((e=t._range=jt(t)).min=si(e.min),e.max=si(e.max)),e}function Ci(t){this.options=t}Ci.prototype.displayIndices=function(){return{min:0,max:1}},Ci.prototype.displayRange=function(){return{}},Ci.prototype.total=function(){return{}},Ci.prototype.valueRange=function(){return{}},Ci.prototype.valueIndex=function(){return-1},Ci.prototype.values=function(){return[]},Ci.prototype.totalIndex=function(){return-1},Ci.prototype.valuesCount=function(){return 0},Ci.prototype.totalCount=function(){return 0},Ci.prototype.dateAt=function(){return null};function Ti(t,e,i){(this.options=i).baseUnitStep=i.baseUnitStep||1;var o=i.roundToBaseUnit,r=i.justified;this.start=pi(t,0,i.baseUnit,i.weekStartDay);var n=this.roundToTotalStep(e),s=!r&&gi(e,n)&&!i.justifyEnd;this.end=this.roundToTotalStep(e,!r,s?1:0),t=i.min||t,this.valueStart=this.roundToTotalStep(t),this.displayStart=o?this.valueStart:t,(t=i.max)?(this.valueEnd=this.roundToTotalStep(t,!1,!r&&gi(t,this.roundToTotalStep(t))?-1:0),this.displayEnd=o?this.roundToTotalStep(t,!r):i.max):(this.valueEnd=n,this.displayEnd=o||s?this.end:e),this.valueEnd<this.valueStart&&(this.valueEnd=this.valueStart),this.displayEnd<=this.displayStart&&(this.displayEnd=this.roundToTotalStep(this.displayStart,!1,1))}function Mi(t,e,i){for(var o,r,n,s=Pi(t.categories),a=(t.max||s.max)-(t.min||s.min),p=t.autoBaseUnitSteps,h=t.maxDateGroups,l=t.baseUnit===ki,c=e?Si.indexOf(e):0,u=l?Si[c++]:t.baseUnit,d=a/oi[u],g=d;!r||h<=d;){for(o=o||p[u].slice(0);n=o.shift(),n&&e===u&&n<i;);if(n)d=g/(r=n);else{if(u===St(Si)){r=Math.ceil(g/h);break}if(!l){h<d&&(r=Math.ceil(g/h));break}u=Si[c++]||St(Si),g=a/oi[u],o=null}}t.baseUnitStep=r,t.baseUnit=u}function Ri(t){var e=(t.baseUnit||"").toLowerCase();return e===ki||lt(e,Si)||function(t){for(var e,i,o=t.categories,r=mt(o)?o.length:0,n=l,s=0;s<r;s++){var a,p=o[s];p&&e&&(0<(a=ri(p,e))&&(i=(n=Math.min(n,a))>=ii?Ze:ei-3*Qe<=n?We:ti<=n?Ye:Qe<=n?Xe:Je<=n?qe:$e<=n?Ne:Ge)),e=p}t.baseUnit=i||Xe}(t),e!==ki&&"auto"!==t.baseUnitStep||Mi(t),t}Ti.prototype.displayRange=function(){return{min:this.displayStart,max:this.displayEnd}},Ti.prototype.displayIndices=function(){var t,e,i;return this._indices||(t=(e=this.options).baseUnit,i=e.baseUnitStep,e=yi(this.displayStart,this.valueStart,t,i),i=yi(this.displayEnd,this.valueStart,t,i),this._indices={min:e,max:i}),this._indices},Ti.prototype.total=function(){return{min:this.start,max:this.end}},Ti.prototype.totalCount=function(){return this.totalIndex(this.end)+(this.options.justified?1:0)},Ti.prototype.valueRange=function(){return{min:this.valueStart,max:this.valueEnd}},Ti.prototype.valueIndex=function(t){var e=this.options;return Math.floor(yi(t,this.valueStart,e.baseUnit,e.baseUnitStep))},Ti.prototype.totalIndex=function(t){var e=this.options;return Math.floor(yi(t,this.start,e.baseUnit,e.baseUnitStep))},Ti.prototype.dateIndex=function(t){var e=this.options;return yi(t,this.valueStart,e.baseUnit,e.baseUnitStep)},Ti.prototype.valuesCount=function(){return this.valueIndex(this.valueEnd)+1},Ti.prototype.values=function(){var t=this._values;if(!t){var e=this.options,i=this.valueRange();this._values=t=[];for(var o=i.min;o<=i.max;)t.push(o),o=pi(o,e.baseUnitStep,e.baseUnit,e.weekStartDay)}return t},Ti.prototype.dateAt=function(t,e){var i=this.options;return pi(e?this.start:this.valueStart,i.baseUnitStep*t,i.baseUnit,i.weekStartDay)},Ti.prototype.roundToTotalStep=function(t,e,i){var o=this.options,r=o.baseUnit,n=o.baseUnitStep,s=o.weekStartDay,o=this.start,t=yi(t,o,r,n),t=e?Math.ceil(t):Math.floor(t);return i&&(t+=i),pi(o,t*n,r,s)};var Oi,N=((Oi=Ai)&&(Ii.__proto__=Oi),((Ii.prototype=Object.create(Oi&&Oi.prototype)).constructor=Ii).prototype.clone=function(){var t=new Ii(Object.assign({},this.options),this.chartService);return t.createLabels(),t},Ii.prototype.categoriesHash=function(){var t=this.dataRange.total().min;return this.options.baseUnit+this.options.baseUnitStep+t},Ii.prototype.initUserOptions=function(t){return t},Ii.prototype.initFields=function(){Oi.prototype.initFields.call(this);var t=this.chartService,e=t.intl,i=this.options,o=i.categories||[];o._parsed||((o=xi(e,o))._parsed=!0),i=L({roundToBaseUnit:!0},i,{categories:o,min:mi(e,i.min),max:mi(e,i.max),weekStartDay:bi(i,e)}),t.panning&&t.isPannable(i.vertical?m:v)&&(i.roundToBaseUnit=!1),i.userSetBaseUnit=i.userSetBaseUnit||i.baseUnit,i.userSetBaseUnitStep=i.userSetBaseUnitStep||i.baseUnitStep,0<((this.options=i).srcCategories=o).length?(e=Pi(o),t=i.maxDivisions,this.dataRange=new Ti(e.min,e.max,Ri(i)),t?(o=this.dataRange.displayRange(),Mi(o=Object.assign({},i,{justified:!0,roundToBaseUnit:!1,baseUnit:"fit",min:o.min,max:o.max,maxDateGroups:t}),(t=this.dataRange.options).baseUnit,t.baseUnitStep),this.divisionRange=new Ti(e.min,e.max,o)):this.divisionRange=this.dataRange):(i.baseUnit=i.baseUnit||Xe,this.dataRange=this.divisionRange=new Ci(i))},Ii.prototype.tickIndices=function(t){var e=this.dataRange,i=this.divisionRange,o=i.valuesCount();if(!this.options.maxDivisions||!o)return Oi.prototype.tickIndices.call(this,t);var r=[],n=i.values(),s=0;this.options.justified||(n=n.concat(i.dateAt(o)),s=.5);for(var a,p=0;p<n.length;p++)r.push(e.dateIndex(n[p])+s),1!==t&&1<=p&&(a=r.length-1,r.splice(p,0,r[a-1]+(r[a]-r[a-1])*t));return r},Ii.prototype.shouldRenderNote=function(t){var e=this.range(),i=this.options.categories||[];return 0<=ci(t,e.min)&&ci(t,e.max)<=0&&i.length},Ii.prototype.parseNoteValue=function(t){return mi(this.chartService.intl,t)},Ii.prototype.noteSlot=function(t){return this.getSlot(t)},Ii.prototype.translateRange=function(t){var e=this.options,i=e.baseUnit,o=e.weekStartDay,r=e.vertical,n=this.lineBox(),r=r?n.height():n.width(),n=this.range(),r=r/(n.max-n.min),t=Tt(t/r,f);return n.min&&n.max&&(r=ni(e.min||n.min,t),t=ni(e.max||n.max,t),n={min:pi(r,0,i,o),max:pi(t,0,i,o)}),n},Ii.prototype.scaleRange=function(t){var e=Math.abs(t),i=this.range(),o=i.min,r=i.max;if(o&&r){for(;e--;)var n=ui(o,r),n=Math.round(.1*n),r=t<0?(o=ni(o,n),ni(r,-n)):(o=ni(o,-n),ni(r,n));i={min:o,max:r}}return i},Ii.prototype.labelsRange=function(){return{min:this.options.labels.skip,max:this.divisionRange.valuesCount()}},Ii.prototype.pan=function(t){if(this.isEmpty())return null;var e=this.options,i=this.lineBox(),o=e.vertical?i.height():i.width(),r=this.dataRange.displayRange(),n=r.min,i=r.max,r=this.dataRange.total(),o=Tt(t/(o/(i-n)),f)*(e.reverse?-1:1),n=ni(n,o),i=ni(i,o),o=this.limitRange(di(n),di(i),di(r.min),di(r.max),o);return o?(o.min=si(o.min),o.max=si(o.max),o.baseUnit=e.baseUnit,o.baseUnitStep=e.baseUnitStep||1,o.userSetBaseUnit=e.userSetBaseUnit,o.userSetBaseUnitStep=e.userSetBaseUnitStep,o):void 0},Ii.prototype.pointsRange=function(t,e){if(this.isEmpty())return null;var i=Oi.prototype.pointsRange.call(this,t,e),o=this.dataRange.displayRange(),t=this.dataRange.displayIndices(),e=ui(o.max,o.min)/(t.max-t.min),t=this.options;return{min:ni(o.min,i.min*e),max:ni(o.min,i.max*e),baseUnit:t.userSetBaseUnit||t.baseUnit,baseUnitStep:t.userSetBaseUnitStep||t.baseUnitStep}},Ii.prototype.zoomRange=function(t){if(this.isEmpty())return null;var e=this.options,i=e.userSetBaseUnit===ki,o=this.dataRange.total(),r=this.dataRange.displayRange(),n=r.min,s=r.max,a=this.dataRange.options,p=a.weekStartDay,h=a.baseUnit,r=a.baseUnitStep,a=pi(n,t*r,h,p),t=pi(s,-t*r,h,p);if(i){var l,c,u=e.autoBaseUnitSteps,r=e.maxDateGroups,p=St(u[h])*r*oi[h],d=ui(s,n),i=ui(t,a),g=Si.indexOf(h);if(i<oi[h]&&h!==He)h=Si[g-1],a=ni(n,c=(d-(r-1)*(l=St(u[h]))*oi[h])/2),t=ni(s,-c);else if(p<i&&h!==Ze){var f=0;do{for(h=Si[++g],f=0,c=2*oi[h];l=u[h][f],f++,f<u[h].length&&c*l<d;);}while(h!==Ze&&c*l<d);0<(c=(c*l-d)/2)&&(a=ni(n,-c),t=ni(s,c),a=ni(a,kt(t,o.min,o.max)-t),t=ni(t,kt(a,o.min,o.max)-a))}}return a<o.min&&(a=o.min),t>o.max&&(t=o.max),a&&t&&0<ui(t,a)?{min:a,max:t,baseUnit:e.userSetBaseUnit||e.baseUnit,baseUnitStep:e.userSetBaseUnitStep||e.baseUnitStep}:void 0},Ii.prototype.range=function(){return this.dataRange.displayRange()},Ii.prototype.createAxisLabel=function(t,e){var i=this.options,o=i.dataItems&&!i.maxDivisions?i.dataItems[t]:null,r=this.divisionRange.dateAt(t),i=e.dateFormats[this.divisionRange.options.baseUnit];e.format=e.format||i;i=this.axisLabelText(r,o,e);if(i)return new Be(r,i,t,o,e)},Ii.prototype.categoryIndex=function(t){return this.dataRange.valueIndex(t)},Ii.prototype.slot=function(t,e,i){var o=this.dataRange,t=t,e=e;t instanceof Date&&(t=o.dateIndex(t)),e instanceof Date&&(e=o.dateIndex(e));i=this.getSlot(t,e,i);if(i)return i.toRect()},Ii.prototype.getSlot=function(t,e,i){return"object"==typeof t&&(t=this.categoryIndex(t)),"object"==typeof e&&(e=this.categoryIndex(e)),Oi.prototype.getSlot.call(this,t,e,i)},Ii.prototype.valueRange=function(){var t=Pi(this.options.srcCategories);return{min:si(t.min),max:si(t.max)}},Ii.prototype.categoryAt=function(t,e){return this.dataRange.dateAt(t,e)},Ii.prototype.categoriesCount=function(){return this.dataRange.valuesCount()},Ii.prototype.rangeIndices=function(){return this.dataRange.displayIndices()},Ii.prototype.labelsBetweenTicks=function(){return!this.divisionRange.options.justified},Ii.prototype.prepareUserOptions=function(){this.isEmpty()||(this.options.categories=this.dataRange.values())},Ii.prototype.getCategory=function(t){t=this.pointCategoryIndex(t);return null===t?null:this.dataRange.dateAt(t)},Ii.prototype.totalIndex=function(t){return this.dataRange.totalIndex(t)},Ii.prototype.currentRangeIndices=function(){var t=this.dataRange.valueRange();return{min:this.dataRange.totalIndex(t.min),max:this.dataRange.totalIndex(t.max)}},Ii.prototype.totalRange=function(){return this.dataRange.total()},Ii.prototype.totalCount=function(){return this.dataRange.totalCount()},Ii.prototype.isEmpty=function(){return!this.options.srcCategories.length},Ii.prototype.roundedRange=function(){if(!1!==this.options.roundToBaseUnit||this.isEmpty())return this.range();var t=this.options,e=Pi(t.srcCategories);return new Ti(e.min,e.max,Object.assign({},t,{justified:!1,roundToBaseUnit:!0,justifyEnd:t.justified})).displayRange()},Ii);function Ii(){Oi.apply(this,arguments)}It(N,{type:y,labels:{dateFormats:K},autoBaseUnitSteps:{milliseconds:[1,10,100],seconds:[1,2,5,15,30],minutes:[1,2,5,15,30],hours:[1,2,3],days:[1,2,3],weeks:[1,2],months:[1,2,3,6],years:[1,2,3,5,10,25,50]},maxDateGroups:10});var ji=N;function Bi(t,e){return Tt(Math.floor(t/e)*e,f)}function Vi(t,e){return Tt(Math.ceil(t/e)*e,f)}function Li(t){return Math.max(Math.min(t,3e5),-3e5)}var zi,Ei=Math.pow(10,1-f),G=((zi=Ue)&&(Fi.__proto__=zi),((Fi.prototype=Object.create(zi&&zi.prototype)).constructor=Fi).prototype.initUserOptions=function(t){var i,e,o,r,n,s,a,n=(a=t.seriesMin,i=t.seriesMax,o=(e=t).narrowRange,r=function(t){if(!t&&!i)return 0;if(0<=t&&0<=i){var e=t===i?0:t;if(!1===o||!o&&.2<(i-e)/i)return 0;e=Math.max(0,e-(i-e)/2)}else e=t;return e}(a),n=function(t,e,i){if(!t&&!e)return 1;if(t<=0&&e<=0){var o=t===e?0:e,r=Math.abs((o-t)/o);if(!1===i||!i&&.2<r)return 0;o=Math.min(0,o-(t-o)/2)}else o=e;return o}(a,i,o),s=Ft(r,n),!(a={majorUnit:s})!==e.roundToMajorUnit&&(r<0&&Di(r,s,1/3)&&(r-=s),0<n&&Di(n,s,1/3)&&(n+=s)),a.min=Bi(r,s),a.max=Vi(n,s),a);return this.totalOptions=(s=n,{min:mt((a=t).min)?Math.min(s.min,a.min):s.min,max:mt(a.max)?Math.max(s.max,a.max):s.max,majorUnit:s.majorUnit}),function(t,e){var i,o,r,n=e;e&&(function(t,e){for(var i=0;i<e.length;i++){var o=e[i];null===t[o]&&(t[o]=void 0)}}(e,["min","max"]),i=mt(e.min),o=mt(e.max),(r=i||o)&&e.min===e.max&&(0<e.min?e.min=0:e.max=1),e.majorUnit?(t.min=Bi(t.min,e.majorUnit),t.max=Vi(t.max,e.majorUnit)):r&&(n=L(t,e),t.majorUnit=Ft(n.min,n.max))),t.minorUnit=(n.majorUnit||t.majorUnit)/5;n=L(t,n);return n.min>=n.max&&(i&&!o?n.max=n.min+n.majorUnit:!i&&o&&(n.min=n.max-n.majorUnit)),n}(n,t)},Fi.prototype.initFields=function(){this.totalMin=this.totalOptions.min,this.totalMax=this.totalOptions.max,this.totalMajorUnit=this.totalOptions.majorUnit,this.seriesMin=this.options.seriesMin,this.seriesMax=this.options.seriesMax},Fi.prototype.clone=function(){return new Fi(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},Fi.prototype.startValue=function(){return 0},Fi.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},Fi.prototype.getDivisions=function(t){if(0===t)return 1;var e=this.options,e=e.max-e.min;return Math.floor(Tt(e/t,3))+1},Fi.prototype.getTickPositions=function(t,e){var i=this.options,o=i.vertical,r=i.reverse,n=this.lineBox(),s=t*((o?n.height():n.width())/(i.max-i.min)),a=this.getDivisions(t),p=(o?-1:1)*(r?-1:1),h=[],l=n[(o?m:v)+(1==p?1:2)],c=0;e&&(c=e/t);for(var u=0;u<a;u++)u%c!=0&&h.push(Tt(l,3)),l+=s*p;return h},Fi.prototype.getMajorTickPositions=function(){return this.getTickPositions(this.options.majorUnit)},Fi.prototype.getMinorTickPositions=function(){return this.getTickPositions(this.options.minorUnit)},Fi.prototype.getSlot=function(t,e,i){void 0===i&&(i=!1);var o,r=this.options,n=r.vertical,s=r.reverse,a=n?m:v,p=this.lineBox(),h=p[a+(s?2:1)],l=(s?-1:1)*((n?p.height():p.width())/(r.max-r.min)),p=new qt(p.x1,p.y1,p.x1,p.y1),t=t,e=e;return mt(t)||(t=e||0),mt(e)||(e=t||0),i&&(t=Math.max(Math.min(t,r.max),r.min),e=Math.max(Math.min(e,r.max),r.min)),r=n?(o=r.max-Math.max(t,e),r.max-Math.min(t,e)):(o=Math.min(t,e)-r.min,Math.max(t,e)-r.min),p[a+1]=Li(h+l*(s?r:o)),p[a+2]=Li(h+l*(s?o:r)),p},Fi.prototype.getValue=function(t){var e=this.options,i=e.vertical,o=e.reverse,r=Number(e.max),n=Number(e.min),s=i?m:v,a=this.lineBox(),e=a[s+(o?2:1)],a=i?a.height():a.width(),s=(o?-1:1)*(t[s]-e),e=(r-n)/a*s;return s<0||a<s?null:Tt(i?r-e:n+e,f)},Fi.prototype.translateRange=function(t){var e=this.options,i=e.vertical,o=e.reverse,r=e.max,n=e.min,e=this.lineBox(),e=i?e.height():e.width(),e=Tt(t/(e/(r-n)),f);return!i&&!o||i&&o||(e=-e),{min:n+e,max:r+e,offset:e}},Fi.prototype.scaleRange=function(t){var e=this.options,t=-t*e.majorUnit;return{min:e.min-t,max:e.max+t}},Fi.prototype.labelsCount=function(){return this.getDivisions(this.options.majorUnit)},Fi.prototype.createAxisLabel=function(t,e){var i=this.options,o=Tt(i.min+t*i.majorUnit,f),i=this.axisLabelText(o,null,e);return new Be(o,i,t,null,e)},Fi.prototype.shouldRenderNote=function(t){var e=this.range();return e.min<=t&&t<=e.max},Fi.prototype.pan=function(t){t=this.translateRange(t);return this.limitRange(t.min,t.max,this.totalMin,this.totalMax,t.offset)},Fi.prototype.pointsRange=function(t,e){var i=this.getValue(t),t=this.getValue(e),e=Math.min(i,t),t=Math.max(i,t);if(this.isValidRange(e,t))return{min:e,max:t}},Fi.prototype.zoomRange=function(t){var e=this.totalMin,i=this.totalMax,o=this.scaleRange(t),t=kt(o.min,e,i),i=kt(o.max,e,i);if(this.isValidRange(t,i))return{min:t,max:i}},Fi.prototype.isValidRange=function(t,e){return Ei<e-t},Fi);function Fi(t,e,i,o){zi.call(this,Object.assign({},i,{seriesMin:t,seriesMax:e}),o)}function Di(t,e,i){t=Tt(Math.abs(t%e),f);return 0===t||e*(1-i)<t}It(G,{type:"numeric",min:0,max:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:a},labels:{format:"#.####################"},zIndex:1});var Ui,Hi=G,W=((Ui=Ue)&&(Gi.__proto__=Ui),((Gi.prototype=Object.create(Ui&&Ui.prototype)).constructor=Gi).prototype.clone=function(){return new Gi(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},Gi.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},Gi.prototype.getDivisions=function(t){var e=this.options;return Math.floor(vi(e.min,e.max,e.baseUnit)/t+1)},Gi.prototype.getTickPositions=function(t){for(var e=this.options,i=e.vertical,o=this.lineBox(),r=(i?-1:1)*(e.reverse?-1:1),n=o[(i?m:v)+(1==r?1:2)],s=this.getDivisions(t),a=ui(e.max,e.min),p=(i?o.height():o.width())/a,h=e.weekStartDay||0,l=[n],c=1;c<s;c++){var u=n+ui(pi(e.min,c*t,e.baseUnit,h),e.min)*p*r;l.push(Tt(u,3))}return l},Gi.prototype.getMajorTickPositions=function(){return this.getTickPositions(this.options.majorUnit)},Gi.prototype.getMinorTickPositions=function(){return this.getTickPositions(this.options.minorUnit)},Gi.prototype.getSlot=function(t,e,i){return Hi.prototype.getSlot.call(this,mi(this.intlService,t),mi(this.intlService,e),i)},Gi.prototype.getValue=function(t){t=Hi.prototype.getValue.call(this,t);return null!==t?si(t):null},Gi.prototype.labelsCount=function(){return this.getDivisions(this.options.majorUnit)},Gi.prototype.createAxisLabel=function(t,e){var i=this.options,o=t*i.majorUnit,r=i.weekStartDay||0,n=i.min;0<o&&(n=pi(n,o,i.baseUnit,r));i=e.dateFormats[i.baseUnit];e.format=e.format||i;i=this.axisLabelText(n,null,e);return new Be(n,i,t,null,e)},Gi.prototype.translateRange=function(t,e){var i=this.options,o=i.baseUnit,r=i.weekStartDay||0,n=this.lineBox(),s=i.vertical?n.height():n.width(),n=this.range(),n=s/ui(n.max,n.min),t=Tt(t/n,f)*(i.reverse?-1:1),n=ni(i.min,t),i=ni(i.max,t);return e||(n=pi(n,0,o,r),i=pi(i,0,o,r)),{min:n,max:i,offset:t}},Gi.prototype.scaleRange=function(t){for(var e=this.options,i=e.min,o=e.max,r=Math.abs(t);r--;)var n=ui(i,o),n=Math.round(.1*n),o=t<0?(i=ni(i,n),ni(o,-n)):(i=ni(i,-n),ni(o,n));return{min:i,max:o}},Gi.prototype.shouldRenderNote=function(t){var e=this.range();return 0<=ci(t,e.min)&&ci(t,e.max)<=0},Gi.prototype.pan=function(t){t=this.translateRange(t,!0),t=this.limitRange(di(t.min),di(t.max),this.totalMin,this.totalMax,t.offset);if(t)return{min:si(t.min),max:si(t.max)}},Gi.prototype.pointsRange=function(t,e){var i=this.getValue(t),t=this.getValue(e),e=Math.min(i,t),t=Math.max(i,t);return{min:si(e),max:si(t)}},Gi.prototype.zoomRange=function(t){t=this.scaleRange(t);return{min:si(kt(di(t.min),this.totalMin,this.totalMax)),max:si(kt(di(t.max),this.totalMin,this.totalMax))}},Gi);function Gi(t,e,i,o){var r,n,s,a,p,h=si(t),l=si(e),c=o.intl,u=i||{};r=h,n=l,s=u=L(u||{},{min:mi(c,u.min),max:mi(c,u.max),axisCrossingValue:xi(c,u.axisCrossingValues||u.axisCrossingValue),weekStartDay:bi(u,c)}),t=s.min||r,e=s.max||n,i=s.baseUnit||(e&&t?(a=ri(e,t),p=qe,ii<=a?p=Ze:ei<=a?p=We:ti<=a?p=Ye:Qe<=a&&(p=Xe),p):qe),r=oi[i],n=s.weekStartDay||0,a=hi(di(t)-1,i,n)||si(e),p=li(di(e)+1,i,n),t=s.majorUnit||Vi(Ft(a.getTime(),p.getTime()),r)/r,e=vi(a,p,i),r=Vi(e,t)-e,e=Math.floor(r/2),r-=e,s.baseUnit||delete s.baseUnit,s.baseUnit=s.baseUnit||i,s.min=s.min||pi(a,-e,i,n),s.max=s.max||pi(p,r,i,n),s.minorUnit=s.minorUnit||t/5,s.majorUnit=t,u=s,Ui.call(this,u,o),this.intlService=c,this.seriesMin=h,this.seriesMax=l;c=u.weekStartDay||0;this.totalMin=di(hi(di(h)-1,u.baseUnit,c)),this.totalMax=di(li(di(l)+1,u.baseUnit,c))}It(W,{type:y,majorGridLines:{visible:!0,width:1,color:a},labels:{dateFormats:K}});var Ni,qi=W,Y=((Ni=Ue)&&(Xi.__proto__=Ni),((Xi.prototype=Object.create(Ni&&Ni.prototype)).constructor=Xi).prototype.clone=function(){return new Xi(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},Xi.prototype.startValue=function(){return this.options.min},Xi.prototype.getSlot=function(t,e,i){var o,r=this.options,n=this.logMin,s=this.logMax,a=r.reverse,p=r.vertical,h=r.majorUnit,l=p?m:v,c=this.lineBox(),u=c[l+(a?2:1)],d=(p?c.height():c.width())/(s-n)*(a?-1:1),c=new qt(c.x1,c.y1,c.x1,c.y1),t=t,e=e;return mt(t)||(t=e||1),mt(e)||(e=t||1),t<=0||e<=0?null:(i&&(t=Math.max(Math.min(t,r.max),r.min),e=Math.max(Math.min(e,r.max),r.min)),t=Wi(t,h),e=Wi(e,h),n=p?(o=s-Math.max(t,e),s-Math.min(t,e)):(o=Math.min(t,e)-n,Math.max(t,e)-n),c[l+1]=Li(u+d*(a?n:o)),c[l+2]=Li(u+d*(a?o:n)),c)},Xi.prototype.getValue=function(t){var e=this.options,i=this.logMin,o=this.logMax,r=e.reverse,n=e.vertical,s=e.majorUnit,a=this.lineBox(),p=n===r?1:-1,e=1==p?1:2,r=n?a.height():a.width(),o=(o-i)/r,n=n?m:v,e=a[n+e],e=p*(t[n]-e);if(e<0||r<e)return null;o=i+e*o;return Tt(Math.pow(s,o),f)},Xi.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},Xi.prototype.scaleRange=function(t){var e=this.options.majorUnit,t=-t;return{min:Math.pow(e,this.logMin-t),max:Math.pow(e,this.logMax+t)}},Xi.prototype.translateRange=function(t){var e=this.options,i=this.logMin,o=this.logMax,r=e.reverse,n=e.vertical,s=e.majorUnit,e=this.lineBox(),e=n?e.height():e.width(),e=Tt(t/(e/(o-i)),f);return!n&&!r||n&&r||(e=-e),{min:Math.pow(s,i+e),max:Math.pow(s,o+e),offset:e}},Xi.prototype.labelsCount=function(){var t=Math.floor(this.logMax);return Math.floor(t-this.logMin)+1},Xi.prototype.getMajorTickPositions=function(){var e=[];return this.traverseMajorTicksPositions(function(t){e.push(t)},{step:1,skip:0}),e},Xi.prototype.createTicks=function(i){var t=this.options,e=t.majorTicks,o=t.minorTicks,r=t.vertical,n=t.labels.mirror,s=this.lineBox(),a={vertical:r};function p(t,e){a.tickX=n?s.x2:s.x2-e.size,a.tickY=n?s.y1-e.size:s.y1,a.position=t,i.append(ze(a,e))}return e.visible&&this.traverseMajorTicksPositions(p,e),o.visible&&this.traverseMinorTicksPositions(p,o),[]},Xi.prototype.createGridLines=function(t){var e=this.options,i=e.minorGridLines,o=e.majorGridLines,e=e.vertical,t=t.lineBox(),r={lineStart:t[e?"x1":"y1"],lineEnd:t[e?"x2":"y2"],vertical:e},n=[],s=this.gridLinesVisual();function a(t,e){lt(t,n)||(r.position=t,s.append(Ee(r,e)),n.push(t))}return o.visible&&this.traverseMajorTicksPositions(a,o),i.visible&&this.traverseMinorTicksPositions(a,i),s.children},Xi.prototype.traverseMajorTicksPositions=function(t,e){for(var i=this._lineOptions(),o=i.lineStart,r=i.step,n=this.logMin,s=this.logMax,a=Math.ceil(n)+e.skip;a<=s;a+=e.step)t(Tt(o+r*(a-n),f),e)},Xi.prototype.traverseMinorTicksPositions=function(t,e){for(var i=this.options,o=i.min,r=i.max,n=i.minorUnit,s=i.majorUnit,i=this._lineOptions(),a=i.lineStart,p=i.step,h=this.logMin,l=this.logMax,c=Math.floor(h);c<l;c++)for(var u=this._minorIntervalOptions(c),d=e.skip;d<n;d+=e.step){var g=u.value+d*u.minorStep;if(r<g)break;o<=g&&t(Tt(a+p*(Wi(g,s)-h),f),e)}},Xi.prototype.createAxisLabel=function(t,e){var i=Math.ceil(this.logMin+t),o=Math.pow(this.options.majorUnit,i),i=this.axisLabelText(o,null,e);return new Be(o,i,t,null,e)},Xi.prototype.shouldRenderNote=function(t){var e=this.range();return e.min<=t&&t<=e.max},Xi.prototype.pan=function(t){t=this.translateRange(t);return this.limitRange(t.min,t.max,this.totalMin,this.totalMax,t.offset)},Xi.prototype.pointsRange=function(t,e){t=this.getValue(t),e=this.getValue(e);return{min:Math.min(t,e),max:Math.max(t,e)}},Xi.prototype.zoomRange=function(t){var e=this.options,i=this.totalMin,o=this.totalMax,r=this.scaleRange(t),n=kt(r.min,i,o),s=kt(r.max,i,o),t=e.majorUnit,r=n<s&&e.min&&e.max&&Tt(Wi(e.max,t)-Wi(e.min,t),f)<1,t=!(e.min===i&&e.max===o)&&1<=Tt(Wi(s,t)-Wi(n,t),f);if(r||t)return{min:n,max:s}},Xi.prototype._minorIntervalOptions=function(t){var e=this.options,i=e.minorUnit,o=e.majorUnit,e=Math.pow(o,t);return{value:e,minorStep:(Math.pow(o,t+1)-e)/i}},Xi.prototype._lineOptions=function(){var t=this.options,e=t.reverse,i=t.vertical,o=i?m:v,r=this.lineBox(),t=i===e?1:-1,e=1==t?1:2;return{step:t*((i?r.height():r.width())/(this.logMax-this.logMin)),lineStart:r[o+e],lineBox:r}},Xi);function Xi(t,e,i,o){var r,n,s,a,p,h,l,c=L({majorUnit:10,min:t,max:e},i),u=c.majorUnit,d=(l=Tt(Wi(p=e,h=u),f)%1,p<=0?h:0!=l&&(l<.3||.9<l)?Math.pow(h,Wi(p,h)+.2):Math.pow(h,Math.ceil(Wi(p,h)))),l=(r=t,s=(n=c).majorUnit,(a=r)<=0?a=e<=1?Math.pow(s,-2):1:n.narrowRange||(a=Math.pow(s,Math.floor(Wi(r,s)))),a),a=(p=l,h=d,n=i,s=(r=c).min,a=r.max,mt(r.axisCrossingValue)&&r.axisCrossingValue<=0&&Yi(),mt(n.max)?n.max<=0&&Yi():a=h,mt(n.min)?n.min<=0&&Yi():s=p,{min:s,max:a});c.max=a.max,c.min=a.min,c.minorUnit=i.minorUnit||Tt(u-1,f),Ni.call(this,c,o),this.totalMin=mt(i.min)?Math.min(l,i.min):l,this.totalMax=mt(i.max)?Math.max(d,i.max):d,this.logMin=Tt(Wi(a.min,u),f),this.logMax=Tt(Wi(a.max,u),f),this.seriesMin=t,this.seriesMax=e,this.createLabels()}function Yi(){throw new Error("Non positive values cannot be used for a logarithmic axis")}function Wi(t,e){return Math.log(t)/Math.log(e)}It(Y,{type:"log",majorUnit:10,minorUnit:1,axisCrossingValue:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:a},zIndex:1,_deferLabels:!0});var Zi,Ki=Y,$={createGridLines:function(t){var e,i=this.options,o=Math.abs(this.box.center().y-t.lineBox().y1),r=[],n=!1;return i.majorGridLines.visible&&(e=this.majorGridLineAngles(t),n=!0,r=this.renderMajorGridLines(e,o,i.majorGridLines)),i.minorGridLines.visible&&(e=this.minorGridLineAngles(t,n),yt(r,this.renderMinorGridLines(e,o,i.minorGridLines,t,n))),r},renderMajorGridLines:function(t,e,i){return this.renderGridLines(t,e,i)},renderMinorGridLines:function(t,e,i,o,r){r=this.radiusCallback&&this.radiusCallback(e,o,r);return this.renderGridLines(t,e,i,r)},renderGridLines:function(t,e,i,o){for(var r={stroke:{width:i.width,color:i.color,dashType:i.dashType}},i=this.box.center(),n=new C.geometry.Circle([i.x,i.y],e),s=this.gridLinesVisual(),a=0;a<t.length;a++){var p=new C.drawing.Path(r);o&&(n.radius=o(t[a])),p.moveTo(n.center).lineTo(n.pointAt(t[a]+180)),s.append(p)}return s.children},gridLineAngles:function(t,e,i,o,r){var n=this,r=this.intervals(e,i,o,r),t=t.options,s=t.visible&&!1!==(t.line||{}).visible;return dt(r,function(t){t=n.intervalAngle(t);if(!s||90!==t)return t})}},N=((Zi=Ai)&&($i.__proto__=Zi),(($i.prototype=Object.create(Zi&&Zi.prototype)).constructor=$i).prototype.range=function(){return{min:0,max:this.options.categories.length}},$i.prototype.reflow=function(t){this.box=t,this.reflowLabels()},$i.prototype.lineBox=function(){return this.box},$i.prototype.reflowLabels=function(){for(var t=this.labels,e=this.options.labels,i=e.skip||0,o=e.step||1,r=new qt,n=0;n<t.length;n++){t[n].reflow(r);var s=t[n].box;t[n].reflow(this.getSlot(i+n*o).adjacentBox(0,s.width(),s.height()))}},$i.prototype.intervals=function(t,e,i,o){void 0===o&&(o=!1);for(var r,n=this.options,s=n.categories.length/t||1,a=360/s,p=i||1,h=[],l=e||0;l<s;l+=p)r=n.reverse?360-l*a:l*a,r=Tt(r,3)%360,o&&lt(r,o)||h.push(r);return h},$i.prototype.majorIntervals=function(){return this.intervals(1)},$i.prototype.minorIntervals=function(){return this.intervals(.5)},$i.prototype.intervalAngle=function(t){return(360+t+this.options.startAngle)%360},$i.prototype.majorAngles=function(){var e=this;return dt(this.majorIntervals(),function(t){return e.intervalAngle(t)})},$i.prototype.createLine=function(){return[]},$i.prototype.majorGridLineAngles=function(t){var e=this.options.majorGridLines;return this.gridLineAngles(t,1,e.skip,e.step)},$i.prototype.minorGridLineAngles=function(t,e){var i=this.options,o=i.minorGridLines,i=i.majorGridLines,i=e?this.intervals(1,i.skip,i.step):null;return this.gridLineAngles(t,.5,o.skip,o.step,i)},$i.prototype.radiusCallback=function(e,t,i){if(t.options.type!==d){var t=Ct(360/(2*this.options.categories.length)),o=Math.cos(t)*e,r=this.majorAngles();return function(t){return!i&&lt(t,r)?e:o}}},$i.prototype.createPlotBands=function(){for(var t=this.options.plotBands||[],e=this._plotbandGroup=new C.drawing.Group({zIndex:-1}),i=0;i<t.length;i++){var o=t[i],r=this.plotBandSlot(o),n=this.getSlot(o.from),s=o.from-Math.floor(o.from);r.startAngle+=s*n.angle;var a=Math.ceil(o.to)-o.to;r.angle-=(a+s)*n.angle;o=oe.current.createRing(r,{fill:{color:o.color,opacity:o.opacity},stroke:{opacity:o.opacity}});e.append(o)}this.appendVisual(e)},$i.prototype.plotBandSlot=function(t){return this.getSlot(t.from,t.to-1)},$i.prototype.getSlot=function(t,e){var i=this.options,o=i.justified,r=this.box,n=this.majorAngles(),s=n.length,a=360/s,t=t;i.reverse&&!o&&(t=(t+1)%s);n=n[t=kt(Math.floor(t),0,s-1)];o&&(n-=a/2)<0&&(n+=360);t=a*(kt(Math.ceil(e||t),t,s-1)-t+1);return new $t(r.center(),0,r.height()/2,n,t)},$i.prototype.slot=function(t,e){var i=this.getSlot(t,e),t=i.startAngle+180,e=t+i.angle;return new C.geometry.Arc([i.center.x,i.center.y],{startAngle:t,endAngle:e,radiusX:i.radius,radiusY:i.radius})},$i.prototype.pointCategoryIndex=function(t){for(var e=this.options.categories.length,i=null,o=0;o<e;o++)if(this.getSlot(o).containsPoint(t)){i=o;break}return i},$i);function $i(){Zi.apply(this,arguments)}It(N,{startAngle:90,labels:{margin:U(10)},majorGridLines:{visible:!0},justified:!0}),L(N.prototype,$);var Ji,Qi=N,G=((Ji=Ue)&&(to.__proto__=Ji),((to.prototype=Object.create(Ji&&Ji.prototype)).constructor=to).prototype.getDivisions=function(t){return Hi.prototype.getDivisions.call(this,t)-1},to.prototype.reflow=function(t){this.box=t,this.reflowLabels()},to.prototype.reflowLabels=function(){for(var t=this.options,e=this.labels,i=this.options.labels,o=i.skip||0,i=i.step||1,r=new qt,n=this.intervals(t.majorUnit,o,i),s=0;s<e.length;s++){e[s].reflow(r);var a=e[s].box;e[s].reflow(this.getSlot(n[s]).adjacentBox(0,a.width(),a.height()))}},to.prototype.lineBox=function(){return this.box},to.prototype.intervals=function(t,e,i,o){void 0===o&&(o=!1);for(var r=this.options.min,n=this.getDivisions(t),s=[],a=i||1,p=e||0;p<n;p+=a){var h=(360+r+p*t)%360;o&&lt(h,o)||s.push(h)}return s},to.prototype.majorIntervals=function(){return this.intervals(this.options.majorUnit)},to.prototype.minorIntervals=function(){return this.intervals(this.options.minorUnit)},to.prototype.intervalAngle=function(t){return(540-t-this.options.startAngle)%360},to.prototype.createLine=function(){return[]},to.prototype.majorGridLineAngles=function(t){var e=this.options.majorGridLines;return this.gridLineAngles(t,this.options.majorUnit,e.skip,e.step)},to.prototype.minorGridLineAngles=function(t,e){var i=this.options,o=i.minorGridLines,r=i.majorGridLines,r=e?this.intervals(i.majorUnit,r.skip,r.step):null;return this.gridLineAngles(t,i.minorUnit,o.skip,o.step,r)},to.prototype.plotBandSlot=function(t){return this.getSlot(t.from,t.to)},to.prototype.getSlot=function(t,e){var i=this.options,o=this.box,r=i.startAngle,t=kt(t,i.min,i.max),e=kt(e||t,t,i.max);return i.reverse&&(t*=-1,e*=-1),(e=(540-e-r)%360)<(t=(540-t-r)%360)&&(r=t,t=e,e=r),new $t(o.center(),0,o.height()/2,t,e-t)},to.prototype.slot=function(t,e){void 0===e&&(e=t);var i=this.options,o=360-i.startAngle,r=this.getSlot(t,e),n=Math.min(t,e),e=Math.max(t,e),n=i.reverse?(s=n,e):(s=360-e,360-n),s=(s+o)%360;return n=(n+o)%360,new C.geometry.Arc([r.center.x,r.center.y],{startAngle:s,endAngle:n,radiusX:r.radius,radiusY:r.radius})},to.prototype.getValue=function(t){var e=this.options,i=this.box.center(),o=t.x-i.x,i=t.y-i.y,i=Math.round(xt(Math.atan2(i,o))),o=e.startAngle;return e.reverse||(i*=-1,o*=-1),(i+o+360)%360},to.prototype.valueRange=function(){return{min:0,max:2*Math.PI}},to);function to(t,e){Ji.call(this,t,e);e=this.options;e.minorUnit=e.minorUnit||e.majorUnit/2}It(G,{type:"polar",startAngle:0,reverse:!1,majorUnit:60,min:0,max:360,labels:{margin:U(10)},majorGridLines:{color:a,visible:!0,width:1},minorGridLines:{color:"#aaa"}}),L(G.prototype,$,{createPlotBands:Qi.prototype.createPlotBands,majorAngles:Qi.prototype.majorAngles,range:Hi.prototype.range,labelsCount:Hi.prototype.labelsCount,createAxisLabel:Hi.prototype.createAxisLabel});var eo=G;function io(t,e){return 180-Math.abs(Math.abs(t-e)-180)}var oo,K={options:{majorGridLines:{visible:!0}},createPlotBands:function(){var t=this.options,e=t.majorGridLines.type,i=t.plotBands;void 0===i&&(i=[]);for(var t=this.plotArea.polarAxis,o=t.majorAngles(),r=t.box.center(),n=this._plotbandGroup=new C.drawing.Group({zIndex:-1}),s=0;s<i.length;s++){var a=i[s],p={fill:{color:a.color,opacity:a.opacity},stroke:{opacity:a.opacity}},h=this.getSlot(a.from,a.to,!0),a=new $t(r,r.y-h.y2,r.y-h.y1,0,360),h=e===d?oe.current.createRing(a,p):C.drawing.Path.fromPoints(this.plotBandPoints(a,o),p).close();n.append(h)}this.appendVisual(n)},plotBandPoints:function(t,e){for(var i=[],o=[],r=[t.center.x,t.center.y],n=new C.geometry.Circle(r,t.innerRadius),s=new C.geometry.Circle(r,t.radius),a=0;a<e.length;a++)i.push(n.pointAt(e[a]+180)),o.push(s.pointAt(e[a]+180));return i.reverse(),i.push(i[0]),o.push(o[0]),o.concat(i)},createGridLines:function(t){var e=this.options,i=this.radarMajorGridLinePositions(),o=t.majorAngles(),r=t.box.center(),t=[];return e.majorGridLines.visible&&(t=this.renderGridLines(r,i,o,e.majorGridLines)),e.minorGridLines.visible&&(i=this.radarMinorGridLinePositions(),yt(t,this.renderGridLines(r,i,o,e.minorGridLines))),t},renderGridLines:function(t,e,i,o){var r={stroke:{width:o.width,color:o.color,dashType:o.dashType}},n=o.skip;void 0===n&&(n=0);var s=o.step;void 0===s&&(s=0);for(var a=this.gridLinesVisual(),p=n;p<e.length;p+=s){var h=t.y-e[p];if(0<h){var l=new C.geometry.Circle([t.x,t.y],h);if(o.type===d)a.append(new C.drawing.Circle(l,r));else{for(var c=new C.drawing.Path(r),u=0;u<i.length;u++)c.lineTo(l.pointAt(i[u]+180));c.close(),a.append(c)}}}return a.children},getValue:function(t){var i,e=this.lineBox(),o=this.plotArea.polarAxis,r=o.majorAngles(),n=o.box.center(),s=t.distanceTo(n),a=s;return this.options.majorGridLines.type!==d&&1<r.length&&(o=t.x-n.x,n=t.y-n.y,i=(xt(Math.atan2(n,o))+540)%360,r.sort(function(t,e){return io(t,i)-io(e,i)}),o=90-io(r[0],r[1])/2,r=180-io(i,r[0])-o,a=s*(Math.sin(Ct(r))/Math.sin(Ct(o)))),this.axisType().prototype.getValue.call(this,new Ut(e.x1,e.y2-a))}},W=((oo=Hi)&&(ro.__proto__=oo),((ro.prototype=Object.create(oo&&oo.prototype)).constructor=ro).prototype.radarMajorGridLinePositions=function(){return this.getTickPositions(this.options.majorUnit)},ro.prototype.radarMinorGridLinePositions=function(){var t=this.options,e=0;return t.majorGridLines.visible&&(e=t.majorUnit),this.getTickPositions(t.minorUnit,e)},ro.prototype.axisType=function(){return oo},ro);function ro(){oo.apply(this,arguments)}L(W.prototype,K);var no,so=W,Y=((no=Ki)&&(ao.__proto__=no),((ao.prototype=Object.create(no&&no.prototype)).constructor=ao).prototype.radarMajorGridLinePositions=function(){var e=[];return this.traverseMajorTicksPositions(function(t){e.push(t)},this.options.majorGridLines),e},ao.prototype.radarMinorGridLinePositions=function(){var e=[];return this.traverseMinorTicksPositions(function(t){e.push(t)},this.options.minorGridLines),e},ao.prototype.axisType=function(){return no},ao);function ao(){no.apply(this,arguments)}L(Y.prototype,K);var po=Y;function ho(t){return t<=0?-1:1}var lo,co,uo=((co=C.Class)&&(yo.__proto__=co),((yo.prototype=Object.create(co&&co.prototype)).constructor=yo).prototype.process=function(t){var e=t.slice(0),i=[],o=this.closed,r=e.length;if(2<r&&(this.removeDuplicates(0,e),r=e.length),r<2||2===r&&e[0].equals(e[1]))return i;var n,s=e[0],a=e[1],p=e[2];for(i.push(new C.geometry.Segment(s));s.equals(e[r-1]);)o=!0,e.pop(),r--;if(2===r){t=this.tangent(s,a,v,m);return St(i).controlOut(this.firstControlPoint(t,s,a,v,m)),i.push(new C.geometry.Segment(a,this.secondControlPoint(t,s,a,v,m))),i}o?(s=e[r-1],a=e[0],p=e[1],l=(n=this.controlPoints(s,a,p))[1],c=n[0]):(n=this.tangent(s,a,v,m),l=this.firstControlPoint(n,s,a,v,m));for(var h,l,c,u=l,d=0;d<=r-3;d++)this.removeDuplicates(d,e),d+3<=(r=e.length)&&(s=e[d],a=e[d+1],p=e[d+2],h=this.controlPoints(s,a,p),St(i).controlOut(u),u=h[1],h=h[0],i.push(new C.geometry.Segment(a,h)));return o?(s=e[r-2],a=e[r-1],p=e[0],l=this.controlPoints(s,a,p),St(i).controlOut(u),i.push(new C.geometry.Segment(a,l[0])),St(i).controlOut(l[1]),i.push(new C.geometry.Segment(p,c))):(c=this.tangent(a,p,v,m),St(i).controlOut(u),i.push(new C.geometry.Segment(p,this.secondControlPoint(c,a,p,v,m)))),i},yo.prototype.removeDuplicates=function(t,e){for(;e[t+1]&&(e[t].equals(e[t+1])||e[t+1].equals(e[t+2]));)e.splice(t+1,1)},yo.prototype.invertAxis=function(t,e,i){var o,r=!1;return t.x===e.x?r=!0:e.x===i.x?(e.y<i.y&&t.y<=e.y||i.y<e.y&&e.y<=t.y)&&(r=!0):(o=this.lineFunction(t,e),o=this.calculateFunction(o,i.x),t.y<=e.y&&i.y<=o||e.y<=t.y&&i.y>=o||(r=!0)),r},yo.prototype.isLine=function(t,e,i){var o=this.lineFunction(t,e),o=this.calculateFunction(o,i.x);return t.x===e.x&&e.x===i.x||Tt(o,1)===Tt(i.y,1)},yo.prototype.lineFunction=function(t,e){e=(e.y-t.y)/(e.x-t.x);return[t.y-e*t.x,e]},yo.prototype.controlPoints=function(t,e,i){var o,r=v,n=m,s=!1,a=!1;this.isLine(t,e,i)?o=this.tangent(t,e,v,m):(p={x:this.isMonotonicByField(t,e,i,v),y:this.isMonotonicByField(t,e,i,m)}).x&&p.y?(o=this.tangent(t,i,v,m),s=!0):(this.invertAxis(t,e,i)&&(r=m,n=v),p[r]?o=0:(o=.01*(i[n]<t[n]&&t[n]<=e[n]||t[n]<i[n]&&e[n]<=t[n]?ho((i[n]-t[n])*(e[r]-t[r])):-ho((i[r]-t[r])*(e[n]-t[n]))),a=!0));var p=this.secondControlPoint(o,t,e,r,n);a&&(a=r,r=n,n=a);n=this.firstControlPoint(o,e,i,r,n);return s&&(this.restrictControlPoint(t,e,p,o),this.restrictControlPoint(e,i,n,o)),[p,n]},yo.prototype.restrictControlPoint=function(t,e,i,o){t.y<e.y?e.y<i.y?(i.x=t.x+(e.y-t.y)/o,i.y=e.y):i.y<t.y&&(i.x=e.x-(e.y-t.y)/o,i.y=t.y):i.y<e.y?(i.x=t.x-(t.y-e.y)/o,i.y=e.y):t.y<i.y&&(i.x=e.x+(t.y-e.y)/o,i.y=t.y)},yo.prototype.tangent=function(t,e,i,o){i=e[i]-t[i],o=e[o]-t[o];return 0==i?0:o/i},yo.prototype.isMonotonicByField=function(t,e,i,o){return i[o]>e[o]&&e[o]>t[o]||i[o]<e[o]&&e[o]<t[o]},yo.prototype.firstControlPoint=function(t,e,i,o,r){var n=e[o],i=.333*(i[o]-n);return this.point(n+i,e[r]+i*t,o,r)},yo.prototype.secondControlPoint=function(t,e,i,o,r){var n=e[o],e=i[o],n=.333*(e-n);return this.point(e-n,i[r]-n*t,o,r)},yo.prototype.point=function(t,e,i,o){var r=new C.geometry.Point;return r[i]=t,r[o]=e,r},yo.prototype.calculateFunction=function(t,e){for(var i=t.length,o=0,r=0;r<i;r++)o+=Math.pow(e,r)*t[r];return o},yo),go=((lo=C.Class)&&(fo.__proto__=lo),((fo.prototype=Object.create(lo&&lo.prototype)).constructor=fo).prototype.value=function(t){var e=this._axis;return e.getCategory?e.getCategory(t):e.getValue(t)},fo.prototype.slot=function(t,e,i){return void 0===i&&(i=!0),this._axis.slot(t,e,i)},fo.prototype.range=function(){return this._axis.range()},fo.prototype.valueRange=function(){return this._axis.valueRange()},fo);function fo(t){lo.call(this),this._axis=t,this.options=t.options}function yo(t){co.call(this),this.closed=t}function vo(t,e){for(var i=0;i<e.length;i++)if(e[i].options.name===t)return e[i].prepareUserOptions(),new go(e[i])}N=function(t){this.visual=t.visual,this.chartsVisual=t.chartContainer.visual,this._pane=t};N.prototype.findAxisByName=function(t){return vo(t,this._pane.axes)};var mo,xo=N,bo=((mo=C.Class)&&(_o.__proto__=mo),(_o.prototype=Object.create(mo&&mo.prototype)).constructor=_o);function _o(t){mo.call(this),this._plotArea=t,this.visual=t.visual,this.backgroundVisual=t._bgVisual}function wo(t){for(var e=t.length,i=0,o=0;o<e;o++)R(t[o])&&i++;return i}var Ao={min:function(t){for(var e=t.length,i=l,o=0;o<e;o++){var r=t[o];R(r)&&(i=Math.min(i,r))}return i===l?t[0]:i},max:function(t){for(var e=t.length,i=c,o=0;o<e;o++){var r=t[o];R(r)&&(i=Math.max(i,r))}return i===c?t[0]:i},sum:function(t){for(var e=t.length,i=0,o=0;o<e;o++){var r=t[o];R(r)&&(i+=r)}return i},sumOrNull:function(t){var e=null;return wo(t)&&(e=Ao.sum(t)),e},count:function(t){for(var e=t.length,i=0,o=0;o<e;o++){var r=t[o];null!==r&&mt(r)&&i++}return i},avg:function(t){var e=wo(t),i=t[0];return 0<e&&(i=Ao.sum(t)/e),i},first:function(t){for(var e=t.length,i=0;i<e;i++){var o=t[i];if(null!==o&&mt(o))return o}return t[0]}},So=Ao;function ko(t,e){return null===e?e:st(t)(e)}var Po,$=((Po=C.Class)&&(Co.__proto__=Po),((Co.prototype=Object.create(Po&&Po.prototype)).constructor=Co).prototype.register=function(t,e,i){void 0===e&&(e=[h]),void 0===i&&(i={});for(var o=0;o<t.length;o++){var r=t[o];this._valueFields[r]=e,this._otherFields[r]=i,this._nullValue[r]=this._makeValue(e,null),this._undefinedValue[r]=this._makeValue(e,void 0)}},Co.prototype.canonicalFields=function(t){return this.valueFields(t).concat(this.otherFields(t))},Co.prototype.valueFields=function(t){return this._valueFields[t.type]||[h]},Co.prototype.otherFields=function(t){return this._otherFields[t.type]||[h]},Co.prototype.bindPoint=function(t,e,i){var o,r,n,s=t.data,a=mt(i)?i:s[e],p={valueFields:{value:a}},i=this.valueFields(t),s=this._otherFields[t.type];return null===a?o=this._nullValue[t.type]:mt(a)?Array.isArray(a)?(n=a.slice(i.length),o=this._bindFromArray(a,i),r=this._bindFromArray(n,s)):"object"==typeof a&&(e=this.sourceFields(t,i),n=this.sourceFields(t,s),o=this._bindFromObject(a,i,e),r=this._bindFromObject(a,s,n)):o=this._undefinedValue[t.type],mt(o)&&(1===i.length?p.valueFields.value=o[i[0]]:p.valueFields=o),p.fields=r||{},p},Co.prototype._makeValue=function(t,e){for(var i={},o=t.length,r=0;r<o;r++)i[t[r]]=e;return i},Co.prototype._bindFromArray=function(t,e){var i={};if(e)for(var o=Math.min(e.length,t.length),r=0;r<o;r++)i[e[r]]=t[r];return i},Co.prototype._bindFromObject=function(t,e,i){void 0===i&&(i=e);var o={};if(e)for(var r=e.length,n=0;n<r;n++){var s=e[n],a=i[n];null!==a&&(o[s]=ko(a,t))}return o},Co.prototype.sourceFields=function(t,e){var i=[];if(e)for(var o=e.length,r=0;r<o;r++){var n=e[r],s=n===h?"field":n+"Field";i.push(null!==t[s]?t[s]||n:null)}return i},Co);function Co(){Po.call(this),this._valueFields={},this._otherFields={},this._nullValue={},this._undefinedValue={}}$.current=new $;var To,Mo,Ro=$,Oo=/percent(?:\w*)\((\d+)\)/,Io=new RegExp("^stddev(?:\\((\\d+(?:\\.\\d+)?)\\))?$"),jo=((Mo=C.Class)&&(Zo.__proto__=Mo),((Zo.prototype=Object.create(Mo&&Mo.prototype)).constructor=Zo).prototype.initGlobalRanges=function(t,e,i){var o,r,n,s,a=e.data,p=Io.exec(t);p?(this.valueGetter=this.createValueGetter(e,i),o=this.getAverage(a),r=this.getStandardDeviation(a,o,!1),p=p[1]?parseFloat(p[1]):1,n={low:o.value-r*p,high:o.value+r*p},this.globalRange=function(){return n}):t.indexOf&&0<=t.indexOf("stderr")&&(this.valueGetter=this.createValueGetter(e,i),s=this.getStandardError(a,this.getAverage(a)),this.globalRange=function(t){return{low:t-s,high:t+s}})},Zo.prototype.createValueGetter=function(t,e){var i,o=t.data,r=Ro.current,n=r.valueFields(t),o=mt(o[0])?o[0]:{};return x(o)?i=st("["+(e?n.indexOf(e):0)+"]"):R(o)?i=st():"object"==typeof o&&(i=st(r.sourceFields(t,n)[n.indexOf(e)])),i},Zo.prototype.getErrorRange=function(t,e){if(!mt(e))return null;if(this.globalRange)return this.globalRange(t);if(x(e))o=t-e[0],r=t+e[1];else if(R(i=parseFloat(e)))o=t-i,r=t+i;else{if(!(i=Oo.exec(e)))throw new Error("Invalid ErrorBar value: "+e);var i=t*(parseFloat(i[1])/100),o=t-Math.abs(i),r=t+Math.abs(i)}return{low:o,high:r}},Zo.prototype.getStandardError=function(t,e){return this.getStandardDeviation(t,e,!0)/Math.sqrt(e.count)},Zo.prototype.getStandardDeviation=function(t,e,i){for(var o=t.length,i=i?e.count-1:e.count,r=0,n=0;n<o;n++){var s=this.valueGetter(t[n]);R(s)&&(r+=Math.pow(s-e.value,2))}return Math.sqrt(r/i)},Zo.prototype.getAverage=function(t){for(var e=t.length,i=0,o=0,r=0;r<e;r++){var n=this.valueGetter(t[r]);R(n)&&(i+=n,o++)}return{value:i/o,count:o}},Zo),Bo=(C.support.browser||{}).msie?.001:0,Vo="zero",Lo="interpolate",zo="bar",Eo="column",Fo="line",Do="pie",Uo="verticalLine",Ho=[zo,Eo,"ohlc","candlestick","boxPlot","verticalBoxPlot","bullet","rangeColumn","rangeBar","waterfall","horizontalWaterfall"],Go="drag",No="dragEnd",qo="zoom",Xo="zoomEnd",Yo="DOMMouseScroll mousewheel",G=((To=se)&&(Wo.__proto__=To),((Wo.prototype=Object.create(To&&To.prototype)).constructor=Wo).prototype.reflow=function(t){var e,i=this.options.endCaps,o=this.isVertical,r=this.getAxis().getSlot(this.low,this.high),n=t.center(),s=this.getCapsWidth(t,o),a=o?n.x:n.y,t=a-s,s=a+s;o?(e=[new Ut(n.x,r.y1),new Ut(n.x,r.y2)],i&&e.push(new Ut(t,r.y1),new Ut(s,r.y1),new Ut(t,r.y2),new Ut(s,r.y2)),this.box=new qt(t,r.y1,s,r.y2)):(e=[new Ut(r.x1,n.y),new Ut(r.x2,n.y)],i&&e.push(new Ut(r.x1,t),new Ut(r.x1,s),new Ut(r.x2,t),new Ut(r.x2,s)),this.box=new qt(r.x1,t,r.x2,s)),this.linePoints=e},Wo.prototype.getCapsWidth=function(t,e){t=e?t.width():t.height();return Math.min(Math.floor(t/2),4)||4},Wo.prototype.createVisual=function(){var e=this,t=this.options,i=t.visual;i?this.visual=i({low:this.low,high:this.high,rect:this.box.toRect(),sender:this.getSender(),options:{endCaps:t.endCaps,color:t.color,line:t.line},createVisual:function(){e.createDefaultVisual();var t=e.visual;return delete e.visual,t}}):this.createDefaultVisual()},Wo.prototype.createDefaultVisual=function(){var t=this.options,e=this.linePoints,i={stroke:{color:t.color,width:t.line.width,dashType:t.line.dashType}};To.prototype.createVisual.call(this);for(var o=0;o<e.length;o+=2){var r=new C.drawing.Path(i).moveTo(e[o].x,e[o].y).lineTo(e[o+1].x,e[o+1].y);T(r),this.visual.append(r)}},Wo);function Wo(t,e,i,o,r,n){To.call(this,n),this.low=t,this.high=e,this.isVertical=i,this.chart=o,this.series=r}function Zo(t,e,i){Mo.call(this),this.initGlobalRanges(t,e,i)}It(G,{animation:{type:"fadeIn",delay:600},endCaps:!0,line:{width:2},zIndex:1});var Ko,$o=G,Jo=((Ko=$o)&&(tr.__proto__=Ko),((tr.prototype=Object.create(Ko&&Ko.prototype)).constructor=tr).prototype.getAxis=function(){return this.chart.seriesValueAxis(this.series)},tr),Qo=5;function tr(){Ko.apply(this,arguments)}function er(t,e,i,o){void 0===i&&(i={}),void 0===o&&(o=!1);var r,n,s=i.defaults=i.defaults||{},a=i.depth=i.depth||0,p=!1;if(i.excluded=i.excluded||[],Qo<a)return null;for(r in t)!lt(r,i.excluded)&&t.hasOwnProperty(r)&&(j(n=t[r])?(p=!0,o||(t[r]=Rt(n(e),s[r]))):z(n)&&(o||(i.defaults=s[r]),i.depth++,p=er(n,e,i,o)||p,i.depth--));return p}function ir(t){for(var e=t.length,i=0,o=0;o<e;o++)i=Math.max(i,t[o].data.length);return i}var or,W=((or=se)&&(rr.__proto__=or),((rr.prototype=Object.create(or&&or.prototype)).constructor=rr).prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},rr.prototype.pointOptions=function(t,e){var i,o=this.seriesOptions[e];return o||(i=this.pointType().prototype.defaults,this.seriesOptions[e]=o=L({},i,{vertical:!this.options.invertAxes},t)),o},rr.prototype.plotValue=function(t){if(!t)return 0;if(this.options.isStacked100&&R(t.value)){for(var e=t.categoryIx,i=this.categoryPoints[e],o=[],r=0,n=0;n<i.length;n++){var s,a,p=i[n];p&&(s=t.series.stack,a=p.series.stack,s&&a&&s.group!==a.group||R(p.value)&&(r+=Math.abs(p.value),o.push(Math.abs(p.value))))}if(0<r)return t.value/r}return t.value},rr.prototype.plotRange=function(t,e){void 0===e&&(e=0);var i=this.categoryPoints[t.categoryIx];if(this.options.isStacked){for(var o=this.plotValue(t),r=0<=o,n=e,s=!1,a=0;a<i.length;a++){var p=i[a];if(t===p)break;var h=t.series.stack,l=p.series.stack;if(h&&l){if(typeof h===g&&h!==l)continue;if(h.group&&h.group!==l.group)continue}p=this.plotValue(p);(0<=p&&r||p<0&&!r)&&(n+=p,o+=p,s=!0,this.options.isStacked100&&(o=Math.min(o,1)))}return s&&(n-=e),[n,o]}e=t.series,e=this.seriesValueAxis(e),e=this.categoryAxisCrossingValue(e);return[e,I(t.value)?t.value:e]},rr.prototype.stackLimits=function(t,e){for(var i=l,o=c,r=0;r<this.categoryPoints.length;r++){var n=this.categoryPoints[r];if(n)for(var s=0;s<n.length;s++){var a=n[s];!a||a.series.stack!==e&&a.series.axis!==t||(a=this.plotRange(a,0)[1],mt(a)&&isFinite(a)&&(o=Math.max(o,a),i=Math.min(i,a)))}}return{min:i,max:o}},rr.prototype.updateStackRange=function(){var t=this.options,e=t.isStacked,i=t.series,o={};if(e)for(var r=0;r<i.length;r++){var n=i[r],s=n.axis,a=s+n.stack,p=o[a];p||(p=this.stackLimits(s,n.stack),(n=this.errorTotals)&&(n.negative.length&&(p.min=Math.min(p.min,jt(n.negative).min)),n.positive.length&&(p.max=Math.max(p.max,jt(n.positive).max))),p.min!==l||p.max!==c?o[a]=p:p=null),p&&(this.valueAxisRanges[s]=p)}},rr.prototype.addErrorBar=function(t,e,i){var o,r=t.value,n=t.series,s=t.seriesIx,a=t.options.errorBars,p=e.fields.errorLow,e=e.fields.errorHigh;R(p)&&R(e)?o={low:p,high:e}:a&&mt(a.value)&&(this.seriesErrorRanges=this.seriesErrorRanges||[],this.seriesErrorRanges[s]=this.seriesErrorRanges[s]||new jo(a.value,n,h),o=this.seriesErrorRanges[s].getErrorRange(r,a.value)),o&&(t.low=o.low,t.high=o.high,this.addPointErrorBar(t,i))},rr.prototype.addPointErrorBar=function(t,e){var i,o=!this.options.invertAxes,r=t.options.errorBars,n=t.series,s=t.low,a=t.high;this.options.isStacked?(s=(i=this.stackedErrorRange(t,e)).low,a=i.high):(e={categoryIx:e,series:n},this.updateRange({value:s},e),this.updateRange({value:a},e));r=new Jo(s,a,o,this,n,r);t.errorBars=[r],t.append(r)},rr.prototype.stackedErrorRange=function(t,e){var i=this.plotRange(t,0)[1]-t.value,o=t.low+i,i=t.high+i;return this.errorTotals=this.errorTotals||{positive:[],negative:[]},o<0&&(this.errorTotals.negative[e]=Math.min(this.errorTotals.negative[e]||0,o)),0<i&&(this.errorTotals.positive[e]=Math.max(this.errorTotals.positive[e]||0,i)),{low:o,high:i}},rr.prototype.addValue=function(t,e){var i=e.categoryIx,o=e.series,r=e.seriesIx,n=this.categoryPoints[i];n||(this.categoryPoints[i]=n=[]);var s=this.seriesPoints[r];s||(this.seriesPoints[r]=s=[]);r=this.createPoint(t,e);r&&(Object.assign(r,e),r.owner=this,r.noteText=t.fields.noteText,mt(r.dataItem)||(r.dataItem=o.data[i]),this.addErrorBar(r,t,i)),this.points.push(r),s.push(r),n.push(r),this.updateRange(t.valueFields,e)},rr.prototype.evalPointOptions=function(t,e,i,o,r,n){var s={defaults:r._defaults,excluded:["data","aggregate","_events","tooltip","content","template","visual","toggle","_outOfRangeMinPoint","_outOfRangeMaxPoint"]},a=this._evalSeries[n];mt(a)||(this._evalSeries[n]=a=er(t,{},s,!0));return a&&er(t=L({},t),{value:e,category:i,index:o,series:r,dataItem:r.data[o]},s),t},rr.prototype.updateRange=function(t,e){var i=e.series.axis,e=t.value,t=this.valueAxisRanges[i];isFinite(e)&&null!==e&&((t=this.valueAxisRanges[i]=t||{min:l,max:c}).min=Math.min(t.min,e),t.max=Math.max(t.max,e))},rr.prototype.seriesValueAxis=function(t){var e=this.plotArea,t=t.axis,e=t?e.namedValueAxes[t]:e.valueAxis;if(!e)throw new Error("Unable to locate value axis with name "+t);return e},rr.prototype.reflow=function(t){var s=this,a=this.categorySlots=[],p=this.points,h=this.categoryAxis,l=0;this.traverseDataPoints(function(t,e){var i=e.categoryIx,o=e.series,r=s.seriesValueAxis(o),n=p[l++],e=a[i];e||(a[i]=e=s.categorySlot(h,i,r)),n&&(o=s.plotRange(n,r.startValue()),(i=s.valueSlot(r,o))?(i=s.pointSlot(e,i),n.aboveAxis=s.aboveAxis(n,r),n.stackValue=o[1],s.options.isStacked100&&(n.percentage=s.plotValue(n)),s.reflowPoint(n,i)):n.visible=!1)}),this.reflowCategories(a),!this.options.clip&&this.options.limitPoints&&this.points.length&&this.limitPoints(),this.box=t},rr.prototype.valueSlot=function(t,e){return t.getSlot(e[0],e[1],!this.options.clip)},rr.prototype.limitPoints=function(){for(var t=this.categoryPoints,e=t[0].concat(St(t)),i=0;i<e.length;i++)e[i]&&this.limitPoint(e[i])},rr.prototype.limitPoint=function(t){var e=this.categoryAxis.limitSlot(t.box);e.equals(t.box)||t.reflow(e)},rr.prototype.aboveAxis=function(t,e){var i=this.categoryAxisCrossingValue(e),t=t.value;return e.options.reverse?t<i:i<=t},rr.prototype.categoryAxisCrossingValue=function(t){var e=this.categoryAxis,t=t.options;return[].concat(t.axisCrossingValues||t.axisCrossingValue)[e.axisIndex||0]||0},rr.prototype.reflowPoint=function(t,e){t.reflow(e)},rr.prototype.reflowCategories=function(){},rr.prototype.pointSlot=function(t,e){var i=this.options.invertAxes,o=i?e:t,e=i?t:e;return new qt(o.x1,e.y1,o.x2,e.y2)},rr.prototype.categorySlot=function(t,e){return t.getSlot(e)},rr.prototype.traverseDataPoints=function(t){for(var e=this.options.series,i=ir(e),o=e.length,r=0;r<o;r++)this._outOfRangeCallback(e[r],"_outOfRangeMinPoint",r,t);for(var n=0;n<i;n++)for(var s=0;s<o;s++){var a=e[s],p=this.categoryAxis.categoryAt(n);t(this._bindPoint(a,s,n),{category:p,categoryIx:n,categoriesCount:i,series:a,seriesIx:s})}for(var h=0;h<o;h++)this._outOfRangeCallback(e[h],"_outOfRangeMaxPoint",h,t)},rr.prototype._outOfRangeCallback=function(t,e,i,o){var r=t[e];r&&(e=r.categoryIx,o(this._bindPoint(t,i,e,r.item),{category:r.category,categoryIx:e,series:t,seriesIx:i,dataItem:r.item}))},rr.prototype._bindPoint=function(t,e,i,o){this._bindCache||(this._bindCache=[]);var r=this._bindCache[e];return(r=r||(this._bindCache[e]=[]))[i]||(r[i]=Ro.current.bindPoint(t,i,o))},rr.prototype.formatPointValue=function(t,e){return null===t.value?"":this.chartService.format.auto(e,t.value)},rr.prototype.pointValue=function(t){return t.valueFields.value},rr);function rr(t,e){or.call(this,e),this.plotArea=t,this.chartService=t.chartService,this.categoryAxis=t.seriesCategoryAxis(e.series[0]),this.valueAxisRanges={},this.points=[],this.categoryPoints=[],this.seriesPoints=[],this.seriesOptions=[],this._evalSeries=[],this.render()}It(W,{series:[],invertAxes:!1,isStacked:!1,clip:!0,limitPoints:!0});var nr,sr=W,ar={click:function(t,e){return t.trigger("seriesClick",this.eventArgs(e))},hover:function(t,e){return t.trigger("seriesHover",this.eventArgs(e))},over:function(t,e){return t.trigger("seriesOver",this.eventArgs(e))},out:function(t,e){return t.trigger("seriesLeave",this.eventArgs(e))},eventArgs:function(t){return{value:this.value,percentage:this.percentage,stackValue:this.stackValue,category:this.category,series:this.series,dataItem:this.dataItem,runningTotal:this.runningTotal,total:this.total,element:wt(t),originalEvent:t,point:this}}},K={createNote:function(){var t=this.options.notes,e=this.noteText||t.label.text;!1!==t.visible&&mt(e)&&null!==e&&(this.note=new Le({value:this.value,text:e,dataItem:this.dataItem,category:this.category,series:this.series},this.options.notes,this.owner.chartService),this.append(this.note))}},Y=((nr=se)&&(pr.__proto__=nr),((pr.prototype=Object.create(nr&&nr.prototype)).constructor=pr).prototype.render=function(){var t,e=this.options,i=e.markers,o=e.labels;this._rendered||(this._rendered=!0,i.visible&&i.size&&(this.marker=this.createMarker(),this.append(this.marker)),o.visible&&(t=ot(o),e=this.pointData(),i=this.value,t?i=t(e):o.format&&(i=this.formatValue(o.format)),this.label=new Ce(i,L({align:A,vAlign:A,margin:{left:5,right:5},zIndex:Rt(o.zIndex,this.series.zIndex)},o),e),this.append(this.label)),this.createNote(),this.errorBar&&this.append(this.errorBar))},pr.prototype.markerBorder=function(){var t=this.options.markers,e=t.background,t=L({color:this.color},t.border);return mt(t.color)||(t.color=new C.Color(e).brightness(.8).toHex()),t},pr.prototype.createVisual=function(){},pr.prototype.createMarker=function(){var t=this.options.markers;return new ce({type:t.type,width:t.size,height:t.size,rotation:t.rotation,background:t.background,border:this.markerBorder(),opacity:this.series.opacity||t.opacity,zIndex:Rt(t.zIndex,this.series.zIndex),animation:t.animation,visual:t.visual},{dataItem:this.dataItem,value:this.value,series:this.series,category:this.category})},pr.prototype.markerBox=function(){return this.marker||(this.marker=this.createMarker(),this.marker.reflow(this._childBox)),this.marker.box},pr.prototype.reflow=function(t){var e=this.options,i=this.aboveAxis,o=e.vertical;this.render();var r=(this.box=t).clone();if(o?i?r.y1-=r.height():r.y2+=r.height():i?r.x1+=r.width():r.x2-=r.width(),this._childBox=r,this.marker&&this.marker.reflow(r),this.reflowLabel(r),this.errorBars)for(var n=0;n<this.errorBars.length;n++)this.errorBars[n].reflow(r);this.note&&(i=this.markerBox(),e.markers.visible&&e.markers.size||(e=i.center(),i=new qt(e.x,e.y,e.x,e.y)),this.note.reflow(i))},pr.prototype.reflowLabel=function(t){var e=this.options,i=this.label,e=e.labels.position;i&&(e="below"===(e="above"===e?P:e)?w:e,i.reflow(t),i.box.alignTo(this.markerBox(),e),i.reflow(i.box))},pr.prototype.createHighlight=function(){var t=this.options.highlight.markers,e=this.markerBorder().color,i=this.options.markers,o=i.size+(i.border.width||0)+(t.border.width||0),t=new ce({type:i.type,width:o,height:o,rotation:i.rotation,background:t.color||e,border:{color:t.border.color,width:t.border.width,opacity:Rt(t.border.opacity,1)},opacity:Rt(t.opacity,1)});return t.reflow(this._childBox),t.getElement()},pr.prototype.highlightVisual=function(){return(this.marker||{}).visual},pr.prototype.highlightVisualArgs=function(){var t,e,i,o,r=this.marker;return r?(o=r.paddingBox.toRect(),t=r.visual):(i=(e=this.options.markers.size)/2,r=this.box.center(),o=new C.geometry.Rect([r.x-i,r.y-i],[e,e])),{options:this.options,rect:o,visual:t}},pr.prototype.tooltipAnchor=function(){var t=this.markerBox(),e=this.owner.pane.clipBox();if(!e||e.overlaps(t)){var i,o=t.x2+5,e=S,t=this.aboveAxis?(i=t.y1,w):(i=t.y2,P);return{point:new Ut(o,i),align:{horizontal:e,vertical:t}}}},pr.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},pr.prototype.overlapsBox=function(t){return this.markerBox().overlaps(t)},pr.prototype.unclipElements=function(){this.label&&(this.label.options.noclip=!0),this.note&&(this.note.options.noclip=!0)},pr.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,stackValue:this.stackValue,series:this.series}},pr);function pr(t,e){nr.call(this),this.value=t,this.options=e,this.aboveAxis=Rt(this.options.aboveAxis,!0),this.tooltipTracking=!0}Y.prototype.defaults={vertical:!0,markers:{visible:!0,background:p,size:8,type:u,border:{width:2},opacity:1},labels:{visible:!1,position:"above",margin:U(3),padding:U(4),animation:{type:"fadeIn",delay:600}},notes:{label:{}},highlight:{markers:{border:{color:"#fff",width:2}},zIndex:100},errorBars:{line:{width:1}}},L(Y.prototype,ar),L(Y.prototype,K);var hr,lr=Y,N=((hr=se)&&(cr.__proto__=hr),((cr.prototype=Object.create(hr&&hr.prototype)).constructor=cr).prototype.points=function(){return this.toGeometryPoints(this.linePoints)},cr.prototype.toGeometryPoints=function(t){for(var e=[],i=0,o=t.length;i<o;i++)t[i]&&!1!==t[i].visible&&e.push(t[i]._childBox.toRect().center());return e},cr.prototype.createVisual=function(){var t=this,e=this.series.visual;e?(this.visual=e({points:this.toGeometryPoints(this.linePoints),series:this.series,sender:this.getSender(),createVisual:function(){return t.segmentVisual(),t.visual}}),this.visual&&!mt(this.visual.options.zIndex)&&(this.visual.options.zIndex=this.series.zIndex)):this.segmentVisual()},cr.prototype.segmentVisual=function(){var t=this.options,e=this.series,i=e.color,o=e._defaults;j(i)&&o&&(i=o.color);e=C.drawing.Path.fromPoints(this.points(),{stroke:{color:i,width:e.width,opacity:e.opacity,dashType:e.dashType},zIndex:e.zIndex});t.closed&&e.close(),this.visual=e},cr.prototype.aliasFor=function(t,e){return this.parent.getNearestPoint(e.x,e.y,this.seriesIx)},cr);function cr(t,e,i){hr.call(this),this.linePoints=t,this.series=e,this.seriesIx=i}It(N,{closed:!1});var ur=N;function dr(t,e,i,o,r){var n=t.box,t=new C.geometry.Point;return t[e]=n[e+i],t[o]=n[o+r],t}var gr,$={calculateStepPoints:function(t){for(var e=this.parent.plotArea.seriesCategoryAxis(this.series).options,i=e.justified,o=e.vertical,e=e.reverse,r=o?v:m,n=o?m:v,s=e?2:1,a=s,p=dr(t[0],r,s,n,a),h=[p],l=1;l<t.length;l++){var c,u=dr(t[l],r,s,n,a);p[r]!==u[r]&&((c=new C.geometry.Point)[r]=p[r],c[n]=u[n],h.push(c,u)),p=u}return i?p!==St(h)&&h.push(p):h.push(dr(St(t),r,s,n,e?1:2)),h}},G=((gr=ur)&&(fr.__proto__=gr),((fr.prototype=Object.create(gr&&gr.prototype)).constructor=fr).prototype.points=function(){return this.calculateStepPoints(this.linePoints)},fr);function fr(){gr.apply(this,arguments)}L(G.prototype,$);var yr,vr,mr=G,xr=((vr=ur)&&(_r.__proto__=vr),((_r.prototype=Object.create(vr&&vr.prototype)).constructor=_r).prototype.segmentVisual=function(){var t=this.series,e=t._defaults,i=t.color;j(i)&&e&&(i=e.color);e=new uo(this.options.closed).process(this.points()),t=new C.drawing.Path({stroke:{color:i,width:t.width,opacity:t.opacity,dashType:t.dashType},zIndex:t.zIndex});t.segments.push.apply(t.segments,e),this.visual=t},_r),W={renderSegments:function(){var t,e=this.options,i=this.seriesPoints,o=e.series,r=i.length;this._segments=[];for(var n=0;n<r;n++){for(var s=o[n],a=this.sortPoints(i[n]),p=a.length,h=[],l=0;l<p;l++){var c=a[l];c?h.push(c):this.seriesMissingValues(s)!==Lo&&(1<h.length&&(t=this.createSegment(h,s,n,t),this._addSegment(t)),h=[])}1<h.length&&(t=this.createSegment(h,s,n,t),this._addSegment(t))}this.children.unshift.apply(this.children,this._segments)},_addSegment:function(t){this._segments.push(t),t.parent=this},sortPoints:function(t){return t},seriesMissingValues:function(t){t=t.missingValues;return!t&&this.options.isStacked?Vo:t||Lo},getNearestPoint:function(t,e,i){for(var o,r=new Ut(t,e),n=this.seriesPoints[i],s=l,a=0;a<n.length;a++){var p,h=n[a];h&&mt(h.value)&&null!==h.value&&!1!==h.visible&&((p=h.box.center().distanceTo(r))<s&&(o=h,s=p))}return o}},Y=((yr=C.drawing.Animation)&&(br.__proto__=yr),((br.prototype=Object.create(yr&&yr.prototype)).constructor=br).prototype.setup=function(){this._setEnd(this.options.box.x1)},br.prototype.step=function(t){var e=this.options.box;this._setEnd(ct(e.x1,e.x2,t))},br.prototype._setEnd=function(t){var e=this.element,i=e.segments,o=i[1].anchor(),i=i[2].anchor();e.suspend(),o.setX(t),e.resume(),i.setX(t)},br);function br(){yr.apply(this,arguments)}function _r(){vr.apply(this,arguments)}It(Y,{duration:600}),C.drawing.AnimationFactory.current.register("clip",Y);var wr=Y;function Ar(t){for(var e=0;e<t.length;e++)if(mt(t[e].zIndex))return!0}var Sr,N={createAnimation:function(){var t,e=this.getRoot();e&&!1!==(e.options||{}).transitions&&(t=e.size(),e=C.drawing.Path.fromRect(t.toRect()),this.visual.clip(e),this.animation=new wr(e,{box:t}),Ar(this.options.series)&&this._setChildrenAnimation(e))},_setChildrenAnimation:function(t){for(var e=this.animationPoints(),i=0;i<e.length;i++){var o=e[i];o&&o.visual&&mt(o.visual.options.zIndex)&&o.visual.clip(t)}}},G=((Sr=sr)&&(kr.__proto__=Sr),((kr.prototype=Object.create(Sr&&Sr.prototype)).constructor=kr).prototype.render=function(){Sr.prototype.render.call(this),this.updateStackRange(),this.renderSegments()},kr.prototype.pointType=function(){return lr},kr.prototype.createPoint=function(t,e){var i=e.categoryIx,o=e.category,r=e.series,n=e.seriesIx,s=this.seriesMissingValues(r),e=t.valueFields.value;if(!mt(e)||null===e){if(s!==Vo)return null;e=0}s=this.pointOptions(r,n),s=this.evalPointOptions(s,e,o,i,r,n),t=t.fields.color||r.color;j(r.color)&&(t=s.color);s=new lr(e,s);return s.color=t,this.append(s),s},kr.prototype.plotRange=function(t){var e=this.plotValue(t);if(this.options.isStacked)for(var i=t.categoryIx,o=this.categoryPoints[i],r=0;r<o.length;r++){var n=o[r];if(t===n)break;e+=this.plotValue(n),this.options.isStacked100&&(e=Math.min(e,1))}return[e,e]},kr.prototype.createSegment=function(t,e,i){var o=e.style;return new("step"===o?mr:"smooth"===o?xr:ur)(t,e,i)},kr.prototype.animationPoints=function(){for(var t=this.points,e=[],i=0;i<t.length;i++)e.push((t[i]||{}).marker);return e.concat(this._segments)},kr);function kr(){Sr.apply(this,arguments)}L(G.prototype,W,N);var Pr,Cr,Tr=G,Mr=((Cr=ur)&&(Or.__proto__=Cr),((Or.prototype=Object.create(Cr&&Cr.prototype)).constructor=Or).prototype.createVisual=function(){var t=this.series,e=t._defaults,i=t.line||{},o=t.color;j(o)&&e&&(o=e.color),this.visual=new C.drawing.Group({zIndex:t.zIndex}),this.createFill({fill:{color:o,opacity:t.opacity},stroke:null}),0<i.width&&!1!==i.visible&&this.createStroke({stroke:L({color:o,opacity:t.opacity,lineCap:"butt"},i)})},Or.prototype.strokeSegments=function(){return this._strokeSegments||(this._strokeSegments=this.createStrokeSegments())},Or.prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.points())},Or.prototype.stackSegments=function(){return(this.prevSegment||this).createStackSegments(this.stackPoints)},Or.prototype.createStackSegments=function(t){return this.segmentsFromPoints(this.toGeometryPoints(t)).reverse()},Or.prototype.segmentsFromPoints=function(t){return t.map(function(t){return new C.geometry.Segment(t)})},Or.prototype.createStroke=function(t){t=new C.drawing.Path(t);t.segments.push.apply(t.segments,this.strokeSegments()),this.visual.append(t)},Or.prototype.hasStackSegment=function(){return this.prevSegment||this.stackPoints&&this.stackPoints.length},Or.prototype.createFill=function(t){var e,i=this.strokeSegments(),o=i.slice(0),r=this.hasStackSegment();r&&(e=this.stackSegments(),yt(o,e));t=new C.drawing.Path(t);t.segments.push.apply(t.segments,o),!r&&1<i.length&&this.fillToAxes(t),this.visual.append(t)},Or.prototype.fillToAxes=function(t){var e=this.parent,i=e.options.invertAxes,o=e.seriesValueAxis(this.series),r=e.categoryAxisCrossingValue(o),e=o.getSlot(r,r,!0),o=this.strokeSegments(),r=o[0].anchor(),o=St(o).anchor(),e=i?e.x1:e.y1;i?t.lineTo(e,o.y).lineTo(e,r.y):t.lineTo(o.x,e).lineTo(r.x,e)},Or),Y=((Pr=Mr)&&(Rr.__proto__=Pr),((Rr.prototype=Object.create(Pr&&Pr.prototype)).constructor=Rr).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.calculateStepPoints(this.linePoints))},Rr.prototype.createStackSegments=function(t){return this.segmentsFromPoints(this.calculateStepPoints(t)).reverse()},Rr);function Rr(){Pr.apply(this,arguments)}function Or(t,e,i,o,r){Cr.call(this,t,e,i),this.prevSegment=o,this.stackPoints=r}L(Y.prototype,$);var Ir,jr,Br,Vr,Lr=Y,zr=((Vr=Mr)&&(Gr.__proto__=Vr),((Gr.prototype=Object.create(Vr&&Vr.prototype)).constructor=Gr).prototype.createStrokeSegments=function(){var t=new uo(this.options.closed),e=this.points();return t.process(e)},Gr.prototype.createStackSegments=function(){for(var t=this.strokeSegments(),e=[],i=t.length-1;0<=i;i--){var o=t[i];e.push(new C.geometry.Segment(o.anchor(),o.controlOut(),o.controlIn()))}return e},Gr),Er=((Br=Tr)&&(Hr.__proto__=Br),((Hr.prototype=Object.create(Br&&Br.prototype)).constructor=Hr).prototype.createSegment=function(t,e,i,o){var r,n,s=this.options.isStacked,a=(e.line||{}).style;return s&&0<i&&o&&("gap"!==this.seriesMissingValues(e)?(n=o.linePoints,r=o):n=this._gapStackPoints(t,i,a)),new("step"===a?Lr:"smooth"===a?zr:Mr)(t,e,i,r,n)},Hr.prototype.reflow=function(t){Br.prototype.reflow.call(this,t);var e=this._stackPoints;if(e)for(var i=0;i<e.length;i++){var o=e[i],r=this.categoryAxis.getSlot(o.categoryIx);o.reflow(r)}},Hr.prototype._gapStackPoints=function(t,e,i){var o=this.seriesPoints,r=t[0].categoryIx,t=t.length;r<0&&(r=0,t--);var n=r+t,s=this.seriesOptions[0]._outOfRangeMinPoint?1:0,a=[];this._stackPoints=this._stackPoints||[];for(var p=r;p<n;p++){for(var h,l=p+s,c=e,u=void 0;u=o[--c][l],0<c&&!u;);u?("step"!==i&&r<p&&!o[c][l-1]&&a.push(this._previousSegmentPoint(p,l,l-1,c)),a.push(u),"step"!==i&&p+1<n&&!o[c][l+1]&&a.push(this._previousSegmentPoint(p,l,l+1,c))):(h=this._createGapStackPoint(p),this._stackPoints.push(h),a.push(h))}return a},Hr.prototype._previousSegmentPoint=function(t,e,i,o){for(var r,n=this.seriesPoints,s=o;0<s&&!r;)r=n[--s][i];return r?r=n[s][e]:(r=this._createGapStackPoint(t),this._stackPoints.push(r)),r},Hr.prototype._createGapStackPoint=function(t){var e=this.pointOptions({},0),e=new lr(0,e);return e.categoryIx=t,e.series={},e},Hr.prototype.seriesMissingValues=function(t){return t.missingValues||Vo},Hr.prototype.supportsPointInactiveOpacity=function(){return!1},Hr),Fr=((jr=C.Class)&&(Ur.__proto__=jr),((Ur.prototype=Object.create(jr&&jr.prototype)).constructor=Ur).prototype.update=function(t){var e,i=this.axisRanges;for(e in t){var o=t[e],r=i[e];i[e]=r=r||{min:l,max:c},r.min=Math.min(r.min,o.min),r.max=Math.max(r.max,o.max)}},Ur.prototype.reset=function(t){this.axisRanges[t]=void 0},Ur.prototype.query=function(t){return this.axisRanges[t]},Ur),G=((Ir=se)&&(Dr.__proto__=Ir),((Dr.prototype=Object.create(Ir&&Ir.prototype)).constructor=Dr).prototype.createVisual=function(){this.textBox.options.noclip=this.options.noclip},Dr.prototype.reflow=function(t){var e=this.options,i=e.vertical,o=e.aboveAxis,r=this.children[0],n=r.options,s=r.box,a=r.options.padding,p=t;n.align=i?A:S,n.vAlign=i?P:A,"insideEnd"===e.position?i?(n.vAlign=P,!o&&s.height()<t.height()&&(n.vAlign=w)):n.align=o?k:S:e.position===A?(n.vAlign=A,n.align=A):"insideBase"===e.position?i?n.vAlign=o?w:P:n.align=o?S:k:"outsideEnd"===e.position&&(p=i?o?new qt(t.x1,t.y1-s.height(),t.x2,t.y1):new qt(t.x1,t.y2,t.x2,t.y2+s.height()):(n.align=A,o?new qt(t.x2,t.y1,t.x2+s.width(),t.y2):new qt(t.x1-s.width(),t.y1,t.x1,t.y2))),e.rotation||(i?a.left=a.right=(p.width()-r.contentBox.width())/2:a.top=a.bottom=(p.height()-r.contentBox.height())/2),r.reflow(p)},Dr.prototype.alignToClipBox=function(t){var e=this.options.vertical?m:v,i=e+"1",o=e+"2",r=this.children[0],e=this.parent.box;(e[i]<t[i]||t[o]<e[o])&&((r=r.paddingBox.clone())[i]=Math.max(e[i],t[i]),r[o]=Math.min(e[o],t[o]),this.reflow(r))},Dr);function Dr(t,e,i){Ir.call(this,e),this.textBox=new Ce(t,this.options,i),this.append(this.textBox)}function Ur(){jr.call(this),this.axisRanges={}}function Hr(){Br.apply(this,arguments)}function Gr(){Vr.apply(this,arguments)}It(G,{position:"outsideEnd",margin:U(3),padding:U(4),color:a,background:"",border:{width:1,color:""},aboveAxis:!0,vertical:!1,animation:{type:"fadeIn",delay:600},zIndex:2});var Nr=G;function qr(t){t=t.overlay;return t&&t.gradient&&"none"!==t.gradient}var Xr,Y=((Xr=se)&&(Yr.__proto__=Xr),((Yr.prototype=Object.create(Xr&&Xr.prototype)).constructor=Yr).prototype.render=function(){this._rendered||(this._rendered=!0,this.createLabel(),this.createNote(),this.errorBar&&this.append(this.errorBar))},Yr.prototype.createLabel=function(){var t,e,i=this.options,o=i.labels;o.visible&&(t=this.pointData(),e=(e=ot(o))?e(t):this.formatValue(o.format),this.label=new Nr(e,L({vertical:i.vertical},o),t),this.append(this.label))},Yr.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Yr.prototype.reflow=function(t){this.render();var e=this.label;if(this.box=t,e&&(e.options.aboveAxis=this.aboveAxis,e.reflow(t)),this.note&&this.note.reflow(t),this.errorBars)for(var i=0;i<this.errorBars.length;i++)this.errorBars[i].reflow(t)},Yr.prototype.createVisual=function(){var e=this,t=this.box,i=this.options,o=i.visual;!1!==this.visible&&(Xr.prototype.createVisual.call(this),o?(i=this.rectVisual=o({category:this.category,dataItem:this.dataItem,value:this.value,sender:this.getSender(),series:this.series,percentage:this.percentage,stackValue:this.stackValue,runningTotal:this.runningTotal,total:this.total,rect:t.toRect(),createVisual:function(){var t=new C.drawing.Group;return e.createRect(t),t},options:i}))&&this.visual.append(i):0<t.width()&&0<t.height()&&this.createRect(this.visual))},Yr.prototype.createRect=function(t){var e=this.options,i=e.border,o=(mt(i.opacity)?i:e).opacity,r=this.box.toRect();r.size.width=Math.round(r.size.width);r=this.rectVisual=C.drawing.Path.fromRect(r,{fill:{color:this.color,opacity:e.opacity},stroke:{color:this.getBorderColor(),width:i.width,opacity:o,dashType:i.dashType}}),o=this.box.width(),i=this.box.height();6<(e.vertical?o:i)&&(T(r),(o<1||i<1)&&(r.options.stroke.lineJoin="round")),t.append(r),qr(e)&&(e=this.createGradientOverlay(r,{baseColor:this.color},L({end:e.vertical?void 0:[0,1]},e.overlay)),t.append(e))},Yr.prototype.createHighlight=function(t){return T(C.drawing.Path.fromRect(this.box.toRect(),t))},Yr.prototype.highlightVisual=function(){return this.rectVisual},Yr.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this.rectVisual}},Yr.prototype.getBorderColor=function(){var t=this.color,e=this.options.border,i=e._brightness||.8,e=e.color;return mt(e)||(e=new C.Color(t).brightness(i).toHex()),e},Yr.prototype.tooltipAnchor=function(){var t,e,i,o,r=this.options,n=this.box,s=this.aboveAxis,a=this.owner.pane.clipBox()||n,p=S,h=P;return r.vertical?(t=Math.min(n.x2,a.x2)+5,s?o=Math.max(n.y1,a.y1):(o=Math.min(n.y2,a.y2),h=w)):(e=Math.max(n.x1,a.x1),i=Math.min(n.x2,a.x2),o=r.isStacked?(h=w,t=s?(p=k,i):e,Math.max(n.y1,a.y1)-5):(s?t=i+5:(t=e-5,p=k),Math.max(n.y1,a.y1))),{point:new Ut(t,o),align:{horizontal:p,vertical:h}}},Yr.prototype.overlapsBox=function(t){return this.box.overlaps(t)},Yr.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,stackValue:this.stackValue,runningTotal:this.runningTotal,total:this.total,series:this.series}},Yr);function Yr(t,e){Xr.call(this),this.options=e,this.color=e.color||p,this.aboveAxis=Rt(this.options.aboveAxis,!0),this.value=t}L(Y.prototype,ar),L(Y.prototype,K),Y.prototype.defaults={border:{width:1},vertical:!0,overlay:{gradient:"glass"},labels:{visible:!1,format:"{0}"},opacity:1,notes:{label:{}}};var Wr=Y;function Zr(t,e){t.forEach(e)}function Kr(t,e){for(var i=t.length,o=i-1;0<=o;o--)e(t[o],o-i-1)}var $r,G=(($r=se)&&(Jr.__proto__=$r),((Jr.prototype=Object.create($r&&$r.prototype)).constructor=Jr).prototype.reflow=function(o){var t=this.options,e=t.vertical,i=t.gap,r=t.spacing,n=this.children,s=n.length,a=e?m:v,t=s+i+r*(s-1),p=(e?o.height():o.width())/t,h=o[a+1]+i/2*p;this.forEach(n,function(t,e){var i=(t.box||o).clone();i[a+1]=h,i[a+2]=h+p,t.reflow(i),e<s-1&&(h+=p*r),h+=p})},Jr);function Jr(t){$r.call(this,t),this.forEach=t.rtl?Kr:Zr}It(G,{vertical:!1,gap:0,spacing:0});var Qr,tn=G,Y=((Qr=se)&&(en.__proto__=Qr),((en.prototype=Object.create(Qr&&Qr.prototype)).constructor=en).prototype.reflow=function(t){for(var e=this.options.vertical?v:m,i=this.children,o=i.length,r=this.box=new qt,n=0;n<o;n++){var s,a=i[n];!1!==a.visible&&((s=a.box.clone()).snapTo(t,e),0===n&&(r=this.box=s.clone()),a.reflow(s),r.wrap(s))}},en);function en(){Qr.apply(this,arguments)}It(Y,{vertical:!0});var on,rn=Y,G=((on=sr)&&(nn.__proto__=on),((nn.prototype=Object.create(on&&on.prototype)).constructor=nn).prototype.render=function(){on.prototype.render.call(this),this.updateStackRange()},nn.prototype.pointType=function(){return Wr},nn.prototype.clusterType=function(){return tn},nn.prototype.stackType=function(){return rn},nn.prototype.stackLimits=function(t,e){return on.prototype.stackLimits.call(this,t,e)},nn.prototype.createPoint=function(t,e){var i=e.categoryIx,o=e.category,r=e.series,n=e.seriesIx,s=this.options,a=this.children,p=s.isStacked,h=this.pointValue(t),l=this.pointOptions(r,n),e=l.labels;p&&"outsideEnd"===e.position&&(e.position="insideEnd"),l.isStacked=p;t=t.fields.color||r.color;h<0&&l.negativeColor&&(t=l.negativeColor),l=this.evalPointOptions(l,h,o,i,r,n),j(r.color)&&(t=l.color);l=new(this.pointType())(h,l);l.color=t;i=a[i];return i||(i=new(this.clusterType())({vertical:s.invertAxes,gap:s.gap,spacing:s.spacing,rtl:!s.invertAxes&&(this.chartService||{}).rtl}),this.append(i)),(p?this.getStackWrap(r,i):i).append(l),l},nn.prototype.getStackWrap=function(t,e){var i,t=t.stack,o=t&&t.group||t,r=e.children;if(typeof o===g){for(var n=0;n<r.length;n++)if(r[n]._stackGroup===o){i=r[n];break}}else i=r[0];return i||((i=new(this.stackType())({vertical:!this.options.invertAxes}))._stackGroup=o,e.append(i)),i},nn.prototype.categorySlot=function(t,e,i){var o=this.options,t=t.getSlot(e),e=i.startValue();return o.isStacked&&(e=i.getSlot(e,e,!0),t[(o=o.invertAxes?v:m)+1]=t[o+2]=e[o+1]),t},nn.prototype.reflowCategories=function(t){for(var e=this.children,i=e.length,o=0;o<i;o++)e[o].reflow(t[o])},nn.prototype.createAnimation=function(){this._setAnimationOptions(),on.prototype.createAnimation.call(this),Ar(this.options.series)&&this._setChildrenAnimation()},nn.prototype._setChildrenAnimation=function(){for(var t=this.points,e=0;e<t.length;e++){var i=t[e],o=i.visual;o&&mt(o.options.zIndex)&&(i.options.animation=this.options.animation,i.createAnimation())}},nn.prototype._setAnimationOptions=function(){var t,e=this.options,i=e.animation||{};t=e.isStacked?(t=this.seriesValueAxis(e.series[0])).getSlot(t.startValue()):this.categoryAxis.getSlot(0),i.origin=new C.geometry.Point(t.x1,t.y1),i.vertical=!e.invertAxes},nn);function nn(){on.apply(this,arguments)}It(G,{animation:{type:zo}});var sn,an=G,Y=((sn=se)&&(pn.__proto__=sn),((pn.prototype=Object.create(sn&&sn.prototype)).constructor=pn).prototype.reflow=function(t){var e=this.options,i=this.value,o=this.owner.seriesValueAxis(e),e=o.getSlot(i.open,i.close),o=o.getSlot(i.low,i.high);e.x1=o.x1=t.x1,e.x2=o.x2=t.x2,this.realBody=e;i=o.center().x,t=[];t.push([[i,o.y1],[i,e.y1]]),t.push([[i,e.y2],[i,o.y2]]),this.lines=t,this.box=o.clone().wrap(e),this._rendered||(this._rendered=!0,this.createNote()),this.reflowNote()},pn.prototype.reflowNote=function(){this.note&&this.note.reflow(this.box)},pn.prototype.createVisual=function(){sn.prototype.createVisual.call(this),this._mainVisual=this.mainVisual(this.options),this.visual.append(this._mainVisual),this.createOverlay()},pn.prototype.mainVisual=function(t){var e=new C.drawing.Group;return this.createBody(e,t),this.createLines(e,t),e},pn.prototype.createBody=function(t,e){var i=C.drawing.Path.fromRect(this.realBody.toRect(),{fill:{color:this.color,opacity:e.opacity},stroke:null});0<e.border.width&&i.options.set("stroke",{color:this.getBorderColor(),width:e.border.width,dashType:e.border.dashType,opacity:Rt(e.border.opacity,e.opacity)}),T(i),t.append(i),qr(e)&&t.append(this.createGradientOverlay(i,{baseColor:this.color},L({end:e.vertical?void 0:[0,1]},e.overlay)))},pn.prototype.createLines=function(t,e){this.drawLines(t,e,this.lines,e.line)},pn.prototype.drawLines=function(t,e,i,o){if(i)for(var r={stroke:{color:o.color||this.color,opacity:Rt(o.opacity,e.opacity),width:o.width,dashType:o.dashType,lineCap:"butt"}},n=0;n<i.length;n++){var s=C.drawing.Path.fromPoints(i[n],r);T(s),t.append(s)}},pn.prototype.getBorderColor=function(){var t=this.options.border,e=t.color;return mt(e)||(e=new C.Color(this.color).brightness(t._brightness).toHex()),e},pn.prototype.createOverlay=function(){var t=C.drawing.Path.fromRect(this.box.toRect(),{fill:{color:p,opacity:0},stroke:null});this.visual.append(t)},pn.prototype.createHighlight=function(){var t=this.options.highlight,e=this.color;this.color=t.color||this.color;t=this.mainVisual(L({},this.options,{line:{color:this.getBorderColor()}},t));return this.color=e,t},pn.prototype.highlightVisual=function(){return this._mainVisual},pn.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this._mainVisual}},pn.prototype.tooltipAnchor=function(){var t=this.box,e=this.owner.pane.clipBox()||t;return{point:new Ut(t.x2+5,Math.max(t.y1,e.y1)+5),align:{horizontal:S,vertical:P}}},pn.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},pn.prototype.overlapsBox=function(t){return this.box.overlaps(t)},pn);function pn(t,e){sn.call(this,e),this.value=t}It(Y,{vertical:!0,border:{_brightness:.8},line:{width:2},overlay:{gradient:"glass"},tooltip:{format:"<table><tr><th colspan='2'>{4:d}</th></tr><tr><td>Open:</td><td>{0:C}</td></tr><tr><td>High:</td><td>{1:C}</td></tr><tr><td>Low:</td><td>{2:C}</td></tr><tr><td>Close:</td><td>{3:C}</td></tr></table>"},highlight:{opacity:1,border:{width:1,opacity:1},line:{width:1,opacity:1}},notes:{visible:!0,label:{}}}),L(Y.prototype,ar),L(Y.prototype,K);var hn=Y;function ln(t){return wo(t)===t.length}var cn,G=((cn=sr)&&(un.__proto__=cn),((un.prototype=Object.create(cn&&cn.prototype)).constructor=un).prototype.reflowCategories=function(t){for(var e=this.children,i=e.length,o=0;o<i;o++)e[o].reflow(t[o])},un.prototype.addValue=function(t,e){var i,o=e.categoryIx,r=e.category,n=e.series,s=e.seriesIx,a=this.children,p=this.options,h=t.valueFields,l=ln(this.splitValue(h)),c=n.data[o],u=this.categoryPoints[o];u||(this.categoryPoints[o]=u=[]),l&&(i=this.createPoint(t,e));a=a[o];a||(a=new tn({vertical:p.invertAxes,gap:p.gap,spacing:p.spacing,rtl:!p.invertAxes&&(this.chartService||{}).rtl}),this.append(a)),i&&(this.updateRange(h,e),a.append(i),i.categoryIx=o,i.category=r,i.series=n,i.seriesIx=s,i.owner=this,i.dataItem=c,i.noteText=t.fields.noteText),this.points.push(i),u.push(i)},un.prototype.pointType=function(){return hn},un.prototype.createPoint=function(t,e){var i=e.categoryIx,o=e.category,r=e.series,n=e.seriesIx,s=this.pointType(),a=t.valueFields,p=L({},r),e=t.fields.color||r.color,p=this.evalPointOptions(p,a,o,i,r,n);"candlestick"===r.type&&a.open>a.close&&(e=t.fields.downColor||r.downColor||r.color),j(r.color)&&(e=p.color),p.vertical=!this.options.invertAxes;p=new s(a,p);return p.color=e,p},un.prototype.splitValue=function(t){return[t.low,t.open,t.close,t.high]},un.prototype.updateRange=function(t,e){var i=e.series.axis,e=this.splitValue(t),t=this.valueAxisRanges[i],t=this.valueAxisRanges[i]=t||{min:l,max:c};t=this.valueAxisRanges[i]={min:Math.min.apply(Math,e.concat([t.min])),max:Math.max.apply(Math,e.concat([t.max]))}},un.prototype.formatPointValue=function(t,e){var i=t.value;return this.chartService.format.auto(e,i.open,i.high,i.low,i.close,t.category)},un.prototype.animationPoints=function(){return this.points},un);function un(){cn.apply(this,arguments)}L(G.prototype,N);var dn,gn=G,Y=((dn=hn)&&(fn.__proto__=dn),((fn.prototype=Object.create(dn&&dn.prototype)).constructor=fn).prototype.reflow=function(t){var e,i,o=this.options,r=this.value,n=this.owner.seriesValueAxis(o);this.boxSlot=i=n.getSlot(r.q1,r.q3),this.realBody=i,this.reflowBoxSlot(t),this.whiskerSlot=e=n.getSlot(r.lower,r.upper),this.reflowWhiskerSlot(t);o=n.getSlot(r.median);r.mean&&(r=n.getSlot(r.mean),this.meanPoints=this.calcMeanPoints(t,r)),this.whiskerPoints=this.calcWhiskerPoints(i,e),this.medianPoints=this.calcMedianPoints(t,o),this.box=e.clone().wrap(i),this.reflowNote()},fn.prototype.reflowBoxSlot=function(t){this.boxSlot.x1=t.x1,this.boxSlot.x2=t.x2},fn.prototype.reflowWhiskerSlot=function(t){this.whiskerSlot.x1=t.x1,this.whiskerSlot.x2=t.x2},fn.prototype.calcMeanPoints=function(t,e){return[[[t.x1,e.y1],[t.x2,e.y1]]]},fn.prototype.calcWhiskerPoints=function(t,e){var i=e.center().x;return[[[i-5,e.y1],[i+5,e.y1],[i,e.y1],[i,t.y1]],[[i-5,e.y2],[i+5,e.y2],[i,e.y2],[i,t.y2]]]},fn.prototype.calcMedianPoints=function(t,e){return[[[t.x1,e.y1],[t.x2,e.y1]]]},fn.prototype.renderOutliers=function(t){for(var e=this.value,i=e.outliers||[],o=3*Math.abs(e.q3-e.q1),r=[],n=(t.markers,0),s=0;s<i.length;s++){var a=i[s],p=L({},(n=a<e.q3+o&&a>e.q1-o?t.outliers:t.extremes).border);mt(p.color)||(mt(this.color)?p.color=this.color:p.color=new C.Color(n.background).brightness(.8).toHex());p=new ce({type:n.type,width:n.size,height:n.size,rotation:n.rotation,background:n.background,border:p,opacity:n.opacity});p.value=a,r.push(p)}return this.reflowOutliers(r),r},fn.prototype.reflowOutliers=function(t){for(var e=this.owner.seriesValueAxis(this.options),i=this.box.center(),o=0;o<t.length;o++){var r=t[o].value,r=e.getSlot(r);this.options.vertical?r.move(i.x):r.move(void 0,i.y),this.box=this.box.wrap(r),t[o].reflow(r)}},fn.prototype.mainVisual=function(t){for(var e=dn.prototype.mainVisual.call(this,t),i=this.renderOutliers(t),o=0;o<i.length;o++){var r=i[o].getElement();r&&e.append(r)}return e},fn.prototype.createLines=function(t,e){this.drawLines(t,e,this.whiskerPoints,e.whiskers),this.drawLines(t,e,this.medianPoints,e.median),this.drawLines(t,e,this.meanPoints,e.mean)},fn.prototype.getBorderColor=function(){return(this.options.border||{}).color?this.options.border.color:this.color||dn.prototype.getBorderColor.call(this)},fn);function fn(t,e){dn.call(this,t,e),this.createNote()}It(Y,{border:{_brightness:.8},line:{width:2},median:{color:"#f6f6f6"},mean:{width:2,dashType:"dash",color:"#f6f6f6"},overlay:{gradient:"glass"},tooltip:{format:"<table><tr><th colspan='2'>{6:d}</th></tr><tr><td>Lower:</td><td>{0:C}</td></tr><tr><td>Q1:</td><td>{1:C}</td></tr><tr><td>Median:</td><td>{2:C}</td></tr><tr><td>Mean:</td><td>{5:C}</td></tr><tr><td>Q3:</td><td>{3:C}</td></tr><tr><td>Upper:</td><td>{4:C}</td></tr></table>"},highlight:{opacity:1,border:{width:1,opacity:1},line:{width:1,opacity:1}},notes:{visible:!0,label:{}},outliers:{visible:!0,size:8,type:"cross",background:p,border:{width:2,opacity:1},opacity:0},extremes:{visible:!0,size:8,type:u,background:p,border:{width:2,opacity:1},opacity:0}}),L(Y.prototype,ar);var yn,vn,mn,xn=Y,bn=((mn=xn)&&(kn.__proto__=mn),((kn.prototype=Object.create(mn&&mn.prototype)).constructor=kn).prototype.reflowBoxSlot=function(t){this.boxSlot.y1=t.y1,this.boxSlot.y2=t.y2},kn.prototype.reflowWhiskerSlot=function(t){this.whiskerSlot.y1=t.y1,this.whiskerSlot.y2=t.y2},kn.prototype.calcMeanPoints=function(t,e){return[[[e.x1,t.y1],[e.x1,t.y2]]]},kn.prototype.calcWhiskerPoints=function(t,e){var i=e.center().y;return[[[e.x1,i-5],[e.x1,i+5],[e.x1,i],[t.x1,i]],[[e.x2,i-5],[e.x2,i+5],[e.x2,i],[t.x2,i]]]},kn.prototype.calcMedianPoints=function(t,e){return[[[e.x1,t.y1],[e.x1,t.y2]]]},kn),_n=((vn=gn)&&(Sn.__proto__=vn),((Sn.prototype=Object.create(vn&&vn.prototype)).constructor=Sn).prototype.addValue=function(t,e){var i,o=e.categoryIx,r=e.category,n=e.series,s=e.seriesIx,a=this.children,p=this.options,h=t.valueFields,l=ln(this.splitValue(h)),c=n.data[o],u=this.categoryPoints[o];u||(this.categoryPoints[o]=u=[]),l&&(i=this.createPoint(t,e));a=a[o];a||(a=new tn({vertical:p.invertAxes,gap:p.gap,spacing:p.spacing,rtl:!p.invertAxes&&(this.chartService||{}).rtl}),this.append(a)),i&&(this.updateRange(h,e),a.append(i),i.categoryIx=o,i.category=r,i.series=n,i.seriesIx=s,i.owner=this,i.dataItem=c),this.points.push(i),u.push(i)},Sn.prototype.pointType=function(){return this.options.invertAxes?bn:xn},Sn.prototype.splitValue=function(t){return[t.lower,t.q1,t.median,t.q3,t.upper]},Sn.prototype.updateRange=function(t,e){var i=e.series.axis,o=this.valueAxisRanges[i],e=this.splitValue(t).concat(this.filterOutliers(t.outliers));mt(t.mean)&&(e=e.concat(t.mean)),o=this.valueAxisRanges[i]=o||{min:l,max:c},this.valueAxisRanges[i]={min:Math.min.apply(Math,e.concat([o.min])),max:Math.max.apply(Math,e.concat([o.max]))}},Sn.prototype.formatPointValue=function(t,e){var i=t.value;return this.chartService.format.auto(e,i.lower,i.q1,i.median,i.q3,i.upper,i.mean,t.category)},Sn.prototype.filterOutliers=function(t){for(var e=(t||[]).length,i=[],o=0;o<e;o++){var r=t[o];mt(r)&&null!==r&&i.push(r)}return i},Sn.prototype.supportsPointInactiveOpacity=function(){return!1},Sn),wn=((yn=$o)&&(An.__proto__=yn),((An.prototype=Object.create(yn&&yn.prototype)).constructor=An).prototype.getAxis=function(){var t=this.chart.seriesAxes(this.series);return this.isVertical?t.y:t.x},An);function An(){yn.apply(this,arguments)}function Sn(){vn.apply(this,arguments)}function kn(){mn.apply(this,arguments)}function Pn(t){return mt(t)&&null!==t}var Cn,G=((Cn=se)&&(Tn.__proto__=Cn),((Tn.prototype=Object.create(Cn&&Cn.prototype)).constructor=Tn).prototype._initFields=function(){this.xAxisRanges={},this.yAxisRanges={},this.points=[],this.seriesPoints=[],this.seriesOptions=[],this._evalSeries=[]},Tn.prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},Tn.prototype.addErrorBar=function(t,e,i){var o,r=t.value[e],n=e+"Value",s=e+"ErrorLow",a=e+"ErrorHigh",p=i.seriesIx,h=i.series,l=t.options.errorBars,s=i[s],a=i[a];R(r)&&(R(s)&&R(a)&&(o={low:s,high:a}),l&&mt(l[n])&&(this.seriesErrorRanges=this.seriesErrorRanges||{x:[],y:[]},this.seriesErrorRanges[e][p]=this.seriesErrorRanges[e][p]||new jo(l[n],h,e),o=this.seriesErrorRanges[e][p].getErrorRange(r,l[n])),o&&this.addPointErrorBar(o,t,e))},Tn.prototype.addPointErrorBar=function(t,e,i){var o=t.low,r=t.high,n=e.series,s=e.options.errorBars,a=i===m,t={};e[i+"Low"]=o,e[i+"High"]=r,e.errorBars=e.errorBars||[];s=new wn(o,r,a,this,n,s);e.errorBars.push(s),e.append(s),t[i]=o,this.updateRange(t,n),t[i]=r,this.updateRange(t,n)},Tn.prototype.addValue=function(t,e){var i,o=t.x,r=t.y,n=e.seriesIx,s=this.options.series[n],s=this.seriesMissingValues(s),n=this.seriesPoints[n],t=t;Pn(o)&&Pn(r)||(t=this.createMissingValue(t,s)),t&&((i=this.createPoint(t,e))&&(Object.assign(i,e),this.addErrorBar(i,v,e),this.addErrorBar(i,m,e)),this.updateRange(t,e.series)),this.points.push(i),n.push(i)},Tn.prototype.seriesMissingValues=function(t){return t.missingValues},Tn.prototype.createMissingValue=function(){},Tn.prototype.updateRange=function(t,e){var i=this.chartService.intl,o=e.xAxis,r=e.yAxis,n=t.x,s=t.y,e=this.xAxisRanges[o],t=this.yAxisRanges[r];Pn(n)&&(e=this.xAxisRanges[o]=e||{min:l,max:c},O(n)&&(n=mi(i,n)),e.min=Math.min(e.min,n),e.max=Math.max(e.max,n)),Pn(s)&&(t=this.yAxisRanges[r]=t||{min:l,max:c},O(s)&&(s=mi(i,s)),t.min=Math.min(t.min,s),t.max=Math.max(t.max,s))},Tn.prototype.evalPointOptions=function(t,e,i){var o=i.series,r=i.seriesIx,n={defaults:o._defaults,excluded:["data","tooltip","content","template","visual","toggle","_outOfRangeMinPoint","_outOfRangeMaxPoint"]},s=this._evalSeries[r];mt(s)||(this._evalSeries[r]=s=er(t,{},n,!0));r=t;return s&&er(r=L({},t),{value:e,series:o,dataItem:i.dataItem},n),r},Tn.prototype.pointType=function(){return lr},Tn.prototype.pointOptions=function(t,e){var i,o=this.seriesOptions[e];return o||(i=this.pointType().prototype.defaults,this.seriesOptions[e]=o=L({},i,{markers:{opacity:t.opacity},tooltip:{format:this.options.tooltip.format},labels:{format:this.options.labels.format}},t)),o},Tn.prototype.createPoint=function(t,e){var i=e.series,o=this.pointOptions(i,e.seriesIx),r=e.color||i.color,o=this.evalPointOptions(o,t,e);j(i.color)&&(r=o.color);o=new lr(t,o);return o.color=r,this.append(o),o},Tn.prototype.seriesAxes=function(t){var e=t.xAxis,i=t.yAxis,o=this.plotArea,t=e?o.namedXAxes[e]:o.axisX,o=i?o.namedYAxes[i]:o.axisY;if(!t)throw new Error("Unable to locate X axis with name "+e);if(!o)throw new Error("Unable to locate Y axis with name "+i);return{x:t,y:o}},Tn.prototype.reflow=function(t){var r=this,n=this.points,s=!this.options.clip,a=0;this.traverseDataPoints(function(t,e){var i=n[a++],o=r.seriesAxes(e.series),e=o.x.getSlot(t.x,t.x,s),t=o.y.getSlot(t.y,t.y,s);i&&(e&&t?(t=r.pointSlot(e,t),i.reflow(t)):i.visible=!1)}),this.box=t},Tn.prototype.pointSlot=function(t,e){return new qt(t.x1,e.y1,t.x2,e.y2)},Tn.prototype.traverseDataPoints=function(t){for(var e=this.options.series,i=this.seriesPoints,o=0;o<e.length;o++){var r=e[o];i[o]||(i[o]=[]);for(var n=0;n<r.data.length;n++){var s=this._bindPoint(r,o,n),a=s.valueFields,s=s.fields;t(a,L({pointIx:n,series:r,seriesIx:o,dataItem:r.data[n],owner:this},s))}}},Tn.prototype.formatPointValue=function(t,e){t=t.value;return this.chartService.format.auto(e,t.x,t.y)},Tn.prototype.animationPoints=function(){for(var t=this.points,e=[],i=0;i<t.length;i++)e.push((t[i]||{}).marker);return e},Tn);function Tn(t,e){Cn.call(this,e),this.plotArea=t,this.chartService=t.chartService,this._initFields(),this.render()}It(G,{series:[],tooltip:{format:"{0}, {1}"},labels:{format:"{0}, {1}"},clip:!0}),L(G.prototype,N,{_bindPoint:sr.prototype._bindPoint});var Mn,Rn=G,Y=((Mn=lr)&&(On.__proto__=Mn),((On.prototype=Object.create(Mn&&Mn.prototype)).constructor=On).prototype.createHighlight=function(){var t=this.options.highlight,e=t.border,i=this.options.markers,o=this.box.center(),r=(i.size+i.border.width+e.width)/2,n=new C.drawing.Group,s=new C.drawing.Circle(new C.geometry.Circle([o.x,o.y+r/5+e.width/2],r+e.width/2),{stroke:{color:"none"},fill:this.createGradient({gradient:"bubbleShadow",color:i.background,stops:[{offset:0,color:i.background,opacity:.3},{offset:1,color:i.background,opacity:0}]})}),t=new C.drawing.Circle(new C.geometry.Circle([o.x,o.y],r),{stroke:{color:e.color||new C.Color(i.background).brightness(.8).toHex(),width:e.width,opacity:e.opacity},fill:{color:i.background,opacity:t.opacity}});return n.append(s,t),n},On);function On(t,e){Mn.call(this,t,e),this.category=t.category}Y.prototype.defaults=L({},Y.prototype.defaults,{labels:{position:A},highlight:{opacity:1,border:{color:"#fff",width:2,opacity:1}}}),Y.prototype.defaults.highlight.zIndex=void 0;var In,jn=Y,G=((In=Rn)&&(Bn.__proto__=In),((Bn.prototype=Object.create(In&&In.prototype)).constructor=Bn).prototype._initFields=function(){this._maxSize=c,In.prototype._initFields.call(this)},Bn.prototype.addValue=function(t,e){null!==t.size&&(0<t.size||t.size<0&&e.series.negativeValues.visible)?(this._maxSize=Math.max(this._maxSize,Math.abs(t.size)),In.prototype.addValue.call(this,t,e)):(this.points.push(null),this.seriesPoints[e.seriesIx].push(null))},Bn.prototype.reflow=function(t){this.updateBubblesSize(t),In.prototype.reflow.call(this,t)},Bn.prototype.pointType=function(){return jn},Bn.prototype.createPoint=function(t,e){var i=e.series,o=i.data.length,r=e.pointIx*(600/o),n={delay:r,duration:600-r,type:"bubble"},o=e.color||i.color;t.size<0&&i.negativeValues.visible&&(o=Rt(i.negativeValues.color,o));n=L({labels:{animation:{delay:r,duration:600-r}}},this.pointOptions(i,e.seriesIx),{markers:{type:u,border:i.border,opacity:i.opacity,animation:n}}),n=this.evalPointOptions(n,t,e);j(i.color)&&(o=n.color),n.markers.background=o;n=new jn(t,n);return n.color=o,this.append(n),n},Bn.prototype.updateBubblesSize=function(t){for(var e=this.options.series,i=Math.min(t.width(),t.height()),o=0;o<e.length;o++)for(var r=e[o],n=this.seriesPoints[o],s=(r.minSize||Math.max(.02*i,10))/2,a=(r.maxSize||.2*i)/2,p=Math.PI*s*s,h=(Math.PI*a*a-p)/this._maxSize,l=0;l<n.length;l++){var c,u,d=n[l];d&&(u=Math.abs(d.value.size)*h,c=Math.sqrt((p+u)/Math.PI),u=Rt(d.options.zIndex,0)+(1-c/a),L(d.options,{zIndex:u,markers:{size:2*c,zIndex:u},labels:{zIndex:u+1}}))}},Bn.prototype.formatPointValue=function(t,e){var i=t.value;return this.chartService.format.auto(e,i.x,i.y,i.size,t.category)},Bn.prototype.createAnimation=function(){},Bn.prototype.createVisual=function(){},Bn);function Bn(){In.apply(this,arguments)}It(G,{tooltip:{format:"{3}"},labels:{format:"{3}"}});var Vn,Ln=G,Y=((Vn=ce)&&(zn.__proto__=Vn),(zn.prototype=Object.create(Vn&&Vn.prototype)).constructor=zn);function zn(){Vn.apply(this,arguments)}L(Y.prototype,ar);var En,Fn=Y,G=((En=se)&&(Dn.__proto__=En),((Dn.prototype=Object.create(En&&En.prototype)).constructor=Dn).prototype.render=function(){var t=this.options;this._rendered||(this._rendered=!0,mt(this.value.target)&&(this.target=new Fn({type:t.target.shape,background:t.target.color||this.color,opacity:t.opacity,zIndex:t.zIndex,border:t.target.border,vAlign:P,align:k}),this.target.value=this.value,this.target.dataItem=this.dataItem,this.target.series=this.series,this.append(this.target)),this.createNote())},Dn.prototype.reflow=function(t){this.render();var e=this.options,i=this.target,o=this.owner,r=e.invertAxes,n=o.seriesValueAxis(this.options),s=o.categorySlot(o.categoryAxis,e.categoryIx,n),o=n.getSlot(this.value.target),n=r?o:s,o=r?s:o;i&&(o=new qt(n.x1,o.y1,n.x2,o.y2),i.options.height=r?o.height():e.target.line.width,i.options.width=r?e.target.line.width:o.width(),i.reflow(o)),this.note&&this.note.reflow(t),this.box=t},Dn.prototype.createVisual=function(){En.prototype.createVisual.call(this);var t=this.options,e=C.drawing.Path.fromRect(this.box.toRect(),{fill:{color:this.color,opacity:t.opacity},stroke:null});0<t.border.width&&e.options.set("stroke",{color:t.border.color||this.color,width:t.border.width,dashType:t.border.dashType,opacity:Rt(t.border.opacity,t.opacity)}),T(this.bodyVisual=e),this.visual.append(e)},Dn.prototype.createAnimation=function(){this.bodyVisual&&(this.animation=C.drawing.Animation.create(this.bodyVisual,this.options.animation))},Dn.prototype.createHighlight=function(t){return C.drawing.Path.fromRect(this.box.toRect(),t)},Dn.prototype.highlightVisual=function(){return this.bodyVisual},Dn.prototype.highlightVisualArgs=function(){return{rect:this.box.toRect(),visual:this.bodyVisual,options:this.options}},Dn.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Dn);function Dn(t,e){En.call(this,e),this.aboveAxis=this.options.aboveAxis,this.color=e.color||p,this.value=t}G.prototype.tooltipAnchor=Wr.prototype.tooltipAnchor,It(G,{border:{width:1},vertical:!1,opacity:1,target:{shape:"",border:{width:0,color:"green"},line:{width:2}},tooltip:{format:"Current: {0}<br />Target: {1}"}}),L(G.prototype,ar),L(G.prototype,K);var Un,Hn=G,Y=((Un=sr)&&(Gn.__proto__=Un),((Gn.prototype=Object.create(Un&&Un.prototype)).constructor=Gn).prototype.reflowCategories=function(t){for(var e=this.children,i=e.length,o=0;o<i;o++)e[o].reflow(t[o])},Gn.prototype.plotRange=function(t){var e=t.series,e=this.seriesValueAxis(e),e=this.categoryAxisCrossingValue(e);return[e,t.value.current||e]},Gn.prototype.createPoint=function(t,e){var i=e.categoryIx,o=e.category,r=e.series,n=e.seriesIx,s=this.options,a=this.children,p=t.valueFields,e=L({vertical:!s.invertAxes,overlay:r.overlay,categoryIx:i,invertAxes:s.invertAxes},r),t=t.fields.color||r.color,e=this.evalPointOptions(e,p,o,i,r,n);j(r.color)&&(t=e.color);e=new Hn(p,e);e.color=t;i=a[i];return i||(i=new tn({vertical:s.invertAxes,gap:s.gap,spacing:s.spacing,rtl:!s.invertAxes&&(this.chartService||{}).rtl}),this.append(i)),i.append(e),e},Gn.prototype.updateRange=function(t,e){var i=t.current,o=t.target,t=e.series.axis,e=this.valueAxisRanges[t];mt(i)&&!isNaN(i)&&mt(o&&!isNaN(o))&&((e=this.valueAxisRanges[t]=e||{min:l,max:c}).min=Math.min(e.min,i,o),e.max=Math.max(e.max,i,o))},Gn.prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value.current,t.value.target)},Gn.prototype.pointValue=function(t){return t.valueFields.current},Gn.prototype.aboveAxis=function(t){return 0<t.value.current},Gn.prototype.createAnimation=function(){var t=this.points;this._setAnimationOptions();for(var e=0;e<t.length;e++){var i=t[e];i.options.animation=this.options.animation,i.createAnimation()}},Gn);function Gn(t,r){!function(){for(var t=r.series,e=0;e<t.length;e++){var i=t[e],o=i.data;!o||x(o[0])||z(o[0])||(i.data=[o])}}(),Un.call(this,t,r)}Y.prototype._setAnimationOptions=an.prototype._setAnimationOptions,It(Y,{animation:{type:zo}});var Nn,qn=Y,G=((Nn=C.Class)&&(Xn.__proto__=Nn),((Xn.prototype=Object.create(Nn&&Nn.prototype)).constructor=Xn).prototype.getStyle=function(t,e){var i=t.background,o=t.border.color;e&&(r=e.color||e.options.color,i=Rt(i,r),o=Rt(o,r));var r=U(t.padding||{},"auto");return{backgroundColor:i,borderColor:o,font:t.font,color:t.color,opacity:t.opacity,borderWidth:E(t.border.width),paddingTop:E(r.top),paddingBottom:E(r.bottom),paddingLeft:E(r.left),paddingRight:E(r.right)}},Xn.prototype.show=function(t,e,i){t.format=e.format;i=this.getStyle(e,i);t.style=i,!mt(e.color)&&180<new C.Color(i.backgroundColor).percBrightness()&&(t.className="k-chart-tooltip-inverse"),this.chartService.notify("showTooltip",t),this.visible=!0},Xn.prototype.hide=function(){this.chartService&&this.chartService.notify("hideTooltip"),this.visible=!1},Xn.prototype.destroy=function(){delete this.chartService},Xn);function Xn(t,e){Nn.call(this),this.chartService=t,this.options=L({},this.options,e)}It(G,{border:{width:1},opacity:1});var Yn,Y=G,G=((Yn=Y)&&(Wn.__proto__=Yn),((Wn.prototype=Object.create(Yn&&Yn.prototype)).constructor=Wn).prototype.initAxisName=function(){var t=this.crosshair.axis,t=t.plotArea.categoryAxis?t.getCategory?"categoryAxis":"valueAxis":t.options.vertical?"yAxis":"xAxis";this.axisName=t},Wn.prototype.showAt=function(t){var e=this.crosshair.axis,i=this.options,o=e[i.stickyMode?"getCategory":"getValue"](t),r=o;i.format?r=this.formatService.auto(i.format,o):e.options.type===y&&(r=this.formatService.auto(e.options.labels.dateFormats[e.options.baseUnit],o)),this.show({point:t,anchor:this.getAnchor(),crosshair:this.crosshair,value:r,axisName:this.axisName,axisIndex:this.crosshair.axis.axisIndex},this.options)},Wn.prototype.hide=function(){this.chartService.notify("hideTooltip",{crosshair:this.crosshair,axisName:this.axisName,axisIndex:this.crosshair.axis.axisIndex})},Wn.prototype.getAnchor=function(){var t,e,i=this.crosshair,o=this.options,r=o.position,n=o.padding,o=!i.axis.options.vertical,i=i.line.bbox(),n=o?(t=A,r===w?(e=P,i.bottomLeft().translate(0,n)):(e=w,i.topLeft().translate(0,-n))):(e=A,r===S?(t=k,i.topLeft().translate(-n,0)):(t=S,i.topRight().translate(n,0)));return{point:n,align:{horizontal:t,vertical:e}}},Wn);function Wn(t,e,i){Yn.call(this,t,i),this.crosshair=e,this.formatService=t.format,this.initAxisName()}It(G,{padding:10});var Zn,Kn=G,G=((Zn=se)&&($n.__proto__=Zn),(($n.prototype=Object.create(Zn&&Zn.prototype)).constructor=$n).prototype.showAt=function(t){this.point=t,this.moveLine(),this.line.visible(!0),this.tooltip&&this.tooltip.showAt(t)},$n.prototype.hide=function(){this.line.visible(!1),this.tooltip&&this.tooltip.hide()},$n.prototype.moveLine=function(){var t=this.axis,e=this.point,i=t.options.vertical,o=this.getBox(),r=i?m:v,n=new C.geometry.Point(o.x1,o.y1),i=i?new C.geometry.Point(o.x2,o.y1):new C.geometry.Point(o.x1,o.y2);e&&(this.stickyMode?(t=t.getSlot(t.pointCategoryIndex(e)),n[r]=i[r]=t.center()[r]):n[r]=i[r]=e[r]),this.box=o,this.line.moveTo(n).lineTo(i)},$n.prototype.getBox=function(){for(var t,e=this.axis,i=e.pane.axes,o=i.length,r=e.options.vertical,n=e.lineBox().clone(),e=r?v:m,s=0;s<o;s++){var a=i[s];a.options.vertical!==r&&(t?t.wrap(a.lineBox()):t=a.lineBox().clone())}return n[e+1]=t[e+1],n[e+2]=t[e+2],n},$n.prototype.createVisual=function(){Zn.prototype.createVisual.call(this);var t=this.options;this.line=new C.drawing.Path({stroke:{color:t.color,width:t.width,opacity:t.opacity,dashType:t.dashType},visible:!1}),this.moveLine(),this.visual.append(this.line)},$n.prototype.destroy=function(){this.tooltip&&this.tooltip.destroy(),Zn.prototype.destroy.call(this)},$n);function $n(t,e,i){Zn.call(this,i),this.axis=e,this.stickyMode=e instanceof Ai;e=this.options.tooltip;e.visible&&(this.tooltip=new Kn(t,this,L({},e,{stickyMode:this.stickyMode})))}It(G,{color:a,width:2,zIndex:-1,tooltip:{visible:!1}});var Jn,Qn=G,G=((Jn=se)&&(ts.__proto__=Jn),((ts.prototype=Object.create(Jn&&Jn.prototype)).constructor=ts).prototype.shouldClip=function(){for(var t=this.children,e=t.length,i=0;i<e;i++)if(!0===t[i].options.clip)return!0;return!1},ts.prototype._clipBox=function(){return this.pane.chartsBox()},ts.prototype.createVisual=function(){var t;this.visual=new C.drawing.Group({zIndex:0}),this.shouldClip()&&(t=(this.clipBox=this._clipBox()).toRect(),T(t=C.drawing.Path.fromRect(t)),this.visual.clip(t),this.unclipLabels())},ts.prototype.stackRoot=function(){return this},ts.prototype.unclipLabels=function(){for(var t=this.children,e=this.clipBox,i=0;i<t.length;i++)for(var o=t[i].points||{},r=o.length,n=0;n<r;n++){var s,a=o[n];a&&!1!==a.visible&&a.overlapsBox&&a.overlapsBox(e)&&(a.unclipElements?a.unclipElements():(s=a.label,a=a.note,s&&s.options.visible&&(s.alignToClipBox&&s.alignToClipBox(e),s.options.noclip=!0),a&&a.options.visible&&(a.options.noclip=!0)))}},ts.prototype.destroy=function(){Jn.prototype.destroy.call(this),delete this.parent},ts);function ts(t,e){Jn.call(this,t),this.pane=e}G.prototype.isStackRoot=!0;var es,is=G,G=((es=he)&&(rs.__proto__=es),((rs.prototype=Object.create(es&&es.prototype)).constructor=rs).prototype.createTitle=function(){var t=this.options.title;z(t)&&(t=L({},t,{align:t.position,position:P})),this.title=Oe.buildTitle(t,this,rs.prototype.options.title)},rs.prototype.appendAxis=function(t){this.content.append(t),this.axes.push(t),t.pane=this},rs.prototype.appendAxisAt=function(t,e){this.content.append(t),this.axes.splice(e,0,t),t.pane=this},rs.prototype.appendChart=function(t){this.chartContainer.parent!==this.content&&this.content.append(this.chartContainer),this.charts.push(t),this.chartContainer.append(t),t.pane=this},rs.prototype.empty=function(){var t=this.parent;if(t){for(var e=0;e<this.axes.length;e++)t.removeAxis(this.axes[e]);for(var i=0;i<this.charts.length;i++)t.removeChart(this.charts[i])}this.axes=[],this.charts=[],this.content.destroy(),this.content.children=[],this.chartContainer.children=[]},rs.prototype.reflow=function(t){var e;St(this.children)===this.content&&(e=this.children.pop()),es.prototype.reflow.call(this,t),e&&this.children.push(e),this.title&&(this.contentBox.y1+=this.title.box.height())},rs.prototype.visualStyle=function(){var t=es.prototype.visualStyle.call(this);return t.zIndex=-10,t},rs.prototype.renderComplete=function(){this.options.visible&&this.createGridLines()},rs.prototype.stackRoot=function(){return this},rs.prototype.clipRoot=function(){return this},rs.prototype.createGridLines=function(){for(var t,e=this.axes,i=e.concat(this.parent.axes),o=[],r=[],n=0;n<e.length;n++)for(var s=e[n],a=s.options.vertical,p=a?o:r,h=0;h<i.length;h++)0!==p.length||a!==(t=i[h]).options.vertical&&yt(p,s.createGridLines(t))},rs.prototype.refresh=function(){this.visual.clear(),this.content.parent=null,this.content.createGradient=this.createGradient.bind(this),this.content.renderVisual(),(this.content.parent=this).title&&this.visual.append(this.title.visual),this.visual.append(this.content.visual),this.renderComplete(),this.notifyRender()},rs.prototype.chartsBox=function(){for(var t=this.axes,e=t.length,i=new qt,o=0;o<e;o++){var r=t[o],n=r.options.vertical?m:v,r=r.lineBox();i[n+1]=r[n+1],i[n+2]=r[n+2]}if(0===i.x2)for(var s=this.parent.axes,a=s.length,p=0;p<a;p++){var h=s[p];h.options.vertical||(h=h.lineBox(),i.x1=h.x1,i.x2=h.x2)}return i},rs.prototype.clipBox=function(){return this.chartContainer.clipBox},rs.prototype.notifyRender=function(){var t=this.getService();t&&t.notify("paneRender",{pane:new xo(this),index:this.paneIndex,name:this.options.name})},rs),os=1;function rs(t){es.call(this,t),this.id="pane"+os++,this.createTitle(),this.content=new se,this.chartContainer=new is({},this),this.append(this.content),this.axes=[],this.charts=[]}G.prototype.isStackRoot=!0,It(G,{zIndex:-1,shrinkToFit:!0,title:{align:S},visible:!0});var ns=G;function ss(t,e){null!==e&&t.push(e)}function as(t,e,i){e=e.visible;if(mt(e))return e;t=t.pointVisibility;return t?t[i]:void 0}function ps(t){for(var e=t.data,i=[],o=0,r=0,n=0;n<e.length;n++){var s=Ro.current.bindPoint(t,n),a=s.valueFields.value;O(a)&&(a=parseFloat(a)),R(a)?(s.visible=!1!==as(t,s.fields,n),s.value=Math.abs(a),i.push(s),s.visible&&(o+=s.value),0!==a&&r++):i.push(null)}return{total:o,points:i,count:r}}function hs(t,e){return t&&e?t.toLowerCase()===e.toLowerCase():t===e}function ls(t,e){for(var i=[],o=[].concat(e),r=0;r<t.length;r++){var n=t[r];lt(n.type,o)&&i.push(n)}return i}function cs(t,e,i){if(null===e)return e;var o="_date_"+t,r=e[o];return r||(r=mi(i,st(t)(e)),e[o]=r),r}function us(t,e){t=t.type,e=e instanceof Date;return!t&&e||hs(t,y)}function ds(t){return 1===t.length?t[0]:t}var gs=/area/i;function fs(t,e){var i,o=Ro.current.bindPoint(t,null,e).valueFields;for(i in o)if(I(o[i]))return!0}function ys(t){for(var e,i,o=t.start,r=t.dir,n=t.min,s=t.max,a=t.getter,p=t.hasItem,h=t.series,l=o;p(l+=r)&&(e=fs(h,(i=a(l)).item)),n<=l&&l<=s&&!e;);if(e)return i}function vs(t,e,i,o,r){var n,s,a,p=e.min,h=e.max,l=0<p&&p<i,c=h+1<i;(l||c)&&(((e=t).missingValues||(gs.test(e.type)||e.stack?Vo:Lo))!==Lo?(l&&(n=o(p-1)),c&&(s=o(h+1))):(l&&(n=fs(t,(a=o(p-1)).item)?a:ys({start:p,dir:-1,min:0,max:i-1,getter:o,hasItem:r,series:t})),c&&(s=fs(t,(a=o(h+1)).item)?a:ys({start:h,dir:1,min:0,max:i-1,getter:o,hasItem:r,series:t}))),n&&(t._outOfRangeMinPoint=n),s&&(t._outOfRangeMaxPoint=s))}var ms,G=((ms=se)&&(xs.__proto__=ms),((xs.prototype=Object.create(ms&&ms.prototype)).constructor=xs).prototype.initFields=function(){},xs.prototype.initSeries=function(){for(var t=this.series,e=0;e<t.length;e++)t[e].index=e},xs.prototype.createPanes=function(){for(var t=this.options.title||{},e=this.options.paneDefaults,i=this.options.panes||[],o=Math.max(i.length,1),r=[],n=L({title:{color:t.color}},e),s=0;s<o;s++){var a=L({},n,i[s]);O(a.title)&&(a.title=L({text:a.title},n.title));a=new ns(a);a.paneIndex=s,r.push(a),this.append(a)}this.panes=r},xs.prototype.createCrosshairs=function(t){void 0===t&&(t=this.panes);for(var e=0;e<t.length;e++)for(var i=t[e],o=0;o<i.axes.length;o++){var r=i.axes[o];r.options.crosshair&&r.options.crosshair.visible&&(r=new Qn(this.chartService,r,r.options.crosshair),this.crosshairs.push(r),i.content.append(r))}},xs.prototype.removeCrosshairs=function(t){for(var e=this.crosshairs,i=t.axes,o=e.length-1;0<=o;o--)for(var r=0;r<i.length;r++)if(e[o].axis===i[r]){e.splice(o,1);break}},xs.prototype.hideCrosshairs=function(){for(var t=this.crosshairs,e=0;e<t.length;e++)t[e].hide()},xs.prototype.findPane=function(t){for(var e,i=this.panes,o=0;o<i.length;o++)if(i[o].options.name===t){e=i[o];break}return e||i[0]},xs.prototype.findPointPane=function(t){for(var e,i=this.panes,o=0;o<i.length;o++)if(i[o].box.containsPoint(t)){e=i[o];break}return e},xs.prototype.appendAxis=function(t){this.findPane(t.options.pane).appendAxis(t),this.axes.push(t),t.plotArea=this},xs.prototype.removeAxis=function(t){for(var e=[],i=0;i<this.axes.length;i++){var o=this.axes[i];t!==o?e.push(o):o.destroy()}this.axes=e},xs.prototype.appendChart=function(t,e){this.charts.push(t),e?e.appendChart(t):this.append(t)},xs.prototype.removeChart=function(t){for(var e=[],i=0;i<this.charts.length;i++){var o=this.charts[i];o!==t?e.push(o):o.destroy()}this.charts=e},xs.prototype.addToLegend=function(t){for(var e=t.length,i=this.options.legend,o=i.labels||{},r=i.inactiveItems||{},n=r.labels||{},s=[],a=0;a<e;a++){var p,h,l,c,u=t[a],d=!1!==u.visible;!1!==u.visibleInLegend&&(p=u.name,(l=!d&&ot(n)||ot(o))&&(p=l({text:Pn(p)?p:"",series:u})),c=u._defaults,j(h=u.color)&&c&&(h=c.color),c=l=void 0,c=d?(l={},h):(l={color:n.color,font:n.font},r.markers.color),Pn(p)&&""!==p&&s.push({text:p,labels:l,markerColor:c,series:u,active:d}))}yt(i.items,s)},xs.prototype.groupAxes=function(t){for(var e=[],i=[],o=0;o<t.length;o++)for(var r=t[o].axes,n=0;n<r.length;n++){var s=r[n];(s.options.vertical?i:e).push(s)}return{x:e,y:i,any:e.concat(i)}},xs.prototype.groupSeriesByPane=function(){for(var t=this.series,e={},i=0;i<t.length;i++){var o=t[i],r=this.seriesPaneName(o);e[r]?e[r].push(o):e[r]=[o]}return e},xs.prototype.filterVisibleSeries=function(t){for(var e=[],i=0;i<t.length;i++){var o=t[i];!1!==o.visible&&e.push(o)}return e},xs.prototype.reflow=function(t){var e=this.options.plotArea,i=this.panes,e=U(e.margin);this.box=t.clone().unpad(e),this.reflowPanes(),this.detachLabels(),this.reflowAxes(i),this.reflowCharts(i)},xs.prototype.redraw=function(t){var e=[].concat(t);this.initSeries();t=this.getRoot();t&&t.cleanGradients();for(var i=0;i<e.length;i++)this.removeCrosshairs(e[i]),e[i].empty();this.render(e),this.detachLabels(),this.reflowAxes(this.panes),this.reflowCharts(e),this.createCrosshairs(e);for(var o=0;o<e.length;o++)e[o].refresh()},xs.prototype.axisCrossingValues=function(t,e){for(var t=t.options,i=[].concat(t.axisCrossingValues||t.axisCrossingValue),o=e.length-i.length,r=i[0]||0,n=0;n<o;n++)i.push(r);return i},xs.prototype.alignAxisTo=function(t,e,i,o){var r=t.getSlot(i,i,!0),n=t.options.reverse?2:1,i=e.getSlot(o,o,!0),o=e.options.reverse?2:1,n=t.box.translate(i[v+o]-r[v+n],i[m+o]-r[m+n]);t.pane!==e.pane&&n.translate(0,t.pane.box.y1-e.pane.box.y1),t.reflow(n)},xs.prototype.alignAxes=function(t,e){for(var i=t[0],o=e[0],r=this.axisCrossingValues(i,e),n=this.axisCrossingValues(o,t),s={},a={},p={},h={},l=0;l<e.length;l++){var c=e[l],u=c.pane,d=u.id,g=!1!==c.options.visible,f=_s(t,u)||i,u=r;f!==i&&(u=this.axisCrossingValues(f,e)),this.alignAxisTo(c,f,n[l],u[l]),c.options._overlap||(Tt(c.lineBox().x1)===Tt(f.lineBox().x1)&&(s[d]&&c.reflow(c.box.alignTo(s[d].box,S).translate(-c.options.margin,0)),g&&(s[d]=c)),Tt(c.lineBox().x2)===Tt(f.lineBox().x2)&&(c._mirrored||(c.options.labels.mirror=!c.options.labels.mirror,c._mirrored=!0),this.alignAxisTo(c,f,n[l],u[l]),a[d]&&c.reflow(c.box.alignTo(a[d].box,k).translate(c.options.margin,0)),g&&(a[d]=c)),0!==l&&o.pane===c.pane&&(c.alignTo(o),c.reflow(c.box)))}for(var y=0;y<t.length;y++){var v=t[y],m=v.pane,x=m.id,b=!1!==v.options.visible,_=_s(e,m)||o,m=n;_!==o&&(m=this.axisCrossingValues(_,t)),this.alignAxisTo(v,_,r[y],m[y]),v.options._overlap||(Tt(v.lineBox().y1)===Tt(_.lineBox().y1)&&(v._mirrored||(v.options.labels.mirror=!v.options.labels.mirror,v._mirrored=!0),this.alignAxisTo(v,_,r[y],m[y]),p[x]&&v.reflow(v.box.alignTo(p[x].box,P).translate(0,-v.options.margin)),b&&(p[x]=v)),Tt(v.lineBox().y2,3)===Tt(_.lineBox().y2,3)&&(h[x]&&v.reflow(v.box.alignTo(h[x].box,w).translate(0,v.options.margin)),b&&(h[x]=v)),0!==y&&(v.alignTo(i),v.reflow(v.box)))}},xs.prototype.shrinkAxisWidth=function(t){for(var e=this.groupAxes(t).any,i=bs(e),o=0,r=0;r<t.length;r++){var n=t[r];0<n.axes.length&&(o=Math.max(o,i.width()-n.contentBox.width()))}if(0!==o)for(var s=0;s<e.length;s++){var a=e[s];a.options.vertical||a.reflow(a.box.shrink(o,0))}},xs.prototype.shrinkAxisHeight=function(t){for(var e,i=0;i<t.length;i++){var o=t[i],r=o.axes,n=Math.max(0,bs(r).height()-o.contentBox.height());if(0!==n){for(var s=0;s<r.length;s++){var a=r[s];a.options.vertical&&a.reflow(a.box.shrink(0,n))}e=!0}}return e},xs.prototype.fitAxes=function(t){for(var e=this.groupAxes(t).any,i=0,o=0;o<t.length;o++){var r=t[o],n=r.axes,s=r.contentBox;if(0<n.length)for(var r=bs(n),a=Math.max(s.y1-r.y1,s.y2-r.y2),i=Math.max(i,s.x1-r.x1),p=0;p<n.length;p++){var h=n[p];h.reflow(h.box.translate(0,a))}}for(var l=0;l<e.length;l++){var c=e[l];c.reflow(c.box.translate(i,0))}},xs.prototype.reflowAxes=function(t){for(var e=this.groupAxes(t),i=0;i<t.length;i++)this.reflowPaneAxes(t[i]);0<e.x.length&&0<e.y.length&&(this.alignAxes(e.x,e.y),this.shrinkAxisWidth(t),this.autoRotateAxisLabels(e),this.alignAxes(e.x,e.y),this.shrinkAxisWidth(t)&&this.alignAxes(e.x,e.y),this.shrinkAxisHeight(t),this.alignAxes(e.x,e.y),this.shrinkAxisHeight(t)&&this.alignAxes(e.x,e.y),this.fitAxes(t))},xs.prototype.autoRotateAxisLabels=function(t){for(var e,i=this.panes,o=ws(i),r=0;r<o.length;r++)o[r].autoRotateLabels()&&(e=!0);if(e){for(var n=0;n<i.length;n++)this.reflowPaneAxes(i[n]);0<t.x.length&&0<t.y.length&&(this.alignAxes(t.x,t.y),this.shrinkAxisWidth(i))}},xs.prototype.reflowPaneAxes=function(t){var e=t.axes,i=e.length;if(0<i)for(var o=0;o<i;o++)e[o].reflow(t.contentBox)},xs.prototype.reflowCharts=function(t){for(var e=this.charts,i=e.length,o=this.box,r=0;r<i;r++){var n=e[r].pane;n&&!lt(n,t)||e[r].reflow(o)}},xs.prototype.reflowPanes=function(){for(var t=this.box,e=this.panes,i=e.length,o=t.height(),r=0,n=t.y1,s=0;s<i;s++){var a=e[s],p=a.options.height;a.options.width=t.width(),a.options.height?(p.indexOf&&p.indexOf("%")&&(p=parseInt(p,10)/100,a.options.height=p*t.height()),a.reflow(t.clone()),o-=a.options.height):r++}for(var h=0;h<i;h++){var l=e[h];l.options.height||(l.options.height=o/r)}for(var c=0;c<i;c++){var u=e[c],d=t.clone().move(t.x1,n);u.reflow(d),n+=u.options.height}},xs.prototype.backgroundBox=function(){for(var t=this.axes,e=t.length,i=0;i<e;i++)for(var o=t[i],r=0;r<e;r++){var n,s=t[r];o.options.vertical!==s.options.vertical&&(s=o.lineBox().clone().wrap(s.lineBox()),n=n?n.wrap(s):s)}return n||this.box},xs.prototype.chartsBoxes=function(){for(var t=this.panes,e=[],i=0;i<t.length;i++)e.push(t[i].chartsBox());return e},xs.prototype.addBackgroundPaths=function(t){for(var e=this.chartsBoxes(),i=0;i<e.length;i++)t.paths.push(C.drawing.Path.fromRect(e[i].toRect()))},xs.prototype.backgroundContainsPoint=function(t){for(var e=this.chartsBoxes(),i=0;i<e.length;i++)if(e[i].containsPoint(t))return!0},xs.prototype.createVisual=function(){ms.prototype.createVisual.call(this);var t=this.options.plotArea,e=t.opacity,i=t.background,t=t.border;void 0===t&&(t={}),""!==i&&null!==i&&"none"!==i&&"transparent"!==i&&mt(i)||(i=p,e=0);t=this._bgVisual=new C.drawing.MultiPath({fill:{color:i,opacity:e},stroke:{color:t.width?t.color:"",width:t.width,dashType:t.dashType},zIndex:-1});this.addBackgroundPaths(t),this.appendVisual(t)},xs.prototype.pointsByCategoryIndex=function(t){var e=this.charts,i=[];if(null!==t)for(var o=0;o<e.length;o++)if("_navigator"!==e[o].pane.options.name){var r=e[o].categoryPoints[t];if(r&&r.length)for(var n=0;n<r.length;n++){var s=r[n];s&&mt(s.value)&&null!==s.value&&i.push(s)}}return i},xs.prototype.pointsBySeriesIndex=function(e){return this.filterPoints(function(t){return t.series.index===e})},xs.prototype.pointsBySeriesName=function(e){return this.filterPoints(function(t){return t.series.name===e})},xs.prototype.filterPoints=function(t){for(var e=this.charts,i=[],o=0;o<e.length;o++)for(var r=e[o].points,n=0;n<r.length;n++){var s=r[n];s&&!1!==s.visible&&t(s)&&i.push(s)}return i},xs.prototype.findPoint=function(t){for(var e=this.charts,i=0;i<e.length;i++)for(var o=e[i].points,r=0;r<o.length;r++){var n=o[r];if(n&&!1!==n.visible&&t(n))return n}},xs.prototype.paneByPoint=function(t){for(var e=this.panes,i=0;i<e.length;i++){var o=e[i];if(o.box.containsPoint(t))return o}},xs.prototype.detachLabels=function(){var t=this.groupAxes(this.panes),e=t.x,t=t.y;this.detachAxisGroupLabels(t,e),this.detachAxisGroupLabels(e,t)},xs.prototype.detachAxisGroupLabels=function(t,e){for(var i=0,o=0;o<t.length;o++){var r=t[o],n=r.pane,s=_s(e,n)||e[0],a=o+i,s=this.createLabelAxis(r,a,s);s&&(i++,r=n.axes.indexOf(r)+i,n.appendAxisAt(s,r))}},xs.prototype.createLabelAxis=function(t,e,i){var o=t.options.labels,r=o.position,n="end"!==r&&"start"!==r,o=o.visible;if(n||!1===o)return null;n=this.groupAxes(this.panes),o=i.options.vertical?n.x:n.y,n=this.axisCrossingValues(i,o),o="end"===r,r=i.range(),o=o?r.max:r.min;if(kt(n[e],r.min,r.max)-o==0)return null;n.splice(e+1,0,o),i.options.axisCrossingValues=n;n=t.clone();return t.clear(),n.options.name=void 0,n.options.line.visible=!1,n.options.crosshair=void 0,n.options.notes=void 0,n.options.plotBands=void 0,n},xs);function xs(t,e,i){ms.call(this,e),this.initFields(t,e),this.series=t,this.initSeries(),this.charts=[],this.options.legend=this.options.legend||{},this.options.legend.items=[],this.axes=[],this.crosshairs=[],this.chartService=i,this.originalOptions=e,this.createPanes(),this.render(),this.createCrosshairs()}function bs(t){for(var e,i=t.length,o=0;o<i;o++){var r=t[o],n=!1!==r.options.visible;(n||function(e){return!e.pane.axes.some(function(t){return t.options.vertical===e.options.vertical&&t!==e&&!1!==t.options.visible})}(r))&&(r=n?r.contentBox():r.lineBox(),e?e.wrap(r):e=r.clone())}return e||new qt}function _s(t,e){for(var i=0;i<t.length;i++){var o=t[i];if(o&&o.pane===e)return o}}var ws=function(t){return t.reduce(function(t,e){return t.concat(e.axes)},[])};It(G,{series:[],plotArea:{margin:{}},background:"",border:{color:a,width:0},paneDefaults:{title:{}},legend:{inactiveItems:{labels:{color:"#919191"},markers:{color:"#919191"}}}});var As=G,Ss={hover:function(t,e){this._dispatchEvent(t,e,"plotAreaHover")},click:function(t,e){this._dispatchEvent(t,e,"plotAreaClick")}};var ks,Ps,Cs=((Ps=C.Class)&&(Ms.__proto__=Ps),((Ms.prototype=Object.create(Ps&&Ps.prototype)).constructor=Ms).prototype.aggregatePoints=function(t,e){var i=this._series,o=this._seriesFields,r=this._bindPoints(t||[]),n=r.dataItems[0],s={};!n||R(n)||x(n)||((t=function(){}).prototype=n,s=new t);for(var a=0;a<o.length;a++){var p=o[a],h=this._bindField(r.values,p.canonicalName),h=p.transform(h,i,r.dataItems,e);if(!(null===h||!z(h)||mt(h.length)||h instanceof Date)){s=h;break}mt(h)&&function(t,e){var i=s,o=t;if(-1<t.indexOf(".")){for(var r=t.split(".");1<r.length;)o=r.shift(),mt(i[o])||(i[o]={}),i=i[o];o=r.shift()}i[o]=e}(p.name,h)}return s},Ms.prototype._bindPoints=function(t){for(var e=this._binder,i=this._series,o=[],r=[],n=0;n<t.length;n++){var s=t[n];o.push(e.bindPoint(i,s)),r.push(i.data[s])}return{values:o,dataItems:r}},Ms.prototype._bindField=function(t,e){for(var i=[],o=t.length,r=0;r<o;r++){var n=t[r],s=n.valueFields,a=(mt(s[e])?s:n.fields)[e];i.push(a)}return i},Ms),G=((ks=C.Class)&&(Ts.__proto__=ks),((Ts.prototype=Object.create(ks&&ks.prototype)).constructor=Ts).prototype.register=function(t,e){for(var i=0;i<t.length;i++)this._defaults[t[i]]=e},Ts.prototype.query=function(t){return this._defaults[t]},Ts);function Ts(){ks.call(this),this._defaults={}}function Ms(t,e,i){Ps.call(this);var o=e.canonicalFields(t),r=e.valueFields(t),n=e.sourceFields(t,o),s=this._seriesFields=[],i=i.query(t.type),a=t.aggregate||i;this._series=t,this._binder=e;for(var p=0;p<o.length;p++){var h=o[p],l=void 0;if(z(a))l=a[h];else{if(0!==p&&!lt(h,r))break;l=a}l&&s.push({canonicalName:h,name:n[p],transform:j(l)?l:So[l]})}}G.current=new G;var Rs,Os=G,G=((Rs=Wr)&&(Is.__proto__=Rs),((Is.prototype=Object.create(Rs&&Rs.prototype)).constructor=Is).prototype.createLabel=function(){var t=this.options.labels,e=L({},t,t.from),t=L({},t,t.to);e.visible&&(this.labelFrom=this._createLabel(e),this.append(this.labelFrom)),t.visible&&(this.labelTo=this._createLabel(t),this.append(this.labelTo))},Is.prototype._createLabel=function(t){var e=ot(t),i=this.pointData(),e=e?e(i):this.formatValue(t.format);return new Nr(e,L({vertical:this.options.vertical},t),i)},Is.prototype.reflow=function(t){this.render();var e=this.labelFrom,i=this.labelTo,o=this.value;this.box=t,e&&(e.options.aboveAxis=o.from>o.to,e.reflow(t)),i&&(i.options.aboveAxis=o.to>o.from,i.reflow(t)),this.note&&this.note.reflow(t)},Is);function Is(){Rs.apply(this,arguments)}G.prototype.defaults=L({},G.prototype.defaults,{labels:{format:"{0} - {1}"},tooltip:{format:"{1}"}});var js,Bs=G,G=((js=an)&&(Vs.__proto__=js),((Vs.prototype=Object.create(js&&js.prototype)).constructor=Vs).prototype.pointType=function(){return Bs},Vs.prototype.pointValue=function(t){return t.valueFields},Vs.prototype.formatPointValue=function(t,e){return null===t.value.from&&null===t.value.to?"":this.chartService.format.auto(e,t.value.from,t.value.to)},Vs.prototype.plotRange=function(t){return t?[t.value.from,t.value.to]:0},Vs.prototype.updateRange=function(t,e){var i=e.series.axis,o=t.from,r=t.to,e=this.valueAxisRanges[i];null!==t&&R(o)&&R(r)&&((e=this.valueAxisRanges[i]=e||{min:l,max:c}).min=Math.min(e.min,o),e.max=Math.max(e.max,o),e.min=Math.min(e.min,r),e.max=Math.max(e.max,r))},Vs.prototype.aboveAxis=function(t){t=t.value;return t.from<t.to},Vs);function Vs(){js.apply(this,arguments)}G.prototype.plotLimits=sr.prototype.plotLimits;var Ls,zs,Es=G,Fs=((zs=lr)&&(Us.__proto__=zs),((Us.prototype=Object.create(zs&&zs.prototype)).constructor=Us).prototype.aliasFor=function(){return this.parent},Us),G=((Ls=se)&&(Ds.__proto__=Ls),((Ds.prototype=Object.create(Ls&&Ls.prototype)).constructor=Ds).prototype.render=function(){var t,e,i,o;this._rendered||(this._rendered=!0,o=(i=this.options).markers,t=i.labels,e=this.value,i=this.fromPoint=new Fs(e,L({},this.options,{labels:t.from,markers:o.from})),o=this.toPoint=new Fs(e,L({},this.options,{labels:t.to,markers:o.to})),this.copyFields(i),this.copyFields(o),this.append(i),this.append(o))},Ds.prototype.reflow=function(t){this.render();var e=t.from,t=t.to;this.positionLabels(e,t),this.fromPoint.reflow(e),this.toPoint.reflow(t),this.box=this.fromPoint.markerBox().clone().wrap(this.toPoint.markerBox())},Ds.prototype.createHighlight=function(){var t=new C.drawing.Group;return t.append(this.fromPoint.createHighlight()),t.append(this.toPoint.createHighlight()),t},Ds.prototype.highlightVisual=function(){return this.visual},Ds.prototype.highlightVisualArgs=function(){return{options:this.options,from:this.fromPoint.highlightVisualArgs(),to:this.toPoint.highlightVisualArgs()}},Ds.prototype.tooltipAnchor=function(){var t=this.owner.pane.clipBox();if(!t||t.overlaps(this.box)){var e,i,o=this.box,r=o.center(),t=S,r=this.options.vertical?(e=r.x,i=o.y1-5,w):(e=o.x2+5,i=r.y,A);return{point:new Ut(e,i),align:{horizontal:t,vertical:r}}}},Ds.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Ds.prototype.overlapsBox=function(t){return this.box.overlaps(t)},Ds.prototype.unclipElements=function(){this.fromPoint.unclipElements(),this.toPoint.unclipElements()},Ds.prototype.initLabelsFormat=function(){var t=this.options.labels;t.format||(t.from&&t.from.format||(t.from=Object.assign({},t.from,{format:"{0}"})),t.to&&t.to.format||(t.to=Object.assign({},t.to,{format:"{1}"})))},Ds.prototype.positionLabels=function(t,e){var i,o=this.options,r=o.labels,o=o.vertical;"auto"===r.position&&(t=o?e.y1<=t.y1?(i="above","below"):(i="below","above"):e.x1<=t.x1?(i=S,k):(i=k,S),r.from&&r.from.position||(this.fromPoint.options.labels.position=t),r.to&&r.to.position||(this.toPoint.options.labels.position=i))},Ds.prototype.copyFields=function(t){t.dataItem=this.dataItem,t.category=this.category,t.series=this.series,t.color=this.color,t.owner=this.owner},Ds);function Ds(t,e){Ls.call(this),this.value=t,this.options=e,this.aboveAxis=Rt(this.options.aboveAxis,!0),this.tooltipTracking=!0,this.initLabelsFormat()}function Us(){zs.apply(this,arguments)}L(G.prototype,ar),L(G.prototype,K),G.prototype.defaults={markers:{visible:!1,background:p,size:8,type:u,border:{width:2},opacity:1},labels:{visible:!1,margin:U(3),padding:U(4),animation:{type:"fadeIn",delay:600},position:"auto"},notes:{label:{}},highlight:{markers:{border:{color:p,width:2}},zIndex:100},tooltip:{format:"{0} - {1}"}};var Hs,Gs,Ns,qs=G,Xs=((Ns=Mr)&&(Ks.__proto__=Ns),((Ks.prototype=Object.create(Ns&&Ns.prototype)).constructor=Ks).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.toGeometryPoints(this.toPoints()))},Ks.prototype.stackSegments=function(){var t=this.fromSegments;return this.fromSegments||(t=this.fromSegments=this.segmentsFromPoints(this.toGeometryPoints(this.fromPoints().reverse()))),t},Ks.prototype.createStroke=function(t){var e=new C.drawing.Path(t),t=new C.drawing.Path(t);e.segments.push.apply(e.segments,this.strokeSegments()),t.segments.push.apply(t.segments,this.stackSegments()),this.visual.append(e),this.visual.append(t)},Ks.prototype.hasStackSegment=function(){return!0},Ks.prototype.fromPoints=function(){return this.linePoints.map(function(t){return t.fromPoint})},Ks.prototype.toPoints=function(){return this.linePoints.map(function(t){return t.toPoint})},Ks),Ys=((Gs=Xs)&&(Zs.__proto__=Gs),((Zs.prototype=Object.create(Gs&&Gs.prototype)).constructor=Zs).prototype.createStrokeSegments=function(){return this.createCurveSegments(this.toPoints())},Zs.prototype.stackSegments=function(){var t=this.fromSegments;return this.fromSegments||(t=this.fromSegments=this.createCurveSegments(this.fromPoints().reverse())),t},Zs.prototype.createCurveSegments=function(t){return(new uo).process(this.toGeometryPoints(t))},Zs),K=((Hs=Xs)&&(Ws.__proto__=Hs),((Ws.prototype=Object.create(Hs&&Hs.prototype)).constructor=Ws).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.calculateStepPoints(this.toPoints()))},Ws.prototype.stackSegments=function(){var t=this.fromSegments;return this.fromSegments||(t=this.fromSegments=this.segmentsFromPoints(this.calculateStepPoints(this.fromPoints()))).reverse(),t},Ws);function Ws(){Hs.apply(this,arguments)}function Zs(){Gs.apply(this,arguments)}function Ks(){Ns.apply(this,arguments)}L(K.prototype,$);var $s,Js=K,G=(($s=sr)&&(Qs.__proto__=$s),((Qs.prototype=Object.create($s&&$s.prototype)).constructor=Qs).prototype.render=function(){$s.prototype.render.call(this),this.renderSegments()},Qs.prototype.pointType=function(){return qs},Qs.prototype.createPoint=function(t,e){var i=e.categoryIx,o=e.category,r=e.series,n=e.seriesIx,s=t.valueFields;if(!Pn(s.from)&&!Pn(s.to)){if(this.seriesMissingValues(r)!==Vo)return null;s={from:0,to:0}}e=this.pointOptions(r,n),e=this.evalPointOptions(e,s,o,i,r,n),t=t.fields.color||r.color;j(r.color)&&(t=e.color);e=new qs(s,e);return e.color=t,this.append(e),e},Qs.prototype.createSegment=function(t,e,i){var o=(e.line||{}).style;return new("smooth"===o?Ys:"step"===o?Js:Xs)(t,e,i)},Qs.prototype.plotRange=function(t,e){return t?[t.value.from,t.value.to]:[e,e]},Qs.prototype.valueSlot=function(t,e){var i=t.getSlot(e[0],e[0],!this.options.clip),e=t.getSlot(e[1],e[1],!this.options.clip);if(i&&e)return{from:i,to:e}},Qs.prototype.pointSlot=function(t,e){var i,o=e.from,e=e.to,e=this.options.invertAxes?(i=new qt(o.x1,t.y1,o.x2,t.y2),new qt(e.x1,t.y1,e.x2,t.y2)):(i=new qt(t.x1,o.y1,t.x2,o.y2),new qt(t.x1,e.y1,t.x2,e.y2));return{from:i,to:e}},Qs.prototype.addValue=function(t,e){var i=t.valueFields;R(i.from)||(i.from=i.to),R(i.to)||(i.to=i.from),$s.prototype.addValue.call(this,t,e)},Qs.prototype.updateRange=function(t,e){var i;null!==t&&R(t.from)&&R(t.to)&&(i=e.series.axis,e=this.valueAxisRanges[i]=this.valueAxisRanges[i]||{min:l,max:c},i=t.from,t=t.to,e.min=Math.min(e.min,i,t),e.max=Math.max(e.max,i,t))},Qs.prototype.formatPointValue=function(t,e){t=t.value;return this.chartService.format.auto(e,t.from,t.to)},Qs.prototype.animationPoints=function(){for(var t=this.points,e=[],i=0;i<t.length;i++){var o=t[i];o&&(e.push((o.fromPoint||{}).marker),e.push((o.toPoint||{}).marker))}return e.concat(this._segments)},Qs);function Qs(){$s.apply(this,arguments)}L(G.prototype,W,N);var ta,ea,ia,oa=G,ra=((ia=hn)&&(pa.__proto__=ia),((pa.prototype=Object.create(ia&&ia.prototype)).constructor=pa).prototype.reflow=function(t){var e=this.options,i=this.value,o=this.owner.seriesValueAxis(e),r=[],n=[],s=[],a=o.getSlot(i.low,i.high),e=o.getSlot(i.open,i.open),i=o.getSlot(i.close,i.close);e.x1=i.x1=a.x1=t.x1,e.x2=i.x2=a.x2=t.x2;t=a.center().x;r.push([e.x1,e.y1]),r.push([t,e.y1]),n.push([t,i.y1]),n.push([i.x2,i.y1]),s.push([t,a.y1]),s.push([t,a.y2]),this.lines=[r,n,s],this.box=a.clone().wrap(e.clone().wrap(i)),this.reflowNote()},pa.prototype.createBody=function(){},pa),na=((ea=gn)&&(aa.__proto__=ea),((aa.prototype=Object.create(ea&&ea.prototype)).constructor=aa).prototype.pointType=function(){return ra},aa),$=((ta=se)&&(sa.__proto__=ta),((sa.prototype=Object.create(ta&&ta.prototype)).constructor=sa).prototype.linePoints=function(){var t,e=this.from,i=this.from.box,o=this.to.box,r=[];return e.isVertical?(t=e.aboveAxis?i.y1:i.y2,r.push([i.x1,t],[o.x2,t])):(e=e.aboveAxis?i.x2:i.x1,r.push([e,i.y1],[e,o.y2])),r},sa.prototype.createVisual=function(){ta.prototype.createVisual.call(this);var t=this.series.line||{},t=C.drawing.Path.fromPoints(this.linePoints(),{stroke:{color:t.color,width:t.width,opacity:t.opacity,dashType:t.dashType}});T(t),this.visual.append(t)},sa);function sa(t,e,i){ta.call(this),this.from=t,this.to=e,this.series=i}function aa(){ea.apply(this,arguments)}function pa(){ia.apply(this,arguments)}It($,{animation:{type:"fadeIn",delay:600}});var ha,la,ca=$,ua=((la=an)&&(ya.__proto__=la),((ya.prototype=Object.create(la&&la.prototype)).constructor=ya).prototype.render=function(){la.prototype.render.call(this),this.createSegments()},ya.prototype.traverseDataPoints=function(t){for(var e=this.options.series,i=ir(e),o=!this.options.invertAxes,r=0;r<e.length;r++)for(var n=e[r],s=0,a=0,p=0;p<i;p++){var h=Ro.current.bindPoint(n,p),l=h.valueFields.value,c=h.fields.summary,u=s,d=void 0;c?"total"===c.toLowerCase()?(u=0,d=h.valueFields.value=s):(d=u-(h.valueFields.value=a),a=0):R(l)&&(a+=l,d=s+=l),t(h,{category:this.categoryAxis.categoryAt(p),categoryIx:p,series:n,seriesIx:r,total:s,runningTotal:a,from:u,to:d,isVertical:o})}},ya.prototype.updateRange=function(t,e){la.prototype.updateRange.call(this,{value:e.to},e)},ya.prototype.aboveAxis=function(t){return 0<=t.value},ya.prototype.plotRange=function(t){return[t.from,t.to]},ya.prototype.createSegments=function(){for(var t=this.options.series,e=this.seriesPoints,i=this.segments=[],o=0;o<t.length;o++){var r=t[o],n=e[o];if(n)for(var s=void 0,a=0;a<n.length;a++){var p,h=n[a];h&&s&&(p=new ca(s,h,r),i.push(p),this.append(p)),s=h}}},ya),da=["area","verticalArea","rangeArea","verticalRangeArea"],ga=[Fo,Uo].concat(da),K=((ha=As)&&(fa.__proto__=ha),((fa.prototype=Object.create(ha&&ha.prototype)).constructor=fa).prototype.initFields=function(t){if(this.namedCategoryAxes={},this.namedValueAxes={},this.valueAxisRangeTracker=new Fr,0<t.length){this.invertAxes=lt(t[0].type,[zo,"bullet",Uo,"verticalArea","verticalRangeArea","rangeBar","horizontalWaterfall","verticalBoxPlot"]);for(var e=0;e<t.length;e++){var i=t[e].stack;if(i&&"100%"===i.type){this.stack100=!0;break}}}},fa.prototype.render=function(t){void 0===t&&(t=this.panes),this.createCategoryAxes(t),this.aggregateCategories(t),this.createCategoryAxesLabels(t),this.createCharts(t),this.createValueAxes(t)},fa.prototype.removeAxis=function(t){var e=t.options.name;ha.prototype.removeAxis.call(this,t),t instanceof Ai?delete this.namedCategoryAxes[e]:(this.valueAxisRangeTracker.reset(e),delete this.namedValueAxes[e]),t===this.categoryAxis&&delete this.categoryAxis,t===this.valueAxis&&delete this.valueAxis},fa.prototype.createCharts=function(t){for(var e=this.groupSeriesByPane(),i=0;i<t.length;i++){var o=t[i],r=e[o.options.name||"default"]||[];this.addToLegend(r);r=this.filterVisibleSeries(r);if(r)for(var n=this.groupSeriesByCategoryAxis(r),s=0;s<n.length;s++)this.createChartGroup(n[s],o)}},fa.prototype.createChartGroup=function(t,e){this.createAreaChart(ls(t,["area","verticalArea"]),e),this.createRangeAreaChart(ls(t,["rangeArea","verticalRangeArea"]),e),this.createBarChart(ls(t,[Eo,zo]),e),this.createRangeBarChart(ls(t,["rangeColumn","rangeBar"]),e),this.createBulletChart(ls(t,["bullet","verticalBullet"]),e),this.createCandlestickChart(ls(t,"candlestick"),e),this.createBoxPlotChart(ls(t,["boxPlot","verticalBoxPlot"]),e),this.createOHLCChart(ls(t,"ohlc"),e),this.createWaterfallChart(ls(t,["waterfall","horizontalWaterfall"]),e),this.createLineChart(ls(t,[Fo,Uo]),e)},fa.prototype.aggregateCategories=function(t){var e=this.srcSeries||this.series,i=[];this._currentPointsCache={},this._seriesPointsCache=this._seriesPointsCache||{};for(var o=0;o<e.length;o++){var r=e[o],n=this.seriesCategoryAxis(r),s=this.findPane(n.options.pane),r=(hs(n.options.type,y)||r.categoryField)&&lt(s,t)?this.aggregateSeries(r,n):this.filterSeries(r,n);i.push(r)}this._seriesPointsCache=this._currentPointsCache,this._currentPointsCache=null,this.srcSeries=e,this.series=i},fa.prototype.filterSeries=function(e,i){var t=(e.data||{}).length;if(i._seriesMax=Math.max(i._seriesMax||0,t),!R(i.options.min)&&!R(i.options.max))return e;var o=i.currentRangeIndices(),r=lt(e.type,ga),n=L({},e);return n.data=(n.data||[]).slice(o.min,o.max+1),r&&vs(n,o,t,function(t){return{item:e.data[t],category:i.categoryAt(t,!0),categoryIx:t-o.min}},function(t){return mt(e.data[t])}),n},fa.prototype.clearSeriesPointsCache=function(){this._seriesPointsCache={}},fa.prototype.seriesSourcePoints=function(t,e){var i=t.index+";"+e.categoriesHash();if(this._seriesPointsCache[i])return this._currentPointsCache[i]=this._seriesPointsCache[i],this._seriesPointsCache[i];var o=e.options,r=o.srcCategories,o=hs(o.type,y),n=t.data,s=o?cs:ko,a=[];o||e.mapCategories();for(var p=0;p<n.length;p++){var h,l=t.categoryField?s(t.categoryField,n[p],this.chartService.intl):r[p];mt(l)&&null!==l&&(a[h=e.totalIndex(l)]=a[h]||{items:[],category:l},a[h].items.push(p))}return this._currentPointsCache[i]=a},fa.prototype.aggregateSeries=function(t,o){if(!t.data.length)return t;for(var r=this.seriesSourcePoints(t,o),e=L({},t),n=new Cs(L({},t),Ro.current,Os.current),i=e.data=[],s=o.options.dataItems||[],a=o.currentRangeIndices(),p=function(t){var e=t-a.min,i=r[t];return(i=i||(r[t]={})).categoryIx=e,i.item||(t=o.categoryAt(t,!0),i.category=t,i.item=n.aggregatePoints(i.items,t)),i},h=a.min;h<=a.max;h++){var l=p(h);i[l.categoryIx]=l.item,l.items&&l.items.length&&(s[l.categoryIx]=l.item)}return lt(e.type,ga)&&vs(e,a,o.totalCount(),p,function(t){return r[t]}),o.options.dataItems=s,e},fa.prototype.appendChart=function(t,e){var i=t.options.series,o=this.seriesCategoryAxis(i[0]),r=o.options.categories,n=Math.max(0,ir(i)-r.length);if(0<n)for(r=o.options.categories=o.options.categories.slice(0);n--;)r.push("");this.valueAxisRangeTracker.update(t.valueAxisRanges),ha.prototype.appendChart.call(this,t,e)},fa.prototype.seriesPaneName=function(t){var e=this.options,i=t.axis,t=at([].concat(e.valueAxis),function(t){return t.name===i})[0],e=((e.panes||[{}])[0]||{}).name||"default";return(t||{}).pane||e},fa.prototype.seriesCategoryAxis=function(t){var e=t.categoryAxis,t=e?this.namedCategoryAxes[e]:this.categoryAxis;if(!t)throw new Error("Unable to locate category axis with name "+e);return t},fa.prototype.stackableChartOptions=function(t,e){t=t.stack;return{isStacked:t,isStacked100:t&&"100%"===t.type,clip:e.options.clip}},fa.prototype.groupSeriesByCategoryAxis=function(t){for(var e=[],i={},o=0;o<t.length;o++){var r=t[o].categoryAxis||"$$default$$";i.hasOwnProperty(r)||(i[r]=!0,e.push(r))}for(var n=[],s=0;s<e.length;s++){var a=function(t,e,i){return at(t,function(t){return 0===i&&!t.categoryAxis||t.categoryAxis===e})}(t,e[s],s);0!==a.length&&n.push(a)}return n},fa.prototype.createBarChart=function(t,e){var i;0!==t.length&&(i=t[0],i=new an(this,Object.assign({series:t,invertAxes:this.invertAxes,gap:i.gap,spacing:i.spacing},this.stackableChartOptions(i,e))),this.appendChart(i,e))},fa.prototype.createRangeBarChart=function(t,e){var i;0!==t.length&&(i=t[0],i=new Es(this,{series:t,invertAxes:this.invertAxes,gap:i.gap,spacing:i.spacing}),this.appendChart(i,e))},fa.prototype.createBulletChart=function(t,e){var i;0!==t.length&&(i=t[0],i=new qn(this,{series:t,invertAxes:this.invertAxes,gap:i.gap,spacing:i.spacing,clip:e.options.clip}),this.appendChart(i,e))},fa.prototype.createLineChart=function(t,e){var i;0!==t.length&&(i=t[0],i=new Tr(this,Object.assign({invertAxes:this.invertAxes,series:t},this.stackableChartOptions(i,e))),this.appendChart(i,e))},fa.prototype.createAreaChart=function(t,e){var i;0!==t.length&&(i=t[0],i=new Er(this,Object.assign({invertAxes:this.invertAxes,series:t},this.stackableChartOptions(i,e))),this.appendChart(i,e))},fa.prototype.createRangeAreaChart=function(t,e){0!==t.length&&(t=new oa(this,{invertAxes:this.invertAxes,series:t,clip:e.options.clip}),this.appendChart(t,e))},fa.prototype.createOHLCChart=function(t,e){var i;0!==t.length&&(i=t[0],i=new na(this,{invertAxes:this.invertAxes,gap:i.gap,series:t,spacing:i.spacing,clip:e.options.clip}),this.appendChart(i,e))},fa.prototype.createCandlestickChart=function(t,e){var i;0!==t.length&&(i=t[0],i=new gn(this,{invertAxes:this.invertAxes,gap:i.gap,series:t,spacing:i.spacing,clip:e.options.clip}),this.appendChart(i,e))},fa.prototype.createBoxPlotChart=function(t,e){var i;0!==t.length&&(i=t[0],i=new _n(this,{invertAxes:this.invertAxes,gap:i.gap,series:t,spacing:i.spacing,clip:e.options.clip}),this.appendChart(i,e))},fa.prototype.createWaterfallChart=function(t,e){var i;0!==t.length&&(i=t[0],i=new ua(this,{series:t,invertAxes:this.invertAxes,gap:i.gap,spacing:i.spacing}),this.appendChart(i,e))},fa.prototype.axisRequiresRounding=function(t,e){for(var i=ls(this.series,Ho),o=0;o<this.series.length;o++){var r,n=this.series[o];!lt(n.type,da)||(r=n.line)&&"step"===r.style&&i.push(n)}for(var s=0;s<i.length;s++){var a=i[s].categoryAxis||"";if(a===t||!a&&0===e)return!0}},fa.prototype.aggregatedAxis=function(t,e){for(var i=this.series,o=0;o<i.length;o++){var r=i[o].categoryAxis||"";if((r===t||!r&&0===e)&&i[o].categoryField)return!0}},fa.prototype.createCategoryAxesLabels=function(){for(var t=this.axes,e=0;e<t.length;e++)t[e]instanceof Ai&&t[e].createLabels()},fa.prototype.createCategoryAxes=function(t){for(var e=this.invertAxes,i=[].concat(this.options.categoryAxis),o=[],r=0;r<i.length;r++){var n=i[r];if(lt(this.findPane(n.pane),t)){var s=n.name,a=n.categories;void 0===a&&(a=[]),n=L({vertical:e,reverse:!e&&this.chartService.rtl,axisCrossingValue:e?l:0},n),mt(n.justified)||(n.justified=this.isJustified()),this.axisRequiresRounding(s,r)&&(n.justified=!1);var p=void 0,p=new(us(n,a[0])?ji:Ai)(n,this.chartService);if(i[r].categories=p.options.srcCategories,s){if(this.namedCategoryAxes[s])throw new Error("Category axis with name "+s+" is already defined");this.namedCategoryAxes[s]=p}p.axisIndex=r,o.push(p),this.appendAxis(p)}}var h=this.categoryAxis||o[0];this.categoryAxis=h,e?this.axisY=h:this.axisX=h},fa.prototype.isJustified=function(){for(var t=this.series,e=0;e<t.length;e++)if(!lt(t[e].type,da))return!1;return!0},fa.prototype.createValueAxes=function(t){var e=this.valueAxisRangeTracker,i=e.query(),o=[].concat(this.options.valueAxis),r=this.invertAxes,n={vertical:!r,reverse:r&&this.chartService.rtl},s=[];this.stack100&&(n.roundToMajorUnit=!1,n.labels={format:"P0"});for(var a=0;a<o.length;a++){var p=o[a];if(lt(this.findPane(p.pane),t)){var h=p.name,l=hs(p.type,"log")?{min:.1,max:1}:{min:0,max:1},l=e.query(h)||i||l;0===a&&l&&i&&(l.min=Math.min(l.min,i.min),l.max=Math.max(l.max,i.max));p=new(hs(p.type,"log")?Ki:Hi)(l.min,l.max,L({},n,p),this.chartService);if(h){if(this.namedValueAxes[h])throw new Error("Value axis with name "+h+" is already defined");this.namedValueAxes[h]=p}p.axisIndex=a,s.push(p),this.appendAxis(p)}}var c=this.valueAxis||s[0];this.valueAxis=c,r?this.axisX=c:this.axisY=c},fa.prototype._dispatchEvent=function(t,e,i){var o=t._eventCoordinates(e),r=new Ut(o.x,o.y),o=this.pointPane(r),n=[],s=[];if(o){for(var a=o.axes,p=0;p<a.length;p++){var h=a[p];h.getValue?ss(s,h.getValue(r)):ss(n,h.getCategory(r))}0===n.length&&ss(n,this.categoryAxis.getCategory(r)),0<n.length&&0<s.length&&t.trigger(i,{element:wt(e),originalEvent:e,category:ds(n),value:ds(s)})}},fa.prototype.pointPane=function(t){for(var e=this.panes,i=0;i<e.length;i++){var o=e[i];if(o.contentBox.containsPoint(t))return o}},fa.prototype.updateAxisOptions=function(t,e){va(this.options,t,e),va(this.originalOptions,t,e)},fa);function fa(){ha.apply(this,arguments)}function ya(){la.apply(this,arguments)}function va(t,e,i){L([].concat(e instanceof Ai?t.categoryAxis:t.valueAxis)[e.axisIndex],i)}It(K,{categoryAxis:{},valueAxis:{}}),L(K.prototype,Ss);var ma=K;function xa(){this._defaultPrevented=!0}var ba,_a=((ba=C.Class)&&(wa.__proto__=ba),((wa.prototype=Object.create(ba&&ba.prototype)).constructor=wa).prototype.destroy=function(){this._points=[]},wa.prototype.show=function(t,e){var i=[].concat(t);this.hide();for(var o=0;o<i.length;o++){var r=i[o];r&&r.toggleHighlight&&r.hasHighlight()&&(this.togglePointHighlight(r,!0,e),this._points.push(r))}},wa.prototype.togglePointHighlight=function(t,e,i){var o=(t.options.highlight||{}).toggle;o?(o(o={category:t.category,series:t.series,dataItem:t.dataItem,value:t.value,stackValue:t.stackValue,preventDefault:xa,visual:t.highlightVisual(),show:e}),o._defaultPrevented||t.toggleHighlight(e,i)):t.toggleHighlight(e,i)},wa.prototype.hide=function(){for(var t=this._points;t.length;)this.togglePointHighlight(t.pop(),!1)},wa.prototype.isHighlighted=function(t){for(var e=this._points,i=0;i<e.length;i++)if(t===e[i])return!0;return!1},wa);function wa(){ba.call(this),this._points=[]}function Aa(t,e){e=(e||"").toLowerCase(),t=t.event;return"none"===e&&!(t.ctrlKey||t.shiftKey||t.altKey)||t[e+"Key"]}function Sa(t){for(var e={},i=0;i<t.length;i++){var o=t[i];o.axis.options.name&&(e[o.axis.options.name]={min:o.range.min,max:o.range.max})}return e}var ka,N=((ka=C.Class)&&(Pa.__proto__=ka),((Pa.prototype=Object.create(ka&&ka.prototype)).constructor=Pa).prototype.start=function(t){return this._active=Aa(t,this.options.key),this._active},Pa.prototype.move=function(t){if(this._active){t=this.axisRanges=this._panAxes(t,v).concat(this._panAxes(t,m));if(t.length)return Sa(this.axisRanges=t)}},Pa.prototype.end=function(){var t=this._active;return this._active=!1,t},Pa.prototype.pan=function(){var t=this.plotArea,e=this.axisRanges;if(e.length){for(var i=0;i<e.length;i++){var o=e[i];t.updateAxisOptions(o.axis,o.range)}t.redraw(t.panes)}},Pa.prototype.destroy=function(){delete this.plotArea},Pa.prototype._panAxes=function(t,e){var i=this.plotArea,o=-t[e].delta,t=(this.options.lock||"").toLowerCase(),r=[];if(0!=o&&(t||"").toLowerCase()!==e)for(var n=i.axes,s=0;s<n.length;s++){var a,p=n[s];!(e===v&&!p.options.vertical||e===m&&p.options.vertical)||(a=p.pan(o))&&(a.limitRange=!0,r.push({axis:p,range:a}))}return r},Pa);function Pa(t,e){ka.call(this),this.plotArea=t,this.options=L({},this.options,e)}N.prototype.options={key:"none",lock:"none"};var Ca,Ta=N,G=((Ca=C.Class)&&(Ma.__proto__=Ca),((Ma.prototype=Object.create(Ca&&Ca.prototype)).constructor=Ma).prototype.createElement=function(){var t=this._marquee=document.createElement("div");t.className="k-marquee";var e=document.createElement("div");e.className="k-marquee-color",t.appendChild(e)},Ma.prototype.removeElement=function(){this._marquee.parentNode&&this._marquee.parentNode.removeChild(this._marquee)},Ma.prototype.setStyles=function(t){D(this._marquee,t)},Ma.prototype.start=function(t){if(Aa(t,this.options.key)){var e=this.chart,i=e._eventCoordinates(t),e=this._zoomPane=e._plotArea.paneByPoint(i),i=e?e.chartsBox().clone():null;if(e&&i){e=this._elementOffset();return i.translate(e.left,e.top),this._zoomPaneClipBox=i,document.body.appendChild(this._marquee),this.setStyles({left:t.pageX+1,top:t.pageY+1,width:0,height:0}),!0}}return!1},Ma.prototype._elementOffset=function(){var t=this.chart.element,e=D(t,["paddingLeft","paddingTop"]),i=e.paddingLeft,e=e.paddingTop,t=bt(t);return{left:i+t.left,top:e+t.top}},Ma.prototype.move=function(t){this._zoomPane&&this.setStyles(this._selectionPosition(t))},Ma.prototype.end=function(t){if(this._zoomPane){var e=this._elementOffset(),t=this._selectionPosition(t);t.left-=e.left,t.top-=e.top;e={x:t.left,y:t.top},t={x:t.left+t.width,y:t.top+t.height};return this._updateAxisRanges(e,t),this.removeElement(),delete this._zoomPane,Sa(this.axisRanges)}},Ma.prototype.zoom=function(){var t=this.axisRanges;if(t&&t.length){for(var e=this.chart._plotArea,i=0;i<t.length;i++){var o=t[i];e.updateAxisOptions(o.axis,o.range)}e.redraw(e.panes)}},Ma.prototype.destroy=function(){this.removeElement(),delete this._marquee,delete this.chart},Ma.prototype._updateAxisRanges=function(t,e){for(var i=(this.options.lock||"").toLowerCase(),o=[],r=this._zoomPane.axes,n=0;n<r.length;n++){var s=r[n],a=s.options.vertical;i===v&&!a||i===m&&a||!mt(s.axisIndex)||(a=s.pointsRange(t,e))&&o.push({axis:s,range:a})}this.axisRanges=o},Ma.prototype._selectionPosition=function(t){var e=this._zoomPaneClipBox,i={x:t.x.startLocation,y:t.y.startLocation},o=t.x.location,r=t.y.location,n=(this.options.lock||"").toLowerCase(),s=Math.min(i.x,o),a=Math.min(i.y,r),p=Math.abs(i.x-o),t=Math.abs(i.y-r);return n===v&&(s=e.x1,p=e.width()),n===m&&(a=e.y1,t=e.height()),o>e.x2&&(p=e.x2-i.x),o<e.x1&&(p=i.x-e.x1),r>e.y2&&(t=e.y2-i.y),r<e.y1&&(t=i.y-e.y1),{left:Math.max(s,e.x1),top:Math.max(a,e.y1),width:p,height:t}},Ma);function Ma(t,e){Ca.call(this),this.chart=t,this.options=L({},this.options,e),this.createElement()}G.prototype.options={key:"shift",lock:"none"};var Ra,Oa,Ia,ja,Ba=G,Va=((ja=C.Class)&&(Ha.__proto__=ja),((Ha.prototype=Object.create(ja&&ja.prototype)).constructor=Ha).prototype.updateRanges=function(t){for(var e=(this.options.lock||"").toLowerCase(),i=[],o=this.chart._plotArea.axes,r=0;r<o.length;r++){var n=o[r],s=n.options.vertical;e===v&&!s||e===m&&s||!n.zoomRange||(s=n.zoomRange(-t))&&i.push({axis:n,range:s})}return Sa(this.axisRanges=i)},Ha.prototype.zoom=function(){var t=this.axisRanges,e=this.chart._plotArea;if(t&&t.length&&e.updateAxisOptions){for(var i=0;i<t.length;i++){var o=t[i];e.updateAxisOptions(o.axis,o.range)}e.redraw(e.panes)}},Ha.prototype.destroy=function(){delete this.chart},Ha),La=((Ia=se)&&(Ua.__proto__=Ia),((Ua.prototype=Object.create(Ia&&Ia.prototype)).constructor=Ua).prototype.render=function(){var t=this.children,e=this.options,i=e.vertical;this.visual=new C.drawing.Layout(null,{spacing:i?0:e.spacing,lineSpacing:i?e.spacing:0,orientation:i?"vertical":"horizontal",reverse:e.rtl,alignItems:i?"start":"center"});for(var o=0;o<t.length;o++){var r=t[o];r.reflow(new qt),r.renderVisual()}},Ua.prototype.reflow=function(t){this.visual.rect(t.toRect()),this.visual.reflow();t=this.visual.clippedBBox();this.box=t?Ae(t):new qt},Ua.prototype.renderVisual=function(){this.addVisual()},Ua.prototype.createVisual=function(){},Ua),za=((Oa=he)&&(Da.__proto__=Oa),((Da.prototype=Object.create(Oa&&Oa.prototype)).constructor=Da).prototype.createContainer=function(){this.container=new xe({vertical:!1,wrap:!1,align:A,spacing:this.options.spacing}),this.append(this.container)},Da.prototype.createMarker=function(){this.container.append(new ce(this.markerOptions()))},Da.prototype.markerOptions=function(){var t=this.options,e=t.markerColor;return L({},t.markers,{background:e,border:{color:e}})},Da.prototype.createLabel=function(){var t=this.options,e=L({},t.labels);this.container.append(new Ce(t.text,e))},Da.prototype.renderComplete=function(){Oa.prototype.renderComplete.call(this);var t=this.options.cursor||{},t=this._itemOverlay=C.drawing.Path.fromRect(this.container.box.toRect(),{fill:{color:p,opacity:0},stroke:null,cursor:t.style||t});this.appendVisual(t)},Da.prototype.click=function(t,e){var i=this.eventArgs(e);!t.trigger("legendItemClick",i)&&e&&"contextmenu"===e.type&&e.preventDefault()},Da.prototype.over=function(t,e){e=this.eventArgs(e);return t.trigger("legendItemHover",e)||t._legendItemHover(e.seriesIndex,e.pointIndex),!0},Da.prototype.out=function(t,e){t._unsetActivePoint(),t.trigger("legendItemLeave",this.eventArgs(e))},Da.prototype.eventArgs=function(t){var e=this.options;return{element:wt(t),text:e.text,series:e.series,seriesIndex:e.series.index,pointIndex:e.pointIndex}},Da.prototype.renderVisual=function(){var e=this,t=this.options,i=t.visual;i?(this.visual=i({active:t.active,series:t.series,sender:this.getSender(),pointIndex:t.pointIndex,options:{markers:this.markerOptions(),labels:t.labels},createVisual:function(){e.createVisual(),e.renderChildren(),e.renderComplete();var t=e.visual;return delete e.visual,t}}),this.addVisual()):Oa.prototype.renderVisual.call(this)},Da),Ea="custom",$=((Ra=se)&&(Fa.__proto__=Ra),((Fa.prototype=Object.create(Ra&&Ra.prototype)).constructor=Fa).prototype.createContainers=function(){var t=this.options,e=t.position,i=t.align,o=e,r=A;e===Ea?o=S:lt(e,[P,w])?(o="start"===i?S:"end"===i?k:A,r=e):i&&("start"===i?r=P:"end"===i&&(r=w)),this.container=new he({margin:t.margin,padding:t.padding,background:t.background,border:t.border,vAlign:r,align:o,zIndex:t.zIndex,shrinkToFit:!0}),this.hasTitle()?this.itemsContainer=new he({vAlign:r,align:o,zIndex:t.zIndex,shrinkToFit:!0}):this.itemsContainer=this.container,this.append(this.container)},Fa.prototype.createItems=function(){var t=this.getService(),e=this.options,i=this.isVertical(),o=new La({vertical:i,spacing:e.spacing,rtl:t.rtl},t),r=e.items;e.reverse&&(r=r.slice(0).reverse());for(var n=r.length,s=0;s<n;s++){var a=r[s];o.append(new za(L({},{markers:e.markers,labels:e.labels,rtl:t.rtl},e.item,a)))}o.render(),this.itemsContainer.append(o)},Fa.prototype.isVertical=function(){var t=this.options,e=t.orientation,t=t.position;return t===Ea&&"horizontal"!==e||(mt(e)?"horizontal"!==e:lt(t,[S,k]))},Fa.prototype.hasItems=function(){return 0<this.container.children[0].children.length},Fa.prototype.reflow=function(t){var e=this.options,t=t.clone();this.hasItems()?(e.position===Ea?(this.containerCustomReflow(t),this.box=t):this.containerReflow(t),this.hasTitle()&&this.title.reflow(new qt(this.container.box.x1,this.title.box.y1,this.container.box.x2,this.title.box.y2))):this.box=t},Fa.prototype.containerReflow=function(t){var e=this.options,i=this.container,o=e.position,r=e.width,n=e.height,s=o===P||o===w?v:m,a=this.isVertical(),p=t.clone(),h=t.clone();o!==S&&o!==k||(h.y1=p.y1=0),a&&n?(h.y2=h.y1+n,h.align(p,m,i.options.vAlign)):!a&&r&&(h.x2=h.x1+r,h.align(p,v,i.options.align)),i.reflow(h);p=(h=i.box).clone();(e.offsetX||e.offsetY)&&(h.translate(e.offsetX,e.offsetY),i.reflow(h)),p[s+1]=t[s+1],p[s+2]=t[s+2],this.box=p},Fa.prototype.containerCustomReflow=function(t){var e=this.options,i=this.container,o=e.offsetX,r=e.offsetY,n=e.width,s=e.height,e=this.isVertical(),t=t.clone();e&&s?t.y2=t.y1+s:!e&&n&&(t.x2=t.x1+n),i.reflow(t),t=i.box,i.reflow(new qt(o,r,o+t.width(),r+t.height()))},Fa.prototype.renderVisual=function(){this.hasItems()&&Ra.prototype.renderVisual.call(this)},Fa.prototype.createLegendTitle=function(t){var e=L({},{color:a,position:P,align:A},t),i=e.text;t&&!1!==t.visible&&(mt(e)&&e.visible&&((t=ot(e))?i=t({text:i}):e.format&&(i=this.chartService.format.auto(e.format,i))),this.title=new Ce(i,e),this.createTitleLayout(),this.appendTitleLayoutContent())},Fa.prototype.createTitleLayout=function(){this.layout=new xe({vertical:!0,wrap:!1}),this.container.append(this.layout)},Fa.prototype.hasTitle=function(){return Boolean(this.options.title&&!1!==this.options.title.visible)},Fa.prototype.appendTitleLayoutContent=function(){this.options.title.position===w?(this.layout.append(this.itemsContainer),this.layout.append(this.title)):(this.layout.append(this.title),this.layout.append(this.itemsContainer))},Fa);function Fa(t,e){void 0===e&&(e={}),Ra.call(this,t),this.chartService=e,lt(this.options.position,[P,k,w,S,Ea])||(this.options.position=k),this.createContainers(),this.createLegendTitle(t.title),this.createItems()}function Da(t){Oa.call(this,t),this.createContainer(),t.rtl?(this.createLabel(),this.createMarker()):(this.createMarker(),this.createLabel())}function Ua(t,e){Ia.call(this,t),this.chartService=e}function Ha(t,e){ja.call(this),this.chart=t,this.options=L({},this.options,e)}It($,{position:k,items:[],offsetX:0,offsetY:0,margin:U(5),padding:U(5),border:{color:a,width:0},item:{cursor:"pointer",spacing:6},spacing:6,background:"",zIndex:1,markers:{border:{width:0},width:15,height:3,type:"rect",align:S,vAlign:A}});var Ga,Na=$,K=((Ga=C.Class)&&(qa.__proto__=Ga),((qa.prototype=Object.create(Ga&&Ga.prototype)).constructor=qa).prototype.register=function(t,e){this._registry.push({type:t,seriesTypes:e})},qa.prototype.create=function(t,e,i){for(var o,r=this._registry,n=r[0],s=0;s<r.length;s++){var a=r[s];if(0<(o=ls(t,a.seriesTypes)).length){n=a;break}}return new n.type(o,e,i)},qa);function qa(){Ga.call(this),this._registry=[]}K.current=new K;var Xa=K;function Ya(t){var e=document.createElement("div");return t&&(e.className=t),e}function Wa(t){for(var e=t;e&&!pt(e,"k-handle");)e=e.parentNode;return e}var Za,N=((Za=C.Class)&&(Ka.__proto__=Za),((Ka.prototype=Object.create(Za&&Za.prototype)).constructor=Ka).prototype.onPane=function(t){return this.categoryAxis.pane===t},Ka.prototype.createElements=function(){var t=this.options,e=this.wrapper=Ya("k-selector");D(e,{top:t.offset.top,left:t.offset.left,width:t.width,height:t.height,direction:"ltr"});var i=this.selection=Ya("k-selection");this.leftMask=Ya("k-mask"),this.rightMask=Ya("k-mask"),e.appendChild(this.leftMask),e.appendChild(this.rightMask),e.appendChild(i),i.appendChild(Ya("k-selection-bg"));var o=this.leftHandle=Ya("k-handle k-left-handle"),r=this.rightHandle=Ya("k-handle k-right-handle");o.appendChild(Ya()),r.appendChild(Ya()),i.appendChild(o),i.appendChild(r),this.chartElement.appendChild(e);var n=D(i,["borderLeftWidth","borderRightWidth","height"]),s=D(o,"height").height,i=D(r,"height").height;t.selection={border:{left:n.borderLeftWidth,right:n.borderRightWidth}},D(o,{top:(n.height-s)/2}),D(r,{top:(n.height-i)/2}),e.style.cssText=e.style.cssText},Ka.prototype.bindEvents=function(){var t;!1!==this.options.mousewheel&&(this._mousewheelHandler=this._mousewheel.bind(this),vt(this.wrapper,((t={})[Yo]=this._mousewheelHandler,t))),this._domEvents=tt.create(this.wrapper,{stopPropagation:!0,start:this._start.bind(this),move:this._move.bind(this),end:this._end.bind(this),tap:this._tap.bind(this),press:this._press.bind(this),gesturestart:this._gesturestart.bind(this),gesturechange:this._gesturechange.bind(this),gestureend:this._gestureend.bind(this)})},Ka.prototype.initOptions=function(){var t=this.options,e=this.categoryAxis.pane.chartsBox(),i=this.chart.chartService.intl;this._dateAxis&&L(t,{min:mi(i,t.min),max:mi(i,t.max),from:mi(i,t.from),to:mi(i,t.to)});var o=D(this.chartElement,["paddingLeft","paddingTop"]),i=o.paddingLeft,o=o.paddingTop;this.options=L({},{width:e.width(),height:e.height()+.1,padding:{left:i,top:o},offset:{left:e.x1+i,top:e.y1+o},from:t.min,to:t.max},t)},Ka.prototype.destroy=function(){var t;this._domEvents&&(this._domEvents.destroy(),delete this._domEvents),clearTimeout(this._mwTimeout),this._state=null,this.wrapper&&(this._mousewheelHandler&&(Mt(this.wrapper,((t={})[Yo]=this._mousewheelHandler,t)),this._mousewheelHandler=null),this.chartElement.removeChild(this.wrapper),this.wrapper=null)},Ka.prototype._rangeEventArgs=function(t){return{axis:this.categoryAxis.options,from:this._value(t.from),to:this._value(t.to)}},Ka.prototype._start=function(t){var e=this.options,i=wt(t);!this._state&&i&&(this.chart._unsetActivePoint(),this._state={moveTarget:Wa(i)||i,startLocation:t.x?t.x.location:0,range:{from:this._index(e.from),to:this._index(e.to)}},e=this._rangeEventArgs({from:this._index(e.from),to:this._index(e.to)}),this.trigger("selectStart",e)&&(this._state=null))},Ka.prototype._press=function(t){(t=this._state?this._state.moveTarget:Wa(wt(t)))&&n(t,"k-handle-active")},Ka.prototype._move=function(t){var e,i,o,r,n,s,a,p,h,l,c,u;this._state&&(l=this._state,h=this.options,c=this.categoryAxis,e=l.range,i=l.moveTarget,o=c.options.reverse,r=this._index(h.from),n=this._index(h.to),s=this._index(h.min),a=this._index(h.max),u=l.startLocation-t.x.location,p=e.from,h=e.to,l=e.to-e.from,t=D(this.wrapper,"width").width/(c.categoriesCount()-1),c=Math.round(u/t)*(o?-1:1),i&&(u=pt(i,"k-left-handle"),t=pt(i,"k-right-handle"),pt(i,"k-selection k-selection-bg")?(e.from=Math.min(Math.max(s,r-c),a-l),e.to=Math.min(e.from+l,a)):u&&!o||t&&o?(e.from=Math.min(Math.max(s,r-c),a-1),e.to=Math.max(e.from+1,e.to)):(u&&o||t&&!o)&&(e.to=Math.min(Math.max(s+1,n-c),a),e.from=Math.min(e.to-1,e.from)),e.from===p&&e.to===h||(this.move(e.from,e.to),this.trigger("select",this._rangeEventArgs(e)))))},Ka.prototype._end=function(){var t;this._state&&((t=this._state.moveTarget)&&_(t,"k-handle-active"),t=this._state.range,this.set(t.from,t.to),this.trigger("selectEnd",this._rangeEventArgs(t)),delete this._state)},Ka.prototype._tap=function(t){var e=this.options,i=this.categoryAxis,o=this.chart._eventCoordinates(t),r=i.pointCategoryIndex(new Ut(o.x,i.box.y1)),n=this._index(e.from),s=this._index(e.to),a=this._index(e.min),p=this._index(e.max),h=s-n,o=n+h/2,e={},s=3===t.event.which,r=Math.round(o-r);this._state||s||(this.chart._unsetActivePoint(),i.options.justified||r--,e.from=Math.min(Math.max(a,n-r),p-h),e.to=Math.min(e.from+h,p),this._start(t),this._state&&(this._state.range=e,this.trigger("select",this._rangeEventArgs(e)),this._end()))},Ka.prototype._mousewheel=function(t){var e,i=this,o=gt(t);this._start({target:this.selection}),this._state&&(e=this._state.range,t.preventDefault(),t.stopPropagation(),1<Math.abs(o)&&(o*=3),this.options.mousewheel.reverse&&(o*=-1),this.expand(o)&&this.trigger("select",{axis:this.categoryAxis.options,delta:o,originalEvent:t,from:this._value(e.from),to:this._value(e.to)}),this._mwTimeout&&clearTimeout(this._mwTimeout),this._mwTimeout=setTimeout(function(){i._end()},150))},Ka.prototype._gesturestart=function(t){var e=this.options;this._state={range:{from:this._index(e.from),to:this._index(e.to)}};e=this._rangeEventArgs(this._state.range);this.trigger("selectStart",e)?this._state=null:t.preventDefault()},Ka.prototype._gestureend=function(){this._state&&(this.trigger("selectEnd",this._rangeEventArgs(this._state.range)),delete this._state)},Ka.prototype._gesturechange=function(t){var e=this.chart,i=this._state,o=this.options,r=this.categoryAxis,n=i.range,s=e._toModelCoordinates(t.touches[0].x.location).x,i=e._toModelCoordinates(t.touches[1].x.location).x,e=Math.min(s,i),i=Math.max(s,i);t.preventDefault(),n.from=r.pointCategoryIndex(new Ut(e))||o.min,n.to=r.pointCategoryIndex(new Ut(i))||o.max,this.move(n.from,n.to),this.trigger("select",this._rangeEventArgs(n))},Ka.prototype._index=function(t){var e=t;return t instanceof Date&&(e=this.categoryAxis.categoryIndex(t)),e},Ka.prototype._value=function(t){var e=t;return this._dateAxis&&(e=this.categoryAxis.categoryAt(t))>this.options.max&&(e=this.options.max),e},Ka.prototype._slot=function(t){var e=this.categoryAxis,t=this._index(t);return e.getSlot(t,t,!0)},Ka.prototype.move=function(t,e){var i=this.options,o=this.categoryAxis.options.reverse,r=i.offset,n=i.padding,s=i.selection.border,a=o?e:t,t=o?t:e,e="x"+(o?2:1),o=this._slot(a),a=Tt(o[e]-r.left+n.left);D(this.leftMask,{width:a}),D(this.selection,{left:a}),o=this._slot(t);r=Tt(i.width-(o[e]-r.left+n.left));D(this.rightMask,{width:r});n=i.width-r;n!==i.width&&(n+=s.right),D(this.rightMask,{left:n}),D(this.selection,{width:Math.max(i.width-(a+r)-s.right,0)})},Ka.prototype.set=function(t,e){var i=this.options,o=this._index(i.min),r=this._index(i.max),o=kt(this._index(t),o,r),r=kt(this._index(e),o+1,r);i.visible&&this.move(o,r),i.from=this._value(o),i.to=this._value(r)},Ka.prototype.expand=function(t){var e=this.options,i=this._index(e.min),o=this._index(e.max),r=e.mousewheel.zoom,n=this._index(e.from),s=this._index(e.to),a={from:n,to:s},e=L({},a);if(this._state&&(a=this._state.range),r!==k&&(a.from=kt(kt(n-t,0,s-1),i,o)),r!==S&&(a.to=kt(kt(s+t,a.from+1,o),i,o)),a.from!==e.from||a.to!==e.to)return this.set(a.from,a.to),!0},Ka.prototype.trigger=function(t,e){return(this.observer||this.chart).trigger(t,e)},Ka);function Ka(t,e,i,o){Za.call(this);var r=t.element;this.options=L({},this.options,i),this.chart=t,this.observer=o,this.chartElement=r,this.categoryAxis=e,this._dateAxis=this.categoryAxis instanceof ji,this.initOptions(),this.visible=this.options.visible&&r.offsetHeight,this.visible&&(this.createElements(),this.set(this._index(this.options.from),this._index(this.options.to)),this.bindEvents())}It(N,{visible:!0,mousewheel:{zoom:"both"},min:c,max:l});var $a,Ja,Qa=N,tp=((Ja=Y)&&(ip.__proto__=Ja),((ip.prototype=Object.create(Ja&&Ja.prototype)).constructor=ip).prototype.show=function(t){var e,i;!t||!t.tooltipAnchor||this._current&&this._current===t||(e=L({},this.options,t.options.tooltip),(i=t.tooltipAnchor())?(this._current=t,Ja.prototype.show.call(this,{point:t,anchor:i},e,t)):this.hide())},ip.prototype.hide=function(){delete this._current,Ja.prototype.hide.call(this)},ip),G=(($a=Y)&&(ep.__proto__=$a),((ep.prototype=Object.create($a&&$a.prototype)).constructor=ep).prototype.showAt=function(t,e){var i,o=at(t,function(t){t=t.series.tooltip;return!t||!1!==t.visible});0<o.length&&(i=o[0],o=this.plotArea.categoryAxis.getSlot(i.categoryIx),o=e?this._slotAnchor(e,o):this._defaultAnchor(i,o),this.show({anchor:o,shared:!0,points:t,category:i.category,categoryText:this.formatService.auto(this.options.categoryFormat,i.category),series:this.plotArea.series},this.options))},ep.prototype._slotAnchor=function(t,e){return this.plotArea.categoryAxis.options.vertical||(t.x=e.center().x),{point:t,align:{horizontal:"left",vertical:"center"}}},ep.prototype._defaultAnchor=function(t,e){var i=t.owner.pane.chartsBox(),t=this.plotArea.categoryAxis.options.vertical,i=i.center(),e=e.center();return{point:t?new Ut(i.x,e.y):new Ut(e.x,i.y),align:{horizontal:"center",vertical:"center"}}},ep);function ep(t,e){$a.call(this,t.chartService,e),this.plotArea=t,this.formatService=t.chartService.format}function ip(){Ja.apply(this,arguments)}It(G,{categoryFormat:"{0:d}"});var op,rp=G,$=((op=C.drawing.Animation)&&(np.__proto__=op),((np.prototype=Object.create(op&&op.prototype)).constructor=np).prototype.setup=function(){var t,e=this.element,i=this.options;e.bbox()?(this.origin=i.origin,t=i.vertical?m:v,(i=this.fromScale=new C.geometry.Point(1,1))[t]=Bo,e.transform(C.geometry.transform().scale(i.x,i.y))):this.abort()},np.prototype.step=function(t){var e=ct(this.fromScale.x,1,t),t=ct(this.fromScale.y,1,t);this.element.transform(C.geometry.transform().scale(e,t,this.origin))},np.prototype.abort=function(){op.prototype.abort.call(this),this.element.transform(null)},np);function np(){op.apply(this,arguments)}It($,{duration:600}),C.drawing.AnimationFactory.current.register(zo,$);var sp,K=((sp=C.drawing.Animation)&&(ap.__proto__=sp),((ap.prototype=Object.create(sp&&sp.prototype)).constructor=ap).prototype.setup=function(){var t=this.center=this.element.bbox().center();this.element.transform(C.geometry.transform().scale(Bo,Bo,t))},ap.prototype.step=function(t){this.element.transform(C.geometry.transform().scale(t,t,this.center))},ap);function ap(){sp.apply(this,arguments)}It(K,{easing:"easeOutElastic"}),C.drawing.AnimationFactory.current.register("bubble",K);var pp,N=((pp=C.drawing.Animation)&&(hp.__proto__=pp),((hp.prototype=Object.create(pp&&pp.prototype)).constructor=hp).prototype.setup=function(){this.fadeTo=this.element.opacity(),this.element.opacity(0)},hp.prototype.step=function(t){this.element.opacity(t*this.fadeTo)},hp);function hp(){pp.apply(this,arguments)}It(N,{duration:200,easing:"linear"}),C.drawing.AnimationFactory.current.register("fadeIn",N);var lp,Y=((lp=C.drawing.Animation)&&(cp.__proto__=lp),((cp.prototype=Object.create(lp&&lp.prototype)).constructor=cp).prototype.setup=function(){this.element.transform(C.geometry.transform().scale(Bo,Bo,this.options.center))},cp.prototype.step=function(t){this.element.transform(C.geometry.transform().scale(t,t,this.options.center))},cp);function cp(){lp.apply(this,arguments)}It(Y,{easing:"easeOutElastic",duration:600}),C.drawing.AnimationFactory.current.register(Do,Y);var up,dp=Y,G=((up=Rn)&&(gp.__proto__=up),((gp.prototype=Object.create(up&&up.prototype)).constructor=gp).prototype.render=function(){up.prototype.render.call(this),this.renderSegments()},gp.prototype.createSegment=function(t,e,i){return new("smooth"===e.style?xr:ur)(t,e,i)},gp.prototype.animationPoints=function(){return up.prototype.animationPoints.call(this).concat(this._segments)},gp.prototype.createMissingValue=function(t,e){if(e===Vo){t={x:t.x,y:t.y};return Pn(t.x)||(t.x=0),Pn(t.y)||(t.y=0),t}},gp);function gp(){up.apply(this,arguments)}L(G.prototype,W);var fp,yp=G,$=((fp=As)&&(vp.__proto__=fp),((vp.prototype=Object.create(fp&&fp.prototype)).constructor=vp).prototype.initFields=function(){this.namedXAxes={},this.namedYAxes={},this.xAxisRangeTracker=new Fr,this.yAxisRangeTracker=new Fr},vp.prototype.render=function(t){void 0===t&&(t=this.panes);for(var e=this.groupSeriesByPane(),i=0;i<t.length;i++){var o=t[i],r=e[o.options.name||"default"]||[];this.addToLegend(r);r=this.filterVisibleSeries(r);r&&(this.createScatterChart(ls(r,"scatter"),o),this.createScatterLineChart(ls(r,"scatterLine"),o),this.createBubbleChart(ls(r,"bubble"),o))}this.createAxes(t)},vp.prototype.appendChart=function(t,e){this.xAxisRangeTracker.update(t.xAxisRanges),this.yAxisRangeTracker.update(t.yAxisRanges),fp.prototype.appendChart.call(this,t,e)},vp.prototype.removeAxis=function(t){var e=t.options.name;fp.prototype.removeAxis.call(this,t),t.options.vertical?(this.yAxisRangeTracker.reset(e),delete this.namedYAxes[e]):(this.xAxisRangeTracker.reset(e),delete this.namedXAxes[e]),t===this.axisX&&delete this.axisX,t===this.axisY&&delete this.axisY},vp.prototype.seriesPaneName=function(t){var e=this.options,i=t.xAxis,o=at([].concat(e.xAxis),function(t){return t.name===i})[0],r=t.yAxis,t=at([].concat(e.yAxis),function(t){return t.name===r})[0],e=(e.panes||[{}])[0].name||"default";return(o||{}).pane||(t||{}).pane||e},vp.prototype.createScatterChart=function(t,e){0<t.length&&this.appendChart(new Rn(this,{series:t,clip:e.options.clip}),e)},vp.prototype.createScatterLineChart=function(t,e){0<t.length&&this.appendChart(new yp(this,{series:t,clip:e.options.clip}),e)},vp.prototype.createBubbleChart=function(t,e){0<t.length&&this.appendChart(new Ln(this,{series:t,clip:e.options.clip}),e)},vp.prototype.createXYAxis=function(t,e,i){for(var o,r=t.name,n=e?this.namedYAxes:this.namedXAxes,s=e?this.yAxisRangeTracker:this.xAxisRangeTracker,a=L({reverse:!e&&this.chartService.rtl},t,{vertical:e}),p=hs(a.type,"log"),h=s.query(),t=p?{min:.1,max:1}:{min:0,max:1},t=s.query(r)||h||t,l=[a.min,a.max],c=this.series,u=0;u<c.length;u++){var d=c[u],g=d[e?"yAxis":"xAxis"];if(g===a.name||0===i&&!g){d=Ro.current.bindPoint(d,0).valueFields;l.push(d[e?"y":"x"]);break}}0===i&&h&&(t.min=Math.min(t.min,h.min),t.max=Math.max(t.max,h.max));for(var f=0;f<l.length;f++)if(l[f]instanceof Date){o=!0;break}t=new(hs(a.type,y)||!a.type&&o?qi:p?Ki:Hi)(t.min,t.max,a,this.chartService);if(t.axisIndex=i,r){if(n[r])throw new Error((e?"Y":"X")+" axis with name "+r+" is already defined");n[r]=t}return this.appendAxis(t),t},vp.prototype.createAxes=function(t){for(var e=this.options,i=[].concat(e.xAxis),o=[],r=[].concat(e.yAxis),n=[],s=0;s<i.length;s++)lt(this.findPane(i[s].pane),t)&&o.push(this.createXYAxis(i[s],!1,s));for(var a=0;a<r.length;a++)lt(this.findPane(r[a].pane),t)&&n.push(this.createXYAxis(r[a],!0,a));this.axisX=this.axisX||o[0],this.axisY=this.axisY||n[0]},vp.prototype._dispatchEvent=function(t,e,i){for(var o=t._eventCoordinates(e),r=new Ut(o.x,o.y),n=this.axes,s=n.length,a=[],p=[],h=0;h<s;h++){var l=n[h],c=l.options.vertical?p:a,l=l.getValue(r);null!==l&&c.push(l)}0<a.length&&0<p.length&&t.trigger(i,{element:wt(e),originalEvent:e,x:ds(a),y:ds(p)})},vp.prototype.updateAxisOptions=function(t,e){var i=t.options.vertical,o=this.groupAxes(this.panes),t=(i?o.y:o.x).indexOf(t);mp(this.options,t,i,e),mp(this.originalOptions,t,i,e)},vp);function vp(){fp.apply(this,arguments)}function mp(t,e,i,o){L([].concat(i?t.yAxis:t.xAxis)[e],o)}It($,{xAxis:{},yAxis:{}}),L($.prototype,Ss);var xp,bp=$,K=((xp=se)&&(Ap.__proto__=xp),((Ap.prototype=Object.create(xp&&xp.prototype)).constructor=Ap).prototype.render=function(){var t,e,i=this.options.labels,o=this.owner.chartService,r=this.value;this._rendered||!1===this.visible||(this._rendered=!0,e=ot(i),t=this.pointData(),e?r=e(t):i.format&&(r=o.format.auto(i.format,r)),i.visible&&(r||0===r)&&(i.position===A||"insideEnd"===i.position?(i.color||(e=new C.Color(this.options.color).percBrightness(),i.color=180<e?a:p),i.background||(i.background=this.options.color)):(o=o.theme.seriesDefaults.labels,i.color=i.color||o.color,i.background=i.background||o.background),this.label=new Ce(r,L({},i,{align:A,vAlign:"",animation:{type:"fadeIn",delay:this.animationDelay}}),t),this.append(this.label)))},Ap.prototype.reflow=function(t){this.render(),this.box=t,this.reflowLabel()},Ap.prototype.reflowLabel=function(){var t,e,i,o,r=this.options.labels,n=this.label,s=this.sector.clone(),a=r.distance,p=s.middle();n&&(e=n.box.height(),i=n.box.width(),r.position===A?(s.radius=Math.abs((s.radius-e)/2)+e,t=s.point(p),n.reflow(new qt(t.x,t.y-e/2,t.x,t.y))):"insideEnd"===r.position?(s.radius=s.radius-e/2,t=s.point(p),n.reflow(new qt(t.x,t.y-e/2,t.x,t.y))):((t=s.clone().expand(a).point(p)).x>=s.center.x?(o=t.x+i,n.orientation=k):(o=t.x-i,n.orientation=S),n.reflow(new qt(o,t.y-e,t.x,t.y))))},Ap.prototype.createVisual=function(){var t,e=this,i=this.sector,o=this.options;xp.prototype.createVisual.call(this),this.value&&(o.visual?(t=(i.startAngle+180)%360,(o=o.visual({category:this.category,dataItem:this.dataItem,value:this.value,series:this.series,percentage:this.percentage,center:new C.geometry.Point(i.center.x,i.center.y),radius:i.radius,innerRadius:i.innerRadius,startAngle:t,endAngle:t+i.angle,options:o,sender:this.getSender(),createVisual:function(){var t=new C.drawing.Group;return e.createSegmentVisual(t),t}}))&&this.visual.append(o)):this.createSegmentVisual(this.visual))},Ap.prototype.createSegmentVisual=function(t){var e=this.sector,i=this.options,o=i.border||{},r=0<o.width?{stroke:{color:o.color,width:o.width,opacity:o.opacity,dashType:o.dashType}}:{},n=i.color,o={color:n,opacity:i.opacity},r=this.createSegment(e,L({fill:o,stroke:{opacity:i.opacity},zIndex:i.zIndex},r));t.append(r),qr(i)&&t.append(this.createGradientOverlay(r,{baseColor:n,fallbackFill:o},L({center:[e.center.x,e.center.y],innerRadius:e.innerRadius,radius:e.radius,userSpace:!0},i.overlay)))},Ap.prototype.createSegment=function(t,e){return e.singleSegment?new C.drawing.Circle(new C.geometry.Circle(new C.geometry.Point(t.center.x,t.center.y),t.radius),e):oe.current.createRing(t,e)},Ap.prototype.createAnimation=function(){var t=this.options,e=this.sector.center;L(t,{animation:{center:[e.x,e.y],delay:this.animationDelay}}),xp.prototype.createAnimation.call(this)},Ap.prototype.createHighlight=function(t){var e=this.options.highlight||{},i=e.border||{};return this.createSegment(this.sector,L({},t,{fill:{color:e.color,opacity:e.opacity},stroke:{opacity:i.opacity,width:i.width,color:i.color}}))},Ap.prototype.highlightVisual=function(){return this.visual.children[0]},Ap.prototype.highlightVisualArgs=function(){var t=this.sector;return{options:this.options,radius:t.radius,innerRadius:t.innerRadius,center:new C.geometry.Point(t.center.x,t.center.y),startAngle:t.startAngle,endAngle:t.angle+t.startAngle,visual:this.visual}},Ap.prototype.tooltipAnchor=function(){var t=this.sector.clone().expand(5),e=t.middle();return{point:t.point(e),align:(t=Ct(e+180),e=Tt(Math.sin(t),f),t=Tt(Math.cos(t),f),{horizontal:Math.abs(e)>wp?A:t<0?k:S,vertical:Math.abs(e)<_p?A:e<0?w:P})}},Ap.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Ap.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,series:this.series,percentage:this.percentage}},Ap),_p=Tt(Ct(30),f),wp=Tt(Ct(60),f);function Ap(t,e,i){xp.call(this,i),this.value=t,this.sector=e}It(K,{color:p,overlay:{gradient:"roundedBevel"},border:{width:.5},labels:{visible:!1,distance:35,font:"12px sans-serif",margin:U(.5),align:u,zIndex:1,position:"outsideEnd"},animation:{type:Do},highlight:{visible:!0,border:{width:1}},visible:!0}),L(K.prototype,ar);var Sp,kp=K,Pp={createLegendItem:function(t,e,i){var o,r,n=this.options.legend||{},s=n.labels||{},a=n.inactiveItems||{},p=a.labels||{};i&&!1!==i.visibleInLegend&&(n=!(r=!1!==i.visible)&&ot(p)||ot(s),s=i.category,n&&(s=n({text:s,series:i.series,dataItem:i.dataItem,percentage:i.percentage,value:t})),a=r?(o={},e.color):(o={color:p.color,font:p.font},(a.markers||{}).color),Pn(s)&&""!==s&&this.legendItems.push({active:r,pointIndex:i.index,text:s,series:i.series,markerColor:a,labels:o}))}},N=((Sp=se)&&(Cp.__proto__=Sp),((Cp.prototype=Object.create(Sp&&Sp.prototype)).constructor=Cp).prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},Cp.prototype.traverseDataPoints=function(t){var e=this.options,i=this.plotArea.options.seriesColors;void 0===i&&(i=[]);for(var o=i.length,r=e.series,n=r.length,s=0;s<n;s++){var a=r[s],p=a.data,h=ps(a),l=h.total,c=h.points,h=h.count,u=360/l,d=void 0;isFinite(u)||(d=360/h);var g=void 0,g=(mt(a.startAngle)?a:e).startAngle;s!==n-1&&"outsideEnd"===a.labels.position&&(a.labels.position=A);for(var f=0;f<c.length;f++){var y,v,m,x,b,_=c[f];_&&(y=_.fields,v=_.value,m=_.visible,x=0!==v?d||v*u:0,b=1!==p.length&&Boolean(y.explode),j(a.color)||(a.color=y.color||i[f%o]),t(_.valueFields.value,new $t(null,0,0,g,x),{owner:this,category:mt(y.category)?y.category:"",index:f,series:a,seriesIx:s,dataItem:p[f],percentage:0!==l?v/l:0,explode:b,visibleInLegend:y.visibleInLegend,visible:m,zIndex:n-s,animationDelay:this.animationDelay(f,s,n)}),!1!==m&&(g+=x))}}},Cp.prototype.evalSegmentOptions=function(t,e,i){var o=i.series;er(t,{value:e,series:o,dataItem:i.dataItem,category:i.category,percentage:i.percentage},{defaults:o._defaults,excluded:["data","content","template","visual","toggle"]})},Cp.prototype.addValue=function(t,e,i){var o=L({},i.series,{index:i.index});this.evalSegmentOptions(o,t,i),this.createLegendItem(t,o,i),!1!==i.visible&&(o=new kp(t,e,o),Object.assign(o,i),this.append(o),this.points.push(o))},Cp.prototype.reflow=function(t){var e=this.options,i=this.points,o=this.seriesConfigs;void 0===o&&(o=[]);var r=i.length,n=t.clone(),s=Math.min(n.width(),n.height()),a=s/2,p=s-.85*s,h=new qt(n.x1,n.y1,n.x1+s,n.y1+s),s=h.center(),n=n.center(),l=e.series.length,c=[],u=[],p=Rt(e.padding,p);this.targetBox=t,p=a-5<p?a-5:p,h.translate(n.x-s.x,n.y-s.y);for(var d=a-p,g=new Ut(d+h.x1+p,d+h.y1+p),f=0;f<r;f++){var y,v=i[f],m=v.sector,x=v.seriesIx;m.radius=d,m.center=g,o.length&&(y=o[x],m.innerRadius=y.innerRadius,m.radius=y.radius),x===l-1&&v.explode&&(m.center=m.clone().setRadius(.15*m.radius).point(m.middle())),v.reflow(h);v=v.label;v&&"outsideEnd"===v.options.position&&x===l-1&&(v.orientation===k?u:c).push(v)}0<c.length&&(c.sort(this.labelComparator(!0)),this.leftLabelsReflow(c)),0<u.length&&(u.sort(this.labelComparator(!1)),this.rightLabelsReflow(u)),this.box=h},Cp.prototype.leftLabelsReflow=function(t){var e=this.distanceBetweenLabels(t);this.distributeLabels(e,t)},Cp.prototype.rightLabelsReflow=function(t){var e=this.distanceBetweenLabels(t);this.distributeLabels(e,t)},Cp.prototype.distanceBetweenLabels=function(t){var e=St(this.points),i=e.sector,o=t.length-1,e=i.radius+e.options.labels.distance,r=[],n=t[0].box,s=Tt(n.y1-(i.center.y-e-n.height()-n.height()/2));r.push(s);for(var a=0;a<o;a++){var p=t[a+1].box,n=t[a].box,s=Tt(p.y1-n.y2);r.push(s)}return s=Tt(i.center.y+e-t[o].box.y2-t[o].box.height()/2),r.push(s),r},Cp.prototype.distributeLabels=function(t,e){for(var i,o,r,n=t.length,s=0;s<n;s++)for(r=-t[s],i=o=s;0<r&&(0<=i||o<n);)r=this._takeDistance(t,s,--i,r),r=this._takeDistance(t,s,++o,r);this.reflowLabels(t,e)},Cp.prototype._takeDistance=function(t,e,i,o){var r=o;return 0<t[i]&&(r-=o=Math.min(t[i],r),t[i]-=o,t[e]+=o),r},Cp.prototype.reflowLabels=function(t,e){var i,o=St(this.points),r=o.sector,n=o.options.labels,s=e.length,a=n.distance,p=r.center.y-(r.radius+a)-e[0].box.height();t[0]+=2;for(var h=0;h<s;h++){var l=e[h],c=l.box;p+=t[h],i=this.hAlignLabel(c.x2,r.clone().expand(a),p,p+c.height(),l.orientation===k),l.orientation===k?(n.align!==u&&(i=r.radius+r.center.x+a),l.reflow(new qt(i+c.width(),p,i,p))):(n.align!==u&&(i=r.center.x-r.radius-a),l.reflow(new qt(i-c.width(),p,i,p))),p+=c.height()}},Cp.prototype.createVisual=function(){var t=this.options.connectors,e=this.points,i=e.length;Sp.prototype.createVisual.call(this),this._connectorLines=[];for(var o=0;o<i;o++){var r,n,s,a,p,h,l,c=e[o],u=c.sector,d=c.label,g=u.middle(),f=(c.options.connectors||{}).color||t.color;d&&(r=new C.drawing.Path({stroke:{color:f,width:t.width},animation:{type:"fadeIn",delay:c.animationDelay}}),"outsideEnd"===d.options.position&&(n=d.box,s=u.center,l=u.point(g),a=new Ut(n.x1,n.center().y),f=h=p=void 0,l=u.clone().expand(t.padding).point(g),r.moveTo(l.x,l.y),d.orientation===k?(f=Tp(s,l,a,h=new Ut(n.x1-t.padding,n.center().y)),a=new Ut(h.x-4,h.y),(f=f||a).x=Math.min(f.x,a.x),this.pointInCircle(f,u.center,u.radius+4)||f.x<u.center.x?(p=u.center.x+u.radius+4,c.options.labels.align===Eo||p<a.x?r.lineTo(p,l.y):r.lineTo(l.x+8,l.y),r.lineTo(a.x,h.y)):(f.y=h.y,r.lineTo(f.x,f.y))):(f=Tp(s,l,a,h=new Ut(n.x2+t.padding,n.center().y)),a=new Ut(h.x+4,h.y),(f=f||a).x=Math.max(f.x,a.x),this.pointInCircle(f,u.center,u.radius+4)||f.x>u.center.x?(p=u.center.x-u.radius-4,c.options.labels.align===Eo||p>a.x?r.lineTo(p,l.y):r.lineTo(l.x-8,l.y),r.lineTo(a.x,h.y)):(f.y=h.y,r.lineTo(f.x,f.y))),r.lineTo(h.x,h.y),this._connectorLines.push(r),this.visual.append(r)))}},Cp.prototype.renderVisual=function(){var t,e,i,o;Sp.prototype.renderVisual.call(this),Bt(this.options.series,function(t){return t.autoFit})&&(t=this.targetBox,e=this.box.center(),(i=this.visual.bbox())&&(o=i.bottomRight(),(o=Math.min((e.y-t.y1)/(e.y-i.origin.y),(t.y2-e.y)/(o.y-e.y),(e.x-t.x1)/(e.x-i.origin.x),(t.x2-e.x)/(o.x-e.x)))<1&&this.visual.transform(C.geometry.transform().scale(o,o,[e.x,e.y]))))},Cp.prototype.labelComparator=function(t){var i=t?-1:1;return function(t,e){return((t.parent.sector.middle()+270)%360-(e.parent.sector.middle()+270)%360)*i}},Cp.prototype.hAlignLabel=function(t,e,i,o,r){var n=e.radius,s=e.center,e=s.x,s=s.y,o=Math.min(Math.abs(s-i),Math.abs(s-o));return n<o?t:e+Math.sqrt(n*n-o*o)*(r?1:-1)},Cp.prototype.pointInCircle=function(t,e,i){return Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)<Math.pow(i,2)},Cp.prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value)},Cp.prototype.animationDelay=function(t){return 70*t},Cp.prototype.stackRoot=function(){return this},Cp);function Cp(t,e){Sp.call(this,e),this.plotArea=t,this.chartService=t.chartService,this.points=[],this.legendItems=[],this.render()}function Tp(t,e,i,o){var r,n=(o.x-i.x)*(t.y-i.y)-(o.y-i.y)*(t.x-i.x),i=(o.y-i.y)*(e.x-t.x)-(o.x-i.x)*(e.y-t.y);return 0!=i&&(r=n/i,r=new Ut(t.x+r*(e.x-t.x),t.y+r*(e.y-t.y))),r}It(N,{startAngle:90,connectors:{width:2,color:"#939393",padding:8},inactiveItems:{markers:{},labels:{}}}),L(N.prototype,Pp),N.prototype.isStackRoot=!0;var Mp,Rp,Op=N,Ip=((Rp=As)&&(Bp.__proto__=Rp),((Bp.prototype=Object.create(Rp&&Rp.prototype)).constructor=Bp).prototype.render=function(){this.createPieChart(this.series)},Bp.prototype.createPieChart=function(t){var e=t[0],e=new Op(this,{series:t,padding:e.padding,startAngle:e.startAngle,connectors:e.connectors,legend:this.options.legend});this.appendChart(e)},Bp.prototype.appendChart=function(t,e){Rp.prototype.appendChart.call(this,t,e),yt(this.options.legend.items,t.legendItems)},Bp),Y=((Mp=kp)&&(jp.__proto__=Mp),((jp.prototype=Object.create(Mp&&Mp.prototype)).constructor=jp).prototype.reflowLabel=function(){var t,e=this.options.labels,i=this.label,o=this.sector.clone(),r=o.middle();i&&(t=i.box.height(),e.position===A?(o.radius-=(o.radius-o.innerRadius)/2,r=o.point(r),i.reflow(new qt(r.x,r.y-t/2,r.x,r.y))):Mp.prototype.reflowLabel.call(this))},jp.prototype.createSegment=function(t,e){return oe.current.createRing(t,e)},jp);function jp(){Mp.apply(this,arguments)}function Bp(){Rp.apply(this,arguments)}It(Y,{overlay:{gradient:"roundedGlass"},labels:{position:A},animation:{type:Do}}),L(Y.prototype,ar);var Vp,Lp=Y,W=((Vp=Op)&&(zp.__proto__=Vp),((zp.prototype=Object.create(Vp&&Vp.prototype)).constructor=zp).prototype.addValue=function(t,e,i){var o=L({},i.series,{index:i.index});this.evalSegmentOptions(o,t,i),this.createLegendItem(t,o,i),t&&!1!==i.visible&&(o=new Lp(t,e,o),Object.assign(o,i),this.append(o),this.points.push(o))},zp.prototype.reflow=function(t){for(var e,i=this.options,o=t.clone(),r=Math.min(o.width(),o.height()),o=r/2,r=r-.85*r,n=i.series,s=n.length,r=Rt(i.padding,r),a=o-(r=o-5<r?o-5:r),p=0,h=0;h<s;h++){var l=n[h];0===h&&mt(l.holeSize)&&(e=l.holeSize,a-=l.holeSize),mt(l.size)?a-=l.size:p++,mt(l.margin)&&h!==s-1&&(a-=l.margin)}mt(e)||(a-=e=(o-r)/(s+.75)*.75);var c=e,u=0;this.seriesConfigs=[];for(var d=0;d<s;d++){var g=n[d],f=(c+=u)+Rt(g.size,a/p);this.seriesConfigs.push({innerRadius:c,radius:f}),u=g.margin||0,c=f}Vp.prototype.reflow.call(this,t)},zp.prototype.animationDelay=function(t,e,i){return 50*t+600*(e+1)/(i+1)},zp);function zp(){Vp.apply(this,arguments)}It(W,{startAngle:90,connectors:{width:2,color:"#939393",padding:8}});var Ep,Fp,Dp,Up=W,Hp=((Dp=Ip)&&(qp.__proto__=Dp),((qp.prototype=Object.create(Dp&&Dp.prototype)).constructor=qp).prototype.render=function(){this.createDonutChart(this.series)},qp.prototype.createDonutChart=function(t){var e=t[0],e=new Up(this,{series:t,padding:e.padding,connectors:e.connectors,legend:this.options.legend});this.appendChart(e)},qp),G=((Fp=As)&&(Np.__proto__=Fp),((Np.prototype=Object.create(Fp&&Fp.prototype)).constructor=Np).prototype.initFields=function(){this.valueAxisRangeTracker=new Fr},Np.prototype.render=function(){this.addToLegend(this.series),this.createPolarAxis(),this.createCharts(),this.createValueAxis()},Np.prototype.alignAxes=function(){var t=this.valueAxis,e=t.range(),i=t.options.reverse?e.max:e.min,e=t.getSlot(i),i=this.polarAxis.getSlot(0).center,e=t.box.translate(i.x-e.x1,i.y-e.y1);t.reflow(e)},Np.prototype.createValueAxis=function(){var t,e=this.valueAxisRangeTracker,i=e.query(),o=this.valueAxisOptions({roundToMajorUnit:!1,zIndex:-1}),r="log"===o.type?(t=po,{min:.1,max:1}):(t=so,{min:0,max:1}),r=e.query(name)||i||r;r&&i&&(r.min=Math.min(r.min,i.min),r.max=Math.max(r.max,i.max));o=new t(r.min,r.max,o,this.chartService);this.valueAxis=o,this.appendAxis(o)},Np.prototype.reflowAxes=function(){var t=this.options.plotArea,e=this.valueAxis,i=this.polarAxis,o=this.box,r=.15*Math.min(o.width(),o.height()),r=U(t.padding||{},r),o=o.clone().unpad(r),r=o.clone();r.y2=r.y1+Math.min(r.width(),r.height()),r.align(o,m,A);o=r.clone().shrink(0,r.height()/2);i.reflow(r),e.reflow(o);o=e.lineBox().height()-e.box.height();e.reflow(e.box.unpad({top:o})),this.axisBox=r,this.alignAxes(r)},Np.prototype.backgroundBox=function(){return this.box},Np.prototype.detachLabels=function(){},Np),$=((Ep=Rn)&&(Gp.__proto__=Ep),((Gp.prototype=Object.create(Ep&&Ep.prototype)).constructor=Gp).prototype.pointSlot=function(t,e){e=t.center.y-e.y1,e=Ut.onCircle(t.center,t.startAngle,e);return new qt(e.x,e.y,e.x,e.y)},Gp);function Gp(){Ep.apply(this,arguments)}function Np(){Fp.apply(this,arguments)}function qp(){Dp.apply(this,arguments)}It($,{clip:!1});var Xp,Yp=$,K=((Xp=yp)&&(Wp.__proto__=Xp),(Wp.prototype=Object.create(Xp&&Xp.prototype)).constructor=Wp);function Wp(){Xp.apply(this,arguments)}K.prototype.pointSlot=Yp.prototype.pointSlot,It(K,{clip:!1});var Zp,Kp,$p=K,Jp=((Kp=zr)&&(eh.__proto__=Kp),((eh.prototype=Object.create(Kp&&Kp.prototype)).constructor=eh).prototype.fillToAxes=function(t){var e=this._polarAxisCenter();t.lineTo(e.x,e.y)},eh.prototype._polarAxisCenter=function(){return this.parent.plotArea.polarAxis.box.center()},eh.prototype.strokeSegments=function(){var t,e,i,o=this._strokeSegments;return o||(t=this._polarAxisCenter(),e=new uo(!1),(i=this.points()).push(t),(o=this._strokeSegments=e.process(i)).pop()),o},eh),Qp=((Zp=Mr)&&(th.__proto__=Zp),((th.prototype=Object.create(Zp&&Zp.prototype)).constructor=th).prototype.fillToAxes=function(t){var e=this.parent.plotArea.polarAxis.box.center(),e=new C.geometry.Segment([e.x,e.y]);t.segments.unshift(e),t.segments.push(e)},th);function th(){Zp.apply(this,arguments)}function eh(){Kp.apply(this,arguments)}function ih(t,e){return t.value.x-e.value.x}var oh,rh,nh=((rh=$p)&&(ah.__proto__=rh),((ah.prototype=Object.create(rh&&rh.prototype)).constructor=ah).prototype.createSegment=function(t,e,i){return new("smooth"===(e.line||{}).style?Jp:Qp)(t,e,i)},ah.prototype.createMissingValue=function(t,e){var i;return Pn(t.x)&&e!==Lo&&(i={x:t.x,y:t.y},e===Vo&&(i.y=0)),i},ah.prototype.seriesMissingValues=function(t){return t.missingValues||Vo},ah.prototype._hasMissingValuesGap=function(){for(var t=this.options.series,e=0;e<t.length;e++)if("gap"===this.seriesMissingValues(t[e]))return!0},ah.prototype.sortPoints=function(t){if(t.sort(ih),this._hasMissingValuesGap())for(var e=0;e<t.length;e++){var i=t[e];i&&(Pn(i.value.y)||"gap"!==this.seriesMissingValues(i.series)||delete t[e])}return t},ah),N=((oh=G)&&(sh.__proto__=oh),((sh.prototype=Object.create(oh&&oh.prototype)).constructor=sh).prototype.createPolarAxis=function(){var t=new eo(this.options.xAxis,this.chartService);this.polarAxis=t,this.axisX=t,this.appendAxis(t)},sh.prototype.valueAxisOptions=function(t){return L(t,{majorGridLines:{type:d},minorGridLines:{type:d}},this.options.yAxis)},sh.prototype.createValueAxis=function(){oh.prototype.createValueAxis.call(this),this.axisY=this.valueAxis},sh.prototype.appendChart=function(t,e){this.valueAxisRangeTracker.update(t.yAxisRanges),As.prototype.appendChart.call(this,t,e)},sh.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createLineChart(ls(t,["polarLine"]),e),this.createScatterChart(ls(t,["polarScatter"]),e),this.createAreaChart(ls(t,["polarArea"]),e)},sh.prototype.createLineChart=function(t,e){0!==t.length&&(t=new $p(this,{series:t}),this.appendChart(t,e))},sh.prototype.createScatterChart=function(t,e){0!==t.length&&(t=new Yp(this,{series:t}),this.appendChart(t,e))},sh.prototype.createAreaChart=function(t,e){0!==t.length&&(t=new nh(this,{series:t}),this.appendChart(t,e))},sh.prototype._dispatchEvent=function(t,e,i){var o=t._eventCoordinates(e),r=new Ut(o.x,o.y),o=this.axisX.getValue(r),r=this.axisY.getValue(r);null!==o&&null!==r&&t.trigger(i,{element:wt(e),x:o,y:r})},sh.prototype.createCrosshairs=function(){},sh);function sh(){oh.apply(this,arguments)}function ah(){rh.apply(this,arguments)}It(N,{xAxis:{},yAxis:{}}),L(N.prototype,Ss);var ph,Y=N,W=((ph=Tr)&&(hh.__proto__=ph),((hh.prototype=Object.create(ph&&ph.prototype)).constructor=hh).prototype.pointSlot=function(t,e){e=t.center.y-e.y1,e=Ut.onCircle(t.center,t.middle(),e);return new qt(e.x,e.y,e.x,e.y)},hh.prototype.renderSegments=function(){if(ph.prototype.renderSegments.call(this),this._segments&&1<this._segments.length)for(var t=function(t){for(var e=[],i=0;i<t.length;i++){var o=t[i];e[o.seriesIx]=e[o.seriesIx]||[],e[o.seriesIx].push(o)}return e}(this._segments),e=0;e<t.length;e++){var i,o,r,n=t[e];n&&1<n.length&&(i=n[0].linePoints[0],o=St(n),r=St(o.linePoints),o=0===i.categoryIx,r=r.categoryIx===r.categoriesCount-1,o&&r&&St(n).linePoints.push(i))}},hh.prototype.createSegment=function(t,e,i){var o=new("smooth"===e.style?xr:ur)(t,e,i),i=this.seriesMissingValues(e);return t.length!==e.data.length&&i!==Lo||(o.options.closed=!0),o},hh);function hh(){ph.apply(this,arguments)}It(W,{clip:!1,limitPoints:!1});var lh,ch,uh,dh,gh=W,fh=((dh=zr)&&(_h.__proto__=dh),((_h.prototype=Object.create(dh&&dh.prototype)).constructor=_h).prototype.fillToAxes=function(){},_h),yh=((uh=Mr)&&(bh.__proto__=uh),((bh.prototype=Object.create(uh&&uh.prototype)).constructor=bh).prototype.fillToAxes=function(){},bh),vh=((ch=gh)&&(xh.__proto__=ch),((xh.prototype=Object.create(ch&&ch.prototype)).constructor=xh).prototype.createSegment=function(t,e,i,o){var r,n,s,a=this.options.isStacked,p=(e.line||{}).style;return a&&0<i&&o&&(n=o.linePoints.slice(0),r=o),"smooth"===p?(s=new fh(t,e,i,r,n)).options.closed=!0:(t.push(t[0]),s=new yh(t,e,i,r,n)),s},xh.prototype.seriesMissingValues=function(t){return t.missingValues||Vo},xh),$=((lh=Lp)&&(mh.__proto__=lh),(mh.prototype=Object.create(lh&&lh.prototype)).constructor=mh);function mh(t,e){lh.call(this,t,null,e)}function xh(){ch.apply(this,arguments)}function bh(){uh.apply(this,arguments)}function _h(){dh.apply(this,arguments)}It($,{overlay:{gradient:"none"},labels:{distance:10}});var wh,Ah=$,K=((wh=se)&&(Sh.__proto__=wh),((Sh.prototype=Object.create(wh&&wh.prototype)).constructor=Sh).prototype.reflow=function(i){var t=this.options,e=this.children,o=t.gap,r=t.spacing,t=e.length,t=t+o+r*(t-1),n=i.angle/t,s=i.startAngle+o/2*n;this.forEach(e,function(t){var e=i.clone();e.startAngle=s,e.angle=n,t.sector&&(e.radius=t.sector.radius),t.reflow(e),t.sector=e,s+=n+n*r})},Sh);function Sh(t){wh.call(this,t),this.forEach=t.rtl?Kr:Zr}It(K,{gap:1,spacing:0});var kh,Ph,Ch=K,Th=((Ph=se)&&(Rh.__proto__=Ph),((Rh.prototype=Object.create(Ph&&Ph.prototype)).constructor=Rh).prototype.reflow=function(t){var e=this.options.reverse,i=this.children,o=i.length,r=e?o-1:0,n=e?-1:1;this.box=new qt;for(var s=r;0<=s&&s<o;s+=n){var a=i[s].sector;a.startAngle=t.startAngle,a.angle=t.angle}},Rh),N=((kh=an)&&(Mh.__proto__=kh),((Mh.prototype=Object.create(kh&&kh.prototype)).constructor=Mh).prototype.pointType=function(){return Ah},Mh.prototype.clusterType=function(){return Ch},Mh.prototype.stackType=function(){return Th},Mh.prototype.categorySlot=function(t,e){return t.getSlot(e)},Mh.prototype.pointSlot=function(t,e){var i=t.clone(),t=t.center.y;return i.radius=t-e.y1,i.innerRadius=t-e.y2,i},Mh.prototype.reflowPoint=function(t,e){t.sector=e,t.reflow()},Mh.prototype.createAnimation=function(){this.options.animation.center=this.box.toRect().center(),kh.prototype.createAnimation.call(this)},Mh);function Mh(){kh.apply(this,arguments)}function Rh(){Ph.apply(this,arguments)}N.prototype.reflow=sr.prototype.reflow,It(N,{clip:!1,limitPoints:!1,animation:{type:"pie"}});var Oh,Ih=N,W=((Oh=G)&&(jh.__proto__=Oh),((jh.prototype=Object.create(Oh&&Oh.prototype)).constructor=jh).prototype.createPolarAxis=function(){var t=new Qi(this.options.categoryAxis,this.chartService);this.polarAxis=t,this.categoryAxis=t,this.appendAxis(t),this.aggregateCategories(),this.createCategoryAxesLabels()},jh.prototype.valueAxisOptions=function(t){return this._hasBarCharts&&L(t,{majorGridLines:{type:d},minorGridLines:{type:d}}),this._isStacked100&&L(t,{roundToMajorUnit:!1,labels:{format:"P0"}}),L(t,this.options.valueAxis)},jh.prototype.aggregateCategories=function(){ma.prototype.aggregateCategories.call(this,this.panes)},jh.prototype.createCategoryAxesLabels=function(){ma.prototype.createCategoryAxesLabels.call(this,this.panes)},jh.prototype.filterSeries=function(t){return t},jh.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createAreaChart(ls(t,["radarArea"]),e),this.createLineChart(ls(t,["radarLine"]),e),this.createBarChart(ls(t,["radarColumn"]),e)},jh.prototype.chartOptions=function(t){var e={series:t},i=t[0];return i&&(t=this.filterVisibleSeries(t),i=i.stack,e.isStacked=i&&1<t.length,e.isStacked100=i&&"100%"===i.type&&1<t.length,e.isStacked100&&(this._isStacked100=!0)),e},jh.prototype.createAreaChart=function(t,e){0!==t.length&&(t=new vh(this,this.chartOptions(t)),this.appendChart(t,e))},jh.prototype.createLineChart=function(t,e){0!==t.length&&(t=new gh(this,this.chartOptions(t)),this.appendChart(t,e))},jh.prototype.createBarChart=function(t,e){var i;0!==t.length&&(i=t[0],(t=this.chartOptions(t)).gap=i.gap,t.spacing=i.spacing,t=new Ih(this,t),this.appendChart(t,e),this._hasBarCharts=!0)},jh.prototype.seriesCategoryAxis=function(){return this.categoryAxis},jh.prototype._dispatchEvent=function(t,e,i){var o=t._eventCoordinates(e),r=new Ut(o.x,o.y),o=this.categoryAxis.getCategory(r),r=this.valueAxis.getValue(r);null!==o&&null!==r&&t.trigger(i,{element:wt(e),category:o,value:r})},jh.prototype.createCrosshairs=function(){},jh);function jh(){Oh.apply(this,arguments)}L(W.prototype,Ss,{appendChart:ma.prototype.appendChart,aggregateSeries:ma.prototype.aggregateSeries,seriesSourcePoints:ma.prototype.seriesSourcePoints}),It(W,{categoryAxis:{categories:[]},valueAxis:{}});var Bh,$=W,K=((Bh=se)&&(Vh.__proto__=Bh),((Vh.prototype=Object.create(Bh&&Bh.prototype)).constructor=Vh).prototype.reflow=function(t){var e=this.points,i=this.children[0];this.box=new qt(e[0].x,e[0].y,e[1].x,e[2].y),i&&i.reflow(new qt(t.x1,e[0].y,t.x2,e[2].y))},Vh.prototype.createVisual=function(){var t=this,e=this.options;Bh.prototype.createVisual.call(this),(e=e.visual?e.visual({category:this.category,dataItem:this.dataItem,value:this.value,series:this.series,percentage:this.percentage,points:this.points,options:e,sender:this.getSender(),createVisual:function(){return t.createPath()}}):this.createPath())&&this.visual.append(e)},Vh.prototype.createPath=function(){var t=this.options,e=t.border;return C.drawing.Path.fromPoints(this.points,{fill:{color:t.color,opacity:t.opacity},stroke:{color:e.color,opacity:e.opacity,width:e.width}}).close()},Vh.prototype.createHighlight=function(t){return C.drawing.Path.fromPoints(this.points,t)},Vh.prototype.highlightVisual=function(){return this.visual.children[0]},Vh.prototype.highlightVisualArgs=function(){var t=C.drawing.Path.fromPoints(this.points).close();return{options:this.options,path:t}},Vh.prototype.tooltipAnchor=function(){var t=this.box;return{point:new Ut(t.center().x,t.y1),align:{horizontal:"center",vertical:"top"}}},Vh.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Vh);function Vh(t,e,i){Bh.call(this,e),this.value=t,this.options.index=i.index}It(K,{color:p,border:{width:1}}),L(K.prototype,ar);var Lh,zh=K,N=((Lh=se)&&(Eh.__proto__=Lh),((Eh.prototype=Object.create(Lh&&Lh.prototype)).constructor=Eh).prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value)},Eh.prototype.render=function(){var t=this.options,e=this.plotArea.options.seriesColors;void 0===e&&(e=[]);var i=t.series[0],o=i.data;if(o)for(var t=ps(i),r=t.total,n=t.points,s=0;s<n.length;s++){var a,p,h=n[s];h&&(p=h.fields,j(i.color)||(i.color=p.color||e[s%e.length]),p=L({index:s,owner:this,series:i,dataItem:o[s],percentage:h.value/r},p,{visible:h.visible}),a=h.valueFields.value,h=this.createSegment(a,p),p=this.createLabel(a,p),h&&p&&h.append(p))}},Eh.prototype.evalSegmentOptions=function(t,e,i){var o=i.series;er(t,{value:e,series:o,dataItem:i.dataItem,index:i.index},{defaults:o._defaults,excluded:["data","content","template","toggle","visual"]})},Eh.prototype.createSegment=function(t,e){var i=L({},e.series);if(this.evalSegmentOptions(i,t,e),this.createLegendItem(t,i,e),!1!==e.visible){i=new zh(t,i,e);return Object.assign(i,e),this.append(i),this.points.push(i),i}},Eh.prototype.createLabel=function(t,e){var i=e.series,o=e.dataItem,r=L({},this.options.labels,i.labels),n=t;if(r.visible){var s=ot(r),o={dataItem:o,value:t,percentage:e.percentage,category:e.category,series:i};s?n=s(o):r.format&&(n=this.plotArea.chartService.format.auto(r.format,n)),r.color||(s=new C.Color(i.color).percBrightness(),r.color=180<s?a:p,r.background||(r.background=i.color)),this.evalSegmentOptions(r,t,e);o=new Ce(n,L({vAlign:r.position},r),o);return this.labels.push(o),o}},Eh.prototype.labelPadding=function(){for(var t=this.labels,e={left:0,right:0},i=0;i<t.length;i++){var o,r=t[i].options.align;r!==A&&(o=t[i].box.width(),r===S?e.left=Math.max(e.left,o):e.right=Math.max(e.right,o))}return e},Eh.prototype.dynamicSlopeReflow=function(t,e,i){for(var o=this.options,r=this.points,n=r.length,s=r[0],a=s,p=0;p<r.length;p++)r[p].percentage>a.percentage&&(a=r[p]);for(var h=s.percentage/a.percentage*e,l=(e-h)/2,c=0,u=0;u<n;u++){var d=r[u].percentage,g=r[u+1],f=g?g.percentage:d,y=r[u].points=[],v=o.dynamicHeight?i*d:i/n,g=kt(d?(e-h*(f/d))/2:f?0:e/2,0,e);y.push(new C.geometry.Point(t.x1+l,t.y1+c)),y.push(new C.geometry.Point(t.x1+e-l,t.y1+c)),y.push(new C.geometry.Point(t.x1+e-g,t.y1+v+c)),y.push(new C.geometry.Point(t.x1+g,t.y1+v+c)),l=g,c+=v+o.segmentSpacing,h=kt(e-2*g,0,e)}},Eh.prototype.constantSlopeReflow=function(t,e,i){for(var o=this.options,r=this.points,n=r.length,s=o.neckRatio<=1,a=s?o.neckRatio*e:e,p=s?0:(e-e/o.neckRatio)/2,h=((s?e:e-2*p)-a)/2,l=0,c=0;c<n;c++){var u=r[c].points=[],d=r[c].percentage,g=o.dynamicHeight?h*d:h/n,d=o.dynamicHeight?i*d:i/n;u.push(new C.geometry.Point(t.x1+p,t.y1+l)),u.push(new C.geometry.Point(t.x1+e-p,t.y1+l)),u.push(new C.geometry.Point(t.x1+e-p-g,t.y1+d+l)),u.push(new C.geometry.Point(t.x1+p+g,t.y1+d+l)),p+=g,l+=d+o.segmentSpacing}},Eh.prototype.reflow=function(t){var e=this.points,i=e.length;if(i){var o=this.options,r=t.clone().unpad(this.labelPadding()),n=r.height()-o.segmentSpacing*(i-1),s=r.width();o.dynamicSlope?this.dynamicSlopeReflow(r,s,n):this.constantSlopeReflow(r,s,n);for(var a=0;a<i;a++)e[a].reflow(t)}},Eh);function Eh(t,e){Lh.call(this,e),this.plotArea=t,this.points=[],this.labels=[],this.legendItems=[],this.render()}It(N,{neckRatio:.3,width:300,dynamicSlope:!1,dynamicHeight:!0,segmentSpacing:0,labels:{visible:!1,align:A,position:A,zIndex:1}}),L(N.prototype,Pp);var Fh,Dh=N,G=((Fh=As)&&(Uh.__proto__=Fh),((Uh.prototype=Object.create(Fh&&Fh.prototype)).constructor=Uh).prototype.render=function(){this.createFunnelChart(this.series)},Uh.prototype.createFunnelChart=function(t){var e=t[0],e=new Dh(this,{series:t,legend:this.options.legend,neckRatio:e.neckRatio,dynamicHeight:e.dynamicHeight,dynamicSlope:e.dynamicSlope,segmentSpacing:e.segmentSpacing,highlight:e.highlight});this.appendChart(e)},Uh.prototype.appendChart=function(t,e){Fh.prototype.appendChart.call(this,t,e),yt(this.options.legend.items,t.legendItems)},Uh),W="color",K="first",N="max";function Uh(){Fh.apply(this,arguments)}Xa.current.register(ma,[zo,Eo,Fo,Uo,"area","verticalArea","candlestick","ohlc","bullet","verticalBullet","boxPlot","verticalBoxPlot","rangeColumn","rangeBar","waterfall","horizontalWaterfall","rangeArea","verticalRangeArea"]),Xa.current.register(bp,["scatter","scatterLine","bubble"]),Xa.current.register(Ip,[Do]),Xa.current.register(Hp,["donut"]),Xa.current.register(G,["funnel"]),Xa.current.register(Y,["polarArea","polarLine","polarScatter"]),Xa.current.register($,["radarArea","radarColumn","radarLine"]),Ro.current.register([zo,Eo,Fo,Uo,"area","verticalArea"],[h],["category",W,"noteText","errorLow","errorHigh"]),Ro.current.register(["rangeColumn","rangeBar","rangeArea","verticalRangeArea"],["from","to"],["category",W,"noteText"]),Ro.current.register(["waterfall","horizontalWaterfall"],[h],["category",W,"noteText","summary"]),Ro.current.register(["polarArea","polarLine","polarScatter"],[v,m],[W]),Ro.current.register(["radarArea","radarColumn","radarLine"],[h],[W]),Ro.current.register(["funnel"],[h],["category",W,"visibleInLegend","visible"]),Os.current.register([zo,Eo,Fo,Uo,"area","verticalArea","waterfall","horizontalWaterfall"],{value:N,color:K,noteText:K,errorLow:"min",errorHigh:N}),Os.current.register(["rangeColumn","rangeBar","rangeArea","verticalRangeArea"],{from:"min",to:N,color:K,noteText:K}),Os.current.register(["radarArea","radarColumn","radarLine"],{value:N,color:K}),Ro.current.register(["scatter","scatterLine","bubble"],[v,m],[W,"noteText","xErrorLow","xErrorHigh","yErrorLow","yErrorHigh"]),Ro.current.register(["bubble"],[v,m,"size"],[W,"category","noteText"]),Ro.current.register(["candlestick","ohlc"],["open","high","low","close"],["category",W,"downColor","noteText"]),Os.current.register(["candlestick","ohlc"],{open:N,high:N,low:"min",close:N,color:K,downColor:K,noteText:K}),Ro.current.register(["boxPlot","verticalBoxPlot"],["lower","q1","median","q3","upper","mean","outliers"],["category",W,"noteText"]),Os.current.register(["boxPlot","verticalBoxPlot"],{lower:N,q1:N,median:N,q3:N,upper:N,mean:N,outliers:K,color:K,noteText:K}),Ro.current.register(["bullet","verticalBullet"],["current","target"],["category",W,"visibleInLegend","noteText"]),Os.current.register(["bullet","verticalBullet"],{current:N,target:N,color:K,noteText:K}),Ro.current.register([Do,"donut"],[h],["category",W,"explode","visibleInLegend","visible"]);var Hh,Gh=["category",h,v,m],K=((Hh=C.Class)&&(Nh.__proto__=Hh),((Nh.prototype=Object.create(Hh&&Hh.prototype)).constructor=Nh).prototype._initElement=function(t){for(this._setElementClass(t),t.style.position="relative";t.firstChild;)t.removeChild(t.firstChild);this.element=t},Nh.prototype._setElementClass=function(t){n(t,"k-chart")},Nh.prototype._initTheme=function(t,e){for(var i=[],o=t.series||[],r=0;r<o.length;r++)i.push(Object.assign({},o[r]));t.series=i,function(t){for(var e=Gh,i=0;i<e.length;i++){var o=e[i]+"Axes";t[o]&&(t[e[i]+"Axis"]=t[o],delete t[o])}}(t),this.applyDefaults(t,e),null===t.seriesColors&&delete t.seriesColors,this.options=L({},e,t),this.applySeriesColors()},Nh.prototype.getSize=function(){var t=this.options.chartArea||{};return{width:t.width?parseInt(t.width,10):Math.floor(this.element.offsetWidth),height:t.height?parseInt(t.height,10):Math.floor(this.element.offsetHeight)}},Nh.prototype.resize=function(t){var e=this.getSize(),i=this._size,o=0<e.width||0<e.height;t||o&&(!i||e.width!==i.width||e.height!==i.height)?(this._size=e,this._resize(e,t),this.trigger("resize",e)):o&&this._selections&&Bt(this._selections,function(t){return!t.visible})&&(this._destroySelections(),this._setupSelection())},Nh.prototype._resize=function(){this._noTransitionsRedraw()},Nh.prototype.redraw=function(t){var e;this.applyDefaults(this.options),this.applySeriesColors(),t?(t=(e=this._model._plotArea).findPane(t),e.redraw(t)):this._redraw()},Nh.prototype.getAxis=function(t){return vo(t,this._plotArea.axes)},Nh.prototype.findAxisByName=function(t){return this.getAxis(t)},Nh.prototype.findPaneByName=function(t){for(var e=this._plotArea.panes,i=0;i<e.length;i++)if(e[i].options.name===t)return new xo(e[i])},Nh.prototype.findPaneByIndex=function(t){var e=this._plotArea.panes;if(e[t])return new xo(e[t])},Nh.prototype.plotArea=function(){return new bo(this._plotArea)},Nh.prototype.toggleHighlight=function(t,e){var i,o=this._plotArea,r=(o.srcSeries||o.series||[])[0],n=j(e)?o.filterPoints(e):(z(e)?(n=e.series,i=e.category):n=i=e,"donut"===r.type?qh(o.pointsBySeriesName(n),i):r.type===Do||"funnel"===r.type?qh((o.charts[0]||{}).points,i):o.pointsBySeriesName(n));n&&this.togglePointsHighlight(t,n)},Nh.prototype.togglePointsHighlight=function(t,e){for(var i=this._highlight,o=0;o<e.length;o++)i.togglePointHighlight(e[o],t)},Nh.prototype.showTooltip=function(t){var e,i,o=this._sharedTooltip(),r=this._tooltip,n=this._plotArea;j(t)?(e=n.findPoint(t))&&o&&(i=e.categoryIx):o&&mt(t)&&(i=n.categoryAxis.categoryIndex(t)),o?0<=i&&(i=this._plotArea.pointsByCategoryIndex(i),r.showAt(i)):e&&r.show(e)},Nh.prototype.hideTooltip=function(){this._tooltip.hide()},Nh.prototype._initSurface=function(){var t=this.surface,e=this._surfaceWrap(),i=this.options.chartArea||{};i.width&&_t(e,{width:i.width}),i.height&&_t(e,{height:i.height}),t&&t.options.type===this.options.renderAs?(this.surface.clear(),this.surface.resize()):(this._destroySurface(),this.surface=C.drawing.Surface.create(e,{type:this.options.renderAs}),this.surface.bind("mouseenter",this._surfaceMouseenterHandler),this.surface.bind("mouseleave",this._surfaceMouseleaveHandler))},Nh.prototype._surfaceWrap=function(){return this.element},Nh.prototype._redraw=function(){var t=this._getModel();this._size={width:t.options.width,height:t.options.height},this._destroyView(),this._model=t,this._plotArea=t._plotArea,t.renderVisual(),!1!==this.options.transitions&&t.traverse(function(t){t.animation&&t.animation.setup()}),this._initSurface(),this.surface.draw(t.visual),!1!==this.options.transitions&&t.traverse(function(t){t.animation&&t.animation.play()}),this._tooltip=this._createTooltip(),this._highlight=new _a,this._setupSelection(),this._createPannable(),this._createZoomSelection(),this._createMousewheelZoom(),this.trigger("render"),Kh(this._plotArea.panes),this._navState||this._cancelDomEvents()},Nh.prototype.exportVisual=function(t){var e,i;return t&&(t.width||t.height||t.options)?(e=this.options,i=L({},t.options,{chartArea:{width:t.width,height:t.height}}),Zh(this._originalOptions,i),this.options=L({},this._originalOptions,i),this._initTheme(this.options,this._theme),this.bindCategories(),(i=this._getModel()).renderVisual(),Kh(i._plotArea.panes),i=i.visual,this.options=e):i=this.surface.exportVisual(),i},Nh.prototype._sharedTooltip=function(){return this._plotArea instanceof ma&&this.options.tooltip&&this.options.tooltip.shared},Nh.prototype._createPannable=function(){var t=this.options;!1!==t.pannable&&(this._pannable=new Ta(this._plotArea,t.pannable))},Nh.prototype._createZoomSelection=function(){var t=this.options.zoomable,e=(t||{}).selection;!1!==t&&!1!==e&&(this._zoomSelection=new Ba(this,e))},Nh.prototype._createMousewheelZoom=function(){var t=this.options.zoomable,e=(t||{}).mousewheel;!1!==t&&!1!==e&&(this._mousewheelZoom=new Va(this,e))},Nh.prototype._toggleDragZoomEvents=function(){var t=this.options.pannable,e=this.options.zoomable,i=(e||{}).mousewheel,t=!(t||!1!==e&&!1!==(e||{}).selection||this.requiresHandlers(["dragStart",Go,No])),e=(!1===e||!1===i)&&!this.requiresHandlers(["zoomStart",qo,Xo]),i=this.element;this._dragZoomEnabled&&t&&e?(i.style.touchAction=this._touchAction||"",this._dragZoomEnabled=!1):this._dragZoomEnabled||t&&e||(i.style.touchAction="none",this._dragZoomEnabled=!0),this._toggleDomEvents(!t,!e)},Nh.prototype._toggleDomEvents=function(t,e){var i=this.domEvents;i&&(i.toggleDrag&&i.toggleDrag(t),i.toggleZoom&&i.toggleZoom(e))},Nh.prototype._createTooltip=function(){var t=this.options.tooltip;return this._sharedTooltip()?this._createSharedTooltip(t):new tp(this.chartService,t)},Nh.prototype._createSharedTooltip=function(t){return new rp(this._plotArea,t)},Nh.prototype.applyDefaults=function(t,a){!function(t){var i,o,e,r=(a||{}).axisDefaults||{};function n(t){var e=(t||{}).color||o.color,t=L({},r,r[i],o,o[i],{line:{color:e},labels:{color:e},title:{color:e}},t);return delete t[i],t}for(var s=0;s<Gh.length;s++)i=Gh[s]+"Axis",o=t.axisDefaults||{},e=(e=[].concat(t[i])).map(n),t[i]=1<e.length?e:e[0]}(t),function(t,e){var i=t.series,o=i.length,r=t.seriesDefaults,n=L({},t.seriesDefaults),s=e?L({},e.seriesDefaults):{},a=L({},s);Xh(n),Xh(a);for(var p=0;p<o;p++){var h=i[p].type||t.seriesDefaults.type,h=L({data:[]},a,s[h],{tooltip:t.tooltip},n,r[h]);i[p]._defaults=h,i[p]=L({},h,i[p]),i[p].data=i[p].data||[]}}(t,a)},Nh.prototype.applySeriesColors=function(){for(var t=this.options,e=t.series,i=t.seriesColors||[],o=0;o<e.length;o++){var r=e[o],n=i[o%i.length],s=r._defaults;r.color=r.color||n,s&&(s.color=s.color||n)}},Nh.prototype._getModel=function(){var t=this.options,e=this._createPlotArea(),i=new ye(this._modelOptions());return i.chart=this,i._plotArea=e,Oe.buildTitle(t.title,i),t.legend&&t.legend.visible&&i.append(new Na(e.options.legend,this.chartService)),i.append(e),i.reflow(),i},Nh.prototype._modelOptions=function(){var t=this.options,e=this.getSize();return L({transitions:t.transitions,width:e.width||600,height:e.height||400},t.chartArea)},Nh.prototype._createPlotArea=function(t){var e=this.options;return Xa.current.create(t?[]:e.series,e,this.chartService)},Nh.prototype._setupSelection=function(){for(var t=this._plotArea.axes,e=this._selections=[],i=0;i<t.length;i++){var o,r=t[i],n=r.options;r instanceof Ai&&n.select&&!n.vertical&&(o=r.range(),n=new Qa(this,r,L({min:o.min,max:o.max},n.select)),e.push(n))}},Nh.prototype._selectStart=function(t){return this.trigger("selectStart",t)},Nh.prototype._select=function(t){return this.trigger("select",t)},Nh.prototype._selectEnd=function(t){return this.trigger("selectEnd",t)},Nh.prototype._initHandlers=function(){this._clickHandler=this._click.bind(this),this._mousewheelHandler=this._mousewheel.bind(this),this._mouseleaveHandler=this._mouseleave.bind(this),this._surfaceMouseenterHandler=this._mouseover.bind(this),this._surfaceMouseleaveHandler=this._mouseout.bind(this),this._mousemove=Object(C.throttle)(this._mousemove.bind(this),20)},Nh.prototype.addObserver=function(t){t&&this.observers.push(t)},Nh.prototype.removeObserver=function(t){t=this.observers.indexOf(t);0<=t&&this.observers.splice(t,1)},Nh.prototype.requiresHandlers=function(t){for(var e=this.observers,i=0;i<e.length;i++)if(e[i].requiresHandlers(t))return!0},Nh.prototype.trigger=function(t,e){void 0===e&&(e={}),"showTooltip"===t&&(e.anchor.point=this._toDocumentCoordinates(e.anchor.point));for(var i=(e.sender=this).observers,o=!1,r=0;r<i.length;r++)i[r].trigger(t,e)&&(o=!0);return o},Nh.prototype._attachEvents=function(){var t,e=this.element;this._touchAction=e.style.touchAction,vt(e,((t={}).contextmenu=this._clickHandler,t[Yo]=this._mousewheelHandler,t.mouseleave=this._mouseleaveHandler,t)),this._shouldAttachMouseMove()&&vt(e,((e={}).mousemove=this._mousemove,e)),this.domEvents=tt.create(this.element,{start:this._start.bind(this),move:this._move.bind(this),end:this._end.bind(this),tap:this._tap.bind(this),gesturestart:this._gesturestart.bind(this),gesturechange:this._gesturechange.bind(this),gestureend:this._gestureend.bind(this)}),this._toggleDragZoomEvents()},Nh.prototype._mouseleave=function(t){this._hoveredPoint&&(this._hoveredPoint.out(this,t),this._hoveredPoint=null),this._plotArea.hovered&&(this.trigger("plotAreaLeave"),this._plotArea.hovered=!1)},Nh.prototype._cancelDomEvents=function(){this.domEvents&&this.domEvents.cancel&&this.domEvents.cancel()},Nh.prototype._gesturestart=function(t){this._mousewheelZoom&&!this._stopChartHandlers(t)&&(this._gestureDistance=t.distance,this._unsetActivePoint(),this.surface.suspendTracking())},Nh.prototype._gestureend=function(t){this._zooming&&!this._stopChartHandlers(t)&&(this.surface&&this.surface.resumeTracking(),this._zooming=!1,this.trigger(Xo,{}))},Nh.prototype._gesturechange=function(t){var e,i=this._mousewheelZoom;i&&!this._stopChartHandlers(t)&&(t.preventDefault(),e=this._gestureDistance,e=-t.distance/e+1,.1<=Math.abs(e)&&(e=Math.round(10*e),this._gestureDistance=t.distance,t={delta:e,axisRanges:Yh(this._plotArea.axes),originalEvent:t},!this._zooming&&this.trigger("zoomStart",t)||(this._zooming||(this._zooming=!0),(t.axisRanges=i.updateRanges(e))&&!this.trigger(qo,t)&&i.zoom())))},Nh.prototype._mouseout=function(t){var e;!t.element||(e=this._drawingChartElement(t.element,t))&&e.leave&&e.leave(this,t.originalEvent)},Nh.prototype._start=function(t){var e=this._eventCoordinates(t);!this._stopChartHandlers(t)&&this._plotArea.backgroundContainsPoint(e)&&(this.requiresHandlers(["dragStart",Go,No])&&this._startNavigation(t,e,"dragStart"),this._pannable&&this._pannable.start(t)&&(this.surface.suspendTracking(),this._unsetActivePoint(),this._suppressHover=!0,this.chartService.panning=!0),this._zoomSelection&&this._zoomSelection.start(t)&&this.trigger("zoomStart",{axisRanges:Yh(this._plotArea.axes),originalEvent:t}))},Nh.prototype._move=function(t){var e=this._navState,i=this._pannable;if(!this._stopChartHandlers(t)){if(i){var o=i.move(t);o&&!this.trigger(Go,{axisRanges:o,originalEvent:t})&&i.pan()}else if(e){for(var r={},n=e.axes,s=0;s<n.length;s++){var a,p=n[s];!p.options.name||0!=(a=(a=p.options.vertical?t.y:t.x).startLocation-a.location)&&(r[p.options.name]=p.translateRange(a))}e.axisRanges=r,this.trigger(Go,{axisRanges:r,originalEvent:t})}this._zoomSelection&&this._zoomSelection.move(t)}},Nh.prototype._end=function(t){var e,i;this._stopChartHandlers(t)||((e=this._pannable)&&e.end(t)?(this.surface.resumeTracking(),this.trigger(No,{axisRanges:Yh(this._plotArea.axes),originalEvent:t}),this._suppressHover=!1,this.chartService.panning=!1):this._endNavigation(t,No),this._zoomSelection&&(i=this._zoomSelection.end(t))&&!this.trigger(qo,{axisRanges:i,originalEvent:t})&&(this._zoomSelection.zoom(),this.trigger(Xo,{axisRanges:i,originalEvent:t})))},Nh.prototype._stopChartHandlers=function(t){var e=this._selections||[];if(!e.length)return!1;var t=this._eventCoordinates(t),i=this._plotArea.paneByPoint(t);if(i)for(var o=0;o<e.length;o++)if(e[o].onPane(i))return!0},Nh.prototype._mousewheel=function(t){var e=this,i=gt(t),o=this._mousewheelZoom,r=this._eventCoordinates(t);if(!this._stopChartHandlers(t)&&this._plotArea.backgroundContainsPoint(r))if(o){var n={delta:i,axisRanges:Yh(this._plotArea.axes),originalEvent:t};!this._zooming&&this.trigger("zoomStart",n)||(t.preventDefault(),this._zooming||(this._unsetActivePoint(),this.surface.suspendTracking(),this._zooming=!0),this._mwTimeout&&clearTimeout(this._mwTimeout),n.axisRanges=o.updateRanges(i),n.axisRanges&&!this.trigger(qo,n)&&o.zoom(),this._mwTimeout=setTimeout(function(){e.trigger(Xo,n),e._zooming=!1,e.surface&&e.surface.resumeTracking()},150))}else{o=this._navState;if(o||this._startNavigation(t,r,"zoomStart")||(o=this._navState),o){var s=o.totalDelta||i;o.totalDelta=s+i;for(var a=this._navState.axes,p={},h=0;h<a.length;h++){var l=a[h],c=l.options.name;c&&(p[c]=l.scaleRange(-s))}this.trigger(qo,{delta:i,axisRanges:p,originalEvent:t}),this._mwTimeout&&clearTimeout(this._mwTimeout),this._mwTimeout=setTimeout(function(){e._endNavigation(t,Xo)},150)}}},Nh.prototype._startNavigation=function(t,e,i){var o=this._model._plotArea,r=o.findPointPane(e),e=o.axes.slice(0);r&&(o=Yh(e),this.trigger(i,{axisRanges:o,originalEvent:t})?this._cancelDomEvents():(this._suppressHover=!0,this._unsetActivePoint(),this._navState={axisRanges:o,pane:r,axes:e}))},Nh.prototype._endNavigation=function(t,e){this._navState&&(this.trigger(e,{axisRanges:this._navState.axisRanges,originalEvent:t}),this._suppressHover=!1,this._navState=null)},Nh.prototype._getChartElement=function(t,e){var i=this.surface.eventTarget(t);if(i)return this._drawingChartElement(i,t,e)},Nh.prototype._drawingChartElement=function(t,e,i){for(var o,r=t;r&&!o;)o=r.chartElement,r=r.parent;if(o)return o.aliasFor&&(o=o.aliasFor(e,this._eventCoordinates(e))),i&&(o=o.closest(i))&&o.aliasFor&&(o=o.aliasFor()),o},Nh.prototype._eventCoordinates=function(t){t=At(t);return this._toModelCoordinates(t.x,t.y)},Nh.prototype._elementPadding=function(){var t,e;return this._padding||(t=(e=D(this.element,["paddingLeft","paddingTop"])).paddingLeft,e=e.paddingTop,this._padding={top:e,left:t}),this._padding},Nh.prototype._toDocumentCoordinates=function(t){var e=this._elementPadding(),i=bt(this.element);return{left:Tt(t.x+e.left+i.left),top:Tt(t.y+e.top+i.top)}},Nh.prototype._toModelCoordinates=function(t,e){var i=this.element,o=bt(i),r=this._elementPadding(),i=Et(i).invert(),i=new C.geometry.Point(t-o.left-r.left,e-o.top-r.top).transform(i);return new Ut(i.x,i.y)},Nh.prototype._tap=function(t){var e=this,i=this.surface.eventTarget(t),o=this._drawingChartElement(i,t),r=this._sharedTooltip();this._startHover(i,t)||r||this._unsetActivePoint(),r&&this._trackSharedTooltip(this._eventCoordinates(t),t,!0),this._propagateClick(o,t),this.handlingTap=!0,setTimeout(function(){e.handlingTap=!1},0)},Nh.prototype._click=function(t){var e=this._getChartElement(t);this._propagateClick(e,t)},Nh.prototype._propagateClick=function(t,e){for(var i=t;i;)i.click&&i.click(this,e),i=i.parent},Nh.prototype._startHover=function(t,e){if(this._suppressHover)return!1;var i=this._drawingChartElement(t,e,function(t){return(t.hover||t.over)&&!(t instanceof As)}),o=this._activePoint,r=1<this._plotArea.series.length,t=this._hasInactiveOpacity();return this._updateHoveredPoint(i,e),i&&o!==i&&i.hover?(this._activePoint=i,this._sharedTooltip()||i.hover(this,e)||(this._displayTooltip(i),t?this._displayInactiveOpacity(i,r):this._highlight.show(i))):!i&&t&&(r&&this._activеChartInstance&&(this._updateSeriesOpacity(i,!0),this._applySeriesOpacity(this._activеChartInstance.children,null,!0),this._activеChartInstance=null),this._highlight&&this._highlight.hide(),this._activePoint=null),i},Nh.prototype._displayTooltip=function(t){L({},this.options.tooltip,t.options.tooltip).visible&&this._tooltip.show(t)},Nh.prototype._displayInactiveOpacity=function(t,e,i){var o=this._activеChartInstance=this._chartInstanceFromPoint(t);e?(this._updateSeriesOpacity(t),this._applySeriesOpacity(o.children,null,!0),this._applySeriesOpacity(o.children,t.series),this._highlight.show(i||t)):o.supportsPointInactiveOpacity()?(o=this._getInactivePoints(t,o))&&o.length&&this._highlight.show(o,1-this._getInactiveOpacityForSeries(t.series)):this._highlight.show(t)},Nh.prototype._getInactivePoints=function(e,t){return this._getAllPointsOfType(t,e.constructor).filter(function(t){return t!==e})},Nh.prototype._getAllPointsOfType=function(t,e){for(var i=[],o=0;o<t.children.length;o++){var r=t.children[o];r.constructor===e?i.push(r):r.children&&r.children.length&&(i=i.concat(this._getAllPointsOfType(r,e)))}return i},Nh.prototype._updateHoveredPoint=function(t,e){var i=this._hoveredPoint;i&&i!==t&&(i.out(this,e),this._hoveredPoint=null),t&&i!==t&&t.over&&(this._hoveredPoint=t).over(this,e)},Nh.prototype._updateSeriesOpacity=function(t,e){for(var i=this._plotArea,o=i.series.length,r=0;r<o;r++){var n=i.series[r],s=this._getDefaultOpacityForSeries(n),a=this._getInactiveOpacityForSeries(n);e||n===t.series?(n.opacity=s,n.line&&(n.line.opacity=s)):(n.defaultOpacity=s,n.opacity=a,n.line&&(n.line.opacity=a))}},Nh.prototype._applySeriesOpacity=function(t,e,i,o){for(var r=0;r<t.length;r++){var n,s=t[r],a=s.series||o;a&&s.visual&&(n=(o||s.series).opacity,a===e&&!i||s.visual.opacity(i?1:n)),s.children&&s.children.length&&this._applySeriesOpacity(s.children,e,i,s.series)}},Nh.prototype._chartInstanceFromPoint=function(t){for(var e=t.parent;e&&!e.plotArea;)e=e.parent;return e},Nh.prototype._hasInactiveOpacity=function(){var t=void 0!==this.options.seriesDefaults.highlight.inactiveOpacity,e=0<this.options.series.filter(function(t){return void 0!==t.highlight.inactiveOpacity}).length;return t||e},Nh.prototype._getInactiveOpacityForSeries=function(t){var e=this.options.seriesDefaults.highlight.inactiveOpacity;return t.highlight.inactiveOpacity||e||t.opacity||1},Nh.prototype._getDefaultOpacityForSeries=function(t){return t.defaultOpacity||t.opacity||1},Nh.prototype._mouseover=function(t){var t=this._startHover(t.element,t.originalEvent);t&&t.tooltipTracking&&!this._mouseMoveTrackHandler&&!this._sharedTooltip()&&(this._mouseMoveTrackHandler=this._mouseMoveTracking.bind(this),vt(document,((t={}).mousemove=this._mouseMoveTrackHandler,t)))},Nh.prototype._mouseMoveTracking=function(t){var e,i=this.options,o=this._tooltip,r=this._highlight,n=this._activePoint,s=this._eventCoordinates(t);this._plotArea.box.containsPoint(s)?n&&n.tooltipTracking&&n.series&&n.parent.getNearestPoint&&((e=n.parent.getNearestPoint(s.x,s.y,n.seriesIx))&&e!==n&&((this._activePoint=e).hover(this,t)||(L({},i.tooltip,e.options.tooltip).visible&&o.show(e),r.show(e)))):(Mt(document,((e={}).mousemove=this._mouseMoveTrackHandler,e)),this._unsetActivePoint(),this._mouseMoveTrackHandler=null)},Nh.prototype._mousemove=function(t){var e,i=this._eventCoordinates(t),o=this._plotArea;this._trackCrosshairs(i),o.hover&&((e=o.backgroundContainsPoint(i))?(o.hovered=!0,this._plotArea.hover(this,t)):o.hovered&&!e&&(this.trigger("plotAreaLeave"),o.hovered=!1)),this._sharedTooltip()&&this._trackSharedTooltip(i,t)},Nh.prototype._trackCrosshairs=function(t){for(var e=this._plotArea.crosshairs,i=0;i<e.length;i++){var o=e[i];o.box.containsPoint(t)?o.showAt(t):o.hide()}},Nh.prototype._trackSharedTooltip=function(t,e,i){var o,r,n,s,a,p,h;this._suppressHover||(o=this.options.tooltip,h=this._plotArea,p=this._plotArea.categoryAxis,r=this._tooltip,n=this._highlight,h.backgroundContainsPoint(t)?(s=p.pointCategoryIndex(t))!==this._tooltipCategoryIx||!this._sharedHighlight&&i?((h=(p=(a=h.pointsByCategoryIndex(s)).map(function(t){return t.eventArgs(e)}))[0]||{}).categoryPoints=p,0<a.length&&!this.trigger("seriesHover",h)?(o.visible&&r.showAt(a,t),n.show(a),this._sharedHighlight=!0):r.hide(),this._tooltipCategoryIx=s):i&&this._sharedHighlight&&(n.hide(),r.hide(),this._sharedHighlight=!1):this._sharedHighlight&&(n.hide(),r.hide(),this._tooltipCategoryIx=null,this._sharedHighlight=!1))},Nh.prototype.hideElements=function(t){var e=this._plotArea;this._mousemove.cancel(),e.hideCrosshairs(),this._unsetActivePoint(t)},Nh.prototype._unsetActivePoint=function(t){var e=this._tooltip,i=this._highlight;this._activePoint=null,this._hoveredPoint=null,!e||t&&t.keepTooltipOpen||e.hide(),this._tooltipCategoryIx=null,this._sharedHighlight=!1,i&&i.hide()},Nh.prototype._deferRedraw=function(){this._redraw()},Nh.prototype._clearRedrawTimeout=function(){this._redrawTimeout&&(clearInterval(this._redrawTimeout),this._redrawTimeout=null)},Nh.prototype.bindCategories=function(){for(var t=this.options,e=[].concat(t.categoryAxis),i=0;i<e.length;i++){var o=e[i];!1!==o.autoBind&&this.bindCategoryAxisFromSeries(o,i)}},Nh.prototype.bindCategoryAxisFromSeries=function(t,e){for(var i,o,r=this.options.series,n=r.length,s=new ht,a=[],p=!1,h=0;h<n;h++){var l=r[h],c=l.categoryAxis===t.name||!l.categoryAxis&&0===e,u=l.data,d=u.length,c=l.categoryField&&c,p=c||p;if(c&&0<d)for(var g=(i=us(t,ko(l.categoryField,u[0])))?cs:ko,f=0;f<d;f++){var y=u[f],v=g(l.categoryField,y,this.chartService.intl);!i&&s.get(v)||(a.push([v,y]),i||s.set(v,!0))}}0<a.length?(i&&(a=function(t){void 0===t&&(t=ci);for(var e=function(t,e){void 0===e&&(e=ci);for(var i=1,o=t.length;i<o;i++)if(e(t[i],t[i-1])<0){t.sort(e);break}return t}(a,t),i=e.length,o=0<i?[e[0]]:[],r=1;r<i;r++)0!==t(e[r],St(o))&&o.push(e[r]);return o}(function(t,e){return ci(t[0],e[0])})),o=function(t){for(var e=t.length,i=[],o=0;o<e;o++)for(var r=t[o],n=r.length,s=0;s<n;s++)i[s]=i[s]||[],i[s].push(r[s]);return i}(a),t.categories=o[0]):p&&(t.categories=[])},Nh.prototype._isBindable=function(t){for(var e=Ro.current.valueFields(t),i=!0,o=0;o<e.length;o++){var r=e[o];if(r===h?r="field":r+="Field",!mt(t[r])){i=!1;break}}return i},Nh.prototype._noTransitionsRedraw=function(){var t,e=this.options;!1!==e.transitions&&(t=!(e.transitions=!1)),this._redraw(),t&&(e.transitions=!0)},Nh.prototype._legendItemHover=function(e,i){var t=this._plotArea,o=this._highlight,r=(t.srcSeries||t.series)[e],n=lt(r.type,[Do,"donut","funnel"])?t.findPoint(function(t){return t.series.index===e&&t.index===i}):t.pointsBySeriesIndex(e);this._hasInactiveOpacity()&&r.visible&&n?(r=1<t.series.length,t=n.length?n[0]:n,this._displayInactiveOpacity(t,r,n)):o.show(n)},Nh.prototype._shouldAttachMouseMove=function(){return this._plotArea.crosshairs.length||this._tooltip&&this._sharedTooltip()||this.requiresHandlers(["plotAreaHover","plotAreaLeave"])},Nh.prototype.updateMouseMoveHandler=function(){var t;Mt(this.element,((t={}).mousemove=this._mousemove,t)),this._shouldAttachMouseMove()&&vt(this.element,((t={}).mousemove=this._mousemove,t))},Nh.prototype.applyOptions=function(t,e){Zh(this._originalOptions,t),this._originalOptions=L(this._originalOptions,t),this.options=L({},this._originalOptions),e&&(this._theme=e,this.chartService.theme=e),this._initTheme(this.options,this._theme),this._toggleDragZoomEvents()},Nh.prototype.setOptions=function(t,e){this.applyOptions(t,e),this.bindCategories(),this.redraw(),this.updateMouseMoveHandler()},Nh.prototype.setDirection=function(t){this.chartService.rtl=Boolean(t),this.surface&&"svg"===this.surface.type&&this._destroySurface()},Nh.prototype.setIntlService=function(t){this.chartService.intl=t},Nh.prototype.noTransitionsRedraw=function(){this._noTransitionsRedraw()},Nh.prototype.destroy=function(){var t;this._destroyed=!0,Mt(this.element,((t={}).contextmenu=this._clickHandler,t[Yo]=this._mousewheelHandler,t.mousemove=this._mousemove,t.mouseleave=this._mouseleaveHandler,t)),this.domEvents&&(this.domEvents.destroy(),delete this.domEvents),this._mouseMoveTrackHandler&&Mt(document,((t={}).mousemove=this._mouseMoveTrackHandler,t)),this._destroyView(),this._destroySurface(),this._clearRedrawTimeout()},Nh.prototype._destroySurface=function(){var t=this.surface;t&&(t.unbind("mouseenter",this._surfaceMouseenterHandler),t.unbind("mouseleave",this._surfaceMouseleaveHandler),t.destroy(),this.surface=null)},Nh.prototype._destroySelections=function(){var t=this._selections;if(t)for(;0<t.length;)t.shift().destroy()},Nh.prototype._destroyView=function(){var t=this._model;t&&(t.destroy(),this._model=null),this._unsetActivePoint(),this._destroySelections(),this._tooltip&&this._tooltip.destroy(),this._highlight&&this._highlight.destroy(),this._zoomSelection&&(this._zoomSelection.destroy(),delete this._zoomSelection),this._pannable&&(this._pannable.destroy(),delete this._pannable),this._mousewheelZoom&&(this._mousewheelZoom.destroy(),delete this._mousewheelZoom)},Nh);function Nh(t,e,i,o){var r=this;void 0===o&&(o={}),Hh.call(this),this.observers=[],this.addObserver(o.observer),this.chartService=new Q(this,o),this.chartService.theme=i,this._initElement(t);t=L({},this.options,e);this._originalOptions=L({},t),this._theme=i,this._initTheme(t,i),this._initHandlers(),this._initSurface(),this.bindCategories(),Ot.preloadFonts(e,function(){r.fontLoaded=!0,r._destroyed||(r.trigger("init"),r._redraw(),r._attachEvents())})}function qh(t,e){if(t)for(var i=0;i<t.length;i++)if(t[i].category===e)return[t[i]]}function Xh(t){delete t.bar,delete t.column,delete t.rangeColumn,delete t.line,delete t.verticalLine,delete t.pie,delete t.donut,delete t.area,delete t.verticalArea,delete t.scatter,delete t.scatterLine,delete t.bubble,delete t.candlestick,delete t.ohlc,delete t.boxPlot,delete t.bullet,delete t.verticalBullet,delete t.polarArea,delete t.polarLine,delete t.radarArea,delete t.radarLine,delete t.waterfall}function Yh(t){for(var e={},i=0;i<t.length;i++){var o=t[i],r=o.options.name;r&&(e[r]=o.range())}return e}var Wh=["data","categories"];function Zh(t,e){for(var i in e){var o,r,n;!lt(i,Wh)&&e.hasOwnProperty(i)&&(o=e[i],r=t[i],mt(r)&&((n=null===o)||!mt(o)?(delete t[i],n&&delete e[i]):r&&z(o)&&z(r)&&Zh(r,o)))}}function Kh(t){for(var e=0;e<t.length;e++)t[e].notifyRender()}It(K,{renderAs:"",chartArea:{},legend:{visible:!0,labels:{}},categoryAxis:{},seriesDefaults:{type:Eo,data:[],highlight:{visible:!0},labels:{},negativeValues:{visible:!1}},series:[],seriesColors:null,tooltip:{visible:!1},transitions:!0,valueAxis:{},plotArea:{},title:{},xAxis:{},yAxis:{},panes:[{}],pannable:!1,zoomable:!1});var $h,Jh=K,Qh=(($h=rp)&&(el.__proto__=$h),((el.prototype=Object.create($h&&$h.prototype)).constructor=el).prototype._slotAnchor=function(t,e){var i=this.plotArea.categoryAxis.options.vertical,o=i?{horizontal:"left",vertical:"center"}:{horizontal:"center",vertical:"bottom"};return{point:i?new Ut(this.plotArea.box.x2,e.center().y):new Ut(e.center().x,-2),align:o}},el.prototype._defaultAnchor=function(t,e){return this._slotAnchor({},e)},el),tl=[zo,"bullet"];function el(){$h.apply(this,arguments)}function il(t){for(var e=[],i=0;i<t.length;i++){var o=t[i];e[i]=o.style.display,o.style.display="none"}return e}function ol(t,e){for(var i=0;i<t.length;i++)t[i].style.display=e[i]}function rl(t){return R(t)?[t]:t}var nl,W=((nl=Jh)&&(sl.__proto__=nl),((sl.prototype=Object.create(nl&&nl.prototype)).constructor=sl).prototype._setElementClass=function(t){n(t,"k-sparkline")},sl.prototype._initElement=function(t){nl.prototype._initElement.call(this,t),this._initialWidth=Math.floor(_t(t).width)},sl.prototype._resize=function(){var t=this.element,e=il(t.childNodes);this._initialWidth=Math.floor(_t(t).width),ol(t.childNodes,e),nl.prototype._resize.call(this)},sl.prototype._modelOptions=function(){var t=this.options,e=this._surfaceWrap(),i=il(e.childNodes),o=document.createElement("span");o.innerHTML="&nbsp;",e.appendChild(o);t=L({width:this._autoWidth,height:_t(e).height,transitions:t.transitions},t.chartArea,{inline:!0,align:!1});return _t(e,{width:t.width,height:t.height}),e.removeChild(o),ol(e.childNodes,i),this.surface&&this.surface.resize(),t},sl.prototype._surfaceWrap=function(){var t;return this.stage||(t=this.stage=document.createElement("span"),this.element.appendChild(t)),this.stage},sl.prototype._createPlotArea=function(t){t=nl.prototype._createPlotArea.call(this,t);return this._autoWidth=this._initialWidth||this._calculateWidth(t),t},sl.prototype._calculateWidth=function(t){for(var e=this.options,i=U(e.chartArea.margin),o=t.charts,r=this._surfaceWrap(),n=0,s=0;s<o.length;s++){var a=o[s],p=(a.options.series||[])[0];if(p){if(p.type===zo)return 150;if("bullet"===p.type)return 150;if(p.type===Do)return _t(r).height;var h=a.categoryAxis;h&&(a=h.categoriesCount()*(!a.options.isStacked&&lt(p.type,[Eo,"verticalBullet"])?a.seriesOptions.length:1),n=Math.max(n,a))}}e=n*e.pointWidth;return 0<e&&(e+=i.left+i.right),e},sl.prototype._createSharedTooltip=function(t){return new Qh(this._plotArea,t)},sl.normalizeOptions=function(t){t=rl(t);return(t=x(t)?{seriesDefaults:{data:t}}:L({},t)).series||(t.series=[{data:rl(t.data)}]),L(t,{seriesDefaults:{type:t.type}}),(lt(t.series[0].type,tl)||lt(t.seriesDefaults.type,tl))&&(t=L({},{categoryAxis:{crosshair:{visible:!1}}},t)),t},sl);function sl(){nl.apply(this,arguments)}It(W,{chartArea:{margin:2},axisDefaults:{visible:!1,majorGridLines:{visible:!1},valueAxis:{narrowRange:!0}},seriesDefaults:{type:"line",area:{line:{width:.5}},bar:{stack:!0},padding:2,width:.5,overlay:{gradient:null},highlight:{visible:!1},border:{width:0},markers:{size:2,visible:!1}},tooltip:{visible:!0,shared:!0},categoryAxis:{crosshair:{visible:!0,tooltip:{visible:!1}}},legend:{visible:!1},transitions:!1,pointWidth:5,panes:[{clip:!1}]});var al,pl=W,hl=((al=C.drawing.Animation)&&(ll.__proto__=al),((ll.prototype=Object.create(al&&al.prototype)).constructor=ll).prototype.setup=function(){this._initialOpacity=parseFloat(D(this.element,"opacity").opacity)},ll.prototype.step=function(t){D(this.element,{opacity:String(ct(this._initialOpacity,0,t))})},ll.prototype.abort=function(){al.prototype.abort.call(this),D(this.element,{display:"none",opacity:String(this._initialOpacity)})},ll.prototype.cancel=function(){al.prototype.abort.call(this),D(this.element,{opacity:String(this._initialOpacity)})},ll);function ll(){al.apply(this,arguments)}function cl(t,e){var i=document.createElement("div");return i.className=t,e&&(i.style.cssText=e),i}var ul,K=((ul=C.Class)&&(dl.__proto__=ul),((dl.prototype=Object.create(ul&&ul.prototype)).constructor=dl).prototype.createElements=function(){var t=this.element=cl("k-navigator-hint","display: none; position: absolute; top: 1px; left: 1px;"),e=this.tooltip=cl("k-tooltip k-chart-tooltip"),i=this.scroll=cl("k-scroll");e.innerHTML="&nbsp;",t.appendChild(e),t.appendChild(i)},dl.prototype.show=function(t,e,i){var o=this.element,r=this.options,n=this.scroll,s=this.tooltip,a=si(di(t)+di(e-t)/2),p=.4*i.width(),h=i.center().x-p,l=(i.center().x-h)/(r.max-r.min),c=a-r.min,a=this.chartService.intl.format(r.format,t,e),r=ot(r);this.clearHideTimeout(),this._visible||(D(o,{visibility:"hidden",display:"block"}),this._visible=!0),r&&(a=r({from:t,to:e})),s.innerHTML=a,D(s,{left:i.center().x-s.offsetWidth/2,top:i.y1});s=D(s,["marginTop","borderTopWidth","height"]);D(n,{width:p,left:h+c*l,top:i.y1+s.marginTop+s.borderTopWidth+s.height/2}),D(o,{visibility:"visible"})},dl.prototype.clearHideTimeout=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this._hideAnimation&&this._hideAnimation.cancel()},dl.prototype.hide=function(){var t=this;this.clearHideTimeout(),this._hideTimeout=setTimeout(function(){t._visible=!1,t._hideAnimation=new hl(t.element),t._hideAnimation.setup(),t._hideAnimation.play()},this.options.hideDelay)},dl.prototype.destroy=function(){this.clearHideTimeout(),this.container&&this.container.removeChild(this.element),delete this.container,delete this.chartService,delete this.element,delete this.tooltip,delete this.scroll},dl);function dl(t,e,i){ul.call(this),this.options=L({},this.options,i),this.container=t,this.chartService=e;e=D(t,["paddingLeft","paddingTop"]);this.chartPadding={top:e.paddingTop,left:e.paddingLeft},this.createElements(),t.appendChild(this.element)}It(K,{format:"{0:d} - {1:d}",hideDelay:500});var gl=K,fl="_navigator",yl=fl;function vl(){}var ml,xl,bl=((xl=C.Class)&&(wl.__proto__=xl),((wl.prototype=Object.create(xl&&xl.prototype)).constructor=wl).prototype.parseDate=function(t){return mi(this.chart.chartService.intl,t)},wl.prototype.clean=function(){this.selection&&(this.selection.destroy(),this.selection=null),this.hint&&(this.hint.destroy(),this.hint=null)},wl.prototype.destroy=function(){this.chart&&(this.chart.removeObserver(this.chartObserver),delete this.chart),this.clean()},wl.prototype.redraw=function(){this._redrawSelf(),this.initSelection()},wl.prototype.initSelection=function(){var t=this.chart,e=this.options,i=this.mainAxis(),o=i.roundedRange(),r=o.min,n=o.max,s=e.select,a=s.from,p=s.to,o=s.mousewheel,s=(vl.prototype=i,new vl);0!==i.categoriesCount()&&(this.clean(),s.box=i.box,this.selection=new Qa(t,s,{min:r,max:n,from:a||r,to:p||n,mousewheel:Rt(o,{zoom:"left"}),visible:e.visible},new ut(this,{selectStart:"_selectStart",select:"_select",selectEnd:"_selectEnd"})),e.hint.visible&&(this.hint=new gl(t.element,t.chartService,{min:r,max:n,template:ot(e.hint),format:e.hint.format})))},wl.prototype.setRange=function(){var t=this.chart._createPlotArea(!0).namedCategoryAxes[yl].roundedRange(),e=t.min,i=t.max,o=this.options.select||{},t=o.from||e;t<e&&(t=e);e=o.to||i;i<e&&(e=i),this.options.select=L({},o,{from:t,to:e}),this.filterAxes()},wl.prototype._redrawSelf=function(t){var e=this.chart._plotArea;e&&e.redraw(St(e.panes),t)},wl.prototype.redrawSlaves=function(){var t=this.chart,e=t._plotArea,i=e.panes.slice(0,-1);e.srcSeries=t.options.series,e.options.categoryAxis=t.options.categoryAxis,e.clearSeriesPointsCache(),e.redraw(i)},wl.prototype._drag=function(t){var e=this.chart,i=this.selection,o=e._eventCoordinates(t.originalEvent),r=this.mainAxis(),n=r.roundedRange(),o=r.pane.box.containsPoint(o),e=e._plotArea.categoryAxis,t=t.axisRanges[e.options.name],e=this.options.select;t&&!o&&i&&(e=e.from&&e.to?di(e.to)-di(e.from):di(i.options.to)-di(i.options.from),t=si(kt(di(t.min),n.min,di(n.max)-e)),n=si(kt(di(t)+e,di(n.min)+e,n.max)),this.options.select={from:t,to:n},this.options.liveDrag&&(this.filterAxes(),this.redrawSlaves()),i.set(t,n),this.showHint(t,n))},wl.prototype._dragEnd=function(){this.filterAxes(),this.filter(),this.redrawSlaves(),this.hint&&this.hint.hide()},wl.prototype.readSelection=function(){var t=this.selection.options,e=t.from,i=t.to,t=this.options.select;t.from=e,t.to=i},wl.prototype.filterAxes=function(){var t=this.options.select;void 0===t&&(t={});for(var e=this.chart.options.categoryAxis,i=t.from,o=t.to,r=0;r<e.length;r++){var n=e[r];n.pane!==fl&&(n.min=i,n.max=o)}},wl.prototype.filter=function(){var t,e,i=this.chart,o=this.options.select;i.requiresHandlers(["navigatorFilter"])&&(t=this.mainAxis(),e={from:o.from,to:o.to},"category"!==t.options.type&&(i=new ji(L({baseUnit:"fit"},i.options.categoryAxis[0],{categories:[o.from,o.to]}),i.chartService).options,e.from=pi(i.min,-i.baseUnitStep,i.baseUnit),e.to=pi(i.max,i.baseUnitStep,i.baseUnit)),this.chart.trigger("navigatorFilter",e))},wl.prototype._zoom=function(t){var e=this.chart._plotArea.categoryAxis,i=this.selection,o=this.options,r=o.select,n=o.liveDrag,s=this.mainAxis(),a=t.delta;i&&(o=s.categoryIndex(i.options.from),s=s.categoryIndex(i.options.to),t.originalEvent.preventDefault(),1<Math.abs(a)&&(a*=3),1<s-o?(i.expand(a),this.readSelection()):(e.options.min=r.from,r.from=e.scaleRange(-t.delta).min),n&&(this.filterAxes(),this.redrawSlaves()),i.set(r.from,r.to),this.showHint(this.options.select.from,this.options.select.to))},wl.prototype._zoomEnd=function(t){this._dragEnd(t)},wl.prototype.showHint=function(t,e){var i=this.chart._plotArea;this.hint&&this.hint.show(t,e,i.backgroundBox())},wl.prototype._selectStart=function(t){return this.chart._selectStart(t)},wl.prototype._select=function(t){return this.showHint(t.from,t.to),this.chart._select(t)},wl.prototype._selectEnd=function(t){return this.hint&&this.hint.hide(),this.readSelection(),this.filterAxes(),this.filter(),this.redrawSlaves(),this.chart._selectEnd(t)},wl.prototype.mainAxis=function(){var t=this.chart._plotArea;if(t)return t.namedCategoryAxes[yl]},wl.prototype.select=function(t,e){var i=this.options.select;return t&&e&&(i.from=this.parseDate(t),i.to=this.parseDate(e),this.filterAxes(),this.filter(),this.redrawSlaves(),this.selection.set(t,e)),{from:i.from,to:i.to}},wl.setup=function(t,e){var i,o,r;void 0===t&&(t={}),void 0===e&&(e={}),t.__navi||(t.__navi=!0,i=L({},e.navigator,t.navigator),o=t.panes=[].concat(t.panes),r=L({},i.pane,{name:fl}),i.visible||(r.visible=!1,r.height=.1),o.push(r),wl.attachAxes(t,i),wl.attachSeries(t,i,e))},wl.attachAxes=function(t,e){var i=e.series||[],o=t.categoryAxis=[].concat(t.categoryAxis),r=t.valueAxis=[].concat(t.valueAxis),t=0===ls(i,Ho).length,i=L({type:"date",pane:fl,roundToBaseUnit:!t,justified:t,_collapse:!1,majorTicks:{visible:!0},tooltip:{visible:!1},labels:{step:1},autoBind:e.autoBindElements,autoBaseUnitSteps:{minutes:[1],hours:[1,2],days:[1,2],weeks:[],months:[1],years:[1]}}),t=e.categoryAxis;o.push(L({},i,{maxDateGroups:200},t,{name:yl,title:null,baseUnit:"fit",baseUnitStep:"auto",labels:{visible:!1},majorTicks:{visible:!1}}),L({},i,t,{name:yl+"_labels",maxDateGroups:20,baseUnitStep:"auto",labels:{position:""},plotBands:[],autoBaseUnitSteps:{minutes:[]},_overlap:!0}),L({},i,t,{name:yl+"_ticks",maxDateGroups:200,majorTicks:{width:.5},plotBands:[],title:null,labels:{visible:!1,mirror:!0},_overlap:!0})),r.push(L({name:yl,pane:fl,majorGridLines:{visible:!1},visible:!1},e.valueAxis))},wl.attachSeries=function(t,e,i){for(var o=t.series=t.series||[],r=[].concat(e.series||[]),n=i.seriesColors,s=e.seriesDefaults,a=0;a<r.length;a++)o.push(L({color:n[a%n.length],categoryField:e.dateField,visibleInLegend:!1,tooltip:{visible:!1}},s,r[a],{axis:yl,categoryAxis:yl,autoBind:e.autoBindElements}))},wl),W=((ml=Jh)&&(_l.__proto__=ml),((_l.prototype=Object.create(ml&&ml.prototype)).constructor=_l).prototype.applyDefaults=function(t,e){var i=_t(this.element).width||600,e=e,i={seriesDefaults:{categoryField:t.dateField},axisDefaults:{categoryAxis:{name:"default",majorGridLines:{visible:!1},labels:{step:2},majorTicks:{visible:!1},maxDateGroups:Math.floor(i/28)}}},e=e&&L({},e,i);bl.setup(t,e),ml.prototype.applyDefaults.call(this,t,e)},_l.prototype._setElementClass=function(t){n(t,"k-chart k-stockchart")},_l.prototype.setOptions=function(t){this.destroyNavigator(),ml.prototype.setOptions.call(this,t)},_l.prototype.noTransitionsRedraw=function(){var t=this.options.transitions;this.options.transitions=!1,this._fullRedraw(),this.options.transitions=t},_l.prototype._resize=function(){this.noTransitionsRedraw()},_l.prototype._redraw=function(){var t=this.navigator;!this._dirty()&&t&&t.options.partialRedraw?t.redrawSlaves():this._fullRedraw()},_l.prototype._dirty=function(){var t=this.options,e=at([].concat(t.series,t.navigator.series),function(t){return t&&t.visible}).length,t=this._seriesCount!==e;return this._seriesCount=e,t},_l.prototype._fullRedraw=function(){var t=this.navigator;t||(t=this.navigator=new bl(this),this.trigger("navigatorCreated",{navigator:t})),t.clean(),t.setRange(),ml.prototype._redraw.call(this),t.initSelection()},_l.prototype._trackSharedTooltip=function(t){var e=this._plotArea.paneByPoint(t);e&&e.options.name===fl?this._unsetActivePoint():ml.prototype._trackSharedTooltip.call(this,t)},_l.prototype.bindCategories=function(){ml.prototype.bindCategories.call(this),this.copyNavigatorCategories()},_l.prototype.copyNavigatorCategories=function(){for(var t,e=[].concat(this.options.categoryAxis),i=0;i<e.length;i++){var o=e[i];o.name===yl?t=o.categories:t&&o.pane===fl&&(o.categories=t)}},_l.prototype.destroyNavigator=function(){this.navigator&&(this.navigator.destroy(),this.navigator=null)},_l.prototype.destroy=function(){this.destroyNavigator(),ml.prototype.destroy.call(this)},_l.prototype._stopChartHandlers=function(t){var e=this._eventCoordinates(t),e=this._plotArea.paneByPoint(e);return ml.prototype._stopChartHandlers.call(this,t)||e&&e.options.name===fl},_l.prototype._toggleDragZoomEvents=function(){this._dragZoomEnabled||(this.element.style.touchAction="none",this._dragZoomEnabled=!0)},_l);function _l(){ml.apply(this,arguments)}function wl(t){xl.call(this),this.chart=t;var e=this.options=L({},this.options,t.options.navigator),i=e.select;i&&(i.from=this.parseDate(i.from),i.to=this.parseDate(i.to)),mt(e.hint.visible)||(e.hint.visible=e.visible),this.chartObserver=new ut(this,((e={})[Go]="_drag",e[No]="_dragEnd",e[qo]="_zoom",e[Xo]="_zoomEnd",e)),t.addObserver(this.chartObserver)}It(W,{dateField:"date",axisDefaults:{categoryAxis:{type:"date",baseUnit:"fit",justified:!0},valueAxis:{narrowRange:!0,labels:{format:"C"}}},navigator:{select:{},seriesDefaults:{markers:{visible:!1},tooltip:{visible:!0},line:{width:2}},hint:{},visible:!0},tooltip:{visible:!0},legend:{visible:!1}});var Al=W,Sl=Math.PI/180;function kl(t,e){var i=t.getOrigin(),o=t.getSize(),e=U(e);return t.setOrigin([i.x-e.left,i.y-e.top]),t.setSize([o.width+(e.left+e.right),o.height+(e.top+e.bottom)]),t}var Pl=C.drawing.Group,Cl=C.drawing.Path,Tl=C.drawing.Text;function Ml(t,e){var i=t.box,o=t.children[0].box,r=e.border||{},n=e.background||"",i=Cl.fromRect(new C.geometry.Rect([i.x1,i.y1],[i.width(),i.height()]),{stroke:{}}),o=new Tl(t.text,new C.geometry.Point(o.x1,o.y1),{font:e.font,fill:{color:e.color}}),e=kl(o.bbox().clone(),e.padding),r=Cl.fromRect(e,{stroke:{color:r.width?r.color:"",width:r.width,opacity:r.opacity,dashType:r.dashType,lineJoin:"round",lineCap:"round"},fill:{color:n}}),n=new Pl;return n.append(i),n.append(r),n.append(o),n}function Rl(t,e,i){var o=mt(t.from)?t.from:c,r=mt(t.to)?t.to:l;return t.from=Math.max(Math.min(r,o),e),t.to=Math.min(Math.max(r,o),i),t}function Ol(t,e){e=U(e);return e.left=-e.left,e.top=-e.top,e.right=-e.right,e.bottom=-e.bottom,kl(t,e)}var Il,jl=C.drawing.Path,Bl=C.drawing.Surface,K=((Il=C.Class)&&(Vl.__proto__=Il),((Vl.prototype=Object.create(Il&&Il.prototype)).constructor=Vl).prototype.destroy=function(){this.surface&&(this.surface.destroy(),this.surface=null),delete this.element,delete this.surfaceElement},Vl.prototype.value=function(t){var e=this.pointers[0];if(0===arguments.length)return e.value();e.value(t),this._setValueOptions(t)},Vl.prototype._draw=function(){var t=this.surface;t.clear(),t.draw(this._visuals)},Vl.prototype.exportVisual=function(){return this._visuals},Vl.prototype.allValues=function(t){var e=this.pointers,i=[];if(0===arguments.length){for(var o=0;o<e.length;o++)i.push(e[o].value());return i}if(x(t))for(var r=0;r<t.length;r++)R(t[r])&&e[r].value(t[r]);this._setValueOptions(t)},Vl.prototype._setValueOptions=function(t){for(var e=[].concat(this.options.pointer),i=[].concat(t),o=0;o<i.length;o++)e[o].value=i[o]},Vl.prototype.resize=function(){this.noTransitionsRedraw()},Vl.prototype.noTransitionsRedraw=function(){var t=this.options.transitions;this._toggleTransitions(!1),this.redraw(),this._toggleTransitions(t)},Vl.prototype.redraw=function(){var t=this._surfaceSize(),t=new C.geometry.Rect([0,0],[t.width,t.height]);this._initSurface(),this.gaugeArea=this._createGaugeArea(),this._createModel();t=Ol(t.bbox(),this._gaugeAreaMargin);this.reflow(t)},Vl.prototype.setOptions=function(t,e){this._originalOptions=L(this._originalOptions,t),this.options=L({},this._originalOptions),this._initTheme(e),this.redraw()},Vl.prototype.setDirection=function(t){this.contextService.rtl=Boolean(t),this.surface&&"svg"===this.surface.type&&(this.surface.destroy(),this.surface=null)},Vl.prototype.setIntlService=function(t){this.contextService.intl=t},Vl.prototype._initTheme=function(t){var e=t||this.theme||{};this.theme=e,this.options=L({},e,this.options);var t=this.options,i=t.pointer;if(x(i)){for(var o=[],r=0;r<i.length;r++)o.push(L({},e.pointer,i[r]));t.pointer=o}},Vl.prototype._createGaugeArea=function(){var t=this.options.gaugeArea,e=this.surface.size(),i=t.border||{},e=new C.geometry.Rect([0,0],[e.width,e.height]);return this._gaugeAreaMargin=t.margin||5,0<i.width&&(e=Ol(e,i.width)),jl.fromRect(e,{stroke:{color:i.width?i.color:"",width:i.width,dashType:i.dashType,lineJoin:"round",lineCap:"round"},fill:{color:t.background}})},Vl.prototype._initSurface=function(){var t=this.options,e=this.surface,i=this._surfaceElement(),o=this._surfaceSize();_t(i,o),e&&e.options.type===t.renderAs?(this.surface.clear(),this.surface.resize()):(e&&e.destroy(),this.surface=Bl.create(i,{type:t.renderAs}))},Vl.prototype._surfaceSize=function(){var t=this.options,e=this._getSize();return t.gaugeArea&&L(e,t.gaugeArea),e},Vl.prototype._surfaceElement=function(){return this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.element.appendChild(this.surfaceElement)),this.surfaceElement},Vl.prototype.getSize=function(){return this._getSize()},Vl.prototype._getSize=function(){var t=this.element,e=this._defaultSize(),i=t.offsetWidth,t=t.offsetHeight;return{width:i=i||e.width,height:t=t||e.height}},Vl.prototype._defaultSize=function(){return{width:200,height:200}},Vl.prototype._toggleTransitions=function(t){this.options.transitions=t;for(var e=0;e<this.pointers.length;e++)this.pointers[e].options.animation.transitions=t},Vl);function Vl(t,e,i,o){void 0===o&&(o={}),Il.call(this),this.element=t,this.theme=i,this.contextService=new Q(this,o),this._originalOptions=L({},this.options,e),this.options=L({},this._originalOptions),this._initTheme(i),this.redraw()}It(K,{plotArea:{},theme:"default",renderAs:"",pointer:{},scale:{},gaugeArea:{}});var Ll=K,zl=C.drawing.Path,El=C.drawing.Group,Fl=C.geometry.Point;function Dl(t,e,i,o){var r,n,s,a,p,h,l=e.length;if(o.visible)for(var c=i.mirror,u=i.lineBox,d=o.skip;d<l;d+=o.step)d%o.skipUnit!=0&&(i.tickX=c?u.x2:u.x2-o.size,i.tickY=c?u.y1-o.size:u.y1,i.position=e[d],t.append((n=o,h=h=p=a=s=void 0,a=(r=i).position,p=r.tickX,h=r.tickY,h=r.vertical?(s=new Fl(p,a),new Fl(p+n.size,a)):(s=new Fl(a,h),new Fl(a,h+n.size)),new zl({stroke:{color:n.color,width:n.width}}).moveTo(s).lineTo(h))))}var Ul,W=((Ul=Hi)&&(Hl.__proto__=Ul),((Hl.prototype=Object.create(Ul&&Ul.prototype)).constructor=Hl).prototype.initUserOptions=function(t){t=L({},this.options,t);return(t=L({},t,{labels:{mirror:t.mirror}})).majorUnit=t.majorUnit||Ft(t.min,t.max),t},Hl.prototype.initFields=function(){},Hl.prototype.render=function(){var t=this.elements=new El,e=this.renderLabels(),i=this.renderLine(),o=this.renderTicks(),r=this.renderRanges();return t.append(i,e,o,r),t},Hl.prototype.renderRanges=function(){for(var t=this.options,e=t.min,i=t.max,o=t.vertical,r=t.labels.mirror,n=t.ranges||[],s=new El,a=n.length,p=t.rangeSize||t.minorTicks.size/2,h=0;h<a;h++){var l=Rl(n[h],e,i),c=this.getSlot(l.from,l.to),u=o?this.lineBox():c,c=o?c:this.lineBox();o?u.x1-=p*(r?-1:1):c.y2+=p*(r?-1:1),s.append(zl.fromRect(new C.geometry.Rect([u.x1,c.y1],[u.x2-u.x1,c.y2-c.y1]),{fill:{color:l.color,opacity:l.opacity},stroke:{}}))}return s},Hl.prototype.renderLabels=function(){for(var t=this.labels,e=this.options,i=new El,o=0;o<t.length;o++)i.append(Ml(t[o],e.labels));return i},Hl.prototype.renderLine=function(){var t=this.options.line,e=this.lineBox(),i=new El;return 0<t.width&&t.visible&&((t=new zl({stroke:{color:t.color,dashType:t.dashType,width:t.width}})).moveTo(e.x1,e.y1).lineTo(e.x2,e.y2),i.append(t)),i},Hl.prototype.renderTicks=function(){var t=new El,e=this.options,i=e.majorTicks.visible?e.majorUnit:0,o={vertical:e.vertical,mirror:e.labels.mirror,lineBox:this.lineBox()};return Dl(t,this.getMajorTickPositions(),o,e.majorTicks),Dl(t,this.getMinorTickPositions(),o,L({},{skipUnit:i/e.minorUnit},e.minorTicks)),t},Hl);function Hl(t,e){t=t||{};!mt(t.reverse)&&!1===t.vertical&&(e||{}).rtl&&(t=Object.assign({},t,{reverse:!0})),Ul.call(this,0,1,t,e),this.options.minorUnit=this.options.minorUnit||this.options.majorUnit/10}It(W,{min:0,max:50,majorTicks:{size:15,align:"inside",color:a,width:.5,visible:!0},minorTicks:{size:10,align:"inside",color:a,width:.5,visible:!0},line:{width:.5},labels:{position:"inside",padding:2},mirror:!1,_alignLines:!1});var Gl,Nl=W,K=((Gl=C.Class)&&(ql.__proto__=Gl),((ql.prototype=Object.create(Gl&&Gl.prototype)).constructor=ql).prototype.value=function(t){var e=this.options,i=e.value;if(0===arguments.length)return i;var o=this.scale.options,i=o.min,o=o.max;e._oldValue=mt(e._oldValue)?e.value:i,e.value=kt(t,i,o),this.elements&&this.repaint()},ql);function ql(t,e){Gl.call(this);var i=t.options,o=i.min,i=i.max,e=this.options=L({},this.options,e);e.fill=e.color,this.scale=t,mt(e.value)?e.value=kt(e.value,o,i):e.value=o}It(K,{color:a});var Xl,W=K,K=((Xl=W)&&(Yl.__proto__=Xl),((Yl.prototype=Object.create(Xl&&Xl.prototype)).constructor=Yl).prototype.reflow=function(){var t,e,i,o=this.options,r=this.scale,n=r.options,s=n.mirror,a=n.vertical,p=r.lineBox(),h=o.track.size||o.size,n=o.size/2,r=U(o.margin),r=a?r[s?"left":"right"]:r[s?"bottom":"top"],r=s?-r:r;a?(i=new qt(p.x1+r,p.y1,p.x1+r,p.y2),s?i.x1-=h:i.x2+=h,"barPointer"!==o.shape&&(t=e=new qt(p.x2+r,p.y1-n,p.x2+r,p.y2+n))):(i=new qt(p.x1,p.y1-r,p.x2,p.y1-r),s?i.y2+=h:i.y1-=h,"barPointer"!==o.shape&&(t=e=new qt(p.x1-n,p.y1-r,p.x2+n,p.y1-r))),this.trackBox=i,this.pointerRangeBox=e,this.box=t||i.clone().pad(o.border.width)},Yl.prototype.getElementOptions=function(){var t=this.options;return{fill:{color:t.color,opacity:t.opacity},stroke:mt(t.border)?{color:t.border.width?t.border.color||t.color:"",width:t.border.width,dashType:t.border.dashType,opacity:t.opacity}:null}},Yl.prototype._margin=function(){var t=this.scale,e=this.options,i=t.options,t=i.mirror,i=i.vertical,e=U(e.margin);return i?e[t?"left":"right"]:e[t?"bottom":"top"]},Yl);function Yl(t,e){Xl.call(this,t,e),this.options=L({track:{visible:mt(e.track)}},this.options)}It(K,{shape:"barPointer",track:{border:{width:1}},color:a,border:{width:1},opacity:1,margin:U(3),animation:{type:"barPointer"},visible:!0});var Wl,Zl=K,K=((Wl=C.drawing.Animation)&&(Kl.__proto__=Wl),((Kl.prototype=Object.create(Wl&&Wl.prototype)).constructor=Kl).prototype.setup=function(){var t=this.options,e=t.margin,i=t.from,o=t.to,r=t.vertical,n=r?"x1":"y1";t.mirror===r?(i[n]-=e,o[n]-=e):(i[n]+=e,o[n]+=e);i=this.fromScale=new C.geometry.Point(i.x1,i.y1),o=this.toScale=new C.geometry.Point(o.x1,o.y1);0!==t.duration&&(t.duration=Math.max(i.distanceTo(o)/t.duration*1e3,1))},Kl.prototype.step=function(t){var e=ct(this.fromScale.x,this.toScale.x,t),t=ct(this.fromScale.y,this.toScale.y,t);this.element.transform(C.geometry.transform().translate(e,t))},Kl);function Kl(){Wl.apply(this,arguments)}It(K,{easing:"linear",duration:250}),C.drawing.AnimationFactory.current.register("arrowPointer",K);var $l,Jl,Ql=K,tc=C.geometry.Point,ec=C.drawing.Path,ic=((Jl=Zl)&&(rc.__proto__=Jl),((rc.prototype=Object.create(Jl&&Jl.prototype)).constructor=rc).prototype.pointerShape=function(){var t=this.scale,e=this.options.size,i=e/2,o=t.options.mirror?-1:1;return t.options.vertical?[new tc(0,0-i),new tc(0-o*e,0),new tc(0,0+i)]:[new tc(0-i,0),new tc(0,0+o*e),new tc(0+i,0)]},rc.prototype.repaint=function(){var t=this.scale,e=this.options,t=new Ql(this.elements,L(e.animation,{vertical:t.options.vertical,mirror:t.options.mirror,margin:this._margin(e.margin),from:t.getSlot(e._oldValue),to:t.getSlot(e.value)}));!1===e.animation.transitions&&(t.options.duration=0),t.setup(),t.play()},rc.prototype.render=function(){var t=this.scale,e=this.options,i=this.getElementOptions(),o=this.pointerShape(e.value);e.animation.type="arrowPointer";o=new ec({stroke:i.stroke,fill:i.fill}).moveTo(o[0]).lineTo(o[1]).lineTo(o[2]).close(),e=t.getSlot(e.value);return o.transform(C.geometry.transform().translate(e.x1,e.y1)),this.elements=o},rc),K=(($l=C.drawing.Animation)&&(oc.__proto__=$l),((oc.prototype=Object.create($l&&$l.prototype)).constructor=oc).prototype.setup=function(){var t=this.options,e=this.axis=t.vertical?m:v,i=this.to=t.newPoints[0][e],e=this.from=t.oldPoints[0][e];0!==t.duration&&(t.duration=Math.max(Math.abs(i-e)/t.speed*1e3,1)),this._set(e)},oc.prototype.step=function(t){t=ct(this.from,this.to,t);this._set(t)},oc.prototype._set=function(t){var e="set"+this.axis.toUpperCase(),i=this.options.newPoints;i[0][e](t),i[1][e](t)},oc);function oc(){$l.apply(this,arguments)}function rc(t,e){Jl.call(this,t,e),mt(this.options.size)||(this.options.size=.6*this.scale.options.majorTicks.size)}It(K,{easing:"linear",speed:250}),C.drawing.AnimationFactory.current.register("barPointer",K);var nc,sc,ac=K,pc=C.drawing.Group,hc=C.drawing.Path,lc=((sc=Zl)&&(dc.__proto__=sc),((dc.prototype=Object.create(sc&&sc.prototype)).constructor=dc).prototype.pointerShape=function(t){var e=this.scale,i=this.options,o=e.options,r=o.mirror,n=o.vertical,s=r===n?-1:1,a=i.size*s,o=e.getSlot(e.options.min),r=e.getSlot(t),i=n?m:v,e=n?v:m,t=this._margin()*s,s=new C.geometry.Point;s[i]=o[i+"1"],s[e]=o[e+"1"];o=new C.geometry.Point;o[i]=r[i+"1"],o[e]=r[e+"1"],n?(s.translate(t,0),o.translate(t,0)):(s.translate(0,t),o.translate(0,t));e=o.clone(),t=s.clone();return n?(e.translate(a,0),t.translate(a,0)):(e.translate(0,a),t.translate(0,a)),[s,o,e,t]},dc.prototype.repaint=function(){var t=this.scale,e=this.options,i=this.pointerShape(e.value),o=this.pointerPath,r=this.pointerShape(e._oldValue);o.moveTo(i[0]).lineTo(i[1]).lineTo(i[2]).lineTo(i[3]).close();i=new ac(o,L(e.animation,{reverse:t.options.reverse,vertical:t.options.vertical,oldPoints:[r[1],r[2]],newPoints:[i[1],i[2]]}));!1===e.animation.transitions&&(i.options.duration=0),i.setup(),i.play()},dc.prototype.render=function(){var t=new pc,e=this.getElementOptions();this.options.track.visible&&t.append(this.renderTrack());e=this.pointerPath=new hc({stroke:e.stroke,fill:e.fill});return t.append(e),this.elements=t},dc.prototype.renderTrack=function(){var t=this.options.track,e=t.border||{},i=this.trackBox.clone().pad(e.width||0);return new hc.fromRect(i.toRect(),{fill:{color:t.color,opacity:t.opacity},stroke:{color:e.width?e.color||t.color:"",width:e.width,dashType:e.dashType}})},dc),cc=C.drawing.Group,K=((nc=Ll)&&(uc.__proto__=nc),((uc.prototype=Object.create(nc&&nc.prototype)).constructor=uc).prototype.reflow=function(t){var e=this.pointers,i=t.origin.x,o=t.origin.y,t=new qt(i,o,i+t.width(),o+t.height());this.scale.reflow(t),this._shrinkScaleWidth(t);for(var r=0;r<e.length;r++)e[r].reflow();this.bbox=this._getBox(t),this._alignElements(),this._shrinkElements(),this._buildVisual(),this._draw()},uc.prototype._buildVisual=function(){var t=new cc,e=this.scale.render(),i=this.pointers;t.append(this.gaugeArea),t.append(e);for(var o=0;o<i.length;o++){var r=i[o];t.append(r.render()),r.value(r.options.value)}this._visuals=t},uc.prototype._createModel=function(){var t=this.options,e=this.scale=new Nl(t.scale,this.contextService);this.pointers=[];for(var i=x(i=t.pointer)?i:[i],o=0;o<i.length;o++){var r=L({},i[o],{animation:{transitions:t.transitions}}),n="arrow"===r.shape?ic:lc;this.pointers.push(new n(e,r))}},uc.prototype._defaultSize=function(){var t=this.options.scale.vertical;return{width:t?60:200,height:t?200:60}},uc.prototype._getBox=function(t){for(var e,i=this.scale,o=this.pointers,r=t.center(),n=o[0].box.clone().wrap(i.box),s=0;s<o.length;s++)n.wrap(o[s].box.clone());return n=i.options.vertical?(e=n.width()/2,new qt(r.x-e,t.y1,r.x+e,t.y2)):(e=n.height()/2,new qt(t.x1,r.y-e,t.x2,r.y+e))},uc.prototype._alignElements=function(){for(var t,e=this.scale,i=this.pointers,o=e.box,r=i[0].box.clone().wrap(e.box),n=this.bbox,s=0;s<i.length;s++)r.wrap(i[s].box.clone());e.options.vertical?(t=n.center().x-r.center().x,e.reflow(new qt(o.x1+t,n.y1,o.x2+t,n.y2))):(t=n.center().y-r.center().y,e.reflow(new qt(o.x1,o.y1+t,o.x2,o.y2+t)));for(var a=0;a<i.length;a++)i[a].reflow(this.bbox)},uc.prototype._shrinkScaleWidth=function(t){var e,i=this.scale;i.options.vertical||0<(e=i.contentBox().width()-t.width())&&(i.box.shrink(e,0),i.box.alignTo(t,"center"),i.reflow(i.box))},uc.prototype._shrinkElements=function(){for(var t=this.scale,e=this.pointers,i=t.box.clone(),o=t.options.vertical?"y":"x",r=e[0].box,n=0;n<e.length;n++)r.wrap(e[n].box.clone());i[o+1]+=Math.max(i[o+1]-r[o+1],0),i[o+2]-=Math.max(r[o+2]-i[o+2],0),t.reflow(i);for(var s=0;s<e.length;s++)e[s].reflow(this.bbox)},uc);function uc(){nc.apply(this,arguments)}function dc(t,e){sc.call(this,t,e),mt(this.options.size)||(this.options.size=.3*this.scale.options.majorTicks.size)}It(K,{transitions:!0,gaugeArea:{background:""},scale:{vertical:!0}});var gc=K,fc=C.drawing.Arc,yc=C.drawing.Path,vc=C.drawing.Group;function mc(t,e,i,o){var r=new vc,n=t.center,s=t.getRadiusX();if(o.visible)for(var a=0;a<e.length;a++){var p=t.pointAt(e[a]),h=new C.geometry.Point(n.x+s-o.size,n.y).rotate(e[a],n);r.append(new yc({stroke:{color:o.color,width:o.width}}).moveTo(p).lineTo(h))}return r}function xc(t,e,i,o){return{from:t,to:e,color:i,opacity:o}}var bc,K=((bc=Hi)&&(_c.__proto__=bc),((_c.prototype=Object.create(bc&&bc.prototype)).constructor=_c).prototype.initUserOptions=function(t){t=L({},this.options,t);return t.majorUnit=t.majorUnit||Ft(t.min,t.max),t.minorUnit=t.minorUnit||t.majorUnit/10,t},_c.prototype.initFields=function(){},_c.prototype.render=function(t,e){e=this.renderArc(t,e);this.bbox=e.bbox(),this.labelElements=this.renderLabels(),this.ticks=this.renderTicks(),this.ranges=this.renderRanges()},_c.prototype.reflow=function(t){var e=t.center(),t=Math.min(t.height(),t.width())/2;if(!mt(this.bbox))return this.render(e,t);this.bbox=this.arc.bbox(),this.radius(this.arc.getRadiusX()),this.repositionRanges(),this.renderLabels()},_c.prototype.slotAngle=function(t){var e=this.options,i=e.min,o=e.max,r=e.reverse,n=e.startAngle,s=e.endAngle,e=s-n;return(r?s-(t-i)/(o-i)*e:(t-i)/(o-i)*e+n)+180},_c.prototype.hasRanges=function(){var t=this.options.ranges;return t&&t.length},_c.prototype.ticksSize=function(){var t=this.options,e=t.majorTicks,i=t.minorTicks,t=0;return e.visible&&(t=e.size),i.visible&&(t=Math.max(i.size,t)),t},_c.prototype.renderLabels=function(){var t=this.options,e=this.arc.clone(),i=e.getRadiusX(),o=this.tickAngles(e,t.majorUnit),r=t.rangeSize=t.rangeSize||.1*i,n=new vc,s=.05*i;mt(t.rangeDistance)?s=t.rangeDistance:t.rangeDistance=s;var a=t.labels,p="inside"===a.position,h=mt(this.labelElements);p&&(i-=this.ticksSize(),this.hasRanges()&&!h&&(i-=r+s),e.setRadiusX(i).setRadiusY(i));for(var l=this.labels,c=l.length,a=U(a.padding),u=(a.left+a.right)/2,d=(a.top+a.bottom)/2,g=0;g<c;g++){var f=l[g],y=f.box.width()/2,v=f.box.height()/2,m=o[g],x=(m-180)*Sl,b=e.pointAt(m),m=b.x+Math.cos(x)*(y+u)*(p?1:-1),x=b.y+Math.sin(x)*(v+d)*(p?1:-1);f.reflow(new qt(m-y,x-v,m+y,x+v));m=new C.geometry.Point(f.box.x1,f.box.y1),y=void 0;h?(x=(y=this.labelElements.children[g]).bbox().origin,(v=y.transform()||C.geometry.transform()).translate(m.x-x.x,m.y-x.y),y.transform(v)):(y=Ml(f,t.labels),n.append(y)),this.bbox=C.geometry.Rect.union(this.bbox,y.bbox())}return n},_c.prototype.repositionRanges=function(){var t=this.ranges.children;if(0<t.length){var e=this.options,i=e.rangeDistance,o=e.rangeSize,e=this.getRangeRadius();"inside"===this.options.labels.position&&(e+=o+i);for(var r=e+o/2,n=0;n<t.length;n++)t[n]._geometry.setRadiusX(r).setRadiusY(r);this.bbox=C.geometry.Rect.union(this.bbox,this.ranges.bbox())}},_c.prototype.renderRanges=function(){var t=this.rangeSegments(),e=t.length,i=new vc;if(e){var o=this.options,r=o.rangeSize,n=o.reverse,o=o.rangeDistance,s=this.getRangeRadius();this.radius(this.radius()-r-o);for(var a=0;a<e;a++){var p=t[a],h=this.slotAngle(p[n?"to":"from"]),l=this.slotAngle(p[n?"from":"to"]);l-h!=0&&i.append(this.createRange(h,l,s,p))}}return i},_c.prototype.createRange=function(t,e,i,o){var r=this.options.rangeSize,e=new C.geometry.Arc(this.arc.center,{radiusX:i+r/2,radiusY:i+r/2,startAngle:t,endAngle:e});return new fc(e,{stroke:{width:r,color:o.color,opacity:o.opacity,lineCap:o.lineCap}})},_c.prototype.rangeSegments=function(){var t=this.options,e=t.ranges||[],i=e.length,o=[];if(i){var r=t.min,n=t.max,s=t.rangePlaceholderColor;o.push(xc(r,n,s));for(var a=0;a<i;a++)for(var p=Rl(e[a],r,n),h=o.length,l=0;l<h;l++){var c=o[l];if(c.from<=p.from&&p.from<=c.to){o.push(xc(p.from,p.to,p.color,p.opacity)),c.from<=p.to&&p.to<=c.to&&o.push(xc(p.to,c.to,s,p.opacity)),c.to=p.from;break}}}return o},_c.prototype.getRangeRadius=function(){var t=this.arc,e=this.options,i=e.rangeSize,o=e.rangeDistance,r=e.majorTicks.size;return"outside"===e.labels.position?t.getRadiusX()-r-o-i:t.getRadiusX()-i},_c.prototype.renderArc=function(t,e){var i=this.options;return this.arc=new C.geometry.Arc(t,{radiusX:e,radiusY:e,startAngle:i.startAngle+180,endAngle:i.endAngle+180})},_c.prototype.renderTicks=function(){var t=this.arc,e=this.options,i=t.clone();this.majorTickAngles=this.tickAngles(t,e.majorUnit),this.majorTicks=mc(i,this.majorTickAngles,e.majorUnit,e.majorTicks);var o=new vc;o.append(this.majorTicks);var r,n=e.majorTicks.size,s=e.minorTicks.size;return this._tickDifference=n-s,"outside"===e.labels.position&&(r=i.getRadiusX(),i.setRadiusX(r-n+s).setRadiusY(r-n+s)),this.minorTickAngles=this.normalizeTickAngles(this.tickAngles(t,e.minorUnit)),this.minorTicks=mc(i,this.minorTickAngles,e.minorUnit,e.minorTicks),o.append(this.minorTicks),o},_c.prototype.normalizeTickAngles=function(t){for(var e=this.options,i=e.majorUnit/e.minorUnit,o=t.length-1;0<=o;o--)o%i==0&&t.splice(o,1);return t},_c.prototype.tickAngles=function(t,e){var i=this.options,o=i.reverse,r=i.max-i.min,i=t.endAngle-t.startAngle,n=r/e,s=t.startAngle,a=i/n;o&&(s+=i,a=-a);for(var p=[],h=0;h<n;h++)p.push(Tt(s,3)),s+=a;return Tt(s)<=t.endAngle&&p.push(s),p},_c.prototype.radius=function(t){if(!t)return this.arc.getRadiusX();this.arc.setRadiusX(t).setRadiusY(t),this.repositionTicks(this.majorTicks.children,this.majorTickAngles),this.repositionTicks(this.minorTicks.children,this.minorTickAngles,!0)},_c.prototype.repositionTicks=function(t,e,i){var o=i&&this._tickDifference||0,r=this.arc,n=r.getRadiusX();i&&"outside"===this.options.labels.position&&0!==o&&(r=this.arc.clone()).setRadiusX(n-o).setRadiusY(n-o);for(var s=0;s<t.length;s++){var a=r.pointAt(e[s]),p=t[s].segments,h=a.x-p[0].anchor().x,p=a.y-p[0].anchor().y;t[s].transform((new C.geometry.transform).translate(h,p))}},_c);function _c(t,e){bc.call(this,0,1,t,e)}It(K,{min:0,max:100,majorTicks:{size:15,align:"inside",color:a,width:.5,visible:!0},minorTicks:{size:10,align:"inside",color:a,width:.5,visible:!0},startAngle:-30,endAngle:210,labels:{position:"inside",padding:2}});var wc,Ac=K,K=((wc=C.drawing.Animation)&&(Sc.__proto__=wc),((Sc.prototype=Object.create(wc&&wc.prototype)).constructor=Sc).prototype.step=function(t){var e=this.options,t=ct(e.oldAngle,e.newAngle,t);this.element.transform(C.geometry.transform().rotate(t,e.center))},Sc);function Sc(t,e){wc.call(this,t,e);e=this.options;e.duration=Math.max(Math.abs(e.newAngle-e.oldAngle)/e.duration*1e3,1)}It(K,{easing:"linear",duration:150}),C.drawing.AnimationFactory.current.register("radialPointer",K);var kc,Pc=K,Cc=C.drawing.Circle,Tc=C.drawing.Group,Mc=C.drawing.Path,K=((kc=W)&&(Rc.__proto__=kc),((Rc.prototype=Object.create(kc&&kc.prototype)).constructor=Rc).prototype.setAngle=function(t){this.elements.transform(C.geometry.transform().rotate(t,this.center))},Rc.prototype.repaint=function(){var t=this.scale,e=this.options,i=t.slotAngle(e._oldValue),t=t.slotAngle(e.value);!1===e.animation.transitions?this.setAngle(t):new Pc(this.elements,L(e.animation,{oldAngle:i,newAngle:t})).play()},Rc.prototype.render=function(){var t=this.scale,e=this.options,i=new Tc;return!1!==e.animation&&L(e.animation,{startAngle:0,center:t.arc.center,reverse:t.options.reverse}),i.append(this._renderNeedle(),this._renderCap()),this.elements=i,this.setAngle(Sl),i},Rc.prototype.reflow=function(t){var e=this.center=t.center,i=kt(this.options.length||1,.1,1.5),i=this.radius=t.getRadiusX()*i,i=this.capSize=Math.round(i*this.options.cap.size);this.bbox=C.geometry.Rect.fromPoints(new C.geometry.Point(e.x-i,e.y-i),new C.geometry.Point(e.x+i,e.y+i))},Rc.prototype._renderNeedle=function(){var t=this.scale.options.minorTicks.size,e=this.center,i=this.options.color,i=new Mc({fill:{color:i},stroke:{color:i,width:.5}});return i.moveTo(e.x+this.radius-t,e.y).lineTo(e.x,e.y-this.capSize/2).lineTo(e.x,e.y+this.capSize/2).close(),i},Rc.prototype._renderCap=function(){var t=this.options,e=t.cap.color||t.color,t=new C.geometry.Circle(this.center,this.capSize);return new Cc(t,{fill:{color:e},stroke:{color:e}})},Rc);function Rc(){kc.apply(this,arguments)}It(K,{cap:{size:.05},arrow:{width:16,height:14},animation:{type:"radialPointer",duration:150}});var Oc,Ic=K,jc=C.drawing.Group,K=((Oc=Ll)&&(Bc.__proto__=Oc),((Bc.prototype=Object.create(Oc&&Oc.prototype)).constructor=Bc).prototype.reflow=function(t){var e=this.pointers;this.scale.reflow(t),this._initialPlotArea=this.scale.bbox;for(var i=0;i<e.length;i++)e[i].reflow(this.scale.arc),this._initialPlotArea=C.geometry.Rect.union(this._initialPlotArea,e[i].bbox);this.fitScale(t),this.alignScale(t),this._buildVisual(this.gaugeArea,e,this.scale),this._draw()},Bc.prototype._buildVisual=function(t,e,i){var o=this._visuals=new jc;o.append(t),o.append(i.ticks),o.append(i.ranges),this._buildPointers(e),o.append(i.labelElements)},Bc.prototype._buildPointers=function(t){for(var e=0;e<t.length;e++){var i=t[e];i.render(),this._visuals.append(i.elements),i.value(i.options.value)}},Bc.prototype.fitScale=function(t){for(var e,i,o,r,n,s=this.scale.arc,a=this._initialPlotArea,a=Math.abs(this.getDiff(a,t)),p=Tt(a,3),h=Tt(-a,3),l=0,c=0;!(!(c++<100)||5<(l=n===o?l+1:0)||p!==r&&0<=(e=this.getPlotBox(p,t,s))&&e<=2||h!==r&&0<=(o=this.getPlotBox(h,t,s))&&o<=2||(r=0<e&&0<o?2*p:e<0&&o<0?2*h:Tt((p+h)/2||1,3),0<=(i=this.getPlotBox(r,t,s))&&i<=2));)n=o,0<i?(h=r,o=i):(p=r,e=i)},Bc.prototype.getPlotBox=function(t,e,i){var o=this.scale,r=this.pointers,n=i.getRadiusX(),s=i.clone();s.setRadiusX(n+t).setRadiusY(n+t),o.arc=s,o.reflow(e),this.plotBbox=o.bbox;for(var a=0;a<r.length;a++)r[a].reflow(s),this.plotBbox=C.geometry.Rect.union(this.plotBbox,r[a].bbox);return this.getDiff(this.plotBbox,e)},Bc.prototype.getDiff=function(t,e){return Math.min(e.width()-t.width(),e.height()-t.height())},Bc.prototype.alignScale=function(t){var e=this.plotBbox.center(),i=t.center(),o=e.x-i.x,i=e.y-i.y,r=this.scale,n=this.pointers;r.arc.center.x-=o,r.arc.center.y-=i,r.reflow(t);for(var s=0;s<n.length;s++)n[s].reflow(r.arc),this.plotBbox=C.geometry.Rect.union(r.bbox,n[s].bbox)},Bc.prototype._createModel=function(){var t=this.options,e=t.pointer,i=this.scale=new Ac(t.scale,this.contextService);this.pointers=[];for(var o=x(e)?e:[e],r=0;r<o.length;r++){var n=new Ic(i,L({},o[r],{animation:{transitions:t.transitions}}));this.pointers.push(n)}},Bc);function Bc(){Oc.apply(this,arguments)}It(K,{transitions:!0,gaugeArea:{background:""}});var Vc,Lc=K,K=((Vc=Ac)&&(zc.__proto__=Vc),((zc.prototype=Object.create(Vc&&Vc.prototype)).constructor=zc).prototype.rangeSegments=function(){var t=this.options;return[{from:t.min,to:t.max,color:t.rangePlaceholderColor,lineCap:t.rangeLineCap}]},zc.prototype.hasRanges=function(){return!0},zc.prototype.placeholderRangeAngle=function(t){var e=this.ranges.children[0].geometry();this.options.reverse?e.setEndAngle(t):e.setStartAngle(t)},zc.prototype.addRange=function(t,e,i){var o=this.options.reverse,r=this.slotAngle(o?e:t),e=this.slotAngle(o?t:e),i=this.createRange(r,e,this.getRangeRadius(),i);return this.ranges.append(i),i},zc);function zc(){Vc.apply(this,arguments)}It(K,{min:0,max:100,majorTicks:{visible:!1},minorTicks:{visible:!1},labels:{visible:!1},startAngle:0,endAngle:180,rangeLineCap:"round"});var Ec,Fc=K,K=((Ec=C.drawing.Animation)&&(Dc.__proto__=Ec),((Dc.prototype=Object.create(Ec&&Ec.prototype)).constructor=Dc).prototype.step=function(t){var e=this.options,i=this.startColor,o=this.color,r=ct(e.oldAngle,e.newAngle,t);this.element.angle(r),o&&(e=Tt(ct(i.r,o.r,t)),r=Tt(ct(i.g,o.g,t)),t=Tt(ct(i.b,o.b,t)),this.element.stroke(new C.Color(e,r,t).toHex()))},Dc);function Dc(t,e){Ec.call(this,t,e);var i=this.options,e=Math.abs(i.newAngle-i.oldAngle)/i.duration*1e3;i.duration=kt(e,150,800);e=t.elements.options.get("stroke.color"),t=t.currentColor();e!==t&&(this.startColor=new C.Color(e),this.color=new C.Color(t))}It(K,{easing:"linear",duration:150}),C.drawing.AnimationFactory.current.register("radialRangePointer",K);var Uc,Hc=K,W=((Uc=W)&&(Gc.__proto__=Uc),((Gc.prototype=Object.create(Uc&&Uc.prototype)).constructor=Gc).prototype.repaint=function(){var t=this.scale,e=this.options,i=t.slotAngle(e._oldValue),t=t.slotAngle(e.value);this.animation&&this.animation.abort(),!1===e.animation.transitions?(this.angle(t),this.stroke(this.currentColor())):(this.animation=new Hc(this,L(e.animation,{oldAngle:i,newAngle:t})),this.animation.play())},Gc.prototype.angle=function(t){var e=this.elements.geometry();this.scale.options.reverse?e.setStartAngle(t):e.setEndAngle(t),this.scale.placeholderRangeAngle(t)},Gc.prototype.stroke=function(t){this.elements.stroke(t)},Gc.prototype.render=function(){var t,e;this.elements||(t=this.scale,!1!==(e=this.options).animation&&L(e.animation,{startAngle:0,center:t.arc.center,reverse:t.options.reverse}),this.elements=t.addRange(t.options.min,this.options.value,{color:this.currentColor(),opacity:e.opacity,lineCap:t.options.rangeLineCap}))},Gc.prototype.currentColor=function(){var t=this.scale.options,e=t.min,i=t.max,o=this.options,r=o.colors,t=o.color,o=o.value,n=R(o)?o:e;if(r)for(var s=0;s<r.length;s++){var a=r[s],p=a.color,h=a.from;void 0===h&&(h=e);a=a.to;if(void 0===a&&(a=i),h<=n&&n<=a)return p}return t},Gc.prototype.reflow=function(){this.render(),this.bbox=this.elements.bbox()},Gc);function Gc(){Uc.apply(this,arguments)}It(W,{animation:{type:"radialRangePointer",duration:150}});function Nc(){return{icon:{border:{width:1}},label:{font:Zc,padding:3},line:{length:10,width:2},visible:!0}}function qc(t){return void 0===t&&(t={}),{axisDefaults:{labels:{font:Zc},notes:Nc(),title:{font:Kc,margin:5}},categoryAxis:{majorGridLines:{visible:!0}},navigator:{pane:{height:90,margin:{top:10}}},seriesDefaults:{visible:!0,labels:{font:"11px Arial, Helvetica, sans-serif"},overlay:t.gradients?{}:{gradient:"none"},area:{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.4},rangeArea:{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.4},verticalRangeArea:{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.4},bar:{gap:1.5,spacing:.4},boxPlot:{outliersField:"",meanField:"",border:{_brightness:.8,width:1},downColor:"#fff",gap:1,highlight:{border:{opacity:1,width:2},whiskers:{width:3},mean:{width:2},median:{width:2}},mean:{width:2},median:{width:2},spacing:.3,whiskers:{width:2}},bubble:{border:{width:0},labels:{background:"transparent"},opacity:.6},bullet:{gap:1.5,spacing:.4,target:{color:"#ff0000"}},candlestick:{border:{_brightness:.8,width:1},downColor:"#fff",gap:1,highlight:{border:{opacity:1,width:2},line:{width:2}},line:{color:"#000",width:1},spacing:.3},column:{gap:1.5,spacing:.4},pie:{labels:{background:"",color:"",padding:{top:5,bottom:5,left:7,right:7}}},donut:{margin:1},funnel:{labels:{background:"",color:"",padding:{top:5,bottom:5,left:7,right:7}}},horizontalWaterfall:{gap:.5,line:{color:"#000",width:1},spacing:.4},line:{width:2},notes:Nc(),ohlc:{gap:1,highlight:{line:{opacity:1,width:3}},line:{width:1},spacing:.3},radarArea:{line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.5},radarLine:{markers:{visible:!1},width:2},polarArea:{line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.5},polarLine:{markers:{visible:!1},width:2},rangeBar:{gap:1.5,spacing:.4},rangeColumn:{gap:1.5,spacing:.4},scatterLine:{width:1},verticalArea:{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.4},verticalBoxPlot:{outliersField:"",meanField:"",border:{_brightness:.8,width:1},downColor:"#fff",gap:1,highlight:{border:{opacity:1,width:2},whiskers:{width:3},mean:{width:2},median:{width:2}},mean:{width:2},median:{width:2},spacing:.3,whiskers:{width:2}},verticalBullet:{gap:1.5,spacing:.4,target:{color:"#ff0000"}},verticalLine:{width:2},waterfall:{gap:.5,line:{color:"#000",width:1},spacing:.4}},title:{font:Kc},legend:{labels:{font:Zc}}}}var Xc,Yc=W,Wc=((Xc=Lc)&&($c.__proto__=Xc),(($c.prototype=Object.create(Xc&&Xc.prototype)).constructor=$c).prototype._initTheme=function(t){Xc.prototype._initTheme.call(this,t),this.options.color=this.options.color||(this.theme.pointer||{}).color},$c.prototype._createModel=function(){var t=this.options,e=this.scale=new Fc(t.scale,this.contextService),t=new Yc(e,L({},{colors:t.colors,color:t.color,value:t.value,opacity:t.opacity,animation:{transitions:t.transitions}}));this.pointers=[t]},$c.prototype._buildPointers=function(t){for(var e=0;e<t.length;e++){var i=t[e];i.render(),i.value(i.options.value)}},$c.prototype._setValueOptions=function(t){this.options.value=t},$c.prototype.currentColor=function(){var t=this.pointers[0];if(t)return t.currentColor()},$c.prototype.centerLabelPosition=function(t,e){var i,o=this.getSize(),r=this.scale.arc.center,n=r.x-t/2,r=r.y-e/2;return t<o.width&&(i=n+t,n=Math.max(n,0),i>o.width&&(n-=i-o.width)),e<o.height&&(o=(i=this.scale.bbox).bottomRight().y,e=r+e,r=Math.max(r,i.origin.y),o<e&&(r-=e-o)),{left:n,top:r}},$c),W="Arial, Helvetica, sans-serif",Zc="12px "+W,Kc="16px "+W;function $c(){Xc.apply(this,arguments)}i.d(e,"autoMajorUnit",function(){return Ft}),i.d(e,"Point",function(){return Ut}),i.d(e,"Box",function(){return qt}),i.d(e,"Ring",function(){return $t}),i.d(e,"Sector",function(){return Jt}),i.d(e,"ShapeBuilder",function(){return oe}),i.d(e,"ShapeElement",function(){return ce}),i.d(e,"ChartElement",function(){return se}),i.d(e,"BoxElement",function(){return he}),i.d(e,"RootElement",function(){return ye}),i.d(e,"FloatElement",function(){return xe}),i.d(e,"Text",function(){return we}),i.d(e,"TextBox",function(){return Ce}),i.d(e,"Title",function(){return Oe}),i.d(e,"AxisLabel",function(){return Be}),i.d(e,"Axis",function(){return Ue}),i.d(e,"Note",function(){return Le}),i.d(e,"CategoryAxis",function(){return Ai}),i.d(e,"DateCategoryAxis",function(){return ji}),i.d(e,"DateValueAxis",function(){return qi}),i.d(e,"NumericAxis",function(){return Hi}),i.d(e,"LogarithmicAxis",function(){return Ki}),i.d(e,"PolarAxis",function(){return eo}),i.d(e,"RadarCategoryAxis",function(){return Qi}),i.d(e,"RadarNumericAxis",function(){return so}),i.d(e,"RadarLogarithmicAxis",function(){return po}),i.d(e,"CurveProcessor",function(){return uo}),i.d(e,"Gradients",function(){return ue}),i.d(e,"rectToBox",function(){return Ae}),i.d(e,"Aggregates",function(){return So}),i.d(e,"AreaChart",function(){return Er}),i.d(e,"AreaSegment",function(){return Mr}),i.d(e,"AxisGroupRangeTracker",function(){return Fr}),i.d(e,"Bar",function(){return Wr}),i.d(e,"BarChart",function(){return an}),i.d(e,"BarLabel",function(){return Nr}),i.d(e,"BoxPlotChart",function(){return _n}),i.d(e,"BoxPlot",function(){return xn}),i.d(e,"BubbleChart",function(){return Ln}),i.d(e,"Bullet",function(){return Hn}),i.d(e,"BulletChart",function(){return qn}),i.d(e,"CandlestickChart",function(){return gn}),i.d(e,"Candlestick",function(){return hn}),i.d(e,"CategoricalChart",function(){return sr}),i.d(e,"CategoricalErrorBar",function(){return Jo}),i.d(e,"CategoricalPlotArea",function(){return ma}),i.d(e,"Chart",function(){return Jh}),i.d(e,"ChartContainer",function(){return is}),i.d(e,"ClipAnimation",function(){return wr}),i.d(e,"ClusterLayout",function(){return tn}),i.d(e,"Crosshair",function(){return Qn}),i.d(e,"CrosshairTooltip",function(){return Kn}),i.d(e,"DefaultAggregates",function(){return Os}),i.d(e,"DonutChart",function(){return Up}),i.d(e,"DonutPlotArea",function(){return Hp}),i.d(e,"DonutSegment",function(){return Lp}),i.d(e,"ErrorBarBase",function(){return $o}),i.d(e,"ErrorRangeCalculator",function(){return jo}),i.d(e,"Highlight",function(){return _a}),i.d(e,"SharedTooltip",function(){return rp}),i.d(e,"Legend",function(){return Na}),i.d(e,"LegendItem",function(){return za}),i.d(e,"LegendLayout",function(){return La}),i.d(e,"LineChart",function(){return Tr}),i.d(e,"LinePoint",function(){return lr}),i.d(e,"LineSegment",function(){return ur}),i.d(e,"Pane",function(){return ns}),i.d(e,"PieAnimation",function(){return dp}),i.d(e,"PieChart",function(){return Op}),i.d(e,"PieChartMixin",function(){return Pp}),i.d(e,"PiePlotArea",function(){return Ip}),i.d(e,"PieSegment",function(){return kp}),i.d(e,"PlotAreaBase",function(){return As}),i.d(e,"PlotAreaEventsMixin",function(){return Ss}),i.d(e,"PlotAreaFactory",function(){return Xa}),i.d(e,"PointEventsMixin",function(){return ar}),i.d(e,"RangeBar",function(){return Bs}),i.d(e,"RangeBarChart",function(){return Es}),i.d(e,"RangeAreaPoint",function(){return qs}),i.d(e,"RangeAreaChart",function(){return oa}),i.d(e,"ScatterChart",function(){return Rn}),i.d(e,"ScatterErrorBar",function(){return wn}),i.d(e,"ScatterLineChart",function(){return yp}),i.d(e,"Selection",function(){return Qa}),i.d(e,"SeriesAggregator",function(){return Cs}),i.d(e,"SeriesBinder",function(){return Ro}),i.d(e,"SplineSegment",function(){return xr}),i.d(e,"SplineAreaSegment",function(){return zr}),i.d(e,"StackWrap",function(){return rn}),i.d(e,"Tooltip",function(){return tp}),i.d(e,"OHLCChart",function(){return na}),i.d(e,"OHLCPoint",function(){return ra}),i.d(e,"WaterfallChart",function(){return ua}),i.d(e,"WaterfallSegment",function(){return ca}),i.d(e,"XYPlotArea",function(){return bp}),i.d(e,"MousewheelZoom",function(){return Va}),i.d(e,"ZoomSelection",function(){return Ba}),i.d(e,"Pannable",function(){return Ta}),i.d(e,"ChartAxis",function(){return go}),i.d(e,"ChartPane",function(){return xo}),i.d(e,"ChartPlotArea",function(){return bo}),i.d(e,"findAxisByName",function(){return vo}),i.d(e,"anyHasZIndex",function(){return Ar}),i.d(e,"appendIfNotNull",function(){return ss}),i.d(e,"areNumbers",function(){return ln}),i.d(e,"bindSegments",function(){return ps}),i.d(e,"categoriesCount",function(){return ir}),i.d(e,"countNumbers",function(){return wo}),i.d(e,"equalsIgnoreCase",function(){return hs}),i.d(e,"evalOptions",function(){return er}),i.d(e,"filterSeriesByType",function(){return ls}),i.d(e,"getDateField",function(){return cs}),i.d(e,"getField",function(){return ko}),i.d(e,"hasGradientOverlay",function(){return qr}),i.d(e,"hasValue",function(){return Pn}),i.d(e,"isDateAxis",function(){return us}),i.d(e,"segmentVisible",function(){return as}),i.d(e,"singleItemOrArray",function(){return ds}),i.d(e,"createOutOfRangePoints",function(){return vs}),i.d(e,"ChartService",function(){return Q}),i.d(e,"DomEventsBuilder",function(){return tt}),i.d(e,"FormatService",function(){return Z}),i.d(e,"IntlService",function(){return q}),i.d(e,"TemplateService",function(){return it}),i.d(e,"Sparkline",function(){return pl}),i.d(e,"Navigator",function(){return bl}),i.d(e,"NavigatorHint",function(){return gl}),i.d(e,"StockChart",function(){return Al}),i.d(e,"constants",function(){return o}),i.d(e,"Gauge",function(){return Ll}),i.d(e,"LinearGauge",function(){return gc}),i.d(e,"LinearPointer",function(){return Zl}),i.d(e,"ArrowLinearPointer",function(){return ic}),i.d(e,"BarLinearPointer",function(){return lc}),i.d(e,"LinearScale",function(){return Nl}),i.d(e,"RadialGauge",function(){return Lc}),i.d(e,"RadialPointer",function(){return Ic}),i.d(e,"RadialScale",function(){return Ac}),i.d(e,"ArcGauge",function(){return Wc}),i.d(e,"RangePointer",function(){return Yc}),i.d(e,"ArcScale",function(){return Fc}),i.d(e,"addClass",function(){return n}),i.d(e,"removeClass",function(){return _}),i.d(e,"alignPathToPixel",function(){return T}),i.d(e,"clockwise",function(){return M}),i.d(e,"convertableToNumber",function(){return I}),i.d(e,"deepExtend",function(){return L}),i.d(e,"elementStyles",function(){return D}),i.d(e,"getSpacing",function(){return U}),i.d(e,"getTemplate",function(){return ot}),i.d(e,"getter",function(){return st}),i.d(e,"grep",function(){return at}),i.d(e,"hasClasses",function(){return pt}),i.d(e,"HashMap",function(){return ht}),i.d(e,"inArray",function(){return lt}),i.d(e,"interpolateValue",function(){return ct}),i.d(e,"InstanceObserver",function(){return ut}),i.d(e,"isArray",function(){return x}),i.d(e,"isFunction",function(){return j}),i.d(e,"isNumber",function(){return R}),i.d(e,"isObject",function(){return z}),i.d(e,"isString",function(){return O}),i.d(e,"map",function(){return dt}),i.d(e,"mousewheelDelta",function(){return gt}),i.d(e,"FontLoader",function(){return Ot}),i.d(e,"setDefaultOptions",function(){return It}),i.d(e,"sparseArrayLimits",function(){return jt}),i.d(e,"styleValue",function(){return E}),i.d(e,"find",function(){return Bt}),i.d(e,"elementScale",function(){return Et}),i.d(e,"append",function(){return yt}),i.d(e,"bindEvents",function(){return vt}),i.d(e,"Class",function(){return C.Class}),i.d(e,"defined",function(){return mt}),i.d(e,"deg",function(){return xt}),i.d(e,"elementOffset",function(){return bt}),i.d(e,"elementSize",function(){return _t}),i.d(e,"eventElement",function(){return wt}),i.d(e,"eventCoordinates",function(){return At}),i.d(e,"last",function(){return St}),i.d(e,"limitValue",function(){return kt}),i.d(e,"logToConsole",function(){return C.logToConsole}),i.d(e,"objectKey",function(){return Pt}),i.d(e,"rad",function(){return Ct}),i.d(e,"round",function(){return Tt}),i.d(e,"unbindEvents",function(){return Mt}),i.d(e,"valueOrDefault",function(){return Rt}),i.d(e,"chartBaseTheme",function(){return qc}),function(t){for(var e in t)Jc(e,t[e])}(e)}],o.c=r,o.d=function(t,e,i){o.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:i})},o.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},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=1)}}});