@progress/kendo-charts 1.20.0 → 1.21.0
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.
- package/dist/cdn/js/kendo-charts.js +1 -1
- package/dist/cdn/main.js +1 -1
- package/dist/es/barcode/barcode.js +13 -5
- package/dist/es/barcode/encodings/code39.js +3 -3
- package/dist/es/barcode/encodings/code93.js +4 -3
- package/dist/es/barcode/encodings/encoding.js +1 -1
- package/dist/es/barcode/encodings/postnet.js +1 -1
- package/dist/es/common/default-error-handler.js +3 -0
- package/dist/es/common/get-template.js +2 -2
- package/dist/es/common.js +1 -0
- package/dist/es/qrcode/encodings/data-modes/byte-data-mode.js +1 -1
- package/dist/es/qrcode/qrcode.js +30 -22
- package/dist/es2015/barcode/barcode.js +11 -5
- package/dist/es2015/barcode/encodings/code39.js +3 -3
- package/dist/es2015/barcode/encodings/code93.js +4 -3
- package/dist/es2015/barcode/encodings/encoding.js +1 -1
- package/dist/es2015/barcode/encodings/postnet.js +1 -1
- package/dist/es2015/common/default-error-handler.js +3 -0
- package/dist/es2015/common/get-template.js +2 -2
- package/dist/es2015/common.js +1 -0
- package/dist/es2015/qrcode/encodings/data-modes/byte-data-mode.js +1 -1
- package/dist/es2015/qrcode/qrcode.js +28 -22
- package/dist/npm/barcode.d.ts +2 -6
- package/dist/npm/main.js +186 -166
- package/dist/npm/qrcode.d.ts +1 -1
- package/dist/systemjs/kendo-charts.js +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register("@progress/kendo-charts",["@progress/kendo-drawing"],function(hf){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(t,e,o){"use strict";o.r(e);var i={};o.d(i,"NAVIGATOR_AXIS",function(){return Ul}),o.d(i,"NAVIGATOR_PANE",function(){return Hl});var d="arc",r="#000",_="bottom",A="center",u="circle",y="date",f=10,s=/\{\d+:?/,C="left",l=Number.MAX_VALUE,c=-Number.MAX_VALUE,n="none",S="right",g="string",k="top",h="value",a="#fff",v="x",m="y";function x(t){return Array.isArray(t)}function p(t,e){for(var o=x(e)?e:[e],i=0;i<o.length;i++){var r=o[i];-1===t.className.indexOf(r)&&(t.className+=" "+r)}}var w=/\s+/g;function b(t,e){t&&t.className&&(t.className=t.className.replace(e,"").replace(w," "))}var P=o(0);function M(t){var e=.5;t.options.stroke&&P.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 T(t,e){return-t.x*e.y+t.y*e.x<0}function B(t){return"number"==typeof t&&!isNaN(t)}function R(t){return typeof t===g}function O(t){return B(t)||R(t)&&isFinite(t)}function I(t){return"function"==typeof t}var L="object",V="undefined";function j(t){for(var e=arguments,o=arguments.length,i=1;i<o;i++)!function t(e,o){for(var i in o){var r=o[i],n=typeof r,s=void 0;(s=n===L&&null!==r?r.constructor:null)&&s!==Array?r instanceof Date?e[i]=new Date(r.getTime()):I(r.clone)?e[i]=r.clone():(s=e[i],e[i]=typeof s===L&&s||{},t(e[i],r)):n!==V&&(e[i]=r)}return e}(t,e[i]);return t}function D(t){return"object"==typeof t}function z(t){return B(t)?t+"px":t}var E=/width|height|top|left|bottom|right/i;function H(t,e){var o=R(e)?[e]:e;if(x(o)){for(var i={},r=window.getComputedStyle(t),n=0;n<o.length;n++){var s=o[n];i[s]=E.test(s)?parseFloat(r[s]):r[s]}return i}if(D(e))for(var a in e)t.style[a]=z(e[a])}function U(t,e){void 0===e&&(e=0);var o={top:0,right:0,bottom:0,left:0};return"number"==typeof t?o[k]=o[S]=o[_]=o[C]=t:(o[k]=t[k]||e,o[S]=t[S]||e,o[_]=t[_]||e,o[C]=t[C]||e),o}var F={format:function(t,e){return e},toString:function(t){return t},parseDate:function(t){return new Date(t)},firstDay:function(){return 0}},G=function(){},N={implementation:{configurable:!0}};G.register=function(t){F=t},N.implementation.get=function(){return F},Object.defineProperties(G,N);var W=G,X=/\{(\d+)(:[^\}]+)?\}/g,Y=function(t){this._intlService=t},q={intl:{configurable:!0}};q.intl.get=function(){return this._intlService||W.implementation},q.intl.set=function(t){this._intlService=t},Y.prototype.auto=function(t){for(var e=[],o=arguments.length-1;0<o--;)e[o]=arguments[o+1];var i=this.intl;return R(t)&&t.match(s)?i.format.apply(i,[t].concat(e)):i.toString(e[0],t)},Y.prototype.localeAuto=function(t,i,r){var n=this.intl;return R(t)&&t.match(s)?t.replace(X,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(Y.prototype,q);var Q=Y,Z=function(t,e){this._intlService=(e=void 0===e?{}:e).intlService,this.sender=e.sender||t,this.format=new Q(e.intlService),this.chart=t,this.rtl=Boolean(e.rtl)},K={intl:{configurable:!0}};K.intl.get=function(){return this._intlService||W.implementation},K.intl.set=function(t){this._intlService=t,this.format.intl=t},Z.prototype.notify=function(t,e){this.chart&&this.chart.trigger(t,e)},Z.prototype.isPannable=function(t){var e=((this.chart||{}).options||{}).pannable;return e&&e.lock!==t},Object.defineProperties(Z.prototype,K);var $,J=Z,tt=function(){};tt.register=function(t){$=t},tt.create=function(t,e){if($)return $.create(t,e)};var et=tt,ot={compile:function(t){return t}},it=function(){};it.register=function(t){ot=t},it.compile=function(t){return ot.compile(t)};var rt=it;function nt(t){var e;return(t=void 0===t?{}:t).template?t.template=e=rt.compile(t.template):I(t.content)&&(e=t.content),e}var st=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g,at={};function pt(t){if(at[t])return at[t];var r=[];return t.replace(st,function(t,e,o,i){r.push(P.drawing.util.defined(e)?e:o||i)}),at[t]=function(t){for(var e=t,o=0;o<r.length&&e;o++)e=e[r[o]];return e},at[t]}function ht(t,e){for(var o=t.length,i=[],r=0;r<o;r++)e(t[r])&&i.push(t[r]);return i}function lt(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}at[void 0]=function(t){return t};var ct=function(){this._map={}};ct.prototype.get=function(t){return this._map[this._key(t)]},ct.prototype.set=function(t,e){this._map[this._key(t)]=e},ct.prototype._key=function(t){return t instanceof Date?t.getTime():t};var ut=ct;function dt(t,e){if(e)return-1!==e.indexOf(t)}function gt(t,e,o){return P.drawing.util.round(t+(e-t)*o,3)}var ft=function(t,e){this.observer=t,this.handlerMap=j({},this.handlerMap,e)};ft.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},ft.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)},ft.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 yt=ft;function vt(t,e){for(var o=t.length,i=[],r=0;r<o;r++){var n=e(t[r]);P.drawing.util.defined(n)&&i.push(n)}return i}var mt=P.support.browser||{};function xt(t){var e=0;return t.wheelDelta?(e=-t.wheelDelta/120,mt.webkit&&(e/=2*Math.max(window.devicePixelRatio,.625))):t.detail&&(e=t.detail/3),0<e?Math.ceil(e):Math.floor(e)}function wt(){}var bt=P.drawing.util,_t=bt.append,At=bt.bindEvents,Ct=bt.defined,St=bt.deg,kt=bt.elementOffset,Pt=bt.elementSize,Mt=bt.eventElement,Tt=bt.eventCoordinates,Bt=bt.last,Rt=bt.limitValue,Ot=bt.objectKey,It=bt.rad,Lt=bt.round,Vt=bt.unbindEvents,jt=bt.valueOrDefault;wt.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++,wt.fetchFonts(e,i,r),r.depth--))})},wt.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(P.logToConsole)(t)}Promise.all(o).then(e,e)}else e()},wt.preloadFonts=function(t,e){var o=[];wt.fetchFonts(t,o),wt.loadFonts(o,e)};var Dt=wt;function zt(t,e){t=t.prototype;t.options?t.options=j({},t.options,e):t.options=e}function Et(t){for(var e=l,o=c,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===l?void 0:e,max:o===c?void 0:o}}function Ht(t,e){for(var o=0;o<t.length;o++){var i=t[o];if(e(i,o,t))return i}}var Ut=P.geometry.Matrix,Ft=/matrix\((.*)\)/;function Gt(t){var e=getComputedStyle(t).transform;return"none"===e?Ut.unit():function(){var t=e.match(Ft);if(null===t||2!==t.length)return Ut.unit();t=t[1].split(",").map(function(t){return parseFloat(t)});return new(Function.prototype.bind.apply(Ut,[null].concat(t)))}()}function Nt(t){if(!t)return Ut.unit();for(var e=Gt(t),o=t.parentElement;o;)var i=Gt(o),e=e.multiplyCopy(i),o=o.parentElement;return e.b=e.c=e.e=e.f=0,e}function Wt(t){return new P.Color(t).isDark()?a:r}function Xt(t){this._index={},this._values=t?t.slice(0):[];for(var e=0;e<this._values.length;e++)this._index[this._values[e]]=e}var Yt={},qt={size:{configurable:!0}};Xt.prototype.values=function(){return this._values.filter(function(t){return t!==Yt})},Xt.prototype.has=function(t){return void 0!==this._index[t]},Xt.prototype.add=function(t){this.has(t)||(this._index[t]=this._values.length,this._values.push(t))},Xt.prototype.delete=function(t){var e=this._index[t];void 0!==e&&(this._values[e]=Yt,delete this._index[t])},Xt.prototype.clear=function(){this._index={},this._values=[]},qt.size.get=function(){return this._values.length},Object.defineProperties(Xt.prototype,qt);function Qt(t){this._set=new Set(t)}var Zt={size:{configurable:!0}};Qt.prototype.values=function(){return Array.from(this._set)},Qt.prototype.has=function(t){return this._set.has(t)},Qt.prototype.add=function(t){this._set.add(t)},Qt.prototype.delete=function(t){this._set.delete(t)},Qt.prototype.clear=function(){this._set.clear()},Zt.size.get=function(){return this._set.size},Object.defineProperties(Qt.prototype,Zt);function Kt(t){return e=!1,new((e="function"==typeof Set?new Set([1]).has(1):e)?Qt:Xt)(t);var e}function $t(t,e){t=Lt(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=Lt(t/e,f);return Lt(e*(t<1.904762?.2:t<4.761904?.5:t<9.523809?1:2),f)}var Jt,te=((Jt=P.Class)&&(ee.__proto__=Jt),((ee.prototype=Object.create(Jt&&Jt.prototype)).constructor=ee).prototype.clone=function(){return new ee(this.x,this.y)},ee.prototype.equals=function(t){return t&&this.x===t.x&&this.y===t.y},ee.prototype.rotate=function(t,e){var o=It(e),i=Math.cos(o),r=Math.sin(o),n=t.x,e=t.y,o=this.x,t=this.y;return this.x=Lt(n+(o-n)*i+(t-e)*r,3),this.y=Lt(e+(t-e)*i-(o-n)*r,3),this},ee.prototype.multiply=function(t){return this.x*=t,this.y*=t,this},ee.prototype.distanceTo=function(t){var e=this.x-t.x,t=this.y-t.y;return Math.sqrt(e*e+t*t)},ee.onCircle=function(t,e,o){e=It(e);return new ee(t.x-o*Math.cos(e),t.y-o*Math.sin(e))},ee);function ee(t,e){Jt.call(this),this.x=t||0,this.y=e||0}function oe(t,e,o,i,r){r=It(r);return new te(o+(t-o)*Math.cos(r)+(e-i)*Math.sin(r),i-(t-o)*Math.sin(r)+(e-i)*Math.cos(r))}var ie,re=((ie=P.Class)&&(ne.__proto__=ie),((ne.prototype=Object.create(ie&&ie.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 Ct(t)&&(this.x1=t,this.x2=this.x1+i),Ct(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=x(t),o=e?t[0]:t.x,t=e?t[1]:t.y;return this.wrap(new ne(o,t,o,t)),this},ne.prototype.snapTo=function(t,e){return e!==v&&e||(this.x1=t.x1,this.x2=t.x2),e!==m&&e||(this.y1=t.y1,this.y2=t.y2),this},ne.prototype.alignTo=function(t,e){var o,i,r=this.height(),n=this.width(),s=e===k||e===_?m:v,a=s==m?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===k||e===C?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=U(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=U(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 te(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 te(this.x1,this.y1),new te(this.x2,this.y1),new te(this.x2,this.y2),new te(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,n=i.y,s=oe(0,0,r,n,t),a=oe(e,0,r,n,t),i=oe(e,o,r,n,t),t=oe(0,o,r,n,t),e=Math.max(s.x,a.x,i.x,t.x)-Math.min(s.x,a.x,i.x,t.x),o=Math.max(s.y,a.y,i.y,t.y)-Math.min(s.y,a.y,i.y,t.y);return this.x2=this.x1+e,this.y2=this.y1+o,this},ne.prototype.toRect=function(){return new P.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,n=e===v?"width":"height",e=this[n]();dt(o,[C,k])?(this[i]=t[i],this[r]=this[i]+e):dt(o,[S,_])?(this[r]=t[r],this[i]=this[r]-e):o===A&&(this[i]=t[i]+(t[n]()-e)/2,this[r]=this[i]+e)},ne);function ne(t,e,o,i){ie.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}var ae,pe,he,le=((he=P.Class)&&(fe.__proto__=he),((fe.prototype=Object.create(he&&he.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 o=It(t),t=Math.cos(o),o=Math.sin(o),e=e?this.innerRadius:this.radius,t=Lt(this.center.x-t*e,3),e=Lt(this.center.y-o*e,3);return new te(t,e)},fe.prototype.adjacentBox=function(t,e,o){var i=this.clone().expand(t),r=i.middle(),n=i.point(r),s=e/2,a=o/2,t=Math.sin(It(r)),i=Math.cos(It(r)),r=n.x-s,n=n.y-a;return Math.abs(t)<.9&&(r+=s*-i/Math.abs(i)),Math.abs(i)<.9&&(n+=a*-t/Math.abs(t)),new re(r,n,r+e,n+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,a=t.y-e.y,t=new te(s,a),r=this.point(r),r=new te(r.x-e.x,r.y-e.y),n=this.point(n),e=new te(n.x-e.x,n.y-e.y),a=Lt(s*s+a*a,3);return(r.equals(t)||T(r,t))&&!T(e,t)&&o*o<=a&&a<=i*i},fe.prototype.getBBox=function(){for(var t=new re(l,l,c,c),e=Lt(this.startAngle%360),o=Lt((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)),p=0;p<a.length;p++){var h=this.point(a[p]);t.wrapPoint(h),t.wrapPoint(h,i)}return i||t.wrapPoint(this.center),t},fe.prototype.expand=function(t){return this.radius+=t,this},fe),ce=((pe=le)&&(ge.__proto__=pe),((ge.prototype=Object.create(pe&&pe.prototype)).constructor=ge).prototype.expand=function(t){return pe.prototype.expand.call(this,t)},ge.prototype.clone=function(){return new ge(this.center,this.radius,this.startAngle,this.angle)},ge.prototype.setRadius=function(t){return this.radius=t,this},ge),ue=((ae=P.Class)&&(de.__proto__=ae),((de.prototype=Object.create(ae&&ae.prototype)).constructor=de).prototype.createRing=function(t,e){var o=t.startAngle+180,i=t.angle+o;0<t.angle&&o===i&&(i+=.001);var r=new P.geometry.Point(t.center.x,t.center.y),n=Math.max(t.radius,0),t=Math.max(t.innerRadius,0),n=new P.geometry.Arc(r,{startAngle:o,endAngle:i,radiusX:n,radiusY:n}),e=P.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},de);function de(){ae.apply(this,arguments)}function ge(t,e,o,i){pe.call(this,t,0,e,o,i)}function fe(t,e,o,i,r){he.call(this),this.center=t,this.innerRadius=e,this.radius=o,this.startAngle=i,this.angle=r}ue.current=new ue;var ye,ve=ue,me=((ye=P.Class)&&(xe.__proto__=ye),((xe.prototype=Object.create(ye&&ye.prototype)).constructor=xe).prototype.initUserOptions=function(t){return t},xe.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},xe.prototype.destroy=function(){var t=this.children;this.animation&&this.animation.destroy();for(var e=0;e<t.length;e++)t[e].destroy()},xe.prototype.getRoot=function(){var t=this.parent;return t?t.getRoot():null},xe.prototype.getSender=function(){var t=this.getService();if(t)return t.sender},xe.prototype.getService=function(){for(var t=this;t;){if(t.chartService)return t.chartService;t=t.parent}},xe.prototype.translateChildren=function(t,e){for(var o=this.children,i=o.length,r=0;r<i;r++)o[r].box.translate(t,e)},xe.prototype.append=function(){for(var t=arguments,e=0;e<arguments.length;e++){var o=t[e];this.children.push(o),o.parent=this}},xe.prototype.renderVisual=function(){!1!==this.options.visible&&(this.createVisual(),this.addVisual(),this.renderChildren(),this.createAnimation(),this.renderComplete())},xe.prototype.addVisual=function(){this.visual&&((this.visual.chartElement=this).parent&&this.parent.appendVisual(this.visual))},xe.prototype.renderChildren=function(){for(var t=this.children,e=t.length,o=0;o<e;o++)t[o].renderVisual()},xe.prototype.createVisual=function(){this.visual=new P.drawing.Group({zIndex:this.options.zIndex,visible:jt(this.options.visible,!0)})},xe.prototype.createAnimation=function(){this.visual&&this.options.animation&&(this.animation=P.drawing.Animation.create(this.visual,this.options.animation))},xe.prototype.appendVisual=function(t){t.chartElement||(t.chartElement=this),t.options.noclip?this.clipRoot().visual.append(t):Ct(t.options.zIndex)?this.stackRoot().stackVisual(t):this.isStackRoot?this.stackVisual(t):this.visual?this.visual.append(t):this.parent.appendVisual(t)},xe.prototype.clipRoot=function(){return this.parent?this.parent.clipRoot():this},xe.prototype.stackRoot=function(){return this.parent?this.parent.stackRoot():this},xe.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(jt(n.options.zIndex,0)>e)break}this.visual.insert(r,t)},xe.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)}},xe.prototype.closest=function(t){for(var e=this,o=!1;e&&!o;)(o=t(e))||(e=e.parent);if(o)return e},xe.prototype.renderComplete=function(){},xe.prototype.hasHighlight=function(){var t=(this.options||{}).highlight;return!(!this.createHighlight||t&&!1===t.visible)},xe.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);Ct(n.options.zIndex)||(n.options.zIndex=jt(i.zIndex,this.options.zIndex)),this.appendVisual(n)}n.visible(t)},xe.prototype.createGradientOverlay=function(t,e,o){e=new P.drawing.Path(Object.assign({stroke:{color:"none"},fill:this.createGradient(o),closed:t.options.closed},e));return e.segments.elements(t.segments.elements()),e},xe.prototype.createGradient=function(t){if(this.parent)return this.parent.createGradient(t)},xe.prototype.supportsPointInactiveOpacity=function(){return!0},xe);function xe(t){ye.call(this),this.children=[],this.options=j({},this.options,this.initUserOptions(t))}me.prototype.options={};var we,be=me,_e=((we=be)&&(Ae.__proto__=we),((Ae.prototype=Object.create(we&&we.prototype)).constructor=Ae).prototype.reflow=function(t){function e(){i.align(t,v,r.align),i.align(t,m,r.vAlign),i.paddingBox=o.clone().unpad(h).unpad(c)}var o,i=this,r=this.options,n=r.width,s=r.height,a=r.shrinkToFit,p=n&&s,h=r.margin,l=r.padding,c=r.border.width,u=t.clone();p&&(u.x2=u.x1+n,u.y2=u.y1+s),a&&u.unpad(h).unpad(c).unpad(l),we.prototype.reflow.call(this,u),o=p?this.box=new re(0,0,n,s):this.box,a&&p?(e(),u=this.contentBox=this.paddingBox.clone().unpad(l)):(u=this.contentBox=o.clone(),o.pad(l).pad(c).pad(h),e()),this.translateChildren(o.x1-u.x1+h.left+c+l.left,o.y1-u.y1+h.top+c+l.top);for(var d=this.children,g=0;g<d.length;g++){var f=d[g];f.reflow(f.box)}},Ae.prototype.align=function(t,e,o){this.box.align(t,e,o)},Ae.prototype.hasBox=function(){var t=this.options;return t.border.width||t.background},Ae.prototype.createVisual=function(){we.prototype.createVisual.call(this),this.options.visible&&this.hasBox()&&this.visual.append(P.drawing.Path.fromRect(this.paddingBox.toRect(),this.visualStyle()))},Ae.prototype.visualStyle=function(){var t=this.options,e=t.border||{};return{stroke:{width:e.width,color:e.color,opacity:jt(e.opacity,t.opacity),dashType:e.dashType},fill:{color:t.background,opacity:t.opacity},cursor:t.cursor}},Ae);function Ae(t){we.call(this,t),this.options.margin=U(this.options.margin),this.options.padding=U(this.options.padding)}zt(_e,{align:C,vAlign:k,margin:{},padding:{},border:{color:r,width:0},background:"",shrinkToFit:!1,width:0,height:0,visible:!0});var Ce,Se=_e,ke=((Ce=Se)&&(Pe.__proto__=Ce),((Pe.prototype=Object.create(Ce&&Ce.prototype)).constructor=Pe).prototype.getElement=function(){var t=this.options,e=this.paddingBox,o=t.type,i=t.rotation,r=e.center(),n=e.width()/2,s=e.height()/2;if(!t.visible||!this.hasBox())return null;var a,p=this.visualStyle();return o===u?a=new P.drawing.Circle(new P.geometry.Circle([Lt(e.x1+n,3),Lt(e.y1+s,3)],Math.min(n,s)),p):"triangle"===o?a=P.drawing.Path.fromPoints([[e.x1+n,e.y1],[e.x1,e.y2],[e.x2,e.y2]],p).close():"cross"===o?((a=new P.drawing.MultiPath(p)).moveTo(e.x1,e.y1).lineTo(e.x2,e.y2),a.moveTo(e.x1,e.y2).lineTo(e.x2,e.y1)):(e=e.toRect(),"roundedRect"===o&&(o=jt(t.borderRadius,e.width()/5),e.setCornerRadius(o)),a=P.drawing.Path.fromRect(e,p)),i&&a.transform(P.geometry.transform().rotate(-i,[r.x,r.y])),a.options.zIndex=t.zIndex,a},Pe.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()},Pe.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}},Pe.prototype.createVisual=function(){this.visual=this.createElement()},Pe);function Pe(t,e){Ce.call(this,t),this.pointData=e}zt(ke,{type:u,align:A,vAlign:A});var Me=ke,Te={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}};var Be,N=((Be=be)&&(Re.__proto__=Be),((Re.prototype=Object.create(Be&&Be.prototype)).constructor=Re).prototype.reflow=function(){var t=this.options,e=this.children,o=new re(0,0,t.width,t.height);this.box=o.unpad(t.margin);for(var i=0;i<e.length;i++)e[i].reflow(o),o=function(t,e){if(t.x1===e.x1&&t.y1===e.y1&&t.x2===e.x2&&t.y2===e.y2)return e;var o=Math.min(t.x1,e.x1),i=Math.max(t.x1,e.x1),r=Math.min(t.x2,e.x2),n=Math.max(t.x2,e.x2),s=Math.min(t.y1,e.y1),a=Math.max(t.y1,e.y1),p=Math.min(t.y2,e.y2),h=Math.max(t.y2,e.y2),l=[];return l[0]=new re(i,s,r,a),l[1]=new re(o,a,i,p),l[2]=new re(r,a,n,p),l[3]=new re(i,p,r,h),t.x1===o&&t.y1===s||e.x1===o&&e.y1===s?(l[4]=new re(o,s,i,a),l[5]=new re(r,p,n,h)):(l[4]=new re(r,s,n,a),l[5]=new re(o,p,i,h)),ht(l,function(t){return 0<t.height()&&0<t.width()})[0]}(o,e[i].box)||new re},Re.prototype.createVisual=function(){this.visual=new P.drawing.Group,this.createBackground()},Re.prototype.createBackground=function(){var t=this.options,e=t.border||{},o=this.box.clone().pad(t.margin).unpad(e.width),t=P.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(t)},Re.prototype.getRoot=function(){return this},Re.prototype.createGradient=function(t){var e,s,o=this.gradients,i=Ot(t),r=Te[t.gradient];return o[i]?e=o[i]:(s=Object.assign({},r,t),"linear"===r.type?e=new P.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 P.drawing.RadialGradient(s)).supportVML=!1!==r.supportVML),o[i]=e),e},Re.prototype.cleanGradients=function(){var t,e=this.gradients;for(t in e)e[t]._observers=[]},Re.prototype.size=function(){var t=this.options;return new re(0,0,t.width,t.height)},Re);function Re(t){Be.call(this,t);t=this.options;t.width=parseInt(t.width,10),t.height=parseInt(t.height,10),this.gradients={}}zt(N,{width:600,height:400,background:a,border:{color:r,width:0},margin:U(5),zIndex:-2});var Oe,Ie=N,G=((Oe=be)&&(Le.__proto__=Oe),((Le.prototype=Object.create(Oe&&Oe.prototype)).constructor=Le).prototype._initDirection=function(){var t=this.options;t.vertical?(this.groupAxis=v,this.elementAxis=m,this.groupSizeField="width",this.elementSizeField="height",this.groupSpacing=t.spacing,this.elementSpacing=t.vSpacing):(this.groupAxis=m,this.elementAxis=v,this.groupSizeField="height",this.elementSizeField="width",this.groupSpacing=t.vSpacing,this.elementSpacing=t.spacing)},Le.prototype.reflow=function(t){this.box=t.clone(),this.reflowChildren()},Le.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,p=n.maxGroupElementsSize,h=s.length,n=t[o+1]+this.alignStart(a,t[r]());if(h){for(var l=n,c=0;c<h;c++){for(var u=s[c],d=u.groupElements,g=t[e+1],f=d.length,y=0;y<f;y++){var v=d[y],m=this.elementSize(v),x=l+this.alignStart(m[r],u.groupSize),w=new re;w[o+1]=x,w[o+2]=x+m[r],w[e+1]=g,w[e+2]=g+m[i],v.reflow(w),g+=m[i]+this.elementSpacing}l+=u.groupSize+this.groupSpacing}t[o+1]=n,t[o+2]=n+a,t[e+2]=t[e+1]+p}},Le.prototype.alignStart=function(t,e){var o=0,i=this.options.align;return i===S||i===_?o=e-t:i===A&&(o=(e-t)/2),o},Le.prototype.groupOptions=function(){for(var t=this.box,e=this.children,o=this.elementSizeField,i=this.groupSizeField,r=this.elementSpacing,n=this.groupSpacing,s=Lt(t[o]()),a=e.length,p=[],h=0,l=0,c=0,u=0,d=[],g=0;g<a;g++){var f=e[g];f.box||f.reflow(t);var y=this.elementSize(f);this.options.wrap&&Lt(l+r+y[o])>s&&(p.push({groupElements:d,groupSize:h,groupElementsSize:l}),u=Math.max(u,l),c+=n+h,l=h=0,d=[]),h=Math.max(h,y[i]),0<l&&(l+=r),l+=y[o],d.push(f)}return p.push({groupElements:d,groupSize:h,groupElementsSize:l}),{groups:p,groupsSize:c+=h,maxGroupElementsSize:u=Math.max(u,l)}},Le.prototype.elementSize=function(t){return{width:t.box.width(),height:t.box.height()}},Le.prototype.createVisual=function(){},Le);function Le(t){Oe.call(this,t),this._initDirection()}zt(G,{vertical:!0,wrap:!0,vSpacing:0,spacing:0});var Ve,je=G,De=P.drawing.Text,q=((Ve=be)&&(ze.__proto__=Ve),((ze.prototype=Object.create(Ve&&Ve.prototype)).constructor=ze).prototype.reflow=function(t){var e=this.options,e=e.size=P.drawing.util.measureText(this.content,{font:e.font});this.baseline=e.baseline,this.box=new re(t.x1,t.y1,t.x1+e.width,t.y1+e.height)},ze.prototype.createVisual=function(){var t=this.options,e=t.font,o=t.color,i=t.opacity,t=t.cursor;this.visual=new De(this.content,this.box.toRect().topLeft(),{font:e,fill:{color:o,opacity:i},cursor:t})},ze);function ze(t,e){Ve.call(this,e),this.content=t,this.reflow(new re)}zt(q,{font:"12px sans-serif",color:r});var Ee=q;function He(t){var e=t.origin,t=t.bottomRight();return new re(e.x,e.y,t.x,t.y)}var Ue,Fe,Ge=/\n/m,Ne=((Fe=Se)&&(Xe.__proto__=Fe),((Xe.prototype=Object.create(Fe&&Fe.prototype)).constructor=Xe).prototype._initContainer=function(){var t=this.options,e=String(this.content).split(Ge),o=new je({vertical:!0,align:t.align,wrap:!1}),i=j({},t,{opacity:1,animation:null});this.container=o,this.append(o);for(var r=0;r<e.length;r++){var n=new Ee(e[r].trim(),i);o.append(n)}},Xe.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=He(i.clippedBBox()||new P.geometry.Rect),i.options.zIndex=o.zIndex),this.box=this.contentBox=this.paddingBox=e):(Fe.prototype.reflow.call(this,t),o.rotation&&(e=U(o.margin),o=this.box.unpad(e),this.targetBox=t,this.normalBox=o.clone(),(o=this.rotate()).translate(e.left-e.right,e.top-e.bottom),this.rotatedBox=o.clone(),o.pad(e)))},Xe.prototype.createVisual=function(){var t=this.options;this.visual=new P.drawing.Group({transform:this.rotationTransform(),zIndex:t.zIndex,noclip:t.noclip}),this.hasBox()&&(t=P.drawing.Path.fromRect(this.paddingBox.toRect(),this.visualStyle()),this.visual.append(t))},Xe.prototype.renderVisual=function(){var t;this.options.visible&&(this.options.visual?((t=this.visual)&&!Ct(t.options.noclip)&&(t.options.noclip=this.options.noclip),this.addVisual(),this.createAnimation()):Fe.prototype.renderVisual.call(this))},Xe.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},Xe.prototype.getDefaultVisual=function(){this.createVisual(),this.renderChildren();var t=this.visual;return delete this.visual,t},Xe.prototype.rotate=function(){var t=this.options;return this.box.rotate(t.rotation),this.align(this.targetBox,v,t.align),this.align(this.targetBox,m,t.vAlign),this.box},Xe.prototype.rotationTransform=function(){var t=this.options.rotation;if(!t)return null;var e=this.normalBox.center(),o=e.x,i=e.y,e=this.rotatedBox.center();return P.geometry.transform().translate(e.x-o,e.y-i).rotate(t,[o,i])},Xe),Y=((Ue=be)&&(We.__proto__=Ue),((We.prototype=Object.create(Ue&&Ue.prototype)).constructor=We).prototype.reflow=function(t){Ue.prototype.reflow.call(this,t),this.box.snapTo(t,v)},We.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 We(t),e.append(i)),i},We);function We(t){Ue.call(this,t),this.append(new Ne(this.options.text,Object.assign({},this.options,{vAlign:this.options.position})))}function Xe(t,e,o){Fe.call(this,e),this.content=t,this.data=o,this._initContainer(),!1!==this.options._autoReflow&&this.reflow(new re)}zt(Y,{color:r,position:k,align:A,margin:U(5),padding:U(5)});var Ye,qe=Y,K=((Ye=Ne)&&(Qe.__proto__=Ye),((Qe.prototype=Object.create(Ye&&Ye.prototype)).constructor=Qe).prototype.visualContext=function(t){t=Ye.prototype.visualContext.call(this,t);return t.value=this.value,t.dataItem=this.dataItem,t.format=this.options.format,t.culture=this.options.culture,t},Qe.prototype.click=function(t,e){t.trigger("axisLabelClick",{element:Mt(e),value:this.value,text:this.text,index:this.index,dataItem:this.dataItem,axis:this.parent.options})},Qe.prototype.rotate=function(){var t,e;return this.options.alignRotation!==A?(t=this.normalBox.toRect(),e=this.rotationTransform(),this.box=He(t.bbox(e.matrix()))):Ye.prototype.rotate.call(this),this.box},Qe.prototype.rotationTransform=function(){var t=this.options,e=t.rotation;if(!e)return null;if(t.alignRotation===A)return Ye.prototype.rotationTransform.call(this);var o=P.geometry.transform().rotate(e).matrix(),i=this.normalBox.toRect(),r=this.targetBox.toRect(),n=t.rotationOrigin||k,s=n===k||n===_?v:m,a=n===k||n===_?m:v,p=n===k||n===C?r.origin:r.bottomRight(),h=i.topLeft().transformCopy(o),l=i.topRight().transformCopy(o),t=i.bottomRight().transformCopy(o),n=i.bottomLeft().transformCopy(o),i=P.geometry.Rect.fromPoints(h,l,t,n),o={};o[a]=r.origin[a]-i.origin[a];var i=Math.abs(h[a]+o[a]-p[a]),a=Math.abs(l[a]+o[a]-p[a]),n=Lt(i,f)===Lt(a,f)?(c=h,l):a<i?(c=l,t):(c=h,n),c=c[s]+(n[s]-c[s])/2;return o[s]=r.center()[s]-c,P.geometry.transform().translate(o.x,o.y).rotate(e)},Qe);function Qe(t,e,o,i,r){Ye.call(this,e,r),this.text=e,this.value=t,this.index=o,this.dataItem=i,this.reflow(new re)}zt(K,{_autoReflow:!1});var Ze,Ke=K,Z=((Ze=Se)&&($e.__proto__=Ze),(($e.prototype=Object.create(Ze&&Ze.prototype)).constructor=$e).prototype.hide=function(){this.options.visible=!1},$e.prototype.show=function(){this.options.visible=!0},$e.prototype.render=function(){var t,e,o,i,r,n,s,a,p=this,h=this.options;h.visible&&(o=h.label,a=h.icon,i=new re,r=function(){return p},n=a.size,s=this.fields.text,Ct(o)&&o.visible&&((h=nt(o))?s=h(this.fields):o.format&&(s=this.chartService.format.auto(o.format,s)),o.color||(o.color="inside"===o.position?"#fff":a.background),this.label=new Ne(s,j({},o)),this.label.aliasFor=r,"inside"!==o.position||Ct(n)||(a.type===u?n=Math.max(this.label.box.width(),this.label.box.height()):(t=this.label.box.width(),e=this.label.box.height()),i.wrap(this.label.box))),a.width=t||n||7,a.height=e||n||7,(a=new Me(j({},a))).aliasFor=r,this.marker=a,this.append(a),this.label&&this.append(this.label),a.reflow(new re),this.wrapperBox=i.wrap(a.box))},$e.prototype.reflow=function(t){var e,o,i,r=this.options,n=this.label,s=this.marker,a=this.wrapperBox,p=t.center(),h=r.line.length,l=r.position;r.visible&&(dt(l,[C,S])?l===C?(i=a.alignTo(t,l).translate(-h,t.center().y-a.center().y),r.line.visible&&(e=[t.x1,p.y],this.linePoints=[e,[i.x2,p.y]],o=i.clone().wrapPoint(e))):(i=a.alignTo(t,l).translate(h,t.center().y-a.center().y),r.line.visible&&(e=[t.x2,p.y],this.linePoints=[e,[i.x1,p.y]],o=i.clone().wrapPoint(e))):l===_?(i=a.alignTo(t,l).translate(t.center().x-a.center().x,h),r.line.visible&&(e=[p.x,t.y2],this.linePoints=[e,[p.x,i.y1]],o=i.clone().wrapPoint(e))):(i=a.alignTo(t,l).translate(t.center().x-a.center().x,-h),r.line.visible&&(e=[p.x,t.y1],this.linePoints=[e,[p.x,i.y2]],o=i.clone().wrapPoint(e))),s&&s.reflow(i),n&&(n.reflow(i),s&&("outside"===r.label.position&&n.box.alignTo(s.box,l),n.reflow(n.box))),this.contentBox=i,this.targetBox=t,this.box=o||i)},$e.prototype.createVisual=function(){Ze.prototype.createVisual.call(this),this.visual.options.noclip=this.options.noclip,this.options.visible&&this.createLine()},$e.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()):Ze.prototype.renderVisual.call(this)},$e.prototype.createLine=function(){var t=this.options.line;this.linePoints&&(M(t=P.drawing.Path.fromPoints(this.linePoints,{stroke:{color:t.color,width:t.width,dashType:t.dashType}})),this.visual.append(t))},$e.prototype.click=function(t,e){var o=this.eventArgs(e);t.trigger("noteClick",o)||e.preventDefault()},$e.prototype.over=function(t,e){var o=this.eventArgs(e);t.trigger("noteHover",o)||e.preventDefault()},$e.prototype.out=function(t,e){e=this.eventArgs(e);t.trigger("noteLeave",e)},$e.prototype.eventArgs=function(t){var e=this.options;return Object.assign(this.fields,{element:Mt(t),text:Ct(e.label)?e.label.text:"",visual:this.visual})},$e);function $e(t,e,o){Ze.call(this,e),this.fields=t,this.chartService=o,this.render()}zt(Z,{icon:{visible:!0,type:u},label:{position:"inside",visible:!0,align:A,vAlign:A},line:{visible:!0},visible:!0,position:k,zIndex:2});var Je=Z;function to(t,e){var o=t.tickX,i=t.tickY,r=t.position,n=new P.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),M(n),n}function eo(t,e){var o=t.lineStart,i=t.lineEnd,r=t.position,e=new P.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),M(e),e}var oo,tt=((oo=be)&&(io.__proto__=oo),((io.prototype=Object.create(oo&&oo.prototype)).constructor=io).prototype.initFields=function(){},io.prototype.labelsRange=function(){return{min:this.options.labels.skip,max:this.labelsCount()}},io.prototype.normalizeLabelRotation=function(t){var e=t.rotation;D(e)&&(t.alignRotation=e.align,t.rotation=e.angle)},io.prototype.createLabels=function(){var t=this.options,e=t.vertical?S:A,o=j({},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))}}},io.prototype.clearLabels=function(){this.children=ht(this.children,function(t){return!(t instanceof Ke)}),this.labels=[]},io.prototype.clearTitle=function(){var e=this;this.title&&(this.children=ht(this.children,function(t){return t!==e.title}),this.title=void 0)},io.prototype.clear=function(){this.clearLabels(),this.clearTitle()},io.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 re(r,e.y1,r,e.y2-t):new re(e.x1,i,e.x2-t,i)},io.prototype.createTitle=function(){var t=this.options,t=j({rotation:t.vertical?-90:0,text:"",zIndex:1,visualSize:!0},t.title);t.visible&&t.text&&(t=new Ne(t.text,t),this.append(t),this.title=t)},io.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=j({},e,o[i]);r.value=this.parseNoteValue(r.value);r=new Je({value:r.value,text:r.label.text,dataItem:r},r,this.chartService);r.options.visible&&(Ct(r.options.position)?t.vertical&&!dt(r.options.position,[C,S])?r.options.position=t.reverse?C:S:t.vertical||dt(r.options.position,[k,_])||(r.options.position=t.reverse?_:k):t.vertical?r.options.position=t.reverse?C:S:r.options.position=t.reverse?_:k,this.append(r),this.notes.push(r))}},io.prototype.parseNoteValue=function(t){return t},io.prototype.renderVisual=function(){oo.prototype.renderVisual.call(this),this.createPlotBands()},io.prototype.createVisual=function(){oo.prototype.createVisual.call(this),this.createBackground(),this.createLine()},io.prototype.gridLinesVisual=function(){var t=this._gridLines;return t||(t=this._gridLines=new P.drawing.Group({zIndex:-2}),this.appendVisual(this._gridLines)),t},io.prototype.createTicks=function(s){var t=this.options,a=this.lineBox(),p=t.labels.mirror,e=t.majorTicks.visible?t.majorUnit:0,h={vertical:t.vertical};function o(t,e,o){var i=t.length,r=Math.max(1,e.step);if(e.visible)for(var n=e.skip;n<i;n+=r)Ct(o)&&n%o==0||(h.tickX=p?a.x2:a.x2-e.size,h.tickY=p?a.y1-e.size:a.y1,h.position=t[n],s.append(to(h,e)))}o(this.getMajorTickPositions(),t.majorTicks),o(this.getMinorTickPositions(),t.minorTicks,e/t.minorUnit)},io.prototype.createLine=function(){var t=this.options,e=t.line,o=this.lineBox();0<e.width&&e.visible&&((e=new P.drawing.Path({stroke:{width:e.width,color:e.color,dashType:e.dashType}})).moveTo(o.x1,o.y1).lineTo(o.x2,o.y2),t._alignLines&&M(e),(t=this._lineGroup=new P.drawing.Group).append(e),this.visual.append(t),this.createTicks(t))},io.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},io.prototype.createBackground=function(){var t=this.options,e=this.box,t=t.background;t&&(this._backgroundPath=P.drawing.Path.fromRect(e.toRect(),{fill:{color:t},stroke:null}),this.visual.append(this._backgroundPath))},io.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 P.drawing.Group({zIndex:-1}),s=ht(this.pane.axes,function(t){return t.options.vertical!==e.options.vertical})[0],a=0;a<o.length;a++){var p=o[a],h=void 0,l=void 0,c=p.label,u=void 0,l=i?(h=(s||r.axisX).lineBox(),this.getSlot(p.from,p.to,!0)):(h=this.getSlot(p.from,p.to,!0),(s||r.axisY).lineBox());c&&(c.vAlign=c.position||C,u=this.createPlotBandLabel(c,p,new re(h.x1,l.y1,h.x2,l.y2))),0!==h.width()&&0!==l.height()&&(l=new P.geometry.Rect([h.x1,l.y1],[h.width(),l.height()]),p=P.drawing.Path.fromRect(l,{fill:{color:p.color,opacity:p.opacity},stroke:null}),n.append(p),u&&n.append(u))}this.appendVisual(n)}},io.prototype.createPlotBandLabel=function(t,e,o){if(!1===t.visible)return null;var i,r=t.text;return Ct(t)&&t.visible&&((i=nt(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)),(t=new Ne(r,t)).reflow(o),t.renderVisual(),t.visual},io.prototype.createGridLines=function(t){var e=this.options,o=e.minorGridLines,i=e.majorGridLines,r=e.minorUnit,n=e.vertical,a=t.options.line.visible,e=i.visible?e.majorUnit:0,t=t.lineBox(),p=t[n?"y1":"x1"],h={lineStart:t[n?"x1":"y1"],lineEnd:t[n?"x2":"y2"],vertical:n},l=[],c=this.gridLinesVisual();function s(t,e,o){var i=t.length,r=Math.max(1,e.step);if(e.visible)for(var n=e.skip;n<i;n+=r){var s=Lt(t[n]);dt(s,l)||n%o==0||a&&p===s||(h.position=s,c.append(eo(h,e)),l.push(s))}}return s(this.getMajorTickPositions(),i),s(this.getMinorTickPositions(),o,e/r),c.children},io.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,p=((this.getRoot()||{}).box||t)[s](),h=0,l=0;l<n;l++){var c=o[l].box[s]();c+a<=p&&(h=Math.max(h,c))}this.box=r?new re(t.x1,t.y1,t.x1+h+a,t.y2):new re(t.x1,t.y1,t.x2,t.y1+h+a),this.arrangeTitle(),this.arrangeLabels(),this.arrangeNotes()},io.prototype.getLabelsTickPositions=function(){return this.getMajorTickPositions()},io.prototype.labelTickIndex=function(t){return t.index},io.prototype.arrangeLabels=function(){for(var t=this.options,e=this.labels,o=this.labelsBetweenTicks(),i=t.vertical,r=t.labels.mirror,n=this.getLabelsTickPositions(),s=0;s<e.length;s++){var a=e[s],p=this.labelTickIndex(a),h=i?a.box.height():a.box.width(),l=n[p],c=n[p+1],u=void 0,p=void 0,p=i?u=o?l+(c-l)/2-h/2:l-h/2:o?(u=l,c):(u=l-h/2)+h;this.positionLabel(a,r,u,p)}},io.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,a=n?(n=s.x2,e?(n+=r,t.options.rotationOrigin=C):(n-=r+t.box.width(),t.options.rotationOrigin=S),t.box.move(n,o)):(a=s.y1,e?(a-=r+t.box.height(),t.options.rotationOrigin=_):(a+=r,t.options.rotationOrigin=k),new re(o,a,i,a+t.box.height()));t.reflow(a)},io.prototype.autoRotateLabelAngle=function(t,e){return t.width()<e?0:t.height()>e?-90:-45},io.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,n=this.autoRotateLabelAngle(s,n);if(-90===(i=0!==n?n:i))break}if(0!==i){for(var a=0;a<e.length;a++)e[a].options.rotation=i,e[a].reflow(new re);return!0}},io.prototype.arrangeTitle=function(){var t=this.options,e=this.title,o=t.labels.mirror,t=t.vertical;e&&(t?(e.options.align=o?S:C,e.options.vAlign=e.options.position):(e.options.align=e.options.position,e.options.vAlign=o?k:_),e.reflow(this.box))},io.prototype.arrangeNotes=function(){for(var t=0;t<this.notes.length;t++){var e=this.notes[t],o=e.options.value,i=void 0;Ct(o)?(this.shouldRenderNote(o)?e.show():e.hide(),i=this.noteSlot(o)):e.hide(),e.reflow(i||this.lineBox())}},io.prototype.noteSlot=function(t){return this.getSlot(t)},io.prototype.alignTo=function(t){var e=t.lineBox(),o=this.options.vertical,t=o?m:v;this.box.snapTo(e,t),o?this.box.shrink(0,this.lineBox().height()-e.height()):this.box.shrink(this.lineBox().width()-e.width(),0),this.box[t+1]-=this.lineBox()[t+1]-e[t+1],this.box[t+2]-=this.lineBox()[t+2]-e[t+2]},io.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=nt(e),o=n?n(Object.assign({},o,{get text(){return i()},value:t,format:e.format,culture:e.culture})):i();return o},io.prototype.slot=function(t,e,o){o=this.getSlot(t,e,o);if(o)return o.toRect()},io.prototype.contentBox=function(){var t,e,o=this.box.clone(),i=this.labels;return i.length&&(t=this.options.vertical?m:v,this.chartService.isPannable(t)?(e=this.maxLabelOffset(),o[t+1]-=e.start,o[t+2]+=e.end):(i[0].options.visible&&o.wrap(i[0].box),(i=i[i.length-1]).options.visible&&o.wrap(i.box))),o},io.prototype.maxLabelOffset=function(){for(var t=this.options,e=t.vertical,t=t.reverse,o=this.labelsBetweenTicks(),i=this.getLabelsTickPositions(),r=e?m:v,n=this.labels,s=t?1:0,a=t?0:1,p=0,h=0,l=0;l<n.length;l++){var c=n[l],u=this.labelTickIndex(c),d=void 0,g=void 0;o?(d=i[u+s],g=i[u+a]):d=g=i[u],p=Math.max(p,d-c.box[r+1]),h=Math.max(h,c.box[r+2]-g)}return{start:p,end:h}},io.prototype.limitRange=function(t,e,o,i,r){var n=this.options;if(t<o&&r<0&&(!Ct(n.min)||n.min<=o)||i<e&&0<r&&(!Ct(n.max)||i<=n.max))return null;if(e<o&&0<r||i<t&&r<0)return{min:t,max:e};var s=e-t,a=t,n=e;return t<o&&r<0?(a=Rt(t,o,i),n=Rt(t+s,o+s,i)):i<e&&0<r&&(n=Rt(e,o,i),a=Rt(e-s,o,i-s)),{min:a,max:n}},io.prototype.valueRange=function(){return{min:this.seriesMin,max:this.seriesMax}},io.prototype.lineDir=function(){var t=this.options;return(t.vertical?-1:1)*(t.reverse?-1:1)},io.prototype.lineInfo=function(){var t=this.options.vertical,e=this.lineBox(),o=t?e.height():e.width(),i=t?m:v,r=this.lineDir(),t=i+(1===r?1:2).toString();return{axis:i,axisOrigin:t,axisDir:r,lineBox:e,lineSize:o,lineStart:e[t]}},io.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},io.prototype.scaleToDelta=function(t,e){t=Rt(t,-.999,.999);return 0<t?e*Math.min(1,t):e-e/(1+t)},io.prototype.labelsBetweenTicks=function(){return!this.options.justified},io.prototype.prepareUserOptions=function(){},io);function io(t,e){void 0===e&&(e=new J),oo.call(this,t),this.chartService=e,this.options.visible||(this.options=j({},this.options,{labels:{visible:!1},line:{visible:!1},margin:0,majorTickSize:0,minorTickSize:0})),this.options.minorTicks=j({},{color:this.options.line.color,width:this.options.line.width,visible:this.options.minorTickType!==n},this.options.minorTicks,{size:this.options.minorTickSize,align:this.options.minorTickType}),this.options.majorTicks=j({},{color:this.options.line.color,width:this.options.line.width,visible:this.options.majorTickType!==n},this.options.majorTicks,{size:this.options.majorTickSize,align:this.options.majorTickType}),this.initFields(),this.options._deferLabels||this.createLabels(),this.createTitle(),this.createNotes()}zt(tt,{labels:{visible:!0,rotation:0,mirror:!1,step:1,skip:0},line:{width:1,color:r,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:n,majorGridLines:{skip:0,step:1},minorGridLines:{visible:!1,width:1,color:r,skip:0,step:1},margin:5,visible:!0,reverse:!1,justified:!0,notes:{label:{text:""}},_alignLines:!0,_deferLabels:!1});var ro=tt,no="milliseconds",so="seconds",ao="minutes",po="hours",ho="days",lo="weeks",co="months",uo="years",go=1e3,fo=60*go,yo=60*fo,vo=24*yo,mo=7*vo,xo=31*vo,wo=365*vo,bo={years:wo,months:xo,weeks:mo,days:vo,hours:yo,minutes:fo,seconds:go,milliseconds:1};function _o(t,e){return t.getTime()-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*fo}function Ao(t,e){return new Date(t.getTime()+e)}function Co(t){var e;return t instanceof Date?e=t:t&&(e=new Date(t)),e}function So(t,e){return 0===e&&23===t.getHours()&&(t.setHours(t.getHours()+2),1)}function ko(t,e,o,r){var i,n,s,a=t;return t&&(s=(i=Co(t)).getHours(),o===uo?So(a=new Date(i.getFullYear()+e,0,1),0):o===co?So(a=new Date(i.getFullYear(),i.getMonth()+e,1),s):o===lo?So(a=ko(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 Ao(t,-o*vo)}(i,r),7*e,ho),s):o===ho?So(a=new Date(i.getFullYear(),i.getMonth(),i.getDate()+e),s):o===po?(n=i,t=e,(s=new Date(n)).setMinutes(0,0,0),a=Ao(s,(n.getTimezoneOffset()-s.getTimezoneOffset())*fo+t*yo)):o===ao?0<(a=Ao(i,e*fo)).getSeconds()&&a.setSeconds(0):o===so?a=Ao(i,e*go):o===no&&(a=Ao(i,e)),o!==no&&0<a.getMilliseconds()&&a.setMilliseconds(0)),a}function Po(t,e,o){return ko(Co(t),0,e,o)}function Mo(t,e,o){t=Co(t);return t&&Po(t,e,o).getTime()===t.getTime()?t:ko(t,1,e,o)}function To(t,e){return t&&e?t.getTime()-e.getTime():-1}function Bo(t,e){return t.getTime()-e}function Ro(t){if(x(t)){for(var e=[],o=0;o<t.length;o++)e.push(Ro(t[o]));return e}if(t)return Co(t).getTime()}function Oo(t,e){return t&&e?Ro(t)===Ro(e):t===e}function Io(t,e,o){return _o(t,e)/bo[o]}function Lo(t,e,o,i){var r=Co(t),t=Co(e);return(o===co?r.getMonth()-t.getMonth()+12*(r.getFullYear()-t.getFullYear())+Io(r,new Date(r.getFullYear(),r.getMonth()),ho)/new Date(r.getFullYear(),r.getMonth()+1,0).getDate():o===uo?r.getFullYear()-t.getFullYear()+Lo(r,new Date(r.getFullYear(),0),co,1)/12:o===ho||o===lo?Io(r,t,o):Bo(r,e)/bo[o])/i}function Vo(t,e,o){return o===uo?e.getFullYear()-t.getFullYear():o===co?12*Vo(t,e,uo)+e.getMonth()-t.getMonth():o===ho?Math.floor(Bo(e,t)/vo):Math.floor(Bo(e,t)/bo[o])}function jo(t,e){return R(e)&&t.parseDate(e)||Co(e)}function Do(t,e){if(x(e)){for(var o=[],i=0;i<e.length;i++)o.push(jo(t,e[i]));return o}return jo(t,e)}function zo(t,e){return B(t.weekStartDay)?t.weekStartDay:e&&e.firstDay?e.firstDay():0}var Eo,it=((Eo=ro)&&(Ho.__proto__=Eo),((Ho.prototype=Object.create(Eo&&Eo.prototype)).constructor=Ho).prototype.initFields=function(){this._ticks={}},Ho.prototype.categoriesHash=function(){return""},Ho.prototype.clone=function(){var t=new Ho(Object.assign({},this.options,{categories:this.options.srcCategories}),this.chartService);return t.createLabels(),t},Ho.prototype.initUserOptions=function(t){var e=t.categories||[],o=Ct(t.min),i=Ct(t.max);return t.srcCategories=t.categories=e,(o||i)&&e.length&&(o=o?Math.floor(t.min):0,e=i?t.justified?Math.floor(t.max)+1:Math.ceil(t.max):e.length,t.categories=t.categories.slice(o,e)),t},Ho.prototype.rangeIndices=function(){var t=this.options,e=t.categories.length||1;return{min:B(t.min)?t.min%1:0,max:B(t.max)&&t.max%1!=0&&t.max<this.totalRange().max?e-(1-t.max%1):e-(t.justified?1:0)}},Ho.prototype.totalRangeIndices=function(t){var e=this.options,o=B(e.min)?e.min:0;return e=B(e.max)?e.max:B(e.min)?o+e.categories.length:this.totalRange().max||1,t&&(t=this.totalRange(),o=Rt(o,0,t.max),e=Rt(e,0,t.max)),{min:o,max:e}},Ho.prototype.range=function(){var t=this.options;return{min:B(t.min)?t.min:0,max:(B(t.max)?t:this.totalRange()).max}},Ho.prototype.roundedRange=function(){return this.range()},Ho.prototype.totalRange=function(){var t=this.options;return{min:0,max:Math.max(this._seriesMax||0,t.srcCategories.length)-(t.justified?1:0)}},Ho.prototype.scaleOptions=function(){var t=this.rangeIndices(),e=t.min,o=t.max,t=this.lineBox();return{scale:(this.options.vertical?t.height():t.width())/(o-e||1)*(this.options.reverse?-1:1),box:t,min:e,max:o}},Ho.prototype.arrangeLabels=function(){Eo.prototype.arrangeLabels.call(this),this.hideOutOfRangeLabels()},Ho.prototype.hideOutOfRangeLabels=function(){var t,e,o,i=this.box,r=this.labels;0<r.length&&(e=i[(t=this.options.vertical?m:v)+1],o=i[t+2],i=r[0],r=Bt(r),(i.box[t+1]>o||i.box[t+2]<e)&&(i.options.visible=!1),(r.box[t+1]>o||r.box[t+2]<e)&&(r.options.visible=!1))},Ho.prototype.getMajorTickPositions=function(){return this.getTicks().majorTicks},Ho.prototype.getMinorTickPositions=function(){return this.getTicks().minorTicks},Ho.prototype.getLabelsTickPositions=function(){return this.getTicks().labelTicks},Ho.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},Ho.prototype.getTickPositions=function(t){for(var e=this.options,o=e.vertical,i=e.reverse,r=this.scaleOptions(),n=r.scale,e=r.box,s=r.min,a=e[(o?m:v)+(i?2:1)],p=this.tickIndices(t),h=[],l=0;l<p.length;l++)h.push(a+Lt(n*(p[l]-s),3));return h},Ho.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},Ho.prototype.filterOutOfRangePositions=function(t,e){if(!t.length)return t;for(var o=this.options.vertical?m:v,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)},Ho.prototype.lineInfo=function(){var t=this.options,e=t.vertical,o=t.reverse,i=this.lineBox(),r=e?i.height():i.width(),t=e?m:v,e=o?-1:1,o=t+(1==e?1:2).toString();return{axis:t,axisOrigin:o,axisDir:e,lineBox:i,lineSize:r,lineStart:i[o]}},Ho.prototype.lineDir=function(){return this.options.reverse?-1:1},Ho.prototype.getSlot=function(t,e,o){var i=this.options,r=i.reverse,n=i.justified,s=this.scaleOptions(),a=s.scale,p=s.box,h=s.min,l=this.lineInfo(),c=l.axis,u=l.lineStart,i=p.clone(),s=!Ct(e),l=jt(t,0),t=jt(e,l),t=Math.max(t-1,l),e=u+(l-h)*a,a=u+((t=Math.max(l,t))+1-h)*a;return s&&n&&(a=e),o&&(e=Rt(e,p[c+1],p[c+2]),a=Rt(a,p[c+1],p[c+2])),i[c+1]=r?a:e,i[c+2]=r?e:a,i},Ho.prototype.limitSlot=function(t){var e=this.options.vertical?m:v,o=this.lineBox(),i=t.clone();return i[e+1]=Rt(t[e+1],o[e+1],o[e+2]),i[e+2]=Rt(t[e+2],o[e+1],o[e+2]),i},Ho.prototype.slot=function(t,e,o){var i=Math.floor(this.options.min||0),t=t,e=e;return"string"==typeof t?t=this.categoryIndex(t):B(t)&&(t-=i),"string"==typeof e?e=this.categoryIndex(e):B(e)&&(e-=i),Eo.prototype.slot.call(this,t,e,o)},Ho.prototype.pointCategoryIndex=function(t){var e=this.options,o=e.reverse,i=e.justified,r=e.vertical?m:v,n=this.scaleOptions(),s=n.scale,a=n.box,p=n.min,e=n.max,n=a[r+1],a=a[r+2],r=t[r];if(r<n||a<r)return null;n=(o?e:p)+(r-n)/s,s=n%1;return i?n=Math.round(n):0==s&&0<n&&n--,Math.floor(n)},Ho.prototype.getCategory=function(t){t=this.pointCategoryIndex(t);return null===t?null:this.options.categories[t]},Ho.prototype.categoryIndex=function(t){return this.totalIndex(t)-Math.floor(this.options.min||0)},Ho.prototype.categoryAt=function(t,e){var o=this.options;return(e?o.srcCategories:o.categories)[t]},Ho.prototype.categoriesCount=function(){return(this.options.categories||[]).length},Ho.prototype.translateRange=function(t){var e=this.options,o=this.lineBox(),o=e.vertical?o.height():o.width(),e=e.categories.length,o=Lt(t/(o/e),f);return{min:o,max:e+o}},Ho.prototype.scaleRange=function(t,e){var o=Math.abs(this.pointOffset(e)),i=this.totalRangeIndices(),e=i.max-i.min,t=this.scaleToDelta(t,e),e=i.min+o*t,t=i.max-(1-o)*t;return{min:e,max:t=t-e<.1?e+.1:t}},Ho.prototype.zoomRange=function(t,e){var o=this.totalRange(),i=o.min,o=o.max,e=this.scaleRange(t,e);return{min:Rt(e.min,i,o),max:Rt(e.max,i,o)}},Ho.prototype.labelsCount=function(){var t=this.labelsRange();return t.max-t.min},Ho.prototype.labelsRange=function(){var t=this.options,e=t.justified,o=t.labels,i=this.totalRangeIndices(!0),r=i.min,n=i.max,i=Math.floor(r),n=e?(r=Math.ceil(r),Math.floor(n)):(r=Math.floor(r),Math.ceil(n));return{min:(r>o.skip?o.skip+o.step*Math.ceil((r-o.skip)/o.step):o.skip)-i,max:(t.categories.length?n+(e?1:0):0)-i}},Ho.prototype.createAxisLabel=function(t,e,o){var i=this.options,r=i.dataItems?i.dataItems[t]:null,i=jt(i.categories[t],"");o.dataItem=r;o=this.axisLabelText(i,e,o);return new Ke(i,o,t,r,e)},Ho.prototype.shouldRenderNote=function(t){var e=this.totalRangeIndices();return Math.floor(e.min)<=t&&t<=Math.ceil(e.max)},Ho.prototype.noteSlot=function(t){var e=this.options,e=t-Math.floor(e.min||0);return this.getSlot(e)},Ho.prototype.arrangeNotes=function(){Eo.prototype.arrangeNotes.call(this),this.hideOutOfRangeNotes()},Ho.prototype.hideOutOfRangeNotes=function(){var t=this.notes,e=this.box;if(t&&t.length)for(var o=this.options.vertical?m:v,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()}},Ho.prototype.pan=function(t){var e=this.totalRangeIndices(!0),o=this.scaleOptions().scale,i=Lt(t/o,f),t=this.totalRange(),o=e.min+i,e=e.max+i;return this.limitRange(o,e,0,t.max,i)},Ho.prototype.pointsRange=function(t,e){var o=this.options,i=o.reverse,r=o.vertical?m:v,n=this.totalRangeIndices(!0),s=this.scaleOptions(),o=s.scale,i=s.box[r+(i?2:1)],t=t[r]-i,i=e[r]-i,t=n.min+t/o,i=n.min+i/o,o=Math.min(t,i),i=Math.max(t,i);if(.01<=i-o)return{min:o,max:i}},Ho.prototype.valueRange=function(){return this.range()},Ho.prototype.totalIndex=function(t){var e=this.options;return this._categoriesMap?this._categoriesMap.get(t):function(t,e){if(t instanceof Date){for(var o=e.length,i=0;i<o;i++)if(Oo(e[i],t))return i;return-1}return e.indexOf(t)}(t,e.srcCategories)},Ho.prototype.currentRangeIndices=function(){var t=this.options,e=0;return{min:e=B(t.min)?Math.floor(t.min):e,max:B(t.max)?t.justified?Math.floor(t.max):Math.ceil(t.max)-1:this.totalCount()-1}},Ho.prototype.mapCategories=function(){if(!this._categoriesMap)for(var t=this._categoriesMap=new ut,e=this.options.srcCategories,o=0;o<e.length;o++)t.set(e[o],o)},Ho.prototype.totalCount=function(){return Math.max(this.options.srcCategories.length,this._seriesMax||0)},Ho);function Ho(){Eo.apply(this,arguments)}zt(it,{type:"category",vertical:!1,majorGridLines:{visible:!1,width:1,color:r},labels:{zIndex:1},justified:!1,_deferLabels:!0});var Uo=it,ct={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"},Fo=[no,so,ao,po,ho,lo,co,uo],Go="fit";function No(t){var e=t._range;return e||((e=t._range=Et(t)).min=Co(e.min),e.max=Co(e.max)),e}function Wo(t){this.options=t}Wo.prototype.displayIndices=function(){return{min:0,max:1}},Wo.prototype.displayRange=function(){return{}},Wo.prototype.total=function(){return{}},Wo.prototype.valueRange=function(){return{}},Wo.prototype.valueIndex=function(){return-1},Wo.prototype.values=function(){return[]},Wo.prototype.totalIndex=function(){return-1},Wo.prototype.valuesCount=function(){return 0},Wo.prototype.totalCount=function(){return 0},Wo.prototype.dateAt=function(){return null};function Xo(t,e,o){(this.options=o).baseUnitStep=o.baseUnitStep||1;var i=o.roundToBaseUnit,r=o.justified;this.start=ko(t,0,o.baseUnit,o.weekStartDay);var n=this.roundToTotalStep(e),s=!r&&Oo(e,n)&&!o.justifyEnd;this.end=this.roundToTotalStep(e,!r,s?1:0);var a=o.min||t;this.valueStart=this.roundToTotalStep(a),this.displayStart=i?this.valueStart:a,(t=o.max)?(a=!r&&Oo(t,this.roundToTotalStep(t))?-1:0,this.valueEnd=this.roundToTotalStep(t,!1,a),this.displayEnd=i?this.roundToTotalStep(t,!r):o.max):(this.valueEnd=n,this.displayEnd=i||s?this.end:e),this.valueEnd<this.valueStart&&(this.valueEnd=this.valueStart),this.displayEnd<=this.displayStart&&(this.displayEnd=this.roundToTotalStep(this.displayStart,!1,1))}function Yo(t,e,o){for(var i,r,n,s=No(t.categories),a=(t.max||s.max)-(t.min||s.min),p=t.autoBaseUnitSteps,h=t.maxDateGroups,l=t.baseUnit===Go,c=e?Fo.indexOf(e):0,u=l?Fo[c++]:t.baseUnit,d=a/bo[u],g=d;!r||h<=d;){for(i=i||p[u].slice(0);(n=i.shift())&&e===u&&n<o;);if(n)d=g/(r=n);else{if(u===Bt(Fo)){r=Math.ceil(g/h);break}if(!l){h<d&&(r=Math.ceil(g/h));break}u=Fo[c++]||Bt(Fo),g=a/bo[u],i=null}}t.baseUnitStep=r,t.baseUnit=u}function qo(t){var e=(t.baseUnit||"").toLowerCase();return e===Go||dt(e,Fo)||function(t){for(var e,o,i=t.categories,r=Ct(i)?i.length:0,n=l,s=0;s<r;s++){var a,p=i[s];p&&e&&(0<(a=_o(p,e))&&(o=(n=Math.min(n,a))>=wo?uo:xo-3*vo<=n?co:mo<=n?lo:vo<=n?ho:yo<=n?po:fo<=n?ao:so)),e=p}t.baseUnit=o||ho}(t),e!==Go&&"auto"!==t.baseUnitStep||Yo(t),t}Xo.prototype.displayRange=function(){return{min:this.displayStart,max:this.displayEnd}},Xo.prototype.displayIndices=function(){var t,e,o;return this._indices||(t=(e=this.options).baseUnit,o=e.baseUnitStep,e=Lo(this.displayStart,this.valueStart,t,o),o=Lo(this.displayEnd,this.valueStart,t,o),this._indices={min:e,max:o}),this._indices},Xo.prototype.total=function(){return{min:this.start,max:this.end}},Xo.prototype.totalCount=function(){return this.totalIndex(this.end)+(this.options.justified?1:0)},Xo.prototype.valueRange=function(){return{min:this.valueStart,max:this.valueEnd}},Xo.prototype.valueIndex=function(t){var e=this.options;return Math.floor(Lo(t,this.valueStart,e.baseUnit,e.baseUnitStep))},Xo.prototype.totalIndex=function(t){var e=this.options;return Math.floor(Lo(t,this.start,e.baseUnit,e.baseUnitStep))},Xo.prototype.dateIndex=function(t){var e=this.options;return Lo(t,this.valueStart,e.baseUnit,e.baseUnitStep)},Xo.prototype.valuesCount=function(){return this.valueIndex(this.valueEnd)+1},Xo.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=ko(i,e.baseUnitStep,e.baseUnit,e.weekStartDay)}return t},Xo.prototype.dateAt=function(t,e){var o=this.options;return ko(e?this.start:this.valueStart,o.baseUnitStep*t,o.baseUnit,o.weekStartDay)},Xo.prototype.roundToTotalStep=function(t,e,o){var i=this.options,r=i.baseUnit,n=i.baseUnitStep,s=i.weekStartDay,i=this.start,t=Lo(t,i,r,n),t=e?Math.ceil(t):Math.floor(t);return o&&(t+=o),ko(i,t*n,r,s)};var Qo,ft=((Qo=Uo)&&(Zo.__proto__=Qo),((Zo.prototype=Object.create(Qo&&Qo.prototype)).constructor=Zo).prototype.clone=function(){var t=new Zo(Object.assign({},this.options),this.chartService);return t.createLabels(),t},Zo.prototype.categoriesHash=function(){var t=this.dataRange.total().min;return this.options.baseUnit+this.options.baseUnitStep+t},Zo.prototype.initUserOptions=function(t){return t},Zo.prototype.initFields=function(){Qo.prototype.initFields.call(this);var t=this.chartService,e=t.intl,o=this.options,i=o.categories||[];i._parsed||((i=Do(e,i))._parsed=!0),o=j({roundToBaseUnit:!0},o,{categories:i,min:jo(e,o.min),max:jo(e,o.max),weekStartDay:zo(o,e)}),t.panning&&t.isPannable(o.vertical?m:v)&&(o.roundToBaseUnit=!1),o.userSetBaseUnit=o.userSetBaseUnit||o.baseUnit,o.userSetBaseUnitStep=o.userSetBaseUnitStep||o.baseUnitStep,0<((this.options=o).srcCategories=i).length?(e=No(i),t=o.maxDivisions,this.dataRange=new Xo(e.min,e.max,qo(o)),t?(i=this.dataRange.displayRange(),Yo(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 Xo(e.min,e.max,i)):this.divisionRange=this.dataRange):(o.baseUnit=o.baseUnit||ho,this.dataRange=this.divisionRange=new Wo(o)),this.rangeLabels=[]},Zo.prototype.tickIndices=function(t){var e=this.dataRange,o=this.divisionRange,i=o.valuesCount();if(!this.options.maxDivisions||!i)return Qo.prototype.tickIndices.call(this,t);var r=[],n=o.values(),s=0;this.options.justified||(n=n.concat(o.dateAt(i)),s=.5);for(var a,p=0;p<n.length;p++)r.push(e.dateIndex(n[p])+s),1!==t&&1<=p&&(a=r.length-1,r.splice(p,0,r[a-1]+(r[a]-r[a-1])*t));return r},Zo.prototype.shouldRenderNote=function(t){var e=this.range(),o=this.options.categories||[];return 0<=To(t,e.min)&&To(t,e.max)<=0&&o.length},Zo.prototype.parseNoteValue=function(t){return jo(this.chartService.intl,t)},Zo.prototype.noteSlot=function(t){return this.getSlot(t)},Zo.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=Lt(t/r,f);return n.min&&n.max&&(r=Ao(e.min||n.min,t),t=Ao(e.max||n.max,t),n={min:ko(r,0,o,i),max:ko(t,0,o,i)}),n},Zo.prototype.labelsRange=function(){return{min:this.options.labels.skip,max:this.divisionRange.valuesCount()}},Zo.prototype.pan=function(t){if(this.isEmpty())return null;var e=this.options,o=this.lineBox(),i=e.vertical?o.height():o.width(),r=this.dataRange.displayRange(),n=r.min,o=r.max,r=this.dataRange.total(),i=Lt(t/(i/(o-n)),f)*(e.reverse?-1:1),n=Ao(n,i),o=Ao(o,i),i=this.limitRange(Ro(n),Ro(o),Ro(r.min),Ro(r.max),i);return i?(i.min=Co(i.min),i.max=Co(i.max),i.baseUnit=e.baseUnit,i.baseUnitStep=e.baseUnitStep||1,i.userSetBaseUnit=e.userSetBaseUnit,i.userSetBaseUnitStep=e.userSetBaseUnitStep,i):void 0},Zo.prototype.pointsRange=function(t,e){if(this.isEmpty())return null;var o=Qo.prototype.pointsRange.call(this,t,e),i=this.dataRange.displayRange(),t=this.dataRange.displayIndices(),e=Bo(i.max,i.min)/(t.max-t.min),t=this.options;return{min:Ao(i.min,o.min*e),max:Ao(i.min,o.max*e),baseUnit:t.userSetBaseUnit||t.baseUnit,baseUnitStep:t.userSetBaseUnitStep||t.baseUnitStep}},Zo.prototype.scaleRange=function(t,e){if(this.isEmpty())return{};var o=this.options,i=o.userSetBaseUnit===Go,r=this.dataRange.total(),n=this.dataRange.displayRange(),s=n.min,a=n.max,p=Math.abs(this.pointOffset(e)),n=this.scaleToDelta(t,a-s),e=Math.round(p*n),t=Math.round((1-p)*n),h=this.dataRange.options.baseUnit,p=new Date(s.getTime()+e),n=new Date(a.getTime()-t);if(i){var l,c,u=o.autoBaseUnitSteps,e=o.maxDateGroups,t=Bt(u[h])*e*bo[h],d=Bo(a,s),i=Bo(n,p),g=Fo.indexOf(h);if(i<bo[h]&&h!==no)h=Fo[g-1],p=Ao(s,c=(d-(e-1)*(l=Bt(u[h]))*bo[h])/2),n=Ao(a,-c);else if(t<i&&h!==uo){var f=0;do{for(h=Fo[++g],f=0,c=2*bo[h];l=u[h][f],++f<u[h].length&&c*l<d;);}while(h!==uo&&c*l<d);0<(c=(c*l-d)/2)&&(p=Ao(s,-c),n=Ao(a,c),p=Ao(p,Rt(n,r.min,r.max)-n),n=Ao(n,Rt(p,r.min,r.max)-p))}}return p&&n&&0<Bo(n,p)?{min:p,max:n,baseUnit:o.userSetBaseUnit||o.baseUnit,baseUnitStep:o.userSetBaseUnitStep||o.baseUnitStep}:void 0},Zo.prototype.zoomRange=function(t,e){var o=this.dataRange.total(),e=this.scaleRange(t,e);return e&&(e.min<o.min&&(e.min=o.min),e.max>o.max&&(e.max=o.max)),e},Zo.prototype.range=function(){return this.dataRange.displayRange()},Zo.prototype.createLabels=function(){Qo.prototype.createLabels.call(this),this.createRangeLabels()},Zo.prototype.clearLabels=function(){Qo.prototype.clearLabels.call(this),this.rangeLabels=[]},Zo.prototype.arrangeLabels=function(){this.arrangeRangeLabels(),Qo.prototype.arrangeLabels.call(this)},Zo.prototype.arrangeRangeLabels=function(){var t,e,o,i,r=this.options,n=this.rangeLabels;0!==n.length&&(i=this.lineBox(),t=r.vertical,e=r.rangeLabels.mirror||r.labels.mirror,(o=n[0])&&(r=t?i.y1-o.box.height()/2:i.x1,this.positionLabel(o,e,r)),(n=n[1])&&(i=t?i.y2-n.box.height()/2:i.x2,this.positionLabel(n,e,i)))},Zo.prototype.autoRotateLabels=function(){Qo.prototype.autoRotateLabels.call(this),this.autoRotateRangeLabels()},Zo.prototype.hideOutOfRangeLabels=function(){Qo.prototype.hideOutOfRangeLabels.call(this),this.hideOverlappingLabels()},Zo.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)}},Zo.prototype.contentBox=function(){for(var t=Qo.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},Zo.prototype.createAxisLabel=function(t,e,o){void 0===o&&(o={});var i=this.options,r=i.dataItems&&!i.maxDivisions?i.dataItems[t]:null,n=this.divisionRange.dateAt(t),i=e.dateFormats[this.divisionRange.options.baseUnit];e.format=e.format||i,o.dataItem=r;o=this.axisLabelText(n,e,o);if(o)return new Ke(n,o,t,r,e)},Zo.prototype.createRangeLabels=function(){var i=this,t=this.divisionRange,e=t.displayStart,o=t.displayEnd,t=this.options,r=Object.assign({},t.labels,t.rangeLabels,{align:A,zIndex:t.zIndex});!0===r.visible&&(this.normalizeLabelRotation(r),r.alignRotation=A,"auto"===r.rotation&&(r.rotation=0,t.autoRotateRangeLabels=!0),t=r.dateFormats[this.divisionRange.options.baseUnit],r.format=r.format||t,(t=function(t,e,o){o&&(t=new Ke(e,o,t,null,r),i.append(t),i.rangeLabels.push(t))})(0,e,this.axisLabelText(e,r,{index:0,count:2})),t(1,o,this.axisLabelText(o,r,{index:1,count:2})))},Zo.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){o=2*Math.abs(e[o+1]-e[o]),o=i.autoRotateLabelAngle(t.box,o);0!==o&&(t.options.rotation=o,t.reflow(new re))},e=this.getMajorTickPositions(),t(o[0],e,0),t(o[1],e,e.length-2))},Zo.prototype.categoryIndex=function(t){return this.dataRange.valueIndex(t)},Zo.prototype.slot=function(t,e,o){var i=this.dataRange,t=t,e=e;t instanceof Date&&(t=i.dateIndex(t)),e instanceof Date&&(e=i.dateIndex(e));o=this.getSlot(t,e,o);if(o)return o.toRect()},Zo.prototype.getSlot=function(t,e,o){return"object"==typeof t&&(t=this.categoryIndex(t)),"object"==typeof e&&(e=this.categoryIndex(e)),Qo.prototype.getSlot.call(this,t,e,o)},Zo.prototype.valueRange=function(){var t=No(this.options.srcCategories);return{min:Co(t.min),max:Co(t.max)}},Zo.prototype.categoryAt=function(t,e){return this.dataRange.dateAt(t,e)},Zo.prototype.categoriesCount=function(){return this.dataRange.valuesCount()},Zo.prototype.rangeIndices=function(){return this.dataRange.displayIndices()},Zo.prototype.labelsBetweenTicks=function(){return!this.divisionRange.options.justified},Zo.prototype.prepareUserOptions=function(){this.isEmpty()||(this.options.categories=this.dataRange.values())},Zo.prototype.getCategory=function(t){t=this.pointCategoryIndex(t);return null===t?null:this.dataRange.dateAt(t)},Zo.prototype.totalIndex=function(t){return this.dataRange.totalIndex(t)},Zo.prototype.currentRangeIndices=function(){var t=this.dataRange.valueRange();return{min:this.dataRange.totalIndex(t.min),max:this.dataRange.totalIndex(t.max)}},Zo.prototype.totalRange=function(){return this.dataRange.total()},Zo.prototype.totalCount=function(){return this.dataRange.totalCount()},Zo.prototype.isEmpty=function(){return!this.options.srcCategories.length},Zo.prototype.roundedRange=function(){if(!1!==this.options.roundToBaseUnit||this.isEmpty())return this.range();var t=this.options,e=No(t.srcCategories);return new Xo(e.min,e.max,Object.assign({},t,{justified:!1,roundToBaseUnit:!0,justifyEnd:t.justified})).displayRange()},Zo);function Zo(){Qo.apply(this,arguments)}zt(ft,{type:y,labels:{dateFormats:ct},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 Ko=ft;function $o(t,e){return Lt(Math.floor(t/e)*e,f)}function Jo(t,e){return Lt(Math.ceil(t/e)*e,f)}function ti(t){return Math.max(Math.min(t,3e5),-3e5)}var ei,oi=Math.pow(10,-9),bt=((ei=ro)&&(ii.__proto__=ei),((ii.prototype=Object.create(ei&&ei.prototype)).constructor=ii).prototype.initUserOptions=function(t){var o,e,i,r,n,s,a,n=(a=t.seriesMin,o=t.seriesMax,i=(e=t).narrowRange,r=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),n=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;i=Math.min(0,i-(t-i)/2)}else i=e;return i}(a,o,i),s=$t(r,n),!(a={majorUnit:s})!==e.roundToMajorUnit&&(r<0&&ri(r,s,1/3)&&(r-=s),0<n&&ri(n,s,1/3)&&(n+=s)),a.min=$o(r,s),a.max=Jo(n,s),a);return this.totalOptions=(s=n,{min:Ct((a=t).min)?Math.min(s.min,a.min):s.min,max:Ct(a.max)?Math.max(s.max,a.max):s.max,majorUnit:s.majorUnit}),function(t,e){var o,i,r,n=e;e&&(function(t,e){for(var o=0;o<e.length;o++){var i=e[o];null===t[i]&&(t[i]=void 0)}}(e,["min","max"]),o=Ct(e.min),i=Ct(e.max),(r=o||i)&&e.min===e.max&&(0<e.min?e.min=0:e.max=1),e.majorUnit?(t.min=$o(t.min,e.majorUnit),t.max=Jo(t.max,e.majorUnit)):r&&(n=j(t,e),t.majorUnit=$t(n.min,n.max))),t.minorUnit=(n.majorUnit||t.majorUnit)/5;n=j(t,n);return n.min>=n.max&&(o&&!i?n.max=n.min+n.majorUnit:!o&&i&&(n.min=n.max-n.majorUnit)),n}(n,t)},ii.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},ii.prototype.clone=function(){return new ii(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},ii.prototype.startValue=function(){return 0},ii.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},ii.prototype.getDivisions=function(t){if(0===t)return 1;var e=this.options,e=e.max-e.min;return Math.floor(Lt(e/t,3))+1},ii.prototype.getTickPositions=function(t,e){var o=this.options,i=this.lineInfo(),r=i.axisDir,n=i.axisOrigin,s=i.lineBox,a=t*(i.lineSize/(o.max-o.min)),p=this.getDivisions(t),h=[],l=s[n],c=0;e&&(c=e/t);for(var u=0;u<p;u++)u%c!=0&&h.push(Lt(l,3)),l+=a*r;return h},ii.prototype.getMajorTickPositions=function(){return this.getTickPositions(this.options.majorUnit)},ii.prototype.getMinorTickPositions=function(){return this.getTickPositions(this.options.minorUnit)},ii.prototype.getSlot=function(t,e,o){void 0===o&&(o=!1);var i=this.options,r=this.lineInfo(),n=r.axis,s=r.axisDir,a=r.lineBox,p=r.lineSize,h=r.lineStart,r=s*(p/(i.max-i.min)),p=jt(t,e||0),t=jt(e,t||0);o&&(p=Rt(p,i.min,i.max),t=Rt(t,i.min,i.max));o=Math.min(p,t)-i.min,i=Math.max(p,t)-i.min,a=new re(a.x1,a.y1,a.x1,a.y1);return a[n+1]=ti(h+r*(0<s?o:i)),a[n+2]=ti(h+r*(0<s?i:o)),a},ii.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:Lt(e+t*(o-e),f)},ii.prototype.translateRange=function(t){var e=this.options,o=e.vertical,i=e.reverse,r=e.max,n=e.min,e=this.lineInfo().lineSize,e=Lt(t/(e/(r-n)),f);return{min:n+(e=!(!o&&!i||o&&i)?-e:e),max:r+e,offset:e}},ii.prototype.labelsCount=function(){return this.getDivisions(this.options.majorUnit)},ii.prototype.createAxisLabel=function(t,e,o){var i=this.options,i=Lt(i.min+t*i.majorUnit,f),o=this.axisLabelText(i,e,o);return new Ke(i,o,t,null,e)},ii.prototype.shouldRenderNote=function(t){var e=this.range();return e.min<=t&&t<=e.max},ii.prototype.pan=function(t){t=this.translateRange(t);return this.limitRange(t.min,t.max,this.totalMin,this.totalMax,t.offset)},ii.prototype.pointsRange=function(t,e){var o=this.getValue(t),t=this.getValue(e),e=Math.min(o,t),t=Math.max(o,t);if(this.isValidRange(e,t))return{min:e,max:t}},ii.prototype.scaleRange=function(t,e){var o=Math.abs(this.pointOffset(e)),e=this.options.max-this.options.min,t=this.scaleToDelta(t,e),e=(1-o)*t,t=Lt(this.options.min+o*t,f),e=Lt(this.options.max-e,f);return{min:t,max:e=e-t<oi?t+oi:e}},ii.prototype.zoomRange=function(t,e){var o=this.totalMin,i=this.totalMax,e=this.scaleRange(t,e);return{min:Rt(e.min,o,i),max:Rt(e.max,o,i)}},ii.prototype.isValidRange=function(t,e){return oi<e-t},ii);function ii(t,e,o,i){ei.call(this,Object.assign({},o,{seriesMin:t,seriesMax:e}),i)}function ri(t,e,o){t=Lt(Math.abs(t%e),f);return 0===t||e*(1-o)<t}zt(bt,{type:"numeric",min:0,max:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:r},labels:{format:"#.####################"},zIndex:1});var ni,si=bt,qt=((ni=ro)&&(ai.__proto__=ni),((ai.prototype=Object.create(ni&&ni.prototype)).constructor=ai).prototype.clone=function(){return new ai(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},ai.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},ai.prototype.getDivisions=function(t){var e=this.options;return Math.floor(Vo(e.min,e.max,e.baseUnit)/t+1)},ai.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/Bo(e.max,e.min),p=e.weekStartDay||0,h=[n],l=1;l<s;l++){var c=n+Bo(ko(e.min,l*t,e.baseUnit,p),e.min)*a*i;h.push(Lt(c,3))}return h},ai.prototype.getMajorTickPositions=function(){return this.getTickPositions(this.options.majorUnit)},ai.prototype.getMinorTickPositions=function(){return this.getTickPositions(this.options.minorUnit)},ai.prototype.getSlot=function(t,e,o){return si.prototype.getSlot.call(this,jo(this.intlService,t),jo(this.intlService,e),o)},ai.prototype.getValue=function(t){t=si.prototype.getValue.call(this,t);return null!==t?Co(t):null},ai.prototype.labelsCount=function(){return this.getDivisions(this.options.majorUnit)},ai.prototype.createAxisLabel=function(t,e,o){var i=this.options,r=t*i.majorUnit,n=i.weekStartDay||0,s=i.min;0<r&&(s=ko(s,r,i.baseUnit,n));i=e.dateFormats[i.baseUnit];e.format=e.format||i;o=this.axisLabelText(s,e,o);return new Ke(s,o,t,null,e)},ai.prototype.translateRange=function(t){var e=this.options,o=this.lineBox(),i=e.vertical,r=e.reverse,n=i?o.height():o.width(),o=this.range(),o=n/Bo(o.max,o.min),o=Lt(t/o,f);return{min:Ao(e.min,o=!(!i&&!r||i&&r)?-o:o),max:Ao(e.max,o),offset:o}},ai.prototype.shouldRenderNote=function(t){var e=this.range();return 0<=To(t,e.min)&&To(t,e.max)<=0},ai.prototype.pan=function(t){t=this.translateRange(t,!0),t=this.limitRange(Ro(t.min),Ro(t.max),this.totalMin,this.totalMax,t.offset);if(t)return{min:Co(t.min),max:Co(t.max)}},ai.prototype.pointsRange=function(t,e){var o=this.getValue(t),t=this.getValue(e),e=Math.min(o,t),t=Math.max(o,t);return{min:Co(e),max:Co(t)}},ai.prototype.scaleRange=function(t,e){var o=Math.abs(this.pointOffset(e)),e=this.options.max-this.options.min,t=this.scaleToDelta(t,e),e=o*t,t=(1-o)*t,e=Co(Ro(this.options.min)+e),t=Co(Ro(this.options.max)-t);return{min:e,max:t=t-e<1e3?Co(Ro(e)+1e3):t}},ai.prototype.zoomRange=function(t,e){e=this.scaleRange(t,e);return{min:Co(Rt(Ro(e.min),this.totalMin,this.totalMax)),max:Co(Rt(Ro(e.max),this.totalMin,this.totalMax))}},ai);function ai(t,e,o,i){var r,n,s,a,p,h=Co(t),l=Co(e),c=i.intl,u=o||{};r=h,n=l,s=u=j(u||{},{min:jo(c,u.min),max:jo(c,u.max),axisCrossingValue:Do(c,u.axisCrossingValues||u.axisCrossingValue),weekStartDay:zo(u,c)}),t=s.min||r,e=s.max||n,o=s.baseUnit||(e&&t?(a=_o(e,t),p=po,wo<=a?p=uo:xo<=a?p=co:mo<=a?p=lo:vo<=a&&(p=ho),p):po),r=bo[o],n=s.weekStartDay||0,a=Po(Ro(t)-1,o,n)||Co(e),p=Mo(Ro(e)+1,o,n),t=s.majorUnit||Jo($t(a.getTime(),p.getTime()),r)/r,e=Vo(a,p,o),r=Jo(e,t)-e,e=Math.floor(r/2),r-=e,s.baseUnit||delete s.baseUnit,s.baseUnit=s.baseUnit||o,s.min=s.min||ko(a,-e,o,n),s.max=s.max||ko(p,r,o,n),s.minorUnit=s.minorUnit||t/5,s.majorUnit=t,ni.call(this,u=s,i),this.intlService=c,this.seriesMin=h,this.seriesMax=l;c=u.weekStartDay||0;this.totalMin=Ro(Po(Ro(h)-1,u.baseUnit,c)),this.totalMax=Ro(Mo(Ro(l)+1,u.baseUnit,c))}zt(qt,{type:y,majorGridLines:{visible:!0,width:1,color:r},labels:{dateFormats:ct}});var pi,hi=qt,Zt=((pi=ro)&&(li.__proto__=pi),((li.prototype=Object.create(pi&&pi.prototype)).constructor=li).prototype.clone=function(){return new li(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},li.prototype.startValue=function(){return this.options.min},li.prototype.getSlot=function(t,e,o){var i=this.options,r=this.logMin,n=this.logMax,s=i.majorUnit,a=i.min,p=i.max,h=this.lineInfo(),l=h.axis,c=h.axisDir,u=h.lineBox,i=h.lineSize,h=h.lineStart,i=c*(i/(n-r)),n=jt(t,e||1),t=jt(e,t||1);if(n<=0||t<=0)return null;o&&(n=Rt(n,a,p),t=Rt(t,a,p));n=ui(n,s),t=ui(t,s),s=Math.min(n,t)-r,r=Math.max(n,t)-r,u=new re(u.x1,u.y1,u.x1,u.y1);return u[l+1]=ti(h+i*(0<c?s:r)),u[l+2]=ti(h+i*(0<c?r:s)),u},li.prototype.getValue=function(t){var e=this.options,o=this.logMin,i=this.logMax,r=e.majorUnit,n=this.lineInfo(),s=n.axis,a=n.axisDir,e=n.lineStart,n=n.lineSize,e=a*(t[s]-e);return e<0||n<e?null:Lt(Math.pow(r,o+e*((i-o)/n)),f)},li.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},li.prototype.translateRange=function(t){var e=this.options,o=this.logMin,i=this.logMax,r=e.reverse,n=e.vertical,s=e.majorUnit,e=this.lineBox(),e=n?e.height():e.width(),e=Lt(t/(e/(i-o)),f);return!n&&!r||n&&r||(e=-e),{min:Math.pow(s,o+e),max:Math.pow(s,i+e),offset:e}},li.prototype.labelsCount=function(){var t=Math.floor(this.logMax);return Math.floor(t-this.logMin)+1},li.prototype.getMajorTickPositions=function(){var e=[];return this.traverseMajorTicksPositions(function(t){e.push(t)},{step:1,skip:0}),e},li.prototype.createTicks=function(o){var t=this.options,e=t.majorTicks,i=t.minorTicks,r=t.vertical,n=t.labels.mirror,s=this.lineBox(),a={vertical:r};function p(t,e){a.tickX=n?s.x2:s.x2-e.size,a.tickY=n?s.y1-e.size:s.y1,a.position=t,o.append(to(a,e))}return e.visible&&this.traverseMajorTicksPositions(p,e),i.visible&&this.traverseMinorTicksPositions(p,i),[]},li.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){dt(t,n)||(r.position=t,s.append(eo(r,e)),n.push(t))}return i.visible&&this.traverseMajorTicksPositions(a,i),o.visible&&this.traverseMinorTicksPositions(a,o),s.children},li.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(Lt(i+r*(a-n),f),e)},li.prototype.traverseMinorTicksPositions=function(t,e){for(var o=this.options,i=o.min,r=o.max,n=o.minorUnit,s=o.majorUnit,o=this.lineInfo(),a=o.lineStart,p=o.step,h=this.logMin,l=this.logMax,c=Math.floor(h);c<l;c++)for(var u=this._minorIntervalOptions(c),d=e.skip;d<n;d+=e.step){var g=u.value+d*u.minorStep;if(r<g)break;i<=g&&t(Lt(a+p*(ui(g,s)-h),f),e)}},li.prototype.createAxisLabel=function(t,e,o){var i=Math.ceil(this.logMin+t),i=Math.pow(this.options.majorUnit,i),o=this.axisLabelText(i,e,o);return new Ke(i,o,t,null,e)},li.prototype.shouldRenderNote=function(t){var e=this.range();return e.min<=t&&t<=e.max},li.prototype.pan=function(t){t=this.translateRange(t);return this.limitRange(t.min,t.max,this.totalMin,this.totalMax,t.offset)},li.prototype.pointsRange=function(t,e){t=this.getValue(t),e=this.getValue(e);return{min:Math.min(t,e),max:Math.max(t,e)}},li.prototype.scaleRange=function(t,e){var o=this.options.majorUnit,i=ui(this.options.min,o),r=ui(this.options.max,o),e=Math.abs(this.pointOffset(e)),t=this.scaleToDelta(t,r-i),i=Math.pow(o,i+e*t),t=Math.pow(o,r-(1-e)*t);return{min:i,max:t=t-i<1e-6?i+1e-6:t}},li.prototype.zoomRange=function(t,e){var o=this.scaleRange(t,e),t=this.totalMin,e=this.totalMax;return{min:Rt(o.min,t,e),max:Rt(o.max,t,e)}},li.prototype._minorIntervalOptions=function(t){var e=this.options,o=e.minorUnit,i=e.majorUnit,e=Math.pow(i,t);return{value:e,minorStep:(Math.pow(i,t+1)-e)/o}},li.prototype.lineInfo=function(){var t=pi.prototype.lineInfo.call(this);return t.step=t.axisDir*(t.lineSize/(this.logMax-this.logMin)),t},li);function li(t,e,o,i){var r,n,s,a,p,h,l,c=j({majorUnit:10,min:t,max:e},o),u=c.majorUnit,d=(l=Lt(ui(p=e,h=u),f)%1,p<=0?h:0!=l&&(l<.3||.9<l)?Math.pow(h,ui(p,h)+.2):Math.pow(h,Math.ceil(ui(p,h)))),l=(r=t,s=(n=c).majorUnit,(a=r)<=0?a=e<=1?Math.pow(s,-2):1:n.narrowRange||(a=Math.pow(s,Math.floor(ui(r,s)))),a),a=(p=l,h=d,n=o,s=(r=c).min,a=r.max,Ct(r.axisCrossingValue)&&r.axisCrossingValue<=0&&ci(),Ct(n.max)?n.max<=0&&ci():a=h,Ct(n.min)?n.min<=0&&ci():s=p,{min:s,max:a});c.max=a.max,c.min=a.min,c.minorUnit=o.minorUnit||Lt(u-1,f),pi.call(this,c,i),this.totalMin=Ct(o.min)?Math.min(l,o.min):l,this.totalMax=Ct(o.max)?Math.max(d,o.max):d,this.logMin=Lt(ui(a.min,u),f),this.logMax=Lt(ui(a.max,u),f),this.seriesMin=t,this.seriesMax=e,this.createLabels()}function ci(){throw new Error("Non positive values cannot be used for a logarithmic axis")}function ui(t,e){return Math.log(t)/Math.log(e)}zt(Zt,{type:"log",majorUnit:10,minorUnit:1,axisCrossingValue:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:r},zIndex:1,_deferLabels:!0});var di,gi=Zt,ue={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),_t(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){r=this.radiusCallback&&this.radiusCallback(e,i,r);return this.renderGridLines(t,e,o,r)},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 P.geometry.Circle([o.x,o.y],e),s=this.gridLinesVisual(),a=0;a<t.length;a++){var p=new P.drawing.Path(r);i&&(n.radius=i(t[a])),p.moveTo(n.center).lineTo(n.pointAt(t[a]+180)),s.append(p)}return s.children},gridLineAngles:function(t,e,o,i,r){var n=this,r=this.intervals(e,o,i,r),t=t.options,s=t.visible&&!1!==(t.line||{}).visible;return vt(r,function(t){t=n.intervalAngle(t);if(!s||90!==t)return t})}},me=((di=Uo)&&(fi.__proto__=di),((fi.prototype=Object.create(di&&di.prototype)).constructor=fi).prototype.range=function(){return{min:0,max:this.options.categories.length}},fi.prototype.reflow=function(t){this.box=t,this.reflowLabels()},fi.prototype.lineBox=function(){return this.box},fi.prototype.reflowLabels=function(){for(var t=this.labels,e=this.options.labels,o=e.skip||0,i=e.step||1,r=new re,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()))}},fi.prototype.intervals=function(t,e,o,i){void 0===i&&(i=!1);for(var r,n=this.options,s=n.categories.length/t||1,a=360/s,p=o||1,h=[],l=e||0;l<s;l+=p)r=n.reverse?360-l*a:l*a,r=Lt(r,3)%360,i&&dt(r,i)||h.push(r);return h},fi.prototype.majorIntervals=function(){return this.intervals(1)},fi.prototype.minorIntervals=function(){return this.intervals(.5)},fi.prototype.intervalAngle=function(t){return(360+t+this.options.startAngle)%360},fi.prototype.majorAngles=function(){var e=this;return vt(this.majorIntervals(),function(t){return e.intervalAngle(t)})},fi.prototype.createLine=function(){return[]},fi.prototype.majorGridLineAngles=function(t){var e=this.options.majorGridLines;return this.gridLineAngles(t,1,e.skip,e.step)},fi.prototype.minorGridLineAngles=function(t,e){var o=this.options,i=o.minorGridLines,o=o.majorGridLines,o=e?this.intervals(1,o.skip,o.step):null;return this.gridLineAngles(t,.5,i.skip,i.step,o)},fi.prototype.radiusCallback=function(e,t,o){if(t.options.type!==d){var t=It(360/(2*this.options.categories.length)),i=Math.cos(t)*e,r=this.majorAngles();return function(t){return!o&&dt(t,r)?e:i}}},fi.prototype.createPlotBands=function(){for(var t=this.options.plotBands||[],e=this._plotbandGroup=new P.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);r.startAngle+=s*n.angle;var a=Math.ceil(i.to)-i.to;r.angle-=(a+s)*n.angle;i=ve.current.createRing(r,{fill:{color:i.color,opacity:i.opacity},stroke:{opacity:i.opacity}});e.append(i)}this.appendVisual(e)},fi.prototype.plotBandSlot=function(t){return this.getSlot(t.from,t.to-1)},fi.prototype.getSlot=function(t,e){var o=this.options,i=o.justified,r=this.box,n=this.majorAngles(),s=n.length,a=360/s,t=t;o.reverse&&!i&&(t=(t+1)%s);n=n[t=Rt(Math.floor(t),0,s-1)];i&&(n-=a/2)<0&&(n+=360);t=a*(Rt(Math.ceil(e||t),t,s-1)-t+1);return new le(r.center(),0,r.height()/2,n,t)},fi.prototype.slot=function(t,e){var o=this.getSlot(t,e),t=o.startAngle+180,e=t+o.angle;return new P.geometry.Arc([o.center.x,o.center.y],{startAngle:t,endAngle:e,radiusX:o.radius,radiusY:o.radius})},fi.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},fi);function fi(){di.apply(this,arguments)}zt(me,{startAngle:90,labels:{margin:U(10)},majorGridLines:{visible:!0},justified:!0}),j(me.prototype,ue);var yi,vi=me,_e=((yi=ro)&&(mi.__proto__=yi),((mi.prototype=Object.create(yi&&yi.prototype)).constructor=mi).prototype.getDivisions=function(t){return si.prototype.getDivisions.call(this,t)-1},mi.prototype.reflow=function(t){this.box=t,this.reflowLabels()},mi.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 re,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()))}},mi.prototype.lineBox=function(){return this.box},mi.prototype.intervals=function(t,e,o,i){void 0===i&&(i=!1);for(var r=this.options.min,n=this.getDivisions(t),s=[],a=o||1,p=e||0;p<n;p+=a){var h=(360+r+p*t)%360;i&&dt(h,i)||s.push(h)}return s},mi.prototype.majorIntervals=function(){return this.intervals(this.options.majorUnit)},mi.prototype.minorIntervals=function(){return this.intervals(this.options.minorUnit)},mi.prototype.intervalAngle=function(t){return(540-t-this.options.startAngle)%360},mi.prototype.createLine=function(){return[]},mi.prototype.majorGridLineAngles=function(t){var e=this.options.majorGridLines;return this.gridLineAngles(t,this.options.majorUnit,e.skip,e.step)},mi.prototype.minorGridLineAngles=function(t,e){var o=this.options,i=o.minorGridLines,r=o.majorGridLines,r=e?this.intervals(o.majorUnit,r.skip,r.step):null;return this.gridLineAngles(t,o.minorUnit,i.skip,i.step,r)},mi.prototype.plotBandSlot=function(t){return this.getSlot(t.from,t.to)},mi.prototype.getSlot=function(t,e){var o=this.options,i=this.box,r=o.startAngle,t=Rt(t,o.min,o.max),e=Rt(e||t,t,o.max);return o.reverse&&(t*=-1,e*=-1),(e=(540-e-r)%360)<(t=(540-t-r)%360)&&(r=t,t=e,e=r),new le(i.center(),0,i.height()/2,t,e-t)},mi.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),e=Math.max(t,e),n=o.reverse?(s=n,e):(s=360-e,360-n),s=(s+i)%360;return new P.geometry.Arc([r.center.x,r.center.y],{startAngle:s,endAngle:n=(n+i)%360,radiusX:r.radius,radiusY:r.radius})},mi.prototype.getValue=function(t){var e=this.options,o=this.box.center(),i=t.x-o.x,o=t.y-o.y,o=Math.round(St(Math.atan2(o,i))),i=e.startAngle;return e.reverse||(o*=-1,i*=-1),(o+i+360)%360},mi.prototype.valueRange=function(){return{min:0,max:2*Math.PI}},mi);function mi(t,e){yi.call(this,t,e);e=this.options;e.minorUnit=e.minorUnit||e.majorUnit/2}zt(_e,{type:"polar",startAngle:0,reverse:!1,majorUnit:60,min:0,max:360,labels:{margin:U(10)},majorGridLines:{color:r,visible:!0,width:1},minorGridLines:{color:"#aaa"}}),j(_e.prototype,ue,{createPlotBands:vi.prototype.createPlotBands,majorAngles:vi.prototype.majorAngles,range:si.prototype.range,labelsCount:si.prototype.labelsCount,createAxisLabel:si.prototype.createAxisLabel});var xi=_e;function wi(t,e){return 180-Math.abs(Math.abs(t-e)-180)}var bi,ke={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 P.drawing.Group({zIndex:-1}),s=0;s<o.length;s++){var a=o[s],p={fill:{color:a.color,opacity:a.opacity},stroke:{opacity:a.opacity}},h=this.getSlot(a.from,a.to,!0),a=new le(r,r.y-h.y2,r.y-h.y1,0,360),h=e===d?ve.current.createRing(a,p):P.drawing.Path.fromPoints(this.plotBandPoints(a,i),p).close();n.append(h)}this.appendVisual(n)},plotBandPoints:function(t,e){for(var o=[],i=[],r=[t.center.x,t.center.y],n=new P.geometry.Circle(r,t.innerRadius),s=new P.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(),r=t.box.center(),t=[];return e.majorGridLines.visible&&(t=this.renderGridLines(r,o,i,e.majorGridLines)),e.minorGridLines.visible&&(o=this.radarMinorGridLinePositions(),_t(t,this.renderGridLines(r,o,i,e.minorGridLines))),t},renderGridLines:function(t,e,o,i){var r={stroke:{width:i.width,color:i.color,dashType:i.dashType}},n=i.skip;void 0===n&&(n=0);var s=i.step;void 0===s&&(s=0);for(var a=this.gridLinesVisual(),p=n;p<e.length;p+=s){var h=t.y-e[p];if(0<h){var l=new P.geometry.Circle([t.x,t.y],h);if(i.type===d)a.append(new P.drawing.Circle(l,r));else{for(var c=new P.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 o,e=this.lineBox(),i=this.plotArea.polarAxis,r=i.majorAngles(),n=i.box.center(),s=t.distanceTo(n),a=s;return this.options.majorGridLines.type!==d&&1<r.length&&(i=t.x-n.x,n=t.y-n.y,o=(St(Math.atan2(n,i))+540)%360,r.sort(function(t,e){return wi(t,o)-wi(e,o)}),i=90-wi(r[0],r[1])/2,r=180-wi(o,r[0])-i,a=s*(Math.sin(It(r))/Math.sin(It(i)))),this.axisType().prototype.getValue.call(this,new te(e.x1,e.y2-a))}},N=((bi=si)&&(_i.__proto__=bi),((_i.prototype=Object.create(bi&&bi.prototype)).constructor=_i).prototype.radarMajorGridLinePositions=function(){return this.getTickPositions(this.options.majorUnit)},_i.prototype.radarMinorGridLinePositions=function(){var t=this.options,e=0;return t.majorGridLines.visible&&(e=t.majorUnit),this.getTickPositions(t.minorUnit,e)},_i.prototype.axisType=function(){return bi},_i);function _i(){bi.apply(this,arguments)}j(N.prototype,ke);var Ai,Ci=N,G=((Ai=gi)&&(Si.__proto__=Ai),((Si.prototype=Object.create(Ai&&Ai.prototype)).constructor=Si).prototype.radarMajorGridLinePositions=function(){var e=[];return this.traverseMajorTicksPositions(function(t){e.push(t)},this.options.majorGridLines),e},Si.prototype.radarMinorGridLinePositions=function(){var e=[];return this.traverseMinorTicksPositions(function(t){e.push(t)},this.options.minorGridLines),e},Si.prototype.axisType=function(){return Ai},Si);function Si(){Ai.apply(this,arguments)}j(G.prototype,ke);var ki=G;function Pi(t){return t<=0?-1:1}var Mi,Ti,Bi=((Ti=P.Class)&&(Ii.__proto__=Ti),((Ii.prototype=Object.create(Ti&&Ti.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],p=e[2];for(o.push(new P.geometry.Segment(s));s.equals(e[r-1]);)i=!0,e.pop(),r--;if(2===r){t=this.tangent(s,a,v,m);return Bt(o).controlOut(this.firstControlPoint(t,s,a,v,m)),o.push(new P.geometry.Segment(a,this.secondControlPoint(t,s,a,v,m))),o}i?(s=e[r-1],a=e[0],p=e[1],l=(n=this.controlPoints(s,a,p))[1],c=n[0]):(n=this.tangent(s,a,v,m),l=this.firstControlPoint(n,s,a,v,m));for(var h,l,c,u=l,d=0;d<=r-3;d++)this.removeDuplicates(d,e),d+3<=(r=e.length)&&(s=e[d],a=e[d+1],p=e[d+2],h=this.controlPoints(s,a,p),Bt(o).controlOut(u),u=h[1],h=h[0],o.push(new P.geometry.Segment(a,h)));return i?(s=e[r-2],a=e[r-1],p=e[0],l=this.controlPoints(s,a,p),Bt(o).controlOut(u),o.push(new P.geometry.Segment(a,l[0])),Bt(o).controlOut(l[1]),o.push(new P.geometry.Segment(p,c))):(c=this.tangent(a,p,v,m),Bt(o).controlOut(u),o.push(new P.geometry.Segment(p,this.secondControlPoint(c,a,p,v,m)))),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||Lt(i,1)===Lt(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=v,n=m,s=!1,a=!1;this.isLine(t,e,o)?i=this.tangent(t,e,v,m):(p={x:this.isMonotonicByField(t,e,o,v),y:this.isMonotonicByField(t,e,o,m)}).x&&p.y?(i=this.tangent(t,o,v,m),s=!0):(this.invertAxis(t,e,o)&&(r=m,n=v),p[r]?i=0:(i=.01*(o[n]<t[n]&&t[n]<=e[n]||t[n]<o[n]&&e[n]<=t[n]?Pi((o[n]-t[n])*(e[r]-t[r])):-Pi((o[r]-t[r])*(e[n]-t[n]))),a=!0));var p=this.secondControlPoint(i,t,e,r,n);a&&(a=r,r=n,n=a);n=this.firstControlPoint(i,e,o,r,n);return s&&(this.restrictControlPoint(t,e,p,i),this.restrictControlPoint(e,o,n,i)),[p,n]},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],i=e[i]-t[i];return 0==o?0:i/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 n=e[i],e=o[i],n=.333*(e-n);return this.point(e-n,o[r]-n*t,i,r)},Ii.prototype.point=function(t,e,o,i){var r=new P.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},Ii),Ri=((Mi=P.Class)&&(Oi.__proto__=Mi),((Oi.prototype=Object.create(Mi&&Mi.prototype)).constructor=Oi).prototype.value=function(t){var e=this._axis;return e.getCategory?e.getCategory(t):e.getValue(t)},Oi.prototype.slot=function(t,e,o){return this._axis.slot(t,e,o=void 0===o?!0:o)},Oi.prototype.range=function(){return this._axis.range()},Oi.prototype.valueRange=function(){return this._axis.valueRange()},Oi);function Oi(t){Mi.call(this),this._axis=t,this.options=t.options}function Ii(t){Ti.call(this),this.closed=t}function Li(t,e){for(var o=0;o<e.length;o++)if(e[o].options.name===t)return e[o].prepareUserOptions(),new Ri(e[o])}q=function(t){this.visual=t.visual,this.chartsVisual=t.chartContainer.visual,this._pane=t};q.prototype.findAxisByName=function(t){return Li(t,this._pane.axes)};var Vi,ji=q,Di=((Vi=P.Class)&&(zi.__proto__=Vi),(zi.prototype=Object.create(Vi&&Vi.prototype)).constructor=zi);function zi(t){Vi.call(this),this._plotArea=t,this.visual=t.visual,this.backgroundVisual=t._bgVisual}function Ei(t){for(var e=t.length,o=0,i=0;i<e;i++)B(t[i])&&o++;return o}var Hi={min:function(t){for(var e=t.length,o=l,i=0;i<e;i++){var r=t[i];B(r)&&(o=Math.min(o,r))}return o===l?t[0]:o},max:function(t){for(var e=t.length,o=c,i=0;i<e;i++){var r=t[i];B(r)&&(o=Math.max(o,r))}return o===c?t[0]:o},sum:function(t){for(var e=t.length,o=0,i=0;i<e;i++){var r=t[i];B(r)&&(o+=r)}return o},sumOrNull:function(t){var e=null;return e=Ei(t)?Hi.sum(t):e},count:function(t){for(var e=t.length,o=0,i=0;i<e;i++){var r=t[i];null!==r&&Ct(r)&&o++}return o},avg:function(t){var e=Ei(t),o=t[0];return o=0<e?Hi.sum(t)/e:o},first:function(t){for(var e=t.length,o=0;o<e;o++){var i=t[o];if(null!==i&&Ct(i))return i}return t[0]}},Ui=Hi;function Fi(t,e){return null===e?e:pt(t)(e)}var Gi,Y=((Gi=P.Class)&&(Ni.__proto__=Gi),((Ni.prototype=Object.create(Gi&&Gi.prototype)).constructor=Ni).prototype.register=function(t,e,o){void 0===e&&(e=[h]),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)}},Ni.prototype.canonicalFields=function(t){return this.valueFields(t).concat(this.otherFields(t))},Ni.prototype.valueFields=function(t){return this._valueFields[t.type]||[h]},Ni.prototype.otherFields=function(t){return this._otherFields[t.type]||[h]},Ni.prototype.bindPoint=function(t,e,o){var i,r,n,s=t.data,a=Ct(o)?o:s[e],p={valueFields:{value:a}},o=this.valueFields(t),s=this._otherFields[t.type];return null===a?i=this._nullValue[t.type]:Ct(a)?Array.isArray(a)?(n=a.slice(o.length),i=this._bindFromArray(a,o),r=this._bindFromArray(n,s)):"object"==typeof a&&(e=this.sourceFields(t,o),n=this.sourceFields(t,s),i=this._bindFromObject(a,o,e),r=this._bindFromObject(a,s,n)):i=this._undefinedValue[t.type],Ct(i)&&(1===o.length?p.valueFields.value=i[o[0]]:p.valueFields=i),p.fields=r||{},p},Ni.prototype._makeValue=function(t,e){for(var o={},i=t.length,r=0;r<i;r++)o[t[r]]=e;return o},Ni.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},Ni.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]=Fi(a,t))}return i},Ni.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===h?"field":n+"Field";o.push(null!==t[s]?t[s]||n:null)}return o},Ni);function Ni(){Gi.call(this),this._valueFields={},this._otherFields={},this._nullValue={},this._undefinedValue={}}Y.current=new Y;var Wi,Xi,Yi=Y,qi=/percent(?:\w*)\((\d+)\)/,Qi=new RegExp("^stddev(?:\\((\\d+(?:\\.\\d+)?)\\))?$"),Zi=((Xi=P.Class)&&(ur.__proto__=Xi),((ur.prototype=Object.create(Xi&&Xi.prototype)).constructor=ur).prototype.initGlobalRanges=function(t,e,o){var i,r,n,s,a=e.data,p=Qi.exec(t);p?(this.valueGetter=this.createValueGetter(e,o),i=this.getAverage(a),r=this.getStandardDeviation(a,i,!1),p=p[1]?parseFloat(p[1]):1,n={low:i.value-r*p,high:i.value+r*p},this.globalRange=function(){return n}):t.indexOf&&0<=t.indexOf("stderr")&&(this.valueGetter=this.createValueGetter(e,o),s=this.getStandardError(a,this.getAverage(a)),this.globalRange=function(t){return{low:t-s,high:t+s}})},ur.prototype.createValueGetter=function(t,e){var o,i=t.data,r=Yi.current,n=r.valueFields(t),i=Ct(i[0])?i[0]:{};return x(i)?o=pt("["+(e?n.indexOf(e):0)+"]"):B(i)?o=pt():"object"==typeof i&&(o=pt(r.sourceFields(t,n)[n.indexOf(e)])),o},ur.prototype.getErrorRange=function(t,e){if(!Ct(e))return null;if(this.globalRange)return this.globalRange(t);if(x(e))i=t-e[0],r=t+e[1];else if(B(o=parseFloat(e)))i=t-o,r=t+o;else{if(!(o=qi.exec(e)))throw new Error("Invalid ErrorBar value: "+e);var o=t*(parseFloat(o[1])/100),i=t-Math.abs(o),r=t+Math.abs(o)}return{low:i,high:r}},ur.prototype.getStandardError=function(t,e){return this.getStandardDeviation(t,e,!0)/Math.sqrt(e.count)},ur.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]);B(s)&&(r+=Math.pow(s-e.value,2))}return Math.sqrt(r/o)},ur.prototype.getAverage=function(t){for(var e=t.length,o=0,i=0,r=0;r<e;r++){var n=this.valueGetter(t[r]);B(n)&&(o+=n,i++)}return{value:o/i,count:i}},ur),Ki=(P.support.browser||{}).msie?.001:0,$i="zero",Ji="interpolate",tr="bar",er="column",or="line",ir="pie",rr="verticalLine",nr=[tr,er,"ohlc","candlestick","boxPlot","verticalBoxPlot","bullet","rangeColumn","rangeBar","waterfall","horizontalWaterfall"],sr="drag",ar="dragEnd",pr="zoom",hr="zoomEnd",lr="DOMMouseScroll mousewheel",K=((Wi=be)&&(cr.__proto__=Wi),((cr.prototype=Object.create(Wi&&Wi.prototype)).constructor=cr).prototype.reflow=function(t){var e,o=this.options.endCaps,i=this.isVertical,r=this.getAxis().getSlot(this.low,this.high),n=t.center(),s=this.getCapsWidth(t,i),a=i?n.x:n.y,t=a-s,s=a+s;i?(e=[new te(n.x,r.y1),new te(n.x,r.y2)],o&&e.push(new te(t,r.y1),new te(s,r.y1),new te(t,r.y2),new te(s,r.y2)),this.box=new re(t,r.y1,s,r.y2)):(e=[new te(r.x1,n.y),new te(r.x2,n.y)],o&&e.push(new te(r.x1,t),new te(r.x1,s),new te(r.x2,t),new te(r.x2,s)),this.box=new re(r.x1,t,r.x2,s)),this.linePoints=e},cr.prototype.getCapsWidth=function(t,e){t=e?t.width():t.height();return Math.min(Math.floor(t/2),4)||4},cr.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()},cr.prototype.createDefaultVisual=function(){var t=this.options,e=this.linePoints,o={stroke:{color:t.color,width:t.line.width,dashType:t.line.dashType}};Wi.prototype.createVisual.call(this);for(var i=0;i<e.length;i+=2){var r=new P.drawing.Path(o).moveTo(e[i].x,e[i].y).lineTo(e[i+1].x,e[i+1].y);M(r),this.visual.append(r)}},cr);function cr(t,e,o,i,r,n){Wi.call(this,n),this.low=t,this.high=e,this.isVertical=o,this.chart=i,this.series=r}function ur(t,e,o){Xi.call(this),this.initGlobalRanges(t,e,o)}zt(K,{animation:{type:"fadeIn",delay:600},endCaps:!0,line:{width:2},zIndex:1});var dr,gr=K,fr=((dr=gr)&&(yr.__proto__=dr),((yr.prototype=Object.create(dr&&dr.prototype)).constructor=yr).prototype.getAxis=function(){return this.chart.seriesValueAxis(this.series)},yr);function yr(){dr.apply(this,arguments)}function vr(t,e,o,i){void 0===i&&(i=!1);var r,n,s=(o=void 0===o?{}:o).defaults=o.defaults||{},a=o.depth=o.depth||0,p=!1;if(o.excluded=o.excluded||[],5<a)return null;for(r in t)!dt(r,o.excluded)&&t.hasOwnProperty(r)&&(I(n=t[r])?(p=!0,i||(t[r]=jt(n(e),s[r]))):D(n)&&(i||(o.defaults=s[r]),o.depth++,p=vr(n,e,o,i)||p,o.depth--));return p}function mr(t){for(var e=t.length,o=0,i=0;i<e;i++)o=Math.max(o,t[i].data.length);return o}var xr,Z=((xr=be)&&(wr.__proto__=xr),((wr.prototype=Object.create(xr&&xr.prototype)).constructor=wr).prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},wr.prototype.pointOptions=function(t,e){var o,i=this.seriesOptions[e];return i||(o=this.pointType().prototype.defaults,this.seriesOptions[e]=i=j({},o,{vertical:!this.options.invertAxes},t)),i},wr.prototype.plotValue=function(t){if(!t)return 0;if(this.options.isStacked100&&B(t.value)){for(var e=t.categoryIx,o=this.categoryPoints[e],i=[],r=0,n=0;n<o.length;n++){var s,a,p=o[n];p&&(s=t.series.stack,a=p.series.stack,s&&a&&s.group!==a.group||B(p.value)&&(r+=Math.abs(p.value),i.push(Math.abs(p.value))))}if(0<r)return t.value/r}return t.value},wr.prototype.plotRange=function(t,e){void 0===e&&(e=0);var o=this.categoryPoints[t.categoryIx];if(this.options.isStacked){for(var i=this.plotValue(t),r=0<=i,n=e,s=!1,a=0;a<o.length;a++){var p=o[a];if(t===p)break;var h=t.series.stack,l=p.series.stack;if(h&&l){if(typeof h===g&&h!==l)continue;if(h.group&&h.group!==l.group)continue}p=this.plotValue(p);(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,O(t.value)?t.value:e]},wr.prototype.stackLimits=function(t,e){for(var o=l,i=c,r=0;r<this.categoryPoints.length;r++){var n=this.categoryPoints[r];if(n)for(var s=0;s<n.length;s++){var a=n[s];!a||a.series.stack!==e&&a.series.axis!==t||(a=this.plotRange(a,0)[1],Ct(a)&&isFinite(a)&&(i=Math.max(i,a),o=Math.min(o,a)))}}return{min:o,max:i}},wr.prototype.updateStackRange=function(){var t=this.options,e=t.isStacked,o=t.series,i={};if(e)for(var r=0;r<o.length;r++){var n=o[r],s=n.axis,a=s+n.stack,p=i[a];p||(p=this.stackLimits(s,n.stack),(n=this.errorTotals)&&(n.negative.length&&(p.min=Math.min(p.min,Et(n.negative).min)),n.positive.length&&(p.max=Math.max(p.max,Et(n.positive).max))),p.min!==l||p.max!==c?i[a]=p:p=null),p&&(this.valueAxisRanges[s]=p)}},wr.prototype.addErrorBar=function(t,e,o){var i,r=t.value,n=t.series,s=t.seriesIx,a=t.options.errorBars,p=e.fields.errorLow,e=e.fields.errorHigh;B(p)&&B(e)?i={low:p,high:e}:a&&Ct(a.value)&&(this.seriesErrorRanges=this.seriesErrorRanges||[],this.seriesErrorRanges[s]=this.seriesErrorRanges[s]||new Zi(a.value,n,h),i=this.seriesErrorRanges[s].getErrorRange(r,a.value)),i&&(t.low=i.low,t.high=i.high,this.addPointErrorBar(t,o))},wr.prototype.addPointErrorBar=function(t,e){var o,i=!this.options.invertAxes,r=t.options.errorBars,n=t.series,s=t.low,a=t.high;this.options.isStacked?(s=(o=this.stackedErrorRange(t,e)).low,a=o.high):(this.updateRange({value:s},e={categoryIx:e,series:n}),this.updateRange({value:a},e));r=new fr(s,a,i,this,n,r);t.errorBars=[r],t.append(r)},wr.prototype.stackedErrorRange=function(t,e){var o=this.plotRange(t,0)[1]-t.value,i=t.low+o,o=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<o&&(this.errorTotals.positive[e]=Math.max(this.errorTotals.positive[e]||0,o)),{low:i,high:o}},wr.prototype.addValue=function(t,e){var o=e.categoryIx,i=e.series,r=e.seriesIx,n=this.categoryPoints[o];n||(this.categoryPoints[o]=n=[]);var s=this.seriesPoints[r];s||(this.seriesPoints[r]=s=[]);r=this.createPoint(t,e);r&&(Object.assign(r,e),r.owner=this,r.noteText=t.fields.noteText,Ct(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)},wr.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];Ct(a)||(this._evalSeries[n]=a=vr(t,{},s,!0));n=t;return a&&vr(n=j({},t),{value:e,category:o,index:i,series:r,dataItem:r.data[i]},s),n},wr.prototype.updateRange=function(t,e){var o=e.series.axis,e=t.value,t=this.valueAxisRanges[o];isFinite(e)&&null!==e&&((t=this.valueAxisRanges[o]=t||{min:l,max:c}).min=Math.min(t.min,e),t.max=Math.max(t.max,e))},wr.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},wr.prototype.reflow=function(t){var s=this,a=this.categorySlots=[],p=this.points,h=this.categoryAxis,l=0;this.traverseDataPoints(function(t,e){var o=e.categoryIx,i=e.series,r=s.seriesValueAxis(i),n=p[l++],e=a[o];e||(a[o]=e=s.categorySlot(h,o,r)),n&&(i=s.plotRange(n,r.startValue()),(o=s.valueSlot(r,i))?(o=s.pointSlot(e,o),n.aboveAxis=s.aboveAxis(n,r),n.stackValue=i[1],s.options.isStacked100&&(n.percentage=s.plotValue(n)),s.reflowPoint(n,o)):n.visible=!1)}),this.reflowCategories(a),!this.options.clip&&this.options.limitPoints&&this.points.length&&this.limitPoints(),this.box=t},wr.prototype.valueSlot=function(t,e){return t.getSlot(e[0],e[1],!this.options.clip)},wr.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])},wr.prototype.limitPoint=function(t){var e=this.categoryAxis.limitSlot(t.box);e.equals(t.box)||t.reflow(e)},wr.prototype.aboveAxis=function(t,e){var o=this.categoryAxisCrossingValue(e),t=t.value;return e.options.reverse?t<o:o<=t},wr.prototype.categoryAxisCrossingValue=function(t){var e=this.categoryAxis,t=t.options;return[].concat(t.axisCrossingValues||t.axisCrossingValue)[e.axisIndex||0]||0},wr.prototype.reflowPoint=function(t,e){t.reflow(e)},wr.prototype.reflowCategories=function(){},wr.prototype.pointSlot=function(t,e){var o=this.options.invertAxes,i=o?e:t,e=o?t:e;return new re(i.x1,e.y1,i.x2,e.y2)},wr.prototype.categorySlot=function(t,e){return t.getSlot(e)},wr.prototype.traverseDataPoints=function(t){for(var e=this.options.series,o=mr(e),i=e.length,r=0;r<i;r++)this._outOfRangeCallback(e[r],"_outOfRangeMinPoint",r,t);for(var n=0;n<o;n++)for(var s=0;s<i;s++){var a=e[s],p=this.categoryAxis.categoryAt(n);t(this._bindPoint(a,s,n),{category:p,categoryIx:n,categoriesCount:o,series:a,seriesIx:s})}for(var h=0;h<i;h++)this._outOfRangeCallback(e[h],"_outOfRangeMaxPoint",h,t)},wr.prototype._outOfRangeCallback=function(t,e,o,i){var r=t[e];r&&(e=r.categoryIx,i(this._bindPoint(t,o,e,r.item),{category:r.category,categoryIx:e,series:t,seriesIx:o,dataItem:r.item}))},wr.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]=Yi.current.bindPoint(t,o,i))},wr.prototype.formatPointValue=function(t,e){return null===t.value?"":this.chartService.format.auto(e,t.value)},wr.prototype.pointValue=function(t){return t.valueFields.value},wr);function wr(t,e){xr.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()}zt(Z,{series:[],invertAxes:!1,isStacked:!1,clip:!0,limitPoints:!0});var br,_r=Z,Ar={click:function(t,e){return t.trigger("seriesClick",this.eventArgs(e))},hover:function(t,e){return t.trigger("seriesHover",this.eventArgs(e))},over:function(t,e){return t.trigger("seriesOver",this.eventArgs(e))},out:function(t,e){return t.trigger("seriesLeave",this.eventArgs(e))},eventArgs:function(t){return{value:this.value,percentage:this.percentage,stackValue:this.stackValue,category:this.category,series:this.series,dataItem:this.dataItem,runningTotal:this.runningTotal,total:this.total,element:Mt(t),originalEvent:t,point:this}}},tt={createNote:function(){var t=this.options.notes,e=this.noteText||t.label.text;!1!==t.visible&&Ct(e)&&null!==e&&(this.note=new Je({value:this.value,text:e,dataItem:this.dataItem,category:this.category,series:this.series},this.options.notes,this.owner.chartService),this.append(this.note))}},it=((br=be)&&(Cr.__proto__=br),((Cr.prototype=Object.create(br&&br.prototype)).constructor=Cr).prototype.render=function(){var t,e=this.options,o=e.markers,i=e.labels;this._rendered||(this._rendered=!0,o.visible&&o.size&&(this.marker=this.createMarker(),this.append(this.marker)),i.visible&&(t=nt(i),e=this.pointData(),o=this.value,t?o=t(e):i.format&&(o=this.formatValue(i.format)),this.label=new Ne(o,j({align:A,vAlign:A,margin:{left:5,right:5},zIndex:jt(i.zIndex,this.series.zIndex)},i),e),this.append(this.label)),this.createNote(),this.errorBar&&this.append(this.errorBar))},Cr.prototype.markerBorder=function(){var t=this.options.markers,e=t.background,t=j({color:this.color},t.border);return Ct(t.color)||(t.color=new P.Color(e).brightness(.8).toHex()),t},Cr.prototype.createVisual=function(){},Cr.prototype.createMarker=function(){var t=this.options.markers;return new Me({type:t.type,width:t.size,height:t.size,rotation:t.rotation,background:t.background,border:this.markerBorder(),opacity:this.series.opacity||t.opacity,zIndex:jt(t.zIndex,this.series.zIndex),animation:t.animation,visual:t.visual},{dataItem:this.dataItem,value:this.value,series:this.series,category:this.category})},Cr.prototype.markerBox=function(){return this.marker||(this.marker=this.createMarker(),this.marker.reflow(this._childBox)),this.marker.box},Cr.prototype.reflow=function(t){var e=this.options,o=this.aboveAxis,i=e.vertical;this.render();var r=(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&&(o=this.markerBox(),e.markers.visible&&e.markers.size||(e=o.center(),o=new re(e.x,e.y,e.x,e.y)),this.note.reflow(o))},Cr.prototype.reflowLabel=function(t){var e=this.options,o=this.label,e=e.labels.position;o&&(e="below"===(e="above"===e?k:e)?_:e,o.reflow(t),o.box.alignTo(this.markerBox(),e),o.reflow(o.box))},Cr.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),t=new Me({type:o.type,width:i,height:i,rotation:o.rotation,background:t.color||e,border:{color:t.border.color,width:t.border.width,opacity:jt(t.border.opacity,1)},opacity:jt(t.opacity,1)});return t.reflow(this._childBox),t.getElement()},Cr.prototype.highlightVisual=function(){return(this.marker||{}).visual},Cr.prototype.highlightVisualArgs=function(){var t,e,o,i,r=this.marker;return r?(i=r.paddingBox.toRect(),t=r.visual):(o=(e=this.options.markers.size)/2,r=this.box.center(),i=new P.geometry.Rect([r.x-o,r.y-o],[e,e])),{options:this.options,rect:i,visual:t}},Cr.prototype.tooltipAnchor=function(){var t=this.markerBox(),e=this.owner.pane.clipBox();if(!e||e.overlaps(t)){var o,i=t.x2+5,e=C,t=this.aboveAxis?(o=t.y1,_):(o=t.y2,k);return{point:new te(i,o),align:{horizontal:e,vertical:t}}}},Cr.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Cr.prototype.overlapsBox=function(t){return this.markerBox().overlaps(t)},Cr.prototype.unclipElements=function(){this.label&&(this.label.options.noclip=!0),this.note&&(this.note.options.noclip=!0)},Cr.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,stackValue:this.stackValue,series:this.series}},Cr);function Cr(t,e){br.call(this),this.value=t,this.options=e,this.aboveAxis=jt(this.options.aboveAxis,!0),this.tooltipTracking=!0}it.prototype.defaults={vertical:!0,markers:{visible:!0,background:a,size:8,type:u,border:{width:2},opacity:1},labels:{visible:!1,position:"above",margin:U(3),padding:U(4),animation:{type:"fadeIn",delay:600}},notes:{label:{}},highlight:{markers:{border:{color:"#fff",width:2}},zIndex:100},errorBars:{line:{width:1}}},j(it.prototype,Ar),j(it.prototype,tt);var Sr,kr=it,ft=((Sr=be)&&(Pr.__proto__=Sr),((Pr.prototype=Object.create(Sr&&Sr.prototype)).constructor=Pr).prototype.points=function(){return this.toGeometryPoints(this.linePoints)},Pr.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},Pr.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&&!Ct(this.visual.options.zIndex)&&(this.visual.options.zIndex=this.series.zIndex)):this.segmentVisual()},Pr.prototype.segmentVisual=function(){var t=this.options,e=this.series,o=e.color,i=e._defaults;I(o)&&i&&(o=i.color);e=P.drawing.Path.fromPoints(this.points(),{stroke:{color:o,width:e.width,opacity:e.opacity,dashType:e.dashType},zIndex:e.zIndex});t.closed&&e.close(),this.visual=e},Pr.prototype.aliasFor=function(t,e){return this.parent.getNearestPoint(e.x,e.y,this.seriesIx)},Pr);function Pr(t,e,o){Sr.call(this),this.linePoints=t,this.series=e,this.seriesIx=o}zt(ft,{closed:!1});var Mr=ft;function Tr(t,e,o,i,r){var n=t.box,t=new P.geometry.Point;return t[e]=n[e+o],t[i]=n[i+r],t}var Br,bt={calculateStepPoints:function(t){for(var e=this.parent.plotArea.seriesCategoryAxis(this.series).options,o=e.justified,i=e.vertical,e=e.reverse,r=i?v:m,n=i?m:v,s=e?2:1,a=s,p=Tr(t[0],r,s,n,a),h=[p],l=1;l<t.length;l++){var c,u=Tr(t[l],r,s,n,a);p[r]!==u[r]&&((c=new P.geometry.Point)[r]=p[r],c[n]=u[n],h.push(c,u)),p=u}return o?p!==Bt(h)&&h.push(p):h.push(Tr(Bt(t),r,s,n,e?1:2)),h}},ct=((Br=Mr)&&(Rr.__proto__=Br),((Rr.prototype=Object.create(Br&&Br.prototype)).constructor=Rr).prototype.points=function(){return this.calculateStepPoints(this.linePoints)},Rr);function Rr(){Br.apply(this,arguments)}j(ct.prototype,bt);var Or,Ir,Lr=ct,Vr=((Ir=Mr)&&(Dr.__proto__=Ir),((Dr.prototype=Object.create(Ir&&Ir.prototype)).constructor=Dr).prototype.segmentVisual=function(){var t=this.series,e=t._defaults,o=t.color;I(o)&&e&&(o=e.color);e=new Bi(this.options.closed).process(this.points()),t=new P.drawing.Path({stroke:{color:o,width:t.width,opacity:t.opacity,dashType:t.dashType},zIndex:t.zIndex});t.segments.push.apply(t.segments,e),this.visual=t},Dr),qt={renderSegments:function(){var t,e=this.options,o=this.seriesPoints,i=e.series,r=o.length;this._segments=[];for(var n=0;n<r;n++){for(var s=i[n],a=this.sortPoints(o[n]),p=a.length,h=[],l=0;l<p;l++){var c=a[l];c?h.push(c):this.seriesMissingValues(s)!==Ji&&(1<h.length&&(t=this.createSegment(h,s,n,t),this._addSegment(t)),h=[])}1<h.length&&(t=this.createSegment(h,s,n,t),this._addSegment(t))}this.children.unshift.apply(this.children,this._segments)},_addSegment:function(t){this._segments.push(t),t.parent=this},sortPoints:function(t){return t},seriesMissingValues:function(t){t=t.missingValues;return!t&&this.options.isStacked?$i:t||Ji},getNearestPoint:function(t,e,o){for(var i,r=new te(t,e),n=this.seriesPoints[o],s=l,a=0;a<n.length;a++){var p,h=n[a];h&&Ct(h.value)&&null!==h.value&&!1!==h.visible&&((p=h.box.center().distanceTo(r))<s&&(i=h,s=p))}return i}},Zt=((Or=P.drawing.Animation)&&(jr.__proto__=Or),((jr.prototype=Object.create(Or&&Or.prototype)).constructor=jr).prototype.setup=function(){this._setEnd(this.options.box.x1)},jr.prototype.step=function(t){var e=this.options.box;this._setEnd(gt(e.x1,e.x2,t))},jr.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)},jr);function jr(){Or.apply(this,arguments)}function Dr(){Ir.apply(this,arguments)}zt(Zt,{duration:600}),P.drawing.AnimationFactory.current.register("clip",Zt);var zr=Zt;function Er(t){for(var e=0;e<t.length;e++)if(Ct(t[e].zIndex))return!0}var Hr,me={createAnimation:function(){var t,e=this.getRoot();e&&!1!==(e.options||{}).transitions&&(t=e.size(),e=P.drawing.Path.fromRect(t.toRect()),this.visual.clip(e),this.animation=new zr(e,{box:t}),Er(this.options.series)&&this._setChildrenAnimation(e))},_setChildrenAnimation:function(t){for(var e=this.animationPoints(),o=0;o<e.length;o++){var i=e[o];i&&i.visual&&Ct(i.visual.options.zIndex)&&i.visual.clip(t)}}},ue=((Hr=_r)&&(Ur.__proto__=Hr),((Ur.prototype=Object.create(Hr&&Hr.prototype)).constructor=Ur).prototype.render=function(){Hr.prototype.render.call(this),this.updateStackRange(),this.renderSegments()},Ur.prototype.pointType=function(){return kr},Ur.prototype.createPoint=function(t,e){var o=e.categoryIx,i=e.category,r=e.series,n=e.seriesIx,s=this.seriesMissingValues(r),e=t.valueFields.value;if(!Ct(e)||null===e){if(s!==$i)return null;e=0}s=this.pointOptions(r,n),s=this.evalPointOptions(s,e,i,o,r,n),t=t.fields.color||r.color;I(r.color)&&(t=s.color);s=new kr(e,s);return s.color=t,this.append(s),s},Ur.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]},Ur.prototype.createSegment=function(t,e,o){var i=e.style;return new("step"===i?Lr:"smooth"===i?Vr:Mr)(t,e,o)},Ur.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)},Ur.prototype.supportsPointInactiveOpacity=function(){return!1},Ur);function Ur(){Hr.apply(this,arguments)}j(ue.prototype,qt,me);var Fr,Gr,Nr=ue,Wr=((Gr=Mr)&&(Yr.__proto__=Gr),((Yr.prototype=Object.create(Gr&&Gr.prototype)).constructor=Yr).prototype.createVisual=function(){var t=this.series,e=t._defaults,o=t.line||{},i=t.color;I(i)&&e&&(i=e.color),this.visual=new P.drawing.Group({zIndex:t.zIndex}),this.createFill({fill:{color:i,opacity:t.opacity},stroke:null}),0<o.width&&!1!==o.visible&&this.createStroke({stroke:j({color:i,opacity:t.opacity,lineCap:"butt"},o)})},Yr.prototype.strokeSegments=function(){return this._strokeSegments||(this._strokeSegments=this.createStrokeSegments())},Yr.prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.points())},Yr.prototype.stackSegments=function(){return(this.prevSegment||this).createStackSegments(this.stackPoints)},Yr.prototype.createStackSegments=function(t){return this.segmentsFromPoints(this.toGeometryPoints(t)).reverse()},Yr.prototype.segmentsFromPoints=function(t){return t.map(function(t){return new P.geometry.Segment(t)})},Yr.prototype.createStroke=function(t){t=new P.drawing.Path(t);t.segments.push.apply(t.segments,this.strokeSegments()),this.visual.append(t)},Yr.prototype.hasStackSegment=function(){return this.prevSegment||this.stackPoints&&this.stackPoints.length},Yr.prototype.createFill=function(t){var e,o=this.strokeSegments(),i=o.slice(0),r=this.hasStackSegment();r&&(e=this.stackSegments(),_t(i,e));t=new P.drawing.Path(t);t.segments.push.apply(t.segments,i),!r&&1<o.length&&this.fillToAxes(t),this.visual.append(t)},Yr.prototype.fillToAxes=function(t){var e=this.parent,o=e.options.invertAxes,i=e.seriesValueAxis(this.series),r=e.categoryAxisCrossingValue(i),e=i.getSlot(r,r,!0),i=this.strokeSegments(),r=i[0].anchor(),i=Bt(i).anchor(),e=o?e.x1:e.y1;o?t.lineTo(e,i.y).lineTo(e,r.y):t.lineTo(i.x,e).lineTo(r.x,e)},Yr),_e=((Fr=Wr)&&(Xr.__proto__=Fr),((Xr.prototype=Object.create(Fr&&Fr.prototype)).constructor=Xr).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.calculateStepPoints(this.linePoints))},Xr.prototype.createStackSegments=function(t){return this.segmentsFromPoints(this.calculateStepPoints(t)).reverse()},Xr);function Xr(){Fr.apply(this,arguments)}function Yr(t,e,o,i,r){Gr.call(this,t,e,o),this.prevSegment=i,this.stackPoints=r}j(_e.prototype,bt);var qr,Qr,Zr,Kr,$r=_e,Jr=((Kr=Wr)&&(sn.__proto__=Kr),((sn.prototype=Object.create(Kr&&Kr.prototype)).constructor=sn).prototype.createStrokeSegments=function(){var t=new Bi(this.options.closed),e=this.points();return t.process(e)},sn.prototype.createStackSegments=function(){for(var t=this.strokeSegments(),e=[],o=t.length-1;0<=o;o--){var i=t[o];e.push(new P.geometry.Segment(i.anchor(),i.controlOut(),i.controlIn()))}return e},sn),tn=((Zr=Nr)&&(nn.__proto__=Zr),((nn.prototype=Object.create(Zr&&Zr.prototype)).constructor=nn).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?$r:"smooth"===a?Jr:Wr)(t,e,o,r,n)},nn.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)}},nn.prototype._gapStackPoints=function(t,e,o){var i=this.seriesPoints,r=t[0].categoryIx,t=t.length;r<0&&(r=0,t--);var n=r+t,s=this.seriesOptions[0]._outOfRangeMinPoint?1:0,a=[];this._stackPoints=this._stackPoints||[];for(var p=r;p<n;p++){for(var h,l=p+s,c=e,u=void 0;u=i[--c][l],0<c&&!u;);u?("step"!==o&&r<p&&!i[c][l-1]&&a.push(this._previousSegmentPoint(p,l,l-1,c)),a.push(u),"step"!==o&&p+1<n&&!i[c][l+1]&&a.push(this._previousSegmentPoint(p,l,l+1,c))):(h=this._createGapStackPoint(p),this._stackPoints.push(h),a.push(h))}return a},nn.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},nn.prototype._createGapStackPoint=function(t){var e=this.pointOptions({},0),e=new kr(0,e);return e.categoryIx=t,e.series={},e},nn.prototype.seriesMissingValues=function(t){return t.missingValues||$i},nn.prototype.supportsPointInactiveOpacity=function(){return!1},nn),en=((Qr=P.Class)&&(rn.__proto__=Qr),((rn.prototype=Object.create(Qr&&Qr.prototype)).constructor=rn).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:l,max:c},r.min=Math.min(r.min,i.min),r.max=Math.max(r.max,i.max)}},rn.prototype.reset=function(t){this.axisRanges[t]=void 0},rn.prototype.query=function(t){return this.axisRanges[t]},rn),N=((qr=be)&&(on.__proto__=qr),((on.prototype=Object.create(qr&&qr.prototype)).constructor=on).prototype.createVisual=function(){this.textBox.options.noclip=this.options.noclip},on.prototype.reflow=function(t){var e=this.options,o=e.vertical,i=e.aboveAxis,r=this.children[0],n=r.options,s=r.box,a=r.options.padding,p=t;n.align=o?A:C,n.vAlign=o?k:A,"insideEnd"===e.position?o?(n.vAlign=k,!i&&s.height()<t.height()&&(n.vAlign=_)):n.align=i?S:C:e.position===A?(n.vAlign=A,n.align=A):"insideBase"===e.position?o?n.vAlign=i?_:k:n.align=i?C:S:"outsideEnd"===e.position&&(p=o?i?new re(t.x1,t.y1-s.height(),t.x2,t.y1):new re(t.x1,t.y2,t.x2,t.y2+s.height()):(n.align=A,i?new re(t.x2,t.y1,t.x2+s.width(),t.y2):new re(t.x1-s.width(),t.y1,t.x1,t.y2))),e.rotation||(o?a.left=a.right=(p.width()-r.contentBox.width())/2:a.top=a.bottom=(p.height()-r.contentBox.height())/2),r.reflow(p)},on.prototype.alignToClipBox=function(t){var e=this.options.vertical?m:v,o=e+"1",i=e+"2",r=this.children[0],e=this.parent.box;(e[o]<t[o]||t[i]<e[i])&&((r=r.paddingBox.clone())[o]=Math.max(e[o],t[o]),r[i]=Math.min(e[i],t[i]),this.reflow(r))},on);function on(t,e,o){qr.call(this,e),this.textBox=new Ne(t,this.options,o),this.append(this.textBox)}function rn(){Qr.call(this),this.axisRanges={}}function nn(){Zr.apply(this,arguments)}function sn(){Kr.apply(this,arguments)}zt(N,{position:"outsideEnd",margin:U(3),padding:U(4),color:r,background:"",border:{width:1,color:""},aboveAxis:!0,vertical:!1,animation:{type:"fadeIn",delay:600},zIndex:2});var an=N;function pn(t){t=t.overlay;return t&&t.gradient&&"none"!==t.gradient}var hn,ke=((hn=be)&&(ln.__proto__=hn),((ln.prototype=Object.create(hn&&hn.prototype)).constructor=ln).prototype.render=function(){this._rendered||(this._rendered=!0,this.createLabel(),this.createNote(),this.errorBar&&this.append(this.errorBar))},ln.prototype.createLabel=function(){var t,e,o=this.options,i=o.labels;i.visible&&(t=this.pointData(),e=(e=nt(i))?e(t):this.formatValue(i.format),this.label=new an(e,j({vertical:o.vertical},i),t),this.append(this.label))},ln.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},ln.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)},ln.prototype.createVisual=function(){var e=this,t=this.box,o=this.options,i=o.visual;!1!==this.visible&&(hn.prototype.createVisual.call(this),i?(o=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 P.drawing.Group;return e.createRect(t),t},options:o}))&&this.visual.append(o):0<t.width()&&0<t.height()&&this.createRect(this.visual))},ln.prototype.createRect=function(t){var e=this.options,o=e.border,i=(Ct(o.opacity)?o:e).opacity,r=this.box.toRect();r.size.width=Math.round(r.size.width);r=this.rectVisual=P.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)&&(M(r),(i<1||o<1)&&(r.options.stroke.lineJoin="round")),t.append(r),pn(e)&&(e=this.createGradientOverlay(r,{baseColor:this.color},j({end:e.vertical?void 0:[0,1]},e.overlay)),t.append(e))},ln.prototype.createHighlight=function(t){return M(P.drawing.Path.fromRect(this.box.toRect(),t))},ln.prototype.highlightVisual=function(){return this.rectVisual},ln.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this.rectVisual}},ln.prototype.getBorderColor=function(){var t=this.color,e=this.options.border,o=e._brightness||.8,e=e.color;return e=!Ct(e)?new P.Color(t).brightness(o).toHex():e},ln.prototype.tooltipAnchor=function(){var t,e,o,i,r=this.options,n=this.box,s=this.aboveAxis,a=this.owner.pane.clipBox()||n,p=C,h=k;return r.vertical?(t=Math.min(n.x2,a.x2)+5,s?i=Math.max(n.y1,a.y1):(i=Math.min(n.y2,a.y2),h=_)):(e=Math.max(n.x1,a.x1),o=Math.min(n.x2,a.x2),i=r.isStacked?(h=_,t=s?(p=S,o):e,Math.max(n.y1,a.y1)-5):(s?t=o+5:(t=e-5,p=S),Math.max(n.y1,a.y1))),{point:new te(t,i),align:{horizontal:p,vertical:h}}},ln.prototype.overlapsBox=function(t){return this.box.overlaps(t)},ln.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}},ln);function ln(t,e){hn.call(this),this.options=e,this.color=e.color||a,this.aboveAxis=jt(this.options.aboveAxis,!0),this.value=t}j(ke.prototype,Ar),j(ke.prototype,tt),ke.prototype.defaults={border:{width:1},vertical:!0,overlay:{gradient:"glass"},labels:{visible:!1,format:"{0}"},opacity:1,notes:{label:{}}};var cn=ke;function un(t,e){t.forEach(e)}function dn(t,e){for(var o=t.length,i=o-1;0<=i;i--)e(t[i],i-o-1)}var gn,G=((gn=be)&&(fn.__proto__=gn),((fn.prototype=Object.create(gn&&gn.prototype)).constructor=fn).prototype.reflow=function(i){var t=this.options,e=t.vertical,o=t.gap,r=t.spacing,n=this.children,s=n.length,a=e?m:v,t=s+o+r*(s-1),p=(e?i.height():i.width())/t,h=i[a+1]+o/2*p;this.forEach(n,function(t,e){var o=(t.box||i).clone();o[a+1]=h,o[a+2]=h+p,t.reflow(o),e<s-1&&(h+=p*r),h+=p})},fn);function fn(t){gn.call(this,t),this.forEach=t.rtl?dn:un}zt(G,{vertical:!1,gap:0,spacing:0});var yn,vn=G,q=((yn=be)&&(mn.__proto__=yn),((mn.prototype=Object.create(yn&&yn.prototype)).constructor=mn).prototype.reflow=function(t){for(var e=this.options.vertical?v:m,o=this.children,i=o.length,r=this.box=new re,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))}},mn);function mn(){yn.apply(this,arguments)}zt(q,{vertical:!0});var xn,wn=q,Y=((xn=_r)&&(bn.__proto__=xn),((bn.prototype=Object.create(xn&&xn.prototype)).constructor=bn).prototype.render=function(){xn.prototype.render.call(this),this.updateStackRange()},bn.prototype.pointType=function(){return cn},bn.prototype.clusterType=function(){return vn},bn.prototype.stackType=function(){return wn},bn.prototype.stackLimits=function(t,e){return xn.prototype.stackLimits.call(this,t,e)},bn.prototype.createPoint=function(t,e){var o=e.categoryIx,i=e.category,r=e.series,n=e.seriesIx,s=this.options,a=this.children,p=s.isStacked,h=this.pointValue(t),l=this.pointOptions(r,n),e=l.labels;p&&"outsideEnd"===e.position&&(e.position="insideEnd"),l.isStacked=p;t=t.fields.color||r.color;h<0&&l.negativeColor&&(t=l.negativeColor),l=this.evalPointOptions(l,h,i,o,r,n),I(r.color)&&(t=l.color);l=new(this.pointType())(h,l);l.color=t;o=a[o];return o||(o=new(this.clusterType())({vertical:s.invertAxes,gap:s.gap,spacing:s.spacing,rtl:!s.invertAxes&&(this.chartService||{}).rtl}),this.append(o)),(p?this.getStackWrap(r,o):o).append(l),l},bn.prototype.getStackWrap=function(t,e){var o,t=t.stack,i=t&&t.group||t,r=e.children;if(typeof i===g){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},bn.prototype.categorySlot=function(t,e,o){var i=this.options,t=t.getSlot(e),e=o.startValue();return i.isStacked&&(e=o.getSlot(e,e,!0),t[(i=i.invertAxes?v:m)+1]=t[i+2]=e[i+1]),t},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.createAnimation=function(){this._setAnimationOptions(),xn.prototype.createAnimation.call(this),Er(this.options.series)&&this._setChildrenAnimation()},bn.prototype._setChildrenAnimation=function(){for(var t=this.points,e=0;e<t.length;e++){var o=t[e],i=o.visual;i&&Ct(i.options.zIndex)&&(o.options.animation=this.options.animation,o.createAnimation())}},bn.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 P.geometry.Point(t.x1,t.y1),o.vertical=!e.invertAxes},bn);function bn(){xn.apply(this,arguments)}zt(Y,{animation:{type:tr}});var _n,An=Y,K=((_n=be)&&(Cn.__proto__=_n),((Cn.prototype=Object.create(_n&&_n.prototype)).constructor=Cn).prototype.reflow=function(t){var e=this.options,o=this.value,i=this.owner.seriesValueAxis(e),e=i.getSlot(o.open,o.close),i=i.getSlot(o.low,o.high);e.x1=i.x1=t.x1,e.x2=i.x2=t.x2,this.realBody=e;o=i.center().x,t=[];t.push([[o,i.y1],[o,e.y1]]),t.push([[o,e.y2],[o,i.y2]]),this.lines=t,this.box=i.clone().wrap(e),this._rendered||(this._rendered=!0,this.createNote()),this.reflowNote()},Cn.prototype.reflowNote=function(){this.note&&this.note.reflow(this.box)},Cn.prototype.createVisual=function(){_n.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 P.drawing.Group;return this.createBody(e,t),this.createLines(e,t),e},Cn.prototype.createBody=function(t,e){var o=P.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:jt(e.border.opacity,e.opacity)}),M(o),t.append(o),pn(e)&&t.append(this.createGradientOverlay(o,{baseColor:this.color},j({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:jt(i.opacity,e.opacity),width:i.width,dashType:i.dashType,lineCap:"butt"}},n=0;n<o.length;n++){var s=P.drawing.Path.fromPoints(o[n],r);M(s),t.append(s)}},Cn.prototype.getBorderColor=function(){var t=this.options.border,e=t.color;return e=!Ct(e)?new P.Color(this.color).brightness(t._brightness).toHex():e},Cn.prototype.createOverlay=function(){var t=P.drawing.Path.fromRect(this.box.toRect(),{fill:{color:a,opacity:0},stroke:null});this.visual.append(t)},Cn.prototype.createHighlight=function(){var t=this.options.highlight,e=this.color;this.color=t.color||this.color;t=this.mainVisual(j({},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 te(t.x2+5,Math.max(t.y1,e.y1)+5),align:{horizontal:C,vertical:k}}},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){_n.call(this,e),this.value=t}zt(K,{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:{}}}),j(K.prototype,Ar),j(K.prototype,tt);var Sn=K;function kn(t){return Ei(t)===t.length}var Pn,Z=((Pn=_r)&&(Mn.__proto__=Pn),((Mn.prototype=Object.create(Pn&&Pn.prototype)).constructor=Mn).prototype.reflowCategories=function(t){for(var e=this.children,o=e.length,i=0;i<o;i++)e[i].reflow(t[i])},Mn.prototype.addValue=function(t,e){var o,i=e.categoryIx,r=e.category,n=e.series,s=e.seriesIx,a=this.children,p=this.options,h=t.valueFields,l=kn(this.splitValue(h)),c=n.data[i],u=this.categoryPoints[i];u||(this.categoryPoints[i]=u=[]),l&&(o=this.createPoint(t,e));a=a[i];a||(a=new vn({vertical:p.invertAxes,gap:p.gap,spacing:p.spacing,rtl:!p.invertAxes&&(this.chartService||{}).rtl}),this.append(a)),o&&(this.updateRange(h,e),a.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)},Mn.prototype.pointType=function(){return Sn},Mn.prototype.createPoint=function(t,e){var o=e.categoryIx,i=e.category,r=e.series,n=e.seriesIx,s=this.pointType(),a=t.valueFields,p=j({},r),e=t.fields.color||r.color,p=this.evalPointOptions(p,a,i,o,r,n);"candlestick"===r.type&&a.open>a.close&&(e=t.fields.downColor||r.downColor||r.color),I(r.color)&&(e=p.color),p.vertical=!this.options.invertAxes;p=new s(a,p);return p.color=e,p},Mn.prototype.splitValue=function(t){return[t.low,t.open,t.close,t.high]},Mn.prototype.updateRange=function(t,e){var o=e.series.axis,e=this.splitValue(t),t=this.valueAxisRanges[o],t=this.valueAxisRanges[o]=t||{min:l,max:c};this.valueAxisRanges[o]={min:Math.min.apply(Math,e.concat([t.min])),max:Math.max.apply(Math,e.concat([t.max]))}},Mn.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)},Mn.prototype.animationPoints=function(){return this.points},Mn);function Mn(){Pn.apply(this,arguments)}j(Z.prototype,me);var Tn,Bn=Z,it=((Tn=Sn)&&(Rn.__proto__=Tn),((Rn.prototype=Object.create(Tn&&Tn.prototype)).constructor=Rn).prototype.reflow=function(t){var e,o,i=this.options,r=this.value,n=this.owner.seriesValueAxis(i);this.boxSlot=o=n.getSlot(r.q1,r.q3),this.realBody=o,this.reflowBoxSlot(t),this.whiskerSlot=e=n.getSlot(r.lower,r.upper),this.reflowWhiskerSlot(t);i=n.getSlot(r.median);r.mean&&(r=n.getSlot(r.mean),this.meanPoints=this.calcMeanPoints(t,r)),this.whiskerPoints=this.calcWhiskerPoints(o,e),this.medianPoints=this.calcMedianPoints(t,i),this.box=e.clone().wrap(o),this.reflowNote()},Rn.prototype.reflowBoxSlot=function(t){this.boxSlot.x1=t.x1,this.boxSlot.x2=t.x2},Rn.prototype.reflowWhiskerSlot=function(t){this.whiskerSlot.x1=t.x1,this.whiskerSlot.x2=t.x2},Rn.prototype.calcMeanPoints=function(t,e){return[[[t.x1,e.y1],[t.x2,e.y1]]]},Rn.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]]]},Rn.prototype.calcMedianPoints=function(t,e){return[[[t.x1,e.y1],[t.x2,e.y1]]]},Rn.prototype.renderOutliers=function(t){for(var e,o=this.value,i=o.outliers||[],r=3*Math.abs(o.q3-o.q1),n=[],s=(t.markers,0);s<i.length;s++){var a=i[s],p=j({},(e=a<o.q3+r&&a>o.q1-r?t.outliers:t.extremes).border);Ct(p.color)||(Ct(this.color)?p.color=this.color:p.color=new P.Color(e.background).brightness(.8).toHex());p=new Me({type:e.type,width:e.size,height:e.size,rotation:e.rotation,background:e.background,border:p,opacity:e.opacity});p.value=a,n.push(p)}return this.reflowOutliers(n),n},Rn.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)}},Rn.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},Rn.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)},Rn.prototype.getBorderColor=function(){return(this.options.border||{}).color?this.options.border.color:this.color||Tn.prototype.getBorderColor.call(this)},Rn);function Rn(t,e){Tn.call(this,t,e),this.createNote()}zt(it,{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:u,background:a,border:{width:2,opacity:1},opacity:0}}),j(it.prototype,Ar);var On,In,Ln,Vn=it,jn=((Ln=Vn)&&(Un.__proto__=Ln),((Un.prototype=Object.create(Ln&&Ln.prototype)).constructor=Un).prototype.reflowBoxSlot=function(t){this.boxSlot.y1=t.y1,this.boxSlot.y2=t.y2},Un.prototype.reflowWhiskerSlot=function(t){this.whiskerSlot.y1=t.y1,this.whiskerSlot.y2=t.y2},Un.prototype.calcMeanPoints=function(t,e){return[[[e.x1,t.y1],[e.x1,t.y2]]]},Un.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]]]},Un.prototype.calcMedianPoints=function(t,e){return[[[e.x1,t.y1],[e.x1,t.y2]]]},Un),Dn=((In=Bn)&&(Hn.__proto__=In),((Hn.prototype=Object.create(In&&In.prototype)).constructor=Hn).prototype.addValue=function(t,e){var o,i=e.categoryIx,r=e.category,n=e.series,s=e.seriesIx,a=this.children,p=this.options,h=t.valueFields,l=kn(this.splitValue(h)),c=n.data[i],u=this.categoryPoints[i];u||(this.categoryPoints[i]=u=[]),l&&(o=this.createPoint(t,e));a=a[i];a||(a=new vn({vertical:p.invertAxes,gap:p.gap,spacing:p.spacing,rtl:!p.invertAxes&&(this.chartService||{}).rtl}),this.append(a)),o&&(this.updateRange(h,e),a.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)},Hn.prototype.pointType=function(){return this.options.invertAxes?jn:Vn},Hn.prototype.splitValue=function(t){return[t.lower,t.q1,t.median,t.q3,t.upper]},Hn.prototype.updateRange=function(t,e){var o=e.series.axis,i=this.valueAxisRanges[o],e=this.splitValue(t).concat(this.filterOutliers(t.outliers));Ct(t.mean)&&(e=e.concat(t.mean)),i=this.valueAxisRanges[o]=i||{min:l,max:c},this.valueAxisRanges[o]={min:Math.min.apply(Math,e.concat([i.min])),max:Math.max.apply(Math,e.concat([i.max]))}},Hn.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)},Hn.prototype.filterOutliers=function(t){for(var e=(t||[]).length,o=[],i=0;i<e;i++){var r=t[i];Ct(r)&&null!==r&&o.push(r)}return o},Hn.prototype.supportsPointInactiveOpacity=function(){return!1},Hn),zn=((On=gr)&&(En.__proto__=On),((En.prototype=Object.create(On&&On.prototype)).constructor=En).prototype.getAxis=function(){var t=this.chart.seriesAxes(this.series);return this.isVertical?t.y:t.x},En);function En(){On.apply(this,arguments)}function Hn(){In.apply(this,arguments)}function Un(){Ln.apply(this,arguments)}function Fn(t){return Ct(t)&&null!==t}var Gn,ft=((Gn=be)&&(Nn.__proto__=Gn),((Nn.prototype=Object.create(Gn&&Gn.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,p=t.options.errorBars,h=o[e+"ErrorLow"],o=o[e+"ErrorHigh"];B(r)&&(B(h)&&B(o)&&(i={low:h,high:o}),p&&Ct(p[n])&&(this.seriesErrorRanges=this.seriesErrorRanges||{x:[],y:[]},this.seriesErrorRanges[e][s]=this.seriesErrorRanges[e][s]||new Zi(p[n],a,e),i=this.seriesErrorRanges[e][s].getErrorRange(r,p[n])),i&&this.addPointErrorBar(i,t,e))},Nn.prototype.addPointErrorBar=function(t,e,o){var i=t.low,r=t.high,n=e.series,s=e.options.errorBars,a=o===m,t={};e[o+"Low"]=i,e[o+"High"]=r,e.errorBars=e.errorBars||[];s=new zn(i,r,a,this,n,s);e.errorBars.push(s),e.append(s),t[o]=i,this.updateRange(t,n),t[o]=r,this.updateRange(t,n)},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=t;(t=!Fn(i)||!Fn(r)?this.createMissingValue(t,s):t)&&((o=this.createPoint(t,e))&&(Object.assign(o,e),this.addErrorBar(o,v,e),this.addErrorBar(o,m,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,r=e.yAxis,n=t.x,s=t.y,e=this.xAxisRanges[i],t=this.yAxisRanges[r];Fn(n)&&(e=this.xAxisRanges[i]=e||{min:l,max:c},R(n)&&(n=jo(o,n)),e.min=Math.min(e.min,n),e.max=Math.max(e.max,n)),Fn(s)&&(t=this.yAxisRanges[r]=t||{min:l,max:c},R(s)&&(s=jo(o,s)),t.min=Math.min(t.min,s),t.max=Math.max(t.max,s))},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];Ct(s)||(this._evalSeries[r]=s=vr(t,{},n,!0));r=t;return s&&vr(r=j({},t),{value:e,series:i,dataItem:o.dataItem},n),r},Nn.prototype.pointType=function(){return kr},Nn.prototype.pointOptions=function(t,e){var o,i=this.seriesOptions[e];return i||(o=this.pointType().prototype.defaults,this.seriesOptions[e]=i=j({},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);I(o.color)&&(r=i.color);i=new kr(t,i);return i.color=r,this.append(i),i},Nn.prototype.seriesAxes=function(t){var e=t.xAxis,o=t.yAxis,i=this.plotArea,t=e?i.namedXAxes[e]:i.axisX,i=o?i.namedYAxes[o]:i.axisY;if(!t)throw new Error("Unable to locate X axis with name "+e);if(!i)throw new Error("Unable to locate Y axis with name "+o);return{x:t,y:i}},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++],i=r.seriesAxes(e.series),e=i.x.getSlot(t.x,t.x,s),t=i.y.getSlot(t.y,t.y,s);o&&(e&&t?(t=r.pointSlot(e,t),o.reflow(t)):o.visible=!1)}),this.box=t},Nn.prototype.pointSlot=function(t,e){return new re(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,j({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},Nn);function Nn(t,e){Gn.call(this,e),this.plotArea=t,this.chartService=t.chartService,this._initFields(),this.render()}zt(ft,{series:[],tooltip:{format:"{0}, {1}"},labels:{format:"{0}, {1}"},clip:!0}),j(ft.prototype,me,{_bindPoint:_r.prototype._bindPoint});var Wn,Xn=ft,ct=((Wn=kr)&&(Yn.__proto__=Wn),((Yn.prototype=Object.create(Wn&&Wn.prototype)).constructor=Yn).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 P.drawing.Group,s=new P.drawing.Circle(new P.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}]})}),t=new P.drawing.Circle(new P.geometry.Circle([i.x,i.y],r),{stroke:{color:e.color||new P.Color(o.background).brightness(.8).toHex(),width:e.width,opacity:e.opacity},fill:{color:o.background,opacity:t.opacity}});return n.append(s,t),n},Yn);function Yn(t,e){Wn.call(this,t,e),this.category=t.category}ct.prototype.defaults=j({},ct.prototype.defaults,{labels:{position:A},highlight:{opacity:1,border:{color:"#fff",width:2,opacity:1}}}),ct.prototype.defaults.highlight.zIndex=void 0;var qn,Qn=ct,Zt=((qn=Xn)&&(Zn.__proto__=qn),((Zn.prototype=Object.create(qn&&qn.prototype)).constructor=Zn).prototype._initFields=function(){this._maxSize=c,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 Qn},Zn.prototype.createPoint=function(t,e){var o=e.series,i=o.data.length,r=e.pointIx*(600/i),n={delay:r,duration:600-r,type:"bubble"},i=e.color||o.color;t.size<0&&o.negativeValues.visible&&(i=jt(o.negativeValues.color,i));n=j({labels:{animation:{delay:r,duration:600-r}}},this.pointOptions(o,e.seriesIx),{markers:{type:u,border:o.border,opacity:o.opacity,animation:n}}),n=this.evalPointOptions(n,t,e);I(o.color)&&(i=n.color),n.markers.background=i;n=new Qn(t,n);return n.color=i,this.append(n),n},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],n=this.seriesPoints[i],s=(r.minSize||Math.max(.02*o,10))/2,a=(r.maxSize||.2*o)/2,p=Math.PI*s*s,h=(Math.PI*a*a-p)/this._maxSize,l=0;l<n.length;l++){var c,u,d=n[l];d&&(u=Math.abs(d.value.size)*h,c=Math.sqrt((p+u)/Math.PI),u=jt(d.options.zIndex,0)+(1-c/a),j(d.options,{zIndex:u,markers:{size:2*c,zIndex:u},labels:{zIndex:u+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)}zt(Zt,{tooltip:{format:"{3}"},labels:{format:"{3}"}});var Kn,$n=Zt,ue=((Kn=Me)&&(Jn.__proto__=Kn),(Jn.prototype=Object.create(Kn&&Kn.prototype)).constructor=Jn);function Jn(){Kn.apply(this,arguments)}j(ue.prototype,Ar);var ts,es=ue,_e=((ts=be)&&(os.__proto__=ts),((os.prototype=Object.create(ts&&ts.prototype)).constructor=os).prototype.render=function(){var t=this.options;this._rendered||(this._rendered=!0,Ct(this.value.target)&&(this.target=new es({type:t.target.shape,background:t.target.color||this.color,opacity:t.opacity,zIndex:t.zIndex,border:t.target.border,vAlign:k,align:S}),this.target.value=this.value,this.target.dataItem=this.dataItem,this.target.series=this.series,this.append(this.target)),this.createNote())},os.prototype.reflow=function(t){this.render();var e=this.options,o=this.target,i=this.owner,r=e.invertAxes,n=i.seriesValueAxis(this.options),s=i.categorySlot(i.categoryAxis,e.categoryIx,n),i=n.getSlot(this.value.target),n=r?i:s,i=r?s:i;o&&(i=new re(n.x1,i.y1,n.x2,i.y2),o.options.height=r?i.height():e.target.line.width,o.options.width=r?e.target.line.width:i.width(),o.reflow(i)),this.note&&this.note.reflow(t),this.box=t},os.prototype.createVisual=function(){ts.prototype.createVisual.call(this);var t=this.options,e=P.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:jt(t.border.opacity,t.opacity)}),M(this.bodyVisual=e),this.visual.append(e)},os.prototype.createAnimation=function(){this.bodyVisual&&(this.animation=P.drawing.Animation.create(this.bodyVisual,this.options.animation))},os.prototype.createHighlight=function(t){return P.drawing.Path.fromRect(this.box.toRect(),t)},os.prototype.highlightVisual=function(){return this.bodyVisual},os.prototype.highlightVisualArgs=function(){return{rect:this.box.toRect(),visual:this.bodyVisual,options:this.options}},os.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},os);function os(t,e){ts.call(this,e),this.aboveAxis=this.options.aboveAxis,this.color=e.color||a,this.value=t}_e.prototype.tooltipAnchor=cn.prototype.tooltipAnchor,zt(_e,{border:{width:1},vertical:!1,opacity:1,target:{shape:"",border:{width:0,color:"green"},line:{width:2}},tooltip:{format:"Current: {0}<br />Target: {1}"}}),j(_e.prototype,Ar),j(_e.prototype,tt);var is,rs=_e,N=((is=_r)&&(ns.__proto__=is),((ns.prototype=Object.create(is&&is.prototype)).constructor=ns).prototype.reflowCategories=function(t){for(var e=this.children,o=e.length,i=0;i<o;i++)e[i].reflow(t[i])},ns.prototype.plotRange=function(t){var e=t.series,e=this.seriesValueAxis(e),e=this.categoryAxisCrossingValue(e);return[e,t.value.current||e]},ns.prototype.createPoint=function(t,e){var o=e.categoryIx,i=e.category,r=e.series,n=e.seriesIx,s=this.options,a=this.children,p=t.valueFields,e=j({vertical:!s.invertAxes,overlay:r.overlay,categoryIx:o,invertAxes:s.invertAxes},r),t=t.fields.color||r.color,e=this.evalPointOptions(e,p,i,o,r,n);I(r.color)&&(t=e.color);e=new rs(p,e);e.color=t;o=a[o];return o||(o=new vn({vertical:s.invertAxes,gap:s.gap,spacing:s.spacing,rtl:!s.invertAxes&&(this.chartService||{}).rtl}),this.append(o)),o.append(e),e},ns.prototype.updateRange=function(t,e){var o=t.current,i=t.target,t=e.series.axis,e=this.valueAxisRanges[t];Ct(o)&&!isNaN(o)&&Ct(i&&!isNaN(i))&&((e=this.valueAxisRanges[t]=e||{min:l,max:c}).min=Math.min(e.min,o,i),e.max=Math.max(e.max,o,i))},ns.prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value.current,t.value.target)},ns.prototype.pointValue=function(t){return t.valueFields.current},ns.prototype.aboveAxis=function(t){return 0<t.value.current},ns.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()}},ns);function ns(t,r){!function(){for(var t=r.series,e=0;e<t.length;e++){var o=t[e],i=o.data;!i||x(i[0])||D(i[0])||(o.data=[i])}}(),is.call(this,t,r)}N.prototype._setAnimationOptions=An.prototype._setAnimationOptions,zt(N,{animation:{type:tr}});var ss,as=N,ke=((ss=P.Class)&&(ps.__proto__=ss),((ps.prototype=Object.create(ss&&ss.prototype)).constructor=ps).prototype.getStyle=function(t,e){var o=t.background,i=t.border.color;e&&(r=e.color||e.options.color,o=jt(o,r),i=jt(i,r));var r=U(t.padding||{},"auto");return{backgroundColor:o,borderColor:i,font:t.font,color:t.color,opacity:t.opacity,borderWidth:z(t.border.width),paddingTop:z(r.top),paddingBottom:z(r.bottom),paddingLeft:z(r.left),paddingRight:z(r.right)}},ps.prototype.show=function(t,e,o){t.format=e.format;o=this.getStyle(e,o);t.style=o;o=new P.Color(o.backgroundColor);Ct(e.color)||o.isDark()||(t.className="k-chart-tooltip-inverse"),this.chartService.notify("showTooltip",t),this.visible=!0},ps.prototype.hide=function(){this.chartService&&this.chartService.notify("hideTooltip"),this.visible=!1},ps.prototype.destroy=function(){delete this.chartService},ps);function ps(t,e){ss.call(this),this.chartService=t,this.options=j({},this.options,e)}zt(ke,{border:{width:1},opacity:1});var hs,G=ke,q=((hs=G)&&(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,n=i.padding,i=!o.axis.options.vertical,o=o.line.bbox(),n=i?(t=A,r===_?(e=k,o.bottomLeft().translate(0,n)):(e=_,o.topLeft().translate(0,-n))):(e=A,r===C?(t=S,o.topLeft().translate(-n,0)):(t=C,o.topRight().translate(n,0)));return{point:n,align:{horizontal:t,vertical:e}}},ls);function ls(t,e,o){hs.call(this,t,o),this.crosshair=e,this.formatService=t.format,this.initAxisName()}zt(q,{padding:10});var cs,us=q,Y=((cs=be)&&(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?m:v,n=new P.geometry.Point(i.x1,i.y1),o=o?new P.geometry.Point(i.x2,i.y1):new P.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,n=e.lineBox().clone(),e=r?v:m,s=0;s<i;s++){var a=o[s];a.options.vertical!==r&&(t?t.wrap(a.lineBox()):t=a.lineBox().clone())}return n[e+1]=t[e+1],n[e+2]=t[e+2],n},ds.prototype.createVisual=function(){cs.prototype.createVisual.call(this);var t=this.options;this.line=new P.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 Uo;e=this.options.tooltip;e.visible&&(this.tooltip=new us(t,this,j({},e,{stickyMode:this.stickyMode})))}zt(Y,{color:r,width:2,zIndex:-1,tooltip:{visible:!1}});var gs,fs=Y,K=((gs=be)&&(ys.__proto__=gs),((ys.prototype=Object.create(gs&&gs.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 P.drawing.Group({zIndex:0}),this.shouldClip()&&(t=(this.clipBox=this._clipBox()).toRect(),M(t=P.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(){gs.prototype.destroy.call(this),delete this.parent},ys);function ys(t,e){gs.call(this,t),this.pane=e}K.prototype.isStackRoot=!0;var vs,ms=K,Z=((vs=Se)&&(ws.__proto__=vs),((ws.prototype=Object.create(vs&&vs.prototype)).constructor=ws).prototype.createTitle=function(){var t=this.options.title;D(t)&&(t=j({},t,{align:t.position,position:k})),this.title=qe.buildTitle(t,this,ws.prototype.options.title)},ws.prototype.appendAxis=function(t){this.content.append(t),this.axes.push(t),t.pane=this},ws.prototype.appendAxisAt=function(t,e){this.content.append(t),this.axes.splice(e,0,t),t.pane=this},ws.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},ws.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=[]},ws.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())},ws.prototype.visualStyle=function(){var t=vs.prototype.visualStyle.call(this);return t.zIndex=-10,t},ws.prototype.renderComplete=function(){this.options.visible&&this.createGridLines()},ws.prototype.stackRoot=function(){return this},ws.prototype.clipRoot=function(){return this},ws.prototype.createGridLines=function(){for(var t,e=this.axes,o=e.concat(this.parent.axes),i=[],r=[],n=0;n<e.length;n++)for(var s=e[n],a=s.options.vertical,p=a?i:r,h=0;h<o.length;h++)0!==p.length||a!==(t=o[h]).options.vertical&&_t(p,s.createGridLines(t))},ws.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()},ws.prototype.chartsBox=function(){for(var t=this.axes,e=t.length,o=new re,i=0;i<e;i++){var r=t[i],n=r.options.vertical?m:v,r=r.lineBox();o[n+1]=r[n+1],o[n+2]=r[n+2]}if(0===o.x2)for(var s=this.parent.axes,a=s.length,p=0;p<a;p++){var h=s[p];h.options.vertical||(h=h.lineBox(),o.x1=h.x1,o.x2=h.x2)}return o},ws.prototype.clipBox=function(){return this.chartContainer.clipBox},ws.prototype.notifyRender=function(){var t=this.getService();t&&t.notify("paneRender",{pane:new ji(this),index:this.paneIndex,name:this.options.name})},ws),xs=1;function ws(t){vs.call(this,t),this.id="pane"+xs++,this.createTitle(),this.content=new be,this.chartContainer=new ms({},this),this.append(this.content),this.axes=[],this.charts=[]}Z.prototype.isStackRoot=!0,zt(Z,{zIndex:-1,shrinkToFit:!0,title:{align:C},visible:!0});var bs=Z;function _s(t,e){null!==e&&t.push(e)}function As(t,e,o){e=e.visible;if(Ct(e))return e;t=t.pointVisibility;return t?t[o]:void 0}function Cs(t){for(var e=t.data,o=[],i=0,r=0,n=0;n<e.length;n++){var s=Yi.current.bindPoint(t,n),a=s.valueFields.value;B(a=R(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 Ss(t,e){return t&&e?t.toLowerCase()===e.toLowerCase():t===e}function ks(t,e){for(var o=[],i=[].concat(e),r=0;r<t.length;r++){var n=t[r];dt(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=jo(o,pt(t)(e)),e[i]=r),r}function Ms(t,e){t=t.type,e=e instanceof Date;return!t&&e||Ss(t,y)}function Ts(t){return 1===t.length?t[0]:t}var Bs=/area/i;function Rs(t,e){var o,i=Yi.current.bindPoint(t,null,e).valueFields;for(o in i)if(O(i[o]))return!0}function Os(t){for(var e,o,i=t.start,r=t.dir,n=t.min,s=t.max,a=t.getter,p=t.hasItem,h=t.series,l=i;p(l+=r)&&(e=Rs(h,(o=a(l)).item)),n<=l&&l<=s&&!e;);if(e)return o}function Is(t,e,o,i,r){var n,s,a,p=e.min,h=e.max,l=0<p&&p<o,c=h+1<o;(l||c)&&(((e=t).missingValues||(Bs.test(e.type)||e.stack?$i:Ji))!==Ji?(l&&(n=i(p-1)),c&&(s=i(h+1))):(l&&(n=Rs(t,(a=i(p-1)).item)?a:Os({start:p,dir:-1,min:0,max:o-1,getter:i,hasItem:r,series:t})),c&&(s=Rs(t,(a=i(h+1)).item)?a:Os({start:h,dir:1,min:0,max:o-1,getter:i,hasItem:r,series:t}))),n&&(t._outOfRangeMinPoint=n),s&&(t._outOfRangeMaxPoint=s))}var Ls,it=((Ls=be)&&(Vs.__proto__=Ls),((Vs.prototype=Object.create(Ls&&Ls.prototype)).constructor=Vs).prototype.initFields=function(){},Vs.prototype.initSeries=function(){for(var t=this.series,e=0;e<t.length;e++)t[e].index=e},Vs.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=j({title:{color:t.color}},e),s=0;s<i;s++){var a=j({},n,o[s]);R(a.title)&&(a.title=j({text:a.title},n.title));a=new bs(a);a.paneIndex=s,r.push(a),this.append(a)}this.panes=r},Vs.prototype.crosshairOptions=function(t){return t.options.crosshair},Vs.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&&(n=new fs(this.chartService,r,n),this.crosshairs.push(n),o.content.append(n))}},Vs.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}},Vs.prototype.hideCrosshairs=function(){for(var t=this.crosshairs,e=0;e<t.length;e++)t[e].hide()},Vs.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]},Vs.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},Vs.prototype.appendAxis=function(t){this.findPane(t.options.pane).appendAxis(t),this.axes.push(t),t.plotArea=this},Vs.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},Vs.prototype.appendChart=function(t,e){this.charts.push(t),e?e.appendChart(t):this.append(t)},Vs.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},Vs.prototype.addToLegend=function(t){for(var e=t.length,o=this.options.legend,i=o.labels||{},r=o.inactiveItems||{},n=r.labels||{},s=[],a=0;a<e;a++){var p,h,l,c,u=t[a],d=!1!==u.visible;!1!==u.visibleInLegend&&(p=u.name,(l=!d&&nt(n)||nt(i))&&(p=l({text:Fn(p)?p:"",series:u})),c=u._defaults,I(h=u.color)&&c&&(h=c.color),c=l=void 0,c=d?(l={},h):(l={color:n.color,font:n.font},r.markers.color),Fn(p)&&""!==p&&s.push({text:p,labels:l,markerColor:c,series:u,active:d}))}_t(o.items,s)},Vs.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)}},Vs.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},Vs.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},Vs.prototype.reflow=function(t){var e=this.options.plotArea,o=this.panes,e=U(e.margin);this.box=t.clone().unpad(e),this.reflowPanes(),this.detachLabels(),this.reflowAxes(o),this.reflowCharts(o)},Vs.prototype.redraw=function(t){var e=[].concat(t);this.initSeries();t=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()},Vs.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},Vs.prototype.alignAxisTo=function(t,e,o,i){var r=t.getSlot(o,o,!0),n=t.options.reverse?2:1,o=e.getSlot(i,i,!0),i=e.options.reverse?2:1,n=t.box.translate(o[v+i]-r[v+n],o[m+i]-r[m+n]);t.pane!==e.pane&&n.translate(0,t.pane.box.y1-e.pane.box.y1),t.reflow(n)},Vs.prototype.alignAxes=function(t,e){for(var o=t[0],i=e[0],r=this.axisCrossingValues(o,e),n=this.axisCrossingValues(i,t),s={},a={},p={},h={},l=0;l<e.length;l++){var c=e[l],u=c.pane,d=u.id,g=!1!==c.options.visible,f=Ds(t,u)||o,u=r;f!==o&&(u=this.axisCrossingValues(f,e)),this.alignAxisTo(c,f,n[l],u[l]),c.options._overlap||(Lt(c.lineBox().x1)===Lt(f.lineBox().x1)&&(s[d]&&c.reflow(c.box.alignTo(s[d].box,C).translate(-c.options.margin,0)),g&&(s[d]=c)),Lt(c.lineBox().x2)===Lt(f.lineBox().x2)&&(c._mirrored||(c.options.labels.mirror=!c.options.labels.mirror,c._mirrored=!0),this.alignAxisTo(c,f,n[l],u[l]),a[d]&&c.reflow(c.box.alignTo(a[d].box,S).translate(c.options.margin,0)),g&&(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,w=!1!==v.options.visible,b=Ds(e,m)||i,m=n;b!==i&&(m=this.axisCrossingValues(b,t)),this.alignAxisTo(v,b,r[y],m[y]),v.options._overlap||(Lt(v.lineBox().y1)===Lt(b.lineBox().y1)&&(v._mirrored||(v.options.labels.mirror=!v.options.labels.mirror,v._mirrored=!0),this.alignAxisTo(v,b,r[y],m[y]),p[x]&&v.reflow(v.box.alignTo(p[x].box,k).translate(0,-v.options.margin)),w&&(p[x]=v)),Lt(v.lineBox().y2,3)===Lt(b.lineBox().y2,3)&&(h[x]&&v.reflow(v.box.alignTo(h[x].box,_).translate(0,v.options.margin)),w&&(h[x]=v)),0!==y&&(v.alignTo(o),v.reflow(v.box)))}},Vs.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))}},Vs.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},Vs.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,s=r.contentBox;if(0<n.length)for(var r=js(n),a=Math.max(s.y1-r.y1,s.y2-r.y2),o=Math.max(o,s.x1-r.x1),p=0;p<n.length;p++){var h=n[p];h.reflow(h.box.translate(0,a))}}for(var l=0;l<e.length;l++){var c=e[l];c.reflow(c.box.translate(o,0))}},Vs.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))},Vs.prototype.autoRotateAxisLabels=function(t){for(var e,o=this.panes,i=zs(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))}},Vs.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)},Vs.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&&!dt(n,t)||e[r].reflow(i)}},Vs.prototype.reflowPanes=function(){for(var t=this.box,e=this.panes,o=e.length,i=t.height(),r=0,n=t.y1,s=0;s<o;s++){var a=e[s],p=a.options.height;a.options.width=t.width(),a.options.height?(p.indexOf&&p.indexOf("%")&&(p=parseInt(p,10)/100,a.options.height=p*t.height()),a.reflow(t.clone()),i-=a.options.height):r++}for(var h=0;h<o;h++){var l=e[h];l.options.height||(l.options.height=i/r)}for(var c=0;c<o;c++){var u=e[c],d=t.clone().move(t.x1,n);u.reflow(d),n+=u.options.height}},Vs.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},Vs.prototype.chartsBoxes=function(){for(var t=this.panes,e=[],o=0;o<t.length;o++)e.push(t[o].chartsBox());return e},Vs.prototype.addBackgroundPaths=function(t){for(var e=this.chartsBoxes(),o=0;o<e.length;o++)t.paths.push(P.drawing.Path.fromRect(e[o].toRect()))},Vs.prototype.backgroundContainsPoint=function(t){for(var e=this.chartsBoxes(),o=0;o<e.length;o++)if(e[o].containsPoint(t))return!0},Vs.prototype.createVisual=function(){Ls.prototype.createVisual.call(this);var t=this.options.plotArea,e=t.opacity,o=t.background,t=t.border;void 0===t&&(t={}),""!==o&&null!==o&&"none"!==o&&"transparent"!==o&&Ct(o)||(o=a,e=0);t=this._bgVisual=new P.drawing.MultiPath({fill:{color:o,opacity:e},stroke:{color:t.width?t.color:"",width:t.width,dashType:t.dashType},zIndex:-1});this.addBackgroundPaths(t),this.appendVisual(t)},Vs.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&&Ct(s.value)&&null!==s.value&&o.push(s)}}return o},Vs.prototype.pointsBySeriesIndex=function(e){return this.filterPoints(function(t){return t.series.index===e})},Vs.prototype.pointsBySeriesName=function(e){return this.filterPoints(function(t){return t.series.name===e})},Vs.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},Vs.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}},Vs.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}},Vs.prototype.detachLabels=function(){var t=this.groupAxes(this.panes),e=t.x,t=t.y;this.detachAxisGroupLabels(t,e),this.detachAxisGroupLabels(e,t)},Vs.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))}},Vs.prototype.createLabelAxis=function(t,e,o){var i=t.options.labels,r=i.position,n=i.visible;if("end"!==r&&"start"!==r||!1===n)return null;i=this.groupAxes(this.panes),n=o.options.vertical?i.x:i.y,i=this.axisCrossingValues(o,n),n="end"===r,r=o.range(),n=n?r.max:r.min;if(Rt(i[e],r.min,r.max)-n==0)return null;i.splice(e+1,0,n),o.options.axisCrossingValues=i;i=t.clone();return t.clear(),i.options.name=void 0,i.options.line.visible=!1,i.options.crosshair=void 0,i.options.notes=void 0,i.options.plotBands=void 0,i},Vs);function Vs(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 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))&&(r=n?r.contentBox():r.lineBox(),e?e.wrap(r):e=r.clone())}return e||new re}function Ds(t,e){for(var o=0;o<t.length;o++){var i=t[o];if(i&&i.pane===e)return i}}var zs=function(t){return t.reduce(function(t,e){return t.concat(e.axes)},[])};zt(it,{series:[],plotArea:{margin:{}},background:"",border:{color:r,width:0},paneDefaults:{title:{}},legend:{inactiveItems:{labels:{color:"#919191"},markers:{color:"#919191"}}}});var Es=it,Hs={hover:function(t,e){this._dispatchEvent(t,e,"plotAreaHover")},click:function(t,e){this._dispatchEvent(t,e,"plotAreaClick")}};var Us,Fs,Gs=((Fs=P.Class)&&(Ws.__proto__=Fs),((Ws.prototype=Object.create(Fs&&Fs.prototype)).constructor=Ws).prototype.aggregatePoints=function(t,e){var o=this._series,i=this._seriesFields,r=this._bindPoints(t||[]),n=r.dataItems[0],s={};!n||B(n)||x(n)||((t=function(){}).prototype=n,s=new t);for(var a=0;a<i.length;a++){var p=i[a],h=this._bindField(r.values,p.canonicalName),h=p.transform(h,o,r.dataItems,e);if(!(null===h||!D(h)||Ct(h.length)||h instanceof Date)){s=h;break}Ct(h)&&function(t,e,o){var i=e,r=t;if(-1<t.indexOf(".")){for(var n=t.split(".");1<n.length;)r=n.shift(),Ct(i[r])||(i[r]={}),i=i[r];r=n.shift()}i[r]=o}(p.name,s,h)}return s},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,a=(Ct(s[e])?s:n.fields)[e];o.push(a)}return o},Ws),ft=((Us=P.Class)&&(Ns.__proto__=Us),((Ns.prototype=Object.create(Us&&Us.prototype)).constructor=Ns).prototype.register=function(t,e){for(var o=0;o<t.length;o++)this._defaults[t[o]]=e},Ns.prototype.query=function(t){return this._defaults[t]},Ns);function Ns(){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),s=this._seriesFields=[],o=o.query(t.type),a=t.aggregate||o;this._series=t,this._binder=e;for(var p=0;p<i.length;p++){var h=i[p],l=void 0;if(D(a))l=a[h];else{if(0!==p&&!dt(h,r))break;l=a}l&&s.push({canonicalName:h,name:n[p],transform:I(l)?l:Ui[l]})}}ft.current=new ft;var Xs,Ys=ft,ct=((Xs=cn)&&(qs.__proto__=Xs),((qs.prototype=Object.create(Xs&&Xs.prototype)).constructor=qs).prototype.createLabel=function(){var t=this.options.labels,e=j({},t,t.from),t=j({},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=nt(t),o=this.pointData(),e=e?e(o):this.formatValue(t.format);return new an(e,j({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(){Xs.apply(this,arguments)}ct.prototype.defaults=j({},ct.prototype.defaults,{labels:{format:"{0} - {1}"},tooltip:{format:"{1}"}});var Qs,Zs=ct,Zt=((Qs=An)&&(Ks.__proto__=Qs),((Ks.prototype=Object.create(Qs&&Qs.prototype)).constructor=Ks).prototype.pointType=function(){return Zs},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 o=e.series.axis,i=t.from,r=t.to,e=this.valueAxisRanges[o];null!==t&&B(i)&&B(r)&&((e=this.valueAxisRanges[o]=e||{min:l,max:c}).min=Math.min(e.min,i),e.max=Math.max(e.max,i),e.min=Math.min(e.min,r),e.max=Math.max(e.max,r))},Ks.prototype.aboveAxis=function(t){t=t.value;return t.from<t.to},Ks);function Ks(){Qs.apply(this,arguments)}Zt.prototype.plotLimits=_r.prototype.plotLimits;var $s,Js,ta=Zt,ea=((Js=kr)&&(ia.__proto__=Js),((ia.prototype=Object.create(Js&&Js.prototype)).constructor=ia).prototype.aliasFor=function(){return this.parent},ia),ue=(($s=be)&&(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,i=(o=this.options).markers,t=o.labels,e=this.value,o=this.fromPoint=new ea(e,j({},this.options,{labels:t.from,markers:i.from})),i=this.toPoint=new ea(e,j({},this.options,{labels:t.to,markers:i.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 P.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=this.owner.pane.clipBox();if(!t||t.overlaps(this.box)){var e,o,i=this.box,r=i.center(),t=C,r=this.options.vertical?(e=r.x,o=i.y1-5,_):(e=i.x2+5,o=r.y,A);return{point:new te(e,o),align:{horizontal:t,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&&(t=i?e.y1<=t.y1?(o="above","below"):(o="below","above"):e.x1<=t.x1?(o=C,S):(o=S,C),r.from&&r.from.position||(this.fromPoint.options.labels.position=t),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=jt(this.options.aboveAxis,!0),this.tooltipTracking=!0,this.initLabelsFormat()}function ia(){Js.apply(this,arguments)}j(ue.prototype,Ar),j(ue.prototype,tt),ue.prototype.defaults={markers:{visible:!1,background:a,size:8,type:u,border:{width:2},opacity:1},labels:{visible:!1,margin:U(3),padding:U(4),animation:{type:"fadeIn",delay:600},position:"auto"},notes:{label:{}},highlight:{markers:{border:{color:a,width:2}},zIndex:100},tooltip:{format:"{0} - {1}"}};var ra,na,sa,aa=ue,pa=((sa=Wr)&&(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?this.fromSegments=this.segmentsFromPoints(this.toGeometryPoints(this.fromPoints().reverse())):t},ua.prototype.createStroke=function(t){var e=new P.drawing.Path(t),t=new P.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),ha=((na=pa)&&(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?this.fromSegments=this.createCurveSegments(this.fromPoints().reverse()):t},ca.prototype.createCurveSegments=function(t){return(new Bi).process(this.toGeometryPoints(t))},ca),_e=((ra=pa)&&(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)}j(_e.prototype,bt);var da,ga=_e,N=((da=_r)&&(fa.__proto__=da),((fa.prototype=Object.create(da&&da.prototype)).constructor=fa).prototype.render=function(){da.prototype.render.call(this),this.renderSegments()},fa.prototype.pointType=function(){return aa},fa.prototype.createPoint=function(t,e){var o=e.categoryIx,i=e.category,r=e.series,n=e.seriesIx,s=t.valueFields;if(!Fn(s.from)&&!Fn(s.to)){if(this.seriesMissingValues(r)!==$i)return null;s={from:0,to:0}}e=this.pointOptions(r,n),e=this.evalPointOptions(e,s,i,o,r,n),t=t.fields.color||r.color;I(r.color)&&(t=e.color);e=new aa(s,e);return e.color=t,this.append(e),e},fa.prototype.createSegment=function(t,e,o){var i=(e.line||{}).style;return new("smooth"===i?ha:"step"===i?ga:pa)(t,e,o)},fa.prototype.plotRange=function(t,e){return t?[t.value.from,t.value.to]:[e,e]},fa.prototype.valueSlot=function(t,e){var o=t.getSlot(e[0],e[0],!this.options.clip),e=t.getSlot(e[1],e[1],!this.options.clip);if(o&&e)return{from:o,to:e}},fa.prototype.pointSlot=function(t,e){var o,i=e.from,e=e.to,e=this.options.invertAxes?(o=new re(i.x1,t.y1,i.x2,t.y2),new re(e.x1,t.y1,e.x2,t.y2)):(o=new re(t.x1,i.y1,t.x2,i.y2),new re(t.x1,e.y1,t.x2,e.y2));return{from:o,to:e}},fa.prototype.addValue=function(t,e){var o=t.valueFields;B(o.from)||(o.from=o.to),B(o.to)||(o.to=o.from),da.prototype.addValue.call(this,t,e)},fa.prototype.updateRange=function(t,e){var o;null!==t&&B(t.from)&&B(t.to)&&(o=e.series.axis,e=this.valueAxisRanges[o]=this.valueAxisRanges[o]||{min:l,max:c},o=t.from,t=t.to,e.min=Math.min(e.min,o,t),e.max=Math.max(e.max,o,t))},fa.prototype.formatPointValue=function(t,e){t=t.value;return this.chartService.format.auto(e,t.from,t.to)},fa.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)},fa);function fa(){da.apply(this,arguments)}j(N.prototype,qt,me);var ya,va,ma,xa=N,wa=((ma=Sn)&&(Ca.__proto__=ma),((Ca.prototype=Object.create(ma&&ma.prototype)).constructor=Ca).prototype.reflow=function(t){var e=this.options,o=this.value,i=this.owner.seriesValueAxis(e),r=[],n=[],s=[],a=i.getSlot(o.low,o.high),e=i.getSlot(o.open,o.open),o=i.getSlot(o.close,o.close);e.x1=o.x1=a.x1=t.x1,e.x2=o.x2=a.x2=t.x2;t=a.center().x;r.push([e.x1,e.y1]),r.push([t,e.y1]),n.push([t,o.y1]),n.push([o.x2,o.y1]),s.push([t,a.y1]),s.push([t,a.y2]),this.lines=[r,n,s],this.box=a.clone().wrap(e.clone().wrap(o)),this.reflowNote()},Ca.prototype.createBody=function(){},Ca),ba=((va=Bn)&&(Aa.__proto__=va),((Aa.prototype=Object.create(va&&va.prototype)).constructor=Aa).prototype.pointType=function(){return wa},Aa),ke=((ya=be)&&(_a.__proto__=ya),((_a.prototype=Object.create(ya&&ya.prototype)).constructor=_a).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])):(e=e.aboveAxis?o.x2:o.x1,r.push([e,o.y1],[e,i.y2])),r},_a.prototype.createVisual=function(){ya.prototype.createVisual.call(this);var t=this.series.line||{},t=P.drawing.Path.fromPoints(this.linePoints(),{stroke:{color:t.color,width:t.width,opacity:t.opacity,dashType:t.dashType}});M(t),this.visual.append(t)},_a);function _a(t,e,o){ya.call(this),this.from=t,this.to=e,this.series=o}function Aa(){va.apply(this,arguments)}function Ca(){ma.apply(this,arguments)}zt(ke,{animation:{type:"fadeIn",delay:600}});var Sa,ka,Pa=ke,Ma=((ka=An)&&(Oa.__proto__=ka),((Oa.prototype=Object.create(ka&&ka.prototype)).constructor=Oa).prototype.render=function(){ka.prototype.render.call(this),this.createSegments()},Oa.prototype.traverseDataPoints=function(t){for(var e=this.options.series,o=mr(e),i=!this.options.invertAxes,r=0;r<e.length;r++)for(var n=e[r],s=0,a=0,p=0;p<o;p++){var h=Yi.current.bindPoint(n,p),l=h.valueFields.value,c=h.fields.summary,u=s,d=void 0;c?"total"===c.toLowerCase()?(u=0,d=h.valueFields.value=s):(d=u-(h.valueFields.value=a),a=0):B(l)&&(a+=l,d=s+=l),t(h,{category:this.categoryAxis.categoryAt(p),categoryIx:p,series:n,seriesIx:r,total:s,runningTotal:a,from:u,to:d,isVertical:i})}},Oa.prototype.updateRange=function(t,e){ka.prototype.updateRange.call(this,{value:e.to},e)},Oa.prototype.aboveAxis=function(t){return 0<=t.value},Oa.prototype.plotRange=function(t){return[t.from,t.to]},Oa.prototype.createSegments=function(){for(var t=this.options.series,e=this.seriesPoints,o=this.segments=[],i=0;i<t.length;i++){var r=t[i],n=e[i];if(n)for(var s=void 0,a=0;a<n.length;a++){var p,h=n[a];h&&s&&(p=new Pa(s,h,r),o.push(p),this.append(p)),s=h}}},Oa),Ta=["area","verticalArea","rangeArea","verticalRangeArea"],Ba=[or,rr].concat(Ta),q=((Sa=Es)&&(Ra.__proto__=Sa),((Ra.prototype=Object.create(Sa&&Sa.prototype)).constructor=Ra).prototype.initFields=function(t){if(this.namedCategoryAxes={},this.namedValueAxes={},this.valueAxisRangeTracker=new en,0<t.length){this.invertAxes=dt(t[0].type,[tr,"bullet",rr,"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}}}},Ra.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)},Ra.prototype.removeAxis=function(t){var e=t.options.name;Sa.prototype.removeAxis.call(this,t),t instanceof Uo?delete this.namedCategoryAxes[e]:(this.valueAxisRangeTracker.reset(e),delete this.namedValueAxes[e]),t===this.categoryAxis&&delete this.categoryAxis,t===this.valueAxis&&delete this.valueAxis},Ra.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"]||[];this.addToLegend(r);r=this.filterVisibleSeries(r);if(r)for(var n=this.groupSeriesByCategoryAxis(r),s=0;s<n.length;s++)this.createChartGroup(n[s],i)}},Ra.prototype.createChartGroup=function(t,e){this.createAreaChart(ks(t,["area","verticalArea"]),e),this.createRangeAreaChart(ks(t,["rangeArea","verticalRangeArea"]),e),this.createBarChart(ks(t,[er,tr]),e),this.createRangeBarChart(ks(t,["rangeColumn","rangeBar"]),e),this.createBulletChart(ks(t,["bullet","verticalBullet"]),e),this.createCandlestickChart(ks(t,"candlestick"),e),this.createBoxPlotChart(ks(t,["boxPlot","verticalBoxPlot"]),e),this.createOHLCChart(ks(t,"ohlc"),e),this.createWaterfallChart(ks(t,["waterfall","horizontalWaterfall"]),e),this.createLineChart(ks(t,[or,rr]),e)},Ra.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=(Ss(n.options.type,y)||r.categoryField)&&dt(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},Ra.prototype.filterSeries=function(e,o){var t=(e.data||{}).length;if(o._seriesMax=Math.max(o._seriesMax||0,t),!B(o.options.min)&&!B(o.options.max))return e;var i=o.currentRangeIndices(),r=dt(e.type,Ba),n=j({},e);return n.data=(n.data||[]).slice(i.min,i.max+1),r&&Is(n,i,t,function(t){return{item:e.data[t],category:o.categoryAt(t,!0),categoryIx:t-i.min}},function(t){return Ct(e.data[t])}),n},Ra.prototype.clearSeriesPointsCache=function(){this._seriesPointsCache={}},Ra.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=Ss(i.type,y),n=t.data,s=i?Ps:Fi,a=[];i||e.mapCategories();for(var p=0;p<n.length;p++){var h,l=t.categoryField?s(t.categoryField,n[p],this.chartService.intl):r[p];Ct(l)&&null!==l&&(a[h=e.totalIndex(l)]=a[h]||{items:[],category:l},a[h].items.push(p))}return this._currentPointsCache[o]=a},Ra.prototype.aggregateSeries=function(t,i){if(!t.data.length)return t;for(var r=this.seriesSourcePoints(t,i),e=j({},t),n=new Gs(j({},t),Yi.current,Ys.current),o=e.data=[],s=i.options.dataItems||[],a=i.currentRangeIndices(),p=function(t){var e=t-a.min,o=r[t];return(o=o||(r[t]={})).categoryIx=e,o.item||(t=i.categoryAt(t,!0),o.category=t,o.item=n.aggregatePoints(o.items,t)),o},h=a.min;h<=a.max;h++){var l=p(h);o[l.categoryIx]=l.item,l.items&&l.items.length&&(s[l.categoryIx]=l.item)}return dt(e.type,Ba)&&Is(e,a,i.totalCount(),p,function(t){return r[t]}),i.options.dataItems=s,e},Ra.prototype.appendChart=function(t,e){var o=t.options.series,i=this.seriesCategoryAxis(o[0]),r=i.options.categories,n=Math.max(0,mr(o)-r.length);if(0<n)for(r=i.options.categories=i.options.categories.slice(0);n--;)r.push("");this.valueAxisRangeTracker.update(t.valueAxisRanges),Sa.prototype.appendChart.call(this,t,e)},Ra.prototype.seriesPaneName=function(t){var e=this.options,o=t.axis,t=ht([].concat(e.valueAxis),function(t){return t.name===o})[0],e=((e.panes||[{}])[0]||{}).name||"default";return(t||{}).pane||e},Ra.prototype.seriesCategoryAxis=function(t){var e=t.categoryAxis,t=e?this.namedCategoryAxes[e]:this.categoryAxis;if(!t)throw new Error("Unable to locate category axis with name "+e);return t},Ra.prototype.stackableChartOptions=function(t,e){t=t.stack;return{isStacked:t,isStacked100:t&&"100%"===t.type,clip:e.options.clip}},Ra.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 ht(t,function(t){return 0===o&&!t.categoryAxis||t.categoryAxis===e})}(t,e[s],s);0!==a.length&&n.push(a)}return n},Ra.prototype.createBarChart=function(t,e){var o;0!==t.length&&(o=t[0],o=new An(this,Object.assign({series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing},this.stackableChartOptions(o,e))),this.appendChart(o,e))},Ra.prototype.createRangeBarChart=function(t,e){var o;0!==t.length&&(o=t[0],o=new ta(this,{series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing}),this.appendChart(o,e))},Ra.prototype.createBulletChart=function(t,e){var o;0!==t.length&&(o=t[0],o=new as(this,{series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing,clip:e.options.clip}),this.appendChart(o,e))},Ra.prototype.createLineChart=function(t,e){var o;0!==t.length&&(o=t[0],o=new Nr(this,Object.assign({invertAxes:this.invertAxes,series:t},this.stackableChartOptions(o,e))),this.appendChart(o,e))},Ra.prototype.createAreaChart=function(t,e){var o;0!==t.length&&(o=t[0],o=new tn(this,Object.assign({invertAxes:this.invertAxes,series:t},this.stackableChartOptions(o,e))),this.appendChart(o,e))},Ra.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))},Ra.prototype.createOHLCChart=function(t,e){var o;0!==t.length&&(o=t[0],o=new ba(this,{invertAxes:this.invertAxes,gap:o.gap,series:t,spacing:o.spacing,clip:e.options.clip}),this.appendChart(o,e))},Ra.prototype.createCandlestickChart=function(t,e){var o;0!==t.length&&(o=t[0],o=new Bn(this,{invertAxes:this.invertAxes,gap:o.gap,series:t,spacing:o.spacing,clip:e.options.clip}),this.appendChart(o,e))},Ra.prototype.createBoxPlotChart=function(t,e){var o;0!==t.length&&(o=t[0],o=new Dn(this,{invertAxes:this.invertAxes,gap:o.gap,series:t,spacing:o.spacing,clip:e.options.clip}),this.appendChart(o,e))},Ra.prototype.createWaterfallChart=function(t,e){var o;0!==t.length&&(o=t[0],o=new Ma(this,{series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing}),this.appendChart(o,e))},Ra.prototype.axisRequiresRounding=function(t,e){for(var o=ks(this.series,nr),i=0;i<this.series.length;i++){var r,n=this.series[i];!dt(n.type,Ta)||(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}},Ra.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}},Ra.prototype.createCategoryAxesLabels=function(){for(var t=this.axes,e=0;e<t.length;e++)t[e]instanceof Uo&&t[e].createLabels()},Ra.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(dt(this.findPane(n.pane),t)){var s=n.name,a=n.categories;void 0===a&&(a=[]),n=j({vertical:e,reverse:!e&&this.chartService.rtl,axisCrossingValue:e?l:0},n),Ct(n.justified)||(n.justified=this.isJustified()),this.axisRequiresRounding(s,r)&&(n.justified=!1);var p=void 0,p=new(Ms(n,a[0])?Ko:Uo)(n,this.chartService);if(o[r].categories=p.options.srcCategories,s){if(this.namedCategoryAxes[s])throw new Error("Category axis with name "+s+" is already defined");this.namedCategoryAxes[s]=p}p.axisIndex=r,i.push(p),this.appendAxis(p)}}var h=this.categoryAxis||i[0];this.categoryAxis=h,e?this.axisY=h:this.axisX=h},Ra.prototype.isJustified=function(){for(var t=this.series,e=0;e<t.length;e++)if(!dt(t[e].type,Ta))return!1;return!0},Ra.prototype.createValueAxes=function(t){var e=this.valueAxisRangeTracker,o=e.query(),i=[].concat(this.options.valueAxis),r=this.invertAxes,n={vertical:!r,reverse:r&&this.chartService.rtl},s=[];this.stack100&&(n.roundToMajorUnit=!1,n.labels={format:"P0"});for(var a=0;a<i.length;a++){var p=i[a];if(dt(this.findPane(p.pane),t)){var h=p.name,l=Ss(p.type,"log")?{min:.1,max:1}:{min:0,max:1},l=e.query(h)||o||l;0===a&&l&&o&&(l.min=Math.min(l.min,o.min),l.max=Math.max(l.max,o.max));p=new(Ss(p.type,"log")?gi:si)(l.min,l.max,j({},n,p),this.chartService);if(h){if(this.namedValueAxes[h])throw new Error("Value axis with name "+h+" is already defined");this.namedValueAxes[h]=p}p.axisIndex=a,s.push(p),this.appendAxis(p)}}var c=this.valueAxis||s[0];this.valueAxis=c,r?this.axisX=c:this.axisY=c},Ra.prototype._dispatchEvent=function(t,e,o){var i=t._eventCoordinates(e),r=new te(i.x,i.y),i=this.pointPane(r),n=[],s=[];if(i){for(var a=i.axes,p=0;p<a.length;p++){var h=a[p];h.getValue?_s(s,h.getValue(r)):_s(n,h.getCategory(r))}0===n.length&&_s(n,this.categoryAxis.getCategory(r)),0<n.length&&0<s.length&&t.trigger(o,{element:Mt(e),originalEvent:e,category:Ts(n),value:Ts(s)})}},Ra.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}},Ra.prototype.updateAxisOptions=function(t,e){Ia(this.options,t,e),Ia(this.originalOptions,t,e)},Ra);function Ra(){Sa.apply(this,arguments)}function Oa(){ka.apply(this,arguments)}function Ia(t,e,o){j([].concat(e instanceof Uo?t.categoryAxis:t.valueAxis)[e.axisIndex],o)}zt(q,{categoryAxis:{},valueAxis:{}}),j(q.prototype,Hs);var La=q;function Va(){this._defaultPrevented=!0}var ja,Da=((ja=P.Class)&&(za.__proto__=ja),((za.prototype=Object.create(ja&&ja.prototype)).constructor=za).prototype.destroy=function(){this._points=[]},za.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))}},za.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:Va,visual:t.highlightVisual(),show:e}),i._defaultPrevented||t.toggleHighlight(e,o)):t.toggleHighlight(e,o)},za.prototype.hide=function(){for(var t=this._points;t.length;)this.togglePointHighlight(t.pop(),!1)},za.prototype.isHighlighted=function(t){for(var e=this._points,o=0;o<e.length;o++)if(t===e[o])return!0;return!1},za);function za(){ja.call(this),this._points=[]}function Ea(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}var Ua,Y=((Ua=P.Class)&&(Fa.__proto__=Ua),((Fa.prototype=Object.create(Ua&&Ua.prototype)).constructor=Fa).prototype.start=function(t){return this._active=Ea(t,this.options.key),this._active},Fa.prototype.move=function(t){if(this._active){t=this.axisRanges=this._panAxes(t,v).concat(this._panAxes(t,m));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,p=n[s];!(e===v&&!p.options.vertical||e===m&&p.options.vertical)||(a=p.pan(i))&&(a.limitRange=!0,r.push({axis:p,range:a}))}return r},Fa);function Fa(t,e){Ua.call(this),this.plotArea=t,this.options=j({},this.options,e)}Y.prototype.options={key:"none",lock:"none"};var Ga,Na=Y,K=((Ga=P.Class)&&(Wa.__proto__=Ga),((Wa.prototype=Object.create(Ga&&Ga.prototype)).constructor=Wa).prototype.createElement=function(){var t=this._marquee=document.createElement("div");t.className="k-marquee";var e=document.createElement("div");e.className="k-marquee-color",t.appendChild(e)},Wa.prototype.removeElement=function(){this._marquee.parentNode&&this._marquee.parentNode.removeChild(this._marquee)},Wa.prototype.setStyles=function(t){H(this._marquee,t)},Wa.prototype.start=function(t){if(Ea(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){e=this._elementOffset();return 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=H(t,["paddingLeft","paddingTop"]),o=e.paddingLeft,e=e.paddingTop,t=kt(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){if(this._zoomPane){var e=this._elementOffset(),t=this._selectionPosition(t);t.left-=e.left,t.top-=e.top;e={x:t.left,y:t.top},t={x:t.left+t.width,y:t.top+t.height};return this._updateAxisRanges(e,t),this.removeElement(),delete this._zoomPane,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===v&&!a||o===m&&a||!Ct(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,r=t.y.location,n=(this.options.lock||"").toLowerCase(),s=Math.min(o.x,i),a=Math.min(o.y,r),p=Math.abs(o.x-i),t=Math.abs(o.y-r);return n===v&&(s=e.x1,p=e.width()),n===m&&(a=e.y1,t=e.height()),i>e.x2&&(p=e.x2-o.x),i<e.x1&&(p=o.x-e.x1),r>e.y2&&(t=e.y2-o.y),r<e.y1&&(t=o.y-e.y1),{left:Math.max(s,e.x1),top:Math.max(a,e.y1),width:p,height:t}},Wa);function Wa(t,e){Ga.call(this),this.chart=t,this.options=j({},this.options,e),this.createElement()}K.prototype.options={key:"shift",lock:"none"};var Xa,Ya,qa,Qa,Za=K,Ka=((Qa=P.Class)&&(rp.__proto__=Qa),((rp.prototype=Object.create(Qa&&Qa.prototype)).constructor=rp).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===v&&!a||o===m&&a||!s.zoomRange||(a=Rt(this.options.rate,.01,.9),(a=s.zoomRange(-t*a,e))&&i.push({axis:s,range:a}))}return Ha(this.axisRanges=i)},rp.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)}},rp.prototype.destroy=function(){delete this.chart},rp),$a=((qa=be)&&(ip.__proto__=qa),((ip.prototype=Object.create(qa&&qa.prototype)).constructor=ip).prototype.render=function(){var t=this.children,e=this.options,o=e.vertical;this.visual=new P.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 re),r.renderVisual()}},ip.prototype.reflow=function(t){this.visual.rect(t.toRect()),this.visual.reflow();t=this.visual.clippedBBox();this.box=t?He(t):new re},ip.prototype.renderVisual=function(){this.addVisual()},ip.prototype.createVisual=function(){},ip),Ja=((Ya=Se)&&(op.__proto__=Ya),((op.prototype=Object.create(Ya&&Ya.prototype)).constructor=op).prototype.createContainer=function(){this.container=new je({vertical:!1,wrap:!1,align:A,spacing:this.options.spacing}),this.append(this.container)},op.prototype.createMarker=function(){this.container.append(new Me(this.markerOptions()))},op.prototype.markerOptions=function(){var t=this.options,e=t.markerColor;return j({},t.markers,{background:e,border:{color:e}})},op.prototype.createLabel=function(){var t=this.options,e=j({},t.labels);this.container.append(new Ne(t.text,e))},op.prototype.renderComplete=function(){Ya.prototype.renderComplete.call(this);var t=this.options.cursor||{},t=this._itemOverlay=P.drawing.Path.fromRect(this.container.box.toRect(),{fill:{color:a,opacity:0},stroke:null,cursor:t.style||t});this.appendVisual(t)},op.prototype.click=function(t,e){var o=this.eventArgs(e);!t.trigger("legendItemClick",o)&&e&&"contextmenu"===e.type&&e.preventDefault()},op.prototype.over=function(t,e){e=this.eventArgs(e);return t.trigger("legendItemHover",e)||t._legendItemHover(e.seriesIndex,e.pointIndex),!0},op.prototype.out=function(t,e){t._unsetActivePoint(),t.trigger("legendItemLeave",this.eventArgs(e))},op.prototype.eventArgs=function(t){var e=this.options;return{element:Mt(t),text:e.text,series:e.series,seriesIndex:e.series.index,pointIndex:e.pointIndex}},op.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)},op),tp="custom",Z=((Xa=be)&&(ep.__proto__=Xa),((ep.prototype=Object.create(Xa&&Xa.prototype)).constructor=ep).prototype.createContainers=function(){var t=this.options,e=t.position,o=t.align,i=e,r=A;e===tp?i=C:dt(e,[k,_])?(i="start"===o?C:"end"===o?S:A,r=e):o&&("start"===o?r=k:"end"===o&&(r=_)),this.container=new Se({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 Se({vAlign:r,align:i,zIndex:t.zIndex,shrinkToFit:!0}):this.itemsContainer=this.container,this.append(this.container)},ep.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(j({},{markers:e.markers,labels:e.labels,rtl:t.rtl},e.item,a)))}i.render(),this.itemsContainer.append(i)},ep.prototype.isVertical=function(){var t=this.options,e=t.orientation,t=t.position;return t===tp&&"horizontal"!==e||(Ct(e)?"horizontal"!==e:dt(t,[C,S]))},ep.prototype.hasItems=function(){return 0<this.container.children[0].children.length},ep.prototype.reflow=function(t){var e=this.options,t=t.clone();this.hasItems()?(e.position===tp?(this.containerCustomReflow(t),this.box=t):this.containerReflow(t),this.hasTitle()&&this.title.reflow(new re(this.container.box.x1,this.title.box.y1,this.container.box.x2,this.title.box.y2))):this.box=t},ep.prototype.containerReflow=function(t){var e=this.options,o=this.container,i=e.position,r=e.width,n=e.height,s=i===k||i===_?v:m,a=this.isVertical(),p=t.clone(),h=t.clone();i!==C&&i!==S||(h.y1=p.y1=0),a&&n?(h.y2=h.y1+n,h.align(p,m,o.options.vAlign)):!a&&r&&(h.x2=h.x1+r,h.align(p,v,o.options.align)),o.reflow(h);p=(h=o.box).clone();(e.offsetX||e.offsetY)&&(h.translate(e.offsetX,e.offsetY),o.reflow(h)),p[s+1]=t[s+1],p[s+2]=t[s+2],this.box=p},ep.prototype.containerCustomReflow=function(t){var e=this.options,o=this.container,i=e.offsetX,r=e.offsetY,n=e.width,s=e.height,e=this.isVertical(),t=t.clone();e&&s?t.y2=t.y1+s:!e&&n&&(t.x2=t.x1+n),o.reflow(t),t=o.box,o.reflow(new re(i,r,i+t.width(),r+t.height()))},ep.prototype.renderVisual=function(){this.hasItems()&&Xa.prototype.renderVisual.call(this)},ep.prototype.createLegendTitle=function(t){var e=j({},{color:r,position:k,align:A},t),o=e.text;t&&!1!==t.visible&&(Ct(e)&&e.visible&&((t=nt(e))?o=t({text:o}):e.format&&(o=this.chartService.format.auto(e.format,o))),this.title=new Ne(o,e),this.createTitleLayout(),this.appendTitleLayoutContent())},ep.prototype.createTitleLayout=function(){this.layout=new je({vertical:!0,wrap:!1}),this.container.append(this.layout)},ep.prototype.hasTitle=function(){return Boolean(this.options.title&&!1!==this.options.title.visible)},ep.prototype.appendTitleLayoutContent=function(){this.options.title.position===_?(this.layout.append(this.itemsContainer),this.layout.append(this.title)):(this.layout.append(this.title),this.layout.append(this.itemsContainer))},ep);function ep(t,e){void 0===e&&(e={}),Xa.call(this,t),this.chartService=e,dt(this.options.position,[k,S,_,C,tp])||(this.options.position=S),this.createContainers(),this.createLegendTitle(t.title),this.createItems()}function op(t){Ya.call(this,t),this.createContainer(),t.rtl?(this.createLabel(),this.createMarker()):(this.createMarker(),this.createLabel())}function ip(t,e){qa.call(this,t),this.chartService=e}function rp(t,e){Qa.call(this),this.chart=t,this.options=j({rate:.3},this.options,e)}zt(Z,{position:S,items:[],offsetX:0,offsetY:0,margin:U(5),padding:U(5),border:{color:r,width:0},item:{cursor:"pointer",spacing:6},spacing:6,background:"",zIndex:1,markers:{border:{width:0},width:15,height:3,type:"rect",align:C,vAlign:A}});var np,sp=Z,it=((np=P.Class)&&(ap.__proto__=np),((ap.prototype=Object.create(np&&np.prototype)).constructor=ap).prototype.register=function(t,e){this._registry.push({type:t,seriesTypes:e})},ap.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=ks(t,a.seriesTypes)).length){n=a;break}}return new n.type(i,e,o)},ap);function ap(){np.call(this),this._registry=[]}it.current=new it;var pp=it;function hp(t){var e=document.createElement("div");return t&&(e.className=t),e}function lp(t){for(var e=t;e&&!lt(e,"k-handle");)e=e.parentNode;return e}var cp,ft=((cp=P.Class)&&(up.__proto__=cp),((up.prototype=Object.create(cp&&cp.prototype)).constructor=up).prototype.onPane=function(t){return this.categoryAxis.pane===t},up.prototype.createElements=function(){var t=this.options,e=this.wrapper=hp("k-selector");H(e,{top:t.offset.top,left:t.offset.left,width:t.width,height:t.height,direction:"ltr"});var o=this.selection=hp("k-selection");this.leftMask=hp("k-mask"),this.rightMask=hp("k-mask"),e.appendChild(this.leftMask),e.appendChild(this.rightMask),e.appendChild(o),o.appendChild(hp("k-selection-bg"));var i=this.leftHandle=hp("k-handle k-left-handle"),r=this.rightHandle=hp("k-handle k-right-handle");i.appendChild(hp()),r.appendChild(hp()),o.appendChild(i),o.appendChild(r),this.chartElement.appendChild(e);var n=H(o,["borderLeftWidth","borderRightWidth","height"]),s=H(i,"height").height,o=H(r,"height").height;t.selection={border:{left:n.borderLeftWidth,right:n.borderRightWidth}},H(i,{top:(n.height-s)/2}),H(r,{top:(n.height-o)/2}),e.style.cssText=e.style.cssText},up.prototype.bindEvents=function(){var t;!1!==this.options.mousewheel&&(this._mousewheelHandler=this._mousewheel.bind(this),At(this.wrapper,((t={})[lr]=this._mousewheelHandler,t))),this._domEvents=et.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)})},up.prototype.initOptions=function(){var t=this.options,e=this.categoryAxis.pane.chartsBox(),o=this.chart.chartService.intl;this._dateAxis&&j(t,{min:jo(o,t.min),max:jo(o,t.max),from:jo(o,t.from),to:jo(o,t.to)});var i=H(this.chartElement,["paddingLeft","paddingTop"]),o=i.paddingLeft,i=i.paddingTop;this.options=j({},{width:e.width(),height:e.height()+.1,padding:{left:o,top:i},offset:{left:e.x1+o,top:e.y1+i},from:t.min,to:t.max},t)},up.prototype.destroy=function(){var t;this._domEvents&&(this._domEvents.destroy(),delete this._domEvents),clearTimeout(this._mwTimeout),this._state=null,this.wrapper&&(this._mousewheelHandler&&(Vt(this.wrapper,((t={})[lr]=this._mousewheelHandler,t)),this._mousewheelHandler=null),this.chartElement.removeChild(this.wrapper),this.wrapper=null)},up.prototype._rangeEventArgs=function(t){return{axis:this.categoryAxis.options,from:this._value(t.from),to:this._value(t.to)}},up.prototype._start=function(t){var e=this.options,o=Mt(t);!this._state&&o&&(this.chart._unsetActivePoint(),this._state={moveTarget:lp(o)||o,startLocation:t.x?t.x.location:0,range:{from:this._index(e.from),to:this._index(e.to)}},e=this._rangeEventArgs({from:this._index(e.from),to:this._index(e.to)}),this.trigger("selectStart",e)&&(this._state=null))},up.prototype._press=function(t){(t=this._state?this._state.moveTarget:lp(Mt(t)))&&p(t,"k-handle-active")},up.prototype._move=function(t){var e,o,i,r,n,s,a,p,h,l,c,u;this._state&&(l=this._state,h=this.options,c=this.categoryAxis,e=l.range,o=l.moveTarget,i=c.options.reverse,r=this._index(h.from),n=this._index(h.to),s=this._index(h.min),a=this._index(h.max),u=l.startLocation-t.x.location,p=e.from,h=e.to,l=e.to-e.from,t=H(this.wrapper,"width").width/(c.categoriesCount()-1),c=Math.round(u/t)*(i?-1:1),o&&(u=lt(o,"k-left-handle"),t=lt(o,"k-right-handle"),lt(o,"k-selection k-selection-bg")?(e.from=Math.min(Math.max(s,r-c),a-l),e.to=Math.min(e.from+l,a)):u&&!i||t&&i?(e.from=Math.min(Math.max(s,r-c),a-1),e.to=Math.max(e.from+1,e.to)):(u&&i||t&&!i)&&(e.to=Math.min(Math.max(s+1,n-c),a),e.from=Math.min(e.to-1,e.from)),e.from===p&&e.to===h||(this.move(e.from,e.to),this.trigger("select",this._rangeEventArgs(e)))))},up.prototype._end=function(){var t;this._state&&((t=this._state.moveTarget)&&b(t,"k-handle-active"),t=this._state.range,this.set(t.from,t.to),this.trigger("selectEnd",this._rangeEventArgs(t)),delete this._state)},up.prototype._tap=function(t){var e=this.options,o=this.categoryAxis,i=this.chart._eventCoordinates(t),r=o.pointCategoryIndex(new te(i.x,o.box.y1)),n=this._index(e.from),s=this._index(e.to),a=this._index(e.min),p=this._index(e.max),i=s-n,e={},s=3===t.event.which,r=Math.round(n+i/2-r);this._state||s||(this.chart._unsetActivePoint(),o.options.justified||r--,e.from=Math.min(Math.max(a,n-r),p-i),e.to=Math.min(e.from+i,p),this._start(t),this._state&&(this._state.range=e,this.trigger("select",this._rangeEventArgs(e)),this._end()))},up.prototype._mousewheel=function(t){var e,o=this,i=xt(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))},up.prototype._gesturestart=function(t){var e=this.options;this._state={range:{from:this._index(e.from),to:this._index(e.to)}};e=this._rangeEventArgs(this._state.range);this.trigger("selectStart",e)?this._state=null:t.preventDefault()},up.prototype._gestureend=function(){this._state&&(this.trigger("selectEnd",this._rangeEventArgs(this._state.range)),delete this._state)},up.prototype._gesturechange=function(t){var e=this.chart,o=this._state,i=this.options,r=this.categoryAxis,n=o.range,s=e._toModelCoordinates(t.touches[0].x.location).x,o=e._toModelCoordinates(t.touches[1].x.location).x,e=Math.min(s,o),o=Math.max(s,o);t.preventDefault(),n.from=r.pointCategoryIndex(new te(e))||i.min,n.to=r.pointCategoryIndex(new te(o))||i.max,this.move(n.from,n.to),this.trigger("select",this._rangeEventArgs(n))},up.prototype._index=function(t){var e=t;return e=t instanceof Date?this.categoryAxis.categoryIndex(t):e},up.prototype._value=function(t){var e=t;return e=this._dateAxis&&(e=this.categoryAxis.categoryAt(t))>this.options.max?this.options.max:e},up.prototype._slot=function(t){var e=this.categoryAxis,t=this._index(t);return e.getSlot(t,t,!0)},up.prototype.move=function(t,e){var o=this.options,i=this.categoryAxis.options.reverse,r=o.offset,n=o.padding,s=o.selection.border,a=i?t:e,p="x"+(i?2:1),e=this._slot(i?e:t),t=Lt(e[p]-r.left+n.left);H(this.leftMask,{width:t}),H(this.selection,{left:t});e=this._slot(a),r=Lt(o.width-(e[p]-r.left+n.left));H(this.rightMask,{width:r});n=o.width-r;n!==o.width&&(n+=s.right),H(this.rightMask,{left:n}),H(this.selection,{width:Math.max(o.width-(t+r)-s.right,0)})},up.prototype.set=function(t,e){var o=this.options,i=this._index(o.min),r=this._index(o.max),i=Rt(this._index(t),i,r),r=Rt(this._index(e),i+1,r);o.visible&&this.move(i,r),o.from=this._value(i),o.to=this._value(r)},up.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),s=this._index(e.to),a={from:n,to:s},e=j({},a);if(this._state&&(a=this._state.range),r!==S&&(a.from=Rt(Rt(n-t,0,s-1),o,i)),r!==C&&(a.to=Rt(Rt(s+t,a.from+1,i),o,i)),a.from!==e.from||a.to!==e.to)return this.set(a.from,a.to),!0},up.prototype.zoom=function(t,e){var o=this.options,i=this._index(o.min),r=this._index(o.max),n=this._index(o.from),s=this._index(o.to),a={from:n,to:s},p=j({},a),h=this.categoryAxis.options.reverse,o=v+(h?"2":"1"),h=this.categoryAxis.lineBox(),e=Math.abs(h[o]-e.x),h=h.width(),e=Lt(e/h,2),h=Lt(e*t),t=Lt((1-e)*t);if((a=this._state?this._state.range:a).from=Rt(Rt(n-h,0,s-1),i,r),a.to=Rt(Rt(s+t,a.from+1,r),i,r),a.from!==p.from||a.to!==p.to)return this.set(a.from,a.to),!0},up.prototype.trigger=function(t,e){return(this.observer||this.chart).trigger(t,e)},up);function up(t,e,o,i){cp.call(this);var r=t.element;this.options=j({},this.options,o),this.chart=t,this.observer=i,this.chartElement=r,this.categoryAxis=e,this._dateAxis=this.categoryAxis instanceof Ko,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())}zt(ft,{visible:!0,mousewheel:{zoom:"both"},min:c,max:l});var dp,gp,fp=ft,yp=((gp=G)&&(mp.__proto__=gp),((mp.prototype=Object.create(gp&&gp.prototype)).constructor=mp).prototype.show=function(t){var e,o;!t||!t.tooltipAnchor||this._current&&this._current===t||(e=j({},this.options,t.options.tooltip),(o=t.tooltipAnchor())?(this._current=t,gp.prototype.show.call(this,{point:t,anchor:o},e,t)):this.hide())},mp.prototype.hide=function(){delete this._current,gp.prototype.hide.call(this)},mp),ct=((dp=G)&&(vp.__proto__=dp),((vp.prototype=Object.create(dp&&dp.prototype)).constructor=vp).prototype.showAt=function(t,e){var o,i=ht(t,function(t){t=t.series.tooltip;return!t||!1!==t.visible});0<i.length&&(o=i[0],i=this.plotArea.categoryAxis.getSlot(o.categoryIx),i=e?this._slotAnchor(e,i):this._defaultAnchor(o,i),this.show({anchor:i,shared:!0,points:t,category:o.category,categoryText:this.formatService.auto(this.options.categoryFormat,o.category),series:this.plotArea.series},this.options))},vp.prototype._slotAnchor=function(t,e){return this.plotArea.categoryAxis.options.vertical||(t.x=e.center().x),{point:t,align:{horizontal:"left",vertical:"center"}}},vp.prototype._defaultAnchor=function(t,e){var o=t.owner.pane.chartsBox(),t=this.plotArea.categoryAxis.options.vertical,o=o.center(),e=e.center();return{point:t?new te(o.x,e.y):new te(e.x,o.y),align:{horizontal:"center",vertical:"center"}}},vp);function vp(t,e){dp.call(this,t.chartService,e),this.plotArea=t,this.formatService=t.chartService.format}function mp(){gp.apply(this,arguments)}zt(ct,{categoryFormat:"{0:d}"});var xp,wp=ct,Zt=((xp=P.drawing.Animation)&&(bp.__proto__=xp),((bp.prototype=Object.create(xp&&xp.prototype)).constructor=bp).prototype.setup=function(){var t,e=this.element,o=this.options;e.bbox()?(this.origin=o.origin,t=o.vertical?m:v,(o=this.fromScale=new P.geometry.Point(1,1))[t]=Ki,e.transform(P.geometry.transform().scale(o.x,o.y))):this.abort()},bp.prototype.step=function(t){var e=gt(this.fromScale.x,1,t),t=gt(this.fromScale.y,1,t);this.element.transform(P.geometry.transform().scale(e,t,this.origin))},bp.prototype.abort=function(){xp.prototype.abort.call(this),this.element.transform(null)},bp);function bp(){xp.apply(this,arguments)}zt(Zt,{duration:600}),P.drawing.AnimationFactory.current.register(tr,Zt);var _p,ue=((_p=P.drawing.Animation)&&(Ap.__proto__=_p),((Ap.prototype=Object.create(_p&&_p.prototype)).constructor=Ap).prototype.setup=function(){var t=this.center=this.element.bbox().center();this.element.transform(P.geometry.transform().scale(Ki,Ki,t))},Ap.prototype.step=function(t){this.element.transform(P.geometry.transform().scale(t,t,this.center))},Ap);function Ap(){_p.apply(this,arguments)}zt(ue,{easing:"easeOutElastic"}),P.drawing.AnimationFactory.current.register("bubble",ue);var Cp,bt=((Cp=P.drawing.Animation)&&(Sp.__proto__=Cp),((Sp.prototype=Object.create(Cp&&Cp.prototype)).constructor=Sp).prototype.setup=function(){this.fadeTo=this.element.opacity(),this.element.opacity(0)},Sp.prototype.step=function(t){this.element.opacity(t*this.fadeTo)},Sp);function Sp(){Cp.apply(this,arguments)}zt(bt,{duration:200,easing:"linear"}),P.drawing.AnimationFactory.current.register("fadeIn",bt);var kp,_e=((kp=P.drawing.Animation)&&(Pp.__proto__=kp),((Pp.prototype=Object.create(kp&&kp.prototype)).constructor=Pp).prototype.setup=function(){this.element.transform(P.geometry.transform().scale(Ki,Ki,this.options.center))},Pp.prototype.step=function(t){this.element.transform(P.geometry.transform().scale(t,t,this.options.center))},Pp);function Pp(){kp.apply(this,arguments)}zt(_e,{easing:"easeOutElastic",duration:600}),P.drawing.AnimationFactory.current.register(ir,_e);var Mp,Tp=_e,me=((Mp=Xn)&&(Bp.__proto__=Mp),((Bp.prototype=Object.create(Mp&&Mp.prototype)).constructor=Bp).prototype.render=function(){Mp.prototype.render.call(this),this.renderSegments()},Bp.prototype.createSegment=function(t,e,o){return new("smooth"===e.style?Vr:Mr)(t,e,o)},Bp.prototype.animationPoints=function(){return Mp.prototype.animationPoints.call(this).concat(this._segments)},Bp.prototype.createMissingValue=function(t,e){if(e===$i){t={x:t.x,y:t.y};return Fn(t.x)||(t.x=0),Fn(t.y)||(t.y=0),t}},Bp);function Bp(){Mp.apply(this,arguments)}j(me.prototype,qt);var Rp,Op=me,N=((Rp=Es)&&(Ip.__proto__=Rp),((Ip.prototype=Object.create(Rp&&Rp.prototype)).constructor=Ip).prototype.initFields=function(){this.namedXAxes={},this.namedYAxes={},this.xAxisRangeTracker=new en,this.yAxisRangeTracker=new en},Ip.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"]||[];this.addToLegend(r);r=this.filterVisibleSeries(r);r&&(this.createScatterChart(ks(r,"scatter"),i),this.createScatterLineChart(ks(r,"scatterLine"),i),this.createBubbleChart(ks(r,"bubble"),i))}this.createAxes(t)},Ip.prototype.appendChart=function(t,e){this.xAxisRangeTracker.update(t.xAxisRanges),this.yAxisRangeTracker.update(t.yAxisRanges),Rp.prototype.appendChart.call(this,t,e)},Ip.prototype.removeAxis=function(t){var e=t.options.name;Rp.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},Ip.prototype.seriesPaneName=function(t){var e=this.options,o=t.xAxis,i=ht([].concat(e.xAxis),function(t){return t.name===o})[0],r=t.yAxis,t=ht([].concat(e.yAxis),function(t){return t.name===r})[0],e=(e.panes||[{}])[0].name||"default";return(i||{}).pane||(t||{}).pane||e},Ip.prototype.createScatterChart=function(t,e){0<t.length&&this.appendChart(new Xn(this,{series:t,clip:e.options.clip}),e)},Ip.prototype.createScatterLineChart=function(t,e){0<t.length&&this.appendChart(new Op(this,{series:t,clip:e.options.clip}),e)},Ip.prototype.createBubbleChart=function(t,e){0<t.length&&this.appendChart(new $n(this,{series:t,clip:e.options.clip}),e)},Ip.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=j({reverse:!e&&this.chartService.rtl},t,{vertical:e}),p=Ss(a.type,"log"),h=s.query(),t=p?{min:.1,max:1}:{min:0,max:1},t=s.query(r)||h||t,l=[a.min,a.max],c=this.series,u=0;u<c.length;u++){var d=c[u],g=d[e?"yAxis":"xAxis"];if(g===a.name||0===o&&!g){d=Yi.current.bindPoint(d,0).valueFields;l.push(d[e?"y":"x"]);break}}0===o&&h&&(t.min=Math.min(t.min,h.min),t.max=Math.max(t.max,h.max));for(var f=0;f<l.length;f++)if(l[f]instanceof Date){i=!0;break}t=new(Ss(a.type,y)||!a.type&&i?hi:p?gi:si)(t.min,t.max,a,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},Ip.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++)dt(this.findPane(o[s].pane),t)&&i.push(this.createXYAxis(o[s],!1,s));for(var a=0;a<r.length;a++)dt(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]},Ip.prototype._dispatchEvent=function(t,e,o){for(var i=t._eventCoordinates(e),r=new te(i.x,i.y),n=this.axes,s=n.length,a=[],p=[],h=0;h<s;h++){var l=n[h],c=l.options.vertical?p:a,l=l.getValue(r);null!==l&&c.push(l)}0<a.length&&0<p.length&&t.trigger(o,{element:Mt(e),originalEvent:e,x:Ts(a),y:Ts(p)})},Ip.prototype.updateAxisOptions=function(t,e){var o=t.options.vertical,i=this.groupAxes(this.panes),t=(o?i.y:i.x).indexOf(t);Lp(this.options,t,o,e),Lp(this.originalOptions,t,o,e)},Ip);function Ip(){Rp.apply(this,arguments)}function Lp(t,e,o,i){j([].concat(o?t.yAxis:t.xAxis)[e],i)}zt(N,{xAxis:{},yAxis:{}}),j(N.prototype,Hs);var Vp,jp=N,ke=((Vp=be)&&(Ep.__proto__=Vp),((Ep.prototype=Object.create(Vp&&Vp.prototype)).constructor=Ep).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,t=nt(o),e=this.pointData(),t?r=t(e):o.format&&(r=i.format.auto(o.format,r)),o.visible&&(r||0===r)&&(o.position===A||"insideEnd"===o.position?(o.color||(o.color=Wt(this.options.color)),o.background||(o.background=this.options.color)):(i=i.theme.seriesDefaults.labels,o.color=o.color||i.color,o.background=o.background||i.background),this.label=new Ne(r,j({},o,{align:A,vAlign:"",animation:{type:"fadeIn",delay:this.animationDelay}}),e),this.append(this.label)))},Ep.prototype.reflow=function(t){this.render(),this.box=t,this.reflowLabel()},Ep.prototype.reflowLabel=function(){var t,e,o,i,r=this.options.labels,n=this.label,s=this.sector.clone(),a=r.distance,p=s.middle();n&&(e=n.box.height(),o=n.box.width(),r.position===A?(s.radius=Math.abs((s.radius-e)/2)+e,t=s.point(p),n.reflow(new re(t.x,t.y-e/2,t.x,t.y))):"insideEnd"===r.position?(s.radius=s.radius-e/2,t=s.point(p),n.reflow(new re(t.x,t.y-e/2,t.x,t.y))):((t=s.clone().expand(a).point(p)).x>=s.center.x?(i=t.x+o,n.orientation=S):(i=t.x-o,n.orientation=C),n.reflow(new re(i,t.y-e,t.x,t.y))))},Ep.prototype.createVisual=function(){var t,e=this,o=this.sector,i=this.options;Vp.prototype.createVisual.call(this),this.value&&(i.visual?(t=(o.startAngle+180)%360,(i=i.visual({category:this.category,dataItem:this.dataItem,value:this.value,series:this.series,percentage:this.percentage,center:new P.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 P.drawing.Group;return e.createSegmentVisual(t),t}}))&&this.visual.append(i)):this.createSegmentVisual(this.visual))},Ep.prototype.createSegmentVisual=function(t){var e=this.sector,o=this.options,i=o.border||{},r=0<i.width?{stroke:{color:i.color,width:i.width,opacity:i.opacity,dashType:i.dashType}}:{},n=o.color,i={color:n,opacity:o.opacity},r=this.createSegment(e,j({fill:i,stroke:{opacity:o.opacity},zIndex:o.zIndex},r));t.append(r),pn(o)&&t.append(this.createGradientOverlay(r,{baseColor:n,fallbackFill:i},j({center:[e.center.x,e.center.y],innerRadius:e.innerRadius,radius:e.radius,userSpace:!0},o.overlay)))},Ep.prototype.createSegment=function(t,e){return e.singleSegment?new P.drawing.Circle(new P.geometry.Circle(new P.geometry.Point(t.center.x,t.center.y),t.radius),e):ve.current.createRing(t,e)},Ep.prototype.createAnimation=function(){var t=this.options,e=this.sector.center;j(t,{animation:{center:[e.x,e.y],delay:this.animationDelay}}),Vp.prototype.createAnimation.call(this)},Ep.prototype.createHighlight=function(t){var e=this.options.highlight||{},o=e.border||{};return this.createSegment(this.sector,j({},t,{fill:{color:e.color,opacity:e.opacity},stroke:{opacity:o.opacity,width:o.width,color:o.color}}))},Ep.prototype.highlightVisual=function(){return this.visual.children[0]},Ep.prototype.highlightVisualArgs=function(){var t=this.sector;return{options:this.options,radius:t.radius,innerRadius:t.innerRadius,center:new P.geometry.Point(t.center.x,t.center.y),startAngle:t.startAngle,endAngle:t.angle+t.startAngle,visual:this.visual}},Ep.prototype.tooltipAnchor=function(){var t=this.sector.clone().expand(5),e=t.middle();return{point:t.point(e),align:(t=It(e+180),e=Lt(Math.sin(t),f),t=Lt(Math.cos(t),f),{horizontal:Math.abs(e)>zp?A:t<0?S:C,vertical:Math.abs(e)<Dp?A:e<0?_:k})}},Ep.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Ep.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,series:this.series,percentage:this.percentage}},Ep),Dp=Lt(It(30),f),zp=Lt(It(60),f);function Ep(t,e,o){Vp.call(this,o),this.value=t,this.sector=e}zt(ke,{color:a,overlay:{gradient:"roundedBevel"},border:{width:.5},labels:{visible:!1,distance:35,font:"12px sans-serif",margin:U(.5),align:u,zIndex:1,position:"outsideEnd"},animation:{type:ir},highlight:{visible:!0,border:{width:1}},visible:!0}),j(ke.prototype,Ar);var Hp,Up=ke,Fp={createLegendItem:function(t,e,o){var i,r,n=this.options.legend||{},s=n.labels||{},a=n.inactiveItems||{},p=a.labels||{};o&&!1!==o.visibleInLegend&&(n=!(r=!1!==o.visible)&&nt(p)||nt(s),s=o.category,n&&(s=n({text:s,series:o.series,dataItem:o.dataItem,percentage:o.percentage,value:t})),a=r?(i={},e.color):(i={color:p.color,font:p.font},(a.markers||{}).color),Fn(s)&&""!==s&&this.legendItems.push({active:r,pointIndex:o.index,text:s,series:o.series,markerColor:a,labels:i}))}},q=((Hp=be)&&(Gp.__proto__=Hp),((Gp.prototype=Object.create(Hp&&Hp.prototype)).constructor=Gp).prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},Gp.prototype.traverseDataPoints=function(t){for(var e=this.options,o=this.plotArea.options.seriesColors,i=(o=void 0===o?[]:o).length,r=e.series,n=r.length,s=0;s<n;s++){var a=r[s],p=a.data,h=Cs(a),l=h.total,c=h.points,h=h.count,u=360/l,d=void 0;isFinite(u)||(d=360/h);var g=void 0,g=(Ct(a.startAngle)?a:e).startAngle;s!==n-1&&"outsideEnd"===a.labels.position&&(a.labels.position=A);for(var f=0;f<c.length;f++){var y,v,m,x,w,b=c[f];b&&(y=b.fields,v=b.value,m=b.visible,x=0!==v?d||v*u:0,w=1!==p.length&&Boolean(y.explode),I(a.color)||(a.color=y.color||o[f%i]),t(b.valueFields.value,new le(null,0,0,g,x),{owner:this,category:Ct(y.category)?y.category:"",index:f,series:a,seriesIx:s,dataItem:p[f],percentage:0!==l?v/l:0,explode:w,visibleInLegend:y.visibleInLegend,visible:m,zIndex:n-s,animationDelay:this.animationDelay(f,s,n)}),!1!==m&&(g+=x))}}},Gp.prototype.evalSegmentOptions=function(t,e,o){var i=o.series;vr(t,{value:e,series:i,dataItem:o.dataItem,category:o.category,percentage:o.percentage},{defaults:i._defaults,excluded:["data","content","template","visual","toggle"]})},Gp.prototype.addValue=function(t,e,o){var i=j({},o.series,{index:o.index});this.evalSegmentOptions(i,t,o),this.createLegendItem(t,i,o),!1!==o.visible&&(i=new Up(t,e,i),Object.assign(i,o),this.append(i),this.points.push(i))},Gp.prototype.reflow=function(t){var e=this.options,o=this.points,i=this.seriesConfigs;void 0===i&&(i=[]);var r=o.length,n=t.clone(),s=Math.min(n.width(),n.height()),a=s/2,p=s-.85*s,h=new re(n.x1,n.y1,n.x1+s,n.y1+s),s=h.center(),n=n.center(),l=e.series.length,c=[],u=[],p=jt(e.padding,p);this.targetBox=t,p=a-5<p?a-5:p,h.translate(n.x-s.x,n.y-s.y);for(var d=a-p,g=new te(d+h.x1+p,d+h.y1+p),f=0;f<r;f++){var y,v=o[f],m=v.sector,x=v.seriesIx;m.radius=d,m.center=g,i.length&&(y=i[x],m.innerRadius=y.innerRadius,m.radius=y.radius),x===l-1&&v.explode&&(m.center=m.clone().setRadius(.15*m.radius).point(m.middle())),v.reflow(h);v=v.label;v&&"outsideEnd"===v.options.position&&x===l-1&&(v.orientation===S?u:c).push(v)}0<c.length&&(c.sort(this.labelComparator(!0)),this.leftLabelsReflow(c)),0<u.length&&(u.sort(this.labelComparator(!1)),this.rightLabelsReflow(u)),this.box=h},Gp.prototype.leftLabelsReflow=function(t){var e=this.distanceBetweenLabels(t);this.distributeLabels(e,t)},Gp.prototype.rightLabelsReflow=function(t){var e=this.distanceBetweenLabels(t);this.distributeLabels(e,t)},Gp.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=Lt(n.y1-(o.center.y-e-n.height()-n.height()/2));r.push(s);for(var a=0;a<i;a++){var p=t[a+1].box,n=t[a].box,s=Lt(p.y1-n.y2);r.push(s)}return s=Lt(o.center.y+e-t[i].box.y2-t[i].box.height()/2),r.push(s),r},Gp.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)},Gp.prototype._takeDistance=function(t,e,o,i){var r=i;return 0<t[o]&&(r-=i=Math.min(t[o],r),t[o]-=i,t[e]+=i),r},Gp.prototype.reflowLabels=function(t,e){var o,i=Bt(this.points),r=i.sector,n=i.options.labels,s=e.length,a=n.distance,p=r.center.y-(r.radius+a)-e[0].box.height();t[0]+=2;for(var h=0;h<s;h++){var l=e[h],c=l.box;p+=t[h],o=this.hAlignLabel(c.x2,r.clone().expand(a),p,p+c.height(),l.orientation===S),l.orientation===S?(n.align!==u&&(o=r.radius+r.center.x+a),l.reflow(new re(o+c.width(),p,o,p))):(n.align!==u&&(o=r.center.x-r.radius-a),l.reflow(new re(o-c.width(),p,o,p))),p+=c.height()}},Gp.prototype.createVisual=function(){var t=this.options.connectors,e=this.points,o=e.length;Hp.prototype.createVisual.call(this),this._connectorLines=[];for(var i=0;i<o;i++){var r,n,s,a,p,h,l,c=e[i],u=c.sector,d=c.label,g=u.middle(),f=(c.options.connectors||{}).color||t.color;d&&(r=new P.drawing.Path({stroke:{color:f,width:t.width},animation:{type:"fadeIn",delay:c.animationDelay}}),"outsideEnd"===d.options.position&&(n=d.box,s=u.center,l=u.point(g),a=new te(n.x1,n.center().y),f=h=p=void 0,l=u.clone().expand(t.padding).point(g),r.moveTo(l.x,l.y),d.orientation===S?(f=Np(s,l,a,h=new te(n.x1-t.padding,n.center().y)),a=new te(h.x-4,h.y),(f=f||a).x=Math.min(f.x,a.x),this.pointInCircle(f,u.center,u.radius+4)||f.x<u.center.x?(p=u.center.x+u.radius+4,c.options.labels.align===er||p<a.x?r.lineTo(p,l.y):r.lineTo(l.x+8,l.y),r.lineTo(a.x,h.y)):(f.y=h.y,r.lineTo(f.x,f.y))):(f=Np(s,l,a,h=new te(n.x2+t.padding,n.center().y)),a=new te(h.x+4,h.y),(f=f||a).x=Math.max(f.x,a.x),this.pointInCircle(f,u.center,u.radius+4)||f.x>u.center.x?(p=u.center.x-u.radius-4,c.options.labels.align===er||p>a.x?r.lineTo(p,l.y):r.lineTo(l.x-8,l.y),r.lineTo(a.x,h.y)):(f.y=h.y,r.lineTo(f.x,f.y))),r.lineTo(h.x,h.y),this._connectorLines.push(r),this.visual.append(r)))}},Gp.prototype.renderVisual=function(){var t,e,o,i;Hp.prototype.renderVisual.call(this),Ht(this.options.series,function(t){return t.autoFit})&&(t=this.targetBox,e=this.box.center(),(o=this.visual.bbox())&&(i=o.bottomRight(),(i=Math.min((e.y-t.y1)/(e.y-o.origin.y),(t.y2-e.y)/(i.y-e.y),(e.x-t.x1)/(e.x-o.origin.x),(t.x2-e.x)/(i.x-e.x)))<1&&this.visual.transform(P.geometry.transform().scale(i,i,[e.x,e.y]))))},Gp.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}},Gp.prototype.hAlignLabel=function(t,e,o,i,r){var n=e.radius,s=e.center,e=s.x,s=s.y,i=Math.min(Math.abs(s-o),Math.abs(s-i));return n<i?t:e+Math.sqrt(n*n-i*i)*(r?1:-1)},Gp.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)},Gp.prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value)},Gp.prototype.animationDelay=function(t){return 70*t},Gp.prototype.stackRoot=function(){return this},Gp);function Gp(t,e){Hp.call(this,e),this.plotArea=t,this.chartService=t.chartService,this.points=[],this.legendItems=[],this.render()}function Np(t,e,o,i){var r,n=(i.x-o.x)*(t.y-o.y)-(i.y-o.y)*(t.x-o.x),o=(i.y-o.y)*(e.x-t.x)-(i.x-o.x)*(e.y-t.y);return r=0!=o?new te(t.x+(o=n/o)*(e.x-t.x),t.y+o*(e.y-t.y)):r}zt(q,{startAngle:90,connectors:{width:2,color:"#939393",padding:8},inactiveItems:{markers:{},labels:{}}}),j(q.prototype,Fp),q.prototype.isStackRoot=!0;var Wp,Xp,Yp=q,qp=((Xp=Es)&&(Zp.__proto__=Xp),((Zp.prototype=Object.create(Xp&&Xp.prototype)).constructor=Zp).prototype.render=function(){this.createPieChart(this.series)},Zp.prototype.createPieChart=function(t){var e=t[0],e=new Yp(this,{series:t,padding:e.padding,startAngle:e.startAngle,connectors:e.connectors,legend:this.options.legend});this.appendChart(e)},Zp.prototype.appendChart=function(t,e){Xp.prototype.appendChart.call(this,t,e),_t(this.options.legend.items,t.legendItems)},Zp),Y=((Wp=Up)&&(Qp.__proto__=Wp),((Qp.prototype=Object.create(Wp&&Wp.prototype)).constructor=Qp).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,r=i.point(r),o.reflow(new re(r.x,r.y-t/2,r.x,r.y))):Wp.prototype.reflowLabel.call(this))},Qp.prototype.createSegment=function(t,e){return ve.current.createRing(t,e)},Qp);function Qp(){Wp.apply(this,arguments)}function Zp(){Xp.apply(this,arguments)}zt(Y,{overlay:{gradient:"roundedGlass"},labels:{position:A},animation:{type:ir}}),j(Y.prototype,Ar);var Kp,$p=Y,K=((Kp=Yp)&&(Jp.__proto__=Kp),((Jp.prototype=Object.create(Kp&&Kp.prototype)).constructor=Jp).prototype.addValue=function(t,e,o){var i=j({},o.series,{index:o.index});this.evalSegmentOptions(i,t,o),this.createLegendItem(t,i,o),t&&!1!==o.visible&&(i=new $p(t,e,i),Object.assign(i,o),this.append(i),this.points.push(i))},Jp.prototype.reflow=function(t){for(var e,o=this.options,i=t.clone(),r=Math.min(i.width(),i.height()),i=r/2,n=o.series,s=n.length,r=jt(o.padding,r-.85*r),a=i-(r=i-5<r?i-5:r),p=0,h=0;h<s;h++){var l=n[h];0===h&&Ct(l.holeSize)&&(e=l.holeSize,a-=l.holeSize),Ct(l.size)?a-=l.size:p++,Ct(l.margin)&&h!==s-1&&(a-=l.margin)}Ct(e)||(a-=e=(i-r)/(s+.75)*.75);var c=e,u=0;this.seriesConfigs=[];for(var d=0;d<s;d++){var g=n[d],f=(c+=u)+jt(g.size,a/p);this.seriesConfigs.push({innerRadius:c,radius:f}),u=g.margin||0,c=f}Kp.prototype.reflow.call(this,t)},Jp.prototype.animationDelay=function(t,e,o){return 50*t+600*(e+1)/(o+1)},Jp);function Jp(){Kp.apply(this,arguments)}zt(K,{startAngle:90,connectors:{width:2,color:"#939393",padding:8}});var th,eh,oh,ih=K,rh=((oh=qp)&&(ah.__proto__=oh),((ah.prototype=Object.create(oh&&oh.prototype)).constructor=ah).prototype.render=function(){this.createDonutChart(this.series)},ah.prototype.createDonutChart=function(t){var e=t[0],e=new ih(this,{series:t,padding:e.padding,connectors:e.connectors,legend:this.options.legend});this.appendChart(e)},ah),Z=((eh=Es)&&(sh.__proto__=eh),((sh.prototype=Object.create(eh&&eh.prototype)).constructor=sh).prototype.initFields=function(){this.valueAxisRangeTracker=new en},sh.prototype.render=function(){this.addToLegend(this.series),this.createPolarAxis(),this.createCharts(),this.createValueAxis()},sh.prototype.alignAxes=function(){var t=this.valueAxis,e=t.range(),o=t.options.reverse?e.max:e.min,e=t.getSlot(o),o=this.polarAxis.getSlot(0).center,e=t.box.translate(o.x-e.x1,o.y-e.y1);t.reflow(e)},sh.prototype.createValueAxis=function(){var t,e=this.valueAxisRangeTracker,o=e.query(),i=this.valueAxisOptions({roundToMajorUnit:!1,zIndex:-1}),r="log"===i.type?(t=ki,{min:.1,max:1}):(t=Ci,{min:0,max:1}),r=e.query(name)||o||r;r&&o&&(r.min=Math.min(r.min,o.min),r.max=Math.max(r.max,o.max));i=new t(r.min,r.max,i,this.chartService);this.valueAxis=i,this.appendAxis(i)},sh.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()),r=U(t.padding||{},r),i=i.clone().unpad(r),r=i.clone();r.y2=r.y1+Math.min(r.width(),r.height()),r.align(i,m,A);i=r.clone().shrink(0,r.height()/2);o.reflow(r),e.reflow(i);i=e.lineBox().height()-e.box.height();e.reflow(e.box.unpad({top:i})),this.axisBox=r,this.alignAxes(r)},sh.prototype.backgroundBox=function(){return this.box},sh.prototype.detachLabels=function(){},sh),it=((th=Xn)&&(nh.__proto__=th),((nh.prototype=Object.create(th&&th.prototype)).constructor=nh).prototype.pointSlot=function(t,e){e=t.center.y-e.y1,e=te.onCircle(t.center,t.startAngle,e);return new re(e.x,e.y,e.x,e.y)},nh);function nh(){th.apply(this,arguments)}function sh(){eh.apply(this,arguments)}function ah(){oh.apply(this,arguments)}zt(it,{clip:!1});var ph,hh=it,ft=((ph=Op)&&(lh.__proto__=ph),(lh.prototype=Object.create(ph&&ph.prototype)).constructor=lh);function lh(){ph.apply(this,arguments)}ft.prototype.pointSlot=hh.prototype.pointSlot,zt(ft,{clip:!1});var ch,uh,dh=ft,gh=((uh=Jr)&&(vh.__proto__=uh),((vh.prototype=Object.create(uh&&uh.prototype)).constructor=vh).prototype.fillToAxes=function(t){var e=this._polarAxisCenter();t.lineTo(e.x,e.y)},vh.prototype._polarAxisCenter=function(){return this.parent.plotArea.polarAxis.box.center()},vh.prototype.strokeSegments=function(){var t,e,o,i=this._strokeSegments;return i||(t=this._polarAxisCenter(),e=new Bi(!1),(o=this.points()).push(t),(i=this._strokeSegments=e.process(o)).pop()),i},vh),fh=((ch=Wr)&&(yh.__proto__=ch),((yh.prototype=Object.create(ch&&ch.prototype)).constructor=yh).prototype.fillToAxes=function(t){var e=this.parent.plotArea.polarAxis.box.center(),e=new P.geometry.Segment([e.x,e.y]);t.segments.unshift(e),t.segments.push(e)},yh);function yh(){ch.apply(this,arguments)}function vh(){uh.apply(this,arguments)}function mh(t,e){return t.value.x-e.value.x}var xh,wh,bh=((wh=dh)&&(Ah.__proto__=wh),((Ah.prototype=Object.create(wh&&wh.prototype)).constructor=Ah).prototype.createSegment=function(t,e,o){return new("smooth"===(e.line||{}).style?gh:fh)(t,e,o)},Ah.prototype.createMissingValue=function(t,e){var o;return Fn(t.x)&&e!==Ji&&(o={x:t.x,y:t.y},e===$i&&(o.y=0)),o},Ah.prototype.seriesMissingValues=function(t){return t.missingValues||$i},Ah.prototype._hasMissingValuesGap=function(){for(var t=this.options.series,e=0;e<t.length;e++)if("gap"===this.seriesMissingValues(t[e]))return!0},Ah.prototype.sortPoints=function(t){if(t.sort(mh),this._hasMissingValuesGap())for(var e=0;e<t.length;e++){var o=t[e];o&&(Fn(o.value.y)||"gap"!==this.seriesMissingValues(o.series)||delete t[e])}return t},Ah),G=((xh=Z)&&(_h.__proto__=xh),((_h.prototype=Object.create(xh&&xh.prototype)).constructor=_h).prototype.createPolarAxis=function(){var t=new xi(this.options.xAxis,this.chartService);this.polarAxis=t,this.axisX=t,this.appendAxis(t)},_h.prototype.valueAxisOptions=function(t){return j(t,{majorGridLines:{type:d},minorGridLines:{type:d}},this.options.yAxis)},_h.prototype.createValueAxis=function(){xh.prototype.createValueAxis.call(this),this.axisY=this.valueAxis},_h.prototype.appendChart=function(t,e){this.valueAxisRangeTracker.update(t.yAxisRanges),Es.prototype.appendChart.call(this,t,e)},_h.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createLineChart(ks(t,["polarLine"]),e),this.createScatterChart(ks(t,["polarScatter"]),e),this.createAreaChart(ks(t,["polarArea"]),e)},_h.prototype.createLineChart=function(t,e){0!==t.length&&(t=new dh(this,{series:t}),this.appendChart(t,e))},_h.prototype.createScatterChart=function(t,e){0!==t.length&&(t=new hh(this,{series:t}),this.appendChart(t,e))},_h.prototype.createAreaChart=function(t,e){0!==t.length&&(t=new bh(this,{series:t}),this.appendChart(t,e))},_h.prototype._dispatchEvent=function(t,e,o){var i=t._eventCoordinates(e),r=new te(i.x,i.y),i=this.axisX.getValue(r),r=this.axisY.getValue(r);null!==i&&null!==r&&t.trigger(o,{element:Mt(e),x:i,y:r})},_h.prototype.createCrosshairs=function(){},_h);function _h(){xh.apply(this,arguments)}function Ah(){wh.apply(this,arguments)}zt(G,{xAxis:{},yAxis:{}}),j(G.prototype,Hs);var Ch,ct=G,Zt=((Ch=Nr)&&(Sh.__proto__=Ch),((Sh.prototype=Object.create(Ch&&Ch.prototype)).constructor=Sh).prototype.pointSlot=function(t,e){e=t.center.y-e.y1,e=te.onCircle(t.center,t.middle(),e);return new re(e.x,e.y,e.x,e.y)},Sh.prototype.renderSegments=function(){if(Ch.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],i=Bt(n),r=Bt(i.linePoints),i=0===o.categoryIx,r=r.categoryIx===r.categoriesCount-1,i&&r&&Bt(n).linePoints.push(o))}},Sh.prototype.createSegment=function(t,e,o){var i=new("smooth"===e.style?Vr:Mr)(t,e,o),o=this.seriesMissingValues(e);return t.length!==e.data.length&&o!==Ji||(i.options.closed=!0),i},Sh);function Sh(){Ch.apply(this,arguments)}zt(Zt,{clip:!1,limitPoints:!1});var kh,Ph,Mh,Th,Bh=Zt,Rh=((Th=Jr)&&(Dh.__proto__=Th),((Dh.prototype=Object.create(Th&&Th.prototype)).constructor=Dh).prototype.fillToAxes=function(){},Dh),Oh=((Mh=Wr)&&(jh.__proto__=Mh),((jh.prototype=Object.create(Mh&&Mh.prototype)).constructor=jh).prototype.fillToAxes=function(){},jh),Ih=((Ph=Bh)&&(Vh.__proto__=Ph),((Vh.prototype=Object.create(Ph&&Ph.prototype)).constructor=Vh).prototype.createSegment=function(t,e,o,i){var r,n,s,a=this.options.isStacked,p=(e.line||{}).style;return a&&0<o&&i&&(n=i.linePoints.slice(0),r=i),"smooth"===p?(s=new Rh(t,e,o,r,n)).options.closed=!0:(t.push(t[0]),s=new Oh(t,e,o,r,n)),s},Vh.prototype.seriesMissingValues=function(t){return t.missingValues||$i},Vh),ue=((kh=$p)&&(Lh.__proto__=kh),(Lh.prototype=Object.create(kh&&kh.prototype)).constructor=Lh);function Lh(t,e){kh.call(this,t,null,e)}function Vh(){Ph.apply(this,arguments)}function jh(){Mh.apply(this,arguments)}function Dh(){Th.apply(this,arguments)}zt(ue,{overlay:{gradient:"none"},labels:{distance:10}});var zh,Eh=ue,bt=((zh=be)&&(Hh.__proto__=zh),((Hh.prototype=Object.create(zh&&zh.prototype)).constructor=Hh).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})},Hh);function Hh(t){zh.call(this,t),this.forEach=t.rtl?dn:un}zt(bt,{gap:1,spacing:0});var Uh,Fh,Gh=bt,Nh=((Fh=be)&&(Xh.__proto__=Fh),((Xh.prototype=Object.create(Fh&&Fh.prototype)).constructor=Xh).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 re;for(var s=r;0<=s&&s<i;s+=n){var a=o[s].sector;a.startAngle=t.startAngle,a.angle=t.angle}},Xh),_e=((Uh=An)&&(Wh.__proto__=Uh),((Wh.prototype=Object.create(Uh&&Uh.prototype)).constructor=Wh).prototype.pointType=function(){return Eh},Wh.prototype.clusterType=function(){return Gh},Wh.prototype.stackType=function(){return Nh},Wh.prototype.categorySlot=function(t,e){return t.getSlot(e)},Wh.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},Wh.prototype.reflowPoint=function(t,e){t.sector=e,t.reflow()},Wh.prototype.createAnimation=function(){this.options.animation.center=this.box.toRect().center(),Uh.prototype.createAnimation.call(this)},Wh);function Wh(){Uh.apply(this,arguments)}function Xh(){Fh.apply(this,arguments)}_e.prototype.reflow=_r.prototype.reflow,zt(_e,{clip:!1,limitPoints:!1,animation:{type:"pie"}});var Yh,qh=_e,qt=((Yh=Z)&&(Qh.__proto__=Yh),((Qh.prototype=Object.create(Yh&&Yh.prototype)).constructor=Qh).prototype.createPolarAxis=function(){var t=new vi(this.options.categoryAxis,this.chartService);this.polarAxis=t,this.categoryAxis=t,this.appendAxis(t),this.aggregateCategories(),this.createCategoryAxesLabels()},Qh.prototype.valueAxisOptions=function(t){return this._hasBarCharts&&j(t,{majorGridLines:{type:d},minorGridLines:{type:d}}),this._isStacked100&&j(t,{roundToMajorUnit:!1,labels:{format:"P0"}}),j(t,this.options.valueAxis)},Qh.prototype.aggregateCategories=function(){La.prototype.aggregateCategories.call(this,this.panes)},Qh.prototype.createCategoryAxesLabels=function(){La.prototype.createCategoryAxesLabels.call(this,this.panes)},Qh.prototype.filterSeries=function(t){return t},Qh.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createAreaChart(ks(t,["radarArea"]),e),this.createLineChart(ks(t,["radarLine"]),e),this.createBarChart(ks(t,["radarColumn"]),e)},Qh.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},Qh.prototype.createAreaChart=function(t,e){0!==t.length&&(t=new Ih(this,this.chartOptions(t)),this.appendChart(t,e))},Qh.prototype.createLineChart=function(t,e){0!==t.length&&(t=new Bh(this,this.chartOptions(t)),this.appendChart(t,e))},Qh.prototype.createBarChart=function(t,e){var o;0!==t.length&&(o=t[0],(t=this.chartOptions(t)).gap=o.gap,t.spacing=o.spacing,t=new qh(this,t),this.appendChart(t,e),this._hasBarCharts=!0)},Qh.prototype.seriesCategoryAxis=function(){return this.categoryAxis},Qh.prototype._dispatchEvent=function(t,e,o){var i=t._eventCoordinates(e),r=new te(i.x,i.y),i=this.categoryAxis.getCategory(r),r=this.valueAxis.getValue(r);null!==i&&null!==r&&t.trigger(o,{element:Mt(e),category:i,value:r})},Qh.prototype.createCrosshairs=function(){},Qh);function Qh(){Yh.apply(this,arguments)}j(qt.prototype,Hs,{appendChart:La.prototype.appendChart,aggregateSeries:La.prototype.aggregateSeries,seriesSourcePoints:La.prototype.seriesSourcePoints}),zt(qt,{categoryAxis:{categories:[]},valueAxis:{}});var Zh,me=qt,N=((Zh=be)&&(Kh.__proto__=Zh),((Kh.prototype=Object.create(Zh&&Zh.prototype)).constructor=Kh).prototype.reflow=function(t){var e=this.points,o=this.children[0];this.box=new re(e[0].x,e[0].y,e[1].x,e[2].y),o&&o.reflow(new re(t.x1,e[0].y,t.x2,e[2].y))},Kh.prototype.createVisual=function(){var t=this,e=this.options;Zh.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)},Kh.prototype.createPath=function(){var t=this.options,e=t.border;return P.drawing.Path.fromPoints(this.points,{fill:{color:t.color,opacity:t.opacity},stroke:{color:e.color,opacity:e.opacity,width:e.width}}).close()},Kh.prototype.createHighlight=function(t){return P.drawing.Path.fromPoints(this.points,t)},Kh.prototype.highlightVisual=function(){return this.visual.children[0]},Kh.prototype.highlightVisualArgs=function(){var t=P.drawing.Path.fromPoints(this.points).close();return{options:this.options,path:t}},Kh.prototype.tooltipAnchor=function(){var t=this.box;return{point:new te(t.center().x,t.y1),align:{horizontal:"center",vertical:"top"}}},Kh.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Kh);function Kh(t,e,o){Zh.call(this,e),this.value=t,this.options.index=o.index}zt(N,{color:a,border:{width:1}}),j(N.prototype,Ar);var $h,Jh=N,ke=(($h=be)&&(tl.__proto__=$h),((tl.prototype=Object.create($h&&$h.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;void 0===e&&(e=[]);var o=t.series[0],i=o.data;if(i)for(var t=Cs(o),r=t.total,n=t.points,s=0;s<n.length;s++){var a,p,h=n[s];h&&(p=h.fields,I(o.color)||(o.color=p.color||e[s%e.length]),p=j({index:s,owner:this,series:o,dataItem:i[s],percentage:h.value/r},p,{visible:h.visible}),a=h.valueFields.value,h=this.createSegment(a,p),p=this.createLabel(a,p),h&&p&&h.append(p))}},tl.prototype.evalSegmentOptions=function(t,e,o){var i=o.series;vr(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=j({},e.series);if(this.evalSegmentOptions(o,t,e),this.createLegendItem(t,o,e),!1!==e.visible){o=new Jh(t,o,e);return Object.assign(o,e),this.append(o),this.points.push(o),o}},tl.prototype.createLabel=function(t,e){var o=e.series,i=e.dataItem,r=j({},this.options.labels,o.labels),n=t;if(r.visible){var s=nt(r),i={dataItem:i,value:t,percentage:e.percentage,category:e.category,series:o};s?n=s(i):r.format&&(n=this.plotArea.chartService.format.auto(r.format,n)),r.color||(r.color=Wt(o.color),r.background||(r.background=o.color)),this.evalSegmentOptions(r,t,e);i=new Ne(n,j({vAlign:r.position},r),i);return this.labels.push(i),i}},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===C?e.left=Math.max(e.left,i):e.right=Math.max(e.right,i))}return e},tl.prototype.dynamicSlopeReflow=function(t,e,o){for(var i=this.options,r=this.points,n=r.length,s=r[0],a=s,p=0;p<r.length;p++)r[p].percentage>a.percentage&&(a=r[p]);for(var h=s.percentage/a.percentage*e,l=(e-h)/2,c=0,u=0;u<n;u++){var d=r[u].percentage,g=r[u+1],f=g?g.percentage:d,y=r[u].points=[],v=i.dynamicHeight?o*d:o/n,g=Rt(d?(e-h*(f/d))/2:f?0:e/2,0,e);y.push(new P.geometry.Point(t.x1+l,t.y1+c)),y.push(new P.geometry.Point(t.x1+e-l,t.y1+c)),y.push(new P.geometry.Point(t.x1+e-g,t.y1+v+c)),y.push(new P.geometry.Point(t.x1+g,t.y1+v+c)),c+=v+i.segmentSpacing,h=Rt(e-2*(l=g),0,e)}},tl.prototype.constantSlopeReflow=function(t,e,o){for(var i=this.options,r=this.points,n=r.length,s=i.neckRatio<=1,a=s?i.neckRatio*e:e,p=s?0:(e-e/i.neckRatio)/2,h=((s?e:e-2*p)-a)/2,l=0,c=0;c<n;c++){var u=r[c].points=[],d=r[c].percentage,g=i.dynamicHeight?h*d:h/n,d=i.dynamicHeight?o*d:o/n;u.push(new P.geometry.Point(t.x1+p,t.y1+l)),u.push(new P.geometry.Point(t.x1+e-p,t.y1+l)),u.push(new P.geometry.Point(t.x1+e-p-g,t.y1+d+l)),u.push(new P.geometry.Point(t.x1+p+g,t.y1+d+l)),p+=g,l+=d+i.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){$h.call(this,e),this.plotArea=t,this.points=[],this.labels=[],this.legendItems=[],this.render()}zt(ke,{neckRatio:.3,width:300,dynamicSlope:!1,dynamicHeight:!0,segmentSpacing:0,labels:{visible:!1,align:A,position:A,zIndex:1}}),j(ke.prototype,Fp);var el,ol,il=ke,q=((ol=Es)&&(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],e=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(e)},nl.prototype.appendChart=function(t,e){ol.prototype.appendChart.call(this,t,e),_t(this.options.legend.items,t.legendItems)},nl),Y=((el=be)&&(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=nt(i),o=i.color,e=e?e(t):this.formatValue(i.format),o=o||Wt(this.color),this.label=new Ne(e,j({align:A,vAlign:A,margin:{left:5,right:5},zIndex:jt(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=this.options.markers,e=t.border,o=this.box.toRect(),i="roundedRect"===jt(t.type,"rect"),r=jt(e.width,i?1:0),e=Math.round(r/2);return t.size&&(i=o.center(),o.size.width=o.size.height=t.size,o.origin.x=Math.round(i.x-o.size.width/2),o.origin.y=Math.round(i.y-o.size.height/2)),o.size.width-=r,o.size.height-=r,o.origin.y+=e+.5,o.origin.x+=e+.5,He(o)},rl.prototype.markerBorder=function(){var t=this.options,e=t.markers.border,t=jt(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,t=new Me({type:jt(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:jt(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=t,this.append(t)},rl.prototype.createHighlight=function(t){var e=this.options,o=this.options.highlight.markers||this.options.markers,e=new Me({type:jt(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:jt(e.zIndex,this.series.zIndex)});e.reflow(this.markerBox());e=e.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 te(t,e),align:{horizontal:A,vertical:_}}},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||a,this.value=t}function nl(){ol.apply(this,arguments)}j(Y.prototype,Ar),j(Y.prototype,tt),Y.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=Y,K=((sl=be)&&(pl.__proto__=sl),((pl.prototype=Object.create(sl&&sl.prototype)).constructor=pl).prototype._initFields=function(){this.points=[],this.seriesOptions=[],this.valueRange={min:l,max:c},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;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&&(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];Ct(s)||(this._evalSeries[r]=s=vr(t,{},n,!0));r=t;return s&&vr(r=j({},t),{value:e,series:i,dataItem:o.dataItem,min:this.valueRange.min,max:this.valueRange.max},n),r},pl.prototype.pointType=function(){return al},pl.prototype.pointOptions=function(t,e){var o,i=this.seriesOptions[e];return i||(o=this.pointType().prototype.defaults,this.seriesOptions[e]=i=j({},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=e.series,i=this.pointOptions(o,e.seriesIx),r=e.color||o.color,i=this.evalPointOptions(i,t,e),r=I(o.color)?i.color:function(t,e){void 0===e&&(e=.05);var i=Object(P.parseColor)(t),r=1-e;return function(t){var e=i.toHSL(),o=100-e.l;return e.l+=Math.min((r-t)*o,o),e.toCss()}}(r)(t.value/this.valueRange.max),i=new al(t,i);return i.color=r,this.append(i),i},pl.prototype.seriesAxes=function(t){var e=t.xAxis,o=t.yAxis,i=this.plotArea,t=e?i.namedXAxes[e]:i.axisX,i=o?i.namedYAxes[o]:i.axisY;if(!t)throw new Error("Unable to locate X axis with name "+e);if(!i)throw new Error("Unable to locate Y axis with name "+o);return{xAxis:t,yAxis:i}},pl.prototype.reflow=function(t){var n=this,s=this.points,a=!this.options.clip,p=0;this.traverseDataPoints(function(t,e){var o=s[p++],i=n.seriesAxes(e.series),r=i.xAxis,e=i.yAxis,i=r.categoryIndex(t.x),t=e.categoryIndex(t.y),i=r.getSlot(i,i,a),t=e.getSlot(t,t,a);o&&(i&&t?(t=n.pointSlot(i,t),o.reflow(t)):o.visible=!1)}),this.box=t},pl.prototype.pointSlot=function(t,e){return new re(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(),p=s.currentRangeIndices(),h=0;h<i.data.length;h++){var l=this._bindPoint(i,o,h),c=l.valueFields,u=l.fields,d=n.totalIndex(c.x),l=s.totalIndex(c.y),d=a.min<=d&&d<=a.max,l=p.min<=l&&l<=p.max;d&&l&&t(c,j({pointIx:h,series:i,seriesIx:o,dataItem:i.data[h],owner:this},u))}},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){sl.call(this,e),this.plotArea=t,this.chartService=t.chartService,this._initFields(),this.render()}zt(K,{series:[],tooltip:{format:"{0}, {1}: {2}"},labels:{format:"{2}"},clip:!0}),j(K.prototype,{_bindPoint:_r.prototype._bindPoint});var hl,ll=K,it=((hl=Es)&&(cl.__proto__=hl),((cl.prototype=Object.create(hl&&hl.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],i=o.data||[],r=this.seriesAxes(o),n=r.xAxis,r=r.yAxis,s=Kt(n.categories||[]),a=Kt(r.categories||[]),p=0;p<i.length;p++){var h=Yi.current.bindPoint(o,p).valueFields,l=h.x,h=h.y;s.has(l)||s.add(l),a.has(h)||a.add(h)}n.categories=s.values(),r.categories=a.values()}},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"]||[];this.addToLegend(r);r=this.filterVisibleSeries(r);r&&this.createHeatmapChart(ks(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=ht([].concat(e.xAxis),function(t){return t.name===o})[0],r=t.yAxis,t=ht([].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,e=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(!e)throw new Error("Unable to locate Y axis with name "+r);return{xAxis:o,yAxis:e}},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,n=e?this.namedYAxes:this.namedXAxes,s=Object.assign({axisCrossingValue:0},t,{vertical:e,reverse:e||this.chartService.rtl?!t.reverse:t.reverse,justified:!1}),t=s.categories?s.categories[0]:null,a=[s.min,s.max,t],p=this.series,h=0;h<p.length;h++){var l=p[h],c=l[e?"yAxis":"xAxis"];if(c===s.name||0===o&&!c){l=Yi.current.bindPoint(l,0).valueFields;a.push(l[e?"y":"x"]);break}}for(var u=0;u<a.length;u++)if(a[u]instanceof Date){i=!0;break}t=new(Ss(s.type,y)||!s.type&&i?Ko:Uo)(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},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++)dt(this.findPane(o[s].pane),t)&&i.push(this.createXYAxis(o[s],!1,s));for(var a=0;a<r.length;a++)dt(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;hl.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 te(i.x,i.y),n=this.axes,s=n.length,a=[],p=[],h=0;h<s;h++){var l=n[h];_s(l.options.vertical?p:a,l.getCategory(r))}0<a.length&&0<p.length&&t.trigger(o,{element:Mt(e),originalEvent:e,x:Ts(a),y:Ts(p)})},cl.prototype.updateAxisOptions=function(t,e){var o=t.options.vertical,i=this.groupAxes(this.panes),t=(o?i.y:i.x).indexOf(t);ul(this.options,t,o,e),ul(this.originalOptions,t,o,e)},cl.prototype.crosshairOptions=function(t){return Object.assign({},t.options.crosshair,{zIndex:0})},cl);function cl(){hl.apply(this,arguments)}function ul(t,e,o,i){j([].concat(o?t.yAxis:t.xAxis)[e],i)}zt(it,{xAxis:{},yAxis:{}}),j(it.prototype,Hs);ft=it,G="color",Zt="first",ue="max";pp.current.register(La,[tr,er,or,rr,"area","verticalArea","candlestick","ohlc","bullet","verticalBullet","boxPlot","verticalBoxPlot","rangeColumn","rangeBar","waterfall","horizontalWaterfall","rangeArea","verticalRangeArea"]),pp.current.register(jp,["scatter","scatterLine","bubble"]),pp.current.register(qp,[ir]),pp.current.register(rh,["donut"]),pp.current.register(q,["funnel"]),pp.current.register(ct,["polarArea","polarLine","polarScatter"]),pp.current.register(me,["radarArea","radarColumn","radarLine"]),pp.current.register(ft,["heatmap"]),Yi.current.register([tr,er,or,rr,"area","verticalArea"],[h],["category",G,"noteText","errorLow","errorHigh"]),Yi.current.register(["rangeColumn","rangeBar","rangeArea","verticalRangeArea"],["from","to"],["category",G,"noteText"]),Yi.current.register(["waterfall","horizontalWaterfall"],[h],["category",G,"noteText","summary"]),Yi.current.register(["polarArea","polarLine","polarScatter"],[v,m],[G]),Yi.current.register(["radarArea","radarColumn","radarLine"],[h],[G]),Yi.current.register(["funnel"],[h],["category",G,"visibleInLegend","visible"]),Ys.current.register([tr,er,or,rr,"area","verticalArea","waterfall","horizontalWaterfall"],{value:ue,color:Zt,noteText:Zt,errorLow:"min",errorHigh:ue}),Ys.current.register(["rangeColumn","rangeBar","rangeArea","verticalRangeArea"],{from:"min",to:ue,color:Zt,noteText:Zt}),Ys.current.register(["radarArea","radarColumn","radarLine"],{value:ue,color:Zt}),Yi.current.register(["scatter","scatterLine","bubble"],[v,m],[G,"noteText","xErrorLow","xErrorHigh","yErrorLow","yErrorHigh"]),Yi.current.register(["bubble"],[v,m,"size"],[G,"category","noteText"]),Yi.current.register(["heatmap"],[v,m,h],[G,"noteText"]),Yi.current.register(["candlestick","ohlc"],["open","high","low","close"],["category",G,"downColor","noteText"]),Ys.current.register(["candlestick","ohlc"],{open:ue,high:ue,low:"min",close:ue,color:Zt,downColor:Zt,noteText:Zt}),Yi.current.register(["boxPlot","verticalBoxPlot"],["lower","q1","median","q3","upper","mean","outliers"],["category",G,"noteText"]),Ys.current.register(["boxPlot","verticalBoxPlot"],{lower:ue,q1:ue,median:ue,q3:ue,upper:ue,mean:ue,outliers:Zt,color:Zt,noteText:Zt}),Yi.current.register(["bullet","verticalBullet"],["current","target"],["category",G,"visibleInLegend","noteText"]),Ys.current.register(["bullet","verticalBullet"],{current:ue,target:ue,color:Zt,noteText:Zt}),Yi.current.register([ir,"donut"],[h],["category",G,"explode","visibleInLegend","visible"]);var dl,gl=["category",h,v,m],bt=((dl=P.Class)&&(fl.__proto__=dl),((fl.prototype=Object.create(dl&&dl.prototype)).constructor=fl).prototype._initElement=function(t){for(this._setElementClass(t),t.style.position="relative";t.firstChild;)t.removeChild(t.firstChild);this.element=t},fl.prototype._setElementClass=function(t){p(t,"k-chart")},fl.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,function(t){for(var e=gl,o=0;o<e.length;o++){var i=e[o]+"Axes";t[i]&&(t[e[o]+"Axis"]=t[i],delete t[i])}}(t),this.applyDefaults(t,e),null===t.seriesColors&&delete t.seriesColors,this.options=j({},e,t),this.applySeriesColors()},fl.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)}},fl.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&&Ht(this._selections,function(t){return!t.visible})&&(this._destroySelections(),this._setupSelection())},fl.prototype._resize=function(){this._noTransitionsRedraw()},fl.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()},fl.prototype.getAxis=function(t){return Li(t,this._plotArea.axes)},fl.prototype.findAxisByName=function(t){return this.getAxis(t)},fl.prototype.findPaneByName=function(t){for(var e=this._plotArea.panes,o=0;o<e.length;o++)if(e[o].options.name===t)return new ji(e[o])},fl.prototype.findPaneByIndex=function(t){var e=this._plotArea.panes;if(e[t])return new ji(e[t])},fl.prototype.plotArea=function(){return new Di(this._plotArea)},fl.prototype.toggleHighlight=function(t,e){var o,i=this._plotArea,r=(i.srcSeries||i.series||[])[0],n=I(e)?i.filterPoints(e):(D(e)?(n=e.series,o=e.category):n=o=e,"donut"===r.type?yl(i.pointsBySeriesName(n),o):r.type===ir||"funnel"===r.type?yl((i.charts[0]||{}).points,o):i.pointsBySeriesName(n));n&&this.togglePointsHighlight(t,n)},fl.prototype.togglePointsHighlight=function(t,e){for(var o=this._highlight,i=0;i<e.length;i++)o.togglePointHighlight(e[i],t)},fl.prototype.showTooltip=function(t){var e,o,i=this._sharedTooltip(),r=this._tooltip,n=this._plotArea;I(t)?(e=n.findPoint(t))&&i&&(o=e.categoryIx):i&&Ct(t)&&(o=n.categoryAxis.categoryIndex(t)),i?0<=o&&(o=this._plotArea.pointsByCategoryIndex(o),r.showAt(o)):e&&r.show(e)},fl.prototype.hideTooltip=function(){this._tooltip.hide()},fl.prototype._initSurface=function(){var t=this.surface,e=this._surfaceWrap(),o=this.options.chartArea||{};o.width&&Pt(e,{width:o.width}),o.height&&Pt(e,{height:o.height}),t&&t.options.type===this.options.renderAs?(this.surface.clear(),this.surface.resize()):(this._destroySurface(),this.surface=P.drawing.Surface.create(e,{type:this.options.renderAs}),this.surface.bind("mouseenter",this._surfaceMouseenterHandler),this.surface.bind("mouseleave",this._surfaceMouseleaveHandler))},fl.prototype._surfaceWrap=function(){return this.element},fl.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 Da,this._setupSelection(),this._createPannable(),this._createZoomSelection(),this._createMousewheelZoom(),this.trigger("render"),bl(this._plotArea.panes),this._navState||this._cancelDomEvents()},fl.prototype.exportVisual=function(t){var e,o;return t&&(t.width||t.height||t.options)?(e=this.options,o=j({},t.options,{chartArea:{width:t.width,height:t.height}}),wl(this._originalOptions,o),this.options=j({},this._originalOptions,o),this._initTheme(this.options,this._theme),this.bindCategories(),(o=this._getModel()).renderVisual(),bl(o._plotArea.panes),o=o.visual,this.options=e):o=this.surface.exportVisual(),o},fl.prototype._sharedTooltip=function(){return this._plotArea instanceof La&&this.options.tooltip&&this.options.tooltip.shared},fl.prototype._createPannable=function(){var t=this.options;!1!==t.pannable&&(this._pannable=new Na(this._plotArea,t.pannable))},fl.prototype._createZoomSelection=function(){var t=this.options.zoomable,e=(t||{}).selection;!1!==t&&!1!==e&&(this._zoomSelection=new Za(this,e))},fl.prototype._createMousewheelZoom=function(){var t=this.options.zoomable,e=(t||{}).mousewheel;!1!==t&&!1!==e&&(this._mousewheelZoom=new Ka(this,e))},fl.prototype._toggleDragZoomEvents=function(){var t=this.options.pannable,e=this.options.zoomable,o=(e||{}).selection,i=(e||{}).mousewheel,o=!(t||!1!==e&&!1!==o||this.requiresHandlers(["dragStart",sr,ar])),e=(!1===e||!1===i)&&!this.requiresHandlers(["zoomStart",pr,hr]),i=this.element;this._dragZoomEnabled&&o&&e?(i.style.touchAction=this._touchAction||"",this._dragZoomEnabled=!1):this._dragZoomEnabled||o&&e||(i.style.touchAction="none",this._dragZoomEnabled=!0),this._toggleDomEvents(!o,!e)},fl.prototype._toggleDomEvents=function(t,e){var o=this.domEvents;o&&(o.toggleDrag&&o.toggleDrag(t),o.toggleZoom&&o.toggleZoom(e))},fl.prototype._createTooltip=function(){var t=this.options.tooltip;return this._sharedTooltip()?this._createSharedTooltip(t):new yp(this.chartService,t)},fl.prototype._createSharedTooltip=function(t){return new wp(this._plotArea,t)},fl.prototype.applyDefaults=function(t,a){!function(t){var o,i,e,r=(a||{}).axisDefaults||{};function n(t){var e=(t||{}).color||i.color,t=j({},r,r[o],i,i[o],{line:{color:e},labels:{color:e},title:{color:e}},t);return delete t[o],t}for(var s=0;s<gl.length;s++)i=t.axisDefaults||{},e=(e=[].concat(t[o=gl[s]+"Axis"])).map(n),t[o]=1<e.length?e:e[0]}(t),function(t,e){var o=t.series,i=o.length,r=t.seriesDefaults,n=j({},t.seriesDefaults),s=e?j({},e.seriesDefaults):{},a=j({},s);vl(n),vl(a);for(var p=0;p<i;p++){var h=o[p].type||t.seriesDefaults.type,h=j({data:[]},a,s[h],{tooltip:t.tooltip},n,r[h]);o[p]._defaults=h,o[p]=j({},h,o[p]),o[p].data=o[p].data||[]}}(t,a)},fl.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)}},fl.prototype._getModel=function(){var t=this.options,e=this._createPlotArea(),o=new Ie(this._modelOptions());return o.chart=this,o._plotArea=e,qe.buildTitle(t.title,o),t.legend&&t.legend.visible&&o.append(new sp(e.options.legend,this.chartService)),o.append(e),o.reflow(),o},fl.prototype._modelOptions=function(){var t=this.options,e=this.getSize();return j({transitions:t.transitions,width:e.width||600,height:e.height||400},t.chartArea)},fl.prototype._createPlotArea=function(t){var e=this.options;return pp.current.create(t?[]:e.series,e,this.chartService)},fl.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 Uo&&n.select&&!n.vertical&&(i=r.range(),n=new fp(this,r,j({min:i.min,max:i.max},n.select)),e.push(n))}},fl.prototype._selectStart=function(t){return this.trigger("selectStart",t)},fl.prototype._select=function(t){return this.trigger("select",t)},fl.prototype._selectEnd=function(t){return this.trigger("selectEnd",t)},fl.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(P.throttle)(this._mousemove.bind(this),20)},fl.prototype.addObserver=function(t){t&&this.observers.push(t)},fl.prototype.removeObserver=function(t){t=this.observers.indexOf(t);0<=t&&this.observers.splice(t,1)},fl.prototype.requiresHandlers=function(t){for(var e=this.observers,o=0;o<e.length;o++)if(e[o].requiresHandlers(t))return!0},fl.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},fl.prototype._attachEvents=function(){var t,e=this.element;this._touchAction=e.style.touchAction,At(e,((t={}).contextmenu=this._clickHandler,t[lr]=this._mousewheelHandler,t.mouseleave=this._mouseleaveHandler,t)),this._shouldAttachMouseMove()&&At(e,((e={}).mousemove=this._mousemove,e)),this.domEvents=et.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()},fl.prototype._mouseleave=function(t){this._hoveredPoint&&(this._hoveredPoint.out(this,t),this._hoveredPoint=null),this._plotArea.hovered&&(this.trigger("plotAreaLeave"),this._plotArea.hovered=!1)},fl.prototype._cancelDomEvents=function(){this.domEvents&&this.domEvents.cancel&&this.domEvents.cancel()},fl.prototype._gesturestart=function(t){this._mousewheelZoom&&!this._stopChartHandlers(t)&&(this._gestureDistance=t.distance,this._unsetActivePoint(),this.surface.suspendTracking())},fl.prototype._gestureend=function(t){this._zooming&&!this._stopChartHandlers(t)&&(this.surface&&this.surface.resumeTracking(),this._zooming=!1,this.trigger(hr,{}))},fl.prototype._gesturechange=function(t){var e,o,i=this._mousewheelZoom;i&&!this._stopChartHandlers(t)&&(t.preventDefault(),o=this._gestureDistance,e=-t.distance/o+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(pr,o)&&i.zoom())))},fl.prototype._mouseout=function(t){var e;!t.element||(e=this._drawingChartElement(t.element,t))&&e.leave&&e.leave(this,t.originalEvent)},fl.prototype._start=function(t){var e=this._eventCoordinates(t);!this._stopChartHandlers(t)&&this._plotArea.backgroundContainsPoint(e)&&(this.requiresHandlers(["dragStart",sr,ar])&&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}))},fl.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(sr,{axisRanges:i,originalEvent:t})&&o.pan()}else if(e){for(var r={},n=e.axes,s=0;s<n.length;s++){var a,p=n[s];!p.options.name||0!=(a=(a=p.options.vertical?t.y:t.x).startLocation-a.location)&&(r[p.options.name]=p.translateRange(a))}e.axisRanges=r,this.trigger(sr,{axisRanges:r,originalEvent:t})}this._zoomSelection&&this._zoomSelection.move(t)}},fl.prototype._end=function(t){var e,o;this._stopChartHandlers(t)||((e=this._pannable)&&e.end(t)?(this.surface.resumeTracking(),this.trigger(ar,{axisRanges:ml(this._plotArea.axes),originalEvent:t}),this._suppressHover=!1,this.chartService.panning=!1):this._endNavigation(t,ar),this._zoomSelection&&(o=this._zoomSelection.end(t))&&!this.trigger(pr,{axisRanges:o,originalEvent:t})&&(this._zoomSelection.zoom(),this.trigger(hr,{axisRanges:o,originalEvent:t})))},fl.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},fl.prototype._mousewheelZoomRate=function(){var t=(this.options.zoomable||{}).mousewheel||{};return jt(t.rate,.3)},fl.prototype._mousewheel=function(t){var e=this,o=xt(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(pr,n)&&i.zoom(),this._mwTimeout=setTimeout(function(){e.trigger(hr,n),e._zooming=!1,e.surface&&e.surface.resumeTracking()},150))}else{i=this._navState;if(i=!i&&!this._startNavigation(t,r,"zoomStart")?this._navState:i){var s=i.totalDelta||o;i.totalDelta=s+o;for(var a=this._navState.axes,p={},h=0;h<a.length;h++){var l=a[h],c=l.options.name;c&&(p[c]=l.scaleRange(-s*this._mousewheelZoomRate(),r))}this.trigger(pr,{delta:o,axisRanges:p,originalEvent:t}),this._mwTimeout&&clearTimeout(this._mwTimeout),this._mwTimeout=setTimeout(function(){e._endNavigation(t,hr)},150)}}},fl.prototype._startNavigation=function(t,e,o){var i=this._model._plotArea,r=i.findPointPane(e),e=i.axes.slice(0);r&&(i=ml(e),this.trigger(o,{axisRanges:i,originalEvent:t})?this._cancelDomEvents():(this._suppressHover=!0,this._unsetActivePoint(),this._navState={axisRanges:i,pane:r,axes:e}))},fl.prototype._endNavigation=function(t,e){this._navState&&(this.trigger(e,{axisRanges:this._navState.axisRanges,originalEvent:t}),this._suppressHover=!1,this._navState=null)},fl.prototype._getChartElement=function(t,e){var o=this.surface.eventTarget(t);if(o)return this._drawingChartElement(o,t,e)},fl.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},fl.prototype._eventCoordinates=function(t){t=Tt(t);return this._toModelCoordinates(t.x,t.y)},fl.prototype._elementPadding=function(){var t,e;return this._padding||(t=(e=H(this.element,["paddingLeft","paddingTop"])).paddingLeft,e=e.paddingTop,this._padding={top:e,left:t}),this._padding},fl.prototype._toDocumentCoordinates=function(t){var e=this._elementPadding(),o=kt(this.element);return{left:Lt(t.x+e.left+o.left),top:Lt(t.y+e.top+o.top)}},fl.prototype._toModelCoordinates=function(t,e){var o=this.element,i=kt(o),r=this._elementPadding(),o=Nt(o).invert(),o=new P.geometry.Point(t-i.left-r.left,e-i.top-r.top).transform(o);return new te(o.x,o.y)},fl.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)},fl.prototype._click=function(t){var e=this._getChartElement(t);this._propagateClick(e,t)},fl.prototype._propagateClick=function(t,e){for(var o=t;o;)o.click&&o.click(this,e),o=o.parent},fl.prototype._startHover=function(t,e){if(this._suppressHover)return!1;var o=this._drawingChartElement(t,e,function(t){return(t.hover||t.over)&&!(t instanceof Es)}),i=this._activePoint,r=1<this._plotArea.series.length,t=this._hasInactiveOpacity();return this._updateHoveredPoint(o,e),o&&i!==o&&o.hover?(this._activePoint=o,this._sharedTooltip()||o.hover(this,e)||(this._displayTooltip(o),t?this._displayInactiveOpacity(o,r):this._highlight.show(o))):!o&&t&&(r&&this._activeChartInstance&&(this._updateSeriesOpacity(o,!0),this._applySeriesOpacity(this._activeChartInstance.children,null,!0),this._activeChartInstance=null),this._highlight&&this._highlight.hide(),this._activePoint=null),o},fl.prototype._displayTooltip=function(t){j({},this.options.tooltip,t.options.tooltip).visible&&this._tooltip.show(t)},fl.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()?(i=this._getInactivePoints(t,i))&&i.length&&this._highlight.show(i,1-this._getInactiveOpacityForSeries(t.series)):this._highlight.show(t))},fl.prototype._getInactivePoints=function(e,t){return this._getAllPointsOfType(t,e.constructor).filter(function(t){return t!==e})},fl.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},fl.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)},fl.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))}},fl.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)}},fl.prototype._chartInstanceFromPoint=function(t){for(var e=t.parent;e&&!e.plotArea;)e=e.parent;return e},fl.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},fl.prototype._getInactiveOpacityForSeries=function(t){var e=this.options.seriesDefaults.highlight.inactiveOpacity;return t.highlight.inactiveOpacity||e||t.opacity||1},fl.prototype._getDefaultOpacityForSeries=function(t){return t.defaultOpacity||t.opacity||1},fl.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),At(document,((t={}).mousemove=this._mouseMoveTrackHandler,t)))},fl.prototype._mouseMoveTracking=function(t){var e,o=this.options,i=this._tooltip,r=this._highlight,n=this._activePoint,s=this._eventCoordinates(t);this._plotArea.box.containsPoint(s)?n&&n.tooltipTracking&&n.series&&n.parent.getNearestPoint&&((e=n.parent.getNearestPoint(s.x,s.y,n.seriesIx))&&e!==n&&((this._activePoint=e).hover(this,t)||(j({},o.tooltip,e.options.tooltip).visible&&i.show(e),r.show(e)))):(Vt(document,((e={}).mousemove=this._mouseMoveTrackHandler,e)),this._unsetActivePoint(),this._mouseMoveTrackHandler=null)},fl.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)},fl.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()}},fl.prototype._trackSharedTooltip=function(t,e,o){var i,r,n,s,a,p,h;this._suppressHover||(i=this.options.tooltip,h=this._plotArea,p=this._plotArea.categoryAxis,r=this._tooltip,n=this._highlight,h.backgroundContainsPoint(t)?(s=p.pointCategoryIndex(t))!==this._tooltipCategoryIx||!this._sharedHighlight&&o?((h=(p=(a=h.pointsByCategoryIndex(s)).map(function(t){return t.eventArgs(e)}))[0]||{}).categoryPoints=p,0<a.length&&!this.trigger("seriesHover",h)?(i.visible&&r.showAt(a,t),n.show(a),this._sharedHighlight=!0):r.hide(),this._tooltipCategoryIx=s):o&&this._sharedHighlight&&(n.hide(),r.hide(),this._sharedHighlight=!1):this._sharedHighlight&&(n.hide(),r.hide(),this._tooltipCategoryIx=null,this._sharedHighlight=!1))},fl.prototype.hideElements=function(t){var e=this._plotArea;this._mousemove.cancel(),e.hideCrosshairs(),this._unsetActivePoint(t)},fl.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()},fl.prototype._deferRedraw=function(){this._redraw()},fl.prototype._clearRedrawTimeout=function(){this._redrawTimeout&&(clearInterval(this._redrawTimeout),this._redrawTimeout=null)},fl.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)}},fl.prototype.bindCategoryAxisFromSeries=function(t,e){for(var o,i,r=this.options.series,n=r.length,s=new ut,a=[],p=!1,h=0;h<n;h++){var l=r[h],c=l.categoryAxis===t.name||!l.categoryAxis&&0===e,u=l.data,d=u.length,c=l.categoryField&&c,p=c||p;if(c&&0<d)for(var g=(o=Ms(t,Fi(l.categoryField,u[0])))?Ps:Fi,f=0;f<d;f++){var y=u[f],v=g(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=To);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?To: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 To(t[0],e[0])}):a),t.categories=i[0]):p&&(t.categories=[])},fl.prototype._isBindable=function(t){for(var e=Yi.current.valueFields(t),o=!0,i=0;i<e.length;i++){var r=e[i];if(r===h?r="field":r+="Field",!Ct(t[r])){o=!1;break}}return o},fl.prototype._noTransitionsRedraw=function(){var t,e=this.options;!1!==e.transitions&&(t=!(e.transitions=!1)),this._redraw(),t&&(e.transitions=!0)},fl.prototype._legendItemHover=function(e,o){var t=this._plotArea,i=this._highlight,r=(t.srcSeries||t.series)[e],n=dt(r.type,[ir,"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)},fl.prototype._shouldAttachMouseMove=function(){return this._plotArea.crosshairs.length||this._tooltip&&this._sharedTooltip()||this.requiresHandlers(["plotAreaHover","plotAreaLeave"])},fl.prototype.updateMouseMoveHandler=function(){var t;Vt(this.element,((t={}).mousemove=this._mousemove,t)),this._shouldAttachMouseMove()&&At(this.element,((t={}).mousemove=this._mousemove,t))},fl.prototype.applyOptions=function(t,e){wl(this._originalOptions,t),this._originalOptions=j(this._originalOptions,t),this.options=j({},this._originalOptions),e&&(this._theme=e,this.chartService.theme=e),this._initTheme(this.options,this._theme),this._toggleDragZoomEvents()},fl.prototype.setOptions=function(t,e){this.applyOptions(t,e),this.bindCategories(),this.redraw(),this.updateMouseMoveHandler()},fl.prototype.setDirection=function(t){this.chartService.rtl=Boolean(t),this.surface&&"svg"===this.surface.type&&this._destroySurface()},fl.prototype.setIntlService=function(t){this.chartService.intl=t},fl.prototype.noTransitionsRedraw=function(){this._noTransitionsRedraw()},fl.prototype.destroy=function(){var t;this._destroyed=!0,Vt(this.element,((t={}).contextmenu=this._clickHandler,t[lr]=this._mousewheelHandler,t.mousemove=this._mousemove,t.mouseleave=this._mouseleaveHandler,t)),this.domEvents&&(this.domEvents.destroy(),delete this.domEvents),this._mouseMoveTrackHandler&&Vt(document,((t={}).mousemove=this._mouseMoveTrackHandler,t)),this._destroyView(),this._destroySurface(),this._clearRedrawTimeout()},fl.prototype._destroySurface=function(){var t=this.surface;t&&(t.unbind("mouseenter",this._surfaceMouseenterHandler),t.unbind("mouseleave",this._surfaceMouseleaveHandler),t.destroy(),this.surface=null)},fl.prototype._destroySelections=function(){var t=this._selections;if(t)for(;0<t.length;)t.shift().destroy()},fl.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)},fl);function fl(t,e,o,i){var r=this;void 0===i&&(i={}),dl.call(this),this.observers=[],this.addObserver(i.observer),this.chartService=new J(this,i),this.chartService.theme=o,this._initElement(t);t=j({},this.options,e);this._originalOptions=j({},t),this._theme=o,this._initTheme(t,o),this._initHandlers(),this._initSurface(),this.bindCategories(),Dt.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 wl(t,e){for(var o in e){var i,r,n;!dt(o,xl)&&e.hasOwnProperty(o)&&(i=e[o],r=t[o],Ct(r)&&((n=null===i)||!Ct(i)?(delete t[o],n&&delete e[o]):r&&D(i)&&D(r)&&wl(r,i)))}}function bl(t){for(var e=0;e<t.length;e++)t[e].notifyRender()}zt(bt,{renderAs:"",chartArea:{},legend:{visible:!0,labels:{}},categoryAxis:{},seriesDefaults:{type:er,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 _l,Al=bt,Cl=((_l=wp)&&(kl.__proto__=_l),((kl.prototype=Object.create(_l&&_l.prototype)).constructor=kl).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 te(this.plotArea.box.x2,e.center().y):new te(e.center().x,-2),align:i}},kl.prototype._defaultAnchor=function(t,e){return this._slotAnchor({},e)},kl),Sl=[tr,"bullet"];function kl(){_l.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 Ml(t,e){for(var o=0;o<t.length;o++)t[o].style.display=e[o]}function Tl(t){return B(t)?[t]:t}var Bl,_e=((Bl=Al)&&(Rl.__proto__=Bl),((Rl.prototype=Object.create(Bl&&Bl.prototype)).constructor=Rl).prototype._setElementClass=function(t){p(t,"k-sparkline")},Rl.prototype._initElement=function(t){Bl.prototype._initElement.call(this,t),this._initialWidth=Math.floor(Pt(t).width)},Rl.prototype._resize=function(){var t=this.element,e=Pl(t.childNodes);this._initialWidth=Math.floor(Pt(t).width),Ml(t.childNodes,e),Bl.prototype._resize.call(this)},Rl.prototype._modelOptions=function(){var t=this.options,e=this._surfaceWrap(),o=Pl(e.childNodes),i=document.createElement("span");i.innerHTML=" ",e.appendChild(i);t=j({width:this._autoWidth,height:Pt(e).height,transitions:t.transitions},t.chartArea,{inline:!0,align:!1});return Pt(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=U(e.chartArea.margin),i=t.charts,r=this._surfaceWrap(),n=0,s=0;s<i.length;s++){var a=i[s],p=(a.options.series||[])[0];if(p){if(p.type===tr)return 150;if("bullet"===p.type)return 150;if(p.type===ir)return Pt(r).height;var h=a.categoryAxis;h&&(a=h.categoriesCount()*(!a.options.isStacked&&dt(p.type,[er,"verticalBullet"])?a.seriesOptions.length:1),n=Math.max(n,a))}}e=n*e.pointWidth;return 0<e&&(e+=o.left+o.right),e},Rl.prototype._createSharedTooltip=function(t){return new Cl(this._plotArea,t)},Rl.normalizeOptions=function(t){t=Tl(t);return(t=x(t)?{seriesDefaults:{data:t}}:j({},t)).series||(t.series=[{data:Tl(t.data)}]),j(t,{seriesDefaults:{type:t.type}}),t=dt(t.series[0].type,Sl)||dt(t.seriesDefaults.type,Sl)?j({},{categoryAxis:{crosshair:{visible:!1}}},t):t},Rl);function Rl(){Bl.apply(this,arguments)}zt(_e,{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 Ol,Il=_e,Ll=((Ol=P.drawing.Animation)&&(Vl.__proto__=Ol),((Vl.prototype=Object.create(Ol&&Ol.prototype)).constructor=Vl).prototype.setup=function(){this._initialOpacity=parseFloat(H(this.element,"opacity").opacity)},Vl.prototype.step=function(t){H(this.element,{opacity:String(gt(this._initialOpacity,0,t))})},Vl.prototype.abort=function(){Ol.prototype.abort.call(this),H(this.element,{display:"none",opacity:String(this._initialOpacity)})},Vl.prototype.cancel=function(){Ol.prototype.abort.call(this),H(this.element,{opacity:String(this._initialOpacity)})},Vl);function Vl(){Ol.apply(this,arguments)}function jl(t,e){var o=document.createElement("div");return o.className=t,e&&(o.style.cssText=e),o}var Dl,Z=((Dl=P.Class)&&(zl.__proto__=Dl),((zl.prototype=Object.create(Dl&&Dl.prototype)).constructor=zl).prototype.createElements=function(){var t=this.element=jl("k-navigator-hint","display: none; position: absolute; top: 1px; left: 1px;"),e=this.tooltip=jl("k-tooltip k-chart-tooltip"),o=this.scroll=jl("k-scroll");e.innerHTML=" ",t.appendChild(e),t.appendChild(o)},zl.prototype.show=function(t,e,o){var i=this.element,r=this.options,n=this.scroll,s=this.tooltip,a=Co(Ro(t)+Ro(e-t)/2),p=.4*o.width(),h=o.center().x-p,l=(o.center().x-h)/(r.max-r.min),c=a-r.min,a=this.chartService.intl.format(r.format,t,e),r=nt(r);this.clearHideTimeout(),this._visible||(H(i,{visibility:"hidden",display:"block"}),this._visible=!0),r&&(a=r({from:t,to:e})),s.innerHTML=a,H(s,{left:o.center().x-s.offsetWidth/2,top:o.y1});s=H(s,["marginTop","borderTopWidth","height"]);H(n,{width:p,left:h+c*l,top:o.y1+s.marginTop+s.borderTopWidth+s.height/2}),H(i,{visibility:"visible"})},zl.prototype.clearHideTimeout=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this._hideAnimation&&this._hideAnimation.cancel()},zl.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)},zl.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},zl);function zl(t,e,o){Dl.call(this),this.options=j({},this.options,o),this.container=t,this.chartService=e;e=H(t,["paddingLeft","paddingTop"]);this.chartPadding={top:e.paddingTop,left:e.paddingLeft},this.createElements(),t.appendChild(this.element)}zt(Z,{format:"{0:d} - {1:d}",hideDelay:500});var El=Z,Hl="_navigator",Ul=Hl;function Fl(){}var Gl,Nl,Wl=((Nl=P.Class)&&(Yl.__proto__=Nl),((Yl.prototype=Object.create(Nl&&Nl.prototype)).constructor=Yl).prototype.parseDate=function(t){return jo(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,n=i.max,s=e.select,a=s.from,p=s.to,i=s.mousewheel,s=(Fl.prototype=o,new Fl);0!==o.categoriesCount()&&(this.clean(),s.box=o.box,this.selection=new fp(t,s,{min:r,max:n,from:a||r,to:p||n,mousewheel:jt(i,{zoom:"left"}),visible:e.visible},new yt(this,{selectStart:"_selectStart",select:"_select",selectEnd:"_selectEnd"})),e.hint.visible&&(this.hint=new El(t.element,t.chartService,{min:r,max:n,template:nt(e.hint),format:e.hint.format})))},Yl.prototype.setRange=function(){var t=this.chart._createPlotArea(!0).namedCategoryAxes[Ul].roundedRange(),e=t.min,o=t.max,i=this.options.select||{},r=i.from||e,t=i.to||o;this.options.select=j({},i,{from:r=r<e?e:r,to:t=o<t?o:t}),this.filterAxes()},Yl.prototype._redrawSelf=function(t){var e=this.chart._plotArea;e&&e.redraw(Bt(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(),i=r.pane.box.containsPoint(i),e=e._plotArea.categoryAxis,t=t.axisRanges[e.options.name],e=this.options.select;t&&!i&&o&&(e=e.from&&e.to?Ro(e.to)-Ro(e.from):Ro(o.options.to)-Ro(o.options.from),t=Co(Rt(Ro(t.min),n.min,Ro(n.max)-e)),n=Co(Rt(Ro(t)+e,Ro(n.min)+e,n.max)),this.options.select={from:t,to:n},this.options.liveDrag&&(this.filterAxes(),this.redrawSlaves()),o.set(t,n),this.showHint(t,n))},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,o=t.to,t=this.options.select;t.from=e,t.to=o},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!==Hl&&(n.min=o,n.max=i)}},Yl.prototype.filter=function(){var t,e,o=this.chart,i=this.options.select;o.requiresHandlers(["navigatorFilter"])&&(t=this.mainAxis(),e={from:i.from,to:i.to},"category"!==t.options.type&&(o=new Ko(j({baseUnit:"fit"},o.options.categoryAxis[0],{categories:[i.from,i.to]}),o.chartService).options,e.from=ko(o.min,-o.baseUnitStep,o.baseUnit),e.to=ko(o.max,o.baseUnitStep,o.baseUnit)),this.chart.trigger("navigatorFilter",e))},Yl.prototype._zoom=function(t){var e,o=this.chart._plotArea.categoryAxis,i=this.selection,r=this.options,n=r.select,s=r.liveDrag,a=this.mainAxis(),p=t.delta;i&&(e=a.categoryIndex(i.options.from),r=a.categoryIndex(i.options.to),a=this.chart._eventCoordinates(t.originalEvent),t.originalEvent.preventDefault(),1<Math.abs(p)&&(p*=3),1<r-e?(i.zoom(p,a),this.readSelection()):(o.options.min=n.from,n.from=o.scaleRange(-t.delta*this.chart._mousewheelZoomRate(),a).min),s&&(this.filterAxes(),this.redrawSlaves()),i.set(n.from,n.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[Ul]},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=j({},e.navigator,t.navigator),i=t.panes=[].concat(t.panes),r=j({},o.pane,{name:Hl}),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),r=t.valueAxis=[].concat(t.valueAxis),t=0===ks(o,nr).length,o=j({type:"date",pane:Hl,roundToBaseUnit:!t,justified:t,_collapse:!1,majorTicks:{visible:!0},tooltip:{visible:!1},labels:{step:1},autoBind:e.autoBindElements,autoBaseUnitSteps:{minutes:[1],hours:[1,2],days:[1,2],weeks:[],months:[1],years:[1]}}),t=e.categoryAxis;i.push(j({},o,{maxDateGroups:200},t,{name:Ul,title:null,baseUnit:"fit",baseUnitStep:"auto",labels:{visible:!1},majorTicks:{visible:!1}}),j({},o,t,{name:Ul+"_labels",maxDateGroups:20,baseUnitStep:"auto",labels:{position:""},plotBands:[],autoBaseUnitSteps:{minutes:[]},_overlap:!0}),j({},o,t,{name:Ul+"_ticks",maxDateGroups:200,majorTicks:{width:.5},plotBands:[],title:null,labels:{visible:!1,mirror:!0},_overlap:!0})),r.push(j({name:Ul,pane:Hl,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(j({color:n[a%n.length],categoryField:e.dateField,visibleInLegend:!1,tooltip:{visible:!1}},s,r[a],{axis:Ul,categoryAxis:Ul,autoBind:e.autoBindElements}))},Yl),qt=((Gl=Al)&&(Xl.__proto__=Gl),((Xl.prototype=Object.create(Gl&&Gl.prototype)).constructor=Xl).prototype.applyDefaults=function(t,e){var o=Pt(this.element).width||600,e=e,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&&j({},e,o);Wl.setup(t,e),Gl.prototype.applyDefaults.call(this,t,e)},Xl.prototype._setElementClass=function(t){p(t,"k-chart k-stockchart")},Xl.prototype.setOptions=function(t){this.destroyNavigator(),Gl.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,e=ht([].concat(t.series,t.navigator.series),function(t){return t&&t.visible}).length,t=this._seriesCount!==e;return this._seriesCount=e,t},Xl.prototype._fullRedraw=function(){var t=this.navigator;t||(t=this.navigator=new Wl(this),this.trigger("navigatorCreated",{navigator:t})),t.clean(),t.setRange(),Gl.prototype._redraw.call(this),t.initSelection()},Xl.prototype._trackSharedTooltip=function(t){var e=this._plotArea.paneByPoint(t);e&&e.options.name===Hl?this._unsetActivePoint():Gl.prototype._trackSharedTooltip.call(this,t)},Xl.prototype.bindCategories=function(){Gl.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(),Gl.prototype.destroy.call(this)},Xl.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===Hl},Xl.prototype._toggleDragZoomEvents=function(){this._dragZoomEnabled||(this.element.style.touchAction="none",this._dragZoomEnabled=!0)},Xl);function Xl(){Gl.apply(this,arguments)}function Yl(t){Nl.call(this),this.chart=t;var e=this.options=j({},this.options,t.options.navigator),o=e.select;o&&(o.from=this.parseDate(o.from),o.to=this.parseDate(o.to)),Ct(e.hint.visible)||(e.hint.visible=e.visible),this.chartObserver=new yt(this,((e={})[sr]="_drag",e[ar]="_dragEnd",e[pr]="_zoom",e[hr]="_zoomEnd",e)),t.addObserver(this.chartObserver)}zt(qt,{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 ql=qt,Ql=Math.PI/180;function Zl(t,e){var o=t.getOrigin(),i=t.getSize(),e=U(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=P.drawing.Group,$l=P.drawing.Path,Jl=P.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 P.geometry.Rect([o.x1,o.y1],[o.width(),o.height()]),{stroke:{}}),i=new Jl(t.text,new P.geometry.Point(i.x1,i.y1),{font:e.font,fill:{color:e.color}}),e=Zl(i.bbox().clone(),e.padding),r=$l.fromRect(e,{stroke:{color:r.width?r.color:"",width:r.width,opacity:r.opacity,dashType:r.dashType,lineJoin:"round",lineCap:"round"},fill:{color:n}}),n=new Kl;return n.append(o),n.append(r),n.append(i),n}function ec(t,e,o){var i=Ct(t.from)?t.from:c,r=Ct(t.to)?t.to:l;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=U(e);return e.left=-e.left,e.top=-e.top,e.right=-e.right,e.bottom=-e.bottom,Zl(t,e)}var ic,rc=P.drawing.Path,nc=P.drawing.Surface,N=((ic=P.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(x(t))for(var r=0;r<t.length;r++)B(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 P.geometry.Rect([0,0],[t.width,t.height]);this._initSurface(),this.gaugeArea=this._createGaugeArea(),this._createModel();t=oc(t.bbox(),this._gaugeAreaMargin);this.reflow(t)},sc.prototype.setOptions=function(t,e){this._originalOptions=j(this._originalOptions,t),this.options=j({},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||{};this.theme=e,this.options=j({},e,this.options);var t=this.options,o=t.pointer;if(x(o)){for(var i=[],r=0;r<o.length;r++)i.push(j({},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 P.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();Pt(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&&j(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 J(this,i),this._originalOptions=j({},this.options,e),this.options=j({},this._originalOptions),this._initTheme(o),this.redraw()}zt(N,{plotArea:{},theme:"default",renderAs:"",pointer:{},scale:{},gaugeArea:{}});var ac=N,pc=P.drawing.Path,hc=P.drawing.Group,lc=P.geometry.Point;function cc(t,e,o,i){var r,n,s,a,p,h=e.length;if(i.visible)for(var l=o.mirror,c=o.lineBox,u=i.skip;u<h;u+=i.step)u%i.skipUnit!=0&&(o.tickX=l?c.x2:c.x2-i.size,o.tickY=l?c.y1-i.size:c.y1,o.position=e[u],t.append((r=i,a=s=n=void 0,p=void 0,s=o.position,a=o.tickX,p=o.tickY,p=o.vertical?(n=new lc(a,s),new lc(a+r.size,s)):(n=new lc(s,p),new lc(s,p+r.size)),new pc({stroke:{color:r.color,width:r.width}}).moveTo(n).lineTo(p))))}var uc,ke=((uc=si)&&(dc.__proto__=uc),((dc.prototype=Object.create(uc&&uc.prototype)).constructor=dc).prototype.initUserOptions=function(t){t=j({},this.options,t);return(t=j({},t,{labels:{mirror:t.mirror}})).majorUnit=t.majorUnit||$t(t.min,t.max),t},dc.prototype.initFields=function(){},dc.prototype.render=function(){var t=this.elements=new hc,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,e=t.min,o=t.max,i=t.vertical,r=t.labels.mirror,n=t.ranges||[],s=new hc,a=n.length,p=t.rangeSize||t.minorTicks.size/2,h=0;h<a;h++){var l=ec(n[h],e,o),c=this.getSlot(l.from,l.to),u=i?this.lineBox():c,c=i?c:this.lineBox();i?u.x1-=p*(r?-1:1):c.y2+=p*(r?-1:1),s.append(pc.fromRect(new P.geometry.Rect([u.x1,c.y1],[u.x2-u.x1,c.y2-c.y1]),{fill:{color:l.color,opacity:l.opacity},stroke:{}}))}return s},dc.prototype.renderLabels=function(){for(var t=this.labels,e=this.options,o=new hc,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 hc;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},dc.prototype.renderTicks=function(){var t=new hc,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,j({},{skipUnit:o/e.minorUnit},e.minorTicks)),t},dc);function dc(t,e){t=t||{};!Ct(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}zt(ke,{min:0,max:50,majorTicks:{size:15,align:"inside",color:r,width:.5,visible:!0},minorTicks:{size:10,align:"inside",color:r,width:.5,visible:!0},line:{width:.5},labels:{position:"inside",padding:2},mirror:!1,_alignLines:!1});var gc,fc=ke,tt=((gc=P.Class)&&(yc.__proto__=gc),((yc.prototype=Object.create(gc&&gc.prototype)).constructor=yc).prototype.value=function(t){var e=this.options,o=e.value;if(0===arguments.length)return o;var i=this.scale.options,o=i.min,i=i.max;e._oldValue=Ct(e._oldValue)?e.value:o,e.value=Rt(t,o,i),this.elements&&this.repaint()},yc);function yc(t,e){gc.call(this);var o=t.options,i=o.min,o=o.max,e=this.options=j({},this.options,e);e.fill=e.color,this.scale=t,Ct(e.value)?e.value=Rt(e.value,i,o):e.value=i}zt(tt,{color:r});var vc,Y=tt,K=((vc=Y)&&(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,a=n.vertical,p=r.lineBox(),h=i.track.size||i.size,n=i.size/2,r=U(i.margin),r=a?r[s?"left":"right"]:r[s?"bottom":"top"],r=s?-r:r;a?(o=new re(p.x1+r,p.y1,p.x1+r,p.y2),s?o.x1-=h:o.x2+=h,"barPointer"!==i.shape&&(t=e=new re(p.x2+r,p.y1-n,p.x2+r,p.y2+n))):(o=new re(p.x1,p.y1-r,p.x2,p.y1-r),s?o.y2+=h:o.y1-=h,"barPointer"!==i.shape&&(t=e=new re(p.x1-n,p.y1-r,p.x2+n,p.y1-r))),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:Ct(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,o=t.options,t=o.mirror,o=o.vertical,e=U(e.margin);return o?e[t?"left":"right"]:e[t?"bottom":"top"]},mc);function mc(t,e){vc.call(this,t,e),this.options=j({track:{visible:Ct(e.track)}},this.options)}zt(K,{shape:"barPointer",track:{border:{width:1}},color:r,border:{width:1},opacity:1,margin:U(3),animation:{type:"barPointer"},visible:!0});var xc,wc=K,it=((xc=P.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";t.mirror===r?(o[n]-=e,i[n]-=e):(o[n]+=e,i[n]+=e);o=this.fromScale=new P.geometry.Point(o.x1,o.y1),i=this.toScale=new P.geometry.Point(i.x1,i.y1);0!==t.duration&&(t.duration=Math.max(o.distanceTo(i)/t.duration*1e3,1))},bc.prototype.step=function(t){var e=gt(this.fromScale.x,this.toScale.x,t),t=gt(this.fromScale.y,this.toScale.y,t);this.element.transform(P.geometry.transform().translate(e,t))},bc);function bc(){xc.apply(this,arguments)}zt(it,{easing:"linear",duration:250}),P.drawing.AnimationFactory.current.register("arrowPointer",it);var _c,Ac,Cc=it,Sc=P.geometry.Point,kc=P.drawing.Path,Pc=((Ac=wc)&&(Tc.__proto__=Ac),((Tc.prototype=Object.create(Ac&&Ac.prototype)).constructor=Tc).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 Sc(0,0-o),new Sc(0-i*e,0),new Sc(0,0+o)]:[new Sc(0-o,0),new Sc(0,0+i*e),new Sc(0+o,0)]},Tc.prototype.repaint=function(){var t=this.scale,e=this.options,t=new Cc(this.elements,j(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()},Tc.prototype.render=function(){var t=this.scale,e=this.options,o=this.getElementOptions(),i=this.pointerShape(e.value);e.animation.type="arrowPointer";i=new kc({stroke:o.stroke,fill:o.fill}).moveTo(i[0]).lineTo(i[1]).lineTo(i[2]).close(),e=t.getSlot(e.value);return i.transform(P.geometry.transform().translate(e.x1,e.y1)),this.elements=i},Tc),q=((_c=P.drawing.Animation)&&(Mc.__proto__=_c),((Mc.prototype=Object.create(_c&&_c.prototype)).constructor=Mc).prototype.setup=function(){var t=this.options,e=this.axis=t.vertical?m:v,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=gt(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(){_c.apply(this,arguments)}function Tc(t,e){Ac.call(this,t,e),Ct(this.options.size)||(this.options.size=.6*this.scale.options.majorTicks.size)}zt(q,{easing:"linear",speed:250}),P.drawing.AnimationFactory.current.register("barPointer",q);var Bc,Rc,Oc=q,Ic=P.drawing.Group,Lc=P.drawing.Path,Vc=((Rc=wc)&&(zc.__proto__=Rc),((zc.prototype=Object.create(Rc&&Rc.prototype)).constructor=zc).prototype.pointerShape=function(t){var e=this.scale,o=this.options,i=e.options,r=i.mirror,n=i.vertical,s=r===n?-1:1,a=o.size*s,i=e.getSlot(e.options.min),r=e.getSlot(t),o=n?m:v,e=n?v:m,t=this._margin()*s,s=new P.geometry.Point;s[o]=i[o+"1"],s[e]=i[e+"1"];i=new P.geometry.Point;i[o]=r[o+"1"],i[e]=r[e+"1"],n?(s.translate(t,0),i.translate(t,0)):(s.translate(0,t),i.translate(0,t));e=i.clone(),t=s.clone();return n?(e.translate(a,0),t.translate(a,0)):(e.translate(0,a),t.translate(0,a)),[s,i,e,t]},zc.prototype.repaint=function(){var t=this.scale,e=this.options,o=this.pointerShape(e.value),i=this.pointerPath,r=this.pointerShape(e._oldValue);i.moveTo(o[0]).lineTo(o[1]).lineTo(o[2]).lineTo(o[3]).close();o=new Oc(i,j(e.animation,{reverse:t.options.reverse,vertical:t.options.vertical,oldPoints:[r[1],r[2]],newPoints:[o[1],o[2]]}));!1===e.animation.transitions&&(o.options.duration=0),o.setup(),o.play()},zc.prototype.render=function(){var t=new Ic,e=this.getElementOptions();this.options.track.visible&&t.append(this.renderTrack());e=this.pointerPath=new Lc({stroke:e.stroke,fill:e.fill});return t.append(e),this.elements=t},zc.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}})},zc),jc=P.drawing.Group,ct=((Bc=ac)&&(Dc.__proto__=Bc),((Dc.prototype=Object.create(Bc&&Bc.prototype)).constructor=Dc).prototype.reflow=function(t){var e=this.pointers,o=t.origin.x,i=t.origin.y,t=new re(o,i,o+t.width(),i+t.height());this.scale.reflow(t),this._shrinkScaleWidth(t);for(var r=0;r<e.length;r++)e[r].reflow();this.bbox=this._getBox(t),this._alignElements(),this._shrinkElements(),this._buildVisual(),this._draw()},Dc.prototype._buildVisual=function(){var t=new jc,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},Dc.prototype._createModel=function(){var t=this.options,e=this.scale=new fc(t.scale,this.contextService);this.pointers=[];for(var o=x(o=t.pointer)?o:[o],i=0;i<o.length;i++){var r=j({},o[i],{animation:{transitions:t.transitions}}),n="arrow"===r.shape?Pc:Vc;this.pointers.push(new n(e,r))}},Dc.prototype._defaultSize=function(){var t=this.options.scale.vertical;return{width:t?60:200,height:t?200:60}},Dc.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 re(r.x-e,t.y1,r.x+e,t.y2)):(e=n.height()/2,new re(t.x1,r.y-e,t.x2,r.y+e))},Dc.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 re(i.x1+t,n.y1,i.x2+t,n.y2))):(t=n.center().y-r.center().y,e.reflow(new re(i.x1,i.y1+t,i.x2,i.y2+t)));for(var a=0;a<o.length;a++)o[a].reflow(this.bbox)},Dc.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))},Dc.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)},Dc);function Dc(){Bc.apply(this,arguments)}function zc(t,e){Rc.call(this,t,e),Ct(this.options.size)||(this.options.size=.3*this.scale.options.majorTicks.size)}zt(ct,{transitions:!0,gaugeArea:{background:""},scale:{vertical:!0}});var Ec=ct,Hc=P.drawing.Arc,Uc=P.drawing.Path,Fc=P.drawing.Group;function Gc(t,e,o,i){var r=new Fc,n=t.center,s=t.getRadiusX();if(i.visible)for(var a=0;a<e.length;a++){var p=t.pointAt(e[a]),h=new P.geometry.Point(n.x+s-i.size,n.y).rotate(e[a],n);r.append(new Uc({stroke:{color:i.color,width:i.width}}).moveTo(p).lineTo(h))}return r}function Nc(t,e,o,i){return{from:t,to:e,color:o,opacity:i}}var Wc,me=((Wc=si)&&(Xc.__proto__=Wc),((Xc.prototype=Object.create(Wc&&Wc.prototype)).constructor=Xc).prototype.initUserOptions=function(t){t=j({},this.options,t);return t.majorUnit=t.majorUnit||$t(t.min,t.max),t.minorUnit=t.minorUnit||t.majorUnit/10,t},Xc.prototype.initFields=function(){},Xc.prototype.render=function(t,e){e=this.renderArc(t,e);this.bbox=e.bbox(),this.labelElements=this.renderLabels(),this.ticks=this.renderTicks(),this.ranges=this.renderRanges()},Xc.prototype.reflow=function(t){var e=t.center(),t=Math.min(t.height(),t.width())/2;if(!Ct(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,s=e.endAngle,e=s-n;return(r?s-(t-o)/(i-o)*e:(t-o)/(i-o)*e+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,o=t.minorTicks,t=0;return e.visible&&(t=e.size),t=o.visible?Math.max(o.size,t):t},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(),i=this.tickAngles(e,t.majorUnit),r=t.rangeSize=t.rangeSize||.1*o,n=new Fc,s=.05*o;Ct(t.rangeDistance)?s=t.rangeDistance:t.rangeDistance=s;var a=t.labels,p="inside"===a.position,h=Ct(this.labelElements);p&&(o-=this.ticksSize(),this.hasRanges()&&!h&&(o-=r+s),e.setRadiusX(o).setRadiusY(o));for(var l=this.labels,c=l.length,a=U(a.padding),u=(a.left+a.right)/2,d=(a.top+a.bottom)/2,g=0;g<c;g++){var f=l[g],y=f.box.width()/2,v=f.box.height()/2,m=i[g],x=(m-180)*Ql,w=e.pointAt(m),m=w.x+Math.cos(x)*(y+u)*(p?1:-1),x=w.y+Math.sin(x)*(v+d)*(p?1:-1);f.reflow(new re(m-y,x-v,m+y,x+v));m=new P.geometry.Point(f.box.x1,f.box.y1),y=void 0;h?(x=(y=this.labelElements.children[g]).bbox().origin,(v=y.transform()||P.geometry.transform()).translate(m.x-x.x,m.y-x.y),y.transform(v)):(y=tc(f,t.labels),n.append(y)),this.bbox=P.geometry.Rect.union(this.bbox,y.bbox())}return n},Xc.prototype.repositionRanges=function(){var t=this.ranges.children;if(0<t.length){var e=this.options,o=e.rangeDistance,i=e.rangeSize,e=this.getRangeRadius();"inside"===this.options.labels.position&&(e+=i+o);for(var r=e+i/2,n=0;n<t.length;n++)t[n]._geometry.setRadiusX(r).setRadiusY(r);this.bbox=P.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,s=this.getRangeRadius();this.radius(this.radius()-r-i);for(var a=0;a<e;a++){var p=t[a],h=this.slotAngle(p[n?"to":"from"]),l=this.slotAngle(p[n?"from":"to"]);l-h!=0&&o.append(this.createRange(h,l,s,p))}}return o},Xc.prototype.createRange=function(t,e,o,i){var r=this.options.rangeSize,e=new P.geometry.Arc(this.arc.center,{radiusX:o+r/2,radiusY:o+r/2,startAngle:t,endAngle:e});return new Hc(e,{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,s=t.rangePlaceholderColor;i.push(Nc(r,n,s));for(var a=0;a<o;a++)for(var p=ec(e[a],r,n),h=i.length,l=0;l<h;l++){var c=i[l];if(c.from<=p.from&&p.from<=c.to){i.push(Nc(p.from,p.to,p.color,p.opacity)),c.from<=p.to&&p.to<=c.to&&i.push(Nc(p.to,c.to,s,p.opacity)),c.to=p.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 P.geometry.Arc(t,{radiusX:e,radiusY:e,startAngle:o.startAngle+180,endAngle:o.endAngle+180})},Xc.prototype.renderTicks=function(){var t=this.arc,e=this.options,o=t.clone();this.majorTickAngles=this.tickAngles(t,e.majorUnit),this.majorTicks=Gc(o,this.majorTickAngles,e.majorUnit,e.majorTicks);var i=new Fc;i.append(this.majorTicks);var r,n=e.majorTicks.size,s=e.minorTicks.size;return this._tickDifference=n-s,"outside"===e.labels.position&&(r=o.getRadiusX(),o.setRadiusX(r-n+s).setRadiusY(r-n+s)),this.minorTickAngles=this.normalizeTickAngles(this.tickAngles(t,e.minorUnit)),this.minorTicks=Gc(o,this.minorTickAngles,e.minorUnit,e.minorTicks),i.append(this.minorTicks),i},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,r=o.max-o.min,n=t.endAngle-t.startAngle,s=r/e,a=t.startAngle,p=n/s;i&&(a+=n,p=-p),360<=n&&o.max%e==0&&--s;for(var h=[],l=0;l<s;l++)h.push(Lt(a,3)),a+=p;return Lt(a)<=t.endAngle&&h.push(a),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]),p=t[s].segments,h=a.x-p[0].anchor().x,p=a.y-p[0].anchor().y;t[s].transform((new P.geometry.transform).translate(h,p))}},Xc);function Xc(t,e){Wc.call(this,0,1,t,e)}zt(me,{min:0,max:100,majorTicks:{size:15,align:"inside",color:r,width:.5,visible:!0},minorTicks:{size:10,align:"inside",color:r,width:.5,visible:!0},startAngle:-30,endAngle:210,labels:{position:"inside",padding:2}});var Yc,qc=me,ft=((Yc=P.drawing.Animation)&&(Qc.__proto__=Yc),((Qc.prototype=Object.create(Yc&&Yc.prototype)).constructor=Qc).prototype.step=function(t){var e=this.options,t=gt(e.oldAngle,e.newAngle,t);this.element.transform(P.geometry.transform().rotate(t,e.center))},Qc);function Qc(t,e){Yc.call(this,t,e);e=this.options;e.duration=Math.max(Math.abs(e.newAngle-e.oldAngle)/e.duration*1e3,1)}zt(ft,{easing:"linear",duration:150}),P.drawing.AnimationFactory.current.register("radialPointer",ft);var Zc,Kc=ft,$c=P.drawing.Circle,Jc=P.drawing.Group,tu=P.drawing.Path,ue=((Zc=Y)&&(eu.__proto__=Zc),((eu.prototype=Object.create(Zc&&Zc.prototype)).constructor=eu).prototype.setAngle=function(t){this.elements.transform(P.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,j(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&&j(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},eu.prototype.reflow=function(t){var e=this.center=t.center,o=Rt(this.options.length||1,.1,1.5),o=this.radius=t.getRadiusX()*o,o=this.capSize=Math.round(o*this.options.cap.size);this.bbox=P.geometry.Rect.fromPoints(new P.geometry.Point(e.x-o,e.y-o),new P.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,e=t.cap.color||t.color,t=new P.geometry.Circle(this.center,this.capSize);return new $c(t,{fill:{color:e},stroke:{color:e}})},eu);function eu(){Zc.apply(this,arguments)}zt(ue,{cap:{size:.05},arrow:{width:16,height:14},animation:{type:"radialPointer",duration:150}});var ou,iu=ue,ru=P.drawing.Group,Zt=((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=P.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)),p=Lt(a,3),h=Lt(-a,3),l=0,c=0;!(!(c++<100)||5<(l=n===i?l+1:0)||p!==r&&0<=(e=this.getPlotBox(p,t,s))&&e<=2||h!==r&&0<=(i=this.getPlotBox(h,t,s))&&i<=2||(r=0<e&&0<i?2*p:e<0&&i<0?2*h:Lt((p+h)/2||1,3),0<=(o=this.getPlotBox(r,t,s))&&o<=2));)n=i,0<o?(h=r,i=o):(p=r,e=o)},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=P.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,o=e.y-o.y,r=this.scale,n=this.pointers;r.arc.center.x-=i,r.arc.center.y-=o,r.reflow(t);for(var s=0;s<n.length;s++)n[s].reflow(r.arc),this.plotBbox=P.geometry.Rect.union(r.bbox,n[s].bbox)},nu.prototype._createModel=function(){var t=this.options,e=t.pointer,o=this.scale=new qc(t.scale,this.contextService);this.pointers=[];for(var i=x(e)?e:[e],r=0;r<i.length;r++){var n=new iu(o,j({},i[r],{animation:{transitions:t.transitions}}));this.pointers.push(n)}},nu);function nu(){ou.apply(this,arguments)}zt(Zt,{transitions:!0,gaugeArea:{background:""}});var su,au=Zt,G=((su=qc)&&(pu.__proto__=su),((pu.prototype=Object.create(su&&su.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),e=this.slotAngle(i?t:e),o=this.createRange(r,e,this.getRangeRadius(),o);return this.ranges.append(o),o},pu);function pu(){su.apply(this,arguments)}zt(G,{min:0,max:100,majorTicks:{visible:!1},minorTicks:{visible:!1},labels:{visible:!1},startAngle:0,endAngle:180,rangeLineCap:"round"});var hu,lu=G,bt=((hu=P.drawing.Animation)&&(cu.__proto__=hu),((cu.prototype=Object.create(hu&&hu.prototype)).constructor=cu).prototype.step=function(t){var e=this.options,o=this.startColor,i=this.color,r=gt(e.oldAngle,e.newAngle,t);this.element.angle(r),i&&(e=Lt(gt(o.r,i.r,t)),r=Lt(gt(o.g,i.g,t)),t=Lt(gt(o.b,i.b,t)),this.element.stroke(new P.Color(e,r,t).toHex()))},cu);function cu(t,e){hu.call(this,t,e);var o=this.options,e=Math.abs(o.newAngle-o.oldAngle)/o.duration*1e3;o.duration=Rt(e,150,800);e=t.elements.options.get("stroke.color"),t=t.currentColor();e!==t&&(this.startColor=new P.Color(e),this.color=new P.Color(t))}zt(bt,{easing:"linear",duration:150}),P.drawing.AnimationFactory.current.register("radialRangePointer",bt);var uu,du=bt,_e=((uu=Y)&&(gu.__proto__=uu),((gu.prototype=Object.create(uu&&uu.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 du(this,j(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&&j(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,i=this.options,r=i.colors,t=i.color,i=i.value,n=B(i)?i:e;if(r)for(var s=0;s<r.length;s++){var a=r[s],p=a.color,h=a.from;void 0===h&&(h=e);a=a.to;if(void 0===a&&(a=o),h<=n&&n<=a)return p}return t},gu.prototype.reflow=function(){this.render(),this.bbox=this.elements.bbox()},gu);function gu(){uu.apply(this,arguments)}zt(_e,{animation:{type:"radialRangePointer",duration:150}});var fu,yu,vu,mu=_e,xu=((vu=au)&&(Au.__proto__=vu),((Au.prototype=Object.create(vu&&vu.prototype)).constructor=Au).prototype._initTheme=function(t){vu.prototype._initTheme.call(this,t),this.options.color=this.options.color||(this.theme.pointer||{}).color},Au.prototype._createModel=function(){var t=this.options,e=this.scale=new lu(t.scale,this.contextService),t=new mu(e,j({},{colors:t.colors,color:t.color,value:t.value,opacity:t.opacity,animation:{transitions:t.transitions}}));this.pointers=[t]},Au.prototype._buildPointers=function(t){for(var e=0;e<t.length;e++){var o=t[e];o.render(),o.value(o.options.value)}},Au.prototype._setValueOptions=function(t){this.options.value=t},Au.prototype.currentColor=function(){var t=this.pointers[0];if(t)return t.currentColor()},Au.prototype.centerLabelPosition=function(t,e){var o,i=this.getSize(),r=this.scale.arc.center,n=r.x-t/2,r=r.y-e/2;return t<i.width&&(o=n+t,n=Math.max(n,0),o>i.width&&(n-=o-i.width)),e<i.height&&(i=(o=this.scale.bbox).bottomRight().y,e=r+e,r=Math.max(r,o.origin.y),i<e&&(r-=e-i)),{left:n,top:r}},Au),wu=((yu=xu)&&(_u.__proto__=yu),((_u.prototype=Object.create(yu&&yu.prototype)).constructor=_u).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)},_u),Z=((fu=P.Class)&&(bu.__proto__=fu),((bu.prototype=Object.create(fu&&fu.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=Ct(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){fu.call(this),this.setOptions(t),this.initProperties()}function _u(){yu.apply(this,arguments)}function Au(){vu.apply(this,arguments)}zt(Z,{quietZoneLength:10,addQuietZone:!0,addCheckSum:!0});var Cu,Su=Object.assign,qt=((Cu=Z)&&(ku.__proto__=Cu),((ku.prototype=Object.create(Cu&&Cu.prototype)).constructor=ku).prototype.initProperties=function(){Cu.prototype.initProperties.call(this),Su(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"})},ku.prototype.initValue=function(t,e){this.pattern=[],this.value=t,this.width=e,this.totalUnits=0},ku.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()},ku.prototype.setBaseUnit=function(){this.baseUnit=this.width/(this.totalUnits+this.quietZoneLength)},ku.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&&(e=(o+this.getWeightedSum(t,e,this.kCheckSumTotal))%this.checkSumMod,this.checksum+=e,this.addPattern(this.characterMap[e]))},ku.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},ku.prototype.weightedValue=function(t,e,o,i){return((e-o)%i||i)*t},ku.prototype.getValue=function(t){return isNaN(t)?(t!==this.DASH&&this.invalidCharacterError(t),this.DASH_VALUE):parseInt(t,10)},ku.prototype.addCharacter=function(t){t=this.getValue(t),t=this.characterMap[t];this.addPattern(t)},ku.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},ku);function ku(){Cu.apply(this,arguments)}zt(qt,{addCheckSum:!0});var Pu,Mu,Tu=Object.assign,N=((Mu=Z)&&(Ru.__proto__=Mu),((Ru.prototype=Object.create(Mu&&Mu.prototype)).constructor=Ru).prototype.initProperties=function(){Mu.prototype.initProperties.call(this),Tu(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),ke=((Pu=N)&&(Bu.__proto__=Pu),((Bu.prototype=Object.create(Pu&&Pu.prototype)).constructor=Bu).prototype.initProperties=function(){Pu.prototype.initProperties.call(this),Tu(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.max(.15*this.width,24),r=this.maxRatio;if(this.height<i)throw new Error("Insufficient Height. The minimum height for value: "+this.value+" is: "+i);for(t=this.getBaseUnit(r);t<e&&o<r;)r=parseFloat((r-.1).toFixed(1)),t=this.getBaseUnit(r);if(t<e){i=Math.ceil(this.getBaseWidth(o)*e);throw new Error("Insufficient width. The minimum width for value: "+this.value+" is: "+i)}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(){Pu.apply(this,arguments)}function Ru(){Mu.apply(this,arguments)}zt(ke,{addCheckSum:!1});var Ou,Iu,Lu,Vu,ju,Du,zu,Eu,Hu,Uu,Fu,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"]},tt=((Du=ke)&&(od.__proto__=Du),((od.prototype=Object.create(Du&&Du.prototype)).constructor=od).prototype.initProperties=function(){Du.prototype.initProperties.call(this),j(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}}})},od),Nu=Object.assign,K=((ju=N)&&(ed.__proto__=ju),((ed.prototype=Object.create(ju&&ju.prototype)).constructor=ed).prototype.initProperties=function(){ju.prototype.initProperties.call(this),Nu(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"}})},ed.prototype.initValue=function(t,e,o){this.value=t,this.width=e,this.height=o,this.pattern=[],this.values=[],this.dataLength=t.length},ed.prototype.prepareValues=function(){var t=Math.max(.15*this.width,24);if(this.height<t)throw new Error("Insufficient Height");if(this.setBaseUnit(),this.baseUnit<this.minBaseUnitLength)throw new Error("Insufficient Width")},ed.prototype.setBaseUnit=function(){this.baseUnit=this.width/(9*(this.dataLength+2+2)+this.quietZoneLength+1)},ed.prototype.addStart=function(){var t=this.characterMap.START.pattern;this.addPattern(t)},ed.prototype.addStop=function(){this.addStart(),this.pattern.push(this.characterMap.TERMINATION_BAR)},ed.prototype.addBase=function(t){this.addPattern(t.pattern),this.values.push(t.value)},ed.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)},ed.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]},ed.prototype._findCharacterByValue=function(t){for(var e in this.characterMap)if(this.characterMap[e].value===t)return e},ed.prototype.weightedValue=function(t,e,o){return(e%o||o)*t},ed.prototype.addPattern=function(t){for(var e,o=0;o<t.length;o++)e=parseInt(t.charAt(o),10),this.pattern.push(e)},ed),it=((Vu=K)&&(td.__proto__=Vu),((td.prototype=Object.create(Vu&&Vu.prototype)).constructor=td).prototype.initProperties=function(){Vu.prototype.initProperties.call(this),j(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))}})},td),Wu=/^\d+$/,Xu=Object.assign,q=((Lu=Z)&&(Ju.__proto__=Lu),((Ju.prototype=Object.create(Lu&&Lu.prototype)).constructor=Ju).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"]})},Ju.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()},Ju.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()},Ju.prototype.addCharacter=function(t){var e=this.characterMap[t];this.checkSum+=parseInt(t,10),this.addPattern(e)},Ju.prototype.addCheckSum=function(){this.checksum=(10-this.checkSum%10)%10,this.addCharacter(this.checksum)},Ju.prototype.setBaseUnit=function(){this.baseUnit=this.width/(10*(this.value.length+1)+3+this.quietZoneLength)},Ju.prototype.validate=function(t){if(Wu.test(t)||this.invalidCharacterError(t.match(/[^0-9]/)[0]),!dt(t.length,this.VALID_CODE_LENGTHS))throw new Error("Invalid value length. Valid lengths for the Postnet symbology are "+this.VALID_CODE_LENGTHS.join(","))},Ju.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)},Ju),Yu=/^\d+$/,qu=/^[a-z0-9]+$/i,Qu=Object.assign,ct=((Iu=P.Class)&&($u.__proto__=Iu),(($u.prototype=Object.create(Iu&&Iu.prototype)).constructor=$u).prototype.initProperties=function(){},$u.prototype.addStart=function(){},$u.prototype.is=function(){},$u.prototype.isCode=function(){return!1},$u.prototype.move=function(){},$u.prototype.pushState=function(){},$u),me=((Ou=ct)&&(Ku.__proto__=Ou),((Ku.prototype=Object.create(Ou&&Ou.prototype)).constructor=Ku).prototype.initProperties=function(){Ou.prototype.initProperties.call(this),j(this,{FNC4:"FNC4",SHIFT:98})},Ku.prototype.addStart=function(){this.encoding.addPattern(this.START)},Ku.prototype.is=function(t,e){e=t.charCodeAt(e);return this.isCode(e)},Ku.prototype.move=function(t){for(var e=0;!this._moves[e].call(this,t)&&e<this._moves.length;)e++},Ku.prototype.pushState=function(t){var e,o=this.states,i=t.value,r=i.length;for(!dt("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++},Ku.prototype._initMoves=function(t){this._moves=[],dt(this.FNC4,t)&&this._moves.push(this._moveFNC),dt(this.shiftKey,t)&&this._moves.push(this._shiftState),this._moves.push(this._moveState)},Ku.prototype._moveFNC=function(t){if(t.fnc)return t.fnc=!1,t.previousState===this.key},Ku.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},Ku.prototype._moveState=function(){return this.encoding.addPattern(this.MOVE),!0},Ku),Zu={};function Ku(t,e){Ou.call(this,t),this.states=e,this._initMoves(e)}function $u(t){Iu.call(this),this.encoding=t,this.initProperties()}function Ju(){Lu.apply(this,arguments)}function td(){Vu.apply(this,arguments)}function ed(){ju.apply(this,arguments)}function od(){Du.apply(this,arguments)}function id(t,e){zu.call(this,t),this.states=e}function rd(t,e){Eu.call(this,t),this._initSubStates(e)}function nd(){Hu.apply(this,arguments)}function sd(){Uu.apply(this,arguments)}function ad(){Fu.apply(this,arguments)}Zu.A=((Fu=me)&&(ad.__proto__=Fu),((ad.prototype=Object.create(Fu&&Fu.prototype)).constructor=ad).prototype.initProperties=function(){Fu.prototype.initProperties.call(this),Qu(this,{key:"A",shiftKey:"B",MOVE:101,START:103})},ad.prototype.isCode=function(t){return 0<=t&&t<96},ad.prototype.getValue=function(t){return t<32?t+64:t-32},ad),Zu.B=((Uu=me)&&(sd.__proto__=Uu),((sd.prototype=Object.create(Uu&&Uu.prototype)).constructor=sd).prototype.initProperties=function(){Uu.prototype.initProperties.call(this),Qu(this,{key:"B",shiftKey:"A",MOVE:100,START:104})},sd.prototype.isCode=function(t){return 32<=t&&t<128},sd.prototype.getValue=function(t){return t-32},sd),Zu.C=((Hu=ct)&&(nd.__proto__=Hu),((nd.prototype=Object.create(Hu&&Hu.prototype)).constructor=nd).prototype.initProperties=function(){Hu.prototype.initProperties.call(this),Qu(this,{key:"C",MOVE:99,START:105})},nd.prototype.addStart=function(){this.encoding.addPattern(this.START)},nd.prototype.is=function(t,e){var o=wd(t,e,4);return(e+4<=t.length||2===t.length)&&Yu.test(o)},nd.prototype.move=function(){this.encoding.addPattern(this.MOVE)},nd.prototype.pushState=function(t){for(var e;(e=wd(t.value,t.index,2))&&Yu.test(e)&&2===e.length;)this.encoding.addPattern(parseInt(e,10)),t.index+=2},nd.prototype.getValue=function(t){return t},nd),Zu.FNC4=((Eu=ct)&&(rd.__proto__=Eu),((rd.prototype=Object.create(Eu&&Eu.prototype)).constructor=rd).prototype.initProperties=function(){Eu.prototype.initProperties.call(this),Qu(this,{key:"FNC4",dependentStates:["A","B"]})},rd.prototype.addStart=function(t){t=t.value.charCodeAt(0)-128,t=this._getSubState(t);this.encoding[t].addStart()},rd.prototype.is=function(t,e){e=t.charCodeAt(e);return this.isCode(e)},rd.prototype.isCode=function(t){return 128<=t&&t<256},rd.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},rd.prototype._pushStart=function(t){this.encoding.addPattern(this.encoding[t.state].MOVE),this.encoding.addPattern(this.encoding[t.state].MOVE)},rd.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},rd.prototype._initSubStates=function(t){this.subStates=[];for(var e=0;e<t.length;e++)dt(t[e],this.dependentStates)&&this.subStates.push(t[e])},rd.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]},rd.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},rd),Zu.FNC1=((zu=ct)&&(id.__proto__=zu),((id.prototype=Object.create(zu&&zu.prototype)).constructor=id).prototype.initProperties=function(){zu.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})},id.prototype.addStart=function(){this.encoding[this.startState].addStart()},id.prototype.is=function(){return dt(this.key,this.states)},id.prototype.pushState=function(t){var e,o,i,r=this.encoding,n=t.value.replace(/\s/g,""),s=new RegExp("["+this.startAI+this.endAI+"]","g"),a=t.index,p={state:this.startState};for(r.addPattern(this.START);;){if((e=(p.index=0)<(i=n.charAt(a)===this.startAI?2:0)?this.getBySeparator(n,a):this.getByLength(n,a)).ai.length)o=a+i+e.id.length+e.ai.length;else if((o=n.indexOf(this.startAI,a+1))<0){if(a+e.ai.max+e.id.length+i<n.length)throw new Error("Separators are required after variable length identifiers");o=n.length}if(p.value=n.substring(a,o).replace(s,""),this.validate(e,p.value),r.pushData(p,this.dependentStates),o>=n.length)break;a=o,p.state!==this.startState&&(r[this.startState].move(p),p.state=this.startState),e.ai.length||r.addPattern(this.START)}t.index=t.value.length},id.prototype.validate=function(t,e){var o=e.substr(t.id.length),e=t.ai;if(!e.type&&!Yu.test(o))throw new Error("Application identifier "+t.id+" is numeric only but contains non numeric character(s).");if("alphanumeric"===e.type&&!qu.test(o))throw new Error("Application identifier "+t.id+" is alphanumeric only but contains non alphanumeric character(s).");if(e.length&&e.length!==o.length)throw new Error("Application identifier "+t.id+" must be "+e.length+" characters long.");if(e.min&&e.min>o.length)throw new Error("Application identifier "+t.id+" must be at least "+e.min+" characters long.");if(e.max&&e.max<o.length)throw new Error("Application identifier "+t.id+" must be at most "+e.max+" characters long.")},id.prototype.getByLength=function(t,e){for(var o,i,r=2;r<=4;r++)if(o=wd(t,e,r),i=this.getApplicationIdentifier(o)||this.getApplicationIdentifier(o.substring(0,o.length-1)))return{id:o,ai:i};this.unsupportedAIError(o)},id.prototype.unsupportedAIError=function(t){throw new Error("'"+t+"' is not a supported Application Identifier")},id.prototype.getBySeparator=function(t,e){var o=t.indexOf(this.startAI,e),e=t.indexOf(this.endAI,o),o=t.substring(o+1,e),e=this.getApplicationIdentifier(o)||this.getApplicationIdentifier(o.substr(o.length-1));return e||this.unsupportedAIError(o),{ai:e,id:o}},id.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&&dt(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}},id);var pd,hd,ld,cd,ud,dd,ft=((dd=Z)&&(xd.__proto__=dd),((xd.prototype=Object.create(dd&&dd.prototype)).constructor=xd).prototype.initProperties=function(){dd.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})},xd.prototype._initStates=function(){for(var t=0;t<this.states.length;t++)this[this.states[t]]=new Zu[this.states[t]](this,this.states)},xd.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},xd.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())},xd.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))}},xd.prototype.addStart=function(t){this[t.state].addStart(t),this.position=1},xd.prototype.addCheckSum=function(){this.checksum=this.checkSum%103,this.addPattern(this.checksum)},xd.prototype.addStop=function(){this.addPattern(this.STOP)},xd.prototype.setBaseUnit=function(){this.baseUnit=this.width/(this.totalUnits+this.quietZoneLength)},xd.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++},xd.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))},xd),ue=((ud=ft)&&(md.__proto__=ud),((md.prototype=Object.create(ud&&ud.prototype)).constructor=md).prototype.initProperties=function(){ud.prototype.initProperties.call(this),Qu(this,{name:"Code 128 A",states:["A"]})},md),Zt=((cd=ft)&&(vd.__proto__=cd),((vd.prototype=Object.create(cd&&cd.prototype)).constructor=vd).prototype.initProperties=function(){cd.prototype.initProperties.call(this),Qu(this,{name:"Code 128 B",states:["B"]})},vd),G=((ld=ft)&&(yd.__proto__=ld),((yd.prototype=Object.create(ld&&ld.prototype)).constructor=yd).prototype.initProperties=function(){ld.prototype.initProperties.call(this),Qu(this,{name:"Code 128 C",states:["C"]})},yd),bt=((hd=ft)&&(fd.__proto__=hd),((fd.prototype=Object.create(hd&&hd.prototype)).constructor=fd).prototype.initProperties=function(){hd.prototype.initProperties.call(this),Qu(this,{name:"Code 128",states:["C","B","A","FNC4"]})},fd),Y=((pd=ft)&&(gd.__proto__=pd),((gd.prototype=Object.create(pd&&pd.prototype)).constructor=gd).prototype.initProperties=function(){pd.prototype.initProperties.call(this),Qu(this,{name:"Code GS1-128",states:["FNC1","C","B"]})},gd);function gd(){pd.apply(this,arguments)}function fd(){hd.apply(this,arguments)}function yd(){ld.apply(this,arguments)}function vd(){cd.apply(this,arguments)}function md(){ud.apply(this,arguments)}function xd(t){dd.call(this,t),this._initStates()}function wd(t,e,o){return t.substring(e,e+o)}var bd,_d,Ad,Cd,Sd,kd,Pd,Md=Object.assign,_e=((Pd=Z)&&(Ed.__proto__=Pd),((Ed.prototype=Object.create(Pd&&Pd.prototype)).constructor=Ed).prototype.initProperties=function(){Pd.prototype.initProperties.call(this),Md(this,{characterMap:["12121212","12121221","12122112","12122121","12211212","12211221","12212112","12212121","21121212","21121221"],START:"21",STOP:"121",checkSumType:"",checkSums:Td})},Ed.prototype.initValue=function(t,e){this.pattern=[],this.value=t,this.checkSumLength=0,this.width=e},Ed.prototype.setBaseUnit=function(){this.baseUnit=this.width/(12*(this.value.length+this.checkSumLength)+this.quietZoneLength+7)},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.STOP),this.setBaseUnit()},Ed.prototype.addCharacter=function(t){var e=this.characterMap[t];e||this.invalidCharacterError(t),this.addPattern(e)},Ed.prototype.addPattern=function(t){for(var e=0;e<t.length;e++)this.pattern.push(parseInt(t.charAt(e),10))},Ed.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]])},Ed),N=((kd=_e)&&(zd.__proto__=kd),((zd.prototype=Object.create(kd&&kd.prototype)).constructor=zd).prototype.initProperties=function(){kd.prototype.initProperties.call(this),Md(this,{name:"MSI Modulo10",checkSumType:"Modulo10"})},zd),me=((Sd=_e)&&(Dd.__proto__=Sd),((Dd.prototype=Object.create(Sd&&Sd.prototype)).constructor=Dd).prototype.initProperties=function(){Sd.prototype.initProperties.call(this),Md(this,{name:"MSI Modulo11",checkSumType:"Modulo11"})},Dd),ct=((Cd=_e)&&(jd.__proto__=Cd),((jd.prototype=Object.create(Cd&&Cd.prototype)).constructor=jd).prototype.initProperties=function(){Cd.prototype.initProperties.call(this),Md(this,{name:"MSI Modulo10 Modulo10",checkSumType:"Modulo10Modulo10"})},jd),ft=((Ad=_e)&&(Vd.__proto__=Ad),((Vd.prototype=Object.create(Ad&&Ad.prototype)).constructor=Vd).prototype.initProperties=function(){Ad.prototype.initProperties.call(this),Md(this,{name:"MSI Modulo11 Modulo10",checkSumType:"Modulo11Modulo10"})},Vd),Td={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))}},Bd=Object.assign,_e=((_d=Z)&&(Ld.__proto__=_d),((Ld.prototype=Object.create(_d&&_d.prototype)).constructor=Ld).prototype.initProperties=function(){_d.prototype.initProperties.call(this),Bd(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]}})},Ld.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},Ld.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)},Ld.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)},Ld.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])},Ld.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},Ld),Rd=Object.assign,Z=((bd=_e)&&(Id.__proto__=bd),((Id.prototype=Object.create(bd&&bd.prototype)).constructor=Id).prototype.initProperties=function(){bd.prototype.initProperties.call(this),Rd(this,{name:"EAN 8"})},Id.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)},Id),Od={code11:qt,code39:ke,code39extended:tt,code93:K,code93extended:it,code128:bt,code128a:ue,code128b:Zt,code128c:G};function Id(){bd.apply(this,arguments)}function Ld(){_d.apply(this,arguments)}function Vd(){Ad.apply(this,arguments)}function jd(){Cd.apply(this,arguments)}function Dd(){Sd.apply(this,arguments)}function zd(){kd.apply(this,arguments)}function Ed(){Pd.apply(this,arguments)}Od["gs1-128"]=Y,Od.msimod10=N,Od.msimod11=me,Od.msimod1010=ct,Od.msimod1110=ft,Od.postnet=q,Od.ean8=Z,Od.ean13=_e;var Hd,q=((Hd=P.Class)&&(Ud.__proto__=Hd),((Ud.prototype=Object.create(Hd&&Hd.prototype)).constructor=Ud).prototype.destroy=function(){this._destroySurface()},Ud.prototype._initElement=function(){p(this.element,"k-barcode"),this.element.style.display="block"},Ud.prototype._initSurface=function(){var t=this.options,e=this.surface;e&&e.options.type===t.renderAs||(this._destroySurface(),this._initSurfaceElement(),this.surface=this._createSurface())},Ud.prototype._createSurface=function(){return P.drawing.Surface.create(this.surfaceElement,{type:this.options.renderAs})},Ud.prototype._destroySurface=function(){this.surface&&(this.surface.destroy(),this.surface=null,this._destroySurfaceElement())},Ud.prototype._initSurfaceElement=function(){this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.surfaceElement.style.position="relative",this.element.appendChild(this.surfaceElement))},Ud.prototype._destroySurfaceElement=function(){this.surfaceElement&&this.surfaceElement.parentNode&&(this.surfaceElement.parentNode.removeChild(this.surfaceElement),this.surfaceElement=null)},Ud.prototype.setOptions=function(t){this._setOptions(t),this.redraw()},Ud.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)},Ud.prototype.getSize=function(){return{width:this.element.offsetWidth,height:this.element.offsetHeight}},Ud.prototype._resize=function(){this.redraw()},Ud.prototype.createVisual=function(){this.visual=this._render()},Ud.prototype._render=function(){var t=this.options,e=t.value,o=t.text,i=U(o.margin),r=this._getSize(),n=t.border||{},s=this.encoding,a=new re(0,0,r.width,r.height).unpad(n.width).unpad(t.padding),p=a.height(),n=new P.drawing.Group;return this.contentBox=a,n.append(this._getBackground(r)),o.visible&&(p-=P.drawing.util.measureText(e,{font:o.font}).height+i.top+i.bottom),a=s.encode(e,a.width(),p),o.visible&&(e=e,t.checksum&&Ct(s.checksum)&&(e+=" "+s.checksum),n.append(this._getText(e))),this.barHeight=p,this._bandsGroup=this._getBands(a.pattern,a.baseUnit),n.append(this._bandsGroup),n},Ud.prototype.exportVisual=function(){return this._render()},Ud.prototype._getSize=function(){var t=this.element,e=t.clientWidth,o=t.clientHeight,t=new P.geometry.Size(300,100);return 0<e&&(t.width=e),o&&(t.height=o),this.options.width&&(t.width=this.options.width),this.options.height&&(t.height=this.options.height),t},Ud.prototype.value=function(t){if(!Ct(t))return this.options.value;this.options.value=String(t),this.redraw()},Ud.prototype._getBands=function(t,e){for(var o=this.contentBox,i=o.x1,r=new P.drawing.Group,n=0;n<t.length;n++){var s,a=(s=D(t[n])?t[n]:{width:t[n],y1:0,y2:this.barHeight}).width*e;n%2&&(s=P.geometry.Rect.fromPoints(new P.geometry.Point(i,s.y1+o.y1),new P.geometry.Point(i+a,s.y2+o.y1)),s=P.drawing.Path.fromRect(s,{fill:{color:this.options.color},stroke:null}),r.append(s)),i+=a}return r},Ud.prototype._getBackground=function(t){var e=this.options,o=e.border||{},t=new re(0,0,t.width,t.height).unpad(o.width/2);return P.drawing.Path.fromRect(t.toRect(),{fill:{color:e.background},stroke:{color:o.width?o.color:"",width:o.width,dashType:o.dashType}})},Ud.prototype._getText=function(t){var e=this.options.text,e=this._textbox=new Ne(t,{font:e.font,color:e.color,align:"center",vAlign:"bottom",margin:e.margin});return e.reflow(this.contentBox),e.renderVisual(),e.visual},Ud.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),!Od[this.type])throw new Error("Encoding "+this.type+" is not supported.");this.encoding=new Od[this.type],this.options=j({},this.options,t)},Ud);function Ud(t,e){Hd.call(this),this.options=j({},this.options,e),this.element=t,this._initElement(),this._initSurface(),this._setOptions(e),e&&Ct(e.value)&&this.redraw()}zt(q,{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}});var Fd=q,Gd=Object.assign;function Nd(t,e){for(var o=[],i=0;i<t.length;)o.push(t.substring(i,i+e)),i+=e;return o}function Wd(t,e){t=Number(t).toString(2);return t=t.length<e?new Array(e-t.length+1).join(0)+t:t}function Xd(t){return parseInt(t,2)}var Yd,qd,Qd,Zd,Kd,$d,Jd,tg=((Jd=P.Class)&&(lg.__proto__=Jd),((lg.prototype=Object.create(Jd&&Jd.prototype)).constructor=lg).prototype.move=function(){this.row+=this.dir*this.c,this.c^=1,this.column=this.startColumn-this.c},lg.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}},lg.prototype.getNextRemainderCell=function(){if(this.move(),void 0===this.matrix[this.row][this.column])return{row:this.row,column:this.column}},lg),eg=(($d=P.Class)&&(hg.__proto__=$d),(hg.prototype=Object.create($d&&$d.prototype)).constructor=hg),og=((Kd=P.Class)&&(pg.__proto__=Kd),((pg.prototype=Object.create(Kd&&Kd.prototype)).constructor=pg).prototype.getEncodingResult=function(n,t){var e=function(){var t,e=[],o=0,i=n;for(e.push(Ug(i,Bg,Rg,Og,t)),t=e[0].mode,i=i.substr(e[0].modeString.length);0<i.length;){var r=Ug(i,Ig,Lg,Vg,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=Fg(function(t){for(var e=0,o=0;o<t.length;o++)e+=ig[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+=ig[t[i].mode].encode(t[i].modeString,e);return o}(e,t);return new eg(e,t)},pg),Z=((Zd=P.Class)&&(ag.__proto__=Zd),((ag.prototype=Object.create(Zd&&Zd.prototype)).constructor=ag).prototype.initProperties=function(){Gd(this,{modeIndicator:"",bitsInCharacterCount:[]})},ag.prototype.getVersionIndex=function(t){return t<10?0:26<t?2:1},ag.prototype.getBitsCharacterCount=function(t){return this.bitsInCharacterCount[this.getVersionIndex(t||40)]},ag.prototype.getModeCountString=function(t,e){return this.modeIndicator+Wd(t,this.getBitsCharacterCount(e))},ag.prototype.encode=function(){},ag.prototype.getStringBitsLength=function(){},ag.prototype.getValue=function(){},ag),_e=((Qd=Z)&&(sg.__proto__=Qd),((sg.prototype=Object.create(Qd&&Qd.prototype)).constructor=sg).prototype.initProperties=function(){Qd.prototype.initProperties.call(this),Gd(this,{bitsInCharacterCount:[10,12,14],modeIndicator:"0001"})},sg.prototype.getValue=function(t){return parseInt(t,10)},sg.prototype.encode=function(t,e){for(var o=Nd(t,3),i=this.getModeCountString(t.length,e),r=0;r<o.length-1;r++)i+=Wd(o[r],10);return i+Wd(o[r],1+3*o[r].length)},sg.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)},sg),q=((qd=Z)&&(ng.__proto__=qd),((ng.prototype=Object.create(qd&&qd.prototype)).constructor=ng).prototype.initProperties=function(){qd.prototype.initProperties.call(this),Gd(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"})},ng.prototype.getValue=function(t){return this.characters[t]},ng.prototype.encode=function(t,e){for(var o=Nd(t,2),i=this.getModeCountString(t.length,e),r=0;r<o.length-1;r++)i+=Wd(45*this.getValue(o[r].charAt(0))+this.getValue(o[r].charAt(1)),11);return i+Wd(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)},ng.prototype.getStringBitsLength=function(t,e){return 4+this.getBitsCharacterCount(e)+11*Math.floor(t/2)+t%2*6},ng),Z=((Yd=Z)&&(rg.__proto__=Yd),((rg.prototype=Object.create(Yd&&Yd.prototype)).constructor=rg).prototype.initProperties=function(){Yd.prototype.initProperties.call(this),Gd(this,{bitsInCharacterCount:[8,16,16],modeIndicator:"0100"})},rg.prototype.getValue=function(t){var e=t.charCodeAt(0);if(e<=127||160<=e&&e<=255)return e;throw new Error("Unsupported character: "+t)},rg.prototype.encode=function(t,e){for(var o=this.getModeCountString(t.length,e),i=0;i<t.length;i++)o+=Wd(this.getValue(t.charAt(i)),8);return o},rg.prototype.getStringBitsLength=function(t,e){return 4+this.getBitsCharacterCount(e)+8*t},rg),ig={};function rg(){Yd.apply(this,arguments)}function ng(){qd.apply(this,arguments)}function sg(){Qd.apply(this,arguments)}function ag(){Zd.call(this),this.initProperties()}function pg(){Kd.apply(this,arguments)}function hg(t,e){$d.call(this),this.dataString=t,this.version=e}function lg(t){Jd.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}ig.numeric=new _e,ig.alphanumeric=new q,ig.byte=new Z;var cg,ug=((cg=P.Class)&&(Dg.__proto__=cg),((Dg.prototype=Object.create(cg&&cg.prototype)).constructor=Dg).prototype.initProperties=function(){Gd(this,{encodingMode:"byte",utfBOM:"111011111011101110111111",initialModeCountStringLength:20,ranges:[128,2048,65536,2097152,67108864]})},Dg.prototype.getEncodingResult=function(t,e){t=this.encode(t),e=Fg(this.getDataCodewordsCount(t),e),t=this.mode.getModeCountString(t.length/8,e)+t;return new eg(t,e)},Dg.prototype.getDataCodewordsCount=function(t){t=t.length;return Math.ceil((this.initialModeCountStringLength+t)/8)},Dg.prototype.encode=function(t){for(var e=this.utfBOM,o=0;o<t.length;o++)e+=this.encodeCharacter(t.charCodeAt(o));return e},Dg.prototype.encodeCharacter=function(t){var e=this.getBytesCount(t),o=e-1,i="";if(1===e)i=Wd(t,8);else{for(var e=8-e,r=0;r<o;r++)i=Wd(t>>6*r&63|128,8)+i;i=(t>>6*o|255>>e<<e).toString(2)+i}return i},Dg.prototype.getBytesCount=function(t){for(var e=this.ranges,o=0;o<e.length;o++)if(t<e[o])return o+1},Dg),dg=[{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}}],gg="numeric",fg="alphanumeric",yg="byte",vg={1:0},mg={0:1},xg={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},wg=[1,0,1,1,1],bg=[1,0,1],_g={L:"01",M:"00",Q:"11",H:"10"},Ag=["11101100","00010001"],Cg=93,Sg=[function(t,e){return(t+e)%2==0},function(t){return t%2==0},function(t){return t%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}],kg=/^\d+/,Pg=new RegExp("^[A-Z $%*+./:-]+"),Mg=new RegExp("^[A-Z0-9 $%*+./:-]+"),Tg=new RegExp("^[^A-Z0-9 $%*+./:-]+"),Bg=8,Rg=5,Og=8,Ig=17,Lg=9,Vg=16,jg=[[1,0],[1,25,0]];function Dg(){cg.call(this),this.initProperties(),this.mode=ig[this.encodingMode]}function zg(t,e,o,i){for(var r=0;r<t.length;r++)t[r][o][i]=e}function Eg(t,e,o,i){for(var r=0;r<Sg.length;r++)t[r][o][i]=Sg[r](o,i)?1^e:parseInt(e,10)}function Hg(t,e){for(var o,i=jg[e-1],r=new Array(e).concat(t),n=new Array(r.length-i.length).concat(i),s=t.length,a=[],p=0;p<s;p++)o=function(t,e){for(var o=[],i=t.length-1;o[i]=mg[(t[i]+e)%255],void 0!==t[--i];);return o}(n,vg[r[r.length-1]]),n.splice(0,1),r=function(t,e){for(var o=[],i=t.length-2;0<=i;i--)o[i]=t[i]^e[i];return o}(o,r);for(p=r.length-1;0<=p;p--)a[e-1-p]=Wd(r[p],8);return a}function Ug(t,e,o,i,r){var n,s=kg.exec(t),a=s?s[0]:"",p=Pg.exec(t),s=p?p[0]:"",p=Mg.exec(t),p=p?p[0]:"",t=a&&(a.length>=e||t.length===a.length||a.length>=o&&!Mg.test(t.charAt(a.length)))?(n=gg,a):p&&(t.length===p.length||p.length>=i||r===fg)?(n=fg,a||s):(n=yg,p?p+Tg.exec(t.substring(p.length))[0]:Tg.exec(t)[0]);return{mode:n,modeString:t}}function Fg(t,e){for(var o=0,i=dg.length-1,r=Math.floor(dg.length/2);t<dg[r][e].totalDataCodewords?i=r:o=r,r=o+Math.floor((i-o)/2),1<i-o;);return t<=dg[o][e].totalDataCodewords?r+1:i+1}function Gg(t,e,o){var i=Xd(e),r=e.length-1,e=t<<r,o=Wd(t,o-r),i=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}(e,i);return o+Wd(i,r)}function Ng(t,e){return parseInt(t.charAt(e),10)}function Wg(t,e){for(var o=t[0],i=0,r=e.length,n=0,s=8;n<=8;n++)6!==n&&zg(t,Ng(e,r-1-i++),n,s);for(n=8,s=7;0<=s;s--)6!==s&&zg(t,Ng(e,r-1-i++),n,s);for(i=0,s=o.length-1,n=8;s>=o.length-8;s--)zg(t,Ng(e,r-1-i++),n,s);for(zg(t,1,o.length-8,8),n=o.length-7,s=8;n<o.length;n++)zg(t,Ng(e,r-1-i++),n,s)}function Xg(t,e){for(var o,i,r,n=t[0].length,s=n-11,a=n-11,p=0;p<e.length;p++)o=Math.floor(p/3),i=p%3,zg(t,r=Ng(e,e.length-p-1),0+o,s+i),zg(t,r,a+i,0+o)}function Yg(t,e,o,i){for(var r,n=e.length+2,s=e.length+1,a=0;a<e.length;a++)for(var p=a;p<n-a;p++)zg(t,r=e[a],o+p,i+a),zg(t,r,o+a,i+p),zg(t,r,o+s-p,i+s-a),zg(t,r,o+s-a,i+s-p)}function qg(t,e,o,i){for(var r=o,n=i,s=t[0];zg(t,0,r,i),zg(t,0,o,n),r+=e[0],n+=e[1],0<=r&&r<s.length;);}function Qg(t,e,o,i,r){e[t][i]=(e[t][i]<<1^r)%128,e[t][i]===Cg&&(o[t]+=40)}function Zg(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 Kg(t,e,o){var i=(new(o&&0<=o.toLowerCase().indexOf("utf_8")?ug:og)).getEncodingResult(t,e),r=i.version,n=dg[r-1][e],s=function(t,e){for(var o,i=0,r=[],n=[],s=e.groups,a=0;a<s.length;a++)for(var p=s[a][0],h=0;h<p;h++){for(var l=s[a][1],c=[],u=[],d=1;d<=l;d++)o=t.substring(i,i+8),c.push(o),u[l-d]=Xd(o),i+=8;r.push(c),n.push(Hg(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+=Ag[i],i^=1;return r}(i.dataString),n),o=function(){for(var t=[],e=17+4*r,o=0;o<Sg.length;o++){t[o]=new Array(e);for(var i=0;i<e;i++)t[o][i]=new Array(e)}return t}();i=(t=o)[0].length,Yg(t,wg,0,0),qg(t,[-1,-1],7,7),Yg(t,wg,i-7,0),qg(t,[1,-1],i-8,7),Yg(t,wg,0,i-7),qg(t,[-1,1],7,i-8),function(t,e){if(!(e<2)){var o,i=t[0],r=i.length,n=Math.floor(e/7),s=[6],a=0;for((e=xg[e])?o=(r-13-e)/n:e=o=(r-13)/(n+1),s.push(s[a++]+e);s[a]+o<r;)s.push(s[a++]+o);for(var p=0;p<s.length;p++)for(var h=0;h<s.length;h++)void 0===i[s[p]][s[h]]&&Yg(t,bg,s[p]-2,s[h]-2)}}(o,r),function(t){for(var e=1,o=t[0].length,i=8;i<o-8;i++)zg(t,e,6,i),zg(t,e,i,6),e^=1}(o),7<=r&&Xg(o,Wd(0,18)),Wg(o,Wd(0,15)),function(t,e){for(var o,i,r,n=new tg(t[0]),s=0;s<e.length;s++)for(o=e[s],i=0;0<o.length;){for(var a=0;a<o.length;a++)for(var p=0;p<8;p++)r=n.getNextCell(),Eg(t,o[a][i].charAt(p),r.row,r.column);for(i++;o[0]&&i===o[0].length;)o.splice(0,1)}for(;r=n.getNextRemainderCell();)Eg(t,0,r.row,r.column)}(o,s);s=function(t){for(var e,o=[],i=[],r=[],n=[],s=[],a=t[0].length,p=0;p<t.length;p++)o[p]=0,r[p]=0,s[p]=[0,0],n[p]=[0,0],i[p]=[];for(var h=0;h<a;h++)for(var l=0;l<a;l++)for(var c=0;c<t.length;c++)e=t[c],r[c]+=parseInt(e[h][l],10),i[c][0]===e[h][l]&&h+1<a&&0<=l-1&&e[h+1][l]===i[c][0]&&e[h+1][l-1]===i[c][0]&&(o[c]+=3),Qg(c,n,o,0,e[h][l]),Qg(c,n,o,1,e[l][h]),Zg(c,o,i,e[h][l],s,0),Zg(c,o,i,e[l][h],s,1);var u,d,g,f,y=a*a,v=Number.MAX_VALUE;for(p=0;p<o.length;p++)o[p]+=(d=r[p],g=y,f=void 0,f=Math.floor(d/g*100),d=f%5,g=Math.abs(f-d-50),d=Math.abs(f+5-d-50),10*Math.min(g/5,d/5)),o[p]<v&&(v=o[p],u=p);return u}(o),o=o[s];return 7<=r&&Xg([o],Gg(r,"1111100100101",18)),Wg([o],function(t){var e="";if(0===Xd(t))return"101010000010010";for(var o=Gg(Xd(t),"10100110111",15),i=0;i<o.length;i++)e+=o.charAt(i)^"101010000010010".charAt(i);return e}(_g[e]+Wd(s,3))),o}!function(){for(var t,e=1;e<255;e++)255<(t=2*mg[e-1])&&(t^=285),mg[e]=t,vg[t]=e;t=2*mg[e-1]^285,mg[e]=t,mg[-1]=0}(),function(){for(var t=2;t<=68;t++){var e=jg[t-1];jg[t]=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]=vg[mg[o[i+r]]^mg[(t[i]+e[r])%255]];return o}(e,[t,0])}}();var $g,Jg=Math.round,tf=[[0,1],[1,1],[1,2],[2,2],[2,1],[3,1],[3,0],[2,0],[2,-1],[1,-1],[1,0]],ef=[[0,1],[1,1],[1,0]],Z=(($g=P.Class)&&(of.__proto__=$g),((of.prototype=Object.create($g&&$g.prototype)).constructor=of).prototype.destroy=function(){this._destroySurface()},of.prototype._initElement=function(){p(this.element,"k-qrcode"),this.element.style.display="block"},of.prototype._initSurface=function(){var t=this.options,e=this.surface;e&&e.options.type===t.renderAs||(this._destroySurface(),this._initSurfaceElement(),this.surface=this._createSurface())},of.prototype._createSurface=function(){return P.drawing.Surface.create(this.surfaceElement,{type:this.options.renderAs})},of.prototype._destroySurface=function(){this.surface&&(this.surface.destroy(),this.surface=null,this._destroySurfaceElement())},of.prototype._initSurfaceElement=function(){this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.surfaceElement.style.position="relative",this.element.appendChild(this.surfaceElement))},of.prototype._destroySurfaceElement=function(){this.surfaceElement&&this.surfaceElement.parentNode&&(this.surfaceElement.parentNode.removeChild(this.surfaceElement),this.surfaceElement=null)},of.prototype.redraw=function(){var t=this._getSize();this.surface.clear(),this.surface.setSize({width:t,height:t}),this.createVisual(),this.surface.draw(this.visual)},of.prototype.getSize=function(){var t=this.element,e=t.clientWidth,o=t.clientHeight,t={width:0,height:0};return 0<e&&(t.width=e),o&&(t.height=o),t},of.prototype._resize=function(){this.redraw()},of.prototype.createVisual=function(){this.visual=this._render()},of.prototype.exportVisual=function(){return this._render()},of.prototype._render=function(){var t,e,o,i=this._value,r=this.options.border||{},n=this.options.padding||0,s=r.width||0;r.width=s;var a=new P.drawing.Group;return i&&(t=Kg(i,this.options.errorCorrection,this.options.encoding),o=(e=this._getSize())-2*(s+n),i=this._calculateBaseUnit(o,t.length),o=s+n+(o-t.length*i)/2,a.append(this._renderBackground(e,r)),a.append(this._renderMatrix(t,i,o)),this._hasCustomLogo()?a.append(this._renderLogo(e,i)):this._isSwiss()&&a.append(this._renderSwissCode(e,i))),a},of.prototype._renderLogo=function(t,e){var o=Jg(t/2),t=this._getLogoSize(7*e),e=this.options.overlay.imageUrl,o={x:o-t.width/2,y:o-t.height/2},t=new P.geometry.Rect(new P.geometry.Point(o.x,o.y),new P.geometry.Size(t.width,t.height));return new P.drawing.Image(e,t)},of.prototype._renderSwissCode=function(t,e){var o=this._getLogoSize(7*e),i=(o=Math.max(o.width,o.height))/4,r=i/2,n=t/2,s={},t=new P.drawing.Group;return s.x=s.y=Math.ceil(n-e-o/2),t.append(this._renderShape(s,Math.ceil(o+2*e),ef,"#fff")),s.x=s.y=n-o/2,t.append(this._renderShape(s,o,ef,this.options.color)),s.x=n+r-o/2,s.y=n+r+i-o/2,t.append(this._renderShape(s,i,tf,"#fff")),t},of.prototype._renderShape=function(t,e,o,i){var r=new P.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},of.prototype._getSize=function(){var t;return this.options.size?parseInt(this.options.size,10):(t=this.element,0<(t=Math.min(t.clientWidth,t.clientHeight))?t:200)},of.prototype._calculateBaseUnit=function(t,e){var o=Math.floor(t/e);if(o<1)throw new Error("Insufficient size.");return t<=o*e&&1<=o-1&&o--,o},of.prototype._renderMatrix=function(t,e,o){for(var i=new P.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 p=Jg(o+a*e),h=Jg(n),l=Jg(o+s*e),a=Jg(n+e);i.moveTo(p,h).lineTo(p,a).lineTo(l,a).lineTo(l,h).close()}}return i},of.prototype._renderBackground=function(t,e){t=new re(0,0,t,t).unpad(e.width/2);return P.drawing.Path.fromRect(t.toRect(),{fill:{color:this.options.background},stroke:{color:e.color,width:e.width}})},of.prototype.setOptions=function(t){this.options=Gd(this.options,t||{}),void 0!==t.value&&(this._value=String(this.options.value)),this.redraw()},of.prototype.value=function(t){if(void 0===t)return this._value;this._value=String(t),this.redraw()},of.prototype._hasCustomLogo=function(){return Boolean(this.options.overlay.imageUrl)},of.prototype._isSwiss=function(){return"swiss"===this.options.overlay.type},of.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}},of);function of(t,e){$g.call(this),this.options=j({},this.options,e),this.element=t,this.wrapper=this.element,this._initElement(),this._initSurface(),this.setOptions(e)}zt(Z,{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 rf(){return{icon:{border:{width:1}},label:{font:af,padding:3},line:{length:10,width:2},visible:!0}}function nf(t){return{axisDefaults:{labels:{font:af},notes:rf(),title:{font:pf,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:rf(),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:pf},legend:{labels:{font:af}}}}var sf=Z,Z="Arial, Helvetica, sans-serif",af="12px "+Z,pf="16px "+Z;o.d(e,"autoMajorUnit",function(){return $t}),o.d(e,"Point",function(){return te}),o.d(e,"Box",function(){return re}),o.d(e,"Ring",function(){return le}),o.d(e,"Sector",function(){return ce}),o.d(e,"ShapeBuilder",function(){return ve}),o.d(e,"ShapeElement",function(){return Me}),o.d(e,"ChartElement",function(){return be}),o.d(e,"BoxElement",function(){return Se}),o.d(e,"RootElement",function(){return Ie}),o.d(e,"FloatElement",function(){return je}),o.d(e,"Text",function(){return Ee}),o.d(e,"TextBox",function(){return Ne}),o.d(e,"Title",function(){return qe}),o.d(e,"AxisLabel",function(){return Ke}),o.d(e,"Axis",function(){return ro}),o.d(e,"Note",function(){return Je}),o.d(e,"CategoryAxis",function(){return Uo}),o.d(e,"DateCategoryAxis",function(){return Ko}),o.d(e,"DateValueAxis",function(){return hi}),o.d(e,"NumericAxis",function(){return si}),o.d(e,"LogarithmicAxis",function(){return gi}),o.d(e,"PolarAxis",function(){return xi}),o.d(e,"RadarCategoryAxis",function(){return vi}),o.d(e,"RadarNumericAxis",function(){return Ci}),o.d(e,"RadarLogarithmicAxis",function(){return ki}),o.d(e,"CurveProcessor",function(){return Bi}),o.d(e,"Gradients",function(){return Te}),o.d(e,"rectToBox",function(){return He}),o.d(e,"Aggregates",function(){return Ui}),o.d(e,"AreaChart",function(){return tn}),o.d(e,"AreaSegment",function(){return Wr}),o.d(e,"AxisGroupRangeTracker",function(){return en}),o.d(e,"Bar",function(){return cn}),o.d(e,"BarChart",function(){return An}),o.d(e,"BarLabel",function(){return an}),o.d(e,"BoxPlotChart",function(){return Dn}),o.d(e,"BoxPlot",function(){return Vn}),o.d(e,"BubbleChart",function(){return $n}),o.d(e,"Bullet",function(){return rs}),o.d(e,"BulletChart",function(){return as}),o.d(e,"CandlestickChart",function(){return Bn}),o.d(e,"Candlestick",function(){return Sn}),o.d(e,"CategoricalChart",function(){return _r}),o.d(e,"CategoricalErrorBar",function(){return fr}),o.d(e,"CategoricalPlotArea",function(){return La}),o.d(e,"Chart",function(){return Al}),o.d(e,"ChartContainer",function(){return ms}),o.d(e,"ClipAnimation",function(){return zr}),o.d(e,"ClusterLayout",function(){return vn}),o.d(e,"Crosshair",function(){return fs}),o.d(e,"CrosshairTooltip",function(){return us}),o.d(e,"DefaultAggregates",function(){return Ys}),o.d(e,"DonutChart",function(){return ih}),o.d(e,"DonutPlotArea",function(){return rh}),o.d(e,"DonutSegment",function(){return $p}),o.d(e,"ErrorBarBase",function(){return gr}),o.d(e,"ErrorRangeCalculator",function(){return Zi}),o.d(e,"Highlight",function(){return Da}),o.d(e,"SharedTooltip",function(){return wp}),o.d(e,"Legend",function(){return sp}),o.d(e,"LegendItem",function(){return Ja}),o.d(e,"LegendLayout",function(){return $a}),o.d(e,"LineChart",function(){return Nr}),o.d(e,"LinePoint",function(){return kr}),o.d(e,"LineSegment",function(){return Mr}),o.d(e,"Pane",function(){return bs}),o.d(e,"PieAnimation",function(){return Tp}),o.d(e,"PieChart",function(){return Yp}),o.d(e,"PieChartMixin",function(){return Fp}),o.d(e,"PiePlotArea",function(){return qp}),o.d(e,"PieSegment",function(){return Up}),o.d(e,"PlotAreaBase",function(){return Es}),o.d(e,"PlotAreaEventsMixin",function(){return Hs}),o.d(e,"PlotAreaFactory",function(){return pp}),o.d(e,"PointEventsMixin",function(){return Ar}),o.d(e,"RangeBar",function(){return Zs}),o.d(e,"RangeBarChart",function(){return ta}),o.d(e,"RangeAreaPoint",function(){return aa}),o.d(e,"RangeAreaChart",function(){return xa}),o.d(e,"ScatterChart",function(){return Xn}),o.d(e,"ScatterErrorBar",function(){return zn}),o.d(e,"ScatterLineChart",function(){return Op}),o.d(e,"Selection",function(){return fp}),o.d(e,"SeriesAggregator",function(){return Gs}),o.d(e,"SeriesBinder",function(){return Yi}),o.d(e,"SplineSegment",function(){return Vr}),o.d(e,"SplineAreaSegment",function(){return Jr}),o.d(e,"StackWrap",function(){return wn}),o.d(e,"Tooltip",function(){return yp}),o.d(e,"OHLCChart",function(){return ba}),o.d(e,"OHLCPoint",function(){return wa}),o.d(e,"WaterfallChart",function(){return Ma}),o.d(e,"WaterfallSegment",function(){return Pa}),o.d(e,"XYPlotArea",function(){return jp}),o.d(e,"MousewheelZoom",function(){return Ka}),o.d(e,"ZoomSelection",function(){return Za}),o.d(e,"Pannable",function(){return Na}),o.d(e,"ChartAxis",function(){return Ri}),o.d(e,"ChartPane",function(){return ji}),o.d(e,"ChartPlotArea",function(){return Di}),o.d(e,"findAxisByName",function(){return Li}),o.d(e,"anyHasZIndex",function(){return Er}),o.d(e,"appendIfNotNull",function(){return _s}),o.d(e,"areNumbers",function(){return kn}),o.d(e,"bindSegments",function(){return Cs}),o.d(e,"categoriesCount",function(){return mr}),o.d(e,"countNumbers",function(){return Ei}),o.d(e,"equalsIgnoreCase",function(){return Ss}),o.d(e,"evalOptions",function(){return vr}),o.d(e,"filterSeriesByType",function(){return ks}),o.d(e,"getDateField",function(){return Ps}),o.d(e,"getField",function(){return Fi}),o.d(e,"hasGradientOverlay",function(){return pn}),o.d(e,"hasValue",function(){return Fn}),o.d(e,"isDateAxis",function(){return Ms}),o.d(e,"segmentVisible",function(){return As}),o.d(e,"singleItemOrArray",function(){return Ts}),o.d(e,"createOutOfRangePoints",function(){return Is}),o.d(e,"ChartService",function(){return J}),o.d(e,"DomEventsBuilder",function(){return et}),o.d(e,"FormatService",function(){return Q}),o.d(e,"IntlService",function(){return W}),o.d(e,"TemplateService",function(){return rt}),o.d(e,"Sparkline",function(){return Il}),o.d(e,"Navigator",function(){return Wl}),o.d(e,"NavigatorHint",function(){return El}),o.d(e,"StockChart",function(){return ql}),o.d(e,"constants",function(){return i}),o.d(e,"Gauge",function(){return ac}),o.d(e,"LinearGauge",function(){return Ec}),o.d(e,"LinearPointer",function(){return wc}),o.d(e,"ArrowLinearPointer",function(){return Pc}),o.d(e,"BarLinearPointer",function(){return Vc}),o.d(e,"LinearScale",function(){return fc}),o.d(e,"RadialGauge",function(){return au}),o.d(e,"RadialPointer",function(){return iu}),o.d(e,"RadialScale",function(){return qc}),o.d(e,"ArcGauge",function(){return xu}),o.d(e,"RangePointer",function(){return mu}),o.d(e,"ArcScale",function(){return lu}),o.d(e,"CircularGauge",function(){return wu}),o.d(e,"Barcode",function(){return Fd}),o.d(e,"QRCode",function(){return sf}),o.d(e,"addClass",function(){return p}),o.d(e,"removeClass",function(){return b}),o.d(e,"alignPathToPixel",function(){return M}),o.d(e,"clockwise",function(){return T}),o.d(e,"convertableToNumber",function(){return O}),o.d(e,"deepExtend",function(){return j}),o.d(e,"elementStyles",function(){return H}),o.d(e,"getSpacing",function(){return U}),o.d(e,"getTemplate",function(){return nt}),o.d(e,"getter",function(){return pt}),o.d(e,"grep",function(){return ht}),o.d(e,"hasClasses",function(){return lt}),o.d(e,"HashMap",function(){return ut}),o.d(e,"inArray",function(){return dt}),o.d(e,"interpolateValue",function(){return gt}),o.d(e,"InstanceObserver",function(){return yt}),o.d(e,"isArray",function(){return x}),o.d(e,"isFunction",function(){return I}),o.d(e,"isNumber",function(){return B}),o.d(e,"isObject",function(){return D}),o.d(e,"isString",function(){return R}),o.d(e,"map",function(){return vt}),o.d(e,"mousewheelDelta",function(){return xt}),o.d(e,"FontLoader",function(){return Dt}),o.d(e,"setDefaultOptions",function(){return zt}),o.d(e,"sparseArrayLimits",function(){return Et}),o.d(e,"styleValue",function(){return z}),o.d(e,"find",function(){return Ht}),o.d(e,"elementScale",function(){return Nt}),o.d(e,"autoTextColor",function(){return Wt}),o.d(e,"createHashSet",function(){return Kt}),o.d(e,"append",function(){return _t}),o.d(e,"bindEvents",function(){return At}),o.d(e,"Class",function(){return P.Class}),o.d(e,"defined",function(){return Ct}),o.d(e,"deg",function(){return St}),o.d(e,"elementOffset",function(){return kt}),o.d(e,"elementSize",function(){return Pt}),o.d(e,"eventElement",function(){return Mt}),o.d(e,"eventCoordinates",function(){return Tt}),o.d(e,"last",function(){return Bt}),o.d(e,"limitValue",function(){return Rt}),o.d(e,"logToConsole",function(){return P.logToConsole}),o.d(e,"objectKey",function(){return Ot}),o.d(e,"rad",function(){return It}),o.d(e,"round",function(){return Lt}),o.d(e,"unbindEvents",function(){return Vt}),o.d(e,"valueOrDefault",function(){return jt}),o.d(e,"chartBaseTheme",function(){return nf}),function(t){for(var e in t)hf(e,t[e])}(e)}],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(mf){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;r={},i.m=o=[function(t,e){t.exports=n},function(t,e,o){"use strict";o.r(e);var i={};o.d(i,"NAVIGATOR_AXIS",function(){return Zl}),o.d(i,"NAVIGATOR_PANE",function(){return Ql});var d="arc",r="#000",_="bottom",C="center",u="circle",y="date",f=10,s=/\{\d+:?/,A="left",l=Number.MAX_VALUE,c=-Number.MAX_VALUE,n="none",S="right",g="string",k="top",h="value",a="#fff",v="x",m="y";function x(t){return Array.isArray(t)}function p(t,e){for(var o=x(e)?e:[e],i=0;i<o.length;i++){var r=o[i];-1===t.className.indexOf(r)&&(t.className+=" "+r)}}var w=/\s+/g;function b(t,e){t&&t.className&&(t.className=t.className.replace(e,"").replace(w," "))}var P=o(0);function M(t){var e=.5;t.options.stroke&&P.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 T(t,e){return-t.x*e.y+t.y*e.x<0}function B(t){return"number"==typeof t&&!isNaN(t)}function R(t){return typeof t===g}function O(t){return B(t)||R(t)&&isFinite(t)}function I(t){return"function"==typeof t}var L="object",V="undefined";function j(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===L&&null!==n?n.constructor:null)&&r!==Array?n instanceof Date?e[i]=new Date(n.getTime()):I(n.clone)?e[i]=n.clone():(r=e[i],e[i]=typeof r===L&&r||{},t(e[i],n)):s!==V&&(e[i]=n)}return e}(t,e[i]);return t}function D(t){return"object"==typeof t}function z(t){return B(t)?t+"px":t}var E=/width|height|top|left|bottom|right/i;function U(t,e){var o=R(e)?[e]:e;if(x(o)){for(var i={},r=window.getComputedStyle(t),n=0;n<o.length;n++){var s=o[n];i[s]=E.test(s)?parseFloat(r[s]):r[s]}return i}if(D(e))for(var a in e)t.style[a]=z(e[a])}function H(t,e){void 0===e&&(e=0);var o={top:0,right:0,bottom:0,left:0};return"number"==typeof t?o[k]=o[S]=o[_]=o[A]=t:(o[k]=t[k]||e,o[S]=t[S]||e,o[_]=t[_]||e,o[A]=t[A]||e),o}function F(){}var G={compile:function(t){return t}};F.register=function(t){G=t},F.compile=function(t){return G.compile(t)};var N=F;function W(t){var e;return(t=void 0===t?{}:t).template?t.template=e=N.compile(t.template):I(t.content)&&(e=t.content),e}var X=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g,q={};function Y(t){if(q[t])return q[t];var r=[];return t.replace(X,function(t,e,o,i){r.push(P.drawing.util.defined(e)?e:o||i)}),q[t]=function(t){for(var e=t,o=0;o<r.length&&e;o++)e=e[r[o]];return e},q[t]}function Q(t,e){for(var o=t.length,i=[],r=0;r<o;r++)e(t[r])&&i.push(t[r]);return i}function Z(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}q[void 0]=function(t){return t};function K(){this._map={}}K.prototype.get=function(t){return this._map[this._key(t)]},K.prototype.set=function(t,e){this._map[this._key(t)]=e},K.prototype._key=function(t){return t instanceof Date?t.getTime():t};var $=K;function J(t,e){if(e)return-1!==e.indexOf(t)}function tt(t,e,o){return P.drawing.util.round(t+(e-t)*o,3)}function et(t,e){this.observer=t,this.handlerMap=j({},this.handlerMap,e)}et.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},et.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)},et.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 ot=et;function it(t,e){for(var o=t.length,i=[],r=0;r<o;r++){var n=e(t[r]);P.drawing.util.defined(n)&&i.push(n)}return i}var rt=P.support.browser||{};function nt(t){var e=0;return t.wheelDelta?(e=-t.wheelDelta/120,rt.webkit&&(e/=2*Math.max(window.devicePixelRatio,.625))):t.detail&&(e=t.detail/3),0<e?Math.ceil(e):Math.floor(e)}function st(){}var at=P.drawing.util,pt=at.append,ht=at.bindEvents,lt=at.defined,ct=at.deg,ut=at.elementOffset,dt=at.elementSize,gt=at.eventElement,ft=at.eventCoordinates,yt=at.last,vt=at.limitValue,mt=at.objectKey,xt=at.rad,wt=at.round,bt=at.unbindEvents,_t=at.valueOrDefault;st.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++,st.fetchFonts(e,i,r),r.depth--))})},st.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(P.logToConsole)(t)}Promise.all(o).then(e,e)}else e()},st.preloadFonts=function(t,e){var o=[];st.fetchFonts(t,o),st.loadFonts(o,e)};var Ct=st;function At(t,e){t=t.prototype;t.options?t.options=j({},t.options,e):t.options=e}function St(t){for(var e=l,o=c,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===l?void 0:e,max:o===c?void 0:o}}function kt(t,e){for(var o=0;o<t.length;o++){var i=t[o];if(e(i,o,t))return i}}var Pt=P.geometry.Matrix,Mt=/matrix\((.*)\)/;function Tt(t){var e=getComputedStyle(t).transform;return"none"===e?Pt.unit():function(){var t=e.match(Mt);if(null===t||2!==t.length)return Pt.unit();t=t[1].split(",").map(function(t){return parseFloat(t)});return new(Function.prototype.bind.apply(Pt,[null].concat(t)))}()}function Bt(t){if(!t)return Pt.unit();for(var e=Tt(t),o=t.parentElement;o;)var i=Tt(o),e=e.multiplyCopy(i),o=o.parentElement;return e.b=e.c=e.e=e.f=0,e}function Rt(t){return new P.Color(t).isDark()?a:r}function Ot(t){this._index={},this._values=t?t.slice(0):[];for(var e=0;e<this._values.length;e++)this._index[this._values[e]]=e}var It={},Lt={size:{configurable:!0}};Ot.prototype.values=function(){return this._values.filter(function(t){return t!==It})},Ot.prototype.has=function(t){return void 0!==this._index[t]},Ot.prototype.add=function(t){this.has(t)||(this._index[t]=this._values.length,this._values.push(t))},Ot.prototype.delete=function(t){var e=this._index[t];void 0!==e&&(this._values[e]=It,delete this._index[t])},Ot.prototype.clear=function(){this._index={},this._values=[]},Lt.size.get=function(){return this._values.length},Object.defineProperties(Ot.prototype,Lt);function Vt(t){this._set=new Set(t)}var jt={size:{configurable:!0}};Vt.prototype.values=function(){return Array.from(this._set)},Vt.prototype.has=function(t){return this._set.has(t)},Vt.prototype.add=function(t){this._set.add(t)},Vt.prototype.delete=function(t){this._set.delete(t)},Vt.prototype.clear=function(){this._set.clear()},jt.size.get=function(){return this._set.size},Object.defineProperties(Vt.prototype,jt);function Dt(t){return e=!1,new((e="function"==typeof Set?new Set([1]).has(1):e)?Vt:Ot)(t);var e}function zt(t){throw t}function Et(t,e){t=wt(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=wt(t/e,f);return wt(e*(t<1.904762?.2:t<4.761904?.5:t<9.523809?1:2),f)}var Ut,Ht=((Ut=P.Class)&&(Ft.__proto__=Ut),((Ft.prototype=Object.create(Ut&&Ut.prototype)).constructor=Ft).prototype.clone=function(){return new Ft(this.x,this.y)},Ft.prototype.equals=function(t){return t&&this.x===t.x&&this.y===t.y},Ft.prototype.rotate=function(t,e){var o=xt(e),i=Math.cos(o),r=Math.sin(o),n=t.x,e=t.y,o=this.x,t=this.y;return this.x=wt(n+(o-n)*i+(t-e)*r,3),this.y=wt(e+(t-e)*i-(o-n)*r,3),this},Ft.prototype.multiply=function(t){return this.x*=t,this.y*=t,this},Ft.prototype.distanceTo=function(t){var e=this.x-t.x,t=this.y-t.y;return Math.sqrt(e*e+t*t)},Ft.onCircle=function(t,e,o){e=xt(e);return new Ft(t.x-o*Math.cos(e),t.y-o*Math.sin(e))},Ft);function Ft(t,e){Ut.call(this),this.x=t||0,this.y=e||0}function Gt(t,e,o,i,r){r=xt(r);return new Ht(o+(t-o)*Math.cos(r)+(e-i)*Math.sin(r),i-(t-o)*Math.sin(r)+(e-i)*Math.cos(r))}var Nt,Wt=((Nt=P.Class)&&(Xt.__proto__=Nt),((Xt.prototype=Object.create(Nt&&Nt.prototype)).constructor=Xt).prototype.equals=function(t){return this.x1===t.x1&&this.x2===t.x2&&this.y1===t.y1&&this.y2===t.y2},Xt.prototype.width=function(){return this.x2-this.x1},Xt.prototype.height=function(){return this.y2-this.y1},Xt.prototype.translate=function(t,e){return this.x1+=t,this.x2+=t,this.y1+=e,this.y2+=e,this},Xt.prototype.move=function(t,e){var o=this.height(),i=this.width();return lt(t)&&(this.x1=t,this.x2=this.x1+i),lt(e)&&(this.y1=e,this.y2=this.y1+o),this},Xt.prototype.wrap=function(t){return this.x1=Math.min(this.x1,t.x1),this.y1=Math.min(this.y1,t.y1),this.x2=Math.max(this.x2,t.x2),this.y2=Math.max(this.y2,t.y2),this},Xt.prototype.wrapPoint=function(t){var e=x(t),o=e?t[0]:t.x,t=e?t[1]:t.y;return this.wrap(new Xt(o,t,o,t)),this},Xt.prototype.snapTo=function(t,e){return e!==v&&e||(this.x1=t.x1,this.x2=t.x2),e!==m&&e||(this.y1=t.y1,this.y2=t.y2),this},Xt.prototype.alignTo=function(t,e){var o,i,r=this.height(),n=this.width(),s=e===k||e===_?m:v,a=s==m?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===k||e===A?t[s+1]-a:t[s+2],this.x2=this.x1+n,this.y2=this.y1+r,this},Xt.prototype.shrink=function(t,e){return this.x2-=t,this.y2-=e,this},Xt.prototype.expand=function(t,e){return this.shrink(-t,-e),this},Xt.prototype.pad=function(t){t=H(t);return this.x1-=t.left,this.x2+=t.right,this.y1-=t.top,this.y2+=t.bottom,this},Xt.prototype.unpad=function(t){t=H(t);return t.left=-t.left,t.top=-t.top,t.right=-t.right,t.bottom=-t.bottom,this.pad(t)},Xt.prototype.clone=function(){return new Xt(this.x1,this.y1,this.x2,this.y2)},Xt.prototype.center=function(){return new Ht(this.x1+this.width()/2,this.y1+this.height()/2)},Xt.prototype.containsPoint=function(t){return t.x>=this.x1&&t.x<=this.x2&&t.y>=this.y1&&t.y<=this.y2},Xt.prototype.points=function(){return[new Ht(this.x1,this.y1),new Ht(this.x2,this.y1),new Ht(this.x2,this.y2),new Ht(this.x1,this.y2)]},Xt.prototype.getHash=function(){return[this.x1,this.y1,this.x2,this.y2].join(",")},Xt.prototype.overlaps=function(t){return!(t.y2<this.y1||this.y2<t.y1||t.x2<this.x1||this.x2<t.x1)},Xt.prototype.rotate=function(t){var e=this.width(),o=this.height(),i=this.center(),r=i.x,n=i.y,s=Gt(0,0,r,n,t),a=Gt(e,0,r,n,t),i=Gt(e,o,r,n,t),t=Gt(0,o,r,n,t),e=Math.max(s.x,a.x,i.x,t.x)-Math.min(s.x,a.x,i.x,t.x),o=Math.max(s.y,a.y,i.y,t.y)-Math.min(s.y,a.y,i.y,t.y);return this.x2=this.x1+e,this.y2=this.y1+o,this},Xt.prototype.toRect=function(){return new P.geometry.Rect([this.x1,this.y1],[this.width(),this.height()])},Xt.prototype.hasSize=function(){return 0!==this.width()&&0!==this.height()},Xt.prototype.align=function(t,e,o){var i=e+1,r=e+2,n=e===v?"width":"height",e=this[n]();J(o,[A,k])?(this[i]=t[i],this[r]=this[i]+e):J(o,[S,_])?(this[r]=t[r],this[i]=this[r]-e):o===C&&(this[i]=t[i]+(t[n]()-e)/2,this[r]=this[i]+e)},Xt);function Xt(t,e,o,i){Nt.call(this),this.x1=t||0,this.y1=e||0,this.x2=o||0,this.y2=i||0}function qt(t,e){return t-e}var Yt,Qt,Zt,Kt=((Zt=P.Class)&&(oe.__proto__=Zt),((oe.prototype=Object.create(Zt&&Zt.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 o=xt(t),t=Math.cos(o),o=Math.sin(o),e=e?this.innerRadius:this.radius,t=wt(this.center.x-t*e,3),e=wt(this.center.y-o*e,3);return new Ht(t,e)},oe.prototype.adjacentBox=function(t,e,o){var i=this.clone().expand(t),r=i.middle(),n=i.point(r),s=e/2,a=o/2,t=Math.sin(xt(r)),i=Math.cos(xt(r)),r=n.x-s,n=n.y-a;return Math.abs(t)<.9&&(r+=s*-i/Math.abs(i)),Math.abs(i)<.9&&(n+=a*-t/Math.abs(t)),new Wt(r,n,r+e,n+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,a=t.y-e.y,t=new Ht(s,a),r=this.point(r),r=new Ht(r.x-e.x,r.y-e.y),n=this.point(n),e=new Ht(n.x-e.x,n.y-e.y),a=wt(s*s+a*a,3);return(r.equals(t)||T(r,t))&&!T(e,t)&&o*o<=a&&a<=i*i},oe.prototype.getBBox=function(){for(var t=new Wt(l,l,c,c),e=wt(this.startAngle%360),o=wt((e+this.angle)%360),i=this.innerRadius,r=[0,90,180,270,e,o].sort(qt),n=r.indexOf(e),s=r.indexOf(o),a=e===o?r:n<s?r.slice(n,s+1):[].concat(r.slice(0,s+1),r.slice(n,r.length)),p=0;p<a.length;p++){var h=this.point(a[p]);t.wrapPoint(h),t.wrapPoint(h,i)}return i||t.wrapPoint(this.center),t},oe.prototype.expand=function(t){return this.radius+=t,this},oe),$t=((Qt=Kt)&&(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),Jt=((Yt=P.Class)&&(te.__proto__=Yt),((te.prototype=Object.create(Yt&&Yt.prototype)).constructor=te).prototype.createRing=function(t,e){var o=t.startAngle+180,i=t.angle+o;0<t.angle&&o===i&&(i+=.001);var r=new P.geometry.Point(t.center.x,t.center.y),n=Math.max(t.radius,0),t=Math.max(t.innerRadius,0),n=new P.geometry.Arc(r,{startAngle:o,endAngle:i,radiusX:n,radiusY:n}),e=P.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(){Yt.apply(this,arguments)}function ee(t,e,o,i){Qt.call(this,t,0,e,o,i)}function oe(t,e,o,i,r){Zt.call(this),this.center=t,this.innerRadius=e,this.radius=o,this.startAngle=i,this.angle=r}Jt.current=new Jt;var ie,re=Jt,ne=((ie=P.Class)&&(se.__proto__=ie),((se.prototype=Object.create(ie&&ie.prototype)).constructor=se).prototype.initUserOptions=function(t){return t},se.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},se.prototype.destroy=function(){var t=this.children;this.animation&&this.animation.destroy();for(var e=0;e<t.length;e++)t[e].destroy()},se.prototype.getRoot=function(){var t=this.parent;return t?t.getRoot():null},se.prototype.getSender=function(){var t=this.getService();if(t)return t.sender},se.prototype.getService=function(){for(var t=this;t;){if(t.chartService)return t.chartService;t=t.parent}},se.prototype.translateChildren=function(t,e){for(var o=this.children,i=o.length,r=0;r<i;r++)o[r].box.translate(t,e)},se.prototype.append=function(){for(var t=arguments,e=0;e<arguments.length;e++){var o=t[e];this.children.push(o),o.parent=this}},se.prototype.renderVisual=function(){!1!==this.options.visible&&(this.createVisual(),this.addVisual(),this.renderChildren(),this.createAnimation(),this.renderComplete())},se.prototype.addVisual=function(){this.visual&&((this.visual.chartElement=this).parent&&this.parent.appendVisual(this.visual))},se.prototype.renderChildren=function(){for(var t=this.children,e=t.length,o=0;o<e;o++)t[o].renderVisual()},se.prototype.createVisual=function(){this.visual=new P.drawing.Group({zIndex:this.options.zIndex,visible:_t(this.options.visible,!0)})},se.prototype.createAnimation=function(){this.visual&&this.options.animation&&(this.animation=P.drawing.Animation.create(this.visual,this.options.animation))},se.prototype.appendVisual=function(t){t.chartElement||(t.chartElement=this),t.options.noclip?this.clipRoot().visual.append(t):lt(t.options.zIndex)?this.stackRoot().stackVisual(t):this.isStackRoot?this.stackVisual(t):this.visual?this.visual.append(t):this.parent.appendVisual(t)},se.prototype.clipRoot=function(){return this.parent?this.parent.clipRoot():this},se.prototype.stackRoot=function(){return this.parent?this.parent.stackRoot():this},se.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(_t(n.options.zIndex,0)>e)break}this.visual.insert(r,t)},se.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)}},se.prototype.closest=function(t){for(var e=this,o=!1;e&&!o;)(o=t(e))||(e=e.parent);if(o)return e},se.prototype.renderComplete=function(){},se.prototype.hasHighlight=function(){var t=(this.options||{}).highlight;return!(!this.createHighlight||t&&!1===t.visible)},se.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);lt(n.options.zIndex)||(n.options.zIndex=_t(i.zIndex,this.options.zIndex)),this.appendVisual(n)}n.visible(t)},se.prototype.createGradientOverlay=function(t,e,o){e=new P.drawing.Path(Object.assign({stroke:{color:"none"},fill:this.createGradient(o),closed:t.options.closed},e));return e.segments.elements(t.segments.elements()),e},se.prototype.createGradient=function(t){if(this.parent)return this.parent.createGradient(t)},se.prototype.supportsPointInactiveOpacity=function(){return!0},se);function se(t){ie.call(this),this.children=[],this.options=j({},this.options,this.initUserOptions(t))}ne.prototype.options={};var ae,pe=ne,he=((ae=pe)&&(le.__proto__=ae),((le.prototype=Object.create(ae&&ae.prototype)).constructor=le).prototype.reflow=function(t){function e(){i.align(t,v,r.align),i.align(t,m,r.vAlign),i.paddingBox=o.clone().unpad(h).unpad(c)}var o,i=this,r=this.options,n=r.width,s=r.height,a=r.shrinkToFit,p=n&&s,h=r.margin,l=r.padding,c=r.border.width,u=t.clone();p&&(u.x2=u.x1+n,u.y2=u.y1+s),a&&u.unpad(h).unpad(c).unpad(l),ae.prototype.reflow.call(this,u),o=p?this.box=new Wt(0,0,n,s):this.box,a&&p?(e(),u=this.contentBox=this.paddingBox.clone().unpad(l)):(u=this.contentBox=o.clone(),o.pad(l).pad(c).pad(h),e()),this.translateChildren(o.x1-u.x1+h.left+c+l.left,o.y1-u.y1+h.top+c+l.top);for(var d=this.children,g=0;g<d.length;g++){var f=d[g];f.reflow(f.box)}},le.prototype.align=function(t,e,o){this.box.align(t,e,o)},le.prototype.hasBox=function(){var t=this.options;return t.border.width||t.background},le.prototype.createVisual=function(){ae.prototype.createVisual.call(this),this.options.visible&&this.hasBox()&&this.visual.append(P.drawing.Path.fromRect(this.paddingBox.toRect(),this.visualStyle()))},le.prototype.visualStyle=function(){var t=this.options,e=t.border||{};return{stroke:{width:e.width,color:e.color,opacity:_t(e.opacity,t.opacity),dashType:e.dashType},fill:{color:t.background,opacity:t.opacity},cursor:t.cursor}},le);function le(t){ae.call(this,t),this.options.margin=H(this.options.margin),this.options.padding=H(this.options.padding)}At(he,{align:A,vAlign:k,margin:{},padding:{},border:{color:r,width:0},background:"",shrinkToFit:!1,width:0,height:0,visible:!0});var ce,ue=he,de=((ce=ue)&&(ge.__proto__=ce),((ge.prototype=Object.create(ce&&ce.prototype)).constructor=ge).prototype.getElement=function(){var t=this.options,e=this.paddingBox,o=t.type,i=t.rotation,r=e.center(),n=e.width()/2,s=e.height()/2;if(!t.visible||!this.hasBox())return null;var a,p=this.visualStyle();return o===u?a=new P.drawing.Circle(new P.geometry.Circle([wt(e.x1+n,3),wt(e.y1+s,3)],Math.min(n,s)),p):"triangle"===o?a=P.drawing.Path.fromPoints([[e.x1+n,e.y1],[e.x1,e.y2],[e.x2,e.y2]],p).close():"cross"===o?((a=new P.drawing.MultiPath(p)).moveTo(e.x1,e.y1).lineTo(e.x2,e.y2),a.moveTo(e.x1,e.y2).lineTo(e.x2,e.y1)):(e=e.toRect(),"roundedRect"===o&&(o=_t(t.borderRadius,e.width()/5),e.setCornerRadius(o)),a=P.drawing.Path.fromRect(e,p)),i&&a.transform(P.geometry.transform().rotate(-i,[r.x,r.y])),a.options.zIndex=t.zIndex,a},ge.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()},ge.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}},ge.prototype.createVisual=function(){this.visual=this.createElement()},ge);function ge(t,e){ce.call(this,t),this.pointData=e}At(de,{type:u,align:C,vAlign:C});var fe=de,ye={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}};var ve,me=((ve=pe)&&(xe.__proto__=ve),((xe.prototype=Object.create(ve&&ve.prototype)).constructor=xe).prototype.reflow=function(){var t=this.options,e=this.children,o=new Wt(0,0,t.width,t.height);this.box=o.unpad(t.margin);for(var i=0;i<e.length;i++)e[i].reflow(o),o=function(t,e){if(t.x1===e.x1&&t.y1===e.y1&&t.x2===e.x2&&t.y2===e.y2)return e;var o=Math.min(t.x1,e.x1),i=Math.max(t.x1,e.x1),r=Math.min(t.x2,e.x2),n=Math.max(t.x2,e.x2),s=Math.min(t.y1,e.y1),a=Math.max(t.y1,e.y1),p=Math.min(t.y2,e.y2),h=Math.max(t.y2,e.y2),l=[];return l[0]=new Wt(i,s,r,a),l[1]=new Wt(o,a,i,p),l[2]=new Wt(r,a,n,p),l[3]=new Wt(i,p,r,h),t.x1===o&&t.y1===s||e.x1===o&&e.y1===s?(l[4]=new Wt(o,s,i,a),l[5]=new Wt(r,p,n,h)):(l[4]=new Wt(r,s,n,a),l[5]=new Wt(o,p,i,h)),Q(l,function(t){return 0<t.height()&&0<t.width()})[0]}(o,e[i].box)||new Wt},xe.prototype.createVisual=function(){this.visual=new P.drawing.Group,this.createBackground()},xe.prototype.createBackground=function(){var t=this.options,e=t.border||{},o=this.box.clone().pad(t.margin).unpad(e.width),t=P.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(t)},xe.prototype.getRoot=function(){return this},xe.prototype.createGradient=function(t){var e,s,o=this.gradients,i=mt(t),r=ye[t.gradient];return o[i]?e=o[i]:(s=Object.assign({},r,t),"linear"===r.type?e=new P.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 P.drawing.RadialGradient(s)).supportVML=!1!==r.supportVML),o[i]=e),e},xe.prototype.cleanGradients=function(){var t,e=this.gradients;for(t in e)e[t]._observers=[]},xe.prototype.size=function(){var t=this.options;return new Wt(0,0,t.width,t.height)},xe);function xe(t){ve.call(this,t);t=this.options;t.width=parseInt(t.width,10),t.height=parseInt(t.height,10),this.gradients={}}At(me,{width:600,height:400,background:a,border:{color:r,width:0},margin:H(5),zIndex:-2});var we,be=me,_e=((we=pe)&&(Ce.__proto__=we),((Ce.prototype=Object.create(we&&we.prototype)).constructor=Ce).prototype._initDirection=function(){var t=this.options;t.vertical?(this.groupAxis=v,this.elementAxis=m,this.groupSizeField="width",this.elementSizeField="height",this.groupSpacing=t.spacing,this.elementSpacing=t.vSpacing):(this.groupAxis=m,this.elementAxis=v,this.groupSizeField="height",this.elementSizeField="width",this.groupSpacing=t.vSpacing,this.elementSpacing=t.spacing)},Ce.prototype.reflow=function(t){this.box=t.clone(),this.reflowChildren()},Ce.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,p=n.maxGroupElementsSize,h=s.length,n=t[o+1]+this.alignStart(a,t[r]());if(h){for(var l=n,c=0;c<h;c++){for(var u=s[c],d=u.groupElements,g=t[e+1],f=d.length,y=0;y<f;y++){var v=d[y],m=this.elementSize(v),x=l+this.alignStart(m[r],u.groupSize),w=new Wt;w[o+1]=x,w[o+2]=x+m[r],w[e+1]=g,w[e+2]=g+m[i],v.reflow(w),g+=m[i]+this.elementSpacing}l+=u.groupSize+this.groupSpacing}t[o+1]=n,t[o+2]=n+a,t[e+2]=t[e+1]+p}},Ce.prototype.alignStart=function(t,e){var o=0,i=this.options.align;return i===S||i===_?o=e-t:i===C&&(o=(e-t)/2),o},Ce.prototype.groupOptions=function(){for(var t=this.box,e=this.children,o=this.elementSizeField,i=this.groupSizeField,r=this.elementSpacing,n=this.groupSpacing,s=wt(t[o]()),a=e.length,p=[],h=0,l=0,c=0,u=0,d=[],g=0;g<a;g++){var f=e[g];f.box||f.reflow(t);var y=this.elementSize(f);this.options.wrap&&wt(l+r+y[o])>s&&(p.push({groupElements:d,groupSize:h,groupElementsSize:l}),u=Math.max(u,l),c+=n+h,l=h=0,d=[]),h=Math.max(h,y[i]),0<l&&(l+=r),l+=y[o],d.push(f)}return p.push({groupElements:d,groupSize:h,groupElementsSize:l}),{groups:p,groupsSize:c+=h,maxGroupElementsSize:u=Math.max(u,l)}},Ce.prototype.elementSize=function(t){return{width:t.box.width(),height:t.box.height()}},Ce.prototype.createVisual=function(){},Ce);function Ce(t){we.call(this,t),this._initDirection()}At(_e,{vertical:!0,wrap:!0,vSpacing:0,spacing:0});var Ae,Se=_e,ke=P.drawing.Text,Pe=((Ae=pe)&&(Me.__proto__=Ae),((Me.prototype=Object.create(Ae&&Ae.prototype)).constructor=Me).prototype.reflow=function(t){var e=this.options,e=e.size=P.drawing.util.measureText(this.content,{font:e.font});this.baseline=e.baseline,this.box=new Wt(t.x1,t.y1,t.x1+e.width,t.y1+e.height)},Me.prototype.createVisual=function(){var t=this.options,e=t.font,o=t.color,i=t.opacity,t=t.cursor;this.visual=new ke(this.content,this.box.toRect().topLeft(),{font:e,fill:{color:o,opacity:i},cursor:t})},Me);function Me(t,e){Ae.call(this,e),this.content=t,this.reflow(new Wt)}At(Pe,{font:"12px sans-serif",color:r});var Te=Pe;function Be(t){var e=t.origin,t=t.bottomRight();return new Wt(e.x,e.y,t.x,t.y)}var Re,Oe,Ie=/\n/m,Le=((Oe=ue)&&(De.__proto__=Oe),((De.prototype=Object.create(Oe&&Oe.prototype)).constructor=De).prototype._initContainer=function(){var t=this.options,e=String(this.content).split(Ie),o=new Se({vertical:!0,align:t.align,wrap:!1}),i=j({},t,{opacity:1,animation:null});this.container=o,this.append(o);for(var r=0;r<e.length;r++){var n=new Te(e[r].trim(),i);o.append(n)}},De.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=Be(i.clippedBBox()||new P.geometry.Rect),i.options.zIndex=o.zIndex),this.box=this.contentBox=this.paddingBox=e):(Oe.prototype.reflow.call(this,t),o.rotation&&(e=H(o.margin),o=this.box.unpad(e),this.targetBox=t,this.normalBox=o.clone(),(o=this.rotate()).translate(e.left-e.right,e.top-e.bottom),this.rotatedBox=o.clone(),o.pad(e)))},De.prototype.createVisual=function(){var t=this.options;this.visual=new P.drawing.Group({transform:this.rotationTransform(),zIndex:t.zIndex,noclip:t.noclip}),this.hasBox()&&(t=P.drawing.Path.fromRect(this.paddingBox.toRect(),this.visualStyle()),this.visual.append(t))},De.prototype.renderVisual=function(){var t;this.options.visible&&(this.options.visual?((t=this.visual)&&!lt(t.options.noclip)&&(t.options.noclip=this.options.noclip),this.addVisual(),this.createAnimation()):Oe.prototype.renderVisual.call(this))},De.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},De.prototype.getDefaultVisual=function(){this.createVisual(),this.renderChildren();var t=this.visual;return delete this.visual,t},De.prototype.rotate=function(){var t=this.options;return this.box.rotate(t.rotation),this.align(this.targetBox,v,t.align),this.align(this.targetBox,m,t.vAlign),this.box},De.prototype.rotationTransform=function(){var t=this.options.rotation;if(!t)return null;var e=this.normalBox.center(),o=e.x,i=e.y,e=this.rotatedBox.center();return P.geometry.transform().translate(e.x-o,e.y-i).rotate(t,[o,i])},De),Ve=((Re=pe)&&(je.__proto__=Re),((je.prototype=Object.create(Re&&Re.prototype)).constructor=je).prototype.reflow=function(t){Re.prototype.reflow.call(this,t),this.box.snapTo(t,v)},je.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 je(t),e.append(i)),i},je);function je(t){Re.call(this,t),this.append(new Le(this.options.text,Object.assign({},this.options,{vAlign:this.options.position})))}function De(t,e,o){Oe.call(this,e),this.content=t,this.data=o,this._initContainer(),!1!==this.options._autoReflow&&this.reflow(new Wt)}At(Ve,{color:r,position:k,align:C,margin:H(5),padding:H(5)});var ze,Ee=Ve,Ue=((ze=Le)&&(He.__proto__=ze),((He.prototype=Object.create(ze&&ze.prototype)).constructor=He).prototype.visualContext=function(t){t=ze.prototype.visualContext.call(this,t);return t.value=this.value,t.dataItem=this.dataItem,t.format=this.options.format,t.culture=this.options.culture,t},He.prototype.click=function(t,e){t.trigger("axisLabelClick",{element:gt(e),value:this.value,text:this.text,index:this.index,dataItem:this.dataItem,axis:this.parent.options})},He.prototype.rotate=function(){var t,e;return this.options.alignRotation!==C?(t=this.normalBox.toRect(),e=this.rotationTransform(),this.box=Be(t.bbox(e.matrix()))):ze.prototype.rotate.call(this),this.box},He.prototype.rotationTransform=function(){var t=this.options,e=t.rotation;if(!e)return null;if(t.alignRotation===C)return ze.prototype.rotationTransform.call(this);var o=P.geometry.transform().rotate(e).matrix(),i=this.normalBox.toRect(),r=this.targetBox.toRect(),n=t.rotationOrigin||k,s=n===k||n===_?v:m,a=n===k||n===_?m:v,p=n===k||n===A?r.origin:r.bottomRight(),h=i.topLeft().transformCopy(o),l=i.topRight().transformCopy(o),t=i.bottomRight().transformCopy(o),n=i.bottomLeft().transformCopy(o),i=P.geometry.Rect.fromPoints(h,l,t,n),o={};o[a]=r.origin[a]-i.origin[a];var i=Math.abs(h[a]+o[a]-p[a]),a=Math.abs(l[a]+o[a]-p[a]),n=wt(i,f)===wt(a,f)?(c=h,l):a<i?(c=l,t):(c=h,n),c=c[s]+(n[s]-c[s])/2;return o[s]=r.center()[s]-c,P.geometry.transform().translate(o.x,o.y).rotate(e)},He);function He(t,e,o,i,r){ze.call(this,e,r),this.text=e,this.value=t,this.index=o,this.dataItem=i,this.reflow(new Wt)}At(Ue,{_autoReflow:!1});var Fe,Ge=Ue,Ne=((Fe=ue)&&(We.__proto__=Fe),((We.prototype=Object.create(Fe&&Fe.prototype)).constructor=We).prototype.hide=function(){this.options.visible=!1},We.prototype.show=function(){this.options.visible=!0},We.prototype.render=function(){var t,e,o,i,r,n,s,a,p=this,h=this.options;h.visible&&(o=h.label,a=h.icon,i=new Wt,r=function(){return p},n=a.size,s=this.fields.text,lt(o)&&o.visible&&((h=W(o))?s=h(this.fields):o.format&&(s=this.chartService.format.auto(o.format,s)),o.color||(o.color="inside"===o.position?"#fff":a.background),this.label=new Le(s,j({},o)),this.label.aliasFor=r,"inside"!==o.position||lt(n)||(a.type===u?n=Math.max(this.label.box.width(),this.label.box.height()):(t=this.label.box.width(),e=this.label.box.height()),i.wrap(this.label.box))),a.width=t||n||7,a.height=e||n||7,(a=new fe(j({},a))).aliasFor=r,this.marker=a,this.append(a),this.label&&this.append(this.label),a.reflow(new Wt),this.wrapperBox=i.wrap(a.box))},We.prototype.reflow=function(t){var e,o,i,r=this.options,n=this.label,s=this.marker,a=this.wrapperBox,p=t.center(),h=r.line.length,l=r.position;r.visible&&(J(l,[A,S])?l===A?(i=a.alignTo(t,l).translate(-h,t.center().y-a.center().y),r.line.visible&&(e=[t.x1,p.y],this.linePoints=[e,[i.x2,p.y]],o=i.clone().wrapPoint(e))):(i=a.alignTo(t,l).translate(h,t.center().y-a.center().y),r.line.visible&&(e=[t.x2,p.y],this.linePoints=[e,[i.x1,p.y]],o=i.clone().wrapPoint(e))):l===_?(i=a.alignTo(t,l).translate(t.center().x-a.center().x,h),r.line.visible&&(e=[p.x,t.y2],this.linePoints=[e,[p.x,i.y1]],o=i.clone().wrapPoint(e))):(i=a.alignTo(t,l).translate(t.center().x-a.center().x,-h),r.line.visible&&(e=[p.x,t.y1],this.linePoints=[e,[p.x,i.y2]],o=i.clone().wrapPoint(e))),s&&s.reflow(i),n&&(n.reflow(i),s&&("outside"===r.label.position&&n.box.alignTo(s.box,l),n.reflow(n.box))),this.contentBox=i,this.targetBox=t,this.box=o||i)},We.prototype.createVisual=function(){Fe.prototype.createVisual.call(this),this.visual.options.noclip=this.options.noclip,this.options.visible&&this.createLine()},We.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()):Fe.prototype.renderVisual.call(this)},We.prototype.createLine=function(){var t=this.options.line;this.linePoints&&(M(t=P.drawing.Path.fromPoints(this.linePoints,{stroke:{color:t.color,width:t.width,dashType:t.dashType}})),this.visual.append(t))},We.prototype.click=function(t,e){var o=this.eventArgs(e);t.trigger("noteClick",o)||e.preventDefault()},We.prototype.over=function(t,e){var o=this.eventArgs(e);t.trigger("noteHover",o)||e.preventDefault()},We.prototype.out=function(t,e){e=this.eventArgs(e);t.trigger("noteLeave",e)},We.prototype.eventArgs=function(t){var e=this.options;return Object.assign(this.fields,{element:gt(t),text:lt(e.label)?e.label.text:"",visual:this.visual})},We);function We(t,e,o){Fe.call(this,e),this.fields=t,this.chartService=o,this.render()}At(Ne,{icon:{visible:!0,type:u},label:{position:"inside",visible:!0,align:C,vAlign:C},line:{visible:!0},visible:!0,position:k,zIndex:2});function Xe(){}var qe=Ne,Ye={format:function(t,e){return e},toString:function(t){return t},parseDate:function(t){return new Date(t)},firstDay:function(){return 0}},Qe={implementation:{configurable:!0}};Xe.register=function(t){Ye=t},Qe.implementation.get=function(){return Ye},Object.defineProperties(Xe,Qe);function Ze(t){this._intlService=t}var Ke=Xe,$e=/\{(\d+)(:[^\}]+)?\}/g,Je={intl:{configurable:!0}};Je.intl.get=function(){return this._intlService||Ke.implementation},Je.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 R(t)&&t.match(s)?i.format.apply(i,[t].concat(e)):i.toString(e[0],t)},Ze.prototype.localeAuto=function(t,i,r){var n=this.intl;return R(t)&&t.match(s)?t.replace($e,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,Je);function to(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 eo=Ze,oo={intl:{configurable:!0}};oo.intl.get=function(){return this._intlService||Ke.implementation},oo.intl.set=function(t){this._intlService=t,this.format.intl=t},to.prototype.notify=function(t,e){this.chart&&this.chart.trigger(t,e)},to.prototype.isPannable=function(t){var e=((this.chart||{}).options||{}).pannable;return e&&e.lock!==t},Object.defineProperties(to.prototype,oo);function io(){}var ro,no=to;io.register=function(t){ro=t},io.create=function(t,e){if(ro)return ro.create(t,e)};var so=io;function ao(t,e){var o=t.tickX,i=t.tickY,r=t.position,n=new P.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),M(n),n}function po(t,e){var o=t.lineStart,i=t.lineEnd,r=t.position,e=new P.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),M(e),e}var ho,lo=((ho=pe)&&(co.__proto__=ho),((co.prototype=Object.create(ho&&ho.prototype)).constructor=co).prototype.initFields=function(){},co.prototype.labelsRange=function(){return{min:this.options.labels.skip,max:this.labelsCount()}},co.prototype.normalizeLabelRotation=function(t){var e=t.rotation;D(e)&&(t.alignRotation=e.align,t.rotation=e.angle)},co.prototype.createLabels=function(){var t=this.options,e=t.vertical?S:C,o=j({},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))}}},co.prototype.clearLabels=function(){this.children=Q(this.children,function(t){return!(t instanceof Ge)}),this.labels=[]},co.prototype.clearTitle=function(){var e=this;this.title&&(this.children=Q(this.children,function(t){return t!==e.title}),this.title=void 0)},co.prototype.clear=function(){this.clearLabels(),this.clearTitle()},co.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 Wt(r,e.y1,r,e.y2-t):new Wt(e.x1,i,e.x2-t,i)},co.prototype.createTitle=function(){var t=this.options,t=j({rotation:t.vertical?-90:0,text:"",zIndex:1,visualSize:!0},t.title);t.visible&&t.text&&(t=new Le(t.text,t),this.append(t),this.title=t)},co.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=j({},e,o[i]);r.value=this.parseNoteValue(r.value);r=new qe({value:r.value,text:r.label.text,dataItem:r},r,this.chartService);r.options.visible&&(lt(r.options.position)?t.vertical&&!J(r.options.position,[A,S])?r.options.position=t.reverse?A:S:t.vertical||J(r.options.position,[k,_])||(r.options.position=t.reverse?_:k):t.vertical?r.options.position=t.reverse?A:S:r.options.position=t.reverse?_:k,this.append(r),this.notes.push(r))}},co.prototype.parseNoteValue=function(t){return t},co.prototype.renderVisual=function(){ho.prototype.renderVisual.call(this),this.createPlotBands()},co.prototype.createVisual=function(){ho.prototype.createVisual.call(this),this.createBackground(),this.createLine()},co.prototype.gridLinesVisual=function(){var t=this._gridLines;return t||(t=this._gridLines=new P.drawing.Group({zIndex:-2}),this.appendVisual(this._gridLines)),t},co.prototype.createTicks=function(s){var t=this.options,a=this.lineBox(),p=t.labels.mirror,e=t.majorTicks.visible?t.majorUnit:0,h={vertical:t.vertical};function o(t,e,o){var i=t.length,r=Math.max(1,e.step);if(e.visible)for(var n=e.skip;n<i;n+=r)lt(o)&&n%o==0||(h.tickX=p?a.x2:a.x2-e.size,h.tickY=p?a.y1-e.size:a.y1,h.position=t[n],s.append(ao(h,e)))}o(this.getMajorTickPositions(),t.majorTicks),o(this.getMinorTickPositions(),t.minorTicks,e/t.minorUnit)},co.prototype.createLine=function(){var t=this.options,e=t.line,o=this.lineBox();0<e.width&&e.visible&&((e=new P.drawing.Path({stroke:{width:e.width,color:e.color,dashType:e.dashType}})).moveTo(o.x1,o.y1).lineTo(o.x2,o.y2),t._alignLines&&M(e),(t=this._lineGroup=new P.drawing.Group).append(e),this.visual.append(t),this.createTicks(t))},co.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},co.prototype.createBackground=function(){var t=this.options,e=this.box,t=t.background;t&&(this._backgroundPath=P.drawing.Path.fromRect(e.toRect(),{fill:{color:t},stroke:null}),this.visual.append(this._backgroundPath))},co.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 P.drawing.Group({zIndex:-1}),s=Q(this.pane.axes,function(t){return t.options.vertical!==e.options.vertical})[0],a=0;a<o.length;a++){var p=o[a],h=void 0,l=void 0,c=p.label,u=void 0,l=i?(h=(s||r.axisX).lineBox(),this.getSlot(p.from,p.to,!0)):(h=this.getSlot(p.from,p.to,!0),(s||r.axisY).lineBox());c&&(c.vAlign=c.position||A,u=this.createPlotBandLabel(c,p,new Wt(h.x1,l.y1,h.x2,l.y2))),0!==h.width()&&0!==l.height()&&(l=new P.geometry.Rect([h.x1,l.y1],[h.width(),l.height()]),p=P.drawing.Path.fromRect(l,{fill:{color:p.color,opacity:p.opacity},stroke:null}),n.append(p),u&&n.append(u))}this.appendVisual(n)}},co.prototype.createPlotBandLabel=function(t,e,o){if(!1===t.visible)return null;var i,r=t.text;return lt(t)&&t.visible&&((i=W(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)),(t=new Le(r,t)).reflow(o),t.renderVisual(),t.visual},co.prototype.createGridLines=function(t){var e=this.options,o=e.minorGridLines,i=e.majorGridLines,r=e.minorUnit,n=e.vertical,a=t.options.line.visible,e=i.visible?e.majorUnit:0,t=t.lineBox(),p=t[n?"y1":"x1"],h={lineStart:t[n?"x1":"y1"],lineEnd:t[n?"x2":"y2"],vertical:n},l=[],c=this.gridLinesVisual();function s(t,e,o){var i=t.length,r=Math.max(1,e.step);if(e.visible)for(var n=e.skip;n<i;n+=r){var s=wt(t[n]);J(s,l)||n%o==0||a&&p===s||(h.position=s,c.append(po(h,e)),l.push(s))}}return s(this.getMajorTickPositions(),i),s(this.getMinorTickPositions(),o,e/r),c.children},co.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,p=((this.getRoot()||{}).box||t)[s](),h=0,l=0;l<n;l++){var c=o[l].box[s]();c+a<=p&&(h=Math.max(h,c))}this.box=r?new Wt(t.x1,t.y1,t.x1+h+a,t.y2):new Wt(t.x1,t.y1,t.x2,t.y1+h+a),this.arrangeTitle(),this.arrangeLabels(),this.arrangeNotes()},co.prototype.getLabelsTickPositions=function(){return this.getMajorTickPositions()},co.prototype.labelTickIndex=function(t){return t.index},co.prototype.arrangeLabels=function(){for(var t=this.options,e=this.labels,o=this.labelsBetweenTicks(),i=t.vertical,r=t.labels.mirror,n=this.getLabelsTickPositions(),s=0;s<e.length;s++){var a=e[s],p=this.labelTickIndex(a),h=i?a.box.height():a.box.width(),l=n[p],c=n[p+1],u=void 0,p=void 0,p=i?u=o?l+(c-l)/2-h/2:l-h/2:o?(u=l,c):(u=l-h/2)+h;this.positionLabel(a,r,u,p)}},co.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,a=n?(n=s.x2,e?(n+=r,t.options.rotationOrigin=A):(n-=r+t.box.width(),t.options.rotationOrigin=S),t.box.move(n,o)):(a=s.y1,e?(a-=r+t.box.height(),t.options.rotationOrigin=_):(a+=r,t.options.rotationOrigin=k),new Wt(o,a,i,a+t.box.height()));t.reflow(a)},co.prototype.autoRotateLabelAngle=function(t,e){return t.width()<e?0:t.height()>e?-90:-45},co.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,n=this.autoRotateLabelAngle(s,n);if(-90===(i=0!==n?n:i))break}if(0!==i){for(var a=0;a<e.length;a++)e[a].options.rotation=i,e[a].reflow(new Wt);return!0}},co.prototype.arrangeTitle=function(){var t=this.options,e=this.title,o=t.labels.mirror,t=t.vertical;e&&(t?(e.options.align=o?S:A,e.options.vAlign=e.options.position):(e.options.align=e.options.position,e.options.vAlign=o?k:_),e.reflow(this.box))},co.prototype.arrangeNotes=function(){for(var t=0;t<this.notes.length;t++){var e=this.notes[t],o=e.options.value,i=void 0;lt(o)?(this.shouldRenderNote(o)?e.show():e.hide(),i=this.noteSlot(o)):e.hide(),e.reflow(i||this.lineBox())}},co.prototype.noteSlot=function(t){return this.getSlot(t)},co.prototype.alignTo=function(t){var e=t.lineBox(),o=this.options.vertical,t=o?m:v;this.box.snapTo(e,t),o?this.box.shrink(0,this.lineBox().height()-e.height()):this.box.shrink(this.lineBox().width()-e.width(),0),this.box[t+1]-=this.lineBox()[t+1]-e[t+1],this.box[t+2]-=this.lineBox()[t+2]-e[t+2]},co.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=W(e),o=n?n(Object.assign({},o,{get text(){return i()},value:t,format:e.format,culture:e.culture})):i();return o},co.prototype.slot=function(t,e,o){o=this.getSlot(t,e,o);if(o)return o.toRect()},co.prototype.contentBox=function(){var t,e,o=this.box.clone(),i=this.labels;return i.length&&(t=this.options.vertical?m:v,this.chartService.isPannable(t)?(e=this.maxLabelOffset(),o[t+1]-=e.start,o[t+2]+=e.end):(i[0].options.visible&&o.wrap(i[0].box),(i=i[i.length-1]).options.visible&&o.wrap(i.box))),o},co.prototype.maxLabelOffset=function(){for(var t=this.options,e=t.vertical,t=t.reverse,o=this.labelsBetweenTicks(),i=this.getLabelsTickPositions(),r=e?m:v,n=this.labels,s=t?1:0,a=t?0:1,p=0,h=0,l=0;l<n.length;l++){var c=n[l],u=this.labelTickIndex(c),d=void 0,g=void 0;o?(d=i[u+s],g=i[u+a]):d=g=i[u],p=Math.max(p,d-c.box[r+1]),h=Math.max(h,c.box[r+2]-g)}return{start:p,end:h}},co.prototype.limitRange=function(t,e,o,i,r){var n=this.options;if(t<o&&r<0&&(!lt(n.min)||n.min<=o)||i<e&&0<r&&(!lt(n.max)||i<=n.max))return null;if(e<o&&0<r||i<t&&r<0)return{min:t,max:e};var s=e-t,a=t,n=e;return t<o&&r<0?(a=vt(t,o,i),n=vt(t+s,o+s,i)):i<e&&0<r&&(n=vt(e,o,i),a=vt(e-s,o,i-s)),{min:a,max:n}},co.prototype.valueRange=function(){return{min:this.seriesMin,max:this.seriesMax}},co.prototype.lineDir=function(){var t=this.options;return(t.vertical?-1:1)*(t.reverse?-1:1)},co.prototype.lineInfo=function(){var t=this.options.vertical,e=this.lineBox(),o=t?e.height():e.width(),i=t?m:v,r=this.lineDir(),t=i+(1===r?1:2).toString();return{axis:i,axisOrigin:t,axisDir:r,lineBox:e,lineSize:o,lineStart:e[t]}},co.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},co.prototype.scaleToDelta=function(t,e){t=vt(t,-.999,.999);return 0<t?e*Math.min(1,t):e-e/(1+t)},co.prototype.labelsBetweenTicks=function(){return!this.options.justified},co.prototype.prepareUserOptions=function(){},co);function co(t,e){void 0===e&&(e=new no),ho.call(this,t),this.chartService=e,this.options.visible||(this.options=j({},this.options,{labels:{visible:!1},line:{visible:!1},margin:0,majorTickSize:0,minorTickSize:0})),this.options.minorTicks=j({},{color:this.options.line.color,width:this.options.line.width,visible:this.options.minorTickType!==n},this.options.minorTicks,{size:this.options.minorTickSize,align:this.options.minorTickType}),this.options.majorTicks=j({},{color:this.options.line.color,width:this.options.line.width,visible:this.options.majorTickType!==n},this.options.majorTicks,{size:this.options.majorTickSize,align:this.options.majorTickType}),this.initFields(),this.options._deferLabels||this.createLabels(),this.createTitle(),this.createNotes()}At(lo,{labels:{visible:!0,rotation:0,mirror:!1,step:1,skip:0},line:{width:1,color:r,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:n,majorGridLines:{skip:0,step:1},minorGridLines:{visible:!1,width:1,color:r,skip:0,step:1},margin:5,visible:!0,reverse:!1,justified:!0,notes:{label:{text:""}},_alignLines:!0,_deferLabels:!1});var uo=lo,go="milliseconds",fo="seconds",yo="minutes",vo="hours",mo="days",xo="weeks",wo="months",bo="years",_o=1e3,Co=60*_o,Ao=60*Co,So=24*Ao,ko=7*So,Po=31*So,Mo=365*So,To={years:Mo,months:Po,weeks:ko,days:So,hours:Ao,minutes:Co,seconds:_o,milliseconds:1};function Bo(t,e){return t.getTime()-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Co}function Ro(t,e){return new Date(t.getTime()+e)}function Oo(t){var e;return t instanceof Date?e=t:t&&(e=new Date(t)),e}function Io(t,e){return 0===e&&23===t.getHours()&&(t.setHours(t.getHours()+2),1)}function Lo(t,e,o,r){var i,n,s,a=t;return t&&(s=(i=Oo(t)).getHours(),o===bo?Io(a=new Date(i.getFullYear()+e,0,1),0):o===wo?Io(a=new Date(i.getFullYear(),i.getMonth()+e,1),s):o===xo?Io(a=Lo(function(t,e){void 0===r&&(e=0);var o=0,i=t.getDay();if(!isNaN(i))for(;i!==e;)0===i?i=6:i--,o++;return Ro(t,-o*So)}(i,r),7*e,mo),s):o===mo?Io(a=new Date(i.getFullYear(),i.getMonth(),i.getDate()+e),s):o===vo?(n=i,t=e,(s=new Date(n)).setMinutes(0,0,0),a=Ro(s,(n.getTimezoneOffset()-s.getTimezoneOffset())*Co+t*Ao)):o===yo?0<(a=Ro(i,e*Co)).getSeconds()&&a.setSeconds(0):o===fo?a=Ro(i,e*_o):o===go&&(a=Ro(i,e)),o!==go&&0<a.getMilliseconds()&&a.setMilliseconds(0)),a}function Vo(t,e,o){return Lo(Oo(t),0,e,o)}function jo(t,e,o){t=Oo(t);return t&&Vo(t,e,o).getTime()===t.getTime()?t:Lo(t,1,e,o)}function Do(t,e){return t&&e?t.getTime()-e.getTime():-1}function zo(t,e){return t.getTime()-e}function Eo(t){if(x(t)){for(var e=[],o=0;o<t.length;o++)e.push(Eo(t[o]));return e}if(t)return Oo(t).getTime()}function Uo(t,e){return t&&e?Eo(t)===Eo(e):t===e}function Ho(t,e,o){return Bo(t,e)/To[o]}function Fo(t,e,o,i){var r=Oo(t),t=Oo(e);return(o===wo?r.getMonth()-t.getMonth()+12*(r.getFullYear()-t.getFullYear())+Ho(r,new Date(r.getFullYear(),r.getMonth()),mo)/new Date(r.getFullYear(),r.getMonth()+1,0).getDate():o===bo?r.getFullYear()-t.getFullYear()+Fo(r,new Date(r.getFullYear(),0),wo,1)/12:o===mo||o===xo?Ho(r,t,o):zo(r,e)/To[o])/i}function Go(t,e,o){return o===bo?e.getFullYear()-t.getFullYear():o===wo?12*Go(t,e,bo)+e.getMonth()-t.getMonth():o===mo?Math.floor(zo(e,t)/So):Math.floor(zo(e,t)/To[o])}function No(t,e){return R(e)&&t.parseDate(e)||Oo(e)}function Wo(t,e){if(x(e)){for(var o=[],i=0;i<e.length;i++)o.push(No(t,e[i]));return o}return No(t,e)}function Xo(t,e){return B(t.weekStartDay)?t.weekStartDay:e&&e.firstDay?e.firstDay():0}var qo,at=((qo=uo)&&(Yo.__proto__=qo),((Yo.prototype=Object.create(qo&&qo.prototype)).constructor=Yo).prototype.initFields=function(){this._ticks={}},Yo.prototype.categoriesHash=function(){return""},Yo.prototype.clone=function(){var t=new Yo(Object.assign({},this.options,{categories:this.options.srcCategories}),this.chartService);return t.createLabels(),t},Yo.prototype.initUserOptions=function(t){var e=t.categories||[],o=lt(t.min),i=lt(t.max);return t.srcCategories=t.categories=e,(o||i)&&e.length&&(o=o?Math.floor(t.min):0,e=i?t.justified?Math.floor(t.max)+1:Math.ceil(t.max):e.length,t.categories=t.categories.slice(o,e)),t},Yo.prototype.rangeIndices=function(){var t=this.options,e=t.categories.length||1;return{min:B(t.min)?t.min%1:0,max:B(t.max)&&t.max%1!=0&&t.max<this.totalRange().max?e-(1-t.max%1):e-(t.justified?1:0)}},Yo.prototype.totalRangeIndices=function(t){var e=this.options,o=B(e.min)?e.min:0;return e=B(e.max)?e.max:B(e.min)?o+e.categories.length:this.totalRange().max||1,t&&(t=this.totalRange(),o=vt(o,0,t.max),e=vt(e,0,t.max)),{min:o,max:e}},Yo.prototype.range=function(){var t=this.options;return{min:B(t.min)?t.min:0,max:(B(t.max)?t:this.totalRange()).max}},Yo.prototype.roundedRange=function(){return this.range()},Yo.prototype.totalRange=function(){var t=this.options;return{min:0,max:Math.max(this._seriesMax||0,t.srcCategories.length)-(t.justified?1:0)}},Yo.prototype.scaleOptions=function(){var t=this.rangeIndices(),e=t.min,o=t.max,t=this.lineBox();return{scale:(this.options.vertical?t.height():t.width())/(o-e||1)*(this.options.reverse?-1:1),box:t,min:e,max:o}},Yo.prototype.arrangeLabels=function(){qo.prototype.arrangeLabels.call(this),this.hideOutOfRangeLabels()},Yo.prototype.hideOutOfRangeLabels=function(){var t,e,o,i=this.box,r=this.labels;0<r.length&&(e=i[(t=this.options.vertical?m:v)+1],o=i[t+2],i=r[0],r=yt(r),(i.box[t+1]>o||i.box[t+2]<e)&&(i.options.visible=!1),(r.box[t+1]>o||r.box[t+2]<e)&&(r.options.visible=!1))},Yo.prototype.getMajorTickPositions=function(){return this.getTicks().majorTicks},Yo.prototype.getMinorTickPositions=function(){return this.getTicks().minorTicks},Yo.prototype.getLabelsTickPositions=function(){return this.getTicks().labelTicks},Yo.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},Yo.prototype.getTickPositions=function(t){for(var e=this.options,o=e.vertical,i=e.reverse,r=this.scaleOptions(),n=r.scale,e=r.box,s=r.min,a=e[(o?m:v)+(i?2:1)],p=this.tickIndices(t),h=[],l=0;l<p.length;l++)h.push(a+wt(n*(p[l]-s),3));return h},Yo.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},Yo.prototype.filterOutOfRangePositions=function(t,e){if(!t.length)return t;for(var o=this.options.vertical?m:v,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)},Yo.prototype.lineInfo=function(){var t=this.options,e=t.vertical,o=t.reverse,i=this.lineBox(),r=e?i.height():i.width(),t=e?m:v,e=o?-1:1,o=t+(1==e?1:2).toString();return{axis:t,axisOrigin:o,axisDir:e,lineBox:i,lineSize:r,lineStart:i[o]}},Yo.prototype.lineDir=function(){return this.options.reverse?-1:1},Yo.prototype.getSlot=function(t,e,o){var i=this.options,r=i.reverse,n=i.justified,s=this.scaleOptions(),a=s.scale,p=s.box,h=s.min,l=this.lineInfo(),c=l.axis,u=l.lineStart,i=p.clone(),s=!lt(e),l=_t(t,0),t=_t(e,l),t=Math.max(t-1,l),e=u+(l-h)*a,a=u+(Math.max(l,t)+1-h)*a;return s&&n&&(a=e),o&&(e=vt(e,p[c+1],p[c+2]),a=vt(a,p[c+1],p[c+2])),i[c+1]=r?a:e,i[c+2]=r?e:a,i},Yo.prototype.limitSlot=function(t){var e=this.options.vertical?m:v,o=this.lineBox(),i=t.clone();return i[e+1]=vt(t[e+1],o[e+1],o[e+2]),i[e+2]=vt(t[e+2],o[e+1],o[e+2]),i},Yo.prototype.slot=function(t,e,o){var i=Math.floor(this.options.min||0),t=t,e=e;return"string"==typeof t?t=this.categoryIndex(t):B(t)&&(t-=i),"string"==typeof e?e=this.categoryIndex(e):B(e)&&(e-=i),qo.prototype.slot.call(this,t,e,o)},Yo.prototype.pointCategoryIndex=function(t){var e=this.options,o=e.reverse,i=e.justified,r=e.vertical?m:v,n=this.scaleOptions(),s=n.scale,a=n.box,p=n.min,e=n.max,n=a[r+1],a=a[r+2],r=t[r];if(r<n||a<r)return null;n=(o?e:p)+(r-n)/s,s=n%1;return i?n=Math.round(n):0==s&&0<n&&n--,Math.floor(n)},Yo.prototype.getCategory=function(t){t=this.pointCategoryIndex(t);return null===t?null:this.options.categories[t]},Yo.prototype.categoryIndex=function(t){return this.totalIndex(t)-Math.floor(this.options.min||0)},Yo.prototype.categoryAt=function(t,e){var o=this.options;return(e?o.srcCategories:o.categories)[t]},Yo.prototype.categoriesCount=function(){return(this.options.categories||[]).length},Yo.prototype.translateRange=function(t){var e=this.options,o=this.lineBox(),o=e.vertical?o.height():o.width(),e=e.categories.length,o=wt(t/(o/e),f);return{min:o,max:e+o}},Yo.prototype.scaleRange=function(t,e){var o=Math.abs(this.pointOffset(e)),i=this.totalRangeIndices(),e=i.max-i.min,t=this.scaleToDelta(t,e),e=i.min+o*t,t=i.max-(1-o)*t;return{min:e,max:t=t-e<.1?e+.1:t}},Yo.prototype.zoomRange=function(t,e){var o=this.totalRange(),i=o.min,o=o.max,e=this.scaleRange(t,e);return{min:vt(e.min,i,o),max:vt(e.max,i,o)}},Yo.prototype.labelsCount=function(){var t=this.labelsRange();return t.max-t.min},Yo.prototype.labelsRange=function(){var t=this.options,e=t.justified,o=t.labels,i=this.totalRangeIndices(!0),r=i.min,n=i.max,i=Math.floor(r),n=e?(r=Math.ceil(r),Math.floor(n)):(r=Math.floor(r),Math.ceil(n));return{min:(r>o.skip?o.skip+o.step*Math.ceil((r-o.skip)/o.step):o.skip)-i,max:(t.categories.length?n+(e?1:0):0)-i}},Yo.prototype.createAxisLabel=function(t,e,o){var i=this.options,r=i.dataItems?i.dataItems[t]:null,i=_t(i.categories[t],"");o.dataItem=r;o=this.axisLabelText(i,e,o);return new Ge(i,o,t,r,e)},Yo.prototype.shouldRenderNote=function(t){var e=this.totalRangeIndices();return Math.floor(e.min)<=t&&t<=Math.ceil(e.max)},Yo.prototype.noteSlot=function(t){var e=this.options,e=t-Math.floor(e.min||0);return this.getSlot(e)},Yo.prototype.arrangeNotes=function(){qo.prototype.arrangeNotes.call(this),this.hideOutOfRangeNotes()},Yo.prototype.hideOutOfRangeNotes=function(){var t=this.notes,e=this.box;if(t&&t.length)for(var o=this.options.vertical?m:v,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()}},Yo.prototype.pan=function(t){var e=this.totalRangeIndices(!0),o=this.scaleOptions().scale,i=wt(t/o,f),t=this.totalRange(),o=e.min+i,e=e.max+i;return this.limitRange(o,e,0,t.max,i)},Yo.prototype.pointsRange=function(t,e){var o=this.options,i=o.reverse,r=o.vertical?m:v,n=this.totalRangeIndices(!0),s=this.scaleOptions(),o=s.scale,i=s.box[r+(i?2:1)],t=t[r]-i,i=e[r]-i,t=n.min+t/o,i=n.min+i/o,o=Math.min(t,i),i=Math.max(t,i);if(.01<=i-o)return{min:o,max:i}},Yo.prototype.valueRange=function(){return this.range()},Yo.prototype.totalIndex=function(t){var e=this.options;return this._categoriesMap?this._categoriesMap.get(t):function(t,e){if(t instanceof Date){for(var o=e.length,i=0;i<o;i++)if(Uo(e[i],t))return i;return-1}return e.indexOf(t)}(t,e.srcCategories)},Yo.prototype.currentRangeIndices=function(){var t=this.options,e=0;return{min:e=B(t.min)?Math.floor(t.min):e,max:B(t.max)?t.justified?Math.floor(t.max):Math.ceil(t.max)-1:this.totalCount()-1}},Yo.prototype.mapCategories=function(){if(!this._categoriesMap)for(var t=this._categoriesMap=new $,e=this.options.srcCategories,o=0;o<e.length;o++)t.set(e[o],o)},Yo.prototype.totalCount=function(){return Math.max(this.options.srcCategories.length,this._seriesMax||0)},Yo);function Yo(){qo.apply(this,arguments)}At(at,{type:"category",vertical:!1,majorGridLines:{visible:!1,width:1,color:r},labels:{zIndex:1},justified:!1,_deferLabels:!0});var Qo=at,Lt={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"},Zo=[go,fo,yo,vo,mo,xo,wo,bo],Ko="fit";function $o(t){var e=t._range;return e||((e=t._range=St(t)).min=Oo(e.min),e.max=Oo(e.max)),e}function Jo(t){this.options=t}Jo.prototype.displayIndices=function(){return{min:0,max:1}},Jo.prototype.displayRange=function(){return{}},Jo.prototype.total=function(){return{}},Jo.prototype.valueRange=function(){return{}},Jo.prototype.valueIndex=function(){return-1},Jo.prototype.values=function(){return[]},Jo.prototype.totalIndex=function(){return-1},Jo.prototype.valuesCount=function(){return 0},Jo.prototype.totalCount=function(){return 0},Jo.prototype.dateAt=function(){return null};function ti(t,e,o){(this.options=o).baseUnitStep=o.baseUnitStep||1;var i=o.roundToBaseUnit,r=o.justified;this.start=Lo(t,0,o.baseUnit,o.weekStartDay);var n=this.roundToTotalStep(e),s=!r&&Uo(e,n)&&!o.justifyEnd;this.end=this.roundToTotalStep(e,!r,s?1:0);var a=o.min||t;this.valueStart=this.roundToTotalStep(a),this.displayStart=i?this.valueStart:a,(t=o.max)?(a=!r&&Uo(t,this.roundToTotalStep(t))?-1:0,this.valueEnd=this.roundToTotalStep(t,!1,a),this.displayEnd=i?this.roundToTotalStep(t,!r):o.max):(this.valueEnd=n,this.displayEnd=i||s?this.end:e),this.valueEnd<this.valueStart&&(this.valueEnd=this.valueStart),this.displayEnd<=this.displayStart&&(this.displayEnd=this.roundToTotalStep(this.displayStart,!1,1))}function ei(t,e,o){for(var i,r,n,s=$o(t.categories),a=(t.max||s.max)-(t.min||s.min),p=t.autoBaseUnitSteps,h=t.maxDateGroups,l=t.baseUnit===Ko,c=e?Zo.indexOf(e):0,u=l?Zo[c++]:t.baseUnit,d=a/To[u],g=d;!r||h<=d;){for(i=i||p[u].slice(0);(n=i.shift())&&e===u&&n<o;);if(n)d=g/(r=n);else{if(u===yt(Zo)){r=Math.ceil(g/h);break}if(!l){h<d&&(r=Math.ceil(g/h));break}u=Zo[c++]||yt(Zo),g=a/To[u],i=null}}t.baseUnitStep=r,t.baseUnit=u}function oi(t){var e=(t.baseUnit||"").toLowerCase();return e===Ko||J(e,Zo)||function(t){for(var e,o,i=t.categories,r=lt(i)?i.length:0,n=l,s=0;s<r;s++){var a,p=i[s];p&&e&&(0<(a=Bo(p,e))&&(o=(n=Math.min(n,a))>=Mo?bo:Po-3*So<=n?wo:ko<=n?xo:So<=n?mo:Ao<=n?vo:Co<=n?yo:fo)),e=p}t.baseUnit=o||mo}(t),e!==Ko&&"auto"!==t.baseUnitStep||ei(t),t}ti.prototype.displayRange=function(){return{min:this.displayStart,max:this.displayEnd}},ti.prototype.displayIndices=function(){var t,e,o;return this._indices||(t=(e=this.options).baseUnit,o=e.baseUnitStep,e=Fo(this.displayStart,this.valueStart,t,o),o=Fo(this.displayEnd,this.valueStart,t,o),this._indices={min:e,max:o}),this._indices},ti.prototype.total=function(){return{min:this.start,max:this.end}},ti.prototype.totalCount=function(){return this.totalIndex(this.end)+(this.options.justified?1:0)},ti.prototype.valueRange=function(){return{min:this.valueStart,max:this.valueEnd}},ti.prototype.valueIndex=function(t){var e=this.options;return Math.floor(Fo(t,this.valueStart,e.baseUnit,e.baseUnitStep))},ti.prototype.totalIndex=function(t){var e=this.options;return Math.floor(Fo(t,this.start,e.baseUnit,e.baseUnitStep))},ti.prototype.dateIndex=function(t){var e=this.options;return Fo(t,this.valueStart,e.baseUnit,e.baseUnitStep)},ti.prototype.valuesCount=function(){return this.valueIndex(this.valueEnd)+1},ti.prototype.values=function(){var t=this._values;if(!t){var e=this.options,o=this.valueRange();this._values=t=[];for(var i=o.min;i<=o.max;)t.push(i),i=Lo(i,e.baseUnitStep,e.baseUnit,e.weekStartDay)}return t},ti.prototype.dateAt=function(t,e){var o=this.options;return Lo(e?this.start:this.valueStart,o.baseUnitStep*t,o.baseUnit,o.weekStartDay)},ti.prototype.roundToTotalStep=function(t,e,o){var i=this.options,r=i.baseUnit,n=i.baseUnitStep,s=i.weekStartDay,i=this.start,t=Fo(t,i,r,n),t=e?Math.ceil(t):Math.floor(t);return o&&(t+=o),Lo(i,t*n,r,s)};var ii,jt=((ii=Qo)&&(ri.__proto__=ii),((ri.prototype=Object.create(ii&&ii.prototype)).constructor=ri).prototype.clone=function(){var t=new ri(Object.assign({},this.options),this.chartService);return t.createLabels(),t},ri.prototype.categoriesHash=function(){var t=this.dataRange.total().min;return this.options.baseUnit+this.options.baseUnitStep+t},ri.prototype.initUserOptions=function(t){return t},ri.prototype.initFields=function(){ii.prototype.initFields.call(this);var t=this.chartService,e=t.intl,o=this.options,i=o.categories||[];i._parsed||((i=Wo(e,i))._parsed=!0),o=j({roundToBaseUnit:!0},o,{categories:i,min:No(e,o.min),max:No(e,o.max),weekStartDay:Xo(o,e)}),t.panning&&t.isPannable(o.vertical?m:v)&&(o.roundToBaseUnit=!1),o.userSetBaseUnit=o.userSetBaseUnit||o.baseUnit,o.userSetBaseUnitStep=o.userSetBaseUnitStep||o.baseUnitStep,0<((this.options=o).srcCategories=i).length?(e=$o(i),t=o.maxDivisions,this.dataRange=new ti(e.min,e.max,oi(o)),t?(i=this.dataRange.displayRange(),ei(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 ti(e.min,e.max,i)):this.divisionRange=this.dataRange):(o.baseUnit=o.baseUnit||mo,this.dataRange=this.divisionRange=new Jo(o)),this.rangeLabels=[]},ri.prototype.tickIndices=function(t){var e=this.dataRange,o=this.divisionRange,i=o.valuesCount();if(!this.options.maxDivisions||!i)return ii.prototype.tickIndices.call(this,t);var r=[],n=o.values(),s=0;this.options.justified||(n=n.concat(o.dateAt(i)),s=.5);for(var a,p=0;p<n.length;p++)r.push(e.dateIndex(n[p])+s),1!==t&&1<=p&&(a=r.length-1,r.splice(p,0,r[a-1]+(r[a]-r[a-1])*t));return r},ri.prototype.shouldRenderNote=function(t){var e=this.range(),o=this.options.categories||[];return 0<=Do(t,e.min)&&Do(t,e.max)<=0&&o.length},ri.prototype.parseNoteValue=function(t){return No(this.chartService.intl,t)},ri.prototype.noteSlot=function(t){return this.getSlot(t)},ri.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=wt(t/r,f);return n.min&&n.max&&(r=Ro(e.min||n.min,t),t=Ro(e.max||n.max,t),n={min:Lo(r,0,o,i),max:Lo(t,0,o,i)}),n},ri.prototype.labelsRange=function(){return{min:this.options.labels.skip,max:this.divisionRange.valuesCount()}},ri.prototype.pan=function(t){if(this.isEmpty())return null;var e=this.options,o=this.lineBox(),i=e.vertical?o.height():o.width(),r=this.dataRange.displayRange(),n=r.min,o=r.max,r=this.dataRange.total(),i=wt(t/(i/(o-n)),f)*(e.reverse?-1:1),n=Ro(n,i),o=Ro(o,i),i=this.limitRange(Eo(n),Eo(o),Eo(r.min),Eo(r.max),i);return i?(i.min=Oo(i.min),i.max=Oo(i.max),i.baseUnit=e.baseUnit,i.baseUnitStep=e.baseUnitStep||1,i.userSetBaseUnit=e.userSetBaseUnit,i.userSetBaseUnitStep=e.userSetBaseUnitStep,i):void 0},ri.prototype.pointsRange=function(t,e){if(this.isEmpty())return null;var o=ii.prototype.pointsRange.call(this,t,e),i=this.dataRange.displayRange(),t=this.dataRange.displayIndices(),e=zo(i.max,i.min)/(t.max-t.min),t=this.options;return{min:Ro(i.min,o.min*e),max:Ro(i.min,o.max*e),baseUnit:t.userSetBaseUnit||t.baseUnit,baseUnitStep:t.userSetBaseUnitStep||t.baseUnitStep}},ri.prototype.scaleRange=function(t,e){if(this.isEmpty())return{};var o=this.options,i=o.userSetBaseUnit===Ko,r=this.dataRange.total(),n=this.dataRange.displayRange(),s=n.min,a=n.max,p=Math.abs(this.pointOffset(e)),n=this.scaleToDelta(t,a-s),e=Math.round(p*n),t=Math.round((1-p)*n),h=this.dataRange.options.baseUnit,p=new Date(s.getTime()+e),n=new Date(a.getTime()-t);if(i){var l,c,u=o.autoBaseUnitSteps,e=o.maxDateGroups,t=yt(u[h])*e*To[h],d=zo(a,s),i=zo(n,p),g=Zo.indexOf(h);if(i<To[h]&&h!==go)h=Zo[g-1],p=Ro(s,c=(d-(e-1)*(l=yt(u[h]))*To[h])/2),n=Ro(a,-c);else if(t<i&&h!==bo){var f=0;do{for(h=Zo[++g],f=0,c=2*To[h];l=u[h][f],++f<u[h].length&&c*l<d;);}while(h!==bo&&c*l<d);0<(c=(c*l-d)/2)&&(p=Ro(s,-c),n=Ro(a,c),p=Ro(p,vt(n,r.min,r.max)-n),n=Ro(n,vt(p,r.min,r.max)-p))}}return p&&n&&0<zo(n,p)?{min:p,max:n,baseUnit:o.userSetBaseUnit||o.baseUnit,baseUnitStep:o.userSetBaseUnitStep||o.baseUnitStep}:void 0},ri.prototype.zoomRange=function(t,e){var o=this.dataRange.total(),e=this.scaleRange(t,e);return e&&(e.min<o.min&&(e.min=o.min),e.max>o.max&&(e.max=o.max)),e},ri.prototype.range=function(){return this.dataRange.displayRange()},ri.prototype.createLabels=function(){ii.prototype.createLabels.call(this),this.createRangeLabels()},ri.prototype.clearLabels=function(){ii.prototype.clearLabels.call(this),this.rangeLabels=[]},ri.prototype.arrangeLabels=function(){this.arrangeRangeLabels(),ii.prototype.arrangeLabels.call(this)},ri.prototype.arrangeRangeLabels=function(){var t,e,o,i,r=this.options,n=this.rangeLabels;0!==n.length&&(i=this.lineBox(),t=r.vertical,e=r.rangeLabels.mirror||r.labels.mirror,(o=n[0])&&(r=t?i.y1-o.box.height()/2:i.x1,this.positionLabel(o,e,r)),(n=n[1])&&(i=t?i.y2-n.box.height()/2:i.x2,this.positionLabel(n,e,i)))},ri.prototype.autoRotateLabels=function(){ii.prototype.autoRotateLabels.call(this),this.autoRotateRangeLabels()},ri.prototype.hideOutOfRangeLabels=function(){ii.prototype.hideOutOfRangeLabels.call(this),this.hideOverlappingLabels()},ri.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)}},ri.prototype.contentBox=function(){for(var t=ii.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},ri.prototype.createAxisLabel=function(t,e,o){void 0===o&&(o={});var i=this.options,r=i.dataItems&&!i.maxDivisions?i.dataItems[t]:null,n=this.divisionRange.dateAt(t),i=e.dateFormats[this.divisionRange.options.baseUnit];e.format=e.format||i,o.dataItem=r;o=this.axisLabelText(n,e,o);if(o)return new Ge(n,o,t,r,e)},ri.prototype.createRangeLabels=function(){var i=this,t=this.divisionRange,e=t.displayStart,o=t.displayEnd,t=this.options,r=Object.assign({},t.labels,t.rangeLabels,{align:C,zIndex:t.zIndex});!0===r.visible&&(this.normalizeLabelRotation(r),r.alignRotation=C,"auto"===r.rotation&&(r.rotation=0,t.autoRotateRangeLabels=!0),t=r.dateFormats[this.divisionRange.options.baseUnit],r.format=r.format||t,(t=function(t,e,o){o&&(t=new Ge(e,o,t,null,r),i.append(t),i.rangeLabels.push(t))})(0,e,this.axisLabelText(e,r,{index:0,count:2})),t(1,o,this.axisLabelText(o,r,{index:1,count:2})))},ri.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){o=2*Math.abs(e[o+1]-e[o]),o=i.autoRotateLabelAngle(t.box,o);0!==o&&(t.options.rotation=o,t.reflow(new Wt))},e=this.getMajorTickPositions(),t(o[0],e,0),t(o[1],e,e.length-2))},ri.prototype.categoryIndex=function(t){return this.dataRange.valueIndex(t)},ri.prototype.slot=function(t,e,o){var i=this.dataRange,t=t,e=e;t instanceof Date&&(t=i.dateIndex(t)),e instanceof Date&&(e=i.dateIndex(e));o=this.getSlot(t,e,o);if(o)return o.toRect()},ri.prototype.getSlot=function(t,e,o){return"object"==typeof t&&(t=this.categoryIndex(t)),"object"==typeof e&&(e=this.categoryIndex(e)),ii.prototype.getSlot.call(this,t,e,o)},ri.prototype.valueRange=function(){var t=$o(this.options.srcCategories);return{min:Oo(t.min),max:Oo(t.max)}},ri.prototype.categoryAt=function(t,e){return this.dataRange.dateAt(t,e)},ri.prototype.categoriesCount=function(){return this.dataRange.valuesCount()},ri.prototype.rangeIndices=function(){return this.dataRange.displayIndices()},ri.prototype.labelsBetweenTicks=function(){return!this.divisionRange.options.justified},ri.prototype.prepareUserOptions=function(){this.isEmpty()||(this.options.categories=this.dataRange.values())},ri.prototype.getCategory=function(t){t=this.pointCategoryIndex(t);return null===t?null:this.dataRange.dateAt(t)},ri.prototype.totalIndex=function(t){return this.dataRange.totalIndex(t)},ri.prototype.currentRangeIndices=function(){var t=this.dataRange.valueRange();return{min:this.dataRange.totalIndex(t.min),max:this.dataRange.totalIndex(t.max)}},ri.prototype.totalRange=function(){return this.dataRange.total()},ri.prototype.totalCount=function(){return this.dataRange.totalCount()},ri.prototype.isEmpty=function(){return!this.options.srcCategories.length},ri.prototype.roundedRange=function(){if(!1!==this.options.roundToBaseUnit||this.isEmpty())return this.range();var t=this.options,e=$o(t.srcCategories);return new ti(e.min,e.max,Object.assign({},t,{justified:!1,roundToBaseUnit:!0,justifyEnd:t.justified})).displayRange()},ri);function ri(){ii.apply(this,arguments)}At(jt,{type:y,labels:{dateFormats:Lt},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 ni=jt;function si(t,e){return wt(Math.floor(t/e)*e,f)}function ai(t,e){return wt(Math.ceil(t/e)*e,f)}function pi(t){return Math.max(Math.min(t,3e5),-3e5)}var hi,li=Math.pow(10,-9),Jt=((hi=uo)&&(ci.__proto__=hi),((ci.prototype=Object.create(hi&&hi.prototype)).constructor=ci).prototype.initUserOptions=function(t){var o,e,i,r,n,s,a=(s=t.seriesMin,o=t.seriesMax,i=(e=t).narrowRange,r=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}(s),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;i=Math.min(0,i-(t-i)/2)}else i=e;return i}(s,o,i),n=Et(r,a),!(s={majorUnit:n})!==e.roundToMajorUnit&&(r<0&&ui(r,n,1/3)&&(r-=n),0<a&&ui(a,n,1/3)&&(a+=n)),s.min=si(r,n),s.max=ai(a,n),s);return this.totalOptions=(n=a,{min:lt((s=t).min)?Math.min(n.min,s.min):n.min,max:lt(s.max)?Math.max(n.max,s.max):n.max,majorUnit:n.majorUnit}),function(t,e){var o,i,r,n=e;e&&(function(t,e){for(var o=0;o<e.length;o++){var i=e[o];null===t[i]&&(t[i]=void 0)}}(e,["min","max"]),o=lt(e.min),i=lt(e.max),(r=o||i)&&e.min===e.max&&(0<e.min?e.min=0:e.max=1),e.majorUnit?(t.min=si(t.min,e.majorUnit),t.max=ai(t.max,e.majorUnit)):r&&(n=j(t,e),t.majorUnit=Et(n.min,n.max))),t.minorUnit=(n.majorUnit||t.majorUnit)/5;n=j(t,n);return n.min>=n.max&&(o&&!i?n.max=n.min+n.majorUnit:!o&&i&&(n.min=n.max-n.majorUnit)),n}(a,t)},ci.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},ci.prototype.clone=function(){return new ci(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},ci.prototype.startValue=function(){return 0},ci.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},ci.prototype.getDivisions=function(t){if(0===t)return 1;var e=this.options,e=e.max-e.min;return Math.floor(wt(e/t,3))+1},ci.prototype.getTickPositions=function(t,e){var o=this.options,i=this.lineInfo(),r=i.axisDir,n=i.axisOrigin,s=i.lineBox,a=t*(i.lineSize/(o.max-o.min)),p=this.getDivisions(t),h=[],l=s[n],c=0;e&&(c=e/t);for(var u=0;u<p;u++)u%c!=0&&h.push(wt(l,3)),l+=a*r;return h},ci.prototype.getMajorTickPositions=function(){return this.getTickPositions(this.options.majorUnit)},ci.prototype.getMinorTickPositions=function(){return this.getTickPositions(this.options.minorUnit)},ci.prototype.getSlot=function(t,e,o){void 0===o&&(o=!1);var i=this.options,r=this.lineInfo(),n=r.axis,s=r.axisDir,a=r.lineBox,p=r.lineSize,h=r.lineStart,r=s*(p/(i.max-i.min)),p=_t(t,e||0),t=_t(e,t||0);o&&(p=vt(p,i.min,i.max),t=vt(t,i.min,i.max));o=Math.min(p,t)-i.min,i=Math.max(p,t)-i.min,a=new Wt(a.x1,a.y1,a.x1,a.y1);return a[n+1]=pi(h+r*(0<s?o:i)),a[n+2]=pi(h+r*(0<s?i:o)),a},ci.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:wt(e+t*(o-e),f)},ci.prototype.translateRange=function(t){var e=this.options,o=e.vertical,i=e.reverse,r=e.max,n=e.min,e=this.lineInfo().lineSize,e=wt(t/(e/(r-n)),f);return{min:n+(e=!(!o&&!i||o&&i)?-e:e),max:r+e,offset:e}},ci.prototype.labelsCount=function(){return this.getDivisions(this.options.majorUnit)},ci.prototype.createAxisLabel=function(t,e,o){var i=this.options,i=wt(i.min+t*i.majorUnit,f),o=this.axisLabelText(i,e,o);return new Ge(i,o,t,null,e)},ci.prototype.shouldRenderNote=function(t){var e=this.range();return e.min<=t&&t<=e.max},ci.prototype.pan=function(t){t=this.translateRange(t);return this.limitRange(t.min,t.max,this.totalMin,this.totalMax,t.offset)},ci.prototype.pointsRange=function(t,e){var o=this.getValue(t),t=this.getValue(e),e=Math.min(o,t),t=Math.max(o,t);if(this.isValidRange(e,t))return{min:e,max:t}},ci.prototype.scaleRange=function(t,e){var o=Math.abs(this.pointOffset(e)),e=this.options.max-this.options.min,t=this.scaleToDelta(t,e),e=(1-o)*t,t=wt(this.options.min+o*t,f),e=wt(this.options.max-e,f);return{min:t,max:e=e-t<li?t+li:e}},ci.prototype.zoomRange=function(t,e){var o=this.totalMin,i=this.totalMax,e=this.scaleRange(t,e);return{min:vt(e.min,o,i),max:vt(e.max,o,i)}},ci.prototype.isValidRange=function(t,e){return li<e-t},ci);function ci(t,e,o,i){hi.call(this,Object.assign({},o,{seriesMin:t,seriesMax:e}),i)}function ui(t,e,o){t=wt(Math.abs(t%e),f);return 0===t||e*(1-o)<t}At(Jt,{type:"numeric",min:0,max:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:r},labels:{format:"#.####################"},zIndex:1});var di,gi=Jt,ne=((di=uo)&&(fi.__proto__=di),((fi.prototype=Object.create(di&&di.prototype)).constructor=fi).prototype.clone=function(){return new fi(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},fi.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},fi.prototype.getDivisions=function(t){var e=this.options;return Math.floor(Go(e.min,e.max,e.baseUnit)/t+1)},fi.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/zo(e.max,e.min),p=e.weekStartDay||0,h=[n],l=1;l<s;l++){var c=n+zo(Lo(e.min,l*t,e.baseUnit,p),e.min)*a*i;h.push(wt(c,3))}return h},fi.prototype.getMajorTickPositions=function(){return this.getTickPositions(this.options.majorUnit)},fi.prototype.getMinorTickPositions=function(){return this.getTickPositions(this.options.minorUnit)},fi.prototype.getSlot=function(t,e,o){return gi.prototype.getSlot.call(this,No(this.intlService,t),No(this.intlService,e),o)},fi.prototype.getValue=function(t){t=gi.prototype.getValue.call(this,t);return null!==t?Oo(t):null},fi.prototype.labelsCount=function(){return this.getDivisions(this.options.majorUnit)},fi.prototype.createAxisLabel=function(t,e,o){var i=this.options,r=t*i.majorUnit,n=i.weekStartDay||0,s=i.min;0<r&&(s=Lo(s,r,i.baseUnit,n));i=e.dateFormats[i.baseUnit];e.format=e.format||i;o=this.axisLabelText(s,e,o);return new Ge(s,o,t,null,e)},fi.prototype.translateRange=function(t){var e=this.options,o=this.lineBox(),i=e.vertical,r=e.reverse,n=i?o.height():o.width(),o=this.range(),o=n/zo(o.max,o.min),o=wt(t/o,f);return{min:Ro(e.min,o=!(!i&&!r||i&&r)?-o:o),max:Ro(e.max,o),offset:o}},fi.prototype.shouldRenderNote=function(t){var e=this.range();return 0<=Do(t,e.min)&&Do(t,e.max)<=0},fi.prototype.pan=function(t){t=this.translateRange(t,!0),t=this.limitRange(Eo(t.min),Eo(t.max),this.totalMin,this.totalMax,t.offset);if(t)return{min:Oo(t.min),max:Oo(t.max)}},fi.prototype.pointsRange=function(t,e){var o=this.getValue(t),t=this.getValue(e),e=Math.min(o,t),t=Math.max(o,t);return{min:Oo(e),max:Oo(t)}},fi.prototype.scaleRange=function(t,e){var o=Math.abs(this.pointOffset(e)),e=this.options.max-this.options.min,t=this.scaleToDelta(t,e),e=o*t,t=(1-o)*t,e=Oo(Eo(this.options.min)+e),t=Oo(Eo(this.options.max)-t);return{min:e,max:t=t-e<1e3?Oo(Eo(e)+1e3):t}},fi.prototype.zoomRange=function(t,e){e=this.scaleRange(t,e);return{min:Oo(vt(Eo(e.min),this.totalMin,this.totalMax)),max:Oo(vt(Eo(e.max),this.totalMin,this.totalMax))}},fi);function fi(t,e,o,i){var r,n,s,a,p,h=Oo(t),l=Oo(e),c=i.intl,u=o||{};r=h,n=l,s=u=j(u||{},{min:No(c,u.min),max:No(c,u.max),axisCrossingValue:Wo(c,u.axisCrossingValues||u.axisCrossingValue),weekStartDay:Xo(u,c)}),t=s.min||r,e=s.max||n,o=s.baseUnit||(e&&t?(a=Bo(e,t),p=vo,Mo<=a?p=bo:Po<=a?p=wo:ko<=a?p=xo:So<=a&&(p=mo),p):vo),r=To[o],n=s.weekStartDay||0,a=Vo(Eo(t)-1,o,n)||Oo(e),p=jo(Eo(e)+1,o,n),t=s.majorUnit||ai(Et(a.getTime(),p.getTime()),r)/r,e=Go(a,p,o),r=ai(e,t)-e,e=Math.floor(r/2),r-=e,s.baseUnit||delete s.baseUnit,s.baseUnit=s.baseUnit||o,s.min=s.min||Lo(a,-e,o,n),s.max=s.max||Lo(p,r,o,n),s.minorUnit=s.minorUnit||t/5,s.majorUnit=t,di.call(this,u=s,i),this.intlService=c,this.seriesMin=h,this.seriesMax=l;c=u.weekStartDay||0;this.totalMin=Eo(Vo(Eo(h)-1,u.baseUnit,c)),this.totalMax=Eo(jo(Eo(l)+1,u.baseUnit,c))}At(ne,{type:y,majorGridLines:{visible:!0,width:1,color:r},labels:{dateFormats:Lt}});var yi,vi=ne,he=((yi=uo)&&(mi.__proto__=yi),((mi.prototype=Object.create(yi&&yi.prototype)).constructor=mi).prototype.clone=function(){return new mi(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},mi.prototype.startValue=function(){return this.options.min},mi.prototype.getSlot=function(t,e,o){var i=this.options,r=this.logMin,n=this.logMax,s=i.majorUnit,a=i.min,p=i.max,h=this.lineInfo(),l=h.axis,c=h.axisDir,u=h.lineBox,i=h.lineSize,h=h.lineStart,i=c*(i/(n-r)),n=_t(t,e||1),t=_t(e,t||1);if(n<=0||t<=0)return null;o&&(n=vt(n,a,p),t=vt(t,a,p));n=wi(n,s),t=wi(t,s),s=Math.min(n,t)-r,r=Math.max(n,t)-r,u=new Wt(u.x1,u.y1,u.x1,u.y1);return u[l+1]=pi(h+i*(0<c?s:r)),u[l+2]=pi(h+i*(0<c?r:s)),u},mi.prototype.getValue=function(t){var e=this.options,o=this.logMin,i=this.logMax,r=e.majorUnit,n=this.lineInfo(),s=n.axis,a=n.axisDir,e=n.lineStart,n=n.lineSize,e=a*(t[s]-e);return e<0||n<e?null:wt(Math.pow(r,o+e*((i-o)/n)),f)},mi.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},mi.prototype.translateRange=function(t){var e=this.options,o=this.logMin,i=this.logMax,r=e.reverse,n=e.vertical,s=e.majorUnit,e=this.lineBox(),e=n?e.height():e.width(),e=wt(t/(e/(i-o)),f);return!n&&!r||n&&r||(e=-e),{min:Math.pow(s,o+e),max:Math.pow(s,i+e),offset:e}},mi.prototype.labelsCount=function(){var t=Math.floor(this.logMax);return Math.floor(t-this.logMin)+1},mi.prototype.getMajorTickPositions=function(){var e=[];return this.traverseMajorTicksPositions(function(t){e.push(t)},{step:1,skip:0}),e},mi.prototype.createTicks=function(o){var t=this.options,e=t.majorTicks,i=t.minorTicks,r=t.vertical,n=t.labels.mirror,s=this.lineBox(),a={vertical:r};function p(t,e){a.tickX=n?s.x2:s.x2-e.size,a.tickY=n?s.y1-e.size:s.y1,a.position=t,o.append(ao(a,e))}return e.visible&&this.traverseMajorTicksPositions(p,e),i.visible&&this.traverseMinorTicksPositions(p,i),[]},mi.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){J(t,n)||(r.position=t,s.append(po(r,e)),n.push(t))}return i.visible&&this.traverseMajorTicksPositions(a,i),o.visible&&this.traverseMinorTicksPositions(a,o),s.children},mi.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(wt(i+r*(a-n),f),e)},mi.prototype.traverseMinorTicksPositions=function(t,e){for(var o=this.options,i=o.min,r=o.max,n=o.minorUnit,s=o.majorUnit,o=this.lineInfo(),a=o.lineStart,p=o.step,h=this.logMin,l=this.logMax,c=Math.floor(h);c<l;c++)for(var u=this._minorIntervalOptions(c),d=e.skip;d<n;d+=e.step){var g=u.value+d*u.minorStep;if(r<g)break;i<=g&&t(wt(a+p*(wi(g,s)-h),f),e)}},mi.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 Ge(i,o,t,null,e)},mi.prototype.shouldRenderNote=function(t){var e=this.range();return e.min<=t&&t<=e.max},mi.prototype.pan=function(t){t=this.translateRange(t);return this.limitRange(t.min,t.max,this.totalMin,this.totalMax,t.offset)},mi.prototype.pointsRange=function(t,e){t=this.getValue(t),e=this.getValue(e);return{min:Math.min(t,e),max:Math.max(t,e)}},mi.prototype.scaleRange=function(t,e){var o=this.options.majorUnit,i=wi(this.options.min,o),r=wi(this.options.max,o),e=Math.abs(this.pointOffset(e)),t=this.scaleToDelta(t,r-i),i=Math.pow(o,i+e*t),t=Math.pow(o,r-(1-e)*t);return{min:i,max:t=t-i<1e-6?i+1e-6:t}},mi.prototype.zoomRange=function(t,e){var o=this.scaleRange(t,e),t=this.totalMin,e=this.totalMax;return{min:vt(o.min,t,e),max:vt(o.max,t,e)}},mi.prototype._minorIntervalOptions=function(t){var e=this.options,o=e.minorUnit,i=e.majorUnit,e=Math.pow(i,t);return{value:e,minorStep:(Math.pow(i,t+1)-e)/o}},mi.prototype.lineInfo=function(){var t=yi.prototype.lineInfo.call(this);return t.step=t.axisDir*(t.lineSize/(this.logMax-this.logMin)),t},mi);function mi(t,e,o,i){var r,n,s,a,p,h=j({majorUnit:10,min:t,max:e},o),l=h.majorUnit,c=(u=wt(wi(a=e,p=l),f)%1,a<=0?p:0!=u&&(u<.3||.9<u)?Math.pow(p,wi(a,p)+.2):Math.pow(p,Math.ceil(wi(a,p)))),u=(r=t,s=(n=h).majorUnit,(d=r)<=0?d=e<=1?Math.pow(s,-2):1:n.narrowRange||(d=Math.pow(s,Math.floor(wi(r,s)))),d),d=(a=u,p=c,n=o,s=(r=h).min,d=r.max,lt(r.axisCrossingValue)&&r.axisCrossingValue<=0&&xi(),lt(n.max)?n.max<=0&&xi():d=p,lt(n.min)?n.min<=0&&xi():s=a,{min:s,max:d});h.max=d.max,h.min=d.min,h.minorUnit=o.minorUnit||wt(l-1,f),yi.call(this,h,i),this.totalMin=lt(o.min)?Math.min(u,o.min):u,this.totalMax=lt(o.max)?Math.max(c,o.max):c,this.logMin=wt(wi(d.min,l),f),this.logMax=wt(wi(d.max,l),f),this.seriesMin=t,this.seriesMax=e,this.createLabels()}function xi(){throw new Error("Non positive values cannot be used for a logarithmic axis")}function wi(t,e){return Math.log(t)/Math.log(e)}At(he,{type:"log",majorUnit:10,minorUnit:1,axisCrossingValue:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:r},zIndex:1,_deferLabels:!0});var bi,_i=he,de={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),pt(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){r=this.radiusCallback&&this.radiusCallback(e,i,r);return this.renderGridLines(t,e,o,r)},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 P.geometry.Circle([o.x,o.y],e),s=this.gridLinesVisual(),a=0;a<t.length;a++){var p=new P.drawing.Path(r);i&&(n.radius=i(t[a])),p.moveTo(n.center).lineTo(n.pointAt(t[a]+180)),s.append(p)}return s.children},gridLineAngles:function(t,e,o,i,r){var n=this,r=this.intervals(e,o,i,r),t=t.options,s=t.visible&&!1!==(t.line||{}).visible;return it(r,function(t){t=n.intervalAngle(t);if(!s||90!==t)return t})}},me=((bi=Qo)&&(Ci.__proto__=bi),((Ci.prototype=Object.create(bi&&bi.prototype)).constructor=Ci).prototype.range=function(){return{min:0,max:this.options.categories.length}},Ci.prototype.reflow=function(t){this.box=t,this.reflowLabels()},Ci.prototype.lineBox=function(){return this.box},Ci.prototype.reflowLabels=function(){for(var t=this.labels,e=this.options.labels,o=e.skip||0,i=e.step||1,r=new Wt,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()))}},Ci.prototype.intervals=function(t,e,o,i){void 0===i&&(i=!1);for(var r,n=this.options,s=n.categories.length/t||1,a=360/s,p=o||1,h=[],l=e||0;l<s;l+=p)r=n.reverse?360-l*a:l*a,r=wt(r,3)%360,i&&J(r,i)||h.push(r);return h},Ci.prototype.majorIntervals=function(){return this.intervals(1)},Ci.prototype.minorIntervals=function(){return this.intervals(.5)},Ci.prototype.intervalAngle=function(t){return(360+t+this.options.startAngle)%360},Ci.prototype.majorAngles=function(){var e=this;return it(this.majorIntervals(),function(t){return e.intervalAngle(t)})},Ci.prototype.createLine=function(){return[]},Ci.prototype.majorGridLineAngles=function(t){var e=this.options.majorGridLines;return this.gridLineAngles(t,1,e.skip,e.step)},Ci.prototype.minorGridLineAngles=function(t,e){var o=this.options,i=o.minorGridLines,o=o.majorGridLines,o=e?this.intervals(1,o.skip,o.step):null;return this.gridLineAngles(t,.5,i.skip,i.step,o)},Ci.prototype.radiusCallback=function(e,t,o){if(t.options.type!==d){var t=xt(360/(2*this.options.categories.length)),i=Math.cos(t)*e,r=this.majorAngles();return function(t){return!o&&J(t,r)?e:i}}},Ci.prototype.createPlotBands=function(){for(var t=this.options.plotBands||[],e=this._plotbandGroup=new P.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);r.startAngle+=s*n.angle;var a=Math.ceil(i.to)-i.to;r.angle-=(a+s)*n.angle;i=re.current.createRing(r,{fill:{color:i.color,opacity:i.opacity},stroke:{opacity:i.opacity}});e.append(i)}this.appendVisual(e)},Ci.prototype.plotBandSlot=function(t){return this.getSlot(t.from,t.to-1)},Ci.prototype.getSlot=function(t,e){var o=this.options,i=o.justified,r=this.box,n=this.majorAngles(),s=n.length,a=360/s,t=t;o.reverse&&!i&&(t=(t+1)%s);n=n[t=vt(Math.floor(t),0,s-1)];i&&(n-=a/2)<0&&(n+=360);t=a*(vt(Math.ceil(e||t),t,s-1)-t+1);return new Kt(r.center(),0,r.height()/2,n,t)},Ci.prototype.slot=function(t,e){var o=this.getSlot(t,e),t=o.startAngle+180,e=t+o.angle;return new P.geometry.Arc([o.center.x,o.center.y],{startAngle:t,endAngle:e,radiusX:o.radius,radiusY:o.radius})},Ci.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},Ci);function Ci(){bi.apply(this,arguments)}At(me,{startAngle:90,labels:{margin:H(10)},majorGridLines:{visible:!0},justified:!0}),j(me.prototype,de);var Ai,Si=me,_e=((Ai=uo)&&(ki.__proto__=Ai),((ki.prototype=Object.create(Ai&&Ai.prototype)).constructor=ki).prototype.getDivisions=function(t){return gi.prototype.getDivisions.call(this,t)-1},ki.prototype.reflow=function(t){this.box=t,this.reflowLabels()},ki.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 Wt,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()))}},ki.prototype.lineBox=function(){return this.box},ki.prototype.intervals=function(t,e,o,i){void 0===i&&(i=!1);for(var r=this.options.min,n=this.getDivisions(t),s=[],a=o||1,p=e||0;p<n;p+=a){var h=(360+r+p*t)%360;i&&J(h,i)||s.push(h)}return s},ki.prototype.majorIntervals=function(){return this.intervals(this.options.majorUnit)},ki.prototype.minorIntervals=function(){return this.intervals(this.options.minorUnit)},ki.prototype.intervalAngle=function(t){return(540-t-this.options.startAngle)%360},ki.prototype.createLine=function(){return[]},ki.prototype.majorGridLineAngles=function(t){var e=this.options.majorGridLines;return this.gridLineAngles(t,this.options.majorUnit,e.skip,e.step)},ki.prototype.minorGridLineAngles=function(t,e){var o=this.options,i=o.minorGridLines,r=o.majorGridLines,r=e?this.intervals(o.majorUnit,r.skip,r.step):null;return this.gridLineAngles(t,o.minorUnit,i.skip,i.step,r)},ki.prototype.plotBandSlot=function(t){return this.getSlot(t.from,t.to)},ki.prototype.getSlot=function(t,e){var o=this.options,i=this.box,r=o.startAngle,t=vt(t,o.min,o.max),e=vt(e||t,t,o.max);return o.reverse&&(t*=-1,e*=-1),(e=(540-e-r)%360)<(t=(540-t-r)%360)&&(r=t,t=e,e=r),new Kt(i.center(),0,i.height()/2,t,e-t)},ki.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),e=Math.max(t,e),n=o.reverse?(s=n,e):(s=360-e,360-n),s=(s+i)%360;return new P.geometry.Arc([r.center.x,r.center.y],{startAngle:s,endAngle:n=(n+i)%360,radiusX:r.radius,radiusY:r.radius})},ki.prototype.getValue=function(t){var e=this.options,o=this.box.center(),i=t.x-o.x,o=t.y-o.y,o=Math.round(ct(Math.atan2(o,i))),i=e.startAngle;return e.reverse||(o*=-1,i*=-1),(o+i+360)%360},ki.prototype.valueRange=function(){return{min:0,max:2*Math.PI}},ki);function ki(t,e){Ai.call(this,t,e);e=this.options;e.minorUnit=e.minorUnit||e.majorUnit/2}At(_e,{type:"polar",startAngle:0,reverse:!1,majorUnit:60,min:0,max:360,labels:{margin:H(10)},majorGridLines:{color:r,visible:!0,width:1},minorGridLines:{color:"#aaa"}}),j(_e.prototype,de,{createPlotBands:Si.prototype.createPlotBands,majorAngles:Si.prototype.majorAngles,range:gi.prototype.range,labelsCount:gi.prototype.labelsCount,createAxisLabel:gi.prototype.createAxisLabel});var Pi=_e;function Mi(t,e){return 180-Math.abs(Math.abs(t-e)-180)}var Ti,Pe={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 P.drawing.Group({zIndex:-1}),s=0;s<o.length;s++){var a=o[s],p={fill:{color:a.color,opacity:a.opacity},stroke:{opacity:a.opacity}},a=this.getSlot(a.from,a.to,!0),a=new Kt(r,r.y-a.y2,r.y-a.y1,0,360),p=e===d?re.current.createRing(a,p):P.drawing.Path.fromPoints(this.plotBandPoints(a,i),p).close();n.append(p)}this.appendVisual(n)},plotBandPoints:function(t,e){for(var o=[],i=[],r=[t.center.x,t.center.y],n=new P.geometry.Circle(r,t.innerRadius),s=new P.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(),r=t.box.center(),t=[];return e.majorGridLines.visible&&(t=this.renderGridLines(r,o,i,e.majorGridLines)),e.minorGridLines.visible&&(o=this.radarMinorGridLinePositions(),pt(t,this.renderGridLines(r,o,i,e.minorGridLines))),t},renderGridLines:function(t,e,o,i){var r={stroke:{width:i.width,color:i.color,dashType:i.dashType}},n=i.skip;void 0===n&&(n=0);var s=i.step;void 0===s&&(s=0);for(var a=this.gridLinesVisual(),p=n;p<e.length;p+=s){var h=t.y-e[p];if(0<h){var l=new P.geometry.Circle([t.x,t.y],h);if(i.type===d)a.append(new P.drawing.Circle(l,r));else{for(var c=new P.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 o,e=this.lineBox(),i=this.plotArea.polarAxis,r=i.majorAngles(),n=i.box.center(),s=t.distanceTo(n),a=s;return this.options.majorGridLines.type!==d&&1<r.length&&(i=t.x-n.x,n=t.y-n.y,o=(ct(Math.atan2(n,i))+540)%360,r.sort(function(t,e){return Mi(t,o)-Mi(e,o)}),i=90-Mi(r[0],r[1])/2,r=180-Mi(o,r[0])-i,a=s*(Math.sin(xt(r))/Math.sin(xt(i)))),this.axisType().prototype.getValue.call(this,new Ht(e.x1,e.y2-a))}},Ve=((Ti=gi)&&(Bi.__proto__=Ti),((Bi.prototype=Object.create(Ti&&Ti.prototype)).constructor=Bi).prototype.radarMajorGridLinePositions=function(){return this.getTickPositions(this.options.majorUnit)},Bi.prototype.radarMinorGridLinePositions=function(){var t=this.options,e=0;return t.majorGridLines.visible&&(e=t.majorUnit),this.getTickPositions(t.minorUnit,e)},Bi.prototype.axisType=function(){return Ti},Bi);function Bi(){Ti.apply(this,arguments)}j(Ve.prototype,Pe);var Ri,Oi=Ve,Ue=((Ri=_i)&&(Ii.__proto__=Ri),((Ii.prototype=Object.create(Ri&&Ri.prototype)).constructor=Ii).prototype.radarMajorGridLinePositions=function(){var e=[];return this.traverseMajorTicksPositions(function(t){e.push(t)},this.options.majorGridLines),e},Ii.prototype.radarMinorGridLinePositions=function(){var e=[];return this.traverseMinorTicksPositions(function(t){e.push(t)},this.options.minorGridLines),e},Ii.prototype.axisType=function(){return Ri},Ii);function Ii(){Ri.apply(this,arguments)}j(Ue.prototype,Pe);var Li=Ue;function Vi(t){return t<=0?-1:1}var ji,Di,zi=((Di=P.Class)&&(Hi.__proto__=Di),((Hi.prototype=Object.create(Di&&Di.prototype)).constructor=Hi).prototype.process=function(t){var e=t.slice(0),o=[],i=this.closed,r=e.length;if(2<r&&(this.removeDuplicates(0,e),r=e.length),r<2||2===r&&e[0].equals(e[1]))return o;var n,s=e[0],a=e[1],p=e[2];for(o.push(new P.geometry.Segment(s));s.equals(e[r-1]);)i=!0,e.pop(),r--;if(2===r){t=this.tangent(s,a,v,m);return yt(o).controlOut(this.firstControlPoint(t,s,a,v,m)),o.push(new P.geometry.Segment(a,this.secondControlPoint(t,s,a,v,m))),o}i?(s=e[r-1],a=e[0],p=e[1],l=(n=this.controlPoints(s,a,p))[1],c=n[0]):(n=this.tangent(s,a,v,m),l=this.firstControlPoint(n,s,a,v,m));for(var h,l,c,u=l,d=0;d<=r-3;d++)this.removeDuplicates(d,e),d+3<=(r=e.length)&&(s=e[d],a=e[d+1],p=e[d+2],h=this.controlPoints(s,a,p),yt(o).controlOut(u),u=h[1],h=h[0],o.push(new P.geometry.Segment(a,h)));return i?(s=e[r-2],a=e[r-1],p=e[0],l=this.controlPoints(s,a,p),yt(o).controlOut(u),o.push(new P.geometry.Segment(a,l[0])),yt(o).controlOut(l[1]),o.push(new P.geometry.Segment(p,c))):(c=this.tangent(a,p,v,m),yt(o).controlOut(u),o.push(new P.geometry.Segment(p,this.secondControlPoint(c,a,p,v,m)))),o},Hi.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)},Hi.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},Hi.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||wt(i,1)===wt(o.y,1)},Hi.prototype.lineFunction=function(t,e){e=(e.y-t.y)/(e.x-t.x);return[t.y-e*t.x,e]},Hi.prototype.controlPoints=function(t,e,o){var i,r=v,n=m,s=!1,a=!1;this.isLine(t,e,o)?i=this.tangent(t,e,v,m):(p={x:this.isMonotonicByField(t,e,o,v),y:this.isMonotonicByField(t,e,o,m)}).x&&p.y?(i=this.tangent(t,o,v,m),s=!0):(this.invertAxis(t,e,o)&&(r=m,n=v),p[r]?i=0:(i=.01*(o[n]<t[n]&&t[n]<=e[n]||t[n]<o[n]&&e[n]<=t[n]?Vi((o[n]-t[n])*(e[r]-t[r])):-Vi((o[r]-t[r])*(e[n]-t[n]))),a=!0));var p=this.secondControlPoint(i,t,e,r,n);a&&(a=r,r=n,n=a);n=this.firstControlPoint(i,e,o,r,n);return s&&(this.restrictControlPoint(t,e,p,i),this.restrictControlPoint(e,o,n,i)),[p,n]},Hi.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)},Hi.prototype.tangent=function(t,e,o,i){o=e[o]-t[o],i=e[i]-t[i];return 0==o?0:i/o},Hi.prototype.isMonotonicByField=function(t,e,o,i){return o[i]>e[i]&&e[i]>t[i]||o[i]<e[i]&&e[i]<t[i]},Hi.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)},Hi.prototype.secondControlPoint=function(t,e,o,i,r){var n=e[i],e=o[i],n=.333*(e-n);return this.point(e-n,o[r]-n*t,i,r)},Hi.prototype.point=function(t,e,o,i){var r=new P.geometry.Point;return r[o]=t,r[i]=e,r},Hi.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},Hi),Ei=((ji=P.Class)&&(Ui.__proto__=ji),((Ui.prototype=Object.create(ji&&ji.prototype)).constructor=Ui).prototype.value=function(t){var e=this._axis;return e.getCategory?e.getCategory(t):e.getValue(t)},Ui.prototype.slot=function(t,e,o){return this._axis.slot(t,e,o=void 0===o?!0:o)},Ui.prototype.range=function(){return this._axis.range()},Ui.prototype.valueRange=function(){return this._axis.valueRange()},Ui);function Ui(t){ji.call(this),this._axis=t,this.options=t.options}function Hi(t){Di.call(this),this.closed=t}function Fi(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 Gi(t){this.visual=t.visual,this.chartsVisual=t.chartContainer.visual,this._pane=t}Gi.prototype.findAxisByName=function(t){return Fi(t,this._pane.axes)};var Ni,Wi=Gi,Xi=((Ni=P.Class)&&(qi.__proto__=Ni),(qi.prototype=Object.create(Ni&&Ni.prototype)).constructor=qi);function qi(t){Ni.call(this),this._plotArea=t,this.visual=t.visual,this.backgroundVisual=t._bgVisual}function Yi(t){for(var e=t.length,o=0,i=0;i<e;i++)B(t[i])&&o++;return o}var Qi={min:function(t){for(var e=t.length,o=l,i=0;i<e;i++){var r=t[i];B(r)&&(o=Math.min(o,r))}return o===l?t[0]:o},max:function(t){for(var e=t.length,o=c,i=0;i<e;i++){var r=t[i];B(r)&&(o=Math.max(o,r))}return o===c?t[0]:o},sum:function(t){for(var e=t.length,o=0,i=0;i<e;i++){var r=t[i];B(r)&&(o+=r)}return o},sumOrNull:function(t){var e=null;return e=Yi(t)?Qi.sum(t):e},count:function(t){for(var e=t.length,o=0,i=0;i<e;i++){var r=t[i];null!==r&<(r)&&o++}return o},avg:function(t){var e=Yi(t),o=t[0];return o=0<e?Qi.sum(t)/e:o},first:function(t){for(var e=t.length,o=0;o<e;o++){var i=t[o];if(null!==i&<(i))return i}return t[0]}},Zi=Qi;function Ki(t,e){return null===e?e:Y(t)(e)}var $i,Ne=(($i=P.Class)&&(Ji.__proto__=$i),((Ji.prototype=Object.create($i&&$i.prototype)).constructor=Ji).prototype.register=function(t,e,o){void 0===e&&(e=[h]),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)}},Ji.prototype.canonicalFields=function(t){return this.valueFields(t).concat(this.otherFields(t))},Ji.prototype.valueFields=function(t){return this._valueFields[t.type]||[h]},Ji.prototype.otherFields=function(t){return this._otherFields[t.type]||[h]},Ji.prototype.bindPoint=function(t,e,o){var i,r,n,s=t.data,a=lt(o)?o:s[e],p={valueFields:{value:a}},o=this.valueFields(t),s=this._otherFields[t.type];return null===a?i=this._nullValue[t.type]:lt(a)?Array.isArray(a)?(n=a.slice(o.length),i=this._bindFromArray(a,o),r=this._bindFromArray(n,s)):"object"==typeof a&&(e=this.sourceFields(t,o),n=this.sourceFields(t,s),i=this._bindFromObject(a,o,e),r=this._bindFromObject(a,s,n)):i=this._undefinedValue[t.type],lt(i)&&(1===o.length?p.valueFields.value=i[o[0]]:p.valueFields=i),p.fields=r||{},p},Ji.prototype._makeValue=function(t,e){for(var o={},i=t.length,r=0;r<i;r++)o[t[r]]=e;return o},Ji.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},Ji.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]=Ki(a,t))}return i},Ji.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===h?"field":n+"Field";o.push(null!==t[s]?t[s]||n:null)}return o},Ji);function Ji(){$i.call(this),this._valueFields={},this._otherFields={},this._nullValue={},this._undefinedValue={}}Ne.current=new Ne;var tr,er,or=Ne,ir=/percent(?:\w*)\((\d+)\)/,rr=new RegExp("^stddev(?:\\((\\d+(?:\\.\\d+)?)\\))?$"),nr=((er=P.Class)&&(br.__proto__=er),((br.prototype=Object.create(er&&er.prototype)).constructor=br).prototype.initGlobalRanges=function(t,e,o){var i,r,n,s,a=e.data,p=rr.exec(t);p?(this.valueGetter=this.createValueGetter(e,o),i=this.getAverage(a),r=this.getStandardDeviation(a,i,!1),p=p[1]?parseFloat(p[1]):1,n={low:i.value-r*p,high:i.value+r*p},this.globalRange=function(){return n}):t.indexOf&&0<=t.indexOf("stderr")&&(this.valueGetter=this.createValueGetter(e,o),s=this.getStandardError(a,this.getAverage(a)),this.globalRange=function(t){return{low:t-s,high:t+s}})},br.prototype.createValueGetter=function(t,e){var o,i=t.data,r=or.current,n=r.valueFields(t),i=lt(i[0])?i[0]:{};return x(i)?o=Y("["+(e?n.indexOf(e):0)+"]"):B(i)?o=Y():"object"==typeof i&&(o=Y(r.sourceFields(t,n)[n.indexOf(e)])),o},br.prototype.getErrorRange=function(t,e){if(!lt(e))return null;if(this.globalRange)return this.globalRange(t);if(x(e))i=t-e[0],r=t+e[1];else if(B(o=parseFloat(e)))i=t-o,r=t+o;else{if(!(o=ir.exec(e)))throw new Error("Invalid ErrorBar value: "+e);var o=t*(parseFloat(o[1])/100),i=t-Math.abs(o),r=t+Math.abs(o)}return{low:i,high:r}},br.prototype.getStandardError=function(t,e){return this.getStandardDeviation(t,e,!0)/Math.sqrt(e.count)},br.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]);B(s)&&(r+=Math.pow(s-e.value,2))}return Math.sqrt(r/o)},br.prototype.getAverage=function(t){for(var e=t.length,o=0,i=0,r=0;r<e;r++){var n=this.valueGetter(t[r]);B(n)&&(o+=n,i++)}return{value:o/i,count:i}},br),sr=(P.support.browser||{}).msie?.001:0,ar="zero",pr="interpolate",hr="bar",lr="column",cr="line",ur="pie",dr="verticalLine",gr=[hr,lr,"ohlc","candlestick","boxPlot","verticalBoxPlot","bullet","rangeColumn","rangeBar","waterfall","horizontalWaterfall"],fr="drag",yr="dragEnd",vr="zoom",mr="zoomEnd",xr="DOMMouseScroll mousewheel",Qe=((tr=pe)&&(wr.__proto__=tr),((wr.prototype=Object.create(tr&&tr.prototype)).constructor=wr).prototype.reflow=function(t){var e,o=this.options.endCaps,i=this.isVertical,r=this.getAxis().getSlot(this.low,this.high),n=t.center(),s=this.getCapsWidth(t,i),a=i?n.x:n.y,t=a-s,s=a+s;i?(e=[new Ht(n.x,r.y1),new Ht(n.x,r.y2)],o&&e.push(new Ht(t,r.y1),new Ht(s,r.y1),new Ht(t,r.y2),new Ht(s,r.y2)),this.box=new Wt(t,r.y1,s,r.y2)):(e=[new Ht(r.x1,n.y),new Ht(r.x2,n.y)],o&&e.push(new Ht(r.x1,t),new Ht(r.x1,s),new Ht(r.x2,t),new Ht(r.x2,s)),this.box=new Wt(r.x1,t,r.x2,s)),this.linePoints=e},wr.prototype.getCapsWidth=function(t,e){t=e?t.width():t.height();return Math.min(Math.floor(t/2),4)||4},wr.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()},wr.prototype.createDefaultVisual=function(){var t=this.options,e=this.linePoints,o={stroke:{color:t.color,width:t.line.width,dashType:t.line.dashType}};tr.prototype.createVisual.call(this);for(var i=0;i<e.length;i+=2){var r=new P.drawing.Path(o).moveTo(e[i].x,e[i].y).lineTo(e[i+1].x,e[i+1].y);M(r),this.visual.append(r)}},wr);function wr(t,e,o,i,r,n){tr.call(this,n),this.low=t,this.high=e,this.isVertical=o,this.chart=i,this.series=r}function br(t,e,o){er.call(this),this.initGlobalRanges(t,e,o)}At(Qe,{animation:{type:"fadeIn",delay:600},endCaps:!0,line:{width:2},zIndex:1});var _r,Cr=Qe,Ar=((_r=Cr)&&(Sr.__proto__=_r),((Sr.prototype=Object.create(_r&&_r.prototype)).constructor=Sr).prototype.getAxis=function(){return this.chart.seriesValueAxis(this.series)},Sr);function Sr(){_r.apply(this,arguments)}function kr(t,e,o,i){void 0===i&&(i=!1);var r,n,s=(o=void 0===o?{}:o).defaults=o.defaults||{},a=o.depth=o.depth||0,p=!1;if(o.excluded=o.excluded||[],5<a)return null;for(r in t)!J(r,o.excluded)&&t.hasOwnProperty(r)&&(I(n=t[r])?(p=!0,i||(t[r]=_t(n(e),s[r]))):D(n)&&(i||(o.defaults=s[r]),o.depth++,p=kr(n,e,o,i)||p,o.depth--));return p}function Pr(t){for(var e=t.length,o=0,i=0;i<e;i++)o=Math.max(o,t[i].data.length);return o}var Mr,Je=((Mr=pe)&&(Tr.__proto__=Mr),((Tr.prototype=Object.create(Mr&&Mr.prototype)).constructor=Tr).prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},Tr.prototype.pointOptions=function(t,e){var o,i=this.seriesOptions[e];return i||(o=this.pointType().prototype.defaults,this.seriesOptions[e]=i=j({},o,{vertical:!this.options.invertAxes},t)),i},Tr.prototype.plotValue=function(t){if(!t)return 0;if(this.options.isStacked100&&B(t.value)){for(var e=t.categoryIx,o=this.categoryPoints[e],i=[],r=0,n=0;n<o.length;n++){var s,a,p=o[n];p&&(s=t.series.stack,a=p.series.stack,s&&a&&s.group!==a.group||B(p.value)&&(r+=Math.abs(p.value),i.push(Math.abs(p.value))))}if(0<r)return t.value/r}return t.value},Tr.prototype.plotRange=function(t,e){void 0===e&&(e=0);var o=this.categoryPoints[t.categoryIx];if(this.options.isStacked){for(var i=this.plotValue(t),r=0<=i,n=e,s=!1,a=0;a<o.length;a++){var p=o[a];if(t===p)break;var h=t.series.stack,l=p.series.stack;if(h&&l){if(typeof h===g&&h!==l)continue;if(h.group&&h.group!==l.group)continue}p=this.plotValue(p);(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,O(t.value)?t.value:e]},Tr.prototype.stackLimits=function(t,e){for(var o=l,i=c,r=0;r<this.categoryPoints.length;r++){var n=this.categoryPoints[r];if(n)for(var s=0;s<n.length;s++){var a=n[s];!a||a.series.stack!==e&&a.series.axis!==t||(a=this.plotRange(a,0)[1],lt(a)&&isFinite(a)&&(i=Math.max(i,a),o=Math.min(o,a)))}}return{min:o,max:i}},Tr.prototype.updateStackRange=function(){var t=this.options,e=t.isStacked,o=t.series,i={};if(e)for(var r=0;r<o.length;r++){var n=o[r],s=n.axis,a=s+n.stack,p=i[a];p||(p=this.stackLimits(s,n.stack),(n=this.errorTotals)&&(n.negative.length&&(p.min=Math.min(p.min,St(n.negative).min)),n.positive.length&&(p.max=Math.max(p.max,St(n.positive).max))),p.min!==l||p.max!==c?i[a]=p:p=null),p&&(this.valueAxisRanges[s]=p)}},Tr.prototype.addErrorBar=function(t,e,o){var i,r=t.value,n=t.series,s=t.seriesIx,a=t.options.errorBars,p=e.fields.errorLow,e=e.fields.errorHigh;B(p)&&B(e)?i={low:p,high:e}:a&<(a.value)&&(this.seriesErrorRanges=this.seriesErrorRanges||[],this.seriesErrorRanges[s]=this.seriesErrorRanges[s]||new nr(a.value,n,h),i=this.seriesErrorRanges[s].getErrorRange(r,a.value)),i&&(t.low=i.low,t.high=i.high,this.addPointErrorBar(t,o))},Tr.prototype.addPointErrorBar=function(t,e){var o,i=!this.options.invertAxes,r=t.options.errorBars,n=t.series,s=t.low,a=t.high;this.options.isStacked?(s=(o=this.stackedErrorRange(t,e)).low,a=o.high):(this.updateRange({value:s},e={categoryIx:e,series:n}),this.updateRange({value:a},e));r=new Ar(s,a,i,this,n,r);t.errorBars=[r],t.append(r)},Tr.prototype.stackedErrorRange=function(t,e){var o=this.plotRange(t,0)[1]-t.value,i=t.low+o,o=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<o&&(this.errorTotals.positive[e]=Math.max(this.errorTotals.positive[e]||0,o)),{low:i,high:o}},Tr.prototype.addValue=function(t,e){var o=e.categoryIx,i=e.series,r=e.seriesIx,n=this.categoryPoints[o];n||(this.categoryPoints[o]=n=[]);var s=this.seriesPoints[r];s||(this.seriesPoints[r]=s=[]);r=this.createPoint(t,e);r&&(Object.assign(r,e),r.owner=this,r.noteText=t.fields.noteText,lt(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)},Tr.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];lt(a)||(this._evalSeries[n]=a=kr(t,{},s,!0));n=t;return a&&kr(n=j({},t),{value:e,category:o,index:i,series:r,dataItem:r.data[i]},s),n},Tr.prototype.updateRange=function(t,e){var o=e.series.axis,e=t.value,t=this.valueAxisRanges[o];isFinite(e)&&null!==e&&((t=this.valueAxisRanges[o]=t||{min:l,max:c}).min=Math.min(t.min,e),t.max=Math.max(t.max,e))},Tr.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},Tr.prototype.reflow=function(t){var s=this,a=this.categorySlots=[],p=this.points,h=this.categoryAxis,l=0;this.traverseDataPoints(function(t,e){var o=e.categoryIx,i=e.series,r=s.seriesValueAxis(i),n=p[l++],e=a[o];e||(a[o]=e=s.categorySlot(h,o,r)),n&&(i=s.plotRange(n,r.startValue()),(o=s.valueSlot(r,i))?(o=s.pointSlot(e,o),n.aboveAxis=s.aboveAxis(n,r),n.stackValue=i[1],s.options.isStacked100&&(n.percentage=s.plotValue(n)),s.reflowPoint(n,o)):n.visible=!1)}),this.reflowCategories(a),!this.options.clip&&this.options.limitPoints&&this.points.length&&this.limitPoints(),this.box=t},Tr.prototype.valueSlot=function(t,e){return t.getSlot(e[0],e[1],!this.options.clip)},Tr.prototype.limitPoints=function(){for(var t=this.categoryPoints,e=t[0].concat(yt(t)),o=0;o<e.length;o++)e[o]&&this.limitPoint(e[o])},Tr.prototype.limitPoint=function(t){var e=this.categoryAxis.limitSlot(t.box);e.equals(t.box)||t.reflow(e)},Tr.prototype.aboveAxis=function(t,e){var o=this.categoryAxisCrossingValue(e),t=t.value;return e.options.reverse?t<o:o<=t},Tr.prototype.categoryAxisCrossingValue=function(t){var e=this.categoryAxis,t=t.options;return[].concat(t.axisCrossingValues||t.axisCrossingValue)[e.axisIndex||0]||0},Tr.prototype.reflowPoint=function(t,e){t.reflow(e)},Tr.prototype.reflowCategories=function(){},Tr.prototype.pointSlot=function(t,e){var o=this.options.invertAxes,i=o?e:t,e=o?t:e;return new Wt(i.x1,e.y1,i.x2,e.y2)},Tr.prototype.categorySlot=function(t,e){return t.getSlot(e)},Tr.prototype.traverseDataPoints=function(t){for(var e=this.options.series,o=Pr(e),i=e.length,r=0;r<i;r++)this._outOfRangeCallback(e[r],"_outOfRangeMinPoint",r,t);for(var n=0;n<o;n++)for(var s=0;s<i;s++){var a=e[s],p=this.categoryAxis.categoryAt(n);t(this._bindPoint(a,s,n),{category:p,categoryIx:n,categoriesCount:o,series:a,seriesIx:s})}for(var h=0;h<i;h++)this._outOfRangeCallback(e[h],"_outOfRangeMaxPoint",h,t)},Tr.prototype._outOfRangeCallback=function(t,e,o,i){var r=t[e];r&&(e=r.categoryIx,i(this._bindPoint(t,o,e,r.item),{category:r.category,categoryIx:e,series:t,seriesIx:o,dataItem:r.item}))},Tr.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]=or.current.bindPoint(t,o,i))},Tr.prototype.formatPointValue=function(t,e){return null===t.value?"":this.chartService.format.auto(e,t.value)},Tr.prototype.pointValue=function(t){return t.valueFields.value},Tr);function Tr(t,e){Mr.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()}At(Je,{series:[],invertAxes:!1,isStacked:!1,clip:!0,limitPoints:!0});var Br,Rr=Je,Or={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:gt(t),originalEvent:t,point:this}}},oo={createNote:function(){var t=this.options.notes,e=this.noteText||t.label.text;!1!==t.visible&<(e)&&null!==e&&(this.note=new qe({value:this.value,text:e,dataItem:this.dataItem,category:this.category,series:this.series},this.options.notes,this.owner.chartService),this.append(this.note))}},lo=((Br=pe)&&(Ir.__proto__=Br),((Ir.prototype=Object.create(Br&&Br.prototype)).constructor=Ir).prototype.render=function(){var t,e=this.options,o=e.markers,i=e.labels;this._rendered||(this._rendered=!0,o.visible&&o.size&&(this.marker=this.createMarker(),this.append(this.marker)),i.visible&&(t=W(i),e=this.pointData(),o=this.value,t?o=t(e):i.format&&(o=this.formatValue(i.format)),this.label=new Le(o,j({align:C,vAlign:C,margin:{left:5,right:5},zIndex:_t(i.zIndex,this.series.zIndex)},i),e),this.append(this.label)),this.createNote(),this.errorBar&&this.append(this.errorBar))},Ir.prototype.markerBorder=function(){var t=this.options.markers,e=t.background,t=j({color:this.color},t.border);return lt(t.color)||(t.color=new P.Color(e).brightness(.8).toHex()),t},Ir.prototype.createVisual=function(){},Ir.prototype.createMarker=function(){var t=this.options.markers;return new fe({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:_t(t.zIndex,this.series.zIndex),animation:t.animation,visual:t.visual},{dataItem:this.dataItem,value:this.value,series:this.series,category:this.category})},Ir.prototype.markerBox=function(){return this.marker||(this.marker=this.createMarker(),this.marker.reflow(this._childBox)),this.marker.box},Ir.prototype.reflow=function(t){var e=this.options,o=this.aboveAxis,i=e.vertical;this.render();var r=(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&&(o=this.markerBox(),e.markers.visible&&e.markers.size||(e=o.center(),o=new Wt(e.x,e.y,e.x,e.y)),this.note.reflow(o))},Ir.prototype.reflowLabel=function(t){var e=this.options,o=this.label,e=e.labels.position;o&&(e="below"===(e="above"===e?k:e)?_:e,o.reflow(t),o.box.alignTo(this.markerBox(),e),o.reflow(o.box))},Ir.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),t=new fe({type:o.type,width:i,height:i,rotation:o.rotation,background:t.color||e,border:{color:t.border.color,width:t.border.width,opacity:_t(t.border.opacity,1)},opacity:_t(t.opacity,1)});return t.reflow(this._childBox),t.getElement()},Ir.prototype.highlightVisual=function(){return(this.marker||{}).visual},Ir.prototype.highlightVisualArgs=function(){var t,e,o,i,r=this.marker;return r?(i=r.paddingBox.toRect(),t=r.visual):(o=(e=this.options.markers.size)/2,r=this.box.center(),i=new P.geometry.Rect([r.x-o,r.y-o],[e,e])),{options:this.options,rect:i,visual:t}},Ir.prototype.tooltipAnchor=function(){var t=this.markerBox(),e=this.owner.pane.clipBox();if(!e||e.overlaps(t)){var o,i=t.x2+5,e=A,t=this.aboveAxis?(o=t.y1,_):(o=t.y2,k);return{point:new Ht(i,o),align:{horizontal:e,vertical:t}}}},Ir.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Ir.prototype.overlapsBox=function(t){return this.markerBox().overlaps(t)},Ir.prototype.unclipElements=function(){this.label&&(this.label.options.noclip=!0),this.note&&(this.note.options.noclip=!0)},Ir.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,stackValue:this.stackValue,series:this.series}},Ir);function Ir(t,e){Br.call(this),this.value=t,this.options=e,this.aboveAxis=_t(this.options.aboveAxis,!0),this.tooltipTracking=!0}lo.prototype.defaults={vertical:!0,markers:{visible:!0,background:a,size:8,type:u,border:{width:2},opacity:1},labels:{visible:!1,position:"above",margin:H(3),padding:H(4),animation:{type:"fadeIn",delay:600}},notes:{label:{}},highlight:{markers:{border:{color:"#fff",width:2}},zIndex:100},errorBars:{line:{width:1}}},j(lo.prototype,Or),j(lo.prototype,oo);var Lr,Vr=lo,at=((Lr=pe)&&(jr.__proto__=Lr),((jr.prototype=Object.create(Lr&&Lr.prototype)).constructor=jr).prototype.points=function(){return this.toGeometryPoints(this.linePoints)},jr.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},jr.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&&!lt(this.visual.options.zIndex)&&(this.visual.options.zIndex=this.series.zIndex)):this.segmentVisual()},jr.prototype.segmentVisual=function(){var t=this.options,e=this.series,o=e.color,i=e._defaults;I(o)&&i&&(o=i.color);e=P.drawing.Path.fromPoints(this.points(),{stroke:{color:o,width:e.width,opacity:e.opacity,dashType:e.dashType},zIndex:e.zIndex});t.closed&&e.close(),this.visual=e},jr.prototype.aliasFor=function(t,e){return this.parent.getNearestPoint(e.x,e.y,this.seriesIx)},jr);function jr(t,e,o){Lr.call(this),this.linePoints=t,this.series=e,this.seriesIx=o}At(at,{closed:!1});var Dr=at;function zr(t,e,o,i,r){var n=t.box,t=new P.geometry.Point;return t[e]=n[e+o],t[i]=n[i+r],t}var Er,jt={calculateStepPoints:function(t){for(var e=this.parent.plotArea.seriesCategoryAxis(this.series).options,o=e.justified,i=e.vertical,e=e.reverse,r=i?v:m,n=i?m:v,s=e?2:1,a=s,p=zr(t[0],r,s,n,a),h=[p],l=1;l<t.length;l++){var c,u=zr(t[l],r,s,n,a);p[r]!==u[r]&&((c=new P.geometry.Point)[r]=p[r],c[n]=u[n],h.push(c,u)),p=u}return o?p!==yt(h)&&h.push(p):h.push(zr(yt(t),r,s,n,e?1:2)),h}},Jt=((Er=Dr)&&(Ur.__proto__=Er),((Ur.prototype=Object.create(Er&&Er.prototype)).constructor=Ur).prototype.points=function(){return this.calculateStepPoints(this.linePoints)},Ur);function Ur(){Er.apply(this,arguments)}j(Jt.prototype,jt);var Hr,Fr,Gr=Jt,Nr=((Fr=Dr)&&(Xr.__proto__=Fr),((Xr.prototype=Object.create(Fr&&Fr.prototype)).constructor=Xr).prototype.segmentVisual=function(){var t=this.series,e=t._defaults,o=t.color;I(o)&&e&&(o=e.color);e=new zi(this.options.closed).process(this.points()),t=new P.drawing.Path({stroke:{color:o,width:t.width,opacity:t.opacity,dashType:t.dashType},zIndex:t.zIndex});t.segments.push.apply(t.segments,e),this.visual=t},Xr),Lt={renderSegments:function(){var t,e=this.options,o=this.seriesPoints,i=e.series,r=o.length;this._segments=[];for(var n=0;n<r;n++){for(var s=i[n],a=this.sortPoints(o[n]),p=a.length,h=[],l=0;l<p;l++){var c=a[l];c?h.push(c):this.seriesMissingValues(s)!==pr&&(1<h.length&&(t=this.createSegment(h,s,n,t),this._addSegment(t)),h=[])}1<h.length&&(t=this.createSegment(h,s,n,t),this._addSegment(t))}this.children.unshift.apply(this.children,this._segments)},_addSegment:function(t){this._segments.push(t),t.parent=this},sortPoints:function(t){return t},seriesMissingValues:function(t){t=t.missingValues;return!t&&this.options.isStacked?ar:t||pr},getNearestPoint:function(t,e,o){for(var i,r=new Ht(t,e),n=this.seriesPoints[o],s=l,a=0;a<n.length;a++){var p,h=n[a];h&<(h.value)&&null!==h.value&&!1!==h.visible&&((p=h.box.center().distanceTo(r))<s&&(i=h,s=p))}return i}},ne=((Hr=P.drawing.Animation)&&(Wr.__proto__=Hr),((Wr.prototype=Object.create(Hr&&Hr.prototype)).constructor=Wr).prototype.setup=function(){this._setEnd(this.options.box.x1)},Wr.prototype.step=function(t){var e=this.options.box;this._setEnd(tt(e.x1,e.x2,t))},Wr.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)},Wr);function Wr(){Hr.apply(this,arguments)}function Xr(){Fr.apply(this,arguments)}At(ne,{duration:600}),P.drawing.AnimationFactory.current.register("clip",ne);var qr=ne;function Yr(t){for(var e=0;e<t.length;e++)if(lt(t[e].zIndex))return!0}var Qr,he={createAnimation:function(){var t,e=this.getRoot();e&&!1!==(e.options||{}).transitions&&(t=e.size(),e=P.drawing.Path.fromRect(t.toRect()),this.visual.clip(e),this.animation=new qr(e,{box:t}),Yr(this.options.series)&&this._setChildrenAnimation(e))},_setChildrenAnimation:function(t){for(var e=this.animationPoints(),o=0;o<e.length;o++){var i=e[o];i&&i.visual&<(i.visual.options.zIndex)&&i.visual.clip(t)}}},me=((Qr=Rr)&&(Zr.__proto__=Qr),((Zr.prototype=Object.create(Qr&&Qr.prototype)).constructor=Zr).prototype.render=function(){Qr.prototype.render.call(this),this.updateStackRange(),this.renderSegments()},Zr.prototype.pointType=function(){return Vr},Zr.prototype.createPoint=function(t,e){var o=e.categoryIx,i=e.category,r=e.series,n=e.seriesIx,s=this.seriesMissingValues(r),e=t.valueFields.value;if(!lt(e)||null===e){if(s!==ar)return null;e=0}s=this.pointOptions(r,n),s=this.evalPointOptions(s,e,i,o,r,n),t=t.fields.color||r.color;I(r.color)&&(t=s.color);s=new Vr(e,s);return s.color=t,this.append(s),s},Zr.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]},Zr.prototype.createSegment=function(t,e,o){var i=e.style;return new("step"===i?Gr:"smooth"===i?Nr:Dr)(t,e,o)},Zr.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)},Zr.prototype.supportsPointInactiveOpacity=function(){return!1},Zr);function Zr(){Qr.apply(this,arguments)}j(me.prototype,Lt,he);var Kr,$r,Jr=me,tn=(($r=Dr)&&(on.__proto__=$r),((on.prototype=Object.create($r&&$r.prototype)).constructor=on).prototype.createVisual=function(){var t=this.series,e=t._defaults,o=t.line||{},i=t.color;I(i)&&e&&(i=e.color),this.visual=new P.drawing.Group({zIndex:t.zIndex}),this.createFill({fill:{color:i,opacity:t.opacity},stroke:null}),0<o.width&&!1!==o.visible&&this.createStroke({stroke:j({color:i,opacity:t.opacity,lineCap:"butt"},o)})},on.prototype.strokeSegments=function(){return this._strokeSegments||(this._strokeSegments=this.createStrokeSegments())},on.prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.points())},on.prototype.stackSegments=function(){return(this.prevSegment||this).createStackSegments(this.stackPoints)},on.prototype.createStackSegments=function(t){return this.segmentsFromPoints(this.toGeometryPoints(t)).reverse()},on.prototype.segmentsFromPoints=function(t){return t.map(function(t){return new P.geometry.Segment(t)})},on.prototype.createStroke=function(t){t=new P.drawing.Path(t);t.segments.push.apply(t.segments,this.strokeSegments()),this.visual.append(t)},on.prototype.hasStackSegment=function(){return this.prevSegment||this.stackPoints&&this.stackPoints.length},on.prototype.createFill=function(t){var e,o=this.strokeSegments(),i=o.slice(0),r=this.hasStackSegment();r&&(e=this.stackSegments(),pt(i,e));t=new P.drawing.Path(t);t.segments.push.apply(t.segments,i),!r&&1<o.length&&this.fillToAxes(t),this.visual.append(t)},on.prototype.fillToAxes=function(t){var e=this.parent,o=e.options.invertAxes,i=e.seriesValueAxis(this.series),r=e.categoryAxisCrossingValue(i),e=i.getSlot(r,r,!0),i=this.strokeSegments(),r=i[0].anchor(),i=yt(i).anchor(),e=o?e.x1:e.y1;o?t.lineTo(e,i.y).lineTo(e,r.y):t.lineTo(i.x,e).lineTo(r.x,e)},on),de=((Kr=tn)&&(en.__proto__=Kr),((en.prototype=Object.create(Kr&&Kr.prototype)).constructor=en).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.calculateStepPoints(this.linePoints))},en.prototype.createStackSegments=function(t){return this.segmentsFromPoints(this.calculateStepPoints(t)).reverse()},en);function en(){Kr.apply(this,arguments)}function on(t,e,o,i,r){$r.call(this,t,e,o),this.prevSegment=i,this.stackPoints=r}j(de.prototype,jt);var rn,nn,sn,an,pn=de,hn=((an=tn)&&(fn.__proto__=an),((fn.prototype=Object.create(an&&an.prototype)).constructor=fn).prototype.createStrokeSegments=function(){var t=new zi(this.options.closed),e=this.points();return t.process(e)},fn.prototype.createStackSegments=function(){for(var t=this.strokeSegments(),e=[],o=t.length-1;0<=o;o--){var i=t[o];e.push(new P.geometry.Segment(i.anchor(),i.controlOut(),i.controlIn()))}return e},fn),ln=((sn=Jr)&&(gn.__proto__=sn),((gn.prototype=Object.create(sn&&sn.prototype)).constructor=gn).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?pn:"smooth"===a?hn:tn)(t,e,o,r,n)},gn.prototype.reflow=function(t){sn.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)}},gn.prototype._gapStackPoints=function(t,e,o){var i=this.seriesPoints,r=t[0].categoryIx,t=t.length;r<0&&(r=0,t--);var n=r+t,s=this.seriesOptions[0]._outOfRangeMinPoint?1:0,a=[];this._stackPoints=this._stackPoints||[];for(var p=r;p<n;p++){for(var h,l=p+s,c=e,u=void 0;u=i[--c][l],0<c&&!u;);u?("step"!==o&&r<p&&!i[c][l-1]&&a.push(this._previousSegmentPoint(p,l,l-1,c)),a.push(u),"step"!==o&&p+1<n&&!i[c][l+1]&&a.push(this._previousSegmentPoint(p,l,l+1,c))):(h=this._createGapStackPoint(p),this._stackPoints.push(h),a.push(h))}return a},gn.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},gn.prototype._createGapStackPoint=function(t){var e=this.pointOptions({},0),e=new Vr(0,e);return e.categoryIx=t,e.series={},e},gn.prototype.seriesMissingValues=function(t){return t.missingValues||ar},gn.prototype.supportsPointInactiveOpacity=function(){return!1},gn),cn=((nn=P.Class)&&(dn.__proto__=nn),((dn.prototype=Object.create(nn&&nn.prototype)).constructor=dn).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:l,max:c},r.min=Math.min(r.min,i.min),r.max=Math.max(r.max,i.max)}},dn.prototype.reset=function(t){this.axisRanges[t]=void 0},dn.prototype.query=function(t){return this.axisRanges[t]},dn),_e=((rn=pe)&&(un.__proto__=rn),((un.prototype=Object.create(rn&&rn.prototype)).constructor=un).prototype.createVisual=function(){this.textBox.options.noclip=this.options.noclip},un.prototype.reflow=function(t){var e=this.options,o=e.vertical,i=e.aboveAxis,r=this.children[0],n=r.options,s=r.box,a=r.options.padding,p=t;n.align=o?C:A,n.vAlign=o?k:C,"insideEnd"===e.position?o?(n.vAlign=k,!i&&s.height()<t.height()&&(n.vAlign=_)):n.align=i?S:A:e.position===C?(n.vAlign=C,n.align=C):"insideBase"===e.position?o?n.vAlign=i?_:k:n.align=i?A:S:"outsideEnd"===e.position&&(p=o?i?new Wt(t.x1,t.y1-s.height(),t.x2,t.y1):new Wt(t.x1,t.y2,t.x2,t.y2+s.height()):(n.align=C,i?new Wt(t.x2,t.y1,t.x2+s.width(),t.y2):new Wt(t.x1-s.width(),t.y1,t.x1,t.y2))),e.rotation||(o?a.left=a.right=(p.width()-r.contentBox.width())/2:a.top=a.bottom=(p.height()-r.contentBox.height())/2),r.reflow(p)},un.prototype.alignToClipBox=function(t){var e=this.options.vertical?m:v,o=e+"1",i=e+"2",r=this.children[0],e=this.parent.box;(e[o]<t[o]||t[i]<e[i])&&((r=r.paddingBox.clone())[o]=Math.max(e[o],t[o]),r[i]=Math.min(e[i],t[i]),this.reflow(r))},un);function un(t,e,o){rn.call(this,e),this.textBox=new Le(t,this.options,o),this.append(this.textBox)}function dn(){nn.call(this),this.axisRanges={}}function gn(){sn.apply(this,arguments)}function fn(){an.apply(this,arguments)}At(_e,{position:"outsideEnd",margin:H(3),padding:H(4),color:r,background:"",border:{width:1,color:""},aboveAxis:!0,vertical:!1,animation:{type:"fadeIn",delay:600},zIndex:2});var yn=_e;function vn(t){t=t.overlay;return t&&t.gradient&&"none"!==t.gradient}var mn,Ve=((mn=pe)&&(xn.__proto__=mn),((xn.prototype=Object.create(mn&&mn.prototype)).constructor=xn).prototype.render=function(){this._rendered||(this._rendered=!0,this.createLabel(),this.createNote(),this.errorBar&&this.append(this.errorBar))},xn.prototype.createLabel=function(){var t,e,o=this.options,i=o.labels;i.visible&&(t=this.pointData(),e=(e=W(i))?e(t):this.formatValue(i.format),this.label=new yn(e,j({vertical:o.vertical},i),t),this.append(this.label))},xn.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},xn.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)},xn.prototype.createVisual=function(){var e=this,t=this.box,o=this.options,i=o.visual;!1!==this.visible&&(mn.prototype.createVisual.call(this),i?(o=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 P.drawing.Group;return e.createRect(t),t},options:o}))&&this.visual.append(o):0<t.width()&&0<t.height()&&this.createRect(this.visual))},xn.prototype.createRect=function(t){var e=this.options,o=e.border,i=(lt(o.opacity)?o:e).opacity,r=this.box.toRect();r.size.width=Math.round(r.size.width);r=this.rectVisual=P.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)&&(M(r),(i<1||o<1)&&(r.options.stroke.lineJoin="round")),t.append(r),vn(e)&&(e=this.createGradientOverlay(r,{baseColor:this.color},j({end:e.vertical?void 0:[0,1]},e.overlay)),t.append(e))},xn.prototype.createHighlight=function(t){return M(P.drawing.Path.fromRect(this.box.toRect(),t))},xn.prototype.highlightVisual=function(){return this.rectVisual},xn.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this.rectVisual}},xn.prototype.getBorderColor=function(){var t=this.color,e=this.options.border,o=e._brightness||.8,e=e.color;return e=!lt(e)?new P.Color(t).brightness(o).toHex():e},xn.prototype.tooltipAnchor=function(){var t,e,o,i,r=this.options,n=this.box,s=this.aboveAxis,a=this.owner.pane.clipBox()||n,p=A,h=k;return r.vertical?(t=Math.min(n.x2,a.x2)+5,s?i=Math.max(n.y1,a.y1):(i=Math.min(n.y2,a.y2),h=_)):(e=Math.max(n.x1,a.x1),o=Math.min(n.x2,a.x2),i=r.isStacked?(h=_,t=s?(p=S,o):e,Math.max(n.y1,a.y1)-5):(s?t=o+5:(t=e-5,p=S),Math.max(n.y1,a.y1))),{point:new Ht(t,i),align:{horizontal:p,vertical:h}}},xn.prototype.overlapsBox=function(t){return this.box.overlaps(t)},xn.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}},xn);function xn(t,e){mn.call(this),this.options=e,this.color=e.color||a,this.aboveAxis=_t(this.options.aboveAxis,!0),this.value=t}j(Ve.prototype,Or),j(Ve.prototype,oo),Ve.prototype.defaults={border:{width:1},vertical:!0,overlay:{gradient:"glass"},labels:{visible:!1,format:"{0}"},opacity:1,notes:{label:{}}};var wn=Ve;function bn(t,e){t.forEach(e)}function _n(t,e){for(var o=t.length,i=o-1;0<=i;i--)e(t[i],i-o-1)}var Cn,Pe=((Cn=pe)&&(An.__proto__=Cn),((An.prototype=Object.create(Cn&&Cn.prototype)).constructor=An).prototype.reflow=function(i){var t=this.options,e=t.vertical,o=t.gap,r=t.spacing,n=this.children,s=n.length,a=e?m:v,t=s+o+r*(s-1),p=(e?i.height():i.width())/t,h=i[a+1]+o/2*p;this.forEach(n,function(t,e){var o=(t.box||i).clone();o[a+1]=h,o[a+2]=h+p,t.reflow(o),e<s-1&&(h+=p*r),h+=p})},An);function An(t){Cn.call(this,t),this.forEach=t.rtl?_n:bn}At(Pe,{vertical:!1,gap:0,spacing:0});var Sn,kn=Pe,Ue=((Sn=pe)&&(Pn.__proto__=Sn),((Pn.prototype=Object.create(Sn&&Sn.prototype)).constructor=Pn).prototype.reflow=function(t){for(var e=this.options.vertical?v:m,o=this.children,i=o.length,r=this.box=new Wt,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))}},Pn);function Pn(){Sn.apply(this,arguments)}At(Ue,{vertical:!0});var Mn,Tn=Ue,Ne=((Mn=Rr)&&(Bn.__proto__=Mn),((Bn.prototype=Object.create(Mn&&Mn.prototype)).constructor=Bn).prototype.render=function(){Mn.prototype.render.call(this),this.updateStackRange()},Bn.prototype.pointType=function(){return wn},Bn.prototype.clusterType=function(){return kn},Bn.prototype.stackType=function(){return Tn},Bn.prototype.stackLimits=function(t,e){return Mn.prototype.stackLimits.call(this,t,e)},Bn.prototype.createPoint=function(t,e){var o=e.categoryIx,i=e.category,r=e.series,n=e.seriesIx,s=this.options,a=this.children,p=s.isStacked,h=this.pointValue(t),l=this.pointOptions(r,n),e=l.labels;p&&"outsideEnd"===e.position&&(e.position="insideEnd"),l.isStacked=p;t=t.fields.color||r.color;h<0&&l.negativeColor&&(t=l.negativeColor),l=this.evalPointOptions(l,h,i,o,r,n),I(r.color)&&(t=l.color);l=new(this.pointType())(h,l);l.color=t;o=a[o];return o||(o=new(this.clusterType())({vertical:s.invertAxes,gap:s.gap,spacing:s.spacing,rtl:!s.invertAxes&&(this.chartService||{}).rtl}),this.append(o)),(p?this.getStackWrap(r,o):o).append(l),l},Bn.prototype.getStackWrap=function(t,e){var o,t=t.stack,i=t&&t.group||t,r=e.children;if(typeof i===g){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},Bn.prototype.categorySlot=function(t,e,o){var i=this.options,t=t.getSlot(e),e=o.startValue();return i.isStacked&&(e=o.getSlot(e,e,!0),t[(i=i.invertAxes?v:m)+1]=t[i+2]=e[i+1]),t},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.createAnimation=function(){this._setAnimationOptions(),Mn.prototype.createAnimation.call(this),Yr(this.options.series)&&this._setChildrenAnimation()},Bn.prototype._setChildrenAnimation=function(){for(var t=this.points,e=0;e<t.length;e++){var o=t[e],i=o.visual;i&<(i.options.zIndex)&&(o.options.animation=this.options.animation,o.createAnimation())}},Bn.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 P.geometry.Point(t.x1,t.y1),o.vertical=!e.invertAxes},Bn);function Bn(){Mn.apply(this,arguments)}At(Ne,{animation:{type:hr}});var Rn,On=Ne,Qe=((Rn=pe)&&(In.__proto__=Rn),((In.prototype=Object.create(Rn&&Rn.prototype)).constructor=In).prototype.reflow=function(t){var e=this.options,o=this.value,i=this.owner.seriesValueAxis(e),e=i.getSlot(o.open,o.close),i=i.getSlot(o.low,o.high);e.x1=i.x1=t.x1,e.x2=i.x2=t.x2,this.realBody=e;o=i.center().x,t=[];t.push([[o,i.y1],[o,e.y1]]),t.push([[o,e.y2],[o,i.y2]]),this.lines=t,this.box=i.clone().wrap(e),this._rendered||(this._rendered=!0,this.createNote()),this.reflowNote()},In.prototype.reflowNote=function(){this.note&&this.note.reflow(this.box)},In.prototype.createVisual=function(){Rn.prototype.createVisual.call(this),this._mainVisual=this.mainVisual(this.options),this.visual.append(this._mainVisual),this.createOverlay()},In.prototype.mainVisual=function(t){var e=new P.drawing.Group;return this.createBody(e,t),this.createLines(e,t),e},In.prototype.createBody=function(t,e){var o=P.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:_t(e.border.opacity,e.opacity)}),M(o),t.append(o),vn(e)&&t.append(this.createGradientOverlay(o,{baseColor:this.color},j({end:e.vertical?void 0:[0,1]},e.overlay)))},In.prototype.createLines=function(t,e){this.drawLines(t,e,this.lines,e.line)},In.prototype.drawLines=function(t,e,o,i){if(o)for(var r={stroke:{color:i.color||this.color,opacity:_t(i.opacity,e.opacity),width:i.width,dashType:i.dashType,lineCap:"butt"}},n=0;n<o.length;n++){var s=P.drawing.Path.fromPoints(o[n],r);M(s),t.append(s)}},In.prototype.getBorderColor=function(){var t=this.options.border,e=t.color;return e=!lt(e)?new P.Color(this.color).brightness(t._brightness).toHex():e},In.prototype.createOverlay=function(){var t=P.drawing.Path.fromRect(this.box.toRect(),{fill:{color:a,opacity:0},stroke:null});this.visual.append(t)},In.prototype.createHighlight=function(){var t=this.options.highlight,e=this.color;this.color=t.color||this.color;t=this.mainVisual(j({},this.options,{line:{color:this.getBorderColor()}},t));return this.color=e,t},In.prototype.highlightVisual=function(){return this._mainVisual},In.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this._mainVisual}},In.prototype.tooltipAnchor=function(){var t=this.box,e=this.owner.pane.clipBox()||t;return{point:new Ht(t.x2+5,Math.max(t.y1,e.y1)+5),align:{horizontal:A,vertical:k}}},In.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},In.prototype.overlapsBox=function(t){return this.box.overlaps(t)},In);function In(t,e){Rn.call(this,e),this.value=t}At(Qe,{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:{}}}),j(Qe.prototype,Or),j(Qe.prototype,oo);var Ln=Qe;function Vn(t){return Yi(t)===t.length}var jn,Je=((jn=Rr)&&(Dn.__proto__=jn),((Dn.prototype=Object.create(jn&&jn.prototype)).constructor=Dn).prototype.reflowCategories=function(t){for(var e=this.children,o=e.length,i=0;i<o;i++)e[i].reflow(t[i])},Dn.prototype.addValue=function(t,e){var o,i=e.categoryIx,r=e.category,n=e.series,s=e.seriesIx,a=this.children,p=this.options,h=t.valueFields,l=Vn(this.splitValue(h)),c=n.data[i],u=this.categoryPoints[i];u||(this.categoryPoints[i]=u=[]),l&&(o=this.createPoint(t,e));a=a[i];a||(a=new kn({vertical:p.invertAxes,gap:p.gap,spacing:p.spacing,rtl:!p.invertAxes&&(this.chartService||{}).rtl}),this.append(a)),o&&(this.updateRange(h,e),a.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)},Dn.prototype.pointType=function(){return Ln},Dn.prototype.createPoint=function(t,e){var o=e.categoryIx,i=e.category,r=e.series,n=e.seriesIx,s=this.pointType(),a=t.valueFields,p=j({},r),e=t.fields.color||r.color,p=this.evalPointOptions(p,a,i,o,r,n);"candlestick"===r.type&&a.open>a.close&&(e=t.fields.downColor||r.downColor||r.color),I(r.color)&&(e=p.color),p.vertical=!this.options.invertAxes;p=new s(a,p);return p.color=e,p},Dn.prototype.splitValue=function(t){return[t.low,t.open,t.close,t.high]},Dn.prototype.updateRange=function(t,e){var o=e.series.axis,e=this.splitValue(t),t=this.valueAxisRanges[o],t=this.valueAxisRanges[o]=t||{min:l,max:c};this.valueAxisRanges[o]={min:Math.min.apply(Math,e.concat([t.min])),max:Math.max.apply(Math,e.concat([t.max]))}},Dn.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)},Dn.prototype.animationPoints=function(){return this.points},Dn);function Dn(){jn.apply(this,arguments)}j(Je.prototype,he);var zn,En=Je,lo=((zn=Ln)&&(Un.__proto__=zn),((Un.prototype=Object.create(zn&&zn.prototype)).constructor=Un).prototype.reflow=function(t){var e,o,i=this.options,r=this.value,n=this.owner.seriesValueAxis(i);this.boxSlot=o=n.getSlot(r.q1,r.q3),this.realBody=o,this.reflowBoxSlot(t),this.whiskerSlot=e=n.getSlot(r.lower,r.upper),this.reflowWhiskerSlot(t);i=n.getSlot(r.median);r.mean&&(r=n.getSlot(r.mean),this.meanPoints=this.calcMeanPoints(t,r)),this.whiskerPoints=this.calcWhiskerPoints(o,e),this.medianPoints=this.calcMedianPoints(t,i),this.box=e.clone().wrap(o),this.reflowNote()},Un.prototype.reflowBoxSlot=function(t){this.boxSlot.x1=t.x1,this.boxSlot.x2=t.x2},Un.prototype.reflowWhiskerSlot=function(t){this.whiskerSlot.x1=t.x1,this.whiskerSlot.x2=t.x2},Un.prototype.calcMeanPoints=function(t,e){return[[[t.x1,e.y1],[t.x2,e.y1]]]},Un.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]]]},Un.prototype.calcMedianPoints=function(t,e){return[[[t.x1,e.y1],[t.x2,e.y1]]]},Un.prototype.renderOutliers=function(t){for(var e=this.value,o=e.outliers||[],i=3*Math.abs(e.q3-e.q1),r=[],n=(t.markers,0);n<o.length;n++){var s=o[n],a=j({},(p=s<e.q3+i&&s>e.q1-i?t.outliers:t.extremes).border);lt(a.color)||(lt(this.color)?a.color=this.color:a.color=new P.Color(p.background).brightness(.8).toHex());var p=new fe({type:p.type,width:p.size,height:p.size,rotation:p.rotation,background:p.background,border:a,opacity:p.opacity});p.value=s,r.push(p)}return this.reflowOutliers(r),r},Un.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)}},Un.prototype.mainVisual=function(t){for(var e=zn.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},Un.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)},Un.prototype.getBorderColor=function(){return(this.options.border||{}).color?this.options.border.color:this.color||zn.prototype.getBorderColor.call(this)},Un);function Un(t,e){zn.call(this,t,e),this.createNote()}At(lo,{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:u,background:a,border:{width:2,opacity:1},opacity:0}}),j(lo.prototype,Or);var Hn,Fn,Gn,Nn=lo,Wn=((Gn=Nn)&&(Zn.__proto__=Gn),((Zn.prototype=Object.create(Gn&&Gn.prototype)).constructor=Zn).prototype.reflowBoxSlot=function(t){this.boxSlot.y1=t.y1,this.boxSlot.y2=t.y2},Zn.prototype.reflowWhiskerSlot=function(t){this.whiskerSlot.y1=t.y1,this.whiskerSlot.y2=t.y2},Zn.prototype.calcMeanPoints=function(t,e){return[[[e.x1,t.y1],[e.x1,t.y2]]]},Zn.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]]]},Zn.prototype.calcMedianPoints=function(t,e){return[[[e.x1,t.y1],[e.x1,t.y2]]]},Zn),Xn=((Fn=En)&&(Qn.__proto__=Fn),((Qn.prototype=Object.create(Fn&&Fn.prototype)).constructor=Qn).prototype.addValue=function(t,e){var o,i=e.categoryIx,r=e.category,n=e.series,s=e.seriesIx,a=this.children,p=this.options,h=t.valueFields,l=Vn(this.splitValue(h)),c=n.data[i],u=this.categoryPoints[i];u||(this.categoryPoints[i]=u=[]),l&&(o=this.createPoint(t,e));a=a[i];a||(a=new kn({vertical:p.invertAxes,gap:p.gap,spacing:p.spacing,rtl:!p.invertAxes&&(this.chartService||{}).rtl}),this.append(a)),o&&(this.updateRange(h,e),a.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)},Qn.prototype.pointType=function(){return this.options.invertAxes?Wn:Nn},Qn.prototype.splitValue=function(t){return[t.lower,t.q1,t.median,t.q3,t.upper]},Qn.prototype.updateRange=function(t,e){var o=e.series.axis,i=this.valueAxisRanges[o],e=this.splitValue(t).concat(this.filterOutliers(t.outliers));lt(t.mean)&&(e=e.concat(t.mean)),i=this.valueAxisRanges[o]=i||{min:l,max:c},this.valueAxisRanges[o]={min:Math.min.apply(Math,e.concat([i.min])),max:Math.max.apply(Math,e.concat([i.max]))}},Qn.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)},Qn.prototype.filterOutliers=function(t){for(var e=(t||[]).length,o=[],i=0;i<e;i++){var r=t[i];lt(r)&&null!==r&&o.push(r)}return o},Qn.prototype.supportsPointInactiveOpacity=function(){return!1},Qn),qn=((Hn=Cr)&&(Yn.__proto__=Hn),((Yn.prototype=Object.create(Hn&&Hn.prototype)).constructor=Yn).prototype.getAxis=function(){var t=this.chart.seriesAxes(this.series);return this.isVertical?t.y:t.x},Yn);function Yn(){Hn.apply(this,arguments)}function Qn(){Fn.apply(this,arguments)}function Zn(){Gn.apply(this,arguments)}function Kn(t){return lt(t)&&null!==t}var $n,at=(($n=pe)&&(Jn.__proto__=$n),((Jn.prototype=Object.create($n&&$n.prototype)).constructor=Jn).prototype._initFields=function(){this.xAxisRanges={},this.yAxisRanges={},this.points=[],this.seriesPoints=[],this.seriesOptions=[],this._evalSeries=[]},Jn.prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},Jn.prototype.addErrorBar=function(t,e,o){var i,r=t.value[e],n=e+"Value",s=o.seriesIx,a=o.series,p=t.options.errorBars,h=o[e+"ErrorLow"],o=o[e+"ErrorHigh"];B(r)&&(B(h)&&B(o)&&(i={low:h,high:o}),p&<(p[n])&&(this.seriesErrorRanges=this.seriesErrorRanges||{x:[],y:[]},this.seriesErrorRanges[e][s]=this.seriesErrorRanges[e][s]||new nr(p[n],a,e),i=this.seriesErrorRanges[e][s].getErrorRange(r,p[n])),i&&this.addPointErrorBar(i,t,e))},Jn.prototype.addPointErrorBar=function(t,e,o){var i=t.low,r=t.high,n=e.series,s=e.options.errorBars,a=o===m,t={};e[o+"Low"]=i,e[o+"High"]=r,e.errorBars=e.errorBars||[];s=new qn(i,r,a,this,n,s);e.errorBars.push(s),e.append(s),t[o]=i,this.updateRange(t,n),t[o]=r,this.updateRange(t,n)},Jn.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=t;(t=!Kn(i)||!Kn(r)?this.createMissingValue(t,s):t)&&((o=this.createPoint(t,e))&&(Object.assign(o,e),this.addErrorBar(o,v,e),this.addErrorBar(o,m,e)),this.updateRange(t,e.series)),this.points.push(o),n.push(o)},Jn.prototype.seriesMissingValues=function(t){return t.missingValues},Jn.prototype.createMissingValue=function(){},Jn.prototype.updateRange=function(t,e){var o=this.chartService.intl,i=e.xAxis,r=e.yAxis,n=t.x,s=t.y,e=this.xAxisRanges[i],t=this.yAxisRanges[r];Kn(n)&&(e=this.xAxisRanges[i]=e||{min:l,max:c},R(n)&&(n=No(o,n)),e.min=Math.min(e.min,n),e.max=Math.max(e.max,n)),Kn(s)&&(t=this.yAxisRanges[r]=t||{min:l,max:c},R(s)&&(s=No(o,s)),t.min=Math.min(t.min,s),t.max=Math.max(t.max,s))},Jn.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];lt(s)||(this._evalSeries[r]=s=kr(t,{},n,!0));r=t;return s&&kr(r=j({},t),{value:e,series:i,dataItem:o.dataItem},n),r},Jn.prototype.pointType=function(){return Vr},Jn.prototype.pointOptions=function(t,e){var o,i=this.seriesOptions[e];return i||(o=this.pointType().prototype.defaults,this.seriesOptions[e]=i=j({},o,{markers:{opacity:t.opacity},tooltip:{format:this.options.tooltip.format},labels:{format:this.options.labels.format}},t)),i},Jn.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);I(o.color)&&(r=i.color);i=new Vr(t,i);return i.color=r,this.append(i),i},Jn.prototype.seriesAxes=function(t){var e=t.xAxis,o=t.yAxis,i=this.plotArea,t=e?i.namedXAxes[e]:i.axisX,i=o?i.namedYAxes[o]:i.axisY;if(!t)throw new Error("Unable to locate X axis with name "+e);if(!i)throw new Error("Unable to locate Y axis with name "+o);return{x:t,y:i}},Jn.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++],i=r.seriesAxes(e.series),e=i.x.getSlot(t.x,t.x,s),t=i.y.getSlot(t.y,t.y,s);o&&(e&&t?(t=r.pointSlot(e,t),o.reflow(t)):o.visible=!1)}),this.box=t},Jn.prototype.pointSlot=function(t,e){return new Wt(t.x1,e.y1,t.x2,e.y2)},Jn.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,j({pointIx:n,series:r,seriesIx:i,dataItem:r.data[n],owner:this},s))}}},Jn.prototype.formatPointValue=function(t,e){t=t.value;return this.chartService.format.auto(e,t.x,t.y)},Jn.prototype.animationPoints=function(){for(var t=this.points,e=[],o=0;o<t.length;o++)e.push((t[o]||{}).marker);return e},Jn);function Jn(t,e){$n.call(this,e),this.plotArea=t,this.chartService=t.chartService,this._initFields(),this.render()}At(at,{series:[],tooltip:{format:"{0}, {1}"},labels:{format:"{0}, {1}"},clip:!0}),j(at.prototype,he,{_bindPoint:Rr.prototype._bindPoint});var ts,es=at,Jt=((ts=Vr)&&(os.__proto__=ts),((os.prototype=Object.create(ts&&ts.prototype)).constructor=os).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 P.drawing.Group,s=new P.drawing.Circle(new P.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}]})}),t=new P.drawing.Circle(new P.geometry.Circle([i.x,i.y],r),{stroke:{color:e.color||new P.Color(o.background).brightness(.8).toHex(),width:e.width,opacity:e.opacity},fill:{color:o.background,opacity:t.opacity}});return n.append(s,t),n},os);function os(t,e){ts.call(this,t,e),this.category=t.category}Jt.prototype.defaults=j({},Jt.prototype.defaults,{labels:{position:C},highlight:{opacity:1,border:{color:"#fff",width:2,opacity:1}}}),Jt.prototype.defaults.highlight.zIndex=void 0;var is,rs=Jt,ne=((is=es)&&(ns.__proto__=is),((ns.prototype=Object.create(is&&is.prototype)).constructor=ns).prototype._initFields=function(){this._maxSize=c,is.prototype._initFields.call(this)},ns.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)),is.prototype.addValue.call(this,t,e)):(this.points.push(null),this.seriesPoints[e.seriesIx].push(null))},ns.prototype.reflow=function(t){this.updateBubblesSize(t),is.prototype.reflow.call(this,t)},ns.prototype.pointType=function(){return rs},ns.prototype.createPoint=function(t,e){var o=e.series,i=o.data.length,r=e.pointIx*(600/i),n={delay:r,duration:600-r,type:"bubble"},i=e.color||o.color;t.size<0&&o.negativeValues.visible&&(i=_t(o.negativeValues.color,i));n=j({labels:{animation:{delay:r,duration:600-r}}},this.pointOptions(o,e.seriesIx),{markers:{type:u,border:o.border,opacity:o.opacity,animation:n}}),n=this.evalPointOptions(n,t,e);I(o.color)&&(i=n.color),n.markers.background=i;n=new rs(t,n);return n.color=i,this.append(n),n},ns.prototype.updateBubblesSize=function(t){for(var e=this.options.series,o=Math.min(t.width(),t.height()),i=0;i<e.length;i++)for(var r=e[i],n=this.seriesPoints[i],s=(r.minSize||Math.max(.02*o,10))/2,a=(r.maxSize||.2*o)/2,p=Math.PI*s*s,h=(Math.PI*a*a-p)/this._maxSize,l=0;l<n.length;l++){var c,u,d=n[l];d&&(u=Math.abs(d.value.size)*h,c=Math.sqrt((p+u)/Math.PI),u=_t(d.options.zIndex,0)+(1-c/a),j(d.options,{zIndex:u,markers:{size:2*c,zIndex:u},labels:{zIndex:u+1}}))}},ns.prototype.formatPointValue=function(t,e){var o=t.value;return this.chartService.format.auto(e,o.x,o.y,o.size,t.category)},ns.prototype.createAnimation=function(){},ns.prototype.createVisual=function(){},ns);function ns(){is.apply(this,arguments)}At(ne,{tooltip:{format:"{3}"},labels:{format:"{3}"}});var ss,as=ne,me=((ss=fe)&&(ps.__proto__=ss),(ps.prototype=Object.create(ss&&ss.prototype)).constructor=ps);function ps(){ss.apply(this,arguments)}j(me.prototype,Or);var hs,ls=me,de=((hs=pe)&&(cs.__proto__=hs),((cs.prototype=Object.create(hs&&hs.prototype)).constructor=cs).prototype.render=function(){var t=this.options;this._rendered||(this._rendered=!0,lt(this.value.target)&&(this.target=new ls({type:t.target.shape,background:t.target.color||this.color,opacity:t.opacity,zIndex:t.zIndex,border:t.target.border,vAlign:k,align:S}),this.target.value=this.value,this.target.dataItem=this.dataItem,this.target.series=this.series,this.append(this.target)),this.createNote())},cs.prototype.reflow=function(t){this.render();var e=this.options,o=this.target,i=this.owner,r=e.invertAxes,n=i.seriesValueAxis(this.options),s=i.categorySlot(i.categoryAxis,e.categoryIx,n),i=n.getSlot(this.value.target),n=r?i:s,i=r?s:i;o&&(i=new Wt(n.x1,i.y1,n.x2,i.y2),o.options.height=r?i.height():e.target.line.width,o.options.width=r?e.target.line.width:i.width(),o.reflow(i)),this.note&&this.note.reflow(t),this.box=t},cs.prototype.createVisual=function(){hs.prototype.createVisual.call(this);var t=this.options,e=P.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:_t(t.border.opacity,t.opacity)}),M(this.bodyVisual=e),this.visual.append(e)},cs.prototype.createAnimation=function(){this.bodyVisual&&(this.animation=P.drawing.Animation.create(this.bodyVisual,this.options.animation))},cs.prototype.createHighlight=function(t){return P.drawing.Path.fromRect(this.box.toRect(),t)},cs.prototype.highlightVisual=function(){return this.bodyVisual},cs.prototype.highlightVisualArgs=function(){return{rect:this.box.toRect(),visual:this.bodyVisual,options:this.options}},cs.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},cs);function cs(t,e){hs.call(this,e),this.aboveAxis=this.options.aboveAxis,this.color=e.color||a,this.value=t}de.prototype.tooltipAnchor=wn.prototype.tooltipAnchor,At(de,{border:{width:1},vertical:!1,opacity:1,target:{shape:"",border:{width:0,color:"green"},line:{width:2}},tooltip:{format:"Current: {0}<br />Target: {1}"}}),j(de.prototype,Or),j(de.prototype,oo);var us,ds=de,_e=((us=Rr)&&(gs.__proto__=us),((gs.prototype=Object.create(us&&us.prototype)).constructor=gs).prototype.reflowCategories=function(t){for(var e=this.children,o=e.length,i=0;i<o;i++)e[i].reflow(t[i])},gs.prototype.plotRange=function(t){var e=t.series,e=this.seriesValueAxis(e),e=this.categoryAxisCrossingValue(e);return[e,t.value.current||e]},gs.prototype.createPoint=function(t,e){var o=e.categoryIx,i=e.category,r=e.series,n=e.seriesIx,s=this.options,a=this.children,p=t.valueFields,e=j({vertical:!s.invertAxes,overlay:r.overlay,categoryIx:o,invertAxes:s.invertAxes},r),t=t.fields.color||r.color,e=this.evalPointOptions(e,p,i,o,r,n);I(r.color)&&(t=e.color);e=new ds(p,e);e.color=t;o=a[o];return o||(o=new kn({vertical:s.invertAxes,gap:s.gap,spacing:s.spacing,rtl:!s.invertAxes&&(this.chartService||{}).rtl}),this.append(o)),o.append(e),e},gs.prototype.updateRange=function(t,e){var o=t.current,i=t.target,t=e.series.axis,e=this.valueAxisRanges[t];lt(o)&&!isNaN(o)&<(i&&!isNaN(i))&&((e=this.valueAxisRanges[t]=e||{min:l,max:c}).min=Math.min(e.min,o,i),e.max=Math.max(e.max,o,i))},gs.prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value.current,t.value.target)},gs.prototype.pointValue=function(t){return t.valueFields.current},gs.prototype.aboveAxis=function(t){return 0<t.value.current},gs.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()}},gs);function gs(t,r){!function(){for(var t=r.series,e=0;e<t.length;e++){var o=t[e],i=o.data;!i||x(i[0])||D(i[0])||(o.data=[i])}}(),us.call(this,t,r)}_e.prototype._setAnimationOptions=On.prototype._setAnimationOptions,At(_e,{animation:{type:hr}});var fs,ys=_e,Ve=((fs=P.Class)&&(vs.__proto__=fs),((vs.prototype=Object.create(fs&&fs.prototype)).constructor=vs).prototype.getStyle=function(t,e){var o=t.background,i=t.border.color;e&&(r=e.color||e.options.color,o=_t(o,r),i=_t(i,r));var r=H(t.padding||{},"auto");return{backgroundColor:o,borderColor:i,font:t.font,color:t.color,opacity:t.opacity,borderWidth:z(t.border.width),paddingTop:z(r.top),paddingBottom:z(r.bottom),paddingLeft:z(r.left),paddingRight:z(r.right)}},vs.prototype.show=function(t,e,o){t.format=e.format;o=this.getStyle(e,o);t.style=o;o=new P.Color(o.backgroundColor);lt(e.color)||o.isDark()||(t.className="k-chart-tooltip-inverse"),this.chartService.notify("showTooltip",t),this.visible=!0},vs.prototype.hide=function(){this.chartService&&this.chartService.notify("hideTooltip"),this.visible=!1},vs.prototype.destroy=function(){delete this.chartService},vs);function vs(t,e){fs.call(this),this.chartService=t,this.options=j({},this.options,e)}At(Ve,{border:{width:1},opacity:1});var ms,Pe=Ve,Ue=((ms=Pe)&&(xs.__proto__=ms),((xs.prototype=Object.create(ms&&ms.prototype)).constructor=xs).prototype.initAxisName=function(){var t=this.crosshair.axis,t=t.plotArea.categoryAxis?t.getCategory?"categoryAxis":"valueAxis":t.options.vertical?"yAxis":"xAxis";this.axisName=t},xs.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)},xs.prototype.hide=function(){this.chartService.notify("hideTooltip",{crosshair:this.crosshair,axisName:this.axisName,axisIndex:this.crosshair.axis.axisIndex})},xs.prototype.getAnchor=function(){var t,e,o=this.crosshair,i=this.options,r=i.position,n=i.padding,i=!o.axis.options.vertical,o=o.line.bbox(),n=i?(t=C,r===_?(e=k,o.bottomLeft().translate(0,n)):(e=_,o.topLeft().translate(0,-n))):(e=C,r===A?(t=S,o.topLeft().translate(-n,0)):(t=A,o.topRight().translate(n,0)));return{point:n,align:{horizontal:t,vertical:e}}},xs);function xs(t,e,o){ms.call(this,t,o),this.crosshair=e,this.formatService=t.format,this.initAxisName()}At(Ue,{padding:10});var ws,bs=Ue,Ne=((ws=pe)&&(_s.__proto__=ws),((_s.prototype=Object.create(ws&&ws.prototype)).constructor=_s).prototype.showAt=function(t){this.point=t,this.moveLine(),this.line.visible(!0),this.tooltip&&this.tooltip.showAt(t)},_s.prototype.hide=function(){this.line.visible(!1),this.tooltip&&this.tooltip.hide()},_s.prototype.moveLine=function(){var t=this.axis,e=this.point,o=t.options.vertical,i=this.getBox(),r=o?m:v,n=new P.geometry.Point(i.x1,i.y1),o=o?new P.geometry.Point(i.x2,i.y1):new P.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)},_s.prototype.getBox=function(){for(var t,e=this.axis,o=e.pane.axes,i=o.length,r=e.options.vertical,n=e.lineBox().clone(),e=r?v:m,s=0;s<i;s++){var a=o[s];a.options.vertical!==r&&(t?t.wrap(a.lineBox()):t=a.lineBox().clone())}return n[e+1]=t[e+1],n[e+2]=t[e+2],n},_s.prototype.createVisual=function(){ws.prototype.createVisual.call(this);var t=this.options;this.line=new P.drawing.Path({stroke:{color:t.color,width:t.width,opacity:t.opacity,dashType:t.dashType},visible:!1}),this.moveLine(),this.visual.append(this.line)},_s.prototype.destroy=function(){this.tooltip&&this.tooltip.destroy(),ws.prototype.destroy.call(this)},_s);function _s(t,e,o){ws.call(this,o),this.axis=e,this.stickyMode=e instanceof Qo;e=this.options.tooltip;e.visible&&(this.tooltip=new bs(t,this,j({},e,{stickyMode:this.stickyMode})))}At(Ne,{color:r,width:2,zIndex:-1,tooltip:{visible:!1}});var Cs,As=Ne,Qe=((Cs=pe)&&(Ss.__proto__=Cs),((Ss.prototype=Object.create(Cs&&Cs.prototype)).constructor=Ss).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},Ss.prototype._clipBox=function(){return this.pane.chartsBox()},Ss.prototype.createVisual=function(){var t;this.visual=new P.drawing.Group({zIndex:0}),this.shouldClip()&&(t=(this.clipBox=this._clipBox()).toRect(),M(t=P.drawing.Path.fromRect(t)),this.visual.clip(t),this.unclipLabels())},Ss.prototype.stackRoot=function(){return this},Ss.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)))}},Ss.prototype.destroy=function(){Cs.prototype.destroy.call(this),delete this.parent},Ss);function Ss(t,e){Cs.call(this,t),this.pane=e}Qe.prototype.isStackRoot=!0;var ks,Ps=Qe,Je=((ks=ue)&&(Ts.__proto__=ks),((Ts.prototype=Object.create(ks&&ks.prototype)).constructor=Ts).prototype.createTitle=function(){var t=this.options.title;D(t)&&(t=j({},t,{align:t.position,position:k})),this.title=Ee.buildTitle(t,this,Ts.prototype.options.title)},Ts.prototype.appendAxis=function(t){this.content.append(t),this.axes.push(t),t.pane=this},Ts.prototype.appendAxisAt=function(t,e){this.content.append(t),this.axes.splice(e,0,t),t.pane=this},Ts.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},Ts.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=[]},Ts.prototype.reflow=function(t){var e;yt(this.children)===this.content&&(e=this.children.pop()),ks.prototype.reflow.call(this,t),e&&this.children.push(e),this.title&&(this.contentBox.y1+=this.title.box.height())},Ts.prototype.visualStyle=function(){var t=ks.prototype.visualStyle.call(this);return t.zIndex=-10,t},Ts.prototype.renderComplete=function(){this.options.visible&&this.createGridLines()},Ts.prototype.stackRoot=function(){return this},Ts.prototype.clipRoot=function(){return this},Ts.prototype.createGridLines=function(){for(var t,e=this.axes,o=e.concat(this.parent.axes),i=[],r=[],n=0;n<e.length;n++)for(var s=e[n],a=s.options.vertical,p=a?i:r,h=0;h<o.length;h++)0!==p.length||a!==(t=o[h]).options.vertical&&pt(p,s.createGridLines(t))},Ts.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()},Ts.prototype.chartsBox=function(){for(var t=this.axes,e=t.length,o=new Wt,i=0;i<e;i++){var r=t[i],n=r.options.vertical?m:v,r=r.lineBox();o[n+1]=r[n+1],o[n+2]=r[n+2]}if(0===o.x2)for(var s=this.parent.axes,a=s.length,p=0;p<a;p++){var h=s[p];h.options.vertical||(h=h.lineBox(),o.x1=h.x1,o.x2=h.x2)}return o},Ts.prototype.clipBox=function(){return this.chartContainer.clipBox},Ts.prototype.notifyRender=function(){var t=this.getService();t&&t.notify("paneRender",{pane:new Wi(this),index:this.paneIndex,name:this.options.name})},Ts),Ms=1;function Ts(t){ks.call(this,t),this.id="pane"+Ms++,this.createTitle(),this.content=new pe,this.chartContainer=new Ps({},this),this.append(this.content),this.axes=[],this.charts=[]}Je.prototype.isStackRoot=!0,At(Je,{zIndex:-1,shrinkToFit:!0,title:{align:A},visible:!0});var Bs=Je;function Rs(t,e){null!==e&&t.push(e)}function Os(t,e,o){e=e.visible;if(lt(e))return e;t=t.pointVisibility;return t?t[o]:void 0}function Is(t){for(var e=t.data,o=[],i=0,r=0,n=0;n<e.length;n++){var s=or.current.bindPoint(t,n),a=s.valueFields.value;B(a=R(a)?parseFloat(a):a)?(s.visible=!1!==Os(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 Ls(t,e){return t&&e?t.toLowerCase()===e.toLowerCase():t===e}function Vs(t,e){for(var o=[],i=[].concat(e),r=0;r<t.length;r++){var n=t[r];J(n.type,i)&&o.push(n)}return o}function js(t,e,o){if(null===e)return e;var i="_date_"+t,r=e[i];return r||(r=No(o,Y(t)(e)),e[i]=r),r}function Ds(t,e){t=t.type,e=e instanceof Date;return!t&&e||Ls(t,y)}function zs(t){return 1===t.length?t[0]:t}var Es=/area/i;function Us(t,e){var o,i=or.current.bindPoint(t,null,e).valueFields;for(o in i)if(O(i[o]))return!0}function Hs(t){for(var e,o,i=t.start,r=t.dir,n=t.min,s=t.max,a=t.getter,p=t.hasItem,h=t.series,l=i;p(l+=r)&&(e=Us(h,(o=a(l)).item)),n<=l&&l<=s&&!e;);if(e)return o}function Fs(t,e,o,i,r){var n,s,a,p=e.min,h=e.max,l=0<p&&p<o,c=h+1<o;(l||c)&&(((e=t).missingValues||(Es.test(e.type)||e.stack?ar:pr))!==pr?(l&&(n=i(p-1)),c&&(s=i(h+1))):(l&&(n=Us(t,(a=i(p-1)).item)?a:Hs({start:p,dir:-1,min:0,max:o-1,getter:i,hasItem:r,series:t})),c&&(s=Us(t,(a=i(h+1)).item)?a:Hs({start:h,dir:1,min:0,max:o-1,getter:i,hasItem:r,series:t}))),n&&(t._outOfRangeMinPoint=n),s&&(t._outOfRangeMaxPoint=s))}var Gs,lo=((Gs=pe)&&(Ns.__proto__=Gs),((Ns.prototype=Object.create(Gs&&Gs.prototype)).constructor=Ns).prototype.initFields=function(){},Ns.prototype.initSeries=function(){for(var t=this.series,e=0;e<t.length;e++)t[e].index=e},Ns.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=j({title:{color:t.color}},e),s=0;s<i;s++){var a=j({},n,o[s]);R(a.title)&&(a.title=j({text:a.title},n.title));a=new Bs(a);a.paneIndex=s,r.push(a),this.append(a)}this.panes=r},Ns.prototype.crosshairOptions=function(t){return t.options.crosshair},Ns.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&&(n=new As(this.chartService,r,n),this.crosshairs.push(n),o.content.append(n))}},Ns.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}},Ns.prototype.hideCrosshairs=function(){for(var t=this.crosshairs,e=0;e<t.length;e++)t[e].hide()},Ns.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]},Ns.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},Ns.prototype.appendAxis=function(t){this.findPane(t.options.pane).appendAxis(t),this.axes.push(t),t.plotArea=this},Ns.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},Ns.prototype.appendChart=function(t,e){this.charts.push(t),e?e.appendChart(t):this.append(t)},Ns.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},Ns.prototype.addToLegend=function(t){for(var e=t.length,o=this.options.legend,i=o.labels||{},r=o.inactiveItems||{},n=r.labels||{},s=[],a=0;a<e;a++){var p,h,l,c,u=t[a],d=!1!==u.visible;!1!==u.visibleInLegend&&(p=u.name,(l=!d&&W(n)||W(i))&&(p=l({text:Kn(p)?p:"",series:u})),c=u._defaults,I(h=u.color)&&c&&(h=c.color),c=l=void 0,c=d?(l={},h):(l={color:n.color,font:n.font},r.markers.color),Kn(p)&&""!==p&&s.push({text:p,labels:l,markerColor:c,series:u,active:d}))}pt(o.items,s)},Ns.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)}},Ns.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},Ns.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},Ns.prototype.reflow=function(t){var e=this.options.plotArea,o=this.panes,e=H(e.margin);this.box=t.clone().unpad(e),this.reflowPanes(),this.detachLabels(),this.reflowAxes(o),this.reflowCharts(o)},Ns.prototype.redraw=function(t){var e=[].concat(t);this.initSeries();t=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()},Ns.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},Ns.prototype.alignAxisTo=function(t,e,o,i){var r=t.getSlot(o,o,!0),n=t.options.reverse?2:1,o=e.getSlot(i,i,!0),i=e.options.reverse?2:1,n=t.box.translate(o[v+i]-r[v+n],o[m+i]-r[m+n]);t.pane!==e.pane&&n.translate(0,t.pane.box.y1-e.pane.box.y1),t.reflow(n)},Ns.prototype.alignAxes=function(t,e){for(var o=t[0],i=e[0],r=this.axisCrossingValues(o,e),n=this.axisCrossingValues(i,t),s={},a={},p={},h={},l=0;l<e.length;l++){var c=e[l],u=c.pane,d=u.id,g=!1!==c.options.visible,f=Xs(t,u)||o,u=r;f!==o&&(u=this.axisCrossingValues(f,e)),this.alignAxisTo(c,f,n[l],u[l]),c.options._overlap||(wt(c.lineBox().x1)===wt(f.lineBox().x1)&&(s[d]&&c.reflow(c.box.alignTo(s[d].box,A).translate(-c.options.margin,0)),g&&(s[d]=c)),wt(c.lineBox().x2)===wt(f.lineBox().x2)&&(c._mirrored||(c.options.labels.mirror=!c.options.labels.mirror,c._mirrored=!0),this.alignAxisTo(c,f,n[l],u[l]),a[d]&&c.reflow(c.box.alignTo(a[d].box,S).translate(c.options.margin,0)),g&&(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,w=!1!==v.options.visible,b=Xs(e,m)||i,m=n;b!==i&&(m=this.axisCrossingValues(b,t)),this.alignAxisTo(v,b,r[y],m[y]),v.options._overlap||(wt(v.lineBox().y1)===wt(b.lineBox().y1)&&(v._mirrored||(v.options.labels.mirror=!v.options.labels.mirror,v._mirrored=!0),this.alignAxisTo(v,b,r[y],m[y]),p[x]&&v.reflow(v.box.alignTo(p[x].box,k).translate(0,-v.options.margin)),w&&(p[x]=v)),wt(v.lineBox().y2,3)===wt(b.lineBox().y2,3)&&(h[x]&&v.reflow(v.box.alignTo(h[x].box,_).translate(0,v.options.margin)),w&&(h[x]=v)),0!==y&&(v.alignTo(o),v.reflow(v.box)))}},Ns.prototype.shrinkAxisWidth=function(t){for(var e=this.groupAxes(t).any,o=Ws(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))}},Ns.prototype.shrinkAxisHeight=function(t){for(var e,o=0;o<t.length;o++){var i=t[o],r=i.axes,n=Math.max(0,Ws(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},Ns.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,s=r.contentBox;if(0<n.length)for(var r=Ws(n),a=Math.max(s.y1-r.y1,s.y2-r.y2),o=Math.max(o,s.x1-r.x1),p=0;p<n.length;p++){var h=n[p];h.reflow(h.box.translate(0,a))}}for(var l=0;l<e.length;l++){var c=e[l];c.reflow(c.box.translate(o,0))}},Ns.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))},Ns.prototype.autoRotateAxisLabels=function(t){for(var e,o=this.panes,i=qs(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))}},Ns.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)},Ns.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&&!J(n,t)||e[r].reflow(i)}},Ns.prototype.reflowPanes=function(){for(var t=this.box,e=this.panes,o=e.length,i=t.height(),r=0,n=t.y1,s=0;s<o;s++){var a=e[s],p=a.options.height;a.options.width=t.width(),a.options.height?(p.indexOf&&p.indexOf("%")&&(p=parseInt(p,10)/100,a.options.height=p*t.height()),a.reflow(t.clone()),i-=a.options.height):r++}for(var h=0;h<o;h++){var l=e[h];l.options.height||(l.options.height=i/r)}for(var c=0;c<o;c++){var u=e[c],d=t.clone().move(t.x1,n);u.reflow(d),n+=u.options.height}},Ns.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},Ns.prototype.chartsBoxes=function(){for(var t=this.panes,e=[],o=0;o<t.length;o++)e.push(t[o].chartsBox());return e},Ns.prototype.addBackgroundPaths=function(t){for(var e=this.chartsBoxes(),o=0;o<e.length;o++)t.paths.push(P.drawing.Path.fromRect(e[o].toRect()))},Ns.prototype.backgroundContainsPoint=function(t){for(var e=this.chartsBoxes(),o=0;o<e.length;o++)if(e[o].containsPoint(t))return!0},Ns.prototype.createVisual=function(){Gs.prototype.createVisual.call(this);var t=this.options.plotArea,e=t.opacity,o=t.background,t=t.border;void 0===t&&(t={}),""!==o&&null!==o&&"none"!==o&&"transparent"!==o&<(o)||(o=a,e=0);t=this._bgVisual=new P.drawing.MultiPath({fill:{color:o,opacity:e},stroke:{color:t.width?t.color:"",width:t.width,dashType:t.dashType},zIndex:-1});this.addBackgroundPaths(t),this.appendVisual(t)},Ns.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&<(s.value)&&null!==s.value&&o.push(s)}}return o},Ns.prototype.pointsBySeriesIndex=function(e){return this.filterPoints(function(t){return t.series.index===e})},Ns.prototype.pointsBySeriesName=function(e){return this.filterPoints(function(t){return t.series.name===e})},Ns.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},Ns.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}},Ns.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}},Ns.prototype.detachLabels=function(){var t=this.groupAxes(this.panes),e=t.x,t=t.y;this.detachAxisGroupLabels(t,e),this.detachAxisGroupLabels(e,t)},Ns.prototype.detachAxisGroupLabels=function(t,e){for(var o=0,i=0;i<t.length;i++){var r=t[i],n=r.pane,s=Xs(e,n)||e[0],s=this.createLabelAxis(r,i+o,s);s&&(o++,r=n.axes.indexOf(r)+o,n.appendAxisAt(s,r))}},Ns.prototype.createLabelAxis=function(t,e,o){var i=t.options.labels,r=i.position,n=i.visible;if("end"!==r&&"start"!==r||!1===n)return null;i=this.groupAxes(this.panes),n=o.options.vertical?i.x:i.y,i=this.axisCrossingValues(o,n),n="end"===r,r=o.range(),n=n?r.max:r.min;if(vt(i[e],r.min,r.max)-n==0)return null;i.splice(e+1,0,n),o.options.axisCrossingValues=i;i=t.clone();return t.clear(),i.options.name=void 0,i.options.line.visible=!1,i.options.crosshair=void 0,i.options.notes=void 0,i.options.plotBands=void 0,i},Ns);function Ns(t,e,o){Gs.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 Ws(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))&&(r=n?r.contentBox():r.lineBox(),e?e.wrap(r):e=r.clone())}return e||new Wt}function Xs(t,e){for(var o=0;o<t.length;o++){var i=t[o];if(i&&i.pane===e)return i}}var qs=function(t){return t.reduce(function(t,e){return t.concat(e.axes)},[])};At(lo,{series:[],plotArea:{margin:{}},background:"",border:{color:r,width:0},paneDefaults:{title:{}},legend:{inactiveItems:{labels:{color:"#919191"},markers:{color:"#919191"}}}});var Ys=lo,Qs={hover:function(t,e){this._dispatchEvent(t,e,"plotAreaHover")},click:function(t,e){this._dispatchEvent(t,e,"plotAreaClick")}};var Zs,Ks,$s=((Ks=P.Class)&&(ta.__proto__=Ks),((ta.prototype=Object.create(Ks&&Ks.prototype)).constructor=ta).prototype.aggregatePoints=function(t,e){var o=this._series,i=this._seriesFields,r=this._bindPoints(t||[]),n=r.dataItems[0],s={};!n||B(n)||x(n)||((t=function(){}).prototype=n,s=new t);for(var a=0;a<i.length;a++){var p=i[a],h=this._bindField(r.values,p.canonicalName),h=p.transform(h,o,r.dataItems,e);if(!(null===h||!D(h)||lt(h.length)||h instanceof Date)){s=h;break}lt(h)&&function(t,e,o){var i=e,r=t;if(-1<t.indexOf(".")){for(var n=t.split(".");1<n.length;)r=n.shift(),lt(i[r])||(i[r]={}),i=i[r];r=n.shift()}i[r]=o}(p.name,s,h)}return s},ta.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}},ta.prototype._bindField=function(t,e){for(var o=[],i=t.length,r=0;r<i;r++){var n=t[r],s=n.valueFields,n=(lt(s[e])?s:n.fields)[e];o.push(n)}return o},ta),at=((Zs=P.Class)&&(Js.__proto__=Zs),((Js.prototype=Object.create(Zs&&Zs.prototype)).constructor=Js).prototype.register=function(t,e){for(var o=0;o<t.length;o++)this._defaults[t[o]]=e},Js.prototype.query=function(t){return this._defaults[t]},Js);function Js(){Zs.call(this),this._defaults={}}function ta(t,e,o){Ks.call(this);var i=e.canonicalFields(t),r=e.valueFields(t),n=e.sourceFields(t,i),s=this._seriesFields=[],o=o.query(t.type),a=t.aggregate||o;this._series=t,this._binder=e;for(var p=0;p<i.length;p++){var h=i[p],l=void 0;if(D(a))l=a[h];else{if(0!==p&&!J(h,r))break;l=a}l&&s.push({canonicalName:h,name:n[p],transform:I(l)?l:Zi[l]})}}at.current=new at;var ea,oa=at,Jt=((ea=wn)&&(ia.__proto__=ea),((ia.prototype=Object.create(ea&&ea.prototype)).constructor=ia).prototype.createLabel=function(){var t=this.options.labels,e=j({},t,t.from),t=j({},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))},ia.prototype._createLabel=function(t){var e=W(t),o=this.pointData(),e=e?e(o):this.formatValue(t.format);return new yn(e,j({vertical:this.options.vertical},t),o)},ia.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)},ia);function ia(){ea.apply(this,arguments)}Jt.prototype.defaults=j({},Jt.prototype.defaults,{labels:{format:"{0} - {1}"},tooltip:{format:"{1}"}});var ra,na=Jt,ne=((ra=On)&&(sa.__proto__=ra),((sa.prototype=Object.create(ra&&ra.prototype)).constructor=sa).prototype.pointType=function(){return na},sa.prototype.pointValue=function(t){return t.valueFields},sa.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)},sa.prototype.plotRange=function(t){return t?[t.value.from,t.value.to]:0},sa.prototype.updateRange=function(t,e){var o=e.series.axis,i=t.from,r=t.to,e=this.valueAxisRanges[o];null!==t&&B(i)&&B(r)&&((e=this.valueAxisRanges[o]=e||{min:l,max:c}).min=Math.min(e.min,i),e.max=Math.max(e.max,i),e.min=Math.min(e.min,r),e.max=Math.max(e.max,r))},sa.prototype.aboveAxis=function(t){t=t.value;return t.from<t.to},sa);function sa(){ra.apply(this,arguments)}ne.prototype.plotLimits=Rr.prototype.plotLimits;var aa,pa,ha=ne,la=((pa=Vr)&&(ua.__proto__=pa),((ua.prototype=Object.create(pa&&pa.prototype)).constructor=ua).prototype.aliasFor=function(){return this.parent},ua),me=((aa=pe)&&(ca.__proto__=aa),((ca.prototype=Object.create(aa&&aa.prototype)).constructor=ca).prototype.render=function(){var t,e,o,i;this._rendered||(this._rendered=!0,i=(o=this.options).markers,t=o.labels,e=this.value,o=this.fromPoint=new la(e,j({},this.options,{labels:t.from,markers:i.from})),i=this.toPoint=new la(e,j({},this.options,{labels:t.to,markers:i.to})),this.copyFields(o),this.copyFields(i),this.append(o),this.append(i))},ca.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())},ca.prototype.createHighlight=function(){var t=new P.drawing.Group;return t.append(this.fromPoint.createHighlight()),t.append(this.toPoint.createHighlight()),t},ca.prototype.highlightVisual=function(){return this.visual},ca.prototype.highlightVisualArgs=function(){return{options:this.options,from:this.fromPoint.highlightVisualArgs(),to:this.toPoint.highlightVisualArgs()}},ca.prototype.tooltipAnchor=function(){var t=this.owner.pane.clipBox();if(!t||t.overlaps(this.box)){var e,o,i=this.box,r=i.center(),t=A,r=this.options.vertical?(e=r.x,o=i.y1-5,_):(e=i.x2+5,o=r.y,C);return{point:new Ht(e,o),align:{horizontal:t,vertical:r}}}},ca.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},ca.prototype.overlapsBox=function(t){return this.box.overlaps(t)},ca.prototype.unclipElements=function(){this.fromPoint.unclipElements(),this.toPoint.unclipElements()},ca.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}"})))},ca.prototype.positionLabels=function(t,e){var o,i=this.options,r=i.labels,i=i.vertical;"auto"===r.position&&(t=i?e.y1<=t.y1?(o="above","below"):(o="below","above"):e.x1<=t.x1?(o=A,S):(o=S,A),r.from&&r.from.position||(this.fromPoint.options.labels.position=t),r.to&&r.to.position||(this.toPoint.options.labels.position=o))},ca.prototype.copyFields=function(t){t.dataItem=this.dataItem,t.category=this.category,t.series=this.series,t.color=this.color,t.owner=this.owner},ca);function ca(t,e){aa.call(this),this.value=t,this.options=e,this.aboveAxis=_t(this.options.aboveAxis,!0),this.tooltipTracking=!0,this.initLabelsFormat()}function ua(){pa.apply(this,arguments)}j(me.prototype,Or),j(me.prototype,oo),me.prototype.defaults={markers:{visible:!1,background:a,size:8,type:u,border:{width:2},opacity:1},labels:{visible:!1,margin:H(3),padding:H(4),animation:{type:"fadeIn",delay:600},position:"auto"},notes:{label:{}},highlight:{markers:{border:{color:a,width:2}},zIndex:100},tooltip:{format:"{0} - {1}"}};var da,ga,fa,ya=me,va=((fa=tn)&&(ba.__proto__=fa),((ba.prototype=Object.create(fa&&fa.prototype)).constructor=ba).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.toGeometryPoints(this.toPoints()))},ba.prototype.stackSegments=function(){var t=this.fromSegments;return t=!this.fromSegments?this.fromSegments=this.segmentsFromPoints(this.toGeometryPoints(this.fromPoints().reverse())):t},ba.prototype.createStroke=function(t){var e=new P.drawing.Path(t),t=new P.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)},ba.prototype.hasStackSegment=function(){return!0},ba.prototype.fromPoints=function(){return this.linePoints.map(function(t){return t.fromPoint})},ba.prototype.toPoints=function(){return this.linePoints.map(function(t){return t.toPoint})},ba),ma=((ga=va)&&(wa.__proto__=ga),((wa.prototype=Object.create(ga&&ga.prototype)).constructor=wa).prototype.createStrokeSegments=function(){return this.createCurveSegments(this.toPoints())},wa.prototype.stackSegments=function(){var t=this.fromSegments;return t=!this.fromSegments?this.fromSegments=this.createCurveSegments(this.fromPoints().reverse()):t},wa.prototype.createCurveSegments=function(t){return(new zi).process(this.toGeometryPoints(t))},wa),de=((da=va)&&(xa.__proto__=da),((xa.prototype=Object.create(da&&da.prototype)).constructor=xa).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.calculateStepPoints(this.toPoints()))},xa.prototype.stackSegments=function(){var t=this.fromSegments;return this.fromSegments||(t=this.fromSegments=this.segmentsFromPoints(this.calculateStepPoints(this.fromPoints()))).reverse(),t},xa);function xa(){da.apply(this,arguments)}function wa(){ga.apply(this,arguments)}function ba(){fa.apply(this,arguments)}j(de.prototype,jt);var _a,Ca=de,_e=((_a=Rr)&&(Aa.__proto__=_a),((Aa.prototype=Object.create(_a&&_a.prototype)).constructor=Aa).prototype.render=function(){_a.prototype.render.call(this),this.renderSegments()},Aa.prototype.pointType=function(){return ya},Aa.prototype.createPoint=function(t,e){var o=e.categoryIx,i=e.category,r=e.series,n=e.seriesIx,s=t.valueFields;if(!Kn(s.from)&&!Kn(s.to)){if(this.seriesMissingValues(r)!==ar)return null;s={from:0,to:0}}e=this.pointOptions(r,n),e=this.evalPointOptions(e,s,i,o,r,n),t=t.fields.color||r.color;I(r.color)&&(t=e.color);e=new ya(s,e);return e.color=t,this.append(e),e},Aa.prototype.createSegment=function(t,e,o){var i=(e.line||{}).style;return new("smooth"===i?ma:"step"===i?Ca:va)(t,e,o)},Aa.prototype.plotRange=function(t,e){return t?[t.value.from,t.value.to]:[e,e]},Aa.prototype.valueSlot=function(t,e){var o=t.getSlot(e[0],e[0],!this.options.clip),e=t.getSlot(e[1],e[1],!this.options.clip);if(o&&e)return{from:o,to:e}},Aa.prototype.pointSlot=function(t,e){var o,i=e.from,e=e.to,e=this.options.invertAxes?(o=new Wt(i.x1,t.y1,i.x2,t.y2),new Wt(e.x1,t.y1,e.x2,t.y2)):(o=new Wt(t.x1,i.y1,t.x2,i.y2),new Wt(t.x1,e.y1,t.x2,e.y2));return{from:o,to:e}},Aa.prototype.addValue=function(t,e){var o=t.valueFields;B(o.from)||(o.from=o.to),B(o.to)||(o.to=o.from),_a.prototype.addValue.call(this,t,e)},Aa.prototype.updateRange=function(t,e){var o;null!==t&&B(t.from)&&B(t.to)&&(o=e.series.axis,e=this.valueAxisRanges[o]=this.valueAxisRanges[o]||{min:l,max:c},o=t.from,t=t.to,e.min=Math.min(e.min,o,t),e.max=Math.max(e.max,o,t))},Aa.prototype.formatPointValue=function(t,e){t=t.value;return this.chartService.format.auto(e,t.from,t.to)},Aa.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)},Aa);function Aa(){_a.apply(this,arguments)}j(_e.prototype,Lt,he);var Sa,ka,Pa,Ma=_e,Ta=((Pa=Ln)&&(Ia.__proto__=Pa),((Ia.prototype=Object.create(Pa&&Pa.prototype)).constructor=Ia).prototype.reflow=function(t){var e=this.options,o=this.value,i=this.owner.seriesValueAxis(e),r=[],n=[],s=[],a=i.getSlot(o.low,o.high),e=i.getSlot(o.open,o.open),o=i.getSlot(o.close,o.close);e.x1=o.x1=a.x1=t.x1,e.x2=o.x2=a.x2=t.x2;t=a.center().x;r.push([e.x1,e.y1]),r.push([t,e.y1]),n.push([t,o.y1]),n.push([o.x2,o.y1]),s.push([t,a.y1]),s.push([t,a.y2]),this.lines=[r,n,s],this.box=a.clone().wrap(e.clone().wrap(o)),this.reflowNote()},Ia.prototype.createBody=function(){},Ia),Ba=((ka=En)&&(Oa.__proto__=ka),((Oa.prototype=Object.create(ka&&ka.prototype)).constructor=Oa).prototype.pointType=function(){return Ta},Oa),Ve=((Sa=pe)&&(Ra.__proto__=Sa),((Ra.prototype=Object.create(Sa&&Sa.prototype)).constructor=Ra).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])):(e=e.aboveAxis?o.x2:o.x1,r.push([e,o.y1],[e,i.y2])),r},Ra.prototype.createVisual=function(){Sa.prototype.createVisual.call(this);var t=this.series.line||{},t=P.drawing.Path.fromPoints(this.linePoints(),{stroke:{color:t.color,width:t.width,opacity:t.opacity,dashType:t.dashType}});M(t),this.visual.append(t)},Ra);function Ra(t,e,o){Sa.call(this),this.from=t,this.to=e,this.series=o}function Oa(){ka.apply(this,arguments)}function Ia(){Pa.apply(this,arguments)}At(Ve,{animation:{type:"fadeIn",delay:600}});var La,Va,ja=Ve,Da=((Va=On)&&(Ha.__proto__=Va),((Ha.prototype=Object.create(Va&&Va.prototype)).constructor=Ha).prototype.render=function(){Va.prototype.render.call(this),this.createSegments()},Ha.prototype.traverseDataPoints=function(t){for(var e=this.options.series,o=Pr(e),i=!this.options.invertAxes,r=0;r<e.length;r++)for(var n=e[r],s=0,a=0,p=0;p<o;p++){var h=or.current.bindPoint(n,p),l=h.valueFields.value,c=h.fields.summary,u=s,d=void 0;c?"total"===c.toLowerCase()?(u=0,d=h.valueFields.value=s):(d=u-(h.valueFields.value=a),a=0):B(l)&&(a+=l,d=s+=l),t(h,{category:this.categoryAxis.categoryAt(p),categoryIx:p,series:n,seriesIx:r,total:s,runningTotal:a,from:u,to:d,isVertical:i})}},Ha.prototype.updateRange=function(t,e){Va.prototype.updateRange.call(this,{value:e.to},e)},Ha.prototype.aboveAxis=function(t){return 0<=t.value},Ha.prototype.plotRange=function(t){return[t.from,t.to]},Ha.prototype.createSegments=function(){for(var t=this.options.series,e=this.seriesPoints,o=this.segments=[],i=0;i<t.length;i++){var r=t[i],n=e[i];if(n)for(var s=void 0,a=0;a<n.length;a++){var p,h=n[a];h&&s&&(p=new ja(s,h,r),o.push(p),this.append(p)),s=h}}},Ha),za=["area","verticalArea","rangeArea","verticalRangeArea"],Ea=[cr,dr].concat(za),Ue=((La=Ys)&&(Ua.__proto__=La),((Ua.prototype=Object.create(La&&La.prototype)).constructor=Ua).prototype.initFields=function(t){if(this.namedCategoryAxes={},this.namedValueAxes={},this.valueAxisRangeTracker=new cn,0<t.length){this.invertAxes=J(t[0].type,[hr,"bullet",dr,"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}}}},Ua.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)},Ua.prototype.removeAxis=function(t){var e=t.options.name;La.prototype.removeAxis.call(this,t),t instanceof Qo?delete this.namedCategoryAxes[e]:(this.valueAxisRangeTracker.reset(e),delete this.namedValueAxes[e]),t===this.categoryAxis&&delete this.categoryAxis,t===this.valueAxis&&delete this.valueAxis},Ua.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"]||[];this.addToLegend(r);r=this.filterVisibleSeries(r);if(r)for(var n=this.groupSeriesByCategoryAxis(r),s=0;s<n.length;s++)this.createChartGroup(n[s],i)}},Ua.prototype.createChartGroup=function(t,e){this.createAreaChart(Vs(t,["area","verticalArea"]),e),this.createRangeAreaChart(Vs(t,["rangeArea","verticalRangeArea"]),e),this.createBarChart(Vs(t,[lr,hr]),e),this.createRangeBarChart(Vs(t,["rangeColumn","rangeBar"]),e),this.createBulletChart(Vs(t,["bullet","verticalBullet"]),e),this.createCandlestickChart(Vs(t,"candlestick"),e),this.createBoxPlotChart(Vs(t,["boxPlot","verticalBoxPlot"]),e),this.createOHLCChart(Vs(t,"ohlc"),e),this.createWaterfallChart(Vs(t,["waterfall","horizontalWaterfall"]),e),this.createLineChart(Vs(t,[cr,dr]),e)},Ua.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=(Ls(n.options.type,y)||r.categoryField)&&J(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},Ua.prototype.filterSeries=function(e,o){var t=(e.data||{}).length;if(o._seriesMax=Math.max(o._seriesMax||0,t),!B(o.options.min)&&!B(o.options.max))return e;var i=o.currentRangeIndices(),r=J(e.type,Ea),n=j({},e);return n.data=(n.data||[]).slice(i.min,i.max+1),r&&Fs(n,i,t,function(t){return{item:e.data[t],category:o.categoryAt(t,!0),categoryIx:t-i.min}},function(t){return lt(e.data[t])}),n},Ua.prototype.clearSeriesPointsCache=function(){this._seriesPointsCache={}},Ua.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=Ls(i.type,y),n=t.data,s=i?js:Ki,a=[];i||e.mapCategories();for(var p=0;p<n.length;p++){var h,l=t.categoryField?s(t.categoryField,n[p],this.chartService.intl):r[p];lt(l)&&null!==l&&(a[h=e.totalIndex(l)]=a[h]||{items:[],category:l},a[h].items.push(p))}return this._currentPointsCache[o]=a},Ua.prototype.aggregateSeries=function(t,i){if(!t.data.length)return t;for(var r=this.seriesSourcePoints(t,i),e=j({},t),n=new $s(j({},t),or.current,oa.current),o=e.data=[],s=i.options.dataItems||[],a=i.currentRangeIndices(),p=function(t){var e=t-a.min,o=r[t];return(o=o||(r[t]={})).categoryIx=e,o.item||(t=i.categoryAt(t,!0),o.category=t,o.item=n.aggregatePoints(o.items,t)),o},h=a.min;h<=a.max;h++){var l=p(h);o[l.categoryIx]=l.item,l.items&&l.items.length&&(s[l.categoryIx]=l.item)}return J(e.type,Ea)&&Fs(e,a,i.totalCount(),p,function(t){return r[t]}),i.options.dataItems=s,e},Ua.prototype.appendChart=function(t,e){var o=t.options.series,i=this.seriesCategoryAxis(o[0]),r=i.options.categories,n=Math.max(0,Pr(o)-r.length);if(0<n)for(r=i.options.categories=i.options.categories.slice(0);n--;)r.push("");this.valueAxisRangeTracker.update(t.valueAxisRanges),La.prototype.appendChart.call(this,t,e)},Ua.prototype.seriesPaneName=function(t){var e=this.options,o=t.axis,t=Q([].concat(e.valueAxis),function(t){return t.name===o})[0],e=((e.panes||[{}])[0]||{}).name||"default";return(t||{}).pane||e},Ua.prototype.seriesCategoryAxis=function(t){var e=t.categoryAxis,t=e?this.namedCategoryAxes[e]:this.categoryAxis;if(!t)throw new Error("Unable to locate category axis with name "+e);return t},Ua.prototype.stackableChartOptions=function(t,e){t=t.stack;return{isStacked:t,isStacked100:t&&"100%"===t.type,clip:e.options.clip}},Ua.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 Q(t,function(t){return 0===o&&!t.categoryAxis||t.categoryAxis===e})}(t,e[s],s);0!==a.length&&n.push(a)}return n},Ua.prototype.createBarChart=function(t,e){var o;0!==t.length&&(o=t[0],o=new On(this,Object.assign({series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing},this.stackableChartOptions(o,e))),this.appendChart(o,e))},Ua.prototype.createRangeBarChart=function(t,e){var o;0!==t.length&&(o=t[0],o=new ha(this,{series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing}),this.appendChart(o,e))},Ua.prototype.createBulletChart=function(t,e){var o;0!==t.length&&(o=t[0],o=new ys(this,{series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing,clip:e.options.clip}),this.appendChart(o,e))},Ua.prototype.createLineChart=function(t,e){var o;0!==t.length&&(o=t[0],o=new Jr(this,Object.assign({invertAxes:this.invertAxes,series:t},this.stackableChartOptions(o,e))),this.appendChart(o,e))},Ua.prototype.createAreaChart=function(t,e){var o;0!==t.length&&(o=t[0],o=new ln(this,Object.assign({invertAxes:this.invertAxes,series:t},this.stackableChartOptions(o,e))),this.appendChart(o,e))},Ua.prototype.createRangeAreaChart=function(t,e){0!==t.length&&(t=new Ma(this,{invertAxes:this.invertAxes,series:t,clip:e.options.clip}),this.appendChart(t,e))},Ua.prototype.createOHLCChart=function(t,e){var o;0!==t.length&&(o=t[0],o=new Ba(this,{invertAxes:this.invertAxes,gap:o.gap,series:t,spacing:o.spacing,clip:e.options.clip}),this.appendChart(o,e))},Ua.prototype.createCandlestickChart=function(t,e){var o;0!==t.length&&(o=t[0],o=new En(this,{invertAxes:this.invertAxes,gap:o.gap,series:t,spacing:o.spacing,clip:e.options.clip}),this.appendChart(o,e))},Ua.prototype.createBoxPlotChart=function(t,e){var o;0!==t.length&&(o=t[0],o=new Xn(this,{invertAxes:this.invertAxes,gap:o.gap,series:t,spacing:o.spacing,clip:e.options.clip}),this.appendChart(o,e))},Ua.prototype.createWaterfallChart=function(t,e){var o;0!==t.length&&(o=t[0],o=new Da(this,{series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing}),this.appendChart(o,e))},Ua.prototype.axisRequiresRounding=function(t,e){for(var o=Vs(this.series,gr),i=0;i<this.series.length;i++){var r,n=this.series[i];!J(n.type,za)||(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}},Ua.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}},Ua.prototype.createCategoryAxesLabels=function(){for(var t=this.axes,e=0;e<t.length;e++)t[e]instanceof Qo&&t[e].createLabels()},Ua.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(J(this.findPane(n.pane),t)){var s=n.name,a=n.categories;void 0===a&&(a=[]),n=j({vertical:e,reverse:!e&&this.chartService.rtl,axisCrossingValue:e?l:0},n),lt(n.justified)||(n.justified=this.isJustified()),this.axisRequiresRounding(s,r)&&(n.justified=!1);var p=void 0,p=new(Ds(n,a[0])?ni:Qo)(n,this.chartService);if(o[r].categories=p.options.srcCategories,s){if(this.namedCategoryAxes[s])throw new Error("Category axis with name "+s+" is already defined");this.namedCategoryAxes[s]=p}p.axisIndex=r,i.push(p),this.appendAxis(p)}}var h=this.categoryAxis||i[0];this.categoryAxis=h,e?this.axisY=h:this.axisX=h},Ua.prototype.isJustified=function(){for(var t=this.series,e=0;e<t.length;e++)if(!J(t[e].type,za))return!1;return!0},Ua.prototype.createValueAxes=function(t){var e=this.valueAxisRangeTracker,o=e.query(),i=[].concat(this.options.valueAxis),r=this.invertAxes,n={vertical:!r,reverse:r&&this.chartService.rtl},s=[];this.stack100&&(n.roundToMajorUnit=!1,n.labels={format:"P0"});for(var a=0;a<i.length;a++){var p=i[a];if(J(this.findPane(p.pane),t)){var h=p.name,l=Ls(p.type,"log")?{min:.1,max:1}:{min:0,max:1},l=e.query(h)||o||l;0===a&&l&&o&&(l.min=Math.min(l.min,o.min),l.max=Math.max(l.max,o.max));p=new(Ls(p.type,"log")?_i:gi)(l.min,l.max,j({},n,p),this.chartService);if(h){if(this.namedValueAxes[h])throw new Error("Value axis with name "+h+" is already defined");this.namedValueAxes[h]=p}p.axisIndex=a,s.push(p),this.appendAxis(p)}}var c=this.valueAxis||s[0];this.valueAxis=c,r?this.axisX=c:this.axisY=c},Ua.prototype._dispatchEvent=function(t,e,o){var i=t._eventCoordinates(e),r=new Ht(i.x,i.y),i=this.pointPane(r),n=[],s=[];if(i){for(var a=i.axes,p=0;p<a.length;p++){var h=a[p];h.getValue?Rs(s,h.getValue(r)):Rs(n,h.getCategory(r))}0===n.length&&Rs(n,this.categoryAxis.getCategory(r)),0<n.length&&0<s.length&&t.trigger(o,{element:gt(e),originalEvent:e,category:zs(n),value:zs(s)})}},Ua.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}},Ua.prototype.updateAxisOptions=function(t,e){Fa(this.options,t,e),Fa(this.originalOptions,t,e)},Ua);function Ua(){La.apply(this,arguments)}function Ha(){Va.apply(this,arguments)}function Fa(t,e,o){j([].concat(e instanceof Qo?t.categoryAxis:t.valueAxis)[e.axisIndex],o)}At(Ue,{categoryAxis:{},valueAxis:{}}),j(Ue.prototype,Qs);var Ga=Ue;function Na(){this._defaultPrevented=!0}var Wa,Xa=((Wa=P.Class)&&(qa.__proto__=Wa),((qa.prototype=Object.create(Wa&&Wa.prototype)).constructor=qa).prototype.destroy=function(){this._points=[]},qa.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))}},qa.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:Na,visual:t.highlightVisual(),show:e}),i._defaultPrevented||t.toggleHighlight(e,o)):t.toggleHighlight(e,o)},qa.prototype.hide=function(){for(var t=this._points;t.length;)this.togglePointHighlight(t.pop(),!1)},qa.prototype.isHighlighted=function(t){for(var e=this._points,o=0;o<e.length;o++)if(t===e[o])return!0;return!1},qa);function qa(){Wa.call(this),this._points=[]}function Ya(t,e){e=(e||"").toLowerCase(),t=t.event;return"none"===e&&!(t.ctrlKey||t.shiftKey||t.altKey)||t[e+"Key"]}function Qa(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}var Za,Ne=((Za=P.Class)&&(Ka.__proto__=Za),((Ka.prototype=Object.create(Za&&Za.prototype)).constructor=Ka).prototype.start=function(t){return this._active=Ya(t,this.options.key),this._active},Ka.prototype.move=function(t){if(this._active){t=this.axisRanges=this._panAxes(t,v).concat(this._panAxes(t,m));if(t.length)return Qa(this.axisRanges=t)}},Ka.prototype.end=function(){var t=this._active;return this._active=!1,t},Ka.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)}},Ka.prototype.destroy=function(){delete this.plotArea},Ka.prototype._panAxes=function(t,e){var o=this.plotArea,i=-t[e].delta,t=(this.options.lock||"").toLowerCase(),r=[];if(0!=i&&(t||"").toLowerCase()!==e)for(var n=o.axes,s=0;s<n.length;s++){var a,p=n[s];!(e===v&&!p.options.vertical||e===m&&p.options.vertical)||(a=p.pan(i))&&(a.limitRange=!0,r.push({axis:p,range:a}))}return r},Ka);function Ka(t,e){Za.call(this),this.plotArea=t,this.options=j({},this.options,e)}Ne.prototype.options={key:"none",lock:"none"};var $a,Ja=Ne,Qe=(($a=P.Class)&&(tp.__proto__=$a),((tp.prototype=Object.create($a&&$a.prototype)).constructor=tp).prototype.createElement=function(){var t=this._marquee=document.createElement("div");t.className="k-marquee";var e=document.createElement("div");e.className="k-marquee-color",t.appendChild(e)},tp.prototype.removeElement=function(){this._marquee.parentNode&&this._marquee.parentNode.removeChild(this._marquee)},tp.prototype.setStyles=function(t){U(this._marquee,t)},tp.prototype.start=function(t){if(Ya(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){e=this._elementOffset();return 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},tp.prototype._elementOffset=function(){var t=this.chart.element,e=U(t,["paddingLeft","paddingTop"]),o=e.paddingLeft,e=e.paddingTop,t=ut(t);return{left:o+t.left,top:e+t.top}},tp.prototype.move=function(t){this._zoomPane&&this.setStyles(this._selectionPosition(t))},tp.prototype.end=function(t){if(this._zoomPane){var e=this._elementOffset(),t=this._selectionPosition(t);t.left-=e.left,t.top-=e.top;e={x:t.left,y:t.top},t={x:t.left+t.width,y:t.top+t.height};return this._updateAxisRanges(e,t),this.removeElement(),delete this._zoomPane,Qa(this.axisRanges)}},tp.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)}},tp.prototype.destroy=function(){this.removeElement(),delete this._marquee,delete this.chart},tp.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===v&&!a||o===m&&a||!lt(s.axisIndex)||(a=s.pointsRange(t,e))&&i.push({axis:s,range:a})}this.axisRanges=i},tp.prototype._selectionPosition=function(t){var e=this._zoomPaneClipBox,o={x:t.x.startLocation,y:t.y.startLocation},i=t.x.location,r=t.y.location,n=(this.options.lock||"").toLowerCase(),s=Math.min(o.x,i),a=Math.min(o.y,r),p=Math.abs(o.x-i),t=Math.abs(o.y-r);return n===v&&(s=e.x1,p=e.width()),n===m&&(a=e.y1,t=e.height()),i>e.x2&&(p=e.x2-o.x),i<e.x1&&(p=o.x-e.x1),r>e.y2&&(t=e.y2-o.y),r<e.y1&&(t=o.y-e.y1),{left:Math.max(s,e.x1),top:Math.max(a,e.y1),width:p,height:t}},tp);function tp(t,e){$a.call(this),this.chart=t,this.options=j({},this.options,e),this.createElement()}Qe.prototype.options={key:"shift",lock:"none"};var ep,op,ip,rp,np=Qe,sp=((rp=P.Class)&&(dp.__proto__=rp),((dp.prototype=Object.create(rp&&rp.prototype)).constructor=dp).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===v&&!a||o===m&&a||!s.zoomRange||(a=vt(this.options.rate,.01,.9),(a=s.zoomRange(-t*a,e))&&i.push({axis:s,range:a}))}return Qa(this.axisRanges=i)},dp.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)}},dp.prototype.destroy=function(){delete this.chart},dp),ap=((ip=pe)&&(up.__proto__=ip),((up.prototype=Object.create(ip&&ip.prototype)).constructor=up).prototype.render=function(){var t=this.children,e=this.options,o=e.vertical;this.visual=new P.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 Wt),r.renderVisual()}},up.prototype.reflow=function(t){this.visual.rect(t.toRect()),this.visual.reflow();t=this.visual.clippedBBox();this.box=t?Be(t):new Wt},up.prototype.renderVisual=function(){this.addVisual()},up.prototype.createVisual=function(){},up),pp=((op=ue)&&(cp.__proto__=op),((cp.prototype=Object.create(op&&op.prototype)).constructor=cp).prototype.createContainer=function(){this.container=new Se({vertical:!1,wrap:!1,align:C,spacing:this.options.spacing}),this.append(this.container)},cp.prototype.createMarker=function(){this.container.append(new fe(this.markerOptions()))},cp.prototype.markerOptions=function(){var t=this.options,e=t.markerColor;return j({},t.markers,{background:e,border:{color:e}})},cp.prototype.createLabel=function(){var t=this.options,e=j({},t.labels);this.container.append(new Le(t.text,e))},cp.prototype.renderComplete=function(){op.prototype.renderComplete.call(this);var t=this.options.cursor||{},t=this._itemOverlay=P.drawing.Path.fromRect(this.container.box.toRect(),{fill:{color:a,opacity:0},stroke:null,cursor:t.style||t});this.appendVisual(t)},cp.prototype.click=function(t,e){var o=this.eventArgs(e);!t.trigger("legendItemClick",o)&&e&&"contextmenu"===e.type&&e.preventDefault()},cp.prototype.over=function(t,e){e=this.eventArgs(e);return t.trigger("legendItemHover",e)||t._legendItemHover(e.seriesIndex,e.pointIndex),!0},cp.prototype.out=function(t,e){t._unsetActivePoint(),t.trigger("legendItemLeave",this.eventArgs(e))},cp.prototype.eventArgs=function(t){var e=this.options;return{element:gt(t),text:e.text,series:e.series,seriesIndex:e.series.index,pointIndex:e.pointIndex}},cp.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()):op.prototype.renderVisual.call(this)},cp),hp="custom",Je=((ep=pe)&&(lp.__proto__=ep),((lp.prototype=Object.create(ep&&ep.prototype)).constructor=lp).prototype.createContainers=function(){var t=this.options,e=t.position,o=t.align,i=e,r=C;e===hp?i=A:J(e,[k,_])?(i="start"===o?A:"end"===o?S:C,r=e):o&&("start"===o?r=k:"end"===o&&(r=_)),this.container=new ue({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 ue({vAlign:r,align:i,zIndex:t.zIndex,shrinkToFit:!0}):this.itemsContainer=this.container,this.append(this.container)},lp.prototype.createItems=function(){for(var t=this.getService(),e=this.options,o=this.isVertical(),i=new ap({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 pp(j({},{markers:e.markers,labels:e.labels,rtl:t.rtl},e.item,a)))}i.render(),this.itemsContainer.append(i)},lp.prototype.isVertical=function(){var t=this.options,e=t.orientation,t=t.position;return t===hp&&"horizontal"!==e||(lt(e)?"horizontal"!==e:J(t,[A,S]))},lp.prototype.hasItems=function(){return 0<this.container.children[0].children.length},lp.prototype.reflow=function(t){var e=this.options,t=t.clone();this.hasItems()?(e.position===hp?(this.containerCustomReflow(t),this.box=t):this.containerReflow(t),this.hasTitle()&&this.title.reflow(new Wt(this.container.box.x1,this.title.box.y1,this.container.box.x2,this.title.box.y2))):this.box=t},lp.prototype.containerReflow=function(t){var e=this.options,o=this.container,i=e.position,r=e.width,n=e.height,s=i===k||i===_?v:m,a=this.isVertical(),p=t.clone(),h=t.clone();i!==A&&i!==S||(h.y1=p.y1=0),a&&n?(h.y2=h.y1+n,h.align(p,m,o.options.vAlign)):!a&&r&&(h.x2=h.x1+r,h.align(p,v,o.options.align)),o.reflow(h);p=(h=o.box).clone();(e.offsetX||e.offsetY)&&(h.translate(e.offsetX,e.offsetY),o.reflow(h)),p[s+1]=t[s+1],p[s+2]=t[s+2],this.box=p},lp.prototype.containerCustomReflow=function(t){var e=this.options,o=this.container,i=e.offsetX,r=e.offsetY,n=e.width,s=e.height,e=this.isVertical(),t=t.clone();e&&s?t.y2=t.y1+s:!e&&n&&(t.x2=t.x1+n),o.reflow(t),t=o.box,o.reflow(new Wt(i,r,i+t.width(),r+t.height()))},lp.prototype.renderVisual=function(){this.hasItems()&&ep.prototype.renderVisual.call(this)},lp.prototype.createLegendTitle=function(t){var e=j({},{color:r,position:k,align:C},t),o=e.text;t&&!1!==t.visible&&(lt(e)&&e.visible&&((t=W(e))?o=t({text:o}):e.format&&(o=this.chartService.format.auto(e.format,o))),this.title=new Le(o,e),this.createTitleLayout(),this.appendTitleLayoutContent())},lp.prototype.createTitleLayout=function(){this.layout=new Se({vertical:!0,wrap:!1}),this.container.append(this.layout)},lp.prototype.hasTitle=function(){return Boolean(this.options.title&&!1!==this.options.title.visible)},lp.prototype.appendTitleLayoutContent=function(){this.options.title.position===_?(this.layout.append(this.itemsContainer),this.layout.append(this.title)):(this.layout.append(this.title),this.layout.append(this.itemsContainer))},lp);function lp(t,e){void 0===e&&(e={}),ep.call(this,t),this.chartService=e,J(this.options.position,[k,S,_,A,hp])||(this.options.position=S),this.createContainers(),this.createLegendTitle(t.title),this.createItems()}function cp(t){op.call(this,t),this.createContainer(),t.rtl?(this.createLabel(),this.createMarker()):(this.createMarker(),this.createLabel())}function up(t,e){ip.call(this,t),this.chartService=e}function dp(t,e){rp.call(this),this.chart=t,this.options=j({rate:.3},this.options,e)}At(Je,{position:S,items:[],offsetX:0,offsetY:0,margin:H(5),padding:H(5),border:{color:r,width:0},item:{cursor:"pointer",spacing:6},spacing:6,background:"",zIndex:1,markers:{border:{width:0},width:15,height:3,type:"rect",align:A,vAlign:C}});var gp,fp=Je,lo=((gp=P.Class)&&(yp.__proto__=gp),((yp.prototype=Object.create(gp&&gp.prototype)).constructor=yp).prototype.register=function(t,e){this._registry.push({type:t,seriesTypes:e})},yp.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=Vs(t,a.seriesTypes)).length){n=a;break}}return new n.type(i,e,o)},yp);function yp(){gp.call(this),this._registry=[]}lo.current=new lo;var vp=lo;function mp(t){var e=document.createElement("div");return t&&(e.className=t),e}function xp(t){for(var e=t;e&&!Z(e,"k-handle");)e=e.parentNode;return e}var wp,at=((wp=P.Class)&&(bp.__proto__=wp),((bp.prototype=Object.create(wp&&wp.prototype)).constructor=bp).prototype.onPane=function(t){return this.categoryAxis.pane===t},bp.prototype.createElements=function(){var t=this.options,e=this.wrapper=mp("k-selector");U(e,{top:t.offset.top,left:t.offset.left,width:t.width,height:t.height,direction:"ltr"});var o=this.selection=mp("k-selection");this.leftMask=mp("k-mask"),this.rightMask=mp("k-mask"),e.appendChild(this.leftMask),e.appendChild(this.rightMask),e.appendChild(o),o.appendChild(mp("k-selection-bg"));var i=this.leftHandle=mp("k-handle k-left-handle"),r=this.rightHandle=mp("k-handle k-right-handle");i.appendChild(mp()),r.appendChild(mp()),o.appendChild(i),o.appendChild(r),this.chartElement.appendChild(e);var n=U(o,["borderLeftWidth","borderRightWidth","height"]),s=U(i,"height").height,o=U(r,"height").height;t.selection={border:{left:n.borderLeftWidth,right:n.borderRightWidth}},U(i,{top:(n.height-s)/2}),U(r,{top:(n.height-o)/2}),e.style.cssText=e.style.cssText},bp.prototype.bindEvents=function(){var t;!1!==this.options.mousewheel&&(this._mousewheelHandler=this._mousewheel.bind(this),ht(this.wrapper,((t={})[xr]=this._mousewheelHandler,t))),this._domEvents=so.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)})},bp.prototype.initOptions=function(){var t=this.options,e=this.categoryAxis.pane.chartsBox(),o=this.chart.chartService.intl;this._dateAxis&&j(t,{min:No(o,t.min),max:No(o,t.max),from:No(o,t.from),to:No(o,t.to)});var i=U(this.chartElement,["paddingLeft","paddingTop"]),o=i.paddingLeft,i=i.paddingTop;this.options=j({},{width:e.width(),height:e.height()+.1,padding:{left:o,top:i},offset:{left:e.x1+o,top:e.y1+i},from:t.min,to:t.max},t)},bp.prototype.destroy=function(){var t;this._domEvents&&(this._domEvents.destroy(),delete this._domEvents),clearTimeout(this._mwTimeout),this._state=null,this.wrapper&&(this._mousewheelHandler&&(bt(this.wrapper,((t={})[xr]=this._mousewheelHandler,t)),this._mousewheelHandler=null),this.chartElement.removeChild(this.wrapper),this.wrapper=null)},bp.prototype._rangeEventArgs=function(t){return{axis:this.categoryAxis.options,from:this._value(t.from),to:this._value(t.to)}},bp.prototype._start=function(t){var e=this.options,o=gt(t);!this._state&&o&&(this.chart._unsetActivePoint(),this._state={moveTarget:xp(o)||o,startLocation:t.x?t.x.location:0,range:{from:this._index(e.from),to:this._index(e.to)}},e=this._rangeEventArgs({from:this._index(e.from),to:this._index(e.to)}),this.trigger("selectStart",e)&&(this._state=null))},bp.prototype._press=function(t){(t=this._state?this._state.moveTarget:xp(gt(t)))&&p(t,"k-handle-active")},bp.prototype._move=function(t){var e,o,i,r,n,s,a,p,h,l,c,u;this._state&&(l=this._state,h=this.options,c=this.categoryAxis,e=l.range,o=l.moveTarget,i=c.options.reverse,r=this._index(h.from),n=this._index(h.to),s=this._index(h.min),a=this._index(h.max),u=l.startLocation-t.x.location,p=e.from,h=e.to,l=e.to-e.from,t=U(this.wrapper,"width").width/(c.categoriesCount()-1),c=Math.round(u/t)*(i?-1:1),o&&(u=Z(o,"k-left-handle"),t=Z(o,"k-right-handle"),Z(o,"k-selection k-selection-bg")?(e.from=Math.min(Math.max(s,r-c),a-l),e.to=Math.min(e.from+l,a)):u&&!i||t&&i?(e.from=Math.min(Math.max(s,r-c),a-1),e.to=Math.max(e.from+1,e.to)):(u&&i||t&&!i)&&(e.to=Math.min(Math.max(s+1,n-c),a),e.from=Math.min(e.to-1,e.from)),e.from===p&&e.to===h||(this.move(e.from,e.to),this.trigger("select",this._rangeEventArgs(e)))))},bp.prototype._end=function(){var t;this._state&&((t=this._state.moveTarget)&&b(t,"k-handle-active"),t=this._state.range,this.set(t.from,t.to),this.trigger("selectEnd",this._rangeEventArgs(t)),delete this._state)},bp.prototype._tap=function(t){var e=this.options,o=this.categoryAxis,i=this.chart._eventCoordinates(t),r=o.pointCategoryIndex(new Ht(i.x,o.box.y1)),n=this._index(e.from),s=this._index(e.to),a=this._index(e.min),p=this._index(e.max),i=s-n,e={},s=3===t.event.which,r=Math.round(n+i/2-r);this._state||s||(this.chart._unsetActivePoint(),o.options.justified||r--,e.from=Math.min(Math.max(a,n-r),p-i),e.to=Math.min(e.from+i,p),this._start(t),this._state&&(this._state.range=e,this.trigger("select",this._rangeEventArgs(e)),this._end()))},bp.prototype._mousewheel=function(t){var e,o=this,i=nt(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))},bp.prototype._gesturestart=function(t){var e=this.options;this._state={range:{from:this._index(e.from),to:this._index(e.to)}};e=this._rangeEventArgs(this._state.range);this.trigger("selectStart",e)?this._state=null:t.preventDefault()},bp.prototype._gestureend=function(){this._state&&(this.trigger("selectEnd",this._rangeEventArgs(this._state.range)),delete this._state)},bp.prototype._gesturechange=function(t){var e=this.chart,o=this._state,i=this.options,r=this.categoryAxis,n=o.range,s=e._toModelCoordinates(t.touches[0].x.location).x,o=e._toModelCoordinates(t.touches[1].x.location).x,e=Math.min(s,o),o=Math.max(s,o);t.preventDefault(),n.from=r.pointCategoryIndex(new Ht(e))||i.min,n.to=r.pointCategoryIndex(new Ht(o))||i.max,this.move(n.from,n.to),this.trigger("select",this._rangeEventArgs(n))},bp.prototype._index=function(t){var e=t;return e=t instanceof Date?this.categoryAxis.categoryIndex(t):e},bp.prototype._value=function(t){var e=t;return e=this._dateAxis&&(e=this.categoryAxis.categoryAt(t))>this.options.max?this.options.max:e},bp.prototype._slot=function(t){var e=this.categoryAxis,t=this._index(t);return e.getSlot(t,t,!0)},bp.prototype.move=function(t,e){var o=this.options,i=this.categoryAxis.options.reverse,r=o.offset,n=o.padding,s=o.selection.border,a=i?t:e,p="x"+(i?2:1),e=this._slot(i?e:t),t=wt(e[p]-r.left+n.left);U(this.leftMask,{width:t}),U(this.selection,{left:t});e=this._slot(a),r=wt(o.width-(e[p]-r.left+n.left));U(this.rightMask,{width:r});n=o.width-r;n!==o.width&&(n+=s.right),U(this.rightMask,{left:n}),U(this.selection,{width:Math.max(o.width-(t+r)-s.right,0)})},bp.prototype.set=function(t,e){var o=this.options,i=this._index(o.min),r=this._index(o.max),i=vt(this._index(t),i,r),r=vt(this._index(e),i+1,r);o.visible&&this.move(i,r),o.from=this._value(i),o.to=this._value(r)},bp.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),s=this._index(e.to),a={from:n,to:s},e=j({},a);if(this._state&&(a=this._state.range),r!==S&&(a.from=vt(vt(n-t,0,s-1),o,i)),r!==A&&(a.to=vt(vt(s+t,a.from+1,i),o,i)),a.from!==e.from||a.to!==e.to)return this.set(a.from,a.to),!0},bp.prototype.zoom=function(t,e){var o=this.options,i=this._index(o.min),r=this._index(o.max),n=this._index(o.from),s=this._index(o.to),a={from:n,to:s},p=j({},a),h=this.categoryAxis.options.reverse,o=v+(h?"2":"1"),h=this.categoryAxis.lineBox(),e=Math.abs(h[o]-e.x),h=h.width(),e=wt(e/h,2),h=wt(e*t),t=wt((1-e)*t);if((a=this._state?this._state.range:a).from=vt(vt(n-h,0,s-1),i,r),a.to=vt(vt(s+t,a.from+1,r),i,r),a.from!==p.from||a.to!==p.to)return this.set(a.from,a.to),!0},bp.prototype.trigger=function(t,e){return(this.observer||this.chart).trigger(t,e)},bp);function bp(t,e,o,i){wp.call(this);var r=t.element;this.options=j({},this.options,o),this.chart=t,this.observer=i,this.chartElement=r,this.categoryAxis=e,this._dateAxis=this.categoryAxis instanceof ni,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())}At(at,{visible:!0,mousewheel:{zoom:"both"},min:c,max:l});var _p,Cp,Ap=at,Sp=((Cp=Pe)&&(Pp.__proto__=Cp),((Pp.prototype=Object.create(Cp&&Cp.prototype)).constructor=Pp).prototype.show=function(t){var e,o;!t||!t.tooltipAnchor||this._current&&this._current===t||(e=j({},this.options,t.options.tooltip),(o=t.tooltipAnchor())?(this._current=t,Cp.prototype.show.call(this,{point:t,anchor:o},e,t)):this.hide())},Pp.prototype.hide=function(){delete this._current,Cp.prototype.hide.call(this)},Pp),Jt=((_p=Pe)&&(kp.__proto__=_p),((kp.prototype=Object.create(_p&&_p.prototype)).constructor=kp).prototype.showAt=function(t,e){var o,i=Q(t,function(t){t=t.series.tooltip;return!t||!1!==t.visible});0<i.length&&(o=i[0],i=this.plotArea.categoryAxis.getSlot(o.categoryIx),i=e?this._slotAnchor(e,i):this._defaultAnchor(o,i),this.show({anchor:i,shared:!0,points:t,category:o.category,categoryText:this.formatService.auto(this.options.categoryFormat,o.category),series:this.plotArea.series},this.options))},kp.prototype._slotAnchor=function(t,e){return this.plotArea.categoryAxis.options.vertical||(t.x=e.center().x),{point:t,align:{horizontal:"left",vertical:"center"}}},kp.prototype._defaultAnchor=function(t,e){var o=t.owner.pane.chartsBox(),t=this.plotArea.categoryAxis.options.vertical,o=o.center(),e=e.center();return{point:t?new Ht(o.x,e.y):new Ht(e.x,o.y),align:{horizontal:"center",vertical:"center"}}},kp);function kp(t,e){_p.call(this,t.chartService,e),this.plotArea=t,this.formatService=t.chartService.format}function Pp(){Cp.apply(this,arguments)}At(Jt,{categoryFormat:"{0:d}"});var Mp,Tp=Jt,ne=((Mp=P.drawing.Animation)&&(Bp.__proto__=Mp),((Bp.prototype=Object.create(Mp&&Mp.prototype)).constructor=Bp).prototype.setup=function(){var t,e=this.element,o=this.options;e.bbox()?(this.origin=o.origin,t=o.vertical?m:v,(o=this.fromScale=new P.geometry.Point(1,1))[t]=sr,e.transform(P.geometry.transform().scale(o.x,o.y))):this.abort()},Bp.prototype.step=function(t){var e=tt(this.fromScale.x,1,t),t=tt(this.fromScale.y,1,t);this.element.transform(P.geometry.transform().scale(e,t,this.origin))},Bp.prototype.abort=function(){Mp.prototype.abort.call(this),this.element.transform(null)},Bp);function Bp(){Mp.apply(this,arguments)}At(ne,{duration:600}),P.drawing.AnimationFactory.current.register(hr,ne);var Rp,me=((Rp=P.drawing.Animation)&&(Op.__proto__=Rp),((Op.prototype=Object.create(Rp&&Rp.prototype)).constructor=Op).prototype.setup=function(){var t=this.center=this.element.bbox().center();this.element.transform(P.geometry.transform().scale(sr,sr,t))},Op.prototype.step=function(t){this.element.transform(P.geometry.transform().scale(t,t,this.center))},Op);function Op(){Rp.apply(this,arguments)}At(me,{easing:"easeOutElastic"}),P.drawing.AnimationFactory.current.register("bubble",me);var Ip,jt=((Ip=P.drawing.Animation)&&(Lp.__proto__=Ip),((Lp.prototype=Object.create(Ip&&Ip.prototype)).constructor=Lp).prototype.setup=function(){this.fadeTo=this.element.opacity(),this.element.opacity(0)},Lp.prototype.step=function(t){this.element.opacity(t*this.fadeTo)},Lp);function Lp(){Ip.apply(this,arguments)}At(jt,{duration:200,easing:"linear"}),P.drawing.AnimationFactory.current.register("fadeIn",jt);var Vp,de=((Vp=P.drawing.Animation)&&(jp.__proto__=Vp),((jp.prototype=Object.create(Vp&&Vp.prototype)).constructor=jp).prototype.setup=function(){this.element.transform(P.geometry.transform().scale(sr,sr,this.options.center))},jp.prototype.step=function(t){this.element.transform(P.geometry.transform().scale(t,t,this.options.center))},jp);function jp(){Vp.apply(this,arguments)}At(de,{easing:"easeOutElastic",duration:600}),P.drawing.AnimationFactory.current.register(ur,de);var Dp,zp=de,he=((Dp=es)&&(Ep.__proto__=Dp),((Ep.prototype=Object.create(Dp&&Dp.prototype)).constructor=Ep).prototype.render=function(){Dp.prototype.render.call(this),this.renderSegments()},Ep.prototype.createSegment=function(t,e,o){return new("smooth"===e.style?Nr:Dr)(t,e,o)},Ep.prototype.animationPoints=function(){return Dp.prototype.animationPoints.call(this).concat(this._segments)},Ep.prototype.createMissingValue=function(t,e){if(e===ar){t={x:t.x,y:t.y};return Kn(t.x)||(t.x=0),Kn(t.y)||(t.y=0),t}},Ep);function Ep(){Dp.apply(this,arguments)}j(he.prototype,Lt);var Up,Hp=he,_e=((Up=Ys)&&(Fp.__proto__=Up),((Fp.prototype=Object.create(Up&&Up.prototype)).constructor=Fp).prototype.initFields=function(){this.namedXAxes={},this.namedYAxes={},this.xAxisRangeTracker=new cn,this.yAxisRangeTracker=new cn},Fp.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"]||[];this.addToLegend(r);r=this.filterVisibleSeries(r);r&&(this.createScatterChart(Vs(r,"scatter"),i),this.createScatterLineChart(Vs(r,"scatterLine"),i),this.createBubbleChart(Vs(r,"bubble"),i))}this.createAxes(t)},Fp.prototype.appendChart=function(t,e){this.xAxisRangeTracker.update(t.xAxisRanges),this.yAxisRangeTracker.update(t.yAxisRanges),Up.prototype.appendChart.call(this,t,e)},Fp.prototype.removeAxis=function(t){var e=t.options.name;Up.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},Fp.prototype.seriesPaneName=function(t){var e=this.options,o=t.xAxis,i=Q([].concat(e.xAxis),function(t){return t.name===o})[0],r=t.yAxis,t=Q([].concat(e.yAxis),function(t){return t.name===r})[0],e=(e.panes||[{}])[0].name||"default";return(i||{}).pane||(t||{}).pane||e},Fp.prototype.createScatterChart=function(t,e){0<t.length&&this.appendChart(new es(this,{series:t,clip:e.options.clip}),e)},Fp.prototype.createScatterLineChart=function(t,e){0<t.length&&this.appendChart(new Hp(this,{series:t,clip:e.options.clip}),e)},Fp.prototype.createBubbleChart=function(t,e){0<t.length&&this.appendChart(new as(this,{series:t,clip:e.options.clip}),e)},Fp.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=j({reverse:!e&&this.chartService.rtl},t,{vertical:e}),p=Ls(a.type,"log"),h=s.query(),t=p?{min:.1,max:1}:{min:0,max:1},t=s.query(r)||h||t,l=[a.min,a.max],c=this.series,u=0;u<c.length;u++){var d=c[u],g=d[e?"yAxis":"xAxis"];if(g===a.name||0===o&&!g){d=or.current.bindPoint(d,0).valueFields;l.push(d[e?"y":"x"]);break}}0===o&&h&&(t.min=Math.min(t.min,h.min),t.max=Math.max(t.max,h.max));for(var f=0;f<l.length;f++)if(l[f]instanceof Date){i=!0;break}t=new(Ls(a.type,y)||!a.type&&i?vi:p?_i:gi)(t.min,t.max,a,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},Fp.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++)J(this.findPane(o[s].pane),t)&&i.push(this.createXYAxis(o[s],!1,s));for(var a=0;a<r.length;a++)J(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]},Fp.prototype._dispatchEvent=function(t,e,o){for(var i=t._eventCoordinates(e),r=new Ht(i.x,i.y),n=this.axes,s=n.length,a=[],p=[],h=0;h<s;h++){var l=n[h],c=l.options.vertical?p:a,l=l.getValue(r);null!==l&&c.push(l)}0<a.length&&0<p.length&&t.trigger(o,{element:gt(e),originalEvent:e,x:zs(a),y:zs(p)})},Fp.prototype.updateAxisOptions=function(t,e){var o=t.options.vertical,i=this.groupAxes(this.panes),t=(o?i.y:i.x).indexOf(t);Gp(this.options,t,o,e),Gp(this.originalOptions,t,o,e)},Fp);function Fp(){Up.apply(this,arguments)}function Gp(t,e,o,i){j([].concat(o?t.yAxis:t.xAxis)[e],i)}At(_e,{xAxis:{},yAxis:{}}),j(_e.prototype,Qs);var Np,Wp=_e,Ve=((Np=pe)&&(Yp.__proto__=Np),((Yp.prototype=Object.create(Np&&Np.prototype)).constructor=Yp).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,t=W(o),e=this.pointData(),t?r=t(e):o.format&&(r=i.format.auto(o.format,r)),o.visible&&(r||0===r)&&(o.position===C||"insideEnd"===o.position?(o.color||(o.color=Rt(this.options.color)),o.background||(o.background=this.options.color)):(i=i.theme.seriesDefaults.labels,o.color=o.color||i.color,o.background=o.background||i.background),this.label=new Le(r,j({},o,{align:C,vAlign:"",animation:{type:"fadeIn",delay:this.animationDelay}}),e),this.append(this.label)))},Yp.prototype.reflow=function(t){this.render(),this.box=t,this.reflowLabel()},Yp.prototype.reflowLabel=function(){var t,e,o,i,r=this.options.labels,n=this.label,s=this.sector.clone(),a=r.distance,p=s.middle();n&&(e=n.box.height(),o=n.box.width(),r.position===C?(s.radius=Math.abs((s.radius-e)/2)+e,t=s.point(p),n.reflow(new Wt(t.x,t.y-e/2,t.x,t.y))):"insideEnd"===r.position?(s.radius=s.radius-e/2,t=s.point(p),n.reflow(new Wt(t.x,t.y-e/2,t.x,t.y))):((t=s.clone().expand(a).point(p)).x>=s.center.x?(i=t.x+o,n.orientation=S):(i=t.x-o,n.orientation=A),n.reflow(new Wt(i,t.y-e,t.x,t.y))))},Yp.prototype.createVisual=function(){var t,e=this,o=this.sector,i=this.options;Np.prototype.createVisual.call(this),this.value&&(i.visual?(t=(o.startAngle+180)%360,(i=i.visual({category:this.category,dataItem:this.dataItem,value:this.value,series:this.series,percentage:this.percentage,center:new P.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 P.drawing.Group;return e.createSegmentVisual(t),t}}))&&this.visual.append(i)):this.createSegmentVisual(this.visual))},Yp.prototype.createSegmentVisual=function(t){var e=this.sector,o=this.options,i=o.border||{},r=0<i.width?{stroke:{color:i.color,width:i.width,opacity:i.opacity,dashType:i.dashType}}:{},n=o.color,i={color:n,opacity:o.opacity},r=this.createSegment(e,j({fill:i,stroke:{opacity:o.opacity},zIndex:o.zIndex},r));t.append(r),vn(o)&&t.append(this.createGradientOverlay(r,{baseColor:n,fallbackFill:i},j({center:[e.center.x,e.center.y],innerRadius:e.innerRadius,radius:e.radius,userSpace:!0},o.overlay)))},Yp.prototype.createSegment=function(t,e){return e.singleSegment?new P.drawing.Circle(new P.geometry.Circle(new P.geometry.Point(t.center.x,t.center.y),t.radius),e):re.current.createRing(t,e)},Yp.prototype.createAnimation=function(){var t=this.options,e=this.sector.center;j(t,{animation:{center:[e.x,e.y],delay:this.animationDelay}}),Np.prototype.createAnimation.call(this)},Yp.prototype.createHighlight=function(t){var e=this.options.highlight||{},o=e.border||{};return this.createSegment(this.sector,j({},t,{fill:{color:e.color,opacity:e.opacity},stroke:{opacity:o.opacity,width:o.width,color:o.color}}))},Yp.prototype.highlightVisual=function(){return this.visual.children[0]},Yp.prototype.highlightVisualArgs=function(){var t=this.sector;return{options:this.options,radius:t.radius,innerRadius:t.innerRadius,center:new P.geometry.Point(t.center.x,t.center.y),startAngle:t.startAngle,endAngle:t.angle+t.startAngle,visual:this.visual}},Yp.prototype.tooltipAnchor=function(){var t=this.sector.clone().expand(5),e=t.middle();return{point:t.point(e),align:(t=xt(e+180),e=wt(Math.sin(t),f),t=wt(Math.cos(t),f),{horizontal:Math.abs(e)>qp?C:t<0?S:A,vertical:Math.abs(e)<Xp?C:e<0?_:k})}},Yp.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Yp.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,series:this.series,percentage:this.percentage}},Yp),Xp=wt(xt(30),f),qp=wt(xt(60),f);function Yp(t,e,o){Np.call(this,o),this.value=t,this.sector=e}At(Ve,{color:a,overlay:{gradient:"roundedBevel"},border:{width:.5},labels:{visible:!1,distance:35,font:"12px sans-serif",margin:H(.5),align:u,zIndex:1,position:"outsideEnd"},animation:{type:ur},highlight:{visible:!0,border:{width:1}},visible:!0}),j(Ve.prototype,Or);var Qp,Zp=Ve,Kp={createLegendItem:function(t,e,o){var i,r,n=this.options.legend||{},s=n.labels||{},a=n.inactiveItems||{},p=a.labels||{};o&&!1!==o.visibleInLegend&&(n=!(r=!1!==o.visible)&&W(p)||W(s),s=o.category,n&&(s=n({text:s,series:o.series,dataItem:o.dataItem,percentage:o.percentage,value:t})),a=r?(i={},e.color):(i={color:p.color,font:p.font},(a.markers||{}).color),Kn(s)&&""!==s&&this.legendItems.push({active:r,pointIndex:o.index,text:s,series:o.series,markerColor:a,labels:i}))}},Ue=((Qp=pe)&&($p.__proto__=Qp),(($p.prototype=Object.create(Qp&&Qp.prototype)).constructor=$p).prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},$p.prototype.traverseDataPoints=function(t){for(var e=this.options,o=this.plotArea.options.seriesColors,i=(o=void 0===o?[]:o).length,r=e.series,n=r.length,s=0;s<n;s++){var a=r[s],p=a.data,h=Is(a),l=h.total,c=h.points,h=h.count,u=360/l,d=void 0;isFinite(u)||(d=360/h);var g=void 0,g=(lt(a.startAngle)?a:e).startAngle;s!==n-1&&"outsideEnd"===a.labels.position&&(a.labels.position=C);for(var f=0;f<c.length;f++){var y,v,m,x,w,b=c[f];b&&(y=b.fields,v=b.value,m=b.visible,x=0!==v?d||v*u:0,w=1!==p.length&&Boolean(y.explode),I(a.color)||(a.color=y.color||o[f%i]),t(b.valueFields.value,new Kt(null,0,0,g,x),{owner:this,category:lt(y.category)?y.category:"",index:f,series:a,seriesIx:s,dataItem:p[f],percentage:0!==l?v/l:0,explode:w,visibleInLegend:y.visibleInLegend,visible:m,zIndex:n-s,animationDelay:this.animationDelay(f,s,n)}),!1!==m&&(g+=x))}}},$p.prototype.evalSegmentOptions=function(t,e,o){var i=o.series;kr(t,{value:e,series:i,dataItem:o.dataItem,category:o.category,percentage:o.percentage},{defaults:i._defaults,excluded:["data","content","template","visual","toggle"]})},$p.prototype.addValue=function(t,e,o){var i=j({},o.series,{index:o.index});this.evalSegmentOptions(i,t,o),this.createLegendItem(t,i,o),!1!==o.visible&&(i=new Zp(t,e,i),Object.assign(i,o),this.append(i),this.points.push(i))},$p.prototype.reflow=function(t){var e=this.options,o=this.points,i=this.seriesConfigs;void 0===i&&(i=[]);var r=o.length,n=t.clone(),s=Math.min(n.width(),n.height()),a=s/2,p=s-.85*s,h=new Wt(n.x1,n.y1,n.x1+s,n.y1+s),s=h.center(),n=n.center(),l=e.series.length,c=[],u=[],p=_t(e.padding,p);this.targetBox=t,p=a-5<p?a-5:p,h.translate(n.x-s.x,n.y-s.y);for(var d=a-p,g=new Ht(d+h.x1+p,d+h.y1+p),f=0;f<r;f++){var y,v=o[f],m=v.sector,x=v.seriesIx;m.radius=d,m.center=g,i.length&&(y=i[x],m.innerRadius=y.innerRadius,m.radius=y.radius),x===l-1&&v.explode&&(m.center=m.clone().setRadius(.15*m.radius).point(m.middle())),v.reflow(h);v=v.label;v&&"outsideEnd"===v.options.position&&x===l-1&&(v.orientation===S?u:c).push(v)}0<c.length&&(c.sort(this.labelComparator(!0)),this.leftLabelsReflow(c)),0<u.length&&(u.sort(this.labelComparator(!1)),this.rightLabelsReflow(u)),this.box=h},$p.prototype.leftLabelsReflow=function(t){var e=this.distanceBetweenLabels(t);this.distributeLabels(e,t)},$p.prototype.rightLabelsReflow=function(t){var e=this.distanceBetweenLabels(t);this.distributeLabels(e,t)},$p.prototype.distanceBetweenLabels=function(t){var e=yt(this.points),o=e.sector,i=t.length-1,e=o.radius+e.options.labels.distance,r=[],n=t[0].box,s=wt(n.y1-(o.center.y-e-n.height()-n.height()/2));r.push(s);for(var a=0;a<i;a++){var p=t[a+1].box,n=t[a].box,s=wt(p.y1-n.y2);r.push(s)}return s=wt(o.center.y+e-t[i].box.y2-t[i].box.height()/2),r.push(s),r},$p.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)},$p.prototype._takeDistance=function(t,e,o,i){var r=i;return 0<t[o]&&(r-=i=Math.min(t[o],r),t[o]-=i,t[e]+=i),r},$p.prototype.reflowLabels=function(t,e){var o,i=yt(this.points),r=i.sector,n=i.options.labels,s=e.length,a=n.distance,p=r.center.y-(r.radius+a)-e[0].box.height();t[0]+=2;for(var h=0;h<s;h++){var l=e[h],c=l.box;p+=t[h],o=this.hAlignLabel(c.x2,r.clone().expand(a),p,p+c.height(),l.orientation===S),l.orientation===S?(n.align!==u&&(o=r.radius+r.center.x+a),l.reflow(new Wt(o+c.width(),p,o,p))):(n.align!==u&&(o=r.center.x-r.radius-a),l.reflow(new Wt(o-c.width(),p,o,p))),p+=c.height()}},$p.prototype.createVisual=function(){var t=this.options.connectors,e=this.points,o=e.length;Qp.prototype.createVisual.call(this),this._connectorLines=[];for(var i=0;i<o;i++){var r,n,s,a,p,h,l,c=e[i],u=c.sector,d=c.label,g=u.middle(),f=(c.options.connectors||{}).color||t.color;d&&(r=new P.drawing.Path({stroke:{color:f,width:t.width},animation:{type:"fadeIn",delay:c.animationDelay}}),"outsideEnd"===d.options.position&&(n=d.box,s=u.center,l=u.point(g),a=new Ht(n.x1,n.center().y),f=h=p=void 0,l=u.clone().expand(t.padding).point(g),r.moveTo(l.x,l.y),d.orientation===S?(f=Jp(s,l,a,h=new Ht(n.x1-t.padding,n.center().y)),a=new Ht(h.x-4,h.y),(f=f||a).x=Math.min(f.x,a.x),this.pointInCircle(f,u.center,u.radius+4)||f.x<u.center.x?(p=u.center.x+u.radius+4,c.options.labels.align===lr||p<a.x?r.lineTo(p,l.y):r.lineTo(l.x+8,l.y),r.lineTo(a.x,h.y)):(f.y=h.y,r.lineTo(f.x,f.y))):(f=Jp(s,l,a,h=new Ht(n.x2+t.padding,n.center().y)),a=new Ht(h.x+4,h.y),(f=f||a).x=Math.max(f.x,a.x),this.pointInCircle(f,u.center,u.radius+4)||f.x>u.center.x?(p=u.center.x-u.radius-4,c.options.labels.align===lr||p>a.x?r.lineTo(p,l.y):r.lineTo(l.x-8,l.y),r.lineTo(a.x,h.y)):(f.y=h.y,r.lineTo(f.x,f.y))),r.lineTo(h.x,h.y),this._connectorLines.push(r),this.visual.append(r)))}},$p.prototype.renderVisual=function(){var t,e,o,i;Qp.prototype.renderVisual.call(this),kt(this.options.series,function(t){return t.autoFit})&&(t=this.targetBox,e=this.box.center(),(o=this.visual.bbox())&&(i=o.bottomRight(),(i=Math.min((e.y-t.y1)/(e.y-o.origin.y),(t.y2-e.y)/(i.y-e.y),(e.x-t.x1)/(e.x-o.origin.x),(t.x2-e.x)/(i.x-e.x)))<1&&this.visual.transform(P.geometry.transform().scale(i,i,[e.x,e.y]))))},$p.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}},$p.prototype.hAlignLabel=function(t,e,o,i,r){var n=e.radius,s=e.center,e=s.x,s=s.y,i=Math.min(Math.abs(s-o),Math.abs(s-i));return n<i?t:e+Math.sqrt(n*n-i*i)*(r?1:-1)},$p.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)},$p.prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value)},$p.prototype.animationDelay=function(t){return 70*t},$p.prototype.stackRoot=function(){return this},$p);function $p(t,e){Qp.call(this,e),this.plotArea=t,this.chartService=t.chartService,this.points=[],this.legendItems=[],this.render()}function Jp(t,e,o,i){var r,n=(i.x-o.x)*(t.y-o.y)-(i.y-o.y)*(t.x-o.x),o=(i.y-o.y)*(e.x-t.x)-(i.x-o.x)*(e.y-t.y);return r=0!=o?new Ht(t.x+(o=n/o)*(e.x-t.x),t.y+o*(e.y-t.y)):r}At(Ue,{startAngle:90,connectors:{width:2,color:"#939393",padding:8},inactiveItems:{markers:{},labels:{}}}),j(Ue.prototype,Kp),Ue.prototype.isStackRoot=!0;var th,eh,oh=Ue,ih=((eh=Ys)&&(nh.__proto__=eh),((nh.prototype=Object.create(eh&&eh.prototype)).constructor=nh).prototype.render=function(){this.createPieChart(this.series)},nh.prototype.createPieChart=function(t){var e=t[0],e=new oh(this,{series:t,padding:e.padding,startAngle:e.startAngle,connectors:e.connectors,legend:this.options.legend});this.appendChart(e)},nh.prototype.appendChart=function(t,e){eh.prototype.appendChart.call(this,t,e),pt(this.options.legend.items,t.legendItems)},nh),Ne=((th=Zp)&&(rh.__proto__=th),((rh.prototype=Object.create(th&&th.prototype)).constructor=rh).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,r=i.point(r),o.reflow(new Wt(r.x,r.y-t/2,r.x,r.y))):th.prototype.reflowLabel.call(this))},rh.prototype.createSegment=function(t,e){return re.current.createRing(t,e)},rh);function rh(){th.apply(this,arguments)}function nh(){eh.apply(this,arguments)}At(Ne,{overlay:{gradient:"roundedGlass"},labels:{position:C},animation:{type:ur}}),j(Ne.prototype,Or);var sh,ah=Ne,Qe=((sh=oh)&&(ph.__proto__=sh),((ph.prototype=Object.create(sh&&sh.prototype)).constructor=ph).prototype.addValue=function(t,e,o){var i=j({},o.series,{index:o.index});this.evalSegmentOptions(i,t,o),this.createLegendItem(t,i,o),t&&!1!==o.visible&&(i=new ah(t,e,i),Object.assign(i,o),this.append(i),this.points.push(i))},ph.prototype.reflow=function(t){for(var e,o=this.options,i=t.clone(),r=Math.min(i.width(),i.height()),i=r/2,n=o.series,s=n.length,r=_t(o.padding,r-.85*r),a=i-(r=i-5<r?i-5:r),p=0,h=0;h<s;h++){var l=n[h];0===h&<(l.holeSize)&&(e=l.holeSize,a-=l.holeSize),lt(l.size)?a-=l.size:p++,lt(l.margin)&&h!==s-1&&(a-=l.margin)}lt(e)||(a-=e=(i-r)/(s+.75)*.75);var c=e,u=0;this.seriesConfigs=[];for(var d=0;d<s;d++){var g=n[d],f=(c+=u)+_t(g.size,a/p);this.seriesConfigs.push({innerRadius:c,radius:f}),u=g.margin||0,c=f}sh.prototype.reflow.call(this,t)},ph.prototype.animationDelay=function(t,e,o){return 50*t+600*(e+1)/(o+1)},ph);function ph(){sh.apply(this,arguments)}At(Qe,{startAngle:90,connectors:{width:2,color:"#939393",padding:8}});var hh,lh,ch,uh=Qe,dh=((ch=ih)&&(yh.__proto__=ch),((yh.prototype=Object.create(ch&&ch.prototype)).constructor=yh).prototype.render=function(){this.createDonutChart(this.series)},yh.prototype.createDonutChart=function(t){var e=t[0],e=new uh(this,{series:t,padding:e.padding,connectors:e.connectors,legend:this.options.legend});this.appendChart(e)},yh),Je=((lh=Ys)&&(fh.__proto__=lh),((fh.prototype=Object.create(lh&&lh.prototype)).constructor=fh).prototype.initFields=function(){this.valueAxisRangeTracker=new cn},fh.prototype.render=function(){this.addToLegend(this.series),this.createPolarAxis(),this.createCharts(),this.createValueAxis()},fh.prototype.alignAxes=function(){var t=this.valueAxis,e=t.range(),o=t.options.reverse?e.max:e.min,e=t.getSlot(o),o=this.polarAxis.getSlot(0).center,e=t.box.translate(o.x-e.x1,o.y-e.y1);t.reflow(e)},fh.prototype.createValueAxis=function(){var t,e=this.valueAxisRangeTracker,o=e.query(),i=this.valueAxisOptions({roundToMajorUnit:!1,zIndex:-1}),r="log"===i.type?(t=Li,{min:.1,max:1}):(t=Oi,{min:0,max:1}),r=e.query(name)||o||r;r&&o&&(r.min=Math.min(r.min,o.min),r.max=Math.max(r.max,o.max));i=new t(r.min,r.max,i,this.chartService);this.valueAxis=i,this.appendAxis(i)},fh.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()),r=H(t.padding||{},r),i=i.clone().unpad(r),r=i.clone();r.y2=r.y1+Math.min(r.width(),r.height()),r.align(i,m,C);i=r.clone().shrink(0,r.height()/2);o.reflow(r),e.reflow(i);i=e.lineBox().height()-e.box.height();e.reflow(e.box.unpad({top:i})),this.axisBox=r,this.alignAxes(r)},fh.prototype.backgroundBox=function(){return this.box},fh.prototype.detachLabels=function(){},fh),lo=((hh=es)&&(gh.__proto__=hh),((gh.prototype=Object.create(hh&&hh.prototype)).constructor=gh).prototype.pointSlot=function(t,e){e=t.center.y-e.y1,e=Ht.onCircle(t.center,t.startAngle,e);return new Wt(e.x,e.y,e.x,e.y)},gh);function gh(){hh.apply(this,arguments)}function fh(){lh.apply(this,arguments)}function yh(){ch.apply(this,arguments)}At(lo,{clip:!1});var vh,mh=lo,at=((vh=Hp)&&(xh.__proto__=vh),(xh.prototype=Object.create(vh&&vh.prototype)).constructor=xh);function xh(){vh.apply(this,arguments)}at.prototype.pointSlot=mh.prototype.pointSlot,At(at,{clip:!1});var wh,bh,_h=at,Ch=((bh=hn)&&(kh.__proto__=bh),((kh.prototype=Object.create(bh&&bh.prototype)).constructor=kh).prototype.fillToAxes=function(t){var e=this._polarAxisCenter();t.lineTo(e.x,e.y)},kh.prototype._polarAxisCenter=function(){return this.parent.plotArea.polarAxis.box.center()},kh.prototype.strokeSegments=function(){var t,e,o,i=this._strokeSegments;return i||(t=this._polarAxisCenter(),e=new zi(!1),(o=this.points()).push(t),(i=this._strokeSegments=e.process(o)).pop()),i},kh),Ah=((wh=tn)&&(Sh.__proto__=wh),((Sh.prototype=Object.create(wh&&wh.prototype)).constructor=Sh).prototype.fillToAxes=function(t){var e=this.parent.plotArea.polarAxis.box.center(),e=new P.geometry.Segment([e.x,e.y]);t.segments.unshift(e),t.segments.push(e)},Sh);function Sh(){wh.apply(this,arguments)}function kh(){bh.apply(this,arguments)}function Ph(t,e){return t.value.x-e.value.x}var Mh,Th,Bh=((Th=_h)&&(Oh.__proto__=Th),((Oh.prototype=Object.create(Th&&Th.prototype)).constructor=Oh).prototype.createSegment=function(t,e,o){return new("smooth"===(e.line||{}).style?Ch:Ah)(t,e,o)},Oh.prototype.createMissingValue=function(t,e){var o;return Kn(t.x)&&e!==pr&&(o={x:t.x,y:t.y},e===ar&&(o.y=0)),o},Oh.prototype.seriesMissingValues=function(t){return t.missingValues||ar},Oh.prototype._hasMissingValuesGap=function(){for(var t=this.options.series,e=0;e<t.length;e++)if("gap"===this.seriesMissingValues(t[e]))return!0},Oh.prototype.sortPoints=function(t){if(t.sort(Ph),this._hasMissingValuesGap())for(var e=0;e<t.length;e++){var o=t[e];o&&(Kn(o.value.y)||"gap"!==this.seriesMissingValues(o.series)||delete t[e])}return t},Oh),Pe=((Mh=Je)&&(Rh.__proto__=Mh),((Rh.prototype=Object.create(Mh&&Mh.prototype)).constructor=Rh).prototype.createPolarAxis=function(){var t=new Pi(this.options.xAxis,this.chartService);this.polarAxis=t,this.axisX=t,this.appendAxis(t)},Rh.prototype.valueAxisOptions=function(t){return j(t,{majorGridLines:{type:d},minorGridLines:{type:d}},this.options.yAxis)},Rh.prototype.createValueAxis=function(){Mh.prototype.createValueAxis.call(this),this.axisY=this.valueAxis},Rh.prototype.appendChart=function(t,e){this.valueAxisRangeTracker.update(t.yAxisRanges),Ys.prototype.appendChart.call(this,t,e)},Rh.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createLineChart(Vs(t,["polarLine"]),e),this.createScatterChart(Vs(t,["polarScatter"]),e),this.createAreaChart(Vs(t,["polarArea"]),e)},Rh.prototype.createLineChart=function(t,e){0!==t.length&&(t=new _h(this,{series:t}),this.appendChart(t,e))},Rh.prototype.createScatterChart=function(t,e){0!==t.length&&(t=new mh(this,{series:t}),this.appendChart(t,e))},Rh.prototype.createAreaChart=function(t,e){0!==t.length&&(t=new Bh(this,{series:t}),this.appendChart(t,e))},Rh.prototype._dispatchEvent=function(t,e,o){var i=t._eventCoordinates(e),r=new Ht(i.x,i.y),i=this.axisX.getValue(r),r=this.axisY.getValue(r);null!==i&&null!==r&&t.trigger(o,{element:gt(e),x:i,y:r})},Rh.prototype.createCrosshairs=function(){},Rh);function Rh(){Mh.apply(this,arguments)}function Oh(){Th.apply(this,arguments)}At(Pe,{xAxis:{},yAxis:{}}),j(Pe.prototype,Qs);var Ih,Jt=Pe,ne=((Ih=Jr)&&(Lh.__proto__=Ih),((Lh.prototype=Object.create(Ih&&Ih.prototype)).constructor=Lh).prototype.pointSlot=function(t,e){e=t.center.y-e.y1,e=Ht.onCircle(t.center,t.middle(),e);return new Wt(e.x,e.y,e.x,e.y)},Lh.prototype.renderSegments=function(){if(Ih.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],i=yt(n),r=yt(i.linePoints),i=0===o.categoryIx,r=r.categoryIx===r.categoriesCount-1,i&&r&&yt(n).linePoints.push(o))}},Lh.prototype.createSegment=function(t,e,o){var i=new("smooth"===e.style?Nr:Dr)(t,e,o),o=this.seriesMissingValues(e);return t.length!==e.data.length&&o!==pr||(i.options.closed=!0),i},Lh);function Lh(){Ih.apply(this,arguments)}At(ne,{clip:!1,limitPoints:!1});var Vh,jh,Dh,zh,Eh=ne,Uh=((zh=hn)&&(Xh.__proto__=zh),((Xh.prototype=Object.create(zh&&zh.prototype)).constructor=Xh).prototype.fillToAxes=function(){},Xh),Hh=((Dh=tn)&&(Wh.__proto__=Dh),((Wh.prototype=Object.create(Dh&&Dh.prototype)).constructor=Wh).prototype.fillToAxes=function(){},Wh),Fh=((jh=Eh)&&(Nh.__proto__=jh),((Nh.prototype=Object.create(jh&&jh.prototype)).constructor=Nh).prototype.createSegment=function(t,e,o,i){var r,n,s,a=this.options.isStacked,p=(e.line||{}).style;return a&&0<o&&i&&(n=i.linePoints.slice(0),r=i),"smooth"===p?(s=new Uh(t,e,o,r,n)).options.closed=!0:(t.push(t[0]),s=new Hh(t,e,o,r,n)),s},Nh.prototype.seriesMissingValues=function(t){return t.missingValues||ar},Nh),me=((Vh=ah)&&(Gh.__proto__=Vh),(Gh.prototype=Object.create(Vh&&Vh.prototype)).constructor=Gh);function Gh(t,e){Vh.call(this,t,null,e)}function Nh(){jh.apply(this,arguments)}function Wh(){Dh.apply(this,arguments)}function Xh(){zh.apply(this,arguments)}At(me,{overlay:{gradient:"none"},labels:{distance:10}});var qh,Yh=me,jt=((qh=pe)&&(Qh.__proto__=qh),((Qh.prototype=Object.create(qh&&qh.prototype)).constructor=Qh).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})},Qh);function Qh(t){qh.call(this,t),this.forEach=t.rtl?_n:bn}At(jt,{gap:1,spacing:0});var Zh,Kh,$h=jt,Jh=((Kh=pe)&&(el.__proto__=Kh),((el.prototype=Object.create(Kh&&Kh.prototype)).constructor=el).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 Wt;for(var s=r;0<=s&&s<i;s+=n){var a=o[s].sector;a.startAngle=t.startAngle,a.angle=t.angle}},el),de=((Zh=On)&&(tl.__proto__=Zh),((tl.prototype=Object.create(Zh&&Zh.prototype)).constructor=tl).prototype.pointType=function(){return Yh},tl.prototype.clusterType=function(){return $h},tl.prototype.stackType=function(){return Jh},tl.prototype.categorySlot=function(t,e){return t.getSlot(e)},tl.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},tl.prototype.reflowPoint=function(t,e){t.sector=e,t.reflow()},tl.prototype.createAnimation=function(){this.options.animation.center=this.box.toRect().center(),Zh.prototype.createAnimation.call(this)},tl);function tl(){Zh.apply(this,arguments)}function el(){Kh.apply(this,arguments)}de.prototype.reflow=Rr.prototype.reflow,At(de,{clip:!1,limitPoints:!1,animation:{type:"pie"}});var ol,il=de,Lt=((ol=Je)&&(rl.__proto__=ol),((rl.prototype=Object.create(ol&&ol.prototype)).constructor=rl).prototype.createPolarAxis=function(){var t=new Si(this.options.categoryAxis,this.chartService);this.polarAxis=t,this.categoryAxis=t,this.appendAxis(t),this.aggregateCategories(),this.createCategoryAxesLabels()},rl.prototype.valueAxisOptions=function(t){return this._hasBarCharts&&j(t,{majorGridLines:{type:d},minorGridLines:{type:d}}),this._isStacked100&&j(t,{roundToMajorUnit:!1,labels:{format:"P0"}}),j(t,this.options.valueAxis)},rl.prototype.aggregateCategories=function(){Ga.prototype.aggregateCategories.call(this,this.panes)},rl.prototype.createCategoryAxesLabels=function(){Ga.prototype.createCategoryAxesLabels.call(this,this.panes)},rl.prototype.filterSeries=function(t){return t},rl.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createAreaChart(Vs(t,["radarArea"]),e),this.createLineChart(Vs(t,["radarLine"]),e),this.createBarChart(Vs(t,["radarColumn"]),e)},rl.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},rl.prototype.createAreaChart=function(t,e){0!==t.length&&(t=new Fh(this,this.chartOptions(t)),this.appendChart(t,e))},rl.prototype.createLineChart=function(t,e){0!==t.length&&(t=new Eh(this,this.chartOptions(t)),this.appendChart(t,e))},rl.prototype.createBarChart=function(t,e){var o;0!==t.length&&(o=t[0],(t=this.chartOptions(t)).gap=o.gap,t.spacing=o.spacing,t=new il(this,t),this.appendChart(t,e),this._hasBarCharts=!0)},rl.prototype.seriesCategoryAxis=function(){return this.categoryAxis},rl.prototype._dispatchEvent=function(t,e,o){var i=t._eventCoordinates(e),r=new Ht(i.x,i.y),i=this.categoryAxis.getCategory(r),r=this.valueAxis.getValue(r);null!==i&&null!==r&&t.trigger(o,{element:gt(e),category:i,value:r})},rl.prototype.createCrosshairs=function(){},rl);function rl(){ol.apply(this,arguments)}j(Lt.prototype,Qs,{appendChart:Ga.prototype.appendChart,aggregateSeries:Ga.prototype.aggregateSeries,seriesSourcePoints:Ga.prototype.seriesSourcePoints}),At(Lt,{categoryAxis:{categories:[]},valueAxis:{}});var nl,he=Lt,_e=((nl=pe)&&(sl.__proto__=nl),((sl.prototype=Object.create(nl&&nl.prototype)).constructor=sl).prototype.reflow=function(t){var e=this.points,o=this.children[0];this.box=new Wt(e[0].x,e[0].y,e[1].x,e[2].y),o&&o.reflow(new Wt(t.x1,e[0].y,t.x2,e[2].y))},sl.prototype.createVisual=function(){var t=this,e=this.options;nl.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)},sl.prototype.createPath=function(){var t=this.options,e=t.border;return P.drawing.Path.fromPoints(this.points,{fill:{color:t.color,opacity:t.opacity},stroke:{color:e.color,opacity:e.opacity,width:e.width}}).close()},sl.prototype.createHighlight=function(t){return P.drawing.Path.fromPoints(this.points,t)},sl.prototype.highlightVisual=function(){return this.visual.children[0]},sl.prototype.highlightVisualArgs=function(){var t=P.drawing.Path.fromPoints(this.points).close();return{options:this.options,path:t}},sl.prototype.tooltipAnchor=function(){var t=this.box;return{point:new Ht(t.center().x,t.y1),align:{horizontal:"center",vertical:"top"}}},sl.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},sl);function sl(t,e,o){nl.call(this,e),this.value=t,this.options.index=o.index}At(_e,{color:a,border:{width:1}}),j(_e.prototype,Or);var al,pl=_e,Ve=((al=pe)&&(hl.__proto__=al),((hl.prototype=Object.create(al&&al.prototype)).constructor=hl).prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value)},hl.prototype.render=function(){var t=this.options,e=this.plotArea.options.seriesColors;void 0===e&&(e=[]);var o=t.series[0],i=o.data;if(i)for(var t=Is(o),r=t.total,n=t.points,s=0;s<n.length;s++){var a,p,h=n[s];h&&(p=h.fields,I(o.color)||(o.color=p.color||e[s%e.length]),p=j({index:s,owner:this,series:o,dataItem:i[s],percentage:h.value/r},p,{visible:h.visible}),a=h.valueFields.value,h=this.createSegment(a,p),p=this.createLabel(a,p),h&&p&&h.append(p))}},hl.prototype.evalSegmentOptions=function(t,e,o){var i=o.series;kr(t,{value:e,series:i,dataItem:o.dataItem,index:o.index},{defaults:i._defaults,excluded:["data","content","template","toggle","visual"]})},hl.prototype.createSegment=function(t,e){var o=j({},e.series);if(this.evalSegmentOptions(o,t,e),this.createLegendItem(t,o,e),!1!==e.visible){o=new pl(t,o,e);return Object.assign(o,e),this.append(o),this.points.push(o),o}},hl.prototype.createLabel=function(t,e){var o=e.series,i=e.dataItem,r=j({},this.options.labels,o.labels),n=t;if(r.visible){var s=W(r),i={dataItem:i,value:t,percentage:e.percentage,category:e.category,series:o};s?n=s(i):r.format&&(n=this.plotArea.chartService.format.auto(r.format,n)),r.color||(r.color=Rt(o.color),r.background||(r.background=o.color)),this.evalSegmentOptions(r,t,e);i=new Le(n,j({vAlign:r.position},r),i);return this.labels.push(i),i}},hl.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===A?e.left=Math.max(e.left,i):e.right=Math.max(e.right,i))}return e},hl.prototype.dynamicSlopeReflow=function(t,e,o){for(var i=this.options,r=this.points,n=r.length,s=r[0],a=s,p=0;p<r.length;p++)r[p].percentage>a.percentage&&(a=r[p]);for(var h=s.percentage/a.percentage*e,l=(e-h)/2,c=0,u=0;u<n;u++){var d=r[u].percentage,g=r[u+1],f=g?g.percentage:d,y=r[u].points=[],g=i.dynamicHeight?o*d:o/n,f=vt(d?(e-h*(f/d))/2:f?0:e/2,0,e);y.push(new P.geometry.Point(t.x1+l,t.y1+c)),y.push(new P.geometry.Point(t.x1+e-l,t.y1+c)),y.push(new P.geometry.Point(t.x1+e-f,t.y1+g+c)),y.push(new P.geometry.Point(t.x1+f,t.y1+g+c)),c+=g+i.segmentSpacing,h=vt(e-2*(l=f),0,e)}},hl.prototype.constantSlopeReflow=function(t,e,o){for(var i=this.options,r=this.points,n=r.length,s=i.neckRatio<=1,a=s?i.neckRatio*e:e,p=s?0:(e-e/i.neckRatio)/2,h=((s?e:e-2*p)-a)/2,l=0,c=0;c<n;c++){var u=r[c].points=[],d=r[c].percentage,g=i.dynamicHeight?h*d:h/n,d=i.dynamicHeight?o*d:o/n;u.push(new P.geometry.Point(t.x1+p,t.y1+l)),u.push(new P.geometry.Point(t.x1+e-p,t.y1+l)),u.push(new P.geometry.Point(t.x1+e-p-g,t.y1+d+l)),u.push(new P.geometry.Point(t.x1+p+g,t.y1+d+l)),p+=g,l+=d+i.segmentSpacing}},hl.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)}},hl);function hl(t,e){al.call(this,e),this.plotArea=t,this.points=[],this.labels=[],this.legendItems=[],this.render()}At(Ve,{neckRatio:.3,width:300,dynamicSlope:!1,dynamicHeight:!0,segmentSpacing:0,labels:{visible:!1,align:C,position:C,zIndex:1}}),j(Ve.prototype,Kp);var ll,cl,ul=Ve,Ue=((cl=Ys)&&(gl.__proto__=cl),((gl.prototype=Object.create(cl&&cl.prototype)).constructor=gl).prototype.render=function(){this.createFunnelChart(this.series)},gl.prototype.createFunnelChart=function(t){var e=t[0],e=new ul(this,{series:t,legend:this.options.legend,neckRatio:e.neckRatio,dynamicHeight:e.dynamicHeight,dynamicSlope:e.dynamicSlope,segmentSpacing:e.segmentSpacing,highlight:e.highlight});this.appendChart(e)},gl.prototype.appendChart=function(t,e){cl.prototype.appendChart.call(this,t,e),pt(this.options.legend.items,t.legendItems)},gl),Ne=((ll=pe)&&(dl.__proto__=ll),((dl.prototype=Object.create(ll&&ll.prototype)).constructor=dl).prototype.render=function(){this._rendered||(this._rendered=!0,this.createMarker(),this.createLabel(),this.createNote())},dl.prototype.createLabel=function(){var t,e,o,i=this.options.labels;i.visible&&(t=this.pointData(),e=W(i),o=i.color,e=e?e(t):this.formatValue(i.format),o=o||Rt(this.color),this.label=new Le(e,j({align:C,vAlign:C,margin:{left:5,right:5},zIndex:_t(i.zIndex,this.series.zIndex)},i,{color:o}),t),this.append(this.label))},dl.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},dl.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())},dl.prototype.markerBox=function(){var t=this.options.markers,e=t.border,o=this.box.toRect(),i="roundedRect"===_t(t.type,"rect"),r=_t(e.width,i?1:0),e=Math.round(r/2);return t.size&&(i=o.center(),o.size.width=o.size.height=t.size,o.origin.x=Math.round(i.x-o.size.width/2),o.origin.y=Math.round(i.y-o.size.height/2)),o.size.width-=r,o.size.height-=r,o.origin.y+=e+.5,o.origin.x+=e+.5,Be(o)},dl.prototype.markerBorder=function(){var t=this.options,e=t.markers.border,t=_t(e.opacity,t.opacity);return{color:e.color||this.color,width:e.width,opacity:t,dashType:e.dashType}},dl.prototype.createMarker=function(){var t=this.options,e=t.markers,t=new fe({type:_t(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:_t(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=t,this.append(t)},dl.prototype.createHighlight=function(t){var e=this.options,o=this.options.highlight.markers||this.options.markers,e=new fe({type:_t(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:_t(e.zIndex,this.series.zIndex)});e.reflow(this.markerBox());e=e.getElement();return e.options.fill=t.fill,e.options.stroke=t.stroke,e},dl.prototype.highlightVisual=function(){return this.rectVisual},dl.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this.rectVisual}},dl.prototype.tooltipAnchor=function(){var t=this.box.center().x,e=this.box.y1-5;return{point:new Ht(t,e),align:{horizontal:C,vertical:_}}},dl.prototype.overlapsBox=function(t){return this.box.overlaps(t)},dl.prototype.unclipElements=function(){},dl.prototype.pointData=function(){return{x:this.value.x,y:this.value.y,value:this.value.value,dataItem:this.dataItem,series:this.series}},dl);function dl(t,e){ll.call(this),this.options=e,this.color=e.color||a,this.value=t}function gl(){cl.apply(this,arguments)}j(Ne.prototype,Or),j(Ne.prototype,oo),Ne.prototype.defaults={markers:{type:"rect",borderRadius:4,border:{color:"transparent"}},padding:{top:1},labels:{visible:!1,padding:3},opacity:1,notes:{label:{}}};var fl,yl=Ne,Qe=((fl=pe)&&(vl.__proto__=fl),((vl.prototype=Object.create(fl&&fl.prototype)).constructor=vl).prototype._initFields=function(){this.points=[],this.seriesOptions=[],this.valueRange={min:l,max:c},this._evalSeries=[]},vl.prototype.render=function(){this.setRange(),this.traverseDataPoints(this.addValue.bind(this))},vl.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;this.valueRange.min=Math.min(this.valueRange.min,r.value),this.valueRange.max=Math.max(this.valueRange.max,r.value)}},vl.prototype.addValue=function(t,e){var o;t&&(o=this.createPoint(t,e))&&Object.assign(o,e),this.points.push(o)},vl.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];lt(s)||(this._evalSeries[r]=s=kr(t,{},n,!0));r=t;return s&&kr(r=j({},t),{value:e,series:i,dataItem:o.dataItem,min:this.valueRange.min,max:this.valueRange.max},n),r},vl.prototype.pointType=function(){return yl},vl.prototype.pointOptions=function(t,e){var o,i=this.seriesOptions[e];return i||(o=this.pointType().prototype.defaults,this.seriesOptions[e]=i=j({},o,{markers:{opacity:t.opacity},tooltip:{format:this.options.tooltip.format},labels:{format:this.options.labels.format}},t)),i},vl.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),r=I(o.color)?i.color:function(t,e){void 0===e&&(e=.05);var i=Object(P.parseColor)(t),r=1-e;return function(t){var e=i.toHSL(),o=100-e.l;return e.l+=Math.min((r-t)*o,o),e.toCss()}}(r)(t.value/this.valueRange.max),i=new yl(t,i);return i.color=r,this.append(i),i},vl.prototype.seriesAxes=function(t){var e=t.xAxis,o=t.yAxis,i=this.plotArea,t=e?i.namedXAxes[e]:i.axisX,i=o?i.namedYAxes[o]:i.axisY;if(!t)throw new Error("Unable to locate X axis with name "+e);if(!i)throw new Error("Unable to locate Y axis with name "+o);return{xAxis:t,yAxis:i}},vl.prototype.reflow=function(t){var n=this,s=this.points,a=!this.options.clip,p=0;this.traverseDataPoints(function(t,e){var o=s[p++],i=n.seriesAxes(e.series),r=i.xAxis,e=i.yAxis,i=r.categoryIndex(t.x),t=e.categoryIndex(t.y),i=r.getSlot(i,i,a),t=e.getSlot(t,t,a);o&&(i&&t?(t=n.pointSlot(i,t),o.reflow(t)):o.visible=!1)}),this.box=t},vl.prototype.pointSlot=function(t,e){return new Wt(t.x1,e.y1,t.x2,e.y2)},vl.prototype.traverseDataPoints=function(t){for(var e=this.options.series,o=0;o<e.length;o++)for(var i=e[o],r=this.seriesAxes(i),n=r.xAxis,s=r.yAxis,a=n.currentRangeIndices(),p=s.currentRangeIndices(),h=0;h<i.data.length;h++){var l=this._bindPoint(i,o,h),c=l.valueFields,u=l.fields,d=n.totalIndex(c.x),l=s.totalIndex(c.y),d=a.min<=d&&d<=a.max,l=p.min<=l&&l<=p.max;d&&l&&t(c,j({pointIx:h,series:i,seriesIx:o,dataItem:i.data[h],owner:this},u))}},vl.prototype.formatPointValue=function(t,e){t=t.value;return this.chartService.format.auto(e,t.x,t.y,t.value)},vl.prototype.animationPoints=function(){for(var t=this.points,e=[],o=0;o<t.length;o++)e.push((t[o]||{}).marker);return e},vl);function vl(t,e){fl.call(this,e),this.plotArea=t,this.chartService=t.chartService,this._initFields(),this.render()}At(Qe,{series:[],tooltip:{format:"{0}, {1}: {2}"},labels:{format:"{2}"},clip:!0}),j(Qe.prototype,{_bindPoint:Rr.prototype._bindPoint});var ml,xl=Qe,lo=((ml=Ys)&&(wl.__proto__=ml),((wl.prototype=Object.create(ml&&ml.prototype)).constructor=wl).prototype.initFields=function(){this.namedXAxes={},this.namedYAxes={}},wl.prototype.render=function(t){void 0===t&&(t=this.panes),this.bindCategories(),this.createAxes(t),this.createCharts(t),this.createAxisLabels()},wl.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=Dt(n.categories||[]),a=Dt(r.categories||[]),p=0;p<i.length;p++){var h=or.current.bindPoint(o,p).valueFields,l=h.x,h=h.y;s.has(l)||s.add(l),a.has(h)||a.add(h)}n.categories=s.values(),r.categories=a.values()}},wl.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"]||[];this.addToLegend(r);r=this.filterVisibleSeries(r);r&&this.createHeatmapChart(Vs(r,["heatmap"]),i)}},wl.prototype.createHeatmapChart=function(t,e){t=new xl(this,{series:t});this.appendChart(t,e)},wl.prototype.seriesPaneName=function(t){var e=this.options,o=t.xAxis,i=Q([].concat(e.xAxis),function(t){return t.name===o})[0],r=t.yAxis,t=Q([].concat(e.yAxis),function(t){return t.name===r})[0],e=(e.panes||[{}])[0].name||"default";return(i||{}).pane||(t||{}).pane||e},wl.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,e=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(!e)throw new Error("Unable to locate Y axis with name "+r);return{xAxis:o,yAxis:e}},wl.prototype.createAxisLabels=function(){for(var t=this.axes,e=0;e<t.length;e++)t[e].createLabels()},wl.prototype.createXYAxis=function(t,e,o){for(var i,r=t.name,n=e?this.namedYAxes:this.namedXAxes,s=Object.assign({axisCrossingValue:0},t,{vertical:e,reverse:e||this.chartService.rtl?!t.reverse:t.reverse,justified:!1}),t=s.categories?s.categories[0]:null,a=[s.min,s.max,t],p=this.series,h=0;h<p.length;h++){var l=p[h],c=l[e?"yAxis":"xAxis"];if(c===s.name||0===o&&!c){l=or.current.bindPoint(l,0).valueFields;a.push(l[e?"y":"x"]);break}}for(var u=0;u<a.length;u++)if(a[u]instanceof Date){i=!0;break}t=new(Ls(s.type,y)||!s.type&&i?ni:Qo)(s,this.chartService);if(t.axisIndex=o,r){if(n[r])throw new Error((e?"Y":"X")+" axis with name "+r+" is already defined");n[r]=t}return this.appendAxis(t),t.mapCategories(),t},wl.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++)J(this.findPane(o[s].pane),t)&&i.push(this.createXYAxis(o[s],!1,s));for(var a=0;a<r.length;a++)J(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]},wl.prototype.removeAxis=function(t){var e=t.options.name;ml.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},wl.prototype._dispatchEvent=function(t,e,o){for(var i=t._eventCoordinates(e),r=new Ht(i.x,i.y),n=this.axes,s=n.length,a=[],p=[],h=0;h<s;h++){var l=n[h];Rs(l.options.vertical?p:a,l.getCategory(r))}0<a.length&&0<p.length&&t.trigger(o,{element:gt(e),originalEvent:e,x:zs(a),y:zs(p)})},wl.prototype.updateAxisOptions=function(t,e){var o=t.options.vertical,i=this.groupAxes(this.panes),t=(o?i.y:i.x).indexOf(t);bl(this.options,t,o,e),bl(this.originalOptions,t,o,e)},wl.prototype.crosshairOptions=function(t){return Object.assign({},t.options.crosshair,{zIndex:0})},wl);function wl(){ml.apply(this,arguments)}function bl(t,e,o,i){j([].concat(o?t.yAxis:t.xAxis)[e],i)}At(lo,{xAxis:{},yAxis:{}}),j(lo.prototype,Qs);at=lo,Pe="color",ne="first",me="max";vp.current.register(Ga,[hr,lr,cr,dr,"area","verticalArea","candlestick","ohlc","bullet","verticalBullet","boxPlot","verticalBoxPlot","rangeColumn","rangeBar","waterfall","horizontalWaterfall","rangeArea","verticalRangeArea"]),vp.current.register(Wp,["scatter","scatterLine","bubble"]),vp.current.register(ih,[ur]),vp.current.register(dh,["donut"]),vp.current.register(Ue,["funnel"]),vp.current.register(Jt,["polarArea","polarLine","polarScatter"]),vp.current.register(he,["radarArea","radarColumn","radarLine"]),vp.current.register(at,["heatmap"]),or.current.register([hr,lr,cr,dr,"area","verticalArea"],[h],["category",Pe,"noteText","errorLow","errorHigh"]),or.current.register(["rangeColumn","rangeBar","rangeArea","verticalRangeArea"],["from","to"],["category",Pe,"noteText"]),or.current.register(["waterfall","horizontalWaterfall"],[h],["category",Pe,"noteText","summary"]),or.current.register(["polarArea","polarLine","polarScatter"],[v,m],[Pe]),or.current.register(["radarArea","radarColumn","radarLine"],[h],[Pe]),or.current.register(["funnel"],[h],["category",Pe,"visibleInLegend","visible"]),oa.current.register([hr,lr,cr,dr,"area","verticalArea","waterfall","horizontalWaterfall"],{value:me,color:ne,noteText:ne,errorLow:"min",errorHigh:me}),oa.current.register(["rangeColumn","rangeBar","rangeArea","verticalRangeArea"],{from:"min",to:me,color:ne,noteText:ne}),oa.current.register(["radarArea","radarColumn","radarLine"],{value:me,color:ne}),or.current.register(["scatter","scatterLine","bubble"],[v,m],[Pe,"noteText","xErrorLow","xErrorHigh","yErrorLow","yErrorHigh"]),or.current.register(["bubble"],[v,m,"size"],[Pe,"category","noteText"]),or.current.register(["heatmap"],[v,m,h],[Pe,"noteText"]),or.current.register(["candlestick","ohlc"],["open","high","low","close"],["category",Pe,"downColor","noteText"]),oa.current.register(["candlestick","ohlc"],{open:me,high:me,low:"min",close:me,color:ne,downColor:ne,noteText:ne}),or.current.register(["boxPlot","verticalBoxPlot"],["lower","q1","median","q3","upper","mean","outliers"],["category",Pe,"noteText"]),oa.current.register(["boxPlot","verticalBoxPlot"],{lower:me,q1:me,median:me,q3:me,upper:me,mean:me,outliers:ne,color:ne,noteText:ne}),or.current.register(["bullet","verticalBullet"],["current","target"],["category",Pe,"visibleInLegend","noteText"]),oa.current.register(["bullet","verticalBullet"],{current:me,target:me,color:ne,noteText:ne}),or.current.register([ur,"donut"],[h],["category",Pe,"explode","visibleInLegend","visible"]);var _l,Cl=["category",h,v,m],jt=((_l=P.Class)&&(Al.__proto__=_l),((Al.prototype=Object.create(_l&&_l.prototype)).constructor=Al).prototype._initElement=function(t){for(this._setElementClass(t),t.style.position="relative";t.firstChild;)t.removeChild(t.firstChild);this.element=t},Al.prototype._setElementClass=function(t){p(t,"k-chart")},Al.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,function(t){for(var e=Cl,o=0;o<e.length;o++){var i=e[o]+"Axes";t[i]&&(t[e[o]+"Axis"]=t[i],delete t[i])}}(t),this.applyDefaults(t,e),null===t.seriesColors&&delete t.seriesColors,this.options=j({},e,t),this.applySeriesColors()},Al.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)}},Al.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&&kt(this._selections,function(t){return!t.visible})&&(this._destroySelections(),this._setupSelection())},Al.prototype._resize=function(){this._noTransitionsRedraw()},Al.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()},Al.prototype.getAxis=function(t){return Fi(t,this._plotArea.axes)},Al.prototype.findAxisByName=function(t){return this.getAxis(t)},Al.prototype.findPaneByName=function(t){for(var e=this._plotArea.panes,o=0;o<e.length;o++)if(e[o].options.name===t)return new Wi(e[o])},Al.prototype.findPaneByIndex=function(t){var e=this._plotArea.panes;if(e[t])return new Wi(e[t])},Al.prototype.plotArea=function(){return new Xi(this._plotArea)},Al.prototype.toggleHighlight=function(t,e){var o,i=this._plotArea,r=(i.srcSeries||i.series||[])[0],n=I(e)?i.filterPoints(e):(D(e)?(n=e.series,o=e.category):n=o=e,"donut"===r.type?Sl(i.pointsBySeriesName(n),o):r.type===ur||"funnel"===r.type?Sl((i.charts[0]||{}).points,o):i.pointsBySeriesName(n));n&&this.togglePointsHighlight(t,n)},Al.prototype.togglePointsHighlight=function(t,e){for(var o=this._highlight,i=0;i<e.length;i++)o.togglePointHighlight(e[i],t)},Al.prototype.showTooltip=function(t){var e,o,i=this._sharedTooltip(),r=this._tooltip,n=this._plotArea;I(t)?(e=n.findPoint(t))&&i&&(o=e.categoryIx):i&<(t)&&(o=n.categoryAxis.categoryIndex(t)),i?0<=o&&(o=this._plotArea.pointsByCategoryIndex(o),r.showAt(o)):e&&r.show(e)},Al.prototype.hideTooltip=function(){this._tooltip.hide()},Al.prototype._initSurface=function(){var t=this.surface,e=this._surfaceWrap(),o=this.options.chartArea||{};o.width&&dt(e,{width:o.width}),o.height&&dt(e,{height:o.height}),t&&t.options.type===this.options.renderAs?(this.surface.clear(),this.surface.resize()):(this._destroySurface(),this.surface=P.drawing.Surface.create(e,{type:this.options.renderAs}),this.surface.bind("mouseenter",this._surfaceMouseenterHandler),this.surface.bind("mouseleave",this._surfaceMouseleaveHandler))},Al.prototype._surfaceWrap=function(){return this.element},Al.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 Xa,this._setupSelection(),this._createPannable(),this._createZoomSelection(),this._createMousewheelZoom(),this.trigger("render"),Bl(this._plotArea.panes),this._navState||this._cancelDomEvents()},Al.prototype.exportVisual=function(t){var e,o;return t&&(t.width||t.height||t.options)?(e=this.options,o=j({},t.options,{chartArea:{width:t.width,height:t.height}}),Tl(this._originalOptions,o),this.options=j({},this._originalOptions,o),this._initTheme(this.options,this._theme),this.bindCategories(),(o=this._getModel()).renderVisual(),Bl(o._plotArea.panes),o=o.visual,this.options=e):o=this.surface.exportVisual(),o},Al.prototype._sharedTooltip=function(){return this._plotArea instanceof Ga&&this.options.tooltip&&this.options.tooltip.shared},Al.prototype._createPannable=function(){var t=this.options;!1!==t.pannable&&(this._pannable=new Ja(this._plotArea,t.pannable))},Al.prototype._createZoomSelection=function(){var t=this.options.zoomable,e=(t||{}).selection;!1!==t&&!1!==e&&(this._zoomSelection=new np(this,e))},Al.prototype._createMousewheelZoom=function(){var t=this.options.zoomable,e=(t||{}).mousewheel;!1!==t&&!1!==e&&(this._mousewheelZoom=new sp(this,e))},Al.prototype._toggleDragZoomEvents=function(){var t=this.options.pannable,e=this.options.zoomable,o=(e||{}).selection,i=(e||{}).mousewheel,o=!(t||!1!==e&&!1!==o||this.requiresHandlers(["dragStart",fr,yr])),e=(!1===e||!1===i)&&!this.requiresHandlers(["zoomStart",vr,mr]),i=this.element;this._dragZoomEnabled&&o&&e?(i.style.touchAction=this._touchAction||"",this._dragZoomEnabled=!1):this._dragZoomEnabled||o&&e||(i.style.touchAction="none",this._dragZoomEnabled=!0),this._toggleDomEvents(!o,!e)},Al.prototype._toggleDomEvents=function(t,e){var o=this.domEvents;o&&(o.toggleDrag&&o.toggleDrag(t),o.toggleZoom&&o.toggleZoom(e))},Al.prototype._createTooltip=function(){var t=this.options.tooltip;return this._sharedTooltip()?this._createSharedTooltip(t):new Sp(this.chartService,t)},Al.prototype._createSharedTooltip=function(t){return new Tp(this._plotArea,t)},Al.prototype.applyDefaults=function(t,a){!function(t){var o,i,e,r=(a||{}).axisDefaults||{};function n(t){var e=(t||{}).color||i.color,t=j({},r,r[o],i,i[o],{line:{color:e},labels:{color:e},title:{color:e}},t);return delete t[o],t}for(var s=0;s<Cl.length;s++)i=t.axisDefaults||{},e=(e=[].concat(t[o=Cl[s]+"Axis"])).map(n),t[o]=1<e.length?e:e[0]}(t),function(t,e){var o=t.series,i=o.length,r=t.seriesDefaults,n=j({},t.seriesDefaults),s=e?j({},e.seriesDefaults):{},a=j({},s);kl(n),kl(a);for(var p=0;p<i;p++){var h=o[p].type||t.seriesDefaults.type,h=j({data:[]},a,s[h],{tooltip:t.tooltip},n,r[h]);o[p]._defaults=h,o[p]=j({},h,o[p]),o[p].data=o[p].data||[]}}(t,a)},Al.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)}},Al.prototype._getModel=function(){var t=this.options,e=this._createPlotArea(),o=new be(this._modelOptions());return o.chart=this,o._plotArea=e,Ee.buildTitle(t.title,o),t.legend&&t.legend.visible&&o.append(new fp(e.options.legend,this.chartService)),o.append(e),o.reflow(),o},Al.prototype._modelOptions=function(){var t=this.options,e=this.getSize();return j({transitions:t.transitions,width:e.width||600,height:e.height||400},t.chartArea)},Al.prototype._createPlotArea=function(t){var e=this.options;return vp.current.create(t?[]:e.series,e,this.chartService)},Al.prototype._setupSelection=function(){for(var t=this._plotArea.axes,e=this._selections=[],o=0;o<t.length;o++){var i,r=t[o],n=r.options;r instanceof Qo&&n.select&&!n.vertical&&(i=r.range(),n=new Ap(this,r,j({min:i.min,max:i.max},n.select)),e.push(n))}},Al.prototype._selectStart=function(t){return this.trigger("selectStart",t)},Al.prototype._select=function(t){return this.trigger("select",t)},Al.prototype._selectEnd=function(t){return this.trigger("selectEnd",t)},Al.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(P.throttle)(this._mousemove.bind(this),20)},Al.prototype.addObserver=function(t){t&&this.observers.push(t)},Al.prototype.removeObserver=function(t){t=this.observers.indexOf(t);0<=t&&this.observers.splice(t,1)},Al.prototype.requiresHandlers=function(t){for(var e=this.observers,o=0;o<e.length;o++)if(e[o].requiresHandlers(t))return!0},Al.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},Al.prototype._attachEvents=function(){var t,e=this.element;this._touchAction=e.style.touchAction,ht(e,((t={}).contextmenu=this._clickHandler,t[xr]=this._mousewheelHandler,t.mouseleave=this._mouseleaveHandler,t)),this._shouldAttachMouseMove()&&ht(e,((e={}).mousemove=this._mousemove,e)),this.domEvents=so.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()},Al.prototype._mouseleave=function(t){this._hoveredPoint&&(this._hoveredPoint.out(this,t),this._hoveredPoint=null),this._plotArea.hovered&&(this.trigger("plotAreaLeave"),this._plotArea.hovered=!1)},Al.prototype._cancelDomEvents=function(){this.domEvents&&this.domEvents.cancel&&this.domEvents.cancel()},Al.prototype._gesturestart=function(t){this._mousewheelZoom&&!this._stopChartHandlers(t)&&(this._gestureDistance=t.distance,this._unsetActivePoint(),this.surface.suspendTracking())},Al.prototype._gestureend=function(t){this._zooming&&!this._stopChartHandlers(t)&&(this.surface&&this.surface.resumeTracking(),this._zooming=!1,this.trigger(mr,{}))},Al.prototype._gesturechange=function(t){var e,o,i=this._mousewheelZoom;i&&!this._stopChartHandlers(t)&&(t.preventDefault(),o=this._gestureDistance,e=-t.distance/o+1,.1<=Math.abs(e)&&(e=Math.round(10*e),this._gestureDistance=t.distance,o={delta:e,axisRanges:Pl(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(vr,o)&&i.zoom())))},Al.prototype._mouseout=function(t){var e;!t.element||(e=this._drawingChartElement(t.element,t))&&e.leave&&e.leave(this,t.originalEvent)},Al.prototype._start=function(t){var e=this._eventCoordinates(t);!this._stopChartHandlers(t)&&this._plotArea.backgroundContainsPoint(e)&&(this.requiresHandlers(["dragStart",fr,yr])&&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:Pl(this._plotArea.axes),originalEvent:t}))},Al.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(fr,{axisRanges:i,originalEvent:t})&&o.pan()}else if(e){for(var r={},n=e.axes,s=0;s<n.length;s++){var a,p=n[s];!p.options.name||0!=(a=(a=p.options.vertical?t.y:t.x).startLocation-a.location)&&(r[p.options.name]=p.translateRange(a))}e.axisRanges=r,this.trigger(fr,{axisRanges:r,originalEvent:t})}this._zoomSelection&&this._zoomSelection.move(t)}},Al.prototype._end=function(t){var e,o;this._stopChartHandlers(t)||((e=this._pannable)&&e.end(t)?(this.surface.resumeTracking(),this.trigger(yr,{axisRanges:Pl(this._plotArea.axes),originalEvent:t}),this._suppressHover=!1,this.chartService.panning=!1):this._endNavigation(t,yr),this._zoomSelection&&(o=this._zoomSelection.end(t))&&!this.trigger(vr,{axisRanges:o,originalEvent:t})&&(this._zoomSelection.zoom(),this.trigger(mr,{axisRanges:o,originalEvent:t})))},Al.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},Al.prototype._mousewheelZoomRate=function(){var t=(this.options.zoomable||{}).mousewheel||{};return _t(t.rate,.3)},Al.prototype._mousewheel=function(t){var e=this,o=nt(t),i=this._mousewheelZoom,r=this._eventCoordinates(t);if(!this._stopChartHandlers(t)&&this._plotArea.backgroundContainsPoint(r))if(i){var n={delta:o,axisRanges:Pl(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(vr,n)&&i.zoom(),this._mwTimeout=setTimeout(function(){e.trigger(mr,n),e._zooming=!1,e.surface&&e.surface.resumeTracking()},150))}else{i=this._navState;if(i=!i&&!this._startNavigation(t,r,"zoomStart")?this._navState:i){var s=i.totalDelta||o;i.totalDelta=s+o;for(var a=this._navState.axes,p={},h=0;h<a.length;h++){var l=a[h],c=l.options.name;c&&(p[c]=l.scaleRange(-s*this._mousewheelZoomRate(),r))}this.trigger(vr,{delta:o,axisRanges:p,originalEvent:t}),this._mwTimeout&&clearTimeout(this._mwTimeout),this._mwTimeout=setTimeout(function(){e._endNavigation(t,mr)},150)}}},Al.prototype._startNavigation=function(t,e,o){var i=this._model._plotArea,r=i.findPointPane(e),e=i.axes.slice(0);r&&(i=Pl(e),this.trigger(o,{axisRanges:i,originalEvent:t})?this._cancelDomEvents():(this._suppressHover=!0,this._unsetActivePoint(),this._navState={axisRanges:i,pane:r,axes:e}))},Al.prototype._endNavigation=function(t,e){this._navState&&(this.trigger(e,{axisRanges:this._navState.axisRanges,originalEvent:t}),this._suppressHover=!1,this._navState=null)},Al.prototype._getChartElement=function(t,e){var o=this.surface.eventTarget(t);if(o)return this._drawingChartElement(o,t,e)},Al.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},Al.prototype._eventCoordinates=function(t){t=ft(t);return this._toModelCoordinates(t.x,t.y)},Al.prototype._elementPadding=function(){var t,e;return this._padding||(t=(e=U(this.element,["paddingLeft","paddingTop"])).paddingLeft,e=e.paddingTop,this._padding={top:e,left:t}),this._padding},Al.prototype._toDocumentCoordinates=function(t){var e=this._elementPadding(),o=ut(this.element);return{left:wt(t.x+e.left+o.left),top:wt(t.y+e.top+o.top)}},Al.prototype._toModelCoordinates=function(t,e){var o=this.element,i=ut(o),r=this._elementPadding(),o=Bt(o).invert(),o=new P.geometry.Point(t-i.left-r.left,e-i.top-r.top).transform(o);return new Ht(o.x,o.y)},Al.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)},Al.prototype._click=function(t){var e=this._getChartElement(t);this._propagateClick(e,t)},Al.prototype._propagateClick=function(t,e){for(var o=t;o;)o.click&&o.click(this,e),o=o.parent},Al.prototype._startHover=function(t,e){if(this._suppressHover)return!1;var o=this._drawingChartElement(t,e,function(t){return(t.hover||t.over)&&!(t instanceof Ys)}),i=this._activePoint,r=1<this._plotArea.series.length,t=this._hasInactiveOpacity();return this._updateHoveredPoint(o,e),o&&i!==o&&o.hover?(this._activePoint=o,this._sharedTooltip()||o.hover(this,e)||(this._displayTooltip(o),t?this._displayInactiveOpacity(o,r):this._highlight.show(o))):!o&&t&&(r&&this._activeChartInstance&&(this._updateSeriesOpacity(o,!0),this._applySeriesOpacity(this._activeChartInstance.children,null,!0),this._activeChartInstance=null),this._highlight&&this._highlight.hide(),this._activePoint=null),o},Al.prototype._displayTooltip=function(t){j({},this.options.tooltip,t.options.tooltip).visible&&this._tooltip.show(t)},Al.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()?(i=this._getInactivePoints(t,i))&&i.length&&this._highlight.show(i,1-this._getInactiveOpacityForSeries(t.series)):this._highlight.show(t))},Al.prototype._getInactivePoints=function(e,t){return this._getAllPointsOfType(t,e.constructor).filter(function(t){return t!==e})},Al.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},Al.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)},Al.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))}},Al.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)}},Al.prototype._chartInstanceFromPoint=function(t){for(var e=t.parent;e&&!e.plotArea;)e=e.parent;return e},Al.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},Al.prototype._getInactiveOpacityForSeries=function(t){var e=this.options.seriesDefaults.highlight.inactiveOpacity;return t.highlight.inactiveOpacity||e||t.opacity||1},Al.prototype._getDefaultOpacityForSeries=function(t){return t.defaultOpacity||t.opacity||1},Al.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),ht(document,((t={}).mousemove=this._mouseMoveTrackHandler,t)))},Al.prototype._mouseMoveTracking=function(t){var e,o=this.options,i=this._tooltip,r=this._highlight,n=this._activePoint,s=this._eventCoordinates(t);this._plotArea.box.containsPoint(s)?n&&n.tooltipTracking&&n.series&&n.parent.getNearestPoint&&((e=n.parent.getNearestPoint(s.x,s.y,n.seriesIx))&&e!==n&&((this._activePoint=e).hover(this,t)||(j({},o.tooltip,e.options.tooltip).visible&&i.show(e),r.show(e)))):(bt(document,((e={}).mousemove=this._mouseMoveTrackHandler,e)),this._unsetActivePoint(),this._mouseMoveTrackHandler=null)},Al.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)},Al.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()}},Al.prototype._trackSharedTooltip=function(t,e,o){var i,r,n,s,a,p,h;this._suppressHover||(i=this.options.tooltip,h=this._plotArea,p=this._plotArea.categoryAxis,r=this._tooltip,n=this._highlight,h.backgroundContainsPoint(t)?(s=p.pointCategoryIndex(t))!==this._tooltipCategoryIx||!this._sharedHighlight&&o?((h=(p=(a=h.pointsByCategoryIndex(s)).map(function(t){return t.eventArgs(e)}))[0]||{}).categoryPoints=p,0<a.length&&!this.trigger("seriesHover",h)?(i.visible&&r.showAt(a,t),n.show(a),this._sharedHighlight=!0):r.hide(),this._tooltipCategoryIx=s):o&&this._sharedHighlight&&(n.hide(),r.hide(),this._sharedHighlight=!1):this._sharedHighlight&&(n.hide(),r.hide(),this._tooltipCategoryIx=null,this._sharedHighlight=!1))},Al.prototype.hideElements=function(t){var e=this._plotArea;this._mousemove.cancel(),e.hideCrosshairs(),this._unsetActivePoint(t)},Al.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()},Al.prototype._deferRedraw=function(){this._redraw()},Al.prototype._clearRedrawTimeout=function(){this._redrawTimeout&&(clearInterval(this._redrawTimeout),this._redrawTimeout=null)},Al.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)}},Al.prototype.bindCategoryAxisFromSeries=function(t,e){for(var o,i,r=this.options.series,n=r.length,s=new $,a=[],p=!1,h=0;h<n;h++){var l=r[h],c=l.categoryAxis===t.name||!l.categoryAxis&&0===e,u=l.data,d=u.length,c=l.categoryField&&c,p=c||p;if(c&&0<d)for(var g=(o=Ds(t,Ki(l.categoryField,u[0])))?js:Ki,f=0;f<d;f++){var y=u[f],v=g(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=Do);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?Do:t),o=e.length,i=0<o?[e[0]]:[],r=1;r<o;r++)0!==t(e[r],yt(i))&&i.push(e[r]);return i}(function(t,e){return Do(t[0],e[0])}):a),t.categories=i[0]):p&&(t.categories=[])},Al.prototype._isBindable=function(t){for(var e=or.current.valueFields(t),o=!0,i=0;i<e.length;i++){var r=e[i];if(r===h?r="field":r+="Field",!lt(t[r])){o=!1;break}}return o},Al.prototype._noTransitionsRedraw=function(){var t,e=this.options;!1!==e.transitions&&(t=!(e.transitions=!1)),this._redraw(),t&&(e.transitions=!0)},Al.prototype._legendItemHover=function(e,o){var t=this._plotArea,i=this._highlight,r=(t.srcSeries||t.series)[e],n=J(r.type,[ur,"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)},Al.prototype._shouldAttachMouseMove=function(){return this._plotArea.crosshairs.length||this._tooltip&&this._sharedTooltip()||this.requiresHandlers(["plotAreaHover","plotAreaLeave"])},Al.prototype.updateMouseMoveHandler=function(){var t;bt(this.element,((t={}).mousemove=this._mousemove,t)),this._shouldAttachMouseMove()&&ht(this.element,((t={}).mousemove=this._mousemove,t))},Al.prototype.applyOptions=function(t,e){Tl(this._originalOptions,t),this._originalOptions=j(this._originalOptions,t),this.options=j({},this._originalOptions),e&&(this._theme=e,this.chartService.theme=e),this._initTheme(this.options,this._theme),this._toggleDragZoomEvents()},Al.prototype.setOptions=function(t,e){this.applyOptions(t,e),this.bindCategories(),this.redraw(),this.updateMouseMoveHandler()},Al.prototype.setDirection=function(t){this.chartService.rtl=Boolean(t),this.surface&&"svg"===this.surface.type&&this._destroySurface()},Al.prototype.setIntlService=function(t){this.chartService.intl=t},Al.prototype.noTransitionsRedraw=function(){this._noTransitionsRedraw()},Al.prototype.destroy=function(){var t;this._destroyed=!0,bt(this.element,((t={}).contextmenu=this._clickHandler,t[xr]=this._mousewheelHandler,t.mousemove=this._mousemove,t.mouseleave=this._mouseleaveHandler,t)),this.domEvents&&(this.domEvents.destroy(),delete this.domEvents),this._mouseMoveTrackHandler&&bt(document,((t={}).mousemove=this._mouseMoveTrackHandler,t)),this._destroyView(),this._destroySurface(),this._clearRedrawTimeout()},Al.prototype._destroySurface=function(){var t=this.surface;t&&(t.unbind("mouseenter",this._surfaceMouseenterHandler),t.unbind("mouseleave",this._surfaceMouseleaveHandler),t.destroy(),this.surface=null)},Al.prototype._destroySelections=function(){var t=this._selections;if(t)for(;0<t.length;)t.shift().destroy()},Al.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)},Al);function Al(t,e,o,i){var r=this;void 0===i&&(i={}),_l.call(this),this.observers=[],this.addObserver(i.observer),this.chartService=new no(this,i),this.chartService.theme=o,this._initElement(t);t=j({},this.options,e);this._originalOptions=j({},t),this._theme=o,this._initTheme(t,o),this._initHandlers(),this._initSurface(),this.bindCategories(),Ct.preloadFonts(e,function(){r.fontLoaded=!0,r._destroyed||(r.trigger("init"),r._redraw(),r._attachEvents())})}function Sl(t,e){if(t)for(var o=0;o<t.length;o++)if(t[o].category===e)return[t[o]]}function kl(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 Pl(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 Ml=["data","categories"];function Tl(t,e){for(var o in e){var i,r,n;!J(o,Ml)&&e.hasOwnProperty(o)&&(i=e[o],r=t[o],lt(r)&&((n=null===i)||!lt(i)?(delete t[o],n&&delete e[o]):r&&D(i)&&D(r)&&Tl(r,i)))}}function Bl(t){for(var e=0;e<t.length;e++)t[e].notifyRender()}At(jt,{renderAs:"",chartArea:{},legend:{visible:!0,labels:{}},categoryAxis:{},seriesDefaults:{type:lr,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 Rl,Ol=jt,Il=((Rl=Tp)&&(Vl.__proto__=Rl),((Vl.prototype=Object.create(Rl&&Rl.prototype)).constructor=Vl).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 Ht(this.plotArea.box.x2,e.center().y):new Ht(e.center().x,-2),align:i}},Vl.prototype._defaultAnchor=function(t,e){return this._slotAnchor({},e)},Vl),Ll=[hr,"bullet"];function Vl(){Rl.apply(this,arguments)}function jl(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 Dl(t,e){for(var o=0;o<t.length;o++)t[o].style.display=e[o]}function zl(t){return B(t)?[t]:t}var El,de=((El=Ol)&&(Ul.__proto__=El),((Ul.prototype=Object.create(El&&El.prototype)).constructor=Ul).prototype._setElementClass=function(t){p(t,"k-sparkline")},Ul.prototype._initElement=function(t){El.prototype._initElement.call(this,t),this._initialWidth=Math.floor(dt(t).width)},Ul.prototype._resize=function(){var t=this.element,e=jl(t.childNodes);this._initialWidth=Math.floor(dt(t).width),Dl(t.childNodes,e),El.prototype._resize.call(this)},Ul.prototype._modelOptions=function(){var t=this.options,e=this._surfaceWrap(),o=jl(e.childNodes),i=document.createElement("span");i.innerHTML=" ",e.appendChild(i);t=j({width:this._autoWidth,height:dt(e).height,transitions:t.transitions},t.chartArea,{inline:!0,align:!1});return dt(e,{width:t.width,height:t.height}),e.removeChild(i),Dl(e.childNodes,o),this.surface&&this.surface.resize(),t},Ul.prototype._surfaceWrap=function(){var t;return this.stage||(t=this.stage=document.createElement("span"),this.element.appendChild(t)),this.stage},Ul.prototype._createPlotArea=function(t){t=El.prototype._createPlotArea.call(this,t);return this._autoWidth=this._initialWidth||this._calculateWidth(t),t},Ul.prototype._calculateWidth=function(t){for(var e=this.options,o=H(e.chartArea.margin),i=t.charts,r=this._surfaceWrap(),n=0,s=0;s<i.length;s++){var a=i[s],p=(a.options.series||[])[0];if(p){if(p.type===hr)return 150;if("bullet"===p.type)return 150;if(p.type===ur)return dt(r).height;var h=a.categoryAxis;h&&(a=h.categoriesCount()*(!a.options.isStacked&&J(p.type,[lr,"verticalBullet"])?a.seriesOptions.length:1),n=Math.max(n,a))}}e=n*e.pointWidth;return 0<e&&(e+=o.left+o.right),e},Ul.prototype._createSharedTooltip=function(t){return new Il(this._plotArea,t)},Ul.normalizeOptions=function(t){t=zl(t);return(t=x(t)?{seriesDefaults:{data:t}}:j({},t)).series||(t.series=[{data:zl(t.data)}]),j(t,{seriesDefaults:{type:t.type}}),t=J(t.series[0].type,Ll)||J(t.seriesDefaults.type,Ll)?j({},{categoryAxis:{crosshair:{visible:!1}}},t):t},Ul);function Ul(){El.apply(this,arguments)}At(de,{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 Hl,Fl=de,Gl=((Hl=P.drawing.Animation)&&(Nl.__proto__=Hl),((Nl.prototype=Object.create(Hl&&Hl.prototype)).constructor=Nl).prototype.setup=function(){this._initialOpacity=parseFloat(U(this.element,"opacity").opacity)},Nl.prototype.step=function(t){U(this.element,{opacity:String(tt(this._initialOpacity,0,t))})},Nl.prototype.abort=function(){Hl.prototype.abort.call(this),U(this.element,{display:"none",opacity:String(this._initialOpacity)})},Nl.prototype.cancel=function(){Hl.prototype.abort.call(this),U(this.element,{opacity:String(this._initialOpacity)})},Nl);function Nl(){Hl.apply(this,arguments)}function Wl(t,e){var o=document.createElement("div");return o.className=t,e&&(o.style.cssText=e),o}var Xl,Je=((Xl=P.Class)&&(ql.__proto__=Xl),((ql.prototype=Object.create(Xl&&Xl.prototype)).constructor=ql).prototype.createElements=function(){var t=this.element=Wl("k-navigator-hint","display: none; position: absolute; top: 1px; left: 1px;"),e=this.tooltip=Wl("k-tooltip k-chart-tooltip"),o=this.scroll=Wl("k-scroll");e.innerHTML=" ",t.appendChild(e),t.appendChild(o)},ql.prototype.show=function(t,e,o){var i=this.element,r=this.options,n=this.scroll,s=this.tooltip,a=Oo(Eo(t)+Eo(e-t)/2),p=.4*o.width(),h=o.center().x-p,l=(o.center().x-h)/(r.max-r.min),c=a-r.min,a=this.chartService.intl.format(r.format,t,e),r=W(r);this.clearHideTimeout(),this._visible||(U(i,{visibility:"hidden",display:"block"}),this._visible=!0),r&&(a=r({from:t,to:e})),s.innerHTML=a,U(s,{left:o.center().x-s.offsetWidth/2,top:o.y1});s=U(s,["marginTop","borderTopWidth","height"]);U(n,{width:p,left:h+c*l,top:o.y1+s.marginTop+s.borderTopWidth+s.height/2}),U(i,{visibility:"visible"})},ql.prototype.clearHideTimeout=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this._hideAnimation&&this._hideAnimation.cancel()},ql.prototype.hide=function(){var t=this;this.clearHideTimeout(),this._hideTimeout=setTimeout(function(){t._visible=!1,t._hideAnimation=new Gl(t.element),t._hideAnimation.setup(),t._hideAnimation.play()},this.options.hideDelay)},ql.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},ql);function ql(t,e,o){Xl.call(this),this.options=j({},this.options,o),this.container=t,this.chartService=e;e=U(t,["paddingLeft","paddingTop"]);this.chartPadding={top:e.paddingTop,left:e.paddingLeft},this.createElements(),t.appendChild(this.element)}At(Je,{format:"{0:d} - {1:d}",hideDelay:500});var Yl=Je,Ql="_navigator",Zl=Ql;function Kl(){}var $l,Jl,tc=((Jl=P.Class)&&(oc.__proto__=Jl),((oc.prototype=Object.create(Jl&&Jl.prototype)).constructor=oc).prototype.parseDate=function(t){return No(this.chart.chartService.intl,t)},oc.prototype.clean=function(){this.selection&&(this.selection.destroy(),this.selection=null),this.hint&&(this.hint.destroy(),this.hint=null)},oc.prototype.destroy=function(){this.chart&&(this.chart.removeObserver(this.chartObserver),delete this.chart),this.clean()},oc.prototype.redraw=function(){this._redrawSelf(),this.initSelection()},oc.prototype.initSelection=function(){var t=this.chart,e=this.options,o=this.mainAxis(),i=o.roundedRange(),r=i.min,n=i.max,s=e.select,a=s.from,p=s.to,i=s.mousewheel,s=(Kl.prototype=o,new Kl);0!==o.categoriesCount()&&(this.clean(),s.box=o.box,this.selection=new Ap(t,s,{min:r,max:n,from:a||r,to:p||n,mousewheel:_t(i,{zoom:"left"}),visible:e.visible},new ot(this,{selectStart:"_selectStart",select:"_select",selectEnd:"_selectEnd"})),e.hint.visible&&(this.hint=new Yl(t.element,t.chartService,{min:r,max:n,template:W(e.hint),format:e.hint.format})))},oc.prototype.setRange=function(){var t=this.chart._createPlotArea(!0).namedCategoryAxes[Zl].roundedRange(),e=t.min,o=t.max,i=this.options.select||{},r=i.from||e,t=i.to||o;this.options.select=j({},i,{from:r=r<e?e:r,to:t=o<t?o:t}),this.filterAxes()},oc.prototype._redrawSelf=function(t){var e=this.chart._plotArea;e&&e.redraw(yt(e.panes),t)},oc.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)},oc.prototype._drag=function(t){var e=this.chart,o=this.selection,i=e._eventCoordinates(t.originalEvent),r=this.mainAxis(),n=r.roundedRange(),i=r.pane.box.containsPoint(i),e=e._plotArea.categoryAxis,t=t.axisRanges[e.options.name],e=this.options.select;t&&!i&&o&&(e=e.from&&e.to?Eo(e.to)-Eo(e.from):Eo(o.options.to)-Eo(o.options.from),t=Oo(vt(Eo(t.min),n.min,Eo(n.max)-e)),n=Oo(vt(Eo(t)+e,Eo(n.min)+e,n.max)),this.options.select={from:t,to:n},this.options.liveDrag&&(this.filterAxes(),this.redrawSlaves()),o.set(t,n),this.showHint(t,n))},oc.prototype._dragEnd=function(){this.filterAxes(),this.filter(),this.redrawSlaves(),this.hint&&this.hint.hide()},oc.prototype.readSelection=function(){var t=this.selection.options,e=t.from,o=t.to,t=this.options.select;t.from=e,t.to=o},oc.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!==Ql&&(n.min=o,n.max=i)}},oc.prototype.filter=function(){var t,e,o=this.chart,i=this.options.select;o.requiresHandlers(["navigatorFilter"])&&(t=this.mainAxis(),e={from:i.from,to:i.to},"category"!==t.options.type&&(o=new ni(j({baseUnit:"fit"},o.options.categoryAxis[0],{categories:[i.from,i.to]}),o.chartService).options,e.from=Lo(o.min,-o.baseUnitStep,o.baseUnit),e.to=Lo(o.max,o.baseUnitStep,o.baseUnit)),this.chart.trigger("navigatorFilter",e))},oc.prototype._zoom=function(t){var e,o=this.chart._plotArea.categoryAxis,i=this.selection,r=this.options,n=r.select,s=r.liveDrag,a=this.mainAxis(),p=t.delta;i&&(e=a.categoryIndex(i.options.from),r=a.categoryIndex(i.options.to),a=this.chart._eventCoordinates(t.originalEvent),t.originalEvent.preventDefault(),1<Math.abs(p)&&(p*=3),1<r-e?(i.zoom(p,a),this.readSelection()):(o.options.min=n.from,n.from=o.scaleRange(-t.delta*this.chart._mousewheelZoomRate(),a).min),s&&(this.filterAxes(),this.redrawSlaves()),i.set(n.from,n.to),this.showHint(this.options.select.from,this.options.select.to))},oc.prototype._zoomEnd=function(t){this._dragEnd(t)},oc.prototype.showHint=function(t,e){var o=this.chart._plotArea;this.hint&&this.hint.show(t,e,o.backgroundBox())},oc.prototype._selectStart=function(t){return this.chart._selectStart(t)},oc.prototype._select=function(t){return this.showHint(t.from,t.to),this.chart._select(t)},oc.prototype._selectEnd=function(t){return this.hint&&this.hint.hide(),this.readSelection(),this.filterAxes(),this.filter(),this.redrawSlaves(),this.chart._selectEnd(t)},oc.prototype.mainAxis=function(){var t=this.chart._plotArea;if(t)return t.namedCategoryAxes[Zl]},oc.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}},oc.setup=function(t,e){var o,i,r;void 0===e&&(e={}),(t=void 0===t?{}:t).__navi||(t.__navi=!0,o=j({},e.navigator,t.navigator),i=t.panes=[].concat(t.panes),r=j({},o.pane,{name:Ql}),o.visible||(r.visible=!1,r.height=.1),i.push(r),oc.attachAxes(t,o),oc.attachSeries(t,o,e))},oc.attachAxes=function(t,e){var o=e.series||[],i=t.categoryAxis=[].concat(t.categoryAxis),r=t.valueAxis=[].concat(t.valueAxis),t=0===Vs(o,gr).length,o=j({type:"date",pane:Ql,roundToBaseUnit:!t,justified:t,_collapse:!1,majorTicks:{visible:!0},tooltip:{visible:!1},labels:{step:1},autoBind:e.autoBindElements,autoBaseUnitSteps:{minutes:[1],hours:[1,2],days:[1,2],weeks:[],months:[1],years:[1]}}),t=e.categoryAxis;i.push(j({},o,{maxDateGroups:200},t,{name:Zl,title:null,baseUnit:"fit",baseUnitStep:"auto",labels:{visible:!1},majorTicks:{visible:!1}}),j({},o,t,{name:Zl+"_labels",maxDateGroups:20,baseUnitStep:"auto",labels:{position:""},plotBands:[],autoBaseUnitSteps:{minutes:[]},_overlap:!0}),j({},o,t,{name:Zl+"_ticks",maxDateGroups:200,majorTicks:{width:.5},plotBands:[],title:null,labels:{visible:!1,mirror:!0},_overlap:!0})),r.push(j({name:Zl,pane:Ql,majorGridLines:{visible:!1},visible:!1},e.valueAxis))},oc.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(j({color:n[a%n.length],categoryField:e.dateField,visibleInLegend:!1,tooltip:{visible:!1}},s,r[a],{axis:Zl,categoryAxis:Zl,autoBind:e.autoBindElements}))},oc),Lt=(($l=Ol)&&(ec.__proto__=$l),((ec.prototype=Object.create($l&&$l.prototype)).constructor=ec).prototype.applyDefaults=function(t,e){var o=dt(this.element).width||600,e=e,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&&j({},e,o);tc.setup(t,e),$l.prototype.applyDefaults.call(this,t,e)},ec.prototype._setElementClass=function(t){p(t,"k-chart k-stockchart")},ec.prototype.setOptions=function(t){this.destroyNavigator(),$l.prototype.setOptions.call(this,t)},ec.prototype.noTransitionsRedraw=function(){var t=this.options.transitions;this.options.transitions=!1,this._fullRedraw(),this.options.transitions=t},ec.prototype._resize=function(){this.noTransitionsRedraw()},ec.prototype._redraw=function(){var t=this.navigator;!this._dirty()&&t&&t.options.partialRedraw?t.redrawSlaves():this._fullRedraw()},ec.prototype._dirty=function(){var t=this.options,e=Q([].concat(t.series,t.navigator.series),function(t){return t&&t.visible}).length,t=this._seriesCount!==e;return this._seriesCount=e,t},ec.prototype._fullRedraw=function(){var t=this.navigator;t||(t=this.navigator=new tc(this),this.trigger("navigatorCreated",{navigator:t})),t.clean(),t.setRange(),$l.prototype._redraw.call(this),t.initSelection()},ec.prototype._trackSharedTooltip=function(t){var e=this._plotArea.paneByPoint(t);e&&e.options.name===Ql?this._unsetActivePoint():$l.prototype._trackSharedTooltip.call(this,t)},ec.prototype.bindCategories=function(){$l.prototype.bindCategories.call(this),this.copyNavigatorCategories()},ec.prototype.copyNavigatorCategories=function(){for(var t,e=[].concat(this.options.categoryAxis),o=0;o<e.length;o++){var i=e[o];i.name===Zl?t=i.categories:t&&i.pane===Ql&&(i.categories=t)}},ec.prototype.destroyNavigator=function(){this.navigator&&(this.navigator.destroy(),this.navigator=null)},ec.prototype.destroy=function(){this.destroyNavigator(),$l.prototype.destroy.call(this)},ec.prototype._stopChartHandlers=function(t){var e=this._eventCoordinates(t),e=this._plotArea.paneByPoint(e);return $l.prototype._stopChartHandlers.call(this,t)||e&&e.options.name===Ql},ec.prototype._toggleDragZoomEvents=function(){this._dragZoomEnabled||(this.element.style.touchAction="none",this._dragZoomEnabled=!0)},ec);function ec(){$l.apply(this,arguments)}function oc(t){Jl.call(this),this.chart=t;var e=this.options=j({},this.options,t.options.navigator),o=e.select;o&&(o.from=this.parseDate(o.from),o.to=this.parseDate(o.to)),lt(e.hint.visible)||(e.hint.visible=e.visible),this.chartObserver=new ot(this,((e={})[fr]="_drag",e[yr]="_dragEnd",e[vr]="_zoom",e[mr]="_zoomEnd",e)),t.addObserver(this.chartObserver)}At(Lt,{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 ic=Lt,rc=Math.PI/180;function nc(t,e){var o=t.getOrigin(),i=t.getSize(),e=H(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 sc=P.drawing.Group,ac=P.drawing.Path,pc=P.drawing.Text;function hc(t,e){var o=t.box,i=t.children[0].box,r=e.border||{},n=e.background||"",o=ac.fromRect(new P.geometry.Rect([o.x1,o.y1],[o.width(),o.height()]),{stroke:{}}),i=new pc(t.text,new P.geometry.Point(i.x1,i.y1),{font:e.font,fill:{color:e.color}}),e=nc(i.bbox().clone(),e.padding),r=ac.fromRect(e,{stroke:{color:r.width?r.color:"",width:r.width,opacity:r.opacity,dashType:r.dashType,lineJoin:"round",lineCap:"round"},fill:{color:n}}),n=new sc;return n.append(o),n.append(r),n.append(i),n}function lc(t,e,o){var i=lt(t.from)?t.from:c,r=lt(t.to)?t.to:l;return t.from=Math.max(Math.min(r,i),e),t.to=Math.min(Math.max(r,i),o),t}function cc(t,e){e=H(e);return e.left=-e.left,e.top=-e.top,e.right=-e.right,e.bottom=-e.bottom,nc(t,e)}var uc,dc=P.drawing.Path,gc=P.drawing.Surface,_e=((uc=P.Class)&&(fc.__proto__=uc),((fc.prototype=Object.create(uc&&uc.prototype)).constructor=fc).prototype.destroy=function(){this.surface&&(this.surface.destroy(),this.surface=null),delete this.element,delete this.surfaceElement},fc.prototype.value=function(t){var e=this.pointers[0];if(0===arguments.length)return e.value();e.value(t),this._setValueOptions(t)},fc.prototype._draw=function(){var t=this.surface;t.clear(),t.draw(this._visuals)},fc.prototype.exportVisual=function(){return this._visuals},fc.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(x(t))for(var r=0;r<t.length;r++)B(t[r])&&e[r].value(t[r]);this._setValueOptions(t)},fc.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]},fc.prototype.resize=function(){this.noTransitionsRedraw()},fc.prototype.noTransitionsRedraw=function(){var t=this.options.transitions;this._toggleTransitions(!1),this.redraw(),this._toggleTransitions(t)},fc.prototype.redraw=function(){var t=this._surfaceSize(),t=new P.geometry.Rect([0,0],[t.width,t.height]);this._initSurface(),this.gaugeArea=this._createGaugeArea(),this._createModel();t=cc(t.bbox(),this._gaugeAreaMargin);this.reflow(t)},fc.prototype.setOptions=function(t,e){this._originalOptions=j(this._originalOptions,t),this.options=j({},this._originalOptions),this._initTheme(e),this.redraw()},fc.prototype.setDirection=function(t){this.contextService.rtl=Boolean(t),this.surface&&"svg"===this.surface.type&&(this.surface.destroy(),this.surface=null)},fc.prototype.setIntlService=function(t){this.contextService.intl=t},fc.prototype._initTheme=function(t){var e=t||this.theme||{};this.theme=e,this.options=j({},e,this.options);var t=this.options,o=t.pointer;if(x(o)){for(var i=[],r=0;r<o.length;r++)i.push(j({},e.pointer,o[r]));t.pointer=i}},fc.prototype._createGaugeArea=function(){var t=this.options.gaugeArea,e=this.surface.size(),o=t.border||{},e=new P.geometry.Rect([0,0],[e.width,e.height]);return this._gaugeAreaMargin=t.margin||5,0<o.width&&(e=cc(e,o.width)),dc.fromRect(e,{stroke:{color:o.width?o.color:"",width:o.width,dashType:o.dashType,lineJoin:"round",lineCap:"round"},fill:{color:t.background}})},fc.prototype._initSurface=function(){var t=this.options,e=this.surface,o=this._surfaceElement(),i=this._surfaceSize();dt(o,i),e&&e.options.type===t.renderAs?(this.surface.clear(),this.surface.resize()):(e&&e.destroy(),this.surface=gc.create(o,{type:t.renderAs}))},fc.prototype._surfaceSize=function(){var t=this.options,e=this._getSize();return t.gaugeArea&&j(e,t.gaugeArea),e},fc.prototype._surfaceElement=function(){return this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.element.appendChild(this.surfaceElement)),this.surfaceElement},fc.prototype.getSize=function(){return this._getSize()},fc.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}},fc.prototype._defaultSize=function(){return{width:200,height:200}},fc.prototype._toggleTransitions=function(t){this.options.transitions=t;for(var e=0;e<this.pointers.length;e++)this.pointers[e].options.animation.transitions=t},fc);function fc(t,e,o,i){void 0===i&&(i={}),uc.call(this),this.element=t,this.theme=o,this.contextService=new no(this,i),this._originalOptions=j({},this.options,e),this.options=j({},this._originalOptions),this._initTheme(o),this.redraw()}At(_e,{plotArea:{},theme:"default",renderAs:"",pointer:{},scale:{},gaugeArea:{}});var yc=_e,vc=P.drawing.Path,mc=P.drawing.Group,xc=P.geometry.Point;function wc(t,e,o,i){var r,n,s,a,p,h=e.length;if(i.visible)for(var l=o.mirror,c=o.lineBox,u=i.skip;u<h;u+=i.step)u%i.skipUnit!=0&&(o.tickX=l?c.x2:c.x2-i.size,o.tickY=l?c.y1-i.size:c.y1,o.position=e[u],t.append((r=i,a=s=n=void 0,p=void 0,s=o.position,a=o.tickX,p=o.tickY,p=o.vertical?(n=new xc(a,s),new xc(a+r.size,s)):(n=new xc(s,p),new xc(s,p+r.size)),new vc({stroke:{color:r.color,width:r.width}}).moveTo(n).lineTo(p))))}var bc,Ve=((bc=gi)&&(_c.__proto__=bc),((_c.prototype=Object.create(bc&&bc.prototype)).constructor=_c).prototype.initUserOptions=function(t){t=j({},this.options,t);return(t=j({},t,{labels:{mirror:t.mirror}})).majorUnit=t.majorUnit||Et(t.min,t.max),t},_c.prototype.initFields=function(){},_c.prototype.render=function(){var t=this.elements=new mc,e=this.renderLabels(),o=this.renderLine(),i=this.renderTicks(),r=this.renderRanges();return t.append(o,e,i,r),t},_c.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 mc,a=n.length,p=t.rangeSize||t.minorTicks.size/2,h=0;h<a;h++){var l=lc(n[h],e,o),c=this.getSlot(l.from,l.to),u=i?this.lineBox():c,c=i?c:this.lineBox();i?u.x1-=p*(r?-1:1):c.y2+=p*(r?-1:1),s.append(vc.fromRect(new P.geometry.Rect([u.x1,c.y1],[u.x2-u.x1,c.y2-c.y1]),{fill:{color:l.color,opacity:l.opacity},stroke:{}}))}return s},_c.prototype.renderLabels=function(){for(var t=this.labels,e=this.options,o=new mc,i=0;i<t.length;i++)o.append(hc(t[i],e.labels));return o},_c.prototype.renderLine=function(){var t=this.options.line,e=this.lineBox(),o=new mc;return 0<t.width&&t.visible&&((t=new vc({stroke:{color:t.color,dashType:t.dashType,width:t.width}})).moveTo(e.x1,e.y1).lineTo(e.x2,e.y2),o.append(t)),o},_c.prototype.renderTicks=function(){var t=new mc,e=this.options,o=e.majorTicks.visible?e.majorUnit:0,i={vertical:e.vertical,mirror:e.labels.mirror,lineBox:this.lineBox()};return wc(t,this.getMajorTickPositions(),i,e.majorTicks),wc(t,this.getMinorTickPositions(),i,j({},{skipUnit:o/e.minorUnit},e.minorTicks)),t},_c);function _c(t,e){t=t||{};!lt(t.reverse)&&!1===t.vertical&&(e||{}).rtl&&(t=Object.assign({},t,{reverse:!0})),bc.call(this,0,1,t,e),this.options.minorUnit=this.options.minorUnit||this.options.majorUnit/10}At(Ve,{min:0,max:50,majorTicks:{size:15,align:"inside",color:r,width:.5,visible:!0},minorTicks:{size:10,align:"inside",color:r,width:.5,visible:!0},line:{width:.5},labels:{position:"inside",padding:2},mirror:!1,_alignLines:!1});var Cc,Ac=Ve,oo=((Cc=P.Class)&&(Sc.__proto__=Cc),((Sc.prototype=Object.create(Cc&&Cc.prototype)).constructor=Sc).prototype.value=function(t){var e=this.options,o=e.value;if(0===arguments.length)return o;var i=this.scale.options,o=i.min,i=i.max;e._oldValue=lt(e._oldValue)?e.value:o,e.value=vt(t,o,i),this.elements&&this.repaint()},Sc);function Sc(t,e){Cc.call(this);var o=t.options,i=o.min,o=o.max,e=this.options=j({},this.options,e);e.fill=e.color,this.scale=t,lt(e.value)?e.value=vt(e.value,i,o):e.value=i}At(oo,{color:r});var kc,Ne=oo,Qe=((kc=Ne)&&(Pc.__proto__=kc),((Pc.prototype=Object.create(kc&&kc.prototype)).constructor=Pc).prototype.reflow=function(){var t,e,o,i=this.options,r=this.scale,n=r.options,s=n.mirror,a=n.vertical,p=r.lineBox(),h=i.track.size||i.size,n=i.size/2,r=H(i.margin),r=a?r[s?"left":"right"]:r[s?"bottom":"top"],r=s?-r:r;a?(o=new Wt(p.x1+r,p.y1,p.x1+r,p.y2),s?o.x1-=h:o.x2+=h,"barPointer"!==i.shape&&(t=e=new Wt(p.x2+r,p.y1-n,p.x2+r,p.y2+n))):(o=new Wt(p.x1,p.y1-r,p.x2,p.y1-r),s?o.y2+=h:o.y1-=h,"barPointer"!==i.shape&&(t=e=new Wt(p.x1-n,p.y1-r,p.x2+n,p.y1-r))),this.trackBox=o,this.pointerRangeBox=e,this.box=t||o.clone().pad(i.border.width)},Pc.prototype.getElementOptions=function(){var t=this.options;return{fill:{color:t.color,opacity:t.opacity},stroke:lt(t.border)?{color:t.border.width?t.border.color||t.color:"",width:t.border.width,dashType:t.border.dashType,opacity:t.opacity}:null}},Pc.prototype._margin=function(){var t=this.scale,e=this.options,o=t.options,t=o.mirror,o=o.vertical,e=H(e.margin);return o?e[t?"left":"right"]:e[t?"bottom":"top"]},Pc);function Pc(t,e){kc.call(this,t,e),this.options=j({track:{visible:lt(e.track)}},this.options)}At(Qe,{shape:"barPointer",track:{border:{width:1}},color:r,border:{width:1},opacity:1,margin:H(3),animation:{type:"barPointer"},visible:!0});var Mc,Tc=Qe,lo=((Mc=P.drawing.Animation)&&(Bc.__proto__=Mc),((Bc.prototype=Object.create(Mc&&Mc.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";t.mirror===r?(o[n]-=e,i[n]-=e):(o[n]+=e,i[n]+=e);o=this.fromScale=new P.geometry.Point(o.x1,o.y1),i=this.toScale=new P.geometry.Point(i.x1,i.y1);0!==t.duration&&(t.duration=Math.max(o.distanceTo(i)/t.duration*1e3,1))},Bc.prototype.step=function(t){var e=tt(this.fromScale.x,this.toScale.x,t),t=tt(this.fromScale.y,this.toScale.y,t);this.element.transform(P.geometry.transform().translate(e,t))},Bc);function Bc(){Mc.apply(this,arguments)}At(lo,{easing:"linear",duration:250}),P.drawing.AnimationFactory.current.register("arrowPointer",lo);var Rc,Oc,Ic=lo,Lc=P.geometry.Point,Vc=P.drawing.Path,jc=((Oc=Tc)&&(zc.__proto__=Oc),((zc.prototype=Object.create(Oc&&Oc.prototype)).constructor=zc).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 Lc(0,0-o),new Lc(0-i*e,0),new Lc(0,0+o)]:[new Lc(0-o,0),new Lc(0,0+i*e),new Lc(0+o,0)]},zc.prototype.repaint=function(){var t=this.scale,e=this.options,t=new Ic(this.elements,j(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()},zc.prototype.render=function(){var t=this.scale,e=this.options,o=this.getElementOptions(),i=this.pointerShape(e.value);e.animation.type="arrowPointer";i=new Vc({stroke:o.stroke,fill:o.fill}).moveTo(i[0]).lineTo(i[1]).lineTo(i[2]).close(),e=t.getSlot(e.value);return i.transform(P.geometry.transform().translate(e.x1,e.y1)),this.elements=i},zc),Ue=((Rc=P.drawing.Animation)&&(Dc.__proto__=Rc),((Dc.prototype=Object.create(Rc&&Rc.prototype)).constructor=Dc).prototype.setup=function(){var t=this.options,e=this.axis=t.vertical?m:v,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)},Dc.prototype.step=function(t){t=tt(this.from,this.to,t);this._set(t)},Dc.prototype._set=function(t){var e="set"+this.axis.toUpperCase(),o=this.options.newPoints;o[0][e](t),o[1][e](t)},Dc);function Dc(){Rc.apply(this,arguments)}function zc(t,e){Oc.call(this,t,e),lt(this.options.size)||(this.options.size=.6*this.scale.options.majorTicks.size)}At(Ue,{easing:"linear",speed:250}),P.drawing.AnimationFactory.current.register("barPointer",Ue);var Ec,Uc,Hc=Ue,Fc=P.drawing.Group,Gc=P.drawing.Path,Nc=((Uc=Tc)&&(qc.__proto__=Uc),((qc.prototype=Object.create(Uc&&Uc.prototype)).constructor=qc).prototype.pointerShape=function(t){var e=this.scale,o=this.options,i=e.options,r=i.mirror,n=i.vertical,s=r===n?-1:1,a=o.size*s,i=e.getSlot(e.options.min),r=e.getSlot(t),o=n?m:v,e=n?v:m,t=this._margin()*s,s=new P.geometry.Point;s[o]=i[o+"1"],s[e]=i[e+"1"];i=new P.geometry.Point;i[o]=r[o+"1"],i[e]=r[e+"1"],n?(s.translate(t,0),i.translate(t,0)):(s.translate(0,t),i.translate(0,t));e=i.clone(),t=s.clone();return n?(e.translate(a,0),t.translate(a,0)):(e.translate(0,a),t.translate(0,a)),[s,i,e,t]},qc.prototype.repaint=function(){var t=this.scale,e=this.options,o=this.pointerShape(e.value),i=this.pointerPath,r=this.pointerShape(e._oldValue);i.moveTo(o[0]).lineTo(o[1]).lineTo(o[2]).lineTo(o[3]).close();o=new Hc(i,j(e.animation,{reverse:t.options.reverse,vertical:t.options.vertical,oldPoints:[r[1],r[2]],newPoints:[o[1],o[2]]}));!1===e.animation.transitions&&(o.options.duration=0),o.setup(),o.play()},qc.prototype.render=function(){var t=new Fc,e=this.getElementOptions();this.options.track.visible&&t.append(this.renderTrack());e=this.pointerPath=new Gc({stroke:e.stroke,fill:e.fill});return t.append(e),this.elements=t},qc.prototype.renderTrack=function(){var t=this.options.track,e=t.border||{},o=this.trackBox.clone().pad(e.width||0);return new Gc.fromRect(o.toRect(),{fill:{color:t.color,opacity:t.opacity},stroke:{color:e.width?e.color||t.color:"",width:e.width,dashType:e.dashType}})},qc),Wc=P.drawing.Group,Jt=((Ec=yc)&&(Xc.__proto__=Ec),((Xc.prototype=Object.create(Ec&&Ec.prototype)).constructor=Xc).prototype.reflow=function(t){var e=this.pointers,o=t.origin.x,i=t.origin.y,t=new Wt(o,i,o+t.width(),i+t.height());this.scale.reflow(t),this._shrinkScaleWidth(t);for(var r=0;r<e.length;r++)e[r].reflow();this.bbox=this._getBox(t),this._alignElements(),this._shrinkElements(),this._buildVisual(),this._draw()},Xc.prototype._buildVisual=function(){var t=new Wc,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},Xc.prototype._createModel=function(){var t=this.options,e=this.scale=new Ac(t.scale,this.contextService);this.pointers=[];for(var o=x(o=t.pointer)?o:[o],i=0;i<o.length;i++){var r=j({},o[i],{animation:{transitions:t.transitions}}),n="arrow"===r.shape?jc:Nc;this.pointers.push(new n(e,r))}},Xc.prototype._defaultSize=function(){var t=this.options.scale.vertical;return{width:t?60:200,height:t?200:60}},Xc.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 Wt(r.x-e,t.y1,r.x+e,t.y2)):(e=n.height()/2,new Wt(t.x1,r.y-e,t.x2,r.y+e))},Xc.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 Wt(i.x1+t,n.y1,i.x2+t,n.y2))):(t=n.center().y-r.center().y,e.reflow(new Wt(i.x1,i.y1+t,i.x2,i.y2+t)));for(var a=0;a<o.length;a++)o[a].reflow(this.bbox)},Xc.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))},Xc.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)},Xc);function Xc(){Ec.apply(this,arguments)}function qc(t,e){Uc.call(this,t,e),lt(this.options.size)||(this.options.size=.3*this.scale.options.majorTicks.size)}At(Jt,{transitions:!0,gaugeArea:{background:""},scale:{vertical:!0}});var Yc=Jt,Qc=P.drawing.Arc,Zc=P.drawing.Path,Kc=P.drawing.Group;function $c(t,e,o,i){var r=new Kc,n=t.center,s=t.getRadiusX();if(i.visible)for(var a=0;a<e.length;a++){var p=t.pointAt(e[a]),h=new P.geometry.Point(n.x+s-i.size,n.y).rotate(e[a],n);r.append(new Zc({stroke:{color:i.color,width:i.width}}).moveTo(p).lineTo(h))}return r}function Jc(t,e,o,i){return{from:t,to:e,color:o,opacity:i}}var tu,he=((tu=gi)&&(eu.__proto__=tu),((eu.prototype=Object.create(tu&&tu.prototype)).constructor=eu).prototype.initUserOptions=function(t){t=j({},this.options,t);return t.majorUnit=t.majorUnit||Et(t.min,t.max),t.minorUnit=t.minorUnit||t.majorUnit/10,t},eu.prototype.initFields=function(){},eu.prototype.render=function(t,e){e=this.renderArc(t,e);this.bbox=e.bbox(),this.labelElements=this.renderLabels(),this.ticks=this.renderTicks(),this.ranges=this.renderRanges()},eu.prototype.reflow=function(t){var e=t.center(),t=Math.min(t.height(),t.width())/2;if(!lt(this.bbox))return this.render(e,t);this.bbox=this.arc.bbox(),this.radius(this.arc.getRadiusX()),this.repositionRanges(),this.renderLabels()},eu.prototype.slotAngle=function(t){var e=this.options,o=e.min,i=e.max,r=e.reverse,n=e.startAngle,s=e.endAngle,e=s-n;return(r?s-(t-o)/(i-o)*e:(t-o)/(i-o)*e+n)+180},eu.prototype.hasRanges=function(){var t=this.options.ranges;return t&&t.length},eu.prototype.ticksSize=function(){var t=this.options,e=t.majorTicks,o=t.minorTicks,t=0;return e.visible&&(t=e.size),t=o.visible?Math.max(o.size,t):t},eu.prototype.labelsCount=function(){var t=tu.prototype.labelsCount.call(this),e=this.options;return 360<=e.endAngle-e.startAngle&&e.max%e.majorUnit==0&&--t,t},eu.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 Kc,s=.05*o;lt(t.rangeDistance)?s=t.rangeDistance:t.rangeDistance=s;var a=t.labels,p="inside"===a.position,h=lt(this.labelElements);p&&(o-=this.ticksSize(),this.hasRanges()&&!h&&(o-=r+s),e.setRadiusX(o).setRadiusY(o));for(var l=this.labels,c=l.length,a=H(a.padding),u=(a.left+a.right)/2,d=(a.top+a.bottom)/2,g=0;g<c;g++){var f=l[g],y=f.box.width()/2,v=f.box.height()/2,m=i[g],x=(m-180)*rc,w=e.pointAt(m),m=w.x+Math.cos(x)*(y+u)*(p?1:-1),x=w.y+Math.sin(x)*(v+d)*(p?1:-1);f.reflow(new Wt(m-y,x-v,m+y,x+v));m=new P.geometry.Point(f.box.x1,f.box.y1),y=void 0;h?(x=(y=this.labelElements.children[g]).bbox().origin,(v=y.transform()||P.geometry.transform()).translate(m.x-x.x,m.y-x.y),y.transform(v)):(y=hc(f,t.labels),n.append(y)),this.bbox=P.geometry.Rect.union(this.bbox,y.bbox())}return n},eu.prototype.repositionRanges=function(){var t=this.ranges.children;if(0<t.length){var e=this.options,o=e.rangeDistance,i=e.rangeSize,e=this.getRangeRadius();"inside"===this.options.labels.position&&(e+=i+o);for(var r=e+i/2,n=0;n<t.length;n++)t[n]._geometry.setRadiusX(r).setRadiusY(r);this.bbox=P.geometry.Rect.union(this.bbox,this.ranges.bbox())}},eu.prototype.renderRanges=function(){var t=this.rangeSegments(),e=t.length,o=new Kc;if(e){var i=this.options,r=i.rangeSize,n=i.reverse,i=i.rangeDistance,s=this.getRangeRadius();this.radius(this.radius()-r-i);for(var a=0;a<e;a++){var p=t[a],h=this.slotAngle(p[n?"to":"from"]),l=this.slotAngle(p[n?"from":"to"]);l-h!=0&&o.append(this.createRange(h,l,s,p))}}return o},eu.prototype.createRange=function(t,e,o,i){var r=this.options.rangeSize,e=new P.geometry.Arc(this.arc.center,{radiusX:o+r/2,radiusY:o+r/2,startAngle:t,endAngle:e});return new Qc(e,{stroke:{width:r,color:i.color,opacity:i.opacity,lineCap:i.lineCap}})},eu.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(Jc(r,n,s));for(var a=0;a<o;a++)for(var p=lc(e[a],r,n),h=i.length,l=0;l<h;l++){var c=i[l];if(c.from<=p.from&&p.from<=c.to){i.push(Jc(p.from,p.to,p.color,p.opacity)),c.from<=p.to&&p.to<=c.to&&i.push(Jc(p.to,c.to,s,p.opacity)),c.to=p.from;break}}}return i},eu.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},eu.prototype.renderArc=function(t,e){var o=this.options;return this.arc=new P.geometry.Arc(t,{radiusX:e,radiusY:e,startAngle:o.startAngle+180,endAngle:o.endAngle+180})},eu.prototype.renderTicks=function(){var t=this.arc,e=this.options,o=t.clone();this.majorTickAngles=this.tickAngles(t,e.majorUnit),this.majorTicks=$c(o,this.majorTickAngles,e.majorUnit,e.majorTicks);var i=new Kc;i.append(this.majorTicks);var r,n=e.majorTicks.size,s=e.minorTicks.size;return this._tickDifference=n-s,"outside"===e.labels.position&&(r=o.getRadiusX(),o.setRadiusX(r-n+s).setRadiusY(r-n+s)),this.minorTickAngles=this.normalizeTickAngles(this.tickAngles(t,e.minorUnit)),this.minorTicks=$c(o,this.minorTickAngles,e.minorUnit,e.minorTicks),i.append(this.minorTicks),i},eu.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},eu.prototype.tickAngles=function(t,e){var o=this.options,i=o.reverse,r=o.max-o.min,n=t.endAngle-t.startAngle,s=r/e,a=t.startAngle,p=n/s;i&&(a+=n,p=-p),360<=n&&o.max%e==0&&--s;for(var h=[],l=0;l<s;l++)h.push(wt(a,3)),a+=p;return wt(a)<=t.endAngle&&h.push(a),h},eu.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)},eu.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]),p=t[s].segments,h=a.x-p[0].anchor().x,p=a.y-p[0].anchor().y;t[s].transform((new P.geometry.transform).translate(h,p))}},eu);function eu(t,e){tu.call(this,0,1,t,e)}At(he,{min:0,max:100,majorTicks:{size:15,align:"inside",color:r,width:.5,visible:!0},minorTicks:{size:10,align:"inside",color:r,width:.5,visible:!0},startAngle:-30,endAngle:210,labels:{position:"inside",padding:2}});var ou,iu=he,at=((ou=P.drawing.Animation)&&(ru.__proto__=ou),((ru.prototype=Object.create(ou&&ou.prototype)).constructor=ru).prototype.step=function(t){var e=this.options,t=tt(e.oldAngle,e.newAngle,t);this.element.transform(P.geometry.transform().rotate(t,e.center))},ru);function ru(t,e){ou.call(this,t,e);e=this.options;e.duration=Math.max(Math.abs(e.newAngle-e.oldAngle)/e.duration*1e3,1)}At(at,{easing:"linear",duration:150}),P.drawing.AnimationFactory.current.register("radialPointer",at);var nu,su=at,au=P.drawing.Circle,pu=P.drawing.Group,hu=P.drawing.Path,me=((nu=Ne)&&(lu.__proto__=nu),((lu.prototype=Object.create(nu&&nu.prototype)).constructor=lu).prototype.setAngle=function(t){this.elements.transform(P.geometry.transform().rotate(t,this.center))},lu.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 su(this.elements,j(e.animation,{oldAngle:o,newAngle:t})).play()},lu.prototype.render=function(){var t=this.scale,e=this.options,o=new pu;return!1!==e.animation&&j(e.animation,{startAngle:0,center:t.arc.center,reverse:t.options.reverse}),o.append(this._renderNeedle(),this._renderCap()),this.elements=o,this.setAngle(rc),o},lu.prototype.reflow=function(t){var e=this.center=t.center,o=vt(this.options.length||1,.1,1.5),o=this.radius=t.getRadiusX()*o,o=this.capSize=Math.round(o*this.options.cap.size);this.bbox=P.geometry.Rect.fromPoints(new P.geometry.Point(e.x-o,e.y-o),new P.geometry.Point(e.x+o,e.y+o))},lu.prototype._renderNeedle=function(){var t=this.scale.options.minorTicks.size,e=this.center,o=this.options.color,o=new hu({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},lu.prototype._renderCap=function(){var t=this.options,e=t.cap.color||t.color,t=new P.geometry.Circle(this.center,this.capSize);return new au(t,{fill:{color:e},stroke:{color:e}})},lu);function lu(){nu.apply(this,arguments)}At(me,{cap:{size:.05},arrow:{width:16,height:14},animation:{type:"radialPointer",duration:150}});var cu,uu=me,du=P.drawing.Group,ne=((cu=yc)&&(gu.__proto__=cu),((gu.prototype=Object.create(cu&&cu.prototype)).constructor=gu).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=P.geometry.Rect.union(this._initialPlotArea,e[o].bbox);this.fitScale(t),this.alignScale(t),this._buildVisual(this.gaugeArea,e,this.scale),this._draw()},gu.prototype._buildVisual=function(t,e,o){var i=this._visuals=new du;i.append(t),i.append(o.ticks),i.append(o.ranges),this._buildPointers(e),i.append(o.labelElements)},gu.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)}},gu.prototype.fitScale=function(t){for(var e,o,i,r,n,s=this.scale.arc,a=this._initialPlotArea,a=Math.abs(this.getDiff(a,t)),p=wt(a,3),h=wt(-a,3),l=0,c=0;!(!(c++<100)||5<(l=n===i?l+1:0)||p!==r&&0<=(e=this.getPlotBox(p,t,s))&&e<=2||h!==r&&0<=(i=this.getPlotBox(h,t,s))&&i<=2||(r=0<e&&0<i?2*p:e<0&&i<0?2*h:wt((p+h)/2||1,3),0<=(o=this.getPlotBox(r,t,s))&&o<=2));)n=i,0<o?(h=r,i=o):(p=r,e=o)},gu.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=P.geometry.Rect.union(this.plotBbox,r[a].bbox);return this.getDiff(this.plotBbox,e)},gu.prototype.getDiff=function(t,e){return Math.min(e.width()-t.width(),e.height()-t.height())},gu.prototype.alignScale=function(t){var e=this.plotBbox.center(),o=t.center(),i=e.x-o.x,o=e.y-o.y,r=this.scale,n=this.pointers;r.arc.center.x-=i,r.arc.center.y-=o,r.reflow(t);for(var s=0;s<n.length;s++)n[s].reflow(r.arc),this.plotBbox=P.geometry.Rect.union(r.bbox,n[s].bbox)},gu.prototype._createModel=function(){var t=this.options,e=t.pointer,o=this.scale=new iu(t.scale,this.contextService);this.pointers=[];for(var i=x(e)?e:[e],r=0;r<i.length;r++){var n=new uu(o,j({},i[r],{animation:{transitions:t.transitions}}));this.pointers.push(n)}},gu);function gu(){cu.apply(this,arguments)}At(ne,{transitions:!0,gaugeArea:{background:""}});var fu,yu=ne,Pe=((fu=iu)&&(vu.__proto__=fu),((vu.prototype=Object.create(fu&&fu.prototype)).constructor=vu).prototype.rangeSegments=function(){var t=this.options;return[{from:t.min,to:t.max,color:t.rangePlaceholderColor,lineCap:t.rangeLineCap}]},vu.prototype.hasRanges=function(){return!0},vu.prototype.placeholderRangeAngle=function(t){var e=this.ranges.children[0].geometry();this.options.reverse?e.setEndAngle(t):e.setStartAngle(t)},vu.prototype.addRange=function(t,e,o){var i=this.options.reverse,r=this.slotAngle(i?e:t),e=this.slotAngle(i?t:e),o=this.createRange(r,e,this.getRangeRadius(),o);return this.ranges.append(o),o},vu);function vu(){fu.apply(this,arguments)}At(Pe,{min:0,max:100,majorTicks:{visible:!1},minorTicks:{visible:!1},labels:{visible:!1},startAngle:0,endAngle:180,rangeLineCap:"round"});var mu,xu=Pe,jt=((mu=P.drawing.Animation)&&(wu.__proto__=mu),((wu.prototype=Object.create(mu&&mu.prototype)).constructor=wu).prototype.step=function(t){var e=this.options,o=this.startColor,i=this.color,r=tt(e.oldAngle,e.newAngle,t);this.element.angle(r),i&&(e=wt(tt(o.r,i.r,t)),r=wt(tt(o.g,i.g,t)),t=wt(tt(o.b,i.b,t)),this.element.stroke(new P.Color(e,r,t).toHex()))},wu);function wu(t,e){mu.call(this,t,e);var o=this.options,e=Math.abs(o.newAngle-o.oldAngle)/o.duration*1e3;o.duration=vt(e,150,800);e=t.elements.options.get("stroke.color"),t=t.currentColor();e!==t&&(this.startColor=new P.Color(e),this.color=new P.Color(t))}At(jt,{easing:"linear",duration:150}),P.drawing.AnimationFactory.current.register("radialRangePointer",jt);var bu,_u=jt,de=((bu=Ne)&&(Cu.__proto__=bu),((Cu.prototype=Object.create(bu&&bu.prototype)).constructor=Cu).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 _u(this,j(e.animation,{oldAngle:o,newAngle:t})),this.animation.play())},Cu.prototype.angle=function(t){var e=this.elements.geometry();this.scale.options.reverse?e.setStartAngle(t):e.setEndAngle(t),this.scale.placeholderRangeAngle(t)},Cu.prototype.stroke=function(t){this.elements.stroke(t)},Cu.prototype.render=function(){var t,e;this.elements||(t=this.scale,!1!==(e=this.options).animation&&j(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}))},Cu.prototype.currentColor=function(){var t=this.scale.options,e=t.min,o=t.max,i=this.options,r=i.colors,t=i.color,i=i.value,n=B(i)?i:e;if(r)for(var s=0;s<r.length;s++){var a=r[s],p=a.color,h=a.from;void 0===h&&(h=e);a=a.to;if(void 0===a&&(a=o),h<=n&&n<=a)return p}return t},Cu.prototype.reflow=function(){this.render(),this.bbox=this.elements.bbox()},Cu);function Cu(){bu.apply(this,arguments)}At(de,{animation:{type:"radialRangePointer",duration:150}});var Au,Su,ku,Pu=de,Mu=((ku=yu)&&(Ou.__proto__=ku),((Ou.prototype=Object.create(ku&&ku.prototype)).constructor=Ou).prototype._initTheme=function(t){ku.prototype._initTheme.call(this,t),this.options.color=this.options.color||(this.theme.pointer||{}).color},Ou.prototype._createModel=function(){var t=this.options,e=this.scale=new xu(t.scale,this.contextService),t=new Pu(e,j({},{colors:t.colors,color:t.color,value:t.value,opacity:t.opacity,animation:{transitions:t.transitions}}));this.pointers=[t]},Ou.prototype._buildPointers=function(t){for(var e=0;e<t.length;e++){var o=t[e];o.render(),o.value(o.options.value)}},Ou.prototype._setValueOptions=function(t){this.options.value=t},Ou.prototype.currentColor=function(){var t=this.pointers[0];if(t)return t.currentColor()},Ou.prototype.centerLabelPosition=function(t,e){var o,i=this.getSize(),r=this.scale.arc.center,n=r.x-t/2,r=r.y-e/2;return t<i.width&&(o=n+t,n=Math.max(n,0),o>i.width&&(n-=o-i.width)),e<i.height&&(i=(o=this.scale.bbox).bottomRight().y,e=r+e,r=Math.max(r,o.origin.y),i<e&&(r-=e-i)),{left:n,top:r}},Ou),Tu=((Su=Mu)&&(Ru.__proto__=Su),((Ru.prototype=Object.create(Su&&Su.prototype)).constructor=Ru).prototype._createModel=function(){var t=this.options.scale;"number"!=typeof t.startAngle&&(t.startAngle=90),t.endAngle=t.startAngle+360,Su.prototype._createModel.call(this)},Ru),Je=((Au=P.Class)&&(Bu.__proto__=Au),((Bu.prototype=Object.create(Au&&Au.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=lt(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){Au.call(this),this.setOptions(t),this.initProperties()}function Ru(){Su.apply(this,arguments)}function Ou(){ku.apply(this,arguments)}At(Je,{quietZoneLength:10,addQuietZone:!0,addCheckSum:!0});var Iu,Lu=Object.assign,Lt=((Iu=Je)&&(Vu.__proto__=Iu),((Vu.prototype=Object.create(Iu&&Iu.prototype)).constructor=Vu).prototype.initProperties=function(){Iu.prototype.initProperties.call(this),Lu(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"})},Vu.prototype.initValue=function(t,e){this.pattern=[],this.value=t,this.width=e,this.totalUnits=0},Vu.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()},Vu.prototype.setBaseUnit=function(){this.baseUnit=this.width/(this.totalUnits+this.quietZoneLength)},Vu.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&&(e=(o+this.getWeightedSum(t,e,this.kCheckSumTotal))%this.checkSumMod,this.checksum+=e,this.addPattern(this.characterMap[e]))},Vu.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},Vu.prototype.weightedValue=function(t,e,o,i){return((e-o)%i||i)*t},Vu.prototype.getValue=function(t){return isNaN(t)?(t!==this.DASH&&this.invalidCharacterError(t),this.DASH_VALUE):parseInt(t,10)},Vu.prototype.addCharacter=function(t){t=this.getValue(t),t=this.characterMap[t];this.addPattern(t)},Vu.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},Vu);function Vu(){Iu.apply(this,arguments)}At(Lt,{addCheckSum:!0});var ju,Du,zu=Object.assign,_e=((Du=Je)&&(Uu.__proto__=Du),((Uu.prototype=Object.create(Du&&Du.prototype)).constructor=Uu).prototype.initProperties=function(){Du.prototype.initProperties.call(this),zu(this,{minBaseUnitLength:.7})},Uu.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()},Uu.prototype.addCharacter=function(t){var e=this.characterMap[t];e||this.invalidCharacterError(t),this.addBase(e)},Uu.prototype.addBase=function(){},Uu),Ve=((ju=_e)&&(Eu.__proto__=ju),((Eu.prototype=Object.create(ju&&ju.prototype)).constructor=Eu).prototype.initProperties=function(){ju.prototype.initProperties.call(this),zu(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"}}})},Eu.prototype.initValue=function(t,e,o){this.width=e,this.height=o,this.value=t,this.dataLength=t.length,this.pattern=[],this.patternString=""},Eu.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){i=Math.ceil(this.getBaseWidth(o)*e);throw 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))},Eu.prototype.getBaseUnit=function(t){return this.width/this.getBaseWidth(t)},Eu.prototype.getBaseWidth=function(t){return this.quietZoneLength+3*(t+2)*(this.dataLength+2)+this.gapWidth*(this.dataLength+1)},Eu.prototype.addStart=function(){this.addPattern(this.characterMap.START.pattern),this.addCharacterGap()},Eu.prototype.addBase=function(t){this.addPattern(t.pattern),this.addCharacterGap()},Eu.prototype.addStop=function(){this.addPattern(this.characterMap.START.pattern)},Eu.prototype.addPattern=function(t){for(var e=0;e<t.length;e++)this.patternString+=this.patternMappings[t.charAt(e)]},Eu.prototype.addCharacterGap=function(){this.patternString+=this.gapWidth+this.splitCharacter},Eu);function Eu(){ju.apply(this,arguments)}function Uu(){Du.apply(this,arguments)}At(Ve,{addCheckSum:!1});var Hu,Fu,Gu,Nu,Wu,Xu,qu,Yu,Qu,Zu,Ku,$u={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"]},oo=((Xu=Ve)&&(cd.__proto__=Xu),((cd.prototype=Object.create(Xu&&Xu.prototype)).constructor=cd).prototype.initProperties=function(){Xu.prototype.initProperties.call(this),j(this,$u,{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}}})},cd),Ju=Object.assign,Qe=((Wu=_e)&&(ld.__proto__=Wu),((ld.prototype=Object.create(Wu&&Wu.prototype)).constructor=ld).prototype.initProperties=function(){Wu.prototype.initProperties.call(this),Ju(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"}})},ld.prototype.initValue=function(t,e,o){this.value=t,this.width=e,this.height=o,this.pattern=[],this.values=[],this.dataLength=t.length},ld.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){t=Math.ceil(this.minBaseUnitLength*(this.width/this.baseUnit));throw 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.")}},ld.prototype.setBaseUnit=function(){this.baseUnit=this.width/(9*(this.dataLength+2+2)+this.quietZoneLength+1)},ld.prototype.addStart=function(){var t=this.characterMap.START.pattern;this.addPattern(t)},ld.prototype.addStop=function(){this.addStart(),this.pattern.push(this.characterMap.TERMINATION_BAR)},ld.prototype.addBase=function(t){this.addPattern(t.pattern),this.values.push(t.value)},ld.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)},ld.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]},ld.prototype._findCharacterByValue=function(t){for(var e in this.characterMap)if(this.characterMap[e].value===t)return e},ld.prototype.weightedValue=function(t,e,o){return(e%o||o)*t},ld.prototype.addPattern=function(t){for(var e,o=0;o<t.length;o++)e=parseInt(t.charAt(o),10),this.pattern.push(e)},ld),lo=((Nu=Qe)&&(hd.__proto__=Nu),((hd.prototype=Object.create(Nu&&Nu.prototype)).constructor=hd).prototype.initProperties=function(){Nu.prototype.initProperties.call(this),j(this,$u,{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))}})},hd),td=/^\d+$/,ed=Object.assign,Ue=((Gu=Je)&&(pd.__proto__=Gu),((pd.prototype=Object.create(Gu&&Gu.prototype)).constructor=pd).prototype.initProperties=function(){Gu.prototype.initProperties.call(this),ed(this,{name:"Postnet",START:"2",VALID_CODE_LENGTHS:[5,9,11],DIGIT_SEPARATOR:"-",characterMap:["22111","11122","11212","11221","12112","12121","12211","21112","21121","21211"]})},pd.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()},pd.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()},pd.prototype.addCharacter=function(t){var e=this.characterMap[t];this.checkSum+=parseInt(t,10),this.addPattern(e)},pd.prototype.addCheckSum=function(){this.checksum=(10-this.checkSum%10)%10,this.addCharacter(this.checksum)},pd.prototype.setBaseUnit=function(){this.baseUnit=this.width/(10*(this.value.length+1)+3+this.quietZoneLength)},pd.prototype.validate=function(t){if(td.test(t)||this.invalidCharacterError(t.match(/[^0-9]/)[0]),!J(t.length,this.VALID_CODE_LENGTHS))throw new Error("Invalid value length. Valid lengths for the Postnet symbology are "+this.VALID_CODE_LENGTHS.join(",")+".")},pd.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)},pd),od=/^\d+$/,id=/^[a-z0-9]+$/i,rd=Object.assign,Jt=((Fu=P.Class)&&(ad.__proto__=Fu),((ad.prototype=Object.create(Fu&&Fu.prototype)).constructor=ad).prototype.initProperties=function(){},ad.prototype.addStart=function(){},ad.prototype.is=function(){},ad.prototype.isCode=function(){return!1},ad.prototype.move=function(){},ad.prototype.pushState=function(){},ad),he=((Hu=Jt)&&(sd.__proto__=Hu),((sd.prototype=Object.create(Hu&&Hu.prototype)).constructor=sd).prototype.initProperties=function(){Hu.prototype.initProperties.call(this),j(this,{FNC4:"FNC4",SHIFT:98})},sd.prototype.addStart=function(){this.encoding.addPattern(this.START)},sd.prototype.is=function(t,e){e=t.charCodeAt(e);return this.isCode(e)},sd.prototype.move=function(t){for(var e=0;!this._moves[e].call(this,t)&&e<this._moves.length;)e++},sd.prototype.pushState=function(t){var e,o=this.states,i=t.value,r=i.length;for(!J("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++},sd.prototype._initMoves=function(t){this._moves=[],J(this.FNC4,t)&&this._moves.push(this._moveFNC),J(this.shiftKey,t)&&this._moves.push(this._shiftState),this._moves.push(this._moveState)},sd.prototype._moveFNC=function(t){if(t.fnc)return t.fnc=!1,t.previousState===this.key},sd.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},sd.prototype._moveState=function(){return this.encoding.addPattern(this.MOVE),!0},sd),nd={};function sd(t,e){Hu.call(this,t),this.states=e,this._initMoves(e)}function ad(t){Fu.call(this),this.encoding=t,this.initProperties()}function pd(){Gu.apply(this,arguments)}function hd(){Nu.apply(this,arguments)}function ld(){Wu.apply(this,arguments)}function cd(){Xu.apply(this,arguments)}function ud(t,e){qu.call(this,t),this.states=e}function dd(t,e){Yu.call(this,t),this._initSubStates(e)}function gd(){Qu.apply(this,arguments)}function fd(){Zu.apply(this,arguments)}function yd(){Ku.apply(this,arguments)}nd.A=((Ku=he)&&(yd.__proto__=Ku),((yd.prototype=Object.create(Ku&&Ku.prototype)).constructor=yd).prototype.initProperties=function(){Ku.prototype.initProperties.call(this),rd(this,{key:"A",shiftKey:"B",MOVE:101,START:103})},yd.prototype.isCode=function(t){return 0<=t&&t<96},yd.prototype.getValue=function(t){return t<32?t+64:t-32},yd),nd.B=((Zu=he)&&(fd.__proto__=Zu),((fd.prototype=Object.create(Zu&&Zu.prototype)).constructor=fd).prototype.initProperties=function(){Zu.prototype.initProperties.call(this),rd(this,{key:"B",shiftKey:"A",MOVE:100,START:104})},fd.prototype.isCode=function(t){return 32<=t&&t<128},fd.prototype.getValue=function(t){return t-32},fd),nd.C=((Qu=Jt)&&(gd.__proto__=Qu),((gd.prototype=Object.create(Qu&&Qu.prototype)).constructor=gd).prototype.initProperties=function(){Qu.prototype.initProperties.call(this),rd(this,{key:"C",MOVE:99,START:105})},gd.prototype.addStart=function(){this.encoding.addPattern(this.START)},gd.prototype.is=function(t,e){var o=Td(t,e,4);return(e+4<=t.length||2===t.length)&&od.test(o)},gd.prototype.move=function(){this.encoding.addPattern(this.MOVE)},gd.prototype.pushState=function(t){for(var e;(e=Td(t.value,t.index,2))&&od.test(e)&&2===e.length;)this.encoding.addPattern(parseInt(e,10)),t.index+=2},gd.prototype.getValue=function(t){return t},gd),nd.FNC4=((Yu=Jt)&&(dd.__proto__=Yu),((dd.prototype=Object.create(Yu&&Yu.prototype)).constructor=dd).prototype.initProperties=function(){Yu.prototype.initProperties.call(this),rd(this,{key:"FNC4",dependentStates:["A","B"]})},dd.prototype.addStart=function(t){t=t.value.charCodeAt(0)-128,t=this._getSubState(t);this.encoding[t].addStart()},dd.prototype.is=function(t,e){e=t.charCodeAt(e);return this.isCode(e)},dd.prototype.isCode=function(t){return 128<=t&&t<256},dd.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},dd.prototype._pushStart=function(t){this.encoding.addPattern(this.encoding[t.state].MOVE),this.encoding.addPattern(this.encoding[t.state].MOVE)},dd.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},dd.prototype._initSubStates=function(t){this.subStates=[];for(var e=0;e<t.length;e++)J(t[e],this.dependentStates)&&this.subStates.push(t[e])},dd.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]},dd.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},dd),nd.FNC1=((qu=Jt)&&(ud.__proto__=qu),((ud.prototype=Object.create(qu&&qu.prototype)).constructor=ud).prototype.initProperties=function(){qu.prototype.initProperties.call(this),rd(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})},ud.prototype.addStart=function(){this.encoding[this.startState].addStart()},ud.prototype.is=function(){return J(this.key,this.states)},ud.prototype.pushState=function(t){var e,o,i,r=this.encoding,n=t.value.replace(/\s/g,""),s=new RegExp("["+this.startAI+this.endAI+"]","g"),a=t.index,p={state:this.startState};for(r.addPattern(this.START);;){if((e=(p.index=0)<(i=n.charAt(a)===this.startAI?2:0)?this.getBySeparator(n,a):this.getByLength(n,a)).ai.length)o=a+i+e.id.length+e.ai.length;else if((o=n.indexOf(this.startAI,a+1))<0){if(a+e.ai.max+e.id.length+i<n.length)throw new Error("Separators are required after variable length identifiers");o=n.length}if(p.value=n.substring(a,o).replace(s,""),this.validate(e,p.value),r.pushData(p,this.dependentStates),o>=n.length)break;a=o,p.state!==this.startState&&(r[this.startState].move(p),p.state=this.startState),e.ai.length||r.addPattern(this.START)}t.index=t.value.length},ud.prototype.validate=function(t,e){var o=e.substr(t.id.length),e=t.ai;if(!e.type&&!od.test(o))throw new Error("Application identifier "+t.id+" is numeric only but contains non numeric character(s).");if("alphanumeric"===e.type&&!id.test(o))throw new Error("Application identifier "+t.id+" is alphanumeric only but contains non alphanumeric character(s).");if(e.length&&e.length!==o.length)throw new Error("Application identifier "+t.id+" must be "+e.length+" characters long.");if(e.min&&e.min>o.length)throw new Error("Application identifier "+t.id+" must be at least "+e.min+" characters long.");if(e.max&&e.max<o.length)throw new Error("Application identifier "+t.id+" must be at most "+e.max+" characters long.")},ud.prototype.getByLength=function(t,e){for(var o,i,r=2;r<=4;r++)if(o=Td(t,e,r),i=this.getApplicationIdentifier(o)||this.getApplicationIdentifier(o.substring(0,o.length-1)))return{id:o,ai:i};this.unsupportedAIError(o)},ud.prototype.unsupportedAIError=function(t){throw new Error("'"+t+"' is not a supported Application Identifier")},ud.prototype.getBySeparator=function(t,e){var o=t.indexOf(this.startAI,e),e=t.indexOf(this.endAI,o),o=t.substring(o+1,e),e=this.getApplicationIdentifier(o)||this.getApplicationIdentifier(o.substr(o.length-1));return e||this.unsupportedAIError(o),{ai:e,id:o}},ud.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&&J(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}},ud);var vd,md,xd,wd,bd,_d,at=((_d=Je)&&(Md.__proto__=_d),((Md.prototype=Object.create(_d&&_d.prototype)).constructor=Md).prototype.initProperties=function(){_d.prototype.initProperties.call(this),rd(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})},Md.prototype._initStates=function(){for(var t=0;t<this.states.length;t++)this[this.states[t]]=new nd[this.states[t]](this,this.states)},Md.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},Md.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())},Md.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))}},Md.prototype.addStart=function(t){this[t.state].addStart(t),this.position=1},Md.prototype.addCheckSum=function(){this.checksum=this.checkSum%103,this.addPattern(this.checksum)},Md.prototype.addStop=function(){this.addPattern(this.STOP)},Md.prototype.setBaseUnit=function(){this.baseUnit=this.width/(this.totalUnits+this.quietZoneLength)},Md.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++},Md.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))},Md),me=((bd=at)&&(Pd.__proto__=bd),((Pd.prototype=Object.create(bd&&bd.prototype)).constructor=Pd).prototype.initProperties=function(){bd.prototype.initProperties.call(this),rd(this,{name:"Code 128 A",states:["A"]})},Pd),ne=((wd=at)&&(kd.__proto__=wd),((kd.prototype=Object.create(wd&&wd.prototype)).constructor=kd).prototype.initProperties=function(){wd.prototype.initProperties.call(this),rd(this,{name:"Code 128 B",states:["B"]})},kd),Pe=((xd=at)&&(Sd.__proto__=xd),((Sd.prototype=Object.create(xd&&xd.prototype)).constructor=Sd).prototype.initProperties=function(){xd.prototype.initProperties.call(this),rd(this,{name:"Code 128 C",states:["C"]})},Sd),jt=((md=at)&&(Ad.__proto__=md),((Ad.prototype=Object.create(md&&md.prototype)).constructor=Ad).prototype.initProperties=function(){md.prototype.initProperties.call(this),rd(this,{name:"Code 128",states:["C","B","A","FNC4"]})},Ad),Ne=((vd=at)&&(Cd.__proto__=vd),((Cd.prototype=Object.create(vd&&vd.prototype)).constructor=Cd).prototype.initProperties=function(){vd.prototype.initProperties.call(this),rd(this,{name:"Code GS1-128",states:["FNC1","C","B"]})},Cd);function Cd(){vd.apply(this,arguments)}function Ad(){md.apply(this,arguments)}function Sd(){xd.apply(this,arguments)}function kd(){wd.apply(this,arguments)}function Pd(){bd.apply(this,arguments)}function Md(t){_d.call(this,t),this._initStates()}function Td(t,e,o){return t.substring(e,e+o)}var Bd,Rd,Od,Id,Ld,Vd,jd,Dd=Object.assign,de=((jd=Je)&&(Yd.__proto__=jd),((Yd.prototype=Object.create(jd&&jd.prototype)).constructor=Yd).prototype.initProperties=function(){jd.prototype.initProperties.call(this),Dd(this,{characterMap:["12121212","12121221","12122112","12122121","12211212","12211221","12212112","12212121","21121212","21121221"],START:"21",STOP:"121",checkSumType:"",checkSums:zd})},Yd.prototype.initValue=function(t,e){this.pattern=[],this.value=t,this.checkSumLength=0,this.width=e},Yd.prototype.setBaseUnit=function(){this.baseUnit=this.width/(12*(this.value.length+this.checkSumLength)+this.quietZoneLength+7)},Yd.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()},Yd.prototype.addCharacter=function(t){var e=this.characterMap[t];e||this.invalidCharacterError(t),this.addPattern(e)},Yd.prototype.addPattern=function(t){for(var e=0;e<t.length;e++)this.pattern.push(parseInt(t.charAt(e),10))},Yd.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]])},Yd),_e=((Vd=de)&&(qd.__proto__=Vd),((qd.prototype=Object.create(Vd&&Vd.prototype)).constructor=qd).prototype.initProperties=function(){Vd.prototype.initProperties.call(this),Dd(this,{name:"MSI Modulo10",checkSumType:"Modulo10"})},qd),he=((Ld=de)&&(Xd.__proto__=Ld),((Xd.prototype=Object.create(Ld&&Ld.prototype)).constructor=Xd).prototype.initProperties=function(){Ld.prototype.initProperties.call(this),Dd(this,{name:"MSI Modulo11",checkSumType:"Modulo11"})},Xd),Jt=((Id=de)&&(Wd.__proto__=Id),((Wd.prototype=Object.create(Id&&Id.prototype)).constructor=Wd).prototype.initProperties=function(){Id.prototype.initProperties.call(this),Dd(this,{name:"MSI Modulo10 Modulo10",checkSumType:"Modulo10Modulo10"})},Wd),at=((Od=de)&&(Nd.__proto__=Od),((Nd.prototype=Object.create(Od&&Od.prototype)).constructor=Nd).prototype.initProperties=function(){Od.prototype.initProperties.call(this),Dd(this,{name:"MSI Modulo11 Modulo10",checkSumType:"Modulo11Modulo10"})},Nd),zd={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))}},Ed=Object.assign,de=((Rd=Je)&&(Gd.__proto__=Rd),((Gd.prototype=Object.create(Rd&&Rd.prototype)).constructor=Gd).prototype.initProperties=function(){Rd.prototype.initProperties.call(this),Ed(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),Ud=Object.assign,Je=((Bd=de)&&(Fd.__proto__=Bd),((Fd.prototype=Object.create(Bd&&Bd.prototype)).constructor=Fd).prototype.initProperties=function(){Bd.prototype.initProperties.call(this),Ud(this,{name:"EAN 8"})},Fd.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)},Fd),Hd={code11:Lt,code39:Ve,code39extended:oo,code93:Qe,code93extended:lo,code128:jt,code128a:me,code128b:ne,code128c:Pe};function Fd(){Bd.apply(this,arguments)}function Gd(){Rd.apply(this,arguments)}function Nd(){Od.apply(this,arguments)}function Wd(){Id.apply(this,arguments)}function Xd(){Ld.apply(this,arguments)}function qd(){Vd.apply(this,arguments)}function Yd(){jd.apply(this,arguments)}Hd["gs1-128"]=Ne,Hd.msimod10=_e,Hd.msimod11=he,Hd.msimod1010=Jt,Hd.msimod1110=at,Hd.postnet=Ue,Hd.ean8=Je,Hd.ean13=de;var Qd,Ue=((Qd=P.Class)&&(Zd.__proto__=Qd),((Zd.prototype=Object.create(Qd&&Qd.prototype)).constructor=Zd).prototype.destroy=function(){this._destroySurface()},Zd.prototype._initElement=function(){p(this.element,"k-barcode")},Zd.prototype._initSurface=function(){var t=this.options,e=this.surface;e&&e.options.type===t.renderAs||(this._destroySurface(),this._initSurfaceElement(),this.surface=this._createSurface())},Zd.prototype._createSurface=function(){return P.drawing.Surface.create(this.surfaceElement,{type:this.options.renderAs})},Zd.prototype._destroySurface=function(){this.surface&&(this.surface.destroy(),this.surface=null,this._destroySurfaceElement())},Zd.prototype._initSurfaceElement=function(){this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.surfaceElement.style.position="relative",this.element.appendChild(this.surfaceElement))},Zd.prototype._destroySurfaceElement=function(){this.surfaceElement&&this.surfaceElement.parentNode&&(this.surfaceElement.parentNode.removeChild(this.surfaceElement),this.surfaceElement=null)},Zd.prototype.setOptions=function(t){this._setOptions(t),this.redraw()},Zd.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)},Zd.prototype.getSize=function(){return{width:this.element.offsetWidth,height:this.element.offsetHeight}},Zd.prototype._resize=function(){this.redraw()},Zd.prototype.createVisual=function(){this.visual=this._render()},Zd.prototype._render=function(){var t,e=this.options,o=e.value,i=e.text,r=H(i.margin),n=this._getSize(),s=e.border||{},a=this.encoding,p=new Wt(0,0,n.width,n.height).unpad(s.width).unpad(e.padding),h=p.height(),s=new P.drawing.Group;this.contentBox=p,s.append(this._getBackground(n)),i.visible&&(h-=P.drawing.util.measureText(o,{font:i.font}).height+r.top+r.bottom);try{t=a.encode(o,p.width(),h)}catch(t){return this.onError(t),s}return i.visible&&(o=o,e.checksum&<(a.checksum)&&(o+=" "+a.checksum),s.append(this._getText(o))),this.barHeight=h,this._bandsGroup=this._getBands(t.pattern,t.baseUnit),s.append(this._bandsGroup),s},Zd.prototype.exportVisual=function(){return this._render()},Zd.prototype._getSize=function(){var t=this.element,e=t.clientWidth,o=t.clientHeight,t=new P.geometry.Size(300,100);return 0<e&&(t.width=e),o&&(t.height=o),this.options.width&&(t.width=this.options.width),this.options.height&&(t.height=this.options.height),t},Zd.prototype.value=function(t){if(!lt(t))return this.options.value;this.options.value=String(t),this.redraw()},Zd.prototype._getBands=function(t,e){for(var o=this.contentBox,i=o.x1,r=new P.drawing.Group,n=0;n<t.length;n++){var s,a=(s=D(t[n])?t[n]:{width:t[n],y1:0,y2:this.barHeight}).width*e;n%2&&(s=P.geometry.Rect.fromPoints(new P.geometry.Point(i,s.y1+o.y1),new P.geometry.Point(i+a,s.y2+o.y1)),s=P.drawing.Path.fromRect(s,{fill:{color:this.options.color},stroke:null}),r.append(s)),i+=a}return r},Zd.prototype._getBackground=function(t){var e=this.options,o=e.border||{},t=new Wt(0,0,t.width,t.height).unpad(o.width/2);return P.drawing.Path.fromRect(t.toRect(),{fill:{color:e.background},stroke:{color:o.width?o.color:"",width:o.width,dashType:o.dashType}})},Zd.prototype._getText=function(t){var e=this.options.text,e=this._textbox=new Le(t,{font:e.font,color:e.color,align:"center",vAlign:"bottom",margin:e.margin});return e.reflow(this.contentBox),e.renderVisual(),e.visual},Zd.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),!Hd[this.type])throw new Error("Encoding '"+this.type+"' is not supported.");this.encoding=new Hd[this.type],this.options=j({},this.options,t)},Zd);function Zd(t,e,o){void 0===o&&(o=zt),Qd.call(this),this.options=j({},this.options,e),this.element=t,this.onError=o,this._initElement(),this._initSurface(),this._setOptions(e),e&<(e.value)&&this.redraw()}At(Ue,{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}});var Kd=Ue,$d=Object.assign;function Jd(t,e){for(var o=[],i=0;i<t.length;)o.push(t.substring(i,i+e)),i+=e;return o}function tg(t,e){t=Number(t).toString(2);return t=t.length<e?new Array(e-t.length+1).join(0)+t:t}function eg(t){return parseInt(t,2)}var og,ig,rg,ng,sg,ag,pg,hg=((pg=P.Class)&&(xg.__proto__=pg),((xg.prototype=Object.create(pg&&pg.prototype)).constructor=xg).prototype.move=function(){this.row+=this.dir*this.c,this.c^=1,this.column=this.startColumn-this.c},xg.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}},xg.prototype.getNextRemainderCell=function(){if(this.move(),void 0===this.matrix[this.row][this.column])return{row:this.row,column:this.column}},xg),lg=((ag=P.Class)&&(mg.__proto__=ag),(mg.prototype=Object.create(ag&&ag.prototype)).constructor=mg),cg=((sg=P.Class)&&(vg.__proto__=sg),((vg.prototype=Object.create(sg&&sg.prototype)).constructor=vg).prototype.getEncodingResult=function(n,t){var e=function(){var t,e=[],o=0,i=n;for(e.push(Zg(i,Eg,Ug,Hg,t)),t=e[0].mode,i=i.substr(e[0].modeString.length);0<i.length;){var r=Zg(i,Fg,Gg,Ng,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=Kg(function(t){for(var e=0,o=0;o<t.length;o++)e+=ug[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+=ug[t[i].mode].encode(t[i].modeString,e);return o}(e,t);return new lg(e,t)},vg),Je=((ng=P.Class)&&(yg.__proto__=ng),((yg.prototype=Object.create(ng&&ng.prototype)).constructor=yg).prototype.initProperties=function(){$d(this,{modeIndicator:"",bitsInCharacterCount:[]})},yg.prototype.getVersionIndex=function(t){return t<10?0:26<t?2:1},yg.prototype.getBitsCharacterCount=function(t){return this.bitsInCharacterCount[this.getVersionIndex(t||40)]},yg.prototype.getModeCountString=function(t,e){return this.modeIndicator+tg(t,this.getBitsCharacterCount(e))},yg.prototype.encode=function(){},yg.prototype.getStringBitsLength=function(){},yg.prototype.getValue=function(){},yg),de=((rg=Je)&&(fg.__proto__=rg),((fg.prototype=Object.create(rg&&rg.prototype)).constructor=fg).prototype.initProperties=function(){rg.prototype.initProperties.call(this),$d(this,{bitsInCharacterCount:[10,12,14],modeIndicator:"0001"})},fg.prototype.getValue=function(t){return parseInt(t,10)},fg.prototype.encode=function(t,e){for(var o=Jd(t,3),i=this.getModeCountString(t.length,e),r=0;r<o.length-1;r++)i+=tg(o[r],10);return i+tg(o[r],1+3*o[r].length)},fg.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)},fg),Ue=((ig=Je)&&(gg.__proto__=ig),((gg.prototype=Object.create(ig&&ig.prototype)).constructor=gg).prototype.initProperties=function(){ig.prototype.initProperties.call(this),$d(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"})},gg.prototype.getValue=function(t){return this.characters[t]},gg.prototype.encode=function(t,e){for(var o=Jd(t,2),i=this.getModeCountString(t.length,e),r=0;r<o.length-1;r++)i+=tg(45*this.getValue(o[r].charAt(0))+this.getValue(o[r].charAt(1)),11);return i+tg(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)},gg.prototype.getStringBitsLength=function(t,e){return 4+this.getBitsCharacterCount(e)+11*Math.floor(t/2)+t%2*6},gg),Je=((og=Je)&&(dg.__proto__=og),((dg.prototype=Object.create(og&&og.prototype)).constructor=dg).prototype.initProperties=function(){og.prototype.initProperties.call(this),$d(this,{bitsInCharacterCount:[8,16,16],modeIndicator:"0100"})},dg.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+'".')},dg.prototype.encode=function(t,e){for(var o=this.getModeCountString(t.length,e),i=0;i<t.length;i++)o+=tg(this.getValue(t.charAt(i)),8);return o},dg.prototype.getStringBitsLength=function(t,e){return 4+this.getBitsCharacterCount(e)+8*t},dg),ug={};function dg(){og.apply(this,arguments)}function gg(){ig.apply(this,arguments)}function fg(){rg.apply(this,arguments)}function yg(){ng.call(this),this.initProperties()}function vg(){sg.apply(this,arguments)}function mg(t,e){ag.call(this),this.dataString=t,this.version=e}function xg(t){pg.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}ug.numeric=new de,ug.alphanumeric=new Ue,ug.byte=new Je;var wg,bg=((wg=P.Class)&&(Xg.__proto__=wg),((Xg.prototype=Object.create(wg&&wg.prototype)).constructor=Xg).prototype.initProperties=function(){$d(this,{encodingMode:"byte",utfBOM:"111011111011101110111111",initialModeCountStringLength:20,ranges:[128,2048,65536,2097152,67108864]})},Xg.prototype.getEncodingResult=function(t,e){t=this.encode(t),e=Kg(this.getDataCodewordsCount(t),e),t=this.mode.getModeCountString(t.length/8,e)+t;return new lg(t,e)},Xg.prototype.getDataCodewordsCount=function(t){t=t.length;return Math.ceil((this.initialModeCountStringLength+t)/8)},Xg.prototype.encode=function(t){for(var e=this.utfBOM,o=0;o<t.length;o++)e+=this.encodeCharacter(t.charCodeAt(o));return e},Xg.prototype.encodeCharacter=function(t){var e=this.getBytesCount(t),o=e-1,i="";if(1===e)i=tg(t,8);else{for(var e=8-e,r=0;r<o;r++)i=tg(t>>6*r&63|128,8)+i;i=(t>>6*o|255>>e<<e).toString(2)+i}return i},Xg.prototype.getBytesCount=function(t){for(var e=this.ranges,o=0;o<e.length;o++)if(t<e[o])return o+1},Xg),_g=[{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}}],Cg="numeric",Ag="alphanumeric",Sg="byte",kg={1:0},Pg={0:1},Mg={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},Tg=[1,0,1,1,1],Bg=[1,0,1],Rg={L:"01",M:"00",Q:"11",H:"10"},Og=["11101100","00010001"],Ig=93,Lg=[function(t,e){return(t+e)%2==0},function(t){return t%2==0},function(t){return t%3==0},function(t,e){return(t+e)%3==0},function(t,e){return(Math.floor(t/2)+Math.floor(e/3))%2==0},function(t,e){return t*e%2+t*e%3==0},function(t,e){return(t*e%2+t*e%3)%2==0},function(t,e){return((t+e)%2+t*e%3)%2==0}],Vg=/^\d+/,jg=new RegExp("^[A-Z $%*+./:-]+"),Dg=new RegExp("^[A-Z0-9 $%*+./:-]+"),zg=new RegExp("^[^A-Z0-9 $%*+./:-]+"),Eg=8,Ug=5,Hg=8,Fg=17,Gg=9,Ng=16,Wg=[[1,0],[1,25,0]];function Xg(){wg.call(this),this.initProperties(),this.mode=ug[this.encodingMode]}function qg(t,e,o,i){for(var r=0;r<t.length;r++)t[r][o][i]=e}function Yg(t,e,o,i){for(var r=0;r<Lg.length;r++)t[r][o][i]=Lg[r](o,i)?1^e:parseInt(e,10)}function Qg(t,e){for(var o,i=Wg[e-1],r=new Array(e).concat(t),n=new Array(r.length-i.length).concat(i),s=t.length,a=[],p=0;p<s;p++)o=function(t,e){for(var o=[],i=t.length-1;o[i]=Pg[(t[i]+e)%255],void 0!==t[--i];);return o}(n,kg[r[r.length-1]]),n.splice(0,1),r=function(t,e){for(var o=[],i=t.length-2;0<=i;i--)o[i]=t[i]^e[i];return o}(o,r);for(p=r.length-1;0<=p;p--)a[e-1-p]=tg(r[p],8);return a}function Zg(t,e,o,i,r){var n,s=Vg.exec(t),a=s?s[0]:"",p=jg.exec(t),s=p?p[0]:"",p=Dg.exec(t),p=p?p[0]:"",t=a&&(a.length>=e||t.length===a.length||a.length>=o&&!Dg.test(t.charAt(a.length)))?(n=Cg,a):p&&(t.length===p.length||p.length>=i||r===Ag)?(n=Ag,a||s):(n=Sg,p?p+zg.exec(t.substring(p.length))[0]:zg.exec(t)[0]);return{mode:n,modeString:t}}function Kg(t,e){for(var o=0,i=_g.length-1,r=Math.floor(_g.length/2);t<_g[r][e].totalDataCodewords?i=r:o=r,r=o+Math.floor((i-o)/2),1<i-o;);return t<=_g[o][e].totalDataCodewords?r+1:i+1}function $g(t,e,o){var i=eg(e),r=e.length-1,e=t<<r,o=tg(t,o-r),i=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}(e,i);return o+tg(i,r)}function Jg(t,e){return parseInt(t.charAt(e),10)}function tf(t,e){for(var o=t[0],i=0,r=e.length,n=0,s=8;n<=8;n++)6!==n&&qg(t,Jg(e,r-1-i++),n,s);for(n=8,s=7;0<=s;s--)6!==s&&qg(t,Jg(e,r-1-i++),n,s);for(i=0,s=o.length-1,n=8;s>=o.length-8;s--)qg(t,Jg(e,r-1-i++),n,s);for(qg(t,1,o.length-8,8),n=o.length-7,s=8;n<o.length;n++)qg(t,Jg(e,r-1-i++),n,s)}function ef(t,e){for(var o,i,r,n=t[0].length,s=n-11,a=n-11,p=0;p<e.length;p++)o=Math.floor(p/3),i=p%3,qg(t,r=Jg(e,e.length-p-1),0+o,s+i),qg(t,r,a+i,0+o)}function of(t,e,o,i){for(var r,n=e.length+2,s=e.length+1,a=0;a<e.length;a++)for(var p=a;p<n-a;p++)qg(t,r=e[a],o+p,i+a),qg(t,r,o+a,i+p),qg(t,r,o+s-p,i+s-a),qg(t,r,o+s-a,i+s-p)}function rf(t,e,o,i){for(var r=o,n=i,s=t[0];qg(t,0,r,i),qg(t,0,o,n),r+=e[0],n+=e[1],0<=r&&r<s.length;);}function nf(t,e,o,i,r){e[t][i]=(e[t][i]<<1^r)%128,e[t][i]===Ig&&(o[t]+=40)}function sf(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 af(t,e,o){var i=(new(o&&0<=o.toLowerCase().indexOf("utf_8")?bg:cg)).getEncodingResult(t,e),r=i.version,n=_g[r-1][e],s=function(t,e){for(var o,i=0,r=[],n=[],s=e.groups,a=0;a<s.length;a++)for(var p=s[a][0],h=0;h<p;h++){for(var l=s[a][1],c=[],u=[],d=1;d<=l;d++)o=t.substring(i,i+8),c.push(o),u[l-d]=eg(o),i+=8;r.push(c),n.push(Qg(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+=Og[i],i^=1;return r}(i.dataString),n),o=function(){for(var t=[],e=17+4*r,o=0;o<Lg.length;o++){t[o]=new Array(e);for(var i=0;i<e;i++)t[o][i]=new Array(e)}return t}();i=(t=o)[0].length,of(t,Tg,0,0),rf(t,[-1,-1],7,7),of(t,Tg,i-7,0),rf(t,[1,-1],i-8,7),of(t,Tg,0,i-7),rf(t,[-1,1],7,i-8),function(t,e){if(!(e<2)){var o,i=t[0],r=i.length,n=Math.floor(e/7),s=[6],a=0;for((e=Mg[e])?o=(r-13-e)/n:e=o=(r-13)/(n+1),s.push(s[a++]+e);s[a]+o<r;)s.push(s[a++]+o);for(var p=0;p<s.length;p++)for(var h=0;h<s.length;h++)void 0===i[s[p]][s[h]]&&of(t,Bg,s[p]-2,s[h]-2)}}(o,r),function(t){for(var e=1,o=t[0].length,i=8;i<o-8;i++)qg(t,e,6,i),qg(t,e,i,6),e^=1}(o),7<=r&&ef(o,tg(0,18)),tf(o,tg(0,15)),function(t,e){for(var o,i,r,n=new hg(t[0]),s=0;s<e.length;s++)for(o=e[s],i=0;0<o.length;){for(var a=0;a<o.length;a++)for(var p=0;p<8;p++)r=n.getNextCell(),Yg(t,o[a][i].charAt(p),r.row,r.column);for(i++;o[0]&&i===o[0].length;)o.splice(0,1)}for(;r=n.getNextRemainderCell();)Yg(t,0,r.row,r.column)}(o,s);s=function(t){for(var e,o=[],i=[],r=[],n=[],s=[],a=t[0].length,p=0;p<t.length;p++)o[p]=0,r[p]=0,s[p]=[0,0],n[p]=[0,0],i[p]=[];for(var h=0;h<a;h++)for(var l=0;l<a;l++)for(var c=0;c<t.length;c++)e=t[c],r[c]+=parseInt(e[h][l],10),i[c][0]===e[h][l]&&h+1<a&&0<=l-1&&e[h+1][l]===i[c][0]&&e[h+1][l-1]===i[c][0]&&(o[c]+=3),nf(c,n,o,0,e[h][l]),nf(c,n,o,1,e[l][h]),sf(c,o,i,e[h][l],s,0),sf(c,o,i,e[l][h],s,1);var u,d,g,f,y=a*a,v=Number.MAX_VALUE;for(p=0;p<o.length;p++)o[p]+=(d=r[p],g=y,f=void 0,f=Math.floor(d/g*100),d=f%5,g=Math.abs(f-d-50),d=Math.abs(f+5-d-50),10*Math.min(g/5,d/5)),o[p]<v&&(v=o[p],u=p);return u}(o),o=o[s];return 7<=r&&ef([o],$g(r,"1111100100101",18)),tf([o],function(t){var e="";if(0===eg(t))return"101010000010010";for(var o=$g(eg(t),"10100110111",15),i=0;i<o.length;i++)e+=o.charAt(i)^"101010000010010".charAt(i);return e}(Rg[e]+tg(s,3))),o}!function(){for(var t,e=1;e<255;e++)255<(t=2*Pg[e-1])&&(t^=285),Pg[e]=t,kg[t]=e;t=2*Pg[e-1]^285,Pg[e]=t,Pg[-1]=0}(),function(){for(var t=2;t<=68;t++){var e=Wg[t-1];Wg[t]=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]=kg[Pg[o[i+r]]^Pg[(t[i]+e[r])%255]];return o}(e,[t,0])}}();var pf,hf=Math.round,lf=[[0,1],[1,1],[1,2],[2,2],[2,1],[3,1],[3,0],[2,0],[2,-1],[1,-1],[1,0]],cf=[[0,1],[1,1],[1,0]],Je=((pf=P.Class)&&(uf.__proto__=pf),((uf.prototype=Object.create(pf&&pf.prototype)).constructor=uf).prototype.destroy=function(){this._destroySurface()},uf.prototype._initElement=function(){p(this.element,"k-qrcode")},uf.prototype._initSurface=function(){var t=this.options,e=this.surface;e&&e.options.type===t.renderAs||(this._destroySurface(),this._initSurfaceElement(),this.surface=this._createSurface())},uf.prototype._createSurface=function(){return P.drawing.Surface.create(this.surfaceElement,{type:this.options.renderAs})},uf.prototype._destroySurface=function(){this.surface&&(this.surface.destroy(),this.surface=null,this._destroySurfaceElement())},uf.prototype._initSurfaceElement=function(){this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.surfaceElement.style.position="relative",this.element.appendChild(this.surfaceElement))},uf.prototype._destroySurfaceElement=function(){this.surfaceElement&&this.surfaceElement.parentNode&&(this.surfaceElement.parentNode.removeChild(this.surfaceElement),this.surfaceElement=null)},uf.prototype.redraw=function(){var t=this._getSize();this.surface.clear(),this.surface.setSize({width:t,height:t}),this.createVisual(),this.surface.draw(this.visual)},uf.prototype.getSize=function(){var t=this.element,e=t.clientWidth,o=t.clientHeight,t={width:0,height:0};return 0<e&&(t.width=e),o&&(t.height=o),t},uf.prototype._resize=function(){this.redraw()},uf.prototype.createVisual=function(){this.visual=this._render()},uf.prototype.exportVisual=function(){return this._render()},uf.prototype._render=function(){var t,e,o,i,r,n=this._value,s=this.options.border||{},a=this.options.padding||0,p=s.width||0;s.width=p;var h=new P.drawing.Group;try{n&&(o=af(n,this.options.errorCorrection,this.options.encoding),r=(i=this._getSize())-2*(p+a),t=this._calculateBaseUnit(r,o.length),e=p+a+(r-o.length*t)/2,h.append(this._renderBackground(i,s)),h.append(this._renderMatrix(o,t,e)),this._hasCustomLogo()?h.append(this._renderLogo(i,t)):this._isSwiss()&&h.append(this._renderSwissCode(i,t)))}catch(t){this.onError(t)}return h},uf.prototype._renderLogo=function(t,e){var o=hf(t/2),t=this._getLogoSize(7*e),e=this.options.overlay.imageUrl,o={x:o-t.width/2,y:o-t.height/2},t=new P.geometry.Rect(new P.geometry.Point(o.x,o.y),new P.geometry.Size(t.width,t.height));return new P.drawing.Image(e,t)},uf.prototype._renderSwissCode=function(t,e){var o=this._getLogoSize(7*e),i=(o=Math.max(o.width,o.height))/4,r=i/2,n=t/2,s={},t=new P.drawing.Group;return s.x=s.y=Math.ceil(n-e-o/2),t.append(this._renderShape(s,Math.ceil(o+2*e),cf,"#fff")),s.x=s.y=n-o/2,t.append(this._renderShape(s,o,cf,this.options.color)),s.x=n+r-o/2,s.y=n+r+i-o/2,t.append(this._renderShape(s,i,lf,"#fff")),t},uf.prototype._renderShape=function(t,e,o,i){var r=new P.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},uf.prototype._getSize=function(){var t;return this.options.size?parseInt(this.options.size,10):(t=this.element,0<(t=Math.min(t.clientWidth,t.clientHeight))?t:200)},uf.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},uf.prototype._renderMatrix=function(t,e,o){for(var i=new P.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 p=hf(o+a*e),h=hf(n),l=hf(o+s*e),a=hf(n+e);i.moveTo(p,h).lineTo(p,a).lineTo(l,a).lineTo(l,h).close()}}return i},uf.prototype._renderBackground=function(t,e){t=new Wt(0,0,t,t).unpad(e.width/2);return P.drawing.Path.fromRect(t.toRect(),{fill:{color:this.options.background},stroke:{color:e.color,width:e.width}})},uf.prototype.setOptions=function(t){this.options=$d(this.options,t||{}),void 0!==t.value&&(this._value=String(this.options.value)),this.redraw()},uf.prototype.value=function(t){if(void 0===t)return this._value;this._value=String(t),this.redraw()},uf.prototype._hasCustomLogo=function(){return Boolean(this.options.overlay.imageUrl)},uf.prototype._isSwiss=function(){return"swiss"===this.options.overlay.type},uf.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}},uf);function uf(t,e,o){void 0===o&&(o=zt),pf.call(this),this.options=j({},this.options,e),this.element=t,this.wrapper=this.element,this.onError=o,this._initElement(),this._initSurface(),this.setOptions(e)}At(Je,{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 df(){return{icon:{border:{width:1}},label:{font:yf,padding:3},line:{length:10,width:2},visible:!0}}function gf(t){return{axisDefaults:{labels:{font:yf},notes:df(),title:{font:vf,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:df(),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:vf},legend:{labels:{font:yf}}}}var ff=Je,Je="Arial, Helvetica, sans-serif",yf="12px "+Je,vf="16px "+Je;o.d(e,"autoMajorUnit",function(){return Et}),o.d(e,"Point",function(){return Ht}),o.d(e,"Box",function(){return Wt}),o.d(e,"Ring",function(){return Kt}),o.d(e,"Sector",function(){return $t}),o.d(e,"ShapeBuilder",function(){return re}),o.d(e,"ShapeElement",function(){return fe}),o.d(e,"ChartElement",function(){return pe}),o.d(e,"BoxElement",function(){return ue}),o.d(e,"RootElement",function(){return be}),o.d(e,"FloatElement",function(){return Se}),o.d(e,"Text",function(){return Te}),o.d(e,"TextBox",function(){return Le}),o.d(e,"Title",function(){return Ee}),o.d(e,"AxisLabel",function(){return Ge}),o.d(e,"Axis",function(){return uo}),o.d(e,"Note",function(){return qe}),o.d(e,"CategoryAxis",function(){return Qo}),o.d(e,"DateCategoryAxis",function(){return ni}),o.d(e,"DateValueAxis",function(){return vi}),o.d(e,"NumericAxis",function(){return gi}),o.d(e,"LogarithmicAxis",function(){return _i}),o.d(e,"PolarAxis",function(){return Pi}),o.d(e,"RadarCategoryAxis",function(){return Si}),o.d(e,"RadarNumericAxis",function(){return Oi}),o.d(e,"RadarLogarithmicAxis",function(){return Li}),o.d(e,"CurveProcessor",function(){return zi}),o.d(e,"Gradients",function(){return ye}),o.d(e,"rectToBox",function(){return Be}),o.d(e,"Aggregates",function(){return Zi}),o.d(e,"AreaChart",function(){return ln}),o.d(e,"AreaSegment",function(){return tn}),o.d(e,"AxisGroupRangeTracker",function(){return cn}),o.d(e,"Bar",function(){return wn}),o.d(e,"BarChart",function(){return On}),o.d(e,"BarLabel",function(){return yn}),o.d(e,"BoxPlotChart",function(){return Xn}),o.d(e,"BoxPlot",function(){return Nn}),o.d(e,"BubbleChart",function(){return as}),o.d(e,"Bullet",function(){return ds}),o.d(e,"BulletChart",function(){return ys}),o.d(e,"CandlestickChart",function(){return En}),o.d(e,"Candlestick",function(){return Ln}),o.d(e,"CategoricalChart",function(){return Rr}),o.d(e,"CategoricalErrorBar",function(){return Ar}),o.d(e,"CategoricalPlotArea",function(){return Ga}),o.d(e,"Chart",function(){return Ol}),o.d(e,"ChartContainer",function(){return Ps}),o.d(e,"ClipAnimation",function(){return qr}),o.d(e,"ClusterLayout",function(){return kn}),o.d(e,"Crosshair",function(){return As}),o.d(e,"CrosshairTooltip",function(){return bs}),o.d(e,"DefaultAggregates",function(){return oa}),o.d(e,"DonutChart",function(){return uh}),o.d(e,"DonutPlotArea",function(){return dh}),o.d(e,"DonutSegment",function(){return ah}),o.d(e,"ErrorBarBase",function(){return Cr}),o.d(e,"ErrorRangeCalculator",function(){return nr}),o.d(e,"Highlight",function(){return Xa}),o.d(e,"SharedTooltip",function(){return Tp}),o.d(e,"Legend",function(){return fp}),o.d(e,"LegendItem",function(){return pp}),o.d(e,"LegendLayout",function(){return ap}),o.d(e,"LineChart",function(){return Jr}),o.d(e,"LinePoint",function(){return Vr}),o.d(e,"LineSegment",function(){return Dr}),o.d(e,"Pane",function(){return Bs}),o.d(e,"PieAnimation",function(){return zp}),o.d(e,"PieChart",function(){return oh}),o.d(e,"PieChartMixin",function(){return Kp}),o.d(e,"PiePlotArea",function(){return ih}),o.d(e,"PieSegment",function(){return Zp}),o.d(e,"PlotAreaBase",function(){return Ys}),o.d(e,"PlotAreaEventsMixin",function(){return Qs}),o.d(e,"PlotAreaFactory",function(){return vp}),o.d(e,"PointEventsMixin",function(){return Or}),o.d(e,"RangeBar",function(){return na}),o.d(e,"RangeBarChart",function(){return ha}),o.d(e,"RangeAreaPoint",function(){return ya}),o.d(e,"RangeAreaChart",function(){return Ma}),o.d(e,"ScatterChart",function(){return es}),o.d(e,"ScatterErrorBar",function(){return qn}),o.d(e,"ScatterLineChart",function(){return Hp}),o.d(e,"Selection",function(){return Ap}),o.d(e,"SeriesAggregator",function(){return $s}),o.d(e,"SeriesBinder",function(){return or}),o.d(e,"SplineSegment",function(){return Nr}),o.d(e,"SplineAreaSegment",function(){return hn}),o.d(e,"StackWrap",function(){return Tn}),o.d(e,"Tooltip",function(){return Sp}),o.d(e,"OHLCChart",function(){return Ba}),o.d(e,"OHLCPoint",function(){return Ta}),o.d(e,"WaterfallChart",function(){return Da}),o.d(e,"WaterfallSegment",function(){return ja}),o.d(e,"XYPlotArea",function(){return Wp}),o.d(e,"MousewheelZoom",function(){return sp}),o.d(e,"ZoomSelection",function(){return np}),o.d(e,"Pannable",function(){return Ja}),o.d(e,"ChartAxis",function(){return Ei}),o.d(e,"ChartPane",function(){return Wi}),o.d(e,"ChartPlotArea",function(){return Xi}),o.d(e,"findAxisByName",function(){return Fi}),o.d(e,"anyHasZIndex",function(){return Yr}),o.d(e,"appendIfNotNull",function(){return Rs}),o.d(e,"areNumbers",function(){return Vn}),o.d(e,"bindSegments",function(){return Is}),o.d(e,"categoriesCount",function(){return Pr}),o.d(e,"countNumbers",function(){return Yi}),o.d(e,"equalsIgnoreCase",function(){return Ls}),o.d(e,"evalOptions",function(){return kr}),o.d(e,"filterSeriesByType",function(){return Vs}),o.d(e,"getDateField",function(){return js}),o.d(e,"getField",function(){return Ki}),o.d(e,"hasGradientOverlay",function(){return vn}),o.d(e,"hasValue",function(){return Kn}),o.d(e,"isDateAxis",function(){return Ds}),o.d(e,"segmentVisible",function(){return Os}),o.d(e,"singleItemOrArray",function(){return zs}),o.d(e,"createOutOfRangePoints",function(){return Fs}),o.d(e,"ChartService",function(){return no}),o.d(e,"DomEventsBuilder",function(){return so}),o.d(e,"FormatService",function(){return eo}),o.d(e,"IntlService",function(){return Ke}),o.d(e,"TemplateService",function(){return N}),o.d(e,"Sparkline",function(){return Fl}),o.d(e,"Navigator",function(){return tc}),o.d(e,"NavigatorHint",function(){return Yl}),o.d(e,"StockChart",function(){return ic}),o.d(e,"constants",function(){return i}),o.d(e,"Gauge",function(){return yc}),o.d(e,"LinearGauge",function(){return Yc}),o.d(e,"LinearPointer",function(){return Tc}),o.d(e,"ArrowLinearPointer",function(){return jc}),o.d(e,"BarLinearPointer",function(){return Nc}),o.d(e,"LinearScale",function(){return Ac}),o.d(e,"RadialGauge",function(){return yu}),o.d(e,"RadialPointer",function(){return uu}),o.d(e,"RadialScale",function(){return iu}),o.d(e,"ArcGauge",function(){return Mu}),o.d(e,"RangePointer",function(){return Pu}),o.d(e,"ArcScale",function(){return xu}),o.d(e,"CircularGauge",function(){return Tu}),o.d(e,"Barcode",function(){return Kd}),o.d(e,"QRCode",function(){return ff}),o.d(e,"addClass",function(){return p}),o.d(e,"removeClass",function(){return b}),o.d(e,"alignPathToPixel",function(){return M}),o.d(e,"clockwise",function(){return T}),o.d(e,"convertableToNumber",function(){return O}),o.d(e,"deepExtend",function(){return j}),o.d(e,"elementStyles",function(){return U}),o.d(e,"getSpacing",function(){return H}),o.d(e,"getTemplate",function(){return W}),o.d(e,"getter",function(){return Y}),o.d(e,"grep",function(){return Q}),o.d(e,"hasClasses",function(){return Z}),o.d(e,"HashMap",function(){return $}),o.d(e,"inArray",function(){return J}),o.d(e,"interpolateValue",function(){return tt}),o.d(e,"InstanceObserver",function(){return ot}),o.d(e,"isArray",function(){return x}),o.d(e,"isFunction",function(){return I}),o.d(e,"isNumber",function(){return B}),o.d(e,"isObject",function(){return D}),o.d(e,"isString",function(){return R}),o.d(e,"map",function(){return it}),o.d(e,"mousewheelDelta",function(){return nt}),o.d(e,"FontLoader",function(){return Ct}),o.d(e,"setDefaultOptions",function(){return At}),o.d(e,"sparseArrayLimits",function(){return St}),o.d(e,"styleValue",function(){return z}),o.d(e,"find",function(){return kt}),o.d(e,"elementScale",function(){return Bt}),o.d(e,"autoTextColor",function(){return Rt}),o.d(e,"createHashSet",function(){return Dt}),o.d(e,"defaultErrorHandler",function(){return zt}),o.d(e,"append",function(){return pt}),o.d(e,"bindEvents",function(){return ht}),o.d(e,"Class",function(){return P.Class}),o.d(e,"defined",function(){return lt}),o.d(e,"deg",function(){return ct}),o.d(e,"elementOffset",function(){return ut}),o.d(e,"elementSize",function(){return dt}),o.d(e,"eventElement",function(){return gt}),o.d(e,"eventCoordinates",function(){return ft}),o.d(e,"last",function(){return yt}),o.d(e,"limitValue",function(){return vt}),o.d(e,"logToConsole",function(){return P.logToConsole}),o.d(e,"objectKey",function(){return mt}),o.d(e,"rad",function(){return xt}),o.d(e,"round",function(){return wt}),o.d(e,"unbindEvents",function(){return bt}),o.d(e,"valueOrDefault",function(){return _t}),o.d(e,"chartBaseTheme",function(){return gf}),function(t){for(var e in t)mf(e,t[e])}(e)}],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)}}});
|