@progress/kendo-charts 1.23.4-dev.202205040416 → 1.23.4
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(t,e){var r={};return{setters:[function(t){r.Class=t.Class,r.Color=t.Color,r.drawing=t.drawing,r.geometry=t.geometry,r.logToConsole=t.logToConsole,r.parseColor=t.parseColor,r.support=t.support,r.throttle=t.throttle}],execute:function(){t((()=>{"use strict";var o={100:t=>{t.exports=r}},i={};function i1(t){var e=i[t];if(void 0!==e)return e.exports;e=i[t]={exports:{}};return o[t](e,e.exports,i1),e.exports}i1.d=(t,e)=>{for(var o in e)i1.o(e,o)&&!i1.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},i1.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i1.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r1={};return(()=>{i1.r(r1),i1.d(r1,{Aggregates:()=>qi,ArcGauge:()=>bd,ArcScale:()=>cd,AreaChart:()=>ts,AreaSegment:()=>Gn,ArrowLinearPointer:()=>Mu,Axis:()=>yo,AxisGroupRangeTracker:()=>os,AxisLabel:()=>Ke,Bar:()=>hs,BarChart:()=>_s,BarLabel:()=>ns,BarLinearPointer:()=>Vu,Barcode:()=>tg,Box:()=>B,BoxElement:()=>Ae,BoxPlot:()=>Es,BoxPlotChart:()=>Vs,BubbleChart:()=>Zs,Bullet:()=>ea,BulletChart:()=>ra,Candlestick:()=>Cs,CandlestickChart:()=>Ps,CategoricalChart:()=>mn,CategoricalErrorBar:()=>fn,CategoricalPlotArea:()=>Bp,CategoryAxis:()=>qo,Chart:()=>bc,ChartAxis:()=>ji,ChartContainer:()=>ga,ChartElement:()=>o,ChartPane:()=>Fi,ChartPlotArea:()=>Ni,ChartService:()=>po,CircularGauge:()=>Cd,Class:()=>b.Class,ClipAnimation:()=>Vn,ClusterLayout:()=>fs,Crosshair:()=>ua,CrosshairTooltip:()=>ha,CurveProcessor:()=>Ii,DateCategoryAxis:()=>ei,DateValueAxis:()=>ui,DefaultAggregates:()=>Na,DomEventsBuilder:()=>co,DonutChart:()=>Jh,DonutPlotArea:()=>el,DonutSegment:()=>Yh,ErrorBarBase:()=>un,ErrorRangeCalculator:()=>er,Extent:()=>Rv,FloatElement:()=>ze,FontLoader:()=>Xt,FormatService:()=>so,Gauge:()=>hu,Gradients:()=>Oe,HashMap:()=>At,Highlight:()=>Lp,InstanceObserver:()=>Mt,IntlService:()=>io,Legend:()=>oh,LegendItem:()=>Kp,LegendLayout:()=>Zp,LineChart:()=>Fn,LinePoint:()=>Cn,LineSegment:()=>An,LinearGauge:()=>Uu,LinearPointer:()=>bu,LinearScale:()=>yu,Location:()=>ky,LogarithmicAxis:()=>vi,Map:()=>Gx,MousewheelZoom:()=>qp,Navigator:()=>Nc,NavigatorHint:()=>Vc,Note:()=>to,NumericAxis:()=>hi,OHLCChart:()=>xp,OHLCPoint:()=>vp,Pane:()=>xa,Pannable:()=>Dp,PieAnimation:()=>kh,PieChart:()=>Nh,PieChartMixin:()=>jh,PiePlotArea:()=>Wh,PieSegment:()=>Vh,PlotAreaBase:()=>Va,PlotAreaEventsMixin:()=>ja,PlotAreaFactory:()=>nh,Point:()=>O,PointEventsMixin:()=>xn,PolarAxis:()=>Si,QRCode:()=>uy,RadarCategoryAxis:()=>bi,RadarLogarithmicAxis:()=>Ei,RadarNumericAxis:()=>Ti,RadialGauge:()=>pd,RadialPointer:()=>rd,RadialScale:()=>Zu,RangeAreaChart:()=>gp,RangeAreaPoint:()=>ip,RangeBar:()=>Xa,RangeBarChart:()=>Qa,RangePointer:()=>xd,Ring:()=>ye,RootElement:()=>Ee,ScatterChart:()=>Ns,ScatterErrorBar:()=>Ds,ScatterLineChart:()=>Th,Sector:()=>me,Selection:()=>ch,SeriesAggregator:()=>Da,SeriesBinder:()=>Ki,ShapeBuilder:()=>be,ShapeElement:()=>Me,SharedTooltip:()=>yh,Sparkline:()=>Bc,SplineAreaSegment:()=>$n,SplineSegment:()=>Ln,StackWrap:()=>vs,StockChart:()=>Xc,TemplateService:()=>mt,Text:()=>He,TextBox:()=>We,Title:()=>Ye,Tooltip:()=>dh,WaterfallChart:()=>kp,WaterfallSegment:()=>Cp,XYPlotArea:()=>Rh,ZoomSelection:()=>Wp,addClass:()=>it,alignPathToPixel:()=>st,anyHasZIndex:()=>jn,append:()=>Lt,appendIfNotNull:()=>_a,areNumbers:()=>Ss,autoMajorUnit:()=>le,autoTextColor:()=>Jt,barcodeValidator:()=>og,bindEvents:()=>It,bindSegments:()=>wa,categoriesCount:()=>yn,chartBaseTheme:()=>o1,clockwise:()=>at,constants:()=>z,convertableToNumber:()=>ht,countNumbers:()=>Wi,createHashSet:()=>ae,createOutOfRangePoints:()=>Ba,deepExtend:()=>x,defaultErrorHandler:()=>pe,defined:()=>P,deg:()=>zt,elementOffset:()=>Vt,elementScale:()=>$t,elementSize:()=>jt,elementStyles:()=>gt,equalsIgnoreCase:()=>Ca,evalOptions:()=>gn,eventCoordinates:()=>Dt,eventElement:()=>Ht,filterSeriesByType:()=>Sa,find:()=>Yt,findAxisByName:()=>Di,getDateField:()=>ka,getField:()=>Yi,getSpacing:()=>A,getTemplate:()=>xt,getter:()=>wt,grep:()=>Ct,hasClasses:()=>St,hasGradientOverlay:()=>ss,hasValue:()=>Hs,hashKey:()=>Ut,inArray:()=>u,interpolateValue:()=>Pt,isArray:()=>ot,isDateAxis:()=>Aa,isFunction:()=>lt,isNumber:()=>m,isObject:()=>ut,isString:()=>pt,keys:()=>he,last:()=>Ft,limitValue:()=>_,logToConsole:()=>b.logToConsole,map:()=>Ot,mousewheelDelta:()=>Rt,objectKey:()=>Nt,qrcodeValidator:()=>dy,rad:()=>Gt,rectToBox:()=>Ue,removeClass:()=>nt,round:()=>T,segmentVisible:()=>ba,setDefaultOptions:()=>e,singleItemOrArray:()=>Pa,sparseArrayLimits:()=>qt,styleValue:()=>dt,unbindEvents:()=>Wt,valueOrDefault:()=>M});var z={},V=(i1.r(z),i1.d(z,{NAVIGATOR_AXIS:()=>Hc,NAVIGATOR_PANE:()=>Dc}),"arc"),j="#000",D="bottom",w="center",H="circle",U="cross",F="date",N="12px sans-serif",g=10,G=/\{\d+:?/,W="height",X="inside",C="left",q=Number.MAX_VALUE,Y=-Number.MAX_VALUE,Z="none",Q="object",K="outside",S="right",$="roundedRect",J="string",k="top",tt="value",a="#fff",et="width",y="x",v="y";function ot(t){return Array.isArray(t)}function it(t,e){for(var o=ot(e)?e:[e],i=0;i<o.length;i++){var r=o[i];-1===t.className.indexOf(r)&&(t.className+=" "+r)}}var rt=/\s+/g;function nt(t,e){t&&t.className&&(t.className=t.className.replace(e,"").replace(rt," "))}var b=i1(100);function st(t){var e=.5;t.options.stroke&&b.drawing.util.defined(t.options.stroke.width)&&t.options.stroke.width%2==0&&(e=0);for(var o=0;o<t.segments.length;o++)t.segments[o].anchor().round(0).translate(e,e);return t}function at(t,e){return-t.x*e.y+t.y*e.x<0}function m(t){return"number"==typeof t&&!isNaN(t)}function pt(t){return typeof t===J}function ht(t){return m(t)||pt(t)&&isFinite(t)}function lt(t){return"function"==typeof t}var ct="object";function x(t){for(var e=arguments,o=arguments.length,i=1;i<o;i++)!function t(e,o){for(var i in o){var r,n=o[i],s=typeof n;(r=s===ct&&null!==n?n.constructor:null)&&r!==Array?n instanceof Date?e[i]=new Date(n.getTime()):lt(n.clone)?e[i]=n.clone():(r=e[i],e[i]=typeof r===ct&&r||{},t(e[i],n)):"undefined"!=s&&(e[i]=n)}}(t,e[i]);return t}function ut(t){return"object"==typeof t}function dt(t){return m(t)?t+"px":t}var ft=/width|height|top|left|bottom|right/i;function gt(t,e){var o=pt(e)?[e]:e;if(ot(o)){for(var i={},r=window.getComputedStyle(t),n=0;n<o.length;n++){var s=o[n];i[s]=ft.test(s)?parseFloat(r[s]):r[s]}return i}if(ut(e))for(var a in e)t.style[a]=dt(e[a])}function A(t,e){void 0===e&&(e=0);var o={top:0,right:0,bottom:0,left:0};return"number"==typeof t?o.top=o.right=o.bottom=o.left=t:(o.top=t.top||e,o.right=t.right||e,o.bottom=t.bottom||e,o.left=t.left||e),o}function yt(){}var vt={compile:function(t){return t}};yt.register=function(t){vt=t},yt.compile=function(t){return vt.compile(t)};const mt=yt;function xt(t){var e;return(t=void 0===t?{}:t).template?t.template=e=mt.compile(t.template):lt(t.content)&&(e=t.content),e}var _t=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g,bt={};function wt(t){if(bt[t])return bt[t];var r=[];return t.replace(_t,function(t,e,o,i){r.push(b.drawing.util.defined(e)?e:o||i)}),bt[t]=function(t){for(var e=t,o=0;o<r.length&&e;o++)e=e[r[o]];return e},bt[t]}function Ct(t,e){for(var o=t.length,i=[],r=0;r<o;r++)e(t[r])&&i.push(t[r]);return i}function St(t,e){if(t.className)for(var o=e.split(" "),i=0;i<o.length;i++)if(-1!==t.className.indexOf(o[i]))return!0}bt[void 0]=function(t){return t};function kt(){this._map={}}kt.prototype.get=function(t){return this._map[this._key(t)]},kt.prototype.set=function(t,e){this._map[this._key(t)]=e},kt.prototype._key=function(t){return t instanceof Date?t.getTime():t};const At=kt;function u(t,e){if(e)return-1!==e.indexOf(t)}function Pt(t,e,o){return b.drawing.util.round(t+(e-t)*o,3)}function Tt(t,e){this.observer=t,this.handlerMap=x({},this.handlerMap,e)}Tt.prototype.trigger=function(t,e){var o,i=this.observer,r=this.handlerMap;return r[t]?o=this.callObserver(r[t],e):i.trigger&&(o=this.callObserver("trigger",t,e)),o},Tt.prototype.callObserver=function(t){for(var e=[],o=arguments.length-1;0<o--;)e[o]=arguments[o+1];return this.observer[t].apply(this.observer,e)},Tt.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};const Mt=Tt;function Ot(t,e){for(var o=t.length,i=[],r=0;r<o;r++){var n=e(t[r]);b.drawing.util.defined(n)&&i.push(n)}return i}var Bt=b.support.browser||{};function Rt(t){var e=0;return t.wheelDelta?(e=-t.wheelDelta/120,Bt.webkit&&(e/=2*Math.max(window.devicePixelRatio,.625))):t.detail&&(e=t.detail/3),0<e?Math.ceil(e):Math.floor(e)}function Et(){}var t=b.drawing.util,Lt=t.append,It=t.bindEvents,P=t.defined,zt=t.deg,Vt=t.elementOffset,jt=t.elementSize,Dt=t.eventCoordinates,Ht=t.eventElement,Ut=t.hashKey,Ft=t.last,_=t.limitValue,Nt=t.objectKey,Gt=t.rad,T=t.round,Wt=t.unbindEvents,M=t.valueOrDefault;Et.fetchFonts=function(o,i,r){void 0===r&&(r={depth:0}),!o||5<r.depth||!document.fonts||Object.keys(o).forEach(function(t){var e=o[t];"dataSource"!==t&&"$"!==t[0]&&e&&("font"===t?i.push(e):"object"==typeof e&&(r.depth++,Et.fetchFonts(e,i,r),r.depth--))})},Et.loadFonts=function(t,e){var o=[];if(0<t.length&&document.fonts){try{o=t.map(function(t){return document.fonts.load(t)})}catch(t){(0,b.logToConsole)(t)}Promise.all(o).then(e,e)}else e()},Et.preloadFonts=function(t,e){var o=[];Et.fetchFonts(t,o),Et.loadFonts(o,e)};const Xt=Et;function e(t,e){t=t.prototype;t.options?t.options=x({},t.options,e):t.options=e}function qt(t){for(var e=q,o=Y,i=0,r=t.length;i<r;i++){var n=t[i];null!==n&&isFinite(n)&&(e=Math.min(e,n),o=Math.max(o,n))}return{min:e===q?void 0:e,max:o===Y?void 0:o}}function Yt(t,e){for(var o=0;o<t.length;o++){var i=t[o];if(e(i,o,t))return i}}var Zt=b.geometry.Matrix,Qt=/matrix\((.*)\)/;function Kt(t){var t=getComputedStyle(t).transform;return"none"===t?Zt.unit():(t=t.match(Qt),null===t||2!==t.length?Zt.unit():(t=t[1].split(",").map(function(t){return parseFloat(t)}),new(Function.prototype.bind.apply(Zt,[null].concat(t)))))}function $t(t){if(!t)return Zt.unit();for(var e=Kt(t),o=t.parentElement;o;)var i=Kt(o),e=e.multiplyCopy(i),o=o.parentElement;return e.b=e.c=e.e=e.f=0,e}const Jt=function(t){return new b.Color(t).isDark()?a:j};var te,ee,oe,ie,re={},ne=function(t){this._index={},this._values=t?t.slice(0):[];for(var e=0;e<this._values.length;e++)this._index[this._values[e]]=e},t={size:{configurable:!0}},se=(ne.prototype.values=function(){return this._values.filter(function(t){return t!==re})},ne.prototype.has=function(t){return void 0!==this._index[t]},ne.prototype.add=function(t){this.has(t)||(this._index[t]=this._values.length,this._values.push(t))},ne.prototype.delete=function(t){var e=this._index[t];void 0!==e&&(this._values[e]=re,delete this._index[t])},ne.prototype.clear=function(){this._index={},this._values=[]},t.size.get=function(){return this._values.length},Object.defineProperties(ne.prototype,t),function(t){this._set=new Set(t)}),t={size:{configurable:!0}};function ae(t){return e=!1,new((e="function"==typeof Set?new Set([1]).has(1):e)?se:ne)(t);var e}function pe(t){throw t}se.prototype.values=function(){return Array.from(this._set)},se.prototype.has=function(t){return this._set.has(t)},se.prototype.add=function(t){this._set.add(t)},se.prototype.delete=function(t){this._set.delete(t)},se.prototype.clear=function(){this._set.clear()},t.size.get=function(){return this._set.size},Object.defineProperties(se.prototype,t);const he={INSERT:45,DELETE:46,BACKSPACE:8,TAB:9,ENTER:13,ESC:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,END:35,HOME:36,SPACEBAR:32,PAGEUP:33,PAGEDOWN:34,F2:113,F10:121,F12:123,NUMPAD_PLUS:107,NUMPAD_MINUS:109,NUMPAD_DOT:110};function le(t,e){t=T(e-t,9);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=T(t/e,g);return T(e*(t<1.904762?.2:t<4.761904?.5:t<9.523809?1:2),g)}(te=b.Class)&&(ce.__proto__=te),((ce.prototype=Object.create(te&&te.prototype)).constructor=ce).prototype.clone=function(){return new ce(this.x,this.y)},ce.prototype.equals=function(t){return t&&this.x===t.x&&this.y===t.y},ce.prototype.rotate=function(t,e){var e=Gt(e),o=Math.cos(e),e=Math.sin(e),i=t.x,t=t.y,r=this.x,n=this.y;return this.x=T(i+(r-i)*o+(n-t)*e,3),this.y=T(t+(n-t)*o-(r-i)*e,3),this},ce.prototype.multiply=function(t){return this.x*=t,this.y*=t,this},ce.prototype.distanceTo=function(t){var e=this.x-t.x,t=this.y-t.y;return Math.sqrt(e*e+t*t)},ce.onCircle=function(t,e,o){e=Gt(e);return new ce(t.x-o*Math.cos(e),t.y-o*Math.sin(e))};const O=ce;function ce(t,e){te.call(this),this.x=t||0,this.y=e||0}function ue(t,e,o,i){ee.call(this),this.x1=t||0,this.y1=e||0,this.x2=o||0,this.y2=i||0}function de(t,e,o,i,r){r=Gt(r);return new O(o+(t-o)*Math.cos(r)+(e-i)*Math.sin(r),i-(t-o)*Math.sin(r)+(e-i)*Math.cos(r))}(ee=b.Class)&&(ue.__proto__=ee),((ue.prototype=Object.create(ee&&ee.prototype)).constructor=ue).prototype.equals=function(t){return this.x1===t.x1&&this.x2===t.x2&&this.y1===t.y1&&this.y2===t.y2},ue.prototype.width=function(){return this.x2-this.x1},ue.prototype.height=function(){return this.y2-this.y1},ue.prototype.translate=function(t,e){return this.x1+=t,this.x2+=t,this.y1+=e,this.y2+=e,this},ue.prototype.move=function(t,e){var o=this.height(),i=this.width();return P(t)&&(this.x1=t,this.x2=this.x1+i),P(e)&&(this.y1=e,this.y2=this.y1+o),this},ue.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},ue.prototype.wrapPoint=function(t){var e=ot(t),o=e?t[0]:t.x,e=e?t[1]:t.y;return this.wrap(new ue(o,e,o,e)),this},ue.prototype.snapTo=function(t,e){return e!==y&&e||(this.x1=t.x1,this.x2=t.x2),e!==v&&e||(this.y1=t.y1,this.y2=t.y2),this},ue.prototype.alignTo=function(t,e){var o,i,r=this.height(),n=this.width(),s=e===k||e===D?v:y,a=s==v?r:n;return e===w?(o=t.center(),i=this.center(),this.x1+=o.x-i.x,this.y1+=o.y-i.y):this[s+1]=e===k||e===C?t[s+1]-a:t[s+2],this.x2=this.x1+n,this.y2=this.y1+r,this},ue.prototype.shrink=function(t,e){return this.x2-=t,this.y2-=e,this},ue.prototype.expand=function(t,e){return this.shrink(-t,-e),this},ue.prototype.pad=function(t){t=A(t);return this.x1-=t.left,this.x2+=t.right,this.y1-=t.top,this.y2+=t.bottom,this},ue.prototype.unpad=function(t){t=A(t);return t.left=-t.left,t.top=-t.top,t.right=-t.right,t.bottom=-t.bottom,this.pad(t)},ue.prototype.clone=function(){return new ue(this.x1,this.y1,this.x2,this.y2)},ue.prototype.center=function(){return new O(this.x1+this.width()/2,this.y1+this.height()/2)},ue.prototype.containsPoint=function(t){return t.x>=this.x1&&t.x<=this.x2&&t.y>=this.y1&&t.y<=this.y2},ue.prototype.points=function(){return[new O(this.x1,this.y1),new O(this.x2,this.y1),new O(this.x2,this.y2),new O(this.x1,this.y2)]},ue.prototype.getHash=function(){return[this.x1,this.y1,this.x2,this.y2].join(",")},ue.prototype.overlaps=function(t){return!(t.y2<this.y1||this.y2<t.y1||t.x2<this.x1||this.x2<t.x1)},ue.prototype.rotate=function(t){var e=this.width(),o=this.height(),i=this.center(),r=i.x,i=i.y,n=de(0,0,r,i,t),s=de(e,0,r,i,t),a=de(e,o,r,i,t),r=de(0,o,r,i,t),e=Math.max(n.x,s.x,a.x,r.x)-Math.min(n.x,s.x,a.x,r.x),o=Math.max(n.y,s.y,a.y,r.y)-Math.min(n.y,s.y,a.y,r.y);return this.x2=this.x1+e,this.y2=this.y1+o,this},ue.prototype.toRect=function(){return new b.geometry.Rect([this.x1,this.y1],[this.width(),this.height()])},ue.prototype.hasSize=function(){return 0!==this.width()&&0!==this.height()},ue.prototype.align=function(t,e,o){var i=e+1,r=e+2,e=e===y?et:W,n=this[e]();u(o,[C,k])?(this[i]=t[i],this[r]=this[i]+n):u(o,[S,D])?(this[r]=t[r],this[i]=this[r]-n):o===w&&(this[i]=t[i]+(t[e]()-n)/2,this[r]=this[i]+n)};const B=ue;function fe(t,e,o,i,r){oe.call(this),this.center=t,this.innerRadius=e,this.radius=o,this.startAngle=i,this.angle=r}function ge(t,e){return t-e}(oe=b.Class)&&(fe.__proto__=oe),((fe.prototype=Object.create(oe&&oe.prototype)).constructor=fe).prototype.clone=function(){return new fe(this.center,this.innerRadius,this.radius,this.startAngle,this.angle)},fe.prototype.middle=function(){return this.startAngle+this.angle/2},fe.prototype.setRadius=function(t,e){return e?this.innerRadius=t:this.radius=t,this},fe.prototype.point=function(t,e){var t=Gt(t),o=Math.cos(t),t=Math.sin(t),e=e?this.innerRadius:this.radius,o=T(this.center.x-o*e,3),t=T(this.center.y-t*e,3);return new O(o,t)},fe.prototype.adjacentBox=function(t,e,o){var t=this.clone().expand(t),i=t.middle(),t=t.point(i),r=e/2,n=o/2,s=Math.sin(Gt(i)),i=Math.cos(Gt(i)),a=t.x-r,t=t.y-n;return Math.abs(s)<.9&&(a+=r*-i/Math.abs(i)),Math.abs(i)<.9&&(t+=n*-s/Math.abs(s)),new B(a,t,a+e,t+o)},fe.prototype.containsPoint=function(t){var e=this.center,o=this.innerRadius,i=this.radius,r=this.startAngle,n=this.startAngle+this.angle,s=t.x-e.x,t=t.y-e.y,a=new O(s,t),r=this.point(r),r=new O(r.x-e.x,r.y-e.y),n=this.point(n),n=new O(n.x-e.x,n.y-e.y),e=T(s*s+t*t,3);return(r.equals(a)||at(r,a))&&!at(n,a)&&o*o<=e&&e<=i*i},fe.prototype.getBBox=function(){for(var t=new B(q,q,Y,Y),e=T(this.startAngle%360),o=T((e+this.angle)%360),i=this.innerRadius,r=[0,90,180,270,e,o].sort(ge),n=r.indexOf(e),s=r.indexOf(o),a=e===o?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,i)}return i||t.wrapPoint(this.center),t},fe.prototype.expand=function(t){return this.radius+=t,this};const ye=fe;function ve(t,e,o,i){ie.call(this,t,0,e,o,i)}(ie=ye)&&(ve.__proto__=ie),((ve.prototype=Object.create(ie&&ie.prototype)).constructor=ve).prototype.expand=function(t){return ie.prototype.expand.call(this,t)},ve.prototype.clone=function(){return new ve(this.center,this.radius,this.startAngle,this.angle)},ve.prototype.setRadius=function(t){return this.radius=t,this};const me=ve;(xe=b.Class)&&(_e.__proto__=xe),((_e.prototype=Object.create(xe&&xe.prototype)).constructor=_e).prototype.createRing=function(t,e){var o=t.startAngle+180,i=t.angle+o,r=(0<t.angle&&o===i&&(i+=.001),new b.geometry.Point(t.center.x,t.center.y)),n=Math.max(t.radius,0),t=Math.max(t.innerRadius,0),n=new b.geometry.Arc(r,{startAngle:o,endAngle:i,radiusX:n,radiusY:n}),e=b.drawing.Path.fromArc(n,e).close();return t?(n.radiusX=n.radiusY=t,n=n.pointAt(i),e.lineTo(n.x,n.y),e.arc(i,o,t,t,!0)):e.lineTo(r.x,r.y),e};var xe,t=_e;function _e(){xe.apply(this,arguments)}t.current=new t;const be=t;(we=b.Class)&&(Ce.__proto__=we),((Ce.prototype=Object.create(we&&we.prototype)).constructor=Ce).prototype.initUserOptions=function(t){return t},Ce.prototype.reflow=function(t){for(var e,o=this.children,i=0;i<o.length;i++){var r=o[i];r.reflow(t),e=e?e.wrap(r.box):r.box.clone()}this.box=e||t},Ce.prototype.destroy=function(){var t=this.children;this.animation&&this.animation.destroy();for(var e=0;e<t.length;e++)t[e].destroy()},Ce.prototype.getRoot=function(){var t=this.parent;return t?t.getRoot():null},Ce.prototype.getSender=function(){var t=this.getService();if(t)return t.sender},Ce.prototype.getService=function(){for(var t=this;t;){if(t.chartService)return t.chartService;t=t.parent}},Ce.prototype.translateChildren=function(t,e){for(var o=this.children,i=o.length,r=0;r<i;r++)o[r].box.translate(t,e)},Ce.prototype.append=function(){for(var t=arguments,e=0;e<arguments.length;e++){var o=t[e];this.children.push(o),o.parent=this}},Ce.prototype.renderVisual=function(){!1!==this.options.visible&&(this.createVisual(),this.addVisual(),this.renderChildren(),this.createAnimation(),this.renderComplete())},Ce.prototype.addVisual=function(){this.visual&&((this.visual.chartElement=this).parent&&this.parent.appendVisual(this.visual))},Ce.prototype.renderChildren=function(){for(var t=this.children,e=t.length,o=0;o<e;o++)t[o].renderVisual()},Ce.prototype.createVisual=function(){this.visual=new b.drawing.Group({zIndex:this.options.zIndex,visible:M(this.options.visible,!0)})},Ce.prototype.createAnimation=function(){this.visual&&this.options.animation&&(this.animation=b.drawing.Animation.create(this.visual,this.options.animation))},Ce.prototype.appendVisual=function(t){t.chartElement||(t.chartElement=this),t.options.noclip?this.clipRoot().visual.append(t):P(t.options.zIndex)?this.stackRoot().stackVisual(t):this.isStackRoot?this.stackVisual(t):this.visual?this.visual.append(t):this.parent.appendVisual(t)},Ce.prototype.clipRoot=function(){return this.parent?this.parent.clipRoot():this},Ce.prototype.stackRoot=function(){return this.parent?this.parent.stackRoot():this},Ce.prototype.stackVisual=function(t){for(var e=t.options.zIndex||0,o=this.visual.children,i=o.length,r=0;r<i;r++){var n=o[r];if(M(n.options.zIndex,0)>e)break}this.visual.insert(r,t)},Ce.prototype.traverse=function(t){for(var e=this.children,o=e.length,i=0;i<o;i++){var r=e[i];t(r),r.traverse&&r.traverse(t)}},Ce.prototype.closest=function(t){for(var e=this,o=!1;e&&!o;)(o=t(e))||(e=e.parent);if(o)return e},Ce.prototype.renderComplete=function(){},Ce.prototype.hasHighlight=function(){var t=(this.options||{}).highlight;return!(!this.createHighlight||t&&!1===t.visible)},Ce.prototype.toggleHighlight=function(t,e){var o=this,i=(this.options||{}).highlight||{},r=i.visual,n=this._highlight;if(!n){var s={fill:{color:a,opacity:e||.2},stroke:{color:a,width:1,opacity:e||.2}};if(r){if(!(n=this._highlight=r(Object.assign(this.highlightVisualArgs(),{createVisual:function(){return o.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);P(n.options.zIndex)||(n.options.zIndex=M(i.zIndex,this.options.zIndex)),this.appendVisual(n)}n.visible(t)},Ce.prototype.createGradientOverlay=function(t,e,o){o=new b.drawing.Path(Object.assign({stroke:{color:"none"},fill:this.createGradient(o),closed:t.options.closed},e));return o.segments.elements(t.segments.elements()),o},Ce.prototype.createGradient=function(t){if(this.parent)return this.parent.createGradient(t)},Ce.prototype.supportsPointInactiveOpacity=function(){return!0};var we,t=Ce;function Ce(t){we.call(this),this.children=[],this.options=x({},this.options,this.initUserOptions(t))}t.prototype.options={};const o=t;(Se=o)&&(ke.__proto__=Se),((ke.prototype=Object.create(Se&&Se.prototype)).constructor=ke).prototype.reflow=function(t){function e(){i.align(t,y,r.align),i.align(t,v,r.vAlign),i.paddingBox=o.clone().unpad(h).unpad(c)}var o,i=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),Se.prototype.reflow.call(this,u),o=p?this.box=new B(0,0,n,s):this.box,a&&p?(e(),u=this.contentBox=this.paddingBox.clone().unpad(l)):(u=this.contentBox=o.clone(),o.pad(l).pad(c).pad(h),e()),this.translateChildren(o.x1-u.x1+h.left+c+l.left,o.y1-u.y1+h.top+c+l.top);for(var d=this.children,f=0;f<d.length;f++){var g=d[f];g.reflow(g.box)}},ke.prototype.align=function(t,e,o){this.box.align(t,e,o)},ke.prototype.hasBox=function(){var t=this.options;return t.border.width||t.background},ke.prototype.createVisual=function(){Se.prototype.createVisual.call(this),this.options.visible&&this.hasBox()&&this.visual.append(b.drawing.Path.fromRect(this.paddingBox.toRect(),this.visualStyle()))},ke.prototype.visualStyle=function(){var t=this.options,e=t.border||{};return{stroke:{width:e.width,color:e.color,opacity:M(e.opacity,t.opacity),dashType:e.dashType},fill:{color:t.background,opacity:t.opacity},cursor:t.cursor}};var Se,t=ke;function ke(t){Se.call(this,t),this.options.margin=A(this.options.margin),this.options.padding=A(this.options.padding)}e(t,{align:C,vAlign:k,margin:{},padding:{},border:{color:j,width:0},background:"",shrinkToFit:!1,width:0,height:0,visible:!0});const Ae=t;(Pe=Ae)&&(Te.__proto__=Pe),((Te.prototype=Object.create(Pe&&Pe.prototype)).constructor=Te).prototype.getElement=function(){var t=this.options,e=this.paddingBox,o=t.type,i=t.rotation,r=e.center(),n=e.width()/2,s=e.height()/2;if(!t.visible||!this.hasBox())return null;var a,p=this.visualStyle();return o===H?a=new b.drawing.Circle(new b.geometry.Circle([T(e.x1+n,3),T(e.y1+s,3)],Math.min(n,s)),p):"triangle"===o?a=b.drawing.Path.fromPoints([[e.x1+n,e.y1],[e.x1,e.y2],[e.x2,e.y2]],p).close():o===U?((a=new b.drawing.MultiPath(p)).moveTo(e.x1,e.y1).lineTo(e.x2,e.y2),a.moveTo(e.x1,e.y2).lineTo(e.x2,e.y1)):(s=e.toRect(),o===$&&(n=M(t.borderRadius,s.width()/5),s.setCornerRadius(n)),a=b.drawing.Path.fromRect(s,p)),i&&a.transform(b.geometry.transform().rotate(-i,[r.x,r.y])),a.options.zIndex=t.zIndex,a},Te.prototype.createElement=function(){var t=this,e=this.options.visual,o=this.pointData||{};return e?e({value:o.value,dataItem:o.dataItem,sender:this.getSender(),series:o.series,category:o.category,rect:this.paddingBox.toRect(),options:this.visualOptions(),createVisual:function(){return t.getElement()}}):this.getElement()},Te.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}},Te.prototype.createVisual=function(){this.visual=this.createElement()};var Pe,t=Te;function Te(t,e){Pe.call(this,t),this.pointData=e}e(t,{type:H,align:w,vAlign:w});const Me=t;t="radial";const Oe={glass:{type:"linear",rotation:0,stops:[{offset:0,color:a,opacity:0},{offset:.25,color:a,opacity:.3},{offset:1,color:a,opacity:0}]},sharpBevel:{type:t,stops:[{offset:0,color:a,opacity:.55},{offset:.65,color:a,opacity:0},{offset:.95,color:a,opacity:.25}]},roundedBevel:{type:t,stops:[{offset:.33,color:a,opacity:.06},{offset:.83,color:a,opacity:.2},{offset:.95,color:a,opacity:0}]},roundedGlass:{type:t,supportVML:!1,stops:[{offset:0,color:a,opacity:0},{offset:.5,color:a,opacity:.3},{offset:.99,color:a,opacity:0}]},sharpGlass:{type:t,supportVML:!1,stops:[{offset:0,color:a,opacity:.2},{offset:.15,color:a,opacity:.15},{offset:.17,color:a,opacity:.35},{offset:.85,color:a,opacity:.05},{offset:.87,color:a,opacity:.15},{offset:.99,color:a,opacity:0}]},bubbleShadow:{type:t,center:[.5,.5],radius:.5}};(Be=o)&&(Re.__proto__=Be),((Re.prototype=Object.create(Be&&Be.prototype)).constructor=Re).prototype.reflow=function(){var t=this.options,e=this.children,o=new B(0,0,t.width,t.height);this.box=o.unpad(t.margin);for(var i=0;i<e.length;i++)e[i].reflow(o),o=function(t,e){if(t.x1===e.x1&&t.y1===e.y1&&t.x2===e.x2&&t.y2===e.y2)return e;var o=Math.min(t.x1,e.x1),i=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 B(i,s,r,a),l[1]=new B(o,a,i,p),l[2]=new B(r,a,n,p),l[3]=new B(i,p,r,h),t.x1===o&&t.y1===s||e.x1===o&&e.y1===s?(l[4]=new B(o,s,i,a),l[5]=new B(r,p,n,h)):(l[4]=new B(r,s,n,a),l[5]=new B(o,p,i,h)),Ct(l,function(t){return 0<t.height()&&0<t.width()})[0]}(o,e[i].box)||new B},Re.prototype.createVisual=function(){this.visual=new b.drawing.Group,this.createBackground()},Re.prototype.createBackground=function(){var t=this.options,e=t.border||{},o=this.box.clone().pad(t.margin).unpad(e.width),o=b.drawing.Path.fromRect(o.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(o)},Re.prototype.getRoot=function(){return this},Re.prototype.createGradient=function(t){var e,s,o=this.gradients,i=Nt(t),r=Oe[t.gradient];return o[i]?e=o[i]:(s=Object.assign({},r,t),"linear"===r.type?e=new b.drawing.LinearGradient(s):(t.innerRadius&&(s.stops=function(){for(var t=s.stops,e=s.innerRadius/s.radius*100,o=t.length,i=[],r=0;r<o;r++){var n=Object.assign({},t[r]);n.offset=(n.offset*(100-e)+e)/100,i.push(n)}return i}()),(e=new b.drawing.RadialGradient(s)).supportVML=!1!==r.supportVML),o[i]=e),e},Re.prototype.cleanGradients=function(){var t,e=this.gradients;for(t in e)e[t]._observers=[]},Re.prototype.size=function(){var t=this.options;return new B(0,0,t.width,t.height)};var Be,t=Re;function Re(t){Be.call(this,t);t=this.options;t.width=parseInt(t.width,10),t.height=parseInt(t.height,10),this.gradients={}}e(t,{width:600,height:400,background:a,border:{color:j,width:0},margin:A(5),zIndex:-2});const Ee=t;(Le=o)&&(Ie.__proto__=Le),((Ie.prototype=Object.create(Le&&Le.prototype)).constructor=Ie).prototype._initDirection=function(){var t=this.options;t.vertical?(this.groupAxis=y,this.elementAxis=v,this.groupSizeField=et,this.elementSizeField=W,this.groupSpacing=t.spacing,this.elementSpacing=t.vSpacing):(this.groupAxis=v,this.elementAxis=y,this.groupSizeField=W,this.elementSizeField=et,this.groupSpacing=t.vSpacing,this.elementSpacing=t.spacing)},Ie.prototype.reflow=function(t){this.box=t.clone(),this.reflowChildren()},Ie.prototype.reflowChildren=function(){var t=this,e=t.box,o=t.elementAxis,i=t.groupAxis,r=t.elementSizeField,n=t.groupSizeField,t=this.groupOptions(),s=t.groups,a=t.groupsSize,t=t.maxGroupElementsSize,p=s.length,h=e[i+1]+this.alignStart(a,e[n]());if(p){for(var l=h,c=0;c<p;c++){for(var u=s[c],d=u.groupElements,f=e[o+1],g=d.length,y=0;y<g;y++){var v=d[y],m=this.elementSize(v),x=l+this.alignStart(m[n],u.groupSize),_=new B;_[i+1]=x,_[i+2]=x+m[n],_[o+1]=f,_[o+2]=f+m[r],v.reflow(_),f+=m[r]+this.elementSpacing}l+=u.groupSize+this.groupSpacing}e[i+1]=h,e[i+2]=h+a,e[o+2]=e[o+1]+t}},Ie.prototype.alignStart=function(t,e){var o=0,i=this.options.align;return i===S||i===D?o=e-t:i===w&&(o=(e-t)/2),o},Ie.prototype.groupOptions=function(){for(var t=this,e=t.box,o=t.children,i=t.elementSizeField,r=t.groupSizeField,n=t.elementSpacing,s=t.groupSpacing,a=T(e[i]()),p=o.length,h=[],l=0,c=0,u=0,d=0,f=[],g=0;g<p;g++){var y=o[g],v=(y.box||y.reflow(e),this.elementSize(y));this.options.wrap&&T(c+n+v[i])>a&&(h.push({groupElements:f,groupSize:l,groupElementsSize:c}),d=Math.max(d,c),u+=s+l,c=l=0,f=[]),l=Math.max(l,v[r]),0<c&&(c+=n),c+=v[i],f.push(y)}return h.push({groupElements:f,groupSize:l,groupElementsSize:c}),{groups:h,groupsSize:u+=l,maxGroupElementsSize:d=Math.max(d,c)}},Ie.prototype.elementSize=function(t){return{width:t.box.width(),height:t.box.height()}},Ie.prototype.createVisual=function(){};var Le,t=Ie;function Ie(t){Le.call(this,t),this._initDirection()}e(t,{vertical:!0,wrap:!0,vSpacing:0,spacing:0});const ze=t;var Ve,je=b.drawing.Text,t=((Ve=o)&&(De.__proto__=Ve),((De.prototype=Object.create(Ve&&Ve.prototype)).constructor=De).prototype.reflow=function(t){var e=this.options,e=e.size=b.drawing.util.measureText(this.content,{font:e.font});this.baseline=e.baseline,this.box=new B(t.x1,t.y1,t.x1+e.width,t.y1+e.height)},De.prototype.createVisual=function(){var t=this.options,e=t.font,o=t.color,i=t.opacity,t=t.cursor;this.visual=new je(this.content,this.box.toRect().topLeft(),{font:e,fill:{color:o,opacity:i},cursor:t})},De);function De(t,e){Ve.call(this,e),this.content=t,this.reflow(new B)}e(t,{font:N,color:j});const He=t;function Ue(t){var e=t.origin,t=t.bottomRight();return new B(e.x,e.y,t.x,t.y)}var Fe,Ne=/\n/m;function Ge(t,e,o){Fe.call(this,e),this.content=t,this.data=o,this._initContainer(),!1!==this.options._autoReflow&&this.reflow(new B)}(Fe=Ae)&&(Ge.__proto__=Fe),((Ge.prototype=Object.create(Fe&&Fe.prototype)).constructor=Ge).prototype._initContainer=function(){var t=this.options,e=String(this.content).split(Ne),o=new ze({vertical:!0,align:t.align,wrap:!1}),i=x({},t,{opacity:1,animation:null});this.container=o,this.append(o);for(var r=0;r<e.length;r++){var n=new He(e[r].trim(),i);o.append(n)}},Ge.prototype.reflow=function(t){var e,o=this.options,i=o.visual;this.container.options.align=o.align,i&&!this._boxReflow?((e=t).hasSize()||(this._boxReflow=!0,this.reflow(e),this._boxReflow=!1,e=this.box),(i=this.visual=i(this.visualContext(e)))&&(e=Ue(i.clippedBBox()||new b.geometry.Rect),i.options.zIndex=o.zIndex),this.box=this.contentBox=this.paddingBox=e):(Fe.prototype.reflow.call(this,t),o.rotation&&(i=A(o.margin),e=this.box.unpad(i),this.targetBox=t,this.normalBox=e.clone(),(e=this.rotate()).translate(i.left-i.right,i.top-i.bottom),this.rotatedBox=e.clone(),e.pad(i)))},Ge.prototype.createVisual=function(){var t=this.options;this.visual=new b.drawing.Group({transform:this.rotationTransform(),zIndex:t.zIndex,noclip:t.noclip}),this.hasBox()&&(t=b.drawing.Path.fromRect(this.paddingBox.toRect(),this.visualStyle()),this.visual.append(t))},Ge.prototype.renderVisual=function(){var t;this.options.visible&&(this.options.visual?((t=this.visual)&&!P(t.options.noclip)&&(t.options.noclip=this.options.noclip),this.addVisual(),this.createAnimation()):Fe.prototype.renderVisual.call(this))},Ge.prototype.visualContext=function(t){var e=this,o={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(o,this.data),o},Ge.prototype.getDefaultVisual=function(){this.createVisual(),this.renderChildren();var t=this.visual;return delete this.visual,t},Ge.prototype.rotate=function(){var t=this.options;return this.box.rotate(t.rotation),this.align(this.targetBox,y,t.align),this.align(this.targetBox,v,t.vAlign),this.box},Ge.prototype.rotationTransform=function(){var t=this.options.rotation;if(!t)return null;var e=this.normalBox.center(),o=e.x,e=e.y,i=this.rotatedBox.center();return b.geometry.transform().translate(i.x-o,i.y-e).rotate(t,[o,e])};const We=Ge;(Xe=o)&&(qe.__proto__=Xe),((qe.prototype=Object.create(Xe&&Xe.prototype)).constructor=qe).prototype.reflow=function(t){Xe.prototype.reflow.call(this,t),this.box.snapTo(t,y)},qe.buildTitle=function(t,e,o){var i,t="string"==typeof t?{text:t}:t;return(t=Object.assign({visible:!0},o,t))&&t.visible&&t.text&&(i=new qe(t),e.append(i)),i};var Xe,t=qe;function qe(t){Xe.call(this,t),this.append(new We(this.options.text,Object.assign({},this.options,{vAlign:this.options.position})))}e(t,{color:j,position:k,align:w,margin:A(5),padding:A(5)});const Ye=t;(Ze=We)&&(Qe.__proto__=Ze),((Qe.prototype=Object.create(Ze&&Ze.prototype)).constructor=Qe).prototype.visualContext=function(t){t=Ze.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},Qe.prototype.click=function(t,e){t.trigger("axisLabelClick",{element:Ht(e),value:this.value,text:this.text,index:this.index,dataItem:this.dataItem,axis:this.parent.options})},Qe.prototype.rotate=function(){var t,e;return this.options.alignRotation!==w?(t=this.normalBox.toRect(),e=this.rotationTransform(),this.box=Ue(t.bbox(e.matrix()))):Ze.prototype.rotate.call(this),this.box},Qe.prototype.rotationTransform=function(){var t=this.options,e=t.rotation;if(!e)return null;if(t.alignRotation===w)return Ze.prototype.rotationTransform.call(this);var o=b.geometry.transform().rotate(e).matrix(),i=this.normalBox.toRect(),r=this.targetBox.toRect(),t=t.rotationOrigin||k,n=t===k||t===D?y:v,s=t===k||t===D?v:y,t=t===k||t===C?r.origin:r.bottomRight(),a=i.topLeft().transformCopy(o),p=i.topRight().transformCopy(o),h=i.bottomRight().transformCopy(o),i=i.bottomLeft().transformCopy(o),o=b.geometry.Rect.fromPoints(a,p,h,i),l={};l[s]=r.origin[s]-o.origin[s];var c,o=Math.abs(a[s]+l[s]-t[s]),t=Math.abs(p[s]+l[s]-t[s]),s=T(o,g)===T(t,g)?(c=a,p):t<o?(c=p,h):(c=a,i),t=c[n]+(s[n]-c[n])/2;return l[n]=r.center()[n]-t,b.geometry.transform().translate(l.x,l.y).rotate(e)};var Ze,t=Qe;function Qe(t,e,o,i,r){Ze.call(this,e,r),this.text=e,this.value=t,this.index=o,this.dataItem=i,this.reflow(new B)}e(t,{_autoReflow:!1});const Ke=t;($e=Ae)&&(Je.__proto__=$e),((Je.prototype=Object.create($e&&$e.prototype)).constructor=Je).prototype.hide=function(){this.options.visible=!1},Je.prototype.show=function(){this.options.visible=!0},Je.prototype.render=function(){var t,e,o,i,r,n,s,a,p=this,h=this.options;h.visible&&(o=h.label,h=h.icon,i=new B,r=function(){return p},n=h.size,s=this.fields.text,P(o)&&o.visible&&((a=xt(o))?s=a(this.fields):o.format&&(s=this.chartService.format.auto(o.format,s)),o.color||(o.color=o.position===X?"#fff":h.background),this.label=new We(s,x({},o)),this.label.aliasFor=r,o.position!==X||P(n)||(h.type===H?n=Math.max(this.label.box.width(),this.label.box.height()):(t=this.label.box.width(),e=this.label.box.height()),i.wrap(this.label.box))),h.width=t||n||7,h.height=e||n||7,(a=new Me(x({},h))).aliasFor=r,this.marker=a,this.append(a),this.label&&this.append(this.label),a.reflow(new B),this.wrapperBox=i.wrap(a.box))},Je.prototype.reflow=function(t){var e,o,i,r=this.options,n=this.label,s=this.marker,a=this.wrapperBox,p=t.center(),h=r.line.length,l=r.position;r.visible&&(u(l,[C,S])?l===C?(i=a.alignTo(t,l).translate(-h,t.center().y-a.center().y),r.line.visible&&(e=[t.x1,p.y],this.linePoints=[e,[i.x2,p.y]],o=i.clone().wrapPoint(e))):(i=a.alignTo(t,l).translate(h,t.center().y-a.center().y),r.line.visible&&(e=[t.x2,p.y],this.linePoints=[e,[i.x1,p.y]],o=i.clone().wrapPoint(e))):l===D?(i=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,i.y1]],o=i.clone().wrapPoint(e))):(i=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,i.y2]],o=i.clone().wrapPoint(e))),s&&s.reflow(i),n&&(n.reflow(i),s&&(r.label.position===K&&n.box.alignTo(s.box,l),n.reflow(n.box))),this.contentBox=i,this.targetBox=t,this.box=o||i)},Je.prototype.createVisual=function(){$e.prototype.createVisual.call(this),this.visual.options.noclip=this.options.noclip,this.options.visible&&this.createLine()},Je.prototype.renderVisual=function(){var e=this,t=this.options,o=t.visual;t.visible&&o?(this.visual=o(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()):$e.prototype.renderVisual.call(this)},Je.prototype.createLine=function(){var t=this.options.line;this.linePoints&&(st(t=b.drawing.Path.fromPoints(this.linePoints,{stroke:{color:t.color,width:t.width,dashType:t.dashType}})),this.visual.append(t))},Je.prototype.click=function(t,e){var o=this.eventArgs(e);t.trigger("noteClick",o)||e.preventDefault()},Je.prototype.over=function(t,e){var o=this.eventArgs(e);t.trigger("noteHover",o)||e.preventDefault()},Je.prototype.out=function(t,e){e=this.eventArgs(e);t.trigger("noteLeave",e)},Je.prototype.eventArgs=function(t){var e=this.options;return Object.assign(this.fields,{element:Ht(t),text:P(e.label)?e.label.text:"",visual:this.visual})};var $e,t=Je;function Je(t,e,o){$e.call(this,e),this.fields=t,this.chartService=o,this.render()}e(t,{icon:{visible:!0,type:H},label:{position:X,visible:!0,align:w,vAlign:w},line:{visible:!0},visible:!0,position:k,zIndex:2});const to=t;function eo(){}var oo={format:function(t,e){return e},toString:function(t){return t},parseDate:function(t){return new Date(t)},firstDay:function(){return 0}},t={implementation:{configurable:!0}};eo.register=function(t){oo=t},t.implementation.get=function(){return oo},Object.defineProperties(eo,t);const io=eo;function ro(t){this._intlService=t}var no=/\{(\d+)(:[^\}]+)?\}/g,t={intl:{configurable:!0}};t.intl.get=function(){return this._intlService||io.implementation},t.intl.set=function(t){this._intlService=t},ro.prototype.auto=function(t){for(var e=[],o=arguments.length-1;0<o--;)e[o]=arguments[o+1];var i=this.intl;return pt(t)&&t.match(G)?i.format.apply(i,[t].concat(e)):i.toString(e[0],t)},ro.prototype.localeAuto=function(t,i,r){var n=this.intl;return pt(t)&&t.match(G)?t.replace(no,function(t,e,o){e=i[parseInt(e,10)];return n.toString(e,o?o.substring(1):"",r)}):n.toString(i[0],t,r)},Object.defineProperties(ro.prototype,t);const so=ro;function ao(t,e){this._intlService=(e=void 0===e?{}:e).intlService,this.sender=e.sender||t,this.format=new so(e.intlService),this.chart=t,this.rtl=Boolean(e.rtl)}t={intl:{configurable:!0}};t.intl.get=function(){return this._intlService||io.implementation},t.intl.set=function(t){this._intlService=t,this.format.intl=t},ao.prototype.notify=function(t,e){this.chart&&this.chart.trigger(t,e)},ao.prototype.isPannable=function(t){var e=((this.chart||{}).options||{}).pannable;return e&&e.lock!==t},Object.defineProperties(ao.prototype,t);const po=ao;function ho(){}var lo;ho.register=function(t){lo=t},ho.create=function(t,e){if(lo)return lo.create(t,e)};const co=ho;function uo(t,e){var o=t.tickX,i=t.tickY,r=t.position,n=new b.drawing.Path({stroke:{width:e.width,color:e.color}});return t.vertical?n.moveTo(o,r).lineTo(o+e.size,r):n.moveTo(r,i).lineTo(r,i+e.size),st(n),n}function fo(t,e){var o=t.lineStart,i=t.lineEnd,r=t.position,e=new b.drawing.Path({stroke:{width:e.width,color:e.color,dashType:e.dashType}});return t.vertical?e.moveTo(o,r).lineTo(i,r):e.moveTo(r,o).lineTo(r,i),st(e),e}(go=o)&&(i.__proto__=go),((i.prototype=Object.create(go&&go.prototype)).constructor=i).prototype.initFields=function(){},i.prototype.labelsRange=function(){return{min:this.options.labels.skip,max:this.labelsCount()}},i.prototype.normalizeLabelRotation=function(t){var e=t.rotation;ut(e)&&(t.alignRotation=e.align,t.rotation=e.angle)},i.prototype.createLabels=function(){var t=this.options,e=t.vertical?S:w,o=x({},t.labels,{align:e,zIndex:t.zIndex}),i=Math.max(1,o.step);if(this.clearLabels(),o.visible){this.normalizeLabelRotation(o),"auto"===o.rotation&&(o.rotation=0,t.autoRotateLabels=!0);for(var r=this.labelsRange(),n=r.min;n<r.max;n+=i){var s={index:n,count:r.max},s=this.createAxisLabel(n,o,s);s&&(this.append(s),this.labels.push(s))}}},i.prototype.clearLabels=function(){this.children=Ct(this.children,function(t){return!(t instanceof Ke)}),this.labels=[]},i.prototype.clearTitle=function(){var e=this;this.title&&(this.children=Ct(this.children,function(t){return t!==e.title}),this.title=void 0)},i.prototype.clear=function(){this.clearLabels(),this.clearTitle()},i.prototype.lineBox=function(){var t=this.options,e=this.box,o=t.vertical,i=t.labels.mirror,r=i?e.x1:e.x2,i=i?e.y2:e.y1,t=t.line.width||0;return o?new B(r,e.y1,r,e.y2-t):new B(e.x1,i,e.x2-t,i)},i.prototype.createTitle=function(){var t=this.options,t=x({rotation:t.vertical?-90:0,text:"",zIndex:1,visualSize:!0},t.title);t.visible&&t.text&&(t=new We(t.text,t),this.append(t),this.title=t)},i.prototype.createNotes=function(){var t=this.options,e=t.notes,o=e.data||[];this.notes=[];for(var i=0;i<o.length;i++){var r=x({},e,o[i]),r=(r.value=this.parseNoteValue(r.value),new to({value:r.value,text:r.label.text,dataItem:r},r,this.chartService));r.options.visible&&(P(r.options.position)?t.vertical&&!u(r.options.position,[C,S])?r.options.position=t.reverse?C:S:t.vertical||u(r.options.position,[k,D])||(r.options.position=t.reverse?D:k):t.vertical?r.options.position=t.reverse?C:S:r.options.position=t.reverse?D:k,this.append(r),this.notes.push(r))}},i.prototype.parseNoteValue=function(t){return t},i.prototype.renderVisual=function(){go.prototype.renderVisual.call(this),this.createPlotBands()},i.prototype.createVisual=function(){go.prototype.createVisual.call(this),this.createBackground(),this.createLine()},i.prototype.gridLinesVisual=function(){var t=this._gridLines;return t||(t=this._gridLines=new b.drawing.Group({zIndex:-2}),this.appendVisual(this._gridLines)),t},i.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 o(t,e,o){var i=t.length,r=Math.max(1,e.step);if(e.visible)for(var n=e.skip;n<i;n+=r)P(o)&&n%o==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(uo(h,e)))}o(this.getMajorTickPositions(),t.majorTicks),o(this.getMinorTickPositions(),t.minorTicks,e/t.minorUnit)},i.prototype.createLine=function(){var t=this.options,e=t.line,o=this.lineBox();0<e.width&&e.visible&&((e=new b.drawing.Path({stroke:{width:e.width,color:e.color,dashType:e.dashType}})).moveTo(o.x1,o.y1).lineTo(o.x2,o.y2),t._alignLines&&st(e),(o=this._lineGroup=new b.drawing.Group).append(e),this.visual.append(o),this.createTicks(o))},i.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},i.prototype.createBackground=function(){var t=this.options,e=this.box,t=t.background;t&&(this._backgroundPath=b.drawing.Path.fromRect(e.toRect(),{fill:{color:t},stroke:null}),this.visual.append(this._backgroundPath))},i.prototype.createPlotBands=function(){var e=this,t=this.options,o=t.plotBands||[],i=t.vertical,r=this.plotArea;if(0!==o.length){for(var n=this._plotbandGroup=new b.drawing.Group({zIndex:-1}),s=Ct(this.pane.axes,function(t){return t.options.vertical!==e.options.vertical})[0],a=0;a<o.length;a++){var p=o[a],h=void 0,l=void 0,c=p.label,u=void 0,l=i?(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||C,u=this.createPlotBandLabel(c,p,new B(h.x1,l.y1,h.x2,l.y2))),0!==h.width()&&0!==l.height()&&(c=new b.geometry.Rect([h.x1,l.y1],[h.width(),l.height()]),h=b.drawing.Path.fromRect(c,{fill:{color:p.color,opacity:p.opacity},stroke:null}),n.append(h),u&&n.append(u))}this.appendVisual(n)}},i.prototype.createPlotBandLabel=function(t,e,o){if(!1===t.visible)return null;var i,r=t.text;return P(t)&&t.visible&&((i=xt(t))?r=i({text:r,item:e}):t.format&&(r=this.chartService.format.auto(t.format,r)),t.color||(t.color=this.options.labels.color)),(i=new We(r,t)).reflow(o),i.renderVisual(),i.visual},i.prototype.createGridLines=function(t){var e=this.options,o=e.minorGridLines,i=e.majorGridLines,r=e.minorUnit,n=e.vertical,a=t.options.line.visible,e=i.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,o){var i=t.length,r=Math.max(1,e.step);if(e.visible)for(var n=e.skip;n<i;n+=r){var s=T(t[n]);u(s,l)||n%o==0||a&&p===s||(h.position=s,c.append(fo(h,e)),l.push(s))}}return s(this.getMajorTickPositions(),i),s(this.getMinorTickPositions(),o,e/r),c.children},i.prototype.reflow=function(t){for(var e=this.options,o=this.labels,i=this.title,r=e.vertical,n=o.length,s=r?et:W,i=i?i.box[s]():0,a=this.getActualTickSize()+e.margin+i,p=((this.getRoot()||{}).box||t)[s](),h=0,l=0;l<n;l++){var c=o[l].box[s]();c+a<=p&&(h=Math.max(h,c))}this.box=r?new B(t.x1,t.y1,t.x1+h+a,t.y2):new B(t.x1,t.y1,t.x2,t.y1+h+a),this.arrangeTitle(),this.arrangeLabels(),this.arrangeNotes()},i.prototype.getLabelsTickPositions=function(){return this.getMajorTickPositions()},i.prototype.labelTickIndex=function(t){return t.index},i.prototype.arrangeLabels=function(){for(var t=this.options,e=this.labels,o=this.labelsBetweenTicks(),i=t.vertical,r=t.labels.mirror,n=this.getLabelsTickPositions(),s=0;s<e.length;s++){var a=e[s],p=this.labelTickIndex(a),h=i?a.box.height():a.box.width(),l=n[p],p=n[p+1],c=void 0,u=void 0,u=i?c=o?l+(p-l)/2-h/2:l-h/2:o?(c=l,p):(c=l-h/2)+h;this.positionLabel(a,r,c,u)}},i.prototype.positionLabel=function(t,e,o,i){void 0===i&&(i=o);var r=this.options,n=r.vertical,s=this.lineBox(),r=this.getActualTickSize()+r.margin,s=n?(n=s.x2,e?(n+=r,t.options.rotationOrigin=C):(n-=r+t.box.width(),t.options.rotationOrigin=S),t.box.move(n,o)):(n=s.y1,e?(n-=r+t.box.height(),t.options.rotationOrigin=D):(n+=r,t.options.rotationOrigin=k),new B(o,n,i,n+t.box.height()));t.reflow(s)},i.prototype.autoRotateLabelAngle=function(t,e){return t.width()<e?0:t.height()>e?-90:-45},i.prototype.autoRotateLabels=function(){if(!this.options.autoRotateLabels||this.options.vertical)return!1;for(var t=this.getMajorTickPositions(),e=this.labels,o=Math.min(e.length,t.length-1),i=0,r=0;r<o;r++){var n=Math.abs(t[r+1]-t[r]),s=e[r].box,s=this.autoRotateLabelAngle(s,n);if(-90===(i=0!==s?s:i))break}if(0!==i){for(var a=0;a<e.length;a++)e[a].options.rotation=i,e[a].reflow(new B);return!0}},i.prototype.arrangeTitle=function(){var t=this.options,e=this.title,o=t.labels.mirror,t=t.vertical;e&&(t?(e.options.align=o?S:C,e.options.vAlign=e.options.position):(e.options.align=e.options.position,e.options.vAlign=o?k:D),e.reflow(this.box))},i.prototype.arrangeNotes=function(){for(var t=0;t<this.notes.length;t++){var e=this.notes[t],o=e.options.value,i=void 0;P(o)?(this.shouldRenderNote(o)?e.show():e.hide(),i=this.noteSlot(o)):e.hide(),e.reflow(i||this.lineBox())}},i.prototype.noteSlot=function(t){return this.getSlot(t)},i.prototype.alignTo=function(t){var t=t.lineBox(),e=this.options.vertical,o=e?v:y;this.box.snapTo(t,o),e?this.box.shrink(0,this.lineBox().height()-t.height()):this.box.shrink(this.lineBox().width()-t.width(),0),this.box[o+1]-=this.lineBox()[o+1]-t[o+1],this.box[o+2]-=this.lineBox()[o+2]-t[o+2]},i.prototype.axisLabelText=function(t,e,o){function i(){return e.format?r.chartService.format.localeAuto(e.format,[t],e.culture):t}var r=this,n=xt(e);return n?n(Object.assign({},o,{get text(){return i()},value:t,format:e.format,culture:e.culture})):i()},i.prototype.slot=function(t,e,o){t=this.getSlot(t,e,o);if(t)return t.toRect()},i.prototype.contentBox=function(){var t,e,o=this.box.clone(),i=this.labels;return i.length&&(e=this.options.vertical?v:y,this.chartService.isPannable(e)?(t=this.maxLabelOffset(),o[e+1]-=t.start,o[e+2]+=t.end):(i[0].options.visible&&o.wrap(i[0].box),(e=i[i.length-1]).options.visible&&o.wrap(e.box))),o},i.prototype.maxLabelOffset=function(){for(var t=this.options,e=t.vertical,t=t.reverse,o=this.labelsBetweenTicks(),i=this.getLabelsTickPositions(),r=e?v:y,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,f=void 0;o?(d=i[u+s],f=i[u+a]):d=f=i[u],p=Math.max(p,d-c.box[r+1]),h=Math.max(h,c.box[r+2]-f)}return{start:p,end:h}},i.prototype.limitRange=function(t,e,o,i,r){var n=this.options;if(t<o&&r<0&&(!P(n.min)||n.min<=o)||i<e&&0<r&&(!P(n.max)||i<=n.max))return null;if(e<o&&0<r||i<t&&r<0)return{min:t,max:e};var n=e-t,s=t,a=e;return t<o&&r<0?(s=_(t,o,i),a=_(t+n,o+n,i)):i<e&&0<r&&(a=_(e,o,i),s=_(e-n,o,i-n)),{min:s,max:a}},i.prototype.valueRange=function(){return{min:this.seriesMin,max:this.seriesMax}},i.prototype.lineDir=function(){var t=this.options;return(t.vertical?-1:1)*(t.reverse?-1:1)},i.prototype.lineInfo=function(){var t=this.options.vertical,e=this.lineBox(),o=t?e.height():e.width(),t=t?v:y,i=this.lineDir(),r=t+(1===i?1:2).toString();return{axis:t,axisOrigin:r,axisDir:i,lineBox:e,lineSize:o,lineStart:e[r]}},i.prototype.pointOffset=function(t){var e=this.lineInfo(),o=e.axis,i=e.axisDir,r=e.axisOrigin,n=e.lineBox,e=e.lineSize;return(0<i?t[o]-n[r]:n[r]-t[o])/e},i.prototype.scaleToDelta=function(t,e){t=_(t,-.999,.999);return 0<t?e*Math.min(1,t):e-e/(1+t)},i.prototype.labelsBetweenTicks=function(){return!this.options.justified},i.prototype.prepareUserOptions=function(){};var go,t=i;function i(t,e){void 0===e&&(e=new po),go.call(this,t),this.chartService=e,this.options.visible||(this.options=x({},this.options,{labels:{visible:!1},line:{visible:!1},margin:0,majorTickSize:0,minorTickSize:0})),this.options.minorTicks=x({},{color:this.options.line.color,width:this.options.line.width,visible:this.options.minorTickType!==Z},this.options.minorTicks,{size:this.options.minorTickSize,align:this.options.minorTickType}),this.options.majorTicks=x({},{color:this.options.line.color,width:this.options.line.width,visible:this.options.majorTickType!==Z},this.options.majorTicks,{size:this.options.majorTickSize,align:this.options.majorTickType}),this.initFields(),this.options._deferLabels||this.createLabels(),this.createTitle(),this.createNotes()}e(t,{labels:{visible:!0,rotation:0,mirror:!1,step:1,skip:0},line:{width:1,color:j,visible:!0},title:{visible:!0,position:w},majorTicks:{align:K,size:4,skip:0,step:1},minorTicks:{align:K,size:3,skip:0,step:1},axisCrossingValue:0,majorTickType:K,minorTickType:Z,majorGridLines:{skip:0,step:1},minorGridLines:{visible:!1,width:1,color:j,skip:0,step:1},margin:5,visible:!0,reverse:!1,justified:!0,notes:{label:{text:""}},_alignLines:!0,_deferLabels:!1});const yo=t;var vo="milliseconds",mo="seconds",xo="minutes",_o="hours",bo="days",wo="weeks",Co="months",So="years",ko=6e4,Ao=36e5,Po=864e5,To=6048e5,Mo=31536e6,Oo={years:Mo,months:26784e5,weeks:To,days:Po,hours:Ao,minutes:ko,seconds:1e3,milliseconds:1};function Bo(t,e){return t.getTime()-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*ko}function Ro(t,e){return new Date(t.getTime()+e)}function d(t){var e;return t instanceof Date?e=t:t&&(e=new Date(t)),e}function Eo(t,e){0===e&&23===t.getHours()&&t.setHours(t.getHours()+2)}function Lo(t,e,o,r){var i,n,s,a=t;return t&&(i=(t=d(t)).getHours(),o===So?Eo(a=new Date(t.getFullYear()+e,0,1),0):o===Co?Eo(a=new Date(t.getFullYear(),t.getMonth()+e,1),i):o===wo?Eo(a=Lo(function(t,e){void 0===r&&(e=0);var o=0,i=t.getDay();if(!isNaN(i))for(;i!==e;)0===i?i=6:i--,o++;return Ro(t,-o*Po)}(t,r),7*e,bo),i):o===bo?Eo(a=new Date(t.getFullYear(),t.getMonth(),t.getDate()+e),i):o===_o?(i=t,n=e,(s=new Date(i)).setMinutes(0,0,0),i=(i.getTimezoneOffset()-s.getTimezoneOffset())*ko,a=Ro(s,i+n*Ao)):o===xo?0<(a=Ro(t,e*ko)).getSeconds()&&a.setSeconds(0):o===mo?a=Ro(t,1e3*e):o===vo&&(a=Ro(t,e)),o!==vo&&0<a.getMilliseconds()&&a.setMilliseconds(0)),a}function Io(t,e,o){return Lo(d(t),0,e,o)}function zo(t,e,o){t=d(t);return t&&Io(t,e,o).getTime()===t.getTime()?t:Lo(t,1,e,o)}function Vo(t,e){return t&&e?t.getTime()-e.getTime():-1}function jo(t,e){return t.getTime()-e}function f(t){if(ot(t)){for(var e=[],o=0;o<t.length;o++)e.push(f(t[o]));return e}if(t)return d(t).getTime()}function Do(t,e){return t&&e?f(t)===f(e):t===e}function Ho(t,e,o){return Bo(t,e)/Oo[o]}function Uo(t,e,o,i){var t=d(t),r=d(e);return(o===Co?t.getMonth()-r.getMonth()+12*(t.getFullYear()-r.getFullYear())+Ho(t,new Date(t.getFullYear(),t.getMonth()),bo)/new Date(t.getFullYear(),t.getMonth()+1,0).getDate():o===So?t.getFullYear()-r.getFullYear()+Uo(t,new Date(t.getFullYear(),0),Co,1)/12:o===bo||o===wo?Ho(t,r,o):jo(t,e)/Oo[o])/i}function Fo(t,e,o){return o===So?e.getFullYear()-t.getFullYear():o===Co?12*Fo(t,e,So)+e.getMonth()-t.getMonth():o===bo?Math.floor(jo(e,t)/Po):Math.floor(jo(e,t)/Oo[o])}function No(t,e){return pt(e)&&t.parseDate(e)||d(e)}function Go(t,e){if(ot(e)){for(var o=[],i=0;i<e.length;i++)o.push(No(t,e[i]));return o}return No(t,e)}function Wo(t,e){return m(t.weekStartDay)?t.weekStartDay:e&&e.firstDay?e.firstDay():0}(Xo=yo)&&(r.__proto__=Xo),((r.prototype=Object.create(Xo&&Xo.prototype)).constructor=r).prototype.initFields=function(){this._ticks={}},r.prototype.categoriesHash=function(){return""},r.prototype.clone=function(){var t=new r(Object.assign({},this.options,{categories:this.options.srcCategories}),this.chartService);return t.createLabels(),t},r.prototype.initUserOptions=function(t){var e=t.categories||[],o=P(t.min),i=P(t.max);return t.srcCategories=t.categories=e,(o||i)&&e.length&&(o=o?Math.floor(t.min):0,i=i?t.justified?Math.floor(t.max)+1:Math.ceil(t.max):e.length,t.categories=t.categories.slice(o,i)),t},r.prototype.rangeIndices=function(){var t=this.options,e=t.categories.length||1;return{min:m(t.min)?t.min%1:0,max:m(t.max)&&t.max%1!=0&&t.max<this.totalRange().max?e-(1-t.max%1):e-(t.justified?1:0)}},r.prototype.totalRangeIndices=function(t){var e=this.options,o=m(e.min)?e.min:0;return e=m(e.max)?e.max:m(e.min)?o+e.categories.length:this.totalRange().max||1,t&&(t=this.totalRange(),o=_(o,0,t.max),e=_(e,0,t.max)),{min:o,max:e}},r.prototype.range=function(){var t=this.options;return{min:m(t.min)?t.min:0,max:(m(t.max)?t:this.totalRange()).max}},r.prototype.roundedRange=function(){return this.range()},r.prototype.totalRange=function(){var t=this.options;return{min:0,max:Math.max(this._seriesMax||0,t.srcCategories.length)-(t.justified?1:0)}},r.prototype.scaleOptions=function(){var t=this.rangeIndices(),e=t.min,t=t.max,o=this.lineBox();return{scale:(this.options.vertical?o.height():o.width())/(t-e||1)*(this.options.reverse?-1:1),box:o,min:e,max:t}},r.prototype.arrangeLabels=function(){Xo.prototype.arrangeLabels.call(this),this.hideOutOfRangeLabels()},r.prototype.hideOutOfRangeLabels=function(){var t,e,o,i=this.box,r=this.labels;0<r.length&&(e=i[(t=this.options.vertical?v:y)+1],i=i[t+2],o=r[0],r=Ft(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))},r.prototype.getMajorTickPositions=function(){return this.getTicks().majorTicks},r.prototype.getMinorTickPositions=function(){return this.getTicks().minorTicks},r.prototype.getLabelsTickPositions=function(){return this.getTicks().labelTicks},r.prototype.tickIndices=function(t){for(var e=this.rangeIndices(),o=e.min,e=e.max,i=Math.ceil(e),r=Math.floor(o),n=[];r<=i;)n.push(r),r+=t;return n},r.prototype.getTickPositions=function(t){for(var e=this.options,o=e.vertical,e=e.reverse,i=this.scaleOptions(),r=i.scale,n=i.box,s=i.min,a=n[(o?v:y)+(e?2:1)],p=this.tickIndices(t),h=[],l=0;l<p.length;l++)h.push(a+T(r*(p[l]-s),3));return h},r.prototype.getTicks=function(){var t=this.options,e=this._ticks,o=this.rangeIndices(),i=this.lineBox(),o=i.getHash()+o.min+","+o.max+t.reverse+t.justified;return e._hash!==o&&(t=t.minorTicks.visible||t.minorGridLines.visible,e._hash=o,e.labelTicks=this.getTickPositions(1),e.majorTicks=this.filterOutOfRangePositions(e.labelTicks,i),e.minorTicks=t?this.filterOutOfRangePositions(this.getTickPositions(.5),i):[]),e},r.prototype.filterOutOfRangePositions=function(t,e){if(!t.length)return t;for(var o=this.options.vertical?v:y,i=function(t){return e[o+1]<=t&&t<=e[o+2]},r=t.length-1,n=0;!i(t[n])&&n<=r;)n++;for(var s=r;!i(t[s])&&0<=s;)s--;return t.slice(n,s+1)},r.prototype.lineInfo=function(){var t=this.options,e=t.vertical,t=t.reverse,o=this.lineBox(),i=e?o.height():o.width(),e=e?v:y,t=t?-1:1,r=e+(1==t?1:2).toString();return{axis:e,axisOrigin:r,axisDir:t,lineBox:o,lineSize:i,lineStart:o[r]}},r.prototype.lineDir=function(){return this.options.reverse?-1:1},r.prototype.getSlot=function(t,e,o){var i=this.options,r=i.reverse,i=i.justified,n=this.scaleOptions(),s=n.scale,a=n.box,n=n.min,p=this.lineInfo(),h=p.axis,p=p.lineStart,l=a.clone(),c=!P(e),t=M(t,0),e=M(e,t),e=Math.max(e-1,t),u=p+(t-n)*s,p=p+(Math.max(t,e)+1-n)*s;return c&&i&&(p=u),o&&(u=_(u,a[h+1],a[h+2]),p=_(p,a[h+1],a[h+2])),l[h+1]=r?p:u,l[h+2]=r?u:p,l},r.prototype.limitSlot=function(t){var e=this.options.vertical?v:y,o=this.lineBox(),i=t.clone();return i[e+1]=_(t[e+1],o[e+1],o[e+2]),i[e+2]=_(t[e+2],o[e+1],o[e+2]),i},r.prototype.slot=function(t,e,o){var i=Math.floor(this.options.min||0);return"string"==typeof t?t=this.categoryIndex(t):m(t)&&(t-=i),"string"==typeof e?e=this.categoryIndex(e):m(e)&&(e-=i),Xo.prototype.slot.call(this,t,e,o)},r.prototype.pointCategoryIndex=function(t){var e=this.options,o=e.reverse,i=e.justified,e=e.vertical?v:y,r=this.scaleOptions(),n=r.scale,s=r.box,a=r.min,r=r.max,p=s[e+1],s=s[e+2],t=t[e];if(t<p||s<t)return null;e=(o?r:a)+(t-p)/n,s=e%1;return i?e=Math.round(e):0==s&&0<e&&e--,Math.floor(e)},r.prototype.getCategory=function(t){t=this.pointCategoryIndex(t);return null===t?null:this.options.categories[t]},r.prototype.categoryIndex=function(t){return this.totalIndex(t)-Math.floor(this.options.min||0)},r.prototype.categoryAt=function(t,e){var o=this.options;return(e?o.srcCategories:o.categories)[t]},r.prototype.categoriesCount=function(){return(this.options.categories||[]).length},r.prototype.translateRange=function(t){var e=this.options,o=this.lineBox(),o=e.vertical?o.height():o.width(),e=e.categories.length,t=T(t/(o/e),g);return{min:t,max:e+t}},r.prototype.scaleRange=function(t,e){var e=Math.abs(this.pointOffset(e)),o=this.totalRangeIndices(),i=o.max-o.min,t=this.scaleToDelta(t,i),i=o.min+e*t,o=o.max-(1-e)*t;return{min:i,max:o=o-i<.1?i+.1:o}},r.prototype.zoomRange=function(t,e){var o=this.totalRange(),i=o.min,o=o.max,t=this.scaleRange(t,e);return{min:_(t.min,i,o),max:_(t.max,i,o)}},r.prototype.labelsCount=function(){var t=this.labelsRange();return t.max-t.min},r.prototype.labelsRange=function(){var t=this.options,e=t.justified,o=t.labels,i=this.totalRangeIndices(!0),r=i.min,i=i.max,n=Math.floor(r),i=e?(r=Math.ceil(r),Math.floor(i)):(r=Math.floor(r),Math.ceil(i));return{min:(r>o.skip?o.skip+o.step*Math.ceil((r-o.skip)/o.step):o.skip)-n,max:(t.categories.length?i+(e?1:0):0)-n}},r.prototype.createAxisLabel=function(t,e,o){var i=this.options,r=i.dataItems?i.dataItems[t]:null,i=M(i.categories[t],""),o=(o.dataItem=r,this.axisLabelText(i,e,o));return new Ke(i,o,t,r,e)},r.prototype.shouldRenderNote=function(t){var e=this.totalRangeIndices();return Math.floor(e.min)<=t&&t<=Math.ceil(e.max)},r.prototype.noteSlot=function(t){var e=this.options,t=t-Math.floor(e.min||0);return this.getSlot(t)},r.prototype.arrangeNotes=function(){Xo.prototype.arrangeNotes.call(this),this.hideOutOfRangeNotes()},r.prototype.hideOutOfRangeNotes=function(){var t=this.notes,e=this.box;if(t&&t.length)for(var o=this.options.vertical?v:y,i=e[o+1],r=e[o+2],n=0;n<t.length;n++){var s=t[n];s.box&&(r<s.box[o+1]||s.box[o+2]<i)&&s.hide()}},r.prototype.pan=function(t){var e=this.totalRangeIndices(!0),o=this.scaleOptions().scale,t=T(t/o,g),o=this.totalRange(),i=e.min+t,e=e.max+t;return this.limitRange(i,e,0,o.max,t)},r.prototype.pointsRange=function(t,e){var o=this.options,i=o.reverse,o=o.vertical?v:y,r=this.totalRangeIndices(!0),n=this.scaleOptions(),s=n.scale,n=n.box[o+(i?2:1)],i=t[o]-n,t=e[o]-n,e=r.min+i/s,o=r.min+t/s,n=Math.min(e,o),i=Math.max(e,o);if(.01<=i-n)return{min:n,max:i}},r.prototype.valueRange=function(){return this.range()},r.prototype.totalIndex=function(t){var e=this.options;if(this._categoriesMap)return this._categoriesMap.get(t);var o=t,i=e.srcCategories;if(o instanceof Date){for(var r=i.length,n=0;n<r;n++)if(Do(i[n],o))return n;return-1}return i.indexOf(o)},r.prototype.currentRangeIndices=function(){var t=this.options,e=0;return{min:e=m(t.min)?Math.floor(t.min):e,max:m(t.max)?t.justified?Math.floor(t.max):Math.ceil(t.max)-1:this.totalCount()-1}},r.prototype.mapCategories=function(){if(!this._categoriesMap)for(var t=this._categoriesMap=new At,e=this.options.srcCategories,o=0;o<e.length;o++)t.set(e[o],o)},r.prototype.totalCount=function(){return Math.max(this.options.srcCategories.length,this._seriesMax||0)};var Xo,t=r;function r(){Xo.apply(this,arguments)}e(t,{type:"category",vertical:!1,majorGridLines:{visible:!1,width:1,color:j},labels:{zIndex:1},justified:!1,_deferLabels:!0});const qo=t;var t={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"},Yo=[vo,mo,xo,_o,bo,wo,Co,So],Zo="fit";function Qo(t){var e=t._range;return e||((e=t._range=qt(t)).min=d(e.min),e.max=d(e.max)),e}function Ko(t){this.options=t}function $o(t,e,o){(this.options=o).baseUnitStep=o.baseUnitStep||1;var i,r=o.roundToBaseUnit,n=o.justified,s=(this.start=Lo(t,0,o.baseUnit,o.weekStartDay),this.roundToTotalStep(e)),a=!n&&Do(e,s)&&!o.justifyEnd,t=(this.end=this.roundToTotalStep(e,!n,a?1:0),o.min||t);this.valueStart=this.roundToTotalStep(t),this.displayStart=r?this.valueStart:t,(t=o.max)?(i=!n&&Do(t,this.roundToTotalStep(t))?-1:0,this.valueEnd=this.roundToTotalStep(t,!1,i),this.displayEnd=r?this.roundToTotalStep(t,!n):o.max):(this.valueEnd=s,this.displayEnd=r||a?this.end:e),this.valueEnd<this.valueStart&&(this.valueEnd=this.valueStart),this.displayEnd<=this.displayStart&&(this.displayEnd=this.roundToTotalStep(this.displayStart,!1,1))}Ko.prototype.displayIndices=function(){return{min:0,max:1}},Ko.prototype.displayRange=function(){return{}},Ko.prototype.total=function(){return{}},Ko.prototype.valueRange=function(){return{}},Ko.prototype.valueIndex=function(){return-1},Ko.prototype.values=function(){return[]},Ko.prototype.totalIndex=function(){return-1},Ko.prototype.valuesCount=function(){return 0},Ko.prototype.totalCount=function(){return 0},Ko.prototype.dateAt=function(){return null};function Jo(t,e,o){for(var i,r,n,s=Qo(t.categories),a=(t.max||s.max)-(t.min||s.min),p=t.autoBaseUnitSteps,h=t.maxDateGroups,l=t.baseUnit===Zo,c=e?Yo.indexOf(e):0,u=l?Yo[c++]:t.baseUnit,d=a/Oo[u],f=d;!r||h<=d;){for(i=i||p[u].slice(0);(n=i.shift())&&e===u&&n<o;);if(n)d=f/(r=n);else{if(u===Ft(Yo)){r=Math.ceil(f/h);break}if(!l){h<d&&(r=Math.ceil(f/h));break}u=Yo[c++]||Ft(Yo),f=a/Oo[u],i=null}}t.baseUnitStep=r,t.baseUnit=u}$o.prototype.displayRange=function(){return{min:this.displayStart,max:this.displayEnd}},$o.prototype.displayIndices=function(){var t,e,o;return this._indices||(o=(t=this.options).baseUnit,t=t.baseUnitStep,e=Uo(this.displayStart,this.valueStart,o,t),o=Uo(this.displayEnd,this.valueStart,o,t),this._indices={min:e,max:o}),this._indices},$o.prototype.total=function(){return{min:this.start,max:this.end}},$o.prototype.totalCount=function(){return this.totalIndex(this.end)+(this.options.justified?1:0)},$o.prototype.valueRange=function(){return{min:this.valueStart,max:this.valueEnd}},$o.prototype.valueIndex=function(t){var e=this.options;return Math.floor(Uo(t,this.valueStart,e.baseUnit,e.baseUnitStep))},$o.prototype.totalIndex=function(t){var e=this.options;return Math.floor(Uo(t,this.start,e.baseUnit,e.baseUnitStep))},$o.prototype.dateIndex=function(t){var e=this.options;return Uo(t,this.valueStart,e.baseUnit,e.baseUnitStep)},$o.prototype.valuesCount=function(){return this.valueIndex(this.valueEnd)+1},$o.prototype.values=function(){var t=this._values;if(!t){var e=this.options,o=this.valueRange();this._values=t=[];for(var i=o.min;i<=o.max;)t.push(i),i=Lo(i,e.baseUnitStep,e.baseUnit,e.weekStartDay)}return t},$o.prototype.dateAt=function(t,e){var o=this.options;return Lo(e?this.start:this.valueStart,o.baseUnitStep*t,o.baseUnit,o.weekStartDay)},$o.prototype.roundToTotalStep=function(t,e,o){var i=this.options,r=i.baseUnit,n=i.baseUnitStep,i=i.weekStartDay,s=this.start,t=Uo(t,s,r,n),e=e?Math.ceil(t):Math.floor(t);return o&&(e+=o),Lo(s,e*n,r,i)};(ti=qo)&&(s.__proto__=ti),((s.prototype=Object.create(ti&&ti.prototype)).constructor=s).prototype.clone=function(){var t=new s(Object.assign({},this.options),this.chartService);return t.createLabels(),t},s.prototype.categoriesHash=function(){var t=this.dataRange.total().min;return this.options.baseUnit+this.options.baseUnitStep+t},s.prototype.initUserOptions=function(t){return t},s.prototype.initFields=function(){ti.prototype.initFields.call(this);var t=this.chartService,e=t.intl,o=this.options,i=o.categories||[];i._parsed||((i=Go(e,i))._parsed=!0),o=x({roundToBaseUnit:!0},o,{categories:i,min:No(e,o.min),max:No(e,o.max),weekStartDay:Wo(o,e)}),t.panning&&t.isPannable(o.vertical?v:y)&&(o.roundToBaseUnit=!1),o.userSetBaseUnit=o.userSetBaseUnit||o.baseUnit,o.userSetBaseUnitStep=o.userSetBaseUnitStep||o.baseUnitStep,0<((this.options=o).srcCategories=i).length?(e=Qo(i),t=o.maxDivisions,this.dataRange=new $o(e.min,e.max,function(t){var e=(t.baseUnit||"").toLowerCase();if(e!==Zo&&!u(e,Yo)){for(var o=t,i,r,n=o.categories,s=P(n)?n.length:0,a=q,p=0;p<s;p++){var h,l=n[p];l&&i&&(0<(h=Bo(l,i))&&(r=(a=Math.min(a,h))>=Mo?So:24192e5<=a?Co:To<=a?wo:Po<=a?bo:Ao<=a?_o:ko<=a?xo:mo)),i=l}o.baseUnit=r||bo}return e!==Zo&&"auto"!==t.baseUnitStep||Jo(t),t}(o)),t?(i=this.dataRange.displayRange(),Jo(i=Object.assign({},o,{justified:!0,roundToBaseUnit:!1,baseUnit:"fit",min:i.min,max:i.max,maxDateGroups:t}),(t=this.dataRange.options).baseUnit,t.baseUnitStep),this.divisionRange=new $o(e.min,e.max,i)):this.divisionRange=this.dataRange):(o.baseUnit=o.baseUnit||bo,this.dataRange=this.divisionRange=new Ko(o)),this.rangeLabels=[]},s.prototype.tickIndices=function(t){var e=this.dataRange,o=this.divisionRange,i=o.valuesCount();if(!this.options.maxDivisions||!i)return ti.prototype.tickIndices.call(this,t);var r=[],n=o.values(),s=0;this.options.justified||(n=n.concat(o.dateAt(i)),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},s.prototype.shouldRenderNote=function(t){var e=this.range(),o=this.options.categories||[];return 0<=Vo(t,e.min)&&Vo(t,e.max)<=0&&o.length},s.prototype.parseNoteValue=function(t){return No(this.chartService.intl,t)},s.prototype.noteSlot=function(t){return this.getSlot(t)},s.prototype.translateRange=function(t){var e=this.options,o=e.baseUnit,i=e.weekStartDay,r=e.vertical,n=this.lineBox(),r=r?n.height():n.width(),n=this.range(),r=r/(n.max-n.min),t=T(t/r,g);return n.min&&n.max&&(r=Ro(e.min||n.min,t),e=Ro(e.max||n.max,t),n={min:Lo(r,0,o,i),max:Lo(e,0,o,i)}),n},s.prototype.labelsRange=function(){return{min:this.options.labels.skip,max:this.divisionRange.valuesCount()}},s.prototype.pan=function(t){if(this.isEmpty())return null;var e=this.options,o=this.lineBox(),o=e.vertical?o.height():o.width(),i=this.dataRange.displayRange(),r=i.min,i=i.max,n=this.dataRange.total(),t=T(t/(o/(i-r)),g)*(e.reverse?-1:1),o=Ro(r,t),r=Ro(i,t),i=this.limitRange(f(o),f(r),f(n.min),f(n.max),t);return i?(i.min=d(i.min),i.max=d(i.max),i.baseUnit=e.baseUnit,i.baseUnitStep=e.baseUnitStep||1,i.userSetBaseUnit=e.userSetBaseUnit,i.userSetBaseUnitStep=e.userSetBaseUnitStep,i):void 0},s.prototype.pointsRange=function(t,e){if(this.isEmpty())return null;var t=ti.prototype.pointsRange.call(this,t,e),e=this.dataRange.displayRange(),o=this.dataRange.displayIndices(),o=jo(e.max,e.min)/(o.max-o.min),i=this.options;return{min:Ro(e.min,t.min*o),max:Ro(e.min,t.max*o),baseUnit:i.userSetBaseUnit||i.baseUnit,baseUnitStep:i.userSetBaseUnitStep||i.baseUnitStep}},s.prototype.scaleRange=function(t,e){if(this.isEmpty())return{};var o=this.options,i=o.userSetBaseUnit===Zo,r=this.dataRange.total(),n=this.dataRange.displayRange(),s=n.min,n=n.max,e=Math.abs(this.pointOffset(e)),t=this.scaleToDelta(t,n-s),a=Math.round(e*t),e=Math.round((1-e)*t),p=this.dataRange.options.baseUnit,t=new Date(s.getTime()+a),a=new Date(n.getTime()-e);if(i){var h,l,c=o.autoBaseUnitSteps,e=o.maxDateGroups,i=Ft(c[p])*e*Oo[p],u=jo(n,s),d=jo(a,t),f=Yo.indexOf(p);if(d<Oo[p]&&p!==vo)p=Yo[f-1],t=Ro(s,l=(u-(e-1)*(h=Ft(c[p]))*Oo[p])/2),a=Ro(n,-l);else if(i<d&&p!==So){var g=0;do{for(p=Yo[++f],g=0,l=2*Oo[p];h=c[p][g],++g<c[p].length&&l*h<u;);}while(p!==So&&l*h<u);0<(l=(l*h-u)/2)&&(t=Ro(s,-l),a=Ro(n,l),t=Ro(t,_(a,r.min,r.max)-a),a=Ro(a,_(t,r.min,r.max)-t))}}return t&&a&&0<jo(a,t)?{min:t,max:a,baseUnit:o.userSetBaseUnit||o.baseUnit,baseUnitStep:o.userSetBaseUnitStep||o.baseUnitStep}:void 0},s.prototype.zoomRange=function(t,e){var o=this.dataRange.total(),t=this.scaleRange(t,e);return t&&(t.min<o.min&&(t.min=o.min),t.max>o.max&&(t.max=o.max)),t},s.prototype.range=function(){return this.dataRange.displayRange()},s.prototype.createLabels=function(){ti.prototype.createLabels.call(this),this.createRangeLabels()},s.prototype.clearLabels=function(){ti.prototype.clearLabels.call(this),this.rangeLabels=[]},s.prototype.arrangeLabels=function(){this.arrangeRangeLabels(),ti.prototype.arrangeLabels.call(this)},s.prototype.arrangeRangeLabels=function(){var t,e,o,i,r=this.options,n=this.rangeLabels;0!==n.length&&(t=this.lineBox(),e=r.vertical,r=r.rangeLabels.mirror||r.labels.mirror,(o=n[0])&&(i=e?t.y1-o.box.height()/2:t.x1,this.positionLabel(o,r,i)),(o=n[1])&&(i=e?t.y2-o.box.height()/2:t.x2,this.positionLabel(o,r,i)))},s.prototype.autoRotateLabels=function(){ti.prototype.autoRotateLabels.call(this),this.autoRotateRangeLabels()},s.prototype.hideOutOfRangeLabels=function(){ti.prototype.hideOutOfRangeLabels.call(this),this.hideOverlappingLabels()},s.prototype.hideOverlappingLabels=function(){var t=this.rangeLabels,e=this.labels;if(0!==t.length){var o=t[0];if(o&&o.options.visible)for(var i=0;i<e.length&&s(o,e[i]);i++);var r=t[1];if(r&&r.options.visible)for(var n=e.length-1;0<n&&s(r,e[n]);--n);}function s(t,e){return!(e.options.visible&&!e.box.overlaps(t.box)||(e.options.visible=!1))}},s.prototype.contentBox=function(){for(var t=ti.prototype.contentBox.call(this),e=this.rangeLabels,o=0;o<e.length;o++){var i=e[o];i.options.visible&&t.wrap(i.box)}return t},s.prototype.createAxisLabel=function(t,e,o){void 0===o&&(o={});var i=this.options,i=i.dataItems&&!i.maxDivisions?i.dataItems[t]:null,r=this.divisionRange.dateAt(t),n=e.dateFormats[this.divisionRange.options.baseUnit],n=(e.format=e.format||n,o.dataItem=i,this.axisLabelText(r,e,o));if(n)return new Ke(r,n,t,i,e)},s.prototype.createRangeLabels=function(){var i=this,t=this.divisionRange,e=t.displayStart,t=t.displayEnd,o=this.options,r=Object.assign({},o.labels,o.rangeLabels,{align:w,zIndex:o.zIndex});!0===r.visible&&(this.normalizeLabelRotation(r),r.alignRotation=w,"auto"===r.rotation&&(r.rotation=0,o.autoRotateRangeLabels=!0),o=r.dateFormats[this.divisionRange.options.baseUnit],r.format=r.format||o,(o=function(t,e,o){o&&(e=new Ke(e,o,t,null,r),i.append(e),i.rangeLabels.push(e))})(0,e,this.axisLabelText(e,r,{index:0,count:2})),o(1,t,this.axisLabelText(t,r,{index:1,count:2})))},s.prototype.autoRotateRangeLabels=function(){var t,e,i=this,o=this.rangeLabels;this.options.autoRotateRangeLabels&&!this.options.vertical&&2===o.length&&(t=function(t,e,o){e=2*Math.abs(e[o+1]-e[o]),o=i.autoRotateLabelAngle(t.box,e);0!==o&&(t.options.rotation=o,t.reflow(new B))},e=this.getMajorTickPositions(),t(o[0],e,0),t(o[1],e,e.length-2))},s.prototype.categoryIndex=function(t){return this.dataRange.valueIndex(t)},s.prototype.slot=function(t,e,o){var i=this.dataRange,i=(t instanceof Date&&(t=i.dateIndex(t)),e instanceof Date&&(e=i.dateIndex(e)),this.getSlot(t,e,o));if(i)return i.toRect()},s.prototype.getSlot=function(t,e,o){return typeof t==Q&&(t=this.categoryIndex(t)),typeof e==Q&&(e=this.categoryIndex(e)),ti.prototype.getSlot.call(this,t,e,o)},s.prototype.valueRange=function(){var t=Qo(this.options.srcCategories);return{min:d(t.min),max:d(t.max)}},s.prototype.categoryAt=function(t,e){return this.dataRange.dateAt(t,e)},s.prototype.categoriesCount=function(){return this.dataRange.valuesCount()},s.prototype.rangeIndices=function(){return this.dataRange.displayIndices()},s.prototype.labelsBetweenTicks=function(){return!this.divisionRange.options.justified},s.prototype.prepareUserOptions=function(){this.isEmpty()||(this.options.categories=this.dataRange.values())},s.prototype.getCategory=function(t){t=this.pointCategoryIndex(t);return null===t?null:this.dataRange.dateAt(t)},s.prototype.totalIndex=function(t){return this.dataRange.totalIndex(t)},s.prototype.currentRangeIndices=function(){var t=this.dataRange.valueRange();return{min:this.dataRange.totalIndex(t.min),max:this.dataRange.totalIndex(t.max)}},s.prototype.totalRange=function(){return this.dataRange.total()},s.prototype.totalCount=function(){return this.dataRange.totalCount()},s.prototype.isEmpty=function(){return!this.options.srcCategories.length},s.prototype.roundedRange=function(){if(!1!==this.options.roundToBaseUnit||this.isEmpty())return this.range();var t=this.options,e=Qo(t.srcCategories);return new $o(e.min,e.max,Object.assign({},t,{justified:!1,roundToBaseUnit:!0,justifyEnd:t.justified})).displayRange()};var ti,n=s;function s(){ti.apply(this,arguments)}e(n,{type:F,labels:{dateFormats:t},rangeLabels:{visible:!1},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});const ei=n;function oi(t,e){return T(Math.floor(t/e)*e,g)}function ii(t,e){return T(Math.ceil(t/e)*e,g)}function ri(t){return Math.max(Math.min(t,3e5),-3e5)}var ni,si=Math.pow(10,-9),n=((ni=yo)&&(ai.__proto__=ni),((ai.prototype=Object.create(ni&&ni.prototype)).constructor=ai).prototype.initUserOptions=function(t){a=t.seriesMin,o=t.seriesMax,i=(r=t).narrowRange,e=function(t){if(!t&&!o)return 0;if(0<=t&&0<=o){var e=t===o?0:t;if(!1===i||!i&&.2<(o-e)/o)return 0;e=Math.max(0,e-(o-e)/2)}else e=t;return e}(a),a=function(t,e,o){if(!t&&!e)return 1;if(t<=0&&e<=0){var i=t===e?0:e,r=Math.abs((i-t)/i);if(!1===o||!o&&.2<r)return 0;r=Math.min(0,i-(t-i)/2)}else r=e;return r}(a,o,i),n=le(e,a),!(s={majorUnit:n})!==r.roundToMajorUnit&&(e<0&&pi(e,n,1/3)&&(e-=n),0<a&&pi(a,n,1/3)&&(a+=n)),s.min=oi(e,n),s.max=ii(a,n);var o,i,e,r=s,n=(this.totalOptions=(e=r,{min:P((a=t).min)?Math.min(e.min,a.min):e.min,max:P(a.max)?Math.max(e.max,a.max):e.max,majorUnit:e.majorUnit}),r),s=t,a=s;if(s){for(var p=s,h=["min","max"],l=0;l<h.length;l++){var c=h[l];null===p[c]&&(p[c]=void 0)}var u=P(s.min),d=P(s.max),f=u||d;f&&s.min===s.max&&(0<s.min?s.min=0:s.max=1),s.majorUnit?(n.min=oi(n.min,s.majorUnit),n.max=ii(n.max,s.majorUnit)):f&&(a=x(n,s),n.majorUnit=le(a.min,a.max))}return n.minorUnit=(a.majorUnit||n.majorUnit)/5,(f=x(n,a)).min>=f.max&&(u&&!d?f.max=f.min+f.majorUnit:!u&&d&&(f.min=f.max-f.majorUnit)),f},ai.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},ai.prototype.clone=function(){return new ai(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},ai.prototype.startValue=function(){return 0},ai.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},ai.prototype.getDivisions=function(t){if(0===t)return 1;var e=this.options,e=e.max-e.min;return Math.floor(T(e/t,3))+1},ai.prototype.getTickPositions=function(t,e){var o=this.options,i=this.lineInfo(),r=i.axisDir,n=i.axisOrigin,s=i.lineBox,a=t*(i.lineSize/(o.max-o.min)),p=this.getDivisions(t),h=[],l=s[n],c=0;e&&(c=e/t);for(var u=0;u<p;u++)u%c!=0&&h.push(T(l,3)),l+=a*r;return h},ai.prototype.getMajorTickPositions=function(){return this.getTickPositions(this.options.majorUnit)},ai.prototype.getMinorTickPositions=function(){return this.getTickPositions(this.options.minorUnit)},ai.prototype.getSlot=function(t,e,o){void 0===o&&(o=!1);var i=this.options,r=this.lineInfo(),n=r.axis,s=r.axisDir,a=r.lineBox,p=r.lineSize,r=r.lineStart,p=s*(p/(i.max-i.min)),h=M(t,e||0),e=M(e,t||0),t=(o&&(h=_(h,i.min,i.max),e=_(e,i.min,i.max)),Math.min(h,e)-i.min),o=Math.max(h,e)-i.min,h=new B(a.x1,a.y1,a.x1,a.y1);return h[n+1]=ri(r+p*(0<s?t:o)),h[n+2]=ri(r+p*(0<s?o:t)),h},ai.prototype.getValue=function(t){var e=this.options,o=Number(e.max),e=Number(e.min),t=this.pointOffset(t);return t<0||1<t?null:T(e+t*(o-e),g)},ai.prototype.translateRange=function(t){var e=this.options,o=e.vertical,i=e.reverse,r=e.max,e=e.min,n=this.lineInfo().lineSize,t=T(t/(n/(r-e)),g);return{min:e+(t=!o&&!i||o&&i?t:-t),max:r+t,offset:t}},ai.prototype.labelsCount=function(){return this.getDivisions(this.options.majorUnit)},ai.prototype.createAxisLabel=function(t,e,o){var i=this.options,i=T(i.min+t*i.majorUnit,g),o=this.axisLabelText(i,e,o);return new Ke(i,o,t,null,e)},ai.prototype.shouldRenderNote=function(t){var e=this.range();return e.min<=t&&t<=e.max},ai.prototype.pan=function(t){t=this.translateRange(t);return this.limitRange(t.min,t.max,this.totalMin,this.totalMax,t.offset)},ai.prototype.pointsRange=function(t,e){var t=this.getValue(t),e=this.getValue(e),o=Math.min(t,e),t=Math.max(t,e);if(this.isValidRange(o,t))return{min:o,max:t}},ai.prototype.scaleRange=function(t,e){var e=Math.abs(this.pointOffset(e)),o=this.options.max-this.options.min,t=this.scaleToDelta(t,o),o=(1-e)*t,e=T(this.options.min+e*t,g),t=T(this.options.max-o,g);return{min:e,max:t=t-e<si?e+si:t}},ai.prototype.zoomRange=function(t,e){var o=this.totalMin,i=this.totalMax,t=this.scaleRange(t,e);return{min:_(t.min,o,i),max:_(t.max,o,i),narrowRange:!1}},ai.prototype.isValidRange=function(t,e){return si<e-t},ai);function ai(t,e,o,i){ni.call(this,Object.assign({},o,{seriesMin:t,seriesMax:e}),i)}function pi(t,e,o){t=T(Math.abs(t%e),g);return 0===t||e*(1-o)<t}e(n,{type:"numeric",min:0,max:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:j},labels:{format:"#.####################"},zIndex:1});const hi=n;(li=yo)&&(ci.__proto__=li),((ci.prototype=Object.create(li&&li.prototype)).constructor=ci).prototype.clone=function(){return new ci(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},ci.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},ci.prototype.getDivisions=function(t){var e=this.options;return Math.floor(Fo(e.min,e.max,e.baseUnit)/t+1)},ci.prototype.getTickPositions=function(t){for(var e=this.options,o=this.lineInfo(),i=o.axisDir,r=o.lineSize,n=o.lineStart,s=this.getDivisions(t),a=r/jo(e.max,e.min),p=e.weekStartDay||0,h=[n],l=1;l<s;l++){var c=n+jo(Lo(e.min,l*t,e.baseUnit,p),e.min)*a*i;h.push(T(c,3))}return h},ci.prototype.getMajorTickPositions=function(){return this.getTickPositions(this.options.majorUnit)},ci.prototype.getMinorTickPositions=function(){return this.getTickPositions(this.options.minorUnit)},ci.prototype.getSlot=function(t,e,o){return hi.prototype.getSlot.call(this,No(this.intlService,t),No(this.intlService,e),o)},ci.prototype.getValue=function(t){t=hi.prototype.getValue.call(this,t);return null!==t?d(t):null},ci.prototype.labelsCount=function(){return this.getDivisions(this.options.majorUnit)},ci.prototype.createAxisLabel=function(t,e,o){var i=this.options,r=t*i.majorUnit,n=i.weekStartDay||0,s=i.min,r=(0<r&&(s=Lo(s,r,i.baseUnit,n)),e.dateFormats[i.baseUnit]),n=(e.format=e.format||r,this.axisLabelText(s,e,o));return new Ke(s,n,t,null,e)},ci.prototype.translateRange=function(t){var e=this.options,o=this.lineBox(),i=e.vertical,r=e.reverse,o=i?o.height():o.width(),n=this.range(),o=o/jo(n.max,n.min),n=T(t/o,g);return{min:Ro(e.min,n=!i&&!r||i&&r?n:-n),max:Ro(e.max,n),offset:n}},ci.prototype.shouldRenderNote=function(t){var e=this.range();return 0<=Vo(t,e.min)&&Vo(t,e.max)<=0},ci.prototype.pan=function(t){t=this.translateRange(t,!0),t=this.limitRange(f(t.min),f(t.max),this.totalMin,this.totalMax,t.offset);if(t)return{min:d(t.min),max:d(t.max)}},ci.prototype.pointsRange=function(t,e){var t=this.getValue(t),e=this.getValue(e),o=Math.min(t,e),t=Math.max(t,e);return{min:d(o),max:d(t)}},ci.prototype.scaleRange=function(t,e){var e=Math.abs(this.pointOffset(e)),o=this.options.max-this.options.min,t=this.scaleToDelta(t,o),o=e*t,e=(1-e)*t,t=d(f(this.options.min)+o),o=d(f(this.options.max)-e);return{min:t,max:o=o-t<1e3?d(f(t)+1e3):o}},ci.prototype.zoomRange=function(t,e){t=this.scaleRange(t,e);return{min:d(_(f(t.min),this.totalMin,this.totalMax)),max:d(_(f(t.max),this.totalMin,this.totalMax))}};var li,n=ci;function ci(t,e,o,i){var r,n,s,a,p,h,l,t=d(t),e=d(e),c=i.intl,o=o||{},u=(u=t,r=e,n=o=x(o||{},{min:No(c,o.min),max:No(c,o.max),axisCrossingValue:Go(c,o.axisCrossingValues||o.axisCrossingValue),weekStartDay:Wo(o,c)}),u=n.min||u,r=n.max||r,s=n.baseUnit||(r&&u?(s=Bo(r,u),a=_o,Mo<=s?a=So:26784e5<=s?a=Co:To<=s?a=wo:Po<=s&&(a=bo),a):_o),a=Oo[s],p=n.weekStartDay||0,u=Io(f(u)-1,s,p)||d(r),r=zo(f(r)+1,s,p),a=n.majorUnit||ii(le(u.getTime(),r.getTime()),a)/a,h=ii(h=Fo(u,r,s),a)-h,l=Math.floor(h/2),h-=l,n.baseUnit||delete n.baseUnit,n.baseUnit=n.baseUnit||s,n.min=n.min||Lo(u,-l,s,p),n.max=n.max||Lo(r,h,s,p),n.minorUnit=n.minorUnit||a/5,n.majorUnit=a,o=n,li.call(this,o,i),this.intlService=c,this.seriesMin=t,this.seriesMax=e,o.weekStartDay||0);this.totalMin=f(Io(f(t)-1,o.baseUnit,u)),this.totalMax=f(zo(f(e)+1,o.baseUnit,u))}e(n,{type:F,majorGridLines:{visible:!0,width:1,color:j},labels:{dateFormats:t}});const ui=n;(di=yo)&&(fi.__proto__=di),((fi.prototype=Object.create(di&&di.prototype)).constructor=fi).prototype.clone=function(){return new fi(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},fi.prototype.startValue=function(){return this.options.min},fi.prototype.getSlot=function(t,e,o){var i=this.options,r=this.logMin,n=this.logMax,s=i.majorUnit,a=i.min,i=i.max,p=this.lineInfo(),h=p.axis,l=p.axisDir,c=p.lineBox,u=p.lineSize,p=p.lineStart,u=l*(u/(n-r)),n=M(t,e||1),e=M(e,t||1);if(n<=0||e<=0)return null;o&&(n=_(n,a,i),e=_(e,a,i));n=yi(n,s),e=yi(e,s),t=Math.min(n,e)-r,o=Math.max(n,e)-r,a=new B(c.x1,c.y1,c.x1,c.y1);return a[h+1]=ri(p+u*(0<l?t:o)),a[h+2]=ri(p+u*(0<l?o:t)),a},fi.prototype.getValue=function(t){var e=this.options,o=this.logMin,i=this.logMax,e=e.majorUnit,r=this.lineInfo(),n=r.axis,s=r.axisDir,a=r.lineStart,r=r.lineSize,s=s*(t[n]-a);return s<0||r<s?null:T(Math.pow(e,o+s*((i-o)/r)),g)},fi.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},fi.prototype.translateRange=function(t){var e=this.options,o=this.logMin,i=this.logMax,r=e.reverse,n=e.vertical,e=e.majorUnit,s=this.lineBox(),s=n?s.height():s.width(),t=T(t/(s/(i-o)),g);return!n&&!r||n&&r||(t=-t),{min:Math.pow(e,o+t),max:Math.pow(e,i+t),offset:t}},fi.prototype.labelsCount=function(){var t=Math.floor(this.logMax);return Math.floor(t-this.logMin)+1},fi.prototype.getMajorTickPositions=function(){var e=[];return this.traverseMajorTicksPositions(function(t){e.push(t)},{step:1,skip:0}),e},fi.prototype.createTicks=function(o){var t=this.options,e=t.majorTicks,i=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,o.append(uo(a,e))}return e.visible&&this.traverseMajorTicksPositions(p,e),i.visible&&this.traverseMinorTicksPositions(p,i),[]},fi.prototype.createGridLines=function(t){var e=this.options,o=e.minorGridLines,i=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){u(t,n)||(r.position=t,s.append(fo(r,e)),n.push(t))}return i.visible&&this.traverseMajorTicksPositions(a,i),o.visible&&this.traverseMinorTicksPositions(a,o),s.children},fi.prototype.traverseMajorTicksPositions=function(t,e){for(var o=this.lineInfo(),i=o.lineStart,r=o.step,n=this.logMin,s=this.logMax,a=Math.ceil(n)+e.skip;a<=s;a+=e.step)t(T(i+r*(a-n),g),e)},fi.prototype.traverseMinorTicksPositions=function(t,e){for(var o=this.options,i=o.min,r=o.max,n=o.minorUnit,s=o.majorUnit,o=this.lineInfo(),a=o.lineStart,p=o.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 f=u.value+d*u.minorStep;if(r<f)break;i<=f&&t(T(a+p*(yi(f,s)-h),g),e)}},fi.prototype.createAxisLabel=function(t,e,o){var i=Math.ceil(this.logMin+t),i=Math.pow(this.options.majorUnit,i),o=this.axisLabelText(i,e,o);return new Ke(i,o,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){t=this.getValue(t),e=this.getValue(e);return{min:Math.min(t,e),max:Math.max(t,e)}},fi.prototype.scaleRange=function(t,e){var o=this.options.majorUnit,i=yi(this.options.min,o),r=yi(this.options.max,o),e=Math.abs(this.pointOffset(e)),t=this.scaleToDelta(t,r-i),i=Math.pow(o,i+e*t),o=Math.pow(o,r-(1-e)*t);return{min:i,max:o=o-i<1e-6?i+1e-6:o}},fi.prototype.zoomRange=function(t,e){var t=this.scaleRange(t,e),e=this.totalMin,o=this.totalMax;return{min:_(t.min,e,o),max:_(t.max,e,o)}},fi.prototype._minorIntervalOptions=function(t){var e=this.options,o=e.minorUnit,e=e.majorUnit,i=Math.pow(e,t);return{value:i,minorStep:(Math.pow(e,t+1)-i)/o}},fi.prototype.lineInfo=function(){var t=di.prototype.lineInfo.call(this);return t.step=t.axisDir*(t.lineSize/(this.logMax-this.logMin)),t};var di,t=fi;function fi(t,e,o,i){var r,n,s,a,p,h=x({majorUnit:10,min:t,max:e},o),l=h.majorUnit,c=(c=T(yi(p=e,u=l),g)%1,p<=0?u:0!=c&&(c<.3||.9<c)?Math.pow(u,yi(p,u)+.2):Math.pow(u,Math.ceil(yi(p,u)))),u=(p=t,s=(u=h).majorUnit,(a=p)<=0?a=e<=1?Math.pow(s,-2):1:u.narrowRange||(a=Math.pow(s,Math.floor(yi(p,s)))),a),d=(p=u,s=c,a=o,r=(d=h).min,n=d.max,P(d.axisCrossingValue)&&d.axisCrossingValue<=0&&gi(),P(a.max)?a.max<=0&&gi():n=s,P(a.min)?a.min<=0&&gi():r=p,{min:r,max:n});h.max=d.max,h.min=d.min,h.minorUnit=o.minorUnit||T(l-1,g),di.call(this,h,i),this.totalMin=P(o.min)?Math.min(u,o.min):u,this.totalMax=P(o.max)?Math.max(c,o.max):c,this.logMin=T(yi(d.min,l),g),this.logMax=T(yi(d.max,l),g),this.seriesMin=t,this.seriesMax=e,this.createLabels()}function gi(){throw new Error("Non positive values cannot be used for a logarithmic axis")}function yi(t,e){return Math.log(t)/Math.log(e)}e(t,{type:"log",majorUnit:10,minorUnit:1,axisCrossingValue:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:j},zIndex:1,_deferLabels:!0});const vi=t,mi={createGridLines:function(t){var e,o=this.options,i=Math.abs(this.box.center().y-t.lineBox().y1),r=[],n=!1;return o.majorGridLines.visible&&(e=this.majorGridLineAngles(t),n=!0,r=this.renderMajorGridLines(e,i,o.majorGridLines)),o.minorGridLines.visible&&(e=this.minorGridLineAngles(t,n),Lt(r,this.renderMinorGridLines(e,i,o.minorGridLines,t,n))),r},renderMajorGridLines:function(t,e,o){return this.renderGridLines(t,e,o)},renderMinorGridLines:function(t,e,o,i,r){i=this.radiusCallback&&this.radiusCallback(e,i,r);return this.renderGridLines(t,e,o,i)},renderGridLines:function(t,e,o,i){for(var r={stroke:{width:o.width,color:o.color,dashType:o.dashType}},o=this.box.center(),n=new b.geometry.Circle([o.x,o.y],e),s=this.gridLinesVisual(),a=0;a<t.length;a++){var p=new b.drawing.Path(r);i&&(n.radius=i(t[a])),p.moveTo(n.center).lineTo(n.pointAt(t[a]+180)),s.append(p)}return s.children},gridLineAngles:function(t,e,o,i,r){var n=this,e=this.intervals(e,o,i,r),o=t.options,s=o.visible&&!1!==(o.line||{}).visible;return Ot(e,function(t){t=n.intervalAngle(t);if(!s||90!==t)return t})}};(xi=qo)&&(_i.__proto__=xi),((_i.prototype=Object.create(xi&&xi.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,o=e.skip||0,i=e.step||1,r=new B,n=0;n<t.length;n++){t[n].reflow(r);var s=t[n].box;t[n].reflow(this.getSlot(o+n*i).adjacentBox(0,s.width(),s.height()))}},_i.prototype.intervals=function(t,e,o,i){void 0===i&&(i=!1);for(var r,n=this.options,s=n.categories.length/t||1,a=360/s,p=o||1,h=[],l=e||0;l<s;l+=p)r=n.reverse?360-l*a:l*a,r=T(r,3)%360,i&&u(r,i)||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 Ot(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 o=this.options,i=o.minorGridLines,o=o.majorGridLines,e=e?this.intervals(1,o.skip,o.step):null;return this.gridLineAngles(t,.5,i.skip,i.step,e)},_i.prototype.radiusCallback=function(e,t,o){var i,r;if(t.options.type!==V)return t=Gt(360/(2*this.options.categories.length)),i=Math.cos(t)*e,r=this.majorAngles(),function(t){return!o&&u(t,r)?e:i}},_i.prototype.createPlotBands=function(){for(var t=this.options.plotBands||[],e=this._plotbandGroup=new b.drawing.Group({zIndex:-1}),o=0;o<t.length;o++){var i=t[o],r=this.plotBandSlot(i),n=this.getSlot(i.from),s=i.from-Math.floor(i.from),a=(r.startAngle+=s*n.angle,Math.ceil(i.to)-i.to),a=(r.angle-=(a+s)*n.angle,be.current.createRing(r,{fill:{color:i.color,opacity:i.opacity},stroke:{opacity:i.opacity}}));e.append(a)}this.appendVisual(e)},_i.prototype.plotBandSlot=function(t){return this.getSlot(t.from,t.to-1)},_i.prototype.getSlot=function(t,e){var o=this.options,i=o.justified,r=this.box,n=this.majorAngles(),s=n.length,a=360/s,o=(o.reverse&&!i&&(t=(t+1)%s),n[t=_(Math.floor(t),0,s-1)]),n=(i&&(o-=a/2)<0&&(o+=360),a*(_(Math.ceil(e||t),t,s-1)-t+1));return new ye(r.center(),0,r.height()/2,o,n)},_i.prototype.slot=function(t,e){var t=this.getSlot(t,e),e=t.startAngle+180,o=e+t.angle;return new b.geometry.Arc([t.center.x,t.center.y],{startAngle:e,endAngle:o,radiusX:t.radius,radiusY:t.radius})},_i.prototype.pointCategoryIndex=function(t){for(var e=this.options.categories.length,o=null,i=0;i<e;i++)if(this.getSlot(i).containsPoint(t)){o=i;break}return o};var xi,n=_i;function _i(){xi.apply(this,arguments)}e(n,{startAngle:90,labels:{margin:A(10)},majorGridLines:{visible:!0},justified:!0}),x(n.prototype,mi);const bi=n;(wi=yo)&&(Ci.__proto__=wi),((Ci.prototype=Object.create(wi&&wi.prototype)).constructor=Ci).prototype.getDivisions=function(t){return hi.prototype.getDivisions.call(this,t)-1},Ci.prototype.reflow=function(t){this.box=t,this.reflowLabels()},Ci.prototype.reflowLabels=function(){for(var t=this.options,e=this.labels,o=this.options.labels,i=o.skip||0,o=o.step||1,r=new B,n=this.intervals(t.majorUnit,i,o),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()))}},Ci.prototype.lineBox=function(){return this.box},Ci.prototype.intervals=function(t,e,o,i){void 0===i&&(i=!1);for(var r=this.options.min,n=this.getDivisions(t),s=[],a=o||1,p=e||0;p<n;p+=a){var h=(360+r+p*t)%360;i&&u(h,i)||s.push(h)}return s},Ci.prototype.majorIntervals=function(){return this.intervals(this.options.majorUnit)},Ci.prototype.minorIntervals=function(){return this.intervals(this.options.minorUnit)},Ci.prototype.intervalAngle=function(t){return(540-t-this.options.startAngle)%360},Ci.prototype.createLine=function(){return[]},Ci.prototype.majorGridLineAngles=function(t){var e=this.options.majorGridLines;return this.gridLineAngles(t,this.options.majorUnit,e.skip,e.step)},Ci.prototype.minorGridLineAngles=function(t,e){var o=this.options,i=o.minorGridLines,r=o.majorGridLines,e=e?this.intervals(o.majorUnit,r.skip,r.step):null;return this.gridLineAngles(t,o.minorUnit,i.skip,i.step,e)},Ci.prototype.plotBandSlot=function(t){return this.getSlot(t.from,t.to)},Ci.prototype.getSlot=function(t,e){var o=this.options,i=this.box,r=o.startAngle,t=_(t,o.min,o.max),e=_(e||t,t,o.max);return o.reverse&&(t*=-1,e*=-1),(e=(540-e-r)%360)<(t=(540-t-r)%360)&&(o=t,t=e,e=o),new ye(i.center(),0,i.height()/2,t,e-t)},Ci.prototype.slot=function(t,e){var o=this.options,i=360-o.startAngle,r=this.getSlot(t,e=void 0===e?t:e),n=Math.min(t,e),t=Math.max(t,e),e=o.reverse?(s=n,t):(s=360-t,360-n),s=(s+i)%360;return new b.geometry.Arc([r.center.x,r.center.y],{startAngle:s,endAngle:e=(e+i)%360,radiusX:r.radius,radiusY:r.radius})},Ci.prototype.getValue=function(t){var e=this.options,o=this.box.center(),i=t.x-o.x,t=t.y-o.y,o=Math.round(zt(Math.atan2(t,i))),t=e.startAngle;return e.reverse||(o*=-1,t*=-1),(o+t+360)%360},Ci.prototype.valueRange=function(){return{min:0,max:2*Math.PI}};var wi,t=Ci;function Ci(t,e){wi.call(this,t,e);t=this.options;t.minorUnit=t.minorUnit||t.majorUnit/2}e(t,{type:"polar",startAngle:0,reverse:!1,majorUnit:60,min:0,max:360,labels:{margin:A(10)},majorGridLines:{color:j,visible:!0,width:1},minorGridLines:{color:"#aaa"}}),x(t.prototype,mi,{createPlotBands:bi.prototype.createPlotBands,majorAngles:bi.prototype.majorAngles,range:hi.prototype.range,labelsCount:hi.prototype.labelsCount,createAxisLabel:hi.prototype.createAxisLabel});const Si=t;function ki(t,e){return 180-Math.abs(Math.abs(t-e)-180)}var Ai,n={options:{majorGridLines:{visible:!0}},createPlotBands:function(){var t=this.options,e=t.majorGridLines.type,o=t.plotBands;void 0===o&&(o=[]);for(var t=this.plotArea.polarAxis,i=t.majorAngles(),r=t.box.center(),n=this._plotbandGroup=new b.drawing.Group({zIndex:-1}),s=0;s<o.length;s++){var a=o[s],p={fill:{color:a.color,opacity:a.opacity},stroke:{opacity:a.opacity}},a=this.getSlot(a.from,a.to,!0),a=new ye(r,r.y-a.y2,r.y-a.y1,0,360),a=e===V?be.current.createRing(a,p):b.drawing.Path.fromPoints(this.plotBandPoints(a,i),p).close();n.append(a)}this.appendVisual(n)},plotBandPoints:function(t,e){for(var o=[],i=[],r=[t.center.x,t.center.y],n=new b.geometry.Circle(r,t.innerRadius),s=new b.geometry.Circle(r,t.radius),a=0;a<e.length;a++)o.push(n.pointAt(e[a]+180)),i.push(s.pointAt(e[a]+180));return o.reverse(),o.push(o[0]),i.push(i[0]),i.concat(o)},createGridLines:function(t){var e=this.options,o=this.radarMajorGridLinePositions(),i=t.majorAngles(),t=t.box.center(),r=[];return e.majorGridLines.visible&&(r=this.renderGridLines(t,o,i,e.majorGridLines)),e.minorGridLines.visible&&(o=this.radarMinorGridLinePositions(),Lt(r,this.renderGridLines(t,o,i,e.minorGridLines))),r},renderGridLines:function(t,e,o,i){var r={stroke:{width:i.width,color:i.color,dashType:i.dashType}},n=i.skip,s=(void 0===n&&(n=0),i.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 b.geometry.Circle([t.x,t.y],h);if(i.type===V)a.append(new b.drawing.Circle(l,r));else{for(var c=new b.drawing.Path(r),u=0;u<o.length;u++)c.lineTo(l.pointAt(o[u]+180));c.close(),a.append(c)}}}return a.children},getValue:function(t){var e,o,i=this.lineBox(),r=this.plotArea.polarAxis,n=r.majorAngles(),r=r.box.center(),s=t.distanceTo(r),a=s;return this.options.majorGridLines.type!==V&&1<n.length&&(e=t.x-r.x,t=t.y-r.y,o=(zt(Math.atan2(t,e))+540)%360,n.sort(function(t,e){return ki(t,o)-ki(e,o)}),r=90-ki(n[0],n[1])/2,t=180-ki(o,n[0])-r,a=s*(Math.sin(Gt(t))/Math.sin(Gt(r)))),this.axisType().prototype.getValue.call(this,new O(i.x1,i.y2-a))}},t=((Ai=hi)&&(Pi.__proto__=Ai),((Pi.prototype=Object.create(Ai&&Ai.prototype)).constructor=Pi).prototype.radarMajorGridLinePositions=function(){return this.getTickPositions(this.options.majorUnit)},Pi.prototype.radarMinorGridLinePositions=function(){var t=this.options,e=0;return t.majorGridLines.visible&&(e=t.majorUnit),this.getTickPositions(t.minorUnit,e)},Pi.prototype.axisType=function(){return Ai},Pi);function Pi(){Ai.apply(this,arguments)}x(t.prototype,n);const Ti=t;(Mi=vi)&&(Ri.__proto__=Mi),((Ri.prototype=Object.create(Mi&&Mi.prototype)).constructor=Ri).prototype.radarMajorGridLinePositions=function(){var e=[];return this.traverseMajorTicksPositions(function(t){e.push(t)},this.options.majorGridLines),e},Ri.prototype.radarMinorGridLinePositions=function(){var e=[];return this.traverseMinorTicksPositions(function(t){e.push(t)},this.options.minorGridLines),e},Ri.prototype.axisType=function(){return Mi};var Mi,Oi,Bi,t=Ri;function Ri(){Mi.apply(this,arguments)}x(t.prototype,n);const Ei=t;function Li(t){return t<=0?-1:1}(Oi=b.Class)&&(zi.__proto__=Oi),((zi.prototype=Object.create(Oi&&Oi.prototype)).constructor=zi).prototype.process=function(t){var e=t.slice(0),o=[],i=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 o;var n,s=e[0],a=e[1],p=e[2];for(o.push(new b.geometry.Segment(s));s.equals(e[r-1]);)i=!0,e.pop(),r--;if(2===r)return t=this.tangent(s,a,y,v),Ft(o).controlOut(this.firstControlPoint(t,s,a,y,v)),o.push(new b.geometry.Segment(a,this.secondControlPoint(t,s,a,y,v))),o;i?(s=e[r-1],a=e[0],p=e[1],l=(t=this.controlPoints(s,a,p))[1],n=t[0]):(t=this.tangent(s,a,y,v),l=this.firstControlPoint(t,s,a,y,v));for(var h,l,c=l,u=0;u<=r-3;u++)this.removeDuplicates(u,e),u+3<=(r=e.length)&&(s=e[u],a=e[u+1],p=e[u+2],h=this.controlPoints(s,a,p),Ft(o).controlOut(c),c=h[1],h=h[0],o.push(new b.geometry.Segment(a,h)));return i?(s=e[r-2],a=e[r-1],p=e[0],t=this.controlPoints(s,a,p),Ft(o).controlOut(c),o.push(new b.geometry.Segment(a,t[0])),Ft(o).controlOut(t[1]),o.push(new b.geometry.Segment(p,n))):(l=this.tangent(a,p,y,v),Ft(o).controlOut(c),o.push(new b.geometry.Segment(p,this.secondControlPoint(l,a,p,y,v)))),o},zi.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)},zi.prototype.invertAxis=function(t,e,o){var i,r=!1;return t.x===e.x?r=!0:e.x===o.x?(e.y<o.y&&t.y<=e.y||o.y<e.y&&e.y<=t.y)&&(r=!0):(i=this.lineFunction(t,e),i=this.calculateFunction(i,o.x),t.y<=e.y&&o.y<=i||e.y<=t.y&&o.y>=i||(r=!0)),r},zi.prototype.isLine=function(t,e,o){var i=this.lineFunction(t,e),i=this.calculateFunction(i,o.x);return t.x===e.x&&e.x===o.x||T(i,1)===T(o.y,1)},zi.prototype.lineFunction=function(t,e){e=(e.y-t.y)/(e.x-t.x);return[t.y-e*t.x,e]},zi.prototype.controlPoints=function(t,e,o){var i,r=y,n=v,s=!1,a=!1,p=(this.isLine(t,e,o)?i=this.tangent(t,e,y,v):(p={x:this.isMonotonicByField(t,e,o,y),y:this.isMonotonicByField(t,e,o,v)}).x&&p.y?(i=this.tangent(t,o,y,v),s=!0):(this.invertAxis(t,e,o)&&(r=v,n=y),p[r]?i=0:(i=.01*(o[n]<t[n]&&t[n]<=e[n]||t[n]<o[n]&&e[n]<=t[n]?Li((o[n]-t[n])*(e[r]-t[r])):-Li((o[r]-t[r])*(e[n]-t[n]))),a=!0)),this.secondControlPoint(i,t,e,r,n)),a=(a&&(a=r,r=n,n=a),this.firstControlPoint(i,e,o,r,n));return s&&(this.restrictControlPoint(t,e,p,i),this.restrictControlPoint(e,o,a,i)),[p,a]},zi.prototype.restrictControlPoint=function(t,e,o,i){t.y<e.y?e.y<o.y?(o.x=t.x+(e.y-t.y)/i,o.y=e.y):o.y<t.y&&(o.x=e.x-(e.y-t.y)/i,o.y=t.y):o.y<e.y?(o.x=t.x-(t.y-e.y)/i,o.y=e.y):t.y<o.y&&(o.x=e.x+(t.y-e.y)/i,o.y=t.y)},zi.prototype.tangent=function(t,e,o,i){o=e[o]-t[o],e=e[i]-t[i];return 0==o?0:e/o},zi.prototype.isMonotonicByField=function(t,e,o,i){return o[i]>e[i]&&e[i]>t[i]||o[i]<e[i]&&e[i]<t[i]},zi.prototype.firstControlPoint=function(t,e,o,i,r){var n=e[i],o=.333*(o[i]-n);return this.point(n+o,e[r]+o*t,i,r)},zi.prototype.secondControlPoint=function(t,e,o,i,r){var e=e[i],n=o[i],e=.333*(n-e);return this.point(n-e,o[r]-e*t,i,r)},zi.prototype.point=function(t,e,o,i){var r=new b.geometry.Point;return r[o]=t,r[i]=e,r},zi.prototype.calculateFunction=function(t,e){for(var o=t.length,i=0,r=0;r<o;r++)i+=Math.pow(e,r)*t[r];return i};const Ii=zi;function zi(t){Oi.call(this),this.closed=t}function Vi(t){Bi.call(this),this._axis=t,this.options=t.options}(Bi=b.Class)&&(Vi.__proto__=Bi),((Vi.prototype=Object.create(Bi&&Bi.prototype)).constructor=Vi).prototype.value=function(t){var e=this._axis;return e.getCategory?e.getCategory(t):e.getValue(t)},Vi.prototype.slot=function(t,e,o){return this._axis.slot(t,e,o=void 0===o?!0:o)},Vi.prototype.range=function(){return this._axis.range()},Vi.prototype.valueRange=function(){return this._axis.valueRange()};const ji=Vi;function Di(t,e){for(var o=0;o<e.length;o++)if(e[o].options.name===t)return e[o].prepareUserOptions(),new ji(e[o])}function Hi(t){this.visual=t.visual,this.chartsVisual=t.chartContainer.visual,this._pane=t}var Ui;Hi.prototype.findAxisByName=function(t){return Di(t,this._pane.axes)};const Fi=Hi,Ni=((Ui=b.Class)&&(Gi.__proto__=Ui),(Gi.prototype=Object.create(Ui&&Ui.prototype)).constructor=Gi);function Gi(t){Ui.call(this),this._plotArea=t,this.visual=t.visual,this.backgroundVisual=t._bgVisual}function Wi(t){for(var e=t.length,o=0,i=0;i<e;i++)m(t[i])&&o++;return o}var Xi={min:function(t){for(var e=t.length,o=q,i=0;i<e;i++){var r=t[i];m(r)&&(o=Math.min(o,r))}return o===q?t[0]:o},max:function(t){for(var e=t.length,o=Y,i=0;i<e;i++){var r=t[i];m(r)&&(o=Math.max(o,r))}return o===Y?t[0]:o},sum:function(t){for(var e=t.length,o=0,i=0;i<e;i++){var r=t[i];m(r)&&(o+=r)}return o},sumOrNull:function(t){var e=null;return e=Wi(t)?Xi.sum(t):e},count:function(t){for(var e=t.length,o=0,i=0;i<e;i++){var r=t[i];null!==r&&P(r)&&o++}return o},avg:function(t){var e=Wi(t),o=t[0];return o=0<e?Xi.sum(t)/e:o},first:function(t){for(var e=t.length,o=0;o<e;o++){var i=t[o];if(null!==i&&P(i))return i}return t[0]}};const qi=Xi;function Yi(t,e){return null===e?e:wt(t)(e)}(Zi=b.Class)&&(Qi.__proto__=Zi),((Qi.prototype=Object.create(Zi&&Zi.prototype)).constructor=Qi).prototype.register=function(t,e,o){void 0===e&&(e=[tt]),void 0===o&&(o={});for(var i=0;i<t.length;i++){var r=t[i];this._valueFields[r]=e,this._otherFields[r]=o,this._nullValue[r]=this._makeValue(e,null),this._undefinedValue[r]=this._makeValue(e,void 0)}},Qi.prototype.canonicalFields=function(t){return this.valueFields(t).concat(this.otherFields(t))},Qi.prototype.valueFields=function(t){return this._valueFields[t.type]||[tt]},Qi.prototype.otherFields=function(t){return this._otherFields[t.type]||[tt]},Qi.prototype.bindPoint=function(t,e,o){var i,r,n,s,a=t.data,o=P(o)?o:a[e],a={valueFields:{value:o}},e=this.valueFields(t),p=this._otherFields[t.type];return null===o?i=this._nullValue[t.type]:P(o)?Array.isArray(o)?(r=o.slice(e.length),i=this._bindFromArray(o,e),r=this._bindFromArray(r,p)):"object"==typeof o&&(n=this.sourceFields(t,e),s=this.sourceFields(t,p),i=this._bindFromObject(o,e,n),r=this._bindFromObject(o,p,s)):i=this._undefinedValue[t.type],P(i)&&(1===e.length?a.valueFields.value=i[e[0]]:a.valueFields=i),a.fields=r||{},a},Qi.prototype._makeValue=function(t,e){for(var o={},i=t.length,r=0;r<i;r++)o[t[r]]=e;return o},Qi.prototype._bindFromArray=function(t,e){var o={};if(e)for(var i=Math.min(e.length,t.length),r=0;r<i;r++)o[e[r]]=t[r];return o},Qi.prototype._bindFromObject=function(t,e,o){void 0===o&&(o=e);var i={};if(e)for(var r=e.length,n=0;n<r;n++){var s=e[n],a=o[n];null!==a&&(i[s]=Yi(a,t))}return i},Qi.prototype.sourceFields=function(t,e){var o=[];if(e)for(var i=e.length,r=0;r<i;r++){var n=e[r],s=n===tt?"field":n+"Field";o.push(null!==t[s]?t[s]||n:null)}return o};var Zi,n=Qi;function Qi(){Zi.call(this),this._valueFields={},this._otherFields={},this._nullValue={},this._undefinedValue={}}n.current=new n;const Ki=n;var $i,Ji=/percent(?:\w*)\((\d+)\)/,tr=new RegExp("^stddev(?:\\((\\d+(?:\\.\\d+)?)\\))?$");($i=b.Class)&&(or.__proto__=$i),((or.prototype=Object.create($i&&$i.prototype)).constructor=or).prototype.initGlobalRanges=function(t,e,o){var i,r,n,s,a=e.data,p=tr.exec(t);p?(this.valueGetter=this.createValueGetter(e,o),i=this.getAverage(a),r=this.getStandardDeviation(a,i,!1),p=p[1]?parseFloat(p[1]):1,n={low:i.value-r*p,high:i.value+r*p},this.globalRange=function(){return n}):t.indexOf&&0<=t.indexOf("stderr")&&(this.valueGetter=this.createValueGetter(e,o),s=this.getStandardError(a,this.getAverage(a)),this.globalRange=function(t){return{low:t-s,high:t+s}})},or.prototype.createValueGetter=function(t,e){var o,i=t.data,r=Ki.current,n=r.valueFields(t),i=P(i[0])?i[0]:{};return ot(i)?o=wt("["+(e?n.indexOf(e):0)+"]"):m(i)?o=wt():typeof i==Q&&(o=wt(r.sourceFields(t,n)[n.indexOf(e)])),o},or.prototype.getErrorRange=function(t,e){var o;if(!P(e))return null;if(this.globalRange)return this.globalRange(t);if(ot(e))i=t-e[0],r=t+e[1];else if(m(o=parseFloat(e)))i=t-o,r=t+o;else{if(!(o=Ji.exec(e)))throw new Error("Invalid ErrorBar value: "+e);var e=t*(parseFloat(o[1])/100),i=t-Math.abs(e),r=t+Math.abs(e)}return{low:i,high:r}},or.prototype.getStandardError=function(t,e){return this.getStandardDeviation(t,e,!0)/Math.sqrt(e.count)},or.prototype.getStandardDeviation=function(t,e,o){for(var i=t.length,o=o?e.count-1:e.count,r=0,n=0;n<i;n++){var s=this.valueGetter(t[n]);m(s)&&(r+=Math.pow(s-e.value,2))}return Math.sqrt(r/o)},or.prototype.getAverage=function(t){for(var e=t.length,o=0,i=0,r=0;r<e;r++){var n=this.valueGetter(t[r]);m(n)&&(o+=n,i++)}return{value:o/i,count:i}};const er=or;function or(t,e,o){$i.call(this),this.initGlobalRanges(t,e,o)}var ir,rr,t=b.support.browser||{},nr=600,sr="fadeIn",ar=t.msie?.001:0,pr="zero",hr="interpolate",lr="above",cr="below",ur="smooth",dr="step",fr="area",gr="bar",yr="boxPlot",vr="bubble",mr="bullet",xr="candlestick",_r="column",br="donut",wr="funnel",Cr="heatmap",Sr="horizontalWaterfall",kr="line",Ar="ohlc",Pr="pie",Tr="polarArea",Mr="polarLine",Or="polarScatter",Br="radarArea",Rr="radarColumn",Er="radarLine",Lr="rangeArea",Ir="rangeBar",zr="rangeColumn",Vr="scatter",jr="scatterLine",Dr="verticalArea",Hr="verticalBoxPlot",Ur="verticalBullet",Fr="verticalLine",Nr="verticalRangeArea",Gr="waterfall",Wr=[gr,_r,Ar,xr,yr,Hr,mr,zr,Ir,Gr,Sr],Xr="seriesHover",qr="plotAreaHover",Yr="plotAreaLeave",Zr="drag",Qr="dragEnd",Kr="dragStart",$r="zoomStart",Jr="zoom",tn="zoomEnd",en="selectStart",on="select",rn="selectEnd",nn="showTooltip",sn="hideTooltip",an="log",n="category",pn="insideEnd",hn="outsideEnd",ln="DOMMouseScroll mousewheel",t=((ir=o)&&(cn.__proto__=ir),((cn.prototype=Object.create(ir&&ir.prototype)).constructor=cn).prototype.reflow=function(t){var e,o=this.options.endCaps,i=this.isVertical,r=this.getAxis().getSlot(this.low,this.high),n=t.center(),t=this.getCapsWidth(t,i),s=i?n.x:n.y,a=s-t,s=s+t;i?(e=[new O(n.x,r.y1),new O(n.x,r.y2)],o&&e.push(new O(a,r.y1),new O(s,r.y1),new O(a,r.y2),new O(s,r.y2)),this.box=new B(a,r.y1,s,r.y2)):(e=[new O(r.x1,n.y),new O(r.x2,n.y)],o&&e.push(new O(r.x1,a),new O(r.x1,s),new O(r.x2,a),new O(r.x2,s)),this.box=new B(r.x1,a,r.x2,s)),this.linePoints=e},cn.prototype.getCapsWidth=function(t,e){e=e?t.width():t.height();return Math.min(Math.floor(e/2),4)||4},cn.prototype.createVisual=function(){var e=this,t=this.options,o=t.visual;o?this.visual=o({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()},cn.prototype.createDefaultVisual=function(){var t=this.options,e=this.linePoints,o={stroke:{color:t.color,width:t.line.width,dashType:t.line.dashType}};ir.prototype.createVisual.call(this);for(var i=0;i<e.length;i+=2){var r=new b.drawing.Path(o).moveTo(e[i].x,e[i].y).lineTo(e[i+1].x,e[i+1].y);st(r),this.visual.append(r)}},cn);function cn(t,e,o,i,r,n){ir.call(this,n),this.low=t,this.high=e,this.isVertical=o,this.chart=i,this.series=r}e(t,{animation:{type:sr,delay:nr},endCaps:!0,line:{width:2},zIndex:1});const un=t;function dn(){rr.apply(this,arguments)}(rr=un)&&(dn.__proto__=rr),((dn.prototype=Object.create(rr&&rr.prototype)).constructor=dn).prototype.getAxis=function(){return this.chart.seriesValueAxis(this.series)};const fn=dn;function gn(t,e,o,i){void 0===i&&(i=!1);var r,n,s=(o=void 0===o?{}:o).defaults=o.defaults||{},a=o.depth=o.depth||0,p=!1;if(o.excluded=o.excluded||[],5<a)return null;for(r in t)!u(r,o.excluded)&&t.hasOwnProperty(r)&&(lt(n=t[r])?(p=!0,i||(t[r]=M(n(e),s[r]))):ut(n)&&(i||(o.defaults=s[r]),o.depth++,p=gn(n,e,o,i)||p,o.depth--));return p}function yn(t){for(var e=t.length,o=0,i=0;i<e;i++)o=Math.max(o,t[i].data.length);return o}(vn=o)&&(p.__proto__=vn),((p.prototype=Object.create(vn&&vn.prototype)).constructor=p).prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},p.prototype.pointOptions=function(t,e){var o,i=this.seriesOptions[e];return i||(o=this.pointType().prototype.defaults,this.seriesOptions[e]=i=x({},o,{vertical:!this.options.invertAxes},t)),i},p.prototype.plotValue=function(t){if(!t)return 0;if(this.options.isStacked100&&m(t.value)){for(var e=t.categoryIx,o=this.categoryPoints[e],i=[],r=0,n=0;n<o.length;n++){var s,a,p=o[n];p&&(s=t.series.stack,a=p.series.stack,s&&a&&s.group!==a.group||m(p.value)&&(r+=Math.abs(p.value),i.push(Math.abs(p.value))))}if(0<r)return t.value/r}return t.value},p.prototype.plotRange=function(t,e){void 0===e&&(e=0);var o=this.categoryPoints[t.categoryIx];if(this.options.isStacked){for(var i=this.plotValue(t),r=0<=i,n=e,s=!1,a=0;a<o.length;a++){var p=o[a];if(t===p)break;var h=t.series.stack,l=p.series.stack;if(h&&l){if(typeof h===J&&h!==l)continue;if(h.group&&h.group!==l.group)continue}h=this.plotValue(p);(0<=h&&r||h<0&&!r)&&(n+=h,i+=h,s=!0,this.options.isStacked100&&(i=Math.min(i,1)))}return s&&(n-=e),[n,i]}e=t.series,e=this.seriesValueAxis(e),e=this.categoryAxisCrossingValue(e);return[e,ht(t.value)?t.value:e]},p.prototype.stackLimits=function(t,e){for(var o=q,i=Y,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],P(a)&&isFinite(a)&&(i=Math.max(i,a),o=Math.min(o,a)))}}return{min:o,max:i}},p.prototype.updateStackRange=function(){var t=this.options,e=t.isStacked,o=t.series,i={};if(e)for(var r=0;r<o.length;r++){var n=o[r],s=n.axis,a=s+n.stack,p=i[a];p||(p=this.stackLimits(s,n.stack),(n=this.errorTotals)&&(n.negative.length&&(p.min=Math.min(p.min,qt(n.negative).min)),n.positive.length&&(p.max=Math.max(p.max,qt(n.positive).max))),p.min!==q||p.max!==Y?i[a]=p:p=null),p&&(this.valueAxisRanges[s]=p)}},p.prototype.addErrorBar=function(t,e,o){var i,r=t.value,n=t.series,s=t.seriesIx,a=t.options.errorBars,p=e.fields.errorLow,e=e.fields.errorHigh;m(p)&&m(e)?i={low:p,high:e}:a&&P(a.value)&&(this.seriesErrorRanges=this.seriesErrorRanges||[],this.seriesErrorRanges[s]=this.seriesErrorRanges[s]||new er(a.value,n,tt),i=this.seriesErrorRanges[s].getErrorRange(r,a.value)),i&&(t.low=i.low,t.high=i.high,this.addPointErrorBar(t,o))},p.prototype.addPointErrorBar=function(t,e){var o,i=!this.options.invertAxes,r=t.options.errorBars,n=t.series,s=t.low,a=t.high,e=(this.options.isStacked?(s=(o=this.stackedErrorRange(t,e)).low,a=o.high):(this.updateRange({value:s},o={categoryIx:e,series:n}),this.updateRange({value:a},o)),new fn(s,a,i,this,n,r));t.errorBars=[e],t.append(e)},p.prototype.stackedErrorRange=function(t,e){var o=this.plotRange(t,0)[1]-t.value,i=t.low+o,t=t.high+o;return this.errorTotals=this.errorTotals||{positive:[],negative:[]},i<0&&(this.errorTotals.negative[e]=Math.min(this.errorTotals.negative[e]||0,i)),0<t&&(this.errorTotals.positive[e]=Math.max(this.errorTotals.positive[e]||0,t)),{low:i,high:t}},p.prototype.addValue=function(t,e){var o=e.categoryIx,i=e.series,r=e.seriesIx,n=this.categoryPoints[o],s=(n||(this.categoryPoints[o]=n=[]),this.seriesPoints[r]),r=(s||(this.seriesPoints[r]=s=[]),this.createPoint(t,e));r&&(Object.assign(r,e),r.owner=this,r.noteText=t.fields.noteText,P(r.dataItem)||(r.dataItem=i.data[o]),this.addErrorBar(r,t,o)),this.points.push(r),s.push(r),n.push(r),this.updateRange(t.valueFields,e)},p.prototype.evalPointOptions=function(t,e,o,i,r,n){var s={defaults:r._defaults,excluded:["data","aggregate","_events","tooltip","content","template","visual","toggle","_outOfRangeMinPoint","_outOfRangeMaxPoint"]},a=this._evalSeries[n],n=(P(a)||(this._evalSeries[n]=a=gn(t,{},s,!0)),t);return a&&gn(n=x({},n),{value:e,category:o,index:i,series:r,dataItem:r.data[i]},s),n},p.prototype.updateRange=function(t,e){var e=e.series.axis,t=t.value,o=this.valueAxisRanges[e];isFinite(t)&&null!==t&&((o=this.valueAxisRanges[e]=o||{min:q,max:Y}).min=Math.min(o.min,t),o.max=Math.max(o.max,t))},p.prototype.seriesValueAxis=function(t){var e=this.plotArea,t=t.axis,e=t?e.namedValueAxes[t]:e.valueAxis;if(e)return e;throw new Error("Unable to locate value axis with name "+t)},p.prototype.reflow=function(t){var s=this,a=this.categorySlots=[],p=this.points,h=this.categoryAxis,l=0;this.traverseDataPoints(function(t,e){var o,i=e.categoryIx,e=e.series,e=s.seriesValueAxis(e),r=p[l++],n=a[i];n||(a[i]=n=s.categorySlot(h,i,e)),r&&(i=s.plotRange(r,e.startValue()),(o=s.valueSlot(e,i))?(n=s.pointSlot(n,o),r.aboveAxis=s.aboveAxis(r,e),r.stackValue=i[1],s.options.isStacked100&&(r.percentage=s.plotValue(r)),s.reflowPoint(r,n)):r.visible=!1)}),this.reflowCategories(a),!this.options.clip&&this.options.limitPoints&&this.points.length&&this.limitPoints(),this.box=t},p.prototype.valueSlot=function(t,e){return t.getSlot(e[0],e[1],!this.options.clip)},p.prototype.limitPoints=function(){for(var t=this.categoryPoints,e=t[0].concat(Ft(t)),o=0;o<e.length;o++)e[o]&&this.limitPoint(e[o])},p.prototype.limitPoint=function(t){var e=this.categoryAxis.limitSlot(t.box);e.equals(t.box)||t.reflow(e)},p.prototype.aboveAxis=function(t,e){var o=this.categoryAxisCrossingValue(e),t=t.value;return e.options.reverse?t<o:o<=t},p.prototype.categoryAxisCrossingValue=function(t){var e=this.categoryAxis,t=t.options;return[].concat(t.axisCrossingValues||t.axisCrossingValue)[e.axisIndex||0]||0},p.prototype.reflowPoint=function(t,e){t.reflow(e)},p.prototype.reflowCategories=function(){},p.prototype.pointSlot=function(t,e){var o=this.options.invertAxes,i=o?e:t,o=o?t:e;return new B(i.x1,o.y1,i.x2,o.y2)},p.prototype.categorySlot=function(t,e){return t.getSlot(e)},p.prototype.traverseDataPoints=function(t){for(var e=this.options.series,o=yn(e),i=e.length,r=0;r<i;r++)this._outOfRangeCallback(e[r],"_outOfRangeMinPoint",r,t);for(var n=0;n<o;n++)for(var s=0;s<i;s++){var a=e[s],p=this.categoryAxis.categoryAt(n);t(this._bindPoint(a,s,n),{category:p,categoryIx:n,categoriesCount:o,series:a,seriesIx:s})}for(var h=0;h<i;h++)this._outOfRangeCallback(e[h],"_outOfRangeMaxPoint",h,t)},p.prototype._outOfRangeCallback=function(t,e,o,i){var r,e=t[e];e&&(r=e.categoryIx,i(this._bindPoint(t,o,r,e.item),{category:e.category,categoryIx:r,series:t,seriesIx:o,dataItem:e.item}))},p.prototype._bindPoint=function(t,e,o,i){this._bindCache||(this._bindCache=[]);var r=this._bindCache[e];return(r=r||(this._bindCache[e]=[]))[o]||(r[o]=Ki.current.bindPoint(t,o,i))},p.prototype.formatPointValue=function(t,e){return null===t.value?"":this.chartService.format.auto(e,t.value)},p.prototype.pointValue=function(t){return t.valueFields.value};var vn,t=p;function p(t,e){vn.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()}e(t,{series:[],invertAxes:!1,isStacked:!1,clip:!0,limitPoints:!0});const mn=t,xn={click:function(t,e){return t.trigger("seriesClick",this.eventArgs(e))},hover:function(t,e){return t.trigger(Xr,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:Ht(t),originalEvent:t,point:this}}},_n={createNote:function(){var t=this.options.notes,e=this.noteText||t.label.text;!1!==t.visible&&P(e)&&null!==e&&(this.note=new to({value:this.value,text:e,dataItem:this.dataItem,category:this.category,series:this.series},this.options.notes,this.owner.chartService),this.append(this.note))}};(bn=o)&&(wn.__proto__=bn),((wn.prototype=Object.create(bn&&bn.prototype)).constructor=wn).prototype.render=function(){var t,e,o=this.options,i=o.markers,o=o.labels;this._rendered||(this._rendered=!0,i.visible&&i.size&&(this.marker=this.createMarker(),this.append(this.marker)),o.visible&&(i=xt(o),t=this.pointData(),e=this.value,i?e=i(t):o.format&&(e=this.formatValue(o.format)),this.label=new We(e,x({align:w,vAlign:w,margin:{left:5,right:5},zIndex:M(o.zIndex,this.series.zIndex)},o),t),this.append(this.label)),this.createNote(),this.errorBar&&this.append(this.errorBar))},wn.prototype.markerBorder=function(){var t=this.options.markers,e=t.background,t=x({color:this.color},t.border);return P(t.color)||(t.color=new b.Color(e).brightness(.8).toHex()),t},wn.prototype.createVisual=function(){},wn.prototype.createMarker=function(){var t=this.options.markers;return new Me({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:M(t.zIndex,this.series.zIndex),animation:t.animation,visual:t.visual},{dataItem:this.dataItem,value:this.value,series:this.series,category:this.category})},wn.prototype.markerBox=function(){return this.marker||(this.marker=this.createMarker(),this.marker.reflow(this._childBox)),this.marker.box},wn.prototype.reflow=function(t){var e=this.options,o=this.aboveAxis,i=e.vertical,r=(this.render(),(this.box=t).clone());if(i?o?r.y1-=r.height():r.y2+=r.height():o?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&&(t=this.markerBox(),e.markers.visible&&e.markers.size||(i=t.center(),t=new B(i.x,i.y,i.x,i.y)),this.note.reflow(t))},wn.prototype.reflowLabel=function(t){var e=this.options,o=this.label,e=e.labels.position;o&&(e=(e=e===lr?k:e)===cr?D:e,o.reflow(t),o.box.alignTo(this.markerBox(),e),o.reflow(o.box))},wn.prototype.createHighlight=function(){var t=this.options.highlight.markers,e=this.markerBorder().color,o=this.options.markers,i=o.size+(o.border.width||0)+(t.border.width||0),i=new Me({type:o.type,width:i,height:i,rotation:o.rotation,background:t.color||e,border:{color:t.border.color,width:t.border.width,opacity:M(t.border.opacity,1)},opacity:M(t.opacity,1)});return i.reflow(this._childBox),i.getElement()},wn.prototype.highlightVisual=function(){return(this.marker||{}).visual},wn.prototype.highlightVisualArgs=function(){var t,e,o,i,r=this.marker;return r?(i=r.paddingBox.toRect(),t=r.visual):(e=(r=this.options.markers.size)/2,o=this.box.center(),i=new b.geometry.Rect([o.x-e,o.y-e],[r,r])),{options:this.options,rect:i,visual:t}},wn.prototype.tooltipAnchor=function(){var t,e=this.markerBox(),o=this.owner.pane.clipBox();if(!o||o.overlaps(e))return o=e.x2+5,e=this.aboveAxis?(t=e.y1,D):(t=e.y2,k),{point:new O(o,t),align:{horizontal:"left",vertical:e}}},wn.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},wn.prototype.overlapsBox=function(t){return this.markerBox().overlaps(t)},wn.prototype.unclipElements=function(){this.label&&(this.label.options.noclip=!0),this.note&&(this.note.options.noclip=!0)},wn.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,stackValue:this.stackValue,series:this.series}};var bn,t=wn;function wn(t,e){bn.call(this),this.value=t,this.options=e,this.aboveAxis=M(this.options.aboveAxis,!0),this.tooltipTracking=!0}t.prototype.defaults={vertical:!0,markers:{visible:!0,background:a,size:8,type:H,border:{width:2},opacity:1},labels:{visible:!1,position:lr,margin:A(3),padding:A(4),animation:{type:sr,delay:nr}},notes:{label:{}},highlight:{markers:{border:{color:"#fff",width:2}},zIndex:100},errorBars:{line:{width:1}}},x(t.prototype,xn),x(t.prototype,_n);const Cn=t;(Sn=o)&&(kn.__proto__=Sn),((kn.prototype=Object.create(Sn&&Sn.prototype)).constructor=kn).prototype.points=function(){return this.toGeometryPoints(this.linePoints)},kn.prototype.toGeometryPoints=function(t){for(var e=[],o=0,i=t.length;o<i;o++)t[o]&&!1!==t[o].visible&&e.push(t[o]._childBox.toRect().center());return e},kn.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&&!P(this.visual.options.zIndex)&&(this.visual.options.zIndex=this.series.zIndex)):this.segmentVisual()},kn.prototype.segmentVisual=function(){var t=this.options,e=this.series,o=e.color,i=e._defaults,i=(lt(o)&&i&&(o=i.color),b.drawing.Path.fromPoints(this.points(),{stroke:{color:o,width:e.width,opacity:e.opacity,dashType:e.dashType},zIndex:e.zIndex}));t.closed&&i.close(),this.visual=i},kn.prototype.aliasFor=function(t,e){return this.parent.getNearestPoint(e.x,e.y,this.seriesIx)};var Sn,t=kn;function kn(t,e,o){Sn.call(this),this.linePoints=t,this.series=e,this.seriesIx=o}e(t,{closed:!1});const An=t;function Pn(t,e,o,i,r){var t=t.box,n=new b.geometry.Point;return n[e]=t[e+o],n[i]=t[i+r],n}var Tn,Mn,t={calculateStepPoints:function(t){for(var e=this.parent.plotArea.seriesCategoryAxis(this.series).options,o=e.justified,i=e.vertical,e=e.reverse,r=i?y:v,n=i?v:y,s=e?2:1,a=s,p=Pn(t[0],r,s,n,a),h=[p],l=1;l<t.length;l++){var c,u=Pn(t[l],r,s,n,a);p[r]!==u[r]&&((c=new b.geometry.Point)[r]=p[r],c[n]=u[n],h.push(c,u)),p=u}return o?p!==Ft(h)&&h.push(p):h.push(Pn(Ft(t),r,s,n,e?1:2)),h}},On=((Tn=An)&&(Bn.__proto__=Tn),((Bn.prototype=Object.create(Tn&&Tn.prototype)).constructor=Bn).prototype.points=function(){return this.calculateStepPoints(this.linePoints)},Bn);function Bn(){Tn.apply(this,arguments)}x(On.prototype,t);const Rn=On;function En(){Mn.apply(this,arguments)}(Mn=An)&&(En.__proto__=Mn),((En.prototype=Object.create(Mn&&Mn.prototype)).constructor=En).prototype.segmentVisual=function(){var t=this.series,e=t._defaults,o=t.color,e=(lt(o)&&e&&(o=e.color),new Ii(this.options.closed).process(this.points())),o=new b.drawing.Path({stroke:{color:o,width:t.width,opacity:t.opacity,dashType:t.dashType},zIndex:t.zIndex});o.segments.push.apply(o.segments,e),this.visual=o};const Ln=En;var In,On={renderSegments:function(){var t,e=this.options,o=this.seriesPoints,i=e.series,r=o.length;this._segments=[];for(var n=0;n<r;n++){for(var s=i[n],a=this.sortPoints(o[n]),p=a.length,h=[],l=0;l<p;l++){var c=a[l];c?h.push(c):this.seriesMissingValues(s)!==hr&&(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?pr:t||hr},getNearestPoint:function(t,e,o){for(var i,r=new O(t,e),n=this.seriesPoints[o],s=q,a=0;a<n.length;a++){var p,h=n[a];h&&P(h.value)&&null!==h.value&&!1!==h.visible&&((p=h.box.center().distanceTo(r))<s&&(i=h,s=p))}return i}},h=((In=b.drawing.Animation)&&(zn.__proto__=In),((zn.prototype=Object.create(In&&In.prototype)).constructor=zn).prototype.setup=function(){this._setEnd(this.options.box.x1)},zn.prototype.step=function(t){var e=this.options.box;this._setEnd(Pt(e.x1,e.x2,t))},zn.prototype._setEnd=function(t){var e=this.element,o=e.segments,i=o[1].anchor(),o=o[2].anchor();e.suspend(),i.setX(t),e.resume(),o.setX(t)},zn);function zn(){In.apply(this,arguments)}e(h,{duration:nr}),b.drawing.AnimationFactory.current.register("clip",h);const Vn=h;function jn(t){for(var e=0;e<t.length;e++)if(P(t[e].zIndex))return!0}var Dn,Hn,h={createAnimation:function(){var t,e=this.getRoot();e&&!1!==(e.options||{}).transitions&&(e=e.size(),t=b.drawing.Path.fromRect(e.toRect()),this.visual.clip(t),this.animation=new Vn(t,{box:e}),jn(this.options.series)&&this._setChildrenAnimation(t))},_setChildrenAnimation:function(t){for(var e=this.animationPoints(),o=0;o<e.length;o++){var i=e[o];i&&i.visual&&P(i.visual.options.zIndex)&&i.visual.clip(t)}}},l=((Dn=mn)&&(Un.__proto__=Dn),((Un.prototype=Object.create(Dn&&Dn.prototype)).constructor=Un).prototype.render=function(){Dn.prototype.render.call(this),this.updateStackRange(),this.renderSegments()},Un.prototype.pointType=function(){return Cn},Un.prototype.createPoint=function(t,e){var o=e.categoryIx,i=e.category,r=e.series,e=e.seriesIx,n=this.seriesMissingValues(r),s=t.valueFields.value;if(!P(s)||null===s){if(n!==pr)return null;s=0}n=this.pointOptions(r,e),n=this.evalPointOptions(n,s,i,o,r,e),i=t.fields.color||r.color,lt(r.color)&&(i=n.color),o=new Cn(s,n);return o.color=i,this.append(o),o},Un.prototype.plotRange=function(t){var e=this.plotValue(t);if(this.options.isStacked)for(var o=t.categoryIx,i=this.categoryPoints[o],r=0;r<i.length;r++){var n=i[r];if(t===n)break;e+=this.plotValue(n),this.options.isStacked100&&(e=Math.min(e,1))}return[e,e]},Un.prototype.createSegment=function(t,e,o){var i=e.style;return new(i===dr?Rn:i===ur?Ln:An)(t,e,o)},Un.prototype.animationPoints=function(){for(var t=this.points,e=[],o=0;o<t.length;o++)e.push((t[o]||{}).marker);return e.concat(this._segments)},Un.prototype.supportsPointInactiveOpacity=function(){return!1},Un);function Un(){Dn.apply(this,arguments)}x(l.prototype,On,h);const Fn=l;function Nn(t,e,o,i,r){Hn.call(this,t,e,o),this.prevSegment=i,this.stackPoints=r}(Hn=An)&&(Nn.__proto__=Hn),((Nn.prototype=Object.create(Hn&&Hn.prototype)).constructor=Nn).prototype.createVisual=function(){var t=this.series,e=t._defaults,o=t.line||{},i=t.color;lt(i)&&e&&(i=e.color),this.visual=new b.drawing.Group({zIndex:t.zIndex}),this.createFill({fill:{color:i,opacity:t.opacity},stroke:null}),0<o.width&&!1!==o.visible&&this.createStroke({stroke:x({color:i,opacity:t.opacity,lineCap:"butt"},o)})},Nn.prototype.strokeSegments=function(){return this._strokeSegments||(this._strokeSegments=this.createStrokeSegments())},Nn.prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.points())},Nn.prototype.stackSegments=function(){return(this.prevSegment||this).createStackSegments(this.stackPoints)},Nn.prototype.createStackSegments=function(t){return this.segmentsFromPoints(this.toGeometryPoints(t)).reverse()},Nn.prototype.segmentsFromPoints=function(t){return t.map(function(t){return new b.geometry.Segment(t)})},Nn.prototype.createStroke=function(t){t=new b.drawing.Path(t);t.segments.push.apply(t.segments,this.strokeSegments()),this.visual.append(t)},Nn.prototype.hasStackSegment=function(){return this.prevSegment||this.stackPoints&&this.stackPoints.length},Nn.prototype.createFill=function(t){var e=this.strokeSegments(),o=e.slice(0),i=this.hasStackSegment(),r=(i&&(r=this.stackSegments(),Lt(o,r)),new b.drawing.Path(t));r.segments.push.apply(r.segments,o),!i&&1<e.length&&this.fillToAxes(r),this.visual.append(r)},Nn.prototype.fillToAxes=function(t){var e=this.parent,o=e.options.invertAxes,i=e.seriesValueAxis(this.series),e=e.categoryAxisCrossingValue(i),i=i.getSlot(e,e,!0),e=this.strokeSegments(),r=e[0].anchor(),e=Ft(e).anchor(),i=o?i.x1:i.y1;o?t.lineTo(i,e.y).lineTo(i,r.y):t.lineTo(e.x,i).lineTo(r.x,i)};const Gn=Nn;(Wn=Gn)&&(Zn.__proto__=Wn),((Zn.prototype=Object.create(Wn&&Wn.prototype)).constructor=Zn).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.calculateStepPoints(this.linePoints))},Zn.prototype.createStackSegments=function(t){return this.segmentsFromPoints(this.calculateStepPoints(t)).reverse()};var Wn,Xn,qn,Yn,l=Zn;function Zn(){Wn.apply(this,arguments)}x(l.prototype,t);const Qn=l;function Kn(){Xn.apply(this,arguments)}(Xn=Gn)&&(Kn.__proto__=Xn),((Kn.prototype=Object.create(Xn&&Xn.prototype)).constructor=Kn).prototype.createStrokeSegments=function(){var t=new Ii(this.options.closed),e=this.points();return t.process(e)},Kn.prototype.createStackSegments=function(){for(var t=this.strokeSegments(),e=[],o=t.length-1;0<=o;o--){var i=t[o];e.push(new b.geometry.Segment(i.anchor(),i.controlOut(),i.controlIn()))}return e};const $n=Kn;function Jn(){qn.apply(this,arguments)}(qn=Fn)&&(Jn.__proto__=qn),((Jn.prototype=Object.create(qn&&qn.prototype)).constructor=Jn).prototype.createSegment=function(t,e,o,i){var r,n,s=this.options.isStacked,a=(e.line||{}).style;return s&&0<o&&i&&("gap"!==this.seriesMissingValues(e)?(n=i.linePoints,r=i):n=this._gapStackPoints(t,o,a)),new(a===dr?Qn:a===ur?$n:Gn)(t,e,o,r,n)},Jn.prototype.reflow=function(t){qn.prototype.reflow.call(this,t);var e=this._stackPoints;if(e)for(var o=0;o<e.length;o++){var i=e[o],r=this.categoryAxis.getSlot(i.categoryIx);i.reflow(r)}},Jn.prototype._gapStackPoints=function(t,e,o){var i=this.seriesPoints,r=t[0].categoryIx,t=t.length,n=(r<0&&(r=0,t--),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=i[--c][l],0<c&&!u;);u?(o!==dr&&r<p&&!i[c][l-1]&&a.push(this._previousSegmentPoint(p,l,l-1,c)),a.push(u),o!==dr&&p+1<n&&!i[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},Jn.prototype._previousSegmentPoint=function(t,e,o,i){for(var r,n=this.seriesPoints,s=i;0<s&&!r;)r=n[--s][o];return r?r=n[s][e]:(r=this._createGapStackPoint(t),this._stackPoints.push(r)),r},Jn.prototype._createGapStackPoint=function(t){var e=this.pointOptions({},0),e=new Cn(0,e);return e.categoryIx=t,e.series={},e},Jn.prototype.seriesMissingValues=function(t){return t.missingValues||pr},Jn.prototype.supportsPointInactiveOpacity=function(){return!1};const ts=Jn;function es(){Yn.call(this),this.axisRanges={}}(Yn=b.Class)&&(es.__proto__=Yn),((es.prototype=Object.create(Yn&&Yn.prototype)).constructor=es).prototype.update=function(t){var e,o=this.axisRanges;for(e in t){var i=t[e],r=o[e];o[e]=r=r||{min:q,max:Y},r.min=Math.min(r.min,i.min),r.max=Math.max(r.max,i.max)}},es.prototype.reset=function(t){this.axisRanges[t]=void 0},es.prototype.query=function(t){return this.axisRanges[t]};const os=es;(is=o)&&(rs.__proto__=is),((rs.prototype=Object.create(is&&is.prototype)).constructor=rs).prototype.createVisual=function(){this.textBox.options.noclip=this.options.noclip},rs.prototype.reflow=function(t){var e=this.options,o=e.vertical,i=e.aboveAxis,r=this.children[0],n=r.options,s=r.box,a=r.options.padding,p=t;n.align=o?w:C,n.vAlign=o?k:w,e.position===pn?o?(n.vAlign=k,!i&&s.height()<t.height()&&(n.vAlign=D)):n.align=i?S:C:e.position===w?(n.vAlign=w,n.align=w):"insideBase"===e.position?o?n.vAlign=i?D:k:n.align=i?C:S:e.position===hn&&(p=o?i?new B(t.x1,t.y1-s.height(),t.x2,t.y1):new B(t.x1,t.y2,t.x2,t.y2+s.height()):(n.align=w,i?new B(t.x2,t.y1,t.x2+s.width(),t.y2):new B(t.x1-s.width(),t.y1,t.x1,t.y2))),e.rotation||(o?a.left=a.right=(p.width()-r.contentBox.width())/2:a.top=a.bottom=(p.height()-r.contentBox.height())/2),r.reflow(p)},rs.prototype.alignToClipBox=function(t){var e=this.options.vertical?v:y,o=e+"1",e=e+"2",i=this.children[0],r=this.parent.box;(r[o]<t[o]||t[e]<r[e])&&((i=i.paddingBox.clone())[o]=Math.max(r[o],t[o]),i[e]=Math.min(r[e],t[e]),this.reflow(i))};var is,l=rs;function rs(t,e,o){is.call(this,e),this.textBox=new We(t,this.options,o),this.append(this.textBox)}e(l,{position:hn,margin:A(3),padding:A(4),color:j,background:"",border:{width:1,color:""},aboveAxis:!0,vertical:!1,animation:{type:sr,delay:nr},zIndex:2});const ns=l;function ss(t){t=t.overlay;return t&&t.gradient&&"none"!==t.gradient}(as=o)&&(ps.__proto__=as),((ps.prototype=Object.create(as&&as.prototype)).constructor=ps).prototype.render=function(){this._rendered||(this._rendered=!0,this.createLabel(),this.createNote(),this.errorBar&&this.append(this.errorBar))},ps.prototype.createLabel=function(){var t,e,o=this.options,i=o.labels;i.visible&&(t=this.pointData(),e=(e=xt(i))?e(t):this.formatValue(i.format),this.label=new ns(e,x({vertical:o.vertical},i),t),this.append(this.label))},ps.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},ps.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 o=0;o<this.errorBars.length;o++)this.errorBars[o].reflow(t)},ps.prototype.createVisual=function(){var e=this,t=this.box,o=this.options,i=o.visual;!1!==this.visible&&(as.prototype.createVisual.call(this),i?(i=this.rectVisual=i({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 b.drawing.Group;return e.createRect(t),t},options:o}))&&this.visual.append(i):0<t.width()&&0<t.height()&&this.createRect(this.visual))},ps.prototype.createRect=function(t){var e=this.options,o=e.border,i=(P(o.opacity)?o:e).opacity,r=this.box.toRect(),r=(r.size.width=Math.round(r.size.width),this.rectVisual=b.drawing.Path.fromRect(r,{fill:{color:this.color,opacity:e.opacity},stroke:{color:this.getBorderColor(),width:o.width,opacity:i,dashType:o.dashType}})),i=this.box.width(),o=this.box.height();6<(e.vertical?i:o)&&(st(r),(i<1||o<1)&&(r.options.stroke.lineJoin="round")),t.append(r),ss(e)&&(i=this.createGradientOverlay(r,{baseColor:this.color},x({end:e.vertical?void 0:[0,1]},e.overlay)),t.append(i))},ps.prototype.createHighlight=function(t){return st(b.drawing.Path.fromRect(this.box.toRect(),t))},ps.prototype.highlightVisual=function(){return this.rectVisual},ps.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this.rectVisual}},ps.prototype.getBorderColor=function(){var t=this.color,e=this.options.border,o=e._brightness||.8,e=e.color;return e=P(e)?e:new b.Color(t).brightness(o).toHex()},ps.prototype.tooltipAnchor=function(){var t,e,o,i,r=this.options,n=this.box,s=this.aboveAxis,a=this.owner.pane.clipBox()||n,p=C,h=k;return r.vertical?(t=Math.min(n.x2,a.x2)+5,s?i=Math.max(n.y1,a.y1):(i=Math.min(n.y2,a.y2),h=D)):(e=Math.max(n.x1,a.x1),o=Math.min(n.x2,a.x2),i=r.isStacked?(h=D,t=s?(p=S,o):e,Math.max(n.y1,a.y1)-5):(s?t=o+5:(t=e-5,p=S),Math.max(n.y1,a.y1))),{point:new O(t,i),align:{horizontal:p,vertical:h}}},ps.prototype.overlapsBox=function(t){return this.box.overlaps(t)},ps.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}};var as,l=ps;function ps(t,e){as.call(this),this.options=e,this.color=e.color||a,this.aboveAxis=M(this.options.aboveAxis,!0),this.value=t}x(l.prototype,xn),x(l.prototype,_n),l.prototype.defaults={border:{width:1},vertical:!0,overlay:{gradient:"glass"},labels:{visible:!1,format:"{0}"},opacity:1,notes:{label:{}}};const hs=l;function ls(t,e){t.forEach(e)}function cs(t,e){for(var o=t.length,i=o-1;0<=i;i--)e(t[i],i-o-1)}(us=o)&&(ds.__proto__=us),((ds.prototype=Object.create(us&&us.prototype)).constructor=ds).prototype.reflow=function(i){var t=this.options,e=t.vertical,o=t.gap,r=t.spacing,t=this.children,n=t.length,s=e?v:y,a=n+o+r*(n-1),p=(e?i.height():i.width())/a,h=i[s+1]+o/2*p;this.forEach(t,function(t,e){var o=(t.box||i).clone();o[s+1]=h,o[s+2]=h+p,t.reflow(o),e<n-1&&(h+=p*r),h+=p})};var us,l=ds;function ds(t){us.call(this,t),this.forEach=t.rtl?cs:ls}e(l,{vertical:!1,gap:0,spacing:0});const fs=l;(gs=o)&&(ys.__proto__=gs),((ys.prototype=Object.create(gs&&gs.prototype)).constructor=ys).prototype.reflow=function(t){for(var e=this.options.vertical?y:v,o=this.children,i=o.length,r=this.box=new B,n=0;n<i;n++){var s,a=o[n];!1!==a.visible&&((s=a.box.clone()).snapTo(t,e),0===n&&(r=this.box=s.clone()),a.reflow(s),r.wrap(s))}};var gs,l=ys;function ys(){gs.apply(this,arguments)}e(l,{vertical:!0});const vs=l;(ms=mn)&&(xs.__proto__=ms),((xs.prototype=Object.create(ms&&ms.prototype)).constructor=xs).prototype.render=function(){ms.prototype.render.call(this),this.updateStackRange()},xs.prototype.pointType=function(){return hs},xs.prototype.clusterType=function(){return fs},xs.prototype.stackType=function(){return vs},xs.prototype.stackLimits=function(t,e){return ms.prototype.stackLimits.call(this,t,e)},xs.prototype.createPoint=function(t,e){var o=e.categoryIx,i=e.category,r=e.series,e=e.seriesIx,n=this.options,s=this.children,a=n.isStacked,p=this.pointValue(t),h=this.pointOptions(r,e),l=h.labels,l=(a&&l.position===hn&&(l.position=pn),h.isStacked=a,t.fields.color||r.color),t=(p<0&&h.negativeColor&&(l=h.negativeColor),h=this.evalPointOptions(h,p,i,o,r,e),lt(r.color)&&(l=h.color),new(this.pointType())(p,h)),i=(t.color=l,s[o]);return i||(i=new(this.clusterType())({vertical:n.invertAxes,gap:n.gap,spacing:n.spacing,rtl:!n.invertAxes&&(this.chartService||{}).rtl}),this.append(i)),(a?this.getStackWrap(r,i):i).append(t),t},xs.prototype.getStackWrap=function(t,e){var o,t=t.stack,i=t&&t.group||t,r=e.children;if(typeof i===J){for(var n=0;n<r.length;n++)if(r[n]._stackGroup===i){o=r[n];break}}else o=r[0];return o||((o=new(this.stackType())({vertical:!this.options.invertAxes}))._stackGroup=i,e.append(o)),o},xs.prototype.categorySlot=function(t,e,o){var i=this.options,t=t.getSlot(e),e=o.startValue();return i.isStacked&&(o=o.getSlot(e,e,!0),t[(e=i.invertAxes?y:v)+1]=t[e+2]=o[e+1]),t},xs.prototype.reflowCategories=function(t){for(var e=this.children,o=e.length,i=0;i<o;i++)e[i].reflow(t[i])},xs.prototype.createAnimation=function(){this._setAnimationOptions(),ms.prototype.createAnimation.call(this),jn(this.options.series)&&this._setChildrenAnimation()},xs.prototype._setChildrenAnimation=function(){for(var t=this.points,e=0;e<t.length;e++){var o=t[e],i=o.visual;i&&P(i.options.zIndex)&&(o.options.animation=this.options.animation,o.createAnimation())}},xs.prototype._setAnimationOptions=function(){var t,e=this.options,o=e.animation||{};t=e.isStacked?(t=this.seriesValueAxis(e.series[0])).getSlot(t.startValue()):this.categoryAxis.getSlot(0),o.origin=new b.geometry.Point(t.x1,t.y1),o.vertical=!e.invertAxes};var ms,l=xs;function xs(){ms.apply(this,arguments)}e(l,{animation:{type:gr}});const _s=l;(bs=o)&&(ws.__proto__=bs),((ws.prototype=Object.create(bs&&bs.prototype)).constructor=ws).prototype.reflow=function(t){var e=this.options,o=this.value,e=this.owner.seriesValueAxis(e),i=e.getSlot(o.open,o.close),e=e.getSlot(o.low,o.high),o=(i.x1=e.x1=t.x1,i.x2=e.x2=t.x2,this.realBody=i,e.center().x),t=[];t.push([[o,e.y1],[o,i.y1]]),t.push([[o,i.y2],[o,e.y2]]),this.lines=t,this.box=e.clone().wrap(i),this._rendered||(this._rendered=!0,this.createNote()),this.reflowNote()},ws.prototype.reflowNote=function(){this.note&&this.note.reflow(this.box)},ws.prototype.createVisual=function(){bs.prototype.createVisual.call(this),this._mainVisual=this.mainVisual(this.options),this.visual.append(this._mainVisual),this.createOverlay()},ws.prototype.mainVisual=function(t){var e=new b.drawing.Group;return this.createBody(e,t),this.createLines(e,t),e},ws.prototype.createBody=function(t,e){var o=b.drawing.Path.fromRect(this.realBody.toRect(),{fill:{color:this.color,opacity:e.opacity},stroke:null});0<e.border.width&&o.options.set("stroke",{color:this.getBorderColor(),width:e.border.width,dashType:e.border.dashType,opacity:M(e.border.opacity,e.opacity)}),st(o),t.append(o),ss(e)&&t.append(this.createGradientOverlay(o,{baseColor:this.color},x({end:e.vertical?void 0:[0,1]},e.overlay)))},ws.prototype.createLines=function(t,e){this.drawLines(t,e,this.lines,e.line)},ws.prototype.drawLines=function(t,e,o,i){if(o)for(var r={stroke:{color:i.color||this.color,opacity:M(i.opacity,e.opacity),width:i.width,dashType:i.dashType,lineCap:"butt"}},n=0;n<o.length;n++){var s=b.drawing.Path.fromPoints(o[n],r);st(s),t.append(s)}},ws.prototype.getBorderColor=function(){var t=this.options.border,e=t.color;return e=P(e)?e:new b.Color(this.color).brightness(t._brightness).toHex()},ws.prototype.createOverlay=function(){var t=b.drawing.Path.fromRect(this.box.toRect(),{fill:{color:a,opacity:0},stroke:null});this.visual.append(t)},ws.prototype.createHighlight=function(){var t=this.options.highlight,e=this.color,t=(this.color=t.color||this.color,this.mainVisual(x({},this.options,{line:{color:this.getBorderColor()}},t)));return this.color=e,t},ws.prototype.highlightVisual=function(){return this._mainVisual},ws.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this._mainVisual}},ws.prototype.tooltipAnchor=function(){var t=this.box,e=this.owner.pane.clipBox()||t;return{point:new O(t.x2+5,Math.max(t.y1,e.y1)+5),align:{horizontal:C,vertical:k}}},ws.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},ws.prototype.overlapsBox=function(t){return this.box.overlaps(t)};var bs,l=ws;function ws(t,e){bs.call(this,e),this.value=t}e(l,{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:{}}}),x(l.prototype,xn),x(l.prototype,_n);const Cs=l;function Ss(t){return Wi(t)===t.length}(ks=mn)&&(As.__proto__=ks),((As.prototype=Object.create(ks&&ks.prototype)).constructor=As).prototype.reflowCategories=function(t){for(var e=this.children,o=e.length,i=0;i<o;i++)e[i].reflow(t[i])},As.prototype.addValue=function(t,e){var o,i=e.categoryIx,r=e.category,n=e.series,s=e.seriesIx,a=this.children,p=this.options,h=t.valueFields,l=Ss(this.splitValue(h)),c=n.data[i],u=this.categoryPoints[i],l=(u||(this.categoryPoints[i]=u=[]),l&&(o=this.createPoint(t,e)),a[i]);l||(l=new fs({vertical:p.invertAxes,gap:p.gap,spacing:p.spacing,rtl:!p.invertAxes&&(this.chartService||{}).rtl}),this.append(l)),o&&(this.updateRange(h,e),l.append(o),o.categoryIx=i,o.category=r,o.series=n,o.seriesIx=s,o.owner=this,o.dataItem=c,o.noteText=t.fields.noteText),this.points.push(o),u.push(o)},As.prototype.pointType=function(){return Cs},As.prototype.createPoint=function(t,e){var o=e.categoryIx,i=e.category,r=e.series,e=e.seriesIx,n=this.pointType(),s=t.valueFields,a=x({},r),p=t.fields.color||r.color,a=this.evalPointOptions(a,s,i,o,r,e),i=(r.type===xr&&s.open>s.close&&(p=t.fields.downColor||r.downColor||r.color),lt(r.color)&&(p=a.color),a.vertical=!this.options.invertAxes,new n(s,a));return i.color=p,i},As.prototype.splitValue=function(t){return[t.low,t.open,t.close,t.high]},As.prototype.updateRange=function(t,e){var e=e.series.axis,t=this.splitValue(t),o=this.valueAxisRanges[e],o=this.valueAxisRanges[e]=o||{min:q,max:Y};this.valueAxisRanges[e]={min:Math.min.apply(Math,t.concat([o.min])),max:Math.max.apply(Math,t.concat([o.max]))}},As.prototype.formatPointValue=function(t,e){var o=t.value;return this.chartService.format.auto(e,o.open,o.high,o.low,o.close,t.category)},As.prototype.animationPoints=function(){return this.points};var ks,l=As;function As(){ks.apply(this,arguments)}x(l.prototype,h);const Ps=l;(Ts=Cs)&&(Rs.__proto__=Ts),((Rs.prototype=Object.create(Ts&&Ts.prototype)).constructor=Rs).prototype.reflow=function(t){var e,o,i=this.options,r=this.value,i=this.owner.seriesValueAxis(i),n=(this.boxSlot=o=i.getSlot(r.q1,r.q3),this.realBody=o,this.reflowBoxSlot(t),this.whiskerSlot=e=i.getSlot(r.lower,r.upper),this.reflowWhiskerSlot(t),i.getSlot(r.median));r.mean&&(i=i.getSlot(r.mean),this.meanPoints=this.calcMeanPoints(t,i)),this.whiskerPoints=this.calcWhiskerPoints(o,e),this.medianPoints=this.calcMedianPoints(t,n),this.box=e.clone().wrap(o),this.reflowNote()},Rs.prototype.reflowBoxSlot=function(t){this.boxSlot.x1=t.x1,this.boxSlot.x2=t.x2},Rs.prototype.reflowWhiskerSlot=function(t){this.whiskerSlot.x1=t.x1,this.whiskerSlot.x2=t.x2},Rs.prototype.calcMeanPoints=function(t,e){return[[[t.x1,e.y1],[t.x2,e.y1]]]},Rs.prototype.calcWhiskerPoints=function(t,e){var o=e.center().x;return[[[o-5,e.y1],[o+5,e.y1],[o,e.y1],[o,t.y1]],[[o-5,e.y2],[o+5,e.y2],[o,e.y2],[o,t.y2]]]},Rs.prototype.calcMedianPoints=function(t,e){return[[[t.x1,e.y1],[t.x2,e.y1]]]},Rs.prototype.renderOutliers=function(t){for(var e,o=this.value,i=o.outliers||[],r=3*Math.abs(o.q3-o.q1),n=[],s=(t.markers,0);s<i.length;s++){var a=i[s],p=x({},(e=a<o.q3+r&&a>o.q1-r?t.outliers:t.extremes).border),p=(P(p.color)||(P(this.color)?p.color=this.color:p.color=new b.Color(e.background).brightness(.8).toHex()),new Me({type:e.type,width:e.size,height:e.size,rotation:e.rotation,background:e.background,border:p,opacity:e.opacity}));p.value=a,n.push(p)}return this.reflowOutliers(n),n},Rs.prototype.reflowOutliers=function(t){for(var e=this.owner.seriesValueAxis(this.options),o=this.box.center(),i=0;i<t.length;i++){var r=t[i].value,r=e.getSlot(r);this.options.vertical?r.move(o.x):r.move(void 0,o.y),this.box=this.box.wrap(r),t[i].reflow(r)}},Rs.prototype.mainVisual=function(t){for(var e=Ts.prototype.mainVisual.call(this,t),o=this.renderOutliers(t),i=0;i<o.length;i++){var r=o[i].getElement();r&&e.append(r)}return e},Rs.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)},Rs.prototype.getBorderColor=function(){return(this.options.border||{}).color?this.options.border.color:this.color||Ts.prototype.getBorderColor.call(this)};var Ts,Ms,Os,Bs,l=Rs;function Rs(t,e){Ts.call(this,t,e),this.createNote()}e(l,{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:U,background:a,border:{width:2,opacity:1},opacity:0},extremes:{visible:!0,size:8,type:H,background:a,border:{width:2,opacity:1},opacity:0}}),x(l.prototype,xn);const Es=l;function Ls(){Ms.apply(this,arguments)}(Ms=Es)&&(Ls.__proto__=Ms),((Ls.prototype=Object.create(Ms&&Ms.prototype)).constructor=Ls).prototype.reflowBoxSlot=function(t){this.boxSlot.y1=t.y1,this.boxSlot.y2=t.y2},Ls.prototype.reflowWhiskerSlot=function(t){this.whiskerSlot.y1=t.y1,this.whiskerSlot.y2=t.y2},Ls.prototype.calcMeanPoints=function(t,e){return[[[e.x1,t.y1],[e.x1,t.y2]]]},Ls.prototype.calcWhiskerPoints=function(t,e){var o=e.center().y;return[[[e.x1,o-5],[e.x1,o+5],[e.x1,o],[t.x1,o]],[[e.x2,o-5],[e.x2,o+5],[e.x2,o],[t.x2,o]]]},Ls.prototype.calcMedianPoints=function(t,e){return[[[e.x1,t.y1],[e.x1,t.y2]]]};const Is=Ls;function zs(){Os.apply(this,arguments)}(Os=Ps)&&(zs.__proto__=Os),((zs.prototype=Object.create(Os&&Os.prototype)).constructor=zs).prototype.addValue=function(t,e){var o,i=e.categoryIx,r=e.category,n=e.series,s=e.seriesIx,a=this.children,p=this.options,h=t.valueFields,l=Ss(this.splitValue(h)),c=n.data[i],u=this.categoryPoints[i],l=(u||(this.categoryPoints[i]=u=[]),l&&(o=this.createPoint(t,e)),a[i]);l||(l=new fs({vertical:p.invertAxes,gap:p.gap,spacing:p.spacing,rtl:!p.invertAxes&&(this.chartService||{}).rtl}),this.append(l)),o&&(this.updateRange(h,e),l.append(o),o.categoryIx=i,o.category=r,o.series=n,o.seriesIx=s,o.owner=this,o.dataItem=c),this.points.push(o),u.push(o)},zs.prototype.pointType=function(){return this.options.invertAxes?Is:Es},zs.prototype.splitValue=function(t){return[t.lower,t.q1,t.median,t.q3,t.upper]},zs.prototype.updateRange=function(t,e){var e=e.series.axis,o=this.valueAxisRanges[e],i=this.splitValue(t).concat(this.filterOutliers(t.outliers));P(t.mean)&&(i=i.concat(t.mean)),o=this.valueAxisRanges[e]=o||{min:q,max:Y},this.valueAxisRanges[e]={min:Math.min.apply(Math,i.concat([o.min])),max:Math.max.apply(Math,i.concat([o.max]))}},zs.prototype.formatPointValue=function(t,e){var o=t.value;return this.chartService.format.auto(e,o.lower,o.q1,o.median,o.q3,o.upper,o.mean,t.category)},zs.prototype.filterOutliers=function(t){for(var e=(t||[]).length,o=[],i=0;i<e;i++){var r=t[i];P(r)&&null!==r&&o.push(r)}return o},zs.prototype.supportsPointInactiveOpacity=function(){return!1};const Vs=zs;function js(){Bs.apply(this,arguments)}(Bs=un)&&(js.__proto__=Bs),((js.prototype=Object.create(Bs&&Bs.prototype)).constructor=js).prototype.getAxis=function(){var t=this.chart.seriesAxes(this.series);return this.isVertical?t.y:t.x};const Ds=js;function Hs(t){return P(t)&&null!==t}(Us=o)&&(Fs.__proto__=Us),((Fs.prototype=Object.create(Us&&Us.prototype)).constructor=Fs).prototype._initFields=function(){this.xAxisRanges={},this.yAxisRanges={},this.points=[],this.seriesPoints=[],this.seriesOptions=[],this._evalSeries=[]},Fs.prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},Fs.prototype.addErrorBar=function(t,e,o){var i,r=t.value[e],n=e+"Value",s=o.seriesIx,a=o.series,p=t.options.errorBars,h=o[e+"ErrorLow"],o=o[e+"ErrorHigh"];m(r)&&(m(h)&&m(o)&&(i={low:h,high:o}),p&&P(p[n])&&(this.seriesErrorRanges=this.seriesErrorRanges||{x:[],y:[]},this.seriesErrorRanges[e][s]=this.seriesErrorRanges[e][s]||new er(p[n],a,e),i=this.seriesErrorRanges[e][s].getErrorRange(r,p[n])),i&&this.addPointErrorBar(i,t,e))},Fs.prototype.addPointErrorBar=function(t,e,o){var i=t.low,t=t.high,r=e.series,n=e.options.errorBars,s=o===v,a={},s=(e[o+"Low"]=i,e[o+"High"]=t,e.errorBars=e.errorBars||[],new Ds(i,t,s,this,r,n));e.errorBars.push(s),e.append(s),a[o]=i,this.updateRange(a,r),a[o]=t,this.updateRange(a,r)},Fs.prototype.addValue=function(t,e){var o,i=t.x,r=t.y,n=e.seriesIx,s=this.options.series[n],s=this.seriesMissingValues(s),n=this.seriesPoints[n];(t=Hs(i)&&Hs(r)?t:this.createMissingValue(t,s))&&((o=this.createPoint(t,e))&&(Object.assign(o,e),this.addErrorBar(o,y,e),this.addErrorBar(o,v,e)),this.updateRange(t,e.series)),this.points.push(o),n.push(o)},Fs.prototype.seriesMissingValues=function(t){return t.missingValues},Fs.prototype.createMissingValue=function(){},Fs.prototype.updateRange=function(t,e){var o=this.chartService.intl,i=e.xAxis,e=e.yAxis,r=t.x,t=t.y,n=this.xAxisRanges[i],s=this.yAxisRanges[e];Hs(r)&&(n=this.xAxisRanges[i]=n||{min:q,max:Y},pt(r)&&(r=No(o,r)),n.min=Math.min(n.min,r),n.max=Math.max(n.max,r)),Hs(t)&&(s=this.yAxisRanges[e]=s||{min:q,max:Y},pt(t)&&(t=No(o,t)),s.min=Math.min(s.min,t),s.max=Math.max(s.max,t))},Fs.prototype.evalPointOptions=function(t,e,o){var i=o.series,r=o.seriesIx,n={defaults:i._defaults,excluded:["data","tooltip","content","template","visual","toggle","_outOfRangeMinPoint","_outOfRangeMaxPoint"]},s=this._evalSeries[r],r=(P(s)||(this._evalSeries[r]=s=gn(t,{},n,!0)),t);return s&&gn(r=x({},t),{value:e,series:i,dataItem:o.dataItem},n),r},Fs.prototype.pointType=function(){return Cn},Fs.prototype.pointOptions=function(t,e){var o,i=this.seriesOptions[e];return i||(o=this.pointType().prototype.defaults,this.seriesOptions[e]=i=x({},o,{markers:{opacity:t.opacity},tooltip:{format:this.options.tooltip.format},labels:{format:this.options.labels.format}},t)),i},Fs.prototype.createPoint=function(t,e){var o=e.series,i=this.pointOptions(o,e.seriesIx),r=e.color||o.color,i=this.evalPointOptions(i,t,e),e=(lt(o.color)&&(r=i.color),new Cn(t,i));return e.color=r,this.append(e),e},Fs.prototype.seriesAxes=function(t){var e=t.xAxis,t=t.yAxis,o=this.plotArea,i=e?o.namedXAxes[e]:o.axisX,o=t?o.namedYAxes[t]:o.axisY;if(!i)throw new Error("Unable to locate X axis with name "+e);if(o)return{x:i,y:o};throw new Error("Unable to locate Y axis with name "+t)},Fs.prototype.reflow=function(t){var r=this,n=this.points,s=!this.options.clip,a=0;this.traverseDataPoints(function(t,e){var o=n[a++],e=r.seriesAxes(e.series),i=e.x.getSlot(t.x,t.x,s),e=e.y.getSlot(t.y,t.y,s);o&&(i&&e?(t=r.pointSlot(i,e),o.reflow(t)):o.visible=!1)}),this.box=t},Fs.prototype.pointSlot=function(t,e){return new B(t.x1,e.y1,t.x2,e.y2)},Fs.prototype.traverseDataPoints=function(t){for(var e=this.options.series,o=this.seriesPoints,i=0;i<e.length;i++){var r=e[i];o[i]||(o[i]=[]);for(var n=0;n<r.data.length;n++){var s=this._bindPoint(r,i,n),a=s.valueFields,s=s.fields;t(a,x({pointIx:n,series:r,seriesIx:i,dataItem:r.data[n],owner:this},s))}}},Fs.prototype.formatPointValue=function(t,e){t=t.value;return this.chartService.format.auto(e,t.x,t.y)},Fs.prototype.animationPoints=function(){for(var t=this.points,e=[],o=0;o<t.length;o++)e.push((t[o]||{}).marker);return e};var Us,l=Fs;function Fs(t,e){Us.call(this,e),this.plotArea=t,this.chartService=t.chartService,this._initFields(),this.render()}e(l,{series:[],tooltip:{format:"{0}, {1}"},labels:{format:"{0}, {1}"},clip:!0}),x(l.prototype,h,{_bindPoint:mn.prototype._bindPoint});const Ns=l;(Gs=Cn)&&(Ws.__proto__=Gs),((Ws.prototype=Object.create(Gs&&Gs.prototype)).constructor=Ws).prototype.createHighlight=function(){var t=this.options.highlight,e=t.border,o=this.options.markers,i=this.box.center(),r=(o.size+o.border.width+e.width)/2,n=new b.drawing.Group,s=new b.drawing.Circle(new b.geometry.Circle([i.x,i.y+r/5+e.width/2],r+e.width/2),{stroke:{color:"none"},fill:this.createGradient({gradient:"bubbleShadow",color:o.background,stops:[{offset:0,color:o.background,opacity:.3},{offset:1,color:o.background,opacity:0}]})}),i=new b.drawing.Circle(new b.geometry.Circle([i.x,i.y],r),{stroke:{color:e.color||new b.Color(o.background).brightness(.8).toHex(),width:e.width,opacity:e.opacity},fill:{color:o.background,opacity:t.opacity}});return n.append(s,i),n};var Gs,l=Ws;function Ws(t,e){Gs.call(this,t,e),this.category=t.category}l.prototype.defaults=x({},l.prototype.defaults,{labels:{position:w},highlight:{opacity:1,border:{color:"#fff",width:2,opacity:1}}}),l.prototype.defaults.highlight.zIndex=void 0;const Xs=l;(qs=Ns)&&(Ys.__proto__=qs),((Ys.prototype=Object.create(qs&&qs.prototype)).constructor=Ys).prototype._initFields=function(){this._maxSize=Y,qs.prototype._initFields.call(this)},Ys.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)),qs.prototype.addValue.call(this,t,e)):(this.points.push(null),this.seriesPoints[e.seriesIx].push(null))},Ys.prototype.reflow=function(t){this.updateBubblesSize(t),qs.prototype.reflow.call(this,t)},Ys.prototype.pointType=function(){return Xs},Ys.prototype.createPoint=function(t,e){var o=e.series,i=o.data.length,i=e.pointIx*(nr/i),r={delay:i,duration:nr-i,type:vr},n=e.color||o.color,i=(t.size<0&&o.negativeValues.visible&&(n=M(o.negativeValues.color,n)),x({labels:{animation:{delay:i,duration:nr-i}}},this.pointOptions(o,e.seriesIx),{markers:{type:H,border:o.border,opacity:o.opacity,animation:r}})),i=this.evalPointOptions(i,t,e),r=(lt(o.color)&&(n=i.color),i.markers.background=n,new Xs(t,i));return r.color=n,this.append(r),r},Ys.prototype.updateBubblesSize=function(t){for(var e=this.options.series,o=Math.min(t.width(),t.height()),i=0;i<e.length;i++)for(var r=e[i],n=this.seriesPoints[i],s=(r.minSize||Math.max(.02*o,10))/2,a=(r.maxSize||.2*o)/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&&(c=Math.abs(d.value.size)*h,c=Math.sqrt((p+c)/Math.PI),u=M(d.options.zIndex,0)+(1-c/a),x(d.options,{zIndex:u,markers:{size:2*c,zIndex:u},labels:{zIndex:u+1}}))}},Ys.prototype.formatPointValue=function(t,e){var o=t.value;return this.chartService.format.auto(e,o.x,o.y,o.size,t.category)},Ys.prototype.createAnimation=function(){},Ys.prototype.createVisual=function(){};var qs,l=Ys;function Ys(){qs.apply(this,arguments)}e(l,{tooltip:{format:"{3}"},labels:{format:"{3}"}});const Zs=l;(Qs=Me)&&(Ks.__proto__=Qs);var Qs,l=(Ks.prototype=Object.create(Qs&&Qs.prototype)).constructor=Ks;function Ks(){Qs.apply(this,arguments)}x(l.prototype,xn);const $s=l;(Js=o)&&(ta.__proto__=Js),((ta.prototype=Object.create(Js&&Js.prototype)).constructor=ta).prototype.render=function(){var t=this.options;this._rendered||(this._rendered=!0,P(this.value.target)&&(this.target=new $s({type:t.target.shape,background:t.target.color||this.color,opacity:t.opacity,zIndex:t.zIndex,border:t.target.border,vAlign:k,align:S}),this.target.value=this.value,this.target.dataItem=this.dataItem,this.target.series=this.series,this.append(this.target)),this.createNote())},ta.prototype.reflow=function(t){this.render();var e=this.options,o=this.target,i=this.owner,r=e.invertAxes,n=i.seriesValueAxis(this.options),i=i.categorySlot(i.categoryAxis,e.categoryIx,n),n=n.getSlot(this.value.target),s=r?n:i,i=r?i:n;o&&(n=new B(s.x1,i.y1,s.x2,i.y2),o.options.height=r?n.height():e.target.line.width,o.options.width=r?e.target.line.width:n.width(),o.reflow(n)),this.note&&this.note.reflow(t),this.box=t},ta.prototype.createVisual=function(){Js.prototype.createVisual.call(this);var t=this.options,e=b.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:M(t.border.opacity,t.opacity)}),st(this.bodyVisual=e),this.visual.append(e)},ta.prototype.createAnimation=function(){this.bodyVisual&&(this.animation=b.drawing.Animation.create(this.bodyVisual,this.options.animation))},ta.prototype.createHighlight=function(t){return b.drawing.Path.fromRect(this.box.toRect(),t)},ta.prototype.highlightVisual=function(){return this.bodyVisual},ta.prototype.highlightVisualArgs=function(){return{rect:this.box.toRect(),visual:this.bodyVisual,options:this.options}},ta.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)};var Js,l=ta;function ta(t,e){Js.call(this,e),this.aboveAxis=this.options.aboveAxis,this.color=e.color||a,this.value=t}l.prototype.tooltipAnchor=hs.prototype.tooltipAnchor,e(l,{border:{width:1},vertical:!1,opacity:1,target:{shape:"",border:{width:0,color:"green"},line:{width:2}},tooltip:{format:"Current: {0}<br />Target: {1}"}}),x(l.prototype,xn),x(l.prototype,_n);const ea=l;(oa=mn)&&(ia.__proto__=oa),((ia.prototype=Object.create(oa&&oa.prototype)).constructor=ia).prototype.reflowCategories=function(t){for(var e=this.children,o=e.length,i=0;i<o;i++)e[i].reflow(t[i])},ia.prototype.plotRange=function(t){var e=t.series,e=this.seriesValueAxis(e),e=this.categoryAxisCrossingValue(e);return[e,t.value.current||e]},ia.prototype.createPoint=function(t,e){var o=e.categoryIx,i=e.category,r=e.series,e=e.seriesIx,n=this.options,s=this.children,a=t.valueFields,p=x({vertical:!n.invertAxes,overlay:r.overlay,categoryIx:o,invertAxes:n.invertAxes},r),t=t.fields.color||r.color,p=this.evalPointOptions(p,a,i,o,r,e),i=(lt(r.color)&&(t=p.color),new ea(a,p)),e=(i.color=t,s[o]);return e||(e=new fs({vertical:n.invertAxes,gap:n.gap,spacing:n.spacing,rtl:!n.invertAxes&&(this.chartService||{}).rtl}),this.append(e)),e.append(i),i},ia.prototype.updateRange=function(t,e){var o=t.current,t=t.target,e=e.series.axis,i=this.valueAxisRanges[e];P(o)&&!isNaN(o)&&P(t&&!isNaN(t))&&((i=this.valueAxisRanges[e]=i||{min:q,max:Y}).min=Math.min(i.min,o,t),i.max=Math.max(i.max,o,t))},ia.prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value.current,t.value.target)},ia.prototype.pointValue=function(t){return t.valueFields.current},ia.prototype.aboveAxis=function(t){return 0<t.value.current},ia.prototype.createAnimation=function(){var t=this.points;this._setAnimationOptions();for(var e=0;e<t.length;e++){var o=t[e];o.options.animation=this.options.animation,o.createAnimation()}};var oa,l=ia;function ia(t,e){for(var o=e.series,i=0;i<o.length;i++){var r=o[i],n=r.data;!n||ot(n[0])||ut(n[0])||(r.data=[n])}oa.call(this,t,e)}l.prototype._setAnimationOptions=_s.prototype._setAnimationOptions,e(l,{animation:{type:gr}});const ra=l;(na=b.Class)&&(sa.__proto__=na),((sa.prototype=Object.create(na&&na.prototype)).constructor=sa).prototype.getStyle=function(t,e){var o=t.background,i=t.border.color,e=(e&&(e=e.color||e.options.color,o=M(o,e),i=M(i,e)),A(t.padding||{},"auto"));return{backgroundColor:o,borderColor:i,font:t.font,color:t.color,opacity:t.opacity,borderWidth:dt(t.border.width),paddingTop:dt(e.top),paddingBottom:dt(e.bottom),paddingLeft:dt(e.left),paddingRight:dt(e.right)}},sa.prototype.show=function(t,e,o){t.format=e.format;o=this.getStyle(e,o),t.style=o,o=new b.Color(o.backgroundColor);P(e.color)||o.isDark()||(t.className="k-chart-tooltip-inverse"),this.chartService.notify(nn,t),this.visible=!0},sa.prototype.hide=function(){this.chartService&&this.chartService.notify(sn),this.visible=!1},sa.prototype.destroy=function(){delete this.chartService};var na,l=sa;function sa(t,e){na.call(this),this.chartService=t,this.options=x({},this.options,e)}e(l,{border:{width:1},opacity:1});(aa=l)&&(pa.__proto__=aa),((pa.prototype=Object.create(aa&&aa.prototype)).constructor=pa).prototype.initAxisName=function(){var t=this.crosshair.axis,t=t.plotArea.categoryAxis?t.getCategory?"categoryAxis":"valueAxis":t.options.vertical?"yAxis":"xAxis";this.axisName=t},pa.prototype.showAt=function(t){var e=this.crosshair.axis,o=this.options,i=e[o.stickyMode?"getCategory":"getValue"](t),r=i;o.format?r=this.formatService.auto(o.format,i):e.options.type===F&&(r=this.formatService.auto(e.options.labels.dateFormats[e.options.baseUnit],i)),this.show({point:t,anchor:this.getAnchor(),crosshair:this.crosshair,value:r,axisName:this.axisName,axisIndex:this.crosshair.axis.axisIndex},this.options)},pa.prototype.hide=function(){this.chartService.notify(sn,{crosshair:this.crosshair,axisName:this.axisName,axisIndex:this.crosshair.axis.axisIndex})},pa.prototype.getAnchor=function(){var t,e,o=this.crosshair,i=this.options,r=i.position,i=i.padding,n=!o.axis.options.vertical,o=o.line.bbox(),n=n?(t=w,r===D?(e=k,o.bottomLeft().translate(0,i)):(e=D,o.topLeft().translate(0,-i))):(e=w,r===C?(t=S,o.topLeft().translate(-i,0)):(t=C,o.topRight().translate(i,0)));return{point:n,align:{horizontal:t,vertical:e}}};var aa,c=pa;function pa(t,e,o){aa.call(this,t,o),this.crosshair=e,this.formatService=t.format,this.initAxisName()}e(c,{padding:10});const ha=c;(la=o)&&(ca.__proto__=la),((ca.prototype=Object.create(la&&la.prototype)).constructor=ca).prototype.showAt=function(t){this.point=t,this.moveLine(),this.line.visible(!0),this.tooltip&&this.tooltip.showAt(t)},ca.prototype.hide=function(){this.line.visible(!1),this.tooltip&&this.tooltip.hide()},ca.prototype.moveLine=function(){var t=this.axis,e=this.point,o=t.options.vertical,i=this.getBox(),r=o?v:y,n=new b.geometry.Point(i.x1,i.y1),o=o?new b.geometry.Point(i.x2,i.y1):new b.geometry.Point(i.x1,i.y2);e&&(this.stickyMode?(t=t.getSlot(t.pointCategoryIndex(e)),n[r]=o[r]=t.center()[r]):n[r]=o[r]=e[r]),this.box=i,this.line.moveTo(n).lineTo(o)},ca.prototype.getBox=function(){for(var t,e=this.axis,o=e.pane.axes,i=o.length,r=e.options.vertical,e=e.lineBox().clone(),n=r?y:v,s=0;s<i;s++){var a=o[s];a.options.vertical!==r&&(t?t.wrap(a.lineBox()):t=a.lineBox().clone())}return e[n+1]=t[n+1],e[n+2]=t[n+2],e},ca.prototype.createVisual=function(){la.prototype.createVisual.call(this);var t=this.options;this.line=new b.drawing.Path({stroke:{color:t.color,width:t.width,opacity:t.opacity,dashType:t.dashType},visible:!1}),this.moveLine(),this.visual.append(this.line)},ca.prototype.destroy=function(){this.tooltip&&this.tooltip.destroy(),la.prototype.destroy.call(this)};var la,c=ca;function ca(t,e,o){la.call(this,o),this.axis=e,this.stickyMode=e instanceof qo;o=this.options.tooltip;o.visible&&(this.tooltip=new ha(t,this,x({},o,{stickyMode:this.stickyMode})))}e(c,{color:j,width:2,zIndex:-1,tooltip:{visible:!1}});const ua=c;(da=o)&&(fa.__proto__=da),((fa.prototype=Object.create(da&&da.prototype)).constructor=fa).prototype.shouldClip=function(){for(var t=this.children,e=t.length,o=0;o<e;o++)if(!0===t[o].options.clip)return!0;return!1},fa.prototype._clipBox=function(){return this.pane.chartsBox()},fa.prototype.createVisual=function(){var t;this.visual=new b.drawing.Group({zIndex:0}),this.shouldClip()&&(t=(this.clipBox=this._clipBox()).toRect(),st(t=b.drawing.Path.fromRect(t)),this.visual.clip(t),this.unclipLabels())},fa.prototype.stackRoot=function(){return this},fa.prototype.unclipLabels=function(){for(var t=this.children,e=this.clipBox,o=0;o<t.length;o++)for(var i=t[o].points||{},r=i.length,n=0;n<r;n++){var s,a=i[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)))}},fa.prototype.destroy=function(){da.prototype.destroy.call(this),delete this.parent};var da,c=fa;function fa(t,e){da.call(this,t),this.pane=e}c.prototype.isStackRoot=!0;const ga=c;(ya=Ae)&&(ma.__proto__=ya),((ma.prototype=Object.create(ya&&ya.prototype)).constructor=ma).prototype.createTitle=function(){var t=this.options.title;ut(t)&&(t=x({},t,{align:t.position,position:k})),this.title=Ye.buildTitle(t,this,ma.prototype.options.title)},ma.prototype.appendAxis=function(t){this.content.append(t),this.axes.push(t),t.pane=this},ma.prototype.appendAxisAt=function(t,e){this.content.append(t),this.axes.splice(e,0,t),t.pane=this},ma.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},ma.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 o=0;o<this.charts.length;o++)t.removeChart(this.charts[o])}this.axes=[],this.charts=[],this.content.destroy(),this.content.children=[],this.chartContainer.children=[]},ma.prototype.reflow=function(t){var e;Ft(this.children)===this.content&&(e=this.children.pop()),ya.prototype.reflow.call(this,t),e&&this.children.push(e),this.title&&(this.contentBox.y1+=this.title.box.height())},ma.prototype.visualStyle=function(){var t=ya.prototype.visualStyle.call(this);return t.zIndex=-10,t},ma.prototype.renderComplete=function(){this.options.visible&&this.createGridLines()},ma.prototype.stackRoot=function(){return this},ma.prototype.clipRoot=function(){return this},ma.prototype.createGridLines=function(){for(var t,e=this.axes,o=e.concat(this.parent.axes),i=[],r=[],n=0;n<e.length;n++)for(var s=e[n],a=s.options.vertical,p=a?i:r,h=0;h<o.length;h++)0!==p.length||a!==(t=o[h]).options.vertical&&Lt(p,s.createGridLines(t))},ma.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()},ma.prototype.chartsBox=function(){for(var t=this.axes,e=t.length,o=new B,i=0;i<e;i++){var r=t[i],n=r.options.vertical?v:y,r=r.lineBox();o[n+1]=r[n+1],o[n+2]=r[n+2]}if(0===o.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(),o.x1=h.x1,o.x2=h.x2)}return o},ma.prototype.clipBox=function(){return this.chartContainer.clipBox},ma.prototype.notifyRender=function(){var t=this.getService();t&&t.notify("paneRender",{pane:new Fi(this),index:this.paneIndex,name:this.options.name})};var ya,c=ma,va=1;function ma(t){ya.call(this,t),this.id="pane"+va++,this.createTitle(),this.content=new o,this.chartContainer=new ga({},this),this.append(this.content),this.axes=[],this.charts=[]}c.prototype.isStackRoot=!0,e(c,{zIndex:-1,shrinkToFit:!0,title:{align:C},visible:!0});const xa=c;function _a(t,e){null!==e&&t.push(e)}function ba(t,e,o){e=e.visible;if(P(e))return e;e=t.pointVisibility;return e?e[o]:void 0}function wa(t){for(var e=t.data,o=[],i=0,r=0,n=0;n<e.length;n++){var s=Ki.current.bindPoint(t,n),a=s.valueFields.value;m(a=pt(a)?parseFloat(a):a)?(s.visible=!1!==ba(t,s.fields,n),s.value=Math.abs(a),o.push(s),s.visible&&(i+=s.value),0!==a&&r++):o.push(null)}return{total:i,points:o,count:r}}function Ca(t,e){return t&&e?t.toLowerCase()===e.toLowerCase():t===e}function Sa(t,e){for(var o=[],i=[].concat(e),r=0;r<t.length;r++){var n=t[r];u(n.type,i)&&o.push(n)}return o}function ka(t,e,o){if(null===e)return e;var i="_date_"+t,r=e[i];return r||(r=No(o,wt(t)(e)),e[i]=r),r}function Aa(t,e){t=t.type,e=e instanceof Date;return!t&&e||Ca(t,F)}function Pa(t){return 1===t.length?t[0]:t}var Ta=/area/i;function Ma(t,e){var o,i=Ki.current.bindPoint(t,null,e).valueFields;for(o in i)if(ht(i[o]))return!0}function Oa(t){for(var e,o,i=t.start,r=t.dir,n=t.min,s=t.max,a=t.getter,p=t.hasItem,h=t.series,l=i;p(l+=r)&&(e=Ma(h,(o=a(l)).item)),n<=l&&l<=s&&!e;);if(e)return o}function Ba(t,e,o,i,r){var n,s,a,p,h=e.min,e=e.max,l=0<h&&h<o,c=e+1<o;(l||c)&&(((p=t).missingValues||(Ta.test(p.type)||p.stack?pr:hr))!==hr?(l&&(n=i(h-1)),c&&(s=i(e+1))):(l&&(n=Ma(t,(a=i(h-1)).item)?a:Oa({start:h,dir:-1,min:0,max:o-1,getter:i,hasItem:r,series:t})),c&&(s=Ma(t,(a=i(e+1)).item)?a:Oa({start:e,dir:1,min:0,max:o-1,getter:i,hasItem:r,series:t}))),n&&(t._outOfRangeMinPoint=n),s&&(t._outOfRangeMaxPoint=s))}(Ra=o)&&(R.__proto__=Ra),((R.prototype=Object.create(Ra&&Ra.prototype)).constructor=R).prototype.initFields=function(){},R.prototype.initSeries=function(){for(var t=this.series,e=0;e<t.length;e++)t[e].index=e},R.prototype.createPanes=function(){for(var t=this.options.title||{},e=this.options.paneDefaults,o=this.options.panes||[],i=Math.max(o.length,1),r=[],n=x({title:{color:t.color}},e),s=0;s<i;s++){var a=x({},n,o[s]),a=(pt(a.title)&&(a.title=x({text:a.title},n.title)),new xa(a));a.paneIndex=s,r.push(a),this.append(a)}this.panes=r},R.prototype.crosshairOptions=function(t){return t.options.crosshair},R.prototype.createCrosshairs=function(t){void 0===t&&(t=this.panes);for(var e=0;e<t.length;e++)for(var o=t[e],i=0;i<o.axes.length;i++){var r=o.axes[i],n=this.crosshairOptions(r);n&&n.visible&&(r=new ua(this.chartService,r,n),this.crosshairs.push(r),o.content.append(r))}},R.prototype.removeCrosshairs=function(t){for(var e=this.crosshairs,o=t.axes,i=e.length-1;0<=i;i--)for(var r=0;r<o.length;r++)if(e[i].axis===o[r]){e.splice(i,1);break}},R.prototype.hideCrosshairs=function(){for(var t=this.crosshairs,e=0;e<t.length;e++)t[e].hide()},R.prototype.findPane=function(t){for(var e,o=this.panes,i=0;i<o.length;i++)if(o[i].options.name===t){e=o[i];break}return e||o[0]},R.prototype.findPointPane=function(t){for(var e,o=this.panes,i=0;i<o.length;i++)if(o[i].box.containsPoint(t)){e=o[i];break}return e},R.prototype.appendAxis=function(t){this.findPane(t.options.pane).appendAxis(t),this.axes.push(t),t.plotArea=this},R.prototype.removeAxis=function(t){for(var e=[],o=0;o<this.axes.length;o++){var i=this.axes[o];t!==i?e.push(i):i.destroy()}this.axes=e},R.prototype.appendChart=function(t,e){this.charts.push(t),e?e.appendChart(t):this.append(t)},R.prototype.removeChart=function(t){for(var e=[],o=0;o<this.charts.length;o++){var i=this.charts[o];i!==t?e.push(i):i.destroy()}this.charts=e},R.prototype.addToLegend=function(t){for(var e=t.length,o=this.options.legend,i=o.labels||{},r=o.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&&xt(n)||xt(i))&&(p=l({text:Hs(p)?p:"",series:u})),l=u._defaults,l=void(lt(h=u.color)&&l&&(h=l.color)),c=void 0,c=d?(l={},h):(l={color:n.color,font:n.font},r.markers.color),Hs(p)&&""!==p&&s.push({text:p,labels:l,markerColor:c,series:u,active:d}))}Lt(o.items,s)},R.prototype.groupAxes=function(t){for(var e=[],o=[],i=0;i<t.length;i++)for(var r=t[i].axes,n=0;n<r.length;n++){var s=r[n];(s.options.vertical?o:e).push(s)}return{x:e,y:o,any:e.concat(o)}},R.prototype.groupSeriesByPane=function(){for(var t=this.series,e={},o=0;o<t.length;o++){var i=t[o],r=this.seriesPaneName(i);e[r]?e[r].push(i):e[r]=[i]}return e},R.prototype.filterVisibleSeries=function(t){for(var e=[],o=0;o<t.length;o++){var i=t[o];!1!==i.visible&&e.push(i)}return e},R.prototype.reflow=function(t){var e=this.options.plotArea,o=this.panes,e=A(e.margin);this.box=t.clone().unpad(e),this.reflowPanes(),this.detachLabels(),this.reflowAxes(o),this.reflowCharts(o)},R.prototype.redraw=function(t){var e=[].concat(t),t=(this.initSeries(),this.getRoot());t&&t.cleanGradients();for(var o=0;o<e.length;o++)this.removeCrosshairs(e[o]),e[o].empty();this.render(e),this.detachLabels(),this.reflowAxes(this.panes),this.reflowCharts(e),this.createCrosshairs(e);for(var i=0;i<e.length;i++)e[i].refresh()},R.prototype.axisCrossingValues=function(t,e){for(var t=t.options,o=[].concat(t.axisCrossingValues||t.axisCrossingValue),i=e.length-o.length,r=o[0]||0,n=0;n<i;n++)o.push(r);return o},R.prototype.alignAxisTo=function(t,e,o,i){var o=t.getSlot(o,o,!0),r=t.options.reverse?2:1,i=e.getSlot(i,i,!0),n=e.options.reverse?2:1,i=t.box.translate(i[y+n]-o[y+r],i[v+n]-o[v+r]);t.pane!==e.pane&&i.translate(0,t.pane.box.y1-e.pane.box.y1),t.reflow(i)},R.prototype.alignAxes=function(t,e){for(var o=t[0],i=e[0],r=this.axisCrossingValues(o,e),n=this.axisCrossingValues(i,t),s={},a={},p={},h={},l=0;l<e.length;l++){var c=e[l],u=c.pane,d=u.id,f=!1!==c.options.visible,u=La(t,u)||o,g=r;u!==o&&(g=this.axisCrossingValues(u,e)),this.alignAxisTo(c,u,n[l],g[l]),c.options._overlap||(T(c.lineBox().x1)===T(u.lineBox().x1)&&(s[d]&&c.reflow(c.box.alignTo(s[d].box,C).translate(-c.options.margin,0)),f&&(s[d]=c)),T(c.lineBox().x2)===T(u.lineBox().x2)&&(c._mirrored||(c.options.labels.mirror=!c.options.labels.mirror,c._mirrored=!0),this.alignAxisTo(c,u,n[l],g[l]),a[d]&&c.reflow(c.box.alignTo(a[d].box,S).translate(c.options.margin,0)),f&&(a[d]=c)),0!==l&&i.pane===c.pane&&(c.alignTo(i),c.reflow(c.box)))}for(var y=0;y<t.length;y++){var v=t[y],m=v.pane,x=m.id,_=!1!==v.options.visible,m=La(e,m)||i,b=n;m!==i&&(b=this.axisCrossingValues(m,t)),this.alignAxisTo(v,m,r[y],b[y]),v.options._overlap||(T(v.lineBox().y1)===T(m.lineBox().y1)&&(v._mirrored||(v.options.labels.mirror=!v.options.labels.mirror,v._mirrored=!0),this.alignAxisTo(v,m,r[y],b[y]),p[x]&&v.reflow(v.box.alignTo(p[x].box,k).translate(0,-v.options.margin)),_&&(p[x]=v)),T(v.lineBox().y2,3)===T(m.lineBox().y2,3)&&(h[x]&&v.reflow(v.box.alignTo(h[x].box,D).translate(0,v.options.margin)),_&&(h[x]=v)),0!==y&&(v.alignTo(o),v.reflow(v.box)))}},R.prototype.shrinkAxisWidth=function(t){for(var e=this.groupAxes(t).any,o=Ea(e),i=0,r=0;r<t.length;r++){var n=t[r];0<n.axes.length&&(i=Math.max(i,o.width()-n.contentBox.width()))}if(0!==i)for(var s=0;s<e.length;s++){var a=e[s];a.options.vertical||a.reflow(a.box.shrink(i,0))}},R.prototype.shrinkAxisHeight=function(t){for(var e,o=0;o<t.length;o++){var i=t[o],r=i.axes,n=Math.max(0,Ea(r).height()-i.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},R.prototype.fitAxes=function(t){for(var e=this.groupAxes(t).any,o=0,i=0;i<t.length;i++){var r=t[i],n=r.axes,r=r.contentBox;if(0<n.length)for(var s=Ea(n),a=Math.max(r.y1-s.y1,r.y2-s.y2),o=Math.max(o,r.x1-s.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(o,0))}},R.prototype.reflowAxes=function(t){for(var e=this.groupAxes(t),o=0;o<t.length;o++)this.reflowPaneAxes(t[o]);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))},R.prototype.autoRotateAxisLabels=function(t){for(var e,o=this.panes,i=za(o),r=0;r<i.length;r++)i[r].autoRotateLabels()&&(e=!0);if(e){for(var n=0;n<o.length;n++)this.reflowPaneAxes(o[n]);0<t.x.length&&0<t.y.length&&(this.alignAxes(t.x,t.y),this.shrinkAxisWidth(o))}},R.prototype.reflowPaneAxes=function(t){var e=t.axes,o=e.length;if(0<o)for(var i=0;i<o;i++)e[i].reflow(t.contentBox)},R.prototype.reflowCharts=function(t){for(var e=this.charts,o=e.length,i=this.box,r=0;r<o;r++){var n=e[r].pane;n&&!u(n,t)||e[r].reflow(i)}},R.prototype.reflowPanes=function(){for(var t=this.box,e=this.panes,o=e.length,i=t.height(),r=0,n=t.y1,s=0;s<o;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()),i-=a.options.height):r++}for(var h=0;h<o;h++){var l=e[h];l.options.height||(l.options.height=i/r)}for(var c=0;c<o;c++){var u=e[c],d=t.clone().move(t.x1,n);u.reflow(d),n+=u.options.height}},R.prototype.backgroundBox=function(){for(var t=this.axes,e=t.length,o=0;o<e;o++)for(var i=t[o],r=0;r<e;r++){var n,s=t[r];i.options.vertical!==s.options.vertical&&(s=i.lineBox().clone().wrap(s.lineBox()),n=n?n.wrap(s):s)}return n||this.box},R.prototype.chartsBoxes=function(){for(var t=this.panes,e=[],o=0;o<t.length;o++)e.push(t[o].chartsBox());return e},R.prototype.addBackgroundPaths=function(t){for(var e=this.chartsBoxes(),o=0;o<e.length;o++)t.paths.push(b.drawing.Path.fromRect(e[o].toRect()))},R.prototype.backgroundContainsPoint=function(t){for(var e=this.chartsBoxes(),o=0;o<e.length;o++)if(e[o].containsPoint(t))return!0},R.prototype.createVisual=function(){Ra.prototype.createVisual.call(this);var t=this.options.plotArea,e=t.opacity,o=t.background,t=t.border,o=(void 0===t&&(t={}),""!==o&&null!==o&&"none"!==o&&"transparent"!==o&&P(o)||(o=a,e=0),this._bgVisual=new b.drawing.MultiPath({fill:{color:o,opacity:e},stroke:{color:t.width?t.color:"",width:t.width,dashType:t.dashType},zIndex:-1}));this.addBackgroundPaths(o),this.appendVisual(o)},R.prototype.pointsByCategoryIndex=function(t){var e=this.charts,o=[];if(null!==t)for(var i=0;i<e.length;i++)if("_navigator"!==e[i].pane.options.name){var r=e[i].categoryPoints[t];if(r&&r.length)for(var n=0;n<r.length;n++){var s=r[n];s&&P(s.value)&&null!==s.value&&o.push(s)}}return o},R.prototype.pointsBySeriesIndex=function(e){return this.filterPoints(function(t){return t.series.index===e})},R.prototype.pointsBySeriesName=function(e){return this.filterPoints(function(t){return t.series.name===e})},R.prototype.filterPoints=function(t){for(var e=this.charts,o=[],i=0;i<e.length;i++)for(var r=e[i].points,n=0;n<r.length;n++){var s=r[n];s&&!1!==s.visible&&t(s)&&o.push(s)}return o},R.prototype.findPoint=function(t){for(var e=this.charts,o=0;o<e.length;o++)for(var i=e[o].points,r=0;r<i.length;r++){var n=i[r];if(n&&!1!==n.visible&&t(n))return n}},R.prototype.paneByPoint=function(t){for(var e=this.panes,o=0;o<e.length;o++){var i=e[o];if(i.box.containsPoint(t))return i}},R.prototype.detachLabels=function(){var t=this.groupAxes(this.panes),e=t.x,t=t.y;this.detachAxisGroupLabels(t,e),this.detachAxisGroupLabels(e,t)},R.prototype.detachAxisGroupLabels=function(t,e){for(var o=0,i=0;i<t.length;i++){var r=t[i],n=r.pane,s=La(e,n)||e[0],s=this.createLabelAxis(r,i+o,s);s&&(o++,r=n.axes.indexOf(r)+o,n.appendAxisAt(s,r))}},R.prototype.createLabelAxis=function(t,e,o){var i=t.options.labels,r=i.position,i=i.visible;if("end"!==r&&"start"!==r||!1===i)return null;var i=this.groupAxes(this.panes),i=o.options.vertical?i.x:i.y,i=this.axisCrossingValues(o,i),r="end"===r,n=o.range(),r=r?n.max:n.min;if(_(i[e],n.min,n.max)-r==0)return null;i.splice(e+1,0,r),o.options.axisCrossingValues=i;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};var Ra,c=R;function R(t,e,o){Ra.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=o,this.originalOptions=e,this.createPanes(),this.render(),this.createCrosshairs()}function Ea(t){for(var e,o=t.length,i=0;i<o;i++){var r=t[i],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))&&(n=n?r.contentBox():r.lineBox(),e?e.wrap(n):e=n.clone())}return e||new B}function La(t,e){for(var o=0;o<t.length;o++){var i=t[o];if(i&&i.pane===e)return i}}var Ia,za=function(t){return t.reduce(function(t,e){return t.concat(e.axes)},[])};e(c,{series:[],plotArea:{margin:{}},background:"",border:{color:j,width:0},paneDefaults:{title:{}},legend:{inactiveItems:{labels:{color:"#919191"},markers:{color:"#919191"}}}});const Va=c,ja={hover:function(t,e){this._dispatchEvent(t,e,qr)},click:function(t,e){this._dispatchEvent(t,e,"plotAreaClick")}};(Ia=b.Class)&&(Ha.__proto__=Ia),((Ha.prototype=Object.create(Ia&&Ia.prototype)).constructor=Ha).prototype.aggregatePoints=function(t,e){var o,i=this._series,r=this._seriesFields,n=this._bindPoints(t||[]),t=n.dataItems[0],s={};!t||m(t)||ot(t)||((o=function(){}).prototype=t,s=new o);for(var a=0;a<r.length;a++){var p=r[a],h=this._bindField(n.values,p.canonicalName),h=p.transform(h,i,n.dataItems,e);if(!(null===h||!ut(h)||P(h.length)||h instanceof Date)){s=h;break}if(P(h)){l=void 0;c=void 0;u=void 0;d=void 0;f=void 0;g=void 0;var l=p.name;var c=s;var u=h;var d=c,f=l;if(-1<l.indexOf(".")){for(var g=l.split(".");1<g.length;)f=g.shift(),P(d[f])||(d[f]={}),d=d[f];f=g.shift()}d[f]=u}}return s},Ha.prototype._bindPoints=function(t){for(var e=this._binder,o=this._series,i=[],r=[],n=0;n<t.length;n++){var s=t[n];i.push(e.bindPoint(o,s)),r.push(o.data[s])}return{values:i,dataItems:r}},Ha.prototype._bindField=function(t,e){for(var o=[],i=t.length,r=0;r<i;r++){var n=t[r],s=n.valueFields,s=(P(s[e])?s:n.fields)[e];o.push(s)}return o};const Da=Ha;function Ha(t,e,o){Ia.call(this);var i=e.canonicalFields(t),r=e.valueFields(t),n=e.sourceFields(t,i),s=this._seriesFields=[],o=o.query(t.type),a=t.aggregate||o;this._series=t,this._binder=e;for(var p=0;p<i.length;p++){var h=i[p],l=void 0;if(ut(a))l=a[h];else{if(0!==p&&!u(h,r))break;l=a}l&&s.push({canonicalName:h,name:n[p],transform:lt(l)?l:qi[l]})}}(Ua=b.Class)&&(Fa.__proto__=Ua),((Fa.prototype=Object.create(Ua&&Ua.prototype)).constructor=Fa).prototype.register=function(t,e){for(var o=0;o<t.length;o++)this._defaults[t[o]]=e},Fa.prototype.query=function(t){return this._defaults[t]};var Ua,c=Fa;function Fa(){Ua.call(this),this._defaults={}}c.current=new c;const Na=c;(Ga=hs)&&(Wa.__proto__=Ga),((Wa.prototype=Object.create(Ga&&Ga.prototype)).constructor=Wa).prototype.createLabel=function(){var t=this.options.labels,e=x({},t,t.from),t=x({},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))},Wa.prototype._createLabel=function(t){var e=xt(t),o=this.pointData(),e=e?e(o):this.formatValue(t.format);return new ns(e,x({vertical:this.options.vertical},t),o)},Wa.prototype.reflow=function(t){this.render();var e=this.labelFrom,o=this.labelTo,i=this.value;this.box=t,e&&(e.options.aboveAxis=i.from>i.to,e.reflow(t)),o&&(o.options.aboveAxis=i.to>i.from,o.reflow(t)),this.note&&this.note.reflow(t)};var Ga,c=Wa;function Wa(){Ga.apply(this,arguments)}c.prototype.defaults=x({},c.prototype.defaults,{labels:{format:"{0} - {1}"},tooltip:{format:"{1}"}});const Xa=c;(qa=_s)&&(Za.__proto__=qa),((Za.prototype=Object.create(qa&&qa.prototype)).constructor=Za).prototype.pointType=function(){return Xa},Za.prototype.pointValue=function(t){return t.valueFields},Za.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)},Za.prototype.plotRange=function(t){return t?[t.value.from,t.value.to]:0},Za.prototype.updateRange=function(t,e){var e=e.series.axis,o=t.from,i=t.to,r=this.valueAxisRanges[e];null!==t&&m(o)&&m(i)&&((r=this.valueAxisRanges[e]=r||{min:q,max:Y}).min=Math.min(r.min,o),r.max=Math.max(r.max,o),r.min=Math.min(r.min,i),r.max=Math.max(r.max,i))},Za.prototype.aboveAxis=function(t){t=t.value;return t.from<t.to};var qa,Ya,c=Za;function Za(){qa.apply(this,arguments)}c.prototype.plotLimits=mn.prototype.plotLimits;const Qa=c;function Ka(){Ya.apply(this,arguments)}(Ya=Cn)&&(Ka.__proto__=Ya),((Ka.prototype=Object.create(Ya&&Ya.prototype)).constructor=Ka).prototype.aliasFor=function(){return this.parent};const $a=Ka;(Ja=o)&&(op.__proto__=Ja),((op.prototype=Object.create(Ja&&Ja.prototype)).constructor=op).prototype.render=function(){var t,e,o,i;this._rendered||(this._rendered=!0,t=(e=this.options).markers,e=e.labels,i=this.value,o=this.fromPoint=new $a(i,x({},this.options,{labels:e.from,markers:t.from})),i=this.toPoint=new $a(i,x({},this.options,{labels:e.to,markers:t.to})),this.copyFields(o),this.copyFields(i),this.append(o),this.append(i))},op.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())},op.prototype.createHighlight=function(){var t=new b.drawing.Group;return t.append(this.fromPoint.createHighlight()),t.append(this.toPoint.createHighlight()),t},op.prototype.highlightVisual=function(){return this.visual},op.prototype.highlightVisualArgs=function(){return{options:this.options,from:this.fromPoint.highlightVisualArgs(),to:this.toPoint.highlightVisualArgs()}},op.prototype.tooltipAnchor=function(){var t,e,o,i=this.owner.pane.clipBox();if(!i||i.overlaps(this.box))return o=(i=this.box).center(),i=this.options.vertical?(t=o.x,e=i.y1-5,D):(t=i.x2+5,e=o.y,w),{point:new O(t,e),align:{horizontal:"left",vertical:i}}},op.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},op.prototype.overlapsBox=function(t){return this.box.overlaps(t)},op.prototype.unclipElements=function(){this.fromPoint.unclipElements(),this.toPoint.unclipElements()},op.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}"})))},op.prototype.positionLabels=function(t,e){var o,i=this.options,r=i.labels,i=i.vertical;"auto"===r.position&&(i=i?e.y1<=t.y1?(o=lr,cr):(o=cr,lr):e.x1<=t.x1?(o=C,S):(o=S,C),r.from&&r.from.position||(this.fromPoint.options.labels.position=i),r.to&&r.to.position||(this.toPoint.options.labels.position=o))},op.prototype.copyFields=function(t){t.dataItem=this.dataItem,t.category=this.category,t.series=this.series,t.color=this.color,t.owner=this.owner};var Ja,tp,ep,c=op;function op(t,e){Ja.call(this),this.value=t,this.options=e,this.aboveAxis=M(this.options.aboveAxis,!0),this.tooltipTracking=!0,this.initLabelsFormat()}x(c.prototype,xn),x(c.prototype,_n),c.prototype.defaults={markers:{visible:!1,background:a,size:8,type:H,border:{width:2},opacity:1},labels:{visible:!1,margin:A(3),padding:A(4),animation:{type:sr,delay:nr},position:"auto"},notes:{label:{}},highlight:{markers:{border:{color:a,width:2}},zIndex:100},tooltip:{format:"{0} - {1}"}};const ip=c;function rp(){tp.apply(this,arguments)}(tp=Gn)&&(rp.__proto__=tp),((rp.prototype=Object.create(tp&&tp.prototype)).constructor=rp).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.toGeometryPoints(this.toPoints()))},rp.prototype.stackSegments=function(){var t=this.fromSegments;return t=this.fromSegments?t:this.fromSegments=this.segmentsFromPoints(this.toGeometryPoints(this.fromPoints().reverse()))},rp.prototype.createStroke=function(t){var e=new b.drawing.Path(t),t=new b.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)},rp.prototype.hasStackSegment=function(){return!0},rp.prototype.fromPoints=function(){return this.linePoints.map(function(t){return t.fromPoint})},rp.prototype.toPoints=function(){return this.linePoints.map(function(t){return t.toPoint})};const np=rp;function sp(){ep.apply(this,arguments)}(ep=np)&&(sp.__proto__=ep),((sp.prototype=Object.create(ep&&ep.prototype)).constructor=sp).prototype.createStrokeSegments=function(){return this.createCurveSegments(this.toPoints())},sp.prototype.stackSegments=function(){var t=this.fromSegments;return t=this.fromSegments?t:this.fromSegments=this.createCurveSegments(this.fromPoints().reverse())},sp.prototype.createCurveSegments=function(t){return(new Ii).process(this.toGeometryPoints(t))};const ap=sp;(pp=np)&&(hp.__proto__=pp),((hp.prototype=Object.create(pp&&pp.prototype)).constructor=hp).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.calculateStepPoints(this.toPoints()))},hp.prototype.stackSegments=function(){var t=this.fromSegments;return this.fromSegments||(t=this.fromSegments=this.segmentsFromPoints(this.calculateStepPoints(this.fromPoints()))).reverse(),t};var pp,c=hp;function hp(){pp.apply(this,arguments)}x(c.prototype,t);const lp=c;(cp=mn)&&(fp.__proto__=cp),((fp.prototype=Object.create(cp&&cp.prototype)).constructor=fp).prototype.render=function(){cp.prototype.render.call(this),this.renderSegments()},fp.prototype.pointType=function(){return ip},fp.prototype.createPoint=function(t,e){var o=e.categoryIx,i=e.category,r=e.series,e=e.seriesIx,n=t.valueFields;if(!Hs(n.from)&&!Hs(n.to)){if(this.seriesMissingValues(r)!==pr)return null;n={from:0,to:0}}var s=this.pointOptions(r,e),s=this.evalPointOptions(s,n,i,o,r,e),i=t.fields.color||r.color,o=(lt(r.color)&&(i=s.color),new ip(n,s));return o.color=i,this.append(o),o},fp.prototype.createSegment=function(t,e,o){var i=(e.line||{}).style;return new("smooth"===i?ap:"step"===i?lp:np)(t,e,o)},fp.prototype.plotRange=function(t,e){return t?[t.value.from,t.value.to]:[e,e]},fp.prototype.valueSlot=function(t,e){var o=t.getSlot(e[0],e[0],!this.options.clip),t=t.getSlot(e[1],e[1],!this.options.clip);if(o&&t)return{from:o,to:t}},fp.prototype.pointSlot=function(t,e){var o,i=e.from,e=e.to,i=this.options.invertAxes?(o=new B(i.x1,t.y1,i.x2,t.y2),new B(e.x1,t.y1,e.x2,t.y2)):(o=new B(t.x1,i.y1,t.x2,i.y2),new B(t.x1,e.y1,t.x2,e.y2));return{from:o,to:i}},fp.prototype.addValue=function(t,e){var o=t.valueFields;m(o.from)||(o.from=o.to),m(o.to)||(o.to=o.from),cp.prototype.addValue.call(this,t,e)},fp.prototype.updateRange=function(t,e){var o;null!==t&&m(t.from)&&m(t.to)&&(e=e.series.axis,e=this.valueAxisRanges[e]=this.valueAxisRanges[e]||{min:q,max:Y},o=t.from,t=t.to,e.min=Math.min(e.min,o,t),e.max=Math.max(e.max,o,t))},fp.prototype.formatPointValue=function(t,e){t=t.value;return this.chartService.format.auto(e,t.from,t.to)},fp.prototype.animationPoints=function(){for(var t=this.points,e=[],o=0;o<t.length;o++){var i=t[o];i&&(e.push((i.fromPoint||{}).marker),e.push((i.toPoint||{}).marker))}return e.concat(this._segments)};var cp,up,dp,t=fp;function fp(){cp.apply(this,arguments)}x(t.prototype,On,h);const gp=t;function yp(){up.apply(this,arguments)}(up=Cs)&&(yp.__proto__=up),((yp.prototype=Object.create(up&&up.prototype)).constructor=yp).prototype.reflow=function(t){var e=this.options,o=this.value,e=this.owner.seriesValueAxis(e),i=[],r=[],n=[],s=e.getSlot(o.low,o.high),a=e.getSlot(o.open,o.open),e=e.getSlot(o.close,o.close),o=(a.x1=e.x1=s.x1=t.x1,a.x2=e.x2=s.x2=t.x2,s.center().x);i.push([a.x1,a.y1]),i.push([o,a.y1]),r.push([o,e.y1]),r.push([e.x2,e.y1]),n.push([o,s.y1]),n.push([o,s.y2]),this.lines=[i,r,n],this.box=s.clone().wrap(a.clone().wrap(e)),this.reflowNote()},yp.prototype.createBody=function(){};const vp=yp;function mp(){dp.apply(this,arguments)}(dp=Ps)&&(mp.__proto__=dp),((mp.prototype=Object.create(dp&&dp.prototype)).constructor=mp).prototype.pointType=function(){return vp};const xp=mp;(_p=o)&&(wp.__proto__=_p),((wp.prototype=Object.create(_p&&_p.prototype)).constructor=wp).prototype.linePoints=function(){var t,e=this.from,o=this.from.box,i=this.to.box,r=[];return e.isVertical?(t=e.aboveAxis?o.y1:o.y2,r.push([o.x1,t],[i.x2,t])):(t=e.aboveAxis?o.x2:o.x1,r.push([t,o.y1],[t,i.y2])),r},wp.prototype.createVisual=function(){_p.prototype.createVisual.call(this);var t=this.series.line||{},t=b.drawing.Path.fromPoints(this.linePoints(),{stroke:{color:t.color,width:t.width,opacity:t.opacity,dashType:t.dashType}});st(t),this.visual.append(t)};var _p,bp,c=wp;function wp(t,e,o){_p.call(this),this.from=t,this.to=e,this.series=o}e(c,{animation:{type:sr,delay:nr}});const Cp=c;function Sp(){bp.apply(this,arguments)}(bp=_s)&&(Sp.__proto__=bp),((Sp.prototype=Object.create(bp&&bp.prototype)).constructor=Sp).prototype.render=function(){bp.prototype.render.call(this),this.createSegments()},Sp.prototype.traverseDataPoints=function(t){for(var e=this.options.series,o=yn(e),i=!this.options.invertAxes,r=0;r<e.length;r++)for(var n=e[r],s=0,a=0,p=0;p<o;p++){var h=Ki.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):m(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:i})}},Sp.prototype.updateRange=function(t,e){bp.prototype.updateRange.call(this,{value:e.to},e)},Sp.prototype.aboveAxis=function(t){return 0<=t.value},Sp.prototype.plotRange=function(t){return[t.from,t.to]},Sp.prototype.createSegments=function(){for(var t=this.options.series,e=this.seriesPoints,o=this.segments=[],i=0;i<t.length;i++){var r=t[i],n=e[i];if(n)for(var s=void 0,a=0;a<n.length;a++){var p,h=n[a];h&&s&&(p=new Cp(s,h,r),o.push(p),this.append(p)),s=h}}};const kp=Sp;var Ap,Pp,Tp=[fr,Dr,Lr,Nr],Mp=[kr,Fr].concat(Tp),h=((Ap=Va)&&(E.__proto__=Ap),((E.prototype=Object.create(Ap&&Ap.prototype)).constructor=E).prototype.initFields=function(t){if(this.namedCategoryAxes={},this.namedValueAxes={},this.valueAxisRangeTracker=new os,0<t.length){this.invertAxes=u(t[0].type,[gr,mr,Fr,Dr,Nr,Ir,Sr,Hr]);for(var e=0;e<t.length;e++){var o=t[e].stack;if(o&&"100%"===o.type){this.stack100=!0;break}}}},E.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)},E.prototype.removeAxis=function(t){var e=t.options.name;Ap.prototype.removeAxis.call(this,t),t instanceof qo?delete this.namedCategoryAxes[e]:(this.valueAxisRangeTracker.reset(e),delete this.namedValueAxes[e]),t===this.categoryAxis&&delete this.categoryAxis,t===this.valueAxis&&delete this.valueAxis},E.prototype.createCharts=function(t){for(var e=this.groupSeriesByPane(),o=0;o<t.length;o++){var i=t[o],r=e[i.options.name||"default"]||[],r=(this.addToLegend(r),this.filterVisibleSeries(r));if(r)for(var n=this.groupSeriesByCategoryAxis(r),s=0;s<n.length;s++)this.createChartGroup(n[s],i)}},E.prototype.createChartGroup=function(t,e){this.createAreaChart(Sa(t,[fr,Dr]),e),this.createRangeAreaChart(Sa(t,[Lr,Nr]),e),this.createBarChart(Sa(t,[_r,gr]),e),this.createRangeBarChart(Sa(t,[zr,Ir]),e),this.createBulletChart(Sa(t,[mr,Ur]),e),this.createCandlestickChart(Sa(t,xr),e),this.createBoxPlotChart(Sa(t,[yr,Hr]),e),this.createOHLCChart(Sa(t,Ar),e),this.createWaterfallChart(Sa(t,[Gr,Sr]),e),this.createLineChart(Sa(t,[kr,Fr]),e)},E.prototype.aggregateCategories=function(t){var e=this.srcSeries||this.series,o=[];this._currentPointsCache={},this._seriesPointsCache=this._seriesPointsCache||{};for(var i=0;i<e.length;i++){var r=e[i],n=this.seriesCategoryAxis(r),s=this.findPane(n.options.pane),r=(Ca(n.options.type,F)||r.categoryField)&&u(s,t)?this.aggregateSeries(r,n):this.filterSeries(r,n);o.push(r)}this._seriesPointsCache=this._currentPointsCache,this._currentPointsCache=null,this.srcSeries=e,this.series=o},E.prototype.filterSeries=function(e,o){var t=(e.data||{}).length;if(o._seriesMax=Math.max(o._seriesMax||0,t),!m(o.options.min)&&!m(o.options.max))return e;var i=o.currentRangeIndices(),r=u(e.type,Mp),n=x({},e);return n.data=(n.data||[]).slice(i.min,i.max+1),r&&Ba(n,i,t,function(t){return{item:e.data[t],category:o.categoryAt(t,!0),categoryIx:t-i.min}},function(t){return P(e.data[t])}),n},E.prototype.clearSeriesPointsCache=function(){this._seriesPointsCache={}},E.prototype.seriesSourcePoints=function(t,e){var o=t.index+";"+e.categoriesHash();if(this._seriesPointsCache[o])return this._currentPointsCache[o]=this._seriesPointsCache[o],this._seriesPointsCache[o];var i=e.options,r=i.srcCategories,i=Ca(i.type,F),n=t.data,s=i?ka:Yi,a=[];i||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];P(l)&&null!==l&&(a[h=e.totalIndex(l)]=a[h]||{items:[],category:l},a[h].items.push(p))}return this._currentPointsCache[o]=a},E.prototype.aggregateSeries=function(t,i){if(!t.data.length)return t;for(var r=this.seriesSourcePoints(t,i),e=x({},t),n=new Da(x({},t),Ki.current,Na.current),o=e.data=[],s=i.options.dataItems||[],a=i.currentRangeIndices(),p=function(t){var e=t-a.min,o=r[t];return(o=o||(r[t]={})).categoryIx=e,o.item||(e=i.categoryAt(t,!0),o.category=e,o.item=n.aggregatePoints(o.items,e)),o},h=a.min;h<=a.max;h++){var l=p(h);o[l.categoryIx]=l.item,l.items&&l.items.length&&(s[l.categoryIx]=l.item)}return u(e.type,Mp)&&Ba(e,a,i.totalCount(),p,function(t){return r[t]}),i.options.dataItems=s,e},E.prototype.appendChart=function(t,e){var o=t.options.series,i=this.seriesCategoryAxis(o[0]),r=i.options.categories,n=Math.max(0,yn(o)-r.length);if(0<n)for(r=i.options.categories=i.options.categories.slice(0);n--;)r.push("");this.valueAxisRangeTracker.update(t.valueAxisRanges),Ap.prototype.appendChart.call(this,t,e)},E.prototype.seriesPaneName=function(t){var e=this.options,o=t.axis,t=Ct([].concat(e.valueAxis),function(t){return t.name===o})[0],e=((e.panes||[{}])[0]||{}).name||"default";return(t||{}).pane||e},E.prototype.seriesCategoryAxis=function(t){var t=t.categoryAxis,e=t?this.namedCategoryAxes[t]:this.categoryAxis;if(e)return e;throw new Error("Unable to locate category axis with name "+t)},E.prototype.stackableChartOptions=function(t,e){t=t.stack;return{isStacked:t,isStacked100:t&&"100%"===t.type,clip:e.options.clip}},E.prototype.groupSeriesByCategoryAxis=function(t){for(var e=[],o={},i=0;i<t.length;i++){var r=t[i].categoryAxis||"$$default$$";o.hasOwnProperty(r)||(o[r]=!0,e.push(r))}for(var n=[],s=0;s<e.length;s++){var a=function(t,e,o){return Ct(t,function(t){return 0===o&&!t.categoryAxis||t.categoryAxis===e})}(t,e[s],s);0!==a.length&&n.push(a)}return n},E.prototype.createBarChart=function(t,e){var o;0!==t.length&&(o=t[0],t=new _s(this,Object.assign({series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing},this.stackableChartOptions(o,e))),this.appendChart(t,e))},E.prototype.createRangeBarChart=function(t,e){var o;0!==t.length&&(o=t[0],t=new Qa(this,{series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing}),this.appendChart(t,e))},E.prototype.createBulletChart=function(t,e){var o;0!==t.length&&(o=t[0],t=new ra(this,{series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing,clip:e.options.clip}),this.appendChart(t,e))},E.prototype.createLineChart=function(t,e){var o;0!==t.length&&(o=t[0],t=new Fn(this,Object.assign({invertAxes:this.invertAxes,series:t},this.stackableChartOptions(o,e))),this.appendChart(t,e))},E.prototype.createAreaChart=function(t,e){var o;0!==t.length&&(o=t[0],t=new ts(this,Object.assign({invertAxes:this.invertAxes,series:t},this.stackableChartOptions(o,e))),this.appendChart(t,e))},E.prototype.createRangeAreaChart=function(t,e){0!==t.length&&(t=new gp(this,{invertAxes:this.invertAxes,series:t,clip:e.options.clip}),this.appendChart(t,e))},E.prototype.createOHLCChart=function(t,e){var o;0!==t.length&&(o=t[0],t=new xp(this,{invertAxes:this.invertAxes,gap:o.gap,series:t,spacing:o.spacing,clip:e.options.clip}),this.appendChart(t,e))},E.prototype.createCandlestickChart=function(t,e){var o;0!==t.length&&(o=t[0],t=new Ps(this,{invertAxes:this.invertAxes,gap:o.gap,series:t,spacing:o.spacing,clip:e.options.clip}),this.appendChart(t,e))},E.prototype.createBoxPlotChart=function(t,e){var o;0!==t.length&&(o=t[0],t=new Vs(this,{invertAxes:this.invertAxes,gap:o.gap,series:t,spacing:o.spacing,clip:e.options.clip}),this.appendChart(t,e))},E.prototype.createWaterfallChart=function(t,e){var o;0!==t.length&&(o=t[0],t=new kp(this,{series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing}),this.appendChart(t,e))},E.prototype.axisRequiresRounding=function(t,e){for(var o=Sa(this.series,Wr),i=0;i<this.series.length;i++){var r,n=this.series[i];!u(n.type,Tp)||(r=n.line)&&r.style===dr&&o.push(n)}for(var s=0;s<o.length;s++){var a=o[s].categoryAxis||"";if(a===t||!a&&0===e)return!0}},E.prototype.aggregatedAxis=function(t,e){for(var o=this.series,i=0;i<o.length;i++){var r=o[i].categoryAxis||"";if((r===t||!r&&0===e)&&o[i].categoryField)return!0}},E.prototype.createCategoryAxesLabels=function(){for(var t=this.axes,e=0;e<t.length;e++)t[e]instanceof qo&&t[e].createLabels()},E.prototype.createCategoryAxes=function(t){for(var e=this.invertAxes,o=[].concat(this.options.categoryAxis),i=[],r=0;r<o.length;r++){var n=o[r];if(u(this.findPane(n.pane),t)){var s=n.name,a=n.categories,p=(void 0===a&&(a=[]),n=x({vertical:e,reverse:!e&&this.chartService.rtl,axisCrossingValue:e?q:0},n),P(n.justified)||(n.justified=this.isJustified()),this.axisRequiresRounding(s,r)&&(n.justified=!1),void 0),p=new(Aa(n,a[0])?ei:qo)(n,this.chartService);if(o[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,i.push(p),this.appendAxis(p)}}var h=this.categoryAxis||i[0];this.categoryAxis=h,e?this.axisY=h:this.axisX=h},E.prototype.isJustified=function(){for(var t=this.series,e=0;e<t.length;e++)if(!u(t[e].type,Tp))return!1;return!0},E.prototype.createValueAxes=function(t){var e=this.valueAxisRangeTracker,o=e.query(),i=[].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<i.length;a++){var p=i[a];if(u(this.findPane(p.pane),t)){var h=p.name,l=Ca(p.type,an)?{min:.1,max:1}:{min:0,max:1},l=e.query(h)||o||l,l=(0===a&&l&&o&&(l.min=Math.min(l.min,o.min),l.max=Math.max(l.max,o.max)),new(Ca(p.type,an)?vi:hi)(l.min,l.max,x({},n,p),this.chartService));if(h){if(this.namedValueAxes[h])throw new Error("Value axis with name "+h+" is already defined");this.namedValueAxes[h]=l}l.axisIndex=a,s.push(l),this.appendAxis(l)}}var c=this.valueAxis||s[0];this.valueAxis=c,r?this.axisX=c:this.axisY=c},E.prototype._dispatchEvent=function(t,e,o){var i=t._eventCoordinates(e),r=new O(i.x,i.y),i=this.pointPane(r),n=[],s=[];if(i){for(var a=i.axes,p=0;p<a.length;p++){var h=a[p];h.getValue?_a(s,h.getValue(r)):_a(n,h.getCategory(r))}0===n.length&&_a(n,this.categoryAxis.getCategory(r)),0<n.length&&0<s.length&&t.trigger(o,{element:Ht(e),originalEvent:e,category:Pa(n),value:Pa(s)})}},E.prototype.pointPane=function(t){for(var e=this.panes,o=0;o<e.length;o++){var i=e[o];if(i.contentBox.containsPoint(t))return i}},E.prototype.updateAxisOptions=function(t,e){Op(this.options,t,e),Op(this.originalOptions,t,e)},E);function E(){Ap.apply(this,arguments)}function Op(t,e,o){x([].concat(e instanceof qo?t.categoryAxis:t.valueAxis)[e.axisIndex],o)}e(h,{categoryAxis:{},valueAxis:{}}),x(h.prototype,ja);const Bp=h;function Rp(){Pp.call(this),this._points=[]}function Ep(){this._defaultPrevented=!0}(Pp=b.Class)&&(Rp.__proto__=Pp),((Rp.prototype=Object.create(Pp&&Pp.prototype)).constructor=Rp).prototype.destroy=function(){this._points=[]},Rp.prototype.show=function(t,e){var o=[].concat(t);this.hide();for(var i=0;i<o.length;i++){var r=o[i];r&&r.toggleHighlight&&r.hasHighlight()&&(this.togglePointHighlight(r,!0,e),this._points.push(r))}},Rp.prototype.togglePointHighlight=function(t,e,o){var i=(t.options.highlight||{}).toggle;i?(i(i={category:t.category,series:t.series,dataItem:t.dataItem,value:t.value,stackValue:t.stackValue,preventDefault:Ep,visual:t.highlightVisual(),show:e}),i._defaultPrevented||t.toggleHighlight(e,o)):t.toggleHighlight(e,o)},Rp.prototype.hide=function(){for(var t=this._points;t.length;)this.togglePointHighlight(t.pop(),!1)},Rp.prototype.isHighlighted=function(t){for(var e=this._points,o=0;o<e.length;o++)if(t===e[o])return!0;return!1};const Lp=Rp;function Ip(t,e){e=(e||"").toLowerCase(),t=t.event;return"none"===e&&!(t.ctrlKey||t.shiftKey||t.altKey)||t[e+"Key"]}function zp(t){for(var e={},o=0;o<t.length;o++){var i=t[o];i.axis.options.name&&(e[i.axis.options.name]={min:i.range.min,max:i.range.max})}return e}(Vp=b.Class)&&(jp.__proto__=Vp),((jp.prototype=Object.create(Vp&&Vp.prototype)).constructor=jp).prototype.start=function(t){return this._active=Ip(t,this.options.key),this._active},jp.prototype.move=function(t){if(this._active){t=this.axisRanges=this._panAxes(t,y).concat(this._panAxes(t,v));if(t.length)return zp(this.axisRanges=t)}},jp.prototype.end=function(){var t=this._active;return this._active=!1,t},jp.prototype.pan=function(){var t=this.plotArea,e=this.axisRanges;if(e.length){for(var o=0;o<e.length;o++){var i=e[o];t.updateAxisOptions(i.axis,i.range)}t.redraw(t.panes)}},jp.prototype.destroy=function(){delete this.plotArea},jp.prototype._panAxes=function(t,e){var o=this.plotArea,i=-t[e].delta,t=(this.options.lock||"").toLowerCase(),r=[];if(0!=i&&(t||"").toLowerCase()!==e)for(var n=o.axes,s=0;s<n.length;s++){var a,p=n[s];!(e===y&&!p.options.vertical||e===v&&p.options.vertical)||(a=p.pan(i))&&(a.limitRange=!0,r.push({axis:p,range:a}))}return r};var Vp,t=jp;function jp(t,e){Vp.call(this),this.plotArea=t,this.options=x({},this.options,e)}t.prototype.options={key:"none",lock:"none"};const Dp=t;(Hp=b.Class)&&(Gp.__proto__=Hp),((Gp.prototype=Object.create(Hp&&Hp.prototype)).constructor=Gp).prototype.createElement=function(){var t=this._marquee=document.createElement("div"),e=(t.className="k-marquee",document.createElement("div"));e.className="k-marquee-color",t.appendChild(e)},Gp.prototype.removeElement=function(){this._marquee.parentNode&&this._marquee.parentNode.removeChild(this._marquee)},Gp.prototype.setStyles=function(t){gt(this._marquee,t)},Gp.prototype.start=function(t){if(Ip(t,this.options.key)){var e=this.chart,o=e._eventCoordinates(t),e=this._zoomPane=e._plotArea.paneByPoint(o),o=e?e.chartsBox().clone():null;if(e&&o)return e=this._elementOffset(),o.translate(e.left,e.top),this._zoomPaneClipBox=o,document.body.appendChild(this._marquee),this.setStyles({left:t.pageX+1,top:t.pageY+1,width:0,height:0}),!0}return!1},Gp.prototype._elementOffset=function(){var t=this.chart.element,e=gt(t,["paddingLeft","paddingTop"]),o=e.paddingLeft,e=e.paddingTop,t=Vt(t);return{left:o+t.left,top:e+t.top}},Gp.prototype.move=function(t){this._zoomPane&&this.setStyles(this._selectionPosition(t))},Gp.prototype.end=function(t){var e;if(this._zoomPane)return e=this._elementOffset(),(t=this._selectionPosition(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},this._updateAxisRanges(e,t),this.removeElement(),delete this._zoomPane,zp(this.axisRanges)},Gp.prototype.zoom=function(){var t=this.axisRanges;if(t&&t.length){for(var e=this.chart._plotArea,o=0;o<t.length;o++){var i=t[o];e.updateAxisOptions(i.axis,i.range)}e.redraw(e.panes)}},Gp.prototype.destroy=function(){this.removeElement(),delete this._marquee,delete this.chart},Gp.prototype._updateAxisRanges=function(t,e){for(var o=(this.options.lock||"").toLowerCase(),i=[],r=this._zoomPane.axes,n=0;n<r.length;n++){var s=r[n],a=s.options.vertical;o===y&&!a||o===v&&a||!P(s.axisIndex)||(a=s.pointsRange(t,e))&&i.push({axis:s,range:a})}this.axisRanges=i},Gp.prototype._selectionPosition=function(t){var e=this._zoomPaneClipBox,o={x:t.x.startLocation,y:t.y.startLocation},i=t.x.location,t=t.y.location,r=(this.options.lock||"").toLowerCase(),n=Math.min(o.x,i),s=Math.min(o.y,t),a=Math.abs(o.x-i),p=Math.abs(o.y-t);return r===y&&(n=e.x1,a=e.width()),r===v&&(s=e.y1,p=e.height()),i>e.x2&&(a=e.x2-o.x),i<e.x1&&(a=o.x-e.x1),t>e.y2&&(p=e.y2-o.y),t<e.y1&&(p=o.y-e.y1),{left:Math.max(n,e.x1),top:Math.max(s,e.y1),width:a,height:p}};var Hp,Up,Fp,Np,c=Gp;function Gp(t,e){Hp.call(this),this.chart=t,this.options=x({},this.options,e),this.createElement()}c.prototype.options={key:"shift",lock:"none"};const Wp=c;function Xp(t,e){Up.call(this),this.chart=t,this.options=x({rate:.3},this.options,e)}(Up=b.Class)&&(Xp.__proto__=Up),((Xp.prototype=Object.create(Up&&Up.prototype)).constructor=Xp).prototype.updateRanges=function(t,e){for(var o=(this.options.lock||"").toLowerCase(),i=[],r=this.chart._plotArea.axes,n=0;n<r.length;n++){var s=r[n],a=s.options.vertical;o===y&&!a||o===v&&a||!s.zoomRange||(a=_(this.options.rate,.01,.9),(a=s.zoomRange(-t*a,e))&&i.push({axis:s,range:a}))}return zp(this.axisRanges=i)},Xp.prototype.zoom=function(){var t=this.axisRanges,e=this.chart._plotArea;if(t&&t.length&&e.updateAxisOptions){for(var o=0;o<t.length;o++){var i=t[o];e.updateAxisOptions(i.axis,i.range)}e.redraw(e.panes)}},Xp.prototype.destroy=function(){delete this.chart};const qp=Xp;function Yp(t,e){Fp.call(this,t),this.chartService=e}(Fp=o)&&(Yp.__proto__=Fp),((Yp.prototype=Object.create(Fp&&Fp.prototype)).constructor=Yp).prototype.render=function(){var t=this.children,e=this.options,o=e.vertical;this.visual=new b.drawing.Layout(null,{spacing:o?0:e.spacing,lineSpacing:o?e.spacing:0,orientation:o?"vertical":"horizontal",reverse:e.rtl,alignItems:o?"start":"center"});for(var i=0;i<t.length;i++){var r=t[i];r.reflow(new B),r.renderVisual()}},Yp.prototype.reflow=function(t){this.visual.rect(t.toRect()),this.visual.reflow();t=this.visual.clippedBBox();this.box=t?Ue(t):new B},Yp.prototype.renderVisual=function(){this.addVisual()},Yp.prototype.createVisual=function(){};const Zp=Yp;function Qp(t){Np.call(this,t),this.createContainer(),t.rtl?(this.createLabel(),this.createMarker()):(this.createMarker(),this.createLabel())}(Np=Ae)&&(Qp.__proto__=Np),((Qp.prototype=Object.create(Np&&Np.prototype)).constructor=Qp).prototype.createContainer=function(){this.container=new ze({vertical:!1,wrap:!1,align:w,spacing:this.options.spacing}),this.append(this.container)},Qp.prototype.createMarker=function(){this.container.append(new Me(this.markerOptions()))},Qp.prototype.markerOptions=function(){var t=this.options,e=t.markerColor;return x({},t.markers,{background:e,border:{color:e}})},Qp.prototype.createLabel=function(){var t=this.options,e=x({},t.labels);this.container.append(new We(t.text,e))},Qp.prototype.renderComplete=function(){Np.prototype.renderComplete.call(this);var t=this.options.cursor||{},t=this._itemOverlay=b.drawing.Path.fromRect(this.container.box.toRect(),{fill:{color:a,opacity:0},stroke:null,cursor:t.style||t});this.appendVisual(t)},Qp.prototype.click=function(t,e){var o=this.eventArgs(e);!t.trigger("legendItemClick",o)&&e&&"contextmenu"===e.type&&e.preventDefault()},Qp.prototype.over=function(t,e){e=this.eventArgs(e);return t.trigger("legendItemHover",e)||t._legendItemHover(e.seriesIndex,e.pointIndex),!0},Qp.prototype.out=function(t,e){t._unsetActivePoint(),t.trigger("legendItemLeave",this.eventArgs(e))},Qp.prototype.eventArgs=function(t){var e=this.options;return{element:Ht(t),text:e.text,series:e.series,seriesIndex:e.series.index,pointIndex:e.pointIndex}},Qp.prototype.renderVisual=function(){var e=this,t=this.options,o=t.visual;o?(this.visual=o({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()):Np.prototype.renderVisual.call(this)};const Kp=Qp;var $p,Jp="horizontal",th="custom",h=(($p=o)&&(eh.__proto__=$p),((eh.prototype=Object.create($p&&$p.prototype)).constructor=eh).prototype.createContainers=function(){var t=this.options,e=t.position,o=t.align,i=e,r=w;e===th?i=C:u(e,[k,D])?(i="start"===o?C:"end"===o?S:w,r=e):o&&("start"===o?r=k:"end"===o&&(r=D)),this.container=new Ae({margin:t.margin,padding:t.padding,background:t.background,border:t.border,vAlign:r,align:i,zIndex:t.zIndex,shrinkToFit:!0}),this.hasTitle()?this.itemsContainer=new Ae({vAlign:r,align:i,zIndex:t.zIndex,shrinkToFit:!0}):this.itemsContainer=this.container,this.append(this.container)},eh.prototype.createItems=function(){for(var t=this.getService(),e=this.options,o=this.isVertical(),i=new Zp({vertical:o,spacing:e.spacing,rtl:t.rtl},t),r=e.items,n=(r=e.reverse?r.slice(0).reverse():r).length,s=0;s<n;s++){var a=r[s];i.append(new Kp(x({},{markers:e.markers,labels:e.labels,rtl:t.rtl},e.item,a)))}i.render(),this.itemsContainer.append(i)},eh.prototype.isVertical=function(){var t=this.options,e=t.orientation,t=t.position;return t===th&&e!==Jp||(P(e)?e!==Jp:u(t,[C,S]))},eh.prototype.hasItems=function(){return 0<this.container.children[0].children.length},eh.prototype.reflow=function(t){var e=this.options,t=t.clone();this.hasItems()?(e.position===th?(this.containerCustomReflow(t),this.box=t):this.containerReflow(t),this.hasTitle()&&this.title.reflow(new B(this.container.box.x1,this.title.box.y1,this.container.box.x2,this.title.box.y2))):this.box=t},eh.prototype.containerReflow=function(t){var e=this.options,o=this.container,i=e.position,r=e.width,n=e.height,s=i===k||i===D?y:v,a=this.isVertical(),p=t.clone(),h=t.clone(),i=(i!==C&&i!==S||(h.y1=p.y1=0),a&&n?(h.y2=h.y1+n,h.align(p,v,o.options.vAlign)):!a&&r&&(h.x2=h.x1+r,h.align(p,y,o.options.align)),o.reflow(h),(h=o.box).clone());(e.offsetX||e.offsetY)&&(h.translate(e.offsetX,e.offsetY),o.reflow(h)),i[s+1]=t[s+1],i[s+2]=t[s+2],this.box=i},eh.prototype.containerCustomReflow=function(t){var e=this.options,o=this.container,i=e.offsetX,r=e.offsetY,n=e.width,e=e.height,s=this.isVertical(),t=t.clone();s&&e?t.y2=t.y1+e:!s&&n&&(t.x2=t.x1+n),o.reflow(t),t=o.box,o.reflow(new B(i,r,i+t.width(),r+t.height()))},eh.prototype.renderVisual=function(){this.hasItems()&&$p.prototype.renderVisual.call(this)},eh.prototype.createLegendTitle=function(t){var e=x({},{color:j,position:k,align:w},t),o=e.text;t&&!1!==t.visible&&(P(e)&&e.visible&&((t=xt(e))?o=t({text:o}):e.format&&(o=this.chartService.format.auto(e.format,o))),this.title=new We(o,e),this.createTitleLayout(),this.appendTitleLayoutContent())},eh.prototype.createTitleLayout=function(){this.layout=new ze({vertical:!0,wrap:!1}),this.container.append(this.layout)},eh.prototype.hasTitle=function(){return Boolean(this.options.title&&!1!==this.options.title.visible)},eh.prototype.appendTitleLayoutContent=function(){this.options.title.position===D?(this.layout.append(this.itemsContainer),this.layout.append(this.title)):(this.layout.append(this.title),this.layout.append(this.itemsContainer))},eh);function eh(t,e){void 0===e&&(e={}),$p.call(this,t),this.chartService=e,u(this.options.position,[k,S,D,C,th])||(this.options.position=S),this.createContainers(),this.createLegendTitle(t.title),this.createItems()}e(h,{position:S,items:[],offsetX:0,offsetY:0,margin:A(5),padding:A(5),border:{color:j,width:0},item:{cursor:"pointer",spacing:6},spacing:6,background:"",zIndex:1,markers:{border:{width:0},width:15,height:3,type:"rect",align:C,vAlign:w}});const oh=h;(ih=b.Class)&&(rh.__proto__=ih),((rh.prototype=Object.create(ih&&ih.prototype)).constructor=rh).prototype.register=function(t,e){this._registry.push({type:t,seriesTypes:e})},rh.prototype.create=function(t,e,o){for(var i,r=this._registry,n=r[0],s=0;s<r.length;s++){var a=r[s];if(0<(i=Sa(t,a.seriesTypes)).length){n=a;break}}return new n.type(i,e,o)};var ih,t=rh;function rh(){ih.call(this),this._registry=[]}t.current=new t;const nh=t;function sh(t){var e=document.createElement("div");return t&&(e.className=t),e}function ah(t){for(var e=t;e&&!St(e,"k-handle");)e=e.parentNode;return e}(ph=b.Class)&&(lh.__proto__=ph),((lh.prototype=Object.create(ph&&ph.prototype)).constructor=lh).prototype.onPane=function(t){return this.categoryAxis.pane===t},lh.prototype.createElements=function(){var t=this.options,e=this.wrapper=sh("k-selector"),o=(gt(e,{top:t.offset.top,left:t.offset.left,width:t.width,height:t.height,direction:"ltr"}),this.selection=sh("k-selection")),i=(this.leftMask=sh("k-mask"),this.rightMask=sh("k-mask"),e.appendChild(this.leftMask),e.appendChild(this.rightMask),e.appendChild(o),o.appendChild(sh("k-selection-bg")),this.leftHandle=sh("k-handle k-left-handle")),r=this.rightHandle=sh("k-handle k-right-handle"),o=(i.appendChild(sh()),r.appendChild(sh()),o.appendChild(i),o.appendChild(r),this.chartElement.appendChild(e),gt(o,["borderLeftWidth","borderRightWidth","height"])),n=gt(i,"height").height,s=gt(r,"height").height;t.selection={border:{left:o.borderLeftWidth,right:o.borderRightWidth}},gt(i,{top:(o.height-n)/2}),gt(r,{top:(o.height-s)/2}),e.style.cssText=e.style.cssText},lh.prototype.bindEvents=function(){var t;!1!==this.options.mousewheel&&(this._mousewheelHandler=this._mousewheel.bind(this),It(this.wrapper,((t={})[ln]=this._mousewheelHandler,t))),this._domEvents=co.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)})},lh.prototype.initOptions=function(){var t=this.options,e=this.categoryAxis.pane.chartsBox(),o=this.chart.chartService.intl,o=(this._dateAxis&&x(t,{min:No(o,t.min),max:No(o,t.max),from:No(o,t.from),to:No(o,t.to)}),gt(this.chartElement,["paddingLeft","paddingTop"])),i=o.paddingLeft,o=o.paddingTop;this.options=x({},{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)},lh.prototype.destroy=function(){var t;this._domEvents&&(this._domEvents.destroy(),delete this._domEvents),clearTimeout(this._mwTimeout),this._state=null,this.wrapper&&(this._mousewheelHandler&&(Wt(this.wrapper,((t={})[ln]=this._mousewheelHandler,t)),this._mousewheelHandler=null),this.chartElement.removeChild(this.wrapper),this.wrapper=null)},lh.prototype._rangeEventArgs=function(t){return{axis:this.categoryAxis.options,from:this._value(t.from),to:this._value(t.to)}},lh.prototype._start=function(t){var e=this.options,o=Ht(t);!this._state&&o&&(this.chart._unsetActivePoint(),this._state={moveTarget:ah(o)||o,startLocation:t.x?t.x.location:0,range:{from:this._index(e.from),to:this._index(e.to)}},o=this._rangeEventArgs({from:this._index(e.from),to:this._index(e.to)}),this.trigger(en,o)&&(this._state=null))},lh.prototype._press=function(t){(t=this._state?this._state.moveTarget:ah(Ht(t)))&&it(t,"k-handle-active")},lh.prototype._move=function(t){var e,o,i,r,n,s,a,p,h,l,c,u;this._state&&(l=this._state,a=this.options,c=this.categoryAxis,e=l.range,o=l.moveTarget,i=c.options.reverse,r=this._index(a.from),n=this._index(a.to),s=this._index(a.min),a=this._index(a.max),l=l.startLocation-t.x.location,t=e.from,p=e.to,h=e.to-e.from,c=gt(this.wrapper,"width").width/(c.categoriesCount()-1),l=Math.round(l/c)*(i?-1:1),o&&(c=St(o,"k-left-handle"),u=St(o,"k-right-handle"),St(o,"k-selection k-selection-bg")?(e.from=Math.min(Math.max(s,r-l),a-h),e.to=Math.min(e.from+h,a)):c&&!i||u&&i?(e.from=Math.min(Math.max(s,r-l),a-1),e.to=Math.max(e.from+1,e.to)):(c&&i||u&&!i)&&(e.to=Math.min(Math.max(s+1,n-l),a),e.from=Math.min(e.to-1,e.from)),e.from===t&&e.to===p||(this.move(e.from,e.to),this.trigger(on,this._rangeEventArgs(e)))))},lh.prototype._end=function(){var t;this._state&&((t=this._state.moveTarget)&&nt(t,"k-handle-active"),t=this._state.range,this.set(t.from,t.to),this.trigger(rn,this._rangeEventArgs(t)),delete this._state)},lh.prototype._tap=function(t){var e=this.options,o=this.categoryAxis,i=this.chart._eventCoordinates(t),i=o.pointCategoryIndex(new O(i.x,o.box.y1)),r=this._index(e.from),n=this._index(e.to),s=this._index(e.min),e=this._index(e.max),n=n-r,a={},p=3===t.event.which,i=Math.round(r+n/2-i);this._state||p||(this.chart._unsetActivePoint(),o.options.justified||i--,a.from=Math.min(Math.max(s,r-i),e-n),a.to=Math.min(a.from+n,e),this._start(t),this._state&&(this._state.range=a,this.trigger(on,this._rangeEventArgs(a)),this._end()))},lh.prototype._mousewheel=function(t){var e,o=this,i=Rt(t);this._start({target:this.selection}),this._state&&(e=this._state.range,t.preventDefault(),t.stopPropagation(),1<Math.abs(i)&&(i*=3),this.options.mousewheel.reverse&&(i*=-1),this.expand(i)&&this.trigger(on,{axis:this.categoryAxis.options,delta:i,originalEvent:t,from:this._value(e.from),to:this._value(e.to)}),this._mwTimeout&&clearTimeout(this._mwTimeout),this._mwTimeout=setTimeout(function(){o._end()},150))},lh.prototype._gesturestart=function(t){var e=this.options,e=(this._state={range:{from:this._index(e.from),to:this._index(e.to)}},this._rangeEventArgs(this._state.range));this.trigger(en,e)?this._state=null:t.preventDefault()},lh.prototype._gestureend=function(){this._state&&(this.trigger(rn,this._rangeEventArgs(this._state.range)),delete this._state)},lh.prototype._gesturechange=function(t){var e=this.chart,o=this._state,i=this.options,r=this.categoryAxis,o=o.range,n=e._toModelCoordinates(t.touches[0].x.location).x,e=e._toModelCoordinates(t.touches[1].x.location).x,s=Math.min(n,e),n=Math.max(n,e);t.preventDefault(),o.from=r.pointCategoryIndex(new O(s))||i.min,o.to=r.pointCategoryIndex(new O(n))||i.max,this.move(o.from,o.to),this.trigger(on,this._rangeEventArgs(o))},lh.prototype._index=function(t){var e=t;return e=t instanceof Date?this.categoryAxis.categoryIndex(t):e},lh.prototype._value=function(t){var e=t;return e=this._dateAxis&&(e=this.categoryAxis.categoryAt(t))>this.options.max?this.options.max:e},lh.prototype._slot=function(t){var e=this.categoryAxis,t=this._index(t);return e.getSlot(t,t,!0)},lh.prototype.move=function(t,e){var o=this.options,i=this.categoryAxis.options.reverse,r=o.offset,n=o.padding,s=o.selection.border,a=i?t:e,p="x"+(i?2:1),i=this._slot(i?e:t),e=T(i[p]-r.left+n.left),t=(gt(this.leftMask,{width:e}),gt(this.selection,{left:e}),i=this._slot(a),T(o.width-(i[p]-r.left+n.left))),a=(gt(this.rightMask,{width:t}),o.width-t);a!==o.width&&(a+=s.right),gt(this.rightMask,{left:a}),gt(this.selection,{width:Math.max(o.width-(e+t)-s.right,0)})},lh.prototype.set=function(t,e){var o=this.options,i=this._index(o.min),r=this._index(o.max),t=_(this._index(t),i,r),i=_(this._index(e),t+1,r);o.visible&&this.move(t,i),o.from=this._value(t),o.to=this._value(i)},lh.prototype.expand=function(t){var e=this.options,o=this._index(e.min),i=this._index(e.max),r=e.mousewheel.zoom,n=this._index(e.from),e=this._index(e.to),s={from:n,to:e},a=x({},s);if(this._state&&(s=this._state.range),r!==S&&(s.from=_(_(n-t,0,e-1),o,i)),r!==C&&(s.to=_(_(e+t,s.from+1,i),o,i)),s.from!==a.from||s.to!==a.to)return this.set(s.from,s.to),!0},lh.prototype.zoom=function(t,e){var o=this.options,i=this._index(o.min),r=this._index(o.max),n=this._index(o.from),o=this._index(o.to),s={from:n,to:o},a=x({},s),p=this.categoryAxis.options.reverse,p=y+(p?"2":"1"),h=this.categoryAxis.lineBox(),p=Math.abs(h[p]-e.x),e=h.width(),h=T(p/e,2),p=T(h*t),e=T((1-h)*t);if((s=this._state?this._state.range:s).from=_(_(n-p,0,o-1),i,r),s.to=_(_(o+e,s.from+1,r),i,r),s.from!==a.from||s.to!==a.to)return this.set(s.from,s.to),!0},lh.prototype.trigger=function(t,e){return(this.observer||this.chart).trigger(t,e)};var ph,hh,c=lh;function lh(t,e,o,i){ph.call(this);var r=t.element;this.options=x({},this.options,o),this.chart=t,this.observer=i,this.chartElement=r,this.categoryAxis=e,this._dateAxis=this.categoryAxis instanceof ei,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())}e(c,{visible:!0,mousewheel:{zoom:"both"},min:Y,max:q});const ch=c;function uh(){hh.apply(this,arguments)}(hh=l)&&(uh.__proto__=hh),((uh.prototype=Object.create(hh&&hh.prototype)).constructor=uh).prototype.show=function(t){var e,o;!t||!t.tooltipAnchor||this._current&&this._current===t||(e=x({},this.options,t.options.tooltip),(o=t.tooltipAnchor())?(this._current=t,hh.prototype.show.call(this,{point:t,anchor:o},e,t)):this.hide())},uh.prototype.hide=function(){delete this._current,hh.prototype.hide.call(this)};const dh=uh;(fh=l)&&(gh.__proto__=fh),((gh.prototype=Object.create(fh&&fh.prototype)).constructor=gh).prototype.showAt=function(t,e){var o,i=Ct(t,function(t){t=t.series.tooltip;return!t||!1!==t.visible});0<i.length&&(i=i[0],o=this.plotArea.categoryAxis.getSlot(i.categoryIx),e=e?this._slotAnchor(e,o):this._defaultAnchor(i,o),this.show({anchor:e,shared:!0,points:t,category:i.category,categoryText:this.formatService.auto(this.options.categoryFormat,i.category),series:this.plotArea.series},this.options))},gh.prototype._slotAnchor=function(t,e){return this.plotArea.categoryAxis.options.vertical||(t.x=e.center().x),{point:t,align:{horizontal:"left",vertical:"center"}}},gh.prototype._defaultAnchor=function(t,e){var t=t.owner.pane.chartsBox(),o=this.plotArea.categoryAxis.options.vertical,t=t.center(),e=e.center();return{point:o?new O(t.x,e.y):new O(e.x,t.y),align:{horizontal:"center",vertical:"center"}}};var fh,h=gh;function gh(t,e){fh.call(this,t.chartService,e),this.plotArea=t,this.formatService=t.chartService.format}e(h,{categoryFormat:"{0:d}"});const yh=h;(vh=b.drawing.Animation)&&(mh.__proto__=vh),((mh.prototype=Object.create(vh&&vh.prototype)).constructor=mh).prototype.setup=function(){var t,e=this.element,o=this.options;e.bbox()?(this.origin=o.origin,o=o.vertical?v:y,(t=this.fromScale=new b.geometry.Point(1,1))[o]=ar,e.transform(b.geometry.transform().scale(t.x,t.y))):this.abort()},mh.prototype.step=function(t){var e=Pt(this.fromScale.x,1,t),t=Pt(this.fromScale.y,1,t);this.element.transform(b.geometry.transform().scale(e,t,this.origin))},mh.prototype.abort=function(){vh.prototype.abort.call(this),this.element.transform(null)};var vh,t=mh;function mh(){vh.apply(this,arguments)}e(t,{duration:nr}),b.drawing.AnimationFactory.current.register(gr,t);(xh=b.drawing.Animation)&&(_h.__proto__=xh),((_h.prototype=Object.create(xh&&xh.prototype)).constructor=_h).prototype.setup=function(){var t=this.center=this.element.bbox().center();this.element.transform(b.geometry.transform().scale(ar,ar,t))},_h.prototype.step=function(t){this.element.transform(b.geometry.transform().scale(t,t,this.center))};var xh,c=_h;function _h(){xh.apply(this,arguments)}e(c,{easing:"easeOutElastic"}),b.drawing.AnimationFactory.current.register(vr,c);(bh=b.drawing.Animation)&&(wh.__proto__=bh),((wh.prototype=Object.create(bh&&bh.prototype)).constructor=wh).prototype.setup=function(){this.fadeTo=this.element.opacity(),this.element.opacity(0)},wh.prototype.step=function(t){this.element.opacity(t*this.fadeTo)};var bh,l=wh;function wh(){bh.apply(this,arguments)}e(l,{duration:200,easing:"linear"}),b.drawing.AnimationFactory.current.register(sr,l);(Ch=b.drawing.Animation)&&(Sh.__proto__=Ch),((Sh.prototype=Object.create(Ch&&Ch.prototype)).constructor=Sh).prototype.setup=function(){this.element.transform(b.geometry.transform().scale(ar,ar,this.options.center))},Sh.prototype.step=function(t){this.element.transform(b.geometry.transform().scale(t,t,this.options.center))};var Ch,h=Sh;function Sh(){Ch.apply(this,arguments)}e(h,{easing:"easeOutElastic",duration:nr}),b.drawing.AnimationFactory.current.register(Pr,h);const kh=h;(Ah=Ns)&&(Ph.__proto__=Ah),((Ph.prototype=Object.create(Ah&&Ah.prototype)).constructor=Ph).prototype.render=function(){Ah.prototype.render.call(this),this.renderSegments()},Ph.prototype.createSegment=function(t,e,o){return new(e.style===ur?Ln:An)(t,e,o)},Ph.prototype.animationPoints=function(){return Ah.prototype.animationPoints.call(this).concat(this._segments)},Ph.prototype.createMissingValue=function(t,e){if(e===pr)return Hs((e={x:t.x,y:t.y}).x)||(e.x=0),Hs(e.y)||(e.y=0),e};var Ah,t=Ph;function Ph(){Ah.apply(this,arguments)}x(t.prototype,On);const Th=t;(Mh=Va)&&(Oh.__proto__=Mh),((Oh.prototype=Object.create(Mh&&Mh.prototype)).constructor=Oh).prototype.initFields=function(){this.namedXAxes={},this.namedYAxes={},this.xAxisRangeTracker=new os,this.yAxisRangeTracker=new os},Oh.prototype.render=function(t){void 0===t&&(t=this.panes);for(var e=this.groupSeriesByPane(),o=0;o<t.length;o++){var i=t[o],r=e[i.options.name||"default"]||[],r=(this.addToLegend(r),this.filterVisibleSeries(r));r&&(this.createScatterChart(Sa(r,Vr),i),this.createScatterLineChart(Sa(r,jr),i),this.createBubbleChart(Sa(r,vr),i))}this.createAxes(t)},Oh.prototype.appendChart=function(t,e){this.xAxisRangeTracker.update(t.xAxisRanges),this.yAxisRangeTracker.update(t.yAxisRanges),Mh.prototype.appendChart.call(this,t,e)},Oh.prototype.removeAxis=function(t){var e=t.options.name;Mh.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},Oh.prototype.seriesPaneName=function(t){var e=this.options,o=t.xAxis,i=Ct([].concat(e.xAxis),function(t){return t.name===o})[0],r=t.yAxis,t=Ct([].concat(e.yAxis),function(t){return t.name===r})[0],e=(e.panes||[{}])[0].name||"default";return(i||{}).pane||(t||{}).pane||e},Oh.prototype.createScatterChart=function(t,e){0<t.length&&this.appendChart(new Ns(this,{series:t,clip:e.options.clip}),e)},Oh.prototype.createScatterLineChart=function(t,e){0<t.length&&this.appendChart(new Th(this,{series:t,clip:e.options.clip}),e)},Oh.prototype.createBubbleChart=function(t,e){0<t.length&&this.appendChart(new Zs(this,{series:t,clip:e.options.clip}),e)},Oh.prototype.createXYAxis=function(t,e,o){for(var i,r=t.name,n=e?this.namedYAxes:this.namedXAxes,s=e?this.yAxisRangeTracker:this.xAxisRangeTracker,a=x({reverse:!e&&this.chartService.rtl},t,{vertical:e}),t=Ca(a.type,an),p=s.query(),h=t?{min:.1,max:1}:{min:0,max:1},s=s.query(r)||p||h,l=[a.min,a.max],c=this.series,u=0;u<c.length;u++){var d=c[u],f=d[e?"yAxis":"xAxis"];if(f===a.name||0===o&&!f){f=Ki.current.bindPoint(d,0).valueFields;l.push(f[e?"y":"x"]);break}}0===o&&p&&(s.min=Math.min(s.min,p.min),s.max=Math.max(s.max,p.max));for(var g=0;g<l.length;g++)if(l[g]instanceof Date){i=!0;break}h=new(Ca(a.type,F)||!a.type&&i?ui:t?vi:hi)(s.min,s.max,a,this.chartService);if(h.axisIndex=o,r){if(n[r])throw new Error((e?"Y":"X")+" axis with name "+r+" is already defined");n[r]=h}return this.appendAxis(h),h},Oh.prototype.createAxes=function(t){for(var e=this.options,o=[].concat(e.xAxis),i=[],r=[].concat(e.yAxis),n=[],s=0;s<o.length;s++)u(this.findPane(o[s].pane),t)&&i.push(this.createXYAxis(o[s],!1,s));for(var a=0;a<r.length;a++)u(this.findPane(r[a].pane),t)&&n.push(this.createXYAxis(r[a],!0,a));this.axisX=this.axisX||i[0],this.axisY=this.axisY||n[0]},Oh.prototype._dispatchEvent=function(t,e,o){for(var i=t._eventCoordinates(e),r=new O(i.x,i.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(o,{element:Ht(e),originalEvent:e,x:Pa(a),y:Pa(p)})},Oh.prototype.updateAxisOptions=function(t,e){var o=t.options.vertical,i=this.groupAxes(this.panes),i=(o?i.y:i.x).indexOf(t);Bh(this.options,i,o,e),Bh(this.originalOptions,i,o,e)};var Mh,c=Oh;function Oh(){Mh.apply(this,arguments)}function Bh(t,e,o,i){x([].concat(o?t.yAxis:t.xAxis)[e],i)}e(c,{xAxis:{},yAxis:{}}),x(c.prototype,ja);const Rh=c;(Eh=o)&&(zh.__proto__=Eh),((zh.prototype=Object.create(Eh&&Eh.prototype)).constructor=zh).prototype.render=function(){var t,e,o=this.options.labels,i=this.owner.chartService,r=this.value;this._rendered||!1===this.visible||(this._rendered=!0,e=xt(o),t=this.pointData(),e?r=e(t):o.format&&(r=i.format.auto(o.format,r)),o.visible&&(r||0===r)&&(o.position===w||o.position===pn?(o.color||(o.color=Jt(this.options.color)),o.background||(o.background=this.options.color)):(e=i.theme.seriesDefaults.labels,o.color=o.color||e.color,o.background=o.background||e.background),this.label=new We(r,x({},o,{align:w,vAlign:"",animation:{type:sr,delay:this.animationDelay}}),t),this.append(this.label)))},zh.prototype.reflow=function(t){this.render(),this.box=t,this.reflowLabel()},zh.prototype.reflowLabel=function(){var t,e,o,i,r=this.options.labels,n=this.label,s=this.sector.clone(),a=r.distance,p=s.middle();n&&(e=n.box.height(),o=n.box.width(),r.position===w?(s.radius=Math.abs((s.radius-e)/2)+e,t=s.point(p),n.reflow(new B(t.x,t.y-e/2,t.x,t.y))):r.position===pn?(s.radius=s.radius-e/2,t=s.point(p),n.reflow(new B(t.x,t.y-e/2,t.x,t.y))):((t=s.clone().expand(a).point(p)).x>=s.center.x?(i=t.x+o,n.orientation=S):(i=t.x-o,n.orientation=C),n.reflow(new B(i,t.y-e,t.x,t.y))))},zh.prototype.createVisual=function(){var t,e=this,o=this.sector,i=this.options;Eh.prototype.createVisual.call(this),this.value&&(i.visual?(t=(o.startAngle+180)%360,(t=i.visual({category:this.category,dataItem:this.dataItem,value:this.value,series:this.series,percentage:this.percentage,center:new b.geometry.Point(o.center.x,o.center.y),radius:o.radius,innerRadius:o.innerRadius,startAngle:t,endAngle:t+o.angle,options:i,sender:this.getSender(),createVisual:function(){var t=new b.drawing.Group;return e.createSegmentVisual(t),t}}))&&this.visual.append(t)):this.createSegmentVisual(this.visual))},zh.prototype.createSegmentVisual=function(t){var e=this.sector,o=this.options,i=o.border||{},i=0<i.width?{stroke:{color:i.color,width:i.width,opacity:i.opacity,dashType:i.dashType}}:{},r=o.color,n={color:r,opacity:o.opacity},i=this.createSegment(e,x({fill:n,stroke:{opacity:o.opacity},zIndex:o.zIndex},i));t.append(i),ss(o)&&t.append(this.createGradientOverlay(i,{baseColor:r,fallbackFill:n},x({center:[e.center.x,e.center.y],innerRadius:e.innerRadius,radius:e.radius,userSpace:!0},o.overlay)))},zh.prototype.createSegment=function(t,e){return e.singleSegment?new b.drawing.Circle(new b.geometry.Circle(new b.geometry.Point(t.center.x,t.center.y),t.radius),e):be.current.createRing(t,e)},zh.prototype.createAnimation=function(){var t=this.options,e=this.sector.center;x(t,{animation:{center:[e.x,e.y],delay:this.animationDelay}}),Eh.prototype.createAnimation.call(this)},zh.prototype.createHighlight=function(t){var e=this.options.highlight||{},o=e.border||{};return this.createSegment(this.sector,x({},t,{fill:{color:e.color,opacity:e.opacity},stroke:{opacity:o.opacity,width:o.width,color:o.color}}))},zh.prototype.highlightVisual=function(){return this.visual.children[0]},zh.prototype.highlightVisualArgs=function(){var t=this.sector;return{options:this.options,radius:t.radius,innerRadius:t.innerRadius,center:new b.geometry.Point(t.center.x,t.center.y),startAngle:t.startAngle,endAngle:t.angle+t.startAngle,visual:this.visual}},zh.prototype.tooltipAnchor=function(){var t=this.sector.clone().expand(5),e=t.middle();return{point:t.point(e),align:(t=Gt(e+180),e=T(Math.sin(t),g),t=T(Math.cos(t),g),{horizontal:Math.abs(e)>Ih?w:t<0?S:C,vertical:Math.abs(e)<Lh?w:e<0?D:k})}},zh.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},zh.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,series:this.series,percentage:this.percentage}};var Eh,l=zh,Lh=T(Gt(30),g),Ih=T(Gt(60),g);function zh(t,e,o){Eh.call(this,o),this.value=t,this.sector=e}e(l,{color:a,overlay:{gradient:"roundedBevel"},border:{width:.5},labels:{visible:!1,distance:35,font:N,margin:A(.5),align:H,zIndex:1,position:hn},animation:{type:Pr},highlight:{visible:!0,border:{width:1}},visible:!0}),x(l.prototype,xn);const Vh=l,jh={createLegendItem:function(t,e,o){var i,r,n,s=this.options.legend||{},a=s.labels||{},s=s.inactiveItems||{},p=s.labels||{};o&&!1!==o.visibleInLegend&&(a=!(r=!1!==o.visible)&&xt(p)||xt(a),n=o.category,a&&(n=a({text:n,series:o.series,dataItem:o.dataItem,percentage:o.percentage,value:t})),a=r?(i={},e.color):(i={color:p.color,font:p.font},(s.markers||{}).color),Hs(n)&&""!==n&&this.legendItems.push({active:r,pointIndex:o.index,text:n,series:o.series,markerColor:a,labels:i}))}};(Dh=o)&&(Uh.__proto__=Dh),((Uh.prototype=Object.create(Dh&&Dh.prototype)).constructor=Uh).prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},Uh.prototype.traverseDataPoints=function(t){for(var e=this.options,o=this.plotArea.options.seriesColors,i=(o=void 0===o?[]:o).length,r=e.series,n=r.length,s=0;s<n;s++){var a=r[s],p=a.data,h=wa(a),l=h.total,c=h.points,h=h.count,u=360/l,d=void 0,f=(isFinite(u)||(d=360/h),void 0),f=(P(a.startAngle)?a:e).startAngle;s!==n-1&&a.labels.position===hn&&(a.labels.position=w);for(var g=0;g<c.length;g++){var y,v,m,x,_,b=c[g];b&&(y=b.fields,v=b.value,m=b.visible,x=0!==v?d||v*u:0,_=1!==p.length&&Boolean(y.explode),lt(a.color)||(a.color=y.color||o[g%i]),t(b.valueFields.value,new ye(null,0,0,f,x),{owner:this,category:P(y.category)?y.category:"",index:g,series:a,seriesIx:s,dataItem:p[g],percentage:0!==l?v/l:0,explode:_,visibleInLegend:y.visibleInLegend,visible:m,zIndex:n-s,animationDelay:this.animationDelay(g,s,n)}),!1!==m&&(f+=x))}}},Uh.prototype.evalSegmentOptions=function(t,e,o){var i=o.series;gn(t,{value:e,series:i,dataItem:o.dataItem,category:o.category,percentage:o.percentage},{defaults:i._defaults,excluded:["data","content","template","visual","toggle"]})},Uh.prototype.addValue=function(t,e,o){var i=x({},o.series,{index:o.index});this.evalSegmentOptions(i,t,o),this.createLegendItem(t,i,o),!1!==o.visible&&(t=new Vh(t,e,i),Object.assign(t,o),this.append(t),this.points.push(t))},Uh.prototype.reflow=function(t){var e=this.options,o=this.points,i=this.seriesConfigs,r=(void 0===i&&(i=[]),o.length),n=t.clone(),s=Math.min(n.width(),n.height()),a=s/2,p=s-.85*s,h=new B(n.x1,n.y1,n.x1+s,n.y1+s),s=h.center(),n=n.center(),l=e.series.length,c=[],u=[],e=M(e.padding,p);this.targetBox=t,e=a-5<e?a-5:e,h.translate(n.x-s.x,n.y-s.y);for(var d=a-e,f=new O(d+h.x1+e,d+h.y1+e),g=0;g<r;g++){var y=o[g],v=y.sector,m=y.seriesIx,x=(v.radius=d,v.center=f,i.length&&(x=i[m],v.innerRadius=x.innerRadius,v.radius=x.radius),m===l-1&&y.explode&&(v.center=v.clone().setRadius(.15*v.radius).point(v.middle())),y.reflow(h),y.label);x&&x.options.position===hn&&m===l-1&&(x.orientation===S?u:c).push(x)}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},Uh.prototype.leftLabelsReflow=function(t){var e=this.distanceBetweenLabels(t);this.distributeLabels(e,t)},Uh.prototype.rightLabelsReflow=function(t){var e=this.distanceBetweenLabels(t);this.distributeLabels(e,t)},Uh.prototype.distanceBetweenLabels=function(t){var e=Ft(this.points),o=e.sector,i=t.length-1,e=o.radius+e.options.labels.distance,r=[],n=t[0].box,s=T(n.y1-(o.center.y-e-n.height()-n.height()/2));r.push(s);for(var a=0;a<i;a++){var p=t[a+1].box,n=t[a].box,s=T(p.y1-n.y2);r.push(s)}return s=T(o.center.y+e-t[i].box.y2-t[i].box.height()/2),r.push(s),r},Uh.prototype.distributeLabels=function(t,e){for(var o,i,r,n=t.length,s=0;s<n;s++)for(r=-t[s],o=i=s;0<r&&(0<=o||i<n);)r=this._takeDistance(t,s,--o,r),r=this._takeDistance(t,s,++i,r);this.reflowLabels(t,e)},Uh.prototype._takeDistance=function(t,e,o,i){var r;return 0<t[o]&&(i-=r=Math.min(t[o],i),t[o]-=r,t[e]+=r),i},Uh.prototype.reflowLabels=function(t,e){var o,i=Ft(this.points),r=i.sector,n=i.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],o=this.hAlignLabel(c.x2,r.clone().expand(a),p,p+c.height(),l.orientation===S),l.orientation===S?(n.align!==H&&(o=r.radius+r.center.x+a),l.reflow(new B(o+c.width(),p,o,p))):(n.align!==H&&(o=r.center.x-r.radius-a),l.reflow(new B(o-c.width(),p,o,p))),p+=c.height()}},Uh.prototype.createVisual=function(){var t=this.options.connectors,e=this.points,o=e.length;Dh.prototype.createVisual.call(this),this._connectorLines=[];for(var i=0;i<o;i++){var r,n,s,a,p,h,l,c=e[i],u=c.sector,d=c.label,f=u.middle(),g=(c.options.connectors||{}).color||t.color;d&&(g=new b.drawing.Path({stroke:{color:g,width:t.width},animation:{type:sr,delay:c.animationDelay}}),d.options.position===hn&&(r=d.box,n=u.center,l=u.point(f),s=new O(r.x1,r.center().y),h=p=a=void 0,l=u.clone().expand(t.padding).point(f),g.moveTo(l.x,l.y),d.orientation===S?(h=Fh(n,l,s,p=new O(r.x1-t.padding,r.center().y)),s=new O(p.x-4,p.y),(h=h||s).x=Math.min(h.x,s.x),this.pointInCircle(h,u.center,u.radius+4)||h.x<u.center.x?(a=u.center.x+u.radius+4,c.options.labels.align===_r||a<s.x?g.lineTo(a,l.y):g.lineTo(l.x+8,l.y),g.lineTo(s.x,p.y)):(h.y=p.y,g.lineTo(h.x,h.y))):(h=Fh(n,l,s,p=new O(r.x2+t.padding,r.center().y)),s=new O(p.x+4,p.y),(h=h||s).x=Math.max(h.x,s.x),this.pointInCircle(h,u.center,u.radius+4)||h.x>u.center.x?(a=u.center.x-u.radius-4,c.options.labels.align===_r||a>s.x?g.lineTo(a,l.y):g.lineTo(l.x-8,l.y),g.lineTo(s.x,p.y)):(h.y=p.y,g.lineTo(h.x,h.y))),g.lineTo(p.x,p.y),this._connectorLines.push(g),this.visual.append(g)))}},Uh.prototype.renderVisual=function(){var t,e,o,i;Dh.prototype.renderVisual.call(this),Yt(this.options.series,function(t){return t.autoFit})&&(t=this.targetBox,e=this.box.center(),(i=this.visual.bbox())&&(o=i.bottomRight(),(i=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(b.geometry.transform().scale(i,i,[e.x,e.y]))))},Uh.prototype.labelComparator=function(t){var o=t?-1:1;return function(t,e){return((t.parent.sector.middle()+270)%360-(e.parent.sector.middle()+270)%360)*o}},Uh.prototype.hAlignLabel=function(t,e,o,i,r){var n=e.radius,e=e.center,s=e.x,e=e.y,o=Math.min(Math.abs(e-o),Math.abs(e-i));return n<o?t:s+Math.sqrt(n*n-o*o)*(r?1:-1)},Uh.prototype.pointInCircle=function(t,e,o){return Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)<Math.pow(o,2)},Uh.prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value)},Uh.prototype.animationDelay=function(t){return 70*t},Uh.prototype.stackRoot=function(){return this};var Dh,Hh,h=Uh;function Uh(t,e){Dh.call(this,e),this.plotArea=t,this.chartService=t.chartService,this.points=[],this.legendItems=[],this.render()}function Fh(t,e,o,i){var r,n=(i.x-o.x)*(t.y-o.y)-(i.y-o.y)*(t.x-o.x),i=(i.y-o.y)*(e.x-t.x)-(i.x-o.x)*(e.y-t.y);return 0!=i&&(o=n/i,r=new O(t.x+o*(e.x-t.x),t.y+o*(e.y-t.y))),r}e(h,{startAngle:90,connectors:{width:2,color:"#939393",padding:8},inactiveItems:{markers:{},labels:{}}}),x(h.prototype,jh),h.prototype.isStackRoot=!0;const Nh=h;function Gh(){Hh.apply(this,arguments)}(Hh=Va)&&(Gh.__proto__=Hh),((Gh.prototype=Object.create(Hh&&Hh.prototype)).constructor=Gh).prototype.render=function(){this.createPieChart(this.series)},Gh.prototype.createPieChart=function(t){var e=t[0],t=new Nh(this,{series:t,padding:e.padding,startAngle:e.startAngle,connectors:e.connectors,legend:this.options.legend});this.appendChart(t)},Gh.prototype.appendChart=function(t,e){Hh.prototype.appendChart.call(this,t,e),Lt(this.options.legend.items,t.legendItems)};const Wh=Gh;(Xh=Vh)&&(qh.__proto__=Xh),((qh.prototype=Object.create(Xh&&Xh.prototype)).constructor=qh).prototype.reflowLabel=function(){var t,e=this.options.labels,o=this.label,i=this.sector.clone(),r=i.middle();o&&(t=o.box.height(),e.position===w?(i.radius-=(i.radius-i.innerRadius)/2,e=i.point(r),o.reflow(new B(e.x,e.y-t/2,e.x,e.y))):Xh.prototype.reflowLabel.call(this))},qh.prototype.createSegment=function(t,e){return be.current.createRing(t,e)};var Xh,On=qh;function qh(){Xh.apply(this,arguments)}e(On,{overlay:{gradient:"roundedGlass"},labels:{position:w},animation:{type:Pr}}),x(On.prototype,xn);const Yh=On;(Zh=Nh)&&($h.__proto__=Zh),(($h.prototype=Object.create(Zh&&Zh.prototype)).constructor=$h).prototype.addValue=function(t,e,o){var i=x({},o.series,{index:o.index});this.evalSegmentOptions(i,t,o),this.createLegendItem(t,i,o),t&&!1!==o.visible&&(t=new Yh(t,e,i),Object.assign(t,o),this.append(t),this.points.push(t))},$h.prototype.reflow=function(t){for(var e,o=this.options,i=t.clone(),i=Math.min(i.width(),i.height()),r=i/2,n=o.series,s=n.length,o=M(o.padding,i-.85*i),a=r-(o=r-5<o?r-5:o),p=0,h=0;h<s;h++){var l=n[h];0===h&&P(l.holeSize)&&(e=l.holeSize,a-=l.holeSize),P(l.size)?a-=l.size:p++,P(l.margin)&&h!==s-1&&(a-=l.margin)}P(e)||(a-=e=(r-o)/(s+.75)*.75);var c=e,u=0;this.seriesConfigs=[];for(var d=0;d<s;d++){var f=n[d],g=(c+=u)+M(f.size,a/p);this.seriesConfigs.push({innerRadius:c,radius:g}),u=f.margin||0,c=g}Zh.prototype.reflow.call(this,t)},$h.prototype.animationDelay=function(t,e,o){return 50*t+nr*(e+1)/(o+1)};var Zh,Qh,Kh,t=$h;function $h(){Zh.apply(this,arguments)}e(t,{startAngle:90,connectors:{width:2,color:"#939393",padding:8}});const Jh=t;function tl(){Qh.apply(this,arguments)}(Qh=Wh)&&(tl.__proto__=Qh),((tl.prototype=Object.create(Qh&&Qh.prototype)).constructor=tl).prototype.render=function(){this.createDonutChart(this.series)},tl.prototype.createDonutChart=function(t){var e=t[0],t=new Jh(this,{series:t,padding:e.padding,connectors:e.connectors,legend:this.options.legend});this.appendChart(t)};const el=tl;function ol(){Kh.apply(this,arguments)}(Kh=Va)&&(ol.__proto__=Kh),((ol.prototype=Object.create(Kh&&Kh.prototype)).constructor=ol).prototype.initFields=function(){this.valueAxisRangeTracker=new os},ol.prototype.render=function(){this.addToLegend(this.series),this.createPolarAxis(),this.createCharts(),this.createValueAxis()},ol.prototype.alignAxes=function(){var t=this.valueAxis,e=t.range(),e=t.options.reverse?e.max:e.min,e=t.getSlot(e),o=this.polarAxis.getSlot(0).center,o=t.box.translate(o.x-e.x1,o.y-e.y1);t.reflow(o)},ol.prototype.createValueAxis=function(){var t,e=this.valueAxisRangeTracker,o=e.query(),i=this.valueAxisOptions({roundToMajorUnit:!1,zIndex:-1}),r=i.type===an?(t=Ei,{min:.1,max:1}):(t=Ti,{min:0,max:1}),e=e.query(name)||o||r,r=(e&&o&&(e.min=Math.min(e.min,o.min),e.max=Math.max(e.max,o.max)),new t(e.min,e.max,i,this.chartService));this.valueAxis=r,this.appendAxis(r)},ol.prototype.reflowAxes=function(){var t=this.options.plotArea,e=this.valueAxis,o=this.polarAxis,i=this.box,r=.15*Math.min(i.width(),i.height()),t=A(t.padding||{},r),r=i.clone().unpad(t),i=r.clone(),t=(i.y2=i.y1+Math.min(i.width(),i.height()),i.align(r,v,w),i.clone().shrink(0,i.height()/2)),r=(o.reflow(i),e.reflow(t),e.lineBox().height()-e.box.height());e.reflow(e.box.unpad({top:r})),this.axisBox=i,this.alignAxes(i)},ol.prototype.backgroundBox=function(){return this.box},ol.prototype.detachLabels=function(){};var il,c=ol,N=((il=Ns)&&(rl.__proto__=il),((rl.prototype=Object.create(il&&il.prototype)).constructor=rl).prototype.pointSlot=function(t,e){e=t.center.y-e.y1,t=O.onCircle(t.center,t.startAngle,e);return new B(t.x,t.y,t.x,t.y)},rl);function rl(){il.apply(this,arguments)}e(N,{clip:!1});const nl=N;(sl=Th)&&(ll.__proto__=sl);var sl,al,pl,hl,l=(ll.prototype=Object.create(sl&&sl.prototype)).constructor=ll;function ll(){sl.apply(this,arguments)}l.prototype.pointSlot=nl.prototype.pointSlot,e(l,{clip:!1});const cl=l;function ul(){al.apply(this,arguments)}(al=$n)&&(ul.__proto__=al),((ul.prototype=Object.create(al&&al.prototype)).constructor=ul).prototype.fillToAxes=function(t){var e=this._polarAxisCenter();t.lineTo(e.x,e.y)},ul.prototype._polarAxisCenter=function(){return this.parent.plotArea.polarAxis.box.center()},ul.prototype.strokeSegments=function(){var t,e,o,i=this._strokeSegments;return i||(t=this._polarAxisCenter(),e=new Ii(!1),(o=this.points()).push(t),(i=this._strokeSegments=e.process(o)).pop()),i};const dl=ul;function fl(){pl.apply(this,arguments)}(pl=Gn)&&(fl.__proto__=pl),((fl.prototype=Object.create(pl&&pl.prototype)).constructor=fl).prototype.fillToAxes=function(t){var e=this.parent.plotArea.polarAxis.box.center(),e=new b.geometry.Segment([e.x,e.y]);t.segments.unshift(e),t.segments.push(e)};const gl=fl;function yl(){hl.apply(this,arguments)}function vl(t,e){return t.value.x-e.value.x}(hl=cl)&&(yl.__proto__=hl),((yl.prototype=Object.create(hl&&hl.prototype)).constructor=yl).prototype.createSegment=function(t,e,o){return new((e.line||{}).style===ur?dl:gl)(t,e,o)},yl.prototype.createMissingValue=function(t,e){var o;return Hs(t.x)&&e!==hr&&(o={x:t.x,y:t.y},e===pr&&(o.y=0)),o},yl.prototype.seriesMissingValues=function(t){return t.missingValues||pr},yl.prototype._hasMissingValuesGap=function(){for(var t=this.options.series,e=0;e<t.length;e++)if("gap"===this.seriesMissingValues(t[e]))return!0},yl.prototype.sortPoints=function(t){if(t.sort(vl),this._hasMissingValuesGap())for(var e=0;e<t.length;e++){var o=t[e];!o||Hs(o.value.y)||"gap"!==this.seriesMissingValues(o.series)||delete t[e]}return t};const ml=yl;(xl=c)&&(_l.__proto__=xl),((_l.prototype=Object.create(xl&&xl.prototype)).constructor=_l).prototype.createPolarAxis=function(){var t=new Si(this.options.xAxis,this.chartService);this.polarAxis=t,this.axisX=t,this.appendAxis(t)},_l.prototype.valueAxisOptions=function(t){return x(t,{majorGridLines:{type:V},minorGridLines:{type:V}},this.options.yAxis)},_l.prototype.createValueAxis=function(){xl.prototype.createValueAxis.call(this),this.axisY=this.valueAxis},_l.prototype.appendChart=function(t,e){this.valueAxisRangeTracker.update(t.yAxisRanges),Va.prototype.appendChart.call(this,t,e)},_l.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createLineChart(Sa(t,[Mr]),e),this.createScatterChart(Sa(t,[Or]),e),this.createAreaChart(Sa(t,[Tr]),e)},_l.prototype.createLineChart=function(t,e){0!==t.length&&(t=new cl(this,{series:t}),this.appendChart(t,e))},_l.prototype.createScatterChart=function(t,e){0!==t.length&&(t=new nl(this,{series:t}),this.appendChart(t,e))},_l.prototype.createAreaChart=function(t,e){0!==t.length&&(t=new ml(this,{series:t}),this.appendChart(t,e))},_l.prototype._dispatchEvent=function(t,e,o){var i=t._eventCoordinates(e),i=new O(i.x,i.y),r=this.axisX.getValue(i),i=this.axisY.getValue(i);null!==r&&null!==i&&t.trigger(o,{element:Ht(e),x:r,y:i})},_l.prototype.createCrosshairs=function(){};var xl,h=_l;function _l(){xl.apply(this,arguments)}e(h,{xAxis:{},yAxis:{}}),x(h.prototype,ja);var bl,wl,Cl,Sl,On=h,t=((bl=Fn)&&(kl.__proto__=bl),((kl.prototype=Object.create(bl&&bl.prototype)).constructor=kl).prototype.pointSlot=function(t,e){e=t.center.y-e.y1,t=O.onCircle(t.center,t.middle(),e);return new B(t.x,t.y,t.x,t.y)},kl.prototype.renderSegments=function(){if(bl.prototype.renderSegments.call(this),this._segments&&1<this._segments.length)for(var t=function(t){for(var e=[],o=0;o<t.length;o++){var i=t[o];e[i.seriesIx]=e[i.seriesIx]||[],e[i.seriesIx].push(i)}return e}(this._segments),e=0;e<t.length;e++){var o,i,r,n=t[e];n&&1<n.length&&(o=n[0].linePoints[0],r=Ft(n),r=Ft(r.linePoints),i=0===o.categoryIx,r=r.categoryIx===r.categoriesCount-1,i&&r&&Ft(n).linePoints.push(o))}},kl.prototype.createSegment=function(t,e,o){var o=new(e.style===ur?Ln:An)(t,e,o),i=this.seriesMissingValues(e);return t.length!==e.data.length&&i!==hr||(o.options.closed=!0),o},kl);function kl(){bl.apply(this,arguments)}e(t,{clip:!1,limitPoints:!1});const Al=t;function Pl(){wl.apply(this,arguments)}(wl=$n)&&(Pl.__proto__=wl),((Pl.prototype=Object.create(wl&&wl.prototype)).constructor=Pl).prototype.fillToAxes=function(){};const Tl=Pl;function Ml(){Cl.apply(this,arguments)}(Cl=Gn)&&(Ml.__proto__=Cl),((Ml.prototype=Object.create(Cl&&Cl.prototype)).constructor=Ml).prototype.fillToAxes=function(){};const Ol=Ml;function Bl(){Sl.apply(this,arguments)}(Sl=Al)&&(Bl.__proto__=Sl),((Bl.prototype=Object.create(Sl&&Sl.prototype)).constructor=Bl).prototype.createSegment=function(t,e,o,i){var r,n,s,a=this.options.isStacked,p=(e.line||{}).style;return a&&0<o&&i&&(n=i.linePoints.slice(0),r=i),p===ur?(s=new Tl(t,e,o,r,n)).options.closed=!0:(t.push(t[0]),s=new Ol(t,e,o,r,n)),s},Bl.prototype.seriesMissingValues=function(t){return t.missingValues||pr};const Rl=Bl;(El=Yh)&&(Ll.__proto__=El);var El,N=(Ll.prototype=Object.create(El&&El.prototype)).constructor=Ll;function Ll(t,e){El.call(this,t,null,e)}e(N,{overlay:{gradient:"none"},labels:{distance:10}});const Il=N;(zl=o)&&(jl.__proto__=zl),((jl.prototype=Object.create(zl&&zl.prototype)).constructor=jl).prototype.reflow=function(o){var t=this.options,e=this.children,i=t.gap,r=t.spacing,t=e.length,n=o.angle/(t+i+r*(t-1)),s=o.startAngle+i/2*n;this.forEach(e,function(t){var e=o.clone();e.startAngle=s,e.angle=n,t.sector&&(e.radius=t.sector.radius),t.reflow(e),t.sector=e,s+=n+n*r})};var zl,Vl,l=jl;function jl(t){zl.call(this,t),this.forEach=t.rtl?cs:ls}e(l,{gap:1,spacing:0});const Dl=l;function Hl(){Vl.apply(this,arguments)}(Vl=o)&&(Hl.__proto__=Vl),((Hl.prototype=Object.create(Vl&&Vl.prototype)).constructor=Hl).prototype.reflow=function(t){var e=this.options.reverse,o=this.children,i=o.length,r=e?i-1:0,n=e?-1:1;this.box=new B;for(var s=r;0<=s&&s<i;s+=n){var a=o[s].sector;a.startAngle=t.startAngle,a.angle=t.angle}};const Ul=Hl;(Fl=_s)&&(Nl.__proto__=Fl),((Nl.prototype=Object.create(Fl&&Fl.prototype)).constructor=Nl).prototype.pointType=function(){return Il},Nl.prototype.clusterType=function(){return Dl},Nl.prototype.stackType=function(){return Ul},Nl.prototype.categorySlot=function(t,e){return t.getSlot(e)},Nl.prototype.pointSlot=function(t,e){var o=t.clone(),t=t.center.y;return o.radius=t-e.y1,o.innerRadius=t-e.y2,o},Nl.prototype.reflowPoint=function(t,e){t.sector=e,t.reflow()},Nl.prototype.createAnimation=function(){this.options.animation.center=this.box.toRect().center(),Fl.prototype.createAnimation.call(this)};var Fl,h=Nl;function Nl(){Fl.apply(this,arguments)}h.prototype.reflow=mn.prototype.reflow,e(h,{clip:!1,limitPoints:!1,animation:{type:"pie"}});const Gl=h;(Wl=c)&&(Xl.__proto__=Wl),((Xl.prototype=Object.create(Wl&&Wl.prototype)).constructor=Xl).prototype.createPolarAxis=function(){var t=new bi(this.options.categoryAxis,this.chartService);this.polarAxis=t,this.categoryAxis=t,this.appendAxis(t),this.aggregateCategories(),this.createCategoryAxesLabels()},Xl.prototype.valueAxisOptions=function(t){return this._hasBarCharts&&x(t,{majorGridLines:{type:V},minorGridLines:{type:V}}),this._isStacked100&&x(t,{roundToMajorUnit:!1,labels:{format:"P0"}}),x(t,this.options.valueAxis)},Xl.prototype.aggregateCategories=function(){Bp.prototype.aggregateCategories.call(this,this.panes)},Xl.prototype.createCategoryAxesLabels=function(){Bp.prototype.createCategoryAxesLabels.call(this,this.panes)},Xl.prototype.filterSeries=function(t){return t},Xl.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createAreaChart(Sa(t,[Br]),e),this.createLineChart(Sa(t,[Er]),e),this.createBarChart(Sa(t,[Rr]),e)},Xl.prototype.chartOptions=function(t){var e={series:t},o=t[0];return o&&(t=this.filterVisibleSeries(t),o=o.stack,e.isStacked=o&&1<t.length,e.isStacked100=o&&"100%"===o.type&&1<t.length,e.isStacked100&&(this._isStacked100=!0)),e},Xl.prototype.createAreaChart=function(t,e){0!==t.length&&(t=new Rl(this,this.chartOptions(t)),this.appendChart(t,e))},Xl.prototype.createLineChart=function(t,e){0!==t.length&&(t=new Al(this,this.chartOptions(t)),this.appendChart(t,e))},Xl.prototype.createBarChart=function(t,e){var o;0!==t.length&&(o=t[0],(t=this.chartOptions(t)).gap=o.gap,t.spacing=o.spacing,o=new Gl(this,t),this.appendChart(o,e),this._hasBarCharts=!0)},Xl.prototype.seriesCategoryAxis=function(){return this.categoryAxis},Xl.prototype._dispatchEvent=function(t,e,o){var i=t._eventCoordinates(e),i=new O(i.x,i.y),r=this.categoryAxis.getCategory(i),i=this.valueAxis.getValue(i);null!==r&&null!==i&&t.trigger(o,{element:Ht(e),category:r,value:i})},Xl.prototype.createCrosshairs=function(){};var Wl,t=Xl;function Xl(){Wl.apply(this,arguments)}x(t.prototype,ja,{appendChart:Bp.prototype.appendChart,aggregateSeries:Bp.prototype.aggregateSeries,seriesSourcePoints:Bp.prototype.seriesSourcePoints}),e(t,{categoryAxis:{categories:[]},valueAxis:{}});var ql,N=t,l=((ql=o)&&(Yl.__proto__=ql),((Yl.prototype=Object.create(ql&&ql.prototype)).constructor=Yl).prototype.reflow=function(t){var e=this.points,o=this.children[0];this.box=new B(e[0].x,e[0].y,e[1].x,e[2].y),o&&o.reflow(new B(t.x1,e[0].y,t.x2,e[2].y))},Yl.prototype.createVisual=function(){var t=this,e=this.options;ql.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)},Yl.prototype.createPath=function(){var t=this.options,e=t.border;return b.drawing.Path.fromPoints(this.points,{fill:{color:t.color,opacity:t.opacity},stroke:{color:e.color,opacity:e.opacity,width:e.width}}).close()},Yl.prototype.createHighlight=function(t){return b.drawing.Path.fromPoints(this.points,t)},Yl.prototype.highlightVisual=function(){return this.visual.children[0]},Yl.prototype.highlightVisualArgs=function(){var t=b.drawing.Path.fromPoints(this.points).close();return{options:this.options,path:t}},Yl.prototype.tooltipAnchor=function(){var t=this.box;return{point:new O(t.center().x,t.y1),align:{horizontal:"center",vertical:"top"}}},Yl.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Yl);function Yl(t,e,o){ql.call(this,e),this.value=t,this.options.index=o.index}e(l,{color:a,border:{width:1}}),x(l.prototype,xn);const Zl=l;(Ql=o)&&($l.__proto__=Ql),(($l.prototype=Object.create(Ql&&Ql.prototype)).constructor=$l).prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value)},$l.prototype.render=function(){var t=this.options,e=this.plotArea.options.seriesColors,o=(void 0===e&&(e=[]),t.series[0]),i=o.data;if(i)for(var t=wa(o),r=t.total,n=t.points,s=0;s<n.length;s++){var a,p,h=n[s];h&&(a=h.fields,lt(o.color)||(o.color=a.color||e[s%e.length]),a=x({index:s,owner:this,series:o,dataItem:i[s],percentage:h.value/r},a,{visible:h.visible}),h=h.valueFields.value,p=this.createSegment(h,a),h=this.createLabel(h,a),p&&h&&p.append(h))}},$l.prototype.evalSegmentOptions=function(t,e,o){var i=o.series;gn(t,{value:e,series:i,dataItem:o.dataItem,index:o.index},{defaults:i._defaults,excluded:["data","content","template","toggle","visual"]})},$l.prototype.createSegment=function(t,e){var o=x({},e.series);if(this.evalSegmentOptions(o,t,e),this.createLegendItem(t,o,e),!1!==e.visible)return t=new Zl(t,o,e),Object.assign(t,e),this.append(t),this.points.push(t),t},$l.prototype.createLabel=function(t,e){var o,i=e.series,r=e.dataItem,n=x({},this.options.labels,i.labels),s=t;if(n.visible)return o=xt(n),r={dataItem:r,value:t,percentage:e.percentage,category:e.category,series:i},o?s=o(r):n.format&&(s=this.plotArea.chartService.format.auto(n.format,s)),n.color||(n.color=Jt(i.color),n.background||(n.background=i.color)),this.evalSegmentOptions(n,t,e),o=new We(s,x({vAlign:n.position},n),r),this.labels.push(o),o},$l.prototype.labelPadding=function(){for(var t=this.labels,e={left:0,right:0},o=0;o<t.length;o++){var i,r=t[o].options.align;r!==w&&(i=t[o].box.width(),r===C?e.left=Math.max(e.left,i):e.right=Math.max(e.right,i))}return e},$l.prototype.dynamicSlopeReflow=function(t,e,o){for(var i=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,f=r[u+1],f=f?f.percentage:d,g=r[u].points=[],y=i.dynamicHeight?o*d:o/n,d=_(d?(e-h*(f/d))/2:f?0:e/2,0,e);g.push(new b.geometry.Point(t.x1+l,t.y1+c)),g.push(new b.geometry.Point(t.x1+e-l,t.y1+c)),g.push(new b.geometry.Point(t.x1+e-d,t.y1+y+c)),g.push(new b.geometry.Point(t.x1+d,t.y1+y+c)),c+=y+i.segmentSpacing,h=_(e-2*(l=d),0,e)}},$l.prototype.constantSlopeReflow=function(t,e,o){for(var i=this.options,r=this.points,n=r.length,s=i.neckRatio<=1,a=s?i.neckRatio*e:e,p=s?0:(e-e/i.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,f=i.dynamicHeight?h*d:h/n,d=i.dynamicHeight?o*d:o/n;u.push(new b.geometry.Point(t.x1+p,t.y1+l)),u.push(new b.geometry.Point(t.x1+e-p,t.y1+l)),u.push(new b.geometry.Point(t.x1+e-p-f,t.y1+d+l)),u.push(new b.geometry.Point(t.x1+p+f,t.y1+d+l)),p+=f,l+=d+i.segmentSpacing}},$l.prototype.reflow=function(t){var e=this.points,o=e.length;if(o){var i=this.options,r=t.clone().unpad(this.labelPadding()),n=r.height()-i.segmentSpacing*(o-1),s=r.width();i.dynamicSlope?this.dynamicSlopeReflow(r,s,n):this.constantSlopeReflow(r,s,n);for(var a=0;a<o;a++)e[a].reflow(t)}};var Ql,Kl,h=$l;function $l(t,e){Ql.call(this,e),this.plotArea=t,this.points=[],this.labels=[],this.legendItems=[],this.render()}e(h,{neckRatio:.3,width:300,dynamicSlope:!1,dynamicHeight:!0,segmentSpacing:0,labels:{visible:!1,align:w,position:w,zIndex:1}}),x(h.prototype,jh);const Jl=h;function tc(){Kl.apply(this,arguments)}(Kl=Va)&&(tc.__proto__=Kl),((tc.prototype=Object.create(Kl&&Kl.prototype)).constructor=tc).prototype.render=function(){this.createFunnelChart(this.series)},tc.prototype.createFunnelChart=function(t){var e=t[0],t=new Jl(this,{series:t,legend:this.options.legend,neckRatio:e.neckRatio,dynamicHeight:e.dynamicHeight,dynamicSlope:e.dynamicSlope,segmentSpacing:e.segmentSpacing,highlight:e.highlight});this.appendChart(t)},tc.prototype.appendChart=function(t,e){Kl.prototype.appendChart.call(this,t,e),Lt(this.options.legend.items,t.legendItems)};var ec,c=tc,t=((ec=o)&&(oc.__proto__=ec),((oc.prototype=Object.create(ec&&ec.prototype)).constructor=oc).prototype.render=function(){this._rendered||(this._rendered=!0,this.createMarker(),this.createLabel(),this.createNote())},oc.prototype.createLabel=function(){var t,e,o,i=this.options.labels;i.visible&&(t=this.pointData(),e=xt(i),o=i.color,e=e?e(t):this.formatValue(i.format),o=o||Jt(this.color),this.label=new We(e,x({align:w,vAlign:w,margin:{left:5,right:5},zIndex:M(i.zIndex,this.series.zIndex)},i,{color:o}),t),this.append(this.label))},oc.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},oc.prototype.reflow=function(t){this.render();var e=this.label;this.box=t,e&&e.reflow(this.markerBox()),this.note&&this.note.reflow(t),this.marker.reflow(this.markerBox())},oc.prototype.markerBox=function(){var t,e=this.options.markers,o=e.border,i=this.box.toRect(),r=M(e.type,"rect")===$,o=M(o.width,r?1:0),r=Math.round(o/2);return e.size&&(t=i.center(),i.size.width=i.size.height=e.size,i.origin.x=Math.round(t.x-i.size.width/2),i.origin.y=Math.round(t.y-i.size.height/2)),i.size.width-=o,i.size.height-=o,i.origin.y+=r+.5,i.origin.x+=r+.5,Ue(i)},oc.prototype.markerBorder=function(){var t=this.options,e=t.markers.border,t=M(e.opacity,t.opacity);return{color:e.color||this.color,width:e.width,opacity:t,dashType:e.dashType}},oc.prototype.createMarker=function(){var t=this.options,e=t.markers,e=new Me({type:M(e.type,"rect"),width:e.size,height:e.size,rotation:e.rotation,background:this.color,border:this.markerBorder(),borderRadius:e.borderRadius,opacity:this.series.opacity||t.opacity,zIndex:M(t.zIndex,this.series.zIndex),animation:t.animation,visual:t.visual},{dataItem:this.dataItem,value:this.value,series:this.series,category:this.category});this.marker=e,this.append(e)},oc.prototype.createHighlight=function(t){var e=this.options,o=this.options.highlight.markers||this.options.markers,o=new Me({type:M(o.type,"rect"),width:o.size,height:o.size,rotation:o.rotation,background:o.color||this.color,border:this.markerBorder(),borderRadius:o.borderRadius,opacity:this.series.opacity||e.opacity,zIndex:M(e.zIndex,this.series.zIndex)}),e=(o.reflow(this.markerBox()),o.getElement());return e.options.fill=t.fill,e.options.stroke=t.stroke,e},oc.prototype.highlightVisual=function(){return this.rectVisual},oc.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this.rectVisual}},oc.prototype.tooltipAnchor=function(){var t=this.box.center().x,e=this.box.y1-5;return{point:new O(t,e),align:{horizontal:w,vertical:D}}},oc.prototype.overlapsBox=function(t){return this.box.overlaps(t)},oc.prototype.unclipElements=function(){},oc.prototype.pointData=function(){return{x:this.value.x,y:this.value.y,value:this.value.value,dataItem:this.dataItem,series:this.series}},oc);function oc(t,e){ec.call(this),this.options=e,this.color=e.color||a,this.value=t}x(t.prototype,xn),x(t.prototype,_n),t.prototype.defaults={markers:{type:"rect",borderRadius:4,border:{color:"transparent"}},padding:{top:1},labels:{visible:!1,padding:3},opacity:1,notes:{label:{}}};const ic=t;(rc=o)&&(nc.__proto__=rc),((nc.prototype=Object.create(rc&&rc.prototype)).constructor=nc).prototype._initFields=function(){this.points=[],this.seriesOptions=[],this.valueRange={min:q,max:Y},this._evalSeries=[]},nc.prototype.render=function(){this.setRange(),this.traverseDataPoints(this.addValue.bind(this))},nc.prototype.setRange=function(){for(var t=this.options.series,e=0;e<t.length;e++)for(var o=t[e],i=0;i<o.data.length;i++){var r=this._bindPoint(o,e,i).valueFields;P(r.value)&&null!==r.value&&(this.valueRange.min=Math.min(this.valueRange.min,r.value),this.valueRange.max=Math.max(this.valueRange.max,r.value))}},nc.prototype.addValue=function(t,e){var o;t&&P(t.value)&&null!==t.value&&(o=this.createPoint(t,e))&&Object.assign(o,e),this.points.push(o)},nc.prototype.evalPointOptions=function(t,e,o){var i=o.series,r=o.seriesIx,n={defaults:i._defaults,excluded:["data","tooltip","content","template","visual","toggle"]},s=this._evalSeries[r],r=(P(s)||(this._evalSeries[r]=s=gn(t,{},n,!0)),t);return s&&gn(r=x({},t),{value:e,series:i,dataItem:o.dataItem,min:this.valueRange.min,max:this.valueRange.max},n),r},nc.prototype.pointType=function(){return ic},nc.prototype.pointOptions=function(t,e){var o,i=this.seriesOptions[e];return i||(o=this.pointType().prototype.defaults,this.seriesOptions[e]=i=x({},o,{markers:{opacity:t.opacity},tooltip:{format:this.options.tooltip.format},labels:{format:this.options.labels.format}},t)),i},nc.prototype.createPoint=function(t,e){var o,i,r,n=e.series,s=this.pointOptions(n,e.seriesIx),a=e.color||n.color,s=this.evalPointOptions(s,t,e),n=(lt(n.color)?a=s.color:0!==this.valueRange.max&&(e=a,void 0===o&&(o=.05),i=(0,b.parseColor)(e),r=1-o,a=function(t){var e=i.toHSL(),o=100-e.l;return e.l+=Math.min((r-t)*o,o),e.toCss()}(t.value/this.valueRange.max)),new ic(t,s));return n.color=a,this.append(n),n},nc.prototype.seriesAxes=function(t){var e=t.xAxis,t=t.yAxis,o=this.plotArea,i=e?o.namedXAxes[e]:o.axisX,o=t?o.namedYAxes[t]:o.axisY;if(!i)throw new Error("Unable to locate X axis with name "+e);if(o)return{xAxis:i,yAxis:o};throw new Error("Unable to locate Y axis with name "+t)},nc.prototype.reflow=function(t){var n=this,s=this.points,a=!this.options.clip,p=0;this.traverseDataPoints(function(t,e){var o=s[p++],e=n.seriesAxes(e.series),i=e.xAxis,e=e.yAxis,r=i.categoryIndex(t.x),t=e.categoryIndex(t.y),i=i.getSlot(r,r,a),r=e.getSlot(t,t,a);o&&(i&&r?(e=n.pointSlot(i,r),o.reflow(e)):o.visible=!1)}),this.box=t},nc.prototype.pointSlot=function(t,e){return new B(t.x1,e.y1,t.x2,e.y2)},nc.prototype.traverseDataPoints=function(t){for(var e=this.options.series,o=0;o<e.length;o++)for(var i=e[o],r=this.seriesAxes(i),n=r.xAxis,s=r.yAxis,a=n.currentRangeIndices(),p=s.currentRangeIndices(),h=0;h<i.data.length;h++){var l=this._bindPoint(i,o,h),c=l.valueFields,l=l.fields,u=n.totalIndex(c.x),d=s.totalIndex(c.y),u=a.min<=u&&u<=a.max,d=p.min<=d&&d<=p.max;u&&d&&t(c,x({pointIx:h,series:i,seriesIx:o,dataItem:i.data[h],owner:this},l))}},nc.prototype.formatPointValue=function(t,e){t=t.value;return this.chartService.format.auto(e,t.x,t.y,t.value)},nc.prototype.animationPoints=function(){for(var t=this.points,e=[],o=0;o<t.length;o++)e.push((t[o]||{}).marker);return e};var rc,l=nc;function nc(t,e){rc.call(this,e),this.plotArea=t,this.chartService=t.chartService,this._initFields(),this.render()}e(l,{series:[],tooltip:{format:"{0}, {1}: {2}"},labels:{format:"{2}"},clip:!0}),x(l.prototype,{_bindPoint:mn.prototype._bindPoint});const sc=l;(ac=Va)&&(pc.__proto__=ac),((pc.prototype=Object.create(ac&&ac.prototype)).constructor=pc).prototype.initFields=function(){this.namedXAxes={},this.namedYAxes={}},pc.prototype.render=function(t){void 0===t&&(t=this.panes),this.bindCategories(),this.createAxes(t),this.createCharts(t),this.createAxisLabels()},pc.prototype.bindCategories=function(){for(var t=this.srcSeries||this.series,e=0;e<t.length;e++){for(var o=t[e],i=o.data||[],r=this.seriesAxes(o),n=r.xAxis,r=r.yAxis,s=ae(n.categories||[]),a=ae(r.categories||[]),p=0;p<i.length;p++){var h=Ki.current.bindPoint(o,p).valueFields,l=h.x,h=h.y;s.has(l)||s.add(l),a.has(h)||a.add(h)}n.categories=s.values(),r.categories=a.values()}},pc.prototype.createCharts=function(t){for(var e=this.groupSeriesByPane(),o=0;o<t.length;o++){var i=t[o],r=e[i.options.name||"default"]||[],r=(this.addToLegend(r),this.filterVisibleSeries(r));r&&this.createHeatmapChart(Sa(r,[Cr]),i)}},pc.prototype.createHeatmapChart=function(t,e){t=new sc(this,{series:t});this.appendChart(t,e)},pc.prototype.seriesPaneName=function(t){var e=this.options,o=t.xAxis,i=Ct([].concat(e.xAxis),function(t){return t.name===o})[0],r=t.yAxis,t=Ct([].concat(e.yAxis),function(t){return t.name===r})[0],e=(e.panes||[{}])[0].name||"default";return(i||{}).pane||(t||{}).pane||e},pc.prototype.seriesAxes=function(t){var e=this.options,o=[].concat(e.xAxis),i=t.xAxis,o=i?o.find(function(t){return t.name===i}):o[0],e=[].concat(e.yAxis),r=t.yAxis,t=r?e.find(function(t){return t.name===r}):e[0];if(!o)throw new Error("Unable to locate X axis with name "+i);if(t)return{xAxis:o,yAxis:t};throw new Error("Unable to locate Y axis with name "+r)},pc.prototype.createAxisLabels=function(){for(var t=this.axes,e=0;e<t.length;e++)t[e].createLabels()},pc.prototype.createXYAxis=function(t,e,o){for(var i,r=t.name,n=e?this.namedYAxes:this.namedXAxes,s=Object.assign({axisCrossingValue:0},t,{vertical:e,reverse:e||this.chartService.rtl?!t.reverse:t.reverse,justified:!1}),t=s.categories?s.categories[0]:null,a=[s.min,s.max,t],p=this.series,h=0;h<p.length;h++){var l=p[h],c=l[e?"yAxis":"xAxis"];if(c===s.name||0===o&&!c){c=Ki.current.bindPoint(l,0).valueFields;a.push(c[e?"y":"x"]);break}}for(var u=0;u<a.length;u++)if(a[u]instanceof Date){i=!0;break}t=new(Ca(s.type,F)||!s.type&&i?ei:qo)(s,this.chartService);if(t.axisIndex=o,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.mapCategories(),t},pc.prototype.createAxes=function(t){for(var e=this.options,o=[].concat(e.xAxis),i=[],r=[].concat(e.yAxis),n=[],s=0;s<o.length;s++)u(this.findPane(o[s].pane),t)&&i.push(this.createXYAxis(o[s],!1,s));for(var a=0;a<r.length;a++)u(this.findPane(r[a].pane),t)&&n.push(this.createXYAxis(r[a],!0,a));this.axisX=this.axisX||i[0],this.axisY=this.axisY||n[0]},pc.prototype.removeAxis=function(t){var e=t.options.name;ac.prototype.removeAxis.call(this,t),t.options.vertical?delete this.namedYAxes[e]:delete this.namedXAxes[e],t===this.axisX&&delete this.axisX,t===this.axisY&&delete this.axisY},pc.prototype._dispatchEvent=function(t,e,o){for(var i=t._eventCoordinates(e),r=new O(i.x,i.y),n=this.axes,s=n.length,a=[],p=[],h=0;h<s;h++){var l=n[h];_a(l.options.vertical?p:a,l.getCategory(r))}0<a.length&&0<p.length&&t.trigger(o,{element:Ht(e),originalEvent:e,x:Pa(a),y:Pa(p)})},pc.prototype.updateAxisOptions=function(t,e){var o=t.options.vertical,i=this.groupAxes(this.panes),i=(o?i.y:i.x).indexOf(t);hc(this.options,i,o,e),hc(this.originalOptions,i,o,e)},pc.prototype.crosshairOptions=function(t){return Object.assign({},t.options.crosshair,{zIndex:0})};var ac,h=pc;function pc(){ac.apply(this,arguments)}function hc(t,e,o,i){x([].concat(o?t.yAxis:t.xAxis)[e],i)}e(h,{xAxis:{},yAxis:{}}),x(h.prototype,ja);var lc,t=h,l="color",h="first",cc="max",uc="noteText",dc=(nh.current.register(Bp,[gr,_r,kr,Fr,fr,Dr,xr,Ar,mr,Ur,yr,Hr,zr,Ir,Gr,Sr,Lr,Nr]),nh.current.register(Rh,[Vr,jr,vr]),nh.current.register(Wh,[Pr]),nh.current.register(el,[br]),nh.current.register(c,[wr]),nh.current.register(On,[Tr,Mr,Or]),nh.current.register(N,[Br,Rr,Er]),nh.current.register(t,[Cr]),Ki.current.register([gr,_r,kr,Fr,fr,Dr],[tt],[n,l,uc,"errorLow","errorHigh"]),Ki.current.register([zr,Ir,Lr,Nr],["from","to"],[n,l,uc]),Ki.current.register([Gr,Sr],[tt],[n,l,uc,"summary"]),Ki.current.register([Tr,Mr,Or],[y,v],[l]),Ki.current.register([Br,Rr,Er],[tt],[l]),Ki.current.register([wr],[tt],[n,l,"visibleInLegend","visible"]),Na.current.register([gr,_r,kr,Fr,fr,Dr,Gr,Sr],{value:cc,color:h,noteText:h,errorLow:"min",errorHigh:cc}),Na.current.register([zr,Ir,Lr,Nr],{from:"min",to:cc,color:h,noteText:h}),Na.current.register([Br,Rr,Er],{value:cc,color:h}),Ki.current.register([Vr,jr,vr],[y,v],[l,uc,"xErrorLow","xErrorHigh","yErrorLow","yErrorHigh"]),Ki.current.register([vr],[y,v,"size"],[l,n,uc]),Ki.current.register([Cr],[y,v,tt],[l,uc]),Ki.current.register([xr,Ar],["open","high","low","close"],[n,l,"downColor",uc]),Na.current.register([xr,Ar],{open:cc,high:cc,low:"min",close:cc,color:h,downColor:h,noteText:h}),Ki.current.register([yr,Hr],["lower","q1","median","q3","upper","mean","outliers"],[n,l,uc]),Na.current.register([yr,Hr],{lower:cc,q1:cc,median:cc,q3:cc,upper:cc,mean:cc,outliers:h,color:h,noteText:h}),Ki.current.register([mr,Ur],["current","target"],[n,l,"visibleInLegend",uc]),Na.current.register([mr,Ur],{current:cc,target:cc,color:h,noteText:h}),Ki.current.register([Pr,br],[tt],[n,l,"explode","visibleInLegend","visible"]),[n,tt,y,v]),c=((lc=b.Class)&&(L.__proto__=lc),((L.prototype=Object.create(lc&&lc.prototype)).constructor=L).prototype._initElement=function(t){for(this._setElementClass(t),t.style.position="relative";t.firstChild;)t.removeChild(t.firstChild);this.element=t},L.prototype._setElementClass=function(t){it(t,"k-chart")},L.prototype._initTheme=function(t,e){for(var o=[],i=t.series||[],r=0;r<i.length;r++)o.push(Object.assign({},i[r]));t.series=o;for(var n=t,s=dc,a=0;a<s.length;a++){var p=s[a]+"Axes";n[p]&&(n[s[a]+"Axis"]=n[p],delete n[p])}this.applyDefaults(t,e),null===t.seriesColors&&delete t.seriesColors,this.options=x({},e,t),this.applySeriesColors()},L.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)}},L.prototype.resize=function(t){var e=this.getSize(),o=this._size,i=0<e.width||0<e.height;t||i&&(!o||e.width!==o.width||e.height!==o.height)?(this._size=e,this._resize(e,t),this.trigger("resize",e)):i&&this._selections&&Yt(this._selections,function(t){return!t.visible})&&(this._destroySelections(),this._setupSelection())},L.prototype._resize=function(){this._noTransitionsRedraw()},L.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()},L.prototype.getAxis=function(t){return Di(t,this._plotArea.axes)},L.prototype.findAxisByName=function(t){return this.getAxis(t)},L.prototype.findPaneByName=function(t){for(var e=this._plotArea.panes,o=0;o<e.length;o++)if(e[o].options.name===t)return new Fi(e[o])},L.prototype.findPaneByIndex=function(t){var e=this._plotArea.panes;if(e[t])return new Fi(e[t])},L.prototype.plotArea=function(){return new Ni(this._plotArea)},L.prototype.toggleHighlight=function(t,e){var o,i,r=this._plotArea,n=(r.srcSeries||r.series||[])[0],e=lt(e)?r.filterPoints(e):(ut(e)?(o=e.series,i=e.category):o=i=e,n.type===br?fc(r.pointsBySeriesName(o),i):n.type===Pr||n.type===wr?fc((r.charts[0]||{}).points,i):r.pointsBySeriesName(o));e&&this.togglePointsHighlight(t,e)},L.prototype.togglePointsHighlight=function(t,e){for(var o=this._highlight,i=0;i<e.length;i++)o.togglePointHighlight(e[i],t)},L.prototype.showTooltip=function(t){var e,o,i=this._sharedTooltip(),r=this._tooltip,n=this._plotArea;lt(t)?(e=n.findPoint(t))&&i&&(o=e.categoryIx):i&&P(t)&&(o=n.categoryAxis.categoryIndex(t)),i?0<=o&&(n=this._plotArea.pointsByCategoryIndex(o),r.showAt(n)):e&&r.show(e)},L.prototype.hideTooltip=function(){this._tooltip.hide()},L.prototype._initSurface=function(){var t=this.surface,e=this._surfaceWrap(),o=this.options.chartArea||{};o.width&&jt(e,{width:o.width}),o.height&&jt(e,{height:o.height}),t&&t.options.type===this.options.renderAs?(this.surface.clear(),this.surface.resize()):(this._destroySurface(),this.surface=b.drawing.Surface.create(e,{type:this.options.renderAs}),this.surface.bind("mouseenter",this._surfaceMouseenterHandler),this.surface.bind("mouseleave",this._surfaceMouseleaveHandler))},L.prototype._surfaceWrap=function(){return this.element},L.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 Lp,this._setupSelection(),this._createPannable(),this._createZoomSelection(),this._createMousewheelZoom(),this.trigger("render"),_c(this._plotArea.panes),this._navState||this._cancelDomEvents()},L.prototype.exportVisual=function(t){var e,o;return t&&(t.width||t.height||t.options)?(o=this.options,t=x({},t.options,{chartArea:{width:t.width,height:t.height}}),xc(this._originalOptions,t),this.options=x({},this._originalOptions,t),this._initTheme(this.options,this._theme),this.bindCategories(),(t=this._getModel()).renderVisual(),_c(t._plotArea.panes),e=t.visual,this.options=o):e=this.surface.exportVisual(),e},L.prototype._sharedTooltip=function(){return this._plotArea instanceof Bp&&this.options.tooltip&&this.options.tooltip.shared},L.prototype._createPannable=function(){var t=this.options;!1!==t.pannable&&(this._pannable=new Dp(this._plotArea,t.pannable))},L.prototype._createZoomSelection=function(){var t=this.options.zoomable,e=(t||{}).selection;!1!==t&&!1!==e&&(this._zoomSelection=new Wp(this,e))},L.prototype._createMousewheelZoom=function(){var t=this.options.zoomable,e=(t||{}).mousewheel;!1!==t&&!1!==e&&(this._mousewheelZoom=new qp(this,e))},L.prototype._toggleDragZoomEvents=function(){var t=this.options.pannable,e=this.options.zoomable,o=(e||{}).selection,i=(e||{}).mousewheel,t=!(t||!1!==e&&!1!==o||this.requiresHandlers([Kr,Zr,Qr])),o=(!1===e||!1===i)&&!this.requiresHandlers([$r,Jr,tn]),e=this.element;this._dragZoomEnabled&&t&&o?(e.style.touchAction=this._touchAction||"",this._dragZoomEnabled=!1):this._dragZoomEnabled||t&&o||(e.style.touchAction="none",this._dragZoomEnabled=!0),this._toggleDomEvents(!t,!o)},L.prototype._toggleDomEvents=function(t,e){var o=this.domEvents;o&&(o.toggleDrag&&o.toggleDrag(t),o.toggleZoom&&o.toggleZoom(e))},L.prototype._createTooltip=function(){var t=this.options.tooltip;return this._sharedTooltip()?this._createSharedTooltip(t):new dh(this.chartService,t)},L.prototype._createSharedTooltip=function(t){return new yh(this._plotArea,t)},L.prototype.applyDefaults=function(t,e){var o,i,r,n=t,s=(e||{}).axisDefaults||{};function a(t){var e=(t||{}).color||i.color,e=x({},s,s[o],i,i[o],{line:{color:e},labels:{color:e},title:{color:e}},t);return delete e[o],e}for(var p=0;p<dc.length;p++)i=n.axisDefaults||{},r=(r=[].concat(n[o=dc[p]+"Axis"])).map(a),n[o]=1<r.length?r:r[0];var h=t,t=e,l=h.series,c=l.length,u=h.seriesDefaults,d=x({},h.seriesDefaults),f=t?x({},t.seriesDefaults):{},g=x({},f);gc(d),gc(g);for(var y=0;y<c;y++){var v=l[y].type||h.seriesDefaults.type,v=x({data:[]},g,f[v],{tooltip:h.tooltip},d,u[v]);l[y]._defaults=v,l[y]=x({},v,l[y]),l[y].data=l[y].data||[]}},L.prototype.applySeriesColors=function(){for(var t=this.options,e=t.series,o=t.seriesColors||[],i=0;i<e.length;i++){var r=e[i],n=o[i%o.length],s=r._defaults;r.color=r.color||n,s&&(s.color=s.color||n)}},L.prototype._getModel=function(){var t=this.options,e=this._createPlotArea(),o=new Ee(this._modelOptions());return o.chart=this,o._plotArea=e,Ye.buildTitle(t.title,o),t.legend&&t.legend.visible&&o.append(new oh(e.options.legend,this.chartService)),o.append(e),o.reflow(),o},L.prototype._modelOptions=function(){var t=this.options,e=this.getSize();return x({transitions:t.transitions,width:e.width||600,height:e.height||400},t.chartArea)},L.prototype._createPlotArea=function(t){var e=this.options;return nh.current.create(t?[]:e.series,e,this.chartService)},L.prototype._setupSelection=function(){for(var t=this._plotArea.axes,e=this._selections=[],o=0;o<t.length;o++){var i,r=t[o],n=r.options;r instanceof qo&&n.select&&!n.vertical&&(i=r.range(),r=new ch(this,r,x({min:i.min,max:i.max},n.select)),e.push(r))}},L.prototype._selectStart=function(t){return this.trigger(en,t)},L.prototype._select=function(t){return this.trigger(on,t)},L.prototype._selectEnd=function(t){return this.trigger(rn,t)},L.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=(0,b.throttle)(this._mousemove.bind(this),20)},L.prototype.addObserver=function(t){t&&this.observers.push(t)},L.prototype.removeObserver=function(t){t=this.observers.indexOf(t);0<=t&&this.observers.splice(t,1)},L.prototype.requiresHandlers=function(t){for(var e=this.observers,o=0;o<e.length;o++)if(e[o].requiresHandlers(t))return!0},L.prototype.trigger=function(t,e){void 0===e&&(e={}),t===nn&&(e.anchor.point=this._toDocumentCoordinates(e.anchor.point));for(var o=(e.sender=this).observers,i=!1,r=0;r<o.length;r++)o[r].trigger(t,e)&&(i=!0);return i},L.prototype._attachEvents=function(){var t,e=this.element;this._touchAction=e.style.touchAction,It(e,((t={}).contextmenu=this._clickHandler,t[ln]=this._mousewheelHandler,t.mouseleave=this._mouseleaveHandler,t)),this._shouldAttachMouseMove()&&It(e,((t={}).mousemove=this._mousemove,t)),this.domEvents=co.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()},L.prototype._mouseleave=function(t){this._hoveredPoint&&(this._hoveredPoint.out(this,t),this._hoveredPoint=null),this._plotArea.hovered&&(this.trigger(Yr),this._plotArea.hovered=!1)},L.prototype._cancelDomEvents=function(){this.domEvents&&this.domEvents.cancel&&this.domEvents.cancel()},L.prototype._gesturestart=function(t){this._mousewheelZoom&&!this._stopChartHandlers(t)&&(this._gestureDistance=t.distance,this._unsetActivePoint(),this.surface.suspendTracking())},L.prototype._gestureend=function(t){this._zooming&&!this._stopChartHandlers(t)&&(this.surface&&this.surface.resumeTracking(),this._zooming=!1,this.trigger(tn,{}))},L.prototype._gesturechange=function(t){var e,o,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,o={delta:e,axisRanges:yc(this._plotArea.axes),originalEvent:t},!this._zooming&&this.trigger($r,o)||(t=this._eventCoordinates(t),this._zooming||(this._zooming=!0),(o.axisRanges=i.updateRanges(e,t))&&!this.trigger(Jr,o)&&i.zoom())))},L.prototype._mouseout=function(t){var e;t.element&&(e=this._drawingChartElement(t.element,t))&&e.leave&&e.leave(this,t.originalEvent)},L.prototype._start=function(t){var e=this._eventCoordinates(t);!this._stopChartHandlers(t)&&this._plotArea.backgroundContainsPoint(e)&&(this.requiresHandlers([Kr,Zr,Qr])&&this._startNavigation(t,e,Kr),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($r,{axisRanges:yc(this._plotArea.axes),originalEvent:t}))},L.prototype._move=function(t){var e=this._navState,o=this._pannable;if(!this._stopChartHandlers(t)){if(o){var i=o.move(t);i&&!this.trigger(Zr,{axisRanges:i,originalEvent:t})&&o.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(Zr,{axisRanges:r,originalEvent:t})}this._zoomSelection&&this._zoomSelection.move(t)}},L.prototype._end=function(t){var e;this._stopChartHandlers(t)||((e=this._pannable)&&e.end(t)?(this.surface.resumeTracking(),this.trigger(Qr,{axisRanges:yc(this._plotArea.axes),originalEvent:t}),this._suppressHover=!1,this.chartService.panning=!1):this._endNavigation(t,Qr),this._zoomSelection&&(e=this._zoomSelection.end(t))&&!this.trigger(Jr,{axisRanges:e,originalEvent:t})&&(this._zoomSelection.zoom(),this.trigger(tn,{axisRanges:e,originalEvent:t})))},L.prototype._stopChartHandlers=function(t){var e=this._selections||[];if(!e.length)return!1;var t=this._eventCoordinates(t),o=this._plotArea.paneByPoint(t);if(o)for(var i=0;i<e.length;i++)if(e[i].onPane(o))return!0},L.prototype._mousewheelZoomRate=function(){var t=(this.options.zoomable||{}).mousewheel||{};return M(t.rate,.3)},L.prototype._mousewheel=function(t){var e=this,o=Rt(t),i=this._mousewheelZoom,r=this._eventCoordinates(t);if(!this._stopChartHandlers(t)&&this._plotArea.backgroundContainsPoint(r))if(i){var n={delta:o,axisRanges:yc(this._plotArea.axes),originalEvent:t};!this._zooming&&this.trigger($r,n)||(t.preventDefault(),this._zooming||(this._unsetActivePoint(),this.surface.suspendTracking(),this._zooming=!0),this._mwTimeout&&clearTimeout(this._mwTimeout),n.axisRanges=i.updateRanges(o,r),n.axisRanges&&!this.trigger(Jr,n)&&i.zoom(),this._mwTimeout=setTimeout(function(){e.trigger(tn,n),e._zooming=!1,e.surface&&e.surface.resumeTracking()},150))}else{i=this._navState;if(i=i||this._startNavigation(t,r,$r)?i:this._navState){var s=i.totalDelta||o;i.totalDelta=s+o;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._mousewheelZoomRate(),r))}this.trigger(Jr,{delta:o,axisRanges:p,originalEvent:t}),this._mwTimeout&&clearTimeout(this._mwTimeout),this._mwTimeout=setTimeout(function(){e._endNavigation(t,tn)},150)}}},L.prototype._startNavigation=function(t,e,o){var i,r=this._model._plotArea,e=r.findPointPane(e),r=r.axes.slice(0);e&&(i=yc(r),this.trigger(o,{axisRanges:i,originalEvent:t})?this._cancelDomEvents():(this._suppressHover=!0,this._unsetActivePoint(),this._navState={axisRanges:i,pane:e,axes:r}))},L.prototype._endNavigation=function(t,e){this._navState&&(this.trigger(e,{axisRanges:this._navState.axisRanges,originalEvent:t}),this._suppressHover=!1,this._navState=null)},L.prototype._getChartElement=function(t,e){var o=this.surface.eventTarget(t);if(o)return this._drawingChartElement(o,t,e)},L.prototype._drawingChartElement=function(t,e,o){for(var i,r=t;r&&!i;)i=r.chartElement,r=r.parent;if(i)return i.aliasFor&&(i=i.aliasFor(e,this._eventCoordinates(e))),i=o&&(i=i.closest(o))&&i.aliasFor?i.aliasFor():i},L.prototype._eventCoordinates=function(t){t=Dt(t);return this._toModelCoordinates(t.x,t.y)},L.prototype._elementPadding=function(){var t,e;return this._padding||(t=(e=gt(this.element,["paddingLeft","paddingTop"])).paddingLeft,e=e.paddingTop,this._padding={top:e,left:t}),this._padding},L.prototype._toDocumentCoordinates=function(t){var e=this._elementPadding(),o=Vt(this.element);return{left:T(t.x+e.left+o.left),top:T(t.y+e.top+o.top)}},L.prototype._toModelCoordinates=function(t,e){var o=this.element,i=Vt(o),r=this._elementPadding(),o=$t(o).invert(),t=new b.geometry.Point(t-i.left-r.left,e-i.top-r.top).transform(o);return new O(t.x,t.y)},L.prototype._tap=function(t){var e=this,o=this.surface.eventTarget(t),i=this._drawingChartElement(o,t),r=this._sharedTooltip();this._startHover(o,t)||r||this._unsetActivePoint(),r&&this._trackSharedTooltip(this._eventCoordinates(t),t,!0),this._propagateClick(i,t),this.handlingTap=!0,setTimeout(function(){e.handlingTap=!1},0)},L.prototype._click=function(t){var e=this._getChartElement(t);this._propagateClick(e,t)},L.prototype._propagateClick=function(t,e){for(var o=t;o;)o.click&&o.click(this,e),o=o.parent},L.prototype._startHover=function(t,e){if(this._suppressHover)return!1;var t=this._drawingChartElement(t,e,function(t){return(t.hover||t.over)&&!(t instanceof Va)}),o=this._activePoint,i=1<this._plotArea.series.length,r=this._hasInactiveOpacity();return this._updateHoveredPoint(t,e),t&&o!==t&&t.hover?(this._activePoint=t,this._sharedTooltip()||t.hover(this,e)||(this._displayTooltip(t),r?this._displayInactiveOpacity(t,i):this._highlight.show(t))):!t&&r&&(i&&this._activeChartInstance&&(this._updateSeriesOpacity(t,!0),this._applySeriesOpacity(this._activeChartInstance.children,null,!0),this._activeChartInstance=null),this._highlight&&this._highlight.hide(),this._activePoint=null),t},L.prototype._displayTooltip=function(t){x({},this.options.tooltip,t.options.tooltip).visible&&this._tooltip.show(t)},L.prototype._displayInactiveOpacity=function(t,e,o){var i=this._activeChartInstance=this._chartInstanceFromPoint(t);i&&(e?(this._updateSeriesOpacity(t),this._applySeriesOpacity(i.children,null,!0),this._applySeriesOpacity(i.children,t.series),this._highlight.show(o||t)):i.supportsPointInactiveOpacity()?(e=this._getInactivePoints(t,i))&&e.length&&this._highlight.show(e,1-this._getInactiveOpacityForSeries(t.series)):this._highlight.show(t))},L.prototype._getInactivePoints=function(e,t){return this._getAllPointsOfType(t,e.constructor).filter(function(t){return t!==e})},L.prototype._getAllPointsOfType=function(t,e){for(var o=[],i=0;i<t.children.length;i++){var r=t.children[i];r.constructor===e?o.push(r):r.children&&r.children.length&&(o=o.concat(this._getAllPointsOfType(r,e)))}return o},L.prototype._updateHoveredPoint=function(t,e){var o=this._hoveredPoint;o&&o!==t&&(o.out(this,e),this._hoveredPoint=null),t&&o!==t&&t.over&&(this._hoveredPoint=t).over(this,e)},L.prototype._updateSeriesOpacity=function(t,e){for(var o=this._plotArea,i=o.series.length,r=0;r<i;r++){var n=o.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))}},L.prototype._applySeriesOpacity=function(t,e,o,i){for(var r=0;r<t.length;r++){var n,s=t[r],a=s.series||i;a&&(a.highlight||{}).visible&&s.visual&&(n=(i||s.series).opacity,a===e&&!o||s.visual.opacity(o?1:n)),s.children&&s.children.length&&this._applySeriesOpacity(s.children,e,o,s.series)}},L.prototype._chartInstanceFromPoint=function(t){for(var e=t.parent;e&&!e.plotArea;)e=e.parent;return e},L.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},L.prototype._getInactiveOpacityForSeries=function(t){var e=this.options.seriesDefaults.highlight.inactiveOpacity;return t.highlight.inactiveOpacity||e||t.opacity||1},L.prototype._getDefaultOpacityForSeries=function(t){return t.defaultOpacity||t.opacity||1},L.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),It(document,((t={}).mousemove=this._mouseMoveTrackHandler,t)))},L.prototype._mouseMoveTracking=function(t){var e=this.options,o=this._tooltip,i=this._highlight,r=this._activePoint,n=this._eventCoordinates(t);this._plotArea.box.containsPoint(n)?r&&r.tooltipTracking&&r.series&&r.parent.getNearestPoint&&(n=r.parent.getNearestPoint(n.x,n.y,r.seriesIx))&&n!==r&&!(this._activePoint=n).hover(this,t)&&(x({},e.tooltip,n.options.tooltip).visible&&o.show(n),i.show(n)):(Wt(document,((r={}).mousemove=this._mouseMoveTrackHandler,r)),this._unsetActivePoint(),this._mouseMoveTrackHandler=null)},L.prototype._mousemove=function(t){var e,o=this._eventCoordinates(t),i=this._plotArea;this._trackCrosshairs(o),i.hover&&((e=i.backgroundContainsPoint(o))?(i.hovered=!0,this._plotArea.hover(this,t)):i.hovered&&!e&&(this.trigger(Yr),i.hovered=!1)),this._sharedTooltip()&&this._trackSharedTooltip(o,t)},L.prototype._trackCrosshairs=function(t){for(var e=this._plotArea.crosshairs,o=0;o<e.length;o++){var i=e[o];i.box.containsPoint(t)?i.showAt(t):i.hide()}},L.prototype._trackSharedTooltip=function(t,e,o){var i,r,n,s,a,p,h;this._suppressHover||(i=this.options.tooltip,a=this._plotArea,s=this._plotArea.categoryAxis,r=this._tooltip,n=this._highlight,a.backgroundContainsPoint(t)?(s=s.pointCategoryIndex(t))!==this._tooltipCategoryIx||!this._sharedHighlight&&o?((h=(p=(a=a.pointsByCategoryIndex(s)).map(function(t){return t.eventArgs(e)}))[0]||{}).categoryPoints=p,0<a.length&&!this.trigger(Xr,h)?(i.visible&&r.showAt(a,t),n.show(a),this._sharedHighlight=!0):r.hide(),this._tooltipCategoryIx=s):o&&this._sharedHighlight&&(n.hide(),r.hide(),this._sharedHighlight=!1):this._sharedHighlight&&(n.hide(),r.hide(),this._tooltipCategoryIx=null,this._sharedHighlight=!1))},L.prototype.hideElements=function(t){var e=this._plotArea;this._mousemove.cancel(),e.hideCrosshairs(),this._unsetActivePoint(t)},L.prototype._unsetActivePoint=function(t){var e=this._tooltip,o=this._highlight;this._activePoint=null,this._hoveredPoint=null,!e||t&&t.keepTooltipOpen||e.hide(),this._tooltipCategoryIx=null,this._sharedHighlight=!1,o&&o.hide()},L.prototype._deferRedraw=function(){this._redraw()},L.prototype._clearRedrawTimeout=function(){this._redrawTimeout&&(clearInterval(this._redrawTimeout),this._redrawTimeout=null)},L.prototype.bindCategories=function(){for(var t=this.options,e=[].concat(t.categoryAxis),o=0;o<e.length;o++){var i=e[o];!1!==i.autoBind&&this.bindCategoryAxisFromSeries(i,o)}},L.prototype.bindCategoryAxisFromSeries=function(t,e){for(var o,i,r=this.options.series,n=r.length,s=new At,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 f=(o=Aa(t,Yi(l.categoryField,u[0])))?ka:Yi,g=0;g<d;g++){var y=u[g],v=f(l.categoryField,y,this.chartService.intl);!o&&s.get(v)||(a.push([v,y]),o||s.set(v,!0))}}0<a.length?(i=function(t){for(var e=t.length,o=[],i=0;i<e;i++)for(var r=t[i],n=r.length,s=0;s<n;s++)o[s]=o[s]||[],o[s].push(r[s]);return o}(a=o?function(t){for(var e=function(t,e){void 0===e&&(e=Vo);for(var o=1,i=t.length;o<i;o++)if(e(t[o],t[o-1])<0){t.sort(e);break}return t}(a,t=void 0===t?Vo:t),o=e.length,i=0<o?[e[0]]:[],r=1;r<o;r++)0!==t(e[r],Ft(i))&&i.push(e[r]);return i}(function(t,e){return Vo(t[0],e[0])}):a),t.categories=i[0]):p&&(t.categories=[])},L.prototype._isBindable=function(t){for(var e=Ki.current.valueFields(t),o=!0,i=0;i<e.length;i++){var r=e[i];if(r===tt?r="field":r+="Field",!P(t[r])){o=!1;break}}return o},L.prototype._noTransitionsRedraw=function(){var t,e=this.options;!1!==e.transitions&&(t=!(e.transitions=!1)),this._redraw(),t&&(e.transitions=!0)},L.prototype._legendItemHover=function(e,o){var t=this._plotArea,i=this._highlight,r=(t.srcSeries||t.series)[e],n=u(r.type,[Pr,br,wr])?t.findPoint(function(t){return t.series.index===e&&t.index===o}):t.pointsBySeriesIndex(e);this._hasInactiveOpacity()&&r.visible&&n?(r=1<t.series.length,t=n.length?n[0]:n,this._displayInactiveOpacity(t,r,n)):i.show(n)},L.prototype._shouldAttachMouseMove=function(){return this._plotArea.crosshairs.length||this._tooltip&&this._sharedTooltip()||this.requiresHandlers([qr,Yr])},L.prototype.updateMouseMoveHandler=function(){var t;Wt(this.element,((t={}).mousemove=this._mousemove,t)),this._shouldAttachMouseMove()&&It(this.element,((t={}).mousemove=this._mousemove,t))},L.prototype.applyOptions=function(t,e){xc(this._originalOptions,t),this._originalOptions=x(this._originalOptions,t),this.options=x({},this._originalOptions),e&&(this._theme=e,this.chartService.theme=e),this._initTheme(this.options,this._theme),this._toggleDragZoomEvents()},L.prototype.setOptions=function(t,e){this.applyOptions(t,e),this.bindCategories(),this.redraw(),this.updateMouseMoveHandler()},L.prototype.setDirection=function(t){this.chartService.rtl=Boolean(t),this.surface&&"svg"===this.surface.type&&this._destroySurface()},L.prototype.setIntlService=function(t){this.chartService.intl=t},L.prototype.noTransitionsRedraw=function(){this._noTransitionsRedraw()},L.prototype.destroy=function(){var t;this._destroyed=!0,Wt(this.element,((t={}).contextmenu=this._clickHandler,t[ln]=this._mousewheelHandler,t.mousemove=this._mousemove,t.mouseleave=this._mouseleaveHandler,t)),this.domEvents&&(this.domEvents.destroy(),delete this.domEvents),this._mouseMoveTrackHandler&&Wt(document,((t={}).mousemove=this._mouseMoveTrackHandler,t)),this._destroyView(),this._destroySurface(),this._clearRedrawTimeout()},L.prototype._destroySurface=function(){var t=this.surface;t&&(t.unbind("mouseenter",this._surfaceMouseenterHandler),t.unbind("mouseleave",this._surfaceMouseleaveHandler),t.destroy(),this.surface=null)},L.prototype._destroySelections=function(){var t=this._selections;if(t)for(;0<t.length;)t.shift().destroy()},L.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)},L);function L(t,e,o,i){var r=this,i=(void 0===i&&(i={}),lc.call(this),this.observers=[],this.addObserver(i.observer),this.chartService=new po(this,i),this.chartService.theme=o,this._initElement(t),x({},this.options,e));this._originalOptions=x({},i),this._theme=o,this._initTheme(i,o),this._initHandlers(),this._initSurface(),this.bindCategories(),Xt.preloadFonts(e,function(){r.fontLoaded=!0,r._destroyed||(r.trigger("init"),r._redraw(),r._attachEvents())})}function fc(t,e){if(t)for(var o=0;o<t.length;o++)if(t[o].category===e)return[t[o]]}function gc(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 yc(t){for(var e={},o=0;o<t.length;o++){var i=t[o],r=i.options.name;r&&(e[r]=i.range())}return e}var vc,mc=["data","categories"];function xc(t,e){for(var o in e){var i,r,n;!u(o,mc)&&e.hasOwnProperty(o)&&(i=e[o],r=t[o],P(r)&&((n=null===i)||!P(i)?(delete t[o],n&&delete e[o]):r&&ut(i)&&ut(r)&&xc(r,i)))}}function _c(t){for(var e=0;e<t.length;e++)t[e].notifyRender()}e(c,{renderAs:"",chartArea:{},legend:{visible:!0,labels:{}},categoryAxis:{},seriesDefaults:{type:_r,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});const bc=c;function wc(){vc.apply(this,arguments)}(vc=yh)&&(wc.__proto__=vc),((wc.prototype=Object.create(vc&&vc.prototype)).constructor=wc).prototype._slotAnchor=function(t,e){var o=this.plotArea.categoryAxis.options.vertical,i=o?{horizontal:"left",vertical:"center"}:{horizontal:"center",vertical:"bottom"};return{point:o?new O(this.plotArea.box.x2,e.center().y):new O(e.center().x,-2),align:i}},wc.prototype._defaultAnchor=function(t,e){return this._slotAnchor({},e)};const Cc=wc;var Sc=[gr,mr];function kc(t){for(var e=[],o=0;o<t.length;o++){var i=t[o];e[o]=i.style.display,i.style.display="none"}return e}function Ac(t,e){for(var o=0;o<t.length;o++)t[o].style.display=e[o]}function Pc(t){return m(t)?[t]:t}(Tc=bc)&&(Oc.__proto__=Tc),((Oc.prototype=Object.create(Tc&&Tc.prototype)).constructor=Oc).prototype._setElementClass=function(t){it(t,"k-sparkline")},Oc.prototype._initElement=function(t){Tc.prototype._initElement.call(this,t),this._initialWidth=Math.floor(jt(t).width)},Oc.prototype._resize=function(){var t=this.element,e=kc(t.childNodes);this._initialWidth=Math.floor(jt(t).width),Ac(t.childNodes,e),Tc.prototype._resize.call(this)},Oc.prototype._modelOptions=function(){var t=this.options,e=this._surfaceWrap(),o=kc(e.childNodes),i=document.createElement("span"),t=(i.innerHTML=" ",e.appendChild(i),x({width:this._autoWidth,height:jt(e).height,transitions:t.transitions},t.chartArea,{inline:!0,align:!1}));return jt(e,{width:t.width,height:t.height}),e.removeChild(i),Ac(e.childNodes,o),this.surface&&this.surface.resize(),t},Oc.prototype._surfaceWrap=function(){var t;return this.stage||(t=this.stage=document.createElement("span"),this.element.appendChild(t)),this.stage},Oc.prototype._createPlotArea=function(t){t=Tc.prototype._createPlotArea.call(this,t);return this._autoWidth=this._initialWidth||this._calculateWidth(t),t},Oc.prototype._calculateWidth=function(t){for(var e=this.options,o=A(e.chartArea.margin),i=t.charts,r=this._surfaceWrap(),n=0,s=0;s<i.length;s++){var a=i[s],p=(a.options.series||[])[0];if(p){if(p.type===gr)return 150;if(p.type===mr)return 150;if(p.type===Pr)return jt(r).height;var h=a.categoryAxis;h&&(h=h.categoriesCount()*(!a.options.isStacked&&u(p.type,[_r,Ur])?a.seriesOptions.length:1),n=Math.max(n,h))}}t=n*e.pointWidth;return 0<t&&(t+=o.left+o.right),t},Oc.prototype._createSharedTooltip=function(t){return new Cc(this._plotArea,t)},Oc.normalizeOptions=function(t){t=Pc(t);return(t=ot(t)?{seriesDefaults:{data:t}}:x({},t)).series||(t.series=[{data:Pc(t.data)}]),x(t,{seriesDefaults:{type:t.type}}),t=u(t.series[0].type,Sc)||u(t.seriesDefaults.type,Sc)?x({},{categoryAxis:{crosshair:{visible:!1}}},t):t};var Tc,Mc,On=Oc;function Oc(){Tc.apply(this,arguments)}e(On,{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}]});const Bc=On;function Rc(){Mc.apply(this,arguments)}(Mc=b.drawing.Animation)&&(Rc.__proto__=Mc),((Rc.prototype=Object.create(Mc&&Mc.prototype)).constructor=Rc).prototype.setup=function(){this._initialOpacity=parseFloat(gt(this.element,"opacity").opacity)},Rc.prototype.step=function(t){gt(this.element,{opacity:String(Pt(this._initialOpacity,0,t))})},Rc.prototype.abort=function(){Mc.prototype.abort.call(this),gt(this.element,{display:"none",opacity:String(this._initialOpacity)})},Rc.prototype.cancel=function(){Mc.prototype.abort.call(this),gt(this.element,{opacity:String(this._initialOpacity)})};const Ec=Rc;function Lc(t,e){var o=document.createElement("div");return o.className=t,e&&(o.style.cssText=e),o}(Ic=b.Class)&&(zc.__proto__=Ic),((zc.prototype=Object.create(Ic&&Ic.prototype)).constructor=zc).prototype.createElements=function(){var t=this.element=Lc("k-navigator-hint","display: none; position: absolute; top: 1px; left: 1px;"),e=this.tooltip=Lc("k-tooltip k-chart-tooltip"),o=this.scroll=Lc("k-scroll");e.innerHTML=" ",t.appendChild(e),t.appendChild(o)},zc.prototype.show=function(t,e,o){var i=this.element,r=this.options,n=this.scroll,s=this.tooltip,a=d(f(t)+f(e-t)/2),p=.4*o.width(),h=o.center().x-p,l=(o.center().x-h)/(r.max-r.min),a=a-r.min,c=this.chartService.intl.format(r.format,t,e),r=xt(r),r=(this.clearHideTimeout(),this._visible||(gt(i,{visibility:"hidden",display:"block"}),this._visible=!0),r&&(c=r({from:t,to:e})),s.innerHTML=c,gt(s,{left:o.center().x-s.offsetWidth/2,top:o.y1}),gt(s,["marginTop","borderTopWidth","height"]));gt(n,{width:p,left:h+a*l,top:o.y1+r.marginTop+r.borderTopWidth+r.height/2}),gt(i,{visibility:"visible"})},zc.prototype.clearHideTimeout=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this._hideAnimation&&this._hideAnimation.cancel()},zc.prototype.hide=function(){var t=this;this.clearHideTimeout(),this._hideTimeout=setTimeout(function(){t._visible=!1,t._hideAnimation=new Ec(t.element),t._hideAnimation.setup(),t._hideAnimation.play()},this.options.hideDelay)},zc.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};var Ic,N=zc;function zc(t,e,o){Ic.call(this),this.options=x({},this.options,o),this.container=t,this.chartService=e;o=gt(t,["paddingLeft","paddingTop"]);this.chartPadding={top:o.paddingTop,left:o.paddingLeft},this.createElements(),t.appendChild(this.element)}e(N,{format:"{0:d} - {1:d}",hideDelay:500});const Vc=N;var jc,Dc="_navigator",Hc=Dc;function Uc(t){jc.call(this),this.chart=t;var e=this.options=x({},this.options,t.options.navigator),o=e.select;o&&(o.from=this.parseDate(o.from),o.to=this.parseDate(o.to)),P(e.hint.visible)||(e.hint.visible=e.visible),this.chartObserver=new Mt(this,((o={}).drag="_drag",o.dragEnd="_dragEnd",o.zoom="_zoom",o.zoomEnd="_zoomEnd",o)),t.addObserver(this.chartObserver)}function Fc(){}(jc=b.Class)&&(Uc.__proto__=jc),((Uc.prototype=Object.create(jc&&jc.prototype)).constructor=Uc).prototype.parseDate=function(t){return No(this.chart.chartService.intl,t)},Uc.prototype.clean=function(){this.selection&&(this.selection.destroy(),this.selection=null),this.hint&&(this.hint.destroy(),this.hint=null)},Uc.prototype.destroy=function(){this.chart&&(this.chart.removeObserver(this.chartObserver),delete this.chart),this.clean()},Uc.prototype.redraw=function(){this._redrawSelf(),this.initSelection()},Uc.prototype.initSelection=function(){var t=this.chart,e=this.options,o=this.mainAxis(),i=o.roundedRange(),r=i.min,i=i.max,n=e.select,s=n.from,a=n.to,n=n.mousewheel,p=(Fc.prototype=o,new Fc);0!==o.categoriesCount()&&(this.clean(),p.box=o.box,this.selection=new ch(t,p,{min:r,max:i,from:s||r,to:a||i,mousewheel:M(n,{zoom:"left"}),visible:e.visible},new Mt(this,{selectStart:"_selectStart",select:"_select",selectEnd:"_selectEnd"})),e.hint.visible&&(this.hint=new Vc(t.element,t.chartService,{min:r,max:i,template:xt(e.hint),format:e.hint.format})))},Uc.prototype.setRange=function(){var t=this.chart._createPlotArea(!0).namedCategoryAxes[Hc].roundedRange(),e=t.min,t=t.max,o=this.options.select||{},i=o.from||e,r=o.to||t;this.options.select=x({},o,{from:i=i<e?e:i,to:r=t<r?t:r}),this.filterAxes()},Uc.prototype._redrawSelf=function(t){var e=this.chart._plotArea;e&&e.redraw(Ft(e.panes),t)},Uc.prototype.redrawSlaves=function(){var t=this.chart,e=t._plotArea,o=e.panes.slice(0,-1);e.srcSeries=t.options.series,e.options.categoryAxis=t.options.categoryAxis,e.clearSeriesPointsCache(),e.redraw(o)},Uc.prototype._drag=function(t){var e=this.chart,o=this.selection,i=e._eventCoordinates(t.originalEvent),r=this.mainAxis(),n=r.roundedRange(),r=r.pane.box.containsPoint(i),i=e._plotArea.categoryAxis,e=t.axisRanges[i.options.name],t=this.options.select;e&&!r&&o&&(i=t.from&&t.to?f(t.to)-f(t.from):f(o.options.to)-f(o.options.from),r=d(_(f(e.min),n.min,f(n.max)-i)),t=d(_(f(r)+i,f(n.min)+i,n.max)),this.options.select={from:r,to:t},this.options.liveDrag&&(this.filterAxes(),this.redrawSlaves()),o.set(r,t),this.showHint(r,t))},Uc.prototype._dragEnd=function(){this.filterAxes(),this.filter(),this.redrawSlaves(),this.hint&&this.hint.hide()},Uc.prototype.readSelection=function(){var t=this.selection.options,e=t.from,t=t.to,o=this.options.select;o.from=e,o.to=t},Uc.prototype.filterAxes=function(){for(var t=this.options.select,e=this.chart.options.categoryAxis,o=(t=void 0===t?{}:t).from,i=t.to,r=0;r<e.length;r++){var n=e[r];n.pane!==Dc&&(n.min=o,n.max=i)}},Uc.prototype.filter=function(){var t,e,o=this.chart,i=this.options.select;o.requiresHandlers(["navigatorFilter"])&&(e=this.mainAxis(),t={from:i.from,to:i.to},"category"!==e.options.type&&(e=new ei(x({baseUnit:"fit"},o.options.categoryAxis[0],{categories:[i.from,i.to]}),o.chartService).options,t.from=Lo(e.min,-e.baseUnitStep,e.baseUnit),t.to=Lo(e.max,e.baseUnitStep,e.baseUnit)),this.chart.trigger("navigatorFilter",t))},Uc.prototype._zoom=function(t){var e,o,i=this.chart._plotArea.categoryAxis,r=this.selection,n=this.options,s=n.select,n=n.liveDrag,a=this.mainAxis(),p=t.delta;r&&(e=a.categoryIndex(r.options.from),a=a.categoryIndex(r.options.to),o=this.chart._eventCoordinates(t.originalEvent),t.originalEvent.preventDefault(),1<Math.abs(p)&&(p*=3),1<a-e?(r.zoom(p,o),this.readSelection()):(i.options.min=s.from,s.from=i.scaleRange(-t.delta*this.chart._mousewheelZoomRate(),o).min),n&&(this.filterAxes(),this.redrawSlaves()),r.set(s.from,s.to),this.showHint(this.options.select.from,this.options.select.to))},Uc.prototype._zoomEnd=function(t){this._dragEnd(t)},Uc.prototype.showHint=function(t,e){var o=this.chart._plotArea;this.hint&&this.hint.show(t,e,o.backgroundBox())},Uc.prototype._selectStart=function(t){return this.chart._selectStart(t)},Uc.prototype._select=function(t){return this.showHint(t.from,t.to),this.chart._select(t)},Uc.prototype._selectEnd=function(t){return this.hint&&this.hint.hide(),this.readSelection(),this.filterAxes(),this.filter(),this.redrawSlaves(),this.chart._selectEnd(t)},Uc.prototype.mainAxis=function(){var t=this.chart._plotArea;if(t)return t.namedCategoryAxes[Hc]},Uc.prototype.select=function(t,e){var o=this.options.select;return t&&e&&(o.from=this.parseDate(t),o.to=this.parseDate(e),this.filterAxes(),this.filter(),this.redrawSlaves(),this.selection.set(t,e)),{from:o.from,to:o.to}},Uc.setup=function(t,e){var o,i,r;void 0===e&&(e={}),(t=void 0===t?{}:t).__navi||(t.__navi=!0,o=x({},e.navigator,t.navigator),i=t.panes=[].concat(t.panes),r=x({},o.pane,{name:Dc}),o.visible||(r.visible=!1,r.height=.1),i.push(r),Uc.attachAxes(t,o),Uc.attachSeries(t,o,e))},Uc.attachAxes=function(t,e){var o=e.series||[],i=t.categoryAxis=[].concat(t.categoryAxis),t=t.valueAxis=[].concat(t.valueAxis),o=0===Sa(o,Wr).length,o=x({type:"date",pane:Dc,roundToBaseUnit:!o,justified:o,_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]}}),r=e.categoryAxis;i.push(x({},o,{maxDateGroups:200},r,{name:Hc,title:null,baseUnit:"fit",baseUnitStep:"auto",labels:{visible:!1},majorTicks:{visible:!1}}),x({},o,r,{name:Hc+"_labels",maxDateGroups:20,baseUnitStep:"auto",labels:{position:""},plotBands:[],autoBaseUnitSteps:{minutes:[]},_overlap:!0}),x({},o,r,{name:Hc+"_ticks",maxDateGroups:200,majorTicks:{width:.5},plotBands:[],title:null,labels:{visible:!1,mirror:!0},_overlap:!0})),t.push(x({name:Hc,pane:Dc,majorGridLines:{visible:!1},visible:!1},e.valueAxis))},Uc.attachSeries=function(t,e,o){for(var i=t.series=t.series||[],r=[].concat(e.series||[]),n=o.seriesColors,s=e.seriesDefaults,a=0;a<r.length;a++)i.push(x({color:n[a%n.length],categoryField:e.dateField,visibleInLegend:!1,tooltip:{visible:!1}},s,r[a],{axis:Hc,categoryAxis:Hc,autoBind:e.autoBindElements}))};const Nc=Uc;(Gc=bc)&&(Wc.__proto__=Gc),((Wc.prototype=Object.create(Gc&&Gc.prototype)).constructor=Wc).prototype.applyDefaults=function(t,e){var o=jt(this.element).width||600,o={seriesDefaults:{categoryField:t.dateField},axisDefaults:{categoryAxis:{name:"default",majorGridLines:{visible:!1},labels:{step:2},majorTicks:{visible:!1},maxDateGroups:Math.floor(o/28)}}},e=e&&x({},e,o);Nc.setup(t,e),Gc.prototype.applyDefaults.call(this,t,e)},Wc.prototype._setElementClass=function(t){it(t,"k-chart k-stockchart")},Wc.prototype.setOptions=function(t){this.destroyNavigator(),Gc.prototype.setOptions.call(this,t)},Wc.prototype.noTransitionsRedraw=function(){var t=this.options.transitions;this.options.transitions=!1,this._fullRedraw(),this.options.transitions=t},Wc.prototype._resize=function(){this.noTransitionsRedraw()},Wc.prototype._redraw=function(){var t=this.navigator;!this._dirty()&&t&&t.options.partialRedraw?t.redrawSlaves():this._fullRedraw()},Wc.prototype._dirty=function(){var t=this.options,t=Ct([].concat(t.series,t.navigator.series),function(t){return t&&t.visible}).length,e=this._seriesCount!==t;return this._seriesCount=t,e},Wc.prototype._fullRedraw=function(){var t=this.navigator;t||(t=this.navigator=new Nc(this),this.trigger("navigatorCreated",{navigator:t})),t.clean(),t.setRange(),Gc.prototype._redraw.call(this),t.initSelection()},Wc.prototype._trackSharedTooltip=function(t){var e=this._plotArea.paneByPoint(t);e&&e.options.name===Dc?this._unsetActivePoint():Gc.prototype._trackSharedTooltip.call(this,t)},Wc.prototype.bindCategories=function(){Gc.prototype.bindCategories.call(this),this.copyNavigatorCategories()},Wc.prototype.copyNavigatorCategories=function(){for(var t,e=[].concat(this.options.categoryAxis),o=0;o<e.length;o++){var i=e[o];i.name===Hc?t=i.categories:t&&i.pane===Dc&&(i.categories=t)}},Wc.prototype.destroyNavigator=function(){this.navigator&&(this.navigator.destroy(),this.navigator=null)},Wc.prototype.destroy=function(){this.destroyNavigator(),Gc.prototype.destroy.call(this)},Wc.prototype._stopChartHandlers=function(t){var e=this._eventCoordinates(t),e=this._plotArea.paneByPoint(e);return Gc.prototype._stopChartHandlers.call(this,t)||e&&e.options.name===Dc},Wc.prototype._toggleDragZoomEvents=function(){this._dragZoomEnabled||(this.element.style.touchAction="none",this._dragZoomEnabled=!0)};var Gc,t=Wc;function Wc(){Gc.apply(this,arguments)}e(t,{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}});const Xc=t;var qc="arrowPointer",Yc="barPointer",Zc=Math.PI/180,Qc="inside",uc="linear",Kc="outside",cc="radialPointer",h="radialRangePointer";function $c(t,e){var o=t.getOrigin(),i=t.getSize(),e=A(e);return t.setOrigin([o.x-e.left,o.y-e.top]),t.setSize([i.width+(e.left+e.right),i.height+(e.top+e.bottom)]),t}var Jc=b.drawing.Group,tu=b.drawing.Path,eu=b.drawing.Text;function ou(t,e){var o=t.box,i=t.children[0].box,r=e.border||{},n=e.background||"",o=tu.fromRect(new b.geometry.Rect([o.x1,o.y1],[o.width(),o.height()]),{stroke:{}}),t=new eu(t.text,new b.geometry.Point(i.x1,i.y1),{font:e.font,fill:{color:e.color}}),i=$c(t.bbox().clone(),e.padding),e=tu.fromRect(i,{stroke:{color:r.width?r.color:"",width:r.width,opacity:r.opacity,dashType:r.dashType,lineJoin:"round",lineCap:"round"},fill:{color:n}}),i=new Jc;return i.append(o),i.append(e),i.append(t),i}function iu(t,e,o){var i=P(t.from)?t.from:Y,r=P(t.to)?t.to:q;return t.from=Math.max(Math.min(r,i),e),t.to=Math.min(Math.max(r,i),o),t}function ru(t,e){e=A(e);return e.left=-e.left,e.top=-e.top,e.right=-e.right,e.bottom=-e.bottom,$c(t,e)}var nu,su=b.drawing.Path,au=b.drawing.Surface,l=((nu=b.Class)&&(pu.__proto__=nu),((pu.prototype=Object.create(nu&&nu.prototype)).constructor=pu).prototype.destroy=function(){this.surface&&(this.surface.destroy(),this.surface=null),delete this.element,delete this.surfaceElement},pu.prototype.value=function(t){var e=this.pointers[0];if(0===arguments.length)return e.value();e.value(t),this._setValueOptions(t)},pu.prototype._draw=function(){var t=this.surface;t.clear(),t.draw(this._visuals)},pu.prototype.exportVisual=function(){return this._visuals},pu.prototype.allValues=function(t){var e=this.pointers,o=[];if(0===arguments.length){for(var i=0;i<e.length;i++)o.push(e[i].value());return o}if(ot(t))for(var r=0;r<t.length;r++)m(t[r])&&e[r].value(t[r]);this._setValueOptions(t)},pu.prototype._setValueOptions=function(t){for(var e=[].concat(this.options.pointer),o=[].concat(t),i=0;i<o.length;i++)e[i].value=o[i]},pu.prototype.resize=function(){this.noTransitionsRedraw()},pu.prototype.noTransitionsRedraw=function(){var t=this.options.transitions;this._toggleTransitions(!1),this.redraw(),this._toggleTransitions(t)},pu.prototype.redraw=function(){var t=this._surfaceSize(),t=new b.geometry.Rect([0,0],[t.width,t.height]),t=(this._initSurface(),this.gaugeArea=this._createGaugeArea(),this._createModel(),ru(t.bbox(),this._gaugeAreaMargin));this.reflow(t)},pu.prototype.setOptions=function(t,e){this._originalOptions=x(this._originalOptions,t),this.options=x({},this._originalOptions),this._initTheme(e),this.redraw()},pu.prototype.setDirection=function(t){this.contextService.rtl=Boolean(t),this.surface&&"svg"===this.surface.type&&(this.surface.destroy(),this.surface=null)},pu.prototype.setIntlService=function(t){this.contextService.intl=t},pu.prototype._initTheme=function(t){var e=t||this.theme||{},t=(this.theme=e,this.options=x({},e,this.options),this.options),o=t.pointer;if(ot(o)){for(var i=[],r=0;r<o.length;r++)i.push(x({},e.pointer,o[r]));t.pointer=i}},pu.prototype._createGaugeArea=function(){var t=this.options.gaugeArea,e=this.surface.size(),o=t.border||{},e=new b.geometry.Rect([0,0],[e.width,e.height]);return this._gaugeAreaMargin=t.margin||5,0<o.width&&(e=ru(e,o.width)),su.fromRect(e,{stroke:{color:o.width?o.color:"",width:o.width,dashType:o.dashType,lineJoin:"round",lineCap:"round"},fill:{color:t.background}})},pu.prototype._initSurface=function(){var t=this.options,e=this.surface,o=this._surfaceElement(),i=this._surfaceSize();jt(o,i),e&&e.options.type===t.renderAs?(this.surface.clear(),this.surface.resize()):(e&&e.destroy(),this.surface=au.create(o,{type:t.renderAs}))},pu.prototype._surfaceSize=function(){var t=this.options,e=this._getSize();return t.gaugeArea&&x(e,t.gaugeArea),e},pu.prototype._surfaceElement=function(){return this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.element.appendChild(this.surfaceElement)),this.surfaceElement},pu.prototype.getSize=function(){return this._getSize()},pu.prototype._getSize=function(){var t=this.element,e=this._defaultSize(),o=t.offsetWidth,t=t.offsetHeight;return{width:o=o||e.width,height:t=t||e.height}},pu.prototype._defaultSize=function(){return{width:200,height:200}},pu.prototype._toggleTransitions=function(t){this.options.transitions=t;for(var e=0;e<this.pointers.length;e++)this.pointers[e].options.animation.transitions=t},pu);function pu(t,e,o,i){void 0===i&&(i={}),nu.call(this),this.element=t,this.theme=o,this.contextService=new po(this,i),this._originalOptions=x({},this.options,e),this.options=x({},this._originalOptions),this._initTheme(o),this.redraw()}e(l,{plotArea:{},theme:"default",renderAs:"",pointer:{},scale:{},gaugeArea:{}});const hu=l;var lu=b.drawing.Path,cu=b.drawing.Group,uu=b.geometry.Point;function du(t,e,o,i){var r,n,s,a,p,h,l=e.length;if(i.visible)for(var c=o.mirror,u=o.lineBox,d=i.skip;d<l;d+=i.step)d%i.skipUnit!=0&&(o.tickX=c?u.x2:u.x2-i.size,o.tickY=c?u.y1-i.size:u.y1,o.position=e[d],t.append((n=i,h=p=a=s=void 0,a=(r=o).position,p=o.tickX,h=o.tickY,r=o.vertical?(s=new uu(p,a),new uu(p+n.size,a)):(s=new uu(a,h),new uu(a,h+n.size)),new lu({stroke:{color:n.color,width:n.width}}).moveTo(s).lineTo(r))))}(fu=hi)&&(gu.__proto__=fu),((gu.prototype=Object.create(fu&&fu.prototype)).constructor=gu).prototype.initUserOptions=function(t){t=x({},this.options,t);return(t=x({},t,{labels:{mirror:t.mirror}})).majorUnit=t.majorUnit||le(t.min,t.max),t},gu.prototype.initFields=function(){},gu.prototype.render=function(){var t=this.elements=new cu,e=this.renderLabels(),o=this.renderLine(),i=this.renderTicks(),r=this.renderRanges();return t.append(o,e,i,r),t},gu.prototype.renderRanges=function(){for(var t=this.options,e=t.min,o=t.max,i=t.vertical,r=t.labels.mirror,n=t.ranges||[],s=new cu,a=n.length,p=t.rangeSize||t.minorTicks.size/2,h=0;h<a;h++){var l=iu(n[h],e,o),c=this.getSlot(l.from,l.to),u=i?this.lineBox():c,c=i?c:this.lineBox();i?u.x1-=p*(r?-1:1):c.y2+=p*(r?-1:1),s.append(lu.fromRect(new b.geometry.Rect([u.x1,c.y1],[u.x2-u.x1,c.y2-c.y1]),{fill:{color:l.color,opacity:l.opacity},stroke:{}}))}return s},gu.prototype.renderLabels=function(){for(var t=this.labels,e=this.options,o=new cu,i=0;i<t.length;i++)o.append(ou(t[i],e.labels));return o},gu.prototype.renderLine=function(){var t=this.options.line,e=this.lineBox(),o=new cu;return 0<t.width&&t.visible&&((t=new lu({stroke:{color:t.color,dashType:t.dashType,width:t.width}})).moveTo(e.x1,e.y1).lineTo(e.x2,e.y2),o.append(t)),o},gu.prototype.renderTicks=function(){var t=new cu,e=this.options,o=e.majorTicks.visible?e.majorUnit:0,i={vertical:e.vertical,mirror:e.labels.mirror,lineBox:this.lineBox()};return du(t,this.getMajorTickPositions(),i,e.majorTicks),du(t,this.getMinorTickPositions(),i,x({},{skipUnit:o/e.minorUnit},e.minorTicks)),t};var fu,n=gu;function gu(t,e){t=t||{};!P(t.reverse)&&!1===t.vertical&&(e||{}).rtl&&(t=Object.assign({},t,{reverse:!0})),fu.call(this,0,1,t,e),this.options.minorUnit=this.options.minorUnit||this.options.majorUnit/10}e(n,{min:0,max:50,majorTicks:{size:15,align:Qc,color:j,width:.5,visible:!0},minorTicks:{size:10,align:Qc,color:j,width:.5,visible:!0},line:{width:.5},labels:{position:Qc,padding:2},mirror:!1,_alignLines:!1});const yu=n;(vu=b.Class)&&(mu.__proto__=vu),((mu.prototype=Object.create(vu&&vu.prototype)).constructor=mu).prototype.value=function(t){var e=this.options,o=e.value;if(0===arguments.length)return o;var o=this.scale.options,i=o.min,o=o.max;e._oldValue=P(e._oldValue)?e.value:i,e.value=_(t,i,o),this.elements&&this.repaint()};var vu,c=mu;function mu(t,e){vu.call(this);var o=t.options,i=o.min,o=o.max,e=this.options=x({},this.options,e);e.fill=e.color,this.scale=t,P(e.value)?e.value=_(e.value,i,o):e.value=i}e(c,{color:j});var xu,On=c,N=((xu=On)&&(_u.__proto__=xu),((_u.prototype=Object.create(xu&&xu.prototype)).constructor=_u).prototype.reflow=function(){var t,e,o,i=this.options,r=this.scale,n=r.options,s=n.mirror,n=n.vertical,r=r.lineBox(),a=i.track.size||i.size,p=i.size/2,h=A(i.margin),h=n?h[s?"left":"right"]:h[s?"bottom":"top"],h=s?-h:h;n?(o=new B(r.x1+h,r.y1,r.x1+h,r.y2),s?o.x1-=a:o.x2+=a,i.shape!==Yc&&(t=e=new B(r.x2+h,r.y1-p,r.x2+h,r.y2+p))):(o=new B(r.x1,r.y1-h,r.x2,r.y1-h),s?o.y2+=a:o.y1-=a,i.shape!==Yc&&(t=e=new B(r.x1-p,r.y1-h,r.x2+p,r.y1-h))),this.trackBox=o,this.pointerRangeBox=e,this.box=t||o.clone().pad(i.border.width)},_u.prototype.getElementOptions=function(){var t=this.options;return{fill:{color:t.color,opacity:t.opacity},stroke:P(t.border)?{color:t.border.width?t.border.color||t.color:"",width:t.border.width,dashType:t.border.dashType,opacity:t.opacity}:null}},_u.prototype._margin=function(){var t=this.scale,e=this.options,t=t.options,o=t.mirror,t=t.vertical,e=A(e.margin);return t?e[o?"left":"right"]:e[o?"bottom":"top"]},_u);function _u(t,e){xu.call(this,t,e),this.options=x({track:{visible:P(e.track)}},this.options)}e(N,{shape:Yc,track:{border:{width:1}},color:j,border:{width:1},opacity:1,margin:A(3),animation:{type:Yc},visible:!0});const bu=N;(wu=b.drawing.Animation)&&(Cu.__proto__=wu),((Cu.prototype=Object.create(wu&&wu.prototype)).constructor=Cu).prototype.setup=function(){var t=this.options,e=t.margin,o=t.from,i=t.to,r=t.vertical,n=r?"x1":"y1",r=(t.mirror===r?(o[n]-=e,i[n]-=e):(o[n]+=e,i[n]+=e),this.fromScale=new b.geometry.Point(o.x1,o.y1)),n=this.toScale=new b.geometry.Point(i.x1,i.y1);0!==t.duration&&(t.duration=Math.max(r.distanceTo(n)/t.duration*1e3,1))},Cu.prototype.step=function(t){var e=Pt(this.fromScale.x,this.toScale.x,t),t=Pt(this.fromScale.y,this.toScale.y,t);this.element.transform(b.geometry.transform().translate(e,t))};var wu,t=Cu;function Cu(){wu.apply(this,arguments)}e(t,{easing:uc,duration:250}),b.drawing.AnimationFactory.current.register(qc,t);const Su=t;var ku,Au=b.geometry.Point,Pu=b.drawing.Path;function Tu(t,e){ku.call(this,t,e),P(this.options.size)||(this.options.size=.6*this.scale.options.majorTicks.size)}(ku=bu)&&(Tu.__proto__=ku),((Tu.prototype=Object.create(ku&&ku.prototype)).constructor=Tu).prototype.pointerShape=function(){var t=this.scale,e=this.options.size,o=e/2,i=t.options.mirror?-1:1;return t.options.vertical?[new Au(0,0-o),new Au(0-i*e,0),new Au(0,0+o)]:[new Au(0-o,0),new Au(0,0+i*e),new Au(0+o,0)]},Tu.prototype.repaint=function(){var t=this.scale,e=this.options,t=new Su(this.elements,x(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()},Tu.prototype.render=function(){var t=this.scale,e=this.options,o=this.getElementOptions(),i=this.pointerShape(e.value),o=(e.animation.type=qc,new Pu({stroke:o.stroke,fill:o.fill}).moveTo(i[0]).lineTo(i[1]).lineTo(i[2]).close()),i=t.getSlot(e.value);return o.transform(b.geometry.transform().translate(i.x1,i.y1)),this.elements=o};const Mu=Tu;(Ou=b.drawing.Animation)&&(Bu.__proto__=Ou),((Bu.prototype=Object.create(Ou&&Ou.prototype)).constructor=Bu).prototype.setup=function(){var t=this.options,e=this.axis=t.vertical?v:y,o=this.to=t.newPoints[0][e],e=this.from=t.oldPoints[0][e];0!==t.duration&&(t.duration=Math.max(Math.abs(o-e)/t.speed*1e3,1)),this._set(e)},Bu.prototype.step=function(t){t=Pt(this.from,this.to,t);this._set(t)},Bu.prototype._set=function(t){var e="set"+this.axis.toUpperCase(),o=this.options.newPoints;o[0][e](t),o[1][e](t)};var Ou,l=Bu;function Bu(){Ou.apply(this,arguments)}e(l,{easing:uc,speed:250}),b.drawing.AnimationFactory.current.register(Yc,l);const Ru=l;var Eu,Lu=b.drawing.Group,Iu=b.drawing.Path;function zu(t,e){Eu.call(this,t,e),P(this.options.size)||(this.options.size=.3*this.scale.options.majorTicks.size)}(Eu=bu)&&(zu.__proto__=Eu),((zu.prototype=Object.create(Eu&&Eu.prototype)).constructor=zu).prototype.pointerShape=function(t){var e=this.scale,o=this.options,i=e.options,r=i.mirror,i=i.vertical,r=r===i?-1:1,o=o.size*r,n=e.getSlot(e.options.min),e=e.getSlot(t),t=i?v:y,s=i?y:v,r=this._margin()*r,a=new b.geometry.Point,n=(a[t]=n[t+"1"],a[s]=n[s+"1"],new b.geometry.Point),t=(n[t]=e[t+"1"],n[s]=e[s+"1"],i?(a.translate(r,0),n.translate(r,0)):(a.translate(0,r),n.translate(0,r)),n.clone()),e=a.clone();return i?(t.translate(o,0),e.translate(o,0)):(t.translate(0,o),e.translate(0,o)),[a,n,t,e]},zu.prototype.repaint=function(){var t=this.scale,e=this.options,o=this.pointerShape(e.value),i=this.pointerPath,r=this.pointerShape(e._oldValue),i=(i.moveTo(o[0]).lineTo(o[1]).lineTo(o[2]).lineTo(o[3]).close(),new Ru(i,x(e.animation,{reverse:t.options.reverse,vertical:t.options.vertical,oldPoints:[r[1],r[2]],newPoints:[o[1],o[2]]})));!1===e.animation.transitions&&(i.options.duration=0),i.setup(),i.play()},zu.prototype.render=function(){var t=new Lu,e=this.getElementOptions(),e=(this.options.track.visible&&t.append(this.renderTrack()),this.pointerPath=new Iu({stroke:e.stroke,fill:e.fill}));return t.append(e),this.elements=t},zu.prototype.renderTrack=function(){var t=this.options.track,e=t.border||{},o=this.trackBox.clone().pad(e.width||0);return new Iu.fromRect(o.toRect(),{fill:{color:t.color,opacity:t.opacity},stroke:{color:e.width?e.color||t.color:"",width:e.width,dashType:e.dashType}})};const Vu=zu;var ju,Du=b.drawing.Group,n=((ju=hu)&&(Hu.__proto__=ju),((Hu.prototype=Object.create(ju&&ju.prototype)).constructor=Hu).prototype.reflow=function(t){var e=this.pointers,o=t.origin.x,i=t.origin.y,o=new B(o,i,o+t.width(),i+t.height());this.scale.reflow(o),this._shrinkScaleWidth(o);for(var r=0;r<e.length;r++)e[r].reflow();this.bbox=this._getBox(o),this._alignElements(),this._shrinkElements(),this._buildVisual(),this._draw()},Hu.prototype._buildVisual=function(){var t=new Du,e=this.scale.render(),o=this.pointers;t.append(this.gaugeArea),t.append(e);for(var i=0;i<o.length;i++){var r=o[i];t.append(r.render()),r.value(r.options.value)}this._visuals=t},Hu.prototype._createModel=function(){var t=this.options,e=this.scale=new yu(t.scale,this.contextService);this.pointers=[];for(var o=ot(o=t.pointer)?o:[o],i=0;i<o.length;i++){var r=x({},o[i],{animation:{transitions:t.transitions}}),n="arrow"===r.shape?Mu:Vu;this.pointers.push(new n(e,r))}},Hu.prototype._defaultSize=function(){var t=this.options.scale.vertical;return{width:t?60:200,height:t?200:60}},Hu.prototype._getBox=function(t){for(var e,o=this.scale,i=this.pointers,r=t.center(),n=i[0].box.clone().wrap(o.box),s=0;s<i.length;s++)n.wrap(i[s].box.clone());return n=o.options.vertical?(e=n.width()/2,new B(r.x-e,t.y1,r.x+e,t.y2)):(e=n.height()/2,new B(t.x1,r.y-e,t.x2,r.y+e))},Hu.prototype._alignElements=function(){for(var t,e=this.scale,o=this.pointers,i=e.box,r=o[0].box.clone().wrap(e.box),n=this.bbox,s=0;s<o.length;s++)r.wrap(o[s].box.clone());e.options.vertical?(t=n.center().x-r.center().x,e.reflow(new B(i.x1+t,n.y1,i.x2+t,n.y2))):(t=n.center().y-r.center().y,e.reflow(new B(i.x1,i.y1+t,i.x2,i.y2+t)));for(var a=0;a<o.length;a++)o[a].reflow(this.bbox)},Hu.prototype._shrinkScaleWidth=function(t){var e,o=this.scale;o.options.vertical||0<(e=o.contentBox().width()-t.width())&&(o.box.shrink(e,0),o.box.alignTo(t,"center"),o.reflow(o.box))},Hu.prototype._shrinkElements=function(){for(var t=this.scale,e=this.pointers,o=t.box.clone(),i=t.options.vertical?"y":"x",r=e[0].box,n=0;n<e.length;n++)r.wrap(e[n].box.clone());o[i+1]+=Math.max(o[i+1]-r[i+1],0),o[i+2]-=Math.max(r[i+2]-o[i+2],0),t.reflow(o);for(var s=0;s<e.length;s++)e[s].reflow(this.bbox)},Hu);function Hu(){ju.apply(this,arguments)}e(n,{transitions:!0,gaugeArea:{background:""},scale:{vertical:!0}});const Uu=n;var Fu=b.drawing.Arc,Nu=b.drawing.Path,Gu=b.drawing.Group;function Wu(t,e,o,i){var r=new Gu,n=t.center,s=t.getRadiusX();if(i.visible)for(var a=0;a<e.length;a++){var p=t.pointAt(e[a]),h=new b.geometry.Point(n.x+s-i.size,n.y).rotate(e[a],n);r.append(new Nu({stroke:{color:i.color,width:i.width}}).moveTo(p).lineTo(h))}return r}function Xu(t,e,o,i){return{from:t,to:e,color:o,opacity:i}}(qu=hi)&&(Yu.__proto__=qu),((Yu.prototype=Object.create(qu&&qu.prototype)).constructor=Yu).prototype.initUserOptions=function(t){t=x({},this.options,t);return t.majorUnit=t.majorUnit||le(t.min,t.max),t.minorUnit=t.minorUnit||t.majorUnit/10,t},Yu.prototype.initFields=function(){},Yu.prototype.render=function(t,e){t=this.renderArc(t,e);this.bbox=t.bbox(),this.labelElements=this.renderLabels(),this.ticks=this.renderTicks(),this.ranges=this.renderRanges()},Yu.prototype.reflow=function(t){var e=t.center(),t=Math.min(t.height(),t.width())/2;if(!P(this.bbox))return this.render(e,t);this.bbox=this.arc.bbox(),this.radius(this.arc.getRadiusX()),this.repositionRanges(),this.renderLabels()},Yu.prototype.slotAngle=function(t){var e=this.options,o=e.min,i=e.max,r=e.reverse,n=e.startAngle,e=e.endAngle,s=e-n;return(r?e-(t-o)/(i-o)*s:(t-o)/(i-o)*s+n)+180},Yu.prototype.hasRanges=function(){var t=this.options.ranges;return t&&t.length},Yu.prototype.ticksSize=function(){var t=this.options,e=t.majorTicks,t=t.minorTicks,o=0;return e.visible&&(o=e.size),o=t.visible?Math.max(t.size,o):o},Yu.prototype.labelsCount=function(){var t=qu.prototype.labelsCount.call(this),e=this.options;return 360<=e.endAngle-e.startAngle&&e.max%e.majorUnit==0&&--t,t},Yu.prototype.renderLabels=function(){var t=this.options,e=this.arc.clone(),o=e.getRadiusX(),i=this.tickAngles(e,t.majorUnit),r=t.rangeSize=t.rangeSize||.1*o,n=new Gu,s=.05*o,a=(P(t.rangeDistance)?s=t.rangeDistance:t.rangeDistance=s,t.labels),p=a.position===Qc,h=P(this.labelElements);p&&(o-=this.ticksSize(),this.hasRanges()&&!h&&(o-=r+s),e.setRadiusX(o).setRadiusY(o));for(var l=this.labels,c=l.length,r=A(a.padding),u=(r.left+r.right)/2,d=(r.top+r.bottom)/2,f=0;f<c;f++){var g=l[f],y=g.box.width()/2,v=g.box.height()/2,m=i[f],x=(m-180)*Zc,m=e.pointAt(m),_=m.x+Math.cos(x)*(y+u)*(p?1:-1),m=m.y+Math.sin(x)*(v+d)*(p?1:-1),x=(g.reflow(new B(_-y,m-v,_+y,m+v)),new b.geometry.Point(g.box.x1,g.box.y1)),_=void 0;h?(y=(_=this.labelElements.children[f]).bbox().origin,(m=_.transform()||b.geometry.transform()).translate(x.x-y.x,x.y-y.y),_.transform(m)):(_=ou(g,t.labels),n.append(_)),this.bbox=b.geometry.Rect.union(this.bbox,_.bbox())}return n},Yu.prototype.repositionRanges=function(){var t=this.ranges.children;if(0<t.length){var e=this.options,o=e.rangeDistance,e=e.rangeSize,i=this.getRangeRadius();this.options.labels.position===Qc&&(i+=e+o);for(var r=i+e/2,n=0;n<t.length;n++)t[n]._geometry.setRadiusX(r).setRadiusY(r);this.bbox=b.geometry.Rect.union(this.bbox,this.ranges.bbox())}},Yu.prototype.renderRanges=function(){var t=this.rangeSegments(),e=t.length,o=new Gu;if(e){var i=this.options,r=i.rangeSize,n=i.reverse,i=i.rangeDistance,s=this.getRangeRadius();this.radius(this.radius()-r-i);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&&o.append(this.createRange(h,l,s,p))}}return o},Yu.prototype.createRange=function(t,e,o,i){var r=this.options.rangeSize,o=new b.geometry.Arc(this.arc.center,{radiusX:o+r/2,radiusY:o+r/2,startAngle:t,endAngle:e});return new Fu(o,{stroke:{width:r,color:i.color,opacity:i.opacity,lineCap:i.lineCap}})},Yu.prototype.rangeSegments=function(){var t=this.options,e=t.ranges||[],o=e.length,i=[];if(o){var r=t.min,n=t.max,s=t.rangePlaceholderColor;i.push(Xu(r,n,s));for(var a=0;a<o;a++)for(var p=iu(e[a],r,n),h=i.length,l=0;l<h;l++){var c=i[l];if(c.from<=p.from&&p.from<=c.to){i.push(Xu(p.from,p.to,p.color,p.opacity)),c.from<=p.to&&p.to<=c.to&&i.push(Xu(p.to,c.to,s,p.opacity)),c.to=p.from;break}}}return i},Yu.prototype.getRangeRadius=function(){var t=this.arc,e=this.options,o=e.rangeSize,i=e.rangeDistance,r=e.majorTicks.size;return e.labels.position===Kc?t.getRadiusX()-r-i-o:t.getRadiusX()-o},Yu.prototype.renderArc=function(t,e){var o=this.options;return this.arc=new b.geometry.Arc(t,{radiusX:e,radiusY:e,startAngle:o.startAngle+180,endAngle:o.endAngle+180})},Yu.prototype.renderTicks=function(){var t,e=this.arc,o=this.options,i=e.clone(),r=(this.majorTickAngles=this.tickAngles(e,o.majorUnit),this.majorTicks=Wu(i,this.majorTickAngles,o.majorUnit,o.majorTicks),new Gu),n=(r.append(this.majorTicks),o.majorTicks.size),s=o.minorTicks.size;return this._tickDifference=n-s,o.labels.position===Kc&&(t=i.getRadiusX(),i.setRadiusX(t-n+s).setRadiusY(t-n+s)),this.minorTickAngles=this.normalizeTickAngles(this.tickAngles(e,o.minorUnit)),this.minorTicks=Wu(i,this.minorTickAngles,o.minorUnit,o.minorTicks),r.append(this.minorTicks),r},Yu.prototype.normalizeTickAngles=function(t){for(var e=this.options,o=e.majorUnit/e.minorUnit,i=t.length-1;0<=i;i--)i%o==0&&t.splice(i,1);return t},Yu.prototype.tickAngles=function(t,e){var o=this.options,i=o.reverse,r=o.max-o.min,n=t.endAngle-t.startAngle,s=r/e,a=t.startAngle,p=n/s;i&&(a+=n,p=-p),360<=n&&o.max%e==0&&--s;for(var h=[],l=0;l<s;l++)h.push(T(a,3)),a+=p;return T(a)<=t.endAngle&&h.push(a),h},Yu.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)},Yu.prototype.repositionTicks=function(t,e,o){var i=o&&this._tickDifference||0,r=this.arc,n=r.getRadiusX();o&&this.options.labels.position===Kc&&0!==i&&(r=this.arc.clone()).setRadiusX(n-i).setRadiusY(n-i);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,a=a.y-p[0].anchor().y;t[s].transform((new b.geometry.transform).translate(h,a))}};var qu,c=Yu;function Yu(t,e){qu.call(this,0,1,t,e)}e(c,{min:0,max:100,majorTicks:{size:15,align:Qc,color:j,width:.5,visible:!0},minorTicks:{size:10,align:Qc,color:j,width:.5,visible:!0},startAngle:-30,endAngle:210,labels:{position:Qc,padding:2}});const Zu=c;(Qu=b.drawing.Animation)&&(Ku.__proto__=Qu),((Ku.prototype=Object.create(Qu&&Qu.prototype)).constructor=Ku).prototype.step=function(t){var e=this.options,t=Pt(e.oldAngle,e.newAngle,t);this.element.transform(b.geometry.transform().rotate(t,e.center))};var Qu,N=Ku;function Ku(t,e){Qu.call(this,t,e);t=this.options;t.duration=Math.max(Math.abs(t.newAngle-t.oldAngle)/t.duration*1e3,1)}e(N,{easing:uc,duration:150}),b.drawing.AnimationFactory.current.register(cc,N);const $u=N;var Ju,td=b.drawing.Circle,ed=b.drawing.Group,od=b.drawing.Path,t=((Ju=On)&&(id.__proto__=Ju),((id.prototype=Object.create(Ju&&Ju.prototype)).constructor=id).prototype.setAngle=function(t){this.elements.transform(b.geometry.transform().rotate(t,this.center))},id.prototype.repaint=function(){var t=this.scale,e=this.options,o=t.slotAngle(e._oldValue),t=t.slotAngle(e.value);!1===e.animation.transitions?this.setAngle(t):new $u(this.elements,x(e.animation,{oldAngle:o,newAngle:t})).play()},id.prototype.render=function(){var t=this.scale,e=this.options,o=new ed;return!1!==e.animation&&x(e.animation,{startAngle:0,center:t.arc.center,reverse:t.options.reverse}),o.append(this._renderNeedle(),this._renderCap()),this.elements=o,this.setAngle(Zc),o},id.prototype.reflow=function(t){var e=this.center=t.center,o=_(this.options.length||1,.1,1.5),t=this.radius=t.getRadiusX()*o,o=this.capSize=Math.round(t*this.options.cap.size);this.bbox=b.geometry.Rect.fromPoints(new b.geometry.Point(e.x-o,e.y-o),new b.geometry.Point(e.x+o,e.y+o))},id.prototype._renderNeedle=function(){var t=this.scale.options.minorTicks.size,e=this.center,o=this.options.color,o=new od({fill:{color:o},stroke:{color:o,width:.5}});return o.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(),o},id.prototype._renderCap=function(){var t=this.options,t=t.cap.color||t.color,e=new b.geometry.Circle(this.center,this.capSize);return new td(e,{fill:{color:t},stroke:{color:t}})},id);function id(){Ju.apply(this,arguments)}e(t,{cap:{size:.05},arrow:{width:16,height:14},animation:{type:cc,duration:150}});const rd=t;var nd,sd=b.drawing.Group,l=((nd=hu)&&(ad.__proto__=nd),((ad.prototype=Object.create(nd&&nd.prototype)).constructor=ad).prototype.reflow=function(t){var e=this.pointers;this.scale.reflow(t),this._initialPlotArea=this.scale.bbox;for(var o=0;o<e.length;o++)e[o].reflow(this.scale.arc),this._initialPlotArea=b.geometry.Rect.union(this._initialPlotArea,e[o].bbox);this.fitScale(t),this.alignScale(t),this._buildVisual(this.gaugeArea,e,this.scale),this._draw()},ad.prototype._buildVisual=function(t,e,o){var i=this._visuals=new sd;i.append(t),i.append(o.ticks),i.append(o.ranges),this._buildPointers(e),i.append(o.labelElements)},ad.prototype._buildPointers=function(t){for(var e=0;e<t.length;e++){var o=t[e];o.render(),this._visuals.append(o.elements),o.value(o.options.value)}},ad.prototype.fitScale=function(t){for(var e,o,i,r,n,s=this.scale.arc,a=this._initialPlotArea,a=Math.abs(this.getDiff(a,t)),p=T(a,3),h=T(-a,3),l=0,c=0;!(!(c++<100)||5<(l=n===i?l+1:0)||p!==r&&0<=(e=this.getPlotBox(p,t,s))&&e<=2||h!==r&&0<=(i=this.getPlotBox(h,t,s))&&i<=2||(r=0<e&&0<i?2*p:e<0&&i<0?2*h:T((p+h)/2||1,3),0<=(o=this.getPlotBox(r,t,s))&&o<=2));)n=i,0<o?(h=r,i=o):(p=r,e=o)},ad.prototype.getPlotBox=function(t,e,o){var i=this.scale,r=this.pointers,n=o.getRadiusX(),s=o.clone();s.setRadiusX(n+t).setRadiusY(n+t),i.arc=s,i.reflow(e),this.plotBbox=i.bbox;for(var a=0;a<r.length;a++)r[a].reflow(s),this.plotBbox=b.geometry.Rect.union(this.plotBbox,r[a].bbox);return this.getDiff(this.plotBbox,e)},ad.prototype.getDiff=function(t,e){return Math.min(e.width()-t.width(),e.height()-t.height())},ad.prototype.alignScale=function(t){var e=this.plotBbox.center(),o=t.center(),i=e.x-o.x,e=e.y-o.y,r=this.scale,n=this.pointers;r.arc.center.x-=i,r.arc.center.y-=e,r.reflow(t);for(var s=0;s<n.length;s++)n[s].reflow(r.arc),this.plotBbox=b.geometry.Rect.union(r.bbox,n[s].bbox)},ad.prototype._createModel=function(){var t=this.options,e=t.pointer,o=this.scale=new Zu(t.scale,this.contextService);this.pointers=[];for(var i=ot(e)?e:[e],r=0;r<i.length;r++){var n=new rd(o,x({},i[r],{animation:{transitions:t.transitions}}));this.pointers.push(n)}},ad);function ad(){nd.apply(this,arguments)}e(l,{transitions:!0,gaugeArea:{background:""}});const pd=l;(hd=Zu)&&(ld.__proto__=hd),((ld.prototype=Object.create(hd&&hd.prototype)).constructor=ld).prototype.rangeSegments=function(){var t=this.options;return[{from:t.min,to:t.max,color:t.rangePlaceholderColor,lineCap:t.rangeLineCap}]},ld.prototype.hasRanges=function(){return!0},ld.prototype.placeholderRangeAngle=function(t){var e=this.ranges.children[0].geometry();this.options.reverse?e.setEndAngle(t):e.setStartAngle(t)},ld.prototype.addRange=function(t,e,o){var i=this.options.reverse,r=this.slotAngle(i?e:t),i=this.slotAngle(i?t:e),t=this.createRange(r,i,this.getRangeRadius(),o);return this.ranges.append(t),t};var hd,n=ld;function ld(){hd.apply(this,arguments)}e(n,{min:0,max:100,majorTicks:{visible:!1},minorTicks:{visible:!1},labels:{visible:!1},startAngle:0,endAngle:180,rangeLineCap:"round"});const cd=n;(ud=b.drawing.Animation)&&(dd.__proto__=ud),((dd.prototype=Object.create(ud&&ud.prototype)).constructor=dd).prototype.step=function(t){var e,o=this.options,i=this.startColor,r=this.color,o=Pt(o.oldAngle,o.newAngle,t);this.element.angle(o),r&&(o=T(Pt(i.r,r.r,t)),e=T(Pt(i.g,r.g,t)),i=T(Pt(i.b,r.b,t)),this.element.stroke(new b.Color(o,e,i).toHex()))};var ud,c=dd;function dd(t,e){ud.call(this,t,e);var e=this.options,o=Math.abs(e.newAngle-e.oldAngle)/e.duration*1e3,e=(e.duration=_(o,150,800),t.elements.options.get("stroke.color")),o=t.currentColor();e!==o&&(this.startColor=new b.Color(e),this.color=new b.Color(o))}e(c,{easing:uc,duration:150}),b.drawing.AnimationFactory.current.register(h,c);const fd=c;(gd=On)&&(md.__proto__=gd),((md.prototype=Object.create(gd&&gd.prototype)).constructor=md).prototype.repaint=function(){var t=this.scale,e=this.options,o=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 fd(this,x(e.animation,{oldAngle:o,newAngle:t})),this.animation.play())},md.prototype.angle=function(t){var e=this.elements.geometry();this.scale.options.reverse?e.setStartAngle(t):e.setEndAngle(t),this.scale.placeholderRangeAngle(t)},md.prototype.stroke=function(t){this.elements.stroke(t)},md.prototype.render=function(){var t,e;this.elements||(t=this.scale,!1!==(e=this.options).animation&&x(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}))},md.prototype.currentColor=function(){var t=this.scale.options,e=t.min,o=t.max,t=this.options,i=t.colors,r=t.color,t=t.value,n=m(t)?t:e;if(i)for(var s=0;s<i.length;s++){var a=i[s],p=a.color,h=a.from,a=(void 0===h&&(h=e),a.to);if(void 0===a&&(a=o),h<=n&&n<=a)return p}return r},md.prototype.reflow=function(){this.render(),this.bbox=this.elements.bbox()};var gd,yd,vd,N=md;function md(){gd.apply(this,arguments)}e(N,{animation:{type:h,duration:150}});const xd=N;function _d(){yd.apply(this,arguments)}(yd=pd)&&(_d.__proto__=yd),((_d.prototype=Object.create(yd&&yd.prototype)).constructor=_d).prototype._initTheme=function(t){yd.prototype._initTheme.call(this,t),this.options.color=this.options.color||(this.theme.pointer||{}).color},_d.prototype._createModel=function(){var t=this.options,e=this.scale=new cd(t.scale,this.contextService),e=new xd(e,x({},{colors:t.colors,color:t.color,value:t.value,opacity:t.opacity,animation:{transitions:t.transitions}}));this.pointers=[e]},_d.prototype._buildPointers=function(t){for(var e=0;e<t.length;e++){var o=t[e];o.render(),o.value(o.options.value)}},_d.prototype._setValueOptions=function(t){this.options.value=t},_d.prototype.currentColor=function(){var t=this.pointers[0];if(t)return t.currentColor()},_d.prototype.centerLabelPosition=function(t,e){var o=this.getSize(),i=this.scale.arc.center,r=i.x-t/2,i=i.y-e/2;return t<o.width&&(t=r+t,r=Math.max(r,0),t>o.width&&(r-=t-o.width)),e<o.height&&(o=(t=this.scale.bbox).bottomRight().y,e=i+e,i=Math.max(i,t.origin.y),o<e&&(i-=e-o)),{left:r,top:i}};const bd=_d;function wd(){vd.apply(this,arguments)}(vd=bd)&&(wd.__proto__=vd),((wd.prototype=Object.create(vd&&vd.prototype)).constructor=wd).prototype._createModel=function(){var t=this.options.scale;"number"!=typeof t.startAngle&&(t.startAngle=90),t.endAngle=t.startAngle+360,vd.prototype._createModel.call(this)};const Cd=wd;(Sd=b.Class)&&(kd.__proto__=Sd),((kd.prototype=Object.create(Sd&&Sd.prototype)).constructor=kd).prototype.initProperties=function(){},kd.prototype.setOptions=function(t){this.options=Object.assign({},this.options,t),this.quietZoneLength=this.options.addQuietZone?2*this.options.quietZoneLength:0},kd.prototype.encode=function(t,e,o){t=P(t)?String(t):t;return this.initValue(t,e,o),this.options.addQuietZone&&this.addQuietZone(),this.addData(),this.options.addQuietZone&&this.addQuietZone(),{baseUnit:this.baseUnit,pattern:this.pattern}},kd.prototype.initValue=function(){},kd.prototype.addQuietZone=function(){this.pattern.push(this.options.quietZoneLength||10)},kd.prototype.addData=function(){},kd.prototype.invalidCharacterError=function(t){throw new Error('Character "'+t+'" is not valid for symbology '+this.name+".")};var Sd,cc=kd;function kd(t){Sd.call(this),this.setOptions(t),this.initProperties()}e(cc,{quietZoneLength:10,addQuietZone:!0,addCheckSum:!0});var Ad,Pd=Object.assign,t=((Ad=cc)&&(Td.__proto__=Ad),((Td.prototype=Object.create(Ad&&Ad.prototype)).constructor=Td).prototype.initProperties=function(){Ad.prototype.initProperties.call(this),Pd(this,{name:"Code 11",characterMap:["111121","211121","121121","221111","112121","212111","122111","111221","211211","211111","112111"],cCheckSumTotal:10,kCheckSumTotal:9,kCheckSumMinLength:10,checkSumMod:11,DASH_VALUE:10,DASH:"-",START:"112211",STOP:"11221"})},Td.prototype.initValue=function(t,e){this.pattern=[],this.value=t,this.width=e,this.totalUnits=0},Td.prototype.addData=function(){var t=this.value;this.addPattern(this.START);for(var e=0;e<t.length;e++)this.addCharacter(t.charAt(e));this.options.addCheckSum&&this.addCheckSum(),this.addPattern(this.STOP),this.setBaseUnit()},Td.prototype.setBaseUnit=function(){this.baseUnit=this.width/(this.totalUnits+this.quietZoneLength)},Td.prototype.addCheckSum=function(){var t=this.value,e=t.length,o=this.getWeightedSum(t,e,this.cCheckSumTotal)%this.checkSumMod;this.checksum=String(o),this.addPattern(this.characterMap[o]),++e>=this.kCheckSumMinLength&&(o=(o+this.getWeightedSum(t,e,this.kCheckSumTotal))%this.checkSumMod,this.checksum+=o,this.addPattern(this.characterMap[o]))},Td.prototype.getWeightedSum=function(t,e,o){for(var i=0,r=0;r<t.length;r++)i+=this.weightedValue(this.getValue(t.charAt(r)),e,r,o);return i},Td.prototype.weightedValue=function(t,e,o,i){return((e-o)%i||i)*t},Td.prototype.getValue=function(t){return isNaN(t)?(t!==this.DASH&&this.invalidCharacterError(t),this.DASH_VALUE):parseInt(t,10)},Td.prototype.addCharacter=function(t){t=this.getValue(t),t=this.characterMap[t];this.addPattern(t)},Td.prototype.addPattern=function(t){for(var e,o=0;o<t.length;o++)e=parseInt(t.charAt(o),10),this.pattern.push(e),this.totalUnits+=e},Td);function Td(){Ad.apply(this,arguments)}e(t,{addCheckSum:!0});var Md,Od,Bd=Object.assign,l=((Od=cc)&&(Ed.__proto__=Od),((Ed.prototype=Object.create(Od&&Od.prototype)).constructor=Ed).prototype.initProperties=function(){Od.prototype.initProperties.call(this),Bd(this,{minBaseUnitLength:.7})},Ed.prototype.addData=function(){var t=this.value;this.addStart();for(var e=0;e<t.length;e++)this.addCharacter(t.charAt(e));this.options.addCheckSum&&this.pushCheckSum(),this.addStop(),this.prepareValues()},Ed.prototype.addCharacter=function(t){var e=this.characterMap[t];e||this.invalidCharacterError(t),this.addBase(e)},Ed.prototype.addBase=function(){},Ed),n=((Md=l)&&(Rd.__proto__=Md),((Rd.prototype=Object.create(Md&&Md.prototype)).constructor=Rd).prototype.initProperties=function(){Md.prototype.initProperties.call(this),Bd(this,{name:"Code 39",checkSumMod:43,minRatio:2.5,maxRatio:3,gapWidth:1,splitCharacter:"|",patternMappings:{b:"1|",w:"1|",B:"ratio|",W:"ratio|"},characterMap:{0:{pattern:"bwbWBwBwb",value:0},1:{pattern:"BwbWbwbwB",value:1},2:{pattern:"bwBWbwbwB",value:2},3:{pattern:"BwBWbwbwb",value:3},4:{pattern:"bwbWBwbwB",value:4},5:{pattern:"BwbWBwbwb",value:5},6:{pattern:"bwBWBwbwb",value:6},7:{pattern:"bwbWbwBwB",value:7},8:{pattern:"BwbWbwBwb",value:8},9:{pattern:"bwBWbwBwb",value:9},A:{pattern:"BwbwbWbwB",value:10},B:{pattern:"bwBwbWbwB",value:11},C:{pattern:"BwBwbWbwb",value:12},D:{pattern:"bwbwBWbwB",value:13},E:{pattern:"BwbwBWbwb",value:14},F:{pattern:"bwBwBWbwb",value:15},G:{pattern:"bwbwbWBwB",value:16},H:{pattern:"BwbwbWBwb",value:17},I:{pattern:"bwBwbWBwb",value:18},J:{pattern:"bwbwBWBwb",value:19},K:{pattern:"BwbwbwbWB",value:20},L:{pattern:"bwBwbwbWB",value:21},M:{pattern:"BwBwbwbWb",value:22},N:{pattern:"bwbwBwbWB",value:23},O:{pattern:"BwbwBwbWb",value:24},P:{pattern:"bwBwBwbWb",value:25},Q:{pattern:"bwbwbwBWB",value:26},R:{pattern:"BwbwbwBWb",value:27},S:{pattern:"bwBwbwBWb",value:28},T:{pattern:"bwbwBwBWb",value:29},U:{pattern:"BWbwbwbwB",value:30},V:{pattern:"bWBwbwbwB",value:31},W:{pattern:"BWBwbwbwb",value:32},X:{pattern:"bWbwBwbwB",value:33},Y:{pattern:"BWbwBwbwb",value:34},Z:{pattern:"bWBwBwbwb",value:35},"-":{pattern:"bWbwbwBwB",value:36},".":{pattern:"BWbwbwBwb",value:37}," ":{pattern:"bWBwbwBwb",value:38},$:{pattern:"bWbWbWbwb",value:39},"/":{pattern:"bWbWbwbWb",value:40},"+":{pattern:"bWbwbWbWb",value:41},"%":{pattern:"bwbWbWbWb",value:42},START:{pattern:"bWbwBwBwb"}}})},Rd.prototype.initValue=function(t,e,o){this.width=e,this.height=o,this.value=t,this.dataLength=t.length,this.pattern=[],this.patternString=""},Rd.prototype.prepareValues=function(){var t,e=this.minBaseUnitLength,o=this.minRatio,i=Math.ceil(Math.max(.15*this.width,24)),r=this.maxRatio;if(this.height<i)throw new Error("Insufficient height for Code39 encoding: the current height is "+this.height+"px and the minimum height is "+i+"px.");for(t=this.getBaseUnit(r);t<e&&o<r;)r=parseFloat((r-.1).toFixed(1)),t=this.getBaseUnit(r);if(t<e)throw i=Math.ceil(this.getBaseWidth(o)*e),new Error("Insufficient width for Code39 encoding: the current width is "+this.width+'px and the minimum width for value "'+this.value+'" is '+i+"px.");this.ratio=r,this.baseUnit=t,this.patternString=this.patternString.substring(0,this.patternString.length-1),this.pattern=this.pattern.concat(this.patternString.replace(/ratio/g,r).split(this.splitCharacter))},Rd.prototype.getBaseUnit=function(t){return this.width/this.getBaseWidth(t)},Rd.prototype.getBaseWidth=function(t){return this.quietZoneLength+3*(t+2)*(this.dataLength+2)+this.gapWidth*(this.dataLength+1)},Rd.prototype.addStart=function(){this.addPattern(this.characterMap.START.pattern),this.addCharacterGap()},Rd.prototype.addBase=function(t){this.addPattern(t.pattern),this.addCharacterGap()},Rd.prototype.addStop=function(){this.addPattern(this.characterMap.START.pattern)},Rd.prototype.addPattern=function(t){for(var e=0;e<t.length;e++)this.patternString+=this.patternMappings[t.charAt(e)]},Rd.prototype.addCharacterGap=function(){this.patternString+=this.gapWidth+this.splitCharacter},Rd);function Rd(){Md.apply(this,arguments)}function Ed(){Od.apply(this,arguments)}e(n,{addCheckSum:!1});var Ld,Id,zd,Vd,jd,Dd,Hd,Ud,Fd,Nd,Gd,Wd={addCharacter:function(t){this.characterMap[t]?this.addBase(this.characterMap[t]):127<t.charCodeAt(0)?this.invalidCharacterError(t):this.addExtended(t.charCodeAt(0))},addExtended:function(t){for(var e,o=0;o<this.extendedMappings.length;o++)if(e=this.extendedMappings[o].call(this,t)){for(var i=0;i<e.length;i++){var r=e[i];this.addBase(r)}return void(this.dataLength+=e.length-1)}},extendedMappings:[function(t){if(97<=t&&t<=122)return[this.characterMap[this.shiftCharacters[0]],this.characterMap[String.fromCharCode(t-32)]]},function(t){if(33<=t&&t<=58)return[this.characterMap[this.shiftCharacters[1]],this.characterMap[String.fromCharCode(t+32)]]},function(t){if(1<=t&&t<=26)return[this.characterMap[this.shiftCharacters[2]],this.characterMap[String.fromCharCode(t+64)]]},function(t){var e;if(this.specialAsciiCodes[t])for(var o=[],i=0;i<this.specialAsciiCodes[t].length;i++)o.push(this.characterMap[this.shiftCharacters[3]]),o.push(this.characterMap[this.specialAsciiCodes[t][i]]);else e=6*Math.floor(t/32)+(t-27)%32+64,o=[this.characterMap[this.shiftCharacters[3]],this.characterMap[String.fromCharCode(e)]];return o}],specialAsciiCodes:{0:["U"],64:["V"],96:["W"],127:["T","X","Y","Z"]},shiftValuesAsciiCodes:{39:36,40:47,41:43,42:37},characterMap:{"+":!1,"/":!1,$:!1,"%":!1},shiftCharacters:["SHIFT0","SHIFT1","SHIFT2","SHIFT3"]},uc=((Dd=n)&&(nf.__proto__=Dd),((nf.prototype=Object.create(Dd&&Dd.prototype)).constructor=nf).prototype.initProperties=function(){Dd.prototype.initProperties.call(this),x(this,Wd,{name:"Code 39 extended",characterMap:{SHIFT0:{pattern:"bWbwbWbWb",value:41},SHIFT1:{pattern:"bWbWbwbWb",value:40},SHIFT2:{pattern:"bWbWbWbwb",value:39},SHIFT3:{pattern:"bwbWbWbWb",value:42}}})},nf),Xd=Object.assign,c=((jd=l)&&(rf.__proto__=jd),((rf.prototype=Object.create(jd&&jd.prototype)).constructor=rf).prototype.initProperties=function(){jd.prototype.initProperties.call(this),Xd(this,{name:"Code 93",cCheckSumTotal:20,kCheckSumTotal:15,checkSumMod:47,characterMap:{0:{pattern:"131112",value:0},1:{pattern:"111213",value:1},2:{pattern:"111312",value:2},3:{pattern:"111411",value:3},4:{pattern:"121113",value:4},5:{pattern:"121212",value:5},6:{pattern:"121311",value:6},7:{pattern:"111114",value:7},8:{pattern:"131211",value:8},9:{pattern:"141111",value:9},A:{pattern:"211113",value:10},B:{pattern:"211212",value:11},C:{pattern:"211311",value:12},D:{pattern:"221112",value:13},E:{pattern:"221211",value:14},F:{pattern:"231111",value:15},G:{pattern:"112113",value:16},H:{pattern:"112212",value:17},I:{pattern:"112311",value:18},J:{pattern:"122112",value:19},K:{pattern:"132111",value:20},L:{pattern:"111123",value:21},M:{pattern:"111222",value:22},N:{pattern:"111321",value:23},O:{pattern:"121122",value:24},P:{pattern:"131121",value:25},Q:{pattern:"212112",value:26},R:{pattern:"212211",value:27},S:{pattern:"211122",value:28},T:{pattern:"211221",value:29},U:{pattern:"221121",value:30},V:{pattern:"222111",value:31},W:{pattern:"112122",value:32},X:{pattern:"112221",value:33},Y:{pattern:"122121",value:34},Z:{pattern:"123111",value:35},"-":{pattern:"121131",value:36},".":{pattern:"311112",value:37}," ":{pattern:"311211",value:38},$:{pattern:"321111",value:39},"/":{pattern:"112131",value:40},"+":{pattern:"113121",value:41},"%":{pattern:"211131",value:42},SHIFT0:{pattern:"122211",value:46},SHIFT1:{pattern:"311121",value:45},SHIFT2:{pattern:"121221",value:43},SHIFT3:{pattern:"312111",value:44},START:{pattern:"111141"},TERMINATION_BAR:"1"}})},rf.prototype.initValue=function(t,e,o){this.value=t,this.width=e,this.height=o,this.pattern=[],this.values=[],this.dataLength=t.length},rf.prototype.prepareValues=function(){var t=Math.ceil(Math.max(.15*this.width,24));if(this.height<t)throw new Error("Insufficient height for Code93 encoding: the current height is "+this.height+"px, the minimum required height is "+t+"px.");if(this.setBaseUnit(),this.baseUnit<this.minBaseUnitLength)throw t=Math.ceil(this.minBaseUnitLength*(this.width/this.baseUnit)),new Error("Insufficient width for Code93 encoding: the current width is "+this.width+'px and the minimum required width for value "'+this.value+'" is '+t+"px.")},rf.prototype.setBaseUnit=function(){this.baseUnit=this.width/(9*(this.dataLength+2+2)+this.quietZoneLength+1)},rf.prototype.addStart=function(){var t=this.characterMap.START.pattern;this.addPattern(t)},rf.prototype.addStop=function(){this.addStart(),this.pattern.push(this.characterMap.TERMINATION_BAR)},rf.prototype.addBase=function(t){this.addPattern(t.pattern),this.values.push(t.value)},rf.prototype.pushCheckSum=function(){var t,e=this._getCheckValues();this.checksum=e.join("");for(var o=0;o<e.length;o++)t=this.characterMap[this._findCharacterByValue(e[o])],this.addPattern(t.pattern)},rf.prototype._getCheckValues=function(){for(var t,e=this.values,o=e.length,i=0,r=o-1;0<=r;r--)i+=this.weightedValue(e[r],o-r,this.cCheckSumTotal);for(t=i%this.checkSumMod,i=this.weightedValue(t,1,this.kCheckSumTotal),r=o-1;0<=r;r--)i+=this.weightedValue(e[r],o-r+1,this.kCheckSumTotal);return[t,i%this.checkSumMod]},rf.prototype._findCharacterByValue=function(t){for(var e in this.characterMap)if(this.characterMap[e].value===t)return e},rf.prototype.weightedValue=function(t,e,o){return(e%o||o)*t},rf.prototype.addPattern=function(t){for(var e,o=0;o<t.length;o++)e=parseInt(t.charAt(o),10),this.pattern.push(e)},rf),On=((Vd=c)&&(of.__proto__=Vd),((of.prototype=Object.create(Vd&&Vd.prototype)).constructor=of).prototype.initProperties=function(){Vd.prototype.initProperties.call(this),x(this,Wd,{name:"Code 93 extended",pushCheckSum:function(){var t=this._getCheckValues();this.checksum=t.join("");for(var e,o=0;o<t.length;o++)e=t[o],this.shiftValuesAsciiCodes[e]?this.addExtended(this.shiftValuesAsciiCodes[e]):(e=this._findCharacterByValue(e),this.addPattern(this.characterMap[e].pattern))}})},of),qd=/^\d+$/,Yd=Object.assign,h=((zd=cc)&&(ef.__proto__=zd),((ef.prototype=Object.create(zd&&zd.prototype)).constructor=ef).prototype.initProperties=function(){zd.prototype.initProperties.call(this),Yd(this,{name:"Postnet",START:"2",VALID_CODE_LENGTHS:[5,9,11],DIGIT_SEPARATOR:"-",characterMap:["22111","11122","11212","11221","12112","12121","12211","21112","21121","21211"]})},ef.prototype.initValue=function(t,e,o){this.height=o,this.width=e,this.baseHeight=o/2,this.value=t.replace(new RegExp(this.DIGIT_SEPARATOR,"g"),""),this.pattern=[],this.validate(this.value),this.checkSum=0,this.setBaseUnit()},ef.prototype.addData=function(){var t=this.value;this.addPattern(this.START);for(var e=0;e<t.length;e++)this.addCharacter(t.charAt(e));this.options.addCheckSum&&this.addCheckSum(),this.addPattern(this.START),this.pattern.pop()},ef.prototype.addCharacter=function(t){var e=this.characterMap[t];this.checkSum+=parseInt(t,10),this.addPattern(e)},ef.prototype.addCheckSum=function(){this.checksum=(10-this.checkSum%10)%10,this.addCharacter(this.checksum)},ef.prototype.setBaseUnit=function(){this.baseUnit=this.width/(10*(this.value.length+1)+3+this.quietZoneLength)},ef.prototype.validate=function(t){if(qd.test(t)||this.invalidCharacterError(t.match(/[^0-9]/)[0]),!u(t.length,this.VALID_CODE_LENGTHS))throw new Error("Invalid value length. Valid lengths for the Postnet symbology are "+this.VALID_CODE_LENGTHS.join(",")+".")},ef.prototype.addPattern=function(t){for(var e,o=0;o<t.length;o++)e=this.height-this.baseHeight*t.charAt(o),this.pattern.push({width:1,y1:e,y2:this.height}),this.pattern.push(1)},ef),Zd=/^\d+$/,Qd=/^[a-z0-9]+$/i,Kd=Object.assign,N=((Id=b.Class)&&(tf.__proto__=Id),((tf.prototype=Object.create(Id&&Id.prototype)).constructor=tf).prototype.initProperties=function(){},tf.prototype.addStart=function(){},tf.prototype.is=function(){},tf.prototype.isCode=function(){return!1},tf.prototype.move=function(){},tf.prototype.pushState=function(){},tf),l=((Ld=N)&&(Jd.__proto__=Ld),((Jd.prototype=Object.create(Ld&&Ld.prototype)).constructor=Jd).prototype.initProperties=function(){Ld.prototype.initProperties.call(this),x(this,{FNC4:"FNC4",SHIFT:98})},Jd.prototype.addStart=function(){this.encoding.addPattern(this.START)},Jd.prototype.is=function(t,e){t=t.charCodeAt(e);return this.isCode(t)},Jd.prototype.move=function(t){for(var e=0;!this._moves[e].call(this,t)&&e<this._moves.length;)e++},Jd.prototype.pushState=function(t){var e,o=this.states,i=t.value,r=i.length;for(!u("C",o)||(o=i.substr(t.index).match(/\d{4,}/g))&&(r=i.indexOf(o[0],t.index));0<=(e=t.value.charCodeAt(t.index))&&this.isCode(e)&&t.index<r;)this.encoding.addPattern(this.getValue(e)),t.index++},Jd.prototype._initMoves=function(t){this._moves=[],u(this.FNC4,t)&&this._moves.push(this._moveFNC),u(this.shiftKey,t)&&this._moves.push(this._shiftState),this._moves.push(this._moveState)},Jd.prototype._moveFNC=function(t){if(t.fnc)return t.fnc=!1,t.previousState===this.key},Jd.prototype._shiftState=function(t){if(t.previousState===this.shiftKey&&(t.index+1>=t.value.length||this.encoding[this.shiftKey].is(t.value,t.index+1)))return this.encoding.addPattern(this.SHIFT),t.shifted=!0},Jd.prototype._moveState=function(){return this.encoding.addPattern(this.MOVE),!0},Jd),$d={};function Jd(t,e){Ld.call(this,t),this.states=e,this._initMoves(e)}function tf(t){Id.call(this),this.encoding=t,this.initProperties()}function ef(){zd.apply(this,arguments)}function of(){Vd.apply(this,arguments)}function rf(){jd.apply(this,arguments)}function nf(){Dd.apply(this,arguments)}function sf(t,e){Hd.call(this,t),this.states=e}function af(t,e){Ud.call(this,t),this._initSubStates(e)}function pf(){Fd.apply(this,arguments)}function hf(){Nd.apply(this,arguments)}function lf(){Gd.apply(this,arguments)}$d.A=((Gd=l)&&(lf.__proto__=Gd),((lf.prototype=Object.create(Gd&&Gd.prototype)).constructor=lf).prototype.initProperties=function(){Gd.prototype.initProperties.call(this),Kd(this,{key:"A",shiftKey:"B",MOVE:101,START:103})},lf.prototype.isCode=function(t){return 0<=t&&t<96},lf.prototype.getValue=function(t){return t<32?t+64:t-32},lf),$d.B=((Nd=l)&&(hf.__proto__=Nd),((hf.prototype=Object.create(Nd&&Nd.prototype)).constructor=hf).prototype.initProperties=function(){Nd.prototype.initProperties.call(this),Kd(this,{key:"B",shiftKey:"A",MOVE:100,START:104})},hf.prototype.isCode=function(t){return 32<=t&&t<128},hf.prototype.getValue=function(t){return t-32},hf),$d.C=((Fd=N)&&(pf.__proto__=Fd),((pf.prototype=Object.create(Fd&&Fd.prototype)).constructor=pf).prototype.initProperties=function(){Fd.prototype.initProperties.call(this),Kd(this,{key:"C",MOVE:99,START:105})},pf.prototype.addStart=function(){this.encoding.addPattern(this.START)},pf.prototype.is=function(t,e){var o=Af(t,e,4);return(e+4<=t.length||2===t.length)&&Zd.test(o)},pf.prototype.move=function(){this.encoding.addPattern(this.MOVE)},pf.prototype.pushState=function(t){for(var e;(e=Af(t.value,t.index,2))&&Zd.test(e)&&2===e.length;)this.encoding.addPattern(parseInt(e,10)),t.index+=2},pf.prototype.getValue=function(t){return t},pf),$d.FNC4=((Ud=N)&&(af.__proto__=Ud),((af.prototype=Object.create(Ud&&Ud.prototype)).constructor=af).prototype.initProperties=function(){Ud.prototype.initProperties.call(this),Kd(this,{key:"FNC4",dependentStates:["A","B"]})},af.prototype.addStart=function(t){t=t.value.charCodeAt(0)-128,t=this._getSubState(t);this.encoding[t].addStart()},af.prototype.is=function(t,e){t=t.charCodeAt(e);return this.isCode(t)},af.prototype.isCode=function(t){return 128<=t&&t<256},af.prototype.pushState=function(t){var e,o=this._initSubState(t),i=this.encoding,r=o.value.length;if(t.index+=r,r<3)for(;o.index<r;o.index++)e=o.value.charCodeAt(o.index),o.state=this._getSubState(e),o.previousState!==o.state&&(o.previousState=o.state,i[o.state].move(o)),i.addPattern(i[o.state].MOVE),i.addPattern(i[o.state].getValue(e));else o.state!==o.previousState&&i[o.state].move(o),this._pushStart(o),i.pushData(o,this.subStates),t.index<t.value.length&&this._pushStart(o);t.fnc=!0,t.state=o.state},af.prototype._pushStart=function(t){this.encoding.addPattern(this.encoding[t.state].MOVE),this.encoding.addPattern(this.encoding[t.state].MOVE)},af.prototype._initSubState=function(t){var e={value:this._getAll(t.value,t.index),index:0};return e.state=this._getSubState(e.value.charCodeAt(0)),e.previousState=t.previousState===this.key?e.state:t.previousState,e},af.prototype._initSubStates=function(t){this.subStates=[];for(var e=0;e<t.length;e++)u(t[e],this.dependentStates)&&this.subStates.push(t[e])},af.prototype._getSubState=function(t){for(var e=0;e<this.subStates.length;e++)if(this.encoding[this.subStates[e]].isCode(t))return this.subStates[e]},af.prototype._getAll=function(t,e){for(var o,i="",r=e;(o=t.charCodeAt(r++))&&this.isCode(o);)i+=String.fromCharCode(o-128);return i},af),$d.FNC1=((Hd=N)&&(sf.__proto__=Hd),((sf.prototype=Object.create(Hd&&Hd.prototype)).constructor=sf).prototype.initProperties=function(){Hd.prototype.initProperties.call(this),Kd(this,{key:"FNC1",startState:"C",startAI:"(",endAI:")",dependentStates:["C","B"],applicationIdentifiers:{22:{max:29,type:"alphanumeric"},402:{length:17},7004:{max:4,type:"alphanumeric"},242:{max:6,type:"alphanumeric"},8020:{max:25,type:"alphanumeric"},703:{min:3,max:30,type:"alphanumeric"},8008:{min:8,max:12,type:"alphanumeric"},253:{min:13,max:17,type:"alphanumeric"},8003:{min:14,max:30,type:"alphanumeric"},multiKey:[{ids:["15","17","8005","8100"],ranges:[[11,13],[310,316],[320,336],[340,369]],type:{length:6}},{ids:["240","241","250","251","400","401","403","7002","8004","8007","8110"],ranges:[[-9]],type:{max:30,type:"alphanumeric"}},{ids:["7001"],ranges:[[410,414]],type:{length:13}},{ids:["10","21","254","420","8002"],type:{max:20,type:"alphanumeric"}},{ids:["00","8006","8017","8018"],type:{length:18}},{ids:["01","02","8001"],type:{length:14}},{ids:["422"],ranges:[[424,426]],type:{length:3}},{ids:["20","8102"],type:{length:2}},{ids:["30","37"],type:{max:8,type:"alphanumeric"}},{ids:["390","392"],type:{max:15,type:"alphanumeric"}},{ids:["421","423"],type:{min:3,max:15,type:"alphanumeric"}},{ids:["391","393"],type:{min:3,max:18,type:"alphanumeric"}},{ids:["7003","8101"],type:{length:10}}]},START:102})},sf.prototype.addStart=function(){this.encoding[this.startState].addStart()},sf.prototype.is=function(){return u(this.key,this.states)},sf.prototype.pushState=function(t){var e,o,i,r=this.encoding,n=t.value.replace(/\s/g,""),s=new RegExp("["+this.startAI+this.endAI+"]","g"),a=t.index,p={state:this.startState};for(r.addPattern(this.START);;){if((e=(p.index=0)<(i=n.charAt(a)===this.startAI?2:0)?this.getBySeparator(n,a):this.getByLength(n,a)).ai.length)o=a+i+e.id.length+e.ai.length;else if((o=n.indexOf(this.startAI,a+1))<0){if(a+e.ai.max+e.id.length+i<n.length)throw new Error("Separators are required after variable length identifiers");o=n.length}if(p.value=n.substring(a,o).replace(s,""),this.validate(e,p.value),r.pushData(p,this.dependentStates),o>=n.length)break;a=o,p.state!==this.startState&&(r[this.startState].move(p),p.state=this.startState),e.ai.length||r.addPattern(this.START)}t.index=t.value.length},sf.prototype.validate=function(t,e){var e=e.substr(t.id.length),o=t.ai;if(!o.type&&!Zd.test(e))throw new Error("Application identifier "+t.id+" is numeric only but contains non numeric character(s).");if("alphanumeric"===o.type&&!Qd.test(e))throw new Error("Application identifier "+t.id+" is alphanumeric only but contains non alphanumeric character(s).");if(o.length&&o.length!==e.length)throw new Error("Application identifier "+t.id+" must be "+o.length+" characters long.");if(o.min&&o.min>e.length)throw new Error("Application identifier "+t.id+" must be at least "+o.min+" characters long.");if(o.max&&o.max<e.length)throw new Error("Application identifier "+t.id+" must be at most "+o.max+" characters long.")},sf.prototype.getByLength=function(t,e){for(var o,i,r=2;r<=4;r++)if(o=Af(t,e,r),i=this.getApplicationIdentifier(o)||this.getApplicationIdentifier(o.substring(0,o.length-1)))return{id:o,ai:i};this.unsupportedAIError(o)},sf.prototype.unsupportedAIError=function(t){throw new Error("'"+t+"' is not a supported Application Identifier")},sf.prototype.getBySeparator=function(t,e){var e=t.indexOf(this.startAI,e),o=t.indexOf(this.endAI,e),t=t.substring(e+1,o),e=this.getApplicationIdentifier(t)||this.getApplicationIdentifier(t.substr(t.length-1));return e||this.unsupportedAIError(t),{ai:e,id:t}},sf.prototype.getApplicationIdentifier=function(t){var e=this.applicationIdentifiers,o=e.multiKey;if(e[t])return e[t];for(var i=0;i<o.length;i++){if(o[i].ids&&u(t,o[i].ids))return o[i].type;if(o[i].ranges)for(var r=o[i].ranges,n=0;n<r.length;n++)if(r[n][0]<=t&&t<=r[n][1])return o[i].type}},sf);(yf=cc)&&(kf.__proto__=yf),((kf.prototype=Object.create(yf&&yf.prototype)).constructor=kf).prototype.initProperties=function(){yf.prototype.initProperties.call(this),Kd(this,{characterMap:[212222,222122,222221,121223,121322,131222,122213,122312,132212,221213,221312,231212,112232,122132,122231,113222,123122,123221,223211,221132,221231,213212,223112,312131,311222,321122,321221,312212,322112,322211,212123,212321,232121,111323,131123,131321,112313,132113,132311,211313,231113,231311,112133,112331,132131,113123,113321,133121,313121,211331,231131,213113,213311,213131,311123,311321,331121,312113,312311,332111,314111,221411,431111,111224,111422,121124,121421,141122,141221,112214,112412,122114,122411,142112,142211,241211,221114,413111,241112,134111,111242,121142,121241,114212,124112,124211,411212,421112,421211,212141,214121,412121,111143,111341,131141,114113,114311,411113,411311,113141,114131,311141,411131,211412,211214,211232,2331112],STOP:106})},kf.prototype._initStates=function(){for(var t=0;t<this.states.length;t++)this[this.states[t]]=new $d[this.states[t]](this,this.states)},kf.prototype.initValue=function(t,e,o){this.pattern=[],this.value=t,this.width=e,this.height=o,this.checkSum=0,this.totalUnits=0,this.index=0,this.position=1},kf.prototype.addData=function(){var t={value:this.value,index:0,state:""};0!==this.value.length&&(t.state=t.previousState=this.getNextState(t,this.states),this.addStart(t),this.pushData(t,this.states),this.addCheckSum(),this.addStop(),this.setBaseUnit())},kf.prototype.pushData=function(t,e){for(;this[t.state].pushState(t),!(t.index>=t.value.length);){var o;t.shifted?(o=t.state,t.state=t.previousState,t.previousState=o,t.shifted=!1):(t.previousState=t.state,t.state=this.getNextState(t,e),this[t.state].move(t))}},kf.prototype.addStart=function(t){this[t.state].addStart(t),this.position=1},kf.prototype.addCheckSum=function(){this.checksum=this.checkSum%103,this.addPattern(this.checksum)},kf.prototype.addStop=function(){this.addPattern(this.STOP)},kf.prototype.setBaseUnit=function(){this.baseUnit=this.width/(this.totalUnits+this.quietZoneLength)},kf.prototype.addPattern=function(t){for(var e,o=this.characterMap[t].toString(),i=0;i<o.length;i++)e=parseInt(o.charAt(i),10),this.pattern.push(e),this.totalUnits+=e;this.checkSum+=t*this.position++},kf.prototype.getNextState=function(t,e){for(var o=0;o<e.length;o++)if(this[e[o]].is(t.value,t.index))return e[o];this.invalidCharacterError(t.value.charAt(t.index))};var cf,uf,df,ff,gf,yf,l=kf,N=((gf=l)&&(Sf.__proto__=gf),((Sf.prototype=Object.create(gf&&gf.prototype)).constructor=Sf).prototype.initProperties=function(){gf.prototype.initProperties.call(this),Kd(this,{name:"Code 128 A",states:["A"]})},Sf),vf=((ff=l)&&(Cf.__proto__=ff),((Cf.prototype=Object.create(ff&&ff.prototype)).constructor=Cf).prototype.initProperties=function(){ff.prototype.initProperties.call(this),Kd(this,{name:"Code 128 B",states:["B"]})},Cf),mf=((df=l)&&(wf.__proto__=df),((wf.prototype=Object.create(df&&df.prototype)).constructor=wf).prototype.initProperties=function(){df.prototype.initProperties.call(this),Kd(this,{name:"Code 128 C",states:["C"]})},wf),xf=((uf=l)&&(bf.__proto__=uf),((bf.prototype=Object.create(uf&&uf.prototype)).constructor=bf).prototype.initProperties=function(){uf.prototype.initProperties.call(this),Kd(this,{name:"Code 128",states:["C","B","A","FNC4"]})},bf),l=((cf=l)&&(_f.__proto__=cf),((_f.prototype=Object.create(cf&&cf.prototype)).constructor=_f).prototype.initProperties=function(){cf.prototype.initProperties.call(this),Kd(this,{name:"Code GS1-128",states:["FNC1","C","B"]})},_f);function _f(){cf.apply(this,arguments)}function bf(){uf.apply(this,arguments)}function wf(){df.apply(this,arguments)}function Cf(){ff.apply(this,arguments)}function Sf(){gf.apply(this,arguments)}function kf(t){yf.call(this,t),this._initStates()}function Af(t,e,o){return t.substring(e,e+o)}var Pf,Tf,Mf,Of,Bf,Rf,Ef,Lf=Object.assign,If=((Ef=cc)&&(Qf.__proto__=Ef),((Qf.prototype=Object.create(Ef&&Ef.prototype)).constructor=Qf).prototype.initProperties=function(){Ef.prototype.initProperties.call(this),Lf(this,{characterMap:["12121212","12121221","12122112","12122121","12211212","12211221","12212112","12212121","21121212","21121221"],START:"21",STOP:"121",checkSumType:"",checkSums:Df})},Qf.prototype.initValue=function(t,e){this.pattern=[],this.value=t,this.checkSumLength=0,this.width=e},Qf.prototype.setBaseUnit=function(){this.baseUnit=this.width/(12*(this.value.length+this.checkSumLength)+this.quietZoneLength+7)},Qf.prototype.addData=function(){var t=this.value;this.addPattern(this.START);for(var e=0;e<t.length;e++)this.addCharacter(t.charAt(e));this.options.addCheckSum&&this.addCheckSum(),this.addPattern(this.STOP),this.setBaseUnit()},Qf.prototype.addCharacter=function(t){var e=this.characterMap[t];e||this.invalidCharacterError(t),this.addPattern(e)},Qf.prototype.addPattern=function(t){for(var e=0;e<t.length;e++)this.pattern.push(parseInt(t.charAt(e),10))},Qf.prototype.addCheckSum=function(){var t=this.checkSums[this.checkSumType].call(this.checkSums,this.value);this.checksum=t.join("");for(var e=0;e<t.length;e++)this.checkSumLength++,this.addPattern(this.characterMap[t[e]])},Qf),zf=((Rf=If)&&(Zf.__proto__=Rf),((Zf.prototype=Object.create(Rf&&Rf.prototype)).constructor=Zf).prototype.initProperties=function(){Rf.prototype.initProperties.call(this),Lf(this,{name:"MSI Modulo10",checkSumType:"Modulo10"})},Zf),Vf=((Bf=If)&&(Yf.__proto__=Bf),((Yf.prototype=Object.create(Bf&&Bf.prototype)).constructor=Yf).prototype.initProperties=function(){Bf.prototype.initProperties.call(this),Lf(this,{name:"MSI Modulo11",checkSumType:"Modulo11"})},Yf),jf=((Of=If)&&(qf.__proto__=Of),((qf.prototype=Object.create(Of&&Of.prototype)).constructor=qf).prototype.initProperties=function(){Of.prototype.initProperties.call(this),Lf(this,{name:"MSI Modulo10 Modulo10",checkSumType:"Modulo10Modulo10"})},qf),If=((Mf=If)&&(Xf.__proto__=Mf),((Xf.prototype=Object.create(Mf&&Mf.prototype)).constructor=Xf).prototype.initProperties=function(){Mf.prototype.initProperties.call(this),Lf(this,{name:"MSI Modulo11 Modulo10",checkSumType:"Modulo11Modulo10"})},Xf),Df={Modulo10:function(t){for(var e,o,i=[0,""],r=t.length%2,n=0;n<t.length;n++)i[(n+r)%2]+=parseInt(t.charAt(n),10);for(o=i[0],e=(2*i[1]).toString(),n=0;n<e.length;n++)o+=parseInt(e.charAt(n),10);return[(10-o%10)%10]},Modulo11:function(t){for(var e,o=0,i=t.length,r=0;r<i;r++)o+=(((i-r)%6||6)+1)*t.charAt(r);return 10!=(e=(11-o%11)%11)?[e]:[1,0]},Modulo11Modulo10:function(t){var e=this.Modulo11(t),t=t+e[0];return e.concat(this.Modulo10(t))},Modulo10Modulo10:function(t){var e=this.Modulo10(t),t=t+e[0];return e.concat(this.Modulo10(t))}},Hf=Object.assign,cc=((Tf=cc)&&(Wf.__proto__=Tf),((Wf.prototype=Object.create(Tf&&Tf.prototype)).constructor=Wf).prototype.initProperties=function(){Tf.prototype.initProperties.call(this),Hf(this,{name:"EAN 13",keyTable:["000000","001011","001101","001110","010011","011001","011100","010101","010110","011010"],characterMap:{digits:[[3,2,1,1],[2,2,2,1],[2,1,2,2],[1,4,1,1],[1,1,3,2],[1,2,3,1],[1,1,1,4],[1,3,1,2],[1,2,1,3],[3,1,1,2]],start:[1,1,1],middle:[1,1,1,1,1]}})},Wf.prototype.initValue=function(t,e,o){t=String(t);if(12!==t.length||/\D/.test(t))throw new Error('The value of the "EAN13" encoding should be 12 symbols');this.pattern=[],this.options.height=o,this.baseUnit=e/(95+this.quietZoneLength),this.value=t,this.checksum=this.calculateChecksum(),this.leftKey=t[0],this.leftPart=t.substr(1,6),this.rightPart=t.substr(7)+this.checksum},Wf.prototype.addData=function(){this.addPieces(this.characterMap.start),this.addSide(this.leftPart,this.leftKey),this.addPieces(this.characterMap.middle),this.addSide(this.rightPart),this.addPieces(this.characterMap.start)},Wf.prototype.addSide=function(t,e){for(var o=0;o<t.length;o++)e&&parseInt(this.keyTable[e].charAt(o),10)?this.addPieces(Array.prototype.slice.call(this.characterMap.digits[t.charAt(o)]).reverse(),!0):this.addPieces(this.characterMap.digits[t.charAt(o)],!0)},Wf.prototype.addPieces=function(t,e){for(var o=0;o<t.length;o++)e?this.pattern.push({y1:0,y2:.95*this.options.height,width:t[o]}):this.pattern.push(t[o])},Wf.prototype.calculateChecksum=function(){for(var t=0,e=0,o=this.value.split("").reverse().join(""),i=0;i<o.length;i++)i%2?e+=parseInt(o.charAt(i),10):t+=parseInt(o.charAt(i),10);return(10-(3*t+e)%10)%10},Wf),Uf=Object.assign,Ff=((Pf=cc)&&(Gf.__proto__=Pf),((Gf.prototype=Object.create(Pf&&Pf.prototype)).constructor=Gf).prototype.initProperties=function(){Pf.prototype.initProperties.call(this),Uf(this,{name:"EAN 8"})},Gf.prototype.initValue=function(t,e,o){if(7!==t.length||/\D/.test(t))throw new Error("Invalid value provided");this.value=t,this.options.height=o,this.checksum=this.calculateChecksum(this.value),this.leftPart=this.value.substr(0,4),this.rightPart=this.value.substr(4)+this.checksum,this.pattern=[],this.baseUnit=e/(67+this.quietZoneLength)},Gf),Nf={code11:t,code39:n,code39extended:uc,code93:c,code93extended:On,code128:xf,code128a:N,code128b:vf,code128c:mf};function Gf(){Pf.apply(this,arguments)}function Wf(){Tf.apply(this,arguments)}function Xf(){Mf.apply(this,arguments)}function qf(){Of.apply(this,arguments)}function Yf(){Bf.apply(this,arguments)}function Zf(){Rf.apply(this,arguments)}function Qf(){Ef.apply(this,arguments)}function Kf(t,e){var o=t.style.display,e=("canvas"===e&&(t.style.display="block"),{width:t.clientWidth,height:t.clientHeight});return t.style.display=o,e}Nf["gs1-128"]=l,Nf.msimod10=zf,Nf.msimod11=Vf,Nf.msimod1010=jf,Nf.msimod1110=If,Nf.postnet=h,Nf.ean8=Ff,Nf.ean13=cc;($f=b.Class)&&(Jf.__proto__=$f),((Jf.prototype=Object.create($f&&$f.prototype)).constructor=Jf).prototype.destroy=function(){this._destroySurface()},Jf.prototype._initElement=function(){it(this.element,"k-barcode")},Jf.prototype._initSurface=function(){var t=this.options,e=this.surface;e&&e.options.type===t.renderAs||(this._destroySurface(),this._initSurfaceElement(),this.surface=this._createSurface())},Jf.prototype._createSurface=function(){return b.drawing.Surface.create(this.surfaceElement,{type:this.options.renderAs})},Jf.prototype._destroySurface=function(){this.surface&&(this.surface.destroy(),this.surface=null,this._destroySurfaceElement())},Jf.prototype._initSurfaceElement=function(){this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.surfaceElement.style.position="relative",this.element.appendChild(this.surfaceElement))},Jf.prototype._destroySurfaceElement=function(){this.surfaceElement&&this.surfaceElement.parentNode&&(this.surfaceElement.parentNode.removeChild(this.surfaceElement),this.surfaceElement=null)},Jf.prototype.setOptions=function(t){this._setOptions(t),this._initSurface(),this.redraw()},Jf.prototype.redraw=function(){var t=this._getSize();this.surface.clear(),this.surface.setSize({width:t.width,height:t.height}),this.createVisual(),this.surface.draw(this.visual)},Jf.prototype.getSize=function(){return{width:this.element.offsetWidth,height:this.element.offsetHeight}},Jf.prototype._resize=function(){this.redraw()},Jf.prototype.createVisual=function(){this.visual=this._render()},Jf.prototype._render=function(){var t,e=this.options,o=e.value,i=e.text,r=A(i.margin),n=this._getSize(),s=e.border||{},a=this.encoding,s=new B(0,0,n.width,n.height).unpad(s.width).unpad(e.padding),p=s.height(),h=new b.drawing.Group;this.contentBox=s,h.append(this._getBackground(n)),i.visible&&(p-=b.drawing.util.measureText(o,{font:i.font}).height+r.top+r.bottom);try{t=a.encode(o,s.width(),p)}catch(t){return this.onError(t),h}return i.visible&&(n=o,e.checksum&&P(a.checksum)&&(n+=" "+a.checksum),h.append(this._getText(n))),this.barHeight=p,this._bandsGroup=this._getBands(t.pattern,t.baseUnit),h.append(this._bandsGroup),h},Jf.prototype.exportVisual=function(){return this._render()},Jf.prototype._getSize=function(){var t=Kf(this.element,this.options.renderAs),e=new b.geometry.Size(300,100);return 0<t.width&&(e.width=t.width),0<t.height&&(e.height=t.height),this.options.width&&(e.width=this.options.width),this.options.height&&(e.height=this.options.height),e},Jf.prototype.value=function(t){if(!P(t))return this.options.value;this.options.value=String(t),this.redraw()},Jf.prototype._getBands=function(t,e){for(var o=this.contentBox,i=o.x1,r=new b.drawing.Group,n=0;n<t.length;n++){var s,a=(s=ut(t[n])?t[n]:{width:t[n],y1:0,y2:this.barHeight}).width*e;n%2&&(s=b.geometry.Rect.fromPoints(new b.geometry.Point(i,s.y1+o.y1),new b.geometry.Point(i+a,s.y2+o.y1)),s=b.drawing.Path.fromRect(s,{fill:{color:this.options.color},stroke:null}),r.append(s)),i+=a}return r},Jf.prototype._getBackground=function(t){var e=this.options,o=e.border||{},t=new B(0,0,t.width,t.height).unpad(o.width/2);return b.drawing.Path.fromRect(t.toRect(),{fill:{color:e.background},stroke:{color:o.width?o.color:"",width:o.width,dashType:o.dashType}})},Jf.prototype._getText=function(t){var e=this.options.text,t=this._textbox=new We(t,{font:e.font,color:e.color,align:"center",vAlign:"bottom",margin:e.margin});return t.reflow(this.contentBox),t.renderVisual(),t.visual},Jf.prototype._setOptions=function(t){if(this.type=(t.type||this.options.type).toLowerCase(),"upca"===this.type&&(this.type="ean13",t.value="0"+t.value),"upce"===this.type&&(this.type="ean8",t.value="0"+t.value),!Nf[this.type])throw new Error("Encoding '"+this.type+"' is not supported.");this.encoding=new Nf[this.type],this.options=x({},this.options,t)};var $f,t=Jf;function Jf(t,e,o){void 0===o&&(o=pe),$f.call(this),this.options=x({},this.options,e),this.element=t,this.onError=o,this._initElement(),this._initSurface(),this._setOptions(e),e&&P(e.value)&&this.redraw()}e(t,{name:"Barcode",renderAs:"svg",value:"",type:"code39",checksum:!1,width:0,height:0,color:"black",background:"white",text:{visible:!0,font:"16px Consolas, Monaco, Sans Mono, monospace, sans-serif",color:"black",margin:{top:0,bottom:0,left:0,right:0}},border:{width:0,dashType:"solid",color:"black"},padding:{top:0,bottom:0,left:0,right:0}});const tg=t;var eg={width:500,height:100};const og=function(t,e){if(void 0===e&&(e=eg),!t)throw new Error("Please specify barcode type to validate.");var o,i,r,n=t.toLowerCase(),s="";if("upca"===n?(n="ean13",s="0"):"upce"===n&&(n="ean8",s="0"),Nf[n])return o=new Nf[n],i=e,r=s,function(t){try{o.encode(r+t,i.width,i.height)}catch(t){return{valid:!1,error:t}}return{valid:!0}};throw new Error("Encoding '"+t+"' is not supported.")};var ig=Object.assign;function rg(t,e){for(var o=[],i=0;i<t.length;)o.push(t.substring(i,i+e)),i+=e;return o}function ng(t,e){t=Number(t).toString(2);return t=t.length<e?new Array(e-t.length+1).join(0)+t:t}function sg(t){return parseInt(t,2)}(dg=b.Class)&&(Sg.__proto__=dg),((Sg.prototype=Object.create(dg&&dg.prototype)).constructor=Sg).prototype.move=function(){this.row+=this.dir*this.c,this.c^=1,this.column=this.startColumn-this.c},Sg.prototype.getNextCell=function(){for(;void 0!==this.matrix[this.row][this.column];)this.move(),(this.row<0||this.row>=this.matrix.length)&&(this.dir=-this.dir,this.startColumn-=8!==this.startColumn?2:3,this.column=this.startColumn,this.row=this.dir<0?this.matrix.length-1:0);return{row:this.row,column:this.column}},Sg.prototype.getNextRemainderCell=function(){if(this.move(),void 0===this.matrix[this.row][this.column])return{row:this.row,column:this.column}};var ag,pg,hg,lg,cg,ug,dg,fg=Sg,gg=((ug=b.Class)&&(Cg.__proto__=ug),(Cg.prototype=Object.create(ug&&ug.prototype)).constructor=Cg),yg=((cg=b.Class)&&(wg.__proto__=cg),((wg.prototype=Object.create(cg&&cg.prototype)).constructor=wg).prototype.getEncodingResult=function(n,t){var e=function(){var t,e=[],o=0,i=n;for(e.push(Xg(i,8,5,8,t)),t=e[0].mode,i=i.substr(e[0].modeString.length);0<i.length;){var r=Xg(i,17,9,16,t);r.mode!==t?(t=r.mode,e.push(r),o++):e[o].modeString+=r.modeString,i=i.substr(r.modeString.length)}return e}(),t=qg(function(t){for(var e=0,o=0;o<t.length;o++)e+=vg[t[o].mode].getStringBitsLength(t[o].modeString.length);return Math.ceil(e/8)}(e),t),e=function(t,e){for(var o="",i=0;i<t.length;i++)o+=vg[t[i].mode].encode(t[i].modeString,e);return o}(e,t);return new gg(e,t)},wg),n=((lg=b.Class)&&(bg.__proto__=lg),((bg.prototype=Object.create(lg&&lg.prototype)).constructor=bg).prototype.initProperties=function(){ig(this,{modeIndicator:"",bitsInCharacterCount:[]})},bg.prototype.getVersionIndex=function(t){return t<10?0:26<t?2:1},bg.prototype.getBitsCharacterCount=function(t){return this.bitsInCharacterCount[this.getVersionIndex(t||40)]},bg.prototype.getModeCountString=function(t,e){return this.modeIndicator+ng(t,this.getBitsCharacterCount(e))},bg.prototype.encode=function(){},bg.prototype.getStringBitsLength=function(){},bg.prototype.getValue=function(){},bg),uc=((hg=n)&&(_g.__proto__=hg),((_g.prototype=Object.create(hg&&hg.prototype)).constructor=_g).prototype.initProperties=function(){hg.prototype.initProperties.call(this),ig(this,{bitsInCharacterCount:[10,12,14],modeIndicator:"0001"})},_g.prototype.getValue=function(t){return parseInt(t,10)},_g.prototype.encode=function(t,e){for(var o=rg(t,3),i=this.getModeCountString(t.length,e),r=0;r<o.length-1;r++)i+=ng(o[r],10);return i+ng(o[r],1+3*o[r].length)},_g.prototype.getStringBitsLength=function(t,e){var o=t%3;return 4+this.getBitsCharacterCount(e)+10*Math.floor(t/3)+3*o+(0==o?0:1)},_g),c=((pg=n)&&(xg.__proto__=pg),((xg.prototype=Object.create(pg&&pg.prototype)).constructor=xg).prototype.initProperties=function(){pg.prototype.initProperties.call(this),ig(this,{characters:{0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,G:16,H:17,I:18,J:19,K:20,L:21,M:22,N:23,O:24,P:25,Q:26,R:27,S:28,T:29,U:30,V:31,W:32,X:33,Y:34,Z:35," ":36,$:37,"%":38,"*":39,"+":40,"-":41,".":42,"/":43,":":44},bitsInCharacterCount:[9,11,13],modeIndicator:"0010"})},xg.prototype.getValue=function(t){return this.characters[t]},xg.prototype.encode=function(t,e){for(var o=rg(t,2),i=this.getModeCountString(t.length,e),r=0;r<o.length-1;r++)i+=ng(45*this.getValue(o[r].charAt(0))+this.getValue(o[r].charAt(1)),11);return i+ng(2===o[r].length?45*this.getValue(o[r].charAt(0))+this.getValue(o[r].charAt(1)):this.getValue(o[r].charAt(0)),1+5*o[r].length)},xg.prototype.getStringBitsLength=function(t,e){return 4+this.getBitsCharacterCount(e)+11*Math.floor(t/2)+t%2*6},xg),On=((ag=n)&&(mg.__proto__=ag),((mg.prototype=Object.create(ag&&ag.prototype)).constructor=mg).prototype.initProperties=function(){ag.prototype.initProperties.call(this),ig(this,{bitsInCharacterCount:[8,16,16],modeIndicator:"0100"})},mg.prototype.getValue=function(t){var e=t.charCodeAt(0);if(e<=127||160<=e&&e<=255)return e;throw new Error('Unsupported character in QR Code: "'+t+'".')},mg.prototype.encode=function(t,e){for(var o=this.getModeCountString(t.length,e),i=0;i<t.length;i++)o+=ng(this.getValue(t.charAt(i)),8);return o},mg.prototype.getStringBitsLength=function(t,e){return 4+this.getBitsCharacterCount(e)+8*t},mg),vg={};function mg(){ag.apply(this,arguments)}function xg(){pg.apply(this,arguments)}function _g(){hg.apply(this,arguments)}function bg(){lg.call(this),this.initProperties()}function wg(){cg.apply(this,arguments)}function Cg(t,e){ug.call(this),this.dataString=t,this.version=e}function Sg(t){dg.call(this),this.matrix=t,this.row=t.length-1,this.column=t.length-1,this.startColumn=this.column,this.dir=-1,this.c=0}vg.numeric=new uc,vg.alphanumeric=new c,vg.byte=new On;(kg=b.Class)&&(Fg.__proto__=kg),((Fg.prototype=Object.create(kg&&kg.prototype)).constructor=Fg).prototype.initProperties=function(){ig(this,{encodingMode:"byte",utfBOM:"111011111011101110111111",initialModeCountStringLength:20,ranges:[128,2048,65536,2097152,67108864]})},Fg.prototype.getEncodingResult=function(t,e){t=this.encode(t),e=qg(this.getDataCodewordsCount(t),e),t=this.mode.getModeCountString(t.length/8,e)+t;return new gg(t,e)},Fg.prototype.getDataCodewordsCount=function(t){t=t.length;return Math.ceil((this.initialModeCountStringLength+t)/8)},Fg.prototype.encode=function(t){for(var e=this.utfBOM,o=0;o<t.length;o++)e+=this.encodeCharacter(t.charCodeAt(o));return e},Fg.prototype.encodeCharacter=function(t){var e=this.getBytesCount(t),o=e-1,i="";if(1===e)i=ng(t,8);else{for(var e=8-e,r=0;r<o;r++)i=ng(t>>6*r&63|128,8)+i;i=(t>>6*o|255>>e<<e).toString(2)+i}return i},Fg.prototype.getBytesCount=function(t){for(var e=this.ranges,o=0;o<e.length;o++)if(t<e[o])return o+1};var kg,Ag=Fg,Pg=[{L:{groups:[[1,19]],totalDataCodewords:19,errorCodewordsPerBlock:7},M:{groups:[[1,16]],totalDataCodewords:16,errorCodewordsPerBlock:10},Q:{groups:[[1,13]],totalDataCodewords:13,errorCodewordsPerBlock:13},H:{groups:[[1,9]],totalDataCodewords:9,errorCodewordsPerBlock:17}},{L:{groups:[[1,34]],totalDataCodewords:34,errorCodewordsPerBlock:10},M:{groups:[[1,28]],totalDataCodewords:28,errorCodewordsPerBlock:16},Q:{groups:[[1,22]],totalDataCodewords:22,errorCodewordsPerBlock:22},H:{groups:[[1,16]],totalDataCodewords:16,errorCodewordsPerBlock:28}},{L:{groups:[[1,55]],totalDataCodewords:55,errorCodewordsPerBlock:15},M:{groups:[[1,44]],totalDataCodewords:44,errorCodewordsPerBlock:26},Q:{groups:[[2,17]],totalDataCodewords:34,errorCodewordsPerBlock:18},H:{groups:[[2,13]],totalDataCodewords:26,errorCodewordsPerBlock:22}},{L:{groups:[[1,80]],totalDataCodewords:80,errorCodewordsPerBlock:20},M:{groups:[[2,32]],totalDataCodewords:64,errorCodewordsPerBlock:18},Q:{groups:[[2,24]],totalDataCodewords:48,errorCodewordsPerBlock:26},H:{groups:[[4,9]],totalDataCodewords:36,errorCodewordsPerBlock:16}},{L:{groups:[[1,108]],totalDataCodewords:108,errorCodewordsPerBlock:26},M:{groups:[[2,43]],totalDataCodewords:86,errorCodewordsPerBlock:24},Q:{groups:[[2,15],[2,16]],totalDataCodewords:62,errorCodewordsPerBlock:18},H:{groups:[[2,11],[2,12]],totalDataCodewords:46,errorCodewordsPerBlock:22}},{L:{groups:[[2,68]],totalDataCodewords:136,errorCodewordsPerBlock:18},M:{groups:[[4,27]],totalDataCodewords:108,errorCodewordsPerBlock:16},Q:{groups:[[4,19]],totalDataCodewords:76,errorCodewordsPerBlock:24},H:{groups:[[4,15]],totalDataCodewords:60,errorCodewordsPerBlock:28}},{L:{groups:[[2,78]],totalDataCodewords:156,errorCodewordsPerBlock:20},M:{groups:[[4,31]],totalDataCodewords:124,errorCodewordsPerBlock:18},Q:{groups:[[2,14],[4,15]],totalDataCodewords:88,errorCodewordsPerBlock:18},H:{groups:[[4,13],[1,14]],totalDataCodewords:66,errorCodewordsPerBlock:26}},{L:{groups:[[2,97]],totalDataCodewords:194,errorCodewordsPerBlock:24},M:{groups:[[2,38],[2,39]],totalDataCodewords:154,errorCodewordsPerBlock:22},Q:{groups:[[4,18],[2,19]],totalDataCodewords:110,errorCodewordsPerBlock:22},H:{groups:[[4,14],[2,15]],totalDataCodewords:86,errorCodewordsPerBlock:26}},{L:{groups:[[2,116]],totalDataCodewords:232,errorCodewordsPerBlock:30},M:{groups:[[3,36],[2,37]],totalDataCodewords:182,errorCodewordsPerBlock:22},Q:{groups:[[4,16],[4,17]],totalDataCodewords:132,errorCodewordsPerBlock:20},H:{groups:[[4,12],[4,13]],totalDataCodewords:100,errorCodewordsPerBlock:24}},{L:{groups:[[2,68],[2,69]],totalDataCodewords:274,errorCodewordsPerBlock:18},M:{groups:[[4,43],[1,44]],totalDataCodewords:216,errorCodewordsPerBlock:26},Q:{groups:[[6,19],[2,20]],totalDataCodewords:154,errorCodewordsPerBlock:24},H:{groups:[[6,15],[2,16]],totalDataCodewords:122,errorCodewordsPerBlock:28}},{L:{groups:[[4,81]],totalDataCodewords:324,errorCodewordsPerBlock:20},M:{groups:[[1,50],[4,51]],totalDataCodewords:254,errorCodewordsPerBlock:30},Q:{groups:[[4,22],[4,23]],totalDataCodewords:180,errorCodewordsPerBlock:28},H:{groups:[[3,12],[8,13]],totalDataCodewords:140,errorCodewordsPerBlock:24}},{L:{groups:[[2,92],[2,93]],totalDataCodewords:370,errorCodewordsPerBlock:24},M:{groups:[[6,36],[2,37]],totalDataCodewords:290,errorCodewordsPerBlock:22},Q:{groups:[[4,20],[6,21]],totalDataCodewords:206,errorCodewordsPerBlock:26},H:{groups:[[7,14],[4,15]],totalDataCodewords:158,errorCodewordsPerBlock:28}},{L:{groups:[[4,107]],totalDataCodewords:428,errorCodewordsPerBlock:26},M:{groups:[[8,37],[1,38]],totalDataCodewords:334,errorCodewordsPerBlock:22},Q:{groups:[[8,20],[4,21]],totalDataCodewords:244,errorCodewordsPerBlock:24},H:{groups:[[12,11],[4,12]],totalDataCodewords:180,errorCodewordsPerBlock:22}},{L:{groups:[[3,115],[1,116]],totalDataCodewords:461,errorCodewordsPerBlock:30},M:{groups:[[4,40],[5,41]],totalDataCodewords:365,errorCodewordsPerBlock:24},Q:{groups:[[11,16],[5,17]],totalDataCodewords:261,errorCodewordsPerBlock:20},H:{groups:[[11,12],[5,13]],totalDataCodewords:197,errorCodewordsPerBlock:24}},{L:{groups:[[5,87],[1,88]],totalDataCodewords:523,errorCodewordsPerBlock:22},M:{groups:[[5,41],[5,42]],totalDataCodewords:415,errorCodewordsPerBlock:24},Q:{groups:[[5,24],[7,25]],totalDataCodewords:295,errorCodewordsPerBlock:30},H:{groups:[[11,12],[7,13]],totalDataCodewords:223,errorCodewordsPerBlock:24}},{L:{groups:[[5,98],[1,99]],totalDataCodewords:589,errorCodewordsPerBlock:24},M:{groups:[[7,45],[3,46]],totalDataCodewords:453,errorCodewordsPerBlock:28},Q:{groups:[[15,19],[2,20]],totalDataCodewords:325,errorCodewordsPerBlock:24},H:{groups:[[3,15],[13,16]],totalDataCodewords:253,errorCodewordsPerBlock:30}},{L:{groups:[[1,107],[5,108]],totalDataCodewords:647,errorCodewordsPerBlock:28},M:{groups:[[10,46],[1,47]],totalDataCodewords:507,errorCodewordsPerBlock:28},Q:{groups:[[1,22],[15,23]],totalDataCodewords:367,errorCodewordsPerBlock:28},H:{groups:[[2,14],[17,15]],totalDataCodewords:283,errorCodewordsPerBlock:28}},{L:{groups:[[5,120],[1,121]],totalDataCodewords:721,errorCodewordsPerBlock:30},M:{groups:[[9,43],[4,44]],totalDataCodewords:563,errorCodewordsPerBlock:26},Q:{groups:[[17,22],[1,23]],totalDataCodewords:397,errorCodewordsPerBlock:28},H:{groups:[[2,14],[19,15]],totalDataCodewords:313,errorCodewordsPerBlock:28}},{L:{groups:[[3,113],[4,114]],totalDataCodewords:795,errorCodewordsPerBlock:28},M:{groups:[[3,44],[11,45]],totalDataCodewords:627,errorCodewordsPerBlock:26},Q:{groups:[[17,21],[4,22]],totalDataCodewords:445,errorCodewordsPerBlock:26},H:{groups:[[9,13],[16,14]],totalDataCodewords:341,errorCodewordsPerBlock:26}},{L:{groups:[[3,107],[5,108]],totalDataCodewords:861,errorCodewordsPerBlock:28},M:{groups:[[3,41],[13,42]],totalDataCodewords:669,errorCodewordsPerBlock:26},Q:{groups:[[15,24],[5,25]],totalDataCodewords:485,errorCodewordsPerBlock:30},H:{groups:[[15,15],[10,16]],totalDataCodewords:385,errorCodewordsPerBlock:28}},{L:{groups:[[4,116],[4,117]],totalDataCodewords:932,errorCodewordsPerBlock:28},M:{groups:[[17,42]],totalDataCodewords:714,errorCodewordsPerBlock:26},Q:{groups:[[17,22],[6,23]],totalDataCodewords:512,errorCodewordsPerBlock:28},H:{groups:[[19,16],[6,17]],totalDataCodewords:406,errorCodewordsPerBlock:30}},{L:{groups:[[2,111],[7,112]],totalDataCodewords:1006,errorCodewordsPerBlock:28},M:{groups:[[17,46]],totalDataCodewords:782,errorCodewordsPerBlock:28},Q:{groups:[[7,24],[16,25]],totalDataCodewords:568,errorCodewordsPerBlock:30},H:{groups:[[34,13]],totalDataCodewords:442,errorCodewordsPerBlock:24}},{L:{groups:[[4,121],[5,122]],totalDataCodewords:1094,errorCodewordsPerBlock:30},M:{groups:[[4,47],[14,48]],totalDataCodewords:860,errorCodewordsPerBlock:28},Q:{groups:[[11,24],[14,25]],totalDataCodewords:614,errorCodewordsPerBlock:30},H:{groups:[[16,15],[14,16]],totalDataCodewords:464,errorCodewordsPerBlock:30}},{L:{groups:[[6,117],[4,118]],totalDataCodewords:1174,errorCodewordsPerBlock:30},M:{groups:[[6,45],[14,46]],totalDataCodewords:914,errorCodewordsPerBlock:28},Q:{groups:[[11,24],[16,25]],totalDataCodewords:664,errorCodewordsPerBlock:30},H:{groups:[[30,16],[2,17]],totalDataCodewords:514,errorCodewordsPerBlock:30}},{L:{groups:[[8,106],[4,107]],totalDataCodewords:1276,errorCodewordsPerBlock:26},M:{groups:[[8,47],[13,48]],totalDataCodewords:1e3,errorCodewordsPerBlock:28},Q:{groups:[[7,24],[22,25]],totalDataCodewords:718,errorCodewordsPerBlock:30},H:{groups:[[22,15],[13,16]],totalDataCodewords:538,errorCodewordsPerBlock:30}},{L:{groups:[[10,114],[2,115]],totalDataCodewords:1370,errorCodewordsPerBlock:28},M:{groups:[[19,46],[4,47]],totalDataCodewords:1062,errorCodewordsPerBlock:28},Q:{groups:[[28,22],[6,23]],totalDataCodewords:754,errorCodewordsPerBlock:28},H:{groups:[[33,16],[4,17]],totalDataCodewords:596,errorCodewordsPerBlock:30}},{L:{groups:[[8,122],[4,123]],totalDataCodewords:1468,errorCodewordsPerBlock:30},M:{groups:[[22,45],[3,46]],totalDataCodewords:1128,errorCodewordsPerBlock:28},Q:{groups:[[8,23],[26,24]],totalDataCodewords:808,errorCodewordsPerBlock:30},H:{groups:[[12,15],[28,16]],totalDataCodewords:628,errorCodewordsPerBlock:30}},{L:{groups:[[3,117],[10,118]],totalDataCodewords:1531,errorCodewordsPerBlock:30},M:{groups:[[3,45],[23,46]],totalDataCodewords:1193,errorCodewordsPerBlock:28},Q:{groups:[[4,24],[31,25]],totalDataCodewords:871,errorCodewordsPerBlock:30},H:{groups:[[11,15],[31,16]],totalDataCodewords:661,errorCodewordsPerBlock:30}},{L:{groups:[[7,116],[7,117]],totalDataCodewords:1631,errorCodewordsPerBlock:30},M:{groups:[[21,45],[7,46]],totalDataCodewords:1267,errorCodewordsPerBlock:28},Q:{groups:[[1,23],[37,24]],totalDataCodewords:911,errorCodewordsPerBlock:30},H:{groups:[[19,15],[26,16]],totalDataCodewords:701,errorCodewordsPerBlock:30}},{L:{groups:[[5,115],[10,116]],totalDataCodewords:1735,errorCodewordsPerBlock:30},M:{groups:[[19,47],[10,48]],totalDataCodewords:1373,errorCodewordsPerBlock:28},Q:{groups:[[15,24],[25,25]],totalDataCodewords:985,errorCodewordsPerBlock:30},H:{groups:[[23,15],[25,16]],totalDataCodewords:745,errorCodewordsPerBlock:30}},{L:{groups:[[13,115],[3,116]],totalDataCodewords:1843,errorCodewordsPerBlock:30},M:{groups:[[2,46],[29,47]],totalDataCodewords:1455,errorCodewordsPerBlock:28},Q:{groups:[[42,24],[1,25]],totalDataCodewords:1033,errorCodewordsPerBlock:30},H:{groups:[[23,15],[28,16]],totalDataCodewords:793,errorCodewordsPerBlock:30}},{L:{groups:[[17,115]],totalDataCodewords:1955,errorCodewordsPerBlock:30},M:{groups:[[10,46],[23,47]],totalDataCodewords:1541,errorCodewordsPerBlock:28},Q:{groups:[[10,24],[35,25]],totalDataCodewords:1115,errorCodewordsPerBlock:30},H:{groups:[[19,15],[35,16]],totalDataCodewords:845,errorCodewordsPerBlock:30}},{L:{groups:[[17,115],[1,116]],totalDataCodewords:2071,errorCodewordsPerBlock:30},M:{groups:[[14,46],[21,47]],totalDataCodewords:1631,errorCodewordsPerBlock:28},Q:{groups:[[29,24],[19,25]],totalDataCodewords:1171,errorCodewordsPerBlock:30},H:{groups:[[11,15],[46,16]],totalDataCodewords:901,errorCodewordsPerBlock:30}},{L:{groups:[[13,115],[6,116]],totalDataCodewords:2191,errorCodewordsPerBlock:30},M:{groups:[[14,46],[23,47]],totalDataCodewords:1725,errorCodewordsPerBlock:28},Q:{groups:[[44,24],[7,25]],totalDataCodewords:1231,errorCodewordsPerBlock:30},H:{groups:[[59,16],[1,17]],totalDataCodewords:961,errorCodewordsPerBlock:30}},{L:{groups:[[12,121],[7,122]],totalDataCodewords:2306,errorCodewordsPerBlock:30},M:{groups:[[12,47],[26,48]],totalDataCodewords:1812,errorCodewordsPerBlock:28},Q:{groups:[[39,24],[14,25]],totalDataCodewords:1286,errorCodewordsPerBlock:30},H:{groups:[[22,15],[41,16]],totalDataCodewords:986,errorCodewordsPerBlock:30}},{L:{groups:[[6,121],[14,122]],totalDataCodewords:2434,errorCodewordsPerBlock:30},M:{groups:[[6,47],[34,48]],totalDataCodewords:1914,errorCodewordsPerBlock:28},Q:{groups:[[46,24],[10,25]],totalDataCodewords:1354,errorCodewordsPerBlock:30},H:{groups:[[2,15],[64,16]],totalDataCodewords:1054,errorCodewordsPerBlock:30}},{L:{groups:[[17,122],[4,123]],totalDataCodewords:2566,errorCodewordsPerBlock:30},M:{groups:[[29,46],[14,47]],totalDataCodewords:1992,errorCodewordsPerBlock:28},Q:{groups:[[49,24],[10,25]],totalDataCodewords:1426,errorCodewordsPerBlock:30},H:{groups:[[24,15],[46,16]],totalDataCodewords:1096,errorCodewordsPerBlock:30}},{L:{groups:[[4,122],[18,123]],totalDataCodewords:2702,errorCodewordsPerBlock:30},M:{groups:[[13,46],[32,47]],totalDataCodewords:2102,errorCodewordsPerBlock:28},Q:{groups:[[48,24],[14,25]],totalDataCodewords:1502,errorCodewordsPerBlock:30},H:{groups:[[42,15],[32,16]],totalDataCodewords:1142,errorCodewordsPerBlock:30}},{L:{groups:[[20,117],[4,118]],totalDataCodewords:2812,errorCodewordsPerBlock:30},M:{groups:[[40,47],[7,48]],totalDataCodewords:2216,errorCodewordsPerBlock:28},Q:{groups:[[43,24],[22,25]],totalDataCodewords:1582,errorCodewordsPerBlock:30},H:{groups:[[10,15],[67,16]],totalDataCodewords:1222,errorCodewordsPerBlock:30}},{L:{groups:[[19,118],[6,119]],totalDataCodewords:2956,errorCodewordsPerBlock:30},M:{groups:[[18,47],[31,48]],totalDataCodewords:2334,errorCodewordsPerBlock:28},Q:{groups:[[34,24],[34,25]],totalDataCodewords:1666,errorCodewordsPerBlock:30},H:{groups:[[20,15],[61,16]],totalDataCodewords:1276,errorCodewordsPerBlock:30}}],Tg="alphanumeric",Mg={1:0},Og={0:1},Bg={15:20,16:20,18:24,19:24,22:20,24:22,26:24,28:20,30:20,31:24,32:28,33:24,36:18,37:22,39:20,40:24},Rg=[1,0,1,1,1],Eg=[1,0,1],Lg={L:"01",M:"00",Q:"11",H:"10"},Ig=["11101100","00010001"],zg=[function(t,e){return(t+e)%2==0},function(t,e){return t%2==0},function(t,e){return e%3==0},function(t,e){return(t+e)%3==0},function(t,e){return(Math.floor(t/2)+Math.floor(e/3))%2==0},function(t,e){return t*e%2+t*e%3==0},function(t,e){return(t*e%2+t*e%3)%2==0},function(t,e){return((t+e)%2+t*e%3)%2==0}],Vg=/^\d+/,jg=new RegExp("^[A-Z $%*+./:-]+"),Dg=new RegExp("^[A-Z0-9 $%*+./:-]+"),Hg=new RegExp("^[^A-Z0-9 $%*+./:-]+"),Ug=[[1,0],[1,25,0]];function Fg(){kg.call(this),this.initProperties(),this.mode=vg[this.encodingMode]}function Ng(t,e,o,i){for(var r=0;r<t.length;r++)t[r][o][i]=e}function Gg(t,e,o,i){for(var r=0;r<zg.length;r++)t[r][o][i]=zg[r](o,i)?1^e:parseInt(e,10)}function Wg(t,e){for(var o,i=Ug[e-1],r=new Array(e).concat(t),n=new Array(r.length-i.length).concat(i),s=t.length,a=[],p=0;p<s;p++)o=function(t,e){for(var o=[],i=t.length-1;o[i]=Og[(t[i]+e)%255],void 0!==t[--i];);return o}(n,Mg[r[r.length-1]]),n.splice(0,1),r=function(t,e){for(var o=[],i=t.length-2;0<=i;i--)o[i]=t[i]^e[i];return o}(o,r);for(p=r.length-1;0<=p;p--)a[e-1-p]=ng(r[p],8);return a}function Xg(t,e,o,i,r){var n,s=Vg.exec(t),s=s?s[0]:"",a=jg.exec(t),a=a?a[0]:"",p=Dg.exec(t),p=p?p[0]:"",e=s&&(s.length>=e||t.length===s.length||s.length>=o&&!Dg.test(t.charAt(s.length)))?(n="numeric",s):p&&(t.length===p.length||p.length>=i||r===Tg)?(n=Tg,s||a):(n="byte",p?p+Hg.exec(t.substring(p.length))[0]:Hg.exec(t)[0]);return{mode:n,modeString:e}}function qg(t,e){for(var o=0,i=Pg.length-1,r=Math.floor(Pg.length/2);t<Pg[r][e].totalDataCodewords?i=r:o=r,r=o+Math.floor((i-o)/2),1<i-o;);return t<=Pg[o][e].totalDataCodewords?r+1:i+1}function Yg(t,e,o){var i=sg(e),e=e.length-1,r=t<<e;return ng(t,o-e)+ng(function(t,e){for(var o=e.toString(2).length,i=t.toString(2).length,r=t;o<=(i=(r^=e<<i-o).toString(2).length););return r}(r,i),e)}function Zg(t,e){return parseInt(t.charAt(e),10)}function Qg(t,e){for(var o=t[0],i=0,r=e.length,n=0,s=8;n<=8;n++)6!==n&&Ng(t,Zg(e,r-1-i++),n,s);for(n=8,s=7;0<=s;s--)6!==s&&Ng(t,Zg(e,r-1-i++),n,s);for(i=0,s=o.length-1,n=8;s>=o.length-8;s--)Ng(t,Zg(e,r-1-i++),n,s);for(Ng(t,1,o.length-8,8),n=o.length-7,s=8;n<o.length;n++)Ng(t,Zg(e,r-1-i++),n,s)}function Kg(t,e){for(var o,i,r,n=t[0].length,s=n-11,a=n-11,p=0;p<e.length;p++)o=Math.floor(p/3),i=p%3,Ng(t,r=Zg(e,e.length-p-1),0+o,s+i),Ng(t,r,a+i,0+o)}function $g(t,e,o,i){for(var r,n=e.length+2,s=e.length+1,a=0;a<e.length;a++)for(var p=a;p<n-a;p++)Ng(t,r=e[a],o+p,i+a),Ng(t,r,o+a,i+p),Ng(t,r,o+s-p,i+s-a),Ng(t,r,o+s-a,i+s-p)}function Jg(t,e,o,i){for(var r=o,n=i,s=t[0];Ng(t,0,r,i),Ng(t,0,o,n),r+=e[0],n+=e[1],0<=r&&r<s.length;);}function ty(t,e,o,i,r){e[t][i]=(e[t][i]<<1^r)%128,93===e[t][i]&&(o[t]+=40)}function ey(t,e,o,i,r,n){o[t][n]===i?r[t][n]++:(o[t][n]=i,5<=r[t][n]&&(e[t]+=3+r[t][n]-5),r[t][n]=1)}function oy(t,e,o){var o=(new(o&&0<=o.toLowerCase().indexOf("utf_8")?Ag:yg)).getEncodingResult(t,e),r=o.version,n=Pg[r-1][e],t=function(t,e){for(var o,i=0,r=[],n=[],s=e.groups,a=0;a<s.length;a++)for(var p=s[a][0],h=0;h<p;h++){for(var l=s[a][1],c=[],u=[],d=1;d<=l;d++)o=t.substring(i,i+8),c.push(o),u[l-d]=sg(o),i+=8;r.push(c),n.push(Wg(u,e.errorCodewordsPerBlock))}return[r,n]}(function(t){for(var e=8*n.totalDataCodewords,o=0,i=0,r=t;r.length<e&&o<"0000".length;)r+="0000".charAt(o++);for(r.length%8!=0&&(r+=new Array(9-r.length%8).join("0"));r.length<e;)r+=Ig[i],i^=1;return r}(o.dataString),n),o=function(){for(var t=[],e=17+4*r,o=0;o<zg.length;o++){t[o]=new Array(e);for(var i=0;i<e;i++)t[o][i]=new Array(e)}return t}(),i=(l=(s=o)[0].length,$g(s,Rg,0,0),Jg(s,[-1,-1],7,7),$g(s,Rg,l-7,0),Jg(s,[1,-1],l-8,7),$g(s,Rg,0,l-7),Jg(s,[-1,1],7,l-8),o),s=r;if(!(s<2)){var a,p=i[0],h=p.length,l=Math.floor(s/7),c=[6],u=0;for((s=Bg[s])?a=(h-13-s)/l:s=a=(h-13)/(l+1),c.push(c[u++]+s);c[u]+a<h;)c.push(c[u++]+a);for(var d=0;d<c.length;d++)for(var f=0;f<c.length;f++)void 0===p[c[d]][c[f]]&&$g(i,Eg,c[d]-2,c[f]-2)}for(var g=o,y=1,v=g[0].length,m=8;m<v-8;m++)Ng(g,y,6,m),Ng(g,y,m,6),y^=1;7<=r&&Kg(o,ng(0,18)),Qg(o,ng(0,15));for(var x,_,b,w=o,C=t,S=new fg(w[0]),k=0;k<C.length;k++)for(x=C[k],_=0;0<x.length;){for(var A=0;A<x.length;A++)for(var P=0;P<8;P++)b=S.getNextCell(),Gg(w,x[A][_].charAt(P),b.row,b.column);for(_++;x[0]&&_===x[0].length;)x.splice(0,1)}for(;b=S.getNextRemainderCell();)Gg(w,0,b.row,b.column);l=function(t){for(var e,o=[],i=[],r=[],n=[],s=[],a=t[0].length,p=0;p<t.length;p++)o[p]=0,r[p]=0,s[p]=[0,0],n[p]=[0,0],i[p]=[];for(var h=0;h<a;h++)for(var l=0;l<a;l++)for(var c=0;c<t.length;c++)e=t[c],r[c]+=parseInt(e[h][l],10),i[c][0]===e[h][l]&&h+1<a&&0<=l-1&&e[h+1][l]===i[c][0]&&e[h+1][l-1]===i[c][0]&&(o[c]+=3),ty(c,n,o,0,e[h][l]),ty(c,n,o,1,e[l][h]),ey(c,o,i,e[h][l],s,0),ey(c,o,i,e[l][h],s,1);var u,d,f,g,y=a*a,v=Number.MAX_VALUE;for(p=0;p<o.length;p++)o[p]+=(d=r[p],f=y,g=void 0,f=(d=Math.floor(d/f*100))%5,g=Math.abs(d-f-50),d=Math.abs(d+5-f-50),10*Math.min(g/5,d/5)),o[p]<v&&(v=o[p],u=p);return u}(o),s=o[l];return 7<=r&&Kg([s],Yg(r,"1111100100101",18)),Qg([s],function(t){var e="";if(0===sg(t))return"101010000010010";for(var o=Yg(sg(t),"10100110111",15),i=0;i<o.length;i++)e+=o.charAt(i)^"101010000010010".charAt(i);return e}(Lg[e]+ng(l,3))),s}for(var iy,ry=1;ry<255;ry++)255<(iy=2*Og[ry-1])&&(iy^=285),Og[ry]=iy,Mg[iy]=ry;iy=2*Og[ry-1]^285,Og[ry]=iy,Og[-1]=0;for(var ny=2;ny<=68;ny++){var sy=Ug[ny-1];Ug[ny]=function(t,e){for(var o=[],i=0;i<t.length;i++)for(var r=0;r<e.length;r++)void 0===o[i+r]?o[i+r]=(t[i]+(0<=e[r]?e[r]:0))%255:o[i+r]=Mg[Og[o[i+r]]^Og[(t[i]+e[r])%255]];return o}(sy,[ny,0])}var ay,py=Math.round,hy=[[0,1],[1,1],[1,2],[2,2],[2,1],[3,1],[3,0],[2,0],[2,-1],[1,-1],[1,0]],ly=[[0,1],[1,1],[1,0]],xf=((ay=b.Class)&&(cy.__proto__=ay),((cy.prototype=Object.create(ay&&ay.prototype)).constructor=cy).prototype.destroy=function(){this._destroySurface()},cy.prototype._initElement=function(){it(this.element,"k-qrcode")},cy.prototype._initSurface=function(){var t=this.options,e=this.surface;e&&e.options.type===t.renderAs||(this._destroySurface(),this._initSurfaceElement(),this.surface=this._createSurface())},cy.prototype._createSurface=function(){return b.drawing.Surface.create(this.surfaceElement,{type:this.options.renderAs})},cy.prototype._destroySurface=function(){this.surface&&(this.surface.destroy(),this.surface=null,this._destroySurfaceElement())},cy.prototype._initSurfaceElement=function(){this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.surfaceElement.style.position="relative",this.element.appendChild(this.surfaceElement))},cy.prototype._destroySurfaceElement=function(){this.surfaceElement&&this.surfaceElement.parentNode&&(this.surfaceElement.parentNode.removeChild(this.surfaceElement),this.surfaceElement=null)},cy.prototype.redraw=function(){var t=this._getSize();this.surface.clear(),this.surface.setSize({width:t,height:t}),this.createVisual(),this.surface.draw(this.visual)},cy.prototype.getSize=function(){var t=this.element,e=t.clientWidth,t=t.clientHeight,o={width:0,height:0};return 0<e&&(o.width=e),t&&(o.height=t),o},cy.prototype._resize=function(){this.redraw()},cy.prototype.createVisual=function(){this.visual=this._render()},cy.prototype.exportVisual=function(){return this._render()},cy.prototype._render=function(){var t,e,o,i,r,n=this._value,s=this.options.border||{},a=this.options.padding||0,p=s.width||0,h=(s.width=p,new b.drawing.Group);try{n&&(o=oy(n,this.options.errorCorrection,this.options.encoding),r=(i=this._getSize())-2*(p+a),t=this._calculateBaseUnit(r,o.length),e=p+a+(r-o.length*t)/2,h.append(this._renderBackground(i,s)),h.append(this._renderMatrix(o,t,e)),this._hasCustomLogo()?h.append(this._renderLogo(i,t)):this._isSwiss()&&h.append(this._renderSwissCode(i,t)))}catch(t){this.onError(t)}return h},cy.prototype._renderLogo=function(t,e){var t=py(t/2),e=this._getLogoSize(7*e),o=this.options.overlay.imageUrl,t={x:t-e.width/2,y:t-e.height/2},t=new b.geometry.Rect(new b.geometry.Point(t.x,t.y),new b.geometry.Size(e.width,e.height));return new b.drawing.Image(o,t)},cy.prototype._renderSwissCode=function(t,e){var o=this._getLogoSize(7*e),i=(o=Math.max(o.width,o.height))/4,r=i/2,t=t/2,n={},s=new b.drawing.Group;return n.x=n.y=Math.ceil(t-e-o/2),s.append(this._renderShape(n,Math.ceil(o+2*e),ly,"#fff")),n.x=n.y=t-o/2,s.append(this._renderShape(n,o,ly,this.options.color)),n.x=t+r-o/2,n.y=t+r+i-o/2,s.append(this._renderShape(n,i,hy,"#fff")),s},cy.prototype._renderShape=function(t,e,o,i){var r=new b.drawing.MultiPath({fill:{color:i},stroke:null});r.moveTo(t.x,t.y);for(var n=0;n<o.length;n++)r.lineTo(t.x+e*o[n][0],t.y+e*o[n][1]);return r.close(),r},cy.prototype._getSize=function(){var t;return this.options.size?parseInt(this.options.size,10):(t=Kf(this.element,this.options.renderAs),0<(t=Math.min(t.width,t.height))?t:200)},cy.prototype._calculateBaseUnit=function(t,e){var o,i=Math.floor(t/e);return i<1?(o=Math.ceil(+e),this.onError(new Error("Insufficient size for QR Code: the current size is "+t+"px and the minimum size is "+o+"px."))):t<=i*e&&1<=i-1&&i--,i},cy.prototype._renderMatrix=function(t,e,o){for(var i=new b.drawing.MultiPath({fill:{color:this.options.color},stroke:null}),r=0;r<t.length;r++)for(var n=o+r*e,s=0;s<t.length;){for(;0===t[r][s]&&s<t.length;)s++;if(s<t.length){for(var a=s;1===t[r][s];)s++;var a=py(o+a*e),p=py(n),h=py(o+s*e),l=py(n+e);i.moveTo(a,p).lineTo(a,l).lineTo(h,l).lineTo(h,p).close()}}return i},cy.prototype._renderBackground=function(t,e){t=new B(0,0,t,t).unpad(e.width/2);return b.drawing.Path.fromRect(t.toRect(),{fill:{color:this.options.background},stroke:{color:e.color,width:e.width}})},cy.prototype.setOptions=function(t){this.options=ig(this.options,t||{}),void 0!==t.value&&(this._value=String(this.options.value)),this._initSurface(),this.redraw()},cy.prototype.value=function(t){if(void 0===t)return this._value;this._value=String(t),this.redraw()},cy.prototype._hasCustomLogo=function(){return Boolean(this.options.overlay.imageUrl)},cy.prototype._isSwiss=function(){return"swiss"===this.options.overlay.type},cy.prototype._getLogoSize=function(t){var e=this.options.overlay.width,o=this.options.overlay.height;return e||o?e&&!o?o=e:!e&&o&&(e=o):e=o=t,{width:e,height:o}},cy);function cy(t,e,o){void 0===o&&(o=pe),ay.call(this),this.options=x({},this.options,e),this.element=t,this.wrapper=this.element,this.onError=o,this._initElement(),this._initSurface(),this.setOptions(e)}e(xf,{name:"QRCode",renderAs:"svg",encoding:"ISO_8859_1",value:"",errorCorrection:"L",background:"#fff",color:"#000",size:"",padding:0,border:{color:"",width:0},overlay:{type:"image",imageUrl:"",width:0,height:0}});const uy=xf,dy=function(e){return void 0===e&&(e="ISO_8859_1"),function(t){try{oy(t,"L",e)}catch(t){return{valid:!1,error:t}}return{valid:!0}}};var fy={WGS84:{a:6378137,b:6356752.314245179,f:.0033528106647474805,e:.08181919084262149}};function gy(t){return t*t}var yy,vy,my=Math,xy=my.abs,_y=my.atan,by=my.atan2,wy=my.cos,Cy=my.sin,Sy=my.tan,ky=((vy=b.Class)&&(Dy.__proto__=vy),((Dy.prototype=Object.create(vy&&vy.prototype)).constructor=Dy).prototype.initProperties=function(){x(this,{DISTANCE_ITERATIONS:100,DISTANCE_CONVERGENCE:1e-12,DISTANCE_PRECISION:2,FORMAT:"{0:N6}{1:N6}"})},Dy.prototype.toArray=function(){return[this.lat,this.lng]},Dy.prototype.equals=function(t){return t&&t.lat===this.lat&&t.lng===this.lng},Dy.prototype.clone=function(){return new Dy(this.lat,this.lng)},Dy.prototype.round=function(t){return this.lng=T(this.lng,t),this.lat=T(this.lat,t),this},Dy.prototype.wrap=function(){return this.lng=this.lng%180,this.lat=this.lat%90,this},Dy.prototype.distanceTo=function(t,e){return this.greatCircleTo(t,e).distance},Dy.prototype.destination=function(t,e,o){var e=Gt(e),o=o||fy.WGS84,i=Gt(this.lat),r=Gt(this.lng),t=t/o.a,o=my.asin(Cy(i)*wy(t)+wy(i)*Cy(t)*wy(e)),r=r+by(Cy(e)*Cy(t)*wy(i),wy(t)-Cy(i)*Cy(o));return new Dy(zt(o),zt(r))},Dy.prototype.greatCircleTo=function(t,e){var o=Dy.create(void 0),e=e||fy.WGS84;if(!o||this.clone().round(8).equals(o.clone().round(8)))return{distance:0,azimuthFrom:0,azimuthTo:0};for(var i,r,n=e.a,s=e.b,a=e.f,p=Gt(o.lng-this.lng),e=_y((1-a)*Sy(Gt(this.lat))),h=Cy(e),l=wy(e),e=_y((1-a)*Sy(Gt(o.lat))),c=Cy(e),u=wy(e),d=p,f=this.DISTANCE_ITERATIONS,g=!1;!g&&0<f--;)var y=Cy(d),v=wy(d),m=my.sqrt(gy(u*y)+gy(l*c-h*u*v)),x=by(m,r=h*c+l*u*v),_=l*u*y/m,b=0,w=(0!=(i=1-gy(_))&&(b=r-2*h*c/i),d),C=a/16*i*(4+a*(4-3*i)),d=p+(1-C)*a*_*(x+C*m*(b+C*r*(2*gy(b)-1))),g=xy(d-w)<=this.DISTANCE_CONVERGENCE;var o=i*(gy(n)-gy(s))/gy(s),e=1+o/16384*(4096+o*(o*(320-175*o)-768)),n=o/1024*(256+o*(o*(74-47*o)-128)),o=n*m*(b+n/4*(r*(2*gy(b)-1)-n/6*b*(4*gy(m)-3)*(4*gy(b)-3))),n=by(u*y,l*c-h*u*v),S=by(l*y,-h*u+l*c*v);return{distance:T(s*e*(x-o),this.DISTANCE_PRECISION),azimuthFrom:zt(n),azimuthTo:zt(S)}},Dy.prototype.toString=function(){return String(this.lat)+","+String(this.lng)},Dy.fromLngLat=function(t){return new Dy(t[1],t[0])},Dy.fromLatLng=function(t){return new Dy(t[0],t[1])},Dy.create=function(t,e){if(P(t))return t instanceof Dy?t.clone():1===arguments.length&&2===t.length?Dy.fromLatLng(t):new Dy(t,e)},Dy),Ay=Math,Py=Ay.atan,Ty=Ay.exp,My=Ay.pow,Oy=Ay.sin,By=Ay.log,Ry=Ay.tan,Ey=b.geometry.Point,Ly=Ay.PI,Iy=Ly/2,zy=Ly/4,Vy=Ly/180,N=fy.WGS84,vf=((yy=b.Class)&&(jy.__proto__=yy),((jy.prototype=Object.create(yy&&yy.prototype)).constructor=jy).prototype._initOptions=function(t){this.options=x({},this.options,t)},jy.prototype.initProperties=function(){x(this,{MAX_LNG:180,MAX_LAT:85.0840590501,INVERSE_ITERATIONS:15,INVERSE_CONVERGENCE:1e-12})},jy.prototype.forward=function(t,e){var o=this.options,i=o.datum.a,o=o.centralMeridian,r=_(t.lat,-this.MAX_LAT,this.MAX_LAT),e=e?_(t.lng,-this.MAX_LNG,this.MAX_LNG):t.lng,t=Gt(e-o)*i,e=this._projectLat(r);return new Ey(t,e)},jy.prototype._projectLat=function(t){var e=this.options.datum,o=e.e,e=e.a,t=Gt(t),i=Ry(zy+t/2),t=o*Oy(t),t=My((1-t)/(1+t),o/2);return e*By(i*t)},jy.prototype.inverse=function(t,e){var o=this.options,i=o.datum.a,o=o.centralMeridian,i=t.x/(Vy*i)+o,o=_(this._inverseY(t.y),-this.MAX_LAT,this.MAX_LAT);return e&&(i=_(i,-this.MAX_LNG,this.MAX_LNG)),new ky(o,i)},jy.prototype._inverseY=function(t){for(var e=this.options.datum,o=e.a,i=e.e,r=i/2,n=Ty(-t/o),s=Iy-2*Py(n),a=0;a<=this.INVERSE_ITERATIONS;a++){var p=i*Oy(s),p=My((1-p)/(1+p),r),p=Iy-2*Py(n*p)-s;if(s+=p,Ay.abs(p)<=this.INVERSE_CONVERGENCE)break}return zt(s)},jy);function jy(t){yy.call(this),this.initProperties(),this._initOptions(t)}function Dy(t,e){vy.call(this),this.initProperties(),1===arguments.length?(this.lat=t[0],this.lng=t[1]):(this.lat=t,this.lng=e)}e(vf,{centralMeridian:0,datum:N});function Hy(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function Uy(t,e){e.insertBefore(t,e.firstChild)}function Fy(t){return t.replace(/([a-z][A-Z])/g,function(t){return t.charAt(0)+"-"+t.charAt(1).toLowerCase()})}function Ny(t){return t&&String(t).endsWith("px")?t:String(t)+"px"}(Wy=vf)&&($y.__proto__=Wy),(($y.prototype=Object.create(Wy&&Wy.prototype)).constructor=$y).prototype.initProperties=function(){Wy.prototype.initProperties.call(this),x(this,{MAX_LAT:85.0511287798})},$y.prototype._projectLat=function(t){var e=this.options.datum.a,t=Gt(t),t=Ry(zy+t/2);return e*By(t)},$y.prototype._inverseY=function(t){var e=this.options.datum.a,t=Ty(-t/e);return zt(Iy-2*Py(t))};var Gy,Wy,Xy=$y,qy=((Gy=b.Class)&&(Ky.__proto__=Gy),((Ky.prototype=Object.create(Gy&&Gy.prototype)).constructor=Ky).prototype.toPoint=function(t,e,o){return this._proj.forward(t,o).transform(this._tm).scale(e||1)},Ky.prototype.toLocation=function(t,e,o){t=t.clone().scale(1/(e||1)).transform(this._itm);return this._proj.inverse(t,o)},Ky),Yy=Object.defineProperty,Zy=(Object.assign,function(t){var e=document.createElement("div");return e.innerHTML=t,e.firstChild}),Qy=function(t){var e,o,i=!1,r=[],n={wp:/(Windows Phone(?: OS)?)\s(\d+)\.(\d+(\.\d+)?)/,fire:/(Silk)\/(\d+)\.(\d+(\.\d+)?)/,android:/(Android|Android.*(?:Opera|Firefox).*?\/)\s*(\d+)\.?(\d+(\.\d+)?)?/,iphone:/(iPhone|iPod).*OS\s+(\d+)[\._]([\d\._]+)/,ipad:/(iPad).*OS\s+(\d+)[\._]([\d_]+)/,meego:/(MeeGo).+NokiaBrowser\/(\d+)\.([\d\._]+)/,webos:/(webOS)\/(\d+)\.(\d+(\.\d+)?)/,blackberry:/(BlackBerry|BB10).*?Version\/(\d+)\.(\d+(\.\d+)?)/,playbook:/(PlayBook).*?Tablet\s*OS\s*(\d+)\.(\d+(\.\d+)?)/,windows:/(MSIE)\s+(\d+)\.(\d+(\.\d+)?)/,tizen:/(tizen).*?Version\/(\d+)\.(\d+(\.\d+)?)/i,sailfish:/(sailfish).*rv:(\d+)\.(\d+(\.\d+)?).*firefox/i,ffos:/(Mobile).*rv:(\d+)\.(\d+(\.\d+)?).*Firefox/},s={ios:/^i(phone|pad|pod)$/i,android:/^android|fire$/i,blackberry:/^blackberry|playbook/i,windows:/windows/,wp:/wp/,flat:/sailfish|ffos|tizen/i,meego:/meego/},a={tablet:/playbook|ipad|fire/i},p={omini:/Opera\sMini/i,omobile:/Opera\sMobi/i,firefox:/Firefox|Fennec/i,mobilesafari:/version\/.*safari/i,ie:/MSIE|Windows\sPhone/i,chrome:/chrome|crios/i,webkit:/webkit/i};for(o in n)if(n.hasOwnProperty(o)&&(r=t.match(n[o]))){if("windows"===o&&"plugins"in navigator)return!1;(i={}).device=o,i.tablet=Jy(o,a,!1),i.browser=Jy(t,p,"default"),i.name=Jy(o,s),i[i.name]=!0,i.majorVersion=r[2],i.minorVersion=(r[3]||"0").replace("_","."),e=i.minorVersion.replace(".","").substr(0,2),i.flatVersion=i.majorVersion+e+new Array(3-(e.length<3?e.length:2)).join("0");break}return i};function Ky(){Gy.call(this);var t=this._proj=new Xy,t=this.c=2*Ly*t.options.datum.a;this._tm=b.geometry.transform().translate(.5,.5).scale(1/t,-1/t),this._itm=b.geometry.transform().scale(t,-t).translate(-.5,-.5)}function $y(){Wy.apply(this,arguments)}function Jy(t,e,o){for(var i in e)if(e.hasOwnProperty(i)&&e[i].test(t))return i;return void 0!==o?o:t}function tv(t,e){return t.bind(e)}function ev(t,e,o,i,r){dv(t,e,o,i,r)}function ov(t,e,o,i,r){var n,s,a;n=t,s=o,a=i,(ot(t=e)?t:(t||"").split(" ")).forEach(function(t){fv(n,t,s,a)})}function iv(t){var e=cv(navigator.userAgent);return t.replace(/([^ ]+)/g,function(t){return e[t]||t})}function rv(t,e){var o=t.prototype;o.events?e.forEach(function(t){o.events.indexOf(t)<0&&o.events.push(t)}):o.events=e}function nv(){return Number(new Date)}function sv(){}function av(){this._defaultPrevented=!0}function pv(){return!0===this._defaultPrevented}var hv,lv,cv=function(){var t={down:"touchstart mousedown",move:"mousemove touchmove",up:"mouseup touchend touchcancel",cancel:"mouseleave touchcancel"},e=uv();return e.touch&&(e.mobileOS.ios||e.mobileOS.android)?t={down:"touchstart",move:"touchmove",up:"touchend touchcancel",cancel:"touchcancel"}:e.pointers?t={down:"pointerdown",move:"pointermove",up:"pointerup",cancel:"pointercancel pointerleave"}:e.msPointers&&(t={down:"MSPointerDown",move:"MSPointerMove",up:"MSPointerUp",cancel:"MSPointerCancel MSPointerLeave"}),t},uv=function(){var t=Qy(navigator.userAgent),e=function(t){var e,o=!1,i=[],r={edge:/(edge)[ \/]([\w.]+)/i,webkit:/(chrome|crios)[ \/]([\w.]+)/i,safari:/(webkit)[ \/]([\w.]+)/i,opera:/(opera)(?:.*version|)[ \/]([\w.]+)/i,msie:/(msie\s|trident.*? rv:)([\w.]+)/i,mozilla:/(mozilla)(?:.*? rv:([\w.]+)|)/i};for(e in r)if(r.hasOwnProperty(e)&&(i=t.match(r[e]))){(o={})[e]=!0,o[i[1].toLowerCase().split(" ")[0].split("/")[0]]=!0,o.version=parseInt(document.documentMode||i[2],10);break}return o}(navigator.userAgent),o=e.chrome,i=e.crios,r=e.mozilla,e=e.safari,n={},s=(n.mobileOS=t,n.touch="ontouchstart"in window,n.pointers=!o&&!i&&!r&&!e&&window.PointerEvent,n.msPointers=!o&&window.MSPointerEvent,n.mouseAndTouchPresent=n.touch&&!(n.mobileOS.ios||n.mobileOS.android),n.eventCapture=document.documentElement.addEventListener,document.createElement("table")),a=n.transitions=!1,p=n.transforms=!1;return["Moz","webkit","O","ms"].forEach(function(t){var e,o="string"==typeof s.style[t+"Transition"];if(o||"string"==typeof s.style[t+"Transform"])return e=t.toLowerCase(),p={css:"ms"!==e?"-"+e+"-":"",prefix:t,event:"o"===e||"webkit"===e?e:""},o&&((a=p).event=a.event?a.event+"TransitionEnd":"transitionend"),!1}),s=null,n.transforms=p,n.transitions=a,n.delayedClick=function(){if(n.touch){if(n.mobileOS.ios)return!0;if(n.mobileOS.android){if(!n.browser.chrome)return!0;if(n.browser.version<32)return!1;var t=document.querySelector("meta[name=viewport]");return!(t?t.getAttribute("content"):"").match(/user-scalable=no/i)}}return!1},n},dv=function(s,t,a,p,h){(ot(t)?t:(t||"").split(" ")).forEach(function(t){var o,e,i,r,n;n=i=p,(e=a)&<(e)&&!i?n=e:e&&"string"==typeof e&<(n)&&(r=e),(o=s).addEventListener(t,function(t){var e=t.target?t.target.closest(r):null;(!r||t.target&&e)&&(e=r?e:t.currentTarget,Yy(t,"currentTarget",{value:e}),Yy(t,"delegateTarget",{value:o}),n(t))},Boolean(h))})},fv=function(t,e,o,i){t.removeEventListener(e,o,Boolean(i))},gv="function",mf=((lv=b.Class)&&(mv.__proto__=lv),((mv.prototype=Object.create(lv&&lv.prototype)).constructor=mv).prototype.destroy=function(){this.unbind()},mv.prototype.bind=function(t,e,o){var i,r,n=this,s="string"==typeof t?[t]:t||[],a=typeof e==gv;if(void 0===e){for(p in t)n.bind(p,t[p]);return n}for(var p=0,h=s.length;p<h;p++)!function(){var t=s[p];(r=a?e:e[t])&&(o&&(i=r,(r=function(){n.unbind(t,r),i.apply(n,arguments)}).original=i),(n._events[t]=n._events[t]||[]).push(r))}();return n},mv.prototype.one=function(t,e){return this.bind(t,e,!0)},mv.prototype.first=function(t,e){for(var o,i="string"==typeof t?[t]:t,r=typeof e==gv,n=0,s=i.length;n<s;n++){var a=i[n];(o=r?e:e[a])&&(this._events[a]=this._events[a]||[]).unshift(o)}return this},mv.prototype.trigger=function(t,e){var o,i,r=this._events[t];if(r){var n=e||{};for(n.sender=this,n._defaultPrevented=!1,n.preventDefault=av,n.isDefaultPrevented=pv,o=0,i=(r=r.slice()).length;o<i;o++)r[o].call(this,n);return!0===n._defaultPrevented}return!1},mv.prototype.unbind=function(t,e){var o,i=this._events[t];if(void 0===t)this._events={};else if(i)if(e)for(o=i.length-1;0<=o;o--)i[o]!==e&&i[o].original!==e||i.splice(o,1);else this._events[t]=[];return this},mv.prototype._setEvents=function(t){for(var e=(this.events||[]).length,o=0;o<e;o++){var i=this.events[o];this.options[i]&&t[i]&&(this.unbind(i,this.options[i]),this._events&&this._events[i]&&delete this._events[i])}this.bind(this.events,t)},mv),yv=((hv=mf)&&(vv.__proto__=hv),((vv.prototype=Object.create(hv&&hv.prototype)).constructor=vv).prototype._initOptions=function(t){this.options=x({},this.options,t)},vv.prototype.filter=function(t,e){this._extent=t,this._zoom=e,this._render()},vv.prototype.add=function(t){var e=t;P(t)&&(this.items.push(e="string"==typeof t?{text:t}:e),this._render())},vv.prototype.remove=function(t){for(var e=[],o=0;o<this.items.length;o++){var i=this.items[o];i.text!==t&&e.push(i)}this.items=e,this._render()},vv.prototype.clear=function(){this.items=[],Hy(this.element)},vv.prototype._render=function(){for(var t=[],e=0;e<this.items.length;e++){var o=this.items[e],o=this._itemText(o);""!==o&&t.push(o)}if(0<t.length){Hy(this.element);var i=t.join(this.options.separator),r=this.element,n=document.createElement("div");for(n.innerHTML=i;0<n.childNodes.length;)r.appendChild(n.childNodes[0]);this.showElement()}else this.hideElement()},vv.prototype.hideElement=function(){this.element.style.display="none"},vv.prototype.showElement=function(){this.element.style.display=""},vv.prototype._itemText=function(t){var e="",o=this._inZoomLevel(t.minZoom,t.maxZoom),i=this._inArea(t.extent);return o&&i&&(e+=t.text),e},vv.prototype._inZoomLevel=function(t,e){t=M(t,-Number.MAX_VALUE),e=M(e,Number.MAX_VALUE);return this._zoom>t&&this._zoom<e},vv.prototype._inArea=function(t){var e=!0;return e=t?t.contains(this._extent):e},vv);function vv(t,e){hv.call(this),this.element=t,this._initOptions(e),this.items=[],it(this.element,"k-widget k-attribution")}function mv(){lv.call(this),this._events={}}e(yv,{name:"Attribution",separator:" | "});var xv={up:{className:"k-navigator-n",iconClass:"k-i-arrow-n"},down:{className:"k-navigator-s",iconClass:"k-i-arrow-s"},right:{className:"k-navigator-e",iconClass:"k-i-arrow-e"},left:{className:"k-navigator-w",iconClass:"k-i-arrow-w"}};function _v(t){t='<button class="k-button k-button-square k-rounded-full k-button-flat k-button-flat-base k-icon-button '+xv[t].className+'" aria-label="move '+t+'"><span class="k-icon '+xv[t].iconClass+'" /></button>';return Zy(t)}(bv=mf)&&(Cv.__proto__=bv),((Cv.prototype=Object.create(bv&&bv.prototype)).constructor=Cv).prototype.destroy=function(){this.dispose()},Cv.prototype.dispose=function(){ov(this._keyroot,"keydown",this._keydownHandler)},Cv.prototype._tabindex=function(t){var t=t||this.wrapper||this.element,e=this.element,o="tabindex",i=t.getAttribute(o)||e.getAttribute(o);e.removeAttribute(o),t.setAttribute(o,isNaN(i)?0:i)},Cv.prototype._initOptions=function(t){this.options=x({},this.options,t)},Cv.prototype._pan=function(t,e){var o=this.options.panStep;this.trigger("pan",{x:t*o,y:e*o})},Cv.prototype._click=function(t){var e=0,o=0,i=t.currentTarget;i.matches(".k-navigator-n")?o=1:i.matches(".k-navigator-s")?o=-1:i.matches(".k-navigator-e")?e=1:i.matches(".k-navigator-w")&&(e=-1),this._pan(e,o),t.preventDefault()},Cv.prototype._keydown=function(t){switch(t.which){case he.UP:this._pan(0,1),t.preventDefault();break;case he.DOWN:this._pan(0,-1),t.preventDefault();break;case he.RIGHT:this._pan(1,0),t.preventDefault();break;case he.LEFT:this._pan(-1,0),t.preventDefault()}};var bv,wv=Cv;function Cv(t,e){bv.call(this),this.element=t,this._initOptions(e);var t=_v("up"),e=_v("right"),o=_v("down"),i=_v("left"),t=(this.element.appendChild(t),this.element.appendChild(e),this.element.appendChild(o),this.element.appendChild(i),it(this.element,"k-widget k-navigator"),ev(this.element,"click",".k-button",tv(this._click,this)),this.element.parentNode.closest("[data-role]"));this._keyroot=t||this.element,this._tabindex(this._keyroot),this._keydownHandler=tv(this._keydown,this),ev(this._keyroot,"keydown",this._keydownHandler)}function Sv(t,e){return Zy('<button class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-base k-icon-button k-zoom-'+t+'" title="zoom-'+t+'" aria-label="zoom-'+t+'"><span class="k-icon '+e+'"></span></button>')}e(wv,{name:"Navigator",panStep:1}),rv(wv,["pan"]);(kv=mf)&&(Pv.__proto__=kv),((Pv.prototype=Object.create(kv&&kv.prototype)).constructor=Pv).prototype.destroy=function(){this.element&&ov(this.element,"click",this._clickHandler),this._keyroot&&ov(this._keyroot,"keydown",this._keydownHandler)},Pv.prototype._tabindex=function(t){var t=t||this.wrapper||this.element,e=this.element,o="tabindex",i=t.getAttribute(o)||e.getAttribute(o);e.removeAttribute(o),t.setAttribute(o,isNaN(i)?0:i)},Pv.prototype._initOptions=function(t){this.options=x({},this.options,t)},Pv.prototype._change=function(t){var e=this.options.zoomStep;this.trigger("change",{delta:t*e})},Pv.prototype._click=function(t){var e=1;St(t.currentTarget,"k-zoom-out")&&(e=-1),this._change(e),t.preventDefault()},Pv.prototype._keydown=function(t){switch(t.which){case he.NUMPAD_PLUS:case 187:case 61:this._change(1);break;case he.NUMPAD_MINUS:case 189:case 173:this._change(-1)}};var kv,Av=Pv;function Pv(t,e){kv.call(this),this.element=t,this._initOptions(e);t=Sv("in","k-i-plus"),e=Sv("out","k-i-minus"),this.element.appendChild(t),this.element.appendChild(e),it(this.element,"k-widget k-zoom-control k-button-group k-group-horizontal"),this._clickHandler=this._click.bind(this),ev(this.element,"click",".k-button",this._clickHandler),t=this.element.parentNode.closest("[data-role]");this._keyroot=t||this.element,this._tabindex(this._keyroot),this._keydownHandler=this._keydown.bind(this),ev(this._keyroot,"keydown",this._keydownHandler)}e(Av,{name:"ZoomControl",zoomStep:1}),rv(Av,["change"]);var Tv,Mv,l=Math,Ov=l.max,Bv=l.min,Rv=((Mv=b.Class)&&(zv.__proto__=Mv),zf={World:{configurable:!0}},((zv.prototype=Object.create(Mv&&Mv.prototype)).constructor=zv).prototype.contains=function(t){var e=this.nw,o=this.se,i=M(t.lng,t[1]),r=M(t.lat,t[0]);return t&&i+180>=e.lng+180&&i+180<=o.lng+180&&r+90>=o.lat+90&&r+90<=e.lat+90},zv.prototype.center=function(){var t=this.nw,e=this.se,o=t.lng+(e.lng-t.lng)/2,e=t.lat+(e.lat-t.lat)/2;return new ky(e,o)},zv.prototype.containsAny=function(t){for(var e=!1,o=0;o<t.length;o++)e=e||this.contains(t[o]);return e},zv.prototype.include=function(t){var e=this.nw,o=this.se,i=M(t.lng,t[1]),t=M(t.lat,t[0]);e.lng=Bv(e.lng,i),e.lat=Ov(e.lat,t),o.lng=Ov(o.lng,i),o.lat=Bv(o.lat,t)},zv.prototype.includeAll=function(t){for(var e=0;e<t.length;e++)this.include(t[e])},zv.prototype.edges=function(){var t=this.nw,e=this.se;return{nw:this.nw,ne:new ky(t.lat,e.lng),se:this.se,sw:new ky(e.lat,t.lng)}},zv.prototype.toArray=function(){var t=this.nw,e=this.se;return[t,new ky(t.lat,e.lng),e,new ky(e.lat,t.lng)]},zv.prototype.overlaps=function(t){return this.containsAny(t.toArray())||t.containsAny(this.toArray())},zv.create=function(t,e){return t instanceof zv?t:t&&e?new zv(t,e):t&&4===t.length&&!e?new zv([t[0],t[1]],[t[2],t[3]]):void 0},zf.World.get=function(){return new zv([90,-180],[-90,180])},Object.defineProperties(zv,zf),zv),Vf=((Tv=b.Class)&&(Iv.__proto__=Tv),((Iv.prototype=Object.create(Tv&&Tv.prototype)).constructor=Iv).prototype.destroy=function(){this._deactivate()},Iv.prototype._initOptions=function(t){this.options=x({},this.options,t)},Iv.prototype.show=function(){this.reset(),this._activate(),this._applyExtent(!0)},Iv.prototype.hide=function(){this._deactivate(),this._setVisibility(!1)},Iv.prototype.reset=function(){this._beforeReset(),this._reset()},Iv.prototype._reset=function(){this._applyExtent()},Iv.prototype._beforeReset=function(){},Iv.prototype._resize=function(){},Iv.prototype._panEnd=function(){this._applyExtent()},Iv.prototype._applyExtent=function(){var t=this.options,e=this.map.zoom(),o=!P(t.minZoom)||e>=t.minZoom,e=!P(t.maxZoom)||e<=t.maxZoom,t=Rv.create(t.extent),t=!t||t.overlaps(this.map.extent());this._setVisibility(o&&e&&t)},Iv.prototype._setVisibility=function(t){this.element.style.display=t?"":"none"},Iv.prototype._activate=function(){var t=this.map;this._deactivate(),t.bind("beforeReset",this._beforeReset),t.bind("reset",this._reset),t.bind("resize",this._resize),t.bind("panEnd",this._panEnd)},Iv.prototype._deactivate=function(){var t=this.map;t.unbind("beforeReset",this._beforeReset),t.unbind("reset",this._reset),t.unbind("resize",this._resize),t.unbind("panEnd",this._panEnd)},Iv.prototype._updateAttribution=function(){var t=this.map.attribution;t&&t.add(this.options.attribution)},Iv.prototype._readData=function(){return this.options.data||[]},Iv.prototype._hasData=function(){return this._data&&0<this._data.length},Iv),Ev=Math,Lv=b.geometry.Point;function Iv(t,e){Tv.call(this),this.support=uv(),this._initOptions(e),this.map=t;e=document.createElement("div");it(e,"k-layer"),e.style.zIndex=this.options.zIndex,e.style.opacity=this.options.opacity,this.element=e,t.scrollElement.appendChild(this.element),this._beforeReset=this._beforeReset.bind(this),this._reset=this._reset.bind(this),this._resize=this._resize.bind(this),this._panEnd=this._panEnd.bind(this),this._activate(),this._updateAttribution()}function zv(t,e){Mv.call(this);t=ky.create(t),e=ky.create(e);t.lng+180>e.lng+180&&t.lat+90<e.lat+90?(this.se=t,this.nw=e):(this.se=e,this.nw=t)}function Vv(t){return lt(t)?t:mt.compile(t)}function jv(t){var e=t;return"string"!=typeof t&&(e+="px"),e}(Dv=Vf)&&(Hv.__proto__=Dv),((Hv.prototype=Object.create(Dv&&Dv.prototype)).constructor=Hv).prototype.destroy=function(){Dv.prototype.destroy.call(this),this._view.destroy(),this._view=null},Hv.prototype._beforeReset=function(){var t=this.map,t=t.locationToLayer(t.extent().nw).round();this._view.viewOrigin(t)},Hv.prototype._reset=function(){Dv.prototype._reset.call(this),this._updateView(),this._view.reset()},Hv.prototype._viewType=function(){return Nv},Hv.prototype._activate=function(){Dv.prototype._activate.call(this),this.support.mobileOS||(this._pan||(this._pan=(0,b.throttle)(this._render.bind(this),100)),this.map.bind("pan",this._pan))},Hv.prototype._deactivate=function(){Dv.prototype._deactivate.call(this),this._pan&&this.map.unbind("pan",this._pan)},Hv.prototype._updateView=function(){var t=this._view,e=this.map,o=e.extent(),o={nw:e.locationToLayer(o.nw).round(),se:e.locationToLayer(o.se).round()};t.center(e.locationToLayer(e.center())),t.extent(o),t.zoom(e.zoom())},Hv.prototype._resize=function(){this._render()},Hv.prototype._panEnd=function(t){Dv.prototype._panEnd.call(this,t),this._render()},Hv.prototype._render=function(){this._updateView(),this._view.render()};var Dv,jf=Hv;function Hv(t,e){Dv.call(this,t,e),"string"==typeof this.options.subdomains&&(this.options.subdomains=this.options.subdomains.split(""));t=this._viewType();this._view=new t(this.element,this.options)}e(jf,{tileSize:256,subdomains:["a","b","c"],urlTemplate:"",zIndex:1});(Fv=b.Class)&&(Xv.__proto__=Fv),((Xv.prototype=Object.create(Fv&&Fv.prototype)).constructor=Xv).prototype._initOptions=function(t){this.options=x({},this.options,t)},Xv.prototype.center=function(t){this._center=t},Xv.prototype.extent=function(t){this._extent=t},Xv.prototype.viewOrigin=function(t){this._viewOrigin=t},Xv.prototype.zoom=function(t){this._zoom=t},Xv.prototype.pointToTileIndex=function(t){return new Lv(Ev.floor(t.x/this.options.tileSize),Ev.floor(t.y/this.options.tileSize))},Xv.prototype.tileCount=function(){var t=this.size(),e=this.pointToTileIndex(this._extent.nw),o=this._extent.nw,e=this.indexToPoint(e).translate(-o.x,-o.y);return{x:Ev.ceil((Ev.abs(e.x)+t.width)/this.options.tileSize),y:Ev.ceil((Ev.abs(e.y)+t.height)/this.options.tileSize)}},Xv.prototype.size=function(){var t=this._extent.nw,t=this._extent.se.clone().translate(-t.x,-t.y);return{width:t.x,height:t.y}},Xv.prototype.indexToPoint=function(t){var e=t.x,t=t.y;return new Lv(e*this.options.tileSize,t*this.options.tileSize)},Xv.prototype.subdomainText=function(){var t=this.options.subdomains;return t[this.subdomainIndex++%t.length]},Xv.prototype.destroy=function(){Hy(this.element),this.pool.empty()},Xv.prototype.reset=function(){this.pool.reset(),this.subdomainIndex=0,this.render()},Xv.prototype.render=function(){for(var t,e,o=this.tileCount(),i=this.pointToTileIndex(this._extent.nw),r=0;r<o.x;r++)for(e=0;e<o.y;e++)(t=this.createTile({x:i.x+r,y:i.y+e})).visible||t.show()},Xv.prototype.createTile=function(t){t=this.tileOptions(t),t=this.pool.get(this._center,t);return t.element.parentNode||this.element.append(t.element),t},Xv.prototype.tileOptions=function(t){var e=this.wrapIndex(t),o=this.indexToPoint(t),i=this._viewOrigin,i=o.clone().translate(-i.x,-i.y);return{index:e,currentIndex:t,point:o,offset:new Lv(T((e=i).x),T(e.y)),zoom:this._zoom,size:this.options.tileSize,subdomain:this.subdomainText(),urlTemplate:this.options.urlTemplate,errorUrlTemplate:this.options.errorUrlTemplate}},Xv.prototype.wrapIndex=function(t){var e=Ev.pow(2,this._zoom);return{x:this.wrapValue(t.x,e),y:_(t.y,0,e-1)}},Xv.prototype.wrapValue=function(t,e){var o=Ev.abs(t)%e;return 0<=t?o:e-(0==o?e:o)};var Uv,Fv,Nv=Xv,Gv=((Uv=b.Class)&&(Wv.__proto__=Uv),((Wv.prototype=Object.create(Uv&&Uv.prototype)).constructor=Wv).prototype.destroy=function(){var t=this.element,e=t?t.parentNode:null;t&&(e&&e.removeChild(t),this.element=null)},Wv.prototype._initOptions=function(t){this.options=x({},this.options,t)},Wv.prototype.createElement=function(){var t=document.createElement("img");it(t,"k-layer"),t.style.position="absolute",t.style.display="block",t.style.width=this.options.size,t.style.height=this.options.size,this.element=t},Wv.prototype.show=function(){var t=this.element,e=(t.style.top=jv(this.options.offset.y),t.style.left=jv(this.options.offset.x),this.url());e&&t.setAttribute("src",e),t.style.visibility="visible",this.visible=!0},Wv.prototype.hide=function(){this.element.style.visibility="hidden",this.visible=!1},Wv.prototype.url=function(){return Vv(this.options.urlTemplate)(this.urlOptions())},Wv.prototype.errorUrl=function(){return Vv(this.options.errorUrlTemplate)(this.urlOptions())},Wv.prototype.urlOptions=function(){var t=this.options;return{zoom:t.zoom,subdomain:t.subdomain,z:t.zoom,x:t.index.x,y:t.index.y,s:t.subdomain,quadkey:t.quadkey,q:t.quadkey,culture:t.culture,c:t.culture}},Wv);function Wv(t,e){Uv.call(this),this.id=t,this.visible=!0,this._initOptions(e),this.createElement(),this.show()}function Xv(t,e){Fv.call(this),this.element=t,this._initOptions(e),this.pool=new Yv}e(Gv,{urlTemplate:"",errorUrlTemplate:""});(qv=b.Class)&&(Zv.__proto__=qv),((Zv.prototype=Object.create(qv&&qv.prototype)).constructor=Zv).prototype.get=function(t,e){return this._items.length>=this.options.maxSize&&this._remove(t),this._create(e)},Zv.prototype.empty=function(){for(var t=this._items,e=0;e<t.length;e++)t[e].destroy();this._items=[]},Zv.prototype.reset=function(){for(var t=this._items,e=0;e<t.length;e++)t[e].hide()},Zv.prototype._create=function(t){for(var e,o=this._items,i=Ut(t.point.toString()+t.offset.toString()+t.zoom+t.urlTemplate),r=0;r<o.length;r++)if(o[r].id===i){e=o[r];break}return e?e.show():(e=new Gv(i,t),this._items.push(e)),e},Zv.prototype._remove=function(t){for(var e=this._items,o=-1,i=-1,r=0;r<e.length;r++){var n=e[r].options.point.distanceTo(t);o<n&&!e[r].visible&&(i=r,o=n)}-1!==i&&(e[i].destroy(),e.splice(i,1))};var qv,Yv=Zv;function Zv(){qv.call(this),this._items=[]}e(Yv,{maxSize:100});function Qv(t,e,o){return"translate3d("+t+"px,"+e+"px,0) scale("+o+")"}var Kv,$v,Jv,tm,em,om,im,rm=Object.assign,nm="change",sm=((im=mf)&&(xm.__proto__=im),((xm.prototype=Object.create(im&&im.prototype)).constructor=xm).prototype.captureNext=function(){this.capture=!0},xm.prototype.cancelCapture=function(){this.capture=!1},xm.prototype._press=function(t){this.trigger("press"),this.capture&&t.preventDefault()},xm.prototype._release=function(t){this.trigger("release"),this.capture&&(t.preventDefault(),this.cancelCapture())},xm),am=((om=mf)&&(mm.__proto__=om),((mm.prototype=Object.create(om&&om.prototype)).constructor=mm).prototype.makeVirtual=function(){rm(this,{virtual:!0,forcedEnabled:!0,_virtualMin:0,_virtualMax:0})},mm.prototype.virtualSize=function(t,e){this._virtualMin===t&&this._virtualMax===e||(this._virtualMin=t,this._virtualMax=e,this.update())},mm.prototype.outOfBounds=function(t){return t>this.max||t<this.min},mm.prototype.forceEnabled=function(){this.forcedEnabled=!0},mm.prototype.getSize=function(){return this.container[this.measure]},mm.prototype.getTotal=function(){return this.element[this.scrollSize]},mm.prototype.rescale=function(t){this.scale=t},mm.prototype.update=function(t){var e=this,o=e.virtual?e._virtualMax:e.getTotal(),i=o*e.scale,r=e.getSize();0===o&&!e.forcedEnabled||(e.max=e.virtual?-e._virtualMin:0,e.size=r,e.total=i,e.min=Math.min(e.max,r-i),e.minScale=r/o,e.centerOffset=(i-r)/2,e.enabled=e.forcedEnabled||r<i,t||e.trigger(nm,e))},mm),pm=((em=mf)&&(vm.__proto__=em),((vm.prototype=Object.create(em&&em.prototype)).constructor=vm).prototype.rescale=function(t){this.x.rescale(t),this.y.rescale(t),this.refresh()},vm.prototype.centerCoordinates=function(){return{x:Math.min(0,-this.x.centerOffset),y:Math.min(0,-this.y.centerOffset)}},vm.prototype.refresh=function(){var t=this;t.x.update(),t.y.update(),t.enabled=t.x.enabled||t.y.enabled,t.minScale=t.forcedMinScale||Math.min(t.x.minScale,t.y.minScale),t.fitScale=Math.max(t.x.minScale,t.y.minScale),t.trigger(nm)},vm),hm=((tm=mf)&&(ym.__proto__=tm),((ym.prototype=Object.create(tm&&tm.prototype)).constructor=ym).prototype.outOfBounds=function(){return this.dimension.outOfBounds(this.movable[this.axis])},ym.prototype.dragMove=function(t){var e,o=this.dimension,i=this.axis,r=this.movable,n=r[i]+t;o.enabled&&(e=t,(n<o.min&&t<0||n>o.max&&0<t)&&(e*=this.resistance),r.translateAxis(i,e),this.trigger(nm,this))},ym),lm=((Jv=b.Class)&&(gm.__proto__=Jv),(gm.prototype=Object.create(Jv&&Jv.prototype)).constructor=gm),cm=(($v=mf)&&(fm.__proto__=$v),((fm.prototype=Object.create($v&&$v.prototype)).constructor=fm).prototype.translateAxis=function(t,e){this[t]+=e,this.refresh()},fm.prototype.scaleTo=function(t){this.scale=t,this.refresh()},fm.prototype.scaleWith=function(t){this.scale*=t,this.refresh()},fm.prototype.translate=function(t){this.x+=t.x,this.y+=t.y,this.refresh()},fm.prototype.moveAxis=function(t,e){this[t]=e,this.refresh()},fm.prototype.moveTo=function(t){rm(this,t),this.refresh()},fm.prototype.refresh=function(){var t=this.x,e=this.y;this.round&&(t=Math.round(t),e=Math.round(e)),(t=Qv(t,e,this.scale))!==this.coordinates&&(this.element.style[this.transformStyle]=t,this._saveCoordinates(t),this.trigger(nm))},fm.prototype._saveCoordinates=function(t){this.coordinates=t},fm),um=b.drawing.Group,If=((Kv=Vf)&&(dm.__proto__=Kv),((dm.prototype=Object.create(Kv&&Kv.prototype)).constructor=dm).prototype.destroy=function(){Kv.prototype.destroy.call(this),this.surface.destroy()},dm.prototype._reset=function(){Kv.prototype._reset.call(this),this._translateSurface(),this._data=this._readData(),this._hasData()&&this._load(this._data)},dm.prototype._initRoot=function(){this._root=new um,this.surface.draw(this._root)},dm.prototype._beforeReset=function(){this.surface.clear(),this._initRoot()},dm.prototype._resize=function(){this.surface.size(this.map.size())},dm.prototype._readData=function(){var t=Kv.prototype._readData.call(this);return"FeatureCollection"===t.type?t.features:"GeometryCollection"===t.type?t.geometries:t},dm.prototype._load=function(t){this._data=t,this._clearMarkers(),this._loader||(this._loader=new wm(this.map,this.options.style,this));for(var e=new um,o=0;o<t.length;o++){var i=this._loader.parse(t[o]);i&&e.append(i)}this._root.clear(),this._root.append(e)},dm.prototype.shapeCreated=function(t){var e=!1;return e=(e=t instanceof b.drawing.Circle&&this.map.options.renderPointsAsMarkers?P(this._createMarker(t)):e)?e:this.map.trigger("shapeCreated",{layer:this,shape:t})},dm.prototype.featureCreated=function(t){(t.layer=this).map.trigger("shapeFeatureCreated",t)},dm.prototype._createMarker=function(t){t=this.map.markers.bind({location:t.location},t.dataItem);return t&&this._markers.push(t),t},dm.prototype._clearMarkers=function(){for(var t=0;t<this._markers.length;t++)this.map.markers.remove(this._markers[t]);this._markers=[]},dm.prototype._pan=function(){this._panning||(this._panning=!0,this.surface.suspendTracking())},dm.prototype._panEnd=function(t){Kv.prototype._panEnd.call(this,t),this._translateSurface(),this.surface.resumeTracking(),this._panning=!1},dm.prototype._translateSurface=function(){var t=this.map,t=t.locationToView(t.extent().nw);this.surface.translate&&(this.surface.translate(t),this.movable.moveTo({x:t.x,y:t.y}))},dm.prototype._handler=function(e){var o=this;return function(t){t.element&&(t={layer:o,layerIndex:(o.map.layers||[]).indexOf(o),shape:t.element,shapeIndex:(o._data||[]).indexOf(t.element.dataItem),originalEvent:t.originalEvent},o.map.trigger(e,t))}},dm.prototype._activate=function(){Kv.prototype._activate.call(this),this._panHandler=tv(this._pan,this),this.map.bind("pan",this.panHandler)},dm.prototype._deactivate=function(){Kv.prototype._deactivate.call(this),this.map.unbind("pan",this._panHandler)},dm);function dm(t,e){Kv.call(this,t,e),this._pan=tv(this._pan,this),this.surface=b.drawing.Surface.create(this.element,{width:t.scrollElement.clientWidth,height:t.scrollElement.clientHeight}),this._initRoot(),this.movable=new cm(this.surface.element),this._markers=[],this._click=this._handler("shapeClick"),this.surface.bind("click",this._click),this._mouseenter=this._handler("shapeMouseEnter"),this.surface.bind("mouseenter",this._mouseenter),this._mouseleave=this._handler("shapeMouseLeave"),this.surface.bind("mouseleave",this._mouseleave)}function fm(t){$v.call(this);var e=this,t=(e.support=uv(),this.transformStyle=this.support.transitions.prefix+"Transform",e.element=t,e.element.style.webkitTransformOrigin="left top",e.x=0,e.y=0,e.scale=1,Qv(e.x,e.y,e.scale));e.element.style[this.transformStyle]=t,e._saveCoordinates(t)}function gm(t){Jv.call(this);var s,a,p,h=this;rm(h,{elastic:!0},t),t=h.elastic?.5:0,p=h.movable,h.x=s=new hm({axis:"x",dimension:h.dimensions.x,resistance:t,movable:p}),h.y=a=new hm({axis:"y",dimension:h.dimensions.y,resistance:t,movable:p}),h.userEvents.bind(["press","move","end","gesturestart","gesturechange"],{gesturestart:function(t){h.gesture=t,h.offset=Vt(h.dimensions.container)},press:function(t){var e=t.event.target.closest("a");e&&e.matches("[data-navigate-on-press=true]")&&t.sender.cancel()},gesturechange:function(t){var e=h.gesture,o=e.center,i=t.center,e=t.distance/e.distance,r=h.dimensions.minScale,n=h.dimensions.maxScale,r=(p.scale<=r&&e<1&&(e+=.8*(1-e)),p.scale*e>=n&&(e=n/p.scale),p.x+h.offset.left),n=p.y+h.offset.top,r={x:(r-o.x)*e+i.x-r,y:(n-o.y)*e+i.y-n};p.scaleWith(e),s.dragMove(r.x),a.dragMove(r.y),h.dimensions.rescale(p.scale),(h.gesture=t).preventDefault()},move:function(t){t.event.target.tagName.match(/textarea|input/i)||(s.dimension.enabled||a.dimension.enabled?(s.dragMove(t.x.delta),a.dragMove(t.y.delta),t.preventDefault()):t.touch.skip())},end:function(t){t.preventDefault()}})}function ym(t){tm.call(this),rm(this,t)}function vm(t){em.call(this);this.x=new am(rm({horizontal:!0},t)),this.y=new am(rm({horizontal:!1},t)),this.container=t.container,this.forcedMinScale=t.minScale,this.maxScale=t.maxScale||100,this.bind(nm,t)}function mm(t){om.call(this);var e=this;e.forcedEnabled=!1,rm(e,t),e.scale=1,e.horizontal?(e.measure="offsetWidth",e.scrollSize="scrollWidth",e.axis="x"):(e.measure="offsetHeight",e.scrollSize="scrollHeight",e.axis="y")}function xm(t,e){im.call(this);var o=this,i=t[0]||t,t=(o.capture=!1,cv(navigator.userAgent));i.addEventListener?(t.down.split(" ").forEach(function(t){i.addEventListener(t,tv(o._press,o),!0)}),t.up.split(" ").forEach(function(t){i.addEventListener(t,tv(o._release,o),!0)})):(t.down.split(" ").forEach(function(t){i.attachEvent(t,tv(o._press,o))}),t.up.split(" ").forEach(function(t){i.attachEvent(t,tv(o._release,o))})),o.bind(["press","release"],e||{})}e(If,{autoBind:!0,zIndex:100});(bm=b.Class)&&(Sm.__proto__=bm),((Sm.prototype=Object.create(bm&&bm.prototype)).constructor=Sm).prototype.parse=function(t){var e=new um,o=!0;return"Feature"===t.type?(o=!1,this._loadGeometryTo(e,t.geometry,t),this._featureCreated(e,t)):this._loadGeometryTo(e,t,t),e=o&&e.children.length<2?e.children[0]:e},Sm.prototype._shapeCreated=function(t){var e=!1;return e=this.observer&&this.observer.shapeCreated?this.observer.shapeCreated(t):e},Sm.prototype._featureCreated=function(t,e){this.observer&&this.observer.featureCreated&&this.observer.featureCreated({group:t,dataItem:e,properties:e.properties})},Sm.prototype._loadGeometryTo=function(t,e,o){var i,r,n=e.coordinates;switch(e.type){case"LineString":r=this._loadPolygon(t,[n],o),this._setLineFill(r);break;case"MultiLineString":for(i=0;i<n.length;i++)r=this._loadPolygon(t,[n[i]],o),this._setLineFill(r);break;case"Polygon":this._loadPolygon(t,n,o);break;case"MultiPolygon":for(i=0;i<n.length;i++)this._loadPolygon(t,n[i],o);break;case"Point":this._loadPoint(t,n,o);break;case"MultiPoint":for(i=0;i<n.length;i++)this._loadPoint(t,n[i],o)}},Sm.prototype._setLineFill=function(t){var e=t.segments;(e.length<4||!e[0].anchor().equals(Ft(e).anchor()))&&(t.options.fill=null)},Sm.prototype._loadShape=function(t,e){return this._shapeCreated(e)||t.append(e),e},Sm.prototype._loadPolygon=function(t,e,o){e=this._buildPolygon(e);return e.dataItem=o,this._loadShape(t,e)},Sm.prototype._buildPolygon=function(t){for(var e=new(1<t.length?b.drawing.MultiPath:b.drawing.Path)(this.style),o=0;o<t.length;o++)for(var i=0;i<t[o].length;i++){var r=this.locator.locationToView(ky.fromLngLat(t[o][i]));0===i?e.moveTo(r.x,r.y):e.lineTo(r.x,r.y)}return e},Sm.prototype._loadPoint=function(t,e,o){var e=ky.fromLngLat(e),i=this.locator.locationToView(e),i=new b.geometry.Circle(i,10),i=new b.drawing.Circle(i,this.style);return i.dataItem=o,i.location=e,this._loadShape(t,i)};var _m,bm,wm=Sm,h=((_m=If)&&(Cm.__proto__=_m),((Cm.prototype=Object.create(_m&&_m.prototype)).constructor=Cm).prototype._readData=function(){return this.options.data||[]},Cm.prototype._load=function(t){if(this._data=t,this.surface.clear(),0!==t.length){var e=this.options,o=wt(e.valueField),i=t.slice(0);i.sort(function(t,e){return o(e)-o(t)});for(var r=this._scaleType(),n=wt(this.options.locationField),s=0;s<i.length;s++){var a,p,h,l=i[s],c=n(l),u=o(l);P(c)&&P(u)&&(a=a||new r([0,u],[e.minSize,e.maxSize]),c=ky.create(c),h=this.map.locationToView(c),p=a.map(u),(h=this._createSymbol({center:h,size:p,style:e.style,dataItem:l,location:c})).dataItem=l,h.location=c,h.value=u,this._drawSymbol(h))}}},Cm.prototype._scaleType=function(){var t=this.options.scale;return lt(t)?t:Pm[t]},Cm.prototype._createSymbol=function(t){var e=this.options.symbol;return(e=lt(e)?e:Tm[e])(t)},Cm.prototype._drawSymbol=function(t){this.map.trigger("shapeCreated",{layer:this,shape:t})||this.surface.draw(t)},Cm);function Cm(){_m.apply(this,arguments)}function Sm(t,e,o){bm.call(this),this.observer=o,this.locator=t,this.style=e}e(h,{locationField:"location",valueField:"value",minSize:0,maxSize:100,scale:"sqrt",symbol:"circle",zIndex:200});var km,Am,Pm={sqrt:((Am=b.Class)&&(Im.__proto__=Am),((Im.prototype=Object.create(Am&&Am.prototype)).constructor=Im).prototype.map=function(t){t=(Math.sqrt(t)-Math.sqrt(this._domain[0]))*this._ratio;return this._range[0]+t},Im)},Tm={circle:function(t){var e=new b.geometry.Circle(t.center,t.size/2);return new b.drawing.Circle(e,t.style)},square:function(t){var e=new b.drawing.Path(t.style),o=t.size/2,t=t.center;return e.moveTo(t.x-o,t.y-o).lineTo(t.x+o,t.y-o).lineTo(t.x+o,t.y+o).lineTo(t.x-o,t.y+o).close(),e}},Mm="mouseenter",Om="mouseleave",Bm=Object.assign,Rm=".k-marker",Em=((km=Vf)&&(Lm.__proto__=km),((Lm.prototype=Object.create(km&&km.prototype)).constructor=Lm).prototype.destroy=function(){km.prototype.destroy.call(this),ov(this.element,"click",this._markerClickHandler),this.clear()},Lm.prototype.add=function(t){if(!ot(t))return this._addOne(t);for(var e=0;e<t.length;e++)this._addOne(t[e])},Lm.prototype.remove=function(t){t.destroy();t=(this.items||[]).indexOf(t);-1<t&&this.items.splice(t,1)},Lm.prototype.clear=function(){for(var t=0;t<this.items.length;t++)this.items[t].destroy();this.items=[]},Lm.prototype.update=function(t){var e=t.location();e&&(t.showAt(this.map.locationToView(e)),this.map.trigger("markerActivate",{marker:t,layer:this}))},Lm.prototype._reset=function(){km.prototype._reset.call(this);for(var t=this.items,e=0;e<t.length;e++)this.update(t[e])},Lm.prototype.bind=function(t,e){t=Vm.create(t,this.options);if(t.dataItem=e,!this.map.trigger("markerCreated",{marker:t,layer:this}))return this.add(t),t},Lm.prototype._addOne=function(t){t=Vm.create(t,this.options);return t.addTo(this),t},Lm.prototype._readData=function(){return this.options.data||[]},Lm.prototype._load=function(t){this._data=t,this.clear();for(var e=wt(this.options.locationField),o=wt(this.options.titleField),i=0;i<t.length;i++){var r=t[i];this.bind({location:e(r),title:o(r)},r)}},Lm.prototype._markerClick=function(t){var e=this.map.layers||[],o=t.target._kendoNode,e={layer:this,layerIndex:e.indexOf(this),marker:o,markerIndex:(this.items||[]).indexOf(o),originalEvent:t};this.map.trigger("markerClick",e)},Lm.prototype._markerMouseEnter=function(t){t=this._createMarkerEventArgs(t);this.map.trigger("markerMouseEnter",t)},Lm.prototype._markerMouseLeave=function(t){t=this._createMarkerEventArgs(t);this.map.trigger("markerMouseLeave",t)},Lm.prototype._createMarkerEventArgs=function(t){var e=t.marker;return Bm({},{layer:this,layerIndex:this.map.layers.indexOf(this),marker:e,markerIndex:(this.items||[]).indexOf(e)},t)},Lm);function Lm(t,e){km.call(this,t,e),this._markerClickHandler=tv(this._markerClick,this),ev(this.element,"click",Rm,this._markerClickHandler),this.items=[],this._load(this._readData())}function Im(t,e){Am.call(this),this._domain=t,this._range=e;t=Math.sqrt(t[1])-Math.sqrt(t[0]),e=e[1]-e[0];this._ratio=e/t}e(Em,{zIndex:1e3,autoBind:!0,locationField:"location",titleField:"title"});(zm=b.Class)&&(Dm.__proto__=zm),((Dm.prototype=Object.create(zm&&zm.prototype)).constructor=Dm).prototype.destroy=function(){this.layer=null,this.unbindEvents(),this.hide()},Dm.prototype.addTo=function(t){this.layer=t.markers||t,this.layer.items.push(this),this.layer.update(this)},Dm.prototype.location=function(t){return t?(this.options.location=ky.create(t).toArray(),this.layer&&this.layer.update(this),this):ky.create(this.options.location)},Dm.prototype.showAt=function(t){this.render(),this.element.style.left=Ny(Math.round(t.x)),this.element.style.top=Ny(Math.round(t.y)),this.tooltip&&this.tooltip.popup&&this.tooltip.popup._position()},Dm.prototype.hide=function(){this.element&&(this.element.remove(),this.element=null),this.tooltip&&(this.tooltip.destroy(),this.tooltip=null)},Dm.prototype.bindEvents=function(){this.element&&(this._mouseEnterHandler=tv(this._mouseEnter,this),ev(this.element,Mm,Rm,this._mouseEnterHandler),this._mouseLeaveHandler=tv(this._mouseLeave,this),ev(this.element,Om,Rm,this._mouseLeaveHandler))},Dm.prototype.unbindEvents=function(){this.element&&(ov(this.element,Mm,this._mouseEnterHandler),ov(this.element,Om,this._mouseLeaveHandler))},Dm.prototype.render=function(){var t,e,o,i;this.element||(t=this.options,e=this.layer,it(o=document.createElement("span"),"k-marker k-icon k-i-marker-"+Fy(t.shape||"pin")),o.setAttribute("title",t.title),i=t.attributes||{},Object.keys(i).forEach(function(t){o.setAttributett(t,i[t])}),o._kendoNode=this,o.style.zIndex=t.zIndex,this.element=o,e&&e.element.appendChild(this.element),this.bindEvents(),this.renderTooltip())},Dm.prototype._mouseEnter=function(t){t=this._createEventArgs(t);this.layer._markerMouseEnter(t)},Dm.prototype._mouseLeave=function(t){t=this._createEventArgs(t);this.layer._markerMouseLeave(t)},Dm.prototype._createEventArgs=function(t){return{marker:this,originalEvent:t}},Dm.prototype.renderTooltip=function(){},Dm.create=function(t,e){return t instanceof Dm?t:new Dm(x({},e,t))};var zm,Vm=Dm,jm=Object.assign;function Dm(t){zm.call(this),this.options=t||{}}function Hm(t){window.requestAnimationFrame(t)}function Um(t){t.preventDefault()}(Nm=b.Class)&&(ix.__proto__=Nm),((ix.prototype=Object.create(Nm&&Nm.prototype)).constructor=ix).prototype.tick=function(){},ix.prototype.done=function(){},ix.prototype.onEnd=function(){},ix.prototype.onCancel=function(){},ix.prototype.start=function(){this.enabled()&&(this.done()?this.onEnd():(this._started=!0,Hm(this._tickProxy)))},ix.prototype.enabled=function(){return!0},ix.prototype.cancel=function(){this._started=!1,this.onCancel()},ix.prototype._tick=function(){this._started&&(this.tick(),this.done()?(this._started=!1,this.onEnd()):Hm(this._tickProxy))};var Fm,Nm,Ff=ix,Gm=((Fm=Ff)&&(ox.__proto__=Fm),((ox.prototype=Object.create(Fm&&Fm.prototype)).constructor=ox).prototype.done=function(){return this.timePassed()>=this.duration},ox.prototype.timePassed=function(){return Math.min(this.duration,nv()-this.startDate)},ox.prototype.moveTo=function(t){var e=this,o=e.movable;e.initial=o[e.axis],e.delta=t.location-e.initial,e.duration="number"==typeof t.duration?t.duration:300,e.tick=e._easeProxy(t.ease),e.startDate=nv(),e.start()},ox.prototype._easeProxy=function(t){var e=this;return function(){e.movable.moveAxis(e.axis,t(e.timePassed(),e.initial,e.delta,e.duration))}},ox.easeOutExpo=function(t,e,o,i){return t===i?e+o:o*(1-Math.pow(2,-10*t/i))+e},ox),Wm=Object.assign,Xm=800,qm=0,Ym="move",Zm="tap",Qm="doubleTap",Km="release",$m="gesturechange",Jm="gestureend",tx="gesturetap",ex={api:0,touch:0,mouse:9,pointer:9};function ox(t){Fm.call(this),jm(this,t)}function ix(){Nm.call(this);this._tickProxy=tv(this._tick,this),this._started=!1}function rx(t){var e,o,i,r=uv(),n=[],s=t.originalEvent||t,a=t.currentTarget,p=0;if(t.api)n.push({id:2,event:t,target:t.target,currentTarget:t.target,location:t,type:"api"});else if(t.type.match(/touch/))for(e=(o=s?s.changedTouches:[]).length;p<e;p++)i=o[p],n.push({location:i,event:t,target:i.target,currentTarget:a,id:i.identifier,type:"touch"});else r.pointers||r.msPointers?n.push({location:s,event:t,target:t.target,currentTarget:a,id:s.pointerId,type:"pointer"}):n.push({id:1,event:t,target:t.target,currentTarget:a,location:t,type:"mouse"});return n}(sx=b.Class)&&(lx.__proto__=sx),((lx.prototype=Object.create(sx&&sx.prototype)).constructor=lx).prototype.move=function(t){var e=this,o=t["page"+e.axis],i=nv(),r=i-e.timeStamp||1;!o&&this.invalidZeroEvents||(e.delta=o-e.location,e._updateLocationData(t),e.initialDelta=o-e.startLocation,e.velocity=e.delta/r,e.timeStamp=i)},lx.prototype._updateLocationData=function(t){var e=this.axis;this.location=t["page"+e],this.client=t["client"+e],this.screen=t["screen"+e]};var nx,sx,ax=lx,px=((nx=b.Class)&&(hx.__proto__=nx),((hx.prototype=Object.create(nx&&nx.prototype)).constructor=hx).prototype.press=function(){this._holdTimeout=setTimeout(tv(this._hold,this),this.userEvents.minHold),this._trigger("press",this.pressEvent)},hx.prototype._tap=function(t){var e=this;e.userEvents._clicks++,1===e.userEvents._clicks&&(e._clickTimeout=setTimeout(function(){1===e.userEvents._clicks?e._trigger(Zm,t):e._trigger(Qm,t),e.userEvents._clicks=0},300))},hx.prototype._hold=function(){this._trigger("hold",this.pressEvent)},hx.prototype.move=function(t){var e=this,o="api"!==t.type&&e.userEvents._shouldNotMove;if(!e._finished&&!o){if(e.x.move(t.location),e.y.move(t.location),!e._moved){if(e._withinIgnoreThreshold())return;if(mx.current&&mx.current!==e.userEvents)return e.dispose();e._start(t)}e._finished||e._trigger(Ym,t)}},hx.prototype.end=function(t){this.endTime=nv(),this._finished||(this._finished=!0,this._trigger(Km,t),this._moved?this._trigger("end",t):this.useClickAsTap||(this.supportDoubleTap?this._tap(t):this._trigger(Zm,t)),clearTimeout(this._holdTimeout),this.dispose())},hx.prototype.dispose=function(){var t=this.userEvents.touches||[],e=(this._finished=!0,this.pressEvent=null,clearTimeout(this._holdTimeout),t.indexOf(this));t.splice(e,1)},hx.prototype.skip=function(){this.dispose()},hx.prototype.cancel=function(){this.dispose()},hx.prototype.isMoved=function(){return this._moved},hx.prototype._start=function(t){clearTimeout(this._holdTimeout),this.startTime=nv(),this._moved=!0,this._trigger("start",t)},hx.prototype._trigger=function(t,e){var e=e.event,o={touch:this,x:this.x,y:this.y,target:this.target,event:e};this.userEvents.notify(t,o)&&e.preventDefault()},hx.prototype._withinIgnoreThreshold=function(){var t=this.x.initialDelta,e=this.y.initialDelta;return Math.sqrt(t*t+e*e)<=this.threshold},hx);function hx(t,e,o){nx.call(this),Wm(this,{x:new ax("X",o.location),y:new ax("Y",o.location),type:o.type,useClickAsTap:t.useClickAsTap,threshold:t.threshold||ex[o.type],userEvents:t,target:e,currentTarget:o.currentTarget,initialTouch:o.target,id:o.id,pressEvent:o,_clicks:t._clicks,supportDoubleTap:t.supportDoubleTap,_moved:!1,_finished:!1})}function lx(t,e){sx.call(this);this.support=uv(),this.invalidZeroEvents=this.support.mobileOS&&this.support.mobileOS.android,this.axis=t,this._updateLocationData(e),this.startLocation=this.location,this.velocity=this.delta=0,this.timeStamp=nv()}function cx(t){for(var e=cv(navigator.userAgent).up.split(" "),o=0,i=e.length;o<i;o++)t(e[o])}(vx=mf)&&(Rx.__proto__=vx),((Rx.prototype=Object.create(vx&&vx.prototype)).constructor=Rx).prototype.preventIfMoving=function(t){this._isMoved()&&t.preventDefault()},Rx.prototype.destroy=function(){var e,o=this,t=this.options,i=this.element;o._destroyed||(o._destroyed=!0,o.captureUpIfMoved&&this.support.eventCapture&&(e=o.surface,cx(function(t){e.removeEventListener(t,o.preventIfMoving)})),ov(o.surface,iv("move"),this._surfaceMoveHandler),ov(o.surface,iv("up cancel"),this._surfaceEndHandler),ov(i,iv("down"),this._elementStartHandler),o.useClickAsTap&&ov(i,iv("click"),this._elementClickHandler),t.preventDragEvent&&ov(i,iv("dragstart"),this._elementDragStartHandler),ov(i,iv("mousedown"),this._elementSelectHandler),o._disposeAll(),o.unbind(),delete o.surface,delete o.element,delete o.currentTarget)},Rx.prototype.capture=function(){Rx.current=this},Rx.prototype.cancel=function(){this._disposeAll(),this.trigger("cancel")},Rx.prototype.notify=function(t,e){var o,i,r,n,s=this.touches,a=t;if(this._isMultiTouch()){switch(a){case Ym:a=$m;break;case"end":a=Jm;break;case Zm:a=tx}Wm(e,{touches:s},(t=s[0],s=s[1],o=t.x.location,t=t.y.location,r=o-(i=s.x.location),n=t-(s=s.y.location),{center:{x:(o+i)/2,y:(t+s)/2},distance:Math.sqrt(r*r+n*n)}))}return this.trigger(a,Wm(e,{type:a}))},Rx.prototype.press=function(t,e,o){this._apiCall("_start",t,e,o)},Rx.prototype.move=function(t,e){this._apiCall("_move",t,e)},Rx.prototype.end=function(t,e){this._apiCall("_end",t,e)},Rx.prototype._isMultiTouch=function(){return 1<this.touches.length},Rx.prototype._maxTouchesReached=function(){return this.touches.length>=this._maxTouches},Rx.prototype._disposeAll=function(){for(var t=this.touches;0<t.length;)t.pop().dispose()},Rx.prototype._isMoved=function(){return Ct(this.touches,function(t){return t.isMoved()}).length},Rx.prototype._select=function(t){this.allowSelection&&!this.trigger("select",{event:t})||t.preventDefault()},Rx.prototype._start=function(t){var e,o,i=this,r=0,n=i.filter,s=rx(t),a=s.length,p=t.which;if(!(p&&1<p||i._maxTouchesReached()))for(Rx.current=null,i.currentTarget=t.currentTarget,i.stopPropagation&&t.stopPropagation();r<a&&!i._maxTouchesReached();r++)o=s[r],(e=n?o.currentTarget:i.element)&&0===e.length||(o=new px(i,e,o),i.touches.push(o),o.press(),i._isMultiTouch()&&i.notify("gesturestart",{}))},Rx.prototype._move=function(t){this._eachTouch("move",t)},Rx.prototype._end=function(t){this._eachTouch("end",t)},Rx.prototype._click=function(t){var e={touch:{initialTouch:t.target,target:t.currentTarget,endTime:nv(),x:{location:t.pageX,client:t.clientX},y:{location:t.pageY,client:t.clientY}},x:t.pageX,y:t.pageY,target:t.currentTarget,event:t,type:"tap"};this.trigger("tap",e)&&t.preventDefault()},Rx.prototype._eachTouch=function(t,e){for(var o,i,r,n={},s=rx(e),a=this.touches,p=0;p<a.length;p++)n[(o=a[p]).id]=o;for(p=0;p<s.length;p++)(r=n[(i=s[p]).id])&&r[t](i)},Rx.prototype._apiCall=function(t,e,o,i){this[t]({api:!0,pageX:e,pageY:o,clientX:e,clientY:o,target:i||this.element,stopPropagation:sv,preventDefault:sv})},Rx.defaultThreshold=function(t){qm=t},Rx.minHold=function(t){Xm=t};var ux,dx,fx,gx,yx,vx,mx=Rx,xx=Object.assign,_x=Math.abs,bx="change",wx=((yx=Ff)&&(Bx.__proto__=yx),((Bx.prototype=Object.create(yx&&yx.prototype)).constructor=Bx).prototype.enabled=function(){return this.movable.scale<this.dimensions.minScale},Bx.prototype.done=function(){return this.dimensions.minScale-this.movable.scale<.01},Bx.prototype.tick=function(){var t=this.movable;t.scaleWith(1.1),this.dimensions.rescale(t.scale)},Bx.prototype.onEnd=function(){var t=this.movable;t.scaleTo(this.dimensions.minScale),this.dimensions.rescale(t.scale)},Bx),Cx=((gx=Ff)&&(Ox.__proto__=gx),((Ox.prototype=Object.create(gx&&gx.prototype)).constructor=Ox).prototype.onCancel=function(){this.transition.cancel()},Ox.prototype.freeze=function(t){this.cancel(),this._moveTo(t)},Ox.prototype.onEnd=function(){this.paneAxis.outOfBounds()?this._snapBack():this._end()},Ox.prototype.done=function(){return _x(this.velocity)<1},Ox.prototype.start=function(t){var e=this;e.dimension.enabled&&(e.paneAxis.outOfBounds()?e.transition._started?(e.transition.cancel(),e.velocity=Math.min(t.touch[e.axis].velocity*e.velocityMultiplier,55),gx.prototype.start.call(this)):e._snapBack():(t=2===t.touch.id?0:t.touch[e.axis].velocity,e.velocity=Math.max(Math.min(t*e.velocityMultiplier,55),-55),e.tapCapture.captureNext(),gx.prototype.start.call(this)))},Ox.prototype.tick=function(){var t=this,e=t.dimension,o=t.paneAxis.outOfBounds()?.5:t.friction,o=t.velocity*=o,o=t.movable[t.axis]+o;!t.elastic&&e.outOfBounds(o)&&(o=Math.max(Math.min(o,e.max),e.min),t.velocity=0),t.movable.moveAxis(t.axis,o)},Ox.prototype._end=function(){this.tapCapture.cancelCapture(),this.end()},Ox.prototype._snapBack=function(){var t=this.dimension,t=this.movable[this.axis]>t.max?t.max:t.min;this._moveTo(t)},Ox.prototype._moveTo=function(t){this.transition.moveTo({location:t,duration:500,ease:Gm.easeOutExpo})},Ox),Sx=((fx=Ff)&&(Mx.__proto__=fx),((Mx.prototype=Object.create(fx&&fx.prototype)).constructor=Mx).prototype.tick=function(){this._updateCoordinates(),this.moveTo(this.origin)},Mx.prototype.done=function(){return _x(this.offset.y)<5&&_x(this.offset.x)<5},Mx.prototype.onEnd=function(){this.moveTo(this.destination),this.callback&&this.callback.call()},Mx.prototype.setCoordinates=function(t,e){this.offset={},this.origin=t,this.destination=e},Mx.prototype.setCallback=function(t){t&<(t)&&(this.callback=t)},Mx.prototype._updateCoordinates=function(){this.offset={x:(this.destination.x-this.origin.x)/4,y:(this.destination.y-this.origin.y)/4},this.origin={y:this.origin.y+this.offset.y,x:this.origin.x+this.offset.x}},Mx),kx=((dx=b.Class)&&(Tx.__proto__=dx),((Tx.prototype=Object.create(dx&&dx.prototype)).constructor=Tx).prototype.refresh=function(){var t=this.axis,e=this.dimension,o=e.size,i=this.scrollMovable,e=o/e.total,i=Math.round(-i[t]*e),r=Math.round(o*e);this.element.style.display=1<=e?"none":"",o<i+r?r=o-i:i<0&&(r+=i,i=0),this.elementSize!==r&&(this.element.style[this.size]=r+"px",this.elementSize=r),this.movable.moveAxis(t,i)},Tx.prototype.show=function(){this.element.style.opacity=.7,this.element.style.visibility="visible"},Tx.prototype.hide=function(){this.alwaysVisible||(this.element.style.opacity=0)},Tx),Ax=((ux=mf)&&(Px.__proto__=ux),((Px.prototype=Object.create(ux&&ux.prototype)).constructor=Px).prototype._initOptions=function(t){this.options=x({},this.options,t)},Px.prototype._wheelScroll=function(t){var e,o,i;t.ctrlKey||(this._wheel||(this._wheel=!0,this._wheelY=0,this.userEvents.press(0,this._wheelY)),clearTimeout(this._wheelTimeout),this._wheelTimeout=setTimeout(this._wheelEnd,50),o=t.originalEvent||t,i=o.wheelDeltaY,o.wheelDelta?void 0!==i&&!i||(e=o.wheelDelta):o.detail&&o.axis===o.VERTICAL_AXIS&&(e=10*-o.detail),e&&(this._wheelY+=e,this.userEvents.move(0,this._wheelY)),t.preventDefault())},Px.prototype.makeVirtual=function(){this.dimensions.y.makeVirtual()},Px.prototype.virtualSize=function(t,e){this.dimensions.y.virtualSize(t,e)},Px.prototype.height=function(){return this.dimensions.y.size},Px.prototype.scrollHeight=function(){return this.scrollElement.scrollHeight},Px.prototype.scrollWidth=function(){return this.scrollElement.scrollWidth},Px.prototype._resize=function(){this._native||this.contentResized()},Px.prototype.setOptions=function(t){this._initOptions(t),t.pullToRefresh&&this._initPullToRefresh()},Px.prototype.reset=function(){this._native?this.scrollElement.scrollTop(0):(this.movable.moveTo({x:0,y:0}),this._scale(1))},Px.prototype.contentResized=function(){this.dimensions.refresh(),this.pane.x.outOfBounds()&&this.movable.moveAxis("x",this.dimensions.x.min),this.pane.y.outOfBounds()&&this.movable.moveAxis("y",this.dimensions.y.min)},Px.prototype.zoomOut=function(){var t=this.dimensions;t.refresh(),this._scale(t.fitScale),this.movable.moveTo(t.centerCoordinates())},Px.prototype.enable=function(){this.enabled=!0},Px.prototype.disable=function(){this.enabled=!1},Px.prototype.scrollTo=function(t,e){this._native?(this.scrollElement.scrollLeft(_x(t)),this.scrollElement.scrollTop(_x(e))):(this.dimensions.refresh(),this.movable.moveTo({x:t,y:e}))},Px.prototype.animatedScrollTo=function(t,e,o){var i;this._native?this.scrollTo(t,e):(i={x:this.movable.x,y:this.movable.y},this.animatedScroller.setCoordinates(i,{x:t,y:e}),this.animatedScroller.setCallback(o),this.animatedScroller.start())},Px.prototype.pullHandled=function(){},Px.prototype.destroy=function(){var t=this.element;ov(t,"DOMMouseScroll mousewheel",this._wheelScrollHandler),this.userEvents&&this.userEvents.destroy()},Px.prototype._scale=function(t){this.dimensions.rescale(t),this.movable.scaleTo(t)},Px.prototype._initPullToRefresh=function(){},Px.prototype._dragEnd=function(){},Px.prototype._paneChange=function(){},Px.prototype._initAxis=function(t){var e=this,o=e.movable,i=e.dimensions[t],r=e.tapCapture,n=e.pane[t],s=new kx({axis:t,movable:o,dimension:i,container:e.element,alwaysVisible:e.options.visibleScrollHints});i.bind(bx,function(){s.refresh()}),n.bind(bx,function(){s.show()}),e[t+"inertia"]=new Cx({axis:t,paneAxis:n,movable:o,tapCapture:r,userEvents:e.userEvents,dimension:i,elastic:e.options.elastic,friction:e.options.friction||.96,velocityMultiplier:e.options.velocityMultiplier||10,end:function(){s.hide(),e.trigger("scrollEnd",{axis:t,scrollTop:e.scrollTop,scrollLeft:e.scrollLeft})}})},Px);function Px(t,e){ux.call(this);var s=this;this.element=t,this._initOptions(e);e=navigator.userAgent;e=(e=Qy(e)).ios||e.android,s._native=s.options.useNative&&e,e=Zy('<div class="km-scroll-header"/>');if(s._native)return it(t,"km-native-scroller"),Uy(e,t),void xx(s,{scrollElement:t,fixedContainer:t.children[0]});t.style.overflow="hidden",it(t,"km-scroll-wrapper");var o=t,i=Zy('<div class="km-scroll-container"/>');for(o.appendChild(i);o.firstChild!==i;)i.appendChild(o.firstChild);Uy(e,t);var e=t.children[1],r=new sm(t),n=new cm(e),a=new pm({element:e,container:t,forcedEnabled:s.options.zoom}),p=this.options.avoidScrolling,h=new mx(t,{touchAction:"pan-y",fastTap:!0,allowSelection:!0,preventDragEvent:!0,captureUpIfMoved:!0,multiTouch:s.options.zoom,supportDoubleTap:s.options.supportDoubleTap,start:function(t){a.refresh();var e=_x(t.x.velocity),o=_x(t.y.velocity),i=o<=2*e;r=s.fixedContainer,n=t.event.target;var r,n,e=e<=2*o;!(r===n||function(t){if(!n)return!1;for(var e=n.parentNode;null!==e;){if(e===t)return!0;e=e.parentNode}return!1}(r))&&!p(t)&&s.enabled&&(a.x.enabled&&i||a.y.enabled&&e)?h.capture():h.cancel()}}),l=new lm({movable:n,dimensions:a,userEvents:h,elastic:s.options.elastic}),c=new wx({movable:n,dimensions:a,userEvents:h,tapCapture:r}),u=new Sx({moveTo:function(t){s.scrollTo(t.x,t.y)}});n.bind(bx,function(){s.scrollTop=-n.y,s.scrollLeft=-n.x,s.trigger("scroll",{scrollTop:s.scrollTop,scrollLeft:s.scrollLeft})}),s.options.mousewheelScrolling&&(this._wheelScrollHandler=this._wheelScroll.bind(this),ev(t,"DOMMouseScroll mousewheel",this._wheelScrollHandler)),xx(s,{movable:n,dimensions:a,zoomSnapBack:c,animatedScroller:u,userEvents:h,pane:l,tapCapture:r,pulled:!1,enabled:!0,scrollElement:e,scrollTop:0,scrollLeft:0,fixedContainer:t.children[0]}),s._initAxis("x"),s._initAxis("y"),s._wheelEnd=function(){s._wheel=!1,s.userEvents.end(0,s._wheelY)},a.refresh(),s.options.pullToRefresh&&s._initPullToRefresh()}function Tx(t){dx.call(this);var e="x"===t.axis,o=Zy('<div class="km-touch-scrollbar km-'+(e?"horizontal":"vertical")+'-scrollbar" />');xx(this,t,{element:o,elementSize:0,movable:new cm(o),scrollMovable:t.movable,alwaysVisible:t.alwaysVisible,size:e?"width":"height"}),this.scrollMovable.bind(bx,this.refresh.bind(this)),this.container.appendChild(o),t.alwaysVisible&&this.show()}function Mx(t){fx.call(this,t),xx(this,t,{origin:{},destination:{},offset:{}})}function Ox(t){gx.call(this);var e=this;xx(e,t,{transition:new Gm({axis:t.axis,movable:t.movable,onEnd:function(){e._end()}})}),e.tapCapture.bind("press",function(){e.cancel()}),e.userEvents.bind("end",tv(e.start,e)),e.userEvents.bind("gestureend",tv(e.start,e)),e.userEvents.bind("tap",tv(e.onEnd,e))}function Bx(t){yx.call(this,t);xx(this,t),this.userEvents.bind("gestureend",this.start.bind(this)),this.tapCapture.bind("press",this.cancel.bind(this))}function Rx(t,e){vx.call(this);var o,i,r,n=this,s=uv(),a=(this.support=s,this.options=e=e||{},o=n.filter=e.filter,n.threshold=e.threshold||qm,n.minHold=e.minHold||Xm,n.touches=[],n._maxTouches=e.multiTouch?2:1,n.allowSelection=e.allowSelection,n.captureUpIfMoved=e.captureUpIfMoved,n.useClickAsTap=!e.fastTap&&!s.delayedClick(),n._clicks=0,n.supportDoubleTap=e.supportDoubleTap,!s.touch||s.mouseAndTouchPresent);Wm(n,{element:t,surface:e.global&&a?t.ownerDocument.documentElement:e.surface||t,stopPropagation:e.stopPropagation,pressed:!1}),this._surfaceMoveHandler=tv(this._move,this),ev(n.surface,iv("move"),this._surfaceMoveHandler),this._surfaceEndHandler=tv(this._end,this),ev(n.surface,iv("up cancel"),this._surfaceEndHandler),this._elementStartHandler=tv(this._start,this),ev(t,iv("down"),o,this._elementStartHandler),n.useClickAsTap&&(this._elementClickHandler=tv(this._click,this),ev(t,iv("click"),o,this._elementClickHandler)),(s.pointers||s.msPointers)&&(s.browser.version<11?(a="pinch-zoom double-tap-zoom",t.style["-ms-touch-action"]=e.touchAction&&"none"!==e.touchAction?a+" "+e.touchAction:a):t.style["touch-action"]=e.touchAction||"none"),e.preventDragEvent&&(this._elementDragStartHandler=Um,ev(t,iv("dragstart"),this._elementDragStartHandler)),this._elementSelectHandler=tv(this._select,this),ev(t,iv("mousedown"),o,this._elementSelectHandler),n.captureUpIfMoved&&s.eventCapture&&(i=n.surface,r=tv(n.preventIfMoving,n),cx(function(t){i.addEventListener(t,r,!0)})),n.bind(["press","hold",Zm,Qm,"start",Ym,"end",Km,"cancel","gesturestart",$m,Jm,tx,"select"],e)}e(Ax,{name:"Scroller",zoom:!1,pullOffset:140,visibleScrollHints:!1,elastic:!0,useNative:!1,mousewheelScrolling:!0,avoidScrolling:function(){return!1},pullToRefresh:!1,messages:{pullTemplate:"Pull to refresh",releaseTemplate:"Release to refresh",refreshTemplate:"Refreshing"}}),rv(Ax,["pull","scroll","resize"]);function Ex(t,e){this.sender=(e=void 0===e?{}:e).sender||t,this.widget=t,this.rtl=Boolean(e.rtl)}Ex.prototype.notify=function(t,e){this.widget&&this.widget.trigger(t,e)};const Lx=Ex;var Ix=Math,zx=Ix.min,Vx=Ix.pow,jx=b.geometry.Point,Dx="marker",Hx="DOMMouseScroll mousewheel",Ux={bubble:h,shape:If,tile:jf};function Fx(t){var e=[];if(t)for(var o=Fy(t).split("-"),i=0;i<o.length;i++)e.push("k-pos-"+o[i]);return e.join(" ")}Ux.marker=Em;(Nx=mf)&&(I.__proto__=Nx),((I.prototype=Object.create(Nx&&Nx.prototype)).constructor=I).prototype.destroy=function(){this.scroller.destroy(),this.navigator&&this.navigator.destroy(),this.attribution&&this.attribution.destroy(),this.zoomControl&&this.zoomControl.destroy(),ot(this.markers)?this.markers.forEach(function(t){t.destroy()}):this.markers.destroy();for(var t=0;t<this.layers.length;t++)this.layers[t].destroy();ov(this.element,Hx,this._mousewheelHandler),Nx.prototype.destroy.call(this)},I.prototype._init=function(t,e,o,i){void 0===e&&(e={}),void 0===o&&(o={}),void 0===i&&(i={}),this.support=uv(),this.context=i,this.initObserver(i),this.initServices(i),this._initOptions(e),this._setEvents(e),this.crs=new qy,this._initElement(t),this._viewOrigin=this._getOrigin(),this._initScroller(),this._initMarkers(),this._initControls(),this._initLayers(),this._reset(),this._mousewheelHandler=this._mousewheel.bind(this),ev(this.element,Hx,this._mousewheelHandler)},I.prototype._initOptions=function(t){this.options=x({},this.options,t)},I.prototype._initElement=function(t){it(this.element=t,"k-map"),t.style.position="relative",t.setAttribute("data-role","map"),Hy(t);t=Zy("<div />");this.element.appendChild(t)},I.prototype.initServices=function(t){void 0===t&&(t={}),this.widgetService=new Lx(this,t)},I.prototype.initObserver=function(t){void 0===t&&(t={}),this.observers=[],this.addObserver(t.observer)},I.prototype.addObserver=function(t){t&&this.observers.push(t)},I.prototype.removeObserver=function(t){t=this.observers.indexOf(t);0<=t&&this.observers.splice(t,1)},I.prototype.requiresHandlers=function(t){for(var e=this.observers,o=0;o<e.length;o++)if(e[o].requiresHandlers(t))return!0},I.prototype.trigger=function(t,e){for(var o=((e=void 0===e?{}:e).sender=this).observers,i=!1,r=0;r<o.length;r++)o[r].trigger(t,e)&&(i=!0);return i||Nx.prototype.trigger.call(this,t,e),i},I.prototype._notifyObserver=function(t,e){for(var o=((e=void 0===e?{}:e).sender=this).observers,i=!1,r=0;r<o.length;r++)o[r].trigger(t,e)&&(i=!0);return i},I.prototype.zoom=function(t){var e=this.options,t=P(t)?(t=Ix.round(_(t,e.minZoom,e.maxZoom)),e.zoom!==t&&(e.zoom=t,this._reset()),this):e.zoom;return t},I.prototype.center=function(t){t=t?(this.options.center=ky.create(t).toArray(),this._reset(),this):ky.create(this.options.center);return t},I.prototype.extent=function(t){t=t?(this._setExtent(t),this):this._getExtent();return t},I.prototype.setOptions=function(t){void 0===t&&(t={});var e=this.element;this.destroy(),Hy(e),this._init(e,t,{},this.context),this._reset()},I.prototype.locationToLayer=function(t,e){var o=!this.options.wraparound,t=ky.create(t);return this.crs.toPoint(t,this._layerSize(e),o)},I.prototype.layerToLocation=function(t,e){var o=!this.options.wraparound,t=jx.create(t);return this.crs.toLocation(t,this._layerSize(e),o)},I.prototype.locationToView=function(t){var t=ky.create(t),e=this.locationToLayer(this._viewOrigin);return this.locationToLayer(t).translateWith(e.scale(-1))},I.prototype.viewToLocation=function(t,e){var o=this.locationToLayer(this._getOrigin(),e),t=jx.create(t).clone().translateWith(o);return this.layerToLocation(t,e)},I.prototype.eventOffset=function(t){var e,o=Vt(this.element);return t=t.x&&t.x.location||t.y&&t.y.location?(e=t.x.location-o.left,t.y.location-o.top):(t=t.originalEvent||t,e=M(t.pageX,t.clientX)-o.left,M(t.pageY,t.clientY)-o.top),new b.geometry.Point(e,t)},I.prototype.eventToView=function(t){t=this.eventOffset(t);return this.locationToView(this.viewToLocation(t))},I.prototype.eventToLayer=function(t){return this.locationToLayer(this.eventToLocation(t))},I.prototype.eventToLocation=function(t){t=this.eventOffset(t);return this.viewToLocation(t)},I.prototype.viewSize=function(){var t=this.element,e=this._layerSize(),o=t.clientWidth;return{width:o=this.options.wraparound?o:zx(e,o),height:zx(e,t.clientHeight)}},I.prototype.exportVisual=function(){return this._reset(),!1},I.prototype._setOrigin=function(t,e){var o=this.viewSize(),t=this._origin=ky.create(t);return(t=this.locationToLayer(t,e)).x+=o.width/2,t.y+=o.height/2,this.options.center=this.layerToLocation(t,e).toArray(),this},I.prototype._getOrigin=function(t){var e=this.viewSize();return!t&&this._origin||((t=this.locationToLayer(this.center())).x-=e.width/2,t.y-=e.height/2,this._origin=this.layerToLocation(t)),this._origin},I.prototype._setExtent=function(t){var e=Rv.create(t),o=e.se.clone(),i=(this.options.wraparound&&o.lng<0&&0<t.nw.lng&&(o.lng=180+(180+o.lng)),new Rv(e.nw,o));this.center(i.center());for(var r=this.element.clientWidth,n=this.element.clientHeight,s=this.options.maxZoom;s>=this.options.minZoom;s--){var a=this.locationToLayer(i.nw,s),p=this.locationToLayer(i.se,s),h=Ix.abs(p.x-a.x),p=Ix.abs(p.y-a.y);if(h<=r&&p<=n)break}this.zoom(s)},I.prototype._getExtent=function(){var t=this._getOrigin(),e=this.locationToLayer(t),o=this.viewSize(),o=(e.x+=o.width,e.y+=o.height,this.layerToLocation(e));return new Rv(t,o)},I.prototype._zoomAround=function(t,e){this._setOrigin(this.layerToLocation(t,e),e),this.zoom(e)},I.prototype._initControls=function(){var t=this.options.controls;t.attribution&&this._createAttribution(t.attribution),this.support.mobileOS||(t.navigator&&this._createNavigator(t.navigator),t.zoom&&this._createZoomControl(t.zoom))},I.prototype._createControlElement=function(t,e){var o,t=t.position||e,e="."+Fx(t).replace(" ","."),e=this.element.querySelector(".k-map-controls"+e)||[],t=(0===e.length&&(it(o=document.createElement("div"),"k-map-controls "+Fx(t)),this.element.appendChild(e=o)),document.createElement("div"));return e.appendChild(t),t},I.prototype._createAttribution=function(t){var e=this._createControlElement(t,"bottomRight");this.attribution=new yv(e,t)},I.prototype._createNavigator=function(t){var e=this._createControlElement(t,"topLeft"),e=this.navigator=new wv(e,t);this._navigatorPan=this._navigatorPan.bind(this),e.bind("pan",this._navigatorPan),this._navigatorCenter=this._navigatorCenter.bind(this),e.bind("center",this._navigatorCenter)},I.prototype._navigatorPan=function(t){var e=this.scroller,o=e.scrollLeft+t.x,e=e.scrollTop-t.y,t=this._virtualSize,i=this.element.clientWidth,r=this.element.clientHeight,o=_(o,t.x.min,t.x.max-i),e=_(e,t.y.min,t.y.max-r);this.scroller.one("scroll",tv(this._scrollEnd,this)),this.scroller.scrollTo(-o,-e)},I.prototype._navigatorCenter=function(){this.center(this.options.center)},I.prototype._createZoomControl=function(t){var e=this._createControlElement(t,"topLeft"),e=this.zoomControl=new Av(e,t);this._zoomControlChange=this._zoomControlChange.bind(this),e.bind("change",this._zoomControlChange)},I.prototype._zoomControlChange=function(t){this.trigger("zoomStart",{originalEvent:t})||(this.zoom(this.zoom()+t.delta),this.trigger("zoomEnd",{originalEvent:t}))},I.prototype._initScroller=function(){var t=this.support.mobileOS?.93:.9,e=!1!==this.options.zoomable,t=this.scroller=new Ax(this.element.children[0],{friction:t,velocityMultiplier:5,zoom:e,mousewheelScrolling:!1,supportDoubleTap:!0});t.bind("scroll",tv(this._scroll,this)),t.bind("scrollEnd",tv(this._scrollEnd,this)),t.userEvents.bind("gesturestart",tv(this._scaleStart,this)),t.userEvents.bind("gestureend",tv(this._scale,this)),t.userEvents.bind("doubleTap",tv(this._doubleTap,this)),t.userEvents.bind("tap",tv(this._tap,this)),this.scrollElement=t.scrollElement},I.prototype._initLayers=function(){for(var t=this.options.layers,e=this.layers=[],o=0;o<t.length;o++){var i=t[o],i=this._createLayer(i);e.push(i)}},I.prototype._createLayer=function(t){var e=t.type||"shape",o=this.options.layerDefaults[e],o=x({},e===Dx?this.options.markerDefaults:o,t),t=new Ux[e](this,o);return e===Dx&&(this.markers=t),t},I.prototype._initMarkers=function(){0<(this.options.layers||[]).filter(function(t){return t&&t.type===Dx}).length||(this.markers=new Em(this,this.options.markerDefaults),this.markers.add(this.options.markers))},I.prototype._scroll=function(t){var e=this.locationToLayer(this._viewOrigin).round(),o=t.sender.movable,o=new b.geometry.Point(o.x,o.y).scale(-1).scale(1/o.scale);e.x+=o.x,e.y+=o.y,this._scrollOffset=o,this._setOrigin(this.layerToLocation(e)),this.trigger("pan",{originalEvent:t,origin:this._getOrigin(),center:this.center()})},I.prototype._scrollEnd=function(t){this._scrollOffset&&this._panComplete()&&(this._scrollOffset=null,this._panEndTimestamp=nv(),this.trigger("panEnd",{originalEvent:t,origin:this._getOrigin(),center:this.center()}))},I.prototype._panComplete=function(){return 50<nv()-(this._panEndTimestamp||0)},I.prototype._scaleStart=function(t){this.trigger("zoomStart",{originalEvent:t})&&(t=t.touches[1])&&t.cancel()},I.prototype._scale=function(t){var e=this.scroller.movable.scale,e=this._scaleToZoom(e),o=new b.geometry.Point(t.center.x,t.center.y),i=this.viewToLocation(o,e),i=this.locationToLayer(i,e).translate(-o.x,-o.y);this._zoomAround(i,e),this.trigger("zoomEnd",{originalEvent:t})},I.prototype._scaleToZoom=function(t){t=this._layerSize()*t/this.options.minSize,t=Ix.log(t)/Ix.log(2);return Ix.round(t)},I.prototype._reset=function(){this.attribution&&this.attribution.filter(this.center(),this.zoom()),this._viewOrigin=this._getOrigin(!0),this._resetScroller(),this.trigger("beforeReset"),this.trigger("reset")},I.prototype._resetScroller=function(){var t=this.scroller,e=t.dimensions.x,o=t.dimensions.y,i=this._layerSize(),r=this.extent().nw,r=this.locationToLayer(r).round(),n=(t.movable.round=!0,t.reset(),t.userEvents.cancel(),this.zoom()),t=(t.dimensions.forcedMinScale=Vx(2,this.options.minZoom-n),t.dimensions.maxScale=Vx(2,this.options.maxZoom-n),{min:-r.x,max:i-r.x}),n={min:-r.y,max:i-r.y};this.options.wraparound&&(t.max=20*i,t.min=-t.max),!1===this.options.pannable&&(r=this.viewSize(),t.min=n.min=0,t.max=r.width,n.max=r.height),e.makeVirtual(),o.makeVirtual(),e.virtualSize(t.min,t.max),o.virtualSize(n.min,n.max),this._virtualSize={x:t,y:n}},I.prototype._renderLayers=function(){},I.prototype._layerSize=function(t){t=M(t,this.options.zoom);return this.options.minSize*Vx(2,t)},I.prototype._tap=function(t){var e;this._panComplete()&&(e=this.eventOffset(t),this.trigger("click",{originalEvent:t,location:this.viewToLocation(e)}))},I.prototype._doubleTap=function(t){var e,o,i;!1===this.options.zoomable||this.trigger("zoomStart",{originalEvent:t})||(e=this.zoom()+1,o=this.eventOffset(t),i=this.viewToLocation(o),i=this.locationToLayer(i,e).translate(-o.x,-o.y),this._zoomAround(i,e),this.trigger("zoomEnd",{originalEvent:t}))},I.prototype._mousewheel=function(t){t.preventDefault();var e=0<Rt(t)?-1:1,o=this.options,i=this.zoom(),e=_(i+e,o.minZoom,o.maxZoom);!1===o.zoomable||e===i||this.trigger("zoomStart",{originalEvent:t})||(o=this.eventOffset(t),i=this.viewToLocation(o),i=this.locationToLayer(i,e).translate(-o.x,-o.y),this._zoomAround(i,e),this.trigger("zoomEnd",{originalEvent:t}))};var Nx,cc=I;function I(t,e,o,i){void 0===e&&(e={}),void 0===o&&(o={}),void 0===i&&(i={}),Nx.call(this),this._init(t,e,o,i)}e(cc,{name:"Map",controls:{attribution:!0,navigator:{panStep:100},zoom:!0},layers:[],layerDefaults:{shape:{style:{fill:{color:"#fff"},stroke:{color:"#aaa",width:.5}}},bubble:{style:{fill:{color:"#fff",opacity:.5},stroke:{color:"#aaa",width:.5}}},marker:{shape:"pinTarget",tooltip:{position:"top"}}},center:[0,0],zoom:3,minSize:256,minZoom:1,maxZoom:19,markers:[],markerDefaults:{shape:"pinTarget",tooltip:{position:"top"}},wraparound:!0,renderPointsAsMarkers:!1}),rv(cc,["beforeReset","click","markerActivate","markerClick","markerCreated","markerMouseEnter","markerMouseLeave","pan","panEnd","reset","shapeClick","shapeCreated","shapeFeatureCreated","shapeMouseEnter","shapeMouseLeave","zoomEnd","zoomStart"]);const Gx=cc;var Wx=1.5,Xx=.4,qx="#000",t="Arial, Helvetica, sans-serif",Yx="12px "+t,Zx="16px "+t,Qx="transparent",Kx="#fff",$x=function(){return{icon:{border:{width:1}},label:{font:Yx,padding:3},line:{length:10,width:2},visible:!0}},Jx=function(){return{outliersField:"",meanField:"",border:{_brightness:.8,width:1},downColor:Kx,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}}},t1=function(){return{gap:Wx,spacing:Xx,target:{color:"#ff0000"}}},e1=function(){return{gap:.5,line:{color:qx,width:1},spacing:Xx}},o1=function(t){return void 0===t&&(t={}),{axisDefaults:{labels:{font:Yx},notes:$x(),title:{font:Zx,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:Wx,spacing:Xx},boxPlot:Jx(),bubble:{border:{width:0},labels:{background:Qx},opacity:.6},bullet:t1(),candlestick:{border:{_brightness:.8,width:1},downColor:Kx,gap:1,highlight:{border:{opacity:1,width:2},line:{width:2}},line:{color:qx,width:1},spacing:.3},column:{gap:Wx,spacing:Xx},heatmap:{labels:{color:"",background:Qx,visible:!0},highlight:{border:{width:0}}},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:e1(),line:{width:2},notes:$x(),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:Wx,spacing:Xx},rangeColumn:{gap:Wx,spacing:Xx},scatterLine:{width:1},verticalArea:{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.4},verticalBoxPlot:Jx(),verticalBullet:t1(),verticalLine:{width:2},waterfall:e1()},title:{font:Zx},legend:{labels:{font:Yx}}}}})(),r1})())}}});
|
|
1
|
+
System.register("@progress/kendo-charts",["@progress/kendo-drawing"],function(rx){var n;return{setters:[function(t){n=t.__useDefault?t.default:t}],execute:function(){function i(t){if(r[t])return r[t].exports;var e=r[t]={i:t,l:!1,exports:{}};return o[t].call(e.exports,e,e.exports,i),e.l=!0,e.exports}var o,r;o=[function(t,e){t.exports=n},function(z,t,e){"use strict";e.r(t);var V={},j=(e.d(V,"NAVIGATOR_AXIS",function(){return Fl}),e.d(V,"NAVIGATOR_PANE",function(){return Ul}),"arc"),D="#000",w="bottom",C="center",H="circle",U="date",F=10,N=/\{\d+:?/,S="left",G=Number.MAX_VALUE,W=-Number.MAX_VALUE,X="none",k="right",q="string",A="top",Y="value",a="#fff",y="x",v="y";function Z(t){return Array.isArray(t)}function Q(t,e){for(var o=Z(e)?e:[e],i=0;i<o.length;i++){var r=o[i];-1===t.className.indexOf(r)&&(t.className+=" "+r)}}var K=/\s+/g;function $(t,e){t&&t.className&&(t.className=t.className.replace(e,"").replace(K," "))}var b=e(0);function J(t){var e=.5;t.options.stroke&&b.drawing.util.defined(t.options.stroke.width)&&t.options.stroke.width%2==0&&(e=0);for(var o=0;o<t.segments.length;o++)t.segments[o].anchor().round(0).translate(e,e);return t}function tt(t,e){return-t.x*e.y+t.y*e.x<0}function m(t){return"number"==typeof t&&!isNaN(t)}function et(t){return typeof t===q}function ot(t){return m(t)||et(t)&&isFinite(t)}function it(t){return"function"==typeof t}var rt="object",nt="undefined";function x(t){for(var e=arguments,o=arguments.length,i=1;i<o;i++)!function t(e,o){for(var i in o){var r,n=o[i],s=typeof n;(r=s===rt&&null!==n?n.constructor:null)&&r!==Array?n instanceof Date?e[i]=new Date(n.getTime()):it(n.clone)?e[i]=n.clone():(r=e[i],e[i]=typeof r===rt&&r||{},t(e[i],n)):s!==nt&&(e[i]=n)}}(t,e[i]);return t}function st(t){return"object"==typeof t}function at(t){return m(t)?t+"px":t}var ht=/width|height|top|left|bottom|right/i;function pt(t,e){var o=et(e)?[e]:e;if(Z(o)){for(var i={},r=window.getComputedStyle(t),n=0;n<o.length;n++){var s=o[n];i[s]=ht.test(s)?parseFloat(r[s]):r[s]}return i}if(st(e))for(var a in e)t.style[a]=at(e[a])}function P(t,e){void 0===e&&(e=0);var o={top:0,right:0,bottom:0,left:0};return"number"==typeof t?o[A]=o[k]=o[w]=o[S]=t:(o[A]=t[A]||e,o[k]=t[k]||e,o[w]=t[w]||e,o[S]=t[S]||e),o}function lt(){}var ct={compile:function(t){return t}},ut=(lt.register=function(t){ct=t},lt.compile=function(t){return ct.compile(t)},lt);function dt(t){var e;return(t=void 0===t?{}:t).template?t.template=e=ut.compile(t.template):it(t.content)&&(e=t.content),e}var ft=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g,gt={};function yt(t){if(gt[t])return gt[t];var r=[];return t.replace(ft,function(t,e,o,i){r.push(b.drawing.util.defined(e)?e:o||i)}),gt[t]=function(t){for(var e=t,o=0;o<r.length&&e;o++)e=e[r[o]];return e},gt[t]}function vt(t,e){for(var o=t.length,i=[],r=0;r<o;r++)e(t[r])&&i.push(t[r]);return i}function mt(t,e){if(t.className)for(var o=e.split(" "),i=0;i<o.length;i++)if(-1!==t.className.indexOf(o[i]))return!0}gt[void 0]=function(t){return t};function xt(){this._map={}}xt.prototype.get=function(t){return this._map[this._key(t)]},xt.prototype.set=function(t,e){this._map[this._key(t)]=e},xt.prototype._key=function(t){return t instanceof Date?t.getTime():t};var _t=xt;function u(t,e){if(e)return-1!==e.indexOf(t)}function bt(t,e,o){return b.drawing.util.round(t+(e-t)*o,3)}function wt(t,e){this.observer=t,this.handlerMap=x({},this.handlerMap,e)}wt.prototype.trigger=function(t,e){var o,i=this.observer,r=this.handlerMap;return r[t]?o=this.callObserver(r[t],e):i.trigger&&(o=this.callObserver("trigger",t,e)),o},wt.prototype.callObserver=function(t){for(var e=[],o=arguments.length-1;0<o--;)e[o]=arguments[o+1];return this.observer[t].apply(this.observer,e)},wt.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 Ct=wt;function St(t,e){for(var o=t.length,i=[],r=0;r<o;r++){var n=e(t[r]);b.drawing.util.defined(n)&&i.push(n)}return i}var kt=b.support.browser||{};function At(t){var e=0;return t.wheelDelta?(e=-t.wheelDelta/120,kt.webkit&&(e/=2*Math.max(window.devicePixelRatio,.625))):t.detail&&(e=t.detail/3),0<e?Math.ceil(e):Math.floor(e)}function Pt(){}var o=b.drawing.util,Tt=o.append,Mt=o.bindEvents,T=o.defined,Ot=o.deg,Bt=o.elementOffset,Rt=o.elementSize,Et=o.eventCoordinates,Lt=o.eventElement,It=o.hashKey,zt=o.last,_=o.limitValue,Vt=o.objectKey,jt=o.rad,M=o.round,Dt=o.unbindEvents,O=o.valueOrDefault,Ht=(Pt.fetchFonts=function(o,i,r){void 0===r&&(r={depth:0}),!o||5<r.depth||!document.fonts||Object.keys(o).forEach(function(t){var e=o[t];"dataSource"!==t&&"$"!==t[0]&&e&&("font"===t?i.push(e):"object"==typeof e&&(r.depth++,Pt.fetchFonts(e,i,r),r.depth--))})},Pt.loadFonts=function(t,e){var o=[];if(0<t.length&&document.fonts){try{o=t.map(function(t){return document.fonts.load(t)})}catch(t){Object(b.logToConsole)(t)}Promise.all(o).then(e,e)}else e()},Pt.preloadFonts=function(t,e){var o=[];Pt.fetchFonts(t,o),Pt.loadFonts(o,e)},Pt);function i(t,e){t=t.prototype;t.options?t.options=x({},t.options,e):t.options=e}function Ut(t){for(var e=G,o=W,i=0,r=t.length;i<r;i++){var n=t[i];null!==n&&isFinite(n)&&(e=Math.min(e,n),o=Math.max(o,n))}return{min:e===G?void 0:e,max:o===W?void 0:o}}function Ft(t,e){for(var o=0;o<t.length;o++){var i=t[o];if(e(i,o,t))return i}}var Nt=b.geometry.Matrix,Gt=/matrix\((.*)\)/;function Wt(t){var t=getComputedStyle(t).transform;return"none"===t?Nt.unit():(t=t.match(Gt),null===t||2!==t.length?Nt.unit():(t=t[1].split(",").map(function(t){return parseFloat(t)}),new(Function.prototype.bind.apply(Nt,[null].concat(t)))))}function Xt(t){if(!t)return Nt.unit();for(var e=Wt(t),o=t.parentElement;o;)var i=Wt(o),e=e.multiplyCopy(i),o=o.parentElement;return e.b=e.c=e.e=e.f=0,e}function qt(t){return new b.Color(t).isDark()?a:D}function Yt(t){this._index={},this._values=t?t.slice(0):[];for(var e=0;e<this._values.length;e++)this._index[this._values[e]]=e}function Zt(t){this._set=new Set(t)}var Qt={},o={size:{configurable:!0}},o=(Yt.prototype.values=function(){return this._values.filter(function(t){return t!==Qt})},Yt.prototype.has=function(t){return void 0!==this._index[t]},Yt.prototype.add=function(t){this.has(t)||(this._index[t]=this._values.length,this._values.push(t))},Yt.prototype.delete=function(t){var e=this._index[t];void 0!==e&&(this._values[e]=Qt,delete this._index[t])},Yt.prototype.clear=function(){this._index={},this._values=[]},o.size.get=function(){return this._values.length},Object.defineProperties(Yt.prototype,o),{size:{configurable:!0}});Zt.prototype.values=function(){return Array.from(this._set)},Zt.prototype.has=function(t){return this._set.has(t)},Zt.prototype.add=function(t){this._set.add(t)},Zt.prototype.delete=function(t){this._set.delete(t)},Zt.prototype.clear=function(){this._set.clear()},o.size.get=function(){return this._set.size},Object.defineProperties(Zt.prototype,o);function Kt(t){return e=!1,new((e="function"==typeof Set?new Set([1]).has(1):e)?Zt:Yt)(t);var e}function $t(t){throw t}var Jt={INSERT:45,DELETE:46,BACKSPACE:8,TAB:9,ENTER:13,ESC:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,END:35,HOME:36,SPACEBAR:32,PAGEUP:33,PAGEDOWN:34,F2:113,F10:121,F12:123,NUMPAD_PLUS:107,NUMPAD_MINUS:109,NUMPAD_DOT:110};function te(t,e){t=M(e-t,9);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=M(t/e,F);return M(e*(t<1.904762?.2:t<4.761904?.5:t<9.523809?1:2),F)}(ee=b.Class)&&(oe.__proto__=ee),((oe.prototype=Object.create(ee&&ee.prototype)).constructor=oe).prototype.clone=function(){return new oe(this.x,this.y)},oe.prototype.equals=function(t){return t&&this.x===t.x&&this.y===t.y},oe.prototype.rotate=function(t,e){var e=jt(e),o=Math.cos(e),e=Math.sin(e),i=t.x,t=t.y,r=this.x,n=this.y;return this.x=M(i+(r-i)*o+(n-t)*e,3),this.y=M(t+(n-t)*o-(r-i)*e,3),this},oe.prototype.multiply=function(t){return this.x*=t,this.y*=t,this},oe.prototype.distanceTo=function(t){var e=this.x-t.x,t=this.y-t.y;return Math.sqrt(e*e+t*t)},oe.onCircle=function(t,e,o){e=jt(e);return new oe(t.x-o*Math.cos(e),t.y-o*Math.sin(e))};var ee,B=oe;function oe(t,e){ee.call(this),this.x=t||0,this.y=e||0}function ie(t,e,o,i,r){r=jt(r);return new B(o+(t-o)*Math.cos(r)+(e-i)*Math.sin(r),i-(t-o)*Math.sin(r)+(e-i)*Math.cos(r))}(re=b.Class)&&(ne.__proto__=re),((ne.prototype=Object.create(re&&re.prototype)).constructor=ne).prototype.equals=function(t){return this.x1===t.x1&&this.x2===t.x2&&this.y1===t.y1&&this.y2===t.y2},ne.prototype.width=function(){return this.x2-this.x1},ne.prototype.height=function(){return this.y2-this.y1},ne.prototype.translate=function(t,e){return this.x1+=t,this.x2+=t,this.y1+=e,this.y2+=e,this},ne.prototype.move=function(t,e){var o=this.height(),i=this.width();return T(t)&&(this.x1=t,this.x2=this.x1+i),T(e)&&(this.y1=e,this.y2=this.y1+o),this},ne.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},ne.prototype.wrapPoint=function(t){var e=Z(t),o=e?t[0]:t.x,e=e?t[1]:t.y;return this.wrap(new ne(o,e,o,e)),this},ne.prototype.snapTo=function(t,e){return e!==y&&e||(this.x1=t.x1,this.x2=t.x2),e!==v&&e||(this.y1=t.y1,this.y2=t.y2),this},ne.prototype.alignTo=function(t,e){var o,i,r=this.height(),n=this.width(),s=e===A||e===w?v:y,a=s==v?r:n;return e===C?(o=t.center(),i=this.center(),this.x1+=o.x-i.x,this.y1+=o.y-i.y):this[s+1]=e===A||e===S?t[s+1]-a:t[s+2],this.x2=this.x1+n,this.y2=this.y1+r,this},ne.prototype.shrink=function(t,e){return this.x2-=t,this.y2-=e,this},ne.prototype.expand=function(t,e){return this.shrink(-t,-e),this},ne.prototype.pad=function(t){t=P(t);return this.x1-=t.left,this.x2+=t.right,this.y1-=t.top,this.y2+=t.bottom,this},ne.prototype.unpad=function(t){t=P(t);return t.left=-t.left,t.top=-t.top,t.right=-t.right,t.bottom=-t.bottom,this.pad(t)},ne.prototype.clone=function(){return new ne(this.x1,this.y1,this.x2,this.y2)},ne.prototype.center=function(){return new B(this.x1+this.width()/2,this.y1+this.height()/2)},ne.prototype.containsPoint=function(t){return t.x>=this.x1&&t.x<=this.x2&&t.y>=this.y1&&t.y<=this.y2},ne.prototype.points=function(){return[new B(this.x1,this.y1),new B(this.x2,this.y1),new B(this.x2,this.y2),new B(this.x1,this.y2)]},ne.prototype.getHash=function(){return[this.x1,this.y1,this.x2,this.y2].join(",")},ne.prototype.overlaps=function(t){return!(t.y2<this.y1||this.y2<t.y1||t.x2<this.x1||this.x2<t.x1)},ne.prototype.rotate=function(t){var e=this.width(),o=this.height(),i=this.center(),r=i.x,i=i.y,n=ie(0,0,r,i,t),s=ie(e,0,r,i,t),a=ie(e,o,r,i,t),r=ie(0,o,r,i,t),e=Math.max(n.x,s.x,a.x,r.x)-Math.min(n.x,s.x,a.x,r.x),o=Math.max(n.y,s.y,a.y,r.y)-Math.min(n.y,s.y,a.y,r.y);return this.x2=this.x1+e,this.y2=this.y1+o,this},ne.prototype.toRect=function(){return new b.geometry.Rect([this.x1,this.y1],[this.width(),this.height()])},ne.prototype.hasSize=function(){return 0!==this.width()&&0!==this.height()},ne.prototype.align=function(t,e,o){var i=e+1,r=e+2,e=e===y?"width":"height",n=this[e]();u(o,[S,A])?(this[i]=t[i],this[r]=this[i]+n):u(o,[k,w])?(this[r]=t[r],this[i]=this[r]-n):o===C&&(this[i]=t[i]+(t[e]()-n)/2,this[r]=this[i]+n)};var re,R=ne;function ne(t,e,o,i){re.call(this),this.x1=t||0,this.y1=e||0,this.x2=o||0,this.y2=i||0}function se(t,e){return t-e}(pe=b.Class)&&(fe.__proto__=pe),((fe.prototype=Object.create(pe&&pe.prototype)).constructor=fe).prototype.clone=function(){return new fe(this.center,this.innerRadius,this.radius,this.startAngle,this.angle)},fe.prototype.middle=function(){return this.startAngle+this.angle/2},fe.prototype.setRadius=function(t,e){return e?this.innerRadius=t:this.radius=t,this},fe.prototype.point=function(t,e){var t=jt(t),o=Math.cos(t),t=Math.sin(t),e=e?this.innerRadius:this.radius,o=M(this.center.x-o*e,3),t=M(this.center.y-t*e,3);return new B(o,t)},fe.prototype.adjacentBox=function(t,e,o){var t=this.clone().expand(t),i=t.middle(),t=t.point(i),r=e/2,n=o/2,s=Math.sin(jt(i)),i=Math.cos(jt(i)),a=t.x-r,t=t.y-n;return Math.abs(s)<.9&&(a+=r*-i/Math.abs(i)),Math.abs(i)<.9&&(t+=n*-s/Math.abs(s)),new R(a,t,a+e,t+o)},fe.prototype.containsPoint=function(t){var e=this.center,o=this.innerRadius,i=this.radius,r=this.startAngle,n=this.startAngle+this.angle,s=t.x-e.x,t=t.y-e.y,a=new B(s,t),r=this.point(r),r=new B(r.x-e.x,r.y-e.y),n=this.point(n),n=new B(n.x-e.x,n.y-e.y),e=M(s*s+t*t,3);return(r.equals(a)||tt(r,a))&&!tt(n,a)&&o*o<=e&&e<=i*i},fe.prototype.getBBox=function(){for(var t=new R(G,G,W,W),e=M(this.startAngle%360),o=M((e+this.angle)%360),i=this.innerRadius,r=[0,90,180,270,e,o].sort(se),n=r.indexOf(e),s=r.indexOf(o),a=e===o?r:n<s?r.slice(n,s+1):[].concat(r.slice(0,s+1),r.slice(n,r.length)),h=0;h<a.length;h++){var p=this.point(a[h]);t.wrapPoint(p),t.wrapPoint(p,i)}return i||t.wrapPoint(this.center),t},fe.prototype.expand=function(t){return this.radius+=t,this};var ae,he,pe,le=fe,ce=((he=le)&&(de.__proto__=he),((de.prototype=Object.create(he&&he.prototype)).constructor=de).prototype.expand=function(t){return he.prototype.expand.call(this,t)},de.prototype.clone=function(){return new de(this.center,this.radius,this.startAngle,this.angle)},de.prototype.setRadius=function(t){return this.radius=t,this},de),o=((ae=b.Class)&&(ue.__proto__=ae),((ue.prototype=Object.create(ae&&ae.prototype)).constructor=ue).prototype.createRing=function(t,e){var o=t.startAngle+180,i=t.angle+o,r=(0<t.angle&&o===i&&(i+=.001),new b.geometry.Point(t.center.x,t.center.y)),n=Math.max(t.radius,0),t=Math.max(t.innerRadius,0),n=new b.geometry.Arc(r,{startAngle:o,endAngle:i,radiusX:n,radiusY:n}),e=b.drawing.Path.fromArc(n,e).close();return t?(n.radiusX=n.radiusY=t,n=n.pointAt(i),e.lineTo(n.x,n.y),e.arc(i,o,t,t,!0)):e.lineTo(r.x,r.y),e},ue);function ue(){ae.apply(this,arguments)}function de(t,e,o,i){he.call(this,t,0,e,o,i)}function fe(t,e,o,i,r){pe.call(this),this.center=t,this.innerRadius=e,this.radius=o,this.startAngle=i,this.angle=r}o.current=new o;var ge,ye=o,o=((ge=b.Class)&&(ve.__proto__=ge),((ve.prototype=Object.create(ge&&ge.prototype)).constructor=ve).prototype.initUserOptions=function(t){return t},ve.prototype.reflow=function(t){for(var e,o=this.children,i=0;i<o.length;i++){var r=o[i];r.reflow(t),e=e?e.wrap(r.box):r.box.clone()}this.box=e||t},ve.prototype.destroy=function(){var t=this.children;this.animation&&this.animation.destroy();for(var e=0;e<t.length;e++)t[e].destroy()},ve.prototype.getRoot=function(){var t=this.parent;return t?t.getRoot():null},ve.prototype.getSender=function(){var t=this.getService();if(t)return t.sender},ve.prototype.getService=function(){for(var t=this;t;){if(t.chartService)return t.chartService;t=t.parent}},ve.prototype.translateChildren=function(t,e){for(var o=this.children,i=o.length,r=0;r<i;r++)o[r].box.translate(t,e)},ve.prototype.append=function(){for(var t=arguments,e=0;e<arguments.length;e++){var o=t[e];this.children.push(o),o.parent=this}},ve.prototype.renderVisual=function(){!1!==this.options.visible&&(this.createVisual(),this.addVisual(),this.renderChildren(),this.createAnimation(),this.renderComplete())},ve.prototype.addVisual=function(){this.visual&&((this.visual.chartElement=this).parent&&this.parent.appendVisual(this.visual))},ve.prototype.renderChildren=function(){for(var t=this.children,e=t.length,o=0;o<e;o++)t[o].renderVisual()},ve.prototype.createVisual=function(){this.visual=new b.drawing.Group({zIndex:this.options.zIndex,visible:O(this.options.visible,!0)})},ve.prototype.createAnimation=function(){this.visual&&this.options.animation&&(this.animation=b.drawing.Animation.create(this.visual,this.options.animation))},ve.prototype.appendVisual=function(t){t.chartElement||(t.chartElement=this),t.options.noclip?this.clipRoot().visual.append(t):T(t.options.zIndex)?this.stackRoot().stackVisual(t):this.isStackRoot?this.stackVisual(t):this.visual?this.visual.append(t):this.parent.appendVisual(t)},ve.prototype.clipRoot=function(){return this.parent?this.parent.clipRoot():this},ve.prototype.stackRoot=function(){return this.parent?this.parent.stackRoot():this},ve.prototype.stackVisual=function(t){for(var e=t.options.zIndex||0,o=this.visual.children,i=o.length,r=0;r<i;r++){var n=o[r];if(O(n.options.zIndex,0)>e)break}this.visual.insert(r,t)},ve.prototype.traverse=function(t){for(var e=this.children,o=e.length,i=0;i<o;i++){var r=e[i];t(r),r.traverse&&r.traverse(t)}},ve.prototype.closest=function(t){for(var e=this,o=!1;e&&!o;)(o=t(e))||(e=e.parent);if(o)return e},ve.prototype.renderComplete=function(){},ve.prototype.hasHighlight=function(){var t=(this.options||{}).highlight;return!(!this.createHighlight||t&&!1===t.visible)},ve.prototype.toggleHighlight=function(t,e){var o=this,i=(this.options||{}).highlight||{},r=i.visual,n=this._highlight;if(!n){var s={fill:{color:a,opacity:e||.2},stroke:{color:a,width:1,opacity:e||.2}};if(r){if(!(n=this._highlight=r(Object.assign(this.highlightVisualArgs(),{createVisual:function(){return o.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);T(n.options.zIndex)||(n.options.zIndex=O(i.zIndex,this.options.zIndex)),this.appendVisual(n)}n.visible(t)},ve.prototype.createGradientOverlay=function(t,e,o){o=new b.drawing.Path(Object.assign({stroke:{color:"none"},fill:this.createGradient(o),closed:t.options.closed},e));return o.segments.elements(t.segments.elements()),o},ve.prototype.createGradient=function(t){if(this.parent)return this.parent.createGradient(t)},ve.prototype.supportsPointInactiveOpacity=function(){return!0},ve);function ve(t){ge.call(this),this.children=[],this.options=x({},this.options,this.initUserOptions(t))}o.prototype.options={};var me,r=o,o=((me=r)&&(xe.__proto__=me),((xe.prototype=Object.create(me&&me.prototype)).constructor=xe).prototype.reflow=function(t){function e(){i.align(t,y,r.align),i.align(t,v,r.vAlign),i.paddingBox=o.clone().unpad(p).unpad(c)}var o,i=this,r=this.options,n=r.width,s=r.height,a=r.shrinkToFit,h=n&&s,p=r.margin,l=r.padding,c=r.border.width,u=t.clone();h&&(u.x2=u.x1+n,u.y2=u.y1+s),a&&u.unpad(p).unpad(c).unpad(l),me.prototype.reflow.call(this,u),o=h?this.box=new R(0,0,n,s):this.box,a&&h?(e(),u=this.contentBox=this.paddingBox.clone().unpad(l)):(u=this.contentBox=o.clone(),o.pad(l).pad(c).pad(p),e()),this.translateChildren(o.x1-u.x1+p.left+c+l.left,o.y1-u.y1+p.top+c+l.top);for(var d=this.children,f=0;f<d.length;f++){var g=d[f];g.reflow(g.box)}},xe.prototype.align=function(t,e,o){this.box.align(t,e,o)},xe.prototype.hasBox=function(){var t=this.options;return t.border.width||t.background},xe.prototype.createVisual=function(){me.prototype.createVisual.call(this),this.options.visible&&this.hasBox()&&this.visual.append(b.drawing.Path.fromRect(this.paddingBox.toRect(),this.visualStyle()))},xe.prototype.visualStyle=function(){var t=this.options,e=t.border||{};return{stroke:{width:e.width,color:e.color,opacity:O(e.opacity,t.opacity),dashType:e.dashType},fill:{color:t.background,opacity:t.opacity},cursor:t.cursor}},xe);function xe(t){me.call(this,t),this.options.margin=P(this.options.margin),this.options.padding=P(this.options.padding)}i(o,{align:S,vAlign:A,margin:{},padding:{},border:{color:D,width:0},background:"",shrinkToFit:!1,width:0,height:0,visible:!0});var _e,be=o,o=((_e=be)&&(we.__proto__=_e),((we.prototype=Object.create(_e&&_e.prototype)).constructor=we).prototype.getElement=function(){var t=this.options,e=this.paddingBox,o=t.type,i=t.rotation,r=e.center(),n=e.width()/2,s=e.height()/2;if(!t.visible||!this.hasBox())return null;var a,h=this.visualStyle();return o===H?a=new b.drawing.Circle(new b.geometry.Circle([M(e.x1+n,3),M(e.y1+s,3)],Math.min(n,s)),h):"triangle"===o?a=b.drawing.Path.fromPoints([[e.x1+n,e.y1],[e.x1,e.y2],[e.x2,e.y2]],h).close():"cross"===o?((a=new b.drawing.MultiPath(h)).moveTo(e.x1,e.y1).lineTo(e.x2,e.y2),a.moveTo(e.x1,e.y2).lineTo(e.x2,e.y1)):(s=e.toRect(),"roundedRect"===o&&(n=O(t.borderRadius,s.width()/5),s.setCornerRadius(n)),a=b.drawing.Path.fromRect(s,h)),i&&a.transform(b.geometry.transform().rotate(-i,[r.x,r.y])),a.options.zIndex=t.zIndex,a},we.prototype.createElement=function(){var t=this,e=this.options.visual,o=this.pointData||{};return e?e({value:o.value,dataItem:o.dataItem,sender:this.getSender(),series:o.series,category:o.category,rect:this.paddingBox.toRect(),options:this.visualOptions(),createVisual:function(){return t.getElement()}}):this.getElement()},we.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}},we.prototype.createVisual=function(){this.visual=this.createElement()},we);function we(t,e){_e.call(this,t),this.pointData=e}i(o,{type:H,align:C,vAlign:C});var Ce=o,Se={glass:{type:"linear",rotation:0,stops:[{offset:0,color:a,opacity:0},{offset:.25,color:a,opacity:.3},{offset:1,color:a,opacity:0}]},sharpBevel:{type:"radial",stops:[{offset:0,color:a,opacity:.55},{offset:.65,color:a,opacity:0},{offset:.95,color:a,opacity:.25}]},roundedBevel:{type:"radial",stops:[{offset:.33,color:a,opacity:.06},{offset:.83,color:a,opacity:.2},{offset:.95,color:a,opacity:0}]},roundedGlass:{type:"radial",supportVML:!1,stops:[{offset:0,color:a,opacity:0},{offset:.5,color:a,opacity:.3},{offset:.99,color:a,opacity:0}]},sharpGlass:{type:"radial",supportVML:!1,stops:[{offset:0,color:a,opacity:.2},{offset:.15,color:a,opacity:.15},{offset:.17,color:a,opacity:.35},{offset:.85,color:a,opacity:.05},{offset:.87,color:a,opacity:.15},{offset:.99,color:a,opacity:0}]},bubbleShadow:{type:"radial",center:[.5,.5],radius:.5}};(ke=r)&&(Ae.__proto__=ke),((Ae.prototype=Object.create(ke&&ke.prototype)).constructor=Ae).prototype.reflow=function(){var t=this.options,e=this.children,o=new R(0,0,t.width,t.height);this.box=o.unpad(t.margin);for(var i=0;i<e.length;i++)e[i].reflow(o),o=function(t,e){if(t.x1===e.x1&&t.y1===e.y1&&t.x2===e.x2&&t.y2===e.y2)return e;var o=Math.min(t.x1,e.x1),i=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),h=Math.min(t.y2,e.y2),p=Math.max(t.y2,e.y2),l=[];return l[0]=new R(i,s,r,a),l[1]=new R(o,a,i,h),l[2]=new R(r,a,n,h),l[3]=new R(i,h,r,p),t.x1===o&&t.y1===s||e.x1===o&&e.y1===s?(l[4]=new R(o,s,i,a),l[5]=new R(r,h,n,p)):(l[4]=new R(r,s,n,a),l[5]=new R(o,h,i,p)),vt(l,function(t){return 0<t.height()&&0<t.width()})[0]}(o,e[i].box)||new R},Ae.prototype.createVisual=function(){this.visual=new b.drawing.Group,this.createBackground()},Ae.prototype.createBackground=function(){var t=this.options,e=t.border||{},o=this.box.clone().pad(t.margin).unpad(e.width),o=b.drawing.Path.fromRect(o.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(o)},Ae.prototype.getRoot=function(){return this},Ae.prototype.createGradient=function(t){var e,s,o=this.gradients,i=Vt(t),r=Se[t.gradient];return o[i]?e=o[i]:(s=Object.assign({},r,t),"linear"===r.type?e=new b.drawing.LinearGradient(s):(t.innerRadius&&(s.stops=function(){for(var t=s.stops,e=s.innerRadius/s.radius*100,o=t.length,i=[],r=0;r<o;r++){var n=Object.assign({},t[r]);n.offset=(n.offset*(100-e)+e)/100,i.push(n)}return i}()),(e=new b.drawing.RadialGradient(s)).supportVML=!1!==r.supportVML),o[i]=e),e},Ae.prototype.cleanGradients=function(){var t,e=this.gradients;for(t in e)e[t]._observers=[]},Ae.prototype.size=function(){var t=this.options;return new R(0,0,t.width,t.height)};var ke,o=Ae;function Ae(t){ke.call(this,t);t=this.options;t.width=parseInt(t.width,10),t.height=parseInt(t.height,10),this.gradients={}}i(o,{width:600,height:400,background:a,border:{color:D,width:0},margin:P(5),zIndex:-2});var Pe,Te=o,o=((Pe=r)&&(Me.__proto__=Pe),((Me.prototype=Object.create(Pe&&Pe.prototype)).constructor=Me).prototype._initDirection=function(){var t=this.options;t.vertical?(this.groupAxis=y,this.elementAxis=v,this.groupSizeField="width",this.elementSizeField="height",this.groupSpacing=t.spacing,this.elementSpacing=t.vSpacing):(this.groupAxis=v,this.elementAxis=y,this.groupSizeField="height",this.elementSizeField="width",this.groupSpacing=t.vSpacing,this.elementSpacing=t.spacing)},Me.prototype.reflow=function(t){this.box=t.clone(),this.reflowChildren()},Me.prototype.reflowChildren=function(){var t=this.box,e=this.elementAxis,o=this.groupAxis,i=this.elementSizeField,r=this.groupSizeField,n=this.groupOptions(),s=n.groups,a=n.groupsSize,n=n.maxGroupElementsSize,h=s.length,p=t[o+1]+this.alignStart(a,t[r]());if(h){for(var l=p,c=0;c<h;c++){for(var u=s[c],d=u.groupElements,f=t[e+1],g=d.length,y=0;y<g;y++){var v=d[y],m=this.elementSize(v),x=l+this.alignStart(m[r],u.groupSize),_=new R;_[o+1]=x,_[o+2]=x+m[r],_[e+1]=f,_[e+2]=f+m[i],v.reflow(_),f+=m[i]+this.elementSpacing}l+=u.groupSize+this.groupSpacing}t[o+1]=p,t[o+2]=p+a,t[e+2]=t[e+1]+n}},Me.prototype.alignStart=function(t,e){var o=0,i=this.options.align;return i===k||i===w?o=e-t:i===C&&(o=(e-t)/2),o},Me.prototype.groupOptions=function(){for(var t=this.box,e=this.children,o=this.elementSizeField,i=this.groupSizeField,r=this.elementSpacing,n=this.groupSpacing,s=M(t[o]()),a=e.length,h=[],p=0,l=0,c=0,u=0,d=[],f=0;f<a;f++){var g=e[f],y=(g.box||g.reflow(t),this.elementSize(g));this.options.wrap&&M(l+r+y[o])>s&&(h.push({groupElements:d,groupSize:p,groupElementsSize:l}),u=Math.max(u,l),c+=n+p,l=p=0,d=[]),p=Math.max(p,y[i]),0<l&&(l+=r),l+=y[o],d.push(g)}return h.push({groupElements:d,groupSize:p,groupElementsSize:l}),{groups:h,groupsSize:c+=p,maxGroupElementsSize:u=Math.max(u,l)}},Me.prototype.elementSize=function(t){return{width:t.box.width(),height:t.box.height()}},Me.prototype.createVisual=function(){},Me);function Me(t){Pe.call(this,t),this._initDirection()}i(o,{vertical:!0,wrap:!0,vSpacing:0,spacing:0});var Oe,Be=o,Re=b.drawing.Text,o=((Oe=r)&&(Ee.__proto__=Oe),((Ee.prototype=Object.create(Oe&&Oe.prototype)).constructor=Ee).prototype.reflow=function(t){var e=this.options,e=e.size=b.drawing.util.measureText(this.content,{font:e.font});this.baseline=e.baseline,this.box=new R(t.x1,t.y1,t.x1+e.width,t.y1+e.height)},Ee.prototype.createVisual=function(){var t=this.options,e=t.font,o=t.color,i=t.opacity,t=t.cursor;this.visual=new Re(this.content,this.box.toRect().topLeft(),{font:e,fill:{color:o,opacity:i},cursor:t})},Ee);function Ee(t,e){Oe.call(this,e),this.content=t,this.reflow(new R)}i(o,{font:"12px sans-serif",color:D});var Le=o;function Ie(t){var e=t.origin,t=t.bottomRight();return new R(e.x,e.y,t.x,t.y)}var ze,Ve,je=/\n/m,De=((Ve=be)&&(Ue.__proto__=Ve),((Ue.prototype=Object.create(Ve&&Ve.prototype)).constructor=Ue).prototype._initContainer=function(){var t=this.options,e=String(this.content).split(je),o=new Be({vertical:!0,align:t.align,wrap:!1}),i=x({},t,{opacity:1,animation:null});this.container=o,this.append(o);for(var r=0;r<e.length;r++){var n=new Le(e[r].trim(),i);o.append(n)}},Ue.prototype.reflow=function(t){var e,o=this.options,i=o.visual;this.container.options.align=o.align,i&&!this._boxReflow?((e=t).hasSize()||(this._boxReflow=!0,this.reflow(e),this._boxReflow=!1,e=this.box),(i=this.visual=i(this.visualContext(e)))&&(e=Ie(i.clippedBBox()||new b.geometry.Rect),i.options.zIndex=o.zIndex),this.box=this.contentBox=this.paddingBox=e):(Ve.prototype.reflow.call(this,t),o.rotation&&(i=P(o.margin),e=this.box.unpad(i),this.targetBox=t,this.normalBox=e.clone(),(e=this.rotate()).translate(i.left-i.right,i.top-i.bottom),this.rotatedBox=e.clone(),e.pad(i)))},Ue.prototype.createVisual=function(){var t=this.options;this.visual=new b.drawing.Group({transform:this.rotationTransform(),zIndex:t.zIndex,noclip:t.noclip}),this.hasBox()&&(t=b.drawing.Path.fromRect(this.paddingBox.toRect(),this.visualStyle()),this.visual.append(t))},Ue.prototype.renderVisual=function(){var t;this.options.visible&&(this.options.visual?((t=this.visual)&&!T(t.options.noclip)&&(t.options.noclip=this.options.noclip),this.addVisual(),this.createAnimation()):Ve.prototype.renderVisual.call(this))},Ue.prototype.visualContext=function(t){var e=this,o={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(o,this.data),o},Ue.prototype.getDefaultVisual=function(){this.createVisual(),this.renderChildren();var t=this.visual;return delete this.visual,t},Ue.prototype.rotate=function(){var t=this.options;return this.box.rotate(t.rotation),this.align(this.targetBox,y,t.align),this.align(this.targetBox,v,t.vAlign),this.box},Ue.prototype.rotationTransform=function(){var t=this.options.rotation;if(!t)return null;var e=this.normalBox.center(),o=e.x,e=e.y,i=this.rotatedBox.center();return b.geometry.transform().translate(i.x-o,i.y-e).rotate(t,[o,e])},Ue),o=((ze=r)&&(He.__proto__=ze),((He.prototype=Object.create(ze&&ze.prototype)).constructor=He).prototype.reflow=function(t){ze.prototype.reflow.call(this,t),this.box.snapTo(t,y)},He.buildTitle=function(t,e,o){var i,t="string"==typeof t?{text:t}:t;return(t=Object.assign({visible:!0},o,t))&&t.visible&&t.text&&(i=new He(t),e.append(i)),i},He);function He(t){ze.call(this,t),this.append(new De(this.options.text,Object.assign({},this.options,{vAlign:this.options.position})))}function Ue(t,e,o){Ve.call(this,e),this.content=t,this.data=o,this._initContainer(),!1!==this.options._autoReflow&&this.reflow(new R)}i(o,{color:D,position:A,align:C,margin:P(5),padding:P(5)});var Fe,Ne=o,o=((Fe=De)&&(Ge.__proto__=Fe),((Ge.prototype=Object.create(Fe&&Fe.prototype)).constructor=Ge).prototype.visualContext=function(t){t=Fe.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},Ge.prototype.click=function(t,e){t.trigger("axisLabelClick",{element:Lt(e),value:this.value,text:this.text,index:this.index,dataItem:this.dataItem,axis:this.parent.options})},Ge.prototype.rotate=function(){var t,e;return this.options.alignRotation!==C?(t=this.normalBox.toRect(),e=this.rotationTransform(),this.box=Ie(t.bbox(e.matrix()))):Fe.prototype.rotate.call(this),this.box},Ge.prototype.rotationTransform=function(){var t=this.options,e=t.rotation;if(!e)return null;if(t.alignRotation===C)return Fe.prototype.rotationTransform.call(this);var o=b.geometry.transform().rotate(e).matrix(),i=this.normalBox.toRect(),r=this.targetBox.toRect(),t=t.rotationOrigin||A,n=t===A||t===w?y:v,s=t===A||t===w?v:y,t=t===A||t===S?r.origin:r.bottomRight(),a=i.topLeft().transformCopy(o),h=i.topRight().transformCopy(o),p=i.bottomRight().transformCopy(o),i=i.bottomLeft().transformCopy(o),o=b.geometry.Rect.fromPoints(a,h,p,i),l={};l[s]=r.origin[s]-o.origin[s];var c,o=Math.abs(a[s]+l[s]-t[s]),t=Math.abs(h[s]+l[s]-t[s]),s=M(o,F)===M(t,F)?(c=a,h):t<o?(c=h,p):(c=a,i),t=c[n]+(s[n]-c[n])/2;return l[n]=r.center()[n]-t,b.geometry.transform().translate(l.x,l.y).rotate(e)},Ge);function Ge(t,e,o,i,r){Fe.call(this,e,r),this.text=e,this.value=t,this.index=o,this.dataItem=i,this.reflow(new R)}i(o,{_autoReflow:!1});var We,Xe=o,o=((We=be)&&(qe.__proto__=We),((qe.prototype=Object.create(We&&We.prototype)).constructor=qe).prototype.hide=function(){this.options.visible=!1},qe.prototype.show=function(){this.options.visible=!0},qe.prototype.render=function(){var t,e,o,i,r,n,s,a,h=this,p=this.options;p.visible&&(o=p.label,p=p.icon,i=new R,r=function(){return h},n=p.size,s=this.fields.text,T(o)&&o.visible&&((a=dt(o))?s=a(this.fields):o.format&&(s=this.chartService.format.auto(o.format,s)),o.color||(o.color="inside"===o.position?"#fff":p.background),this.label=new De(s,x({},o)),this.label.aliasFor=r,"inside"!==o.position||T(n)||(p.type===H?n=Math.max(this.label.box.width(),this.label.box.height()):(t=this.label.box.width(),e=this.label.box.height()),i.wrap(this.label.box))),p.width=t||n||7,p.height=e||n||7,(a=new Ce(x({},p))).aliasFor=r,this.marker=a,this.append(a),this.label&&this.append(this.label),a.reflow(new R),this.wrapperBox=i.wrap(a.box))},qe.prototype.reflow=function(t){var e,o,i,r=this.options,n=this.label,s=this.marker,a=this.wrapperBox,h=t.center(),p=r.line.length,l=r.position;r.visible&&(u(l,[S,k])?l===S?(i=a.alignTo(t,l).translate(-p,t.center().y-a.center().y),r.line.visible&&(e=[t.x1,h.y],this.linePoints=[e,[i.x2,h.y]],o=i.clone().wrapPoint(e))):(i=a.alignTo(t,l).translate(p,t.center().y-a.center().y),r.line.visible&&(e=[t.x2,h.y],this.linePoints=[e,[i.x1,h.y]],o=i.clone().wrapPoint(e))):l===w?(i=a.alignTo(t,l).translate(t.center().x-a.center().x,p),r.line.visible&&(e=[h.x,t.y2],this.linePoints=[e,[h.x,i.y1]],o=i.clone().wrapPoint(e))):(i=a.alignTo(t,l).translate(t.center().x-a.center().x,-p),r.line.visible&&(e=[h.x,t.y1],this.linePoints=[e,[h.x,i.y2]],o=i.clone().wrapPoint(e))),s&&s.reflow(i),n&&(n.reflow(i),s&&("outside"===r.label.position&&n.box.alignTo(s.box,l),n.reflow(n.box))),this.contentBox=i,this.targetBox=t,this.box=o||i)},qe.prototype.createVisual=function(){We.prototype.createVisual.call(this),this.visual.options.noclip=this.options.noclip,this.options.visible&&this.createLine()},qe.prototype.renderVisual=function(){var e=this,t=this.options,o=t.visual;t.visible&&o?(this.visual=o(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()):We.prototype.renderVisual.call(this)},qe.prototype.createLine=function(){var t=this.options.line;this.linePoints&&(J(t=b.drawing.Path.fromPoints(this.linePoints,{stroke:{color:t.color,width:t.width,dashType:t.dashType}})),this.visual.append(t))},qe.prototype.click=function(t,e){var o=this.eventArgs(e);t.trigger("noteClick",o)||e.preventDefault()},qe.prototype.over=function(t,e){var o=this.eventArgs(e);t.trigger("noteHover",o)||e.preventDefault()},qe.prototype.out=function(t,e){e=this.eventArgs(e);t.trigger("noteLeave",e)},qe.prototype.eventArgs=function(t){var e=this.options;return Object.assign(this.fields,{element:Lt(t),text:T(e.label)?e.label.text:"",visual:this.visual})},qe);function qe(t,e,o){We.call(this,e),this.fields=t,this.chartService=o,this.render()}i(o,{icon:{visible:!0,type:H},label:{position:"inside",visible:!0,align:C,vAlign:C},line:{visible:!0},visible:!0,position:A,zIndex:2});function Ye(){}function Ze(t){this._intlService=t}function Qe(t,e){this._intlService=(e=void 0===e?{}:e).intlService,this.sender=e.sender||t,this.format=new eo(e.intlService),this.chart=t,this.rtl=Boolean(e.rtl)}var Ke=o,$e={format:function(t,e){return e},toString:function(t){return t},parseDate:function(t){return new Date(t)},firstDay:function(){return 0}},o={implementation:{configurable:!0}},Je=(Ye.register=function(t){$e=t},o.implementation.get=function(){return $e},Object.defineProperties(Ye,o),Ye),to=/\{(\d+)(:[^\}]+)?\}/g,o={intl:{configurable:!0}},eo=(o.intl.get=function(){return this._intlService||Je.implementation},o.intl.set=function(t){this._intlService=t},Ze.prototype.auto=function(t){for(var e=[],o=arguments.length-1;0<o--;)e[o]=arguments[o+1];var i=this.intl;return et(t)&&t.match(N)?i.format.apply(i,[t].concat(e)):i.toString(e[0],t)},Ze.prototype.localeAuto=function(t,i,r){var n=this.intl;return et(t)&&t.match(N)?t.replace(to,function(t,e,o){e=i[parseInt(e,10)];return n.toString(e,o?o.substring(1):"",r)}):n.toString(i[0],t,r)},Object.defineProperties(Ze.prototype,o),Ze),o={intl:{configurable:!0}};o.intl.get=function(){return this._intlService||Je.implementation},o.intl.set=function(t){this._intlService=t,this.format.intl=t},Qe.prototype.notify=function(t,e){this.chart&&this.chart.trigger(t,e)},Qe.prototype.isPannable=function(t){var e=((this.chart||{}).options||{}).pannable;return e&&e.lock!==t},Object.defineProperties(Qe.prototype,o);function oo(){}var io,ro=Qe,no=(oo.register=function(t){io=t},oo.create=function(t,e){if(io)return io.create(t,e)},oo);function so(t,e){var o=t.tickX,i=t.tickY,r=t.position,n=new b.drawing.Path({stroke:{width:e.width,color:e.color}});return t.vertical?n.moveTo(o,r).lineTo(o+e.size,r):n.moveTo(r,i).lineTo(r,i+e.size),J(n),n}function ao(t,e){var o=t.lineStart,i=t.lineEnd,r=t.position,e=new b.drawing.Path({stroke:{width:e.width,color:e.color,dashType:e.dashType}});return t.vertical?e.moveTo(o,r).lineTo(i,r):e.moveTo(r,o).lineTo(r,i),J(e),e}(ho=r)&&(n.__proto__=ho),((n.prototype=Object.create(ho&&ho.prototype)).constructor=n).prototype.initFields=function(){},n.prototype.labelsRange=function(){return{min:this.options.labels.skip,max:this.labelsCount()}},n.prototype.normalizeLabelRotation=function(t){var e=t.rotation;st(e)&&(t.alignRotation=e.align,t.rotation=e.angle)},n.prototype.createLabels=function(){var t=this.options,e=t.vertical?k:C,o=x({},t.labels,{align:e,zIndex:t.zIndex}),i=Math.max(1,o.step);if(this.clearLabels(),o.visible){this.normalizeLabelRotation(o),"auto"===o.rotation&&(o.rotation=0,t.autoRotateLabels=!0);for(var r=this.labelsRange(),n=r.min;n<r.max;n+=i){var s={index:n,count:r.max},s=this.createAxisLabel(n,o,s);s&&(this.append(s),this.labels.push(s))}}},n.prototype.clearLabels=function(){this.children=vt(this.children,function(t){return!(t instanceof Xe)}),this.labels=[]},n.prototype.clearTitle=function(){var e=this;this.title&&(this.children=vt(this.children,function(t){return t!==e.title}),this.title=void 0)},n.prototype.clear=function(){this.clearLabels(),this.clearTitle()},n.prototype.lineBox=function(){var t=this.options,e=this.box,o=t.vertical,i=t.labels.mirror,r=i?e.x1:e.x2,i=i?e.y2:e.y1,t=t.line.width||0;return o?new R(r,e.y1,r,e.y2-t):new R(e.x1,i,e.x2-t,i)},n.prototype.createTitle=function(){var t=this.options,t=x({rotation:t.vertical?-90:0,text:"",zIndex:1,visualSize:!0},t.title);t.visible&&t.text&&(t=new De(t.text,t),this.append(t),this.title=t)},n.prototype.createNotes=function(){var t=this.options,e=t.notes,o=e.data||[];this.notes=[];for(var i=0;i<o.length;i++){var r=x({},e,o[i]),r=(r.value=this.parseNoteValue(r.value),new Ke({value:r.value,text:r.label.text,dataItem:r},r,this.chartService));r.options.visible&&(T(r.options.position)?t.vertical&&!u(r.options.position,[S,k])?r.options.position=t.reverse?S:k:t.vertical||u(r.options.position,[A,w])||(r.options.position=t.reverse?w:A):t.vertical?r.options.position=t.reverse?S:k:r.options.position=t.reverse?w:A,this.append(r),this.notes.push(r))}},n.prototype.parseNoteValue=function(t){return t},n.prototype.renderVisual=function(){ho.prototype.renderVisual.call(this),this.createPlotBands()},n.prototype.createVisual=function(){ho.prototype.createVisual.call(this),this.createBackground(),this.createLine()},n.prototype.gridLinesVisual=function(){var t=this._gridLines;return t||(t=this._gridLines=new b.drawing.Group({zIndex:-2}),this.appendVisual(this._gridLines)),t},n.prototype.createTicks=function(s){var t=this.options,a=this.lineBox(),h=t.labels.mirror,e=t.majorTicks.visible?t.majorUnit:0,p={vertical:t.vertical};function o(t,e,o){var i=t.length,r=Math.max(1,e.step);if(e.visible)for(var n=e.skip;n<i;n+=r)T(o)&&n%o==0||(p.tickX=h?a.x2:a.x2-e.size,p.tickY=h?a.y1-e.size:a.y1,p.position=t[n],s.append(so(p,e)))}o(this.getMajorTickPositions(),t.majorTicks),o(this.getMinorTickPositions(),t.minorTicks,e/t.minorUnit)},n.prototype.createLine=function(){var t=this.options,e=t.line,o=this.lineBox();0<e.width&&e.visible&&((e=new b.drawing.Path({stroke:{width:e.width,color:e.color,dashType:e.dashType}})).moveTo(o.x1,o.y1).lineTo(o.x2,o.y2),t._alignLines&&J(e),(o=this._lineGroup=new b.drawing.Group).append(e),this.visual.append(o),this.createTicks(o))},n.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},n.prototype.createBackground=function(){var t=this.options,e=this.box,t=t.background;t&&(this._backgroundPath=b.drawing.Path.fromRect(e.toRect(),{fill:{color:t},stroke:null}),this.visual.append(this._backgroundPath))},n.prototype.createPlotBands=function(){var e=this,t=this.options,o=t.plotBands||[],i=t.vertical,r=this.plotArea;if(0!==o.length){for(var n=this._plotbandGroup=new b.drawing.Group({zIndex:-1}),s=vt(this.pane.axes,function(t){return t.options.vertical!==e.options.vertical})[0],a=0;a<o.length;a++){var h=o[a],p=void 0,l=void 0,c=h.label,u=void 0,l=i?(p=(s||r.axisX).lineBox(),this.getSlot(h.from,h.to,!0)):(p=this.getSlot(h.from,h.to,!0),(s||r.axisY).lineBox());c&&(c.vAlign=c.position||S,u=this.createPlotBandLabel(c,h,new R(p.x1,l.y1,p.x2,l.y2))),0!==p.width()&&0!==l.height()&&(c=new b.geometry.Rect([p.x1,l.y1],[p.width(),l.height()]),p=b.drawing.Path.fromRect(c,{fill:{color:h.color,opacity:h.opacity},stroke:null}),n.append(p),u&&n.append(u))}this.appendVisual(n)}},n.prototype.createPlotBandLabel=function(t,e,o){if(!1===t.visible)return null;var i,r=t.text;return T(t)&&t.visible&&((i=dt(t))?r=i({text:r,item:e}):t.format&&(r=this.chartService.format.auto(t.format,r)),t.color||(t.color=this.options.labels.color)),(i=new De(r,t)).reflow(o),i.renderVisual(),i.visual},n.prototype.createGridLines=function(t){var e=this.options,o=e.minorGridLines,i=e.majorGridLines,r=e.minorUnit,n=e.vertical,a=t.options.line.visible,e=i.visible?e.majorUnit:0,t=t.lineBox(),h=t[n?"y1":"x1"],p={lineStart:t[n?"x1":"y1"],lineEnd:t[n?"x2":"y2"],vertical:n},l=[],c=this.gridLinesVisual();function s(t,e,o){var i=t.length,r=Math.max(1,e.step);if(e.visible)for(var n=e.skip;n<i;n+=r){var s=M(t[n]);u(s,l)||n%o==0||a&&h===s||(p.position=s,c.append(ao(p,e)),l.push(s))}}return s(this.getMajorTickPositions(),i),s(this.getMinorTickPositions(),o,e/r),c.children},n.prototype.reflow=function(t){for(var e=this.options,o=this.labels,i=this.title,r=e.vertical,n=o.length,s=r?"width":"height",i=i?i.box[s]():0,a=this.getActualTickSize()+e.margin+i,h=((this.getRoot()||{}).box||t)[s](),p=0,l=0;l<n;l++){var c=o[l].box[s]();c+a<=h&&(p=Math.max(p,c))}this.box=r?new R(t.x1,t.y1,t.x1+p+a,t.y2):new R(t.x1,t.y1,t.x2,t.y1+p+a),this.arrangeTitle(),this.arrangeLabels(),this.arrangeNotes()},n.prototype.getLabelsTickPositions=function(){return this.getMajorTickPositions()},n.prototype.labelTickIndex=function(t){return t.index},n.prototype.arrangeLabels=function(){for(var t=this.options,e=this.labels,o=this.labelsBetweenTicks(),i=t.vertical,r=t.labels.mirror,n=this.getLabelsTickPositions(),s=0;s<e.length;s++){var a=e[s],h=this.labelTickIndex(a),p=i?a.box.height():a.box.width(),l=n[h],h=n[h+1],c=void 0,u=void 0,u=i?c=o?l+(h-l)/2-p/2:l-p/2:o?(c=l,h):(c=l-p/2)+p;this.positionLabel(a,r,c,u)}},n.prototype.positionLabel=function(t,e,o,i){void 0===i&&(i=o);var r=this.options,n=r.vertical,s=this.lineBox(),r=this.getActualTickSize()+r.margin,s=n?(n=s.x2,e?(n+=r,t.options.rotationOrigin=S):(n-=r+t.box.width(),t.options.rotationOrigin=k),t.box.move(n,o)):(n=s.y1,e?(n-=r+t.box.height(),t.options.rotationOrigin=w):(n+=r,t.options.rotationOrigin=A),new R(o,n,i,n+t.box.height()));t.reflow(s)},n.prototype.autoRotateLabelAngle=function(t,e){return t.width()<e?0:t.height()>e?-90:-45},n.prototype.autoRotateLabels=function(){if(!this.options.autoRotateLabels||this.options.vertical)return!1;for(var t=this.getMajorTickPositions(),e=this.labels,o=Math.min(e.length,t.length-1),i=0,r=0;r<o;r++){var n=Math.abs(t[r+1]-t[r]),s=e[r].box,s=this.autoRotateLabelAngle(s,n);if(-90===(i=0!==s?s:i))break}if(0!==i){for(var a=0;a<e.length;a++)e[a].options.rotation=i,e[a].reflow(new R);return!0}},n.prototype.arrangeTitle=function(){var t=this.options,e=this.title,o=t.labels.mirror,t=t.vertical;e&&(t?(e.options.align=o?k:S,e.options.vAlign=e.options.position):(e.options.align=e.options.position,e.options.vAlign=o?A:w),e.reflow(this.box))},n.prototype.arrangeNotes=function(){for(var t=0;t<this.notes.length;t++){var e=this.notes[t],o=e.options.value,i=void 0;T(o)?(this.shouldRenderNote(o)?e.show():e.hide(),i=this.noteSlot(o)):e.hide(),e.reflow(i||this.lineBox())}},n.prototype.noteSlot=function(t){return this.getSlot(t)},n.prototype.alignTo=function(t){var t=t.lineBox(),e=this.options.vertical,o=e?v:y;this.box.snapTo(t,o),e?this.box.shrink(0,this.lineBox().height()-t.height()):this.box.shrink(this.lineBox().width()-t.width(),0),this.box[o+1]-=this.lineBox()[o+1]-t[o+1],this.box[o+2]-=this.lineBox()[o+2]-t[o+2]},n.prototype.axisLabelText=function(t,e,o){function i(){return e.format?r.chartService.format.localeAuto(e.format,[t],e.culture):t}var r=this,n=dt(e),n=n?n(Object.assign({},o,{get text(){return i()},value:t,format:e.format,culture:e.culture})):i();return n},n.prototype.slot=function(t,e,o){t=this.getSlot(t,e,o);if(t)return t.toRect()},n.prototype.contentBox=function(){var t,e,o=this.box.clone(),i=this.labels;return i.length&&(e=this.options.vertical?v:y,this.chartService.isPannable(e)?(t=this.maxLabelOffset(),o[e+1]-=t.start,o[e+2]+=t.end):(i[0].options.visible&&o.wrap(i[0].box),(e=i[i.length-1]).options.visible&&o.wrap(e.box))),o},n.prototype.maxLabelOffset=function(){for(var t=this.options,e=t.vertical,t=t.reverse,o=this.labelsBetweenTicks(),i=this.getLabelsTickPositions(),r=e?v:y,n=this.labels,s=t?1:0,a=t?0:1,h=0,p=0,l=0;l<n.length;l++){var c=n[l],u=this.labelTickIndex(c),d=void 0,f=void 0;o?(d=i[u+s],f=i[u+a]):d=f=i[u],h=Math.max(h,d-c.box[r+1]),p=Math.max(p,c.box[r+2]-f)}return{start:h,end:p}},n.prototype.limitRange=function(t,e,o,i,r){var n=this.options;if(t<o&&r<0&&(!T(n.min)||n.min<=o)||i<e&&0<r&&(!T(n.max)||i<=n.max))return null;if(e<o&&0<r||i<t&&r<0)return{min:t,max:e};var n=e-t,s=t,a=e;return t<o&&r<0?(s=_(t,o,i),a=_(t+n,o+n,i)):i<e&&0<r&&(a=_(e,o,i),s=_(e-n,o,i-n)),{min:s,max:a}},n.prototype.valueRange=function(){return{min:this.seriesMin,max:this.seriesMax}},n.prototype.lineDir=function(){var t=this.options;return(t.vertical?-1:1)*(t.reverse?-1:1)},n.prototype.lineInfo=function(){var t=this.options.vertical,e=this.lineBox(),o=t?e.height():e.width(),t=t?v:y,i=this.lineDir(),r=t+(1===i?1:2).toString();return{axis:t,axisOrigin:r,axisDir:i,lineBox:e,lineSize:o,lineStart:e[r]}},n.prototype.pointOffset=function(t){var e=this.lineInfo(),o=e.axis,i=e.axisDir,r=e.axisOrigin,n=e.lineBox,e=e.lineSize;return(0<i?t[o]-n[r]:n[r]-t[o])/e},n.prototype.scaleToDelta=function(t,e){t=_(t,-.999,.999);return 0<t?e*Math.min(1,t):e-e/(1+t)},n.prototype.labelsBetweenTicks=function(){return!this.options.justified},n.prototype.prepareUserOptions=function(){};var ho,o=n;function n(t,e){void 0===e&&(e=new ro),ho.call(this,t),this.chartService=e,this.options.visible||(this.options=x({},this.options,{labels:{visible:!1},line:{visible:!1},margin:0,majorTickSize:0,minorTickSize:0})),this.options.minorTicks=x({},{color:this.options.line.color,width:this.options.line.width,visible:this.options.minorTickType!==X},this.options.minorTicks,{size:this.options.minorTickSize,align:this.options.minorTickType}),this.options.majorTicks=x({},{color:this.options.line.color,width:this.options.line.width,visible:this.options.majorTickType!==X},this.options.majorTicks,{size:this.options.majorTickSize,align:this.options.majorTickType}),this.initFields(),this.options._deferLabels||this.createLabels(),this.createTitle(),this.createNotes()}i(o,{labels:{visible:!0,rotation:0,mirror:!1,step:1,skip:0},line:{width:1,color:D,visible:!0},title:{visible:!0,position:C},majorTicks:{align:"outside",size:4,skip:0,step:1},minorTicks:{align:"outside",size:3,skip:0,step:1},axisCrossingValue:0,majorTickType:"outside",minorTickType:X,majorGridLines:{skip:0,step:1},minorGridLines:{visible:!1,width:1,color:D,skip:0,step:1},margin:5,visible:!0,reverse:!1,justified:!0,notes:{label:{text:""}},_alignLines:!0,_deferLabels:!1});var po=o,lo="milliseconds",co="seconds",uo="minutes",fo="hours",go="days",yo="weeks",vo="months",mo="years",xo=1e3,_o=60*xo,bo=60*_o,wo=24*bo,Co=7*wo,So=31*wo,ko=365*wo,Ao={years:ko,months:So,weeks:Co,days:wo,hours:bo,minutes:_o,seconds:xo,milliseconds:1};function Po(t,e){return t.getTime()-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*_o}function To(t,e){return new Date(t.getTime()+e)}function Mo(t){var e;return t instanceof Date?e=t:t&&(e=new Date(t)),e}function Oo(t,e){0===e&&23===t.getHours()&&t.setHours(t.getHours()+2)}function Bo(t,e,o,r){var i,n,s,a=t;return t&&(i=(t=Mo(t)).getHours(),o===mo?Oo(a=new Date(t.getFullYear()+e,0,1),0):o===vo?Oo(a=new Date(t.getFullYear(),t.getMonth()+e,1),i):o===yo?Oo(a=Bo(function(t,e){void 0===r&&(e=0);var o=0,i=t.getDay();if(!isNaN(i))for(;i!==e;)0===i?i=6:i--,o++;return To(t,-o*wo)}(t,r),7*e,go),i):o===go?Oo(a=new Date(t.getFullYear(),t.getMonth(),t.getDate()+e),i):o===fo?(i=t,n=e,(s=new Date(i)).setMinutes(0,0,0),a=To(s,(i.getTimezoneOffset()-s.getTimezoneOffset())*_o+n*bo)):o===uo?0<(a=To(t,e*_o)).getSeconds()&&a.setSeconds(0):o===co?a=To(t,e*xo):o===lo&&(a=To(t,e)),o!==lo&&0<a.getMilliseconds()&&a.setMilliseconds(0)),a}function Ro(t,e,o){return Bo(Mo(t),0,e,o)}function Eo(t,e,o){t=Mo(t);return t&&Ro(t,e,o).getTime()===t.getTime()?t:Bo(t,1,e,o)}function Lo(t,e){return t&&e?t.getTime()-e.getTime():-1}function Io(t,e){return t.getTime()-e}function zo(t){if(Z(t)){for(var e=[],o=0;o<t.length;o++)e.push(zo(t[o]));return e}if(t)return Mo(t).getTime()}function Vo(t,e){return t&&e?zo(t)===zo(e):t===e}function jo(t,e,o){return Po(t,e)/Ao[o]}function Do(t,e,o,i){var t=Mo(t),r=Mo(e);return(o===vo?t.getMonth()-r.getMonth()+12*(t.getFullYear()-r.getFullYear())+jo(t,new Date(t.getFullYear(),t.getMonth()),go)/new Date(t.getFullYear(),t.getMonth()+1,0).getDate():o===mo?t.getFullYear()-r.getFullYear()+Do(t,new Date(t.getFullYear(),0),vo,1)/12:o===go||o===yo?jo(t,r,o):Io(t,e)/Ao[o])/i}function Ho(t,e,o){return o===mo?e.getFullYear()-t.getFullYear():o===vo?12*Ho(t,e,mo)+e.getMonth()-t.getMonth():o===go?Math.floor(Io(e,t)/wo):Math.floor(Io(e,t)/Ao[o])}function Uo(t,e){return et(e)&&t.parseDate(e)||Mo(e)}function Fo(t,e){if(Z(e)){for(var o=[],i=0;i<e.length;i++)o.push(Uo(t,e[i]));return o}return Uo(t,e)}function No(t,e){return m(t.weekStartDay)?t.weekStartDay:e&&e.firstDay?e.firstDay():0}(Go=po)&&(s.__proto__=Go),((s.prototype=Object.create(Go&&Go.prototype)).constructor=s).prototype.initFields=function(){this._ticks={}},s.prototype.categoriesHash=function(){return""},s.prototype.clone=function(){var t=new s(Object.assign({},this.options,{categories:this.options.srcCategories}),this.chartService);return t.createLabels(),t},s.prototype.initUserOptions=function(t){var e=t.categories||[],o=T(t.min),i=T(t.max);return t.srcCategories=t.categories=e,(o||i)&&e.length&&(o=o?Math.floor(t.min):0,i=i?t.justified?Math.floor(t.max)+1:Math.ceil(t.max):e.length,t.categories=t.categories.slice(o,i)),t},s.prototype.rangeIndices=function(){var t=this.options,e=t.categories.length||1;return{min:m(t.min)?t.min%1:0,max:m(t.max)&&t.max%1!=0&&t.max<this.totalRange().max?e-(1-t.max%1):e-(t.justified?1:0)}},s.prototype.totalRangeIndices=function(t){var e=this.options,o=m(e.min)?e.min:0;return e=m(e.max)?e.max:m(e.min)?o+e.categories.length:this.totalRange().max||1,t&&(t=this.totalRange(),o=_(o,0,t.max),e=_(e,0,t.max)),{min:o,max:e}},s.prototype.range=function(){var t=this.options;return{min:m(t.min)?t.min:0,max:(m(t.max)?t:this.totalRange()).max}},s.prototype.roundedRange=function(){return this.range()},s.prototype.totalRange=function(){var t=this.options;return{min:0,max:Math.max(this._seriesMax||0,t.srcCategories.length)-(t.justified?1:0)}},s.prototype.scaleOptions=function(){var t=this.rangeIndices(),e=t.min,t=t.max,o=this.lineBox();return{scale:(this.options.vertical?o.height():o.width())/(t-e||1)*(this.options.reverse?-1:1),box:o,min:e,max:t}},s.prototype.arrangeLabels=function(){Go.prototype.arrangeLabels.call(this),this.hideOutOfRangeLabels()},s.prototype.hideOutOfRangeLabels=function(){var t,e,o,i=this.box,r=this.labels;0<r.length&&(e=i[(t=this.options.vertical?v:y)+1],i=i[t+2],o=r[0],r=zt(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))},s.prototype.getMajorTickPositions=function(){return this.getTicks().majorTicks},s.prototype.getMinorTickPositions=function(){return this.getTicks().minorTicks},s.prototype.getLabelsTickPositions=function(){return this.getTicks().labelTicks},s.prototype.tickIndices=function(t){for(var e=this.rangeIndices(),o=e.min,e=e.max,i=Math.ceil(e),r=Math.floor(o),n=[];r<=i;)n.push(r),r+=t;return n},s.prototype.getTickPositions=function(t){for(var e=this.options,o=e.vertical,e=e.reverse,i=this.scaleOptions(),r=i.scale,n=i.box,s=i.min,a=n[(o?v:y)+(e?2:1)],h=this.tickIndices(t),p=[],l=0;l<h.length;l++)p.push(a+M(r*(h[l]-s),3));return p},s.prototype.getTicks=function(){var t=this.options,e=this._ticks,o=this.rangeIndices(),i=this.lineBox(),o=i.getHash()+o.min+","+o.max+t.reverse+t.justified;return e._hash!==o&&(t=t.minorTicks.visible||t.minorGridLines.visible,e._hash=o,e.labelTicks=this.getTickPositions(1),e.majorTicks=this.filterOutOfRangePositions(e.labelTicks,i),e.minorTicks=t?this.filterOutOfRangePositions(this.getTickPositions(.5),i):[]),e},s.prototype.filterOutOfRangePositions=function(t,e){if(!t.length)return t;for(var o=this.options.vertical?v:y,i=function(t){return e[o+1]<=t&&t<=e[o+2]},r=t.length-1,n=0;!i(t[n])&&n<=r;)n++;for(var s=r;!i(t[s])&&0<=s;)s--;return t.slice(n,s+1)},s.prototype.lineInfo=function(){var t=this.options,e=t.vertical,t=t.reverse,o=this.lineBox(),i=e?o.height():o.width(),e=e?v:y,t=t?-1:1,r=e+(1==t?1:2).toString();return{axis:e,axisOrigin:r,axisDir:t,lineBox:o,lineSize:i,lineStart:o[r]}},s.prototype.lineDir=function(){return this.options.reverse?-1:1},s.prototype.getSlot=function(t,e,o){var i=this.options,r=i.reverse,i=i.justified,n=this.scaleOptions(),s=n.scale,a=n.box,n=n.min,h=this.lineInfo(),p=h.axis,h=h.lineStart,l=a.clone(),c=!T(e),t=O(t,0),e=O(e,t),e=Math.max(e-1,t),u=h+(t-n)*s,h=h+(Math.max(t,e)+1-n)*s;return c&&i&&(h=u),o&&(u=_(u,a[p+1],a[p+2]),h=_(h,a[p+1],a[p+2])),l[p+1]=r?h:u,l[p+2]=r?u:h,l},s.prototype.limitSlot=function(t){var e=this.options.vertical?v:y,o=this.lineBox(),i=t.clone();return i[e+1]=_(t[e+1],o[e+1],o[e+2]),i[e+2]=_(t[e+2],o[e+1],o[e+2]),i},s.prototype.slot=function(t,e,o){var i=Math.floor(this.options.min||0);return"string"==typeof t?t=this.categoryIndex(t):m(t)&&(t-=i),"string"==typeof e?e=this.categoryIndex(e):m(e)&&(e-=i),Go.prototype.slot.call(this,t,e,o)},s.prototype.pointCategoryIndex=function(t){var e=this.options,o=e.reverse,i=e.justified,e=e.vertical?v:y,r=this.scaleOptions(),n=r.scale,s=r.box,a=r.min,r=r.max,h=s[e+1],s=s[e+2],t=t[e];if(t<h||s<t)return null;e=(o?r:a)+(t-h)/n,s=e%1;return i?e=Math.round(e):0==s&&0<e&&e--,Math.floor(e)},s.prototype.getCategory=function(t){t=this.pointCategoryIndex(t);return null===t?null:this.options.categories[t]},s.prototype.categoryIndex=function(t){return this.totalIndex(t)-Math.floor(this.options.min||0)},s.prototype.categoryAt=function(t,e){var o=this.options;return(e?o.srcCategories:o.categories)[t]},s.prototype.categoriesCount=function(){return(this.options.categories||[]).length},s.prototype.translateRange=function(t){var e=this.options,o=this.lineBox(),o=e.vertical?o.height():o.width(),e=e.categories.length,t=M(t/(o/e),F);return{min:t,max:e+t}},s.prototype.scaleRange=function(t,e){var e=Math.abs(this.pointOffset(e)),o=this.totalRangeIndices(),i=o.max-o.min,t=this.scaleToDelta(t,i),i=o.min+e*t,o=o.max-(1-e)*t;return{min:i,max:o=o-i<.1?i+.1:o}},s.prototype.zoomRange=function(t,e){var o=this.totalRange(),i=o.min,o=o.max,t=this.scaleRange(t,e);return{min:_(t.min,i,o),max:_(t.max,i,o)}},s.prototype.labelsCount=function(){var t=this.labelsRange();return t.max-t.min},s.prototype.labelsRange=function(){var t=this.options,e=t.justified,o=t.labels,i=this.totalRangeIndices(!0),r=i.min,i=i.max,n=Math.floor(r),i=e?(r=Math.ceil(r),Math.floor(i)):(r=Math.floor(r),Math.ceil(i));return{min:(r>o.skip?o.skip+o.step*Math.ceil((r-o.skip)/o.step):o.skip)-n,max:(t.categories.length?i+(e?1:0):0)-n}},s.prototype.createAxisLabel=function(t,e,o){var i=this.options,r=i.dataItems?i.dataItems[t]:null,i=O(i.categories[t],""),o=(o.dataItem=r,this.axisLabelText(i,e,o));return new Xe(i,o,t,r,e)},s.prototype.shouldRenderNote=function(t){var e=this.totalRangeIndices();return Math.floor(e.min)<=t&&t<=Math.ceil(e.max)},s.prototype.noteSlot=function(t){var e=this.options,t=t-Math.floor(e.min||0);return this.getSlot(t)},s.prototype.arrangeNotes=function(){Go.prototype.arrangeNotes.call(this),this.hideOutOfRangeNotes()},s.prototype.hideOutOfRangeNotes=function(){var t=this.notes,e=this.box;if(t&&t.length)for(var o=this.options.vertical?v:y,i=e[o+1],r=e[o+2],n=0;n<t.length;n++){var s=t[n];s.box&&(r<s.box[o+1]||s.box[o+2]<i)&&s.hide()}},s.prototype.pan=function(t){var e=this.totalRangeIndices(!0),o=this.scaleOptions().scale,t=M(t/o,F),o=this.totalRange(),i=e.min+t,e=e.max+t;return this.limitRange(i,e,0,o.max,t)},s.prototype.pointsRange=function(t,e){var o=this.options,i=o.reverse,o=o.vertical?v:y,r=this.totalRangeIndices(!0),n=this.scaleOptions(),s=n.scale,n=n.box[o+(i?2:1)],i=t[o]-n,t=e[o]-n,e=r.min+i/s,o=r.min+t/s,n=Math.min(e,o),i=Math.max(e,o);if(.01<=i-n)return{min:n,max:i}},s.prototype.valueRange=function(){return this.range()},s.prototype.totalIndex=function(t){var e=this.options;if(this._categoriesMap)return this._categoriesMap.get(t);var o=t,i=e.srcCategories;if(o instanceof Date){for(var r=i.length,n=0;n<r;n++)if(Vo(i[n],o))return n;return-1}return i.indexOf(o)},s.prototype.currentRangeIndices=function(){var t=this.options,e=0;return{min:e=m(t.min)?Math.floor(t.min):e,max:m(t.max)?t.justified?Math.floor(t.max):Math.ceil(t.max)-1:this.totalCount()-1}},s.prototype.mapCategories=function(){if(!this._categoriesMap)for(var t=this._categoriesMap=new _t,e=this.options.srcCategories,o=0;o<e.length;o++)t.set(e[o],o)},s.prototype.totalCount=function(){return Math.max(this.options.srcCategories.length,this._seriesMax||0)};var Go,o=s;function s(){Go.apply(this,arguments)}i(o,{type:"category",vertical:!1,majorGridLines:{visible:!1,width:1,color:D},labels:{zIndex:1},justified:!1,_deferLabels:!0});var Wo=o,o={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"},Xo=[lo,co,uo,fo,go,yo,vo,mo],qo="fit";function Yo(t){var e=t._range;return e||((e=t._range=Ut(t)).min=Mo(e.min),e.max=Mo(e.max)),e}function Zo(t){this.options=t}function Qo(t,e,o){(this.options=o).baseUnitStep=o.baseUnitStep||1;var i,r=o.roundToBaseUnit,n=o.justified,s=(this.start=Bo(t,0,o.baseUnit,o.weekStartDay),this.roundToTotalStep(e)),a=!n&&Vo(e,s)&&!o.justifyEnd,t=(this.end=this.roundToTotalStep(e,!n,a?1:0),o.min||t);this.valueStart=this.roundToTotalStep(t),this.displayStart=r?this.valueStart:t,(t=o.max)?(i=!n&&Vo(t,this.roundToTotalStep(t))?-1:0,this.valueEnd=this.roundToTotalStep(t,!1,i),this.displayEnd=r?this.roundToTotalStep(t,!n):o.max):(this.valueEnd=s,this.displayEnd=r||a?this.end:e),this.valueEnd<this.valueStart&&(this.valueEnd=this.valueStart),this.displayEnd<=this.displayStart&&(this.displayEnd=this.roundToTotalStep(this.displayStart,!1,1))}Zo.prototype.displayIndices=function(){return{min:0,max:1}},Zo.prototype.displayRange=function(){return{}},Zo.prototype.total=function(){return{}},Zo.prototype.valueRange=function(){return{}},Zo.prototype.valueIndex=function(){return-1},Zo.prototype.values=function(){return[]},Zo.prototype.totalIndex=function(){return-1},Zo.prototype.valuesCount=function(){return 0},Zo.prototype.totalCount=function(){return 0},Zo.prototype.dateAt=function(){return null};function Ko(t,e,o){for(var i,r,n,s=Yo(t.categories),a=(t.max||s.max)-(t.min||s.min),h=t.autoBaseUnitSteps,p=t.maxDateGroups,l=t.baseUnit===qo,c=e?Xo.indexOf(e):0,u=l?Xo[c++]:t.baseUnit,d=a/Ao[u],f=d;!r||p<=d;){for(i=i||h[u].slice(0);(n=i.shift())&&e===u&&n<o;);if(n)d=f/(r=n);else{if(u===zt(Xo)){r=Math.ceil(f/p);break}if(!l){p<d&&(r=Math.ceil(f/p));break}u=Xo[c++]||zt(Xo),f=a/Ao[u],i=null}}t.baseUnitStep=r,t.baseUnit=u}Qo.prototype.displayRange=function(){return{min:this.displayStart,max:this.displayEnd}},Qo.prototype.displayIndices=function(){var t,e,o;return this._indices||(o=(t=this.options).baseUnit,t=t.baseUnitStep,e=Do(this.displayStart,this.valueStart,o,t),o=Do(this.displayEnd,this.valueStart,o,t),this._indices={min:e,max:o}),this._indices},Qo.prototype.total=function(){return{min:this.start,max:this.end}},Qo.prototype.totalCount=function(){return this.totalIndex(this.end)+(this.options.justified?1:0)},Qo.prototype.valueRange=function(){return{min:this.valueStart,max:this.valueEnd}},Qo.prototype.valueIndex=function(t){var e=this.options;return Math.floor(Do(t,this.valueStart,e.baseUnit,e.baseUnitStep))},Qo.prototype.totalIndex=function(t){var e=this.options;return Math.floor(Do(t,this.start,e.baseUnit,e.baseUnitStep))},Qo.prototype.dateIndex=function(t){var e=this.options;return Do(t,this.valueStart,e.baseUnit,e.baseUnitStep)},Qo.prototype.valuesCount=function(){return this.valueIndex(this.valueEnd)+1},Qo.prototype.values=function(){var t=this._values;if(!t){var e=this.options,o=this.valueRange();this._values=t=[];for(var i=o.min;i<=o.max;)t.push(i),i=Bo(i,e.baseUnitStep,e.baseUnit,e.weekStartDay)}return t},Qo.prototype.dateAt=function(t,e){var o=this.options;return Bo(e?this.start:this.valueStart,o.baseUnitStep*t,o.baseUnit,o.weekStartDay)},Qo.prototype.roundToTotalStep=function(t,e,o){var i=this.options,r=i.baseUnit,n=i.baseUnitStep,i=i.weekStartDay,s=this.start,t=Do(t,s,r,n),e=e?Math.ceil(t):Math.floor(t);return o&&(e+=o),Bo(s,e*n,r,i)};($o=Wo)&&(p.__proto__=$o),((p.prototype=Object.create($o&&$o.prototype)).constructor=p).prototype.clone=function(){var t=new p(Object.assign({},this.options),this.chartService);return t.createLabels(),t},p.prototype.categoriesHash=function(){var t=this.dataRange.total().min;return this.options.baseUnit+this.options.baseUnitStep+t},p.prototype.initUserOptions=function(t){return t},p.prototype.initFields=function(){$o.prototype.initFields.call(this);var t=this.chartService,e=t.intl,o=this.options,i=o.categories||[];i._parsed||((i=Fo(e,i))._parsed=!0),o=x({roundToBaseUnit:!0},o,{categories:i,min:Uo(e,o.min),max:Uo(e,o.max),weekStartDay:No(o,e)}),t.panning&&t.isPannable(o.vertical?v:y)&&(o.roundToBaseUnit=!1),o.userSetBaseUnit=o.userSetBaseUnit||o.baseUnit,o.userSetBaseUnitStep=o.userSetBaseUnitStep||o.baseUnitStep,0<((this.options=o).srcCategories=i).length?(e=Yo(i),t=o.maxDivisions,this.dataRange=new Qo(e.min,e.max,function(t){var e=(t.baseUnit||"").toLowerCase();if(e!==qo&&!u(e,Xo)){for(var o,i,r=t,n=r.categories,s=T(n)?n.length:0,a=G,h=0;h<s;h++){var p,l=n[h];l&&o&&(0<(p=Po(l,o))&&(i=(a=Math.min(a,p))>=ko?mo:So-3*wo<=a?vo:Co<=a?yo:wo<=a?go:bo<=a?fo:_o<=a?uo:co)),o=l}r.baseUnit=i||go}return e!==qo&&"auto"!==t.baseUnitStep||Ko(t),t}(o)),t?(i=this.dataRange.displayRange(),Ko(i=Object.assign({},o,{justified:!0,roundToBaseUnit:!1,baseUnit:"fit",min:i.min,max:i.max,maxDateGroups:t}),(t=this.dataRange.options).baseUnit,t.baseUnitStep),this.divisionRange=new Qo(e.min,e.max,i)):this.divisionRange=this.dataRange):(o.baseUnit=o.baseUnit||go,this.dataRange=this.divisionRange=new Zo(o)),this.rangeLabels=[]},p.prototype.tickIndices=function(t){var e=this.dataRange,o=this.divisionRange,i=o.valuesCount();if(!this.options.maxDivisions||!i)return $o.prototype.tickIndices.call(this,t);var r=[],n=o.values(),s=0;this.options.justified||(n=n.concat(o.dateAt(i)),s=.5);for(var a,h=0;h<n.length;h++)r.push(e.dateIndex(n[h])+s),1!==t&&1<=h&&(a=r.length-1,r.splice(h,0,r[a-1]+(r[a]-r[a-1])*t));return r},p.prototype.shouldRenderNote=function(t){var e=this.range(),o=this.options.categories||[];return 0<=Lo(t,e.min)&&Lo(t,e.max)<=0&&o.length},p.prototype.parseNoteValue=function(t){return Uo(this.chartService.intl,t)},p.prototype.noteSlot=function(t){return this.getSlot(t)},p.prototype.translateRange=function(t){var e=this.options,o=e.baseUnit,i=e.weekStartDay,r=e.vertical,n=this.lineBox(),r=r?n.height():n.width(),n=this.range(),r=r/(n.max-n.min),t=M(t/r,F);return n.min&&n.max&&(r=To(e.min||n.min,t),e=To(e.max||n.max,t),n={min:Bo(r,0,o,i),max:Bo(e,0,o,i)}),n},p.prototype.labelsRange=function(){return{min:this.options.labels.skip,max:this.divisionRange.valuesCount()}},p.prototype.pan=function(t){if(this.isEmpty())return null;var e=this.options,o=this.lineBox(),o=e.vertical?o.height():o.width(),i=this.dataRange.displayRange(),r=i.min,i=i.max,n=this.dataRange.total(),t=M(t/(o/(i-r)),F)*(e.reverse?-1:1),o=To(r,t),r=To(i,t),i=this.limitRange(zo(o),zo(r),zo(n.min),zo(n.max),t);return i?(i.min=Mo(i.min),i.max=Mo(i.max),i.baseUnit=e.baseUnit,i.baseUnitStep=e.baseUnitStep||1,i.userSetBaseUnit=e.userSetBaseUnit,i.userSetBaseUnitStep=e.userSetBaseUnitStep,i):void 0},p.prototype.pointsRange=function(t,e){if(this.isEmpty())return null;var t=$o.prototype.pointsRange.call(this,t,e),e=this.dataRange.displayRange(),o=this.dataRange.displayIndices(),o=Io(e.max,e.min)/(o.max-o.min),i=this.options;return{min:To(e.min,t.min*o),max:To(e.min,t.max*o),baseUnit:i.userSetBaseUnit||i.baseUnit,baseUnitStep:i.userSetBaseUnitStep||i.baseUnitStep}},p.prototype.scaleRange=function(t,e){if(this.isEmpty())return{};var o=this.options,i=o.userSetBaseUnit===qo,r=this.dataRange.total(),n=this.dataRange.displayRange(),s=n.min,n=n.max,e=Math.abs(this.pointOffset(e)),t=this.scaleToDelta(t,n-s),a=Math.round(e*t),e=Math.round((1-e)*t),h=this.dataRange.options.baseUnit,t=new Date(s.getTime()+a),a=new Date(n.getTime()-e);if(i){var p,l,c=o.autoBaseUnitSteps,e=o.maxDateGroups,i=zt(c[h])*e*Ao[h],u=Io(n,s),d=Io(a,t),f=Xo.indexOf(h);if(d<Ao[h]&&h!==lo)h=Xo[f-1],t=To(s,l=(u-(e-1)*(p=zt(c[h]))*Ao[h])/2),a=To(n,-l);else if(i<d&&h!==mo){var g=0;do{for(h=Xo[++f],g=0,l=2*Ao[h];p=c[h][g],++g<c[h].length&&l*p<u;);}while(h!==mo&&l*p<u);0<(l=(l*p-u)/2)&&(t=To(s,-l),a=To(n,l),t=To(t,_(a,r.min,r.max)-a),a=To(a,_(t,r.min,r.max)-t))}}return t&&a&&0<Io(a,t)?{min:t,max:a,baseUnit:o.userSetBaseUnit||o.baseUnit,baseUnitStep:o.userSetBaseUnitStep||o.baseUnitStep}:void 0},p.prototype.zoomRange=function(t,e){var o=this.dataRange.total(),t=this.scaleRange(t,e);return t&&(t.min<o.min&&(t.min=o.min),t.max>o.max&&(t.max=o.max)),t},p.prototype.range=function(){return this.dataRange.displayRange()},p.prototype.createLabels=function(){$o.prototype.createLabels.call(this),this.createRangeLabels()},p.prototype.clearLabels=function(){$o.prototype.clearLabels.call(this),this.rangeLabels=[]},p.prototype.arrangeLabels=function(){this.arrangeRangeLabels(),$o.prototype.arrangeLabels.call(this)},p.prototype.arrangeRangeLabels=function(){var t,e,o,i,r=this.options,n=this.rangeLabels;0!==n.length&&(t=this.lineBox(),e=r.vertical,r=r.rangeLabels.mirror||r.labels.mirror,(o=n[0])&&(i=e?t.y1-o.box.height()/2:t.x1,this.positionLabel(o,r,i)),(o=n[1])&&(i=e?t.y2-o.box.height()/2:t.x2,this.positionLabel(o,r,i)))},p.prototype.autoRotateLabels=function(){$o.prototype.autoRotateLabels.call(this),this.autoRotateRangeLabels()},p.prototype.hideOutOfRangeLabels=function(){$o.prototype.hideOutOfRangeLabels.call(this),this.hideOverlappingLabels()},p.prototype.hideOverlappingLabels=function(){var t=this.rangeLabels,e=this.labels;if(0!==t.length){var o=t[0];if(o&&o.options.visible)for(var i=0;i<e.length&&s(o,e[i]);i++);var r=t[1];if(r&&r.options.visible)for(var n=e.length-1;0<n&&s(r,e[n]);--n);}function s(t,e){return(!e.options.visible||e.box.overlaps(t.box))&&(e.options.visible=!1,1)}},p.prototype.contentBox=function(){for(var t=$o.prototype.contentBox.call(this),e=this.rangeLabels,o=0;o<e.length;o++){var i=e[o];i.options.visible&&t.wrap(i.box)}return t},p.prototype.createAxisLabel=function(t,e,o){void 0===o&&(o={});var i=this.options,i=i.dataItems&&!i.maxDivisions?i.dataItems[t]:null,r=this.divisionRange.dateAt(t),n=e.dateFormats[this.divisionRange.options.baseUnit],n=(e.format=e.format||n,o.dataItem=i,this.axisLabelText(r,e,o));if(n)return new Xe(r,n,t,i,e)},p.prototype.createRangeLabels=function(){var i=this,t=this.divisionRange,e=t.displayStart,t=t.displayEnd,o=this.options,r=Object.assign({},o.labels,o.rangeLabels,{align:C,zIndex:o.zIndex});!0===r.visible&&(this.normalizeLabelRotation(r),r.alignRotation=C,"auto"===r.rotation&&(r.rotation=0,o.autoRotateRangeLabels=!0),o=r.dateFormats[this.divisionRange.options.baseUnit],r.format=r.format||o,(o=function(t,e,o){o&&(e=new Xe(e,o,t,null,r),i.append(e),i.rangeLabels.push(e))})(0,e,this.axisLabelText(e,r,{index:0,count:2})),o(1,t,this.axisLabelText(t,r,{index:1,count:2})))},p.prototype.autoRotateRangeLabels=function(){var t,e,i=this,o=this.rangeLabels;this.options.autoRotateRangeLabels&&!this.options.vertical&&2===o.length&&(t=function(t,e,o){e=2*Math.abs(e[o+1]-e[o]),o=i.autoRotateLabelAngle(t.box,e);0!==o&&(t.options.rotation=o,t.reflow(new R))},e=this.getMajorTickPositions(),t(o[0],e,0),t(o[1],e,e.length-2))},p.prototype.categoryIndex=function(t){return this.dataRange.valueIndex(t)},p.prototype.slot=function(t,e,o){var i=this.dataRange,i=(t instanceof Date&&(t=i.dateIndex(t)),e instanceof Date&&(e=i.dateIndex(e)),this.getSlot(t,e,o));if(i)return i.toRect()},p.prototype.getSlot=function(t,e,o){return"object"==typeof t&&(t=this.categoryIndex(t)),"object"==typeof e&&(e=this.categoryIndex(e)),$o.prototype.getSlot.call(this,t,e,o)},p.prototype.valueRange=function(){var t=Yo(this.options.srcCategories);return{min:Mo(t.min),max:Mo(t.max)}},p.prototype.categoryAt=function(t,e){return this.dataRange.dateAt(t,e)},p.prototype.categoriesCount=function(){return this.dataRange.valuesCount()},p.prototype.rangeIndices=function(){return this.dataRange.displayIndices()},p.prototype.labelsBetweenTicks=function(){return!this.divisionRange.options.justified},p.prototype.prepareUserOptions=function(){this.isEmpty()||(this.options.categories=this.dataRange.values())},p.prototype.getCategory=function(t){t=this.pointCategoryIndex(t);return null===t?null:this.dataRange.dateAt(t)},p.prototype.totalIndex=function(t){return this.dataRange.totalIndex(t)},p.prototype.currentRangeIndices=function(){var t=this.dataRange.valueRange();return{min:this.dataRange.totalIndex(t.min),max:this.dataRange.totalIndex(t.max)}},p.prototype.totalRange=function(){return this.dataRange.total()},p.prototype.totalCount=function(){return this.dataRange.totalCount()},p.prototype.isEmpty=function(){return!this.options.srcCategories.length},p.prototype.roundedRange=function(){if(!1!==this.options.roundToBaseUnit||this.isEmpty())return this.range();var t=this.options,e=Yo(t.srcCategories);return new Qo(e.min,e.max,Object.assign({},t,{justified:!1,roundToBaseUnit:!0,justifyEnd:t.justified})).displayRange()};var $o,h=p;function p(){$o.apply(this,arguments)}i(h,{type:U,labels:{dateFormats:o},rangeLabels:{visible:!1},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 Jo=h;function ti(t,e){return M(Math.floor(t/e)*e,F)}function ei(t,e){return M(Math.ceil(t/e)*e,F)}function oi(t){return Math.max(Math.min(t,3e5),-3e5)}var ii,ri=Math.pow(10,-9),h=((ii=po)&&(ni.__proto__=ii),((ni.prototype=Object.create(ii&&ii.prototype)).constructor=ni).prototype.initUserOptions=function(t){a=t.seriesMin,o=t.seriesMax,i=(r=t).narrowRange,e=function(t){if(!t&&!o)return 0;if(0<=t&&0<=o){var e=t===o?0:t;if(!1===i||!i&&.2<(o-e)/o)return 0;e=Math.max(0,e-(o-e)/2)}else e=t;return e}(a),a=function(t,e,o){if(!t&&!e)return 1;if(t<=0&&e<=0){var i=t===e?0:e,r=Math.abs((i-t)/i);if(!1===o||!o&&.2<r)return 0;r=Math.min(0,i-(t-i)/2)}else r=e;return r}(a,o,i),n=te(e,a),!(s={majorUnit:n})!==r.roundToMajorUnit&&(e<0&&si(e,n,1/3)&&(e-=n),0<a&&si(a,n,1/3)&&(a+=n)),s.min=ti(e,n),s.max=ei(a,n);var o,i,e,r=s,n=(this.totalOptions=(e=r,{min:T((a=t).min)?Math.min(e.min,a.min):e.min,max:T(a.max)?Math.max(e.max,a.max):e.max,majorUnit:e.majorUnit}),r),s=t,a=s;if(s){for(var h=s,p=["min","max"],l=0;l<p.length;l++){var c=p[l];null===h[c]&&(h[c]=void 0)}var u=T(s.min),d=T(s.max),f=u||d;f&&s.min===s.max&&(0<s.min?s.min=0:s.max=1),s.majorUnit?(n.min=ti(n.min,s.majorUnit),n.max=ei(n.max,s.majorUnit)):f&&(a=x(n,s),n.majorUnit=te(a.min,a.max))}return n.minorUnit=(a.majorUnit||n.majorUnit)/5,(f=x(n,a)).min>=f.max&&(u&&!d?f.max=f.min+f.majorUnit:!u&&d&&(f.min=f.max-f.majorUnit)),f},ni.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},ni.prototype.clone=function(){return new ni(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},ni.prototype.startValue=function(){return 0},ni.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},ni.prototype.getDivisions=function(t){if(0===t)return 1;var e=this.options,e=e.max-e.min;return Math.floor(M(e/t,3))+1},ni.prototype.getTickPositions=function(t,e){var o=this.options,i=this.lineInfo(),r=i.axisDir,n=i.axisOrigin,s=i.lineBox,a=t*(i.lineSize/(o.max-o.min)),h=this.getDivisions(t),p=[],l=s[n],c=0;e&&(c=e/t);for(var u=0;u<h;u++)u%c!=0&&p.push(M(l,3)),l+=a*r;return p},ni.prototype.getMajorTickPositions=function(){return this.getTickPositions(this.options.majorUnit)},ni.prototype.getMinorTickPositions=function(){return this.getTickPositions(this.options.minorUnit)},ni.prototype.getSlot=function(t,e,o){void 0===o&&(o=!1);var i=this.options,r=this.lineInfo(),n=r.axis,s=r.axisDir,a=r.lineBox,h=r.lineSize,r=r.lineStart,h=s*(h/(i.max-i.min)),p=O(t,e||0),e=O(e,t||0),t=(o&&(p=_(p,i.min,i.max),e=_(e,i.min,i.max)),Math.min(p,e)-i.min),o=Math.max(p,e)-i.min,p=new R(a.x1,a.y1,a.x1,a.y1);return p[n+1]=oi(r+h*(0<s?t:o)),p[n+2]=oi(r+h*(0<s?o:t)),p},ni.prototype.getValue=function(t){var e=this.options,o=Number(e.max),e=Number(e.min),t=this.pointOffset(t);return t<0||1<t?null:M(e+t*(o-e),F)},ni.prototype.translateRange=function(t){var e=this.options,o=e.vertical,i=e.reverse,r=e.max,e=e.min,n=this.lineInfo().lineSize,t=M(t/(n/(r-e)),F);return{min:e+(t=!o&&!i||o&&i?t:-t),max:r+t,offset:t}},ni.prototype.labelsCount=function(){return this.getDivisions(this.options.majorUnit)},ni.prototype.createAxisLabel=function(t,e,o){var i=this.options,i=M(i.min+t*i.majorUnit,F),o=this.axisLabelText(i,e,o);return new Xe(i,o,t,null,e)},ni.prototype.shouldRenderNote=function(t){var e=this.range();return e.min<=t&&t<=e.max},ni.prototype.pan=function(t){t=this.translateRange(t);return this.limitRange(t.min,t.max,this.totalMin,this.totalMax,t.offset)},ni.prototype.pointsRange=function(t,e){var t=this.getValue(t),e=this.getValue(e),o=Math.min(t,e),t=Math.max(t,e);if(this.isValidRange(o,t))return{min:o,max:t}},ni.prototype.scaleRange=function(t,e){var e=Math.abs(this.pointOffset(e)),o=this.options.max-this.options.min,t=this.scaleToDelta(t,o),o=(1-e)*t,e=M(this.options.min+e*t,F),t=M(this.options.max-o,F);return{min:e,max:t=t-e<ri?e+ri:t}},ni.prototype.zoomRange=function(t,e){var o=this.totalMin,i=this.totalMax,t=this.scaleRange(t,e);return{min:_(t.min,o,i),max:_(t.max,o,i),narrowRange:!1}},ni.prototype.isValidRange=function(t,e){return ri<e-t},ni);function ni(t,e,o,i){ii.call(this,Object.assign({},o,{seriesMin:t,seriesMax:e}),i)}function si(t,e,o){t=M(Math.abs(t%e),F);return 0===t||e*(1-o)<t}i(h,{type:"numeric",min:0,max:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:D},labels:{format:"#.####################"},zIndex:1});var ai,hi=h,h=((ai=po)&&(pi.__proto__=ai),((pi.prototype=Object.create(ai&&ai.prototype)).constructor=pi).prototype.clone=function(){return new pi(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},pi.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},pi.prototype.getDivisions=function(t){var e=this.options;return Math.floor(Ho(e.min,e.max,e.baseUnit)/t+1)},pi.prototype.getTickPositions=function(t){for(var e=this.options,o=this.lineInfo(),i=o.axisDir,r=o.lineSize,n=o.lineStart,s=this.getDivisions(t),a=r/Io(e.max,e.min),h=e.weekStartDay||0,p=[n],l=1;l<s;l++){var c=n+Io(Bo(e.min,l*t,e.baseUnit,h),e.min)*a*i;p.push(M(c,3))}return p},pi.prototype.getMajorTickPositions=function(){return this.getTickPositions(this.options.majorUnit)},pi.prototype.getMinorTickPositions=function(){return this.getTickPositions(this.options.minorUnit)},pi.prototype.getSlot=function(t,e,o){return hi.prototype.getSlot.call(this,Uo(this.intlService,t),Uo(this.intlService,e),o)},pi.prototype.getValue=function(t){t=hi.prototype.getValue.call(this,t);return null!==t?Mo(t):null},pi.prototype.labelsCount=function(){return this.getDivisions(this.options.majorUnit)},pi.prototype.createAxisLabel=function(t,e,o){var i=this.options,r=t*i.majorUnit,n=i.weekStartDay||0,s=i.min,r=(0<r&&(s=Bo(s,r,i.baseUnit,n)),e.dateFormats[i.baseUnit]),n=(e.format=e.format||r,this.axisLabelText(s,e,o));return new Xe(s,n,t,null,e)},pi.prototype.translateRange=function(t){var e=this.options,o=this.lineBox(),i=e.vertical,r=e.reverse,o=i?o.height():o.width(),n=this.range(),o=o/Io(n.max,n.min),n=M(t/o,F);return{min:To(e.min,n=!i&&!r||i&&r?n:-n),max:To(e.max,n),offset:n}},pi.prototype.shouldRenderNote=function(t){var e=this.range();return 0<=Lo(t,e.min)&&Lo(t,e.max)<=0},pi.prototype.pan=function(t){t=this.translateRange(t,!0),t=this.limitRange(zo(t.min),zo(t.max),this.totalMin,this.totalMax,t.offset);if(t)return{min:Mo(t.min),max:Mo(t.max)}},pi.prototype.pointsRange=function(t,e){var t=this.getValue(t),e=this.getValue(e),o=Math.min(t,e),t=Math.max(t,e);return{min:Mo(o),max:Mo(t)}},pi.prototype.scaleRange=function(t,e){var e=Math.abs(this.pointOffset(e)),o=this.options.max-this.options.min,t=this.scaleToDelta(t,o),o=e*t,e=(1-e)*t,t=Mo(zo(this.options.min)+o),o=Mo(zo(this.options.max)-e);return{min:t,max:o=o-t<1e3?Mo(zo(t)+1e3):o}},pi.prototype.zoomRange=function(t,e){t=this.scaleRange(t,e);return{min:Mo(_(zo(t.min),this.totalMin,this.totalMax)),max:Mo(_(zo(t.max),this.totalMin,this.totalMax))}},pi);function pi(t,e,o,i){var r,n,s,a,h,p,l,c,t=Mo(t),e=Mo(e),u=i.intl,o=o||{},d=(d=t,r=e,n=o=x(o||{},{min:Uo(u,o.min),max:Uo(u,o.max),axisCrossingValue:Fo(u,o.axisCrossingValues||o.axisCrossingValue),weekStartDay:No(o,u)}),d=n.min||d,r=n.max||r,s=n.baseUnit||(r&&d?(s=Po(r,d),a=fo,ko<=s?a=mo:So<=s?a=vo:Co<=s?a=yo:wo<=s&&(a=go),a):fo),a=Ao[s],h=n.weekStartDay||0,d=Ro(zo(d)-1,s,h)||Mo(r),r=Eo(zo(r)+1,s,h),p=n.majorUnit||ei(te(d.getTime(),r.getTime()),a)/a,l=ei(l=Ho(d,r,s),p)-l,c=Math.floor(l/2),l-=c,n.baseUnit||delete n.baseUnit,n.baseUnit=n.baseUnit||s,n.min=n.min||Bo(d,-c,s,h),n.max=n.max||Bo(r,l,s,h),n.minorUnit=n.minorUnit||p/5,n.majorUnit=p,o=n,ai.call(this,o,i),this.intlService=u,this.seriesMin=t,this.seriesMax=e,o.weekStartDay||0);this.totalMin=zo(Ro(zo(t)-1,o.baseUnit,d)),this.totalMax=zo(Eo(zo(e)+1,o.baseUnit,d))}i(h,{type:U,majorGridLines:{visible:!0,width:1,color:D},labels:{dateFormats:o}});var li,ci=h,o=((li=po)&&(ui.__proto__=li),((ui.prototype=Object.create(li&&li.prototype)).constructor=ui).prototype.clone=function(){return new ui(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},ui.prototype.startValue=function(){return this.options.min},ui.prototype.getSlot=function(t,e,o){var i=this.options,r=this.logMin,n=this.logMax,s=i.majorUnit,a=i.min,i=i.max,h=this.lineInfo(),p=h.axis,l=h.axisDir,c=h.lineBox,u=h.lineSize,h=h.lineStart,u=l*(u/(n-r)),n=O(t,e||1),e=O(e,t||1);if(n<=0||e<=0)return null;o&&(n=_(n,a,i),e=_(e,a,i));n=fi(n,s),e=fi(e,s),t=Math.min(n,e)-r,o=Math.max(n,e)-r,a=new R(c.x1,c.y1,c.x1,c.y1);return a[p+1]=oi(h+u*(0<l?t:o)),a[p+2]=oi(h+u*(0<l?o:t)),a},ui.prototype.getValue=function(t){var e=this.options,o=this.logMin,i=this.logMax,e=e.majorUnit,r=this.lineInfo(),n=r.axis,s=r.axisDir,a=r.lineStart,r=r.lineSize,s=s*(t[n]-a);return s<0||r<s?null:M(Math.pow(e,o+s*((i-o)/r)),F)},ui.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},ui.prototype.translateRange=function(t){var e=this.options,o=this.logMin,i=this.logMax,r=e.reverse,n=e.vertical,e=e.majorUnit,s=this.lineBox(),s=n?s.height():s.width(),t=M(t/(s/(i-o)),F);return!n&&!r||n&&r||(t=-t),{min:Math.pow(e,o+t),max:Math.pow(e,i+t),offset:t}},ui.prototype.labelsCount=function(){var t=Math.floor(this.logMax);return Math.floor(t-this.logMin)+1},ui.prototype.getMajorTickPositions=function(){var e=[];return this.traverseMajorTicksPositions(function(t){e.push(t)},{step:1,skip:0}),e},ui.prototype.createTicks=function(o){var t=this.options,e=t.majorTicks,i=t.minorTicks,r=t.vertical,n=t.labels.mirror,s=this.lineBox(),a={vertical:r};function h(t,e){a.tickX=n?s.x2:s.x2-e.size,a.tickY=n?s.y1-e.size:s.y1,a.position=t,o.append(so(a,e))}return e.visible&&this.traverseMajorTicksPositions(h,e),i.visible&&this.traverseMinorTicksPositions(h,i),[]},ui.prototype.createGridLines=function(t){var e=this.options,o=e.minorGridLines,i=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){u(t,n)||(r.position=t,s.append(ao(r,e)),n.push(t))}return i.visible&&this.traverseMajorTicksPositions(a,i),o.visible&&this.traverseMinorTicksPositions(a,o),s.children},ui.prototype.traverseMajorTicksPositions=function(t,e){for(var o=this.lineInfo(),i=o.lineStart,r=o.step,n=this.logMin,s=this.logMax,a=Math.ceil(n)+e.skip;a<=s;a+=e.step)t(M(i+r*(a-n),F),e)},ui.prototype.traverseMinorTicksPositions=function(t,e){for(var o=this.options,i=o.min,r=o.max,n=o.minorUnit,s=o.majorUnit,o=this.lineInfo(),a=o.lineStart,h=o.step,p=this.logMin,l=this.logMax,c=Math.floor(p);c<l;c++)for(var u=this._minorIntervalOptions(c),d=e.skip;d<n;d+=e.step){var f=u.value+d*u.minorStep;if(r<f)break;i<=f&&t(M(a+h*(fi(f,s)-p),F),e)}},ui.prototype.createAxisLabel=function(t,e,o){var i=Math.ceil(this.logMin+t),i=Math.pow(this.options.majorUnit,i),o=this.axisLabelText(i,e,o);return new Xe(i,o,t,null,e)},ui.prototype.shouldRenderNote=function(t){var e=this.range();return e.min<=t&&t<=e.max},ui.prototype.pan=function(t){t=this.translateRange(t);return this.limitRange(t.min,t.max,this.totalMin,this.totalMax,t.offset)},ui.prototype.pointsRange=function(t,e){t=this.getValue(t),e=this.getValue(e);return{min:Math.min(t,e),max:Math.max(t,e)}},ui.prototype.scaleRange=function(t,e){var o=this.options.majorUnit,i=fi(this.options.min,o),r=fi(this.options.max,o),e=Math.abs(this.pointOffset(e)),t=this.scaleToDelta(t,r-i),i=Math.pow(o,i+e*t),o=Math.pow(o,r-(1-e)*t);return{min:i,max:o=o-i<1e-6?i+1e-6:o}},ui.prototype.zoomRange=function(t,e){var t=this.scaleRange(t,e),e=this.totalMin,o=this.totalMax;return{min:_(t.min,e,o),max:_(t.max,e,o)}},ui.prototype._minorIntervalOptions=function(t){var e=this.options,o=e.minorUnit,e=e.majorUnit,i=Math.pow(e,t);return{value:i,minorStep:(Math.pow(e,t+1)-i)/o}},ui.prototype.lineInfo=function(){var t=li.prototype.lineInfo.call(this);return t.step=t.axisDir*(t.lineSize/(this.logMax-this.logMin)),t},ui);function ui(t,e,o,i){var r,n,s,a,h,p=x({majorUnit:10,min:t,max:e},o),l=p.majorUnit,c=(c=M(fi(h=e,u=l),F)%1,h<=0?u:0!=c&&(c<.3||.9<c)?Math.pow(u,fi(h,u)+.2):Math.pow(u,Math.ceil(fi(h,u)))),u=(h=t,s=(u=p).majorUnit,(a=h)<=0?a=e<=1?Math.pow(s,-2):1:u.narrowRange||(a=Math.pow(s,Math.floor(fi(h,s)))),a),d=(h=u,s=c,a=o,r=(d=p).min,n=d.max,T(d.axisCrossingValue)&&d.axisCrossingValue<=0&&di(),T(a.max)?a.max<=0&&di():n=s,T(a.min)?a.min<=0&&di():r=h,{min:r,max:n});p.max=d.max,p.min=d.min,p.minorUnit=o.minorUnit||M(l-1,F),li.call(this,p,i),this.totalMin=T(o.min)?Math.min(u,o.min):u,this.totalMax=T(o.max)?Math.max(c,o.max):c,this.logMin=M(fi(d.min,l),F),this.logMax=M(fi(d.max,l),F),this.seriesMin=t,this.seriesMax=e,this.createLabels()}function di(){throw new Error("Non positive values cannot be used for a logarithmic axis")}function fi(t,e){return Math.log(t)/Math.log(e)}i(o,{type:"log",majorUnit:10,minorUnit:1,axisCrossingValue:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:D},zIndex:1,_deferLabels:!0});var gi,yi=o,h={createGridLines:function(t){var e,o=this.options,i=Math.abs(this.box.center().y-t.lineBox().y1),r=[],n=!1;return o.majorGridLines.visible&&(e=this.majorGridLineAngles(t),n=!0,r=this.renderMajorGridLines(e,i,o.majorGridLines)),o.minorGridLines.visible&&(e=this.minorGridLineAngles(t,n),Tt(r,this.renderMinorGridLines(e,i,o.minorGridLines,t,n))),r},renderMajorGridLines:function(t,e,o){return this.renderGridLines(t,e,o)},renderMinorGridLines:function(t,e,o,i,r){i=this.radiusCallback&&this.radiusCallback(e,i,r);return this.renderGridLines(t,e,o,i)},renderGridLines:function(t,e,o,i){for(var r={stroke:{width:o.width,color:o.color,dashType:o.dashType}},o=this.box.center(),n=new b.geometry.Circle([o.x,o.y],e),s=this.gridLinesVisual(),a=0;a<t.length;a++){var h=new b.drawing.Path(r);i&&(n.radius=i(t[a])),h.moveTo(n.center).lineTo(n.pointAt(t[a]+180)),s.append(h)}return s.children},gridLineAngles:function(t,e,o,i,r){var n=this,e=this.intervals(e,o,i,r),o=t.options,s=o.visible&&!1!==(o.line||{}).visible;return St(e,function(t){t=n.intervalAngle(t);if(!s||90!==t)return t})}},o=((gi=Wo)&&(vi.__proto__=gi),((vi.prototype=Object.create(gi&&gi.prototype)).constructor=vi).prototype.range=function(){return{min:0,max:this.options.categories.length}},vi.prototype.reflow=function(t){this.box=t,this.reflowLabels()},vi.prototype.lineBox=function(){return this.box},vi.prototype.reflowLabels=function(){for(var t=this.labels,e=this.options.labels,o=e.skip||0,i=e.step||1,r=new R,n=0;n<t.length;n++){t[n].reflow(r);var s=t[n].box;t[n].reflow(this.getSlot(o+n*i).adjacentBox(0,s.width(),s.height()))}},vi.prototype.intervals=function(t,e,o,i){void 0===i&&(i=!1);for(var r,n=this.options,s=n.categories.length/t||1,a=360/s,h=o||1,p=[],l=e||0;l<s;l+=h)r=n.reverse?360-l*a:l*a,r=M(r,3)%360,i&&u(r,i)||p.push(r);return p},vi.prototype.majorIntervals=function(){return this.intervals(1)},vi.prototype.minorIntervals=function(){return this.intervals(.5)},vi.prototype.intervalAngle=function(t){return(360+t+this.options.startAngle)%360},vi.prototype.majorAngles=function(){var e=this;return St(this.majorIntervals(),function(t){return e.intervalAngle(t)})},vi.prototype.createLine=function(){return[]},vi.prototype.majorGridLineAngles=function(t){var e=this.options.majorGridLines;return this.gridLineAngles(t,1,e.skip,e.step)},vi.prototype.minorGridLineAngles=function(t,e){var o=this.options,i=o.minorGridLines,o=o.majorGridLines,e=e?this.intervals(1,o.skip,o.step):null;return this.gridLineAngles(t,.5,i.skip,i.step,e)},vi.prototype.radiusCallback=function(e,t,o){var i,r;if(t.options.type!==j)return t=jt(360/(2*this.options.categories.length)),i=Math.cos(t)*e,r=this.majorAngles(),function(t){return!o&&u(t,r)?e:i}},vi.prototype.createPlotBands=function(){for(var t=this.options.plotBands||[],e=this._plotbandGroup=new b.drawing.Group({zIndex:-1}),o=0;o<t.length;o++){var i=t[o],r=this.plotBandSlot(i),n=this.getSlot(i.from),s=i.from-Math.floor(i.from),a=(r.startAngle+=s*n.angle,Math.ceil(i.to)-i.to),a=(r.angle-=(a+s)*n.angle,ye.current.createRing(r,{fill:{color:i.color,opacity:i.opacity},stroke:{opacity:i.opacity}}));e.append(a)}this.appendVisual(e)},vi.prototype.plotBandSlot=function(t){return this.getSlot(t.from,t.to-1)},vi.prototype.getSlot=function(t,e){var o=this.options,i=o.justified,r=this.box,n=this.majorAngles(),s=n.length,a=360/s,o=(o.reverse&&!i&&(t=(t+1)%s),n[t=_(Math.floor(t),0,s-1)]),n=(i&&(o-=a/2)<0&&(o+=360),a*(_(Math.ceil(e||t),t,s-1)-t+1));return new le(r.center(),0,r.height()/2,o,n)},vi.prototype.slot=function(t,e){var t=this.getSlot(t,e),e=t.startAngle+180,o=e+t.angle;return new b.geometry.Arc([t.center.x,t.center.y],{startAngle:e,endAngle:o,radiusX:t.radius,radiusY:t.radius})},vi.prototype.pointCategoryIndex=function(t){for(var e=this.options.categories.length,o=null,i=0;i<e;i++)if(this.getSlot(i).containsPoint(t)){o=i;break}return o},vi);function vi(){gi.apply(this,arguments)}i(o,{startAngle:90,labels:{margin:P(10)},majorGridLines:{visible:!0},justified:!0}),x(o.prototype,h);var mi,xi=o,o=((mi=po)&&(_i.__proto__=mi),((_i.prototype=Object.create(mi&&mi.prototype)).constructor=_i).prototype.getDivisions=function(t){return hi.prototype.getDivisions.call(this,t)-1},_i.prototype.reflow=function(t){this.box=t,this.reflowLabels()},_i.prototype.reflowLabels=function(){for(var t=this.options,e=this.labels,o=this.options.labels,i=o.skip||0,o=o.step||1,r=new R,n=this.intervals(t.majorUnit,i,o),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()))}},_i.prototype.lineBox=function(){return this.box},_i.prototype.intervals=function(t,e,o,i){void 0===i&&(i=!1);for(var r=this.options.min,n=this.getDivisions(t),s=[],a=o||1,h=e||0;h<n;h+=a){var p=(360+r+h*t)%360;i&&u(p,i)||s.push(p)}return s},_i.prototype.majorIntervals=function(){return this.intervals(this.options.majorUnit)},_i.prototype.minorIntervals=function(){return this.intervals(this.options.minorUnit)},_i.prototype.intervalAngle=function(t){return(540-t-this.options.startAngle)%360},_i.prototype.createLine=function(){return[]},_i.prototype.majorGridLineAngles=function(t){var e=this.options.majorGridLines;return this.gridLineAngles(t,this.options.majorUnit,e.skip,e.step)},_i.prototype.minorGridLineAngles=function(t,e){var o=this.options,i=o.minorGridLines,r=o.majorGridLines,e=e?this.intervals(o.majorUnit,r.skip,r.step):null;return this.gridLineAngles(t,o.minorUnit,i.skip,i.step,e)},_i.prototype.plotBandSlot=function(t){return this.getSlot(t.from,t.to)},_i.prototype.getSlot=function(t,e){var o=this.options,i=this.box,r=o.startAngle,t=_(t,o.min,o.max),e=_(e||t,t,o.max);return o.reverse&&(t*=-1,e*=-1),(e=(540-e-r)%360)<(t=(540-t-r)%360)&&(o=t,t=e,e=o),new le(i.center(),0,i.height()/2,t,e-t)},_i.prototype.slot=function(t,e){var o=this.options,i=360-o.startAngle,r=this.getSlot(t,e=void 0===e?t:e),n=Math.min(t,e),t=Math.max(t,e),e=o.reverse?(s=n,t):(s=360-t,360-n),s=(s+i)%360;return new b.geometry.Arc([r.center.x,r.center.y],{startAngle:s,endAngle:e=(e+i)%360,radiusX:r.radius,radiusY:r.radius})},_i.prototype.getValue=function(t){var e=this.options,o=this.box.center(),i=t.x-o.x,t=t.y-o.y,o=Math.round(Ot(Math.atan2(t,i))),t=e.startAngle;return e.reverse||(o*=-1,t*=-1),(o+t+360)%360},_i.prototype.valueRange=function(){return{min:0,max:2*Math.PI}},_i);function _i(t,e){mi.call(this,t,e);t=this.options;t.minorUnit=t.minorUnit||t.majorUnit/2}i(o,{type:"polar",startAngle:0,reverse:!1,majorUnit:60,min:0,max:360,labels:{margin:P(10)},majorGridLines:{color:D,visible:!0,width:1},minorGridLines:{color:"#aaa"}}),x(o.prototype,h,{createPlotBands:xi.prototype.createPlotBands,majorAngles:xi.prototype.majorAngles,range:hi.prototype.range,labelsCount:hi.prototype.labelsCount,createAxisLabel:hi.prototype.createAxisLabel});var bi=o;function wi(t,e){return 180-Math.abs(Math.abs(t-e)-180)}var Ci,h={options:{majorGridLines:{visible:!0}},createPlotBands:function(){var t=this.options,e=t.majorGridLines.type,o=t.plotBands;void 0===o&&(o=[]);for(var t=this.plotArea.polarAxis,i=t.majorAngles(),r=t.box.center(),n=this._plotbandGroup=new b.drawing.Group({zIndex:-1}),s=0;s<o.length;s++){var a=o[s],h={fill:{color:a.color,opacity:a.opacity},stroke:{opacity:a.opacity}},a=this.getSlot(a.from,a.to,!0),a=new le(r,r.y-a.y2,r.y-a.y1,0,360),a=e===j?ye.current.createRing(a,h):b.drawing.Path.fromPoints(this.plotBandPoints(a,i),h).close();n.append(a)}this.appendVisual(n)},plotBandPoints:function(t,e){for(var o=[],i=[],r=[t.center.x,t.center.y],n=new b.geometry.Circle(r,t.innerRadius),s=new b.geometry.Circle(r,t.radius),a=0;a<e.length;a++)o.push(n.pointAt(e[a]+180)),i.push(s.pointAt(e[a]+180));return o.reverse(),o.push(o[0]),i.push(i[0]),i.concat(o)},createGridLines:function(t){var e=this.options,o=this.radarMajorGridLinePositions(),i=t.majorAngles(),t=t.box.center(),r=[];return e.majorGridLines.visible&&(r=this.renderGridLines(t,o,i,e.majorGridLines)),e.minorGridLines.visible&&(o=this.radarMinorGridLinePositions(),Tt(r,this.renderGridLines(t,o,i,e.minorGridLines))),r},renderGridLines:function(t,e,o,i){var r={stroke:{width:i.width,color:i.color,dashType:i.dashType}},n=i.skip,s=(void 0===n&&(n=0),i.step);void 0===s&&(s=0);for(var a=this.gridLinesVisual(),h=n;h<e.length;h+=s){var p=t.y-e[h];if(0<p){var l=new b.geometry.Circle([t.x,t.y],p);if(i.type===j)a.append(new b.drawing.Circle(l,r));else{for(var c=new b.drawing.Path(r),u=0;u<o.length;u++)c.lineTo(l.pointAt(o[u]+180));c.close(),a.append(c)}}}return a.children},getValue:function(t){var e,o,i=this.lineBox(),r=this.plotArea.polarAxis,n=r.majorAngles(),r=r.box.center(),s=t.distanceTo(r),a=s;return this.options.majorGridLines.type!==j&&1<n.length&&(e=t.x-r.x,t=t.y-r.y,o=(Ot(Math.atan2(t,e))+540)%360,n.sort(function(t,e){return wi(t,o)-wi(e,o)}),r=90-wi(n[0],n[1])/2,t=180-wi(o,n[0])-r,a=s*(Math.sin(jt(t))/Math.sin(jt(r)))),this.axisType().prototype.getValue.call(this,new B(i.x1,i.y2-a))}},o=((Ci=hi)&&(Si.__proto__=Ci),((Si.prototype=Object.create(Ci&&Ci.prototype)).constructor=Si).prototype.radarMajorGridLinePositions=function(){return this.getTickPositions(this.options.majorUnit)},Si.prototype.radarMinorGridLinePositions=function(){var t=this.options,e=0;return t.majorGridLines.visible&&(e=t.majorUnit),this.getTickPositions(t.minorUnit,e)},Si.prototype.axisType=function(){return Ci},Si);function Si(){Ci.apply(this,arguments)}x(o.prototype,h);var ki,Ai=o,o=((ki=yi)&&(Pi.__proto__=ki),((Pi.prototype=Object.create(ki&&ki.prototype)).constructor=Pi).prototype.radarMajorGridLinePositions=function(){var e=[];return this.traverseMajorTicksPositions(function(t){e.push(t)},this.options.majorGridLines),e},Pi.prototype.radarMinorGridLinePositions=function(){var e=[];return this.traverseMinorTicksPositions(function(t){e.push(t)},this.options.minorGridLines),e},Pi.prototype.axisType=function(){return ki},Pi);function Pi(){ki.apply(this,arguments)}x(o.prototype,h);var Ti=o;function Mi(t){return t<=0?-1:1}(Bi=b.Class)&&(Ii.__proto__=Bi),((Ii.prototype=Object.create(Bi&&Bi.prototype)).constructor=Ii).prototype.process=function(t){var e=t.slice(0),o=[],i=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 o;var n,s=e[0],a=e[1],h=e[2];for(o.push(new b.geometry.Segment(s));s.equals(e[r-1]);)i=!0,e.pop(),r--;if(2===r)return t=this.tangent(s,a,y,v),zt(o).controlOut(this.firstControlPoint(t,s,a,y,v)),o.push(new b.geometry.Segment(a,this.secondControlPoint(t,s,a,y,v))),o;i?(s=e[r-1],a=e[0],h=e[1],l=(t=this.controlPoints(s,a,h))[1],n=t[0]):(t=this.tangent(s,a,y,v),l=this.firstControlPoint(t,s,a,y,v));for(var p,l,c=l,u=0;u<=r-3;u++)this.removeDuplicates(u,e),u+3<=(r=e.length)&&(s=e[u],a=e[u+1],h=e[u+2],p=this.controlPoints(s,a,h),zt(o).controlOut(c),c=p[1],p=p[0],o.push(new b.geometry.Segment(a,p)));return i?(s=e[r-2],a=e[r-1],h=e[0],t=this.controlPoints(s,a,h),zt(o).controlOut(c),o.push(new b.geometry.Segment(a,t[0])),zt(o).controlOut(t[1]),o.push(new b.geometry.Segment(h,n))):(l=this.tangent(a,h,y,v),zt(o).controlOut(c),o.push(new b.geometry.Segment(h,this.secondControlPoint(l,a,h,y,v)))),o},Ii.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)},Ii.prototype.invertAxis=function(t,e,o){var i,r=!1;return t.x===e.x?r=!0:e.x===o.x?(e.y<o.y&&t.y<=e.y||o.y<e.y&&e.y<=t.y)&&(r=!0):(i=this.lineFunction(t,e),i=this.calculateFunction(i,o.x),t.y<=e.y&&o.y<=i||e.y<=t.y&&o.y>=i||(r=!0)),r},Ii.prototype.isLine=function(t,e,o){var i=this.lineFunction(t,e),i=this.calculateFunction(i,o.x);return t.x===e.x&&e.x===o.x||M(i,1)===M(o.y,1)},Ii.prototype.lineFunction=function(t,e){e=(e.y-t.y)/(e.x-t.x);return[t.y-e*t.x,e]},Ii.prototype.controlPoints=function(t,e,o){var i,r=y,n=v,s=!1,a=!1,h=(this.isLine(t,e,o)?i=this.tangent(t,e,y,v):(h={x:this.isMonotonicByField(t,e,o,y),y:this.isMonotonicByField(t,e,o,v)}).x&&h.y?(i=this.tangent(t,o,y,v),s=!0):(this.invertAxis(t,e,o)&&(r=v,n=y),h[r]?i=0:(i=.01*(o[n]<t[n]&&t[n]<=e[n]||t[n]<o[n]&&e[n]<=t[n]?Mi((o[n]-t[n])*(e[r]-t[r])):-Mi((o[r]-t[r])*(e[n]-t[n]))),a=!0)),this.secondControlPoint(i,t,e,r,n)),a=(a&&(a=r,r=n,n=a),this.firstControlPoint(i,e,o,r,n));return s&&(this.restrictControlPoint(t,e,h,i),this.restrictControlPoint(e,o,a,i)),[h,a]},Ii.prototype.restrictControlPoint=function(t,e,o,i){t.y<e.y?e.y<o.y?(o.x=t.x+(e.y-t.y)/i,o.y=e.y):o.y<t.y&&(o.x=e.x-(e.y-t.y)/i,o.y=t.y):o.y<e.y?(o.x=t.x-(t.y-e.y)/i,o.y=e.y):t.y<o.y&&(o.x=e.x+(t.y-e.y)/i,o.y=t.y)},Ii.prototype.tangent=function(t,e,o,i){o=e[o]-t[o],e=e[i]-t[i];return 0==o?0:e/o},Ii.prototype.isMonotonicByField=function(t,e,o,i){return o[i]>e[i]&&e[i]>t[i]||o[i]<e[i]&&e[i]<t[i]},Ii.prototype.firstControlPoint=function(t,e,o,i,r){var n=e[i],o=.333*(o[i]-n);return this.point(n+o,e[r]+o*t,i,r)},Ii.prototype.secondControlPoint=function(t,e,o,i,r){var e=e[i],n=o[i],e=.333*(n-e);return this.point(n-e,o[r]-e*t,i,r)},Ii.prototype.point=function(t,e,o,i){var r=new b.geometry.Point;return r[o]=t,r[i]=e,r},Ii.prototype.calculateFunction=function(t,e){for(var o=t.length,i=0,r=0;r<o;r++)i+=Math.pow(e,r)*t[r];return i};var Oi,Bi,Ri=Ii,Ei=((Oi=b.Class)&&(Li.__proto__=Oi),((Li.prototype=Object.create(Oi&&Oi.prototype)).constructor=Li).prototype.value=function(t){var e=this._axis;return e.getCategory?e.getCategory(t):e.getValue(t)},Li.prototype.slot=function(t,e,o){return this._axis.slot(t,e,o=void 0===o?!0:o)},Li.prototype.range=function(){return this._axis.range()},Li.prototype.valueRange=function(){return this._axis.valueRange()},Li);function Li(t){Oi.call(this),this._axis=t,this.options=t.options}function Ii(t){Bi.call(this),this.closed=t}function zi(t,e){for(var o=0;o<e.length;o++)if(e[o].options.name===t)return e[o].prepareUserOptions(),new Ei(e[o])}function Vi(t){this.visual=t.visual,this.chartsVisual=t.chartContainer.visual,this._pane=t}Vi.prototype.findAxisByName=function(t){return zi(t,this._pane.axes)};var ji,Di=Vi,Hi=((ji=b.Class)&&(Ui.__proto__=ji),(Ui.prototype=Object.create(ji&&ji.prototype)).constructor=Ui);function Ui(t){ji.call(this),this._plotArea=t,this.visual=t.visual,this.backgroundVisual=t._bgVisual}function Fi(t){for(var e=t.length,o=0,i=0;i<e;i++)m(t[i])&&o++;return o}var Ni={min:function(t){for(var e=t.length,o=G,i=0;i<e;i++){var r=t[i];m(r)&&(o=Math.min(o,r))}return o===G?t[0]:o},max:function(t){for(var e=t.length,o=W,i=0;i<e;i++){var r=t[i];m(r)&&(o=Math.max(o,r))}return o===W?t[0]:o},sum:function(t){for(var e=t.length,o=0,i=0;i<e;i++){var r=t[i];m(r)&&(o+=r)}return o},sumOrNull:function(t){var e=null;return e=Fi(t)?Ni.sum(t):e},count:function(t){for(var e=t.length,o=0,i=0;i<e;i++){var r=t[i];null!==r&&T(r)&&o++}return o},avg:function(t){var e=Fi(t),o=t[0];return o=0<e?Ni.sum(t)/e:o},first:function(t){for(var e=t.length,o=0;o<e;o++){var i=t[o];if(null!==i&&T(i))return i}return t[0]}},Gi=Ni;function Wi(t,e){return null===e?e:yt(t)(e)}(Xi=b.Class)&&(qi.__proto__=Xi),((qi.prototype=Object.create(Xi&&Xi.prototype)).constructor=qi).prototype.register=function(t,e,o){void 0===e&&(e=[Y]),void 0===o&&(o={});for(var i=0;i<t.length;i++){var r=t[i];this._valueFields[r]=e,this._otherFields[r]=o,this._nullValue[r]=this._makeValue(e,null),this._undefinedValue[r]=this._makeValue(e,void 0)}},qi.prototype.canonicalFields=function(t){return this.valueFields(t).concat(this.otherFields(t))},qi.prototype.valueFields=function(t){return this._valueFields[t.type]||[Y]},qi.prototype.otherFields=function(t){return this._otherFields[t.type]||[Y]},qi.prototype.bindPoint=function(t,e,o){var i,r,n,s,a=t.data,o=T(o)?o:a[e],a={valueFields:{value:o}},e=this.valueFields(t),h=this._otherFields[t.type];return null===o?i=this._nullValue[t.type]:T(o)?Array.isArray(o)?(r=o.slice(e.length),i=this._bindFromArray(o,e),r=this._bindFromArray(r,h)):"object"==typeof o&&(n=this.sourceFields(t,e),s=this.sourceFields(t,h),i=this._bindFromObject(o,e,n),r=this._bindFromObject(o,h,s)):i=this._undefinedValue[t.type],T(i)&&(1===e.length?a.valueFields.value=i[e[0]]:a.valueFields=i),a.fields=r||{},a},qi.prototype._makeValue=function(t,e){for(var o={},i=t.length,r=0;r<i;r++)o[t[r]]=e;return o},qi.prototype._bindFromArray=function(t,e){var o={};if(e)for(var i=Math.min(e.length,t.length),r=0;r<i;r++)o[e[r]]=t[r];return o},qi.prototype._bindFromObject=function(t,e,o){void 0===o&&(o=e);var i={};if(e)for(var r=e.length,n=0;n<r;n++){var s=e[n],a=o[n];null!==a&&(i[s]=Wi(a,t))}return i},qi.prototype.sourceFields=function(t,e){var o=[];if(e)for(var i=e.length,r=0;r<i;r++){var n=e[r],s=n===Y?"field":n+"Field";o.push(null!==t[s]?t[s]||n:null)}return o};var Xi,h=qi;function qi(){Xi.call(this),this._valueFields={},this._otherFields={},this._nullValue={},this._undefinedValue={}}h.current=new h;var Yi,Zi,Qi=h,Ki=/percent(?:\w*)\((\d+)\)/,$i=new RegExp("^stddev(?:\\((\\d+(?:\\.\\d+)?)\\))?$"),Ji=((Zi=b.Class)&&(gr.__proto__=Zi),((gr.prototype=Object.create(Zi&&Zi.prototype)).constructor=gr).prototype.initGlobalRanges=function(t,e,o){var i,r,n,s,a=e.data,h=$i.exec(t);h?(this.valueGetter=this.createValueGetter(e,o),i=this.getAverage(a),r=this.getStandardDeviation(a,i,!1),h=h[1]?parseFloat(h[1]):1,n={low:i.value-r*h,high:i.value+r*h},this.globalRange=function(){return n}):t.indexOf&&0<=t.indexOf("stderr")&&(this.valueGetter=this.createValueGetter(e,o),s=this.getStandardError(a,this.getAverage(a)),this.globalRange=function(t){return{low:t-s,high:t+s}})},gr.prototype.createValueGetter=function(t,e){var o,i=t.data,r=Qi.current,n=r.valueFields(t),i=T(i[0])?i[0]:{};return Z(i)?o=yt("["+(e?n.indexOf(e):0)+"]"):m(i)?o=yt():"object"==typeof i&&(o=yt(r.sourceFields(t,n)[n.indexOf(e)])),o},gr.prototype.getErrorRange=function(t,e){var o;if(!T(e))return null;if(this.globalRange)return this.globalRange(t);if(Z(e))i=t-e[0],r=t+e[1];else if(m(o=parseFloat(e)))i=t-o,r=t+o;else{if(!(o=Ki.exec(e)))throw new Error("Invalid ErrorBar value: "+e);var e=t*(parseFloat(o[1])/100),i=t-Math.abs(e),r=t+Math.abs(e)}return{low:i,high:r}},gr.prototype.getStandardError=function(t,e){return this.getStandardDeviation(t,e,!0)/Math.sqrt(e.count)},gr.prototype.getStandardDeviation=function(t,e,o){for(var i=t.length,o=o?e.count-1:e.count,r=0,n=0;n<i;n++){var s=this.valueGetter(t[n]);m(s)&&(r+=Math.pow(s-e.value,2))}return Math.sqrt(r/o)},gr.prototype.getAverage=function(t){for(var e=t.length,o=0,i=0,r=0;r<e;r++){var n=this.valueGetter(t[r]);m(n)&&(o+=n,i++)}return{value:o/i,count:i}},gr),tr=(b.support.browser||{}).msie?.001:0,er="zero",or="interpolate",ir="bar",rr="column",nr="line",sr="pie",ar="verticalLine",hr=[ir,rr,"ohlc","candlestick","boxPlot","verticalBoxPlot","bullet","rangeColumn","rangeBar","waterfall","horizontalWaterfall"],pr="drag",lr="dragEnd",cr="zoom",ur="zoomEnd",dr="DOMMouseScroll mousewheel",o=((Yi=r)&&(fr.__proto__=Yi),((fr.prototype=Object.create(Yi&&Yi.prototype)).constructor=fr).prototype.reflow=function(t){var e,o=this.options.endCaps,i=this.isVertical,r=this.getAxis().getSlot(this.low,this.high),n=t.center(),t=this.getCapsWidth(t,i),s=i?n.x:n.y,a=s-t,s=s+t;i?(e=[new B(n.x,r.y1),new B(n.x,r.y2)],o&&e.push(new B(a,r.y1),new B(s,r.y1),new B(a,r.y2),new B(s,r.y2)),this.box=new R(a,r.y1,s,r.y2)):(e=[new B(r.x1,n.y),new B(r.x2,n.y)],o&&e.push(new B(r.x1,a),new B(r.x1,s),new B(r.x2,a),new B(r.x2,s)),this.box=new R(r.x1,a,r.x2,s)),this.linePoints=e},fr.prototype.getCapsWidth=function(t,e){e=e?t.width():t.height();return Math.min(Math.floor(e/2),4)||4},fr.prototype.createVisual=function(){var e=this,t=this.options,o=t.visual;o?this.visual=o({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()},fr.prototype.createDefaultVisual=function(){var t=this.options,e=this.linePoints,o={stroke:{color:t.color,width:t.line.width,dashType:t.line.dashType}};Yi.prototype.createVisual.call(this);for(var i=0;i<e.length;i+=2){var r=new b.drawing.Path(o).moveTo(e[i].x,e[i].y).lineTo(e[i+1].x,e[i+1].y);J(r),this.visual.append(r)}},fr);function fr(t,e,o,i,r,n){Yi.call(this,n),this.low=t,this.high=e,this.isVertical=o,this.chart=i,this.series=r}function gr(t,e,o){Zi.call(this),this.initGlobalRanges(t,e,o)}i(o,{animation:{type:"fadeIn",delay:600},endCaps:!0,line:{width:2},zIndex:1});var yr,vr=o,mr=((yr=vr)&&(xr.__proto__=yr),((xr.prototype=Object.create(yr&&yr.prototype)).constructor=xr).prototype.getAxis=function(){return this.chart.seriesValueAxis(this.series)},xr);function xr(){yr.apply(this,arguments)}function _r(t,e,o,i){void 0===i&&(i=!1);var r,n,s=(o=void 0===o?{}:o).defaults=o.defaults||{},a=o.depth=o.depth||0,h=!1;if(o.excluded=o.excluded||[],5<a)return null;for(r in t)!u(r,o.excluded)&&t.hasOwnProperty(r)&&(it(n=t[r])?(h=!0,i||(t[r]=O(n(e),s[r]))):st(n)&&(i||(o.defaults=s[r]),o.depth++,h=_r(n,e,o,i)||h,o.depth--));return h}function br(t){for(var e=t.length,o=0,i=0;i<e;i++)o=Math.max(o,t[i].data.length);return o}(wr=r)&&(l.__proto__=wr),((l.prototype=Object.create(wr&&wr.prototype)).constructor=l).prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},l.prototype.pointOptions=function(t,e){var o,i=this.seriesOptions[e];return i||(o=this.pointType().prototype.defaults,this.seriesOptions[e]=i=x({},o,{vertical:!this.options.invertAxes},t)),i},l.prototype.plotValue=function(t){if(!t)return 0;if(this.options.isStacked100&&m(t.value)){for(var e=t.categoryIx,o=this.categoryPoints[e],i=[],r=0,n=0;n<o.length;n++){var s,a,h=o[n];h&&(s=t.series.stack,a=h.series.stack,s&&a&&s.group!==a.group||m(h.value)&&(r+=Math.abs(h.value),i.push(Math.abs(h.value))))}if(0<r)return t.value/r}return t.value},l.prototype.plotRange=function(t,e){void 0===e&&(e=0);var o=this.categoryPoints[t.categoryIx];if(this.options.isStacked){for(var i=this.plotValue(t),r=0<=i,n=e,s=!1,a=0;a<o.length;a++){var h=o[a];if(t===h)break;var p=t.series.stack,l=h.series.stack;if(p&&l){if(typeof p===q&&p!==l)continue;if(p.group&&p.group!==l.group)continue}p=this.plotValue(h);(0<=p&&r||p<0&&!r)&&(n+=p,i+=p,s=!0,this.options.isStacked100&&(i=Math.min(i,1)))}return s&&(n-=e),[n,i]}e=t.series,e=this.seriesValueAxis(e),e=this.categoryAxisCrossingValue(e);return[e,ot(t.value)?t.value:e]},l.prototype.stackLimits=function(t,e){for(var o=G,i=W,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],T(a)&&isFinite(a)&&(i=Math.max(i,a),o=Math.min(o,a)))}}return{min:o,max:i}},l.prototype.updateStackRange=function(){var t=this.options,e=t.isStacked,o=t.series,i={};if(e)for(var r=0;r<o.length;r++){var n=o[r],s=n.axis,a=s+n.stack,h=i[a];h||(h=this.stackLimits(s,n.stack),(n=this.errorTotals)&&(n.negative.length&&(h.min=Math.min(h.min,Ut(n.negative).min)),n.positive.length&&(h.max=Math.max(h.max,Ut(n.positive).max))),h.min!==G||h.max!==W?i[a]=h:h=null),h&&(this.valueAxisRanges[s]=h)}},l.prototype.addErrorBar=function(t,e,o){var i,r=t.value,n=t.series,s=t.seriesIx,a=t.options.errorBars,h=e.fields.errorLow,e=e.fields.errorHigh;m(h)&&m(e)?i={low:h,high:e}:a&&T(a.value)&&(this.seriesErrorRanges=this.seriesErrorRanges||[],this.seriesErrorRanges[s]=this.seriesErrorRanges[s]||new Ji(a.value,n,Y),i=this.seriesErrorRanges[s].getErrorRange(r,a.value)),i&&(t.low=i.low,t.high=i.high,this.addPointErrorBar(t,o))},l.prototype.addPointErrorBar=function(t,e){var o,i=!this.options.invertAxes,r=t.options.errorBars,n=t.series,s=t.low,a=t.high,e=(this.options.isStacked?(s=(o=this.stackedErrorRange(t,e)).low,a=o.high):(this.updateRange({value:s},o={categoryIx:e,series:n}),this.updateRange({value:a},o)),new mr(s,a,i,this,n,r));t.errorBars=[e],t.append(e)},l.prototype.stackedErrorRange=function(t,e){var o=this.plotRange(t,0)[1]-t.value,i=t.low+o,t=t.high+o;return this.errorTotals=this.errorTotals||{positive:[],negative:[]},i<0&&(this.errorTotals.negative[e]=Math.min(this.errorTotals.negative[e]||0,i)),0<t&&(this.errorTotals.positive[e]=Math.max(this.errorTotals.positive[e]||0,t)),{low:i,high:t}},l.prototype.addValue=function(t,e){var o=e.categoryIx,i=e.series,r=e.seriesIx,n=this.categoryPoints[o],s=(n||(this.categoryPoints[o]=n=[]),this.seriesPoints[r]),r=(s||(this.seriesPoints[r]=s=[]),this.createPoint(t,e));r&&(Object.assign(r,e),r.owner=this,r.noteText=t.fields.noteText,T(r.dataItem)||(r.dataItem=i.data[o]),this.addErrorBar(r,t,o)),this.points.push(r),s.push(r),n.push(r),this.updateRange(t.valueFields,e)},l.prototype.evalPointOptions=function(t,e,o,i,r,n){var s={defaults:r._defaults,excluded:["data","aggregate","_events","tooltip","content","template","visual","toggle","_outOfRangeMinPoint","_outOfRangeMaxPoint"]},a=this._evalSeries[n],n=(T(a)||(this._evalSeries[n]=a=_r(t,{},s,!0)),t);return a&&_r(n=x({},n),{value:e,category:o,index:i,series:r,dataItem:r.data[i]},s),n},l.prototype.updateRange=function(t,e){var e=e.series.axis,t=t.value,o=this.valueAxisRanges[e];isFinite(t)&&null!==t&&((o=this.valueAxisRanges[e]=o||{min:G,max:W}).min=Math.min(o.min,t),o.max=Math.max(o.max,t))},l.prototype.seriesValueAxis=function(t){var e=this.plotArea,t=t.axis,e=t?e.namedValueAxes[t]:e.valueAxis;if(e)return e;throw new Error("Unable to locate value axis with name "+t)},l.prototype.reflow=function(t){var s=this,a=this.categorySlots=[],h=this.points,p=this.categoryAxis,l=0;this.traverseDataPoints(function(t,e){var o,i=e.categoryIx,e=e.series,e=s.seriesValueAxis(e),r=h[l++],n=a[i];n||(a[i]=n=s.categorySlot(p,i,e)),r&&(i=s.plotRange(r,e.startValue()),(o=s.valueSlot(e,i))?(n=s.pointSlot(n,o),r.aboveAxis=s.aboveAxis(r,e),r.stackValue=i[1],s.options.isStacked100&&(r.percentage=s.plotValue(r)),s.reflowPoint(r,n)):r.visible=!1)}),this.reflowCategories(a),!this.options.clip&&this.options.limitPoints&&this.points.length&&this.limitPoints(),this.box=t},l.prototype.valueSlot=function(t,e){return t.getSlot(e[0],e[1],!this.options.clip)},l.prototype.limitPoints=function(){for(var t=this.categoryPoints,e=t[0].concat(zt(t)),o=0;o<e.length;o++)e[o]&&this.limitPoint(e[o])},l.prototype.limitPoint=function(t){var e=this.categoryAxis.limitSlot(t.box);e.equals(t.box)||t.reflow(e)},l.prototype.aboveAxis=function(t,e){var o=this.categoryAxisCrossingValue(e),t=t.value;return e.options.reverse?t<o:o<=t},l.prototype.categoryAxisCrossingValue=function(t){var e=this.categoryAxis,t=t.options;return[].concat(t.axisCrossingValues||t.axisCrossingValue)[e.axisIndex||0]||0},l.prototype.reflowPoint=function(t,e){t.reflow(e)},l.prototype.reflowCategories=function(){},l.prototype.pointSlot=function(t,e){var o=this.options.invertAxes,i=o?e:t,o=o?t:e;return new R(i.x1,o.y1,i.x2,o.y2)},l.prototype.categorySlot=function(t,e){return t.getSlot(e)},l.prototype.traverseDataPoints=function(t){for(var e=this.options.series,o=br(e),i=e.length,r=0;r<i;r++)this._outOfRangeCallback(e[r],"_outOfRangeMinPoint",r,t);for(var n=0;n<o;n++)for(var s=0;s<i;s++){var a=e[s],h=this.categoryAxis.categoryAt(n);t(this._bindPoint(a,s,n),{category:h,categoryIx:n,categoriesCount:o,series:a,seriesIx:s})}for(var p=0;p<i;p++)this._outOfRangeCallback(e[p],"_outOfRangeMaxPoint",p,t)},l.prototype._outOfRangeCallback=function(t,e,o,i){var r,e=t[e];e&&(r=e.categoryIx,i(this._bindPoint(t,o,r,e.item),{category:e.category,categoryIx:r,series:t,seriesIx:o,dataItem:e.item}))},l.prototype._bindPoint=function(t,e,o,i){this._bindCache||(this._bindCache=[]);var r=this._bindCache[e];return(r=r||(this._bindCache[e]=[]))[o]||(r[o]=Qi.current.bindPoint(t,o,i))},l.prototype.formatPointValue=function(t,e){return null===t.value?"":this.chartService.format.auto(e,t.value)},l.prototype.pointValue=function(t){return t.valueFields.value};var wr,h=l;function l(t,e){wr.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()}i(h,{series:[],invertAxes:!1,isStacked:!1,clip:!0,limitPoints:!0});var Cr,Sr=h,kr={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:Lt(t),originalEvent:t,point:this}}},o={createNote:function(){var t=this.options.notes,e=this.noteText||t.label.text;!1!==t.visible&&T(e)&&null!==e&&(this.note=new Ke({value:this.value,text:e,dataItem:this.dataItem,category:this.category,series:this.series},this.options.notes,this.owner.chartService),this.append(this.note))}},h=((Cr=r)&&(Ar.__proto__=Cr),((Ar.prototype=Object.create(Cr&&Cr.prototype)).constructor=Ar).prototype.render=function(){var t,e,o=this.options,i=o.markers,o=o.labels;this._rendered||(this._rendered=!0,i.visible&&i.size&&(this.marker=this.createMarker(),this.append(this.marker)),o.visible&&(i=dt(o),t=this.pointData(),e=this.value,i?e=i(t):o.format&&(e=this.formatValue(o.format)),this.label=new De(e,x({align:C,vAlign:C,margin:{left:5,right:5},zIndex:O(o.zIndex,this.series.zIndex)},o),t),this.append(this.label)),this.createNote(),this.errorBar&&this.append(this.errorBar))},Ar.prototype.markerBorder=function(){var t=this.options.markers,e=t.background,t=x({color:this.color},t.border);return T(t.color)||(t.color=new b.Color(e).brightness(.8).toHex()),t},Ar.prototype.createVisual=function(){},Ar.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:O(t.zIndex,this.series.zIndex),animation:t.animation,visual:t.visual},{dataItem:this.dataItem,value:this.value,series:this.series,category:this.category})},Ar.prototype.markerBox=function(){return this.marker||(this.marker=this.createMarker(),this.marker.reflow(this._childBox)),this.marker.box},Ar.prototype.reflow=function(t){var e=this.options,o=this.aboveAxis,i=e.vertical,r=(this.render(),(this.box=t).clone());if(i?o?r.y1-=r.height():r.y2+=r.height():o?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&&(t=this.markerBox(),e.markers.visible&&e.markers.size||(i=t.center(),t=new R(i.x,i.y,i.x,i.y)),this.note.reflow(t))},Ar.prototype.reflowLabel=function(t){var e=this.options,o=this.label,e=e.labels.position;o&&(e="below"===(e="above"===e?A:e)?w:e,o.reflow(t),o.box.alignTo(this.markerBox(),e),o.reflow(o.box))},Ar.prototype.createHighlight=function(){var t=this.options.highlight.markers,e=this.markerBorder().color,o=this.options.markers,i=o.size+(o.border.width||0)+(t.border.width||0),i=new Ce({type:o.type,width:i,height:i,rotation:o.rotation,background:t.color||e,border:{color:t.border.color,width:t.border.width,opacity:O(t.border.opacity,1)},opacity:O(t.opacity,1)});return i.reflow(this._childBox),i.getElement()},Ar.prototype.highlightVisual=function(){return(this.marker||{}).visual},Ar.prototype.highlightVisualArgs=function(){var t,e,o,i,r=this.marker;return r?(i=r.paddingBox.toRect(),t=r.visual):(e=(r=this.options.markers.size)/2,o=this.box.center(),i=new b.geometry.Rect([o.x-e,o.y-e],[r,r])),{options:this.options,rect:i,visual:t}},Ar.prototype.tooltipAnchor=function(){var t,e,o=this.markerBox(),i=this.owner.pane.clipBox();if(!i||i.overlaps(o))return i=o.x2+5,e=S,o=this.aboveAxis?(t=o.y1,w):(t=o.y2,A),{point:new B(i,t),align:{horizontal:e,vertical:o}}},Ar.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Ar.prototype.overlapsBox=function(t){return this.markerBox().overlaps(t)},Ar.prototype.unclipElements=function(){this.label&&(this.label.options.noclip=!0),this.note&&(this.note.options.noclip=!0)},Ar.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,stackValue:this.stackValue,series:this.series}},Ar);function Ar(t,e){Cr.call(this),this.value=t,this.options=e,this.aboveAxis=O(this.options.aboveAxis,!0),this.tooltipTracking=!0}h.prototype.defaults={vertical:!0,markers:{visible:!0,background:a,size:8,type:H,border:{width:2},opacity:1},labels:{visible:!1,position:"above",margin:P(3),padding:P(4),animation:{type:"fadeIn",delay:600}},notes:{label:{}},highlight:{markers:{border:{color:"#fff",width:2}},zIndex:100},errorBars:{line:{width:1}}},x(h.prototype,kr),x(h.prototype,o);var Pr,Tr=h,h=((Pr=r)&&(Mr.__proto__=Pr),((Mr.prototype=Object.create(Pr&&Pr.prototype)).constructor=Mr).prototype.points=function(){return this.toGeometryPoints(this.linePoints)},Mr.prototype.toGeometryPoints=function(t){for(var e=[],o=0,i=t.length;o<i;o++)t[o]&&!1!==t[o].visible&&e.push(t[o]._childBox.toRect().center());return e},Mr.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&&!T(this.visual.options.zIndex)&&(this.visual.options.zIndex=this.series.zIndex)):this.segmentVisual()},Mr.prototype.segmentVisual=function(){var t=this.options,e=this.series,o=e.color,i=e._defaults,i=(it(o)&&i&&(o=i.color),b.drawing.Path.fromPoints(this.points(),{stroke:{color:o,width:e.width,opacity:e.opacity,dashType:e.dashType},zIndex:e.zIndex}));t.closed&&i.close(),this.visual=i},Mr.prototype.aliasFor=function(t,e){return this.parent.getNearestPoint(e.x,e.y,this.seriesIx)},Mr);function Mr(t,e,o){Pr.call(this),this.linePoints=t,this.series=e,this.seriesIx=o}i(h,{closed:!1});var Or=h;function Br(t,e,o,i,r){var t=t.box,n=new b.geometry.Point;return n[e]=t[e+o],n[i]=t[i+r],n}var Rr,h={calculateStepPoints:function(t){for(var e=this.parent.plotArea.seriesCategoryAxis(this.series).options,o=e.justified,i=e.vertical,e=e.reverse,r=i?y:v,n=i?v:y,s=e?2:1,a=s,h=Br(t[0],r,s,n,a),p=[h],l=1;l<t.length;l++){var c,u=Br(t[l],r,s,n,a);h[r]!==u[r]&&((c=new b.geometry.Point)[r]=h[r],c[n]=u[n],p.push(c,u)),h=u}return o?h!==zt(p)&&p.push(h):p.push(Br(zt(t),r,s,n,e?1:2)),p}},Er=((Rr=Or)&&(Lr.__proto__=Rr),((Lr.prototype=Object.create(Rr&&Rr.prototype)).constructor=Lr).prototype.points=function(){return this.calculateStepPoints(this.linePoints)},Lr);function Lr(){Rr.apply(this,arguments)}x(Er.prototype,h);var Ir,zr,Vr=Er,jr=((zr=Or)&&(Hr.__proto__=zr),((Hr.prototype=Object.create(zr&&zr.prototype)).constructor=Hr).prototype.segmentVisual=function(){var t=this.series,e=t._defaults,o=t.color,e=(it(o)&&e&&(o=e.color),new Ri(this.options.closed).process(this.points())),o=new b.drawing.Path({stroke:{color:o,width:t.width,opacity:t.opacity,dashType:t.dashType},zIndex:t.zIndex});o.segments.push.apply(o.segments,e),this.visual=o},Hr),Er={renderSegments:function(){var t,e=this.options,o=this.seriesPoints,i=e.series,r=o.length;this._segments=[];for(var n=0;n<r;n++){for(var s=i[n],a=this.sortPoints(o[n]),h=a.length,p=[],l=0;l<h;l++){var c=a[l];c?p.push(c):this.seriesMissingValues(s)!==or&&(1<p.length&&(t=this.createSegment(p,s,n,t),this._addSegment(t)),p=[])}1<p.length&&(t=this.createSegment(p,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?er:t||or},getNearestPoint:function(t,e,o){for(var i,r=new B(t,e),n=this.seriesPoints[o],s=G,a=0;a<n.length;a++){var h,p=n[a];p&&T(p.value)&&null!==p.value&&!1!==p.visible&&((h=p.box.center().distanceTo(r))<s&&(i=p,s=h))}return i}},c=((Ir=b.drawing.Animation)&&(Dr.__proto__=Ir),((Dr.prototype=Object.create(Ir&&Ir.prototype)).constructor=Dr).prototype.setup=function(){this._setEnd(this.options.box.x1)},Dr.prototype.step=function(t){var e=this.options.box;this._setEnd(bt(e.x1,e.x2,t))},Dr.prototype._setEnd=function(t){var e=this.element,o=e.segments,i=o[1].anchor(),o=o[2].anchor();e.suspend(),i.setX(t),e.resume(),o.setX(t)},Dr);function Dr(){Ir.apply(this,arguments)}function Hr(){zr.apply(this,arguments)}i(c,{duration:600}),b.drawing.AnimationFactory.current.register("clip",c);var Ur=c;function Fr(t){for(var e=0;e<t.length;e++)if(T(t[e].zIndex))return!0}var Nr,c={createAnimation:function(){var t,e=this.getRoot();e&&!1!==(e.options||{}).transitions&&(e=e.size(),t=b.drawing.Path.fromRect(e.toRect()),this.visual.clip(t),this.animation=new Ur(t,{box:e}),Fr(this.options.series)&&this._setChildrenAnimation(t))},_setChildrenAnimation:function(t){for(var e=this.animationPoints(),o=0;o<e.length;o++){var i=e[o];i&&i.visual&&T(i.visual.options.zIndex)&&i.visual.clip(t)}}},d=((Nr=Sr)&&(Gr.__proto__=Nr),((Gr.prototype=Object.create(Nr&&Nr.prototype)).constructor=Gr).prototype.render=function(){Nr.prototype.render.call(this),this.updateStackRange(),this.renderSegments()},Gr.prototype.pointType=function(){return Tr},Gr.prototype.createPoint=function(t,e){var o=e.categoryIx,i=e.category,r=e.series,e=e.seriesIx,n=this.seriesMissingValues(r),s=t.valueFields.value;if(!T(s)||null===s){if(n!==er)return null;s=0}n=this.pointOptions(r,e),n=this.evalPointOptions(n,s,i,o,r,e),i=t.fields.color||r.color,it(r.color)&&(i=n.color),o=new Tr(s,n);return o.color=i,this.append(o),o},Gr.prototype.plotRange=function(t){var e=this.plotValue(t);if(this.options.isStacked)for(var o=t.categoryIx,i=this.categoryPoints[o],r=0;r<i.length;r++){var n=i[r];if(t===n)break;e+=this.plotValue(n),this.options.isStacked100&&(e=Math.min(e,1))}return[e,e]},Gr.prototype.createSegment=function(t,e,o){var i=e.style;return new("step"===i?Vr:"smooth"===i?jr:Or)(t,e,o)},Gr.prototype.animationPoints=function(){for(var t=this.points,e=[],o=0;o<t.length;o++)e.push((t[o]||{}).marker);return e.concat(this._segments)},Gr.prototype.supportsPointInactiveOpacity=function(){return!1},Gr);function Gr(){Nr.apply(this,arguments)}x(d.prototype,Er,c);var Wr,Xr,qr=d,Yr=((Xr=Or)&&(Qr.__proto__=Xr),((Qr.prototype=Object.create(Xr&&Xr.prototype)).constructor=Qr).prototype.createVisual=function(){var t=this.series,e=t._defaults,o=t.line||{},i=t.color;it(i)&&e&&(i=e.color),this.visual=new b.drawing.Group({zIndex:t.zIndex}),this.createFill({fill:{color:i,opacity:t.opacity},stroke:null}),0<o.width&&!1!==o.visible&&this.createStroke({stroke:x({color:i,opacity:t.opacity,lineCap:"butt"},o)})},Qr.prototype.strokeSegments=function(){return this._strokeSegments||(this._strokeSegments=this.createStrokeSegments())},Qr.prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.points())},Qr.prototype.stackSegments=function(){return(this.prevSegment||this).createStackSegments(this.stackPoints)},Qr.prototype.createStackSegments=function(t){return this.segmentsFromPoints(this.toGeometryPoints(t)).reverse()},Qr.prototype.segmentsFromPoints=function(t){return t.map(function(t){return new b.geometry.Segment(t)})},Qr.prototype.createStroke=function(t){t=new b.drawing.Path(t);t.segments.push.apply(t.segments,this.strokeSegments()),this.visual.append(t)},Qr.prototype.hasStackSegment=function(){return this.prevSegment||this.stackPoints&&this.stackPoints.length},Qr.prototype.createFill=function(t){var e=this.strokeSegments(),o=e.slice(0),i=this.hasStackSegment(),r=(i&&(r=this.stackSegments(),Tt(o,r)),new b.drawing.Path(t));r.segments.push.apply(r.segments,o),!i&&1<e.length&&this.fillToAxes(r),this.visual.append(r)},Qr.prototype.fillToAxes=function(t){var e=this.parent,o=e.options.invertAxes,i=e.seriesValueAxis(this.series),e=e.categoryAxisCrossingValue(i),i=i.getSlot(e,e,!0),e=this.strokeSegments(),r=e[0].anchor(),e=zt(e).anchor(),i=o?i.x1:i.y1;o?t.lineTo(i,e.y).lineTo(i,r.y):t.lineTo(e.x,i).lineTo(r.x,i)},Qr),d=((Wr=Yr)&&(Zr.__proto__=Wr),((Zr.prototype=Object.create(Wr&&Wr.prototype)).constructor=Zr).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.calculateStepPoints(this.linePoints))},Zr.prototype.createStackSegments=function(t){return this.segmentsFromPoints(this.calculateStepPoints(t)).reverse()},Zr);function Zr(){Wr.apply(this,arguments)}function Qr(t,e,o,i,r){Xr.call(this,t,e,o),this.prevSegment=i,this.stackPoints=r}x(d.prototype,h);var Kr,$r,Jr,tn,en=d,on=((tn=Yr)&&(pn.__proto__=tn),((pn.prototype=Object.create(tn&&tn.prototype)).constructor=pn).prototype.createStrokeSegments=function(){var t=new Ri(this.options.closed),e=this.points();return t.process(e)},pn.prototype.createStackSegments=function(){for(var t=this.strokeSegments(),e=[],o=t.length-1;0<=o;o--){var i=t[o];e.push(new b.geometry.Segment(i.anchor(),i.controlOut(),i.controlIn()))}return e},pn),rn=((Jr=qr)&&(hn.__proto__=Jr),((hn.prototype=Object.create(Jr&&Jr.prototype)).constructor=hn).prototype.createSegment=function(t,e,o,i){var r,n,s=this.options.isStacked,a=(e.line||{}).style;return s&&0<o&&i&&("gap"!==this.seriesMissingValues(e)?(n=i.linePoints,r=i):n=this._gapStackPoints(t,o,a)),new("step"===a?en:"smooth"===a?on:Yr)(t,e,o,r,n)},hn.prototype.reflow=function(t){Jr.prototype.reflow.call(this,t);var e=this._stackPoints;if(e)for(var o=0;o<e.length;o++){var i=e[o],r=this.categoryAxis.getSlot(i.categoryIx);i.reflow(r)}},hn.prototype._gapStackPoints=function(t,e,o){var i=this.seriesPoints,r=t[0].categoryIx,t=t.length,n=(r<0&&(r=0,t--),r+t),s=this.seriesOptions[0]._outOfRangeMinPoint?1:0,a=[];this._stackPoints=this._stackPoints||[];for(var h=r;h<n;h++){for(var p,l=h+s,c=e,u=void 0;u=i[--c][l],0<c&&!u;);u?("step"!==o&&r<h&&!i[c][l-1]&&a.push(this._previousSegmentPoint(h,l,l-1,c)),a.push(u),"step"!==o&&h+1<n&&!i[c][l+1]&&a.push(this._previousSegmentPoint(h,l,l+1,c))):(p=this._createGapStackPoint(h),this._stackPoints.push(p),a.push(p))}return a},hn.prototype._previousSegmentPoint=function(t,e,o,i){for(var r,n=this.seriesPoints,s=i;0<s&&!r;)r=n[--s][o];return r?r=n[s][e]:(r=this._createGapStackPoint(t),this._stackPoints.push(r)),r},hn.prototype._createGapStackPoint=function(t){var e=this.pointOptions({},0),e=new Tr(0,e);return e.categoryIx=t,e.series={},e},hn.prototype.seriesMissingValues=function(t){return t.missingValues||er},hn.prototype.supportsPointInactiveOpacity=function(){return!1},hn),nn=(($r=b.Class)&&(an.__proto__=$r),((an.prototype=Object.create($r&&$r.prototype)).constructor=an).prototype.update=function(t){var e,o=this.axisRanges;for(e in t){var i=t[e],r=o[e];o[e]=r=r||{min:G,max:W},r.min=Math.min(r.min,i.min),r.max=Math.max(r.max,i.max)}},an.prototype.reset=function(t){this.axisRanges[t]=void 0},an.prototype.query=function(t){return this.axisRanges[t]},an),d=((Kr=r)&&(sn.__proto__=Kr),((sn.prototype=Object.create(Kr&&Kr.prototype)).constructor=sn).prototype.createVisual=function(){this.textBox.options.noclip=this.options.noclip},sn.prototype.reflow=function(t){var e=this.options,o=e.vertical,i=e.aboveAxis,r=this.children[0],n=r.options,s=r.box,a=r.options.padding,h=t;n.align=o?C:S,n.vAlign=o?A:C,"insideEnd"===e.position?o?(n.vAlign=A,!i&&s.height()<t.height()&&(n.vAlign=w)):n.align=i?k:S:e.position===C?(n.vAlign=C,n.align=C):"insideBase"===e.position?o?n.vAlign=i?w:A:n.align=i?S:k:"outsideEnd"===e.position&&(h=o?i?new R(t.x1,t.y1-s.height(),t.x2,t.y1):new R(t.x1,t.y2,t.x2,t.y2+s.height()):(n.align=C,i?new R(t.x2,t.y1,t.x2+s.width(),t.y2):new R(t.x1-s.width(),t.y1,t.x1,t.y2))),e.rotation||(o?a.left=a.right=(h.width()-r.contentBox.width())/2:a.top=a.bottom=(h.height()-r.contentBox.height())/2),r.reflow(h)},sn.prototype.alignToClipBox=function(t){var e=this.options.vertical?v:y,o=e+"1",e=e+"2",i=this.children[0],r=this.parent.box;(r[o]<t[o]||t[e]<r[e])&&((i=i.paddingBox.clone())[o]=Math.max(r[o],t[o]),i[e]=Math.min(r[e],t[e]),this.reflow(i))},sn);function sn(t,e,o){Kr.call(this,e),this.textBox=new De(t,this.options,o),this.append(this.textBox)}function an(){$r.call(this),this.axisRanges={}}function hn(){Jr.apply(this,arguments)}function pn(){tn.apply(this,arguments)}i(d,{position:"outsideEnd",margin:P(3),padding:P(4),color:D,background:"",border:{width:1,color:""},aboveAxis:!0,vertical:!1,animation:{type:"fadeIn",delay:600},zIndex:2});var ln=d;function cn(t){t=t.overlay;return t&&t.gradient&&"none"!==t.gradient}(un=r)&&(dn.__proto__=un),((dn.prototype=Object.create(un&&un.prototype)).constructor=dn).prototype.render=function(){this._rendered||(this._rendered=!0,this.createLabel(),this.createNote(),this.errorBar&&this.append(this.errorBar))},dn.prototype.createLabel=function(){var t,e,o=this.options,i=o.labels;i.visible&&(t=this.pointData(),e=(e=dt(i))?e(t):this.formatValue(i.format),this.label=new ln(e,x({vertical:o.vertical},i),t),this.append(this.label))},dn.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},dn.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 o=0;o<this.errorBars.length;o++)this.errorBars[o].reflow(t)},dn.prototype.createVisual=function(){var e=this,t=this.box,o=this.options,i=o.visual;!1!==this.visible&&(un.prototype.createVisual.call(this),i?(i=this.rectVisual=i({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 b.drawing.Group;return e.createRect(t),t},options:o}))&&this.visual.append(i):0<t.width()&&0<t.height()&&this.createRect(this.visual))},dn.prototype.createRect=function(t){var e=this.options,o=e.border,i=(T(o.opacity)?o:e).opacity,r=this.box.toRect(),r=(r.size.width=Math.round(r.size.width),this.rectVisual=b.drawing.Path.fromRect(r,{fill:{color:this.color,opacity:e.opacity},stroke:{color:this.getBorderColor(),width:o.width,opacity:i,dashType:o.dashType}})),i=this.box.width(),o=this.box.height();6<(e.vertical?i:o)&&(J(r),(i<1||o<1)&&(r.options.stroke.lineJoin="round")),t.append(r),cn(e)&&(i=this.createGradientOverlay(r,{baseColor:this.color},x({end:e.vertical?void 0:[0,1]},e.overlay)),t.append(i))},dn.prototype.createHighlight=function(t){return J(b.drawing.Path.fromRect(this.box.toRect(),t))},dn.prototype.highlightVisual=function(){return this.rectVisual},dn.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this.rectVisual}},dn.prototype.getBorderColor=function(){var t=this.color,e=this.options.border,o=e._brightness||.8,e=e.color;return e=T(e)?e:new b.Color(t).brightness(o).toHex()},dn.prototype.tooltipAnchor=function(){var t,e,o,i,r=this.options,n=this.box,s=this.aboveAxis,a=this.owner.pane.clipBox()||n,h=S,p=A;return r.vertical?(t=Math.min(n.x2,a.x2)+5,s?i=Math.max(n.y1,a.y1):(i=Math.min(n.y2,a.y2),p=w)):(e=Math.max(n.x1,a.x1),o=Math.min(n.x2,a.x2),i=r.isStacked?(p=w,t=s?(h=k,o):e,Math.max(n.y1,a.y1)-5):(s?t=o+5:(t=e-5,h=k),Math.max(n.y1,a.y1))),{point:new B(t,i),align:{horizontal:h,vertical:p}}},dn.prototype.overlapsBox=function(t){return this.box.overlaps(t)},dn.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}};var un,d=dn;function dn(t,e){un.call(this),this.options=e,this.color=e.color||a,this.aboveAxis=O(this.options.aboveAxis,!0),this.value=t}x(d.prototype,kr),x(d.prototype,o),d.prototype.defaults={border:{width:1},vertical:!0,overlay:{gradient:"glass"},labels:{visible:!1,format:"{0}"},opacity:1,notes:{label:{}}};var fn=d;function gn(t,e){t.forEach(e)}function yn(t,e){for(var o=t.length,i=o-1;0<=i;i--)e(t[i],i-o-1)}(vn=r)&&(mn.__proto__=vn),((mn.prototype=Object.create(vn&&vn.prototype)).constructor=mn).prototype.reflow=function(i){var t=this.options,e=t.vertical,o=t.gap,r=t.spacing,t=this.children,n=t.length,s=e?v:y,a=n+o+r*(n-1),h=(e?i.height():i.width())/a,p=i[s+1]+o/2*h;this.forEach(t,function(t,e){var o=(t.box||i).clone();o[s+1]=p,o[s+2]=p+h,t.reflow(o),e<n-1&&(p+=h*r),p+=h})};var vn,d=mn;function mn(t){vn.call(this,t),this.forEach=t.rtl?yn:gn}i(d,{vertical:!1,gap:0,spacing:0});var xn,_n=d,d=((xn=r)&&(bn.__proto__=xn),((bn.prototype=Object.create(xn&&xn.prototype)).constructor=bn).prototype.reflow=function(t){for(var e=this.options.vertical?y:v,o=this.children,i=o.length,r=this.box=new R,n=0;n<i;n++){var s,a=o[n];!1!==a.visible&&((s=a.box.clone()).snapTo(t,e),0===n&&(r=this.box=s.clone()),a.reflow(s),r.wrap(s))}},bn);function bn(){xn.apply(this,arguments)}i(d,{vertical:!0});var wn,Cn=d,d=((wn=Sr)&&(Sn.__proto__=wn),((Sn.prototype=Object.create(wn&&wn.prototype)).constructor=Sn).prototype.render=function(){wn.prototype.render.call(this),this.updateStackRange()},Sn.prototype.pointType=function(){return fn},Sn.prototype.clusterType=function(){return _n},Sn.prototype.stackType=function(){return Cn},Sn.prototype.stackLimits=function(t,e){return wn.prototype.stackLimits.call(this,t,e)},Sn.prototype.createPoint=function(t,e){var o=e.categoryIx,i=e.category,r=e.series,e=e.seriesIx,n=this.options,s=this.children,a=n.isStacked,h=this.pointValue(t),p=this.pointOptions(r,e),l=p.labels,l=(a&&"outsideEnd"===l.position&&(l.position="insideEnd"),p.isStacked=a,t.fields.color||r.color),t=(h<0&&p.negativeColor&&(l=p.negativeColor),p=this.evalPointOptions(p,h,i,o,r,e),it(r.color)&&(l=p.color),new(this.pointType())(h,p)),i=(t.color=l,s[o]);return i||(i=new(this.clusterType())({vertical:n.invertAxes,gap:n.gap,spacing:n.spacing,rtl:!n.invertAxes&&(this.chartService||{}).rtl}),this.append(i)),(a?this.getStackWrap(r,i):i).append(t),t},Sn.prototype.getStackWrap=function(t,e){var o,t=t.stack,i=t&&t.group||t,r=e.children;if(typeof i===q){for(var n=0;n<r.length;n++)if(r[n]._stackGroup===i){o=r[n];break}}else o=r[0];return o||((o=new(this.stackType())({vertical:!this.options.invertAxes}))._stackGroup=i,e.append(o)),o},Sn.prototype.categorySlot=function(t,e,o){var i=this.options,t=t.getSlot(e),e=o.startValue();return i.isStacked&&(o=o.getSlot(e,e,!0),t[(e=i.invertAxes?y:v)+1]=t[e+2]=o[e+1]),t},Sn.prototype.reflowCategories=function(t){for(var e=this.children,o=e.length,i=0;i<o;i++)e[i].reflow(t[i])},Sn.prototype.createAnimation=function(){this._setAnimationOptions(),wn.prototype.createAnimation.call(this),Fr(this.options.series)&&this._setChildrenAnimation()},Sn.prototype._setChildrenAnimation=function(){for(var t=this.points,e=0;e<t.length;e++){var o=t[e],i=o.visual;i&&T(i.options.zIndex)&&(o.options.animation=this.options.animation,o.createAnimation())}},Sn.prototype._setAnimationOptions=function(){var t,e=this.options,o=e.animation||{};t=e.isStacked?(t=this.seriesValueAxis(e.series[0])).getSlot(t.startValue()):this.categoryAxis.getSlot(0),o.origin=new b.geometry.Point(t.x1,t.y1),o.vertical=!e.invertAxes},Sn);function Sn(){wn.apply(this,arguments)}i(d,{animation:{type:ir}});var kn,An=d,d=((kn=r)&&(Pn.__proto__=kn),((Pn.prototype=Object.create(kn&&kn.prototype)).constructor=Pn).prototype.reflow=function(t){var e=this.options,o=this.value,e=this.owner.seriesValueAxis(e),i=e.getSlot(o.open,o.close),e=e.getSlot(o.low,o.high),o=(i.x1=e.x1=t.x1,i.x2=e.x2=t.x2,this.realBody=i,e.center().x),t=[];t.push([[o,e.y1],[o,i.y1]]),t.push([[o,i.y2],[o,e.y2]]),this.lines=t,this.box=e.clone().wrap(i),this._rendered||(this._rendered=!0,this.createNote()),this.reflowNote()},Pn.prototype.reflowNote=function(){this.note&&this.note.reflow(this.box)},Pn.prototype.createVisual=function(){kn.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 b.drawing.Group;return this.createBody(e,t),this.createLines(e,t),e},Pn.prototype.createBody=function(t,e){var o=b.drawing.Path.fromRect(this.realBody.toRect(),{fill:{color:this.color,opacity:e.opacity},stroke:null});0<e.border.width&&o.options.set("stroke",{color:this.getBorderColor(),width:e.border.width,dashType:e.border.dashType,opacity:O(e.border.opacity,e.opacity)}),J(o),t.append(o),cn(e)&&t.append(this.createGradientOverlay(o,{baseColor:this.color},x({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,o,i){if(o)for(var r={stroke:{color:i.color||this.color,opacity:O(i.opacity,e.opacity),width:i.width,dashType:i.dashType,lineCap:"butt"}},n=0;n<o.length;n++){var s=b.drawing.Path.fromPoints(o[n],r);J(s),t.append(s)}},Pn.prototype.getBorderColor=function(){var t=this.options.border,e=t.color;return e=T(e)?e:new b.Color(this.color).brightness(t._brightness).toHex()},Pn.prototype.createOverlay=function(){var t=b.drawing.Path.fromRect(this.box.toRect(),{fill:{color:a,opacity:0},stroke:null});this.visual.append(t)},Pn.prototype.createHighlight=function(){var t=this.options.highlight,e=this.color,t=(this.color=t.color||this.color,this.mainVisual(x({},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 B(t.x2+5,Math.max(t.y1,e.y1)+5),align:{horizontal:S,vertical:A}}},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){kn.call(this,e),this.value=t}i(d,{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:{}}}),x(d.prototype,kr),x(d.prototype,o);var Tn=d;function Mn(t){return Fi(t)===t.length}(On=Sr)&&(Bn.__proto__=On),((Bn.prototype=Object.create(On&&On.prototype)).constructor=Bn).prototype.reflowCategories=function(t){for(var e=this.children,o=e.length,i=0;i<o;i++)e[i].reflow(t[i])},Bn.prototype.addValue=function(t,e){var o,i=e.categoryIx,r=e.category,n=e.series,s=e.seriesIx,a=this.children,h=this.options,p=t.valueFields,l=Mn(this.splitValue(p)),c=n.data[i],u=this.categoryPoints[i],l=(u||(this.categoryPoints[i]=u=[]),l&&(o=this.createPoint(t,e)),a[i]);l||(l=new _n({vertical:h.invertAxes,gap:h.gap,spacing:h.spacing,rtl:!h.invertAxes&&(this.chartService||{}).rtl}),this.append(l)),o&&(this.updateRange(p,e),l.append(o),o.categoryIx=i,o.category=r,o.series=n,o.seriesIx=s,o.owner=this,o.dataItem=c,o.noteText=t.fields.noteText),this.points.push(o),u.push(o)},Bn.prototype.pointType=function(){return Tn},Bn.prototype.createPoint=function(t,e){var o=e.categoryIx,i=e.category,r=e.series,e=e.seriesIx,n=this.pointType(),s=t.valueFields,a=x({},r),h=t.fields.color||r.color,a=this.evalPointOptions(a,s,i,o,r,e),i=("candlestick"===r.type&&s.open>s.close&&(h=t.fields.downColor||r.downColor||r.color),it(r.color)&&(h=a.color),a.vertical=!this.options.invertAxes,new n(s,a));return i.color=h,i},Bn.prototype.splitValue=function(t){return[t.low,t.open,t.close,t.high]},Bn.prototype.updateRange=function(t,e){var e=e.series.axis,t=this.splitValue(t),o=this.valueAxisRanges[e],o=this.valueAxisRanges[e]=o||{min:G,max:W};this.valueAxisRanges[e]={min:Math.min.apply(Math,t.concat([o.min])),max:Math.max.apply(Math,t.concat([o.max]))}},Bn.prototype.formatPointValue=function(t,e){var o=t.value;return this.chartService.format.auto(e,o.open,o.high,o.low,o.close,t.category)},Bn.prototype.animationPoints=function(){return this.points};var On,d=Bn;function Bn(){On.apply(this,arguments)}x(d.prototype,c);var Rn,En=d,d=((Rn=Tn)&&(Ln.__proto__=Rn),((Ln.prototype=Object.create(Rn&&Rn.prototype)).constructor=Ln).prototype.reflow=function(t){var e,o,i=this.options,r=this.value,i=this.owner.seriesValueAxis(i),n=(this.boxSlot=o=i.getSlot(r.q1,r.q3),this.realBody=o,this.reflowBoxSlot(t),this.whiskerSlot=e=i.getSlot(r.lower,r.upper),this.reflowWhiskerSlot(t),i.getSlot(r.median));r.mean&&(i=i.getSlot(r.mean),this.meanPoints=this.calcMeanPoints(t,i)),this.whiskerPoints=this.calcWhiskerPoints(o,e),this.medianPoints=this.calcMedianPoints(t,n),this.box=e.clone().wrap(o),this.reflowNote()},Ln.prototype.reflowBoxSlot=function(t){this.boxSlot.x1=t.x1,this.boxSlot.x2=t.x2},Ln.prototype.reflowWhiskerSlot=function(t){this.whiskerSlot.x1=t.x1,this.whiskerSlot.x2=t.x2},Ln.prototype.calcMeanPoints=function(t,e){return[[[t.x1,e.y1],[t.x2,e.y1]]]},Ln.prototype.calcWhiskerPoints=function(t,e){var o=e.center().x;return[[[o-5,e.y1],[o+5,e.y1],[o,e.y1],[o,t.y1]],[[o-5,e.y2],[o+5,e.y2],[o,e.y2],[o,t.y2]]]},Ln.prototype.calcMedianPoints=function(t,e){return[[[t.x1,e.y1],[t.x2,e.y1]]]},Ln.prototype.renderOutliers=function(t){for(var e,o=this.value,i=o.outliers||[],r=3*Math.abs(o.q3-o.q1),n=[],s=(t.markers,0);s<i.length;s++){var a=i[s],h=x({},(e=a<o.q3+r&&a>o.q1-r?t.outliers:t.extremes).border),h=(T(h.color)||(T(this.color)?h.color=this.color:h.color=new b.Color(e.background).brightness(.8).toHex()),new Ce({type:e.type,width:e.size,height:e.size,rotation:e.rotation,background:e.background,border:h,opacity:e.opacity}));h.value=a,n.push(h)}return this.reflowOutliers(n),n},Ln.prototype.reflowOutliers=function(t){for(var e=this.owner.seriesValueAxis(this.options),o=this.box.center(),i=0;i<t.length;i++){var r=t[i].value,r=e.getSlot(r);this.options.vertical?r.move(o.x):r.move(void 0,o.y),this.box=this.box.wrap(r),t[i].reflow(r)}},Ln.prototype.mainVisual=function(t){for(var e=Rn.prototype.mainVisual.call(this,t),o=this.renderOutliers(t),i=0;i<o.length;i++){var r=o[i].getElement();r&&e.append(r)}return e},Ln.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)},Ln.prototype.getBorderColor=function(){return(this.options.border||{}).color?this.options.border.color:this.color||Rn.prototype.getBorderColor.call(this)},Ln);function Ln(t,e){Rn.call(this,t,e),this.createNote()}i(d,{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:a,border:{width:2,opacity:1},opacity:0},extremes:{visible:!0,size:8,type:H,background:a,border:{width:2,opacity:1},opacity:0}}),x(d.prototype,kr);var In,zn,Vn,jn=d,Dn=((Vn=jn)&&(Gn.__proto__=Vn),((Gn.prototype=Object.create(Vn&&Vn.prototype)).constructor=Gn).prototype.reflowBoxSlot=function(t){this.boxSlot.y1=t.y1,this.boxSlot.y2=t.y2},Gn.prototype.reflowWhiskerSlot=function(t){this.whiskerSlot.y1=t.y1,this.whiskerSlot.y2=t.y2},Gn.prototype.calcMeanPoints=function(t,e){return[[[e.x1,t.y1],[e.x1,t.y2]]]},Gn.prototype.calcWhiskerPoints=function(t,e){var o=e.center().y;return[[[e.x1,o-5],[e.x1,o+5],[e.x1,o],[t.x1,o]],[[e.x2,o-5],[e.x2,o+5],[e.x2,o],[t.x2,o]]]},Gn.prototype.calcMedianPoints=function(t,e){return[[[e.x1,t.y1],[e.x1,t.y2]]]},Gn),Hn=((zn=En)&&(Nn.__proto__=zn),((Nn.prototype=Object.create(zn&&zn.prototype)).constructor=Nn).prototype.addValue=function(t,e){var o,i=e.categoryIx,r=e.category,n=e.series,s=e.seriesIx,a=this.children,h=this.options,p=t.valueFields,l=Mn(this.splitValue(p)),c=n.data[i],u=this.categoryPoints[i],l=(u||(this.categoryPoints[i]=u=[]),l&&(o=this.createPoint(t,e)),a[i]);l||(l=new _n({vertical:h.invertAxes,gap:h.gap,spacing:h.spacing,rtl:!h.invertAxes&&(this.chartService||{}).rtl}),this.append(l)),o&&(this.updateRange(p,e),l.append(o),o.categoryIx=i,o.category=r,o.series=n,o.seriesIx=s,o.owner=this,o.dataItem=c),this.points.push(o),u.push(o)},Nn.prototype.pointType=function(){return this.options.invertAxes?Dn:jn},Nn.prototype.splitValue=function(t){return[t.lower,t.q1,t.median,t.q3,t.upper]},Nn.prototype.updateRange=function(t,e){var e=e.series.axis,o=this.valueAxisRanges[e],i=this.splitValue(t).concat(this.filterOutliers(t.outliers));T(t.mean)&&(i=i.concat(t.mean)),o=this.valueAxisRanges[e]=o||{min:G,max:W},this.valueAxisRanges[e]={min:Math.min.apply(Math,i.concat([o.min])),max:Math.max.apply(Math,i.concat([o.max]))}},Nn.prototype.formatPointValue=function(t,e){var o=t.value;return this.chartService.format.auto(e,o.lower,o.q1,o.median,o.q3,o.upper,o.mean,t.category)},Nn.prototype.filterOutliers=function(t){for(var e=(t||[]).length,o=[],i=0;i<e;i++){var r=t[i];T(r)&&null!==r&&o.push(r)}return o},Nn.prototype.supportsPointInactiveOpacity=function(){return!1},Nn),Un=((In=vr)&&(Fn.__proto__=In),((Fn.prototype=Object.create(In&&In.prototype)).constructor=Fn).prototype.getAxis=function(){var t=this.chart.seriesAxes(this.series);return this.isVertical?t.y:t.x},Fn);function Fn(){In.apply(this,arguments)}function Nn(){zn.apply(this,arguments)}function Gn(){Vn.apply(this,arguments)}function Wn(t){return T(t)&&null!==t}(Xn=r)&&(qn.__proto__=Xn),((qn.prototype=Object.create(Xn&&Xn.prototype)).constructor=qn).prototype._initFields=function(){this.xAxisRanges={},this.yAxisRanges={},this.points=[],this.seriesPoints=[],this.seriesOptions=[],this._evalSeries=[]},qn.prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},qn.prototype.addErrorBar=function(t,e,o){var i,r=t.value[e],n=e+"Value",s=o.seriesIx,a=o.series,h=t.options.errorBars,p=o[e+"ErrorLow"],o=o[e+"ErrorHigh"];m(r)&&(m(p)&&m(o)&&(i={low:p,high:o}),h&&T(h[n])&&(this.seriesErrorRanges=this.seriesErrorRanges||{x:[],y:[]},this.seriesErrorRanges[e][s]=this.seriesErrorRanges[e][s]||new Ji(h[n],a,e),i=this.seriesErrorRanges[e][s].getErrorRange(r,h[n])),i&&this.addPointErrorBar(i,t,e))},qn.prototype.addPointErrorBar=function(t,e,o){var i=t.low,t=t.high,r=e.series,n=e.options.errorBars,s=o===v,a={},s=(e[o+"Low"]=i,e[o+"High"]=t,e.errorBars=e.errorBars||[],new Un(i,t,s,this,r,n));e.errorBars.push(s),e.append(s),a[o]=i,this.updateRange(a,r),a[o]=t,this.updateRange(a,r)},qn.prototype.addValue=function(t,e){var o,i=t.x,r=t.y,n=e.seriesIx,s=this.options.series[n],s=this.seriesMissingValues(s),n=this.seriesPoints[n];(t=Wn(i)&&Wn(r)?t:this.createMissingValue(t,s))&&((o=this.createPoint(t,e))&&(Object.assign(o,e),this.addErrorBar(o,y,e),this.addErrorBar(o,v,e)),this.updateRange(t,e.series)),this.points.push(o),n.push(o)},qn.prototype.seriesMissingValues=function(t){return t.missingValues},qn.prototype.createMissingValue=function(){},qn.prototype.updateRange=function(t,e){var o=this.chartService.intl,i=e.xAxis,e=e.yAxis,r=t.x,t=t.y,n=this.xAxisRanges[i],s=this.yAxisRanges[e];Wn(r)&&(n=this.xAxisRanges[i]=n||{min:G,max:W},et(r)&&(r=Uo(o,r)),n.min=Math.min(n.min,r),n.max=Math.max(n.max,r)),Wn(t)&&(s=this.yAxisRanges[e]=s||{min:G,max:W},et(t)&&(t=Uo(o,t)),s.min=Math.min(s.min,t),s.max=Math.max(s.max,t))},qn.prototype.evalPointOptions=function(t,e,o){var i=o.series,r=o.seriesIx,n={defaults:i._defaults,excluded:["data","tooltip","content","template","visual","toggle","_outOfRangeMinPoint","_outOfRangeMaxPoint"]},s=this._evalSeries[r],r=(T(s)||(this._evalSeries[r]=s=_r(t,{},n,!0)),t);return s&&_r(r=x({},t),{value:e,series:i,dataItem:o.dataItem},n),r},qn.prototype.pointType=function(){return Tr},qn.prototype.pointOptions=function(t,e){var o,i=this.seriesOptions[e];return i||(o=this.pointType().prototype.defaults,this.seriesOptions[e]=i=x({},o,{markers:{opacity:t.opacity},tooltip:{format:this.options.tooltip.format},labels:{format:this.options.labels.format}},t)),i},qn.prototype.createPoint=function(t,e){var o=e.series,i=this.pointOptions(o,e.seriesIx),r=e.color||o.color,i=this.evalPointOptions(i,t,e),e=(it(o.color)&&(r=i.color),new Tr(t,i));return e.color=r,this.append(e),e},qn.prototype.seriesAxes=function(t){var e=t.xAxis,t=t.yAxis,o=this.plotArea,i=e?o.namedXAxes[e]:o.axisX,o=t?o.namedYAxes[t]:o.axisY;if(!i)throw new Error("Unable to locate X axis with name "+e);if(o)return{x:i,y:o};throw new Error("Unable to locate Y axis with name "+t)},qn.prototype.reflow=function(t){var r=this,n=this.points,s=!this.options.clip,a=0;this.traverseDataPoints(function(t,e){var o=n[a++],e=r.seriesAxes(e.series),i=e.x.getSlot(t.x,t.x,s),e=e.y.getSlot(t.y,t.y,s);o&&(i&&e?(t=r.pointSlot(i,e),o.reflow(t)):o.visible=!1)}),this.box=t},qn.prototype.pointSlot=function(t,e){return new R(t.x1,e.y1,t.x2,e.y2)},qn.prototype.traverseDataPoints=function(t){for(var e=this.options.series,o=this.seriesPoints,i=0;i<e.length;i++){var r=e[i];o[i]||(o[i]=[]);for(var n=0;n<r.data.length;n++){var s=this._bindPoint(r,i,n),a=s.valueFields,s=s.fields;t(a,x({pointIx:n,series:r,seriesIx:i,dataItem:r.data[n],owner:this},s))}}},qn.prototype.formatPointValue=function(t,e){t=t.value;return this.chartService.format.auto(e,t.x,t.y)},qn.prototype.animationPoints=function(){for(var t=this.points,e=[],o=0;o<t.length;o++)e.push((t[o]||{}).marker);return e};var Xn,d=qn;function qn(t,e){Xn.call(this,e),this.plotArea=t,this.chartService=t.chartService,this._initFields(),this.render()}i(d,{series:[],tooltip:{format:"{0}, {1}"},labels:{format:"{0}, {1}"},clip:!0}),x(d.prototype,c,{_bindPoint:Sr.prototype._bindPoint});var Yn,Zn=d,d=((Yn=Tr)&&(Qn.__proto__=Yn),((Qn.prototype=Object.create(Yn&&Yn.prototype)).constructor=Qn).prototype.createHighlight=function(){var t=this.options.highlight,e=t.border,o=this.options.markers,i=this.box.center(),r=(o.size+o.border.width+e.width)/2,n=new b.drawing.Group,s=new b.drawing.Circle(new b.geometry.Circle([i.x,i.y+r/5+e.width/2],r+e.width/2),{stroke:{color:"none"},fill:this.createGradient({gradient:"bubbleShadow",color:o.background,stops:[{offset:0,color:o.background,opacity:.3},{offset:1,color:o.background,opacity:0}]})}),i=new b.drawing.Circle(new b.geometry.Circle([i.x,i.y],r),{stroke:{color:e.color||new b.Color(o.background).brightness(.8).toHex(),width:e.width,opacity:e.opacity},fill:{color:o.background,opacity:t.opacity}});return n.append(s,i),n},Qn);function Qn(t,e){Yn.call(this,t,e),this.category=t.category}d.prototype.defaults=x({},d.prototype.defaults,{labels:{position:C},highlight:{opacity:1,border:{color:"#fff",width:2,opacity:1}}}),d.prototype.defaults.highlight.zIndex=void 0;var Kn,$n=d,d=((Kn=Zn)&&(Jn.__proto__=Kn),((Jn.prototype=Object.create(Kn&&Kn.prototype)).constructor=Jn).prototype._initFields=function(){this._maxSize=W,Kn.prototype._initFields.call(this)},Jn.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)),Kn.prototype.addValue.call(this,t,e)):(this.points.push(null),this.seriesPoints[e.seriesIx].push(null))},Jn.prototype.reflow=function(t){this.updateBubblesSize(t),Kn.prototype.reflow.call(this,t)},Jn.prototype.pointType=function(){return $n},Jn.prototype.createPoint=function(t,e){var o=e.series,i=o.data.length,i=e.pointIx*(600/i),r={delay:i,duration:600-i,type:"bubble"},n=e.color||o.color,i=(t.size<0&&o.negativeValues.visible&&(n=O(o.negativeValues.color,n)),x({labels:{animation:{delay:i,duration:600-i}}},this.pointOptions(o,e.seriesIx),{markers:{type:H,border:o.border,opacity:o.opacity,animation:r}})),i=this.evalPointOptions(i,t,e),r=(it(o.color)&&(n=i.color),i.markers.background=n,new $n(t,i));return r.color=n,this.append(r),r},Jn.prototype.updateBubblesSize=function(t){for(var e=this.options.series,o=Math.min(t.width(),t.height()),i=0;i<e.length;i++)for(var r=e[i],n=this.seriesPoints[i],s=(r.minSize||Math.max(.02*o,10))/2,a=(r.maxSize||.2*o)/2,h=Math.PI*s*s,p=(Math.PI*a*a-h)/this._maxSize,l=0;l<n.length;l++){var c,u,d=n[l];d&&(c=Math.abs(d.value.size)*p,c=Math.sqrt((h+c)/Math.PI),u=O(d.options.zIndex,0)+(1-c/a),x(d.options,{zIndex:u,markers:{size:2*c,zIndex:u},labels:{zIndex:u+1}}))}},Jn.prototype.formatPointValue=function(t,e){var o=t.value;return this.chartService.format.auto(e,o.x,o.y,o.size,t.category)},Jn.prototype.createAnimation=function(){},Jn.prototype.createVisual=function(){},Jn);function Jn(){Kn.apply(this,arguments)}i(d,{tooltip:{format:"{3}"},labels:{format:"{3}"}});var ts,es=d,d=((ts=Ce)&&(os.__proto__=ts),(os.prototype=Object.create(ts&&ts.prototype)).constructor=os);function os(){ts.apply(this,arguments)}x(d.prototype,kr);var is,rs=d,d=((is=r)&&(ns.__proto__=is),((ns.prototype=Object.create(is&&is.prototype)).constructor=ns).prototype.render=function(){var t=this.options;this._rendered||(this._rendered=!0,T(this.value.target)&&(this.target=new rs({type:t.target.shape,background:t.target.color||this.color,opacity:t.opacity,zIndex:t.zIndex,border:t.target.border,vAlign:A,align:k}),this.target.value=this.value,this.target.dataItem=this.dataItem,this.target.series=this.series,this.append(this.target)),this.createNote())},ns.prototype.reflow=function(t){this.render();var e=this.options,o=this.target,i=this.owner,r=e.invertAxes,n=i.seriesValueAxis(this.options),i=i.categorySlot(i.categoryAxis,e.categoryIx,n),n=n.getSlot(this.value.target),s=r?n:i,i=r?i:n;o&&(n=new R(s.x1,i.y1,s.x2,i.y2),o.options.height=r?n.height():e.target.line.width,o.options.width=r?e.target.line.width:n.width(),o.reflow(n)),this.note&&this.note.reflow(t),this.box=t},ns.prototype.createVisual=function(){is.prototype.createVisual.call(this);var t=this.options,e=b.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:O(t.border.opacity,t.opacity)}),J(this.bodyVisual=e),this.visual.append(e)},ns.prototype.createAnimation=function(){this.bodyVisual&&(this.animation=b.drawing.Animation.create(this.bodyVisual,this.options.animation))},ns.prototype.createHighlight=function(t){return b.drawing.Path.fromRect(this.box.toRect(),t)},ns.prototype.highlightVisual=function(){return this.bodyVisual},ns.prototype.highlightVisualArgs=function(){return{rect:this.box.toRect(),visual:this.bodyVisual,options:this.options}},ns.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},ns);function ns(t,e){is.call(this,e),this.aboveAxis=this.options.aboveAxis,this.color=e.color||a,this.value=t}d.prototype.tooltipAnchor=fn.prototype.tooltipAnchor,i(d,{border:{width:1},vertical:!1,opacity:1,target:{shape:"",border:{width:0,color:"green"},line:{width:2}},tooltip:{format:"Current: {0}<br />Target: {1}"}}),x(d.prototype,kr),x(d.prototype,o);var ss,as=d,d=((ss=Sr)&&(hs.__proto__=ss),((hs.prototype=Object.create(ss&&ss.prototype)).constructor=hs).prototype.reflowCategories=function(t){for(var e=this.children,o=e.length,i=0;i<o;i++)e[i].reflow(t[i])},hs.prototype.plotRange=function(t){var e=t.series,e=this.seriesValueAxis(e),e=this.categoryAxisCrossingValue(e);return[e,t.value.current||e]},hs.prototype.createPoint=function(t,e){var o=e.categoryIx,i=e.category,r=e.series,e=e.seriesIx,n=this.options,s=this.children,a=t.valueFields,h=x({vertical:!n.invertAxes,overlay:r.overlay,categoryIx:o,invertAxes:n.invertAxes},r),t=t.fields.color||r.color,h=this.evalPointOptions(h,a,i,o,r,e),i=(it(r.color)&&(t=h.color),new as(a,h)),e=(i.color=t,s[o]);return e||(e=new _n({vertical:n.invertAxes,gap:n.gap,spacing:n.spacing,rtl:!n.invertAxes&&(this.chartService||{}).rtl}),this.append(e)),e.append(i),i},hs.prototype.updateRange=function(t,e){var o=t.current,t=t.target,e=e.series.axis,i=this.valueAxisRanges[e];T(o)&&!isNaN(o)&&T(t&&!isNaN(t))&&((i=this.valueAxisRanges[e]=i||{min:G,max:W}).min=Math.min(i.min,o,t),i.max=Math.max(i.max,o,t))},hs.prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value.current,t.value.target)},hs.prototype.pointValue=function(t){return t.valueFields.current},hs.prototype.aboveAxis=function(t){return 0<t.value.current},hs.prototype.createAnimation=function(){var t=this.points;this._setAnimationOptions();for(var e=0;e<t.length;e++){var o=t[e];o.options.animation=this.options.animation,o.createAnimation()}},hs);function hs(t,e){for(var o=e.series,i=0;i<o.length;i++){var r=o[i],n=r.data;!n||Z(n[0])||st(n[0])||(r.data=[n])}ss.call(this,t,e)}d.prototype._setAnimationOptions=An.prototype._setAnimationOptions,i(d,{animation:{type:ir}});var ps,ls=d,d=((ps=b.Class)&&(cs.__proto__=ps),((cs.prototype=Object.create(ps&&ps.prototype)).constructor=cs).prototype.getStyle=function(t,e){var o=t.background,i=t.border.color,e=(e&&(e=e.color||e.options.color,o=O(o,e),i=O(i,e)),P(t.padding||{},"auto"));return{backgroundColor:o,borderColor:i,font:t.font,color:t.color,opacity:t.opacity,borderWidth:at(t.border.width),paddingTop:at(e.top),paddingBottom:at(e.bottom),paddingLeft:at(e.left),paddingRight:at(e.right)}},cs.prototype.show=function(t,e,o){t.format=e.format;o=this.getStyle(e,o),t.style=o,o=new b.Color(o.backgroundColor);T(e.color)||o.isDark()||(t.className="k-chart-tooltip-inverse"),this.chartService.notify("showTooltip",t),this.visible=!0},cs.prototype.hide=function(){this.chartService&&this.chartService.notify("hideTooltip"),this.visible=!1},cs.prototype.destroy=function(){delete this.chartService},cs);function cs(t,e){ps.call(this),this.chartService=t,this.options=x({},this.options,e)}i(d,{border:{width:1},opacity:1});(us=d)&&(ds.__proto__=us),((ds.prototype=Object.create(us&&us.prototype)).constructor=ds).prototype.initAxisName=function(){var t=this.crosshair.axis,t=t.plotArea.categoryAxis?t.getCategory?"categoryAxis":"valueAxis":t.options.vertical?"yAxis":"xAxis";this.axisName=t},ds.prototype.showAt=function(t){var e=this.crosshair.axis,o=this.options,i=e[o.stickyMode?"getCategory":"getValue"](t),r=i;o.format?r=this.formatService.auto(o.format,i):e.options.type===U&&(r=this.formatService.auto(e.options.labels.dateFormats[e.options.baseUnit],i)),this.show({point:t,anchor:this.getAnchor(),crosshair:this.crosshair,value:r,axisName:this.axisName,axisIndex:this.crosshair.axis.axisIndex},this.options)},ds.prototype.hide=function(){this.chartService.notify("hideTooltip",{crosshair:this.crosshair,axisName:this.axisName,axisIndex:this.crosshair.axis.axisIndex})},ds.prototype.getAnchor=function(){var t,e,o=this.crosshair,i=this.options,r=i.position,i=i.padding,n=!o.axis.options.vertical,o=o.line.bbox(),n=n?(t=C,r===w?(e=A,o.bottomLeft().translate(0,i)):(e=w,o.topLeft().translate(0,-i))):(e=C,r===S?(t=k,o.topLeft().translate(-i,0)):(t=S,o.topRight().translate(i,0)));return{point:n,align:{horizontal:t,vertical:e}}};var us,f=ds;function ds(t,e,o){us.call(this,t,o),this.crosshair=e,this.formatService=t.format,this.initAxisName()}i(f,{padding:10});var fs,gs=f,f=((fs=r)&&(ys.__proto__=fs),((ys.prototype=Object.create(fs&&fs.prototype)).constructor=ys).prototype.showAt=function(t){this.point=t,this.moveLine(),this.line.visible(!0),this.tooltip&&this.tooltip.showAt(t)},ys.prototype.hide=function(){this.line.visible(!1),this.tooltip&&this.tooltip.hide()},ys.prototype.moveLine=function(){var t=this.axis,e=this.point,o=t.options.vertical,i=this.getBox(),r=o?v:y,n=new b.geometry.Point(i.x1,i.y1),o=o?new b.geometry.Point(i.x2,i.y1):new b.geometry.Point(i.x1,i.y2);e&&(this.stickyMode?(t=t.getSlot(t.pointCategoryIndex(e)),n[r]=o[r]=t.center()[r]):n[r]=o[r]=e[r]),this.box=i,this.line.moveTo(n).lineTo(o)},ys.prototype.getBox=function(){for(var t,e=this.axis,o=e.pane.axes,i=o.length,r=e.options.vertical,e=e.lineBox().clone(),n=r?y:v,s=0;s<i;s++){var a=o[s];a.options.vertical!==r&&(t?t.wrap(a.lineBox()):t=a.lineBox().clone())}return e[n+1]=t[n+1],e[n+2]=t[n+2],e},ys.prototype.createVisual=function(){fs.prototype.createVisual.call(this);var t=this.options;this.line=new b.drawing.Path({stroke:{color:t.color,width:t.width,opacity:t.opacity,dashType:t.dashType},visible:!1}),this.moveLine(),this.visual.append(this.line)},ys.prototype.destroy=function(){this.tooltip&&this.tooltip.destroy(),fs.prototype.destroy.call(this)},ys);function ys(t,e,o){fs.call(this,o),this.axis=e,this.stickyMode=e instanceof Wo;o=this.options.tooltip;o.visible&&(this.tooltip=new gs(t,this,x({},o,{stickyMode:this.stickyMode})))}i(f,{color:D,width:2,zIndex:-1,tooltip:{visible:!1}});var vs,ms=f,f=((vs=r)&&(xs.__proto__=vs),((xs.prototype=Object.create(vs&&vs.prototype)).constructor=xs).prototype.shouldClip=function(){for(var t=this.children,e=t.length,o=0;o<e;o++)if(!0===t[o].options.clip)return!0;return!1},xs.prototype._clipBox=function(){return this.pane.chartsBox()},xs.prototype.createVisual=function(){var t;this.visual=new b.drawing.Group({zIndex:0}),this.shouldClip()&&(t=(this.clipBox=this._clipBox()).toRect(),J(t=b.drawing.Path.fromRect(t)),this.visual.clip(t),this.unclipLabels())},xs.prototype.stackRoot=function(){return this},xs.prototype.unclipLabels=function(){for(var t=this.children,e=this.clipBox,o=0;o<t.length;o++)for(var i=t[o].points||{},r=i.length,n=0;n<r;n++){var s,a=i[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)))}},xs.prototype.destroy=function(){vs.prototype.destroy.call(this),delete this.parent},xs);function xs(t,e){vs.call(this,t),this.pane=e}f.prototype.isStackRoot=!0;var _s,bs=f,f=((_s=be)&&(Cs.__proto__=_s),((Cs.prototype=Object.create(_s&&_s.prototype)).constructor=Cs).prototype.createTitle=function(){var t=this.options.title;st(t)&&(t=x({},t,{align:t.position,position:A})),this.title=Ne.buildTitle(t,this,Cs.prototype.options.title)},Cs.prototype.appendAxis=function(t){this.content.append(t),this.axes.push(t),t.pane=this},Cs.prototype.appendAxisAt=function(t,e){this.content.append(t),this.axes.splice(e,0,t),t.pane=this},Cs.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},Cs.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 o=0;o<this.charts.length;o++)t.removeChart(this.charts[o])}this.axes=[],this.charts=[],this.content.destroy(),this.content.children=[],this.chartContainer.children=[]},Cs.prototype.reflow=function(t){var e;zt(this.children)===this.content&&(e=this.children.pop()),_s.prototype.reflow.call(this,t),e&&this.children.push(e),this.title&&(this.contentBox.y1+=this.title.box.height())},Cs.prototype.visualStyle=function(){var t=_s.prototype.visualStyle.call(this);return t.zIndex=-10,t},Cs.prototype.renderComplete=function(){this.options.visible&&this.createGridLines()},Cs.prototype.stackRoot=function(){return this},Cs.prototype.clipRoot=function(){return this},Cs.prototype.createGridLines=function(){for(var t,e=this.axes,o=e.concat(this.parent.axes),i=[],r=[],n=0;n<e.length;n++)for(var s=e[n],a=s.options.vertical,h=a?i:r,p=0;p<o.length;p++)0!==h.length||a!==(t=o[p]).options.vertical&&Tt(h,s.createGridLines(t))},Cs.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()},Cs.prototype.chartsBox=function(){for(var t=this.axes,e=t.length,o=new R,i=0;i<e;i++){var r=t[i],n=r.options.vertical?v:y,r=r.lineBox();o[n+1]=r[n+1],o[n+2]=r[n+2]}if(0===o.x2)for(var s=this.parent.axes,a=s.length,h=0;h<a;h++){var p=s[h];p.options.vertical||(p=p.lineBox(),o.x1=p.x1,o.x2=p.x2)}return o},Cs.prototype.clipBox=function(){return this.chartContainer.clipBox},Cs.prototype.notifyRender=function(){var t=this.getService();t&&t.notify("paneRender",{pane:new Di(this),index:this.paneIndex,name:this.options.name})},Cs),ws=1;function Cs(t){_s.call(this,t),this.id="pane"+ws++,this.createTitle(),this.content=new r,this.chartContainer=new bs({},this),this.append(this.content),this.axes=[],this.charts=[]}f.prototype.isStackRoot=!0,i(f,{zIndex:-1,shrinkToFit:!0,title:{align:S},visible:!0});var Ss=f;function ks(t,e){null!==e&&t.push(e)}function As(t,e,o){e=e.visible;if(T(e))return e;e=t.pointVisibility;return e?e[o]:void 0}function Ps(t){for(var e=t.data,o=[],i=0,r=0,n=0;n<e.length;n++){var s=Qi.current.bindPoint(t,n),a=s.valueFields.value;m(a=et(a)?parseFloat(a):a)?(s.visible=!1!==As(t,s.fields,n),s.value=Math.abs(a),o.push(s),s.visible&&(i+=s.value),0!==a&&r++):o.push(null)}return{total:i,points:o,count:r}}function Ts(t,e){return t&&e?t.toLowerCase()===e.toLowerCase():t===e}function Ms(t,e){for(var o=[],i=[].concat(e),r=0;r<t.length;r++){var n=t[r];u(n.type,i)&&o.push(n)}return o}function Os(t,e,o){if(null===e)return e;var i="_date_"+t,r=e[i];return r||(r=Uo(o,yt(t)(e)),e[i]=r),r}function Bs(t,e){t=t.type,e=e instanceof Date;return!t&&e||Ts(t,U)}function Rs(t){return 1===t.length?t[0]:t}var Es=/area/i;function Ls(t,e){var o,i=Qi.current.bindPoint(t,null,e).valueFields;for(o in i)if(ot(i[o]))return!0}function Is(t){for(var e,o,i=t.start,r=t.dir,n=t.min,s=t.max,a=t.getter,h=t.hasItem,p=t.series,l=i;h(l+=r)&&(e=Ls(p,(o=a(l)).item)),n<=l&&l<=s&&!e;);if(e)return o}function zs(t,e,o,i,r){var n,s,a,h,p=e.min,e=e.max,l=0<p&&p<o,c=e+1<o;(l||c)&&(((h=t).missingValues||(Es.test(h.type)||h.stack?er:or))!==or?(l&&(n=i(p-1)),c&&(s=i(e+1))):(l&&(n=Ls(t,(a=i(p-1)).item)?a:Is({start:p,dir:-1,min:0,max:o-1,getter:i,hasItem:r,series:t})),c&&(s=Ls(t,(a=i(e+1)).item)?a:Is({start:e,dir:1,min:0,max:o-1,getter:i,hasItem:r,series:t}))),n&&(t._outOfRangeMinPoint=n),s&&(t._outOfRangeMaxPoint=s))}(Vs=r)&&(g.__proto__=Vs),((g.prototype=Object.create(Vs&&Vs.prototype)).constructor=g).prototype.initFields=function(){},g.prototype.initSeries=function(){for(var t=this.series,e=0;e<t.length;e++)t[e].index=e},g.prototype.createPanes=function(){for(var t=this.options.title||{},e=this.options.paneDefaults,o=this.options.panes||[],i=Math.max(o.length,1),r=[],n=x({title:{color:t.color}},e),s=0;s<i;s++){var a=x({},n,o[s]),a=(et(a.title)&&(a.title=x({text:a.title},n.title)),new Ss(a));a.paneIndex=s,r.push(a),this.append(a)}this.panes=r},g.prototype.crosshairOptions=function(t){return t.options.crosshair},g.prototype.createCrosshairs=function(t){void 0===t&&(t=this.panes);for(var e=0;e<t.length;e++)for(var o=t[e],i=0;i<o.axes.length;i++){var r=o.axes[i],n=this.crosshairOptions(r);n&&n.visible&&(r=new ms(this.chartService,r,n),this.crosshairs.push(r),o.content.append(r))}},g.prototype.removeCrosshairs=function(t){for(var e=this.crosshairs,o=t.axes,i=e.length-1;0<=i;i--)for(var r=0;r<o.length;r++)if(e[i].axis===o[r]){e.splice(i,1);break}},g.prototype.hideCrosshairs=function(){for(var t=this.crosshairs,e=0;e<t.length;e++)t[e].hide()},g.prototype.findPane=function(t){for(var e,o=this.panes,i=0;i<o.length;i++)if(o[i].options.name===t){e=o[i];break}return e||o[0]},g.prototype.findPointPane=function(t){for(var e,o=this.panes,i=0;i<o.length;i++)if(o[i].box.containsPoint(t)){e=o[i];break}return e},g.prototype.appendAxis=function(t){this.findPane(t.options.pane).appendAxis(t),this.axes.push(t),t.plotArea=this},g.prototype.removeAxis=function(t){for(var e=[],o=0;o<this.axes.length;o++){var i=this.axes[o];t!==i?e.push(i):i.destroy()}this.axes=e},g.prototype.appendChart=function(t,e){this.charts.push(t),e?e.appendChart(t):this.append(t)},g.prototype.removeChart=function(t){for(var e=[],o=0;o<this.charts.length;o++){var i=this.charts[o];i!==t?e.push(i):i.destroy()}this.charts=e},g.prototype.addToLegend=function(t){for(var e=t.length,o=this.options.legend,i=o.labels||{},r=o.inactiveItems||{},n=r.labels||{},s=[],a=0;a<e;a++){var h,p,l,c,u=t[a],d=!1!==u.visible;!1!==u.visibleInLegend&&(h=u.name,(l=!d&&dt(n)||dt(i))&&(h=l({text:Wn(h)?h:"",series:u})),l=u._defaults,l=void(it(p=u.color)&&l&&(p=l.color)),c=void 0,c=d?(l={},p):(l={color:n.color,font:n.font},r.markers.color),Wn(h)&&""!==h&&s.push({text:h,labels:l,markerColor:c,series:u,active:d}))}Tt(o.items,s)},g.prototype.groupAxes=function(t){for(var e=[],o=[],i=0;i<t.length;i++)for(var r=t[i].axes,n=0;n<r.length;n++){var s=r[n];(s.options.vertical?o:e).push(s)}return{x:e,y:o,any:e.concat(o)}},g.prototype.groupSeriesByPane=function(){for(var t=this.series,e={},o=0;o<t.length;o++){var i=t[o],r=this.seriesPaneName(i);e[r]?e[r].push(i):e[r]=[i]}return e},g.prototype.filterVisibleSeries=function(t){for(var e=[],o=0;o<t.length;o++){var i=t[o];!1!==i.visible&&e.push(i)}return e},g.prototype.reflow=function(t){var e=this.options.plotArea,o=this.panes,e=P(e.margin);this.box=t.clone().unpad(e),this.reflowPanes(),this.detachLabels(),this.reflowAxes(o),this.reflowCharts(o)},g.prototype.redraw=function(t){var e=[].concat(t),t=(this.initSeries(),this.getRoot());t&&t.cleanGradients();for(var o=0;o<e.length;o++)this.removeCrosshairs(e[o]),e[o].empty();this.render(e),this.detachLabels(),this.reflowAxes(this.panes),this.reflowCharts(e),this.createCrosshairs(e);for(var i=0;i<e.length;i++)e[i].refresh()},g.prototype.axisCrossingValues=function(t,e){for(var t=t.options,o=[].concat(t.axisCrossingValues||t.axisCrossingValue),i=e.length-o.length,r=o[0]||0,n=0;n<i;n++)o.push(r);return o},g.prototype.alignAxisTo=function(t,e,o,i){var o=t.getSlot(o,o,!0),r=t.options.reverse?2:1,i=e.getSlot(i,i,!0),n=e.options.reverse?2:1,i=t.box.translate(i[y+n]-o[y+r],i[v+n]-o[v+r]);t.pane!==e.pane&&i.translate(0,t.pane.box.y1-e.pane.box.y1),t.reflow(i)},g.prototype.alignAxes=function(t,e){for(var o=t[0],i=e[0],r=this.axisCrossingValues(o,e),n=this.axisCrossingValues(i,t),s={},a={},h={},p={},l=0;l<e.length;l++){var c=e[l],u=c.pane,d=u.id,f=!1!==c.options.visible,u=Ds(t,u)||o,g=r;u!==o&&(g=this.axisCrossingValues(u,e)),this.alignAxisTo(c,u,n[l],g[l]),c.options._overlap||(M(c.lineBox().x1)===M(u.lineBox().x1)&&(s[d]&&c.reflow(c.box.alignTo(s[d].box,S).translate(-c.options.margin,0)),f&&(s[d]=c)),M(c.lineBox().x2)===M(u.lineBox().x2)&&(c._mirrored||(c.options.labels.mirror=!c.options.labels.mirror,c._mirrored=!0),this.alignAxisTo(c,u,n[l],g[l]),a[d]&&c.reflow(c.box.alignTo(a[d].box,k).translate(c.options.margin,0)),f&&(a[d]=c)),0!==l&&i.pane===c.pane&&(c.alignTo(i),c.reflow(c.box)))}for(var y=0;y<t.length;y++){var v=t[y],m=v.pane,x=m.id,_=!1!==v.options.visible,m=Ds(e,m)||i,b=n;m!==i&&(b=this.axisCrossingValues(m,t)),this.alignAxisTo(v,m,r[y],b[y]),v.options._overlap||(M(v.lineBox().y1)===M(m.lineBox().y1)&&(v._mirrored||(v.options.labels.mirror=!v.options.labels.mirror,v._mirrored=!0),this.alignAxisTo(v,m,r[y],b[y]),h[x]&&v.reflow(v.box.alignTo(h[x].box,A).translate(0,-v.options.margin)),_&&(h[x]=v)),M(v.lineBox().y2,3)===M(m.lineBox().y2,3)&&(p[x]&&v.reflow(v.box.alignTo(p[x].box,w).translate(0,v.options.margin)),_&&(p[x]=v)),0!==y&&(v.alignTo(o),v.reflow(v.box)))}},g.prototype.shrinkAxisWidth=function(t){for(var e=this.groupAxes(t).any,o=js(e),i=0,r=0;r<t.length;r++){var n=t[r];0<n.axes.length&&(i=Math.max(i,o.width()-n.contentBox.width()))}if(0!==i)for(var s=0;s<e.length;s++){var a=e[s];a.options.vertical||a.reflow(a.box.shrink(i,0))}},g.prototype.shrinkAxisHeight=function(t){for(var e,o=0;o<t.length;o++){var i=t[o],r=i.axes,n=Math.max(0,js(r).height()-i.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},g.prototype.fitAxes=function(t){for(var e=this.groupAxes(t).any,o=0,i=0;i<t.length;i++){var r=t[i],n=r.axes,r=r.contentBox;if(0<n.length)for(var s=js(n),a=Math.max(r.y1-s.y1,r.y2-s.y2),o=Math.max(o,r.x1-s.x1),h=0;h<n.length;h++){var p=n[h];p.reflow(p.box.translate(0,a))}}for(var l=0;l<e.length;l++){var c=e[l];c.reflow(c.box.translate(o,0))}},g.prototype.reflowAxes=function(t){for(var e=this.groupAxes(t),o=0;o<t.length;o++)this.reflowPaneAxes(t[o]);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))},g.prototype.autoRotateAxisLabels=function(t){for(var e,o=this.panes,i=Hs(o),r=0;r<i.length;r++)i[r].autoRotateLabels()&&(e=!0);if(e){for(var n=0;n<o.length;n++)this.reflowPaneAxes(o[n]);0<t.x.length&&0<t.y.length&&(this.alignAxes(t.x,t.y),this.shrinkAxisWidth(o))}},g.prototype.reflowPaneAxes=function(t){var e=t.axes,o=e.length;if(0<o)for(var i=0;i<o;i++)e[i].reflow(t.contentBox)},g.prototype.reflowCharts=function(t){for(var e=this.charts,o=e.length,i=this.box,r=0;r<o;r++){var n=e[r].pane;n&&!u(n,t)||e[r].reflow(i)}},g.prototype.reflowPanes=function(){for(var t=this.box,e=this.panes,o=e.length,i=t.height(),r=0,n=t.y1,s=0;s<o;s++){var a=e[s],h=a.options.height;a.options.width=t.width(),a.options.height?(h.indexOf&&h.indexOf("%")&&(h=parseInt(h,10)/100,a.options.height=h*t.height()),a.reflow(t.clone()),i-=a.options.height):r++}for(var p=0;p<o;p++){var l=e[p];l.options.height||(l.options.height=i/r)}for(var c=0;c<o;c++){var u=e[c],d=t.clone().move(t.x1,n);u.reflow(d),n+=u.options.height}},g.prototype.backgroundBox=function(){for(var t=this.axes,e=t.length,o=0;o<e;o++)for(var i=t[o],r=0;r<e;r++){var n,s=t[r];i.options.vertical!==s.options.vertical&&(s=i.lineBox().clone().wrap(s.lineBox()),n=n?n.wrap(s):s)}return n||this.box},g.prototype.chartsBoxes=function(){for(var t=this.panes,e=[],o=0;o<t.length;o++)e.push(t[o].chartsBox());return e},g.prototype.addBackgroundPaths=function(t){for(var e=this.chartsBoxes(),o=0;o<e.length;o++)t.paths.push(b.drawing.Path.fromRect(e[o].toRect()))},g.prototype.backgroundContainsPoint=function(t){for(var e=this.chartsBoxes(),o=0;o<e.length;o++)if(e[o].containsPoint(t))return!0},g.prototype.createVisual=function(){Vs.prototype.createVisual.call(this);var t=this.options.plotArea,e=t.opacity,o=t.background,t=t.border,o=(void 0===t&&(t={}),""!==o&&null!==o&&"none"!==o&&"transparent"!==o&&T(o)||(o=a,e=0),this._bgVisual=new b.drawing.MultiPath({fill:{color:o,opacity:e},stroke:{color:t.width?t.color:"",width:t.width,dashType:t.dashType},zIndex:-1}));this.addBackgroundPaths(o),this.appendVisual(o)},g.prototype.pointsByCategoryIndex=function(t){var e=this.charts,o=[];if(null!==t)for(var i=0;i<e.length;i++)if("_navigator"!==e[i].pane.options.name){var r=e[i].categoryPoints[t];if(r&&r.length)for(var n=0;n<r.length;n++){var s=r[n];s&&T(s.value)&&null!==s.value&&o.push(s)}}return o},g.prototype.pointsBySeriesIndex=function(e){return this.filterPoints(function(t){return t.series.index===e})},g.prototype.pointsBySeriesName=function(e){return this.filterPoints(function(t){return t.series.name===e})},g.prototype.filterPoints=function(t){for(var e=this.charts,o=[],i=0;i<e.length;i++)for(var r=e[i].points,n=0;n<r.length;n++){var s=r[n];s&&!1!==s.visible&&t(s)&&o.push(s)}return o},g.prototype.findPoint=function(t){for(var e=this.charts,o=0;o<e.length;o++)for(var i=e[o].points,r=0;r<i.length;r++){var n=i[r];if(n&&!1!==n.visible&&t(n))return n}},g.prototype.paneByPoint=function(t){for(var e=this.panes,o=0;o<e.length;o++){var i=e[o];if(i.box.containsPoint(t))return i}},g.prototype.detachLabels=function(){var t=this.groupAxes(this.panes),e=t.x,t=t.y;this.detachAxisGroupLabels(t,e),this.detachAxisGroupLabels(e,t)},g.prototype.detachAxisGroupLabels=function(t,e){for(var o=0,i=0;i<t.length;i++){var r=t[i],n=r.pane,s=Ds(e,n)||e[0],s=this.createLabelAxis(r,i+o,s);s&&(o++,r=n.axes.indexOf(r)+o,n.appendAxisAt(s,r))}},g.prototype.createLabelAxis=function(t,e,o){var i=t.options.labels,r=i.position,i=i.visible;if("end"!==r&&"start"!==r||!1===i)return null;var i=this.groupAxes(this.panes),i=o.options.vertical?i.x:i.y,i=this.axisCrossingValues(o,i),r="end"===r,n=o.range(),r=r?n.max:n.min;if(_(i[e],n.min,n.max)-r==0)return null;i.splice(e+1,0,r),o.options.axisCrossingValues=i;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};var Vs,f=g;function g(t,e,o){Vs.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=o,this.originalOptions=e,this.createPanes(),this.render(),this.createCrosshairs()}function js(t){for(var e,o=t.length,i=0;i<o;i++){var r=t[i],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))&&(n=n?r.contentBox():r.lineBox(),e?e.wrap(n):e=n.clone())}return e||new R}function Ds(t,e){for(var o=0;o<t.length;o++){var i=t[o];if(i&&i.pane===e)return i}}var Hs=function(t){return t.reduce(function(t,e){return t.concat(e.axes)},[])},Us=(i(f,{series:[],plotArea:{margin:{}},background:"",border:{color:D,width:0},paneDefaults:{title:{}},legend:{inactiveItems:{labels:{color:"#919191"},markers:{color:"#919191"}}}}),f),Fs={hover:function(t,e){this._dispatchEvent(t,e,"plotAreaHover")},click:function(t,e){this._dispatchEvent(t,e,"plotAreaClick")}};(Gs=b.Class)&&(qs.__proto__=Gs),((qs.prototype=Object.create(Gs&&Gs.prototype)).constructor=qs).prototype.aggregatePoints=function(t,e){var o,i=this._series,r=this._seriesFields,n=this._bindPoints(t||[]),t=n.dataItems[0],s={};!t||m(t)||Z(t)||((o=function(){}).prototype=t,s=new o);for(var a=0;a<r.length;a++){var h=r[a],p=this._bindField(n.values,h.canonicalName),p=h.transform(p,i,n.dataItems,e);if(!(null===p||!st(p)||T(p.length)||p instanceof Date)){s=p;break}if(T(p)){l=void 0;c=void 0;u=void 0;d=void 0;f=void 0;g=void 0;var l=h.name;var c=s;var u=p;var d=c,f=l;if(-1<l.indexOf(".")){for(var g=l.split(".");1<g.length;)f=g.shift(),T(d[f])||(d[f]={}),d=d[f];f=g.shift()}d[f]=u}}return s},qs.prototype._bindPoints=function(t){for(var e=this._binder,o=this._series,i=[],r=[],n=0;n<t.length;n++){var s=t[n];i.push(e.bindPoint(o,s)),r.push(o.data[s])}return{values:i,dataItems:r}},qs.prototype._bindField=function(t,e){for(var o=[],i=t.length,r=0;r<i;r++){var n=t[r],s=n.valueFields,s=(T(s[e])?s:n.fields)[e];o.push(s)}return o};var Ns,Gs,Ws=qs,f=((Ns=b.Class)&&(Xs.__proto__=Ns),((Xs.prototype=Object.create(Ns&&Ns.prototype)).constructor=Xs).prototype.register=function(t,e){for(var o=0;o<t.length;o++)this._defaults[t[o]]=e},Xs.prototype.query=function(t){return this._defaults[t]},Xs);function Xs(){Ns.call(this),this._defaults={}}function qs(t,e,o){Gs.call(this);var i=e.canonicalFields(t),r=e.valueFields(t),n=e.sourceFields(t,i),s=this._seriesFields=[],o=o.query(t.type),a=t.aggregate||o;this._series=t,this._binder=e;for(var h=0;h<i.length;h++){var p=i[h],l=void 0;if(st(a))l=a[p];else{if(0!==h&&!u(p,r))break;l=a}l&&s.push({canonicalName:p,name:n[h],transform:it(l)?l:Gi[l]})}}f.current=new f;var Ys,Zs=f,f=((Ys=fn)&&(Qs.__proto__=Ys),((Qs.prototype=Object.create(Ys&&Ys.prototype)).constructor=Qs).prototype.createLabel=function(){var t=this.options.labels,e=x({},t,t.from),t=x({},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))},Qs.prototype._createLabel=function(t){var e=dt(t),o=this.pointData(),e=e?e(o):this.formatValue(t.format);return new ln(e,x({vertical:this.options.vertical},t),o)},Qs.prototype.reflow=function(t){this.render();var e=this.labelFrom,o=this.labelTo,i=this.value;this.box=t,e&&(e.options.aboveAxis=i.from>i.to,e.reflow(t)),o&&(o.options.aboveAxis=i.to>i.from,o.reflow(t)),this.note&&this.note.reflow(t)},Qs);function Qs(){Ys.apply(this,arguments)}f.prototype.defaults=x({},f.prototype.defaults,{labels:{format:"{0} - {1}"},tooltip:{format:"{1}"}});var Ks,$s=f,f=((Ks=An)&&(Js.__proto__=Ks),((Js.prototype=Object.create(Ks&&Ks.prototype)).constructor=Js).prototype.pointType=function(){return $s},Js.prototype.pointValue=function(t){return t.valueFields},Js.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)},Js.prototype.plotRange=function(t){return t?[t.value.from,t.value.to]:0},Js.prototype.updateRange=function(t,e){var e=e.series.axis,o=t.from,i=t.to,r=this.valueAxisRanges[e];null!==t&&m(o)&&m(i)&&((r=this.valueAxisRanges[e]=r||{min:G,max:W}).min=Math.min(r.min,o),r.max=Math.max(r.max,o),r.min=Math.min(r.min,i),r.max=Math.max(r.max,i))},Js.prototype.aboveAxis=function(t){t=t.value;return t.from<t.to},Js);function Js(){Ks.apply(this,arguments)}f.prototype.plotLimits=Sr.prototype.plotLimits;var ta,ea,oa=f,ia=((ea=Tr)&&(na.__proto__=ea),((na.prototype=Object.create(ea&&ea.prototype)).constructor=na).prototype.aliasFor=function(){return this.parent},na),f=((ta=r)&&(ra.__proto__=ta),((ra.prototype=Object.create(ta&&ta.prototype)).constructor=ra).prototype.render=function(){var t,e,o,i;this._rendered||(this._rendered=!0,t=(e=this.options).markers,e=e.labels,i=this.value,o=this.fromPoint=new ia(i,x({},this.options,{labels:e.from,markers:t.from})),i=this.toPoint=new ia(i,x({},this.options,{labels:e.to,markers:t.to})),this.copyFields(o),this.copyFields(i),this.append(o),this.append(i))},ra.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())},ra.prototype.createHighlight=function(){var t=new b.drawing.Group;return t.append(this.fromPoint.createHighlight()),t.append(this.toPoint.createHighlight()),t},ra.prototype.highlightVisual=function(){return this.visual},ra.prototype.highlightVisualArgs=function(){return{options:this.options,from:this.fromPoint.highlightVisualArgs(),to:this.toPoint.highlightVisualArgs()}},ra.prototype.tooltipAnchor=function(){var t,e,o,i,r=this.owner.pane.clipBox();if(!r||r.overlaps(this.box))return o=(r=this.box).center(),i=S,r=this.options.vertical?(t=o.x,e=r.y1-5,w):(t=r.x2+5,e=o.y,C),{point:new B(t,e),align:{horizontal:i,vertical:r}}},ra.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},ra.prototype.overlapsBox=function(t){return this.box.overlaps(t)},ra.prototype.unclipElements=function(){this.fromPoint.unclipElements(),this.toPoint.unclipElements()},ra.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}"})))},ra.prototype.positionLabels=function(t,e){var o,i=this.options,r=i.labels,i=i.vertical;"auto"===r.position&&(i=i?e.y1<=t.y1?(o="above","below"):(o="below","above"):e.x1<=t.x1?(o=S,k):(o=k,S),r.from&&r.from.position||(this.fromPoint.options.labels.position=i),r.to&&r.to.position||(this.toPoint.options.labels.position=o))},ra.prototype.copyFields=function(t){t.dataItem=this.dataItem,t.category=this.category,t.series=this.series,t.color=this.color,t.owner=this.owner},ra);function ra(t,e){ta.call(this),this.value=t,this.options=e,this.aboveAxis=O(this.options.aboveAxis,!0),this.tooltipTracking=!0,this.initLabelsFormat()}function na(){ea.apply(this,arguments)}x(f.prototype,kr),x(f.prototype,o),f.prototype.defaults={markers:{visible:!1,background:a,size:8,type:H,border:{width:2},opacity:1},labels:{visible:!1,margin:P(3),padding:P(4),animation:{type:"fadeIn",delay:600},position:"auto"},notes:{label:{}},highlight:{markers:{border:{color:a,width:2}},zIndex:100},tooltip:{format:"{0} - {1}"}};var sa,aa,ha,pa=f,la=((ha=Yr)&&(fa.__proto__=ha),((fa.prototype=Object.create(ha&&ha.prototype)).constructor=fa).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.toGeometryPoints(this.toPoints()))},fa.prototype.stackSegments=function(){var t=this.fromSegments;return t=this.fromSegments?t:this.fromSegments=this.segmentsFromPoints(this.toGeometryPoints(this.fromPoints().reverse()))},fa.prototype.createStroke=function(t){var e=new b.drawing.Path(t),t=new b.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)},fa.prototype.hasStackSegment=function(){return!0},fa.prototype.fromPoints=function(){return this.linePoints.map(function(t){return t.fromPoint})},fa.prototype.toPoints=function(){return this.linePoints.map(function(t){return t.toPoint})},fa),ca=((aa=la)&&(da.__proto__=aa),((da.prototype=Object.create(aa&&aa.prototype)).constructor=da).prototype.createStrokeSegments=function(){return this.createCurveSegments(this.toPoints())},da.prototype.stackSegments=function(){var t=this.fromSegments;return t=this.fromSegments?t:this.fromSegments=this.createCurveSegments(this.fromPoints().reverse())},da.prototype.createCurveSegments=function(t){return(new Ri).process(this.toGeometryPoints(t))},da),f=((sa=la)&&(ua.__proto__=sa),((ua.prototype=Object.create(sa&&sa.prototype)).constructor=ua).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.calculateStepPoints(this.toPoints()))},ua.prototype.stackSegments=function(){var t=this.fromSegments;return this.fromSegments||(t=this.fromSegments=this.segmentsFromPoints(this.calculateStepPoints(this.fromPoints()))).reverse(),t},ua);function ua(){sa.apply(this,arguments)}function da(){aa.apply(this,arguments)}function fa(){ha.apply(this,arguments)}x(f.prototype,h);var ga,ya=f,h=((ga=Sr)&&(va.__proto__=ga),((va.prototype=Object.create(ga&&ga.prototype)).constructor=va).prototype.render=function(){ga.prototype.render.call(this),this.renderSegments()},va.prototype.pointType=function(){return pa},va.prototype.createPoint=function(t,e){var o=e.categoryIx,i=e.category,r=e.series,e=e.seriesIx,n=t.valueFields;if(!Wn(n.from)&&!Wn(n.to)){if(this.seriesMissingValues(r)!==er)return null;n={from:0,to:0}}var s=this.pointOptions(r,e),s=this.evalPointOptions(s,n,i,o,r,e),i=t.fields.color||r.color,o=(it(r.color)&&(i=s.color),new pa(n,s));return o.color=i,this.append(o),o},va.prototype.createSegment=function(t,e,o){var i=(e.line||{}).style;return new("smooth"===i?ca:"step"===i?ya:la)(t,e,o)},va.prototype.plotRange=function(t,e){return t?[t.value.from,t.value.to]:[e,e]},va.prototype.valueSlot=function(t,e){var o=t.getSlot(e[0],e[0],!this.options.clip),t=t.getSlot(e[1],e[1],!this.options.clip);if(o&&t)return{from:o,to:t}},va.prototype.pointSlot=function(t,e){var o,i=e.from,e=e.to,i=this.options.invertAxes?(o=new R(i.x1,t.y1,i.x2,t.y2),new R(e.x1,t.y1,e.x2,t.y2)):(o=new R(t.x1,i.y1,t.x2,i.y2),new R(t.x1,e.y1,t.x2,e.y2));return{from:o,to:i}},va.prototype.addValue=function(t,e){var o=t.valueFields;m(o.from)||(o.from=o.to),m(o.to)||(o.to=o.from),ga.prototype.addValue.call(this,t,e)},va.prototype.updateRange=function(t,e){var o;null!==t&&m(t.from)&&m(t.to)&&(e=e.series.axis,e=this.valueAxisRanges[e]=this.valueAxisRanges[e]||{min:G,max:W},o=t.from,t=t.to,e.min=Math.min(e.min,o,t),e.max=Math.max(e.max,o,t))},va.prototype.formatPointValue=function(t,e){t=t.value;return this.chartService.format.auto(e,t.from,t.to)},va.prototype.animationPoints=function(){for(var t=this.points,e=[],o=0;o<t.length;o++){var i=t[o];i&&(e.push((i.fromPoint||{}).marker),e.push((i.toPoint||{}).marker))}return e.concat(this._segments)},va);function va(){ga.apply(this,arguments)}x(h.prototype,Er,c);var ma,xa,_a,ba=h,wa=((_a=Tn)&&(Aa.__proto__=_a),((Aa.prototype=Object.create(_a&&_a.prototype)).constructor=Aa).prototype.reflow=function(t){var e=this.options,o=this.value,e=this.owner.seriesValueAxis(e),i=[],r=[],n=[],s=e.getSlot(o.low,o.high),a=e.getSlot(o.open,o.open),e=e.getSlot(o.close,o.close),o=(a.x1=e.x1=s.x1=t.x1,a.x2=e.x2=s.x2=t.x2,s.center().x);i.push([a.x1,a.y1]),i.push([o,a.y1]),r.push([o,e.y1]),r.push([e.x2,e.y1]),n.push([o,s.y1]),n.push([o,s.y2]),this.lines=[i,r,n],this.box=s.clone().wrap(a.clone().wrap(e)),this.reflowNote()},Aa.prototype.createBody=function(){},Aa),Ca=((xa=En)&&(ka.__proto__=xa),((ka.prototype=Object.create(xa&&xa.prototype)).constructor=ka).prototype.pointType=function(){return wa},ka),f=((ma=r)&&(Sa.__proto__=ma),((Sa.prototype=Object.create(ma&&ma.prototype)).constructor=Sa).prototype.linePoints=function(){var t,e=this.from,o=this.from.box,i=this.to.box,r=[];return e.isVertical?(t=e.aboveAxis?o.y1:o.y2,r.push([o.x1,t],[i.x2,t])):(t=e.aboveAxis?o.x2:o.x1,r.push([t,o.y1],[t,i.y2])),r},Sa.prototype.createVisual=function(){ma.prototype.createVisual.call(this);var t=this.series.line||{},t=b.drawing.Path.fromPoints(this.linePoints(),{stroke:{color:t.color,width:t.width,opacity:t.opacity,dashType:t.dashType}});J(t),this.visual.append(t)},Sa);function Sa(t,e,o){ma.call(this),this.from=t,this.to=e,this.series=o}function ka(){xa.apply(this,arguments)}function Aa(){_a.apply(this,arguments)}i(f,{animation:{type:"fadeIn",delay:600}});var Pa,Ta,Ma=f,Oa=((Ta=An)&&(Ea.__proto__=Ta),((Ea.prototype=Object.create(Ta&&Ta.prototype)).constructor=Ea).prototype.render=function(){Ta.prototype.render.call(this),this.createSegments()},Ea.prototype.traverseDataPoints=function(t){for(var e=this.options.series,o=br(e),i=!this.options.invertAxes,r=0;r<e.length;r++)for(var n=e[r],s=0,a=0,h=0;h<o;h++){var p=Qi.current.bindPoint(n,h),l=p.valueFields.value,c=p.fields.summary,u=s,d=void 0;c?"total"===c.toLowerCase()?(u=0,d=p.valueFields.value=s):(d=u-(p.valueFields.value=a),a=0):m(l)&&(a+=l,d=s+=l),t(p,{category:this.categoryAxis.categoryAt(h),categoryIx:h,series:n,seriesIx:r,total:s,runningTotal:a,from:u,to:d,isVertical:i})}},Ea.prototype.updateRange=function(t,e){Ta.prototype.updateRange.call(this,{value:e.to},e)},Ea.prototype.aboveAxis=function(t){return 0<=t.value},Ea.prototype.plotRange=function(t){return[t.from,t.to]},Ea.prototype.createSegments=function(){for(var t=this.options.series,e=this.seriesPoints,o=this.segments=[],i=0;i<t.length;i++){var r=t[i],n=e[i];if(n)for(var s=void 0,a=0;a<n.length;a++){var h,p=n[a];p&&s&&(h=new Ma(s,p,r),o.push(h),this.append(h)),s=p}}},Ea),Ba=["area","verticalArea","rangeArea","verticalRangeArea"],Ra=[nr,ar].concat(Ba),c=((Pa=Us)&&(E.__proto__=Pa),((E.prototype=Object.create(Pa&&Pa.prototype)).constructor=E).prototype.initFields=function(t){if(this.namedCategoryAxes={},this.namedValueAxes={},this.valueAxisRangeTracker=new nn,0<t.length){this.invertAxes=u(t[0].type,[ir,"bullet",ar,"verticalArea","verticalRangeArea","rangeBar","horizontalWaterfall","verticalBoxPlot"]);for(var e=0;e<t.length;e++){var o=t[e].stack;if(o&&"100%"===o.type){this.stack100=!0;break}}}},E.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)},E.prototype.removeAxis=function(t){var e=t.options.name;Pa.prototype.removeAxis.call(this,t),t instanceof Wo?delete this.namedCategoryAxes[e]:(this.valueAxisRangeTracker.reset(e),delete this.namedValueAxes[e]),t===this.categoryAxis&&delete this.categoryAxis,t===this.valueAxis&&delete this.valueAxis},E.prototype.createCharts=function(t){for(var e=this.groupSeriesByPane(),o=0;o<t.length;o++){var i=t[o],r=e[i.options.name||"default"]||[],r=(this.addToLegend(r),this.filterVisibleSeries(r));if(r)for(var n=this.groupSeriesByCategoryAxis(r),s=0;s<n.length;s++)this.createChartGroup(n[s],i)}},E.prototype.createChartGroup=function(t,e){this.createAreaChart(Ms(t,["area","verticalArea"]),e),this.createRangeAreaChart(Ms(t,["rangeArea","verticalRangeArea"]),e),this.createBarChart(Ms(t,[rr,ir]),e),this.createRangeBarChart(Ms(t,["rangeColumn","rangeBar"]),e),this.createBulletChart(Ms(t,["bullet","verticalBullet"]),e),this.createCandlestickChart(Ms(t,"candlestick"),e),this.createBoxPlotChart(Ms(t,["boxPlot","verticalBoxPlot"]),e),this.createOHLCChart(Ms(t,"ohlc"),e),this.createWaterfallChart(Ms(t,["waterfall","horizontalWaterfall"]),e),this.createLineChart(Ms(t,[nr,ar]),e)},E.prototype.aggregateCategories=function(t){var e=this.srcSeries||this.series,o=[];this._currentPointsCache={},this._seriesPointsCache=this._seriesPointsCache||{};for(var i=0;i<e.length;i++){var r=e[i],n=this.seriesCategoryAxis(r),s=this.findPane(n.options.pane),r=(Ts(n.options.type,U)||r.categoryField)&&u(s,t)?this.aggregateSeries(r,n):this.filterSeries(r,n);o.push(r)}this._seriesPointsCache=this._currentPointsCache,this._currentPointsCache=null,this.srcSeries=e,this.series=o},E.prototype.filterSeries=function(e,o){var t=(e.data||{}).length;if(o._seriesMax=Math.max(o._seriesMax||0,t),!m(o.options.min)&&!m(o.options.max))return e;var i=o.currentRangeIndices(),r=u(e.type,Ra),n=x({},e);return n.data=(n.data||[]).slice(i.min,i.max+1),r&&zs(n,i,t,function(t){return{item:e.data[t],category:o.categoryAt(t,!0),categoryIx:t-i.min}},function(t){return T(e.data[t])}),n},E.prototype.clearSeriesPointsCache=function(){this._seriesPointsCache={}},E.prototype.seriesSourcePoints=function(t,e){var o=t.index+";"+e.categoriesHash();if(this._seriesPointsCache[o])return this._currentPointsCache[o]=this._seriesPointsCache[o],this._seriesPointsCache[o];var i=e.options,r=i.srcCategories,i=Ts(i.type,U),n=t.data,s=i?Os:Wi,a=[];i||e.mapCategories();for(var h=0;h<n.length;h++){var p,l=t.categoryField?s(t.categoryField,n[h],this.chartService.intl):r[h];T(l)&&null!==l&&(a[p=e.totalIndex(l)]=a[p]||{items:[],category:l},a[p].items.push(h))}return this._currentPointsCache[o]=a},E.prototype.aggregateSeries=function(t,i){if(!t.data.length)return t;for(var r=this.seriesSourcePoints(t,i),e=x({},t),n=new Ws(x({},t),Qi.current,Zs.current),o=e.data=[],s=i.options.dataItems||[],a=i.currentRangeIndices(),h=function(t){var e=t-a.min,o=r[t];return(o=o||(r[t]={})).categoryIx=e,o.item||(e=i.categoryAt(t,!0),o.category=e,o.item=n.aggregatePoints(o.items,e)),o},p=a.min;p<=a.max;p++){var l=h(p);o[l.categoryIx]=l.item,l.items&&l.items.length&&(s[l.categoryIx]=l.item)}return u(e.type,Ra)&&zs(e,a,i.totalCount(),h,function(t){return r[t]}),i.options.dataItems=s,e},E.prototype.appendChart=function(t,e){var o=t.options.series,i=this.seriesCategoryAxis(o[0]),r=i.options.categories,n=Math.max(0,br(o)-r.length);if(0<n)for(r=i.options.categories=i.options.categories.slice(0);n--;)r.push("");this.valueAxisRangeTracker.update(t.valueAxisRanges),Pa.prototype.appendChart.call(this,t,e)},E.prototype.seriesPaneName=function(t){var e=this.options,o=t.axis,t=vt([].concat(e.valueAxis),function(t){return t.name===o})[0],e=((e.panes||[{}])[0]||{}).name||"default";return(t||{}).pane||e},E.prototype.seriesCategoryAxis=function(t){var t=t.categoryAxis,e=t?this.namedCategoryAxes[t]:this.categoryAxis;if(e)return e;throw new Error("Unable to locate category axis with name "+t)},E.prototype.stackableChartOptions=function(t,e){t=t.stack;return{isStacked:t,isStacked100:t&&"100%"===t.type,clip:e.options.clip}},E.prototype.groupSeriesByCategoryAxis=function(t){for(var e=[],o={},i=0;i<t.length;i++){var r=t[i].categoryAxis||"$$default$$";o.hasOwnProperty(r)||(o[r]=!0,e.push(r))}for(var n=[],s=0;s<e.length;s++){var a=function(t,e,o){return vt(t,function(t){return 0===o&&!t.categoryAxis||t.categoryAxis===e})}(t,e[s],s);0!==a.length&&n.push(a)}return n},E.prototype.createBarChart=function(t,e){var o;0!==t.length&&(o=t[0],t=new An(this,Object.assign({series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing},this.stackableChartOptions(o,e))),this.appendChart(t,e))},E.prototype.createRangeBarChart=function(t,e){var o;0!==t.length&&(o=t[0],t=new oa(this,{series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing}),this.appendChart(t,e))},E.prototype.createBulletChart=function(t,e){var o;0!==t.length&&(o=t[0],t=new ls(this,{series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing,clip:e.options.clip}),this.appendChart(t,e))},E.prototype.createLineChart=function(t,e){var o;0!==t.length&&(o=t[0],t=new qr(this,Object.assign({invertAxes:this.invertAxes,series:t},this.stackableChartOptions(o,e))),this.appendChart(t,e))},E.prototype.createAreaChart=function(t,e){var o;0!==t.length&&(o=t[0],t=new rn(this,Object.assign({invertAxes:this.invertAxes,series:t},this.stackableChartOptions(o,e))),this.appendChart(t,e))},E.prototype.createRangeAreaChart=function(t,e){0!==t.length&&(t=new ba(this,{invertAxes:this.invertAxes,series:t,clip:e.options.clip}),this.appendChart(t,e))},E.prototype.createOHLCChart=function(t,e){var o;0!==t.length&&(o=t[0],t=new Ca(this,{invertAxes:this.invertAxes,gap:o.gap,series:t,spacing:o.spacing,clip:e.options.clip}),this.appendChart(t,e))},E.prototype.createCandlestickChart=function(t,e){var o;0!==t.length&&(o=t[0],t=new En(this,{invertAxes:this.invertAxes,gap:o.gap,series:t,spacing:o.spacing,clip:e.options.clip}),this.appendChart(t,e))},E.prototype.createBoxPlotChart=function(t,e){var o;0!==t.length&&(o=t[0],t=new Hn(this,{invertAxes:this.invertAxes,gap:o.gap,series:t,spacing:o.spacing,clip:e.options.clip}),this.appendChart(t,e))},E.prototype.createWaterfallChart=function(t,e){var o;0!==t.length&&(o=t[0],t=new Oa(this,{series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing}),this.appendChart(t,e))},E.prototype.axisRequiresRounding=function(t,e){for(var o=Ms(this.series,hr),i=0;i<this.series.length;i++){var r,n=this.series[i];!u(n.type,Ba)||(r=n.line)&&"step"===r.style&&o.push(n)}for(var s=0;s<o.length;s++){var a=o[s].categoryAxis||"";if(a===t||!a&&0===e)return!0}},E.prototype.aggregatedAxis=function(t,e){for(var o=this.series,i=0;i<o.length;i++){var r=o[i].categoryAxis||"";if((r===t||!r&&0===e)&&o[i].categoryField)return!0}},E.prototype.createCategoryAxesLabels=function(){for(var t=this.axes,e=0;e<t.length;e++)t[e]instanceof Wo&&t[e].createLabels()},E.prototype.createCategoryAxes=function(t){for(var e=this.invertAxes,o=[].concat(this.options.categoryAxis),i=[],r=0;r<o.length;r++){var n=o[r];if(u(this.findPane(n.pane),t)){var s=n.name,a=n.categories,h=(void 0===a&&(a=[]),n=x({vertical:e,reverse:!e&&this.chartService.rtl,axisCrossingValue:e?G:0},n),T(n.justified)||(n.justified=this.isJustified()),this.axisRequiresRounding(s,r)&&(n.justified=!1),void 0),h=new(Bs(n,a[0])?Jo:Wo)(n,this.chartService);if(o[r].categories=h.options.srcCategories,s){if(this.namedCategoryAxes[s])throw new Error("Category axis with name "+s+" is already defined");this.namedCategoryAxes[s]=h}h.axisIndex=r,i.push(h),this.appendAxis(h)}}var p=this.categoryAxis||i[0];this.categoryAxis=p,e?this.axisY=p:this.axisX=p},E.prototype.isJustified=function(){for(var t=this.series,e=0;e<t.length;e++)if(!u(t[e].type,Ba))return!1;return!0},E.prototype.createValueAxes=function(t){var e=this.valueAxisRangeTracker,o=e.query(),i=[].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<i.length;a++){var h=i[a];if(u(this.findPane(h.pane),t)){var p=h.name,l=Ts(h.type,"log")?{min:.1,max:1}:{min:0,max:1},l=e.query(p)||o||l,l=(0===a&&l&&o&&(l.min=Math.min(l.min,o.min),l.max=Math.max(l.max,o.max)),new(Ts(h.type,"log")?yi:hi)(l.min,l.max,x({},n,h),this.chartService));if(p){if(this.namedValueAxes[p])throw new Error("Value axis with name "+p+" is already defined");this.namedValueAxes[p]=l}l.axisIndex=a,s.push(l),this.appendAxis(l)}}var c=this.valueAxis||s[0];this.valueAxis=c,r?this.axisX=c:this.axisY=c},E.prototype._dispatchEvent=function(t,e,o){var i=t._eventCoordinates(e),r=new B(i.x,i.y),i=this.pointPane(r),n=[],s=[];if(i){for(var a=i.axes,h=0;h<a.length;h++){var p=a[h];p.getValue?ks(s,p.getValue(r)):ks(n,p.getCategory(r))}0===n.length&&ks(n,this.categoryAxis.getCategory(r)),0<n.length&&0<s.length&&t.trigger(o,{element:Lt(e),originalEvent:e,category:Rs(n),value:Rs(s)})}},E.prototype.pointPane=function(t){for(var e=this.panes,o=0;o<e.length;o++){var i=e[o];if(i.contentBox.containsPoint(t))return i}},E.prototype.updateAxisOptions=function(t,e){La(this.options,t,e),La(this.originalOptions,t,e)},E);function E(){Pa.apply(this,arguments)}function Ea(){Ta.apply(this,arguments)}function La(t,e,o){x([].concat(e instanceof Wo?t.categoryAxis:t.valueAxis)[e.axisIndex],o)}i(c,{categoryAxis:{},valueAxis:{}}),x(c.prototype,Fs);var Ia=c;function za(){this._defaultPrevented=!0}(Va=b.Class)&&(Da.__proto__=Va),((Da.prototype=Object.create(Va&&Va.prototype)).constructor=Da).prototype.destroy=function(){this._points=[]},Da.prototype.show=function(t,e){var o=[].concat(t);this.hide();for(var i=0;i<o.length;i++){var r=o[i];r&&r.toggleHighlight&&r.hasHighlight()&&(this.togglePointHighlight(r,!0,e),this._points.push(r))}},Da.prototype.togglePointHighlight=function(t,e,o){var i=(t.options.highlight||{}).toggle;i?(i(i={category:t.category,series:t.series,dataItem:t.dataItem,value:t.value,stackValue:t.stackValue,preventDefault:za,visual:t.highlightVisual(),show:e}),i._defaultPrevented||t.toggleHighlight(e,o)):t.toggleHighlight(e,o)},Da.prototype.hide=function(){for(var t=this._points;t.length;)this.togglePointHighlight(t.pop(),!1)},Da.prototype.isHighlighted=function(t){for(var e=this._points,o=0;o<e.length;o++)if(t===e[o])return!0;return!1};var Va,ja=Da;function Da(){Va.call(this),this._points=[]}function Ha(t,e){e=(e||"").toLowerCase(),t=t.event;return"none"===e&&!(t.ctrlKey||t.shiftKey||t.altKey)||t[e+"Key"]}function Ua(t){for(var e={},o=0;o<t.length;o++){var i=t[o];i.axis.options.name&&(e[i.axis.options.name]={min:i.range.min,max:i.range.max})}return e}(Fa=b.Class)&&(Na.__proto__=Fa),((Na.prototype=Object.create(Fa&&Fa.prototype)).constructor=Na).prototype.start=function(t){return this._active=Ha(t,this.options.key),this._active},Na.prototype.move=function(t){if(this._active){t=this.axisRanges=this._panAxes(t,y).concat(this._panAxes(t,v));if(t.length)return Ua(this.axisRanges=t)}},Na.prototype.end=function(){var t=this._active;return this._active=!1,t},Na.prototype.pan=function(){var t=this.plotArea,e=this.axisRanges;if(e.length){for(var o=0;o<e.length;o++){var i=e[o];t.updateAxisOptions(i.axis,i.range)}t.redraw(t.panes)}},Na.prototype.destroy=function(){delete this.plotArea},Na.prototype._panAxes=function(t,e){var o=this.plotArea,i=-t[e].delta,t=(this.options.lock||"").toLowerCase(),r=[];if(0!=i&&(t||"").toLowerCase()!==e)for(var n=o.axes,s=0;s<n.length;s++){var a,h=n[s];!(e===y&&!h.options.vertical||e===v&&h.options.vertical)||(a=h.pan(i))&&(a.limitRange=!0,r.push({axis:h,range:a}))}return r};var Fa,h=Na;function Na(t,e){Fa.call(this),this.plotArea=t,this.options=x({},this.options,e)}h.prototype.options={key:"none",lock:"none"};var Ga,Wa=h,f=((Ga=b.Class)&&(Xa.__proto__=Ga),((Xa.prototype=Object.create(Ga&&Ga.prototype)).constructor=Xa).prototype.createElement=function(){var t=this._marquee=document.createElement("div"),e=(t.className="k-marquee",document.createElement("div"));e.className="k-marquee-color",t.appendChild(e)},Xa.prototype.removeElement=function(){this._marquee.parentNode&&this._marquee.parentNode.removeChild(this._marquee)},Xa.prototype.setStyles=function(t){pt(this._marquee,t)},Xa.prototype.start=function(t){if(Ha(t,this.options.key)){var e=this.chart,o=e._eventCoordinates(t),e=this._zoomPane=e._plotArea.paneByPoint(o),o=e?e.chartsBox().clone():null;if(e&&o)return e=this._elementOffset(),o.translate(e.left,e.top),this._zoomPaneClipBox=o,document.body.appendChild(this._marquee),this.setStyles({left:t.pageX+1,top:t.pageY+1,width:0,height:0}),!0}return!1},Xa.prototype._elementOffset=function(){var t=this.chart.element,e=pt(t,["paddingLeft","paddingTop"]),o=e.paddingLeft,e=e.paddingTop,t=Bt(t);return{left:o+t.left,top:e+t.top}},Xa.prototype.move=function(t){this._zoomPane&&this.setStyles(this._selectionPosition(t))},Xa.prototype.end=function(t){var e;if(this._zoomPane)return e=this._elementOffset(),(t=this._selectionPosition(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},this._updateAxisRanges(e,t),this.removeElement(),delete this._zoomPane,Ua(this.axisRanges)},Xa.prototype.zoom=function(){var t=this.axisRanges;if(t&&t.length){for(var e=this.chart._plotArea,o=0;o<t.length;o++){var i=t[o];e.updateAxisOptions(i.axis,i.range)}e.redraw(e.panes)}},Xa.prototype.destroy=function(){this.removeElement(),delete this._marquee,delete this.chart},Xa.prototype._updateAxisRanges=function(t,e){for(var o=(this.options.lock||"").toLowerCase(),i=[],r=this._zoomPane.axes,n=0;n<r.length;n++){var s=r[n],a=s.options.vertical;o===y&&!a||o===v&&a||!T(s.axisIndex)||(a=s.pointsRange(t,e))&&i.push({axis:s,range:a})}this.axisRanges=i},Xa.prototype._selectionPosition=function(t){var e=this._zoomPaneClipBox,o={x:t.x.startLocation,y:t.y.startLocation},i=t.x.location,t=t.y.location,r=(this.options.lock||"").toLowerCase(),n=Math.min(o.x,i),s=Math.min(o.y,t),a=Math.abs(o.x-i),h=Math.abs(o.y-t);return r===y&&(n=e.x1,a=e.width()),r===v&&(s=e.y1,h=e.height()),i>e.x2&&(a=e.x2-o.x),i<e.x1&&(a=o.x-e.x1),t>e.y2&&(h=e.y2-o.y),t<e.y1&&(h=o.y-e.y1),{left:Math.max(n,e.x1),top:Math.max(s,e.y1),width:a,height:h}},Xa);function Xa(t,e){Ga.call(this),this.chart=t,this.options=x({},this.options,e),this.createElement()}f.prototype.options={key:"shift",lock:"none"};var qa,Ya,Za,Qa,Ka=f,$a=((Qa=b.Class)&&(nh.__proto__=Qa),((nh.prototype=Object.create(Qa&&Qa.prototype)).constructor=nh).prototype.updateRanges=function(t,e){for(var o=(this.options.lock||"").toLowerCase(),i=[],r=this.chart._plotArea.axes,n=0;n<r.length;n++){var s=r[n],a=s.options.vertical;o===y&&!a||o===v&&a||!s.zoomRange||(a=_(this.options.rate,.01,.9),(a=s.zoomRange(-t*a,e))&&i.push({axis:s,range:a}))}return Ua(this.axisRanges=i)},nh.prototype.zoom=function(){var t=this.axisRanges,e=this.chart._plotArea;if(t&&t.length&&e.updateAxisOptions){for(var o=0;o<t.length;o++){var i=t[o];e.updateAxisOptions(i.axis,i.range)}e.redraw(e.panes)}},nh.prototype.destroy=function(){delete this.chart},nh),Ja=((Za=r)&&(rh.__proto__=Za),((rh.prototype=Object.create(Za&&Za.prototype)).constructor=rh).prototype.render=function(){var t=this.children,e=this.options,o=e.vertical;this.visual=new b.drawing.Layout(null,{spacing:o?0:e.spacing,lineSpacing:o?e.spacing:0,orientation:o?"vertical":"horizontal",reverse:e.rtl,alignItems:o?"start":"center"});for(var i=0;i<t.length;i++){var r=t[i];r.reflow(new R),r.renderVisual()}},rh.prototype.reflow=function(t){this.visual.rect(t.toRect()),this.visual.reflow();t=this.visual.clippedBBox();this.box=t?Ie(t):new R},rh.prototype.renderVisual=function(){this.addVisual()},rh.prototype.createVisual=function(){},rh),th=((Ya=be)&&(ih.__proto__=Ya),((ih.prototype=Object.create(Ya&&Ya.prototype)).constructor=ih).prototype.createContainer=function(){this.container=new Be({vertical:!1,wrap:!1,align:C,spacing:this.options.spacing}),this.append(this.container)},ih.prototype.createMarker=function(){this.container.append(new Ce(this.markerOptions()))},ih.prototype.markerOptions=function(){var t=this.options,e=t.markerColor;return x({},t.markers,{background:e,border:{color:e}})},ih.prototype.createLabel=function(){var t=this.options,e=x({},t.labels);this.container.append(new De(t.text,e))},ih.prototype.renderComplete=function(){Ya.prototype.renderComplete.call(this);var t=this.options.cursor||{},t=this._itemOverlay=b.drawing.Path.fromRect(this.container.box.toRect(),{fill:{color:a,opacity:0},stroke:null,cursor:t.style||t});this.appendVisual(t)},ih.prototype.click=function(t,e){var o=this.eventArgs(e);!t.trigger("legendItemClick",o)&&e&&"contextmenu"===e.type&&e.preventDefault()},ih.prototype.over=function(t,e){e=this.eventArgs(e);return t.trigger("legendItemHover",e)||t._legendItemHover(e.seriesIndex,e.pointIndex),!0},ih.prototype.out=function(t,e){t._unsetActivePoint(),t.trigger("legendItemLeave",this.eventArgs(e))},ih.prototype.eventArgs=function(t){var e=this.options;return{element:Lt(t),text:e.text,series:e.series,seriesIndex:e.series.index,pointIndex:e.pointIndex}},ih.prototype.renderVisual=function(){var e=this,t=this.options,o=t.visual;o?(this.visual=o({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()):Ya.prototype.renderVisual.call(this)},ih),eh="custom",c=((qa=r)&&(oh.__proto__=qa),((oh.prototype=Object.create(qa&&qa.prototype)).constructor=oh).prototype.createContainers=function(){var t=this.options,e=t.position,o=t.align,i=e,r=C;e===eh?i=S:u(e,[A,w])?(i="start"===o?S:"end"===o?k:C,r=e):o&&("start"===o?r=A:"end"===o&&(r=w)),this.container=new be({margin:t.margin,padding:t.padding,background:t.background,border:t.border,vAlign:r,align:i,zIndex:t.zIndex,shrinkToFit:!0}),this.hasTitle()?this.itemsContainer=new be({vAlign:r,align:i,zIndex:t.zIndex,shrinkToFit:!0}):this.itemsContainer=this.container,this.append(this.container)},oh.prototype.createItems=function(){for(var t=this.getService(),e=this.options,o=this.isVertical(),i=new Ja({vertical:o,spacing:e.spacing,rtl:t.rtl},t),r=e.items,n=(r=e.reverse?r.slice(0).reverse():r).length,s=0;s<n;s++){var a=r[s];i.append(new th(x({},{markers:e.markers,labels:e.labels,rtl:t.rtl},e.item,a)))}i.render(),this.itemsContainer.append(i)},oh.prototype.isVertical=function(){var t=this.options,e=t.orientation,t=t.position;return t===eh&&"horizontal"!==e||(T(e)?"horizontal"!==e:u(t,[S,k]))},oh.prototype.hasItems=function(){return 0<this.container.children[0].children.length},oh.prototype.reflow=function(t){var e=this.options,t=t.clone();this.hasItems()?(e.position===eh?(this.containerCustomReflow(t),this.box=t):this.containerReflow(t),this.hasTitle()&&this.title.reflow(new R(this.container.box.x1,this.title.box.y1,this.container.box.x2,this.title.box.y2))):this.box=t},oh.prototype.containerReflow=function(t){var e=this.options,o=this.container,i=e.position,r=e.width,n=e.height,s=i===A||i===w?y:v,a=this.isVertical(),h=t.clone(),p=t.clone(),i=(i!==S&&i!==k||(p.y1=h.y1=0),a&&n?(p.y2=p.y1+n,p.align(h,v,o.options.vAlign)):!a&&r&&(p.x2=p.x1+r,p.align(h,y,o.options.align)),o.reflow(p),(p=o.box).clone());(e.offsetX||e.offsetY)&&(p.translate(e.offsetX,e.offsetY),o.reflow(p)),i[s+1]=t[s+1],i[s+2]=t[s+2],this.box=i},oh.prototype.containerCustomReflow=function(t){var e=this.options,o=this.container,i=e.offsetX,r=e.offsetY,n=e.width,e=e.height,s=this.isVertical(),t=t.clone();s&&e?t.y2=t.y1+e:!s&&n&&(t.x2=t.x1+n),o.reflow(t),t=o.box,o.reflow(new R(i,r,i+t.width(),r+t.height()))},oh.prototype.renderVisual=function(){this.hasItems()&&qa.prototype.renderVisual.call(this)},oh.prototype.createLegendTitle=function(t){var e=x({},{color:D,position:A,align:C},t),o=e.text;t&&!1!==t.visible&&(T(e)&&e.visible&&((t=dt(e))?o=t({text:o}):e.format&&(o=this.chartService.format.auto(e.format,o))),this.title=new De(o,e),this.createTitleLayout(),this.appendTitleLayoutContent())},oh.prototype.createTitleLayout=function(){this.layout=new Be({vertical:!0,wrap:!1}),this.container.append(this.layout)},oh.prototype.hasTitle=function(){return Boolean(this.options.title&&!1!==this.options.title.visible)},oh.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))},oh);function oh(t,e){void 0===e&&(e={}),qa.call(this,t),this.chartService=e,u(this.options.position,[A,k,w,S,eh])||(this.options.position=k),this.createContainers(),this.createLegendTitle(t.title),this.createItems()}function ih(t){Ya.call(this,t),this.createContainer(),t.rtl?(this.createLabel(),this.createMarker()):(this.createMarker(),this.createLabel())}function rh(t,e){Za.call(this,t),this.chartService=e}function nh(t,e){Qa.call(this),this.chart=t,this.options=x({rate:.3},this.options,e)}i(c,{position:k,items:[],offsetX:0,offsetY:0,margin:P(5),padding:P(5),border:{color:D,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:C}});var sh,ah=c,h=((sh=b.Class)&&(hh.__proto__=sh),((hh.prototype=Object.create(sh&&sh.prototype)).constructor=hh).prototype.register=function(t,e){this._registry.push({type:t,seriesTypes:e})},hh.prototype.create=function(t,e,o){for(var i,r=this._registry,n=r[0],s=0;s<r.length;s++){var a=r[s];if(0<(i=Ms(t,a.seriesTypes)).length){n=a;break}}return new n.type(i,e,o)},hh);function hh(){sh.call(this),this._registry=[]}h.current=new h;var ph=h;function lh(t){var e=document.createElement("div");return t&&(e.className=t),e}function ch(t){for(var e=t;e&&!mt(e,"k-handle");)e=e.parentNode;return e}(uh=b.Class)&&(dh.__proto__=uh),((dh.prototype=Object.create(uh&&uh.prototype)).constructor=dh).prototype.onPane=function(t){return this.categoryAxis.pane===t},dh.prototype.createElements=function(){var t=this.options,e=this.wrapper=lh("k-selector"),o=(pt(e,{top:t.offset.top,left:t.offset.left,width:t.width,height:t.height,direction:"ltr"}),this.selection=lh("k-selection")),i=(this.leftMask=lh("k-mask"),this.rightMask=lh("k-mask"),e.appendChild(this.leftMask),e.appendChild(this.rightMask),e.appendChild(o),o.appendChild(lh("k-selection-bg")),this.leftHandle=lh("k-handle k-left-handle")),r=this.rightHandle=lh("k-handle k-right-handle"),o=(i.appendChild(lh()),r.appendChild(lh()),o.appendChild(i),o.appendChild(r),this.chartElement.appendChild(e),pt(o,["borderLeftWidth","borderRightWidth","height"])),n=pt(i,"height").height,s=pt(r,"height").height;t.selection={border:{left:o.borderLeftWidth,right:o.borderRightWidth}},pt(i,{top:(o.height-n)/2}),pt(r,{top:(o.height-s)/2}),e.style.cssText=e.style.cssText},dh.prototype.bindEvents=function(){var t;!1!==this.options.mousewheel&&(this._mousewheelHandler=this._mousewheel.bind(this),Mt(this.wrapper,((t={})[dr]=this._mousewheelHandler,t))),this._domEvents=no.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)})},dh.prototype.initOptions=function(){var t=this.options,e=this.categoryAxis.pane.chartsBox(),o=this.chart.chartService.intl,o=(this._dateAxis&&x(t,{min:Uo(o,t.min),max:Uo(o,t.max),from:Uo(o,t.from),to:Uo(o,t.to)}),pt(this.chartElement,["paddingLeft","paddingTop"])),i=o.paddingLeft,o=o.paddingTop;this.options=x({},{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)},dh.prototype.destroy=function(){var t;this._domEvents&&(this._domEvents.destroy(),delete this._domEvents),clearTimeout(this._mwTimeout),this._state=null,this.wrapper&&(this._mousewheelHandler&&(Dt(this.wrapper,((t={})[dr]=this._mousewheelHandler,t)),this._mousewheelHandler=null),this.chartElement.removeChild(this.wrapper),this.wrapper=null)},dh.prototype._rangeEventArgs=function(t){return{axis:this.categoryAxis.options,from:this._value(t.from),to:this._value(t.to)}},dh.prototype._start=function(t){var e=this.options,o=Lt(t);!this._state&&o&&(this.chart._unsetActivePoint(),this._state={moveTarget:ch(o)||o,startLocation:t.x?t.x.location:0,range:{from:this._index(e.from),to:this._index(e.to)}},o=this._rangeEventArgs({from:this._index(e.from),to:this._index(e.to)}),this.trigger("selectStart",o)&&(this._state=null))},dh.prototype._press=function(t){(t=this._state?this._state.moveTarget:ch(Lt(t)))&&Q(t,"k-handle-active")},dh.prototype._move=function(t){var e,o,i,r,n,s,a,h,p,l,c,u;this._state&&(l=this._state,a=this.options,c=this.categoryAxis,e=l.range,o=l.moveTarget,i=c.options.reverse,r=this._index(a.from),n=this._index(a.to),s=this._index(a.min),a=this._index(a.max),l=l.startLocation-t.x.location,t=e.from,h=e.to,p=e.to-e.from,c=pt(this.wrapper,"width").width/(c.categoriesCount()-1),l=Math.round(l/c)*(i?-1:1),o&&(c=mt(o,"k-left-handle"),u=mt(o,"k-right-handle"),mt(o,"k-selection k-selection-bg")?(e.from=Math.min(Math.max(s,r-l),a-p),e.to=Math.min(e.from+p,a)):c&&!i||u&&i?(e.from=Math.min(Math.max(s,r-l),a-1),e.to=Math.max(e.from+1,e.to)):(c&&i||u&&!i)&&(e.to=Math.min(Math.max(s+1,n-l),a),e.from=Math.min(e.to-1,e.from)),e.from===t&&e.to===h||(this.move(e.from,e.to),this.trigger("select",this._rangeEventArgs(e)))))},dh.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)},dh.prototype._tap=function(t){var e=this.options,o=this.categoryAxis,i=this.chart._eventCoordinates(t),i=o.pointCategoryIndex(new B(i.x,o.box.y1)),r=this._index(e.from),n=this._index(e.to),s=this._index(e.min),e=this._index(e.max),n=n-r,a={},h=3===t.event.which,i=Math.round(r+n/2-i);this._state||h||(this.chart._unsetActivePoint(),o.options.justified||i--,a.from=Math.min(Math.max(s,r-i),e-n),a.to=Math.min(a.from+n,e),this._start(t),this._state&&(this._state.range=a,this.trigger("select",this._rangeEventArgs(a)),this._end()))},dh.prototype._mousewheel=function(t){var e,o=this,i=At(t);this._start({target:this.selection}),this._state&&(e=this._state.range,t.preventDefault(),t.stopPropagation(),1<Math.abs(i)&&(i*=3),this.options.mousewheel.reverse&&(i*=-1),this.expand(i)&&this.trigger("select",{axis:this.categoryAxis.options,delta:i,originalEvent:t,from:this._value(e.from),to:this._value(e.to)}),this._mwTimeout&&clearTimeout(this._mwTimeout),this._mwTimeout=setTimeout(function(){o._end()},150))},dh.prototype._gesturestart=function(t){var e=this.options,e=(this._state={range:{from:this._index(e.from),to:this._index(e.to)}},this._rangeEventArgs(this._state.range));this.trigger("selectStart",e)?this._state=null:t.preventDefault()},dh.prototype._gestureend=function(){this._state&&(this.trigger("selectEnd",this._rangeEventArgs(this._state.range)),delete this._state)},dh.prototype._gesturechange=function(t){var e=this.chart,o=this._state,i=this.options,r=this.categoryAxis,o=o.range,n=e._toModelCoordinates(t.touches[0].x.location).x,e=e._toModelCoordinates(t.touches[1].x.location).x,s=Math.min(n,e),n=Math.max(n,e);t.preventDefault(),o.from=r.pointCategoryIndex(new B(s))||i.min,o.to=r.pointCategoryIndex(new B(n))||i.max,this.move(o.from,o.to),this.trigger("select",this._rangeEventArgs(o))},dh.prototype._index=function(t){var e=t;return e=t instanceof Date?this.categoryAxis.categoryIndex(t):e},dh.prototype._value=function(t){var e=t;return e=this._dateAxis&&(e=this.categoryAxis.categoryAt(t))>this.options.max?this.options.max:e},dh.prototype._slot=function(t){var e=this.categoryAxis,t=this._index(t);return e.getSlot(t,t,!0)},dh.prototype.move=function(t,e){var o=this.options,i=this.categoryAxis.options.reverse,r=o.offset,n=o.padding,s=o.selection.border,a=i?t:e,h="x"+(i?2:1),i=this._slot(i?e:t),e=M(i[h]-r.left+n.left),t=(pt(this.leftMask,{width:e}),pt(this.selection,{left:e}),i=this._slot(a),M(o.width-(i[h]-r.left+n.left))),a=(pt(this.rightMask,{width:t}),o.width-t);a!==o.width&&(a+=s.right),pt(this.rightMask,{left:a}),pt(this.selection,{width:Math.max(o.width-(e+t)-s.right,0)})},dh.prototype.set=function(t,e){var o=this.options,i=this._index(o.min),r=this._index(o.max),t=_(this._index(t),i,r),i=_(this._index(e),t+1,r);o.visible&&this.move(t,i),o.from=this._value(t),o.to=this._value(i)},dh.prototype.expand=function(t){var e=this.options,o=this._index(e.min),i=this._index(e.max),r=e.mousewheel.zoom,n=this._index(e.from),e=this._index(e.to),s={from:n,to:e},a=x({},s);if(this._state&&(s=this._state.range),r!==k&&(s.from=_(_(n-t,0,e-1),o,i)),r!==S&&(s.to=_(_(e+t,s.from+1,i),o,i)),s.from!==a.from||s.to!==a.to)return this.set(s.from,s.to),!0},dh.prototype.zoom=function(t,e){var o=this.options,i=this._index(o.min),r=this._index(o.max),n=this._index(o.from),o=this._index(o.to),s={from:n,to:o},a=x({},s),h=this.categoryAxis.options.reverse,h=y+(h?"2":"1"),p=this.categoryAxis.lineBox(),h=Math.abs(p[h]-e.x),e=p.width(),p=M(h/e,2),h=M(p*t),e=M((1-p)*t);if((s=this._state?this._state.range:s).from=_(_(n-h,0,o-1),i,r),s.to=_(_(o+e,s.from+1,r),i,r),s.from!==a.from||s.to!==a.to)return this.set(s.from,s.to),!0},dh.prototype.trigger=function(t,e){return(this.observer||this.chart).trigger(t,e)};var uh,f=dh;function dh(t,e,o,i){uh.call(this);var r=t.element;this.options=x({},this.options,o),this.chart=t,this.observer=i,this.chartElement=r,this.categoryAxis=e,this._dateAxis=this.categoryAxis instanceof Jo,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())}i(f,{visible:!0,mousewheel:{zoom:"both"},min:W,max:G});var fh,gh,yh=f,vh=((gh=d)&&(xh.__proto__=gh),((xh.prototype=Object.create(gh&&gh.prototype)).constructor=xh).prototype.show=function(t){var e,o;!t||!t.tooltipAnchor||this._current&&this._current===t||(e=x({},this.options,t.options.tooltip),(o=t.tooltipAnchor())?(this._current=t,gh.prototype.show.call(this,{point:t,anchor:o},e,t)):this.hide())},xh.prototype.hide=function(){delete this._current,gh.prototype.hide.call(this)},xh),c=((fh=d)&&(mh.__proto__=fh),((mh.prototype=Object.create(fh&&fh.prototype)).constructor=mh).prototype.showAt=function(t,e){var o,i=vt(t,function(t){t=t.series.tooltip;return!t||!1!==t.visible});0<i.length&&(i=i[0],o=this.plotArea.categoryAxis.getSlot(i.categoryIx),e=e?this._slotAnchor(e,o):this._defaultAnchor(i,o),this.show({anchor:e,shared:!0,points:t,category:i.category,categoryText:this.formatService.auto(this.options.categoryFormat,i.category),series:this.plotArea.series},this.options))},mh.prototype._slotAnchor=function(t,e){return this.plotArea.categoryAxis.options.vertical||(t.x=e.center().x),{point:t,align:{horizontal:"left",vertical:"center"}}},mh.prototype._defaultAnchor=function(t,e){var t=t.owner.pane.chartsBox(),o=this.plotArea.categoryAxis.options.vertical,t=t.center(),e=e.center();return{point:o?new B(t.x,e.y):new B(e.x,t.y),align:{horizontal:"center",vertical:"center"}}},mh);function mh(t,e){fh.call(this,t.chartService,e),this.plotArea=t,this.formatService=t.chartService.format}function xh(){gh.apply(this,arguments)}i(c,{categoryFormat:"{0:d}"});var _h,bh=c,h=((_h=b.drawing.Animation)&&(wh.__proto__=_h),((wh.prototype=Object.create(_h&&_h.prototype)).constructor=wh).prototype.setup=function(){var t,e=this.element,o=this.options;e.bbox()?(this.origin=o.origin,o=o.vertical?v:y,(t=this.fromScale=new b.geometry.Point(1,1))[o]=tr,e.transform(b.geometry.transform().scale(t.x,t.y))):this.abort()},wh.prototype.step=function(t){var e=bt(this.fromScale.x,1,t),t=bt(this.fromScale.y,1,t);this.element.transform(b.geometry.transform().scale(e,t,this.origin))},wh.prototype.abort=function(){_h.prototype.abort.call(this),this.element.transform(null)},wh);function wh(){_h.apply(this,arguments)}i(h,{duration:600}),b.drawing.AnimationFactory.current.register(ir,h);(Ch=b.drawing.Animation)&&(Sh.__proto__=Ch),((Sh.prototype=Object.create(Ch&&Ch.prototype)).constructor=Sh).prototype.setup=function(){var t=this.center=this.element.bbox().center();this.element.transform(b.geometry.transform().scale(tr,tr,t))},Sh.prototype.step=function(t){this.element.transform(b.geometry.transform().scale(t,t,this.center))};var Ch,f=Sh;function Sh(){Ch.apply(this,arguments)}i(f,{easing:"easeOutElastic"}),b.drawing.AnimationFactory.current.register("bubble",f);(kh=b.drawing.Animation)&&(Ah.__proto__=kh),((Ah.prototype=Object.create(kh&&kh.prototype)).constructor=Ah).prototype.setup=function(){this.fadeTo=this.element.opacity(),this.element.opacity(0)},Ah.prototype.step=function(t){this.element.opacity(t*this.fadeTo)};var kh,d=Ah;function Ah(){kh.apply(this,arguments)}i(d,{duration:200,easing:"linear"}),b.drawing.AnimationFactory.current.register("fadeIn",d);(Ph=b.drawing.Animation)&&(Th.__proto__=Ph),((Th.prototype=Object.create(Ph&&Ph.prototype)).constructor=Th).prototype.setup=function(){this.element.transform(b.geometry.transform().scale(tr,tr,this.options.center))},Th.prototype.step=function(t){this.element.transform(b.geometry.transform().scale(t,t,this.options.center))};var Ph,c=Th;function Th(){Ph.apply(this,arguments)}i(c,{easing:"easeOutElastic",duration:600}),b.drawing.AnimationFactory.current.register(sr,c);var Mh,Oh=c,h=((Mh=Zn)&&(Bh.__proto__=Mh),((Bh.prototype=Object.create(Mh&&Mh.prototype)).constructor=Bh).prototype.render=function(){Mh.prototype.render.call(this),this.renderSegments()},Bh.prototype.createSegment=function(t,e,o){return new("smooth"===e.style?jr:Or)(t,e,o)},Bh.prototype.animationPoints=function(){return Mh.prototype.animationPoints.call(this).concat(this._segments)},Bh.prototype.createMissingValue=function(t,e){if(e===er)return Wn((e={x:t.x,y:t.y}).x)||(e.x=0),Wn(e.y)||(e.y=0),e},Bh);function Bh(){Mh.apply(this,arguments)}x(h.prototype,Er);var Rh,Eh=h,f=((Rh=Us)&&(Lh.__proto__=Rh),((Lh.prototype=Object.create(Rh&&Rh.prototype)).constructor=Lh).prototype.initFields=function(){this.namedXAxes={},this.namedYAxes={},this.xAxisRangeTracker=new nn,this.yAxisRangeTracker=new nn},Lh.prototype.render=function(t){void 0===t&&(t=this.panes);for(var e=this.groupSeriesByPane(),o=0;o<t.length;o++){var i=t[o],r=e[i.options.name||"default"]||[],r=(this.addToLegend(r),this.filterVisibleSeries(r));r&&(this.createScatterChart(Ms(r,"scatter"),i),this.createScatterLineChart(Ms(r,"scatterLine"),i),this.createBubbleChart(Ms(r,"bubble"),i))}this.createAxes(t)},Lh.prototype.appendChart=function(t,e){this.xAxisRangeTracker.update(t.xAxisRanges),this.yAxisRangeTracker.update(t.yAxisRanges),Rh.prototype.appendChart.call(this,t,e)},Lh.prototype.removeAxis=function(t){var e=t.options.name;Rh.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},Lh.prototype.seriesPaneName=function(t){var e=this.options,o=t.xAxis,i=vt([].concat(e.xAxis),function(t){return t.name===o})[0],r=t.yAxis,t=vt([].concat(e.yAxis),function(t){return t.name===r})[0],e=(e.panes||[{}])[0].name||"default";return(i||{}).pane||(t||{}).pane||e},Lh.prototype.createScatterChart=function(t,e){0<t.length&&this.appendChart(new Zn(this,{series:t,clip:e.options.clip}),e)},Lh.prototype.createScatterLineChart=function(t,e){0<t.length&&this.appendChart(new Eh(this,{series:t,clip:e.options.clip}),e)},Lh.prototype.createBubbleChart=function(t,e){0<t.length&&this.appendChart(new es(this,{series:t,clip:e.options.clip}),e)},Lh.prototype.createXYAxis=function(t,e,o){for(var i,r=t.name,n=e?this.namedYAxes:this.namedXAxes,s=e?this.yAxisRangeTracker:this.xAxisRangeTracker,a=x({reverse:!e&&this.chartService.rtl},t,{vertical:e}),t=Ts(a.type,"log"),h=s.query(),p=t?{min:.1,max:1}:{min:0,max:1},s=s.query(r)||h||p,l=[a.min,a.max],c=this.series,u=0;u<c.length;u++){var d=c[u],f=d[e?"yAxis":"xAxis"];if(f===a.name||0===o&&!f){f=Qi.current.bindPoint(d,0).valueFields;l.push(f[e?"y":"x"]);break}}0===o&&h&&(s.min=Math.min(s.min,h.min),s.max=Math.max(s.max,h.max));for(var g=0;g<l.length;g++)if(l[g]instanceof Date){i=!0;break}p=new(Ts(a.type,U)||!a.type&&i?ci:t?yi:hi)(s.min,s.max,a,this.chartService);if(p.axisIndex=o,r){if(n[r])throw new Error((e?"Y":"X")+" axis with name "+r+" is already defined");n[r]=p}return this.appendAxis(p),p},Lh.prototype.createAxes=function(t){for(var e=this.options,o=[].concat(e.xAxis),i=[],r=[].concat(e.yAxis),n=[],s=0;s<o.length;s++)u(this.findPane(o[s].pane),t)&&i.push(this.createXYAxis(o[s],!1,s));for(var a=0;a<r.length;a++)u(this.findPane(r[a].pane),t)&&n.push(this.createXYAxis(r[a],!0,a));this.axisX=this.axisX||i[0],this.axisY=this.axisY||n[0]},Lh.prototype._dispatchEvent=function(t,e,o){for(var i=t._eventCoordinates(e),r=new B(i.x,i.y),n=this.axes,s=n.length,a=[],h=[],p=0;p<s;p++){var l=n[p],c=l.options.vertical?h:a,l=l.getValue(r);null!==l&&c.push(l)}0<a.length&&0<h.length&&t.trigger(o,{element:Lt(e),originalEvent:e,x:Rs(a),y:Rs(h)})},Lh.prototype.updateAxisOptions=function(t,e){var o=t.options.vertical,i=this.groupAxes(this.panes),i=(o?i.y:i.x).indexOf(t);Ih(this.options,i,o,e),Ih(this.originalOptions,i,o,e)},Lh);function Lh(){Rh.apply(this,arguments)}function Ih(t,e,o,i){x([].concat(o?t.yAxis:t.xAxis)[e],i)}i(f,{xAxis:{},yAxis:{}}),x(f.prototype,Fs);var zh,Vh=f,d=((zh=r)&&(Hh.__proto__=zh),((Hh.prototype=Object.create(zh&&zh.prototype)).constructor=Hh).prototype.render=function(){var t,e,o=this.options.labels,i=this.owner.chartService,r=this.value;this._rendered||!1===this.visible||(this._rendered=!0,e=dt(o),t=this.pointData(),e?r=e(t):o.format&&(r=i.format.auto(o.format,r)),o.visible&&(r||0===r)&&(o.position===C||"insideEnd"===o.position?(o.color||(o.color=qt(this.options.color)),o.background||(o.background=this.options.color)):(e=i.theme.seriesDefaults.labels,o.color=o.color||e.color,o.background=o.background||e.background),this.label=new De(r,x({},o,{align:C,vAlign:"",animation:{type:"fadeIn",delay:this.animationDelay}}),t),this.append(this.label)))},Hh.prototype.reflow=function(t){this.render(),this.box=t,this.reflowLabel()},Hh.prototype.reflowLabel=function(){var t,e,o,i,r=this.options.labels,n=this.label,s=this.sector.clone(),a=r.distance,h=s.middle();n&&(e=n.box.height(),o=n.box.width(),r.position===C?(s.radius=Math.abs((s.radius-e)/2)+e,t=s.point(h),n.reflow(new R(t.x,t.y-e/2,t.x,t.y))):"insideEnd"===r.position?(s.radius=s.radius-e/2,t=s.point(h),n.reflow(new R(t.x,t.y-e/2,t.x,t.y))):((t=s.clone().expand(a).point(h)).x>=s.center.x?(i=t.x+o,n.orientation=k):(i=t.x-o,n.orientation=S),n.reflow(new R(i,t.y-e,t.x,t.y))))},Hh.prototype.createVisual=function(){var t,e=this,o=this.sector,i=this.options;zh.prototype.createVisual.call(this),this.value&&(i.visual?(t=(o.startAngle+180)%360,(t=i.visual({category:this.category,dataItem:this.dataItem,value:this.value,series:this.series,percentage:this.percentage,center:new b.geometry.Point(o.center.x,o.center.y),radius:o.radius,innerRadius:o.innerRadius,startAngle:t,endAngle:t+o.angle,options:i,sender:this.getSender(),createVisual:function(){var t=new b.drawing.Group;return e.createSegmentVisual(t),t}}))&&this.visual.append(t)):this.createSegmentVisual(this.visual))},Hh.prototype.createSegmentVisual=function(t){var e=this.sector,o=this.options,i=o.border||{},i=0<i.width?{stroke:{color:i.color,width:i.width,opacity:i.opacity,dashType:i.dashType}}:{},r=o.color,n={color:r,opacity:o.opacity},i=this.createSegment(e,x({fill:n,stroke:{opacity:o.opacity},zIndex:o.zIndex},i));t.append(i),cn(o)&&t.append(this.createGradientOverlay(i,{baseColor:r,fallbackFill:n},x({center:[e.center.x,e.center.y],innerRadius:e.innerRadius,radius:e.radius,userSpace:!0},o.overlay)))},Hh.prototype.createSegment=function(t,e){return e.singleSegment?new b.drawing.Circle(new b.geometry.Circle(new b.geometry.Point(t.center.x,t.center.y),t.radius),e):ye.current.createRing(t,e)},Hh.prototype.createAnimation=function(){var t=this.options,e=this.sector.center;x(t,{animation:{center:[e.x,e.y],delay:this.animationDelay}}),zh.prototype.createAnimation.call(this)},Hh.prototype.createHighlight=function(t){var e=this.options.highlight||{},o=e.border||{};return this.createSegment(this.sector,x({},t,{fill:{color:e.color,opacity:e.opacity},stroke:{opacity:o.opacity,width:o.width,color:o.color}}))},Hh.prototype.highlightVisual=function(){return this.visual.children[0]},Hh.prototype.highlightVisualArgs=function(){var t=this.sector;return{options:this.options,radius:t.radius,innerRadius:t.innerRadius,center:new b.geometry.Point(t.center.x,t.center.y),startAngle:t.startAngle,endAngle:t.angle+t.startAngle,visual:this.visual}},Hh.prototype.tooltipAnchor=function(){var t=this.sector.clone().expand(5),e=t.middle();return{point:t.point(e),align:(t=jt(e+180),e=M(Math.sin(t),F),t=M(Math.cos(t),F),{horizontal:Math.abs(e)>Dh?C:t<0?k:S,vertical:Math.abs(e)<jh?C:e<0?w:A})}},Hh.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Hh.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,series:this.series,percentage:this.percentage}},Hh),jh=M(jt(30),F),Dh=M(jt(60),F);function Hh(t,e,o){zh.call(this,o),this.value=t,this.sector=e}i(d,{color:a,overlay:{gradient:"roundedBevel"},border:{width:.5},labels:{visible:!1,distance:35,font:"12px sans-serif",margin:P(.5),align:H,zIndex:1,position:"outsideEnd"},animation:{type:sr},highlight:{visible:!0,border:{width:1}},visible:!0}),x(d.prototype,kr);var Uh,Fh=d,Nh={createLegendItem:function(t,e,o){var i,r,n,s=this.options.legend||{},a=s.labels||{},s=s.inactiveItems||{},h=s.labels||{};o&&!1!==o.visibleInLegend&&(a=!(r=!1!==o.visible)&&dt(h)||dt(a),n=o.category,a&&(n=a({text:n,series:o.series,dataItem:o.dataItem,percentage:o.percentage,value:t})),a=r?(i={},e.color):(i={color:h.color,font:h.font},(s.markers||{}).color),Wn(n)&&""!==n&&this.legendItems.push({active:r,pointIndex:o.index,text:n,series:o.series,markerColor:a,labels:i}))}},c=((Uh=r)&&(Gh.__proto__=Uh),((Gh.prototype=Object.create(Uh&&Uh.prototype)).constructor=Gh).prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},Gh.prototype.traverseDataPoints=function(t){for(var e=this.options,o=this.plotArea.options.seriesColors,i=(o=void 0===o?[]:o).length,r=e.series,n=r.length,s=0;s<n;s++){var a=r[s],h=a.data,p=Ps(a),l=p.total,c=p.points,p=p.count,u=360/l,d=void 0,f=(isFinite(u)||(d=360/p),void 0),f=(T(a.startAngle)?a:e).startAngle;s!==n-1&&"outsideEnd"===a.labels.position&&(a.labels.position=C);for(var g=0;g<c.length;g++){var y,v,m,x,_,b=c[g];b&&(y=b.fields,v=b.value,m=b.visible,x=0!==v?d||v*u:0,_=1!==h.length&&Boolean(y.explode),it(a.color)||(a.color=y.color||o[g%i]),t(b.valueFields.value,new le(null,0,0,f,x),{owner:this,category:T(y.category)?y.category:"",index:g,series:a,seriesIx:s,dataItem:h[g],percentage:0!==l?v/l:0,explode:_,visibleInLegend:y.visibleInLegend,visible:m,zIndex:n-s,animationDelay:this.animationDelay(g,s,n)}),!1!==m&&(f+=x))}}},Gh.prototype.evalSegmentOptions=function(t,e,o){var i=o.series;_r(t,{value:e,series:i,dataItem:o.dataItem,category:o.category,percentage:o.percentage},{defaults:i._defaults,excluded:["data","content","template","visual","toggle"]})},Gh.prototype.addValue=function(t,e,o){var i=x({},o.series,{index:o.index});this.evalSegmentOptions(i,t,o),this.createLegendItem(t,i,o),!1!==o.visible&&(t=new Fh(t,e,i),Object.assign(t,o),this.append(t),this.points.push(t))},Gh.prototype.reflow=function(t){var e=this.options,o=this.points,i=this.seriesConfigs,r=(void 0===i&&(i=[]),o.length),n=t.clone(),s=Math.min(n.width(),n.height()),a=s/2,h=s-.85*s,p=new R(n.x1,n.y1,n.x1+s,n.y1+s),s=p.center(),n=n.center(),l=e.series.length,c=[],u=[],e=O(e.padding,h);this.targetBox=t,e=a-5<e?a-5:e,p.translate(n.x-s.x,n.y-s.y);for(var d=a-e,f=new B(d+p.x1+e,d+p.y1+e),g=0;g<r;g++){var y=o[g],v=y.sector,m=y.seriesIx,x=(v.radius=d,v.center=f,i.length&&(x=i[m],v.innerRadius=x.innerRadius,v.radius=x.radius),m===l-1&&y.explode&&(v.center=v.clone().setRadius(.15*v.radius).point(v.middle())),y.reflow(p),y.label);x&&"outsideEnd"===x.options.position&&m===l-1&&(x.orientation===k?u:c).push(x)}0<c.length&&(c.sort(this.labelComparator(!0)),this.leftLabelsReflow(c)),0<u.length&&(u.sort(this.labelComparator(!1)),this.rightLabelsReflow(u)),this.box=p},Gh.prototype.leftLabelsReflow=function(t){var e=this.distanceBetweenLabels(t);this.distributeLabels(e,t)},Gh.prototype.rightLabelsReflow=function(t){var e=this.distanceBetweenLabels(t);this.distributeLabels(e,t)},Gh.prototype.distanceBetweenLabels=function(t){var e=zt(this.points),o=e.sector,i=t.length-1,e=o.radius+e.options.labels.distance,r=[],n=t[0].box,s=M(n.y1-(o.center.y-e-n.height()-n.height()/2));r.push(s);for(var a=0;a<i;a++){var h=t[a+1].box,n=t[a].box,s=M(h.y1-n.y2);r.push(s)}return s=M(o.center.y+e-t[i].box.y2-t[i].box.height()/2),r.push(s),r},Gh.prototype.distributeLabels=function(t,e){for(var o,i,r,n=t.length,s=0;s<n;s++)for(r=-t[s],o=i=s;0<r&&(0<=o||i<n);)r=this._takeDistance(t,s,--o,r),r=this._takeDistance(t,s,++i,r);this.reflowLabels(t,e)},Gh.prototype._takeDistance=function(t,e,o,i){var r;return 0<t[o]&&(i-=r=Math.min(t[o],i),t[o]-=r,t[e]+=r),i},Gh.prototype.reflowLabels=function(t,e){var o,i=zt(this.points),r=i.sector,n=i.options.labels,s=e.length,a=n.distance,h=r.center.y-(r.radius+a)-e[0].box.height();t[0]+=2;for(var p=0;p<s;p++){var l=e[p],c=l.box;h+=t[p],o=this.hAlignLabel(c.x2,r.clone().expand(a),h,h+c.height(),l.orientation===k),l.orientation===k?(n.align!==H&&(o=r.radius+r.center.x+a),l.reflow(new R(o+c.width(),h,o,h))):(n.align!==H&&(o=r.center.x-r.radius-a),l.reflow(new R(o-c.width(),h,o,h))),h+=c.height()}},Gh.prototype.createVisual=function(){var t=this.options.connectors,e=this.points,o=e.length;Uh.prototype.createVisual.call(this),this._connectorLines=[];for(var i=0;i<o;i++){var r,n,s,a,h,p,l,c=e[i],u=c.sector,d=c.label,f=u.middle(),g=(c.options.connectors||{}).color||t.color;d&&(g=new b.drawing.Path({stroke:{color:g,width:t.width},animation:{type:"fadeIn",delay:c.animationDelay}}),"outsideEnd"===d.options.position&&(r=d.box,n=u.center,l=u.point(f),s=new B(r.x1,r.center().y),p=h=a=void 0,l=u.clone().expand(t.padding).point(f),g.moveTo(l.x,l.y),d.orientation===k?(p=Wh(n,l,s,h=new B(r.x1-t.padding,r.center().y)),s=new B(h.x-4,h.y),(p=p||s).x=Math.min(p.x,s.x),this.pointInCircle(p,u.center,u.radius+4)||p.x<u.center.x?(a=u.center.x+u.radius+4,c.options.labels.align===rr||a<s.x?g.lineTo(a,l.y):g.lineTo(l.x+8,l.y),g.lineTo(s.x,h.y)):(p.y=h.y,g.lineTo(p.x,p.y))):(p=Wh(n,l,s,h=new B(r.x2+t.padding,r.center().y)),s=new B(h.x+4,h.y),(p=p||s).x=Math.max(p.x,s.x),this.pointInCircle(p,u.center,u.radius+4)||p.x>u.center.x?(a=u.center.x-u.radius-4,c.options.labels.align===rr||a>s.x?g.lineTo(a,l.y):g.lineTo(l.x-8,l.y),g.lineTo(s.x,h.y)):(p.y=h.y,g.lineTo(p.x,p.y))),g.lineTo(h.x,h.y),this._connectorLines.push(g),this.visual.append(g)))}},Gh.prototype.renderVisual=function(){var t,e,o,i;Uh.prototype.renderVisual.call(this),Ft(this.options.series,function(t){return t.autoFit})&&(t=this.targetBox,e=this.box.center(),(i=this.visual.bbox())&&(o=i.bottomRight(),(i=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(b.geometry.transform().scale(i,i,[e.x,e.y]))))},Gh.prototype.labelComparator=function(t){var o=t?-1:1;return function(t,e){return((t.parent.sector.middle()+270)%360-(e.parent.sector.middle()+270)%360)*o}},Gh.prototype.hAlignLabel=function(t,e,o,i,r){var n=e.radius,e=e.center,s=e.x,e=e.y,o=Math.min(Math.abs(e-o),Math.abs(e-i));return n<o?t:s+Math.sqrt(n*n-o*o)*(r?1:-1)},Gh.prototype.pointInCircle=function(t,e,o){return Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)<Math.pow(o,2)},Gh.prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value)},Gh.prototype.animationDelay=function(t){return 70*t},Gh.prototype.stackRoot=function(){return this},Gh);function Gh(t,e){Uh.call(this,e),this.plotArea=t,this.chartService=t.chartService,this.points=[],this.legendItems=[],this.render()}function Wh(t,e,o,i){var r,n=(i.x-o.x)*(t.y-o.y)-(i.y-o.y)*(t.x-o.x),i=(i.y-o.y)*(e.x-t.x)-(i.x-o.x)*(e.y-t.y);return r=0!=i?new B(t.x+(o=n/i)*(e.x-t.x),t.y+o*(e.y-t.y)):r}i(c,{startAngle:90,connectors:{width:2,color:"#939393",padding:8},inactiveItems:{markers:{},labels:{}}}),x(c.prototype,Nh),c.prototype.isStackRoot=!0;var Xh,qh,Yh=c,Zh=((qh=Us)&&(Kh.__proto__=qh),((Kh.prototype=Object.create(qh&&qh.prototype)).constructor=Kh).prototype.render=function(){this.createPieChart(this.series)},Kh.prototype.createPieChart=function(t){var e=t[0],t=new Yh(this,{series:t,padding:e.padding,startAngle:e.startAngle,connectors:e.connectors,legend:this.options.legend});this.appendChart(t)},Kh.prototype.appendChart=function(t,e){qh.prototype.appendChart.call(this,t,e),Tt(this.options.legend.items,t.legendItems)},Kh),Er=((Xh=Fh)&&(Qh.__proto__=Xh),((Qh.prototype=Object.create(Xh&&Xh.prototype)).constructor=Qh).prototype.reflowLabel=function(){var t,e=this.options.labels,o=this.label,i=this.sector.clone(),r=i.middle();o&&(t=o.box.height(),e.position===C?(i.radius-=(i.radius-i.innerRadius)/2,e=i.point(r),o.reflow(new R(e.x,e.y-t/2,e.x,e.y))):Xh.prototype.reflowLabel.call(this))},Qh.prototype.createSegment=function(t,e){return ye.current.createRing(t,e)},Qh);function Qh(){Xh.apply(this,arguments)}function Kh(){qh.apply(this,arguments)}i(Er,{overlay:{gradient:"roundedGlass"},labels:{position:C},animation:{type:sr}}),x(Er.prototype,kr);var $h,Jh=Er,h=(($h=Yh)&&(tp.__proto__=$h),((tp.prototype=Object.create($h&&$h.prototype)).constructor=tp).prototype.addValue=function(t,e,o){var i=x({},o.series,{index:o.index});this.evalSegmentOptions(i,t,o),this.createLegendItem(t,i,o),t&&!1!==o.visible&&(t=new Jh(t,e,i),Object.assign(t,o),this.append(t),this.points.push(t))},tp.prototype.reflow=function(t){for(var e,o=this.options,i=t.clone(),i=Math.min(i.width(),i.height()),r=i/2,n=o.series,s=n.length,o=O(o.padding,i-.85*i),a=r-(o=r-5<o?r-5:o),h=0,p=0;p<s;p++){var l=n[p];0===p&&T(l.holeSize)&&(e=l.holeSize,a-=l.holeSize),T(l.size)?a-=l.size:h++,T(l.margin)&&p!==s-1&&(a-=l.margin)}T(e)||(a-=e=(r-o)/(s+.75)*.75);var c=e,u=0;this.seriesConfigs=[];for(var d=0;d<s;d++){var f=n[d],g=(c+=u)+O(f.size,a/h);this.seriesConfigs.push({innerRadius:c,radius:g}),u=f.margin||0,c=g}$h.prototype.reflow.call(this,t)},tp.prototype.animationDelay=function(t,e,o){return 50*t+600*(e+1)/(o+1)},tp);function tp(){$h.apply(this,arguments)}i(h,{startAngle:90,connectors:{width:2,color:"#939393",padding:8}});var ep,op,ip,rp=h,np=((ip=Zh)&&(hp.__proto__=ip),((hp.prototype=Object.create(ip&&ip.prototype)).constructor=hp).prototype.render=function(){this.createDonutChart(this.series)},hp.prototype.createDonutChart=function(t){var e=t[0],t=new rp(this,{series:t,padding:e.padding,connectors:e.connectors,legend:this.options.legend});this.appendChart(t)},hp),f=((op=Us)&&(ap.__proto__=op),((ap.prototype=Object.create(op&&op.prototype)).constructor=ap).prototype.initFields=function(){this.valueAxisRangeTracker=new nn},ap.prototype.render=function(){this.addToLegend(this.series),this.createPolarAxis(),this.createCharts(),this.createValueAxis()},ap.prototype.alignAxes=function(){var t=this.valueAxis,e=t.range(),e=t.options.reverse?e.max:e.min,e=t.getSlot(e),o=this.polarAxis.getSlot(0).center,o=t.box.translate(o.x-e.x1,o.y-e.y1);t.reflow(o)},ap.prototype.createValueAxis=function(){var t,e=this.valueAxisRangeTracker,o=e.query(),i=this.valueAxisOptions({roundToMajorUnit:!1,zIndex:-1}),r="log"===i.type?(t=Ti,{min:.1,max:1}):(t=Ai,{min:0,max:1}),e=e.query(name)||o||r,r=(e&&o&&(e.min=Math.min(e.min,o.min),e.max=Math.max(e.max,o.max)),new t(e.min,e.max,i,this.chartService));this.valueAxis=r,this.appendAxis(r)},ap.prototype.reflowAxes=function(){var t=this.options.plotArea,e=this.valueAxis,o=this.polarAxis,i=this.box,r=.15*Math.min(i.width(),i.height()),t=P(t.padding||{},r),r=i.clone().unpad(t),i=r.clone(),t=(i.y2=i.y1+Math.min(i.width(),i.height()),i.align(r,v,C),i.clone().shrink(0,i.height()/2)),r=(o.reflow(i),e.reflow(t),e.lineBox().height()-e.box.height());e.reflow(e.box.unpad({top:r})),this.axisBox=i,this.alignAxes(i)},ap.prototype.backgroundBox=function(){return this.box},ap.prototype.detachLabels=function(){},ap),d=((ep=Zn)&&(sp.__proto__=ep),((sp.prototype=Object.create(ep&&ep.prototype)).constructor=sp).prototype.pointSlot=function(t,e){e=t.center.y-e.y1,t=B.onCircle(t.center,t.startAngle,e);return new R(t.x,t.y,t.x,t.y)},sp);function sp(){ep.apply(this,arguments)}function ap(){op.apply(this,arguments)}function hp(){ip.apply(this,arguments)}i(d,{clip:!1});var pp,lp=d,c=((pp=Eh)&&(cp.__proto__=pp),(cp.prototype=Object.create(pp&&pp.prototype)).constructor=cp);function cp(){pp.apply(this,arguments)}c.prototype.pointSlot=lp.prototype.pointSlot,i(c,{clip:!1});var up,dp,fp=c,gp=((dp=on)&&(mp.__proto__=dp),((mp.prototype=Object.create(dp&&dp.prototype)).constructor=mp).prototype.fillToAxes=function(t){var e=this._polarAxisCenter();t.lineTo(e.x,e.y)},mp.prototype._polarAxisCenter=function(){return this.parent.plotArea.polarAxis.box.center()},mp.prototype.strokeSegments=function(){var t,e,o,i=this._strokeSegments;return i||(t=this._polarAxisCenter(),e=new Ri(!1),(o=this.points()).push(t),(i=this._strokeSegments=e.process(o)).pop()),i},mp),yp=((up=Yr)&&(vp.__proto__=up),((vp.prototype=Object.create(up&&up.prototype)).constructor=vp).prototype.fillToAxes=function(t){var e=this.parent.plotArea.polarAxis.box.center(),e=new b.geometry.Segment([e.x,e.y]);t.segments.unshift(e),t.segments.push(e)},vp);function vp(){up.apply(this,arguments)}function mp(){dp.apply(this,arguments)}function xp(t,e){return t.value.x-e.value.x}(bp=fp)&&(Sp.__proto__=bp),((Sp.prototype=Object.create(bp&&bp.prototype)).constructor=Sp).prototype.createSegment=function(t,e,o){return new("smooth"===(e.line||{}).style?gp:yp)(t,e,o)},Sp.prototype.createMissingValue=function(t,e){var o;return Wn(t.x)&&e!==or&&(o={x:t.x,y:t.y},e===er&&(o.y=0)),o},Sp.prototype.seriesMissingValues=function(t){return t.missingValues||er},Sp.prototype._hasMissingValuesGap=function(){for(var t=this.options.series,e=0;e<t.length;e++)if("gap"===this.seriesMissingValues(t[e]))return!0},Sp.prototype.sortPoints=function(t){if(t.sort(xp),this._hasMissingValuesGap())for(var e=0;e<t.length;e++){var o=t[e];!o||Wn(o.value.y)||"gap"!==this.seriesMissingValues(o.series)||delete t[e]}return t};var _p,bp,wp=Sp,Er=((_p=f)&&(Cp.__proto__=_p),((Cp.prototype=Object.create(_p&&_p.prototype)).constructor=Cp).prototype.createPolarAxis=function(){var t=new bi(this.options.xAxis,this.chartService);this.polarAxis=t,this.axisX=t,this.appendAxis(t)},Cp.prototype.valueAxisOptions=function(t){return x(t,{majorGridLines:{type:j},minorGridLines:{type:j}},this.options.yAxis)},Cp.prototype.createValueAxis=function(){_p.prototype.createValueAxis.call(this),this.axisY=this.valueAxis},Cp.prototype.appendChart=function(t,e){this.valueAxisRangeTracker.update(t.yAxisRanges),Us.prototype.appendChart.call(this,t,e)},Cp.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createLineChart(Ms(t,["polarLine"]),e),this.createScatterChart(Ms(t,["polarScatter"]),e),this.createAreaChart(Ms(t,["polarArea"]),e)},Cp.prototype.createLineChart=function(t,e){0!==t.length&&(t=new fp(this,{series:t}),this.appendChart(t,e))},Cp.prototype.createScatterChart=function(t,e){0!==t.length&&(t=new lp(this,{series:t}),this.appendChart(t,e))},Cp.prototype.createAreaChart=function(t,e){0!==t.length&&(t=new wp(this,{series:t}),this.appendChart(t,e))},Cp.prototype._dispatchEvent=function(t,e,o){var i=t._eventCoordinates(e),i=new B(i.x,i.y),r=this.axisX.getValue(i),i=this.axisY.getValue(i);null!==r&&null!==i&&t.trigger(o,{element:Lt(e),x:r,y:i})},Cp.prototype.createCrosshairs=function(){},Cp);function Cp(){_p.apply(this,arguments)}function Sp(){bp.apply(this,arguments)}i(Er,{xAxis:{},yAxis:{}}),x(Er.prototype,Fs);var kp,h=Er,d=((kp=qr)&&(Ap.__proto__=kp),((Ap.prototype=Object.create(kp&&kp.prototype)).constructor=Ap).prototype.pointSlot=function(t,e){e=t.center.y-e.y1,t=B.onCircle(t.center,t.middle(),e);return new R(t.x,t.y,t.x,t.y)},Ap.prototype.renderSegments=function(){if(kp.prototype.renderSegments.call(this),this._segments&&1<this._segments.length)for(var t=function(t){for(var e=[],o=0;o<t.length;o++){var i=t[o];e[i.seriesIx]=e[i.seriesIx]||[],e[i.seriesIx].push(i)}return e}(this._segments),e=0;e<t.length;e++){var o,i,r,n=t[e];n&&1<n.length&&(o=n[0].linePoints[0],r=zt(n),r=zt(r.linePoints),i=0===o.categoryIx,r=r.categoryIx===r.categoriesCount-1,i&&r&&zt(n).linePoints.push(o))}},Ap.prototype.createSegment=function(t,e,o){var o=new("smooth"===e.style?jr:Or)(t,e,o),i=this.seriesMissingValues(e);return t.length!==e.data.length&&i!==or||(o.options.closed=!0),o},Ap);function Ap(){kp.apply(this,arguments)}i(d,{clip:!1,limitPoints:!1});var Pp,Tp,Mp,Op,Bp=d,Rp=((Op=on)&&(jp.__proto__=Op),((jp.prototype=Object.create(Op&&Op.prototype)).constructor=jp).prototype.fillToAxes=function(){},jp),Ep=((Mp=Yr)&&(Vp.__proto__=Mp),((Vp.prototype=Object.create(Mp&&Mp.prototype)).constructor=Vp).prototype.fillToAxes=function(){},Vp),Lp=((Tp=Bp)&&(zp.__proto__=Tp),((zp.prototype=Object.create(Tp&&Tp.prototype)).constructor=zp).prototype.createSegment=function(t,e,o,i){var r,n,s,a=this.options.isStacked,h=(e.line||{}).style;return a&&0<o&&i&&(n=i.linePoints.slice(0),r=i),"smooth"===h?(s=new Rp(t,e,o,r,n)).options.closed=!0:(t.push(t[0]),s=new Ep(t,e,o,r,n)),s},zp.prototype.seriesMissingValues=function(t){return t.missingValues||er},zp),c=((Pp=Jh)&&(Ip.__proto__=Pp),(Ip.prototype=Object.create(Pp&&Pp.prototype)).constructor=Ip);function Ip(t,e){Pp.call(this,t,null,e)}function zp(){Tp.apply(this,arguments)}function Vp(){Mp.apply(this,arguments)}function jp(){Op.apply(this,arguments)}i(c,{overlay:{gradient:"none"},labels:{distance:10}});var Dp,Hp=c,Er=((Dp=r)&&(Up.__proto__=Dp),((Up.prototype=Object.create(Dp&&Dp.prototype)).constructor=Up).prototype.reflow=function(o){var t=this.options,e=this.children,i=t.gap,r=t.spacing,t=e.length,n=o.angle/(t+i+r*(t-1)),s=o.startAngle+i/2*n;this.forEach(e,function(t){var e=o.clone();e.startAngle=s,e.angle=n,t.sector&&(e.radius=t.sector.radius),t.reflow(e),t.sector=e,s+=n+n*r})},Up);function Up(t){Dp.call(this,t),this.forEach=t.rtl?yn:gn}i(Er,{gap:1,spacing:0});var Fp,Np,Gp=Er,Wp=((Np=r)&&(qp.__proto__=Np),((qp.prototype=Object.create(Np&&Np.prototype)).constructor=qp).prototype.reflow=function(t){var e=this.options.reverse,o=this.children,i=o.length,r=e?i-1:0,n=e?-1:1;this.box=new R;for(var s=r;0<=s&&s<i;s+=n){var a=o[s].sector;a.startAngle=t.startAngle,a.angle=t.angle}},qp),d=((Fp=An)&&(Xp.__proto__=Fp),((Xp.prototype=Object.create(Fp&&Fp.prototype)).constructor=Xp).prototype.pointType=function(){return Hp},Xp.prototype.clusterType=function(){return Gp},Xp.prototype.stackType=function(){return Wp},Xp.prototype.categorySlot=function(t,e){return t.getSlot(e)},Xp.prototype.pointSlot=function(t,e){var o=t.clone(),t=t.center.y;return o.radius=t-e.y1,o.innerRadius=t-e.y2,o},Xp.prototype.reflowPoint=function(t,e){t.sector=e,t.reflow()},Xp.prototype.createAnimation=function(){this.options.animation.center=this.box.toRect().center(),Fp.prototype.createAnimation.call(this)},Xp);function Xp(){Fp.apply(this,arguments)}function qp(){Np.apply(this,arguments)}d.prototype.reflow=Sr.prototype.reflow,i(d,{clip:!1,limitPoints:!1,animation:{type:"pie"}});var Yp,Zp=d,c=((Yp=f)&&(Qp.__proto__=Yp),((Qp.prototype=Object.create(Yp&&Yp.prototype)).constructor=Qp).prototype.createPolarAxis=function(){var t=new xi(this.options.categoryAxis,this.chartService);this.polarAxis=t,this.categoryAxis=t,this.appendAxis(t),this.aggregateCategories(),this.createCategoryAxesLabels()},Qp.prototype.valueAxisOptions=function(t){return this._hasBarCharts&&x(t,{majorGridLines:{type:j},minorGridLines:{type:j}}),this._isStacked100&&x(t,{roundToMajorUnit:!1,labels:{format:"P0"}}),x(t,this.options.valueAxis)},Qp.prototype.aggregateCategories=function(){Ia.prototype.aggregateCategories.call(this,this.panes)},Qp.prototype.createCategoryAxesLabels=function(){Ia.prototype.createCategoryAxesLabels.call(this,this.panes)},Qp.prototype.filterSeries=function(t){return t},Qp.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createAreaChart(Ms(t,["radarArea"]),e),this.createLineChart(Ms(t,["radarLine"]),e),this.createBarChart(Ms(t,["radarColumn"]),e)},Qp.prototype.chartOptions=function(t){var e={series:t},o=t[0];return o&&(t=this.filterVisibleSeries(t),o=o.stack,e.isStacked=o&&1<t.length,e.isStacked100=o&&"100%"===o.type&&1<t.length,e.isStacked100&&(this._isStacked100=!0)),e},Qp.prototype.createAreaChart=function(t,e){0!==t.length&&(t=new Lp(this,this.chartOptions(t)),this.appendChart(t,e))},Qp.prototype.createLineChart=function(t,e){0!==t.length&&(t=new Bp(this,this.chartOptions(t)),this.appendChart(t,e))},Qp.prototype.createBarChart=function(t,e){var o;0!==t.length&&(o=t[0],(t=this.chartOptions(t)).gap=o.gap,t.spacing=o.spacing,o=new Zp(this,t),this.appendChart(o,e),this._hasBarCharts=!0)},Qp.prototype.seriesCategoryAxis=function(){return this.categoryAxis},Qp.prototype._dispatchEvent=function(t,e,o){var i=t._eventCoordinates(e),i=new B(i.x,i.y),r=this.categoryAxis.getCategory(i),i=this.valueAxis.getValue(i);null!==r&&null!==i&&t.trigger(o,{element:Lt(e),category:r,value:i})},Qp.prototype.createCrosshairs=function(){},Qp);function Qp(){Yp.apply(this,arguments)}x(c.prototype,Fs,{appendChart:Ia.prototype.appendChart,aggregateSeries:Ia.prototype.aggregateSeries,seriesSourcePoints:Ia.prototype.seriesSourcePoints}),i(c,{categoryAxis:{categories:[]},valueAxis:{}});var Kp,Er=c,d=((Kp=r)&&($p.__proto__=Kp),(($p.prototype=Object.create(Kp&&Kp.prototype)).constructor=$p).prototype.reflow=function(t){var e=this.points,o=this.children[0];this.box=new R(e[0].x,e[0].y,e[1].x,e[2].y),o&&o.reflow(new R(t.x1,e[0].y,t.x2,e[2].y))},$p.prototype.createVisual=function(){var t=this,e=this.options;Kp.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)},$p.prototype.createPath=function(){var t=this.options,e=t.border;return b.drawing.Path.fromPoints(this.points,{fill:{color:t.color,opacity:t.opacity},stroke:{color:e.color,opacity:e.opacity,width:e.width}}).close()},$p.prototype.createHighlight=function(t){return b.drawing.Path.fromPoints(this.points,t)},$p.prototype.highlightVisual=function(){return this.visual.children[0]},$p.prototype.highlightVisualArgs=function(){var t=b.drawing.Path.fromPoints(this.points).close();return{options:this.options,path:t}},$p.prototype.tooltipAnchor=function(){var t=this.box;return{point:new B(t.center().x,t.y1),align:{horizontal:"center",vertical:"top"}}},$p.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},$p);function $p(t,e,o){Kp.call(this,e),this.value=t,this.options.index=o.index}i(d,{color:a,border:{width:1}}),x(d.prototype,kr);var Jp,tl=d,f=((Jp=r)&&(el.__proto__=Jp),((el.prototype=Object.create(Jp&&Jp.prototype)).constructor=el).prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value)},el.prototype.render=function(){var t=this.options,e=this.plotArea.options.seriesColors,o=(void 0===e&&(e=[]),t.series[0]),i=o.data;if(i)for(var t=Ps(o),r=t.total,n=t.points,s=0;s<n.length;s++){var a,h,p=n[s];p&&(a=p.fields,it(o.color)||(o.color=a.color||e[s%e.length]),a=x({index:s,owner:this,series:o,dataItem:i[s],percentage:p.value/r},a,{visible:p.visible}),p=p.valueFields.value,h=this.createSegment(p,a),p=this.createLabel(p,a),h&&p&&h.append(p))}},el.prototype.evalSegmentOptions=function(t,e,o){var i=o.series;_r(t,{value:e,series:i,dataItem:o.dataItem,index:o.index},{defaults:i._defaults,excluded:["data","content","template","toggle","visual"]})},el.prototype.createSegment=function(t,e){var o=x({},e.series);if(this.evalSegmentOptions(o,t,e),this.createLegendItem(t,o,e),!1!==e.visible)return t=new tl(t,o,e),Object.assign(t,e),this.append(t),this.points.push(t),t},el.prototype.createLabel=function(t,e){var o,i=e.series,r=e.dataItem,n=x({},this.options.labels,i.labels),s=t;if(n.visible)return o=dt(n),r={dataItem:r,value:t,percentage:e.percentage,category:e.category,series:i},o?s=o(r):n.format&&(s=this.plotArea.chartService.format.auto(n.format,s)),n.color||(n.color=qt(i.color),n.background||(n.background=i.color)),this.evalSegmentOptions(n,t,e),o=new De(s,x({vAlign:n.position},n),r),this.labels.push(o),o},el.prototype.labelPadding=function(){for(var t=this.labels,e={left:0,right:0},o=0;o<t.length;o++){var i,r=t[o].options.align;r!==C&&(i=t[o].box.width(),r===S?e.left=Math.max(e.left,i):e.right=Math.max(e.right,i))}return e},el.prototype.dynamicSlopeReflow=function(t,e,o){for(var i=this.options,r=this.points,n=r.length,s=r[0],a=s,h=0;h<r.length;h++)r[h].percentage>a.percentage&&(a=r[h]);for(var p=s.percentage/a.percentage*e,l=(e-p)/2,c=0,u=0;u<n;u++){var d=r[u].percentage,f=r[u+1],f=f?f.percentage:d,g=r[u].points=[],y=i.dynamicHeight?o*d:o/n,d=_(d?(e-p*(f/d))/2:f?0:e/2,0,e);g.push(new b.geometry.Point(t.x1+l,t.y1+c)),g.push(new b.geometry.Point(t.x1+e-l,t.y1+c)),g.push(new b.geometry.Point(t.x1+e-d,t.y1+y+c)),g.push(new b.geometry.Point(t.x1+d,t.y1+y+c)),c+=y+i.segmentSpacing,p=_(e-2*(l=d),0,e)}},el.prototype.constantSlopeReflow=function(t,e,o){for(var i=this.options,r=this.points,n=r.length,s=i.neckRatio<=1,a=s?i.neckRatio*e:e,h=s?0:(e-e/i.neckRatio)/2,p=((s?e:e-2*h)-a)/2,l=0,c=0;c<n;c++){var u=r[c].points=[],d=r[c].percentage,f=i.dynamicHeight?p*d:p/n,d=i.dynamicHeight?o*d:o/n;u.push(new b.geometry.Point(t.x1+h,t.y1+l)),u.push(new b.geometry.Point(t.x1+e-h,t.y1+l)),u.push(new b.geometry.Point(t.x1+e-h-f,t.y1+d+l)),u.push(new b.geometry.Point(t.x1+h+f,t.y1+d+l)),h+=f,l+=d+i.segmentSpacing}},el.prototype.reflow=function(t){var e=this.points,o=e.length;if(o){var i=this.options,r=t.clone().unpad(this.labelPadding()),n=r.height()-i.segmentSpacing*(o-1),s=r.width();i.dynamicSlope?this.dynamicSlopeReflow(r,s,n):this.constantSlopeReflow(r,s,n);for(var a=0;a<o;a++)e[a].reflow(t)}},el);function el(t,e){Jp.call(this,e),this.plotArea=t,this.points=[],this.labels=[],this.legendItems=[],this.render()}i(f,{neckRatio:.3,width:300,dynamicSlope:!1,dynamicHeight:!0,segmentSpacing:0,labels:{visible:!1,align:C,position:C,zIndex:1}}),x(f.prototype,Nh);var ol,il,rl=f,c=((il=Us)&&(sl.__proto__=il),((sl.prototype=Object.create(il&&il.prototype)).constructor=sl).prototype.render=function(){this.createFunnelChart(this.series)},sl.prototype.createFunnelChart=function(t){var e=t[0],t=new rl(this,{series:t,legend:this.options.legend,neckRatio:e.neckRatio,dynamicHeight:e.dynamicHeight,dynamicSlope:e.dynamicSlope,segmentSpacing:e.segmentSpacing,highlight:e.highlight});this.appendChart(t)},sl.prototype.appendChart=function(t,e){il.prototype.appendChart.call(this,t,e),Tt(this.options.legend.items,t.legendItems)},sl),d=((ol=r)&&(nl.__proto__=ol),((nl.prototype=Object.create(ol&&ol.prototype)).constructor=nl).prototype.render=function(){this._rendered||(this._rendered=!0,this.createMarker(),this.createLabel(),this.createNote())},nl.prototype.createLabel=function(){var t,e,o,i=this.options.labels;i.visible&&(t=this.pointData(),e=dt(i),o=i.color,e=e?e(t):this.formatValue(i.format),o=o||qt(this.color),this.label=new De(e,x({align:C,vAlign:C,margin:{left:5,right:5},zIndex:O(i.zIndex,this.series.zIndex)},i,{color:o}),t),this.append(this.label))},nl.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},nl.prototype.reflow=function(t){this.render();var e=this.label;this.box=t,e&&e.reflow(this.markerBox()),this.note&&this.note.reflow(t),this.marker.reflow(this.markerBox())},nl.prototype.markerBox=function(){var t,e=this.options.markers,o=e.border,i=this.box.toRect(),r="roundedRect"===O(e.type,"rect"),o=O(o.width,r?1:0),r=Math.round(o/2);return e.size&&(t=i.center(),i.size.width=i.size.height=e.size,i.origin.x=Math.round(t.x-i.size.width/2),i.origin.y=Math.round(t.y-i.size.height/2)),i.size.width-=o,i.size.height-=o,i.origin.y+=r+.5,i.origin.x+=r+.5,Ie(i)},nl.prototype.markerBorder=function(){var t=this.options,e=t.markers.border,t=O(e.opacity,t.opacity);return{color:e.color||this.color,width:e.width,opacity:t,dashType:e.dashType}},nl.prototype.createMarker=function(){var t=this.options,e=t.markers,e=new Ce({type:O(e.type,"rect"),width:e.size,height:e.size,rotation:e.rotation,background:this.color,border:this.markerBorder(),borderRadius:e.borderRadius,opacity:this.series.opacity||t.opacity,zIndex:O(t.zIndex,this.series.zIndex),animation:t.animation,visual:t.visual},{dataItem:this.dataItem,value:this.value,series:this.series,category:this.category});this.marker=e,this.append(e)},nl.prototype.createHighlight=function(t){var e=this.options,o=this.options.highlight.markers||this.options.markers,o=new Ce({type:O(o.type,"rect"),width:o.size,height:o.size,rotation:o.rotation,background:o.color||this.color,border:this.markerBorder(),borderRadius:o.borderRadius,opacity:this.series.opacity||e.opacity,zIndex:O(e.zIndex,this.series.zIndex)}),e=(o.reflow(this.markerBox()),o.getElement());return e.options.fill=t.fill,e.options.stroke=t.stroke,e},nl.prototype.highlightVisual=function(){return this.rectVisual},nl.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this.rectVisual}},nl.prototype.tooltipAnchor=function(){var t=this.box.center().x,e=this.box.y1-5;return{point:new B(t,e),align:{horizontal:C,vertical:w}}},nl.prototype.overlapsBox=function(t){return this.box.overlaps(t)},nl.prototype.unclipElements=function(){},nl.prototype.pointData=function(){return{x:this.value.x,y:this.value.y,value:this.value.value,dataItem:this.dataItem,series:this.series}},nl);function nl(t,e){ol.call(this),this.options=e,this.color=e.color||a,this.value=t}function sl(){il.apply(this,arguments)}x(d.prototype,kr),x(d.prototype,o),d.prototype.defaults={markers:{type:"rect",borderRadius:4,border:{color:"transparent"}},padding:{top:1},labels:{visible:!1,padding:3},opacity:1,notes:{label:{}}};var al,hl=d,f=((al=r)&&(pl.__proto__=al),((pl.prototype=Object.create(al&&al.prototype)).constructor=pl).prototype._initFields=function(){this.points=[],this.seriesOptions=[],this.valueRange={min:G,max:W},this._evalSeries=[]},pl.prototype.render=function(){this.setRange(),this.traverseDataPoints(this.addValue.bind(this))},pl.prototype.setRange=function(){for(var t=this.options.series,e=0;e<t.length;e++)for(var o=t[e],i=0;i<o.data.length;i++){var r=this._bindPoint(o,e,i).valueFields;T(r.value)&&null!==r.value&&(this.valueRange.min=Math.min(this.valueRange.min,r.value),this.valueRange.max=Math.max(this.valueRange.max,r.value))}},pl.prototype.addValue=function(t,e){var o;t&&T(t.value)&&null!==t.value&&(o=this.createPoint(t,e))&&Object.assign(o,e),this.points.push(o)},pl.prototype.evalPointOptions=function(t,e,o){var i=o.series,r=o.seriesIx,n={defaults:i._defaults,excluded:["data","tooltip","content","template","visual","toggle"]},s=this._evalSeries[r],r=(T(s)||(this._evalSeries[r]=s=_r(t,{},n,!0)),t);return s&&_r(r=x({},t),{value:e,series:i,dataItem:o.dataItem,min:this.valueRange.min,max:this.valueRange.max},n),r},pl.prototype.pointType=function(){return hl},pl.prototype.pointOptions=function(t,e){var o,i=this.seriesOptions[e];return i||(o=this.pointType().prototype.defaults,this.seriesOptions[e]=i=x({},o,{markers:{opacity:t.opacity},tooltip:{format:this.options.tooltip.format},labels:{format:this.options.labels.format}},t)),i},pl.prototype.createPoint=function(t,e){var o,i,r,n=e.series,s=this.pointOptions(n,e.seriesIx),a=e.color||n.color,s=this.evalPointOptions(s,t,e),n=(it(n.color)?a=s.color:0!==this.valueRange.max&&(e=a,void 0===o&&(o=.05),i=Object(b.parseColor)(e),r=1-o,a=function(t){var e=i.toHSL(),o=100-e.l;return e.l+=Math.min((r-t)*o,o),e.toCss()}(t.value/this.valueRange.max)),new hl(t,s));return n.color=a,this.append(n),n},pl.prototype.seriesAxes=function(t){var e=t.xAxis,t=t.yAxis,o=this.plotArea,i=e?o.namedXAxes[e]:o.axisX,o=t?o.namedYAxes[t]:o.axisY;if(!i)throw new Error("Unable to locate X axis with name "+e);if(o)return{xAxis:i,yAxis:o};throw new Error("Unable to locate Y axis with name "+t)},pl.prototype.reflow=function(t){var n=this,s=this.points,a=!this.options.clip,h=0;this.traverseDataPoints(function(t,e){var o=s[h++],e=n.seriesAxes(e.series),i=e.xAxis,e=e.yAxis,r=i.categoryIndex(t.x),t=e.categoryIndex(t.y),i=i.getSlot(r,r,a),r=e.getSlot(t,t,a);o&&(i&&r?(e=n.pointSlot(i,r),o.reflow(e)):o.visible=!1)}),this.box=t},pl.prototype.pointSlot=function(t,e){return new R(t.x1,e.y1,t.x2,e.y2)},pl.prototype.traverseDataPoints=function(t){for(var e=this.options.series,o=0;o<e.length;o++)for(var i=e[o],r=this.seriesAxes(i),n=r.xAxis,s=r.yAxis,a=n.currentRangeIndices(),h=s.currentRangeIndices(),p=0;p<i.data.length;p++){var l=this._bindPoint(i,o,p),c=l.valueFields,l=l.fields,u=n.totalIndex(c.x),d=s.totalIndex(c.y),u=a.min<=u&&u<=a.max,d=h.min<=d&&d<=h.max;u&&d&&t(c,x({pointIx:p,series:i,seriesIx:o,dataItem:i.data[p],owner:this},l))}},pl.prototype.formatPointValue=function(t,e){t=t.value;return this.chartService.format.auto(e,t.x,t.y,t.value)},pl.prototype.animationPoints=function(){for(var t=this.points,e=[],o=0;o<t.length;o++)e.push((t[o]||{}).marker);return e},pl);function pl(t,e){al.call(this,e),this.plotArea=t,this.chartService=t.chartService,this._initFields(),this.render()}i(f,{series:[],tooltip:{format:"{0}, {1}: {2}"},labels:{format:"{2}"},clip:!0}),x(f.prototype,{_bindPoint:Sr.prototype._bindPoint});var ll,cl=f,o=((ll=Us)&&(ul.__proto__=ll),((ul.prototype=Object.create(ll&&ll.prototype)).constructor=ul).prototype.initFields=function(){this.namedXAxes={},this.namedYAxes={}},ul.prototype.render=function(t){void 0===t&&(t=this.panes),this.bindCategories(),this.createAxes(t),this.createCharts(t),this.createAxisLabels()},ul.prototype.bindCategories=function(){for(var t=this.srcSeries||this.series,e=0;e<t.length;e++){for(var o=t[e],i=o.data||[],r=this.seriesAxes(o),n=r.xAxis,r=r.yAxis,s=Kt(n.categories||[]),a=Kt(r.categories||[]),h=0;h<i.length;h++){var p=Qi.current.bindPoint(o,h).valueFields,l=p.x,p=p.y;s.has(l)||s.add(l),a.has(p)||a.add(p)}n.categories=s.values(),r.categories=a.values()}},ul.prototype.createCharts=function(t){for(var e=this.groupSeriesByPane(),o=0;o<t.length;o++){var i=t[o],r=e[i.options.name||"default"]||[],r=(this.addToLegend(r),this.filterVisibleSeries(r));r&&this.createHeatmapChart(Ms(r,["heatmap"]),i)}},ul.prototype.createHeatmapChart=function(t,e){t=new cl(this,{series:t});this.appendChart(t,e)},ul.prototype.seriesPaneName=function(t){var e=this.options,o=t.xAxis,i=vt([].concat(e.xAxis),function(t){return t.name===o})[0],r=t.yAxis,t=vt([].concat(e.yAxis),function(t){return t.name===r})[0],e=(e.panes||[{}])[0].name||"default";return(i||{}).pane||(t||{}).pane||e},ul.prototype.seriesAxes=function(t){var e=this.options,o=[].concat(e.xAxis),i=t.xAxis,o=i?o.find(function(t){return t.name===i}):o[0],e=[].concat(e.yAxis),r=t.yAxis,t=r?e.find(function(t){return t.name===r}):e[0];if(!o)throw new Error("Unable to locate X axis with name "+i);if(t)return{xAxis:o,yAxis:t};throw new Error("Unable to locate Y axis with name "+r)},ul.prototype.createAxisLabels=function(){for(var t=this.axes,e=0;e<t.length;e++)t[e].createLabels()},ul.prototype.createXYAxis=function(t,e,o){for(var i,r=t.name,n=e?this.namedYAxes:this.namedXAxes,s=Object.assign({axisCrossingValue:0},t,{vertical:e,reverse:e||this.chartService.rtl?!t.reverse:t.reverse,justified:!1}),t=s.categories?s.categories[0]:null,a=[s.min,s.max,t],h=this.series,p=0;p<h.length;p++){var l=h[p],c=l[e?"yAxis":"xAxis"];if(c===s.name||0===o&&!c){c=Qi.current.bindPoint(l,0).valueFields;a.push(c[e?"y":"x"]);break}}for(var u=0;u<a.length;u++)if(a[u]instanceof Date){i=!0;break}t=new(Ts(s.type,U)||!s.type&&i?Jo:Wo)(s,this.chartService);if(t.axisIndex=o,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.mapCategories(),t},ul.prototype.createAxes=function(t){for(var e=this.options,o=[].concat(e.xAxis),i=[],r=[].concat(e.yAxis),n=[],s=0;s<o.length;s++)u(this.findPane(o[s].pane),t)&&i.push(this.createXYAxis(o[s],!1,s));for(var a=0;a<r.length;a++)u(this.findPane(r[a].pane),t)&&n.push(this.createXYAxis(r[a],!0,a));this.axisX=this.axisX||i[0],this.axisY=this.axisY||n[0]},ul.prototype.removeAxis=function(t){var e=t.options.name;ll.prototype.removeAxis.call(this,t),t.options.vertical?delete this.namedYAxes[e]:delete this.namedXAxes[e],t===this.axisX&&delete this.axisX,t===this.axisY&&delete this.axisY},ul.prototype._dispatchEvent=function(t,e,o){for(var i=t._eventCoordinates(e),r=new B(i.x,i.y),n=this.axes,s=n.length,a=[],h=[],p=0;p<s;p++){var l=n[p];ks(l.options.vertical?h:a,l.getCategory(r))}0<a.length&&0<h.length&&t.trigger(o,{element:Lt(e),originalEvent:e,x:Rs(a),y:Rs(h)})},ul.prototype.updateAxisOptions=function(t,e){var o=t.options.vertical,i=this.groupAxes(this.panes),i=(o?i.y:i.x).indexOf(t);dl(this.options,i,o,e),dl(this.originalOptions,i,o,e)},ul.prototype.crosshairOptions=function(t){return Object.assign({},t.options.crosshair,{zIndex:0})},ul);function ul(){ll.apply(this,arguments)}function dl(t,e,o,i){x([].concat(o?t.yAxis:t.xAxis)[e],i)}i(o,{xAxis:{},yAxis:{}}),x(o.prototype,Fs);var fl,d=o,f="color",o="first",gl="max",yl=(ph.current.register(Ia,[ir,rr,nr,ar,"area","verticalArea","candlestick","ohlc","bullet","verticalBullet","boxPlot","verticalBoxPlot","rangeColumn","rangeBar","waterfall","horizontalWaterfall","rangeArea","verticalRangeArea"]),ph.current.register(Vh,["scatter","scatterLine","bubble"]),ph.current.register(Zh,[sr]),ph.current.register(np,["donut"]),ph.current.register(c,["funnel"]),ph.current.register(h,["polarArea","polarLine","polarScatter"]),ph.current.register(Er,["radarArea","radarColumn","radarLine"]),ph.current.register(d,["heatmap"]),Qi.current.register([ir,rr,nr,ar,"area","verticalArea"],[Y],["category",f,"noteText","errorLow","errorHigh"]),Qi.current.register(["rangeColumn","rangeBar","rangeArea","verticalRangeArea"],["from","to"],["category",f,"noteText"]),Qi.current.register(["waterfall","horizontalWaterfall"],[Y],["category",f,"noteText","summary"]),Qi.current.register(["polarArea","polarLine","polarScatter"],[y,v],[f]),Qi.current.register(["radarArea","radarColumn","radarLine"],[Y],[f]),Qi.current.register(["funnel"],[Y],["category",f,"visibleInLegend","visible"]),Zs.current.register([ir,rr,nr,ar,"area","verticalArea","waterfall","horizontalWaterfall"],{value:gl,color:o,noteText:o,errorLow:"min",errorHigh:gl}),Zs.current.register(["rangeColumn","rangeBar","rangeArea","verticalRangeArea"],{from:"min",to:gl,color:o,noteText:o}),Zs.current.register(["radarArea","radarColumn","radarLine"],{value:gl,color:o}),Qi.current.register(["scatter","scatterLine","bubble"],[y,v],[f,"noteText","xErrorLow","xErrorHigh","yErrorLow","yErrorHigh"]),Qi.current.register(["bubble"],[y,v,"size"],[f,"category","noteText"]),Qi.current.register(["heatmap"],[y,v,Y],[f,"noteText"]),Qi.current.register(["candlestick","ohlc"],["open","high","low","close"],["category",f,"downColor","noteText"]),Zs.current.register(["candlestick","ohlc"],{open:gl,high:gl,low:"min",close:gl,color:o,downColor:o,noteText:o}),Qi.current.register(["boxPlot","verticalBoxPlot"],["lower","q1","median","q3","upper","mean","outliers"],["category",f,"noteText"]),Zs.current.register(["boxPlot","verticalBoxPlot"],{lower:gl,q1:gl,median:gl,q3:gl,upper:gl,mean:gl,outliers:o,color:o,noteText:o}),Qi.current.register(["bullet","verticalBullet"],["current","target"],["category",f,"visibleInLegend","noteText"]),Zs.current.register(["bullet","verticalBullet"],{current:gl,target:gl,color:o,noteText:o}),Qi.current.register([sr,"donut"],[Y],["category",f,"explode","visibleInLegend","visible"]),["category",Y,y,v]),c=((fl=b.Class)&&(L.__proto__=fl),((L.prototype=Object.create(fl&&fl.prototype)).constructor=L).prototype._initElement=function(t){for(this._setElementClass(t),t.style.position="relative";t.firstChild;)t.removeChild(t.firstChild);this.element=t},L.prototype._setElementClass=function(t){Q(t,"k-chart")},L.prototype._initTheme=function(t,e){for(var o=[],i=t.series||[],r=0;r<i.length;r++)o.push(Object.assign({},i[r]));t.series=o;for(var n=t,s=yl,a=0;a<s.length;a++){var h=s[a]+"Axes";n[h]&&(n[s[a]+"Axis"]=n[h],delete n[h])}this.applyDefaults(t,e),null===t.seriesColors&&delete t.seriesColors,this.options=x({},e,t),this.applySeriesColors()},L.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)}},L.prototype.resize=function(t){var e=this.getSize(),o=this._size,i=0<e.width||0<e.height;t||i&&(!o||e.width!==o.width||e.height!==o.height)?(this._size=e,this._resize(e,t),this.trigger("resize",e)):i&&this._selections&&Ft(this._selections,function(t){return!t.visible})&&(this._destroySelections(),this._setupSelection())},L.prototype._resize=function(){this._noTransitionsRedraw()},L.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()},L.prototype.getAxis=function(t){return zi(t,this._plotArea.axes)},L.prototype.findAxisByName=function(t){return this.getAxis(t)},L.prototype.findPaneByName=function(t){for(var e=this._plotArea.panes,o=0;o<e.length;o++)if(e[o].options.name===t)return new Di(e[o])},L.prototype.findPaneByIndex=function(t){var e=this._plotArea.panes;if(e[t])return new Di(e[t])},L.prototype.plotArea=function(){return new Hi(this._plotArea)},L.prototype.toggleHighlight=function(t,e){var o,i,r=this._plotArea,n=(r.srcSeries||r.series||[])[0],e=it(e)?r.filterPoints(e):(st(e)?(o=e.series,i=e.category):o=i=e,"donut"===n.type?vl(r.pointsBySeriesName(o),i):n.type===sr||"funnel"===n.type?vl((r.charts[0]||{}).points,i):r.pointsBySeriesName(o));e&&this.togglePointsHighlight(t,e)},L.prototype.togglePointsHighlight=function(t,e){for(var o=this._highlight,i=0;i<e.length;i++)o.togglePointHighlight(e[i],t)},L.prototype.showTooltip=function(t){var e,o,i=this._sharedTooltip(),r=this._tooltip,n=this._plotArea;it(t)?(e=n.findPoint(t))&&i&&(o=e.categoryIx):i&&T(t)&&(o=n.categoryAxis.categoryIndex(t)),i?0<=o&&(n=this._plotArea.pointsByCategoryIndex(o),r.showAt(n)):e&&r.show(e)},L.prototype.hideTooltip=function(){this._tooltip.hide()},L.prototype._initSurface=function(){var t=this.surface,e=this._surfaceWrap(),o=this.options.chartArea||{};o.width&&Rt(e,{width:o.width}),o.height&&Rt(e,{height:o.height}),t&&t.options.type===this.options.renderAs?(this.surface.clear(),this.surface.resize()):(this._destroySurface(),this.surface=b.drawing.Surface.create(e,{type:this.options.renderAs}),this.surface.bind("mouseenter",this._surfaceMouseenterHandler),this.surface.bind("mouseleave",this._surfaceMouseleaveHandler))},L.prototype._surfaceWrap=function(){return this.element},L.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 ja,this._setupSelection(),this._createPannable(),this._createZoomSelection(),this._createMousewheelZoom(),this.trigger("render"),wl(this._plotArea.panes),this._navState||this._cancelDomEvents()},L.prototype.exportVisual=function(t){var e,o;return t&&(t.width||t.height||t.options)?(o=this.options,t=x({},t.options,{chartArea:{width:t.width,height:t.height}}),bl(this._originalOptions,t),this.options=x({},this._originalOptions,t),this._initTheme(this.options,this._theme),this.bindCategories(),(t=this._getModel()).renderVisual(),wl(t._plotArea.panes),e=t.visual,this.options=o):e=this.surface.exportVisual(),e},L.prototype._sharedTooltip=function(){return this._plotArea instanceof Ia&&this.options.tooltip&&this.options.tooltip.shared},L.prototype._createPannable=function(){var t=this.options;!1!==t.pannable&&(this._pannable=new Wa(this._plotArea,t.pannable))},L.prototype._createZoomSelection=function(){var t=this.options.zoomable,e=(t||{}).selection;!1!==t&&!1!==e&&(this._zoomSelection=new Ka(this,e))},L.prototype._createMousewheelZoom=function(){var t=this.options.zoomable,e=(t||{}).mousewheel;!1!==t&&!1!==e&&(this._mousewheelZoom=new $a(this,e))},L.prototype._toggleDragZoomEvents=function(){var t=this.options.pannable,e=this.options.zoomable,o=(e||{}).selection,i=(e||{}).mousewheel,t=!(t||!1!==e&&!1!==o||this.requiresHandlers(["dragStart",pr,lr])),o=(!1===e||!1===i)&&!this.requiresHandlers(["zoomStart",cr,ur]),e=this.element;this._dragZoomEnabled&&t&&o?(e.style.touchAction=this._touchAction||"",this._dragZoomEnabled=!1):this._dragZoomEnabled||t&&o||(e.style.touchAction="none",this._dragZoomEnabled=!0),this._toggleDomEvents(!t,!o)},L.prototype._toggleDomEvents=function(t,e){var o=this.domEvents;o&&(o.toggleDrag&&o.toggleDrag(t),o.toggleZoom&&o.toggleZoom(e))},L.prototype._createTooltip=function(){var t=this.options.tooltip;return this._sharedTooltip()?this._createSharedTooltip(t):new vh(this.chartService,t)},L.prototype._createSharedTooltip=function(t){return new bh(this._plotArea,t)},L.prototype.applyDefaults=function(t,e){var o,i,r,n=t,s=(e||{}).axisDefaults||{};function a(t){var e=(t||{}).color||i.color,e=x({},s,s[o],i,i[o],{line:{color:e},labels:{color:e},title:{color:e}},t);return delete e[o],e}for(var h=0;h<yl.length;h++)i=n.axisDefaults||{},r=(r=[].concat(n[o=yl[h]+"Axis"])).map(a),n[o]=1<r.length?r:r[0];var p=t,t=e,l=p.series,c=l.length,u=p.seriesDefaults,d=x({},p.seriesDefaults),f=t?x({},t.seriesDefaults):{},g=x({},f);ml(d),ml(g);for(var y=0;y<c;y++){var v=l[y].type||p.seriesDefaults.type,v=x({data:[]},g,f[v],{tooltip:p.tooltip},d,u[v]);l[y]._defaults=v,l[y]=x({},v,l[y]),l[y].data=l[y].data||[]}},L.prototype.applySeriesColors=function(){for(var t=this.options,e=t.series,o=t.seriesColors||[],i=0;i<e.length;i++){var r=e[i],n=o[i%o.length],s=r._defaults;r.color=r.color||n,s&&(s.color=s.color||n)}},L.prototype._getModel=function(){var t=this.options,e=this._createPlotArea(),o=new Te(this._modelOptions());return o.chart=this,o._plotArea=e,Ne.buildTitle(t.title,o),t.legend&&t.legend.visible&&o.append(new ah(e.options.legend,this.chartService)),o.append(e),o.reflow(),o},L.prototype._modelOptions=function(){var t=this.options,e=this.getSize();return x({transitions:t.transitions,width:e.width||600,height:e.height||400},t.chartArea)},L.prototype._createPlotArea=function(t){var e=this.options;return ph.current.create(t?[]:e.series,e,this.chartService)},L.prototype._setupSelection=function(){for(var t=this._plotArea.axes,e=this._selections=[],o=0;o<t.length;o++){var i,r=t[o],n=r.options;r instanceof Wo&&n.select&&!n.vertical&&(i=r.range(),r=new yh(this,r,x({min:i.min,max:i.max},n.select)),e.push(r))}},L.prototype._selectStart=function(t){return this.trigger("selectStart",t)},L.prototype._select=function(t){return this.trigger("select",t)},L.prototype._selectEnd=function(t){return this.trigger("selectEnd",t)},L.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(b.throttle)(this._mousemove.bind(this),20)},L.prototype.addObserver=function(t){t&&this.observers.push(t)},L.prototype.removeObserver=function(t){t=this.observers.indexOf(t);0<=t&&this.observers.splice(t,1)},L.prototype.requiresHandlers=function(t){for(var e=this.observers,o=0;o<e.length;o++)if(e[o].requiresHandlers(t))return!0},L.prototype.trigger=function(t,e){void 0===e&&(e={}),"showTooltip"===t&&(e.anchor.point=this._toDocumentCoordinates(e.anchor.point));for(var o=(e.sender=this).observers,i=!1,r=0;r<o.length;r++)o[r].trigger(t,e)&&(i=!0);return i},L.prototype._attachEvents=function(){var t,e=this.element;this._touchAction=e.style.touchAction,Mt(e,((t={}).contextmenu=this._clickHandler,t[dr]=this._mousewheelHandler,t.mouseleave=this._mouseleaveHandler,t)),this._shouldAttachMouseMove()&&Mt(e,((t={}).mousemove=this._mousemove,t)),this.domEvents=no.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()},L.prototype._mouseleave=function(t){this._hoveredPoint&&(this._hoveredPoint.out(this,t),this._hoveredPoint=null),this._plotArea.hovered&&(this.trigger("plotAreaLeave"),this._plotArea.hovered=!1)},L.prototype._cancelDomEvents=function(){this.domEvents&&this.domEvents.cancel&&this.domEvents.cancel()},L.prototype._gesturestart=function(t){this._mousewheelZoom&&!this._stopChartHandlers(t)&&(this._gestureDistance=t.distance,this._unsetActivePoint(),this.surface.suspendTracking())},L.prototype._gestureend=function(t){this._zooming&&!this._stopChartHandlers(t)&&(this.surface&&this.surface.resumeTracking(),this._zooming=!1,this.trigger(ur,{}))},L.prototype._gesturechange=function(t){var e,o,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,o={delta:e,axisRanges:xl(this._plotArea.axes),originalEvent:t},!this._zooming&&this.trigger("zoomStart",o)||(t=this._eventCoordinates(t),this._zooming||(this._zooming=!0),(o.axisRanges=i.updateRanges(e,t))&&!this.trigger(cr,o)&&i.zoom())))},L.prototype._mouseout=function(t){var e;t.element&&(e=this._drawingChartElement(t.element,t))&&e.leave&&e.leave(this,t.originalEvent)},L.prototype._start=function(t){var e=this._eventCoordinates(t);!this._stopChartHandlers(t)&&this._plotArea.backgroundContainsPoint(e)&&(this.requiresHandlers(["dragStart",pr,lr])&&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:xl(this._plotArea.axes),originalEvent:t}))},L.prototype._move=function(t){var e=this._navState,o=this._pannable;if(!this._stopChartHandlers(t)){if(o){var i=o.move(t);i&&!this.trigger(pr,{axisRanges:i,originalEvent:t})&&o.pan()}else if(e){for(var r={},n=e.axes,s=0;s<n.length;s++){var a,h=n[s];!h.options.name||0!=(a=(a=h.options.vertical?t.y:t.x).startLocation-a.location)&&(r[h.options.name]=h.translateRange(a))}e.axisRanges=r,this.trigger(pr,{axisRanges:r,originalEvent:t})}this._zoomSelection&&this._zoomSelection.move(t)}},L.prototype._end=function(t){var e;this._stopChartHandlers(t)||((e=this._pannable)&&e.end(t)?(this.surface.resumeTracking(),this.trigger(lr,{axisRanges:xl(this._plotArea.axes),originalEvent:t}),this._suppressHover=!1,this.chartService.panning=!1):this._endNavigation(t,lr),this._zoomSelection&&(e=this._zoomSelection.end(t))&&!this.trigger(cr,{axisRanges:e,originalEvent:t})&&(this._zoomSelection.zoom(),this.trigger(ur,{axisRanges:e,originalEvent:t})))},L.prototype._stopChartHandlers=function(t){var e=this._selections||[];if(!e.length)return!1;var t=this._eventCoordinates(t),o=this._plotArea.paneByPoint(t);if(o)for(var i=0;i<e.length;i++)if(e[i].onPane(o))return!0},L.prototype._mousewheelZoomRate=function(){var t=(this.options.zoomable||{}).mousewheel||{};return O(t.rate,.3)},L.prototype._mousewheel=function(t){var e=this,o=At(t),i=this._mousewheelZoom,r=this._eventCoordinates(t);if(!this._stopChartHandlers(t)&&this._plotArea.backgroundContainsPoint(r))if(i){var n={delta:o,axisRanges:xl(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=i.updateRanges(o,r),n.axisRanges&&!this.trigger(cr,n)&&i.zoom(),this._mwTimeout=setTimeout(function(){e.trigger(ur,n),e._zooming=!1,e.surface&&e.surface.resumeTracking()},150))}else{i=this._navState;if(i=i||this._startNavigation(t,r,"zoomStart")?i:this._navState){var s=i.totalDelta||o;i.totalDelta=s+o;for(var a=this._navState.axes,h={},p=0;p<a.length;p++){var l=a[p],c=l.options.name;c&&(h[c]=l.scaleRange(-s*this._mousewheelZoomRate(),r))}this.trigger(cr,{delta:o,axisRanges:h,originalEvent:t}),this._mwTimeout&&clearTimeout(this._mwTimeout),this._mwTimeout=setTimeout(function(){e._endNavigation(t,ur)},150)}}},L.prototype._startNavigation=function(t,e,o){var i,r=this._model._plotArea,e=r.findPointPane(e),r=r.axes.slice(0);e&&(i=xl(r),this.trigger(o,{axisRanges:i,originalEvent:t})?this._cancelDomEvents():(this._suppressHover=!0,this._unsetActivePoint(),this._navState={axisRanges:i,pane:e,axes:r}))},L.prototype._endNavigation=function(t,e){this._navState&&(this.trigger(e,{axisRanges:this._navState.axisRanges,originalEvent:t}),this._suppressHover=!1,this._navState=null)},L.prototype._getChartElement=function(t,e){var o=this.surface.eventTarget(t);if(o)return this._drawingChartElement(o,t,e)},L.prototype._drawingChartElement=function(t,e,o){for(var i,r=t;r&&!i;)i=r.chartElement,r=r.parent;if(i)return i.aliasFor&&(i=i.aliasFor(e,this._eventCoordinates(e))),i=o&&(i=i.closest(o))&&i.aliasFor?i.aliasFor():i},L.prototype._eventCoordinates=function(t){t=Et(t);return this._toModelCoordinates(t.x,t.y)},L.prototype._elementPadding=function(){var t,e;return this._padding||(t=(e=pt(this.element,["paddingLeft","paddingTop"])).paddingLeft,e=e.paddingTop,this._padding={top:e,left:t}),this._padding},L.prototype._toDocumentCoordinates=function(t){var e=this._elementPadding(),o=Bt(this.element);return{left:M(t.x+e.left+o.left),top:M(t.y+e.top+o.top)}},L.prototype._toModelCoordinates=function(t,e){var o=this.element,i=Bt(o),r=this._elementPadding(),o=Xt(o).invert(),t=new b.geometry.Point(t-i.left-r.left,e-i.top-r.top).transform(o);return new B(t.x,t.y)},L.prototype._tap=function(t){var e=this,o=this.surface.eventTarget(t),i=this._drawingChartElement(o,t),r=this._sharedTooltip();this._startHover(o,t)||r||this._unsetActivePoint(),r&&this._trackSharedTooltip(this._eventCoordinates(t),t,!0),this._propagateClick(i,t),this.handlingTap=!0,setTimeout(function(){e.handlingTap=!1},0)},L.prototype._click=function(t){var e=this._getChartElement(t);this._propagateClick(e,t)},L.prototype._propagateClick=function(t,e){for(var o=t;o;)o.click&&o.click(this,e),o=o.parent},L.prototype._startHover=function(t,e){if(this._suppressHover)return!1;var t=this._drawingChartElement(t,e,function(t){return(t.hover||t.over)&&!(t instanceof Us)}),o=this._activePoint,i=1<this._plotArea.series.length,r=this._hasInactiveOpacity();return this._updateHoveredPoint(t,e),t&&o!==t&&t.hover?(this._activePoint=t,this._sharedTooltip()||t.hover(this,e)||(this._displayTooltip(t),r?this._displayInactiveOpacity(t,i):this._highlight.show(t))):!t&&r&&(i&&this._activeChartInstance&&(this._updateSeriesOpacity(t,!0),this._applySeriesOpacity(this._activeChartInstance.children,null,!0),this._activeChartInstance=null),this._highlight&&this._highlight.hide(),this._activePoint=null),t},L.prototype._displayTooltip=function(t){x({},this.options.tooltip,t.options.tooltip).visible&&this._tooltip.show(t)},L.prototype._displayInactiveOpacity=function(t,e,o){var i=this._activeChartInstance=this._chartInstanceFromPoint(t);i&&(e?(this._updateSeriesOpacity(t),this._applySeriesOpacity(i.children,null,!0),this._applySeriesOpacity(i.children,t.series),this._highlight.show(o||t)):i.supportsPointInactiveOpacity()?(e=this._getInactivePoints(t,i))&&e.length&&this._highlight.show(e,1-this._getInactiveOpacityForSeries(t.series)):this._highlight.show(t))},L.prototype._getInactivePoints=function(e,t){return this._getAllPointsOfType(t,e.constructor).filter(function(t){return t!==e})},L.prototype._getAllPointsOfType=function(t,e){for(var o=[],i=0;i<t.children.length;i++){var r=t.children[i];r.constructor===e?o.push(r):r.children&&r.children.length&&(o=o.concat(this._getAllPointsOfType(r,e)))}return o},L.prototype._updateHoveredPoint=function(t,e){var o=this._hoveredPoint;o&&o!==t&&(o.out(this,e),this._hoveredPoint=null),t&&o!==t&&t.over&&(this._hoveredPoint=t).over(this,e)},L.prototype._updateSeriesOpacity=function(t,e){for(var o=this._plotArea,i=o.series.length,r=0;r<i;r++){var n=o.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))}},L.prototype._applySeriesOpacity=function(t,e,o,i){for(var r=0;r<t.length;r++){var n,s=t[r],a=s.series||i;a&&(a.highlight||{}).visible&&s.visual&&(n=(i||s.series).opacity,a===e&&!o||s.visual.opacity(o?1:n)),s.children&&s.children.length&&this._applySeriesOpacity(s.children,e,o,s.series)}},L.prototype._chartInstanceFromPoint=function(t){for(var e=t.parent;e&&!e.plotArea;)e=e.parent;return e},L.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},L.prototype._getInactiveOpacityForSeries=function(t){var e=this.options.seriesDefaults.highlight.inactiveOpacity;return t.highlight.inactiveOpacity||e||t.opacity||1},L.prototype._getDefaultOpacityForSeries=function(t){return t.defaultOpacity||t.opacity||1},L.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),Mt(document,((t={}).mousemove=this._mouseMoveTrackHandler,t)))},L.prototype._mouseMoveTracking=function(t){var e=this.options,o=this._tooltip,i=this._highlight,r=this._activePoint,n=this._eventCoordinates(t);this._plotArea.box.containsPoint(n)?r&&r.tooltipTracking&&r.series&&r.parent.getNearestPoint&&(n=r.parent.getNearestPoint(n.x,n.y,r.seriesIx))&&n!==r&&!(this._activePoint=n).hover(this,t)&&(x({},e.tooltip,n.options.tooltip).visible&&o.show(n),i.show(n)):(Dt(document,((r={}).mousemove=this._mouseMoveTrackHandler,r)),this._unsetActivePoint(),this._mouseMoveTrackHandler=null)},L.prototype._mousemove=function(t){var e,o=this._eventCoordinates(t),i=this._plotArea;this._trackCrosshairs(o),i.hover&&((e=i.backgroundContainsPoint(o))?(i.hovered=!0,this._plotArea.hover(this,t)):i.hovered&&!e&&(this.trigger("plotAreaLeave"),i.hovered=!1)),this._sharedTooltip()&&this._trackSharedTooltip(o,t)},L.prototype._trackCrosshairs=function(t){for(var e=this._plotArea.crosshairs,o=0;o<e.length;o++){var i=e[o];i.box.containsPoint(t)?i.showAt(t):i.hide()}},L.prototype._trackSharedTooltip=function(t,e,o){var i,r,n,s,a,h,p;this._suppressHover||(i=this.options.tooltip,a=this._plotArea,s=this._plotArea.categoryAxis,r=this._tooltip,n=this._highlight,a.backgroundContainsPoint(t)?(s=s.pointCategoryIndex(t))!==this._tooltipCategoryIx||!this._sharedHighlight&&o?((p=(h=(a=a.pointsByCategoryIndex(s)).map(function(t){return t.eventArgs(e)}))[0]||{}).categoryPoints=h,0<a.length&&!this.trigger("seriesHover",p)?(i.visible&&r.showAt(a,t),n.show(a),this._sharedHighlight=!0):r.hide(),this._tooltipCategoryIx=s):o&&this._sharedHighlight&&(n.hide(),r.hide(),this._sharedHighlight=!1):this._sharedHighlight&&(n.hide(),r.hide(),this._tooltipCategoryIx=null,this._sharedHighlight=!1))},L.prototype.hideElements=function(t){var e=this._plotArea;this._mousemove.cancel(),e.hideCrosshairs(),this._unsetActivePoint(t)},L.prototype._unsetActivePoint=function(t){var e=this._tooltip,o=this._highlight;this._activePoint=null,this._hoveredPoint=null,!e||t&&t.keepTooltipOpen||e.hide(),this._tooltipCategoryIx=null,this._sharedHighlight=!1,o&&o.hide()},L.prototype._deferRedraw=function(){this._redraw()},L.prototype._clearRedrawTimeout=function(){this._redrawTimeout&&(clearInterval(this._redrawTimeout),this._redrawTimeout=null)},L.prototype.bindCategories=function(){for(var t=this.options,e=[].concat(t.categoryAxis),o=0;o<e.length;o++){var i=e[o];!1!==i.autoBind&&this.bindCategoryAxisFromSeries(i,o)}},L.prototype.bindCategoryAxisFromSeries=function(t,e){for(var o,i,r=this.options.series,n=r.length,s=new _t,a=[],h=!1,p=0;p<n;p++){var l=r[p],c=l.categoryAxis===t.name||!l.categoryAxis&&0===e,u=l.data,d=u.length,c=l.categoryField&&c,h=c||h;if(c&&0<d)for(var f=(o=Bs(t,Wi(l.categoryField,u[0])))?Os:Wi,g=0;g<d;g++){var y=u[g],v=f(l.categoryField,y,this.chartService.intl);!o&&s.get(v)||(a.push([v,y]),o||s.set(v,!0))}}0<a.length?(i=function(t){for(var e=t.length,o=[],i=0;i<e;i++)for(var r=t[i],n=r.length,s=0;s<n;s++)o[s]=o[s]||[],o[s].push(r[s]);return o}(a=o?function(t){for(var e=function(t,e){void 0===e&&(e=Lo);for(var o=1,i=t.length;o<i;o++)if(e(t[o],t[o-1])<0){t.sort(e);break}return t}(a,t=void 0===t?Lo:t),o=e.length,i=0<o?[e[0]]:[],r=1;r<o;r++)0!==t(e[r],zt(i))&&i.push(e[r]);return i}(function(t,e){return Lo(t[0],e[0])}):a),t.categories=i[0]):h&&(t.categories=[])},L.prototype._isBindable=function(t){for(var e=Qi.current.valueFields(t),o=!0,i=0;i<e.length;i++){var r=e[i];if(r===Y?r="field":r+="Field",!T(t[r])){o=!1;break}}return o},L.prototype._noTransitionsRedraw=function(){var t,e=this.options;!1!==e.transitions&&(t=!(e.transitions=!1)),this._redraw(),t&&(e.transitions=!0)},L.prototype._legendItemHover=function(e,o){var t=this._plotArea,i=this._highlight,r=(t.srcSeries||t.series)[e],n=u(r.type,[sr,"donut","funnel"])?t.findPoint(function(t){return t.series.index===e&&t.index===o}):t.pointsBySeriesIndex(e);this._hasInactiveOpacity()&&r.visible&&n?(r=1<t.series.length,t=n.length?n[0]:n,this._displayInactiveOpacity(t,r,n)):i.show(n)},L.prototype._shouldAttachMouseMove=function(){return this._plotArea.crosshairs.length||this._tooltip&&this._sharedTooltip()||this.requiresHandlers(["plotAreaHover","plotAreaLeave"])},L.prototype.updateMouseMoveHandler=function(){var t;Dt(this.element,((t={}).mousemove=this._mousemove,t)),this._shouldAttachMouseMove()&&Mt(this.element,((t={}).mousemove=this._mousemove,t))},L.prototype.applyOptions=function(t,e){bl(this._originalOptions,t),this._originalOptions=x(this._originalOptions,t),this.options=x({},this._originalOptions),e&&(this._theme=e,this.chartService.theme=e),this._initTheme(this.options,this._theme),this._toggleDragZoomEvents()},L.prototype.setOptions=function(t,e){this.applyOptions(t,e),this.bindCategories(),this.redraw(),this.updateMouseMoveHandler()},L.prototype.setDirection=function(t){this.chartService.rtl=Boolean(t),this.surface&&"svg"===this.surface.type&&this._destroySurface()},L.prototype.setIntlService=function(t){this.chartService.intl=t},L.prototype.noTransitionsRedraw=function(){this._noTransitionsRedraw()},L.prototype.destroy=function(){var t;this._destroyed=!0,Dt(this.element,((t={}).contextmenu=this._clickHandler,t[dr]=this._mousewheelHandler,t.mousemove=this._mousemove,t.mouseleave=this._mouseleaveHandler,t)),this.domEvents&&(this.domEvents.destroy(),delete this.domEvents),this._mouseMoveTrackHandler&&Dt(document,((t={}).mousemove=this._mouseMoveTrackHandler,t)),this._destroyView(),this._destroySurface(),this._clearRedrawTimeout()},L.prototype._destroySurface=function(){var t=this.surface;t&&(t.unbind("mouseenter",this._surfaceMouseenterHandler),t.unbind("mouseleave",this._surfaceMouseleaveHandler),t.destroy(),this.surface=null)},L.prototype._destroySelections=function(){var t=this._selections;if(t)for(;0<t.length;)t.shift().destroy()},L.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)},L);function L(t,e,o,i){var r=this,i=(void 0===i&&(i={}),fl.call(this),this.observers=[],this.addObserver(i.observer),this.chartService=new ro(this,i),this.chartService.theme=o,this._initElement(t),x({},this.options,e));this._originalOptions=x({},i),this._theme=o,this._initTheme(i,o),this._initHandlers(),this._initSurface(),this.bindCategories(),Ht.preloadFonts(e,function(){r.fontLoaded=!0,r._destroyed||(r.trigger("init"),r._redraw(),r._attachEvents())})}function vl(t,e){if(t)for(var o=0;o<t.length;o++)if(t[o].category===e)return[t[o]]}function ml(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 xl(t){for(var e={},o=0;o<t.length;o++){var i=t[o],r=i.options.name;r&&(e[r]=i.range())}return e}var _l=["data","categories"];function bl(t,e){for(var o in e){var i,r,n;!u(o,_l)&&e.hasOwnProperty(o)&&(i=e[o],r=t[o],T(r)&&((n=null===i)||!T(i)?(delete t[o],n&&delete e[o]):r&&st(i)&&st(r)&&bl(r,i)))}}function wl(t){for(var e=0;e<t.length;e++)t[e].notifyRender()}i(c,{renderAs:"",chartArea:{},legend:{visible:!0,labels:{}},categoryAxis:{},seriesDefaults:{type:rr,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 Cl,Sl=c,kl=((Cl=bh)&&(Pl.__proto__=Cl),((Pl.prototype=Object.create(Cl&&Cl.prototype)).constructor=Pl).prototype._slotAnchor=function(t,e){var o=this.plotArea.categoryAxis.options.vertical,i=o?{horizontal:"left",vertical:"center"}:{horizontal:"center",vertical:"bottom"};return{point:o?new B(this.plotArea.box.x2,e.center().y):new B(e.center().x,-2),align:i}},Pl.prototype._defaultAnchor=function(t,e){return this._slotAnchor({},e)},Pl),Al=[ir,"bullet"];function Pl(){Cl.apply(this,arguments)}function Tl(t){for(var e=[],o=0;o<t.length;o++){var i=t[o];e[o]=i.style.display,i.style.display="none"}return e}function Ml(t,e){for(var o=0;o<t.length;o++)t[o].style.display=e[o]}function Ol(t){return m(t)?[t]:t}(Bl=Sl)&&(Rl.__proto__=Bl),((Rl.prototype=Object.create(Bl&&Bl.prototype)).constructor=Rl).prototype._setElementClass=function(t){Q(t,"k-sparkline")},Rl.prototype._initElement=function(t){Bl.prototype._initElement.call(this,t),this._initialWidth=Math.floor(Rt(t).width)},Rl.prototype._resize=function(){var t=this.element,e=Tl(t.childNodes);this._initialWidth=Math.floor(Rt(t).width),Ml(t.childNodes,e),Bl.prototype._resize.call(this)},Rl.prototype._modelOptions=function(){var t=this.options,e=this._surfaceWrap(),o=Tl(e.childNodes),i=document.createElement("span"),t=(i.innerHTML=" ",e.appendChild(i),x({width:this._autoWidth,height:Rt(e).height,transitions:t.transitions},t.chartArea,{inline:!0,align:!1}));return Rt(e,{width:t.width,height:t.height}),e.removeChild(i),Ml(e.childNodes,o),this.surface&&this.surface.resize(),t},Rl.prototype._surfaceWrap=function(){var t;return this.stage||(t=this.stage=document.createElement("span"),this.element.appendChild(t)),this.stage},Rl.prototype._createPlotArea=function(t){t=Bl.prototype._createPlotArea.call(this,t);return this._autoWidth=this._initialWidth||this._calculateWidth(t),t},Rl.prototype._calculateWidth=function(t){for(var e=this.options,o=P(e.chartArea.margin),i=t.charts,r=this._surfaceWrap(),n=0,s=0;s<i.length;s++){var a=i[s],h=(a.options.series||[])[0];if(h){if(h.type===ir)return 150;if("bullet"===h.type)return 150;if(h.type===sr)return Rt(r).height;var p=a.categoryAxis;p&&(p=p.categoriesCount()*(!a.options.isStacked&&u(h.type,[rr,"verticalBullet"])?a.seriesOptions.length:1),n=Math.max(n,p))}}t=n*e.pointWidth;return 0<t&&(t+=o.left+o.right),t},Rl.prototype._createSharedTooltip=function(t){return new kl(this._plotArea,t)},Rl.normalizeOptions=function(t){t=Ol(t);return(t=Z(t)?{seriesDefaults:{data:t}}:x({},t)).series||(t.series=[{data:Ol(t.data)}]),x(t,{seriesDefaults:{type:t.type}}),t=u(t.series[0].type,Al)||u(t.seriesDefaults.type,Al)?x({},{categoryAxis:{crosshair:{visible:!1}}},t):t};var Bl,h=Rl;function Rl(){Bl.apply(this,arguments)}i(h,{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 El,Ll=h,Il=((El=b.drawing.Animation)&&(zl.__proto__=El),((zl.prototype=Object.create(El&&El.prototype)).constructor=zl).prototype.setup=function(){this._initialOpacity=parseFloat(pt(this.element,"opacity").opacity)},zl.prototype.step=function(t){pt(this.element,{opacity:String(bt(this._initialOpacity,0,t))})},zl.prototype.abort=function(){El.prototype.abort.call(this),pt(this.element,{display:"none",opacity:String(this._initialOpacity)})},zl.prototype.cancel=function(){El.prototype.abort.call(this),pt(this.element,{opacity:String(this._initialOpacity)})},zl);function zl(){El.apply(this,arguments)}function Vl(t,e){var o=document.createElement("div");return o.className=t,e&&(o.style.cssText=e),o}(jl=b.Class)&&(Dl.__proto__=jl),((Dl.prototype=Object.create(jl&&jl.prototype)).constructor=Dl).prototype.createElements=function(){var t=this.element=Vl("k-navigator-hint","display: none; position: absolute; top: 1px; left: 1px;"),e=this.tooltip=Vl("k-tooltip k-chart-tooltip"),o=this.scroll=Vl("k-scroll");e.innerHTML=" ",t.appendChild(e),t.appendChild(o)},Dl.prototype.show=function(t,e,o){var i=this.element,r=this.options,n=this.scroll,s=this.tooltip,a=Mo(zo(t)+zo(e-t)/2),h=.4*o.width(),p=o.center().x-h,l=(o.center().x-p)/(r.max-r.min),a=a-r.min,c=this.chartService.intl.format(r.format,t,e),r=dt(r),r=(this.clearHideTimeout(),this._visible||(pt(i,{visibility:"hidden",display:"block"}),this._visible=!0),r&&(c=r({from:t,to:e})),s.innerHTML=c,pt(s,{left:o.center().x-s.offsetWidth/2,top:o.y1}),pt(s,["marginTop","borderTopWidth","height"]));pt(n,{width:h,left:p+a*l,top:o.y1+r.marginTop+r.borderTopWidth+r.height/2}),pt(i,{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 Il(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};var jl,Er=Dl;function Dl(t,e,o){jl.call(this),this.options=x({},this.options,o),this.container=t,this.chartService=e;o=pt(t,["paddingLeft","paddingTop"]);this.chartPadding={top:o.paddingTop,left:o.paddingLeft},this.createElements(),t.appendChild(this.element)}i(Er,{format:"{0:d} - {1:d}",hideDelay:500});var Hl=Er,Ul="_navigator",Fl=Ul;function Nl(){}(Wl=b.Class)&&(Yl.__proto__=Wl),((Yl.prototype=Object.create(Wl&&Wl.prototype)).constructor=Yl).prototype.parseDate=function(t){return Uo(this.chart.chartService.intl,t)},Yl.prototype.clean=function(){this.selection&&(this.selection.destroy(),this.selection=null),this.hint&&(this.hint.destroy(),this.hint=null)},Yl.prototype.destroy=function(){this.chart&&(this.chart.removeObserver(this.chartObserver),delete this.chart),this.clean()},Yl.prototype.redraw=function(){this._redrawSelf(),this.initSelection()},Yl.prototype.initSelection=function(){var t=this.chart,e=this.options,o=this.mainAxis(),i=o.roundedRange(),r=i.min,i=i.max,n=e.select,s=n.from,a=n.to,n=n.mousewheel,h=(Nl.prototype=o,new Nl);0!==o.categoriesCount()&&(this.clean(),h.box=o.box,this.selection=new yh(t,h,{min:r,max:i,from:s||r,to:a||i,mousewheel:O(n,{zoom:"left"}),visible:e.visible},new Ct(this,{selectStart:"_selectStart",select:"_select",selectEnd:"_selectEnd"})),e.hint.visible&&(this.hint=new Hl(t.element,t.chartService,{min:r,max:i,template:dt(e.hint),format:e.hint.format})))},Yl.prototype.setRange=function(){var t=this.chart._createPlotArea(!0).namedCategoryAxes[Fl].roundedRange(),e=t.min,t=t.max,o=this.options.select||{},i=o.from||e,r=o.to||t;this.options.select=x({},o,{from:i=i<e?e:i,to:r=t<r?t:r}),this.filterAxes()},Yl.prototype._redrawSelf=function(t){var e=this.chart._plotArea;e&&e.redraw(zt(e.panes),t)},Yl.prototype.redrawSlaves=function(){var t=this.chart,e=t._plotArea,o=e.panes.slice(0,-1);e.srcSeries=t.options.series,e.options.categoryAxis=t.options.categoryAxis,e.clearSeriesPointsCache(),e.redraw(o)},Yl.prototype._drag=function(t){var e=this.chart,o=this.selection,i=e._eventCoordinates(t.originalEvent),r=this.mainAxis(),n=r.roundedRange(),r=r.pane.box.containsPoint(i),i=e._plotArea.categoryAxis,e=t.axisRanges[i.options.name],t=this.options.select;e&&!r&&o&&(i=t.from&&t.to?zo(t.to)-zo(t.from):zo(o.options.to)-zo(o.options.from),r=Mo(_(zo(e.min),n.min,zo(n.max)-i)),t=Mo(_(zo(r)+i,zo(n.min)+i,n.max)),this.options.select={from:r,to:t},this.options.liveDrag&&(this.filterAxes(),this.redrawSlaves()),o.set(r,t),this.showHint(r,t))},Yl.prototype._dragEnd=function(){this.filterAxes(),this.filter(),this.redrawSlaves(),this.hint&&this.hint.hide()},Yl.prototype.readSelection=function(){var t=this.selection.options,e=t.from,t=t.to,o=this.options.select;o.from=e,o.to=t},Yl.prototype.filterAxes=function(){for(var t=this.options.select,e=this.chart.options.categoryAxis,o=(t=void 0===t?{}:t).from,i=t.to,r=0;r<e.length;r++){var n=e[r];n.pane!==Ul&&(n.min=o,n.max=i)}},Yl.prototype.filter=function(){var t,e,o=this.chart,i=this.options.select;o.requiresHandlers(["navigatorFilter"])&&(e=this.mainAxis(),t={from:i.from,to:i.to},"category"!==e.options.type&&(e=new Jo(x({baseUnit:"fit"},o.options.categoryAxis[0],{categories:[i.from,i.to]}),o.chartService).options,t.from=Bo(e.min,-e.baseUnitStep,e.baseUnit),t.to=Bo(e.max,e.baseUnitStep,e.baseUnit)),this.chart.trigger("navigatorFilter",t))},Yl.prototype._zoom=function(t){var e,o,i=this.chart._plotArea.categoryAxis,r=this.selection,n=this.options,s=n.select,n=n.liveDrag,a=this.mainAxis(),h=t.delta;r&&(e=a.categoryIndex(r.options.from),a=a.categoryIndex(r.options.to),o=this.chart._eventCoordinates(t.originalEvent),t.originalEvent.preventDefault(),1<Math.abs(h)&&(h*=3),1<a-e?(r.zoom(h,o),this.readSelection()):(i.options.min=s.from,s.from=i.scaleRange(-t.delta*this.chart._mousewheelZoomRate(),o).min),n&&(this.filterAxes(),this.redrawSlaves()),r.set(s.from,s.to),this.showHint(this.options.select.from,this.options.select.to))},Yl.prototype._zoomEnd=function(t){this._dragEnd(t)},Yl.prototype.showHint=function(t,e){var o=this.chart._plotArea;this.hint&&this.hint.show(t,e,o.backgroundBox())},Yl.prototype._selectStart=function(t){return this.chart._selectStart(t)},Yl.prototype._select=function(t){return this.showHint(t.from,t.to),this.chart._select(t)},Yl.prototype._selectEnd=function(t){return this.hint&&this.hint.hide(),this.readSelection(),this.filterAxes(),this.filter(),this.redrawSlaves(),this.chart._selectEnd(t)},Yl.prototype.mainAxis=function(){var t=this.chart._plotArea;if(t)return t.namedCategoryAxes[Fl]},Yl.prototype.select=function(t,e){var o=this.options.select;return t&&e&&(o.from=this.parseDate(t),o.to=this.parseDate(e),this.filterAxes(),this.filter(),this.redrawSlaves(),this.selection.set(t,e)),{from:o.from,to:o.to}},Yl.setup=function(t,e){var o,i,r;void 0===e&&(e={}),(t=void 0===t?{}:t).__navi||(t.__navi=!0,o=x({},e.navigator,t.navigator),i=t.panes=[].concat(t.panes),r=x({},o.pane,{name:Ul}),o.visible||(r.visible=!1,r.height=.1),i.push(r),Yl.attachAxes(t,o),Yl.attachSeries(t,o,e))},Yl.attachAxes=function(t,e){var o=e.series||[],i=t.categoryAxis=[].concat(t.categoryAxis),t=t.valueAxis=[].concat(t.valueAxis),o=0===Ms(o,hr).length,o=x({type:"date",pane:Ul,roundToBaseUnit:!o,justified:o,_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]}}),r=e.categoryAxis;i.push(x({},o,{maxDateGroups:200},r,{name:Fl,title:null,baseUnit:"fit",baseUnitStep:"auto",labels:{visible:!1},majorTicks:{visible:!1}}),x({},o,r,{name:Fl+"_labels",maxDateGroups:20,baseUnitStep:"auto",labels:{position:""},plotBands:[],autoBaseUnitSteps:{minutes:[]},_overlap:!0}),x({},o,r,{name:Fl+"_ticks",maxDateGroups:200,majorTicks:{width:.5},plotBands:[],title:null,labels:{visible:!1,mirror:!0},_overlap:!0})),t.push(x({name:Fl,pane:Ul,majorGridLines:{visible:!1},visible:!1},e.valueAxis))},Yl.attachSeries=function(t,e,o){for(var i=t.series=t.series||[],r=[].concat(e.series||[]),n=o.seriesColors,s=e.seriesDefaults,a=0;a<r.length;a++)i.push(x({color:n[a%n.length],categoryField:e.dateField,visibleInLegend:!1,tooltip:{visible:!1}},s,r[a],{axis:Fl,categoryAxis:Fl,autoBind:e.autoBindElements}))};var Gl,Wl,Xl=Yl,d=((Gl=Sl)&&(ql.__proto__=Gl),((ql.prototype=Object.create(Gl&&Gl.prototype)).constructor=ql).prototype.applyDefaults=function(t,e){var o=Rt(this.element).width||600,o={seriesDefaults:{categoryField:t.dateField},axisDefaults:{categoryAxis:{name:"default",majorGridLines:{visible:!1},labels:{step:2},majorTicks:{visible:!1},maxDateGroups:Math.floor(o/28)}}},e=e&&x({},e,o);Xl.setup(t,e),Gl.prototype.applyDefaults.call(this,t,e)},ql.prototype._setElementClass=function(t){Q(t,"k-chart k-stockchart")},ql.prototype.setOptions=function(t){this.destroyNavigator(),Gl.prototype.setOptions.call(this,t)},ql.prototype.noTransitionsRedraw=function(){var t=this.options.transitions;this.options.transitions=!1,this._fullRedraw(),this.options.transitions=t},ql.prototype._resize=function(){this.noTransitionsRedraw()},ql.prototype._redraw=function(){var t=this.navigator;!this._dirty()&&t&&t.options.partialRedraw?t.redrawSlaves():this._fullRedraw()},ql.prototype._dirty=function(){var t=this.options,t=vt([].concat(t.series,t.navigator.series),function(t){return t&&t.visible}).length,e=this._seriesCount!==t;return this._seriesCount=t,e},ql.prototype._fullRedraw=function(){var t=this.navigator;t||(t=this.navigator=new Xl(this),this.trigger("navigatorCreated",{navigator:t})),t.clean(),t.setRange(),Gl.prototype._redraw.call(this),t.initSelection()},ql.prototype._trackSharedTooltip=function(t){var e=this._plotArea.paneByPoint(t);e&&e.options.name===Ul?this._unsetActivePoint():Gl.prototype._trackSharedTooltip.call(this,t)},ql.prototype.bindCategories=function(){Gl.prototype.bindCategories.call(this),this.copyNavigatorCategories()},ql.prototype.copyNavigatorCategories=function(){for(var t,e=[].concat(this.options.categoryAxis),o=0;o<e.length;o++){var i=e[o];i.name===Fl?t=i.categories:t&&i.pane===Ul&&(i.categories=t)}},ql.prototype.destroyNavigator=function(){this.navigator&&(this.navigator.destroy(),this.navigator=null)},ql.prototype.destroy=function(){this.destroyNavigator(),Gl.prototype.destroy.call(this)},ql.prototype._stopChartHandlers=function(t){var e=this._eventCoordinates(t),e=this._plotArea.paneByPoint(e);return Gl.prototype._stopChartHandlers.call(this,t)||e&&e.options.name===Ul},ql.prototype._toggleDragZoomEvents=function(){this._dragZoomEnabled||(this.element.style.touchAction="none",this._dragZoomEnabled=!0)},ql);function ql(){Gl.apply(this,arguments)}function Yl(t){Wl.call(this),this.chart=t;var e=this.options=x({},this.options,t.options.navigator),o=e.select;o&&(o.from=this.parseDate(o.from),o.to=this.parseDate(o.to)),T(e.hint.visible)||(e.hint.visible=e.visible),this.chartObserver=new Ct(this,((o={})[pr]="_drag",o[lr]="_dragEnd",o[cr]="_zoom",o[ur]="_zoomEnd",o)),t.addObserver(this.chartObserver)}i(d,{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 Zl=d,Ql=Math.PI/180;function Kl(t,e){var o=t.getOrigin(),i=t.getSize(),e=P(e);return t.setOrigin([o.x-e.left,o.y-e.top]),t.setSize([i.width+(e.left+e.right),i.height+(e.top+e.bottom)]),t}var $l=b.drawing.Group,Jl=b.drawing.Path,tc=b.drawing.Text;function ec(t,e){var o=t.box,i=t.children[0].box,r=e.border||{},n=e.background||"",o=Jl.fromRect(new b.geometry.Rect([o.x1,o.y1],[o.width(),o.height()]),{stroke:{}}),t=new tc(t.text,new b.geometry.Point(i.x1,i.y1),{font:e.font,fill:{color:e.color}}),i=Kl(t.bbox().clone(),e.padding),e=Jl.fromRect(i,{stroke:{color:r.width?r.color:"",width:r.width,opacity:r.opacity,dashType:r.dashType,lineJoin:"round",lineCap:"round"},fill:{color:n}}),i=new $l;return i.append(o),i.append(e),i.append(t),i}function oc(t,e,o){var i=T(t.from)?t.from:W,r=T(t.to)?t.to:G;return t.from=Math.max(Math.min(r,i),e),t.to=Math.min(Math.max(r,i),o),t}function ic(t,e){e=P(e);return e.left=-e.left,e.top=-e.top,e.right=-e.right,e.bottom=-e.bottom,Kl(t,e)}var rc,nc=b.drawing.Path,sc=b.drawing.Surface,gl=((rc=b.Class)&&(ac.__proto__=rc),((ac.prototype=Object.create(rc&&rc.prototype)).constructor=ac).prototype.destroy=function(){this.surface&&(this.surface.destroy(),this.surface=null),delete this.element,delete this.surfaceElement},ac.prototype.value=function(t){var e=this.pointers[0];if(0===arguments.length)return e.value();e.value(t),this._setValueOptions(t)},ac.prototype._draw=function(){var t=this.surface;t.clear(),t.draw(this._visuals)},ac.prototype.exportVisual=function(){return this._visuals},ac.prototype.allValues=function(t){var e=this.pointers,o=[];if(0===arguments.length){for(var i=0;i<e.length;i++)o.push(e[i].value());return o}if(Z(t))for(var r=0;r<t.length;r++)m(t[r])&&e[r].value(t[r]);this._setValueOptions(t)},ac.prototype._setValueOptions=function(t){for(var e=[].concat(this.options.pointer),o=[].concat(t),i=0;i<o.length;i++)e[i].value=o[i]},ac.prototype.resize=function(){this.noTransitionsRedraw()},ac.prototype.noTransitionsRedraw=function(){var t=this.options.transitions;this._toggleTransitions(!1),this.redraw(),this._toggleTransitions(t)},ac.prototype.redraw=function(){var t=this._surfaceSize(),t=new b.geometry.Rect([0,0],[t.width,t.height]),t=(this._initSurface(),this.gaugeArea=this._createGaugeArea(),this._createModel(),ic(t.bbox(),this._gaugeAreaMargin));this.reflow(t)},ac.prototype.setOptions=function(t,e){this._originalOptions=x(this._originalOptions,t),this.options=x({},this._originalOptions),this._initTheme(e),this.redraw()},ac.prototype.setDirection=function(t){this.contextService.rtl=Boolean(t),this.surface&&"svg"===this.surface.type&&(this.surface.destroy(),this.surface=null)},ac.prototype.setIntlService=function(t){this.contextService.intl=t},ac.prototype._initTheme=function(t){var e=t||this.theme||{},t=(this.theme=e,this.options=x({},e,this.options),this.options),o=t.pointer;if(Z(o)){for(var i=[],r=0;r<o.length;r++)i.push(x({},e.pointer,o[r]));t.pointer=i}},ac.prototype._createGaugeArea=function(){var t=this.options.gaugeArea,e=this.surface.size(),o=t.border||{},e=new b.geometry.Rect([0,0],[e.width,e.height]);return this._gaugeAreaMargin=t.margin||5,0<o.width&&(e=ic(e,o.width)),nc.fromRect(e,{stroke:{color:o.width?o.color:"",width:o.width,dashType:o.dashType,lineJoin:"round",lineCap:"round"},fill:{color:t.background}})},ac.prototype._initSurface=function(){var t=this.options,e=this.surface,o=this._surfaceElement(),i=this._surfaceSize();Rt(o,i),e&&e.options.type===t.renderAs?(this.surface.clear(),this.surface.resize()):(e&&e.destroy(),this.surface=sc.create(o,{type:t.renderAs}))},ac.prototype._surfaceSize=function(){var t=this.options,e=this._getSize();return t.gaugeArea&&x(e,t.gaugeArea),e},ac.prototype._surfaceElement=function(){return this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.element.appendChild(this.surfaceElement)),this.surfaceElement},ac.prototype.getSize=function(){return this._getSize()},ac.prototype._getSize=function(){var t=this.element,e=this._defaultSize(),o=t.offsetWidth,t=t.offsetHeight;return{width:o=o||e.width,height:t=t||e.height}},ac.prototype._defaultSize=function(){return{width:200,height:200}},ac.prototype._toggleTransitions=function(t){this.options.transitions=t;for(var e=0;e<this.pointers.length;e++)this.pointers[e].options.animation.transitions=t},ac);function ac(t,e,o,i){void 0===i&&(i={}),rc.call(this),this.element=t,this.theme=o,this.contextService=new ro(this,i),this._originalOptions=x({},this.options,e),this.options=x({},this._originalOptions),this._initTheme(o),this.redraw()}i(gl,{plotArea:{},theme:"default",renderAs:"",pointer:{},scale:{},gaugeArea:{}});var hc=gl,pc=b.drawing.Path,lc=b.drawing.Group,cc=b.geometry.Point;function uc(t,e,o,i){var r,n,s,a,h,p,l=e.length;if(i.visible)for(var c=o.mirror,u=o.lineBox,d=i.skip;d<l;d+=i.step)d%i.skipUnit!=0&&(o.tickX=c?u.x2:u.x2-i.size,o.tickY=c?u.y1-i.size:u.y1,o.position=e[d],t.append((n=i,p=h=a=s=void 0,a=(r=o).position,h=o.tickX,p=o.tickY,r=o.vertical?(s=new cc(h,a),new cc(h+n.size,a)):(s=new cc(a,p),new cc(a,p+n.size)),new pc({stroke:{color:n.color,width:n.width}}).moveTo(s).lineTo(r))))}(dc=hi)&&(fc.__proto__=dc),((fc.prototype=Object.create(dc&&dc.prototype)).constructor=fc).prototype.initUserOptions=function(t){t=x({},this.options,t);return(t=x({},t,{labels:{mirror:t.mirror}})).majorUnit=t.majorUnit||te(t.min,t.max),t},fc.prototype.initFields=function(){},fc.prototype.render=function(){var t=this.elements=new lc,e=this.renderLabels(),o=this.renderLine(),i=this.renderTicks(),r=this.renderRanges();return t.append(o,e,i,r),t},fc.prototype.renderRanges=function(){for(var t=this.options,e=t.min,o=t.max,i=t.vertical,r=t.labels.mirror,n=t.ranges||[],s=new lc,a=n.length,h=t.rangeSize||t.minorTicks.size/2,p=0;p<a;p++){var l=oc(n[p],e,o),c=this.getSlot(l.from,l.to),u=i?this.lineBox():c,c=i?c:this.lineBox();i?u.x1-=h*(r?-1:1):c.y2+=h*(r?-1:1),s.append(pc.fromRect(new b.geometry.Rect([u.x1,c.y1],[u.x2-u.x1,c.y2-c.y1]),{fill:{color:l.color,opacity:l.opacity},stroke:{}}))}return s},fc.prototype.renderLabels=function(){for(var t=this.labels,e=this.options,o=new lc,i=0;i<t.length;i++)o.append(ec(t[i],e.labels));return o},fc.prototype.renderLine=function(){var t=this.options.line,e=this.lineBox(),o=new lc;return 0<t.width&&t.visible&&((t=new pc({stroke:{color:t.color,dashType:t.dashType,width:t.width}})).moveTo(e.x1,e.y1).lineTo(e.x2,e.y2),o.append(t)),o},fc.prototype.renderTicks=function(){var t=new lc,e=this.options,o=e.majorTicks.visible?e.majorUnit:0,i={vertical:e.vertical,mirror:e.labels.mirror,lineBox:this.lineBox()};return uc(t,this.getMajorTickPositions(),i,e.majorTicks),uc(t,this.getMinorTickPositions(),i,x({},{skipUnit:o/e.minorUnit},e.minorTicks)),t};var dc,o=fc;function fc(t,e){t=t||{};!T(t.reverse)&&!1===t.vertical&&(e||{}).rtl&&(t=Object.assign({},t,{reverse:!0})),dc.call(this,0,1,t,e),this.options.minorUnit=this.options.minorUnit||this.options.majorUnit/10}i(o,{min:0,max:50,majorTicks:{size:15,align:"inside",color:D,width:.5,visible:!0},minorTicks:{size:10,align:"inside",color:D,width:.5,visible:!0},line:{width:.5},labels:{position:"inside",padding:2},mirror:!1,_alignLines:!1});var gc,yc=o,f=((gc=b.Class)&&(vc.__proto__=gc),((vc.prototype=Object.create(gc&&gc.prototype)).constructor=vc).prototype.value=function(t){var e=this.options,o=e.value;if(0===arguments.length)return o;var o=this.scale.options,i=o.min,o=o.max;e._oldValue=T(e._oldValue)?e.value:i,e.value=_(t,i,o),this.elements&&this.repaint()},vc);function vc(t,e){gc.call(this);var o=t.options,i=o.min,o=o.max,e=this.options=x({},this.options,e);e.fill=e.color,this.scale=t,T(e.value)?e.value=_(e.value,i,o):e.value=i}i(f,{color:D});var mc,c=f,h=((mc=c)&&(xc.__proto__=mc),((xc.prototype=Object.create(mc&&mc.prototype)).constructor=xc).prototype.reflow=function(){var t,e,o,i=this.options,r=this.scale,n=r.options,s=n.mirror,n=n.vertical,r=r.lineBox(),a=i.track.size||i.size,h=i.size/2,p=P(i.margin),p=n?p[s?"left":"right"]:p[s?"bottom":"top"],p=s?-p:p;n?(o=new R(r.x1+p,r.y1,r.x1+p,r.y2),s?o.x1-=a:o.x2+=a,"barPointer"!==i.shape&&(t=e=new R(r.x2+p,r.y1-h,r.x2+p,r.y2+h))):(o=new R(r.x1,r.y1-p,r.x2,r.y1-p),s?o.y2+=a:o.y1-=a,"barPointer"!==i.shape&&(t=e=new R(r.x1-h,r.y1-p,r.x2+h,r.y1-p))),this.trackBox=o,this.pointerRangeBox=e,this.box=t||o.clone().pad(i.border.width)},xc.prototype.getElementOptions=function(){var t=this.options;return{fill:{color:t.color,opacity:t.opacity},stroke:T(t.border)?{color:t.border.width?t.border.color||t.color:"",width:t.border.width,dashType:t.border.dashType,opacity:t.opacity}:null}},xc.prototype._margin=function(){var t=this.scale,e=this.options,t=t.options,o=t.mirror,t=t.vertical,e=P(e.margin);return t?e[o?"left":"right"]:e[o?"bottom":"top"]},xc);function xc(t,e){mc.call(this,t,e),this.options=x({track:{visible:T(e.track)}},this.options)}i(h,{shape:"barPointer",track:{border:{width:1}},color:D,border:{width:1},opacity:1,margin:P(3),animation:{type:"barPointer"},visible:!0});var _c,bc=h,Er=((_c=b.drawing.Animation)&&(wc.__proto__=_c),((wc.prototype=Object.create(_c&&_c.prototype)).constructor=wc).prototype.setup=function(){var t=this.options,e=t.margin,o=t.from,i=t.to,r=t.vertical,n=r?"x1":"y1",r=(t.mirror===r?(o[n]-=e,i[n]-=e):(o[n]+=e,i[n]+=e),this.fromScale=new b.geometry.Point(o.x1,o.y1)),n=this.toScale=new b.geometry.Point(i.x1,i.y1);0!==t.duration&&(t.duration=Math.max(r.distanceTo(n)/t.duration*1e3,1))},wc.prototype.step=function(t){var e=bt(this.fromScale.x,this.toScale.x,t),t=bt(this.fromScale.y,this.toScale.y,t);this.element.transform(b.geometry.transform().translate(e,t))},wc);function wc(){_c.apply(this,arguments)}i(Er,{easing:"linear",duration:250}),b.drawing.AnimationFactory.current.register("arrowPointer",Er);var Cc,Sc,kc=Er,Ac=b.geometry.Point,Pc=b.drawing.Path,Tc=((Sc=bc)&&(Oc.__proto__=Sc),((Oc.prototype=Object.create(Sc&&Sc.prototype)).constructor=Oc).prototype.pointerShape=function(){var t=this.scale,e=this.options.size,o=e/2,i=t.options.mirror?-1:1;return t.options.vertical?[new Ac(0,0-o),new Ac(0-i*e,0),new Ac(0,0+o)]:[new Ac(0-o,0),new Ac(0,0+i*e),new Ac(0+o,0)]},Oc.prototype.repaint=function(){var t=this.scale,e=this.options,t=new kc(this.elements,x(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()},Oc.prototype.render=function(){var t=this.scale,e=this.options,o=this.getElementOptions(),i=this.pointerShape(e.value),o=(e.animation.type="arrowPointer",new Pc({stroke:o.stroke,fill:o.fill}).moveTo(i[0]).lineTo(i[1]).lineTo(i[2]).close()),i=t.getSlot(e.value);return o.transform(b.geometry.transform().translate(i.x1,i.y1)),this.elements=o},Oc),d=((Cc=b.drawing.Animation)&&(Mc.__proto__=Cc),((Mc.prototype=Object.create(Cc&&Cc.prototype)).constructor=Mc).prototype.setup=function(){var t=this.options,e=this.axis=t.vertical?v:y,o=this.to=t.newPoints[0][e],e=this.from=t.oldPoints[0][e];0!==t.duration&&(t.duration=Math.max(Math.abs(o-e)/t.speed*1e3,1)),this._set(e)},Mc.prototype.step=function(t){t=bt(this.from,this.to,t);this._set(t)},Mc.prototype._set=function(t){var e="set"+this.axis.toUpperCase(),o=this.options.newPoints;o[0][e](t),o[1][e](t)},Mc);function Mc(){Cc.apply(this,arguments)}function Oc(t,e){Sc.call(this,t,e),T(this.options.size)||(this.options.size=.6*this.scale.options.majorTicks.size)}i(d,{easing:"linear",speed:250}),b.drawing.AnimationFactory.current.register("barPointer",d);var Bc,Rc,Ec=d,Lc=b.drawing.Group,Ic=b.drawing.Path,zc=((Rc=bc)&&(Dc.__proto__=Rc),((Dc.prototype=Object.create(Rc&&Rc.prototype)).constructor=Dc).prototype.pointerShape=function(t){var e=this.scale,o=this.options,i=e.options,r=i.mirror,i=i.vertical,r=r===i?-1:1,o=o.size*r,n=e.getSlot(e.options.min),e=e.getSlot(t),t=i?v:y,s=i?y:v,r=this._margin()*r,a=new b.geometry.Point,n=(a[t]=n[t+"1"],a[s]=n[s+"1"],new b.geometry.Point),t=(n[t]=e[t+"1"],n[s]=e[s+"1"],i?(a.translate(r,0),n.translate(r,0)):(a.translate(0,r),n.translate(0,r)),n.clone()),e=a.clone();return i?(t.translate(o,0),e.translate(o,0)):(t.translate(0,o),e.translate(0,o)),[a,n,t,e]},Dc.prototype.repaint=function(){var t=this.scale,e=this.options,o=this.pointerShape(e.value),i=this.pointerPath,r=this.pointerShape(e._oldValue),i=(i.moveTo(o[0]).lineTo(o[1]).lineTo(o[2]).lineTo(o[3]).close(),new Ec(i,x(e.animation,{reverse:t.options.reverse,vertical:t.options.vertical,oldPoints:[r[1],r[2]],newPoints:[o[1],o[2]]})));!1===e.animation.transitions&&(i.options.duration=0),i.setup(),i.play()},Dc.prototype.render=function(){var t=new Lc,e=this.getElementOptions(),e=(this.options.track.visible&&t.append(this.renderTrack()),this.pointerPath=new Ic({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||{},o=this.trackBox.clone().pad(e.width||0);return new Ic.fromRect(o.toRect(),{fill:{color:t.color,opacity:t.opacity},stroke:{color:e.width?e.color||t.color:"",width:e.width,dashType:e.dashType}})},Dc),Vc=b.drawing.Group,gl=((Bc=hc)&&(jc.__proto__=Bc),((jc.prototype=Object.create(Bc&&Bc.prototype)).constructor=jc).prototype.reflow=function(t){var e=this.pointers,o=t.origin.x,i=t.origin.y,o=new R(o,i,o+t.width(),i+t.height());this.scale.reflow(o),this._shrinkScaleWidth(o);for(var r=0;r<e.length;r++)e[r].reflow();this.bbox=this._getBox(o),this._alignElements(),this._shrinkElements(),this._buildVisual(),this._draw()},jc.prototype._buildVisual=function(){var t=new Vc,e=this.scale.render(),o=this.pointers;t.append(this.gaugeArea),t.append(e);for(var i=0;i<o.length;i++){var r=o[i];t.append(r.render()),r.value(r.options.value)}this._visuals=t},jc.prototype._createModel=function(){var t=this.options,e=this.scale=new yc(t.scale,this.contextService);this.pointers=[];for(var o=Z(o=t.pointer)?o:[o],i=0;i<o.length;i++){var r=x({},o[i],{animation:{transitions:t.transitions}}),n="arrow"===r.shape?Tc:zc;this.pointers.push(new n(e,r))}},jc.prototype._defaultSize=function(){var t=this.options.scale.vertical;return{width:t?60:200,height:t?200:60}},jc.prototype._getBox=function(t){for(var e,o=this.scale,i=this.pointers,r=t.center(),n=i[0].box.clone().wrap(o.box),s=0;s<i.length;s++)n.wrap(i[s].box.clone());return n=o.options.vertical?(e=n.width()/2,new R(r.x-e,t.y1,r.x+e,t.y2)):(e=n.height()/2,new R(t.x1,r.y-e,t.x2,r.y+e))},jc.prototype._alignElements=function(){for(var t,e=this.scale,o=this.pointers,i=e.box,r=o[0].box.clone().wrap(e.box),n=this.bbox,s=0;s<o.length;s++)r.wrap(o[s].box.clone());e.options.vertical?(t=n.center().x-r.center().x,e.reflow(new R(i.x1+t,n.y1,i.x2+t,n.y2))):(t=n.center().y-r.center().y,e.reflow(new R(i.x1,i.y1+t,i.x2,i.y2+t)));for(var a=0;a<o.length;a++)o[a].reflow(this.bbox)},jc.prototype._shrinkScaleWidth=function(t){var e,o=this.scale;o.options.vertical||0<(e=o.contentBox().width()-t.width())&&(o.box.shrink(e,0),o.box.alignTo(t,"center"),o.reflow(o.box))},jc.prototype._shrinkElements=function(){for(var t=this.scale,e=this.pointers,o=t.box.clone(),i=t.options.vertical?"y":"x",r=e[0].box,n=0;n<e.length;n++)r.wrap(e[n].box.clone());o[i+1]+=Math.max(o[i+1]-r[i+1],0),o[i+2]-=Math.max(r[i+2]-o[i+2],0),t.reflow(o);for(var s=0;s<e.length;s++)e[s].reflow(this.bbox)},jc);function jc(){Bc.apply(this,arguments)}function Dc(t,e){Rc.call(this,t,e),T(this.options.size)||(this.options.size=.3*this.scale.options.majorTicks.size)}i(gl,{transitions:!0,gaugeArea:{background:""},scale:{vertical:!0}});var Hc=gl,Uc=b.drawing.Arc,Fc=b.drawing.Path,Nc=b.drawing.Group;function Gc(t,e,o,i){var r=new Nc,n=t.center,s=t.getRadiusX();if(i.visible)for(var a=0;a<e.length;a++){var h=t.pointAt(e[a]),p=new b.geometry.Point(n.x+s-i.size,n.y).rotate(e[a],n);r.append(new Fc({stroke:{color:i.color,width:i.width}}).moveTo(h).lineTo(p))}return r}function Wc(t,e,o,i){return{from:t,to:e,color:o,opacity:i}}(Xc=hi)&&(qc.__proto__=Xc),((qc.prototype=Object.create(Xc&&Xc.prototype)).constructor=qc).prototype.initUserOptions=function(t){t=x({},this.options,t);return t.majorUnit=t.majorUnit||te(t.min,t.max),t.minorUnit=t.minorUnit||t.majorUnit/10,t},qc.prototype.initFields=function(){},qc.prototype.render=function(t,e){t=this.renderArc(t,e);this.bbox=t.bbox(),this.labelElements=this.renderLabels(),this.ticks=this.renderTicks(),this.ranges=this.renderRanges()},qc.prototype.reflow=function(t){var e=t.center(),t=Math.min(t.height(),t.width())/2;if(!T(this.bbox))return this.render(e,t);this.bbox=this.arc.bbox(),this.radius(this.arc.getRadiusX()),this.repositionRanges(),this.renderLabels()},qc.prototype.slotAngle=function(t){var e=this.options,o=e.min,i=e.max,r=e.reverse,n=e.startAngle,e=e.endAngle,s=e-n;return(r?e-(t-o)/(i-o)*s:(t-o)/(i-o)*s+n)+180},qc.prototype.hasRanges=function(){var t=this.options.ranges;return t&&t.length},qc.prototype.ticksSize=function(){var t=this.options,e=t.majorTicks,t=t.minorTicks,o=0;return e.visible&&(o=e.size),o=t.visible?Math.max(t.size,o):o},qc.prototype.labelsCount=function(){var t=Xc.prototype.labelsCount.call(this),e=this.options;return 360<=e.endAngle-e.startAngle&&e.max%e.majorUnit==0&&--t,t},qc.prototype.renderLabels=function(){var t=this.options,e=this.arc.clone(),o=e.getRadiusX(),i=this.tickAngles(e,t.majorUnit),r=t.rangeSize=t.rangeSize||.1*o,n=new Nc,s=.05*o,a=(T(t.rangeDistance)?s=t.rangeDistance:t.rangeDistance=s,t.labels),h="inside"===a.position,p=T(this.labelElements);h&&(o-=this.ticksSize(),this.hasRanges()&&!p&&(o-=r+s),e.setRadiusX(o).setRadiusY(o));for(var l=this.labels,c=l.length,r=P(a.padding),u=(r.left+r.right)/2,d=(r.top+r.bottom)/2,f=0;f<c;f++){var g=l[f],y=g.box.width()/2,v=g.box.height()/2,m=i[f],x=(m-180)*Ql,m=e.pointAt(m),_=m.x+Math.cos(x)*(y+u)*(h?1:-1),m=m.y+Math.sin(x)*(v+d)*(h?1:-1),x=(g.reflow(new R(_-y,m-v,_+y,m+v)),new b.geometry.Point(g.box.x1,g.box.y1)),_=void 0;p?(y=(_=this.labelElements.children[f]).bbox().origin,(m=_.transform()||b.geometry.transform()).translate(x.x-y.x,x.y-y.y),_.transform(m)):(_=ec(g,t.labels),n.append(_)),this.bbox=b.geometry.Rect.union(this.bbox,_.bbox())}return n},qc.prototype.repositionRanges=function(){var t=this.ranges.children;if(0<t.length){var e=this.options,o=e.rangeDistance,e=e.rangeSize,i=this.getRangeRadius();"inside"===this.options.labels.position&&(i+=e+o);for(var r=i+e/2,n=0;n<t.length;n++)t[n]._geometry.setRadiusX(r).setRadiusY(r);this.bbox=b.geometry.Rect.union(this.bbox,this.ranges.bbox())}},qc.prototype.renderRanges=function(){var t=this.rangeSegments(),e=t.length,o=new Nc;if(e){var i=this.options,r=i.rangeSize,n=i.reverse,i=i.rangeDistance,s=this.getRangeRadius();this.radius(this.radius()-r-i);for(var a=0;a<e;a++){var h=t[a],p=this.slotAngle(h[n?"to":"from"]),l=this.slotAngle(h[n?"from":"to"]);l-p!=0&&o.append(this.createRange(p,l,s,h))}}return o},qc.prototype.createRange=function(t,e,o,i){var r=this.options.rangeSize,o=new b.geometry.Arc(this.arc.center,{radiusX:o+r/2,radiusY:o+r/2,startAngle:t,endAngle:e});return new Uc(o,{stroke:{width:r,color:i.color,opacity:i.opacity,lineCap:i.lineCap}})},qc.prototype.rangeSegments=function(){var t=this.options,e=t.ranges||[],o=e.length,i=[];if(o){var r=t.min,n=t.max,s=t.rangePlaceholderColor;i.push(Wc(r,n,s));for(var a=0;a<o;a++)for(var h=oc(e[a],r,n),p=i.length,l=0;l<p;l++){var c=i[l];if(c.from<=h.from&&h.from<=c.to){i.push(Wc(h.from,h.to,h.color,h.opacity)),c.from<=h.to&&h.to<=c.to&&i.push(Wc(h.to,c.to,s,h.opacity)),c.to=h.from;break}}}return i},qc.prototype.getRangeRadius=function(){var t=this.arc,e=this.options,o=e.rangeSize,i=e.rangeDistance,r=e.majorTicks.size;return"outside"===e.labels.position?t.getRadiusX()-r-i-o:t.getRadiusX()-o},qc.prototype.renderArc=function(t,e){var o=this.options;return this.arc=new b.geometry.Arc(t,{radiusX:e,radiusY:e,startAngle:o.startAngle+180,endAngle:o.endAngle+180})},qc.prototype.renderTicks=function(){var t,e=this.arc,o=this.options,i=e.clone(),r=(this.majorTickAngles=this.tickAngles(e,o.majorUnit),this.majorTicks=Gc(i,this.majorTickAngles,o.majorUnit,o.majorTicks),new Nc),n=(r.append(this.majorTicks),o.majorTicks.size),s=o.minorTicks.size;return this._tickDifference=n-s,"outside"===o.labels.position&&(t=i.getRadiusX(),i.setRadiusX(t-n+s).setRadiusY(t-n+s)),this.minorTickAngles=this.normalizeTickAngles(this.tickAngles(e,o.minorUnit)),this.minorTicks=Gc(i,this.minorTickAngles,o.minorUnit,o.minorTicks),r.append(this.minorTicks),r},qc.prototype.normalizeTickAngles=function(t){for(var e=this.options,o=e.majorUnit/e.minorUnit,i=t.length-1;0<=i;i--)i%o==0&&t.splice(i,1);return t},qc.prototype.tickAngles=function(t,e){var o=this.options,i=o.reverse,r=o.max-o.min,n=t.endAngle-t.startAngle,s=r/e,a=t.startAngle,h=n/s;i&&(a+=n,h=-h),360<=n&&o.max%e==0&&--s;for(var p=[],l=0;l<s;l++)p.push(M(a,3)),a+=h;return M(a)<=t.endAngle&&p.push(a),p},qc.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)},qc.prototype.repositionTicks=function(t,e,o){var i=o&&this._tickDifference||0,r=this.arc,n=r.getRadiusX();o&&"outside"===this.options.labels.position&&0!==i&&(r=this.arc.clone()).setRadiusX(n-i).setRadiusY(n-i);for(var s=0;s<t.length;s++){var a=r.pointAt(e[s]),h=t[s].segments,p=a.x-h[0].anchor().x,a=a.y-h[0].anchor().y;t[s].transform((new b.geometry.transform).translate(p,a))}};var Xc,o=qc;function qc(t,e){Xc.call(this,0,1,t,e)}i(o,{min:0,max:100,majorTicks:{size:15,align:"inside",color:D,width:.5,visible:!0},minorTicks:{size:10,align:"inside",color:D,width:.5,visible:!0},startAngle:-30,endAngle:210,labels:{position:"inside",padding:2}});var Yc,Zc=o,f=((Yc=b.drawing.Animation)&&(Qc.__proto__=Yc),((Qc.prototype=Object.create(Yc&&Yc.prototype)).constructor=Qc).prototype.step=function(t){var e=this.options,t=bt(e.oldAngle,e.newAngle,t);this.element.transform(b.geometry.transform().rotate(t,e.center))},Qc);function Qc(t,e){Yc.call(this,t,e);t=this.options;t.duration=Math.max(Math.abs(t.newAngle-t.oldAngle)/t.duration*1e3,1)}i(f,{easing:"linear",duration:150}),b.drawing.AnimationFactory.current.register("radialPointer",f);var Kc,$c=f,Jc=b.drawing.Circle,tu=b.drawing.Group,eu=b.drawing.Path,h=((Kc=c)&&(ou.__proto__=Kc),((ou.prototype=Object.create(Kc&&Kc.prototype)).constructor=ou).prototype.setAngle=function(t){this.elements.transform(b.geometry.transform().rotate(t,this.center))},ou.prototype.repaint=function(){var t=this.scale,e=this.options,o=t.slotAngle(e._oldValue),t=t.slotAngle(e.value);!1===e.animation.transitions?this.setAngle(t):new $c(this.elements,x(e.animation,{oldAngle:o,newAngle:t})).play()},ou.prototype.render=function(){var t=this.scale,e=this.options,o=new tu;return!1!==e.animation&&x(e.animation,{startAngle:0,center:t.arc.center,reverse:t.options.reverse}),o.append(this._renderNeedle(),this._renderCap()),this.elements=o,this.setAngle(Ql),o},ou.prototype.reflow=function(t){var e=this.center=t.center,o=_(this.options.length||1,.1,1.5),t=this.radius=t.getRadiusX()*o,o=this.capSize=Math.round(t*this.options.cap.size);this.bbox=b.geometry.Rect.fromPoints(new b.geometry.Point(e.x-o,e.y-o),new b.geometry.Point(e.x+o,e.y+o))},ou.prototype._renderNeedle=function(){var t=this.scale.options.minorTicks.size,e=this.center,o=this.options.color,o=new eu({fill:{color:o},stroke:{color:o,width:.5}});return o.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(),o},ou.prototype._renderCap=function(){var t=this.options,t=t.cap.color||t.color,e=new b.geometry.Circle(this.center,this.capSize);return new Jc(e,{fill:{color:t},stroke:{color:t}})},ou);function ou(){Kc.apply(this,arguments)}i(h,{cap:{size:.05},arrow:{width:16,height:14},animation:{type:"radialPointer",duration:150}});var iu,ru=h,nu=b.drawing.Group,Er=((iu=hc)&&(su.__proto__=iu),((su.prototype=Object.create(iu&&iu.prototype)).constructor=su).prototype.reflow=function(t){var e=this.pointers;this.scale.reflow(t),this._initialPlotArea=this.scale.bbox;for(var o=0;o<e.length;o++)e[o].reflow(this.scale.arc),this._initialPlotArea=b.geometry.Rect.union(this._initialPlotArea,e[o].bbox);this.fitScale(t),this.alignScale(t),this._buildVisual(this.gaugeArea,e,this.scale),this._draw()},su.prototype._buildVisual=function(t,e,o){var i=this._visuals=new nu;i.append(t),i.append(o.ticks),i.append(o.ranges),this._buildPointers(e),i.append(o.labelElements)},su.prototype._buildPointers=function(t){for(var e=0;e<t.length;e++){var o=t[e];o.render(),this._visuals.append(o.elements),o.value(o.options.value)}},su.prototype.fitScale=function(t){for(var e,o,i,r,n,s=this.scale.arc,a=this._initialPlotArea,a=Math.abs(this.getDiff(a,t)),h=M(a,3),p=M(-a,3),l=0,c=0;!(!(c++<100)||5<(l=n===i?l+1:0)||h!==r&&0<=(e=this.getPlotBox(h,t,s))&&e<=2||p!==r&&0<=(i=this.getPlotBox(p,t,s))&&i<=2||(r=0<e&&0<i?2*h:e<0&&i<0?2*p:M((h+p)/2||1,3),0<=(o=this.getPlotBox(r,t,s))&&o<=2));)n=i,0<o?(p=r,i=o):(h=r,e=o)},su.prototype.getPlotBox=function(t,e,o){var i=this.scale,r=this.pointers,n=o.getRadiusX(),s=o.clone();s.setRadiusX(n+t).setRadiusY(n+t),i.arc=s,i.reflow(e),this.plotBbox=i.bbox;for(var a=0;a<r.length;a++)r[a].reflow(s),this.plotBbox=b.geometry.Rect.union(this.plotBbox,r[a].bbox);return this.getDiff(this.plotBbox,e)},su.prototype.getDiff=function(t,e){return Math.min(e.width()-t.width(),e.height()-t.height())},su.prototype.alignScale=function(t){var e=this.plotBbox.center(),o=t.center(),i=e.x-o.x,e=e.y-o.y,r=this.scale,n=this.pointers;r.arc.center.x-=i,r.arc.center.y-=e,r.reflow(t);for(var s=0;s<n.length;s++)n[s].reflow(r.arc),this.plotBbox=b.geometry.Rect.union(r.bbox,n[s].bbox)},su.prototype._createModel=function(){var t=this.options,e=t.pointer,o=this.scale=new Zc(t.scale,this.contextService);this.pointers=[];for(var i=Z(e)?e:[e],r=0;r<i.length;r++){var n=new ru(o,x({},i[r],{animation:{transitions:t.transitions}}));this.pointers.push(n)}},su);function su(){iu.apply(this,arguments)}i(Er,{transitions:!0,gaugeArea:{background:""}});var au,hu=Er,d=((au=Zc)&&(pu.__proto__=au),((pu.prototype=Object.create(au&&au.prototype)).constructor=pu).prototype.rangeSegments=function(){var t=this.options;return[{from:t.min,to:t.max,color:t.rangePlaceholderColor,lineCap:t.rangeLineCap}]},pu.prototype.hasRanges=function(){return!0},pu.prototype.placeholderRangeAngle=function(t){var e=this.ranges.children[0].geometry();this.options.reverse?e.setEndAngle(t):e.setStartAngle(t)},pu.prototype.addRange=function(t,e,o){var i=this.options.reverse,r=this.slotAngle(i?e:t),i=this.slotAngle(i?t:e),t=this.createRange(r,i,this.getRangeRadius(),o);return this.ranges.append(t),t},pu);function pu(){au.apply(this,arguments)}i(d,{min:0,max:100,majorTicks:{visible:!1},minorTicks:{visible:!1},labels:{visible:!1},startAngle:0,endAngle:180,rangeLineCap:"round"});var lu,cu=d,gl=((lu=b.drawing.Animation)&&(uu.__proto__=lu),((uu.prototype=Object.create(lu&&lu.prototype)).constructor=uu).prototype.step=function(t){var e,o=this.options,i=this.startColor,r=this.color,o=bt(o.oldAngle,o.newAngle,t);this.element.angle(o),r&&(o=M(bt(i.r,r.r,t)),e=M(bt(i.g,r.g,t)),i=M(bt(i.b,r.b,t)),this.element.stroke(new b.Color(o,e,i).toHex()))},uu);function uu(t,e){lu.call(this,t,e);var e=this.options,o=Math.abs(e.newAngle-e.oldAngle)/e.duration*1e3,e=(e.duration=_(o,150,800),t.elements.options.get("stroke.color")),o=t.currentColor();e!==o&&(this.startColor=new b.Color(e),this.color=new b.Color(o))}i(gl,{easing:"linear",duration:150}),b.drawing.AnimationFactory.current.register("radialRangePointer",gl);var du,fu=gl,o=((du=c)&&(gu.__proto__=du),((gu.prototype=Object.create(du&&du.prototype)).constructor=gu).prototype.repaint=function(){var t=this.scale,e=this.options,o=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 fu(this,x(e.animation,{oldAngle:o,newAngle:t})),this.animation.play())},gu.prototype.angle=function(t){var e=this.elements.geometry();this.scale.options.reverse?e.setStartAngle(t):e.setEndAngle(t),this.scale.placeholderRangeAngle(t)},gu.prototype.stroke=function(t){this.elements.stroke(t)},gu.prototype.render=function(){var t,e;this.elements||(t=this.scale,!1!==(e=this.options).animation&&x(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}))},gu.prototype.currentColor=function(){var t=this.scale.options,e=t.min,o=t.max,t=this.options,i=t.colors,r=t.color,t=t.value,n=m(t)?t:e;if(i)for(var s=0;s<i.length;s++){var a=i[s],h=a.color,p=a.from,a=(void 0===p&&(p=e),a.to);if(void 0===a&&(a=o),p<=n&&n<=a)return h}return r},gu.prototype.reflow=function(){this.render(),this.bbox=this.elements.bbox()},gu);function gu(){du.apply(this,arguments)}i(o,{animation:{type:"radialRangePointer",duration:150}});var yu,vu,mu,xu=o,_u=((mu=hu)&&(Su.__proto__=mu),((Su.prototype=Object.create(mu&&mu.prototype)).constructor=Su).prototype._initTheme=function(t){mu.prototype._initTheme.call(this,t),this.options.color=this.options.color||(this.theme.pointer||{}).color},Su.prototype._createModel=function(){var t=this.options,e=this.scale=new cu(t.scale,this.contextService),e=new xu(e,x({},{colors:t.colors,color:t.color,value:t.value,opacity:t.opacity,animation:{transitions:t.transitions}}));this.pointers=[e]},Su.prototype._buildPointers=function(t){for(var e=0;e<t.length;e++){var o=t[e];o.render(),o.value(o.options.value)}},Su.prototype._setValueOptions=function(t){this.options.value=t},Su.prototype.currentColor=function(){var t=this.pointers[0];if(t)return t.currentColor()},Su.prototype.centerLabelPosition=function(t,e){var o=this.getSize(),i=this.scale.arc.center,r=i.x-t/2,i=i.y-e/2;return t<o.width&&(t=r+t,r=Math.max(r,0),t>o.width&&(r-=t-o.width)),e<o.height&&(o=(t=this.scale.bbox).bottomRight().y,e=i+e,i=Math.max(i,t.origin.y),o<e&&(i-=e-o)),{left:r,top:i}},Su),bu=((vu=_u)&&(Cu.__proto__=vu),((Cu.prototype=Object.create(vu&&vu.prototype)).constructor=Cu).prototype._createModel=function(){var t=this.options.scale;"number"!=typeof t.startAngle&&(t.startAngle=90),t.endAngle=t.startAngle+360,vu.prototype._createModel.call(this)},Cu),f=((yu=b.Class)&&(wu.__proto__=yu),((wu.prototype=Object.create(yu&&yu.prototype)).constructor=wu).prototype.initProperties=function(){},wu.prototype.setOptions=function(t){this.options=Object.assign({},this.options,t),this.quietZoneLength=this.options.addQuietZone?2*this.options.quietZoneLength:0},wu.prototype.encode=function(t,e,o){t=T(t)?String(t):t;return this.initValue(t,e,o),this.options.addQuietZone&&this.addQuietZone(),this.addData(),this.options.addQuietZone&&this.addQuietZone(),{baseUnit:this.baseUnit,pattern:this.pattern}},wu.prototype.initValue=function(){},wu.prototype.addQuietZone=function(){this.pattern.push(this.options.quietZoneLength||10)},wu.prototype.addData=function(){},wu.prototype.invalidCharacterError=function(t){throw new Error('Character "'+t+'" is not valid for symbology '+this.name+".")},wu);function wu(t){yu.call(this),this.setOptions(t),this.initProperties()}function Cu(){vu.apply(this,arguments)}function Su(){mu.apply(this,arguments)}i(f,{quietZoneLength:10,addQuietZone:!0,addCheckSum:!0});var ku,Au=Object.assign,h=((ku=f)&&(Pu.__proto__=ku),((Pu.prototype=Object.create(ku&&ku.prototype)).constructor=Pu).prototype.initProperties=function(){ku.prototype.initProperties.call(this),Au(this,{name:"Code 11",characterMap:["111121","211121","121121","221111","112121","212111","122111","111221","211211","211111","112111"],cCheckSumTotal:10,kCheckSumTotal:9,kCheckSumMinLength:10,checkSumMod:11,DASH_VALUE:10,DASH:"-",START:"112211",STOP:"11221"})},Pu.prototype.initValue=function(t,e){this.pattern=[],this.value=t,this.width=e,this.totalUnits=0},Pu.prototype.addData=function(){var t=this.value;this.addPattern(this.START);for(var e=0;e<t.length;e++)this.addCharacter(t.charAt(e));this.options.addCheckSum&&this.addCheckSum(),this.addPattern(this.STOP),this.setBaseUnit()},Pu.prototype.setBaseUnit=function(){this.baseUnit=this.width/(this.totalUnits+this.quietZoneLength)},Pu.prototype.addCheckSum=function(){var t=this.value,e=t.length,o=this.getWeightedSum(t,e,this.cCheckSumTotal)%this.checkSumMod;this.checksum=String(o),this.addPattern(this.characterMap[o]),++e>=this.kCheckSumMinLength&&(o=(o+this.getWeightedSum(t,e,this.kCheckSumTotal))%this.checkSumMod,this.checksum+=o,this.addPattern(this.characterMap[o]))},Pu.prototype.getWeightedSum=function(t,e,o){for(var i=0,r=0;r<t.length;r++)i+=this.weightedValue(this.getValue(t.charAt(r)),e,r,o);return i},Pu.prototype.weightedValue=function(t,e,o,i){return((e-o)%i||i)*t},Pu.prototype.getValue=function(t){return isNaN(t)?(t!==this.DASH&&this.invalidCharacterError(t),this.DASH_VALUE):parseInt(t,10)},Pu.prototype.addCharacter=function(t){t=this.getValue(t),t=this.characterMap[t];this.addPattern(t)},Pu.prototype.addPattern=function(t){for(var e,o=0;o<t.length;o++)e=parseInt(t.charAt(o),10),this.pattern.push(e),this.totalUnits+=e},Pu);function Pu(){ku.apply(this,arguments)}i(h,{addCheckSum:!0});var Tu,Mu,Ou=Object.assign,Er=((Mu=f)&&(Ru.__proto__=Mu),((Ru.prototype=Object.create(Mu&&Mu.prototype)).constructor=Ru).prototype.initProperties=function(){Mu.prototype.initProperties.call(this),Ou(this,{minBaseUnitLength:.7})},Ru.prototype.addData=function(){var t=this.value;this.addStart();for(var e=0;e<t.length;e++)this.addCharacter(t.charAt(e));this.options.addCheckSum&&this.pushCheckSum(),this.addStop(),this.prepareValues()},Ru.prototype.addCharacter=function(t){var e=this.characterMap[t];e||this.invalidCharacterError(t),this.addBase(e)},Ru.prototype.addBase=function(){},Ru),d=((Tu=Er)&&(Bu.__proto__=Tu),((Bu.prototype=Object.create(Tu&&Tu.prototype)).constructor=Bu).prototype.initProperties=function(){Tu.prototype.initProperties.call(this),Ou(this,{name:"Code 39",checkSumMod:43,minRatio:2.5,maxRatio:3,gapWidth:1,splitCharacter:"|",patternMappings:{b:"1|",w:"1|",B:"ratio|",W:"ratio|"},characterMap:{0:{pattern:"bwbWBwBwb",value:0},1:{pattern:"BwbWbwbwB",value:1},2:{pattern:"bwBWbwbwB",value:2},3:{pattern:"BwBWbwbwb",value:3},4:{pattern:"bwbWBwbwB",value:4},5:{pattern:"BwbWBwbwb",value:5},6:{pattern:"bwBWBwbwb",value:6},7:{pattern:"bwbWbwBwB",value:7},8:{pattern:"BwbWbwBwb",value:8},9:{pattern:"bwBWbwBwb",value:9},A:{pattern:"BwbwbWbwB",value:10},B:{pattern:"bwBwbWbwB",value:11},C:{pattern:"BwBwbWbwb",value:12},D:{pattern:"bwbwBWbwB",value:13},E:{pattern:"BwbwBWbwb",value:14},F:{pattern:"bwBwBWbwb",value:15},G:{pattern:"bwbwbWBwB",value:16},H:{pattern:"BwbwbWBwb",value:17},I:{pattern:"bwBwbWBwb",value:18},J:{pattern:"bwbwBWBwb",value:19},K:{pattern:"BwbwbwbWB",value:20},L:{pattern:"bwBwbwbWB",value:21},M:{pattern:"BwBwbwbWb",value:22},N:{pattern:"bwbwBwbWB",value:23},O:{pattern:"BwbwBwbWb",value:24},P:{pattern:"bwBwBwbWb",value:25},Q:{pattern:"bwbwbwBWB",value:26},R:{pattern:"BwbwbwBWb",value:27},S:{pattern:"bwBwbwBWb",value:28},T:{pattern:"bwbwBwBWb",value:29},U:{pattern:"BWbwbwbwB",value:30},V:{pattern:"bWBwbwbwB",value:31},W:{pattern:"BWBwbwbwb",value:32},X:{pattern:"bWbwBwbwB",value:33},Y:{pattern:"BWbwBwbwb",value:34},Z:{pattern:"bWBwBwbwb",value:35},"-":{pattern:"bWbwbwBwB",value:36},".":{pattern:"BWbwbwBwb",value:37}," ":{pattern:"bWBwbwBwb",value:38},$:{pattern:"bWbWbWbwb",value:39},"/":{pattern:"bWbWbwbWb",value:40},"+":{pattern:"bWbwbWbWb",value:41},"%":{pattern:"bwbWbWbWb",value:42},START:{pattern:"bWbwBwBwb"}}})},Bu.prototype.initValue=function(t,e,o){this.width=e,this.height=o,this.value=t,this.dataLength=t.length,this.pattern=[],this.patternString=""},Bu.prototype.prepareValues=function(){var t,e=this.minBaseUnitLength,o=this.minRatio,i=Math.ceil(Math.max(.15*this.width,24)),r=this.maxRatio;if(this.height<i)throw new Error("Insufficient height for Code39 encoding: the current height is "+this.height+"px and the minimum height is "+i+"px.");for(t=this.getBaseUnit(r);t<e&&o<r;)r=parseFloat((r-.1).toFixed(1)),t=this.getBaseUnit(r);if(t<e)throw i=Math.ceil(this.getBaseWidth(o)*e),new Error("Insufficient width for Code39 encoding: the current width is "+this.width+'px and the minimum width for value "'+this.value+'" is '+i+"px.");this.ratio=r,this.baseUnit=t,this.patternString=this.patternString.substring(0,this.patternString.length-1),this.pattern=this.pattern.concat(this.patternString.replace(/ratio/g,r).split(this.splitCharacter))},Bu.prototype.getBaseUnit=function(t){return this.width/this.getBaseWidth(t)},Bu.prototype.getBaseWidth=function(t){return this.quietZoneLength+3*(t+2)*(this.dataLength+2)+this.gapWidth*(this.dataLength+1)},Bu.prototype.addStart=function(){this.addPattern(this.characterMap.START.pattern),this.addCharacterGap()},Bu.prototype.addBase=function(t){this.addPattern(t.pattern),this.addCharacterGap()},Bu.prototype.addStop=function(){this.addPattern(this.characterMap.START.pattern)},Bu.prototype.addPattern=function(t){for(var e=0;e<t.length;e++)this.patternString+=this.patternMappings[t.charAt(e)]},Bu.prototype.addCharacterGap=function(){this.patternString+=this.gapWidth+this.splitCharacter},Bu);function Bu(){Tu.apply(this,arguments)}function Ru(){Mu.apply(this,arguments)}i(d,{addCheckSum:!1});var Eu,Lu,Iu,zu,Vu,ju,Du,Hu,Uu,Fu,Nu,Gu={addCharacter:function(t){this.characterMap[t]?this.addBase(this.characterMap[t]):127<t.charCodeAt(0)?this.invalidCharacterError(t):this.addExtended(t.charCodeAt(0))},addExtended:function(t){for(var e,o=0;o<this.extendedMappings.length;o++)if(e=this.extendedMappings[o].call(this,t)){for(var i=0;i<e.length;i++){var r=e[i];this.addBase(r)}return void(this.dataLength+=e.length-1)}},extendedMappings:[function(t){if(97<=t&&t<=122)return[this.characterMap[this.shiftCharacters[0]],this.characterMap[String.fromCharCode(t-32)]]},function(t){if(33<=t&&t<=58)return[this.characterMap[this.shiftCharacters[1]],this.characterMap[String.fromCharCode(t+32)]]},function(t){if(1<=t&&t<=26)return[this.characterMap[this.shiftCharacters[2]],this.characterMap[String.fromCharCode(t+64)]]},function(t){var e;if(this.specialAsciiCodes[t])for(var o=[],i=0;i<this.specialAsciiCodes[t].length;i++)o.push(this.characterMap[this.shiftCharacters[3]]),o.push(this.characterMap[this.specialAsciiCodes[t][i]]);else e=6*Math.floor(t/32)+(t-27)%32+64,o=[this.characterMap[this.shiftCharacters[3]],this.characterMap[String.fromCharCode(e)]];return o}],specialAsciiCodes:{0:["U"],64:["V"],96:["W"],127:["T","X","Y","Z"]},shiftValuesAsciiCodes:{39:36,40:47,41:43,42:37},characterMap:{"+":!1,"/":!1,$:!1,"%":!1},shiftCharacters:["SHIFT0","SHIFT1","SHIFT2","SHIFT3"]},gl=((ju=d)&&(nd.__proto__=ju),((nd.prototype=Object.create(ju&&ju.prototype)).constructor=nd).prototype.initProperties=function(){ju.prototype.initProperties.call(this),x(this,Gu,{name:"Code 39 extended",characterMap:{SHIFT0:{pattern:"bWbwbWbWb",value:41},SHIFT1:{pattern:"bWbWbwbWb",value:40},SHIFT2:{pattern:"bWbWbWbwb",value:39},SHIFT3:{pattern:"bwbWbWbWb",value:42}}})},nd),Wu=Object.assign,c=((Vu=Er)&&(rd.__proto__=Vu),((rd.prototype=Object.create(Vu&&Vu.prototype)).constructor=rd).prototype.initProperties=function(){Vu.prototype.initProperties.call(this),Wu(this,{name:"Code 93",cCheckSumTotal:20,kCheckSumTotal:15,checkSumMod:47,characterMap:{0:{pattern:"131112",value:0},1:{pattern:"111213",value:1},2:{pattern:"111312",value:2},3:{pattern:"111411",value:3},4:{pattern:"121113",value:4},5:{pattern:"121212",value:5},6:{pattern:"121311",value:6},7:{pattern:"111114",value:7},8:{pattern:"131211",value:8},9:{pattern:"141111",value:9},A:{pattern:"211113",value:10},B:{pattern:"211212",value:11},C:{pattern:"211311",value:12},D:{pattern:"221112",value:13},E:{pattern:"221211",value:14},F:{pattern:"231111",value:15},G:{pattern:"112113",value:16},H:{pattern:"112212",value:17},I:{pattern:"112311",value:18},J:{pattern:"122112",value:19},K:{pattern:"132111",value:20},L:{pattern:"111123",value:21},M:{pattern:"111222",value:22},N:{pattern:"111321",value:23},O:{pattern:"121122",value:24},P:{pattern:"131121",value:25},Q:{pattern:"212112",value:26},R:{pattern:"212211",value:27},S:{pattern:"211122",value:28},T:{pattern:"211221",value:29},U:{pattern:"221121",value:30},V:{pattern:"222111",value:31},W:{pattern:"112122",value:32},X:{pattern:"112221",value:33},Y:{pattern:"122121",value:34},Z:{pattern:"123111",value:35},"-":{pattern:"121131",value:36},".":{pattern:"311112",value:37}," ":{pattern:"311211",value:38},$:{pattern:"321111",value:39},"/":{pattern:"112131",value:40},"+":{pattern:"113121",value:41},"%":{pattern:"211131",value:42},SHIFT0:{pattern:"122211",value:46},SHIFT1:{pattern:"311121",value:45},SHIFT2:{pattern:"121221",value:43},SHIFT3:{pattern:"312111",value:44},START:{pattern:"111141"},TERMINATION_BAR:"1"}})},rd.prototype.initValue=function(t,e,o){this.value=t,this.width=e,this.height=o,this.pattern=[],this.values=[],this.dataLength=t.length},rd.prototype.prepareValues=function(){var t=Math.ceil(Math.max(.15*this.width,24));if(this.height<t)throw new Error("Insufficient height for Code93 encoding: the current height is "+this.height+"px, the minimum required height is "+t+"px.");if(this.setBaseUnit(),this.baseUnit<this.minBaseUnitLength)throw t=Math.ceil(this.minBaseUnitLength*(this.width/this.baseUnit)),new Error("Insufficient width for Code93 encoding: the current width is "+this.width+'px and the minimum required width for value "'+this.value+'" is '+t+"px.")},rd.prototype.setBaseUnit=function(){this.baseUnit=this.width/(9*(this.dataLength+2+2)+this.quietZoneLength+1)},rd.prototype.addStart=function(){var t=this.characterMap.START.pattern;this.addPattern(t)},rd.prototype.addStop=function(){this.addStart(),this.pattern.push(this.characterMap.TERMINATION_BAR)},rd.prototype.addBase=function(t){this.addPattern(t.pattern),this.values.push(t.value)},rd.prototype.pushCheckSum=function(){var t,e=this._getCheckValues();this.checksum=e.join("");for(var o=0;o<e.length;o++)t=this.characterMap[this._findCharacterByValue(e[o])],this.addPattern(t.pattern)},rd.prototype._getCheckValues=function(){for(var t,e=this.values,o=e.length,i=0,r=o-1;0<=r;r--)i+=this.weightedValue(e[r],o-r,this.cCheckSumTotal);for(t=i%this.checkSumMod,i=this.weightedValue(t,1,this.kCheckSumTotal),r=o-1;0<=r;r--)i+=this.weightedValue(e[r],o-r+1,this.kCheckSumTotal);return[t,i%this.checkSumMod]},rd.prototype._findCharacterByValue=function(t){for(var e in this.characterMap)if(this.characterMap[e].value===t)return e},rd.prototype.weightedValue=function(t,e,o){return(e%o||o)*t},rd.prototype.addPattern=function(t){for(var e,o=0;o<t.length;o++)e=parseInt(t.charAt(o),10),this.pattern.push(e)},rd),o=((zu=c)&&(id.__proto__=zu),((id.prototype=Object.create(zu&&zu.prototype)).constructor=id).prototype.initProperties=function(){zu.prototype.initProperties.call(this),x(this,Gu,{name:"Code 93 extended",pushCheckSum:function(){var t=this._getCheckValues();this.checksum=t.join("");for(var e,o=0;o<t.length;o++)e=t[o],this.shiftValuesAsciiCodes[e]?this.addExtended(this.shiftValuesAsciiCodes[e]):(e=this._findCharacterByValue(e),this.addPattern(this.characterMap[e].pattern))}})},id),Xu=/^\d+$/,qu=Object.assign,Er=((Iu=f)&&(od.__proto__=Iu),((od.prototype=Object.create(Iu&&Iu.prototype)).constructor=od).prototype.initProperties=function(){Iu.prototype.initProperties.call(this),qu(this,{name:"Postnet",START:"2",VALID_CODE_LENGTHS:[5,9,11],DIGIT_SEPARATOR:"-",characterMap:["22111","11122","11212","11221","12112","12121","12211","21112","21121","21211"]})},od.prototype.initValue=function(t,e,o){this.height=o,this.width=e,this.baseHeight=o/2,this.value=t.replace(new RegExp(this.DIGIT_SEPARATOR,"g"),""),this.pattern=[],this.validate(this.value),this.checkSum=0,this.setBaseUnit()},od.prototype.addData=function(){var t=this.value;this.addPattern(this.START);for(var e=0;e<t.length;e++)this.addCharacter(t.charAt(e));this.options.addCheckSum&&this.addCheckSum(),this.addPattern(this.START),this.pattern.pop()},od.prototype.addCharacter=function(t){var e=this.characterMap[t];this.checkSum+=parseInt(t,10),this.addPattern(e)},od.prototype.addCheckSum=function(){this.checksum=(10-this.checkSum%10)%10,this.addCharacter(this.checksum)},od.prototype.setBaseUnit=function(){this.baseUnit=this.width/(10*(this.value.length+1)+3+this.quietZoneLength)},od.prototype.validate=function(t){if(Xu.test(t)||this.invalidCharacterError(t.match(/[^0-9]/)[0]),!u(t.length,this.VALID_CODE_LENGTHS))throw new Error("Invalid value length. Valid lengths for the Postnet symbology are "+this.VALID_CODE_LENGTHS.join(",")+".")},od.prototype.addPattern=function(t){for(var e,o=0;o<t.length;o++)e=this.height-this.baseHeight*t.charAt(o),this.pattern.push({width:1,y1:e,y2:this.height}),this.pattern.push(1)},od),Yu=/^\d+$/,Zu=/^[a-z0-9]+$/i,Qu=Object.assign,Ku=((Lu=b.Class)&&(ed.__proto__=Lu),((ed.prototype=Object.create(Lu&&Lu.prototype)).constructor=ed).prototype.initProperties=function(){},ed.prototype.addStart=function(){},ed.prototype.is=function(){},ed.prototype.isCode=function(){return!1},ed.prototype.move=function(){},ed.prototype.pushState=function(){},ed),$u=((Eu=Ku)&&(td.__proto__=Eu),((td.prototype=Object.create(Eu&&Eu.prototype)).constructor=td).prototype.initProperties=function(){Eu.prototype.initProperties.call(this),x(this,{FNC4:"FNC4",SHIFT:98})},td.prototype.addStart=function(){this.encoding.addPattern(this.START)},td.prototype.is=function(t,e){t=t.charCodeAt(e);return this.isCode(t)},td.prototype.move=function(t){for(var e=0;!this._moves[e].call(this,t)&&e<this._moves.length;)e++},td.prototype.pushState=function(t){var e,o=this.states,i=t.value,r=i.length;for(!u("C",o)||(o=i.substr(t.index).match(/\d{4,}/g))&&(r=i.indexOf(o[0],t.index));0<=(e=t.value.charCodeAt(t.index))&&this.isCode(e)&&t.index<r;)this.encoding.addPattern(this.getValue(e)),t.index++},td.prototype._initMoves=function(t){this._moves=[],u(this.FNC4,t)&&this._moves.push(this._moveFNC),u(this.shiftKey,t)&&this._moves.push(this._shiftState),this._moves.push(this._moveState)},td.prototype._moveFNC=function(t){if(t.fnc)return t.fnc=!1,t.previousState===this.key},td.prototype._shiftState=function(t){if(t.previousState===this.shiftKey&&(t.index+1>=t.value.length||this.encoding[this.shiftKey].is(t.value,t.index+1)))return this.encoding.addPattern(this.SHIFT),t.shifted=!0},td.prototype._moveState=function(){return this.encoding.addPattern(this.MOVE),!0},td),Ju={};function td(t,e){Eu.call(this,t),this.states=e,this._initMoves(e)}function ed(t){Lu.call(this),this.encoding=t,this.initProperties()}function od(){Iu.apply(this,arguments)}function id(){zu.apply(this,arguments)}function rd(){Vu.apply(this,arguments)}function nd(){ju.apply(this,arguments)}function sd(t,e){Du.call(this,t),this.states=e}function ad(t,e){Hu.call(this,t),this._initSubStates(e)}function hd(){Uu.apply(this,arguments)}function pd(){Fu.apply(this,arguments)}function ld(){Nu.apply(this,arguments)}Ju.A=((Nu=$u)&&(ld.__proto__=Nu),((ld.prototype=Object.create(Nu&&Nu.prototype)).constructor=ld).prototype.initProperties=function(){Nu.prototype.initProperties.call(this),Qu(this,{key:"A",shiftKey:"B",MOVE:101,START:103})},ld.prototype.isCode=function(t){return 0<=t&&t<96},ld.prototype.getValue=function(t){return t<32?t+64:t-32},ld),Ju.B=((Fu=$u)&&(pd.__proto__=Fu),((pd.prototype=Object.create(Fu&&Fu.prototype)).constructor=pd).prototype.initProperties=function(){Fu.prototype.initProperties.call(this),Qu(this,{key:"B",shiftKey:"A",MOVE:100,START:104})},pd.prototype.isCode=function(t){return 32<=t&&t<128},pd.prototype.getValue=function(t){return t-32},pd),Ju.C=((Uu=Ku)&&(hd.__proto__=Uu),((hd.prototype=Object.create(Uu&&Uu.prototype)).constructor=hd).prototype.initProperties=function(){Uu.prototype.initProperties.call(this),Qu(this,{key:"C",MOVE:99,START:105})},hd.prototype.addStart=function(){this.encoding.addPattern(this.START)},hd.prototype.is=function(t,e){var o=Ad(t,e,4);return(e+4<=t.length||2===t.length)&&Yu.test(o)},hd.prototype.move=function(){this.encoding.addPattern(this.MOVE)},hd.prototype.pushState=function(t){for(var e;(e=Ad(t.value,t.index,2))&&Yu.test(e)&&2===e.length;)this.encoding.addPattern(parseInt(e,10)),t.index+=2},hd.prototype.getValue=function(t){return t},hd),Ju.FNC4=((Hu=Ku)&&(ad.__proto__=Hu),((ad.prototype=Object.create(Hu&&Hu.prototype)).constructor=ad).prototype.initProperties=function(){Hu.prototype.initProperties.call(this),Qu(this,{key:"FNC4",dependentStates:["A","B"]})},ad.prototype.addStart=function(t){t=t.value.charCodeAt(0)-128,t=this._getSubState(t);this.encoding[t].addStart()},ad.prototype.is=function(t,e){t=t.charCodeAt(e);return this.isCode(t)},ad.prototype.isCode=function(t){return 128<=t&&t<256},ad.prototype.pushState=function(t){var e,o=this._initSubState(t),i=this.encoding,r=o.value.length;if(t.index+=r,r<3)for(;o.index<r;o.index++)e=o.value.charCodeAt(o.index),o.state=this._getSubState(e),o.previousState!==o.state&&(o.previousState=o.state,i[o.state].move(o)),i.addPattern(i[o.state].MOVE),i.addPattern(i[o.state].getValue(e));else o.state!==o.previousState&&i[o.state].move(o),this._pushStart(o),i.pushData(o,this.subStates),t.index<t.value.length&&this._pushStart(o);t.fnc=!0,t.state=o.state},ad.prototype._pushStart=function(t){this.encoding.addPattern(this.encoding[t.state].MOVE),this.encoding.addPattern(this.encoding[t.state].MOVE)},ad.prototype._initSubState=function(t){var e={value:this._getAll(t.value,t.index),index:0};return e.state=this._getSubState(e.value.charCodeAt(0)),e.previousState=t.previousState===this.key?e.state:t.previousState,e},ad.prototype._initSubStates=function(t){this.subStates=[];for(var e=0;e<t.length;e++)u(t[e],this.dependentStates)&&this.subStates.push(t[e])},ad.prototype._getSubState=function(t){for(var e=0;e<this.subStates.length;e++)if(this.encoding[this.subStates[e]].isCode(t))return this.subStates[e]},ad.prototype._getAll=function(t,e){for(var o,i="",r=e;(o=t.charCodeAt(r++))&&this.isCode(o);)i+=String.fromCharCode(o-128);return i},ad),Ju.FNC1=((Du=Ku)&&(sd.__proto__=Du),((sd.prototype=Object.create(Du&&Du.prototype)).constructor=sd).prototype.initProperties=function(){Du.prototype.initProperties.call(this),Qu(this,{key:"FNC1",startState:"C",startAI:"(",endAI:")",dependentStates:["C","B"],applicationIdentifiers:{22:{max:29,type:"alphanumeric"},402:{length:17},7004:{max:4,type:"alphanumeric"},242:{max:6,type:"alphanumeric"},8020:{max:25,type:"alphanumeric"},703:{min:3,max:30,type:"alphanumeric"},8008:{min:8,max:12,type:"alphanumeric"},253:{min:13,max:17,type:"alphanumeric"},8003:{min:14,max:30,type:"alphanumeric"},multiKey:[{ids:["15","17","8005","8100"],ranges:[[11,13],[310,316],[320,336],[340,369]],type:{length:6}},{ids:["240","241","250","251","400","401","403","7002","8004","8007","8110"],ranges:[[-9]],type:{max:30,type:"alphanumeric"}},{ids:["7001"],ranges:[[410,414]],type:{length:13}},{ids:["10","21","254","420","8002"],type:{max:20,type:"alphanumeric"}},{ids:["00","8006","8017","8018"],type:{length:18}},{ids:["01","02","8001"],type:{length:14}},{ids:["422"],ranges:[[424,426]],type:{length:3}},{ids:["20","8102"],type:{length:2}},{ids:["30","37"],type:{max:8,type:"alphanumeric"}},{ids:["390","392"],type:{max:15,type:"alphanumeric"}},{ids:["421","423"],type:{min:3,max:15,type:"alphanumeric"}},{ids:["391","393"],type:{min:3,max:18,type:"alphanumeric"}},{ids:["7003","8101"],type:{length:10}}]},START:102})},sd.prototype.addStart=function(){this.encoding[this.startState].addStart()},sd.prototype.is=function(){return u(this.key,this.states)},sd.prototype.pushState=function(t){var e,o,i,r=this.encoding,n=t.value.replace(/\s/g,""),s=new RegExp("["+this.startAI+this.endAI+"]","g"),a=t.index,h={state:this.startState};for(r.addPattern(this.START);;){if((e=(h.index=0)<(i=n.charAt(a)===this.startAI?2:0)?this.getBySeparator(n,a):this.getByLength(n,a)).ai.length)o=a+i+e.id.length+e.ai.length;else if((o=n.indexOf(this.startAI,a+1))<0){if(a+e.ai.max+e.id.length+i<n.length)throw new Error("Separators are required after variable length identifiers");o=n.length}if(h.value=n.substring(a,o).replace(s,""),this.validate(e,h.value),r.pushData(h,this.dependentStates),o>=n.length)break;a=o,h.state!==this.startState&&(r[this.startState].move(h),h.state=this.startState),e.ai.length||r.addPattern(this.START)}t.index=t.value.length},sd.prototype.validate=function(t,e){var e=e.substr(t.id.length),o=t.ai;if(!o.type&&!Yu.test(e))throw new Error("Application identifier "+t.id+" is numeric only but contains non numeric character(s).");if("alphanumeric"===o.type&&!Zu.test(e))throw new Error("Application identifier "+t.id+" is alphanumeric only but contains non alphanumeric character(s).");if(o.length&&o.length!==e.length)throw new Error("Application identifier "+t.id+" must be "+o.length+" characters long.");if(o.min&&o.min>e.length)throw new Error("Application identifier "+t.id+" must be at least "+o.min+" characters long.");if(o.max&&o.max<e.length)throw new Error("Application identifier "+t.id+" must be at most "+o.max+" characters long.")},sd.prototype.getByLength=function(t,e){for(var o,i,r=2;r<=4;r++)if(o=Ad(t,e,r),i=this.getApplicationIdentifier(o)||this.getApplicationIdentifier(o.substring(0,o.length-1)))return{id:o,ai:i};this.unsupportedAIError(o)},sd.prototype.unsupportedAIError=function(t){throw new Error("'"+t+"' is not a supported Application Identifier")},sd.prototype.getBySeparator=function(t,e){var e=t.indexOf(this.startAI,e),o=t.indexOf(this.endAI,e),t=t.substring(e+1,o),e=this.getApplicationIdentifier(t)||this.getApplicationIdentifier(t.substr(t.length-1));return e||this.unsupportedAIError(t),{ai:e,id:t}},sd.prototype.getApplicationIdentifier=function(t){var e=this.applicationIdentifiers,o=e.multiKey;if(e[t])return e[t];for(var i=0;i<o.length;i++){if(o[i].ids&&u(t,o[i].ids))return o[i].type;if(o[i].ranges)for(var r=o[i].ranges,n=0;n<r.length;n++)if(r[n][0]<=t&&t<=r[n][1])return o[i].type}},sd);(yd=f)&&(kd.__proto__=yd),((kd.prototype=Object.create(yd&&yd.prototype)).constructor=kd).prototype.initProperties=function(){yd.prototype.initProperties.call(this),Qu(this,{characterMap:[212222,222122,222221,121223,121322,131222,122213,122312,132212,221213,221312,231212,112232,122132,122231,113222,123122,123221,223211,221132,221231,213212,223112,312131,311222,321122,321221,312212,322112,322211,212123,212321,232121,111323,131123,131321,112313,132113,132311,211313,231113,231311,112133,112331,132131,113123,113321,133121,313121,211331,231131,213113,213311,213131,311123,311321,331121,312113,312311,332111,314111,221411,431111,111224,111422,121124,121421,141122,141221,112214,112412,122114,122411,142112,142211,241211,221114,413111,241112,134111,111242,121142,121241,114212,124112,124211,411212,421112,421211,212141,214121,412121,111143,111341,131141,114113,114311,411113,411311,113141,114131,311141,411131,211412,211214,211232,2331112],STOP:106})},kd.prototype._initStates=function(){for(var t=0;t<this.states.length;t++)this[this.states[t]]=new Ju[this.states[t]](this,this.states)},kd.prototype.initValue=function(t,e,o){this.pattern=[],this.value=t,this.width=e,this.height=o,this.checkSum=0,this.totalUnits=0,this.index=0,this.position=1},kd.prototype.addData=function(){var t={value:this.value,index:0,state:""};0!==this.value.length&&(t.state=t.previousState=this.getNextState(t,this.states),this.addStart(t),this.pushData(t,this.states),this.addCheckSum(),this.addStop(),this.setBaseUnit())},kd.prototype.pushData=function(t,e){for(;this[t.state].pushState(t),!(t.index>=t.value.length);){var o;t.shifted?(o=t.state,t.state=t.previousState,t.previousState=o,t.shifted=!1):(t.previousState=t.state,t.state=this.getNextState(t,e),this[t.state].move(t))}},kd.prototype.addStart=function(t){this[t.state].addStart(t),this.position=1},kd.prototype.addCheckSum=function(){this.checksum=this.checkSum%103,this.addPattern(this.checksum)},kd.prototype.addStop=function(){this.addPattern(this.STOP)},kd.prototype.setBaseUnit=function(){this.baseUnit=this.width/(this.totalUnits+this.quietZoneLength)},kd.prototype.addPattern=function(t){for(var e,o=this.characterMap[t].toString(),i=0;i<o.length;i++)e=parseInt(o.charAt(i),10),this.pattern.push(e),this.totalUnits+=e;this.checkSum+=t*this.position++},kd.prototype.getNextState=function(t,e){for(var o=0;o<e.length;o++)if(this[e[o]].is(t.value,t.index))return e[o];this.invalidCharacterError(t.value.charAt(t.index))};var cd,ud,dd,fd,gd,yd,$u=kd,Ku=((gd=$u)&&(Sd.__proto__=gd),((Sd.prototype=Object.create(gd&&gd.prototype)).constructor=Sd).prototype.initProperties=function(){gd.prototype.initProperties.call(this),Qu(this,{name:"Code 128 A",states:["A"]})},Sd),vd=((fd=$u)&&(Cd.__proto__=fd),((Cd.prototype=Object.create(fd&&fd.prototype)).constructor=Cd).prototype.initProperties=function(){fd.prototype.initProperties.call(this),Qu(this,{name:"Code 128 B",states:["B"]})},Cd),md=((dd=$u)&&(wd.__proto__=dd),((wd.prototype=Object.create(dd&&dd.prototype)).constructor=wd).prototype.initProperties=function(){dd.prototype.initProperties.call(this),Qu(this,{name:"Code 128 C",states:["C"]})},wd),xd=((ud=$u)&&(bd.__proto__=ud),((bd.prototype=Object.create(ud&&ud.prototype)).constructor=bd).prototype.initProperties=function(){ud.prototype.initProperties.call(this),Qu(this,{name:"Code 128",states:["C","B","A","FNC4"]})},bd),$u=((cd=$u)&&(_d.__proto__=cd),((_d.prototype=Object.create(cd&&cd.prototype)).constructor=_d).prototype.initProperties=function(){cd.prototype.initProperties.call(this),Qu(this,{name:"Code GS1-128",states:["FNC1","C","B"]})},_d);function _d(){cd.apply(this,arguments)}function bd(){ud.apply(this,arguments)}function wd(){dd.apply(this,arguments)}function Cd(){fd.apply(this,arguments)}function Sd(){gd.apply(this,arguments)}function kd(t){yd.call(this,t),this._initStates()}function Ad(t,e,o){return t.substring(e,e+o)}var Pd,Td,Md,Od,Bd,Rd,Ed,Ld=Object.assign,Id=((Ed=f)&&(Qd.__proto__=Ed),((Qd.prototype=Object.create(Ed&&Ed.prototype)).constructor=Qd).prototype.initProperties=function(){Ed.prototype.initProperties.call(this),Ld(this,{characterMap:["12121212","12121221","12122112","12122121","12211212","12211221","12212112","12212121","21121212","21121221"],START:"21",STOP:"121",checkSumType:"",checkSums:Dd})},Qd.prototype.initValue=function(t,e){this.pattern=[],this.value=t,this.checkSumLength=0,this.width=e},Qd.prototype.setBaseUnit=function(){this.baseUnit=this.width/(12*(this.value.length+this.checkSumLength)+this.quietZoneLength+7)},Qd.prototype.addData=function(){var t=this.value;this.addPattern(this.START);for(var e=0;e<t.length;e++)this.addCharacter(t.charAt(e));this.options.addCheckSum&&this.addCheckSum(),this.addPattern(this.STOP),this.setBaseUnit()},Qd.prototype.addCharacter=function(t){var e=this.characterMap[t];e||this.invalidCharacterError(t),this.addPattern(e)},Qd.prototype.addPattern=function(t){for(var e=0;e<t.length;e++)this.pattern.push(parseInt(t.charAt(e),10))},Qd.prototype.addCheckSum=function(){var t=this.checkSums[this.checkSumType].call(this.checkSums,this.value);this.checksum=t.join("");for(var e=0;e<t.length;e++)this.checkSumLength++,this.addPattern(this.characterMap[t[e]])},Qd),zd=((Rd=Id)&&(Zd.__proto__=Rd),((Zd.prototype=Object.create(Rd&&Rd.prototype)).constructor=Zd).prototype.initProperties=function(){Rd.prototype.initProperties.call(this),Ld(this,{name:"MSI Modulo10",checkSumType:"Modulo10"})},Zd),Vd=((Bd=Id)&&(Yd.__proto__=Bd),((Yd.prototype=Object.create(Bd&&Bd.prototype)).constructor=Yd).prototype.initProperties=function(){Bd.prototype.initProperties.call(this),Ld(this,{name:"MSI Modulo11",checkSumType:"Modulo11"})},Yd),jd=((Od=Id)&&(qd.__proto__=Od),((qd.prototype=Object.create(Od&&Od.prototype)).constructor=qd).prototype.initProperties=function(){Od.prototype.initProperties.call(this),Ld(this,{name:"MSI Modulo10 Modulo10",checkSumType:"Modulo10Modulo10"})},qd),Id=((Md=Id)&&(Xd.__proto__=Md),((Xd.prototype=Object.create(Md&&Md.prototype)).constructor=Xd).prototype.initProperties=function(){Md.prototype.initProperties.call(this),Ld(this,{name:"MSI Modulo11 Modulo10",checkSumType:"Modulo11Modulo10"})},Xd),Dd={Modulo10:function(t){for(var e,o,i=[0,""],r=t.length%2,n=0;n<t.length;n++)i[(n+r)%2]+=parseInt(t.charAt(n),10);for(o=i[0],e=(2*i[1]).toString(),n=0;n<e.length;n++)o+=parseInt(e.charAt(n),10);return[(10-o%10)%10]},Modulo11:function(t){for(var e,o=0,i=t.length,r=0;r<i;r++)o+=(((i-r)%6||6)+1)*t.charAt(r);return 10!=(e=(11-o%11)%11)?[e]:[1,0]},Modulo11Modulo10:function(t){var e=this.Modulo11(t),t=t+e[0];return e.concat(this.Modulo10(t))},Modulo10Modulo10:function(t){var e=this.Modulo10(t),t=t+e[0];return e.concat(this.Modulo10(t))}},Hd=Object.assign,f=((Td=f)&&(Wd.__proto__=Td),((Wd.prototype=Object.create(Td&&Td.prototype)).constructor=Wd).prototype.initProperties=function(){Td.prototype.initProperties.call(this),Hd(this,{name:"EAN 13",keyTable:["000000","001011","001101","001110","010011","011001","011100","010101","010110","011010"],characterMap:{digits:[[3,2,1,1],[2,2,2,1],[2,1,2,2],[1,4,1,1],[1,1,3,2],[1,2,3,1],[1,1,1,4],[1,3,1,2],[1,2,1,3],[3,1,1,2]],start:[1,1,1],middle:[1,1,1,1,1]}})},Wd.prototype.initValue=function(t,e,o){t=String(t);if(12!==t.length||/\D/.test(t))throw new Error('The value of the "EAN13" encoding should be 12 symbols');this.pattern=[],this.options.height=o,this.baseUnit=e/(95+this.quietZoneLength),this.value=t,this.checksum=this.calculateChecksum(),this.leftKey=t[0],this.leftPart=t.substr(1,6),this.rightPart=t.substr(7)+this.checksum},Wd.prototype.addData=function(){this.addPieces(this.characterMap.start),this.addSide(this.leftPart,this.leftKey),this.addPieces(this.characterMap.middle),this.addSide(this.rightPart),this.addPieces(this.characterMap.start)},Wd.prototype.addSide=function(t,e){for(var o=0;o<t.length;o++)e&&parseInt(this.keyTable[e].charAt(o),10)?this.addPieces(Array.prototype.slice.call(this.characterMap.digits[t.charAt(o)]).reverse(),!0):this.addPieces(this.characterMap.digits[t.charAt(o)],!0)},Wd.prototype.addPieces=function(t,e){for(var o=0;o<t.length;o++)e?this.pattern.push({y1:0,y2:.95*this.options.height,width:t[o]}):this.pattern.push(t[o])},Wd.prototype.calculateChecksum=function(){for(var t=0,e=0,o=this.value.split("").reverse().join(""),i=0;i<o.length;i++)i%2?e+=parseInt(o.charAt(i),10):t+=parseInt(o.charAt(i),10);return(10-(3*t+e)%10)%10},Wd),Ud=Object.assign,Fd=((Pd=f)&&(Gd.__proto__=Pd),((Gd.prototype=Object.create(Pd&&Pd.prototype)).constructor=Gd).prototype.initProperties=function(){Pd.prototype.initProperties.call(this),Ud(this,{name:"EAN 8"})},Gd.prototype.initValue=function(t,e,o){if(7!==t.length||/\D/.test(t))throw new Error("Invalid value provided");this.value=t,this.options.height=o,this.checksum=this.calculateChecksum(this.value),this.leftPart=this.value.substr(0,4),this.rightPart=this.value.substr(4)+this.checksum,this.pattern=[],this.baseUnit=e/(67+this.quietZoneLength)},Gd),Nd={code11:h,code39:d,code39extended:gl,code93:c,code93extended:o,code128:xd,code128a:Ku,code128b:vd,code128c:md};function Gd(){Pd.apply(this,arguments)}function Wd(){Td.apply(this,arguments)}function Xd(){Md.apply(this,arguments)}function qd(){Od.apply(this,arguments)}function Yd(){Bd.apply(this,arguments)}function Zd(){Rd.apply(this,arguments)}function Qd(){Ed.apply(this,arguments)}function Kd(t,e){var o=t.style.display,e=("canvas"===e&&(t.style.display="block"),{width:t.clientWidth,height:t.clientHeight});return t.style.display=o,e}Nd["gs1-128"]=$u,Nd.msimod10=zd,Nd.msimod11=Vd,Nd.msimod1010=jd,Nd.msimod1110=Id,Nd.postnet=Er,Nd.ean8=Fd,Nd.ean13=f;($d=b.Class)&&(Jd.__proto__=$d),((Jd.prototype=Object.create($d&&$d.prototype)).constructor=Jd).prototype.destroy=function(){this._destroySurface()},Jd.prototype._initElement=function(){Q(this.element,"k-barcode")},Jd.prototype._initSurface=function(){var t=this.options,e=this.surface;e&&e.options.type===t.renderAs||(this._destroySurface(),this._initSurfaceElement(),this.surface=this._createSurface())},Jd.prototype._createSurface=function(){return b.drawing.Surface.create(this.surfaceElement,{type:this.options.renderAs})},Jd.prototype._destroySurface=function(){this.surface&&(this.surface.destroy(),this.surface=null,this._destroySurfaceElement())},Jd.prototype._initSurfaceElement=function(){this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.surfaceElement.style.position="relative",this.element.appendChild(this.surfaceElement))},Jd.prototype._destroySurfaceElement=function(){this.surfaceElement&&this.surfaceElement.parentNode&&(this.surfaceElement.parentNode.removeChild(this.surfaceElement),this.surfaceElement=null)},Jd.prototype.setOptions=function(t){this._setOptions(t),this._initSurface(),this.redraw()},Jd.prototype.redraw=function(){var t=this._getSize();this.surface.clear(),this.surface.setSize({width:t.width,height:t.height}),this.createVisual(),this.surface.draw(this.visual)},Jd.prototype.getSize=function(){return{width:this.element.offsetWidth,height:this.element.offsetHeight}},Jd.prototype._resize=function(){this.redraw()},Jd.prototype.createVisual=function(){this.visual=this._render()},Jd.prototype._render=function(){var t,e=this.options,o=e.value,i=e.text,r=P(i.margin),n=this._getSize(),s=e.border||{},a=this.encoding,s=new R(0,0,n.width,n.height).unpad(s.width).unpad(e.padding),h=s.height(),p=new b.drawing.Group;this.contentBox=s,p.append(this._getBackground(n)),i.visible&&(h-=b.drawing.util.measureText(o,{font:i.font}).height+r.top+r.bottom);try{t=a.encode(o,s.width(),h)}catch(t){return this.onError(t),p}return i.visible&&(n=o,e.checksum&&T(a.checksum)&&(n+=" "+a.checksum),p.append(this._getText(n))),this.barHeight=h,this._bandsGroup=this._getBands(t.pattern,t.baseUnit),p.append(this._bandsGroup),p},Jd.prototype.exportVisual=function(){return this._render()},Jd.prototype._getSize=function(){var t=Kd(this.element,this.options.renderAs),e=new b.geometry.Size(300,100);return 0<t.width&&(e.width=t.width),0<t.height&&(e.height=t.height),this.options.width&&(e.width=this.options.width),this.options.height&&(e.height=this.options.height),e},Jd.prototype.value=function(t){if(!T(t))return this.options.value;this.options.value=String(t),this.redraw()},Jd.prototype._getBands=function(t,e){for(var o=this.contentBox,i=o.x1,r=new b.drawing.Group,n=0;n<t.length;n++){var s,a=(s=st(t[n])?t[n]:{width:t[n],y1:0,y2:this.barHeight}).width*e;n%2&&(s=b.geometry.Rect.fromPoints(new b.geometry.Point(i,s.y1+o.y1),new b.geometry.Point(i+a,s.y2+o.y1)),s=b.drawing.Path.fromRect(s,{fill:{color:this.options.color},stroke:null}),r.append(s)),i+=a}return r},Jd.prototype._getBackground=function(t){var e=this.options,o=e.border||{},t=new R(0,0,t.width,t.height).unpad(o.width/2);return b.drawing.Path.fromRect(t.toRect(),{fill:{color:e.background},stroke:{color:o.width?o.color:"",width:o.width,dashType:o.dashType}})},Jd.prototype._getText=function(t){var e=this.options.text,t=this._textbox=new De(t,{font:e.font,color:e.color,align:"center",vAlign:"bottom",margin:e.margin});return t.reflow(this.contentBox),t.renderVisual(),t.visual},Jd.prototype._setOptions=function(t){if(this.type=(t.type||this.options.type).toLowerCase(),"upca"===this.type&&(this.type="ean13",t.value="0"+t.value),"upce"===this.type&&(this.type="ean8",t.value="0"+t.value),!Nd[this.type])throw new Error("Encoding '"+this.type+"' is not supported.");this.encoding=new Nd[this.type],this.options=x({},this.options,t)};var $d,h=Jd;function Jd(t,e,o){void 0===o&&(o=$t),$d.call(this),this.options=x({},this.options,e),this.element=t,this.onError=o,this._initElement(),this._initSurface(),this._setOptions(e),e&&T(e.value)&&this.redraw()}i(h,{name:"Barcode",renderAs:"svg",value:"",type:"code39",checksum:!1,width:0,height:0,color:"black",background:"white",text:{visible:!0,font:"16px Consolas, Monaco, Sans Mono, monospace, sans-serif",color:"black",margin:{top:0,bottom:0,left:0,right:0}},border:{width:0,dashType:"solid",color:"black"},padding:{top:0,bottom:0,left:0,right:0}});function tf(t,e){if(void 0===e&&(e=of),!t)throw new Error("Please specify barcode type to validate.");var o=t.toLowerCase(),i="";if("upca"===o?(o="ean13",i="0"):"upce"===o&&(o="ean8",i="0"),!Nd[o])throw new Error("Encoding '"+t+"' is not supported.");var r,n,s,t=new Nd[o];return r=t,n=e,s=i,function(t){try{r.encode(s+t,n.width,n.height)}catch(t){return{valid:!1,error:t}}return{valid:!0}}}var ef=h,of={width:500,height:100},rf=Object.assign;function nf(t,e){for(var o=[],i=0;i<t.length;)o.push(t.substring(i,i+e)),i+=e;return o}function sf(t,e){t=Number(t).toString(2);return t=t.length<e?new Array(e-t.length+1).join(0)+t:t}function af(t){return parseInt(t,2)}(ff=b.Class)&&(kf.__proto__=ff),((kf.prototype=Object.create(ff&&ff.prototype)).constructor=kf).prototype.move=function(){this.row+=this.dir*this.c,this.c^=1,this.column=this.startColumn-this.c},kf.prototype.getNextCell=function(){for(;void 0!==this.matrix[this.row][this.column];)this.move(),(this.row<0||this.row>=this.matrix.length)&&(this.dir=-this.dir,this.startColumn-=8!==this.startColumn?2:3,this.column=this.startColumn,this.row=this.dir<0?this.matrix.length-1:0);return{row:this.row,column:this.column}},kf.prototype.getNextRemainderCell=function(){if(this.move(),void 0===this.matrix[this.row][this.column])return{row:this.row,column:this.column}};var hf,pf,lf,cf,uf,df,ff,gf=kf,yf=((df=b.Class)&&(Sf.__proto__=df),(Sf.prototype=Object.create(df&&df.prototype)).constructor=Sf),vf=((uf=b.Class)&&(Cf.__proto__=uf),((Cf.prototype=Object.create(uf&&uf.prototype)).constructor=Cf).prototype.getEncodingResult=function(n,t){var e=function(){var t,e=[],o=0,i=n;for(e.push(og(i,Wf,Xf,qf,t)),t=e[0].mode,i=i.substr(e[0].modeString.length);0<i.length;){var r=og(i,Yf,Zf,Qf,t);r.mode!==t?(t=r.mode,e.push(r),o++):e[o].modeString+=r.modeString,i=i.substr(r.modeString.length)}return e}(),t=ig(function(t){for(var e=0,o=0;o<t.length;o++)e+=mf[t[o].mode].getStringBitsLength(t[o].modeString.length);return Math.ceil(e/8)}(e),t),e=function(t,e){for(var o="",i=0;i<t.length;i++)o+=mf[t[i].mode].encode(t[i].modeString,e);return o}(e,t);return new yf(e,t)},Cf),d=((cf=b.Class)&&(wf.__proto__=cf),((wf.prototype=Object.create(cf&&cf.prototype)).constructor=wf).prototype.initProperties=function(){rf(this,{modeIndicator:"",bitsInCharacterCount:[]})},wf.prototype.getVersionIndex=function(t){return t<10?0:26<t?2:1},wf.prototype.getBitsCharacterCount=function(t){return this.bitsInCharacterCount[this.getVersionIndex(t||40)]},wf.prototype.getModeCountString=function(t,e){return this.modeIndicator+sf(t,this.getBitsCharacterCount(e))},wf.prototype.encode=function(){},wf.prototype.getStringBitsLength=function(){},wf.prototype.getValue=function(){},wf),gl=((lf=d)&&(bf.__proto__=lf),((bf.prototype=Object.create(lf&&lf.prototype)).constructor=bf).prototype.initProperties=function(){lf.prototype.initProperties.call(this),rf(this,{bitsInCharacterCount:[10,12,14],modeIndicator:"0001"})},bf.prototype.getValue=function(t){return parseInt(t,10)},bf.prototype.encode=function(t,e){for(var o=nf(t,3),i=this.getModeCountString(t.length,e),r=0;r<o.length-1;r++)i+=sf(o[r],10);return i+sf(o[r],1+3*o[r].length)},bf.prototype.getStringBitsLength=function(t,e){var o=t%3;return 4+this.getBitsCharacterCount(e)+10*Math.floor(t/3)+3*o+(0==o?0:1)},bf),c=((pf=d)&&(_f.__proto__=pf),((_f.prototype=Object.create(pf&&pf.prototype)).constructor=_f).prototype.initProperties=function(){pf.prototype.initProperties.call(this),rf(this,{characters:{0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,G:16,H:17,I:18,J:19,K:20,L:21,M:22,N:23,O:24,P:25,Q:26,R:27,S:28,T:29,U:30,V:31,W:32,X:33,Y:34,Z:35," ":36,$:37,"%":38,"*":39,"+":40,"-":41,".":42,"/":43,":":44},bitsInCharacterCount:[9,11,13],modeIndicator:"0010"})},_f.prototype.getValue=function(t){return this.characters[t]},_f.prototype.encode=function(t,e){for(var o=nf(t,2),i=this.getModeCountString(t.length,e),r=0;r<o.length-1;r++)i+=sf(45*this.getValue(o[r].charAt(0))+this.getValue(o[r].charAt(1)),11);return i+sf(2===o[r].length?45*this.getValue(o[r].charAt(0))+this.getValue(o[r].charAt(1)):this.getValue(o[r].charAt(0)),1+5*o[r].length)},_f.prototype.getStringBitsLength=function(t,e){return 4+this.getBitsCharacterCount(e)+11*Math.floor(t/2)+t%2*6},_f),o=((hf=d)&&(xf.__proto__=hf),((xf.prototype=Object.create(hf&&hf.prototype)).constructor=xf).prototype.initProperties=function(){hf.prototype.initProperties.call(this),rf(this,{bitsInCharacterCount:[8,16,16],modeIndicator:"0100"})},xf.prototype.getValue=function(t){var e=t.charCodeAt(0);if(e<=127||160<=e&&e<=255)return e;throw new Error('Unsupported character in QR Code: "'+t+'".')},xf.prototype.encode=function(t,e){for(var o=this.getModeCountString(t.length,e),i=0;i<t.length;i++)o+=sf(this.getValue(t.charAt(i)),8);return o},xf.prototype.getStringBitsLength=function(t,e){return 4+this.getBitsCharacterCount(e)+8*t},xf),mf={};function xf(){hf.apply(this,arguments)}function _f(){pf.apply(this,arguments)}function bf(){lf.apply(this,arguments)}function wf(){cf.call(this),this.initProperties()}function Cf(){uf.apply(this,arguments)}function Sf(t,e){df.call(this),this.dataString=t,this.version=e}function kf(t){ff.call(this),this.matrix=t,this.row=t.length-1,this.column=t.length-1,this.startColumn=this.column,this.dir=-1,this.c=0}mf.numeric=new gl,mf.alphanumeric=new c,mf.byte=new o;(Af=b.Class)&&($f.__proto__=Af),(($f.prototype=Object.create(Af&&Af.prototype)).constructor=$f).prototype.initProperties=function(){rf(this,{encodingMode:"byte",utfBOM:"111011111011101110111111",initialModeCountStringLength:20,ranges:[128,2048,65536,2097152,67108864]})},$f.prototype.getEncodingResult=function(t,e){t=this.encode(t),e=ig(this.getDataCodewordsCount(t),e),t=this.mode.getModeCountString(t.length/8,e)+t;return new yf(t,e)},$f.prototype.getDataCodewordsCount=function(t){t=t.length;return Math.ceil((this.initialModeCountStringLength+t)/8)},$f.prototype.encode=function(t){for(var e=this.utfBOM,o=0;o<t.length;o++)e+=this.encodeCharacter(t.charCodeAt(o));return e},$f.prototype.encodeCharacter=function(t){var e=this.getBytesCount(t),o=e-1,i="";if(1===e)i=sf(t,8);else{for(var e=8-e,r=0;r<o;r++)i=sf(t>>6*r&63|128,8)+i;i=(t>>6*o|255>>e<<e).toString(2)+i}return i},$f.prototype.getBytesCount=function(t){for(var e=this.ranges,o=0;o<e.length;o++)if(t<e[o])return o+1};var Af,Pf=$f,Tf=[{L:{groups:[[1,19]],totalDataCodewords:19,errorCodewordsPerBlock:7},M:{groups:[[1,16]],totalDataCodewords:16,errorCodewordsPerBlock:10},Q:{groups:[[1,13]],totalDataCodewords:13,errorCodewordsPerBlock:13},H:{groups:[[1,9]],totalDataCodewords:9,errorCodewordsPerBlock:17}},{L:{groups:[[1,34]],totalDataCodewords:34,errorCodewordsPerBlock:10},M:{groups:[[1,28]],totalDataCodewords:28,errorCodewordsPerBlock:16},Q:{groups:[[1,22]],totalDataCodewords:22,errorCodewordsPerBlock:22},H:{groups:[[1,16]],totalDataCodewords:16,errorCodewordsPerBlock:28}},{L:{groups:[[1,55]],totalDataCodewords:55,errorCodewordsPerBlock:15},M:{groups:[[1,44]],totalDataCodewords:44,errorCodewordsPerBlock:26},Q:{groups:[[2,17]],totalDataCodewords:34,errorCodewordsPerBlock:18},H:{groups:[[2,13]],totalDataCodewords:26,errorCodewordsPerBlock:22}},{L:{groups:[[1,80]],totalDataCodewords:80,errorCodewordsPerBlock:20},M:{groups:[[2,32]],totalDataCodewords:64,errorCodewordsPerBlock:18},Q:{groups:[[2,24]],totalDataCodewords:48,errorCodewordsPerBlock:26},H:{groups:[[4,9]],totalDataCodewords:36,errorCodewordsPerBlock:16}},{L:{groups:[[1,108]],totalDataCodewords:108,errorCodewordsPerBlock:26},M:{groups:[[2,43]],totalDataCodewords:86,errorCodewordsPerBlock:24},Q:{groups:[[2,15],[2,16]],totalDataCodewords:62,errorCodewordsPerBlock:18},H:{groups:[[2,11],[2,12]],totalDataCodewords:46,errorCodewordsPerBlock:22}},{L:{groups:[[2,68]],totalDataCodewords:136,errorCodewordsPerBlock:18},M:{groups:[[4,27]],totalDataCodewords:108,errorCodewordsPerBlock:16},Q:{groups:[[4,19]],totalDataCodewords:76,errorCodewordsPerBlock:24},H:{groups:[[4,15]],totalDataCodewords:60,errorCodewordsPerBlock:28}},{L:{groups:[[2,78]],totalDataCodewords:156,errorCodewordsPerBlock:20},M:{groups:[[4,31]],totalDataCodewords:124,errorCodewordsPerBlock:18},Q:{groups:[[2,14],[4,15]],totalDataCodewords:88,errorCodewordsPerBlock:18},H:{groups:[[4,13],[1,14]],totalDataCodewords:66,errorCodewordsPerBlock:26}},{L:{groups:[[2,97]],totalDataCodewords:194,errorCodewordsPerBlock:24},M:{groups:[[2,38],[2,39]],totalDataCodewords:154,errorCodewordsPerBlock:22},Q:{groups:[[4,18],[2,19]],totalDataCodewords:110,errorCodewordsPerBlock:22},H:{groups:[[4,14],[2,15]],totalDataCodewords:86,errorCodewordsPerBlock:26}},{L:{groups:[[2,116]],totalDataCodewords:232,errorCodewordsPerBlock:30},M:{groups:[[3,36],[2,37]],totalDataCodewords:182,errorCodewordsPerBlock:22},Q:{groups:[[4,16],[4,17]],totalDataCodewords:132,errorCodewordsPerBlock:20},H:{groups:[[4,12],[4,13]],totalDataCodewords:100,errorCodewordsPerBlock:24}},{L:{groups:[[2,68],[2,69]],totalDataCodewords:274,errorCodewordsPerBlock:18},M:{groups:[[4,43],[1,44]],totalDataCodewords:216,errorCodewordsPerBlock:26},Q:{groups:[[6,19],[2,20]],totalDataCodewords:154,errorCodewordsPerBlock:24},H:{groups:[[6,15],[2,16]],totalDataCodewords:122,errorCodewordsPerBlock:28}},{L:{groups:[[4,81]],totalDataCodewords:324,errorCodewordsPerBlock:20},M:{groups:[[1,50],[4,51]],totalDataCodewords:254,errorCodewordsPerBlock:30},Q:{groups:[[4,22],[4,23]],totalDataCodewords:180,errorCodewordsPerBlock:28},H:{groups:[[3,12],[8,13]],totalDataCodewords:140,errorCodewordsPerBlock:24}},{L:{groups:[[2,92],[2,93]],totalDataCodewords:370,errorCodewordsPerBlock:24},M:{groups:[[6,36],[2,37]],totalDataCodewords:290,errorCodewordsPerBlock:22},Q:{groups:[[4,20],[6,21]],totalDataCodewords:206,errorCodewordsPerBlock:26},H:{groups:[[7,14],[4,15]],totalDataCodewords:158,errorCodewordsPerBlock:28}},{L:{groups:[[4,107]],totalDataCodewords:428,errorCodewordsPerBlock:26},M:{groups:[[8,37],[1,38]],totalDataCodewords:334,errorCodewordsPerBlock:22},Q:{groups:[[8,20],[4,21]],totalDataCodewords:244,errorCodewordsPerBlock:24},H:{groups:[[12,11],[4,12]],totalDataCodewords:180,errorCodewordsPerBlock:22}},{L:{groups:[[3,115],[1,116]],totalDataCodewords:461,errorCodewordsPerBlock:30},M:{groups:[[4,40],[5,41]],totalDataCodewords:365,errorCodewordsPerBlock:24},Q:{groups:[[11,16],[5,17]],totalDataCodewords:261,errorCodewordsPerBlock:20},H:{groups:[[11,12],[5,13]],totalDataCodewords:197,errorCodewordsPerBlock:24}},{L:{groups:[[5,87],[1,88]],totalDataCodewords:523,errorCodewordsPerBlock:22},M:{groups:[[5,41],[5,42]],totalDataCodewords:415,errorCodewordsPerBlock:24},Q:{groups:[[5,24],[7,25]],totalDataCodewords:295,errorCodewordsPerBlock:30},H:{groups:[[11,12],[7,13]],totalDataCodewords:223,errorCodewordsPerBlock:24}},{L:{groups:[[5,98],[1,99]],totalDataCodewords:589,errorCodewordsPerBlock:24},M:{groups:[[7,45],[3,46]],totalDataCodewords:453,errorCodewordsPerBlock:28},Q:{groups:[[15,19],[2,20]],totalDataCodewords:325,errorCodewordsPerBlock:24},H:{groups:[[3,15],[13,16]],totalDataCodewords:253,errorCodewordsPerBlock:30}},{L:{groups:[[1,107],[5,108]],totalDataCodewords:647,errorCodewordsPerBlock:28},M:{groups:[[10,46],[1,47]],totalDataCodewords:507,errorCodewordsPerBlock:28},Q:{groups:[[1,22],[15,23]],totalDataCodewords:367,errorCodewordsPerBlock:28},H:{groups:[[2,14],[17,15]],totalDataCodewords:283,errorCodewordsPerBlock:28}},{L:{groups:[[5,120],[1,121]],totalDataCodewords:721,errorCodewordsPerBlock:30},M:{groups:[[9,43],[4,44]],totalDataCodewords:563,errorCodewordsPerBlock:26},Q:{groups:[[17,22],[1,23]],totalDataCodewords:397,errorCodewordsPerBlock:28},H:{groups:[[2,14],[19,15]],totalDataCodewords:313,errorCodewordsPerBlock:28}},{L:{groups:[[3,113],[4,114]],totalDataCodewords:795,errorCodewordsPerBlock:28},M:{groups:[[3,44],[11,45]],totalDataCodewords:627,errorCodewordsPerBlock:26},Q:{groups:[[17,21],[4,22]],totalDataCodewords:445,errorCodewordsPerBlock:26},H:{groups:[[9,13],[16,14]],totalDataCodewords:341,errorCodewordsPerBlock:26}},{L:{groups:[[3,107],[5,108]],totalDataCodewords:861,errorCodewordsPerBlock:28},M:{groups:[[3,41],[13,42]],totalDataCodewords:669,errorCodewordsPerBlock:26},Q:{groups:[[15,24],[5,25]],totalDataCodewords:485,errorCodewordsPerBlock:30},H:{groups:[[15,15],[10,16]],totalDataCodewords:385,errorCodewordsPerBlock:28}},{L:{groups:[[4,116],[4,117]],totalDataCodewords:932,errorCodewordsPerBlock:28},M:{groups:[[17,42]],totalDataCodewords:714,errorCodewordsPerBlock:26},Q:{groups:[[17,22],[6,23]],totalDataCodewords:512,errorCodewordsPerBlock:28},H:{groups:[[19,16],[6,17]],totalDataCodewords:406,errorCodewordsPerBlock:30}},{L:{groups:[[2,111],[7,112]],totalDataCodewords:1006,errorCodewordsPerBlock:28},M:{groups:[[17,46]],totalDataCodewords:782,errorCodewordsPerBlock:28},Q:{groups:[[7,24],[16,25]],totalDataCodewords:568,errorCodewordsPerBlock:30},H:{groups:[[34,13]],totalDataCodewords:442,errorCodewordsPerBlock:24}},{L:{groups:[[4,121],[5,122]],totalDataCodewords:1094,errorCodewordsPerBlock:30},M:{groups:[[4,47],[14,48]],totalDataCodewords:860,errorCodewordsPerBlock:28},Q:{groups:[[11,24],[14,25]],totalDataCodewords:614,errorCodewordsPerBlock:30},H:{groups:[[16,15],[14,16]],totalDataCodewords:464,errorCodewordsPerBlock:30}},{L:{groups:[[6,117],[4,118]],totalDataCodewords:1174,errorCodewordsPerBlock:30},M:{groups:[[6,45],[14,46]],totalDataCodewords:914,errorCodewordsPerBlock:28},Q:{groups:[[11,24],[16,25]],totalDataCodewords:664,errorCodewordsPerBlock:30},H:{groups:[[30,16],[2,17]],totalDataCodewords:514,errorCodewordsPerBlock:30}},{L:{groups:[[8,106],[4,107]],totalDataCodewords:1276,errorCodewordsPerBlock:26},M:{groups:[[8,47],[13,48]],totalDataCodewords:1e3,errorCodewordsPerBlock:28},Q:{groups:[[7,24],[22,25]],totalDataCodewords:718,errorCodewordsPerBlock:30},H:{groups:[[22,15],[13,16]],totalDataCodewords:538,errorCodewordsPerBlock:30}},{L:{groups:[[10,114],[2,115]],totalDataCodewords:1370,errorCodewordsPerBlock:28},M:{groups:[[19,46],[4,47]],totalDataCodewords:1062,errorCodewordsPerBlock:28},Q:{groups:[[28,22],[6,23]],totalDataCodewords:754,errorCodewordsPerBlock:28},H:{groups:[[33,16],[4,17]],totalDataCodewords:596,errorCodewordsPerBlock:30}},{L:{groups:[[8,122],[4,123]],totalDataCodewords:1468,errorCodewordsPerBlock:30},M:{groups:[[22,45],[3,46]],totalDataCodewords:1128,errorCodewordsPerBlock:28},Q:{groups:[[8,23],[26,24]],totalDataCodewords:808,errorCodewordsPerBlock:30},H:{groups:[[12,15],[28,16]],totalDataCodewords:628,errorCodewordsPerBlock:30}},{L:{groups:[[3,117],[10,118]],totalDataCodewords:1531,errorCodewordsPerBlock:30},M:{groups:[[3,45],[23,46]],totalDataCodewords:1193,errorCodewordsPerBlock:28},Q:{groups:[[4,24],[31,25]],totalDataCodewords:871,errorCodewordsPerBlock:30},H:{groups:[[11,15],[31,16]],totalDataCodewords:661,errorCodewordsPerBlock:30}},{L:{groups:[[7,116],[7,117]],totalDataCodewords:1631,errorCodewordsPerBlock:30},M:{groups:[[21,45],[7,46]],totalDataCodewords:1267,errorCodewordsPerBlock:28},Q:{groups:[[1,23],[37,24]],totalDataCodewords:911,errorCodewordsPerBlock:30},H:{groups:[[19,15],[26,16]],totalDataCodewords:701,errorCodewordsPerBlock:30}},{L:{groups:[[5,115],[10,116]],totalDataCodewords:1735,errorCodewordsPerBlock:30},M:{groups:[[19,47],[10,48]],totalDataCodewords:1373,errorCodewordsPerBlock:28},Q:{groups:[[15,24],[25,25]],totalDataCodewords:985,errorCodewordsPerBlock:30},H:{groups:[[23,15],[25,16]],totalDataCodewords:745,errorCodewordsPerBlock:30}},{L:{groups:[[13,115],[3,116]],totalDataCodewords:1843,errorCodewordsPerBlock:30},M:{groups:[[2,46],[29,47]],totalDataCodewords:1455,errorCodewordsPerBlock:28},Q:{groups:[[42,24],[1,25]],totalDataCodewords:1033,errorCodewordsPerBlock:30},H:{groups:[[23,15],[28,16]],totalDataCodewords:793,errorCodewordsPerBlock:30}},{L:{groups:[[17,115]],totalDataCodewords:1955,errorCodewordsPerBlock:30},M:{groups:[[10,46],[23,47]],totalDataCodewords:1541,errorCodewordsPerBlock:28},Q:{groups:[[10,24],[35,25]],totalDataCodewords:1115,errorCodewordsPerBlock:30},H:{groups:[[19,15],[35,16]],totalDataCodewords:845,errorCodewordsPerBlock:30}},{L:{groups:[[17,115],[1,116]],totalDataCodewords:2071,errorCodewordsPerBlock:30},M:{groups:[[14,46],[21,47]],totalDataCodewords:1631,errorCodewordsPerBlock:28},Q:{groups:[[29,24],[19,25]],totalDataCodewords:1171,errorCodewordsPerBlock:30},H:{groups:[[11,15],[46,16]],totalDataCodewords:901,errorCodewordsPerBlock:30}},{L:{groups:[[13,115],[6,116]],totalDataCodewords:2191,errorCodewordsPerBlock:30},M:{groups:[[14,46],[23,47]],totalDataCodewords:1725,errorCodewordsPerBlock:28},Q:{groups:[[44,24],[7,25]],totalDataCodewords:1231,errorCodewordsPerBlock:30},H:{groups:[[59,16],[1,17]],totalDataCodewords:961,errorCodewordsPerBlock:30}},{L:{groups:[[12,121],[7,122]],totalDataCodewords:2306,errorCodewordsPerBlock:30},M:{groups:[[12,47],[26,48]],totalDataCodewords:1812,errorCodewordsPerBlock:28},Q:{groups:[[39,24],[14,25]],totalDataCodewords:1286,errorCodewordsPerBlock:30},H:{groups:[[22,15],[41,16]],totalDataCodewords:986,errorCodewordsPerBlock:30}},{L:{groups:[[6,121],[14,122]],totalDataCodewords:2434,errorCodewordsPerBlock:30},M:{groups:[[6,47],[34,48]],totalDataCodewords:1914,errorCodewordsPerBlock:28},Q:{groups:[[46,24],[10,25]],totalDataCodewords:1354,errorCodewordsPerBlock:30},H:{groups:[[2,15],[64,16]],totalDataCodewords:1054,errorCodewordsPerBlock:30}},{L:{groups:[[17,122],[4,123]],totalDataCodewords:2566,errorCodewordsPerBlock:30},M:{groups:[[29,46],[14,47]],totalDataCodewords:1992,errorCodewordsPerBlock:28},Q:{groups:[[49,24],[10,25]],totalDataCodewords:1426,errorCodewordsPerBlock:30},H:{groups:[[24,15],[46,16]],totalDataCodewords:1096,errorCodewordsPerBlock:30}},{L:{groups:[[4,122],[18,123]],totalDataCodewords:2702,errorCodewordsPerBlock:30},M:{groups:[[13,46],[32,47]],totalDataCodewords:2102,errorCodewordsPerBlock:28},Q:{groups:[[48,24],[14,25]],totalDataCodewords:1502,errorCodewordsPerBlock:30},H:{groups:[[42,15],[32,16]],totalDataCodewords:1142,errorCodewordsPerBlock:30}},{L:{groups:[[20,117],[4,118]],totalDataCodewords:2812,errorCodewordsPerBlock:30},M:{groups:[[40,47],[7,48]],totalDataCodewords:2216,errorCodewordsPerBlock:28},Q:{groups:[[43,24],[22,25]],totalDataCodewords:1582,errorCodewordsPerBlock:30},H:{groups:[[10,15],[67,16]],totalDataCodewords:1222,errorCodewordsPerBlock:30}},{L:{groups:[[19,118],[6,119]],totalDataCodewords:2956,errorCodewordsPerBlock:30},M:{groups:[[18,47],[31,48]],totalDataCodewords:2334,errorCodewordsPerBlock:28},Q:{groups:[[34,24],[34,25]],totalDataCodewords:1666,errorCodewordsPerBlock:30},H:{groups:[[20,15],[61,16]],totalDataCodewords:1276,errorCodewordsPerBlock:30}}],Mf="numeric",Of="alphanumeric",Bf="byte",Rf={1:0},Ef={0:1},Lf={15:20,16:20,18:24,19:24,22:20,24:22,26:24,28:20,30:20,31:24,32:28,33:24,36:18,37:22,39:20,40:24},If=[1,0,1,1,1],zf=[1,0,1],Vf={L:"01",M:"00",Q:"11",H:"10"},jf=["11101100","00010001"],Df=93,Hf=[function(t,e){return(t+e)%2==0},function(t,e){return t%2==0},function(t,e){return e%3==0},function(t,e){return(t+e)%3==0},function(t,e){return(Math.floor(t/2)+Math.floor(e/3))%2==0},function(t,e){return t*e%2+t*e%3==0},function(t,e){return(t*e%2+t*e%3)%2==0},function(t,e){return((t+e)%2+t*e%3)%2==0}],Uf=/^\d+/,Ff=new RegExp("^[A-Z $%*+./:-]+"),Nf=new RegExp("^[A-Z0-9 $%*+./:-]+"),Gf=new RegExp("^[^A-Z0-9 $%*+./:-]+"),Wf=8,Xf=5,qf=8,Yf=17,Zf=9,Qf=16,Kf=[[1,0],[1,25,0]];function $f(){Af.call(this),this.initProperties(),this.mode=mf[this.encodingMode]}function Jf(t,e,o,i){for(var r=0;r<t.length;r++)t[r][o][i]=e}function tg(t,e,o,i){for(var r=0;r<Hf.length;r++)t[r][o][i]=Hf[r](o,i)?1^e:parseInt(e,10)}function eg(t,e){for(var o,i=Kf[e-1],r=new Array(e).concat(t),n=new Array(r.length-i.length).concat(i),s=t.length,a=[],h=0;h<s;h++)o=function(t,e){for(var o=[],i=t.length-1;o[i]=Ef[(t[i]+e)%255],void 0!==t[--i];);return o}(n,Rf[r[r.length-1]]),n.splice(0,1),r=function(t,e){for(var o=[],i=t.length-2;0<=i;i--)o[i]=t[i]^e[i];return o}(o,r);for(h=r.length-1;0<=h;h--)a[e-1-h]=sf(r[h],8);return a}function og(t,e,o,i,r){var n,s=Uf.exec(t),s=s?s[0]:"",a=Ff.exec(t),a=a?a[0]:"",h=Nf.exec(t),h=h?h[0]:"",e=s&&(s.length>=e||t.length===s.length||s.length>=o&&!Nf.test(t.charAt(s.length)))?(n=Mf,s):h&&(t.length===h.length||h.length>=i||r===Of)?(n=Of,s||a):(n=Bf,h?h+Gf.exec(t.substring(h.length))[0]:Gf.exec(t)[0]);return{mode:n,modeString:e}}function ig(t,e){for(var o=0,i=Tf.length-1,r=Math.floor(Tf.length/2);t<Tf[r][e].totalDataCodewords?i=r:o=r,r=o+Math.floor((i-o)/2),1<i-o;);return t<=Tf[o][e].totalDataCodewords?r+1:i+1}function rg(t,e,o){var i=af(e),e=e.length-1,r=t<<e,t=sf(t,o-e),o=function(t,e){for(var o=e.toString(2).length,i=t.toString(2).length,r=t;o<=(i=(r^=e<<i-o).toString(2).length););return r}(r,i);return t+sf(o,e)}function ng(t,e){return parseInt(t.charAt(e),10)}function sg(t,e){for(var o=t[0],i=0,r=e.length,n=0,s=8;n<=8;n++)6!==n&&Jf(t,ng(e,r-1-i++),n,s);for(n=8,s=7;0<=s;s--)6!==s&&Jf(t,ng(e,r-1-i++),n,s);for(i=0,s=o.length-1,n=8;s>=o.length-8;s--)Jf(t,ng(e,r-1-i++),n,s);for(Jf(t,1,o.length-8,8),n=o.length-7,s=8;n<o.length;n++)Jf(t,ng(e,r-1-i++),n,s)}function ag(t,e){for(var o,i,r,n=t[0].length,s=n-11,a=n-11,h=0;h<e.length;h++)o=Math.floor(h/3),i=h%3,Jf(t,r=ng(e,e.length-h-1),0+o,s+i),Jf(t,r,a+i,0+o)}function hg(t,e,o,i){for(var r,n=e.length+2,s=e.length+1,a=0;a<e.length;a++)for(var h=a;h<n-a;h++)Jf(t,r=e[a],o+h,i+a),Jf(t,r,o+a,i+h),Jf(t,r,o+s-h,i+s-a),Jf(t,r,o+s-a,i+s-h)}function pg(t,e,o,i){for(var r=o,n=i,s=t[0];Jf(t,0,r,i),Jf(t,0,o,n),r+=e[0],n+=e[1],0<=r&&r<s.length;);}function lg(t,e,o,i,r){e[t][i]=(e[t][i]<<1^r)%128,e[t][i]===Df&&(o[t]+=40)}function cg(t,e,o,i,r,n){o[t][n]===i?r[t][n]++:(o[t][n]=i,5<=r[t][n]&&(e[t]+=3+r[t][n]-5),r[t][n]=1)}function ug(t,e,o){var o=(new(o&&0<=o.toLowerCase().indexOf("utf_8")?Pf:vf)).getEncodingResult(t,e),r=o.version,n=Tf[r-1][e],t=function(t,e){for(var o,i=0,r=[],n=[],s=e.groups,a=0;a<s.length;a++)for(var h=s[a][0],p=0;p<h;p++){for(var l=s[a][1],c=[],u=[],d=1;d<=l;d++)o=t.substring(i,i+8),c.push(o),u[l-d]=af(o),i+=8;r.push(c),n.push(eg(u,e.errorCodewordsPerBlock))}return[r,n]}(function(t){for(var e=8*n.totalDataCodewords,o=0,i=0,r=t;r.length<e&&o<"0000".length;)r+="0000".charAt(o++);for(r.length%8!=0&&(r+=new Array(9-r.length%8).join("0"));r.length<e;)r+=jf[i],i^=1;return r}(o.dataString),n),o=function(){for(var t=[],e=17+4*r,o=0;o<Hf.length;o++){t[o]=new Array(e);for(var i=0;i<e;i++)t[o][i]=new Array(e)}return t}(),i=(l=(s=o)[0].length,hg(s,If,0,0),pg(s,[-1,-1],7,7),hg(s,If,l-7,0),pg(s,[1,-1],l-8,7),hg(s,If,0,l-7),pg(s,[-1,1],7,l-8),o),s=r;if(!(s<2)){var a,h=i[0],p=h.length,l=Math.floor(s/7),c=[6],u=0;for((s=Lf[s])?a=(p-13-s)/l:s=a=(p-13)/(l+1),c.push(c[u++]+s);c[u]+a<p;)c.push(c[u++]+a);for(var d=0;d<c.length;d++)for(var f=0;f<c.length;f++)void 0===h[c[d]][c[f]]&&hg(i,zf,c[d]-2,c[f]-2)}for(var g=o,y=1,v=g[0].length,m=8;m<v-8;m++)Jf(g,y,6,m),Jf(g,y,m,6),y^=1;7<=r&&ag(o,sf(0,18)),sg(o,sf(0,15));for(var x,_,b,w=o,C=t,S=new gf(w[0]),k=0;k<C.length;k++)for(x=C[k],_=0;0<x.length;){for(var A=0;A<x.length;A++)for(var P=0;P<8;P++)b=S.getNextCell(),tg(w,x[A][_].charAt(P),b.row,b.column);for(_++;x[0]&&_===x[0].length;)x.splice(0,1)}for(;b=S.getNextRemainderCell();)tg(w,0,b.row,b.column);l=function(t){for(var e,o=[],i=[],r=[],n=[],s=[],a=t[0].length,h=0;h<t.length;h++)o[h]=0,r[h]=0,s[h]=[0,0],n[h]=[0,0],i[h]=[];for(var p=0;p<a;p++)for(var l=0;l<a;l++)for(var c=0;c<t.length;c++)e=t[c],r[c]+=parseInt(e[p][l],10),i[c][0]===e[p][l]&&p+1<a&&0<=l-1&&e[p+1][l]===i[c][0]&&e[p+1][l-1]===i[c][0]&&(o[c]+=3),lg(c,n,o,0,e[p][l]),lg(c,n,o,1,e[l][p]),cg(c,o,i,e[p][l],s,0),cg(c,o,i,e[l][p],s,1);var u,d,f,g,y=a*a,v=Number.MAX_VALUE;for(h=0;h<o.length;h++)o[h]+=(d=r[h],f=y,g=void 0,f=(d=Math.floor(d/f*100))%5,g=Math.abs(d-f-50),d=Math.abs(d+5-f-50),10*Math.min(g/5,d/5)),o[h]<v&&(v=o[h],u=h);return u}(o),s=o[l];return 7<=r&&ag([s],rg(r,"1111100100101",18)),sg([s],function(t){var e="";if(0===af(t))return"101010000010010";for(var o=rg(af(t),"10100110111",15),i=0;i<o.length;i++)e+=o.charAt(i)^"101010000010010".charAt(i);return e}(Vf[e]+sf(l,3))),s}for(var dg,fg=1;fg<255;fg++)255<(dg=2*Ef[fg-1])&&(dg^=285),Ef[fg]=dg,Rf[dg]=fg;dg=2*Ef[fg-1]^285,Ef[fg]=dg,Ef[-1]=0;for(var gg=2;gg<=68;gg++){var yg=Kf[gg-1];Kf[gg]=function(t,e){for(var o=[],i=0;i<t.length;i++)for(var r=0;r<e.length;r++)void 0===o[i+r]?o[i+r]=(t[i]+(0<=e[r]?e[r]:0))%255:o[i+r]=Rf[Ef[o[i+r]]^Ef[(t[i]+e[r])%255]];return o}(yg,[gg,0])}var vg,mg=Math.round,xg=[[0,1],[1,1],[1,2],[2,2],[2,1],[3,1],[3,0],[2,0],[2,-1],[1,-1],[1,0]],_g=[[0,1],[1,1],[1,0]],xd=((vg=b.Class)&&(bg.__proto__=vg),((bg.prototype=Object.create(vg&&vg.prototype)).constructor=bg).prototype.destroy=function(){this._destroySurface()},bg.prototype._initElement=function(){Q(this.element,"k-qrcode")},bg.prototype._initSurface=function(){var t=this.options,e=this.surface;e&&e.options.type===t.renderAs||(this._destroySurface(),this._initSurfaceElement(),this.surface=this._createSurface())},bg.prototype._createSurface=function(){return b.drawing.Surface.create(this.surfaceElement,{type:this.options.renderAs})},bg.prototype._destroySurface=function(){this.surface&&(this.surface.destroy(),this.surface=null,this._destroySurfaceElement())},bg.prototype._initSurfaceElement=function(){this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.surfaceElement.style.position="relative",this.element.appendChild(this.surfaceElement))},bg.prototype._destroySurfaceElement=function(){this.surfaceElement&&this.surfaceElement.parentNode&&(this.surfaceElement.parentNode.removeChild(this.surfaceElement),this.surfaceElement=null)},bg.prototype.redraw=function(){var t=this._getSize();this.surface.clear(),this.surface.setSize({width:t,height:t}),this.createVisual(),this.surface.draw(this.visual)},bg.prototype.getSize=function(){var t=this.element,e=t.clientWidth,t=t.clientHeight,o={width:0,height:0};return 0<e&&(o.width=e),t&&(o.height=t),o},bg.prototype._resize=function(){this.redraw()},bg.prototype.createVisual=function(){this.visual=this._render()},bg.prototype.exportVisual=function(){return this._render()},bg.prototype._render=function(){var t,e,o,i,r,n=this._value,s=this.options.border||{},a=this.options.padding||0,h=s.width||0,p=(s.width=h,new b.drawing.Group);try{n&&(o=ug(n,this.options.errorCorrection,this.options.encoding),r=(i=this._getSize())-2*(h+a),t=this._calculateBaseUnit(r,o.length),e=h+a+(r-o.length*t)/2,p.append(this._renderBackground(i,s)),p.append(this._renderMatrix(o,t,e)),this._hasCustomLogo()?p.append(this._renderLogo(i,t)):this._isSwiss()&&p.append(this._renderSwissCode(i,t)))}catch(t){this.onError(t)}return p},bg.prototype._renderLogo=function(t,e){var t=mg(t/2),e=this._getLogoSize(7*e),o=this.options.overlay.imageUrl,t={x:t-e.width/2,y:t-e.height/2},t=new b.geometry.Rect(new b.geometry.Point(t.x,t.y),new b.geometry.Size(e.width,e.height));return new b.drawing.Image(o,t)},bg.prototype._renderSwissCode=function(t,e){var o=this._getLogoSize(7*e),i=(o=Math.max(o.width,o.height))/4,r=i/2,t=t/2,n={},s=new b.drawing.Group;return n.x=n.y=Math.ceil(t-e-o/2),s.append(this._renderShape(n,Math.ceil(o+2*e),_g,"#fff")),n.x=n.y=t-o/2,s.append(this._renderShape(n,o,_g,this.options.color)),n.x=t+r-o/2,n.y=t+r+i-o/2,s.append(this._renderShape(n,i,xg,"#fff")),s},bg.prototype._renderShape=function(t,e,o,i){var r=new b.drawing.MultiPath({fill:{color:i},stroke:null});r.moveTo(t.x,t.y);for(var n=0;n<o.length;n++)r.lineTo(t.x+e*o[n][0],t.y+e*o[n][1]);return r.close(),r},bg.prototype._getSize=function(){var t;return this.options.size?parseInt(this.options.size,10):(t=Kd(this.element,this.options.renderAs),0<(t=Math.min(t.width,t.height))?t:200)},bg.prototype._calculateBaseUnit=function(t,e){var o,i=Math.floor(t/e);return i<1?(o=Math.ceil(+e),this.onError(new Error("Insufficient size for QR Code: the current size is "+t+"px and the minimum size is "+o+"px."))):t<=i*e&&1<=i-1&&i--,i},bg.prototype._renderMatrix=function(t,e,o){for(var i=new b.drawing.MultiPath({fill:{color:this.options.color},stroke:null}),r=0;r<t.length;r++)for(var n=o+r*e,s=0;s<t.length;){for(;0===t[r][s]&&s<t.length;)s++;if(s<t.length){for(var a=s;1===t[r][s];)s++;var a=mg(o+a*e),h=mg(n),p=mg(o+s*e),l=mg(n+e);i.moveTo(a,h).lineTo(a,l).lineTo(p,l).lineTo(p,h).close()}}return i},bg.prototype._renderBackground=function(t,e){t=new R(0,0,t,t).unpad(e.width/2);return b.drawing.Path.fromRect(t.toRect(),{fill:{color:this.options.background},stroke:{color:e.color,width:e.width}})},bg.prototype.setOptions=function(t){this.options=rf(this.options,t||{}),void 0!==t.value&&(this._value=String(this.options.value)),this._initSurface(),this.redraw()},bg.prototype.value=function(t){if(void 0===t)return this._value;this._value=String(t),this.redraw()},bg.prototype._hasCustomLogo=function(){return Boolean(this.options.overlay.imageUrl)},bg.prototype._isSwiss=function(){return"swiss"===this.options.overlay.type},bg.prototype._getLogoSize=function(t){var e=this.options.overlay.width,o=this.options.overlay.height;return e||o?e&&!o?o=e:!e&&o&&(e=o):e=o=t,{width:e,height:o}},bg);function bg(t,e,o){void 0===o&&(o=$t),vg.call(this),this.options=x({},this.options,e),this.element=t,this.wrapper=this.element,this.onError=o,this._initElement(),this._initSurface(),this.setOptions(e)}i(xd,{name:"QRCode",renderAs:"svg",encoding:"ISO_8859_1",value:"",errorCorrection:"L",background:"#fff",color:"#000",size:"",padding:0,border:{color:"",width:0},overlay:{type:"image",imageUrl:"",width:0,height:0}});function wg(e){return void 0===e&&(e="ISO_8859_1"),function(t){try{ug(t,"L",e)}catch(t){return{valid:!1,error:t}}return{valid:!0}}}var Cg=xd,Sg={WGS84:{a:6378137,b:6356752.314245179,f:.0033528106647474805,e:.08181919084262149}};function kg(t){return t*t}var Ag,Pg,Tg=Math,Mg=Tg.abs,Og=Tg.atan,Bg=Tg.atan2,Rg=Tg.cos,Eg=Tg.sin,Lg=Tg.tan,Ig=((Pg=b.Class)&&(Zg.__proto__=Pg),((Zg.prototype=Object.create(Pg&&Pg.prototype)).constructor=Zg).prototype.initProperties=function(){x(this,{DISTANCE_ITERATIONS:100,DISTANCE_CONVERGENCE:1e-12,DISTANCE_PRECISION:2,FORMAT:"{0:N6}{1:N6}"})},Zg.prototype.toArray=function(){return[this.lat,this.lng]},Zg.prototype.equals=function(t){return t&&t.lat===this.lat&&t.lng===this.lng},Zg.prototype.clone=function(){return new Zg(this.lat,this.lng)},Zg.prototype.round=function(t){return this.lng=M(this.lng,t),this.lat=M(this.lat,t),this},Zg.prototype.wrap=function(){return this.lng=this.lng%180,this.lat=this.lat%90,this},Zg.prototype.distanceTo=function(t,e){return this.greatCircleTo(t,e).distance},Zg.prototype.destination=function(t,e,o){var e=jt(e),o=o||Sg.WGS84,i=jt(this.lat),r=jt(this.lng),t=t/o.a,o=Tg.asin(Eg(i)*Rg(t)+Rg(i)*Eg(t)*Rg(e)),r=r+Bg(Eg(e)*Eg(t)*Rg(i),Rg(t)-Eg(i)*Eg(o));return new Zg(Ot(o),Ot(r))},Zg.prototype.greatCircleTo=function(t,e){var o=Zg.create(void 0),e=e||Sg.WGS84;if(!o||this.clone().round(8).equals(o.clone().round(8)))return{distance:0,azimuthFrom:0,azimuthTo:0};for(var i,r,n=e.a,s=e.b,a=e.f,h=jt(o.lng-this.lng),e=Og((1-a)*Lg(jt(this.lat))),p=Eg(e),l=Rg(e),e=Og((1-a)*Lg(jt(o.lat))),c=Eg(e),u=Rg(e),d=h,f=this.DISTANCE_ITERATIONS,g=!1;!g&&0<f--;)var y=Eg(d),v=Rg(d),m=Tg.sqrt(kg(u*y)+kg(l*c-p*u*v)),x=Bg(m,r=p*c+l*u*v),_=l*u*y/m,b=0,w=(0!=(i=1-kg(_))&&(b=r-2*p*c/i),d),C=a/16*i*(4+a*(4-3*i)),d=h+(1-C)*a*_*(x+C*m*(b+C*r*(2*kg(b)-1))),g=Mg(d-w)<=this.DISTANCE_CONVERGENCE;var o=i*(kg(n)-kg(s))/kg(s),e=1+o/16384*(4096+o*(o*(320-175*o)-768)),n=o/1024*(256+o*(o*(74-47*o)-128)),o=n*m*(b+n/4*(r*(2*kg(b)-1)-n/6*b*(4*kg(m)-3)*(4*kg(b)-3))),n=Bg(u*y,l*c-p*u*v),S=Bg(l*y,-p*u+l*c*v);return{distance:M(s*e*(x-o),this.DISTANCE_PRECISION),azimuthFrom:Ot(n),azimuthTo:Ot(S)}},Zg.prototype.toString=function(){return String(this.lat)+","+String(this.lng)},Zg.fromLngLat=function(t){return new Zg(t[1],t[0])},Zg.fromLatLng=function(t){return new Zg(t[0],t[1])},Zg.create=function(t,e){if(T(t))return t instanceof Zg?t.clone():1===arguments.length&&2===t.length?Zg.fromLatLng(t):new Zg(t,e)},Zg),zg=Math,Vg=zg.atan,jg=zg.exp,Dg=zg.pow,Hg=zg.sin,Ug=zg.log,Fg=zg.tan,Ng=b.geometry.Point,Gg=zg.PI,Wg=Gg/2,Xg=Gg/4,qg=Gg/180,Ku=Sg.WGS84,vd=((Ag=b.Class)&&(Yg.__proto__=Ag),((Yg.prototype=Object.create(Ag&&Ag.prototype)).constructor=Yg).prototype._initOptions=function(t){this.options=x({},this.options,t)},Yg.prototype.initProperties=function(){x(this,{MAX_LNG:180,MAX_LAT:85.0840590501,INVERSE_ITERATIONS:15,INVERSE_CONVERGENCE:1e-12})},Yg.prototype.forward=function(t,e){var o=this.options,i=o.datum.a,o=o.centralMeridian,r=_(t.lat,-this.MAX_LAT,this.MAX_LAT),e=e?_(t.lng,-this.MAX_LNG,this.MAX_LNG):t.lng,t=jt(e-o)*i,e=this._projectLat(r);return new Ng(t,e)},Yg.prototype._projectLat=function(t){var e=this.options.datum,o=e.e,e=e.a,t=jt(t),i=Fg(Xg+t/2),t=o*Hg(t),t=Dg((1-t)/(1+t),o/2);return e*Ug(i*t)},Yg.prototype.inverse=function(t,e){var o=this.options,i=o.datum.a,o=o.centralMeridian,i=t.x/(qg*i)+o,o=_(this._inverseY(t.y),-this.MAX_LAT,this.MAX_LAT);return e&&(i=_(i,-this.MAX_LNG,this.MAX_LNG)),new Ig(o,i)},Yg.prototype._inverseY=function(t){for(var e=this.options.datum,o=e.a,i=e.e,r=i/2,n=jg(-t/o),s=Wg-2*Vg(n),a=0;a<=this.INVERSE_ITERATIONS;a++){var h=i*Hg(s),h=Dg((1-h)/(1+h),r),h=Wg-2*Vg(n*h)-s;if(s+=h,zg.abs(h)<=this.INVERSE_CONVERGENCE)break}return Ot(s)},Yg);function Yg(t){Ag.call(this),this.initProperties(),this._initOptions(t)}function Zg(t,e){Pg.call(this),this.initProperties(),1===arguments.length?(this.lat=t[0],this.lng=t[1]):(this.lat=t,this.lng=e)}i(vd,{centralMeridian:0,datum:Ku});function Qg(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function Kg(t,e){e.insertBefore(t,e.firstChild)}function $g(t){return t.replace(/([a-z][A-Z])/g,function(t){return t.charAt(0)+"-"+t.charAt(1).toLowerCase()})}function Jg(t){return t&&String(t).endsWith("px")?t:String(t)+"px"}(oy=vd)&&(ly.__proto__=oy),((ly.prototype=Object.create(oy&&oy.prototype)).constructor=ly).prototype.initProperties=function(){oy.prototype.initProperties.call(this),x(this,{MAX_LAT:85.0511287798})},ly.prototype._projectLat=function(t){var e=this.options.datum.a,t=jt(t),t=Fg(Xg+t/2);return e*Ug(t)},ly.prototype._inverseY=function(t){var e=this.options.datum.a,t=jg(-t/e);return Ot(Wg-2*Vg(t))};var ty,ey,oy,iy=ly,ry=((ey=b.Class)&&(py.__proto__=ey),((py.prototype=Object.create(ey&&ey.prototype)).constructor=py).prototype.forward=function(t){return new Ng(t.lng,t.lat)},py.prototype.inverse=function(t){return new Ig(t.y,t.x)},(ty=b.Class)&&(hy.__proto__=ty),((hy.prototype=Object.create(ty&&ty.prototype)).constructor=hy).prototype.toPoint=function(t,e,o){return this._proj.forward(t,o).transform(this._tm).scale(e||1)},hy.prototype.toLocation=function(t,e,o){t=t.clone().scale(1/(e||1)).transform(this._itm);return this._proj.inverse(t,o)},hy),ny=(b.Class,b.Class,Object.defineProperty),sy=(Object.assign,function(t){var e=document.createElement("div");return e.innerHTML=t,e.firstChild}),ay=function(t){var e,o,i=!1,r=[],n={wp:/(Windows Phone(?: OS)?)\s(\d+)\.(\d+(\.\d+)?)/,fire:/(Silk)\/(\d+)\.(\d+(\.\d+)?)/,android:/(Android|Android.*(?:Opera|Firefox).*?\/)\s*(\d+)\.?(\d+(\.\d+)?)?/,iphone:/(iPhone|iPod).*OS\s+(\d+)[\._]([\d\._]+)/,ipad:/(iPad).*OS\s+(\d+)[\._]([\d_]+)/,meego:/(MeeGo).+NokiaBrowser\/(\d+)\.([\d\._]+)/,webos:/(webOS)\/(\d+)\.(\d+(\.\d+)?)/,blackberry:/(BlackBerry|BB10).*?Version\/(\d+)\.(\d+(\.\d+)?)/,playbook:/(PlayBook).*?Tablet\s*OS\s*(\d+)\.(\d+(\.\d+)?)/,windows:/(MSIE)\s+(\d+)\.(\d+(\.\d+)?)/,tizen:/(tizen).*?Version\/(\d+)\.(\d+(\.\d+)?)/i,sailfish:/(sailfish).*rv:(\d+)\.(\d+(\.\d+)?).*firefox/i,ffos:/(Mobile).*rv:(\d+)\.(\d+(\.\d+)?).*Firefox/},s={ios:/^i(phone|pad|pod)$/i,android:/^android|fire$/i,blackberry:/^blackberry|playbook/i,windows:/windows/,wp:/wp/,flat:/sailfish|ffos|tizen/i,meego:/meego/},a={tablet:/playbook|ipad|fire/i},h={omini:/Opera\sMini/i,omobile:/Opera\sMobi/i,firefox:/Firefox|Fennec/i,mobilesafari:/version\/.*safari/i,ie:/MSIE|Windows\sPhone/i,chrome:/chrome|crios/i,webkit:/webkit/i};for(o in n)if(n.hasOwnProperty(o)&&(r=t.match(n[o]))){if("windows"===o&&"plugins"in navigator)return!1;(i={}).device=o,i.tablet=cy(o,a,!1),i.browser=cy(t,h,"default"),i.name=cy(o,s),i[i.name]=!0,i.majorVersion=r[2],i.minorVersion=(r[3]||"0").replace("_","."),e=i.minorVersion.replace(".","").substr(0,2),i.flatVersion=i.majorVersion+e+new Array(3-(e.length<3?e.length:2)).join("0");break}return i};function hy(){ty.call(this);var t=this._proj=new iy,t=this.c=2*Gg*t.options.datum.a;this._tm=b.geometry.transform().translate(.5,.5).scale(1/t,-1/t),this._itm=b.geometry.transform().scale(t,-t).translate(-.5,-.5)}function py(){ey.apply(this,arguments)}function ly(){oy.apply(this,arguments)}function cy(t,e,o){for(var i in e)if(e.hasOwnProperty(i)&&e[i].test(t))return i;return void 0!==o?o:t}function uy(t,e){return t.bind(e)}function dy(t,e,o,i,r){ky(t,e,o,i,r)}function fy(t,e,o,i,r){var n,s,a;n=t,s=o,a=i,(Z(t=e)?t:(t||"").split(" ")).forEach(function(t){Ay(n,t,s,a)})}function gy(t){var e=Cy(navigator.userAgent);return t.replace(/([^ ]+)/g,function(t){return e[t]||t})}function yy(t,e){var o=t.prototype;o.events?e.forEach(function(t){o.events.indexOf(t)<0&&o.events.push(t)}):o.events=e}function vy(){return Number(new Date)}function my(){}function xy(){this._defaultPrevented=!0}function _y(){return!0===this._defaultPrevented}var by,wy,Cy=function(){var t={down:"touchstart mousedown",move:"mousemove touchmove",up:"mouseup touchend touchcancel",cancel:"mouseleave touchcancel"},e=Sy();return e.touch&&(e.mobileOS.ios||e.mobileOS.android)?t={down:"touchstart",move:"touchmove",up:"touchend touchcancel",cancel:"touchcancel"}:e.pointers?t={down:"pointerdown",move:"pointermove",up:"pointerup",cancel:"pointercancel pointerleave"}:e.msPointers&&(t={down:"MSPointerDown",move:"MSPointerMove",up:"MSPointerUp",cancel:"MSPointerCancel MSPointerLeave"}),t},Sy=function(){var t=ay(navigator.userAgent),e=function(t){var e,o=!1,i=[],r={edge:/(edge)[ \/]([\w.]+)/i,webkit:/(chrome|crios)[ \/]([\w.]+)/i,safari:/(webkit)[ \/]([\w.]+)/i,opera:/(opera)(?:.*version|)[ \/]([\w.]+)/i,msie:/(msie\s|trident.*? rv:)([\w.]+)/i,mozilla:/(mozilla)(?:.*? rv:([\w.]+)|)/i};for(e in r)if(r.hasOwnProperty(e)&&(i=t.match(r[e]))){(o={})[e]=!0,o[i[1].toLowerCase().split(" ")[0].split("/")[0]]=!0,o.version=parseInt(document.documentMode||i[2],10);break}return o}(navigator.userAgent),o=e.chrome,i=e.crios,r=e.mozilla,e=e.safari,n={},s=(n.mobileOS=t,n.touch="ontouchstart"in window,n.pointers=!o&&!i&&!r&&!e&&window.PointerEvent,n.msPointers=!o&&window.MSPointerEvent,n.mouseAndTouchPresent=n.touch&&!(n.mobileOS.ios||n.mobileOS.android),n.eventCapture=document.documentElement.addEventListener,document.createElement("table")),a=n.transitions=!1,h=n.transforms=!1;return["Moz","webkit","O","ms"].forEach(function(t){var e,o="string"==typeof s.style[t+"Transition"];if(o||"string"==typeof s.style[t+"Transform"])return e=t.toLowerCase(),h={css:"ms"!==e?"-"+e+"-":"",prefix:t,event:"o"===e||"webkit"===e?e:""},o&&((a=h).event=a.event?a.event+"TransitionEnd":"transitionend"),!1}),s=null,n.transforms=h,n.transitions=a,n.delayedClick=function(){if(n.touch){if(n.mobileOS.ios)return!0;if(n.mobileOS.android){if(!n.browser.chrome)return!0;if(n.browser.version<32)return!1;var t=document.querySelector("meta[name=viewport]");return!(t?t.getAttribute("content"):"").match(/user-scalable=no/i)}}return!1},n},ky=function(s,t,a,h,p){(Z(t)?t:(t||"").split(" ")).forEach(function(t){var o,e,i,r,n;n=i=h,(e=a)&&it(e)&&!i?n=e:e&&"string"==typeof e&&it(n)&&(r=e),(o=s).addEventListener(t,function(t){var e=t.target?t.target.closest(r):null;(!r||t.target&&e)&&(e=r?e:t.currentTarget,ny(t,"currentTarget",{value:e}),ny(t,"delegateTarget",{value:o}),n(t))},Boolean(p))})},Ay=function(t,e,o,i){t.removeEventListener(e,o,Boolean(i))},md=((wy=b.Class)&&(My.__proto__=wy),((My.prototype=Object.create(wy&&wy.prototype)).constructor=My).prototype.destroy=function(){this.unbind()},My.prototype.bind=function(t,e,o){var i,r,n=this,s="string"==typeof t?[t]:t||[],a="function"==typeof e;if(void 0===e){for(h in t)n.bind(h,t[h]);return n}for(var h=0,p=s.length;h<p;h++)!function(){var t=s[h];(r=a?e:e[t])&&(o&&(i=r,(r=function(){n.unbind(t,r),i.apply(n,arguments)}).original=i),(n._events[t]=n._events[t]||[]).push(r))}();return n},My.prototype.one=function(t,e){return this.bind(t,e,!0)},My.prototype.first=function(t,e){for(var o,i="string"==typeof t?[t]:t,r="function"==typeof e,n=0,s=i.length;n<s;n++){var a=i[n];(o=r?e:e[a])&&(this._events[a]=this._events[a]||[]).unshift(o)}return this},My.prototype.trigger=function(t,e){var o,i,r=this._events[t];if(r){var n=e||{};for(n.sender=this,n._defaultPrevented=!1,n.preventDefault=xy,n.isDefaultPrevented=_y,o=0,i=(r=r.slice()).length;o<i;o++)r[o].call(this,n);return!0===n._defaultPrevented}return!1},My.prototype.unbind=function(t,e){var o,i=this._events[t];if(void 0===t)this._events={};else if(i)if(e)for(o=i.length-1;0<=o;o--)i[o]!==e&&i[o].original!==e||i.splice(o,1);else this._events[t]=[];return this},My.prototype._setEvents=function(t){for(var e=(this.events||[]).length,o=0;o<e;o++){var i=this.events[o];this.options[i]&&t[i]&&(this.unbind(i,this.options[i]),this._events&&this._events[i]&&delete this._events[i])}this.bind(this.events,t)},My),Py=((by=md)&&(Ty.__proto__=by),((Ty.prototype=Object.create(by&&by.prototype)).constructor=Ty).prototype._initOptions=function(t){this.options=x({},this.options,t)},Ty.prototype.filter=function(t,e){this._extent=t,this._zoom=e,this._render()},Ty.prototype.add=function(t){var e=t;T(t)&&(this.items.push(e="string"==typeof t?{text:t}:e),this._render())},Ty.prototype.remove=function(t){for(var e=[],o=0;o<this.items.length;o++){var i=this.items[o];i.text!==t&&e.push(i)}this.items=e,this._render()},Ty.prototype.clear=function(){this.items=[],Qg(this.element)},Ty.prototype._render=function(){for(var t=[],e=0;e<this.items.length;e++){var o=this.items[e],o=this._itemText(o);""!==o&&t.push(o)}if(0<t.length){Qg(this.element);var i=t.join(this.options.separator),r=this.element,n=document.createElement("div");for(n.innerHTML=i;0<n.childNodes.length;)r.appendChild(n.childNodes[0]);this.showElement()}else this.hideElement()},Ty.prototype.hideElement=function(){this.element.style.display="none"},Ty.prototype.showElement=function(){this.element.style.display=""},Ty.prototype._itemText=function(t){var e="",o=this._inZoomLevel(t.minZoom,t.maxZoom),i=this._inArea(t.extent);return o&&i&&(e+=t.text),e},Ty.prototype._inZoomLevel=function(t,e){t=O(t,-Number.MAX_VALUE),e=O(e,Number.MAX_VALUE);return this._zoom>t&&this._zoom<e},Ty.prototype._inArea=function(t){var e=!0;return e=t?t.contains(this._extent):e},Ty);function Ty(t,e){by.call(this),this.element=t,this._initOptions(e),this.items=[],Q(this.element,"k-widget k-attribution")}function My(){wy.call(this),this._events={}}i(Py,{name:"Attribution",separator:" | "});var Oy={up:{className:"k-navigator-n",iconClass:"k-i-arrow-n"},down:{className:"k-navigator-s",iconClass:"k-i-arrow-s"},right:{className:"k-navigator-e",iconClass:"k-i-arrow-e"},left:{className:"k-navigator-w",iconClass:"k-i-arrow-w"}};function By(t){t='<button class="k-button k-button-square k-rounded-full k-button-flat k-button-flat-base k-icon-button '+Oy[t].className+'" aria-label="move '+t+'"><span class="k-icon '+Oy[t].iconClass+'" /></button>';return sy(t)}(Ry=md)&&(Ly.__proto__=Ry),((Ly.prototype=Object.create(Ry&&Ry.prototype)).constructor=Ly).prototype.destroy=function(){this.dispose()},Ly.prototype.dispose=function(){fy(this._keyroot,"keydown",this._keydownHandler)},Ly.prototype._tabindex=function(t){var t=t||this.wrapper||this.element,e=this.element,o=t.getAttribute("tabindex")||e.getAttribute("tabindex");e.removeAttribute("tabindex"),t.setAttribute("tabindex",isNaN(o)?0:o)},Ly.prototype._initOptions=function(t){this.options=x({},this.options,t)},Ly.prototype._pan=function(t,e){var o=this.options.panStep;this.trigger("pan",{x:t*o,y:e*o})},Ly.prototype._click=function(t){var e=0,o=0,i=t.currentTarget;i.matches(".k-navigator-n")?o=1:i.matches(".k-navigator-s")?o=-1:i.matches(".k-navigator-e")?e=1:i.matches(".k-navigator-w")&&(e=-1),this._pan(e,o),t.preventDefault()},Ly.prototype._keydown=function(t){switch(t.which){case Jt.UP:this._pan(0,1),t.preventDefault();break;case Jt.DOWN:this._pan(0,-1),t.preventDefault();break;case Jt.RIGHT:this._pan(1,0),t.preventDefault();break;case Jt.LEFT:this._pan(-1,0),t.preventDefault()}};var Ry,Ey=Ly;function Ly(t,e){Ry.call(this),this.element=t,this._initOptions(e);var t=By("up"),e=By("right"),o=By("down"),i=By("left"),t=(this.element.appendChild(t),this.element.appendChild(e),this.element.appendChild(o),this.element.appendChild(i),Q(this.element,"k-widget k-navigator"),dy(this.element,"click",".k-button",uy(this._click,this)),this.element.parentNode.closest("[data-role]"));this._keyroot=t||this.element,this._tabindex(this._keyroot),this._keydownHandler=uy(this._keydown,this),dy(this._keyroot,"keydown",this._keydownHandler)}function Iy(t,e){return sy('<button class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-base k-icon-button k-zoom-'+t+'" title="zoom-'+t+'" aria-label="zoom-'+t+'"><span class="k-icon '+e+'"></span></button>')}i(Ey,{name:"Navigator",panStep:1}),yy(Ey,["pan"]);(zy=md)&&(jy.__proto__=zy),((jy.prototype=Object.create(zy&&zy.prototype)).constructor=jy).prototype.destroy=function(){this.element&&fy(this.element,"click",this._clickHandler),this._keyroot&&fy(this._keyroot,"keydown",this._keydownHandler)},jy.prototype._tabindex=function(t){var t=t||this.wrapper||this.element,e=this.element,o=t.getAttribute("tabindex")||e.getAttribute("tabindex");e.removeAttribute("tabindex"),t.setAttribute("tabindex",isNaN(o)?0:o)},jy.prototype._initOptions=function(t){this.options=x({},this.options,t)},jy.prototype._change=function(t){var e=this.options.zoomStep;this.trigger("change",{delta:t*e})},jy.prototype._click=function(t){var e=1;mt(t.currentTarget,"k-zoom-out")&&(e=-1),this._change(e),t.preventDefault()},jy.prototype._keydown=function(t){switch(t.which){case Jt.NUMPAD_PLUS:case 187:case 61:this._change(1);break;case Jt.NUMPAD_MINUS:case 189:case 173:this._change(-1)}};var zy,Vy=jy;function jy(t,e){zy.call(this),this.element=t,this._initOptions(e);t=Iy("in","k-i-plus"),e=Iy("out","k-i-minus"),this.element.appendChild(t),this.element.appendChild(e),Q(this.element,"k-widget k-zoom-control k-button-group k-group-horizontal"),this._clickHandler=this._click.bind(this),dy(this.element,"click",".k-button",this._clickHandler),t=this.element.parentNode.closest("[data-role]");this._keyroot=t||this.element,this._tabindex(this._keyroot),this._keydownHandler=this._keydown.bind(this),dy(this._keyroot,"keydown",this._keydownHandler)}i(Vy,{name:"ZoomControl",zoomStep:1}),yy(Vy,["change"]);var Dy,Hy,$u=Math,Uy=$u.max,Fy=$u.min,Ny=((Hy=b.Class)&&(qy.__proto__=Hy),zd={World:{configurable:!0}},((qy.prototype=Object.create(Hy&&Hy.prototype)).constructor=qy).prototype.contains=function(t){var e=this.nw,o=this.se,i=O(t.lng,t[1]),r=O(t.lat,t[0]);return t&&i+180>=e.lng+180&&i+180<=o.lng+180&&r+90>=o.lat+90&&r+90<=e.lat+90},qy.prototype.center=function(){var t=this.nw,e=this.se,o=t.lng+(e.lng-t.lng)/2,e=t.lat+(e.lat-t.lat)/2;return new Ig(e,o)},qy.prototype.containsAny=function(t){for(var e=!1,o=0;o<t.length;o++)e=e||this.contains(t[o]);return e},qy.prototype.include=function(t){var e=this.nw,o=this.se,i=O(t.lng,t[1]),t=O(t.lat,t[0]);e.lng=Fy(e.lng,i),e.lat=Uy(e.lat,t),o.lng=Uy(o.lng,i),o.lat=Fy(o.lat,t)},qy.prototype.includeAll=function(t){for(var e=0;e<t.length;e++)this.include(t[e])},qy.prototype.edges=function(){var t=this.nw,e=this.se;return{nw:this.nw,ne:new Ig(t.lat,e.lng),se:this.se,sw:new Ig(e.lat,t.lng)}},qy.prototype.toArray=function(){var t=this.nw,e=this.se;return[t,new Ig(t.lat,e.lng),e,new Ig(e.lat,t.lng)]},qy.prototype.overlaps=function(t){return this.containsAny(t.toArray())||t.containsAny(this.toArray())},qy.create=function(t,e){return t instanceof qy?t:t&&e?new qy(t,e):t&&4===t.length&&!e?new qy([t[0],t[1]],[t[2],t[3]]):void 0},zd.World.get=function(){return new qy([90,-180],[-90,180])},Object.defineProperties(qy,zd),qy),Vd=((Dy=b.Class)&&(Xy.__proto__=Dy),((Xy.prototype=Object.create(Dy&&Dy.prototype)).constructor=Xy).prototype.destroy=function(){this._deactivate()},Xy.prototype._initOptions=function(t){this.options=x({},this.options,t)},Xy.prototype.show=function(){this.reset(),this._activate(),this._applyExtent(!0)},Xy.prototype.hide=function(){this._deactivate(),this._setVisibility(!1)},Xy.prototype.reset=function(){this._beforeReset(),this._reset()},Xy.prototype._reset=function(){this._applyExtent()},Xy.prototype._beforeReset=function(){},Xy.prototype._resize=function(){},Xy.prototype._panEnd=function(){this._applyExtent()},Xy.prototype._applyExtent=function(){var t=this.options,e=this.map.zoom(),o=!T(t.minZoom)||e>=t.minZoom,e=!T(t.maxZoom)||e<=t.maxZoom,t=Ny.create(t.extent),t=!t||t.overlaps(this.map.extent());this._setVisibility(o&&e&&t)},Xy.prototype._setVisibility=function(t){this.element.style.display=t?"":"none"},Xy.prototype._activate=function(){var t=this.map;this._deactivate(),t.bind("beforeReset",this._beforeReset),t.bind("reset",this._reset),t.bind("resize",this._resize),t.bind("panEnd",this._panEnd)},Xy.prototype._deactivate=function(){var t=this.map;t.unbind("beforeReset",this._beforeReset),t.unbind("reset",this._reset),t.unbind("resize",this._resize),t.unbind("panEnd",this._panEnd)},Xy.prototype._updateAttribution=function(){var t=this.map.attribution;t&&t.add(this.options.attribution)},Xy.prototype._readData=function(){return this.options.data||[]},Xy.prototype._hasData=function(){return this._data&&0<this._data.length},Xy),Gy=Math,Wy=b.geometry.Point;function Xy(t,e){Dy.call(this),this.support=Sy(),this._initOptions(e),this.map=t;e=document.createElement("div");Q(e,"k-layer"),e.style.zIndex=this.options.zIndex,e.style.opacity=this.options.opacity,this.element=e,t.scrollElement.appendChild(this.element),this._beforeReset=this._beforeReset.bind(this),this._reset=this._reset.bind(this),this._resize=this._resize.bind(this),this._panEnd=this._panEnd.bind(this),this._activate(),this._updateAttribution()}function qy(t,e){Hy.call(this);t=Ig.create(t),e=Ig.create(e);t.lng+180>e.lng+180&&t.lat+90<e.lat+90?(this.se=t,this.nw=e):(this.se=e,this.nw=t)}function Yy(t){return it(t)?t:ut.compile(t)}function Zy(t){var e=t;return"string"!=typeof t&&(e+="px"),e}(Qy=Vd)&&(Ky.__proto__=Qy),((Ky.prototype=Object.create(Qy&&Qy.prototype)).constructor=Ky).prototype.destroy=function(){Qy.prototype.destroy.call(this),this._view.destroy(),this._view=null},Ky.prototype._beforeReset=function(){var t=this.map,t=t.locationToLayer(t.extent().nw).round();this._view.viewOrigin(t)},Ky.prototype._reset=function(){Qy.prototype._reset.call(this),this._updateView(),this._view.reset()},Ky.prototype._viewType=function(){return tv},Ky.prototype._activate=function(){Qy.prototype._activate.call(this),this.support.mobileOS||(this._pan||(this._pan=Object(b.throttle)(this._render.bind(this),100)),this.map.bind("pan",this._pan))},Ky.prototype._deactivate=function(){Qy.prototype._deactivate.call(this),this._pan&&this.map.unbind("pan",this._pan)},Ky.prototype._updateView=function(){var t=this._view,e=this.map,o=e.extent(),o={nw:e.locationToLayer(o.nw).round(),se:e.locationToLayer(o.se).round()};t.center(e.locationToLayer(e.center())),t.extent(o),t.zoom(e.zoom())},Ky.prototype._resize=function(){this._render()},Ky.prototype._panEnd=function(t){Qy.prototype._panEnd.call(this,t),this._render()},Ky.prototype._render=function(){this._updateView(),this._view.render()};var Qy,jd=Ky;function Ky(t,e){Qy.call(this,t,e),"string"==typeof this.options.subdomains&&(this.options.subdomains=this.options.subdomains.split(""));t=this._viewType();this._view=new t(this.element,this.options)}i(jd,{tileSize:256,subdomains:["a","b","c"],urlTemplate:"",zIndex:1});(Jy=b.Class)&&(iv.__proto__=Jy),((iv.prototype=Object.create(Jy&&Jy.prototype)).constructor=iv).prototype._initOptions=function(t){this.options=x({},this.options,t)},iv.prototype.center=function(t){this._center=t},iv.prototype.extent=function(t){this._extent=t},iv.prototype.viewOrigin=function(t){this._viewOrigin=t},iv.prototype.zoom=function(t){this._zoom=t},iv.prototype.pointToTileIndex=function(t){return new Wy(Gy.floor(t.x/this.options.tileSize),Gy.floor(t.y/this.options.tileSize))},iv.prototype.tileCount=function(){var t=this.size(),e=this.pointToTileIndex(this._extent.nw),o=this._extent.nw,e=this.indexToPoint(e).translate(-o.x,-o.y);return{x:Gy.ceil((Gy.abs(e.x)+t.width)/this.options.tileSize),y:Gy.ceil((Gy.abs(e.y)+t.height)/this.options.tileSize)}},iv.prototype.size=function(){var t=this._extent.nw,t=this._extent.se.clone().translate(-t.x,-t.y);return{width:t.x,height:t.y}},iv.prototype.indexToPoint=function(t){var e=t.x,t=t.y;return new Wy(e*this.options.tileSize,t*this.options.tileSize)},iv.prototype.subdomainText=function(){var t=this.options.subdomains;return t[this.subdomainIndex++%t.length]},iv.prototype.destroy=function(){Qg(this.element),this.pool.empty()},iv.prototype.reset=function(){this.pool.reset(),this.subdomainIndex=0,this.render()},iv.prototype.render=function(){for(var t,e,o=this.tileCount(),i=this.pointToTileIndex(this._extent.nw),r=0;r<o.x;r++)for(e=0;e<o.y;e++)(t=this.createTile({x:i.x+r,y:i.y+e})).visible||t.show()},iv.prototype.createTile=function(t){t=this.tileOptions(t),t=this.pool.get(this._center,t);return t.element.parentNode||this.element.append(t.element),t},iv.prototype.tileOptions=function(t){var e=this.wrapIndex(t),o=this.indexToPoint(t),i=this._viewOrigin;return{index:e,currentIndex:t,point:o,offset:(e=o.clone().translate(-i.x,-i.y),new Wy(M(e.x),M(e.y))),zoom:this._zoom,size:this.options.tileSize,subdomain:this.subdomainText(),urlTemplate:this.options.urlTemplate,errorUrlTemplate:this.options.errorUrlTemplate}},iv.prototype.wrapIndex=function(t){var e=Gy.pow(2,this._zoom);return{x:this.wrapValue(t.x,e),y:_(t.y,0,e-1)}},iv.prototype.wrapValue=function(t,e){var o=Gy.abs(t)%e;return 0<=t?o:e-(0==o?e:o)};var $y,Jy,tv=iv,ev=(($y=b.Class)&&(ov.__proto__=$y),((ov.prototype=Object.create($y&&$y.prototype)).constructor=ov).prototype.destroy=function(){var t=this.element,e=t?t.parentNode:null;t&&(e&&e.removeChild(t),this.element=null)},ov.prototype._initOptions=function(t){this.options=x({},this.options,t)},ov.prototype.createElement=function(){var t=document.createElement("img"),e=this.options.size+"px";t.style.position="absolute",t.style.display="block",t.style.width=t.style.maxWidth=e,t.style.height=t.style.maxHeight=e,this.element=t},ov.prototype.show=function(){var t=this.element,e=(t.style.top=Zy(this.options.offset.y),t.style.left=Zy(this.options.offset.x),this.url());e&&t.setAttribute("src",e),t.style.visibility="visible",this.visible=!0},ov.prototype.hide=function(){this.element.style.visibility="hidden",this.visible=!1},ov.prototype.url=function(){return Yy(this.options.urlTemplate)(this.urlOptions())},ov.prototype.errorUrl=function(){return Yy(this.options.errorUrlTemplate)(this.urlOptions())},ov.prototype.urlOptions=function(){var t=this.options;return{zoom:t.zoom,subdomain:t.subdomain,z:t.zoom,x:t.index.x,y:t.index.y,s:t.subdomain,quadkey:t.quadkey,q:t.quadkey,culture:t.culture,c:t.culture}},ov);function ov(t,e){$y.call(this),this.id=t,this.visible=!0,this._initOptions(e),this.createElement(),this.show()}function iv(t,e){Jy.call(this),this.element=t,this._initOptions(e),this.pool=new nv}i(ev,{urlTemplate:"",errorUrlTemplate:""});(rv=b.Class)&&(sv.__proto__=rv),((sv.prototype=Object.create(rv&&rv.prototype)).constructor=sv).prototype.get=function(t,e){return this._items.length>=this.options.maxSize&&this._remove(t),this._create(e)},sv.prototype.empty=function(){for(var t=this._items,e=0;e<t.length;e++)t[e].destroy();this._items=[]},sv.prototype.reset=function(){for(var t=this._items,e=0;e<t.length;e++)t[e].hide()},sv.prototype._create=function(t){for(var e,o=this._items,i=It(t.point.toString()+t.offset.toString()+t.zoom+t.urlTemplate),r=0;r<o.length;r++)if(o[r].id===i){e=o[r];break}return e?e.show():(e=new ev(i,t),this._items.push(e)),e},sv.prototype._remove=function(t){for(var e=this._items,o=-1,i=-1,r=0;r<e.length;r++){var n=e[r].options.point.distanceTo(t);o<n&&!e[r].visible&&(i=r,o=n)}-1!==i&&(e[i].destroy(),e.splice(i,1))};var rv,nv=sv;function sv(){rv.call(this),this._items=[]}i(nv,{maxSize:100});function av(t,e,o){return"translate3d("+t+"px,"+e+"px,0) scale("+o+")"}var hv,pv,lv,cv,uv,dv,fv,gv=Object.assign,yv="change",vv=((fv=md)&&(Ov.__proto__=fv),((Ov.prototype=Object.create(fv&&fv.prototype)).constructor=Ov).prototype.captureNext=function(){this.capture=!0},Ov.prototype.cancelCapture=function(){this.capture=!1},Ov.prototype._press=function(t){this.trigger("press"),this.capture&&t.preventDefault()},Ov.prototype._release=function(t){this.trigger("release"),this.capture&&(t.preventDefault(),this.cancelCapture())},Ov),mv=((dv=md)&&(Mv.__proto__=dv),((Mv.prototype=Object.create(dv&&dv.prototype)).constructor=Mv).prototype.makeVirtual=function(){gv(this,{virtual:!0,forcedEnabled:!0,_virtualMin:0,_virtualMax:0})},Mv.prototype.virtualSize=function(t,e){this._virtualMin===t&&this._virtualMax===e||(this._virtualMin=t,this._virtualMax=e,this.update())},Mv.prototype.outOfBounds=function(t){return t>this.max||t<this.min},Mv.prototype.forceEnabled=function(){this.forcedEnabled=!0},Mv.prototype.getSize=function(){return this.container[this.measure]},Mv.prototype.getTotal=function(){return this.element[this.scrollSize]},Mv.prototype.rescale=function(t){this.scale=t},Mv.prototype.update=function(t){var e=this.virtual?this._virtualMax:this.getTotal(),o=e*this.scale,i=this.getSize();0===e&&!this.forcedEnabled||(this.max=this.virtual?-this._virtualMin:0,this.size=i,this.total=o,this.min=Math.min(this.max,i-o),this.minScale=i/e,this.centerOffset=(o-i)/2,this.enabled=this.forcedEnabled||i<o,t||this.trigger(yv,this))},Mv),xv=((uv=md)&&(Tv.__proto__=uv),((Tv.prototype=Object.create(uv&&uv.prototype)).constructor=Tv).prototype.rescale=function(t){this.x.rescale(t),this.y.rescale(t),this.refresh()},Tv.prototype.centerCoordinates=function(){return{x:Math.min(0,-this.x.centerOffset),y:Math.min(0,-this.y.centerOffset)}},Tv.prototype.refresh=function(){this.x.update(),this.y.update(),this.enabled=this.x.enabled||this.y.enabled,this.minScale=this.forcedMinScale||Math.min(this.x.minScale,this.y.minScale),this.fitScale=Math.max(this.x.minScale,this.y.minScale),this.trigger(yv)},Tv),_v=((cv=md)&&(Pv.__proto__=cv),((Pv.prototype=Object.create(cv&&cv.prototype)).constructor=Pv).prototype.outOfBounds=function(){return this.dimension.outOfBounds(this.movable[this.axis])},Pv.prototype.dragMove=function(t){var e,o=this.dimension,i=this.axis,r=this.movable,n=r[i]+t;o.enabled&&(e=t,(n<o.min&&t<0||n>o.max&&0<t)&&(e*=this.resistance),r.translateAxis(i,e),this.trigger(yv,this))},Pv),bv=((lv=b.Class)&&(Av.__proto__=lv),(Av.prototype=Object.create(lv&&lv.prototype)).constructor=Av),wv=((pv=md)&&(kv.__proto__=pv),((kv.prototype=Object.create(pv&&pv.prototype)).constructor=kv).prototype.translateAxis=function(t,e){this[t]+=e,this.refresh()},kv.prototype.scaleTo=function(t){this.scale=t,this.refresh()},kv.prototype.scaleWith=function(t){this.scale*=t,this.refresh()},kv.prototype.translate=function(t){this.x+=t.x,this.y+=t.y,this.refresh()},kv.prototype.moveAxis=function(t,e){this[t]=e,this.refresh()},kv.prototype.moveTo=function(t){gv(this,t),this.refresh()},kv.prototype.refresh=function(){var t=this.x,e=this.y;this.round&&(t=Math.round(t),e=Math.round(e)),(t=av(t,e,this.scale))!==this.coordinates&&(this.element.style[this.transformStyle]=t,this._saveCoordinates(t),this.trigger(yv))},kv.prototype._saveCoordinates=function(t){this.coordinates=t},kv),Cv=b.drawing.Group,Id=((hv=Vd)&&(Sv.__proto__=hv),((Sv.prototype=Object.create(hv&&hv.prototype)).constructor=Sv).prototype.destroy=function(){hv.prototype.destroy.call(this),this.surface.destroy()},Sv.prototype._reset=function(){hv.prototype._reset.call(this),this._translateSurface(),this._data=this._readData(),this._hasData()&&this._load(this._data)},Sv.prototype._initRoot=function(){this._root=new Cv,this.surface.draw(this._root)},Sv.prototype._beforeReset=function(){this.surface.clear(),this._initRoot()},Sv.prototype._resize=function(){this.surface.size(this.map.size())},Sv.prototype._readData=function(){var t=hv.prototype._readData.call(this);return"FeatureCollection"===t.type?t.features:"GeometryCollection"===t.type?t.geometries:t},Sv.prototype._load=function(t){this._data=t,this._clearMarkers(),this._loader||(this._loader=new Ev(this.map,this.options.style,this));for(var e=new Cv,o=0;o<t.length;o++){var i=this._loader.parse(t[o]);i&&e.append(i)}this._root.clear(),this._root.append(e)},Sv.prototype.shapeCreated=function(t){var e=!1;return e=(e=t instanceof b.drawing.Circle&&this.map.options.renderPointsAsMarkers?T(this._createMarker(t)):e)?e:this.map.trigger("shapeCreated",{layer:this,shape:t})},Sv.prototype.featureCreated=function(t){(t.layer=this).map.trigger("shapeFeatureCreated",t)},Sv.prototype._createMarker=function(t){t=this.map.markers.bind({location:t.location},t.dataItem);return t&&this._markers.push(t),t},Sv.prototype._clearMarkers=function(){for(var t=0;t<this._markers.length;t++)this.map.markers.remove(this._markers[t]);this._markers=[]},Sv.prototype._pan=function(){this._panning||(this._panning=!0,this.surface.suspendTracking())},Sv.prototype._panEnd=function(t){hv.prototype._panEnd.call(this,t),this._translateSurface(),this.surface.resumeTracking(),this._panning=!1},Sv.prototype._translateSurface=function(){var t=this.map,t=t.locationToView(t.extent().nw);this.surface.translate&&(this.surface.translate(t),this.movable.moveTo({x:t.x,y:t.y}))},Sv.prototype._handler=function(e){var o=this;return function(t){t.element&&(t={layer:o,layerIndex:(o.map.layers||[]).indexOf(o),shape:t.element,shapeIndex:(o._data||[]).indexOf(t.element.dataItem),originalEvent:t.originalEvent},o.map.trigger(e,t))}},Sv.prototype._activate=function(){hv.prototype._activate.call(this),this._panHandler=uy(this._pan,this),this.map.bind("pan",this.panHandler)},Sv.prototype._deactivate=function(){hv.prototype._deactivate.call(this),this.map.unbind("pan",this._panHandler)},Sv);function Sv(t,e){hv.call(this,t,e),this._pan=uy(this._pan,this),this.surface=b.drawing.Surface.create(this.element,{width:t.scrollElement.clientWidth,height:t.scrollElement.clientHeight}),this._initRoot(),this.movable=new wv(this.surface.element),this._markers=[],this._click=this._handler("shapeClick"),this.surface.bind("click",this._click),this._mouseenter=this._handler("shapeMouseEnter"),this.surface.bind("mouseenter",this._mouseenter),this._mouseleave=this._handler("shapeMouseLeave"),this.surface.bind("mouseleave",this._mouseleave)}function kv(t){pv.call(this),this.support=Sy(),this.transformStyle=this.support.transitions.prefix+"Transform",this.element=t,this.element.style.webkitTransformOrigin="left top",this.x=0,this.y=0,this.scale=1;t=av(this.x,this.y,this.scale);this.element.style[this.transformStyle]=t,this._saveCoordinates(t)}function Av(t){lv.call(this);var s,a,h,p=this;gv(p,{elastic:!0},t),t=p.elastic?.5:0,h=p.movable,p.x=s=new _v({axis:"x",dimension:p.dimensions.x,resistance:t,movable:h}),p.y=a=new _v({axis:"y",dimension:p.dimensions.y,resistance:t,movable:h}),p.userEvents.bind(["press","move","end","gesturestart","gesturechange"],{gesturestart:function(t){p.gesture=t,p.offset=Bt(p.dimensions.container)},press:function(t){var e=t.event.target.closest("a");e&&e.matches("[data-navigate-on-press=true]")&&t.sender.cancel()},gesturechange:function(t){var e=p.gesture,o=e.center,i=t.center,e=t.distance/e.distance,r=p.dimensions.minScale,n=p.dimensions.maxScale,r=(h.scale<=r&&e<1&&(e+=.8*(1-e)),h.scale*e>=n&&(e=n/h.scale),h.x+p.offset.left),n=h.y+p.offset.top,r={x:(r-o.x)*e+i.x-r,y:(n-o.y)*e+i.y-n};h.scaleWith(e),s.dragMove(r.x),a.dragMove(r.y),p.dimensions.rescale(h.scale),(p.gesture=t).preventDefault()},move:function(t){t.event.target.tagName.match(/textarea|input/i)||(s.dimension.enabled||a.dimension.enabled?(s.dragMove(t.x.delta),a.dragMove(t.y.delta),t.preventDefault()):t.touch.skip())},end:function(t){t.preventDefault()}})}function Pv(t){cv.call(this),gv(this,t)}function Tv(t){uv.call(this),this.x=new mv(gv({horizontal:!0},t)),this.y=new mv(gv({horizontal:!1},t)),this.container=t.container,this.forcedMinScale=t.minScale,this.maxScale=t.maxScale||100,this.bind(yv,t)}function Mv(t){dv.call(this),this.forcedEnabled=!1,gv(this,t),this.scale=1,this.horizontal?(this.measure="offsetWidth",this.scrollSize="scrollWidth",this.axis="x"):(this.measure="offsetHeight",this.scrollSize="scrollHeight",this.axis="y")}function Ov(t,e){fv.call(this);var o=this,i=t[0]||t,t=(o.capture=!1,Cy(navigator.userAgent));i.addEventListener?(t.down.split(" ").forEach(function(t){i.addEventListener(t,uy(o._press,o),!0)}),t.up.split(" ").forEach(function(t){i.addEventListener(t,uy(o._release,o),!0)})):(t.down.split(" ").forEach(function(t){i.attachEvent(t,uy(o._press,o))}),t.up.split(" ").forEach(function(t){i.attachEvent(t,uy(o._release,o))})),o.bind(["press","release"],e||{})}i(Id,{autoBind:!0,zIndex:100});(Rv=b.Class)&&(Iv.__proto__=Rv),((Iv.prototype=Object.create(Rv&&Rv.prototype)).constructor=Iv).prototype.parse=function(t){var e=new Cv,o=!0;return"Feature"===t.type?(o=!1,this._loadGeometryTo(e,t.geometry,t),this._featureCreated(e,t)):this._loadGeometryTo(e,t,t),e=o&&e.children.length<2?e.children[0]:e},Iv.prototype._shapeCreated=function(t){var e=!1;return e=this.observer&&this.observer.shapeCreated?this.observer.shapeCreated(t):e},Iv.prototype._featureCreated=function(t,e){this.observer&&this.observer.featureCreated&&this.observer.featureCreated({group:t,dataItem:e,properties:e.properties})},Iv.prototype._loadGeometryTo=function(t,e,o){var i,r,n=e.coordinates;switch(e.type){case"LineString":r=this._loadPolygon(t,[n],o),this._setLineFill(r);break;case"MultiLineString":for(i=0;i<n.length;i++)r=this._loadPolygon(t,[n[i]],o),this._setLineFill(r);break;case"Polygon":this._loadPolygon(t,n,o);break;case"MultiPolygon":for(i=0;i<n.length;i++)this._loadPolygon(t,n[i],o);break;case"Point":this._loadPoint(t,n,o);break;case"MultiPoint":for(i=0;i<n.length;i++)this._loadPoint(t,n[i],o)}},Iv.prototype._setLineFill=function(t){var e=t.segments;(e.length<4||!e[0].anchor().equals(zt(e).anchor()))&&(t.options.fill=null)},Iv.prototype._loadShape=function(t,e){return this._shapeCreated(e)||t.append(e),e},Iv.prototype._loadPolygon=function(t,e,o){e=this._buildPolygon(e);return e.dataItem=o,this._loadShape(t,e)},Iv.prototype._buildPolygon=function(t){for(var e=new(1<t.length?b.drawing.MultiPath:b.drawing.Path)(this.style),o=0;o<t.length;o++)for(var i=0;i<t[o].length;i++){var r=this.locator.locationToView(Ig.fromLngLat(t[o][i]));0===i?e.moveTo(r.x,r.y):e.lineTo(r.x,r.y)}return e},Iv.prototype._loadPoint=function(t,e,o){var e=Ig.fromLngLat(e),i=this.locator.locationToView(e),i=new b.geometry.Circle(i,10),i=new b.drawing.Circle(i,this.style);return i.dataItem=o,i.location=e,this._loadShape(t,i)};var Bv,Rv,Ev=Iv,Er=((Bv=Id)&&(Lv.__proto__=Bv),((Lv.prototype=Object.create(Bv&&Bv.prototype)).constructor=Lv).prototype._readData=function(){return this.options.data||[]},Lv.prototype._load=function(t){if(this._data=t,this.surface.clear(),0!==t.length){var e=this.options,o=yt(e.valueField),i=t.slice(0);i.sort(function(t,e){return o(e)-o(t)});for(var r=this._scaleType(),n=yt(this.options.locationField),s=0;s<i.length;s++){var a,h,p,l=i[s],c=n(l),u=o(l);T(c)&&T(u)&&(a=a||new r([0,u],[e.minSize,e.maxSize]),c=Ig.create(c),p=this.map.locationToView(c),h=a.map(u),(p=this._createSymbol({center:p,size:h,style:e.style,dataItem:l,location:c})).dataItem=l,p.location=c,p.value=u,this._drawSymbol(p))}}},Lv.prototype._scaleType=function(){var t=this.options.scale;return it(t)?t:jv[t]},Lv.prototype._createSymbol=function(t){var e=this.options.symbol;return(e=it(e)?e:Dv[e])(t)},Lv.prototype._drawSymbol=function(t){this.map.trigger("shapeCreated",{layer:this,shape:t})||this.surface.draw(t)},Lv);function Lv(){Bv.apply(this,arguments)}function Iv(t,e,o){Rv.call(this),this.observer=o,this.locator=t,this.style=e}i(Er,{locationField:"location",valueField:"value",minSize:0,maxSize:100,scale:"sqrt",symbol:"circle",zIndex:200});var zv,Vv,jv={sqrt:((Vv=b.Class)&&(Gv.__proto__=Vv),((Gv.prototype=Object.create(Vv&&Vv.prototype)).constructor=Gv).prototype.map=function(t){t=(Math.sqrt(t)-Math.sqrt(this._domain[0]))*this._ratio;return this._range[0]+t},Gv)},Dv={circle:function(t){var e=new b.geometry.Circle(t.center,t.size/2);return new b.drawing.Circle(e,t.style)},square:function(t){var e=new b.drawing.Path(t.style),o=t.size/2,t=t.center;return e.moveTo(t.x-o,t.y-o).lineTo(t.x+o,t.y-o).lineTo(t.x+o,t.y+o).lineTo(t.x-o,t.y+o).close(),e}},Hv=Object.assign,Uv=".k-marker",Fv=((zv=Vd)&&(Nv.__proto__=zv),((Nv.prototype=Object.create(zv&&zv.prototype)).constructor=Nv).prototype.destroy=function(){zv.prototype.destroy.call(this),fy(this.element,"click",this._markerClickHandler),this.clear()},Nv.prototype.add=function(t){if(!Z(t))return this._addOne(t);for(var e=0;e<t.length;e++)this._addOne(t[e])},Nv.prototype.remove=function(t){t.destroy();t=(this.items||[]).indexOf(t);-1<t&&this.items.splice(t,1)},Nv.prototype.clear=function(){for(var t=0;t<this.items.length;t++)this.items[t].destroy();this.items=[]},Nv.prototype.update=function(t){var e=t.location();e&&(t.showAt(this.map.locationToView(e)),this.map.trigger("markerActivate",{marker:t,layer:this}))},Nv.prototype._reset=function(){zv.prototype._reset.call(this);for(var t=this.items,e=0;e<t.length;e++)this.update(t[e])},Nv.prototype.bind=function(t,e){t=Xv.create(t,this.options);if(t.dataItem=e,!this.map.trigger("markerCreated",{marker:t,layer:this}))return this.add(t),t},Nv.prototype._addOne=function(t){t=Xv.create(t,this.options);return t.addTo(this),t},Nv.prototype._readData=function(){return this.options.data||[]},Nv.prototype._load=function(t){this._data=t,this.clear();for(var e=yt(this.options.locationField),o=yt(this.options.titleField),i=0;i<t.length;i++){var r=t[i];this.bind({location:e(r),title:o(r)},r)}},Nv.prototype._markerClick=function(t){var e=this.map.layers||[],o=t.target._kendoNode,e={layer:this,layerIndex:e.indexOf(this),marker:o,markerIndex:(this.items||[]).indexOf(o),originalEvent:t};this.map.trigger("markerClick",e)},Nv.prototype._markerMouseEnter=function(t){t=this._createMarkerEventArgs(t);this.map.trigger("markerMouseEnter",t)},Nv.prototype._markerMouseLeave=function(t){t=this._createMarkerEventArgs(t);this.map.trigger("markerMouseLeave",t)},Nv.prototype._createMarkerEventArgs=function(t){var e=t.marker;return Hv({},{layer:this,layerIndex:this.map.layers.indexOf(this),marker:e,markerIndex:(this.items||[]).indexOf(e)},t)},Nv);function Nv(t,e){zv.call(this,t,e),this._markerClickHandler=uy(this._markerClick,this),dy(this.element,"click",Uv,this._markerClickHandler),this.items=[],this._load(this._readData())}function Gv(t,e){Vv.call(this),this._domain=t,this._range=e;t=Math.sqrt(t[1])-Math.sqrt(t[0]),e=e[1]-e[0];this._ratio=e/t}i(Fv,{zIndex:1e3,autoBind:!0,locationField:"location",titleField:"title"});(Wv=b.Class)&&(Yv.__proto__=Wv),((Yv.prototype=Object.create(Wv&&Wv.prototype)).constructor=Yv).prototype.destroy=function(){this.layer=null,this.unbindEvents(),this.hide()},Yv.prototype.addTo=function(t){this.layer=t.markers||t,this.layer.items.push(this),this.layer.update(this)},Yv.prototype.location=function(t){return t?(this.options.location=Ig.create(t).toArray(),this.layer&&this.layer.update(this),this):Ig.create(this.options.location)},Yv.prototype.showAt=function(t){this.render(),this.element.style.left=Jg(Math.round(t.x)),this.element.style.top=Jg(Math.round(t.y)),this.tooltip&&this.tooltip.popup&&this.tooltip.popup._position()},Yv.prototype.hide=function(){this.element&&(this.element.remove(),this.element=null),this.tooltip&&(this.tooltip.destroy(),this.tooltip=null)},Yv.prototype.bindEvents=function(){this.element&&(this._mouseEnterHandler=uy(this._mouseEnter,this),dy(this.element,"mouseenter",Uv,this._mouseEnterHandler),this._mouseLeaveHandler=uy(this._mouseLeave,this),dy(this.element,"mouseleave",Uv,this._mouseLeaveHandler))},Yv.prototype.unbindEvents=function(){this.element&&(fy(this.element,"mouseenter",this._mouseEnterHandler),fy(this.element,"mouseleave",this._mouseLeaveHandler))},Yv.prototype.render=function(){var t,e,o,i;this.element||(t=this.options,e=this.layer,Q(o=document.createElement("span"),"k-marker k-icon k-i-marker-"+$g(t.shape||"pin")),o.setAttribute("title",t.title),i=t.attributes||{},Object.keys(i).forEach(function(t){o.setAttributett(t,i[t])}),o._kendoNode=this,o.style.zIndex=t.zIndex,this.element=o,e&&e.element.appendChild(this.element),this.bindEvents(),this.renderTooltip())},Yv.prototype._mouseEnter=function(t){t=this._createEventArgs(t);this.layer._markerMouseEnter(t)},Yv.prototype._mouseLeave=function(t){t=this._createEventArgs(t);this.layer._markerMouseLeave(t)},Yv.prototype._createEventArgs=function(t){return{marker:this,originalEvent:t}},Yv.prototype.renderTooltip=function(){},Yv.create=function(t,e){return t instanceof Yv?t:new Yv(x({},e,t))};var Wv,Xv=Yv,qv=Object.assign;function Yv(t){Wv.call(this),this.options=t||{}}function Zv(t){window.requestAnimationFrame(t)}function Qv(t){t.preventDefault()}($v=b.Class)&&(um.__proto__=$v),((um.prototype=Object.create($v&&$v.prototype)).constructor=um).prototype.tick=function(){},um.prototype.done=function(){},um.prototype.onEnd=function(){},um.prototype.onCancel=function(){},um.prototype.start=function(){this.enabled()&&(this.done()?this.onEnd():(this._started=!0,Zv(this._tickProxy)))},um.prototype.enabled=function(){return!0},um.prototype.cancel=function(){this._started=!1,this.onCancel()},um.prototype._tick=function(){this._started&&(this.tick(),this.done()?(this._started=!1,this.onEnd()):Zv(this._tickProxy))};var Kv,$v,Fd=um,Jv=((Kv=Fd)&&(cm.__proto__=Kv),((cm.prototype=Object.create(Kv&&Kv.prototype)).constructor=cm).prototype.done=function(){return this.timePassed()>=this.duration},cm.prototype.timePassed=function(){return Math.min(this.duration,vy()-this.startDate)},cm.prototype.moveTo=function(t){var e=this.movable;this.initial=e[this.axis],this.delta=t.location-this.initial,this.duration="number"==typeof t.duration?t.duration:300,this.tick=this._easeProxy(t.ease),this.startDate=vy(),this.start()},cm.prototype._easeProxy=function(t){var e=this;return function(){e.movable.moveAxis(e.axis,t(e.timePassed(),e.initial,e.delta,e.duration))}},cm.easeOutExpo=function(t,e,o,i){return t===i?e+o:o*(1-Math.pow(2,-10*t/i))+e},cm),tm=Object.assign,em=800,om=0,im="move",rm="tap",nm="doubleTap",sm="release",am="gesturechange",hm="gestureend",pm="gesturetap",lm={api:0,touch:0,mouse:9,pointer:9};function cm(t){Kv.call(this),qv(this,t)}function um(){$v.call(this),this._tickProxy=uy(this._tick,this),this._started=!1}function dm(t){var e,o,i,r=Sy(),n=[],s=t.originalEvent||t,a=t.currentTarget,h=0;if(t.api)n.push({id:2,event:t,target:t.target,currentTarget:t.target,location:t,type:"api"});else if(t.type.match(/touch/))for(e=(o=s?s.changedTouches:[]).length;h<e;h++)i=o[h],n.push({location:i,event:t,target:i.target,currentTarget:a,id:i.identifier,type:"touch"});else r.pointers||r.msPointers?n.push({location:s,event:t,target:t.target,currentTarget:a,id:s.pointerId,type:"pointer"}):n.push({id:1,event:t,target:t.target,currentTarget:a,location:t,type:"mouse"});return n}(gm=b.Class)&&(xm.__proto__=gm),((xm.prototype=Object.create(gm&&gm.prototype)).constructor=xm).prototype.move=function(t){var e=t["page"+this.axis],o=vy(),i=o-this.timeStamp||1;!e&&this.invalidZeroEvents||(this.delta=e-this.location,this._updateLocationData(t),this.initialDelta=e-this.startLocation,this.velocity=this.delta/i,this.timeStamp=o)},xm.prototype._updateLocationData=function(t){var e=this.axis;this.location=t["page"+e],this.client=t["client"+e],this.screen=t["screen"+e]};var fm,gm,ym=xm,vm=((fm=b.Class)&&(mm.__proto__=fm),((mm.prototype=Object.create(fm&&fm.prototype)).constructor=mm).prototype.press=function(){this._holdTimeout=setTimeout(uy(this._hold,this),this.userEvents.minHold),this._trigger("press",this.pressEvent)},mm.prototype._tap=function(t){var e=this;e.userEvents._clicks++,1===e.userEvents._clicks&&(e._clickTimeout=setTimeout(function(){1===e.userEvents._clicks?e._trigger(rm,t):e._trigger(nm,t),e.userEvents._clicks=0},300))},mm.prototype._hold=function(){this._trigger("hold",this.pressEvent)},mm.prototype.move=function(t){var e="api"!==t.type&&this.userEvents._shouldNotMove;if(!this._finished&&!e){if(this.x.move(t.location),this.y.move(t.location),!this._moved){if(this._withinIgnoreThreshold())return;if(Pm.current&&Pm.current!==this.userEvents)return this.dispose();this._start(t)}this._finished||this._trigger(im,t)}},mm.prototype.end=function(t){this.endTime=vy(),this._finished||(this._finished=!0,this._trigger(sm,t),this._moved?this._trigger("end",t):this.useClickAsTap||(this.supportDoubleTap?this._tap(t):this._trigger(rm,t)),clearTimeout(this._holdTimeout),this.dispose())},mm.prototype.dispose=function(){var t=this.userEvents.touches||[],e=(this._finished=!0,this.pressEvent=null,clearTimeout(this._holdTimeout),t.indexOf(this));t.splice(e,1)},mm.prototype.skip=function(){this.dispose()},mm.prototype.cancel=function(){this.dispose()},mm.prototype.isMoved=function(){return this._moved},mm.prototype._start=function(t){clearTimeout(this._holdTimeout),this.startTime=vy(),this._moved=!0,this._trigger("start",t)},mm.prototype._trigger=function(t,e){var e=e.event,o={touch:this,x:this.x,y:this.y,target:this.target,event:e};this.userEvents.notify(t,o)&&e.preventDefault()},mm.prototype._withinIgnoreThreshold=function(){var t=this.x.initialDelta,e=this.y.initialDelta;return Math.sqrt(t*t+e*e)<=this.threshold},mm);function mm(t,e,o){fm.call(this),tm(this,{x:new ym("X",o.location),y:new ym("Y",o.location),type:o.type,useClickAsTap:t.useClickAsTap,threshold:t.threshold||lm[o.type],userEvents:t,target:e,currentTarget:o.currentTarget,initialTouch:o.target,id:o.id,pressEvent:o,_clicks:t._clicks,supportDoubleTap:t.supportDoubleTap,_moved:!1,_finished:!1})}function xm(t,e){gm.call(this),this.support=Sy(),this.invalidZeroEvents=this.support.mobileOS&&this.support.mobileOS.android,this.axis=t,this._updateLocationData(e),this.startLocation=this.location,this.velocity=this.delta=0,this.timeStamp=vy()}function _m(t){for(var e=Cy(navigator.userAgent).up.split(" "),o=0,i=e.length;o<i;o++)t(e[o])}(Am=md)&&(Um.__proto__=Am),((Um.prototype=Object.create(Am&&Am.prototype)).constructor=Um).prototype.preventIfMoving=function(t){this._isMoved()&&t.preventDefault()},Um.prototype.destroy=function(){var e,o=this,t=this.options,i=this.element;o._destroyed||(o._destroyed=!0,o.captureUpIfMoved&&this.support.eventCapture&&(e=o.surface,_m(function(t){e.removeEventListener(t,o.preventIfMoving)})),fy(o.surface,gy("move"),this._surfaceMoveHandler),fy(o.surface,gy("up cancel"),this._surfaceEndHandler),fy(i,gy("down"),this._elementStartHandler),o.useClickAsTap&&fy(i,gy("click"),this._elementClickHandler),t.preventDragEvent&&fy(i,gy("dragstart"),this._elementDragStartHandler),fy(i,gy("mousedown"),this._elementSelectHandler),o._disposeAll(),o.unbind(),delete o.surface,delete o.element,delete o.currentTarget)},Um.prototype.capture=function(){Um.current=this},Um.prototype.cancel=function(){this._disposeAll(),this.trigger("cancel")},Um.prototype.notify=function(t,e){var o,i,r,n,s=this.touches,a=t;if(this._isMultiTouch()){switch(a){case im:a=am;break;case"end":a=hm;break;case rm:a=pm}tm(e,{touches:s},(t=s[0],s=s[1],o=t.x.location,t=t.y.location,i=s.x.location,s=s.y.location,r=o-i,n=t-s,{center:{x:(o+i)/2,y:(t+s)/2},distance:Math.sqrt(r*r+n*n)}))}return this.trigger(a,tm(e,{type:a}))},Um.prototype.press=function(t,e,o){this._apiCall("_start",t,e,o)},Um.prototype.move=function(t,e){this._apiCall("_move",t,e)},Um.prototype.end=function(t,e){this._apiCall("_end",t,e)},Um.prototype._isMultiTouch=function(){return 1<this.touches.length},Um.prototype._maxTouchesReached=function(){return this.touches.length>=this._maxTouches},Um.prototype._disposeAll=function(){for(var t=this.touches;0<t.length;)t.pop().dispose()},Um.prototype._isMoved=function(){return vt(this.touches,function(t){return t.isMoved()}).length},Um.prototype._select=function(t){this.allowSelection&&!this.trigger("select",{event:t})||t.preventDefault()},Um.prototype._start=function(t){var e,o,i=0,r=this.filter,n=dm(t),s=n.length,a=t.which;if(!(a&&1<a||this._maxTouchesReached()))for(Um.current=null,this.currentTarget=t.currentTarget,this.stopPropagation&&t.stopPropagation();i<s&&!this._maxTouchesReached();i++)o=n[i],(e=r?o.currentTarget:this.element)&&0===e.length||(o=new vm(this,e,o),this.touches.push(o),o.press(),this._isMultiTouch()&&this.notify("gesturestart",{}))},Um.prototype._move=function(t){this._eachTouch("move",t)},Um.prototype._end=function(t){this._eachTouch("end",t)},Um.prototype._click=function(t){var e={touch:{initialTouch:t.target,target:t.currentTarget,endTime:vy(),x:{location:t.pageX,client:t.clientX},y:{location:t.pageY,client:t.clientY}},x:t.pageX,y:t.pageY,target:t.currentTarget,event:t,type:"tap"};this.trigger("tap",e)&&t.preventDefault()},Um.prototype._eachTouch=function(t,e){for(var o,i,r,n={},s=dm(e),a=this.touches,h=0;h<a.length;h++)n[(o=a[h]).id]=o;for(h=0;h<s.length;h++)(r=n[(i=s[h]).id])&&r[t](i)},Um.prototype._apiCall=function(t,e,o,i){this[t]({api:!0,pageX:e,pageY:o,clientX:e,clientY:o,target:i||this.element,stopPropagation:my,preventDefault:my})},Um.defaultThreshold=function(t){om=t},Um.minHold=function(t){em=t};var bm,wm,Cm,Sm,km,Am,Pm=Um,Tm=Object.assign,Mm=Math.abs,Om="change",Bm=((km=Fd)&&(Hm.__proto__=km),((Hm.prototype=Object.create(km&&km.prototype)).constructor=Hm).prototype.enabled=function(){return this.movable.scale<this.dimensions.minScale},Hm.prototype.done=function(){return this.dimensions.minScale-this.movable.scale<.01},Hm.prototype.tick=function(){var t=this.movable;t.scaleWith(1.1),this.dimensions.rescale(t.scale)},Hm.prototype.onEnd=function(){var t=this.movable;t.scaleTo(this.dimensions.minScale),this.dimensions.rescale(t.scale)},Hm),Rm=((Sm=Fd)&&(Dm.__proto__=Sm),((Dm.prototype=Object.create(Sm&&Sm.prototype)).constructor=Dm).prototype.onCancel=function(){this.transition.cancel()},Dm.prototype.freeze=function(t){this.cancel(),this._moveTo(t)},Dm.prototype.onEnd=function(){this.paneAxis.outOfBounds()?this._snapBack():this._end()},Dm.prototype.done=function(){return Mm(this.velocity)<1},Dm.prototype.start=function(t){this.dimension.enabled&&(this.paneAxis.outOfBounds()?this.transition._started?(this.transition.cancel(),this.velocity=Math.min(t.touch[this.axis].velocity*this.velocityMultiplier,55),Sm.prototype.start.call(this)):this._snapBack():(t=2===t.touch.id?0:t.touch[this.axis].velocity,this.velocity=Math.max(Math.min(t*this.velocityMultiplier,55),-55),this.tapCapture.captureNext(),Sm.prototype.start.call(this)))},Dm.prototype.tick=function(){var t=this.dimension,e=this.paneAxis.outOfBounds()?.5:this.friction,e=this.velocity*=e,e=this.movable[this.axis]+e;!this.elastic&&t.outOfBounds(e)&&(e=Math.max(Math.min(e,t.max),t.min),this.velocity=0),this.movable.moveAxis(this.axis,e)},Dm.prototype._end=function(){this.tapCapture.cancelCapture(),this.end()},Dm.prototype._snapBack=function(){var t=this.dimension,t=this.movable[this.axis]>t.max?t.max:t.min;this._moveTo(t)},Dm.prototype._moveTo=function(t){this.transition.moveTo({location:t,duration:500,ease:Jv.easeOutExpo})},Dm),Em=((Cm=Fd)&&(jm.__proto__=Cm),((jm.prototype=Object.create(Cm&&Cm.prototype)).constructor=jm).prototype.tick=function(){this._updateCoordinates(),this.moveTo(this.origin)},jm.prototype.done=function(){return Mm(this.offset.y)<5&&Mm(this.offset.x)<5},jm.prototype.onEnd=function(){this.moveTo(this.destination),this.callback&&this.callback.call()},jm.prototype.setCoordinates=function(t,e){this.offset={},this.origin=t,this.destination=e},jm.prototype.setCallback=function(t){t&&it(t)&&(this.callback=t)},jm.prototype._updateCoordinates=function(){this.offset={x:(this.destination.x-this.origin.x)/4,y:(this.destination.y-this.origin.y)/4},this.origin={y:this.origin.y+this.offset.y,x:this.origin.x+this.offset.x}},jm),Lm=((wm=b.Class)&&(Vm.__proto__=wm),((Vm.prototype=Object.create(wm&&wm.prototype)).constructor=Vm).prototype.refresh=function(){var t=this.axis,e=this.dimension,o=e.size,i=this.scrollMovable,e=o/e.total,i=Math.round(-i[t]*e),r=Math.round(o*e);this.element.style.display=1<=e?"none":"",o<i+r?r=o-i:i<0&&(r+=i,i=0),this.elementSize!==r&&(this.element.style[this.size]=r+"px",this.elementSize=r),this.movable.moveAxis(t,i)},Vm.prototype.show=function(){this.element.style.opacity=.7,this.element.style.visibility="visible"},Vm.prototype.hide=function(){this.alwaysVisible||(this.element.style.opacity=0)},Vm),Im=((bm=md)&&(zm.__proto__=bm),((zm.prototype=Object.create(bm&&bm.prototype)).constructor=zm).prototype._initOptions=function(t){this.options=x({},this.options,t)},zm.prototype._wheelScroll=function(t){var e,o,i;t.ctrlKey||(this._wheel||(this._wheel=!0,this._wheelY=0,this.userEvents.press(0,this._wheelY)),clearTimeout(this._wheelTimeout),this._wheelTimeout=setTimeout(this._wheelEnd,50),o=t.originalEvent||t,i=o.wheelDeltaY,o.wheelDelta?void 0!==i&&!i||(e=o.wheelDelta):o.detail&&o.axis===o.VERTICAL_AXIS&&(e=10*-o.detail),e&&(this._wheelY+=e,this.userEvents.move(0,this._wheelY)),t.preventDefault())},zm.prototype.makeVirtual=function(){this.dimensions.y.makeVirtual()},zm.prototype.virtualSize=function(t,e){this.dimensions.y.virtualSize(t,e)},zm.prototype.height=function(){return this.dimensions.y.size},zm.prototype.scrollHeight=function(){return this.scrollElement.scrollHeight},zm.prototype.scrollWidth=function(){return this.scrollElement.scrollWidth},zm.prototype._resize=function(){this._native||this.contentResized()},zm.prototype.setOptions=function(t){this._initOptions(t),t.pullToRefresh&&this._initPullToRefresh()},zm.prototype.reset=function(){this._native?this.scrollElement.scrollTop(0):(this.movable.moveTo({x:0,y:0}),this._scale(1))},zm.prototype.contentResized=function(){this.dimensions.refresh(),this.pane.x.outOfBounds()&&this.movable.moveAxis("x",this.dimensions.x.min),this.pane.y.outOfBounds()&&this.movable.moveAxis("y",this.dimensions.y.min)},zm.prototype.zoomOut=function(){var t=this.dimensions;t.refresh(),this._scale(t.fitScale),this.movable.moveTo(t.centerCoordinates())},zm.prototype.enable=function(){this.enabled=!0},zm.prototype.disable=function(){this.enabled=!1},zm.prototype.scrollTo=function(t,e){this._native?(this.scrollElement.scrollLeft(Mm(t)),this.scrollElement.scrollTop(Mm(e))):(this.dimensions.refresh(),this.movable.moveTo({x:t,y:e}))},zm.prototype.animatedScrollTo=function(t,e,o){var i;this._native?this.scrollTo(t,e):(i={x:this.movable.x,y:this.movable.y},this.animatedScroller.setCoordinates(i,{x:t,y:e}),this.animatedScroller.setCallback(o),this.animatedScroller.start())},zm.prototype.pullHandled=function(){},zm.prototype.destroy=function(){var t=this.element;fy(t,"DOMMouseScroll mousewheel",this._wheelScrollHandler),this.userEvents&&this.userEvents.destroy()},zm.prototype._scale=function(t){this.dimensions.rescale(t),this.movable.scaleTo(t)},zm.prototype._initPullToRefresh=function(){},zm.prototype._dragEnd=function(){},zm.prototype._paneChange=function(){},zm.prototype._initAxis=function(t){var e=this,o=e.movable,i=e.dimensions[t],r=e.tapCapture,n=e.pane[t],s=new Lm({axis:t,movable:o,dimension:i,container:e.element,alwaysVisible:e.options.visibleScrollHints});i.bind(Om,function(){s.refresh()}),n.bind(Om,function(){s.show()}),e[t+"inertia"]=new Rm({axis:t,paneAxis:n,movable:o,tapCapture:r,userEvents:e.userEvents,dimension:i,elastic:e.options.elastic,friction:e.options.friction||.96,velocityMultiplier:e.options.velocityMultiplier||10,end:function(){s.hide(),e.trigger("scrollEnd",{axis:t,scrollTop:e.scrollTop,scrollLeft:e.scrollLeft})}})},zm);function zm(t,e){bm.call(this);var n=this,e=(this.element=t,this._initOptions(e),function(t){t=ay(t);return t.ios||t.android}(navigator.userAgent)),e=(n._native=n.options.useNative&&e,sy('<div class="km-scroll-header"/>'));if(n._native)return Q(t,"km-native-scroller"),Kg(e,t),void Tm(n,{scrollElement:t,fixedContainer:t.children[0]});t.style.overflow="hidden",Q(t,"km-scroll-wrapper");var o=sy('<div class="km-scroll-container"/>'),i=t,r=o;for(i.appendChild(r);i.firstChild!==r;)r.appendChild(i.firstChild);Kg(e,t);var o=t.children[1],e=new vv(t),s=new wv(o),a=new xv({element:o,container:t,forcedEnabled:n.options.zoom}),h=this.options.avoidScrolling,p=new Pm(t,{touchAction:"pan-y",fastTap:!0,allowSelection:!0,preventDragEvent:!0,captureUpIfMoved:!0,multiTouch:n.options.zoom,supportDoubleTap:n.options.supportDoubleTap,start:function(t){a.refresh();var o,e=Mm(t.x.velocity),i=Mm(t.y.velocity),r=i<=2*e,e=e<=2*i;i=n.fixedContainer,o=t.event.target,i!==o&&!function(t){if(!o)return!1;for(var e=o.parentNode;null!==e;){if(e===t)return!0;e=e.parentNode}return!1}(i)&&!h(t)&&n.enabled&&(a.x.enabled&&r||a.y.enabled&&e)?p.capture():p.cancel()}}),l=new bv({movable:s,dimensions:a,userEvents:p,elastic:n.options.elastic}),c=new Bm({movable:s,dimensions:a,userEvents:p,tapCapture:e}),u=new Em({moveTo:function(t){n.scrollTo(t.x,t.y)}});s.bind(Om,function(){n.scrollTop=-s.y,n.scrollLeft=-s.x,n.trigger("scroll",{scrollTop:n.scrollTop,scrollLeft:n.scrollLeft})}),n.options.mousewheelScrolling&&(this._wheelScrollHandler=this._wheelScroll.bind(this),dy(t,"DOMMouseScroll mousewheel",this._wheelScrollHandler)),Tm(n,{movable:s,dimensions:a,zoomSnapBack:c,animatedScroller:u,userEvents:p,pane:l,tapCapture:e,pulled:!1,enabled:!0,scrollElement:o,scrollTop:0,scrollLeft:0,fixedContainer:t.children[0]}),n._initAxis("x"),n._initAxis("y"),n._wheelEnd=function(){n._wheel=!1,n.userEvents.end(0,n._wheelY)},a.refresh(),n.options.pullToRefresh&&n._initPullToRefresh()}function Vm(t){wm.call(this);var e="x"===t.axis,o=sy('<div class="km-touch-scrollbar km-'+(e?"horizontal":"vertical")+'-scrollbar" />');Tm(this,t,{element:o,elementSize:0,movable:new wv(o),scrollMovable:t.movable,alwaysVisible:t.alwaysVisible,size:e?"width":"height"}),this.scrollMovable.bind(Om,this.refresh.bind(this)),this.container.appendChild(o),t.alwaysVisible&&this.show()}function jm(t){Cm.call(this,t),Tm(this,t,{origin:{},destination:{},offset:{}})}function Dm(t){Sm.call(this);var e=this;Tm(e,t,{transition:new Jv({axis:t.axis,movable:t.movable,onEnd:function(){e._end()}})}),e.tapCapture.bind("press",function(){e.cancel()}),e.userEvents.bind("end",uy(e.start,e)),e.userEvents.bind("gestureend",uy(e.start,e)),e.userEvents.bind("tap",uy(e.onEnd,e))}function Hm(t){km.call(this,t),Tm(this,t),this.userEvents.bind("gestureend",this.start.bind(this)),this.tapCapture.bind("press",this.cancel.bind(this))}function Um(t,e){Am.call(this);var o,i,r,n=Sy(),s=(this.support=n,this.options=e=e||{},o=this.filter=e.filter,this.threshold=e.threshold||om,this.minHold=e.minHold||em,this.touches=[],this._maxTouches=e.multiTouch?2:1,this.allowSelection=e.allowSelection,this.captureUpIfMoved=e.captureUpIfMoved,this.useClickAsTap=!e.fastTap&&!n.delayedClick(),this._clicks=0,this.supportDoubleTap=e.supportDoubleTap,!n.touch||n.mouseAndTouchPresent);tm(this,{element:t,surface:e.global&&s?t.ownerDocument.documentElement:e.surface||t,stopPropagation:e.stopPropagation,pressed:!1}),this._surfaceMoveHandler=uy(this._move,this),dy(this.surface,gy("move"),this._surfaceMoveHandler),this._surfaceEndHandler=uy(this._end,this),dy(this.surface,gy("up cancel"),this._surfaceEndHandler),this._elementStartHandler=uy(this._start,this),dy(t,gy("down"),o,this._elementStartHandler),this.useClickAsTap&&(this._elementClickHandler=uy(this._click,this),dy(t,gy("click"),o,this._elementClickHandler)),(n.pointers||n.msPointers)&&(n.browser.version<11?t.style["-ms-touch-action"]=e.touchAction&&"none"!==e.touchAction?"pinch-zoom double-tap-zoom "+e.touchAction:"pinch-zoom double-tap-zoom":t.style["touch-action"]=e.touchAction||"none"),e.preventDragEvent&&(this._elementDragStartHandler=Qv,dy(t,gy("dragstart"),this._elementDragStartHandler)),this._elementSelectHandler=uy(this._select,this),dy(t,gy("mousedown"),o,this._elementSelectHandler),this.captureUpIfMoved&&n.eventCapture&&(i=this.surface,r=uy(this.preventIfMoving,this),_m(function(t){i.addEventListener(t,r,!0)})),this.bind(["press","hold",rm,nm,"start",im,"end",sm,"cancel","gesturestart",am,hm,pm,"select"],e)}i(Im,{name:"Scroller",zoom:!1,pullOffset:140,visibleScrollHints:!1,elastic:!0,useNative:!1,mousewheelScrolling:!0,avoidScrolling:function(){return!1},pullToRefresh:!1,messages:{pullTemplate:"Pull to refresh",releaseTemplate:"Release to refresh",refreshTemplate:"Refreshing"}}),yy(Im,["pull","scroll","resize"]);function Fm(t,e){this.sender=(e=void 0===e?{}:e).sender||t,this.widget=t,this.rtl=Boolean(e.rtl)}Fm.prototype.notify=function(t,e){this.widget&&this.widget.trigger(t,e)};var Nm=Fm,Gm=Math,Wm=Gm.min,Xm=Gm.pow,qm=b.geometry.Point,Ym={bubble:Er,shape:Id,tile:jd};function Zm(t){var e=[];if(t)for(var o=$g(t).split("-"),i=0;i<o.length;i++)e.push("k-pos-"+o[i]);return e.join(" ")}Ym.marker=Fv;(Qm=md)&&(I.__proto__=Qm),((I.prototype=Object.create(Qm&&Qm.prototype)).constructor=I).prototype.destroy=function(){this.scroller.destroy(),this.navigator&&this.navigator.destroy(),this.attribution&&this.attribution.destroy(),this.zoomControl&&this.zoomControl.destroy(),Z(this.markers)?this.markers.forEach(function(t){t.destroy()}):this.markers.destroy();for(var t=0;t<this.layers.length;t++)this.layers[t].destroy();fy(this.element,"DOMMouseScroll mousewheel",this._mousewheelHandler),Qm.prototype.destroy.call(this)},I.prototype._init=function(t,e,o,i){void 0===e&&(e={}),void 0===o&&(o={}),void 0===i&&(i={}),this.support=Sy(),this.context=i,this.initObserver(i),this.initServices(i),this._initOptions(e),this._setEvents(e),this.crs=new ry,this._initElement(t),this._viewOrigin=this._getOrigin(),this._initScroller(),this._initMarkers(),this._initControls(),this._initLayers(),this._reset(),this._mousewheelHandler=this._mousewheel.bind(this),dy(this.element,"DOMMouseScroll mousewheel",this._mousewheelHandler)},I.prototype._initOptions=function(t){this.options=x({},this.options,t)},I.prototype._initElement=function(t){Q(this.element=t,"k-map"),t.style.position="relative",t.setAttribute("data-role","map"),Qg(t);t=sy("<div />");this.element.appendChild(t)},I.prototype.initServices=function(t){this.widgetService=new Nm(this,t=void 0===t?{}:t)},I.prototype.initObserver=function(t){void 0===t&&(t={}),this.observers=[],this.addObserver(t.observer)},I.prototype.addObserver=function(t){t&&this.observers.push(t)},I.prototype.removeObserver=function(t){t=this.observers.indexOf(t);0<=t&&this.observers.splice(t,1)},I.prototype.requiresHandlers=function(t){for(var e=this.observers,o=0;o<e.length;o++)if(e[o].requiresHandlers(t))return!0},I.prototype.trigger=function(t,e){for(var o=((e=void 0===e?{}:e).sender=this).observers,i=!1,r=0;r<o.length;r++)o[r].trigger(t,e)&&(i=!0);return i||Qm.prototype.trigger.call(this,t,e),i},I.prototype._notifyObserver=function(t,e){for(var o=((e=void 0===e?{}:e).sender=this).observers,i=!1,r=0;r<o.length;r++)o[r].trigger(t,e)&&(i=!0);return i},I.prototype.zoom=function(t){var e=this.options,t=T(t)?(t=Gm.round(_(t,e.minZoom,e.maxZoom)),e.zoom!==t&&(e.zoom=t,this._reset()),this):e.zoom;return t},I.prototype.center=function(t){t=t?(this.options.center=Ig.create(t).toArray(),this._reset(),this):Ig.create(this.options.center);return t},I.prototype.extent=function(t){t=t?(this._setExtent(t),this):this._getExtent();return t},I.prototype.setOptions=function(t){void 0===t&&(t={});var e=this.element;this.destroy(),Qg(e),this._init(e,t,{},this.context),this._reset()},I.prototype.locationToLayer=function(t,e){var o=!this.options.wraparound,t=Ig.create(t);return this.crs.toPoint(t,this._layerSize(e),o)},I.prototype.layerToLocation=function(t,e){var o=!this.options.wraparound,t=qm.create(t);return this.crs.toLocation(t,this._layerSize(e),o)},I.prototype.locationToView=function(t){var t=Ig.create(t),e=this.locationToLayer(this._viewOrigin);return this.locationToLayer(t).translateWith(e.scale(-1))},I.prototype.viewToLocation=function(t,e){var o=this.locationToLayer(this._getOrigin(),e),t=qm.create(t).clone().translateWith(o);return this.layerToLocation(t,e)},I.prototype.eventOffset=function(t){var e,o=Bt(this.element);return t=t.x&&t.x.location||t.y&&t.y.location?(e=t.x.location-o.left,t.y.location-o.top):(t=t.originalEvent||t,e=O(t.pageX,t.clientX)-o.left,O(t.pageY,t.clientY)-o.top),new b.geometry.Point(e,t)},I.prototype.eventToView=function(t){t=this.eventOffset(t);return this.locationToView(this.viewToLocation(t))},I.prototype.eventToLayer=function(t){return this.locationToLayer(this.eventToLocation(t))},I.prototype.eventToLocation=function(t){t=this.eventOffset(t);return this.viewToLocation(t)},I.prototype.viewSize=function(){var t=this.element,e=this._layerSize(),o=t.clientWidth;return{width:o=this.options.wraparound?o:Wm(e,o),height:Wm(e,t.clientHeight)}},I.prototype.exportVisual=function(){return this._reset(),!1},I.prototype._setOrigin=function(t,e){var o=this.viewSize(),t=this._origin=Ig.create(t);return(t=this.locationToLayer(t,e)).x+=o.width/2,t.y+=o.height/2,this.options.center=this.layerToLocation(t,e).toArray(),this},I.prototype._getOrigin=function(t){var e=this.viewSize();return!t&&this._origin||((t=this.locationToLayer(this.center())).x-=e.width/2,t.y-=e.height/2,this._origin=this.layerToLocation(t)),this._origin},I.prototype._setExtent=function(t){var e=Ny.create(t),o=e.se.clone(),i=(this.options.wraparound&&o.lng<0&&0<t.nw.lng&&(o.lng=180+(180+o.lng)),new Ny(e.nw,o));this.center(i.center());for(var r=this.element.clientWidth,n=this.element.clientHeight,s=this.options.maxZoom;s>=this.options.minZoom;s--){var a=this.locationToLayer(i.nw,s),h=this.locationToLayer(i.se,s),p=Gm.abs(h.x-a.x),h=Gm.abs(h.y-a.y);if(p<=r&&h<=n)break}this.zoom(s)},I.prototype._getExtent=function(){var t=this._getOrigin(),e=this.locationToLayer(t),o=this.viewSize(),o=(e.x+=o.width,e.y+=o.height,this.layerToLocation(e));return new Ny(t,o)},I.prototype._zoomAround=function(t,e){this._setOrigin(this.layerToLocation(t,e),e),this.zoom(e)},I.prototype._initControls=function(){var t=this.options.controls;t.attribution&&this._createAttribution(t.attribution),this.support.mobileOS||(t.navigator&&this._createNavigator(t.navigator),t.zoom&&this._createZoomControl(t.zoom))},I.prototype._createControlElement=function(t,e){var o,t=t.position||e,e="."+Zm(t).replace(" ","."),e=this.element.querySelector(".k-map-controls"+e)||[],t=(0===e.length&&(Q(o=document.createElement("div"),"k-map-controls "+Zm(t)),this.element.appendChild(e=o)),document.createElement("div"));return e.appendChild(t),t},I.prototype._createAttribution=function(t){var e=this._createControlElement(t,"bottomRight");this.attribution=new Py(e,t)},I.prototype._createNavigator=function(t){var e=this._createControlElement(t,"topLeft"),e=this.navigator=new Ey(e,t);this._navigatorPan=this._navigatorPan.bind(this),e.bind("pan",this._navigatorPan),this._navigatorCenter=this._navigatorCenter.bind(this),e.bind("center",this._navigatorCenter)},I.prototype._navigatorPan=function(t){var e=this.scroller,o=e.scrollLeft+t.x,e=e.scrollTop-t.y,t=this._virtualSize,i=this.element.clientWidth,r=this.element.clientHeight,o=_(o,t.x.min,t.x.max-i),e=_(e,t.y.min,t.y.max-r);this.scroller.one("scroll",uy(this._scrollEnd,this)),this.scroller.scrollTo(-o,-e)},I.prototype._navigatorCenter=function(){this.center(this.options.center)},I.prototype._createZoomControl=function(t){var e=this._createControlElement(t,"topLeft"),e=this.zoomControl=new Vy(e,t);this._zoomControlChange=this._zoomControlChange.bind(this),e.bind("change",this._zoomControlChange)},I.prototype._zoomControlChange=function(t){this.trigger("zoomStart",{originalEvent:t})||(this.zoom(this.zoom()+t.delta),this.trigger("zoomEnd",{originalEvent:t}))},I.prototype._initScroller=function(){var t=this.support.mobileOS?.93:.9,e=!1!==this.options.zoomable,t=this.scroller=new Im(this.element.children[0],{friction:t,velocityMultiplier:5,zoom:e,mousewheelScrolling:!1,supportDoubleTap:!0});t.bind("scroll",uy(this._scroll,this)),t.bind("scrollEnd",uy(this._scrollEnd,this)),t.userEvents.bind("gesturestart",uy(this._scaleStart,this)),t.userEvents.bind("gestureend",uy(this._scale,this)),t.userEvents.bind("doubleTap",uy(this._doubleTap,this)),t.userEvents.bind("tap",uy(this._tap,this)),this.scrollElement=t.scrollElement},I.prototype._initLayers=function(){for(var t=this.options.layers,e=this.layers=[],o=0;o<t.length;o++){var i=t[o],i=this._createLayer(i);e.push(i)}},I.prototype._createLayer=function(t){var e=t.type||"shape",o=this.options.layerDefaults[e],o=x({},"marker"===e?this.options.markerDefaults:o,t),t=new Ym[e](this,o);return"marker"===e&&(this.markers=t),t},I.prototype._initMarkers=function(){0<(this.options.layers||[]).filter(function(t){return t&&"marker"===t.type}).length||(this.markers=new Fv(this,this.options.markerDefaults),this.markers.add(this.options.markers))},I.prototype._scroll=function(t){var e=this.locationToLayer(this._viewOrigin).round(),o=t.sender.movable,o=new b.geometry.Point(o.x,o.y).scale(-1).scale(1/o.scale);e.x+=o.x,e.y+=o.y,this._scrollOffset=o,this._setOrigin(this.layerToLocation(e)),this.trigger("pan",{originalEvent:t,origin:this._getOrigin(),center:this.center()})},I.prototype._scrollEnd=function(t){this._scrollOffset&&this._panComplete()&&(this._scrollOffset=null,this._panEndTimestamp=vy(),this.trigger("panEnd",{originalEvent:t,origin:this._getOrigin(),center:this.center()}))},I.prototype._panComplete=function(){return 50<vy()-(this._panEndTimestamp||0)},I.prototype._scaleStart=function(t){this.trigger("zoomStart",{originalEvent:t})&&(t=t.touches[1])&&t.cancel()},I.prototype._scale=function(t){var e=this.scroller.movable.scale,e=this._scaleToZoom(e),o=new b.geometry.Point(t.center.x,t.center.y),i=this.viewToLocation(o,e),i=this.locationToLayer(i,e).translate(-o.x,-o.y);this._zoomAround(i,e),this.trigger("zoomEnd",{originalEvent:t})},I.prototype._scaleToZoom=function(t){t=this._layerSize()*t/this.options.minSize,t=Gm.log(t)/Gm.log(2);return Gm.round(t)},I.prototype._reset=function(){this.attribution&&this.attribution.filter(this.center(),this.zoom()),this._viewOrigin=this._getOrigin(!0),this._resetScroller(),this.trigger("beforeReset"),this.trigger("reset")},I.prototype._resetScroller=function(){var t=this.scroller,e=t.dimensions.x,o=t.dimensions.y,i=this._layerSize(),r=this.extent().nw,r=this.locationToLayer(r).round(),n=(t.movable.round=!0,t.reset(),t.userEvents.cancel(),this.zoom()),t=(t.dimensions.forcedMinScale=Xm(2,this.options.minZoom-n),t.dimensions.maxScale=Xm(2,this.options.maxZoom-n),{min:-r.x,max:i-r.x}),n={min:-r.y,max:i-r.y};this.options.wraparound&&(t.max=20*i,t.min=-t.max),!1===this.options.pannable&&(r=this.viewSize(),t.min=n.min=0,t.max=r.width,n.max=r.height),e.makeVirtual(),o.makeVirtual(),e.virtualSize(t.min,t.max),o.virtualSize(n.min,n.max),this._virtualSize={x:t,y:n}},I.prototype._renderLayers=function(){},I.prototype._layerSize=function(t){t=O(t,this.options.zoom);return this.options.minSize*Xm(2,t)},I.prototype._tap=function(t){var e;this._panComplete()&&(e=this.eventOffset(t),this.trigger("click",{originalEvent:t,location:this.viewToLocation(e)}))},I.prototype._doubleTap=function(t){var e,o,i;!1===this.options.zoomable||this.trigger("zoomStart",{originalEvent:t})||(e=this.zoom()+1,o=this.eventOffset(t),i=this.viewToLocation(o),i=this.locationToLayer(i,e).translate(-o.x,-o.y),this._zoomAround(i,e),this.trigger("zoomEnd",{originalEvent:t}))},I.prototype._mousewheel=function(t){t.preventDefault();var e=0<At(t)?-1:1,o=this.options,i=this.zoom(),e=_(i+e,o.minZoom,o.maxZoom);!1===o.zoomable||e===i||this.trigger("zoomStart",{originalEvent:t})||(o=this.eventOffset(t),i=this.viewToLocation(o),i=this.locationToLayer(i,e).translate(-o.x,-o.y),this._zoomAround(i,e),this.trigger("zoomEnd",{originalEvent:t}))};var Qm,f=I;function I(t,e,o,i){void 0===e&&(e={}),void 0===o&&(o={}),void 0===i&&(i={}),Qm.call(this),this._init(t,e,o,i)}i(f,{name:"Map",controls:{attribution:!0,navigator:{panStep:100},zoom:!0},layers:[],layerDefaults:{shape:{style:{fill:{color:"#fff"},stroke:{color:"#aaa",width:.5}}},bubble:{style:{fill:{color:"#fff",opacity:.5},stroke:{color:"#aaa",width:.5}}},marker:{shape:"pinTarget",tooltip:{position:"top"}}},center:[0,0],zoom:3,minSize:256,minZoom:1,maxZoom:19,markers:[],markerDefaults:{shape:"pinTarget",tooltip:{position:"top"}},wraparound:!0,renderPointsAsMarkers:!1}),yy(f,["beforeReset","click","markerActivate","markerClick","markerCreated","markerMouseEnter","markerMouseLeave","pan","panEnd","reset","shapeClick","shapeCreated","shapeFeatureCreated","shapeMouseEnter","shapeMouseLeave","zoomEnd","zoomStart"]);function Km(){return{icon:{border:{width:1}},label:{font:ex,padding:3},line:{length:10,width:2},visible:!0}}function $m(t){return{axisDefaults:{labels:{font:ex},notes:Km(),title:{font:ox,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=void 0===t?{}: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},heatmap:{labels:{color:"",background:"transparent",visible:!0},highlight:{border:{width:0}}},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:Km(),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:ox},legend:{labels:{font:ex}}}}var Jm,tx=f,h="Arial, Helvetica, sans-serif",ex="12px "+h,ox="16px "+h,ix=(e.d(t,"autoMajorUnit",function(){return te}),e.d(t,"Point",function(){return B}),e.d(t,"Box",function(){return R}),e.d(t,"Ring",function(){return le}),e.d(t,"Sector",function(){return ce}),e.d(t,"ShapeBuilder",function(){return ye}),e.d(t,"ShapeElement",function(){return Ce}),e.d(t,"ChartElement",function(){return r}),e.d(t,"BoxElement",function(){return be}),e.d(t,"RootElement",function(){return Te}),e.d(t,"FloatElement",function(){return Be}),e.d(t,"Text",function(){return Le}),e.d(t,"TextBox",function(){return De}),e.d(t,"Title",function(){return Ne}),e.d(t,"AxisLabel",function(){return Xe}),e.d(t,"Axis",function(){return po}),e.d(t,"Note",function(){return Ke}),e.d(t,"CategoryAxis",function(){return Wo}),e.d(t,"DateCategoryAxis",function(){return Jo}),e.d(t,"DateValueAxis",function(){return ci}),e.d(t,"NumericAxis",function(){return hi}),e.d(t,"LogarithmicAxis",function(){return yi}),e.d(t,"PolarAxis",function(){return bi}),e.d(t,"RadarCategoryAxis",function(){return xi}),e.d(t,"RadarNumericAxis",function(){return Ai}),e.d(t,"RadarLogarithmicAxis",function(){return Ti}),e.d(t,"CurveProcessor",function(){return Ri}),e.d(t,"Gradients",function(){return Se}),e.d(t,"rectToBox",function(){return Ie}),e.d(t,"Aggregates",function(){return Gi}),e.d(t,"AreaChart",function(){return rn}),e.d(t,"AreaSegment",function(){return Yr}),e.d(t,"AxisGroupRangeTracker",function(){return nn}),e.d(t,"Bar",function(){return fn}),e.d(t,"BarChart",function(){return An}),e.d(t,"BarLabel",function(){return ln}),e.d(t,"BoxPlotChart",function(){return Hn}),e.d(t,"BoxPlot",function(){return jn}),e.d(t,"BubbleChart",function(){return es}),e.d(t,"Bullet",function(){return as}),e.d(t,"BulletChart",function(){return ls}),e.d(t,"CandlestickChart",function(){return En}),e.d(t,"Candlestick",function(){return Tn}),e.d(t,"CategoricalChart",function(){return Sr}),e.d(t,"CategoricalErrorBar",function(){return mr}),e.d(t,"CategoricalPlotArea",function(){return Ia}),e.d(t,"Chart",function(){return Sl}),e.d(t,"ChartContainer",function(){return bs}),e.d(t,"ClipAnimation",function(){return Ur}),e.d(t,"ClusterLayout",function(){return _n}),e.d(t,"Crosshair",function(){return ms}),e.d(t,"CrosshairTooltip",function(){return gs}),e.d(t,"DefaultAggregates",function(){return Zs}),e.d(t,"DonutChart",function(){return rp}),e.d(t,"DonutPlotArea",function(){return np}),e.d(t,"DonutSegment",function(){return Jh}),e.d(t,"ErrorBarBase",function(){return vr}),e.d(t,"ErrorRangeCalculator",function(){return Ji}),e.d(t,"Highlight",function(){return ja}),e.d(t,"SharedTooltip",function(){return bh}),e.d(t,"Legend",function(){return ah}),e.d(t,"LegendItem",function(){return th}),e.d(t,"LegendLayout",function(){return Ja}),e.d(t,"LineChart",function(){return qr}),e.d(t,"LinePoint",function(){return Tr}),e.d(t,"LineSegment",function(){return Or}),e.d(t,"Pane",function(){return Ss}),e.d(t,"PieAnimation",function(){return Oh}),e.d(t,"PieChart",function(){return Yh}),e.d(t,"PieChartMixin",function(){return Nh}),e.d(t,"PiePlotArea",function(){return Zh}),e.d(t,"PieSegment",function(){return Fh}),e.d(t,"PlotAreaBase",function(){return Us}),e.d(t,"PlotAreaEventsMixin",function(){return Fs}),e.d(t,"PlotAreaFactory",function(){return ph}),e.d(t,"PointEventsMixin",function(){return kr}),e.d(t,"RangeBar",function(){return $s}),e.d(t,"RangeBarChart",function(){return oa}),e.d(t,"RangeAreaPoint",function(){return pa}),e.d(t,"RangeAreaChart",function(){return ba}),e.d(t,"ScatterChart",function(){return Zn}),e.d(t,"ScatterErrorBar",function(){return Un}),e.d(t,"ScatterLineChart",function(){return Eh}),e.d(t,"Selection",function(){return yh}),e.d(t,"SeriesAggregator",function(){return Ws}),e.d(t,"SeriesBinder",function(){return Qi}),e.d(t,"SplineSegment",function(){return jr}),e.d(t,"SplineAreaSegment",function(){return on}),e.d(t,"StackWrap",function(){return Cn}),e.d(t,"Tooltip",function(){return vh}),e.d(t,"OHLCChart",function(){return Ca}),e.d(t,"OHLCPoint",function(){return wa}),e.d(t,"WaterfallChart",function(){return Oa}),e.d(t,"WaterfallSegment",function(){return Ma}),e.d(t,"XYPlotArea",function(){return Vh}),e.d(t,"MousewheelZoom",function(){return $a}),e.d(t,"ZoomSelection",function(){return Ka}),e.d(t,"Pannable",function(){return Wa}),e.d(t,"ChartAxis",function(){return Ei}),e.d(t,"ChartPane",function(){return Di}),e.d(t,"ChartPlotArea",function(){return Hi}),e.d(t,"findAxisByName",function(){return zi}),e.d(t,"anyHasZIndex",function(){return Fr}),e.d(t,"appendIfNotNull",function(){return ks}),e.d(t,"areNumbers",function(){return Mn}),e.d(t,"bindSegments",function(){return Ps}),e.d(t,"categoriesCount",function(){return br}),e.d(t,"countNumbers",function(){return Fi}),e.d(t,"equalsIgnoreCase",function(){return Ts}),e.d(t,"evalOptions",function(){return _r}),e.d(t,"filterSeriesByType",function(){return Ms}),e.d(t,"getDateField",function(){return Os}),e.d(t,"getField",function(){return Wi}),e.d(t,"hasGradientOverlay",function(){return cn}),e.d(t,"hasValue",function(){return Wn}),e.d(t,"isDateAxis",function(){return Bs}),e.d(t,"segmentVisible",function(){return As}),e.d(t,"singleItemOrArray",function(){return Rs}),e.d(t,"createOutOfRangePoints",function(){return zs}),e.d(t,"ChartService",function(){return ro}),e.d(t,"DomEventsBuilder",function(){return no}),e.d(t,"FormatService",function(){return eo}),e.d(t,"IntlService",function(){return Je}),e.d(t,"TemplateService",function(){return ut}),e.d(t,"Sparkline",function(){return Ll}),e.d(t,"Navigator",function(){return Xl}),e.d(t,"NavigatorHint",function(){return Hl}),e.d(t,"StockChart",function(){return Zl}),e.d(t,"constants",function(){return V}),e.d(t,"Gauge",function(){return hc}),e.d(t,"LinearGauge",function(){return Hc}),e.d(t,"LinearPointer",function(){return bc}),e.d(t,"ArrowLinearPointer",function(){return Tc}),e.d(t,"BarLinearPointer",function(){return zc}),e.d(t,"LinearScale",function(){return yc}),e.d(t,"RadialGauge",function(){return hu}),e.d(t,"RadialPointer",function(){return ru}),e.d(t,"RadialScale",function(){return Zc}),e.d(t,"ArcGauge",function(){return _u}),e.d(t,"RangePointer",function(){return xu}),e.d(t,"ArcScale",function(){return cu}),e.d(t,"CircularGauge",function(){return bu}),e.d(t,"Barcode",function(){return ef}),e.d(t,"barcodeValidator",function(){return tf}),e.d(t,"QRCode",function(){return Cg}),e.d(t,"qrcodeValidator",function(){return wg}),e.d(t,"Map",function(){return tx}),e.d(t,"Location",function(){return Ig}),e.d(t,"Extent",function(){return Ny}),e.d(t,"addClass",function(){return Q}),e.d(t,"removeClass",function(){return $}),e.d(t,"alignPathToPixel",function(){return J}),e.d(t,"clockwise",function(){return tt}),e.d(t,"convertableToNumber",function(){return ot}),e.d(t,"deepExtend",function(){return x}),e.d(t,"elementStyles",function(){return pt}),e.d(t,"getSpacing",function(){return P}),e.d(t,"getTemplate",function(){return dt}),e.d(t,"getter",function(){return yt}),e.d(t,"grep",function(){return vt}),e.d(t,"hasClasses",function(){return mt}),e.d(t,"HashMap",function(){return _t}),e.d(t,"inArray",function(){return u}),e.d(t,"interpolateValue",function(){return bt}),e.d(t,"InstanceObserver",function(){return Ct}),e.d(t,"isArray",function(){return Z}),e.d(t,"isFunction",function(){return it}),e.d(t,"isNumber",function(){return m}),e.d(t,"isObject",function(){return st}),e.d(t,"isString",function(){return et}),e.d(t,"map",function(){return St}),e.d(t,"mousewheelDelta",function(){return At}),e.d(t,"FontLoader",function(){return Ht}),e.d(t,"setDefaultOptions",function(){return i}),e.d(t,"sparseArrayLimits",function(){return Ut}),e.d(t,"styleValue",function(){return at}),e.d(t,"find",function(){return Ft}),e.d(t,"elementScale",function(){return Xt}),e.d(t,"autoTextColor",function(){return qt}),e.d(t,"createHashSet",function(){return Kt}),e.d(t,"defaultErrorHandler",function(){return $t}),e.d(t,"keys",function(){return Jt}),e.d(t,"append",function(){return Tt}),e.d(t,"bindEvents",function(){return Mt}),e.d(t,"Class",function(){return b.Class}),e.d(t,"defined",function(){return T}),e.d(t,"deg",function(){return Ot}),e.d(t,"elementOffset",function(){return Bt}),e.d(t,"elementSize",function(){return Rt}),e.d(t,"eventCoordinates",function(){return Et}),e.d(t,"eventElement",function(){return Lt}),e.d(t,"hashKey",function(){return It}),e.d(t,"last",function(){return zt}),e.d(t,"limitValue",function(){return _}),e.d(t,"logToConsole",function(){return b.logToConsole}),e.d(t,"objectKey",function(){return Vt}),e.d(t,"rad",function(){return jt}),e.d(t,"round",function(){return M}),e.d(t,"unbindEvents",function(){return Dt}),e.d(t,"valueOrDefault",function(){return O}),e.d(t,"chartBaseTheme",function(){return $m}),t);for(Jm in ix)rx(Jm,ix[Jm])}],r={},i.m=o,i.c=r,i.d=function(t,e,o){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:o})},i.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=1)}}});
|