@progress/kendo-charts 1.23.3-dev.202202251035 → 1.23.3
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(nx){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(n,t,e){"use strict";e.r(t);var s={},d=(e.d(s,"NAVIGATOR_AXIS",function(){return Ul}),e.d(s,"NAVIGATOR_PANE",function(){return Hl}),"arc"),a="#000",S="bottom",A="center",u="circle",y="date",g=10,h=/\{\d+:?/,P="left",c=Number.MAX_VALUE,l=-Number.MAX_VALUE,p="none",T="right",f="string",M="top",v="value",x="#fff",_="x",O="y";function B(t){return Array.isArray(t)}function R(t,e){for(var o=B(e)?e:[e],i=0;i<o.length;i++){var r=o[i];-1===t.className.indexOf(r)&&(t.className+=" "+r)}}var E=/\s+/g;function L(t,e){t&&t.className&&(t.className=t.className.replace(e,"").replace(E," "))}var b=e(0);function I(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 z(t,e){return-t.x*e.y+t.y*e.x<0}function V(t){return"number"==typeof t&&!isNaN(t)}function j(t){return typeof t===f}function D(t){return V(t)||j(t)&&isFinite(t)}function H(t){return"function"==typeof t}var U="object",F="undefined";function m(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===U&&null!==n?n.constructor:null)&&r!==Array?n instanceof Date?e[i]=new Date(n.getTime()):H(n.clone)?e[i]=n.clone():(r=e[i],e[i]=typeof r===U&&r||{},t(e[i],n)):s!==F&&(e[i]=n)}return e}(t,e[i]);return t}function N(t){return"object"==typeof t}function G(t){return V(t)?t+"px":t}var W=/width|height|top|left|bottom|right/i;function X(t,e){var o=j(e)?[e]:e;if(B(o)){for(var i={},r=window.getComputedStyle(t),n=0;n<o.length;n++){var s=o[n];i[s]=W.test(s)?parseFloat(r[s]):r[s]}return i}if(N(e))for(var a in e)t.style[a]=G(e[a])}function q(t,e){void 0===e&&(e=0);var o={top:0,right:0,bottom:0,left:0};return"number"==typeof t?o[M]=o[T]=o[S]=o[P]=t:(o[M]=t[M]||e,o[T]=t[T]||e,o[S]=t[S]||e,o[P]=t[P]||e),o}function Y(){}var Z={compile:function(t){return t}},Q=(Y.register=function(t){Z=t},Y.compile=function(t){return Z.compile(t)},Y);function K(t){var e;return(t=void 0===t?{}:t).template?t.template=e=Q.compile(t.template):H(t.content)&&(e=t.content),e}var $=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g,J={};function tt(t){if(J[t])return J[t];var r=[];return t.replace($,function(t,e,o,i){r.push(b.drawing.util.defined(e)?e:o||i)}),J[t]=function(t){for(var e=t,o=0;o<r.length&&e;o++)e=e[r[o]];return e},J[t]}function et(t,e){for(var o=t.length,i=[],r=0;r<o;r++)e(t[r])&&i.push(t[r]);return i}function ot(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}J[void 0]=function(t){return t};function it(){this._map={}}it.prototype.get=function(t){return this._map[this._key(t)]},it.prototype.set=function(t,e){this._map[this._key(t)]=e},it.prototype._key=function(t){return t instanceof Date?t.getTime():t};var rt=it;function nt(t,e){if(e)return-1!==e.indexOf(t)}function st(t,e,o){return b.drawing.util.round(t+(e-t)*o,3)}function at(t,e){this.observer=t,this.handlerMap=m({},this.handlerMap,e)}at.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},at.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)},at.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 ht=at;function pt(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 lt=b.support.browser||{};function ct(t){var e=0;return t.wheelDelta?(e=-t.wheelDelta/120,lt.webkit&&(e/=2*Math.max(window.devicePixelRatio,.625))):t.detail&&(e=t.detail/3),0<e?Math.ceil(e):Math.floor(e)}function ut(){}var o=b.drawing.util,dt=o.append,ft=o.bindEvents,w=o.defined,gt=o.deg,yt=o.elementOffset,vt=o.elementSize,mt=o.eventCoordinates,xt=o.eventElement,_t=o.hashKey,bt=o.last,wt=o.limitValue,Ct=o.objectKey,St=o.rad,k=o.round,kt=o.unbindEvents,At=o.valueOrDefault,Pt=(ut.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++,ut.fetchFonts(e,i,r),r.depth--))})},ut.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()},ut.preloadFonts=function(t,e){var o=[];ut.fetchFonts(t,o),ut.loadFonts(o,e)},ut);function i(t,e){t=t.prototype;t.options?t.options=m({},t.options,e):t.options=e}function Tt(t){for(var e=c,o=l,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===c?void 0:e,max:o===l?void 0:o}}function Mt(t,e){for(var o=0;o<t.length;o++){var i=t[o];if(e(i,o,t))return i}}var Ot=b.geometry.Matrix,Bt=/matrix\((.*)\)/;function Rt(t){var t=getComputedStyle(t).transform;return"none"===t?Ot.unit():(t=t.match(Bt),null===t||2!==t.length?Ot.unit():(t=t[1].split(",").map(function(t){return parseFloat(t)}),new(Function.prototype.bind.apply(Ot,[null].concat(t)))))}function Et(t){if(!t)return Ot.unit();for(var e=Rt(t),o=t.parentElement;o;)var i=Rt(o),e=e.multiplyCopy(i),o=o.parentElement;return e.b=e.c=e.e=e.f=0,e}function Lt(t){return new b.Color(t).isDark()?x:a}function It(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 Vt={},o={size:{configurable:!0}},o=(It.prototype.values=function(){return this._values.filter(function(t){return t!==Vt})},It.prototype.has=function(t){return void 0!==this._index[t]},It.prototype.add=function(t){this.has(t)||(this._index[t]=this._values.length,this._values.push(t))},It.prototype.delete=function(t){var e=this._index[t];void 0!==e&&(this._values[e]=Vt,delete this._index[t])},It.prototype.clear=function(){this._index={},this._values=[]},o.size.get=function(){return this._values.length},Object.defineProperties(It.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 jt(t){return e=!1,new((e="function"==typeof Set?new Set([1]).has(1):e)?zt:It)(t);var e}function Dt(t){throw t}var Ht={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 Ut(t,e){t=k(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=k(t/e,g);return k(e*(t<1.904762?.2:t<4.761904?.5:t<9.523809?1:2),g)}(Ft=b.Class)&&(Gt.__proto__=Ft),((Gt.prototype=Object.create(Ft&&Ft.prototype)).constructor=Gt).prototype.clone=function(){return new Gt(this.x,this.y)},Gt.prototype.equals=function(t){return t&&this.x===t.x&&this.y===t.y},Gt.prototype.rotate=function(t,e){var e=St(e),o=Math.cos(e),e=Math.sin(e),i=t.x,t=t.y,r=this.x,n=this.y;return this.x=k(i+(r-i)*o+(n-t)*e,3),this.y=k(t+(n-t)*o-(r-i)*e,3),this},Gt.prototype.multiply=function(t){return this.x*=t,this.y*=t,this},Gt.prototype.distanceTo=function(t){var e=this.x-t.x,t=this.y-t.y;return Math.sqrt(e*e+t*t)},Gt.onCircle=function(t,e,o){e=St(e);return new Gt(t.x-o*Math.cos(e),t.y-o*Math.sin(e))};var Ft,Nt=Gt;function Gt(t,e){Ft.call(this),this.x=t||0,this.y=e||0}function Wt(t,e,o,i,r){r=St(r);return new Nt(o+(t-o)*Math.cos(r)+(e-i)*Math.sin(r),i-(t-o)*Math.sin(r)+(e-i)*Math.cos(r))}(Xt=b.Class)&&(qt.__proto__=Xt),((qt.prototype=Object.create(Xt&&Xt.prototype)).constructor=qt).prototype.equals=function(t){return this.x1===t.x1&&this.x2===t.x2&&this.y1===t.y1&&this.y2===t.y2},qt.prototype.width=function(){return this.x2-this.x1},qt.prototype.height=function(){return this.y2-this.y1},qt.prototype.translate=function(t,e){return this.x1+=t,this.x2+=t,this.y1+=e,this.y2+=e,this},qt.prototype.move=function(t,e){var o=this.height(),i=this.width();return w(t)&&(this.x1=t,this.x2=this.x1+i),w(e)&&(this.y1=e,this.y2=this.y1+o),this},qt.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},qt.prototype.wrapPoint=function(t){var e=B(t),o=e?t[0]:t.x,e=e?t[1]:t.y;return this.wrap(new qt(o,e,o,e)),this},qt.prototype.snapTo=function(t,e){return e!==_&&e||(this.x1=t.x1,this.x2=t.x2),e!==O&&e||(this.y1=t.y1,this.y2=t.y2),this},qt.prototype.alignTo=function(t,e){var o,i,r=this.height(),n=this.width(),s=e===M||e===S?O:_,a=s==O?r:n;return e===A?(o=t.center(),i=this.center(),this.x1+=o.x-i.x,this.y1+=o.y-i.y):this[s+1]=e===M||e===P?t[s+1]-a:t[s+2],this.x2=this.x1+n,this.y2=this.y1+r,this},qt.prototype.shrink=function(t,e){return this.x2-=t,this.y2-=e,this},qt.prototype.expand=function(t,e){return this.shrink(-t,-e),this},qt.prototype.pad=function(t){t=q(t);return this.x1-=t.left,this.x2+=t.right,this.y1-=t.top,this.y2+=t.bottom,this},qt.prototype.unpad=function(t){t=q(t);return t.left=-t.left,t.top=-t.top,t.right=-t.right,t.bottom=-t.bottom,this.pad(t)},qt.prototype.clone=function(){return new qt(this.x1,this.y1,this.x2,this.y2)},qt.prototype.center=function(){return new Nt(this.x1+this.width()/2,this.y1+this.height()/2)},qt.prototype.containsPoint=function(t){return t.x>=this.x1&&t.x<=this.x2&&t.y>=this.y1&&t.y<=this.y2},qt.prototype.points=function(){return[new Nt(this.x1,this.y1),new Nt(this.x2,this.y1),new Nt(this.x2,this.y2),new Nt(this.x1,this.y2)]},qt.prototype.getHash=function(){return[this.x1,this.y1,this.x2,this.y2].join(",")},qt.prototype.overlaps=function(t){return!(t.y2<this.y1||this.y2<t.y1||t.x2<this.x1||this.x2<t.x1)},qt.prototype.rotate=function(t){var e=this.width(),o=this.height(),i=this.center(),r=i.x,i=i.y,n=Wt(0,0,r,i,t),s=Wt(e,0,r,i,t),a=Wt(e,o,r,i,t),r=Wt(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},qt.prototype.toRect=function(){return new b.geometry.Rect([this.x1,this.y1],[this.width(),this.height()])},qt.prototype.hasSize=function(){return 0!==this.width()&&0!==this.height()},qt.prototype.align=function(t,e,o){var i=e+1,r=e+2,e=e===_?"width":"height",n=this[e]();nt(o,[P,M])?(this[i]=t[i],this[r]=this[i]+n):nt(o,[T,S])?(this[r]=t[r],this[i]=this[r]-n):o===A&&(this[i]=t[i]+(t[e]()-n)/2,this[r]=this[i]+n)};var Xt,C=qt;function qt(t,e,o,i){Xt.call(this),this.x1=t||0,this.y1=e||0,this.x2=o||0,this.y2=i||0}function Yt(t,e){return t-e}(Kt=b.Class)&&(oe.__proto__=Kt),((oe.prototype=Object.create(Kt&&Kt.prototype)).constructor=oe).prototype.clone=function(){return new oe(this.center,this.innerRadius,this.radius,this.startAngle,this.angle)},oe.prototype.middle=function(){return this.startAngle+this.angle/2},oe.prototype.setRadius=function(t,e){return e?this.innerRadius=t:this.radius=t,this},oe.prototype.point=function(t,e){var t=St(t),o=Math.cos(t),t=Math.sin(t),e=e?this.innerRadius:this.radius,o=k(this.center.x-o*e,3),t=k(this.center.y-t*e,3);return new Nt(o,t)},oe.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(St(i)),i=Math.cos(St(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 C(a,t,a+e,t+o)},oe.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 Nt(s,t),r=this.point(r),r=new Nt(r.x-e.x,r.y-e.y),n=this.point(n),n=new Nt(n.x-e.x,n.y-e.y),e=k(s*s+t*t,3);return(r.equals(a)||z(r,a))&&!z(n,a)&&o*o<=e&&e<=i*i},oe.prototype.getBBox=function(){for(var t=new C(c,c,l,l),e=k(this.startAngle%360),o=k((e+this.angle)%360),i=this.innerRadius,r=[0,90,180,270,e,o].sort(Yt),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},oe.prototype.expand=function(t){return this.radius+=t,this};var Zt,Qt,Kt,$t=oe,Jt=((Qt=$t)&&(ee.__proto__=Qt),((ee.prototype=Object.create(Qt&&Qt.prototype)).constructor=ee).prototype.expand=function(t){return Qt.prototype.expand.call(this,t)},ee.prototype.clone=function(){return new ee(this.center,this.radius,this.startAngle,this.angle)},ee.prototype.setRadius=function(t){return this.radius=t,this},ee),o=((Zt=b.Class)&&(te.__proto__=Zt),((te.prototype=Object.create(Zt&&Zt.prototype)).constructor=te).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},te);function te(){Zt.apply(this,arguments)}function ee(t,e,o,i){Qt.call(this,t,0,e,o,i)}function oe(t,e,o,i,r){Kt.call(this),this.center=t,this.innerRadius=e,this.radius=o,this.startAngle=i,this.angle=r}o.current=new o;var ie,re=o,o=((ie=b.Class)&&(ne.__proto__=ie),((ne.prototype=Object.create(ie&&ie.prototype)).constructor=ne).prototype.initUserOptions=function(t){return t},ne.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},ne.prototype.destroy=function(){var t=this.children;this.animation&&this.animation.destroy();for(var e=0;e<t.length;e++)t[e].destroy()},ne.prototype.getRoot=function(){var t=this.parent;return t?t.getRoot():null},ne.prototype.getSender=function(){var t=this.getService();if(t)return t.sender},ne.prototype.getService=function(){for(var t=this;t;){if(t.chartService)return t.chartService;t=t.parent}},ne.prototype.translateChildren=function(t,e){for(var o=this.children,i=o.length,r=0;r<i;r++)o[r].box.translate(t,e)},ne.prototype.append=function(){for(var t=arguments,e=0;e<arguments.length;e++){var o=t[e];this.children.push(o),o.parent=this}},ne.prototype.renderVisual=function(){!1!==this.options.visible&&(this.createVisual(),this.addVisual(),this.renderChildren(),this.createAnimation(),this.renderComplete())},ne.prototype.addVisual=function(){this.visual&&((this.visual.chartElement=this).parent&&this.parent.appendVisual(this.visual))},ne.prototype.renderChildren=function(){for(var t=this.children,e=t.length,o=0;o<e;o++)t[o].renderVisual()},ne.prototype.createVisual=function(){this.visual=new b.drawing.Group({zIndex:this.options.zIndex,visible:At(this.options.visible,!0)})},ne.prototype.createAnimation=function(){this.visual&&this.options.animation&&(this.animation=b.drawing.Animation.create(this.visual,this.options.animation))},ne.prototype.appendVisual=function(t){t.chartElement||(t.chartElement=this),t.options.noclip?this.clipRoot().visual.append(t):w(t.options.zIndex)?this.stackRoot().stackVisual(t):this.isStackRoot?this.stackVisual(t):this.visual?this.visual.append(t):this.parent.appendVisual(t)},ne.prototype.clipRoot=function(){return this.parent?this.parent.clipRoot():this},ne.prototype.stackRoot=function(){return this.parent?this.parent.stackRoot():this},ne.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(At(n.options.zIndex,0)>e)break}this.visual.insert(r,t)},ne.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)}},ne.prototype.closest=function(t){for(var e=this,o=!1;e&&!o;)(o=t(e))||(e=e.parent);if(o)return e},ne.prototype.renderComplete=function(){},ne.prototype.hasHighlight=function(){var t=(this.options||{}).highlight;return!(!this.createHighlight||t&&!1===t.visible)},ne.prototype.toggleHighlight=function(t,e){var o=this,i=(this.options||{}).highlight||{},r=i.visual,n=this._highlight;if(!n){var s={fill:{color:x,opacity:e||.2},stroke:{color:x,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);w(n.options.zIndex)||(n.options.zIndex=At(i.zIndex,this.options.zIndex)),this.appendVisual(n)}n.visible(t)},ne.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},ne.prototype.createGradient=function(t){if(this.parent)return this.parent.createGradient(t)},ne.prototype.supportsPointInactiveOpacity=function(){return!0},ne);function ne(t){ie.call(this),this.children=[],this.options=m({},this.options,this.initUserOptions(t))}o.prototype.options={};var se,ae=o,o=((se=ae)&&(he.__proto__=se),((he.prototype=Object.create(se&&se.prototype)).constructor=he).prototype.reflow=function(t){function l(){o.align(t,_,i.align),o.align(t,O,i.vAlign),o.paddingBox=e.clone().unpad(s).unpad(h)}var e,o=this,i=this.options,r=i.width,n=i.height,c=i.shrinkToFit,u=r&&n,s=i.margin,a=i.padding,h=i.border.width,p=t.clone();u&&(p.x2=p.x1+r,p.y2=p.y1+n),c&&p.unpad(s).unpad(h).unpad(a),se.prototype.reflow.call(this,p),e=u?this.box=new C(0,0,r,n):this.box,c&&u?(l(),p=this.contentBox=this.paddingBox.clone().unpad(a)):(p=this.contentBox=e.clone(),e.pad(a).pad(h).pad(s),l()),this.translateChildren(e.x1-p.x1+s.left+h+a.left,e.y1-p.y1+s.top+h+a.top);for(var d=this.children,f=0;f<d.length;f++){var g=d[f];g.reflow(g.box)}},he.prototype.align=function(t,e,o){this.box.align(t,e,o)},he.prototype.hasBox=function(){var t=this.options;return t.border.width||t.background},he.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()))},he.prototype.visualStyle=function(){var t=this.options,e=t.border||{};return{stroke:{width:e.width,color:e.color,opacity:At(e.opacity,t.opacity),dashType:e.dashType},fill:{color:t.background,opacity:t.opacity},cursor:t.cursor}},he);function he(t){se.call(this,t),this.options.margin=q(this.options.margin),this.options.padding=q(this.options.padding)}i(o,{align:P,vAlign:M,margin:{},padding:{},border:{color:a,width:0},background:"",shrinkToFit:!1,width:0,height:0,visible:!0});var pe,le=o,o=((pe=le)&&(ce.__proto__=pe),((ce.prototype=Object.create(pe&&pe.prototype)).constructor=ce).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===u?a=new b.drawing.Circle(new b.geometry.Circle([k(e.x1+n,3),k(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=At(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},ce.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()},ce.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}},ce.prototype.createVisual=function(){this.visual=this.createElement()},ce);function ce(t,e){pe.call(this,t),this.pointData=e}i(o,{type:u,align:A,vAlign:A});var ue=o,de={glass:{type:"linear",rotation:0,stops:[{offset:0,color:x,opacity:0},{offset:.25,color:x,opacity:.3},{offset:1,color:x,opacity:0}]},sharpBevel:{type:"radial",stops:[{offset:0,color:x,opacity:.55},{offset:.65,color:x,opacity:0},{offset:.95,color:x,opacity:.25}]},roundedBevel:{type:"radial",stops:[{offset:.33,color:x,opacity:.06},{offset:.83,color:x,opacity:.2},{offset:.95,color:x,opacity:0}]},roundedGlass:{type:"radial",supportVML:!1,stops:[{offset:0,color:x,opacity:0},{offset:.5,color:x,opacity:.3},{offset:.99,color:x,opacity:0}]},sharpGlass:{type:"radial",supportVML:!1,stops:[{offset:0,color:x,opacity:.2},{offset:.15,color:x,opacity:.15},{offset:.17,color:x,opacity:.35},{offset:.85,color:x,opacity:.05},{offset:.87,color:x,opacity:.15},{offset:.99,color:x,opacity:0}]},bubbleShadow:{type:"radial",center:[.5,.5],radius:.5}};(fe=ae)&&(ge.__proto__=fe),((ge.prototype=Object.create(fe&&fe.prototype)).constructor=ge).prototype.reflow=function(){var t=this.options,e=this.children,o=new C(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),l=Math.max(t.y2,e.y2),p=[];return p[0]=new C(i,s,r,a),p[1]=new C(o,a,i,h),p[2]=new C(r,a,n,h),p[3]=new C(i,h,r,l),t.x1===o&&t.y1===s||e.x1===o&&e.y1===s?(p[4]=new C(o,s,i,a),p[5]=new C(r,h,n,l)):(p[4]=new C(r,s,n,a),p[5]=new C(o,h,i,l)),et(p,function(t){return 0<t.height()&&0<t.width()})[0]}(o,e[i].box)||new C},ge.prototype.createVisual=function(){this.visual=new b.drawing.Group,this.createBackground()},ge.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)},ge.prototype.getRoot=function(){return this},ge.prototype.createGradient=function(t){var e,s,o=this.gradients,i=Ct(t),r=de[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},ge.prototype.cleanGradients=function(){var t,e=this.gradients;for(t in e)e[t]._observers=[]},ge.prototype.size=function(){var t=this.options;return new C(0,0,t.width,t.height)};var fe,o=ge;function ge(t){fe.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:x,border:{color:a,width:0},margin:q(5),zIndex:-2});var ye,ve=o,o=((ye=ae)&&(me.__proto__=ye),((me.prototype=Object.create(ye&&ye.prototype)).constructor=me).prototype._initDirection=function(){var t=this.options;t.vertical?(this.groupAxis=_,this.elementAxis=O,this.groupSizeField="width",this.elementSizeField="height",this.groupSpacing=t.spacing,this.elementSpacing=t.vSpacing):(this.groupAxis=O,this.elementAxis=_,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,l=this.elementSizeField,i=this.groupSizeField,r=this.groupOptions(),c=r.groups,u=r.groupsSize,r=r.maxGroupElementsSize,d=c.length,n=t[o+1]+this.alignStart(u,t[i]());if(d){for(var f=n,s=0;s<d;s++){for(var a=c[s],g=a.groupElements,y=t[e+1],v=g.length,m=0;m<v;m++){var x=g[m],h=this.elementSize(x),_=f+this.alignStart(h[i],a.groupSize),p=new C;p[o+1]=_,p[o+2]=_+h[i],p[e+1]=y,p[e+2]=y+h[l],x.reflow(p),y+=h[l]+this.elementSpacing}f+=a.groupSize+this.groupSpacing}t[o+1]=n,t[o+2]=n+u,t[e+2]=t[e+1]+r}},me.prototype.alignStart=function(t,e){var o=0,i=this.options.align;return i===T||i===S?o=e-t:i===A&&(o=(e-t)/2),o},me.prototype.groupOptions=function(){for(var t=this.box,l=this.children,e=this.elementSizeField,c=this.groupSizeField,u=this.elementSpacing,d=this.groupSpacing,f=k(t[e]()),g=l.length,o=[],i=0,r=0,y=0,n=0,s=[],a=0;a<g;a++){var h=l[a],p=(h.box||h.reflow(t),this.elementSize(h));this.options.wrap&&k(r+u+p[e])>f&&(o.push({groupElements:s,groupSize:i,groupElementsSize:r}),n=Math.max(n,r),y+=d+i,r=i=0,s=[]),i=Math.max(i,p[c]),0<r&&(r+=u),r+=p[e],s.push(h)}return o.push({groupElements:s,groupSize:i,groupElementsSize:r}),{groups:o,groupsSize:y+=i,maxGroupElementsSize:n=Math.max(n,r)}},me.prototype.elementSize=function(t){return{width:t.box.width(),height:t.box.height()}},me.prototype.createVisual=function(){},me);function me(t){ye.call(this,t),this._initDirection()}i(o,{vertical:!0,wrap:!0,vSpacing:0,spacing:0});var xe,_e=o,be=b.drawing.Text,o=((xe=ae)&&(we.__proto__=xe),((we.prototype=Object.create(xe&&xe.prototype)).constructor=we).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 C(t.x1,t.y1,t.x1+e.width,t.y1+e.height)},we.prototype.createVisual=function(){var t=this.options,e=t.font,o=t.color,i=t.opacity,t=t.cursor;this.visual=new be(this.content,this.box.toRect().topLeft(),{font:e,fill:{color:o,opacity:i},cursor:t})},we);function we(t,e){xe.call(this,e),this.content=t,this.reflow(new C)}i(o,{font:"12px sans-serif",color:a});var Ce=o;function Se(t){var e=t.origin,t=t.bottomRight();return new C(e.x,e.y,t.x,t.y)}var ke,Ae,Pe=/\n/m,Te=((Ae=le)&&(Oe.__proto__=Ae),((Oe.prototype=Object.create(Ae&&Ae.prototype)).constructor=Oe).prototype._initContainer=function(){var t=this.options,e=String(this.content).split(Pe),o=new _e({vertical:!0,align:t.align,wrap:!1}),i=m({},t,{opacity:1,animation:null});this.container=o,this.append(o);for(var r=0;r<e.length;r++){var n=new Ce(e[r].trim(),i);o.append(n)}},Oe.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=Se(i.clippedBBox()||new b.geometry.Rect),i.options.zIndex=o.zIndex),this.box=this.contentBox=this.paddingBox=e):(Ae.prototype.reflow.call(this,t),o.rotation&&(i=q(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)))},Oe.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))},Oe.prototype.renderVisual=function(){var t;this.options.visible&&(this.options.visual?((t=this.visual)&&!w(t.options.noclip)&&(t.options.noclip=this.options.noclip),this.addVisual(),this.createAnimation()):Ae.prototype.renderVisual.call(this))},Oe.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},Oe.prototype.getDefaultVisual=function(){this.createVisual(),this.renderChildren();var t=this.visual;return delete this.visual,t},Oe.prototype.rotate=function(){var t=this.options;return this.box.rotate(t.rotation),this.align(this.targetBox,_,t.align),this.align(this.targetBox,O,t.vAlign),this.box},Oe.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])},Oe),o=((ke=ae)&&(Me.__proto__=ke),((Me.prototype=Object.create(ke&&ke.prototype)).constructor=Me).prototype.reflow=function(t){ke.prototype.reflow.call(this,t),this.box.snapTo(t,_)},Me.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 Me(t),e.append(i)),i},Me);function Me(t){ke.call(this,t),this.append(new Te(this.options.text,Object.assign({},this.options,{vAlign:this.options.position})))}function Oe(t,e,o){Ae.call(this,e),this.content=t,this.data=o,this._initContainer(),!1!==this.options._autoReflow&&this.reflow(new C)}i(o,{color:a,position:M,align:A,margin:q(5),padding:q(5)});var Be,Re=o,o=((Be=Te)&&(Ee.__proto__=Be),((Ee.prototype=Object.create(Be&&Be.prototype)).constructor=Ee).prototype.visualContext=function(t){t=Be.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},Ee.prototype.click=function(t,e){t.trigger("axisLabelClick",{element:xt(e),value:this.value,text:this.text,index:this.index,dataItem:this.dataItem,axis:this.parent.options})},Ee.prototype.rotate=function(){var t,e;return this.options.alignRotation!==A?(t=this.normalBox.toRect(),e=this.rotationTransform(),this.box=Se(t.bbox(e.matrix()))):Be.prototype.rotate.call(this),this.box},Ee.prototype.rotationTransform=function(){var t=this.options,l=t.rotation;if(!l)return null;if(t.alignRotation===A)return Be.prototype.rotationTransform.call(this);var e=b.geometry.transform().rotate(l).matrix(),o=this.normalBox.toRect(),i=this.targetBox.toRect(),t=t.rotationOrigin||M,r=t===M||t===S?_:O,n=t===M||t===S?O:_,t=t===M||t===P?i.origin:i.bottomRight(),s=o.topLeft().transformCopy(e),a=o.topRight().transformCopy(e),c=o.bottomRight().transformCopy(e),o=o.bottomLeft().transformCopy(e),e=b.geometry.Rect.fromPoints(s,a,c,o),h={};h[n]=i.origin[n]-e.origin[n];var p,e=Math.abs(s[n]+h[n]-t[n]),t=Math.abs(a[n]+h[n]-t[n]),n=k(e,g)===k(t,g)?(p=s,a):t<e?(p=a,c):(p=s,o),t=p[r]+(n[r]-p[r])/2;return h[r]=i.center()[r]-t,b.geometry.transform().translate(h.x,h.y).rotate(l)},Ee);function Ee(t,e,o,i,r){Be.call(this,e,r),this.text=e,this.value=t,this.index=o,this.dataItem=i,this.reflow(new C)}i(o,{_autoReflow:!1});var Le,Ie=o,o=((Le=le)&&(ze.__proto__=Le),((ze.prototype=Object.create(Le&&Le.prototype)).constructor=ze).prototype.hide=function(){this.options.visible=!1},ze.prototype.show=function(){this.options.visible=!0},ze.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 C,r=function(){return h},n=p.size,s=this.fields.text,w(o)&&o.visible&&((a=K(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 Te(s,m({},o)),this.label.aliasFor=r,"inside"!==o.position||w(n)||(p.type===u?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 ue(m({},p))).aliasFor=r,this.marker=a,this.append(a),this.label&&this.append(this.label),a.reflow(new C),this.wrapperBox=i.wrap(a.box))},ze.prototype.reflow=function(t){var e,o,i,r=this.options,n=this.label,s=this.marker,a=this.wrapperBox,h=t.center(),l=r.line.length,p=r.position;r.visible&&(nt(p,[P,T])?p===P?(i=a.alignTo(t,p).translate(-l,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,p).translate(l,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))):p===S?(i=a.alignTo(t,p).translate(t.center().x-a.center().x,l),r.line.visible&&(e=[h.x,t.y2],this.linePoints=[e,[h.x,i.y1]],o=i.clone().wrapPoint(e))):(i=a.alignTo(t,p).translate(t.center().x-a.center().x,-l),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,p),n.reflow(n.box))),this.contentBox=i,this.targetBox=t,this.box=o||i)},ze.prototype.createVisual=function(){Le.prototype.createVisual.call(this),this.visual.options.noclip=this.options.noclip,this.options.visible&&this.createLine()},ze.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()):Le.prototype.renderVisual.call(this)},ze.prototype.createLine=function(){var t=this.options.line;this.linePoints&&(I(t=b.drawing.Path.fromPoints(this.linePoints,{stroke:{color:t.color,width:t.width,dashType:t.dashType}})),this.visual.append(t))},ze.prototype.click=function(t,e){var o=this.eventArgs(e);t.trigger("noteClick",o)||e.preventDefault()},ze.prototype.over=function(t,e){var o=this.eventArgs(e);t.trigger("noteHover",o)||e.preventDefault()},ze.prototype.out=function(t,e){e=this.eventArgs(e);t.trigger("noteLeave",e)},ze.prototype.eventArgs=function(t){var e=this.options;return Object.assign(this.fields,{element:xt(t),text:w(e.label)?e.label.text:"",visual:this.visual})},ze);function ze(t,e,o){Le.call(this,e),this.fields=t,this.chartService=o,this.render()}i(o,{icon:{visible:!0,type:u},label:{position:"inside",visible:!0,align:A,vAlign:A},line:{visible:!0},visible:!0,position:M,zIndex:2});function Ve(){}function je(t){this._intlService=t}function De(t,e){this._intlService=(e=void 0===e?{}:e).intlService,this.sender=e.sender||t,this.format=new Ge(e.intlService),this.chart=t,this.rtl=Boolean(e.rtl)}var He=o,Ue={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}},Fe=(Ve.register=function(t){Ue=t},o.implementation.get=function(){return Ue},Object.defineProperties(Ve,o),Ve),Ne=/\{(\d+)(:[^\}]+)?\}/g,o={intl:{configurable:!0}},Ge=(o.intl.get=function(){return this._intlService||Fe.implementation},o.intl.set=function(t){this._intlService=t},je.prototype.auto=function(t){for(var e=[],o=arguments.length-1;0<o--;)e[o]=arguments[o+1];var i=this.intl;return j(t)&&t.match(h)?i.format.apply(i,[t].concat(e)):i.toString(e[0],t)},je.prototype.localeAuto=function(t,i,r){var n=this.intl;return j(t)&&t.match(h)?t.replace(Ne,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(je.prototype,o),je),o={intl:{configurable:!0}};o.intl.get=function(){return this._intlService||Fe.implementation},o.intl.set=function(t){this._intlService=t,this.format.intl=t},De.prototype.notify=function(t,e){this.chart&&this.chart.trigger(t,e)},De.prototype.isPannable=function(t){var e=((this.chart||{}).options||{}).pannable;return e&&e.lock!==t},Object.defineProperties(De.prototype,o);function We(){}var Xe,qe=De,Ye=(We.register=function(t){Xe=t},We.create=function(t,e){if(Xe)return Xe.create(t,e)},We);function Ze(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),I(n),n}function Qe(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),I(e),e}(Ke=ae)&&($e.__proto__=Ke),(($e.prototype=Object.create(Ke&&Ke.prototype)).constructor=$e).prototype.initFields=function(){},$e.prototype.labelsRange=function(){return{min:this.options.labels.skip,max:this.labelsCount()}},$e.prototype.normalizeLabelRotation=function(t){var e=t.rotation;N(e)&&(t.alignRotation=e.align,t.rotation=e.angle)},$e.prototype.createLabels=function(){var t=this.options,e=t.vertical?T:A,o=m({},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))}}},$e.prototype.clearLabels=function(){this.children=et(this.children,function(t){return!(t instanceof Ie)}),this.labels=[]},$e.prototype.clearTitle=function(){var e=this;this.title&&(this.children=et(this.children,function(t){return t!==e.title}),this.title=void 0)},$e.prototype.clear=function(){this.clearLabels(),this.clearTitle()},$e.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 C(r,e.y1,r,e.y2-t):new C(e.x1,i,e.x2-t,i)},$e.prototype.createTitle=function(){var t=this.options,t=m({rotation:t.vertical?-90:0,text:"",zIndex:1,visualSize:!0},t.title);t.visible&&t.text&&(t=new Te(t.text,t),this.append(t),this.title=t)},$e.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=m({},e,o[i]),r=(r.value=this.parseNoteValue(r.value),new He({value:r.value,text:r.label.text,dataItem:r},r,this.chartService));r.options.visible&&(w(r.options.position)?t.vertical&&!nt(r.options.position,[P,T])?r.options.position=t.reverse?P:T:t.vertical||nt(r.options.position,[M,S])||(r.options.position=t.reverse?S:M):t.vertical?r.options.position=t.reverse?P:T:r.options.position=t.reverse?S:M,this.append(r),this.notes.push(r))}},$e.prototype.parseNoteValue=function(t){return t},$e.prototype.renderVisual=function(){Ke.prototype.renderVisual.call(this),this.createPlotBands()},$e.prototype.createVisual=function(){Ke.prototype.createVisual.call(this),this.createBackground(),this.createLine()},$e.prototype.gridLinesVisual=function(){var t=this._gridLines;return t||(t=this._gridLines=new b.drawing.Group({zIndex:-2}),this.appendVisual(this._gridLines)),t},$e.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)w(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(Ze(p,e)))}o(this.getMajorTickPositions(),t.majorTicks),o(this.getMinorTickPositions(),t.minorTicks,e/t.minorUnit)},$e.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&&I(e),(o=this._lineGroup=new b.drawing.Group).append(e),this.visual.append(o),this.createTicks(o))},$e.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},$e.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))},$e.prototype.createPlotBands=function(){var l=this,t=this.options,e=t.plotBands||[],c=t.vertical,o=this.plotArea;if(0!==e.length){for(var i=this._plotbandGroup=new b.drawing.Group({zIndex:-1}),u=et(this.pane.axes,function(t){return t.options.vertical!==l.options.vertical})[0],r=0;r<e.length;r++){var n=e[r],s=void 0,a=void 0,h=n.label,p=void 0,a=c?(s=(u||o.axisX).lineBox(),this.getSlot(n.from,n.to,!0)):(s=this.getSlot(n.from,n.to,!0),(u||o.axisY).lineBox());h&&(h.vAlign=h.position||P,p=this.createPlotBandLabel(h,n,new C(s.x1,a.y1,s.x2,a.y2))),0!==s.width()&&0!==a.height()&&(h=new b.geometry.Rect([s.x1,a.y1],[s.width(),a.height()]),s=b.drawing.Path.fromRect(h,{fill:{color:n.color,opacity:n.opacity},stroke:null}),i.append(s),p&&i.append(p))}this.appendVisual(i)}},$e.prototype.createPlotBandLabel=function(t,e,o){if(!1===t.visible)return null;var i,r=t.text;return w(t)&&t.visible&&((i=K(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 Te(r,t)).reflow(o),i.renderVisual(),i.visual},$e.prototype.createGridLines=function(t){var e=this.options,o=e.minorGridLines,i=e.majorGridLines,r=e.minorUnit,n=e.vertical,l=t.options.line.visible,e=i.visible?e.majorUnit:0,t=t.lineBox(),c=t[n?"y1":"x1"],a={lineStart:t[n?"x1":"y1"],lineEnd:t[n?"x2":"y2"],vertical:n},h=[],p=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=k(t[n]);nt(s,h)||n%o==0||l&&c===s||(a.position=s,p.append(Qe(a,e)),h.push(s))}}return s(this.getMajorTickPositions(),i),s(this.getMinorTickPositions(),o,e/r),p.children},$e.prototype.reflow=function(t){for(var e=this.options,o=this.labels,i=this.title,r=e.vertical,l=o.length,n=r?"width":"height",i=i?i.box[n]():0,s=this.getActualTickSize()+e.margin+i,c=((this.getRoot()||{}).box||t)[n](),a=0,h=0;h<l;h++){var p=o[h].box[n]();p+s<=c&&(a=Math.max(a,p))}this.box=r?new C(t.x1,t.y1,t.x1+a+s,t.y2):new C(t.x1,t.y1,t.x2,t.y1+a+s),this.arrangeTitle(),this.arrangeLabels(),this.arrangeNotes()},$e.prototype.getLabelsTickPositions=function(){return this.getMajorTickPositions()},$e.prototype.labelTickIndex=function(t){return t.index},$e.prototype.arrangeLabels=function(){for(var t=this.options,e=this.labels,o=this.labelsBetweenTicks(),i=t.vertical,l=t.labels.mirror,c=this.getLabelsTickPositions(),r=0;r<e.length;r++){var n=e[r],s=this.labelTickIndex(n),a=i?n.box.height():n.box.width(),h=c[s],s=c[s+1],p=void 0,u=void 0,u=i?p=o?h+(s-h)/2-a/2:h-a/2:o?(p=h,s):(p=h-a/2)+a;this.positionLabel(n,l,p,u)}},$e.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=P):(n-=r+t.box.width(),t.options.rotationOrigin=T),t.box.move(n,o)):(n=s.y1,e?(n-=r+t.box.height(),t.options.rotationOrigin=S):(n+=r,t.options.rotationOrigin=M),new C(o,n,i,n+t.box.height()));t.reflow(s)},$e.prototype.autoRotateLabelAngle=function(t,e){return t.width()<e?0:t.height()>e?-90:-45},$e.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 C);return!0}},$e.prototype.arrangeTitle=function(){var t=this.options,e=this.title,o=t.labels.mirror,t=t.vertical;e&&(t?(e.options.align=o?T:P,e.options.vAlign=e.options.position):(e.options.align=e.options.position,e.options.vAlign=o?M:S),e.reflow(this.box))},$e.prototype.arrangeNotes=function(){for(var t=0;t<this.notes.length;t++){var e=this.notes[t],o=e.options.value,i=void 0;w(o)?(this.shouldRenderNote(o)?e.show():e.hide(),i=this.noteSlot(o)):e.hide(),e.reflow(i||this.lineBox())}},$e.prototype.noteSlot=function(t){return this.getSlot(t)},$e.prototype.alignTo=function(t){var t=t.lineBox(),e=this.options.vertical,o=e?O:_;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]},$e.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=K(e),n=n?n(Object.assign({},o,{get text(){return i()},value:t,format:e.format,culture:e.culture})):i();return n},$e.prototype.slot=function(t,e,o){t=this.getSlot(t,e,o);if(t)return t.toRect()},$e.prototype.contentBox=function(){var t,e,o=this.box.clone(),i=this.labels;return i.length&&(e=this.options.vertical?O:_,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},$e.prototype.maxLabelOffset=function(){for(var t=this.options,l=t.vertical,t=t.reverse,c=this.labelsBetweenTicks(),e=this.getLabelsTickPositions(),o=l?O:_,u=this.labels,d=t?1:0,f=t?0:1,i=0,r=0,n=0;n<u.length;n++){var s=u[n],a=this.labelTickIndex(s),h=void 0,p=void 0;c?(h=e[a+d],p=e[a+f]):h=p=e[a],i=Math.max(i,h-s.box[o+1]),r=Math.max(r,s.box[o+2]-p)}return{start:i,end:r}},$e.prototype.limitRange=function(t,e,o,i,r){var n=this.options;if(t<o&&r<0&&(!w(n.min)||n.min<=o)||i<e&&0<r&&(!w(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=wt(t,o,i),a=wt(t+n,o+n,i)):i<e&&0<r&&(a=wt(e,o,i),s=wt(e-n,o,i-n)),{min:s,max:a}},$e.prototype.valueRange=function(){return{min:this.seriesMin,max:this.seriesMax}},$e.prototype.lineDir=function(){var t=this.options;return(t.vertical?-1:1)*(t.reverse?-1:1)},$e.prototype.lineInfo=function(){var t=this.options.vertical,e=this.lineBox(),o=t?e.height():e.width(),t=t?O:_,i=this.lineDir(),r=t+(1===i?1:2).toString();return{axis:t,axisOrigin:r,axisDir:i,lineBox:e,lineSize:o,lineStart:e[r]}},$e.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},$e.prototype.scaleToDelta=function(t,e){t=wt(t,-.999,.999);return 0<t?e*Math.min(1,t):e-e/(1+t)},$e.prototype.labelsBetweenTicks=function(){return!this.options.justified},$e.prototype.prepareUserOptions=function(){};var Ke,o=$e;function $e(t,e){void 0===e&&(e=new qe),Ke.call(this,t),this.chartService=e,this.options.visible||(this.options=m({},this.options,{labels:{visible:!1},line:{visible:!1},margin:0,majorTickSize:0,minorTickSize:0})),this.options.minorTicks=m({},{color:this.options.line.color,width:this.options.line.width,visible:this.options.minorTickType!==p},this.options.minorTicks,{size:this.options.minorTickSize,align:this.options.minorTickType}),this.options.majorTicks=m({},{color:this.options.line.color,width:this.options.line.width,visible:this.options.majorTickType!==p},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:a,visible:!0},title:{visible:!0,position:A},majorTicks:{align:"outside",size:4,skip:0,step:1},minorTicks:{align:"outside",size:3,skip:0,step:1},axisCrossingValue:0,majorTickType:"outside",minorTickType:p,majorGridLines:{skip:0,step:1},minorGridLines:{visible:!1,width:1,color:a,skip:0,step:1},margin:5,visible:!0,reverse:!1,justified:!0,notes:{label:{text:""}},_alignLines:!0,_deferLabels:!1});var Je=o,to="milliseconds",eo="seconds",oo="minutes",io="hours",ro="days",no="weeks",so="months",ao="years",ho=1e3,po=60*ho,lo=60*po,co=24*lo,uo=7*co,fo=31*co,go=365*co,yo={years:go,months:fo,weeks:uo,days:co,hours:lo,minutes:po,seconds:ho,milliseconds:1};function vo(t,e){return t.getTime()-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*po}function mo(t,e){return new Date(t.getTime()+e)}function xo(t){var e;return t instanceof Date?e=t:t&&(e=new Date(t)),e}function _o(t,e){return 0===e&&23===t.getHours()&&(t.setHours(t.getHours()+2),1)}function bo(t,e,o,r){var i,n,s,a=t;return t&&(i=(t=xo(t)).getHours(),o===ao?_o(a=new Date(t.getFullYear()+e,0,1),0):o===so?_o(a=new Date(t.getFullYear(),t.getMonth()+e,1),i):o===no?_o(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 mo(t,-o*co)}(t,r),7*e,ro),i):o===ro?_o(a=new Date(t.getFullYear(),t.getMonth(),t.getDate()+e),i):o===io?(i=t,n=e,(s=new Date(i)).setMinutes(0,0,0),a=mo(s,(i.getTimezoneOffset()-s.getTimezoneOffset())*po+n*lo)):o===oo?0<(a=mo(t,e*po)).getSeconds()&&a.setSeconds(0):o===eo?a=mo(t,e*ho):o===to&&(a=mo(t,e)),o!==to&&0<a.getMilliseconds()&&a.setMilliseconds(0)),a}function wo(t,e,o){return bo(xo(t),0,e,o)}function Co(t,e,o){t=xo(t);return t&&wo(t,e,o).getTime()===t.getTime()?t:bo(t,1,e,o)}function So(t,e){return t&&e?t.getTime()-e.getTime():-1}function ko(t,e){return t.getTime()-e}function Ao(t){if(B(t)){for(var e=[],o=0;o<t.length;o++)e.push(Ao(t[o]));return e}if(t)return xo(t).getTime()}function Po(t,e){return t&&e?Ao(t)===Ao(e):t===e}function To(t,e,o){return vo(t,e)/yo[o]}function Mo(t,e,o,i){var t=xo(t),r=xo(e);return(o===so?t.getMonth()-r.getMonth()+12*(t.getFullYear()-r.getFullYear())+To(t,new Date(t.getFullYear(),t.getMonth()),ro)/new Date(t.getFullYear(),t.getMonth()+1,0).getDate():o===ao?t.getFullYear()-r.getFullYear()+Mo(t,new Date(t.getFullYear(),0),so,1)/12:o===ro||o===no?To(t,r,o):ko(t,e)/yo[o])/i}function Oo(t,e,o){return o===ao?e.getFullYear()-t.getFullYear():o===so?12*Oo(t,e,ao)+e.getMonth()-t.getMonth():o===ro?Math.floor(ko(e,t)/co):Math.floor(ko(e,t)/yo[o])}function Bo(t,e){return j(e)&&t.parseDate(e)||xo(e)}function Ro(t,e){if(B(e)){for(var o=[],i=0;i<e.length;i++)o.push(Bo(t,e[i]));return o}return Bo(t,e)}function Eo(t,e){return V(t.weekStartDay)?t.weekStartDay:e&&e.firstDay?e.firstDay():0}(Lo=Je)&&(Io.__proto__=Lo),((Io.prototype=Object.create(Lo&&Lo.prototype)).constructor=Io).prototype.initFields=function(){this._ticks={}},Io.prototype.categoriesHash=function(){return""},Io.prototype.clone=function(){var t=new Io(Object.assign({},this.options,{categories:this.options.srcCategories}),this.chartService);return t.createLabels(),t},Io.prototype.initUserOptions=function(t){var e=t.categories||[],o=w(t.min),i=w(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},Io.prototype.rangeIndices=function(){var t=this.options,e=t.categories.length||1;return{min:V(t.min)?t.min%1:0,max:V(t.max)&&t.max%1!=0&&t.max<this.totalRange().max?e-(1-t.max%1):e-(t.justified?1:0)}},Io.prototype.totalRangeIndices=function(t){var e=this.options,o=V(e.min)?e.min:0;return e=V(e.max)?e.max:V(e.min)?o+e.categories.length:this.totalRange().max||1,t&&(t=this.totalRange(),o=wt(o,0,t.max),e=wt(e,0,t.max)),{min:o,max:e}},Io.prototype.range=function(){var t=this.options;return{min:V(t.min)?t.min:0,max:(V(t.max)?t:this.totalRange()).max}},Io.prototype.roundedRange=function(){return this.range()},Io.prototype.totalRange=function(){var t=this.options;return{min:0,max:Math.max(this._seriesMax||0,t.srcCategories.length)-(t.justified?1:0)}},Io.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}},Io.prototype.arrangeLabels=function(){Lo.prototype.arrangeLabels.call(this),this.hideOutOfRangeLabels()},Io.prototype.hideOutOfRangeLabels=function(){var t,e,o,i=this.box,r=this.labels;0<r.length&&(e=i[(t=this.options.vertical?O:_)+1],i=i[t+2],o=r[0],r=bt(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))},Io.prototype.getMajorTickPositions=function(){return this.getTicks().majorTicks},Io.prototype.getMinorTickPositions=function(){return this.getTicks().minorTicks},Io.prototype.getLabelsTickPositions=function(){return this.getTicks().labelTicks},Io.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},Io.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,l=n[(o?O:_)+(e?2:1)],a=this.tickIndices(t),h=[],p=0;p<a.length;p++)h.push(l+k(r*(a[p]-s),3));return h},Io.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},Io.prototype.filterOutOfRangePositions=function(t,e){if(!t.length)return t;for(var o=this.options.vertical?O:_,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)},Io.prototype.lineInfo=function(){var t=this.options,e=t.vertical,t=t.reverse,o=this.lineBox(),i=e?o.height():o.width(),e=e?O:_,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]}},Io.prototype.lineDir=function(){return this.options.reverse?-1:1},Io.prototype.getSlot=function(t,e,l){var o=this.options,i=o.reverse,o=o.justified,r=this.scaleOptions(),c=r.scale,n=r.box,r=r.min,s=this.lineInfo(),a=s.axis,s=s.lineStart,h=n.clone(),u=!w(e),t=At(t,0),e=At(e,t),e=Math.max(e-1,t),p=s+(t-r)*c,s=s+(Math.max(t,e)+1-r)*c;return u&&o&&(s=p),l&&(p=wt(p,n[a+1],n[a+2]),s=wt(s,n[a+1],n[a+2])),h[a+1]=i?s:p,h[a+2]=i?p:s,h},Io.prototype.limitSlot=function(t){var e=this.options.vertical?O:_,o=this.lineBox(),i=t.clone();return i[e+1]=wt(t[e+1],o[e+1],o[e+2]),i[e+2]=wt(t[e+2],o[e+1],o[e+2]),i},Io.prototype.slot=function(t,e,o){var i=Math.floor(this.options.min||0);return"string"==typeof t?t=this.categoryIndex(t):V(t)&&(t-=i),"string"==typeof e?e=this.categoryIndex(e):V(e)&&(e-=i),Lo.prototype.slot.call(this,t,e,o)},Io.prototype.pointCategoryIndex=function(t){var e=this.options,o=e.reverse,i=e.justified,e=e.vertical?O:_,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)},Io.prototype.getCategory=function(t){t=this.pointCategoryIndex(t);return null===t?null:this.options.categories[t]},Io.prototype.categoryIndex=function(t){return this.totalIndex(t)-Math.floor(this.options.min||0)},Io.prototype.categoryAt=function(t,e){var o=this.options;return(e?o.srcCategories:o.categories)[t]},Io.prototype.categoriesCount=function(){return(this.options.categories||[]).length},Io.prototype.translateRange=function(t){var e=this.options,o=this.lineBox(),o=e.vertical?o.height():o.width(),e=e.categories.length,t=k(t/(o/e),g);return{min:t,max:e+t}},Io.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}},Io.prototype.zoomRange=function(t,e){var o=this.totalRange(),i=o.min,o=o.max,t=this.scaleRange(t,e);return{min:wt(t.min,i,o),max:wt(t.max,i,o)}},Io.prototype.labelsCount=function(){var t=this.labelsRange();return t.max-t.min},Io.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}},Io.prototype.createAxisLabel=function(t,e,o){var i=this.options,r=i.dataItems?i.dataItems[t]:null,i=At(i.categories[t],""),o=(o.dataItem=r,this.axisLabelText(i,e,o));return new Ie(i,o,t,r,e)},Io.prototype.shouldRenderNote=function(t){var e=this.totalRangeIndices();return Math.floor(e.min)<=t&&t<=Math.ceil(e.max)},Io.prototype.noteSlot=function(t){var e=this.options,t=t-Math.floor(e.min||0);return this.getSlot(t)},Io.prototype.arrangeNotes=function(){Lo.prototype.arrangeNotes.call(this),this.hideOutOfRangeNotes()},Io.prototype.hideOutOfRangeNotes=function(){var t=this.notes,e=this.box;if(t&&t.length)for(var o=this.options.vertical?O:_,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()}},Io.prototype.pan=function(t){var e=this.totalRangeIndices(!0),o=this.scaleOptions().scale,t=k(t/o,g),o=this.totalRange(),i=e.min+t,e=e.max+t;return this.limitRange(i,e,0,o.max,t)},Io.prototype.pointsRange=function(t,e){var o=this.options,i=o.reverse,o=o.vertical?O:_,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}},Io.prototype.valueRange=function(){return this.range()},Io.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(Po(i[n],o))return n;return-1}return i.indexOf(o)},Io.prototype.currentRangeIndices=function(){var t=this.options,e=0;return{min:e=V(t.min)?Math.floor(t.min):e,max:V(t.max)?t.justified?Math.floor(t.max):Math.ceil(t.max)-1:this.totalCount()-1}},Io.prototype.mapCategories=function(){if(!this._categoriesMap)for(var t=this._categoriesMap=new rt,e=this.options.srcCategories,o=0;o<e.length;o++)t.set(e[o],o)},Io.prototype.totalCount=function(){return Math.max(this.options.srcCategories.length,this._seriesMax||0)};var Lo,o=Io;function Io(){Lo.apply(this,arguments)}i(o,{type:"category",vertical:!1,majorGridLines:{visible:!1,width:1,color:a},labels:{zIndex:1},justified:!1,_deferLabels:!0});var zo=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"},Vo=[to,eo,oo,io,ro,no,so,ao],jo="fit";function Do(t){var e=t._range;return e||((e=t._range=Tt(t)).min=xo(e.min),e.max=xo(e.max)),e}function Ho(t){this.options=t}function Uo(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&&Po(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&&Po(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))}Ho.prototype.displayIndices=function(){return{min:0,max:1}},Ho.prototype.displayRange=function(){return{}},Ho.prototype.total=function(){return{}},Ho.prototype.valueRange=function(){return{}},Ho.prototype.valueIndex=function(){return-1},Ho.prototype.values=function(){return[]},Ho.prototype.totalIndex=function(){return-1},Ho.prototype.valuesCount=function(){return 0},Ho.prototype.totalCount=function(){return 0},Ho.prototype.dateAt=function(){return null};function Fo(t,e,l){for(var o,i,r,n=Do(t.categories),c=(t.max||n.max)-(t.min||n.min),u=t.autoBaseUnitSteps,s=t.maxDateGroups,d=t.baseUnit===jo,f=e?Vo.indexOf(e):0,a=d?Vo[f++]:t.baseUnit,h=c/yo[a],p=h;!i||s<=h;){for(o=o||u[a].slice(0);(r=o.shift())&&e===a&&r<l;);if(r)h=p/(i=r);else{if(a===bt(Vo)){i=Math.ceil(p/s);break}if(!d){s<h&&(i=Math.ceil(p/s));break}a=Vo[f++]||bt(Vo),p=c/yo[a],o=null}}t.baseUnitStep=i,t.baseUnit=a}Uo.prototype.displayRange=function(){return{min:this.displayStart,max:this.displayEnd}},Uo.prototype.displayIndices=function(){var t,e,o;return this._indices||(o=(t=this.options).baseUnit,t=t.baseUnitStep,e=Mo(this.displayStart,this.valueStart,o,t),o=Mo(this.displayEnd,this.valueStart,o,t),this._indices={min:e,max:o}),this._indices},Uo.prototype.total=function(){return{min:this.start,max:this.end}},Uo.prototype.totalCount=function(){return this.totalIndex(this.end)+(this.options.justified?1:0)},Uo.prototype.valueRange=function(){return{min:this.valueStart,max:this.valueEnd}},Uo.prototype.valueIndex=function(t){var e=this.options;return Math.floor(Mo(t,this.valueStart,e.baseUnit,e.baseUnitStep))},Uo.prototype.totalIndex=function(t){var e=this.options;return Math.floor(Mo(t,this.start,e.baseUnit,e.baseUnitStep))},Uo.prototype.dateIndex=function(t){var e=this.options;return Mo(t,this.valueStart,e.baseUnit,e.baseUnitStep)},Uo.prototype.valuesCount=function(){return this.valueIndex(this.valueEnd)+1},Uo.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},Uo.prototype.dateAt=function(t,e){var o=this.options;return bo(e?this.start:this.valueStart,o.baseUnitStep*t,o.baseUnit,o.weekStartDay)},Uo.prototype.roundToTotalStep=function(t,e,o){var i=this.options,r=i.baseUnit,n=i.baseUnitStep,i=i.weekStartDay,s=this.start,t=Mo(t,s,r,n),e=e?Math.ceil(t):Math.floor(t);return o&&(e+=o),bo(s,e*n,r,i)};(No=zo)&&(Wo.__proto__=No),((Wo.prototype=Object.create(No&&No.prototype)).constructor=Wo).prototype.clone=function(){var t=new Wo(Object.assign({},this.options),this.chartService);return t.createLabels(),t},Wo.prototype.categoriesHash=function(){var t=this.dataRange.total().min;return this.options.baseUnit+this.options.baseUnitStep+t},Wo.prototype.initUserOptions=function(t){return t},Wo.prototype.initFields=function(){No.prototype.initFields.call(this);var t=this.chartService,e=t.intl,o=this.options,i=o.categories||[];i._parsed||((i=Ro(e,i))._parsed=!0),o=m({roundToBaseUnit:!0},o,{categories:i,min:Bo(e,o.min),max:Bo(e,o.max),weekStartDay:Eo(o,e)}),t.panning&&t.isPannable(o.vertical?O:_)&&(o.roundToBaseUnit=!1),o.userSetBaseUnit=o.userSetBaseUnit||o.baseUnit,o.userSetBaseUnitStep=o.userSetBaseUnitStep||o.baseUnitStep,0<((this.options=o).srcCategories=i).length?(e=Do(i),t=o.maxDivisions,this.dataRange=new Uo(e.min,e.max,function(t){var e=(t.baseUnit||"").toLowerCase();if(e!==jo&&!nt(e,Vo)){for(var o,i,r=t,n=r.categories,l=w(n)?n.length:0,s=c,a=0;a<l;a++){var h,p=n[a];p&&o&&(0<(h=vo(p,o))&&(i=(s=Math.min(s,h))>=go?ao:fo-3*co<=s?so:uo<=s?no:co<=s?ro:lo<=s?io:po<=s?oo:eo)),o=p}r.baseUnit=i||ro}return e!==jo&&"auto"!==t.baseUnitStep||Fo(t),t}(o)),t?(i=this.dataRange.displayRange(),Fo(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 Uo(e.min,e.max,i)):this.divisionRange=this.dataRange):(o.baseUnit=o.baseUnit||ro,this.dataRange=this.divisionRange=new Ho(o)),this.rangeLabels=[]},Wo.prototype.tickIndices=function(t){var e=this.dataRange,o=this.divisionRange,i=o.valuesCount();if(!this.options.maxDivisions||!i)return No.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},Wo.prototype.shouldRenderNote=function(t){var e=this.range(),o=this.options.categories||[];return 0<=So(t,e.min)&&So(t,e.max)<=0&&o.length},Wo.prototype.parseNoteValue=function(t){return Bo(this.chartService.intl,t)},Wo.prototype.noteSlot=function(t){return this.getSlot(t)},Wo.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=k(t/r,g);return n.min&&n.max&&(r=mo(e.min||n.min,t),e=mo(e.max||n.max,t),n={min:bo(r,0,o,i),max:bo(e,0,o,i)}),n},Wo.prototype.labelsRange=function(){return{min:this.options.labels.skip,max:this.divisionRange.valuesCount()}},Wo.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=k(t/(o/(i-r)),g)*(e.reverse?-1:1),o=mo(r,t),r=mo(i,t),i=this.limitRange(Ao(o),Ao(r),Ao(n.min),Ao(n.max),t);return i?(i.min=xo(i.min),i.max=xo(i.max),i.baseUnit=e.baseUnit,i.baseUnitStep=e.baseUnitStep||1,i.userSetBaseUnit=e.userSetBaseUnit,i.userSetBaseUnitStep=e.userSetBaseUnitStep,i):void 0},Wo.prototype.pointsRange=function(t,e){if(this.isEmpty())return null;var t=No.prototype.pointsRange.call(this,t,e),e=this.dataRange.displayRange(),o=this.dataRange.displayIndices(),o=ko(e.max,e.min)/(o.max-o.min),i=this.options;return{min:mo(e.min,t.min*o),max:mo(e.min,t.max*o),baseUnit:i.userSetBaseUnit||i.baseUnit,baseUnitStep:i.userSetBaseUnitStep||i.baseUnitStep}},Wo.prototype.scaleRange=function(t,e){if(this.isEmpty())return{};var o=this.options,l=o.userSetBaseUnit===jo,i=this.dataRange.total(),r=this.dataRange.displayRange(),n=r.min,r=r.max,e=Math.abs(this.pointOffset(e)),t=this.scaleToDelta(t,r-n),s=Math.round(e*t),e=Math.round((1-e)*t),a=this.dataRange.options.baseUnit,t=new Date(n.getTime()+s),s=new Date(r.getTime()-e);if(l){var h,p,c=o.autoBaseUnitSteps,e=o.maxDateGroups,l=bt(c[a])*e*yo[a],u=ko(r,n),d=ko(s,t),f=Vo.indexOf(a);if(d<yo[a]&&a!==to)a=Vo[f-1],t=mo(n,p=(u-(e-1)*(h=bt(c[a]))*yo[a])/2),s=mo(r,-p);else if(l<d&&a!==ao){var g=0;do{for(a=Vo[++f],g=0,p=2*yo[a];h=c[a][g],++g<c[a].length&&p*h<u;);}while(a!==ao&&p*h<u);0<(p=(p*h-u)/2)&&(t=mo(n,-p),s=mo(r,p),t=mo(t,wt(s,i.min,i.max)-s),s=mo(s,wt(t,i.min,i.max)-t))}}return t&&s&&0<ko(s,t)?{min:t,max:s,baseUnit:o.userSetBaseUnit||o.baseUnit,baseUnitStep:o.userSetBaseUnitStep||o.baseUnitStep}:void 0},Wo.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},Wo.prototype.range=function(){return this.dataRange.displayRange()},Wo.prototype.createLabels=function(){No.prototype.createLabels.call(this),this.createRangeLabels()},Wo.prototype.clearLabels=function(){No.prototype.clearLabels.call(this),this.rangeLabels=[]},Wo.prototype.arrangeLabels=function(){this.arrangeRangeLabels(),No.prototype.arrangeLabels.call(this)},Wo.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)))},Wo.prototype.autoRotateLabels=function(){No.prototype.autoRotateLabels.call(this),this.autoRotateRangeLabels()},Wo.prototype.hideOutOfRangeLabels=function(){No.prototype.hideOutOfRangeLabels.call(this),this.hideOverlappingLabels()},Wo.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)}},Wo.prototype.contentBox=function(){for(var t=No.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},Wo.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 Ie(r,n,t,i,e)},Wo.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:A,zIndex:o.zIndex});!0===r.visible&&(this.normalizeLabelRotation(r),r.alignRotation=A,"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 Ie(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})))},Wo.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 C))},e=this.getMajorTickPositions(),t(o[0],e,0),t(o[1],e,e.length-2))},Wo.prototype.categoryIndex=function(t){return this.dataRange.valueIndex(t)},Wo.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()},Wo.prototype.getSlot=function(t,e,o){return"object"==typeof t&&(t=this.categoryIndex(t)),"object"==typeof e&&(e=this.categoryIndex(e)),No.prototype.getSlot.call(this,t,e,o)},Wo.prototype.valueRange=function(){var t=Do(this.options.srcCategories);return{min:xo(t.min),max:xo(t.max)}},Wo.prototype.categoryAt=function(t,e){return this.dataRange.dateAt(t,e)},Wo.prototype.categoriesCount=function(){return this.dataRange.valuesCount()},Wo.prototype.rangeIndices=function(){return this.dataRange.displayIndices()},Wo.prototype.labelsBetweenTicks=function(){return!this.divisionRange.options.justified},Wo.prototype.prepareUserOptions=function(){this.isEmpty()||(this.options.categories=this.dataRange.values())},Wo.prototype.getCategory=function(t){t=this.pointCategoryIndex(t);return null===t?null:this.dataRange.dateAt(t)},Wo.prototype.totalIndex=function(t){return this.dataRange.totalIndex(t)},Wo.prototype.currentRangeIndices=function(){var t=this.dataRange.valueRange();return{min:this.dataRange.totalIndex(t.min),max:this.dataRange.totalIndex(t.max)}},Wo.prototype.totalRange=function(){return this.dataRange.total()},Wo.prototype.totalCount=function(){return this.dataRange.totalCount()},Wo.prototype.isEmpty=function(){return!this.options.srcCategories.length},Wo.prototype.roundedRange=function(){if(!1!==this.options.roundToBaseUnit||this.isEmpty())return this.range();var t=this.options,e=Do(t.srcCategories);return new Uo(e.min,e.max,Object.assign({},t,{justified:!1,roundToBaseUnit:!0,justifyEnd:t.justified})).displayRange()};var No,Go=Wo;function Wo(){No.apply(this,arguments)}i(Go,{type:y,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 Xo=Go;function qo(t,e){return k(Math.floor(t/e)*e,g)}function Yo(t,e){return k(Math.ceil(t/e)*e,g)}function Zo(t){return Math.max(Math.min(t,3e5),-3e5)}var Qo,Ko=Math.pow(10,-9),Go=((Qo=Je)&&($o.__proto__=Qo),(($o.prototype=Object.create(Qo&&Qo.prototype)).constructor=$o).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=Ut(e,a),!(s={majorUnit:n})!==r.roundToMajorUnit&&(e<0&&Jo(e,n,1/3)&&(e-=n),0<a&&Jo(a,n,1/3)&&(a+=n)),s.min=qo(e,n),s.max=Yo(a,n);var o,i,e,r=s,n=(this.totalOptions=(e=r,{min:w((a=t).min)?Math.min(e.min,a.min):e.min,max:w(a.max)?Math.max(e.max,a.max):e.max,majorUnit:e.majorUnit}),r),s=t,a=s;if(s){for(var l=s,c=["min","max"],h=0;h<c.length;h++){var u=c[h];null===l[u]&&(l[u]=void 0)}var d=w(s.min),f=w(s.max),p=d||f;p&&s.min===s.max&&(0<s.min?s.min=0:s.max=1),s.majorUnit?(n.min=qo(n.min,s.majorUnit),n.max=Yo(n.max,s.majorUnit)):p&&(a=m(n,s),n.majorUnit=Ut(a.min,a.max))}return n.minorUnit=(a.majorUnit||n.majorUnit)/5,(p=m(n,a)).min>=p.max&&(d&&!f?p.max=p.min+p.majorUnit:!d&&f&&(p.min=p.max-p.majorUnit)),p},$o.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},$o.prototype.clone=function(){return new $o(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},$o.prototype.startValue=function(){return 0},$o.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},$o.prototype.getDivisions=function(t){if(0===t)return 1;var e=this.options,e=e.max-e.min;return Math.floor(k(e/t,3))+1},$o.prototype.getTickPositions=function(t,e){var o=this.options,i=this.lineInfo(),r=i.axisDir,n=i.axisOrigin,l=i.lineBox,c=t*(i.lineSize/(o.max-o.min)),u=this.getDivisions(t),s=[],a=l[n],h=0;e&&(h=e/t);for(var p=0;p<u;p++)p%h!=0&&s.push(k(a,3)),a+=c*r;return s},$o.prototype.getMajorTickPositions=function(){return this.getTickPositions(this.options.majorUnit)},$o.prototype.getMinorTickPositions=function(){return this.getTickPositions(this.options.minorUnit)},$o.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=At(t,e||0),e=At(e,t||0),t=(o&&(p=wt(p,i.min,i.max),e=wt(e,i.min,i.max)),Math.min(p,e)-i.min),o=Math.max(p,e)-i.min,p=new C(a.x1,a.y1,a.x1,a.y1);return p[n+1]=Zo(r+h*(0<s?t:o)),p[n+2]=Zo(r+h*(0<s?o:t)),p},$o.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:k(e+t*(o-e),g)},$o.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=k(t/(n/(r-e)),g);return{min:e+(t=!o&&!i||o&&i?t:-t),max:r+t,offset:t}},$o.prototype.labelsCount=function(){return this.getDivisions(this.options.majorUnit)},$o.prototype.createAxisLabel=function(t,e,o){var i=this.options,i=k(i.min+t*i.majorUnit,g),o=this.axisLabelText(i,e,o);return new Ie(i,o,t,null,e)},$o.prototype.shouldRenderNote=function(t){var e=this.range();return e.min<=t&&t<=e.max},$o.prototype.pan=function(t){t=this.translateRange(t);return this.limitRange(t.min,t.max,this.totalMin,this.totalMax,t.offset)},$o.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}},$o.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=k(this.options.min+e*t,g),t=k(this.options.max-o,g);return{min:e,max:t=t-e<Ko?e+Ko:t}},$o.prototype.zoomRange=function(t,e){var o=this.totalMin,i=this.totalMax,t=this.scaleRange(t,e);return{min:wt(t.min,o,i),max:wt(t.max,o,i),narrowRange:!1}},$o.prototype.isValidRange=function(t,e){return Ko<e-t},$o);function $o(t,e,o,i){Qo.call(this,Object.assign({},o,{seriesMin:t,seriesMax:e}),i)}function Jo(t,e,o){t=k(Math.abs(t%e),g);return 0===t||e*(1-o)<t}i(Go,{type:"numeric",min:0,max:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:a},labels:{format:"#.####################"},zIndex:1});var ti,ei=Go,Go=((ti=Je)&&(oi.__proto__=ti),((oi.prototype=Object.create(ti&&ti.prototype)).constructor=oi).prototype.clone=function(){return new oi(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},oi.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},oi.prototype.getDivisions=function(t){var e=this.options;return Math.floor(Oo(e.min,e.max,e.baseUnit)/t+1)},oi.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/ko(e.max,e.min),l=e.weekStartDay||0,h=[n],p=1;p<s;p++){var c=n+ko(bo(e.min,p*t,e.baseUnit,l),e.min)*a*i;h.push(k(c,3))}return h},oi.prototype.getMajorTickPositions=function(){return this.getTickPositions(this.options.majorUnit)},oi.prototype.getMinorTickPositions=function(){return this.getTickPositions(this.options.minorUnit)},oi.prototype.getSlot=function(t,e,o){return ei.prototype.getSlot.call(this,Bo(this.intlService,t),Bo(this.intlService,e),o)},oi.prototype.getValue=function(t){t=ei.prototype.getValue.call(this,t);return null!==t?xo(t):null},oi.prototype.labelsCount=function(){return this.getDivisions(this.options.majorUnit)},oi.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 Ie(s,n,t,null,e)},oi.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/ko(n.max,n.min),n=k(t/o,g);return{min:mo(e.min,n=!i&&!r||i&&r?n:-n),max:mo(e.max,n),offset:n}},oi.prototype.shouldRenderNote=function(t){var e=this.range();return 0<=So(t,e.min)&&So(t,e.max)<=0},oi.prototype.pan=function(t){t=this.translateRange(t,!0),t=this.limitRange(Ao(t.min),Ao(t.max),this.totalMin,this.totalMax,t.offset);if(t)return{min:xo(t.min),max:xo(t.max)}},oi.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:xo(o),max:xo(t)}},oi.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=xo(Ao(this.options.min)+o),o=xo(Ao(this.options.max)-e);return{min:t,max:o=o-t<1e3?xo(Ao(t)+1e3):o}},oi.prototype.zoomRange=function(t,e){t=this.scaleRange(t,e);return{min:xo(wt(Ao(t.min),this.totalMin,this.totalMax)),max:xo(wt(Ao(t.max),this.totalMin,this.totalMax))}},oi);function oi(t,l,e,c){var o,i,r,n,s,u,a,d,t=xo(t),l=xo(l),h=c.intl,e=e||{},p=(p=t,o=l,i=e=m(e||{},{min:Bo(h,e.min),max:Bo(h,e.max),axisCrossingValue:Ro(h,e.axisCrossingValues||e.axisCrossingValue),weekStartDay:Eo(e,h)}),p=i.min||p,o=i.max||o,r=i.baseUnit||(o&&p?(r=vo(o,p),n=io,go<=r?n=ao:fo<=r?n=so:uo<=r?n=no:co<=r&&(n=ro),n):io),n=yo[r],s=i.weekStartDay||0,p=wo(Ao(p)-1,r,s)||xo(o),o=Co(Ao(o)+1,r,s),u=i.majorUnit||Yo(Ut(p.getTime(),o.getTime()),n)/n,a=Yo(a=Oo(p,o,r),u)-a,d=Math.floor(a/2),a-=d,i.baseUnit||delete i.baseUnit,i.baseUnit=i.baseUnit||r,i.min=i.min||bo(p,-d,r,s),i.max=i.max||bo(o,a,r,s),i.minorUnit=i.minorUnit||u/5,i.majorUnit=u,e=i,ti.call(this,e,c),this.intlService=h,this.seriesMin=t,this.seriesMax=l,e.weekStartDay||0);this.totalMin=Ao(wo(Ao(t)-1,e.baseUnit,p)),this.totalMax=Ao(Co(Ao(l)+1,e.baseUnit,p))}i(Go,{type:y,majorGridLines:{visible:!0,width:1,color:a},labels:{dateFormats:o}});var ii,ri=Go,o=((ii=Je)&&(ni.__proto__=ii),((ni.prototype=Object.create(ii&&ii.prototype)).constructor=ni).prototype.clone=function(){return new ni(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},ni.prototype.startValue=function(){return this.options.min},ni.prototype.getSlot=function(t,e,o){var i=this.options,r=this.logMin,n=this.logMax,l=i.majorUnit,s=i.min,i=i.max,a=this.lineInfo(),c=a.axis,h=a.axisDir,p=a.lineBox,u=a.lineSize,a=a.lineStart,u=h*(u/(n-r)),n=At(t,e||1),e=At(e,t||1);if(n<=0||e<=0)return null;o&&(n=wt(n,s,i),e=wt(e,s,i));n=ai(n,l),e=ai(e,l),t=Math.min(n,e)-r,o=Math.max(n,e)-r,s=new C(p.x1,p.y1,p.x1,p.y1);return s[c+1]=Zo(a+u*(0<h?t:o)),s[c+2]=Zo(a+u*(0<h?o:t)),s},ni.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:k(Math.pow(e,o+s*((i-o)/r)),g)},ni.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},ni.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=k(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}},ni.prototype.labelsCount=function(){var t=Math.floor(this.logMax);return Math.floor(t-this.logMin)+1},ni.prototype.getMajorTickPositions=function(){var e=[];return this.traverseMajorTicksPositions(function(t){e.push(t)},{step:1,skip:0}),e},ni.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(Ze(a,e))}return e.visible&&this.traverseMajorTicksPositions(h,e),i.visible&&this.traverseMinorTicksPositions(h,i),[]},ni.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){nt(t,n)||(r.position=t,s.append(Qe(r,e)),n.push(t))}return i.visible&&this.traverseMajorTicksPositions(a,i),o.visible&&this.traverseMinorTicksPositions(a,o),s.children},ni.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(k(i+r*(a-n),g),e)},ni.prototype.traverseMinorTicksPositions=function(t,e){for(var o=this.options,i=o.min,r=o.max,l=o.minorUnit,c=o.majorUnit,o=this.lineInfo(),u=o.lineStart,d=o.step,n=this.logMin,f=this.logMax,s=Math.floor(n);s<f;s++)for(var a=this._minorIntervalOptions(s),h=e.skip;h<l;h+=e.step){var p=a.value+h*a.minorStep;if(r<p)break;i<=p&&t(k(u+d*(ai(p,c)-n),g),e)}},ni.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 Ie(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){t=this.getValue(t),e=this.getValue(e);return{min:Math.min(t,e),max:Math.max(t,e)}},ni.prototype.scaleRange=function(t,e){var o=this.options.majorUnit,i=ai(this.options.min,o),r=ai(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}},ni.prototype.zoomRange=function(t,e){var t=this.scaleRange(t,e),e=this.totalMin,o=this.totalMax;return{min:wt(t.min,e,o),max:wt(t.max,e,o)}},ni.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}},ni.prototype.lineInfo=function(){var t=ii.prototype.lineInfo.call(this);return t.step=t.axisDir*(t.lineSize/(this.logMax-this.logMin)),t},ni);function ni(l,t,e,c){var u,d,o,i,r,n=m({majorUnit:10,min:l,max:t},e),s=n.majorUnit,a=(a=k(ai(r=t,h=s),g)%1,r<=0?h:0!=a&&(a<.3||.9<a)?Math.pow(h,ai(r,h)+.2):Math.pow(h,Math.ceil(ai(r,h)))),h=(r=l,o=(h=n).majorUnit,(i=r)<=0?i=t<=1?Math.pow(o,-2):1:h.narrowRange||(i=Math.pow(o,Math.floor(ai(r,o)))),i),p=(r=h,o=a,i=e,u=(p=n).min,d=p.max,w(p.axisCrossingValue)&&p.axisCrossingValue<=0&&si(),w(i.max)?i.max<=0&&si():d=o,w(i.min)?i.min<=0&&si():u=r,{min:u,max:d});n.max=p.max,n.min=p.min,n.minorUnit=e.minorUnit||k(s-1,g),ii.call(this,n,c),this.totalMin=w(e.min)?Math.min(h,e.min):h,this.totalMax=w(e.max)?Math.max(a,e.max):a,this.logMin=k(ai(p.min,s),g),this.logMax=k(ai(p.max,s),g),this.seriesMin=l,this.seriesMax=t,this.createLabels()}function si(){throw new Error("Non positive values cannot be used for a logarithmic axis")}function ai(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:a},zIndex:1,_deferLabels:!0});var hi,pi=o,Go={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),dt(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 pt(e,function(t){t=n.intervalAngle(t);if(!s||90!==t)return t})}},o=((hi=zo)&&(li.__proto__=hi),((li.prototype=Object.create(hi&&hi.prototype)).constructor=li).prototype.range=function(){return{min:0,max:this.options.categories.length}},li.prototype.reflow=function(t){this.box=t,this.reflowLabels()},li.prototype.lineBox=function(){return this.box},li.prototype.reflowLabels=function(){for(var t=this.labels,e=this.options.labels,o=e.skip||0,i=e.step||1,r=new C,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()))}},li.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,l=o||1,h=[],p=e||0;p<s;p+=l)r=n.reverse?360-p*a:p*a,r=k(r,3)%360,i&&nt(r,i)||h.push(r);return h},li.prototype.majorIntervals=function(){return this.intervals(1)},li.prototype.minorIntervals=function(){return this.intervals(.5)},li.prototype.intervalAngle=function(t){return(360+t+this.options.startAngle)%360},li.prototype.majorAngles=function(){var e=this;return pt(this.majorIntervals(),function(t){return e.intervalAngle(t)})},li.prototype.createLine=function(){return[]},li.prototype.majorGridLineAngles=function(t){var e=this.options.majorGridLines;return this.gridLineAngles(t,1,e.skip,e.step)},li.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)},li.prototype.radiusCallback=function(e,t,o){var i,r;if(t.options.type!==d)return t=St(360/(2*this.options.categories.length)),i=Math.cos(t)*e,r=this.majorAngles(),function(t){return!o&&nt(t,r)?e:i}},li.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,re.current.createRing(r,{fill:{color:i.color,opacity:i.opacity},stroke:{opacity:i.opacity}}));e.append(a)}this.appendVisual(e)},li.prototype.plotBandSlot=function(t){return this.getSlot(t.from,t.to-1)},li.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=wt(Math.floor(t),0,s-1)]),n=(i&&(o-=a/2)<0&&(o+=360),a*(wt(Math.ceil(e||t),t,s-1)-t+1));return new $t(r.center(),0,r.height()/2,o,n)},li.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})},li.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},li);function li(){hi.apply(this,arguments)}i(o,{startAngle:90,labels:{margin:q(10)},majorGridLines:{visible:!0},justified:!0}),m(o.prototype,Go);var ci,ui=o,o=((ci=Je)&&(di.__proto__=ci),((di.prototype=Object.create(ci&&ci.prototype)).constructor=di).prototype.getDivisions=function(t){return ei.prototype.getDivisions.call(this,t)-1},di.prototype.reflow=function(t){this.box=t,this.reflowLabels()},di.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 C,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()))}},di.prototype.lineBox=function(){return this.box},di.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&&nt(p,i)||s.push(p)}return s},di.prototype.majorIntervals=function(){return this.intervals(this.options.majorUnit)},di.prototype.minorIntervals=function(){return this.intervals(this.options.minorUnit)},di.prototype.intervalAngle=function(t){return(540-t-this.options.startAngle)%360},di.prototype.createLine=function(){return[]},di.prototype.majorGridLineAngles=function(t){var e=this.options.majorGridLines;return this.gridLineAngles(t,this.options.majorUnit,e.skip,e.step)},di.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)},di.prototype.plotBandSlot=function(t){return this.getSlot(t.from,t.to)},di.prototype.getSlot=function(t,e){var o=this.options,i=this.box,r=o.startAngle,t=wt(t,o.min,o.max),e=wt(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 $t(i.center(),0,i.height()/2,t,e-t)},di.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})},di.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(gt(Math.atan2(t,i))),t=e.startAngle;return e.reverse||(o*=-1,t*=-1),(o+t+360)%360},di.prototype.valueRange=function(){return{min:0,max:2*Math.PI}},di);function di(t,e){ci.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:q(10)},majorGridLines:{color:a,visible:!0,width:1},minorGridLines:{color:"#aaa"}}),m(o.prototype,Go,{createPlotBands:ui.prototype.createPlotBands,majorAngles:ui.prototype.majorAngles,range:ei.prototype.range,labelsCount:ei.prototype.labelsCount,createAxisLabel:ei.prototype.createAxisLabel});var fi=o;function gi(t,e){return 180-Math.abs(Math.abs(t-e)-180)}var yi,Go={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 $t(r,r.y-a.y2,r.y-a.y1,0,360),a=e===d?re.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(),dt(r,this.renderGridLines(t,o,i,e.minorGridLines))),r},renderGridLines:function(t,e,o,i){var l={stroke:{width:i.width,color:i.color,dashType:i.dashType}},r=i.skip,n=(void 0===r&&(r=0),i.step);void 0===n&&(n=0);for(var s=this.gridLinesVisual(),a=r;a<e.length;a+=n){var c=t.y-e[a];if(0<c){var u=new b.geometry.Circle([t.x,t.y],c);if(i.type===d)s.append(new b.drawing.Circle(u,l));else{for(var h=new b.drawing.Path(l),p=0;p<o.length;p++)h.lineTo(u.pointAt(o[p]+180));h.close(),s.append(h)}}}return s.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!==d&&1<n.length&&(e=t.x-r.x,t=t.y-r.y,o=(gt(Math.atan2(t,e))+540)%360,n.sort(function(t,e){return gi(t,o)-gi(e,o)}),r=90-gi(n[0],n[1])/2,t=180-gi(o,n[0])-r,a=s*(Math.sin(St(t))/Math.sin(St(r)))),this.axisType().prototype.getValue.call(this,new Nt(i.x1,i.y2-a))}},o=((yi=ei)&&(vi.__proto__=yi),((vi.prototype=Object.create(yi&&yi.prototype)).constructor=vi).prototype.radarMajorGridLinePositions=function(){return this.getTickPositions(this.options.majorUnit)},vi.prototype.radarMinorGridLinePositions=function(){var t=this.options,e=0;return t.majorGridLines.visible&&(e=t.majorUnit),this.getTickPositions(t.minorUnit,e)},vi.prototype.axisType=function(){return yi},vi);function vi(){yi.apply(this,arguments)}m(o.prototype,Go);var mi,xi=o,o=((mi=pi)&&(_i.__proto__=mi),((_i.prototype=Object.create(mi&&mi.prototype)).constructor=_i).prototype.radarMajorGridLinePositions=function(){var e=[];return this.traverseMajorTicksPositions(function(t){e.push(t)},this.options.majorGridLines),e},_i.prototype.radarMinorGridLinePositions=function(){var e=[];return this.traverseMinorTicksPositions(function(t){e.push(t)},this.options.minorGridLines),e},_i.prototype.axisType=function(){return mi},_i);function _i(){mi.apply(this,arguments)}m(o.prototype,Go);var bi=o;function wi(t){return t<=0?-1:1}(Si=b.Class)&&(Ti.__proto__=Si),((Ti.prototype=Object.create(Si&&Si.prototype)).constructor=Ti).prototype.process=function(t){var e=t.slice(0),o=[],l=this.closed,i=e.length;if(2<i&&(this.removeDuplicates(0,e),i=e.length),i<2||2===i&&e[0].equals(e[1]))return o;var c,r=e[0],n=e[1],s=e[2];for(o.push(new b.geometry.Segment(r));r.equals(e[i-1]);)l=!0,e.pop(),i--;if(2===i)return t=this.tangent(r,n,_,O),bt(o).controlOut(this.firstControlPoint(t,r,n,_,O)),o.push(new b.geometry.Segment(n,this.secondControlPoint(t,r,n,_,O))),o;l?(r=e[i-1],n=e[0],s=e[1],h=(t=this.controlPoints(r,n,s))[1],c=t[0]):(t=this.tangent(r,n,_,O),h=this.firstControlPoint(t,r,n,_,O));for(var a,h,u=h,p=0;p<=i-3;p++)this.removeDuplicates(p,e),p+3<=(i=e.length)&&(r=e[p],n=e[p+1],s=e[p+2],a=this.controlPoints(r,n,s),bt(o).controlOut(u),u=a[1],a=a[0],o.push(new b.geometry.Segment(n,a)));return l?(r=e[i-2],n=e[i-1],s=e[0],t=this.controlPoints(r,n,s),bt(o).controlOut(u),o.push(new b.geometry.Segment(n,t[0])),bt(o).controlOut(t[1]),o.push(new b.geometry.Segment(s,c))):(h=this.tangent(n,s,_,O),bt(o).controlOut(u),o.push(new b.geometry.Segment(s,this.secondControlPoint(h,n,s,_,O)))),o},Ti.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)},Ti.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},Ti.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||k(i,1)===k(o.y,1)},Ti.prototype.lineFunction=function(t,e){e=(e.y-t.y)/(e.x-t.x);return[t.y-e*t.x,e]},Ti.prototype.controlPoints=function(t,e,o){var i,r=_,n=O,s=!1,a=!1,h=(this.isLine(t,e,o)?i=this.tangent(t,e,_,O):(h={x:this.isMonotonicByField(t,e,o,_),y:this.isMonotonicByField(t,e,o,O)}).x&&h.y?(i=this.tangent(t,o,_,O),s=!0):(this.invertAxis(t,e,o)&&(r=O,n=_),h[r]?i=0:(i=.01*(o[n]<t[n]&&t[n]<=e[n]||t[n]<o[n]&&e[n]<=t[n]?wi((o[n]-t[n])*(e[r]-t[r])):-wi((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]},Ti.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)},Ti.prototype.tangent=function(t,e,o,i){o=e[o]-t[o],e=e[i]-t[i];return 0==o?0:e/o},Ti.prototype.isMonotonicByField=function(t,e,o,i){return o[i]>e[i]&&e[i]>t[i]||o[i]<e[i]&&e[i]<t[i]},Ti.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)},Ti.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)},Ti.prototype.point=function(t,e,o,i){var r=new b.geometry.Point;return r[o]=t,r[i]=e,r},Ti.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 Ci,Si,ki=Ti,Ai=((Ci=b.Class)&&(Pi.__proto__=Ci),((Pi.prototype=Object.create(Ci&&Ci.prototype)).constructor=Pi).prototype.value=function(t){var e=this._axis;return e.getCategory?e.getCategory(t):e.getValue(t)},Pi.prototype.slot=function(t,e,o){return this._axis.slot(t,e,o=void 0===o?!0:o)},Pi.prototype.range=function(){return this._axis.range()},Pi.prototype.valueRange=function(){return this._axis.valueRange()},Pi);function Pi(t){Ci.call(this),this._axis=t,this.options=t.options}function Ti(t){Si.call(this),this.closed=t}function Mi(t,e){for(var o=0;o<e.length;o++)if(e[o].options.name===t)return e[o].prepareUserOptions(),new Ai(e[o])}function Oi(t){this.visual=t.visual,this.chartsVisual=t.chartContainer.visual,this._pane=t}Oi.prototype.findAxisByName=function(t){return Mi(t,this._pane.axes)};var Bi,Ri=Oi,Ei=((Bi=b.Class)&&(Li.__proto__=Bi),(Li.prototype=Object.create(Bi&&Bi.prototype)).constructor=Li);function Li(t){Bi.call(this),this._plotArea=t,this.visual=t.visual,this.backgroundVisual=t._bgVisual}function Ii(t){for(var e=t.length,o=0,i=0;i<e;i++)V(t[i])&&o++;return o}var zi={min:function(t){for(var e=t.length,o=c,i=0;i<e;i++){var r=t[i];V(r)&&(o=Math.min(o,r))}return o===c?t[0]:o},max:function(t){for(var e=t.length,o=l,i=0;i<e;i++){var r=t[i];V(r)&&(o=Math.max(o,r))}return o===l?t[0]:o},sum:function(t){for(var e=t.length,o=0,i=0;i<e;i++){var r=t[i];V(r)&&(o+=r)}return o},sumOrNull:function(t){var e=null;return e=Ii(t)?zi.sum(t):e},count:function(t){for(var e=t.length,o=0,i=0;i<e;i++){var r=t[i];null!==r&&w(r)&&o++}return o},avg:function(t){var e=Ii(t),o=t[0];return o=0<e?zi.sum(t)/e:o},first:function(t){for(var e=t.length,o=0;o<e;o++){var i=t[o];if(null!==i&&w(i))return i}return t[0]}},Vi=zi;function ji(t,e){return null===e?e:tt(t)(e)}(Di=b.Class)&&(Hi.__proto__=Di),((Hi.prototype=Object.create(Di&&Di.prototype)).constructor=Hi).prototype.register=function(t,e,o){void 0===e&&(e=[v]),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)}},Hi.prototype.canonicalFields=function(t){return this.valueFields(t).concat(this.otherFields(t))},Hi.prototype.valueFields=function(t){return this._valueFields[t.type]||[v]},Hi.prototype.otherFields=function(t){return this._otherFields[t.type]||[v]},Hi.prototype.bindPoint=function(t,e,o){var i,r,n,s,a=t.data,o=w(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]:w(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],w(i)&&(1===e.length?a.valueFields.value=i[e[0]]:a.valueFields=i),a.fields=r||{},a},Hi.prototype._makeValue=function(t,e){for(var o={},i=t.length,r=0;r<i;r++)o[t[r]]=e;return o},Hi.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},Hi.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]=ji(a,t))}return i},Hi.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===v?"field":n+"Field";o.push(null!==t[s]?t[s]||n:null)}return o};var Di,Go=Hi;function Hi(){Di.call(this),this._valueFields={},this._otherFields={},this._nullValue={},this._undefinedValue={}}Go.current=new Go;var Ui,Fi,Ni=Go,Gi=/percent(?:\w*)\((\d+)\)/,Wi=new RegExp("^stddev(?:\\((\\d+(?:\\.\\d+)?)\\))?$"),Xi=((Fi=b.Class)&&(hr.__proto__=Fi),((hr.prototype=Object.create(Fi&&Fi.prototype)).constructor=hr).prototype.initGlobalRanges=function(t,e,o){var i,r,n,s,a=e.data,h=Wi.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}})},hr.prototype.createValueGetter=function(t,e){var o,i=t.data,r=Ni.current,n=r.valueFields(t),i=w(i[0])?i[0]:{};return B(i)?o=tt("["+(e?n.indexOf(e):0)+"]"):V(i)?o=tt():"object"==typeof i&&(o=tt(r.sourceFields(t,n)[n.indexOf(e)])),o},hr.prototype.getErrorRange=function(t,e){var o;if(!w(e))return null;if(this.globalRange)return this.globalRange(t);if(B(e))i=t-e[0],r=t+e[1];else if(V(o=parseFloat(e)))i=t-o,r=t+o;else{if(!(o=Gi.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}},hr.prototype.getStandardError=function(t,e){return this.getStandardDeviation(t,e,!0)/Math.sqrt(e.count)},hr.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]);V(s)&&(r+=Math.pow(s-e.value,2))}return Math.sqrt(r/o)},hr.prototype.getAverage=function(t){for(var e=t.length,o=0,i=0,r=0;r<e;r++){var n=this.valueGetter(t[r]);V(n)&&(o+=n,i++)}return{value:o/i,count:i}},hr),qi=(b.support.browser||{}).msie?.001:0,Yi="zero",Zi="interpolate",Qi="bar",Ki="column",$i="line",Ji="pie",tr="verticalLine",er=[Qi,Ki,"ohlc","candlestick","boxPlot","verticalBoxPlot","bullet","rangeColumn","rangeBar","waterfall","horizontalWaterfall"],or="drag",ir="dragEnd",rr="zoom",nr="zoomEnd",sr="DOMMouseScroll mousewheel",o=((Ui=ae)&&(ar.__proto__=Ui),((ar.prototype=Object.create(Ui&&Ui.prototype)).constructor=ar).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 Nt(n.x,r.y1),new Nt(n.x,r.y2)],o&&e.push(new Nt(a,r.y1),new Nt(s,r.y1),new Nt(a,r.y2),new Nt(s,r.y2)),this.box=new C(a,r.y1,s,r.y2)):(e=[new Nt(r.x1,n.y),new Nt(r.x2,n.y)],o&&e.push(new Nt(r.x1,a),new Nt(r.x1,s),new Nt(r.x2,a),new Nt(r.x2,s)),this.box=new C(r.x1,a,r.x2,s)),this.linePoints=e},ar.prototype.getCapsWidth=function(t,e){e=e?t.width():t.height();return Math.min(Math.floor(e/2),4)||4},ar.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()},ar.prototype.createDefaultVisual=function(){var t=this.options,e=this.linePoints,o={stroke:{color:t.color,width:t.line.width,dashType:t.line.dashType}};Ui.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);I(r),this.visual.append(r)}},ar);function ar(t,e,o,i,r,n){Ui.call(this,n),this.low=t,this.high=e,this.isVertical=o,this.chart=i,this.series=r}function hr(t,e,o){Fi.call(this),this.initGlobalRanges(t,e,o)}i(o,{animation:{type:"fadeIn",delay:600},endCaps:!0,line:{width:2},zIndex:1});var pr,lr=o,cr=((pr=lr)&&(ur.__proto__=pr),((ur.prototype=Object.create(pr&&pr.prototype)).constructor=ur).prototype.getAxis=function(){return this.chart.seriesValueAxis(this.series)},ur);function ur(){pr.apply(this,arguments)}function dr(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)!nt(r,o.excluded)&&t.hasOwnProperty(r)&&(H(n=t[r])?(h=!0,i||(t[r]=At(n(e),s[r]))):N(n)&&(i||(o.defaults=s[r]),o.depth++,h=dr(n,e,o,i)||h,o.depth--));return h}function fr(t){for(var e=t.length,o=0,i=0;i<e;i++)o=Math.max(o,t[i].data.length);return o}(gr=ae)&&(yr.__proto__=gr),((yr.prototype=Object.create(gr&&gr.prototype)).constructor=yr).prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},yr.prototype.pointOptions=function(t,e){var o,i=this.seriesOptions[e];return i||(o=this.pointType().prototype.defaults,this.seriesOptions[e]=i=m({},o,{vertical:!this.options.invertAxes},t)),i},yr.prototype.plotValue=function(t){if(!t)return 0;if(this.options.isStacked100&&V(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||V(h.value)&&(r+=Math.abs(h.value),i.push(Math.abs(h.value))))}if(0<r)return t.value/r}return t.value},yr.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,l=!1,s=0;s<o.length;s++){var a=o[s];if(t===a)break;var h=t.series.stack,p=a.series.stack;if(h&&p){if(typeof h===f&&h!==p)continue;if(h.group&&h.group!==p.group)continue}h=this.plotValue(a);(0<=h&&r||h<0&&!r)&&(n+=h,i+=h,l=!0,this.options.isStacked100&&(i=Math.min(i,1)))}return l&&(n-=e),[n,i]}e=t.series,e=this.seriesValueAxis(e),e=this.categoryAxisCrossingValue(e);return[e,D(t.value)?t.value:e]},yr.prototype.stackLimits=function(t,e){for(var o=c,i=l,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],w(a)&&isFinite(a)&&(i=Math.max(i,a),o=Math.min(o,a)))}}return{min:o,max:i}},yr.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,Tt(n.negative).min)),n.positive.length&&(h.max=Math.max(h.max,Tt(n.positive).max))),h.min!==c||h.max!==l?i[a]=h:h=null),h&&(this.valueAxisRanges[s]=h)}},yr.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;V(h)&&V(e)?i={low:h,high:e}:a&&w(a.value)&&(this.seriesErrorRanges=this.seriesErrorRanges||[],this.seriesErrorRanges[s]=this.seriesErrorRanges[s]||new Xi(a.value,n,v),i=this.seriesErrorRanges[s].getErrorRange(r,a.value)),i&&(t.low=i.low,t.high=i.high,this.addPointErrorBar(t,o))},yr.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 cr(s,a,i,this,n,r));t.errorBars=[e],t.append(e)},yr.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}},yr.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,w(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)},yr.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=(w(a)||(this._evalSeries[n]=a=dr(t,{},s,!0)),t);return a&&dr(n=m({},n),{value:e,category:o,index:i,series:r,dataItem:r.data[i]},s),n},yr.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:c,max:l}).min=Math.min(o.min,t),o.max=Math.max(o.max,t))},yr.prototype.seriesValueAxis=function(t){var e=this.plotArea,t=t.axis,e=t?e.namedValueAxes[t]:e.valueAxis;if(!e)throw new Error("Unable to locate value axis with name "+t);return e},yr.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},yr.prototype.valueSlot=function(t,e){return t.getSlot(e[0],e[1],!this.options.clip)},yr.prototype.limitPoints=function(){for(var t=this.categoryPoints,e=t[0].concat(bt(t)),o=0;o<e.length;o++)e[o]&&this.limitPoint(e[o])},yr.prototype.limitPoint=function(t){var e=this.categoryAxis.limitSlot(t.box);e.equals(t.box)||t.reflow(e)},yr.prototype.aboveAxis=function(t,e){var o=this.categoryAxisCrossingValue(e),t=t.value;return e.options.reverse?t<o:o<=t},yr.prototype.categoryAxisCrossingValue=function(t){var e=this.categoryAxis,t=t.options;return[].concat(t.axisCrossingValues||t.axisCrossingValue)[e.axisIndex||0]||0},yr.prototype.reflowPoint=function(t,e){t.reflow(e)},yr.prototype.reflowCategories=function(){},yr.prototype.pointSlot=function(t,e){var o=this.options.invertAxes,i=o?e:t,o=o?t:e;return new C(i.x1,o.y1,i.x2,o.y2)},yr.prototype.categorySlot=function(t,e){return t.getSlot(e)},yr.prototype.traverseDataPoints=function(t){for(var e=this.options.series,o=fr(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)},yr.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}))},yr.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]=Ni.current.bindPoint(t,o,i))},yr.prototype.formatPointValue=function(t,e){return null===t.value?"":this.chartService.format.auto(e,t.value)},yr.prototype.pointValue=function(t){return t.valueFields.value};var gr,Go=yr;function yr(t,e){gr.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(Go,{series:[],invertAxes:!1,isStacked:!1,clip:!0,limitPoints:!0});var vr,mr=Go,xr={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:xt(t),originalEvent:t,point:this}}},o={createNote:function(){var t=this.options.notes,e=this.noteText||t.label.text;!1!==t.visible&&w(e)&&null!==e&&(this.note=new He({value:this.value,text:e,dataItem:this.dataItem,category:this.category,series:this.series},this.options.notes,this.owner.chartService),this.append(this.note))}},Go=((vr=ae)&&(_r.__proto__=vr),((_r.prototype=Object.create(vr&&vr.prototype)).constructor=_r).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=K(o),t=this.pointData(),e=this.value,i?e=i(t):o.format&&(e=this.formatValue(o.format)),this.label=new Te(e,m({align:A,vAlign:A,margin:{left:5,right:5},zIndex:At(o.zIndex,this.series.zIndex)},o),t),this.append(this.label)),this.createNote(),this.errorBar&&this.append(this.errorBar))},_r.prototype.markerBorder=function(){var t=this.options.markers,e=t.background,t=m({color:this.color},t.border);return w(t.color)||(t.color=new b.Color(e).brightness(.8).toHex()),t},_r.prototype.createVisual=function(){},_r.prototype.createMarker=function(){var t=this.options.markers;return new ue({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:At(t.zIndex,this.series.zIndex),animation:t.animation,visual:t.visual},{dataItem:this.dataItem,value:this.value,series:this.series,category:this.category})},_r.prototype.markerBox=function(){return this.marker||(this.marker=this.createMarker(),this.marker.reflow(this._childBox)),this.marker.box},_r.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 C(i.x,i.y,i.x,i.y)),this.note.reflow(t))},_r.prototype.reflowLabel=function(t){var e=this.options,o=this.label,e=e.labels.position;o&&(e="below"===(e="above"===e?M:e)?S:e,o.reflow(t),o.box.alignTo(this.markerBox(),e),o.reflow(o.box))},_r.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 ue({type:o.type,width:i,height:i,rotation:o.rotation,background:t.color||e,border:{color:t.border.color,width:t.border.width,opacity:At(t.border.opacity,1)},opacity:At(t.opacity,1)});return i.reflow(this._childBox),i.getElement()},_r.prototype.highlightVisual=function(){return(this.marker||{}).visual},_r.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}},_r.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=P,o=this.aboveAxis?(t=o.y1,S):(t=o.y2,M),{point:new Nt(i,t),align:{horizontal:e,vertical:o}}},_r.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},_r.prototype.overlapsBox=function(t){return this.markerBox().overlaps(t)},_r.prototype.unclipElements=function(){this.label&&(this.label.options.noclip=!0),this.note&&(this.note.options.noclip=!0)},_r.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,stackValue:this.stackValue,series:this.series}},_r);function _r(t,e){vr.call(this),this.value=t,this.options=e,this.aboveAxis=At(this.options.aboveAxis,!0),this.tooltipTracking=!0}Go.prototype.defaults={vertical:!0,markers:{visible:!0,background:x,size:8,type:u,border:{width:2},opacity:1},labels:{visible:!1,position:"above",margin:q(3),padding:q(4),animation:{type:"fadeIn",delay:600}},notes:{label:{}},highlight:{markers:{border:{color:"#fff",width:2}},zIndex:100},errorBars:{line:{width:1}}},m(Go.prototype,xr),m(Go.prototype,o);var br,wr=Go,Go=((br=ae)&&(Cr.__proto__=br),((Cr.prototype=Object.create(br&&br.prototype)).constructor=Cr).prototype.points=function(){return this.toGeometryPoints(this.linePoints)},Cr.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},Cr.prototype.createVisual=function(){var t=this,e=this.series.visual;e?(this.visual=e({points:this.toGeometryPoints(this.linePoints),series:this.series,sender:this.getSender(),createVisual:function(){return t.segmentVisual(),t.visual}}),this.visual&&!w(this.visual.options.zIndex)&&(this.visual.options.zIndex=this.series.zIndex)):this.segmentVisual()},Cr.prototype.segmentVisual=function(){var t=this.options,e=this.series,o=e.color,i=e._defaults,i=(H(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},Cr.prototype.aliasFor=function(t,e){return this.parent.getNearestPoint(e.x,e.y,this.seriesIx)},Cr);function Cr(t,e,o){br.call(this),this.linePoints=t,this.series=e,this.seriesIx=o}i(Go,{closed:!1});var Sr=Go;function kr(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 Ar,Go={calculateStepPoints:function(t){for(var e=this.parent.plotArea.seriesCategoryAxis(this.series).options,l=e.justified,c=e.vertical,e=e.reverse,o=c?_:O,i=c?O:_,r=e?2:1,u=r,n=kr(t[0],o,r,i,u),s=[n],a=1;a<t.length;a++){var h,p=kr(t[a],o,r,i,u);n[o]!==p[o]&&((h=new b.geometry.Point)[o]=n[o],h[i]=p[i],s.push(h,p)),n=p}return l?n!==bt(s)&&s.push(n):s.push(kr(bt(t),o,r,i,e?1:2)),s}},Pr=((Ar=Sr)&&(Tr.__proto__=Ar),((Tr.prototype=Object.create(Ar&&Ar.prototype)).constructor=Tr).prototype.points=function(){return this.calculateStepPoints(this.linePoints)},Tr);function Tr(){Ar.apply(this,arguments)}m(Pr.prototype,Go);var Mr,Or,Br=Pr,Rr=((Or=Sr)&&(Ir.__proto__=Or),((Ir.prototype=Object.create(Or&&Or.prototype)).constructor=Ir).prototype.segmentVisual=function(){var t=this.series,e=t._defaults,o=t.color,e=(H(o)&&e&&(o=e.color),new ki(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},Ir),Pr={renderSegments:function(){var t,e=this.options,o=this.seriesPoints,i=e.series,l=o.length;this._segments=[];for(var r=0;r<l;r++){for(var n=i[r],s=this.sortPoints(o[r]),c=s.length,a=[],h=0;h<c;h++){var p=s[h];p?a.push(p):this.seriesMissingValues(n)!==Zi&&(1<a.length&&(t=this.createSegment(a,n,r,t),this._addSegment(t)),a=[])}1<a.length&&(t=this.createSegment(a,n,r,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?Yi:t||Zi},getNearestPoint:function(t,e,o){for(var i,r=new Nt(t,e),n=this.seriesPoints[o],s=c,a=0;a<n.length;a++){var h,p=n[a];p&&w(p.value)&&null!==p.value&&!1!==p.visible&&((h=p.box.center().distanceTo(r))<s&&(i=p,s=h))}return i}},Er=((Mr=b.drawing.Animation)&&(Lr.__proto__=Mr),((Lr.prototype=Object.create(Mr&&Mr.prototype)).constructor=Lr).prototype.setup=function(){this._setEnd(this.options.box.x1)},Lr.prototype.step=function(t){var e=this.options.box;this._setEnd(st(e.x1,e.x2,t))},Lr.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)},Lr);function Lr(){Mr.apply(this,arguments)}function Ir(){Or.apply(this,arguments)}i(Er,{duration:600}),b.drawing.AnimationFactory.current.register("clip",Er);var zr=Er;function Vr(t){for(var e=0;e<t.length;e++)if(w(t[e].zIndex))return!0}var jr,Er={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 zr(t,{box:e}),Vr(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&&w(i.visual.options.zIndex)&&i.visual.clip(t)}}},Dr=((jr=mr)&&(Hr.__proto__=jr),((Hr.prototype=Object.create(jr&&jr.prototype)).constructor=Hr).prototype.render=function(){jr.prototype.render.call(this),this.updateStackRange(),this.renderSegments()},Hr.prototype.pointType=function(){return wr},Hr.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(!w(s)||null===s){if(n!==Yi)return null;s=0}n=this.pointOptions(r,e),n=this.evalPointOptions(n,s,i,o,r,e),i=t.fields.color||r.color,H(r.color)&&(i=n.color),o=new wr(s,n);return o.color=i,this.append(o),o},Hr.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]},Hr.prototype.createSegment=function(t,e,o){var i=e.style;return new("step"===i?Br:"smooth"===i?Rr:Sr)(t,e,o)},Hr.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)},Hr.prototype.supportsPointInactiveOpacity=function(){return!1},Hr);function Hr(){jr.apply(this,arguments)}m(Dr.prototype,Pr,Er);var Ur,Fr,Nr=Dr,Gr=((Fr=Sr)&&(Xr.__proto__=Fr),((Xr.prototype=Object.create(Fr&&Fr.prototype)).constructor=Xr).prototype.createVisual=function(){var t=this.series,e=t._defaults,o=t.line||{},i=t.color;H(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:m({color:i,opacity:t.opacity,lineCap:"butt"},o)})},Xr.prototype.strokeSegments=function(){return this._strokeSegments||(this._strokeSegments=this.createStrokeSegments())},Xr.prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.points())},Xr.prototype.stackSegments=function(){return(this.prevSegment||this).createStackSegments(this.stackPoints)},Xr.prototype.createStackSegments=function(t){return this.segmentsFromPoints(this.toGeometryPoints(t)).reverse()},Xr.prototype.segmentsFromPoints=function(t){return t.map(function(t){return new b.geometry.Segment(t)})},Xr.prototype.createStroke=function(t){t=new b.drawing.Path(t);t.segments.push.apply(t.segments,this.strokeSegments()),this.visual.append(t)},Xr.prototype.hasStackSegment=function(){return this.prevSegment||this.stackPoints&&this.stackPoints.length},Xr.prototype.createFill=function(t){var e=this.strokeSegments(),o=e.slice(0),i=this.hasStackSegment(),r=(i&&(r=this.stackSegments(),dt(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)},Xr.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=bt(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)},Xr),Dr=((Ur=Gr)&&(Wr.__proto__=Ur),((Wr.prototype=Object.create(Ur&&Ur.prototype)).constructor=Wr).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.calculateStepPoints(this.linePoints))},Wr.prototype.createStackSegments=function(t){return this.segmentsFromPoints(this.calculateStepPoints(t)).reverse()},Wr);function Wr(){Ur.apply(this,arguments)}function Xr(t,e,o,i,r){Fr.call(this,t,e,o),this.prevSegment=i,this.stackPoints=r}m(Dr.prototype,Go);var qr,Yr,Zr,Qr,Kr=Dr,$r=((Qr=Gr)&&(nn.__proto__=Qr),((nn.prototype=Object.create(Qr&&Qr.prototype)).constructor=nn).prototype.createStrokeSegments=function(){var t=new ki(this.options.closed),e=this.points();return t.process(e)},nn.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},nn),Jr=((Zr=Nr)&&(rn.__proto__=Zr),((rn.prototype=Object.create(Zr&&Zr.prototype)).constructor=rn).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?Kr:"smooth"===a?$r:Gr)(t,e,o,r,n)},rn.prototype.reflow=function(t){Zr.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)}},rn.prototype._gapStackPoints=function(t,l,e){var o=this.seriesPoints,i=t[0].categoryIx,t=t.length,c=(i<0&&(i=0,t--),i+t),u=this.seriesOptions[0]._outOfRangeMinPoint?1:0,r=[];this._stackPoints=this._stackPoints||[];for(var n=i;n<c;n++){for(var s,a=n+u,h=l,p=void 0;p=o[--h][a],0<h&&!p;);p?("step"!==e&&i<n&&!o[h][a-1]&&r.push(this._previousSegmentPoint(n,a,a-1,h)),r.push(p),"step"!==e&&n+1<c&&!o[h][a+1]&&r.push(this._previousSegmentPoint(n,a,a+1,h))):(s=this._createGapStackPoint(n),this._stackPoints.push(s),r.push(s))}return r},rn.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},rn.prototype._createGapStackPoint=function(t){var e=this.pointOptions({},0),e=new wr(0,e);return e.categoryIx=t,e.series={},e},rn.prototype.seriesMissingValues=function(t){return t.missingValues||Yi},rn.prototype.supportsPointInactiveOpacity=function(){return!1},rn),tn=((Yr=b.Class)&&(on.__proto__=Yr),((on.prototype=Object.create(Yr&&Yr.prototype)).constructor=on).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:c,max:l},r.min=Math.min(r.min,i.min),r.max=Math.max(r.max,i.max)}},on.prototype.reset=function(t){this.axisRanges[t]=void 0},on.prototype.query=function(t){return this.axisRanges[t]},on),Dr=((qr=ae)&&(en.__proto__=qr),((en.prototype=Object.create(qr&&qr.prototype)).constructor=en).prototype.createVisual=function(){this.textBox.options.noclip=this.options.noclip},en.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?A:P,n.vAlign=o?M:A,"insideEnd"===e.position?o?(n.vAlign=M,!i&&s.height()<t.height()&&(n.vAlign=S)):n.align=i?T:P:e.position===A?(n.vAlign=A,n.align=A):"insideBase"===e.position?o?n.vAlign=i?S:M:n.align=i?P:T:"outsideEnd"===e.position&&(h=o?i?new C(t.x1,t.y1-s.height(),t.x2,t.y1):new C(t.x1,t.y2,t.x2,t.y2+s.height()):(n.align=A,i?new C(t.x2,t.y1,t.x2+s.width(),t.y2):new C(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)},en.prototype.alignToClipBox=function(t){var e=this.options.vertical?O:_,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))},en);function en(t,e,o){qr.call(this,e),this.textBox=new Te(t,this.options,o),this.append(this.textBox)}function on(){Yr.call(this),this.axisRanges={}}function rn(){Zr.apply(this,arguments)}function nn(){Qr.apply(this,arguments)}i(Dr,{position:"outsideEnd",margin:q(3),padding:q(4),color:a,background:"",border:{width:1,color:""},aboveAxis:!0,vertical:!1,animation:{type:"fadeIn",delay:600},zIndex:2});var sn=Dr;function an(t){t=t.overlay;return t&&t.gradient&&"none"!==t.gradient}(hn=ae)&&(pn.__proto__=hn),((pn.prototype=Object.create(hn&&hn.prototype)).constructor=pn).prototype.render=function(){this._rendered||(this._rendered=!0,this.createLabel(),this.createNote(),this.errorBar&&this.append(this.errorBar))},pn.prototype.createLabel=function(){var t,e,o=this.options,i=o.labels;i.visible&&(t=this.pointData(),e=(e=K(i))?e(t):this.formatValue(i.format),this.label=new sn(e,m({vertical:o.vertical},i),t),this.append(this.label))},pn.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},pn.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)},pn.prototype.createVisual=function(){var e=this,t=this.box,o=this.options,i=o.visual;!1!==this.visible&&(hn.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))},pn.prototype.createRect=function(t){var e=this.options,o=e.border,i=(w(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)&&(I(r),(i<1||o<1)&&(r.options.stroke.lineJoin="round")),t.append(r),an(e)&&(i=this.createGradientOverlay(r,{baseColor:this.color},m({end:e.vertical?void 0:[0,1]},e.overlay)),t.append(i))},pn.prototype.createHighlight=function(t){return I(b.drawing.Path.fromRect(this.box.toRect(),t))},pn.prototype.highlightVisual=function(){return this.rectVisual},pn.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this.rectVisual}},pn.prototype.getBorderColor=function(){var t=this.color,e=this.options.border,o=e._brightness||.8,e=e.color;return e=w(e)?e:new b.Color(t).brightness(o).toHex()},pn.prototype.tooltipAnchor=function(){var t,e,o,i,r=this.options,n=this.box,s=this.aboveAxis,a=this.owner.pane.clipBox()||n,h=P,p=M;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=S)):(e=Math.max(n.x1,a.x1),o=Math.min(n.x2,a.x2),i=r.isStacked?(p=S,t=s?(h=T,o):e,Math.max(n.y1,a.y1)-5):(s?t=o+5:(t=e-5,h=T),Math.max(n.y1,a.y1))),{point:new Nt(t,i),align:{horizontal:h,vertical:p}}},pn.prototype.overlapsBox=function(t){return this.box.overlaps(t)},pn.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 hn,Dr=pn;function pn(t,e){hn.call(this),this.options=e,this.color=e.color||x,this.aboveAxis=At(this.options.aboveAxis,!0),this.value=t}m(Dr.prototype,xr),m(Dr.prototype,o),Dr.prototype.defaults={border:{width:1},vertical:!0,overlay:{gradient:"glass"},labels:{visible:!1,format:"{0}"},opacity:1,notes:{label:{}}};var ln=Dr;function cn(t,e){t.forEach(e)}function un(t,e){for(var o=t.length,i=o-1;0<=i;i--)e(t[i],i-o-1)}(dn=ae)&&(fn.__proto__=dn),((fn.prototype=Object.create(dn&&dn.prototype)).constructor=fn).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?O:_,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 dn,Dr=fn;function fn(t){dn.call(this,t),this.forEach=t.rtl?un:cn}i(Dr,{vertical:!1,gap:0,spacing:0});var gn,yn=Dr,Dr=((gn=ae)&&(vn.__proto__=gn),((vn.prototype=Object.create(gn&&gn.prototype)).constructor=vn).prototype.reflow=function(t){for(var e=this.options.vertical?_:O,o=this.children,i=o.length,r=this.box=new C,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))}},vn);function vn(){gn.apply(this,arguments)}i(Dr,{vertical:!0});var mn,xn=Dr,Dr=((mn=mr)&&(_n.__proto__=mn),((_n.prototype=Object.create(mn&&mn.prototype)).constructor=_n).prototype.render=function(){mn.prototype.render.call(this),this.updateStackRange()},_n.prototype.pointType=function(){return ln},_n.prototype.clusterType=function(){return yn},_n.prototype.stackType=function(){return xn},_n.prototype.stackLimits=function(t,e){return mn.prototype.stackLimits.call(this,t,e)},_n.prototype.createPoint=function(t,e){var o=e.categoryIx,i=e.category,r=e.series,e=e.seriesIx,n=this.options,l=this.children,s=n.isStacked,a=this.pointValue(t),h=this.pointOptions(r,e),p=h.labels,p=(s&&"outsideEnd"===p.position&&(p.position="insideEnd"),h.isStacked=s,t.fields.color||r.color),t=(a<0&&h.negativeColor&&(p=h.negativeColor),h=this.evalPointOptions(h,a,i,o,r,e),H(r.color)&&(p=h.color),new(this.pointType())(a,h)),i=(t.color=p,l[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)),(s?this.getStackWrap(r,i):i).append(t),t},_n.prototype.getStackWrap=function(t,e){var o,t=t.stack,i=t&&t.group||t,r=e.children;if(typeof i===f){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},_n.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?_:O)+1]=t[e+2]=o[e+1]),t},_n.prototype.reflowCategories=function(t){for(var e=this.children,o=e.length,i=0;i<o;i++)e[i].reflow(t[i])},_n.prototype.createAnimation=function(){this._setAnimationOptions(),mn.prototype.createAnimation.call(this),Vr(this.options.series)&&this._setChildrenAnimation()},_n.prototype._setChildrenAnimation=function(){for(var t=this.points,e=0;e<t.length;e++){var o=t[e],i=o.visual;i&&w(i.options.zIndex)&&(o.options.animation=this.options.animation,o.createAnimation())}},_n.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},_n);function _n(){mn.apply(this,arguments)}i(Dr,{animation:{type:Qi}});var bn,wn=Dr,Dr=((bn=ae)&&(Cn.__proto__=bn),((Cn.prototype=Object.create(bn&&bn.prototype)).constructor=Cn).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()},Cn.prototype.reflowNote=function(){this.note&&this.note.reflow(this.box)},Cn.prototype.createVisual=function(){bn.prototype.createVisual.call(this),this._mainVisual=this.mainVisual(this.options),this.visual.append(this._mainVisual),this.createOverlay()},Cn.prototype.mainVisual=function(t){var e=new b.drawing.Group;return this.createBody(e,t),this.createLines(e,t),e},Cn.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:At(e.border.opacity,e.opacity)}),I(o),t.append(o),an(e)&&t.append(this.createGradientOverlay(o,{baseColor:this.color},m({end:e.vertical?void 0:[0,1]},e.overlay)))},Cn.prototype.createLines=function(t,e){this.drawLines(t,e,this.lines,e.line)},Cn.prototype.drawLines=function(t,e,o,i){if(o)for(var r={stroke:{color:i.color||this.color,opacity:At(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);I(s),t.append(s)}},Cn.prototype.getBorderColor=function(){var t=this.options.border,e=t.color;return e=w(e)?e:new b.Color(this.color).brightness(t._brightness).toHex()},Cn.prototype.createOverlay=function(){var t=b.drawing.Path.fromRect(this.box.toRect(),{fill:{color:x,opacity:0},stroke:null});this.visual.append(t)},Cn.prototype.createHighlight=function(){var t=this.options.highlight,e=this.color,t=(this.color=t.color||this.color,this.mainVisual(m({},this.options,{line:{color:this.getBorderColor()}},t)));return this.color=e,t},Cn.prototype.highlightVisual=function(){return this._mainVisual},Cn.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this._mainVisual}},Cn.prototype.tooltipAnchor=function(){var t=this.box,e=this.owner.pane.clipBox()||t;return{point:new Nt(t.x2+5,Math.max(t.y1,e.y1)+5),align:{horizontal:P,vertical:M}}},Cn.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Cn.prototype.overlapsBox=function(t){return this.box.overlaps(t)},Cn);function Cn(t,e){bn.call(this,e),this.value=t}i(Dr,{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:{}}}),m(Dr.prototype,xr),m(Dr.prototype,o);var Sn=Dr;function kn(t){return Ii(t)===t.length}(An=mr)&&(Pn.__proto__=An),((Pn.prototype=Object.create(An&&An.prototype)).constructor=Pn).prototype.reflowCategories=function(t){for(var e=this.children,o=e.length,i=0;i<o;i++)e[i].reflow(t[i])},Pn.prototype.addValue=function(t,e){var o,i=e.categoryIx,r=e.category,n=e.series,l=e.seriesIx,c=this.children,s=this.options,a=t.valueFields,h=kn(this.splitValue(a)),u=n.data[i],p=this.categoryPoints[i],h=(p||(this.categoryPoints[i]=p=[]),h&&(o=this.createPoint(t,e)),c[i]);h||(h=new yn({vertical:s.invertAxes,gap:s.gap,spacing:s.spacing,rtl:!s.invertAxes&&(this.chartService||{}).rtl}),this.append(h)),o&&(this.updateRange(a,e),h.append(o),o.categoryIx=i,o.category=r,o.series=n,o.seriesIx=l,o.owner=this,o.dataItem=u,o.noteText=t.fields.noteText),this.points.push(o),p.push(o)},Pn.prototype.pointType=function(){return Sn},Pn.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=m({},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),H(r.color)&&(h=a.color),a.vertical=!this.options.invertAxes,new n(s,a));return i.color=h,i},Pn.prototype.splitValue=function(t){return[t.low,t.open,t.close,t.high]},Pn.prototype.updateRange=function(t,e){var e=e.series.axis,t=this.splitValue(t),o=this.valueAxisRanges[e],o=this.valueAxisRanges[e]=o||{min:c,max:l};this.valueAxisRanges[e]={min:Math.min.apply(Math,t.concat([o.min])),max:Math.max.apply(Math,t.concat([o.max]))}},Pn.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)},Pn.prototype.animationPoints=function(){return this.points};var An,Dr=Pn;function Pn(){An.apply(this,arguments)}m(Dr.prototype,Er);var Tn,Mn=Dr,Dr=((Tn=Sn)&&(On.__proto__=Tn),((On.prototype=Object.create(Tn&&Tn.prototype)).constructor=On).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()},On.prototype.reflowBoxSlot=function(t){this.boxSlot.x1=t.x1,this.boxSlot.x2=t.x2},On.prototype.reflowWhiskerSlot=function(t){this.whiskerSlot.x1=t.x1,this.whiskerSlot.x2=t.x2},On.prototype.calcMeanPoints=function(t,e){return[[[t.x1,e.y1],[t.x2,e.y1]]]},On.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]]]},On.prototype.calcMedianPoints=function(t,e){return[[[t.x1,e.y1],[t.x2,e.y1]]]},On.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=m({},(e=a<o.q3+r&&a>o.q1-r?t.outliers:t.extremes).border),h=(w(h.color)||(w(this.color)?h.color=this.color:h.color=new b.Color(e.background).brightness(.8).toHex()),new ue({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},On.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)}},On.prototype.mainVisual=function(t){for(var e=Tn.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},On.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)},On.prototype.getBorderColor=function(){return(this.options.border||{}).color?this.options.border.color:this.color||Tn.prototype.getBorderColor.call(this)},On);function On(t,e){Tn.call(this,t,e),this.createNote()}i(Dr,{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:x,border:{width:2,opacity:1},opacity:0},extremes:{visible:!0,size:8,type:u,background:x,border:{width:2,opacity:1},opacity:0}}),m(Dr.prototype,xr);var Bn,Rn,En,Ln=Dr,In=((En=Ln)&&(Hn.__proto__=En),((Hn.prototype=Object.create(En&&En.prototype)).constructor=Hn).prototype.reflowBoxSlot=function(t){this.boxSlot.y1=t.y1,this.boxSlot.y2=t.y2},Hn.prototype.reflowWhiskerSlot=function(t){this.whiskerSlot.y1=t.y1,this.whiskerSlot.y2=t.y2},Hn.prototype.calcMeanPoints=function(t,e){return[[[e.x1,t.y1],[e.x1,t.y2]]]},Hn.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]]]},Hn.prototype.calcMedianPoints=function(t,e){return[[[e.x1,t.y1],[e.x1,t.y2]]]},Hn),zn=((Rn=Mn)&&(Dn.__proto__=Rn),((Dn.prototype=Object.create(Rn&&Rn.prototype)).constructor=Dn).prototype.addValue=function(t,e){var o,i=e.categoryIx,r=e.category,n=e.series,l=e.seriesIx,c=this.children,s=this.options,a=t.valueFields,h=kn(this.splitValue(a)),u=n.data[i],p=this.categoryPoints[i],h=(p||(this.categoryPoints[i]=p=[]),h&&(o=this.createPoint(t,e)),c[i]);h||(h=new yn({vertical:s.invertAxes,gap:s.gap,spacing:s.spacing,rtl:!s.invertAxes&&(this.chartService||{}).rtl}),this.append(h)),o&&(this.updateRange(a,e),h.append(o),o.categoryIx=i,o.category=r,o.series=n,o.seriesIx=l,o.owner=this,o.dataItem=u),this.points.push(o),p.push(o)},Dn.prototype.pointType=function(){return this.options.invertAxes?In:Ln},Dn.prototype.splitValue=function(t){return[t.lower,t.q1,t.median,t.q3,t.upper]},Dn.prototype.updateRange=function(t,e){var e=e.series.axis,o=this.valueAxisRanges[e],i=this.splitValue(t).concat(this.filterOutliers(t.outliers));w(t.mean)&&(i=i.concat(t.mean)),o=this.valueAxisRanges[e]=o||{min:c,max:l},this.valueAxisRanges[e]={min:Math.min.apply(Math,i.concat([o.min])),max:Math.max.apply(Math,i.concat([o.max]))}},Dn.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)},Dn.prototype.filterOutliers=function(t){for(var e=(t||[]).length,o=[],i=0;i<e;i++){var r=t[i];w(r)&&null!==r&&o.push(r)}return o},Dn.prototype.supportsPointInactiveOpacity=function(){return!1},Dn),Vn=((Bn=lr)&&(jn.__proto__=Bn),((jn.prototype=Object.create(Bn&&Bn.prototype)).constructor=jn).prototype.getAxis=function(){var t=this.chart.seriesAxes(this.series);return this.isVertical?t.y:t.x},jn);function jn(){Bn.apply(this,arguments)}function Dn(){Rn.apply(this,arguments)}function Hn(){En.apply(this,arguments)}function Un(t){return w(t)&&null!==t}(Fn=ae)&&(Nn.__proto__=Fn),((Nn.prototype=Object.create(Fn&&Fn.prototype)).constructor=Nn).prototype._initFields=function(){this.xAxisRanges={},this.yAxisRanges={},this.points=[],this.seriesPoints=[],this.seriesOptions=[],this._evalSeries=[]},Nn.prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},Nn.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"];V(r)&&(V(p)&&V(o)&&(i={low:p,high:o}),h&&w(h[n])&&(this.seriesErrorRanges=this.seriesErrorRanges||{x:[],y:[]},this.seriesErrorRanges[e][s]=this.seriesErrorRanges[e][s]||new Xi(h[n],a,e),i=this.seriesErrorRanges[e][s].getErrorRange(r,h[n])),i&&this.addPointErrorBar(i,t,e))},Nn.prototype.addPointErrorBar=function(t,e,o){var i=t.low,t=t.high,r=e.series,n=e.options.errorBars,s=o===O,a={},s=(e[o+"Low"]=i,e[o+"High"]=t,e.errorBars=e.errorBars||[],new Vn(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)},Nn.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=Un(i)&&Un(r)?t:this.createMissingValue(t,s))&&((o=this.createPoint(t,e))&&(Object.assign(o,e),this.addErrorBar(o,_,e),this.addErrorBar(o,O,e)),this.updateRange(t,e.series)),this.points.push(o),n.push(o)},Nn.prototype.seriesMissingValues=function(t){return t.missingValues},Nn.prototype.createMissingValue=function(){},Nn.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];Un(r)&&(n=this.xAxisRanges[i]=n||{min:c,max:l},j(r)&&(r=Bo(o,r)),n.min=Math.min(n.min,r),n.max=Math.max(n.max,r)),Un(t)&&(s=this.yAxisRanges[e]=s||{min:c,max:l},j(t)&&(t=Bo(o,t)),s.min=Math.min(s.min,t),s.max=Math.max(s.max,t))},Nn.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=(w(s)||(this._evalSeries[r]=s=dr(t,{},n,!0)),t);return s&&dr(r=m({},t),{value:e,series:i,dataItem:o.dataItem},n),r},Nn.prototype.pointType=function(){return wr},Nn.prototype.pointOptions=function(t,e){var o,i=this.seriesOptions[e];return i||(o=this.pointType().prototype.defaults,this.seriesOptions[e]=i=m({},o,{markers:{opacity:t.opacity},tooltip:{format:this.options.tooltip.format},labels:{format:this.options.labels.format}},t)),i},Nn.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=(H(o.color)&&(r=i.color),new wr(t,i));return e.color=r,this.append(e),e},Nn.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)throw new Error("Unable to locate Y axis with name "+t);return{x:i,y:o}},Nn.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},Nn.prototype.pointSlot=function(t,e){return new C(t.x1,e.y1,t.x2,e.y2)},Nn.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,m({pointIx:n,series:r,seriesIx:i,dataItem:r.data[n],owner:this},s))}}},Nn.prototype.formatPointValue=function(t,e){t=t.value;return this.chartService.format.auto(e,t.x,t.y)},Nn.prototype.animationPoints=function(){for(var t=this.points,e=[],o=0;o<t.length;o++)e.push((t[o]||{}).marker);return e};var Fn,Dr=Nn;function Nn(t,e){Fn.call(this,e),this.plotArea=t,this.chartService=t.chartService,this._initFields(),this.render()}i(Dr,{series:[],tooltip:{format:"{0}, {1}"},labels:{format:"{0}, {1}"},clip:!0}),m(Dr.prototype,Er,{_bindPoint:mr.prototype._bindPoint});var Gn,Wn=Dr,Dr=((Gn=wr)&&(Xn.__proto__=Gn),((Xn.prototype=Object.create(Gn&&Gn.prototype)).constructor=Xn).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},Xn);function Xn(t,e){Gn.call(this,t,e),this.category=t.category}Dr.prototype.defaults=m({},Dr.prototype.defaults,{labels:{position:A},highlight:{opacity:1,border:{color:"#fff",width:2,opacity:1}}}),Dr.prototype.defaults.highlight.zIndex=void 0;var qn,Yn=Dr,Dr=((qn=Wn)&&(Zn.__proto__=qn),((Zn.prototype=Object.create(qn&&qn.prototype)).constructor=Zn).prototype._initFields=function(){this._maxSize=l,qn.prototype._initFields.call(this)},Zn.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)),qn.prototype.addValue.call(this,t,e)):(this.points.push(null),this.seriesPoints[e.seriesIx].push(null))},Zn.prototype.reflow=function(t){this.updateBubblesSize(t),qn.prototype.reflow.call(this,t)},Zn.prototype.pointType=function(){return Yn},Zn.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=At(o.negativeValues.color,n)),m({labels:{animation:{delay:i,duration:600-i}}},this.pointOptions(o,e.seriesIx),{markers:{type:u,border:o.border,opacity:o.opacity,animation:r}})),i=this.evalPointOptions(i,t,e),r=(H(o.color)&&(n=i.color),i.markers.background=n,new Yn(t,i));return r.color=n,this.append(r),r},Zn.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],l=this.seriesPoints[i],c=(r.minSize||Math.max(.02*o,10))/2,n=(r.maxSize||.2*o)/2,u=Math.PI*c*c,d=(Math.PI*n*n-u)/this._maxSize,s=0;s<l.length;s++){var a,h,p=l[s];p&&(a=Math.abs(p.value.size)*d,a=Math.sqrt((u+a)/Math.PI),h=At(p.options.zIndex,0)+(1-a/n),m(p.options,{zIndex:h,markers:{size:2*a,zIndex:h},labels:{zIndex:h+1}}))}},Zn.prototype.formatPointValue=function(t,e){var o=t.value;return this.chartService.format.auto(e,o.x,o.y,o.size,t.category)},Zn.prototype.createAnimation=function(){},Zn.prototype.createVisual=function(){},Zn);function Zn(){qn.apply(this,arguments)}i(Dr,{tooltip:{format:"{3}"},labels:{format:"{3}"}});var Qn,Kn=Dr,Dr=((Qn=ue)&&($n.__proto__=Qn),($n.prototype=Object.create(Qn&&Qn.prototype)).constructor=$n);function $n(){Qn.apply(this,arguments)}m(Dr.prototype,xr);var Jn,ts=Dr,Dr=((Jn=ae)&&(es.__proto__=Jn),((es.prototype=Object.create(Jn&&Jn.prototype)).constructor=es).prototype.render=function(){var t=this.options;this._rendered||(this._rendered=!0,w(this.value.target)&&(this.target=new ts({type:t.target.shape,background:t.target.color||this.color,opacity:t.opacity,zIndex:t.zIndex,border:t.target.border,vAlign:M,align:T}),this.target.value=this.value,this.target.dataItem=this.dataItem,this.target.series=this.series,this.append(this.target)),this.createNote())},es.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 C(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},es.prototype.createVisual=function(){Jn.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:At(t.border.opacity,t.opacity)}),I(this.bodyVisual=e),this.visual.append(e)},es.prototype.createAnimation=function(){this.bodyVisual&&(this.animation=b.drawing.Animation.create(this.bodyVisual,this.options.animation))},es.prototype.createHighlight=function(t){return b.drawing.Path.fromRect(this.box.toRect(),t)},es.prototype.highlightVisual=function(){return this.bodyVisual},es.prototype.highlightVisualArgs=function(){return{rect:this.box.toRect(),visual:this.bodyVisual,options:this.options}},es.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},es);function es(t,e){Jn.call(this,e),this.aboveAxis=this.options.aboveAxis,this.color=e.color||x,this.value=t}Dr.prototype.tooltipAnchor=ln.prototype.tooltipAnchor,i(Dr,{border:{width:1},vertical:!1,opacity:1,target:{shape:"",border:{width:0,color:"green"},line:{width:2}},tooltip:{format:"Current: {0}<br />Target: {1}"}}),m(Dr.prototype,xr),m(Dr.prototype,o);var os,is=Dr,Dr=((os=mr)&&(rs.__proto__=os),((rs.prototype=Object.create(os&&os.prototype)).constructor=rs).prototype.reflowCategories=function(t){for(var e=this.children,o=e.length,i=0;i<o;i++)e[i].reflow(t[i])},rs.prototype.plotRange=function(t){var e=t.series,e=this.seriesValueAxis(e),e=this.categoryAxisCrossingValue(e);return[e,t.value.current||e]},rs.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=m({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=(H(r.color)&&(t=h.color),new is(a,h)),e=(i.color=t,s[o]);return e||(e=new yn({vertical:n.invertAxes,gap:n.gap,spacing:n.spacing,rtl:!n.invertAxes&&(this.chartService||{}).rtl}),this.append(e)),e.append(i),i},rs.prototype.updateRange=function(t,e){var o=t.current,t=t.target,e=e.series.axis,i=this.valueAxisRanges[e];w(o)&&!isNaN(o)&&w(t&&!isNaN(t))&&((i=this.valueAxisRanges[e]=i||{min:c,max:l}).min=Math.min(i.min,o,t),i.max=Math.max(i.max,o,t))},rs.prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value.current,t.value.target)},rs.prototype.pointValue=function(t){return t.valueFields.current},rs.prototype.aboveAxis=function(t){return 0<t.value.current},rs.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()}},rs);function rs(t,e){for(var o=e.series,i=0;i<o.length;i++){var r=o[i],n=r.data;!n||B(n[0])||N(n[0])||(r.data=[n])}os.call(this,t,e)}Dr.prototype._setAnimationOptions=wn.prototype._setAnimationOptions,i(Dr,{animation:{type:Qi}});var ns,ss=Dr,Dr=((ns=b.Class)&&(as.__proto__=ns),((as.prototype=Object.create(ns&&ns.prototype)).constructor=as).prototype.getStyle=function(t,e){var o=t.background,i=t.border.color,e=(e&&(e=e.color||e.options.color,o=At(o,e),i=At(i,e)),q(t.padding||{},"auto"));return{backgroundColor:o,borderColor:i,font:t.font,color:t.color,opacity:t.opacity,borderWidth:G(t.border.width),paddingTop:G(e.top),paddingBottom:G(e.bottom),paddingLeft:G(e.left),paddingRight:G(e.right)}},as.prototype.show=function(t,e,o){t.format=e.format;o=this.getStyle(e,o),t.style=o,o=new b.Color(o.backgroundColor);w(e.color)||o.isDark()||(t.className="k-chart-tooltip-inverse"),this.chartService.notify("showTooltip",t),this.visible=!0},as.prototype.hide=function(){this.chartService&&this.chartService.notify("hideTooltip"),this.visible=!1},as.prototype.destroy=function(){delete this.chartService},as);function as(t,e){ns.call(this),this.chartService=t,this.options=m({},this.options,e)}i(Dr,{border:{width:1},opacity:1});(hs=Dr)&&(ls.__proto__=hs),((ls.prototype=Object.create(hs&&hs.prototype)).constructor=ls).prototype.initAxisName=function(){var t=this.crosshair.axis,t=t.plotArea.categoryAxis?t.getCategory?"categoryAxis":"valueAxis":t.options.vertical?"yAxis":"xAxis";this.axisName=t},ls.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===y&&(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)},ls.prototype.hide=function(){this.chartService.notify("hideTooltip",{crosshair:this.crosshair,axisName:this.axisName,axisIndex:this.crosshair.axis.axisIndex})},ls.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=A,r===S?(e=M,o.bottomLeft().translate(0,i)):(e=S,o.topLeft().translate(0,-i))):(e=A,r===P?(t=T,o.topLeft().translate(-i,0)):(t=P,o.topRight().translate(i,0)));return{point:n,align:{horizontal:t,vertical:e}}};var hs,ps=ls;function ls(t,e,o){hs.call(this,t,o),this.crosshair=e,this.formatService=t.format,this.initAxisName()}i(ps,{padding:10});var cs,us=ps,ps=((cs=ae)&&(ds.__proto__=cs),((ds.prototype=Object.create(cs&&cs.prototype)).constructor=ds).prototype.showAt=function(t){this.point=t,this.moveLine(),this.line.visible(!0),this.tooltip&&this.tooltip.showAt(t)},ds.prototype.hide=function(){this.line.visible(!1),this.tooltip&&this.tooltip.hide()},ds.prototype.moveLine=function(){var t=this.axis,e=this.point,o=t.options.vertical,i=this.getBox(),r=o?O:_,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)},ds.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?_:O,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},ds.prototype.createVisual=function(){cs.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)},ds.prototype.destroy=function(){this.tooltip&&this.tooltip.destroy(),cs.prototype.destroy.call(this)},ds);function ds(t,e,o){cs.call(this,o),this.axis=e,this.stickyMode=e instanceof zo;o=this.options.tooltip;o.visible&&(this.tooltip=new us(t,this,m({},o,{stickyMode:this.stickyMode})))}i(ps,{color:a,width:2,zIndex:-1,tooltip:{visible:!1}});var fs,gs=ps,ps=((fs=ae)&&(ys.__proto__=fs),((ys.prototype=Object.create(fs&&fs.prototype)).constructor=ys).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},ys.prototype._clipBox=function(){return this.pane.chartsBox()},ys.prototype.createVisual=function(){var t;this.visual=new b.drawing.Group({zIndex:0}),this.shouldClip()&&(t=(this.clipBox=this._clipBox()).toRect(),I(t=b.drawing.Path.fromRect(t)),this.visual.clip(t),this.unclipLabels())},ys.prototype.stackRoot=function(){return this},ys.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)))}},ys.prototype.destroy=function(){fs.prototype.destroy.call(this),delete this.parent},ys);function ys(t,e){fs.call(this,t),this.pane=e}ps.prototype.isStackRoot=!0;var vs,ms=ps,ps=((vs=le)&&(_s.__proto__=vs),((_s.prototype=Object.create(vs&&vs.prototype)).constructor=_s).prototype.createTitle=function(){var t=this.options.title;N(t)&&(t=m({},t,{align:t.position,position:M})),this.title=Re.buildTitle(t,this,_s.prototype.options.title)},_s.prototype.appendAxis=function(t){this.content.append(t),this.axes.push(t),t.pane=this},_s.prototype.appendAxisAt=function(t,e){this.content.append(t),this.axes.splice(e,0,t),t.pane=this},_s.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},_s.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=[]},_s.prototype.reflow=function(t){var e;bt(this.children)===this.content&&(e=this.children.pop()),vs.prototype.reflow.call(this,t),e&&this.children.push(e),this.title&&(this.contentBox.y1+=this.title.box.height())},_s.prototype.visualStyle=function(){var t=vs.prototype.visualStyle.call(this);return t.zIndex=-10,t},_s.prototype.renderComplete=function(){this.options.visible&&this.createGridLines()},_s.prototype.stackRoot=function(){return this},_s.prototype.clipRoot=function(){return this},_s.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&&dt(h,s.createGridLines(t))},_s.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()},_s.prototype.chartsBox=function(){for(var t=this.axes,e=t.length,o=new C,i=0;i<e;i++){var r=t[i],n=r.options.vertical?O:_,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},_s.prototype.clipBox=function(){return this.chartContainer.clipBox},_s.prototype.notifyRender=function(){var t=this.getService();t&&t.notify("paneRender",{pane:new Ri(this),index:this.paneIndex,name:this.options.name})},_s),xs=1;function _s(t){vs.call(this,t),this.id="pane"+xs++,this.createTitle(),this.content=new ae,this.chartContainer=new ms({},this),this.append(this.content),this.axes=[],this.charts=[]}ps.prototype.isStackRoot=!0,i(ps,{zIndex:-1,shrinkToFit:!0,title:{align:P},visible:!0});var bs=ps;function ws(t,e){null!==e&&t.push(e)}function Cs(t,e,o){e=e.visible;if(w(e))return e;e=t.pointVisibility;return e?e[o]:void 0}function Ss(t){for(var e=t.data,o=[],i=0,r=0,n=0;n<e.length;n++){var s=Ni.current.bindPoint(t,n),a=s.valueFields.value;V(a=j(a)?parseFloat(a):a)?(s.visible=!1!==Cs(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 ks(t,e){return t&&e?t.toLowerCase()===e.toLowerCase():t===e}function As(t,e){for(var o=[],i=[].concat(e),r=0;r<t.length;r++){var n=t[r];nt(n.type,i)&&o.push(n)}return o}function Ps(t,e,o){if(null===e)return e;var i="_date_"+t,r=e[i];return r||(r=Bo(o,tt(t)(e)),e[i]=r),r}function Ts(t,e){t=t.type,e=e instanceof Date;return!t&&e||ks(t,y)}function Ms(t){return 1===t.length?t[0]:t}var Os=/area/i;function Bs(t,e){var o,i=Ni.current.bindPoint(t,null,e).valueFields;for(o in i)if(D(i[o]))return!0}function Rs(t){for(var e,o,i=t.start,r=t.dir,n=t.min,s=t.max,a=t.getter,h=t.hasItem,l=t.series,p=i;h(p+=r)&&(e=Bs(l,(o=a(p)).item)),n<=p&&p<=s&&!e;);if(e)return o}function Es(t,e,o,i,l){var r,n,s,a,h=e.min,e=e.max,p=0<h&&h<o,c=e+1<o;(p||c)&&(((a=t).missingValues||(Os.test(a.type)||a.stack?Yi:Zi))!==Zi?(p&&(r=i(h-1)),c&&(n=i(e+1))):(p&&(r=Bs(t,(s=i(h-1)).item)?s:Rs({start:h,dir:-1,min:0,max:o-1,getter:i,hasItem:l,series:t})),c&&(n=Bs(t,(s=i(e+1)).item)?s:Rs({start:e,dir:1,min:0,max:o-1,getter:i,hasItem:l,series:t}))),r&&(t._outOfRangeMinPoint=r),n&&(t._outOfRangeMaxPoint=n))}(Ls=ae)&&(Is.__proto__=Ls),((Is.prototype=Object.create(Ls&&Ls.prototype)).constructor=Is).prototype.initFields=function(){},Is.prototype.initSeries=function(){for(var t=this.series,e=0;e<t.length;e++)t[e].index=e},Is.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=m({title:{color:t.color}},e),s=0;s<i;s++){var a=m({},n,o[s]),a=(j(a.title)&&(a.title=m({text:a.title},n.title)),new bs(a));a.paneIndex=s,r.push(a),this.append(a)}this.panes=r},Is.prototype.crosshairOptions=function(t){return t.options.crosshair},Is.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 gs(this.chartService,r,n),this.crosshairs.push(r),o.content.append(r))}},Is.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}},Is.prototype.hideCrosshairs=function(){for(var t=this.crosshairs,e=0;e<t.length;e++)t[e].hide()},Is.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]},Is.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},Is.prototype.appendAxis=function(t){this.findPane(t.options.pane).appendAxis(t),this.axes.push(t),t.plotArea=this},Is.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},Is.prototype.appendChart=function(t,e){this.charts.push(t),e?e.appendChart(t):this.append(t)},Is.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},Is.prototype.addToLegend=function(t){for(var l=t.length,e=this.options.legend,c=e.labels||{},u=e.inactiveItems||{},o=u.labels||{},d=[],i=0;i<l;i++){var r,n,s,a,h=t[i],p=!1!==h.visible;!1!==h.visibleInLegend&&(r=h.name,(s=!p&&K(o)||K(c))&&(r=s({text:Un(r)?r:"",series:h})),s=h._defaults,s=void(H(n=h.color)&&s&&(n=s.color)),a=void 0,a=p?(s={},n):(s={color:o.color,font:o.font},u.markers.color),Un(r)&&""!==r&&d.push({text:r,labels:s,markerColor:a,series:h,active:p}))}dt(e.items,d)},Is.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)}},Is.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},Is.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},Is.prototype.reflow=function(t){var e=this.options.plotArea,o=this.panes,e=q(e.margin);this.box=t.clone().unpad(e),this.reflowPanes(),this.detachLabels(),this.reflowAxes(o),this.reflowCharts(o)},Is.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()},Is.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},Is.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[_+n]-o[_+r],i[O+n]-o[O+r]);t.pane!==e.pane&&i.translate(0,t.pane.box.y1-e.pane.box.y1),t.reflow(i)},Is.prototype.alignAxes=function(t,e){for(var l=t[0],c=e[0],u=this.axisCrossingValues(l,e),d=this.axisCrossingValues(c,t),f={},g={},y={},v={},o=0;o<e.length;o++){var i=e[o],r=i.pane,n=r.id,m=!1!==i.options.visible,r=Vs(t,r)||l,x=u;r!==l&&(x=this.axisCrossingValues(r,e)),this.alignAxisTo(i,r,d[o],x[o]),i.options._overlap||(k(i.lineBox().x1)===k(r.lineBox().x1)&&(f[n]&&i.reflow(i.box.alignTo(f[n].box,P).translate(-i.options.margin,0)),m&&(f[n]=i)),k(i.lineBox().x2)===k(r.lineBox().x2)&&(i._mirrored||(i.options.labels.mirror=!i.options.labels.mirror,i._mirrored=!0),this.alignAxisTo(i,r,d[o],x[o]),g[n]&&i.reflow(i.box.alignTo(g[n].box,T).translate(i.options.margin,0)),m&&(g[n]=i)),0!==o&&c.pane===i.pane&&(i.alignTo(c),i.reflow(i.box)))}for(var s=0;s<t.length;s++){var a=t[s],h=a.pane,p=h.id,_=!1!==a.options.visible,h=Vs(e,h)||c,b=d;h!==c&&(b=this.axisCrossingValues(h,t)),this.alignAxisTo(a,h,u[s],b[s]),a.options._overlap||(k(a.lineBox().y1)===k(h.lineBox().y1)&&(a._mirrored||(a.options.labels.mirror=!a.options.labels.mirror,a._mirrored=!0),this.alignAxisTo(a,h,u[s],b[s]),y[p]&&a.reflow(a.box.alignTo(y[p].box,M).translate(0,-a.options.margin)),_&&(y[p]=a)),k(a.lineBox().y2,3)===k(h.lineBox().y2,3)&&(v[p]&&a.reflow(a.box.alignTo(v[p].box,S).translate(0,a.options.margin)),_&&(v[p]=a)),0!==s&&(a.alignTo(l),a.reflow(a.box)))}},Is.prototype.shrinkAxisWidth=function(t){for(var e=this.groupAxes(t).any,o=zs(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))}},Is.prototype.shrinkAxisHeight=function(t){for(var e,o=0;o<t.length;o++){var i=t[o],r=i.axes,n=Math.max(0,zs(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},Is.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=zs(n),l=Math.max(r.y1-s.y1,r.y2-s.y2),o=Math.max(o,r.x1-s.x1),a=0;a<n.length;a++){var h=n[a];h.reflow(h.box.translate(0,l))}}for(var p=0;p<e.length;p++){var c=e[p];c.reflow(c.box.translate(o,0))}},Is.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))},Is.prototype.autoRotateAxisLabels=function(t){for(var e,o=this.panes,i=js(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))}},Is.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)},Is.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&&!nt(n,t)||e[r].reflow(i)}},Is.prototype.reflowPanes=function(){for(var t=this.box,e=this.panes,o=e.length,i=t.height(),r=0,l=t.y1,n=0;n<o;n++){var s=e[n],a=s.options.height;s.options.width=t.width(),s.options.height?(a.indexOf&&a.indexOf("%")&&(a=parseInt(a,10)/100,s.options.height=a*t.height()),s.reflow(t.clone()),i-=s.options.height):r++}for(var h=0;h<o;h++){var c=e[h];c.options.height||(c.options.height=i/r)}for(var p=0;p<o;p++){var u=e[p],d=t.clone().move(t.x1,l);u.reflow(d),l+=u.options.height}},Is.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},Is.prototype.chartsBoxes=function(){for(var t=this.panes,e=[],o=0;o<t.length;o++)e.push(t[o].chartsBox());return e},Is.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()))},Is.prototype.backgroundContainsPoint=function(t){for(var e=this.chartsBoxes(),o=0;o<e.length;o++)if(e[o].containsPoint(t))return!0},Is.prototype.createVisual=function(){Ls.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&&w(o)||(o=x,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)},Is.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&&w(s.value)&&null!==s.value&&o.push(s)}}return o},Is.prototype.pointsBySeriesIndex=function(e){return this.filterPoints(function(t){return t.series.index===e})},Is.prototype.pointsBySeriesName=function(e){return this.filterPoints(function(t){return t.series.name===e})},Is.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},Is.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}},Is.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}},Is.prototype.detachLabels=function(){var t=this.groupAxes(this.panes),e=t.x,t=t.y;this.detachAxisGroupLabels(t,e),this.detachAxisGroupLabels(e,t)},Is.prototype.detachAxisGroupLabels=function(t,e){for(var o=0,i=0;i<t.length;i++){var r=t[i],n=r.pane,s=Vs(e,n)||e[0],s=this.createLabelAxis(r,i+o,s);s&&(o++,r=n.axes.indexOf(r)+o,n.appendAxisAt(s,r))}},Is.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(wt(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 Ls,ps=Is;function Is(t,e,o){Ls.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 zs(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 C}function Vs(t,e){for(var o=0;o<t.length;o++){var i=t[o];if(i&&i.pane===e)return i}}var js=function(t){return t.reduce(function(t,e){return t.concat(e.axes)},[])},Ds=(i(ps,{series:[],plotArea:{margin:{}},background:"",border:{color:a,width:0},paneDefaults:{title:{}},legend:{inactiveItems:{labels:{color:"#919191"},markers:{color:"#919191"}}}}),ps),Hs={hover:function(t,e){this._dispatchEvent(t,e,"plotAreaHover")},click:function(t,e){this._dispatchEvent(t,e,"plotAreaClick")}};(Fs=b.Class)&&(Ws.__proto__=Fs),((Ws.prototype=Object.create(Fs&&Fs.prototype)).constructor=Ws).prototype.aggregatePoints=function(t,l){var c,u=this._series,d=this._seriesFields,e=this._bindPoints(t||[]),t=e.dataItems[0],o={};!t||V(t)||B(t)||((c=function(){}).prototype=t,o=new c);for(var i=0;i<d.length;i++){var r=d[i],n=this._bindField(e.values,r.canonicalName),n=r.transform(n,u,e.dataItems,l);if(!(null===n||!N(n)||w(n.length)||n instanceof Date)){o=n;break}if(w(n)){s=void 0;f=void 0;g=void 0;a=void 0;h=void 0;p=void 0;var s=r.name;var f=o;var g=n;var a=f,h=s;if(-1<s.indexOf(".")){for(var p=s.split(".");1<p.length;)h=p.shift(),w(a[h])||(a[h]={}),a=a[h];h=p.shift()}a[h]=g}}return o},Ws.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}},Ws.prototype._bindField=function(t,e){for(var o=[],i=t.length,r=0;r<i;r++){var n=t[r],s=n.valueFields,s=(w(s[e])?s:n.fields)[e];o.push(s)}return o};var Us,Fs,Ns=Ws,ps=((Us=b.Class)&&(Gs.__proto__=Us),((Gs.prototype=Object.create(Us&&Us.prototype)).constructor=Gs).prototype.register=function(t,e){for(var o=0;o<t.length;o++)this._defaults[t[o]]=e},Gs.prototype.query=function(t){return this._defaults[t]},Gs);function Gs(){Us.call(this),this._defaults={}}function Ws(t,e,o){Fs.call(this);var i=e.canonicalFields(t),r=e.valueFields(t),n=e.sourceFields(t,i),l=this._seriesFields=[],o=o.query(t.type),s=t.aggregate||o;this._series=t,this._binder=e;for(var a=0;a<i.length;a++){var h=i[a],p=void 0;if(N(s))p=s[h];else{if(0!==a&&!nt(h,r))break;p=s}p&&l.push({canonicalName:h,name:n[a],transform:H(p)?p:Vi[p]})}}ps.current=new ps;var Xs,qs=ps,ps=((Xs=ln)&&(Ys.__proto__=Xs),((Ys.prototype=Object.create(Xs&&Xs.prototype)).constructor=Ys).prototype.createLabel=function(){var t=this.options.labels,e=m({},t,t.from),t=m({},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))},Ys.prototype._createLabel=function(t){var e=K(t),o=this.pointData(),e=e?e(o):this.formatValue(t.format);return new sn(e,m({vertical:this.options.vertical},t),o)},Ys.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)},Ys);function Ys(){Xs.apply(this,arguments)}ps.prototype.defaults=m({},ps.prototype.defaults,{labels:{format:"{0} - {1}"},tooltip:{format:"{1}"}});var Zs,Qs=ps,ps=((Zs=wn)&&(Ks.__proto__=Zs),((Ks.prototype=Object.create(Zs&&Zs.prototype)).constructor=Ks).prototype.pointType=function(){return Qs},Ks.prototype.pointValue=function(t){return t.valueFields},Ks.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)},Ks.prototype.plotRange=function(t){return t?[t.value.from,t.value.to]:0},Ks.prototype.updateRange=function(t,e){var e=e.series.axis,o=t.from,i=t.to,r=this.valueAxisRanges[e];null!==t&&V(o)&&V(i)&&((r=this.valueAxisRanges[e]=r||{min:c,max:l}).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))},Ks.prototype.aboveAxis=function(t){t=t.value;return t.from<t.to},Ks);function Ks(){Zs.apply(this,arguments)}ps.prototype.plotLimits=mr.prototype.plotLimits;var $s,Js,ta=ps,ea=((Js=wr)&&(ia.__proto__=Js),((ia.prototype=Object.create(Js&&Js.prototype)).constructor=ia).prototype.aliasFor=function(){return this.parent},ia),ps=(($s=ae)&&(oa.__proto__=$s),((oa.prototype=Object.create($s&&$s.prototype)).constructor=oa).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 ea(i,m({},this.options,{labels:e.from,markers:t.from})),i=this.toPoint=new ea(i,m({},this.options,{labels:e.to,markers:t.to})),this.copyFields(o),this.copyFields(i),this.append(o),this.append(i))},oa.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())},oa.prototype.createHighlight=function(){var t=new b.drawing.Group;return t.append(this.fromPoint.createHighlight()),t.append(this.toPoint.createHighlight()),t},oa.prototype.highlightVisual=function(){return this.visual},oa.prototype.highlightVisualArgs=function(){return{options:this.options,from:this.fromPoint.highlightVisualArgs(),to:this.toPoint.highlightVisualArgs()}},oa.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=P,r=this.options.vertical?(t=o.x,e=r.y1-5,S):(t=r.x2+5,e=o.y,A),{point:new Nt(t,e),align:{horizontal:i,vertical:r}}},oa.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},oa.prototype.overlapsBox=function(t){return this.box.overlaps(t)},oa.prototype.unclipElements=function(){this.fromPoint.unclipElements(),this.toPoint.unclipElements()},oa.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}"})))},oa.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=P,T):(o=T,P),r.from&&r.from.position||(this.fromPoint.options.labels.position=i),r.to&&r.to.position||(this.toPoint.options.labels.position=o))},oa.prototype.copyFields=function(t){t.dataItem=this.dataItem,t.category=this.category,t.series=this.series,t.color=this.color,t.owner=this.owner},oa);function oa(t,e){$s.call(this),this.value=t,this.options=e,this.aboveAxis=At(this.options.aboveAxis,!0),this.tooltipTracking=!0,this.initLabelsFormat()}function ia(){Js.apply(this,arguments)}m(ps.prototype,xr),m(ps.prototype,o),ps.prototype.defaults={markers:{visible:!1,background:x,size:8,type:u,border:{width:2},opacity:1},labels:{visible:!1,margin:q(3),padding:q(4),animation:{type:"fadeIn",delay:600},position:"auto"},notes:{label:{}},highlight:{markers:{border:{color:x,width:2}},zIndex:100},tooltip:{format:"{0} - {1}"}};var ra,na,sa,aa=ps,ha=((sa=Gr)&&(ua.__proto__=sa),((ua.prototype=Object.create(sa&&sa.prototype)).constructor=ua).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.toGeometryPoints(this.toPoints()))},ua.prototype.stackSegments=function(){var t=this.fromSegments;return t=this.fromSegments?t:this.fromSegments=this.segmentsFromPoints(this.toGeometryPoints(this.fromPoints().reverse()))},ua.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)},ua.prototype.hasStackSegment=function(){return!0},ua.prototype.fromPoints=function(){return this.linePoints.map(function(t){return t.fromPoint})},ua.prototype.toPoints=function(){return this.linePoints.map(function(t){return t.toPoint})},ua),pa=((na=ha)&&(ca.__proto__=na),((ca.prototype=Object.create(na&&na.prototype)).constructor=ca).prototype.createStrokeSegments=function(){return this.createCurveSegments(this.toPoints())},ca.prototype.stackSegments=function(){var t=this.fromSegments;return t=this.fromSegments?t:this.fromSegments=this.createCurveSegments(this.fromPoints().reverse())},ca.prototype.createCurveSegments=function(t){return(new ki).process(this.toGeometryPoints(t))},ca),ps=((ra=ha)&&(la.__proto__=ra),((la.prototype=Object.create(ra&&ra.prototype)).constructor=la).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.calculateStepPoints(this.toPoints()))},la.prototype.stackSegments=function(){var t=this.fromSegments;return this.fromSegments||(t=this.fromSegments=this.segmentsFromPoints(this.calculateStepPoints(this.fromPoints()))).reverse(),t},la);function la(){ra.apply(this,arguments)}function ca(){na.apply(this,arguments)}function ua(){sa.apply(this,arguments)}m(ps.prototype,Go);var da,fa=ps,Go=((da=mr)&&(ga.__proto__=da),((ga.prototype=Object.create(da&&da.prototype)).constructor=ga).prototype.render=function(){da.prototype.render.call(this),this.renderSegments()},ga.prototype.pointType=function(){return aa},ga.prototype.createPoint=function(t,e){var o=e.categoryIx,i=e.category,r=e.series,e=e.seriesIx,n=t.valueFields;if(!Un(n.from)&&!Un(n.to)){if(this.seriesMissingValues(r)!==Yi)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=(H(r.color)&&(i=s.color),new aa(n,s));return o.color=i,this.append(o),o},ga.prototype.createSegment=function(t,e,o){var i=(e.line||{}).style;return new("smooth"===i?pa:"step"===i?fa:ha)(t,e,o)},ga.prototype.plotRange=function(t,e){return t?[t.value.from,t.value.to]:[e,e]},ga.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}},ga.prototype.pointSlot=function(t,e){var o,i=e.from,e=e.to,i=this.options.invertAxes?(o=new C(i.x1,t.y1,i.x2,t.y2),new C(e.x1,t.y1,e.x2,t.y2)):(o=new C(t.x1,i.y1,t.x2,i.y2),new C(t.x1,e.y1,t.x2,e.y2));return{from:o,to:i}},ga.prototype.addValue=function(t,e){var o=t.valueFields;V(o.from)||(o.from=o.to),V(o.to)||(o.to=o.from),da.prototype.addValue.call(this,t,e)},ga.prototype.updateRange=function(t,e){var o;null!==t&&V(t.from)&&V(t.to)&&(e=e.series.axis,e=this.valueAxisRanges[e]=this.valueAxisRanges[e]||{min:c,max:l},o=t.from,t=t.to,e.min=Math.min(e.min,o,t),e.max=Math.max(e.max,o,t))},ga.prototype.formatPointValue=function(t,e){t=t.value;return this.chartService.format.auto(e,t.from,t.to)},ga.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)},ga);function ga(){da.apply(this,arguments)}m(Go.prototype,Pr,Er);var ya,va,ma,xa=Go,_a=((ma=Sn)&&(Sa.__proto__=ma),((Sa.prototype=Object.create(ma&&ma.prototype)).constructor=Sa).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()},Sa.prototype.createBody=function(){},Sa),ba=((va=Mn)&&(Ca.__proto__=va),((Ca.prototype=Object.create(va&&va.prototype)).constructor=Ca).prototype.pointType=function(){return _a},Ca),ps=((ya=ae)&&(wa.__proto__=ya),((wa.prototype=Object.create(ya&&ya.prototype)).constructor=wa).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},wa.prototype.createVisual=function(){ya.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}});I(t),this.visual.append(t)},wa);function wa(t,e,o){ya.call(this),this.from=t,this.to=e,this.series=o}function Ca(){va.apply(this,arguments)}function Sa(){ma.apply(this,arguments)}i(ps,{animation:{type:"fadeIn",delay:600}});var ka,Aa,Pa=ps,Ta=((Aa=wn)&&(Ra.__proto__=Aa),((Ra.prototype=Object.create(Aa&&Aa.prototype)).constructor=Ra).prototype.render=function(){Aa.prototype.render.call(this),this.createSegments()},Ra.prototype.traverseDataPoints=function(l){for(var t=this.options.series,c=fr(t),u=!this.options.invertAxes,e=0;e<t.length;e++)for(var o=t[e],i=0,r=0,n=0;n<c;n++){var s=Ni.current.bindPoint(o,n),a=s.valueFields.value,d=s.fields.summary,h=i,p=void 0;d?"total"===d.toLowerCase()?(h=0,p=s.valueFields.value=i):(p=h-(s.valueFields.value=r),r=0):V(a)&&(r+=a,p=i+=a),l(s,{category:this.categoryAxis.categoryAt(n),categoryIx:n,series:o,seriesIx:e,total:i,runningTotal:r,from:h,to:p,isVertical:u})}},Ra.prototype.updateRange=function(t,e){Aa.prototype.updateRange.call(this,{value:e.to},e)},Ra.prototype.aboveAxis=function(t){return 0<=t.value},Ra.prototype.plotRange=function(t){return[t.from,t.to]},Ra.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 Pa(s,p,r),o.push(h),this.append(h)),s=p}}},Ra),Ma=["area","verticalArea","rangeArea","verticalRangeArea"],Oa=[$i,tr].concat(Ma),Er=((ka=Ds)&&(Ba.__proto__=ka),((Ba.prototype=Object.create(ka&&ka.prototype)).constructor=Ba).prototype.initFields=function(t){if(this.namedCategoryAxes={},this.namedValueAxes={},this.valueAxisRangeTracker=new tn,0<t.length){this.invertAxes=nt(t[0].type,[Qi,"bullet",tr,"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}}}},Ba.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)},Ba.prototype.removeAxis=function(t){var e=t.options.name;ka.prototype.removeAxis.call(this,t),t instanceof zo?delete this.namedCategoryAxes[e]:(this.valueAxisRangeTracker.reset(e),delete this.namedValueAxes[e]),t===this.categoryAxis&&delete this.categoryAxis,t===this.valueAxis&&delete this.valueAxis},Ba.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)}},Ba.prototype.createChartGroup=function(t,e){this.createAreaChart(As(t,["area","verticalArea"]),e),this.createRangeAreaChart(As(t,["rangeArea","verticalRangeArea"]),e),this.createBarChart(As(t,[Ki,Qi]),e),this.createRangeBarChart(As(t,["rangeColumn","rangeBar"]),e),this.createBulletChart(As(t,["bullet","verticalBullet"]),e),this.createCandlestickChart(As(t,"candlestick"),e),this.createBoxPlotChart(As(t,["boxPlot","verticalBoxPlot"]),e),this.createOHLCChart(As(t,"ohlc"),e),this.createWaterfallChart(As(t,["waterfall","horizontalWaterfall"]),e),this.createLineChart(As(t,[$i,tr]),e)},Ba.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=(ks(n.options.type,y)||r.categoryField)&&nt(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},Ba.prototype.filterSeries=function(e,o){var t=(e.data||{}).length;if(o._seriesMax=Math.max(o._seriesMax||0,t),!V(o.options.min)&&!V(o.options.max))return e;var i=o.currentRangeIndices(),r=nt(e.type,Oa),n=m({},e);return n.data=(n.data||[]).slice(i.min,i.max+1),r&&Es(n,i,t,function(t){return{item:e.data[t],category:o.categoryAt(t,!0),categoryIx:t-i.min}},function(t){return w(e.data[t])}),n},Ba.prototype.clearSeriesPointsCache=function(){this._seriesPointsCache={}},Ba.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=ks(i.type,y),n=t.data,l=i?Ps:ji,s=[];i||e.mapCategories();for(var a=0;a<n.length;a++){var h,p=t.categoryField?l(t.categoryField,n[a],this.chartService.intl):r[a];w(p)&&null!==p&&(s[h=e.totalIndex(p)]=s[h]||{items:[],category:p},s[h].items.push(a))}return this._currentPointsCache[o]=s},Ba.prototype.aggregateSeries=function(t,i){if(!t.data.length)return t;for(var r=this.seriesSourcePoints(t,i),e=m({},t),n=new Ns(m({},t),Ni.current,qs.current),l=e.data=[],o=i.options.dataItems||[],s=i.currentRangeIndices(),a=function(t){var e=t-s.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=s.min;h<=s.max;h++){var p=a(h);l[p.categoryIx]=p.item,p.items&&p.items.length&&(o[p.categoryIx]=p.item)}return nt(e.type,Oa)&&Es(e,s,i.totalCount(),a,function(t){return r[t]}),i.options.dataItems=o,e},Ba.prototype.appendChart=function(t,e){var o=t.options.series,i=this.seriesCategoryAxis(o[0]),r=i.options.categories,n=Math.max(0,fr(o)-r.length);if(0<n)for(r=i.options.categories=i.options.categories.slice(0);n--;)r.push("");this.valueAxisRangeTracker.update(t.valueAxisRanges),ka.prototype.appendChart.call(this,t,e)},Ba.prototype.seriesPaneName=function(t){var e=this.options,o=t.axis,t=et([].concat(e.valueAxis),function(t){return t.name===o})[0],e=((e.panes||[{}])[0]||{}).name||"default";return(t||{}).pane||e},Ba.prototype.seriesCategoryAxis=function(t){var t=t.categoryAxis,e=t?this.namedCategoryAxes[t]:this.categoryAxis;if(!e)throw new Error("Unable to locate category axis with name "+t);return e},Ba.prototype.stackableChartOptions=function(t,e){t=t.stack;return{isStacked:t,isStacked100:t&&"100%"===t.type,clip:e.options.clip}},Ba.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 et(t,function(t){return 0===o&&!t.categoryAxis||t.categoryAxis===e})}(t,e[s],s);0!==a.length&&n.push(a)}return n},Ba.prototype.createBarChart=function(t,e){var o;0!==t.length&&(o=t[0],t=new wn(this,Object.assign({series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing},this.stackableChartOptions(o,e))),this.appendChart(t,e))},Ba.prototype.createRangeBarChart=function(t,e){var o;0!==t.length&&(o=t[0],t=new ta(this,{series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing}),this.appendChart(t,e))},Ba.prototype.createBulletChart=function(t,e){var o;0!==t.length&&(o=t[0],t=new ss(this,{series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing,clip:e.options.clip}),this.appendChart(t,e))},Ba.prototype.createLineChart=function(t,e){var o;0!==t.length&&(o=t[0],t=new Nr(this,Object.assign({invertAxes:this.invertAxes,series:t},this.stackableChartOptions(o,e))),this.appendChart(t,e))},Ba.prototype.createAreaChart=function(t,e){var o;0!==t.length&&(o=t[0],t=new Jr(this,Object.assign({invertAxes:this.invertAxes,series:t},this.stackableChartOptions(o,e))),this.appendChart(t,e))},Ba.prototype.createRangeAreaChart=function(t,e){0!==t.length&&(t=new xa(this,{invertAxes:this.invertAxes,series:t,clip:e.options.clip}),this.appendChart(t,e))},Ba.prototype.createOHLCChart=function(t,e){var o;0!==t.length&&(o=t[0],t=new ba(this,{invertAxes:this.invertAxes,gap:o.gap,series:t,spacing:o.spacing,clip:e.options.clip}),this.appendChart(t,e))},Ba.prototype.createCandlestickChart=function(t,e){var o;0!==t.length&&(o=t[0],t=new Mn(this,{invertAxes:this.invertAxes,gap:o.gap,series:t,spacing:o.spacing,clip:e.options.clip}),this.appendChart(t,e))},Ba.prototype.createBoxPlotChart=function(t,e){var o;0!==t.length&&(o=t[0],t=new zn(this,{invertAxes:this.invertAxes,gap:o.gap,series:t,spacing:o.spacing,clip:e.options.clip}),this.appendChart(t,e))},Ba.prototype.createWaterfallChart=function(t,e){var o;0!==t.length&&(o=t[0],t=new Ta(this,{series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing}),this.appendChart(t,e))},Ba.prototype.axisRequiresRounding=function(t,e){for(var o=As(this.series,er),i=0;i<this.series.length;i++){var r,n=this.series[i];!nt(n.type,Ma)||(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}},Ba.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}},Ba.prototype.createCategoryAxesLabels=function(){for(var t=this.axes,e=0;e<t.length;e++)t[e]instanceof zo&&t[e].createLabels()},Ba.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(nt(this.findPane(n.pane),t)){var s=n.name,a=n.categories,h=(void 0===a&&(a=[]),n=m({vertical:e,reverse:!e&&this.chartService.rtl,axisCrossingValue:e?c:0},n),w(n.justified)||(n.justified=this.isJustified()),this.axisRequiresRounding(s,r)&&(n.justified=!1),void 0),h=new(Ts(n,a[0])?Xo:zo)(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},Ba.prototype.isJustified=function(){for(var t=this.series,e=0;e<t.length;e++)if(!nt(t[e].type,Ma))return!1;return!0},Ba.prototype.createValueAxes=function(l){var t=this.valueAxisRangeTracker,e=t.query(),o=[].concat(this.options.valueAxis),i=this.invertAxes,r={vertical:!i,reverse:i&&this.chartService.rtl},c=[];this.stack100&&(r.roundToMajorUnit=!1,r.labels={format:"P0"});for(var n=0;n<o.length;n++){var s=o[n];if(nt(this.findPane(s.pane),l)){var a=s.name,h=ks(s.type,"log")?{min:.1,max:1}:{min:0,max:1},h=t.query(a)||e||h,h=(0===n&&h&&e&&(h.min=Math.min(h.min,e.min),h.max=Math.max(h.max,e.max)),new(ks(s.type,"log")?pi:ei)(h.min,h.max,m({},r,s),this.chartService));if(a){if(this.namedValueAxes[a])throw new Error("Value axis with name "+a+" is already defined");this.namedValueAxes[a]=h}h.axisIndex=n,c.push(h),this.appendAxis(h)}}var p=this.valueAxis||c[0];this.valueAxis=p,i?this.axisX=p:this.axisY=p},Ba.prototype._dispatchEvent=function(t,e,o){var i=t._eventCoordinates(e),r=new Nt(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?ws(s,p.getValue(r)):ws(n,p.getCategory(r))}0===n.length&&ws(n,this.categoryAxis.getCategory(r)),0<n.length&&0<s.length&&t.trigger(o,{element:xt(e),originalEvent:e,category:Ms(n),value:Ms(s)})}},Ba.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}},Ba.prototype.updateAxisOptions=function(t,e){Ea(this.options,t,e),Ea(this.originalOptions,t,e)},Ba);function Ba(){ka.apply(this,arguments)}function Ra(){Aa.apply(this,arguments)}function Ea(t,e,o){m([].concat(e instanceof zo?t.categoryAxis:t.valueAxis)[e.axisIndex],o)}i(Er,{categoryAxis:{},valueAxis:{}}),m(Er.prototype,Hs);var La=Er;function Ia(){this._defaultPrevented=!0}(za=b.Class)&&(ja.__proto__=za),((ja.prototype=Object.create(za&&za.prototype)).constructor=ja).prototype.destroy=function(){this._points=[]},ja.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))}},ja.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:Ia,visual:t.highlightVisual(),show:e}),i._defaultPrevented||t.toggleHighlight(e,o)):t.toggleHighlight(e,o)},ja.prototype.hide=function(){for(var t=this._points;t.length;)this.togglePointHighlight(t.pop(),!1)},ja.prototype.isHighlighted=function(t){for(var e=this._points,o=0;o<e.length;o++)if(t===e[o])return!0;return!1};var za,Va=ja;function ja(){za.call(this),this._points=[]}function Da(t,e){e=(e||"").toLowerCase(),t=t.event;return"none"===e&&!(t.ctrlKey||t.shiftKey||t.altKey)||t[e+"Key"]}function Ha(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}(Ua=b.Class)&&(Fa.__proto__=Ua),((Fa.prototype=Object.create(Ua&&Ua.prototype)).constructor=Fa).prototype.start=function(t){return this._active=Da(t,this.options.key),this._active},Fa.prototype.move=function(t){if(this._active){t=this.axisRanges=this._panAxes(t,_).concat(this._panAxes(t,O));if(t.length)return Ha(this.axisRanges=t)}},Fa.prototype.end=function(){var t=this._active;return this._active=!1,t},Fa.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)}},Fa.prototype.destroy=function(){delete this.plotArea},Fa.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===_&&!h.options.vertical||e===O&&h.options.vertical)||(a=h.pan(i))&&(a.limitRange=!0,r.push({axis:h,range:a}))}return r};var Ua,Go=Fa;function Fa(t,e){Ua.call(this),this.plotArea=t,this.options=m({},this.options,e)}Go.prototype.options={key:"none",lock:"none"};var Na,Ga=Go,ps=((Na=b.Class)&&(Wa.__proto__=Na),((Wa.prototype=Object.create(Na&&Na.prototype)).constructor=Wa).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)},Wa.prototype.removeElement=function(){this._marquee.parentNode&&this._marquee.parentNode.removeChild(this._marquee)},Wa.prototype.setStyles=function(t){X(this._marquee,t)},Wa.prototype.start=function(t){if(Da(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},Wa.prototype._elementOffset=function(){var t=this.chart.element,e=X(t,["paddingLeft","paddingTop"]),o=e.paddingLeft,e=e.paddingTop,t=yt(t);return{left:o+t.left,top:e+t.top}},Wa.prototype.move=function(t){this._zoomPane&&this.setStyles(this._selectionPosition(t))},Wa.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,Ha(this.axisRanges)},Wa.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)}},Wa.prototype.destroy=function(){this.removeElement(),delete this._marquee,delete this.chart},Wa.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===_&&!a||o===O&&a||!w(s.axisIndex)||(a=s.pointsRange(t,e))&&i.push({axis:s,range:a})}this.axisRanges=i},Wa.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===_&&(n=e.x1,a=e.width()),r===O&&(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}},Wa);function Wa(t,e){Na.call(this),this.chart=t,this.options=m({},this.options,e),this.createElement()}ps.prototype.options={key:"shift",lock:"none"};var Xa,qa,Ya,Za,Qa=ps,Ka=((Za=b.Class)&&(rh.__proto__=Za),((rh.prototype=Object.create(Za&&Za.prototype)).constructor=rh).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===_&&!a||o===O&&a||!s.zoomRange||(a=wt(this.options.rate,.01,.9),(a=s.zoomRange(-t*a,e))&&i.push({axis:s,range:a}))}return Ha(this.axisRanges=i)},rh.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)}},rh.prototype.destroy=function(){delete this.chart},rh),$a=((Ya=ae)&&(ih.__proto__=Ya),((ih.prototype=Object.create(Ya&&Ya.prototype)).constructor=ih).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 C),r.renderVisual()}},ih.prototype.reflow=function(t){this.visual.rect(t.toRect()),this.visual.reflow();t=this.visual.clippedBBox();this.box=t?Se(t):new C},ih.prototype.renderVisual=function(){this.addVisual()},ih.prototype.createVisual=function(){},ih),Ja=((qa=le)&&(oh.__proto__=qa),((oh.prototype=Object.create(qa&&qa.prototype)).constructor=oh).prototype.createContainer=function(){this.container=new _e({vertical:!1,wrap:!1,align:A,spacing:this.options.spacing}),this.append(this.container)},oh.prototype.createMarker=function(){this.container.append(new ue(this.markerOptions()))},oh.prototype.markerOptions=function(){var t=this.options,e=t.markerColor;return m({},t.markers,{background:e,border:{color:e}})},oh.prototype.createLabel=function(){var t=this.options,e=m({},t.labels);this.container.append(new Te(t.text,e))},oh.prototype.renderComplete=function(){qa.prototype.renderComplete.call(this);var t=this.options.cursor||{},t=this._itemOverlay=b.drawing.Path.fromRect(this.container.box.toRect(),{fill:{color:x,opacity:0},stroke:null,cursor:t.style||t});this.appendVisual(t)},oh.prototype.click=function(t,e){var o=this.eventArgs(e);!t.trigger("legendItemClick",o)&&e&&"contextmenu"===e.type&&e.preventDefault()},oh.prototype.over=function(t,e){e=this.eventArgs(e);return t.trigger("legendItemHover",e)||t._legendItemHover(e.seriesIndex,e.pointIndex),!0},oh.prototype.out=function(t,e){t._unsetActivePoint(),t.trigger("legendItemLeave",this.eventArgs(e))},oh.prototype.eventArgs=function(t){var e=this.options;return{element:xt(t),text:e.text,series:e.series,seriesIndex:e.series.index,pointIndex:e.pointIndex}},oh.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()):qa.prototype.renderVisual.call(this)},oh),th="custom",Er=((Xa=ae)&&(eh.__proto__=Xa),((eh.prototype=Object.create(Xa&&Xa.prototype)).constructor=eh).prototype.createContainers=function(){var t=this.options,e=t.position,o=t.align,i=e,r=A;e===th?i=P:nt(e,[M,S])?(i="start"===o?P:"end"===o?T:A,r=e):o&&("start"===o?r=M:"end"===o&&(r=S)),this.container=new le({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 le({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 $a({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 Ja(m({},{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&&"horizontal"!==e||(w(e)?"horizontal"!==e:nt(t,[P,T]))},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 C(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===M||i===S?_:O,a=this.isVertical(),h=t.clone(),p=t.clone(),i=(i!==P&&i!==T||(p.y1=h.y1=0),a&&n?(p.y2=p.y1+n,p.align(h,O,o.options.vAlign)):!a&&r&&(p.x2=p.x1+r,p.align(h,_,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},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 C(i,r,i+t.width(),r+t.height()))},eh.prototype.renderVisual=function(){this.hasItems()&&Xa.prototype.renderVisual.call(this)},eh.prototype.createLegendTitle=function(t){var e=m({},{color:a,position:M,align:A},t),o=e.text;t&&!1!==t.visible&&(w(e)&&e.visible&&((t=K(e))?o=t({text:o}):e.format&&(o=this.chartService.format.auto(e.format,o))),this.title=new Te(o,e),this.createTitleLayout(),this.appendTitleLayoutContent())},eh.prototype.createTitleLayout=function(){this.layout=new _e({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===S?(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={}),Xa.call(this,t),this.chartService=e,nt(this.options.position,[M,T,S,P,th])||(this.options.position=T),this.createContainers(),this.createLegendTitle(t.title),this.createItems()}function oh(t){qa.call(this,t),this.createContainer(),t.rtl?(this.createLabel(),this.createMarker()):(this.createMarker(),this.createLabel())}function ih(t,e){Ya.call(this,t),this.chartService=e}function rh(t,e){Za.call(this),this.chart=t,this.options=m({rate:.3},this.options,e)}i(Er,{position:T,items:[],offsetX:0,offsetY:0,margin:q(5),padding:q(5),border:{color:a,width:0},item:{cursor:"pointer",spacing:6},spacing:6,background:"",zIndex:1,markers:{border:{width:0},width:15,height:3,type:"rect",align:P,vAlign:A}});var nh,sh=Er,Go=((nh=b.Class)&&(ah.__proto__=nh),((ah.prototype=Object.create(nh&&nh.prototype)).constructor=ah).prototype.register=function(t,e){this._registry.push({type:t,seriesTypes:e})},ah.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=As(t,a.seriesTypes)).length){n=a;break}}return new n.type(i,e,o)},ah);function ah(){nh.call(this),this._registry=[]}Go.current=new Go;var hh=Go;function ph(t){var e=document.createElement("div");return t&&(e.className=t),e}function lh(t){for(var e=t;e&&!ot(e,"k-handle");)e=e.parentNode;return e}(ch=b.Class)&&(uh.__proto__=ch),((uh.prototype=Object.create(ch&&ch.prototype)).constructor=uh).prototype.onPane=function(t){return this.categoryAxis.pane===t},uh.prototype.createElements=function(){var t=this.options,e=this.wrapper=ph("k-selector"),o=(X(e,{top:t.offset.top,left:t.offset.left,width:t.width,height:t.height,direction:"ltr"}),this.selection=ph("k-selection")),i=(this.leftMask=ph("k-mask"),this.rightMask=ph("k-mask"),e.appendChild(this.leftMask),e.appendChild(this.rightMask),e.appendChild(o),o.appendChild(ph("k-selection-bg")),this.leftHandle=ph("k-handle k-left-handle")),r=this.rightHandle=ph("k-handle k-right-handle"),o=(i.appendChild(ph()),r.appendChild(ph()),o.appendChild(i),o.appendChild(r),this.chartElement.appendChild(e),X(o,["borderLeftWidth","borderRightWidth","height"])),n=X(i,"height").height,s=X(r,"height").height;t.selection={border:{left:o.borderLeftWidth,right:o.borderRightWidth}},X(i,{top:(o.height-n)/2}),X(r,{top:(o.height-s)/2}),e.style.cssText=e.style.cssText},uh.prototype.bindEvents=function(){var t;!1!==this.options.mousewheel&&(this._mousewheelHandler=this._mousewheel.bind(this),ft(this.wrapper,((t={})[sr]=this._mousewheelHandler,t))),this._domEvents=Ye.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)})},uh.prototype.initOptions=function(){var t=this.options,e=this.categoryAxis.pane.chartsBox(),o=this.chart.chartService.intl,o=(this._dateAxis&&m(t,{min:Bo(o,t.min),max:Bo(o,t.max),from:Bo(o,t.from),to:Bo(o,t.to)}),X(this.chartElement,["paddingLeft","paddingTop"])),i=o.paddingLeft,o=o.paddingTop;this.options=m({},{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)},uh.prototype.destroy=function(){var t;this._domEvents&&(this._domEvents.destroy(),delete this._domEvents),clearTimeout(this._mwTimeout),this._state=null,this.wrapper&&(this._mousewheelHandler&&(kt(this.wrapper,((t={})[sr]=this._mousewheelHandler,t)),this._mousewheelHandler=null),this.chartElement.removeChild(this.wrapper),this.wrapper=null)},uh.prototype._rangeEventArgs=function(t){return{axis:this.categoryAxis.options,from:this._value(t.from),to:this._value(t.to)}},uh.prototype._start=function(t){var e=this.options,o=xt(t);!this._state&&o&&(this.chart._unsetActivePoint(),this._state={moveTarget:lh(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))},uh.prototype._press=function(t){(t=this._state?this._state.moveTarget:lh(xt(t)))&&R(t,"k-handle-active")},uh.prototype._move=function(t){var e,o,i,r,l,n,s,c,a,h,p,u;this._state&&(h=this._state,s=this.options,p=this.categoryAxis,e=h.range,o=h.moveTarget,i=p.options.reverse,r=this._index(s.from),l=this._index(s.to),n=this._index(s.min),s=this._index(s.max),h=h.startLocation-t.x.location,t=e.from,c=e.to,a=e.to-e.from,p=X(this.wrapper,"width").width/(p.categoriesCount()-1),h=Math.round(h/p)*(i?-1:1),o&&(p=ot(o,"k-left-handle"),u=ot(o,"k-right-handle"),ot(o,"k-selection k-selection-bg")?(e.from=Math.min(Math.max(n,r-h),s-a),e.to=Math.min(e.from+a,s)):p&&!i||u&&i?(e.from=Math.min(Math.max(n,r-h),s-1),e.to=Math.max(e.from+1,e.to)):(p&&i||u&&!i)&&(e.to=Math.min(Math.max(n+1,l-h),s),e.from=Math.min(e.to-1,e.from)),e.from===t&&e.to===c||(this.move(e.from,e.to),this.trigger("select",this._rangeEventArgs(e)))))},uh.prototype._end=function(){var t;this._state&&((t=this._state.moveTarget)&&L(t,"k-handle-active"),t=this._state.range,this.set(t.from,t.to),this.trigger("selectEnd",this._rangeEventArgs(t)),delete this._state)},uh.prototype._tap=function(t){var e=this.options,o=this.categoryAxis,i=this.chart._eventCoordinates(t),i=o.pointCategoryIndex(new Nt(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()))},uh.prototype._mousewheel=function(t){var e,o=this,i=ct(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))},uh.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()},uh.prototype._gestureend=function(){this._state&&(this.trigger("selectEnd",this._rangeEventArgs(this._state.range)),delete this._state)},uh.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 Nt(s))||i.min,o.to=r.pointCategoryIndex(new Nt(n))||i.max,this.move(o.from,o.to),this.trigger("select",this._rangeEventArgs(o))},uh.prototype._index=function(t){var e=t;return e=t instanceof Date?this.categoryAxis.categoryIndex(t):e},uh.prototype._value=function(t){var e=t;return e=this._dateAxis&&(e=this.categoryAxis.categoryAt(t))>this.options.max?this.options.max:e},uh.prototype._slot=function(t){var e=this.categoryAxis,t=this._index(t);return e.getSlot(t,t,!0)},uh.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=k(i[h]-r.left+n.left),t=(X(this.leftMask,{width:e}),X(this.selection,{left:e}),i=this._slot(a),k(o.width-(i[h]-r.left+n.left))),a=(X(this.rightMask,{width:t}),o.width-t);a!==o.width&&(a+=s.right),X(this.rightMask,{left:a}),X(this.selection,{width:Math.max(o.width-(e+t)-s.right,0)})},uh.prototype.set=function(t,e){var o=this.options,i=this._index(o.min),r=this._index(o.max),t=wt(this._index(t),i,r),i=wt(this._index(e),t+1,r);o.visible&&this.move(t,i),o.from=this._value(t),o.to=this._value(i)},uh.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=m({},s);if(this._state&&(s=this._state.range),r!==T&&(s.from=wt(wt(n-t,0,e-1),o,i)),r!==P&&(s.to=wt(wt(e+t,s.from+1,i),o,i)),s.from!==a.from||s.to!==a.to)return this.set(s.from,s.to),!0},uh.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=m({},s),h=this.categoryAxis.options.reverse,h=_+(h?"2":"1"),p=this.categoryAxis.lineBox(),h=Math.abs(p[h]-e.x),e=p.width(),p=k(h/e,2),h=k(p*t),e=k((1-p)*t);if((s=this._state?this._state.range:s).from=wt(wt(n-h,0,o-1),i,r),s.to=wt(wt(o+e,s.from+1,r),i,r),s.from!==a.from||s.to!==a.to)return this.set(s.from,s.to),!0},uh.prototype.trigger=function(t,e){return(this.observer||this.chart).trigger(t,e)};var ch,ps=uh;function uh(t,e,o,i){ch.call(this);var r=t.element;this.options=m({},this.options,o),this.chart=t,this.observer=i,this.chartElement=r,this.categoryAxis=e,this._dateAxis=this.categoryAxis instanceof Xo,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(ps,{visible:!0,mousewheel:{zoom:"both"},min:l,max:c});var dh,fh,gh=ps,yh=((fh=Dr)&&(mh.__proto__=fh),((mh.prototype=Object.create(fh&&fh.prototype)).constructor=mh).prototype.show=function(t){var e,o;!t||!t.tooltipAnchor||this._current&&this._current===t||(e=m({},this.options,t.options.tooltip),(o=t.tooltipAnchor())?(this._current=t,fh.prototype.show.call(this,{point:t,anchor:o},e,t)):this.hide())},mh.prototype.hide=function(){delete this._current,fh.prototype.hide.call(this)},mh),Er=((dh=Dr)&&(vh.__proto__=dh),((vh.prototype=Object.create(dh&&dh.prototype)).constructor=vh).prototype.showAt=function(t,e){var o,i=et(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))},vh.prototype._slotAnchor=function(t,e){return this.plotArea.categoryAxis.options.vertical||(t.x=e.center().x),{point:t,align:{horizontal:"left",vertical:"center"}}},vh.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 Nt(t.x,e.y):new Nt(e.x,t.y),align:{horizontal:"center",vertical:"center"}}},vh);function vh(t,e){dh.call(this,t.chartService,e),this.plotArea=t,this.formatService=t.chartService.format}function mh(){fh.apply(this,arguments)}i(Er,{categoryFormat:"{0:d}"});var xh,_h=Er,Go=((xh=b.drawing.Animation)&&(bh.__proto__=xh),((bh.prototype=Object.create(xh&&xh.prototype)).constructor=bh).prototype.setup=function(){var t,e=this.element,o=this.options;e.bbox()?(this.origin=o.origin,o=o.vertical?O:_,(t=this.fromScale=new b.geometry.Point(1,1))[o]=qi,e.transform(b.geometry.transform().scale(t.x,t.y))):this.abort()},bh.prototype.step=function(t){var e=st(this.fromScale.x,1,t),t=st(this.fromScale.y,1,t);this.element.transform(b.geometry.transform().scale(e,t,this.origin))},bh.prototype.abort=function(){xh.prototype.abort.call(this),this.element.transform(null)},bh);function bh(){xh.apply(this,arguments)}i(Go,{duration:600}),b.drawing.AnimationFactory.current.register(Qi,Go);(wh=b.drawing.Animation)&&(Ch.__proto__=wh),((Ch.prototype=Object.create(wh&&wh.prototype)).constructor=Ch).prototype.setup=function(){var t=this.center=this.element.bbox().center();this.element.transform(b.geometry.transform().scale(qi,qi,t))},Ch.prototype.step=function(t){this.element.transform(b.geometry.transform().scale(t,t,this.center))};var wh,ps=Ch;function Ch(){wh.apply(this,arguments)}i(ps,{easing:"easeOutElastic"}),b.drawing.AnimationFactory.current.register("bubble",ps);(Sh=b.drawing.Animation)&&(kh.__proto__=Sh),((kh.prototype=Object.create(Sh&&Sh.prototype)).constructor=kh).prototype.setup=function(){this.fadeTo=this.element.opacity(),this.element.opacity(0)},kh.prototype.step=function(t){this.element.opacity(t*this.fadeTo)};var Sh,Dr=kh;function kh(){Sh.apply(this,arguments)}i(Dr,{duration:200,easing:"linear"}),b.drawing.AnimationFactory.current.register("fadeIn",Dr);(Ah=b.drawing.Animation)&&(Ph.__proto__=Ah),((Ph.prototype=Object.create(Ah&&Ah.prototype)).constructor=Ph).prototype.setup=function(){this.element.transform(b.geometry.transform().scale(qi,qi,this.options.center))},Ph.prototype.step=function(t){this.element.transform(b.geometry.transform().scale(t,t,this.options.center))};var Ah,Er=Ph;function Ph(){Ah.apply(this,arguments)}i(Er,{easing:"easeOutElastic",duration:600}),b.drawing.AnimationFactory.current.register(Ji,Er);var Th,Mh=Er,Go=((Th=Wn)&&(Oh.__proto__=Th),((Oh.prototype=Object.create(Th&&Th.prototype)).constructor=Oh).prototype.render=function(){Th.prototype.render.call(this),this.renderSegments()},Oh.prototype.createSegment=function(t,e,o){return new("smooth"===e.style?Rr:Sr)(t,e,o)},Oh.prototype.animationPoints=function(){return Th.prototype.animationPoints.call(this).concat(this._segments)},Oh.prototype.createMissingValue=function(t,e){if(e===Yi)return Un((e={x:t.x,y:t.y}).x)||(e.x=0),Un(e.y)||(e.y=0),e},Oh);function Oh(){Th.apply(this,arguments)}m(Go.prototype,Pr);var Bh,Rh=Go,ps=((Bh=Ds)&&(Eh.__proto__=Bh),((Eh.prototype=Object.create(Bh&&Bh.prototype)).constructor=Eh).prototype.initFields=function(){this.namedXAxes={},this.namedYAxes={},this.xAxisRangeTracker=new tn,this.yAxisRangeTracker=new tn},Eh.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(As(r,"scatter"),i),this.createScatterLineChart(As(r,"scatterLine"),i),this.createBubbleChart(As(r,"bubble"),i))}this.createAxes(t)},Eh.prototype.appendChart=function(t,e){this.xAxisRangeTracker.update(t.xAxisRanges),this.yAxisRangeTracker.update(t.yAxisRanges),Bh.prototype.appendChart.call(this,t,e)},Eh.prototype.removeAxis=function(t){var e=t.options.name;Bh.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},Eh.prototype.seriesPaneName=function(t){var e=this.options,o=t.xAxis,i=et([].concat(e.xAxis),function(t){return t.name===o})[0],r=t.yAxis,t=et([].concat(e.yAxis),function(t){return t.name===r})[0],e=(e.panes||[{}])[0].name||"default";return(i||{}).pane||(t||{}).pane||e},Eh.prototype.createScatterChart=function(t,e){0<t.length&&this.appendChart(new Wn(this,{series:t,clip:e.options.clip}),e)},Eh.prototype.createScatterLineChart=function(t,e){0<t.length&&this.appendChart(new Rh(this,{series:t,clip:e.options.clip}),e)},Eh.prototype.createBubbleChart=function(t,e){0<t.length&&this.appendChart(new Kn(this,{series:t,clip:e.options.clip}),e)},Eh.prototype.createXYAxis=function(t,e,o){for(var l,i=t.name,c=e?this.namedYAxes:this.namedXAxes,r=e?this.yAxisRangeTracker:this.xAxisRangeTracker,n=m({reverse:!e&&this.chartService.rtl},t,{vertical:e}),t=ks(n.type,"log"),s=r.query(),a=t?{min:.1,max:1}:{min:0,max:1},r=r.query(i)||s||a,h=[n.min,n.max],u=this.series,d=0;d<u.length;d++){var f=u[d],p=f[e?"yAxis":"xAxis"];if(p===n.name||0===o&&!p){p=Ni.current.bindPoint(f,0).valueFields;h.push(p[e?"y":"x"]);break}}0===o&&s&&(r.min=Math.min(r.min,s.min),r.max=Math.max(r.max,s.max));for(var g=0;g<h.length;g++)if(h[g]instanceof Date){l=!0;break}a=new(ks(n.type,y)||!n.type&&l?ri:t?pi:ei)(r.min,r.max,n,this.chartService);if(a.axisIndex=o,i){if(c[i])throw new Error((e?"Y":"X")+" axis with name "+i+" is already defined");c[i]=a}return this.appendAxis(a),a},Eh.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++)nt(this.findPane(o[s].pane),t)&&i.push(this.createXYAxis(o[s],!1,s));for(var a=0;a<r.length;a++)nt(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]},Eh.prototype._dispatchEvent=function(t,e,o){for(var i=t._eventCoordinates(e),r=new Nt(i.x,i.y),n=this.axes,l=n.length,s=[],a=[],h=0;h<l;h++){var p=n[h],c=p.options.vertical?a:s,p=p.getValue(r);null!==p&&c.push(p)}0<s.length&&0<a.length&&t.trigger(o,{element:xt(e),originalEvent:e,x:Ms(s),y:Ms(a)})},Eh.prototype.updateAxisOptions=function(t,e){var o=t.options.vertical,i=this.groupAxes(this.panes),i=(o?i.y:i.x).indexOf(t);Lh(this.options,i,o,e),Lh(this.originalOptions,i,o,e)},Eh);function Eh(){Bh.apply(this,arguments)}function Lh(t,e,o,i){m([].concat(o?t.yAxis:t.xAxis)[e],i)}i(ps,{xAxis:{},yAxis:{}}),m(ps.prototype,Hs);var Ih,zh=ps,Dr=((Ih=ae)&&(Dh.__proto__=Ih),((Dh.prototype=Object.create(Ih&&Ih.prototype)).constructor=Dh).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=K(o),t=this.pointData(),e?r=e(t):o.format&&(r=i.format.auto(o.format,r)),o.visible&&(r||0===r)&&(o.position===A||"insideEnd"===o.position?(o.color||(o.color=Lt(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 Te(r,m({},o,{align:A,vAlign:"",animation:{type:"fadeIn",delay:this.animationDelay}}),t),this.append(this.label)))},Dh.prototype.reflow=function(t){this.render(),this.box=t,this.reflowLabel()},Dh.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===A?(s.radius=Math.abs((s.radius-e)/2)+e,t=s.point(h),n.reflow(new C(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 C(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=T):(i=t.x-o,n.orientation=P),n.reflow(new C(i,t.y-e,t.x,t.y))))},Dh.prototype.createVisual=function(){var t,e=this,o=this.sector,i=this.options;Ih.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))},Dh.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,m({fill:n,stroke:{opacity:o.opacity},zIndex:o.zIndex},i));t.append(i),an(o)&&t.append(this.createGradientOverlay(i,{baseColor:r,fallbackFill:n},m({center:[e.center.x,e.center.y],innerRadius:e.innerRadius,radius:e.radius,userSpace:!0},o.overlay)))},Dh.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):re.current.createRing(t,e)},Dh.prototype.createAnimation=function(){var t=this.options,e=this.sector.center;m(t,{animation:{center:[e.x,e.y],delay:this.animationDelay}}),Ih.prototype.createAnimation.call(this)},Dh.prototype.createHighlight=function(t){var e=this.options.highlight||{},o=e.border||{};return this.createSegment(this.sector,m({},t,{fill:{color:e.color,opacity:e.opacity},stroke:{opacity:o.opacity,width:o.width,color:o.color}}))},Dh.prototype.highlightVisual=function(){return this.visual.children[0]},Dh.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}},Dh.prototype.tooltipAnchor=function(){var t=this.sector.clone().expand(5),e=t.middle();return{point:t.point(e),align:(t=St(e+180),e=k(Math.sin(t),g),t=k(Math.cos(t),g),{horizontal:Math.abs(e)>jh?A:t<0?T:P,vertical:Math.abs(e)<Vh?A:e<0?S:M})}},Dh.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Dh.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,series:this.series,percentage:this.percentage}},Dh),Vh=k(St(30),g),jh=k(St(60),g);function Dh(t,e,o){Ih.call(this,o),this.value=t,this.sector=e}i(Dr,{color:x,overlay:{gradient:"roundedBevel"},border:{width:.5},labels:{visible:!1,distance:35,font:"12px sans-serif",margin:q(.5),align:u,zIndex:1,position:"outsideEnd"},animation:{type:Ji},highlight:{visible:!0,border:{width:1}},visible:!0}),m(Dr.prototype,xr);var Hh,Uh=Dr,Fh={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)&&K(h)||K(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),Un(n)&&""!==n&&this.legendItems.push({active:r,pointIndex:o.index,text:n,series:o.series,markerColor:a,labels:i}))}},Er=((Hh=ae)&&(Nh.__proto__=Hh),((Nh.prototype=Object.create(Hh&&Hh.prototype)).constructor=Nh).prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},Nh.prototype.traverseDataPoints=function(l){for(var c=this.options,t=this.plotArea.options.seriesColors,u=(t=void 0===t?[]:t).length,d=c.series,e=d.length,o=0;o<e;o++){var i=d[o],f=i.data,r=Ss(i),n=r.total,g=r.points,r=r.count,y=360/n,v=void 0,m=(isFinite(y)||(v=360/r),void 0),m=(w(i.startAngle)?i:c).startAngle;o!==e-1&&"outsideEnd"===i.labels.position&&(i.labels.position=A);for(var s=0;s<g.length;s++){var a,h,x,_,b,p=g[s];p&&(a=p.fields,h=p.value,x=p.visible,_=0!==h?v||h*y:0,b=1!==f.length&&Boolean(a.explode),H(i.color)||(i.color=a.color||t[s%u]),l(p.valueFields.value,new $t(null,0,0,m,_),{owner:this,category:w(a.category)?a.category:"",index:s,series:i,seriesIx:o,dataItem:f[s],percentage:0!==n?h/n:0,explode:b,visibleInLegend:a.visibleInLegend,visible:x,zIndex:e-o,animationDelay:this.animationDelay(s,o,e)}),!1!==x&&(m+=_))}}},Nh.prototype.evalSegmentOptions=function(t,e,o){var i=o.series;dr(t,{value:e,series:i,dataItem:o.dataItem,category:o.category,percentage:o.percentage},{defaults:i._defaults,excluded:["data","content","template","visual","toggle"]})},Nh.prototype.addValue=function(t,e,o){var i=m({},o.series,{index:o.index});this.evalSegmentOptions(i,t,o),this.createLegendItem(t,i,o),!1!==o.visible&&(t=new Uh(t,e,i),Object.assign(t,o),this.append(t),this.points.push(t))},Nh.prototype.reflow=function(l){var t=this.options,c=this.points,e=this.seriesConfigs,u=(void 0===e&&(e=[]),c.length),o=l.clone(),i=Math.min(o.width(),o.height()),d=i/2,f=i-.85*i,r=new C(o.x1,o.y1,o.x1+i,o.y1+i),i=r.center(),o=o.center(),g=t.series.length,n=[],s=[],t=At(t.padding,f);this.targetBox=l,t=d-5<t?d-5:t,r.translate(o.x-i.x,o.y-i.y);for(var y=d-t,v=new Nt(y+r.x1+t,y+r.y1+t),m=0;m<u;m++){var a=c[m],h=a.sector,x=a.seriesIx,p=(h.radius=y,h.center=v,e.length&&(p=e[x],h.innerRadius=p.innerRadius,h.radius=p.radius),x===g-1&&a.explode&&(h.center=h.clone().setRadius(.15*h.radius).point(h.middle())),a.reflow(r),a.label);p&&"outsideEnd"===p.options.position&&x===g-1&&(p.orientation===T?s:n).push(p)}0<n.length&&(n.sort(this.labelComparator(!0)),this.leftLabelsReflow(n)),0<s.length&&(s.sort(this.labelComparator(!1)),this.rightLabelsReflow(s)),this.box=r},Nh.prototype.leftLabelsReflow=function(t){var e=this.distanceBetweenLabels(t);this.distributeLabels(e,t)},Nh.prototype.rightLabelsReflow=function(t){var e=this.distanceBetweenLabels(t);this.distributeLabels(e,t)},Nh.prototype.distanceBetweenLabels=function(t){var e=bt(this.points),o=e.sector,i=t.length-1,e=o.radius+e.options.labels.distance,r=[],n=t[0].box,s=k(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=k(h.y1-n.y2);r.push(s)}return s=k(o.center.y+e-t[i].box.y2-t[i].box.height()/2),r.push(s),r},Nh.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)},Nh.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},Nh.prototype.reflowLabels=function(t,e){var o,l=bt(this.points),i=l.sector,r=l.options.labels,c=e.length,n=r.distance,s=i.center.y-(i.radius+n)-e[0].box.height();t[0]+=2;for(var a=0;a<c;a++){var h=e[a],p=h.box;s+=t[a],o=this.hAlignLabel(p.x2,i.clone().expand(n),s,s+p.height(),h.orientation===T),h.orientation===T?(r.align!==u&&(o=i.radius+i.center.x+n),h.reflow(new C(o+p.width(),s,o,s))):(r.align!==u&&(o=i.center.x-i.radius-n),h.reflow(new C(o-p.width(),s,o,s))),s+=p.height()}},Nh.prototype.createVisual=function(){var t=this.options.connectors,l=this.points,c=l.length;Hh.prototype.createVisual.call(this),this._connectorLines=[];for(var u=0;u<c;u++){var e,d,o,i,r,n,s,a=l[u],h=a.sector,f=a.label,g=h.middle(),p=(a.options.connectors||{}).color||t.color;f&&(p=new b.drawing.Path({stroke:{color:p,width:t.width},animation:{type:"fadeIn",delay:a.animationDelay}}),"outsideEnd"===f.options.position&&(e=f.box,d=h.center,s=h.point(g),o=new Nt(e.x1,e.center().y),n=r=i=void 0,s=h.clone().expand(t.padding).point(g),p.moveTo(s.x,s.y),f.orientation===T?(n=Gh(d,s,o,r=new Nt(e.x1-t.padding,e.center().y)),o=new Nt(r.x-4,r.y),(n=n||o).x=Math.min(n.x,o.x),this.pointInCircle(n,h.center,h.radius+4)||n.x<h.center.x?(i=h.center.x+h.radius+4,a.options.labels.align===Ki||i<o.x?p.lineTo(i,s.y):p.lineTo(s.x+8,s.y),p.lineTo(o.x,r.y)):(n.y=r.y,p.lineTo(n.x,n.y))):(n=Gh(d,s,o,r=new Nt(e.x2+t.padding,e.center().y)),o=new Nt(r.x+4,r.y),(n=n||o).x=Math.max(n.x,o.x),this.pointInCircle(n,h.center,h.radius+4)||n.x>h.center.x?(i=h.center.x-h.radius-4,a.options.labels.align===Ki||i>o.x?p.lineTo(i,s.y):p.lineTo(s.x-8,s.y),p.lineTo(o.x,r.y)):(n.y=r.y,p.lineTo(n.x,n.y))),p.lineTo(r.x,r.y),this._connectorLines.push(p),this.visual.append(p)))}},Nh.prototype.renderVisual=function(){var t,e,o,i;Hh.prototype.renderVisual.call(this),Mt(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]))))},Nh.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}},Nh.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)},Nh.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)},Nh.prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value)},Nh.prototype.animationDelay=function(t){return 70*t},Nh.prototype.stackRoot=function(){return this},Nh);function Nh(t,e){Hh.call(this,e),this.plotArea=t,this.chartService=t.chartService,this.points=[],this.legendItems=[],this.render()}function Gh(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 Nt(t.x+(o=n/i)*(e.x-t.x),t.y+o*(e.y-t.y)):r}i(Er,{startAngle:90,connectors:{width:2,color:"#939393",padding:8},inactiveItems:{markers:{},labels:{}}}),m(Er.prototype,Fh),Er.prototype.isStackRoot=!0;var Wh,Xh,qh=Er,Yh=((Xh=Ds)&&(Qh.__proto__=Xh),((Qh.prototype=Object.create(Xh&&Xh.prototype)).constructor=Qh).prototype.render=function(){this.createPieChart(this.series)},Qh.prototype.createPieChart=function(t){var e=t[0],t=new qh(this,{series:t,padding:e.padding,startAngle:e.startAngle,connectors:e.connectors,legend:this.options.legend});this.appendChart(t)},Qh.prototype.appendChart=function(t,e){Xh.prototype.appendChart.call(this,t,e),dt(this.options.legend.items,t.legendItems)},Qh),Pr=((Wh=Uh)&&(Zh.__proto__=Wh),((Zh.prototype=Object.create(Wh&&Wh.prototype)).constructor=Zh).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===A?(i.radius-=(i.radius-i.innerRadius)/2,e=i.point(r),o.reflow(new C(e.x,e.y-t/2,e.x,e.y))):Wh.prototype.reflowLabel.call(this))},Zh.prototype.createSegment=function(t,e){return re.current.createRing(t,e)},Zh);function Zh(){Wh.apply(this,arguments)}function Qh(){Xh.apply(this,arguments)}i(Pr,{overlay:{gradient:"roundedGlass"},labels:{position:A},animation:{type:Ji}}),m(Pr.prototype,xr);var Kh,$h=Pr,Go=((Kh=qh)&&(Jh.__proto__=Kh),((Jh.prototype=Object.create(Kh&&Kh.prototype)).constructor=Jh).prototype.addValue=function(t,e,o){var i=m({},o.series,{index:o.index});this.evalSegmentOptions(i,t,o),this.createLegendItem(t,i,o),t&&!1!==o.visible&&(t=new $h(t,e,i),Object.assign(t,o),this.append(t),this.points.push(t))},Jh.prototype.reflow=function(l){for(var t,e=this.options,o=l.clone(),o=Math.min(o.width(),o.height()),i=o/2,r=e.series,n=r.length,e=At(e.padding,o-.85*o),s=i-(e=i-5<e?i-5:e),c=0,a=0;a<n;a++){var h=r[a];0===a&&w(h.holeSize)&&(t=h.holeSize,s-=h.holeSize),w(h.size)?s-=h.size:c++,w(h.margin)&&a!==n-1&&(s-=h.margin)}w(t)||(s-=t=(i-e)/(n+.75)*.75);var p=t,u=0;this.seriesConfigs=[];for(var d=0;d<n;d++){var f=r[d],g=(p+=u)+At(f.size,s/c);this.seriesConfigs.push({innerRadius:p,radius:g}),u=f.margin||0,p=g}Kh.prototype.reflow.call(this,l)},Jh.prototype.animationDelay=function(t,e,o){return 50*t+600*(e+1)/(o+1)},Jh);function Jh(){Kh.apply(this,arguments)}i(Go,{startAngle:90,connectors:{width:2,color:"#939393",padding:8}});var tp,ep,op,ip=Go,rp=((op=Yh)&&(ap.__proto__=op),((ap.prototype=Object.create(op&&op.prototype)).constructor=ap).prototype.render=function(){this.createDonutChart(this.series)},ap.prototype.createDonutChart=function(t){var e=t[0],t=new ip(this,{series:t,padding:e.padding,connectors:e.connectors,legend:this.options.legend});this.appendChart(t)},ap),ps=((ep=Ds)&&(sp.__proto__=ep),((sp.prototype=Object.create(ep&&ep.prototype)).constructor=sp).prototype.initFields=function(){this.valueAxisRangeTracker=new tn},sp.prototype.render=function(){this.addToLegend(this.series),this.createPolarAxis(),this.createCharts(),this.createValueAxis()},sp.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)},sp.prototype.createValueAxis=function(){var t,e=this.valueAxisRangeTracker,o=e.query(),i=this.valueAxisOptions({roundToMajorUnit:!1,zIndex:-1}),r="log"===i.type?(t=bi,{min:.1,max:1}):(t=xi,{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)},sp.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=q(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,O,A),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)},sp.prototype.backgroundBox=function(){return this.box},sp.prototype.detachLabels=function(){},sp),Dr=((tp=Wn)&&(np.__proto__=tp),((np.prototype=Object.create(tp&&tp.prototype)).constructor=np).prototype.pointSlot=function(t,e){e=t.center.y-e.y1,t=Nt.onCircle(t.center,t.startAngle,e);return new C(t.x,t.y,t.x,t.y)},np);function np(){tp.apply(this,arguments)}function sp(){ep.apply(this,arguments)}function ap(){op.apply(this,arguments)}i(Dr,{clip:!1});var hp,pp=Dr,Er=((hp=Rh)&&(lp.__proto__=hp),(lp.prototype=Object.create(hp&&hp.prototype)).constructor=lp);function lp(){hp.apply(this,arguments)}Er.prototype.pointSlot=pp.prototype.pointSlot,i(Er,{clip:!1});var cp,up,dp=Er,fp=((up=$r)&&(vp.__proto__=up),((vp.prototype=Object.create(up&&up.prototype)).constructor=vp).prototype.fillToAxes=function(t){var e=this._polarAxisCenter();t.lineTo(e.x,e.y)},vp.prototype._polarAxisCenter=function(){return this.parent.plotArea.polarAxis.box.center()},vp.prototype.strokeSegments=function(){var t,e,o,i=this._strokeSegments;return i||(t=this._polarAxisCenter(),e=new ki(!1),(o=this.points()).push(t),(i=this._strokeSegments=e.process(o)).pop()),i},vp),gp=((cp=Gr)&&(yp.__proto__=cp),((yp.prototype=Object.create(cp&&cp.prototype)).constructor=yp).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)},yp);function yp(){cp.apply(this,arguments)}function vp(){up.apply(this,arguments)}function mp(t,e){return t.value.x-e.value.x}(_p=dp)&&(Cp.__proto__=_p),((Cp.prototype=Object.create(_p&&_p.prototype)).constructor=Cp).prototype.createSegment=function(t,e,o){return new("smooth"===(e.line||{}).style?fp:gp)(t,e,o)},Cp.prototype.createMissingValue=function(t,e){var o;return Un(t.x)&&e!==Zi&&(o={x:t.x,y:t.y},e===Yi&&(o.y=0)),o},Cp.prototype.seriesMissingValues=function(t){return t.missingValues||Yi},Cp.prototype._hasMissingValuesGap=function(){for(var t=this.options.series,e=0;e<t.length;e++)if("gap"===this.seriesMissingValues(t[e]))return!0},Cp.prototype.sortPoints=function(t){if(t.sort(mp),this._hasMissingValuesGap())for(var e=0;e<t.length;e++){var o=t[e];o&&(Un(o.value.y)||"gap"!==this.seriesMissingValues(o.series)||delete t[e])}return t};var xp,_p,bp=Cp,Pr=((xp=ps)&&(wp.__proto__=xp),((wp.prototype=Object.create(xp&&xp.prototype)).constructor=wp).prototype.createPolarAxis=function(){var t=new fi(this.options.xAxis,this.chartService);this.polarAxis=t,this.axisX=t,this.appendAxis(t)},wp.prototype.valueAxisOptions=function(t){return m(t,{majorGridLines:{type:d},minorGridLines:{type:d}},this.options.yAxis)},wp.prototype.createValueAxis=function(){xp.prototype.createValueAxis.call(this),this.axisY=this.valueAxis},wp.prototype.appendChart=function(t,e){this.valueAxisRangeTracker.update(t.yAxisRanges),Ds.prototype.appendChart.call(this,t,e)},wp.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createLineChart(As(t,["polarLine"]),e),this.createScatterChart(As(t,["polarScatter"]),e),this.createAreaChart(As(t,["polarArea"]),e)},wp.prototype.createLineChart=function(t,e){0!==t.length&&(t=new dp(this,{series:t}),this.appendChart(t,e))},wp.prototype.createScatterChart=function(t,e){0!==t.length&&(t=new pp(this,{series:t}),this.appendChart(t,e))},wp.prototype.createAreaChart=function(t,e){0!==t.length&&(t=new bp(this,{series:t}),this.appendChart(t,e))},wp.prototype._dispatchEvent=function(t,e,o){var i=t._eventCoordinates(e),i=new Nt(i.x,i.y),r=this.axisX.getValue(i),i=this.axisY.getValue(i);null!==r&&null!==i&&t.trigger(o,{element:xt(e),x:r,y:i})},wp.prototype.createCrosshairs=function(){},wp);function wp(){xp.apply(this,arguments)}function Cp(){_p.apply(this,arguments)}i(Pr,{xAxis:{},yAxis:{}}),m(Pr.prototype,Hs);var Sp,Go=Pr,Dr=((Sp=Nr)&&(kp.__proto__=Sp),((kp.prototype=Object.create(Sp&&Sp.prototype)).constructor=kp).prototype.pointSlot=function(t,e){e=t.center.y-e.y1,t=Nt.onCircle(t.center,t.middle(),e);return new C(t.x,t.y,t.x,t.y)},kp.prototype.renderSegments=function(){if(Sp.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=bt(n),r=bt(r.linePoints),i=0===o.categoryIx,r=r.categoryIx===r.categoriesCount-1,i&&r&&bt(n).linePoints.push(o))}},kp.prototype.createSegment=function(t,e,o){var o=new("smooth"===e.style?Rr:Sr)(t,e,o),i=this.seriesMissingValues(e);return t.length!==e.data.length&&i!==Zi||(o.options.closed=!0),o},kp);function kp(){Sp.apply(this,arguments)}i(Dr,{clip:!1,limitPoints:!1});var Ap,Pp,Tp,Mp,Op=Dr,Bp=((Mp=$r)&&(Vp.__proto__=Mp),((Vp.prototype=Object.create(Mp&&Mp.prototype)).constructor=Vp).prototype.fillToAxes=function(){},Vp),Rp=((Tp=Gr)&&(zp.__proto__=Tp),((zp.prototype=Object.create(Tp&&Tp.prototype)).constructor=zp).prototype.fillToAxes=function(){},zp),Ep=((Pp=Op)&&(Ip.__proto__=Pp),((Ip.prototype=Object.create(Pp&&Pp.prototype)).constructor=Ip).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 Bp(t,e,o,r,n)).options.closed=!0:(t.push(t[0]),s=new Rp(t,e,o,r,n)),s},Ip.prototype.seriesMissingValues=function(t){return t.missingValues||Yi},Ip),Er=((Ap=$h)&&(Lp.__proto__=Ap),(Lp.prototype=Object.create(Ap&&Ap.prototype)).constructor=Lp);function Lp(t,e){Ap.call(this,t,null,e)}function Ip(){Pp.apply(this,arguments)}function zp(){Tp.apply(this,arguments)}function Vp(){Mp.apply(this,arguments)}i(Er,{overlay:{gradient:"none"},labels:{distance:10}});var jp,Dp=Er,Pr=((jp=ae)&&(Hp.__proto__=jp),((Hp.prototype=Object.create(jp&&jp.prototype)).constructor=Hp).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})},Hp);function Hp(t){jp.call(this,t),this.forEach=t.rtl?un:cn}i(Pr,{gap:1,spacing:0});var Up,Fp,Np=Pr,Gp=((Fp=ae)&&(Xp.__proto__=Fp),((Xp.prototype=Object.create(Fp&&Fp.prototype)).constructor=Xp).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 C;for(var s=r;0<=s&&s<i;s+=n){var a=o[s].sector;a.startAngle=t.startAngle,a.angle=t.angle}},Xp),Dr=((Up=wn)&&(Wp.__proto__=Up),((Wp.prototype=Object.create(Up&&Up.prototype)).constructor=Wp).prototype.pointType=function(){return Dp},Wp.prototype.clusterType=function(){return Np},Wp.prototype.stackType=function(){return Gp},Wp.prototype.categorySlot=function(t,e){return t.getSlot(e)},Wp.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},Wp.prototype.reflowPoint=function(t,e){t.sector=e,t.reflow()},Wp.prototype.createAnimation=function(){this.options.animation.center=this.box.toRect().center(),Up.prototype.createAnimation.call(this)},Wp);function Wp(){Up.apply(this,arguments)}function Xp(){Fp.apply(this,arguments)}Dr.prototype.reflow=mr.prototype.reflow,i(Dr,{clip:!1,limitPoints:!1,animation:{type:"pie"}});var qp,Yp=Dr,Er=((qp=ps)&&(Zp.__proto__=qp),((Zp.prototype=Object.create(qp&&qp.prototype)).constructor=Zp).prototype.createPolarAxis=function(){var t=new ui(this.options.categoryAxis,this.chartService);this.polarAxis=t,this.categoryAxis=t,this.appendAxis(t),this.aggregateCategories(),this.createCategoryAxesLabels()},Zp.prototype.valueAxisOptions=function(t){return this._hasBarCharts&&m(t,{majorGridLines:{type:d},minorGridLines:{type:d}}),this._isStacked100&&m(t,{roundToMajorUnit:!1,labels:{format:"P0"}}),m(t,this.options.valueAxis)},Zp.prototype.aggregateCategories=function(){La.prototype.aggregateCategories.call(this,this.panes)},Zp.prototype.createCategoryAxesLabels=function(){La.prototype.createCategoryAxesLabels.call(this,this.panes)},Zp.prototype.filterSeries=function(t){return t},Zp.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createAreaChart(As(t,["radarArea"]),e),this.createLineChart(As(t,["radarLine"]),e),this.createBarChart(As(t,["radarColumn"]),e)},Zp.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},Zp.prototype.createAreaChart=function(t,e){0!==t.length&&(t=new Ep(this,this.chartOptions(t)),this.appendChart(t,e))},Zp.prototype.createLineChart=function(t,e){0!==t.length&&(t=new Op(this,this.chartOptions(t)),this.appendChart(t,e))},Zp.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 Yp(this,t),this.appendChart(o,e),this._hasBarCharts=!0)},Zp.prototype.seriesCategoryAxis=function(){return this.categoryAxis},Zp.prototype._dispatchEvent=function(t,e,o){var i=t._eventCoordinates(e),i=new Nt(i.x,i.y),r=this.categoryAxis.getCategory(i),i=this.valueAxis.getValue(i);null!==r&&null!==i&&t.trigger(o,{element:xt(e),category:r,value:i})},Zp.prototype.createCrosshairs=function(){},Zp);function Zp(){qp.apply(this,arguments)}m(Er.prototype,Hs,{appendChart:La.prototype.appendChart,aggregateSeries:La.prototype.aggregateSeries,seriesSourcePoints:La.prototype.seriesSourcePoints}),i(Er,{categoryAxis:{categories:[]},valueAxis:{}});var Qp,Pr=Er,Dr=((Qp=ae)&&(Kp.__proto__=Qp),((Kp.prototype=Object.create(Qp&&Qp.prototype)).constructor=Kp).prototype.reflow=function(t){var e=this.points,o=this.children[0];this.box=new C(e[0].x,e[0].y,e[1].x,e[2].y),o&&o.reflow(new C(t.x1,e[0].y,t.x2,e[2].y))},Kp.prototype.createVisual=function(){var t=this,e=this.options;Qp.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)},Kp.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()},Kp.prototype.createHighlight=function(t){return b.drawing.Path.fromPoints(this.points,t)},Kp.prototype.highlightVisual=function(){return this.visual.children[0]},Kp.prototype.highlightVisualArgs=function(){var t=b.drawing.Path.fromPoints(this.points).close();return{options:this.options,path:t}},Kp.prototype.tooltipAnchor=function(){var t=this.box;return{point:new Nt(t.center().x,t.y1),align:{horizontal:"center",vertical:"top"}}},Kp.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Kp);function Kp(t,e,o){Qp.call(this,e),this.value=t,this.options.index=o.index}i(Dr,{color:x,border:{width:1}}),m(Dr.prototype,xr);var $p,Jp=Dr,ps=(($p=ae)&&(tl.__proto__=$p),((tl.prototype=Object.create($p&&$p.prototype)).constructor=tl).prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value)},tl.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=Ss(o),r=t.total,n=t.points,s=0;s<n.length;s++){var a,h,p=n[s];p&&(a=p.fields,H(o.color)||(o.color=a.color||e[s%e.length]),a=m({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))}},tl.prototype.evalSegmentOptions=function(t,e,o){var i=o.series;dr(t,{value:e,series:i,dataItem:o.dataItem,index:o.index},{defaults:i._defaults,excluded:["data","content","template","toggle","visual"]})},tl.prototype.createSegment=function(t,e){var o=m({},e.series);if(this.evalSegmentOptions(o,t,e),this.createLegendItem(t,o,e),!1!==e.visible)return t=new Jp(t,o,e),Object.assign(t,e),this.append(t),this.points.push(t),t},tl.prototype.createLabel=function(t,e){var o,i=e.series,r=e.dataItem,n=m({},this.options.labels,i.labels),s=t;if(n.visible)return o=K(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=Lt(i.color),n.background||(n.background=i.color)),this.evalSegmentOptions(n,t,e),o=new Te(s,m({vAlign:n.position},n),r),this.labels.push(o),o},tl.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!==A&&(i=t[o].box.width(),r===P?e.left=Math.max(e.left,i):e.right=Math.max(e.right,i))}return e},tl.prototype.dynamicSlopeReflow=function(t,e,l){for(var c=this.options,o=this.points,u=o.length,d=o[0],i=d,r=0;r<o.length;r++)o[r].percentage>i.percentage&&(i=o[r]);for(var f=d.percentage/i.percentage*e,g=(e-f)/2,n=0,s=0;s<u;s++){var a=o[s].percentage,h=o[s+1],h=h?h.percentage:a,p=o[s].points=[],y=c.dynamicHeight?l*a:l/u,a=wt(a?(e-f*(h/a))/2:h?0:e/2,0,e);p.push(new b.geometry.Point(t.x1+g,t.y1+n)),p.push(new b.geometry.Point(t.x1+e-g,t.y1+n)),p.push(new b.geometry.Point(t.x1+e-a,t.y1+y+n)),p.push(new b.geometry.Point(t.x1+a,t.y1+y+n)),n+=y+c.segmentSpacing,f=wt(e-2*(g=a),0,e)}},tl.prototype.constantSlopeReflow=function(t,e,l){for(var o=this.options,i=this.points,r=i.length,c=o.neckRatio<=1,u=c?o.neckRatio*e:e,n=c?0:(e-e/o.neckRatio)/2,d=((c?e:e-2*n)-u)/2,s=0,a=0;a<r;a++){var h=i[a].points=[],p=i[a].percentage,f=o.dynamicHeight?d*p:d/r,p=o.dynamicHeight?l*p:l/r;h.push(new b.geometry.Point(t.x1+n,t.y1+s)),h.push(new b.geometry.Point(t.x1+e-n,t.y1+s)),h.push(new b.geometry.Point(t.x1+e-n-f,t.y1+p+s)),h.push(new b.geometry.Point(t.x1+n+f,t.y1+p+s)),n+=f,s+=p+o.segmentSpacing}},tl.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)}},tl);function tl(t,e){$p.call(this,e),this.plotArea=t,this.points=[],this.labels=[],this.legendItems=[],this.render()}i(ps,{neckRatio:.3,width:300,dynamicSlope:!1,dynamicHeight:!0,segmentSpacing:0,labels:{visible:!1,align:A,position:A,zIndex:1}}),m(ps.prototype,Fh);var el,ol,il=ps,Er=((ol=Ds)&&(nl.__proto__=ol),((nl.prototype=Object.create(ol&&ol.prototype)).constructor=nl).prototype.render=function(){this.createFunnelChart(this.series)},nl.prototype.createFunnelChart=function(t){var e=t[0],t=new il(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)},nl.prototype.appendChart=function(t,e){ol.prototype.appendChart.call(this,t,e),dt(this.options.legend.items,t.legendItems)},nl),Dr=((el=ae)&&(rl.__proto__=el),((rl.prototype=Object.create(el&&el.prototype)).constructor=rl).prototype.render=function(){this._rendered||(this._rendered=!0,this.createMarker(),this.createLabel(),this.createNote())},rl.prototype.createLabel=function(){var t,e,o,i=this.options.labels;i.visible&&(t=this.pointData(),e=K(i),o=i.color,e=e?e(t):this.formatValue(i.format),o=o||Lt(this.color),this.label=new Te(e,m({align:A,vAlign:A,margin:{left:5,right:5},zIndex:At(i.zIndex,this.series.zIndex)},i,{color:o}),t),this.append(this.label))},rl.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},rl.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())},rl.prototype.markerBox=function(){var t,e=this.options.markers,o=e.border,i=this.box.toRect(),r="roundedRect"===At(e.type,"rect"),o=At(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,Se(i)},rl.prototype.markerBorder=function(){var t=this.options,e=t.markers.border,t=At(e.opacity,t.opacity);return{color:e.color||this.color,width:e.width,opacity:t,dashType:e.dashType}},rl.prototype.createMarker=function(){var t=this.options,e=t.markers,e=new ue({type:At(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:At(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)},rl.prototype.createHighlight=function(t){var e=this.options,o=this.options.highlight.markers||this.options.markers,o=new ue({type:At(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:At(e.zIndex,this.series.zIndex)}),e=(o.reflow(this.markerBox()),o.getElement());return e.options.fill=t.fill,e.options.stroke=t.stroke,e},rl.prototype.highlightVisual=function(){return this.rectVisual},rl.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this.rectVisual}},rl.prototype.tooltipAnchor=function(){var t=this.box.center().x,e=this.box.y1-5;return{point:new Nt(t,e),align:{horizontal:A,vertical:S}}},rl.prototype.overlapsBox=function(t){return this.box.overlaps(t)},rl.prototype.unclipElements=function(){},rl.prototype.pointData=function(){return{x:this.value.x,y:this.value.y,value:this.value.value,dataItem:this.dataItem,series:this.series}},rl);function rl(t,e){el.call(this),this.options=e,this.color=e.color||x,this.value=t}function nl(){ol.apply(this,arguments)}m(Dr.prototype,xr),m(Dr.prototype,o),Dr.prototype.defaults={markers:{type:"rect",borderRadius:4,border:{color:"transparent"}},padding:{top:1},labels:{visible:!1,padding:3},opacity:1,notes:{label:{}}};var sl,al=Dr,ps=((sl=ae)&&(hl.__proto__=sl),((hl.prototype=Object.create(sl&&sl.prototype)).constructor=hl).prototype._initFields=function(){this.points=[],this.seriesOptions=[],this.valueRange={min:c,max:l},this._evalSeries=[]},hl.prototype.render=function(){this.setRange(),this.traverseDataPoints(this.addValue.bind(this))},hl.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;w(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))}},hl.prototype.addValue=function(t,e){var o;t&&w(t.value)&&null!==t.value&&(o=this.createPoint(t,e))&&Object.assign(o,e),this.points.push(o)},hl.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=(w(s)||(this._evalSeries[r]=s=dr(t,{},n,!0)),t);return s&&dr(r=m({},t),{value:e,series:i,dataItem:o.dataItem,min:this.valueRange.min,max:this.valueRange.max},n),r},hl.prototype.pointType=function(){return al},hl.prototype.pointOptions=function(t,e){var o,i=this.seriesOptions[e];return i||(o=this.pointType().prototype.defaults,this.seriesOptions[e]=i=m({},o,{markers:{opacity:t.opacity},tooltip:{format:this.options.tooltip.format},labels:{format:this.options.labels.format}},t)),i},hl.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=(H(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 al(t,s));return n.color=a,this.append(n),n},hl.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)throw new Error("Unable to locate Y axis with name "+t);return{xAxis:i,yAxis:o}},hl.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},hl.prototype.pointSlot=function(t,e){return new C(t.x1,e.y1,t.x2,e.y2)},hl.prototype.traverseDataPoints=function(l){for(var t=this.options.series,e=0;e<t.length;e++)for(var o=t[e],i=this.seriesAxes(o),r=i.xAxis,c=i.yAxis,u=r.currentRangeIndices(),d=c.currentRangeIndices(),n=0;n<o.data.length;n++){var s=this._bindPoint(o,e,n),a=s.valueFields,s=s.fields,h=r.totalIndex(a.x),p=c.totalIndex(a.y),h=u.min<=h&&h<=u.max,p=d.min<=p&&p<=d.max;h&&p&&l(a,m({pointIx:n,series:o,seriesIx:e,dataItem:o.data[n],owner:this},s))}},hl.prototype.formatPointValue=function(t,e){t=t.value;return this.chartService.format.auto(e,t.x,t.y,t.value)},hl.prototype.animationPoints=function(){for(var t=this.points,e=[],o=0;o<t.length;o++)e.push((t[o]||{}).marker);return e},hl);function hl(t,e){sl.call(this,e),this.plotArea=t,this.chartService=t.chartService,this._initFields(),this.render()}i(ps,{series:[],tooltip:{format:"{0}, {1}: {2}"},labels:{format:"{2}"},clip:!0}),m(ps.prototype,{_bindPoint:mr.prototype._bindPoint});var pl,ll=ps,o=((pl=Ds)&&(cl.__proto__=pl),((cl.prototype=Object.create(pl&&pl.prototype)).constructor=cl).prototype.initFields=function(){this.namedXAxes={},this.namedYAxes={}},cl.prototype.render=function(t){void 0===t&&(t=this.panes),this.bindCategories(),this.createAxes(t),this.createCharts(t),this.createAxisLabels()},cl.prototype.bindCategories=function(){for(var t=this.srcSeries||this.series,e=0;e<t.length;e++){for(var o=t[e],l=o.data||[],i=this.seriesAxes(o),r=i.xAxis,i=i.yAxis,n=jt(r.categories||[]),s=jt(i.categories||[]),a=0;a<l.length;a++){var h=Ni.current.bindPoint(o,a).valueFields,p=h.x,h=h.y;n.has(p)||n.add(p),s.has(h)||s.add(h)}r.categories=n.values(),i.categories=s.values()}},cl.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(As(r,["heatmap"]),i)}},cl.prototype.createHeatmapChart=function(t,e){t=new ll(this,{series:t});this.appendChart(t,e)},cl.prototype.seriesPaneName=function(t){var e=this.options,o=t.xAxis,i=et([].concat(e.xAxis),function(t){return t.name===o})[0],r=t.yAxis,t=et([].concat(e.yAxis),function(t){return t.name===r})[0],e=(e.panes||[{}])[0].name||"default";return(i||{}).pane||(t||{}).pane||e},cl.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)throw new Error("Unable to locate Y axis with name "+r);return{xAxis:o,yAxis:t}},cl.prototype.createAxisLabels=function(){for(var t=this.axes,e=0;e<t.length;e++)t[e].createLabels()},cl.prototype.createXYAxis=function(t,e,o){for(var i,r=t.name,l=e?this.namedYAxes:this.namedXAxes,n=Object.assign({axisCrossingValue:0},t,{vertical:e,reverse:e||this.chartService.rtl?!t.reverse:t.reverse,justified:!1}),t=n.categories?n.categories[0]:null,s=[n.min,n.max,t],c=this.series,a=0;a<c.length;a++){var u=c[a],h=u[e?"yAxis":"xAxis"];if(h===n.name||0===o&&!h){h=Ni.current.bindPoint(u,0).valueFields;s.push(h[e?"y":"x"]);break}}for(var p=0;p<s.length;p++)if(s[p]instanceof Date){i=!0;break}t=new(ks(n.type,y)||!n.type&&i?Xo:zo)(n,this.chartService);if(t.axisIndex=o,r){if(l[r])throw new Error((e?"Y":"X")+" axis with name "+r+" is already defined");l[r]=t}return this.appendAxis(t),t.mapCategories(),t},cl.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++)nt(this.findPane(o[s].pane),t)&&i.push(this.createXYAxis(o[s],!1,s));for(var a=0;a<r.length;a++)nt(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]},cl.prototype.removeAxis=function(t){var e=t.options.name;pl.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},cl.prototype._dispatchEvent=function(t,e,o){for(var i=t._eventCoordinates(e),r=new Nt(i.x,i.y),n=this.axes,l=n.length,s=[],a=[],h=0;h<l;h++){var p=n[h];ws(p.options.vertical?a:s,p.getCategory(r))}0<s.length&&0<a.length&&t.trigger(o,{element:xt(e),originalEvent:e,x:Ms(s),y:Ms(a)})},cl.prototype.updateAxisOptions=function(t,e){var o=t.options.vertical,i=this.groupAxes(this.panes),i=(o?i.y:i.x).indexOf(t);ul(this.options,i,o,e),ul(this.originalOptions,i,o,e)},cl.prototype.crosshairOptions=function(t){return Object.assign({},t.options.crosshair,{zIndex:0})},cl);function cl(){pl.apply(this,arguments)}function ul(t,e,o,i){m([].concat(o?t.yAxis:t.xAxis)[e],i)}i(o,{xAxis:{},yAxis:{}}),m(o.prototype,Hs);var dl,Dr=o,ps="color",o="first",fl="max",gl=(hh.current.register(La,[Qi,Ki,$i,tr,"area","verticalArea","candlestick","ohlc","bullet","verticalBullet","boxPlot","verticalBoxPlot","rangeColumn","rangeBar","waterfall","horizontalWaterfall","rangeArea","verticalRangeArea"]),hh.current.register(zh,["scatter","scatterLine","bubble"]),hh.current.register(Yh,[Ji]),hh.current.register(rp,["donut"]),hh.current.register(Er,["funnel"]),hh.current.register(Go,["polarArea","polarLine","polarScatter"]),hh.current.register(Pr,["radarArea","radarColumn","radarLine"]),hh.current.register(Dr,["heatmap"]),Ni.current.register([Qi,Ki,$i,tr,"area","verticalArea"],[v],["category",ps,"noteText","errorLow","errorHigh"]),Ni.current.register(["rangeColumn","rangeBar","rangeArea","verticalRangeArea"],["from","to"],["category",ps,"noteText"]),Ni.current.register(["waterfall","horizontalWaterfall"],[v],["category",ps,"noteText","summary"]),Ni.current.register(["polarArea","polarLine","polarScatter"],[_,O],[ps]),Ni.current.register(["radarArea","radarColumn","radarLine"],[v],[ps]),Ni.current.register(["funnel"],[v],["category",ps,"visibleInLegend","visible"]),qs.current.register([Qi,Ki,$i,tr,"area","verticalArea","waterfall","horizontalWaterfall"],{value:fl,color:o,noteText:o,errorLow:"min",errorHigh:fl}),qs.current.register(["rangeColumn","rangeBar","rangeArea","verticalRangeArea"],{from:"min",to:fl,color:o,noteText:o}),qs.current.register(["radarArea","radarColumn","radarLine"],{value:fl,color:o}),Ni.current.register(["scatter","scatterLine","bubble"],[_,O],[ps,"noteText","xErrorLow","xErrorHigh","yErrorLow","yErrorHigh"]),Ni.current.register(["bubble"],[_,O,"size"],[ps,"category","noteText"]),Ni.current.register(["heatmap"],[_,O,v],[ps,"noteText"]),Ni.current.register(["candlestick","ohlc"],["open","high","low","close"],["category",ps,"downColor","noteText"]),qs.current.register(["candlestick","ohlc"],{open:fl,high:fl,low:"min",close:fl,color:o,downColor:o,noteText:o}),Ni.current.register(["boxPlot","verticalBoxPlot"],["lower","q1","median","q3","upper","mean","outliers"],["category",ps,"noteText"]),qs.current.register(["boxPlot","verticalBoxPlot"],{lower:fl,q1:fl,median:fl,q3:fl,upper:fl,mean:fl,outliers:o,color:o,noteText:o}),Ni.current.register(["bullet","verticalBullet"],["current","target"],["category",ps,"visibleInLegend","noteText"]),qs.current.register(["bullet","verticalBullet"],{current:fl,target:fl,color:o,noteText:o}),Ni.current.register([Ji,"donut"],[v],["category",ps,"explode","visibleInLegend","visible"]),["category",v,_,O]),Er=((dl=b.Class)&&(r.__proto__=dl),((r.prototype=Object.create(dl&&dl.prototype)).constructor=r).prototype._initElement=function(t){for(this._setElementClass(t),t.style.position="relative";t.firstChild;)t.removeChild(t.firstChild);this.element=t},r.prototype._setElementClass=function(t){R(t,"k-chart")},r.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=gl,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=m({},e,t),this.applySeriesColors()},r.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)}},r.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&&Mt(this._selections,function(t){return!t.visible})&&(this._destroySelections(),this._setupSelection())},r.prototype._resize=function(){this._noTransitionsRedraw()},r.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()},r.prototype.getAxis=function(t){return Mi(t,this._plotArea.axes)},r.prototype.findAxisByName=function(t){return this.getAxis(t)},r.prototype.findPaneByName=function(t){for(var e=this._plotArea.panes,o=0;o<e.length;o++)if(e[o].options.name===t)return new Ri(e[o])},r.prototype.findPaneByIndex=function(t){var e=this._plotArea.panes;if(e[t])return new Ri(e[t])},r.prototype.plotArea=function(){return new Ei(this._plotArea)},r.prototype.toggleHighlight=function(t,e){var o,i,r=this._plotArea,n=(r.srcSeries||r.series||[])[0],e=H(e)?r.filterPoints(e):(N(e)?(o=e.series,i=e.category):o=i=e,"donut"===n.type?yl(r.pointsBySeriesName(o),i):n.type===Ji||"funnel"===n.type?yl((r.charts[0]||{}).points,i):r.pointsBySeriesName(o));e&&this.togglePointsHighlight(t,e)},r.prototype.togglePointsHighlight=function(t,e){for(var o=this._highlight,i=0;i<e.length;i++)o.togglePointHighlight(e[i],t)},r.prototype.showTooltip=function(t){var e,o,i=this._sharedTooltip(),r=this._tooltip,n=this._plotArea;H(t)?(e=n.findPoint(t))&&i&&(o=e.categoryIx):i&&w(t)&&(o=n.categoryAxis.categoryIndex(t)),i?0<=o&&(n=this._plotArea.pointsByCategoryIndex(o),r.showAt(n)):e&&r.show(e)},r.prototype.hideTooltip=function(){this._tooltip.hide()},r.prototype._initSurface=function(){var t=this.surface,e=this._surfaceWrap(),o=this.options.chartArea||{};o.width&&vt(e,{width:o.width}),o.height&&vt(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))},r.prototype._surfaceWrap=function(){return this.element},r.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 Va,this._setupSelection(),this._createPannable(),this._createZoomSelection(),this._createMousewheelZoom(),this.trigger("render"),bl(this._plotArea.panes),this._navState||this._cancelDomEvents()},r.prototype.exportVisual=function(t){var e,o;return t&&(t.width||t.height||t.options)?(o=this.options,t=m({},t.options,{chartArea:{width:t.width,height:t.height}}),_l(this._originalOptions,t),this.options=m({},this._originalOptions,t),this._initTheme(this.options,this._theme),this.bindCategories(),(t=this._getModel()).renderVisual(),bl(t._plotArea.panes),e=t.visual,this.options=o):e=this.surface.exportVisual(),e},r.prototype._sharedTooltip=function(){return this._plotArea instanceof La&&this.options.tooltip&&this.options.tooltip.shared},r.prototype._createPannable=function(){var t=this.options;!1!==t.pannable&&(this._pannable=new Ga(this._plotArea,t.pannable))},r.prototype._createZoomSelection=function(){var t=this.options.zoomable,e=(t||{}).selection;!1!==t&&!1!==e&&(this._zoomSelection=new Qa(this,e))},r.prototype._createMousewheelZoom=function(){var t=this.options.zoomable,e=(t||{}).mousewheel;!1!==t&&!1!==e&&(this._mousewheelZoom=new Ka(this,e))},r.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",or,ir])),o=(!1===e||!1===i)&&!this.requiresHandlers(["zoomStart",rr,nr]),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)},r.prototype._toggleDomEvents=function(t,e){var o=this.domEvents;o&&(o.toggleDrag&&o.toggleDrag(t),o.toggleZoom&&o.toggleZoom(e))},r.prototype._createTooltip=function(){var t=this.options.tooltip;return this._sharedTooltip()?this._createSharedTooltip(t):new yh(this.chartService,t)},r.prototype._createSharedTooltip=function(t){return new _h(this._plotArea,t)},r.prototype.applyDefaults=function(t,l){var o,i,e,r=t,c=(l||{}).axisDefaults||{};function u(t){var e=(t||{}).color||i.color,e=m({},c,c[o],i,i[o],{line:{color:e},labels:{color:e},title:{color:e}},t);return delete e[o],e}for(var n=0;n<gl.length;n++)i=r.axisDefaults||{},e=(e=[].concat(r[o=gl[n]+"Axis"])).map(u),r[o]=1<e.length?e:e[0];var s=t,t=l,a=s.series,d=a.length,f=s.seriesDefaults,g=m({},s.seriesDefaults),y=t?m({},t.seriesDefaults):{},v=m({},y);vl(g),vl(v);for(var h=0;h<d;h++){var p=a[h].type||s.seriesDefaults.type,p=m({data:[]},v,y[p],{tooltip:s.tooltip},g,f[p]);a[h]._defaults=p,a[h]=m({},p,a[h]),a[h].data=a[h].data||[]}},r.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)}},r.prototype._getModel=function(){var t=this.options,e=this._createPlotArea(),o=new ve(this._modelOptions());return o.chart=this,o._plotArea=e,Re.buildTitle(t.title,o),t.legend&&t.legend.visible&&o.append(new sh(e.options.legend,this.chartService)),o.append(e),o.reflow(),o},r.prototype._modelOptions=function(){var t=this.options,e=this.getSize();return m({transitions:t.transitions,width:e.width||600,height:e.height||400},t.chartArea)},r.prototype._createPlotArea=function(t){var e=this.options;return hh.current.create(t?[]:e.series,e,this.chartService)},r.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 zo&&n.select&&!n.vertical&&(i=r.range(),r=new gh(this,r,m({min:i.min,max:i.max},n.select)),e.push(r))}},r.prototype._selectStart=function(t){return this.trigger("selectStart",t)},r.prototype._select=function(t){return this.trigger("select",t)},r.prototype._selectEnd=function(t){return this.trigger("selectEnd",t)},r.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)},r.prototype.addObserver=function(t){t&&this.observers.push(t)},r.prototype.removeObserver=function(t){t=this.observers.indexOf(t);0<=t&&this.observers.splice(t,1)},r.prototype.requiresHandlers=function(t){for(var e=this.observers,o=0;o<e.length;o++)if(e[o].requiresHandlers(t))return!0},r.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},r.prototype._attachEvents=function(){var t,e=this.element;this._touchAction=e.style.touchAction,ft(e,((t={}).contextmenu=this._clickHandler,t[sr]=this._mousewheelHandler,t.mouseleave=this._mouseleaveHandler,t)),this._shouldAttachMouseMove()&&ft(e,((t={}).mousemove=this._mousemove,t)),this.domEvents=Ye.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()},r.prototype._mouseleave=function(t){this._hoveredPoint&&(this._hoveredPoint.out(this,t),this._hoveredPoint=null),this._plotArea.hovered&&(this.trigger("plotAreaLeave"),this._plotArea.hovered=!1)},r.prototype._cancelDomEvents=function(){this.domEvents&&this.domEvents.cancel&&this.domEvents.cancel()},r.prototype._gesturestart=function(t){this._mousewheelZoom&&!this._stopChartHandlers(t)&&(this._gestureDistance=t.distance,this._unsetActivePoint(),this.surface.suspendTracking())},r.prototype._gestureend=function(t){this._zooming&&!this._stopChartHandlers(t)&&(this.surface&&this.surface.resumeTracking(),this._zooming=!1,this.trigger(nr,{}))},r.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:ml(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(rr,o)&&i.zoom())))},r.prototype._mouseout=function(t){var e;!t.element||(e=this._drawingChartElement(t.element,t))&&e.leave&&e.leave(this,t.originalEvent)},r.prototype._start=function(t){var e=this._eventCoordinates(t);!this._stopChartHandlers(t)&&this._plotArea.backgroundContainsPoint(e)&&(this.requiresHandlers(["dragStart",or,ir])&&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:ml(this._plotArea.axes),originalEvent:t}))},r.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(or,{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(or,{axisRanges:r,originalEvent:t})}this._zoomSelection&&this._zoomSelection.move(t)}},r.prototype._end=function(t){var e,o;this._stopChartHandlers(t)||((e=this._pannable)&&e.end(t)?(this.surface.resumeTracking(),this.trigger(ir,{axisRanges:ml(this._plotArea.axes),originalEvent:t}),this._suppressHover=!1,this.chartService.panning=!1):this._endNavigation(t,ir),this._zoomSelection&&(o=this._zoomSelection.end(t))&&!this.trigger(rr,{axisRanges:o,originalEvent:t})&&(this._zoomSelection.zoom(),this.trigger(nr,{axisRanges:o,originalEvent:t})))},r.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},r.prototype._mousewheelZoomRate=function(){var t=(this.options.zoomable||{}).mousewheel||{};return At(t.rate,.3)},r.prototype._mousewheel=function(t){var e=this,o=ct(t),i=this._mousewheelZoom,r=this._eventCoordinates(t);if(!this._stopChartHandlers(t)&&this._plotArea.backgroundContainsPoint(r))if(i){var n={delta:o,axisRanges:ml(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(rr,n)&&i.zoom(),this._mwTimeout=setTimeout(function(){e.trigger(nr,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(rr,{delta:o,axisRanges:h,originalEvent:t}),this._mwTimeout&&clearTimeout(this._mwTimeout),this._mwTimeout=setTimeout(function(){e._endNavigation(t,nr)},150)}}},r.prototype._startNavigation=function(t,e,o){var i,r=this._model._plotArea,e=r.findPointPane(e),r=r.axes.slice(0);e&&(i=ml(r),this.trigger(o,{axisRanges:i,originalEvent:t})?this._cancelDomEvents():(this._suppressHover=!0,this._unsetActivePoint(),this._navState={axisRanges:i,pane:e,axes:r}))},r.prototype._endNavigation=function(t,e){this._navState&&(this.trigger(e,{axisRanges:this._navState.axisRanges,originalEvent:t}),this._suppressHover=!1,this._navState=null)},r.prototype._getChartElement=function(t,e){var o=this.surface.eventTarget(t);if(o)return this._drawingChartElement(o,t,e)},r.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},r.prototype._eventCoordinates=function(t){t=mt(t);return this._toModelCoordinates(t.x,t.y)},r.prototype._elementPadding=function(){var t,e;return this._padding||(t=(e=X(this.element,["paddingLeft","paddingTop"])).paddingLeft,e=e.paddingTop,this._padding={top:e,left:t}),this._padding},r.prototype._toDocumentCoordinates=function(t){var e=this._elementPadding(),o=yt(this.element);return{left:k(t.x+e.left+o.left),top:k(t.y+e.top+o.top)}},r.prototype._toModelCoordinates=function(t,e){var o=this.element,i=yt(o),r=this._elementPadding(),o=Et(o).invert(),t=new b.geometry.Point(t-i.left-r.left,e-i.top-r.top).transform(o);return new Nt(t.x,t.y)},r.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)},r.prototype._click=function(t){var e=this._getChartElement(t);this._propagateClick(e,t)},r.prototype._propagateClick=function(t,e){for(var o=t;o;)o.click&&o.click(this,e),o=o.parent},r.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 Ds)}),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},r.prototype._displayTooltip=function(t){m({},this.options.tooltip,t.options.tooltip).visible&&this._tooltip.show(t)},r.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))},r.prototype._getInactivePoints=function(e,t){return this._getAllPointsOfType(t,e.constructor).filter(function(t){return t!==e})},r.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},r.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)},r.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))}},r.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)}},r.prototype._chartInstanceFromPoint=function(t){for(var e=t.parent;e&&!e.plotArea;)e=e.parent;return e},r.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},r.prototype._getInactiveOpacityForSeries=function(t){var e=this.options.seriesDefaults.highlight.inactiveOpacity;return t.highlight.inactiveOpacity||e||t.opacity||1},r.prototype._getDefaultOpacityForSeries=function(t){return t.defaultOpacity||t.opacity||1},r.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),ft(document,((t={}).mousemove=this._mouseMoveTrackHandler,t)))},r.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)||(m({},e.tooltip,n.options.tooltip).visible&&o.show(n),i.show(n)))):(kt(document,((r={}).mousemove=this._mouseMoveTrackHandler,r)),this._unsetActivePoint(),this._mouseMoveTrackHandler=null)},r.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)},r.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()}},r.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))},r.prototype.hideElements=function(t){var e=this._plotArea;this._mousemove.cancel(),e.hideCrosshairs(),this._unsetActivePoint(t)},r.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()},r.prototype._deferRedraw=function(){this._redraw()},r.prototype._clearRedrawTimeout=function(){this._redrawTimeout&&(clearInterval(this._redrawTimeout),this._redrawTimeout=null)},r.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)}},r.prototype.bindCategoryAxisFromSeries=function(t,l){for(var e,o,c=this.options.series,u=c.length,d=new rt,n=[],f=!1,i=0;i<u;i++){var r=c[i],s=r.categoryAxis===t.name||!r.categoryAxis&&0===l,a=r.data,g=a.length,s=r.categoryField&&s,f=s||f;if(s&&0<g)for(var y=(e=Ts(t,ji(r.categoryField,a[0])))?Ps:ji,h=0;h<g;h++){var v=a[h],p=y(r.categoryField,v,this.chartService.intl);!e&&d.get(p)||(n.push([p,v]),e||d.set(p,!0))}}0<n.length?(o=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}(n=e?function(t){for(var e=function(t,e){void 0===e&&(e=So);for(var o=1,i=t.length;o<i;o++)if(e(t[o],t[o-1])<0){t.sort(e);break}return t}(n,t=void 0===t?So:t),o=e.length,i=0<o?[e[0]]:[],r=1;r<o;r++)0!==t(e[r],bt(i))&&i.push(e[r]);return i}(function(t,e){return So(t[0],e[0])}):n),t.categories=o[0]):f&&(t.categories=[])},r.prototype._isBindable=function(t){for(var e=Ni.current.valueFields(t),o=!0,i=0;i<e.length;i++){var r=e[i];if(r===v?r="field":r+="Field",!w(t[r])){o=!1;break}}return o},r.prototype._noTransitionsRedraw=function(){var t,e=this.options;!1!==e.transitions&&(t=!(e.transitions=!1)),this._redraw(),t&&(e.transitions=!0)},r.prototype._legendItemHover=function(e,o){var t=this._plotArea,i=this._highlight,r=(t.srcSeries||t.series)[e],n=nt(r.type,[Ji,"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)},r.prototype._shouldAttachMouseMove=function(){return this._plotArea.crosshairs.length||this._tooltip&&this._sharedTooltip()||this.requiresHandlers(["plotAreaHover","plotAreaLeave"])},r.prototype.updateMouseMoveHandler=function(){var t;kt(this.element,((t={}).mousemove=this._mousemove,t)),this._shouldAttachMouseMove()&&ft(this.element,((t={}).mousemove=this._mousemove,t))},r.prototype.applyOptions=function(t,e){_l(this._originalOptions,t),this._originalOptions=m(this._originalOptions,t),this.options=m({},this._originalOptions),e&&(this._theme=e,this.chartService.theme=e),this._initTheme(this.options,this._theme),this._toggleDragZoomEvents()},r.prototype.setOptions=function(t,e){this.applyOptions(t,e),this.bindCategories(),this.redraw(),this.updateMouseMoveHandler()},r.prototype.setDirection=function(t){this.chartService.rtl=Boolean(t),this.surface&&"svg"===this.surface.type&&this._destroySurface()},r.prototype.setIntlService=function(t){this.chartService.intl=t},r.prototype.noTransitionsRedraw=function(){this._noTransitionsRedraw()},r.prototype.destroy=function(){var t;this._destroyed=!0,kt(this.element,((t={}).contextmenu=this._clickHandler,t[sr]=this._mousewheelHandler,t.mousemove=this._mousemove,t.mouseleave=this._mouseleaveHandler,t)),this.domEvents&&(this.domEvents.destroy(),delete this.domEvents),this._mouseMoveTrackHandler&&kt(document,((t={}).mousemove=this._mouseMoveTrackHandler,t)),this._destroyView(),this._destroySurface(),this._clearRedrawTimeout()},r.prototype._destroySurface=function(){var t=this.surface;t&&(t.unbind("mouseenter",this._surfaceMouseenterHandler),t.unbind("mouseleave",this._surfaceMouseleaveHandler),t.destroy(),this.surface=null)},r.prototype._destroySelections=function(){var t=this._selections;if(t)for(;0<t.length;)t.shift().destroy()},r.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)},r);function r(t,e,o,i){var r=this,i=(void 0===i&&(i={}),dl.call(this),this.observers=[],this.addObserver(i.observer),this.chartService=new qe(this,i),this.chartService.theme=o,this._initElement(t),m({},this.options,e));this._originalOptions=m({},i),this._theme=o,this._initTheme(i,o),this._initHandlers(),this._initSurface(),this.bindCategories(),Pt.preloadFonts(e,function(){r.fontLoaded=!0,r._destroyed||(r.trigger("init"),r._redraw(),r._attachEvents())})}function yl(t,e){if(t)for(var o=0;o<t.length;o++)if(t[o].category===e)return[t[o]]}function vl(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 ml(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 xl=["data","categories"];function _l(t,e){for(var o in e){var i,r,n;!nt(o,xl)&&e.hasOwnProperty(o)&&(i=e[o],r=t[o],w(r)&&((n=null===i)||!w(i)?(delete t[o],n&&delete e[o]):r&&N(i)&&N(r)&&_l(r,i)))}}function bl(t){for(var e=0;e<t.length;e++)t[e].notifyRender()}i(Er,{renderAs:"",chartArea:{},legend:{visible:!0,labels:{}},categoryAxis:{},seriesDefaults:{type:Ki,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 wl,Cl=Er,Sl=((wl=_h)&&(Al.__proto__=wl),((Al.prototype=Object.create(wl&&wl.prototype)).constructor=Al).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 Nt(this.plotArea.box.x2,e.center().y):new Nt(e.center().x,-2),align:i}},Al.prototype._defaultAnchor=function(t,e){return this._slotAnchor({},e)},Al),kl=[Qi,"bullet"];function Al(){wl.apply(this,arguments)}function Pl(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 Tl(t,e){for(var o=0;o<t.length;o++)t[o].style.display=e[o]}function Ml(t){return V(t)?[t]:t}(Ol=Cl)&&(Bl.__proto__=Ol),((Bl.prototype=Object.create(Ol&&Ol.prototype)).constructor=Bl).prototype._setElementClass=function(t){R(t,"k-sparkline")},Bl.prototype._initElement=function(t){Ol.prototype._initElement.call(this,t),this._initialWidth=Math.floor(vt(t).width)},Bl.prototype._resize=function(){var t=this.element,e=Pl(t.childNodes);this._initialWidth=Math.floor(vt(t).width),Tl(t.childNodes,e),Ol.prototype._resize.call(this)},Bl.prototype._modelOptions=function(){var t=this.options,e=this._surfaceWrap(),o=Pl(e.childNodes),i=document.createElement("span"),t=(i.innerHTML=" ",e.appendChild(i),m({width:this._autoWidth,height:vt(e).height,transitions:t.transitions},t.chartArea,{inline:!0,align:!1}));return vt(e,{width:t.width,height:t.height}),e.removeChild(i),Tl(e.childNodes,o),this.surface&&this.surface.resize(),t},Bl.prototype._surfaceWrap=function(){var t;return this.stage||(t=this.stage=document.createElement("span"),this.element.appendChild(t)),this.stage},Bl.prototype._createPlotArea=function(t){t=Ol.prototype._createPlotArea.call(this,t);return this._autoWidth=this._initialWidth||this._calculateWidth(t),t},Bl.prototype._calculateWidth=function(t){for(var e=this.options,o=q(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===Qi)return 150;if("bullet"===h.type)return 150;if(h.type===Ji)return vt(r).height;var p=a.categoryAxis;p&&(p=p.categoriesCount()*(!a.options.isStacked&&nt(h.type,[Ki,"verticalBullet"])?a.seriesOptions.length:1),n=Math.max(n,p))}}t=n*e.pointWidth;return 0<t&&(t+=o.left+o.right),t},Bl.prototype._createSharedTooltip=function(t){return new Sl(this._plotArea,t)},Bl.normalizeOptions=function(t){t=Ml(t);return(t=B(t)?{seriesDefaults:{data:t}}:m({},t)).series||(t.series=[{data:Ml(t.data)}]),m(t,{seriesDefaults:{type:t.type}}),t=nt(t.series[0].type,kl)||nt(t.seriesDefaults.type,kl)?m({},{categoryAxis:{crosshair:{visible:!1}}},t):t};var Ol,Go=Bl;function Bl(){Ol.apply(this,arguments)}i(Go,{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 Rl,El=Go,Ll=((Rl=b.drawing.Animation)&&(Il.__proto__=Rl),((Il.prototype=Object.create(Rl&&Rl.prototype)).constructor=Il).prototype.setup=function(){this._initialOpacity=parseFloat(X(this.element,"opacity").opacity)},Il.prototype.step=function(t){X(this.element,{opacity:String(st(this._initialOpacity,0,t))})},Il.prototype.abort=function(){Rl.prototype.abort.call(this),X(this.element,{display:"none",opacity:String(this._initialOpacity)})},Il.prototype.cancel=function(){Rl.prototype.abort.call(this),X(this.element,{opacity:String(this._initialOpacity)})},Il);function Il(){Rl.apply(this,arguments)}function zl(t,e){var o=document.createElement("div");return o.className=t,e&&(o.style.cssText=e),o}(Vl=b.Class)&&(jl.__proto__=Vl),((jl.prototype=Object.create(Vl&&Vl.prototype)).constructor=jl).prototype.createElements=function(){var t=this.element=zl("k-navigator-hint","display: none; position: absolute; top: 1px; left: 1px;"),e=this.tooltip=zl("k-tooltip k-chart-tooltip"),o=this.scroll=zl("k-scroll");e.innerHTML=" ",t.appendChild(e),t.appendChild(o)},jl.prototype.show=function(t,e,o){var i=this.element,r=this.options,l=this.scroll,n=this.tooltip,s=xo(Ao(t)+Ao(e-t)/2),a=.4*o.width(),h=o.center().x-a,c=(o.center().x-h)/(r.max-r.min),s=s-r.min,p=this.chartService.intl.format(r.format,t,e),r=K(r),r=(this.clearHideTimeout(),this._visible||(X(i,{visibility:"hidden",display:"block"}),this._visible=!0),r&&(p=r({from:t,to:e})),n.innerHTML=p,X(n,{left:o.center().x-n.offsetWidth/2,top:o.y1}),X(n,["marginTop","borderTopWidth","height"]));X(l,{width:a,left:h+s*c,top:o.y1+r.marginTop+r.borderTopWidth+r.height/2}),X(i,{visibility:"visible"})},jl.prototype.clearHideTimeout=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this._hideAnimation&&this._hideAnimation.cancel()},jl.prototype.hide=function(){var t=this;this.clearHideTimeout(),this._hideTimeout=setTimeout(function(){t._visible=!1,t._hideAnimation=new Ll(t.element),t._hideAnimation.setup(),t._hideAnimation.play()},this.options.hideDelay)},jl.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 Vl,Pr=jl;function jl(t,e,o){Vl.call(this),this.options=m({},this.options,o),this.container=t,this.chartService=e;o=X(t,["paddingLeft","paddingTop"]);this.chartPadding={top:o.paddingTop,left:o.paddingLeft},this.createElements(),t.appendChild(this.element)}i(Pr,{format:"{0:d} - {1:d}",hideDelay:500});var Dl=Pr,Hl="_navigator",Ul=Hl;function Fl(){}(Gl=b.Class)&&(ql.__proto__=Gl),((ql.prototype=Object.create(Gl&&Gl.prototype)).constructor=ql).prototype.parseDate=function(t){return Bo(this.chart.chartService.intl,t)},ql.prototype.clean=function(){this.selection&&(this.selection.destroy(),this.selection=null),this.hint&&(this.hint.destroy(),this.hint=null)},ql.prototype.destroy=function(){this.chart&&(this.chart.removeObserver(this.chartObserver),delete this.chart),this.clean()},ql.prototype.redraw=function(){this._redrawSelf(),this.initSelection()},ql.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=(Fl.prototype=o,new Fl);0!==o.categoriesCount()&&(this.clean(),h.box=o.box,this.selection=new gh(t,h,{min:r,max:i,from:s||r,to:a||i,mousewheel:At(n,{zoom:"left"}),visible:e.visible},new ht(this,{selectStart:"_selectStart",select:"_select",selectEnd:"_selectEnd"})),e.hint.visible&&(this.hint=new Dl(t.element,t.chartService,{min:r,max:i,template:K(e.hint),format:e.hint.format})))},ql.prototype.setRange=function(){var t=this.chart._createPlotArea(!0).namedCategoryAxes[Ul].roundedRange(),e=t.min,t=t.max,o=this.options.select||{},i=o.from||e,r=o.to||t;this.options.select=m({},o,{from:i=i<e?e:i,to:r=t<r?t:r}),this.filterAxes()},ql.prototype._redrawSelf=function(t){var e=this.chart._plotArea;e&&e.redraw(bt(e.panes),t)},ql.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)},ql.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?Ao(t.to)-Ao(t.from):Ao(o.options.to)-Ao(o.options.from),r=xo(wt(Ao(e.min),n.min,Ao(n.max)-i)),t=xo(wt(Ao(r)+i,Ao(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))},ql.prototype._dragEnd=function(){this.filterAxes(),this.filter(),this.redrawSlaves(),this.hint&&this.hint.hide()},ql.prototype.readSelection=function(){var t=this.selection.options,e=t.from,t=t.to,o=this.options.select;o.from=e,o.to=t},ql.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!==Hl&&(n.min=o,n.max=i)}},ql.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 Xo(m({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))},ql.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))},ql.prototype._zoomEnd=function(t){this._dragEnd(t)},ql.prototype.showHint=function(t,e){var o=this.chart._plotArea;this.hint&&this.hint.show(t,e,o.backgroundBox())},ql.prototype._selectStart=function(t){return this.chart._selectStart(t)},ql.prototype._select=function(t){return this.showHint(t.from,t.to),this.chart._select(t)},ql.prototype._selectEnd=function(t){return this.hint&&this.hint.hide(),this.readSelection(),this.filterAxes(),this.filter(),this.redrawSlaves(),this.chart._selectEnd(t)},ql.prototype.mainAxis=function(){var t=this.chart._plotArea;if(t)return t.namedCategoryAxes[Ul]},ql.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}},ql.setup=function(t,e){var o,i,r;void 0===e&&(e={}),(t=void 0===t?{}:t).__navi||(t.__navi=!0,o=m({},e.navigator,t.navigator),i=t.panes=[].concat(t.panes),r=m({},o.pane,{name:Hl}),o.visible||(r.visible=!1,r.height=.1),i.push(r),ql.attachAxes(t,o),ql.attachSeries(t,o,e))},ql.attachAxes=function(t,e){var o=e.series||[],i=t.categoryAxis=[].concat(t.categoryAxis),t=t.valueAxis=[].concat(t.valueAxis),o=0===As(o,er).length,o=m({type:"date",pane:Hl,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(m({},o,{maxDateGroups:200},r,{name:Ul,title:null,baseUnit:"fit",baseUnitStep:"auto",labels:{visible:!1},majorTicks:{visible:!1}}),m({},o,r,{name:Ul+"_labels",maxDateGroups:20,baseUnitStep:"auto",labels:{position:""},plotBands:[],autoBaseUnitSteps:{minutes:[]},_overlap:!0}),m({},o,r,{name:Ul+"_ticks",maxDateGroups:200,majorTicks:{width:.5},plotBands:[],title:null,labels:{visible:!1,mirror:!0},_overlap:!0})),t.push(m({name:Ul,pane:Hl,majorGridLines:{visible:!1},visible:!1},e.valueAxis))},ql.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(m({color:n[a%n.length],categoryField:e.dateField,visibleInLegend:!1,tooltip:{visible:!1}},s,r[a],{axis:Ul,categoryAxis:Ul,autoBind:e.autoBindElements}))};var Nl,Gl,Wl=ql,Dr=((Nl=Cl)&&(Xl.__proto__=Nl),((Xl.prototype=Object.create(Nl&&Nl.prototype)).constructor=Xl).prototype.applyDefaults=function(t,e){var o=vt(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&&m({},e,o);Wl.setup(t,e),Nl.prototype.applyDefaults.call(this,t,e)},Xl.prototype._setElementClass=function(t){R(t,"k-chart k-stockchart")},Xl.prototype.setOptions=function(t){this.destroyNavigator(),Nl.prototype.setOptions.call(this,t)},Xl.prototype.noTransitionsRedraw=function(){var t=this.options.transitions;this.options.transitions=!1,this._fullRedraw(),this.options.transitions=t},Xl.prototype._resize=function(){this.noTransitionsRedraw()},Xl.prototype._redraw=function(){var t=this.navigator;!this._dirty()&&t&&t.options.partialRedraw?t.redrawSlaves():this._fullRedraw()},Xl.prototype._dirty=function(){var t=this.options,t=et([].concat(t.series,t.navigator.series),function(t){return t&&t.visible}).length,e=this._seriesCount!==t;return this._seriesCount=t,e},Xl.prototype._fullRedraw=function(){var t=this.navigator;t||(t=this.navigator=new Wl(this),this.trigger("navigatorCreated",{navigator:t})),t.clean(),t.setRange(),Nl.prototype._redraw.call(this),t.initSelection()},Xl.prototype._trackSharedTooltip=function(t){var e=this._plotArea.paneByPoint(t);e&&e.options.name===Hl?this._unsetActivePoint():Nl.prototype._trackSharedTooltip.call(this,t)},Xl.prototype.bindCategories=function(){Nl.prototype.bindCategories.call(this),this.copyNavigatorCategories()},Xl.prototype.copyNavigatorCategories=function(){for(var t,e=[].concat(this.options.categoryAxis),o=0;o<e.length;o++){var i=e[o];i.name===Ul?t=i.categories:t&&i.pane===Hl&&(i.categories=t)}},Xl.prototype.destroyNavigator=function(){this.navigator&&(this.navigator.destroy(),this.navigator=null)},Xl.prototype.destroy=function(){this.destroyNavigator(),Nl.prototype.destroy.call(this)},Xl.prototype._stopChartHandlers=function(t){var e=this._eventCoordinates(t),e=this._plotArea.paneByPoint(e);return Nl.prototype._stopChartHandlers.call(this,t)||e&&e.options.name===Hl},Xl.prototype._toggleDragZoomEvents=function(){this._dragZoomEnabled||(this.element.style.touchAction="none",this._dragZoomEnabled=!0)},Xl);function Xl(){Nl.apply(this,arguments)}function ql(t){Gl.call(this),this.chart=t;var e=this.options=m({},this.options,t.options.navigator),o=e.select;o&&(o.from=this.parseDate(o.from),o.to=this.parseDate(o.to)),w(e.hint.visible)||(e.hint.visible=e.visible),this.chartObserver=new ht(this,((o={})[or]="_drag",o[ir]="_dragEnd",o[rr]="_zoom",o[nr]="_zoomEnd",o)),t.addObserver(this.chartObserver)}i(Dr,{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 Yl=Dr,Zl=Math.PI/180;function Ql(t,e){var o=t.getOrigin(),i=t.getSize(),e=q(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 Kl=b.drawing.Group,$l=b.drawing.Path,Jl=b.drawing.Text;function tc(t,e){var o=t.box,i=t.children[0].box,r=e.border||{},n=e.background||"",o=$l.fromRect(new b.geometry.Rect([o.x1,o.y1],[o.width(),o.height()]),{stroke:{}}),t=new Jl(t.text,new b.geometry.Point(i.x1,i.y1),{font:e.font,fill:{color:e.color}}),i=Ql(t.bbox().clone(),e.padding),e=$l.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 Kl;return i.append(o),i.append(e),i.append(t),i}function ec(t,e,o){var i=w(t.from)?t.from:l,r=w(t.to)?t.to:c;return t.from=Math.max(Math.min(r,i),e),t.to=Math.min(Math.max(r,i),o),t}function oc(t,e){e=q(e);return e.left=-e.left,e.top=-e.top,e.right=-e.right,e.bottom=-e.bottom,Ql(t,e)}var ic,rc=b.drawing.Path,nc=b.drawing.Surface,fl=((ic=b.Class)&&(sc.__proto__=ic),((sc.prototype=Object.create(ic&&ic.prototype)).constructor=sc).prototype.destroy=function(){this.surface&&(this.surface.destroy(),this.surface=null),delete this.element,delete this.surfaceElement},sc.prototype.value=function(t){var e=this.pointers[0];if(0===arguments.length)return e.value();e.value(t),this._setValueOptions(t)},sc.prototype._draw=function(){var t=this.surface;t.clear(),t.draw(this._visuals)},sc.prototype.exportVisual=function(){return this._visuals},sc.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(B(t))for(var r=0;r<t.length;r++)V(t[r])&&e[r].value(t[r]);this._setValueOptions(t)},sc.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]},sc.prototype.resize=function(){this.noTransitionsRedraw()},sc.prototype.noTransitionsRedraw=function(){var t=this.options.transitions;this._toggleTransitions(!1),this.redraw(),this._toggleTransitions(t)},sc.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(),oc(t.bbox(),this._gaugeAreaMargin));this.reflow(t)},sc.prototype.setOptions=function(t,e){this._originalOptions=m(this._originalOptions,t),this.options=m({},this._originalOptions),this._initTheme(e),this.redraw()},sc.prototype.setDirection=function(t){this.contextService.rtl=Boolean(t),this.surface&&"svg"===this.surface.type&&(this.surface.destroy(),this.surface=null)},sc.prototype.setIntlService=function(t){this.contextService.intl=t},sc.prototype._initTheme=function(t){var e=t||this.theme||{},t=(this.theme=e,this.options=m({},e,this.options),this.options),o=t.pointer;if(B(o)){for(var i=[],r=0;r<o.length;r++)i.push(m({},e.pointer,o[r]));t.pointer=i}},sc.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=oc(e,o.width)),rc.fromRect(e,{stroke:{color:o.width?o.color:"",width:o.width,dashType:o.dashType,lineJoin:"round",lineCap:"round"},fill:{color:t.background}})},sc.prototype._initSurface=function(){var t=this.options,e=this.surface,o=this._surfaceElement(),i=this._surfaceSize();vt(o,i),e&&e.options.type===t.renderAs?(this.surface.clear(),this.surface.resize()):(e&&e.destroy(),this.surface=nc.create(o,{type:t.renderAs}))},sc.prototype._surfaceSize=function(){var t=this.options,e=this._getSize();return t.gaugeArea&&m(e,t.gaugeArea),e},sc.prototype._surfaceElement=function(){return this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.element.appendChild(this.surfaceElement)),this.surfaceElement},sc.prototype.getSize=function(){return this._getSize()},sc.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}},sc.prototype._defaultSize=function(){return{width:200,height:200}},sc.prototype._toggleTransitions=function(t){this.options.transitions=t;for(var e=0;e<this.pointers.length;e++)this.pointers[e].options.animation.transitions=t},sc);function sc(t,e,o,i){void 0===i&&(i={}),ic.call(this),this.element=t,this.theme=o,this.contextService=new qe(this,i),this._originalOptions=m({},this.options,e),this.options=m({},this._originalOptions),this._initTheme(o),this.redraw()}i(fl,{plotArea:{},theme:"default",renderAs:"",pointer:{},scale:{},gaugeArea:{}});var ac=fl,hc=b.drawing.Path,pc=b.drawing.Group,lc=b.geometry.Point;function cc(l,c,t,e){var o,i,r,n,s,a,u=c.length;if(e.visible)for(var d=t.mirror,h=t.lineBox,p=e.skip;p<u;p+=e.step)p%e.skipUnit!=0&&(t.tickX=d?h.x2:h.x2-e.size,t.tickY=d?h.y1-e.size:h.y1,t.position=c[p],l.append((i=e,a=s=n=r=void 0,n=(o=t).position,s=t.tickX,a=t.tickY,o=t.vertical?(r=new lc(s,n),new lc(s+i.size,n)):(r=new lc(n,a),new lc(n,a+i.size)),new hc({stroke:{color:i.color,width:i.width}}).moveTo(r).lineTo(o))))}(uc=ei)&&(dc.__proto__=uc),((dc.prototype=Object.create(uc&&uc.prototype)).constructor=dc).prototype.initUserOptions=function(t){t=m({},this.options,t);return(t=m({},t,{labels:{mirror:t.mirror}})).majorUnit=t.majorUnit||Ut(t.min,t.max),t},dc.prototype.initFields=function(){},dc.prototype.render=function(){var t=this.elements=new pc,e=this.renderLabels(),o=this.renderLine(),i=this.renderTicks(),r=this.renderRanges();return t.append(o,e,i,r),t},dc.prototype.renderRanges=function(){for(var t=this.options,l=t.min,c=t.max,e=t.vertical,o=t.labels.mirror,i=t.ranges||[],r=new pc,u=i.length,n=t.rangeSize||t.minorTicks.size/2,s=0;s<u;s++){var a=ec(i[s],l,c),h=this.getSlot(a.from,a.to),p=e?this.lineBox():h,h=e?h:this.lineBox();e?p.x1-=n*(o?-1:1):h.y2+=n*(o?-1:1),r.append(hc.fromRect(new b.geometry.Rect([p.x1,h.y1],[p.x2-p.x1,h.y2-h.y1]),{fill:{color:a.color,opacity:a.opacity},stroke:{}}))}return r},dc.prototype.renderLabels=function(){for(var t=this.labels,e=this.options,o=new pc,i=0;i<t.length;i++)o.append(tc(t[i],e.labels));return o},dc.prototype.renderLine=function(){var t=this.options.line,e=this.lineBox(),o=new pc;return 0<t.width&&t.visible&&((t=new hc({stroke:{color:t.color,dashType:t.dashType,width:t.width}})).moveTo(e.x1,e.y1).lineTo(e.x2,e.y2),o.append(t)),o},dc.prototype.renderTicks=function(){var t=new pc,e=this.options,o=e.majorTicks.visible?e.majorUnit:0,i={vertical:e.vertical,mirror:e.labels.mirror,lineBox:this.lineBox()};return cc(t,this.getMajorTickPositions(),i,e.majorTicks),cc(t,this.getMinorTickPositions(),i,m({},{skipUnit:o/e.minorUnit},e.minorTicks)),t};var uc,o=dc;function dc(t,e){t=t||{};!w(t.reverse)&&!1===t.vertical&&(e||{}).rtl&&(t=Object.assign({},t,{reverse:!0})),uc.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:a,width:.5,visible:!0},minorTicks:{size:10,align:"inside",color:a,width:.5,visible:!0},line:{width:.5},labels:{position:"inside",padding:2},mirror:!1,_alignLines:!1});var fc,gc=o,ps=((fc=b.Class)&&(yc.__proto__=fc),((yc.prototype=Object.create(fc&&fc.prototype)).constructor=yc).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=w(e._oldValue)?e.value:i,e.value=wt(t,i,o),this.elements&&this.repaint()},yc);function yc(t,e){fc.call(this);var o=t.options,i=o.min,o=o.max,e=this.options=m({},this.options,e);e.fill=e.color,this.scale=t,w(e.value)?e.value=wt(e.value,i,o):e.value=i}i(ps,{color:a});var vc,Er=ps,Go=((vc=Er)&&(mc.__proto__=vc),((mc.prototype=Object.create(vc&&vc.prototype)).constructor=mc).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=q(i.margin),p=n?p[s?"left":"right"]:p[s?"bottom":"top"],p=s?-p:p;n?(o=new C(r.x1+p,r.y1,r.x1+p,r.y2),s?o.x1-=a:o.x2+=a,"barPointer"!==i.shape&&(t=e=new C(r.x2+p,r.y1-h,r.x2+p,r.y2+h))):(o=new C(r.x1,r.y1-p,r.x2,r.y1-p),s?o.y2+=a:o.y1-=a,"barPointer"!==i.shape&&(t=e=new C(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)},mc.prototype.getElementOptions=function(){var t=this.options;return{fill:{color:t.color,opacity:t.opacity},stroke:w(t.border)?{color:t.border.width?t.border.color||t.color:"",width:t.border.width,dashType:t.border.dashType,opacity:t.opacity}:null}},mc.prototype._margin=function(){var t=this.scale,e=this.options,t=t.options,o=t.mirror,t=t.vertical,e=q(e.margin);return t?e[o?"left":"right"]:e[o?"bottom":"top"]},mc);function mc(t,e){vc.call(this,t,e),this.options=m({track:{visible:w(e.track)}},this.options)}i(Go,{shape:"barPointer",track:{border:{width:1}},color:a,border:{width:1},opacity:1,margin:q(3),animation:{type:"barPointer"},visible:!0});var xc,_c=Go,Pr=((xc=b.drawing.Animation)&&(bc.__proto__=xc),((bc.prototype=Object.create(xc&&xc.prototype)).constructor=bc).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))},bc.prototype.step=function(t){var e=st(this.fromScale.x,this.toScale.x,t),t=st(this.fromScale.y,this.toScale.y,t);this.element.transform(b.geometry.transform().translate(e,t))},bc);function bc(){xc.apply(this,arguments)}i(Pr,{easing:"linear",duration:250}),b.drawing.AnimationFactory.current.register("arrowPointer",Pr);var wc,Cc,Sc=Pr,kc=b.geometry.Point,Ac=b.drawing.Path,Pc=((Cc=_c)&&(Mc.__proto__=Cc),((Mc.prototype=Object.create(Cc&&Cc.prototype)).constructor=Mc).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 kc(0,0-o),new kc(0-i*e,0),new kc(0,0+o)]:[new kc(0-o,0),new kc(0,0+i*e),new kc(0+o,0)]},Mc.prototype.repaint=function(){var t=this.scale,e=this.options,t=new Sc(this.elements,m(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()},Mc.prototype.render=function(){var t=this.scale,e=this.options,o=this.getElementOptions(),i=this.pointerShape(e.value),o=(e.animation.type="arrowPointer",new Ac({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},Mc),Dr=((wc=b.drawing.Animation)&&(Tc.__proto__=wc),((Tc.prototype=Object.create(wc&&wc.prototype)).constructor=Tc).prototype.setup=function(){var t=this.options,e=this.axis=t.vertical?O:_,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)},Tc.prototype.step=function(t){t=st(this.from,this.to,t);this._set(t)},Tc.prototype._set=function(t){var e="set"+this.axis.toUpperCase(),o=this.options.newPoints;o[0][e](t),o[1][e](t)},Tc);function Tc(){wc.apply(this,arguments)}function Mc(t,e){Cc.call(this,t,e),w(this.options.size)||(this.options.size=.6*this.scale.options.majorTicks.size)}i(Dr,{easing:"linear",speed:250}),b.drawing.AnimationFactory.current.register("barPointer",Dr);var Oc,Bc,Rc=Dr,Ec=b.drawing.Group,Lc=b.drawing.Path,Ic=((Bc=_c)&&(jc.__proto__=Bc),((jc.prototype=Object.create(Bc&&Bc.prototype)).constructor=jc).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?O:_,s=i?_:O,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]},jc.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 Rc(i,m(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()},jc.prototype.render=function(){var t=new Ec,e=this.getElementOptions(),e=(this.options.track.visible&&t.append(this.renderTrack()),this.pointerPath=new Lc({stroke:e.stroke,fill:e.fill}));return t.append(e),this.elements=t},jc.prototype.renderTrack=function(){var t=this.options.track,e=t.border||{},o=this.trackBox.clone().pad(e.width||0);return new Lc.fromRect(o.toRect(),{fill:{color:t.color,opacity:t.opacity},stroke:{color:e.width?e.color||t.color:"",width:e.width,dashType:e.dashType}})},jc),zc=b.drawing.Group,fl=((Oc=ac)&&(Vc.__proto__=Oc),((Vc.prototype=Object.create(Oc&&Oc.prototype)).constructor=Vc).prototype.reflow=function(t){var e=this.pointers,o=t.origin.x,i=t.origin.y,o=new C(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()},Vc.prototype._buildVisual=function(){var t=new zc,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},Vc.prototype._createModel=function(){var t=this.options,e=this.scale=new gc(t.scale,this.contextService);this.pointers=[];for(var o=B(o=t.pointer)?o:[o],i=0;i<o.length;i++){var r=m({},o[i],{animation:{transitions:t.transitions}}),n="arrow"===r.shape?Pc:Ic;this.pointers.push(new n(e,r))}},Vc.prototype._defaultSize=function(){var t=this.options.scale.vertical;return{width:t?60:200,height:t?200:60}},Vc.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 C(r.x-e,t.y1,r.x+e,t.y2)):(e=n.height()/2,new C(t.x1,r.y-e,t.x2,r.y+e))},Vc.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 C(i.x1+t,n.y1,i.x2+t,n.y2))):(t=n.center().y-r.center().y,e.reflow(new C(i.x1,i.y1+t,i.x2,i.y2+t)));for(var a=0;a<o.length;a++)o[a].reflow(this.bbox)},Vc.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))},Vc.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)},Vc);function Vc(){Oc.apply(this,arguments)}function jc(t,e){Bc.call(this,t,e),w(this.options.size)||(this.options.size=.3*this.scale.options.majorTicks.size)}i(fl,{transitions:!0,gaugeArea:{background:""},scale:{vertical:!0}});var Dc=fl,Hc=b.drawing.Arc,Uc=b.drawing.Path,Fc=b.drawing.Group;function Nc(t,e,p,o){var i=new Fc,r=t.center,n=t.getRadiusX();if(o.visible)for(var s=0;s<e.length;s++){var a=t.pointAt(e[s]),h=new b.geometry.Point(r.x+n-o.size,r.y).rotate(e[s],r);i.append(new Uc({stroke:{color:o.color,width:o.width}}).moveTo(a).lineTo(h))}return i}function Gc(t,e,o,i){return{from:t,to:e,color:o,opacity:i}}(Wc=ei)&&(Xc.__proto__=Wc),((Xc.prototype=Object.create(Wc&&Wc.prototype)).constructor=Xc).prototype.initUserOptions=function(t){t=m({},this.options,t);return t.majorUnit=t.majorUnit||Ut(t.min,t.max),t.minorUnit=t.minorUnit||t.majorUnit/10,t},Xc.prototype.initFields=function(){},Xc.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()},Xc.prototype.reflow=function(t){var e=t.center(),t=Math.min(t.height(),t.width())/2;if(!w(this.bbox))return this.render(e,t);this.bbox=this.arc.bbox(),this.radius(this.arc.getRadiusX()),this.repositionRanges(),this.renderLabels()},Xc.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},Xc.prototype.hasRanges=function(){var t=this.options.ranges;return t&&t.length},Xc.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},Xc.prototype.labelsCount=function(){var t=Wc.prototype.labelsCount.call(this),e=this.options;return 360<=e.endAngle-e.startAngle&&e.max%e.majorUnit==0&&--t,t},Xc.prototype.renderLabels=function(){var t=this.options,e=this.arc.clone(),o=e.getRadiusX(),l=this.tickAngles(e,t.majorUnit),i=t.rangeSize=t.rangeSize||.1*o,c=new Fc,u=.05*o,d=(w(t.rangeDistance)?u=t.rangeDistance:t.rangeDistance=u,t.labels),f="inside"===d.position,g=w(this.labelElements);f&&(o-=this.ticksSize(),this.hasRanges()&&!g&&(o-=i+u),e.setRadiusX(o).setRadiusY(o));for(var y=this.labels,v=y.length,i=q(d.padding),m=(i.left+i.right)/2,x=(i.top+i.bottom)/2,r=0;r<v;r++){var n=y[r],s=n.box.width()/2,_=n.box.height()/2,a=l[r],h=(a-180)*Zl,a=e.pointAt(a),p=a.x+Math.cos(h)*(s+m)*(f?1:-1),a=a.y+Math.sin(h)*(_+x)*(f?1:-1),h=(n.reflow(new C(p-s,a-_,p+s,a+_)),new b.geometry.Point(n.box.x1,n.box.y1)),p=void 0;g?(s=(p=this.labelElements.children[r]).bbox().origin,(a=p.transform()||b.geometry.transform()).translate(h.x-s.x,h.y-s.y),p.transform(a)):(p=tc(n,t.labels),c.append(p)),this.bbox=b.geometry.Rect.union(this.bbox,p.bbox())}return c},Xc.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())}},Xc.prototype.renderRanges=function(){var t=this.rangeSegments(),e=t.length,o=new Fc;if(e){var i=this.options,r=i.rangeSize,n=i.reverse,i=i.rangeDistance,l=this.getRangeRadius();this.radius(this.radius()-r-i);for(var s=0;s<e;s++){var a=t[s],h=this.slotAngle(a[n?"to":"from"]),p=this.slotAngle(a[n?"from":"to"]);p-h!=0&&o.append(this.createRange(h,p,l,a))}}return o},Xc.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 Hc(o,{stroke:{width:r,color:i.color,opacity:i.opacity,lineCap:i.lineCap}})},Xc.prototype.rangeSegments=function(){var t=this.options,e=t.ranges||[],o=e.length,i=[];if(o){var r=t.min,n=t.max,l=t.rangePlaceholderColor;i.push(Gc(r,n,l));for(var s=0;s<o;s++)for(var a=ec(e[s],r,n),c=i.length,h=0;h<c;h++){var p=i[h];if(p.from<=a.from&&a.from<=p.to){i.push(Gc(a.from,a.to,a.color,a.opacity)),p.from<=a.to&&a.to<=p.to&&i.push(Gc(a.to,p.to,l,a.opacity)),p.to=a.from;break}}}return i},Xc.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},Xc.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})},Xc.prototype.renderTicks=function(){var t,e=this.arc,o=this.options,i=e.clone(),r=(this.majorTickAngles=this.tickAngles(e,o.majorUnit),this.majorTicks=Nc(i,this.majorTickAngles,o.majorUnit,o.majorTicks),new Fc),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=Nc(i,this.minorTickAngles,o.minorUnit,o.minorTicks),r.append(this.minorTicks),r},Xc.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},Xc.prototype.tickAngles=function(t,e){var o=this.options,i=o.reverse,l=o.max-o.min,r=t.endAngle-t.startAngle,n=l/e,s=t.startAngle,a=r/n;i&&(s+=r,a=-a),360<=r&&o.max%e==0&&--n;for(var h=[],p=0;p<n;p++)h.push(k(s,3)),s+=a;return k(s)<=t.endAngle&&h.push(s),h},Xc.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)},Xc.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 Wc,o=Xc;function Xc(t,e){Wc.call(this,0,1,t,e)}i(o,{min:0,max:100,majorTicks:{size:15,align:"inside",color:a,width:.5,visible:!0},minorTicks:{size:10,align:"inside",color:a,width:.5,visible:!0},startAngle:-30,endAngle:210,labels:{position:"inside",padding:2}});var qc,Yc=o,ps=((qc=b.drawing.Animation)&&(Zc.__proto__=qc),((Zc.prototype=Object.create(qc&&qc.prototype)).constructor=Zc).prototype.step=function(t){var e=this.options,t=st(e.oldAngle,e.newAngle,t);this.element.transform(b.geometry.transform().rotate(t,e.center))},Zc);function Zc(t,e){qc.call(this,t,e);t=this.options;t.duration=Math.max(Math.abs(t.newAngle-t.oldAngle)/t.duration*1e3,1)}i(ps,{easing:"linear",duration:150}),b.drawing.AnimationFactory.current.register("radialPointer",ps);var Qc,Kc=ps,$c=b.drawing.Circle,Jc=b.drawing.Group,tu=b.drawing.Path,Go=((Qc=Er)&&(eu.__proto__=Qc),((eu.prototype=Object.create(Qc&&Qc.prototype)).constructor=eu).prototype.setAngle=function(t){this.elements.transform(b.geometry.transform().rotate(t,this.center))},eu.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 Kc(this.elements,m(e.animation,{oldAngle:o,newAngle:t})).play()},eu.prototype.render=function(){var t=this.scale,e=this.options,o=new Jc;return!1!==e.animation&&m(e.animation,{startAngle:0,center:t.arc.center,reverse:t.options.reverse}),o.append(this._renderNeedle(),this._renderCap()),this.elements=o,this.setAngle(Zl),o},eu.prototype.reflow=function(t){var e=this.center=t.center,o=wt(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))},eu.prototype._renderNeedle=function(){var t=this.scale.options.minorTicks.size,e=this.center,o=this.options.color,o=new tu({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},eu.prototype._renderCap=function(){var t=this.options,t=t.cap.color||t.color,e=new b.geometry.Circle(this.center,this.capSize);return new $c(e,{fill:{color:t},stroke:{color:t}})},eu);function eu(){Qc.apply(this,arguments)}i(Go,{cap:{size:.05},arrow:{width:16,height:14},animation:{type:"radialPointer",duration:150}});var ou,iu=Go,ru=b.drawing.Group,Pr=((ou=ac)&&(nu.__proto__=ou),((nu.prototype=Object.create(ou&&ou.prototype)).constructor=nu).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()},nu.prototype._buildVisual=function(t,e,o){var i=this._visuals=new ru;i.append(t),i.append(o.ticks),i.append(o.ranges),this._buildPointers(e),i.append(o.labelElements)},nu.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)}},nu.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=k(a,3),p=k(-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:k((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)},nu.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)},nu.prototype.getDiff=function(t,e){return Math.min(e.width()-t.width(),e.height()-t.height())},nu.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)},nu.prototype._createModel=function(){var t=this.options,e=t.pointer,o=this.scale=new Yc(t.scale,this.contextService);this.pointers=[];for(var i=B(e)?e:[e],r=0;r<i.length;r++){var n=new iu(o,m({},i[r],{animation:{transitions:t.transitions}}));this.pointers.push(n)}},nu);function nu(){ou.apply(this,arguments)}i(Pr,{transitions:!0,gaugeArea:{background:""}});var su,au=Pr,Dr=((su=Yc)&&(hu.__proto__=su),((hu.prototype=Object.create(su&&su.prototype)).constructor=hu).prototype.rangeSegments=function(){var t=this.options;return[{from:t.min,to:t.max,color:t.rangePlaceholderColor,lineCap:t.rangeLineCap}]},hu.prototype.hasRanges=function(){return!0},hu.prototype.placeholderRangeAngle=function(t){var e=this.ranges.children[0].geometry();this.options.reverse?e.setEndAngle(t):e.setStartAngle(t)},hu.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},hu);function hu(){su.apply(this,arguments)}i(Dr,{min:0,max:100,majorTicks:{visible:!1},minorTicks:{visible:!1},labels:{visible:!1},startAngle:0,endAngle:180,rangeLineCap:"round"});var pu,lu=Dr,fl=((pu=b.drawing.Animation)&&(cu.__proto__=pu),((cu.prototype=Object.create(pu&&pu.prototype)).constructor=cu).prototype.step=function(t){var e,o=this.options,i=this.startColor,r=this.color,o=st(o.oldAngle,o.newAngle,t);this.element.angle(o),r&&(o=k(st(i.r,r.r,t)),e=k(st(i.g,r.g,t)),i=k(st(i.b,r.b,t)),this.element.stroke(new b.Color(o,e,i).toHex()))},cu);function cu(t,e){pu.call(this,t,e);var e=this.options,o=Math.abs(e.newAngle-e.oldAngle)/e.duration*1e3,e=(e.duration=wt(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(fl,{easing:"linear",duration:150}),b.drawing.AnimationFactory.current.register("radialRangePointer",fl);var uu,du=fl,o=((uu=Er)&&(fu.__proto__=uu),((fu.prototype=Object.create(uu&&uu.prototype)).constructor=fu).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 du(this,m(e.animation,{oldAngle:o,newAngle:t})),this.animation.play())},fu.prototype.angle=function(t){var e=this.elements.geometry();this.scale.options.reverse?e.setStartAngle(t):e.setEndAngle(t),this.scale.placeholderRangeAngle(t)},fu.prototype.stroke=function(t){this.elements.stroke(t)},fu.prototype.render=function(){var t,e;this.elements||(t=this.scale,!1!==(e=this.options).animation&&m(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}))},fu.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=V(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},fu.prototype.reflow=function(){this.render(),this.bbox=this.elements.bbox()},fu);function fu(){uu.apply(this,arguments)}i(o,{animation:{type:"radialRangePointer",duration:150}});var gu,yu,vu,mu=o,xu=((vu=au)&&(Cu.__proto__=vu),((Cu.prototype=Object.create(vu&&vu.prototype)).constructor=Cu).prototype._initTheme=function(t){vu.prototype._initTheme.call(this,t),this.options.color=this.options.color||(this.theme.pointer||{}).color},Cu.prototype._createModel=function(){var t=this.options,e=this.scale=new lu(t.scale,this.contextService),e=new mu(e,m({},{colors:t.colors,color:t.color,value:t.value,opacity:t.opacity,animation:{transitions:t.transitions}}));this.pointers=[e]},Cu.prototype._buildPointers=function(t){for(var e=0;e<t.length;e++){var o=t[e];o.render(),o.value(o.options.value)}},Cu.prototype._setValueOptions=function(t){this.options.value=t},Cu.prototype.currentColor=function(){var t=this.pointers[0];if(t)return t.currentColor()},Cu.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}},Cu),_u=((yu=xu)&&(wu.__proto__=yu),((wu.prototype=Object.create(yu&&yu.prototype)).constructor=wu).prototype._createModel=function(){var t=this.options.scale;"number"!=typeof t.startAngle&&(t.startAngle=90),t.endAngle=t.startAngle+360,yu.prototype._createModel.call(this)},wu),ps=((gu=b.Class)&&(bu.__proto__=gu),((bu.prototype=Object.create(gu&&gu.prototype)).constructor=bu).prototype.initProperties=function(){},bu.prototype.setOptions=function(t){this.options=Object.assign({},this.options,t),this.quietZoneLength=this.options.addQuietZone?2*this.options.quietZoneLength:0},bu.prototype.encode=function(t,e,o){t=w(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}},bu.prototype.initValue=function(){},bu.prototype.addQuietZone=function(){this.pattern.push(this.options.quietZoneLength||10)},bu.prototype.addData=function(){},bu.prototype.invalidCharacterError=function(t){throw new Error('Character "'+t+'" is not valid for symbology '+this.name+".")},bu);function bu(t){gu.call(this),this.setOptions(t),this.initProperties()}function wu(){yu.apply(this,arguments)}function Cu(){vu.apply(this,arguments)}i(ps,{quietZoneLength:10,addQuietZone:!0,addCheckSum:!0});var Su,ku=Object.assign,Go=((Su=ps)&&(Au.__proto__=Su),((Au.prototype=Object.create(Su&&Su.prototype)).constructor=Au).prototype.initProperties=function(){Su.prototype.initProperties.call(this),ku(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"})},Au.prototype.initValue=function(t,e){this.pattern=[],this.value=t,this.width=e,this.totalUnits=0},Au.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()},Au.prototype.setBaseUnit=function(){this.baseUnit=this.width/(this.totalUnits+this.quietZoneLength)},Au.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]))},Au.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},Au.prototype.weightedValue=function(t,e,o,i){return((e-o)%i||i)*t},Au.prototype.getValue=function(t){return isNaN(t)?(t!==this.DASH&&this.invalidCharacterError(t),this.DASH_VALUE):parseInt(t,10)},Au.prototype.addCharacter=function(t){t=this.getValue(t),t=this.characterMap[t];this.addPattern(t)},Au.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},Au);function Au(){Su.apply(this,arguments)}i(Go,{addCheckSum:!0});var Pu,Tu,Mu=Object.assign,Pr=((Tu=ps)&&(Bu.__proto__=Tu),((Bu.prototype=Object.create(Tu&&Tu.prototype)).constructor=Bu).prototype.initProperties=function(){Tu.prototype.initProperties.call(this),Mu(this,{minBaseUnitLength:.7})},Bu.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()},Bu.prototype.addCharacter=function(t){var e=this.characterMap[t];e||this.invalidCharacterError(t),this.addBase(e)},Bu.prototype.addBase=function(){},Bu),Dr=((Pu=Pr)&&(Ou.__proto__=Pu),((Ou.prototype=Object.create(Pu&&Pu.prototype)).constructor=Ou).prototype.initProperties=function(){Pu.prototype.initProperties.call(this),Mu(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"}}})},Ou.prototype.initValue=function(t,e,o){this.width=e,this.height=o,this.value=t,this.dataLength=t.length,this.pattern=[],this.patternString=""},Ou.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))},Ou.prototype.getBaseUnit=function(t){return this.width/this.getBaseWidth(t)},Ou.prototype.getBaseWidth=function(t){return this.quietZoneLength+3*(t+2)*(this.dataLength+2)+this.gapWidth*(this.dataLength+1)},Ou.prototype.addStart=function(){this.addPattern(this.characterMap.START.pattern),this.addCharacterGap()},Ou.prototype.addBase=function(t){this.addPattern(t.pattern),this.addCharacterGap()},Ou.prototype.addStop=function(){this.addPattern(this.characterMap.START.pattern)},Ou.prototype.addPattern=function(t){for(var e=0;e<t.length;e++)this.patternString+=this.patternMappings[t.charAt(e)]},Ou.prototype.addCharacterGap=function(){this.patternString+=this.gapWidth+this.splitCharacter},Ou);function Ou(){Pu.apply(this,arguments)}function Bu(){Tu.apply(this,arguments)}i(Dr,{addCheckSum:!1});var Ru,Eu,Lu,Iu,zu,Vu,ju,Du,Hu,Uu,Fu,Nu={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"]},fl=((Vu=Dr)&&(rd.__proto__=Vu),((rd.prototype=Object.create(Vu&&Vu.prototype)).constructor=rd).prototype.initProperties=function(){Vu.prototype.initProperties.call(this),m(this,Nu,{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}}})},rd),Gu=Object.assign,Er=((zu=Pr)&&(id.__proto__=zu),((id.prototype=Object.create(zu&&zu.prototype)).constructor=id).prototype.initProperties=function(){zu.prototype.initProperties.call(this),Gu(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"}})},id.prototype.initValue=function(t,e,o){this.value=t,this.width=e,this.height=o,this.pattern=[],this.values=[],this.dataLength=t.length},id.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.")},id.prototype.setBaseUnit=function(){this.baseUnit=this.width/(9*(this.dataLength+2+2)+this.quietZoneLength+1)},id.prototype.addStart=function(){var t=this.characterMap.START.pattern;this.addPattern(t)},id.prototype.addStop=function(){this.addStart(),this.pattern.push(this.characterMap.TERMINATION_BAR)},id.prototype.addBase=function(t){this.addPattern(t.pattern),this.values.push(t.value)},id.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)},id.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]},id.prototype._findCharacterByValue=function(t){for(var e in this.characterMap)if(this.characterMap[e].value===t)return e},id.prototype.weightedValue=function(t,e,o){return(e%o||o)*t},id.prototype.addPattern=function(t){for(var e,o=0;o<t.length;o++)e=parseInt(t.charAt(o),10),this.pattern.push(e)},id),o=((Iu=Er)&&(od.__proto__=Iu),((od.prototype=Object.create(Iu&&Iu.prototype)).constructor=od).prototype.initProperties=function(){Iu.prototype.initProperties.call(this),m(this,Nu,{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))}})},od),Wu=/^\d+$/,Xu=Object.assign,Pr=((Lu=ps)&&(ed.__proto__=Lu),((ed.prototype=Object.create(Lu&&Lu.prototype)).constructor=ed).prototype.initProperties=function(){Lu.prototype.initProperties.call(this),Xu(this,{name:"Postnet",START:"2",VALID_CODE_LENGTHS:[5,9,11],DIGIT_SEPARATOR:"-",characterMap:["22111","11122","11212","11221","12112","12121","12211","21112","21121","21211"]})},ed.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()},ed.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()},ed.prototype.addCharacter=function(t){var e=this.characterMap[t];this.checkSum+=parseInt(t,10),this.addPattern(e)},ed.prototype.addCheckSum=function(){this.checksum=(10-this.checkSum%10)%10,this.addCharacter(this.checksum)},ed.prototype.setBaseUnit=function(){this.baseUnit=this.width/(10*(this.value.length+1)+3+this.quietZoneLength)},ed.prototype.validate=function(t){if(Wu.test(t)||this.invalidCharacterError(t.match(/[^0-9]/)[0]),!nt(t.length,this.VALID_CODE_LENGTHS))throw new Error("Invalid value length. Valid lengths for the Postnet symbology are "+this.VALID_CODE_LENGTHS.join(",")+".")},ed.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)},ed),qu=/^\d+$/,Yu=/^[a-z0-9]+$/i,Zu=Object.assign,Qu=((Eu=b.Class)&&(td.__proto__=Eu),((td.prototype=Object.create(Eu&&Eu.prototype)).constructor=td).prototype.initProperties=function(){},td.prototype.addStart=function(){},td.prototype.is=function(){},td.prototype.isCode=function(){return!1},td.prototype.move=function(){},td.prototype.pushState=function(){},td),Ku=((Ru=Qu)&&(Ju.__proto__=Ru),((Ju.prototype=Object.create(Ru&&Ru.prototype)).constructor=Ju).prototype.initProperties=function(){Ru.prototype.initProperties.call(this),m(this,{FNC4:"FNC4",SHIFT:98})},Ju.prototype.addStart=function(){this.encoding.addPattern(this.START)},Ju.prototype.is=function(t,e){t=t.charCodeAt(e);return this.isCode(t)},Ju.prototype.move=function(t){for(var e=0;!this._moves[e].call(this,t)&&e<this._moves.length;)e++},Ju.prototype.pushState=function(t){var e,o=this.states,i=t.value,r=i.length;for(!nt("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++},Ju.prototype._initMoves=function(t){this._moves=[],nt(this.FNC4,t)&&this._moves.push(this._moveFNC),nt(this.shiftKey,t)&&this._moves.push(this._shiftState),this._moves.push(this._moveState)},Ju.prototype._moveFNC=function(t){if(t.fnc)return t.fnc=!1,t.previousState===this.key},Ju.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},Ju.prototype._moveState=function(){return this.encoding.addPattern(this.MOVE),!0},Ju),$u={};function Ju(t,e){Ru.call(this,t),this.states=e,this._initMoves(e)}function td(t){Eu.call(this),this.encoding=t,this.initProperties()}function ed(){Lu.apply(this,arguments)}function od(){Iu.apply(this,arguments)}function id(){zu.apply(this,arguments)}function rd(){Vu.apply(this,arguments)}function nd(t,e){ju.call(this,t),this.states=e}function sd(t,e){Du.call(this,t),this._initSubStates(e)}function ad(){Hu.apply(this,arguments)}function hd(){Uu.apply(this,arguments)}function pd(){Fu.apply(this,arguments)}$u.A=((Fu=Ku)&&(pd.__proto__=Fu),((pd.prototype=Object.create(Fu&&Fu.prototype)).constructor=pd).prototype.initProperties=function(){Fu.prototype.initProperties.call(this),Zu(this,{key:"A",shiftKey:"B",MOVE:101,START:103})},pd.prototype.isCode=function(t){return 0<=t&&t<96},pd.prototype.getValue=function(t){return t<32?t+64:t-32},pd),$u.B=((Uu=Ku)&&(hd.__proto__=Uu),((hd.prototype=Object.create(Uu&&Uu.prototype)).constructor=hd).prototype.initProperties=function(){Uu.prototype.initProperties.call(this),Zu(this,{key:"B",shiftKey:"A",MOVE:100,START:104})},hd.prototype.isCode=function(t){return 32<=t&&t<128},hd.prototype.getValue=function(t){return t-32},hd),$u.C=((Hu=Qu)&&(ad.__proto__=Hu),((ad.prototype=Object.create(Hu&&Hu.prototype)).constructor=ad).prototype.initProperties=function(){Hu.prototype.initProperties.call(this),Zu(this,{key:"C",MOVE:99,START:105})},ad.prototype.addStart=function(){this.encoding.addPattern(this.START)},ad.prototype.is=function(t,e){var o=kd(t,e,4);return(e+4<=t.length||2===t.length)&&qu.test(o)},ad.prototype.move=function(){this.encoding.addPattern(this.MOVE)},ad.prototype.pushState=function(t){for(var e;(e=kd(t.value,t.index,2))&&qu.test(e)&&2===e.length;)this.encoding.addPattern(parseInt(e,10)),t.index+=2},ad.prototype.getValue=function(t){return t},ad),$u.FNC4=((Du=Qu)&&(sd.__proto__=Du),((sd.prototype=Object.create(Du&&Du.prototype)).constructor=sd).prototype.initProperties=function(){Du.prototype.initProperties.call(this),Zu(this,{key:"FNC4",dependentStates:["A","B"]})},sd.prototype.addStart=function(t){t=t.value.charCodeAt(0)-128,t=this._getSubState(t);this.encoding[t].addStart()},sd.prototype.is=function(t,e){t=t.charCodeAt(e);return this.isCode(t)},sd.prototype.isCode=function(t){return 128<=t&&t<256},sd.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},sd.prototype._pushStart=function(t){this.encoding.addPattern(this.encoding[t.state].MOVE),this.encoding.addPattern(this.encoding[t.state].MOVE)},sd.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},sd.prototype._initSubStates=function(t){this.subStates=[];for(var e=0;e<t.length;e++)nt(t[e],this.dependentStates)&&this.subStates.push(t[e])},sd.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]},sd.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},sd),$u.FNC1=((ju=Qu)&&(nd.__proto__=ju),((nd.prototype=Object.create(ju&&ju.prototype)).constructor=nd).prototype.initProperties=function(){ju.prototype.initProperties.call(this),Zu(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})},nd.prototype.addStart=function(){this.encoding[this.startState].addStart()},nd.prototype.is=function(){return nt(this.key,this.states)},nd.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},nd.prototype.validate=function(t,e){var e=e.substr(t.id.length),o=t.ai;if(!o.type&&!qu.test(e))throw new Error("Application identifier "+t.id+" is numeric only but contains non numeric character(s).");if("alphanumeric"===o.type&&!Yu.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.")},nd.prototype.getByLength=function(t,e){for(var o,i,r=2;r<=4;r++)if(o=kd(t,e,r),i=this.getApplicationIdentifier(o)||this.getApplicationIdentifier(o.substring(0,o.length-1)))return{id:o,ai:i};this.unsupportedAIError(o)},nd.prototype.unsupportedAIError=function(t){throw new Error("'"+t+"' is not a supported Application Identifier")},nd.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}},nd.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&&nt(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}},nd);(gd=ps)&&(Sd.__proto__=gd),((Sd.prototype=Object.create(gd&&gd.prototype)).constructor=Sd).prototype.initProperties=function(){gd.prototype.initProperties.call(this),Zu(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})},Sd.prototype._initStates=function(){for(var t=0;t<this.states.length;t++)this[this.states[t]]=new $u[this.states[t]](this,this.states)},Sd.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},Sd.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())},Sd.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))}},Sd.prototype.addStart=function(t){this[t.state].addStart(t),this.position=1},Sd.prototype.addCheckSum=function(){this.checksum=this.checkSum%103,this.addPattern(this.checksum)},Sd.prototype.addStop=function(){this.addPattern(this.STOP)},Sd.prototype.setBaseUnit=function(){this.baseUnit=this.width/(this.totalUnits+this.quietZoneLength)},Sd.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++},Sd.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 ld,cd,ud,dd,fd,gd,Ku=Sd,Qu=((fd=Ku)&&(Cd.__proto__=fd),((Cd.prototype=Object.create(fd&&fd.prototype)).constructor=Cd).prototype.initProperties=function(){fd.prototype.initProperties.call(this),Zu(this,{name:"Code 128 A",states:["A"]})},Cd),yd=((dd=Ku)&&(wd.__proto__=dd),((wd.prototype=Object.create(dd&&dd.prototype)).constructor=wd).prototype.initProperties=function(){dd.prototype.initProperties.call(this),Zu(this,{name:"Code 128 B",states:["B"]})},wd),vd=((ud=Ku)&&(bd.__proto__=ud),((bd.prototype=Object.create(ud&&ud.prototype)).constructor=bd).prototype.initProperties=function(){ud.prototype.initProperties.call(this),Zu(this,{name:"Code 128 C",states:["C"]})},bd),md=((cd=Ku)&&(_d.__proto__=cd),((_d.prototype=Object.create(cd&&cd.prototype)).constructor=_d).prototype.initProperties=function(){cd.prototype.initProperties.call(this),Zu(this,{name:"Code 128",states:["C","B","A","FNC4"]})},_d),Ku=((ld=Ku)&&(xd.__proto__=ld),((xd.prototype=Object.create(ld&&ld.prototype)).constructor=xd).prototype.initProperties=function(){ld.prototype.initProperties.call(this),Zu(this,{name:"Code GS1-128",states:["FNC1","C","B"]})},xd);function xd(){ld.apply(this,arguments)}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(t){gd.call(this,t),this._initStates()}function kd(t,e,o){return t.substring(e,e+o)}var Ad,Pd,Td,Md,Od,Bd,Rd,Ed=Object.assign,Ld=((Rd=ps)&&(Zd.__proto__=Rd),((Zd.prototype=Object.create(Rd&&Rd.prototype)).constructor=Zd).prototype.initProperties=function(){Rd.prototype.initProperties.call(this),Ed(this,{characterMap:["12121212","12121221","12122112","12122121","12211212","12211221","12212112","12212121","21121212","21121221"],START:"21",STOP:"121",checkSumType:"",checkSums:jd})},Zd.prototype.initValue=function(t,e){this.pattern=[],this.value=t,this.checkSumLength=0,this.width=e},Zd.prototype.setBaseUnit=function(){this.baseUnit=this.width/(12*(this.value.length+this.checkSumLength)+this.quietZoneLength+7)},Zd.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()},Zd.prototype.addCharacter=function(t){var e=this.characterMap[t];e||this.invalidCharacterError(t),this.addPattern(e)},Zd.prototype.addPattern=function(t){for(var e=0;e<t.length;e++)this.pattern.push(parseInt(t.charAt(e),10))},Zd.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]])},Zd),Id=((Bd=Ld)&&(Yd.__proto__=Bd),((Yd.prototype=Object.create(Bd&&Bd.prototype)).constructor=Yd).prototype.initProperties=function(){Bd.prototype.initProperties.call(this),Ed(this,{name:"MSI Modulo10",checkSumType:"Modulo10"})},Yd),zd=((Od=Ld)&&(qd.__proto__=Od),((qd.prototype=Object.create(Od&&Od.prototype)).constructor=qd).prototype.initProperties=function(){Od.prototype.initProperties.call(this),Ed(this,{name:"MSI Modulo11",checkSumType:"Modulo11"})},qd),Vd=((Md=Ld)&&(Xd.__proto__=Md),((Xd.prototype=Object.create(Md&&Md.prototype)).constructor=Xd).prototype.initProperties=function(){Md.prototype.initProperties.call(this),Ed(this,{name:"MSI Modulo10 Modulo10",checkSumType:"Modulo10Modulo10"})},Xd),Ld=((Td=Ld)&&(Wd.__proto__=Td),((Wd.prototype=Object.create(Td&&Td.prototype)).constructor=Wd).prototype.initProperties=function(){Td.prototype.initProperties.call(this),Ed(this,{name:"MSI Modulo11 Modulo10",checkSumType:"Modulo11Modulo10"})},Wd),jd={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))}},Dd=Object.assign,ps=((Pd=ps)&&(Gd.__proto__=Pd),((Gd.prototype=Object.create(Pd&&Pd.prototype)).constructor=Gd).prototype.initProperties=function(){Pd.prototype.initProperties.call(this),Dd(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]}})},Gd.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},Gd.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)},Gd.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)},Gd.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])},Gd.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},Gd),Hd=Object.assign,Ud=((Ad=ps)&&(Nd.__proto__=Ad),((Nd.prototype=Object.create(Ad&&Ad.prototype)).constructor=Nd).prototype.initProperties=function(){Ad.prototype.initProperties.call(this),Hd(this,{name:"EAN 8"})},Nd.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)},Nd),Fd={code11:Go,code39:Dr,code39extended:fl,code93:Er,code93extended:o,code128:md,code128a:Qu,code128b:yd,code128c:vd};function Nd(){Ad.apply(this,arguments)}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(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}Fd["gs1-128"]=Ku,Fd.msimod10=Id,Fd.msimod11=zd,Fd.msimod1010=Vd,Fd.msimod1110=Ld,Fd.postnet=Pr,Fd.ean8=Ud,Fd.ean13=ps;(Kd=b.Class)&&($d.__proto__=Kd),(($d.prototype=Object.create(Kd&&Kd.prototype)).constructor=$d).prototype.destroy=function(){this._destroySurface()},$d.prototype._initElement=function(){R(this.element,"k-barcode")},$d.prototype._initSurface=function(){var t=this.options,e=this.surface;e&&e.options.type===t.renderAs||(this._destroySurface(),this._initSurfaceElement(),this.surface=this._createSurface())},$d.prototype._createSurface=function(){return b.drawing.Surface.create(this.surfaceElement,{type:this.options.renderAs})},$d.prototype._destroySurface=function(){this.surface&&(this.surface.destroy(),this.surface=null,this._destroySurfaceElement())},$d.prototype._initSurfaceElement=function(){this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.surfaceElement.style.position="relative",this.element.appendChild(this.surfaceElement))},$d.prototype._destroySurfaceElement=function(){this.surfaceElement&&this.surfaceElement.parentNode&&(this.surfaceElement.parentNode.removeChild(this.surfaceElement),this.surfaceElement=null)},$d.prototype.setOptions=function(t){this._setOptions(t),this._initSurface(),this.redraw()},$d.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)},$d.prototype.getSize=function(){return{width:this.element.offsetWidth,height:this.element.offsetHeight}},$d.prototype._resize=function(){this.redraw()},$d.prototype.createVisual=function(){this.visual=this._render()},$d.prototype._render=function(){var t,e=this.options,o=e.value,i=e.text,r=q(i.margin),n=this._getSize(),s=e.border||{},a=this.encoding,s=new C(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&&w(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},$d.prototype.exportVisual=function(){return this._render()},$d.prototype._getSize=function(){var t=Qd(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},$d.prototype.value=function(t){if(!w(t))return this.options.value;this.options.value=String(t),this.redraw()},$d.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=N(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},$d.prototype._getBackground=function(t){var e=this.options,o=e.border||{},t=new C(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}})},$d.prototype._getText=function(t){var e=this.options.text,t=this._textbox=new Te(t,{font:e.font,color:e.color,align:"center",vAlign:"bottom",margin:e.margin});return t.reflow(this.contentBox),t.renderVisual(),t.visual},$d.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),!Fd[this.type])throw new Error("Encoding '"+this.type+"' is not supported.");this.encoding=new Fd[this.type],this.options=m({},this.options,t)};var Kd,Go=$d;function $d(t,e,o){void 0===o&&(o=Dt),Kd.call(this),this.options=m({},this.options,e),this.element=t,this.onError=o,this._initElement(),this._initSurface(),this._setOptions(e),e&&w(e.value)&&this.redraw()}i(Go,{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 Jd(t,e){if(void 0===e&&(e=ef),!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"),!Fd[o])throw new Error("Encoding '"+t+"' is not supported.");var r,n,s,t=new Fd[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 tf=Go,ef={width:500,height:100},of=Object.assign;function rf(t,e){for(var o=[],i=0;i<t.length;)o.push(t.substring(i,i+e)),i+=e;return o}function nf(t,e){t=Number(t).toString(2);return t=t.length<e?new Array(e-t.length+1).join(0)+t:t}function sf(t){return parseInt(t,2)}(df=b.Class)&&(Sf.__proto__=df),((Sf.prototype=Object.create(df&&df.prototype)).constructor=Sf).prototype.move=function(){this.row+=this.dir*this.c,this.c^=1,this.column=this.startColumn-this.c},Sf.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}},Sf.prototype.getNextRemainderCell=function(){if(this.move(),void 0===this.matrix[this.row][this.column])return{row:this.row,column:this.column}};var af,hf,pf,lf,cf,uf,df,ff=Sf,gf=((uf=b.Class)&&(Cf.__proto__=uf),(Cf.prototype=Object.create(uf&&uf.prototype)).constructor=Cf),yf=((cf=b.Class)&&(wf.__proto__=cf),((wf.prototype=Object.create(cf&&cf.prototype)).constructor=wf).prototype.getEncodingResult=function(n,t){var e=function(){var t,e=[],o=0,i=n;for(e.push(eg(i,Gf,Wf,Xf,t)),t=e[0].mode,i=i.substr(e[0].modeString.length);0<i.length;){var r=eg(i,qf,Yf,Zf,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=og(function(t){for(var e=0,o=0;o<t.length;o++)e+=vf[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+=vf[t[i].mode].encode(t[i].modeString,e);return o}(e,t);return new gf(e,t)},wf),Dr=((lf=b.Class)&&(bf.__proto__=lf),((bf.prototype=Object.create(lf&&lf.prototype)).constructor=bf).prototype.initProperties=function(){of(this,{modeIndicator:"",bitsInCharacterCount:[]})},bf.prototype.getVersionIndex=function(t){return t<10?0:26<t?2:1},bf.prototype.getBitsCharacterCount=function(t){return this.bitsInCharacterCount[this.getVersionIndex(t||40)]},bf.prototype.getModeCountString=function(t,e){return this.modeIndicator+nf(t,this.getBitsCharacterCount(e))},bf.prototype.encode=function(){},bf.prototype.getStringBitsLength=function(){},bf.prototype.getValue=function(){},bf),fl=((pf=Dr)&&(_f.__proto__=pf),((_f.prototype=Object.create(pf&&pf.prototype)).constructor=_f).prototype.initProperties=function(){pf.prototype.initProperties.call(this),of(this,{bitsInCharacterCount:[10,12,14],modeIndicator:"0001"})},_f.prototype.getValue=function(t){return parseInt(t,10)},_f.prototype.encode=function(t,e){for(var o=rf(t,3),i=this.getModeCountString(t.length,e),r=0;r<o.length-1;r++)i+=nf(o[r],10);return i+nf(o[r],1+3*o[r].length)},_f.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)},_f),Er=((hf=Dr)&&(xf.__proto__=hf),((xf.prototype=Object.create(hf&&hf.prototype)).constructor=xf).prototype.initProperties=function(){hf.prototype.initProperties.call(this),of(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"})},xf.prototype.getValue=function(t){return this.characters[t]},xf.prototype.encode=function(t,e){for(var o=rf(t,2),i=this.getModeCountString(t.length,e),r=0;r<o.length-1;r++)i+=nf(45*this.getValue(o[r].charAt(0))+this.getValue(o[r].charAt(1)),11);return i+nf(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)},xf.prototype.getStringBitsLength=function(t,e){return 4+this.getBitsCharacterCount(e)+11*Math.floor(t/2)+t%2*6},xf),o=((af=Dr)&&(mf.__proto__=af),((mf.prototype=Object.create(af&&af.prototype)).constructor=mf).prototype.initProperties=function(){af.prototype.initProperties.call(this),of(this,{bitsInCharacterCount:[8,16,16],modeIndicator:"0100"})},mf.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+'".')},mf.prototype.encode=function(t,e){for(var o=this.getModeCountString(t.length,e),i=0;i<t.length;i++)o+=nf(this.getValue(t.charAt(i)),8);return o},mf.prototype.getStringBitsLength=function(t,e){return 4+this.getBitsCharacterCount(e)+8*t},mf),vf={};function mf(){af.apply(this,arguments)}function xf(){hf.apply(this,arguments)}function _f(){pf.apply(this,arguments)}function bf(){lf.call(this),this.initProperties()}function wf(){cf.apply(this,arguments)}function Cf(t,e){uf.call(this),this.dataString=t,this.version=e}function Sf(t){df.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}vf.numeric=new fl,vf.alphanumeric=new Er,vf.byte=new o;(kf=b.Class)&&(Kf.__proto__=kf),((Kf.prototype=Object.create(kf&&kf.prototype)).constructor=Kf).prototype.initProperties=function(){of(this,{encodingMode:"byte",utfBOM:"111011111011101110111111",initialModeCountStringLength:20,ranges:[128,2048,65536,2097152,67108864]})},Kf.prototype.getEncodingResult=function(t,e){t=this.encode(t),e=og(this.getDataCodewordsCount(t),e),t=this.mode.getModeCountString(t.length/8,e)+t;return new gf(t,e)},Kf.prototype.getDataCodewordsCount=function(t){t=t.length;return Math.ceil((this.initialModeCountStringLength+t)/8)},Kf.prototype.encode=function(t){for(var e=this.utfBOM,o=0;o<t.length;o++)e+=this.encodeCharacter(t.charCodeAt(o));return e},Kf.prototype.encodeCharacter=function(t){var e=this.getBytesCount(t),o=e-1,i="";if(1===e)i=nf(t,8);else{for(var e=8-e,r=0;r<o;r++)i=nf(t>>6*r&63|128,8)+i;i=(t>>6*o|255>>e<<e).toString(2)+i}return i},Kf.prototype.getBytesCount=function(t){for(var e=this.ranges,o=0;o<e.length;o++)if(t<e[o])return o+1};var kf,Af=Kf,Pf=[{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}}],Tf="numeric",Mf="alphanumeric",Of="byte",Bf={1:0},Rf={0:1},Ef={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},Lf=[1,0,1,1,1],If=[1,0,1],zf={L:"01",M:"00",Q:"11",H:"10"},Vf=["11101100","00010001"],jf=93,Df=[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}],Hf=/^\d+/,Uf=new RegExp("^[A-Z $%*+./:-]+"),Ff=new RegExp("^[A-Z0-9 $%*+./:-]+"),Nf=new RegExp("^[^A-Z0-9 $%*+./:-]+"),Gf=8,Wf=5,Xf=8,qf=17,Yf=9,Zf=16,Qf=[[1,0],[1,25,0]];function Kf(){kf.call(this),this.initProperties(),this.mode=vf[this.encodingMode]}function $f(t,e,o,i){for(var r=0;r<t.length;r++)t[r][o][i]=e}function Jf(t,e,o,i){for(var r=0;r<Df.length;r++)t[r][o][i]=Df[r](o,i)?1^e:parseInt(e,10)}function tg(t,e){for(var o,i=Qf[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]=Rf[(t[i]+e)%255],void 0!==t[--i];);return o}(n,Bf[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]=nf(r[h],8);return a}function eg(t,e,o,i,r){var n,s=Hf.exec(t),s=s?s[0]:"",a=Uf.exec(t),a=a?a[0]:"",h=Ff.exec(t),h=h?h[0]:"",e=s&&(s.length>=e||t.length===s.length||s.length>=o&&!Ff.test(t.charAt(s.length)))?(n=Tf,s):h&&(t.length===h.length||h.length>=i||r===Mf)?(n=Mf,s||a):(n=Of,h?h+Nf.exec(t.substring(h.length))[0]:Nf.exec(t)[0]);return{mode:n,modeString:e}}function og(t,e){for(var o=0,i=Pf.length-1,r=Math.floor(Pf.length/2);t<Pf[r][e].totalDataCodewords?i=r:o=r,r=o+Math.floor((i-o)/2),1<i-o;);return t<=Pf[o][e].totalDataCodewords?r+1:i+1}function ig(t,e,o){var i=sf(e),e=e.length-1,r=t<<e,t=nf(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+nf(o,e)}function rg(t,e){return parseInt(t.charAt(e),10)}function ng(t,e){for(var o=t[0],i=0,r=e.length,n=0,s=8;n<=8;n++)6!==n&&$f(t,rg(e,r-1-i++),n,s);for(n=8,s=7;0<=s;s--)6!==s&&$f(t,rg(e,r-1-i++),n,s);for(i=0,s=o.length-1,n=8;s>=o.length-8;s--)$f(t,rg(e,r-1-i++),n,s);for($f(t,1,o.length-8,8),n=o.length-7,s=8;n<o.length;n++)$f(t,rg(e,r-1-i++),n,s)}function sg(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,$f(t,r=rg(e,e.length-h-1),0+o,s+i),$f(t,r,a+i,0+o)}function ag(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++)$f(t,r=e[a],o+h,i+a),$f(t,r,o+a,i+h),$f(t,r,o+s-h,i+s-a),$f(t,r,o+s-a,i+s-h)}function hg(t,e,o,i){for(var r=o,n=i,s=t[0];$f(t,0,r,i),$f(t,0,o,n),r+=e[0],n+=e[1],0<=r&&r<s.length;);}function pg(t,e,o,i,r){e[t][i]=(e[t][i]<<1^r)%128,e[t][i]===jf&&(o[t]+=40)}function lg(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 cg(l,c,t){var t=(new(t&&0<=t.toLowerCase().indexOf("utf_8")?Af:yf)).getEncodingResult(l,c),r=t.version,u=Pf[r-1][c],l=function(l,t){for(var e,o=0,i=[],r=[],n=t.groups,s=0;s<n.length;s++)for(var c=n[s][0],a=0;a<c;a++){for(var h=n[s][1],u=[],d=[],p=1;p<=h;p++)e=l.substring(o,o+8),u.push(e),d[h-p]=sf(e),o+=8;i.push(u),r.push(tg(d,t.errorCodewordsPerBlock))}return[i,r]}(function(t){for(var e=8*u.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+=Vf[i],i^=1;return r}(t.dataString),u),t=function(){for(var t=[],e=17+4*r,o=0;o<Df.length;o++){t[o]=new Array(e);for(var i=0;i<e;i++)t[o][i]=new Array(e)}return t}(),d=(i=(e=t)[0].length,ag(e,Lf,0,0),hg(e,[-1,-1],7,7),ag(e,Lf,i-7,0),hg(e,[1,-1],i-8,7),ag(e,Lf,0,i-7),hg(e,[-1,1],7,i-8),t),e=r;if(!(e<2)){var o,f=d[0],g=f.length,i=Math.floor(e/7),n=[6],y=0;for((e=Ef[e])?o=(g-13-e)/i:e=o=(g-13)/(i+1),n.push(n[y++]+e);n[y]+o<g;)n.push(n[y++]+o);for(var s=0;s<n.length;s++)for(var a=0;a<n.length;a++)void 0===f[n[s]][n[a]]&&ag(d,If,n[s]-2,n[a]-2)}for(var v=t,m=1,x=v[0].length,_=8;_<x-8;_++)$f(v,m,6,_),$f(v,m,_,6),m^=1;7<=r&&sg(t,nf(0,18)),ng(t,nf(0,15));for(var h,b,p,w=t,C=l,S=new ff(w[0]),k=0;k<C.length;k++)for(h=C[k],b=0;0<h.length;){for(var A=0;A<h.length;A++)for(var P=0;P<8;P++)p=S.getNextCell(),Jf(w,h[A][b].charAt(P),p.row,p.column);for(b++;h[0]&&b===h[0].length;)h.splice(0,1)}for(;p=S.getNextRemainderCell();)Jf(w,0,p.row,p.column);i=function(l){for(var t,e=[],o=[],c=[],u=[],d=[],i=l[0].length,r=0;r<l.length;r++)e[r]=0,c[r]=0,d[r]=[0,0],u[r]=[0,0],o[r]=[];for(var n=0;n<i;n++)for(var s=0;s<i;s++)for(var a=0;a<l.length;a++)t=l[a],c[a]+=parseInt(t[n][s],10),o[a][0]===t[n][s]&&n+1<i&&0<=s-1&&t[n+1][s]===o[a][0]&&t[n+1][s-1]===o[a][0]&&(e[a]+=3),pg(a,u,e,0,t[n][s]),pg(a,u,e,1,t[s][n]),lg(a,e,o,t[n][s],d,0),lg(a,e,o,t[s][n],d,1);var f,h,p,g,y=i*i,v=Number.MAX_VALUE;for(r=0;r<e.length;r++)e[r]+=(h=c[r],p=y,g=void 0,p=(h=Math.floor(h/p*100))%5,g=Math.abs(h-p-50),h=Math.abs(h+5-p-50),10*Math.min(g/5,h/5)),e[r]<v&&(v=e[r],f=r);return f}(t),e=t[i];return 7<=r&&sg([e],ig(r,"1111100100101",18)),ng([e],function(t){var e="";if(0===sf(t))return"101010000010010";for(var o=ig(sf(t),"10100110111",15),i=0;i<o.length;i++)e+=o.charAt(i)^"101010000010010".charAt(i);return e}(zf[c]+nf(i,3))),e}for(var ug,dg=1;dg<255;dg++)255<(ug=2*Rf[dg-1])&&(ug^=285),Rf[dg]=ug,Bf[ug]=dg;ug=2*Rf[dg-1]^285,Rf[dg]=ug,Rf[-1]=0;for(var fg=2;fg<=68;fg++){var gg=Qf[fg-1];Qf[fg]=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]=Bf[Rf[o[i+r]]^Rf[(t[i]+e[r])%255]];return o}(gg,[fg,0])}var yg,vg=Math.round,mg=[[0,1],[1,1],[1,2],[2,2],[2,1],[3,1],[3,0],[2,0],[2,-1],[1,-1],[1,0]],xg=[[0,1],[1,1],[1,0]],md=((yg=b.Class)&&(_g.__proto__=yg),((_g.prototype=Object.create(yg&&yg.prototype)).constructor=_g).prototype.destroy=function(){this._destroySurface()},_g.prototype._initElement=function(){R(this.element,"k-qrcode")},_g.prototype._initSurface=function(){var t=this.options,e=this.surface;e&&e.options.type===t.renderAs||(this._destroySurface(),this._initSurfaceElement(),this.surface=this._createSurface())},_g.prototype._createSurface=function(){return b.drawing.Surface.create(this.surfaceElement,{type:this.options.renderAs})},_g.prototype._destroySurface=function(){this.surface&&(this.surface.destroy(),this.surface=null,this._destroySurfaceElement())},_g.prototype._initSurfaceElement=function(){this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.surfaceElement.style.position="relative",this.element.appendChild(this.surfaceElement))},_g.prototype._destroySurfaceElement=function(){this.surfaceElement&&this.surfaceElement.parentNode&&(this.surfaceElement.parentNode.removeChild(this.surfaceElement),this.surfaceElement=null)},_g.prototype.redraw=function(){var t=this._getSize();this.surface.clear(),this.surface.setSize({width:t,height:t}),this.createVisual(),this.surface.draw(this.visual)},_g.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},_g.prototype._resize=function(){this.redraw()},_g.prototype.createVisual=function(){this.visual=this._render()},_g.prototype.exportVisual=function(){return this._render()},_g.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=cg(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},_g.prototype._renderLogo=function(t,e){var t=vg(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)},_g.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),xg,"#fff")),n.x=n.y=t-o/2,s.append(this._renderShape(n,o,xg,this.options.color)),n.x=t+r-o/2,n.y=t+r+i-o/2,s.append(this._renderShape(n,i,mg,"#fff")),s},_g.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},_g.prototype._getSize=function(){var t;return this.options.size?parseInt(this.options.size,10):(t=Qd(this.element,this.options.renderAs),0<(t=Math.min(t.width,t.height))?t:200)},_g.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},_g.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=vg(o+a*e),h=vg(n),p=vg(o+s*e),l=vg(n+e);i.moveTo(a,h).lineTo(a,l).lineTo(p,l).lineTo(p,h).close()}}return i},_g.prototype._renderBackground=function(t,e){t=new C(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}})},_g.prototype.setOptions=function(t){this.options=of(this.options,t||{}),void 0!==t.value&&(this._value=String(this.options.value)),this._initSurface(),this.redraw()},_g.prototype.value=function(t){if(void 0===t)return this._value;this._value=String(t),this.redraw()},_g.prototype._hasCustomLogo=function(){return Boolean(this.options.overlay.imageUrl)},_g.prototype._isSwiss=function(){return"swiss"===this.options.overlay.type},_g.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}},_g);function _g(t,e,o){void 0===o&&(o=Dt),yg.call(this),this.options=m({},this.options,e),this.element=t,this.wrapper=this.element,this.onError=o,this._initElement(),this._initSurface(),this.setOptions(e)}i(md,{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 bg(e){return void 0===e&&(e="ISO_8859_1"),function(t){try{cg(t,"L",e)}catch(t){return{valid:!1,error:t}}return{valid:!0}}}var wg=md,Cg={WGS84:{a:6378137,b:6356752.314245179,f:.0033528106647474805,e:.08181919084262149}};function Sg(t){return t*t}var kg,Ag,Pg=Math,Tg=Pg.abs,Mg=Pg.atan,Og=Pg.atan2,Bg=Pg.cos,Rg=Pg.sin,Eg=Pg.tan,Lg=((Ag=b.Class)&&(Yg.__proto__=Ag),((Yg.prototype=Object.create(Ag&&Ag.prototype)).constructor=Yg).prototype.initProperties=function(){m(this,{DISTANCE_ITERATIONS:100,DISTANCE_CONVERGENCE:1e-12,DISTANCE_PRECISION:2,FORMAT:"{0:N6}{1:N6}"})},Yg.prototype.toArray=function(){return[this.lat,this.lng]},Yg.prototype.equals=function(t){return t&&t.lat===this.lat&&t.lng===this.lng},Yg.prototype.clone=function(){return new Yg(this.lat,this.lng)},Yg.prototype.round=function(t){return this.lng=k(this.lng,t),this.lat=k(this.lat,t),this},Yg.prototype.wrap=function(){return this.lng=this.lng%180,this.lat=this.lat%90,this},Yg.prototype.distanceTo=function(t,e){return this.greatCircleTo(t,e).distance},Yg.prototype.destination=function(t,e,o){var e=St(e),o=o||Cg.WGS84,i=St(this.lat),r=St(this.lng),t=t/o.a,o=Pg.asin(Rg(i)*Bg(t)+Bg(i)*Rg(t)*Bg(e)),r=r+Og(Rg(e)*Rg(t)*Bg(i),Bg(t)-Rg(i)*Rg(o));return new Yg(gt(o),gt(r))},Yg.prototype.greatCircleTo=function(l,t){var e=Yg.create(void 0),t=t||Cg.WGS84;if(!e||this.clone().round(8).equals(e.clone().round(8)))return{distance:0,azimuthFrom:0,azimuthTo:0};for(var o,c,i=t.a,u=t.b,r=t.f,d=St(e.lng-this.lng),t=Mg((1-r)*Eg(St(this.lat))),n=Rg(t),s=Bg(t),t=Mg((1-r)*Eg(St(e.lat))),a=Rg(t),h=Bg(t),f=d,g=this.DISTANCE_ITERATIONS,y=!1;!y&&0<g--;)var v=Rg(f),m=Bg(f),x=Pg.sqrt(Sg(h*v)+Sg(s*a-n*h*m)),_=Og(x,c=n*a+s*h*m),b=s*h*v/x,p=0,w=(0!=(o=1-Sg(b))&&(p=c-2*n*a/o),f),C=r/16*o*(4+r*(4-3*o)),f=d+(1-C)*r*b*(_+C*x*(p+C*c*(2*Sg(p)-1))),y=Tg(f-w)<=this.DISTANCE_CONVERGENCE;var e=o*(Sg(i)-Sg(u))/Sg(u),t=1+e/16384*(4096+e*(e*(320-175*e)-768)),i=e/1024*(256+e*(e*(74-47*e)-128)),e=i*x*(p+i/4*(c*(2*Sg(p)-1)-i/6*p*(4*Sg(x)-3)*(4*Sg(p)-3))),i=Og(h*v,s*a-n*h*m),S=Og(s*v,-n*h+s*a*m);return{distance:k(u*t*(_-e),this.DISTANCE_PRECISION),azimuthFrom:gt(i),azimuthTo:gt(S)}},Yg.prototype.toString=function(){return String(this.lat)+","+String(this.lng)},Yg.fromLngLat=function(t){return new Yg(t[1],t[0])},Yg.fromLatLng=function(t){return new Yg(t[0],t[1])},Yg.create=function(t,e){if(w(t))return t instanceof Yg?t.clone():1===arguments.length&&2===t.length?Yg.fromLatLng(t):new Yg(t,e)},Yg),Ig=Math,zg=Ig.atan,Vg=Ig.exp,jg=Ig.pow,Dg=Ig.sin,Hg=Ig.log,Ug=Ig.tan,Fg=b.geometry.Point,Ng=Ig.PI,Gg=Ng/2,Wg=Ng/4,Xg=Ng/180,Qu=Cg.WGS84,yd=((kg=b.Class)&&(qg.__proto__=kg),((qg.prototype=Object.create(kg&&kg.prototype)).constructor=qg).prototype._initOptions=function(t){this.options=m({},this.options,t)},qg.prototype.initProperties=function(){m(this,{MAX_LNG:180,MAX_LAT:85.0840590501,INVERSE_ITERATIONS:15,INVERSE_CONVERGENCE:1e-12})},qg.prototype.forward=function(t,e){var o=this.options,i=o.datum.a,o=o.centralMeridian,r=wt(t.lat,-this.MAX_LAT,this.MAX_LAT),e=e?wt(t.lng,-this.MAX_LNG,this.MAX_LNG):t.lng,t=St(e-o)*i,e=this._projectLat(r);return new Fg(t,e)},qg.prototype._projectLat=function(t){var e=this.options.datum,o=e.e,e=e.a,t=St(t),i=Ug(Wg+t/2),t=o*Dg(t),t=jg((1-t)/(1+t),o/2);return e*Hg(i*t)},qg.prototype.inverse=function(t,e){var o=this.options,i=o.datum.a,o=o.centralMeridian,i=t.x/(Xg*i)+o,o=wt(this._inverseY(t.y),-this.MAX_LAT,this.MAX_LAT);return e&&(i=wt(i,-this.MAX_LNG,this.MAX_LNG)),new Lg(o,i)},qg.prototype._inverseY=function(t){for(var e=this.options.datum,o=e.a,i=e.e,r=i/2,n=Vg(-t/o),s=Gg-2*zg(n),a=0;a<=this.INVERSE_ITERATIONS;a++){var h=i*Dg(s),h=jg((1-h)/(1+h),r),h=Gg-2*zg(n*h)-s;if(s+=h,Ig.abs(h)<=this.INVERSE_CONVERGENCE)break}return gt(s)},qg);function qg(t){kg.call(this),this.initProperties(),this._initOptions(t)}function Yg(t,e){Ag.call(this),this.initProperties(),1===arguments.length?(this.lat=t[0],this.lng=t[1]):(this.lat=t,this.lng=e)}i(yd,{centralMeridian:0,datum:Qu});function Zg(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function Qg(t,e){e.insertBefore(t,e.firstChild)}function Kg(t){return t.replace(/([a-z][A-Z])/g,function(t){return t.charAt(0)+"-"+t.charAt(1).toLowerCase()})}function $g(t){return t&&String(t).endsWith("px")?t:String(t)+"px"}(ey=yd)&&(py.__proto__=ey),((py.prototype=Object.create(ey&&ey.prototype)).constructor=py).prototype.initProperties=function(){ey.prototype.initProperties.call(this),m(this,{MAX_LAT:85.0511287798})},py.prototype._projectLat=function(t){var e=this.options.datum.a,t=St(t),t=Ug(Wg+t/2);return e*Hg(t)},py.prototype._inverseY=function(t){var e=this.options.datum.a,t=Vg(-t/e);return gt(Gg-2*zg(t))};var Jg,ty,ey,oy=py,iy=((ty=b.Class)&&(hy.__proto__=ty),((hy.prototype=Object.create(ty&&ty.prototype)).constructor=hy).prototype.forward=function(t){return new Fg(t.lng,t.lat)},hy.prototype.inverse=function(t){return new Lg(t.y,t.x)},(Jg=b.Class)&&(ay.__proto__=Jg),((ay.prototype=Object.create(Jg&&Jg.prototype)).constructor=ay).prototype.toPoint=function(t,e,o){return this._proj.forward(t,o).transform(this._tm).scale(e||1)},ay.prototype.toLocation=function(t,e,o){t=t.clone().scale(1/(e||1)).transform(this._itm);return this._proj.inverse(t,o)},ay),ry=(b.Class,b.Class,Object.defineProperty),ny=(Object.assign,function(t){var e=document.createElement("div");return e.innerHTML=t,e.firstChild}),sy=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=ly(o,a,!1),i.browser=ly(t,h,"default"),i.name=ly(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 ay(){Jg.call(this);var t=this._proj=new oy,t=this.c=2*Ng*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 hy(){ty.apply(this,arguments)}function py(){ey.apply(this,arguments)}function ly(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 cy(t,e){return t.bind(e)}function uy(t,e,o,i,r){Sy(t,e,o,i,r)}function dy(t,e,o,i,r){var n,s,a;n=t,s=o,a=i,(B(t=e)?t:(t||"").split(" ")).forEach(function(t){ky(n,t,s,a)})}function fy(t){var e=wy(navigator.userAgent);return t.replace(/([^ ]+)/g,function(t){return e[t]||t})}function gy(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 yy(){return Number(new Date)}function vy(){}function my(){this._defaultPrevented=!0}function xy(){return!0===this._defaultPrevented}var _y,by,wy=function(){var t={down:"touchstart mousedown",move:"mousemove touchmove",up:"mouseup touchend touchcancel",cancel:"mouseleave touchcancel"},e=Cy();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},Cy=function(){var t=sy(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},Sy=function(s,t,a,h,p){(B(t)?t:(t||"").split(" ")).forEach(function(t){var o,e,i,r,n;n=i=h,(e=a)&&H(e)&&!i?n=e:e&&"string"==typeof e&&H(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,ry(t,"currentTarget",{value:e}),ry(t,"delegateTarget",{value:o}),n(t))},Boolean(p))})},ky=function(t,e,o,i){t.removeEventListener(e,o,Boolean(i))},vd=((by=b.Class)&&(My.__proto__=by),((My.prototype=Object.create(by&&by.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=my,n.isDefaultPrevented=xy,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),Ay=Q.compile,Py=((_y=vd)&&(Ty.__proto__=_y),((Ty.prototype=Object.create(_y&&_y.prototype)).constructor=Ty).prototype._initOptions=function(t){this.options=m({},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;w(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=[],Zg(this.element)},Ty.prototype._render=function(){for(var t=[],e=Ay(this.options.itemTemplate),o=0;o<this.items.length;o++){var i=this.items[o],i=this._itemText(i);""!==i&&t.push(e({text:i}))}if(0<t.length){Zg(this.element);var r=t.join(this.options.separator),n=this.element,s=document.createElement("div");for(s.innerHTML=r;0<s.childNodes.length;)n.appendChild(s.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=At(t,-Number.MAX_VALUE),e=At(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){_y.call(this),this.element=t,this._initOptions(e),this.items=[],R(this.element,"k-widget k-attribution")}function My(){by.call(this),this._events={}}i(Py,{name:"Attribution",separator:" | ",itemTemplate:"#= text #"});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 ny(t)}(Ry=vd)&&(Ly.__proto__=Ry),((Ly.prototype=Object.create(Ry&&Ry.prototype)).constructor=Ly).prototype.destroy=function(){this.dispose()},Ly.prototype.dispose=function(){dy(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=m({},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 Ht.UP:this._pan(0,1),t.preventDefault();break;case Ht.DOWN:this._pan(0,-1),t.preventDefault();break;case Ht.RIGHT:this._pan(1,0),t.preventDefault();break;case Ht.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),R(this.element,"k-widget k-navigator"),uy(this.element,"click",".k-button",cy(this._click,this)),this.element.parentNode.closest("[data-role]"));this._keyroot=t||this.element,this._tabindex(this._keyroot),this._keydownHandler=cy(this._keydown,this),uy(this._keyroot,"keydown",this._keydownHandler)}function Iy(t,e){return ny('<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}),gy(Ey,["pan"]);(zy=vd)&&(jy.__proto__=zy),((jy.prototype=Object.create(zy&&zy.prototype)).constructor=jy).prototype.destroy=function(){this.element&&dy(this.element,"click",this._clickHandler),this._keyroot&&dy(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=m({},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;ot(t.currentTarget,"k-zoom-out")&&(e=-1),this._change(e),t.preventDefault()},jy.prototype._keydown=function(t){switch(t.which){case Ht.NUMPAD_PLUS:case 187:case 61:this._change(1);break;case Ht.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),R(this.element,"k-widget k-zoom-control k-button-group k-group-horizontal"),this._clickHandler=this._click.bind(this),uy(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),uy(this._keyroot,"keydown",this._keydownHandler)}i(Vy,{name:"ZoomControl",zoomStep:1}),gy(Vy,["change"]);var Dy,Hy,Ku=Math,Uy=Ku.max,Fy=Ku.min,Ny=((Hy=b.Class)&&(Yy.__proto__=Hy),Id={World:{configurable:!0}},((Yy.prototype=Object.create(Hy&&Hy.prototype)).constructor=Yy).prototype.contains=function(t){var e=this.nw,o=this.se,i=At(t.lng,t[1]),r=At(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},Yy.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 Lg(e,o)},Yy.prototype.containsAny=function(t){for(var e=!1,o=0;o<t.length;o++)e=e||this.contains(t[o]);return e},Yy.prototype.include=function(t){var e=this.nw,o=this.se,i=At(t.lng,t[1]),t=At(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)},Yy.prototype.includeAll=function(t){for(var e=0;e<t.length;e++)this.include(t[e])},Yy.prototype.edges=function(){var t=this.nw,e=this.se;return{nw:this.nw,ne:new Lg(t.lat,e.lng),se:this.se,sw:new Lg(e.lat,t.lng)}},Yy.prototype.toArray=function(){var t=this.nw,e=this.se;return[t,new Lg(t.lat,e.lng),e,new Lg(e.lat,t.lng)]},Yy.prototype.overlaps=function(t){return this.containsAny(t.toArray())||t.containsAny(this.toArray())},Yy.create=function(t,e){return t instanceof Yy?t:t&&e?new Yy(t,e):t&&4===t.length&&!e?new Yy([t[0],t[1]],[t[2],t[3]]):void 0},Id.World.get=function(){return new Yy([90,-180],[-90,180])},Object.defineProperties(Yy,Id),Yy),zd=((Dy=b.Class)&&(qy.__proto__=Dy),((qy.prototype=Object.create(Dy&&Dy.prototype)).constructor=qy).prototype.destroy=function(){this._deactivate()},qy.prototype._initOptions=function(t){this.options=m({},this.options,t)},qy.prototype.show=function(){this.reset(),this._activate(),this._applyExtent(!0)},qy.prototype.hide=function(){this._deactivate(),this._setVisibility(!1)},qy.prototype.reset=function(){this._beforeReset(),this._reset()},qy.prototype._reset=function(){this._applyExtent()},qy.prototype._beforeReset=function(){},qy.prototype._resize=function(){},qy.prototype._panEnd=function(){this._applyExtent()},qy.prototype._applyExtent=function(){var t=this.options,e=this.map.zoom(),o=!w(t.minZoom)||e>=t.minZoom,e=!w(t.maxZoom)||e<=t.maxZoom,t=Ny.create(t.extent),t=!t||t.overlaps(this.map.extent());this._setVisibility(o&&e&&t)},qy.prototype._setVisibility=function(t){this.element.style.display=t?"":"none"},qy.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)},qy.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)},qy.prototype._updateAttribution=function(){var t=this.map.attribution;t&&t.add(this.options.attribution)},qy.prototype._readData=function(){return this.options.data||[]},qy.prototype._hasData=function(){return this._data&&0<this._data.length},qy),Gy=Math,Wy=Q.compile,Xy=b.geometry.Point;function qy(t,e){Dy.call(this),this.support=Cy(),this._initOptions(e),this.map=t;e=document.createElement("div");R(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 Yy(t,e){Hy.call(this);t=Lg.create(t),e=Lg.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 Zy(t){var e=t;return"string"!=typeof t&&(e+="px"),e}(Qy=zd)&&(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,Vd=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(Vd,{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=m({},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 Xy(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 Xy(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(){Zg(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 Xy(k(e.x),k(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:wt(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=m({},this.options,t)},ov.prototype.createElement=function(){var t=document.createElement("img");R(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},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 Wy(this.options.urlTemplate)(this.urlOptions())},ov.prototype.errorUrl=function(){return Wy(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=_t(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=vd)&&(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=vd)&&(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=vd)&&(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=vd)&&(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=vd)&&(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,Ld=((hv=zd)&&(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?w(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=cy(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=cy(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=Cy(),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=yt(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,wy(navigator.userAgent));i.addEventListener?(t.down.split(" ").forEach(function(t){i.addEventListener(t,cy(o._press,o),!0)}),t.up.split(" ").forEach(function(t){i.addEventListener(t,cy(o._release,o),!0)})):(t.down.split(" ").forEach(function(t){i.attachEvent(t,cy(o._press,o))}),t.up.split(" ").forEach(function(t){i.attachEvent(t,cy(o._release,o))})),o.bind(["press","release"],e||{})}i(Ld,{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(bt(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(Lg.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=Lg.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,Pr=((Bv=Ld)&&(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=tt(e.valueField),i=t.slice(0);i.sort(function(t,e){return o(e)-o(t)});for(var l=this._scaleType(),c=tt(this.options.locationField),r=0;r<i.length;r++){var n,u,s,a=i[r],h=c(a),p=o(a);w(h)&&w(p)&&(n=n||new l([0,p],[e.minSize,e.maxSize]),h=Lg.create(h),s=this.map.locationToView(h),u=n.map(p),(s=this._createSymbol({center:s,size:u,style:e.style,dataItem:a,location:h})).dataItem=a,s.location=h,s.value=p,this._drawSymbol(s))}}},Lv.prototype._scaleType=function(){var t=this.options.scale;return H(t)?t:jv[t]},Lv.prototype._createSymbol=function(t){var e=this.options.symbol;return(e=H(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(Pr,{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=zd)&&(Nv.__proto__=zv),((Nv.prototype=Object.create(zv&&zv.prototype)).constructor=Nv).prototype.destroy=function(){zv.prototype.destroy.call(this),dy(this.element,"click",this._markerClickHandler),this.clear()},Nv.prototype.add=function(t){if(!B(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=tt(this.options.locationField),o=tt(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=cy(this._markerClick,this),uy(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=Lg.create(t).toArray(),this.layer&&this.layer.update(this),this):Lg.create(this.options.location)},Yv.prototype.showAt=function(t){this.render(),this.element.style.left=$g(Math.round(t.x)),this.element.style.top=$g(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=cy(this._mouseEnter,this),uy(this.element,"mouseenter",Uv,this._mouseEnterHandler),this._mouseLeaveHandler=cy(this._mouseLeave,this),uy(this.element,"mouseleave",Uv,this._mouseLeaveHandler))},Yv.prototype.unbindEvents=function(){this.element&&(dy(this.element,"mouseenter",this._mouseEnterHandler),dy(this.element,"mouseleave",this._mouseLeaveHandler))},Yv.prototype.render=function(){var t,e,o,i;this.element||(t=this.options,e=this.layer,R(o=document.createElement("span"),"k-marker k-icon k-i-marker-"+Kg(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(m({},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,Ud=um,Jv=((Kv=Ud)&&(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,yy()-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=yy(),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=cy(this._tick,this),this._started=!1}function dm(t){var e,o,i,r=Cy(),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=yy(),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(cy(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=yy(),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=yy(),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=Cy(),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=yy()}function _m(t){for(var e=wy(navigator.userAgent).up.split(" "),o=0,i=e.length;o<i;o++)t(e[o])}(Am=vd)&&(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)})),dy(o.surface,fy("move"),this._surfaceMoveHandler),dy(o.surface,fy("up cancel"),this._surfaceEndHandler),dy(i,fy("down"),this._elementStartHandler),o.useClickAsTap&&dy(i,fy("click"),this._elementClickHandler),t.preventDragEvent&&dy(i,fy("dragstart"),this._elementDragStartHandler),dy(i,fy("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 et(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:yy(),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:vy,preventDefault:vy})},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=Ud)&&(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=Ud)&&(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=Ud)&&(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&&H(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=vd)&&(zm.__proto__=bm),((zm.prototype=Object.create(bm&&bm.prototype)).constructor=zm).prototype._initOptions=function(t){this.options=m({},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;dy(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=sy(t);return t.ios||t.android}(navigator.userAgent)),e=(n._native=n.options.useNative&&e,ny('<div class="km-scroll-header"/>'));if(n._native)return R(t,"km-native-scroller"),Qg(e,t),void Tm(n,{scrollElement:t,fixedContainer:t.children[0]});t.style.overflow="hidden",R(t,"km-scroll-wrapper");var o=ny('<div class="km-scroll-container"/>'),i=t,r=o;for(i.appendChild(r);i.firstChild!==r;)r.appendChild(i.firstChild);Qg(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),uy(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=ny('<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",cy(e.start,e)),e.userEvents.bind("gestureend",cy(e.start,e)),e.userEvents.bind("tap",cy(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=Cy(),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=cy(this._move,this),uy(this.surface,fy("move"),this._surfaceMoveHandler),this._surfaceEndHandler=cy(this._end,this),uy(this.surface,fy("up cancel"),this._surfaceEndHandler),this._elementStartHandler=cy(this._start,this),uy(t,fy("down"),o,this._elementStartHandler),this.useClickAsTap&&(this._elementClickHandler=cy(this._click,this),uy(t,fy("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,uy(t,fy("dragstart"),this._elementDragStartHandler)),this._elementSelectHandler=cy(this._select,this),uy(t,fy("mousedown"),o,this._elementSelectHandler),this.captureUpIfMoved&&n.eventCapture&&(i=this.surface,r=cy(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"}}),gy(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:Pr,shape:Ld,tile:Vd};function Zm(t){var e=[];if(t)for(var o=Kg(t).split("-"),i=0;i<o.length;i++)e.push("k-pos-"+o[i]);return e.join(" ")}Ym.marker=Fv;(Qm=vd)&&(Km.__proto__=Qm),((Km.prototype=Object.create(Qm&&Qm.prototype)).constructor=Km).prototype.destroy=function(){this.scroller.destroy(),this.navigator&&this.navigator.destroy(),this.attribution&&this.attribution.destroy(),this.zoomControl&&this.zoomControl.destroy(),B(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();dy(this.element,"DOMMouseScroll mousewheel",this._mousewheelHandler),Qm.prototype.destroy.call(this)},Km.prototype._init=function(t,e,o,i){void 0===e&&(e={}),void 0===o&&(o={}),void 0===i&&(i={}),this.support=Cy(),this.context=i,this.initObserver(i),this.initServices(i),this._initOptions(e),this._setEvents(e),this.crs=new iy,this._initElement(t),this._viewOrigin=this._getOrigin(),this._initScroller(),this._initMarkers(),this._initControls(),this._initLayers(),this._reset(),this._mousewheelHandler=this._mousewheel.bind(this),uy(this.element,"DOMMouseScroll mousewheel",this._mousewheelHandler)},Km.prototype._initOptions=function(t){this.options=m({},this.options,t)},Km.prototype._initElement=function(t){R(this.element=t,"k-map"),t.style.position="relative",t.setAttribute("data-role","map"),Zg(t);t=ny("<div />");this.element.appendChild(t)},Km.prototype.initServices=function(t){this.widgetService=new Nm(this,t=void 0===t?{}:t)},Km.prototype.initObserver=function(t){void 0===t&&(t={}),this.observers=[],this.addObserver(t.observer)},Km.prototype.addObserver=function(t){t&&this.observers.push(t)},Km.prototype.removeObserver=function(t){t=this.observers.indexOf(t);0<=t&&this.observers.splice(t,1)},Km.prototype.requiresHandlers=function(t){for(var e=this.observers,o=0;o<e.length;o++)if(e[o].requiresHandlers(t))return!0},Km.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},Km.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},Km.prototype.zoom=function(t){var e=this.options,t=w(t)?(t=Gm.round(wt(t,e.minZoom,e.maxZoom)),e.zoom!==t&&(e.zoom=t,this._reset()),this):e.zoom;return t},Km.prototype.center=function(t){t=t?(this.options.center=Lg.create(t).toArray(),this._reset(),this):Lg.create(this.options.center);return t},Km.prototype.extent=function(t){t=t?(this._setExtent(t),this):this._getExtent();return t},Km.prototype.setOptions=function(t){void 0===t&&(t={});var e=this.element;this.destroy(),Zg(e),this._init(e,t,{},this.context),this._reset()},Km.prototype.locationToLayer=function(t,e){var o=!this.options.wraparound,t=Lg.create(t);return this.crs.toPoint(t,this._layerSize(e),o)},Km.prototype.layerToLocation=function(t,e){var o=!this.options.wraparound,t=qm.create(t);return this.crs.toLocation(t,this._layerSize(e),o)},Km.prototype.locationToView=function(t){var t=Lg.create(t),e=this.locationToLayer(this._viewOrigin);return this.locationToLayer(t).translateWith(e.scale(-1))},Km.prototype.viewToLocation=function(t,e){var o=this.locationToLayer(this._getOrigin(),e),t=qm.create(t).clone().translateWith(o);return this.layerToLocation(t,e)},Km.prototype.eventOffset=function(t){var e,o=yt(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=At(t.pageX,t.clientX)-o.left,At(t.pageY,t.clientY)-o.top),new b.geometry.Point(e,t)},Km.prototype.eventToView=function(t){t=this.eventOffset(t);return this.locationToView(this.viewToLocation(t))},Km.prototype.eventToLayer=function(t){return this.locationToLayer(this.eventToLocation(t))},Km.prototype.eventToLocation=function(t){t=this.eventOffset(t);return this.viewToLocation(t)},Km.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)}},Km.prototype.exportVisual=function(){return this._reset(),!1},Km.prototype._setOrigin=function(t,e){var o=this.viewSize(),t=this._origin=Lg.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},Km.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},Km.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)},Km.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)},Km.prototype._zoomAround=function(t,e){this._setOrigin(this.layerToLocation(t,e),e),this.zoom(e)},Km.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))},Km.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&&(R(o=document.createElement("div"),"k-map-controls "+Zm(t)),this.element.appendChild(e=o)),document.createElement("div"));return e.appendChild(t),t},Km.prototype._createAttribution=function(t){var e=this._createControlElement(t,"bottomRight");this.attribution=new Py(e,t)},Km.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)},Km.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=wt(o,t.x.min,t.x.max-i),e=wt(e,t.y.min,t.y.max-r);this.scroller.one("scroll",cy(this._scrollEnd,this)),this.scroller.scrollTo(-o,-e)},Km.prototype._navigatorCenter=function(){this.center(this.options.center)},Km.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)},Km.prototype._zoomControlChange=function(t){this.trigger("zoomStart",{originalEvent:t})||(this.zoom(this.zoom()+t.delta),this.trigger("zoomEnd",{originalEvent:t}))},Km.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",cy(this._scroll,this)),t.bind("scrollEnd",cy(this._scrollEnd,this)),t.userEvents.bind("gesturestart",cy(this._scaleStart,this)),t.userEvents.bind("gestureend",cy(this._scale,this)),t.userEvents.bind("doubleTap",cy(this._doubleTap,this)),t.userEvents.bind("tap",cy(this._tap,this)),this.scrollElement=t.scrollElement},Km.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)}},Km.prototype._createLayer=function(t){var e=t.type||"shape",o=this.options.layerDefaults[e],o=m({},"marker"===e?this.options.markerDefaults:o,t),t=new Ym[e](this,o);return"marker"===e&&(this.markers=t),t},Km.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))},Km.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()})},Km.prototype._scrollEnd=function(t){this._scrollOffset&&this._panComplete()&&(this._scrollOffset=null,this._panEndTimestamp=yy(),this.trigger("panEnd",{originalEvent:t,origin:this._getOrigin(),center:this.center()}))},Km.prototype._panComplete=function(){return 50<yy()-(this._panEndTimestamp||0)},Km.prototype._scaleStart=function(t){!this.trigger("zoomStart",{originalEvent:t})||(t=t.touches[1])&&t.cancel()},Km.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})},Km.prototype._scaleToZoom=function(t){t=this._layerSize()*t/this.options.minSize,t=Gm.log(t)/Gm.log(2);return Gm.round(t)},Km.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")},Km.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}},Km.prototype._renderLayers=function(){},Km.prototype._layerSize=function(t){t=At(t,this.options.zoom);return this.options.minSize*Xm(2,t)},Km.prototype._tap=function(t){var e;this._panComplete()&&(e=this.eventOffset(t),this.trigger("click",{originalEvent:t,location:this.viewToLocation(e)}))},Km.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}))},Km.prototype._mousewheel=function(t){t.preventDefault();var e=0<ct(t)?-1:1,o=this.options,i=this.zoom(),e=wt(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,ps=Km;function Km(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(ps,{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}),gy(ps,["beforeReset","click","markerActivate","markerClick","markerCreated","markerMouseEnter","markerMouseLeave","pan","panEnd","reset","shapeClick","shapeCreated","shapeFeatureCreated","shapeMouseEnter","shapeMouseLeave","zoomEnd","zoomStart"]);function $m(){return{icon:{border:{width:1}},label:{font:ox,padding:3},line:{length:10,width:2},visible:!0}}function Jm(t){return{axisDefaults:{labels:{font:ox},notes:$m(),title:{font:ix,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:$m(),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:ix},legend:{labels:{font:ox}}}}var tx,ex=ps,Go="Arial, Helvetica, sans-serif",ox="12px "+Go,ix="16px "+Go,rx=(e.d(t,"autoMajorUnit",function(){return Ut}),e.d(t,"Point",function(){return Nt}),e.d(t,"Box",function(){return C}),e.d(t,"Ring",function(){return $t}),e.d(t,"Sector",function(){return Jt}),e.d(t,"ShapeBuilder",function(){return re}),e.d(t,"ShapeElement",function(){return ue}),e.d(t,"ChartElement",function(){return ae}),e.d(t,"BoxElement",function(){return le}),e.d(t,"RootElement",function(){return ve}),e.d(t,"FloatElement",function(){return _e}),e.d(t,"Text",function(){return Ce}),e.d(t,"TextBox",function(){return Te}),e.d(t,"Title",function(){return Re}),e.d(t,"AxisLabel",function(){return Ie}),e.d(t,"Axis",function(){return Je}),e.d(t,"Note",function(){return He}),e.d(t,"CategoryAxis",function(){return zo}),e.d(t,"DateCategoryAxis",function(){return Xo}),e.d(t,"DateValueAxis",function(){return ri}),e.d(t,"NumericAxis",function(){return ei}),e.d(t,"LogarithmicAxis",function(){return pi}),e.d(t,"PolarAxis",function(){return fi}),e.d(t,"RadarCategoryAxis",function(){return ui}),e.d(t,"RadarNumericAxis",function(){return xi}),e.d(t,"RadarLogarithmicAxis",function(){return bi}),e.d(t,"CurveProcessor",function(){return ki}),e.d(t,"Gradients",function(){return de}),e.d(t,"rectToBox",function(){return Se}),e.d(t,"Aggregates",function(){return Vi}),e.d(t,"AreaChart",function(){return Jr}),e.d(t,"AreaSegment",function(){return Gr}),e.d(t,"AxisGroupRangeTracker",function(){return tn}),e.d(t,"Bar",function(){return ln}),e.d(t,"BarChart",function(){return wn}),e.d(t,"BarLabel",function(){return sn}),e.d(t,"BoxPlotChart",function(){return zn}),e.d(t,"BoxPlot",function(){return Ln}),e.d(t,"BubbleChart",function(){return Kn}),e.d(t,"Bullet",function(){return is}),e.d(t,"BulletChart",function(){return ss}),e.d(t,"CandlestickChart",function(){return Mn}),e.d(t,"Candlestick",function(){return Sn}),e.d(t,"CategoricalChart",function(){return mr}),e.d(t,"CategoricalErrorBar",function(){return cr}),e.d(t,"CategoricalPlotArea",function(){return La}),e.d(t,"Chart",function(){return Cl}),e.d(t,"ChartContainer",function(){return ms}),e.d(t,"ClipAnimation",function(){return zr}),e.d(t,"ClusterLayout",function(){return yn}),e.d(t,"Crosshair",function(){return gs}),e.d(t,"CrosshairTooltip",function(){return us}),e.d(t,"DefaultAggregates",function(){return qs}),e.d(t,"DonutChart",function(){return ip}),e.d(t,"DonutPlotArea",function(){return rp}),e.d(t,"DonutSegment",function(){return $h}),e.d(t,"ErrorBarBase",function(){return lr}),e.d(t,"ErrorRangeCalculator",function(){return Xi}),e.d(t,"Highlight",function(){return Va}),e.d(t,"SharedTooltip",function(){return _h}),e.d(t,"Legend",function(){return sh}),e.d(t,"LegendItem",function(){return Ja}),e.d(t,"LegendLayout",function(){return $a}),e.d(t,"LineChart",function(){return Nr}),e.d(t,"LinePoint",function(){return wr}),e.d(t,"LineSegment",function(){return Sr}),e.d(t,"Pane",function(){return bs}),e.d(t,"PieAnimation",function(){return Mh}),e.d(t,"PieChart",function(){return qh}),e.d(t,"PieChartMixin",function(){return Fh}),e.d(t,"PiePlotArea",function(){return Yh}),e.d(t,"PieSegment",function(){return Uh}),e.d(t,"PlotAreaBase",function(){return Ds}),e.d(t,"PlotAreaEventsMixin",function(){return Hs}),e.d(t,"PlotAreaFactory",function(){return hh}),e.d(t,"PointEventsMixin",function(){return xr}),e.d(t,"RangeBar",function(){return Qs}),e.d(t,"RangeBarChart",function(){return ta}),e.d(t,"RangeAreaPoint",function(){return aa}),e.d(t,"RangeAreaChart",function(){return xa}),e.d(t,"ScatterChart",function(){return Wn}),e.d(t,"ScatterErrorBar",function(){return Vn}),e.d(t,"ScatterLineChart",function(){return Rh}),e.d(t,"Selection",function(){return gh}),e.d(t,"SeriesAggregator",function(){return Ns}),e.d(t,"SeriesBinder",function(){return Ni}),e.d(t,"SplineSegment",function(){return Rr}),e.d(t,"SplineAreaSegment",function(){return $r}),e.d(t,"StackWrap",function(){return xn}),e.d(t,"Tooltip",function(){return yh}),e.d(t,"OHLCChart",function(){return ba}),e.d(t,"OHLCPoint",function(){return _a}),e.d(t,"WaterfallChart",function(){return Ta}),e.d(t,"WaterfallSegment",function(){return Pa}),e.d(t,"XYPlotArea",function(){return zh}),e.d(t,"MousewheelZoom",function(){return Ka}),e.d(t,"ZoomSelection",function(){return Qa}),e.d(t,"Pannable",function(){return Ga}),e.d(t,"ChartAxis",function(){return Ai}),e.d(t,"ChartPane",function(){return Ri}),e.d(t,"ChartPlotArea",function(){return Ei}),e.d(t,"findAxisByName",function(){return Mi}),e.d(t,"anyHasZIndex",function(){return Vr}),e.d(t,"appendIfNotNull",function(){return ws}),e.d(t,"areNumbers",function(){return kn}),e.d(t,"bindSegments",function(){return Ss}),e.d(t,"categoriesCount",function(){return fr}),e.d(t,"countNumbers",function(){return Ii}),e.d(t,"equalsIgnoreCase",function(){return ks}),e.d(t,"evalOptions",function(){return dr}),e.d(t,"filterSeriesByType",function(){return As}),e.d(t,"getDateField",function(){return Ps}),e.d(t,"getField",function(){return ji}),e.d(t,"hasGradientOverlay",function(){return an}),e.d(t,"hasValue",function(){return Un}),e.d(t,"isDateAxis",function(){return Ts}),e.d(t,"segmentVisible",function(){return Cs}),e.d(t,"singleItemOrArray",function(){return Ms}),e.d(t,"createOutOfRangePoints",function(){return Es}),e.d(t,"ChartService",function(){return qe}),e.d(t,"DomEventsBuilder",function(){return Ye}),e.d(t,"FormatService",function(){return Ge}),e.d(t,"IntlService",function(){return Fe}),e.d(t,"TemplateService",function(){return Q}),e.d(t,"Sparkline",function(){return El}),e.d(t,"Navigator",function(){return Wl}),e.d(t,"NavigatorHint",function(){return Dl}),e.d(t,"StockChart",function(){return Yl}),e.d(t,"constants",function(){return s}),e.d(t,"Gauge",function(){return ac}),e.d(t,"LinearGauge",function(){return Dc}),e.d(t,"LinearPointer",function(){return _c}),e.d(t,"ArrowLinearPointer",function(){return Pc}),e.d(t,"BarLinearPointer",function(){return Ic}),e.d(t,"LinearScale",function(){return gc}),e.d(t,"RadialGauge",function(){return au}),e.d(t,"RadialPointer",function(){return iu}),e.d(t,"RadialScale",function(){return Yc}),e.d(t,"ArcGauge",function(){return xu}),e.d(t,"RangePointer",function(){return mu}),e.d(t,"ArcScale",function(){return lu}),e.d(t,"CircularGauge",function(){return _u}),e.d(t,"Barcode",function(){return tf}),e.d(t,"barcodeValidator",function(){return Jd}),e.d(t,"QRCode",function(){return wg}),e.d(t,"qrcodeValidator",function(){return bg}),e.d(t,"Map",function(){return ex}),e.d(t,"addClass",function(){return R}),e.d(t,"removeClass",function(){return L}),e.d(t,"alignPathToPixel",function(){return I}),e.d(t,"clockwise",function(){return z}),e.d(t,"convertableToNumber",function(){return D}),e.d(t,"deepExtend",function(){return m}),e.d(t,"elementStyles",function(){return X}),e.d(t,"getSpacing",function(){return q}),e.d(t,"getTemplate",function(){return K}),e.d(t,"getter",function(){return tt}),e.d(t,"grep",function(){return et}),e.d(t,"hasClasses",function(){return ot}),e.d(t,"HashMap",function(){return rt}),e.d(t,"inArray",function(){return nt}),e.d(t,"interpolateValue",function(){return st}),e.d(t,"InstanceObserver",function(){return ht}),e.d(t,"isArray",function(){return B}),e.d(t,"isFunction",function(){return H}),e.d(t,"isNumber",function(){return V}),e.d(t,"isObject",function(){return N}),e.d(t,"isString",function(){return j}),e.d(t,"map",function(){return pt}),e.d(t,"mousewheelDelta",function(){return ct}),e.d(t,"FontLoader",function(){return Pt}),e.d(t,"setDefaultOptions",function(){return i}),e.d(t,"sparseArrayLimits",function(){return Tt}),e.d(t,"styleValue",function(){return G}),e.d(t,"find",function(){return Mt}),e.d(t,"elementScale",function(){return Et}),e.d(t,"autoTextColor",function(){return Lt}),e.d(t,"createHashSet",function(){return jt}),e.d(t,"defaultErrorHandler",function(){return Dt}),e.d(t,"keys",function(){return Ht}),e.d(t,"append",function(){return dt}),e.d(t,"bindEvents",function(){return ft}),e.d(t,"Class",function(){return b.Class}),e.d(t,"defined",function(){return w}),e.d(t,"deg",function(){return gt}),e.d(t,"elementOffset",function(){return yt}),e.d(t,"elementSize",function(){return vt}),e.d(t,"eventCoordinates",function(){return mt}),e.d(t,"eventElement",function(){return xt}),e.d(t,"hashKey",function(){return _t}),e.d(t,"last",function(){return bt}),e.d(t,"limitValue",function(){return wt}),e.d(t,"logToConsole",function(){return b.logToConsole}),e.d(t,"objectKey",function(){return Ct}),e.d(t,"rad",function(){return St}),e.d(t,"round",function(){return k}),e.d(t,"unbindEvents",function(){return kt}),e.d(t,"valueOrDefault",function(){return At}),e.d(t,"chartBaseTheme",function(){return Jm}),t);for(tx in rx)nx(tx,rx[tx])}],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)}}});
|
|
1
|
+
System.register("@progress/kendo-charts",["@progress/kendo-drawing"],function(nx){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)&&(Oy.__proto__=wy),((Oy.prototype=Object.create(wy&&wy.prototype)).constructor=Oy).prototype.destroy=function(){this.unbind()},Oy.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},Oy.prototype.one=function(t,e){return this.bind(t,e,!0)},Oy.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},Oy.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},Oy.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},Oy.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)},Oy),Py=ut.compile,Ty=((by=md)&&(My.__proto__=by),((My.prototype=Object.create(by&&by.prototype)).constructor=My).prototype._initOptions=function(t){this.options=x({},this.options,t)},My.prototype.filter=function(t,e){this._extent=t,this._zoom=e,this._render()},My.prototype.add=function(t){var e=t;T(t)&&(this.items.push(e="string"==typeof t?{text:t}:e),this._render())},My.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()},My.prototype.clear=function(){this.items=[],Qg(this.element)},My.prototype._render=function(){for(var t=[],e=Py(this.options.itemTemplate),o=0;o<this.items.length;o++){var i=this.items[o],i=this._itemText(i);""!==i&&t.push(e({text:i}))}if(0<t.length){Qg(this.element);var r=t.join(this.options.separator),n=this.element,s=document.createElement("div");for(s.innerHTML=r;0<s.childNodes.length;)n.appendChild(s.childNodes[0]);this.showElement()}else this.hideElement()},My.prototype.hideElement=function(){this.element.style.display="none"},My.prototype.showElement=function(){this.element.style.display=""},My.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},My.prototype._inZoomLevel=function(t,e){t=O(t,-Number.MAX_VALUE),e=O(e,Number.MAX_VALUE);return this._zoom>t&&this._zoom<e},My.prototype._inArea=function(t){var e=!0;return e=t?t.contains(this._extent):e},My);function My(t,e){by.call(this),this.element=t,this._initOptions(e),this.items=[],Q(this.element,"k-widget k-attribution")}function Oy(){wy.call(this),this._events={}}i(Ty,{name:"Attribution",separator:" | ",itemTemplate:"#= text #"});var By={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 Ry(t){t='<button class="k-button k-button-square k-rounded-full k-button-flat k-button-flat-base k-icon-button '+By[t].className+'" aria-label="move '+t+'"><span class="k-icon '+By[t].iconClass+'" /></button>';return sy(t)}(Ey=md)&&(Iy.__proto__=Ey),((Iy.prototype=Object.create(Ey&&Ey.prototype)).constructor=Iy).prototype.destroy=function(){this.dispose()},Iy.prototype.dispose=function(){fy(this._keyroot,"keydown",this._keydownHandler)},Iy.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)},Iy.prototype._initOptions=function(t){this.options=x({},this.options,t)},Iy.prototype._pan=function(t,e){var o=this.options.panStep;this.trigger("pan",{x:t*o,y:e*o})},Iy.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()},Iy.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 Ey,Ly=Iy;function Iy(t,e){Ey.call(this),this.element=t,this._initOptions(e);var t=Ry("up"),e=Ry("right"),o=Ry("down"),i=Ry("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 zy(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(Ly,{name:"Navigator",panStep:1}),yy(Ly,["pan"]);(Vy=md)&&(Dy.__proto__=Vy),((Dy.prototype=Object.create(Vy&&Vy.prototype)).constructor=Dy).prototype.destroy=function(){this.element&&fy(this.element,"click",this._clickHandler),this._keyroot&&fy(this._keyroot,"keydown",this._keydownHandler)},Dy.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)},Dy.prototype._initOptions=function(t){this.options=x({},this.options,t)},Dy.prototype._change=function(t){var e=this.options.zoomStep;this.trigger("change",{delta:t*e})},Dy.prototype._click=function(t){var e=1;mt(t.currentTarget,"k-zoom-out")&&(e=-1),this._change(e),t.preventDefault()},Dy.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 Vy,jy=Dy;function Dy(t,e){Vy.call(this),this.element=t,this._initOptions(e);t=zy("in","k-i-plus"),e=zy("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(jy,{name:"ZoomControl",zoomStep:1}),yy(jy,["change"]);var Hy,Uy,$u=Math,Fy=$u.max,Ny=$u.min,Gy=((Uy=b.Class)&&(Zy.__proto__=Uy),zd={World:{configurable:!0}},((Zy.prototype=Object.create(Uy&&Uy.prototype)).constructor=Zy).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},Zy.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)},Zy.prototype.containsAny=function(t){for(var e=!1,o=0;o<t.length;o++)e=e||this.contains(t[o]);return e},Zy.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=Ny(e.lng,i),e.lat=Fy(e.lat,t),o.lng=Fy(o.lng,i),o.lat=Ny(o.lat,t)},Zy.prototype.includeAll=function(t){for(var e=0;e<t.length;e++)this.include(t[e])},Zy.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)}},Zy.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)]},Zy.prototype.overlaps=function(t){return this.containsAny(t.toArray())||t.containsAny(this.toArray())},Zy.create=function(t,e){return t instanceof Zy?t:t&&e?new Zy(t,e):t&&4===t.length&&!e?new Zy([t[0],t[1]],[t[2],t[3]]):void 0},zd.World.get=function(){return new Zy([90,-180],[-90,180])},Object.defineProperties(Zy,zd),Zy),Vd=((Hy=b.Class)&&(Yy.__proto__=Hy),((Yy.prototype=Object.create(Hy&&Hy.prototype)).constructor=Yy).prototype.destroy=function(){this._deactivate()},Yy.prototype._initOptions=function(t){this.options=x({},this.options,t)},Yy.prototype.show=function(){this.reset(),this._activate(),this._applyExtent(!0)},Yy.prototype.hide=function(){this._deactivate(),this._setVisibility(!1)},Yy.prototype.reset=function(){this._beforeReset(),this._reset()},Yy.prototype._reset=function(){this._applyExtent()},Yy.prototype._beforeReset=function(){},Yy.prototype._resize=function(){},Yy.prototype._panEnd=function(){this._applyExtent()},Yy.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=Gy.create(t.extent),t=!t||t.overlaps(this.map.extent());this._setVisibility(o&&e&&t)},Yy.prototype._setVisibility=function(t){this.element.style.display=t?"":"none"},Yy.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)},Yy.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)},Yy.prototype._updateAttribution=function(){var t=this.map.attribution;t&&t.add(this.options.attribution)},Yy.prototype._readData=function(){return this.options.data||[]},Yy.prototype._hasData=function(){return this._data&&0<this._data.length},Yy),Wy=Math,Xy=ut.compile,qy=b.geometry.Point;function Yy(t,e){Hy.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 Zy(t,e){Uy.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 Qy(t){var e=t;return"string"!=typeof t&&(e+="px"),e}(Ky=Vd)&&($y.__proto__=Ky),(($y.prototype=Object.create(Ky&&Ky.prototype)).constructor=$y).prototype.destroy=function(){Ky.prototype.destroy.call(this),this._view.destroy(),this._view=null},$y.prototype._beforeReset=function(){var t=this.map,t=t.locationToLayer(t.extent().nw).round();this._view.viewOrigin(t)},$y.prototype._reset=function(){Ky.prototype._reset.call(this),this._updateView(),this._view.reset()},$y.prototype._viewType=function(){return ev},$y.prototype._activate=function(){Ky.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))},$y.prototype._deactivate=function(){Ky.prototype._deactivate.call(this),this._pan&&this.map.unbind("pan",this._pan)},$y.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())},$y.prototype._resize=function(){this._render()},$y.prototype._panEnd=function(t){Ky.prototype._panEnd.call(this,t),this._render()},$y.prototype._render=function(){this._updateView(),this._view.render()};var Ky,jd=$y;function $y(t,e){Ky.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});(tv=b.Class)&&(rv.__proto__=tv),((rv.prototype=Object.create(tv&&tv.prototype)).constructor=rv).prototype._initOptions=function(t){this.options=x({},this.options,t)},rv.prototype.center=function(t){this._center=t},rv.prototype.extent=function(t){this._extent=t},rv.prototype.viewOrigin=function(t){this._viewOrigin=t},rv.prototype.zoom=function(t){this._zoom=t},rv.prototype.pointToTileIndex=function(t){return new qy(Wy.floor(t.x/this.options.tileSize),Wy.floor(t.y/this.options.tileSize))},rv.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:Wy.ceil((Wy.abs(e.x)+t.width)/this.options.tileSize),y:Wy.ceil((Wy.abs(e.y)+t.height)/this.options.tileSize)}},rv.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}},rv.prototype.indexToPoint=function(t){var e=t.x,t=t.y;return new qy(e*this.options.tileSize,t*this.options.tileSize)},rv.prototype.subdomainText=function(){var t=this.options.subdomains;return t[this.subdomainIndex++%t.length]},rv.prototype.destroy=function(){Qg(this.element),this.pool.empty()},rv.prototype.reset=function(){this.pool.reset(),this.subdomainIndex=0,this.render()},rv.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()},rv.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},rv.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 qy(M(e.x),M(e.y))),zoom:this._zoom,size:this.options.tileSize,subdomain:this.subdomainText(),urlTemplate:this.options.urlTemplate,errorUrlTemplate:this.options.errorUrlTemplate}},rv.prototype.wrapIndex=function(t){var e=Wy.pow(2,this._zoom);return{x:this.wrapValue(t.x,e),y:_(t.y,0,e-1)}},rv.prototype.wrapValue=function(t,e){var o=Wy.abs(t)%e;return 0<=t?o:e-(0==o?e:o)};var Jy,tv,ev=rv,ov=((Jy=b.Class)&&(iv.__proto__=Jy),((iv.prototype=Object.create(Jy&&Jy.prototype)).constructor=iv).prototype.destroy=function(){var t=this.element,e=t?t.parentNode:null;t&&(e&&e.removeChild(t),this.element=null)},iv.prototype._initOptions=function(t){this.options=x({},this.options,t)},iv.prototype.createElement=function(){var t=document.createElement("img");Q(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},iv.prototype.show=function(){var t=this.element,e=(t.style.top=Qy(this.options.offset.y),t.style.left=Qy(this.options.offset.x),this.url());e&&t.setAttribute("src",e),t.style.visibility="visible",this.visible=!0},iv.prototype.hide=function(){this.element.style.visibility="hidden",this.visible=!1},iv.prototype.url=function(){return Xy(this.options.urlTemplate)(this.urlOptions())},iv.prototype.errorUrl=function(){return Xy(this.options.errorUrlTemplate)(this.urlOptions())},iv.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}},iv);function iv(t,e){Jy.call(this),this.id=t,this.visible=!0,this._initOptions(e),this.createElement(),this.show()}function rv(t,e){tv.call(this),this.element=t,this._initOptions(e),this.pool=new sv}i(ov,{urlTemplate:"",errorUrlTemplate:""});(nv=b.Class)&&(av.__proto__=nv),((av.prototype=Object.create(nv&&nv.prototype)).constructor=av).prototype.get=function(t,e){return this._items.length>=this.options.maxSize&&this._remove(t),this._create(e)},av.prototype.empty=function(){for(var t=this._items,e=0;e<t.length;e++)t[e].destroy();this._items=[]},av.prototype.reset=function(){for(var t=this._items,e=0;e<t.length;e++)t[e].hide()},av.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 ov(i,t),this._items.push(e)),e},av.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 nv,sv=av;function av(){nv.call(this),this._items=[]}i(sv,{maxSize:100});function hv(t,e,o){return"translate3d("+t+"px,"+e+"px,0) scale("+o+")"}var pv,lv,cv,uv,dv,fv,gv,yv=Object.assign,vv="change",mv=((gv=md)&&(Bv.__proto__=gv),((Bv.prototype=Object.create(gv&&gv.prototype)).constructor=Bv).prototype.captureNext=function(){this.capture=!0},Bv.prototype.cancelCapture=function(){this.capture=!1},Bv.prototype._press=function(t){this.trigger("press"),this.capture&&t.preventDefault()},Bv.prototype._release=function(t){this.trigger("release"),this.capture&&(t.preventDefault(),this.cancelCapture())},Bv),xv=((fv=md)&&(Ov.__proto__=fv),((Ov.prototype=Object.create(fv&&fv.prototype)).constructor=Ov).prototype.makeVirtual=function(){yv(this,{virtual:!0,forcedEnabled:!0,_virtualMin:0,_virtualMax:0})},Ov.prototype.virtualSize=function(t,e){this._virtualMin===t&&this._virtualMax===e||(this._virtualMin=t,this._virtualMax=e,this.update())},Ov.prototype.outOfBounds=function(t){return t>this.max||t<this.min},Ov.prototype.forceEnabled=function(){this.forcedEnabled=!0},Ov.prototype.getSize=function(){return this.container[this.measure]},Ov.prototype.getTotal=function(){return this.element[this.scrollSize]},Ov.prototype.rescale=function(t){this.scale=t},Ov.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(vv,this))},Ov),_v=((dv=md)&&(Mv.__proto__=dv),((Mv.prototype=Object.create(dv&&dv.prototype)).constructor=Mv).prototype.rescale=function(t){this.x.rescale(t),this.y.rescale(t),this.refresh()},Mv.prototype.centerCoordinates=function(){return{x:Math.min(0,-this.x.centerOffset),y:Math.min(0,-this.y.centerOffset)}},Mv.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(vv)},Mv),bv=((uv=md)&&(Tv.__proto__=uv),((Tv.prototype=Object.create(uv&&uv.prototype)).constructor=Tv).prototype.outOfBounds=function(){return this.dimension.outOfBounds(this.movable[this.axis])},Tv.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(vv,this))},Tv),wv=((cv=b.Class)&&(Pv.__proto__=cv),(Pv.prototype=Object.create(cv&&cv.prototype)).constructor=Pv),Cv=((lv=md)&&(Av.__proto__=lv),((Av.prototype=Object.create(lv&&lv.prototype)).constructor=Av).prototype.translateAxis=function(t,e){this[t]+=e,this.refresh()},Av.prototype.scaleTo=function(t){this.scale=t,this.refresh()},Av.prototype.scaleWith=function(t){this.scale*=t,this.refresh()},Av.prototype.translate=function(t){this.x+=t.x,this.y+=t.y,this.refresh()},Av.prototype.moveAxis=function(t,e){this[t]=e,this.refresh()},Av.prototype.moveTo=function(t){yv(this,t),this.refresh()},Av.prototype.refresh=function(){var t=this.x,e=this.y;this.round&&(t=Math.round(t),e=Math.round(e)),(t=hv(t,e,this.scale))!==this.coordinates&&(this.element.style[this.transformStyle]=t,this._saveCoordinates(t),this.trigger(vv))},Av.prototype._saveCoordinates=function(t){this.coordinates=t},Av),Sv=b.drawing.Group,Id=((pv=Vd)&&(kv.__proto__=pv),((kv.prototype=Object.create(pv&&pv.prototype)).constructor=kv).prototype.destroy=function(){pv.prototype.destroy.call(this),this.surface.destroy()},kv.prototype._reset=function(){pv.prototype._reset.call(this),this._translateSurface(),this._data=this._readData(),this._hasData()&&this._load(this._data)},kv.prototype._initRoot=function(){this._root=new Sv,this.surface.draw(this._root)},kv.prototype._beforeReset=function(){this.surface.clear(),this._initRoot()},kv.prototype._resize=function(){this.surface.size(this.map.size())},kv.prototype._readData=function(){var t=pv.prototype._readData.call(this);return"FeatureCollection"===t.type?t.features:"GeometryCollection"===t.type?t.geometries:t},kv.prototype._load=function(t){this._data=t,this._clearMarkers(),this._loader||(this._loader=new Lv(this.map,this.options.style,this));for(var e=new Sv,o=0;o<t.length;o++){var i=this._loader.parse(t[o]);i&&e.append(i)}this._root.clear(),this._root.append(e)},kv.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})},kv.prototype.featureCreated=function(t){(t.layer=this).map.trigger("shapeFeatureCreated",t)},kv.prototype._createMarker=function(t){t=this.map.markers.bind({location:t.location},t.dataItem);return t&&this._markers.push(t),t},kv.prototype._clearMarkers=function(){for(var t=0;t<this._markers.length;t++)this.map.markers.remove(this._markers[t]);this._markers=[]},kv.prototype._pan=function(){this._panning||(this._panning=!0,this.surface.suspendTracking())},kv.prototype._panEnd=function(t){pv.prototype._panEnd.call(this,t),this._translateSurface(),this.surface.resumeTracking(),this._panning=!1},kv.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}))},kv.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))}},kv.prototype._activate=function(){pv.prototype._activate.call(this),this._panHandler=uy(this._pan,this),this.map.bind("pan",this.panHandler)},kv.prototype._deactivate=function(){pv.prototype._deactivate.call(this),this.map.unbind("pan",this._panHandler)},kv);function kv(t,e){pv.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 Cv(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 Av(t){lv.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=hv(this.x,this.y,this.scale);this.element.style[this.transformStyle]=t,this._saveCoordinates(t)}function Pv(t){cv.call(this);var s,a,h,p=this;yv(p,{elastic:!0},t),t=p.elastic?.5:0,h=p.movable,p.x=s=new bv({axis:"x",dimension:p.dimensions.x,resistance:t,movable:h}),p.y=a=new bv({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 Tv(t){uv.call(this),yv(this,t)}function Mv(t){dv.call(this),this.x=new xv(yv({horizontal:!0},t)),this.y=new xv(yv({horizontal:!1},t)),this.container=t.container,this.forcedMinScale=t.minScale,this.maxScale=t.maxScale||100,this.bind(vv,t)}function Ov(t){fv.call(this),this.forcedEnabled=!1,yv(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 Bv(t,e){gv.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});(Ev=b.Class)&&(zv.__proto__=Ev),((zv.prototype=Object.create(Ev&&Ev.prototype)).constructor=zv).prototype.parse=function(t){var e=new Sv,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},zv.prototype._shapeCreated=function(t){var e=!1;return e=this.observer&&this.observer.shapeCreated?this.observer.shapeCreated(t):e},zv.prototype._featureCreated=function(t,e){this.observer&&this.observer.featureCreated&&this.observer.featureCreated({group:t,dataItem:e,properties:e.properties})},zv.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)}},zv.prototype._setLineFill=function(t){var e=t.segments;(e.length<4||!e[0].anchor().equals(zt(e).anchor()))&&(t.options.fill=null)},zv.prototype._loadShape=function(t,e){return this._shapeCreated(e)||t.append(e),e},zv.prototype._loadPolygon=function(t,e,o){e=this._buildPolygon(e);return e.dataItem=o,this._loadShape(t,e)},zv.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},zv.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 Rv,Ev,Lv=zv,Er=((Rv=Id)&&(Iv.__proto__=Rv),((Iv.prototype=Object.create(Rv&&Rv.prototype)).constructor=Iv).prototype._readData=function(){return this.options.data||[]},Iv.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))}}},Iv.prototype._scaleType=function(){var t=this.options.scale;return it(t)?t:Dv[t]},Iv.prototype._createSymbol=function(t){var e=this.options.symbol;return(e=it(e)?e:Hv[e])(t)},Iv.prototype._drawSymbol=function(t){this.map.trigger("shapeCreated",{layer:this,shape:t})||this.surface.draw(t)},Iv);function Iv(){Rv.apply(this,arguments)}function zv(t,e,o){Ev.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 Vv,jv,Dv={sqrt:((jv=b.Class)&&(Wv.__proto__=jv),((Wv.prototype=Object.create(jv&&jv.prototype)).constructor=Wv).prototype.map=function(t){t=(Math.sqrt(t)-Math.sqrt(this._domain[0]))*this._ratio;return this._range[0]+t},Wv)},Hv={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}},Uv=Object.assign,Fv=".k-marker",Nv=((Vv=Vd)&&(Gv.__proto__=Vv),((Gv.prototype=Object.create(Vv&&Vv.prototype)).constructor=Gv).prototype.destroy=function(){Vv.prototype.destroy.call(this),fy(this.element,"click",this._markerClickHandler),this.clear()},Gv.prototype.add=function(t){if(!Z(t))return this._addOne(t);for(var e=0;e<t.length;e++)this._addOne(t[e])},Gv.prototype.remove=function(t){t.destroy();t=(this.items||[]).indexOf(t);-1<t&&this.items.splice(t,1)},Gv.prototype.clear=function(){for(var t=0;t<this.items.length;t++)this.items[t].destroy();this.items=[]},Gv.prototype.update=function(t){var e=t.location();e&&(t.showAt(this.map.locationToView(e)),this.map.trigger("markerActivate",{marker:t,layer:this}))},Gv.prototype._reset=function(){Vv.prototype._reset.call(this);for(var t=this.items,e=0;e<t.length;e++)this.update(t[e])},Gv.prototype.bind=function(t,e){t=qv.create(t,this.options);if(t.dataItem=e,!this.map.trigger("markerCreated",{marker:t,layer:this}))return this.add(t),t},Gv.prototype._addOne=function(t){t=qv.create(t,this.options);return t.addTo(this),t},Gv.prototype._readData=function(){return this.options.data||[]},Gv.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)}},Gv.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)},Gv.prototype._markerMouseEnter=function(t){t=this._createMarkerEventArgs(t);this.map.trigger("markerMouseEnter",t)},Gv.prototype._markerMouseLeave=function(t){t=this._createMarkerEventArgs(t);this.map.trigger("markerMouseLeave",t)},Gv.prototype._createMarkerEventArgs=function(t){var e=t.marker;return Uv({},{layer:this,layerIndex:this.map.layers.indexOf(this),marker:e,markerIndex:(this.items||[]).indexOf(e)},t)},Gv);function Gv(t,e){Vv.call(this,t,e),this._markerClickHandler=uy(this._markerClick,this),dy(this.element,"click",Fv,this._markerClickHandler),this.items=[],this._load(this._readData())}function Wv(t,e){jv.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(Nv,{zIndex:1e3,autoBind:!0,locationField:"location",titleField:"title"});(Xv=b.Class)&&(Zv.__proto__=Xv),((Zv.prototype=Object.create(Xv&&Xv.prototype)).constructor=Zv).prototype.destroy=function(){this.layer=null,this.unbindEvents(),this.hide()},Zv.prototype.addTo=function(t){this.layer=t.markers||t,this.layer.items.push(this),this.layer.update(this)},Zv.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)},Zv.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()},Zv.prototype.hide=function(){this.element&&(this.element.remove(),this.element=null),this.tooltip&&(this.tooltip.destroy(),this.tooltip=null)},Zv.prototype.bindEvents=function(){this.element&&(this._mouseEnterHandler=uy(this._mouseEnter,this),dy(this.element,"mouseenter",Fv,this._mouseEnterHandler),this._mouseLeaveHandler=uy(this._mouseLeave,this),dy(this.element,"mouseleave",Fv,this._mouseLeaveHandler))},Zv.prototype.unbindEvents=function(){this.element&&(fy(this.element,"mouseenter",this._mouseEnterHandler),fy(this.element,"mouseleave",this._mouseLeaveHandler))},Zv.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())},Zv.prototype._mouseEnter=function(t){t=this._createEventArgs(t);this.layer._markerMouseEnter(t)},Zv.prototype._mouseLeave=function(t){t=this._createEventArgs(t);this.layer._markerMouseLeave(t)},Zv.prototype._createEventArgs=function(t){return{marker:this,originalEvent:t}},Zv.prototype.renderTooltip=function(){},Zv.create=function(t,e){return t instanceof Zv?t:new Zv(x({},e,t))};var Xv,qv=Zv,Yv=Object.assign;function Zv(t){Xv.call(this),this.options=t||{}}function Qv(t){window.requestAnimationFrame(t)}function Kv(t){t.preventDefault()}(Jv=b.Class)&&(dm.__proto__=Jv),((dm.prototype=Object.create(Jv&&Jv.prototype)).constructor=dm).prototype.tick=function(){},dm.prototype.done=function(){},dm.prototype.onEnd=function(){},dm.prototype.onCancel=function(){},dm.prototype.start=function(){this.enabled()&&(this.done()?this.onEnd():(this._started=!0,Qv(this._tickProxy)))},dm.prototype.enabled=function(){return!0},dm.prototype.cancel=function(){this._started=!1,this.onCancel()},dm.prototype._tick=function(){this._started&&(this.tick(),this.done()?(this._started=!1,this.onEnd()):Qv(this._tickProxy))};var $v,Jv,Fd=dm,tm=(($v=Fd)&&(um.__proto__=$v),((um.prototype=Object.create($v&&$v.prototype)).constructor=um).prototype.done=function(){return this.timePassed()>=this.duration},um.prototype.timePassed=function(){return Math.min(this.duration,vy()-this.startDate)},um.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()},um.prototype._easeProxy=function(t){var e=this;return function(){e.movable.moveAxis(e.axis,t(e.timePassed(),e.initial,e.delta,e.duration))}},um.easeOutExpo=function(t,e,o,i){return t===i?e+o:o*(1-Math.pow(2,-10*t/i))+e},um),em=Object.assign,om=800,im=0,rm="move",nm="tap",sm="doubleTap",am="release",hm="gesturechange",pm="gestureend",lm="gesturetap",cm={api:0,touch:0,mouse:9,pointer:9};function um(t){$v.call(this),Yv(this,t)}function dm(){Jv.call(this),this._tickProxy=uy(this._tick,this),this._started=!1}function fm(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}(ym=b.Class)&&(_m.__proto__=ym),((_m.prototype=Object.create(ym&&ym.prototype)).constructor=_m).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)},_m.prototype._updateLocationData=function(t){var e=this.axis;this.location=t["page"+e],this.client=t["client"+e],this.screen=t["screen"+e]};var gm,ym,vm=_m,mm=((gm=b.Class)&&(xm.__proto__=gm),((xm.prototype=Object.create(gm&&gm.prototype)).constructor=xm).prototype.press=function(){this._holdTimeout=setTimeout(uy(this._hold,this),this.userEvents.minHold),this._trigger("press",this.pressEvent)},xm.prototype._tap=function(t){var e=this;e.userEvents._clicks++,1===e.userEvents._clicks&&(e._clickTimeout=setTimeout(function(){1===e.userEvents._clicks?e._trigger(nm,t):e._trigger(sm,t),e.userEvents._clicks=0},300))},xm.prototype._hold=function(){this._trigger("hold",this.pressEvent)},xm.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(Tm.current&&Tm.current!==this.userEvents)return this.dispose();this._start(t)}this._finished||this._trigger(rm,t)}},xm.prototype.end=function(t){this.endTime=vy(),this._finished||(this._finished=!0,this._trigger(am,t),this._moved?this._trigger("end",t):this.useClickAsTap||(this.supportDoubleTap?this._tap(t):this._trigger(nm,t)),clearTimeout(this._holdTimeout),this.dispose())},xm.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)},xm.prototype.skip=function(){this.dispose()},xm.prototype.cancel=function(){this.dispose()},xm.prototype.isMoved=function(){return this._moved},xm.prototype._start=function(t){clearTimeout(this._holdTimeout),this.startTime=vy(),this._moved=!0,this._trigger("start",t)},xm.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()},xm.prototype._withinIgnoreThreshold=function(){var t=this.x.initialDelta,e=this.y.initialDelta;return Math.sqrt(t*t+e*e)<=this.threshold},xm);function xm(t,e,o){gm.call(this),em(this,{x:new vm("X",o.location),y:new vm("Y",o.location),type:o.type,useClickAsTap:t.useClickAsTap,threshold:t.threshold||cm[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 _m(t,e){ym.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 bm(t){for(var e=Cy(navigator.userAgent).up.split(" "),o=0,i=e.length;o<i;o++)t(e[o])}(Pm=md)&&(Fm.__proto__=Pm),((Fm.prototype=Object.create(Pm&&Pm.prototype)).constructor=Fm).prototype.preventIfMoving=function(t){this._isMoved()&&t.preventDefault()},Fm.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,bm(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)},Fm.prototype.capture=function(){Fm.current=this},Fm.prototype.cancel=function(){this._disposeAll(),this.trigger("cancel")},Fm.prototype.notify=function(t,e){var o,i,r,n,s=this.touches,a=t;if(this._isMultiTouch()){switch(a){case rm:a=hm;break;case"end":a=pm;break;case nm:a=lm}em(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,em(e,{type:a}))},Fm.prototype.press=function(t,e,o){this._apiCall("_start",t,e,o)},Fm.prototype.move=function(t,e){this._apiCall("_move",t,e)},Fm.prototype.end=function(t,e){this._apiCall("_end",t,e)},Fm.prototype._isMultiTouch=function(){return 1<this.touches.length},Fm.prototype._maxTouchesReached=function(){return this.touches.length>=this._maxTouches},Fm.prototype._disposeAll=function(){for(var t=this.touches;0<t.length;)t.pop().dispose()},Fm.prototype._isMoved=function(){return vt(this.touches,function(t){return t.isMoved()}).length},Fm.prototype._select=function(t){this.allowSelection&&!this.trigger("select",{event:t})||t.preventDefault()},Fm.prototype._start=function(t){var e,o,i=0,r=this.filter,n=fm(t),s=n.length,a=t.which;if(!(a&&1<a||this._maxTouchesReached()))for(Fm.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 mm(this,e,o),this.touches.push(o),o.press(),this._isMultiTouch()&&this.notify("gesturestart",{}))},Fm.prototype._move=function(t){this._eachTouch("move",t)},Fm.prototype._end=function(t){this._eachTouch("end",t)},Fm.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()},Fm.prototype._eachTouch=function(t,e){for(var o,i,r,n={},s=fm(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)},Fm.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})},Fm.defaultThreshold=function(t){im=t},Fm.minHold=function(t){om=t};var wm,Cm,Sm,km,Am,Pm,Tm=Fm,Mm=Object.assign,Om=Math.abs,Bm="change",Rm=((Am=Fd)&&(Um.__proto__=Am),((Um.prototype=Object.create(Am&&Am.prototype)).constructor=Um).prototype.enabled=function(){return this.movable.scale<this.dimensions.minScale},Um.prototype.done=function(){return this.dimensions.minScale-this.movable.scale<.01},Um.prototype.tick=function(){var t=this.movable;t.scaleWith(1.1),this.dimensions.rescale(t.scale)},Um.prototype.onEnd=function(){var t=this.movable;t.scaleTo(this.dimensions.minScale),this.dimensions.rescale(t.scale)},Um),Em=((km=Fd)&&(Hm.__proto__=km),((Hm.prototype=Object.create(km&&km.prototype)).constructor=Hm).prototype.onCancel=function(){this.transition.cancel()},Hm.prototype.freeze=function(t){this.cancel(),this._moveTo(t)},Hm.prototype.onEnd=function(){this.paneAxis.outOfBounds()?this._snapBack():this._end()},Hm.prototype.done=function(){return Om(this.velocity)<1},Hm.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),km.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(),km.prototype.start.call(this)))},Hm.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)},Hm.prototype._end=function(){this.tapCapture.cancelCapture(),this.end()},Hm.prototype._snapBack=function(){var t=this.dimension,t=this.movable[this.axis]>t.max?t.max:t.min;this._moveTo(t)},Hm.prototype._moveTo=function(t){this.transition.moveTo({location:t,duration:500,ease:tm.easeOutExpo})},Hm),Lm=((Sm=Fd)&&(Dm.__proto__=Sm),((Dm.prototype=Object.create(Sm&&Sm.prototype)).constructor=Dm).prototype.tick=function(){this._updateCoordinates(),this.moveTo(this.origin)},Dm.prototype.done=function(){return Om(this.offset.y)<5&&Om(this.offset.x)<5},Dm.prototype.onEnd=function(){this.moveTo(this.destination),this.callback&&this.callback.call()},Dm.prototype.setCoordinates=function(t,e){this.offset={},this.origin=t,this.destination=e},Dm.prototype.setCallback=function(t){t&&it(t)&&(this.callback=t)},Dm.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}},Dm),Im=((Cm=b.Class)&&(jm.__proto__=Cm),((jm.prototype=Object.create(Cm&&Cm.prototype)).constructor=jm).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)},jm.prototype.show=function(){this.element.style.opacity=.7,this.element.style.visibility="visible"},jm.prototype.hide=function(){this.alwaysVisible||(this.element.style.opacity=0)},jm),zm=((wm=md)&&(Vm.__proto__=wm),((Vm.prototype=Object.create(wm&&wm.prototype)).constructor=Vm).prototype._initOptions=function(t){this.options=x({},this.options,t)},Vm.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())},Vm.prototype.makeVirtual=function(){this.dimensions.y.makeVirtual()},Vm.prototype.virtualSize=function(t,e){this.dimensions.y.virtualSize(t,e)},Vm.prototype.height=function(){return this.dimensions.y.size},Vm.prototype.scrollHeight=function(){return this.scrollElement.scrollHeight},Vm.prototype.scrollWidth=function(){return this.scrollElement.scrollWidth},Vm.prototype._resize=function(){this._native||this.contentResized()},Vm.prototype.setOptions=function(t){this._initOptions(t),t.pullToRefresh&&this._initPullToRefresh()},Vm.prototype.reset=function(){this._native?this.scrollElement.scrollTop(0):(this.movable.moveTo({x:0,y:0}),this._scale(1))},Vm.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)},Vm.prototype.zoomOut=function(){var t=this.dimensions;t.refresh(),this._scale(t.fitScale),this.movable.moveTo(t.centerCoordinates())},Vm.prototype.enable=function(){this.enabled=!0},Vm.prototype.disable=function(){this.enabled=!1},Vm.prototype.scrollTo=function(t,e){this._native?(this.scrollElement.scrollLeft(Om(t)),this.scrollElement.scrollTop(Om(e))):(this.dimensions.refresh(),this.movable.moveTo({x:t,y:e}))},Vm.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())},Vm.prototype.pullHandled=function(){},Vm.prototype.destroy=function(){var t=this.element;fy(t,"DOMMouseScroll mousewheel",this._wheelScrollHandler),this.userEvents&&this.userEvents.destroy()},Vm.prototype._scale=function(t){this.dimensions.rescale(t),this.movable.scaleTo(t)},Vm.prototype._initPullToRefresh=function(){},Vm.prototype._dragEnd=function(){},Vm.prototype._paneChange=function(){},Vm.prototype._initAxis=function(t){var e=this,o=e.movable,i=e.dimensions[t],r=e.tapCapture,n=e.pane[t],s=new Im({axis:t,movable:o,dimension:i,container:e.element,alwaysVisible:e.options.visibleScrollHints});i.bind(Bm,function(){s.refresh()}),n.bind(Bm,function(){s.show()}),e[t+"inertia"]=new Em({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})}})},Vm);function Vm(t,e){wm.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 Mm(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 mv(t),s=new Cv(o),a=new _v({element:o,container:t,forcedEnabled:n.options.zoom}),h=this.options.avoidScrolling,p=new Tm(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=Om(t.x.velocity),i=Om(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 wv({movable:s,dimensions:a,userEvents:p,elastic:n.options.elastic}),c=new Rm({movable:s,dimensions:a,userEvents:p,tapCapture:e}),u=new Lm({moveTo:function(t){n.scrollTo(t.x,t.y)}});s.bind(Bm,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)),Mm(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 jm(t){Cm.call(this);var e="x"===t.axis,o=sy('<div class="km-touch-scrollbar km-'+(e?"horizontal":"vertical")+'-scrollbar" />');Mm(this,t,{element:o,elementSize:0,movable:new Cv(o),scrollMovable:t.movable,alwaysVisible:t.alwaysVisible,size:e?"width":"height"}),this.scrollMovable.bind(Bm,this.refresh.bind(this)),this.container.appendChild(o),t.alwaysVisible&&this.show()}function Dm(t){Sm.call(this,t),Mm(this,t,{origin:{},destination:{},offset:{}})}function Hm(t){km.call(this);var e=this;Mm(e,t,{transition:new tm({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 Um(t){Am.call(this,t),Mm(this,t),this.userEvents.bind("gestureend",this.start.bind(this)),this.tapCapture.bind("press",this.cancel.bind(this))}function Fm(t,e){Pm.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||im,this.minHold=e.minHold||om,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);em(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=Kv,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),bm(function(t){i.addEventListener(t,r,!0)})),this.bind(["press","hold",nm,sm,"start",rm,"end",am,"cancel","gesturestart",hm,pm,lm,"select"],e)}i(zm,{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(zm,["pull","scroll","resize"]);function Nm(t,e){this.sender=(e=void 0===e?{}:e).sender||t,this.widget=t,this.rtl=Boolean(e.rtl)}Nm.prototype.notify=function(t,e){this.widget&&this.widget.trigger(t,e)};var Gm=Nm,Wm=Math,Xm=Wm.min,qm=Wm.pow,Ym=b.geometry.Point,Zm={bubble:Er,shape:Id,tile:jd};function Qm(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(" ")}Zm.marker=Nv;(Km=md)&&(I.__proto__=Km),((I.prototype=Object.create(Km&&Km.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),Km.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 Gm(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||Km.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=Wm.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=Ym.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=Ym.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:Xm(e,o),height:Xm(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=Gy.create(t),o=e.se.clone(),i=(this.options.wraparound&&o.lng<0&&0<t.nw.lng&&(o.lng=180+(180+o.lng)),new Gy(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=Wm.abs(h.x-a.x),h=Wm.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 Gy(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="."+Qm(t).replace(" ","."),e=this.element.querySelector(".k-map-controls"+e)||[],t=(0===e.length&&(Q(o=document.createElement("div"),"k-map-controls "+Qm(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 Ty(e,t)},I.prototype._createNavigator=function(t){var e=this._createControlElement(t,"topLeft"),e=this.navigator=new Ly(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 jy(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 zm(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 Zm[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 Nv(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=Wm.log(t)/Wm.log(2);return Wm.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=qm(2,this.options.minZoom-n),t.dimensions.maxScale=qm(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*qm(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 Km,f=I;function I(t,e,o,i){void 0===e&&(e={}),void 0===o&&(o={}),void 0===i&&(i={}),Km.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 $m(){return{icon:{border:{width:1}},label:{font:ox,padding:3},line:{length:10,width:2},visible:!0}}function Jm(t){return{axisDefaults:{labels:{font:ox},notes:$m(),title:{font:ix,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:$m(),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:ix},legend:{labels:{font:ox}}}}var tx,ex=f,h="Arial, Helvetica, sans-serif",ox="12px "+h,ix="16px "+h,rx=(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 ex}),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 Jm}),t);for(tx in rx)nx(tx,rx[tx])}],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)}}});
|