UNPKG

@progress/kendo-ui

Version:

This package is part of the [Kendo UI for jQuery](http://www.telerik.com/kendo-ui) suite.

2 lines 185 kB
module.exports=function(t){function e(n){if(i[n])return i[n].exports;var s=i[n]={exports:{},id:n,loaded:!1};return t[n].call(s.exports,s,s.exports,e),s.loaded=!0,s.exports}var i={};return e.m=t,e.c=i,e.p="",e(0)}({0:function(t,e,i){t.exports=i(892)},3:function(t,e){t.exports=function(){throw Error("define cannot be used indirect")}},888:function(t,e){t.exports=require("../../kendo.dataviz.core")},890:function(t,e){t.exports=require("../../kendo.drawing")},892:function(t,e,i){var n,s,o;!function(r,define){s=[i(893),i(894),i(890),i(888)],n=r,o="function"==typeof n?n.apply(e,s):n,!(void 0!==o&&(t.exports=o))}(function(){!function(t){function e(t,e){for(var i=0;i<e.length;i++)if(e[i].options.name===t)return e[i].prepareUserOptions(),new pe(e[i])}function i(t){var e,i,n=t.length,s=0;for(e=0;e<n;e++)i=t[e],st(i)&&s++;return s}function n(t,e){if(null===e)return e;var i=bt(t,!0);return i(e)}function s(t,e,i,n){var o,r,a,h,l;if(void 0===i&&(i={}),void 0===n&&(n=!1),o=i.defaults=i.defaults||{},r=i.depth=i.depth||0,a=!1,i.excluded=i.excluded||[],r>en)return null;for(h in t)!Tt(h,i.excluded)&&t.hasOwnProperty(h)&&(l=t[h],Et(l)?(a=!0,n||(t[h]=Vt(l(e),o[h]))):Lt(l)&&(n||(i.defaults=o[h]),i.depth++,a=s(l,e,i,n)||a,i.depth--));return a}function o(t){var e,i=t.length,n=0;for(e=0;e<i;e++)n=Math.max(n,t[e].data.length);return n}function r(t,e,i,n,s){var o=t.box,r=new ce;return r[e]=o[e+i],r[n]=o[n+s],r}function a(t){for(var e=0;e<t.length;e++)if(At(t[e].zIndex))return!0}function h(t){var e=t.overlay;return e&&e.gradient&&"none"!==e.gradient}function l(t,e){t.forEach(e)}function c(t,e){var i,n=t.length;for(i=n-1;i>=0;i--)e(t[i],i-n-1)}function u(t){return i(t)===t.length}function p(t){return At(t)&&null!==t}function d(t){var e,i,n,s=t.series;for(e=0;e<s.length;e++)i=s[e],n=i.data,!n||St(n[0])||Lt(n[0])||(i.data=[n])}function g(){return"pane"+qn++}function f(t,e){null!==e&&t.push(e)}function x(t,e,i){var n,s=e.visible;return At(s)?s:(n=t.pointVisibility,n?n[i]:void 0)}function v(t){var e,i,n,s=t.data,o=[],r=0,a=0;for(e=0;e<s.length;e++)i=xe.current.bindPoint(t,e),n=i.valueFields.value,qt(n)&&(n=parseFloat(n)),st(n)?(i.visible=x(t,i.fields,e)!==!1,i.value=Math.abs(n),o.push(i),i.visible&&(r+=i.value),0!==n&&a++):o.push(null);return{total:r,points:o,count:a}}function m(t,e){return t&&e?t.toLowerCase()===e.toLowerCase():t===e}function y(t,e){var i,n,s=[],o=[].concat(e);for(i=0;i<t.length;i++)n=t[i],Tt(n.type,o)&&s.push(n);return s}function _(t,e,i){var n,s;return null===e?e:(n="_date_"+t,s=e[n],s||(s=Xt(i,bt(t,!0)(e)),e[n]=s),s)}function w(t,e){var i=t.type,n=e instanceof Date;return!i&&n||m(i,yt)}function A(t){return 1===t.length?t[0]:t}function b(t){return t.missingValues?t.missingValues:Xn.test(t.type)||t.stack?Be:ze}function S(t,e){var i,n=xe.current.bindPoint(t,null,e),s=n.valueFields;for(i in s)if(it.convertableToNumber(s[i]))return!0}function C(t){var e,i,n=t.start,s=t.dir,o=t.min,r=t.max,a=t.getter,h=t.hasItem,l=t.series,c=n;do c+=s,h(c)&&(i=a(c),e=S(l,i.item));while(o<=c&&c<=r&&!e);if(e)return i}function k(t,e,i,n,s){var o,r,a,h,l,c=e.min,u=e.max,p=c>0&&c<i,d=u+1<i;(p||d)&&(o=b(t),o!==ze?(p&&(r=n(c-1)),d&&(a=n(u+1))):(p&&(h=n(c-1),l=S(t,h.item),r=l?h:C({start:c,dir:-1,min:0,max:i-1,getter:n,hasItem:s,series:t})),d&&(h=n(u+1),l=S(t,h.item),a=l?h:C({start:u,dir:1,min:0,max:i-1,getter:n,hasItem:s,series:t}))),r&&(t._outOfRangeMinPoint=r),a&&(t._outOfRangeMaxPoint=a))}function P(t){return!t.pane.axes.some(function(e){return e.options.vertical===t.options.vertical&&e!==t&&e.options.visible!==!1})}function R(t){var e,i,n,s,o,r=t.length;for(i=0;i<r;i++)n=t[i],s=n.options.visible!==!1,(s||P(n))&&(o=s?n.contentBox():n.lineBox(),e?e.wrap(o):e=o.clone());return e||new Pt}function I(t,e){var i,n;for(i=0;i<t.length;i++)if(n=t[i],n&&n.pane===e)return n}function T(t){return""===t||null===t||"none"===t||"transparent"===t||!At(t)}function E(t,e,i){var n,s=e,o=t;if(t.indexOf(".")>-1){for(n=t.split(".");n.length>1;)o=n.shift(),At(s[o])||(s[o]={}),s=s[o];o=n.shift()}s[o]=i}function V(t,e,i){var n=[].concat(e instanceof Wt?t.categoryAxis:t.valueAxis);Ot(n[e.axisIndex],i)}function L(t,e,i){return Kt(t,function(t){return 0===i&&!t.categoryAxis||t.categoryAxis===e})}function O(){this._defaultPrevented=!0}function M(t,e){var i=(e||"").toLowerCase(),n=t.event,s="none"===i&&!(n.ctrlKey||n.shiftKey||n.altKey)||n[i+"Key"];return s}function B(t){var e,i,n={};for(e=0;e<t.length;e++)i=t[e],i.axis.options.name&&(n[i.axis.options.name]={min:i.range.min,max:i.range.max});return n}function z(t){var e=document.createElement("div");return t&&(e.className=t),e}function F(t){for(var e=t;e&&!Jt(e,"k-handle");)e=e.parentNode;return e}function H(t,e,i,n){var s=[].concat(i?t.yAxis:t.xAxis)[e];Ot(s,n)}function D(t){var e,i,n=it.rad(t),s=Zt(Math.sin(n),_t),o=Zt(Math.cos(n),_t);return e=Math.abs(s)>Fs?lt:o<0?vt:pt,i=Math.abs(s)<zs?lt:s<0?ut:ct,{horizontal:e,vertical:i}}function N(t,e,i,n){var s,o,r=(n.x-i.x)*(t.y-i.y)-(n.y-i.y)*(t.x-i.x),a=(n.y-i.y)*(e.x-t.x)-(n.x-i.x)*(e.y-t.y);return 0!==a&&(o=r/a,s=new kt(t.x+o*(e.x-t.x),t.y+o*(e.y-t.y))),s}function G(t,e){return t.value.x-e.value.x}function q(t){var e,i,n=[];for(e=0;e<t.length;e++)i=t[e],n[i.seriesIx]=n[i.seriesIx]||[],n[i.seriesIx].push(i);return n}function X(t,e,i,n){var s=[].concat(i?t.yAxis:t.xAxis)[e];Ot(s,n)}function Y(t){var e,i,n=ko;for(e=0;e<n.length;e++)i=n[e]+"Axes",t[i]&&(t[n[e]+"Axis"]=t[i],delete t[i])}function W(t,e){if(t)for(var i=0;i<t.length;i++)if(t[i].category===e)return[t[i]]}function U(t,e){function i(t){var e=(t||{}).color||s.color,i=Ot({},a,a[n],s,s[n],{line:{color:e},labels:{color:e},title:{color:e}},t);return delete i[n],i}var n,s,o,r,a=(e||{}).axisDefaults||{};for(r=0;r<ko.length;r++)n=ko[r]+"Axis",s=t.axisDefaults||{},o=[].concat(t[n]),o=o.map(i),t[n]=o.length>1?o:o[0]}function Z(t,e){var i,n,s,o=t.series,r=o.length,a=t.seriesDefaults,h=Ot({},t.seriesDefaults),l=e?Ot({},e.seriesDefaults):{},c=Ot({},l);for(j(h),j(c),i=0;i<r;i++)n=o[i].type||t.seriesDefaults.type,s=Ot({data:[]},c,l[n],{tooltip:t.tooltip},h,a[n]),o[i]._defaults=s,o[i]=Ot({},s,o[i]),o[i].data=o[i].data||[]}function j(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 K(t){var e,i,n,s={};for(e=0;e<t.length;e++)i=t[e],n=i.options.name,n&&(s[n]=i.range());return s}function $(t,e){void 0===e&&(e=it.dateComparer);for(var i=1,n=t.length;i<n;i++)if(e(t[i],t[i-1])<0){t.sort(e);break}return t}function J(t,e){var i,n,s,o;for(void 0===e&&(e=it.dateComparer),i=$(t,e),n=i.length,s=n>0?[i[0]]:[],o=1;o<n;o++)0!==e(i[o],Mt(s))&&s.push(i[o]);return s}function Q(t){var e,i,n,s,o=t.length,r=[];for(e=0;e<o;e++)for(i=t[e],n=i.length,s=0;s<n;s++)r[s]=r[s]||[],r[s].push(i[s]);return r}function tt(t,e){var i,n,s,o;for(i in e)!Tt(i,Vo)&&e.hasOwnProperty(i)&&(n=e[i],s=t[i],At(s)&&(o=null===n,o||!At(n)?(delete t[i],o&&delete e[i]):s&&Lt(n)&&Lt(s)&&tt(s,n)))}function et(t){for(var e=0;e<t.length;e++)t[e].notifyRender()}var it,nt,st,ot,rt,at,ht,lt,ct,ut,pt,dt,gt,ft,xt,vt,mt,yt,_t,wt,At,bt,St,Ct,kt,Pt,Rt,It,Tt,Et,Vt,Lt,Ot,Mt,Bt,zt,Ft,Ht,Dt,Nt,Gt,qt,Xt,Yt,Wt,Ut,Zt,jt,Kt,$t,Jt,Qt,te,ee,ie,ne,se,oe,re,ae,he,le,ce,ue,pe,de,ge,fe,xe,ve,me,ye,_e,we,Ae,be,Se,Ce,ke,Pe,Re,Ie,Te,Ee,Ve,Le,Oe,Me,Be,ze,Fe,He,De,Ne,Ge,qe,Xe,Ye,We,Ue,Ze,je,Ke,$e,Je,Qe,ti,ei,ii,ni,si,oi,ri,ai,hi,li,ci,ui,pi,di,gi,fi,xi,vi,mi,yi,_i,wi,Ai,bi,Si,Ci,ki,Pi,Ri,Ii,Ti,Ei,Vi,Li,Oi,Mi,Bi,zi,Fi,Hi,Di,Ni,Gi,qi,Xi,Yi,Wi,Ui,Zi,ji,Ki,$i,Ji,Qi,tn,en,nn,sn,on,rn,an,hn,ln,cn,un,pn,dn,gn,fn,xn,vn,mn,yn,_n,wn,An,bn,Sn,Cn,kn,Pn,Rn,In,Tn,En,Vn,Ln,On,Mn,Bn,zn,Fn,Hn,Dn,Nn,Gn,qn,Xn,Yn,Wn,Un,Zn,jn,Kn,$n,Jn,Qn,ts,es,is,ns,ss,os,rs,as,hs,ls,cs,us,ps,ds,gs,fs,xs,vs,ms,ys,_s,ws,As,bs,Ss,Cs,ks,Ps,Rs,Is,Ts,Es,Vs,Ls,Os,Ms,Bs,zs,Fs,Hs,Ds,Ns,Gs,qs,Xs,Ys,Ws,Us,Zs,js,Ks,$s,Js,Qs,to,eo,io,no,so,oo,ro,ao,ho,lo,co,uo,po,go,fo,xo,vo,mo,yo,_o,wo,Ao,bo,So,Co,ko,Po,Ro,Io,To,Eo,Vo;window.kendo.dataviz=window.kendo.dataviz||{},it=kendo.dataviz,nt=it.Class,st=it.isNumber,ot=it.constants,rt=ot.MAX_VALUE,at=ot.MIN_VALUE,ht=ot.VALUE,lt=ot.CENTER,ct=ot.TOP,ut=ot.BOTTOM,pt=ot.LEFT,dt=ot.WHITE,gt=ot.CIRCLE,ft=ot.X,xt=ot.Y,vt=ot.RIGHT,mt=ot.BLACK,yt=ot.DATE,_t=ot.DEFAULT_PRECISION,wt=ot.ARC,At=it.defined,bt=it.getter,St=it.isArray,Ct=it.ChartElement,kt=it.Point,Pt=it.Box,Rt=it.alignPathToPixel,It=it.setDefaultOptions,Tt=it.inArray,Et=it.isFunction,Vt=it.valueOrDefault,Lt=it.isObject,Ot=it.deepExtend,Mt=it.last,Bt=it.eventElement,zt=it.getTemplate,Ft=it.TextBox,Ht=it.ShapeElement,Dt=it.getSpacing,Nt=it.CurveProcessor,Gt=it.append,qt=it.isString,Xt=it.parseDate,Yt=it.styleValue,Wt=it.CategoryAxis,Ut=it.BoxElement,Zt=it.round,jt=it.limitValue,Kt=it.grep,$t=it.elementStyles,Jt=it.hasClasses,Qt=it.bindEvents,te=it.services,ee=it.unbindEvents,ie=kendo.support,ne=kendo.drawing,se=ne.Path,oe=ne.Animation,re=ne.AnimationFactory,ae=ne.Group,he=kendo.Color,le=kendo.geometry,ce=le.Point,ue=le.transform,pe=nt.extend({init:function(t){this._axis=t,this.options=t.options},value:function(t){var e=this._axis,i=e.getCategory?e.getCategory(t):e.getValue(t);return i},slot:function(t,e,i){return void 0===i&&(i=!0),this._axis.slot(t,e,i)},range:function(){return this._axis.range()},valueRange:function(){return this._axis.valueRange()}}),de=kendo.Class.extend({init:function(t){this.visual=t.visual,this.chartsVisual=t.chartContainer.visual,this._pane=t},findAxisByName:function(t){return e(t,this._pane.axes)}}),ge=nt.extend({init:function(t){this._plotArea=t,this.visual=t.visual,this.backgroundVisual=t._bgVisual}}),fe={min:function(t){var e,i,n=t.length,s=rt;for(e=0;e<n;e++)i=t[e],st(i)&&(s=Math.min(s,i));return s===rt?t[0]:s},max:function(t){var e,i,n=t.length,s=at;for(e=0;e<n;e++)i=t[e],st(i)&&(s=Math.max(s,i));return s===at?t[0]:s},sum:function(t){var e,i,n=t.length,s=0;for(e=0;e<n;e++)i=t[e],st(i)&&(s+=i);return s},sumOrNull:function(t){var e=null;return i(t)&&(e=fe.sum(t)),e},count:function(t){var e,i,n=t.length,s=0;for(e=0;e<n;e++)i=t[e],null!==i&&At(i)&&s++;return s},avg:function(t){var e=i(t),n=t[0];return e>0&&(n=fe.sum(t)/e),n},first:function(t){var e,i,n=t.length;for(e=0;e<n;e++)if(i=t[e],null!==i&&At(i))return i;return t[0]}},xe=nt.extend({init:function(){this._valueFields={},this._otherFields={},this._nullValue={},this._undefinedValue={}},register:function(t,e,i){var n,s,o=this;for(void 0===e&&(e=[ht]),void 0===i&&(i={}),n=0;n<t.length;n++)s=t[n],o._valueFields[s]=e,o._otherFields[s]=i,o._nullValue[s]=o._makeValue(e,null),o._undefinedValue[s]=o._makeValue(e,void 0)},canonicalFields:function(t){return this.valueFields(t).concat(this.otherFields(t))},valueFields:function(t){return this._valueFields[t.type]||[ht]},otherFields:function(t){return this._otherFields[t.type]||[ht]},bindPoint:function(t,e,i){var n,s,o,r,a,h=t.data,l=At(i)?i:h[e],c={valueFields:{value:l}},u=this.valueFields(t),p=this._otherFields[t.type];return null===l?s=this._nullValue[t.type]:At(l)?Array.isArray(l)?(o=l.slice(u.length),s=this._bindFromArray(l,u),n=this._bindFromArray(o,p)):"object"==typeof l&&(r=this.sourceFields(t,u),a=this.sourceFields(t,p),s=this._bindFromObject(l,u,r),n=this._bindFromObject(l,p,a)):s=this._undefinedValue[t.type],At(s)&&(1===u.length?c.valueFields.value=s[u[0]]:c.valueFields=s),c.fields=n||{},c},_makeValue:function(t,e){var i,n,s={},o=t.length;for(i=0;i<o;i++)n=t[i],s[n]=e;return s},_bindFromArray:function(t,e){var i,n,s={};if(e)for(i=Math.min(e.length,t.length),n=0;n<i;n++)s[e[n]]=t[n];return s},_bindFromObject:function(t,e,i){var s,o,r,a,h;if(void 0===i&&(i=e),s={},e)for(o=e.length,r=0;r<o;r++)a=e[r],h=i[r],null!==h&&(s[a]=n(h,t));return s},sourceFields:function(t,e){var i,n,s,o,r=[];if(e)for(i=e.length,n=0;n<i;n++)s=e[n],o=s===ht?"field":s+"Field",r.push(null!==t[o]?t[o]||s:null);return r}}),xe.current=new xe,ve="stderr",me="stddev",ye=/percent(?:\w*)\((\d+)\)/,_e=RegExp("^"+me+"(?:\\((\\d+(?:\\.\\d+)?)\\))?$"),we=nt.extend({init:function(t,e,i){this.initGlobalRanges(t,e,i)},initGlobalRanges:function(t,e,i){var n,s,o,r,a,h=e.data,l=_e.exec(t);l?(this.valueGetter=this.createValueGetter(e,i),n=this.getAverage(h),s=this.getStandardDeviation(h,n,!1),o=l[1]?parseFloat(l[1]):1,r={low:n.value-s*o,high:n.value+s*o},this.globalRange=function(){return r}):t.indexOf&&t.indexOf(ve)>=0&&(this.valueGetter=this.createValueGetter(e,i),a=this.getStandardError(h,this.getAverage(h)),this.globalRange=function(t){return{low:t-a,high:t+a}})},createValueGetter:function(t,e){var i,n,s,o=t.data,r=xe.current,a=r.valueFields(t),h=At(o[0])?o[0]:{};return St(h)?(n=e?a.indexOf(e):0,i=bt("["+n+"]")):st(h)?i=bt():typeof h===ot.OBJECT&&(s=r.sourceFields(t,a),i=bt(s[a.indexOf(e)])),i},getErrorRange:function(t,e){var i,n,s,o;if(!At(e))return null;if(this.globalRange)return this.globalRange(t);if(St(e))i=t-e[0],n=t+e[1];else if(st(s=parseFloat(e)))i=t-s,n=t+s;else{if(!(s=ye.exec(e)))throw Error("Invalid ErrorBar value: "+e);o=t*(parseFloat(s[1])/100),i=t-Math.abs(o),n=t+Math.abs(o)}return{low:i,high:n}},getStandardError:function(t,e){return this.getStandardDeviation(t,e,!0)/Math.sqrt(e.count)},getStandardDeviation:function(t,e,i){var n,s,o=this,r=t.length,a=i?e.count-1:e.count,h=0;for(n=0;n<r;n++)s=o.valueGetter(t[n]),st(s)&&(h+=Math.pow(s-e.value,2));return Math.sqrt(h/a)},getAverage:function(t){var e,i,n=this,s=t.length,o=0,r=0;for(e=0;e<s;e++)i=n.valueGetter(t[e]),st(i)&&(o+=i,r++);return{value:o/r,count:r}}}),Ae=ie.browser||{},be=600,Se="fadeIn",Ce="glass",ke=.8,Pe=5,Re=Ae.msie?.001:0,Ie="errorLow",Te="errorHigh",Ee="xErrorLow",Ve="xErrorHigh",Le="yErrorLow",Oe="yErrorHigh",Me=8,Be="zero",ze="interpolate",Fe="gap",He="above",De="below",Ne="smooth",Ge="step",qe="area",Xe="bar",Ye="boxPlot",We="bubble",Ue="bullet",Ze="candlestick",je="column",Ke="donut",$e="funnel",Je="heatmap",Qe="horizontalWaterfall",ti="line",ei="ohlc",ii="pie",ni="polarArea",si="polarLine",oi="polarScatter",ri="radarArea",ai="radarColumn",hi="radarLine",li="rangeArea",ci="rangeBar",ui="rangeColumn",pi="scatter",di="scatterLine",gi="verticalArea",fi="verticalBoxPlot",xi="verticalBullet",vi="verticalLine",mi="verticalRangeArea",yi="waterfall",_i=[Xe,je,ei,Ze,Ye,fi,Ue,ui,ci,yi,Qe],wi="legendItemClick",Ai="legendItemHover",bi="legendItemLeave",Si="seriesClick",Ci="seriesHover",ki="seriesOver",Pi="seriesLeave",Ri="plotAreaClick",Ii="plotAreaHover",Ti="plotAreaLeave",Ei="drag",Vi="dragEnd",Li="dragStart",Oi="zoomStart",Mi="zoom",Bi="zoomEnd",zi="selectStart",Fi="select",Hi="selectEnd",Di="render",Ni="showTooltip",Gi="hideTooltip",qi="paneRender",Xi="log",Yi="category",Wi="insideEnd",Ui="insideBase",Zi="outsideEnd",ji="DOMMouseScroll mousewheel",Ki=150,$i={INITIAL_ANIMATION_DURATION:be,FADEIN:Se,LEGEND_ITEM_CLICK:wi,LEGEND_ITEM_HOVER:Ai,LEGEND_ITEM_LEAVE:bi,SERIES_CLICK:Si,SERIES_HOVER:Ci,SERIES_OVER:ki,SERIES_LEAVE:Pi,GLASS:Ce,BORDER_BRIGHTNESS:ke,TOOLTIP_OFFSET:Pe,START_SCALE:Re,ERROR_LOW_FIELD:Ie,ERROR_HIGH_FIELD:Te,X_ERROR_LOW_FIELD:Ee,X_ERROR_HIGH_FIELD:Ve,Y_ERROR_LOW_FIELD:Le,Y_ERROR_HIGH_FIELD:Oe,LINE_MARKER_SIZE:Me,INTERPOLATE:ze,ZERO:Be,SMOOTH:Ne,STEP:Ge,CATEGORY:Yi,FUNNEL:$e,BAR:Xe,CANDLESTICK:Ze,PIE:ii,COLUMN:je,AREA:qe,VERTICAL_BULLET:xi,BOX_PLOT:Ye,OHLC:ei,WATERFALL:yi,LINE:ti,BULLET:Ue,VERTICAL_LINE:vi,VERTICAL_AREA:gi,RANGE_AREA:li,VERTICAL_RANGE_AREA:mi,RANGE_COLUMN:ui,VERTICAL_BOX_PLOT:fi,RANGE_BAR:ci,HORIZONTAL_WATERFALL:Qe,SCATTER:pi,SCATTER_LINE:di,BUBBLE:We,RADAR_AREA:ri,RADAR_LINE:hi,RADAR_COLUMN:ai,POLAR_LINE:si,POLAR_AREA:ni,POLAR_SCATTER:oi,RENDER:Di,PLOT_AREA_CLICK:Ri,PLOT_AREA_HOVER:Ii,PLOT_AREA_LEAVE:Ti,LOGARITHMIC:Xi,DRAG:Ei,DRAG_START:Li,DRAG_END:Vi,ZOOM_START:Oi,ZOOM:Mi,ZOOM_END:Bi,SELECT_START:zi,SELECT:Fi,SELECT_END:Hi,PANE_RENDER:qi,GAP:Fe,DONUT:Ke,INSIDE_END:Wi,INSIDE_BASE:Ui,OUTSIDE_END:Zi,MOUSEWHEEL:ji,MOUSEWHEEL_DELAY:Ki,SHOW_TOOLTIP:Ni,HIDE_TOOLTIP:Gi,EQUALLY_SPACED_SERIES:_i,ABOVE:He,BELOW:De,HEATMAP:Je},Ji=4,Qi=Ct.extend({init:function(t,e,i,n,s,o){Ct.fn.init.call(this,o),this.low=t,this.high=e,this.isVertical=i,this.chart=n,this.series=s},reflow:function(t){var e,i=this.options.endCaps,n=this.isVertical,s=this.getAxis(),o=s.getSlot(this.low,this.high),r=t.center(),a=this.getCapsWidth(t,n),h=n?r.x:r.y,l=h-a,c=h+a;n?(e=[new kt(r.x,o.y1),new kt(r.x,o.y2)],i&&e.push(new kt(l,o.y1),new kt(c,o.y1),new kt(l,o.y2),new kt(c,o.y2)),this.box=new Pt(l,o.y1,c,o.y2)):(e=[new kt(o.x1,r.y),new kt(o.x2,r.y)],i&&e.push(new kt(o.x1,l),new kt(o.x1,c),new kt(o.x2,l),new kt(o.x2,c)),this.box=new Pt(o.x1,l,o.x2,c)),this.linePoints=e},getCapsWidth:function(t,e){var i=e?t.width():t.height(),n=Math.min(Math.floor(i/2),Ji)||Ji;return n},createVisual:function(){var t=this,e=this.options,i=e.visual;i?this.visual=i({low:this.low,high:this.high,rect:this.box.toRect(),sender:this.getSender(),options:{endCaps:e.endCaps,color:e.color,line:e.line},createVisual:function(){t.createDefaultVisual();var e=t.visual;return delete t.visual,e}}):this.createDefaultVisual()},createDefaultVisual:function(){var t,e,i=this,n=this,s=n.options,o=n.linePoints,r={stroke:{color:s.color,width:s.line.width,dashType:s.line.dashType}};for(Ct.fn.createVisual.call(this),t=0;t<o.length;t+=2)e=new se(r).moveTo(o[t].x,o[t].y).lineTo(o[t+1].x,o[t+1].y),Rt(e),i.visual.append(e)}}),It(Qi,{animation:{type:Se,delay:be},endCaps:!0,line:{width:2},zIndex:1}),tn=Qi.extend({getAxis:function(){var t=this.chart.seriesValueAxis(this.series);return t}}),en=5,nn=Ct.extend({init:function(t,e){Ct.fn.init.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()},render:function(){this.traverseDataPoints(this.addValue.bind(this))},pointOptions:function(t,e){var i,n=this.seriesOptions[e];return n||(i=this.pointType().prototype.defaults,this.seriesOptions[e]=n=Ot({},i,{vertical:!this.options.invertAxes},t)),n},plotValue:function(t){var e,i,n,s,o,r,a,h;if(!t)return 0;if(this.options.isStacked100&&st(t.value)){for(e=t.categoryIx,i=this.categoryPoints[e],n=[],s=0,o=0;o<i.length;o++)if(r=i[o]){if(a=t.series.stack,h=r.series.stack,a&&h&&a.group!==h.group)continue;st(r.value)&&(s+=Math.abs(r.value),n.push(Math.abs(r.value)))}if(s>0)return t.value/s}return t.value},plotRange:function(t,e){var i,n,s,o,r,a,h,l,c,u,p,d,g,f=this;if(void 0===e&&(e=0),i=this.categoryPoints[t.categoryIx],this.options.isStacked){for(n=this.plotValue(t),s=n>=0,o=e,r=!1,a=0;a<i.length&&(h=i[a],t!==h);a++){if(l=t.series.stack,c=h.series.stack,l&&c){if(typeof l===ot.STRING&&l!==c)continue;if(l.group&&l.group!==c.group)continue}u=f.plotValue(h),(u>=0&&s||u<0&&!s)&&(o+=u,n+=u,r=!0,f.options.isStacked100&&(n=Math.min(n,1)))}return r&&(o-=e),[o,n]}return p=t.series,d=this.seriesValueAxis(p),g=this.categoryAxisCrossingValue(d),[g,it.convertableToNumber(t.value)?t.value:g]},stackLimits:function(t,e){var i,n,s,o,r,a=this,h=rt,l=at;for(i=0;i<this.categoryPoints.length;i++)if(n=a.categoryPoints[i])for(s=0;s<n.length;s++)o=n[s],o&&(o.series.stack!==e&&o.series.axis!==t||(r=a.plotRange(o,0)[1],At(r)&&isFinite(r)&&(l=Math.max(l,r),h=Math.min(h,r))));return{min:h,max:l}},updateStackRange:function(){var t,e,i,n,s,o,r=this,a=this.options,h=a.isStacked,l=a.series,c={};if(h)for(t=0;t<l.length;t++)e=l[t],i=e.axis,n=i+e.stack,s=c[n],s||(s=r.stackLimits(i,e.stack),o=r.errorTotals,o&&(o.negative.length&&(s.min=Math.min(s.min,it.sparseArrayLimits(o.negative).min)),o.positive.length&&(s.max=Math.max(s.max,it.sparseArrayLimits(o.positive).max))),s.min!==rt||s.max!==at?c[n]=s:s=null),s&&(r.valueAxisRanges[i]=s)},addErrorBar:function(t,e,i){var n,s=t.value,o=t.series,r=t.seriesIx,a=t.options.errorBars,h=e.fields[Ie],l=e.fields[Te];st(h)&&st(l)?n={low:h,high:l}:a&&At(a.value)&&(this.seriesErrorRanges=this.seriesErrorRanges||[],this.seriesErrorRanges[r]=this.seriesErrorRanges[r]||new we(a.value,o,ht),n=this.seriesErrorRanges[r].getErrorRange(s,a.value)),n&&(t.low=n.low,t.high=n.high,this.addPointErrorBar(t,i))},addPointErrorBar:function(t,e){var i,n,s,o=!this.options.invertAxes,r=t.options.errorBars,a=t.series,h=t.low,l=t.high;this.options.isStacked?(i=this.stackedErrorRange(t,e),h=i.low,l=i.high):(n={categoryIx:e,series:a},this.updateRange({value:h},n),this.updateRange({value:l},n)),s=new tn(h,l,o,this,a,r),t.errorBars=[s],t.append(s)},stackedErrorRange:function(t,e){var i=this.plotRange(t,0)[1]-t.value,n=t.low+i,s=t.high+i;return this.errorTotals=this.errorTotals||{positive:[],negative:[]},n<0&&(this.errorTotals.negative[e]=Math.min(this.errorTotals.negative[e]||0,n)),s>0&&(this.errorTotals.positive[e]=Math.max(this.errorTotals.positive[e]||0,s)),{low:n,high:s}},addValue:function(e,i){var n,s,o=i.categoryIx,r=i.series,a=i.seriesIx,h=this.categoryPoints[o];h||(this.categoryPoints[o]=h=[]),n=this.seriesPoints[a],n||(this.seriesPoints[a]=n=[]),s=this.createPoint(e,i),s&&(t.extend(s,i),s.owner=this,s.noteText=e.fields.noteText,At(s.dataItem)||(s.dataItem=r.data[o]),this.addErrorBar(s,e,o)),this.points.push(s),n.push(s),h.push(s),this.updateRange(e.valueFields,i)},evalPointOptions:function(t,e,i,n,o,r){var a,h={defaults:o._defaults,excluded:["data","aggregate","_events","tooltip","content","template","visual","toggle","_outOfRangeMinPoint","_outOfRangeMaxPoint"]},l=this._evalSeries[r];return At(l)||(this._evalSeries[r]=l=s(t,{},h,!0)),a=t,l&&(a=Ot({},a),s(a,{value:e,category:i,index:n,series:o,dataItem:o.data[n]},h)),a},updateRange:function(t,e){var i=e.series.axis,n=t.value,s=this.valueAxisRanges[i];isFinite(n)&&null!==n&&(s=this.valueAxisRanges[i]=s||{min:rt,max:at},s.min=Math.min(s.min,n),s.max=Math.max(s.max,n))},seriesValueAxis:function(t){var e=this.plotArea,i=t.axis,n=i?e.namedValueAxes[i]:e.valueAxis;if(!n)throw Error("Unable to locate value axis with name "+i);return n},reflow:function(t){var e=this,i=this.categorySlots=[],n=this.points,s=this.categoryAxis,o=0;this.traverseDataPoints(function(t,r){var a,h,l,c=r.categoryIx,u=r.series,p=e.seriesValueAxis(u),d=n[o++],g=i[c];g||(i[c]=g=e.categorySlot(s,c,p)),d&&(a=e.plotRange(d,p.startValue()),h=e.valueSlot(p,a),h?(l=e.pointSlot(g,h),d.aboveAxis=e.aboveAxis(d,p),d.stackValue=a[1],e.options.isStacked100&&(d.percentage=e.plotValue(d)),e.reflowPoint(d,l)):d.visible=!1)}),this.reflowCategories(i),!this.options.clip&&this.options.limitPoints&&this.points.length&&this.limitPoints(),this.box=t},valueSlot:function(t,e){return t.getSlot(e[0],e[1],!this.options.clip)},limitPoints:function(){var t,e=this,i=this.categoryPoints,n=i[0].concat(Mt(i));for(t=0;t<n.length;t++)n[t]&&e.limitPoint(n[t])},limitPoint:function(t){var e=this.categoryAxis.limitSlot(t.box);e.equals(t.box)||t.reflow(e)},aboveAxis:function(t,e){var i=this.categoryAxisCrossingValue(e),n=t.value;return e.options.reverse?n<i:n>=i},categoryAxisCrossingValue:function(t){var e=this.categoryAxis,i=t.options,n=[].concat(i.axisCrossingValues||i.axisCrossingValue);return n[e.axisIndex||0]||0},reflowPoint:function(t,e){t.reflow(e)},reflowCategories:function(){},pointSlot:function(t,e){var i=this.options,n=i.invertAxes,s=n?e:t,o=n?t:e;return new Pt(s.x1,o.y1,s.x2,o.y2)},categorySlot:function(t,e){return t.getSlot(e)},traverseDataPoints:function(t){var e,i,n,s,r,a,h,l=this,c=this.options.series,u=o(c),p=c.length;for(e=0;e<p;e++)l._outOfRangeCallback(c[e],"_outOfRangeMinPoint",e,t);for(i=0;i<u;i++)for(n=0;n<p;n++)s=c[n],r=l.categoryAxis.categoryAt(i),a=l._bindPoint(s,n,i),t(a,{category:r,categoryIx:i,categoriesCount:u,series:s,seriesIx:n});for(h=0;h<p;h++)l._outOfRangeCallback(c[h],"_outOfRangeMaxPoint",h,t)},_outOfRangeCallback:function(t,e,i,n){var s,o,r=t[e];r&&(s=r.categoryIx,o=this._bindPoint(t,i,s,r.item),n(o,{category:r.category,categoryIx:s,series:t,seriesIx:i,dataItem:r.item}))},_bindPoint:function(t,e,i,n){var s,o;return this._bindCache||(this._bindCache=[]),s=this._bindCache[e],s||(s=this._bindCache[e]=[]),o=s[i],o||(o=s[i]=xe.current.bindPoint(t,i,n)),o},formatPointValue:function(t,e){return null===t.value?"":this.chartService.format.auto(e,t.value)},pointValue:function(t){return t.valueFields.value}}),It(nn,{series:[],invertAxes:!1,isStacked:!1,clip:!0,limitPoints:!0}),sn={click:function(t,e){return t.trigger(Si,this.eventArgs(e))},hover:function(t,e){return t.trigger(Ci,this.eventArgs(e))},over:function(t,e){return t.trigger(ki,this.eventArgs(e))},out:function(t,e){return t.trigger(Pi,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:Bt(t),originalEvent:t,point:this}}},on={createNote:function(){var t=this.options.notes,e=this.noteText||t.label.text;t.visible!==!1&&At(e)&&null!==e&&(this.note=new it.Note({value:this.value,text:e,dataItem:this.dataItem,category:this.category,series:this.series},this.options.notes,this.owner.chartService),this.append(this.note))}},rn=Ct.extend({init:function(t,e){Ct.fn.init.call(this),this.value=t,this.options=e,this.aboveAxis=Vt(this.options.aboveAxis,!0),this.tooltipTracking=!0},render:function(){var t,e,i,n=this.options,s=n.markers,o=n.labels;this._rendered||(this._rendered=!0,s.visible&&s.size&&(this.marker=this.createMarker(),this.append(this.marker)),o.visible&&(t=zt(o),e=this.pointData(),i=this.value,t?i=t(e):o.format&&(i=this.formatValue(o.format)),this.label=new Ft(i,Ot({align:lt,vAlign:lt,margin:{left:5,right:5},zIndex:Vt(o.zIndex,this.series.zIndex)},o),e),this.append(this.label)),this.createNote(),this.errorBar&&this.append(this.errorBar))},markerBorder:function(){var t=this.options.markers,e=t.background,i=Ot({color:this.color},t.border);return At(i.color)||(i.color=new he(e).brightness(ke).toHex()),i},createVisual:function(){},createMarker:function(){var t=this.options.markers,e=new Ht({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:Vt(t.zIndex,this.series.zIndex),animation:t.animation,visual:t.visual},{dataItem:this.dataItem,value:this.value,series:this.series,category:this.category});return e},markerBox:function(){return this.marker||(this.marker=this.createMarker(),this.marker.reflow(this._childBox)),this.marker.box},reflow:function(t){var e,i,n,s,o=this,r=this,a=r.options,h=r.aboveAxis,l=a.vertical;if(this.render(),this.box=t,e=t.clone(),l?h?e.y1-=e.height():e.y2+=e.height():h?e.x1+=e.width():e.x2-=e.width(),this._childBox=e,this.marker&&this.marker.reflow(e),this.reflowLabel(e),this.errorBars)for(i=0;i<this.errorBars.length;i++)o.errorBars[i].reflow(e);this.note&&(n=this.markerBox(),a.markers.visible&&a.markers.size||(s=n.center(),n=new Pt(s.x,s.y,s.x,s.y)),this.note.reflow(n))},reflowLabel:function(t){var e=this,i=e.options,n=e.label,s=i.labels.position;n&&(s=s===He?ct:s,s=s===De?ut:s,n.reflow(t),n.box.alignTo(this.markerBox(),s),n.reflow(n.box))},createHighlight:function(){var t=this.options.highlight.markers,e=this.markerBorder().color,i=this.options.markers,n=i.size+(i.border.width||0)+(t.border.width||0),s=new Ht({type:i.type,width:n,height:n,rotation:i.rotation,background:t.color||e,border:{color:t.border.color,width:t.border.width,opacity:Vt(t.border.opacity,1)},opacity:Vt(t.opacity,1)});return s.reflow(this._childBox),s.getElement()},highlightVisual:function(){return(this.marker||{}).visual},highlightVisualArgs:function(){var t,e,i,n,s,o=this.marker;return o?(e=o.paddingBox.toRect(),t=o.visual):(i=this.options.markers.size,n=i/2,s=this.box.center(),e=new le.Rect([s.x-n,s.y-n],[i,i])),{options:this.options,rect:e,visual:t}},tooltipAnchor:function(){var t,e,i,n,s=this.markerBox(),o=this.owner.pane.clipBox(),r=!o||o.overlaps(s);if(r)return t=s.x2+Pe,e=pt,this.aboveAxis?(i=s.y1,n=ut):(i=s.y2,n=ct),{point:new kt(t,i),align:{horizontal:e,vertical:n}}},formatValue:function(t){return this.owner.formatPointValue(this,t)},overlapsBox:function(t){var e=this.markerBox();return e.overlaps(t)},unclipElements:function(){this.label&&(this.label.options.noclip=!0),this.note&&(this.note.options.noclip=!0)},pointData:function(){return{dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,stackValue:this.stackValue,series:this.series}}}),rn.prototype.defaults={vertical:!0,markers:{visible:!0,background:dt,size:Me,type:gt,border:{width:2},opacity:1},labels:{visible:!1,position:He,margin:Dt(3),padding:Dt(4),animation:{type:Se,delay:be}},notes:{label:{}},highlight:{markers:{border:{color:"#fff",width:2}},zIndex:ot.HIGHLIGHT_ZINDEX},errorBars:{line:{width:1}}},Ot(rn.prototype,sn),Ot(rn.prototype,on),an=Ct.extend({init:function(t,e,i){Ct.fn.init.call(this),this.linePoints=t,this.series=e,this.seriesIx=i},points:function(){return this.toGeometryPoints(this.linePoints)},toGeometryPoints:function(t){var e,i,n=[];for(e=0,i=t.length;e<i;e++)t[e]&&t[e].visible!==!1&&n.push(t[e]._childBox.toRect().center());return n},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&&!At(this.visual.options.zIndex)&&(this.visual.options.zIndex=this.series.zIndex)):this.segmentVisual()},segmentVisual:function(){var t,e=this,i=e.options,n=e.series,s=n.color,o=n._defaults;Et(s)&&o&&(s=o.color),t=se.fromPoints(this.points(),{stroke:{color:s,width:n.width,opacity:n.opacity,dashType:n.dashType},zIndex:n.zIndex}),i.closed&&t.close(),this.visual=t},aliasFor:function(t,e){return this.parent.getNearestPoint(e.x,e.y,this.seriesIx)}}),It(an,{closed:!1}),hn={calculateStepPoints:function(t){var e,i,n,s=this.parent.plotArea.seriesCategoryAxis(this.series),o=s.options,a=o.justified,h=o.vertical,l=o.reverse,c=h?ft:xt,u=h?xt:ft,p=l?2:1,d=p,g=r(t[0],c,p,u,d),f=[g];for(e=1;e<t.length;e++)i=r(t[e],c,p,u,d),g[c]!==i[c]&&(n=new ce,n[c]=g[c],n[u]=i[u],f.push(n,i)),g=i;return a?g!==Mt(f)&&f.push(g):f.push(r(Mt(t),c,p,u,l?1:2)),f}},ln=an.extend({points:function(){return this.calculateStepPoints(this.linePoints)}}),Ot(ln.prototype,hn),cn=an.extend({segmentVisual:function(){var t,e,i,n=this.series,s=n._defaults,o=n.color;Et(o)&&s&&(o=s.color),t=new Nt(this.options.closed),e=t.process(this.points()),i=new se({stroke:{color:o,width:n.width,opacity:n.opacity,dashType:n.dashType},zIndex:n.zIndex}),i.segments.push.apply(i.segments,e),this.visual=i}}),un={renderSegments:function(){var t,e,i,n,s,o,r,a,h=this,l=this,c=l.options,u=l.seriesPoints,p=c.series,d=u.length;for(this._segments=[],e=0;e<d;e++){for(i=p[e],n=h.sortPoints(u[e]),s=n.length,o=[],r=0;r<s;r++)a=n[r],a?o.push(a):h.seriesMissingValues(i)!==ze&&(o.length>1&&(t=h.createSegment(o,i,e,t),h._addSegment(t)),o=[]);o.length>1&&(t=h.createSegment(o,i,e,t),h._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){var e=t.missingValues,i=!e&&this.options.isStacked;return i?Be:e||ze},getNearestPoint:function(t,e,i){var n,s,o,r,a,h=new kt(t,e),l=this.seriesPoints[i],c=rt;for(s=0;s<l.length;s++)o=l[s],o&&At(o.value)&&null!==o.value&&o.visible!==!1&&(r=o.box,a=r.center().distanceTo(h),a<c&&(n=o,c=a));return n}},pn=oe.extend({setup:function(){this._setEnd(this.options.box.x1)},step:function(t){var e=this.options.box;this._setEnd(it.interpolateValue(e.x1,e.x2,t))},_setEnd:function(t){var e=this.element,i=e.segments,n=i[1].anchor(),s=i[2].anchor();e.suspend(),n.setX(t),e.resume(),s.setX(t)}}),It(pn,{duration:be}),re.current.register("clip",pn),dn={createAnimation:function(){var t,e,i=this.getRoot();i&&(i.options||{}).transitions!==!1&&(t=i.size(),e=se.fromRect(t.toRect()),this.visual.clip(e), this.animation=new pn(e,{box:t}),a(this.options.series)&&this._setChildrenAnimation(e))},_setChildrenAnimation:function(t){var e,i,n=this.animationPoints();for(e=0;e<n.length;e++)i=n[e],i&&i.visual&&At(i.visual.options.zIndex)&&i.visual.clip(t)}},gn=nn.extend({render:function(){nn.fn.render.call(this),this.updateStackRange(),this.renderSegments()},pointType:function(){return rn},createPoint:function(t,e){var i,n,s,o=e.categoryIx,r=e.category,a=e.series,h=e.seriesIx,l=this.seriesMissingValues(a),c=t.valueFields.value;if(!At(c)||null===c){if(l!==Be)return null;c=0}return i=this.pointOptions(a,h),i=this.evalPointOptions(i,c,r,o,a,h),n=t.fields.color||a.color,Et(a.color)&&(n=i.color),s=new rn(c,i),s.color=n,this.append(s),s},plotRange:function(t){var e,i,n,s,o=this,r=this.plotValue(t);if(this.options.isStacked)for(e=t.categoryIx,i=this.categoryPoints[e],n=0;n<i.length&&(s=i[n],t!==s);n++)r+=o.plotValue(s),o.options.isStacked100&&(r=Math.min(r,1));return[r,r]},createSegment:function(t,e,i){var n,s=e.style;return new(n=s===Ge?ln:s===Ne?cn:an)(t,e,i)},animationPoints:function(){var t,e=this.points,i=[];for(t=0;t<e.length;t++)i.push((e[t]||{}).marker);return i.concat(this._segments)},supportsPointInactiveOpacity:function(){return!1}}),Ot(gn.prototype,un,dn),fn=an.extend({init:function(t,e,i,n,s){an.fn.init.call(this,t,e,i),this.prevSegment=n,this.stackPoints=s},createVisual:function(){var t=this.series,e=t._defaults,i=t.line||{},n=t.color;Et(n)&&e&&(n=e.color),this.visual=new ae({zIndex:t.zIndex}),this.createFill({fill:{color:n,opacity:t.opacity},stroke:null}),i.width>0&&i.visible!==!1&&this.createStroke({stroke:Ot({color:n,opacity:t.opacity,lineCap:"butt"},i)})},strokeSegments:function(){var t=this._strokeSegments;return t||(t=this._strokeSegments=this.createStrokeSegments()),t},createStrokeSegments:function(){return this.segmentsFromPoints(this.points())},stackSegments:function(){return this.prevSegment?this.prevSegment.createStackSegments(this.stackPoints):this.createStackSegments(this.stackPoints)},createStackSegments:function(t){return this.segmentsFromPoints(this.toGeometryPoints(t)).reverse()},segmentsFromPoints:function(t){return t.map(function(t){return new le.Segment(t)})},createStroke:function(t){var e=new se(t);e.segments.push.apply(e.segments,this.strokeSegments()),this.visual.append(e)},hasStackSegment:function(){return this.prevSegment||this.stackPoints&&this.stackPoints.length},createFill:function(t){var e,i,n=this.strokeSegments(),s=n.slice(0),o=this.hasStackSegment();o&&(e=this.stackSegments(),Gt(s,e)),i=new se(t),i.segments.push.apply(i.segments,s),!o&&n.length>1&&this.fillToAxes(i),this.visual.append(i)},fillToAxes:function(t){var e=this.parent,i=e.options.invertAxes,n=e.seriesValueAxis(this.series),s=e.categoryAxisCrossingValue(n),o=n.getSlot(s,s,!0),r=this.strokeSegments(),a=r[0].anchor(),h=Mt(r).anchor(),l=i?o.x1:o.y1;i?t.lineTo(l,h.y).lineTo(l,a.y):t.lineTo(h.x,l).lineTo(a.x,l)}}),xn=fn.extend({createStrokeSegments:function(){return this.segmentsFromPoints(this.calculateStepPoints(this.linePoints))},createStackSegments:function(t){return this.segmentsFromPoints(this.calculateStepPoints(t)).reverse()}}),Ot(xn.prototype,hn),vn=fn.extend({createStrokeSegments:function(){var t=new Nt(this.options.closed),e=this.points();return t.process(e)},createStackSegments:function(){var t,e,i=this.strokeSegments(),n=[];for(t=i.length-1;t>=0;t--)e=i[t],n.push(new le.Segment(e.anchor(),e.controlOut(),e.controlIn()));return n}}),mn=gn.extend({createSegment:function(t,e,i,n){var s,o,r,a,h=this.options.isStacked,l=(e.line||{}).style;return h&&i>0&&n&&(r=this.seriesMissingValues(e),"gap"!==r?(o=n.linePoints,s=n):o=this._gapStackPoints(t,i,l)),new(a=l===Ge?xn:l===Ne?vn:fn)(t,e,i,s,o)},reflow:function(t){var e,i,n,s,o=this;if(gn.fn.reflow.call(this,t),e=this._stackPoints)for(i=0;i<e.length;i++)n=e[i],s=o.categoryAxis.getSlot(n.categoryIx),n.reflow(s)},_gapStackPoints:function(t,e,i){var n,s,o,r,a,h,l,c,u=this,p=this.seriesPoints,d=t[0].categoryIx,g=t.length;for(d<0&&(d=0,g--),n=d+g,s=this.seriesOptions[0]._outOfRangeMinPoint?1:0,o=[],this._stackPoints=this._stackPoints||[],r=d;r<n;r++){a=r+s,h=e,l=void 0;do h--,l=p[h][a];while(h>0&&!l);l?(i!==Ge&&r>d&&!p[h][a-1]&&o.push(u._previousSegmentPoint(r,a,a-1,h)),o.push(l),i!==Ge&&r+1<n&&!p[h][a+1]&&o.push(u._previousSegmentPoint(r,a,a+1,h))):(c=u._createGapStackPoint(r),u._stackPoints.push(c),o.push(c))}return o},_previousSegmentPoint:function(t,e,i,n){for(var s,o=this.seriesPoints,r=n;r>0&&!s;)r--,s=o[r][i];return s?s=o[r][e]:(s=this._createGapStackPoint(t),this._stackPoints.push(s)),s},_createGapStackPoint:function(t){var e=this.pointOptions({},0),i=new rn(0,e);return i.categoryIx=t,i.series={},i},seriesMissingValues:function(t){return t.missingValues||Be},supportsPointInactiveOpacity:function(){return!1}}),yn=nt.extend({init:function(){this.axisRanges={}},update:function(t){var e,i,n,s=this.axisRanges;for(e in t)i=t[e],n=s[e],s[e]=n=n||{min:rt,max:at},n.min=Math.min(n.min,i.min),n.max=Math.max(n.max,i.max)},reset:function(t){this.axisRanges[t]=void 0},query:function(t){return this.axisRanges[t]}}),_n=Ct.extend({init:function(t,e,i){Ct.fn.init.call(this,e),this.textBox=new Ft(t,this.options,i),this.append(this.textBox)},createVisual:function(){this.textBox.options.noclip=this.options.noclip},reflow:function(t){var e=this.options,i=e.vertical,n=e.aboveAxis,s=this.children[0],o=s.options,r=s.box,a=s.options.padding,h=t;o.align=i?lt:pt,o.vAlign=i?ct:lt,e.position===Wi?i?(o.vAlign=ct,!n&&r.height()<t.height()&&(o.vAlign=ut)):o.align=n?vt:pt:e.position===lt?(o.vAlign=lt,o.align=lt):e.position===Ui?i?o.vAlign=n?ut:ct:o.align=n?pt:vt:e.position===Zi&&(i?h=n?new Pt(t.x1,t.y1-r.height(),t.x2,t.y1):new Pt(t.x1,t.y2,t.x2,t.y2+r.height()):(o.align=lt,h=n?new Pt(t.x2,t.y1,t.x2+r.width(),t.y2):new Pt(t.x1-r.width(),t.y1,t.x1,t.y2))),e.rotation||(i?a.left=a.right=(h.width()-s.contentBox.width())/2:a.top=a.bottom=(h.height()-s.contentBox.height())/2),s.reflow(h)},alignToClipBox:function(t){var e,i=this.options.vertical,n=i?xt:ft,s=n+"1",o=n+"2",r=this.children[0],a=this.parent.box;(a[s]<t[s]||t[o]<a[o])&&(e=r.paddingBox.clone(),e[s]=Math.max(a[s],t[s]),e[o]=Math.min(a[o],t[o]),this.reflow(e))}}),It(_n,{position:Zi,margin:Dt(3),padding:Dt(4),color:mt,background:"",border:{width:1,color:""},aboveAxis:!0,vertical:!1,animation:{type:Se,delay:be},zIndex:2}),wn=6,An=Ct.extend({init:function(t,e){Ct.fn.init.call(this),this.options=e,this.color=e.color||dt,this.aboveAxis=Vt(this.options.aboveAxis,!0),this.value=t},render:function(){this._rendered||(this._rendered=!0,this.createLabel(),this.createNote(),this.errorBar&&this.append(this.errorBar))},createLabel:function(){var t,e,i,n=this.options,s=n.labels;s.visible&&(t=this.pointData(),e=zt(s),i=e?e(t):this.formatValue(s.format),this.label=new _n(i,Ot({vertical:n.vertical},s),t),this.append(this.label))},formatValue:function(t){return this.owner.formatPointValue(this,t)},reflow:function(t){var e,i,n=this;if(this.render(),e=this.label,this.box=t,e&&(e.options.aboveAxis=this.aboveAxis,e.reflow(t)),this.note&&this.note.reflow(t),this.errorBars)for(i=0;i<this.errorBars.length;i++)n.errorBars[i].reflow(t)},createVisual:function(){var t,e=this,i=this,n=i.box,s=i.options,o=s.visual;this.visible!==!1&&(Ct.fn.createVisual.call(this),o?(t=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:n.toRect(),createVisual:function(){var t=new ae;return e.createRect(t),t},options:s}),t&&this.visual.append(t)):n.width()>0&&n.height()>0&&this.createRect(this.visual))},createRect:function(t){var e,i,n,s,o,r=this.options,a=r.border,l=At(a.opacity)?a.opacity:r.opacity,c=this.box.toRect();c.size.width=Math.round(c.size.width),e=this.rectVisual=se.fromRect(c,{fill:{color:this.color,opacity:r.opacity},stroke:{color:this.getBorderColor(),width:a.width,opacity:l,dashType:a.dashType}}),i=this.box.width(),n=this.box.height(),s=r.vertical?i:n,s>wn&&(Rt(e),(i<1||n<1)&&(e.options.stroke.lineJoin="round")),t.append(e),h(r)&&(o=this.createGradientOverlay(e,{baseColor:this.color},Ot({end:r.vertical?void 0:[0,1]},r.overlay)),t.append(o))},createHighlight:function(t){var e=se.fromRect(this.box.toRect(),t);return Rt(e)},highlightVisual:function(){return this.rectVisual},highlightVisualArgs:function(){return{options:this.options,rect:this.box.toRect(),visual:this.rectVisual}},getBorderColor:function(){var t=this.color,e=this.options.border,i=e._brightness||ke,n=e.color;return At(n)||(n=new he(t).brightness(i).toHex()),n},tooltipAnchor:function(){var t,e,i,n,s=this,o=s.options,r=s.box,a=s.aboveAxis,h=this.owner.pane.clipBox()||r,l=pt,c=ct;return o.vertical?(t=Math.min(r.x2,h.x2)+Pe,a?e=Math.max(r.y1,h.y1):(e=Math.min(r.y2,h.y2),c=ut)):(i=Math.max(r.x1,h.x1),n=Math.min(r.x2,h.x2),o.isStacked?(c=ut,a?(l=vt,t=n):t=i,e=Math.max(r.y1,h.y1)-Pe):(a?t=n+Pe:(t=i-Pe,l=vt),e=Math.max(r.y1,h.y1))),{point:new kt(t,e),align:{horizontal:l,vertical:c}}},overlapsBox:function(t){return this.box.overlaps(t)},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}}}),Ot(An.prototype,sn),Ot(An.prototype,on),An.prototype.defaults={border:{width:1},vertical:!0,overlay:{gradient:"glass"},labels:{visible:!1,format:"{0}"},opacity:1,notes:{label:{}}},bn=Ct.extend({init:function(t){Ct.fn.init.call(this,t),this.forEach=t.rtl?c:l},reflow:function(t){var e=this.options,i=e.vertical,n=e.gap,s=e.spacing,o=this.children,r=o.length,a=i?xt:ft,h=r+n+s*(r-1),l=(i?t.height():t.width())/h,c=t[a+1]+l*(n/2);this.forEach(o,function(e,i){var n=(e.box||t).clone();n[a+1]=c,n[a+2]=c+l,e.reflow(n),i<r-1&&(c+=l*s),c+=l})}}),It(bn,{vertical:!1,gap:0,spacing:0}),Sn=Ct.extend({reflow:function(t){var e,i,n,s=this,o=this.options.vertical?ft:xt,r=this.children,a=r.length,h=this.box=new Pt;for(e=0;e<a;e++)i=r[e],i.visible!==!1&&(n=i.box.clone(),n.snapTo(t,o),0===e&&(h=s.box=n.clone()),i.reflow(n),h.wrap(n))}}),It(Sn,{vertical:!0}),Cn=nn.extend({render:function(){nn.fn.render.call(this),this.updateStackRange()},pointType:function(){return An},clusterType:function(){return bn},stackType:function(){return Sn},stackLimits:function(t,e){var i=nn.fn.stackLimits.call(this,t,e);return i},createPoint:function(t,e){var i,n,s,o,r,a,h=e.categoryIx,l=e.category,c=e.series,u=e.seriesIx,p=this,d=p.options,g=p.children,f=d.isStacked,x=this.pointValue(t),v=this.pointOptions(c,u),m=v.labels;return f&&m.position===Zi&&(m.position=Wi),v.isStacked=f,i=t.fields.color||c.color,x<0&&v.negativeColor&&(i=v.negativeColor),v=this.evalPointOptions(v,x,l,h,c,u),Et(c.color)&&(i=v.color),n=this.pointType(),s=new n(x,v),s.color=i,o=g[h],o||(r=this.clusterType(),o=new r({vertical:d.invertAxes,gap:d.gap,spacing:d.spacing,rtl:!d.invertAxes&&(this.chartService||{}).rtl}),this.append(o)),f?(a=this.getStackWrap(c,o),a.append(s)):o.append(s),s},getStackWrap:function(t,e){var i,n,s,o=t.stack,r=o?o.group||o:o,a=e.children;if(typeof r===ot.STRING){for(n=0;n<a.length;n++)if(a[n]._stackGroup===r){i=a[n];break}}else i=a[0];return i||(s=this.stackType(),i=new s({vertical:!this.options.invertAxes}),i._stackGroup=r,e.append(i)),i},categorySlot:function(t,e,i){var n,s,o=this.options,r=t.getSlot(e),a=i.startValue();return o.isStacked&&(n=i.getSlot(a,a,!0),s=o.invertAxes?ft:xt,r[s+1]=r[s+2]=n[s+1]),r},reflowCategories:function(t){var e,i=this.children,n=i.length;for(e=0;e<n;e++)i[e].reflow(t[e])},createAnimation:function(){this._setAnimationOptions(),nn.fn.createAnimation.call(this),a(this.options.series)&&this._setChildrenAnimation()},_setChildrenAnimation:function(){var t,e,i,n=this,s=this.points;for(t=0;t<s.length;t++)e=s[t],i=e.visual,i&&At(i.options.zIndex)&&(e.options.animation=n.options.animation,e.createAnimation())},_setAnimationOptions:function(){var t,e,i=this.options,n=i.animation||{};i.isStacked?(e=this.seriesValueAxis(i.series[0]),t=e.getSlot(e.startValue())):t=this.categoryAxis.getSlot(0),n.origin=new ce(t.x1,t.y1),n.vertical=!i.invertAxes}}),It(Cn,{animation:{type:Xe}}),kn=Ct.extend({init:function(t,e){Ct.fn.init.call(this,e),this.value=t},reflow:function(t){var e,i,n=this,s=n.options,o=n.value,r=n.owner,a=r.seriesValueAxis(s),h=a.getSlot(o.open,o.close),l=a.getSlot(o.low,o.high);h.x1=l.x1=t.x1,h.x2=l.x2=t.x2,this.realBody=h,e=l.center().x,i=[],i.push([[e,l.y1],[e,h.y1]]),i.push([[e,h.y2],[e,l.y2]]),this.lines=i,this.box=l.clone().wrap(h),this._rendered||(this._rendered=!0,this.createNote()),this.reflowNote()},reflowNote:function(){this.note&&this.note.reflow(this.box)},createVisual:function(){Ct.fn.createVisual.call(this),this._mainVisual=this.mainVisual(this.options),this.visual.append(this._mainVisual),this.createOverlay()},mainVisual:function(t){var e=new ae;return this.createBody(e,t),this.createLines(e,t),e},createBody:function(t,e){var i=se.fromRect(this.realBody.toRect(),{fill:{color:this.color,opacity:e.opacity},stroke:null});e.border.width>0&&i.options.set("stroke",{color:this.getBorderColor(),width:e.border.width,dashType:e.border.dashType,opacity:Vt(e.border.opacity,e.opacity)}),Rt(i),t.append(i),h(e)&&t.append(this.createGradientOverlay(i,{baseColor:this.color},Ot({end:e.vertical?void 0:[0,1]},e.overlay)))},createLines:function(t,e){this.drawLines(t,e,this.lines,e.line)},drawLines:function(t,e,i,n){var s,o,r;if(i)for(s={stroke:{color:n.color||this.color,opacity:Vt(n.opacity,e.opacity),width:n.width,dashType:n.dashType,lineCap:"butt"}},o=0;o<i.length;o++)r=se.fromPoints(i[o],s),Rt(r),t.append(r)},getBorderColor:function(){var t=this.options.border,e=t.color;return At(e)||(e=new he(this.color).brightness(t._brightness).toHex()),e},createOverlay:function(){var t=se.fromRect(this.box.toRect(),{fill:{color:dt,opacity:0},stroke:null});this.visual.append(t)},createHighlight:function(){var t,e=this.options.highlight,i=this.color;return this.color=e.color||this.color,t=this.mainVisual(Ot({},this.options,{line:{color:this.getBorderColor()}},e)),this.color=i,t},highlightVisual:function(){return this._mainVisual},highlightVisualArgs:function(){return{options:this.options,rect:this.box.toRect(),visual:this._mainVisual}},tooltipAnchor:function(){var t=this.box,e=this.owner.pane.clipBox()||t;return{point:new kt(t.x2+Pe,Math.max(t.y1,e.y1)+Pe),align:{horizontal:pt,vertical:ct}}},formatValue:function(t){return this.owner.formatPointValue(this,t)},overlapsBox:function(t){return this.box.overlaps(t)}}),It(kn,{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:{}}}),Ot(kn.prototype,sn),Ot(kn.prototype,on),Pn=nn.extend({reflowCategories:function(t){var e,i=this.children,n=i.length;for(e=0;e<n;e++)i[e].reflow(t[e])},addValue:function(t,e){var i,n,s=e.categoryIx,o=e.category,r=e.series,a=e.seriesIx,h=this,l=h.children,c=h.options,p=t.valueFields,d=this.splitValue(p),g=u(d),f=r.data[s],x=this.categoryPoints[s];x||(this.categoryPoints[s]=x=[]),g&&(i=this.createPoint(t,e)),n=l[s],n||(n=new bn({vertical:c.invertAxes,gap:c.gap,spacing:c.spacing,rtl:!c.invertAxes&&(this.chartService||{}).rtl}),this.append(n)),i&&(this.updateRange(p,e),n.append(i),i.categoryIx=s,i.category=o,i.series=r,i.seriesIx=a,i.owner=this,i.dataItem=f,i.noteText=t.fields.noteText),this.points.push(i),x.push(i)},pointType:function(){return kn},createPoint:function(t,e){var i,n=e.categoryIx,s=e.category,o=e.series,r=e.seriesIx,a=this.pointType(),h=t.valueFields,l=Ot({},o),c=t.fields.color||o.color;return l=this.evalPointOptions(l,h,s,n,o,r),o.type===Ze&&h.open>h.close&&(c=t.fields.downColor||o.downColor||o.color),Et(o.color)&&(c=l.color),l.vertical=!this.options.invertAxes,i=new a(h,l),i.color=c,i},splitValue:function(t){return[t.low,t.open,t.close,t.high]},updateRange:function(t,e){var i=e.series.axis,n=this.splitValue(t),s=this.valueAxisRanges[i];s=this.valueAxisRanges[i]=s||{min:rt,max:at},s=this.valueAxisRanges[i]={min:Math.min.apply(Math,n.concat([s.min])),max:Math.max.apply(Math,n.concat([s.max]))}},formatPointValue:function(t,e){var i=t.value;return this.chartService.format.auto(e,i.open,i.high,i.low,i.close,t.category)},animationPoints:function(){return this.points}}),Ot(Pn.prototype,dn),Rn=kn.extend({init:function(t,e){kn.fn.init.call(this,t,e),this.createNote()},reflow:function(t){var e,i,n,s,o=this,r=o.options,a=o.value,h=o.owner,l=h.seriesValueAxis(r);this.boxSlot=i=l.getSlot(a.q1,a.q3),this.realBody=i,this.reflowBoxSlot(t),this.whiskerSlot=e=l.getSlot(a.lower,a.upper),this.reflowWhiskerSlot(t),n=l.getSlot(a.median),a.mean&&(s=l.getSlot(a.mean),this.meanPoints=this.calcMeanPoints(t,s)),this.whiskerPoints=this.calcWhiskerPoints(i,e),this.medianPoints=this.calcMedianPoints(t,n),this.box=e.clone().wrap(i),this.reflowNote()},reflowBoxSlot:function(t){this.boxSlot.x1=t.x1,this.boxSlot.x2=t.x2},reflowWhiskerSlot:function(t){this.whiskerSlot.x1=t.x1,this.whiskerSlot.x2=t.x2},calcMeanPoints:function(t,e){return[[[t.x1,e.y1],[t.x2,e.y1]]]},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]]]},calcMedianPoints:function(t,e){return[[[t.x1,e.y1],[t.x2,e.y1]]]},renderOutliers:function(t){var e,i,n,s,o=this,r=this.value,a=r.outliers||[],h=3*Math.abs(r.q3-r.q1),l=[],c=t.markers||{};for(e=0;e<a.length;e++)i=a[e],c=i<r.q3+h&&i>r.q1-h?t.outliers:t.extremes,n=Ot({},c.border),At(n.color)||(n.color=At(o.color)?o.color:new he(c.background).brightness(ke).toHex()),s=new Ht({type:c.type,width:c.size,height:c