@progress/kendo-charts 2.7.2-develop.2 → 2.7.2-develop.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register("@progress/kendo-charts",["@progress/kendo-drawing"],function(t,e){var Ok={};return{setters:[function(t){Ok.Class=t.Class,Ok.Color=t.Color,Ok.drawing=t.drawing,Ok.geometry=t.geometry,Ok.logToConsole=t.logToConsole,Ok.parseColor=t.parseColor,Ok.support=t.support,Ok.throttle=t.throttle}],execute:function(){t((()=>{var V={593:t=>{t.exports=Ok}},j={};function z(t){var e=j[t];return void 0!==e||(e=j[t]={exports:{}},V[t](e,e.exports,z)),e.exports}z.d=(t,e)=>{for(var i in e)z.o(e,i)&&!z.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},z.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var D={},F=((z.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})})(D),z.d(D,{Aggregates:()=>Rn,ArcGauge:()=>Kv,ArcScale:()=>Nv,AreaChart:()=>Bl,AreaSegment:()=>Al,ArrowLinearPointer:()=>Jy,Axis:()=>Ko,AxisGroupRangeTracker:()=>Vl,AxisLabel:()=>Io,Bar:()=>Ul,BarChart:()=>gh,BarLabel:()=>Dl,BarLinearPointer:()=>av,Barcode:()=>Tx,Box:()=>I,BoxElement:()=>Ji,BoxPlot:()=>Ah,BoxPlotChart:()=>Oh,BubbleChart:()=>Nh,Bullet:()=>qh,BulletChart:()=>Kh,Candlestick:()=>mh,CandlestickChart:()=>bh,CategoricalChart:()=>Da,CategoricalErrorBar:()=>fa,CategoricalPlotArea:()=>jc,CategoryAxis:()=>Mr,Chart:()=>zg,ChartAxis:()=>Cn,ChartContainer:()=>pp,ChartElement:()=>o,ChartPane:()=>On,ChartPlotArea:()=>Ln,ChartService:()=>Go,ChartWizardCommon:()=>qw,CircularGauge:()=>tm,Class:()=>M.Class,ClipAnimation:()=>vl,ClusterLayout:()=>hh,Crosshair:()=>ap,CrosshairTooltip:()=>rp,CurveProcessor:()=>kn,DateCategoryAxis:()=>jr,DateValueAxis:()=>Zr,DefaultAggregates:()=>Bp,DomEventsBuilder:()=>Yo,DonutChart:()=>Hd,DonutPlotArea:()=>Gd,DonutSegment:()=>zd,ErrorBarBase:()=>ca,ErrorRangeCalculator:()=>Gn,Extent:()=>Gb,FloatElement:()=>uo,FontLoader:()=>de,FormatService:()=>No,Gauge:()=>Oy,Gradients:()=>no,HashMap:()=>Wt,Highlight:()=>Hc,InstanceObserver:()=>Zt,IntlService:()=>zo,Legend:()=>Mu,LegendItem:()=>Au,LegendLayout:()=>hu,LineChart:()=>bl,LinePoint:()=>Wa,LineSegment:()=>qa,LinearGauge:()=>cv,LinearPointer:()=>Gy,LinearScale:()=>zy,Location:()=>J_,LogarithmicAxis:()=>on,Map:()=>j0,Matrix:()=>De,MousewheelZoom:()=>su,Navigator:()=>py,NavigatorHint:()=>iy,Note:()=>Ro,NumericAxis:()=>Xr,OHLCChart:()=>vc,OHLCPoint:()=>fc,Observable:()=>ii,Pane:()=>fp,Pannable:()=>tu,PieAnimation:()=>od,PieChart:()=>Id,PieChartMixin:()=>Td,PiePlotArea:()=>Rd,PieSegment:()=>Cd,PlotAreaBase:()=>Sp,PlotAreaEventsMixin:()=>Pp,PlotAreaFactory:()=>Iu,Point:()=>A,PointEventsMixin:()=>Ha,PolarAxis:()=>pn,QRCode:()=>F_,RadarCategoryAxis:()=>an,RadarLogarithmicAxis:()=>bn,RadarNumericAxis:()=>mn,RadialGauge:()=>Dv,RadialPointer:()=>Mv,RadialScale:()=>_v,RangeAreaChart:()=>cc,RangeAreaPoint:()=>Jp,RangeBar:()=>Vp,RangeBarChart:()=>Dp,RangePointer:()=>qv,Ring:()=>Fi,RootElement:()=>ho,Sankey:()=>bw,ScatterChart:()=>Vh,ScatterErrorBar:()=>Bh,ScatterLineChart:()=>hd,Sector:()=>Ui,Selection:()=>Fu,SeriesAggregator:()=>Op,SeriesBinder:()=>Dn,ShapeBuilder:()=>Xi,ShapeElement:()=>oo,SharedTooltip:()=>Xu,Sparkline:()=>Zg,SplineAreaSegment:()=>Ol,SplineSegment:()=>rl,StackWrap:()=>uh,StockChart:()=>dy,TemplateService:()=>Vt,Text:()=>vo,TextBox:()=>So,Title:()=>Mo,Tooltip:()=>Uu,UserEvents:()=>Ii,WaterfallChart:()=>Mc,WaterfallSegment:()=>_c,XYPlotArea:()=>gd,ZoomSelection:()=>ou,addClass:()=>vt,alignPathToPixel:()=>_t,anyHasZIndex:()=>ga,append:()=>ee,appendIfNotNull:()=>ya,applyEventMap:()=>Ne,areNumbers:()=>va,autoMajorUnit:()=>Bi,autoTextColor:()=>Me,barcodeValidator:()=>Ox,bindEvents:()=>ie,bindSegments:()=>xa,categoriesCount:()=>_a,chartBaseTheme:()=>mk,chartTheme:()=>Mk,clockwise:()=>bt,constants:()=>F,convertableToNumber:()=>kt,countNumbers:()=>Bn,createHashSet:()=>Ee,createOutOfRangePoints:()=>Ea,createPatternFill:()=>Qi,createSankeyData:()=>ww,cycleDown:()=>St,cycleIndex:()=>Ct,cycleUp:()=>At,deepExtend:()=>O,defaultErrorHandler:()=>Re,defined:()=>k,deg:()=>oe,elementOffset:()=>re,elementScale:()=>Te,elementSize:()=>ne,elementStyles:()=>Bt,equalsIgnoreCase:()=>ba,evalOptions:()=>ka,eventCoordinates:()=>se,eventElement:()=>ae,eventMap:()=>Fe,filterSeriesByType:()=>Aa,find:()=>Ae,findAxisByName:()=>Pn,gaugeTheme:()=>Pk,getAriaTemplate:()=>zt,getField:()=>Vn,getSpacing:()=>w,getSupportedFeatures:()=>qe,getTemplate:()=>jt,getter:()=>Ht,grep:()=>Nt,hasClasses:()=>Ut,hasGradientOverlay:()=>Pa,hasOwnProperty:()=>je,hasValue:()=>Ta,hashKey:()=>le,inArray:()=>u,interpolateValue:()=>Xt,isArray:()=>yt,isDateAxis:()=>Ma,isFunction:()=>Pt,isNumber:()=>m,isObject:()=>Ot,isPlainObject:()=>Qt,isString:()=>wt,keys:()=>Ve,last:()=>he,limitValue:()=>x,logToConsole:()=>M.logToConsole,map:()=>Kt,mousewheelDelta:()=>Jt,noop:()=>Ze,now:()=>Qe,objectKey:()=>pe,off:()=>Ye,on:()=>Xe,parseDateCategory:()=>Ca,qrcodeValidator:()=>H_,rad:()=>ce,rectToBox:()=>mo,removeClass:()=>xt,renderIcon:()=>we,round:()=>L,sankeyTheme:()=>Tk,segmentVisible:()=>ma,setDefaultOptions:()=>e,singleItemOrArray:()=>Oa,sparseArrayLimits:()=>ke,styleValue:()=>Lt,unbindEvents:()=>ue,valueOrDefault:()=>_}),{}),H=(z.r(F),z.d(F,{DEFAULT_PANE:()=>ay,NAVIGATOR_AXIS:()=>sy,NAVIGATOR_PANE:()=>ny}),"arc"),N="ArrowUp",U="ArrowDown",G="ArrowLeft",W="ArrowRight",X="aria-activedescendant",Y="#000",S="bottom",b="center",q="circle",Z=3,Q="cross",K="date",$="12px sans-serif",g=10,J="end",tt=/\{\d+:?/,et="height",it="inside",ot="inherit",C="left",rt=Number.MAX_VALUE,nt=-Number.MAX_VALUE,st="none",at="object",lt="outside",P="right",ht="roundedRect",pt="start",ct="string",T="top",ut="value",a="#fff",dt="width",y="x",v="y",ft="pointer",gt="horizontal";function yt(t){return Array.isArray(t)}function vt(t,e){for(var i=yt(e)?e:[e],o=0;o<i.length;o++){var r=i[o];-1===t.className.indexOf(r)&&(t.className+=" "+r)}}var mt=/\s+/g;function xt(t,e){t&&t.className&&(t.className=t.className.replace(e,"").replace(mt," "))}var M=z(593);function _t(t){var e=.5;t.options.stroke&&M.drawing.util.defined(t.options.stroke.width)&&t.options.stroke.width%2==0&&(e=0);for(var i=0;i<t.segments.length;i++)t.segments[i].anchor().round(0).translate(e,e);return t}function bt(t,e){return-t.x*e.y+t.y*e.x<0}function m(t){return"number"==typeof t&&!isNaN(t)}function wt(t){return typeof t===ct}function kt(t){return m(t)||wt(t)&&isFinite(t)}function At(t,e){return(t+1)%e}function St(t,e){t-=1;return t<0?e-1:t}function Ct(t,e){return 1===e||t%e==0?0:t<0?e+t%e:e<=t?t%e:t}function Pt(t){return"function"==typeof t}var Tt="object",Mt="undefined";function O(t){for(var e=arguments,i=arguments.length,o=1;o<i;o++)!function t(e,i){for(var o in i){var r,n,s;"__proto__"!==o&&"constructor"!==o&&((s=(n=typeof(r=i[o]))===Tt&&null!==r?r.constructor:null)&&s!==Array?r instanceof Date?e[o]=new Date(r.getTime()):Pt(r.clone)?e[o]=r.clone():(s=e[o],e[o]=typeof s===Tt&&s||{},t(e[o],r)):n!==Mt&&(e[o]=r))}}(t,e[o]);return t}function Ot(t){return"object"==typeof t}function Lt(t){return m(t)?t+"px":t}var It=/width|height|top|left|bottom|right/i;function Bt(t,e){var i=wt(e)?[e]:e;if(yt(i)){for(var o={},r=window.getComputedStyle(t),n=0;n<i.length;n++){var s=i[n];o[s]=It.test(s)?parseFloat(r[s]):r[s]}return o}if(Ot(e))for(var a in e)t.style[a]=Lt(e[a])}function w(t,e){void 0===e&&(e=0);var i={top:0,right:0,bottom:0,left:0};return"number"==typeof t?i[T]=i[P]=i[S]=i[C]=t:(i[T]=t[T]||e,i[P]=t[P]||e,i[S]=t[S]||e,i[C]=t[C]||e),i}function Et(){}var Rt={compile:function(t){return t}};Et.register=function(t){Rt=t},Et.compile=function(t,e){return Rt.compile(t,e)};let Vt=Et;function jt(t){var e;return(t=void 0===t?{}:t).template?t.template=e=Vt.compile(t.template):Pt(t.content)&&(e=t.content),e}function zt(t){var e;return(t=void 0===t?{}:t).ariaTemplate?t.ariaTemplate=e=Vt.compile(t.ariaTemplate):Pt(t.ariaContent)&&(e=t.ariaContent),e}var Dt=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g,Ft={};function Ht(t){var r;return Ft[t]||(r=[],t.replace(Dt,function(t,e,i,o){r.push(M.drawing.util.defined(e)?e:i||o)}),Ft[t]=function(t){for(var e=t,i=0;i<r.length&&e;i++)e=e[r[i]];return e}),Ft[t]}function Nt(t,e){for(var i=t.length,o=[],r=0;r<i;r++)e(t[r])&&o.push(t[r]);return o}function Ut(t,e){if(t.className)for(var i=e.split(" "),o=0;o<i.length;o++)if(t.className.indexOf&&-1!==t.className.indexOf(i[o]))return!0}Ft[void 0]=function(t){return t};function Gt(){this._map=new Map}Gt.prototype.get=function(t){return this._map.get(t)},Gt.prototype.set=function(t,e){this._map.set(t,e)};let Wt=Gt;function u(t,e){if(e)return-1!==e.indexOf(t)}function Xt(t,e,i){return M.drawing.util.round(t+(e-t)*i,Z)}function Yt(t,e){this.observer=t,this.handlerMap=O({},this.handlerMap,e)}var qt="trigger";Yt.prototype.trigger=function(t,e){var i,o=this.observer,r=this.handlerMap;return r[t]?i=this.callObserver(r[t],e):o[qt]&&(i=this.callObserver(qt,t,e)),i},Yt.prototype.callObserver=function(t){for(var e=[],i=arguments.length-1;0<i--;)e[i]=arguments[i+1];return this.observer[t].apply(this.observer,e)},Yt.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};let Zt=Yt;function Qt(t){return"[object Object]"===Object.prototype.toString.call(t)}function Kt(t,e){for(var i=t.length,o=[],r=0;r<i;r++){var n=e(t[r]);M.drawing.util.defined(n)&&o.push(n)}return o}var $t=M.support.browser||{};function Jt(t){var e=0;return t.wheelDelta?(e=-t.wheelDelta/120,$t.webkit&&(e/=2*Math.max(window.devicePixelRatio,.625))):t.detail&&(e=t.detail/3),0<e?Math.ceil(e):Math.floor(e)}function te(){}var t=M.drawing.util,ee=t.append,ie=t.bindEvents,k=t.defined,oe=t.deg,re=t.elementOffset,ne=t.elementSize,se=t.eventCoordinates,ae=t.eventElement,le=t.hashKey,he=t.last,x=t.limitValue,pe=t.objectKey,ce=t.rad,L=t.round,ue=t.unbindEvents,_=t.valueOrDefault;te.fetchFonts=function(i,o,r){void 0===r&&(r={depth:0}),!i||5<r.depth||!document.fonts||Object.keys(i).forEach(function(t){var e=i[t];"dataSource"!==t&&"$"!==t[0]&&e&&("font"===t?o.push(e):"object"==typeof e&&(r.depth++,te.fetchFonts(e,o,r),r.depth--))})},te.loadFonts=function(t,e){var i=[];if(0<t.length&&document.fonts){try{i=t.map(function(t){return document.fonts.load(t)})}catch(t){(0,M.logToConsole)(t)}Promise.all(i).then(e,e)}else e()},te.preloadFonts=function(t,e){var i=[];te.fetchFonts(t,i),te.loadFonts(i,e)};let de=te;function e(t,e){t=t.prototype;t.options?t.options=O({},t.options,e):t.options=e}function fe(t,e){this.element=t,this.options=O({},this.options,e),this.wrapper()}var ge,ye="k-i-",ve="k-svg-i-",t=(fe.prototype.wrapper=function(){this.addClasses()},fe.prototype.addClasses=function(){},fe.prototype.html=function(){return this.element.outerHTML},e(fe,{name:"",size:"none",themeColor:"none",flip:"default",iconClass:"",stylingOptions:["size","themeColor","fill"]}),(ge=fe)&&(me.__proto__=ge),((me.prototype=Object.create(ge&&ge.prototype)).constructor=me).prototype.wrapper=function(){var t=this.element.className.split(" ").find(function(t){return t.startsWith(ye)}),e=this.options.icon?(this.options.icon.startsWith(ye)?"":ye)+this.options.icon:"";this._className=e,vt(this.element,"k-icon"),vt(this.element,"k-font-icon"),xt(this.element,t),vt(this.element,e),vt(this.element,this.options.iconClass||""),ge.prototype.wrapper.call(this)},me);function me(t,e){ge.call(this,t,e)}e(t,{name:"HTMLFontIcon",icon:null});(xe=fe)&&(_e.__proto__=xe),((_e.prototype=Object.create(xe&&xe.prototype)).constructor=_e).prototype.wrapper=function(){var t=this.options.icon,e=this.options.iconClass,i=this.element.className.split(" ").find(function(t){return t.startsWith(ve)}),o=(!t&&e&&(o=e.match(/k-i-(\w+(?:-\w+)*)/))&&(t=o[1],e=e.replace(o[0],"")),wt(t)&&(t=t.replace("k-i-","").replace(/-./g,function(t){return t[1].toUpperCase()}),t=this.options.svgIcons[t]||this.options.svgIcons[t+"Icon"]),t&&t.name?ve+t.name:"");this._className=o,vt(this.element,"k-svg-icon"),xt(this.element,i),vt(this.element,o),vt(this.element,e||""),this.element.setAttribute("aria-hidden","true"),t&&Qt(t)&&((i=document.createElementNS("http://www.w3.org/2000/svg","svg")).setAttribute("viewBox",t.viewBox||""),i.setAttribute("focusable","false"),i.innerHTML=t.content||"",this.element.appendChild(i)),xe.prototype.wrapper.call(this)};var xe,i=_e;function _e(t,e){t.innerHTML="",xe.call(this,t,e)}e(i,{name:"HTMLSvgIcon",icon:null,svgIcons:{}});var be={svg:i,font:t};function we(t,e){return t&&(!Ot(t)||t instanceof HTMLElement)&&!wt(t)||(e=t,t=document.createElement("span")),(e=wt(e)?{icon:e}:e).type||(e.type="svg"),be[e.type]?new be[e.type](t,e).html():null}function ke(t){for(var e=rt,i=nt,o=0,r=t.length;o<r;o++){var n=t[o];null!==n&&isFinite(n)&&(e=Math.min(e,n),i=Math.max(i,n))}return{min:e===rt?void 0:e,max:i===nt?void 0:i}}function Ae(t,e){for(var i=0;i<t.length;i++){var o=t[i];if(e(o,i,t))return o}}var Se=M.geometry.Matrix,Ce=/matrix\((.*)\)/;function Pe(t){var t=getComputedStyle(t).transform;return"none"===t||null===(t=t.match(Ce))||2!==t.length?Se.unit():(t=t[1].split(",").map(function(t){return parseFloat(t)}),new(Function.prototype.bind.apply(Se,[null].concat(t))))}function Te(t){if(!t)return Se.unit();for(var e=Pe(t),i=t.parentElement;i;)var o=Pe(i),e=e.multiplyCopy(o),i=i.parentElement;return e.b=e.c=e.e=e.f=0,e}let Me=function(t){return new M.Color(t).isDark()?a:Y};var Oe={},Le=function(t){this._index={},this._values=t?t.slice(0):[];for(var e=0;e<this._values.length;e++)this._index[this._values[e]]=e},i={size:{configurable:!0}},Ie=(Le.prototype.values=function(){return this._values.filter(function(t){return t!==Oe})},Le.prototype.has=function(t){return void 0!==this._index[t]},Le.prototype.add=function(t){this.has(t)||(this._index[t]=this._values.length,this._values.push(t))},Le.prototype.delete=function(t){var e=this._index[t];void 0!==e&&(this._values[e]=Oe,delete this._index[t])},Le.prototype.clear=function(){this._index={},this._values=[]},i.size.get=function(){return this._values.length},Object.defineProperties(Le.prototype,i),function(t){this._set=new Set(t)}),t={size:{configurable:!0}},Be=(Ie.prototype.values=function(){return Array.from(this._set)},Ie.prototype.has=function(t){return this._set.has(t)},Ie.prototype.add=function(t){this._set.add(t)},Ie.prototype.delete=function(t){this._set.delete(t)},Ie.prototype.clear=function(){this._set.clear()},t.size.get=function(){return this._set.size},Object.defineProperties(Ie.prototype,t),function(){var t=!1;return t="function"==typeof Set?new Set([1]).has(1):t});function Ee(t){return new(Be()?Ie:Le)(t)}function Re(t){throw t}let Ve={INSERT:45,DELETE:46,BACKSPACE:8,TAB:9,ENTER:13,ESC:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,END:35,HOME:36,SPACEBAR:32,PAGEUP:33,PAGEDOWN:34,F2:113,F10:121,F12:123,NUMPAD_PLUS:107,NUMPAD_MINUS:109,NUMPAD_DOT:110};function je(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function ze(){this.height=0,this.width=0,this.data=[]}ze.prototype.clone=function(){var t=new ze;return t.height=this.height,t.width=this.width,t.data=this.data.map(function(t){return t.slice()}),t},ze.prototype.get=function(t,e){t=this.data[t];return t?t[e]:null},ze.prototype.set=function(t,e,i){var o=this.data[t];(o=null==o?this.data[t]=[]:o)[e]=i,t>=this.height&&(this.height=t+1),e>=this.width&&(this.width=e+1)},ze.prototype.each=function(t,e){for(var i=0;i<this.height;++i)for(var o=0;o<this.width;++o){var r=this.get(i,o);if((e||null!=r)&&void 0!==(r=t(r,i,o)))return r}},ze.prototype.map=function(o,t){var r=new ze;return this.each(function(t,e,i){r.set(e,i,o(t,e,i))},t),r},ze.prototype.transpose=function(){var o=new ze;return this.each(function(t,e,i){o.set(i,e,t)}),o},ze.prototype.unit=function(t){this.width=this.height=t;for(var e=this.data=new Array(t),i=t;0<=--i;)for(var o=e[i]=new Array(t),r=t;0<=--r;)o[r]=i===r?1:0;return this},ze.prototype.multiply=function(t){for(var e=new ze,i=0;i<this.height;++i)for(var o=0;o<t.width;++o){for(var r=0,n=0;n<this.width;++n){var s=this.get(i,n),a=t.get(n,o);"number"==typeof s&&"number"==typeof a&&(r+=s*a)}e.set(i,o,r)}return e},ze.prototype.inverse=function(){for(var n=this.width,t=this.augment((new ze).unit(n)),s=t.data,e=function(e){var t,i=((t,e,i)=>{for(var o=i(t),r=t,n=t+1;n<e;n++){var s=i(t);o<s&&(o=s,r=t)}return r})(e,n,function(t){return s[t][e]});if(!s[i][e])return{v:null};e!==i&&(t=s[e],s[e]=s[i],s[i]=t);for(var o=e+1;o<n;++o){for(var r=e+1;r<2*n;++r)s[o][r]-=s[e][r]*s[o][e]/s[e][e];s[o][e]=0}},i=0;i<n;++i){var o=e(i);if(o)return o.v}for(var r=0;r<n;++r)for(var a=s[r][r],l=0;l<2*n;++l)s[r][l]/=a;for(var h=n;0<=--h;)for(var p=h;0<=--p;)if(s[p][h])for(var c=2*n;--c>=n;)s[p][c]-=s[h][c]*s[p][h];return t.slice(0,n,n,n)},ze.prototype.augment=function(t){var o=this.clone(),r=o.width;return t.each(function(t,e,i){o.set(e,i+r,t)}),o},ze.prototype.slice=function(t,e,i,o){for(var r=new ze,n=0;n<i;++n)for(var s=0;s<o;++s)r.set(n,s,this.get(t+n,e+s));return r};let De=ze;var Fe={down:"pointerdown",move:"pointermove",up:"pointerup",cancel:"pointercancel pointerleave"};function He(t){return Fe[t]||t}var Ne=function(t){return t.replace(/([^ ]+)/g,He)};function Ue(){for(var t,e="",i=0;i<32;i++)t=16*Math.random()|0,8!==i&&12!==i&&16!==i&&20!==i||(e+="-"),e+=(12===i?4:16===i?3&t|8:t).toString(16);return e}var Ge=new WeakMap,We=Symbol("id");function Xe(t,e,i,o,r){var a,l,h,p;a=t,l=i,h=o,p=r,(yt(t=e)?t:(t||"").split(" ")).forEach(function(t){function e(t){var e=t.target?t.target.closest(n):null;(!n||t.target&&e)&&(e=n?e:t.currentTarget,Object.defineProperty(t,"currentTarget",{value:e}),Object.defineProperty(t,"delegateTarget",{value:i}),s(t))}var i,o,r,n,s;i=a,t=t,r=p,s=h,(o=l)&&Pt(o)&&!h?s=o:o&&"string"==typeof o&&Pt(s)&&(n=o),s[We]||(s[We]=Ue()),(o=Ge.get(i))||(o=new Map,Ge.set(i,o)),o.set(t+s[We],e),i.addEventListener(t,e,Boolean(r))})}function Ye(t,e,i,o,r){var s,a,l;s=t,a=i,l=o,(yt(t=e)?t:(t||"").split(" ")).forEach(function(t){var e,i,o,r,n;e=s,t=t,i=a,o=l,(n=Ge.get(e))&&i&&i[We]&&(i=t+i[We],r=n.get(i),n.delete(i),r)&&e.removeEventListener(t,r,Boolean(o))})}function qe(){var t=(t=>{var e,i=!1,o={wp:/(Windows Phone(?: OS)?)\s(\d+)\.(\d+(\.\d+)?)/,fire:/(Silk)\/(\d+)\.(\d+(\.\d+)?)/,android:/(Android|Android.*(?:Opera|Firefox).*?\/)\s*(\d+)\.?(\d+(\.\d+)?)?/,iphone:/(iPhone|iPod).*OS\s+(\d+)[\._]([\d\._]+)/,ipad:/(iPad).*OS\s+(\d+)[\._]([\d_]+)/,playbook:/(PlayBook).*?Tablet\s*OS\s*(\d+)\.(\d+(\.\d+)?)/,windows:/(MSIE)\s+(\d+)\.(\d+(\.\d+)?)/,tizen:/(tizen).*?Version\/(\d+)\.(\d+(\.\d+)?)/i,sailfish:/(sailfish).*rv:(\d+)\.(\d+(\.\d+)?).*firefox/i},r={ios:/^i(phone|pad|pod)$/i,android:/^android|fire$/i,windows:/windows/,wp:/wp/,flat:/sailfish|ffos|tizen/i};for(e in o)if(t.match(o[e])){if("windows"===e&&"plugins"in navigator)return!1;(i={}).device=e,i.name=((t,e,i)=>{for(var o in e)if(e[o].test(t))return o;return void 0!==i?i:t})(e,r),i[i.name]=!0;break}return i})(navigator.userAgent),e={};return e.mobileOS=t,e}function Ze(){}function Qe(){return(new Date).getTime()}function Ke(){this._defaultPrevented=!0}function $e(){return!0===this._defaultPrevented}var Je,ti="function";function ei(){Je.call(this),this._events={}}(Je=M.Class)&&(ei.__proto__=Je),((ei.prototype=Object.create(Je&&Je.prototype)).constructor=ei).prototype.destroy=function(){this.unbind()},ei.prototype.bind=function(t,e,i){var o,r,n=this,s="string"==typeof t?[t]:t||[],a=typeof e==ti;if(void 0===e)for(l in t)n.bind(l,t[l]);else for(var l=0,h=s.length;l<h;l++)(()=>{var t=s[l];(r=a?e:e[t])&&(i&&(o=r,(r=function(){n.unbind(t,r),o.apply(n,arguments)}).original=o),(n._events[t]=n._events[t]||[]).push(r))})();return n},ei.prototype.one=function(t,e){return this.bind(t,e,!0)},ei.prototype.first=function(t,e){for(var i,o="string"==typeof t?[t]:t,r=typeof e==ti,n=0,s=o.length;n<s;n++){var a=o[n];(i=r?e:e[a])&&(this._events[a]=this._events[a]||[]).unshift(i)}return this},ei.prototype.trigger=function(t,e){var i,o,r=this._events[t];if(r){var n=e||{};for(n.sender=this,n._defaultPrevented=!1,n.preventDefault=Ke,n.isDefaultPrevented=$e,i=0,o=(r=r.slice()).length;i<o;i++)r[i].call(this,n);return!0===n._defaultPrevented}return!1},ei.prototype.unbind=function(t,e){var i,o=this._events[t];if(void 0===t)this._events={};else if(o)if(e)for(i=o.length-1;0<=i;i--)o[i]!==e&&o[i].original!==e||o.splice(i,1);else this._events[t]=[];return this},ei.prototype._setEvents=function(t){for(var e=(this.events||[]).length,i=0;i<e;i++){var o=this.events[i];this.options[o]&&t[o]&&(this.unbind(o,this.options[o]),this._events)&&this._events[o]&&delete this._events[o]}this.bind(this.events,t)};let ii=ei;function oi(t){t.preventDefault()}var ri=Object.assign,ni=800,si=0,ai="move",li="tap",hi="doubleTap",pi="release",ci="gesturechange",ui="gestureend",di="gesturetap",fi={api:0,touch:0,mouse:9,pointer:9};function gi(t){var e=[],i=t.originalEvent||t;return e.push(t.api?{id:2,event:t,target:t.target,currentTarget:t.target,location:t,type:"api"}:{location:i,event:t,target:t.target,currentTarget:t.currentTarget,id:i.pointerId,type:"pointer"}),e}(vi=M.Class)&&(bi.__proto__=vi),((bi.prototype=Object.create(vi&&vi.prototype)).constructor=bi).prototype.move=function(t){var e=this,i=t["page"+e.axis],o=Qe(),r=o-e.timeStamp||1;!i&&this.invalidZeroEvents||(e.delta=i-e.location,e._updateLocationData(t),e.initialDelta=i-e.startLocation,e.velocity=e.delta/r,e.timeStamp=o)},bi.prototype._updateLocationData=function(t){var e=this.axis;this.location=t["page"+e],this.client=t["client"+e],this.screen=t["screen"+e]};var yi,vi,mi=bi,xi=((yi=M.Class)&&(_i.__proto__=yi),((_i.prototype=Object.create(yi&&yi.prototype)).constructor=_i).prototype.press=function(){var t=this;this._holdTimeout=setTimeout(function(){return t._hold()},this.userEvents.minHold),this._trigger("press",this.pressEvent)},_i.prototype._tap=function(t){var e=this;e.userEvents._clicks++,1===e.userEvents._clicks&&(e._clickTimeout=setTimeout(function(){1===e.userEvents._clicks?e._trigger(li,t):e._trigger(hi,t),e.userEvents._clicks=0},300))},_i.prototype._hold=function(){this._trigger("hold",this.pressEvent)},_i.prototype.move=function(t){var e=this,i="api"!==t.type&&e.userEvents._shouldNotMove;if(!e._finished&&!i){if(e.x.move(t.location),e.y.move(t.location),!e._moved){if(e._withinIgnoreThreshold())return;if(Oi.current&&Oi.current!==e.userEvents)return e.dispose();e._start(t)}e._finished||e._trigger(ai,t)}},_i.prototype.end=function(t){this.endTime=Qe(),this._finished||(this._finished=!0,this._trigger(pi,t),this._moved?this._trigger("end",t):this.supportDoubleTap?this._tap(t):this._trigger(li,t),clearTimeout(this._holdTimeout),this.dispose())},_i.prototype.dispose=function(){var t=this.userEvents.touches||[],e=(this._finished=!0,this.pressEvent=null,clearTimeout(this._holdTimeout),t.indexOf(this));t.splice(e,1)},_i.prototype.skip=function(){this.dispose()},_i.prototype.cancel=function(){this.dispose()},_i.prototype.isMoved=function(){return this._moved},_i.prototype._start=function(t){clearTimeout(this._holdTimeout),this.startTime=Qe(),this._moved=!0,this._trigger("start",t)},_i.prototype._trigger=function(t,e){var e=e.event,i={touch:this,x:this.x,y:this.y,target:this.target,event:e};this.userEvents.notify(t,i)&&e.preventDefault()},_i.prototype._withinIgnoreThreshold=function(){var t=this.x.initialDelta,e=this.y.initialDelta;return Math.sqrt(t*t+e*e)<=this.threshold},_i);function _i(t,e,i){yi.call(this),ri(this,{x:new mi("X",i.location),y:new mi("Y",i.location),type:i.type,threshold:t.threshold||fi[i.type],userEvents:t,target:e,currentTarget:i.currentTarget,initialTouch:i.target,id:i.id,pressEvent:i,_clicks:t._clicks,supportDoubleTap:t.supportDoubleTap,_moved:!1,_finished:!1})}function bi(t,e){vi.call(this);var i=this;i.support=qe(),i.invalidZeroEvents=this.support.mobileOS&&this.support.mobileOS.android,i.axis=t,i._updateLocationData(e),i.startLocation=i.location,i.velocity=i.delta=0,i.timeStamp=Qe()}function wi(t){for(var e=Fe.up.split(" "),i=0,o=e.length;i<o;i++)t(e[i])}(ki=ii)&&(Li.__proto__=ki),((Li.prototype=Object.create(ki&&ki.prototype)).constructor=Li).prototype.preventIfMoving=function(t){this._isMoved()&&t.preventDefault()},Li.prototype.destroy=function(){var e,i=this,t=this.options,o=this.element;i._destroyed||(i._destroyed=!0,i.captureUpIfMoved&&(e=i.surface,wi(function(t){e.removeEventListener(t,i._preventIfMovingProxy,!0)})),Ye(i.surface,Ne("move"),this._surfaceMoveHandler),Ye(i.surface,Ne("up cancel"),this._surfaceEndHandler),Ye(o,Ne("down"),this._elementStartHandler),t.preventDragEvent&&Ye(o,Ne("dragstart"),this._elementDragStartHandler),Ye(o,Ne("mousedown"),this._elementSelectHandler),i._disposeAll(),i.unbind(),delete i.surface,delete i.element,delete i.currentTarget)},Li.prototype.capture=function(){Li.current=this},Li.prototype.cancel=function(){this._disposeAll(),this.trigger("cancel")},Li.prototype.notify=function(t,e){var i,o,r,n,s=this.touches,a=t;if(this._isMultiTouch()){switch(a){case ai:a=ci;break;case"end":a=ui;break;case li:a=di}ri(e,{touches:s},(t=s[0],s=s[1],i=t.x.location,t=t.y.location,r=i-(o=s.x.location),n=t-(s=s.y.location),{center:{x:(i+o)/2,y:(t+s)/2},distance:Math.sqrt(r*r+n*n)}))}return this.trigger(a,ri(e,{type:a}))},Li.prototype.press=function(t,e,i){this._apiCall("_start",t,e,i)},Li.prototype.move=function(t,e){this._apiCall("_move",t,e)},Li.prototype.end=function(t,e){this._apiCall("_end",t,e)},Li.prototype._isMultiTouch=function(){return 1<this.touches.length},Li.prototype._maxTouchesReached=function(){return this.touches.length>=this._maxTouches},Li.prototype._disposeAll=function(){for(var t=this.touches;0<t.length;)t.pop().dispose()},Li.prototype._isMoved=function(){return Nt(this.touches,function(t){return t.isMoved()}).length},Li.prototype._select=function(t){this.allowSelection&&!this.trigger("select",{event:t})||t.preventDefault()},Li.prototype._start=function(t){if(!(t.which&&1<t.which||this._maxTouchesReached())){Li.current=null,this.currentTarget=t.currentTarget,this.stopPropagation&&t.stopPropagation();for(var e=gi(t),i=0;i<e.length&&!this._maxTouchesReached();i++){var o,r=e[i];(o=this.filter?r.currentTarget:this.element)&&0===o.length||(o=new xi(this,o,r),this.touches.push(o),o.press(),this._isMultiTouch()&&this.notify("gesturestart",{}))}}},Li.prototype._move=function(t){this._eachTouch("move",t)},Li.prototype._end=function(t){this._eachTouch("end",t)},Li.prototype._eachTouch=function(t,e){for(var i,o,r,n={},s=gi(e),a=this.touches,l=0;l<a.length;l++)n[(i=a[l]).id]=i;for(l=0;l<s.length;l++)(r=n[(o=s[l]).id])&&("move"!==t||"pointer"!==o.type||this.surface.hasPointerCapture(o.id)||this.surface.setPointerCapture(o.id),r[t](o))},Li.prototype._apiCall=function(t,e,i,o){this[t]({api:!0,pageX:e,pageY:i,clientX:e,clientY:i,target:o||this.element,stopPropagation:Ze,preventDefault:Ze})},Li.defaultThreshold=function(t){si=t},Li.minHold=function(t){ni=t};var ki,Ai,Si,Ci,Pi,Ti,Mi,Oi=Li;function Li(t,e){ki.call(this);var i,o=this,r=qe();this.support=r,this.options=e=e||{},r=o.filter=e.filter,o.threshold=e.threshold||si,o.minHold=e.minHold||ni,o.touches=[],o._maxTouches=e.multiTouch?2:1,o.allowSelection=e.allowSelection,o.captureUpIfMoved=e.captureUpIfMoved,o._clicks=0,o.supportDoubleTap=e.supportDoubleTap,ri(o,{element:t,surface:e.surface||t,stopPropagation:e.stopPropagation,pressed:!1}),this._surfaceMoveHandler=this._move.bind(this),Xe(o.surface,Ne("move"),this._surfaceMoveHandler),this._surfaceEndHandler=this._end.bind(this),Xe(o.surface,Ne("up cancel"),this._surfaceEndHandler),this._elementStartHandler=this._start.bind(this),Xe(t,Ne("down"),r,this._elementStartHandler),t.style["touch-action"]=e.touchAction||"none",e.preventDragEvent&&(this._elementDragStartHandler=oi,Xe(t,Ne("dragstart"),this._elementDragStartHandler)),this._elementSelectHandler=this._select.bind(this),Xe(t,Ne("mousedown"),r,this._elementSelectHandler),o.captureUpIfMoved&&(i=o.surface,o._preventIfMovingProxy=o.preventIfMoving.bind(o),wi(function(t){i.addEventListener(t,o._preventIfMovingProxy,!0)})),o.bind(["press","hold",li,hi,"start",ai,"end",pi,"cancel","gesturestart",ci,ui,di,"select"],e)}let Ii=Oi;function Bi(t,e){t=L(e-t,g-1);if(0===t){if(0===e)return.1;t=Math.abs(e)}e=Math.pow(10,Math.floor(Math.log(t)/Math.log(10))),t=L(t/e,g);return L(e*(t<1.904762?.2:t<4.761904?.5:t<9.523809?1:2),g)}(Ai=M.Class)&&(Ei.__proto__=Ai),((Ei.prototype=Object.create(Ai&&Ai.prototype)).constructor=Ei).prototype.clone=function(){return new Ei(this.x,this.y)},Ei.prototype.equals=function(t){return t&&this.x===t.x&&this.y===t.y},Ei.prototype.rotate=function(t,e){var e=ce(e),i=Math.cos(e),e=Math.sin(e),o=t.x,t=t.y,r=this.x,n=this.y;return this.x=L(o+(r-o)*i+(n-t)*e,Z),this.y=L(t+(n-t)*i-(r-o)*e,Z),this},Ei.prototype.multiply=function(t){return this.x*=t,this.y*=t,this},Ei.prototype.distanceTo=function(t){var e=this.x-t.x,t=this.y-t.y;return Math.sqrt(e*e+t*t)},Ei.onCircle=function(t,e,i){e=ce(e);return new Ei(t.x-i*Math.cos(e),t.y-i*Math.sin(e))};let A=Ei;function Ei(t,e){Ai.call(this),this.x=t||0,this.y=e||0}function Ri(t,e,i,o){Si.call(this),this.x1=t||0,this.y1=e||0,this.x2=i||0,this.y2=o||0}function Vi(t,e,i,o,r){r=ce(r);return new A(i+(t-i)*Math.cos(r)+(e-o)*Math.sin(r),o-(t-i)*Math.sin(r)+(e-o)*Math.cos(r))}(Si=M.Class)&&(Ri.__proto__=Si),((Ri.prototype=Object.create(Si&&Si.prototype)).constructor=Ri).prototype.equals=function(t){return this.x1===t.x1&&this.x2===t.x2&&this.y1===t.y1&&this.y2===t.y2},Ri.prototype.width=function(){return this.x2-this.x1},Ri.prototype.height=function(){return this.y2-this.y1},Ri.prototype.translate=function(t,e){return this.x1+=t,this.x2+=t,this.y1+=e,this.y2+=e,this},Ri.prototype.move=function(t,e){var i=this.height(),o=this.width();return k(t)&&(this.x1=t,this.x2=this.x1+o),k(e)&&(this.y1=e,this.y2=this.y1+i),this},Ri.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},Ri.prototype.wrapPoint=function(t){var e=yt(t),i=e?t[0]:t.x,e=e?t[1]:t.y;return this.wrap(new Ri(i,e,i,e)),this},Ri.prototype.snapTo=function(t,e){return e!==y&&e||(this.x1=t.x1,this.x2=t.x2),e!==v&&e||(this.y1=t.y1,this.y2=t.y2),this},Ri.prototype.alignTo=function(t,e){var i,o,r=this.height(),n=this.width(),s=e===T||e===S?v:y,a=s==v?r:n;return e===b?(i=t.center(),o=this.center(),this.x1+=i.x-o.x,this.y1+=i.y-o.y):this[s+1]=e===T||e===C?t[s+1]-a:t[s+2],this.x2=this.x1+n,this.y2=this.y1+r,this},Ri.prototype.shrink=function(t,e){return this.x2-=t,this.y2-=e,this},Ri.prototype.expand=function(t,e){return this.shrink(-t,-e),this},Ri.prototype.pad=function(t){t=w(t);return this.x1-=t.left,this.x2+=t.right,this.y1-=t.top,this.y2+=t.bottom,this},Ri.prototype.unpad=function(t){t=w(t);return t.left=-t.left,t.top=-t.top,t.right=-t.right,t.bottom=-t.bottom,this.pad(t)},Ri.prototype.clone=function(){return new Ri(this.x1,this.y1,this.x2,this.y2)},Ri.prototype.center=function(){return new A(this.x1+this.width()/2,this.y1+this.height()/2)},Ri.prototype.containsPoint=function(t){return t.x>=this.x1&&t.x<=this.x2&&t.y>=this.y1&&t.y<=this.y2},Ri.prototype.points=function(){return[new A(this.x1,this.y1),new A(this.x2,this.y1),new A(this.x2,this.y2),new A(this.x1,this.y2)]},Ri.prototype.getHash=function(){return[this.x1,this.y1,this.x2,this.y2].join(",")},Ri.prototype.overlaps=function(t){return!(t.y2<this.y1||this.y2<t.y1||t.x2<this.x1||this.x2<t.x1)},Ri.prototype.rotate=function(t){var e=this.width(),i=this.height(),o=this.center(),r=o.x,o=o.y,n=Vi(0,0,r,o,t),s=Vi(e,0,r,o,t),a=Vi(e,i,r,o,t),r=Vi(0,i,r,o,t),e=Math.max(n.x,s.x,a.x,r.x)-Math.min(n.x,s.x,a.x,r.x),i=Math.max(n.y,s.y,a.y,r.y)-Math.min(n.y,s.y,a.y,r.y);return this.x2=this.x1+e,this.y2=this.y1+i,this},Ri.prototype.toRect=function(){return new M.geometry.Rect([this.x1,this.y1],[this.width(),this.height()])},Ri.prototype.hasSize=function(){return 0!==this.width()&&0!==this.height()},Ri.prototype.align=function(t,e,i){var o=e+1,r=e+2,e=e===y?dt:et,n=this[e]();u(i,[C,T])?(this[o]=t[o],this[r]=this[o]+n):u(i,[P,S])?(this[r]=t[r],this[o]=this[r]-n):i===b&&(this[o]=t[o]+(t[e]()-n)/2,this[r]=this[o]+n)};let I=Ri,ji=((Ci=M.Class)&&(zi.__proto__=Ci),((zi.prototype=Object.create(Ci&&Ci.prototype)).constructor=zi).prototype.clone=function(){return new zi(this.center,this.innerRadius,this.radius,this.startAngle,this.angle)},zi.prototype.middle=function(){return this.startAngle+this.angle/2},zi.prototype.setRadius=function(t,e){return e?this.innerRadius=t:this.radius=t,this},zi.prototype.point=function(t,e){var t=ce(t),i=Math.cos(t),t=Math.sin(t),e=e?this.innerRadius:this.radius,i=L(this.center.x-i*e,Z),t=L(this.center.y-t*e,Z);return new A(i,t)},zi.prototype.adjacentBox=function(t,e,i){var t=this.clone().expand(t),o=t.middle(),t=t.point(o),r=e/2,n=i/2,s=Math.sin(ce(o)),o=Math.cos(ce(o)),a=t.x-r,t=t.y-n;return Math.abs(s)<.9&&(a+=r*-o/Math.abs(o)),Math.abs(o)<.9&&(t+=n*-s/Math.abs(s)),new I(a,t,a+e,t+i)},zi.prototype.containsPoint=function(t){var e=this.center,i=this.innerRadius,o=this.radius,r=this.startAngle,n=this.startAngle+this.angle,s=t.x-e.x,t=t.y-e.y,a=new A(s,t),r=this.point(r),r=new A(r.x-e.x,r.y-e.y),n=this.point(n),n=new A(n.x-e.x,n.y-e.y),e=L(s*s+t*t,Z);return(r.equals(a)||bt(r,a))&&!bt(n,a)&&i*i<=e&&e<=o*o},zi.prototype.getBBox=function(){for(var t=new I(rt,rt,nt,nt),e=L(this.startAngle%360),i=L((e+this.angle)%360),o=this.innerRadius,r=[0,90,180,270,e,i].sort(Di),n=r.indexOf(e),s=r.indexOf(i),a=e===i?r:n<s?r.slice(n,s+1):[].concat(r.slice(0,s+1),r.slice(n,r.length)),l=0;l<a.length;l++){var h=this.point(a[l]);t.wrapPoint(h),t.wrapPoint(h,o)}return o||t.wrapPoint(this.center),t},zi.prototype.expand=function(t){return this.radius+=t,this},zi);function zi(t,e,i,o,r){Ci.call(this),this.center=t,this.innerRadius=e,this.radius=i,this.startAngle=o,this.angle=r}function Di(t,e){return t-e}let Fi=ji,Hi=((Pi=Fi)&&(Ni.__proto__=Pi),((Ni.prototype=Object.create(Pi&&Pi.prototype)).constructor=Ni).prototype.expand=function(t){return Pi.prototype.expand.call(this,t)},Ni.prototype.clone=function(){return new Ni(this.center,this.radius,this.startAngle,this.angle)},Ni.prototype.setRadius=function(t){return this.radius=t,this},Ni);function Ni(t,e,i,o){Pi.call(this,t,0,e,i,o)}let Ui=Hi,Gi=((Ti=M.Class)&&(Wi.__proto__=Ti),((Wi.prototype=Object.create(Ti&&Ti.prototype)).constructor=Wi).prototype.createRing=function(t,e){var i=t.startAngle+180,o=t.angle+i,r=((0===t.angle||0<t.angle&&i===o)&&(o+=.001),new M.geometry.Point(t.center.x,t.center.y)),n=Math.max(t.radius,0),t=Math.max(t.innerRadius,0),n=new M.geometry.Arc(r,{startAngle:i,endAngle:o,radiusX:n,radiusY:n}),e=M.drawing.Path.fromArc(n,e).close();return t?(n.radiusX=n.radiusY=t,n=n.pointAt(o),e.lineTo(n.x,n.y),e.arc(o,i,t,t,!0)):e.lineTo(r.x,r.y),e},Wi);function Wi(){Ti.apply(this,arguments)}Gi.current=new Gi;let Xi=Gi,Yi=((Mi=M.Class)&&(qi.__proto__=Mi),((qi.prototype=Object.create(Mi&&Mi.prototype)).constructor=qi).prototype.initUserOptions=function(t){return t},qi.prototype.reflow=function(t){for(var e,i=this.children,o=0;o<i.length;o++){var r=i[o];r.reflow(t),e=e?e.wrap(r.box):r.box.clone()}this.box=e||t},qi.prototype.destroy=function(){var t=this.children;this.animation&&this.animation.destroy();for(var e=0;e<t.length;e++)t[e].destroy()},qi.prototype.getRoot=function(){var t=this.parent;return t?t.getRoot():null},qi.prototype.getSender=function(){var t=this.getService();if(t)return t.sender},qi.prototype.getService=function(){for(var t=this;t;){if(t.chartService)return t.chartService;t=t.parent}},qi.prototype.translateChildren=function(t,e){for(var i=this.children,o=i.length,r=0;r<o;r++)i[r].box.translate(t,e)},qi.prototype.append=function(){for(var t=arguments,e=0;e<arguments.length;e++){var i=t[e];this.children.push(i),i.parent=this}},qi.prototype.renderVisual=function(){!1!==this.options.visible&&(this.createVisual(),this.addVisual(),this.renderChildren(),this.createAnimation(),this.renderComplete())},qi.prototype.addVisual=function(){this.visual&&(this.visual.chartElement=this).parent&&this.parent.appendVisual(this.visual)},qi.prototype.renderChildren=function(){for(var t=this.children,e=t.length,i=0;i<e;i++)t[i].renderVisual()},qi.prototype.createVisual=function(){this.visual=new M.drawing.Group({zIndex:this.options.zIndex,visible:_(this.options.visible,!0)})},qi.prototype.createAnimation=function(){this.visual&&this.options.animation&&(this.animation=M.drawing.Animation.create(this.visual,this.options.animation))},qi.prototype.appendVisual=function(t){t.chartElement||(t.chartElement=this),t.options.noclip?this.clipRoot().visual.append(t):k(t.options.zIndex)?this.stackRoot().stackVisual(t):this.isStackRoot?this.stackVisual(t):this.visual?this.visual.append(t):this.parent.appendVisual(t)},qi.prototype.clipRoot=function(){return this.parent?this.parent.clipRoot():this},qi.prototype.stackRoot=function(){return this.parent?this.parent.stackRoot():this},qi.prototype.stackVisual=function(t){for(var e=t.options.zIndex||0,i=this.visual.children,o=i.length,r=0;r<o;r++){var n=i[r];if(_(n.options.zIndex,0)>e)break}this.visual.insert(r,t)},qi.prototype.traverse=function(t){for(var e=this.children,i=e.length,o=0;o<i;o++){var r=e[o];t(r),r.traverse&&r.traverse(t)}},qi.prototype.closest=function(t){for(var e=this,i=!1;e&&!i;)(i=t(e))||(e=e.parent);if(i)return e},qi.prototype.renderComplete=function(){},qi.prototype.hasHighlight=function(){var t=(this.options||{}).highlight;return!(!this.createHighlight||t&&!1===t.visible||!1===this.visible)},qi.prototype.toggleHighlight=function(t,e){var i=this,o=(this.options||{}).highlight||{},r=o.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 i.createHighlight(s)},sender:this.getSender(),series:this.series,dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,runningTotal:this.runningTotal,total:this.total}))))return}else n=this._highlight=this.createHighlight(s);k(n.options.zIndex)||(n.options.zIndex=_(o.zIndex,this.options.zIndex)),this.appendVisual(n)}n.visible(t)},qi.prototype.toggleFocusHighlight=function(t){var e,i=(this.options||{}).focusHighlight||{},o=this._focusHighlight;(t||o)&&(o||(e=this.getRoot().options.background,e=Me(e),e={fill:{opacity:i.opacity,color:i.color},stroke:Object.assign({},{color:e},i.border),zIndex:i.zIndex},o=this._focusHighlight=this.createFocusHighlight(e),this.appendVisual(o)),o.visible(t))},qi.prototype.createGradientOverlay=function(t,e,i){i=new M.drawing.Path(Object.assign({stroke:{color:"none"},fill:this.createGradient(i),closed:t.options.closed},e));return i.segments.elements(t.segments.elements()),i},qi.prototype.createGradient=function(t){if(this.parent)return this.parent.createGradient(t)},qi.prototype.supportsPointInactiveOpacity=function(){return!0},qi);function qi(t){Mi.call(this),this.children=[],this.options=O({},this.options,this.initUserOptions(t))}Yi.prototype.options={};let o=Yi;var Zi={dots:M.drawing.dotsPattern,verticalStripes:M.drawing.verticalStripesPattern,crosshatch:M.drawing.crosshatchPattern,diagonalStripes:M.drawing.diagonalStripesPattern,grid:M.drawing.gridPattern};function Qi(t,e,i){i=Pt(t=t)?t(i):t,t=i&&Zi[i.type];return t?t(Object.assign({},e,i)):e}(Ki=o)&&($i.__proto__=Ki),(($i.prototype=Object.create(Ki&&Ki.prototype)).constructor=$i).prototype.reflow=function(t){function e(){o.align(t,y,r.align),o.align(t,v,r.vAlign),o.paddingBox=i.clone().unpad(h).unpad(c)}var i,o=this,r=this.options,n=r.width,s=r.height,a=r.shrinkToFit,l=n&&s,h=r.margin,p=r.padding,c=r.border.width,u=t.clone();l&&(u.x2=u.x1+n,u.y2=u.y1+s),a&&u.unpad(h).unpad(c).unpad(p),Ki.prototype.reflow.call(this,u),i=l?this.box=new I(0,0,n,s):this.box,a&&l?(e(),u=this.contentBox=this.paddingBox.clone().unpad(p)):(u=this.contentBox=i.clone(),i.pad(p).pad(c).pad(h),e()),this.translateChildren(i.x1-u.x1+h.left+c+p.left,i.y1-u.y1+h.top+c+p.top);for(var d=this.children,f=0;f<d.length;f++){var g=d[f];g.reflow(g.box)}},$i.prototype.align=function(t,e,i){this.box.align(t,e,i)},$i.prototype.hasBox=function(){var t=this.options;return t.border.width||t.background},$i.prototype.createVisual=function(){Ki.prototype.createVisual.call(this),this.options.visible&&this.hasBox()&&this.visual.append(M.drawing.Path.fromRect(this.paddingBox.toRect(),this.visualStyle()))},$i.prototype.visualStyle=function(){var t=this.options,e=t.border||{};return{stroke:{width:e.width,color:e.color,opacity:_(e.opacity,t.opacity),dashType:e.dashType},fill:Qi(t.pattern,{color:t.background,opacity:t.opacity},void 0),cursor:t.cursor}};var Ki,i=$i;function $i(t){Ki.call(this,t),this.options.margin=w(this.options.margin),this.options.padding=w(this.options.padding)}e(i,{align:C,vAlign:T,margin:{},padding:{},border:{color:Y,width:0},background:"",shrinkToFit:!1,width:0,height:0,visible:!0});let Ji=i;function to(t,e){e&&(t.options.className=e.className,t.options.role=e.role,t.options.ariaLabel=e.ariaLabel,t.options.ariaRoleDescription=e.ariaRoleDescription,t.options.ariaChecked=e.ariaChecked)}(eo=Ji)&&(io.__proto__=eo),((io.prototype=Object.create(eo&&eo.prototype)).constructor=io).prototype.getElement=function(){var t,e,i=this.options,o=this.paddingBox,r=i.type,n=i.rotation,s=o.center(),a=o.width()/2,l=o.height()/2;return i.visible&&this.hasBox()?(e=this.visualStyle(),r===q?t=new M.drawing.Circle(new M.geometry.Circle([L(o.x1+a,Z),L(o.y1+l,Z)],Math.min(a,l)),e):"triangle"===r?t=M.drawing.Path.fromPoints([[o.x1+a,o.y1],[o.x1,o.y2],[o.x2,o.y2]],e).close():r===Q?((t=new M.drawing.MultiPath(e)).moveTo(o.x1,o.y1).lineTo(o.x2,o.y2),t.moveTo(o.x1,o.y2).lineTo(o.x2,o.y1)):(l=o.toRect(),r===ht&&(a=_(i.borderRadius,l.width()/5),l.setCornerRadius(a)),t=M.drawing.Path.fromRect(l,e)),n&&t.transform(M.geometry.transform().rotate(-n,[s.x,s.y])),t.options.zIndex=i.zIndex,t):null},io.prototype.createElement=function(){var t=this,e=this.options.visual,i=this.pointData||{};return e?e({value:i.value,dataItem:i.dataItem,sender:this.getSender(),series:i.series,category:i.category,rect:this.paddingBox.toRect(),options:this.visualOptions(),createVisual:function(){return t.getElement()}}):this.getElement()},io.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}},io.prototype.createVisual=function(){this.visual=this.createElement(),to(this.visual,this.options.accessibilityOptions)};var eo,t=io;function io(t,e){eo.call(this,t),this.pointData=e}e(t,{type:q,align:b,vAlign:b});let oo=t,ro="radial",no={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:ro,stops:[{offset:0,color:a,opacity:.55},{offset:.65,color:a,opacity:0},{offset:.95,color:a,opacity:.25}]},roundedBevel:{type:ro,stops:[{offset:.33,color:a,opacity:.06},{offset:.83,color:a,opacity:.2},{offset:.95,color:a,opacity:0}]},roundedGlass:{type:ro,supportVML:!1,stops:[{offset:0,color:a,opacity:0},{offset:.5,color:a,opacity:.3},{offset:.99,color:a,opacity:0}]},sharpGlass:{type:ro,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:ro,center:[.5,.5],radius:.5}};(so=o)&&(lo.__proto__=so),((lo.prototype=Object.create(so&&so.prototype)).constructor=lo).prototype.reflow=function(){var t=this.options,e=this.children,i=new I(0,0,t.width,t.height);this.box=i.unpad(t.margin);for(var o,r,n,s,a,l,h,p,c,u,d,f=0;f<e.length;f++)e[f].reflow(i),o=i,r=e[f].box,d=u=c=p=h=l=a=s=n=void 0,i=(o.x1===r.x1&&o.y1===r.y1&&o.x2===r.x2&&o.y2===r.y2?r:(n=Math.min(o.x1,r.x1),s=Math.max(o.x1,r.x1),a=Math.min(o.x2,r.x2),l=Math.max(o.x2,r.x2),h=Math.min(o.y1,r.y1),p=Math.max(o.y1,r.y1),c=Math.min(o.y2,r.y2),u=Math.max(o.y2,r.y2),(d=[])[0]=new I(s,h,a,p),d[1]=new I(n,p,s,c),d[2]=new I(a,p,l,c),d[3]=new I(s,c,a,u),o.x1===n&&o.y1===h||r.x1===n&&r.y1===h?(d[4]=new I(n,h,s,p),d[5]=new I(a,c,l,u)):(d[4]=new I(a,h,l,p),d[5]=new I(n,c,s,u)),Nt(d,function(t){return 0<t.height()&&0<t.width()})[0]))||new I},lo.prototype.createVisual=function(){this.visual=new M.drawing.Group,this.createBackground()},lo.prototype.createBackground=function(){var t=this.options,e=t.border||{},i=this.box.clone().pad(t.margin).unpad(e.width),i=M.drawing.Path.fromRect(i.toRect(),{stroke:{color:e.width?e.color:"",width:e.width,dashType:e.dashType},fill:{color:t.background,opacity:t.opacity},zIndex:-10});this.visual.append(i)},lo.prototype.getRoot=function(){return this},lo.prototype.createGradient=function(t){var e,s,i=this.gradients,o=pe(t),r=no[t.gradient];return i[o]?e=i[o]:(s=Object.assign({},r,t),"linear"===r.type?e=new M.drawing.LinearGradient(s):(t.innerRadius&&(s.stops=(()=>{for(var t=s.stops,e=s.innerRadius/s.radius*100,i=t.length,o=[],r=0;r<i;r++){var n=Object.assign({},t[r]);n.offset=(n.offset*(100-e)+e)/100,o.push(n)}return o})()),(e=new M.drawing.RadialGradient(s)).supportVML=!1!==r.supportVML),i[o]=e),e},lo.prototype.cleanGradients=function(){var t,e=this.gradients;for(t in e)e[t]._observers=[]},lo.prototype.size=function(){var t=this.options;return new I(0,0,t.width,t.height)};var so,ao,i=lo;function lo(t){so.call(this,t);t=this.options;t.width=parseInt(t.width,10),t.height=parseInt(t.height,10),this.gradients={}}e(i,{width:600,height:400,background:a,border:{color:Y,width:0},margin:w(5),zIndex:-2});let ho=i,po=((ao=o)&&(co.__proto__=ao),((co.prototype=Object.create(ao&&ao.prototype)).constructor=co).prototype._initDirection=function(){var t=this.options;t.vertical?(this.groupAxis=y,this.elementAxis=v,this.groupSizeField=dt,this.elementSizeField=et,this.groupSpacing=t.spacing,this.elementSpacing=t.vSpacing):(this.groupAxis=v,this.elementAxis=y,this.groupSizeField=et,this.elementSizeField=dt,this.groupSpacing=t.vSpacing,this.elementSpacing=t.spacing)},co.prototype.reflow=function(t){this.box=t.clone(),this.reflowChildren()},co.prototype.reflowChildren=function(){var t=this,e=t.box,i=t.elementAxis,o=t.groupAxis,r=t.elementSizeField,n=t.groupSizeField,t=this.groupOptions(),s=t.groups,a=t.groupsSize,t=t.maxGroupElementsSize,l=s.length,h=e[o+1]+this.alignStart(a,e[n]());if(l){for(var p=h,c=0;c<l;c++){for(var u=s[c],d=u.groupElements,f=e[i+1],g=d.length,y=0;y<g;y++){var v=d[y],m=this.elementSize(v),x=p+this.alignStart(m[n],u.groupSize),_=new I;_[o+1]=x,_[o+2]=x+m[n],_[i+1]=f,_[i+2]=f+m[r],v.reflow(_),f+=m[r]+this.elementSpacing}p+=u.groupSize+this.groupSpacing}e[o+1]=h,e[o+2]=h+a,e[i+2]=e[i+1]+t}},co.prototype.alignStart=function(t,e){var i=0,o=this.options.align;return o===P||o===S?i=e-t:o===b&&(i=(e-t)/2),i},co.prototype.groupOptions=function(){for(var t=this,e=t.box,i=t.children,o=t.elementSizeField,r=t.groupSizeField,n=t.elementSpacing,s=t.groupSpacing,a=L(e[o]()),l=i.length,h=[],p=0,c=0,u=0,d=0,f=[],g=0;g<l;g++){var y=i[g],v=(y.box||y.reflow(e),this.elementSize(y));this.options.wrap&&L(c+n+v[o])>a&&(h.push({groupElements:f,groupSize:p,groupElementsSize:c}),d=Math.max(d,c),u+=s+p,c=p=0,f=[]),p=Math.max(p,v[r]),0<c&&(c+=n),c+=v[o],f.push(y)}return h.push({groupElements:f,groupSize:p,groupElementsSize:c}),{groups:h,groupsSize:u+=p,maxGroupElementsSize:d=Math.max(d,c)}},co.prototype.elementSize=function(t){return{width:t.box.width(),height:t.box.height()}},co.prototype.createVisual=function(){},co);function co(t){ao.call(this,t),this._initDirection()}e(po,{vertical:!0,wrap:!0,vSpacing:0,spacing:0});let uo=po;var fo,go=M.drawing.Text,t=((fo=o)&&(yo.__proto__=fo),((yo.prototype=Object.create(fo&&fo.prototype)).constructor=yo).prototype.reflow=function(t){var e=this.options,e=e.size=M.drawing.util.measureText(this.content,{font:e.font});this.baseline=e.baseline,this.box=new I(t.x1,t.y1,t.x1+e.width,t.y1+e.height)},yo.prototype.createVisual=function(){var t=this.options,e=t.font,i=t.color,o=t.opacity,r=t.cursor,n=t.stroke,t=t.paintOrder;this.visual=new go(this.content,this.box.toRect().topLeft(),{font:e,fill:{color:i,opacity:o},cursor:r,stroke:n,paintOrder:t})},yo);function yo(t,e){fo.call(this,e),this.content=t,this.reflow(new I)}e(t,{font:$,color:Y});let vo=t;function mo(t){var e=t.origin,t=t.bottomRight();return new I(e.x,e.y,t.x,t.y)}var xo,_o,bo,wo,ko=/\n/m;function Ao(t,e,i){xo.call(this,e),this.content=t,this.data=i,this._initContainer(),!1!==this.options._autoReflow&&this.reflow(new I)}(xo=Ji)&&(Ao.__proto__=xo),((Ao.prototype=Object.create(xo&&xo.prototype)).constructor=Ao).prototype._initContainer=function(){var t=this.options,e=String(this.content).split(ko),i=new uo({vertical:!0,align:t.align,wrap:!1}),o=O({},t,{opacity:1,animation:null});this.container=i,this.append(i);for(var r=0;r<e.length;r++){var n=new vo(e[r].trim(),o);i.append(n)}},Ao.prototype.reflow=function(t){var e,i=this.options,o=i.visual;this.container.options.align=i.align,o&&!this._boxReflow?((e=t).hasSize()||(this._boxReflow=!0,this.reflow(e),this._boxReflow=!1,e=this.box),(o=this.visual=o(this.visualContext(e)))&&(e=mo(o.clippedBBox()||new M.geometry.Rect),o.options.zIndex=i.zIndex),this.box=this.contentBox=this.paddingBox=e):(xo.prototype.reflow.call(this,t),i.rotation&&(o=w(i.margin),e=this.box.unpad(o),this.targetBox=t,this.normalBox=e.clone(),(e=this.rotate()).translate(o.left-o.right,o.top-o.bottom),this.rotatedBox=e.clone(),e.pad(o)))},Ao.prototype.createVisual=function(){var t=this.options;this.visual=new M.drawing.Group({transform:this.rotationTransform(),zIndex:t.zIndex,noclip:t.noclip}),this.hasBox()&&(t=M.drawing.Path.fromRect(this.paddingBox.toRect(),this.visualStyle()),this.visual.append(t))},Ao.prototype.renderVisual=function(){var t;this.options.visible&&(this.options.visual?((t=this.visual)&&!k(t.options.noclip)&&(t.options.noclip=this.options.noclip),this.addVisual(),this.createAnimation()):xo.prototype.renderVisual.call(this))},Ao.prototype.visualContext=function(t){var e=this,i={text:this.content,rect:t.toRect(),sender:this.getSender(),options:this.options,createVisual:function(){return e._boxReflow=!0,e.reflow(t),e._boxReflow=!1,e.getDefaultVisual()}};return this.data&&Object.assign(i,this.data),i},Ao.prototype.getDefaultVisual=function(){this.createVisual(),this.renderChildren();var t=this.visual;return delete this.visual,t},Ao.prototype.rotate=function(){var t=this.options;return this.box.rotate(t.rotation),this.align(this.targetBox,y,t.align),this.align(this.targetBox,v,t.vAlign),this.box},Ao.prototype.rotationTransform=function(){var t,e,i,o=this.options.rotation;return o?(t=(e=this.normalBox.center()).x,e=e.y,i=this.rotatedBox.center(),M.geometry.transform().translate(i.x-t,i.y-e).rotate(o,[t,e])):null};let So=Ao,Co=((_o=o)&&(Po.__proto__=_o),((Po.prototype=Object.create(_o&&_o.prototype)).constructor=Po).prototype.reflow=function(t){_o.prototype.reflow.call(this,t),this.box.snapTo(t,y)},Po.buildTitle=function(t,e){var i,t="string"==typeof t?{text:t}:t;return i=(t=Object.assign({visible:!0},e,t))&&t.visible&&t.text?new Po(t):i},Po.orderTitles=function(t){var t=[].concat(t),e=t.filter(function(t){return t&&t.options.position!==S}),t=t.filter(function(t){return t&&t.options.position===S});return To(e),To(t),t.reverse(),e.concat(t)},Po);function Po(t){_o.call(this,t),this._textBox=new So(this.options.text,Object.assign({},this.options,{vAlign:this.options.position})),this.append(this._textBox)}function To(t){for(var e=1;e<t.length;e++){var i=t[e]._textBox,o=t[e-1]._textBox;o.options.margin=Object.assign(w(o.options.margin),{bottom:0}),i.options.margin=Object.assign(w(i.options.margin),{top:0})}}e(Co,{color:Y,position:T,align:b,margin:w(5),padding:w(5)});let Mo=Co,Oo=((bo=So)&&(Lo.__proto__=bo),((Lo.prototype=Object.create(bo&&bo.prototype)).constructor=Lo).prototype.visualContext=function(t){t=bo.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},Lo.prototype.click=function(t,e){t.trigger("axisLabelClick",{element:ae(e),value:this.value,text:this.text,index:this.index,dataItem:this.dataItem,axis:this.parent.options})},Lo.prototype.rotate=function(){var t,e;return this.options.alignRotation!==b?(t=this.normalBox.toRect(),e=this.rotationTransform(),this.box=mo(t.bbox(e.matrix()))):bo.prototype.rotate.call(this),this.box},Lo.prototype.rotationTransform=function(){var t=this.options,e=t.rotation;if(!e)return null;if(t.alignRotation===b)return bo.prototype.rotationTransform.call(this);var i=M.geometry.transform().rotate(e).matrix(),o=this.normalBox.toRect(),r=this.targetBox.toRect(),t=t.rotationOrigin||T,n=t===T||t===S?y:v,s=t===T||t===S?v:y,t=t===T||t===C?r.origin:r.bottomRight(),a=o.topLeft().transformCopy(i),l=o.topRight().transformCopy(i),h=o.bottomRight().transformCopy(i),o=o.bottomLeft().transformCopy(i),i=M.geometry.Rect.fromPoints(a,l,h,o),p={};p[s]=r.origin[s]-i.origin[s];var c,i=Math.abs(a[s]+p[s]-t[s]),t=Math.abs(l[s]+p[s]-t[s]),s=L(i,g)===L(t,g)?(c=a,l):t<i?(c=l,h):(c=a,o),t=c[n]+(s[n]-c[n])/2;return p[n]=r.center()[n]-t,M.geometry.transform().translate(p.x,p.y).rotate(e)},Lo);function Lo(t,e,i,o,r){bo.call(this,e,r),this.text=e,this.value=t,this.index=i,this.dataItem=o,this.reflow(new I)}e(Oo,{_autoReflow:!1});let Io=Oo,Bo=((wo=Ji)&&(Eo.__proto__=wo),((Eo.prototype=Object.create(wo&&wo.prototype)).constructor=Eo).prototype.hide=function(){this.options.visible=!1},Eo.prototype.show=function(){this.options.visible=!0},Eo.prototype.render=function(){var t,e,i,o,r,n,s,a,l=this,h=this.options;h.visible&&(i=h.label,h=h.icon,o=new I,r=function(){return l},n=h.size,s=this.fields.text,k(i)&&i.visible&&((a=jt(i))?s=a(this.fields):i.format&&(s=this.chartService.format.auto(i.format,s)),i.color||(i.color=i.position===it?"#fff":h.background),this.label=new So(s,O({},i)),this.label.aliasFor=r,i.position!==it||k(n)||(h.type===q?n=Math.max(this.label.box.width(),this.label.box.height()):(t=this.label.box.width(),e=this.label.box.height()),o.wrap(this.label.box))),h.width=t||n||7,h.height=e||n||7,(a=new oo(O({},h))).aliasFor=r,this.marker=a,this.append(a),this.label&&this.append(this.label),a.reflow(new I),this.wrapperBox=o.wrap(a.box))},Eo.prototype.reflow=function(t){var e,i,o,r=this.options,n=this.label,s=this.marker,a=this.wrapperBox,l=t.center(),h=r.line.length,p=r.position;r.visible&&(u(p,[C,P])?p===C?(o=a.alignTo(t,p).translate(-h,t.center().y-a.center().y),r.line.visible&&(e=[t.x1,l.y],this.linePoints=[e,[o.x2,l.y]],i=o.clone().wrapPoint(e))):(o=a.alignTo(t,p).translate(h,t.center().y-a.center().y),r.line.visible&&(e=[t.x2,l.y],this.linePoints=[e,[o.x1,l.y]],i=o.clone().wrapPoint(e))):p===S?(o=a.alignTo(t,p).translate(t.center().x-a.center().x,h),r.line.visible&&(e=[l.x,t.y2],this.linePoints=[e,[l.x,o.y1]],i=o.clone().wrapPoint(e))):(o=a.alignTo(t,p).translate(t.center().x-a.center().x,-h),r.line.visible&&(e=[l.x,t.y1],this.linePoints=[e,[l.x,o.y2]],i=o.clone().wrapPoint(e))),s&&s.reflow(o),n&&(n.reflow(o),s)&&(r.label.position===lt&&n.box.alignTo(s.box,p),n.reflow(n.box)),this.contentBox=o,this.targetBox=t,this.box=i||o)},Eo.prototype.createVisual=function(){wo.prototype.createVisual.call(this),this.visual.options.noclip=this.options.noclip,this.options.visible&&this.createLine()},Eo.prototype.renderVisual=function(){var e=this,t=this.options,i=t.visual;t.visible&&i?(this.visual=i(Object.assign(this.fields,{sender:this.getSender(),rect:this.targetBox.toRect(),options:{background:t.background,border:t.background,icon:t.icon,label:t.label,line:t.line,position:t.position,visible:t.visible},createVisual:function(){e.createVisual(),e.renderChildren();var t=e.visual;return delete e.visual,t}})),this.addVisual()):wo.prototype.renderVisual.call(this)},Eo.prototype.createLine=function(){var t=this.options.line;this.linePoints&&(_t(t=M.drawing.Path.fromPoints(this.linePoints,{stroke:{color:t.color,width:t.width,dashType:t.dashType}})),this.visual.append(t))},Eo.prototype.click=function(t,e){var i=this.eventArgs(e);t.trigger("noteClick",i)||e.preventDefault()},Eo.prototype.over=function(t,e){var i=this.eventArgs(e);t.trigger("noteHover",i)||e.preventDefault()},Eo.prototype.out=function(t,e){e=this.eventArgs(e);t.trigger("noteLeave",e)},Eo.prototype.eventArgs=function(t){var e=this.options;return Object.assign(this.fields,{element:ae(t),text:k(e.label)?e.label.text:"",visual:this.visual})},Eo);function Eo(t,e,i){wo.call(this,e),this.fields=t,this.chartService=i,this.render()}e(Bo,{icon:{visible:!0,type:q},label:{position:it,visible:!0,align:b,vAlign:b},line:{visible:!0},visible:!0,position:T,zIndex:2});let Ro=Bo;function Vo(){}var jo={format:function(t,e){return e},toString:function(t){return t},parseDate:function(t){return new Date(t)},firstDay:function(){return 0}},i={implementation:{configurable:!0}};Vo.register=function(t){jo=t},i.implementation.get=function(){return jo},Object.defineProperties(Vo,i);let zo=Vo;function Do(t){this._intlService=t}var Fo=/\{(\d+)(:[^\}]+)?\}/g,t={intl:{configurable:!0}};t.intl.get=function(){return this._intlService||zo.implementation},t.intl.set=function(t){this._intlService=t},Do.prototype.auto=function(t){for(var e=[],i=arguments.length-1;0<i--;)e[i]=arguments[i+1];var o=this.intl;return wt(t)&&t.match(tt)?o.format.apply(o,[t].concat(e)):o.toString(e[0],t)},Do.prototype.localeAuto=function(t,o,r){var n=this.intl;return wt(t)&&t.match(tt)?t.replace(Fo,function(t,e,i){e=o[parseInt(e,10)];return n.toString(e,i?i.substring(1):"",r)}):n.toString(o[0],t,r)},Object.defineProperties(Do.prototype,t);function Ho(t,e){this._intlService=(e=void 0===e?{}:e).intlService,this.sender=e.sender||t,this.format=new No(e.intlService),this.chart=t,this.rtl=Boolean(e.rtl)}let No=Do,Uo={intl:{configurable:!0}},Go=(Uo.intl.get=function(){return this._intlService||zo.implementation},Uo.intl.set=function(t){this._intlService=t,this.format.intl=t},Ho.prototype.notify=function(t,e){this.chart&&this.chart.trigger(t,e)},Ho.prototype.isPannable=function(t){var e=((this.chart||{}).options||{}).pannable;return e&&e.lock!==t},Object.defineProperties(Ho.prototype,Uo),Ho);function Wo(){}var Xo;Wo.register=function(t){Xo=t},Wo.create=function(t,e){return Xo?Xo.create(t,e):new Ii(t,Object.assign({},{multiTouch:!0},e))};let Yo=Wo;function qo(t,e){var i=t.tickX,o=t.tickY,r=t.position,n=new M.drawing.Path({stroke:{width:e.width,color:e.color}});return t.vertical?n.moveTo(i,r).lineTo(i+e.size,r):n.moveTo(r,o).lineTo(r,o+e.size),_t(n),n}function Zo(t,e){var i=t.lineStart,o=t.lineEnd,r=t.position,e=new M.drawing.Path({stroke:{width:e.width,color:e.color,dashType:e.dashType}});return t.vertical?e.moveTo(i,r).lineTo(o,r):e.moveTo(r,i).lineTo(r,o),_t(e),e}(Qo=o)&&(r.__proto__=Qo),((r.prototype=Object.create(Qo&&Qo.prototype)).constructor=r).prototype.initFields=function(){},r.prototype.labelsRange=function(){return{min:this.options.labels.skip,max:this.labelsCount()}},r.prototype.normalizeLabelRotation=function(t){var e=t.rotation;Ot(e)&&(t.alignRotation=e.align,t.rotation=e.angle)},r.prototype.createLabels=function(){var t=this.options,e=t.vertical?P:b,i=O({},t.labels,{align:e,zIndex:t.zIndex}),o=Math.max(1,i.step);if(this.clearLabels(),i.visible){this.normalizeLabelRotation(i),"auto"===i.rotation&&(i.rotation=0,t.autoRotateLabels=!0);for(var r=this.labelsRange(),n=r.min;n<r.max;n+=o){var s={index:n,count:r.max},s=this.createAxisLabel(n,i,s);s&&(this.append(s),this.labels.push(s))}}},r.prototype.clearLabels=function(){this.children=Nt(this.children,function(t){return!(t instanceof Io)}),this.labels=[]},r.prototype.clearTitle=function(){var e=this;this.title&&(this.children=Nt(this.children,function(t){return t!==e.title}),this.title=void 0)},r.prototype.clear=function(){this.clearLabels(),this.clearTitle()},r.prototype.lineBox=function(){var t=this.options,e=this.box,i=t.vertical,o=t.labels.mirror,r=o?e.x1:e.x2,o=o?e.y2:e.y1,t=t.line.width||0;return i?new I(r,e.y1,r,e.y2-t):new I(e.x1,o,e.x2-t,o)},r.prototype.createTitle=function(){var t=this.options,t=O({rotation:t.vertical?-90:0,text:"",zIndex:1,visualSize:!0},t.title);t.visible&&t.text&&(t=new So(t.text,t),this.append(t),this.title=t)},r.prototype.createNotes=function(){var t=this.options,e=t.notes,i=e.data||[];this.notes=[];for(var o=0;o<i.length;o++){var r=O({},e,i[o]),r=(r.value=this.parseNoteValue(r.value),new Ro({value:r.value,text:r.label.text,dataItem:r},r,this.chartService));r.options.visible&&(k(r.options.position)?t.vertical&&!u(r.options.position,[C,P])?r.options.position=t.reverse?C:P:t.vertical||u(r.options.position,[T,S])||(r.options.position=t.reverse?S:T):t.vertical?r.options.position=t.reverse?C:P:r.options.position=t.reverse?S:T,this.append(r),this.notes.push(r))}},r.prototype.parseNoteValue=function(t){return t},r.prototype.renderVisual=function(){Qo.prototype.renderVisual.call(this),this.createPlotBands()},r.prototype.createVisual=function(){Qo.prototype.createVisual.call(this),this.createBackground(),this.createLine()},r.prototype.gridLinesVisual=function(){var t=this._gridLines;return t||(t=this._gridLines=new M.drawing.Group({zIndex:-2}),this.appendVisual(this._gridLines)),t},r.prototype.createTicks=function(s){var t=this.options,a=this.lineBox(),l=t.labels.mirror,e=t.majorTicks.visible?t.majorUnit:0,h={vertical:t.vertical};function i(t,e,i){var o=t.length,r=Math.max(1,e.step);if(e.visible)for(var n=e.skip;n<o;n+=r)k(i)&&n%i==0||(h.tickX=l?a.x2:a.x2-e.size,h.tickY=l?a.y1-e.size:a.y1,h.position=t[n],s.append(qo(h,e)))}i(this.getMajorTickPositions(),t.majorTicks),i(this.getMinorTickPositions(),t.minorTicks,e/t.minorUnit)},r.prototype.createLine=function(){var t=this.options,e=t.line,i=this.lineBox();0<e.width&&e.visible&&((e=new M.drawing.Path({stroke:{width:e.width,color:e.color,dashType:e.dashType}})).moveTo(i.x1,i.y1).lineTo(i.x2,i.y2),t._alignLines&&_t(e),(i=this._lineGroup=new M.drawing.Group).append(e),this.visual.append(i),this.createTicks(i))},r.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},r.prototype.createBackground=function(){var t=this.options,e=this.box,t=t.background;t&&(this._backgroundPath=M.drawing.Path.fromRect(e.toRect(),{fill:{color:t},stroke:null}),this.visual.append(this._backgroundPath))},r.prototype.createPlotBands=function(){var e=this,t=this.options,i=t.plotBands||[],o=t.vertical,r=this.plotArea;if(0!==i.length){for(var n=this._plotbandGroup=new M.drawing.Group({zIndex:-1}),s=Nt(this.pane.axes,function(t){return t.options.vertical!==e.options.vertical})[0],a=0;a<i.length;a++){var l=i[a],h=void 0,p=void 0,c=l.label,u=void 0,p=o?(h=(s||r.axisX).lineBox(),this.getSlot(l.from,l.to,!0)):(h=this.getSlot(l.from,l.to,!0),(s||r.axisY).lineBox());c&&(c.vAlign=c.position||C,u=this.createPlotBandLabel(c,l,new I(h.x1,p.y1,h.x2,p.y2))),0!==h.width()&&0!==p.height()&&(c=new M.geometry.Rect([h.x1,p.y1],[h.width(),p.height()]),h=M.drawing.Path.fromRect(c,{fill:{color:l.color,opacity:l.opacity},stroke:null}),n.append(h),u)&&n.append(u)}this.appendVisual(n)}},r.prototype.createPlotBandLabel=function(t,e,i){var o,r;return!1===t.visible?null:(o=t.text,k(t)&&t.visible&&((r=jt(t))?o=r({text:o,item:e}):t.format&&(o=this.chartService.format.auto(t.format,o)),t.color||(t.color=this.options.labels.color)),(r=new So(o,t)).reflow(i),r.renderVisual(),r.visual)},r.prototype.createGridLines=function(t){var e=this.options,i=e.minorGridLines,o=e.majorGridLines,r=e.minorUnit,n=e.vertical,a=t.options.line.visible,e=o.visible?e.majorUnit:0,t=t.lineBox(),l=t[n?"y1":"x1"],h={lineStart:t[n?"x1":"y1"],lineEnd:t[n?"x2":"y2"],vertical:n},p=[],c=this.gridLinesVisual();function s(t,e,i){var o=t.length,r=Math.max(1,e.step);if(e.visible)for(var n=e.skip;n<o;n+=r){var s=L(t[n]);u(s,p)||n%i==0||a&&l===s||(h.position=s,c.append(Zo(h,e)),p.push(s))}}return s(this.getMajorTickPositions(),o),s(this.getMinorTickPositions(),i,e/r),c.children},r.prototype.reflow=function(t){for(var e=this.options,i=this.labels,o=this.title,r=e.vertical,n=i.length,s=r?dt:et,o=o?o.box[s]():0,a=this.getActualTickSize()+e.margin+o,l=((this.getRoot()||{}).box||t)[s](),h=0,p=0;p<n;p++){var c=i[p].box[s]();c+a<=l&&(h=Math.max(h,c))}this.box=r?new I(t.x1,t.y1,t.x1+h+a,t.y2):new I(t.x1,t.y1,t.x2,t.y1+h+a),this.arrangeTitle(),this.arrangeLabels(),this.arrangeNotes()},r.prototype.getLabelsTickPositions=function(){return this.getMajorTickPositions()},r.prototype.labelTickIndex=function(t){return t.index},r.prototype.arrangeLabels=function(){for(var t=this.options,e=this.labels,i=this.labelsBetweenTicks(),o=t.vertical,r=t.labels.mirror,n=this.getLabelsTickPositions(),s=0;s<e.length;s++){var a=e[s],l=this.labelTickIndex(a),h=o?a.box.height():a.box.width(),p=n[l],l=n[l+1],c=void 0,u=void 0,u=o?c=i?p+(l-p)/2-h/2:p-h/2:i?(c=p,l):(c=p-h/2)+h;this.positionLabel(a,r,c,u)}},r.prototype.positionLabel=function(t,e,i,o){void 0===o&&(o=i);var r=this.options,n=r.vertical,s=this.lineBox(),r=this.getActualTickSize()+r.margin,s=n?(n=s.x2,e?(n+=r,t.options.rotationOrigin=C):(n-=r+t.box.width(),t.options.rotationOrigin=P),t.box.move(n,i)):(n=s.y1,e?(n-=r+t.box.height(),t.options.rotationOrigin=S):(n+=r,t.options.rotationOrigin=T),new I(i,n,o,n+t.box.height()));t.reflow(s)},r.prototype.autoRotateLabelAngle=function(t,e){return t.width()<e?0:t.height()>e?-90:-45},r.prototype.autoRotateLabels=function(){if(!this.options.autoRotateLabels||this.options.vertical)return!1;for(var t=this.getMajorTickPositions(),e=this.labels,i=Math.min(e.length,t.length-1),o=0,r=0;r<i;r++){var n=Math.abs(t[r+1]-t[r]),s=e[r].box,s=this.autoRotateLabelAngle(s,n);if(-90===(o=0!==s?s:o))break}if(0!==o){for(var a=0;a<e.length;a++)e[a].options.rotation=o,e[a].reflow(new I);return!0}},r.prototype.arrangeTitle=function(){var t=this.options,e=this.title,i=t.labels.mirror;e&&(t.vertical?(e.options.align=i?P:C,e.options.vAlign=e.options.position):(e.options.align=e.options.position,e.options.vAlign=i?T:S),e.reflow(this.box))},r.prototype.arrangeNotes=function(){for(var t=0;t<this.notes.length;t++){var e=this.notes[t],i=e.options.value,o=void 0;k(i)?(this.shouldRenderNote(i)?e.show():e.hide(),o=this.noteSlot(i)):e.hide(),e.reflow(o||this.lineBox())}},r.prototype.noteSlot=function(t){return this.getSlot(t)},r.prototype.alignTo=function(t){var t=t.lineBox(),e=this.options.vertical,i=e?v:y;this.box.snapTo(t,i),e?this.box.shrink(0,this.lineBox().height()-t.height()):this.box.shrink(this.lineBox().width()-t.width(),0),this.box[i+1]-=this.lineBox()[i+1]-t[i+1],this.box[i+2]-=this.lineBox()[i+2]-t[i+2]},r.prototype.axisLabelText=function(t,e,i){function o(){return e.format?r.chartService.format.localeAuto(e.format,[t],e.culture):t}var r=this,n=jt(e);return n?n(Object.assign({},i,{get text(){return o()},value:t,format:e.format,culture:e.culture})):o()},r.prototype.slot=function(t,e,i){t=this.getSlot(t,e,i);if(t)return t.toRect()},r.prototype.contentBox=function(){var t,e,i=this.box.clone(),o=this.labels;return o.length&&(e=this.options.vertical?v:y,this.chartService.isPannable(e)?(t=this.maxLabelOffset(),i[e+1]-=t.start,i[e+2]+=t.end):(o[0].options.visible&&i.wrap(o[0].box),(e=o[o.length-1]).options.visible&&i.wrap(e.box))),i},r.prototype.maxLabelOffset=function(){for(var t=this.options,e=t.vertical,t=t.reverse,i=this.labelsBetweenTicks(),o=this.getLabelsTickPositions(),r=e?v:y,n=this.labels,s=t?1:0,a=t?0:1,l=0,h=0,p=0;p<n.length;p++){var c=n[p],u=this.labelTickIndex(c),d=void 0,f=void 0;i?(d=o[u+s],f=o[u+a]):d=f=o[u],l=Math.max(l,d-c.box[r+1]),h=Math.max(h,c.box[r+2]-f)}return{start:l,end:h}},r.prototype.limitRange=function(t,e,i,o,r){var n,s,a=this.options;return t<i&&r<0&&(!k(a.min)||a.min<=i)||o<e&&0<r&&(!k(a.max)||o<=a.max)?null:e<i&&0<r||o<t&&r<0?{min:t,max:e}:(a=e-t,s=e,(n=t)<i&&r<0?(n=x(t,i,o),s=x(t+a,i+a,o)):o<e&&0<r&&(s=x(e,i,o),n=x(e-a,i,o-a)),{min:n,max:s})},r.prototype.valueRange=function(){return{min:this.seriesMin,max:this.seriesMax}},r.prototype.lineDir=function(){var t=this.options;return(t.vertical?-1:1)*(t.reverse?-1:1)},r.prototype.lineInfo=function(){var t=this.options.vertical,e=this.lineBox(),i=t?e.height():e.width(),t=t?v:y,o=this.lineDir(),r=t+(1===o?1:2).toString();return{axis:t,axisOrigin:r,axisDir:o,lineBox:e,lineSize:i,lineStart:e[r]}},r.prototype.pointOffset=function(t){var e=this.lineInfo(),i=e.axis,o=e.axisOrigin,r=e.lineBox;return(0<e.axisDir?t[i]-r[o]:r[o]-t[i])/e.lineSize},r.prototype.scaleToDelta=function(t,e){t=x(t,-.999,.999);return 0<t?e*Math.min(1,t):e-e/(1+t)},r.prototype.labelsBetweenTicks=function(){return!this.options.justified},r.prototype.prepareUserOptions=function(){};var Qo,i=r;function r(t,e){void 0===e&&(e=new Go),Qo.call(this,t),this.chartService=e,this.options.visible||(this.options=O({},this.options,{labels:{visible:!1},line:{visible:!1},margin:0,majorTickSize:0,minorTickSize:0})),this.options.minorTicks=O({},{color:this.options.line.color,width:this.options.line.width,visible:this.options.minorTickType!==st},this.options.minorTicks,{size:this.options.minorTickSize,align:this.options.minorTickType}),this.options.majorTicks=O({},{color:this.options.line.color,width:this.options.line.width,visible:this.options.majorTickType!==st},this.options.majorTicks,{size:this.options.majorTickSize,align:this.options.majorTickType}),this.initFields(),this.options._deferLabels||this.createLabels(),this.createTitle(),this.createNotes()}e(i,{labels:{visible:!0,rotation:0,mirror:!1,step:1,skip:0},line:{width:1,color:Y,visible:!0},title:{visible:!0,position:b},majorTicks:{align:lt,size:4,skip:0,step:1},minorTicks:{align:lt,size:3,skip:0,step:1},axisCrossingValue:0,majorTickType:lt,minorTickType:st,majorGridLines:{skip:0,step:1},minorGridLines:{visible:!1,width:1,color:Y,skip:0,step:1},margin:5,visible:!0,reverse:!1,justified:!0,notes:{label:{text:""}},_alignLines:!0,_deferLabels:!1});let Ko=i;var $o="milliseconds",Jo="seconds",tr="minutes",er="hours",ir="days",or="weeks",rr="months",nr="years",sr=6e4,ar=36e5,lr=864e5,hr=6048e5,pr=31536e6,cr={years:pr,months:26784e5,weeks:hr,days:lr,hours:ar,minutes:sr,seconds:1e3,milliseconds:1};function ur(t,e){return t.getTime()-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*sr}function dr(t,e){return new Date(t.getTime()+e)}function fr(t){var e;return t instanceof Date?e=t:t&&(e=new Date(t)),e}function gr(t,e){0===e&&23===t.getHours()&&t.setHours(t.getHours()+2)}function yr(t,e,i,r){var o,n,s,a=t;return t&&(o=(t=fr(t)).getHours(),i===nr?gr(a=new Date(t.getFullYear()+e,0,1),0):i===rr?gr(a=new Date(t.getFullYear(),t.getMonth()+e,1),o):i===or?gr(a=yr(((t,e)=>{void 0===r&&(e=0);var i=0,o=t.getDay();if(!isNaN(o))for(;o!==e;)0===o?o=6:o--,i++;return dr(t,-i*lr)})(t,r),7*e,ir),o):i===ir?gr(a=new Date(t.getFullYear(),t.getMonth(),t.getDate()+e),o):i===er?(o=t,n=e,(s=new Date(o)).setMinutes(0,0,0),o=(o.getTimezoneOffset()-s.getTimezoneOffset())*sr,a=dr(s,o+n*ar)):i===tr?0<(a=dr(t,e*sr)).getSeconds()&&a.setSeconds(0):i===Jo?a=dr(t,1e3*e):i===$o&&(a=dr(t,e)),i!==$o)&&0<a.getMilliseconds()&&a.setMilliseconds(0),a}function vr(t,e,i){return yr(fr(t),0,e,i)}function mr(t,e,i){t=fr(t);return t&&vr(t,e,i).getTime()===t.getTime()?t:yr(t,1,e,i)}function xr(t,e){return t&&e?t.getTime()-e.getTime():-1}function _r(t,e){return t.getTime()-e}function d(t){if(yt(t)){for(var e=[],i=0;i<t.length;i++)e.push(d(t[i]));return e}if(t)return fr(t).getTime()}function br(t,e){return t&&e?d(t)===d(e):t===e}function wr(t,e,i){return ur(t,e)/cr[i]}function kr(t,e,i,o){var t=fr(t),r=fr(e);return(i===rr?t.getMonth()-r.getMonth()+12*(t.getFullYear()-r.getFullYear())+wr(t,new Date(t.getFullYear(),t.getMonth()),ir)/new Date(t.getFullYear(),t.getMonth()+1,0).getDate():i===nr?t.getFullYear()-r.getFullYear()+kr(t,new Date(t.getFullYear(),0),rr,1)/12:i===ir||i===or?wr(t,r,i):_r(t,e)/cr[i])/o}function Ar(t,e,i){return i===nr?e.getFullYear()-t.getFullYear():i===rr?12*Ar(t,e,nr)+e.getMonth()-t.getMonth():i===ir?Math.floor(_r(e,t)/lr):Math.floor(_r(e,t)/cr[i])}function Sr(t,e){return wt(e)&&t.parseDate(e)||fr(e)}function Cr(t,e){if(yt(e)){for(var i=[],o=0;o<e.length;o++)i.push(Sr(t,e[o]));return i}return Sr(t,e)}function Pr(t,e){return m(t.weekStartDay)?t.weekStartDay:e&&e.firstDay?e.firstDay():0}(Tr=Ko)&&(n.__proto__=Tr),((n.prototype=Object.create(Tr&&Tr.prototype)).constructor=n).prototype.initFields=function(){this._ticks={}},n.prototype.categoriesHash=function(){return""},n.prototype.clone=function(){var t=new n(Object.assign({},this.options,{categories:this.options.srcCategories}),this.chartService);return t.createLabels(),t},n.prototype.initUserOptions=function(t){var e=t.categories||[],i=k(t.min),o=k(t.max);return t.srcCategories=t.categories=e,(i||o)&&e.length&&(i=i?Math.floor(t.min):0,o=o?t.justified?Math.floor(t.max)+1:Math.ceil(t.max):e.length,t.categories=t.categories.slice(i,o)),t},n.prototype.rangeIndices=function(){var t=this.options,e=t.categories.length||1;return{min:m(t.min)?t.min%1:0,max:m(t.max)&&t.max%1!=0&&t.max<this.totalRange().max?e-(1-t.max%1):e-(t.justified?1:0)}},n.prototype.range=function(){var t=this.options;return{min:m(t.min)?t.min:0,max:(m(t.max)?t:this.totalRange()).max}},n.prototype.roundedRange=function(){return this.range()},n.prototype.totalRange=function(){var t=this.options;return{min:0,max:Math.max(this._seriesMax||0,t.srcCategories.length)-(t.justified?1:0)}},n.prototype.scaleOptions=function(){var t=this.rangeIndices(),e=t.min,t=t.max,i=this.lineBox();return{scale:(this.options.vertical?i.height():i.width())/(t-e||1)*(this.options.reverse?-1:1),box:i,min:e,max:t}},n.prototype.arrangeLabels=function(){Tr.prototype.arrangeLabels.call(this),this.hideOutOfRangeLabels()},n.prototype.hideOutOfRangeLabels=function(){var t,e,i,o=this.box,r=this.labels;0<r.length&&(e=o[(t=this.options.vertical?v:y)+1],o=o[t+2],i=r[0],r=he(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)},n.prototype.getMajorTickPositions=function(){return this.getTicks().majorTicks},n.prototype.getMinorTickPositions=function(){return this.getTicks().minorTicks},n.prototype.getLabelsTickPositions=function(){return this.getTicks().labelTicks},n.prototype.tickIndices=function(t){for(var e=this.rangeIndices(),i=e.min,o=Math.ceil(e.max),r=Math.floor(i),n=[];r<=o;)n.push(r),r+=t;return n},n.prototype.getTickPositions=function(t){for(var e=this.options,i=e.vertical,e=e.reverse,o=this.scaleOptions(),r=o.scale,n=o.min,s=o.box[(i?v:y)+(e?2:1)],a=this.tickIndices(t),l=[],h=0;h<a.length;h++)l.push(s+L(r*(a[h]-n),Z));return l},n.prototype.getTicks=function(){var t=this.options,e=this._ticks,i=this.rangeIndices(),o=this.lineBox(),i=o.getHash()+i.min+","+i.max+t.reverse+t.justified;return e._hash!==i&&(t=t.minorTicks.visible||t.minorGridLines.visible,e._hash=i,e.labelTicks=this.getTickPositions(1),e.majorTicks=this.filterOutOfRangePositions(e.labelTicks,o),e.minorTicks=t?this.filterOutOfRangePositions(this.getTickPositions(.5),o):[]),e},n.prototype.filterOutOfRangePositions=function(t,e){if(!t.length)return t;for(var i=this.options.vertical?v:y,o=function(t){return e[i+1]<=t&&t<=e[i+2]},r=t.length-1,n=0;!o(t[n])&&n<=r;)n++;for(var s=r;!o(t[s])&&0<=s;)s--;return t.slice(n,s+1)},n.prototype.lineInfo=function(){var t=this.options,e=t.vertical,t=t.reverse,i=this.lineBox(),o=e?i.height():i.width(),e=e?v:y,t=t?-1:1,r=e+(1==t?1:2).toString();return{axis:e,axisOrigin:r,axisDir:t,lineBox:i,lineSize:o,lineStart:i[r]}},n.prototype.lineDir=function(){return this.options.reverse?-1:1},n.prototype.getSlot=function(t,e,i){var o=this.options,r=o.reverse,o=o.justified,n=this.scaleOptions(),s=n.scale,a=n.box,n=n.min,l=this.lineInfo(),h=l.axis,l=l.lineStart,p=a.clone(),c=!k(e),t=_(t,0),e=_(e,t),e=Math.max(e-1,t),u=l+(t-n)*s,l=l+(Math.max(t,e)+1-n)*s;return c&&o&&(l=u),i&&(u=x(u,a[h+1],a[h+2]),l=x(l,a[h+1],a[h+2])),p[h+1]=r?l:u,p[h+2]=r?u:l,p},n.prototype.limitSlot=function(t){var e=this.options.vertical?v:y,i=this.lineBox(),o=t.clone();return o[e+1]=x(t[e+1],i[e+1],i[e+2]),o[e+2]=x(t[e+2],i[e+1],i[e+2]),o},n.prototype.slot=function(t,e,i){var o=Math.floor(this.options.min||0);return"string"==typeof t?t=this.categoryIndex(t):m(t)&&(t-=o),"string"==typeof e?e=this.categoryIndex(e):m(e)&&(e-=o),Tr.prototype.slot.call(this,t,e,i)},n.prototype.pointCategoryIndex=function(t){var e=this.options,i=e.reverse,o=e.justified,e=e.vertical?v:y,r=this.scaleOptions(),n=r.scale,s=r.box,i=i?r.max:r.min,r=s[e+1],t=t[e];return t<r||s[e+2]<t?null:(e=(s=i+(t-r)/n)%1,o?s=Math.round(s):0==e&&0<s&&s--,Math.floor(s))},n.prototype.getCategory=function(t){t=this.pointCategoryIndex(t);return null===t?null:this.options.categories[t]},n.prototype.categoryIndex=function(t){return this.totalIndex(t)-Math.floor(this.options.min||0)},n.prototype.categoryAt=function(t,e){var i=this.options;return(e?i.srcCategories:i.categories)[t]},n.prototype.categoriesCount=function(){return(this.options.categories||[]).length},n.prototype.translateRange=function(t){var e=this.options,i=this.lineBox(),i=e.vertical?i.height():i.width(),e=e.categories.length,t=L(t/(i/e),g);return{min:t,max:e+t}},n.prototype.scaleRange=function(t,e){var e=Math.abs(this.pointOffset(e)),i=this.limitedRangeIndices(),o=i.max-i.min,t=this.scaleToDelta(t,o),o=i.min+e*t,i=i.max-(1-e)*t;return{min:o,max:i=i-o<.1?o+.1:i}},n.prototype.zoomRange=function(t,e){var i=this.totalRange(),o=i.min,i=i.max,t=this.scaleRange(t,e);return{min:x(t.min,o,i),max:x(t.max,o,i)}},n.prototype.labelsCount=function(){var t=this.labelsRange();return t.max-t.min},n.prototype.labelsRange=function(){var t=this.options,e=t.justified,i=t.labels,o=this.limitedRangeIndices(!0),r=o.min,o=o.max,n=Math.floor(r),o=e?(r=Math.ceil(r),Math.floor(o)):(r=Math.floor(r),Math.ceil(o));return{min:(r>i.skip?i.skip+i.step*Math.ceil((r-i.skip)/i.step):i.skip)-n,max:(t.categories.length?o+(e?1:0):0)-n}},n.prototype.createAxisLabel=function(t,e,i){var o=this.options,r=o.dataItems?o.dataItems[t]:null,o=_(o.categories[t],""),i=(i.dataItem=r,this.axisLabelText(o,e,i));return new Io(o,i,t,r,e)},n.prototype.shouldRenderNote=function(t){var e=this.limitedRangeIndices();return Math.floor(e.min)<=t&&t<=Math.ceil(e.max)},n.prototype.noteSlot=function(t){var e=this.options,t=t-Math.floor(e.min||0);return this.getSlot(t)},n.prototype.arrangeNotes=function(){Tr.prototype.arrangeNotes.call(this),this.hideOutOfRangeNotes()},n.prototype.hideOutOfRangeNotes=function(){var t=this.notes,e=this.box;if(t&&t.length)for(var i=this.options.vertical?v:y,o=e[i+1],r=e[i+2],n=0;n<t.length;n++){var s=t[n];s.box&&(r<s.box[i+1]||s.box[i+2]<o)&&s.hide()}},n.prototype.pan=function(t){var e=this.limitedRangeIndices(!0),i=this.scaleOptions().scale,t=L(t/i,g),i=this.totalRange(),o=e.min+t,e=e.max+t;return this.limitRange(o,e,0,i.max,t)},n.prototype.pointsRange=function(t,e){var i=this.options,o=i.reverse,i=i.vertical?v:y,r=this.limitedRangeIndices(!0),n=this.scaleOptions(),s=n.scale,n=n.box[i+(o?2:1)],o=t[i]-n,t=e[i]-n,e=r.min+o/s,i=r.min+t/s,n=Math.min(e,i),o=Math.max(e,i);if(.01<=o-n)return{min:n,max:o}},n.prototype.valueRange=function(){return this.range()},n.prototype.totalIndex=function(t){var e=this.options;if(this._categoriesMap)return this._categoriesMap.get(t);var i=t,o=e.srcCategories;if(i instanceof Date){for(var r=o.length,n=0;n<r;n++)if(br(o[n],i))return n;return-1}return o.indexOf(i)},n.prototype.currentRangeIndices=function(){var t=this.options,e=0;return{min:e=m(t.min)?Math.floor(t.min):e,max:m(t.max)?t.justified?Math.floor(t.max):Math.ceil(t.max)-1:this.totalCount()-1}},n.prototype.limitedRangeIndices=function(t){var e=this.options,i=m(e.min)?e.min:0;return e=m(e.max)?e.max:m(e.min)?i+e.categories.length:this.totalRange().max||1,t&&(t=this.totalRange(),i=x(i,0,t.max),e=x(e,0,t.max)),{min:i,max:e}},n.prototype.totalRangeIndices=function(){return{min:0,max:this.totalRange().max||1}},n.prototype.indexCategories=function(){if(!this._categoriesMap)for(var t=this._categoriesMap=new Wt,e=this.options.srcCategories,i=0;i<e.length;i++)t.set(e[i],i)},n.prototype.totalCount=function(){return Math.max(this.options.srcCategories.length,this._seriesMax||0)};var Tr,t=n;function n(){Tr.apply(this,arguments)}e(t,{type:"category",vertical:!1,majorGridLines:{visible:!1,width:1,color:Y},labels:{zIndex:1},justified:!1,_deferLabels:!0});let Mr=t;var i={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"},Or=[$o,Jo,tr,er,ir,or,rr,nr],Lr="fit";function Ir(t,e){e&&(t._range=void 0);e=t._range;return e||((e=t._range=ke(t)).min=fr(e.min),e.max=fr(e.max)),e}function Br(t){this.options=t}function Er(t,e,i){(this.options=i).baseUnitStep=i.baseUnitStep||1;var o,r=i.roundToBaseUnit,n=i.justified,s=(this.start=yr(t,0,i.baseUnit,i.weekStartDay),this.roundToTotalStep(e)),a=!n&&br(e,s)&&!i.justifyEnd,t=(this.end=this.roundToTotalStep(e,!n,a?1:0),i.min||t);this.valueStart=this.roundToTotalStep(t),this.displayStart=r?this.valueStart:t,(t=i.max)?(o=!n&&br(t,this.roundToTotalStep(t))?-1:0,this.valueEnd=this.roundToTotalStep(t,!1,o),this.displayEnd=r?this.roundToTotalStep(t,!n):i.max):(this.valueEnd=s,this.displayEnd=r||a?this.end:e),this.valueEnd<this.valueStart&&(this.valueEnd=this.valueStart),this.displayEnd<=this.displayStart&&(this.displayEnd=this.roundToTotalStep(this.displayStart,!1,1))}Br.prototype.displayIndices=function(){return{min:0,max:1}},Br.prototype.displayRange=function(){return{}},Br.prototype.total=function(){return{}},Br.prototype.valueRange=function(){return{}},Br.prototype.valueIndex=function(){return-1},Br.prototype.values=function(){return[]},Br.prototype.totalIndex=function(){return-1},Br.prototype.valuesCount=function(){return 0},Br.prototype.totalCount=function(){return 0},Br.prototype.dateAt=function(){return null};function Rr(t,e,i){for(var o,r,n,s=Ir(t.categories),a=(t.max||s.max)-(t.min||s.min),l=t.autoBaseUnitSteps,h=t.maxDateGroups,p=t.baseUnit===Lr,c=e?Or.indexOf(e):0,u=p?Or[c++]:t.baseUnit,d=a/cr[u],f=d;!r||h<=d;){for(o=o||l[u].slice(0);(n=o.shift())&&e===u&&n<i;);if(n)d=f/(r=n);else{if(u===he(Or)){r=Math.ceil(f/h);break}if(!p){h<d&&(r=Math.ceil(f/h));break}u=Or[c++]||he(Or),f=a/cr[u],o=null}}t.baseUnitStep=r,t.baseUnit=u}Er.prototype.displayRange=function(){return{min:this.displayStart,max:this.displayEnd}},Er.prototype.displayIndices=function(){var t,e,i;return this._indices||(i=(t=this.options).baseUnit,e=kr(this.displayStart,this.valueStart,i,t=t.baseUnitStep),i=kr(this.displayEnd,this.valueStart,i,t),this._indices={min:e,max:i}),this._indices},Er.prototype.total=function(){return{min:this.start,max:this.end}},Er.prototype.totalCount=function(){return this.totalIndex(this.end)+(this.options.justified?1:0)},Er.prototype.valueRange=function(){return{min:this.valueStart,max:this.valueEnd}},Er.prototype.valueIndex=function(t){var e=this.options;return Math.floor(kr(t,this.valueStart,e.baseUnit,e.baseUnitStep))},Er.prototype.totalIndex=function(t){var e=this.options;return Math.floor(kr(t,this.start,e.baseUnit,e.baseUnitStep))},Er.prototype.dateIndex=function(t){var e=this.options;return kr(t,this.valueStart,e.baseUnit,e.baseUnitStep)},Er.prototype.valuesCount=function(){return this.valueIndex(this.valueEnd)+1},Er.prototype.values=function(){var t=this._values;if(!t){var e=this.options,i=this.valueRange();this._values=t=[];for(var o=i.min;o<=i.max;)t.push(o),o=yr(o,e.baseUnitStep,e.baseUnit,e.weekStartDay)}return t},Er.prototype.dateAt=function(t,e){var i=this.options;return yr(e?this.start:this.valueStart,i.baseUnitStep*t,i.baseUnit,i.weekStartDay)},Er.prototype.roundToTotalStep=function(t,e,i){var o=this.options,r=o.baseUnit,n=o.baseUnitStep,o=o.weekStartDay,s=this.start,t=kr(t,s,r,n),e=e?Math.ceil(t):Math.floor(t);return i&&(e+=i),yr(s,e*n,r,o)};(Vr=Mr)&&(s.__proto__=Vr),((s.prototype=Object.create(Vr&&Vr.prototype)).constructor=s).prototype.clone=function(){var t=new s(Object.assign({},this.options),this.chartService);return t.createLabels(),t},s.prototype.categoriesHash=function(){var t=this.dataRange.total().min;return this.options.baseUnit+this.options.baseUnitStep+t},s.prototype.initUserOptions=function(t){return t},s.prototype.initFields=function(){Vr.prototype.initFields.call(this);var t,e=this.chartService,i=e.intl,o=this.options,r=o.categories||[];r._parsed||((r=Cr(i,r))._parsed=!0),o=O({roundToBaseUnit:!0},o,{categories:r,min:Sr(i,o.min),max:Sr(i,o.max),weekStartDay:Pr(o,i)}),e.panning&&e.isPannable(o.vertical?v:y)&&(o.roundToBaseUnit=!1),o.userSetBaseUnit=o.userSetBaseUnit||o.baseUnit,o.userSetBaseUnitStep=o.userSetBaseUnitStep||o.baseUnitStep,0<((this.options=o).srcCategories=r).length?(i=Ir(r,!0),e=o.maxDivisions,r=(t=>{var e=(t.baseUnit||"").toLowerCase();if(e!==Lr&&!u(e,Or)){for(var i,o,r=t,n=r.categories,s=k(n)?n.length:0,a=rt,l=0;l<s;l++){var h,p=n[l];p&&i&&0!==(h=Math.abs(ur(p,i)))&&(o=(a=Math.min(a,h))>=pr?nr:24192e5<=a?rr:hr<=a?or:lr<=a?ir:ar<=a?er:sr<=a?tr:Jo),i=p}r.baseUnit=o||ir}return e!==Lr&&"auto"!==t.baseUnitStep||Rr(t),t})(o),(t=o._forecast)&&(0<t.before&&(i.min=yr(i.min,-t.before,r.baseUnit,r.weekStartDay)),0<t.after)&&(i.max=yr(i.max,t.after,r.baseUnit,r.weekStartDay)),this.dataRange=new Er(i.min,i.max,r),e?(t=this.dataRange.displayRange(),Rr(r=Object.assign({},o,{justified:!0,roundToBaseUnit:!1,baseUnit:"fit",min:t.min,max:t.max,maxDateGroups:e}),(t=this.dataRange.options).baseUnit,t.baseUnitStep),this.divisionRange=new Er(i.min,i.max,r)):this.divisionRange=this.dataRange):(o.baseUnit=o.baseUnit||ir,this.dataRange=this.divisionRange=new Br(o)),this.rangeLabels=[]},s.prototype.tickIndices=function(t){var e=this.dataRange,i=this.divisionRange,o=i.valuesCount();if(!this.options.maxDivisions||!o)return Vr.prototype.tickIndices.call(this,t);var r=[],n=i.values(),s=0;this.options.justified||(n=n.concat(i.dateAt(o)),s=.5);for(var a,l=0;l<n.length;l++)r.push(e.dateIndex(n[l])+s),1!==t&&1<=l&&r.splice(l,0,r[(a=r.length-1)-1]+(r[a]-r[a-1])*t);return r},s.prototype.shouldRenderNote=function(t){var e=this.range(),i=this.options.categories||[];return 0<=xr(t,e.min)&&xr(t,e.max)<=0&&i.length},s.prototype.parseNoteValue=function(t){return Sr(this.chartService.intl,t)},s.prototype.noteSlot=function(t){return this.getSlot(t)},s.prototype.translateRange=function(t){var e=this.options,i=e.baseUnit,o=e.weekStartDay,r=e.vertical,n=this.lineBox(),r=r?n.height():n.width(),n=this.range(),r=r/(n.max-n.min),t=L(t/r,g);return n.min&&n.max&&(r=dr(e.min||n.min,t),e=dr(e.max||n.max,t),n={min:yr(r,0,i,o),max:yr(e,0,i,o)}),n},s.prototype.labelsRange=function(){return{min:this.options.labels.skip,max:this.divisionRange.valuesCount()}},s.prototype.pan=function(t){var e,i,o,r,n;return this.isEmpty()?null:(e=this.options,o=this.lineBox(),o=e.vertical?o.height():o.width(),r=(n=this.dataRange.displayRange()).min,n=n.max,i=this.dataRange.total(),o=dr(r,t=L(t/(o/(n-r)),g)*(e.reverse?-1:1)),r=dr(n,t),(n=this.limitRange(d(o),d(r),d(i.min),d(i.max),t))?(n.min=fr(n.min),n.max=fr(n.max),n.baseUnit=e.baseUnit,n.baseUnitStep=e.baseUnitStep||1,n.userSetBaseUnit=e.userSetBaseUnit,n.userSetBaseUnitStep=e.userSetBaseUnitStep,n):void 0)},s.prototype.pointsRange=function(t,e){var i,o;return this.isEmpty()?null:(t=Vr.prototype.pointsRange.call(this,t,e),e=this.dataRange.displayRange(),i=this.dataRange.displayIndices(),i=_r(e.max,e.min)/(i.max-i.min),o=this.options,{min:dr(e.min,t.min*i),max:dr(e.min,t.max*i),baseUnit:o.userSetBaseUnit||o.baseUnit,baseUnitStep:o.userSetBaseUnitStep||o.baseUnitStep})},s.prototype.scaleRange=function(t,e){if(this.isEmpty())return{};var i=this.options,o=i.userSetBaseUnit===Lr,r=this.dataRange.total(),n=this.dataRange.displayRange(),s=n.min,n=n.max,e=Math.abs(this.pointOffset(e)),t=this.scaleToDelta(t,n-s),a=Math.round(e*t),e=Math.round((1-e)*t),l=this.dataRange.options.baseUnit,t=new Date(s.getTime()+a),a=new Date(n.getTime()-e);if(o){var h,p,c=i.autoBaseUnitSteps,e=i.maxDateGroups,o=he(c[l])*e*cr[l],u=_r(n,s),d=_r(a,t),f=Or.indexOf(l);if(d<cr[l]&&l!==$o)l=Or[f-1],t=dr(s,p=(u-(e-1)*(h=he(c[l]))*cr[l])/2),a=dr(n,-p);else if(o<d&&l!==nr){var g=0;do{for(l=Or[++f],g=0,p=2*cr[l];h=c[l][g],++g<c[l].length&&p*h<u;);}while(l!==nr&&p*h<u);0<(p=(p*h-u)/2)&&(t=dr(s,-p),a=dr(n,p),t=dr(t,x(a,r.min,r.max)-a),a=dr(a,x(t,r.min,r.max)-t))}}return t&&a&&0<_r(a,t)?{min:t,max:a,baseUnit:i.userSetBaseUnit||i.baseUnit,baseUnitStep:i.userSetBaseUnitStep||i.baseUnitStep}:void 0},s.prototype.zoomRange=function(t,e){var i=this.dataRange.total(),t=this.scaleRange(t,e);return t&&(t.min<i.min&&(t.min=i.min),t.max>i.max)&&(t.max=i.max),t},s.prototype.range=function(){return this.dataRange.displayRange()},s.prototype.createLabels=function(){Vr.prototype.createLabels.call(this),this.createRangeLabels()},s.prototype.clearLabels=function(){Vr.prototype.clearLabels.call(this),this.rangeLabels=[]},s.prototype.arrangeLabels=function(){this.arrangeRangeLabels(),Vr.prototype.arrangeLabels.call(this)},s.prototype.arrangeRangeLabels=function(){var t,e,i,o,r=this.options,n=this.rangeLabels;0!==n.length&&(t=this.lineBox(),e=r.vertical,r=r.rangeLabels.mirror||r.labels.mirror,(i=n[0])&&(o=e?t.y1-i.box.height()/2:t.x1,this.positionLabel(i,r,o)),i=n[1])&&(o=e?t.y2-i.box.height()/2:t.x2,this.positionLabel(i,r,o))},s.prototype.autoRotateLabels=function(){Vr.prototype.autoRotateLabels.call(this),this.autoRotateRangeLabels()},s.prototype.hideOutOfRangeLabels=function(){Vr.prototype.hideOutOfRangeLabels.call(this),this.hideOverlappingLabels()},s.prototype.hideOverlappingLabels=function(){var t=this.rangeLabels,e=this.labels;if(0!==t.length){var i=t[0];if(i&&i.options.visible)for(var o=0;o<e.length&&s(i,e[o]);o++);var r=t[1];if(r&&r.options.visible)for(var n=e.length-1;0<n&&s(r,e[n]);--n);}function s(t,e){return!(e.options.visible&&!e.box.overlaps(t.box)||(e.options.visible=!1))}},s.prototype.contentBox=function(){for(var t=Vr.prototype.contentBox.call(this),e=this.rangeLabels,i=0;i<e.length;i++){var o=e[i];o.options.visible&&t.wrap(o.box)}return t},s.prototype.createAxisLabel=function(t,e,i){void 0===i&&(i={});var o=this.options,o=o.dataItems&&!o.maxDivisions?o.dataItems[t]:null,r=this.divisionRange.dateAt(t),n=e.dateFormats[this.divisionRange.options.baseUnit],n=(e.format=e.format||n,i.dataItem=o,this.axisLabelText(r,e,i));if(n)return new Io(r,n,t,o,e)},s.prototype.createRangeLabels=function(){var o=this,t=this.divisionRange,e=t.displayStart,t=t.displayEnd,i=this.options,r=Object.assign({},i.labels,i.rangeLabels,{align:b,zIndex:i.zIndex});!0===r.visible&&(this.normalizeLabelRotation(r),r.alignRotation=b,"auto"===r.rotation&&(r.rotation=0,i.autoRotateRangeLabels=!0),i=r.dateFormats[this.divisionRange.options.baseUnit],r.format=r.format||i,(i=function(t,e,i){i&&(e=new Io(e,i,t,null,r),o.append(e),o.rangeLabels.push(e))})(0,e,this.axisLabelText(e,r,{index:0,count:2})),i(1,t,this.axisLabelText(t,r,{index:1,count:2})))},s.prototype.autoRotateRangeLabels=function(){var t,e,o=this,i=this.rangeLabels;this.options.autoRotateRangeLabels&&!this.options.vertical&&2===i.length&&(t=function(t,e,i){e=2*Math.abs(e[i+1]-e[i]),i=o.autoRotateLabelAngle(t.box,e);0!==i&&(t.options.rotation=i,t.reflow(new I))},e=this.getMajorTickPositions(),t(i[0],e,0),t(i[1],e,e.length-2))},s.prototype.categoryIndex=function(t){return this.dataRange.valueIndex(t)},s.prototype.slot=function(t,e,i){var o=this.dataRange,o=(t instanceof Date&&(t=o.dateIndex(t)),e instanceof Date&&(e=o.dateIndex(e)),this.getSlot(t,e,i));if(o)return o.toRect()},s.prototype.getSlot=function(t,e,i){return typeof t==at&&(t=this.categoryIndex(t)),typeof e==at&&(e=this.categoryIndex(e)),Vr.prototype.getSlot.call(this,t,e,i)},s.prototype.valueRange=function(){var t=Ir(this.options.srcCategories);return{min:fr(t.min),max:fr(t.max)}},s.prototype.categoryAt=function(t,e){return this.dataRange.dateAt(t,e)},s.prototype.categoriesCount=function(){return this.dataRange.valuesCount()},s.prototype.rangeIndices=function(){return this.dataRange.displayIndices()},s.prototype.labelsBetweenTicks=function(){return!this.divisionRange.options.justified},s.prototype.prepareUserOptions=function(){this.isEmpty()||(this.options.categories=this.dataRange.values())},s.prototype.getCategory=function(t){t=this.pointCategoryIndex(t);return null===t?null:this.dataRange.dateAt(t)},s.prototype.totalIndex=function(t){return this.dataRange.totalIndex(t)},s.prototype.currentRangeIndices=function(){var t=this.dataRange.valueRange();return{min:this.dataRange.totalIndex(t.min),max:this.dataRange.totalIndex(t.max)}},s.prototype.totalRange=function(){return this.dataRange.total()},s.prototype.totalRangeIndices=function(){var t=this.dataRange.total();return{min:this.dataRange.totalIndex(t.min),max:this.dataRange.totalIndex(t.max)}},s.prototype.totalCount=function(){return this.dataRange.totalCount()},s.prototype.isEmpty=function(){return!this.options.srcCategories.length},s.prototype.roundedRange=function(){var t,e;return!1!==this.options.roundToBaseUnit||this.isEmpty()?this.range():(e=Ir((t=this.options).srcCategories),new Er(e.min,e.max,Object.assign({},t,{justified:!1,roundToBaseUnit:!0,justifyEnd:!1})).displayRange())};var Vr,t=s;function s(){Vr.apply(this,arguments)}e(t,{type:K,labels:{dateFormats:i},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});let jr=t;function zr(t,e){return L(Math.floor(t/e)*e,g)}function Dr(t,e){return L(Math.ceil(t/e)*e,g)}function Fr(t){return Math.max(Math.min(t,3e5),-3e5)}var Hr,Nr,Ur=Math.pow(10,1-g),t=((Hr=Ko)&&(Gr.__proto__=Hr),((Gr.prototype=Object.create(Hr&&Hr.prototype)).constructor=Gr).prototype.initUserOptions=function(t){a=t.seriesMin,i=t.seriesMax,o=(r=t).narrowRange,e=(t=>{if(!t&&!i)return 0;if(0<=t&&0<=i){var e=t===i?0:t;if(!1===o||!o&&.2<(i-e)/i)return 0;e=Math.max(0,e-(i-e)/2)}else e=t;return e})(a),a=((t,e,i)=>{if(!t&&!e)return 1;if(t<=0&&e<=0){var o=t===e?0:e,r=Math.abs((o-t)/o);if(!1===i||!i&&.2<r)return 0;r=Math.min(0,o-(t-o)/2)}else r=e;return r})(a,i,o),n=Bi(e,a),!(s={majorUnit:n})!==r.roundToMajorUnit&&(e<0&&Wr(e,n,1/3)&&(e-=n),0<a)&&Wr(a,n,1/3)&&(a+=n),s.min=zr(e,n),s.max=Dr(a,n);var i,o,e,r=s,n=(this.totalOptions=(e=r,{min:k((a=t).min)?Math.min(e.min,a.min):e.min,max:k(a.max)?Math.max(e.max,a.max):e.max,majorUnit:e.majorUnit}),r),s=t,a=s;if(s){for(var l=s,h=["min","max"],p=0;p<h.length;p++){var c=h[p];null===l[c]&&(l[c]=void 0)}var u=k(s.min),d=k(s.max),f=u||d;f&&s.min===s.max&&(0<s.min?s.min=0:s.max=1),s.majorUnit?(n.min=zr(n.min,s.majorUnit),n.max=Dr(n.max,s.majorUnit)):f&&(a=O(n,s),n.majorUnit=Bi(a.min,a.max))}return n.minorUnit=(a.majorUnit||n.majorUnit)/5,(f=O(n,a)).min>=f.max&&(u&&!d?f.max=f.min+f.majorUnit:!u&&d&&(f.min=f.max-f.majorUnit)),f},Gr.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},Gr.prototype.clone=function(){return new Gr(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},Gr.prototype.startValue=function(){return 0},Gr.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},Gr.prototype.getDivisions=function(t){var e;return 0===t?1:(e=(e=this.options).max-e.min,Math.floor(L(e/t,Z))+1)},Gr.prototype.getTickPositions=function(t,e){var i=this.options,o=this.lineInfo(),r=o.axisDir,n=o.axisOrigin,s=o.lineBox,a=t*(o.lineSize/(i.max-i.min)),l=this.getDivisions(t),h=[],p=s[n],c=0;e&&(c=e/t);for(var u=0;u<l;u++)u%c!=0&&h.push(L(p,Z)),p+=a*r;return h},Gr.prototype.getMajorTickPositions=function(){return this.getTickPositions(this.options.majorUnit)},Gr.prototype.getMinorTickPositions=function(){return this.getTickPositions(this.options.minorUnit)},Gr.prototype.getSlot=function(t,e,i){void 0===i&&(i=!1);var o=this.options,r=this.lineInfo(),n=r.axis,s=r.axisDir,a=r.lineBox,l=r.lineStart,r=s*(r.lineSize/(o.max-o.min)),h=_(t,e||0),e=_(e,t||0),t=(i&&(h=x(h,o.min,o.max),e=x(e,o.min,o.max)),Math.min(h,e)-o.min),i=Math.max(h,e)-o.min,h=new I(a.x1,a.y1,a.x1,a.y1);return h[n+1]=Fr(l+r*(0<s?t:i)),h[n+2]=Fr(l+r*(0<s?i:t)),h},Gr.prototype.getValue=function(t){var e=this.options,i=Number(e.max),e=Number(e.min),t=this.pointOffset(t);return t<0||1<t?null:L(e+t*(i-e),g)},Gr.prototype.translateRange=function(t){var e=this.options,i=e.vertical,o=e.reverse,r=e.max,e=e.min,n=this.lineInfo().lineSize,t=L(t/(n/(r-e)),g);return{min:e+(t=!i&&!o||i&&o?t:-t),max:r+t,offset:t}},Gr.prototype.labelsCount=function(){return this.getDivisions(this.options.majorUnit)},Gr.prototype.createAxisLabel=function(t,e,i){var o=this.options,o=L(o.min+t*o.majorUnit,g),i=this.axisLabelText(o,e,i);return new Io(o,i,t,null,e)},Gr.prototype.shouldRenderNote=function(t){var e=this.range();return e.min<=t&&t<=e.max},Gr.prototype.pan=function(t){t=this.translateRange(t);return this.limitRange(t.min,t.max,this.totalMin,this.totalMax,t.offset)},Gr.prototype.pointsRange=function(t,e){var t=this.getValue(t),e=this.getValue(e),i=Math.min(t,e),t=Math.max(t,e);if(this.isValidRange(i,t))return{min:i,max:t}},Gr.prototype.scaleRange=function(t,e){var e=Math.abs(this.pointOffset(e)),i=this.options.max-this.options.min,t=this.scaleToDelta(t,i),i=(1-e)*t,e=L(this.options.min+e*t,g),t=L(this.options.max-i,g);return{min:e,max:t=t-e<Ur?e+Ur:t}},Gr.prototype.zoomRange=function(t,e){var i=this.totalMin,o=this.totalMax,t=this.scaleRange(t,e);return{min:x(t.min,i,o),max:x(t.max,i,o),narrowRange:!1}},Gr.prototype.isValidRange=function(t,e){return Ur<e-t},Gr);function Gr(t,e,i,o){Hr.call(this,Object.assign({},i,{seriesMin:t,seriesMax:e}),o)}function Wr(t,e,i){t=L(Math.abs(t%e),g);return 0===t||e*(1-i)<t}e(t,{type:"numeric",min:0,max:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:Y},labels:{format:"#.####################"},zIndex:1});let Xr=t,Yr=((Nr=Ko)&&(qr.__proto__=Nr),((qr.prototype=Object.create(Nr&&Nr.prototype)).constructor=qr).prototype.clone=function(){return new qr(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},qr.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},qr.prototype.getDivisions=function(t){var e=this.options;return Math.floor(Ar(e.min,e.max,e.baseUnit)/t+1)},qr.prototype.getTickPositions=function(t){for(var e=this.options,i=this.lineInfo(),o=i.axisDir,r=i.lineSize,n=i.lineStart,s=this.getDivisions(t),a=r/_r(e.max,e.min),l=e.weekStartDay||0,h=[n],p=1;p<s;p++){var c=n+_r(yr(e.min,p*t,e.baseUnit,l),e.min)*a*o;h.push(L(c,Z))}return h},qr.prototype.getMajorTickPositions=function(){return this.getTickPositions(this.options.majorUnit)},qr.prototype.getMinorTickPositions=function(){return this.getTickPositions(this.options.minorUnit)},qr.prototype.getSlot=function(t,e,i){return Xr.prototype.getSlot.call(this,Sr(this.intlService,t),Sr(this.intlService,e),i)},qr.prototype.getValue=function(t){t=Xr.prototype.getValue.call(this,t);return null!==t?fr(t):null},qr.prototype.labelsCount=function(){return this.getDivisions(this.options.majorUnit)},qr.prototype.createAxisLabel=function(t,e,i){var o=this.options,r=t*o.majorUnit,n=o.min,r=(0<r&&(n=yr(n,r,o.baseUnit,o.weekStartDay||0)),e.dateFormats[o.baseUnit]),o=(e.format=e.format||r,this.axisLabelText(n,e,i));return new Io(n,o,t,null,e)},qr.prototype.translateRange=function(t){var e=this.options,i=this.lineBox(),o=e.vertical,r=e.reverse,i=o?i.height():i.width(),n=this.range(),i=i/_r(n.max,n.min),n=L(t/i,g);return{min:dr(e.min,n=!o&&!r||o&&r?n:-n),max:dr(e.max,n),offset:n}},qr.prototype.shouldRenderNote=function(t){var e=this.range();return 0<=xr(t,e.min)&&xr(t,e.max)<=0},qr.prototype.pan=function(t){t=this.translateRange(t,!0),t=this.limitRange(d(t.min),d(t.max),this.totalMin,this.totalMax,t.offset);if(t)return{min:fr(t.min),max:fr(t.max)}},qr.prototype.pointsRange=function(t,e){var t=this.getValue(t),e=this.getValue(e),i=Math.min(t,e),t=Math.max(t,e);return{min:fr(i),max:fr(t)}},qr.prototype.scaleRange=function(t,e){var e=Math.abs(this.pointOffset(e)),i=this.options.max-this.options.min,t=this.scaleToDelta(t,i),i=e*t,e=(1-e)*t,t=fr(d(this.options.min)+i),i=fr(d(this.options.max)-e);return{min:t,max:i=i-t<1e3?fr(d(t)+1e3):i}},qr.prototype.zoomRange=function(t,e){t=this.scaleRange(t,e);return{min:fr(x(d(t.min),this.totalMin,this.totalMax)),max:fr(x(d(t.max),this.totalMin,this.totalMax))}},qr);function qr(t,e,i,o){var r,n,s,a,l,h,p,t=fr(t),e=fr(e),c=o.intl,i=i||{},u=(u=t,r=e,n=i=O(i||{},{min:Sr(c,i.min),max:Sr(c,i.max),axisCrossingValue:Cr(c,i.axisCrossingValues||i.axisCrossingValue),weekStartDay:Pr(i,c)}),u=n.min||u,r=n.max||r,s=n.baseUnit||(r&&u?(s=ur(r,u),a=er,pr<=s?a=nr:26784e5<=s?a=rr:hr<=s?a=or:lr<=s&&(a=ir),a):er),a=cr[s],l=n.weekStartDay||0,u=vr(d(u)-1,s,l)||fr(r),r=mr(d(r)+1,s,l),a=n.majorUnit||Dr(Bi(u.getTime(),r.getTime()),a)/a,h=Dr(h=Ar(u,r,s),a)-h,p=Math.floor(h/2),h-=p,n.baseUnit||delete n.baseUnit,n.baseUnit=n.baseUnit||s,n.min=n.min||yr(u,-p,s,l),n.max=n.max||yr(r,h,s,l),n.minorUnit=n.minorUnit||a/5,n.majorUnit=a,i=n,Nr.call(this,i,o),this.intlService=c,this.seriesMin=t,this.seriesMax=e,i.weekStartDay||0);this.totalMin=d(vr(d(t)-1,i.baseUnit,u)),this.totalMax=d(mr(d(e)+1,i.baseUnit,u))}e(Yr,{type:K,majorGridLines:{visible:!0,width:1,color:Y},labels:{dateFormats:i}});let Zr=Yr;(Qr=Ko)&&(Jr.__proto__=Qr),((Jr.prototype=Object.create(Qr&&Qr.prototype)).constructor=Jr).prototype.clone=function(){return new Jr(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},Jr.prototype.startValue=function(){return this.options.min},Jr.prototype.getSlot=function(t,e,i){var o=this.options,r=this.logMin,n=this.logMax,s=o.majorUnit,a=o.min,o=o.max,l=this.lineInfo(),h=l.axis,p=l.axisDir,c=l.lineBox,u=l.lineStart,l=p*(l.lineSize/(n-r)),n=_(t,e||1),e=_(e,t||1);if(n<=0||e<=0)return null;i&&(n=x(n,a,o),e=x(e,a,o));n=en(n,s),e=en(e,s),t=Math.min(n,e)-r,i=Math.max(n,e)-r,a=new I(c.x1,c.y1,c.x1,c.y1);return a[h+1]=Fr(u+l*(0<p?t:i)),a[h+2]=Fr(u+l*(0<p?i:t)),a},Jr.prototype.getValue=function(t){var e=this.options,i=this.logMin,o=this.logMax,e=e.majorUnit,r=this.lineInfo(),n=r.axis,s=r.lineSize,t=r.axisDir*(t[n]-r.lineStart);return t<0||s<t?null:L(Math.pow(e,i+t*((o-i)/s)),g)},Jr.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},Jr.prototype.translateRange=function(t){var e=this.options,i=this.logMin,o=this.logMax,r=e.reverse,n=e.vertical,e=e.majorUnit,s=this.lineBox(),s=n?s.height():s.width(),t=L(t/(s/(o-i)),g);return!n&&!r||n&&r||(t=-t),{min:Math.pow(e,i+t),max:Math.pow(e,o+t),offset:t}},Jr.prototype.labelsCount=function(){var t=Math.floor(this.logMax);return Math.floor(t-this.logMin)+1},Jr.prototype.getMajorTickPositions=function(){var e=[];return this.traverseMajorTicksPositions(function(t){e.push(t)},{step:1,skip:0}),e},Jr.prototype.createTicks=function(i){var t=this.options,e=t.majorTicks,o=t.minorTicks,r=t.vertical,n=t.labels.mirror,s=this.lineBox(),a={vertical:r};function l(t,e){a.tickX=n?s.x2:s.x2-e.size,a.tickY=n?s.y1-e.size:s.y1,a.position=t,i.append(qo(a,e))}return e.visible&&this.traverseMajorTicksPositions(l,e),o.visible&&this.traverseMinorTicksPositions(l,o),[]},Jr.prototype.createGridLines=function(t){var e=this.options,i=e.minorGridLines,o=e.majorGridLines,e=e.vertical,t=t.lineBox(),r={lineStart:t[e?"x1":"y1"],lineEnd:t[e?"x2":"y2"],vertical:e},n=[],s=this.gridLinesVisual();function a(t,e){u(t,n)||(r.position=t,s.append(Zo(r,e)),n.push(t))}return o.visible&&this.traverseMajorTicksPositions(a,o),i.visible&&this.traverseMinorTicksPositions(a,i),s.children},Jr.prototype.traverseMajorTicksPositions=function(t,e){for(var i=this.lineInfo(),o=i.lineStart,r=i.step,n=this.logMin,s=this.logMax,a=Math.ceil(n)+e.skip;a<=s;a+=e.step)t(L(o+r*(a-n),g),e)},Jr.prototype.traverseMinorTicksPositions=function(t,e){for(var i=this.options,o=i.min,r=i.max,n=i.minorUnit,s=i.majorUnit,i=this.lineInfo(),a=i.lineStart,l=i.step,h=this.logMin,p=this.logMax,c=Math.floor(h);c<p;c++)for(var u=this._minorIntervalOptions(c),d=e.skip;d<n;d+=e.step){var f=u.value+d*u.minorStep;if(r<f)break;o<=f&&t(L(a+l*(en(f,s)-h),g),e)}},Jr.prototype.createAxisLabel=function(t,e,i){var o=Math.ceil(this.logMin+t),o=Math.pow(this.options.majorUnit,o),i=this.axisLabelText(o,e,i);return new Io(o,i,t,null,e)},Jr.prototype.shouldRenderNote=function(t){var e=this.range();return e.min<=t&&t<=e.max},Jr.prototype.pan=function(t){t=this.translateRange(t);return this.limitRange(t.min,t.max,this.totalMin,this.totalMax,t.offset)},Jr.prototype.pointsRange=function(t,e){t=this.getValue(t),e=this.getValue(e);return{min:Math.min(t,e),max:Math.max(t,e)}},Jr.prototype.scaleRange=function(t,e){var i=this.options.majorUnit,o=en(this.options.min,i),r=en(this.options.max,i),e=Math.abs(this.pointOffset(e)),t=this.scaleToDelta(t,r-o),o=Math.pow(i,o+e*t),i=Math.pow(i,r-(1-e)*t);return{min:o,max:i=i-o<1e-6?o+1e-6:i}},Jr.prototype.zoomRange=function(t,e){var t=this.scaleRange(t,e),e=this.totalMin,i=this.totalMax;return{min:x(t.min,e,i),max:x(t.max,e,i)}},Jr.prototype._minorIntervalOptions=function(t){var e=this.options,i=e.minorUnit,e=e.majorUnit,o=Math.pow(e,t);return{value:o,minorStep:(Math.pow(e,t+1)-o)/i}},Jr.prototype.lineInfo=function(){var t=Qr.prototype.lineInfo.call(this);return t.step=t.axisDir*(t.lineSize/(this.logMax-this.logMin)),t};var Qr,Kr,$r,t=Jr;function Jr(t,e,i,o){var r,n,s,a,l,h=O({majorUnit:10,min:t,max:e},i),p=h.majorUnit,c=(c=L(en(l=e,u=p),g)%1,l<=0?u:0!=c&&(c<.3||.9<c)?Math.pow(u,en(l,u)+.2):Math.pow(u,Math.ceil(en(l,u)))),u=(l=t,s=(u=h).majorUnit,(a=l)<=0?a=e<=1?Math.pow(s,-2):1:u.narrowRange||(a=Math.pow(s,Math.floor(en(l,s)))),a),d=(l=u,s=c,a=i,r=(d=h).min,n=d.max,k(d.axisCrossingValue)&&d.axisCrossingValue<=0&&tn(),k(a.max)?a.max<=0&&tn():n=s,k(a.min)?a.min<=0&&tn():r=l,{min:r,max:n});h.max=d.max,h.min=d.min,h.minorUnit=i.minorUnit||L(p-1,g),Qr.call(this,h,o),this.totalMin=k(i.min)?Math.min(u,i.min):u,this.totalMax=k(i.max)?Math.max(c,i.max):c,this.logMin=L(en(d.min,p),g),this.logMax=L(en(d.max,p),g),this.seriesMin=t,this.seriesMax=e,this.createLabels()}function tn(){throw new Error("Non positive values cannot be used for a logarithmic axis")}function en(t,e){return Math.log(t)/Math.log(e)}e(t,{type:"log",majorUnit:10,minorUnit:1,axisCrossingValue:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:Y},zIndex:1,_deferLabels:!0});let on=t,rn={createGridLines:function(t){var e,i=this.options,o=Math.abs(this.box.center().y-t.lineBox().y1),r=[],n=!1;return i.majorGridLines.visible&&(e=this.majorGridLineAngles(t),n=!0,r=this.renderMajorGridLines(e,o,i.majorGridLines)),i.minorGridLines.visible&&(e=this.minorGridLineAngles(t,n),ee(r,this.renderMinorGridLines(e,o,i.minorGridLines,t,n))),r},renderMajorGridLines:function(t,e,i){return this.renderGridLines(t,e,i)},renderMinorGridLines:function(t,e,i,o,r){o=this.radiusCallback&&this.radiusCallback(e,o,r);return this.renderGridLines(t,e,i,o)},renderGridLines:function(t,e,i,o){for(var r={stroke:{width:i.width,color:i.color,dashType:i.dashType}},i=this.box.center(),n=new M.geometry.Circle([i.x,i.y],e),s=this.gridLinesVisual(),a=0;a<t.length;a++){var l=new M.drawing.Path(r);o&&(n.radius=o(t[a])),l.moveTo(n.center).lineTo(n.pointAt(t[a]+180)),s.append(l)}return s.children},gridLineAngles:function(t,e,i,o,r){var n=this,e=this.intervals(e,i,o,r),i=t.options,s=i.visible&&!1!==(i.line||{}).visible;return Kt(e,function(t){t=n.intervalAngle(t);if(!s||90!==t)return t})}},nn=((Kr=Mr)&&(sn.__proto__=Kr),((sn.prototype=Object.create(Kr&&Kr.prototype)).constructor=sn).prototype.range=function(){return{min:0,max:this.options.categories.length}},sn.prototype.reflow=function(t){this.box=t,this.reflowLabels()},sn.prototype.lineBox=function(){return this.box},sn.prototype.reflowLabels=function(){for(var t=this.labels,e=this.options.labels,i=e.skip||0,o=e.step||1,r=new I,n=0;n<t.length;n++){t[n].reflow(r);var s=t[n].box;t[n].reflow(this.getSlot(i+n*o).adjacentBox(0,s.width(),s.height()))}},sn.prototype.intervals=function(t,e,i,o){void 0===o&&(o=!1);for(var r,n=this.options,s=n.categories.length/t||1,a=360/s,l=i||1,h=[],p=e||0;p<s;p+=l)r=n.reverse?360-p*a:p*a,r=L(r,Z)%360,o&&u(r,o)||h.push(r);return h},sn.prototype.majorIntervals=function(){return this.intervals(1)},sn.prototype.minorIntervals=function(){return this.intervals(.5)},sn.prototype.intervalAngle=function(t){return(360+t+this.options.startAngle)%360},sn.prototype.majorAngles=function(){var e=this;return Kt(this.majorIntervals(),function(t){return e.intervalAngle(t)})},sn.prototype.createLine=function(){return[]},sn.prototype.majorGridLineAngles=function(t){var e=this.options.majorGridLines;return this.gridLineAngles(t,1,e.skip,e.step)},sn.prototype.minorGridLineAngles=function(t,e){var i=this.options,o=i.minorGridLines,i=i.majorGridLines,e=e?this.intervals(1,i.skip,i.step):null;return this.gridLineAngles(t,.5,o.skip,o.step,e)},sn.prototype.radiusCallback=function(e,t,i){var o,r;if(t.options.type!==H)return t=ce(360/(2*this.options.categories.length)),o=Math.cos(t)*e,r=this.majorAngles(),function(t){return!i&&u(t,r)?e:o}},sn.prototype.createPlotBands=function(){for(var t=this.options.plotBands||[],e=this._plotbandGroup=new M.drawing.Group({zIndex:-1}),i=0;i<t.length;i++){var o=t[i],r=this.plotBandSlot(o),n=this.getSlot(o.from),s=o.from-Math.floor(o.from),a=(r.startAngle+=s*n.angle,Math.ceil(o.to)-o.to),a=(r.angle-=(a+s)*n.angle,Xi.current.createRing(r,{fill:{color:o.color,opacity:o.opacity},stroke:{opacity:o.opacity}}));e.append(a)}this.appendVisual(e)},sn.prototype.plotBandSlot=function(t){return this.getSlot(t.from,t.to-1)},sn.prototype.getSlot=function(t,e){var i=this.options,o=i.justified,r=this.box,n=this.majorAngles(),s=n.length,a=360/s,i=(i.reverse&&!o&&(t=(t+1)%s),n[t=x(Math.floor(t),0,s-1)]),n=(o&&(i-=a/2)<0&&(i+=360),a*(x(Math.ceil(e||t),t,s-1)-t+1));return new Fi(r.center(),0,r.height()/2,i,n)},sn.prototype.slot=function(t,e){t=this.getSlot(t,e),e=t.startAngle+180;return new M.geometry.Arc([t.center.x,t.center.y],{startAngle:e,endAngle:e+t.angle,radiusX:t.radius,radiusY:t.radius})},sn.prototype.pointCategoryIndex=function(t){for(var e=this.options.categories.length,i=null,o=0;o<e;o++)if(this.getSlot(o).containsPoint(t)){i=o;break}return i},sn);function sn(){Kr.apply(this,arguments)}e(nn,{startAngle:90,labels:{margin:w(10)},majorGridLines:{visible:!0},justified:!0}),O(nn.prototype,rn);let an=nn,ln=(($r=Ko)&&(hn.__proto__=$r),((hn.prototype=Object.create($r&&$r.prototype)).constructor=hn).prototype.getDivisions=function(t){return Xr.prototype.getDivisions.call(this,t)-1},hn.prototype.reflow=function(t){this.box=t,this.reflowLabels()},hn.prototype.reflowLabels=function(){for(var t=this.options,e=this.labels,i=this.options.labels,o=i.skip||0,i=i.step||1,r=new I,n=this.intervals(t.majorUnit,o,i),s=0;s<e.length;s++){e[s].reflow(r);var a=e[s].box;e[s].reflow(this.getSlot(n[s]).adjacentBox(0,a.width(),a.height()))}},hn.prototype.lineBox=function(){return this.box},hn.prototype.intervals=function(t,e,i,o){void 0===o&&(o=!1);for(var r=this.options.min,n=this.getDivisions(t),s=[],a=i||1,l=e||0;l<n;l+=a){var h=(360+r+l*t)%360;o&&u(h,o)||s.push(h)}return s},hn.prototype.majorIntervals=function(){return this.intervals(this.options.majorUnit)},hn.prototype.minorIntervals=function(){return this.intervals(this.options.minorUnit)},hn.prototype.intervalAngle=function(t){return(540-t-this.options.startAngle)%360},hn.prototype.createLine=function(){return[]},hn.prototype.majorGridLineAngles=function(t){var e=this.options.majorGridLines;return this.gridLineAngles(t,this.options.majorUnit,e.skip,e.step)},hn.prototype.minorGridLineAngles=function(t,e){var i=this.options,o=i.minorGridLines,r=i.majorGridLines,e=e?this.intervals(i.majorUnit,r.skip,r.step):null;return this.gridLineAngles(t,i.minorUnit,o.skip,o.step,e)},hn.prototype.plotBandSlot=function(t){return this.getSlot(t.from,t.to)},hn.prototype.getSlot=function(t,e){var i=this.options,o=this.box,r=i.startAngle,t=x(t,i.min,i.max),e=x(e||t,t,i.max);return i.reverse&&(t*=-1,e*=-1),(e=(540-e-r)%360)<(t=(540-t-r)%360)&&(i=t,t=e,e=i),new Fi(o.center(),0,o.height()/2,t,e-t)},hn.prototype.slot=function(t,e){var i=this.options,o=360-i.startAngle,r=this.getSlot(t,e=void 0===e?t:e),n=Math.min(t,e),t=Math.max(t,e),e=i.reverse?(s=n,t):(s=360-t,360-n),s=(s+o)%360;return new M.geometry.Arc([r.center.x,r.center.y],{startAngle:s,endAngle:e=(e+o)%360,radiusX:r.radius,radiusY:r.radius})},hn.prototype.getValue=function(t){var e=this.options,i=this.box.center(),o=t.x-i.x,t=Math.round(oe(Math.atan2(t.y-i.y,o))),i=e.startAngle;return e.reverse||(t*=-1,i*=-1),(t+i+360)%360},hn.prototype.valueRange=function(){return{min:0,max:2*Math.PI}},hn);function hn(t,e){$r.call(this,t,e);t=this.options;t.minorUnit=t.minorUnit||t.majorUnit/2}e(ln,{type:"polar",startAngle:0,reverse:!1,majorUnit:60,min:0,max:360,labels:{margin:w(10)},majorGridLines:{color:Y,visible:!0,width:1},minorGridLines:{color:"#aaa"}}),O(ln.prototype,rn,{createPlotBands:an.prototype.createPlotBands,majorAngles:an.prototype.majorAngles,range:Xr.prototype.range,labelsCount:Xr.prototype.labelsCount,createAxisLabel:Xr.prototype.createAxisLabel});let pn=ln,cn={options:{majorGridLines:{visible:!0}},createPlotBands:function(){var t=this.options,e=t.majorGridLines.type,i=t.plotBands;void 0===i&&(i=[]);for(var t=this.plotArea.polarAxis,o=t.majorAngles(),r=t.box.center(),n=this._plotbandGroup=new M.drawing.Group({zIndex:-1}),s=0;s<i.length;s++){var a=i[s],l={fill:{color:a.color,opacity:a.opacity},stroke:{opacity:a.opacity}},a=this.getSlot(a.from,a.to,!0),a=new Fi(r,r.y-a.y2,r.y-a.y1,0,360),a=e===H?Xi.current.createRing(a,l):M.drawing.Path.fromPoints(this.plotBandPoints(a,o),l).close();n.append(a)}this.appendVisual(n)},plotBandPoints:function(t,e){for(var i=[],o=[],r=[t.center.x,t.center.y],n=new M.geometry.Circle(r,t.innerRadius),s=new M.geometry.Circle(r,t.radius),a=0;a<e.length;a++)i.push(n.pointAt(e[a]+180)),o.push(s.pointAt(e[a]+180));return i.reverse(),i.push(i[0]),o.push(o[0]),o.concat(i)},createGridLines:function(t){var e=this.options,i=this.radarMajorGridLinePositions(),o=t.majorAngles(),t=t.box.center(),r=[];return e.majorGridLines.visible&&(r=this.renderGridLines(t,i,o,e.majorGridLines)),e.minorGridLines.visible&&(i=this.radarMinorGridLinePositions(),ee(r,this.renderGridLines(t,i,o,e.minorGridLines))),r},renderGridLines:function(t,e,i,o){var r={stroke:{width:o.width,color:o.color,dashType:o.dashType}},n=o.skip,s=(void 0===n&&(n=0),o.step);void 0===s&&(s=0);for(var a=this.gridLinesVisual(),l=n;l<e.length;l+=s){var h=t.y-e[l];if(0<h){var p=new M.geometry.Circle([t.x,t.y],h);if(o.type===H)a.append(new M.drawing.Circle(p,r));else{for(var c=new M.drawing.Path(r),u=0;u<i.length;u++)c.lineTo(p.pointAt(i[u]+180));c.close(),a.append(c)}}}return a.children},getValue:function(t){var e,i,o=this.lineBox(),r=this.plotArea.polarAxis,n=r.majorAngles(),r=r.box.center(),s=t.distanceTo(r),a=s;return this.options.majorGridLines.type!==H&&1<n.length&&(e=t.x-r.x,t=t.y-r.y,i=(oe(Math.atan2(t,e))+540)%360,n.sort(function(t,e){return un(t,i)-un(e,i)}),r=90-un(n[0],n[1])/2,t=180-un(i,n[0])-r,a=s*(Math.sin(ce(t))/Math.sin(ce(r)))),this.axisType().prototype.getValue.call(this,new A(o.x1,o.y2-a))}};function un(t,e){return 180-Math.abs(Math.abs(t-e)-180)}var dn,fn,gn,yn,i=cn,t=((dn=Xr)&&(vn.__proto__=dn),((vn.prototype=Object.create(dn&&dn.prototype)).constructor=vn).prototype.radarMajorGridLinePositions=function(){return this.getTickPositions(this.options.majorUnit)},vn.prototype.radarMinorGridLinePositions=function(){var t=this.options,e=0;return t.majorGridLines.visible&&(e=t.majorUnit),this.getTickPositions(t.minorUnit,e)},vn.prototype.axisType=function(){return dn},vn);function vn(){dn.apply(this,arguments)}O(t.prototype,i);let mn=t,xn=((fn=on)&&(_n.__proto__=fn),((_n.prototype=Object.create(fn&&fn.prototype)).constructor=_n).prototype.radarMajorGridLinePositions=function(){var e=[];return this.traverseMajorTicksPositions(function(t){e.push(t)},this.options.majorGridLines),e},_n.prototype.radarMinorGridLinePositions=function(){var e=[];return this.traverseMinorTicksPositions(function(t){e.push(t)},this.options.minorGridLines),e},_n.prototype.axisType=function(){return fn},_n);function _n(){fn.apply(this,arguments)}O(xn.prototype,i);let bn=xn;function wn(t){return t<=0?-1:1}(gn=M.Class)&&(An.__proto__=gn),((An.prototype=Object.create(gn&&gn.prototype)).constructor=An).prototype.process=function(t){var e=t.slice(0),i=[],o=this.closed,r=e.length;if(2<r&&(this.removeDuplicates(0,e),r=e.length),!(r<2||2===r&&e[0].equals(e[1]))){var n,s=e[0],a=e[1],l=e[2];for(i.push(new M.geometry.Segment(s));s.equals(e[r-1]);)o=!0,e.pop(),r--;if(2===r)t=this.tangent(s,a,y,v),he(i).controlOut(this.firstControlPoint(t,s,a,y,v)),i.push(new M.geometry.Segment(a,this.secondControlPoint(t,s,a,y,v)));else{o?(s=e[r-1],a=e[0],l=e[1],p=(t=this.controlPoints(s,a,l))[1],n=t[0]):(t=this.tangent(s,a,y,v),p=this.firstControlPoint(t,s,a,y,v));for(var h,p,c=p,u=0;u<=r-3;u++)this.removeDuplicates(u,e),u+3<=(r=e.length)&&(s=e[u],a=e[u+1],l=e[u+2],h=this.controlPoints(s,a,l),he(i).controlOut(c),c=h[1],h=h[0],i.push(new M.geometry.Segment(a,h)));o?(s=e[r-2],a=e[r-1],l=e[0],t=this.controlPoints(s,a,l),he(i).controlOut(c),i.push(new M.geometry.Segment(a,t[0])),he(i).controlOut(t[1]),i.push(new M.geometry.Segment(l,n))):(p=this.tangent(a,l,y,v),he(i).controlOut(c),i.push(new M.geometry.Segment(l,this.secondControlPoint(p,a,l,y,v))))}}return i},An.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)},An.prototype.invertAxis=function(t,e,i){var o,r=!1;return t.x===e.x?r=!0:e.x===i.x?(e.y<i.y&&t.y<=e.y||i.y<e.y&&e.y<=t.y)&&(r=!0):(o=this.lineFunction(t,e),o=this.calculateFunction(o,i.x),t.y<=e.y&&i.y<=o||e.y<=t.y&&i.y>=o||(r=!0)),r},An.prototype.isLine=function(t,e,i){var o=this.lineFunction(t,e),o=this.calculateFunction(o,i.x);return t.x===e.x&&e.x===i.x||L(o,1)===L(i.y,1)},An.prototype.lineFunction=function(t,e){e=(e.y-t.y)/(e.x-t.x);return[t.y-e*t.x,e]},An.prototype.controlPoints=function(t,e,i){var o,r=y,n=v,s=!1,a=!1,l=(this.isLine(t,e,i)?o=this.tangent(t,e,y,v):(l={x:this.isMonotonicByField(t,e,i,y),y:this.isMonotonicByField(t,e,i,v)}).x&&l.y?(o=this.tangent(t,i,y,v),s=!0):(this.invertAxis(t,e,i)&&(r=v,n=y),l[r]?o=0:(o=.01*(i[n]<t[n]&&t[n]<=e[n]||t[n]<i[n]&&e[n]<=t[n]?wn((i[n]-t[n])*(e[r]-t[r])):-wn((i[r]-t[r])*(e[n]-t[n]))),a=!0)),this.secondControlPoint(o,t,e,r,n)),a=(a&&(a=r,r=n,n=a),this.firstControlPoint(o,e,i,r,n));return s&&(this.restrictControlPoint(t,e,l,o),this.restrictControlPoint(e,i,a,o)),[l,a]},An.prototype.restrictControlPoint=function(t,e,i,o){t.y<e.y?e.y<i.y?(i.x=t.x+(e.y-t.y)/o,i.y=e.y):i.y<t.y&&(i.x=e.x-(e.y-t.y)/o,i.y=t.y):i.y<e.y?(i.x=t.x-(t.y-e.y)/o,i.y=e.y):t.y<i.y&&(i.x=e.x+(t.y-e.y)/o,i.y=t.y)},An.prototype.tangent=function(t,e,i,o){i=e[i]-t[i];return 0==i?0:(e[o]-t[o])/i},An.prototype.isMonotonicByField=function(t,e,i,o){return i[o]>e[o]&&e[o]>t[o]||i[o]<e[o]&&e[o]<t[o]},An.prototype.firstControlPoint=function(t,e,i,o,r){var n=e[o],i=.333*(i[o]-n);return this.point(n+i,e[r]+i*t,o,r)},An.prototype.secondControlPoint=function(t,e,i,o,r){var e=e[o],n=i[o],e=.333*(n-e);return this.point(n-e,i[r]-e*t,o,r)},An.prototype.point=function(t,e,i,o){var r=new M.geometry.Point;return r[i]=t,r[o]=e,r},An.prototype.calculateFunction=function(t,e){for(var i=t.length,o=0,r=0;r<i;r++)o+=Math.pow(e,r)*t[r];return o};let kn=An;function An(t){gn.call(this),this.closed=t}function Sn(t){yn.call(this),this._axis=t,this.options=t.options}(yn=M.Class)&&(Sn.__proto__=yn),((Sn.prototype=Object.create(yn&&yn.prototype)).constructor=Sn).prototype.value=function(t){var e=this._axis;return e.getCategory?e.getCategory(t):e.getValue(t)},Sn.prototype.slot=function(t,e,i){return this._axis.slot(t,e,i=void 0===i?!0:i)},Sn.prototype.range=function(){return this._axis.range()},Sn.prototype.valueRange=function(){return this._axis.valueRange()};let Cn=Sn;function Pn(t,e){for(var i=0;i<e.length;i++)if(e[i].options.name===t)return e[i].prepareUserOptions(),new Cn(e[i])}function Tn(t){this.visual=t.visual,this.chartsVisual=t.chartContainer.visual,this._pane=t}var Mn;Tn.prototype.findAxisByName=function(t){return Pn(t,this._pane.axes)};let On=Tn,Ln=((Mn=M.Class)&&(In.__proto__=Mn),(In.prototype=Object.create(Mn&&Mn.prototype)).constructor=In);function In(t){Mn.call(this),this._plotArea=t,this.visual=t.visual,this.backgroundVisual=t._bgVisual}function Bn(t){for(var e=t.length,i=0,o=0;o<e;o++)m(t[o])&&i++;return i}var En={min:function(t){for(var e=t.length,i=rt,o=0;o<e;o++){var r=t[o];m(r)&&(i=Math.min(i,r))}return i===rt?t[0]:i},max:function(t){for(var e=t.length,i=nt,o=0;o<e;o++){var r=t[o];m(r)&&(i=Math.max(i,r))}return i===nt?t[0]:i},sum:function(t){for(var e=t.length,i=0,o=0;o<e;o++){var r=t[o];m(r)&&(i+=r)}return i},sumOrNull:function(t){var e=null;return e=Bn(t)?En.sum(t):e},count:function(t){for(var e=t.length,i=0,o=0;o<e;o++){var r=t[o];null!==r&&k(r)&&i++}return i},avg:function(t){var e=Bn(t),i=t[0];return i=0<e?En.sum(t)/e:i},first:function(t){for(var e=t.length,i=0;i<e;i++){var o=t[i];if(null!==o&&k(o))return o}return t[0]}};let Rn=En;function Vn(t,e){return null===e?e:Ht(t)(e)}(jn=M.Class)&&(zn.__proto__=jn),((zn.prototype=Object.create(jn&&jn.prototype)).constructor=zn).prototype.register=function(t,e,i){void 0===e&&(e=[ut]),void 0===i&&(i={});for(var o=0;o<t.length;o++){var r=t[o];this._valueFields[r]=e,this._otherFields[r]=i,this._nullValue[r]=this._makeValue(e,null),this._undefinedValue[r]=this._makeValue(e,void 0)}},zn.prototype.canonicalFields=function(t){return this.valueFields(t).concat(this.otherFields(t))},zn.prototype.valueFields=function(t){return this._valueFields[t.type]||[ut]},zn.prototype.otherFields=function(t){return this._otherFields[t.type]||[ut]},zn.prototype.bindPoint=function(t,e,i){var o,r,n,s,a=t.data,i=k(i)?i:a[e],a={valueFields:{value:i}},e=this.valueFields(t),l=this._otherFields[t.type];return null===i?o=this._nullValue[t.type]:k(i)?Array.isArray(i)?(r=i.slice(e.length),o=this._bindFromArray(i,e),r=this._bindFromArray(r,l)):"object"==typeof i&&(n=this.sourceFields(t,e),s=this.sourceFields(t,l),o=this._bindFromObject(i,e,n),r=this._bindFromObject(i,l,s)):o=this._undefinedValue[t.type],k(o)&&(1===e.length?a.valueFields.value=o[e[0]]:a.valueFields=o),a.fields=r||{},a},zn.prototype._makeValue=function(t,e){for(var i={},o=t.length,r=0;r<o;r++)i[t[r]]=e;return i},zn.prototype._bindFromArray=function(t,e){var i={};if(e)for(var o=Math.min(e.length,t.length),r=0;r<o;r++)i[e[r]]=t[r];return i},zn.prototype._bindFromObject=function(t,e,i){void 0===i&&(i=e);var o={};if(e)for(var r=e.length,n=0;n<r;n++){var s=e[n],a=i[n];null!==a&&(o[s]=Vn(a,t))}return o},zn.prototype.sourceFields=function(t,e){var i=[];if(e)for(var o=e.length,r=0;r<o;r++){var n=e[r],s=n===ut?"field":n+"Field";i.push(null!==t[s]?t[s]||n:null)}return i};var jn,t=zn;function zn(){jn.call(this),this._valueFields={},this._otherFields={},this._nullValue={},this._undefinedValue={}}t.current=new t;let Dn=t;var Fn,Hn=/percent(?:\w*)\((\d+)\)/,Nn=new RegExp("^stddev(?:\\((\\d+(?:\\.\\d+)?)\\))?$");function Un(t,e,i){Fn.call(this),this.initGlobalRanges(t,e,i)}(Fn=M.Class)&&(Un.__proto__=Fn),((Un.prototype=Object.create(Fn&&Fn.prototype)).constructor=Un).prototype.initGlobalRanges=function(t,e,i){var o,r,n,s,a=e.data,l=Nn.exec(t);l?(this.valueGetter=this.createValueGetter(e,i),o=this.getAverage(a),r=this.getStandardDeviation(a,o,!1),l=l[1]?parseFloat(l[1]):1,n={low:o.value-r*l,high:o.value+r*l},this.globalRange=function(){return n}):t.indexOf&&0<=t.indexOf("stderr")&&(this.valueGetter=this.createValueGetter(e,i),s=this.getStandardError(a,this.getAverage(a)),this.globalRange=function(t){return{low:t-s,high:t+s}})},Un.prototype.createValueGetter=function(t,e){var i,o=t.data,r=Dn.current,n=r.valueFields(t),o=k(o[0])?o[0]:{};return yt(o)?i=Ht("["+(e?n.indexOf(e):0)+"]"):m(o)?i=Ht():typeof o==at&&(i=Ht(r.sourceFields(t,n)[n.indexOf(e)])),i},Un.prototype.getErrorRange=function(t,e){var i;if(!k(e))return null;if(this.globalRange)return this.globalRange(t);if(yt(e))o=t-e[0],r=t+e[1];else if(m(i=parseFloat(e)))o=t-i,r=t+i;else{if(!(i=Hn.exec(e)))throw new Error("Invalid ErrorBar value: "+e);var e=t*(parseFloat(i[1])/100),o=t-Math.abs(e),r=t+Math.abs(e)}return{low:o,high:r}},Un.prototype.getStandardError=function(t,e){return this.getStandardDeviation(t,e,!0)/Math.sqrt(e.count)},Un.prototype.getStandardDeviation=function(t,e,i){for(var o=t.length,i=i?e.count-1:e.count,r=0,n=0;n<o;n++){var s=this.valueGetter(t[n]);m(s)&&(r+=Math.pow(s-e.value,2))}return Math.sqrt(r/i)},Un.prototype.getAverage=function(t){for(var e=t.length,i=0,o=0,r=0;r<e;r++){var n=this.valueGetter(t[r]);m(n)&&(i+=n,o++)}return{value:i/o,count:o}};let Gn=Un;var Wn,Xn,i=M.support.browser||{},Yn=600,qn="fadeIn",Zn=i.msie?.001:0,Qn="errorLow",Kn="errorHigh",$n="zero",Jn="interpolate",ts="above",es="below",is="smooth",os="step",rs="area",ns="bar",ss="boxPlot",as="bubble",ls="bullet",hs="candlestick",ps="column",cs="donut",us="funnel",ds="pyramid",fs="heatmap",gs="horizontalWaterfall",ys="line",vs="ohlc",ms="pie",xs="polarArea",_s="polarLine",bs="polarScatter",ws="radarArea",ks="radarColumn",As="radarLine",Ss="rangeArea",Cs="rangeBar",Ps="rangeColumn",Ts="scatter",Ms="scatterLine",Os="verticalArea",Ls="verticalBoxPlot",Is="verticalBullet",Bs="verticalLine",Es="verticalRangeArea",Rs="waterfall",Vs=[ns,ps,vs,hs,ss,Ls,ls,Ps,Cs,Rs,gs],t="exponentialTrendline",i="linearTrendline",js="logarithmicTrendline",zs="movingAverageTrendline",Ds="polynomialTrendline",Fs="powerTrendline",Hs=[t,i,js,zs,Ds,Fs],Ns="legendItemClick",Us="seriesClick",Gs="seriesHover",Ws="seriesOver",Xs="seriesLeave",Ys="plotAreaHover",qs="plotAreaLeave",Zs="drag",Qs="dragEnd",Ks="dragStart",$s="zoomStart",Js="zoom",ta="zoomEnd",ea="selectStart",ia="select",oa="selectEnd",ra="showTooltip",na="hideTooltip",t="graphics-symbol",i="k-chart-point",js="Point",sa="log",zs="category",aa="insideEnd",la="outsideEnd",ha="wheel",Ds="drilldown",Fs="pattern",l=((Wn=o)&&(pa.__proto__=Wn),((pa.prototype=Object.create(Wn&&Wn.prototype)).constructor=pa).prototype.reflow=function(t){var e,i=this.options.endCaps,o=this.isVertical,r=this.getAxis().getSlot(this.low,this.high),n=t.center(),t=this.getCapsWidth(t,o),s=o?n.x:n.y,a=s-t,s=s+t;o?(e=[new A(n.x,r.y1),new A(n.x,r.y2)],i&&e.push(new A(a,r.y1),new A(s,r.y1),new A(a,r.y2),new A(s,r.y2)),this.box=new I(a,r.y1,s,r.y2)):(e=[new A(r.x1,n.y),new A(r.x2,n.y)],i&&e.push(new A(r.x1,a),new A(r.x1,s),new A(r.x2,a),new A(r.x2,s)),this.box=new I(r.x1,a,r.x2,s)),this.linePoints=e},pa.prototype.getCapsWidth=function(t,e){e=e?t.width():t.height();return Math.min(Math.floor(e/2),4)||4},pa.prototype.createVisual=function(){var e=this,t=this.options,i=t.visual;i?this.visual=i({low:this.low,high:this.high,rect:this.box.toRect(),sender:this.getSender(),options:{endCaps:t.endCaps,color:t.color,line:t.line},createVisual:function(){e.createDefaultVisual();var t=e.visual;return delete e.visual,t}}):this.createDefaultVisual()},pa.prototype.createDefaultVisual=function(){var t=this.options,e=this.linePoints,i={stroke:{color:t.color,width:t.line.width,dashType:t.line.dashType}};Wn.prototype.createVisual.call(this);for(var o=0;o<e.length;o+=2){var r=new M.drawing.Path(i).moveTo(e[o].x,e[o].y).lineTo(e[o+1].x,e[o+1].y);_t(r),this.visual.append(r)}},pa);function pa(t,e,i,o,r,n){Wn.call(this,n),this.low=t,this.high=e,this.isVertical=i,this.chart=o,this.series=r}e(l,{animation:{type:qn,delay:Yn},endCaps:!0,line:{width:2},zIndex:1});let ca=l,ua=((Xn=ca)&&(da.__proto__=Xn),((da.prototype=Object.create(Xn&&Xn.prototype)).constructor=da).prototype.getAxis=function(){return this.chart.seriesValueAxis(this.series)},da);function da(){Xn.apply(this,arguments)}let fa=ua;function ga(t){for(var e=0;e<t.length;e++)if(k(t[e].zIndex))return!0}function ya(t,e){null!==e&&t.push(e)}function va(t){return Bn(t)===t.length}function ma(t,e,i){var e=e.visible;return k(e)?e:(e=t.pointVisibility)?e[i]:void 0}function xa(t){for(var e=t.data,i=[],o=0,r=0,n=0;n<e.length;n++){var s=Dn.current.bindPoint(t,n),a=s.valueFields.value;m(a=wt(a)?parseFloat(a):a)?(s.visible=!1!==ma(t,s.fields,n),s.value=Math.abs(a),i.push(s),s.visible&&(o+=s.value),0!==a&&r++):i.push(null)}return{total:o,points:i,count:r}}function _a(t){for(var e=t.length,i=0,o=0;o<e;o++)i=Math.max(i,t[o].data.length);return i}function ba(t,e){return t&&e?t.toLowerCase()===e.toLowerCase():t===e}var wa=5;function ka(t,e,i,o){void 0===o&&(o=!1);var r,n,s=(i=void 0===i?{}:i).defaults=i.defaults||{},a=i.depth=i.depth||0,l=!1;if(i.excluded=i.excluded||[],wa<a)return null;for(r in t)!u(r,i.excluded)&&je(t,r)&&(Pt(n=t[r])?(l=!0,o||(t[r]=_(n(e),s[r]))):Ot(n)&&(o||(i.defaults=s[r]),i.depth++,l=ka(n,e,i,o)||l,i.depth--));return l}function Aa(t,e){for(var i=[],o=[].concat(e),r=0;r<t.length;r++){var n=t[r];u(n.type,o)&&i.push(n)}return i}var Sa=new WeakMap;function Ca(t,e,i){var o;return null===e||"object"!=typeof e?Sr(i,t):((o=Sa.get(e))||(o=Sr(i,t),Sa.set(e,o)),o)}function Pa(t){t=t.overlay;return t&&t.gradient&&"none"!==t.gradient}function Ta(t){return k(t)&&null!==t}function Ma(t,e){t=t.type,e=e instanceof Date;return!t&&e||ba(t,K)}function Oa(t){return 1===t.length?t[0]:t}var La=/area/i;function Ia(t,e){var i,o=Dn.current.bindPoint(t,null,e).valueFields;for(i in o)if(kt(o[i]))return!0}function Ba(t){for(var e,i,o=t.start,r=t.dir,n=t.min,s=t.max,a=t.getter,l=t.hasItem,h=t.series,p=o;l(p+=r)&&(e=Ia(h,(i=a(p)).item)),n<=p&&p<=s&&!e;);if(e)return i}function Ea(t,e,i,o,r){var n,s,a,l,h=e.min,e=e.max,p=0<h&&h<i,c=e+1<i;(p||c)&&(((l=t).missingValues||(La.test(l.type)||l.stack?$n:Jn))!==Jn?(p&&(n=o(h-1)),c&&(s=o(e+1))):(p&&(n=Ia(t,(a=o(h-1)).item)?a:Ba({start:h,dir:-1,min:0,max:i-1,getter:o,hasItem:r,series:t})),c&&(s=Ia(t,(a=o(e+1)).item)?a:Ba({start:e,dir:1,min:0,max:i-1,getter:o,hasItem:r,series:t}))),n&&(t._outOfRangeMinPoint=n),s)&&(t._outOfRangeMaxPoint=s)}(Ra=o)&&(za.__proto__=Ra),((za.prototype=Object.create(Ra&&Ra.prototype)).constructor=za).prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},za.prototype.pointOptions=function(t,e){var i,o=this.seriesOptions[e];return o||(i=this.pointType().prototype.defaults,this.seriesOptions[e]=o=O({},i,{vertical:!this.options.invertAxes},t)),o},za.prototype.plotValue=function(t){if(!t)return 0;if(this.options.isStacked100&&m(t.value)){for(var e=t.categoryIx,i=this.categoryPoints[e],o=[],r=0,n=0;n<i.length;n++){var s,a,l=i[n];l&&(s=t.series.stack,a=l.series.stack,s&&a&&s.group!==a.group||m(l.value)&&(r+=Math.abs(l.value),o.push(Math.abs(l.value))))}if(0<r)return t.value/r}return t.value},za.prototype.plotRange=function(t,e){void 0===e&&(e=0);var i=this.categoryPoints[t.categoryIx];if(this.options.isStacked){var o=this.plotValue(t),r=0<=o,n=e,s=!1,a=k(t.series.stack)?t.series.stack:this.options.defaultStack,l=function(t){return!0===t||typeof t==at&&!t.group};if(a)for(var h=0;h<i.length;h++){var p=i[h];if(t===p)break;var c=k(p.series.stack)?p.series.stack:this.options.defaultStack;!c||typeof a===ct&&a!==c||l(a)&&!l(c)||a.group&&a.group!==c.group||!(0<=(c=this.plotValue(p))&&r||c<0&&!r)||0!==e&&0===c||(n+=c,o+=c,s=!0,this.options.isStacked100&&(o=Math.min(o,1)))}return s&&(n-=e),[n,o]}var u=this.seriesValueAxis(t.series),u=this.categoryAxisCrossingValue(u);return[u,kt(t.value)?t.value:u]},za.prototype.stackLimits=function(t,e){for(var i=rt,o=nt,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],k(a)&&isFinite(a)&&(o=Math.max(o,a),i=Math.min(i,a)))}}return{min:i,max:o}},za.prototype.updateStackRange=function(){var t=this.options,e=t.isStacked,i=t.series,o={};if(e)for(var r=0;r<i.length;r++){var n=i[r],s=n.axis,a=s+n.stack,l=o[a];l||(l=this.stackLimits(s,n.stack),(n=this.errorTotals)&&(n.negative.length&&(l.min=Math.min(l.min,ke(n.negative).min)),n.positive.length)&&(l.max=Math.max(l.max,ke(n.positive).max)),l.min!==rt||l.max!==nt?o[a]=l:l=null),l&&(this.valueAxisRanges[s]=l)}},za.prototype.addErrorBar=function(t,e,i){var o,r=t.value,n=t.series,s=t.seriesIx,a=t.options.errorBars,l=e.fields[Qn],e=e.fields[Kn];m(l)&&m(e)?o={low:l,high:e}:a&&k(a.value)&&(this.seriesErrorRanges=this.seriesErrorRanges||[],this.seriesErrorRanges[s]=this.seriesErrorRanges[s]||new Gn(a.value,n,ut),o=this.seriesErrorRanges[s].getErrorRange(r,a.value)),o&&(t.low=o.low,t.high=o.high,this.addPointErrorBar(t,i))},za.prototype.addPointErrorBar=function(t,e){var i,o=!this.options.invertAxes,r=t.options.errorBars,n=t.series,s=t.low,a=t.high,e=(this.options.isStacked?(s=(i=this.stackedErrorRange(t,e)).low,a=i.high):(this.updateRange({value:s},i={categoryIx:e,series:n}),this.updateRange({value:a},i)),new fa(s,a,o,this,n,r));t.errorBars=[e],t.append(e)},za.prototype.stackedErrorRange=function(t,e){var i=this.plotRange(t,0)[1]-t.value,o=t.low+i,t=t.high+i;return this.errorTotals=this.errorTotals||{positive:[],negative:[]},o<0&&(this.errorTotals.negative[e]=Math.min(this.errorTotals.negative[e]||0,o)),0<t&&(this.errorTotals.positive[e]=Math.max(this.errorTotals.positive[e]||0,t)),{low:o,high:t}},za.prototype.addValue=function(t,e){var i=e.categoryIx,o=e.series,r=e.seriesIx,n=this.categoryPoints[i],s=(n||(this.categoryPoints[i]=n=[]),this.seriesPoints[r]),r=(s||(this.seriesPoints[r]=s=[]),this.createPoint(t,e));r&&(Object.assign(r,e),r.owner=this,r.noteText=t.fields.noteText,k(r.dataItem)||(r.dataItem=o.data[i]),this.addErrorBar(r,t,i)),this.points.push(r),s.push(r),n.push(r),this.updateRange(t.valueFields,e)},za.prototype.evalPointOptions=function(t,e,i){var o=i.categoryIx,r=i.category,n=i.series,i=i.seriesIx,s={defaults:n._defaults,excluded:["data","aggregate","_events","tooltip","content","template","visual","toggle","_outOfRangeMinPoint","_outOfRangeMaxPoint","drilldownSeriesFactory","ariaTemplate","ariaContent"]},a=this._evalSeries[i],i=(k(a)||(this._evalSeries[i]=a=ka(t,{},s,!0)),t);return a&&ka(i=O({},i),{value:e,category:r,index:o,series:n,dataItem:n.data[o]},s),i},za.prototype.updateRange=function(t,e){var e=e.series.axis,t=t.value,i=this.valueAxisRanges[e];isFinite(t)&&null!==t&&((i=this.valueAxisRanges[e]=i||{min:rt,max:nt}).min=Math.min(i.min,t),i.max=Math.max(i.max,t))},za.prototype.seriesValueAxis=function(t){var e=this.plotArea,t=t.axis,e=t?e.namedValueAxes[t]:e.valueAxis;if(e)return e;throw new Error("Unable to locate value axis with name "+t)},za.prototype.reflow=function(t){var s=this,a=this.categorySlots=[],l=this.points,h=this.categoryAxis,p=0;this.traverseDataPoints(function(t,e){var i,o=e.categoryIx,e=s.seriesValueAxis(e.series),r=l[p++],n=a[o];n||(a[o]=n=s.categorySlot(h,o,e)),r&&(o=s.plotRange(r,e.startValue()),(i=s.valueSlot(e,o))?(n=s.pointSlot(n,i),r.aboveAxis=s.aboveAxis(r,e),r.stackValue=o[1],s.options.isStacked100&&(r.percentage=s.plotValue(r)),s.reflowPoint(r,n)):r.visible=!1)}),this.reflowCategories(a),!this.options.clip&&this.options.limitPoints&&this.points.length&&this.limitPoints(),this.box=t},za.prototype.valueSlot=function(t,e){return t.getSlot(e[0],e[1],!this.options.clip)},za.prototype.limitPoints=function(){for(var t=this.categoryPoints,e=t[0].concat(he(t)),i=0;i<e.length;i++)e[i]&&this.limitPoint(e[i])},za.prototype.limitPoint=function(t){var e=this.categoryAxis.limitSlot(t.box);e.equals(t.box)||t.reflow(e)},za.prototype.aboveAxis=function(t,e){var i=this.categoryAxisCrossingValue(e),t=t.value;return e.options.reverse?t<i:i<=t},za.prototype.categoryAxisCrossingValue=function(t){var e=this.categoryAxis,t=t.options;return[].concat(t.axisCrossingValues||t.axisCrossingValue)[e.axisIndex||0]||0},za.prototype.reflowPoint=function(t,e){t.reflow(e)},za.prototype.reflowCategories=function(){},za.prototype.pointSlot=function(t,e){var i=this.options.invertAxes,o=i?e:t,i=i?t:e;return new I(o.x1,i.y1,o.x2,i.y2)},za.prototype.categorySlot=function(t,e){return t.getSlot(e)},za.prototype.traverseDataPoints=function(t){for(var e=this.options.series,i=_a(e),o=e.length,r=0;r<o;r++)this._outOfRangeCallback(e[r],"_outOfRangeMinPoint",r,t);for(var n=0;n<i;n++)for(var s=0;s<o;s++){var a=e[s],l=this.categoryAxis.categoryAt(n);t(this.plotArea.bindPoint(a,n),{category:l,categoryIx:n,categoriesCount:i,series:a,seriesIx:s})}for(var h=0;h<o;h++)this._outOfRangeCallback(e[h],"_outOfRangeMaxPoint",h,t)},za.prototype._outOfRangeCallback=function(t,e,i,o){var r,e=t[e];e&&(r=e.categoryIx,o(this.plotArea.bindPoint(t,r,e.item),{category:e.category,categoryIx:r,series:t,seriesIx:i,dataItem:e.item}))},za.prototype.formatPointValue=function(t,e){return null===t.value?"":this.chartService.format.auto(e,t.value)},za.prototype.pointValue=function(t){return t.valueFields.value};var Ra,Va,ja,l=za;function za(t,e){Ra.call(this,e),this.plotArea=t,this.chartService=t.chartService,this.categoryAxis=t.seriesCategoryAxis(e.series[0]),this.valueAxisRanges={},this.points=[],this.categoryPoints=[],this.seriesPoints=[],this.seriesOptions=[],this._evalSeries=[],this.render()}e(l,{series:[],invertAxes:!1,isStacked:!1,clip:!0,limitPoints:!0});let Da=l,Fa={click:function(t,e){return t.trigger(Us,this.eventArgs(e))},hover:function(t,e){return t.trigger(Gs,this.eventArgs(e))},over:function(t,e){return t.trigger(Ws,this.eventArgs(e))},out:function(t,e){return t.trigger(Xs,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:ae(t),originalEvent:t,point:this}}},Ha=Fa,Na={createNote:function(){var t=this.options.notes,e=this.noteText||t.label.text;!1!==t.visible&&k(e)&&null!==e&&(this.note=new Ro({value:this.value,text:e,dataItem:this.dataItem,category:this.category,series:this.series},this.options.notes,this.owner.chartService),this.append(this.note))}},Ua=((Va=o)&&(Ga.__proto__=Va),((Ga.prototype=Object.create(Va&&Va.prototype)).constructor=Ga).prototype.render=function(){var t=this.options.markers;this._rendered||(this._rendered=!0,t.visible&&t.size&&(this.marker=this.createMarker(),this.append(this.marker)),this.createLabel(),this.createNote(),this.errorBar&&this.append(this.errorBar))},Ga.prototype.createLabel=function(){var t=this.options.labels;t.visible&&(this.label=this.createLabelElement(t),this.append(this.label))},Ga.prototype.createLabelElement=function(t){return new So(this.getLabelText(t),O({align:b,vAlign:b,margin:{left:5,right:5},zIndex:_(t.zIndex,this.series.zIndex)},t),this.pointData())},Ga.prototype.getLabelText=function(t){var e=jt(t);return e?e(this.pointData()):t.format?this.formatValue(t.format):this.value},Ga.prototype.getAriaLabelText=function(){var t=this.options.labels,e=zt(t);return e?e(this.pointData()):this.getLabelText(t)},Ga.prototype.markerBorder=function(){var t=this.options.markers,e=t.background,t=O({color:this.color},t.border);return k(t.color)||(t.color=new M.Color(e).brightness(.8).toHex()),t},Ga.prototype.createVisual=function(){},Ga.prototype.createMarker=function(){var t=this.options.markers;return new oo({type:t.type,width:t.size,height:t.size,rotation:t.rotation,background:t.background,border:this.markerBorder(),opacity:t.opacity,pattern:this.options.pattern,zIndex:_(t.zIndex,this.series.zIndex),animation:t.animation,visual:t.visual,accessibilityOptions:O({ariaLabel:this.getAriaLabelText(this.options.labels)},this.options.accessibility)},{dataItem:this.dataItem,value:this.value,series:this.series,category:this.category})},Ga.prototype.markerBox=function(){return this.marker||(this.marker=this.createMarker(),this.marker.reflow(this._childBox)),this.marker.box},Ga.prototype.reflow=function(t){var e=this.options,i=this.aboveAxis,o=e.vertical,r=(this.render(),(this.box=t).clone());if(o?i?r.y1-=r.height():r.y2+=r.height():i?r.x1+=r.width():r.x2-=r.width(),this._childBox=r,this.marker&&this.marker.reflow(r),this.reflowLabel(r),this.errorBars)for(var n=0;n<this.errorBars.length;n++)this.errorBars[n].reflow(r);this.note&&(t=this.markerBox(),e.markers.visible&&e.markers.size||(o=t.center(),t=new I(o.x,o.y,o.x,o.y)),this.note.reflow(t))},Ga.prototype.reflowLabel=function(t){var e=this.options,i=this.label,e=e.labels.position;i&&(e=(e=e===ts?T:e)===es?S:e,i.reflow(t),i.box.alignTo(this.markerBox(),e),i.reflow(i.box))},Ga.prototype.createHighlight=function(){var t=this.options.highlight.markers,e=this.markerBorder().color,i=this.options.markers,o=i.size+(i.border.width||0)+(t.border.width||0),o=new oo({type:i.type,width:o,height:o,rotation:i.rotation,background:t.color||e,border:{color:t.border.color,width:t.border.width,opacity:_(t.border.opacity,1)},opacity:_(t.opacity,1)});return o.reflow(this._childBox),o.getElement()},Ga.prototype.highlightVisual=function(){return(this.marker||{}).visual},Ga.prototype.highlightVisualArgs=function(){var t,e,i,o,r=this.marker;return r?(o=r.paddingBox.toRect(),t=r.visual):(e=(r=this.options.markers.size)/2,i=this.box.center(),o=new M.geometry.Rect([i.x-e,i.y-e],[r,r])),{options:this.options,rect:o,visual:t}},Ga.prototype.createFocusHighlight=function(){var t=this.options.markers,e=this.options.focusHighlight,i=t.size+(t.border.width||0),i=new oo({type:t.type,width:i,height:i,rotation:t.rotation,background:e.color,border:e.border,opacity:e.opacity,padding:e.border.width/2,zIndex:e.zIndex});return i.reflow(this._childBox),i.getElement()},Ga.prototype.tooltipAnchor=function(){var t,e,i=this.markerBox(),o=this.owner.pane.clipBox();if(!o||o.overlaps(i))return o=i.x2+5,e=C,i=this.aboveAxis?(t=i.y1,S):(t=i.y2,T),{point:new A(o,t),align:{horizontal:e,vertical:i}}},Ga.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Ga.prototype.overlapsBox=function(t){return this.markerBox().overlaps(t)},Ga.prototype.unclipElements=function(){this.label&&(this.label.options.noclip=!0),this.note&&(this.note.options.noclip=!0)},Ga.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,stackValue:this.stackValue,series:this.series}},Ga.prototype.focusVisual=function(){this.marker&&(this.marker.visual&&this.marker.visual.options.set("id",this._id),this.toggleFocusHighlight(!0))},Ga.prototype.clearFocusFromVisual=function(){this.marker&&(this.marker.visual&&this.marker.visual.options.set("id",""),this.toggleFocusHighlight(!1))},Ga.prototype.getIndex=function(){return k(this.categoryIx)?this.categoryIx:this.pointIx},Ga);function Ga(t,e){Va.call(this),this.value=t,this.options=e,this.aboveAxis=_(this.options.aboveAxis,!0),this.tooltipTracking=!0,this._id=Ue()}Ua.prototype.defaults={vertical:!0,markers:{visible:!0,background:a,size:8,type:q,border:{width:2},opacity:1},labels:{visible:!1,position:ts,margin:w(3),padding:w(4),animation:{type:qn,delay:Yn}},notes:{label:{}},highlight:{markers:{border:{color:"#fff",width:2}},zIndex:100},errorBars:{line:{width:1}},accessibility:{tabIndex:0,role:t,className:i,ariaRoleDescription:js}},O(Ua.prototype,Ha),O(Ua.prototype,Na);let Wa=Ua,Xa=((ja=o)&&(Ya.__proto__=ja),((Ya.prototype=Object.create(ja&&ja.prototype)).constructor=Ya).prototype.points=function(){return this.toGeometryPoints(this.linePoints)},Ya.prototype.toGeometryPoints=function(t){for(var e=[],i=0,o=t.length;i<o;i++)t[i]&&!1!==t[i].visible&&e.push(t[i]._childBox.toRect().center());return e},Ya.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&&!k(this.visual.options.zIndex)&&(this.visual.options.zIndex=this.series.zIndex)):this.segmentVisual()},Ya.prototype.segmentVisual=function(){var t=this.options,e=this.series,i=e.color,o=e._defaults,o=(Pt(i)&&o&&(i=o.color),M.drawing.Path.fromPoints(this.points(),{stroke:{color:i,width:e.width,opacity:e.opacity,dashType:e.dashType},zIndex:e.zIndex}));t.closed&&o.close(),this.visual=o},Ya.prototype.aliasFor=function(t,e){return this.parent.getNearestPoint(e.x,e.y,this.seriesIx)},Ya);function Ya(t,e,i){ja.call(this),this.linePoints=t,this.series=e,this.seriesIx=i}e(Xa,{closed:!1});let qa=Xa,Za={calculateStepPoints:function(t){for(var e=this.parent.plotArea.seriesCategoryAxis(this.series).options,i=e.justified,o=e.vertical,e=e.reverse,r=o?y:v,n=o?v:y,s=e?2:1,a=s,l=Qa(t[0],r,s,n,a),h=[l],p=1;p<t.length;p++){var c,u=Qa(t[p],r,s,n,a);l[r]!==u[r]&&((c=new M.geometry.Point)[r]=l[r],c[n]=u[n],h.push(c,u)),l=u}return i?l!==he(h)&&h.push(l):h.push(Qa(he(t),r,s,n,e?1:2)),h}};function Qa(t,e,i,o,r){var t=t.box,n=new M.geometry.Point;return n[e]=t[e+i],n[o]=t[o+r],n}var Ka,$a,l=Za,Ja=((Ka=qa)&&(tl.__proto__=Ka),((tl.prototype=Object.create(Ka&&Ka.prototype)).constructor=tl).prototype.points=function(){return this.calculateStepPoints(this.linePoints)},tl);function tl(){Ka.apply(this,arguments)}O(Ja.prototype,l);let el=Ja,il=(($a=qa)&&(ol.__proto__=$a),((ol.prototype=Object.create($a&&$a.prototype)).constructor=ol).prototype.segmentVisual=function(){var t=this.series,e=t._defaults,i=t.color,e=(Pt(i)&&e&&(i=e.color),new kn(this.options.closed).process(this.points())),i=new M.drawing.Path({stroke:{color:i,width:t.width,opacity:t.opacity,dashType:t.dashType},zIndex:t.zIndex});i.segments.push.apply(i.segments,e),this.visual=i},ol);function ol(){$a.apply(this,arguments)}let rl=il,nl={renderSegments:function(){var t,e=this.options,i=this.seriesPoints,o=e.series,r=i.length;this._segments=[];for(var n=0;n<r;n++){for(var s=o[n],a=this.sortPoints(i[n]),l=a.length,h=[],p=0;p<l;p++){var c=a[p];c?h.push(c):this.seriesMissingValues(s)!==Jn&&(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?$n:t||Jn},getNearestPoint:function(t,e,i){for(var o,r=new A(t,e),n=this.seriesPoints[i],s=rt,a=0;a<n.length;a++){var l,h=n[a];h&&k(h.value)&&null!==h.value&&!1!==h.visible&&(l=h.box.center().distanceTo(r))<s&&(o=h,s=l)}return o}};var sl,al,ll,hl,pl,cl,ul,dl,fl,Ja=nl,gl=((sl=M.drawing.Animation)&&(yl.__proto__=sl),((yl.prototype=Object.create(sl&&sl.prototype)).constructor=yl).prototype.setup=function(){this._setEnd(this.options.box.x1)},yl.prototype.step=function(t){var e=this.options.box;this._setEnd(Xt(e.x1,e.x2,t))},yl.prototype._setEnd=function(t){var e=this.element,i=e.segments,o=i[1].anchor(),i=i[2].anchor();e.suspend(),o.setX(t),e.resume(),i.setX(t)},yl);function yl(){sl.apply(this,arguments)}e(gl,{duration:Yn}),M.drawing.AnimationFactory.current.register("clip",gl);let vl=gl,ml={createAnimation:function(){var t,e=this.getRoot();e&&!1!==(e.options||{}).transitions&&(e=e.size(),t=M.drawing.Path.fromRect(e.toRect()),this.visual.clip(t),this.animation=new vl(t,{box:e}),ga(this.options.series))&&this._setChildrenAnimation(t)},_setChildrenAnimation:function(t){for(var e=this.animationPoints(),i=0;i<e.length;i++){var o=e[i];o&&o.visual&&k(o.visual.options.zIndex)&&o.visual.clip(t)}}},xl=((al=Da)&&(_l.__proto__=al),((_l.prototype=Object.create(al&&al.prototype)).constructor=_l).prototype.render=function(){al.prototype.render.call(this),this.updateStackRange(),this.renderSegments()},_l.prototype.pointType=function(){return Wa},_l.prototype.createPoint=function(t,e){var i=e.series,o=e.seriesIx,r=this.seriesMissingValues(i),n=t.valueFields.value;if(!k(n)||null===n){if(r!==$n)return null;n=0}r=this.pointOptions(i,o),r=this.evalPointOptions(r,n,e),o=t.fields.color||i.color,Pt(i.color)&&(o=r.color),e=new Wa(n,r);return e.color=o,this.append(e),e},_l.prototype.plotRange=function(t){var e=this.plotValue(t);if(this.options.isStacked)for(var i=t.categoryIx,o=this.categoryPoints[i],r=0;r<o.length;r++){var n=o[r];if(t===n)break;e+=this.plotValue(n),this.options.isStacked100&&(e=Math.min(e,1))}return[e,e]},_l.prototype.createSegment=function(t,e,i){var o=e.style;return new(o===os?el:o===is?rl:qa)(t,e,i)},_l.prototype.animationPoints=function(){for(var t=this.points,e=[],i=0;i<t.length;i++)e.push((t[i]||{}).marker);return e.concat(this._segments)},_l.prototype.supportsPointInactiveOpacity=function(){return!1},_l);function _l(){al.apply(this,arguments)}O(xl.prototype,Ja,ml);let bl=xl,wl=((ll=qa)&&(kl.__proto__=ll),((kl.prototype=Object.create(ll&&ll.prototype)).constructor=kl).prototype.createVisual=function(){var t=this.series,e=t._defaults,i=t.line||{},o=t.color;Pt(o)&&e&&(o=e.color),this.visual=new M.drawing.Group({zIndex:t.zIndex}),this.createFill({fill:Qi(t.pattern,{color:o,opacity:t.opacity}),stroke:null}),0<i.width&&!1!==i.visible&&this.createStroke({stroke:O({color:o,opacity:t.opacity,lineCap:"butt"},i)})},kl.prototype.strokeSegments=function(){return this._strokeSegments||(this._strokeSegments=this.createStrokeSegments())},kl.prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.points())},kl.prototype.stackSegments=function(){return(this.prevSegment||this).createStackSegments(this.stackPoints)},kl.prototype.createStackSegments=function(t){return this.segmentsFromPoints(this.toGeometryPoints(t)).reverse()},kl.prototype.segmentsFromPoints=function(t){return t.map(function(t){return new M.geometry.Segment(t)})},kl.prototype.createStroke=function(t){t=new M.drawing.Path(t);t.segments.push.apply(t.segments,this.strokeSegments()),this.visual.append(t)},kl.prototype.hasStackSegment=function(){return this.prevSegment||this.stackPoints&&this.stackPoints.length},kl.prototype.createFill=function(t){var e=this.strokeSegments(),i=e.slice(0),o=this.hasStackSegment(),r=(o&&(r=this.stackSegments(),ee(i,r)),new M.drawing.Path(t));r.segments.push.apply(r.segments,i),!o&&1<e.length&&this.fillToAxes(r),this.visual.append(r)},kl.prototype.fillToAxes=function(t){var e=this.parent,i=e.options.invertAxes,o=e.seriesValueAxis(this.series),e=e.categoryAxisCrossingValue(o),o=o.getSlot(e,e,!0),e=this.strokeSegments(),r=e[0].anchor(),e=he(e).anchor(),o=i?o.x1:o.y1;i?t.lineTo(o,e.y).lineTo(o,r.y):t.lineTo(e.x,o).lineTo(r.x,o)},kl);function kl(t,e,i,o,r){ll.call(this,t,e,i),this.prevSegment=o,this.stackPoints=r}let Al=wl,Sl=((hl=Al)&&(Cl.__proto__=hl),((Cl.prototype=Object.create(hl&&hl.prototype)).constructor=Cl).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.calculateStepPoints(this.linePoints))},Cl.prototype.createStackSegments=function(t){return this.segmentsFromPoints(this.calculateStepPoints(t)).reverse()},Cl);function Cl(){hl.apply(this,arguments)}O(Sl.prototype,l);let Pl=Sl,Tl=((pl=Al)&&(Ml.__proto__=pl),((Ml.prototype=Object.create(pl&&pl.prototype)).constructor=Ml).prototype.createStrokeSegments=function(){var t=new kn(this.options.closed),e=this.points();return t.process(e)},Ml.prototype.createStackSegments=function(){for(var t=this.strokeSegments(),e=[],i=t.length-1;0<=i;i--){var o=t[i];e.push(new M.geometry.Segment(o.anchor(),o.controlOut(),o.controlIn()))}return e},Ml);function Ml(){pl.apply(this,arguments)}let Ol=Tl,Ll=((cl=bl)&&(Il.__proto__=cl),((Il.prototype=Object.create(cl&&cl.prototype)).constructor=Il).prototype.createSegment=function(t,e,i,o){var r,n,s=this.options.isStacked,a=(e.line||{}).style;return s&&0<i&&o&&("gap"!==this.seriesMissingValues(e)?(n=o.linePoints,r=o):n=this._gapStackPoints(t,i,a)),new(a===os?Pl:a===is?Ol:Al)(t,e,i,r,n)},Il.prototype.reflow=function(t){cl.prototype.reflow.call(this,t);var e=this._stackPoints;if(e)for(var i=0;i<e.length;i++){var o=e[i],r=this.categoryAxis.getSlot(o.categoryIx);o.reflow(r)}},Il.prototype._gapStackPoints=function(t,e,i){var o=this.seriesPoints,r=t[0].categoryIx,t=t.length,n=(r<0&&(r=0,t--),r+t),s=this.seriesOptions[0]._outOfRangeMinPoint?1:0,a=[];this._stackPoints=this._stackPoints||[];for(var l=r;l<n;l++){for(var h,p=l+s,c=e,u=void 0;u=o[--c][p],0<c&&!u;);u?(i!==os&&r<l&&!o[c][p-1]&&a.push(this._previousSegmentPoint(l,p,p-1,c)),a.push(u),i!==os&&l+1<n&&!o[c][p+1]&&a.push(this._previousSegmentPoint(l,p,p+1,c))):(h=this._createGapStackPoint(l),this._stackPoints.push(h),a.push(h))}return a},Il.prototype._previousSegmentPoint=function(t,e,i,o){for(var r,n=this.seriesPoints,s=o;0<s&&!r;)r=n[--s][i];return r?r=n[s][e]:(r=this._createGapStackPoint(t),this._stackPoints.push(r)),r},Il.prototype._createGapStackPoint=function(t){var e=this.pointOptions({},0),e=new Wa(0,e);return e.categoryIx=t,e.series={},e},Il.prototype.seriesMissingValues=function(t){return t.missingValues||$n},Il.prototype.supportsPointInactiveOpacity=function(){return!1},Il);function Il(){cl.apply(this,arguments)}let Bl=Ll,El=((ul=M.Class)&&(Rl.__proto__=ul),((Rl.prototype=Object.create(ul&&ul.prototype)).constructor=Rl).prototype.update=function(t){var e,i=this.axisRanges;for(e in t){var o=t[e],r=i[e];i[e]=r=r||{min:rt,max:nt},r.min=Math.min(r.min,o.min),r.max=Math.max(r.max,o.max)}},Rl.prototype.reset=function(t){this.axisRanges[t]=void 0},Rl.prototype.query=function(t){return this.axisRanges[t]},Rl);function Rl(){ul.call(this),this.axisRanges={}}let Vl=El,jl=((dl=o)&&(zl.__proto__=dl),((zl.prototype=Object.create(dl&&dl.prototype)).constructor=zl).prototype.createVisual=function(){this.textBox.options.noclip=this.options.noclip},zl.prototype.reflow=function(t){var e,i=this.options,o=i.vertical,r=i.aboveAxis,n=this.children[0],s=n.options,a=n.box,l=n.options.padding,h=t;s.align=o?b:C,s.vAlign=o?T:b,i.position===aa?o?(s.vAlign=T,!r&&a.height()<t.height()&&(s.vAlign=S)):s.align=r?P:C:i.position===b?(s.vAlign=b,s.align=b):"insideBase"===i.position?o?s.vAlign=r?S:T:s.align=r?C:P:i.position===la&&(h=o?r?(e=(a.width()-t.width()-l.left-l.right)/2,new I(t.x1-e,t.y1-a.height(),t.x2+e,t.y1)):new I(t.x1,t.y2,t.x2,t.y2+a.height()):(s.align=b,r?new I(t.x2,t.y1,t.x2+a.width(),t.y2):new I(t.x1-a.width(),t.y1,t.x1,t.y2))),i.rotation||(o?l.left=l.right=(h.width()-n.contentBox.width())/2:l.top=l.bottom=(h.height()-n.contentBox.height())/2),n.reflow(h)},zl.prototype.alignToClipBox=function(t){var e=this.options.vertical?v:y,i=e+"1",e=e+"2",o=this.children[0],r=this.parent.box;(r[i]<t[i]||t[e]<r[e])&&((o=o.paddingBox.clone())[i]=Math.max(r[i],t[i]),o[e]=Math.min(r[e],t[e]),this.reflow(o))},zl);function zl(t,e,i){dl.call(this,e),this.textBox=new So(t,this.options,i),this.append(this.textBox)}e(jl,{position:la,margin:w(3),padding:w(4),color:Y,background:"",border:{width:1,color:""},aboveAxis:!0,vertical:!1,animation:{type:qn,delay:Yn},zIndex:2});let Dl=jl,Fl={addAccessibilityAttributesToVisual:function(){this._id=this._id||Ue();var t=O({ariaLabel:this.getAriaLabelText()},this.options.accessibility);to(this.visual,t)},getAriaLabelText:function(){var t=this.options.labels,e=zt(t);return e?e(this.pointData()):this.getLabelText(t)},focusVisual:function(){this.visual.options.set("id",this._id),this.toggleFocusHighlight(!0)},clearFocusFromVisual:function(){this.visual.options.set("id",""),this.toggleFocusHighlight(!1)}},Hl=((fl=o)&&(Nl.__proto__=fl),((Nl.prototype=Object.create(fl&&fl.prototype)).constructor=Nl).prototype.render=function(){this._rendered||(this._rendered=!0,this.createLabel(),this.createNote(),this.errorBar&&this.append(this.errorBar))},Nl.prototype.createLabel=function(){var t=this.options.labels;t.visible&&(this.label=this.createLabelElement(t),this.append(this.label))},Nl.prototype.createLabelElement=function(t){return new Dl(this.getLabelText(t),O({vertical:this.options.vertical},t),this.pointData())},Nl.prototype.getLabelText=function(t){var e=jt(t);return e?e(this.pointData()):this.formatValue(t.format)},Nl.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Nl.prototype.reflow=function(t){this.render();var e=this.label;if(this.box=t,e&&(e.options.aboveAxis=this.aboveAxis,e.reflow(t)),this.note&&this.note.reflow(t),this.errorBars)for(var i=0;i<this.errorBars.length;i++)this.errorBars[i].reflow(t)},Nl.prototype.createVisual=function(){var e=this,t=this.box,i=this.options,o=i.visual;!1!==this.visible&&(fl.prototype.createVisual.call(this),this.addAccessibilityAttributesToVisual(),o?(o=this.rectVisual=o({category:this.category,dataItem:this.dataItem,value:this.value,sender:this.getSender(),series:this.series,percentage:this.percentage,stackValue:this.stackValue,runningTotal:this.runningTotal,total:this.total,rect:t.toRect(),createVisual:function(){var t=new M.drawing.Group;return e.createRect(t),t},options:i}))&&this.visual.append(o):0<t.width()&&0<t.height()&&this.createRect(this.visual))},Nl.prototype.createRect=function(t){var e=this.options,i=e.border,o=(k(i.opacity)?i:e).opacity,r=this.box.toRect(),r=(r.size.width=Math.round(r.size.width),this.rectVisual=M.drawing.Path.fromRect(r,{fill:Qi(e.pattern,{color:this.color,opacity:e.opacity}),stroke:{color:this.getBorderColor(),width:i.width,opacity:o,dashType:i.dashType}})),o=this.box.width(),i=this.box.height();6<(e.vertical?o:i)&&(_t(r),o<1||i<1)&&(r.options.stroke.lineJoin="round"),t.append(r),Pa(e)&&(o=this.createGradientOverlay(r,{baseColor:this.color},O({end:e.vertical?void 0:[0,1]},e.overlay)),t.append(o))},Nl.prototype.createHighlight=function(t){return _t(M.drawing.Path.fromRect(this.box.toRect(),t))},Nl.prototype.highlightVisual=function(){return this.rectVisual},Nl.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this.rectVisual}},Nl.prototype.createFocusHighlight=function(t){var e=this.options.focusHighlight.border.width;return _t(M.drawing.Path.fromRect(this.box.pad(e/2).toRect(),t))},Nl.prototype.getBorderColor=function(){var t=this.color,e=this.options.border,i=e._brightness||.8,e=e.color;return e=k(e)?e:new M.Color(t).brightness(i).toHex()},Nl.prototype.tooltipAnchor=function(){var t,e,i,o,r=this.options,n=this.box,s=this.aboveAxis,a=this.owner.pane.clipBox()||n,l=C,h=T;return r.vertical?(t=Math.min(n.x2,a.x2)+5,s?o=Math.max(n.y1,a.y1):(o=Math.min(n.y2,a.y2),h=S)):(e=Math.max(n.x1,a.x1),i=Math.min(n.x2,a.x2),o=r.isStacked?(h=S,t=s?(l=P,i):e,Math.max(n.y1,a.y1)-5):(s?t=i+5:(t=e-5,l=P),Math.max(n.y1,a.y1))),{point:new A(t,o),align:{horizontal:l,vertical:h}}},Nl.prototype.overlapsBox=function(t){return this.box.overlaps(t)},Nl.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}},Nl.prototype.getIndex=function(){return this.categoryIx},Nl);function Nl(t,e){fl.call(this),this.options=e,this.color=e.color||a,this.aboveAxis=_(this.options.aboveAxis,!0),this.value=t}O(Hl.prototype,Ha),O(Hl.prototype,Na),O(Hl.prototype,Fl),Hl.prototype.defaults={border:{width:1},vertical:!0,overlay:{gradient:"glass"},labels:{visible:!1,format:"{0}"},opacity:1,notes:{label:{}},accessibility:{role:t,className:i,ariaRoleDescription:js}};let Ul=Hl;function Gl(t,e){t.forEach(e)}function Wl(t,e){for(var i=t.length,o=i-1;0<=o;o--)e(t[o],o-i-1)}(Xl=o)&&(lh.__proto__=Xl),((lh.prototype=Object.create(Xl&&Xl.prototype)).constructor=lh).prototype.reflow=function(o){var t=this.options,e=t.vertical,i=t.gap,r=t.spacing,t=this.children,n=t.length,s=e?v:y,a=n+i+r*(n-1),l=(e?o.height():o.width())/a,h=o[s+1]+i/2*l;this.forEach(t,function(t,e){var i=(t.box||o).clone();i[s+1]=h,i[s+2]=h+l,t.reflow(i),e<n-1&&(h+=l*r),h+=l})};var Xl,Yl,ql,Zl,Ql,Kl,$l,Jl,th,eh,ih,oh,rh,nh,sh,ah,gl=lh;function lh(t){Xl.call(this,t),this.forEach=t.rtl?Wl:Gl}e(gl,{vertical:!1,gap:0,spacing:0});let hh=gl,ph=((Yl=o)&&(ch.__proto__=Yl),((ch.prototype=Object.create(Yl&&Yl.prototype)).constructor=ch).prototype.reflow=function(t){for(var e=this.options.vertical?y:v,i=this.children,o=i.length,r=this.box=new I,n=0;n<o;n++){var s,a=i[n];!1!==a.visible&&((s=a.box.clone()).snapTo(t,e),0===n&&(r=this.box=s.clone()),a.reflow(s),r.wrap(s))}},ch);function ch(){Yl.apply(this,arguments)}e(ph,{vertical:!0});let uh=ph,dh=((ql=Da)&&(fh.__proto__=ql),((fh.prototype=Object.create(ql&&ql.prototype)).constructor=fh).prototype.render=function(){ql.prototype.render.call(this),this.updateStackRange()},fh.prototype.pointType=function(){return Ul},fh.prototype.clusterType=function(){return hh},fh.prototype.stackType=function(){return uh},fh.prototype.stackLimits=function(t,e){return ql.prototype.stackLimits.call(this,t,e)},fh.prototype.createPoint=function(t,e){var i=e.categoryIx,o=e.series,r=e.seriesIx,n=this.options,s=this.children,a=k(o.stack)?o.stack:n.defaultStack,l=this.pointValue(t),r=this.pointOptions(o,r),h=r.labels,h=(a&&h.position===la&&(h.position=aa),r.isStacked=a,t.fields.color||o.color),t=(l<0&&r.negativeColor&&(h=r.negativeColor),r=this.evalPointOptions(r,l,e),Pt(o.color)&&(h=r.color),new(this.pointType())(l,r)),e=(t.color=h,s[i]);return e||(e=new(this.clusterType())({vertical:n.invertAxes,gap:n.gap,spacing:n.spacing,rtl:!n.invertAxes&&(this.chartService||{}).rtl}),this.append(e)),(n.isStacked?this.getStackWrap(a,e):e).append(t),t},fh.prototype.getStackWrap=function(t,e){var i,o=typeof t==at?t.group||!0:t,r=e.children;if(typeof o===ct||!0===o)for(var n=0;n<r.length;n++)if(r[n]._stackGroup===o){i=r[n];break}return i||((i=new(this.stackType())({vertical:!this.options.invertAxes}))._stackGroup=o,e.append(i)),i},fh.prototype.categorySlot=function(t,e,i){var o=this.options,t=t.getSlot(e),e=i.startValue();return o.isStacked&&(i=i.getSlot(e,e,!0),t[(e=o.invertAxes?y:v)+1]=t[e+2]=i[e+1]),t},fh.prototype.reflowCategories=function(t){for(var e=this.children,i=e.length,o=0;o<i;o++)e[o].reflow(t[o])},fh.prototype.createAnimation=function(){this._setAnimationOptions(),ql.prototype.createAnimation.call(this),ga(this.options.series)&&this._setChildrenAnimation()},fh.prototype._setChildrenAnimation=function(){for(var t=this.points,e=0;e<t.length;e++){var i=t[e],o=i.visual;o&&k(o.options.zIndex)&&(i.options.animation=this.options.animation,i.createAnimation())}},fh.prototype._setAnimationOptions=function(){var t,e=this.options,i=e.animation||{};t=e.isStacked?(t=this.seriesValueAxis(e.series[0])).getSlot(t.startValue()):this.categoryAxis.getSlot(0),i.origin=new M.geometry.Point(t.x1,t.y1),i.vertical=!e.invertAxes},fh);function fh(){ql.apply(this,arguments)}e(dh,{animation:{type:ns}});let gh=dh,yh=((Zl=o)&&(vh.__proto__=Zl),((vh.prototype=Object.create(Zl&&Zl.prototype)).constructor=vh).prototype.getLabelText=function(t){return this.formatValue(t.format)},vh.prototype.reflow=function(t){var e=this.options,i=this.value,e=this.owner.seriesValueAxis(e),o=e.getSlot(i.open,i.close),e=e.getSlot(i.low,i.high),i=(o.x1=e.x1=t.x1,o.x2=e.x2=t.x2,this.realBody=o,e.center().x),t=[];t.push([[i,e.y1],[i,o.y1]]),t.push([[i,o.y2],[i,e.y2]]),this.lines=t,this.box=e.clone().wrap(o),this._rendered||(this._rendered=!0,this.createNote()),this.reflowNote()},vh.prototype.reflowNote=function(){this.note&&this.note.reflow(this.box)},vh.prototype.createVisual=function(){Zl.prototype.createVisual.call(this),this.addAccessibilityAttributesToVisual(),this._mainVisual=this.mainVisual(this.options),this.visual.append(this._mainVisual),this.createOverlay()},vh.prototype.mainVisual=function(t){var e=new M.drawing.Group;return this.createBody(e,t),this.createLines(e,t),e},vh.prototype.createBody=function(t,e){var i=M.drawing.Path.fromRect(this.realBody.toRect(),{fill:Qi(e.pattern,{color:this.color,opacity:e.opacity}),stroke:null});0<e.border.width&&i.options.set("stroke",{color:this.getBorderColor(),width:e.border.width,dashType:e.border.dashType,opacity:_(e.border.opacity,e.opacity)}),_t(i),t.append(i),Pa(e)&&t.append(this.createGradientOverlay(i,{baseColor:this.color},O({end:e.vertical?void 0:[0,1]},e.overlay)))},vh.prototype.createLines=function(t,e){this.drawLines(t,e,this.lines,e.line)},vh.prototype.drawLines=function(t,e,i,o){if(i)for(var r={stroke:{color:o.color||this.color,opacity:_(o.opacity,e.opacity),width:o.width,dashType:o.dashType,lineCap:"butt"}},n=0;n<i.length;n++){var s=M.drawing.Path.fromPoints(i[n],r);_t(s),t.append(s)}},vh.prototype.getBorderColor=function(){var t=this.options.border,e=t.color;return e=k(e)?e:new M.Color(this.color).brightness(t._brightness).toHex()},vh.prototype.createOverlay=function(){var t=M.drawing.Path.fromRect(this.box.toRect(),{fill:{color:a,opacity:0},stroke:null});this.visual.append(t)},vh.prototype.createHighlight=function(){var t=this.options.highlight,e=this.color,t=(this.color=t.color||this.color,this.mainVisual(O({},this.options,{line:{color:this.getBorderColor()}},t)));return this.color=e,t},vh.prototype.highlightVisual=function(){return this._mainVisual},vh.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this._mainVisual}},vh.prototype.tooltipAnchor=function(){var t=this.box,e=this.owner.pane.clipBox()||t;return{point:new A(t.x2+5,Math.max(t.y1,e.y1)+5),align:{horizontal:C,vertical:T}}},vh.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},vh.prototype.overlapsBox=function(t){return this.box.overlaps(t)},vh.prototype.pointData=function(){return{dataItem:this.dataItem,value:this.value,meanPoints:this.meanPoints,medianPoints:this.medianPoints,whiskerPoints:this.whiskerPoints,stackValue:this.stackValue,series:this.series}},vh.prototype.getIndex=function(){return this.categoryIx},vh);function vh(t,e){Zl.call(this,e),this.value=t}yh.prototype.createFocusHighlight=Ul.prototype.createFocusHighlight,e(yh,{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>"},labels:{format:""},highlight:{opacity:1,border:{width:1,opacity:1},line:{width:1,opacity:1}},notes:{visible:!0,label:{}},accessibility:{role:t,className:i,ariaRoleDescription:js}}),O(yh.prototype,Ha),O(yh.prototype,Na),O(yh.prototype,Fl);let mh=yh,xh=((Ql=Da)&&(_h.__proto__=Ql),((_h.prototype=Object.create(Ql&&Ql.prototype)).constructor=_h).prototype.reflowCategories=function(t){for(var e=this.children,i=e.length,o=0;o<i;o++)e[o].reflow(t[o])},_h.prototype.addValue=function(t,e){var i,o=e.categoryIx,r=e.category,n=e.series,s=e.seriesIx,a=this.children,l=this.options,h=t.valueFields,p=va(this.splitValue(h)),c=n.data[o],u=this.categoryPoints[o],p=(u||(this.categoryPoints[o]=u=[]),p&&(i=this.createPoint(t,e)),a[o]);p||(p=new hh({vertical:l.invertAxes,gap:l.gap,spacing:l.spacing,rtl:!l.invertAxes&&(this.chartService||{}).rtl}),this.append(p)),i&&(this.updateRange(h,e),p.append(i),i.categoryIx=o,i.category=r,i.series=n,i.seriesIx=s,i.owner=this,i.dataItem=c,i.noteText=t.fields.noteText),this.points.push(i),u.push(i)},_h.prototype.pointType=function(){return mh},_h.prototype.createPoint=function(t,e){var i=e.series,o=this.pointType(),r=t.valueFields,n=O({},i),s=t.fields.color||i.color,n=this.evalPointOptions(n,r,e),e=(i.type!==hs&&i.type!==vs||r.open>r.close&&(s=t.fields.downColor||i.downColor||i.color),Pt(i.color)&&(s=n.color),n.vertical=!this.options.invertAxes,new o(r,n));return e.color=s,e},_h.prototype.splitValue=function(t){return[t.low,t.open,t.close,t.high]},_h.prototype.updateRange=function(t,e){var e=e.series.axis,t=this.splitValue(t),i=this.valueAxisRanges[e]||{min:rt,max:nt};this.valueAxisRanges[e]={min:Math.min.apply(Math,t.concat([i.min])),max:Math.max.apply(Math,t.concat([i.max]))}},_h.prototype.formatPointValue=function(t,e){var i=t.value;return this.chartService.format.auto(e,i.open,i.high,i.low,i.close,t.category)},_h.prototype.animationPoints=function(){return this.points},_h);function _h(){Ql.apply(this,arguments)}O(xh.prototype,ml);let bh=xh,wh=((Kl=mh)&&(kh.__proto__=Kl),((kh.prototype=Object.create(Kl&&Kl.prototype)).constructor=kh).prototype.reflow=function(t){var e,i,o=this.options,r=this.value,o=this.owner.seriesValueAxis(o),n=(this.boxSlot=i=o.getSlot(r.q1,r.q3),this.realBody=i,this.reflowBoxSlot(t),this.whiskerSlot=e=o.getSlot(r.lower,r.upper),this.reflowWhiskerSlot(t),o.getSlot(r.median));r.mean&&(o=o.getSlot(r.mean),this.meanPoints=this.calcMeanPoints(t,o)),this.whiskerPoints=this.calcWhiskerPoints(i,e),this.medianPoints=this.calcMedianPoints(t,n),this.box=e.clone().wrap(i),this.reflowNote()},kh.prototype.reflowBoxSlot=function(t){this.boxSlot.x1=t.x1,this.boxSlot.x2=t.x2},kh.prototype.reflowWhiskerSlot=function(t){this.whiskerSlot.x1=t.x1,this.whiskerSlot.x2=t.x2},kh.prototype.calcMeanPoints=function(t,e){return[[[t.x1,e.y1],[t.x2,e.y1]]]},kh.prototype.calcWhiskerPoints=function(t,e){var i=e.center().x;return[[[i-5,e.y1],[i+5,e.y1],[i,e.y1],[i,t.y1]],[[i-5,e.y2],[i+5,e.y2],[i,e.y2],[i,t.y2]]]},kh.prototype.calcMedianPoints=function(t,e){return[[[t.x1,e.y1],[t.x2,e.y1]]]},kh.prototype.renderOutliers=function(t){for(var e,i=this.value,o=i.outliers||[],r=3*Math.abs(i.q3-i.q1),n=[],s=(t.markers,0);s<o.length;s++){var a=o[s],l=O({},(e=a<i.q3+r&&a>i.q1-r?t.outliers:t.extremes).border),l=(k(l.color)||(k(this.color)?l.color=this.color:l.color=new M.Color(e.background).brightness(.8).toHex()),new oo({type:e.type,width:e.size,height:e.size,rotation:e.rotation,background:e.background,border:l,opacity:e.opacity}));l.value=a,n.push(l)}return this.reflowOutliers(n),n},kh.prototype.reflowOutliers=function(t){for(var e=this.owner.seriesValueAxis(this.options),i=this.box.center(),o=0;o<t.length;o++){var r=t[o].value,r=e.getSlot(r);this.options.vertical?r.move(i.x):r.move(void 0,i.y),this.box=this.box.wrap(r),t[o].reflow(r)}},kh.prototype.mainVisual=function(t){for(var e=Kl.prototype.mainVisual.call(this,t),i=this.renderOutliers(t),o=0;o<i.length;o++){var r=i[o].getElement();r&&e.append(r)}return e},kh.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)},kh.prototype.getBorderColor=function(){return(this.options.border||{}).color?this.options.border.color:this.color||Kl.prototype.getBorderColor.call(this)},kh);function kh(t,e){Kl.call(this,t,e),this.createNote()}e(wh,{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:Q,background:a,border:{width:2,opacity:1},opacity:0},extremes:{visible:!0,size:8,type:q,background:a,border:{width:2,opacity:1},opacity:0}}),O(wh.prototype,Ha);let Ah=wh,Sh=(($l=Ah)&&(Ch.__proto__=$l),((Ch.prototype=Object.create($l&&$l.prototype)).constructor=Ch).prototype.reflowBoxSlot=function(t){this.boxSlot.y1=t.y1,this.boxSlot.y2=t.y2},Ch.prototype.reflowWhiskerSlot=function(t){this.whiskerSlot.y1=t.y1,this.whiskerSlot.y2=t.y2},Ch.prototype.calcMeanPoints=function(t,e){return[[[e.x1,t.y1],[e.x1,t.y2]]]},Ch.prototype.calcWhiskerPoints=function(t,e){var i=e.center().y;return[[[e.x1,i-5],[e.x1,i+5],[e.x1,i],[t.x1,i]],[[e.x2,i-5],[e.x2,i+5],[e.x2,i],[t.x2,i]]]},Ch.prototype.calcMedianPoints=function(t,e){return[[[e.x1,t.y1],[e.x1,t.y2]]]},Ch);function Ch(){$l.apply(this,arguments)}let Ph=Sh,Th=((Jl=bh)&&(Mh.__proto__=Jl),((Mh.prototype=Object.create(Jl&&Jl.prototype)).constructor=Mh).prototype.addValue=function(t,e){var i,o=e.categoryIx,r=e.category,n=e.series,s=e.seriesIx,a=this.children,l=this.options,h=t.valueFields,p=va(this.splitValue(h)),c=n.data[o],u=this.categoryPoints[o],p=(u||(this.categoryPoints[o]=u=[]),p&&(i=this.createPoint(t,e)),a[o]);p||(p=new hh({vertical:l.invertAxes,gap:l.gap,spacing:l.spacing,rtl:!l.invertAxes&&(this.chartService||{}).rtl}),this.append(p)),i&&(this.updateRange(h,e),p.append(i),i.categoryIx=o,i.category=r,i.series=n,i.seriesIx=s,i.owner=this,i.dataItem=c),this.points.push(i),u.push(i)},Mh.prototype.pointType=function(){return this.options.invertAxes?Ph:Ah},Mh.prototype.splitValue=function(t){return[t.lower,t.q1,t.median,t.q3,t.upper]},Mh.prototype.updateRange=function(t,e){var e=e.series.axis,i=this.splitValue(t).concat(this.filterOutliers(t.outliers)),t=(k(t.mean)&&(i=i.concat(t.mean)),this.valueAxisRanges[e]||{min:rt,max:nt});this.valueAxisRanges[e]={min:Math.min.apply(Math,i.concat([t.min])),max:Math.max.apply(Math,i.concat([t.max]))}},Mh.prototype.formatPointValue=function(t,e){var i=t.value;return this.chartService.format.auto(e,i.lower,i.q1,i.median,i.q3,i.upper,i.mean,t.category)},Mh.prototype.filterOutliers=function(t){for(var e=(t||[]).length,i=[],o=0;o<e;o++){var r=t[o];k(r)&&null!==r&&i.push(r)}return i},Mh.prototype.supportsPointInactiveOpacity=function(){return!1},Mh);function Mh(){Jl.apply(this,arguments)}let Oh=Th,Lh=((th=ca)&&(Ih.__proto__=th),((Ih.prototype=Object.create(th&&th.prototype)).constructor=Ih).prototype.getAxis=function(){var t=this.chart.seriesAxes(this.series);return this.isVertical?t.y:t.x},Ih);function Ih(){th.apply(this,arguments)}let Bh=Lh,Eh=((eh=o)&&(Rh.__proto__=eh),((Rh.prototype=Object.create(eh&&eh.prototype)).constructor=Rh).prototype._initFields=function(){this.xAxisRanges={},this.yAxisRanges={},this.points=[],this.seriesPoints=[],this.seriesOptions=[],this._evalSeries=[]},Rh.prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},Rh.prototype.addErrorBar=function(t,e,i){var o,r=t.value[e],n=e+"Value",s=i.seriesIx,a=i.series,l=t.options.errorBars,h=i[e+"ErrorLow"],i=i[e+"ErrorHigh"];m(r)&&(m(h)&&m(i)&&(o={low:h,high:i}),l&&k(l[n])&&(this.seriesErrorRanges=this.seriesErrorRanges||{x:[],y:[]},this.seriesErrorRanges[e][s]=this.seriesErrorRanges[e][s]||new Gn(l[n],a,e),o=this.seriesErrorRanges[e][s].getErrorRange(r,l[n])),o)&&this.addPointErrorBar(o,t,e)},Rh.prototype.addPointErrorBar=function(t,e,i){var o=t.low,t=t.high,r=e.series,n=e.options.errorBars,s=i===v,a={},s=(e[i+"Low"]=o,e[i+"High"]=t,e.errorBars=e.errorBars||[],new Bh(o,t,s,this,r,n));e.errorBars.push(s),e.append(s),a[i]=o,this.updateRange(a,r),a[i]=t,this.updateRange(a,r)},Rh.prototype.addValue=function(t,e){var i,o=t.x,r=t.y,n=e.seriesIx,s=this.options.series[n],s=this.seriesMissingValues(s),n=this.seriesPoints[n];(t=Ta(o)&&Ta(r)?t:this.createMissingValue(t,s))&&((i=this.createPoint(t,e))&&(Object.assign(i,e),this.addErrorBar(i,y,e),this.addErrorBar(i,v,e)),this.updateRange(t,e.series)),this.points.push(i),n.push(i)},Rh.prototype.seriesMissingValues=function(t){return t.missingValues},Rh.prototype.createMissingValue=function(){},Rh.prototype.updateRange=function(t,e){var i=this.chartService.intl,o=e.xAxis,e=e.yAxis,r=t.x,t=t.y,n=this.xAxisRanges[o],s=this.yAxisRanges[e];Ta(r)&&(n=this.xAxisRanges[o]=n||{min:rt,max:nt},wt(r)&&(r=Sr(i,r)),n.min=Math.min(n.min,r),n.max=Math.max(n.max,r)),Ta(t)&&(s=this.yAxisRanges[e]=s||{min:rt,max:nt},wt(t)&&(t=Sr(i,t)),s.min=Math.min(s.min,t),s.max=Math.max(s.max,t))},Rh.prototype.evalPointOptions=function(t,e,i){var o=i.series,r=i.seriesIx,n={defaults:o._defaults,excluded:["data","tooltip","content","template","visual","toggle","_outOfRangeMinPoint","_outOfRangeMaxPoint","drilldownSeriesFactory","ariaTemplate","ariaContent"]},s=this._evalSeries[r],r=(k(s)||(this._evalSeries[r]=s=ka(t,{},n,!0)),t);return s&&ka(r=O({},t),{value:e,series:o,dataItem:i.dataItem},n),r},Rh.prototype.pointType=function(){return Wa},Rh.prototype.pointOptions=function(t,e){var i,o=this.seriesOptions[e];return o||(i=this.pointType().prototype.defaults,this.seriesOptions[e]=o=O({},i,{markers:{opacity:t.opacity},tooltip:{format:this.options.tooltip.format},labels:{format:this.options.labels.format}},t)),o},Rh.prototype.createPoint=function(t,e){var i=e.series,o=this.pointOptions(i,e.seriesIx),r=e.color||i.color,o=this.evalPointOptions(o,t,e),e=(Pt(i.color)&&(r=o.color),new Wa(t,o));return e.color=r,this.append(e),e},Rh.prototype.seriesAxes=function(t){var e=t.xAxis,t=t.yAxis,i=this.plotArea,o=e?i.namedXAxes[e]:i.axisX,i=t?i.namedYAxes[t]:i.axisY;if(!o)throw new Error("Unable to locate X axis with name "+e);if(i)return{x:o,y:i};throw new Error("Unable to locate Y axis with name "+t)},Rh.prototype.reflow=function(t){var r=this,n=this.points,s=!this.options.clip,a=0;this.traverseDataPoints(function(t,e){var i=n[a++],e=r.seriesAxes(e.series),o=e.x.getSlot(t.x,t.x,s),e=e.y.getSlot(t.y,t.y,s);i&&(o&&e?(t=r.pointSlot(o,e),i.reflow(t)):i.visible=!1)}),this.box=t},Rh.prototype.pointSlot=function(t,e){return new I(t.x1,e.y1,t.x2,e.y2)},Rh.prototype.traverseDataPoints=function(t){for(var e=this.options.series,i=this.seriesPoints,o=0;o<e.length;o++){var r=e[o];i[o]||(i[o]=[]);for(var n=0;n<r.data.length;n++){var s=this.plotArea.bindPoint(r,n);t(s.valueFields,O({pointIx:n,series:r,seriesIx:o,dataItem:r.data[n],owner:this},s.fields))}}},Rh.prototype.formatPointValue=function(t,e){t=t.value;return this.chartService.format.auto(e,t.x,t.y)},Rh.prototype.animationPoints=function(){for(var t=this.points,e=[],i=0;i<t.length;i++)e.push((t[i]||{}).marker);return e},Rh);function Rh(t,e){eh.call(this,e),this.plotArea=t,this.chartService=t.chartService,this._initFields(),this.render()}e(Eh,{series:[],tooltip:{format:"{0}, {1}"},labels:{format:"{0}, {1}"},clip:!0}),O(Eh.prototype,ml);let Vh=Eh,jh=((ih=Wa)&&(zh.__proto__=ih),((zh.prototype=Object.create(ih&&ih.prototype)).constructor=zh).prototype.createHighlight=function(){var t=this.options.highlight,e=t.border,i=this.options.markers,o=this.box.center(),r=(i.size+i.border.width+e.width)/2,n=new M.drawing.Group,s=new M.drawing.Circle(new M.geometry.Circle([o.x,o.y+r/5+e.width/2],r+e.width/2),{stroke:{color:"none"},fill:this.createGradient({gradient:"bubbleShadow",color:i.background,stops:[{offset:0,color:i.background,opacity:.3},{offset:1,color:i.background,opacity:0}]})}),o=new M.drawing.Circle(new M.geometry.Circle([o.x,o.y],r),{stroke:{color:e.color||new M.Color(i.background).brightness(.8).toHex(),width:e.width,opacity:e.opacity},fill:Qi(this.options.pattern,{color:i.background,opacity:t.opacity})});return n.append(s,o),n},zh.prototype.createFocusHighlight=function(t){var e=this.options.focusHighlight,i=this.options.markers,o=this.box.center(),i=(i.size+i.border.width)/2+e.border.width/2;return new M.drawing.Circle(new M.geometry.Circle([o.x,o.y],i),t)},zh);function zh(t,e){ih.call(this,t,e),this.category=t.category}jh.prototype.defaults=O({},jh.prototype.defaults,{labels:{position:b},highlight:{opacity:1,border:{color:"#fff",width:2,opacity:1}}}),jh.prototype.defaults.highlight.zIndex=void 0;let Dh=jh,Fh=((oh=Vh)&&(Hh.__proto__=oh),((Hh.prototype=Object.create(oh&&oh.prototype)).constructor=Hh).prototype._initFields=function(){this._maxSize=nt,oh.prototype._initFields.call(this)},Hh.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)),oh.prototype.addValue.call(this,t,e)):(this.points.push(null),this.seriesPoints[e.seriesIx].push(null))},Hh.prototype.reflow=function(t){this.updateBubblesSize(t),oh.prototype.reflow.call(this,t)},Hh.prototype.pointType=function(){return Dh},Hh.prototype.createPoint=function(t,e){var i=e.series,o=i.data.length,o=e.pointIx*(Yn/o),r={delay:o,duration:Yn-o,type:as},n=e.color||i.color,o=(t.size<0&&i.negativeValues.visible&&(n=_(i.negativeValues.color,n)),O({labels:{animation:{delay:o,duration:Yn-o}}},this.pointOptions(i,e.seriesIx),{markers:{type:q,border:i.border,opacity:i.opacity,animation:r}})),o=this.evalPointOptions(o,t,e),r=(Pt(i.color)&&(n=o.color),o.markers.background=n,new Dh(t,o));return r.color=n,this.append(r),r},Hh.prototype.updateBubblesSize=function(t){for(var e=this.options.series,i=Math.min(t.width(),t.height()),o=0;o<e.length;o++)for(var r=e[o],n=this.seriesPoints[o],s=(r.minSize||Math.max(.02*i,10))/2,a=(r.maxSize||.2*i)/2,l=Math.PI*s*s,h=(Math.PI*a*a-l)/this._maxSize,p=0;p<n.length;p++){var c,u,d=n[p];d&&(c=Math.abs(d.value.size)*h,c=Math.sqrt((l+c)/Math.PI),u=_(d.options.zIndex,0)+(1-c/a),O(d.options,{zIndex:u,markers:{size:2*c,zIndex:u},labels:{zIndex:u+1}}))}},Hh.prototype.formatPointValue=function(t,e){var i=t.value;return this.chartService.format.auto(e,i.x,i.y,i.size,t.category)},Hh.prototype.createAnimation=function(){},Hh.prototype.createVisual=function(){},Hh);function Hh(){oh.apply(this,arguments)}e(Fh,{tooltip:{format:"{3}"},labels:{format:"{3}"}});let Nh=Fh,Uh=((rh=oo)&&(Gh.__proto__=rh),(Gh.prototype=Object.create(rh&&rh.prototype)).constructor=Gh);function Gh(){rh.apply(this,arguments)}O(Uh.prototype,Ha);let Wh=Uh,Xh=((nh=o)&&(Yh.__proto__=nh),((Yh.prototype=Object.create(nh&&nh.prototype)).constructor=Yh).prototype.render=function(){var t=this.options;this._rendered||(this._rendered=!0,k(this.value.target)&&(this.target=new Wh({type:t.target.shape,background:t.target.color||this.color,opacity:t.opacity,zIndex:t.zIndex,border:t.target.border,vAlign:T,align:P}),this.target.value=this.value,this.target.dataItem=this.dataItem,this.target.series=this.series,this.append(this.target)),this.createLabel(),this.createNote())},Yh.prototype.createLabel=function(){var t=this.options.labels;t.visible&&(this.label=this.createLabelElement(t),this.append(this.label))},Yh.prototype.createLabelElement=function(t){return new Dl(this.getLabelText(t),t,this.pointData())},Yh.prototype.getLabelText=function(t){var e=jt(t);return e?e(this.pointData()):this.formatValue(t.format)},Yh.prototype.reflow=function(t){this.render();var e=this.options,i=this.target,o=this.owner,r=e.invertAxes,n=o.seriesValueAxis(this.options),o=o.categorySlot(o.categoryAxis,e.categoryIx,n),n=n.getSlot(this.value.target),s=r?n:o,o=r?o:n,s=(i&&(n=new I(s.x1,o.y1,s.x2,o.y2),i.options.height=r?n.height():e.target.line.width,i.options.width=r?e.target.line.width:n.width(),i.reflow(n)),this.label);s&&(s.options.aboveAxis=this.aboveAxis,s.reflow(t)),this.note&&this.note.reflow(t),this.box=t},Yh.prototype.createVisual=function(){nh.prototype.createVisual.call(this),this.addAccessibilityAttributesToVisual();var t=this.options,e=M.drawing.Path.fromRect(this.box.toRect(),{fill:Qi(t.pattern,{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.border.opacity,t.opacity)}),_t(this.bodyVisual=e),this.visual.append(e)},Yh.prototype.createAnimation=function(){this.bodyVisual&&(this.animation=M.drawing.Animation.create(this.bodyVisual,this.options.animation))},Yh.prototype.createHighlight=function(t){return M.drawing.Path.fromRect(this.box.toRect(),t)},Yh.prototype.highlightVisual=function(){return this.bodyVisual},Yh.prototype.highlightVisualArgs=function(){return{rect:this.box.toRect(),visual:this.bodyVisual,options:this.options}},Yh.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Yh.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,series:this.series}},Yh.prototype.overlapsBox=function(t){return this.box.overlaps(t)},Yh.prototype.getIndex=function(){return this.categoryIx},Yh);function Yh(t,e){nh.call(this,e),this.aboveAxis=this.options.aboveAxis,this.color=e.color||a,this.value=t}Xh.prototype.tooltipAnchor=Ul.prototype.tooltipAnchor,Xh.prototype.createFocusHighlight=Ul.prototype.createFocusHighlight,e(Xh,{border:{width:1},vertical:!1,opacity:1,target:{shape:"",border:{width:0,color:"green"},line:{width:2}},labels:{visible:!1},tooltip:{format:"Current: {0}<br />Target: {1}"},notes:{label:{}},accessibility:{role:t,className:i,ariaRoleDescription:js}}),O(Xh.prototype,Ha),O(Xh.prototype,Na),O(Xh.prototype,Fl);let qh=Xh,Zh=((sh=Da)&&(Qh.__proto__=sh),((Qh.prototype=Object.create(sh&&sh.prototype)).constructor=Qh).prototype.reflowCategories=function(t){for(var e=this.children,i=e.length,o=0;o<i;o++)e[o].reflow(t[o])},Qh.prototype.plotRange=function(t){var e=t.series,e=this.seriesValueAxis(e),e=this.categoryAxisCrossingValue(e);return[e,t.value.current||e]},Qh.prototype.createPoint=function(t,e){var i=e.categoryIx,o=e.series,r=this.options,n=this.children,s=t.valueFields,a=O({vertical:!r.invertAxes,overlay:o.overlay,categoryIx:i,invertAxes:r.invertAxes},o),t=t.fields.color||o.color,a=this.evalPointOptions(a,s,e),e=(Pt(o.color)&&(t=a.color),new qh(s,a)),o=(e.color=t,n[i]);return o||(o=new hh({vertical:r.invertAxes,gap:r.gap,spacing:r.spacing,rtl:!r.invertAxes&&(this.chartService||{}).rtl}),this.append(o)),o.append(e),e},Qh.prototype.updateRange=function(t,e){var i=t.current,t=t.target,e=e.series.axis,o=this.valueAxisRanges[e];k(i)&&!isNaN(i)&&k(t&&!isNaN(t))&&((o=this.valueAxisRanges[e]=o||{min:rt,max:nt}).min=Math.min(o.min,i,t),o.max=Math.max(o.max,i,t))},Qh.prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value.current,t.value.target)},Qh.prototype.pointValue=function(t){return t.valueFields.current},Qh.prototype.aboveAxis=function(t){return 0<t.value.current},Qh.prototype.createAnimation=function(){var t=this.points;this._setAnimationOptions();for(var e=0;e<t.length;e++){var i=t[e];i.options.animation=this.options.animation,i.createAnimation()}},Qh);function Qh(t,e){for(var i=e.series,o=0;o<i.length;o++){var r=i[o],n=r.data;!n||yt(n[0])||Ot(n[0])||(r.data=[n])}sh.call(this,t,e)}Zh.prototype._setAnimationOptions=gh.prototype._setAnimationOptions,e(Zh,{animation:{type:ns}});let Kh=Zh,$h=((ah=M.Class)&&(Jh.__proto__=ah),((Jh.prototype=Object.create(ah&&ah.prototype)).constructor=Jh).prototype.getStyle=function(t,e){var i=t.background,o=t.border.color,e=(e&&(e=e.color||e.options.color,i=_(i,e),o=_(o,e)),void 0!==t.padding?w(t.padding):{});return"object"==typeof t.padding&&(e.top=void 0!==t.padding.top?e.top:void 0,e.right=void 0!==t.padding.right?e.right:void 0,e.bottom=void 0!==t.padding.bottom?e.bottom:void 0,e.left=void 0!==t.padding.left?e.left:void 0),{backgroundColor:i,borderColor:o,font:t.font,color:t.color,opacity:t.opacity,borderWidth:Lt(t.border.width),paddingTop:Lt(e.top),paddingBottom:Lt(e.bottom),paddingLeft:Lt(e.left),paddingRight:Lt(e.right)}},Jh.prototype.show=function(t,e,i){this.chartService&&(t.format=e.format,i=this.getStyle(e,i),t.style=i,i=new M.Color(i.backgroundColor),k(e.color)||i.isDark()||(t.className="k-chart-tooltip-inverse"),this.chartService.notify(ra,t),this.visible=!0)},Jh.prototype.hide=function(){this.chartService&&this.chartService.notify(na),this.visible=!1},Jh.prototype.destroy=function(){delete this.chartService},Jh);function Jh(t,e){ah.call(this),this.chartService=t,this.options=O({},this.options,e)}e($h,{border:{width:1},opacity:1});var tp,ep,ip,gl=$h,h=((tp=gl)&&(op.__proto__=tp),((op.prototype=Object.create(tp&&tp.prototype)).constructor=op).prototype.initAxisName=function(){var t=this.crosshair.axis,t=t.plotArea.categoryAxis?t.getCategory?"categoryAxis":"valueAxis":t.options.vertical?"yAxis":"xAxis";this.axisName=t},op.prototype.showAt=function(t){var e=this.crosshair.axis,i=this.options,o=e[i.stickyMode?"getCategory":"getValue"](t),r=o;i.format?r=this.formatService.auto(i.format,o):e.options.type===K&&(r=this.formatService.auto(e.options.labels.dateFormats[e.options.baseUnit],o)),this.show({point:t,anchor:this.getAnchor(),crosshair:this.crosshair,value:r,axisName:this.axisName,axisIndex:this.crosshair.axis.axisIndex},this.options)},op.prototype.hide=function(){this.chartService.notify(na,{crosshair:this.crosshair,axisName:this.axisName,axisIndex:this.crosshair.axis.axisIndex})},op.prototype.getAnchor=function(){var t,e,i=this.crosshair,o=this.options,r=o.position,o=o.padding,n=!i.axis.options.vertical,i=i.line.bbox(),n=n?(t=b,r===S?(e=T,i.bottomLeft().translate(0,o)):(e=S,i.topLeft().translate(0,-o))):(e=b,r===C?(t=P,i.topLeft().translate(-o,0)):(t=C,i.topRight().translate(o,0)));return{point:n,align:{horizontal:t,vertical:e}}},op);function op(t,e,i){tp.call(this,t,i),this.crosshair=e,this.formatService=t.format,this.initAxisName()}e(h,{padding:10});let rp=h,np=((ep=o)&&(sp.__proto__=ep),((sp.prototype=Object.create(ep&&ep.prototype)).constructor=sp).prototype.showAt=function(t){this.point=t,this.moveLine(),this.line.visible(!0),this.tooltip&&this.tooltip.showAt(t)},sp.prototype.hide=function(){this.line.visible(!1),this.tooltip&&this.tooltip.hide()},sp.prototype.moveLine=function(){var t=this.axis,e=this.point,i=t.options.vertical,o=this.getBox(),r=i?v:y,n=new M.geometry.Point(o.x1,o.y1),i=i?new M.geometry.Point(o.x2,o.y1):new M.geometry.Point(o.x1,o.y2);e&&(this.stickyMode?(t=t.getSlot(t.pointCategoryIndex(e)),n[r]=i[r]=t.center()[r]):n[r]=i[r]=e[r]),this.box=o,this.line.moveTo(n).lineTo(i)},sp.prototype.getBox=function(){for(var t,e=this.axis,i=e.pane.axes,o=i.length,r=e.options.vertical,e=e.lineBox().clone(),n=r?y:v,s=0;s<o;s++){var a=i[s];a.options.vertical!==r&&(t?t.wrap(a.lineBox()):t=a.lineBox().clone())}return e[n+1]=t[n+1],e[n+2]=t[n+2],e},sp.prototype.createVisual=function(){ep.prototype.createVisual.call(this);var t=this.options;this.line=new M.drawing.Path({stroke:{color:t.color,width:t.width,opacity:t.opacity,dashType:t.dashType},visible:!1}),this.moveLine(),this.visual.append(this.line)},sp.prototype.destroy=function(){this.tooltip&&this.tooltip.destroy(),ep.prototype.destroy.call(this)},sp);function sp(t,e,i){ep.call(this,i),this.axis=e,this.stickyMode=e instanceof Mr;i=this.options.tooltip;i.visible&&(this.tooltip=new rp(t,this,O({},i,{stickyMode:this.stickyMode})))}e(np,{color:Y,width:2,zIndex:-1,tooltip:{visible:!1}});let ap=np,lp=((ip=o)&&(hp.__proto__=ip),((hp.prototype=Object.create(ip&&ip.prototype)).constructor=hp).prototype.shouldClip=function(){for(var t=this.children,e=t.length,i=0;i<e;i++)if(!0===t[i].options.clip)return!0;return!1},hp.prototype._clipBox=function(){return this.pane.chartsBox()},hp.prototype.createVisual=function(){var t;this.visual=new M.drawing.Group({zIndex:0}),this.shouldClip()&&(t=(this.clipBox=this._clipBox()).toRect(),_t(t=M.drawing.Path.fromRect(t)),this.visual.clip(t),this.unclipLabels())},hp.prototype.stackRoot=function(){return this},hp.prototype.unclipLabels=function(){for(var t=this.children,e=this.clipBox,i=0;i<t.length;i++)for(var o=t[i].points||{},r=o.length,n=0;n<r;n++){var s,a=o[n];a&&!1!==a.visible&&a.overlapsBox&&a.overlapsBox(e)&&(a.unclipElements?a.unclipElements():(s=a.label,a=a.note,s&&s.options.visible&&(s.alignToClipBox&&s.alignToClipBox(e),s.options.noclip=!0),a&&a.options.visible&&(a.options.noclip=!0)))}},hp.prototype.destroy=function(){ip.prototype.destroy.call(this),delete this.parent},hp);function hp(t,e){ip.call(this,t),this.pane=e}lp.prototype.isStackRoot=!0;let pp=lp;(cp=Ji)&&(dp.__proto__=cp),((dp.prototype=Object.create(cp&&cp.prototype)).constructor=dp).prototype.createTitle=function(){var t=this.options.title;Ot(t)&&(t=O({},t,{align:t.position,position:T})),this.title=Mo.buildTitle(t,dp.prototype.options.title),this.title&&this.append(this.title)},dp.prototype.appendAxis=function(t){this.content.append(t),this.axes.push(t),t.pane=this},dp.prototype.appendAxisAt=function(t,e){this.content.append(t),this.axes.splice(e,0,t),t.pane=this},dp.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},dp.prototype.empty=function(){var t=this.parent;if(t){for(var e=0;e<this.axes.length;e++)t.removeAxis(this.axes[e]);for(var i=0;i<this.charts.length;i++)t.removeChart(this.charts[i])}this.axes=[],this.charts=[],this.content.destroy(),this.content.children=[],this.chartContainer.children=[]},dp.prototype.reflow=function(t){var e;he(this.children)===this.content&&(e=this.children.pop()),cp.prototype.reflow.call(this,t),e&&this.children.push(e),this.title&&(this.contentBox.y1+=this.title.box.height())},dp.prototype.visualStyle=function(){var t=cp.prototype.visualStyle.call(this);return t.zIndex=-10,t},dp.prototype.renderComplete=function(){this.options.visible&&this.createGridLines()},dp.prototype.stackRoot=function(){return this},dp.prototype.clipRoot=function(){return this},dp.prototype.createGridLines=function(){for(var t,e=this.axes,i=e.concat(this.parent.axes),o=[],r=[],n=0;n<e.length;n++)for(var s=e[n],a=s.options.vertical,l=a?o:r,h=0;h<i.length;h++)0===l.length&&a!==(t=i[h]).options.vertical&&ee(l,s.createGridLines(t))},dp.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()},dp.prototype.chartsBox=function(){for(var t=this.axes,e=t.length,i=new I,o=0;o<e;o++){var r=t[o],n=r.options.vertical?v:y,r=r.lineBox();i[n+1]=r[n+1],i[n+2]=r[n+2]}if(0===i.x2)for(var s=this.parent.axes,a=s.length,l=0;l<a;l++){var h=s[l];h.options.vertical||(h=h.lineBox(),i.x1=h.x1,i.x2=h.x2)}return i},dp.prototype.clipBox=function(){return this.chartContainer.clipBox},dp.prototype.notifyRender=function(){var t=this.getService();t&&t.notify("paneRender",{pane:new On(this),index:this.paneIndex,name:this.options.name})};var cp,h=dp,up=1;function dp(t){cp.call(this,t),this.id="pane"+up++,this.createTitle(),this.content=new o,this.chartContainer=new pp({},this),this.append(this.content),this.axes=[],this.charts=[]}h.prototype.isStackRoot=!0,e(h,{zIndex:-1,shrinkToFit:!0,title:{align:C},visible:!0});let fp=h;function gp(t){return!1!==t.options.visible}(yp=o)&&(p.__proto__=yp),((p.prototype=Object.create(yp&&yp.prototype)).constructor=p).prototype.initFields=function(){},p.prototype.initSeries=function(){for(var t=this.series,e=0;e<t.length;e++)t[e].index=e},p.prototype.bindPoint=function(t,e,i){var o=this._bindCache.get(t);return o||this._bindCache.set(t,o=[]),o[e]||(o[e]=Dn.current.bindPoint(t,e,i))},p.prototype.createPanes=function(){for(var t=this.options.title||{},e=this.options.paneDefaults,i=this.options.panes||[],o=Math.max(i.length,1),r=[],n=O({title:{color:t.color}},e),s=0;s<o;s++){var a=O({},n,i[s]),a=(wt(a.title)&&(a.title=O({text:a.title},n.title)),new fp(a));a.paneIndex=s,r.push(a),this.append(a)}this.panes=r},p.prototype.crosshairOptions=function(t){return t.options.crosshair},p.prototype.createCrosshairs=function(t){void 0===t&&(t=this.panes);for(var e=0;e<t.length;e++)for(var i=t[e],o=0;o<i.axes.length;o++){var r=i.axes[o],n=this.crosshairOptions(r);n&&n.visible&&(r=new ap(this.chartService,r,n),this.crosshairs.push(r),i.content.append(r))}},p.prototype.removeCrosshairs=function(t){for(var e=this.crosshairs,i=t.axes,o=e.length-1;0<=o;o--)for(var r=0;r<i.length;r++)if(e[o].axis===i[r]){e.splice(o,1);break}},p.prototype.hideCrosshairs=function(){for(var t=this.crosshairs,e=0;e<t.length;e++)t[e].hide()},p.prototype.findPane=function(t){for(var e,i=this.panes,o=0;o<i.length;o++)if(i[o].options.name===t){e=i[o];break}return e||i[0]},p.prototype.findPointPane=function(t){for(var e,i=this.panes,o=0;o<i.length;o++)if(i[o].box.containsPoint(t)){e=i[o];break}return e},p.prototype.appendAxis=function(t){this.findPane(t.options.pane).appendAxis(t),this.axes.push(t),t.plotArea=this},p.prototype.removeAxis=function(t){for(var e=[],i=0;i<this.axes.length;i++){var o=this.axes[i];t!==o?e.push(o):o.destroy()}this.axes=e},p.prototype.appendChart=function(t,e){this.charts.push(t),e?e.appendChart(t):this.append(t)},p.prototype.removeChart=function(t){for(var e=[],i=0;i<this.charts.length;i++){var o=this.charts[i];o!==t?e.push(o):o.destroy()}this.charts=e},p.prototype.addToLegend=function(t){for(var e=t.length,i=this.options.legend,o=i.labels||{},r=i.inactiveItems||{},n=r.labels||{},s=[],a=0;a<e;a++){var l,h,p,c,u=t[a],d=!1!==u.visible;!1!==u.visibleInLegend&&(l=u.name,(p=!d&&jt(n)||jt(o))&&(l=p({text:Ta(l)?l:"",series:u})),p=u._defaults,p=void(Pt(h=u.color)&&p&&(h=p.color)),c=void 0,c=d?(p={},h):(p={color:n.color,font:n.font},r.markers.color),Ta(l))&&""!==l&&s.push({text:l,labels:p,markerColor:c,series:u,active:d})}ee(i.data,s)},p.prototype.groupAxes=function(t){for(var e=[],i=[],o=0;o<t.length;o++)for(var r=t[o].axes,n=0;n<r.length;n++){var s=r[n];(s.options.vertical?i:e).push(s)}return{x:e,y:i,any:e.concat(i)}},p.prototype.groupSeriesByPane=function(){for(var t=this.series,e={},i=0;i<t.length;i++){var o=t[i],r=this.seriesPaneName(o);e[r]?e[r].push(o):e[r]=[o]}return e},p.prototype.filterVisibleSeries=function(t){for(var e=[],i=0;i<t.length;i++){var o=t[i];!1!==o.visible&&e.push(o)}return e},p.prototype.reflow=function(t){var e=this.options.plotArea,i=this.panes,e=w(e.margin);this.box=t.clone().unpad(e),this.reflowPanes(),this.detachLabels(),this.reflowAxes(i),this.reflowCharts(i)},p.prototype.redraw=function(t){var e=[].concat(t),t=(this.initSeries(),this.getRoot());t&&t.cleanGradients();for(var i=0;i<e.length;i++)this.removeCrosshairs(e[i]),e[i].empty();this._bindCache=new WeakMap,this.render(e),this.detachLabels(),this.reflowAxes(this.panes),this.reflowCharts(e),this.createCrosshairs(e);for(var o=0;o<e.length;o++)e[o].refresh()},p.prototype.axisCrossingValues=function(t,e){for(var t=t.options,i=[].concat(t.axisCrossingValues||t.axisCrossingValue),o=e.length-i.length,r=i[0]||0,n=0;n<o;n++)i.push(r);return i},p.prototype.alignAxisTo=function(t,e,i,o){var i=t.getSlot(i,i,!0),r=t.options.reverse?2:1,o=e.getSlot(o,o,!0),n=e.options.reverse?2:1,o=t.box.translate(o[y+n]-i[y+r],o[v+n]-i[v+r]);t.pane!==e.pane&&o.translate(0,t.pane.box.y1-e.pane.box.y1),t.reflow(o)},p.prototype.alignAxes=function(t,e){for(var i=t[0],o=e[0],r=this.axisCrossingValues(i,e),n=this.axisCrossingValues(o,t),s={},a={},l={},h={},p=0;p<e.length;p++){var c=e[p],u=c.pane,d=u.id,f=!1!==c.options.visible,g=mp(t,u)||i,y=r;g!==i&&(y=this.axisCrossingValues(g,e)),this.alignAxisTo(c,g,n[p],y[p]),c.options._overlap||(L(c.lineBox().x1)===L(g.lineBox().x1)&&(s[d]&&c.reflow(c.box.alignTo(s[d].box,C).translate(-c.options.margin,0)),f)&&(s[d]=c),L(c.lineBox().x2)===L(g.lineBox().x2)&&(c._mirrored||(c.options.labels.mirror=!c.options.labels.mirror,c._mirrored=!0),this.alignAxisTo(c,g,n[p],y[p]),a[d]&&c.reflow(c.box.alignTo(a[d].box,P).translate(c.options.margin,0)),f)&&(a[d]=c),(g=mp(e,u)||o)!==c&&(c.alignTo(g),c.reflow(c.box)))}for(var v=0;v<t.length;v++){var m=t[v],x=m.pane,_=x.id,b=!1!==m.options.visible,x=mp(e,x)||o,w=n;x!==o&&(w=this.axisCrossingValues(x,t)),this.alignAxisTo(m,x,r[v],w[v]),m.options._overlap||(L(m.lineBox().y1)===L(x.lineBox().y1)&&(m._mirrored||(m.options.labels.mirror=!m.options.labels.mirror,m._mirrored=!0),this.alignAxisTo(m,x,r[v],w[v]),l[_]&&m.reflow(m.box.alignTo(l[_].box,T).translate(0,-m.options.margin)),b)&&(l[_]=m),L(m.lineBox().y2,Z)===L(x.lineBox().y2,Z)&&(h[_]&&m.reflow(m.box.alignTo(h[_].box,S).translate(0,m.options.margin)),b)&&(h[_]=m),0!==v&&(m.alignTo(i),m.reflow(m.box)))}},p.prototype.shrinkAxisWidth=function(t){for(var e=this.groupAxes(t).any,i=vp(e),o=0,r=0;r<t.length;r++){var n=t[r];0<n.axes.length&&(o=Math.max(o,i.width()-n.contentBox.width()))}if(0!==o)for(var s=0;s<e.length;s++){var a=e[s];a.options.vertical||a.reflow(a.box.shrink(o,0))}},p.prototype.shrinkAxisHeight=function(t){for(var e,i=0;i<t.length;i++){var o=t[i],r=o.axes,n=Math.max(0,vp(r).height()-o.contentBox.height());if(0!==n){for(var s=0;s<r.length;s++){var a=r[s];a.options.vertical&&a.reflow(a.box.shrink(0,n))}e=!0}}return e},p.prototype.fitAxes=function(t){for(var e=this.groupAxes(t).any,i=0,o=0;o<t.length;o++){var r=t[o],n=r.axes,r=r.contentBox;if(0<n.length)for(var s=vp(n),a=Math.max(r.y1-s.y1,r.y2-s.y2),i=Math.max(i,r.x1-s.x1),l=0;l<n.length;l++){var h=n[l];h.reflow(h.box.translate(0,a))}}for(var p=0;p<e.length;p++){var c=e[p];c.reflow(c.box.translate(i,0))}},p.prototype.reflowAxes=function(t){for(var e=this.groupAxes(t),i=0;i<t.length;i++)this.reflowPaneAxes(t[i]);0<e.x.length&&0<e.y.length&&(this.alignAxes(e.x,e.y),this.shrinkAxisWidth(t),this.autoRotateAxisLabels(e),this.alignAxes(e.x,e.y),this.shrinkAxisWidth(t)&&this.alignAxes(e.x,e.y),this.shrinkAxisHeight(t),this.alignAxes(e.x,e.y),this.shrinkAxisHeight(t)&&this.alignAxes(e.x,e.y),this.fitAxes(t))},p.prototype.autoRotateAxisLabels=function(t){for(var e,i=this.panes,o=Ap(i),r=0;r<o.length;r++)o[r].autoRotateLabels()&&(e=!0);if(e){for(var n=0;n<i.length;n++)this.reflowPaneAxes(i[n]);0<t.x.length&&0<t.y.length&&(this.alignAxes(t.x,t.y),this.shrinkAxisWidth(i))}},p.prototype.reflowPaneAxes=function(t){var e=t.axes,i=e.length;if(0<i)for(var o=0;o<i;o++)e[o].reflow(t.contentBox)},p.prototype.reflowCharts=function(t){for(var e=this.charts,i=e.length,o=this.box,r=0;r<i;r++){var n=e[r].pane;n&&!u(n,t)||e[r].reflow(o)}},p.prototype.reflowPanes=function(){for(var t=this.box,e=this.panes,i=e.length,o=t.height(),r=0,n=t.y1,s=0;s<i;s++){var a=e[s],l=a.options.height;a.options.width=t.width(),a.options.height?(l.indexOf&&l.indexOf("%")&&(l=parseInt(l,10)/100,a.options.height=l*t.height()),a.reflow(t.clone()),o-=a.options.height):r++}for(var h=0;h<i;h++){var p=e[h];p.options.height||(p.options.height=o/r)}for(var c=0;c<i;c++){var u=e[c],d=t.clone().move(t.x1,n);u.reflow(d),n+=u.options.height}},p.prototype.backgroundBox=function(){for(var t=this.axes,e=t.length,i=0;i<e;i++)for(var o=t[i],r=0;r<e;r++){var n,s=t[r];o.options.vertical!==s.options.vertical&&(s=o.lineBox().clone().wrap(s.lineBox()),n=n?n.wrap(s):s)}return n||this.box},p.prototype.chartsBoxes=function(){for(var t=this.panes,e=[],i=0;i<t.length;i++)e.push(t[i].chartsBox());return e},p.prototype.addBackgroundPaths=function(t){for(var e=this.chartsBoxes(),i=0;i<e.length;i++)t.paths.push(M.drawing.Path.fromRect(e[i].toRect()))},p.prototype.backgroundContainsPoint=function(t){for(var e=this.chartsBoxes(),i=0;i<e.length;i++)if(e[i].containsPoint(t))return!0},p.prototype.createVisual=function(){yp.prototype.createVisual.call(this);var t=this.options.plotArea,e=t.opacity,i=t.background,t=t.border,i=(void 0===t&&(t={}),""!==i&&null!==i&&"none"!==i&&"transparent"!==i&&k(i)||(i=a,e=0),this._bgVisual=new M.drawing.MultiPath({fill:{color:i,opacity:e},stroke:{color:t.width?t.color:"",width:t.width,dashType:t.dashType},zIndex:-1}));this.addBackgroundPaths(i),this.appendVisual(i)},p.prototype.pointsByCategoryIndex=function(t){var e=this.charts,i=[];if(null!==t)for(var o=0;o<e.length;o++)if("_navigator"!==e[o].pane.options.name){var r=e[o].categoryPoints[t];if(r&&r.length)for(var n=0;n<r.length;n++){var s=r[n];s&&k(s.value)&&null!==s.value&&i.push(s)}}return i},p.prototype.pointsBySeriesIndex=function(e){return this.filterPoints(function(t){return t.series.index===e})},p.prototype.pointsByPointIndex=function(e){return this.filterPoints(function(t){return t.getIndex()===e})},p.prototype.pointsBySeriesName=function(e){return this.filterPoints(function(t){return t.series.name===e})},p.prototype.filterPoints=function(t){for(var e=this.charts,i=[],o=0;o<e.length;o++)for(var r=e[o].points,n=0;n<r.length;n++){var s=r[n];s&&!1!==s.visible&&t(s)&&i.push(s)}return i},p.prototype.findPoint=function(t){for(var e=this.charts,i=0;i<e.length;i++)for(var o=e[i].points,r=0;r<o.length;r++){var n=o[r];if(n&&!1!==n.visible&&t(n))return n}},p.prototype.paneByPoint=function(t){for(var e=this.panes,i=0;i<e.length;i++){var o=e[i];if(o.box.containsPoint(t))return o}},p.prototype.detachLabels=function(){var t=this.groupAxes(this.panes),e=t.x,t=t.y;this.detachAxisGroupLabels(t,e),this.detachAxisGroupLabels(e,t)},p.prototype.detachAxisGroupLabels=function(t,e){for(var i=0,o=0;o<t.length;o++){var r=t[o],n=r.pane,s=mp(e,n)||e[0],s=this.createLabelAxis(r,o+i,s);s&&(i++,r=n.axes.indexOf(r)+i,n.appendAxisAt(s,r))}},p.prototype.createLabelAxis=function(t,e,i){var o=t.options.labels,r=o.position;if(r!==J&&r!==pt||!1===o.visible)return null;var o=this.groupAxes(this.panes),o=i.options.vertical?o.x:o.y,o=this.axisCrossingValues(i,o),r=r===J,n=i.range(),r=r?n.max:n.min;if(x(o[e],n.min,n.max)-r==0)return null;o.splice(e+1,0,r),i.options.axisCrossingValues=o;n=t.clone();return t.clear(),n.options.name=void 0,n.options.line.visible=!1,n.options.crosshair=void 0,n.options.notes=void 0,n.options.plotBands=void 0,n},p.prototype.isTrendline=function(t){return t&&u(t.type,Hs)},p.prototype.trendlineFactory=function(){},p.prototype.createTrendlineSeries=function(){var o=this,r=[];return this.series=this.series.map(function(t){if(!o.isTrendline(t))return t;var e,i=o.seriesByName(t.for);if(i)return e=Dn.current.valueFields(i),e=he(e),(e=o.trendlineFactory(Object.assign({},{field:e},t),i))&&(!1===i.visible&&(e.visible=!1),e.color===ot&&(e.color=i.color),r.push(e)),e;throw new Error('Invalid Configuration: Unable to locate linked series "'+t.for+'" for trendline "'+t.name+'".')}).filter(function(t){return null!==t}),r},p.prototype.seriesByName=function(e){return this.series.find(function(t){return t.name===e})},p.prototype.getFirstPoint=function(){for(var t=0;t<this.series.length;t++){var e=this.pointsBySeriesIndex(t).find(gp);if(e)return e}},p.prototype.getPointBelow=function(t){return this._getNextPoint(t,this._pointsByVertical,1)},p.prototype.getPointAbove=function(t){return this._getNextPoint(t,this._pointsByVertical,-1)},p.prototype.getPointToTheRight=function(t){return this._getNextPoint(t,this._pointsByHorizontal,1)},p.prototype.getPointToTheLeft=function(t){return this._getNextPoint(t,this._pointsByHorizontal,-1)},p.prototype._getNextPoint=function(o,r,t){function e(t){for(var e,i=0;0===(e=r.call(n,o,i+=t).filter(gp)).length;);return e}var n=this,i=r.call(this,o).filter(gp),t=i.indexOf(o)+t;return t<0?(i=e(-1)).at(-1):t>=i.length?(i=e(1)).at(0):i[t]},p.prototype._pointsByVertical=function(t){return this.pointsByPointIndex(t.getIndex())},p.prototype._pointsByHorizontal=function(t,e){t=Ct(t.series.index+(e=void 0===e?0:e),this.series.length);return this.pointsBySeriesIndex(t)};var yp,h=p;function p(t,e,i){yp.call(this,e),this.initFields(t,e),this.series=t,this.initSeries(),this.charts=[],this.options.legend=this.options.legend||{},this.options.legend.data=[],this.axes=[],this.crosshairs=[],this.chartService=i,this.originalOptions=e,this.originalSeries=t,this._bindCache=new WeakMap,this.createPanes(),this.render(),this.createCrosshairs()}function vp(t){for(var e,i=t.length,o=0;o<i;o++){var r=t[o],n=!1!==r.options.visible;(n||(e=>!e.pane.axes.some(function(t){return t.options.vertical===e.options.vertical&&t!==e&&!1!==t.options.visible}))(r))&&(n=n?r.contentBox():r.lineBox(),e?e.wrap(n):e=n.clone())}return e||new I}function mp(t,e){for(var i=0;i<t.length;i++){var o=t[i];if(o&&o.pane===e)return o}}var xp,_p,bp,wp,kp,Ap=function(t){return t.reduce(function(t,e){return t.concat(e.axes)},[])};e(h,{series:[],plotArea:{margin:{}},background:"",border:{color:Y,width:0},paneDefaults:{title:{}},legend:{inactiveItems:{labels:{color:"#919191"},markers:{color:"#919191"}}}});let Sp=h,Cp={hover:function(t,e){this._dispatchEvent(t,e,Ys)},click:function(t,e){this._dispatchEvent(t,e,"plotAreaClick")}},Pp=Cp,Tp=((xp=M.Class)&&(Mp.__proto__=xp),((Mp.prototype=Object.create(xp&&xp.prototype)).constructor=Mp).prototype.aggregatePoints=function(t,e){var i,o=this._series,r=this._seriesFields,n=this._bindPoints(t||[]),t=n.dataItems[0],s={};!t||m(t)||yt(t)||((i=function(){}).prototype=t,s=new i);for(var a=0;a<r.length;a++){var l=r[a],h=this._bindField(n.values,l.canonicalName),h=l.transform(h,o,n.dataItems,e);if(!(null===h||!Ot(h)||k(h.length)||h instanceof Date)){s=h;break}if(k(h)){p=void 0;c=void 0;u=void 0;d=void 0;f=void 0;g=void 0;var p=l.name;var c=s;var u=h;var d=c,f=p;if(-1<p.indexOf(".")){for(var g=p.split(".");1<g.length;)f=g.shift(),k(d[f])||(d[f]={}),d=d[f];f=g.shift()}d[f]=u}}return s},Mp.prototype._bindPoints=function(t){for(var e=this._binder,i=this._series,o=[],r=[],n=0;n<t.length;n++){var s=t[n];o.push(e.bindPoint(i,s)),r.push(i.data[s])}return{values:o,dataItems:r}},Mp.prototype._bindField=function(t,e){for(var i=[],o=t.length,r=0;r<o;r++){var n=t[r],s=n.valueFields,s=(k(s[e])?s:n.fields)[e];i.push(s)}return i},Mp);function Mp(t,e,i){xp.call(this);var o=e.canonicalFields(t),r=e.valueFields(t),n=e.sourceFields(t,o),s=this._seriesFields=[],i=i.query(t.type),a=t.aggregate||i;this._series=t,this._binder=e;for(var l=0;l<o.length;l++){var h=o[l],p=void 0;if(Ot(a))p=a[h];else{if(0!==l&&!u(h,r))break;p=a}p&&s.push({canonicalName:h,name:n[l],transform:Pt(p)?p:Rn[p]})}}let Op=Tp,Lp=((_p=M.Class)&&(Ip.__proto__=_p),((Ip.prototype=Object.create(_p&&_p.prototype)).constructor=Ip).prototype.register=function(t,e){for(var i=0;i<t.length;i++)this._defaults[t[i]]=e},Ip.prototype.query=function(t){return this._defaults[t]},Ip);function Ip(){_p.call(this),this._defaults={}}Lp.current=new Lp;let Bp=Lp,Ep=((bp=Ul)&&(Rp.__proto__=bp),((Rp.prototype=Object.create(bp&&bp.prototype)).constructor=Rp).prototype.createLabel=function(){var t=this.options.labels,e=O({},t,t.from),t=O({},t,t.to);e.visible&&(this.labelFrom=this.createLabelElement(e),this.append(this.labelFrom)),t.visible&&(this.labelTo=this.createLabelElement(t),this.append(this.labelTo))},Rp.prototype.reflow=function(t){this.render();var e=this.labelFrom,i=this.labelTo,o=this.value;this.box=t,e&&(e.options.aboveAxis=o.from>o.to,e.reflow(t)),i&&(i.options.aboveAxis=o.to>o.from,i.reflow(t)),this.note&&this.note.reflow(t)},Rp);function Rp(){bp.apply(this,arguments)}Ep.prototype.defaults=O({},Ep.prototype.defaults,{labels:{format:"{0} - {1}"},tooltip:{format:"{1}"}});let Vp=Ep,jp=((wp=gh)&&(zp.__proto__=wp),((zp.prototype=Object.create(wp&&wp.prototype)).constructor=zp).prototype.pointType=function(){return Vp},zp.prototype.pointValue=function(t){return t.valueFields},zp.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)},zp.prototype.plotRange=function(t){return t?[t.value.from,t.value.to]:0},zp.prototype.updateRange=function(t,e){var e=e.series.axis,i=t.from,o=t.to,r=this.valueAxisRanges[e];null!==t&&m(i)&&m(o)&&((r=this.valueAxisRanges[e]=r||{min:rt,max:nt}).min=Math.min(r.min,i),r.max=Math.max(r.max,i),r.min=Math.min(r.min,o),r.max=Math.max(r.max,o))},zp.prototype.aboveAxis=function(t){t=t.value;return t.from<t.to},zp);function zp(){wp.apply(this,arguments)}jp.prototype.plotLimits=Da.prototype.plotLimits;let Dp=jp,Fp=((kp=Wa)&&(Hp.__proto__=kp),((Hp.prototype=Object.create(kp&&kp.prototype)).constructor=Hp).prototype.aliasFor=function(){return this.parent},Hp);function Hp(){kp.apply(this,arguments)}let Np=Fp;(Up=o)&&($p.__proto__=Up),(($p.prototype=Object.create(Up&&Up.prototype)).constructor=$p).prototype.render=function(){var t,e,i,o;this._rendered||(this._rendered=!0,t=(e=this.options).markers,e=e.labels,o=this.value,i=this.fromPoint=new Np(o,O({},this.options,{labels:e.from,markers:t.from})),o=this.toPoint=new Np(o,O({},this.options,{labels:e.to,markers:t.to})),this.copyFields(i),this.copyFields(o),this.append(i),this.append(o))},$p.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())},$p.prototype.createHighlight=function(){var t=new M.drawing.Group;return t.append(this.fromPoint.createHighlight()),t.append(this.toPoint.createHighlight()),t},$p.prototype.highlightVisual=function(){return this.visual},$p.prototype.highlightVisualArgs=function(){return{options:this.options,from:this.fromPoint.highlightVisualArgs(),to:this.toPoint.highlightVisualArgs()}},$p.prototype.createFocusHighlight=function(){var t=new M.drawing.Group;return t.append(this.fromPoint.createFocusHighlight()),t.append(this.toPoint.createFocusHighlight()),t},$p.prototype.tooltipAnchor=function(){var t,e,i,o,r=this.owner.pane.clipBox();if(!r||r.overlaps(this.box))return i=(r=this.box).center(),o=C,r=this.options.vertical?(t=i.x,e=r.y1-5,S):(t=r.x2+5,e=i.y,b),{point:new A(t,e),align:{horizontal:o,vertical:r}}},$p.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},$p.prototype.overlapsBox=function(t){return this.box.overlaps(t)},$p.prototype.unclipElements=function(){this.fromPoint.unclipElements(),this.toPoint.unclipElements()},$p.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}"}))},$p.prototype.positionLabels=function(t,e){var i,o=this.options,r=o.labels;"auto"===r.position&&(o=o.vertical?e.y1<=t.y1?(i=ts,es):(i=es,ts):e.x1<=t.x1?(i=C,P):(i=P,C),r.from&&r.from.position||(this.fromPoint.options.labels.position=o),r.to&&r.to.position||(this.toPoint.options.labels.position=i))},$p.prototype.copyFields=function(t){t.dataItem=this.dataItem,t.category=this.category,t.series=this.series,t.color=this.color,t.owner=this.owner},$p.prototype.focusVisual=function(){this.fromPoint.focusVisual()},$p.prototype.clearFocusFromVisual=function(){this.toPoint.clearFocusFromVisual()},$p.prototype.getIndex=function(){return this.categoryIx};var Up,Gp,Wp,Xp,Yp,qp,Zp,Qp,Kp,h=$p;function $p(t,e){Up.call(this),this.value=t,this.options=e,this.aboveAxis=_(this.options.aboveAxis,!0),this.tooltipTracking=!0,this._id=Ue(),this.initLabelsFormat()}O(h.prototype,Ha),O(h.prototype,Na),h.prototype.defaults={markers:{visible:!1,background:a,size:8,type:q,border:{width:2},opacity:1},labels:{visible:!1,margin:w(3),padding:w(4),animation:{type:qn,delay:Yn},position:"auto"},notes:{label:{}},highlight:{markers:{border:{color:a,width:2}},zIndex:100},tooltip:{format:"{0} - {1}"},accessibility:{role:t,className:i,ariaRoleDescription:js}};let Jp=h,tc=((Gp=Al)&&(ec.__proto__=Gp),((ec.prototype=Object.create(Gp&&Gp.prototype)).constructor=ec).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.toGeometryPoints(this.toPoints()))},ec.prototype.stackSegments=function(){var t=this.fromSegments;return t=this.fromSegments?t:this.fromSegments=this.segmentsFromPoints(this.toGeometryPoints(this.fromPoints().reverse()))},ec.prototype.createStroke=function(t){var e=new M.drawing.Path(t),t=new M.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)},ec.prototype.hasStackSegment=function(){return!0},ec.prototype.fromPoints=function(){return this.linePoints.map(function(t){return t.fromPoint})},ec.prototype.toPoints=function(){return this.linePoints.map(function(t){return t.toPoint})},ec);function ec(){Gp.apply(this,arguments)}let ic=tc,oc=((Wp=ic)&&(rc.__proto__=Wp),((rc.prototype=Object.create(Wp&&Wp.prototype)).constructor=rc).prototype.createStrokeSegments=function(){return this.createCurveSegments(this.toPoints())},rc.prototype.stackSegments=function(){var t=this.fromSegments;return t=this.fromSegments?t:this.fromSegments=this.createCurveSegments(this.fromPoints().reverse())},rc.prototype.createCurveSegments=function(t){return(new kn).process(this.toGeometryPoints(t))},rc);function rc(){Wp.apply(this,arguments)}let nc=oc,sc=((Xp=ic)&&(ac.__proto__=Xp),((ac.prototype=Object.create(Xp&&Xp.prototype)).constructor=ac).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.calculateStepPoints(this.toPoints()))},ac.prototype.stackSegments=function(){var t=this.fromSegments;return this.fromSegments||(t=this.fromSegments=this.segmentsFromPoints(this.calculateStepPoints(this.fromPoints()))).reverse(),t},ac);function ac(){Xp.apply(this,arguments)}O(sc.prototype,l);let lc=sc,hc=((Yp=Da)&&(pc.__proto__=Yp),((pc.prototype=Object.create(Yp&&Yp.prototype)).constructor=pc).prototype.render=function(){Yp.prototype.render.call(this),this.renderSegments()},pc.prototype.pointType=function(){return Jp},pc.prototype.createPoint=function(t,e){var i=e.series,o=e.seriesIx,r=t.valueFields;if(!Ta(r.from)&&!Ta(r.to)){if(this.seriesMissingValues(i)!==$n)return null;r={from:0,to:0}}o=this.pointOptions(i,o),o=this.evalPointOptions(o,r,e),e=t.fields.color||i.color,Pt(i.color)&&(e=o.color),t=new Jp(r,o);return t.color=e,this.append(t),t},pc.prototype.createSegment=function(t,e,i){var o=(e.line||{}).style;return new("smooth"===o?nc:"step"===o?lc:ic)(t,e,i)},pc.prototype.plotRange=function(t,e){return t?[t.value.from,t.value.to]:[e,e]},pc.prototype.valueSlot=function(t,e){var i=t.getSlot(e[0],e[0],!this.options.clip),t=t.getSlot(e[1],e[1],!this.options.clip);if(i&&t)return{from:i,to:t}},pc.prototype.pointSlot=function(t,e){var i,o=e.from,e=e.to,o=this.options.invertAxes?(i=new I(o.x1,t.y1,o.x2,t.y2),new I(e.x1,t.y1,e.x2,t.y2)):(i=new I(t.x1,o.y1,t.x2,o.y2),new I(t.x1,e.y1,t.x2,e.y2));return{from:i,to:o}},pc.prototype.addValue=function(t,e){var i=t.valueFields;m(i.from)||(i.from=i.to),m(i.to)||(i.to=i.from),Yp.prototype.addValue.call(this,t,e)},pc.prototype.updateRange=function(t,e){var i;null!==t&&m(t.from)&&m(t.to)&&(e=e.series.axis,e=this.valueAxisRanges[e]=this.valueAxisRanges[e]||{min:rt,max:nt},i=t.from,t=t.to,e.min=Math.min(e.min,i,t),e.max=Math.max(e.max,i,t))},pc.prototype.formatPointValue=function(t,e){t=t.value;return this.chartService.format.auto(e,t.from,t.to)},pc.prototype.animationPoints=function(){for(var t=this.points,e=[],i=0;i<t.length;i++){var o=t[i];o&&(e.push((o.fromPoint||{}).marker),e.push((o.toPoint||{}).marker))}return e.concat(this._segments)},pc);function pc(){Yp.apply(this,arguments)}O(hc.prototype,Ja,ml);let cc=hc,uc=((qp=mh)&&(dc.__proto__=qp),((dc.prototype=Object.create(qp&&qp.prototype)).constructor=dc).prototype.reflow=function(t){var e=this.options,i=this.value,e=this.owner.seriesValueAxis(e),o=[],r=[],n=[],s=e.getSlot(i.low,i.high),a=e.getSlot(i.open,i.open),e=e.getSlot(i.close,i.close),i=(a.x1=e.x1=s.x1=t.x1,a.x2=e.x2=s.x2=t.x2,s.center().x);o.push([a.x1,a.y1]),o.push([i,a.y1]),r.push([i,e.y1]),r.push([e.x2,e.y1]),n.push([i,s.y1]),n.push([i,s.y2]),this.lines=[o,r,n],this.box=s.clone().wrap(a.clone().wrap(e)),this.reflowNote()},dc.prototype.createBody=function(){},dc);function dc(){qp.apply(this,arguments)}let fc=uc,gc=((Zp=bh)&&(yc.__proto__=Zp),((yc.prototype=Object.create(Zp&&Zp.prototype)).constructor=yc).prototype.pointType=function(){return fc},yc);function yc(){Zp.apply(this,arguments)}let vc=gc,mc=((Qp=o)&&(xc.__proto__=Qp),((xc.prototype=Object.create(Qp&&Qp.prototype)).constructor=xc).prototype.linePoints=function(){var t,e=this.from,i=this.from.box,o=this.to.box,r=[];return e.isVertical?(t=e.aboveAxis?i.y1:i.y2,r.push([i.x1,t],[o.x2,t])):(t=e.aboveAxis?i.x2:i.x1,r.push([t,i.y1],[t,o.y2])),r},xc.prototype.createVisual=function(){Qp.prototype.createVisual.call(this);var t=this.series.line||{},t=M.drawing.Path.fromPoints(this.linePoints(),{stroke:{color:t.color,width:t.width,opacity:t.opacity,dashType:t.dashType}});_t(t),this.visual.append(t)},xc);function xc(t,e,i){Qp.call(this),this.from=t,this.to=e,this.series=i}e(mc,{animation:{type:qn,delay:Yn}});let _c=mc,bc=((Kp=gh)&&(wc.__proto__=Kp),((wc.prototype=Object.create(Kp&&Kp.prototype)).constructor=wc).prototype.render=function(){Kp.prototype.render.call(this),this.createSegments()},wc.prototype.traverseDataPoints=function(t){for(var e=this.options.series,i=_a(e),o=!this.options.invertAxes,r=0;r<e.length;r++)for(var n=e[r],s=0,a=0,l=0;l<i;l++){var h=Dn.current.bindPoint(n,l),p=h.valueFields.value,c=h.fields.summary,u=s,d=void 0;c?"total"===c.toLowerCase()?(u=0,d=h.valueFields.value=s):(d=u-(h.valueFields.value=a),a=0):m(p)&&(a+=p,d=s+=p),t(h,{category:this.categoryAxis.categoryAt(l),categoryIx:l,series:n,seriesIx:r,total:s,runningTotal:a,from:u,to:d,isVertical:o})}},wc.prototype.updateRange=function(t,e){Kp.prototype.updateRange.call(this,{value:e.to},e)},wc.prototype.aboveAxis=function(t){return 0<=t.value},wc.prototype.plotRange=function(t){return[t.from,t.to]},wc.prototype.createSegments=function(){for(var t=this.options.series,e=this.seriesPoints,i=this.segments=[],o=0;o<t.length;o++){var r=t[o],n=e[o];if(n)for(var s=void 0,a=0;a<n.length;a++){var l,h=n[a];h&&s&&(l=new _c(s,h,r),i.push(l),this.append(l)),s=h}}},wc);function wc(){Kp.apply(this,arguments)}function kc(t,e,i){return(t=t[String(e)])?t(i):null}function Ac(t,e){for(var i,o,r=0,n=0,s=0,a=0,l=0,h=Number.MAX_VALUE,p=Number.MIN_VALUE,c=0;c<t.length;c++){var u=e(t[c]),d=u.xValue,u=u.yValue;isFinite(d)&&null!==d&&isFinite(u)&&null!==u&&(h=Math.min(d,h),p=Math.max(d,p),l++,r+=d,n+=u,s+=Math.pow(d,2),a+=d*u)}return 0<l&&(o=(n-(i=(l*a-r*n)/(l*s-Math.pow(r,2)))*r)/l),{slope:i,intercept:o,count:l,xMin:h,xMax:p}}function Sc(t,e){return t.every(function(t){t=t.valueFields;return!Ta(t[e])||0<t[e]})}function Cc(t,e){for(var i=[],o=e.totalRangeIndices(),r=e.currentRangeIndices(),n={min:Math.floor(Math.max(r.min-1,o.min)),max:Math.ceil(Math.min(r.max+2,o.max))},s=n.min;s<n.max;s++){var a=s+1;i[s]={category:e.categoryAt(s,!0),value:t(a)}}return i}function Pc(t,e,i){for(var o=[],r=[],n=Math.max(2,i)-1,s=0,a=0,l=0;l<t.length;l++){var h=e(t[l]),p=h.xValue,h=h.yValue;if(isFinite(h)&&null!==h?(r.push(h),a+=h,s=Math.max(l,s)):r.push(null),n<=l){var h=r.filter(function(t){return null!==t}).length,c=r.shift()||0;if(0<h){o.push([p,a/h]),a-=c;continue}}o.push([p,null])}return o.slice(0,s+1)}function Tc(t,e,i){for(var o=Math.min(Math.max(i||1,1),6)+1,r=new De,n=new De,s=0,a=Number.MAX_VALUE,l=Number.MIN_VALUE,i=function(t){return t},h=[],p=0;p<t.length;p++){var c=e(t[p]),u=c.xValue,c=c.yValue;if(isFinite(u)&&null!==u&&isFinite(c)&&null!==c){a=Math.min(u,a),l=Math.max(u,l),s++,n.set(p,0,c),r.set(p,0,1),r.set(p,1,u);for(var d=2;d<=o;d++)r.set(p,d,Math.pow(r.get(p,1),d))}else r.set(p,0,0)}return r.width=Math.min(o,s),0<s&&(h=((t,e)=>{for(var i=t.transpose(),o=i.multiply(t).inverse().multiply(i).multiply(e),r=[],n=0;n<o.height;n++)r.push(o.get(n,0));return r})(r,n),i=function(o){return h.reduce(function(t,e,i){return t+e*Math.pow(o,i)},0)}),{coefficients:h,count:s,valueMapper:i,xMin:a,xMax:l}}let Mc=bc,Oc={exponentialTrendline:function(t){var e,i,o,r,n,s=t.options,t=(r=(t={seriesValues:t.seriesValues,categoryAxis:t.categoryAxis,options:s}).categoryAxis,n=t.options,t=(0,t.seriesValues)(),Sc(t,n.field)&&(n=(t=Ac(t,(e=n.field,function(t){return{xValue:t.categoryIx+1,yValue:Math.log(t.valueFields[e])}}))).slope,0<t.count)?(i=Math.exp(t.intercept),o=n,Cc(function(t){return i*Math.exp(o*t)},r)):null);return t?Object.assign({},s,{type:"line",data:t,categoryField:"category",field:"value"}):null},linearTrendline:function(t){var e,i,o,r,n=t.options,s=(i=(t={seriesValues:t.seriesValues,categoryAxis:t.categoryAxis,options:n}).categoryAxis,s=t.options,t=Ac((0,t.seriesValues)(),(e=s.field,function(t){return{xValue:t.categoryIx+1,yValue:t.valueFields[e]}})),o=t.slope,r=t.intercept,0<t.count?Cc(function(t){return o*t+r},i):null);return s?Object.assign({},n,{type:"line",data:s,categoryField:"category",field:"value"}):null},logarithmicTrendline:function(t){var i,e,o,r,n=t.options,s=(r=(t={seriesValues:t.seriesValues,categoryAxis:t.categoryAxis,options:n}).categoryAxis,s=t.options,t=Ac((0,t.seriesValues)(),(i=s.field,function(t){var e=t.categoryIx,t=t.valueFields;return{xValue:Math.log(e+1),yValue:t[i]}})),s=t.slope,0<t.count?(e=s,o=t.intercept,Cc(function(t){return e*Math.log(t)+o},r)):null);return s?Object.assign({},n,{type:"line",data:s,categoryField:"category",field:"value"}):null},movingAverageTrendline:function(t){var e,i,o,r,n,s,a=t.options,l=(i=r=(t=t).categoryAxis,l=t.seriesValues,o=((t=t.options).trendline||{}).period||2,n=i.totalRangeIndices(),i=i.currentRangeIndices(),i={min:Math.floor(Math.max(i.min-o,n.min)),max:Math.ceil(Math.min(i.max+o+2,n.max))},n=Pc(l(i),(e=t.field,function(t){return{xValue:t.categoryIx,yValue:t.valueFields[e]}}),o),s=[],n.forEach(function(t){var e=t[0],t=t[1];s[e]={category:r.categoryAt(e,!0),value:t}}),0<s.length?s:null);return l?Object.assign({},a,{type:"line",data:l,categoryField:"category",field:"value"}):null},polynomialTrendline:function(t){var e,i,o,r,n=t.options,s=(i=(t={seriesValues:t.seriesValues,categoryAxis:t.categoryAxis,options:n}).seriesValues,o=t.categoryAxis,s=((t=t.options).trendline||{}).order,i=Tc(i(),(e=t.field,function(t){return{xValue:t.categoryIx+1,yValue:t.valueFields[e]}}),s),t=i.count,r=i.valueMapper,0<t?Cc(function(t){return r(t)},o):null);return s?Object.assign({},n,{type:"line",data:s,categoryField:"category",field:"value"}):null},powerTrendline:function(t){var i,e,o,r,n,s=t.options,t=(r=(t={seriesValues:t.seriesValues,categoryAxis:t.categoryAxis,options:s}).categoryAxis,n=t.options,t=(0,t.seriesValues)(),Sc(t,n.field)&&(n=(t=Ac(t,(i=n.field,function(t){var e=t.categoryIx,t=t.valueFields;return{xValue:Math.log(e+1),yValue:Math.log(t[i])}}))).slope,0<t.count)?(e=Math.exp(t.intercept),o=n,Cc(function(t){return e*Math.pow(t,o)},r)):null);return t?Object.assign({},s,{type:"line",data:t,categoryField:"category",field:"value"}):null}},Lc=Oc;var Ic,Bc,Ec=[rs,Os,Ss,Es],Rc=[ys,Bs].concat(Ec),h=((Ic=Sp)&&(c.__proto__=Ic),((c.prototype=Object.create(Ic&&Ic.prototype)).constructor=c).prototype.initFields=function(t){if(this.namedCategoryAxes={},this.namedValueAxes={},this.valueAxisRangeTracker=new Vl,this._seriesPointsCache={},this._currentPointsCache={},0<t.length){this.invertAxes=u(t[0].type,[ns,ls,Bs,Os,Es,Cs,gs,Ls]);for(var e=0;e<t.length;e++){var i=t[e].stack;if(i&&"100%"===i.type){this.stack100=!0;break}}}},c.prototype.render=function(t){void 0===t&&(t=this.panes),this.series=[].concat(this.originalSeries),this.createCategoryAxes(t),this.aggregateCategories(t),this.createTrendlineSeries(t),this.createCategoryAxesLabels(t),this.createCharts(t),this.createValueAxes(t)},c.prototype.removeAxis=function(t){var e=t.options.name;Ic.prototype.removeAxis.call(this,t),t instanceof Mr?delete this.namedCategoryAxes[e]:(this.valueAxisRangeTracker.reset(e),delete this.namedValueAxes[e]),t===this.categoryAxis&&delete this.categoryAxis,t===this.valueAxis&&delete this.valueAxis},c.prototype.trendlineFactory=function(t,e){var i=this.seriesCategoryAxis(t),o=this.seriesValues.bind(this,e.index),t=kc(Lc,t.type,{options:t,categoryAxis:i,seriesValues:o});return t&&(t.categoryAxis=e.categoryAxis,t.valueAxis=e.valueAxis,this.filterSeries(t,i))},c.prototype.trendlineAggregateForecast=function(){return this.series.map(function(t){return(t.trendline||{}).forecast}).filter(function(t){return void 0!==t}).reduce(function(t,e){return{before:Math.max(t.before,e.before||0),after:Math.max(t.after,e.after||0)}},{before:0,after:0})},c.prototype.seriesValues=function(t,e){var i=[],o=this.srcSeries[t],t=this.seriesCategoryAxis(o);ba(t.options.type,K)&&(this._seriesPointsCache={},this._currentPointsCache={},t.options.dataItems=[],o=this.aggregateSeries(o,t,t.totalRangeIndices()));for(var t=e?e.min:0,r=e?e.max:o.data.length,n=t;n<r;n++){var s=this.bindPoint(o,n);i.push({categoryIx:n,category:s.fields.category,valueFields:s.valueFields})}return i},c.prototype.createCharts=function(t){for(var e=this.groupSeriesByPane(),i=0;i<t.length;i++){var o=t[i],r=e[o.options.name||"default"]||[],r=(this.addToLegend(r),this.filterVisibleSeries(r));if(r)for(var n=this.groupSeriesByCategoryAxis(r),s=0;s<n.length;s++)this.createChartGroup(n[s],o)}},c.prototype.createChartGroup=function(t,e){this.createAreaChart(Aa(t,[rs,Os]),e),this.createRangeAreaChart(Aa(t,[Ss,Es]),e),this.createBarChart(Aa(t,[ps,ns]),e),this.createRangeBarChart(Aa(t,[Ps,Cs]),e),this.createBulletChart(Aa(t,[ls,Is]),e),this.createCandlestickChart(Aa(t,hs),e),this.createBoxPlotChart(Aa(t,[ss,Ls]),e),this.createOHLCChart(Aa(t,vs),e),this.createWaterfallChart(Aa(t,[Rs,gs]),e),this.createLineChart(Aa(t,[ys,Bs]),e)},c.prototype.aggregateCategories=function(t){var e=[].concat(this.series),i=[];this._currentPointsCache={},this._seriesPointsCache=this._seriesPointsCache||{};for(var o=0;o<e.length;o++){var r,n,s=e[o];this.isTrendline(s)||(r=this.seriesCategoryAxis(s),n=this.findPane(r.options.pane),s=(ba(r.options.type,K)||s.categoryField)&&u(n,t)?this.aggregateSeries(s,r,r.currentRangeIndices()):this.filterSeries(s,r)),i.push(s)}this._seriesPointsCache=this._currentPointsCache,this._currentPointsCache=null,this.srcSeries=e,this.series=i},c.prototype.filterSeries=function(e,i){var o,t,r,n=(e.data||{}).length;return i._seriesMax=Math.max(i._seriesMax||0,n),k(i.options.min)||k(i.options.max)?(o=i.currentRangeIndices(),t=u(e.type,Rc),(r=O({},e)).data=(r.data||[]).slice(o.min,o.max+1),t&&Ea(r,o,n,function(t){return{item:e.data[t],category:i.categoryAt(t,!0),categoryIx:t-o.min}},function(t){return k(e.data[t])}),r):e},c.prototype.clearSeriesPointsCache=function(){this._seriesPointsCache={}},c.prototype.seriesSourcePoints=function(t,e){var i=t.index+";"+e.categoriesHash();if(this._seriesPointsCache&&this._seriesPointsCache[i])return this._currentPointsCache[i]=this._seriesPointsCache[i],this._seriesPointsCache[i];var o=e.options,r=o.srcCategories,n=ba(o.type,K),s=t.data,a=[];n||e.indexCategories();for(var l=0;l<s.length;l++){var h,p=Dn.current.bindPoint(t,l).fields.category;n&&(p=Ca(p,s[l],this.chartService.intl)),k(p)||(p=r[l]),k(p)&&null!==p&&(a[h=e.totalIndex(p)]=a[h]||{items:[],category:p},a[h].items.push(l))}return this._currentPointsCache[i]=a},c.prototype.aggregateSeries=function(t,o,r){if(!t.data.length)return t;for(var n=this.seriesSourcePoints(t,o),e=O({},t),s=new Op(O({},t),Dn.current,Bp.current),i=e.data=[],a=o.options.dataItems||[],l=function(t){var e=t-r.min,i=n[t];return(i=i||(n[t]={})).categoryIx=e,i.item||(e=o.categoryAt(t,!0),i.category=e,i.item=s.aggregatePoints(i.items,e)),i},h=r.min;h<=r.max;h++){var p=l(h);i[p.categoryIx]=p.item,p.items&&p.items.length&&(a[p.categoryIx]=p.item)}return u(e.type,Rc)&&Ea(e,r,o.totalCount(),l,function(t){return n[t]}),o.options.dataItems=a,e},c.prototype.appendChart=function(t,e){var i=t.options.series,o=this.seriesCategoryAxis(i[0]),r=o.options.categories,n=Math.max(0,_a(i)-r.length);if(0<n)for(r=o.options.categories=o.options.categories.slice(0);n--;)r.push("");this.valueAxisRangeTracker.update(t.valueAxisRanges),Ic.prototype.appendChart.call(this,t,e)},c.prototype.seriesPaneName=function(t){var e=this.options,i=t.axis,t=Nt([].concat(e.valueAxis),function(t){return t.name===i})[0],e=((e.panes||[{}])[0]||{}).name||"default";return(t||{}).pane||e},c.prototype.seriesCategoryAxis=function(t){var t=t.categoryAxis,e=t?this.namedCategoryAxes[t]:this.categoryAxis;if(e)return e;throw new Error("Unable to locate category axis with name "+t)},c.prototype.stackableChartOptions=function(t,e){var i=t.some(function(t){return t.stack}),o=t.some(function(t){return t.stack&&"100%"===t.stack.type}),e=e.options.clip;return{defaultStack:t[0].stack,isStacked:i,isStacked100:o,clip:e}},c.prototype.groupSeriesByCategoryAxis=function(t){for(var e=[],i={},o=0;o<t.length;o++){var r=t[o].categoryAxis||"$$default$$";je(i,r)||(i[r]=!0,e.push(r))}for(var n=[],s=0;s<e.length;s++){var a=((t,e,i)=>Nt(t,function(t){return 0===i&&!t.categoryAxis||t.categoryAxis===e}))(t,e[s],s);0!==a.length&&n.push(a)}return n},c.prototype.createBarChart=function(t,e){var i;0!==t.length&&(i=t[0],i=new gh(this,Object.assign({series:t,invertAxes:this.invertAxes,gap:i.gap,spacing:i.spacing},this.stackableChartOptions(t,e))),this.appendChart(i,e))},c.prototype.createRangeBarChart=function(t,e){var i;0!==t.length&&(i=t[0],t=new Dp(this,{series:t,invertAxes:this.invertAxes,gap:i.gap,spacing:i.spacing}),this.appendChart(t,e))},c.prototype.createBulletChart=function(t,e){var i;0!==t.length&&(i=t[0],t=new Kh(this,{series:t,invertAxes:this.invertAxes,gap:i.gap,spacing:i.spacing,clip:e.options.clip}),this.appendChart(t,e))},c.prototype.createLineChart=function(t,e){0!==t.length&&(t=new bl(this,Object.assign({invertAxes:this.invertAxes,series:t},this.stackableChartOptions(t,e))),this.appendChart(t,e))},c.prototype.createAreaChart=function(t,e){0!==t.length&&(t=new Bl(this,Object.assign({invertAxes:this.invertAxes,series:t},this.stackableChartOptions(t,e))),this.appendChart(t,e))},c.prototype.createRangeAreaChart=function(t,e){0!==t.length&&(t=new cc(this,{invertAxes:this.invertAxes,series:t,clip:e.options.clip}),this.appendChart(t,e))},c.prototype.createOHLCChart=function(t,e){var i;0!==t.length&&(i=t[0],t=new vc(this,{invertAxes:this.invertAxes,gap:i.gap,series:t,spacing:i.spacing,clip:e.options.clip}),this.appendChart(t,e))},c.prototype.createCandlestickChart=function(t,e){var i;0!==t.length&&(i=t[0],t=new bh(this,{invertAxes:this.invertAxes,gap:i.gap,series:t,spacing:i.spacing,clip:e.options.clip}),this.appendChart(t,e))},c.prototype.createBoxPlotChart=function(t,e){var i;0!==t.length&&(i=t[0],t=new Oh(this,{invertAxes:this.invertAxes,gap:i.gap,series:t,spacing:i.spacing,clip:e.options.clip}),this.appendChart(t,e))},c.prototype.createWaterfallChart=function(t,e){var i;0!==t.length&&(i=t[0],t=new Mc(this,{series:t,invertAxes:this.invertAxes,gap:i.gap,spacing:i.spacing}),this.appendChart(t,e))},c.prototype.axisRequiresRounding=function(t,e){for(var i=Aa(this.series,Vs),o=0;o<this.series.length;o++){var r,n=this.series[o];u(n.type,Ec)&&(r=n.line)&&r.style===os&&i.push(n)}for(var s=0;s<i.length;s++){var a=i[s].categoryAxis||"";if(a===t||!a&&0===e)return!0}},c.prototype.aggregatedAxis=function(t,e){for(var i=this.series,o=0;o<i.length;o++){var r=i[o].categoryAxis||"";if((r===t||!r&&0===e)&&i[o].categoryField)return!0}},c.prototype.createCategoryAxesLabels=function(){for(var t=this.axes,e=0;e<t.length;e++)t[e]instanceof Mr&&t[e].createLabels()},c.prototype.createCategoryAxes=function(t){for(var e=this.invertAxes,i=[].concat(this.options.categoryAxis),o=[],r=0;r<i.length;r++){var n=i[r];if(u(this.findPane(n.pane),t)){var s=n.name,a=n.categories,l=(void 0===a&&(a=[]),n=O({vertical:e,reverse:!e&&this.chartService.rtl,axisCrossingValue:e?rt:0},n),k(n.justified)||(n.justified=this.isJustified()),this.axisRequiresRounding(s,r)&&(n.justified=!1),void 0),l=new(Ma(n,a[0])?(n._forecast=this.trendlineAggregateForecast(),jr):Mr)(n,this.chartService);if(i[r].categories=l.options.srcCategories,s){if(this.namedCategoryAxes[s])throw new Error("Category axis with name "+s+" is already defined");this.namedCategoryAxes[s]=l}l.axisIndex=r,o.push(l),this.appendAxis(l)}}var h=this.categoryAxis||o[0];this.categoryAxis=h,e?this.axisY=h:this.axisX=h},c.prototype.isJustified=function(){for(var t=this.series,e=0;e<t.length;e++)if(!u(t[e].type,Ec))return!1;return!0},c.prototype.createValueAxes=function(t){var e=this.valueAxisRangeTracker,i=e.query(),o=[].concat(this.options.valueAxis),r=this.invertAxes,n={vertical:!r,reverse:r&&this.chartService.rtl},s=[];this.stack100&&(n.roundToMajorUnit=!1,n.labels={format:"P0"});for(var a=0;a<o.length;a++){var l=o[a];if(u(this.findPane(l.pane),t)){var h=l.name,p=ba(l.type,sa)?{min:.1,max:1}:{min:0,max:1},p=e.query(h)||i||p,p=(0===a&&p&&i&&(p.min=Math.min(p.min,i.min),p.max=Math.max(p.max,i.max)),new(ba(l.type,sa)?on:Xr)(p.min,p.max,O({},n,l),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},c.prototype._dispatchEvent=function(t,e,i){var o=t._eventCoordinates(e),r=new A(o.x,o.y),o=this.pointPane(r),n=[],s=[];if(o){for(var a=o.axes,l=0;l<a.length;l++){var h=a[l];h.getValue?ya(s,h.getValue(r)):ya(n,h.getCategory(r))}0===n.length&&ya(n,this.categoryAxis.getCategory(r)),0<n.length&&0<s.length&&t.trigger(i,{element:ae(e),originalEvent:e,category:Oa(n),value:Oa(s)})}},c.prototype.pointPane=function(t){for(var e=this.panes,i=0;i<e.length;i++){var o=e[i];if(o.contentBox.containsPoint(t))return o}},c.prototype.updateAxisOptions=function(t,e){Vc(this.options,t,e),Vc(this.originalOptions,t,e)},c.prototype._pointsByVertical=function(t,e){return void 0===e&&(e=0),this.invertAxes?this._siblingsBySeriesIndex(t.series.index,e):this._siblingsByPointIndex(t.getIndex())},c.prototype._pointsByHorizontal=function(t,e){return void 0===e&&(e=0),this.invertAxes?this._siblingsByPointIndex(t.getIndex()):(t=this._siblingsBySeriesIndex(t.series.index,e),this.chartService.rtl?t.reverse():t)},c.prototype._siblingsByPointIndex=function(e){for(var t=this.charts,i=[],o=0;o<t.length;o++){var r=t[o];r.pane&&"_navigator"===r.pane.options.name||(r=r.points.filter(function(t){return t&&!1!==t.visible&&t.getIndex()===e}),i.push.apply(i,r.sort(this._getSeriesCompareFn(r[0]))))}return i},c.prototype._siblingsBySeriesIndex=function(t,e){t=Ct(t+e,this.series.length);return this.pointsBySeriesIndex(t)},c.prototype._getSeriesCompareFn=function(t){t=this._isInStackedSeries(t);return t&&this.invertAxes||!t&&!this.invertAxes?function(t,e){return t.box.center().x-e.box.center().x}:function(t,e){return t.box.center().y-e.box.center().y}},c.prototype._isInStackedSeries=function(t){var e=u(t.series.type,[rs,Os,Ss,Es,ys,Bs,As,ws]),i=u(t.series.type,[ps,ns]);return e||i&&t.options.isStacked},c);function c(){Ic.apply(this,arguments)}function Vc(t,e,i){O([].concat(e instanceof Mr?t.categoryAxis:t.valueAxis)[e.axisIndex],i)}e(h,{categoryAxis:{},valueAxis:{}}),O(h.prototype,Pp);let jc=h,zc=((Bc=M.Class)&&(Dc.__proto__=Bc),((Dc.prototype=Object.create(Bc&&Bc.prototype)).constructor=Dc).prototype.destroy=function(){this._points=[]},Dc.prototype.show=function(t,e){var i=[].concat(t);this.hide();for(var o=0;o<i.length;o++){var r=i[o];r&&r.toggleHighlight&&r.hasHighlight()&&(this.togglePointHighlight(r,!0,e),this._points.push(r))}},Dc.prototype.togglePointHighlight=function(t,e,i){var o=(t.options.highlight||{}).toggle;o&&(o(o={category:t.category,series:t.series,dataItem:t.dataItem,value:t.value,stackValue:t.stackValue,preventDefault:Fc,visual:t.highlightVisual(),show:e}),o._defaultPrevented)||t.toggleHighlight(e,i)},Dc.prototype.hide=function(){for(var t=this._points;t.length;)this.togglePointHighlight(t.pop(),!1)},Dc.prototype.isHighlighted=function(t){for(var e=this._points,i=0;i<e.length;i++)if(t===e[i])return!0;return!1},Dc);function Dc(){Bc.call(this),this._points=[]}function Fc(){this._defaultPrevented=!0}let Hc=zc;function Nc(t,e){e=(e||"").toLowerCase(),t=t.event;return"none"===e&&!(t.ctrlKey||t.shiftKey||t.altKey)||t[e+"Key"]}function Uc(t){for(var e={},i=0;i<t.length;i++){var o=t[i];o.axis.options.name&&(e[o.axis.options.name]={min:o.range.min,max:o.range.max})}return e}(Gc=M.Class)&&(Jc.__proto__=Gc),((Jc.prototype=Object.create(Gc&&Gc.prototype)).constructor=Jc).prototype.start=function(t){return this._active=Nc(t,this.options.key),this._active},Jc.prototype.move=function(t){if(this._active){t=this.axisRanges=this._panAxes(t,y).concat(this._panAxes(t,v));if(t.length)return Uc(this.axisRanges=t)}},Jc.prototype.end=function(){var t=this._active;return this._active=!1,t},Jc.prototype.pan=function(){var t=this.plotArea,e=this.axisRanges;if(e.length){for(var i=0;i<e.length;i++){var o=e[i];t.updateAxisOptions(o.axis,o.range)}t.redraw(t.panes)}},Jc.prototype.destroy=function(){delete this.plotArea},Jc.prototype._panAxes=function(t,e){var i=this.plotArea,o=-t[e].delta,t=(this.options.lock||"").toLowerCase(),r=[];if(0!=o&&(t||"").toLowerCase()!==e)for(var n=i.axes,s=0;s<n.length;s++){var a,l=n[s];(e===y&&!l.options.vertical||e===v&&l.options.vertical)&&(a=l.pan(o))&&(a.limitRange=!0,r.push({axis:l,range:a}))}return r};var Gc,Wc,Xc,Yc,qc,Zc,Qc,Kc,$c,l=Jc;function Jc(t,e){Gc.call(this),this.plotArea=t,this.options=O({},this.options,e)}l.prototype.options={key:"none",lock:"none"};let tu=l,eu=((Wc=M.Class)&&(iu.__proto__=Wc),((iu.prototype=Object.create(Wc&&Wc.prototype)).constructor=iu).prototype.createElement=function(){var t=this._marquee=document.createElement("div"),e=(t.className="k-marquee",document.createElement("div"));e.className="k-marquee-color",t.appendChild(e)},iu.prototype.removeElement=function(){this._marquee.parentNode&&this._marquee.parentNode.removeChild(this._marquee)},iu.prototype.setStyles=function(t){Bt(this._marquee,t)},iu.prototype.start=function(t){if(Nc(t,this.options.key)){var e=this.chart,i=e._eventCoordinates(t),e=this._zoomPane=e._plotArea.paneByPoint(i),i=e?e.chartsBox().clone():null;if(e&&i)return e=this._elementOffset(),i.translate(e.left,e.top),this._zoomPaneClipBox=i,document.body.appendChild(this._marquee),this.setStyles({left:t.pageX+1,top:t.pageY+1,width:0,height:0}),!0}return!1},iu.prototype._elementOffset=function(){var t=this.chart.element,e=Bt(t,["paddingLeft","paddingTop"]),i=e.paddingLeft,e=e.paddingTop,t=re(t);return{left:i+t.left,top:e+t.top}},iu.prototype.move=function(t){this._zoomPane&&this.setStyles(this._selectionPosition(t))},iu.prototype.end=function(t){var e;if(this._zoomPane)return e=this._elementOffset(),(t=this._selectionPosition(t)).left-=e.left,t.top-=e.top,this._updateAxisRanges({x:t.left,y:t.top},{x:t.left+t.width,y:t.top+t.height}),this.removeElement(),delete this._zoomPane,Uc(this.axisRanges)},iu.prototype.zoom=function(){var t=this.axisRanges;if(t&&t.length){for(var e=this.chart._plotArea,i=0;i<t.length;i++){var o=t[i];e.updateAxisOptions(o.axis,o.range)}e.redraw(e.panes)}},iu.prototype.destroy=function(){this.removeElement(),delete this._marquee,delete this.chart},iu.prototype._updateAxisRanges=function(t,e){for(var i=(this.options.lock||"").toLowerCase(),o=[],r=this._zoomPane.axes,n=0;n<r.length;n++){var s=r[n],a=s.options.vertical;i===y&&!a||i===v&&a||!k(s.axisIndex)||(a=s.pointsRange(t,e))&&o.push({axis:s,range:a})}this.axisRanges=o},iu.prototype._selectionPosition=function(t){var e=this._zoomPaneClipBox,i={x:t.x.startLocation,y:t.y.startLocation},o=t.x.location,t=t.y.location,r=(this.options.lock||"").toLowerCase(),n=Math.min(i.x,o),s=Math.min(i.y,t),a=Math.abs(i.x-o),l=Math.abs(i.y-t);return r===y&&(n=e.x1,a=e.width()),r===v&&(s=e.y1,l=e.height()),o>e.x2&&(a=e.x2-i.x),o<e.x1&&(a=i.x-e.x1),t>e.y2&&(l=e.y2-i.y),t<e.y1&&(l=i.y-e.y1),{left:Math.max(n,e.x1),top:Math.max(s,e.y1),width:a,height:l}},iu);function iu(t,e){Wc.call(this),this.chart=t,this.options=O({},this.options,e),this.createElement()}eu.prototype.options={key:"shift",lock:"none"};let ou=eu,ru=((Xc=M.Class)&&(nu.__proto__=Xc),((nu.prototype=Object.create(Xc&&Xc.prototype)).constructor=nu).prototype.updateRanges=function(t,e){for(var i=(this.options.lock||"").toLowerCase(),o=[],r=this.chart._plotArea.axes,n=0;n<r.length;n++){var s=r[n],a=s.options.vertical;!(i===y&&!a||i===v&&a)&&s.zoomRange&&(a=x(this.options.rate,.01,.9),a=s.zoomRange(-t*a,e))&&o.push({axis:s,range:a})}return Uc(this.axisRanges=o)},nu.prototype.zoom=function(){var t=this.axisRanges,e=this.chart._plotArea;if(t&&t.length&&e.updateAxisOptions){for(var i=0;i<t.length;i++){var o=t[i];e.updateAxisOptions(o.axis,o.range)}e.redraw(e.panes)}},nu.prototype.destroy=function(){delete this.chart},nu);function nu(t,e){Xc.call(this),this.chart=t,this.options=O({rate:.3},this.options,e)}let su=ru,au=((Yc=o)&&(lu.__proto__=Yc),((lu.prototype=Object.create(Yc&&Yc.prototype)).constructor=lu).prototype.render=function(){var t=this.children,e=this.options,i=e.vertical;this.visual=new M.drawing.Layout(null,{spacing:i?0:e.spacing,lineSpacing:i?e.spacing:0,orientation:i?"vertical":gt,reverse:e.rtl,alignItems:i?e.rtl?J:pt:b});for(var o=0;o<t.length;o++){var r=t[o];r.reflow(new I),r.renderVisual()}},lu.prototype.reflow=function(t){this.visual.rect(t.toRect()),this.visual.reflow();t=this.visual.clippedBBox();this.box=t?mo(t):new I},lu.prototype.renderVisual=function(){this.addVisual()},lu.prototype.createVisual=function(){},lu);function lu(t,e){Yc.call(this,t),this.chartService=e}let hu=au,pu=((qc=oo)&&(cu.__proto__=qc),((cu.prototype=Object.create(qc&&qc.prototype)).constructor=cu).prototype.visualStyle=function(){var t=this.markerOptions(),e=t.border;return{stroke:{width:e.width,color:e.color,opacity:_(e.opacity,t.opacity),dashType:e.dashType},fill:{color:t.background,opacity:t.opacity},cursor:t.cursor}},cu.prototype.markerOptions=function(){return this.options},cu.prototype.markerHighlightOptions=function(){var t=this.markerOptions(),e=t.highlight.border.width;return O({},t,{background:t.border.color},t.highlight,t.type===Q?{background:t.highlight.border.color,border:{color:t.highlight.background,width:e/2},width:t.width,height:t.height,margin:{top:0,left:0}}:{})},cu.prototype.createHighlight=function(){var t=new qc(this.markerHighlightOptions()),e=this.paddingBox.clone();return t.reflow(e.pad(t.options.border.width)),this.highlight=[t.getElement()],this.highlight},cu);function cu(){qc.apply(this,arguments)}e(pu,{border:{width:2},width:8,height:8,background:a,margin:{top:-1,left:-1},vAlign:T,align:C,highlight:{width:10,height:10,border:{color:a,width:2}}});let uu=pu,du=((Zc=oo)&&(fu.__proto__=Zc),((fu.prototype=Object.create(Zc&&Zc.prototype)).constructor=fu).prototype.getElement=function(){var t=new M.drawing.Group,e=new M.drawing.MultiPath(this.visualStyle()),i=this.paddingBox,o=i.height()/2;return e.moveTo(i.x1,i.y1+o).lineTo(i.x1,i.y2).lineTo(i.x2,i.y2),t.append(e),t},fu);function fu(){Zc.apply(this,arguments)}e(du,{width:15,height:15,align:P,vAlign:S,margin:{right:-2,bottom:2}});let gu=du,yu=((Qc=oo)&&(vu.__proto__=Qc),((vu.prototype=Object.create(Qc&&Qc.prototype)).constructor=vu).prototype.getElement=function(){var t=new M.drawing.Group,e=new M.drawing.MultiPath({stroke:{color:this.options.border.color,opacity:this.options.opacity,width:this.options.height,dashType:this.options.dashType}}),i=this.paddingBox,o=i.center().y;return e.moveTo(i.x1,o).lineTo(i.x2,o),t.append(e),t},vu.prototype.createHighlight=function(){return this.highlight=[this.createHighlightLine(),this.createHighlightMarker()],this.highlight},vu.prototype.createHighlightLine=function(){var t=O({},{border:{color:this.options.border.color,opacity:this.options.border.opacity,dashType:this.options.border.dashType}},this.options.highlight),t=new gu(t);return t.reflow(this.parent.paddingBox.clone()),this.highlightLine=t.getElement(),this.highlightLine},vu.prototype.createHighlightMarker=function(){var t=O({},{background:this.options.background},this.options.highlight.markers),e=new Qc(t),i=this.parent.paddingBox,t=t.border.width,o=this.parent.box.clone();return o.pad({left:t-i.x1,top:t-i.y1}),e.reflow(o),this.highlightMarker=e.getElement(),this.highlightMarker},vu);function vu(){Qc.apply(this,arguments)}e(yu,{border:{width:0},type:"rect",align:C,vAlign:b,highlight:{border:{width:2},markers:{type:q,width:10,height:10,border:{width:2,color:a},align:C,vAlign:T}}});let mu=yu,xu=((Kc=oo)&&(_u.__proto__=Kc),((_u.prototype=Object.create(Kc&&Kc.prototype)).constructor=_u).prototype.createHighlight=function(){var t=O({},{background:this.options.background},this.options.highlight.markers),t=new Kc(t),e=this.paddingBox.clone(),i=this.parent.box.clone();return e.align(i,y,C),e.align(i,v,T),t.reflow(e),this.highlight=[t.getElement()],this.highlight},_u);function _u(){Kc.apply(this,arguments)}e(xu,{highlight:{markers:{type:q,width:10,height:10,border:{width:2,color:a},margin:{top:-3,left:-3}}}});let bu=xu,wu=(($c=Ji)&&(ku.__proto__=$c),((ku.prototype=Object.create($c&&$c.prototype)).constructor=ku).prototype.createContainer=function(){this.container=new uo({vertical:!1,wrap:!1,align:b,spacing:this.options.spacing}),this.append(this.container)},ku.prototype.createMarker=function(){this.markerWrap=new $c({vertical:!1,shrinkToFit:!0,wrap:!1,margin:1,width:22,height:22}),this.container.append(this.markerWrap),this.createMarkerArea(),this.options.markers.visible&&(this._marker=this._createMarker(),this.markerWrap.append(this._marker))},ku.prototype.createMarkerArea=function(){var t=this.options,e=t.markerColor,t=t.line,e={border:{color:(t=void 0===t?{}:t).color||e,opacity:t.opacity,dashType:t.dashType}};return this._createLine(e)||this._createMarkerLine(e,t)||this._createSquare()},ku.prototype.markerOptions=function(){var t=this.options,e=t.markers,i=t.markerColor,o=(e=void 0===e?{}:e).border;return void 0===o&&(o={}),e.zIndex=void 0,O({},e,{border:{color:o.color||i},highlight:t.highlight.markers})},ku.prototype._highlightOptions=function(){var t=this.options;return O({markers:{type:t.markers.type}},t.highlight)},ku.prototype._createLine=function(t){var e=this.options;return e.type!==ys||e.markers.visible||(this._line=new mu(O({},{background:e.markerColor,highlight:this._highlightOptions()},t,e.line)),this.markerWrap.append(this._line)),this._line},ku.prototype._createMarkerLine=function(t,e){return this.options.type===ys&&(this._markerLineArea=new gu(O({},{border:{width:e.height}},t)),this.markerWrap.append(this._markerLineArea)),this._markerLineArea},ku.prototype._reduceSize=function(t,e,i){void 0===i&&(i=.6),"number"==typeof t[e]&&(t[e]=t[e]*i)},ku.prototype._createSquare=function(){var t,e=this.options;return e.type===rs&&((t=e.pattern||(e.series||{}).pattern)&&("function"==typeof t&&(t=t(e.series)),t=Object.assign({},t),this._reduceSize(t,"gap"),this._reduceSize(t,"width"),this._reduceSize(t,"radius")),this._square=new bu(Object.assign({},{border:e.border,vAlign:e.markers.visible?S:b,highlight:this._highlightOptions()},e.area,{pattern:t,background:e.area.background||e.markerColor})),this.markerWrap.append(this._square)),this._square},ku.prototype._createMarker=function(){return new uu(this.markerOptions())},ku.prototype._highlightMarkers=function(){this.options.active&&this._toggleHighlight(!0)},ku.prototype._restoreMarkers=function(){this._toggleHighlight(!1)},ku.prototype._toggleHighlight=function(e){var t,i,o=this;this.options.highlight.visible&&((t=this._marker||this._square||this._line)&&t===this._line&&this._line.visual.visible(!e),t)&&((i=t.highlight)||(i=t.createHighlight()).forEach(function(t){return t&&o.markerWrap.appendVisual(t)}),i.forEach(function(t){return t&&t.visible(e)}))},ku.prototype.createLabel=function(){var t=this.options,e=O({},t.labels);this.container.append(new So(t.text,e))},ku.prototype.getAriaLabelText=function(){return this.options.text},ku.prototype.focusVisual=function(){this.visual.options.set("id",this._id),this.toggleFocusHighlight(!0),this._highlightMarkers()},ku.prototype.clearFocusFromVisual=function(){this.visual.options.set("id",""),this.toggleFocusHighlight(!1),this._restoreMarkers()},ku.prototype.renderComplete=function(){$c.prototype.renderComplete.call(this);var t=this.options.cursor||{},t=this._itemOverlay=M.drawing.Path.fromRect(this.container.box.toRect(),{fill:{color:a,opacity:0},stroke:null,cursor:t.style||t});this.appendVisual(t)},ku.prototype.click=function(t,e){var i=this.eventArgs(e);!t.trigger(Ns,i)&&e&&"contextmenu"===e.type&&e.preventDefault()},ku.prototype.over=function(t,e){e=this.eventArgs(e);return t.trigger("legendItemHover",e)||(t._legendItemHover(e.seriesIndex,e.pointIndex),this._highlightMarkers()),!0},ku.prototype.out=function(t,e){t._unsetActivePoint(),this._restoreMarkers(),t.trigger("legendItemLeave",this.eventArgs(e))},ku.prototype.eventArgs=function(t){var e=this.options;return{element:ae(t),text:e.text,series:e.series,seriesIndex:e.series.index,pointIndex:e.pointIndex}},ku.prototype.createVisual=function(){$c.prototype.createVisual.call(this);var t=this.options;this.options.visible&&(t=O({ariaLabel:void 0!==t.accessibility.ariaLabel?t.accessibility.ariaLabel:t.text},t.accessibility),to(this.visual,t))},ku.prototype.renderVisual=function(){var e=this,t=this.options,i=t.visual;i?(this.visual=i({active:t.active,series:t.series,sender:this.getSender(),pointIndex:t.pointIndex,options:{type:t.type,markers:O({background:this.options.markerColor},this.markerOptions()),labels:t.labels},createVisual:function(){e.createVisual(),e.renderChildren(),e.renderComplete();var t=e.visual;return delete e.visual,t}}),this._marker=this._markerLineArea=this._square=this._line=null,this.addVisual()):$c.prototype.renderVisual.call(this)},ku.prototype.createFocusHighlight=function(t){var e=t.stroke.width;return M.drawing.Path.fromRect(this.container.box.pad(e/2).toRect(),t)},ku);function ku(t){$c.call(this,t),this.createContainer(),t.rtl?(this.createLabel(),this.createMarker()):(this.createMarker(),this.createLabel()),this._id=Ue(),this.options.accessibility.ariaChecked=t.active}e(wu,{accessibility:{role:"checkbox",className:"k-chart-legend-item",ariaRoleDescription:"Legend item"},markers:{},highlight:{visible:!0,markers:{}}});let Au=wu;var Su,Cu,Pu="custom",h=((Su=o)&&(Tu.__proto__=Su),((Tu.prototype=Object.create(Su&&Su.prototype)).constructor=Tu).prototype.createContainers=function(){var t=this.options,e=t.position,i=t.align,o=e,r=b;e===Pu?o=C:u(e,[T,S])?(o=i===pt?C:i===J?P:b,r=e):i&&(i===pt?r=T:i===J&&(r=S)),this.container=new Ji({margin:t.margin,padding:t.padding,background:t.background,border:t.border,vAlign:r,align:o,zIndex:t.zIndex,shrinkToFit:!0}),this.hasTitle()?this.itemsContainer=new Ji({vAlign:r,align:o,zIndex:t.zIndex,shrinkToFit:!0}):this.itemsContainer=this.container,this.append(this.container)},Tu.prototype.createItems=function(){for(var t=this.getService(),e=this.options,i=this.isVertical(),o=new hu({vertical:i,spacing:e.spacing,rtl:t.rtl},t),r=e.data,n=(r=e.reverse?r.slice(0).reverse():r).length,s=0;s<n;s++){var a=r[s],l=a.series||{},h=l.markers,p=l.dashType,c=l.legendItem,l=l.opacity,h=O({visible:!1!==(h=void 0===h?{}:h).visible,type:q},h),h=(delete h.size,O({},{markers:h,labels:e.labels,rtl:t.rtl,line:Object.assign({},{dashType:p},e.line),area:Object.assign({},{opacity:l},e.area),opacity:l,accessibility:e.accessibility,focusHighlight:e.focusHighlight},e.item,c,a,{markers:e.markers}));o.append(new Au(h))}o.render(),this.itemsContainer.append(o)},Tu.prototype.isVertical=function(){var t=this.options,e=t.orientation,t=t.position;return t===Pu&&e!==gt||(k(e)?e!==gt:u(t,[C,P]))},Tu.prototype.hasItems=function(){return 0<this.container.children[0].children.length},Tu.prototype.getItems=function(){return this.itemsContainer.children[0].children},Tu.prototype.reflow=function(t){var e=this.options,t=t.clone();this.hasItems()?(e.position===Pu?(this.containerCustomReflow(t),this.box=t):this.containerReflow(t),this.hasTitle()&&this.title.reflow(new I(this.container.box.x1,this.title.box.y1,this.container.box.x2,this.title.box.y2))):this.box=t},Tu.prototype.containerReflow=function(t){var e=this.options,i=this.container,o=e.position,r=e.width,n=e.height,s=o===T||o===S?y:v,a=this.isVertical(),l=t.clone(),h=t.clone(),o=(o!==C&&o!==P||(h.y1=l.y1=0),a&&n?(h.y2=h.y1+n,h.align(l,v,i.options.vAlign)):!a&&r&&(h.x2=h.x1+r,h.align(l,y,i.options.align)),i.reflow(h),(h=i.box).clone());(e.offsetX||e.offsetY)&&(h.translate(e.offsetX,e.offsetY),i.reflow(h)),o[s+1]=t[s+1],o[s+2]=t[s+2],this.box=o},Tu.prototype.containerCustomReflow=function(t){var e=this.options,i=this.container,o=e.offsetX,r=e.offsetY,n=e.width,e=e.height,s=this.isVertical(),t=t.clone();s&&e?t.y2=t.y1+e:!s&&n&&(t.x2=t.x1+n),i.reflow(t),t=i.box,i.reflow(new I(o,r,o+t.width(),r+t.height()))},Tu.prototype.renderVisual=function(){this.hasItems()&&Su.prototype.renderVisual.call(this)},Tu.prototype.createLegendTitle=function(t){var e=O({},{color:Y,position:T,align:b},t),i=e.text;t&&!1!==t.visible&&t.text&&(k(e)&&e.visible&&((t=jt(e))?i=t({text:i}):e.format&&(i=this.chartService.format.auto(e.format,i))),this.title=new So(i,e),this.createTitleLayout(),this.appendTitleLayoutContent())},Tu.prototype.createTitleLayout=function(){this.layout=new uo({vertical:!0,wrap:!1}),this.container.append(this.layout)},Tu.prototype.hasTitle=function(){return Boolean(this.options.title&&!1!==this.options.title.visible&&this.options.title.text)},Tu.prototype.appendTitleLayoutContent=function(){this.options.title.position===S?(this.layout.append(this.itemsContainer),this.layout.append(this.title)):(this.layout.append(this.title),this.layout.append(this.itemsContainer))},Tu);function Tu(t,e){void 0===e&&(e={}),Su.call(this,t),this.chartService=e,u(this.options.position,[T,P,S,C,Pu])||(this.options.position=P),this.createContainers(),this.createLegendTitle(t.title),this.createItems()}e(h,{position:P,data:[],offsetX:0,offsetY:0,margin:w(2),padding:w(5),border:{color:Y,width:0},item:{cursor:ft,spacing:6},spacing:6,background:"",zIndex:1,markers:{},line:{width:20,height:2,cursor:ft,opacity:1},area:{type:"square",align:P,width:15,height:15}});let Mu=h,Ou=((Cu=M.Class)&&(Lu.__proto__=Cu),((Lu.prototype=Object.create(Cu&&Cu.prototype)).constructor=Lu).prototype.register=function(t,e){this._registry.push({type:t,seriesTypes:e})},Lu.prototype.create=function(t,e,i){for(var o=this._registry,r=o[0],n=0;n<o.length;n++){var s=o[n],a=Aa(t,s.seriesTypes),l=Aa(t,Hs);if(0<a.length-l.length){r=s;break}}return new r.type(a,e,i)},Lu);function Lu(){Cu.call(this),this._registry=[]}Ou.current=new Ou;let Iu=Ou;function Bu(t){var e=document.createElement("div");return t&&(e.className=t),e}function Eu(t){for(var e=t;e&&!Ut(e,"k-handle");)e=e.parentNode;return e}(Ru=M.Class)&&(Du.__proto__=Ru),((Du.prototype=Object.create(Ru&&Ru.prototype)).constructor=Du).prototype.onPane=function(t){return this.categoryAxis.pane===t},Du.prototype.createElements=function(){var t=this.options,e=this.wrapper=Bu("k-selector k-pointer-events-none"),i=(Bt(e,{top:t.offset.top,left:t.offset.left,width:t.width,height:t.height,direction:"ltr"}),this.selection=Bu("k-selection k-pointer-events-none")),o=(this.leftMask=Bu("k-mask k-pointer-events-none"),this.rightMask=Bu("k-mask k-pointer-events-none"),e.appendChild(this.leftMask),e.appendChild(this.rightMask),e.appendChild(i),this.body=Bu("k-selection-bg k-pointer-events-none")),o=(i.appendChild(o),this.leftHandle=Bu("k-handle k-left-handle k-pointer-events-auto")),r=this.rightHandle=Bu("k-handle k-right-handle k-pointer-events-auto"),i=(o.appendChild(Bu()),r.appendChild(Bu()),i.appendChild(o),i.appendChild(r),this.chartElement.appendChild(e),Bt(i,["borderLeftWidth","borderRightWidth","height"])),n=Bt(o,"height").height,s=Bt(r,"height").height;t.selection={border:{left:i.borderLeftWidth,right:i.borderRightWidth}},Bt(o,{top:(i.height-n)/2}),Bt(r,{top:(i.height-s)/2}),e.style.cssText=e.style.cssText},Du.prototype.bindEvents=function(){var t;!1!==this.options.mousewheel&&(this._mousewheelHandler=this._mousewheel.bind(this),ie(this.chartElement,((t={})[ha]=this._mousewheelHandler,t))),this._domEvents=Yo.create(this.chartElement,{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)})},Du.prototype.initOptions=function(){var t=this.options,e=this.categoryAxis.pane.chartsBox(),i=this.chart.chartService.intl,i=(this._dateAxis&&O(t,{min:Sr(i,t.min),max:Sr(i,t.max),from:Sr(i,t.from),to:Sr(i,t.to)}),Bt(this.chartElement,["paddingLeft","paddingTop"])),o=i.paddingLeft,i=i.paddingTop;this.options=O({},{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)},Du.prototype.destroy=function(){var t;this._domEvents&&(this._domEvents.destroy(),delete this._domEvents),clearTimeout(this._mwTimeout),this._state=null,this.wrapper&&(this._mousewheelHandler&&(ue(this.chartElement,((t={})[ha]=this._mousewheelHandler,t)),this._mousewheelHandler=null),this.chartElement.removeChild(this.wrapper),this.wrapper=null)},Du.prototype._rangeEventArgs=function(t){return{axis:this.categoryAxis.options,from:this._value(t.from),to:this._value(t.to)}},Du.prototype._pointInPane=function(t,e){var i=this.categoryAxis.pane.box,t=this.chart._toModelCoordinates(t,e);return i.containsPoint(t)},Du.prototype._start=function(t){var e,i,o=this.options,r=ae(t);!this._state&&r&&(e=se(t),this._pointInPane(e.x,e.y))&&(r=Eu(r),i=this.body.getBoundingClientRect(),e=!r&&e.x>=i.x&&e.x<=i.x+i.width&&e.y>=i.y&&e.y<=i.y+i.height,this.chart._unsetActivePoint(),this._state={moveTarget:r,startLocation:t.x?t.x.location:0,inBody:e,range:{from:this._index(o.from),to:this._index(o.to)}},i=this._rangeEventArgs({from:this._index(o.from),to:this._index(o.to)}),this.trigger(ea,i))&&(this._state=null)},Du.prototype._press=function(t){(t=this._state?this._state.moveTarget:Eu(ae(t)))&&vt(t,"k-handle-active")},Du.prototype._move=function(t){var e,i,o,r,n,s,a,l,h,p,c,u;this._state&&(e=this._state,a=this.options,c=this.categoryAxis,i=e.range,u=e.moveTarget,o=c.options.reverse,r=this._index(a.from),n=this._index(a.to),s=this._index(a.min),a=this._index(a.max),t=e.startLocation-t.x.location,l=i.from,h=i.to,p=i.to-i.from,c=Bt(this.wrapper,"width").width/(c.categoriesCount()-1),t=Math.round(t/c)*(o?-1:1),u||e.inBody)&&(c=u&&Ut(u,"k-left-handle"),u=u&&Ut(u,"k-right-handle"),e.inBody?(i.from=Math.min(Math.max(s,r-t),a-p),i.to=Math.min(i.from+p,a)):c&&!o||u&&o?(i.from=Math.min(Math.max(s,r-t),a-1),i.to=Math.max(i.from+1,i.to)):(c&&o||u&&!o)&&(i.to=Math.min(Math.max(s+1,n-t),a),i.from=Math.min(i.to-1,i.from)),i.from===l&&i.to===h||(this.move(i.from,i.to),this.trigger(ia,this._rangeEventArgs(i))))},Du.prototype._end=function(){var t;this._state&&((t=this._state.moveTarget)&&xt(t,"k-handle-active"),t=this._state.range,this.set(t.from,t.to),this.trigger(oa,this._rangeEventArgs(t)),delete this._state)},Du.prototype._tap=function(t){var e=this.options,i=this.categoryAxis,o=this.chart._eventCoordinates(t),o=i.pointCategoryIndex(new A(o.x,i.box.y1)),r=this._index(e.from),n=this._index(e.to),s=this._index(e.min),e=this._index(e.max),n=n-r,a={},l=3===t.event.which,o=Math.round(r+n/2-o);this._state||l||(this.chart._unsetActivePoint(),i.options.justified||o--,a.from=Math.min(Math.max(s,r-o),e-n),a.to=Math.min(a.from+n,e),this._start(t),this._state&&(this._state.range=a,this.trigger(ia,this._rangeEventArgs(a)),this._end()))},Du.prototype._mousewheel=function(t){var e,i=this,o=Jt(t);this._start(t),this._state&&(e=this._state.range,t.preventDefault(),t.stopPropagation(),1<Math.abs(o)&&(o*=3),this.options.mousewheel.reverse&&(o*=-1),this.expand(o)&&this.trigger(ia,{axis:this.categoryAxis.options,delta:o,originalEvent:t,from:this._value(e.from),to:this._value(e.to)}),this._mwTimeout&&clearTimeout(this._mwTimeout),this._mwTimeout=setTimeout(function(){i._end()},150))},Du.prototype._gesturestart=function(t){var e=this.options,i=t.touches[0];this._pointInPane(i.pageX,i.pageY)&&(this._state={range:{from:this._index(e.from),to:this._index(e.to)}},i=this._rangeEventArgs(this._state.range),this.trigger(ea,i)?this._state=null:t.preventDefault())},Du.prototype._gestureend=function(){this._state&&(this.trigger(oa,this._rangeEventArgs(this._state.range)),delete this._state)},Du.prototype._gesturechange=function(t){var e,i,o,r,n,s;this._state&&(r=this.chart,o=this._state,e=this.options,i=this.categoryAxis,o=o.range,s=r._toModelCoordinates(t.touches[0].x.location).x,r=r._toModelCoordinates(t.touches[1].x.location).x,n=Math.min(s,r),s=Math.max(s,r),t.preventDefault(),o.from=i.pointCategoryIndex(new A(n))||e.min,o.to=i.pointCategoryIndex(new A(s))||e.max,this.move(o.from,o.to),this.trigger(ia,this._rangeEventArgs(o)))},Du.prototype._index=function(t){var e=t;return e=t instanceof Date?this.categoryAxis.categoryIndex(t):e},Du.prototype._value=function(t){var e=t;return e=this._dateAxis&&(e=this.categoryAxis.categoryAt(t))>this.options.max?this.options.max:e},Du.prototype._slot=function(t){var e=this.categoryAxis,t=this._index(t);return e.getSlot(t,t,!0)},Du.prototype.move=function(t,e){var i=this.options,o=this.categoryAxis.options.reverse,r=i.offset,n=i.padding,s=i.selection.border,a=o?t:e,l="x"+(o?2:1),o=this._slot(o?e:t),e=L(o[l]-r.left+n.left),t=(Bt(this.leftMask,{width:e}),Bt(this.selection,{left:e}),o=this._slot(a),L(i.width-(o[l]-r.left+n.left))),a=(Bt(this.rightMask,{width:t}),i.width-t);a!==i.width&&(a+=s.right),Bt(this.rightMask,{left:a}),Bt(this.selection,{width:Math.max(i.width-(e+t)-s.right,0)})},Du.prototype.set=function(t,e){var i=this.options,o=this._index(i.min),r=this._index(i.max),t=x(this._index(t),o,r),o=x(this._index(e),t+1,r);i.visible&&this.move(t,o),i.from=this._value(t),i.to=this._value(o)},Du.prototype.expand=function(t){var e=this.options,i=this._index(e.min),o=this._index(e.max),r=e.mousewheel.zoom,n=this._index(e.from),e=this._index(e.to),s={from:n,to:e},a=O({},s);if(this._state&&(s=this._state.range),r!==P&&(s.from=x(x(n-t,0,e-1),i,o)),r!==C&&(s.to=x(x(e+t,s.from+1,o),i,o)),s.from!==a.from||s.to!==a.to)return this.set(s.from,s.to),!0},Du.prototype.zoom=function(t,e){var i=this.options,o=this._index(i.min),r=this._index(i.max),n=this._index(i.from),i=this._index(i.to),s={from:n,to:i},a=O({},s),l=this.categoryAxis.options.reverse,l=y+(l?"2":"1"),h=this.categoryAxis.lineBox(),l=Math.abs(h[l]-e.x),e=h.width(),h=L(l/e,2),l=L(h*t),e=L((1-h)*t);if((s=this._state?this._state.range:s).from=x(x(n-l,0,i-1),o,r),s.to=x(x(i+e,s.from+1,r),o,r),s.from!==a.from||s.to!==a.to)return this.set(s.from,s.to),!0},Du.prototype.trigger=function(t,e){return(this.observer||this.chart).trigger(t,e)};var Ru,Vu,ju,zu,l=Du;function Du(t,e,i,o){Ru.call(this);var r=t.element;this.options=O({},this.options,i),this.chart=t,this.observer=o,this.chartElement=r,this.categoryAxis=e,this._dateAxis=this.categoryAxis instanceof jr,this.initOptions(),this.visible=this.options.visible&&r.offsetHeight,this.visible&&(this.createElements(),this.set(this._index(this.options.from),this._index(this.options.to)),this.bindEvents())}e(l,{visible:!0,mousewheel:{zoom:"both"},min:nt,max:rt});let Fu=l,Hu=((Vu=gl)&&(Nu.__proto__=Vu),((Nu.prototype=Object.create(Vu&&Vu.prototype)).constructor=Nu).prototype.show=function(t){var e,i;!t||!t.tooltipAnchor||this._current&&this._current===t||(e=O({},this.options,t.options.tooltip),(i=t.tooltipAnchor())?(this._current=t,Vu.prototype.show.call(this,{point:t,anchor:i},e,t)):this.hide())},Nu.prototype.hide=function(){delete this._current,Vu.prototype.hide.call(this)},Nu);function Nu(){Vu.apply(this,arguments)}let Uu=Hu,Gu=((ju=gl)&&(Wu.__proto__=ju),((Wu.prototype=Object.create(ju&&ju.prototype)).constructor=Wu).prototype.showAt=function(t,e){var i,o=Nt(t,function(t){t=t.series.tooltip;return!t||!1!==t.visible});0<o.length&&(o=o[0],i=this.plotArea.categoryAxis.getSlot(o.categoryIx),e=e?this._slotAnchor(e,i):this._defaultAnchor(o,i),this.show({anchor:e,shared:!0,points:t,category:o.category,categoryText:this.formatService.auto(this.options.categoryFormat,o.category),series:this.plotArea.series},this.options))},Wu.prototype._slotAnchor=function(t,e){return this.plotArea.categoryAxis.options.vertical||(t.x=e.center().x),{point:t,align:{horizontal:"left",vertical:"center"}}},Wu.prototype._defaultAnchor=function(t,e){var t=t.owner.pane.chartsBox(),i=this.plotArea.categoryAxis.options.vertical,t=t.center(),e=e.center();return{point:i?new A(t.x,e.y):new A(e.x,t.y),align:{horizontal:"center",vertical:"center"}}},Wu);function Wu(t,e){ju.call(this,t.chartService,e),this.plotArea=t,this.formatService=t.chartService.format}e(Gu,{categoryFormat:"{0:d}"});let Xu=Gu,Yu=((zu=M.drawing.Animation)&&(qu.__proto__=zu),((qu.prototype=Object.create(zu&&zu.prototype)).constructor=qu).prototype.setup=function(){var t,e=this.element,i=this.options;e.bbox()?(this.origin=i.origin,i=i.vertical?v:y,(t=this.fromScale=new M.geometry.Point(1,1))[i]=Zn,e.transform(M.geometry.transform().scale(t.x,t.y))):this.abort()},qu.prototype.step=function(t){var e=Xt(this.fromScale.x,1,t),t=Xt(this.fromScale.y,1,t);this.element.transform(M.geometry.transform().scale(e,t,this.origin))},qu.prototype.abort=function(){zu.prototype.abort.call(this),this.element.transform(null)},qu);function qu(){zu.apply(this,arguments)}e(Yu,{duration:Yn}),M.drawing.AnimationFactory.current.register(ns,Yu);(Zu=M.drawing.Animation)&&(Qu.__proto__=Zu),((Qu.prototype=Object.create(Zu&&Zu.prototype)).constructor=Qu).prototype.setup=function(){var t=this.center=this.element.bbox().center();this.element.transform(M.geometry.transform().scale(Zn,Zn,t))},Qu.prototype.step=function(t){this.element.transform(M.geometry.transform().scale(t,t,this.center))};var Zu,h=Qu;function Qu(){Zu.apply(this,arguments)}e(h,{easing:"easeOutElastic"}),M.drawing.AnimationFactory.current.register(as,h);(Ku=M.drawing.Animation)&&($u.__proto__=Ku),(($u.prototype=Object.create(Ku&&Ku.prototype)).constructor=$u).prototype.setup=function(){this.fadeTo=this.element.opacity(),this.element.opacity(0)},$u.prototype.step=function(t){this.element.opacity(t*this.fadeTo)};var Ku,l=$u;function $u(){Ku.apply(this,arguments)}e(l,{duration:200,easing:"linear"}),M.drawing.AnimationFactory.current.register(qn,l);(Ju=M.drawing.Animation)&&(id.__proto__=Ju),((id.prototype=Object.create(Ju&&Ju.prototype)).constructor=id).prototype.setup=function(){this.element.transform(M.geometry.transform().scale(Zn,Zn,this.options.center))},id.prototype.step=function(t){this.element.transform(M.geometry.transform().scale(t,t,this.options.center))};var Ju,td,ed,gl=id;function id(){Ju.apply(this,arguments)}e(gl,{easing:"easeOutElastic",duration:Yn}),M.drawing.AnimationFactory.current.register(ms,gl);let od=gl,rd=((td=Vh)&&(nd.__proto__=td),((nd.prototype=Object.create(td&&td.prototype)).constructor=nd).prototype.render=function(){td.prototype.render.call(this),this.renderSegments()},nd.prototype.createSegment=function(t,e,i){return new(e.style===is?rl:qa)(t,e,i)},nd.prototype.animationPoints=function(){return td.prototype.animationPoints.call(this).concat(this._segments)},nd.prototype.createMissingValue=function(t,e){if(e===$n)return Ta((e={x:t.x,y:t.y}).x)||(e.x=0),Ta(e.y)||(e.y=0),e},nd);function nd(){td.apply(this,arguments)}O(rd.prototype,Ja);function sd(t,e,i){var o=[],r=e.xMin,n=e.xMax,e=((e=(i||{}).forecast)&&(0<e.before&&(r-=e.before),0<e.after)&&(n+=e.after),(i||{}).samplingInterval),s=_(e,Bi(r,n)/10);e<=0&&(s=n-r);for(var a=r;a<=n;a+=s)o.push([a,t(a)]);return o}function ad(e){return function(t){t=t.valueFields;return{xValue:t.x,yValue:t[e]}}}function ld(t,e){for(var i=Number.MAX_VALUE,o=Number.MIN_VALUE,r=0;r<t.length;r++){var n=e(t[r]),s=n.xValue,n=n.yValue;isFinite(s)&&null!==s&&isFinite(n)&&null!==n&&(i=Math.min(s,i),o=Math.max(s,o))}return{xMin:i,xMax:o}}let hd=rd,pd={exponentialTrendline:function(t){var e,i,o,r,n,s,a=t.options,t=(s=(t={seriesValues:t.seriesValues,options:a}).options,t=(0,t.seriesValues)(),Sc(t,s.field)&&(i=(t=Ac(t,(e=s.field,function(t){t=t.valueFields;return{xValue:t.x,yValue:Math.log(t[e])}}))).slope,o={xMin:t.xMin,xMax:t.xMax},0<t.count)?(r=Math.exp(t.intercept),n=i,sd(function(t){return r*Math.exp(n*t)},o,s.trendline)):null);return t?Object.assign({},a,{type:"scatterLine",data:t}):null},linearTrendline:function(t){var e,i,o,r,n,s=t.options,t=(e=(t={seriesValues:t.seriesValues,options:s}).options,t=Ac((0,t.seriesValues)(),ad(e.field)),i=t.slope,o=t.intercept,r=t.xMin,n=t.xMax,0<t.count?sd(function(t){return i*t+o},{xMin:r,xMax:n},e.trendline):null);return t?Object.assign({},s,{type:"scatterLine",data:t}):null},logarithmicTrendline:function(t){var e,i,o,r,n,s,a,l=t.options,h=(a=(t={seriesValues:t.seriesValues,options:l}).options,t=(0,t.seriesValues)(),Sc(t,"x")&&(i=(h=Ac(t,(e=a.field,function(t){t=t.valueFields;return{xValue:Math.log(t.x),yValue:t[e]}}))).slope,o=h.intercept,h=h.count,t=ld(t,(r=a.field,function(t){t=t.valueFields;return{xValue:t.x,yValue:t[r]}})),0<h)?(n=i,s=o,sd(function(t){return n*Math.log(t)+s},t,a.trendline)):null);return h?Object.assign({},l,{type:"scatterLine",data:h}):null},movingAverageTrendline:function(t){var e,i=t.options,o=(o=t.options,t=t.seriesValues,e=(o.trendline||{}).period||2,0<(t=Pc(t({before:e,after:e}),ad(o.field),e)).length?t:null);return o?Object.assign({},i,{type:"scatterLine",data:o}):null},polynomialTrendline:function(t){var e,i,o,r=t.options,n=(e=(t={seriesValues:t.seriesValues,options:r}).seriesValues,i=((t=t.options).trendline||{}).order,n=ad(t.field),e=Tc(e(),n,i),n=e.count,i=e.valueMapper,o=e.xMin,e=e.xMax,0<n?sd(i,{xMin:o,xMax:e},t.trendline):null);return n?Object.assign({},r,{type:"scatterLine",data:n}):null},powerTrendline:function(t){var e,i,o,r,n,s,a=t.options,l=(s=(t={seriesValues:t.seriesValues,options:a}).options,t=(0,t.seriesValues)(),Sc(t,"x")&&(i=(l=Ac(t,(e=s.field,function(t){t=t.valueFields;return{xValue:Math.log(t.x),yValue:Math.log(t[e])}}))).slope,o=l.intercept,l=l.count,t=ld(t,ad(s.field)),0<l)?(r=Math.exp(o),n=i,sd(function(t){return r*Math.pow(t,n)},t,s.trendline)):null);return l?Object.assign({},a,{type:"scatterLine",data:l}):null}},cd=pd,ud=((ed=Sp)&&(dd.__proto__=ed),((dd.prototype=Object.create(ed&&ed.prototype)).constructor=dd).prototype.initFields=function(){this.namedXAxes={},this.namedYAxes={},this.xAxisRangeTracker=new Vl,this.yAxisRangeTracker=new Vl},dd.prototype.render=function(t){void 0===t&&(t=this.panes),this.series=[].concat(this.originalSeries),this.createTrendlineSeries();for(var e=this.groupSeriesByPane(),i=0;i<t.length;i++){var o=t[i],r=e[o.options.name||"default"]||[],r=(this.addToLegend(r),this.filterVisibleSeries(r));r&&(this.createScatterChart(Aa(r,Ts),o),this.createScatterLineChart(Aa(r,Ms),o),this.createBubbleChart(Aa(r,as),o))}this.createAxes(t)},dd.prototype.appendChart=function(t,e){this.xAxisRangeTracker.update(t.xAxisRanges),this.yAxisRangeTracker.update(t.yAxisRanges),ed.prototype.appendChart.call(this,t,e)},dd.prototype.removeAxis=function(t){var e=t.options.name;ed.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},dd.prototype.seriesPaneName=function(t){var e=this.options,i=t.xAxis,o=Nt([].concat(e.xAxis),function(t){return t.name===i})[0],r=t.yAxis,t=Nt([].concat(e.yAxis),function(t){return t.name===r})[0],e=(e.panes||[{}])[0].name||"default";return(o||{}).pane||(t||{}).pane||e},dd.prototype.createScatterChart=function(t,e){0<t.length&&this.appendChart(new Vh(this,{series:t,clip:e.options.clip}),e)},dd.prototype.createScatterLineChart=function(t,e){0<t.length&&this.appendChart(new hd(this,{series:t,clip:e.options.clip}),e)},dd.prototype.createBubbleChart=function(t,e){0<t.length&&this.appendChart(new Nh(this,{series:t,clip:e.options.clip}),e)},dd.prototype.createXYAxis=function(t,e,i){for(var o,r=t.name,n=e?this.namedYAxes:this.namedXAxes,s=e?this.yAxisRangeTracker:this.xAxisRangeTracker,a=O({reverse:!e&&this.chartService.rtl},t,{vertical:e}),t=ba(a.type,sa),l=s.query(),h=t?{min:.1,max:1}:{min:0,max:1},s=s.query(r)||l||h,p=[a.min,a.max],c=this.series,u=0;u<c.length;u++){var d=c[u],f=d[e?"yAxis":"xAxis"];if(f===a.name||0===i&&!f){f=Dn.current.bindPoint(d,0).valueFields;p.push(f[e?"y":"x"]);break}}0===i&&l&&(s.min=Math.min(s.min,l.min),s.max=Math.max(s.max,l.max));for(var g=0;g<p.length;g++)if(p[g]instanceof Date){o=!0;break}h=new(ba(a.type,K)||!a.type&&o?Zr:t?on:Xr)(s.min,s.max,a,this.chartService);if(h.axisIndex=i,r){if(n[r])throw new Error((e?"Y":"X")+" axis with name "+r+" is already defined");n[r]=h}return this.appendAxis(h),h},dd.prototype.createAxes=function(t){for(var e=this.options,i=[].concat(e.xAxis),o=[],r=[].concat(e.yAxis),n=[],s=0;s<i.length;s++)u(this.findPane(i[s].pane),t)&&o.push(this.createXYAxis(i[s],!1,s));for(var a=0;a<r.length;a++)u(this.findPane(r[a].pane),t)&&n.push(this.createXYAxis(r[a],!0,a));this.axisX=this.axisX||o[0],this.axisY=this.axisY||n[0]},dd.prototype._dispatchEvent=function(t,e,i){for(var o=t._eventCoordinates(e),r=new A(o.x,o.y),n=this.axes,s=n.length,a=[],l=[],h=0;h<s;h++){var p=n[h],c=p.options.vertical?l:a,p=p.getValue(r);null!==p&&c.push(p)}0<a.length&&0<l.length&&t.trigger(i,{element:ae(e),originalEvent:e,x:Oa(a),y:Oa(l)})},dd.prototype.updateAxisOptions=function(t,e){var i=t.options.vertical,o=this.groupAxes(this.panes),o=(i?o.y:o.x).indexOf(t);fd(this.options,o,i,e),fd(this.originalOptions,o,i,e)},dd.prototype.trendlineFactory=function(t,e){var i=this.seriesValues.bind(this,e.index),t=kc(cd,t.type,{options:t,seriesValues:i});return t&&(t.xAxis=e.xAxis,t.yAxis=e.yAxis),t},dd.prototype.seriesValues=function(t){for(var e=[],i=this.series[t],o=0;o<i.data.length;o++){var r=this.bindPoint(i,o);e.push({pointIx:o,valueFields:r.valueFields})}return e},dd);function dd(){ed.apply(this,arguments)}function fd(t,e,i,o){O([].concat(i?t.yAxis:t.xAxis)[e],o)}e(ud,{xAxis:{},yAxis:{}}),O(ud.prototype,Pp);let gd=ud;(yd=o)&&(Sd.__proto__=yd),((Sd.prototype=Object.create(yd&&yd.prototype)).constructor=Sd).prototype.render=function(){this._rendered||!1===this.visible||(this._rendered=!0,this.createLabel())},Sd.prototype.createLabel=function(){var t=this.options.labels,e=this.owner.chartService,i=this.getLabelText(t);t.visible&&(i||0===i)&&(t.position===b||t.position===aa?(t.color||(t.color=Me(this.options.color)),t.background||(t.background=this.options.color)):(e=e.theme.seriesDefaults.labels,t.color=t.color||e.color,t.background=t.background||e.background),this.label=new So(i,O({},t,{align:b,vAlign:"",animation:{type:qn,delay:this.animationDelay}}),this.pointData()),this.append(this.label))},Sd.prototype.getLabelText=function(t){var e=jt(t);return e?e(this.pointData()):this.owner.chartService.format.auto(t.format,this.value)},Sd.prototype.reflow=function(t){this.render(),this.box=t,this.reflowLabel()},Sd.prototype.reflowLabel=function(){var t,e,i,o,r=this.options.labels,n=this.label,s=this.sector.clone(),a=r.distance,l=s.middle();n&&(e=n.box.height(),i=n.box.width(),r.position===b?(s.radius=Math.abs((s.radius-e)/2)+e,t=s.point(l),n.reflow(new I(t.x,t.y-e/2,t.x,t.y))):r.position===aa?(s.radius=s.radius-e/2,t=s.point(l),n.reflow(new I(t.x,t.y-e/2,t.x,t.y))):((t=s.clone().expand(a).point(l)).x>=s.center.x?(o=t.x+i,n.orientation=P):(o=t.x-i,n.orientation=C),n.reflow(new I(o,t.y-e,t.x,t.y))))},Sd.prototype.createVisual=function(){var t,e=this,i=this.sector,o=this.options;yd.prototype.createVisual.call(this),this.addAccessibilityAttributesToVisual(),this.value&&(o.visual?(t=(i.startAngle+180)%360,(t=o.visual({category:this.category,dataItem:this.dataItem,value:this.value,series:this.series,percentage:this.percentage,center:new M.geometry.Point(i.center.x,i.center.y),radius:i.radius,innerRadius:i.innerRadius,startAngle:t,endAngle:t+i.angle,options:o,sender:this.getSender(),createVisual:function(){var t=new M.drawing.Group;return e.createSegmentVisual(t),t}}))&&this.visual.append(t)):this.createSegmentVisual(this.visual))},Sd.prototype.createSegmentVisual=function(t){var e=this.sector,i=this.options,o=i.border||{},o=0<o.width?{stroke:{color:o.color,width:o.width,opacity:o.opacity,dashType:o.dashType}}:{},r=i.color,n=Qi(i.pattern,{color:r,opacity:i.opacity}),o=this.createSegment(e,O({fill:n,stroke:{opacity:i.opacity},zIndex:i.zIndex},o));t.append(o),Pa(i)&&t.append(this.createGradientOverlay(o,{baseColor:r,fallbackFill:n},O({center:[e.center.x,e.center.y],innerRadius:e.innerRadius,radius:e.radius,userSpace:!0},i.overlay)))},Sd.prototype.createSegment=function(t,e){return e.singleSegment?new M.drawing.Circle(new M.geometry.Circle(new M.geometry.Point(t.center.x,t.center.y),t.radius),e):Xi.current.createRing(t,e)},Sd.prototype.createAnimation=function(){var t=this.options,e=this.sector.center;O(t,{animation:{center:[e.x,e.y],delay:this.animationDelay}}),yd.prototype.createAnimation.call(this)},Sd.prototype.createHighlight=function(t){var e=this.options.highlight||{},i=e.border||{};return this.createSegment(this.sector,O({},t,{fill:{color:e.color,opacity:e.opacity},stroke:{opacity:i.opacity,width:i.width,color:i.color}}))},Sd.prototype.highlightVisual=function(){return this.visual.children[0]},Sd.prototype.highlightVisualArgs=function(){var t=this.sector;return{options:this.options,radius:t.radius,innerRadius:t.innerRadius,center:new M.geometry.Point(t.center.x,t.center.y),startAngle:t.startAngle,endAngle:t.angle+t.startAngle,visual:this.visual}},Sd.prototype.createFocusHighlight=function(t){var e=this.options.focusHighlight.border.width,t=this.createSegment(this.sector,O({},t,{stroke:{width:2*e}})),e=new M.drawing.MultiPath;return e.paths.push(M.drawing.Path.fromRect(t.bbox())),e.paths.push(this.createSegment(this.sector,{})),t.clip(e),t},Sd.prototype.tooltipAnchor=function(){var t=this.sector.clone().expand(5),e=t.middle();return{point:t.point(e),align:(t=ce(e+180),e=L(Math.sin(t),g),t=L(Math.cos(t),g),{horizontal:Math.abs(e)>Ad?b:t<0?P:C,vertical:Math.abs(e)<kd?b:e<0?S:T})}},Sd.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Sd.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,series:this.series,percentage:this.percentage}},Sd.prototype.getIndex=function(){return this.index};var yd,vd,md,xd,_d,bd,wd,h=Sd,kd=L(ce(30),g),Ad=L(ce(60),g);function Sd(t,e,i){yd.call(this,i),this.value=t,this.sector=e}e(h,{color:a,overlay:{gradient:"roundedBevel"},border:{width:.5},labels:{visible:!1,distance:35,font:$,margin:w(.5),align:q,zIndex:1,position:la},animation:{type:ms},highlight:{visible:!0,border:{width:1}},visible:!0,accessibility:{role:t,className:i,ariaRoleDescription:js}}),O(h.prototype,Ha),O(h.prototype,Fl);let Cd=h,Pd={createLegendItem:function(t,e,i){var o,r,n,s=this.options.legend||{},a=s.labels||{},s=s.inactiveItems||{},l=s.labels||{};i&&!1!==i.visibleInLegend&&(a=!(r=!1!==i.visible)&&jt(l)||jt(a),n=i.category,a&&(n=a({text:n,series:i.series,dataItem:i.dataItem,percentage:i.percentage,value:t})),a=(r?(o={},e):(o={color:l.color,font:l.font},s.markers||{})).color,Ta(n))&&""!==n&&this.legendItems.push({active:r,pointIndex:i.index,text:n,series:i.series,markerColor:a,pattern:e.pattern,labels:o})}},Td=Pd,Md=((vd=o)&&(Od.__proto__=vd),((Od.prototype=Object.create(vd&&vd.prototype)).constructor=Od).prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},Od.prototype.traverseDataPoints=function(t){for(var e=this.options,i=this.plotArea.options.seriesColors,o=(i=void 0===i?[]:i).length,r=e.series,n=r.length,s=0;s<n;s++){var a=r[s],l=a.data,h=xa(a),p=h.total,c=h.points,h=h.count,u=360/p,d=void 0,f=(isFinite(u)||(d=360/h),void 0),f=(k(a.startAngle)?a:e).startAngle;s!==n-1&&a.labels.position===la&&(a.labels.position=b);for(var g=0;g<c.length;g++){var y,v,m,x,_=c[g];_&&(y=_.fields,v=_.value,_=_.visible,m=0!==v?d||v*u:0,x=1!==l.length&&Boolean(y.explode),Pt(a.color)||(a.color=y.color||i[g%o]),t(v,new Fi(null,0,0,f,m),{owner:this,category:k(y.category)?y.category:"",pattern:(k(y.pattern)?y:a).pattern,index:g,series:a,seriesIx:s,dataItem:l[g],percentage:0!==p?v/p:0,explode:x,visibleInLegend:y.visibleInLegend,visible:_,zIndex:n-s,animationDelay:this.animationDelay(g,s,n)}),!1!==_)&&(f+=m)}}},Od.prototype.evalSegmentOptions=function(t,e,i){var o=i.series;ka(t,{value:e,series:o,dataItem:i.dataItem,category:i.category,percentage:i.percentage},{defaults:o._defaults,excluded:["data","content","template","visual","toggle","ariaTemplate","ariaContent"]})},Od.prototype.addValue=function(t,e,i){var o=O({},i.series,{index:i.index});o.pattern=i.pattern||o.pattern,this.evalSegmentOptions(o,t,i),this.createLegendItem(t,o,i),!1!==i.visible&&(t=new Cd(t,e,o),Object.assign(t,i),this.append(t),this.points.push(t))},Od.prototype.reflow=function(t){var e=this.options,i=this.points,o=this.seriesConfigs,r=(void 0===o&&(o=[]),i.length),n=t.clone(),s=Math.min(n.width(),n.height()),a=s/2,l=s-.85*s,h=new I(n.x1,n.y1,n.x1+s,n.y1+s),s=h.center(),n=n.center(),p=e.series.length,c=[],u=[],e=_(e.padding,l);this.targetBox=t,e=a-5<e?a-5:e,h.translate(n.x-s.x,n.y-s.y);for(var d=a-e,f=new A(d+h.x1+e,d+h.y1+e),g=0;g<r;g++){var y=i[g],v=y.sector,m=y.seriesIx,x=(v.radius=d,v.center=f,o.length&&(x=o[m],v.innerRadius=x.innerRadius,v.radius=x.radius),m===p-1&&y.explode&&(v.center=v.clone().setRadius(.15*v.radius).point(v.middle())),y.reflow(h),y.label);x&&x.options.position===la&&m===p-1&&(x.orientation===P?u:c).push(x)}0<c.length&&(c.sort(this.labelComparator(!0)),this.leftLabelsReflow(c)),0<u.length&&(u.sort(this.labelComparator(!1)),this.rightLabelsReflow(u)),this.box=h},Od.prototype.leftLabelsReflow=function(t){var e=this.distanceBetweenLabels(t);this.distributeLabels(e,t)},Od.prototype.rightLabelsReflow=function(t){var e=this.distanceBetweenLabels(t);this.distributeLabels(e,t)},Od.prototype.distanceBetweenLabels=function(t){var e=he(this.points),i=e.sector,o=t.length-1,e=i.radius+e.options.labels.distance,r=[],n=t[0].box,s=L(n.y1-(i.center.y-e-n.height()-n.height()/2));r.push(s);for(var a=0;a<o;a++){var l=t[a+1].box,n=t[a].box,s=L(l.y1-n.y2);r.push(s)}return s=L(i.center.y+e-t[o].box.y2-t[o].box.height()/2),r.push(s),r},Od.prototype.distributeLabels=function(t,e){for(var i,o,r,n=t.length,s=0;s<n;s++)for(r=-t[s],i=o=s;0<r&&(0<=i||o<n);)r=this._takeDistance(t,s,--i,r),r=this._takeDistance(t,s,++o,r);this.reflowLabels(t,e)},Od.prototype._takeDistance=function(t,e,i,o){var r;return 0<t[i]&&(o-=r=Math.min(t[i],o),t[i]-=r,t[e]+=r),o},Od.prototype.reflowLabels=function(t,e){var i,o=he(this.points),r=o.sector,n=o.options.labels,s=e.length,a=n.distance,l=r.center.y-(r.radius+a)-e[0].box.height();t[0]+=2;for(var h=0;h<s;h++){var p=e[h],c=p.box;l+=t[h],i=this.hAlignLabel(c.x2,r.clone().expand(a),l,l+c.height(),p.orientation===P),p.orientation===P?(n.align!==q&&(i=r.radius+r.center.x+a),p.reflow(new I(i+c.width(),l,i,l))):(n.align!==q&&(i=r.center.x-r.radius-a),p.reflow(new I(i-c.width(),l,i,l))),l+=c.height()}},Od.prototype.createVisual=function(){var t=this.options.connectors,e=this.points,i=e.length;vd.prototype.createVisual.call(this),this._connectorLines=[];for(var o=0;o<i;o++){var r,n,s,a,l,h,p,c=e[o],u=c.sector,d=c.label,f=u.middle(),g=(c.options.connectors||{}).color||t.color;d&&(g=new M.drawing.Path({stroke:{color:g,width:t.width},animation:{type:qn,delay:c.animationDelay}}),d.options.position===la)&&(r=d.box,n=u.center,p=u.point(f),s=new A(r.x1,r.center().y),h=l=a=void 0,p=u.clone().expand(t.padding).point(f),g.moveTo(p.x,p.y),d.orientation===P?(h=Ld(n,p,s,l=new A(r.x1-t.padding,r.center().y)),s=new A(l.x-4,l.y),(h=h||s).x=Math.min(h.x,s.x),this.pointInCircle(h,u.center,u.radius+4)||h.x<u.center.x?(a=u.center.x+u.radius+4,c.options.labels.align===ps||a<s.x?g.lineTo(a,p.y):g.lineTo(p.x+8,p.y),g.lineTo(s.x,l.y)):(h.y=l.y,g.lineTo(h.x,h.y))):(h=Ld(n,p,s,l=new A(r.x2+t.padding,r.center().y)),s=new A(l.x+4,l.y),(h=h||s).x=Math.max(h.x,s.x),this.pointInCircle(h,u.center,u.radius+4)||h.x>u.center.x?(a=u.center.x-u.radius-4,c.options.labels.align===ps||a>s.x?g.lineTo(a,p.y):g.lineTo(p.x-8,p.y),g.lineTo(s.x,l.y)):(h.y=l.y,g.lineTo(h.x,h.y))),g.lineTo(l.x,l.y),this._connectorLines.push(g),this.visual.append(g))}},Od.prototype.renderVisual=function(){var t,e,i,o;vd.prototype.renderVisual.call(this),Ae(this.options.series,function(t){return t.autoFit})&&(t=this.targetBox,e=this.box.center(),o=this.visual.bbox())&&(i=o.bottomRight(),(o=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(M.geometry.transform().scale(o,o,[e.x,e.y]))},Od.prototype.labelComparator=function(t){var i=t?-1:1;return function(t,e){return((t.parent.sector.middle()+270)%360-(e.parent.sector.middle()+270)%360)*i}},Od.prototype.hAlignLabel=function(t,e,i,o,r){var n=e.radius,e=e.center,s=e.x,e=e.y,i=Math.min(Math.abs(e-i),Math.abs(e-o));return n<i?t:s+Math.sqrt(n*n-i*i)*(r?1:-1)},Od.prototype.pointInCircle=function(t,e,i){return Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)<Math.pow(i,2)},Od.prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value)},Od.prototype.animationDelay=function(t){return 70*t},Od.prototype.stackRoot=function(){return this},Od);function Od(t,e){vd.call(this,e),this.plotArea=t,this.chartService=t.chartService,this.points=[],this.legendItems=[],this.render()}function Ld(t,e,i,o){var r,n=(o.x-i.x)*(t.y-i.y)-(o.y-i.y)*(t.x-i.x),o=(o.y-i.y)*(e.x-t.x)-(o.x-i.x)*(e.y-t.y);return 0!=o&&(i=n/o,r=new A(t.x+i*(e.x-t.x),t.y+i*(e.y-t.y))),r}e(Md,{startAngle:90,connectors:{width:2,color:"#939393",padding:8},inactiveItems:{markers:{},labels:{}}}),O(Md.prototype,Td),Md.prototype.isStackRoot=!0;let Id=Md,Bd=((md=Sp)&&(Ed.__proto__=md),((Ed.prototype=Object.create(md&&md.prototype)).constructor=Ed).prototype.render=function(){this.createPieChart(this.series)},Ed.prototype.createPieChart=function(t){var e=t[0],t=new Id(this,{series:t,padding:e.padding,startAngle:e.startAngle,connectors:e.connectors,legend:this.options.legend});this.appendChart(t)},Ed.prototype.appendChart=function(t,e){md.prototype.appendChart.call(this,t,e),ee(this.options.legend.data,t.legendItems)},Ed.prototype.getPointBelow=function(t){return this.getPointToTheRight(t)},Ed.prototype.getPointAbove=function(t){return this.getPointToTheLeft(t)},Ed);function Ed(){md.apply(this,arguments)}let Rd=Bd,Vd=((xd=Cd)&&(jd.__proto__=xd),((jd.prototype=Object.create(xd&&xd.prototype)).constructor=jd).prototype.reflowLabel=function(){var t,e=this.options.labels,i=this.label,o=this.sector.clone(),r=o.middle();i&&(t=i.box.height(),e.position===b?(o.radius-=(o.radius-o.innerRadius)/2,e=o.point(r),i.reflow(new I(e.x,e.y-t/2,e.x,e.y))):xd.prototype.reflowLabel.call(this))},jd.prototype.createSegment=function(t,e){return Xi.current.createRing(t,e)},jd);function jd(){xd.apply(this,arguments)}e(Vd,{overlay:{gradient:"roundedGlass"},labels:{position:b},animation:{type:ms}}),O(Vd.prototype,Ha);let zd=Vd,Dd=((_d=Id)&&(Fd.__proto__=_d),((Fd.prototype=Object.create(_d&&_d.prototype)).constructor=Fd).prototype.addValue=function(t,e,i){var o=O({},i.series,{index:i.index});o.pattern=i.pattern||o.pattern,this.evalSegmentOptions(o,t,i),this.createLegendItem(t,o,i),!1!==i.visible&&(t=new zd(t,e,o),Object.assign(t,i),this.append(t),this.points.push(t))},Fd.prototype.reflow=function(t){for(var e,i=this.options,o=t.clone(),o=Math.min(o.width(),o.height()),r=o/2,n=i.series,s=n.length,i=_(i.padding,o-.85*o),a=r-(i=r-5<i?r-5:i),l=0,h=0;h<s;h++){var p=n[h];0===h&&k(p.holeSize)&&(e=p.holeSize,a-=p.holeSize),k(p.size)?a-=p.size:l++,k(p.margin)&&h!==s-1&&(a-=p.margin)}k(e)||(a-=e=(r-i)/(s+.75)*.75);var c=e,u=0;this.seriesConfigs=[];for(var d=0;d<s;d++){var f=n[d],g=(c+=u)+_(f.size,a/l);this.seriesConfigs.push({innerRadius:c,radius:g}),u=f.margin||0,c=g}_d.prototype.reflow.call(this,t)},Fd.prototype.animationDelay=function(t,e,i){return 50*t+Yn*(e+1)/(i+1)},Fd);function Fd(){_d.apply(this,arguments)}e(Dd,{startAngle:90,connectors:{width:2,color:"#939393",padding:8}});let Hd=Dd,Nd=((bd=Rd)&&(Ud.__proto__=bd),((Ud.prototype=Object.create(bd&&bd.prototype)).constructor=Ud).prototype.render=function(){this.createDonutChart(this.series)},Ud.prototype.createDonutChart=function(t){var e=t[0],t=new Hd(this,{series:t,padding:e.padding,connectors:e.connectors,legend:this.options.legend});this.appendChart(t)},Ud.prototype.getPointBelow=function(t){return this._getNextPoint(t,this._pointsByVertical,-1)},Ud.prototype.getPointAbove=function(t){return this._getNextPoint(t,this._pointsByVertical,1)},Ud);function Ud(){bd.apply(this,arguments)}let Gd=Nd,Wd=((wd=Sp)&&(Xd.__proto__=wd),((Xd.prototype=Object.create(wd&&wd.prototype)).constructor=Xd).prototype.initFields=function(){this.valueAxisRangeTracker=new Vl},Xd.prototype.render=function(){this.addToLegend(this.series),this.createPolarAxis(),this.createCharts(),this.createValueAxis()},Xd.prototype.alignAxes=function(){var t=this.valueAxis,e=t.range(),e=t.options.reverse?e.max:e.min,e=t.getSlot(e),i=this.polarAxis.getSlot(0).center,i=t.box.translate(i.x-e.x1,i.y-e.y1);t.reflow(i)},Xd.prototype.createValueAxis=function(){var t,e=this.valueAxisRangeTracker.query(),i=this.valueAxisOptions({roundToMajorUnit:!1,zIndex:-1}),o=i.type===sa?(t=bn,{min:.1,max:1}):(t=mn,{min:0,max:1}),e=e||o,o=new t(e.min,e.max,i,this.chartService);this.valueAxis=o,this.appendAxis(o)},Xd.prototype.reflowAxes=function(){var t=this.options.plotArea,e=this.valueAxis,i=this.polarAxis,o=this.box,r=.15*Math.min(o.width(),o.height()),t=w(t.padding||{},r),r=o.clone().unpad(t),o=r.clone(),t=(o.y2=o.y1+Math.min(o.width(),o.height()),o.align(r,v,b),o.clone().shrink(0,o.height()/2)),r=(i.reflow(o),e.reflow(t),e.lineBox().height()-e.box.height());e.reflow(e.box.unpad({top:r})),this.axisBox=o,this.alignAxes(o)},Xd.prototype.backgroundBox=function(){return this.box},Xd.prototype.detachLabels=function(){},Xd);function Xd(){wd.apply(this,arguments)}var Yd,qd,Zd,Qd,Kd,$d,l=Wd,gl=((Yd=Vh)&&(Jd.__proto__=Yd),((Jd.prototype=Object.create(Yd&&Yd.prototype)).constructor=Jd).prototype.pointSlot=function(t,e){e=t.center.y-e.y1,t=A.onCircle(t.center,t.startAngle,e);return new I(t.x,t.y,t.x,t.y)},Jd);function Jd(){Yd.apply(this,arguments)}e(gl,{clip:!1});let tf=gl,ef=((qd=hd)&&(of.__proto__=qd),(of.prototype=Object.create(qd&&qd.prototype)).constructor=of);function of(){qd.apply(this,arguments)}ef.prototype.pointSlot=tf.prototype.pointSlot,e(ef,{clip:!1});let rf=ef,nf=((Zd=Ol)&&(sf.__proto__=Zd),((sf.prototype=Object.create(Zd&&Zd.prototype)).constructor=sf).prototype.fillToAxes=function(t){var e=this._polarAxisCenter();t.lineTo(e.x,e.y)},sf.prototype._polarAxisCenter=function(){return this.parent.plotArea.polarAxis.box.center()},sf.prototype.strokeSegments=function(){var t,e,i,o=this._strokeSegments;return o||(t=this._polarAxisCenter(),e=new kn(!1),(i=this.points()).push(t),(o=this._strokeSegments=e.process(i)).pop()),o},sf);function sf(){Zd.apply(this,arguments)}let af=nf,lf=((Qd=Al)&&(hf.__proto__=Qd),((hf.prototype=Object.create(Qd&&Qd.prototype)).constructor=hf).prototype.fillToAxes=function(t){var e=this.parent.plotArea.polarAxis.box.center(),e=new M.geometry.Segment([e.x,e.y]);t.segments.unshift(e),t.segments.push(e)},hf);function hf(){Qd.apply(this,arguments)}let pf=lf,cf=((Kd=rf)&&(uf.__proto__=Kd),((uf.prototype=Object.create(Kd&&Kd.prototype)).constructor=uf).prototype.createSegment=function(t,e,i){return new((e.line||{}).style===is?af:pf)(t,e,i)},uf.prototype.createMissingValue=function(t,e){var i;return Ta(t.x)&&e!==Jn&&(i={x:t.x,y:t.y},e===$n)&&(i.y=0),i},uf.prototype.seriesMissingValues=function(t){return t.missingValues||$n},uf.prototype._hasMissingValuesGap=function(){for(var t=this.options.series,e=0;e<t.length;e++)if("gap"===this.seriesMissingValues(t[e]))return!0},uf.prototype.sortPoints=function(t){if(t.sort(df),this._hasMissingValuesGap())for(var e=0;e<t.length;e++){var i=t[e];!i||Ta(i.value.y)||"gap"!==this.seriesMissingValues(i.series)||delete t[e]}return t},uf);function uf(){Kd.apply(this,arguments)}function df(t,e){return t.value.x-e.value.x}let ff=cf,gf=(($d=l)&&(yf.__proto__=$d),((yf.prototype=Object.create($d&&$d.prototype)).constructor=yf).prototype.createPolarAxis=function(){var t=new pn(this.options.xAxis,this.chartService);this.polarAxis=t,this.axisX=t,this.appendAxis(t)},yf.prototype.render=function(){this.series=[].concat(this.originalSeries),this.createTrendlineSeries(),$d.prototype.render.call(this)},yf.prototype.valueAxisOptions=function(t){return O(t,{majorGridLines:{type:H},minorGridLines:{type:H}},this.options.yAxis)},yf.prototype.createValueAxis=function(){$d.prototype.createValueAxis.call(this),this.axisY=this.valueAxis},yf.prototype.trendlineFactory=function(t,e){t=gd.prototype.trendlineFactory.call(this,t,e);return t&&(t.type=_s),t},yf.prototype.appendChart=function(t,e){this.valueAxisRangeTracker.update(t.yAxisRanges),Sp.prototype.appendChart.call(this,t,e)},yf.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createLineChart(Aa(t,[_s]),e),this.createScatterChart(Aa(t,[bs]),e),this.createAreaChart(Aa(t,[xs]),e)},yf.prototype.createLineChart=function(t,e){0!==t.length&&(t=new rf(this,{series:t}),this.appendChart(t,e))},yf.prototype.createScatterChart=function(t,e){0!==t.length&&(t=new tf(this,{series:t}),this.appendChart(t,e))},yf.prototype.createAreaChart=function(t,e){0!==t.length&&(t=new ff(this,{series:t}),this.appendChart(t,e))},yf.prototype._dispatchEvent=function(t,e,i){var o=t._eventCoordinates(e),o=new A(o.x,o.y),r=this.axisX.getValue(o),o=this.axisY.getValue(o);null!==r&&null!==o&&t.trigger(i,{element:ae(e),x:r,y:o})},yf.prototype.createCrosshairs=function(){},yf);function yf(){$d.apply(this,arguments)}e(gf,{xAxis:{},yAxis:{}}),O(gf.prototype,Pp,{seriesValues:gd.prototype.seriesValues});var vf,mf,xf,_f,bf,wf,kf,Af,Sf,Ja=gf,$=((vf=bl)&&(Cf.__proto__=vf),((Cf.prototype=Object.create(vf&&vf.prototype)).constructor=Cf).prototype.pointSlot=function(t,e){e=t.center.y-e.y1,t=A.onCircle(t.center,t.middle(),e);return new I(t.x,t.y,t.x,t.y)},Cf.prototype.renderSegments=function(){if(vf.prototype.renderSegments.call(this),this._segments&&1<this._segments.length)for(var t=(t=>{for(var e=[],i=0;i<t.length;i++){var o=t[i];e[o.seriesIx]=e[o.seriesIx]||[],e[o.seriesIx].push(o)}return e})(this._segments),e=0;e<t.length;e++){var i,o,r,n=t[e];n&&1<n.length&&(i=n[0].linePoints[0],r=he(n),r=he(r.linePoints),o=0===i.categoryIx,r=r.categoryIx===r.categoriesCount-1,o)&&r&&he(n).linePoints.push(i)}},Cf.prototype.createSegment=function(t,e,i){var i=new(e.style===is?rl:qa)(t,e,i),o=this.seriesMissingValues(e);return t.length!==e.data.length&&o!==Jn||(i.options.closed=!0),i},Cf);function Cf(){vf.apply(this,arguments)}e($,{clip:!1,limitPoints:!1});let Pf=$,Tf=((mf=Ol)&&(Mf.__proto__=mf),((Mf.prototype=Object.create(mf&&mf.prototype)).constructor=Mf).prototype.fillToAxes=function(){},Mf);function Mf(){mf.apply(this,arguments)}let Of=Tf,Lf=((xf=Al)&&(If.__proto__=xf),((If.prototype=Object.create(xf&&xf.prototype)).constructor=If).prototype.fillToAxes=function(){},If);function If(){xf.apply(this,arguments)}let Bf=Lf,Ef=((_f=Pf)&&(Rf.__proto__=_f),((Rf.prototype=Object.create(_f&&_f.prototype)).constructor=Rf).prototype.createSegment=function(t,e,i,o){var r,n,s,a=this.options.isStacked,l=(e.line||{}).style;return a&&0<i&&o&&(n=o.linePoints.slice(0),r=o),l===is?(s=new Of(t,e,i,r,n)).options.closed=!0:(t.push(t[0]),s=new Bf(t,e,i,r,n)),s},Rf.prototype.seriesMissingValues=function(t){return t.missingValues||$n},Rf);function Rf(){_f.apply(this,arguments)}let Vf=Ef,jf=((bf=zd)&&(zf.__proto__=bf),((zf.prototype=Object.create(bf&&bf.prototype)).constructor=zf).prototype.getIndex=function(){return this.categoryIx},zf);function zf(t,e){bf.call(this,t,null,e)}e(jf,{overlay:{gradient:"none"},labels:{distance:10}});let Df=jf,Ff=((wf=o)&&(Hf.__proto__=wf),((Hf.prototype=Object.create(wf&&wf.prototype)).constructor=Hf).prototype.reflow=function(i){var t=this.options,e=this.children,o=t.gap,r=t.spacing,t=e.length,n=i.angle/(t+o+r*(t-1)),s=i.startAngle+o/2*n;this.forEach(e,function(t){var e=i.clone();e.startAngle=s,e.angle=n,t.sector&&(e.radius=t.sector.radius),t.reflow(e),t.sector=e,s+=n+n*r})},Hf);function Hf(t){wf.call(this,t),this.forEach=t.rtl?Wl:Gl}e(Ff,{gap:1,spacing:0});let Nf=Ff,Uf=((kf=o)&&(Gf.__proto__=kf),((Gf.prototype=Object.create(kf&&kf.prototype)).constructor=Gf).prototype.reflow=function(t){var e=this.options.reverse,i=this.children,o=i.length,r=e?o-1:0,n=e?-1:1;this.box=new I;for(var s=r;0<=s&&s<o;s+=n){var a=i[s].sector;a.startAngle=t.startAngle,a.angle=t.angle}},Gf);function Gf(){kf.apply(this,arguments)}let Wf=Uf,Xf=((Af=gh)&&(Yf.__proto__=Af),((Yf.prototype=Object.create(Af&&Af.prototype)).constructor=Yf).prototype.pointType=function(){return Df},Yf.prototype.clusterType=function(){return Nf},Yf.prototype.stackType=function(){return Wf},Yf.prototype.categorySlot=function(t,e){return t.getSlot(e)},Yf.prototype.pointSlot=function(t,e){var i=t.clone(),t=t.center.y;return i.radius=t-e.y1,i.innerRadius=t-e.y2,i},Yf.prototype.reflowPoint=function(t,e){t.sector=e,t.reflow()},Yf.prototype.createAnimation=function(){this.options.animation.center=this.box.toRect().center(),Af.prototype.createAnimation.call(this)},Yf);function Yf(){Af.apply(this,arguments)}Xf.prototype.reflow=Da.prototype.reflow,e(Xf,{clip:!1,limitPoints:!1,animation:{type:"pie"}});let qf=Xf,Zf=((Sf=l)&&(Qf.__proto__=Sf),((Qf.prototype=Object.create(Sf&&Sf.prototype)).constructor=Qf).prototype.createPolarAxis=function(){var t=new an(this.options.categoryAxis,this.chartService);this.polarAxis=t,this.categoryAxis=t,this.appendAxis(t),this.aggregateCategories(),this.createTrendlineSeries(),this.createCategoryAxesLabels()},Qf.prototype.valueAxisOptions=function(t){return this._hasBarCharts&&O(t,{majorGridLines:{type:H},minorGridLines:{type:H}}),this._isStacked100&&O(t,{roundToMajorUnit:!1,labels:{format:"P0"}}),O(t,this.options.valueAxis)},Qf.prototype.aggregateCategories=function(){jc.prototype.aggregateCategories.call(this,this.panes)},Qf.prototype.createCategoryAxesLabels=function(){jc.prototype.createCategoryAxesLabels.call(this,this.panes)},Qf.prototype.filterSeries=function(t){return t},Qf.prototype.trendlineFactory=function(t,e){t=jc.prototype.trendlineFactory.call(this,t,e);return t&&(t.type=As),t},Qf.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createAreaChart(Aa(t,[ws]),e),this.createLineChart(Aa(t,[As]),e),this.createBarChart(Aa(t,[ks]),e)},Qf.prototype.chartOptions=function(t){var e={series:t},i=t[0];return i&&(t=this.filterVisibleSeries(t),i=i.stack,e.isStacked=i&&1<t.length,e.isStacked100=i&&"100%"===i.type&&1<t.length,e.isStacked100)&&(this._isStacked100=!0),e},Qf.prototype.createAreaChart=function(t,e){0!==t.length&&(t=new Vf(this,this.chartOptions(t)),this.appendChart(t,e))},Qf.prototype.createLineChart=function(t,e){0!==t.length&&(t=new Pf(this,this.chartOptions(t)),this.appendChart(t,e))},Qf.prototype.createBarChart=function(t,e){var i,o,r,n;0!==t.length&&(n=t[0],i=this.chartOptions(t),o=(t=this.filterVisibleSeries(t)).some(function(t){return t.stack}),r=t.some(function(t){return t.stack&&"100%"===t.stack.type}),i.gap=n.gap,i.spacing=n.spacing,i.defaultStack=n.stack&&1<t.length,i.isStacked=o&&1<t.length,i.isStacked100=r&&1<t.length,n=new qf(this,i),this.appendChart(n,e),this._hasBarCharts=!0)},Qf.prototype.seriesCategoryAxis=function(){return this.categoryAxis},Qf.prototype._dispatchEvent=function(t,e,i){var o=t._eventCoordinates(e),o=new A(o.x,o.y),r=this.categoryAxis.getCategory(o),o=this.valueAxis.getValue(o);null!==r&&null!==o&&t.trigger(i,{element:ae(e),category:r,value:o})},Qf.prototype.createCrosshairs=function(){},Qf.prototype._pointsByVertical=function(t){return Sf.prototype._pointsByVertical.call(this,t).sort(this._getSeriesCompareFn())},Qf.prototype._getSeriesCompareFn=function(){return function(t,e){return e.value-t.value}},Qf);function Qf(){Sf.apply(this,arguments)}O(Zf.prototype,Pp,{appendChart:jc.prototype.appendChart,aggregateSeries:jc.prototype.aggregateSeries,seriesSourcePoints:jc.prototype.seriesSourcePoints,seriesValues:jc.prototype.seriesValues}),e(Zf,{categoryAxis:{categories:[]},valueAxis:{}});var Kf,$f,Jf,tg,h=Zf,gl=((Kf=o)&&(eg.__proto__=Kf),((eg.prototype=Object.create(Kf&&Kf.prototype)).constructor=eg).prototype.getLabelText=function(t){var e=jt(t);return e?e(this.pointData()):t.format?this.formatValue(t.format):this.value},eg.prototype.reflow=function(t){var e=this.points,i=this.children[0],o=Math.min(e[0].x,e[3].x),r=Math.max(e[1].x,e[2].x);this.box=new I(o,e[0].y,r,e[2].y),i&&i.reflow(new I(t.x1,e[0].y,t.x2,e[2].y))},eg.prototype.createVisual=function(){var t=this,e=this.options;Kf.prototype.createVisual.call(this),this.addAccessibilityAttributesToVisual(),(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)},eg.prototype.createPath=function(){var t=this.options,e=t.border;return M.drawing.Path.fromPoints(this.points,{fill:Qi(t.pattern,{color:t.color,opacity:t.opacity}),stroke:{color:e.color,opacity:e.opacity,width:e.width}}).close()},eg.prototype.createHighlight=function(t){return M.drawing.Path.fromPoints(this.points,t)},eg.prototype.highlightVisual=function(){return this.visual.children[0]},eg.prototype.highlightVisualArgs=function(){var t=M.drawing.Path.fromPoints(this.points).close();return{options:this.options,path:t}},eg.prototype.createFocusHighlight=function(t){var e=this.options.focusHighlight.border.width,t=M.drawing.Path.fromPoints(this.points,O({},t,{stroke:{width:2*e}})).close(),i=new M.drawing.MultiPath;return i.paths.push(M.drawing.Path.fromRect(this.box.clone().pad(e).toRect())),i.paths.push(M.drawing.Path.fromPoints(this.points)),t.clip(i),t},eg.prototype.tooltipAnchor=function(){var t=this.box;return{point:new A(t.center().x,t.y1),align:{horizontal:"center",vertical:"top"}}},eg.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},eg.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,series:this.series,percentage:this.percentage}},eg.prototype.getIndex=function(){return this.index},eg);function eg(t,e,i){Kf.call(this,e),this.value=t,this.options.index=i.index}e(gl,{color:a,border:{width:1},labels:{format:""},accessibility:{role:t,className:i,ariaRoleDescription:js}}),O(gl.prototype,Ha),O(gl.prototype,Fl);let ig=gl,og=(($f=o)&&(rg.__proto__=$f),((rg.prototype=Object.create($f&&$f.prototype)).constructor=rg).prototype.formatPointValue=function(t,e){return this.plotArea.chartService.format.auto(e,t.value)},rg.prototype.render=function(){var t=this.options,e=this.plotArea.options.seriesColors,i=(void 0===e&&(e=[]),t.series[0]),o=i.data;if(o)for(var t=xa(i),r=t.total,n=t.points,s=0;s<n.length;s++){var a,l,h=n[s];h&&(a=h.fields,Pt(i.color)||(i.color=a.color||e[s%e.length]),a=O({index:s,owner:this,series:i,seriesIx:0,dataItem:o[s],percentage:h.value/r},a,{visible:h.visible}),h=h.valueFields.value,l=this.createSegment(h,a),h=this.createLabel(h,a),l)&&h&&l.append(h)}},rg.prototype.evalSegmentOptions=function(t,e,i){var o=i.series;ka(t,{value:e,series:o,dataItem:i.dataItem,index:i.index},{defaults:o._defaults,excluded:["data","content","template","toggle","visual","ariaTemplate","ariaContent"]})},rg.prototype.createSegment=function(t,e){var i=O({},e.series);if(i.pattern=e.pattern||i.pattern,this.evalSegmentOptions(i,t,e),this.createLegendItem(t,i,e),!1!==e.visible)return t=new ig(t,i,e),Object.assign(t,e),this.append(t),this.points.push(t),t},rg.prototype.createLabel=function(t,e){var i,o=e.series,r=e.dataItem,n=O({},this.options.labels,o.labels),s=t;if(n.visible)return i=jt(n),r={dataItem:r,value:t,percentage:e.percentage,category:e.category,series:o},i?s=i(r):n.format&&(s=this.chartService.format.auto(n.format,s)),n.color||(n.color=Me(o.color),n.background)||(n.background=o.color),this.evalSegmentOptions(n,t,e),i=new So(s,O({vAlign:n.position},n),r),this.labels.push(i),i},rg.prototype.labelPadding=function(){for(var t=this.labels,e={left:0,right:0},i=0;i<t.length;i++){var o,r=t[i].options.align;r!==b&&(o=t[i].box.width(),r===C?e.left=Math.max(e.left,o):e.right=Math.max(e.right,o))}return e},rg.prototype.dynamicSlopeReflow=function(t,e,i){for(var o=this.options,r=this.points,n=r.length,s=r[0],a=s,l=0;l<r.length;l++)r[l].percentage>a.percentage&&(a=r[l]);for(var h=s.percentage/a.percentage*e,p=(e-h)/2,c=0,u=0;u<n;u++){var d=r[u].percentage,f=r[u+1],f=f?f.percentage:d,g=r[u].points=[],y=o.dynamicHeight?i*d:i/n,d=x(d?(e-h*(f/d))/2:f?0:e/2,0,e);g.push(new M.geometry.Point(t.x1+p,t.y1+c)),g.push(new M.geometry.Point(t.x1+e-p,t.y1+c)),g.push(new M.geometry.Point(t.x1+e-d,t.y1+y+c)),g.push(new M.geometry.Point(t.x1+d,t.y1+y+c)),c+=y+o.segmentSpacing,h=x(e-2*(p=d),0,e)}},rg.prototype.constantSlopeReflow=function(t,e,i){for(var o=this.options,r=this.points,n=r.length,s=o.neckRatio<=1,a=s?o.neckRatio*e:e,l=s?0:(e-e/o.neckRatio)/2,h=((s?e:e-2*l)-a)/2,p=0,c=0;c<n;c++){var u=r[c].points=[],d=r[c].percentage,f=o.dynamicHeight?h*d:h/n,d=o.dynamicHeight?i*d:i/n;u.push(new M.geometry.Point(t.x1+l,t.y1+p)),u.push(new M.geometry.Point(t.x1+e-l,t.y1+p)),u.push(new M.geometry.Point(t.x1+e-l-f,t.y1+d+p)),u.push(new M.geometry.Point(t.x1+l+f,t.y1+d+p)),l+=f,p+=d+o.segmentSpacing}},rg.prototype.reflow=function(t){var e=this.points,i=e.length;if(i){var o=this.options,r=t.clone().unpad(this.labelPadding()),n=r.height()-o.segmentSpacing*(i-1),s=r.width();o.dynamicSlope?this.dynamicSlopeReflow(r,s,n):this.constantSlopeReflow(r,s,n);for(var a=0;a<i;a++)e[a].reflow(t)}},rg);function rg(t,e){$f.call(this,e),this.plotArea=t,this.chartService=t.chartService,this.points=[],this.labels=[],this.legendItems=[],this.render()}e(og,{neckRatio:.3,width:300,dynamicSlope:!1,dynamicHeight:!0,segmentSpacing:0,labels:{visible:!1,align:b,position:b,zIndex:1}}),O(og.prototype,Td);let ng=og,sg=((Jf=ng)&&(ag.__proto__=Jf),(ag.prototype=Object.create(Jf&&Jf.prototype)).constructor=ag);function ag(t,e){e.dynamicSlope=!1,e.neckRatio=1e6,Jf.call(this,t,e)}let lg=sg,hg=((tg=Sp)&&(pg.__proto__=tg),((pg.prototype=Object.create(tg&&tg.prototype)).constructor=pg).prototype.render=function(){this.createChart(ng,Aa(this.series,[us])),this.createChart(lg,Aa(this.series,[ds]))},pg.prototype.createChart=function(t,e){var i=e[0];i&&(t=new t(this,{series:e,legend:this.options.legend,neckRatio:i.neckRatio,dynamicHeight:i.dynamicHeight,dynamicSlope:i.dynamicSlope,segmentSpacing:i.segmentSpacing,highlight:i.highlight}),this.appendChart(t))},pg.prototype.appendChart=function(t,e){tg.prototype.appendChart.call(this,t,e),ee(this.options.legend.data,t.legendItems)},pg.prototype._pointsByVertical=function(t){return this.pointsBySeriesIndex(t.series.index)},pg.prototype.getPointToTheRight=function(t){return this.getPointBelow(t)},pg.prototype.getPointToTheLeft=function(t){return this.getPointAbove(t)},pg);function pg(){tg.apply(this,arguments)}var cg,ug,dg,$=hg,l=((cg=o)&&(fg.__proto__=cg),((fg.prototype=Object.create(cg&&cg.prototype)).constructor=fg).prototype.render=function(){this._rendered||(this._rendered=!0,this.createMarker(),this.createLabel(),this.createNote())},fg.prototype.createLabel=function(){var t=this.options.labels;t.visible&&(this.label=this.createLabelElement(t),this.append(this.label))},fg.prototype.createLabelElement=function(t){var e=(e=t.color)||Me(this.color);return new So(this.getLabelText(t),O({align:b,vAlign:b,margin:{left:5,right:5},zIndex:_(t.zIndex,this.series.zIndex)},t,{color:e}),this.pointData())},fg.prototype.getLabelText=function(t){var e=jt(t);return e?e(this.pointData()):this.formatValue(t.format)},fg.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},fg.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())},fg.prototype.createVisual=function(){cg.prototype.createVisual.call(this),this.addAccessibilityAttributesToVisual()},fg.prototype.markerBox=function(){var t,e=this.options.markers,i=e.border,o=this.box.toRect(),r=_(e.type,"rect")===ht,i=_(i.width,r?1:0),r=Math.round(i/2);return e.size&&(t=o.center(),o.size.width=o.size.height=e.size,o.origin.x=Math.round(t.x-o.size.width/2),o.origin.y=Math.round(t.y-o.size.height/2)),o.size.width-=i,o.size.height-=i,o.origin.y+=r+.5,o.origin.x+=r+.5,mo(o)},fg.prototype.markerBorder=function(){var t=this.options,e=t.markers.border,t=_(e.opacity,t.opacity);return{color:e.color||this.color,width:e.width,opacity:t,dashType:e.dashType}},fg.prototype.createMarker=function(){var t=this.options,e=t.markers,e=new oo({type:_(e.type,"rect"),width:e.size,height:e.size,rotation:e.rotation,background:this.color,border:this.markerBorder(),pattern:t.pattern,borderRadius:e.borderRadius,opacity:this.series.opacity||t.opacity,zIndex:_(t.zIndex,this.series.zIndex),animation:t.animation,visual:t.visual},{dataItem:this.dataItem,value:this.value,series:this.series,category:this.category});this.marker=e,this.append(e)},fg.prototype.createHighlight=function(t){var e=this.options,i=this.options.highlight.markers||this.options.markers,i=new oo({type:_(i.type,"rect"),width:i.size,height:i.size,rotation:i.rotation,background:i.color||this.color,border:this.markerBorder(),borderRadius:i.borderRadius,opacity:this.series.opacity||e.opacity,zIndex:_(e.zIndex,this.series.zIndex)}),e=(i.reflow(this.markerBox()),i.getElement());return e.options.fill=t.fill,e.options.stroke=t.stroke,e},fg.prototype.highlightVisual=function(){return this.rectVisual},fg.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this.rectVisual}},fg.prototype.createFocusHighlight=function(){var t=this.options.markers,e=this.options.focusHighlight,t=new oo({type:_(t.type,"rect"),width:t.size,height:t.size,rotation:t.rotation,background:e.color,border:e.border,borderRadius:t.borderRadius,padding:e.border.width/2,zIndex:e.zIndex});return t.reflow(this.markerBox()),t.getElement()},fg.prototype.tooltipAnchor=function(){var t=this.box.center().x,e=this.box.y1-5;return{point:new A(t,e),align:{horizontal:b,vertical:S}}},fg.prototype.overlapsBox=function(t){return this.box.overlaps(t)},fg.prototype.unclipElements=function(){},fg.prototype.pointData=function(){return{x:this.value.x,y:this.value.y,value:this.value.value,dataItem:this.dataItem,series:this.series}},fg);function fg(t,e){cg.call(this),this.options=e,this.color=e.color||a,this.value=t}O(l.prototype,Ha),O(l.prototype,Na),O(l.prototype,Fl),l.prototype.defaults={markers:{type:"rect",borderRadius:4,border:{color:"transparent"}},padding:{top:1},labels:{visible:!1,padding:3},opacity:1,notes:{label:{}},accessibility:{role:t,className:i,ariaRoleDescription:js}};let gg=l,yg=((ug=o)&&(vg.__proto__=ug),((vg.prototype=Object.create(ug&&ug.prototype)).constructor=vg).prototype._initFields=function(){this.points=[],this.seriesOptions=[],this.valueRange={min:rt,max:nt},this._evalSeries=[]},vg.prototype.render=function(){this.setRange(),this.traverseDataPoints(this.addValue.bind(this))},vg.prototype.setRange=function(){for(var t=this.options.series,e=0;e<t.length;e++)for(var i=t[e],o=0;o<i.data.length;o++){var r=this.plotArea.bindPoint(i,o).valueFields;k(r.value)&&null!==r.value&&(this.valueRange.min=Math.min(this.valueRange.min,r.value),this.valueRange.max=Math.max(this.valueRange.max,r.value))}},vg.prototype.addValue=function(t,e){var i;t&&k(t.value)&&null!==t.value&&(i=this.createPoint(t,e))&&Object.assign(i,e),this.points.push(i)},vg.prototype.evalPointOptions=function(t,e,i){var o=i.series,r=i.seriesIx,n={defaults:o._defaults,excluded:["data","tooltip","content","template","visual","toggle","drilldownSeriesFactory","ariaTemplate","ariaContent"]},s=this._evalSeries[r],r=(k(s)||(this._evalSeries[r]=s=ka(t,{},n,!0)),t);return s&&ka(r=O({},t),{value:e,series:o,dataItem:i.dataItem,min:this.valueRange.min,max:this.valueRange.max},n),r},vg.prototype.pointType=function(){return gg},vg.prototype.pointOptions=function(t,e){var i,o=this.seriesOptions[e];return o||(i=this.pointType().prototype.defaults,this.seriesOptions[e]=o=O({},i,{markers:{opacity:t.opacity},tooltip:{format:this.options.tooltip.format},labels:{format:this.options.labels.format}},t)),Object.assign({},o)},vg.prototype.createPoint=function(t,e){var i,o,r,n=e.series,s=this.pointOptions(n,e.seriesIx),a=e.color||n.color,n=(s.pattern=e.pattern||s.pattern,s=this.evalPointOptions(s,t,e),Pt(n.color)?a=s.color:0!==this.valueRange.max&&(e=a,void 0===i&&(i=.05),o=(0,M.parseColor)(e),r=1-i,a=(t=>{var e=o.toHSL(),i=100-e.l;return e.l+=Math.min((r-t)*i,i),e.toCss()})(t.value/this.valueRange.max)),new gg(t,s));return n.color=a,this.append(n),n},vg.prototype.seriesAxes=function(t){var e=t.xAxis,t=t.yAxis,i=this.plotArea,o=e?i.namedXAxes[e]:i.axisX,i=t?i.namedYAxes[t]:i.axisY;if(!o)throw new Error("Unable to locate X axis with name "+e);if(i)return{xAxis:o,yAxis:i};throw new Error("Unable to locate Y axis with name "+t)},vg.prototype.reflow=function(t){var n=this,s=this.points,a=!this.options.clip,l=0;this.traverseDataPoints(function(t,e){var i=s[l++],e=n.seriesAxes(e.series),o=e.xAxis,e=e.yAxis,r=o.categoryIndex(t.x),t=e.categoryIndex(t.y),o=o.getSlot(r,r,a),r=e.getSlot(t,t,a);i&&(o&&r?(e=n.pointSlot(o,r),i.reflow(e)):i.visible=!1)}),this.box=t},vg.prototype.pointSlot=function(t,e){return new I(t.x1,e.y1,t.x2,e.y2)},vg.prototype.traverseDataPoints=function(t){for(var e=this.options.series,i=0;i<e.length;i++)for(var o=e[i],r=this.seriesAxes(o),n=r.xAxis,s=r.yAxis,a=n.currentRangeIndices(),l=s.currentRangeIndices(),h=0;h<o.data.length;h++){var p=this.plotArea.bindPoint(o,h),c=p.valueFields,p=p.fields,u=n.totalIndex(c.x),d=s.totalIndex(c.y),u=a.min<=u&&u<=a.max,d=l.min<=d&&d<=l.max;u&&d&&t(c,O({pointIx:h,series:o,seriesIx:i,dataItem:o.data[h],owner:this},p))}},vg.prototype.formatPointValue=function(t,e){t=t.value;return this.chartService.format.auto(e,t.x,t.y,t.value)},vg.prototype.animationPoints=function(){for(var t=this.points,e=[],i=0;i<t.length;i++)e.push((t[i]||{}).marker);return e},vg);function vg(t,e){ug.call(this,e),this.plotArea=t,this.chartService=t.chartService,this._initFields(),this.render()}e(yg,{series:[],tooltip:{format:"{0}, {1}: {2}"},labels:{format:"{2}"},clip:!0});let mg=yg,xg=((dg=Sp)&&(_g.__proto__=dg),((_g.prototype=Object.create(dg&&dg.prototype)).constructor=_g).prototype.initFields=function(){this.namedXAxes={},this.namedYAxes={}},_g.prototype.render=function(t){void 0===t&&(t=this.panes),this.bindCategories(),this.createAxes(t),this.createCharts(t),this.createAxisLabels()},_g.prototype.bindCategories=function(){for(var t=this.srcSeries||this.series,e=0;e<t.length;e++){for(var i=t[e],o=i.data||[],r=this.seriesAxes(i),n=r.xAxis,r=r.yAxis,s=Ee(n.categories||[]),a=Ee(r.categories||[]),l=0;l<o.length;l++){var h=Dn.current.bindPoint(i,l).valueFields,p=h.x,h=h.y;s.has(p)||s.add(p),a.has(h)||a.add(h)}n.categories=s.values(),r.categories=a.values()}},_g.prototype.createCharts=function(t){for(var e=this.groupSeriesByPane(),i=0;i<t.length;i++){var o=t[i],r=e[o.options.name||"default"]||[],r=(this.addToLegend(r),this.filterVisibleSeries(r));r&&this.createHeatmapChart(Aa(r,[fs]),o)}},_g.prototype.createHeatmapChart=function(t,e){t=new mg(this,{series:t});this.appendChart(t,e)},_g.prototype.seriesPaneName=function(t){var e=this.options,i=t.xAxis,o=Nt([].concat(e.xAxis),function(t){return t.name===i})[0],r=t.yAxis,t=Nt([].concat(e.yAxis),function(t){return t.name===r})[0],e=(e.panes||[{}])[0].name||"default";return(o||{}).pane||(t||{}).pane||e},_g.prototype.seriesAxes=function(t){var e=this.options,i=[].concat(e.xAxis),o=t.xAxis,i=o?i.find(function(t){return t.name===o}):i[0],e=[].concat(e.yAxis),r=t.yAxis,t=r?e.find(function(t){return t.name===r}):e[0];if(!i)throw new Error("Unable to locate X axis with name "+o);if(t)return{xAxis:i,yAxis:t};throw new Error("Unable to locate Y axis with name "+r)},_g.prototype.createAxisLabels=function(){for(var t=this.axes,e=0;e<t.length;e++)t[e].createLabels()},_g.prototype.createXYAxis=function(t,e,i){for(var o,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],l=this.series,h=0;h<l.length;h++){var p=l[h],c=p[e?"yAxis":"xAxis"];if(c===s.name||0===i&&!c){c=Dn.current.bindPoint(p,0).valueFields;a.push(c[e?"y":"x"]);break}}for(var u=0;u<a.length;u++)if(a[u]instanceof Date){o=!0;break}t=new(ba(s.type,K)||!s.type&&o?jr:Mr)(s,this.chartService);if(t.axisIndex=i,r){if(n[r])throw new Error((e?"Y":"X")+" axis with name "+r+" is already defined");n[r]=t}return this.appendAxis(t),t.indexCategories(),t},_g.prototype.createAxes=function(t){for(var e=this.options,i=[].concat(e.xAxis),o=[],r=[].concat(e.yAxis),n=[],s=0;s<i.length;s++)u(this.findPane(i[s].pane),t)&&o.push(this.createXYAxis(i[s],!1,s));for(var a=0;a<r.length;a++)u(this.findPane(r[a].pane),t)&&n.push(this.createXYAxis(r[a],!0,a));this.axisX=this.axisX||o[0],this.axisY=this.axisY||n[0]},_g.prototype.removeAxis=function(t){var e=t.options.name;dg.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},_g.prototype._dispatchEvent=function(t,e,i){for(var o=t._eventCoordinates(e),r=new A(o.x,o.y),n=this.axes,s=n.length,a=[],l=[],h=0;h<s;h++){var p=n[h];ya(p.options.vertical?l:a,p.getCategory(r))}0<a.length&&0<l.length&&t.trigger(i,{element:ae(e),originalEvent:e,x:Oa(a),y:Oa(l)})},_g.prototype.updateAxisOptions=function(t,e){var i=t.options.vertical,o=this.groupAxes(this.panes),o=(i?o.y:o.x).indexOf(t);wg(this.options,o,i,e),wg(this.originalOptions,o,i,e)},_g.prototype.crosshairOptions=function(t){return Object.assign({},t.options.crosshair,{zIndex:0})},_g.prototype._pointsByVertical=function(t,e){var i=this,e=(void 0===e&&(e=0),this.axisX.options.reverse?-1*e:e),o=this.axisX.children,r=o[Ct(this._getPointAxisXIndex(t)+e,o.length)].value,t=this.filterPoints(function(t){return bg(t.pointData().x,r)}).sort(function(t,e){return i._getPointAxisYIndex(t)-i._getPointAxisYIndex(e)});return this.axisY.options.reverse?t.reverse():t},_g.prototype._pointsByHorizontal=function(t,e){var i=this,e=(void 0===e&&(e=0),this.axisY.options.reverse?-1*e:e),o=this.axisY.children,r=o[Ct(this._getPointAxisYIndex(t)+e,o.length)].value,t=this.filterPoints(function(t){return bg(t.pointData().y,r)}).sort(function(t,e){return i._getPointAxisXIndex(t)-i._getPointAxisXIndex(e)});return this.axisX.options.reverse?t.reverse():t},_g.prototype._getPointAxisXIndex=function(t){return this._getPointAxisIndex(this.axisX,t.pointData().x)},_g.prototype._getPointAxisYIndex=function(t){return this._getPointAxisIndex(this.axisY,t.pointData().y)},_g.prototype._getPointAxisIndex=function(t,e){return t.children.findIndex(function(t){return bg(e,t.value)})},_g);function _g(){dg.apply(this,arguments)}function bg(t,e){return t instanceof Date&&e instanceof Date?br(t,e):t===e}function wg(t,e,i,o){O([].concat(i?t.yAxis:t.xAxis)[e],o)}e(xg,{xAxis:{},yAxis:{}}),O(xg.prototype,Pp);var kg,gl=xg,t="color",i="first",js="max",l="noteText",Ag=(Iu.current.register(jc,[ns,ps,ys,Bs,rs,Os,hs,vs,ls,Is,ss,Ls,Ps,Cs,Rs,gs,Ss,Es].concat(Hs)),Iu.current.register(gd,[Ts,Ms,as].concat(Hs)),Iu.current.register(Rd,[ms]),Iu.current.register(Gd,[cs]),Iu.current.register($,[us,ds]),Iu.current.register(Ja,[xs,_s,bs].concat(Hs)),Iu.current.register(h,[ws,ks,As].concat(Hs)),Iu.current.register(gl,[fs]),Dn.current.register([ns,ps,ys,Bs,rs,Os],[ut],[zs,t,l,Qn,Kn,Ds,Fs]),Dn.current.register([Ps,Cs,Ss,Es],["from","to"],[zs,t,l,Ds,Fs]),Dn.current.register([Rs,gs],[ut],[zs,t,l,"summary",Ds,Fs]),Dn.current.register([xs,_s,bs],[y,v],[t,Ds,Fs]),Dn.current.register([ws,ks,As],[ut],[zs,t,Ds,Fs]),Dn.current.register([us,ds],[ut],[zs,t,"visibleInLegend","visible",Ds,Fs]),Bp.current.register([ns,ps,ys,Bs,rs,Os,Rs,gs],{value:js,color:i,noteText:i,errorLow:"min",errorHigh:js}),Bp.current.register([Ps,Cs,Ss,Es],{from:"min",to:js,color:i,noteText:i}),Bp.current.register([ws,ks,As],{value:js,color:i}),Dn.current.register([Ts,Ms,as],[y,v],[t,l,"xErrorLow","xErrorHigh","yErrorLow","yErrorHigh"]),Dn.current.register([as],[y,v,"size"],[t,zs,l,Fs]),Dn.current.register([fs],[y,v,ut],[t,l,Fs]),Dn.current.register([hs,vs],["open","high","low","close"],[zs,t,"downColor",l,Fs]),Bp.current.register([hs,vs],{open:js,high:js,low:"min",close:js,color:i,downColor:i,noteText:i}),Dn.current.register([ss,Ls],["lower","q1","median","q3","upper","mean","outliers"],[zs,t,l,Ds,Fs]),Bp.current.register([ss,Ls],{lower:js,q1:js,median:js,q3:js,upper:js,mean:js,outliers:i,color:i,noteText:i}),Dn.current.register([ls,Is],["current","target"],[zs,t,"visibleInLegend",l,Ds,Fs]),Bp.current.register([ls,Is],{current:js,target:js,color:i,noteText:i}),Dn.current.register([ms,cs],[ut],[zs,t,"explode","visibleInLegend","visible",Ds,Fs]),[zs,ut,y,v]),Sg="mousedown",Cg="mousemove",Pg="contextmenu",Tg="mouseleave",Mg="keydown",Og="k-chart-overlay-top",$=((kg=M.Class)&&(f.__proto__=kg),((f.prototype=Object.create(kg&&kg.prototype)).constructor=f).prototype._initElement=function(t){this._setElementClass(t),t.style.position="relative",t.tabIndex=t.getAttribute("tabindex")?t.getAttribute("tabindex"):0,t.setAttribute("role","graphics-document document");for(var e=t.childNodes.length-1;0<=e;e--){var i=t.childNodes[e];Ut(i,"k-chart-overlay")?this.overlayElement=i:t.removeChild(i)}this.element=t},f.prototype._setElementClass=function(t){vt(t,"k-chart")},f.prototype._restoreOverlayElement=function(){this.overlayElement&&(this._hasSeriesData()?this.overlayElement.style.display="none":((this.options.title&&(this.options.title,this.options.title.position===S)?xt:vt)(this.overlayElement,Og),this.overlayElement.style.display=""),this.overlayElement.parentElement!==this.element)&&this.element.appendChild(this.overlayElement)},f.prototype._hasSeriesData=function(){var t=this.options.series||[];return 0<t.length&&t.some(function(t){return t.data&&0<t.data.length})},f.prototype._initTheme=function(t,e){for(var i=[],o=t.series||[],r=0;r<o.length;r++)i.push(Object.assign({},o[r]));t.series=i;for(var n=t,s=Ag,a=0;a<s.length;a++){var l=s[a]+"Axes";n[l]&&(n[s[a]+"Axis"]=n[l],delete n[l])}this.applyDefaults(t,e),null===t.seriesColors&&delete t.seriesColors,wt(t.title)&&(t.title={text:t.title}),this.options=O({},e,t),this.applySeriesColors()},f.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)}},f.prototype.resize=function(t){var e=this.getSize(),i=this._size,o=0<e.width||0<e.height;t||o&&(!i||e.width!==i.width||e.height!==i.height)?(this._size=e,this._resize(e,t),this.trigger("resize",e)):o&&this._selections&&Ae(this._selections,function(t){return!t.visible})&&(this._destroySelections(),this._setupSelection())},f.prototype._resize=function(){this._noTransitionsRedraw()},f.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()},f.prototype.getAxis=function(t){return Pn(t,this._plotArea.axes)},f.prototype.findAxisByName=function(t){return this.getAxis(t)},f.prototype.findPaneByName=function(t){for(var e=this._plotArea.panes,i=0;i<e.length;i++)if(e[i].options.name===t)return new On(e[i])},f.prototype.findPaneByIndex=function(t){var e=this._plotArea.panes;if(e[t])return new On(e[t])},f.prototype.plotArea=function(){return new Ln(this._plotArea)},f.prototype.toggleHighlight=function(t,e){var i,o,r=this._plotArea,n=(r.srcSeries||r.series||[])[0],e=Pt(e)?r.filterPoints(e):(Ot(e)?(i=e.series,o=e.category):i=o=e,n.type===cs?Lg(r.pointsBySeriesName(i),o):u(n.type,[ms,us,ds])?Lg((r.charts[0]||{}).points,o):r.pointsBySeriesName(i));e&&this.togglePointsHighlight(t,e)},f.prototype.togglePointsHighlight=function(t,e){for(var i=this._highlight,o=0;o<e.length;o++)i.togglePointHighlight(e[o],t)},f.prototype.showTooltip=function(t){var e,i,o=this._sharedTooltip(),r=this._tooltip,n=this._plotArea;Pt(t)?(e=n.findPoint(t))&&o&&(i=e.categoryIx):o&&k(t)&&(i=n.categoryAxis.categoryIndex(t)),o?0<=i&&(n=this._plotArea.pointsByCategoryIndex(i),r.showAt(n)):e&&r.show(e)},f.prototype.hideTooltip=function(){this._tooltip.hide()},f.prototype._initSurface=function(){var t=this.surface,e=this._surfaceWrap(),i=this.options.chartArea||{};i.width&&ne(e,{width:i.width}),i.height&&ne(e,{height:i.height}),t&&t.options.type===this.options.renderAs?(this.surface.clear(),this.surface.resize()):(this._destroySurface(),this.surface=M.drawing.Surface.create(e,{type:this.options.renderAs}),this.surface.bind("mouseenter",this._surfaceMouseenterHandler),this.surface.bind("mouseleave",this._surfaceMouseleaveHandler)),this.element._kendoExportVisual=this._kendoExportVisual.bind(this)},f.prototype._surfaceWrap=function(){return this.element},f.prototype._redraw=function(){var t=this._getModel();this._size={width:t.options.width,height:t.options.height},this._destroyView(),this._setElementAccessibilityAttributes(),this._model=t,this._plotArea=t._plotArea,this._legend=t._legend,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 Hc,this._setupSelection(),this._createPannable(),this._createZoomSelection(),this._createMousewheelZoom(),this._setComputedStyles(),this.trigger("render"),jg(this._plotArea.panes),this._navState||this._cancelDomEvents(),this._redrawFocusHighlight()},f.prototype._setComputedStyles=function(){var t=this.titleHeight();this.element.style.setProperty("--kendo-chart-computed-title-height",t+"px")},f.prototype._redrawFocusHighlight=function(){var t;this._destroyed||(t=this._focusState).legendInFocus&&t.preserveHighlight&&(this._focusElement(this._getFocusedLegendItem(),!1),this._focusState.preserveHighlight=!1)},f.prototype._setElementAccessibilityAttributes=function(){var t=this.options.title,t=wt(t)?t:t.description||t.text;t&&this.element.setAttribute("aria-roledescription",t)},f.prototype._kendoExportVisual=function(t){var e;return t&&t.width&&t.height?(e={width:(e=this._originalOptions.chartArea||{}).width||t.width,height:e.height||t.height},this.exportVisual(e)):this.exportVisual()},f.prototype.exportVisual=function(t){var e,i;return t&&(t.width||t.height||t.options)?(i=this.options,t=O({},t.options,{chartArea:{width:t.width,height:t.height}}),Vg(this._originalOptions,t),this.options=O({},this._originalOptions,t),this._initTheme(this.options,this._theme),this.bindCategories(),(t=this._getModel()).renderVisual(),jg(t._plotArea.panes),e=t.visual,this.options=i):e=this.surface.exportVisual(),e},f.prototype._sharedTooltip=function(){return this._plotArea instanceof jc&&this.options.tooltip&&this.options.tooltip.shared},f.prototype._createPannable=function(){var t=this.options;!1!==t.pannable&&(this._pannable=new tu(this._plotArea,t.pannable))},f.prototype._createZoomSelection=function(){var t=this.options.zoomable,e=(t||{}).selection;!1!==t&&!1!==e&&(this._zoomSelection=new ou(this,e))},f.prototype._createMousewheelZoom=function(){var t=this.options.zoomable,e=(t||{}).mousewheel;!1!==t&&!1!==e&&(this._mousewheelZoom=new su(this,e))},f.prototype._toggleDragZoomEvents=function(){var t=this.options.pannable,e=this.options.zoomable,i=(e||{}).selection,o=(e||{}).mousewheel,t=!(t||!1!==e&&!1!==i||this.requiresHandlers([Ks,Zs,Qs])),i=(!1===e||!1===o)&&!this.requiresHandlers([$s,Js,ta]),e=this.element;this._dragZoomEnabled&&t&&i?(e.style.touchAction=this._touchAction||"",this._dragZoomEnabled=!1):this._dragZoomEnabled||t&&i||(e.style.touchAction="none",this._dragZoomEnabled=!0),this._toggleDomEvents(!t,!i)},f.prototype._toggleDomEvents=function(t,e){var i=this.domEvents;i&&(i.toggleDrag&&i.toggleDrag(t),i.toggleZoom)&&i.toggleZoom(e)},f.prototype._createTooltip=function(){var t=this.options.tooltip;return this._sharedTooltip()?this._createSharedTooltip(t):new Uu(this.chartService,t)},f.prototype._createSharedTooltip=function(t){return new Xu(this._plotArea,t)},f.prototype.applyDefaults=function(t,e){var i,o,r,n=t,s=(e||{}).axisDefaults||{};function a(t){var e=(t||{}).color||o.color,e=O({},s,s[i],o,o[i],{line:{color:e},labels:{color:e},title:{color:e}},t);return delete e[i],e}for(var l=0;l<Ag.length;l++)o=n.axisDefaults||{},r=(r=[].concat(n[i=Ag[l]+"Axis"])).map(a),n[i]=1<r.length?r:r[0];var h=t,t=e,p=h.series,c=p.length,u=h.seriesDefaults,d=O({},h.seriesDefaults),f=t?O({},t.seriesDefaults):{},g=O({},f);Ig(d),Ig(g);for(var y=0;y<c;y++){var v=p[y].type||h.seriesDefaults.type,v=O({data:[]},g,f[v],{tooltip:h.tooltip},d,u[v]);p[y]._defaults=v,p[y]=O({},v,p[y]),p[y].data=p[y].data||[]}},f.prototype.applySeriesColors=function(){for(var t=this.options,e=t.series,i=t.seriesColors||[],o=0;o<e.length;o++){var r=e[o],n=i[o%i.length],s=r._defaults;r.color=r.color||n,s&&(s.color=s.color||n)}},f.prototype._getModel=function(){var t=this.options,e=this._createPlotArea(),i=new ho(this._modelOptions()),o=(i.chart=this,i._plotArea=e,Mo.buildTitle(t.title)),r=Mo.buildTitle(t.subtitle,{align:t.title.align,position:t.title.position});return i.append.apply(i,Mo.orderTitles([o,r])),t.legend&&t.legend.visible&&(t=new Mu(e.options.legend,this.chartService),i.append(t),i._legend=t),i.append(e),i.reflow(),this._setTitleBox(o,r),i},f.prototype._setTitleBox=function(t,e){var i,o,r;(t||e)&&(this._titleBox=(t||e).box.clone(),i=t?t.options.position:"",r=(o=e?e.options.position:"")!==S,i===o&&e?this._titleBox.wrap(e.box):t&&e&&r&&(this._titleBox=e.box.clone()))},f.prototype._modelOptions=function(){var t=this.options,e=this.getSize();return O({transitions:t.transitions,width:e.width||600,height:e.height||400},t.chartArea)},f.prototype._createPlotArea=function(t){var e=this.options;return Iu.current.create(t?[]:e.series,e,this.chartService)},f.prototype._setupSelection=function(){for(var t=this._plotArea.axes,e=this._selections=[],i=0;i<t.length;i++){var o,r=t[i],n=r.options;r instanceof Mr&&n.select&&!n.vertical&&(o=r.range(),r=new Fu(this,r,O({min:o.min,max:o.max},n.select)),e.push(r))}},f.prototype._selectStart=function(t){return this.trigger(ea,t)},f.prototype._select=function(t){return this.trigger(ia,t)},f.prototype._selectEnd=function(t){return this.trigger(oa,t)},f.prototype._initHandlers=function(){this._clickHandler=this._click.bind(this),this._keydownHandler=this._keydown.bind(this),this._focusHandler=this._focus.bind(this),this._blurHandler=this._blur.bind(this),this._mousedownHandler=this._mousedown.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._mousemoveThrottled=(0,M.throttle)(this._mousemove.bind(this),20)},f.prototype.addObserver=function(t){t&&this.observers.push(t)},f.prototype.removeObserver=function(t){t=this.observers.indexOf(t);0<=t&&this.observers.splice(t,1)},f.prototype.requiresHandlers=function(t){for(var e=this.observers,i=0;i<e.length;i++)if(e[i].requiresHandlers(t))return!0},f.prototype.trigger=function(t,e){(e=void 0===e?{}:e).sender=this,t===ra?e.anchor.point=this._toDocumentCoordinates(e.anchor.point):t===Ws?this._updateDrilldownPoint(e.point):t===Xs?this._resetDrilldownPoint():t===Us?(this._focusPoint(e.point),this._startDrilldown(e.point)):t===Ns&&this._focusLegendItem(e);for(var i=this.observers,o=!1,r=0;r<i.length;r++)i[r].trigger(t,e)&&(o=!0);return o},f.prototype.titleHeight=function(){return this._titleBox?this._titleBox.height():0},f.prototype._attachEvents=function(){var t,e=this.element;this._touchAction=e.style.touchAction,ie(e,((t={})[Pg]=this._clickHandler,t[ha]=this._mousewheelHandler,t[Tg]=this._mouseleaveHandler,t[Mg]=this._keydownHandler,t[Sg]=this._mousedownHandler,t.focus=this._focusHandler,t.blur=this._blurHandler,t)),this._shouldAttachMouseMove()&&ie(e,((t={})[Cg]=this._mousemoveThrottled,t)),this.domEvents=Yo.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()},f.prototype._mouseleave=function(t){this._hoveredPoint&&(this._hoveredPoint.out(this,t),this._hoveredPoint=null),this._plotAreaHovered&&(this._plotAreaHovered=!1,this.trigger(qs)),this._hasInactiveOpacity()&&this._activeChartInstance&&(this._applySeriesOpacity(this._activeChartInstance.children,null,!0),this._updateSeriesOpacity(null,!0))},f.prototype._cancelDomEvents=function(){this.domEvents&&this.domEvents.cancel&&this.domEvents.cancel()},f.prototype._gesturestart=function(t){this._mousewheelZoom&&!this._stopChartHandlers(t)&&(this._gestureDistance=t.distance,this._unsetActivePoint(),this._clearFocusedElement(),this.surface.suspendTracking())},f.prototype._gestureend=function(t){this._zooming&&!this._stopChartHandlers(t)&&(this.surface&&this.surface.resumeTracking(),this._zooming=!1,this.trigger(ta,{}))},f.prototype._gesturechange=function(t){var e,i,o=this._mousewheelZoom;o&&!this._stopChartHandlers(t)&&(t.preventDefault(),e=this._gestureDistance,e=-t.distance/e+1,.1<=Math.abs(e))&&(e=Math.round(10*e),this._gestureDistance=t.distance,i={delta:e,axisRanges:Bg(this._plotArea.axes),originalEvent:t},!this._zooming&&this.trigger($s,i)||(t=this._eventCoordinates(t),this._zooming||(this._zooming=!0),(i.axisRanges=o.updateRanges(e,t))&&!this.trigger(Js,i)&&o.zoom()))},f.prototype._mouseout=function(t){var e;t.element&&(e=this._drawingChartElement(t.element,t))&&e.leave&&e.leave(this,t.originalEvent)},f.prototype._start=function(t){var e=this._eventCoordinates(t);!this._stopChartHandlers(t)&&this._plotArea.backgroundContainsPoint(e)&&(this.requiresHandlers([Ks,Zs,Qs])&&this._startNavigation(t,e,Ks),this._pannable&&this._pannable.start(t)&&(this.surface.suspendTracking(),this._unsetActivePoint(),this._clearFocusedElement(),this._suppressHover=!0,this.chartService.panning=!0),this._zoomSelection)&&this._zoomSelection.start(t)&&this.trigger($s,{axisRanges:Bg(this._plotArea.axes),originalEvent:t})},f.prototype._move=function(t){var e=this._navState,i=this._pannable;if(!this._stopChartHandlers(t)){if(i){var o=i.move(t);o&&!this.trigger(Zs,{axisRanges:o,originalEvent:t})&&i.pan()}else if(e){for(var r={},n=e.axes,s=0;s<n.length;s++){var a,l=n[s];l.options.name&&0!=(a=(a=l.options.vertical?t.y:t.x).startLocation-a.location)&&(r[l.options.name]=l.translateRange(a))}e.axisRanges=r,this.trigger(Zs,{axisRanges:r,originalEvent:t})}this._zoomSelection&&this._zoomSelection.move(t)}},f.prototype._end=function(t){var e;this._stopChartHandlers(t)||((e=this._pannable)&&e.end(t)?(this.surface.resumeTracking(),this.trigger(Qs,{axisRanges:Bg(this._plotArea.axes),originalEvent:t}),this._suppressHover=!1,this.chartService.panning=!1):this._endNavigation(t,Qs),this._zoomSelection&&(e=this._zoomSelection.end(t))&&!this.trigger(Js,{axisRanges:e,originalEvent:t})&&(this._zoomSelection.zoom(),this.trigger(ta,{axisRanges:e,originalEvent:t})))},f.prototype._stopChartHandlers=function(t){var e=this._selections||[];if(!e.length)return!1;var t=this._eventCoordinates(t),i=this._plotArea.paneByPoint(t);if(i)for(var o=0;o<e.length;o++)if(e[o].onPane(i))return!0},f.prototype._mousewheelZoomRate=function(){var t=(this.options.zoomable||{}).mousewheel||{};return _(t.rate,.3)},f.prototype._mousewheel=function(t){var e=this,i=Jt(t),o=this._mousewheelZoom,r=this._eventCoordinates(t);if(!this._stopChartHandlers(t)&&this._plotArea.backgroundContainsPoint(r))if(o){var n={delta:i,axisRanges:Bg(this._plotArea.axes),originalEvent:t};!this._zooming&&this.trigger($s,n)||(t.preventDefault(),this._zooming||(this._unsetActivePoint(),this._clearFocusedElement(),this.surface.suspendTracking(),this._zooming=!0),this._mwTimeout&&clearTimeout(this._mwTimeout),n.axisRanges=o.updateRanges(i,r),n.axisRanges&&!this.trigger(Js,n)&&o.zoom(),this._mwTimeout=setTimeout(function(){e.trigger(ta,n),e._zooming=!1,e.surface&&e.surface.resumeTracking()},150))}else{o=this._navState;if(o=o||this._startNavigation(t,r,$s)?o:this._navState){var s=o.totalDelta||i;o.totalDelta=s+i;for(var a=this._navState.axes,l={},h=0;h<a.length;h++){var p=a[h],c=p.options.name;c&&(l[c]=p.scaleRange(-s*this._mousewheelZoomRate(),r))}this.trigger(Js,{delta:i,axisRanges:l,originalEvent:t}),this._mwTimeout&&clearTimeout(this._mwTimeout),this._mwTimeout=setTimeout(function(){e._endNavigation(t,ta)},150)}}},f.prototype._startNavigation=function(t,e,i){var o,r=this._model._plotArea,e=r.findPointPane(e),r=r.axes.slice(0);e&&(o=Bg(r),this.trigger(i,{axisRanges:o,originalEvent:t})?this._cancelDomEvents():(this._suppressHover=!0,this._unsetActivePoint(),this._clearFocusedElement(),this._navState={axisRanges:o,pane:e,axes:r}))},f.prototype._endNavigation=function(t,e){this._navState&&(this.trigger(e,{axisRanges:this._navState.axisRanges,originalEvent:t}),this._suppressHover=!1,this._navState=null)},f.prototype._getChartElement=function(t,e){var i=this.surface.eventTarget(t);if(i)return this._drawingChartElement(i,t,e)},f.prototype._drawingChartElement=function(t,e,i){for(var o,r=t;r&&!o;)o=r.chartElement,r=r.parent;if(o)return o.aliasFor&&(o=o.aliasFor(e,this._eventCoordinates(e))),o=i&&(o=o.closest(i))&&o.aliasFor?o.aliasFor():o},f.prototype._eventCoordinates=function(t){t=se(t);return this._toModelCoordinates(t.x,t.y)},f.prototype._elementPadding=function(){var t,e;return this._padding||(e=(t=Bt(this.element,["paddingLeft","paddingTop"])).paddingLeft,this._padding={top:t.paddingTop,left:e}),this._padding},f.prototype._toDocumentCoordinates=function(t){var e=this._elementPadding(),i=re(this.element);return{left:L(t.x+e.left+i.left),top:L(t.y+e.top+i.top)}},f.prototype._toModelCoordinates=function(t,e){var i=this.element,o=re(i),r=this._elementPadding(),i=Te(i).invert(),t=new M.geometry.Point(t-o.left-r.left,e-o.top-r.top).transform(i);return new A(t.x,t.y)},f.prototype._tap=function(t){var e=this,i=this.surface.eventTarget(t),o=this._drawingChartElement(i,t),r=this._sharedTooltip();this._startHover(i,t)||r||this._unsetActivePoint(),r&&this._trackSharedTooltip(this._eventCoordinates(t),t,!0),this._propagateClick(o,t),this.handlingTap=!0,setTimeout(function(){e.handlingTap=!1},0)},f.prototype._click=function(t){var e=this._getChartElement(t);this._propagateClick(e,t)},f.prototype._propagateClick=function(t,e){for(var i=t;i;)i.click&&i.click(this,e),i=i.parent},f.prototype._isLegendBeforeChart=function(){var t=this.options.legend.position,e=this._legend;return e&&e.hasItems()&&(t===T||t===C)},f.prototype._focus=function(){this._preventInitialPointFocus||(this._isLegendBeforeChart()?this._focusFirstLegendItem():this._focusFirstPoint()),this._preventInitialPointFocus=!1},f.prototype._keydown=function(t){var e,i=this._focusState,o=i.legendInFocus,i=i.focusedElement,r=this._legend;"Tab"===t.key?(this._clearFocusedElement(),e=this._isLegendBeforeChart(),o&&e!==t.shiftKey?this._navigatePoints(t):!o&&e===t.shiftKey&&r.hasItems()&&this._navigateLegend(t)):"Escape"===t.key?(i&&t.stopPropagation(),this._tooltip&&this._tooltip.visible?this._hideTooltip():this._blur()):"Enter"===t.key?i&&(this._focusState.preserveHighlight=!0,this._propagateClick(i,t),this._focusElement(i)):o?this._navigateLegend(t):this._navigatePoints(t)},f.prototype._navigatePoints=function(e){var i=this,o=this._focusState,t=this._plotArea;if(o.legendInFocus=!1,o.focusedElement){var r=function(t){o.focusedPoint=t,i._focusElement(o.focusedPoint),i._displayTooltip(t),e.preventDefault()};switch(e.key){case W:r(t.getPointToTheRight(o.focusedPoint));break;case G:r(t.getPointToTheLeft(o.focusedPoint));break;case U:r(t.getPointBelow(o.focusedPoint));break;case N:r(t.getPointAbove(o.focusedPoint))}}else this._focusFirstPoint(),e.preventDefault()},f.prototype._navigateLegend=function(e){var i=this,o=this._focusState,t=this._legend,r=this.chartService.rtl;if(o.legendInFocus=!0,o.focusedElement){var n=t.getItems().length,s=function(t){o.focusedLegendItemIndex=t(o.focusedLegendItemIndex,n),i._focusElement(i._getFocusedLegendItem()),e.preventDefault()};switch(e.key){case N:case G:s(r?At:St);break;case U:case W:s(r?St:At)}}else this._focusFirstLegendItem(),e.preventDefault()},f.prototype._focusFirstPoint=function(){var t=this._focusState.focusedPoint=this._plotArea.getFirstPoint();t&&(this._focusElement(t),this._displayTooltip(t))},f.prototype._hasFocus=function(){return this.element.ownerDocument.activeElement===this.element},f.prototype._mousedown=function(){this._hasFocus()||(this._preventInitialPointFocus=!0)},f.prototype._focusChart=function(){this._hasFocus()||(this._preventInitialPointFocus=!0,this.element.focus())},f.prototype._focusPoint=function(t){this._focusState.focusedPoint=t,this._focusChart(),this._focusElement(t,!0)},f.prototype._focusFirstLegendItem=function(){var t=this._focusState;t.focusedLegendItemIndex=0,this._focusElement(this._getFocusedLegendItem()),t.legendInFocus=!0,this._hideTooltip()},f.prototype._focusLegendItem=function(e){var t=this._focusState;t.focusedLegendItemIndex=this._legend.getItems().findIndex(function(t){return t.options.series.index===e.seriesIndex&&t.options.pointIndex===e.pointIndex}),t.legendInFocus=!0,this._focusChart(),this._focusElement(this._getFocusedLegendItem(),!0)},f.prototype._getFocusedLegendItem=function(){var t=this._focusState;return this._legend.getItems()[t.focusedLegendItemIndex]},f.prototype._focusElement=function(t,e){var i=this._focusState;this._clearFocusedElement(),t&&(i.focusedElement=t,this._setElementActiveDescendant(t),!e)&&(t.focusVisual(),i.legendInFocus?(e=t.options,this._showSeriesInactiveOpacity(e.series.index,e.pointIndex)):this._showInactiveOpacity(t))},f.prototype._clearFocusedElement=function(){var t=this._focusState;t&&(t.focusedElement&&t.focusedElement.clearFocusFromVisual&&(t.focusedElement.clearFocusFromVisual(),this._clearElementActiveDescendant()),t.focusedElement=null)},f.prototype._setElementActiveDescendant=function(t){"canvas"===this.options.renderAs&&(this._pseudoFocusedElement=this._createPseudoFocusedElement(t),this.element.append(this._pseudoFocusedElement)),this.element.setAttribute(X,t._id)},f.prototype._clearElementActiveDescendant=function(){this._pseudoFocusedElement&&(this._pseudoFocusedElement.remove(),this._pseudoFocusedElement=null),this.element.removeAttribute(X)},f.prototype._createPseudoFocusedElement=function(t){var e=document.createElement("div"),i=t.options.accessibility,t=(e.id=t._id,e.setAttribute("aria-label",t.getAriaLabelText()),e.setAttribute("role",i.role),e.setAttribute("aria-roledescription",i.ariaRoleDescription),i.ariaChecked);return k(t)&&e.setAttribute("aria-checked",t),e},f.prototype._blur=function(){this._focusState.legendInFocus=!1,this._clearFocusedElement(),this._hideInactiveOpacity()},f.prototype._startHover=function(t,e){var i;return!this._suppressHover&&(t=this._drawingChartElement(t,e,function(t){return(t.hover||t.over)&&!(t instanceof Sp)}),i=this._activePoint,this._updateHoveredPoint(t,e),t&&i!==t&&t.hover&&(this._activePoint=t,this._sharedTooltip()||t.hover(this,e)||(this._displayTooltip(t),this._showInactiveOpacity(t))),t)},f.prototype._displayTooltip=function(t){O({},this.options.tooltip,t.options.tooltip).visible&&(this._sharedTooltip()&&t.box?this._trackSharedTooltip(t.box.center(),{}):this._tooltip.show(t))},f.prototype._hideTooltip=function(){this._tooltip&&this._tooltip.hide()},f.prototype._displayInactiveOpacity=function(t,e,i){var o=this._activeChartInstance=this._chartInstanceFromPoint(t);o&&(e?(this._updateSeriesOpacity(t),this._applySeriesOpacity(o.children,null,!0),this._applySeriesOpacity(o.children,t.series),this._highlight.show(i||t)):o.supportsPointInactiveOpacity()?(e=this._getInactivePoints(t,o))&&e.length&&this._highlight.show(e,1-this._getInactiveOpacityForSeries(t.series)):this._highlight.show(t))},f.prototype._getInactivePoints=function(e,t){return this._getAllPointsOfType(t,e.constructor).filter(function(t){return t!==e})},f.prototype._getAllPointsOfType=function(t,e){for(var i=[],o=0;o<t.children.length;o++){var r=t.children[o];r.constructor===e?i.push(r):r.children&&r.children.length&&(i=i.concat(this._getAllPointsOfType(r,e)))}return i},f.prototype._updateHoveredPoint=function(t,e){var i=this._hoveredPoint;i&&i!==t&&(i.out(this,e),this._hoveredPoint=null),t&&i!==t&&t.over&&(this._hoveredPoint=t).over(this,e)},f.prototype._updateDrilldownPoint=function(t){t&&t.series&&Dn.current.bindPoint(t.series,null,t.dataItem).fields.drilldown&&(this._drilldownState={cursor:this.element.style.cursor},this.element.style.cursor="pointer")},f.prototype._resetDrilldownPoint=function(){this._drilldownState&&(this.element.style.cursor=this._drilldownState.cursor,this._drilldownState=null)},f.prototype._startDrilldown=function(t){var e,i;t&&t.series&&(e=t.series,i=Dn.current.bindPoint(e,null,t.dataItem).fields.drilldown)&&this.trigger("drilldown",{series:e,point:t,value:i,sender:this})},f.prototype._updateSeriesOpacity=function(t,e){for(var i=this._plotArea,o=i.series.length,r=0;r<o;r++){var n=i.series[r],s=this._getDefaultOpacityForSeries(n),a=this._getInactiveOpacityForSeries(n);e||n===t.series?(n.opacity=s,n.line&&(n.line.opacity=s)):(n.defaultOpacity=s,n.opacity=a,n.line&&(n.line.opacity=a))}},f.prototype._applySeriesOpacity=function(t,e,i,o){for(var r=0;r<t.length;r++){var n,s=t[r],a=s.series||o;a&&(a.highlight||{}).visible&&s.visual&&(n=(o||s.series).opacity,a===e&&!i||s.visual.opacity(i?1:n)),s.children&&s.children.length&&this._applySeriesOpacity(s.children,e,i,s.series)}},f.prototype._chartInstanceFromPoint=function(t){for(var e=t.parent;e&&!e.plotArea;)e=e.parent;return e},f.prototype._showInactiveOpacity=function(t){var e=1<this._plotArea.series.length;this._hasInactiveOpacity()?this._displayInactiveOpacity(t,e):this._highlight.show(t)},f.prototype._hideInactiveOpacity=function(t){var e=1<this._plotArea.series.length;this._hasInactiveOpacity()&&(e&&this._activeChartInstance&&(this._updateSeriesOpacity(t,!0),this._applySeriesOpacity(this._activeChartInstance.children,null,!0),this._activeChartInstance=null),this._highlight&&this._highlight.hide(),this._activePoint=null)},f.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},f.prototype._getInactiveOpacityForSeries=function(t){var e=this.options.seriesDefaults.highlight.inactiveOpacity;return t.highlight.inactiveOpacity||e||t.opacity||1},f.prototype._getDefaultOpacityForSeries=function(t){return t.defaultOpacity||t.opacity||1},f.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),ie(document,((t={})[Cg]=this._mouseMoveTrackHandler,t)))},f.prototype._mouseMoveTracking=function(t){var e=this.options,i=this._tooltip,o=this._highlight,r=this._activePoint,n=this._eventCoordinates(t);this._plotArea.box.containsPoint(n)?r&&r.tooltipTracking&&r.series&&r.parent.getNearestPoint&&(n=r.parent.getNearestPoint(n.x,n.y,r.seriesIx))&&n!==r&&((this._activePoint=n).hover(this,t)||(O({},e.tooltip,n.options.tooltip).visible&&i.show(n),o.show(n))):(ue(document,((t={})[Cg]=this._mouseMoveTrackHandler,t)),this._unsetActivePoint(),this._clearFocusedElement(),this._mouseMoveTrackHandler=null,this._hideInactiveOpacity(r))},f.prototype._mousemove=function(t){var e=this._eventCoordinates(t),i=this._plotArea;this._trackCrosshairs(e),i.hover&&((i=i.backgroundContainsPoint(e))?(this._plotAreaHovered=!0,this._plotArea.hover(this,t)):this._plotAreaHovered&&!i&&(this._plotAreaHovered=!1,this.trigger(qs))),this._sharedTooltip()&&this._trackSharedTooltip(e,t)},f.prototype._trackCrosshairs=function(t){for(var e=this._plotArea.crosshairs,i=0;i<e.length;i++){var o=e[i];o.box.containsPoint(t)?o.showAt(t):o.hide()}},f.prototype._trackSharedTooltip=function(t,e,i){var o,r,n,s,a,l,h;this._suppressHover||(o=this.options.tooltip,a=this._plotArea,s=this._plotArea.categoryAxis,r=this._tooltip,n=this._highlight,a.backgroundContainsPoint(t)?(s=s.pointCategoryIndex(t))!==this._tooltipCategoryIx||!this._sharedHighlight&&i?((h=(l=(a=a.pointsByCategoryIndex(s)).map(function(t){return t.eventArgs(e)}))[0]||{}).categoryPoints=l,0<a.length&&!this.trigger(Gs,h)?(o.visible&&r.showAt(a,t),n.show(a),this._sharedHighlight=!0):r.hide(),this._tooltipCategoryIx=s):i&&this._sharedHighlight&&(n.hide(),r.hide(),this._sharedHighlight=!1):this._sharedHighlight&&(n.hide(),r.hide(),this._tooltipCategoryIx=null,this._sharedHighlight=!1))},f.prototype.hideElements=function(t){var e=this._plotArea;this._mousemoveThrottled.cancel(),e.hideCrosshairs(),this._unsetActivePoint(t)},f.prototype._unsetActivePoint=function(t){var e=this._highlight;this._activePoint=null,this._hoveredPoint=null,t&&t.keepTooltipOpen||this._hideTooltip(),this._tooltipCategoryIx=null,this._sharedHighlight=!1,e&&e.hide()},f.prototype._deferRedraw=function(){this._redraw()},f.prototype._clearRedrawTimeout=function(){this._redrawTimeout&&(clearInterval(this._redrawTimeout),this._redrawTimeout=null)},f.prototype.bindCategories=function(){for(var t=this.options,e=[].concat(t.categoryAxis),i=0;i<e.length;i++){var o=e[i];!1!==o.autoBind&&this.bindCategoryAxisFromSeries(o,i)}},f.prototype.bindCategoryAxisFromSeries=function(i,e){var o=this,r=new Set,t=this.options.series.filter(function(t){return t.categoryAxis===i.name||!t.categoryAxis&&0===e}),n=t.some(function(t){return Boolean(t.categoryField)}),t=t.filter(function(t){return t.data&&0<t.data.length}),s=t.map(function(t){return Dn.current.bindPoint(t,0).fields.category}),a=s.reduce(function(t,e){return t||Ma(i,e)},!1);t.filter(function(t,e){return t.categoryField||k(s[e])}).forEach(function(i){return i.data.forEach(function(t,e){e=Dn.current.bindPoint(i,e).fields.category;a&&(e=(t=Ca(e,t,o.chartService.intl))?t.getTime():void 0),r.add(e)})}),0<r.size?(t=Array.from(r.values()),a&&(t=t.sort().map(function(t){return t&&new Date(t)})),i.categories=t):n&&(i.categories=[])},f.prototype._isBindable=function(t){for(var e=Dn.current.valueFields(t),i=!0,o=0;o<e.length;o++){var r=e[o];if(r===ut?r="field":r+="Field",!k(t[r])){i=!1;break}}return i},f.prototype._noTransitionsRedraw=function(){var t,e=this.options;!1!==e.transitions&&(t=!(e.transitions=!1)),this._redraw(),t&&(e.transitions=!0)},f.prototype._legendItemHover=function(t,e){this._showSeriesInactiveOpacity(t,e)},f.prototype._showSeriesInactiveOpacity=function(e,i){var t=this._plotArea,o=this._highlight,r=(t.srcSeries||t.series)[e],n=u(r.type,[ms,cs,us,ds])?t.findPoint(function(t){return t.series.index===e&&t.index===i}):t.pointsBySeriesIndex(e);this._hasInactiveOpacity()&&r.visible&&n?(r=1<t.series.length,t=n.length?n[0]:n,this._displayInactiveOpacity(t,r,n)):o.show(n)},f.prototype._shouldAttachMouseMove=function(){return this._plotArea.crosshairs.length||this._tooltip&&this._sharedTooltip()||this.requiresHandlers([Ys,qs])},f.prototype.updateMouseMoveHandler=function(){var t;ue(this.element,((t={})[Cg]=this._mousemoveThrottled,t)),this._shouldAttachMouseMove()&&ie(this.element,((t={})[Cg]=this._mousemoveThrottled,t))},f.prototype.applyOptions=function(t,e){Vg(this._originalOptions,t),this._originalOptions=O(this._originalOptions,t),this.options=O({},this._originalOptions),e&&(this._theme=e,this.chartService.theme=e),this._initTheme(this.options,this._theme),this._toggleDragZoomEvents()},f.prototype.setOptions=function(t,e){this.applyOptions(t,e),this.bindCategories(),this.redraw(),this.updateMouseMoveHandler(),this._restoreOverlayElement()},f.prototype.setDirection=function(t){this.chartService.rtl=Boolean(t),this.surface&&"svg"===this.surface.type&&this._destroySurface()},f.prototype.setIntlService=function(t){this.chartService.intl=t},f.prototype.noTransitionsRedraw=function(){this._noTransitionsRedraw()},f.prototype.destroy=function(){var t;this._destroyed=!0,ue(this.element,((t={})[Pg]=this._clickHandler,t[ha]=this._mousewheelHandler,t[Cg]=this._mousemoveThrottled,t[Tg]=this._mouseleaveHandler,t[Sg]=this._mousedownHandler,t[Mg]=this._keydownHandler,t.focus=this._focusHandler,t.blur=this._blurHandler,t)),this.domEvents&&(this.domEvents.destroy(),delete this.domEvents),this._mouseMoveTrackHandler&&ue(document,((t={})[Cg]=this._mouseMoveTrackHandler,t)),this._focusState=null,this.element._kendoExportVisual=null,this._destroyView(),this._destroySurface(),this._clearRedrawTimeout()},f.prototype._destroySurface=function(){var t=this.surface;t&&(t.unbind("mouseenter",this._surfaceMouseenterHandler),t.unbind("mouseleave",this._surfaceMouseleaveHandler),t.destroy(),this.surface=null)},f.prototype._destroySelections=function(){var t=this._selections;if(t)for(;0<t.length;)t.shift().destroy()},f.prototype._destroyView=function(){var t=this._model;t&&(t.destroy(),this._model=null),this._unsetActivePoint(),this._clearFocusedElement(),this._resetDrilldownPoint(),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)},f);function f(t,e,i,o){var r=this,o=(void 0===o&&(o={}),kg.call(this),this.observers=[],this.addObserver(o.observer),this.chartService=new Go(this,o),this.chartService.theme=i,this._initElement(t),O({},this.options,e));this._originalOptions=O({},o),this._theme=i,this._initTheme(o,i),this._focusState={},this._initHandlers(),this._initSurface(),this.bindCategories(),de.preloadFonts(e,function(){r.fontLoaded=!0,r._destroyed||(r.trigger("init"),r._redraw(),r._attachEvents(),r._restoreOverlayElement())})}function Lg(t,e){if(t)for(var i=0;i<t.length;i++)if(t[i].category===e)return[t[i]]}function Ig(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 Bg(t){for(var e={},i=0;i<t.length;i++){var o=t[i],r=o.options.name;r&&(e[r]=o.range())}return e}var Eg,Rg=["data","categories"];function Vg(t,e){for(var i in e){var o,r,n;!u(i,Rg)&&je(e,i)&&(o=e[i],r=t[i],k(r))&&((n=null===o)||!k(o)?(delete t[i],n&&delete e[i]):r&&Ot(o)&&Ot(r)&&Vg(r,o))}}function jg(t){for(var e=0;e<t.length;e++)t[e].notifyRender()}e($,{renderAs:"",chartArea:{},legend:{visible:!0,labels:{},accessibility:{},focusHighlight:{border:{opacity:1,color:Y,width:2}}},categoryAxis:{},seriesDefaults:{type:ps,data:[],highlight:{visible:!0},labels:{},negativeValues:{visible:!1},accessibility:{},focusHighlight:{border:{opacity:1,width:2},zIndex:200}},series:[],seriesColors:null,tooltip:{visible:!1},transitions:!0,valueAxis:{narrowRange:!1},plotArea:{},title:{},xAxis:{},yAxis:{},panes:[{}],pannable:!1,zoomable:!1});let zg=$,Dg=((Eg=Xu)&&(Fg.__proto__=Eg),((Fg.prototype=Object.create(Eg&&Eg.prototype)).constructor=Fg).prototype._slotAnchor=function(t,e){var i=this.plotArea.categoryAxis.options.vertical,o=i?{horizontal:"left",vertical:"center"}:{horizontal:"center",vertical:"bottom"};return{point:i?new A(this.plotArea.box.x2,e.center().y):new A(e.center().x,-2),align:o}},Fg.prototype._defaultAnchor=function(t,e){return this._slotAnchor({},e)},Fg);function Fg(){Eg.apply(this,arguments)}let Hg=Dg;var Ng=[ns,ls];function Ug(t){for(var e=[],i=0;i<t.length;i++){var o=t[i];e[i]=o.style.display,o.style.display="none"}return e}function Gg(t,e){for(var i=0;i<t.length;i++)t[i].style.display=e[i]}function Wg(t){return m(t)?[t]:t}(Xg=zg)&&(qg.__proto__=Xg),((qg.prototype=Object.create(Xg&&Xg.prototype)).constructor=qg).prototype._setElementClass=function(t){vt(t,"k-sparkline")},qg.prototype._initElement=function(t){Xg.prototype._initElement.call(this,t),this._initialWidth=Math.floor(ne(t).width)},qg.prototype._resize=function(){var t=this.element,e=Ug(t.childNodes);this._initialWidth=Math.floor(ne(t).width),Gg(t.childNodes,e),Xg.prototype._resize.call(this)},qg.prototype._modelOptions=function(){var t=this.options,e=this._surfaceWrap(),i=Ug(e.childNodes),o=document.createElement("span"),t=(o.innerHTML=" ",e.appendChild(o),O({width:this._autoWidth,height:ne(e).height,transitions:t.transitions},t.chartArea,{inline:!0,align:!1}));return ne(e,{width:t.width,height:t.height}),e.removeChild(o),Gg(e.childNodes,i),this.surface&&this.surface.resize(),t},qg.prototype._surfaceWrap=function(){var t;return this.stage||(t=this.stage=document.createElement("span"),this.element.appendChild(t)),this.stage},qg.prototype._createPlotArea=function(t){t=Xg.prototype._createPlotArea.call(this,t);return this._autoWidth=this._initialWidth||this._calculateWidth(t),t},qg.prototype._calculateWidth=function(t){for(var e=this.options,i=w(e.chartArea.margin),o=t.charts,r=this._surfaceWrap(),n=0,s=0;s<o.length;s++){var a=o[s],l=(a.options.series||[])[0];if(l){if(l.type===ns)return 150;if(l.type===ls)return 150;if(l.type===ms)return ne(r).height;var h=a.categoryAxis;h&&(h=h.categoriesCount()*(!a.options.isStacked&&u(l.type,[ps,Is])?a.seriesOptions.length:1),n=Math.max(n,h))}}t=n*e.pointWidth;return 0<t&&(t+=i.left+i.right),t},qg.prototype._createSharedTooltip=function(t){return new Hg(this._plotArea,t)},qg.normalizeOptions=function(t){t=Wg(t);return(t=yt(t)?{seriesDefaults:{data:t}}:O({},t)).series||(t.series=[{data:Wg(t.data)}]),O(t,{seriesDefaults:{type:t.type}}),t=u(t.series[0].type,Ng)||u(t.seriesDefaults.type,Ng)?O({},{categoryAxis:{crosshair:{visible:!1}}},t):t};var Xg,Yg,Ja=qg;function qg(){Xg.apply(this,arguments)}e(Ja,{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}]});let Zg=Ja,Qg=((Yg=M.drawing.Animation)&&(Kg.__proto__=Yg),((Kg.prototype=Object.create(Yg&&Yg.prototype)).constructor=Kg).prototype.setup=function(){this._initialOpacity=parseFloat(Bt(this.element,"opacity").opacity)},Kg.prototype.step=function(t){Bt(this.element,{opacity:String(Xt(this._initialOpacity,0,t))})},Kg.prototype.abort=function(){Yg.prototype.abort.call(this),Bt(this.element,{display:"none",opacity:String(this._initialOpacity)})},Kg.prototype.cancel=function(){Yg.prototype.abort.call(this),Bt(this.element,{opacity:String(this._initialOpacity)})},Kg);function Kg(){Yg.apply(this,arguments)}let $g=Qg;function Jg(t,e){var i=document.createElement("div");return i.className=t,e&&(i.style.cssText=e),i}(ty=M.Class)&&(ey.__proto__=ty),((ey.prototype=Object.create(ty&&ty.prototype)).constructor=ey).prototype.createElements=function(){var t=this.element=Jg("k-navigator-hint","display: none; position: absolute; top: 1px; left: 1px;"),e=this.tooltip=Jg("k-tooltip k-chart-tooltip"),i=this.scroll=Jg("k-scroll");e.innerHTML=" ",t.appendChild(e),t.appendChild(i)},ey.prototype.show=function(t,e,i){var o=this.element,r=this.options,n=this.scroll,s=this.tooltip,a=fr(d(t)+d(e-t)/2),l=.4*i.width(),h=i.center().x-l,p=(i.center().x-h)/(r.max-r.min),a=a-r.min,c=this.chartService.intl.format(r.format,t,e),r=jt(r),r=(this.clearHideTimeout(),this._visible||(Bt(o,{visibility:"hidden",display:"block"}),this._visible=!0),r&&(c=r({from:t,to:e})),s.innerHTML=c,Bt(s,{left:i.center().x-s.offsetWidth/2,top:i.y1}),Bt(s,["marginTop","borderTopWidth","height"]));Bt(n,{width:l,left:h+a*p,top:i.y1+r.marginTop+r.borderTopWidth+r.height/2}),Bt(o,{visibility:"visible"})},ey.prototype.clearHideTimeout=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this._hideAnimation&&this._hideAnimation.cancel()},ey.prototype.hide=function(){var t=this;this.clearHideTimeout(),this._hideTimeout=setTimeout(function(){t._visible=!1,t._hideAnimation=new $g(t.element),t._hideAnimation.setup(),t._hideAnimation.play()},this.options.hideDelay)},ey.prototype.destroy=function(){this.clearHideTimeout(),this.container&&this.container.removeChild(this.element),delete this.container,delete this.chartService,delete this.element,delete this.tooltip,delete this.scroll};var ty,h=ey;function ey(t,e,i){ty.call(this),this.options=O({},this.options,i),this.container=t,this.chartService=e;i=Bt(t,["paddingLeft","paddingTop"]);this.chartPadding={top:i.paddingTop,left:i.paddingLeft},this.createElements(),t.appendChild(this.element)}e(h,{format:"{0:d} - {1:d}",hideDelay:500});let iy=h;var oy,ry,ny="_navigator",sy=ny,ay="_default";function ly(t){oy.call(this),this.chart=t;var e=this.options=O({},this.options,t.options.navigator),i=e.select;i&&(i.from=this.parseDate(i.from),i.to=this.parseDate(i.to)),k(e.hint.visible)||(e.hint.visible=e.visible),this.chartObserver=new Zt(this,((i={})[Zs]="_drag",i[Qs]="_dragEnd",i[Js]="_zoom",i[ta]="_zoomEnd",i)),t.addObserver(this.chartObserver)}function hy(){}(oy=M.Class)&&(ly.__proto__=oy),((ly.prototype=Object.create(oy&&oy.prototype)).constructor=ly).prototype.parseDate=function(t){return Sr(this.chart.chartService.intl,t)},ly.prototype.clean=function(){this.selection&&(this.selection.destroy(),this.selection=null),this.hint&&(this.hint.destroy(),this.hint=null)},ly.prototype.destroy=function(){this.chart&&(this.chart.removeObserver(this.chartObserver),delete this.chart),this.clean()},ly.prototype.redraw=function(){this._redrawSelf(),this.initSelection()},ly.prototype.initSelection=function(){var t=this.chart,e=this.options,i=this.mainAxis(),o=i.roundedRange(),r=o.min,o=o.max,n=e.select,s=n.from,a=n.to,n=n.mousewheel,l=(hy.prototype=i,new hy);0!==i.categoriesCount()&&(this.clean(),l.box=i.box,this.selection=new Fu(t,l,{min:r,max:o,from:s||r,to:a||o,mousewheel:_(n,{zoom:"left"}),visible:e.visible},new Zt(this,{selectStart:"_selectStart",select:"_select",selectEnd:"_selectEnd"})),e.hint.visible)&&(this.hint=new iy(t.element,t.chartService,{min:r,max:o,template:jt(e.hint),format:e.hint.format}))},ly.prototype.setRange=function(){var t=this.chart._createPlotArea(!0).namedCategoryAxes[sy].roundedRange(),e=t.min,t=t.max,i=this.options.select||{},o=i.from||e,r=i.to||t;this.options.select=O({},i,{from:o=o<e?e:o,to:r=t<r?t:r}),this.filterAxes()},ly.prototype._redrawSelf=function(t){var e=this.chart._plotArea;e&&e.redraw(he(e.panes),t)},ly.prototype.redrawSlaves=function(){var t=this.chart,e=t._plotArea,i=e.panes.filter(function(t){return t.options.name!==ny});e.srcSeries=t.options.series,e.options.categoryAxis=t.options.categoryAxis,e.clearSeriesPointsCache(),e.redraw(i)},ly.prototype._drag=function(t){var e=this.chart,i=this.selection,o=e._eventCoordinates(t.originalEvent),r=this.mainAxis(),n=r.roundedRange(),r=r.pane.box.containsPoint(o),o=e._plotArea.categoryAxis,e=t.axisRanges[o.options.name],t=this.options.select;e&&!r&&i&&(o=t.from&&t.to?d(t.to)-d(t.from):d(i.options.to)-d(i.options.from),r=fr(x(d(e.min),n.min,d(n.max)-o)),t=fr(x(d(r)+o,d(n.min)+o,n.max)),this.options.select={from:r,to:t},this.options.liveDrag&&(this.filterAxes(),this.redrawSlaves()),i.set(r,t),this.showHint(r,t))},ly.prototype._dragEnd=function(){this.filterAxes(),this.filter(),this.redrawSlaves(),this.hint&&this.hint.hide()},ly.prototype.readSelection=function(){var t=this.selection.options,e=t.from,t=t.to,i=this.options.select;i.from=e,i.to=t},ly.prototype.filterAxes=function(){for(var t=this.options.select,e=this.chart.options.categoryAxis,i=(t=void 0===t?{}:t).from,o=t.to,r=0;r<e.length;r++){var n=e[r];n.pane!==ny&&(n.min=i,n.max=o)}},ly.prototype.filter=function(){var t,e,i=this.chart,o=this.options.select;i.requiresHandlers(["navigatorFilter"])&&(e=this.mainAxis(),t={from:o.from,to:o.to},"category"!==e.options.type&&(e=new jr(O({baseUnit:"fit"},i.options.categoryAxis[0],{categories:[o.from,o.to]}),i.chartService).options,t.from=yr(e.min,-e.baseUnitStep,e.baseUnit),t.to=yr(e.max,e.baseUnitStep,e.baseUnit)),this.chart.trigger("navigatorFilter",t))},ly.prototype._zoom=function(t){var e,i,o=this.chart._plotArea.categoryAxis,r=this.selection,n=this.options,s=n.select,n=n.liveDrag,a=this.mainAxis(),l=t.delta;r&&(e=a.categoryIndex(r.options.from),a=a.categoryIndex(r.options.to),i=this.chart._eventCoordinates(t.originalEvent),t.originalEvent.preventDefault(),1<Math.abs(l)&&(l*=3),1<a-e?(r.zoom(l,i),this.readSelection()):(o.options.min=s.from,s.from=o.scaleRange(-t.delta*this.chart._mousewheelZoomRate(),i).min),n&&(this.filterAxes(),this.redrawSlaves()),r.set(s.from,s.to),this.showHint(this.options.select.from,this.options.select.to))},ly.prototype._zoomEnd=function(t){this._dragEnd(t)},ly.prototype.showHint=function(t,e){var i=this.chart._plotArea;this.hint&&this.hint.show(t,e,i.backgroundBox())},ly.prototype._selectStart=function(t){return this.chart._selectStart(t)},ly.prototype._select=function(t){return this.showHint(t.from,t.to),this.chart._select(t)},ly.prototype._selectEnd=function(t){return this.hint&&this.hint.hide(),this.readSelection(),this.filterAxes(),this.filter(),this.redrawSlaves(),this.chart._selectEnd(t)},ly.prototype.mainAxis=function(){var t=this.chart._plotArea;if(t)return t.namedCategoryAxes[sy]},ly.prototype.select=function(t,e){var i=this.options.select;return t&&e&&(i.from=this.parseDate(t),i.to=this.parseDate(e),this.filterAxes(),this.filter(),this.redrawSlaves(),this.selection.set(t,e)),{from:i.from,to:i.to}},ly.setup=function(t,e){var i,o,r;void 0===e&&(e={}),(t=void 0===t?{}:t).__navi||(t.__navi=!0,i=O({},e.navigator,t.navigator),o=t.panes=[].concat(t.panes),r=O({},i.pane,{name:ny}),i.visible||(r.visible=!1,r.height=.1),"top"!==t.navigator.position?o.push(r):o.unshift(r),o.forEach(function(t){t.name=t.name||ay}),ly.attachAxes(t,i),ly.attachSeries(t,i,e))},ly.attachAxes=function(t,e){var i=e.series||[],o=t.categoryAxis=[].concat(t.categoryAxis),t=t.valueAxis=[].concat(t.valueAxis),i=(o.concat(t).forEach(function(t){t.pane=t.pane||ay}),0===Aa(i,Vs).length),i=O({type:"date",pane:ny,roundToBaseUnit:!i,justified:i,_collapse:!1,majorTicks:{visible:!0},tooltip:{visible:!1},labels:{step:1},autoBind:e.autoBindElements,autoBaseUnitSteps:{minutes:[1],hours:[1,2],days:[1,2],weeks:[],months:[1],years:[1]}}),r=e.categoryAxis;o.push(O({},i,{maxDateGroups:200},r,{name:sy,title:null,baseUnit:"fit",baseUnitStep:"auto",labels:{visible:!1},majorTicks:{visible:!1}}),O({},i,r,{name:sy+"_labels",maxDateGroups:20,baseUnitStep:"auto",labels:{position:""},plotBands:[],autoBaseUnitSteps:{minutes:[]},_overlap:!0}),O({},i,r,{name:sy+"_ticks",maxDateGroups:200,majorTicks:{width:.5},plotBands:[],title:null,labels:{visible:!1,mirror:!0},_overlap:!0})),t.push(O({name:sy,pane:ny,majorGridLines:{visible:!1},visible:!1},e.valueAxis))},ly.attachSeries=function(t,e,i){for(var o=t.series=t.series||[],r=[].concat(e.series||[]),n=i.seriesColors,s=e.seriesDefaults,a=0;a<r.length;a++)o.push(O({color:n[a%n.length],categoryField:e.dateField,visibleInLegend:!1,tooltip:{visible:!1}},s,r[a],{axis:sy,categoryAxis:sy,autoBind:e.autoBindElements}))};let py=ly,cy=((ry=zg)&&(uy.__proto__=ry),((uy.prototype=Object.create(ry&&ry.prototype)).constructor=uy).prototype.applyDefaults=function(t,e){var i=ne(this.element).width||600,i={seriesDefaults:{categoryField:t.dateField},axisDefaults:{categoryAxis:{name:"default",majorGridLines:{visible:!1},labels:{step:2},majorTicks:{visible:!1},maxDateGroups:Math.floor(i/28)}}},e=e&&O({},e,i);py.setup(t,e),ry.prototype.applyDefaults.call(this,t,e)},uy.prototype._setElementClass=function(t){vt(t,"k-chart k-stockchart")},uy.prototype.setOptions=function(t){this.destroyNavigator(),ry.prototype.setOptions.call(this,t)},uy.prototype.noTransitionsRedraw=function(){var t=this.options.transitions;this.options.transitions=!1,this._fullRedraw(),this.options.transitions=t},uy.prototype._resize=function(){this.noTransitionsRedraw()},uy.prototype._redraw=function(){var t=this.navigator;!this._dirty()&&t&&t.options.partialRedraw?t.redrawSlaves():this._fullRedraw()},uy.prototype._dirty=function(){var t=this.options,t=Nt([].concat(t.series,t.navigator.series),function(t){return t&&t.visible}).length,e=this._seriesCount!==t;return this._seriesCount=t,e},uy.prototype._fullRedraw=function(){var t=this.navigator;t||(t=this.navigator=new py(this),this.trigger("navigatorCreated",{navigator:t})),t.clean(),t.setRange(),ry.prototype._redraw.call(this),t.initSelection()},uy.prototype._trackSharedTooltip=function(t){var e=this._plotArea.paneByPoint(t);e&&e.options.name===ny?this._unsetActivePoint():ry.prototype._trackSharedTooltip.call(this,t)},uy.prototype.bindCategories=function(){ry.prototype.bindCategories.call(this),this.copyNavigatorCategories()},uy.prototype.copyNavigatorCategories=function(){for(var t,e=[].concat(this.options.categoryAxis),i=0;i<e.length;i++){var o=e[i];o.name===sy?t=o.categories:t&&o.pane===ny&&(o.categories=t)}},uy.prototype.destroyNavigator=function(){this.navigator&&(this.navigator.destroy(),this.navigator=null)},uy.prototype.destroy=function(){this.destroyNavigator(),ry.prototype.destroy.call(this)},uy.prototype._stopChartHandlers=function(t){var e=this._eventCoordinates(t),e=this._plotArea.paneByPoint(e);return ry.prototype._stopChartHandlers.call(this,t)||e&&e.options.name===ny},uy.prototype._toggleDragZoomEvents=function(){this._dragZoomEnabled||(this.element.style.touchAction="none",this._dragZoomEnabled=!0)},uy);function uy(){ry.apply(this,arguments)}e(cy,{dateField:"date",axisDefaults:{categoryAxis:{type:"date",baseUnit:"fit",justified:!0},valueAxis:{narrowRange:!0,labels:{format:"C"}}},navigator:{select:{},seriesDefaults:{markers:{visible:!1},tooltip:{visible:!1},highlight:{visible:!1},line:{width:2}},hint:{},visible:!0},tooltip:{visible:!0},legend:{visible:!1}});let dy=cy;var fy="arrowPointer",gy="barPointer",yy=Math.PI/180,vy="inside",gl="linear",my="outside",l="radialPointer",js="radialRangePointer";function xy(t,e){var i=t.getOrigin(),o=t.getSize(),e=w(e);return t.setOrigin([i.x-e.left,i.y-e.top]),t.setSize([o.width+(e.left+e.right),o.height+(e.top+e.bottom)]),t}var _y=M.drawing.Group,by=M.drawing.Path,wy=M.drawing.Text;function ky(t,e){var i=t.box,o=t.children[0].box,r=e.border||{},n=e.background||"",i=by.fromRect(new M.geometry.Rect([i.x1,i.y1],[i.width(),i.height()]),{stroke:{}}),t=new wy(t.text,new M.geometry.Point(o.x1,o.y1),{font:e.font,fill:{color:e.color}}),o=xy(t.bbox().clone(),e.padding),e=by.fromRect(o,{stroke:{color:r.width?r.color:"",width:r.width,opacity:r.opacity,dashType:r.dashType,lineJoin:"round",lineCap:"round"},fill:{color:n}}),o=new _y;return o.append(i),o.append(e),o.append(t),o}function Ay(t,e,i){var o=k(t.from)?t.from:nt,r=k(t.to)?t.to:rt;return t.from=Math.max(Math.min(r,o),e),t.to=Math.min(Math.max(r,o),i),t}function Sy(t,e){e=w(e);return e.left=-e.left,e.top=-e.top,e.right=-e.right,e.bottom=-e.bottom,xy(t,e)}var Cy,Py=M.drawing.Path,Ty=M.drawing.Surface,i=((Cy=M.Class)&&(My.__proto__=Cy),((My.prototype=Object.create(Cy&&Cy.prototype)).constructor=My).prototype.destroy=function(){this.surface&&(this.surface.destroy(),this.surface=null),delete this.element,delete this.surfaceElement},My.prototype.value=function(t){var e=this.pointers[0];if(0===arguments.length)return e.value();e.value(t),this._setValueOptions(t)},My.prototype._draw=function(){var t=this.surface;t.clear(),t.draw(this._visuals)},My.prototype.exportVisual=function(){return this._visuals},My.prototype.allValues=function(t){var e=this.pointers,i=[];if(0===arguments.length){for(var o=0;o<e.length;o++)i.push(e[o].value());return i}if(yt(t))for(var r=0;r<t.length;r++)m(t[r])&&e[r].value(t[r]);this._setValueOptions(t)},My.prototype._setValueOptions=function(t){for(var e=[].concat(this.options.pointer),i=[].concat(t),o=0;o<i.length;o++)e[o].value=i[o]},My.prototype.resize=function(){this.noTransitionsRedraw()},My.prototype.noTransitionsRedraw=function(){var t=this.options.transitions;this._toggleTransitions(!1),this.redraw(),this._toggleTransitions(t)},My.prototype.redraw=function(){var t=this._surfaceSize(),t=new M.geometry.Rect([0,0],[t.width,t.height]),t=(this._initSurface(),this.gaugeArea=this._createGaugeArea(),this._createModel(),Sy(t.bbox(),this._gaugeAreaMargin));this.reflow(t)},My.prototype.setOptions=function(t,e){this._originalOptions=O(this._originalOptions,t),this.options=O({},this._originalOptions),this._initTheme(e),this.redraw()},My.prototype.setDirection=function(t){this.contextService.rtl=Boolean(t),this.surface&&"svg"===this.surface.type&&(this.surface.destroy(),this.surface=null)},My.prototype.setIntlService=function(t){this.contextService.intl=t},My.prototype._initTheme=function(t){var e=t||this.theme||{},t=(this.theme=e,this.options=O({},e,this.options),this.options),i=t.pointer;if(yt(i)){for(var o=[],r=0;r<i.length;r++)o.push(O({},e.pointer,i[r]));t.pointer=o}},My.prototype._createGaugeArea=function(){var t=this.options.gaugeArea,e=this.surface.size(),i=t.border||{},e=new M.geometry.Rect([0,0],[e.width,e.height]);return this._gaugeAreaMargin=t.margin||5,0<i.width&&(e=Sy(e,i.width)),Py.fromRect(e,{stroke:{color:i.width?i.color:"",width:i.width,opacity:i.opacity,dashType:i.dashType,lineJoin:"round",lineCap:"round"},fill:{color:t.background}})},My.prototype._initSurface=function(){var t=this.options,e=this.surface,i=this._surfaceElement(),o=this._surfaceSize();ne(i,o),e&&e.options.type===t.renderAs?(this.surface.clear(),this.surface.resize()):(e&&e.destroy(),this.surface=Ty.create(i,{type:t.renderAs}))},My.prototype._surfaceSize=function(){var t=this.options,e=this._getSize();return t.gaugeArea&&O(e,t.gaugeArea),e},My.prototype._surfaceElement=function(){return this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.element.appendChild(this.surfaceElement)),this.surfaceElement},My.prototype.getSize=function(){return this._getSize()},My.prototype._getSize=function(){var t=this.element,e=this._defaultSize(),i=t.offsetWidth,t=t.offsetHeight;return{width:i=i||e.width,height:t=t||e.height}},My.prototype._defaultSize=function(){return{width:200,height:200}},My.prototype._toggleTransitions=function(t){this.options.transitions=t;for(var e=0;e<this.pointers.length;e++)this.pointers[e].options.animation.transitions=t},My);function My(t,e,i,o){void 0===o&&(o={}),Cy.call(this),this.element=t,this.theme=i,this.contextService=new Go(this,o),this._originalOptions=O({},this.options,e),this.options=O({},this._originalOptions),this._initTheme(i),this.redraw()}e(i,{plotArea:{},theme:"default",renderAs:"",pointer:{},scale:{},gaugeArea:{}});let Oy=i;var Ly=M.drawing.Path,Iy=M.drawing.Group,By=M.geometry.Point;function Ey(t,e,i,o){var r,n,s,a,l,h,p=e.length;if(o.visible)for(var c=i.mirror,u=i.lineBox,d=o.skip;d<p;d+=o.step)d%o.skipUnit!=0&&(i.tickX=c?u.x2:u.x2-o.size,i.tickY=c?u.y1-o.size:u.y1,i.position=e[d],t.append((n=o,h=l=a=s=void 0,a=(r=i).position,l=i.tickX,h=i.tickY,r=i.vertical?(s=new By(l,a),new By(l+n.size,a)):(s=new By(a,h),new By(a,h+n.size)),new Ly({stroke:{color:n.color,width:n.width}}).moveTo(s).lineTo(r))))}(Ry=Xr)&&(jy.__proto__=Ry),((jy.prototype=Object.create(Ry&&Ry.prototype)).constructor=jy).prototype.initUserOptions=function(t){t=O({},this.options,t);return(t=O({},t,{labels:{mirror:t.mirror}})).majorUnit=t.majorUnit||Bi(t.min,t.max),t},jy.prototype.initFields=function(){},jy.prototype.render=function(){var t=this.elements=new Iy,e=this.renderLabels(),i=this.renderLine(),o=this.renderTicks(),r=this.renderRanges();return t.append(i,e,o,r),t},jy.prototype.renderRanges=function(){for(var t=this.options,e=t.min,i=t.max,o=t.vertical,r=t.labels.mirror,n=t.ranges||[],s=new Iy,a=n.length,l=t.rangeSize||t.minorTicks.size/2,h=0;h<a;h++){var p=Ay(n[h],e,i),c=this.getSlot(p.from,p.to),u=o?this.lineBox():c,c=o?c:this.lineBox();o?u.x1-=l*(r?-1:1):c.y2+=l*(r?-1:1),s.append(Ly.fromRect(new M.geometry.Rect([u.x1,c.y1],[u.x2-u.x1,c.y2-c.y1]),{fill:{color:p.color,opacity:p.opacity},stroke:{}}))}return s},jy.prototype.renderLabels=function(){for(var t=this.labels,e=this.options,i=new Iy,o=0;o<t.length;o++)i.append(ky(t[o],e.labels));return i},jy.prototype.renderLine=function(){var t=this.options.line,e=this.lineBox(),i=new Iy;return 0<t.width&&t.visible&&((t=new Ly({stroke:{color:t.color,dashType:t.dashType,width:t.width}})).moveTo(e.x1,e.y1).lineTo(e.x2,e.y2),i.append(t)),i},jy.prototype.renderTicks=function(){var t=new Iy,e=this.options,i=e.majorTicks.visible?e.majorUnit:0,o={vertical:e.vertical,mirror:e.labels.mirror,lineBox:this.lineBox()};return Ey(t,this.getMajorTickPositions(),o,e.majorTicks),Ey(t,this.getMinorTickPositions(),o,O({},{skipUnit:i/e.minorUnit},e.minorTicks)),t};var Ry,Vy,t=jy;function jy(t,e){t=t||{};!k(t.reverse)&&!1===t.vertical&&(e||{}).rtl&&(t=Object.assign({},t,{reverse:!0})),Ry.call(this,0,1,t,e),this.options.minorUnit=this.options.minorUnit||this.options.majorUnit/10}e(t,{min:0,max:50,majorTicks:{size:15,align:vy,color:Y,width:.5,visible:!0},minorTicks:{size:10,align:vy,color:Y,width:.5,visible:!0},line:{width:.5},labels:{position:vy,padding:2},mirror:!1,_alignLines:!1});let zy=t,Dy=((Vy=M.Class)&&(Fy.__proto__=Vy),((Fy.prototype=Object.create(Vy&&Vy.prototype)).constructor=Fy).prototype.value=function(t){var e=this.options,i=e.value;if(0===arguments.length)return i;var i=this.scale.options,o=i.min,i=i.max;e._oldValue=k(e._oldValue)?e.value:o,e.value=x(t,o,i),this.elements&&this.repaint()},Fy);function Fy(t,e){Vy.call(this);var i=t.options,o=i.min,i=i.max,e=this.options=O({},this.options,e);e.fill=e.color,this.scale=t,k(e.value)?e.value=x(e.value,o,i):e.value=o}e(Dy,{color:Y});var Hy,Ny,Ds=Dy,Fs=((Hy=Ds)&&(Uy.__proto__=Hy),((Uy.prototype=Object.create(Hy&&Hy.prototype)).constructor=Uy).prototype.reflow=function(){var t,e,i,o=this.options,r=this.scale,n=r.options,s=n.mirror,n=n.vertical,r=r.lineBox(),a=o.track.size||o.size,l=o.size/2,h=w(o.margin),h=n?h[s?"left":"right"]:h[s?"bottom":"top"],h=s?-h:h;n?(i=new I(r.x1+h,r.y1,r.x1+h,r.y2),s?i.x1-=a:i.x2+=a,o.shape!==gy&&(t=e=new I(r.x2+h,r.y1-l,r.x2+h,r.y2+l))):(i=new I(r.x1,r.y1-h,r.x2,r.y1-h),s?i.y2+=a:i.y1-=a,o.shape!==gy&&(t=e=new I(r.x1-l,r.y1-h,r.x2+l,r.y1-h))),this.trackBox=i,this.pointerRangeBox=e,this.box=t||i.clone().pad(o.border.width)},Uy.prototype.getElementOptions=function(){var t=this.options;return{fill:{color:t.color,opacity:t.opacity},stroke:k(t.border)?{color:t.border.width?t.border.color||t.color:"",width:t.border.width,dashType:t.border.dashType,opacity:t.opacity}:null}},Uy.prototype._margin=function(){var t=this.scale,e=this.options,t=t.options,i=t.mirror,t=t.vertical,e=w(e.margin);return t?e[i?"left":"right"]:e[i?"bottom":"top"]},Uy);function Uy(t,e){Hy.call(this,t,e),this.options=O({track:{visible:k(e.track)}},this.options)}e(Fs,{shape:gy,track:{border:{width:1}},color:Y,border:{width:1},opacity:1,margin:w(3),animation:{type:gy},visible:!0});let Gy=Fs,Wy=((Ny=M.drawing.Animation)&&(Xy.__proto__=Ny),((Xy.prototype=Object.create(Ny&&Ny.prototype)).constructor=Xy).prototype.setup=function(){var t=this.options,e=t.margin,i=t.from,o=t.to,r=t.vertical,n=r?"x1":"y1",r=(t.mirror===r?(i[n]-=e,o[n]-=e):(i[n]+=e,o[n]+=e),this.fromScale=new M.geometry.Point(i.x1,i.y1)),n=this.toScale=new M.geometry.Point(o.x1,o.y1);0!==t.duration&&(t.duration=Math.max(r.distanceTo(n)/t.duration*1e3,1))},Xy.prototype.step=function(t){var e=Xt(this.fromScale.x,this.toScale.x,t),t=Xt(this.fromScale.y,this.toScale.y,t);this.element.transform(M.geometry.transform().translate(e,t))},Xy);function Xy(){Ny.apply(this,arguments)}e(Wy,{easing:gl,duration:250}),M.drawing.AnimationFactory.current.register(fy,Wy);let Yy=Wy;var qy,Zy,Qy=M.geometry.Point,Ky=M.drawing.Path;function $y(t,e){qy.call(this,t,e),k(this.options.size)||(this.options.size=.6*this.scale.options.majorTicks.size)}(qy=Gy)&&($y.__proto__=qy),(($y.prototype=Object.create(qy&&qy.prototype)).constructor=$y).prototype.pointerShape=function(){var t=this.scale,e=this.options.size,i=e/2,o=t.options.mirror?-1:1;return t.options.vertical?[new Qy(0,0-i),new Qy(0-o*e,0),new Qy(0,0+i)]:[new Qy(0-i,0),new Qy(0,0+o*e),new Qy(0+i,0)]},$y.prototype.repaint=function(){var t=this.scale,e=this.options,t=new Yy(this.elements,O(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()},$y.prototype.render=function(){var t=this.scale,e=this.options,i=this.getElementOptions(),o=this.pointerShape(e.value),i=(e.animation.type=fy,new Ky({stroke:i.stroke,fill:i.fill}).moveTo(o[0]).lineTo(o[1]).lineTo(o[2]).close()),o=t.getSlot(e.value);return i.transform(M.geometry.transform().translate(o.x1,o.y1)),this.elements=i};let Jy=$y,tv=((Zy=M.drawing.Animation)&&(ev.__proto__=Zy),((ev.prototype=Object.create(Zy&&Zy.prototype)).constructor=ev).prototype.setup=function(){var t=this.options,e=this.axis=t.vertical?v:y,i=this.to=t.newPoints[0][e],e=this.from=t.oldPoints[0][e];0!==t.duration&&(t.duration=Math.max(Math.abs(i-e)/t.speed*1e3,1)),this._set(e)},ev.prototype.step=function(t){t=Xt(this.from,this.to,t);this._set(t)},ev.prototype._set=function(t){var e="set"+this.axis.toUpperCase(),i=this.options.newPoints;i[0][e](t),i[1][e](t)},ev);function ev(){Zy.apply(this,arguments)}e(tv,{easing:gl,speed:250}),M.drawing.AnimationFactory.current.register(gy,tv);let iv=tv;var ov,rv=M.drawing.Group,nv=M.drawing.Path;function sv(t,e){ov.call(this,t,e),k(this.options.size)||(this.options.size=.3*this.scale.options.majorTicks.size)}(ov=Gy)&&(sv.__proto__=ov),((sv.prototype=Object.create(ov&&ov.prototype)).constructor=sv).prototype.pointerShape=function(t){var e=this.scale,i=this.options,o=e.options,r=o.mirror,o=o.vertical,r=r===o?-1:1,i=i.size*r,n=e.getSlot(e.options.min),e=e.getSlot(t),t=o?v:y,s=o?y:v,r=this._margin()*r,a=new M.geometry.Point,n=(a[t]=n[t+"1"],a[s]=n[s+"1"],new M.geometry.Point),t=(n[t]=e[t+"1"],n[s]=e[s+"1"],o?(a.translate(r,0),n.translate(r,0)):(a.translate(0,r),n.translate(0,r)),n.clone()),e=a.clone();return o?(t.translate(i,0),e.translate(i,0)):(t.translate(0,i),e.translate(0,i)),[a,n,t,e]},sv.prototype.repaint=function(){var t=this.scale,e=this.options,i=this.pointerShape(e.value),o=this.pointerPath,r=this.pointerShape(e._oldValue),o=(o.moveTo(i[0]).lineTo(i[1]).lineTo(i[2]).lineTo(i[3]).close(),new iv(o,O(e.animation,{reverse:t.options.reverse,vertical:t.options.vertical,oldPoints:[r[1],r[2]],newPoints:[i[1],i[2]]})));!1===e.animation.transitions&&(o.options.duration=0),o.setup(),o.play()},sv.prototype.render=function(){var t=new rv,e=this.getElementOptions(),e=(this.options.track.visible&&t.append(this.renderTrack()),this.pointerPath=new nv({stroke:e.stroke,fill:e.fill}));return t.append(e),this.elements=t},sv.prototype.renderTrack=function(){var t=this.options.track,e=t.border||{},i=this.trackBox.clone().pad(e.width||0);return new nv.fromRect(i.toRect(),{fill:{color:t.color,opacity:t.opacity},stroke:{color:e.width?e.color||t.color:"",width:e.width,dashType:e.dashType}})};let av=sv;var lv,hv=M.drawing.Group,zs=((lv=Oy)&&(pv.__proto__=lv),((pv.prototype=Object.create(lv&&lv.prototype)).constructor=pv).prototype.reflow=function(t){var e=this.pointers,i=t.origin.x,o=t.origin.y,i=new I(i,o,i+t.width(),o+t.height());this.scale.reflow(i),this._shrinkScaleWidth(i);for(var r=0;r<e.length;r++)e[r].reflow();this.bbox=this._getBox(i),this._alignElements(),this._shrinkElements(),this._buildVisual(),this._draw()},pv.prototype._buildVisual=function(){var t=new hv,e=this.scale.render(),i=this.pointers;t.append(this.gaugeArea),t.append(e);for(var o=0;o<i.length;o++){var r=i[o];t.append(r.render()),r.value(r.options.value)}this._visuals=t},pv.prototype._createModel=function(){var t=this.options,e=this.scale=new zy(t.scale,this.contextService);this.pointers=[];for(var i=yt(i=t.pointer)?i:[i],o=0;o<i.length;o++){var r=O({},i[o],{animation:{transitions:t.transitions}}),n="arrow"===r.shape?Jy:av;this.pointers.push(new n(e,r))}},pv.prototype._defaultSize=function(){var t=this.options.scale.vertical;return{width:t?60:200,height:t?200:60}},pv.prototype._getBox=function(t){for(var e,i=this.scale,o=this.pointers,r=t.center(),n=o[0].box.clone().wrap(i.box),s=0;s<o.length;s++)n.wrap(o[s].box.clone());return n=i.options.vertical?(e=n.width()/2,new I(r.x-e,t.y1,r.x+e,t.y2)):(e=n.height()/2,new I(t.x1,r.y-e,t.x2,r.y+e))},pv.prototype._alignElements=function(){for(var t,e=this.scale,i=this.pointers,o=e.box,r=i[0].box.clone().wrap(e.box),n=this.bbox,s=0;s<i.length;s++)r.wrap(i[s].box.clone());e.options.vertical?(t=n.center().x-r.center().x,e.reflow(new I(o.x1+t,n.y1,o.x2+t,n.y2))):(t=n.center().y-r.center().y,e.reflow(new I(o.x1,o.y1+t,o.x2,o.y2+t)));for(var a=0;a<i.length;a++)i[a].reflow(this.bbox)},pv.prototype._shrinkScaleWidth=function(t){var e,i=this.scale;i.options.vertical||0<(e=i.contentBox().width()-t.width())&&(i.box.shrink(e,0),i.box.alignTo(t,"center"),i.reflow(i.box))},pv.prototype._shrinkElements=function(){for(var t=this.scale,e=this.pointers,i=t.box.clone(),o=t.options.vertical?"y":"x",r=e[0].box,n=0;n<e.length;n++)r.wrap(e[n].box.clone());i[o+1]+=Math.max(i[o+1]-r[o+1],0),i[o+2]-=Math.max(r[o+2]-i[o+2],0),t.reflow(i);for(var s=0;s<e.length;s++)e[s].reflow(this.bbox)},pv);function pv(){lv.apply(this,arguments)}e(zs,{transitions:!0,gaugeArea:{background:""},scale:{vertical:!0}});let cv=zs;var uv=M.drawing.Arc,dv=M.drawing.Path,fv=M.drawing.Group;function gv(t,e,i,o){var r=new fv,n=t.center,s=t.getRadiusX();if(o.visible)for(var a=0;a<e.length;a++){var l=t.pointAt(e[a]),h=new M.geometry.Point(n.x+s-o.size,n.y).rotate(e[a],n);r.append(new dv({stroke:{color:o.color,width:o.width}}).moveTo(l).lineTo(h))}return r}function yv(t,e,i,o){return{from:t,to:e,color:i,opacity:o}}(vv=Xr)&&(xv.__proto__=vv),((xv.prototype=Object.create(vv&&vv.prototype)).constructor=xv).prototype.initUserOptions=function(t){t=O({},this.options,t);return t.majorUnit=t.majorUnit||Bi(t.min,t.max),t.minorUnit=t.minorUnit||t.majorUnit/10,t},xv.prototype.initFields=function(){},xv.prototype.render=function(t,e){t=this.renderArc(t,e);this.bbox=t.bbox(),this.labelElements=this.renderLabels(),this.ticks=this.renderTicks(),this.ranges=this.renderRanges()},xv.prototype.reflow=function(t){var e=t.center(),t=Math.min(t.height(),t.width())/2;if(!k(this.bbox))return this.render(e,t);this.bbox=this.arc.bbox(),this.radius(this.arc.getRadiusX()),this.repositionRanges(),this.renderLabels()},xv.prototype.slotAngle=function(t){var e=this.options,i=e.min,o=e.max,r=e.startAngle,n=e.endAngle,s=n-r;return(e.reverse?n-(t-i)/(o-i)*s:(t-i)/(o-i)*s+r)+180},xv.prototype.hasRanges=function(){var t=this.options.ranges;return t&&t.length},xv.prototype.ticksSize=function(){var t=this.options,e=t.majorTicks,t=t.minorTicks,i=0;return e.visible&&(i=e.size),i=t.visible?Math.max(t.size,i):i},xv.prototype.labelsCount=function(){var t=vv.prototype.labelsCount.call(this),e=this.options;return 360<=e.endAngle-e.startAngle&&e.max%e.majorUnit==0&&--t,t},xv.prototype.renderLabels=function(){var t=this.options,e=this.arc.clone(),i=e.getRadiusX(),o=this.tickAngles(e,t.majorUnit),r=t.rangeSize=t.rangeSize||.1*i,n=new fv,s=.05*i,a=(k(t.rangeDistance)?s=t.rangeDistance:t.rangeDistance=s,t.labels),l=a.position===vy,h=k(this.labelElements);l&&(i-=this.ticksSize(),this.hasRanges()&&!h&&(i-=r+s),e.setRadiusX(i).setRadiusY(i));for(var p=this.labels,c=p.length,r=w(a.padding),u=(r.left+r.right)/2,d=(r.top+r.bottom)/2,f=0;f<c;f++){var g=p[f],y=g.box.width()/2,v=g.box.height()/2,m=o[f],x=(m-180)*yy,m=e.pointAt(m),_=m.x+Math.cos(x)*(y+u)*(l?1:-1),m=m.y+Math.sin(x)*(v+d)*(l?1:-1),x=(g.reflow(new I(_-y,m-v,_+y,m+v)),new M.geometry.Point(g.box.x1,g.box.y1)),_=void 0;h?(y=(_=this.labelElements.children[f]).bbox().origin,(m=_.transform()||M.geometry.transform()).translate(x.x-y.x,x.y-y.y),_.transform(m)):(_=ky(g,t.labels),n.append(_)),this.bbox=M.geometry.Rect.union(this.bbox,_.bbox())}return n},xv.prototype.repositionRanges=function(){var t=this.ranges.children;if(0<t.length){var e=this.options,i=e.rangeDistance,e=e.rangeSize,o=this.getRangeRadius();this.options.labels.position===vy&&(o+=e+i);for(var r=o+e/2,n=0;n<t.length;n++)t[n]._geometry.setRadiusX(r).setRadiusY(r);this.bbox=M.geometry.Rect.union(this.bbox,this.ranges.bbox())}},xv.prototype.renderRanges=function(){var t=this.rangeSegments(),e=t.length,i=new fv;if(e){var o=this.options,r=o.rangeSize,n=o.reverse,o=o.rangeDistance,s=this.getRangeRadius();this.radius(this.radius()-r-o);for(var a=0;a<e;a++){var l=t[a],h=this.slotAngle(l[n?"to":"from"]),p=this.slotAngle(l[n?"from":"to"]);p-h!=0&&i.append(this.createRange(h,p,s,l))}}return i},xv.prototype.createRange=function(t,e,i,o){var r=this.options.rangeSize,i=new M.geometry.Arc(this.arc.center,{radiusX:i+r/2,radiusY:i+r/2,startAngle:t,endAngle:e});return new uv(i,{stroke:{width:r,color:o.color,opacity:o.opacity,lineCap:o.lineCap}})},xv.prototype.rangeSegments=function(){var t=this.options,e=t.ranges||[],i=e.length,o=[];if(i){var r=t.min,n=t.max,s=t.rangePlaceholderColor;o.push(yv(r,n,s));for(var a=0;a<i;a++)for(var l=Ay(e[a],r,n),h=o.length,p=0;p<h;p++){var c=o[p];if(c.from<=l.from&&l.from<=c.to){o.push(yv(l.from,l.to,l.color,l.opacity)),c.from<=l.to&&l.to<=c.to&&o.push(yv(l.to,c.to,s,l.opacity)),c.to=l.from;break}}}return o},xv.prototype.getRangeRadius=function(){var t=this.arc,e=this.options,i=e.rangeSize,o=e.rangeDistance,r=e.majorTicks.size;return e.labels.position===my?t.getRadiusX()-r-o-i:t.getRadiusX()-i},xv.prototype.renderArc=function(t,e){var i=this.options;return this.arc=new M.geometry.Arc(t,{radiusX:e,radiusY:e,startAngle:i.startAngle+180,endAngle:i.endAngle+180})},xv.prototype.renderTicks=function(){var t,e=this.arc,i=this.options,o=e.clone(),r=(this.majorTickAngles=this.tickAngles(e,i.majorUnit),this.majorTicks=gv(o,this.majorTickAngles,i.majorUnit,i.majorTicks),new fv),n=(r.append(this.majorTicks),i.majorTicks.size),s=i.minorTicks.size;return this._tickDifference=n-s,i.labels.position===my&&(t=o.getRadiusX(),o.setRadiusX(t-n+s).setRadiusY(t-n+s)),this.minorTickAngles=this.normalizeTickAngles(this.tickAngles(e,i.minorUnit)),this.minorTicks=gv(o,this.minorTickAngles,i.minorUnit,i.minorTicks),r.append(this.minorTicks),r},xv.prototype.normalizeTickAngles=function(t){for(var e=this.options,i=e.majorUnit/e.minorUnit,o=t.length-1;0<=o;o--)o%i==0&&t.splice(o,1);return t},xv.prototype.tickAngles=function(t,e){var i=this.options,o=i.reverse,r=t.endAngle-t.startAngle,n=(i.max-i.min)/e,s=t.startAngle,a=r/n;o&&(s+=r,a=-a),360<=r&&i.max%e==0&&--n;for(var l=[],h=0;h<n;h++)l.push(L(s,Z)),s+=a;return L(s)<=t.endAngle&&l.push(s),l},xv.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)},xv.prototype.repositionTicks=function(t,e,i){var o=i&&this._tickDifference||0,r=this.arc,n=r.getRadiusX();i&&this.options.labels.position===my&&0!==o&&(r=this.arc.clone()).setRadiusX(n-o).setRadiusY(n-o);for(var s=0;s<t.length;s++){var a=r.pointAt(e[s]),l=t[s].segments,h=a.x-l[0].anchor().x,a=a.y-l[0].anchor().y;t[s].transform((new M.geometry.transform).translate(h,a))}};var vv,mv,$=xv;function xv(t,e){vv.call(this,0,1,t,e)}e($,{min:0,max:100,majorTicks:{size:15,align:vy,color:Y,width:.5,visible:!0},minorTicks:{size:10,align:vy,color:Y,width:.5,visible:!0},startAngle:-30,endAngle:210,labels:{position:vy,padding:2}});let _v=$,bv=((mv=M.drawing.Animation)&&(wv.__proto__=mv),((wv.prototype=Object.create(mv&&mv.prototype)).constructor=wv).prototype.step=function(t){var e=this.options,t=Xt(e.oldAngle,e.newAngle,t);this.element.transform(M.geometry.transform().rotate(t,e.center))},wv);function wv(t,e){mv.call(this,t,e);t=this.options;t.duration=Math.max(Math.abs(t.newAngle-t.oldAngle)/t.duration*1e3,1)}e(bv,{easing:gl,duration:150}),M.drawing.AnimationFactory.current.register(l,bv);let kv=bv;var Av,Sv=M.drawing.Circle,Cv=M.drawing.Group,Pv=M.drawing.Path,Ja=((Av=Ds)&&(Tv.__proto__=Av),((Tv.prototype=Object.create(Av&&Av.prototype)).constructor=Tv).prototype.setAngle=function(t){this.elements.transform(M.geometry.transform().rotate(t,this.center))},Tv.prototype.repaint=function(){var t=this.scale,e=this.options,i=t.slotAngle(e._oldValue),t=t.slotAngle(e.value);!1===e.animation.transitions?this.setAngle(t):new kv(this.elements,O(e.animation,{oldAngle:i,newAngle:t})).play()},Tv.prototype.render=function(){var t=this.scale,e=this.options,i=new Cv;return!1!==e.animation&&O(e.animation,{startAngle:0,center:t.arc.center,reverse:t.options.reverse}),i.append(this._renderNeedle(),this._renderCap()),this.elements=i,this.setAngle(yy),i},Tv.prototype.reflow=function(t){var e=this.center=t.center,i=x(this.options.length||1,.1,1.5),t=this.radius=t.getRadiusX()*i,i=this.capSize=Math.round(t*this.options.cap.size);this.bbox=M.geometry.Rect.fromPoints(new M.geometry.Point(e.x-i,e.y-i),new M.geometry.Point(e.x+i,e.y+i))},Tv.prototype._renderNeedle=function(){var t=this.scale.options.minorTicks.size,e=this.center,i=this.options.color,i=new Pv({fill:{color:i},stroke:{color:i,width:.5}});return i.moveTo(e.x+this.radius-t,e.y).lineTo(e.x,e.y-this.capSize/2).lineTo(e.x,e.y+this.capSize/2).close(),i},Tv.prototype._renderCap=function(){var t=this.options,t=t.cap.color||t.color,e=new M.geometry.Circle(this.center,this.capSize);return new Sv(e,{fill:{color:t},stroke:{color:t}})},Tv);function Tv(){Av.apply(this,arguments)}e(Ja,{cap:{size:.05},arrow:{width:16,height:14},animation:{type:l,duration:150}});let Mv=Ja;var Ov,Lv,Iv,Bv,Ev,Rv,Vv,jv=M.drawing.Group,h=((Ov=Oy)&&(zv.__proto__=Ov),((zv.prototype=Object.create(Ov&&Ov.prototype)).constructor=zv).prototype.reflow=function(t){var e=this.pointers;this.scale.reflow(t),this._initialPlotArea=this.scale.bbox;for(var i=0;i<e.length;i++)e[i].reflow(this.scale.arc),this._initialPlotArea=M.geometry.Rect.union(this._initialPlotArea,e[i].bbox);this.fitScale(t),this.alignScale(t),this._buildVisual(this.gaugeArea,e,this.scale),this._draw()},zv.prototype._buildVisual=function(t,e,i){var o=this._visuals=new jv;o.append(t),o.append(i.ticks),o.append(i.ranges),this._buildPointers(e),o.append(i.labelElements)},zv.prototype._buildPointers=function(t){for(var e=0;e<t.length;e++){var i=t[e];i.render(),this._visuals.append(i.elements),i.value(i.options.value)}},zv.prototype.fitScale=function(t){for(var e,i,o,r,n,s=this.scale.arc,a=this._initialPlotArea,a=Math.abs(this.getDiff(a,t)),l=L(a,Z),h=L(-a,Z),p=0,c=0;!(!(c++<100)||5<(p=n===o?p+1:0)||l!==r&&0<=(e=this.getPlotBox(l,t,s))&&e<=2||h!==r&&0<=(o=this.getPlotBox(h,t,s))&&o<=2||(r=0<e&&0<o?2*l:e<0&&o<0?2*h:L((l+h)/2||1,Z),0<=(i=this.getPlotBox(r,t,s))&&i<=2));)n=o,0<i?(h=r,o=i):(l=r,e=i)},zv.prototype.getPlotBox=function(t,e,i){var o=this.scale,r=this.pointers,n=i.getRadiusX(),s=i.clone();s.setRadiusX(n+t).setRadiusY(n+t),o.arc=s,o.reflow(e),this.plotBbox=o.bbox;for(var a=0;a<r.length;a++)r[a].reflow(s),this.plotBbox=M.geometry.Rect.union(this.plotBbox,r[a].bbox);return this.getDiff(this.plotBbox,e)},zv.prototype.getDiff=function(t,e){return Math.min(e.width()-t.width(),e.height()-t.height())},zv.prototype.alignScale=function(t){var e=this.plotBbox.center(),i=t.center(),o=e.x-i.x,e=e.y-i.y,r=this.scale,n=this.pointers;r.arc.center.x-=o,r.arc.center.y-=e,r.reflow(t);for(var s=0;s<n.length;s++)n[s].reflow(r.arc),this.plotBbox=M.geometry.Rect.union(r.bbox,n[s].bbox)},zv.prototype._createModel=function(){var t=this.options,e=t.pointer,i=this.scale=new _v(t.scale,this.contextService);this.pointers=[];for(var o=yt(e)?e:[e],r=0;r<o.length;r++){var n=new Mv(i,O({},o[r],{animation:{transitions:t.transitions}}));this.pointers.push(n)}},zv);function zv(){Ov.apply(this,arguments)}e(h,{transitions:!0,gaugeArea:{background:""}});let Dv=h,Fv=((Lv=_v)&&(Hv.__proto__=Lv),((Hv.prototype=Object.create(Lv&&Lv.prototype)).constructor=Hv).prototype.rangeSegments=function(){var t=this.options;return[{from:t.min,to:t.max,color:t.rangePlaceholderColor,lineCap:t.rangeLineCap}]},Hv.prototype.hasRanges=function(){return!0},Hv.prototype.placeholderRangeAngle=function(t){var e=this.ranges.children[0].geometry();this.options.reverse?e.setEndAngle(t):e.setStartAngle(t)},Hv.prototype.addRange=function(t,e,i){var o=this.options.reverse,r=this.slotAngle(o?e:t),o=this.slotAngle(o?t:e),t=this.createRange(r,o,this.getRangeRadius(),i);return this.ranges.append(t),t},Hv);function Hv(){Lv.apply(this,arguments)}e(Fv,{min:0,max:100,majorTicks:{visible:!1},minorTicks:{visible:!1},labels:{visible:!1},startAngle:0,endAngle:180,rangeLineCap:"round"});let Nv=Fv,Uv=((Iv=M.drawing.Animation)&&(Gv.__proto__=Iv),((Gv.prototype=Object.create(Iv&&Iv.prototype)).constructor=Gv).prototype.step=function(t){var e,i=this.options,o=this.startColor,r=this.color,i=Xt(i.oldAngle,i.newAngle,t);this.element.angle(i),r&&(i=L(Xt(o.r,r.r,t)),e=L(Xt(o.g,r.g,t)),o=L(Xt(o.b,r.b,t)),this.element.stroke(new M.Color(i,e,o).toHex()))},Gv);function Gv(t,e){Iv.call(this,t,e);var e=this.options,i=Math.abs(e.newAngle-e.oldAngle)/e.duration*1e3,e=(e.duration=x(i,150,800),t.elements.options.get("stroke.color")),i=t.currentColor();e!==i&&(this.startColor=new M.Color(e),this.color=new M.Color(i))}e(Uv,{easing:gl,duration:150}),M.drawing.AnimationFactory.current.register(js,Uv);let Wv=Uv,Xv=((Bv=Ds)&&(Yv.__proto__=Bv),((Yv.prototype=Object.create(Bv&&Bv.prototype)).constructor=Yv).prototype.repaint=function(){var t=this.scale,e=this.options,i=t.slotAngle(e._oldValue),t=t.slotAngle(e.value);this.animation&&this.animation.abort(),!1===e.animation.transitions?(this.angle(t),this.stroke(this.currentColor())):(this.animation=new Wv(this,O(e.animation,{oldAngle:i,newAngle:t})),this.animation.play())},Yv.prototype.angle=function(t){var e=this.elements.geometry();this.scale.options.reverse?e.setStartAngle(t):e.setEndAngle(t),this.scale.placeholderRangeAngle(t)},Yv.prototype.stroke=function(t){this.elements.stroke(t)},Yv.prototype.render=function(){var t,e;this.elements||(t=this.scale,!1!==(e=this.options).animation&&O(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}))},Yv.prototype.currentColor=function(){var t=this.scale.options,e=t.min,i=t.max,t=this.options,o=t.colors,r=t.color,t=t.value,n=m(t)?t:e;if(o)for(var s=0;s<o.length;s++){var a=o[s],l=a.color,h=a.from,a=a.to;if(void 0===a&&(a=i),(h=void 0===h?e:h)<=n&&n<=a)return l}return r},Yv.prototype.reflow=function(){this.render(),this.bbox=this.elements.bbox()},Yv);function Yv(){Bv.apply(this,arguments)}e(Xv,{animation:{type:js,duration:150}});let qv=Xv,Zv=((Ev=Dv)&&(Qv.__proto__=Ev),((Qv.prototype=Object.create(Ev&&Ev.prototype)).constructor=Qv).prototype._initTheme=function(t){Ev.prototype._initTheme.call(this,t),this.options.color=this.options.color||(this.theme.pointer||{}).color},Qv.prototype._createModel=function(){var t=this.options,e=this.scale=new Nv(t.scale,this.contextService),e=new qv(e,O({},{colors:t.colors,color:t.color,value:t.value,opacity:t.opacity,animation:{transitions:t.transitions}}));this.pointers=[e]},Qv.prototype._buildPointers=function(t){for(var e=0;e<t.length;e++){var i=t[e];i.render(),i.value(i.options.value)}},Qv.prototype._setValueOptions=function(t){this.options.value=t},Qv.prototype.currentColor=function(){var t=this.pointers[0];if(t)return t.currentColor()},Qv.prototype.centerLabelPosition=function(t,e){var i=this.getSize(),o=this.scale.arc.center,r=o.x-t/2,o=o.y-e/2;return t<i.width&&(t=r+t,r=Math.max(r,0),t>i.width)&&(r-=t-i.width),e<i.height&&(i=(t=this.scale.bbox).bottomRight().y,e=o+e,o=Math.max(o,t.origin.y),i<e)&&(o-=e-i),{left:r,top:o}},Qv);function Qv(){Ev.apply(this,arguments)}let Kv=Zv,$v=((Rv=Kv)&&(Jv.__proto__=Rv),((Jv.prototype=Object.create(Rv&&Rv.prototype)).constructor=Jv).prototype._createModel=function(){var t=this.options.scale;"number"!=typeof t.startAngle&&(t.startAngle=90),t.endAngle=t.startAngle+360,Rv.prototype._createModel.call(this)},Jv);function Jv(){Rv.apply(this,arguments)}let tm=$v,em=((Vv=M.Class)&&(im.__proto__=Vv),((im.prototype=Object.create(Vv&&Vv.prototype)).constructor=im).prototype.initProperties=function(){},im.prototype.setOptions=function(t){this.options=Object.assign({},this.options,t),this.quietZoneLength=this.options.addQuietZone?2*this.options.quietZoneLength:0},im.prototype.encode=function(t,e,i){t=k(t)?String(t):t;return this.initValue(t,e,i),this.options.addQuietZone&&this.addQuietZone(),this.addData(),this.options.addQuietZone&&this.addQuietZone(),{baseUnit:this.baseUnit,pattern:this.pattern}},im.prototype.initValue=function(){},im.prototype.addQuietZone=function(){this.pattern.push(this.options.quietZoneLength||10)},im.prototype.addData=function(){},im.prototype.invalidCharacterError=function(t){throw new Error('Character "'+t+'" is not valid for symbology '+this.name+".")},im);function im(t){Vv.call(this),this.setOptions(t),this.initProperties()}e(em,{quietZoneLength:10,addQuietZone:!0,addCheckSum:!0});var om,rm=Object.assign,i=((om=em)&&(nm.__proto__=om),((nm.prototype=Object.create(om&&om.prototype)).constructor=nm).prototype.initProperties=function(){om.prototype.initProperties.call(this),rm(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"})},nm.prototype.initValue=function(t,e){this.pattern=[],this.value=t,this.width=e,this.totalUnits=0},nm.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()},nm.prototype.setBaseUnit=function(){this.baseUnit=this.width/(this.totalUnits+this.quietZoneLength)},nm.prototype.addCheckSum=function(){var t=this.value,e=t.length,i=this.getWeightedSum(t,e,this.cCheckSumTotal)%this.checkSumMod;this.checksum=String(i),this.addPattern(this.characterMap[i]),++e>=this.kCheckSumMinLength&&(i=(i+this.getWeightedSum(t,e,this.kCheckSumTotal))%this.checkSumMod,this.checksum+=i,this.addPattern(this.characterMap[i]))},nm.prototype.getWeightedSum=function(t,e,i){for(var o=0,r=0;r<t.length;r++)o+=this.weightedValue(this.getValue(t.charAt(r)),e,r,i);return o},nm.prototype.weightedValue=function(t,e,i,o){return((e-i)%o||o)*t},nm.prototype.getValue=function(t){return isNaN(t)?(t!==this.DASH&&this.invalidCharacterError(t),this.DASH_VALUE):parseInt(t,10)},nm.prototype.addCharacter=function(t){t=this.getValue(t),t=this.characterMap[t];this.addPattern(t)},nm.prototype.addPattern=function(t){for(var e,i=0;i<t.length;i++)e=parseInt(t.charAt(i),10),this.pattern.push(e),this.totalUnits+=e},nm);function nm(){om.apply(this,arguments)}e(i,{addCheckSum:!0});var sm,am,lm=Object.assign,t=((am=em)&&(pm.__proto__=am),((pm.prototype=Object.create(am&&am.prototype)).constructor=pm).prototype.initProperties=function(){am.prototype.initProperties.call(this),lm(this,{minBaseUnitLength:.7})},pm.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()},pm.prototype.addCharacter=function(t){var e=this.characterMap[t];e||this.invalidCharacterError(t),this.addBase(e)},pm.prototype.addBase=function(){},pm),Fs=((sm=t)&&(hm.__proto__=sm),((hm.prototype=Object.create(sm&&sm.prototype)).constructor=hm).prototype.initProperties=function(){sm.prototype.initProperties.call(this),lm(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"}}})},hm.prototype.initValue=function(t,e,i){this.width=e,this.height=i,this.value=t,this.dataLength=t.length,this.pattern=[],this.patternString=""},hm.prototype.prepareValues=function(){var t,e=this.minBaseUnitLength,i=this.minRatio,o=Math.ceil(Math.max(.15*this.width,24)),r=this.maxRatio;if(this.height<o)throw new Error("Insufficient height for Code39 encoding: the current height is "+this.height+"px and the minimum height is "+o+"px.");for(t=this.getBaseUnit(r);t<e&&i<r;)r=parseFloat((r-.1).toFixed(1)),t=this.getBaseUnit(r);if(t<e)throw o=Math.ceil(this.getBaseWidth(i)*e),new Error("Insufficient width for Code39 encoding: the current width is "+this.width+'px and the minimum width for value "'+this.value+'" is '+o+"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))},hm.prototype.getBaseUnit=function(t){return this.width/this.getBaseWidth(t)},hm.prototype.getBaseWidth=function(t){return this.quietZoneLength+3*(t+2)*(this.dataLength+2)+this.gapWidth*(this.dataLength+1)},hm.prototype.addStart=function(){this.addPattern(this.characterMap.START.pattern),this.addCharacterGap()},hm.prototype.addBase=function(t){this.addPattern(t.pattern),this.addCharacterGap()},hm.prototype.addStop=function(){this.addPattern(this.characterMap.START.pattern)},hm.prototype.addPattern=function(t){for(var e=0;e<t.length;e++)this.patternString+=this.patternMappings[t.charAt(e)]},hm.prototype.addCharacterGap=function(){this.patternString+=this.gapWidth+this.splitCharacter},hm);function hm(){sm.apply(this,arguments)}function pm(){am.apply(this,arguments)}e(Fs,{addCheckSum:!1});var cm,um,dm,fm,gm,ym,vm,mm,xm,_m,bm,wm={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,i=0;i<this.extendedMappings.length;i++)if(e=this.extendedMappings[i].call(this,t)){for(var o=0;o<e.length;o++){var r=e[o];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 i=[],o=0;o<this.specialAsciiCodes[t].length;o++)i.push(this.characterMap[this.shiftCharacters[3]]),i.push(this.characterMap[this.specialAsciiCodes[t][o]]);else e=6*Math.floor(t/32)+(t-27)%32+64,i=[this.characterMap[this.shiftCharacters[3]],this.characterMap[String.fromCharCode(e)]];return i}],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"]},zs=((ym=Fs)&&(Rm.__proto__=ym),((Rm.prototype=Object.create(ym&&ym.prototype)).constructor=Rm).prototype.initProperties=function(){ym.prototype.initProperties.call(this),O(this,wm,{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}}})},Rm),km=Object.assign,$=((gm=t)&&(Em.__proto__=gm),((Em.prototype=Object.create(gm&&gm.prototype)).constructor=Em).prototype.initProperties=function(){gm.prototype.initProperties.call(this),km(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"}})},Em.prototype.initValue=function(t,e,i){this.value=t,this.width=e,this.height=i,this.pattern=[],this.values=[],this.dataLength=t.length},Em.prototype.prepareValues=function(){var t=Math.ceil(Math.max(.15*this.width,24));if(this.height<t)throw new Error("Insufficient height for Code93 encoding: the current height is "+this.height+"px, the minimum required height is "+t+"px.");if(this.setBaseUnit(),this.baseUnit<this.minBaseUnitLength)throw t=Math.ceil(this.minBaseUnitLength*(this.width/this.baseUnit)),new Error("Insufficient width for Code93 encoding: the current width is "+this.width+'px and the minimum required width for value "'+this.value+'" is '+t+"px.")},Em.prototype.setBaseUnit=function(){this.baseUnit=this.width/(9*(this.dataLength+2+2)+this.quietZoneLength+1)},Em.prototype.addStart=function(){var t=this.characterMap.START.pattern;this.addPattern(t)},Em.prototype.addStop=function(){this.addStart(),this.pattern.push(this.characterMap.TERMINATION_BAR)},Em.prototype.addBase=function(t){this.addPattern(t.pattern),this.values.push(t.value)},Em.prototype.pushCheckSum=function(){var t,e=this._getCheckValues();this.checksum=e.join("");for(var i=0;i<e.length;i++)t=this.characterMap[this._findCharacterByValue(e[i])],this.addPattern(t.pattern)},Em.prototype._getCheckValues=function(){for(var t,e=this.values,i=e.length,o=0,r=i-1;0<=r;r--)o+=this.weightedValue(e[r],i-r,this.cCheckSumTotal);for(t=o%this.checkSumMod,o=this.weightedValue(t,1,this.kCheckSumTotal),r=i-1;0<=r;r--)o+=this.weightedValue(e[r],i-r+1,this.kCheckSumTotal);return[t,o%this.checkSumMod]},Em.prototype._findCharacterByValue=function(t){for(var e in this.characterMap)if(this.characterMap[e].value===t)return e},Em.prototype.weightedValue=function(t,e,i){return(e%i||i)*t},Em.prototype.addPattern=function(t){for(var e,i=0;i<t.length;i++)e=parseInt(t.charAt(i),10),this.pattern.push(e)},Em),l=((fm=$)&&(Bm.__proto__=fm),((Bm.prototype=Object.create(fm&&fm.prototype)).constructor=Bm).prototype.initProperties=function(){fm.prototype.initProperties.call(this),O(this,wm,{name:"Code 93 extended",pushCheckSum:function(){var t=this._getCheckValues();this.checksum=t.join("");for(var e,i=0;i<t.length;i++)e=t[i],this.shiftValuesAsciiCodes[e]?this.addExtended(this.shiftValuesAsciiCodes[e]):(e=this._findCharacterByValue(e),this.addPattern(this.characterMap[e].pattern))}})},Bm),Am=/^\d+$/,Sm=Object.assign,Ja=((dm=em)&&(Im.__proto__=dm),((Im.prototype=Object.create(dm&&dm.prototype)).constructor=Im).prototype.initProperties=function(){dm.prototype.initProperties.call(this),Sm(this,{name:"Postnet",START:"2",VALID_CODE_LENGTHS:[5,9,11],DIGIT_SEPARATOR:"-",characterMap:["22111","11122","11212","11221","12112","12121","12211","21112","21121","21211"]})},Im.prototype.initValue=function(t,e,i){this.height=i,this.width=e,this.baseHeight=i/2,this.value=t.replace(new RegExp(this.DIGIT_SEPARATOR,"g"),""),this.pattern=[],this.validate(this.value),this.checkSum=0,this.setBaseUnit()},Im.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()},Im.prototype.addCharacter=function(t){var e=this.characterMap[t];this.checkSum+=parseInt(t,10),this.addPattern(e)},Im.prototype.addCheckSum=function(){this.checksum=(10-this.checkSum%10)%10,this.addCharacter(this.checksum)},Im.prototype.setBaseUnit=function(){this.baseUnit=this.width/(10*(this.value.length+1)+3+this.quietZoneLength)},Im.prototype.validate=function(t){if(Am.test(t)||this.invalidCharacterError(t.match(/[^0-9]/)[0]),!u(t.length,this.VALID_CODE_LENGTHS))throw new Error("Invalid value length. Valid lengths for the Postnet symbology are "+this.VALID_CODE_LENGTHS.join(",")+".")},Im.prototype.addPattern=function(t){for(var e,i=0;i<t.length;i++)e=this.height-this.baseHeight*t.charAt(i),this.pattern.push({width:1,y1:e,y2:this.height}),this.pattern.push(1)},Im),Cm=/^\d+$/,Pm=/^[a-z0-9]+$/i,Tm=Object.assign,h=((um=M.Class)&&(Lm.__proto__=um),((Lm.prototype=Object.create(um&&um.prototype)).constructor=Lm).prototype.initProperties=function(){},Lm.prototype.addStart=function(){},Lm.prototype.is=function(){},Lm.prototype.isCode=function(){return!1},Lm.prototype.move=function(){},Lm.prototype.pushState=function(){},Lm),gl=((cm=h)&&(Om.__proto__=cm),((Om.prototype=Object.create(cm&&cm.prototype)).constructor=Om).prototype.initProperties=function(){cm.prototype.initProperties.call(this),O(this,{FNC4:"FNC4",SHIFT:98})},Om.prototype.addStart=function(){this.encoding.addPattern(this.START)},Om.prototype.is=function(t,e){t=t.charCodeAt(e);return this.isCode(t)},Om.prototype.move=function(t){for(var e=0;!this._moves[e].call(this,t)&&e<this._moves.length;)e++},Om.prototype.pushState=function(t){var e,i=this.states,o=t.value,r=o.length;for(u("C",i)&&(i=o.substr(t.index).match(/\d{4,}/g))&&(r=o.indexOf(i[0],t.index));0<=(e=t.value.charCodeAt(t.index))&&this.isCode(e)&&t.index<r;)this.encoding.addPattern(this.getValue(e)),t.index++},Om.prototype._initMoves=function(t){this._moves=[],u(this.FNC4,t)&&this._moves.push(this._moveFNC),u(this.shiftKey,t)&&this._moves.push(this._shiftState),this._moves.push(this._moveState)},Om.prototype._moveFNC=function(t){if(t.fnc)return t.fnc=!1,t.previousState===this.key},Om.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},Om.prototype._moveState=function(){return this.encoding.addPattern(this.MOVE),!0},Om),Mm={};function Om(t,e){cm.call(this,t),this.states=e,this._initMoves(e)}function Lm(t){um.call(this),this.encoding=t,this.initProperties()}function Im(){dm.apply(this,arguments)}function Bm(){fm.apply(this,arguments)}function Em(){gm.apply(this,arguments)}function Rm(){ym.apply(this,arguments)}function Vm(t,e){vm.call(this,t),this.states=e}function jm(t,e){mm.call(this,t),this._initSubStates(e)}function zm(){xm.apply(this,arguments)}function Dm(){_m.apply(this,arguments)}function Fm(){bm.apply(this,arguments)}Mm.A=((bm=gl)&&(Fm.__proto__=bm),((Fm.prototype=Object.create(bm&&bm.prototype)).constructor=Fm).prototype.initProperties=function(){bm.prototype.initProperties.call(this),Tm(this,{key:"A",shiftKey:"B",MOVE:101,START:103})},Fm.prototype.isCode=function(t){return 0<=t&&t<96},Fm.prototype.getValue=function(t){return t<32?t+64:t-32},Fm),Mm.B=((_m=gl)&&(Dm.__proto__=_m),((Dm.prototype=Object.create(_m&&_m.prototype)).constructor=Dm).prototype.initProperties=function(){_m.prototype.initProperties.call(this),Tm(this,{key:"B",shiftKey:"A",MOVE:100,START:104})},Dm.prototype.isCode=function(t){return 32<=t&&t<128},Dm.prototype.getValue=function(t){return t-32},Dm),Mm.C=((xm=h)&&(zm.__proto__=xm),((zm.prototype=Object.create(xm&&xm.prototype)).constructor=zm).prototype.initProperties=function(){xm.prototype.initProperties.call(this),Tm(this,{key:"C",MOVE:99,START:105})},zm.prototype.addStart=function(){this.encoding.addPattern(this.START)},zm.prototype.is=function(t,e){var i=Jm(t,e,4);return(e+4<=t.length||2===t.length)&&Cm.test(i)},zm.prototype.move=function(){this.encoding.addPattern(this.MOVE)},zm.prototype.pushState=function(t){for(var e;(e=Jm(t.value,t.index,2))&&Cm.test(e)&&2===e.length;)this.encoding.addPattern(parseInt(e,10)),t.index+=2},zm.prototype.getValue=function(t){return t},zm),Mm.FNC4=((mm=h)&&(jm.__proto__=mm),((jm.prototype=Object.create(mm&&mm.prototype)).constructor=jm).prototype.initProperties=function(){mm.prototype.initProperties.call(this),Tm(this,{key:"FNC4",dependentStates:["A","B"]})},jm.prototype.addStart=function(t){t=t.value.charCodeAt(0)-128,t=this._getSubState(t);this.encoding[t].addStart()},jm.prototype.is=function(t,e){t=t.charCodeAt(e);return this.isCode(t)},jm.prototype.isCode=function(t){return 128<=t&&t<256},jm.prototype.pushState=function(t){var e,i=this._initSubState(t),o=this.encoding,r=i.value.length;if(t.index+=r,r<3)for(;i.index<r;i.index++)e=i.value.charCodeAt(i.index),i.state=this._getSubState(e),i.previousState!==i.state&&(i.previousState=i.state,o[i.state].move(i)),o.addPattern(o[i.state].MOVE),o.addPattern(o[i.state].getValue(e));else i.state!==i.previousState&&o[i.state].move(i),this._pushStart(i),o.pushData(i,this.subStates),t.index<t.value.length&&this._pushStart(i);t.fnc=!0,t.state=i.state},jm.prototype._pushStart=function(t){this.encoding.addPattern(this.encoding[t.state].MOVE),this.encoding.addPattern(this.encoding[t.state].MOVE)},jm.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},jm.prototype._initSubStates=function(t){this.subStates=[];for(var e=0;e<t.length;e++)u(t[e],this.dependentStates)&&this.subStates.push(t[e])},jm.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]},jm.prototype._getAll=function(t,e){for(var i,o="",r=e;(i=t.charCodeAt(r++))&&this.isCode(i);)o+=String.fromCharCode(i-128);return o},jm),Mm.FNC1=((vm=h)&&(Vm.__proto__=vm),((Vm.prototype=Object.create(vm&&vm.prototype)).constructor=Vm).prototype.initProperties=function(){vm.prototype.initProperties.call(this),Tm(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})},Vm.prototype.addStart=function(){this.encoding[this.startState].addStart()},Vm.prototype.is=function(){return u(this.key,this.states)},Vm.prototype.pushState=function(t){var e,i,o,r=this.encoding,n=t.value.replace(/\s/g,""),s=new RegExp("["+this.startAI+this.endAI+"]","g"),a=t.index,l={state:this.startState};for(r.addPattern(this.START);;){if((e=(l.index=0)<(o=n.charAt(a)===this.startAI?2:0)?this.getBySeparator(n,a):this.getByLength(n,a)).ai.length)i=a+o+e.id.length+e.ai.length;else if((i=n.indexOf(this.startAI,a+1))<0){if(a+e.ai.max+e.id.length+o<n.length)throw new Error("Separators are required after variable length identifiers");i=n.length}if(l.value=n.substring(a,i).replace(s,""),this.validate(e,l.value),r.pushData(l,this.dependentStates),i>=n.length)break;a=i,l.state!==this.startState&&(r[this.startState].move(l),l.state=this.startState),e.ai.length||r.addPattern(this.START)}t.index=t.value.length},Vm.prototype.validate=function(t,e){var e=e.substr(t.id.length),i=t.ai;if(!i.type&&!Cm.test(e))throw new Error("Application identifier "+t.id+" is numeric only but contains non numeric character(s).");if("alphanumeric"===i.type&&!Pm.test(e))throw new Error("Application identifier "+t.id+" is alphanumeric only but contains non alphanumeric character(s).");if(i.length&&i.length!==e.length)throw new Error("Application identifier "+t.id+" must be "+i.length+" characters long.");if(i.min&&i.min>e.length)throw new Error("Application identifier "+t.id+" must be at least "+i.min+" characters long.");if(i.max&&i.max<e.length)throw new Error("Application identifier "+t.id+" must be at most "+i.max+" characters long.")},Vm.prototype.getByLength=function(t,e){for(var i,o,r=2;r<=4;r++)if(i=Jm(t,e,r),o=this.getApplicationIdentifier(i)||this.getApplicationIdentifier(i.substring(0,i.length-1)))return{id:i,ai:o};this.unsupportedAIError(i)},Vm.prototype.unsupportedAIError=function(t){throw new Error("'"+t+"' is not a supported Application Identifier")},Vm.prototype.getBySeparator=function(t,e){var e=t.indexOf(this.startAI,e),i=t.indexOf(this.endAI,e),t=t.substring(e+1,i),e=this.getApplicationIdentifier(t)||this.getApplicationIdentifier(t.substr(t.length-1));return e||this.unsupportedAIError(t),{ai:e,id:t}},Vm.prototype.getApplicationIdentifier=function(t){var e=this.applicationIdentifiers,i=e.multiKey;if(e[t])return e[t];for(var o=0;o<i.length;o++){if(i[o].ids&&u(t,i[o].ids))return i[o].type;if(i[o].ranges)for(var r=i[o].ranges,n=0;n<r.length;n++)if(r[n][0]<=t&&t<=r[n][1])return i[o].type}},Vm);(Xm=em)&&($m.__proto__=Xm),(($m.prototype=Object.create(Xm&&Xm.prototype)).constructor=$m).prototype.initProperties=function(){Xm.prototype.initProperties.call(this),Tm(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})},$m.prototype._initStates=function(){for(var t=0;t<this.states.length;t++)this[this.states[t]]=new Mm[this.states[t]](this,this.states)},$m.prototype.initValue=function(t,e,i){this.pattern=[],this.value=t,this.width=e,this.height=i,this.checkSum=0,this.totalUnits=0,this.index=0,this.position=1},$m.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())},$m.prototype.pushData=function(t,e){for(;this[t.state].pushState(t),!(t.index>=t.value.length);){var i;t.shifted?(i=t.state,t.state=t.previousState,t.previousState=i,t.shifted=!1):(t.previousState=t.state,t.state=this.getNextState(t,e),this[t.state].move(t))}},$m.prototype.addStart=function(t){this[t.state].addStart(t),this.position=1},$m.prototype.addCheckSum=function(){this.checksum=this.checkSum%103,this.addPattern(this.checksum)},$m.prototype.addStop=function(){this.addPattern(this.STOP)},$m.prototype.setBaseUnit=function(){this.baseUnit=this.width/(this.totalUnits+this.quietZoneLength)},$m.prototype.addPattern=function(t){for(var e,i=this.characterMap[t].toString(),o=0;o<i.length;o++)e=parseInt(i.charAt(o),10),this.pattern.push(e),this.totalUnits+=e;this.checkSum+=t*this.position++},$m.prototype.getNextState=function(t,e){for(var i=0;i<e.length;i++)if(this[e[i]].is(t.value,t.index))return e[i];this.invalidCharacterError(t.value.charAt(t.index))};var Hm,Nm,Um,Gm,Wm,Xm,Ds=$m,js=((Wm=Ds)&&(Km.__proto__=Wm),((Km.prototype=Object.create(Wm&&Wm.prototype)).constructor=Km).prototype.initProperties=function(){Wm.prototype.initProperties.call(this),Tm(this,{name:"Code 128 A",states:["A"]})},Km),t=((Gm=Ds)&&(Qm.__proto__=Gm),((Qm.prototype=Object.create(Gm&&Gm.prototype)).constructor=Qm).prototype.initProperties=function(){Gm.prototype.initProperties.call(this),Tm(this,{name:"Code 128 B",states:["B"]})},Qm),gl=((Um=Ds)&&(Zm.__proto__=Um),((Zm.prototype=Object.create(Um&&Um.prototype)).constructor=Zm).prototype.initProperties=function(){Um.prototype.initProperties.call(this),Tm(this,{name:"Code 128 C",states:["C"]})},Zm),h=((Nm=Ds)&&(qm.__proto__=Nm),((qm.prototype=Object.create(Nm&&Nm.prototype)).constructor=qm).prototype.initProperties=function(){Nm.prototype.initProperties.call(this),Tm(this,{name:"Code 128",states:["C","B","A","FNC4"]})},qm),Ds=((Hm=Ds)&&(Ym.__proto__=Hm),((Ym.prototype=Object.create(Hm&&Hm.prototype)).constructor=Ym).prototype.initProperties=function(){Hm.prototype.initProperties.call(this),Tm(this,{name:"Code GS1-128",states:["FNC1","C","B"]})},Ym);function Ym(){Hm.apply(this,arguments)}function qm(){Nm.apply(this,arguments)}function Zm(){Um.apply(this,arguments)}function Qm(){Gm.apply(this,arguments)}function Km(){Wm.apply(this,arguments)}function $m(t){Xm.call(this,t),this._initStates()}function Jm(t,e,i){return t.substring(e,e+i)}var tx,ex,ix,ox,rx,nx,sx,ax=Object.assign,lx=((sx=em)&&(Ax.__proto__=sx),((Ax.prototype=Object.create(sx&&sx.prototype)).constructor=Ax).prototype.initProperties=function(){sx.prototype.initProperties.call(this),ax(this,{characterMap:["12121212","12121221","12122112","12122121","12211212","12211221","12212112","12212121","21121212","21121221"],START:"21",STOP:"121",checkSumType:"",checkSums:ux})},Ax.prototype.initValue=function(t,e){this.pattern=[],this.value=t,this.checkSumLength=0,this.width=e},Ax.prototype.setBaseUnit=function(){this.baseUnit=this.width/(12*(this.value.length+this.checkSumLength)+this.quietZoneLength+7)},Ax.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()},Ax.prototype.addCharacter=function(t){var e=this.characterMap[t];e||this.invalidCharacterError(t),this.addPattern(e)},Ax.prototype.addPattern=function(t){for(var e=0;e<t.length;e++)this.pattern.push(parseInt(t.charAt(e),10))},Ax.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]])},Ax),hx=((nx=lx)&&(kx.__proto__=nx),((kx.prototype=Object.create(nx&&nx.prototype)).constructor=kx).prototype.initProperties=function(){nx.prototype.initProperties.call(this),ax(this,{name:"MSI Modulo10",checkSumType:"Modulo10"})},kx),px=((rx=lx)&&(wx.__proto__=rx),((wx.prototype=Object.create(rx&&rx.prototype)).constructor=wx).prototype.initProperties=function(){rx.prototype.initProperties.call(this),ax(this,{name:"MSI Modulo11",checkSumType:"Modulo11"})},wx),cx=((ox=lx)&&(bx.__proto__=ox),((bx.prototype=Object.create(ox&&ox.prototype)).constructor=bx).prototype.initProperties=function(){ox.prototype.initProperties.call(this),ax(this,{name:"MSI Modulo10 Modulo10",checkSumType:"Modulo10Modulo10"})},bx),lx=((ix=lx)&&(_x.__proto__=ix),((_x.prototype=Object.create(ix&&ix.prototype)).constructor=_x).prototype.initProperties=function(){ix.prototype.initProperties.call(this),ax(this,{name:"MSI Modulo11 Modulo10",checkSumType:"Modulo11Modulo10"})},_x),ux={Modulo10:function(t){for(var e,i,o=[0,""],r=t.length%2,n=0;n<t.length;n++)o[(n+r)%2]+=parseInt(t.charAt(n),10);for(i=o[0],e=(2*o[1]).toString(),n=0;n<e.length;n++)i+=parseInt(e.charAt(n),10);return[(10-i%10)%10]},Modulo11:function(t){for(var e,i=0,o=t.length,r=0;r<o;r++)i+=(((o-r)%6||6)+1)*t.charAt(r);return 10!=(e=(11-i%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))}},dx=Object.assign,fx=((ex=em)&&(xx.__proto__=ex),((xx.prototype=Object.create(ex&&ex.prototype)).constructor=xx).prototype.initProperties=function(){ex.prototype.initProperties.call(this),dx(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]}})},xx.prototype.initValue=function(t,e,i){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=i,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},xx.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)},xx.prototype.addSide=function(t,e){for(var i=0;i<t.length;i++)e&&parseInt(this.keyTable[e].charAt(i),10)?this.addPieces(Array.prototype.slice.call(this.characterMap.digits[t.charAt(i)]).reverse(),!0):this.addPieces(this.characterMap.digits[t.charAt(i)],!0)},xx.prototype.addPieces=function(t,e){for(var i=0;i<t.length;i++)e?this.pattern.push({y1:0,y2:.95*this.options.height,width:t[i]}):this.pattern.push(t[i])},xx.prototype.calculateChecksum=function(){for(var t=0,e=0,i=this.value.split("").reverse().join(""),o=0;o<i.length;o++)o%2?e+=parseInt(i.charAt(o),10):t+=parseInt(i.charAt(o),10);return(10-(3*t+e)%10)%10},xx),gx=Object.assign,yx=((tx=fx)&&(mx.__proto__=tx),((mx.prototype=Object.create(tx&&tx.prototype)).constructor=mx).prototype.initProperties=function(){tx.prototype.initProperties.call(this),gx(this,{name:"EAN 8"})},mx.prototype.initValue=function(t,e,i){if(7!==t.length||/\D/.test(t))throw new Error("Invalid value provided");this.value=t,this.options.height=i,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)},mx),vx={code11:i,code39:Fs,code39extended:zs,code93:$,code93extended:l,code128:h,code128a:js,code128b:t,code128c:gl};function mx(){tx.apply(this,arguments)}function xx(){ex.apply(this,arguments)}function _x(){ix.apply(this,arguments)}function bx(){ox.apply(this,arguments)}function wx(){rx.apply(this,arguments)}function kx(){nx.apply(this,arguments)}function Ax(){sx.apply(this,arguments)}function Sx(t,e){var i=t.style.display,e=("canvas"===e&&(t.style.display="block"),{width:t.clientWidth,height:t.clientHeight});return t.style.display=i,e}vx["gs1-128"]=Ds,vx.msimod10=hx,vx.msimod11=px,vx.msimod1010=cx,vx.msimod1110=lx,vx.postnet=Ja,vx.ean8=yx,vx.ean13=fx;(Cx=M.Class)&&(Px.__proto__=Cx),((Px.prototype=Object.create(Cx&&Cx.prototype)).constructor=Px).prototype.destroy=function(){this._destroySurface()},Px.prototype._initElement=function(){vt(this.element,"k-barcode")},Px.prototype._initSurface=function(){var t=this.options,e=this.surface;e&&e.options.type===t.renderAs||(this._destroySurface(),this._initSurfaceElement(),this.surface=this._createSurface())},Px.prototype._createSurface=function(){return M.drawing.Surface.create(this.surfaceElement,{type:this.options.renderAs})},Px.prototype._destroySurface=function(){this.surface&&(this.surface.destroy(),this.surface=null,this._destroySurfaceElement())},Px.prototype._initSurfaceElement=function(){this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.surfaceElement.style.position="relative",this.element.appendChild(this.surfaceElement))},Px.prototype._destroySurfaceElement=function(){this.surfaceElement&&this.surfaceElement.parentNode&&(this.surfaceElement.parentNode.removeChild(this.surfaceElement),this.surfaceElement=null)},Px.prototype.setOptions=function(t){this._setOptions(t),this._initSurface(),this.redraw()},Px.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)},Px.prototype.getSize=function(){return{width:this.element.offsetWidth,height:this.element.offsetHeight}},Px.prototype._resize=function(){this.redraw()},Px.prototype.createVisual=function(){this.visual=this._render()},Px.prototype._render=function(){var t,e=this.options,i=e.value,o=e.text,r=w(o.margin),n=this._getSize(),s=e.border||{},a=this.encoding,s=new I(0,0,n.width,n.height).unpad(s.width).unpad(e.padding),l=s.height(),h=new M.drawing.Group;this.contentBox=s,h.append(this._getBackground(n)),o.visible&&(l-=M.drawing.util.measureText(i,{font:o.font}).height+r.top+r.bottom);try{t=a.encode(i,s.width(),l)}catch(t){return this.onError(t),h}return o.visible&&(n=i,e.checksum&&k(a.checksum)&&(n+=" "+a.checksum),h.append(this._getText(n))),this.barHeight=l,this._bandsGroup=this._getBands(t.pattern,t.baseUnit),h.append(this._bandsGroup),h},Px.prototype.exportVisual=function(){return this._render()},Px.prototype._getSize=function(){var t=Sx(this.element,this.options.renderAs),e=new M.geometry.Size(300,100);return 0<t.width&&(e.width=t.width),0<t.height&&(e.height=t.height),this.options.width&&(e.width=this.options.width),this.options.height&&(e.height=this.options.height),e},Px.prototype.value=function(t){if(!k(t))return this.options.value;this.options.value=String(t),this.redraw()},Px.prototype._getBands=function(t,e){for(var i=this.contentBox,o=i.x1,r=new M.drawing.Group,n=0;n<t.length;n++){var s,a=(s=Ot(t[n])?t[n]:{width:t[n],y1:0,y2:this.barHeight}).width*e;n%2&&(s=M.geometry.Rect.fromPoints(new M.geometry.Point(o,s.y1+i.y1),new M.geometry.Point(o+a,s.y2+i.y1)),s=M.drawing.Path.fromRect(s,{fill:{color:this.options.color},stroke:null}),r.append(s)),o+=a}return r},Px.prototype._getBackground=function(t){var e=this.options,i=e.border||{},t=new I(0,0,t.width,t.height).unpad(i.width/2);return M.drawing.Path.fromRect(t.toRect(),{fill:{color:e.background},stroke:{color:i.width?i.color:"",width:i.width,dashType:i.dashType}})},Px.prototype._getText=function(t){var e=this.options.text,t=this._textbox=new So(t,{font:e.font,color:e.color,align:"center",vAlign:"bottom",margin:e.margin});return t.reflow(this.contentBox),t.renderVisual(),t.visual},Px.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),!vx[this.type])throw new Error("Encoding '"+this.type+"' is not supported.");this.encoding=new vx[this.type],this.options=O({},this.options,t)};var Cx,i=Px;function Px(t,e,i){void 0===i&&(i=Re),Cx.call(this),this.options=O({},this.options,e),this.element=t,this.onError=i,this._initElement(),this._initSurface(),this._setOptions(e),e&&k(e.value)&&this.redraw()}e(i,{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}});let Tx=i;var Mx={width:500,height:100};let Ox=function(t,e){if(void 0===e&&(e=Mx),!t)throw new Error("Please specify barcode type to validate.");var i,o,r,n=t.toLowerCase(),s="";if("upca"===n?(n="ean13",s="0"):"upce"===n&&(n="ean8",s="0"),vx[n])return i=new vx[n],o=e,r=s,function(t){try{i.encode(r+t,o.width,o.height)}catch(t){return{valid:!1,error:t}}return{valid:!0}};throw new Error("Encoding '"+t+"' is not supported.")};var Lx=Object.assign;function Ix(t,e){for(var i=[],o=0;o<t.length;)i.push(t.substring(o,o+e)),o+=e;return i}function Bx(t,e){t=Number(t).toString(2);return t=t.length<e?new Array(e-t.length+1).join(0)+t:t}function Ex(t){return parseInt(t,2)}(Vx=M.Class)&&(Wx.__proto__=Vx),((Wx.prototype=Object.create(Vx&&Vx.prototype)).constructor=Wx).prototype.move=function(){this.row+=this.dir*this.c,this.c^=1,this.column=this.startColumn-this.c},Wx.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}},Wx.prototype.getNextRemainderCell=function(){if(this.move(),void 0===this.matrix[this.row][this.column])return{row:this.row,column:this.column}};var Rx,Vx,jx=Wx,zx=((Rx=M.Class)&&(Gx.__proto__=Rx),(Gx.prototype=Object.create(Rx&&Rx.prototype)).constructor=Gx),Dx="alphanumeric",Fx=/^\d+/,Fs="A-Z0-9 $%*+./:-",Hx=new RegExp("^[A-Z $%*+./:-]+"),Nx=new RegExp("^["+Fs+"]+"),Ux=new RegExp("^[^"+Fs+"]+");function Gx(t,e){Rx.call(this),this.dataString=t,this.version=e}function Wx(t){Vx.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}function Xx(t,e,i,o,r){var n,s=Fx.exec(t),s=s?s[0]:"",a=Hx.exec(t),a=a?a[0]:"",l=Nx.exec(t),l=l?l[0]:"",e=s&&(s.length>=e||t.length===s.length||s.length>=i&&!Nx.test(t.charAt(s.length)))?(n="numeric",s):l&&(t.length===l.length||l.length>=o||r===Dx)?(n=Dx,s||a):(n="byte",l?l+Ux.exec(t.substring(l.length))[0]:Ux.exec(t)[0]);return{mode:n,modeString:e}}(Qx=M.Class)&&(e_.__proto__=Qx),((e_.prototype=Object.create(Qx&&Qx.prototype)).constructor=e_).prototype.initProperties=function(){Lx(this,{modeIndicator:"",bitsInCharacterCount:[]})},e_.prototype.getVersionIndex=function(t){return t<10?0:26<t?2:1},e_.prototype.getBitsCharacterCount=function(t){return this.bitsInCharacterCount[this.getVersionIndex(t||40)]},e_.prototype.getModeCountString=function(t,e){return this.modeIndicator+Bx(t,this.getBitsCharacterCount(e))},e_.prototype.encode=function(){},e_.prototype.getStringBitsLength=function(){},e_.prototype.getValue=function(){};var Yx,qx,Zx,Qx,zs=e_,$=((Zx=zs)&&(t_.__proto__=Zx),((t_.prototype=Object.create(Zx&&Zx.prototype)).constructor=t_).prototype.initProperties=function(){Zx.prototype.initProperties.call(this),Lx(this,{bitsInCharacterCount:[10,12,14],modeIndicator:"0001"})},t_.prototype.getValue=function(t){return parseInt(t,10)},t_.prototype.encode=function(t,e){for(var i=Ix(t,3),o=this.getModeCountString(t.length,e),r=0;r<i.length-1;r++)o+=Bx(i[r],10);return o+Bx(i[r],1+3*i[r].length)},t_.prototype.getStringBitsLength=function(t,e){var i=t%3;return 4+this.getBitsCharacterCount(e)+10*Math.floor(t/3)+3*i+(0==i?0:1)},t_),l=((qx=zs)&&(Jx.__proto__=qx),((Jx.prototype=Object.create(qx&&qx.prototype)).constructor=Jx).prototype.initProperties=function(){qx.prototype.initProperties.call(this),Lx(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"})},Jx.prototype.getValue=function(t){return this.characters[t]},Jx.prototype.encode=function(t,e){for(var i=Ix(t,2),o=this.getModeCountString(t.length,e),r=0;r<i.length-1;r++)o+=Bx(45*this.getValue(i[r].charAt(0))+this.getValue(i[r].charAt(1)),11);return o+Bx(2===i[r].length?45*this.getValue(i[r].charAt(0))+this.getValue(i[r].charAt(1)):this.getValue(i[r].charAt(0)),1+5*i[r].length)},Jx.prototype.getStringBitsLength=function(t,e){return 4+this.getBitsCharacterCount(e)+11*Math.floor(t/2)+t%2*6},Jx),h=((Yx=zs)&&($x.__proto__=Yx),(($x.prototype=Object.create(Yx&&Yx.prototype)).constructor=$x).prototype.initProperties=function(){Yx.prototype.initProperties.call(this),Lx(this,{bitsInCharacterCount:[8,16,16],modeIndicator:"0100"})},$x.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+'".')},$x.prototype.encode=function(t,e){for(var i=this.getModeCountString(t.length,e),o=0;o<t.length;o++)i+=Bx(this.getValue(t.charAt(o)),8);return i},$x.prototype.getStringBitsLength=function(t,e){return 4+this.getBitsCharacterCount(e)+8*t},$x),Kx={};function $x(){Yx.apply(this,arguments)}function Jx(){qx.apply(this,arguments)}function t_(){Zx.apply(this,arguments)}function e_(){Qx.call(this),this.initProperties()}Kx.numeric=new $,Kx.alphanumeric=new l,Kx.byte=new h;var i_=[{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}}];function o_(t,e){for(var i=0,o=i_.length-1,r=Math.floor(i_.length/2);t<i_[r][e].totalDataCodewords?o=r:i=r,r=i+Math.floor((o-i)/2),1<o-i;);return t<=i_[i][e].totalDataCodewords?r+1:o+1}(n_=M.Class)&&(m_.__proto__=n_),((m_.prototype=Object.create(n_&&n_.prototype)).constructor=m_).prototype.getEncodingResult=function(n,t){var e=(()=>{var t,e=[],i=0,o=n;for(e.push(Xx(o,8,5,8,t)),t=e[0].mode,o=o.substr(e[0].modeString.length);0<o.length;){var r=Xx(o,17,9,16,t);r.mode!==t?(t=r.mode,e.push(r),i++):e[i].modeString+=r.modeString,o=o.substr(r.modeString.length)}return e})(),t=o_((t=>{for(var e=0,i=0;i<t.length;i++)e+=Kx[t[i].mode].getStringBitsLength(t[i].modeString.length);return Math.ceil(e/8)})(e),t),e=((t,e)=>{for(var i="",o=0;o<t.length;o++)i+=Kx[t[o].mode].encode(t[o].modeString,e);return i})(e,t);return new zx(e,t)};var r_,n_,s_=m_,a_=((r_=M.Class)&&(v_.__proto__=r_),((v_.prototype=Object.create(r_&&r_.prototype)).constructor=v_).prototype.initProperties=function(){Lx(this,{encodingMode:"byte",utfBOM:"111011111011101110111111",initialModeCountStringLength:20,ranges:[128,2048,65536,2097152,67108864]})},v_.prototype.getEncodingResult=function(t,e){t=this.encode(t),e=o_(this.getDataCodewordsCount(t),e),t=this.mode.getModeCountString(t.length/8,e)+t;return new zx(t,e)},v_.prototype.getDataCodewordsCount=function(t){t=t.length;return Math.ceil((this.initialModeCountStringLength+t)/8)},v_.prototype.encode=function(t){for(var e=this.utfBOM,i=0;i<t.length;i++)e+=this.encodeCharacter(t.charCodeAt(i));return e},v_.prototype.encodeCharacter=function(t){var e=this.getBytesCount(t),i=e-1,o="";if(1===e)o=Bx(t,8);else{for(var e=8-e,r=0;r<i;r++)o=Bx(t>>6*r&63|128,8)+o;o=(t>>6*i|255>>e<<e).toString(2)+o}return o},v_.prototype.getBytesCount=function(t){for(var e=this.ranges,i=0;i<e.length;i++)if(t<e[i])return i+1},v_),l_={1:0},h_={0:1},p_={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},c_=[1,0,1,1,1],u_=[1,0,1],d_={L:"01",M:"00",Q:"11",H:"10"},f_=["11101100","00010001"],g_=[function(t,e){return(t+e)%2==0},function(t,e){return t%2==0},function(t,e){return e%3==0},function(t,e){return(t+e)%3==0},function(t,e){return(Math.floor(t/2)+Math.floor(e/3))%2==0},function(t,e){return t*e%2+t*e%3==0},function(t,e){return(t*e%2+t*e%3)%2==0},function(t,e){return((t+e)%2+t*e%3)%2==0}],y_=[[1,0],[1,25,0]];function v_(){r_.call(this),this.initProperties(),this.mode=Kx[this.encodingMode]}function m_(){n_.apply(this,arguments)}function x_(t,e,i,o){for(var r=0;r<t.length;r++)t[r][i][o]=e}function __(t,e,i,o){for(var r=0;r<g_.length;r++)t[r][i][o]=g_[r](i,o)?1^e:parseInt(e,10)}function b_(t,e){for(var i,o=y_[e-1],r=new Array(e).concat(t),n=new Array(r.length-o.length).concat(o),s=t.length,a=[],l=0;l<s;l++)i=((t,e)=>{for(var i=[],o=t.length-1;i[o]=h_[(t[o]+e)%255],void 0!==t[--o];);return i})(n,l_[r[r.length-1]]),n.splice(0,1),r=((t,e)=>{for(var i=[],o=t.length-2;0<=o;o--)i[o]=t[o]^e[o];return i})(i,r);for(l=r.length-1;0<=l;l--)a[e-1-l]=Bx(r[l],8);return a}function w_(t,e,i){var o=Ex(e),e=e.length-1,r=t<<e;return Bx(t,i-e)+Bx(((t,e)=>{for(var i=e.toString(2).length,o=t.toString(2).length,r=t;i<=(o=(r^=e<<o-i).toString(2).length););return r})(r,o),e)}function k_(t,e){return parseInt(t.charAt(e),10)}function A_(t,e){for(var i=t[0],o=0,r=e.length,n=0,s=8;n<=8;n++)6!==n&&x_(t,k_(e,r-1-o++),n,s);for(n=8,s=7;0<=s;s--)6!==s&&x_(t,k_(e,r-1-o++),n,s);for(o=0,s=i.length-1,n=8;s>=i.length-8;s--)x_(t,k_(e,r-1-o++),n,s);for(x_(t,1,i.length-8,8),n=i.length-7,s=8;n<i.length;n++)x_(t,k_(e,r-1-o++),n,s)}function S_(t,e){for(var i,o,r,n=t[0].length,s=n-11,a=n-11,l=0;l<e.length;l++)i=Math.floor(l/3),o=l%3,x_(t,r=k_(e,e.length-l-1),0+i,s+o),x_(t,r,a+o,0+i)}function C_(t,e,i,o){for(var r,n=e.length+2,s=e.length+1,a=0;a<e.length;a++)for(var l=a;l<n-a;l++)x_(t,r=e[a],i+l,o+a),x_(t,r,i+a,o+l),x_(t,r,i+s-l,o+s-a),x_(t,r,i+s-a,o+s-l)}function P_(t,e,i,o){for(var r=i,n=o,s=t[0];x_(t,0,r,o),x_(t,0,i,n),r+=e[0],n+=e[1],0<=r&&r<s.length;);}function T_(t,e,i,o,r){e[t][o]=(e[t][o]<<1^r)%128,93===e[t][o]&&(i[t]+=40)}function M_(t,e,i,o,r,n){i[t][n]===o?r[t][n]++:(i[t][n]=o,5<=r[t][n]&&(e[t]+=3+r[t][n]-5),r[t][n]=1)}function O_(t,e,i){var r=(new(i&&0<=i.toLowerCase().indexOf("utf_8")?a_:s_)).getEncodingResult(t,e),n=r.version,s=i_[n-1][e],i=((t,e)=>{for(var i,o=0,r=[],n=[],s=e.groups,a=0;a<s.length;a++)for(var l=s[a][0],h=0;h<l;h++){for(var p=s[a][1],c=[],u=[],d=1;d<=p;d++)i=t.substring(o,o+8),c.push(i),u[p-d]=Ex(i),o+=8;r.push(c),n.push(b_(u,e.errorCodewordsPerBlock))}return[r,n]})((()=>{for(var t=8*s.totalDataCodewords,e=0,i=0,o=r.dataString;o.length<t&&e<4;)o+="0000".charAt(e++);for(o.length%8!=0&&(o+=new Array(9-o.length%8).join("0"));o.length<t;)o+=f_[i],i^=1;return o})(),s),t=(()=>{for(var t=[],e=17+4*n,i=0;i<g_.length;i++){t[i]=new Array(e);for(var o=0;o<e;o++)t[i][o]=new Array(e)}return t})(),o=(c=(a=t)[0].length,C_(a,c_,0,0),P_(a,[-1,-1],7,7),C_(a,c_,c-7,0),P_(a,[1,-1],c-8,7),C_(a,c_,0,c-7),P_(a,[-1,1],7,c-8),t),a=n;if(!(a<2)){var l,h=o[0],p=h.length,c=Math.floor(a/7),u=[6],d=0;for((a=p_[a])?l=(p-13-a)/c:a=l=(p-13)/(c+1),u.push(u[d++]+a);u[d]+l<p;)u.push(u[d++]+l);for(var f=0;f<u.length;f++)for(var g=0;g<u.length;g++)void 0===h[u[f]][u[g]]&&C_(o,u_,u[f]-2,u[g]-2)}for(var y=t,v=1,m=y[0].length,x=8;x<m-8;x++)x_(y,v,6,x),x_(y,v,x,6),v^=1;7<=n&&S_(t,Bx(0,18)),A_(t,Bx(0,15));for(var _,b,w,k=t,A=i,S=new jx(k[0]),C=0;C<A.length;C++)for(_=A[C],b=0;0<_.length;){for(var P=0;P<_.length;P++)for(var T=0;T<8;T++)w=S.getNextCell(),__(k,_[P][b].charAt(T),w.row,w.column);for(b++;_[0]&&b===_[0].length;)_.splice(0,1)}for(;w=S.getNextRemainderCell();)__(k,0,w.row,w.column);c=(t=>{for(var e,i=[],o=[],r=[],n=[],s=[],a=t[0].length,l=0;l<t.length;l++)s[l]=[r[l]=i[l]=0,0],n[l]=[0,0],o[l]=[];for(var h=0;h<a;h++)for(var p=0;p<a;p++)for(var c=0;c<t.length;c++)e=t[c],r[c]+=parseInt(e[h][p],10),o[c][0]===e[h][p]&&h+1<a&&0<=p-1&&e[h+1][p]===o[c][0]&&e[h+1][p-1]===o[c][0]&&(i[c]+=3),T_(c,n,i,0,e[h][p]),T_(c,n,i,1,e[p][h]),M_(c,i,o,e[h][p],s,0),M_(c,i,o,e[p][h],s,1);var u,d,f,g,y=a*a,v=Number.MAX_VALUE;for(l=0;l<i.length;l++)i[l]+=(d=r[l],f=y,g=void 0,f=(d=Math.floor(d/f*100))%5,g=Math.abs(d-f-50),d=Math.abs(d+5-f-50),10*Math.min(g/5,d/5)),i[l]<v&&(v=i[l],u=l);return u})(t),a=t[c];return 7<=n&&S_([a],w_(n,"1111100100101",18)),A_([a],(t=>{var e="";if(0===Ex(t))return"101010000010010";for(var i=w_(Ex(t),"10100110111",15),o=0;o<i.length;o++)e+=i.charAt(o)^"101010000010010".charAt(o);return e})(d_[e]+Bx(c,3))),a}for(var L_,I_=1;I_<255;I_++)255<(L_=2*h_[I_-1])&&(L_^=285),h_[I_]=L_,l_[L_]=I_;L_=2*h_[I_-1]^285,h_[I_]=L_,h_[-1]=0;for(var B_=2;B_<=68;B_++){var E_=y_[B_-1];y_[B_]=((t,e)=>{for(var i=[],o=0;o<t.length;o++)for(var r=0;r<e.length;r++)i[o+r]=void 0===i[o+r]?(t[o]+(0<=e[r]?e[r]:0))%255:l_[h_[i[o+r]]^h_[(t[o]+e[r])%255]];return i})(E_,[B_,0])}var R_,V_=Math.round,j_=[[0,1],[1,1],[1,2],[2,2],[2,1],[3,1],[3,0],[2,0],[2,-1],[1,-1],[1,0]],z_=[[0,1],[1,1],[1,0]],js=((R_=M.Class)&&(D_.__proto__=R_),((D_.prototype=Object.create(R_&&R_.prototype)).constructor=D_).prototype.destroy=function(){this._destroySurface()},D_.prototype._initElement=function(){vt(this.element,"k-qrcode")},D_.prototype._initSurface=function(){var t=this.options,e=this.surface;e&&e.options.type===t.renderAs||(this._destroySurface(),this._initSurfaceElement(),this.surface=this._createSurface())},D_.prototype._createSurface=function(){return M.drawing.Surface.create(this.surfaceElement,{type:this.options.renderAs})},D_.prototype._destroySurface=function(){this.surface&&(this.surface.destroy(),this.surface=null,this._destroySurfaceElement())},D_.prototype._initSurfaceElement=function(){this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.surfaceElement.style.position="relative",this.element.appendChild(this.surfaceElement))},D_.prototype._destroySurfaceElement=function(){this.surfaceElement&&this.surfaceElement.parentNode&&(this.surfaceElement.parentNode.removeChild(this.surfaceElement),this.surfaceElement=null)},D_.prototype.redraw=function(){var t=this._getSize();this.surface.clear(),this.surface.setSize({width:t,height:t}),this.createVisual(),this.surface.draw(this.visual)},D_.prototype.getSize=function(){var t=this.element,e=t.clientWidth,t=t.clientHeight,i={width:0,height:0};return 0<e&&(i.width=e),t&&(i.height=t),i},D_.prototype._resize=function(){this.redraw()},D_.prototype.createVisual=function(){this.visual=this._render()},D_.prototype.exportVisual=function(){return this._render()},D_.prototype._render=function(){var t,e,i,o,r,n=this._value,s=this.options.border||{},a=this.options.padding||0,l=s.width||0,h=(s.width=l,new M.drawing.Group);try{n&&(i=O_(n,this.options.errorCorrection,this.options.encoding),r=(o=this._getSize())-2*(l+a),t=this._calculateBaseUnit(r,i.length),e=l+a+(r-i.length*t)/2,h.append(this._renderBackground(o,s)),h.append(this._renderMatrix(i,t,e)),this._hasCustomLogo()?h.append(this._renderLogo(o,t)):this._isSwiss()&&h.append(this._renderSwissCode(o,t)))}catch(t){this.onError(t)}return h},D_.prototype._renderLogo=function(t,e){var t=V_(t/2),e=this._getLogoSize(7*e),i=this.options.overlay.imageUrl,t={x:t-e.width/2,y:t-e.height/2},t=new M.geometry.Rect(new M.geometry.Point(t.x,t.y),new M.geometry.Size(e.width,e.height));return new M.drawing.Image(i,t)},D_.prototype._renderSwissCode=function(t,e){var i=this._getLogoSize(7*e),o=(i=Math.max(i.width,i.height))/4,r=o/2,t=t/2,n={},s=new M.drawing.Group;return n.x=n.y=Math.ceil(t-e-i/2),s.append(this._renderShape(n,Math.ceil(i+2*e),z_,"#fff")),n.x=n.y=t-i/2,s.append(this._renderShape(n,i,z_,this.options.color)),n.x=t+r-i/2,n.y=t+r+o-i/2,s.append(this._renderShape(n,o,j_,"#fff")),s},D_.prototype._renderShape=function(t,e,i,o){var r=new M.drawing.MultiPath({fill:{color:o},stroke:null});r.moveTo(t.x,t.y);for(var n=0;n<i.length;n++)r.lineTo(t.x+e*i[n][0],t.y+e*i[n][1]);return r.close(),r},D_.prototype._getSize=function(){var t;return this.options.size?parseInt(this.options.size,10):(t=Sx(this.element,this.options.renderAs),0<(t=Math.min(t.width,t.height))?t:200)},D_.prototype._calculateBaseUnit=function(t,e){var i,o=Math.floor(t/e);return o<1?(i=Math.ceil(+e),this.onError(new Error("Insufficient size for QR Code: the current size is "+t+"px and the minimum size is "+i+"px."))):t<=o*e&&1<=o-1&&o--,o},D_.prototype._renderMatrix=function(t,e,i){for(var o=new M.drawing.MultiPath({fill:{color:this.options.color},stroke:null}),r=0;r<t.length;r++)for(var n=i+r*e,s=0;s<t.length;){for(;0===t[r][s]&&s<t.length;)s++;if(s<t.length){for(var a=s;1===t[r][s];)s++;var a=V_(i+a*e),l=V_(n),h=V_(i+s*e),p=V_(n+e);o.moveTo(a,l).lineTo(a,p).lineTo(h,p).lineTo(h,l).close()}}return o},D_.prototype._renderBackground=function(t,e){t=new I(0,0,t,t).unpad(e.width/2);return M.drawing.Path.fromRect(t.toRect(),{fill:{color:this.options.background},stroke:{color:e.color,width:e.width}})},D_.prototype.setOptions=function(t){this.options=Lx(this.options,t||{}),void 0!==t.value&&(this._value=String(this.options.value)),this._initSurface(),this.redraw()},D_.prototype.value=function(t){if(void 0===t)return this._value;this._value=String(t),this.redraw()},D_.prototype._hasCustomLogo=function(){return Boolean(this.options.overlay.imageUrl)},D_.prototype._isSwiss=function(){return"swiss"===this.options.overlay.type},D_.prototype._getLogoSize=function(t){var e=this.options.overlay.width,i=this.options.overlay.height;return e||i?e&&!i?i=e:!e&&i&&(e=i):e=i=t,{width:e,height:i}},D_);function D_(t,e,i){void 0===i&&(i=Re),R_.call(this),this.options=O({},this.options,e),this.element=t,this.wrapper=this.element,this.onError=i,this._initElement(),this._initSurface(),this.setOptions(e)}e(js,{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}});let F_=js,H_=function(e){return void 0===e&&(e="ISO_8859_1"),function(t){try{O_(t,"L",e)}catch(t){return{valid:!1,error:t}}return{valid:!0}}};var N_={WGS84:{a:6378137,b:6356752.314245179,f:.0033528106647474805,e:.08181919084262149}};function U_(t){return t*t}var G_,W_,X_=Math,Y_=X_.abs,q_=X_.atan,Z_=X_.atan2,Q_=X_.cos,K_=X_.sin,$_=X_.tan,J_=((W_=M.Class)&&(db.__proto__=W_),((db.prototype=Object.create(W_&&W_.prototype)).constructor=db).prototype.initProperties=function(){O(this,{DISTANCE_ITERATIONS:100,DISTANCE_CONVERGENCE:1e-12,DISTANCE_PRECISION:2,FORMAT:"{0:N6}{1:N6}"})},db.prototype.toArray=function(){return[this.lat,this.lng]},db.prototype.equals=function(t){return t&&t.lat===this.lat&&t.lng===this.lng},db.prototype.clone=function(){return new db(this.lat,this.lng)},db.prototype.round=function(t){return this.lng=L(this.lng,t),this.lat=L(this.lat,t),this},db.prototype.wrap=function(){return this.lng=this.lng%180,this.lat=this.lat%90,this},db.prototype.distanceTo=function(t,e){return this.greatCircleTo(t,e).distance},db.prototype.destination=function(t,e,i){var e=ce(e),i=i||N_.WGS84,o=ce(this.lat),r=ce(this.lng),t=t/i.a,i=X_.asin(K_(o)*Q_(t)+Q_(o)*K_(t)*Q_(e)),r=r+Z_(K_(e)*K_(t)*Q_(o),Q_(t)-K_(o)*K_(i));return new db(oe(i),oe(r))},db.prototype.greatCircleTo=function(t,e){var i=db.create(void 0),e=e||N_.WGS84;if(!i||this.clone().round(8).equals(i.clone().round(8)))return{distance:0,azimuthFrom:0,azimuthTo:0};for(var o,r,n=e.a,s=e.b,a=e.f,l=ce(i.lng-this.lng),e=q_((1-a)*$_(ce(this.lat))),h=K_(e),p=Q_(e),e=q_((1-a)*$_(ce(i.lat))),c=K_(e),u=Q_(e),d=l,f=this.DISTANCE_ITERATIONS,g=!1;!g&&0<f--;)var y=K_(d),v=Q_(d),m=X_.sqrt(U_(u*y)+U_(p*c-h*u*v)),x=Z_(m,r=h*c+p*u*v),_=p*u*y/m,b=0,w=(0!=(o=1-U_(_))&&(b=r-2*h*c/o),d),k=a/16*o*(4+a*(4-3*o)),d=l+(1-k)*a*_*(x+k*m*(b+k*r*(2*U_(b)-1))),g=Y_(d-w)<=this.DISTANCE_CONVERGENCE;var i=o*(U_(n)-U_(s))/U_(s),e=1+i/16384*(4096+i*(i*(320-175*i)-768)),n=i/1024*(256+i*(i*(74-47*i)-128)),i=n*m*(b+n/4*(r*(2*U_(b)-1)-n/6*b*(4*U_(m)-3)*(4*U_(b)-3))),n=Z_(u*y,p*c-h*u*v),A=Z_(p*y,-h*u+p*c*v);return{distance:L(s*e*(x-i),this.DISTANCE_PRECISION),azimuthFrom:oe(n),azimuthTo:oe(A)}},db.prototype.toString=function(){return String(this.lat)+","+String(this.lng)},db.fromLngLat=function(t){return new db(t[1],t[0])},db.fromLatLng=function(t){return new db(t[0],t[1])},db.create=function(t,e){if(k(t))return t instanceof db?t.clone():1===arguments.length&&2===t.length?db.fromLatLng(t):new db(t,e)},db),tb=Math,eb=tb.atan,ib=tb.exp,ob=tb.pow,rb=tb.sin,nb=tb.log,sb=tb.tan,ab=M.geometry.Point,lb=tb.PI,hb=lb/2,pb=lb/4,cb=lb/180,t=N_.WGS84,gl=((G_=M.Class)&&(ub.__proto__=G_),((ub.prototype=Object.create(G_&&G_.prototype)).constructor=ub).prototype._initOptions=function(t){this.options=O({},this.options,t)},ub.prototype.initProperties=function(){O(this,{MAX_LNG:180,MAX_LAT:85.0840590501,INVERSE_ITERATIONS:15,INVERSE_CONVERGENCE:1e-12})},ub.prototype.forward=function(t,e){var i=this.options,o=i.datum.a,i=i.centralMeridian,r=x(t.lat,-this.MAX_LAT,this.MAX_LAT),e=e?x(t.lng,-this.MAX_LNG,this.MAX_LNG):t.lng,t=ce(e-i)*o,e=this._projectLat(r);return new ab(t,e)},ub.prototype._projectLat=function(t){var e=this.options.datum,i=e.e,e=e.a,t=ce(t),o=sb(pb+t/2),t=i*rb(t),t=ob((1-t)/(1+t),i/2);return e*nb(o*t)},ub.prototype.inverse=function(t,e){var i=this.options,o=i.datum.a,o=t.x/(cb*o)+i.centralMeridian,i=x(this._inverseY(t.y),-this.MAX_LAT,this.MAX_LAT);return e&&(o=x(o,-this.MAX_LNG,this.MAX_LNG)),new J_(i,o)},ub.prototype._inverseY=function(t){for(var e=this.options.datum,i=e.a,o=e.e,r=o/2,n=ib(-t/i),s=hb-2*eb(n),a=0;a<=this.INVERSE_ITERATIONS;a++){var l=o*rb(s),l=ob((1-l)/(1+l),r),l=hb-2*eb(n*l)-s;if(s+=l,tb.abs(l)<=this.INVERSE_CONVERGENCE)break}return oe(s)},ub);function ub(t){G_.call(this),this.initProperties(),this._initOptions(t)}function db(t,e){W_.call(this),this.initProperties(),1===arguments.length?(this.lat=t[0],this.lng=t[1]):(this.lat=t,this.lng=e)}e(gl,{centralMeridian:0,datum:t});function fb(t,e){return t.bind(e)}function gb(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function yb(t,e){e.insertBefore(t,e.firstChild)}function vb(t){return t.replace(/([a-z][A-Z])/g,function(t){return t.charAt(0)+"-"+t.charAt(1).toLowerCase()})}function mb(t){return t&&String(t).endsWith("px")?t:String(t)+"px"}function xb(t,e){var i=t.prototype;i.events?e.forEach(function(t){i.events.indexOf(t)<0&&i.events.push(t)}):i.events=e}function _b(t){var e=[];if(t)for(var i=vb(t).split("-"),o=0;o<i.length;o++)e.push("k-pos-"+i[o]);return e.join(" ")}(kb=gl)&&(Ob.__proto__=kb),((Ob.prototype=Object.create(kb&&kb.prototype)).constructor=Ob).prototype.initProperties=function(){kb.prototype.initProperties.call(this),O(this,{MAX_LAT:85.0511287798})},Ob.prototype._projectLat=function(t){var e=this.options.datum.a,t=ce(t),t=sb(pb+t/2);return e*nb(t)},Ob.prototype._inverseY=function(t){var e=this.options.datum.a,t=ib(-t/e);return oe(hb-2*eb(t))};var bb,wb,kb,Ab=Ob,Sb=((wb=M.Class)&&(Mb.__proto__=wb),((Mb.prototype=Object.create(wb&&wb.prototype)).constructor=Mb).prototype.toPoint=function(t,e,i){return this._proj.forward(t,i).transform(this._tm).scale(e||1)},Mb.prototype.toLocation=function(t,e,i){t=t.clone().scale(1/(e||1)).transform(this._itm);return this._proj.inverse(t,i)},Mb),Cb=(Object.assign,function(t){var e=document.createElement("div");return e.innerHTML=t,e.firstChild}),Pb=((bb=ii)&&(Tb.__proto__=bb),((Tb.prototype=Object.create(bb&&bb.prototype)).constructor=Tb).prototype._initOptions=function(t){this.options=O({},this.options,t)},Tb.prototype.filter=function(t,e){this._extent=t,this._zoom=e,this._render()},Tb.prototype.add=function(t){var e=t;k(t)&&(this.items.push(e="string"==typeof t?{text:t}:e),this._render())},Tb.prototype.remove=function(t){for(var e=[],i=0;i<this.items.length;i++){var o=this.items[i];o.text!==t&&e.push(o)}this.items=e,this._render()},Tb.prototype.clear=function(){this.items=[],gb(this.element)},Tb.prototype._render=function(){for(var t=[],e=0;e<this.items.length;e++){var i=this.items[e],i=this._itemText(i);""!==i&&t.push(i)}if(0<t.length){gb(this.element);var o=t.join(this.options.separator),r=this.element,n=document.createElement("div");for(n.innerHTML=o;0<n.childNodes.length;)r.appendChild(n.childNodes[0]);this.showElement()}else this.hideElement()},Tb.prototype.hideElement=function(){this.element.style.display="none"},Tb.prototype.showElement=function(){this.element.style.display=""},Tb.prototype._itemText=function(t){var e="",i=this._inZoomLevel(t.minZoom,t.maxZoom),o=this._inArea(t.extent);return i&&o&&(e+=t.text),e},Tb.prototype._inZoomLevel=function(t,e){t=_(t,-Number.MAX_VALUE),e=_(e,Number.MAX_VALUE);return this._zoom>t&&this._zoom<e},Tb.prototype._inArea=function(t){var e=!0;return e=t?t.contains(this._extent):e},Tb);function Tb(t,e){bb.call(this),this.element=t,this._initOptions(e),this.items=[],vt(this.element,"k-widget k-attribution")}function Mb(){wb.call(this);var t=this._proj=new Ab,t=this.c=2*lb*t.options.datum.a;this._tm=M.geometry.transform().translate(.5,.5).scale(1/t,-1/t),this._itm=M.geometry.transform().scale(t,-t).translate(-.5,-.5)}function Ob(){kb.apply(this,arguments)}e(Pb,{name:"Attribution",separator:" | "});var Lb={up:{className:"k-navigator-n",iconClass:"k-i-caret-alt-up"},down:{className:"k-navigator-s",iconClass:"k-i-caret-alt-down"},right:{className:"k-navigator-e",iconClass:"k-i-caret-alt-right"},left:{className:"k-navigator-w",iconClass:"k-i-caret-alt-left"}};function Ib(t,e){t='<button class="k-button k-button-square k-rounded-full k-button-flat k-button-flat-base k-icon-button '+Lb[t].className+'" aria-label="move '+t+'">'+we({icon:"caret-alt-"+t,iconClass:"k-button-icon",svgIcons:e.svgIcons,type:e.type})+"</button>";return Cb(t)}(Bb=ii)&&(Rb.__proto__=Bb),((Rb.prototype=Object.create(Bb&&Bb.prototype)).constructor=Rb).prototype.destroy=function(){this.dispose()},Rb.prototype.dispose=function(){Ye(this._keyroot,"keydown",this._keydownHandler)},Rb.prototype._tabindex=function(t){var t=t||this.wrapper||this.element,e=this.element,i="tabindex",o=t.getAttribute(i)||e.getAttribute(i);e.removeAttribute(i),t.setAttribute(i,isNaN(o)?0:o)},Rb.prototype._initOptions=function(t){this.options=O({},this.options,t)},Rb.prototype._pan=function(t,e){var i=this.options.panStep;this.trigger("pan",{x:t*i,y:e*i})},Rb.prototype._click=function(t){var e=0,i=0,o=t.currentTarget;o.matches(".k-navigator-n")?i=1:o.matches(".k-navigator-s")?i=-1:o.matches(".k-navigator-e")?e=1:o.matches(".k-navigator-w")&&(e=-1),this._pan(e,i),t.preventDefault()},Rb.prototype._keydown=function(t){switch(t.which){case Ve.UP:this._pan(0,1),t.preventDefault();break;case Ve.DOWN:this._pan(0,-1),t.preventDefault();break;case Ve.RIGHT:this._pan(1,0),t.preventDefault();break;case Ve.LEFT:this._pan(-1,0),t.preventDefault()}};var Bb,Eb=Rb;function Rb(t,e){Bb.call(this),this.element=t,this._initOptions(e);var t=Ib("up",e.icons),i=Ib("right",e.icons),o=Ib("down",e.icons),e=Ib("left",e.icons),t=(this.element.appendChild(t),this.element.appendChild(i),this.element.appendChild(o),this.element.appendChild(e),vt(this.element,"k-widget k-navigator"),Xe(this.element,"click",".k-button",fb(this._click,this)),this.element.parentNode.closest("[data-role]"));this._keyroot=t||this.element,this._tabindex(this._keyroot),this._keydownHandler=fb(this._keydown,this),Xe(this._keyroot,"keydown",this._keydownHandler)}function Vb(t,e,i){t='<button class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-base k-icon-button k-zoom-'+t+'" title="zoom-'+t+'" aria-label="zoom-'+t+'">'+we({icon:e,iconClass:"k-button-icon",svgIcons:i.svgIcons,type:i.type})+"</button>";return Cb(t)}e(Eb,{name:"Navigator",panStep:1}),xb(Eb,["pan"]);(jb=ii)&&(Db.__proto__=jb),((Db.prototype=Object.create(jb&&jb.prototype)).constructor=Db).prototype.destroy=function(){this.element&&Ye(this.element,"click",this._clickHandler),this._keyroot&&Ye(this._keyroot,"keydown",this._keydownHandler)},Db.prototype._tabindex=function(t){var t=t||this.wrapper||this.element,e=this.element,i="tabindex",o=t.getAttribute(i)||e.getAttribute(i);e.removeAttribute(i),t.setAttribute(i,isNaN(o)?0:o)},Db.prototype._initOptions=function(t){this.options=O({},this.options,t)},Db.prototype._change=function(t){var e=this.options.zoomStep;this.trigger("change",{delta:t*e})},Db.prototype._click=function(t){var e=1;Ut(t.currentTarget,"k-zoom-out")&&(e=-1),this._change(e),t.preventDefault()},Db.prototype._keydown=function(t){switch(t.which){case Ve.NUMPAD_PLUS:case 187:case 61:this._change(1);break;case Ve.NUMPAD_MINUS:case 189:case 173:this._change(-1)}};var jb,zb=Db;function Db(t,e,i){jb.call(this),this.element=t,this._initOptions(e);t=Vb("in","plus",i),e=Vb("out","minus",i),this.element.appendChild(t),this.element.appendChild(e),this.element.setAttribute("role","group"),vt(this.element,"k-widget k-zoom-control k-button-group k-group-horizontal"),this._clickHandler=this._click.bind(this),Xe(this.element,"click",".k-button",this._clickHandler),i=this.element.parentNode.closest("[data-role]");this._keyroot=i||this.element,this._tabindex(this._keyroot),this._keydownHandler=this._keydown.bind(this),Xe(this._keyroot,"keydown",this._keydownHandler)}e(zb,{name:"ZoomControl",zoomStep:1}),xb(zb,["change"]);var Fb,Hb,Ds=Math,Nb=Ds.max,Ub=Ds.min,Gb=((Hb=M.Class)&&(qb.__proto__=Hb),hx={World:{configurable:!0}},((qb.prototype=Object.create(Hb&&Hb.prototype)).constructor=qb).prototype.contains=function(t){var e=this.nw,i=this.se,o=_(t.lng,t[1]),r=_(t.lat,t[0]);return t&&o+180>=e.lng+180&&o+180<=i.lng+180&&r+90>=i.lat+90&&r+90<=e.lat+90},qb.prototype.center=function(){var t=this.nw,e=this.se,i=t.lng+(e.lng-t.lng)/2;return new J_(t.lat+(e.lat-t.lat)/2,i)},qb.prototype.containsAny=function(t){for(var e=!1,i=0;i<t.length;i++)e=e||this.contains(t[i]);return e},qb.prototype.include=function(t){var e=this.nw,i=this.se,o=_(t.lng,t[1]),t=_(t.lat,t[0]);e.lng=Ub(e.lng,o),e.lat=Nb(e.lat,t),i.lng=Nb(i.lng,o),i.lat=Ub(i.lat,t)},qb.prototype.includeAll=function(t){for(var e=0;e<t.length;e++)this.include(t[e])},qb.prototype.edges=function(){var t=this.nw,e=this.se;return{nw:this.nw,ne:new J_(t.lat,e.lng),se:this.se,sw:new J_(e.lat,t.lng)}},qb.prototype.toArray=function(){var t=this.nw,e=this.se;return[t,new J_(t.lat,e.lng),e,new J_(e.lat,t.lng)]},qb.prototype.overlaps=function(t){return this.containsAny(t.toArray())||t.containsAny(this.toArray())},qb.create=function(t,e){return t instanceof qb?t:t&&e?new qb(t,e):t&&4===t.length&&!e?new qb([t[0],t[1]],[t[2],t[3]]):void 0},hx.World.get=function(){return new qb([90,-180],[-90,180])},Object.defineProperties(qb,hx),qb),Wb="centerChange",Xb=((Fb=M.Class)&&(Yb.__proto__=Fb),px={anchor:{configurable:!0}},((Yb.prototype=Object.create(Fb&&Fb.prototype)).constructor=Yb).prototype.show=function(t,e){this.location!==e.location&&(this.anchor=t,this.location=e.location,this.widgetService.notify("showTooltip",Object.assign({anchor:this.anchor},e)),this.visible=!0)},Yb.prototype.hide=function(){this.widgetService&&this.widgetService.notify("hideTooltip"),this.visible=!1,this.location=null},px.anchor.get=function(){return this._anchor},px.anchor.set=function(t){t=this.widgetService.widget._toDocumentCoordinates({x:t.left-this.offset.x,y:t.top-this.offset.y});this._anchor={left:t.left,top:t.top}},Yb.prototype.destroy=function(){this.widgetService=null},Object.defineProperties(Yb.prototype,px),Yb);function Yb(t,e){Fb.call(this),this.widgetService=t,this.options=O({},this.options,e),this.offset={x:0,y:0}}function qb(t,e){Hb.call(this);t=J_.create(t),e=J_.create(e);t.lng+180>e.lng+180&&t.lat+90<e.lat+90?(this.se=t,this.nw=e):(this.se=e,this.nw=t)}e(Xb,{border:{width:1},opacity:1});(Zb=M.Class)&&($b.__proto__=Zb),(($b.prototype=Object.create(Zb&&Zb.prototype)).constructor=$b).prototype.destroy=function(){this._deactivate()},$b.prototype._initOptions=function(t){this.options=O({},this.options,t)},$b.prototype.show=function(){this.reset(),this._activate(),this._applyExtent(!0)},$b.prototype.hide=function(){this._deactivate(),this._setVisibility(!1)},$b.prototype.reset=function(){this._beforeReset(),this._reset()},$b.prototype._reset=function(){this._applyExtent()},$b.prototype._beforeReset=function(){},$b.prototype._resize=function(){},$b.prototype._panEnd=function(){this._applyExtent()},$b.prototype._applyExtent=function(){var t=this.options,e=this.map.zoom(),i=!k(t.minZoom)||e>=t.minZoom,e=!k(t.maxZoom)||e<=t.maxZoom,t=Gb.create(t.extent),t=!t||t.overlaps(this.map.extent());this._setVisibility(i&&e&&t)},$b.prototype._setVisibility=function(t){this.element.style.display=t?"":"none"},$b.prototype._activate=function(){var t=this.map;this._deactivate(),t.bind("beforeReset",this._beforeReset),t.bind("reset",this._reset),t.bind("resize",this._resize),t.bind("panEnd",this._panEnd)},$b.prototype._deactivate=function(){var t=this.map;t.unbind("beforeReset",this._beforeReset),t.unbind("reset",this._reset),t.unbind("resize",this._resize),t.unbind("panEnd",this._panEnd)},$b.prototype._updateAttribution=function(){var t=this.map.attribution;t&&t.add(this.options.attribution)},$b.prototype._readData=function(){return this.options.data||[]},$b.prototype._hasData=function(){return this._data&&0<this._data.length},$b.prototype._layerIndex=function(){return(this.map.layers||[]).indexOf(this)};var Zb,cx=$b,Qb=Math,Kb=M.geometry.Point;function $b(t,e){Zb.call(this),this.support=qe(),this._initOptions(e),this.map=t;e=document.createElement("div");vt(e,"k-layer"),e.style.zIndex=this.options.zIndex,e.style.opacity=this.options.opacity,this.element=e,t.scrollElement.appendChild(this.element),this._beforeReset=this._beforeReset.bind(this),this._reset=this._reset.bind(this),this._resize=this._resize.bind(this),this._panEnd=this._panEnd.bind(this),this._activate(),this._updateAttribution()}function Jb(t){return Pt(t)?t:Vt.compile(t)}function t1(t){var e=t;return"string"!=typeof t&&(e+="px"),e}(e1=cx)&&(i1.__proto__=e1),((i1.prototype=Object.create(e1&&e1.prototype)).constructor=i1).prototype.destroy=function(){e1.prototype.destroy.call(this),this._view.destroy(),this._view=null},i1.prototype._beforeReset=function(){var t=this.map,t=t.locationToLayer(t.extent().nw).round();this._view.viewOrigin(t)},i1.prototype._reset=function(){e1.prototype._reset.call(this),this._updateView(),this._view.reset()},i1.prototype._viewType=function(){return n1},i1.prototype._activate=function(){e1.prototype._activate.call(this),this.support.mobileOS||(this._pan||(this._pan=(0,M.throttle)(this._render.bind(this),100)),this.map.bind("pan",this._pan))},i1.prototype._deactivate=function(){e1.prototype._deactivate.call(this),this._pan&&this.map.unbind("pan",this._pan)},i1.prototype._updateView=function(){var t=this._view,e=this.map,i=e.extent(),i={nw:e.locationToLayer(i.nw).round(),se:e.locationToLayer(i.se).round()};t.center(e.locationToLayer(e.center())),t.extent(i),t.zoom(e.zoom())},i1.prototype._resize=function(){this._render()},i1.prototype._panEnd=function(t){e1.prototype._panEnd.call(this,t),this._render()},i1.prototype._render=function(){this._updateView(),this._view.render()};var e1,lx=i1;function i1(t,e){e1.call(this,t,e),"string"==typeof this.options.subdomains&&(this.options.subdomains=this.options.subdomains.split(""));t=this._viewType();this._view=new t(this.element,this.options)}e(lx,{tileSize:256,subdomains:["a","b","c"],urlTemplate:"",zIndex:1});(r1=M.Class)&&(l1.__proto__=r1),((l1.prototype=Object.create(r1&&r1.prototype)).constructor=l1).prototype._initOptions=function(t){this.options=O({},this.options,t)},l1.prototype.center=function(t){this._center=t},l1.prototype.extent=function(t){this._extent=t},l1.prototype.viewOrigin=function(t){this._viewOrigin=t},l1.prototype.zoom=function(t){this._zoom=t},l1.prototype.pointToTileIndex=function(t){return new Kb(Qb.floor(t.x/this.options.tileSize),Qb.floor(t.y/this.options.tileSize))},l1.prototype.tileCount=function(){var t=this.size(),e=this.pointToTileIndex(this._extent.nw),i=this._extent.nw,e=this.indexToPoint(e).translate(-i.x,-i.y);return{x:Qb.ceil((Qb.abs(e.x)+t.width)/this.options.tileSize),y:Qb.ceil((Qb.abs(e.y)+t.height)/this.options.tileSize)}},l1.prototype.size=function(){var t=this._extent.nw,t=this._extent.se.clone().translate(-t.x,-t.y);return{width:t.x,height:t.y}},l1.prototype.indexToPoint=function(t){var e=t.x;return new Kb(e*this.options.tileSize,t.y*this.options.tileSize)},l1.prototype.subdomainText=function(){var t=this.options.subdomains;return t[this.subdomainIndex++%t.length]},l1.prototype.destroy=function(){gb(this.element),this.pool.empty()},l1.prototype.reset=function(){this.pool.reset(),this.subdomainIndex=0,this.render()},l1.prototype.render=function(){for(var t,e,i=this.tileCount(),o=this.pointToTileIndex(this._extent.nw),r=0;r<i.x;r++)for(e=0;e<i.y;e++)(t=this.createTile({x:o.x+r,y:o.y+e})).visible||t.show()},l1.prototype.createTile=function(t){t=this.tileOptions(t),t=this.pool.get(this._center,t);return t.element.parentNode||this.element.append(t.element),t},l1.prototype.tileOptions=function(t){var e=this.wrapIndex(t),i=this.indexToPoint(t),o=this._viewOrigin,o=i.clone().translate(-o.x,-o.y);return{index:e,currentIndex:t,point:i,offset:new Kb(L((e=o).x),L(e.y)),zoom:this._zoom,size:this.options.tileSize,subdomain:this.subdomainText(),urlTemplate:this.options.urlTemplate,errorUrlTemplate:this.options.errorUrlTemplate}},l1.prototype.wrapIndex=function(t){var e=Qb.pow(2,this._zoom);return{x:this.wrapValue(t.x,e),y:x(t.y,0,e-1)}},l1.prototype.wrapValue=function(t,e){var i=Qb.abs(t)%e;return 0<=t?i:e-(0==i?e:i)};var o1,r1,n1=l1,s1=((o1=M.Class)&&(a1.__proto__=o1),((a1.prototype=Object.create(o1&&o1.prototype)).constructor=a1).prototype.destroy=function(){var t=this.element,e=t?t.parentNode:null;t&&(e&&e.removeChild(t),this.element=null)},a1.prototype._initOptions=function(t){this.options=O({},this.options,t)},a1.prototype.createElement=function(){var t=document.createElement("img"),e=this.options.size+"px";t.setAttribute("alt",""),t.style.position="absolute",t.style.display="block",t.style.width=t.style.maxWidth=e,t.style.height=t.style.maxHeight=e,this.element=t},a1.prototype.show=function(){var t=this.element,e=(t.style.top=t1(this.options.offset.y),t.style.left=t1(this.options.offset.x),this.url());e&&t.setAttribute("src",e),t.style.visibility="visible",this.visible=!0},a1.prototype.hide=function(){this.element.style.visibility="hidden",this.visible=!1},a1.prototype.url=function(){return Jb(this.options.urlTemplate)(this.urlOptions())},a1.prototype.errorUrl=function(){return Jb(this.options.errorUrlTemplate)(this.urlOptions())},a1.prototype.urlOptions=function(){var t=this.options;return{zoom:t.zoom,subdomain:t.subdomain,z:t.zoom,x:t.index.x,y:t.index.y,s:t.subdomain,quadkey:t.quadkey,q:t.quadkey,culture:t.culture,c:t.culture}},a1);function a1(t,e){o1.call(this),this.id=t,this.visible=!0,this._initOptions(e),this.createElement(),this.show()}function l1(t,e){r1.call(this),this.element=t,this._initOptions(e),this.pool=new p1}e(s1,{urlTemplate:"",errorUrlTemplate:""});(h1=M.Class)&&(c1.__proto__=h1),((c1.prototype=Object.create(h1&&h1.prototype)).constructor=c1).prototype.get=function(t,e){return this._items.length>=this.options.maxSize&&this._remove(t),this._create(e)},c1.prototype.empty=function(){for(var t=this._items,e=0;e<t.length;e++)t[e].destroy();this._items=[]},c1.prototype.reset=function(){for(var t=this._items,e=0;e<t.length;e++)t[e].hide()},c1.prototype._create=function(t){for(var e,i=this._items,o=le(t.point.toString()+t.offset.toString()+t.zoom+t.urlTemplate),r=0;r<i.length;r++)if(i[r].id===o){e=i[r];break}return e?e.show():(e=new s1(o,t),this._items.push(e)),e},c1.prototype._remove=function(t){for(var e=this._items,i=-1,o=-1,r=0;r<e.length;r++){var n=e[r].options.point.distanceTo(t);i<n&&!e[r].visible&&(o=r,i=n)}-1!==o&&(e[o].destroy(),e.splice(o,1))};var h1,p1=c1;function c1(){h1.call(this),this._items=[]}e(p1,{maxSize:100});function u1(t,e,i){return"translate3d("+t+"px,"+e+"px,0) scale("+i+")"}var d1,f1,g1,y1,v1,m1,x1,_1=Object.assign,b1="change",w1=((x1=ii)&&(R1.__proto__=x1),((R1.prototype=Object.create(x1&&x1.prototype)).constructor=R1).prototype.captureNext=function(){this.capture=!0},R1.prototype.cancelCapture=function(){this.capture=!1},R1.prototype._press=function(t){this.trigger("press"),this.capture&&t.preventDefault()},R1.prototype._release=function(t){this.trigger("release"),this.capture&&(t.preventDefault(),this.cancelCapture())},R1),k1=((m1=ii)&&(E1.__proto__=m1),((E1.prototype=Object.create(m1&&m1.prototype)).constructor=E1).prototype.makeVirtual=function(){_1(this,{virtual:!0,forcedEnabled:!0,_virtualMin:0,_virtualMax:0})},E1.prototype.virtualSize=function(t,e){this._virtualMin===t&&this._virtualMax===e||(this._virtualMin=t,this._virtualMax=e,this.update())},E1.prototype.outOfBounds=function(t){return t>this.max||t<this.min},E1.prototype.forceEnabled=function(){this.forcedEnabled=!0},E1.prototype.getSize=function(){return this.container[this.measure]},E1.prototype.getTotal=function(){return this.element[this.scrollSize]},E1.prototype.rescale=function(t){this.scale=t},E1.prototype.update=function(t){var e=this,i=e.virtual?e._virtualMax:e.getTotal(),o=i*e.scale,r=e.getSize();0===i&&!e.forcedEnabled||(e.max=e.virtual?-e._virtualMin:0,e.size=r,e.total=o,e.min=Math.min(e.max,r-o),e.minScale=r/i,e.centerOffset=(o-r)/2,e.enabled=e.forcedEnabled||r<o,t)||e.trigger(b1,e)},E1),A1=((v1=ii)&&(B1.__proto__=v1),((B1.prototype=Object.create(v1&&v1.prototype)).constructor=B1).prototype.rescale=function(t){this.x.rescale(t),this.y.rescale(t),this.refresh()},B1.prototype.centerCoordinates=function(){return{x:Math.min(0,-this.x.centerOffset),y:Math.min(0,-this.y.centerOffset)}},B1.prototype.refresh=function(){var t=this;t.x.update(),t.y.update(),t.enabled=t.x.enabled||t.y.enabled,t.minScale=t.forcedMinScale||Math.min(t.x.minScale,t.y.minScale),t.fitScale=Math.max(t.x.minScale,t.y.minScale),t.trigger(b1)},B1),S1=((y1=ii)&&(I1.__proto__=y1),((I1.prototype=Object.create(y1&&y1.prototype)).constructor=I1).prototype.outOfBounds=function(){return this.dimension.outOfBounds(this.movable[this.axis])},I1.prototype.dragMove=function(t){var e,i=this.dimension,o=this.axis,r=this.movable,n=r[o]+t;i.enabled&&(e=t,(n<i.min&&t<0||n>i.max&&0<t)&&(e*=this.resistance),r.translateAxis(o,e),this.trigger(b1,this))},I1),C1=((g1=M.Class)&&(L1.__proto__=g1),(L1.prototype=Object.create(g1&&g1.prototype)).constructor=L1),P1=((f1=ii)&&(O1.__proto__=f1),((O1.prototype=Object.create(f1&&f1.prototype)).constructor=O1).prototype.translateAxis=function(t,e){this[t]+=e,this.refresh()},O1.prototype.scaleTo=function(t){this.scale=t,this.refresh()},O1.prototype.scaleWith=function(t){this.scale*=t,this.refresh()},O1.prototype.translate=function(t){this.x+=t.x,this.y+=t.y,this.refresh()},O1.prototype.moveAxis=function(t,e){this[t]=e,this.refresh()},O1.prototype.moveTo=function(t){_1(this,t),this.refresh()},O1.prototype.refresh=function(){var t=this.x,e=this.y;this.round&&(t=Math.round(t),e=Math.round(e)),(t=u1(t,e,this.scale))!==this.coordinates&&(this.element.style.transform=t,this._saveCoordinates(t),this.trigger(b1))},O1.prototype._saveCoordinates=function(t){this.coordinates=t},O1),T1=M.drawing.Group,Ja=((d1=cx)&&(M1.__proto__=d1),((M1.prototype=Object.create(d1&&d1.prototype)).constructor=M1).prototype.destroy=function(){d1.prototype.destroy.call(this),this.surface.destroy()},M1.prototype._reset=function(){d1.prototype._reset.call(this),this._translateSurface(),this._data=this._readData(),this._hasData()&&this._load(this._data)},M1.prototype._initRoot=function(){this._root=new T1,this.surface.draw(this._root)},M1.prototype._beforeReset=function(){this.surface.clear(),this._initRoot()},M1.prototype._resize=function(){this.surface.size(this.map.size())},M1.prototype._readData=function(){var t=d1.prototype._readData.call(this);return"FeatureCollection"===t.type?t.features:"GeometryCollection"===t.type?t.geometries:t},M1.prototype._load=function(t){this._data=t,this._clearMarkers(),this._loader||(this._loader=new z1(this.map,this.options.style,this));for(var e=new T1,i=0;i<t.length;i++){var o=this._loader.parse(t[i]);o&&e.append(o)}this._root.clear(),this._root.append(e)},M1.prototype.shapeCreated=function(t){var e=!1;return e=(e=t instanceof M.drawing.Circle&&this.map.options.renderPointsAsMarkers?k(this._createMarker(t)):e)||this.map.trigger("shapeCreated",{layer:this,shape:t})},M1.prototype.featureCreated=function(t){(t.layer=this).map.trigger("shapeFeatureCreated",t)},M1.prototype._createMarker=function(t){t=this.map.markers.bind({location:t.location},t.dataItem);return t&&this._markers.push(t),t},M1.prototype._clearMarkers=function(){for(var t=0;t<this._markers.length;t++)this.map.markers.remove(this._markers[t]);this._markers=[]},M1.prototype._pan=function(){this._panning||(this._panning=!0,this.surface.suspendTracking())},M1.prototype._panEnd=function(t){d1.prototype._panEnd.call(this,t),this._translateSurface(),this.surface.resumeTracking(),this._panning=!1},M1.prototype._translateSurface=function(){var t=this.map,t=t.locationToView(t.extent().nw);this.surface.translate&&(this.surface.translate(t),this.movable.moveTo({x:t.x,y:t.y}))},M1.prototype._eventArgs=function(t){return{layer:this,layerIndex:this._layerIndex(),shape:t.element,shapeIndex:(this._data||[]).indexOf(t.element.dataItem),originalEvent:t.originalEvent}},M1.prototype._handler=function(e){var i=this;return function(t){t.element&&i.map.trigger(e,i._eventArgs(t))}},M1.prototype._mouseenter=function(t){var e;t.element&&(this.map.trigger("shapeMouseEnter",this._eventArgs(t)),e=t.element,t=this._tooltipAnchor(t),this.map._tooltip.show(t,this._tooltipContext(e)))},M1.prototype._tooltipContext=function(t){return{type:"shape",layerIndex:this._layerIndex(),className:"k-map-shape-tooltip",dataItem:t.dataItem,location:t.location}},M1.prototype._tooltipAnchor=function(t){t=this.map.eventOffset(t.originalEvent);return{top:t.y,left:t.x}},M1.prototype._activate=function(){d1.prototype._activate.call(this),this._panHandler=fb(this._pan,this),this.map.bind("pan",this.panHandler)},M1.prototype._deactivate=function(){d1.prototype._deactivate.call(this),this.map.unbind("pan",this._panHandler)},M1);function M1(t,e){d1.call(this,t,e),this._pan=fb(this._pan,this),this.surface=M.drawing.Surface.create(this.element,{width:t.scrollElement.clientWidth,height:t.scrollElement.clientHeight}),this._initRoot(),this.movable=new P1(this.surface.element),this._markers=[],this._click=this._handler("shapeClick"),this.surface.bind("click",this._click),this._mouseleave=this._handler("shapeMouseLeave"),this.surface.bind("mouseleave",this._mouseleave),this.surface.bind("mouseenter",this._mouseenter.bind(this))}function O1(t){f1.call(this);var e=this,t=(e.element=t,e.element.style.transformOrigin="left top",e.x=0,e.y=0,e.scale=1,u1(e.x,e.y,e.scale));e.element.style.transform=t,e._saveCoordinates(t)}function L1(t){g1.call(this);var s,a,l,h=this;_1(h,{elastic:!0},t),t=h.elastic?.5:0,l=h.movable,h.x=s=new S1({axis:"x",dimension:h.dimensions.x,resistance:t,movable:l}),h.y=a=new S1({axis:"y",dimension:h.dimensions.y,resistance:t,movable:l}),h.userEvents.bind(["press","move","end","gesturestart","gesturechange"],{gesturestart:function(t){h.gesture=t,h.offset=re(h.dimensions.container)},press:function(t){var e=t.event.target.closest("a");e&&e.matches("[data-navigate-on-press=true]")&&t.sender.cancel()},gesturechange:function(t){var e=h.gesture,i=e.center,o=t.center,e=t.distance/e.distance,r=h.dimensions.minScale,n=h.dimensions.maxScale,r=(l.scale<=r&&e<1&&(e+=.8*(1-e)),l.scale*e>=n&&(e=n/l.scale),l.x+h.offset.left),n=l.y+h.offset.top,r={x:(r-i.x)*e+o.x-r,y:(n-i.y)*e+o.y-n};l.scaleWith(e),s.dragMove(r.x),a.dragMove(r.y),h.dimensions.rescale(l.scale),(h.gesture=t).preventDefault()},move:function(t){t.event.target.tagName.match(/textarea|input/i)||(s.dimension.enabled||a.dimension.enabled?(s.dragMove(t.x.delta),a.dragMove(t.y.delta),t.preventDefault()):t.touch.skip())},end:function(t){t.preventDefault()}})}function I1(t){y1.call(this),_1(this,t)}function B1(t){v1.call(this);this.x=new k1(_1({horizontal:!0},t)),this.y=new k1(_1({horizontal:!1},t)),this.container=t.container,this.forcedMinScale=t.minScale,this.maxScale=t.maxScale||100,this.bind(b1,t)}function E1(t){m1.call(this);var e=this;e.forcedEnabled=!1,_1(e,t),e.scale=1,e.horizontal?(e.measure="offsetWidth",e.scrollSize="scrollWidth",e.axis="x"):(e.measure="offsetHeight",e.scrollSize="scrollHeight",e.axis="y")}function R1(t,e){x1.call(this);var i=this,o=t[0]||t;i.capture=!1,o.addEventListener?(Fe.down.split(" ").forEach(function(t){o.addEventListener(t,fb(i._press,i),!0)}),Fe.up.split(" ").forEach(function(t){o.addEventListener(t,fb(i._release,i),!0)})):(Fe.down.split(" ").forEach(function(t){o.attachEvent(t,fb(i._press,i))}),Fe.up.split(" ").forEach(function(t){o.attachEvent(t,fb(i._release,i))})),i.bind(["press","release"],e||{})}e(Ja,{autoBind:!0,zIndex:100});(j1=M.Class)&&(F1.__proto__=j1),((F1.prototype=Object.create(j1&&j1.prototype)).constructor=F1).prototype.parse=function(t){var e=new T1,i=!0;return"Feature"===t.type?(i=!1,this._loadGeometryTo(e,t.geometry,t),this._featureCreated(e,t)):this._loadGeometryTo(e,t,t),e=i&&e.children.length<2?e.children[0]:e},F1.prototype._shapeCreated=function(t){var e=!1;return e=this.observer&&this.observer.shapeCreated?this.observer.shapeCreated(t):e},F1.prototype._featureCreated=function(t,e){this.observer&&this.observer.featureCreated&&this.observer.featureCreated({group:t,dataItem:e,properties:e.properties})},F1.prototype._loadGeometryTo=function(t,e,i){var o,r,n=e.coordinates;switch(e.type){case"LineString":r=this._loadPolygon(t,[n],i),this._setLineFill(r);break;case"MultiLineString":for(o=0;o<n.length;o++)r=this._loadPolygon(t,[n[o]],i),this._setLineFill(r);break;case"Polygon":this._loadPolygon(t,n,i);break;case"MultiPolygon":for(o=0;o<n.length;o++)this._loadPolygon(t,n[o],i);break;case"Point":this._loadPoint(t,n,i);break;case"MultiPoint":for(o=0;o<n.length;o++)this._loadPoint(t,n[o],i)}},F1.prototype._setLineFill=function(t){var e=t.segments;(e.length<4||!e[0].anchor().equals(he(e).anchor()))&&(t.options.fill=null)},F1.prototype._loadShape=function(t,e){return this._shapeCreated(e)||t.append(e),e},F1.prototype._loadPolygon=function(t,e,i){e=this._buildPolygon(e);return e.dataItem=i,e.location=this.locator.viewToLocation(e.bbox().center()),this._loadShape(t,e)},F1.prototype._buildPolygon=function(t){for(var e=new(1<t.length?M.drawing.MultiPath:M.drawing.Path)(this.style),i=0;i<t.length;i++)for(var o=0;o<t[i].length;o++){var r=this.locator.locationToView(J_.fromLngLat(t[i][o]));0===o?e.moveTo(r.x,r.y):e.lineTo(r.x,r.y)}return e},F1.prototype._loadPoint=function(t,e,i){var e=J_.fromLngLat(e),o=this.locator.locationToView(e),o=new M.geometry.Circle(o,10),o=new M.drawing.Circle(o,this.style);return o.dataItem=i,o.location=e,this._loadShape(t,o)};var V1,j1,z1=F1,yx=((V1=Ja)&&(D1.__proto__=V1),((D1.prototype=Object.create(V1&&V1.prototype)).constructor=D1).prototype._readData=function(){return this.options.data||[]},D1.prototype._load=function(t){if(this._data=t,this.surface.clear(),0!==t.length){var e=this.options,i=Ht(e.valueField),o=t.slice(0);o.sort(function(t,e){return i(e)-i(t)});for(var r=this._scaleType(),n=Ht(this.options.locationField),s=0;s<o.length;s++){var a,l,h,p=o[s],c=n(p),u=i(p);k(c)&&k(u)&&(a=a||new r([0,u],[e.minSize,e.maxSize]),c=J_.create(c),h=this.map.locationToView(c),l=a.map(u),(h=this._createSymbol({center:h,size:l,style:e.style,dataItem:p,location:c})).dataItem=p,h.location=c,h.value=u,this._drawSymbol(h))}}},D1.prototype._scaleType=function(){var t=this.options.scale;return Pt(t)?t:U1[t]},D1.prototype._createSymbol=function(t){var e=this.options.symbol;return(e=Pt(e)?e:G1[e])(t)},D1.prototype._drawSymbol=function(t){this.map.trigger("shapeCreated",{layer:this,shape:t})||this.surface.draw(t)},D1.prototype._tooltipContext=function(t){return{type:"bubble",layerIndex:this._layerIndex(),className:"k-map-bubble-tooltip",dataItem:t.dataItem,location:t.location,value:t.value}},D1.prototype._tooltipAnchor=function(t){t=t.element.bbox().center();return{top:t.y,left:t.x}},D1);function D1(){V1.apply(this,arguments)}function F1(t,e,i){j1.call(this),this.observer=i,this.locator=t,this.style=e}e(yx,{locationField:"location",valueField:"value",minSize:0,maxSize:100,scale:"sqrt",symbol:"circle",zIndex:200}),(N1=M.Class)&&($1.__proto__=N1),(($1.prototype=Object.create(N1&&N1.prototype)).constructor=$1).prototype.map=function(t){t=(Math.sqrt(t)-Math.sqrt(this._domain[0]))*this._ratio;return this._range[0]+t};var H1,N1,U1={sqrt:$1},G1={circle:function(t){var e=new M.geometry.Circle(t.center,t.size/2);return new M.drawing.Circle(e,t.style)},square:function(t){var e=new M.drawing.Path(t.style),i=t.size/2,t=t.center;return e.moveTo(t.x-i,t.y-i).lineTo(t.x+i,t.y-i).lineTo(t.x+i,t.y+i).lineTo(t.x-i,t.y+i).close(),e}},W1="mouseenter",X1="mouseleave",Y1=Object.assign,q1="k-marker",Z1="."+q1,Q1=((H1=cx)&&(K1.__proto__=H1),((K1.prototype=Object.create(H1&&H1.prototype)).constructor=K1).prototype.destroy=function(){H1.prototype.destroy.call(this),Ye(this.element,"click",this._markerClickHandler),this.clear()},K1.prototype.add=function(t){if(!yt(t))return this._addOne(t);for(var e=0;e<t.length;e++)this._addOne(t[e])},K1.prototype.remove=function(t){t.destroy();t=(this.items||[]).indexOf(t);-1<t&&this.items.splice(t,1)},K1.prototype.clear=function(){for(var t=0;t<this.items.length;t++)this.items[t].destroy();this.items=[]},K1.prototype.update=function(t){var e=t.location();e&&(t.showAt(this.map.locationToView(e)),this.map.trigger("markerActivate",{marker:t,layer:this}))},K1.prototype._reset=function(){H1.prototype._reset.call(this);for(var t=this.items,e=0;e<t.length;e++)this.update(t[e])},K1.prototype.bind=function(t,e){t=t0.create(t,this.options);if(t.dataItem=e,!this.map.trigger("markerCreated",{marker:t,layer:this}))return this.add(t),t},K1.prototype._addOne=function(t){t=t0.create(t,this.options);return t.addTo(this),t},K1.prototype._readData=function(){return this.options.data||[]},K1.prototype._load=function(t){this._data=t,this.clear();for(var e=Ht(this.options.locationField),i=Ht(this.options.titleField),o=0;o<t.length;o++){var r=t[o];this.bind({location:e(r),title:i(r)},r)}},K1.prototype._markerClick=function(t){var e=t.currentTarget._kendoNode,e={layer:this,layerIndex:this._layerIndex(),marker:e,markerIndex:(this.items||[]).indexOf(e),originalEvent:t};this.map.trigger("markerClick",e)},K1.prototype._markerMouseEnter=function(t){t=this._createMarkerEventArgs(t);this.map.trigger("markerMouseEnter",t)},K1.prototype._markerMouseLeave=function(t){t=this._createMarkerEventArgs(t);this.map.trigger("markerMouseLeave",t)},K1.prototype._createMarkerEventArgs=function(t){var e=t.marker;return Y1({},{layer:this,layerIndex:this._layerIndex(),marker:e,markerIndex:(this.items||[]).indexOf(e)},t)},K1);function K1(t,e){H1.call(this,t,e),this._markerClickHandler=fb(this._markerClick,this),Xe(this.element,"click",Z1,this._markerClickHandler),this.items=[],this._load(this._readData())}function $1(t,e){N1.call(this),this._domain=t,this._range=e;t=Math.sqrt(t[1])-Math.sqrt(t[0]),e=e[1]-e[0];this._ratio=e/t}e(Q1,{zIndex:1e3,autoBind:!0,locationField:"location",titleField:"title",template:""});(J1=M.Class)&&(i0.__proto__=J1),((i0.prototype=Object.create(J1&&J1.prototype)).constructor=i0).prototype.destroy=function(){this.layer=null,this.unbindEvents(),this.hide()},i0.prototype.addTo=function(t){this.layer=t.markers||t,this.layer.items.push(this),this.layer.update(this)},i0.prototype.location=function(t){return t?(this.options.location=J_.create(t).toArray(),this.layer&&this.layer.update(this),this):J_.create(this.options.location)},i0.prototype.showAt=function(t){this.render(),this._anchor={left:Math.round(t.x),top:Math.round(t.y)},this.element.style.left=mb(this._anchor.left),this.element.style.top=mb(this._anchor.top)},i0.prototype.hide=function(){this.element&&(this.element.remove(),this.element=null)},i0.prototype.bindEvents=function(){this.element&&(this._mouseEnterHandler=fb(this._mouseEnter,this),Xe(this.element,W1,Z1,this._mouseEnterHandler),this._mouseLeaveHandler=fb(this._mouseLeave,this),Xe(this.element,X1,Z1,this._mouseLeaveHandler))},i0.prototype.unbindEvents=function(){this.element&&(Ye(this.element,W1,this._mouseEnterHandler),Ye(this.element,X1,this._mouseLeaveHandler))},i0.prototype.render=function(){var t,e,i,o,r;this.element||(t=this.options,e=this.layer,vt(i=document.createElement("span"),q1),this.options.template?(o=this._compileTemplate(this.options.template)(this.dataItem),o=Cb(o),i.appendChild(o)):t.svgIcon?we(i,{icon:t.svgIcon,iconClass:"k-icon-xxl",svgIcons:this.options.icons.svgIcons,type:"svg"}):(o={icon:"map-marker",iconClass:"k-icon-xxl",svgIcons:this.options.icons.svgIcons,type:this.options.icons.type},t.shape?"pinTarget"===t.shape?(o.icon="map-marker-target",we(i,o)):"pin"===t.shape?we(i,o):vt(i,"k-icon k-icon-xxl k-i-marker-"+vb(t.shape||"pin")):we(i,o)),t.title&&i.setAttribute("title",t.title),r=t.attributes||{},Object.keys(r).forEach(function(t){i.setAttribute(t,r[t])}),i._kendoNode=this,i.style.zIndex=t.zIndex,this.element=i,e&&e.element.appendChild(this.element),this.bindEvents())},i0.prototype._mouseEnter=function(t){t=this._createEventArgs(t);this.layer._markerMouseEnter(t),this.layer.map._tooltip.show({top:this._anchor.top-this.element.offsetHeight,left:this._anchor.left},this._tooltipContext())},i0.prototype._tooltipContext=function(){return{type:"marker",layerIndex:this.layer._layerIndex(),className:"k-map-marker-tooltip",dataItem:this.dataItem,title:this.options.title,location:this.location()}},i0.prototype._mouseLeave=function(t){t=this._createEventArgs(t);this.layer._markerMouseLeave(t)},i0.prototype._createEventArgs=function(t){return{marker:this,originalEvent:t}},i0.prototype._compileTemplate=function(t){return Vt.compile(t,{paramName:"dataItem",useWithBlock:!1})},i0.create=function(t,e){return t instanceof i0?t:new i0(O({},e,t))};var J1,t0=i0,e0=Object.assign;function i0(t){J1.call(this),this.options=t||{}}function o0(t){window.requestAnimationFrame(t)}(p0=M.Class)&&(C0.__proto__=p0),((C0.prototype=Object.create(p0&&p0.prototype)).constructor=C0).prototype.tick=function(){},C0.prototype.done=function(){},C0.prototype.onEnd=function(){},C0.prototype.onCancel=function(){},C0.prototype.start=function(){this.enabled()&&(this.done()?this.onEnd():(this._started=!0,o0(this._tickProxy)))},C0.prototype.enabled=function(){return!0},C0.prototype.cancel=function(){this._started=!1,this.onCancel()},C0.prototype._tick=function(){this._started&&(this.tick(),this.done()?(this._started=!1,this.onEnd()):o0(this._tickProxy))};var r0,n0,s0,a0,l0,h0,p0,fx=C0,c0=((h0=fx)&&(S0.__proto__=h0),((S0.prototype=Object.create(h0&&h0.prototype)).constructor=S0).prototype.done=function(){return this.timePassed()>=this.duration},S0.prototype.timePassed=function(){return Math.min(this.duration,Qe()-this.startDate)},S0.prototype.moveTo=function(t){var e=this,i=e.movable;e.initial=i[e.axis],e.delta=t.location-e.initial,e.duration="number"==typeof t.duration?t.duration:300,e.tick=e._easeProxy(t.ease),e.startDate=Qe(),e.start()},S0.prototype._easeProxy=function(t){var e=this;return function(){e.movable.moveAxis(e.axis,t(e.timePassed(),e.initial,e.delta,e.duration))}},S0.easeOutExpo=function(t,e,i,o){return t===o?e+i:i*(1-Math.pow(2,-10*t/o))+e},S0),u0=Object.assign,d0=Math.abs,f0="change",g0=((l0=fx)&&(A0.__proto__=l0),((A0.prototype=Object.create(l0&&l0.prototype)).constructor=A0).prototype.enabled=function(){return this.movable.scale<this.dimensions.minScale},A0.prototype.done=function(){return this.dimensions.minScale-this.movable.scale<.01},A0.prototype.tick=function(){var t=this.movable;t.scaleWith(1.1),this.dimensions.rescale(t.scale)},A0.prototype.onEnd=function(){var t=this.movable;t.scaleTo(this.dimensions.minScale),this.dimensions.rescale(t.scale)},A0),y0=((a0=fx)&&(k0.__proto__=a0),((k0.prototype=Object.create(a0&&a0.prototype)).constructor=k0).prototype.onCancel=function(){this.transition.cancel()},k0.prototype.freeze=function(t){this.cancel(),this._moveTo(t)},k0.prototype.onEnd=function(){this.paneAxis.outOfBounds()?this._snapBack():this._end()},k0.prototype.done=function(){return d0(this.velocity)<1},k0.prototype.start=function(t){var e=this;e.dimension.enabled&&(e.paneAxis.outOfBounds()?e.transition._started?(e.transition.cancel(),e.velocity=Math.min(t.touch[e.axis].velocity*e.velocityMultiplier,55),a0.prototype.start.call(this)):e._snapBack():(t=2===t.touch.id?0:t.touch[e.axis].velocity,e.velocity=Math.max(Math.min(t*e.velocityMultiplier,55),-55),e.tapCapture.captureNext(),a0.prototype.start.call(this)))},k0.prototype.tick=function(){var t=this,e=t.dimension,i=t.paneAxis.outOfBounds()?.5:t.friction,i=t.velocity*=i,i=t.movable[t.axis]+i;!t.elastic&&e.outOfBounds(i)&&(i=Math.max(Math.min(i,e.max),e.min),t.velocity=0),t.movable.moveAxis(t.axis,i)},k0.prototype._end=function(){this.tapCapture.cancelCapture(),this.end()},k0.prototype._snapBack=function(){var t=this.dimension,t=this.movable[this.axis]>t.max?t.max:t.min;this._moveTo(t)},k0.prototype._moveTo=function(t){this.transition.moveTo({location:t,duration:500,ease:c0.easeOutExpo})},k0),v0=((s0=fx)&&(w0.__proto__=s0),((w0.prototype=Object.create(s0&&s0.prototype)).constructor=w0).prototype.tick=function(){this._updateCoordinates(),this.moveTo(this.origin)},w0.prototype.done=function(){return d0(this.offset.y)<5&&d0(this.offset.x)<5},w0.prototype.onEnd=function(){this.moveTo(this.destination),this.callback&&this.callback.call()},w0.prototype.setCoordinates=function(t,e){this.offset={},this.origin=t,this.destination=e},w0.prototype.setCallback=function(t){t&&Pt(t)&&(this.callback=t)},w0.prototype._updateCoordinates=function(){this.offset={x:(this.destination.x-this.origin.x)/4,y:(this.destination.y-this.origin.y)/4},this.origin={y:this.origin.y+this.offset.y,x:this.origin.x+this.offset.x}},w0),m0=((n0=M.Class)&&(b0.__proto__=n0),((b0.prototype=Object.create(n0&&n0.prototype)).constructor=b0).prototype.refresh=function(){var t=this.axis,e=this.dimension,i=e.size,o=this.scrollMovable,e=i/e.total,o=Math.round(-o[t]*e),r=Math.round(i*e);this.element.style.display=1<=e?"none":"",i<o+r?r=i-o:o<0&&(r+=o,o=0),this.elementSize!==r&&(this.element.style[this.size]=r+"px",this.elementSize=r),this.movable.moveAxis(t,o)},b0.prototype.show=function(){this.element.style.opacity=.7,this.element.style.visibility="visible"},b0.prototype.hide=function(){this.alwaysVisible||(this.element.style.opacity=0)},b0),x0=((r0=ii)&&(_0.__proto__=r0),((_0.prototype=Object.create(r0&&r0.prototype)).constructor=_0).prototype._initOptions=function(t){this.options=O({},this.options,t)},_0.prototype._wheelScroll=function(t){var e,i;t.ctrlKey||(this._wheel||(this._wheel=!0,this._wheelY=0,this.userEvents.press(0,this._wheelY)),clearTimeout(this._wheelTimeout),this._wheelTimeout=setTimeout(this._wheelEnd,50),i=t.wheelDeltaY,t.wheelDelta?void 0!==i&&!i||(e=t.wheelDelta):t.detail&&t.axis===t.VERTICAL_AXIS&&(e=10*-t.detail),e&&(this._wheelY+=e,this.userEvents.move(0,this._wheelY)),t.preventDefault())},_0.prototype.makeVirtual=function(){this.dimensions.y.makeVirtual()},_0.prototype.virtualSize=function(t,e){this.dimensions.y.virtualSize(t,e)},_0.prototype.height=function(){return this.dimensions.y.size},_0.prototype.scrollHeight=function(){return this.scrollElement.scrollHeight},_0.prototype.scrollWidth=function(){return this.scrollElement.scrollWidth},_0.prototype._resize=function(){this._native||this.contentResized()},_0.prototype.setOptions=function(t){this._initOptions(t),t.pullToRefresh&&this._initPullToRefresh()},_0.prototype.reset=function(){this._native?this.scrollElement.scrollTop(0):(this.movable.moveTo({x:0,y:0}),this._scale(1))},_0.prototype.contentResized=function(){this.dimensions.refresh(),this.pane.x.outOfBounds()&&this.movable.moveAxis("x",this.dimensions.x.min),this.pane.y.outOfBounds()&&this.movable.moveAxis("y",this.dimensions.y.min)},_0.prototype.zoomOut=function(){var t=this.dimensions;t.refresh(),this._scale(t.fitScale),this.movable.moveTo(t.centerCoordinates())},_0.prototype.enable=function(){this.enabled=!0},_0.prototype.disable=function(){this.enabled=!1},_0.prototype.scrollTo=function(t,e){this._native?(this.scrollElement.scrollLeft(d0(t)),this.scrollElement.scrollTop(d0(e))):(this.dimensions.refresh(),this.movable.moveTo({x:t,y:e}))},_0.prototype.animatedScrollTo=function(t,e,i){var o;this._native?this.scrollTo(t,e):(o={x:this.movable.x,y:this.movable.y},this.animatedScroller.setCoordinates(o,{x:t,y:e}),this.animatedScroller.setCallback(i),this.animatedScroller.start())},_0.prototype.pullHandled=function(){},_0.prototype.destroy=function(){Ye(this.element,"wheel",this._wheelScrollHandler),this.userEvents&&this.userEvents.destroy()},_0.prototype._scale=function(t){this.dimensions.rescale(t),this.movable.scaleTo(t)},_0.prototype._initPullToRefresh=function(){},_0.prototype._dragEnd=function(){},_0.prototype._paneChange=function(){},_0.prototype._initAxis=function(t){var e=this,i=e.movable,o=e.dimensions[t],r=e.tapCapture,n=e.pane[t],s=new m0({axis:t,movable:i,dimension:o,container:e.element,alwaysVisible:e.options.visibleScrollHints});o.bind(f0,function(){s.refresh()}),n.bind(f0,function(){s.show()}),e[t+"inertia"]=new y0({axis:t,paneAxis:n,movable:i,tapCapture:r,userEvents:e.userEvents,dimension:o,elastic:e.options.elastic,friction:e.options.friction||.96,velocityMultiplier:e.options.velocityMultiplier||10,end:function(){s.hide(),e.trigger("scrollEnd",{axis:t,scrollTop:e.scrollTop,scrollLeft:e.scrollLeft})}})},_0);function _0(t,e){r0.call(this);var r=this;this.element=t,this._initOptions(e);navigator.userAgent;e=(e=qe().mobileOS).ios||e.android,r._native=r.options.useNative&&e,e=Cb('<div class="km-scroll-header"/>');if(r._native)vt(t,"km-native-scroller"),yb(e,t),u0(r,{scrollElement:t,fixedContainer:t.children[0]});else{t.style.overflow="hidden",vt(t,"km-scroll-wrapper");var i=t,o=Cb('<div class="km-scroll-container"/>');for(i.appendChild(o);i.firstChild!==o;)o.appendChild(i.firstChild);yb(e,t);var e=t.children[1],n=new w1(t),s=new P1(e),a=new A1({element:e,container:t,forcedEnabled:r.options.zoom}),l=this.options.avoidScrolling,h=new Ii(t,{touchAction:"none",allowSelection:!0,preventDragEvent:!0,captureUpIfMoved:!0,multiTouch:r.options.zoom,supportDoubleTap:r.options.supportDoubleTap,start:function(t){a.refresh();var e=d0(t.x.velocity),i=d0(t.y.velocity),o=i<=2*e,e=e<=2*i;!r.fixedContainer.contains(t.event.target)&&!l(t)&&r.enabled&&(a.x.enabled&&o||a.y.enabled&&e)?h.capture():h.cancel()}}),p=new C1({movable:s,dimensions:a,userEvents:h,elastic:r.options.elastic}),c=new g0({movable:s,dimensions:a,userEvents:h,tapCapture:n}),u=new v0({moveTo:function(t){r.scrollTo(t.x,t.y)}});s.bind(f0,function(){r.scrollTop=-s.y,r.scrollLeft=-s.x,r.trigger("scroll",{scrollTop:r.scrollTop,scrollLeft:r.scrollLeft})}),r.options.mousewheelScrolling&&(this._wheelScrollHandler=this._wheelScroll.bind(this),Xe(t,"wheel",this._wheelScrollHandler)),u0(r,{movable:s,dimensions:a,zoomSnapBack:c,animatedScroller:u,userEvents:h,pane:p,tapCapture:n,pulled:!1,enabled:!0,scrollElement:e,scrollTop:0,scrollLeft:0,fixedContainer:t.children[0]}),r._initAxis("x"),r._initAxis("y"),r._wheelEnd=function(){r._wheel=!1,r.userEvents.end(0,r._wheelY)},a.refresh(),r.options.pullToRefresh&&r._initPullToRefresh()}}function b0(t){n0.call(this);var e="x"===t.axis,i=Cb('<div class="km-touch-scrollbar km-'+(e?"horizontal":"vertical")+'-scrollbar" />');u0(this,t,{element:i,elementSize:0,movable:new P1(i),scrollMovable:t.movable,alwaysVisible:t.alwaysVisible,size:e?"width":"height"}),this.scrollMovable.bind(f0,this.refresh.bind(this)),this.container.appendChild(i),t.alwaysVisible&&this.show()}function w0(t){s0.call(this,t),u0(this,t,{origin:{},destination:{},offset:{}})}function k0(t){a0.call(this);var e=this;u0(e,t,{transition:new c0({axis:t.axis,movable:t.movable,onEnd:function(){e._end()}})}),e.tapCapture.bind("press",function(){e.cancel()}),e.userEvents.bind("end",fb(e.start,e)),e.userEvents.bind("gestureend",fb(e.start,e)),e.userEvents.bind("tap",fb(e.onEnd,e))}function A0(t){l0.call(this,t);u0(this,t),this.userEvents.bind("gestureend",this.start.bind(this)),this.tapCapture.bind("press",this.cancel.bind(this))}function S0(t){h0.call(this),e0(this,t)}function C0(){p0.call(this);this._tickProxy=fb(this._tick,this),this._started=!1}e(x0,{name:"Scroller",zoom:!1,pullOffset:140,visibleScrollHints:!1,elastic:!0,useNative:!1,mousewheelScrolling:!0,avoidScrolling:function(){return!1},pullToRefresh:!1,messages:{pullTemplate:"Pull to refresh",releaseTemplate:"Release to refresh",refreshTemplate:"Refreshing"}}),xb(x0,["pull","scroll","resize"]);function P0(t,e){this.sender=(e=void 0===e?{}:e).sender||t,this.widget=t,this.rtl=Boolean(e.rtl)}P0.prototype.notify=function(t,e){this.widget&&this.widget.trigger(t,e)};let T0=P0;var M0,O0=Math,L0=O0.min,I0=O0.pow,B0=M.geometry.Point,E0="marker",R0="location",V0={bubble:yx,shape:Ja,tile:lx},i=(V0[E0]=Q1,(M0=ii)&&(B.__proto__=M0),((B.prototype=Object.create(M0&&M0.prototype)).constructor=B).prototype.destroy=function(){this.scroller.destroy(),this._tooltip&&this._tooltip.destroy(),this.navigator&&this.navigator.destroy(),this.attribution&&this.attribution.destroy(),this.zoomControl&&this.zoomControl.destroy(),yt(this.markers)?this.markers.forEach(function(t){t.destroy()}):this.markers.destroy();for(var t=0;t<this.layers.length;t++)this.layers[t].destroy();Ye(this.element,"wheel",this._mousewheelHandler),M0.prototype.destroy.call(this)},B.prototype._init=function(t,e,i,o){void 0===e&&(e={}),void 0===i&&(i={}),void 0===o&&(o={}),this.support=qe(),this.context=o,this.initObserver(o),this.initServices(o),this._notifyObserver("init"),this._initOptions(e),this._setEvents(e),this.crs=new Sb,this._initElement(t),this._viewOrigin=this._getOrigin(),this._tooltip=this._createTooltip(),this._initScroller(),this._initMarkers(),this._initControls(),this._initLayers(),this._reset();var r=(0,M.throttle)(this._mousewheel.bind(this),50);this._mousewheelHandler=function(t){t.preventDefault(),r(t)},Xe(this.element,"wheel",this._mousewheelHandler)},B.prototype._initOptions=function(t){this.options=O({},this.options,t)},B.prototype._initElement=function(t){vt(this.element=t,"k-map"),t.style.position="relative",t.setAttribute("data-role","map"),gb(t);t=Cb("<div />");this.element.appendChild(t)},B.prototype.initServices=function(t){void 0===t&&(t={}),this.widgetService=new T0(this,t)},B.prototype.initObserver=function(t){void 0===t&&(t={}),this.observers=[],this.addObserver(t.observer)},B.prototype.addObserver=function(t){t&&this.observers.push(t)},B.prototype.removeObserver=function(t){t=this.observers.indexOf(t);0<=t&&this.observers.splice(t,1)},B.prototype.requiresHandlers=function(t){for(var e=this.observers,i=0;i<e.length;i++)if(e[i].requiresHandlers(t))return!0},B.prototype.trigger=function(t,e){for(var i=((e=void 0===e?{}:e).sender=this).observers,o=!1,r=0;r<i.length;r++)i[r].trigger(t,e)&&(o=!0);return o||M0.prototype.trigger.call(this,t,e),o},B.prototype._notifyObserver=function(t,e){for(var i=((e=void 0===e?{}:e).sender=this).observers,o=!1,r=0;r<i.length;r++)i[r].trigger(t,e)&&(o=!0);return o},B.prototype.zoom=function(t){var e=this.options,t=k(t)?(t=O0.round(x(t,e.minZoom,e.maxZoom)),e.zoom!==t&&(e.zoom=t,this.widgetService.notify("zoomChange",{zoom:e.zoom}),this._reset()),this):e.zoom;return t},B.prototype.center=function(t){var e=t?(t=J_.create(t),e=J_.create(this.options.center),t.equals(e)||(this.options.center=t.toArray(),this.widgetService.notify(Wb,{center:this.options.center}),this._reset()),this):J_.create(this.options.center);return e},B.prototype.extent=function(t){t=t?(this._setExtent(t),this):this._getExtent();return t},B.prototype.setOptions=function(t){void 0===t&&(t={});var e=this.element;this.destroy(),gb(e),this._init(e,t,{},this.context),this._reset()},B.prototype.locationToLayer=function(t,e){var i=!this.options.wraparound,t=J_.create(t);return this.crs.toPoint(t,this._layerSize(e),i)},B.prototype.layerToLocation=function(t,e){var i=!this.options.wraparound,t=B0.create(t);return this.crs.toLocation(t,this._layerSize(e),i)},B.prototype.locationToView=function(t){var t=J_.create(t),e=this.locationToLayer(this._viewOrigin);return this.locationToLayer(t).translateWith(e.scale(-1))},B.prototype.viewToLocation=function(t,e){var i=this.locationToLayer(this._getOrigin(),e),t=B0.create(t).clone().translateWith(i);return this.layerToLocation(t,e)},B.prototype.eventOffset=function(t){var e,i=re(this.element);return t=t.x&&t.x[R0]||t.y&&t.y[R0]?(e=t.x[R0]-i.left,t.y[R0]-i.top):(t=t.originalEvent||t,e=_(t.pageX,t.clientX)-i.left,_(t.pageY,t.clientY)-i.top),new M.geometry.Point(e,t)},B.prototype.eventToView=function(t){t=this.eventOffset(t);return this.locationToView(this.viewToLocation(t))},B.prototype.eventToLayer=function(t){return this.locationToLayer(this.eventToLocation(t))},B.prototype.eventToLocation=function(t){t=this.eventOffset(t);return this.viewToLocation(t)},B.prototype.viewSize=function(){var t=this.element,e=this._layerSize(),i=t.clientWidth;return{width:i=this.options.wraparound?i:L0(e,i),height:L0(e,t.clientHeight)}},B.prototype.exportVisual=function(){return this._reset(),!1},B.prototype.hideTooltip=function(){this._tooltip&&this._tooltip.hide()},B.prototype._setOrigin=function(t,e){var i=this.viewSize(),t=this._origin=J_.create(t);return(t=this.locationToLayer(t,e)).x+=i.width/2,t.y+=i.height/2,this.options.center=this.layerToLocation(t,e).toArray(),this.widgetService.notify(Wb,{center:this.options.center}),this},B.prototype._getOrigin=function(t){var e=this.viewSize();return!t&&this._origin||((t=this.locationToLayer(this.center())).x-=e.width/2,t.y-=e.height/2,this._origin=this.layerToLocation(t)),this._origin},B.prototype._setExtent=function(t){var e=Gb.create(t),i=e.se.clone(),o=(this.options.wraparound&&i.lng<0&&0<t.nw.lng&&(i.lng=180+(180+i.lng)),new Gb(e.nw,i));this.center(o.center());for(var r=this.element.clientWidth,n=this.element.clientHeight,s=this.options.maxZoom;s>=this.options.minZoom;s--){var a=this.locationToLayer(o.nw,s),l=this.locationToLayer(o.se,s),h=O0.abs(l.x-a.x),l=O0.abs(l.y-a.y);if(h<=r&&l<=n)break}this.zoom(s)},B.prototype._getExtent=function(){var t=this._getOrigin(),e=this.locationToLayer(t),i=this.viewSize(),i=(e.x+=i.width,e.y+=i.height,this.layerToLocation(e));return new Gb(t,i)},B.prototype._zoomAround=function(t,e){this._setOrigin(this.layerToLocation(t,e),e),this.zoom(e)},B.prototype._initControls=function(){var t=this.options.controls;t.attribution&&this._createAttribution(t.attribution),this.support.mobileOS||(t.navigator&&this._createNavigator(t.navigator),t.zoom&&this._createZoomControl(t.zoom))},B.prototype._createControlElement=function(t,e){var i,t=t.position||e,e="."+_b(t).replace(" ","."),e=this.element.querySelector(".k-map-controls"+e)||[],t=(0===e.length&&(vt(i=document.createElement("div"),"k-map-controls "+_b(t)),this.element.appendChild(e=i)),document.createElement("div"));return e.appendChild(t),t},B.prototype._createAttribution=function(t){var e=this._createControlElement(t,"bottomRight");this.attribution=new Pb(e,t)},B.prototype._createNavigator=function(t){var e=this._createControlElement(t,"topLeft"),e=this.navigator=new Eb(e,O({},t,{icons:this.options.icons}));this._navigatorPan=this._navigatorPan.bind(this),e.bind("pan",this._navigatorPan),this._navigatorCenter=this._navigatorCenter.bind(this),e.bind("center",this._navigatorCenter)},B.prototype._navigatorPan=function(t){var e=this.scroller,i=e.scrollLeft+t.x,e=e.scrollTop-t.y,t=this._virtualSize,o=this.element.clientWidth,r=this.element.clientHeight,i=x(i,t.x.min,t.x.max-o),e=x(e,t.y.min,t.y.max-r);this.scroller.one("scroll",fb(this._scrollEnd,this)),this.scroller.scrollTo(-i,-e)},B.prototype._navigatorCenter=function(){this.center(this.options.center)},B.prototype._createZoomControl=function(t){var e=this._createControlElement(t,"topLeft"),e=this.zoomControl=new zb(e,t,this.options.icons);this._zoomControlChange=this._zoomControlChange.bind(this),e.bind("change",this._zoomControlChange)},B.prototype._zoomControlChange=function(t){this.trigger("zoomStart",{originalEvent:t})||(this.zoom(this.zoom()+t.delta),this.trigger("zoomEnd",{originalEvent:t}))},B.prototype._initScroller=function(){var t=this.support.mobileOS?.93:.9,e=!1!==this.options.zoomable,t=this.scroller=new x0(this.element.children[0],{friction:t,velocityMultiplier:5,zoom:e,mousewheelScrolling:!1,supportDoubleTap:!0});t.bind("scroll",fb(this._scroll,this)),t.bind("scrollEnd",fb(this._scrollEnd,this)),t.userEvents.bind("gesturestart",fb(this._scaleStart,this)),t.userEvents.bind("gestureend",fb(this._scale,this)),t.userEvents.bind("doubleTap",fb(this._doubleTap,this)),t.userEvents.bind("tap",fb(this._tap,this)),this.scrollElement=t.scrollElement},B.prototype._initLayers=function(){for(var t=this.options.layers,e=this.layers=[],i=0;i<t.length;i++){var o=t[i],o=this._createLayer(o);e.push(o)}},B.prototype._createLayer=function(t){var e=t.type||"shape",i=this.options.layerDefaults[e],i=e===E0?O({},this.options.markerDefaults,t,{icons:this.options.icons}):O({},i,t),t=new V0[e](this,i);return e===E0&&(this.markers=t),t},B.prototype._createTooltip=function(){return new Xb(this.widgetService,this.options.tooltip)},B.prototype._initMarkers=function(){0<(this.options.layers||[]).filter(function(t){return t&&t.type===E0}).length||(this.markers=new Q1(this,O({},this.options.markerDefaults,{icons:this.options.icons})),this.markers.add(this.options.markers))},B.prototype._scroll=function(t){var e=this.locationToLayer(this._viewOrigin).round(),i=t.sender.movable,i=new M.geometry.Point(i.x,i.y).scale(-1).scale(1/i.scale);e.x+=i.x,e.y+=i.y,this._scrollOffset=i,this._tooltip.offset=i,this.hideTooltip(),this._setOrigin(this.layerToLocation(e)),this.trigger("pan",{originalEvent:t,origin:this._getOrigin(),center:this.center()})},B.prototype._scrollEnd=function(t){this._scrollOffset&&this._panComplete()&&(this._scrollOffset=null,this._panEndTimestamp=Qe(),this.trigger("panEnd",{originalEvent:t,origin:this._getOrigin(),center:this.center()}))},B.prototype._panComplete=function(){return 50<Qe()-(this._panEndTimestamp||0)},B.prototype._scaleStart=function(t){this.trigger("zoomStart",{originalEvent:t})&&(t=t.touches[1])&&t.cancel()},B.prototype._scale=function(t){var e=this.scroller.movable.scale,e=this._scaleToZoom(e),i=new M.geometry.Point(t.center.x,t.center.y),o=this.viewToLocation(i,e),o=this.locationToLayer(o,e).translate(-i.x,-i.y);this._zoomAround(o,e),this.trigger("zoomEnd",{originalEvent:t})},B.prototype._scaleToZoom=function(t){t=this._layerSize()*t/this.options.minSize,t=O0.log(t)/O0.log(2);return O0.round(t)},B.prototype._reset=function(){this.attribution&&this.attribution.filter(this.center(),this.zoom()),this._viewOrigin=this._getOrigin(!0),this._resetScroller(),this.hideTooltip(),this.trigger("beforeReset"),this.trigger("reset")},B.prototype._resetScroller=function(){var t=this.scroller,e=t.dimensions.x,i=t.dimensions.y,o=this._layerSize(),r=this.extent().nw,r=this.locationToLayer(r).round(),n=(t.movable.round=!0,t.reset(),t.userEvents.cancel(),this.zoom()),t=(t.dimensions.forcedMinScale=I0(2,this.options.minZoom-n),t.dimensions.maxScale=I0(2,this.options.maxZoom-n),{min:-r.x,max:o-r.x}),n={min:-r.y,max:o-r.y};this.options.wraparound&&(t.max=20*o,t.min=-t.max),!1===this.options.pannable&&(r=this.viewSize(),t.min=n.min=0,t.max=r.width,n.max=r.height),e.makeVirtual(),i.makeVirtual(),e.virtualSize(t.min,t.max),i.virtualSize(n.min,n.max),this._virtualSize={x:t,y:n}},B.prototype._renderLayers=function(){},B.prototype._layerSize=function(t){t=_(t,this.options.zoom);return this.options.minSize*I0(2,t)},B.prototype._tap=function(t){var e;this._panComplete()&&(e=this.eventOffset(t),this.hideTooltip(),this.trigger("click",{originalEvent:t,location:this.viewToLocation(e)}))},B.prototype._doubleTap=function(t){var e,i,o;!1===this.options.zoomable||this.trigger("zoomStart",{originalEvent:t})||(e=this.zoom()+1,i=this.eventOffset(t),o=this.viewToLocation(i),o=this.locationToLayer(o,e).translate(-i.x,-i.y),this._zoomAround(o,e),this.trigger("zoomEnd",{originalEvent:t}))},B.prototype._mousewheel=function(t){var e=0<Jt(t)?-1:1,i=this.options,o=this.zoom(),e=x(o+e,i.minZoom,i.maxZoom);!1===i.zoomable||e===o||this.trigger("zoomStart",{originalEvent:t})||(i=this.eventOffset(t),o=this.viewToLocation(i),o=this.locationToLayer(o,e).translate(-i.x,-i.y),this._zoomAround(o,e),this.trigger("zoomEnd",{originalEvent:t}))},B.prototype._toDocumentCoordinates=function(t){var e=re(this.element);return{left:L(t.x+e.left),top:L(t.y+e.top)}},B);function B(t,e,i,o){void 0===e&&(e={}),void 0===i&&(i={}),void 0===o&&(o={}),M0.call(this),this._init(t,e,i,o)}e(i,{name:"Map",controls:{attribution:!0,navigator:{panStep:100},zoom:!0},layers:[],layerDefaults:{shape:{style:{fill:{color:"#fff"},stroke:{color:"#aaa",width:.5}}},bubble:{style:{fill:{color:"#fff",opacity:.5},stroke:{color:"#aaa",width:.5}}},marker:{shape:"pinTarget",tooltip:{position:"top"}}},center:[0,0],icons:{type:"font",svgIcons:{}},zoom:3,minSize:256,minZoom:1,maxZoom:19,markers:[],markerDefaults:{shape:"pinTarget",tooltip:{position:"top"}},wraparound:!0,renderPointsAsMarkers:!1}),xb(i,["beforeReset","click","markerActivate","markerClick","markerCreated","markerMouseEnter","markerMouseLeave","pan","panEnd","reset","shapeClick","shapeCreated","shapeFeatureCreated","shapeMouseEnter","shapeMouseLeave","zoomEnd","zoomStart"]);let j0=i;function z0(t,e){return t.map(e).reduce(function(t,e){return t+e},0)}function D0(t,e){return N0(t.source,e.source)}function F0(t,e){return N0(t.target,e.target)}function H0(t){return t.value}var N0=function(t,e){return t.y0===e.y0?t.index-e.index:t.y0+t.y1-e.y0-e.y1};function U0(t){t.forEach(function(t){t.targetLinks.forEach(function(t){t.source.sourceLinks.sort(F0)}),t.sourceLinks.forEach(function(t){t.target.targetLinks.sort(D0)})})}function G0(t){var e=t.nodesOptions,i=e.offset,o=(void 0===i&&(i={}),e.align);this.data={nodes:t.nodes.map(function(t){return O({},{offset:i,align:o},t)}),links:t.links.map(function(t){return O({},t)})},this.width=t.width,this.height=t.height,this.offsetX=t.offsetX||0,this.offsetY=t.offsetY||0,this.nodeWidth=t.nodesOptions.width,this.nodePadding=t.nodesOptions.padding,this.reverse=t.reverse,this.targetColumnIndex=t.targetColumnIndex,this.loops=t.loops,this.autoLayout=t.autoLayout}function W0(t){return new G0(t).calculate()}G0.prototype.calculate=function(){var t=this.data,e=t.nodes,t=(this.connectLinksToNodes(e,t.links),this.calculateNodeValues(e),this.calculateNodeHeights(e));if(t)return{nodes:[],links:[],columns:[],circularLinks:t};this.calculateNodeDepths(e);t=this.calculateNodeColumns(e);return this.calculateNodeBreadths(t),this.applyNodesOffset(e),this.calculateLinkBreadths(e),Object.assign({},this.data,{columns:t})},G0.prototype.connectLinksToNodes=function(t,e){var i=new Map;t.forEach(function(t,e){t.index=e,t.sourceLinks=[],t.targetLinks=[],t.id=void 0!==t.id?t.id:t.label.text,i.set(t.id,t)}),e.forEach(function(t){t.source=i.get(t.sourceId),t.target=i.get(t.targetId),t.source.sourceLinks.push(t),t.target.targetLinks.push(t)})},G0.prototype.calculateNodeValues=function(t){t.forEach(function(t){t.value=Math.max(z0(t.sourceLinks,H0),z0(t.targetLinks,H0))})},G0.prototype.calculateNodeDepths=function(t){for(var e=new Set(t),i=new Set,o=0;e.size;){for(var r=Array.from(e),n=0;n<r.length;n++){var s=r[n];s.depth=o;for(var a=0;a<s.sourceLinks.length;a++){var l=s.sourceLinks[a];i.add(l.target)}}o++,e=i,i=new Set}},G0.prototype.calculateNodeHeights=function(t){for(var e=t.length,i=new Set(t),o=new Set,r=0,n=function(t){t.height=r,t.targetLinks.forEach(function(t){o.add(t.source)})};i.size;){if(i.forEach(n),++r>e)return!0;i=o,o=new Set}return!1},G0.prototype.calculateNodeColumns=function(t){for(var e,i=Math.max.apply(null,t.map(function(t){return t.depth})),o=(this.width-this.offsetX-this.nodeWidth)/i,r=new Array(i+1),n=0;n<t.length;n++){var s=t[n],a=Math.max(0,Math.min(i,(e=i,"left"===(a=s).align?a.depth:"right"===a.align?e-a.height:a.sourceLinks.length?a.depth:e)));s.x0=this.offsetX+a*o,s.x1=s.x0+this.nodeWidth,r[s.layer=a]=r[a]||[],r[a].push(s)}return r},G0.prototype.calculateNodeBreadths=function(t){var e=this,o=Math.min.apply(null,t.map(function(t){return(e.height-e.offsetY-(t.length-1)*e.nodePadding)/z0(t,H0)}));if(t.forEach(function(t){var i=e.offsetY;t.forEach(function(t){t.y0=i,t.y1=i+t.value*o,i=t.y1+e.nodePadding,t.sourceLinks.forEach(function(t){t.width=t.value*o})}),i=(e.height-i+e.nodePadding)/(t.length+1),t.forEach(function(t,e){t.y0+=i*(e+1),t.y1+=i*(e+1)})}),!1!==this.autoLayout)for(var i=void 0!==this.loops?this.loops:t.length-1,r=this.targetColumnIndex||1,n=0;n<i;n++)this.reverse?(this.uncurlLinksToRight(t,r),this.uncurlLinksToLeft(t,r)):(this.uncurlLinksToLeft(t,r),this.uncurlLinksToRight(t,r));t.forEach(U0)},G0.prototype.applyNodesOffset=function(t){t.forEach(function(t){var e=(t.offset?t.offset.left:0)||0,i=(t.offset?t.offset.top:0)||0;t.x0+=e,t.x1+=e,t.y0+=i,t.y1+=i})},G0.prototype.calculateLinkBreadths=function(t){t.forEach(function(t){var e=t.sourceLinks,i=t.targetLinks,o=t.y0,r=o;e.forEach(function(t){t.x0=t.source.x1,t.y0=o+t.width/2,o+=t.width}),i.forEach(function(t){t.x1=t.target.x0,t.y1=r+t.width/2,r+=t.width})})},G0.prototype.uncurlLinksToRight=function(t,e){for(var n=this,i=t.length,o=e;o<i;o++){var r=t[o];r.forEach(function(i){var o=0,r=0,t=(i.targetLinks.forEach(function(t){var e=t.value*(i.layer-t.source.layer);o+=n.targetTopPos(t.source,i)*e,r+=e}),0===o?0:o/r-i.y0);i.y0+=t,i.y1+=t,U0([i])}),r.sort(N0),this.arrangeNodesVertically(r)}},G0.prototype.uncurlLinksToLeft=function(t,e){for(var n=this,i=t.length-1-e;0<=i;i--){for(var s=t[i],o=0;o<s.length;o++)(t=>{var i=s[t],o=0,r=0,t=(i.sourceLinks.forEach(function(t){var e=t.value*(t.target.layer-i.layer);o+=n.sourceTopPos(i,t.target)*e,r+=e}),0===o?0:o/r-i.y0);i.y0+=t,i.y1+=t,U0([i])})(o);s.sort(N0),this.arrangeNodesVertically(s)}},G0.prototype.arrangeNodesVertically=function(t){var e=t.length-1;this.arrangeUp(t,this.height,e),this.arrangeDown(t,this.offsetY,0)},G0.prototype.arrangeDown=function(t,e,i){for(var o=e,r=i;r<t.length;r++){var n=t[r],s=Math.max(0,o-n.y0);n.y0+=s,n.y1+=s,o=n.y1+this.nodePadding}},G0.prototype.arrangeUp=function(t,e,i){for(var o=e,r=i;0<=r;--r){var n=t[r],s=Math.max(0,n.y1-o);n.y0-=s,n.y1-=s,o=n.y0-this.nodePadding}},G0.prototype.sourceTopPos=function(t,e){for(var i=e.y0-(e.targetLinks.length-1)*this.nodePadding/2,o=0;o<e.targetLinks.length;o++){var r=e.targetLinks[o];if(r.source===t)break;i+=r.width+this.nodePadding}for(var n=0;n<t.sourceLinks.length;n++){var s=t.sourceLinks[n];if(s.target===e)break;i-=s.width}return i},G0.prototype.targetTopPos=function(t,e){for(var i=t.y0-(t.sourceLinks.length-1)*this.nodePadding/2,o=0;o<t.sourceLinks.length;o++){var r=t.sourceLinks[o];if(r.target===e)break;i+=r.width+this.nodePadding}for(var n=0;n<e.targetLinks.length;n++){var s=e.targetLinks[n];if(s.source===t)break;i-=s.width}return i};function X0(t,e,i,o,r,n){n=(n-e)*(i-t),i=(o-e)*(r-t);return i<n?1:n==i?0:-1}function Y0(t,e,i,o){return e=O({},e,e.node),O({},{color:(i=i,o=o,t.color||i[o%i.length])},e,{node:t},{visual:t.visual,opacity:t.opacity,offset:t.offset,color:t.color})}function q0(t,e,i,o,r){var n=1-r,s=n*n,a=r*r;return t*s*n+3*e*r*s+3*i*a*n+o*a*r}($0=M.Class)&&(lw.__proto__=$0),((lw.prototype=Object.create($0&&$0.prototype)).constructor=lw).prototype.createVisual=function(){this.visual=this.createElement()},lw.prototype.exportVisual=function(){return this.visual},lw.prototype.createElement=function(){var t=this,e=this.options.visual;return e?e({sender:this.getSender(),options:this.visualOptions(),createVisual:function(){return t.getElement()}}):this.getElement()},lw.prototype.getSender=function(){return this};var Z0,Q0,K0,$0,Fs=lw,J0=((K0=Fs)&&(aw.__proto__=K0),((aw.prototype=Object.create(K0&&K0.prototype)).constructor=aw).prototype.getElement=function(){return M.drawing.Path.fromRect(this.getRect(),this.visualOptions())},aw.prototype.getRect=function(){var t=this.options.node;return new M.geometry.Rect([t.x0,t.y0],[t.x1-t.x0,t.y1-t.y0])},aw.prototype.getLabelText=function(t){var e=t.labels.ariaTemplate;if(e)return e({node:t.node})},aw.prototype.visualOptions=function(){var t=O({},this.options,this.options.node),e=this.getLabelText(t);return{fill:{color:t.color,opacity:t.opacity},stroke:{width:0},className:"k-sankey-node",role:"graphics-symbol",ariaRoleDescription:"Node",ariaLabel:e}},aw.prototype.createFocusHighlight=function(){if(this.options.navigatable)return this._highlight=M.drawing.Path.fromRect(this.getRect(),{stroke:this.options.focusHighlight.border,visible:!1}),this._highlight},aw.prototype.focus=function(t){this._highlight&&((t=void 0===(t=(t||{}).highlight)?!0:t)&&this._highlight.options.set("visible",!0),t=this.options.node.id,this.visual.options.set("id",t),this.options.root())&&this.options.root().setAttribute(X,t)},aw.prototype.blur=function(){this._highlight&&(this._highlight.options.set("visible",!1),this.visual.options.set("id",""),this.options.root())&&this.options.root().removeAttribute(X)},aw),tw=((Q0=Fs)&&(sw.__proto__=Q0),((sw.prototype=Object.create(Q0&&Q0.prototype)).constructor=sw).prototype.getElement=function(){var t=this.options.link,e=t.x0,i=t.x1,o=t.y0,t=t.y1,r=(e+i)/2;return new M.drawing.Path(this.visualOptions()).moveTo(e,o).curveTo([r,o],[r,t],[i,t])},sw.prototype.getLabelText=function(t){var e=t.labels.ariaTemplate;if(e)return e({link:t.link})},sw.prototype.visualOptions=function(){var t=this.options,e=this.options.link,i=this.getLabelText(t);return{stroke:{width:t.link.width,color:e.color||t.color,opacity:(k(e.opacity)?e:t).opacity},role:"graphics-symbol",ariaRoleDescription:"Link",ariaLabel:i}},sw.prototype.createFocusHighlight=function(){var t,e,i,o,r,n,s,a,l,h,p,c,u,d,f,g,y,v,m,x;this.options.navigatable&&(t=(m=this.options.link).x0,i=m.y0,o=m.y1,r=(t+(e=m.x1))/2,s=this.options.rtl,h=n=m.width/2,p=s?m.x1:m.x0,c=s?m.x0:m.x1,u=s?m.y1:m.y0,s=s?m.y0:m.y1,f=[d=(p+c)/2,q0(u,u,s,s,.5)],g=[q0(p,d,d,c,.4999),q0(u,u,s,s,.4999)],m=m.width,x=((v=f[0])+(y=g[0]))/2,l=((f=f[1])+(g=g[1]))/2,f=f===g?(a=0,m/2):v===y?(a=m/2,0):(g=-1/((g-f)/(y-v)))*(a=m/2/Math.sqrt(1+g*g)),v=[d,q0(u+h,u+h,s+h,s+h,.5)],m=(y={P1:{x:x-a,y:l-f},P2:{x:x+a,y:l+f}}).P1.y>y.P2.y?y.P1:y.P2,g=p,x=c,h=d-(a=m,l={x:v[0],y:v[1]},f=h,y={x:v[0],y:v[1]},p={x:Math.max(1,v[0]+(s<u?1:-1)*h),y:v[1]},c=(a.x+l.x)/2,d=(a.y+l.y)/2,s=-(l.y-a.y),l=l.x-a.x,a=Math.sqrt(s*s+l*l),u=c+(s=s/a*f),a=d+(l=l/a*f),f=c-s,c=d-l,l=(d=p.y-y.y)*(u-f)-(s=p.x-y.x)*(a-c),(((!(Math.abs(l)<1e-10)&&(p=((u-f)*(c-y.y)-(a-c)*(f-y.x))/l,0<=(a=(s*(c-y.y)-d*(f-y.x))/l))&&a<=1&&0<=p&&p<=1?{x:f+a*(u-f)}:null)||{x:(v[0]+m.x)/2}).x-.125*g-.125*x)/.75),this._highlight=new M.drawing.Path({stroke:this.options.focusHighlight.border,visible:!1}).moveTo(t,i+n).lineTo(t,i-n).curveTo([r+h,i-n],[r+h,o-n],[e,o-n]).lineTo(e,o+n).curveTo([r-h,o+n],[r-h,i+n],[t,i+n]))},sw.prototype.focus=function(t){this._highlight&&((t=void 0===(t=(t||{}).highlight)?!0:t)&&this._highlight.options.set("visible",!0),t=this.options.link.sourceId+"->"+this.options.link.targetId,this.visual.options.set("id",t),this.options.root())&&this.options.root().setAttribute(X,t)},sw.prototype.blur=function(){this._highlight&&(this._highlight.options.set("visible",!1),this.visual.options.set("id",""),this.options.root())&&this.options.root().removeAttribute(X)},sw),ew="inside",iw="before",ow="after",rw=((Z0=Fs)&&(nw.__proto__=Z0),((nw.prototype=Object.create(Z0&&Z0.prototype)).constructor=nw).prototype.getElement=function(){var t,e=O({},this.options,this.options.node.label),i=e.node,o=e.diagramMinX,r=e.diagramMaxX,n=e.text,s=e.offset,a=e.rtl,l=e.position;return a&&l!==ew&&(l=l===iw?ow:iw),e.visible&&n?(e=new I(i.x0,i.y0,i.x1,i.y1),t=this.visualOptions(),a&&!t.align&&(t.align="right"),(n=new So(n,t)).reflow(new I),t=n.box,e=e.center().y-t.height()/2,r=i.x1+t.width()>r,o=i.x0-t.width()<o,r=l===iw||l===ew&&r?iw:ow,a=[(r=a?l===ow||l===ew&&o?ow:iw:r)===iw?i.x0-t.width():i.x1,e],(l=new I(a[0],a[1],a[0]+t.width(),a[1]+t.height())).translate(s.left||0,s.top||0),n.reflow(l),n.renderVisual(),n.visual):null},nw.prototype.visualOptions=function(){var t=O({},this.options,this.options.node.label);return{color:t.color,font:t.font,border:t.border,margin:t.margin,padding:t.padding,align:t.align,paintOrder:t.paintOrder,stroke:t.stroke}},nw);function nw(){Z0.apply(this,arguments)}function sw(){Q0.apply(this,arguments)}function aw(){K0.apply(this,arguments)}function lw(t){$0.call(this),this.options=O({},this.options,t),this.createVisual()}e(rw,{position:ew});function hw(t,e,i,o,r){return O({},e,{node:t,diagramMinX:o,diagramMaxX:r,rtl:i,visual:t.label.visual,visible:t.label.visible,margin:t.label.margin,padding:t.label.padding,border:t.label.border,align:t.label.align,offset:t.label.offset})}(pw=Fs)&&(uw.__proto__=pw),((uw.prototype=Object.create(pw&&pw.prototype)).constructor=uw).prototype.getElement=function(){var t=this.options,e=t.drawingRect,i=t.text;return!1!==t.visible&&i?((i=Mo.buildTitle(i,t)).reflow(e),i.renderVisual(),i.visual):null},uw.prototype.createElement=function(){return this.getElement()};var pw,cw=uw;function uw(){pw.apply(this,arguments)}e(cw,{align:b,border:{width:0},margin:w(5),padding:w(5)});function dw(t,e){return t.node.x0-e.node.x0!=0?t.node.x0-e.node.x0:t.node.y0-e.node.y0}function fw(t,e){return t.node.x1-e.node.x1!=0?t.node.x1-e.node.x1:e.node.y0-t.node.y0}(gw=Fs)&&(vw.__proto__=gw),((vw.prototype=Object.create(gw&&gw.prototype)).constructor=vw).prototype.getElement=function(){var t=this.options,e=t.drawingRect,i=t.rtl,o=t.nodes,r=(void 0===o&&(o=[]),t.item),n=t.position;return!1!==t.visible&&o.length?((o=o.map(function(t){return{text:t.label&&t.label.text||"",area:{background:void 0!==r.areaBackground?r.areaBackground:t.color,opacity:void 0!==r.areaOpacity?r.areaOpacity:t.opacity},node:t}})).sort(i?fw:dw),n=i&&n!==C&&n!==P,(t=new Mu(Object.assign({},t,{data:o,reverse:n}),{rtl:i})).reflow(e),t.renderVisual(),t.visual):null},vw.prototype.createElement=function(){return this.getElement()};var gw,yw=vw;function vw(){gw.apply(this,arguments)}e(yw,{markers:{visible:!1},item:{type:rs,cursor:ft,opacity:1},position:S,align:b,accessibility:{role:"presentation",ariaLabel:null,ariaRoleDescription:null},border:{width:0}});var mw,xw="link",_w="node",bw=((mw=ii)&&(E.__proto__=mw),((E.prototype=Object.create(mw&&mw.prototype)).constructor=E).prototype.destroy=function(){this.unbind(),this._destroySurface(),this._destroyResizeObserver(),this.element&&(this.element.removeEventListener("keydown",this._keydownHandler),this.element.removeEventListener("focus",this._focusHandler),this.element.removeEventListener("mousedown",this._onDownHandler),this.element.removeEventListener("touchstart",this._onDownHandler),this.element.removeEventListener("pointerdown",this._onDownHandler)),this._focusState=null,this.element=null},E.prototype._initElement=function(t){vt(this.element=t,["k-chart","k-sankey"]),t.setAttribute("role","graphics-document");var e=this.options.title;e.text&&t.setAttribute("aria-label",e.text),e.description&&t.setAttribute("aria-roledescription",e.description)},E.prototype._initSurface=function(){this.surface||(this._destroySurface(),this._initSurfaceElement(),this.surface=this._createSurface())},E.prototype._initNavigation=function(t){t.tabIndex=t.getAttribute("tabindex")||0,this.options.disableKeyboardNavigation||(this._keydownHandler=this._keydown.bind(this),this._focusHandler=this._focus.bind(this),this._blurHandler=this._blur.bind(this),this._onDownHandler=this._onDown.bind(this),t.addEventListener("keydown",this._keydownHandler),t.addEventListener("focus",this._focusHandler),t.addEventListener("blur",this._blurHandler),t.addEventListener("mousedown",this._onDownHandler),t.addEventListener("touchstart",this._onDownHandler),t.addEventListener("pointerdown",this._onDownHandler),this._focusState={node:this.firstFocusableNode(),link:null})},E.prototype.firstFocusableNode=function(){return this.columns[0][0]},E.prototype._initResizeObserver=function(){var o=this,t=new ResizeObserver(function(t){t.forEach(function(t){var e=t.contentRect,i=e.width,e=e.height;t.target!==o.element||o.size&&o.size.width===i&&o.size.height===e||(o.size={width:i,height:e},o.surface.setSize(o.size),o.resize=!0,o._redraw())})});(this._resizeObserver=t).observe(this.element)},E.prototype._createSurface=function(){return M.drawing.Surface.create(this.surfaceElement,{mouseenter:this._mouseenter.bind(this),mouseleave:this._mouseleave.bind(this),mousemove:this._mousemove.bind(this),click:this._click.bind(this)})},E.prototype._initTheme=function(t){t=t||this.theme||{};this.theme=t,this.options=O({},t,this.options)},E.prototype.setLinksOpacity=function(e){var i=this;this.linksVisuals.forEach(function(t){i.setOpacity(t,e,t.linkOptions.opacity)})},E.prototype.setLinksInactivityOpacity=function(e){var i=this;this.linksVisuals.forEach(function(t){i.setOpacity(t,e,t.linkOptions.highlight.inactiveOpacity)})},E.prototype.setOpacity=function(t,e,i){t.options.set("stroke",Object.assign({},t.options.stroke,{opacity:k(i)?i:e}))},E.prototype.trigger=function(t,e){var i=e.element.dataItem,o=e.element.type,e=Object.assign({},e,{type:t,targetType:o,dataItem:i});return mw.prototype.trigger.call(this,t,e)},E.prototype._mouseenter=function(t){var e=t.element,i=e.type===xw,o=e.type===_w,r=Boolean(e.chartElement&&e.chartElement.options.node);i&&this.trigger("linkEnter",t)||o&&this.trigger("nodeEnter",t)||(t=this.options.links.highlight,i?(this.setLinksInactivityOpacity(t.inactiveOpacity),this.setOpacity(e,t.opacity,e.linkOptions.highlight.opacity)):o?this.highlightLinks(e,t):r&&(i=this.nodesVisuals.get(e.chartElement.options.node.id),this.highlightLinks(i,t)))},E.prototype._mouseleave=function(t){var e=this,i=t.element,o=i.type===xw,r=i.type===_w,i=Boolean(i.chartElement&&i.chartElement.options.node),n=t.originalEvent.relatedTarget;o&&n&&"text"===n.nodeName||((o||r)&&(this.tooltipTimeOut&&(clearTimeout(this.tooltipTimeOut),this.tooltipTimeOut=null),this.tooltipShown=!1,this.trigger("tooltipHide",t)),o&&this.trigger("linkLeave",t))||r&&this.trigger("nodeLeave",t)||(o||r||i)&&this.linksVisuals.forEach(function(t){e.setOpacity(t,e.options.links.opacity,t.linkOptions.opacity)})},E.prototype._mousemove=function(t){var e,i,o,r=this,n=this.options.tooltip,s=n.followPointer,n=n.delay,a=t.element,l=a.type;l!==xw&&l!==_w||this.tooltipShown&&!s||(e=t.originalEvent,o=this.element.getBoundingClientRect(),i=e.clientX-o.left<o.width/2,o=e.clientY-o.top<o.height/2,t.tooltipData={popupOffset:{left:e.pageX,top:e.pageY},popupAlign:{horizontal:i?"left":"right",vertical:o?"top":"bottom"}},l===_w&&(i=(e=a.dataItem).sourceLinks,l=(o=e.targetLinks).length?o:i,t.nodeValue=l.reduce(function(t,e){return t+e.value},0)),this.tooltipTimeOut&&(clearTimeout(this.tooltipTimeOut),this.tooltipTimeOut=null),a=s&&this.tooltipShown?0:n,this.tooltipTimeOut=setTimeout(function(){r.trigger("tooltipShow",t),r.tooltipShown=!0,r.tooltipTimeOut=null},a))},E.prototype._click=function(t){var e=t.element,i=e.dataItem,o=e.type===xw,r=this._focusState||{};e.type===_w?(!r.link&&this.sameNode(r.node,i)||(this._focusState={node:i,link:null},this._focusNode({highlight:!1})),this.trigger("nodeClick",t)):o&&(e={sourceId:i.source.id,targetId:i.target.id,value:i.value},this.sameLink(r.link,e)||(this._focusState={node:i.source,link:e},this._focusLink({highlight:!1})),this.trigger("linkClick",t))},E.prototype.sameNode=function(t,e){return t&&e&&t.id===e.id},E.prototype.sameLink=function(t,e){return t&&e&&t.sourceId===e.sourceId&&t.targetId===e.targetId},E.prototype._focusNode=function(t){this._cleanFocusHighlight();var e=this._focusState.node;this.models.map.get(e.id).focus(t)},E.prototype._focusLink=function(t){this._cleanFocusHighlight();var e=this._focusState.link;this.models.map.get(e.sourceId+"-"+e.targetId).focus(t)},E.prototype._focusNextNode=function(t){void 0===t&&(t=1);var e=this._focusState.node,i=this.columns.findIndex(function(t){return t.find(function(t){return t.id===e.id})}),i=this.columns[i],o=i.findIndex(function(t){return t.id===e.id}),i=i[o+t];i&&(this._focusState.node=i,this._focusNode())},E.prototype._focusNextLink=function(t){void 0===t&&(t=1);var e=this._focusState.node,i=this._focusState.link,o=e.sourceLinks.findIndex(function(t){return t.sourceId===i.sourceId&&t.targetId===i.targetId}),r=e.targetLinks.findIndex(function(t){return t.sourceId===i.sourceId&&t.targetId===i.targetId});-1!==o?(o=e.sourceLinks[o+t])&&(this._focusState.link=o,this._focusLink()):-1!==r&&(o=e.targetLinks[r+t])&&(this._focusState.link=o,this._focusLink())},E.prototype._focusSourceNode=function(){var t=this._focusState.link,t=this.models.map.get(t.sourceId);this._focusState={node:t.options.node,link:null},this._focusNode()},E.prototype._focusTargetNode=function(){var t=this._focusState.link,t=this.models.map.get(t.targetId);this._focusState={node:t.options.node,link:null},this._focusNode()},E.prototype._focusSourceLink=function(){var t=this._focusState.node.sourceLinks[0];t&&(this._focusState.link=t,this._focusLink())},E.prototype._focusTargetLink=function(){var t=this._focusState.node.targetLinks[0];t&&(this._focusState.link=t,this._focusLink())},E.prototype._focus=function(){this._skipFocusHighlight||(this._focusState.link?this._focusLink():this._focusNode()),this._skipFocusHighlight=!1},E.prototype._blur=function(){this._cleanFocusHighlight()},E.prototype._onDown=function(){this._hasFocus()||(this._skipFocusHighlight=!0)},E.prototype._hasFocus=function(){return this.element.ownerDocument.activeElement===this.element},E.prototype._cleanFocusHighlight=function(){this.models.nodes.forEach(function(t){return t.blur()}),this.models.links.forEach(function(t){return t.blur()})},E.prototype._keydown=function(t){var e=this["on"+t.key],i=this.options.rtl;i&&"ArrowLeft"===t.key?e=this.onArrowRight:i&&"ArrowRight"===t.key&&(e=this.onArrowLeft),e&&e.call(this,t)},E.prototype.onEscape=function(t){t.preventDefault(),this._focusState={node:this.firstFocusableNode(),link:null},this._focusNode()},E.prototype.onArrowDown=function(t){t.preventDefault(),this._focusState.link?this._focusNextLink(1):this._focusNextNode(1)},E.prototype.onArrowUp=function(t){t.preventDefault(),this._focusState.link?this._focusNextLink(-1):this._focusNextNode(-1)},E.prototype.onArrowLeft=function(t){t.preventDefault(),this._focusState.link?this._focusSourceNode():this._focusTargetLink()},E.prototype.onArrowRight=function(t){t.preventDefault(),this._focusState.link?this._focusTargetNode():this._focusSourceLink()},E.prototype.highlightLinks=function(t,e){var i=this;t&&(this.setLinksInactivityOpacity(e.inactiveOpacity),t.links.forEach(function(t){i.setOpacity(t,e.opacity,t.linkOptions.highlight.opacity)}))},E.prototype._destroySurface=function(){this.surface&&(this.surface.destroy(),this.surface=null,this._destroySurfaceElement())},E.prototype._destroyResizeObserver=function(){this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null)},E.prototype._initSurfaceElement=function(){this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.element.appendChild(this.surfaceElement))},E.prototype._destroySurfaceElement=function(){this.surfaceElement&&this.surfaceElement.parentNode&&(this.surfaceElement.parentNode.removeChild(this.surfaceElement),this.surfaceElement=null)},E.prototype.setOptions=function(t,e){this._setOptions(t),this._initTheme(e),this._initSurface(),this._redraw()},E.prototype._redraw=function(){this.surface.clear();var t=this._getSize(),e=t.width;this.size={width:e,height:t.height},this.surface.setSize(this.size),this.createVisual(),this.surface.draw(this.visual)},E.prototype._getSize=function(){return this.element.getBoundingClientRect()},E.prototype.createVisual=function(){this.visual=this._render()},E.prototype.titleBox=function(t,e){return t&&!1!==t.visible&&t.text?new cw(Object.assign({},{drawingRect:e},t)).exportVisual().chartElement.box:null},E.prototype.legendBox=function(t,e,i){return t&&!1!==t.visible?new yw(Object.assign({},{nodes:e},t,{drawingRect:i})).exportVisual().chartElement.box:null},E.prototype.calculateSankey=function(o,t){var e=t.title,i=t.legend,r=t.data,n=t.nodes,s=t.labels,a=t.nodeColors,l=t.rtl,h=!t.disableAutoLayout,p=((n.focusHighlight||{}).border||{}).width||0,t=t.disableKeyboardNavigation?0:p/2,p=new I(0,0,o.width,o.height),t=(p.unpad(t),this.titleBox(e,p)),c=p.clone(),e=(t&&(u=t.height(),c=e.position===T?(p.unpad({top:u}),new I(0,u,o.width,o.height)):(p.shrink(0,u),new I(0,0,o.width,o.height-u))),this.legendBox(i,r.nodes,c)),u=i&&i.position||yw.prototype.options.position,r=(e&&(u===C&&p.unpad({left:e.width()}),u===P&&p.shrink(e.width(),0),u===T&&p.unpad({top:e.height()}),u===S)&&p.shrink(0,e.height()),W0(Object.assign({},o,{offsetX:0,offsetY:0,width:p.width(),height:p.height()}))),c=r.nodes,i=r.circularLinks;if(i)return console.warn("Circular links detected. Kendo Sankey diagram does not support circular links."),{sankey:{nodes:[],links:[],columns:[[]],circularLinks:i},legendBox:e,titleBox:t};var d=new I,f=c.reduce(function(t,e){return Math.min(t,e.x0)},1/0),g=c.reduce(function(t,e){return Math.max(t,e.x1)},0),y=(c.forEach(function(t,e){l&&(i=t.x0,t.x0=g-t.x1,t.x1=g-i);var i=Y0(t,n,a,e),e=new J0(i),i=(d.wrap(mo(e.exportVisual().rawBBox())),new rw(hw(t,s,l,f,g)).exportVisual());i&&d.wrap(mo(i.rawBBox()))}),p.x1),v=p.y1,m=p.width()+y,x=p.height()+v;if(m-=d.x2>p.width()?d.x2-p.width():0,x-=d.y2>p.height()?d.y2-p.height():0,y+=d.x1<0?-d.x1:0,v+=d.y1<0?-d.y1:0,!1==h)return{sankey:W0(Object.assign({},o,{offsetX:y,offsetY:v,width:m,height:x,autoLayout:!1})),legendBox:e,titleBox:t};if(this.resize&&h&&this.permutation)this.resize=!1;else{for(var _=W0(Object.assign({},o,{offsetX:y,offsetY:v,width:m,height:x,autoLayout:!1})).columns.length,b=[],w=function(t,e){var i=(t=>{for(var e=0,i=t.length,o=0;o<i;o++)for(var r=t[o],n=o+1;n<i;n++){var s=t[n],a=X0((p=r).x0,p.y0,p.x1,p.y1,s.x1,s.y1),l=X0(p.x0,p.y0,p.x1,p.y1,s.x0,s.y0),h=X0(p.x0,p.y0,s.x0,s.y0,s.x1,s.y1),p=X0(p.x1,p.y1,s.x0,s.y0,s.x1,s.y1);a!==l&&h!==p&&(e+=Math.min(r.value,s.value))}return e})(W0(Object.assign({},o,{offsetX:y,offsetY:v,width:m,height:x,loops:2,targetColumnIndex:t,reverse:e})).links);return b.push({crosses:i,reverse:e,targetColumnIndex:t}),0===i},k=1;k<=_-1&&!w(k,!1)&&!w(k,!0);k++);var A=Math.min.apply(null,b.map(function(t){return t.crosses})),u=b.find(function(t){return t.crosses===A});this.permutation={targetColumnIndex:u.targetColumnIndex,reverse:u.reverse}}return{sankey:W0(Object.assign({},o,{offsetX:y,offsetY:v,width:m,height:x},this.permutation)),legendBox:e,titleBox:t}},E.prototype._render=function(t,e){var o,r,l,h,p,c,i,n,t=t||this.options,u=e||this,s=t.labels,a=t.nodes,d=t.links,f=t.nodeColors,e=t.title,g=t.legend,y=t.rtl,v=t.disableKeyboardNavigation,m=t.data,x=u.size,_=x.width,x=x.height,b=Object.assign({},m,{width:_,height:x,nodesOptions:a,title:e,legend:g}),b=this.calculateSankey(b,t),t=b.sankey,w=b.titleBox,b=b.legendBox,k=(y&&(k=t.nodes,A=t.links,o=Math.min.apply(Math,k.map(function(t){return t.x0})),r=Math.max.apply(Math,k.map(function(t){return t.x1}))-o,k.forEach(function(t){var e=r-(t.x1-2*o),i=r-(t.x0-2*o);t.x0=e,t.x1=i}),A.forEach(function(t){var e=r-(t.x1-2*o),i=r-(t.x0-2*o);t.x1=e,t.x0=i})),t.nodes),A=t.links,S=t.columns,C=(u.columns=S.map(function(t){t=t.slice();return t.sort(function(t,e){return t.y0-e.y0}),t}),new M.drawing.Group({clip:M.drawing.Path.fromRect(new M.geometry.Rect([0,0],[_,x]))}));return w&&(S=new cw(Object.assign({},e,{drawingRect:w})).exportVisual(),C.append(S)),t.circularLinks||(l=new Map,u.nodesVisuals=l,h={nodes:[],links:[],map:new Map},u.models=h,p=[],k.forEach(function(t,e){var i=Y0(t,a,f,e),o=(i.root=function(){return u.element},i.navigatable=!0!==v,new J0(i)),r=o.exportVisual();r.links=[],r.type=_w,t.color=i.color,t.opacity=i.opacity,r.dataItem=Object.assign({},m.nodes[e],{color:i.color,opacity:i.opacity,sourceLinks:t.sourceLinks.map(function(t){return{sourceId:t.sourceId,targetId:t.targetId,value:t.value}}),targetLinks:t.targetLinks.map(function(t){return{sourceId:t.sourceId,targetId:t.targetId,value:t.value}})}),l.set(t.id,r),h.nodes.push(o),h.map.set(t.id,o),C.append(r),o.createFocusHighlight(),o._highlight&&p.push(o._highlight)}),_=A.slice().sort(function(t,e){return e.value-t.value}),c=[],u.linksVisuals=c,_.forEach(function(t){var e=t.source,i=t.target,o=l.get(e.id),r=l.get(i.id),n=(n=o,s=r,"source"===(a=O({},d,{link:t,opacity:t.opacity,color:t.color,colorType:t.colorType,visual:t.visual,highlight:t.highlight})).colorType?a.color=n.options.fill.color:"target"===a.colorType&&(a.color=s.options.fill.color),a),s=(n.root=function(){return u.element},n.navigatable=!0!==v,n.rtl=y,new tw(n)),a=s.exportVisual();a.type=xw,a.dataItem={source:Object.assign({},o.dataItem),target:Object.assign({},r.dataItem),value:t.value},a.linkOptions=n,c.push(a),o.links.push(a),r.links.push(a),h.links.push(s),h.map.set(e.id+"-"+i.id,s),s.createFocusHighlight(),s._highlight&&p.push(s._highlight),C.append(a)}),i=k.reduce(function(t,e){return Math.min(t,e.x0)},1/0),n=k.reduce(function(t,e){return Math.max(t,e.x1)},0),k.forEach(function(t){t=hw(t,s,y,i,n),t=new rw(t).exportVisual();t&&C.append(t)}),b&&(x=new yw(Object.assign({},g,{rtl:y,drawingRect:b,nodes:k})).exportVisual(),C.append(x)),0!==p.length&&((e=new M.drawing.Group).append.apply(e,p),C.append(e))),C},E.prototype.exportVisual=function(t){var e=t&&t.options?O({},this.options,t.options):this.options,t={size:{width:(k(t&&t.width)?t:this.size).width,height:(k(t&&t.height)?t:this.size).height}};return this._render(e,t)},E.prototype._setOptions=function(t){this.options=O({},this.options,t)},E),zs={opacity:1,width:2,color:Y};function E(t,e,i){mw.call(this),this._initTheme(i),this._setOptions(e),this._initElement(t),this._initSurface(),e&&e.data&&(this._redraw(),this._initResizeObserver(),this._initNavigation(t))}e(bw,{title:{position:T},labels:{visible:!0,margin:{left:8,right:8},padding:0,border:{width:0},paintOrder:"stroke",stroke:{lineJoin:"round",width:1},offset:{left:0,top:0}},nodes:{width:24,padding:16,opacity:1,align:"stretch",offset:{left:0,top:0},focusHighlight:{border:Object.assign({},zs)},labels:{ariaTemplate:function(t){return t.node.label.text}}},links:{colorType:"static",opacity:.4,highlight:{opacity:.8,inactiveOpacity:.2},focusHighlight:{border:Object.assign({},zs)},labels:{ariaTemplate:function(t){t=t.link;return t.source.label.text+" to "+t.target.label.text}}},tooltip:{followPointer:!1,delay:200}});var ww=function(t,a,l){var h=new Set,p=new Map,c=new Map,o=(t.forEach(function(e){a.forEach(function(t){h.add(t.value(e))});for(var t=0;t<a.length-1;t++){var i=a[t].value(e),o=a[t+1].value(e),r=i+"_"+o,n=l.value(e),s=p.get(r);void 0!==s?p.set(r,s+n):(p.set(r,n),c.set(r,{source:i,target:o}))}}),new Map);return{nodes:Array.from(h).map(function(t,e){return o.set(t,e),{id:e,label:{text:String(t)}}}),links:Array.from(p).map(function(t){var e=t[0],t=t[1],e=c.get(e),i=e.source,e=e.target;return{sourceId:o.get(i),targetId:o.get(e),value:t}})}},R=Object.freeze({seriesType:0,stacked:1,categoryAxisX:2,valueAxisY:3,seriesChange:4,areaMarginLeft:5,areaMarginRight:6,areaMarginTop:7,areaMarginBottom:8,areaBackground:9,titleText:10,titleFontName:11,titleFontSize:12,titleColor:13,subtitleText:14,subtitleFontName:15,subtitleFontSize:16,subtitleColor:17,seriesColor:18,seriesLabel:19,legendVisible:20,legendFontName:21,legendFontSize:22,legendColor:23,legendPosition:24,categoryAxisTitleText:25,categoryAxisTitleFontName:26,categoryAxisTitleFontSize:27,categoryAxisTitleColor:28,categoryAxisLabelsFontName:29,categoryAxisLabelsFontSize:30,categoryAxisLabelsColor:31,categoryAxisLabelsRotation:32,categoryAxisReverseOrder:33,valueAxisTitleText:34,valueAxisTitleFontName:35,valueAxisTitleFontSize:36,valueAxisTitleColor:37,valueAxisLabelsFormat:38,valueAxisLabelsFontName:39,valueAxisLabelsFontSize:40,valueAxisLabelsColor:41,valueAxisLabelsRotation:42}),kw="12px",$=[{text:"Arial",value:"Arial, Helvetica, sans-serif",style:{fontFamily:"Arial, Helvetica, sans-serif"}},{text:"Courier New",value:"'Courier New', Courier, monospace",style:{fontFamily:"'Courier New', Courier, monospace"}},{text:"Georgia",value:"Georgia, serif",style:{fontFamily:"Georgia, serif"}},{text:"Impact",value:"Impact, Charcoal, sans-serif",style:{fontFamily:"Impact, Charcoal, sans-serif"}},{text:"Lucida Console",value:"'Lucida Console', Monaco, monospace",style:{fontFamily:"'Lucida Console', Monaco, monospace"}},{text:"Tahoma",value:"Tahoma, Geneva, sans-serif",style:{fontFamily:"Tahoma, Geneva, sans-serif"}},{text:"Times New Roman",value:"'Times New Roman', Times,serif",style:{fontFamily:"'Times New Roman', Times,serif"}},{text:"Trebuchet MS",value:"'Trebuchet MS', Helvetica, sans-serif",style:{fontFamily:"'Trebuchet MS', Helvetica, sans-serif"}},{text:"Verdana",value:"Verdana, Geneva, sans-serif",style:{fontFamily:"Verdana, Geneva, sans-serif"}}],Aw=$[0].value,Sw="scatter",Cw=["column","bar","line",Sw],Pw={type:"line",width:0};function Tw(t){return t&&Cw.includes(t)}var l=["string","date","number"],h=["number"],Mw={bar:[{axisType:"category",types:l},{axisType:"value",types:h}],column:[{axisType:"category",types:l},{axisType:"value",types:h}],line:[{axisType:"category",types:l},{axisType:"value",types:h}],pie:[{axisType:"category",types:l},{axisType:"value",types:h,count:1}],scatter:[{axisType:"category",types:l},{axisType:"value",types:h}]};function Ow(t,e){return((e||"")+" "+(t||"")).trim()}function Lw(t){var e=(t||"").indexOf(" ");return{size:t&&t.substring(0,e),name:t&&t.substring(e+1)}}function Iw(t,e,i){return i=Lw(i).size,t?Ow(t,i||e):""}function Bw(t,e,i){return i=Lw(i).name,t?Ow(i||e,t):""}function Ew(o,r,t){var n,e,i,s,a=Fw(),l=(a.seriesType=r,a.data=o||[],a.legend={visible:!0,position:"bottom"},Mw[r]);return l&&o.length&&(n=o[0].slice(),a.columns=o[0].map(function(t){return String(t.field)}),i=l.find(function(t){return"category"===t.axisType}),e=-1,i&&(e=t&&t.categoryAxis?a.columns.indexOf(t.categoryAxis):zw(o,i)),t=l.filter(function(t){return"value"===t.axisType}),(i=Dw(o,t)).includes(e)&&(1<i.length?i=i.filter(function(t){return t!==e}):e=-1),s=[],i.forEach(function(e){var t=n[e],i=[];o.forEach(function(t){i.push(t[e].value)}),s.push(Object.assign({},{name:t.field,type:r,data:i,stack:!1,labels:{visible:!1}},r===Sw?Pw:{}))}),l=-1<e?o.map(function(t){return String(Vw(t[e].value)?t[e].value:" ")}):[],s.length&&(a.series=s.map(function(t,e){return Object.assign({},t,{id:e})}),a.initialSeries=structuredClone(a.series)),a.categoryAxis=[{categories:l,labels:{visible:!0,rotation:"auto"}}],a.categoryField=a.columns[e]),a}function Rw(t,e,i){var o,r,n,s,a,l=Fw(),h=(l.seriesType=e,l.data=t||[],Mw[e]);return h&&t.length&&(o=t[0].map(function(t){return t.field}),n=h.find(function(t){return"category"===t.axisType}),r=-1,n&&(r=i&&i.categoryAxis?o.indexOf(i.categoryAxis):zw(t,n)),n=h.filter(function(t){return"value"===t.axisType}),s=[],(s=i&&i.valueAxis?[o.indexOf(i.valueAxis)]:Dw(t,n)).includes(r)&&1<s.length&&(s=s.filter(function(t){return t!==r})),"number"==typeof n[0].count&&(s=s.slice(0,n[0].count)),h=-1<r?t.map(function(t){return String(t[r].value)}):[],a=[],t.forEach(function(e){var i={};s.forEach(function(t){t=e[t];i[t.field]=t.value||0,i[e[r].field]=e[r].value||" "}),a.push(i)}),l.columns=o,l.categoryAxis=[{categories:h,title:{text:""}}],l.series=[{id:0,data:a,type:e,name:o[r],labels:{visible:!0},categoryField:o[r],field:o[s[0]]}],l.categoryField=o[r],l.valueField=o[s[0]],l.initialSeries=structuredClone(l.series)),l}var Vw=function(t){return null!=t},jw=function(r){var t=structuredClone(r[0]);return t.forEach(function(t,e){if(!Vw(t.value))for(var i=0;i<r.length;i++){var o=r[i][e].value;if(Vw(o)){t.value=o;break}}}),t},zw=function(i,t){var o=[],e=jw(i),t=(t.types.forEach(function(i){e.forEach(function(t,e){typeof t.value===i&&o.push(e)})}),o.findIndex(function(e){var t=i.map(function(t){return t[e].value});return new Set(t).size===t.length}));return Math.max(t,0)},Dw=function(t,e){var o=[],r=jw(t);return e.forEach(function(t){t.types.forEach(function(i){r.forEach(function(t,e){typeof t.value===i&&o.push(e)})})}),o},Fw=function(){return structuredClone({columns:[],data:[],series:[],initialSeries:[],categoryAxis:[{categories:[],labels:{visible:!0,rotation:"auto"},title:{text:""}}],valueAxis:[{labels:{visible:!0,rotation:"auto"}}],area:{margin:{left:void 0,right:void 0,top:void 0,bottom:void 0}},title:{text:""},subtitle:{text:""},stack:!1})};function Hw(t,e){return(Tw(e)?Ew:Rw)(t,e)}function Nw(t,e){var i=structuredClone(e);if(i.legend=t.legend,i.area=t.area,i.title=t.title,i.subtitle=t.subtitle,i.series.length===t.series.length)for(var o=0;o<i.series.length;o++)i.series[o].color=t.series[o].color,i.series[o].labels=t.series[o].labels;return t.series.every(function(t){return t.labels&&t.labels.visible})&&Tw(i.seriesType)&&Tw(t.seriesType)&&i.series.forEach(function(t){t.labels=t.labels||{},t.labels.visible=!0}),i}function Uw(t,e,i){var o=Object.assign({},t);switch(e){case R.seriesType:return Hw(o.data,i);case R.stacked:return o.series=o.series.map(function(t){return Object.assign({},t,{stack:i})}),o.stack=i,o;case R.categoryAxisX:return o.seriesType&&Tw(o.seriesType)?Nw(o,Ew(o.data,o.seriesType,{categoryAxis:i})):"pie"===o.seriesType?Nw(o,Rw(o.data,o.seriesType,{categoryAxis:i})):o;case R.valueAxisY:return"pie"===o.seriesType?Nw(o,Rw(o.data,o.seriesType,{categoryAxis:o.categoryField,valueAxis:i})):o;case R.seriesChange:return o.series=i,o;case R.areaMarginLeft:return o.area=Object.assign({},o.area,{margin:Object.assign({},o.area&&o.area.margin||{},{left:i})}),o;case R.areaMarginRight:return o.area=Object.assign({},o.area,{margin:Object.assign({},o.area&&o.area.margin||{},{right:i})}),o;case R.areaMarginTop:return o.area=Object.assign({},o.area,{margin:Object.assign({},o.area&&o.area.margin||{},{top:i})}),o;case R.areaMarginBottom:return o.area=Object.assign({},o.area,{margin:Object.assign({},o.area&&o.area.margin||{},{bottom:i})}),o;case R.areaBackground:return o.area=Object.assign({},o.area,{background:i}),o;case R.titleText:return o.title=Object.assign({},o.title,{text:i}),o;case R.titleFontName:return o.title=Object.assign({},o.title,{font:Iw(i,"20px",o.title&&o.title.font)}),o;case R.titleFontSize:return o.title=Object.assign({},o.title,{font:Bw(i,Aw,o.title&&o.title.font)}),o;case R.titleColor:return o.title=Object.assign({},o.title,{color:i}),o;case R.subtitleText:return o.subtitle=Object.assign({},o.subtitle,{text:i}),o;case R.subtitleFontName:return o.subtitle=Object.assign({},o.subtitle,{font:Iw(i,"16px",o.subtitle&&o.subtitle.font)}),o;case R.subtitleFontSize:return o.subtitle=Object.assign({},o.subtitle,{font:Bw(i,Aw,o.subtitle&&o.subtitle.font)}),o;case R.subtitleColor:return o.subtitle=Object.assign({},o.subtitle,{color:i}),o;case R.seriesColor:return o.series=o.series.map(function(t){return Object.assign({},t,{color:(i.seriesName===t.name?i:t).color})}),o;case R.seriesLabel:return o.series=o.series.map(function(t){return i.all||i.seriesName===t.name?Object.assign({},t,{labels:{visible:i.visible}}):t}),o;case R.legendVisible:return o.legend=Object.assign({},o.legend,{visible:i}),o;case R.legendFontName:var r=o.legend||{};return o.legend=Object.assign({},r,{labels:Object.assign({},r.labels,{font:Iw(i,kw,r.labels&&r.labels.font)})}),o;case R.legendFontSize:r=o.legend||{};return o.legend=Object.assign({},r,{labels:Object.assign({},r.labels,{font:Bw(i,Aw,r.labels&&r.labels.font)})}),o;case R.legendColor:r=o.legend||{};return o.legend=Object.assign({},r,{labels:Object.assign({},r.labels,{color:i})}),o;case R.legendPosition:return o.legend=Object.assign({},o.legend,{position:i}),o;case R.categoryAxisTitleText:return o.categoryAxis=(o.categoryAxis||[]).map(function(t){return Object.assign({},t,{title:Object.assign({},t.title,{text:i})})}),o;case R.categoryAxisTitleFontName:return o.categoryAxis=(o.categoryAxis||[]).map(function(t){return Object.assign({},t,{title:Object.assign({},t.title,{font:Iw(i,"16px",t.title&&t.title.font)})})}),o;case R.categoryAxisTitleFontSize:return o.categoryAxis=(o.categoryAxis||[]).map(function(t){return Object.assign({},t,{title:Object.assign({},t.title,{font:Bw(i,Aw,t.title&&t.title.font)})})}),o;case R.categoryAxisTitleColor:return o.categoryAxis=(o.categoryAxis||[]).map(function(t){return Object.assign({},t,{title:Object.assign({},t.title,{color:i})})}),o;case R.categoryAxisLabelsFontName:return o.categoryAxis=(o.categoryAxis||[]).map(function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{font:Iw(i,kw,t.labels&&t.labels.font)})})}),o;case R.categoryAxisLabelsFontSize:return o.categoryAxis=(o.categoryAxis||[]).map(function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{font:Bw(i,Aw,t.labels&&t.labels.font)})})}),o;case R.categoryAxisLabelsColor:return o.categoryAxis=(o.categoryAxis||[]).map(function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{color:i})})}),o;case R.categoryAxisLabelsRotation:var n=Vw(i)?i:"auto";return o.categoryAxis=(o.categoryAxis||[]).map(function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{rotation:n})})}),o;case R.categoryAxisReverseOrder:return o.categoryAxis=(o.categoryAxis||[]).map(function(t){return Object.assign({},t,{reverse:i})}),o;case R.valueAxisTitleText:return o.valueAxis&&0!==o.valueAxis.length?o.valueAxis=(o.valueAxis||[]).map(function(t){return Object.assign({},t,{title:Object.assign({},t.title,{text:i})})}):o.valueAxis=[{title:{text:i}}],o;case R.valueAxisTitleFontName:return o.valueAxis=(o.valueAxis||[]).map(function(t){return Object.assign({},t,{title:Object.assign({},t.title,{font:Iw(i,"16px",t.title&&t.title.font)})})}),o;case R.valueAxisTitleFontSize:return o.valueAxis=(o.valueAxis||[]).map(function(t){return Object.assign({},t,{title:Object.assign({},t.title,{font:Bw(i,Aw,t.title&&t.title.font)})})}),o;case R.valueAxisTitleColor:return o.valueAxis=(o.valueAxis||[]).map(function(t){return Object.assign({},t,{title:Object.assign({},t.title,{color:i})})}),o;case R.valueAxisLabelsFormat:return o.valueAxis=(o.valueAxis||[]).map(function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{format:i})})}),o;case R.valueAxisLabelsFontName:return o.valueAxis=(o.valueAxis||[]).map(function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{font:Iw(i,kw,t.labels&&t.labels.font)})})}),o;case R.valueAxisLabelsFontSize:return o.valueAxis=(o.valueAxis||[]).map(function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{font:Bw(i,Aw,t.labels&&t.labels.font)})})}),o;case R.valueAxisLabelsColor:return o.valueAxis=(o.valueAxis||[]).map(function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{color:i})})}),o;case R.valueAxisLabelsRotation:var s=Vw(i)?i:"auto";return o.valueAxis=(o.valueAxis||[]).map(function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{rotation:s})})}),o;default:return o}}function Gw(t,e){return parseFloat(_k(t).getPropertyValue(e))}function Ww(t){for(var e=_k(t),i=[],o=1,r=e.getPropertyValue(""+xk+o);r||o<=30;)i.push(r),r=e.getPropertyValue(""+xk+ ++o);return i}function Xw(t){return kk(t,"--kendo-chart-pane-title-font-weight","--kendo-chart-pane-title-font-size","--kendo-font-family")}function Yw(t){return{color:Sk(t),font:kk(t,"--kendo-font-weight","--kendo-chart-title-font-size","--kendo-font-family")}}var js=Object.freeze({windowTitle:"Chart Preview",exportButton:"Export",exportPDFButton:"PDF File",exportSVGButton:"SVG File",exportPNGButton:"PNG File",tabChart:"Chart",tabData:"Data",tabFormat:"Format",barChart:"Bar Chart",barChartBar:"Bar",barChartStackedBar:"Stacked Bar",barChart100StackedBar:"100% Stacked Bar",pieChart:"Pie Chart",pieChartPie:"Pie",columnChart:"Column Chart",columnChartColumn:"Column",columnChartStackedColumn:"Stacked Column",columnChart100StackedColumn:"100% Stacked Column",lineChart:"Line Chart",lineChartLine:"Line",lineChartStackedLine:"Stacked Line",lineChart100StackedLine:"100% Stacked Line",scatterChart:"Scatter Chart",scatterChartScatter:"Scatter",configuration:"Configuration",configurationCategoryAxis:"Category Axis",configurationXAxis:"X Axis",configurationValueAxis:"Value Axis",configurationSeries:"Series",configurationSeriesAdd:"Add",formatChartArea:"Chart Area",formatChartAreaMargins:"Margins",formatChartAreaMarginsAuto:"Auto",formatChartAreaMarginsLeft:"Left",formatChartAreaMarginsRight:"Right",formatChartAreaMarginsTop:"Top",formatChartAreaMarginsBottom:"Bottom",formatChartAreaBackground:"Background",formatChartAreaBackgroundColor:"Color",formatTitle:"Title",formatTitleApplyTo:"Apply to",formatTitleChartTitle:"Chart Title",formatTitleChartSubtitle:"Chart Subtitle",formatTitleLabel:"Title",formatTitleFont:"Font",formatTitleFontPlaceholder:"(inherited font)",formatTitleSize:"Size",formatTitleSizePlaceholder:"px",formatTitleColor:"Color",formatSeries:"Series",formatSeriesApplyTo:"Apply to",formatSeriesAllSeries:"All Series",formatSeriesColor:"Color",formatSeriesShowLabels:"Show Labels",formatLegend:"Legend",formatLegendShowLegend:"Show Legend",formatLegendFont:"Font",formatLegendFontPlaceholder:"(inherited font)",formatLegendSize:"Size",formatLegendSizePlaceholder:"px",formatLegendColor:"Color",formatLegendPosition:"Position",formatLegendPositionTop:"Top",formatLegendPositionBottom:"Bottom",formatLegendPositionLeft:"Left",formatLegendPositionRight:"Right",formatCategoryAxis:"Category Axis",formatXAxis:"X Axis",formatCategoryAxisTitle:"Title",formatCategoryAxisTitlePlaceholder:"Axis Title",formatCategoryAxisTitleFont:"Font",formatCategoryAxisTitleFontPlaceholder:"(inherited font)",formatCategoryAxisTitleSize:"Size",formatCategoryAxisTitleSizePlaceholder:"px",formatCategoryAxisTitleColor:"Color",formatCategoryAxisLabels:"Labels",formatCategoryAxisLabelsFont:"Font",formatCategoryAxisLabelsFontPlaceholder:"(inherited font)",formatCategoryAxisLabelsSize:"Size",formatCategoryAxisLabelsSizePlaceholder:"px",formatCategoryAxisLabelsColor:"Color",formatCategoryAxisLabelsRotation:"Rotation",formatCategoryAxisLabelsRotationAuto:"Auto",formatCategoryAxisLabelsReverseOrder:"Reverse Order",formatValueAxis:"Value Axis",formatYAxis:"Y Axis",formatValueAxisTitle:"Title",formatValueAxisTitlePlaceholder:"Axis Title",formatValueAxisTitleFont:"Font",formatValueAxisTitleFontPlaceholder:"(inherited font)",formatValueAxisTitleSize:"Size",formatValueAxisTitleSizePlaceholder:"px",formatValueAxisTitleColor:"Color",formatValueAxisLabels:"Labels",formatValueAxisLabelsFormat:"Label Format",formatValueAxisLabelsFormatText:"Text",formatValueAxisLabelsFormatNumber:"Number",formatValueAxisLabelsFormatCurrency:"Currency",formatValueAxisLabelsFormatPercent:"Percent",formatValueAxisLabelsFont:"Font",formatValueAxisLabelsFontPlaceholder:"(inherited font)",formatValueAxisLabelsSize:"Size",formatValueAxisLabelsSizePlaceholder:"px",formatValueAxisLabelsColor:"Color",formatValueAxisLabelsRotation:"Rotation",formatValueAxisLabelsRotationAuto:"Auto"}),qw=Object.freeze({getWizardDataFromDataRows:function(t){var o=[];return t.forEach(function(t){var e=t.dataItem,i=[];t.dataColumns.forEach(function(t){i.push({field:t.title||t.field,value:Ht(t.field)(e)})}),o.push(i)}),o},ActionTypes:R,createInitialState:function(t,e,i){t=Hw(t,i&&i.seriesType||e);return void 0!==(i&&i.stack)?Uw(t,R.stacked,i.stack):t},createState:Hw,fontNames:$,fontSizes:[{text:"10",value:"10px"},{text:"12",value:"12px"},{text:"14",value:"14px"},{text:"16",value:"16px"},{text:"20",value:"20px"},{text:"28",value:"28px"},{text:"42",value:"42px"},{text:"56",value:"56px"}],isCategorical:Tw,mergeStates:Nw,parseFont:Lw,updateState:Uw,messages:js}),Zw=1.5,Qw=.4,Kw="#000",t="Arial, Helvetica, sans-serif",$w="11px "+t,Jw="12px "+t,tk="16px "+t,ek="transparent",ik="#fff",ok={type:ys},rk={type:rs},nk=Object.assign({},rk,{markers:{visible:!1},highlight:{visible:!1}}),sk=function(){return{icon:{border:{width:1}},label:{font:Jw,padding:3},line:{length:10,width:2},legendItem:nk,visible:!0}},ak=function(){return{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},legendItem:rk,opacity:.4}},lk=function(){return{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},legendItem:rk,opacity:.4}},hk=function(){return{outliersField:"",meanField:"",border:{_brightness:.8,width:1},downColor:ik,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},legendItem:nk}},pk=function(){return{gap:Zw,spacing:Qw,target:{color:"#ff0000"},legendItem:nk}},ck=function(){return{width:2,legendItem:ok}},uk=function(){return{line:{opacity:1,width:0},markers:{size:6,visible:!1},legendItem:rk,opacity:.5}},dk=function(){return{markers:{visible:!1},legendItem:ok,width:2}},fk=function(){return{gap:.5,line:{color:Kw,width:1},legendItem:nk,spacing:Qw}},gk=function(){return{labels:{background:"",color:"",padding:{top:5,bottom:5,left:7,right:7}},legendItem:nk}},yk=gk,vk=function(t){return Object.assign({color:ot,trendline:{},markers:{visible:!1},width:1,dashType:"longDash",legendItem:ok},t)},mk=function(t){return void 0===t&&(t={}),{axisDefaults:{labels:{font:Jw},notes:sk(),title:{font:tk,margin:5}},categoryAxis:{majorGridLines:{visible:!0}},navigator:{pane:{height:90,margin:{top:10}}},seriesDefaults:{visible:!0,labels:{font:$w},overlay:t.gradients?{}:{gradient:"none"},area:ak(),rangeArea:lk(),verticalRangeArea:lk(),bar:{gap:Zw,spacing:Qw,legendItem:nk},boxPlot:hk(),bubble:{border:{width:0},labels:{background:ek},legendItem:nk,opacity:.6},bullet:pk(),candlestick:{border:{_brightness:.8,width:1},downColor:ik,gap:1,highlight:{border:{opacity:1,width:2},line:{width:2}},line:{color:Kw,width:1},legendItem:nk,spacing:.3},column:{gap:Zw,spacing:Qw,legendItem:nk},heatmap:{labels:{color:"",background:ek,visible:!0},highlight:{border:{width:0}},legendItem:nk},pie:{labels:{background:"",color:"",padding:{top:5,bottom:5,left:7,right:7}},legendItem:nk},donut:{margin:1,legendItem:nk},funnel:gk(),pyramid:yk(),horizontalWaterfall:fk(),line:ck(),notes:sk(),ohlc:{gap:1,highlight:{line:{opacity:1,width:3}},line:{width:1},legendItem:nk,spacing:.3},radarArea:uk(),radarLine:dk(),radarColumn:{legendItem:nk},polarArea:uk(),polarLine:dk(),polarScatter:{legendItem:ok},rangeBar:{gap:Zw,spacing:Qw,legendItem:nk},rangeColumn:{gap:Zw,spacing:Qw,legendItem:nk},scatter:{legendItem:ok},scatterLine:{width:1,legendItem:ok},verticalArea:ak(),verticalBoxPlot:hk(),verticalBullet:pk(),verticalLine:ck(),waterfall:fk(),linearTrendline:vk(),exponentialTrendline:vk({style:"smooth"}),logarithmicTrendline:vk({style:"smooth"}),polynomialTrendline:vk({style:"smooth"}),powerTrendline:vk({style:"smooth"}),movingAverageTrendline:vk()},title:{font:tk},subtitle:{font:Jw},legend:{labels:{font:Jw}}}},xk="--kendo-chart-series-",_k=function(t){return t.ownerDocument.defaultView.getComputedStyle(t)},bk={},wk=function(t,e){var i,o,r,e=_k(t).getPropertyValue(e);return/^color-mix/i.test(e)&&(t=t,e=bk[i=e]||(o=t.style.color,t.style.color=i,r=_k(t).color,t.style.color=o,bk[i]=r)),e},kk=function(t,e,i,o){t=_k(t);return[t.getPropertyValue(e),t.getPropertyValue(i),t.getPropertyValue(o)||t.fontFamily].join(" ")},Ak=function(t){return kk(t,"--kendo-font-weight","--kendo-chart-font-size","--kendo-font-family")},Sk=function(t){return wk(t,"--kendo-chart-text")},Ck=function(t){var e=Sk(t);return{labels:{color:e,font:Ak(t)},title:{color:e}}},Pk=function(t){var e=Sk(t);return{pointer:{color:wk(t,"--kendo-chart-gauge-pointer")},scale:{labels:{color:e},rangePlaceholderColor:wk(t,"--kendo-chart-gauge-track"),minorTicks:{color:e},majorTicks:{color:e},line:{color:e}}}},Tk=function(t){return{labels:{color:Sk(t),font:Ak(t),stroke:{color:wk(t,"--kendo-chart-bg")}},links:{color:wk(t,"--kendo-color-subtle")},nodeColors:Ww(t),title:Yw(t),legend:Ck(t)}},Mk=function(t){function e(){return{downColor:l,mean:{color:f},median:{color:f},whiskers:{color:g}}}function i(){return{line:{color:l}}}function o(){return{opacity:d,highlight:{inactiveOpacity:Gw(t,"--kendo-chart-area-inactive-opacity")}}}function r(){return{highlight:{inactiveOpacity:Gw(t,"--kendo-chart-line-inactive-opacity")}}}function n(){return{target:{color:h}}}var s,a,l=wk(t,"--kendo-chart-major-lines"),h=wk(t,"--kendo-chart-text"),p=kk(t,"--kendo-font-weight","--kendo-chart-label-font-size","--kendo-font-family"),c=wk(t,"--kendo-chart-bg"),u={icon:{background:wk(u=t,"--kendo-chart-notes-bg"),border:{color:wk(u,"--kendo-chart-notes-border")}},line:{color:wk(u,"--kendo-chart-notes-lines")},label:{font:Ak(u)}},d=Gw(t,"--kendo-chart-area-opacity"),f=wk(t,"--kendo-color-surface"),g=wk(t,"--kendo-chart-primary-bg");return{axisDefaults:{crosshair:{color:wk(t,"--kendo-chart-crosshair-bg")},labels:{color:h,font:p},line:{color:l},majorGridLines:{color:l},minorGridLines:{color:wk(t,"--kendo-chart-minor-lines")},notes:structuredClone(u),title:{color:h,font:Ak(t)}},chartArea:{background:c},legend:(a=wk(s=t,"--kendo-chart-inactive"),Object.assign({},{inactiveItems:{labels:{color:a},markers:{color:a}}},Ck(s))),seriesColors:Ww(t),seriesDefaults:{area:o(),verticalArea:o(),radarArea:o(),boxPlot:e(),verticalBoxPlot:e(),bullet:n(),verticalBullet:n(),horizontalWaterfall:i(),waterfall:i(),line:r(),verticalLine:r(),candlestick:{downColor:h,line:{color:h}},errorBars:{color:wk(t,"--kendo-chart-error-bars-bg")},icon:{border:{color:l}},labels:{background:c,color:h,font:p,opacity:d},notes:structuredClone(u)},subtitle:{color:h,font:Xw(t)},title:Yw(t),paneDefaults:{title:{font:Xw(t)}}}};return D})())}}});
|
|
1
|
+
System.register("@progress/kendo-charts",["@progress/kendo-drawing"],function(t,e){var Ok={};return{setters:[function(t){Ok.Class=t.Class,Ok.Color=t.Color,Ok.drawing=t.drawing,Ok.geometry=t.geometry,Ok.logToConsole=t.logToConsole,Ok.parseColor=t.parseColor,Ok.support=t.support,Ok.throttle=t.throttle}],execute:function(){t((()=>{var V={593:t=>{t.exports=Ok}},j={};function z(t){var e=j[t];return void 0!==e||(e=j[t]={exports:{}},V[t](e,e.exports,z)),e.exports}z.d=(t,e)=>{for(var i in e)z.o(e,i)&&!z.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},z.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var D={},F=((z.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})})(D),z.d(D,{Aggregates:()=>Rn,ArcGauge:()=>Kv,ArcScale:()=>Nv,AreaChart:()=>Bl,AreaSegment:()=>Al,ArrowLinearPointer:()=>Jy,Axis:()=>Ko,AxisGroupRangeTracker:()=>Vl,AxisLabel:()=>Io,Bar:()=>Ul,BarChart:()=>gh,BarLabel:()=>Dl,BarLinearPointer:()=>av,Barcode:()=>Tx,Box:()=>I,BoxElement:()=>Ji,BoxPlot:()=>Ah,BoxPlotChart:()=>Oh,BubbleChart:()=>Nh,Bullet:()=>qh,BulletChart:()=>Kh,Candlestick:()=>mh,CandlestickChart:()=>bh,CategoricalChart:()=>Da,CategoricalErrorBar:()=>fa,CategoricalPlotArea:()=>jc,CategoryAxis:()=>Mr,Chart:()=>zg,ChartAxis:()=>Cn,ChartContainer:()=>pp,ChartElement:()=>o,ChartPane:()=>On,ChartPlotArea:()=>Ln,ChartService:()=>Go,ChartWizardCommon:()=>qw,CircularGauge:()=>tm,Class:()=>M.Class,ClipAnimation:()=>vl,ClusterLayout:()=>hh,Crosshair:()=>ap,CrosshairTooltip:()=>rp,CurveProcessor:()=>kn,DateCategoryAxis:()=>jr,DateValueAxis:()=>Zr,DefaultAggregates:()=>Bp,DomEventsBuilder:()=>Yo,DonutChart:()=>Hd,DonutPlotArea:()=>Gd,DonutSegment:()=>zd,ErrorBarBase:()=>ca,ErrorRangeCalculator:()=>Gn,Extent:()=>Gb,FloatElement:()=>uo,FontLoader:()=>de,FormatService:()=>No,Gauge:()=>Oy,Gradients:()=>no,HashMap:()=>Wt,Highlight:()=>Hc,InstanceObserver:()=>Zt,IntlService:()=>zo,Legend:()=>Mu,LegendItem:()=>Au,LegendLayout:()=>hu,LineChart:()=>bl,LinePoint:()=>Wa,LineSegment:()=>qa,LinearGauge:()=>cv,LinearPointer:()=>Gy,LinearScale:()=>zy,Location:()=>J_,LogarithmicAxis:()=>on,Map:()=>j0,Matrix:()=>De,MousewheelZoom:()=>su,Navigator:()=>py,NavigatorHint:()=>iy,Note:()=>Ro,NumericAxis:()=>Xr,OHLCChart:()=>vc,OHLCPoint:()=>fc,Observable:()=>ii,Pane:()=>fp,Pannable:()=>tu,PieAnimation:()=>od,PieChart:()=>Id,PieChartMixin:()=>Td,PiePlotArea:()=>Rd,PieSegment:()=>Cd,PlotAreaBase:()=>Sp,PlotAreaEventsMixin:()=>Pp,PlotAreaFactory:()=>Iu,Point:()=>A,PointEventsMixin:()=>Ha,PolarAxis:()=>pn,QRCode:()=>F_,RadarCategoryAxis:()=>an,RadarLogarithmicAxis:()=>bn,RadarNumericAxis:()=>mn,RadialGauge:()=>Dv,RadialPointer:()=>Mv,RadialScale:()=>_v,RangeAreaChart:()=>cc,RangeAreaPoint:()=>Jp,RangeBar:()=>Vp,RangeBarChart:()=>Dp,RangePointer:()=>qv,Ring:()=>Fi,RootElement:()=>ho,Sankey:()=>bw,ScatterChart:()=>Vh,ScatterErrorBar:()=>Bh,ScatterLineChart:()=>hd,Sector:()=>Ui,Selection:()=>Fu,SeriesAggregator:()=>Op,SeriesBinder:()=>Dn,ShapeBuilder:()=>Xi,ShapeElement:()=>oo,SharedTooltip:()=>Xu,Sparkline:()=>Zg,SplineAreaSegment:()=>Ol,SplineSegment:()=>rl,StackWrap:()=>uh,StockChart:()=>dy,TemplateService:()=>Vt,Text:()=>vo,TextBox:()=>So,Title:()=>Mo,Tooltip:()=>Uu,UserEvents:()=>Ii,WaterfallChart:()=>Mc,WaterfallSegment:()=>_c,XYPlotArea:()=>gd,ZoomSelection:()=>ou,addClass:()=>vt,alignPathToPixel:()=>_t,anyHasZIndex:()=>ga,append:()=>ee,appendIfNotNull:()=>ya,applyEventMap:()=>Ne,areNumbers:()=>va,autoMajorUnit:()=>Bi,autoTextColor:()=>Me,barcodeValidator:()=>Ox,bindEvents:()=>ie,bindSegments:()=>xa,categoriesCount:()=>_a,chartBaseTheme:()=>mk,chartTheme:()=>Mk,clockwise:()=>bt,constants:()=>F,convertableToNumber:()=>kt,countNumbers:()=>Bn,createHashSet:()=>Ee,createOutOfRangePoints:()=>Ea,createPatternFill:()=>Qi,createSankeyData:()=>ww,cycleDown:()=>St,cycleIndex:()=>Ct,cycleUp:()=>At,deepExtend:()=>O,defaultErrorHandler:()=>Re,defined:()=>k,deg:()=>oe,elementOffset:()=>re,elementScale:()=>Te,elementSize:()=>ne,elementStyles:()=>Bt,equalsIgnoreCase:()=>ba,evalOptions:()=>ka,eventCoordinates:()=>se,eventElement:()=>ae,eventMap:()=>Fe,filterSeriesByType:()=>Aa,find:()=>Ae,findAxisByName:()=>Pn,gaugeTheme:()=>Pk,getAriaTemplate:()=>zt,getField:()=>Vn,getSpacing:()=>w,getSupportedFeatures:()=>qe,getTemplate:()=>jt,getter:()=>Ht,grep:()=>Nt,hasClasses:()=>Ut,hasGradientOverlay:()=>Pa,hasOwnProperty:()=>je,hasValue:()=>Ta,hashKey:()=>le,inArray:()=>u,interpolateValue:()=>Xt,isArray:()=>yt,isDateAxis:()=>Ma,isFunction:()=>Pt,isNumber:()=>m,isObject:()=>Ot,isPlainObject:()=>Qt,isString:()=>wt,keys:()=>Ve,last:()=>he,limitValue:()=>x,logToConsole:()=>M.logToConsole,map:()=>Kt,mousewheelDelta:()=>Jt,noop:()=>Ze,now:()=>Qe,objectKey:()=>pe,off:()=>Ye,on:()=>Xe,parseDateCategory:()=>Ca,qrcodeValidator:()=>H_,rad:()=>ce,rectToBox:()=>mo,removeClass:()=>xt,renderIcon:()=>we,round:()=>L,sankeyTheme:()=>Tk,segmentVisible:()=>ma,setDefaultOptions:()=>e,singleItemOrArray:()=>Oa,sparseArrayLimits:()=>ke,styleValue:()=>Lt,unbindEvents:()=>ue,valueOrDefault:()=>_}),{}),H=(z.r(F),z.d(F,{DEFAULT_PANE:()=>ay,NAVIGATOR_AXIS:()=>sy,NAVIGATOR_PANE:()=>ny}),"arc"),N="ArrowUp",U="ArrowDown",G="ArrowLeft",W="ArrowRight",X="aria-activedescendant",Y="#000",S="bottom",b="center",q="circle",Z=3,Q="cross",K="date",$="12px sans-serif",g=10,J="end",tt=/\{\d+:?/,et="height",it="inside",ot="inherit",C="left",rt=Number.MAX_VALUE,nt=-Number.MAX_VALUE,st="none",at="object",lt="outside",P="right",ht="roundedRect",pt="start",ct="string",T="top",ut="value",a="#fff",dt="width",y="x",v="y",ft="pointer",gt="horizontal";function yt(t){return Array.isArray(t)}function vt(t,e){for(var i=yt(e)?e:[e],o=0;o<i.length;o++){var r=i[o];-1===t.className.indexOf(r)&&(t.className+=" "+r)}}var mt=/\s+/g;function xt(t,e){t&&t.className&&(t.className=t.className.replace(e,"").replace(mt," "))}var M=z(593);function _t(t){var e=.5;t.options.stroke&&M.drawing.util.defined(t.options.stroke.width)&&t.options.stroke.width%2==0&&(e=0);for(var i=0;i<t.segments.length;i++)t.segments[i].anchor().round(0).translate(e,e);return t}function bt(t,e){return-t.x*e.y+t.y*e.x<0}function m(t){return"number"==typeof t&&!isNaN(t)}function wt(t){return typeof t===ct}function kt(t){return m(t)||wt(t)&&isFinite(t)}function At(t,e){return(t+1)%e}function St(t,e){t-=1;return t<0?e-1:t}function Ct(t,e){return 1===e||t%e==0?0:t<0?e+t%e:e<=t?t%e:t}function Pt(t){return"function"==typeof t}var Tt="object",Mt="undefined";function O(t){for(var e=arguments,i=arguments.length,o=1;o<i;o++)!function t(e,i){for(var o in i){var r,n,s;"__proto__"!==o&&"constructor"!==o&&((s=(n=typeof(r=i[o]))===Tt&&null!==r?r.constructor:null)&&s!==Array?r instanceof Date?e[o]=new Date(r.getTime()):Pt(r.clone)?e[o]=r.clone():(s=e[o],e[o]=typeof s===Tt&&s||{},t(e[o],r)):n!==Mt&&(e[o]=r))}}(t,e[o]);return t}function Ot(t){return"object"==typeof t}function Lt(t){return m(t)?t+"px":t}var It=/width|height|top|left|bottom|right/i;function Bt(t,e){var i=wt(e)?[e]:e;if(yt(i)){for(var o={},r=window.getComputedStyle(t),n=0;n<i.length;n++){var s=i[n];o[s]=It.test(s)?parseFloat(r[s]):r[s]}return o}if(Ot(e))for(var a in e)t.style[a]=Lt(e[a])}function w(t,e){void 0===e&&(e=0);var i={top:0,right:0,bottom:0,left:0};return"number"==typeof t?i[T]=i[P]=i[S]=i[C]=t:(i[T]=t[T]||e,i[P]=t[P]||e,i[S]=t[S]||e,i[C]=t[C]||e),i}function Et(){}var Rt={compile:function(t){return t}};Et.register=function(t){Rt=t},Et.compile=function(t,e){return Rt.compile(t,e)};let Vt=Et;function jt(t){var e;return(t=void 0===t?{}:t).template?t.template=e=Vt.compile(t.template):Pt(t.content)&&(e=t.content),e}function zt(t){var e;return(t=void 0===t?{}:t).ariaTemplate?t.ariaTemplate=e=Vt.compile(t.ariaTemplate):Pt(t.ariaContent)&&(e=t.ariaContent),e}var Dt=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g,Ft={};function Ht(t){var r;return Ft[t]||(r=[],t.replace(Dt,function(t,e,i,o){r.push(M.drawing.util.defined(e)?e:i||o)}),Ft[t]=function(t){for(var e=t,i=0;i<r.length&&e;i++)e=e[r[i]];return e}),Ft[t]}function Nt(t,e){for(var i=t.length,o=[],r=0;r<i;r++)e(t[r])&&o.push(t[r]);return o}function Ut(t,e){if(t.className)for(var i=e.split(" "),o=0;o<i.length;o++)if(t.className.indexOf&&-1!==t.className.indexOf(i[o]))return!0}Ft[void 0]=function(t){return t};function Gt(){this._map=new Map}Gt.prototype.get=function(t){return this._map.get(t)},Gt.prototype.set=function(t,e){this._map.set(t,e)};let Wt=Gt;function u(t,e){if(e)return-1!==e.indexOf(t)}function Xt(t,e,i){return M.drawing.util.round(t+(e-t)*i,Z)}function Yt(t,e){this.observer=t,this.handlerMap=O({},this.handlerMap,e)}var qt="trigger";Yt.prototype.trigger=function(t,e){var i,o=this.observer,r=this.handlerMap;return r[t]?i=this.callObserver(r[t],e):o[qt]&&(i=this.callObserver(qt,t,e)),i},Yt.prototype.callObserver=function(t){for(var e=[],i=arguments.length-1;0<i--;)e[i]=arguments[i+1];return this.observer[t].apply(this.observer,e)},Yt.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};let Zt=Yt;function Qt(t){return"[object Object]"===Object.prototype.toString.call(t)}function Kt(t,e){for(var i=t.length,o=[],r=0;r<i;r++){var n=e(t[r]);M.drawing.util.defined(n)&&o.push(n)}return o}var $t=M.support.browser||{};function Jt(t){var e=0;return t.wheelDelta?(e=-t.wheelDelta/120,$t.webkit&&(e/=2*Math.max(window.devicePixelRatio,.625))):t.detail&&(e=t.detail/3),0<e?Math.ceil(e):Math.floor(e)}function te(){}var t=M.drawing.util,ee=t.append,ie=t.bindEvents,k=t.defined,oe=t.deg,re=t.elementOffset,ne=t.elementSize,se=t.eventCoordinates,ae=t.eventElement,le=t.hashKey,he=t.last,x=t.limitValue,pe=t.objectKey,ce=t.rad,L=t.round,ue=t.unbindEvents,_=t.valueOrDefault;te.fetchFonts=function(i,o,r){void 0===r&&(r={depth:0}),!i||5<r.depth||!document.fonts||Object.keys(i).forEach(function(t){var e=i[t];"dataSource"!==t&&"$"!==t[0]&&e&&("font"===t?o.push(e):"object"==typeof e&&(r.depth++,te.fetchFonts(e,o,r),r.depth--))})},te.loadFonts=function(t,e){var i=[];if(0<t.length&&document.fonts){try{i=t.map(function(t){return document.fonts.load(t)})}catch(t){(0,M.logToConsole)(t)}Promise.all(i).then(e,e)}else e()},te.preloadFonts=function(t,e){var i=[];te.fetchFonts(t,i),te.loadFonts(i,e)};let de=te;function e(t,e){t=t.prototype;t.options?t.options=O({},t.options,e):t.options=e}function fe(t,e){this.element=t,this.options=O({},this.options,e),this.wrapper()}var ge,ye="k-i-",ve="k-svg-i-",t=(fe.prototype.wrapper=function(){this.addClasses()},fe.prototype.addClasses=function(){},fe.prototype.html=function(){return this.element.outerHTML},e(fe,{name:"",size:"none",themeColor:"none",flip:"default",iconClass:"",stylingOptions:["size","themeColor","fill"]}),(ge=fe)&&(me.__proto__=ge),((me.prototype=Object.create(ge&&ge.prototype)).constructor=me).prototype.wrapper=function(){var t=this.element.className.split(" ").find(function(t){return t.startsWith(ye)}),e=this.options.icon?(this.options.icon.startsWith(ye)?"":ye)+this.options.icon:"";this._className=e,vt(this.element,"k-icon"),vt(this.element,"k-font-icon"),xt(this.element,t),vt(this.element,e),vt(this.element,this.options.iconClass||""),ge.prototype.wrapper.call(this)},me);function me(t,e){ge.call(this,t,e)}e(t,{name:"HTMLFontIcon",icon:null});(xe=fe)&&(_e.__proto__=xe),((_e.prototype=Object.create(xe&&xe.prototype)).constructor=_e).prototype.wrapper=function(){var t=this.options.icon,e=this.options.iconClass,i=this.element.className.split(" ").find(function(t){return t.startsWith(ve)}),o=(!t&&e&&(o=e.match(/k-i-(\w+(?:-\w+)*)/))&&(t=o[1],e=e.replace(o[0],"")),wt(t)&&(t=t.replace("k-i-","").replace(/-./g,function(t){return t[1].toUpperCase()}),t=this.options.svgIcons[t]||this.options.svgIcons[t+"Icon"]),t&&t.name?ve+t.name:"");this._className=o,vt(this.element,"k-svg-icon"),xt(this.element,i),vt(this.element,o),vt(this.element,e||""),this.element.setAttribute("aria-hidden","true"),t&&Qt(t)&&((i=document.createElementNS("http://www.w3.org/2000/svg","svg")).setAttribute("viewBox",t.viewBox||""),i.setAttribute("focusable","false"),i.innerHTML=t.content||"",this.element.appendChild(i)),xe.prototype.wrapper.call(this)};var xe,i=_e;function _e(t,e){t.innerHTML="",xe.call(this,t,e)}e(i,{name:"HTMLSvgIcon",icon:null,svgIcons:{}});var be={svg:i,font:t};function we(t,e){return t&&(!Ot(t)||t instanceof HTMLElement)&&!wt(t)||(e=t,t=document.createElement("span")),(e=wt(e)?{icon:e}:e).type||(e.type="svg"),be[e.type]?new be[e.type](t,e).html():null}function ke(t){for(var e=rt,i=nt,o=0,r=t.length;o<r;o++){var n=t[o];null!==n&&isFinite(n)&&(e=Math.min(e,n),i=Math.max(i,n))}return{min:e===rt?void 0:e,max:i===nt?void 0:i}}function Ae(t,e){for(var i=0;i<t.length;i++){var o=t[i];if(e(o,i,t))return o}}var Se=M.geometry.Matrix,Ce=/matrix\((.*)\)/;function Pe(t){var t=getComputedStyle(t).transform;return"none"===t||null===(t=t.match(Ce))||2!==t.length?Se.unit():(t=t[1].split(",").map(function(t){return parseFloat(t)}),new(Function.prototype.bind.apply(Se,[null].concat(t))))}function Te(t){if(!t)return Se.unit();for(var e=Pe(t),i=t.parentElement;i;)var o=Pe(i),e=e.multiplyCopy(o),i=i.parentElement;return e.b=e.c=e.e=e.f=0,e}let Me=function(t){return new M.Color(t).isDark()?a:Y};var Oe={},Le=function(t){this._index={},this._values=t?t.slice(0):[];for(var e=0;e<this._values.length;e++)this._index[this._values[e]]=e},i={size:{configurable:!0}},Ie=(Le.prototype.values=function(){return this._values.filter(function(t){return t!==Oe})},Le.prototype.has=function(t){return void 0!==this._index[t]},Le.prototype.add=function(t){this.has(t)||(this._index[t]=this._values.length,this._values.push(t))},Le.prototype.delete=function(t){var e=this._index[t];void 0!==e&&(this._values[e]=Oe,delete this._index[t])},Le.prototype.clear=function(){this._index={},this._values=[]},i.size.get=function(){return this._values.length},Object.defineProperties(Le.prototype,i),function(t){this._set=new Set(t)}),t={size:{configurable:!0}},Be=(Ie.prototype.values=function(){return Array.from(this._set)},Ie.prototype.has=function(t){return this._set.has(t)},Ie.prototype.add=function(t){this._set.add(t)},Ie.prototype.delete=function(t){this._set.delete(t)},Ie.prototype.clear=function(){this._set.clear()},t.size.get=function(){return this._set.size},Object.defineProperties(Ie.prototype,t),function(){var t=!1;return t="function"==typeof Set?new Set([1]).has(1):t});function Ee(t){return new(Be()?Ie:Le)(t)}function Re(t){throw t}let Ve={INSERT:45,DELETE:46,BACKSPACE:8,TAB:9,ENTER:13,ESC:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,END:35,HOME:36,SPACEBAR:32,PAGEUP:33,PAGEDOWN:34,F2:113,F10:121,F12:123,NUMPAD_PLUS:107,NUMPAD_MINUS:109,NUMPAD_DOT:110};function je(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function ze(){this.height=0,this.width=0,this.data=[]}ze.prototype.clone=function(){var t=new ze;return t.height=this.height,t.width=this.width,t.data=this.data.map(function(t){return t.slice()}),t},ze.prototype.get=function(t,e){t=this.data[t];return t?t[e]:null},ze.prototype.set=function(t,e,i){var o=this.data[t];(o=null==o?this.data[t]=[]:o)[e]=i,t>=this.height&&(this.height=t+1),e>=this.width&&(this.width=e+1)},ze.prototype.each=function(t,e){for(var i=0;i<this.height;++i)for(var o=0;o<this.width;++o){var r=this.get(i,o);if((e||null!=r)&&void 0!==(r=t(r,i,o)))return r}},ze.prototype.map=function(o,t){var r=new ze;return this.each(function(t,e,i){r.set(e,i,o(t,e,i))},t),r},ze.prototype.transpose=function(){var o=new ze;return this.each(function(t,e,i){o.set(i,e,t)}),o},ze.prototype.unit=function(t){this.width=this.height=t;for(var e=this.data=new Array(t),i=t;0<=--i;)for(var o=e[i]=new Array(t),r=t;0<=--r;)o[r]=i===r?1:0;return this},ze.prototype.multiply=function(t){for(var e=new ze,i=0;i<this.height;++i)for(var o=0;o<t.width;++o){for(var r=0,n=0;n<this.width;++n){var s=this.get(i,n),a=t.get(n,o);"number"==typeof s&&"number"==typeof a&&(r+=s*a)}e.set(i,o,r)}return e},ze.prototype.inverse=function(){for(var n=this.width,t=this.augment((new ze).unit(n)),s=t.data,e=function(e){var t,i=((t,e,i)=>{for(var o=i(t),r=t,n=t+1;n<e;n++){var s=i(t);o<s&&(o=s,r=t)}return r})(e,n,function(t){return s[t][e]});if(!s[i][e])return{v:null};e!==i&&(t=s[e],s[e]=s[i],s[i]=t);for(var o=e+1;o<n;++o){for(var r=e+1;r<2*n;++r)s[o][r]-=s[e][r]*s[o][e]/s[e][e];s[o][e]=0}},i=0;i<n;++i){var o=e(i);if(o)return o.v}for(var r=0;r<n;++r)for(var a=s[r][r],l=0;l<2*n;++l)s[r][l]/=a;for(var h=n;0<=--h;)for(var p=h;0<=--p;)if(s[p][h])for(var c=2*n;--c>=n;)s[p][c]-=s[h][c]*s[p][h];return t.slice(0,n,n,n)},ze.prototype.augment=function(t){var o=this.clone(),r=o.width;return t.each(function(t,e,i){o.set(e,i+r,t)}),o},ze.prototype.slice=function(t,e,i,o){for(var r=new ze,n=0;n<i;++n)for(var s=0;s<o;++s)r.set(n,s,this.get(t+n,e+s));return r};let De=ze;var Fe={down:"pointerdown",move:"pointermove",up:"pointerup",cancel:"pointercancel pointerleave"};function He(t){return Fe[t]||t}var Ne=function(t){return t.replace(/([^ ]+)/g,He)};function Ue(){for(var t,e="",i=0;i<32;i++)t=16*Math.random()|0,8!==i&&12!==i&&16!==i&&20!==i||(e+="-"),e+=(12===i?4:16===i?3&t|8:t).toString(16);return e}var Ge=new WeakMap,We=Symbol("id");function Xe(t,e,i,o,r){var a,l,h,p;a=t,l=i,h=o,p=r,(yt(t=e)?t:(t||"").split(" ")).forEach(function(t){function e(t){var e=t.target?t.target.closest(n):null;(!n||t.target&&e)&&(e=n?e:t.currentTarget,Object.defineProperty(t,"currentTarget",{value:e}),Object.defineProperty(t,"delegateTarget",{value:i}),s(t))}var i,o,r,n,s;i=a,t=t,r=p,s=h,(o=l)&&Pt(o)&&!h?s=o:o&&"string"==typeof o&&Pt(s)&&(n=o),s[We]||(s[We]=Ue()),(o=Ge.get(i))||(o=new Map,Ge.set(i,o)),o.set(t+s[We],e),i.addEventListener(t,e,Boolean(r))})}function Ye(t,e,i,o,r){var s,a,l;s=t,a=i,l=o,(yt(t=e)?t:(t||"").split(" ")).forEach(function(t){var e,i,o,r,n;e=s,t=t,i=a,o=l,(n=Ge.get(e))&&i&&i[We]&&(i=t+i[We],r=n.get(i),n.delete(i),r)&&e.removeEventListener(t,r,Boolean(o))})}function qe(){var t=(t=>{var e,i=!1,o={wp:/(Windows Phone(?: OS)?)\s(\d+)\.(\d+(\.\d+)?)/,fire:/(Silk)\/(\d+)\.(\d+(\.\d+)?)/,android:/(Android|Android.*(?:Opera|Firefox).*?\/)\s*(\d+)\.?(\d+(\.\d+)?)?/,iphone:/(iPhone|iPod).*OS\s+(\d+)[\._]([\d\._]+)/,ipad:/(iPad).*OS\s+(\d+)[\._]([\d_]+)/,playbook:/(PlayBook).*?Tablet\s*OS\s*(\d+)\.(\d+(\.\d+)?)/,windows:/(MSIE)\s+(\d+)\.(\d+(\.\d+)?)/,tizen:/(tizen).*?Version\/(\d+)\.(\d+(\.\d+)?)/i,sailfish:/(sailfish).*rv:(\d+)\.(\d+(\.\d+)?).*firefox/i},r={ios:/^i(phone|pad|pod)$/i,android:/^android|fire$/i,windows:/windows/,wp:/wp/,flat:/sailfish|ffos|tizen/i};for(e in o)if(t.match(o[e])){if("windows"===e&&"plugins"in navigator)return!1;(i={}).device=e,i.name=((t,e,i)=>{for(var o in e)if(e[o].test(t))return o;return void 0!==i?i:t})(e,r),i[i.name]=!0;break}return i})(navigator.userAgent),e={};return e.mobileOS=t,e}function Ze(){}function Qe(){return(new Date).getTime()}function Ke(){this._defaultPrevented=!0}function $e(){return!0===this._defaultPrevented}var Je,ti="function";function ei(){Je.call(this),this._events={}}(Je=M.Class)&&(ei.__proto__=Je),((ei.prototype=Object.create(Je&&Je.prototype)).constructor=ei).prototype.destroy=function(){this.unbind()},ei.prototype.bind=function(t,e,i){var o,r,n=this,s="string"==typeof t?[t]:t||[],a=typeof e==ti;if(void 0===e)for(l in t)n.bind(l,t[l]);else for(var l=0,h=s.length;l<h;l++)(()=>{var t=s[l];(r=a?e:e[t])&&(i&&(o=r,(r=function(){n.unbind(t,r),o.apply(n,arguments)}).original=o),(n._events[t]=n._events[t]||[]).push(r))})();return n},ei.prototype.one=function(t,e){return this.bind(t,e,!0)},ei.prototype.first=function(t,e){for(var i,o="string"==typeof t?[t]:t,r=typeof e==ti,n=0,s=o.length;n<s;n++){var a=o[n];(i=r?e:e[a])&&(this._events[a]=this._events[a]||[]).unshift(i)}return this},ei.prototype.trigger=function(t,e){var i,o,r=this._events[t];if(r){var n=e||{};for(n.sender=this,n._defaultPrevented=!1,n.preventDefault=Ke,n.isDefaultPrevented=$e,i=0,o=(r=r.slice()).length;i<o;i++)r[i].call(this,n);return!0===n._defaultPrevented}return!1},ei.prototype.unbind=function(t,e){var i,o=this._events[t];if(void 0===t)this._events={};else if(o)if(e)for(i=o.length-1;0<=i;i--)o[i]!==e&&o[i].original!==e||o.splice(i,1);else this._events[t]=[];return this},ei.prototype._setEvents=function(t){for(var e=(this.events||[]).length,i=0;i<e;i++){var o=this.events[i];this.options[o]&&t[o]&&(this.unbind(o,this.options[o]),this._events)&&this._events[o]&&delete this._events[o]}this.bind(this.events,t)};let ii=ei;function oi(t){t.preventDefault()}var ri=Object.assign,ni=800,si=0,ai="move",li="tap",hi="doubleTap",pi="release",ci="gesturechange",ui="gestureend",di="gesturetap",fi={api:0,touch:0,mouse:9,pointer:9};function gi(t){var e=[],i=t.originalEvent||t;return e.push(t.api?{id:2,event:t,target:t.target,currentTarget:t.target,location:t,type:"api"}:{location:i,event:t,target:t.target,currentTarget:t.currentTarget,id:i.pointerId,type:"pointer"}),e}(vi=M.Class)&&(bi.__proto__=vi),((bi.prototype=Object.create(vi&&vi.prototype)).constructor=bi).prototype.move=function(t){var e=this,i=t["page"+e.axis],o=Qe(),r=o-e.timeStamp||1;!i&&this.invalidZeroEvents||(e.delta=i-e.location,e._updateLocationData(t),e.initialDelta=i-e.startLocation,e.velocity=e.delta/r,e.timeStamp=o)},bi.prototype._updateLocationData=function(t){var e=this.axis;this.location=t["page"+e],this.client=t["client"+e],this.screen=t["screen"+e]};var yi,vi,mi=bi,xi=((yi=M.Class)&&(_i.__proto__=yi),((_i.prototype=Object.create(yi&&yi.prototype)).constructor=_i).prototype.press=function(){var t=this;this._holdTimeout=setTimeout(function(){return t._hold()},this.userEvents.minHold),this._trigger("press",this.pressEvent)},_i.prototype._tap=function(t){var e=this;e.userEvents._clicks++,1===e.userEvents._clicks&&(e._clickTimeout=setTimeout(function(){1===e.userEvents._clicks?e._trigger(li,t):e._trigger(hi,t),e.userEvents._clicks=0},300))},_i.prototype._hold=function(){this._trigger("hold",this.pressEvent)},_i.prototype.move=function(t){var e=this,i="api"!==t.type&&e.userEvents._shouldNotMove;if(!e._finished&&!i){if(e.x.move(t.location),e.y.move(t.location),!e._moved){if(e._withinIgnoreThreshold())return;if(Oi.current&&Oi.current!==e.userEvents)return e.dispose();e._start(t)}e._finished||e._trigger(ai,t)}},_i.prototype.end=function(t){this.endTime=Qe(),this._finished||(this._finished=!0,this._trigger(pi,t),this._moved?this._trigger("end",t):this.supportDoubleTap?this._tap(t):this._trigger(li,t),clearTimeout(this._holdTimeout),this.dispose())},_i.prototype.dispose=function(){var t=this.userEvents.touches||[],e=(this._finished=!0,this.pressEvent=null,clearTimeout(this._holdTimeout),t.indexOf(this));t.splice(e,1)},_i.prototype.skip=function(){this.dispose()},_i.prototype.cancel=function(){this.dispose()},_i.prototype.isMoved=function(){return this._moved},_i.prototype._start=function(t){clearTimeout(this._holdTimeout),this.startTime=Qe(),this._moved=!0,this._trigger("start",t)},_i.prototype._trigger=function(t,e){var e=e.event,i={touch:this,x:this.x,y:this.y,target:this.target,event:e};this.userEvents.notify(t,i)&&e.preventDefault()},_i.prototype._withinIgnoreThreshold=function(){var t=this.x.initialDelta,e=this.y.initialDelta;return Math.sqrt(t*t+e*e)<=this.threshold},_i);function _i(t,e,i){yi.call(this),ri(this,{x:new mi("X",i.location),y:new mi("Y",i.location),type:i.type,threshold:t.threshold||fi[i.type],userEvents:t,target:e,currentTarget:i.currentTarget,initialTouch:i.target,id:i.id,pressEvent:i,_clicks:t._clicks,supportDoubleTap:t.supportDoubleTap,_moved:!1,_finished:!1})}function bi(t,e){vi.call(this);var i=this;i.support=qe(),i.invalidZeroEvents=this.support.mobileOS&&this.support.mobileOS.android,i.axis=t,i._updateLocationData(e),i.startLocation=i.location,i.velocity=i.delta=0,i.timeStamp=Qe()}function wi(t){for(var e=Fe.up.split(" "),i=0,o=e.length;i<o;i++)t(e[i])}(ki=ii)&&(Li.__proto__=ki),((Li.prototype=Object.create(ki&&ki.prototype)).constructor=Li).prototype.preventIfMoving=function(t){this._isMoved()&&t.preventDefault()},Li.prototype.destroy=function(){var e,i=this,t=this.options,o=this.element;i._destroyed||(i._destroyed=!0,i.captureUpIfMoved&&(e=i.surface,wi(function(t){e.removeEventListener(t,i._preventIfMovingProxy,!0)})),Ye(i.surface,Ne("move"),this._surfaceMoveHandler),Ye(i.surface,Ne("up cancel"),this._surfaceEndHandler),Ye(o,Ne("down"),this._elementStartHandler),t.preventDragEvent&&Ye(o,Ne("dragstart"),this._elementDragStartHandler),Ye(o,Ne("mousedown"),this._elementSelectHandler),i._disposeAll(),i.unbind(),delete i.surface,delete i.element,delete i.currentTarget)},Li.prototype.capture=function(){Li.current=this},Li.prototype.cancel=function(){this._disposeAll(),this.trigger("cancel")},Li.prototype.notify=function(t,e){var i,o,r,n,s=this.touches,a=t;if(this._isMultiTouch()){switch(a){case ai:a=ci;break;case"end":a=ui;break;case li:a=di}ri(e,{touches:s},(t=s[0],s=s[1],i=t.x.location,t=t.y.location,r=i-(o=s.x.location),n=t-(s=s.y.location),{center:{x:(i+o)/2,y:(t+s)/2},distance:Math.sqrt(r*r+n*n)}))}return this.trigger(a,ri(e,{type:a}))},Li.prototype.press=function(t,e,i){this._apiCall("_start",t,e,i)},Li.prototype.move=function(t,e){this._apiCall("_move",t,e)},Li.prototype.end=function(t,e){this._apiCall("_end",t,e)},Li.prototype._isMultiTouch=function(){return 1<this.touches.length},Li.prototype._maxTouchesReached=function(){return this.touches.length>=this._maxTouches},Li.prototype._disposeAll=function(){for(var t=this.touches;0<t.length;)t.pop().dispose()},Li.prototype._isMoved=function(){return Nt(this.touches,function(t){return t.isMoved()}).length},Li.prototype._select=function(t){this.allowSelection&&!this.trigger("select",{event:t})||t.preventDefault()},Li.prototype._start=function(t){if(!(t.which&&1<t.which||this._maxTouchesReached())){Li.current=null,this.currentTarget=t.currentTarget,this.stopPropagation&&t.stopPropagation();for(var e=gi(t),i=0;i<e.length&&!this._maxTouchesReached();i++){var o,r=e[i];(o=this.filter?r.currentTarget:this.element)&&0===o.length||(o=new xi(this,o,r),this.touches.push(o),o.press(),this._isMultiTouch()&&this.notify("gesturestart",{}))}}},Li.prototype._move=function(t){this._eachTouch("move",t)},Li.prototype._end=function(t){this._eachTouch("end",t)},Li.prototype._eachTouch=function(t,e){for(var i,o,r,n={},s=gi(e),a=this.touches,l=0;l<a.length;l++)n[(i=a[l]).id]=i;for(l=0;l<s.length;l++)(r=n[(o=s[l]).id])&&("move"!==t||"pointer"!==o.type||this.surface.hasPointerCapture(o.id)||this.surface.setPointerCapture(o.id),r[t](o))},Li.prototype._apiCall=function(t,e,i,o){this[t]({api:!0,pageX:e,pageY:i,clientX:e,clientY:i,target:o||this.element,stopPropagation:Ze,preventDefault:Ze})},Li.defaultThreshold=function(t){si=t},Li.minHold=function(t){ni=t};var ki,Ai,Si,Ci,Pi,Ti,Mi,Oi=Li;function Li(t,e){ki.call(this);var i,o=this,r=qe();this.support=r,this.options=e=e||{},r=o.filter=e.filter,o.threshold=e.threshold||si,o.minHold=e.minHold||ni,o.touches=[],o._maxTouches=e.multiTouch?2:1,o.allowSelection=e.allowSelection,o.captureUpIfMoved=e.captureUpIfMoved,o._clicks=0,o.supportDoubleTap=e.supportDoubleTap,ri(o,{element:t,surface:e.surface||t,stopPropagation:e.stopPropagation,pressed:!1}),this._surfaceMoveHandler=this._move.bind(this),Xe(o.surface,Ne("move"),this._surfaceMoveHandler),this._surfaceEndHandler=this._end.bind(this),Xe(o.surface,Ne("up cancel"),this._surfaceEndHandler),this._elementStartHandler=this._start.bind(this),Xe(t,Ne("down"),r,this._elementStartHandler),t.style["touch-action"]=e.touchAction||"none",e.preventDragEvent&&(this._elementDragStartHandler=oi,Xe(t,Ne("dragstart"),this._elementDragStartHandler)),this._elementSelectHandler=this._select.bind(this),Xe(t,Ne("mousedown"),r,this._elementSelectHandler),o.captureUpIfMoved&&(i=o.surface,o._preventIfMovingProxy=o.preventIfMoving.bind(o),wi(function(t){i.addEventListener(t,o._preventIfMovingProxy,!0)})),o.bind(["press","hold",li,hi,"start",ai,"end",pi,"cancel","gesturestart",ci,ui,di,"select"],e)}let Ii=Oi;function Bi(t,e){t=L(e-t,g-1);if(0===t){if(0===e)return.1;t=Math.abs(e)}e=Math.pow(10,Math.floor(Math.log(t)/Math.log(10))),t=L(t/e,g);return L(e*(t<1.904762?.2:t<4.761904?.5:t<9.523809?1:2),g)}(Ai=M.Class)&&(Ei.__proto__=Ai),((Ei.prototype=Object.create(Ai&&Ai.prototype)).constructor=Ei).prototype.clone=function(){return new Ei(this.x,this.y)},Ei.prototype.equals=function(t){return t&&this.x===t.x&&this.y===t.y},Ei.prototype.rotate=function(t,e){var e=ce(e),i=Math.cos(e),e=Math.sin(e),o=t.x,t=t.y,r=this.x,n=this.y;return this.x=L(o+(r-o)*i+(n-t)*e,Z),this.y=L(t+(n-t)*i-(r-o)*e,Z),this},Ei.prototype.multiply=function(t){return this.x*=t,this.y*=t,this},Ei.prototype.distanceTo=function(t){var e=this.x-t.x,t=this.y-t.y;return Math.sqrt(e*e+t*t)},Ei.onCircle=function(t,e,i){e=ce(e);return new Ei(t.x-i*Math.cos(e),t.y-i*Math.sin(e))};let A=Ei;function Ei(t,e){Ai.call(this),this.x=t||0,this.y=e||0}function Ri(t,e,i,o){Si.call(this),this.x1=t||0,this.y1=e||0,this.x2=i||0,this.y2=o||0}function Vi(t,e,i,o,r){r=ce(r);return new A(i+(t-i)*Math.cos(r)+(e-o)*Math.sin(r),o-(t-i)*Math.sin(r)+(e-o)*Math.cos(r))}(Si=M.Class)&&(Ri.__proto__=Si),((Ri.prototype=Object.create(Si&&Si.prototype)).constructor=Ri).prototype.equals=function(t){return this.x1===t.x1&&this.x2===t.x2&&this.y1===t.y1&&this.y2===t.y2},Ri.prototype.width=function(){return this.x2-this.x1},Ri.prototype.height=function(){return this.y2-this.y1},Ri.prototype.translate=function(t,e){return this.x1+=t,this.x2+=t,this.y1+=e,this.y2+=e,this},Ri.prototype.move=function(t,e){var i=this.height(),o=this.width();return k(t)&&(this.x1=t,this.x2=this.x1+o),k(e)&&(this.y1=e,this.y2=this.y1+i),this},Ri.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},Ri.prototype.wrapPoint=function(t){var e=yt(t),i=e?t[0]:t.x,e=e?t[1]:t.y;return this.wrap(new Ri(i,e,i,e)),this},Ri.prototype.snapTo=function(t,e){return e!==y&&e||(this.x1=t.x1,this.x2=t.x2),e!==v&&e||(this.y1=t.y1,this.y2=t.y2),this},Ri.prototype.alignTo=function(t,e){var i,o,r=this.height(),n=this.width(),s=e===T||e===S?v:y,a=s==v?r:n;return e===b?(i=t.center(),o=this.center(),this.x1+=i.x-o.x,this.y1+=i.y-o.y):this[s+1]=e===T||e===C?t[s+1]-a:t[s+2],this.x2=this.x1+n,this.y2=this.y1+r,this},Ri.prototype.shrink=function(t,e){return this.x2-=t,this.y2-=e,this},Ri.prototype.expand=function(t,e){return this.shrink(-t,-e),this},Ri.prototype.pad=function(t){t=w(t);return this.x1-=t.left,this.x2+=t.right,this.y1-=t.top,this.y2+=t.bottom,this},Ri.prototype.unpad=function(t){t=w(t);return t.left=-t.left,t.top=-t.top,t.right=-t.right,t.bottom=-t.bottom,this.pad(t)},Ri.prototype.clone=function(){return new Ri(this.x1,this.y1,this.x2,this.y2)},Ri.prototype.center=function(){return new A(this.x1+this.width()/2,this.y1+this.height()/2)},Ri.prototype.containsPoint=function(t){return t.x>=this.x1&&t.x<=this.x2&&t.y>=this.y1&&t.y<=this.y2},Ri.prototype.points=function(){return[new A(this.x1,this.y1),new A(this.x2,this.y1),new A(this.x2,this.y2),new A(this.x1,this.y2)]},Ri.prototype.getHash=function(){return[this.x1,this.y1,this.x2,this.y2].join(",")},Ri.prototype.overlaps=function(t){return!(t.y2<this.y1||this.y2<t.y1||t.x2<this.x1||this.x2<t.x1)},Ri.prototype.rotate=function(t){var e=this.width(),i=this.height(),o=this.center(),r=o.x,o=o.y,n=Vi(0,0,r,o,t),s=Vi(e,0,r,o,t),a=Vi(e,i,r,o,t),r=Vi(0,i,r,o,t),e=Math.max(n.x,s.x,a.x,r.x)-Math.min(n.x,s.x,a.x,r.x),i=Math.max(n.y,s.y,a.y,r.y)-Math.min(n.y,s.y,a.y,r.y);return this.x2=this.x1+e,this.y2=this.y1+i,this},Ri.prototype.toRect=function(){return new M.geometry.Rect([this.x1,this.y1],[this.width(),this.height()])},Ri.prototype.hasSize=function(){return 0!==this.width()&&0!==this.height()},Ri.prototype.align=function(t,e,i){var o=e+1,r=e+2,e=e===y?dt:et,n=this[e]();u(i,[C,T])?(this[o]=t[o],this[r]=this[o]+n):u(i,[P,S])?(this[r]=t[r],this[o]=this[r]-n):i===b&&(this[o]=t[o]+(t[e]()-n)/2,this[r]=this[o]+n)};let I=Ri,ji=((Ci=M.Class)&&(zi.__proto__=Ci),((zi.prototype=Object.create(Ci&&Ci.prototype)).constructor=zi).prototype.clone=function(){return new zi(this.center,this.innerRadius,this.radius,this.startAngle,this.angle)},zi.prototype.middle=function(){return this.startAngle+this.angle/2},zi.prototype.setRadius=function(t,e){return e?this.innerRadius=t:this.radius=t,this},zi.prototype.point=function(t,e){var t=ce(t),i=Math.cos(t),t=Math.sin(t),e=e?this.innerRadius:this.radius,i=L(this.center.x-i*e,Z),t=L(this.center.y-t*e,Z);return new A(i,t)},zi.prototype.adjacentBox=function(t,e,i){var t=this.clone().expand(t),o=t.middle(),t=t.point(o),r=e/2,n=i/2,s=Math.sin(ce(o)),o=Math.cos(ce(o)),a=t.x-r,t=t.y-n;return Math.abs(s)<.9&&(a+=r*-o/Math.abs(o)),Math.abs(o)<.9&&(t+=n*-s/Math.abs(s)),new I(a,t,a+e,t+i)},zi.prototype.containsPoint=function(t){var e=this.center,i=this.innerRadius,o=this.radius,r=this.startAngle,n=this.startAngle+this.angle,s=t.x-e.x,t=t.y-e.y,a=new A(s,t),r=this.point(r),r=new A(r.x-e.x,r.y-e.y),n=this.point(n),n=new A(n.x-e.x,n.y-e.y),e=L(s*s+t*t,Z);return(r.equals(a)||bt(r,a))&&!bt(n,a)&&i*i<=e&&e<=o*o},zi.prototype.getBBox=function(){for(var t=new I(rt,rt,nt,nt),e=L(this.startAngle%360),i=L((e+this.angle)%360),o=this.innerRadius,r=[0,90,180,270,e,i].sort(Di),n=r.indexOf(e),s=r.indexOf(i),a=e===i?r:n<s?r.slice(n,s+1):[].concat(r.slice(0,s+1),r.slice(n,r.length)),l=0;l<a.length;l++){var h=this.point(a[l]);t.wrapPoint(h),t.wrapPoint(h,o)}return o||t.wrapPoint(this.center),t},zi.prototype.expand=function(t){return this.radius+=t,this},zi);function zi(t,e,i,o,r){Ci.call(this),this.center=t,this.innerRadius=e,this.radius=i,this.startAngle=o,this.angle=r}function Di(t,e){return t-e}let Fi=ji,Hi=((Pi=Fi)&&(Ni.__proto__=Pi),((Ni.prototype=Object.create(Pi&&Pi.prototype)).constructor=Ni).prototype.expand=function(t){return Pi.prototype.expand.call(this,t)},Ni.prototype.clone=function(){return new Ni(this.center,this.radius,this.startAngle,this.angle)},Ni.prototype.setRadius=function(t){return this.radius=t,this},Ni);function Ni(t,e,i,o){Pi.call(this,t,0,e,i,o)}let Ui=Hi,Gi=((Ti=M.Class)&&(Wi.__proto__=Ti),((Wi.prototype=Object.create(Ti&&Ti.prototype)).constructor=Wi).prototype.createRing=function(t,e){var i=t.startAngle+180,o=t.angle+i,r=((0===t.angle||0<t.angle&&i===o)&&(o+=.001),new M.geometry.Point(t.center.x,t.center.y)),n=Math.max(t.radius,0),t=Math.max(t.innerRadius,0),n=new M.geometry.Arc(r,{startAngle:i,endAngle:o,radiusX:n,radiusY:n}),e=M.drawing.Path.fromArc(n,e).close();return t?(n.radiusX=n.radiusY=t,n=n.pointAt(o),e.lineTo(n.x,n.y),e.arc(o,i,t,t,!0)):e.lineTo(r.x,r.y),e},Wi);function Wi(){Ti.apply(this,arguments)}Gi.current=new Gi;let Xi=Gi,Yi=((Mi=M.Class)&&(qi.__proto__=Mi),((qi.prototype=Object.create(Mi&&Mi.prototype)).constructor=qi).prototype.initUserOptions=function(t){return t},qi.prototype.reflow=function(t){for(var e,i=this.children,o=0;o<i.length;o++){var r=i[o];r.reflow(t),e=e?e.wrap(r.box):r.box.clone()}this.box=e||t},qi.prototype.destroy=function(){var t=this.children;this.animation&&this.animation.destroy();for(var e=0;e<t.length;e++)t[e].destroy()},qi.prototype.getRoot=function(){var t=this.parent;return t?t.getRoot():null},qi.prototype.getSender=function(){var t=this.getService();if(t)return t.sender},qi.prototype.getService=function(){for(var t=this;t;){if(t.chartService)return t.chartService;t=t.parent}},qi.prototype.translateChildren=function(t,e){for(var i=this.children,o=i.length,r=0;r<o;r++)i[r].box.translate(t,e)},qi.prototype.append=function(){for(var t=arguments,e=0;e<arguments.length;e++){var i=t[e];this.children.push(i),i.parent=this}},qi.prototype.renderVisual=function(){!1!==this.options.visible&&(this.createVisual(),this.addVisual(),this.renderChildren(),this.createAnimation(),this.renderComplete())},qi.prototype.addVisual=function(){this.visual&&(this.visual.chartElement=this).parent&&this.parent.appendVisual(this.visual)},qi.prototype.renderChildren=function(){for(var t=this.children,e=t.length,i=0;i<e;i++)t[i].renderVisual()},qi.prototype.createVisual=function(){this.visual=new M.drawing.Group({zIndex:this.options.zIndex,visible:_(this.options.visible,!0)})},qi.prototype.createAnimation=function(){this.visual&&this.options.animation&&(this.animation=M.drawing.Animation.create(this.visual,this.options.animation))},qi.prototype.appendVisual=function(t){t.chartElement||(t.chartElement=this),t.options.noclip?this.clipRoot().visual.append(t):k(t.options.zIndex)?this.stackRoot().stackVisual(t):this.isStackRoot?this.stackVisual(t):this.visual?this.visual.append(t):this.parent.appendVisual(t)},qi.prototype.clipRoot=function(){return this.parent?this.parent.clipRoot():this},qi.prototype.stackRoot=function(){return this.parent?this.parent.stackRoot():this},qi.prototype.stackVisual=function(t){for(var e=t.options.zIndex||0,i=this.visual.children,o=i.length,r=0;r<o;r++){var n=i[r];if(_(n.options.zIndex,0)>e)break}this.visual.insert(r,t)},qi.prototype.traverse=function(t){for(var e=this.children,i=e.length,o=0;o<i;o++){var r=e[o];t(r),r.traverse&&r.traverse(t)}},qi.prototype.closest=function(t){for(var e=this,i=!1;e&&!i;)(i=t(e))||(e=e.parent);if(i)return e},qi.prototype.renderComplete=function(){},qi.prototype.hasHighlight=function(){var t=(this.options||{}).highlight;return!(!this.createHighlight||t&&!1===t.visible||!1===this.visible)},qi.prototype.toggleHighlight=function(t,e){var i=this,o=(this.options||{}).highlight||{},r=o.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 i.createHighlight(s)},sender:this.getSender(),series:this.series,dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,runningTotal:this.runningTotal,total:this.total}))))return}else n=this._highlight=this.createHighlight(s);k(n.options.zIndex)||(n.options.zIndex=_(o.zIndex,this.options.zIndex)),this.appendVisual(n)}n.visible(t)},qi.prototype.toggleFocusHighlight=function(t){var e,i=(this.options||{}).focusHighlight||{},o=this._focusHighlight;(t||o)&&(o||(e=this.getRoot().options.background,e=Me(e),e={fill:{opacity:i.opacity,color:i.color},stroke:Object.assign({},{color:e},i.border),zIndex:i.zIndex},o=this._focusHighlight=this.createFocusHighlight(e),this.appendVisual(o)),o.visible(t))},qi.prototype.createGradientOverlay=function(t,e,i){i=new M.drawing.Path(Object.assign({stroke:{color:"none"},fill:this.createGradient(i),closed:t.options.closed},e));return i.segments.elements(t.segments.elements()),i},qi.prototype.createGradient=function(t){if(this.parent)return this.parent.createGradient(t)},qi.prototype.supportsPointInactiveOpacity=function(){return!0},qi);function qi(t){Mi.call(this),this.children=[],this.options=O({},this.options,this.initUserOptions(t))}Yi.prototype.options={};let o=Yi;var Zi={dots:M.drawing.dotsPattern,verticalStripes:M.drawing.verticalStripesPattern,crosshatch:M.drawing.crosshatchPattern,diagonalStripes:M.drawing.diagonalStripesPattern,grid:M.drawing.gridPattern};function Qi(t,e,i){i=Pt(t=t)?t(i):t,t=i&&Zi[i.type];return t?t(Object.assign({},e,i)):e}(Ki=o)&&($i.__proto__=Ki),(($i.prototype=Object.create(Ki&&Ki.prototype)).constructor=$i).prototype.reflow=function(t){function e(){o.align(t,y,r.align),o.align(t,v,r.vAlign),o.paddingBox=i.clone().unpad(h).unpad(c)}var i,o=this,r=this.options,n=r.width,s=r.height,a=r.shrinkToFit,l=n&&s,h=r.margin,p=r.padding,c=r.border.width,u=t.clone();l&&(u.x2=u.x1+n,u.y2=u.y1+s),a&&u.unpad(h).unpad(c).unpad(p),Ki.prototype.reflow.call(this,u),i=l?this.box=new I(0,0,n,s):this.box,a&&l?(e(),u=this.contentBox=this.paddingBox.clone().unpad(p)):(u=this.contentBox=i.clone(),i.pad(p).pad(c).pad(h),e()),this.translateChildren(i.x1-u.x1+h.left+c+p.left,i.y1-u.y1+h.top+c+p.top);for(var d=this.children,f=0;f<d.length;f++){var g=d[f];g.reflow(g.box)}},$i.prototype.align=function(t,e,i){this.box.align(t,e,i)},$i.prototype.hasBox=function(){var t=this.options;return t.border.width||t.background},$i.prototype.createVisual=function(){Ki.prototype.createVisual.call(this),this.options.visible&&this.hasBox()&&this.visual.append(M.drawing.Path.fromRect(this.paddingBox.toRect(),this.visualStyle()))},$i.prototype.visualStyle=function(){var t=this.options,e=t.border||{};return{stroke:{width:e.width,color:e.color,opacity:_(e.opacity,t.opacity),dashType:e.dashType},fill:Qi(t.pattern,{color:t.background,opacity:t.opacity},void 0),cursor:t.cursor}};var Ki,i=$i;function $i(t){Ki.call(this,t),this.options.margin=w(this.options.margin),this.options.padding=w(this.options.padding)}e(i,{align:C,vAlign:T,margin:{},padding:{},border:{color:Y,width:0},background:"",shrinkToFit:!1,width:0,height:0,visible:!0});let Ji=i;function to(t,e){e&&(t.options.className=e.className,t.options.role=e.role,t.options.ariaLabel=e.ariaLabel,t.options.ariaRoleDescription=e.ariaRoleDescription,t.options.ariaChecked=e.ariaChecked)}(eo=Ji)&&(io.__proto__=eo),((io.prototype=Object.create(eo&&eo.prototype)).constructor=io).prototype.getElement=function(){var t,e,i=this.options,o=this.paddingBox,r=i.type,n=i.rotation,s=o.center(),a=o.width()/2,l=o.height()/2;return i.visible&&this.hasBox()?(e=this.visualStyle(),r===q?t=new M.drawing.Circle(new M.geometry.Circle([L(o.x1+a,Z),L(o.y1+l,Z)],Math.min(a,l)),e):"triangle"===r?t=M.drawing.Path.fromPoints([[o.x1+a,o.y1],[o.x1,o.y2],[o.x2,o.y2]],e).close():r===Q?((t=new M.drawing.MultiPath(e)).moveTo(o.x1,o.y1).lineTo(o.x2,o.y2),t.moveTo(o.x1,o.y2).lineTo(o.x2,o.y1)):(l=o.toRect(),r===ht&&(a=_(i.borderRadius,l.width()/5),l.setCornerRadius(a)),t=M.drawing.Path.fromRect(l,e)),n&&t.transform(M.geometry.transform().rotate(-n,[s.x,s.y])),t.options.zIndex=i.zIndex,t):null},io.prototype.createElement=function(){var t=this,e=this.options.visual,i=this.pointData||{};return e?e({value:i.value,dataItem:i.dataItem,sender:this.getSender(),series:i.series,category:i.category,rect:this.paddingBox.toRect(),options:this.visualOptions(),createVisual:function(){return t.getElement()}}):this.getElement()},io.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}},io.prototype.createVisual=function(){this.visual=this.createElement(),to(this.visual,this.options.accessibilityOptions)};var eo,t=io;function io(t,e){eo.call(this,t),this.pointData=e}e(t,{type:q,align:b,vAlign:b});let oo=t,ro="radial",no={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:ro,stops:[{offset:0,color:a,opacity:.55},{offset:.65,color:a,opacity:0},{offset:.95,color:a,opacity:.25}]},roundedBevel:{type:ro,stops:[{offset:.33,color:a,opacity:.06},{offset:.83,color:a,opacity:.2},{offset:.95,color:a,opacity:0}]},roundedGlass:{type:ro,supportVML:!1,stops:[{offset:0,color:a,opacity:0},{offset:.5,color:a,opacity:.3},{offset:.99,color:a,opacity:0}]},sharpGlass:{type:ro,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:ro,center:[.5,.5],radius:.5}};(so=o)&&(lo.__proto__=so),((lo.prototype=Object.create(so&&so.prototype)).constructor=lo).prototype.reflow=function(){var t=this.options,e=this.children,i=new I(0,0,t.width,t.height);this.box=i.unpad(t.margin);for(var o,r,n,s,a,l,h,p,c,u,d,f=0;f<e.length;f++)e[f].reflow(i),o=i,r=e[f].box,d=u=c=p=h=l=a=s=n=void 0,i=(o.x1===r.x1&&o.y1===r.y1&&o.x2===r.x2&&o.y2===r.y2?r:(n=Math.min(o.x1,r.x1),s=Math.max(o.x1,r.x1),a=Math.min(o.x2,r.x2),l=Math.max(o.x2,r.x2),h=Math.min(o.y1,r.y1),p=Math.max(o.y1,r.y1),c=Math.min(o.y2,r.y2),u=Math.max(o.y2,r.y2),(d=[])[0]=new I(s,h,a,p),d[1]=new I(n,p,s,c),d[2]=new I(a,p,l,c),d[3]=new I(s,c,a,u),o.x1===n&&o.y1===h||r.x1===n&&r.y1===h?(d[4]=new I(n,h,s,p),d[5]=new I(a,c,l,u)):(d[4]=new I(a,h,l,p),d[5]=new I(n,c,s,u)),Nt(d,function(t){return 0<t.height()&&0<t.width()})[0]))||new I},lo.prototype.createVisual=function(){this.visual=new M.drawing.Group,this.createBackground()},lo.prototype.createBackground=function(){var t=this.options,e=t.border||{},i=this.box.clone().pad(t.margin).unpad(e.width),i=M.drawing.Path.fromRect(i.toRect(),{stroke:{color:e.width?e.color:"",width:e.width,dashType:e.dashType},fill:{color:t.background,opacity:t.opacity},zIndex:-10});this.visual.append(i)},lo.prototype.getRoot=function(){return this},lo.prototype.createGradient=function(t){var e,s,i=this.gradients,o=pe(t),r=no[t.gradient];return i[o]?e=i[o]:(s=Object.assign({},r,t),"linear"===r.type?e=new M.drawing.LinearGradient(s):(t.innerRadius&&(s.stops=(()=>{for(var t=s.stops,e=s.innerRadius/s.radius*100,i=t.length,o=[],r=0;r<i;r++){var n=Object.assign({},t[r]);n.offset=(n.offset*(100-e)+e)/100,o.push(n)}return o})()),(e=new M.drawing.RadialGradient(s)).supportVML=!1!==r.supportVML),i[o]=e),e},lo.prototype.cleanGradients=function(){var t,e=this.gradients;for(t in e)e[t]._observers=[]},lo.prototype.size=function(){var t=this.options;return new I(0,0,t.width,t.height)};var so,ao,i=lo;function lo(t){so.call(this,t);t=this.options;t.width=parseInt(t.width,10),t.height=parseInt(t.height,10),this.gradients={}}e(i,{width:600,height:400,background:a,border:{color:Y,width:0},margin:w(5),zIndex:-2});let ho=i,po=((ao=o)&&(co.__proto__=ao),((co.prototype=Object.create(ao&&ao.prototype)).constructor=co).prototype._initDirection=function(){var t=this.options;t.vertical?(this.groupAxis=y,this.elementAxis=v,this.groupSizeField=dt,this.elementSizeField=et,this.groupSpacing=t.spacing,this.elementSpacing=t.vSpacing):(this.groupAxis=v,this.elementAxis=y,this.groupSizeField=et,this.elementSizeField=dt,this.groupSpacing=t.vSpacing,this.elementSpacing=t.spacing)},co.prototype.reflow=function(t){this.box=t.clone(),this.reflowChildren()},co.prototype.reflowChildren=function(){var t=this,e=t.box,i=t.elementAxis,o=t.groupAxis,r=t.elementSizeField,n=t.groupSizeField,t=this.groupOptions(),s=t.groups,a=t.groupsSize,t=t.maxGroupElementsSize,l=s.length,h=e[o+1]+this.alignStart(a,e[n]());if(l){for(var p=h,c=0;c<l;c++){for(var u=s[c],d=u.groupElements,f=e[i+1],g=d.length,y=0;y<g;y++){var v=d[y],m=this.elementSize(v),x=p+this.alignStart(m[n],u.groupSize),_=new I;_[o+1]=x,_[o+2]=x+m[n],_[i+1]=f,_[i+2]=f+m[r],v.reflow(_),f+=m[r]+this.elementSpacing}p+=u.groupSize+this.groupSpacing}e[o+1]=h,e[o+2]=h+a,e[i+2]=e[i+1]+t}},co.prototype.alignStart=function(t,e){var i=0,o=this.options.align;return o===P||o===S?i=e-t:o===b&&(i=(e-t)/2),i},co.prototype.groupOptions=function(){for(var t=this,e=t.box,i=t.children,o=t.elementSizeField,r=t.groupSizeField,n=t.elementSpacing,s=t.groupSpacing,a=L(e[o]()),l=i.length,h=[],p=0,c=0,u=0,d=0,f=[],g=0;g<l;g++){var y=i[g],v=(y.box||y.reflow(e),this.elementSize(y));this.options.wrap&&L(c+n+v[o])>a&&(h.push({groupElements:f,groupSize:p,groupElementsSize:c}),d=Math.max(d,c),u+=s+p,c=p=0,f=[]),p=Math.max(p,v[r]),0<c&&(c+=n),c+=v[o],f.push(y)}return h.push({groupElements:f,groupSize:p,groupElementsSize:c}),{groups:h,groupsSize:u+=p,maxGroupElementsSize:d=Math.max(d,c)}},co.prototype.elementSize=function(t){return{width:t.box.width(),height:t.box.height()}},co.prototype.createVisual=function(){},co);function co(t){ao.call(this,t),this._initDirection()}e(po,{vertical:!0,wrap:!0,vSpacing:0,spacing:0});let uo=po;var fo,go=M.drawing.Text,t=((fo=o)&&(yo.__proto__=fo),((yo.prototype=Object.create(fo&&fo.prototype)).constructor=yo).prototype.reflow=function(t){var e=this.options,e=e.size=M.drawing.util.measureText(this.content,{font:e.font});this.baseline=e.baseline,this.box=new I(t.x1,t.y1,t.x1+e.width,t.y1+e.height)},yo.prototype.createVisual=function(){var t=this.options,e=t.font,i=t.color,o=t.opacity,r=t.cursor,n=t.stroke,t=t.paintOrder;this.visual=new go(this.content,this.box.toRect().topLeft(),{font:e,fill:{color:i,opacity:o},cursor:r,stroke:n,paintOrder:t})},yo);function yo(t,e){fo.call(this,e),this.content=t,this.reflow(new I)}e(t,{font:$,color:Y});let vo=t;function mo(t){var e=t.origin,t=t.bottomRight();return new I(e.x,e.y,t.x,t.y)}var xo,_o,bo,wo,ko=/\n/m;function Ao(t,e,i){xo.call(this,e),this.content=t,this.data=i,this._initContainer(),!1!==this.options._autoReflow&&this.reflow(new I)}(xo=Ji)&&(Ao.__proto__=xo),((Ao.prototype=Object.create(xo&&xo.prototype)).constructor=Ao).prototype._initContainer=function(){var t=this.options,e=String(this.content).split(ko),i=new uo({vertical:!0,align:t.align,wrap:!1}),o=O({},t,{opacity:1,animation:null});this.container=i,this.append(i);for(var r=0;r<e.length;r++){var n=new vo(e[r].trim(),o);i.append(n)}},Ao.prototype.reflow=function(t){var e,i=this.options,o=i.visual;this.container.options.align=i.align,o&&!this._boxReflow?((e=t).hasSize()||(this._boxReflow=!0,this.reflow(e),this._boxReflow=!1,e=this.box),(o=this.visual=o(this.visualContext(e)))&&(e=mo(o.clippedBBox()||new M.geometry.Rect),o.options.zIndex=i.zIndex),this.box=this.contentBox=this.paddingBox=e):(xo.prototype.reflow.call(this,t),i.rotation&&(o=w(i.margin),e=this.box.unpad(o),this.targetBox=t,this.normalBox=e.clone(),(e=this.rotate()).translate(o.left-o.right,o.top-o.bottom),this.rotatedBox=e.clone(),e.pad(o)))},Ao.prototype.createVisual=function(){var t=this.options;this.visual=new M.drawing.Group({transform:this.rotationTransform(),zIndex:t.zIndex,noclip:t.noclip}),this.hasBox()&&(t=M.drawing.Path.fromRect(this.paddingBox.toRect(),this.visualStyle()),this.visual.append(t))},Ao.prototype.renderVisual=function(){var t;this.options.visible&&(this.options.visual?((t=this.visual)&&!k(t.options.noclip)&&(t.options.noclip=this.options.noclip),this.addVisual(),this.createAnimation()):xo.prototype.renderVisual.call(this))},Ao.prototype.visualContext=function(t){var e=this,i={text:this.content,rect:t.toRect(),sender:this.getSender(),options:this.options,createVisual:function(){return e._boxReflow=!0,e.reflow(t),e._boxReflow=!1,e.getDefaultVisual()}};return this.data&&Object.assign(i,this.data),i},Ao.prototype.getDefaultVisual=function(){this.createVisual(),this.renderChildren();var t=this.visual;return delete this.visual,t},Ao.prototype.rotate=function(){var t=this.options;return this.box.rotate(t.rotation),this.align(this.targetBox,y,t.align),this.align(this.targetBox,v,t.vAlign),this.box},Ao.prototype.rotationTransform=function(){var t,e,i,o=this.options.rotation;return o?(t=(e=this.normalBox.center()).x,e=e.y,i=this.rotatedBox.center(),M.geometry.transform().translate(i.x-t,i.y-e).rotate(o,[t,e])):null};let So=Ao,Co=((_o=o)&&(Po.__proto__=_o),((Po.prototype=Object.create(_o&&_o.prototype)).constructor=Po).prototype.reflow=function(t){_o.prototype.reflow.call(this,t),this.box.snapTo(t,y)},Po.buildTitle=function(t,e){var i,t="string"==typeof t?{text:t}:t;return i=(t=Object.assign({visible:!0},e,t))&&t.visible&&t.text?new Po(t):i},Po.orderTitles=function(t){var t=[].concat(t),e=t.filter(function(t){return t&&t.options.position!==S}),t=t.filter(function(t){return t&&t.options.position===S});return To(e),To(t),t.reverse(),e.concat(t)},Po);function Po(t){_o.call(this,t),this._textBox=new So(this.options.text,Object.assign({},this.options,{vAlign:this.options.position})),this.append(this._textBox)}function To(t){for(var e=1;e<t.length;e++){var i=t[e]._textBox,o=t[e-1]._textBox;o.options.margin=Object.assign(w(o.options.margin),{bottom:0}),i.options.margin=Object.assign(w(i.options.margin),{top:0})}}e(Co,{color:Y,position:T,align:b,margin:w(5),padding:w(5)});let Mo=Co,Oo=((bo=So)&&(Lo.__proto__=bo),((Lo.prototype=Object.create(bo&&bo.prototype)).constructor=Lo).prototype.visualContext=function(t){t=bo.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},Lo.prototype.click=function(t,e){t.trigger("axisLabelClick",{element:ae(e),value:this.value,text:this.text,index:this.index,dataItem:this.dataItem,axis:this.parent.options})},Lo.prototype.rotate=function(){var t,e;return this.options.alignRotation!==b?(t=this.normalBox.toRect(),e=this.rotationTransform(),this.box=mo(t.bbox(e.matrix()))):bo.prototype.rotate.call(this),this.box},Lo.prototype.rotationTransform=function(){var t=this.options,e=t.rotation;if(!e)return null;if(t.alignRotation===b)return bo.prototype.rotationTransform.call(this);var i=M.geometry.transform().rotate(e).matrix(),o=this.normalBox.toRect(),r=this.targetBox.toRect(),t=t.rotationOrigin||T,n=t===T||t===S?y:v,s=t===T||t===S?v:y,t=t===T||t===C?r.origin:r.bottomRight(),a=o.topLeft().transformCopy(i),l=o.topRight().transformCopy(i),h=o.bottomRight().transformCopy(i),o=o.bottomLeft().transformCopy(i),i=M.geometry.Rect.fromPoints(a,l,h,o),p={};p[s]=r.origin[s]-i.origin[s];var c,i=Math.abs(a[s]+p[s]-t[s]),t=Math.abs(l[s]+p[s]-t[s]),s=L(i,g)===L(t,g)?(c=a,l):t<i?(c=l,h):(c=a,o),t=c[n]+(s[n]-c[n])/2;return p[n]=r.center()[n]-t,M.geometry.transform().translate(p.x,p.y).rotate(e)},Lo);function Lo(t,e,i,o,r){bo.call(this,e,r),this.text=e,this.value=t,this.index=i,this.dataItem=o,this.reflow(new I)}e(Oo,{_autoReflow:!1});let Io=Oo,Bo=((wo=Ji)&&(Eo.__proto__=wo),((Eo.prototype=Object.create(wo&&wo.prototype)).constructor=Eo).prototype.hide=function(){this.options.visible=!1},Eo.prototype.show=function(){this.options.visible=!0},Eo.prototype.render=function(){var t,e,i,o,r,n,s,a,l=this,h=this.options;h.visible&&(i=h.label,h=h.icon,o=new I,r=function(){return l},n=h.size,s=this.fields.text,k(i)&&i.visible&&((a=jt(i))?s=a(this.fields):i.format&&(s=this.chartService.format.auto(i.format,s)),i.color||(i.color=i.position===it?"#fff":h.background),this.label=new So(s,O({},i)),this.label.aliasFor=r,i.position!==it||k(n)||(h.type===q?n=Math.max(this.label.box.width(),this.label.box.height()):(t=this.label.box.width(),e=this.label.box.height()),o.wrap(this.label.box))),h.width=t||n||7,h.height=e||n||7,(a=new oo(O({},h))).aliasFor=r,this.marker=a,this.append(a),this.label&&this.append(this.label),a.reflow(new I),this.wrapperBox=o.wrap(a.box))},Eo.prototype.reflow=function(t){var e,i,o,r=this.options,n=this.label,s=this.marker,a=this.wrapperBox,l=t.center(),h=r.line.length,p=r.position;r.visible&&(u(p,[C,P])?p===C?(o=a.alignTo(t,p).translate(-h,t.center().y-a.center().y),r.line.visible&&(e=[t.x1,l.y],this.linePoints=[e,[o.x2,l.y]],i=o.clone().wrapPoint(e))):(o=a.alignTo(t,p).translate(h,t.center().y-a.center().y),r.line.visible&&(e=[t.x2,l.y],this.linePoints=[e,[o.x1,l.y]],i=o.clone().wrapPoint(e))):p===S?(o=a.alignTo(t,p).translate(t.center().x-a.center().x,h),r.line.visible&&(e=[l.x,t.y2],this.linePoints=[e,[l.x,o.y1]],i=o.clone().wrapPoint(e))):(o=a.alignTo(t,p).translate(t.center().x-a.center().x,-h),r.line.visible&&(e=[l.x,t.y1],this.linePoints=[e,[l.x,o.y2]],i=o.clone().wrapPoint(e))),s&&s.reflow(o),n&&(n.reflow(o),s)&&(r.label.position===lt&&n.box.alignTo(s.box,p),n.reflow(n.box)),this.contentBox=o,this.targetBox=t,this.box=i||o)},Eo.prototype.createVisual=function(){wo.prototype.createVisual.call(this),this.visual.options.noclip=this.options.noclip,this.options.visible&&this.createLine()},Eo.prototype.renderVisual=function(){var e=this,t=this.options,i=t.visual;t.visible&&i?(this.visual=i(Object.assign(this.fields,{sender:this.getSender(),rect:this.targetBox.toRect(),options:{background:t.background,border:t.background,icon:t.icon,label:t.label,line:t.line,position:t.position,visible:t.visible},createVisual:function(){e.createVisual(),e.renderChildren();var t=e.visual;return delete e.visual,t}})),this.addVisual()):wo.prototype.renderVisual.call(this)},Eo.prototype.createLine=function(){var t=this.options.line;this.linePoints&&(_t(t=M.drawing.Path.fromPoints(this.linePoints,{stroke:{color:t.color,width:t.width,dashType:t.dashType}})),this.visual.append(t))},Eo.prototype.click=function(t,e){var i=this.eventArgs(e);t.trigger("noteClick",i)||e.preventDefault()},Eo.prototype.over=function(t,e){var i=this.eventArgs(e);t.trigger("noteHover",i)||e.preventDefault()},Eo.prototype.out=function(t,e){e=this.eventArgs(e);t.trigger("noteLeave",e)},Eo.prototype.eventArgs=function(t){var e=this.options;return Object.assign(this.fields,{element:ae(t),text:k(e.label)?e.label.text:"",visual:this.visual})},Eo);function Eo(t,e,i){wo.call(this,e),this.fields=t,this.chartService=i,this.render()}e(Bo,{icon:{visible:!0,type:q},label:{position:it,visible:!0,align:b,vAlign:b},line:{visible:!0},visible:!0,position:T,zIndex:2});let Ro=Bo;function Vo(){}var jo={format:function(t,e){return e},toString:function(t){return t},parseDate:function(t){return new Date(t)},firstDay:function(){return 0}},i={implementation:{configurable:!0}};Vo.register=function(t){jo=t},i.implementation.get=function(){return jo},Object.defineProperties(Vo,i);let zo=Vo;function Do(t){this._intlService=t}var Fo=/\{(\d+)(:[^\}]+)?\}/g,t={intl:{configurable:!0}};t.intl.get=function(){return this._intlService||zo.implementation},t.intl.set=function(t){this._intlService=t},Do.prototype.auto=function(t){for(var e=[],i=arguments.length-1;0<i--;)e[i]=arguments[i+1];var o=this.intl;return wt(t)&&t.match(tt)?o.format.apply(o,[t].concat(e)):o.toString(e[0],t)},Do.prototype.localeAuto=function(t,o,r){var n=this.intl;return wt(t)&&t.match(tt)?t.replace(Fo,function(t,e,i){e=o[parseInt(e,10)];return n.toString(e,i?i.substring(1):"",r)}):n.toString(o[0],t,r)},Object.defineProperties(Do.prototype,t);function Ho(t,e){this._intlService=(e=void 0===e?{}:e).intlService,this.sender=e.sender||t,this.format=new No(e.intlService),this.chart=t,this.rtl=Boolean(e.rtl)}let No=Do,Uo={intl:{configurable:!0}},Go=(Uo.intl.get=function(){return this._intlService||zo.implementation},Uo.intl.set=function(t){this._intlService=t,this.format.intl=t},Ho.prototype.notify=function(t,e){this.chart&&this.chart.trigger(t,e)},Ho.prototype.isPannable=function(t){var e=((this.chart||{}).options||{}).pannable;return e&&e.lock!==t},Object.defineProperties(Ho.prototype,Uo),Ho);function Wo(){}var Xo;Wo.register=function(t){Xo=t},Wo.create=function(t,e){return Xo?Xo.create(t,e):new Ii(t,Object.assign({},{multiTouch:!0},e))};let Yo=Wo;function qo(t,e){var i=t.tickX,o=t.tickY,r=t.position,n=new M.drawing.Path({stroke:{width:e.width,color:e.color}});return t.vertical?n.moveTo(i,r).lineTo(i+e.size,r):n.moveTo(r,o).lineTo(r,o+e.size),_t(n),n}function Zo(t,e){var i=t.lineStart,o=t.lineEnd,r=t.position,e=new M.drawing.Path({stroke:{width:e.width,color:e.color,dashType:e.dashType}});return t.vertical?e.moveTo(i,r).lineTo(o,r):e.moveTo(r,i).lineTo(r,o),_t(e),e}(Qo=o)&&(r.__proto__=Qo),((r.prototype=Object.create(Qo&&Qo.prototype)).constructor=r).prototype.initFields=function(){},r.prototype.labelsRange=function(){return{min:this.options.labels.skip,max:this.labelsCount()}},r.prototype.normalizeLabelRotation=function(t){var e=t.rotation;Ot(e)&&(t.alignRotation=e.align,t.rotation=e.angle)},r.prototype.createLabels=function(){var t=this.options,e=t.vertical?P:b,i=O({},t.labels,{align:e,zIndex:t.zIndex}),o=Math.max(1,i.step);if(this.clearLabels(),i.visible){this.normalizeLabelRotation(i),"auto"===i.rotation&&(i.rotation=0,t.autoRotateLabels=!0);for(var r=this.labelsRange(),n=r.min;n<r.max;n+=o){var s={index:n,count:r.max},s=this.createAxisLabel(n,i,s);s&&(this.append(s),this.labels.push(s))}}},r.prototype.clearLabels=function(){this.children=Nt(this.children,function(t){return!(t instanceof Io)}),this.labels=[]},r.prototype.clearTitle=function(){var e=this;this.title&&(this.children=Nt(this.children,function(t){return t!==e.title}),this.title=void 0)},r.prototype.clear=function(){this.clearLabels(),this.clearTitle()},r.prototype.lineBox=function(){var t=this.options,e=this.box,i=t.vertical,o=t.labels.mirror,r=o?e.x1:e.x2,o=o?e.y2:e.y1,t=t.line.width||0;return i?new I(r,e.y1,r,e.y2-t):new I(e.x1,o,e.x2-t,o)},r.prototype.createTitle=function(){var t=this.options,t=O({rotation:t.vertical?-90:0,text:"",zIndex:1,visualSize:!0},t.title);t.visible&&t.text&&(t=new So(t.text,t),this.append(t),this.title=t)},r.prototype.createNotes=function(){var t=this.options,e=t.notes,i=e.data||[];this.notes=[];for(var o=0;o<i.length;o++){var r=O({},e,i[o]),r=(r.value=this.parseNoteValue(r.value),new Ro({value:r.value,text:r.label.text,dataItem:r},r,this.chartService));r.options.visible&&(k(r.options.position)?t.vertical&&!u(r.options.position,[C,P])?r.options.position=t.reverse?C:P:t.vertical||u(r.options.position,[T,S])||(r.options.position=t.reverse?S:T):t.vertical?r.options.position=t.reverse?C:P:r.options.position=t.reverse?S:T,this.append(r),this.notes.push(r))}},r.prototype.parseNoteValue=function(t){return t},r.prototype.renderVisual=function(){Qo.prototype.renderVisual.call(this),this.createPlotBands()},r.prototype.createVisual=function(){Qo.prototype.createVisual.call(this),this.createBackground(),this.createLine()},r.prototype.gridLinesVisual=function(){var t=this._gridLines;return t||(t=this._gridLines=new M.drawing.Group({zIndex:-2}),this.appendVisual(this._gridLines)),t},r.prototype.createTicks=function(s){var t=this.options,a=this.lineBox(),l=t.labels.mirror,e=t.majorTicks.visible?t.majorUnit:0,h={vertical:t.vertical};function i(t,e,i){var o=t.length,r=Math.max(1,e.step);if(e.visible)for(var n=e.skip;n<o;n+=r)k(i)&&n%i==0||(h.tickX=l?a.x2:a.x2-e.size,h.tickY=l?a.y1-e.size:a.y1,h.position=t[n],s.append(qo(h,e)))}i(this.getMajorTickPositions(),t.majorTicks),i(this.getMinorTickPositions(),t.minorTicks,e/t.minorUnit)},r.prototype.createLine=function(){var t=this.options,e=t.line,i=this.lineBox();0<e.width&&e.visible&&((e=new M.drawing.Path({stroke:{width:e.width,color:e.color,dashType:e.dashType}})).moveTo(i.x1,i.y1).lineTo(i.x2,i.y2),t._alignLines&&_t(e),(i=this._lineGroup=new M.drawing.Group).append(e),this.visual.append(i),this.createTicks(i))},r.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},r.prototype.createBackground=function(){var t=this.options,e=this.box,t=t.background;t&&(this._backgroundPath=M.drawing.Path.fromRect(e.toRect(),{fill:{color:t},stroke:null}),this.visual.append(this._backgroundPath))},r.prototype.createPlotBands=function(){var e=this,t=this.options,i=t.plotBands||[],o=t.vertical,r=this.plotArea;if(0!==i.length){for(var n=this._plotbandGroup=new M.drawing.Group({zIndex:-1}),s=Nt(this.pane.axes,function(t){return t.options.vertical!==e.options.vertical})[0],a=0;a<i.length;a++){var l=i[a],h=void 0,p=void 0,c=l.label,u=void 0,p=o?(h=(s||r.axisX).lineBox(),this.getSlot(l.from,l.to,!0)):(h=this.getSlot(l.from,l.to,!0),(s||r.axisY).lineBox());c&&(c.vAlign=c.position||C,u=this.createPlotBandLabel(c,l,new I(h.x1,p.y1,h.x2,p.y2))),0!==h.width()&&0!==p.height()&&(c=new M.geometry.Rect([h.x1,p.y1],[h.width(),p.height()]),h=M.drawing.Path.fromRect(c,{fill:{color:l.color,opacity:l.opacity},stroke:null}),n.append(h),u)&&n.append(u)}this.appendVisual(n)}},r.prototype.createPlotBandLabel=function(t,e,i){var o,r;return!1===t.visible?null:(o=t.text,k(t)&&t.visible&&((r=jt(t))?o=r({text:o,item:e}):t.format&&(o=this.chartService.format.auto(t.format,o)),t.color||(t.color=this.options.labels.color)),(r=new So(o,t)).reflow(i),r.renderVisual(),r.visual)},r.prototype.createGridLines=function(t){var e=this.options,i=e.minorGridLines,o=e.majorGridLines,r=e.minorUnit,n=e.vertical,a=t.options.line.visible,e=o.visible?e.majorUnit:0,t=t.lineBox(),l=t[n?"y1":"x1"],h={lineStart:t[n?"x1":"y1"],lineEnd:t[n?"x2":"y2"],vertical:n},p=[],c=this.gridLinesVisual();function s(t,e,i){var o=t.length,r=Math.max(1,e.step);if(e.visible)for(var n=e.skip;n<o;n+=r){var s=L(t[n]);u(s,p)||n%i==0||a&&l===s||(h.position=s,c.append(Zo(h,e)),p.push(s))}}return s(this.getMajorTickPositions(),o),s(this.getMinorTickPositions(),i,e/r),c.children},r.prototype.reflow=function(t){for(var e=this.options,i=this.labels,o=this.title,r=e.vertical,n=i.length,s=r?dt:et,o=o?o.box[s]():0,a=this.getActualTickSize()+e.margin+o,l=((this.getRoot()||{}).box||t)[s](),h=0,p=0;p<n;p++){var c=i[p].box[s]();c+a<=l&&(h=Math.max(h,c))}this.box=r?new I(t.x1,t.y1,t.x1+h+a,t.y2):new I(t.x1,t.y1,t.x2,t.y1+h+a),this.arrangeTitle(),this.arrangeLabels(),this.arrangeNotes()},r.prototype.getLabelsTickPositions=function(){return this.getMajorTickPositions()},r.prototype.labelTickIndex=function(t){return t.index},r.prototype.arrangeLabels=function(){for(var t=this.options,e=this.labels,i=this.labelsBetweenTicks(),o=t.vertical,r=t.labels.mirror,n=this.getLabelsTickPositions(),s=0;s<e.length;s++){var a=e[s],l=this.labelTickIndex(a),h=o?a.box.height():a.box.width(),p=n[l],l=n[l+1],c=void 0,u=void 0,u=o?c=i?p+(l-p)/2-h/2:p-h/2:i?(c=p,l):(c=p-h/2)+h;this.positionLabel(a,r,c,u)}},r.prototype.positionLabel=function(t,e,i,o){void 0===o&&(o=i);var r=this.options,n=r.vertical,s=this.lineBox(),r=this.getActualTickSize()+r.margin,s=n?(n=s.x2,e?(n+=r,t.options.rotationOrigin=C):(n-=r+t.box.width(),t.options.rotationOrigin=P),t.box.move(n,i)):(n=s.y1,e?(n-=r+t.box.height(),t.options.rotationOrigin=S):(n+=r,t.options.rotationOrigin=T),new I(i,n,o,n+t.box.height()));t.reflow(s)},r.prototype.autoRotateLabelAngle=function(t,e){return t.width()<e?0:t.height()>e?-90:-45},r.prototype.autoRotateLabels=function(){if(!this.options.autoRotateLabels||this.options.vertical)return!1;for(var t=this.getMajorTickPositions(),e=this.labels,i=Math.min(e.length,t.length-1),o=0,r=0;r<i;r++){var n=Math.abs(t[r+1]-t[r]),s=e[r].box,s=this.autoRotateLabelAngle(s,n);if(-90===(o=0!==s?s:o))break}if(0!==o){for(var a=0;a<e.length;a++)e[a].options.rotation=o,e[a].reflow(new I);return!0}},r.prototype.arrangeTitle=function(){var t=this.options,e=this.title,i=t.labels.mirror;e&&(t.vertical?(e.options.align=i?P:C,e.options.vAlign=e.options.position):(e.options.align=e.options.position,e.options.vAlign=i?T:S),e.reflow(this.box))},r.prototype.arrangeNotes=function(){for(var t=0;t<this.notes.length;t++){var e=this.notes[t],i=e.options.value,o=void 0;k(i)?(this.shouldRenderNote(i)?e.show():e.hide(),o=this.noteSlot(i)):e.hide(),e.reflow(o||this.lineBox())}},r.prototype.noteSlot=function(t){return this.getSlot(t)},r.prototype.alignTo=function(t){var t=t.lineBox(),e=this.options.vertical,i=e?v:y;this.box.snapTo(t,i),e?this.box.shrink(0,this.lineBox().height()-t.height()):this.box.shrink(this.lineBox().width()-t.width(),0),this.box[i+1]-=this.lineBox()[i+1]-t[i+1],this.box[i+2]-=this.lineBox()[i+2]-t[i+2]},r.prototype.axisLabelText=function(t,e,i){function o(){return e.format?r.chartService.format.localeAuto(e.format,[t],e.culture):t}var r=this,n=jt(e);return n?n(Object.assign({},i,{get text(){return o()},value:t,format:e.format,culture:e.culture})):o()},r.prototype.slot=function(t,e,i){t=this.getSlot(t,e,i);if(t)return t.toRect()},r.prototype.contentBox=function(){var t,e,i=this.box.clone(),o=this.labels;return o.length&&(e=this.options.vertical?v:y,this.chartService.isPannable(e)?(t=this.maxLabelOffset(),i[e+1]-=t.start,i[e+2]+=t.end):(o[0].options.visible&&i.wrap(o[0].box),(e=o[o.length-1]).options.visible&&i.wrap(e.box))),i},r.prototype.maxLabelOffset=function(){for(var t=this.options,e=t.vertical,t=t.reverse,i=this.labelsBetweenTicks(),o=this.getLabelsTickPositions(),r=e?v:y,n=this.labels,s=t?1:0,a=t?0:1,l=0,h=0,p=0;p<n.length;p++){var c=n[p],u=this.labelTickIndex(c),d=void 0,f=void 0;i?(d=o[u+s],f=o[u+a]):d=f=o[u],l=Math.max(l,d-c.box[r+1]),h=Math.max(h,c.box[r+2]-f)}return{start:l,end:h}},r.prototype.limitRange=function(t,e,i,o,r){var n,s,a=this.options;return t<i&&r<0&&(!k(a.min)||a.min<=i)||o<e&&0<r&&(!k(a.max)||o<=a.max)?null:e<i&&0<r||o<t&&r<0?{min:t,max:e}:(a=e-t,s=e,(n=t)<i&&r<0?(n=x(t,i,o),s=x(t+a,i+a,o)):o<e&&0<r&&(s=x(e,i,o),n=x(e-a,i,o-a)),{min:n,max:s})},r.prototype.valueRange=function(){return{min:this.seriesMin,max:this.seriesMax}},r.prototype.lineDir=function(){var t=this.options;return(t.vertical?-1:1)*(t.reverse?-1:1)},r.prototype.lineInfo=function(){var t=this.options.vertical,e=this.lineBox(),i=t?e.height():e.width(),t=t?v:y,o=this.lineDir(),r=t+(1===o?1:2).toString();return{axis:t,axisOrigin:r,axisDir:o,lineBox:e,lineSize:i,lineStart:e[r]}},r.prototype.pointOffset=function(t){var e=this.lineInfo(),i=e.axis,o=e.axisOrigin,r=e.lineBox;return(0<e.axisDir?t[i]-r[o]:r[o]-t[i])/e.lineSize},r.prototype.scaleToDelta=function(t,e){t=x(t,-.999,.999);return 0<t?e*Math.min(1,t):e-e/(1+t)},r.prototype.labelsBetweenTicks=function(){return!this.options.justified},r.prototype.prepareUserOptions=function(){};var Qo,i=r;function r(t,e){void 0===e&&(e=new Go),Qo.call(this,t),this.chartService=e,this.options.visible||(this.options=O({},this.options,{labels:{visible:!1},line:{visible:!1},margin:0,majorTickSize:0,minorTickSize:0})),this.options.minorTicks=O({},{color:this.options.line.color,width:this.options.line.width,visible:this.options.minorTickType!==st},this.options.minorTicks,{size:this.options.minorTickSize,align:this.options.minorTickType}),this.options.majorTicks=O({},{color:this.options.line.color,width:this.options.line.width,visible:this.options.majorTickType!==st},this.options.majorTicks,{size:this.options.majorTickSize,align:this.options.majorTickType}),this.initFields(),this.options._deferLabels||this.createLabels(),this.createTitle(),this.createNotes()}e(i,{labels:{visible:!0,rotation:0,mirror:!1,step:1,skip:0},line:{width:1,color:Y,visible:!0},title:{visible:!0,position:b},majorTicks:{align:lt,size:4,skip:0,step:1},minorTicks:{align:lt,size:3,skip:0,step:1},axisCrossingValue:0,majorTickType:lt,minorTickType:st,majorGridLines:{skip:0,step:1},minorGridLines:{visible:!1,width:1,color:Y,skip:0,step:1},margin:5,visible:!0,reverse:!1,justified:!0,notes:{label:{text:""}},_alignLines:!0,_deferLabels:!1});let Ko=i;var $o="milliseconds",Jo="seconds",tr="minutes",er="hours",ir="days",or="weeks",rr="months",nr="years",sr=6e4,ar=36e5,lr=864e5,hr=6048e5,pr=31536e6,cr={years:pr,months:26784e5,weeks:hr,days:lr,hours:ar,minutes:sr,seconds:1e3,milliseconds:1};function ur(t,e){return t.getTime()-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*sr}function dr(t,e){return new Date(t.getTime()+e)}function fr(t){var e;return t instanceof Date?e=t:t&&(e=new Date(t)),e}function gr(t,e){0===e&&23===t.getHours()&&t.setHours(t.getHours()+2)}function yr(t,e,i,r){var o,n,s,a=t;return t&&(o=(t=fr(t)).getHours(),i===nr?gr(a=new Date(t.getFullYear()+e,0,1),0):i===rr?gr(a=new Date(t.getFullYear(),t.getMonth()+e,1),o):i===or?gr(a=yr(((t,e)=>{void 0===r&&(e=0);var i=0,o=t.getDay();if(!isNaN(o))for(;o!==e;)0===o?o=6:o--,i++;return dr(t,-i*lr)})(t,r),7*e,ir),o):i===ir?gr(a=new Date(t.getFullYear(),t.getMonth(),t.getDate()+e),o):i===er?(o=t,n=e,(s=new Date(o)).setMinutes(0,0,0),o=(o.getTimezoneOffset()-s.getTimezoneOffset())*sr,a=dr(s,o+n*ar)):i===tr?0<(a=dr(t,e*sr)).getSeconds()&&a.setSeconds(0):i===Jo?a=dr(t,1e3*e):i===$o&&(a=dr(t,e)),i!==$o)&&0<a.getMilliseconds()&&a.setMilliseconds(0),a}function vr(t,e,i){return yr(fr(t),0,e,i)}function mr(t,e,i){t=fr(t);return t&&vr(t,e,i).getTime()===t.getTime()?t:yr(t,1,e,i)}function xr(t,e){return t&&e?t.getTime()-e.getTime():-1}function _r(t,e){return t.getTime()-e}function d(t){if(yt(t)){for(var e=[],i=0;i<t.length;i++)e.push(d(t[i]));return e}if(t)return fr(t).getTime()}function br(t,e){return t&&e?d(t)===d(e):t===e}function wr(t,e,i){return ur(t,e)/cr[i]}function kr(t,e,i,o){var t=fr(t),r=fr(e);return(i===rr?t.getMonth()-r.getMonth()+12*(t.getFullYear()-r.getFullYear())+wr(t,new Date(t.getFullYear(),t.getMonth()),ir)/new Date(t.getFullYear(),t.getMonth()+1,0).getDate():i===nr?t.getFullYear()-r.getFullYear()+kr(t,new Date(t.getFullYear(),0),rr,1)/12:i===ir||i===or?wr(t,r,i):_r(t,e)/cr[i])/o}function Ar(t,e,i){return i===nr?e.getFullYear()-t.getFullYear():i===rr?12*Ar(t,e,nr)+e.getMonth()-t.getMonth():i===ir?Math.floor(_r(e,t)/lr):Math.floor(_r(e,t)/cr[i])}function Sr(t,e){return wt(e)&&t.parseDate(e)||fr(e)}function Cr(t,e){if(yt(e)){for(var i=[],o=0;o<e.length;o++)i.push(Sr(t,e[o]));return i}return Sr(t,e)}function Pr(t,e){return m(t.weekStartDay)?t.weekStartDay:e&&e.firstDay?e.firstDay():0}(Tr=Ko)&&(n.__proto__=Tr),((n.prototype=Object.create(Tr&&Tr.prototype)).constructor=n).prototype.initFields=function(){this._ticks={}},n.prototype.categoriesHash=function(){return""},n.prototype.clone=function(){var t=new n(Object.assign({},this.options,{categories:this.options.srcCategories}),this.chartService);return t.createLabels(),t},n.prototype.initUserOptions=function(t){var e=t.categories||[],i=k(t.min),o=k(t.max);return t.srcCategories=t.categories=e,(i||o)&&e.length&&(i=i?Math.floor(t.min):0,o=o?t.justified?Math.floor(t.max)+1:Math.ceil(t.max):e.length,t.categories=t.categories.slice(i,o)),t},n.prototype.rangeIndices=function(){var t=this.options,e=t.categories.length||1;return{min:m(t.min)?t.min%1:0,max:m(t.max)&&t.max%1!=0&&t.max<this.totalRange().max?e-(1-t.max%1):e-(t.justified?1:0)}},n.prototype.range=function(){var t=this.options;return{min:m(t.min)?t.min:0,max:(m(t.max)?t:this.totalRange()).max}},n.prototype.roundedRange=function(){return this.range()},n.prototype.totalRange=function(){var t=this.options;return{min:0,max:Math.max(this._seriesMax||0,t.srcCategories.length)-(t.justified?1:0)}},n.prototype.scaleOptions=function(){var t=this.rangeIndices(),e=t.min,t=t.max,i=this.lineBox();return{scale:(this.options.vertical?i.height():i.width())/(t-e||1)*(this.options.reverse?-1:1),box:i,min:e,max:t}},n.prototype.arrangeLabels=function(){Tr.prototype.arrangeLabels.call(this),this.hideOutOfRangeLabels()},n.prototype.hideOutOfRangeLabels=function(){var t,e,i,o=this.box,r=this.labels;0<r.length&&(e=o[(t=this.options.vertical?v:y)+1],o=o[t+2],i=r[0],r=he(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)},n.prototype.getMajorTickPositions=function(){return this.getTicks().majorTicks},n.prototype.getMinorTickPositions=function(){return this.getTicks().minorTicks},n.prototype.getLabelsTickPositions=function(){return this.getTicks().labelTicks},n.prototype.tickIndices=function(t){for(var e=this.rangeIndices(),i=e.min,o=Math.ceil(e.max),r=Math.floor(i),n=[];r<=o;)n.push(r),r+=t;return n},n.prototype.getTickPositions=function(t){for(var e=this.options,i=e.vertical,e=e.reverse,o=this.scaleOptions(),r=o.scale,n=o.min,s=o.box[(i?v:y)+(e?2:1)],a=this.tickIndices(t),l=[],h=0;h<a.length;h++)l.push(s+L(r*(a[h]-n),Z));return l},n.prototype.getTicks=function(){var t=this.options,e=this._ticks,i=this.rangeIndices(),o=this.lineBox(),i=o.getHash()+i.min+","+i.max+t.reverse+t.justified;return e._hash!==i&&(t=t.minorTicks.visible||t.minorGridLines.visible,e._hash=i,e.labelTicks=this.getTickPositions(1),e.majorTicks=this.filterOutOfRangePositions(e.labelTicks,o),e.minorTicks=t?this.filterOutOfRangePositions(this.getTickPositions(.5),o):[]),e},n.prototype.filterOutOfRangePositions=function(t,e){if(!t.length)return t;for(var i=this.options.vertical?v:y,o=function(t){return e[i+1]<=t&&t<=e[i+2]},r=t.length-1,n=0;!o(t[n])&&n<=r;)n++;for(var s=r;!o(t[s])&&0<=s;)s--;return t.slice(n,s+1)},n.prototype.lineInfo=function(){var t=this.options,e=t.vertical,t=t.reverse,i=this.lineBox(),o=e?i.height():i.width(),e=e?v:y,t=t?-1:1,r=e+(1==t?1:2).toString();return{axis:e,axisOrigin:r,axisDir:t,lineBox:i,lineSize:o,lineStart:i[r]}},n.prototype.lineDir=function(){return this.options.reverse?-1:1},n.prototype.getSlot=function(t,e,i){var o=this.options,r=o.reverse,o=o.justified,n=this.scaleOptions(),s=n.scale,a=n.box,n=n.min,l=this.lineInfo(),h=l.axis,l=l.lineStart,p=a.clone(),c=!k(e),t=_(t,0),e=_(e,t),e=Math.max(e-1,t),u=l+(t-n)*s,l=l+(Math.max(t,e)+1-n)*s;return c&&o&&(l=u),i&&(u=x(u,a[h+1],a[h+2]),l=x(l,a[h+1],a[h+2])),p[h+1]=r?l:u,p[h+2]=r?u:l,p},n.prototype.limitSlot=function(t){var e=this.options.vertical?v:y,i=this.lineBox(),o=t.clone();return o[e+1]=x(t[e+1],i[e+1],i[e+2]),o[e+2]=x(t[e+2],i[e+1],i[e+2]),o},n.prototype.slot=function(t,e,i){var o=Math.floor(this.options.min||0);return"string"==typeof t?t=this.categoryIndex(t):m(t)&&(t-=o),"string"==typeof e?e=this.categoryIndex(e):m(e)&&(e-=o),Tr.prototype.slot.call(this,t,e,i)},n.prototype.pointCategoryIndex=function(t){var e=this.options,i=e.reverse,o=e.justified,e=e.vertical?v:y,r=this.scaleOptions(),n=r.scale,s=r.box,i=i?r.max:r.min,r=s[e+1],t=t[e];return t<r||s[e+2]<t?null:(e=(s=i+(t-r)/n)%1,o?s=Math.round(s):0==e&&0<s&&s--,Math.floor(s))},n.prototype.getCategory=function(t){t=this.pointCategoryIndex(t);return null===t?null:this.options.categories[t]},n.prototype.categoryIndex=function(t){return this.totalIndex(t)-Math.floor(this.options.min||0)},n.prototype.categoryAt=function(t,e){var i=this.options;return(e?i.srcCategories:i.categories)[t]},n.prototype.categoriesCount=function(){return(this.options.categories||[]).length},n.prototype.translateRange=function(t){var e=this.options,i=this.lineBox(),i=e.vertical?i.height():i.width(),e=e.categories.length,t=L(t/(i/e),g);return{min:t,max:e+t}},n.prototype.scaleRange=function(t,e){var e=Math.abs(this.pointOffset(e)),i=this.limitedRangeIndices(),o=i.max-i.min,t=this.scaleToDelta(t,o),o=i.min+e*t,i=i.max-(1-e)*t;return{min:o,max:i=i-o<.1?o+.1:i}},n.prototype.zoomRange=function(t,e){var i=this.totalRange(),o=i.min,i=i.max,t=this.scaleRange(t,e);return{min:x(t.min,o,i),max:x(t.max,o,i)}},n.prototype.labelsCount=function(){var t=this.labelsRange();return t.max-t.min},n.prototype.labelsRange=function(){var t=this.options,e=t.justified,i=t.labels,o=this.limitedRangeIndices(!0),r=o.min,o=o.max,n=Math.floor(r),o=e?(r=Math.ceil(r),Math.floor(o)):(r=Math.floor(r),Math.ceil(o));return{min:(r>i.skip?i.skip+i.step*Math.ceil((r-i.skip)/i.step):i.skip)-n,max:(t.categories.length?o+(e?1:0):0)-n}},n.prototype.createAxisLabel=function(t,e,i){var o=this.options,r=o.dataItems?o.dataItems[t]:null,o=_(o.categories[t],""),i=(i.dataItem=r,this.axisLabelText(o,e,i));return new Io(o,i,t,r,e)},n.prototype.shouldRenderNote=function(t){var e=this.limitedRangeIndices();return Math.floor(e.min)<=t&&t<=Math.ceil(e.max)},n.prototype.noteSlot=function(t){var e=this.options,t=t-Math.floor(e.min||0);return this.getSlot(t)},n.prototype.arrangeNotes=function(){Tr.prototype.arrangeNotes.call(this),this.hideOutOfRangeNotes()},n.prototype.hideOutOfRangeNotes=function(){var t=this.notes,e=this.box;if(t&&t.length)for(var i=this.options.vertical?v:y,o=e[i+1],r=e[i+2],n=0;n<t.length;n++){var s=t[n];s.box&&(r<s.box[i+1]||s.box[i+2]<o)&&s.hide()}},n.prototype.pan=function(t){var e=this.limitedRangeIndices(!0),i=this.scaleOptions().scale,t=L(t/i,g),i=this.totalRange(),o=e.min+t,e=e.max+t;return this.limitRange(o,e,0,i.max,t)},n.prototype.pointsRange=function(t,e){var i=this.options,o=i.reverse,i=i.vertical?v:y,r=this.limitedRangeIndices(!0),n=this.scaleOptions(),s=n.scale,n=n.box[i+(o?2:1)],o=t[i]-n,t=e[i]-n,e=r.min+o/s,i=r.min+t/s,n=Math.min(e,i),o=Math.max(e,i);if(.01<=o-n)return{min:n,max:o}},n.prototype.valueRange=function(){return this.range()},n.prototype.totalIndex=function(t){var e=this.options;if(this._categoriesMap)return this._categoriesMap.get(t);var i=t,o=e.srcCategories;if(i instanceof Date){for(var r=o.length,n=0;n<r;n++)if(br(o[n],i))return n;return-1}return o.indexOf(i)},n.prototype.currentRangeIndices=function(){var t=this.options,e=0;return{min:e=m(t.min)?Math.floor(t.min):e,max:m(t.max)?t.justified?Math.floor(t.max):Math.ceil(t.max)-1:this.totalCount()-1}},n.prototype.limitedRangeIndices=function(t){var e=this.options,i=m(e.min)?e.min:0;return e=m(e.max)?e.max:m(e.min)?i+e.categories.length:this.totalRange().max||1,t&&(t=this.totalRange(),i=x(i,0,t.max),e=x(e,0,t.max)),{min:i,max:e}},n.prototype.totalRangeIndices=function(){return{min:0,max:this.totalRange().max||1}},n.prototype.indexCategories=function(){if(!this._categoriesMap)for(var t=this._categoriesMap=new Wt,e=this.options.srcCategories,i=0;i<e.length;i++)t.set(e[i],i)},n.prototype.totalCount=function(){return Math.max(this.options.srcCategories.length,this._seriesMax||0)};var Tr,t=n;function n(){Tr.apply(this,arguments)}e(t,{type:"category",vertical:!1,majorGridLines:{visible:!1,width:1,color:Y},labels:{zIndex:1},justified:!1,_deferLabels:!0});let Mr=t;var i={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"},Or=[$o,Jo,tr,er,ir,or,rr,nr],Lr="fit";function Ir(t,e){e&&(t._range=void 0);e=t._range;return e||((e=t._range=ke(t)).min=fr(e.min),e.max=fr(e.max)),e}function Br(t){this.options=t}function Er(t,e,i){(this.options=i).baseUnitStep=i.baseUnitStep||1;var o,r=i.roundToBaseUnit,n=i.justified,s=(this.start=yr(t,0,i.baseUnit,i.weekStartDay),this.roundToTotalStep(e)),a=!n&&br(e,s)&&!i.justifyEnd,t=(this.end=this.roundToTotalStep(e,!n,a?1:0),i.min||t);this.valueStart=this.roundToTotalStep(t),this.displayStart=r?this.valueStart:t,(t=i.max)?(o=!n&&br(t,this.roundToTotalStep(t))?-1:0,this.valueEnd=this.roundToTotalStep(t,!1,o),this.displayEnd=r?this.roundToTotalStep(t,!n):i.max):(this.valueEnd=s,this.displayEnd=r||a?this.end:e),this.valueEnd<this.valueStart&&(this.valueEnd=this.valueStart),this.displayEnd<=this.displayStart&&(this.displayEnd=this.roundToTotalStep(this.displayStart,!1,1))}Br.prototype.displayIndices=function(){return{min:0,max:1}},Br.prototype.displayRange=function(){return{}},Br.prototype.total=function(){return{}},Br.prototype.valueRange=function(){return{}},Br.prototype.valueIndex=function(){return-1},Br.prototype.values=function(){return[]},Br.prototype.totalIndex=function(){return-1},Br.prototype.valuesCount=function(){return 0},Br.prototype.totalCount=function(){return 0},Br.prototype.dateAt=function(){return null};function Rr(t,e,i){for(var o,r,n,s=Ir(t.categories),a=(t.max||s.max)-(t.min||s.min),l=t.autoBaseUnitSteps,h=t.maxDateGroups,p=t.baseUnit===Lr,c=e?Or.indexOf(e):0,u=p?Or[c++]:t.baseUnit,d=a/cr[u],f=d;!r||h<=d;){for(o=o||l[u].slice(0);(n=o.shift())&&e===u&&n<i;);if(n)d=f/(r=n);else{if(u===he(Or)){r=Math.ceil(f/h);break}if(!p){h<d&&(r=Math.ceil(f/h));break}u=Or[c++]||he(Or),f=a/cr[u],o=null}}t.baseUnitStep=r,t.baseUnit=u}Er.prototype.displayRange=function(){return{min:this.displayStart,max:this.displayEnd}},Er.prototype.displayIndices=function(){var t,e,i;return this._indices||(i=(t=this.options).baseUnit,e=kr(this.displayStart,this.valueStart,i,t=t.baseUnitStep),i=kr(this.displayEnd,this.valueStart,i,t),this._indices={min:e,max:i}),this._indices},Er.prototype.total=function(){return{min:this.start,max:this.end}},Er.prototype.totalCount=function(){return this.totalIndex(this.end)+(this.options.justified?1:0)},Er.prototype.valueRange=function(){return{min:this.valueStart,max:this.valueEnd}},Er.prototype.valueIndex=function(t){var e=this.options;return Math.floor(kr(t,this.valueStart,e.baseUnit,e.baseUnitStep))},Er.prototype.totalIndex=function(t){var e=this.options;return Math.floor(kr(t,this.start,e.baseUnit,e.baseUnitStep))},Er.prototype.dateIndex=function(t){var e=this.options;return kr(t,this.valueStart,e.baseUnit,e.baseUnitStep)},Er.prototype.valuesCount=function(){return this.valueIndex(this.valueEnd)+1},Er.prototype.values=function(){var t=this._values;if(!t){var e=this.options,i=this.valueRange();this._values=t=[];for(var o=i.min;o<=i.max;)t.push(o),o=yr(o,e.baseUnitStep,e.baseUnit,e.weekStartDay)}return t},Er.prototype.dateAt=function(t,e){var i=this.options;return yr(e?this.start:this.valueStart,i.baseUnitStep*t,i.baseUnit,i.weekStartDay)},Er.prototype.roundToTotalStep=function(t,e,i){var o=this.options,r=o.baseUnit,n=o.baseUnitStep,o=o.weekStartDay,s=this.start,t=kr(t,s,r,n),e=e?Math.ceil(t):Math.floor(t);return i&&(e+=i),yr(s,e*n,r,o)};(Vr=Mr)&&(s.__proto__=Vr),((s.prototype=Object.create(Vr&&Vr.prototype)).constructor=s).prototype.clone=function(){var t=new s(Object.assign({},this.options),this.chartService);return t.createLabels(),t},s.prototype.categoriesHash=function(){var t=this.dataRange.total().min;return this.options.baseUnit+this.options.baseUnitStep+t},s.prototype.initUserOptions=function(t){return t},s.prototype.initFields=function(){Vr.prototype.initFields.call(this);var t,e=this.chartService,i=e.intl,o=this.options,r=o.categories||[];r._parsed||((r=Cr(i,r))._parsed=!0),o=O({roundToBaseUnit:!0},o,{categories:r,min:Sr(i,o.min),max:Sr(i,o.max),weekStartDay:Pr(o,i)}),e.panning&&e.isPannable(o.vertical?v:y)&&(o.roundToBaseUnit=!1),o.userSetBaseUnit=o.userSetBaseUnit||o.baseUnit,o.userSetBaseUnitStep=o.userSetBaseUnitStep||o.baseUnitStep,0<((this.options=o).srcCategories=r).length?(i=Ir(r,!0),e=o.maxDivisions,r=(t=>{var e=(t.baseUnit||"").toLowerCase();if(e!==Lr&&!u(e,Or)){for(var i,o,r=t,n=r.categories,s=k(n)?n.length:0,a=rt,l=0;l<s;l++){var h,p=n[l];p&&i&&0!==(h=Math.abs(ur(p,i)))&&(o=(a=Math.min(a,h))>=pr?nr:24192e5<=a?rr:hr<=a?or:lr<=a?ir:ar<=a?er:sr<=a?tr:Jo),i=p}r.baseUnit=o||ir}return e!==Lr&&"auto"!==t.baseUnitStep||Rr(t),t})(o),(t=o._forecast)&&(0<t.before&&(i.min=yr(i.min,-t.before,r.baseUnit,r.weekStartDay)),0<t.after)&&(i.max=yr(i.max,t.after,r.baseUnit,r.weekStartDay)),this.dataRange=new Er(i.min,i.max,r),e?(t=this.dataRange.displayRange(),Rr(r=Object.assign({},o,{justified:!0,roundToBaseUnit:!1,baseUnit:"fit",min:t.min,max:t.max,maxDateGroups:e}),(t=this.dataRange.options).baseUnit,t.baseUnitStep),this.divisionRange=new Er(i.min,i.max,r)):this.divisionRange=this.dataRange):(o.baseUnit=o.baseUnit||ir,this.dataRange=this.divisionRange=new Br(o)),this.rangeLabels=[]},s.prototype.tickIndices=function(t){var e=this.dataRange,i=this.divisionRange,o=i.valuesCount();if(!this.options.maxDivisions||!o)return Vr.prototype.tickIndices.call(this,t);var r=[],n=i.values(),s=0;this.options.justified||(n=n.concat(i.dateAt(o)),s=.5);for(var a,l=0;l<n.length;l++)r.push(e.dateIndex(n[l])+s),1!==t&&1<=l&&r.splice(l,0,r[(a=r.length-1)-1]+(r[a]-r[a-1])*t);return r},s.prototype.shouldRenderNote=function(t){var e=this.range(),i=this.options.categories||[];return 0<=xr(t,e.min)&&xr(t,e.max)<=0&&i.length},s.prototype.parseNoteValue=function(t){return Sr(this.chartService.intl,t)},s.prototype.noteSlot=function(t){return this.getSlot(t)},s.prototype.translateRange=function(t){var e=this.options,i=e.baseUnit,o=e.weekStartDay,r=e.vertical,n=this.lineBox(),r=r?n.height():n.width(),n=this.range(),r=r/(n.max-n.min),t=L(t/r,g);return n.min&&n.max&&(r=dr(e.min||n.min,t),e=dr(e.max||n.max,t),n={min:yr(r,0,i,o),max:yr(e,0,i,o)}),n},s.prototype.labelsRange=function(){return{min:this.options.labels.skip,max:this.divisionRange.valuesCount()}},s.prototype.pan=function(t){var e,i,o,r,n;return this.isEmpty()?null:(e=this.options,o=this.lineBox(),o=e.vertical?o.height():o.width(),r=(n=this.dataRange.displayRange()).min,n=n.max,i=this.dataRange.total(),o=dr(r,t=L(t/(o/(n-r)),g)*(e.reverse?-1:1)),r=dr(n,t),(n=this.limitRange(d(o),d(r),d(i.min),d(i.max),t))?(n.min=fr(n.min),n.max=fr(n.max),n.baseUnit=e.baseUnit,n.baseUnitStep=e.baseUnitStep||1,n.userSetBaseUnit=e.userSetBaseUnit,n.userSetBaseUnitStep=e.userSetBaseUnitStep,n):void 0)},s.prototype.pointsRange=function(t,e){var i,o;return this.isEmpty()?null:(t=Vr.prototype.pointsRange.call(this,t,e),e=this.dataRange.displayRange(),i=this.dataRange.displayIndices(),i=_r(e.max,e.min)/(i.max-i.min),o=this.options,{min:dr(e.min,t.min*i),max:dr(e.min,t.max*i),baseUnit:o.userSetBaseUnit||o.baseUnit,baseUnitStep:o.userSetBaseUnitStep||o.baseUnitStep})},s.prototype.scaleRange=function(t,e){if(this.isEmpty())return{};var i=this.options,o=i.userSetBaseUnit===Lr,r=this.dataRange.total(),n=this.dataRange.displayRange(),s=n.min,n=n.max,e=Math.abs(this.pointOffset(e)),t=this.scaleToDelta(t,n-s),a=Math.round(e*t),e=Math.round((1-e)*t),l=this.dataRange.options.baseUnit,t=new Date(s.getTime()+a),a=new Date(n.getTime()-e);if(o){var h,p,c=i.autoBaseUnitSteps,e=i.maxDateGroups,o=he(c[l])*e*cr[l],u=_r(n,s),d=_r(a,t),f=Or.indexOf(l);if(d<cr[l]&&l!==$o)l=Or[f-1],t=dr(s,p=(u-(e-1)*(h=he(c[l]))*cr[l])/2),a=dr(n,-p);else if(o<d&&l!==nr){var g=0;do{for(l=Or[++f],g=0,p=2*cr[l];h=c[l][g],++g<c[l].length&&p*h<u;);}while(l!==nr&&p*h<u);0<(p=(p*h-u)/2)&&(t=dr(s,-p),a=dr(n,p),t=dr(t,x(a,r.min,r.max)-a),a=dr(a,x(t,r.min,r.max)-t))}}return t&&a&&0<_r(a,t)?{min:t,max:a,baseUnit:i.userSetBaseUnit||i.baseUnit,baseUnitStep:i.userSetBaseUnitStep||i.baseUnitStep}:void 0},s.prototype.zoomRange=function(t,e){var i=this.dataRange.total(),t=this.scaleRange(t,e);return t&&(t.min<i.min&&(t.min=i.min),t.max>i.max)&&(t.max=i.max),t},s.prototype.range=function(){return this.dataRange.displayRange()},s.prototype.createLabels=function(){Vr.prototype.createLabels.call(this),this.createRangeLabels()},s.prototype.clearLabels=function(){Vr.prototype.clearLabels.call(this),this.rangeLabels=[]},s.prototype.arrangeLabels=function(){this.arrangeRangeLabels(),Vr.prototype.arrangeLabels.call(this)},s.prototype.arrangeRangeLabels=function(){var t,e,i,o,r=this.options,n=this.rangeLabels;0!==n.length&&(t=this.lineBox(),e=r.vertical,r=r.rangeLabels.mirror||r.labels.mirror,(i=n[0])&&(o=e?t.y1-i.box.height()/2:t.x1,this.positionLabel(i,r,o)),i=n[1])&&(o=e?t.y2-i.box.height()/2:t.x2,this.positionLabel(i,r,o))},s.prototype.autoRotateLabels=function(){Vr.prototype.autoRotateLabels.call(this),this.autoRotateRangeLabels()},s.prototype.hideOutOfRangeLabels=function(){Vr.prototype.hideOutOfRangeLabels.call(this),this.hideOverlappingLabels()},s.prototype.hideOverlappingLabels=function(){var t=this.rangeLabels,e=this.labels;if(0!==t.length){var i=t[0];if(i&&i.options.visible)for(var o=0;o<e.length&&s(i,e[o]);o++);var r=t[1];if(r&&r.options.visible)for(var n=e.length-1;0<n&&s(r,e[n]);--n);}function s(t,e){return!(e.options.visible&&!e.box.overlaps(t.box)||(e.options.visible=!1))}},s.prototype.contentBox=function(){for(var t=Vr.prototype.contentBox.call(this),e=this.rangeLabels,i=0;i<e.length;i++){var o=e[i];o.options.visible&&t.wrap(o.box)}return t},s.prototype.createAxisLabel=function(t,e,i){void 0===i&&(i={});var o=this.options,o=o.dataItems&&!o.maxDivisions?o.dataItems[t]:null,r=this.divisionRange.dateAt(t),n=e.dateFormats[this.divisionRange.options.baseUnit],n=(e.format=e.format||n,i.dataItem=o,this.axisLabelText(r,e,i));if(n)return new Io(r,n,t,o,e)},s.prototype.createRangeLabels=function(){var o=this,t=this.divisionRange,e=t.displayStart,t=t.displayEnd,i=this.options,r=Object.assign({},i.labels,i.rangeLabels,{align:b,zIndex:i.zIndex});!0===r.visible&&(this.normalizeLabelRotation(r),r.alignRotation=b,"auto"===r.rotation&&(r.rotation=0,i.autoRotateRangeLabels=!0),i=r.dateFormats[this.divisionRange.options.baseUnit],r.format=r.format||i,(i=function(t,e,i){i&&(e=new Io(e,i,t,null,r),o.append(e),o.rangeLabels.push(e))})(0,e,this.axisLabelText(e,r,{index:0,count:2})),i(1,t,this.axisLabelText(t,r,{index:1,count:2})))},s.prototype.autoRotateRangeLabels=function(){var t,e,o=this,i=this.rangeLabels;this.options.autoRotateRangeLabels&&!this.options.vertical&&2===i.length&&(t=function(t,e,i){e=2*Math.abs(e[i+1]-e[i]),i=o.autoRotateLabelAngle(t.box,e);0!==i&&(t.options.rotation=i,t.reflow(new I))},e=this.getMajorTickPositions(),t(i[0],e,0),t(i[1],e,e.length-2))},s.prototype.categoryIndex=function(t){return this.dataRange.valueIndex(t)},s.prototype.slot=function(t,e,i){var o=this.dataRange,o=(t instanceof Date&&(t=o.dateIndex(t)),e instanceof Date&&(e=o.dateIndex(e)),this.getSlot(t,e,i));if(o)return o.toRect()},s.prototype.getSlot=function(t,e,i){return typeof t==at&&(t=this.categoryIndex(t)),typeof e==at&&(e=this.categoryIndex(e)),Vr.prototype.getSlot.call(this,t,e,i)},s.prototype.valueRange=function(){var t=Ir(this.options.srcCategories);return{min:fr(t.min),max:fr(t.max)}},s.prototype.categoryAt=function(t,e){return this.dataRange.dateAt(t,e)},s.prototype.categoriesCount=function(){return this.dataRange.valuesCount()},s.prototype.rangeIndices=function(){return this.dataRange.displayIndices()},s.prototype.labelsBetweenTicks=function(){return!this.divisionRange.options.justified},s.prototype.prepareUserOptions=function(){this.isEmpty()||(this.options.categories=this.dataRange.values())},s.prototype.getCategory=function(t){t=this.pointCategoryIndex(t);return null===t?null:this.dataRange.dateAt(t)},s.prototype.totalIndex=function(t){return this.dataRange.totalIndex(t)},s.prototype.currentRangeIndices=function(){var t=this.dataRange.valueRange();return{min:this.dataRange.totalIndex(t.min),max:this.dataRange.totalIndex(t.max)}},s.prototype.totalRange=function(){return this.dataRange.total()},s.prototype.totalRangeIndices=function(){var t=this.dataRange.total();return{min:this.dataRange.totalIndex(t.min),max:this.dataRange.totalIndex(t.max)}},s.prototype.totalCount=function(){return this.dataRange.totalCount()},s.prototype.isEmpty=function(){return!this.options.srcCategories.length},s.prototype.roundedRange=function(){var t,e;return!1!==this.options.roundToBaseUnit||this.isEmpty()?this.range():(e=Ir((t=this.options).srcCategories),new Er(e.min,e.max,Object.assign({},t,{justified:!1,roundToBaseUnit:!0,justifyEnd:!1})).displayRange())};var Vr,t=s;function s(){Vr.apply(this,arguments)}e(t,{type:K,labels:{dateFormats:i},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});let jr=t;function zr(t,e){return L(Math.floor(t/e)*e,g)}function Dr(t,e){return L(Math.ceil(t/e)*e,g)}function Fr(t){return Math.max(Math.min(t,3e5),-3e5)}var Hr,Nr,Ur=Math.pow(10,1-g),t=((Hr=Ko)&&(Gr.__proto__=Hr),((Gr.prototype=Object.create(Hr&&Hr.prototype)).constructor=Gr).prototype.initUserOptions=function(t){a=t.seriesMin,i=t.seriesMax,o=(r=t).narrowRange,e=(t=>{if(!t&&!i)return 0;if(0<=t&&0<=i){var e=t===i?0:t;if(!1===o||!o&&.2<(i-e)/i)return 0;e=Math.max(0,e-(i-e)/2)}else e=t;return e})(a),a=((t,e,i)=>{if(!t&&!e)return 1;if(t<=0&&e<=0){var o=t===e?0:e,r=Math.abs((o-t)/o);if(!1===i||!i&&.2<r)return 0;r=Math.min(0,o-(t-o)/2)}else r=e;return r})(a,i,o),n=Bi(e,a),!(s={majorUnit:n})!==r.roundToMajorUnit&&(e<0&&Wr(e,n,1/3)&&(e-=n),0<a)&&Wr(a,n,1/3)&&(a+=n),s.min=zr(e,n),s.max=Dr(a,n);var i,o,e,r=s,n=(this.totalOptions=(e=r,{min:k((a=t).min)?Math.min(e.min,a.min):e.min,max:k(a.max)?Math.max(e.max,a.max):e.max,majorUnit:e.majorUnit}),r),s=t,a=s;if(s){for(var l=s,h=["min","max"],p=0;p<h.length;p++){var c=h[p];null===l[c]&&(l[c]=void 0)}var u=k(s.min),d=k(s.max),f=u||d;f&&s.min===s.max&&(0<s.min?s.min=0:s.max=1),s.majorUnit?(n.min=zr(n.min,s.majorUnit),n.max=Dr(n.max,s.majorUnit)):f&&(a=O(n,s),n.majorUnit=Bi(a.min,a.max))}return n.minorUnit=(a.majorUnit||n.majorUnit)/5,(f=O(n,a)).min>=f.max&&(u&&!d?f.max=f.min+f.majorUnit:!u&&d&&(f.min=f.max-f.majorUnit)),f},Gr.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},Gr.prototype.clone=function(){return new Gr(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},Gr.prototype.startValue=function(){return 0},Gr.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},Gr.prototype.getDivisions=function(t){var e;return 0===t?1:(e=(e=this.options).max-e.min,Math.floor(L(e/t,Z))+1)},Gr.prototype.getTickPositions=function(t,e){var i=this.options,o=this.lineInfo(),r=o.axisDir,n=o.axisOrigin,s=o.lineBox,a=t*(o.lineSize/(i.max-i.min)),l=this.getDivisions(t),h=[],p=s[n],c=0;e&&(c=e/t);for(var u=0;u<l;u++)u%c!=0&&h.push(L(p,Z)),p+=a*r;return h},Gr.prototype.getMajorTickPositions=function(){return this.getTickPositions(this.options.majorUnit)},Gr.prototype.getMinorTickPositions=function(){return this.getTickPositions(this.options.minorUnit)},Gr.prototype.getSlot=function(t,e,i){void 0===i&&(i=!1);var o=this.options,r=this.lineInfo(),n=r.axis,s=r.axisDir,a=r.lineBox,l=r.lineStart,r=s*(r.lineSize/(o.max-o.min)),h=_(t,e||0),e=_(e,t||0),t=(i&&(h=x(h,o.min,o.max),e=x(e,o.min,o.max)),Math.min(h,e)-o.min),i=Math.max(h,e)-o.min,h=new I(a.x1,a.y1,a.x1,a.y1);return h[n+1]=Fr(l+r*(0<s?t:i)),h[n+2]=Fr(l+r*(0<s?i:t)),h},Gr.prototype.getValue=function(t){var e=this.options,i=Number(e.max),e=Number(e.min),t=this.pointOffset(t);return t<0||1<t?null:L(e+t*(i-e),g)},Gr.prototype.translateRange=function(t){var e=this.options,i=e.vertical,o=e.reverse,r=e.max,e=e.min,n=this.lineInfo().lineSize,t=L(t/(n/(r-e)),g);return{min:e+(t=!i&&!o||i&&o?t:-t),max:r+t,offset:t}},Gr.prototype.labelsCount=function(){return this.getDivisions(this.options.majorUnit)},Gr.prototype.createAxisLabel=function(t,e,i){var o=this.options,o=L(o.min+t*o.majorUnit,g),i=this.axisLabelText(o,e,i);return new Io(o,i,t,null,e)},Gr.prototype.shouldRenderNote=function(t){var e=this.range();return e.min<=t&&t<=e.max},Gr.prototype.pan=function(t){t=this.translateRange(t);return this.limitRange(t.min,t.max,this.totalMin,this.totalMax,t.offset)},Gr.prototype.pointsRange=function(t,e){var t=this.getValue(t),e=this.getValue(e),i=Math.min(t,e),t=Math.max(t,e);if(this.isValidRange(i,t))return{min:i,max:t}},Gr.prototype.scaleRange=function(t,e){var e=Math.abs(this.pointOffset(e)),i=this.options.max-this.options.min,t=this.scaleToDelta(t,i),i=(1-e)*t,e=L(this.options.min+e*t,g),t=L(this.options.max-i,g);return{min:e,max:t=t-e<Ur?e+Ur:t}},Gr.prototype.zoomRange=function(t,e){var i=this.totalMin,o=this.totalMax,t=this.scaleRange(t,e);return{min:x(t.min,i,o),max:x(t.max,i,o),narrowRange:!1}},Gr.prototype.isValidRange=function(t,e){return Ur<e-t},Gr);function Gr(t,e,i,o){Hr.call(this,Object.assign({},i,{seriesMin:t,seriesMax:e}),o)}function Wr(t,e,i){t=L(Math.abs(t%e),g);return 0===t||e*(1-i)<t}e(t,{type:"numeric",min:0,max:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:Y},labels:{format:"#.####################"},zIndex:1});let Xr=t,Yr=((Nr=Ko)&&(qr.__proto__=Nr),((qr.prototype=Object.create(Nr&&Nr.prototype)).constructor=qr).prototype.clone=function(){return new qr(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},qr.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},qr.prototype.getDivisions=function(t){var e=this.options;return Math.floor(Ar(e.min,e.max,e.baseUnit)/t+1)},qr.prototype.getTickPositions=function(t){for(var e=this.options,i=this.lineInfo(),o=i.axisDir,r=i.lineSize,n=i.lineStart,s=this.getDivisions(t),a=r/_r(e.max,e.min),l=e.weekStartDay||0,h=[n],p=1;p<s;p++){var c=n+_r(yr(e.min,p*t,e.baseUnit,l),e.min)*a*o;h.push(L(c,Z))}return h},qr.prototype.getMajorTickPositions=function(){return this.getTickPositions(this.options.majorUnit)},qr.prototype.getMinorTickPositions=function(){return this.getTickPositions(this.options.minorUnit)},qr.prototype.getSlot=function(t,e,i){return Xr.prototype.getSlot.call(this,Sr(this.intlService,t),Sr(this.intlService,e),i)},qr.prototype.getValue=function(t){t=Xr.prototype.getValue.call(this,t);return null!==t?fr(t):null},qr.prototype.labelsCount=function(){return this.getDivisions(this.options.majorUnit)},qr.prototype.createAxisLabel=function(t,e,i){var o=this.options,r=t*o.majorUnit,n=o.min,r=(0<r&&(n=yr(n,r,o.baseUnit,o.weekStartDay||0)),e.dateFormats[o.baseUnit]),o=(e.format=e.format||r,this.axisLabelText(n,e,i));return new Io(n,o,t,null,e)},qr.prototype.translateRange=function(t){var e=this.options,i=this.lineBox(),o=e.vertical,r=e.reverse,i=o?i.height():i.width(),n=this.range(),i=i/_r(n.max,n.min),n=L(t/i,g);return{min:dr(e.min,n=!o&&!r||o&&r?n:-n),max:dr(e.max,n),offset:n}},qr.prototype.shouldRenderNote=function(t){var e=this.range();return 0<=xr(t,e.min)&&xr(t,e.max)<=0},qr.prototype.pan=function(t){t=this.translateRange(t,!0),t=this.limitRange(d(t.min),d(t.max),this.totalMin,this.totalMax,t.offset);if(t)return{min:fr(t.min),max:fr(t.max)}},qr.prototype.pointsRange=function(t,e){var t=this.getValue(t),e=this.getValue(e),i=Math.min(t,e),t=Math.max(t,e);return{min:fr(i),max:fr(t)}},qr.prototype.scaleRange=function(t,e){var e=Math.abs(this.pointOffset(e)),i=this.options.max-this.options.min,t=this.scaleToDelta(t,i),i=e*t,e=(1-e)*t,t=fr(d(this.options.min)+i),i=fr(d(this.options.max)-e);return{min:t,max:i=i-t<1e3?fr(d(t)+1e3):i}},qr.prototype.zoomRange=function(t,e){t=this.scaleRange(t,e);return{min:fr(x(d(t.min),this.totalMin,this.totalMax)),max:fr(x(d(t.max),this.totalMin,this.totalMax))}},qr);function qr(t,e,i,o){var r,n,s,a,l,h,p,t=fr(t),e=fr(e),c=o.intl,i=i||{},u=(u=t,r=e,n=i=O(i||{},{min:Sr(c,i.min),max:Sr(c,i.max),axisCrossingValue:Cr(c,i.axisCrossingValues||i.axisCrossingValue),weekStartDay:Pr(i,c)}),u=n.min||u,r=n.max||r,s=n.baseUnit||(r&&u?(s=ur(r,u),a=er,pr<=s?a=nr:26784e5<=s?a=rr:hr<=s?a=or:lr<=s&&(a=ir),a):er),a=cr[s],l=n.weekStartDay||0,u=vr(d(u)-1,s,l)||fr(r),r=mr(d(r)+1,s,l),a=n.majorUnit||Dr(Bi(u.getTime(),r.getTime()),a)/a,h=Dr(h=Ar(u,r,s),a)-h,p=Math.floor(h/2),h-=p,n.baseUnit||delete n.baseUnit,n.baseUnit=n.baseUnit||s,n.min=n.min||yr(u,-p,s,l),n.max=n.max||yr(r,h,s,l),n.minorUnit=n.minorUnit||a/5,n.majorUnit=a,i=n,Nr.call(this,i,o),this.intlService=c,this.seriesMin=t,this.seriesMax=e,i.weekStartDay||0);this.totalMin=d(vr(d(t)-1,i.baseUnit,u)),this.totalMax=d(mr(d(e)+1,i.baseUnit,u))}e(Yr,{type:K,majorGridLines:{visible:!0,width:1,color:Y},labels:{dateFormats:i}});let Zr=Yr;(Qr=Ko)&&(Jr.__proto__=Qr),((Jr.prototype=Object.create(Qr&&Qr.prototype)).constructor=Jr).prototype.clone=function(){return new Jr(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},Jr.prototype.startValue=function(){return this.options.min},Jr.prototype.getSlot=function(t,e,i){var o=this.options,r=this.logMin,n=this.logMax,s=o.majorUnit,a=o.min,o=o.max,l=this.lineInfo(),h=l.axis,p=l.axisDir,c=l.lineBox,u=l.lineStart,l=p*(l.lineSize/(n-r)),n=_(t,e||1),e=_(e,t||1);if(n<=0||e<=0)return null;i&&(n=x(n,a,o),e=x(e,a,o));n=en(n,s),e=en(e,s),t=Math.min(n,e)-r,i=Math.max(n,e)-r,a=new I(c.x1,c.y1,c.x1,c.y1);return a[h+1]=Fr(u+l*(0<p?t:i)),a[h+2]=Fr(u+l*(0<p?i:t)),a},Jr.prototype.getValue=function(t){var e=this.options,i=this.logMin,o=this.logMax,e=e.majorUnit,r=this.lineInfo(),n=r.axis,s=r.lineSize,t=r.axisDir*(t[n]-r.lineStart);return t<0||s<t?null:L(Math.pow(e,i+t*((o-i)/s)),g)},Jr.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},Jr.prototype.translateRange=function(t){var e=this.options,i=this.logMin,o=this.logMax,r=e.reverse,n=e.vertical,e=e.majorUnit,s=this.lineBox(),s=n?s.height():s.width(),t=L(t/(s/(o-i)),g);return!n&&!r||n&&r||(t=-t),{min:Math.pow(e,i+t),max:Math.pow(e,o+t),offset:t}},Jr.prototype.labelsCount=function(){var t=Math.floor(this.logMax);return Math.floor(t-this.logMin)+1},Jr.prototype.getMajorTickPositions=function(){var e=[];return this.traverseMajorTicksPositions(function(t){e.push(t)},{step:1,skip:0}),e},Jr.prototype.createTicks=function(i){var t=this.options,e=t.majorTicks,o=t.minorTicks,r=t.vertical,n=t.labels.mirror,s=this.lineBox(),a={vertical:r};function l(t,e){a.tickX=n?s.x2:s.x2-e.size,a.tickY=n?s.y1-e.size:s.y1,a.position=t,i.append(qo(a,e))}return e.visible&&this.traverseMajorTicksPositions(l,e),o.visible&&this.traverseMinorTicksPositions(l,o),[]},Jr.prototype.createGridLines=function(t){var e=this.options,i=e.minorGridLines,o=e.majorGridLines,e=e.vertical,t=t.lineBox(),r={lineStart:t[e?"x1":"y1"],lineEnd:t[e?"x2":"y2"],vertical:e},n=[],s=this.gridLinesVisual();function a(t,e){u(t,n)||(r.position=t,s.append(Zo(r,e)),n.push(t))}return o.visible&&this.traverseMajorTicksPositions(a,o),i.visible&&this.traverseMinorTicksPositions(a,i),s.children},Jr.prototype.traverseMajorTicksPositions=function(t,e){for(var i=this.lineInfo(),o=i.lineStart,r=i.step,n=this.logMin,s=this.logMax,a=Math.ceil(n)+e.skip;a<=s;a+=e.step)t(L(o+r*(a-n),g),e)},Jr.prototype.traverseMinorTicksPositions=function(t,e){for(var i=this.options,o=i.min,r=i.max,n=i.minorUnit,s=i.majorUnit,i=this.lineInfo(),a=i.lineStart,l=i.step,h=this.logMin,p=this.logMax,c=Math.floor(h);c<p;c++)for(var u=this._minorIntervalOptions(c),d=e.skip;d<n;d+=e.step){var f=u.value+d*u.minorStep;if(r<f)break;o<=f&&t(L(a+l*(en(f,s)-h),g),e)}},Jr.prototype.createAxisLabel=function(t,e,i){var o=Math.ceil(this.logMin+t),o=Math.pow(this.options.majorUnit,o),i=this.axisLabelText(o,e,i);return new Io(o,i,t,null,e)},Jr.prototype.shouldRenderNote=function(t){var e=this.range();return e.min<=t&&t<=e.max},Jr.prototype.pan=function(t){t=this.translateRange(t);return this.limitRange(t.min,t.max,this.totalMin,this.totalMax,t.offset)},Jr.prototype.pointsRange=function(t,e){t=this.getValue(t),e=this.getValue(e);return{min:Math.min(t,e),max:Math.max(t,e)}},Jr.prototype.scaleRange=function(t,e){var i=this.options.majorUnit,o=en(this.options.min,i),r=en(this.options.max,i),e=Math.abs(this.pointOffset(e)),t=this.scaleToDelta(t,r-o),o=Math.pow(i,o+e*t),i=Math.pow(i,r-(1-e)*t);return{min:o,max:i=i-o<1e-6?o+1e-6:i}},Jr.prototype.zoomRange=function(t,e){var t=this.scaleRange(t,e),e=this.totalMin,i=this.totalMax;return{min:x(t.min,e,i),max:x(t.max,e,i)}},Jr.prototype._minorIntervalOptions=function(t){var e=this.options,i=e.minorUnit,e=e.majorUnit,o=Math.pow(e,t);return{value:o,minorStep:(Math.pow(e,t+1)-o)/i}},Jr.prototype.lineInfo=function(){var t=Qr.prototype.lineInfo.call(this);return t.step=t.axisDir*(t.lineSize/(this.logMax-this.logMin)),t};var Qr,Kr,$r,t=Jr;function Jr(t,e,i,o){var r,n,s,a,l,h=O({majorUnit:10,min:t,max:e},i),p=h.majorUnit,c=(c=L(en(l=e,u=p),g)%1,l<=0?u:0!=c&&(c<.3||.9<c)?Math.pow(u,en(l,u)+.2):Math.pow(u,Math.ceil(en(l,u)))),u=(l=t,s=(u=h).majorUnit,(a=l)<=0?a=e<=1?Math.pow(s,-2):1:u.narrowRange||(a=Math.pow(s,Math.floor(en(l,s)))),a),d=(l=u,s=c,a=i,r=(d=h).min,n=d.max,k(d.axisCrossingValue)&&d.axisCrossingValue<=0&&tn(),k(a.max)?a.max<=0&&tn():n=s,k(a.min)?a.min<=0&&tn():r=l,{min:r,max:n});h.max=d.max,h.min=d.min,h.minorUnit=i.minorUnit||L(p-1,g),Qr.call(this,h,o),this.totalMin=k(i.min)?Math.min(u,i.min):u,this.totalMax=k(i.max)?Math.max(c,i.max):c,this.logMin=L(en(d.min,p),g),this.logMax=L(en(d.max,p),g),this.seriesMin=t,this.seriesMax=e,this.createLabels()}function tn(){throw new Error("Non positive values cannot be used for a logarithmic axis")}function en(t,e){return Math.log(t)/Math.log(e)}e(t,{type:"log",majorUnit:10,minorUnit:1,axisCrossingValue:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:Y},zIndex:1,_deferLabels:!0});let on=t,rn={createGridLines:function(t){var e,i=this.options,o=Math.abs(this.box.center().y-t.lineBox().y1),r=[],n=!1;return i.majorGridLines.visible&&(e=this.majorGridLineAngles(t),n=!0,r=this.renderMajorGridLines(e,o,i.majorGridLines)),i.minorGridLines.visible&&(e=this.minorGridLineAngles(t,n),ee(r,this.renderMinorGridLines(e,o,i.minorGridLines,t,n))),r},renderMajorGridLines:function(t,e,i){return this.renderGridLines(t,e,i)},renderMinorGridLines:function(t,e,i,o,r){o=this.radiusCallback&&this.radiusCallback(e,o,r);return this.renderGridLines(t,e,i,o)},renderGridLines:function(t,e,i,o){for(var r={stroke:{width:i.width,color:i.color,dashType:i.dashType}},i=this.box.center(),n=new M.geometry.Circle([i.x,i.y],e),s=this.gridLinesVisual(),a=0;a<t.length;a++){var l=new M.drawing.Path(r);o&&(n.radius=o(t[a])),l.moveTo(n.center).lineTo(n.pointAt(t[a]+180)),s.append(l)}return s.children},gridLineAngles:function(t,e,i,o,r){var n=this,e=this.intervals(e,i,o,r),i=t.options,s=i.visible&&!1!==(i.line||{}).visible;return Kt(e,function(t){t=n.intervalAngle(t);if(!s||90!==t)return t})}},nn=((Kr=Mr)&&(sn.__proto__=Kr),((sn.prototype=Object.create(Kr&&Kr.prototype)).constructor=sn).prototype.range=function(){return{min:0,max:this.options.categories.length}},sn.prototype.reflow=function(t){this.box=t,this.reflowLabels()},sn.prototype.lineBox=function(){return this.box},sn.prototype.reflowLabels=function(){for(var t=this.labels,e=this.options.labels,i=e.skip||0,o=e.step||1,r=new I,n=0;n<t.length;n++){t[n].reflow(r);var s=t[n].box;t[n].reflow(this.getSlot(i+n*o).adjacentBox(0,s.width(),s.height()))}},sn.prototype.intervals=function(t,e,i,o){void 0===o&&(o=!1);for(var r,n=this.options,s=n.categories.length/t||1,a=360/s,l=i||1,h=[],p=e||0;p<s;p+=l)r=n.reverse?360-p*a:p*a,r=L(r,Z)%360,o&&u(r,o)||h.push(r);return h},sn.prototype.majorIntervals=function(){return this.intervals(1)},sn.prototype.minorIntervals=function(){return this.intervals(.5)},sn.prototype.intervalAngle=function(t){return(360+t+this.options.startAngle)%360},sn.prototype.majorAngles=function(){var e=this;return Kt(this.majorIntervals(),function(t){return e.intervalAngle(t)})},sn.prototype.createLine=function(){return[]},sn.prototype.majorGridLineAngles=function(t){var e=this.options.majorGridLines;return this.gridLineAngles(t,1,e.skip,e.step)},sn.prototype.minorGridLineAngles=function(t,e){var i=this.options,o=i.minorGridLines,i=i.majorGridLines,e=e?this.intervals(1,i.skip,i.step):null;return this.gridLineAngles(t,.5,o.skip,o.step,e)},sn.prototype.radiusCallback=function(e,t,i){var o,r;if(t.options.type!==H)return t=ce(360/(2*this.options.categories.length)),o=Math.cos(t)*e,r=this.majorAngles(),function(t){return!i&&u(t,r)?e:o}},sn.prototype.createPlotBands=function(){for(var t=this.options.plotBands||[],e=this._plotbandGroup=new M.drawing.Group({zIndex:-1}),i=0;i<t.length;i++){var o=t[i],r=this.plotBandSlot(o),n=this.getSlot(o.from),s=o.from-Math.floor(o.from),a=(r.startAngle+=s*n.angle,Math.ceil(o.to)-o.to),a=(r.angle-=(a+s)*n.angle,Xi.current.createRing(r,{fill:{color:o.color,opacity:o.opacity},stroke:{opacity:o.opacity}}));e.append(a)}this.appendVisual(e)},sn.prototype.plotBandSlot=function(t){return this.getSlot(t.from,t.to-1)},sn.prototype.getSlot=function(t,e){var i=this.options,o=i.justified,r=this.box,n=this.majorAngles(),s=n.length,a=360/s,i=(i.reverse&&!o&&(t=(t+1)%s),n[t=x(Math.floor(t),0,s-1)]),n=(o&&(i-=a/2)<0&&(i+=360),a*(x(Math.ceil(e||t),t,s-1)-t+1));return new Fi(r.center(),0,r.height()/2,i,n)},sn.prototype.slot=function(t,e){t=this.getSlot(t,e),e=t.startAngle+180;return new M.geometry.Arc([t.center.x,t.center.y],{startAngle:e,endAngle:e+t.angle,radiusX:t.radius,radiusY:t.radius})},sn.prototype.pointCategoryIndex=function(t){for(var e=this.options.categories.length,i=null,o=0;o<e;o++)if(this.getSlot(o).containsPoint(t)){i=o;break}return i},sn);function sn(){Kr.apply(this,arguments)}e(nn,{startAngle:90,labels:{margin:w(10)},majorGridLines:{visible:!0},justified:!0}),O(nn.prototype,rn);let an=nn,ln=(($r=Ko)&&(hn.__proto__=$r),((hn.prototype=Object.create($r&&$r.prototype)).constructor=hn).prototype.getDivisions=function(t){return Xr.prototype.getDivisions.call(this,t)-1},hn.prototype.reflow=function(t){this.box=t,this.reflowLabels()},hn.prototype.reflowLabels=function(){for(var t=this.options,e=this.labels,i=this.options.labels,o=i.skip||0,i=i.step||1,r=new I,n=this.intervals(t.majorUnit,o,i),s=0;s<e.length;s++){e[s].reflow(r);var a=e[s].box;e[s].reflow(this.getSlot(n[s]).adjacentBox(0,a.width(),a.height()))}},hn.prototype.lineBox=function(){return this.box},hn.prototype.intervals=function(t,e,i,o){void 0===o&&(o=!1);for(var r=this.options.min,n=this.getDivisions(t),s=[],a=i||1,l=e||0;l<n;l+=a){var h=(360+r+l*t)%360;o&&u(h,o)||s.push(h)}return s},hn.prototype.majorIntervals=function(){return this.intervals(this.options.majorUnit)},hn.prototype.minorIntervals=function(){return this.intervals(this.options.minorUnit)},hn.prototype.intervalAngle=function(t){return(540-t-this.options.startAngle)%360},hn.prototype.createLine=function(){return[]},hn.prototype.majorGridLineAngles=function(t){var e=this.options.majorGridLines;return this.gridLineAngles(t,this.options.majorUnit,e.skip,e.step)},hn.prototype.minorGridLineAngles=function(t,e){var i=this.options,o=i.minorGridLines,r=i.majorGridLines,e=e?this.intervals(i.majorUnit,r.skip,r.step):null;return this.gridLineAngles(t,i.minorUnit,o.skip,o.step,e)},hn.prototype.plotBandSlot=function(t){return this.getSlot(t.from,t.to)},hn.prototype.getSlot=function(t,e){var i=this.options,o=this.box,r=i.startAngle,t=x(t,i.min,i.max),e=x(e||t,t,i.max);return i.reverse&&(t*=-1,e*=-1),(e=(540-e-r)%360)<(t=(540-t-r)%360)&&(i=t,t=e,e=i),new Fi(o.center(),0,o.height()/2,t,e-t)},hn.prototype.slot=function(t,e){var i=this.options,o=360-i.startAngle,r=this.getSlot(t,e=void 0===e?t:e),n=Math.min(t,e),t=Math.max(t,e),e=i.reverse?(s=n,t):(s=360-t,360-n),s=(s+o)%360;return new M.geometry.Arc([r.center.x,r.center.y],{startAngle:s,endAngle:e=(e+o)%360,radiusX:r.radius,radiusY:r.radius})},hn.prototype.getValue=function(t){var e=this.options,i=this.box.center(),o=t.x-i.x,t=Math.round(oe(Math.atan2(t.y-i.y,o))),i=e.startAngle;return e.reverse||(t*=-1,i*=-1),(t+i+360)%360},hn.prototype.valueRange=function(){return{min:0,max:2*Math.PI}},hn);function hn(t,e){$r.call(this,t,e);t=this.options;t.minorUnit=t.minorUnit||t.majorUnit/2}e(ln,{type:"polar",startAngle:0,reverse:!1,majorUnit:60,min:0,max:360,labels:{margin:w(10)},majorGridLines:{color:Y,visible:!0,width:1},minorGridLines:{color:"#aaa"}}),O(ln.prototype,rn,{createPlotBands:an.prototype.createPlotBands,majorAngles:an.prototype.majorAngles,range:Xr.prototype.range,labelsCount:Xr.prototype.labelsCount,createAxisLabel:Xr.prototype.createAxisLabel});let pn=ln,cn={options:{majorGridLines:{visible:!0}},createPlotBands:function(){var t=this.options,e=t.majorGridLines.type,i=t.plotBands;void 0===i&&(i=[]);for(var t=this.plotArea.polarAxis,o=t.majorAngles(),r=t.box.center(),n=this._plotbandGroup=new M.drawing.Group({zIndex:-1}),s=0;s<i.length;s++){var a=i[s],l={fill:{color:a.color,opacity:a.opacity},stroke:{opacity:a.opacity}},a=this.getSlot(a.from,a.to,!0),a=new Fi(r,r.y-a.y2,r.y-a.y1,0,360),a=e===H?Xi.current.createRing(a,l):M.drawing.Path.fromPoints(this.plotBandPoints(a,o),l).close();n.append(a)}this.appendVisual(n)},plotBandPoints:function(t,e){for(var i=[],o=[],r=[t.center.x,t.center.y],n=new M.geometry.Circle(r,t.innerRadius),s=new M.geometry.Circle(r,t.radius),a=0;a<e.length;a++)i.push(n.pointAt(e[a]+180)),o.push(s.pointAt(e[a]+180));return i.reverse(),i.push(i[0]),o.push(o[0]),o.concat(i)},createGridLines:function(t){var e=this.options,i=this.radarMajorGridLinePositions(),o=t.majorAngles(),t=t.box.center(),r=[];return e.majorGridLines.visible&&(r=this.renderGridLines(t,i,o,e.majorGridLines)),e.minorGridLines.visible&&(i=this.radarMinorGridLinePositions(),ee(r,this.renderGridLines(t,i,o,e.minorGridLines))),r},renderGridLines:function(t,e,i,o){var r={stroke:{width:o.width,color:o.color,dashType:o.dashType}},n=o.skip,s=(void 0===n&&(n=0),o.step);void 0===s&&(s=0);for(var a=this.gridLinesVisual(),l=n;l<e.length;l+=s){var h=t.y-e[l];if(0<h){var p=new M.geometry.Circle([t.x,t.y],h);if(o.type===H)a.append(new M.drawing.Circle(p,r));else{for(var c=new M.drawing.Path(r),u=0;u<i.length;u++)c.lineTo(p.pointAt(i[u]+180));c.close(),a.append(c)}}}return a.children},getValue:function(t){var e,i,o=this.lineBox(),r=this.plotArea.polarAxis,n=r.majorAngles(),r=r.box.center(),s=t.distanceTo(r),a=s;return this.options.majorGridLines.type!==H&&1<n.length&&(e=t.x-r.x,t=t.y-r.y,i=(oe(Math.atan2(t,e))+540)%360,n.sort(function(t,e){return un(t,i)-un(e,i)}),r=90-un(n[0],n[1])/2,t=180-un(i,n[0])-r,a=s*(Math.sin(ce(t))/Math.sin(ce(r)))),this.axisType().prototype.getValue.call(this,new A(o.x1,o.y2-a))}};function un(t,e){return 180-Math.abs(Math.abs(t-e)-180)}var dn,fn,gn,yn,i=cn,t=((dn=Xr)&&(vn.__proto__=dn),((vn.prototype=Object.create(dn&&dn.prototype)).constructor=vn).prototype.radarMajorGridLinePositions=function(){return this.getTickPositions(this.options.majorUnit)},vn.prototype.radarMinorGridLinePositions=function(){var t=this.options,e=0;return t.majorGridLines.visible&&(e=t.majorUnit),this.getTickPositions(t.minorUnit,e)},vn.prototype.axisType=function(){return dn},vn);function vn(){dn.apply(this,arguments)}O(t.prototype,i);let mn=t,xn=((fn=on)&&(_n.__proto__=fn),((_n.prototype=Object.create(fn&&fn.prototype)).constructor=_n).prototype.radarMajorGridLinePositions=function(){var e=[];return this.traverseMajorTicksPositions(function(t){e.push(t)},this.options.majorGridLines),e},_n.prototype.radarMinorGridLinePositions=function(){var e=[];return this.traverseMinorTicksPositions(function(t){e.push(t)},this.options.minorGridLines),e},_n.prototype.axisType=function(){return fn},_n);function _n(){fn.apply(this,arguments)}O(xn.prototype,i);let bn=xn;function wn(t){return t<=0?-1:1}(gn=M.Class)&&(An.__proto__=gn),((An.prototype=Object.create(gn&&gn.prototype)).constructor=An).prototype.process=function(t){var e=t.slice(0),i=[],o=this.closed,r=e.length;if(2<r&&(this.removeDuplicates(0,e),r=e.length),!(r<2||2===r&&e[0].equals(e[1]))){var n,s=e[0],a=e[1],l=e[2];for(i.push(new M.geometry.Segment(s));s.equals(e[r-1]);)o=!0,e.pop(),r--;if(2===r)t=this.tangent(s,a,y,v),he(i).controlOut(this.firstControlPoint(t,s,a,y,v)),i.push(new M.geometry.Segment(a,this.secondControlPoint(t,s,a,y,v)));else{o?(s=e[r-1],a=e[0],l=e[1],p=(t=this.controlPoints(s,a,l))[1],n=t[0]):(t=this.tangent(s,a,y,v),p=this.firstControlPoint(t,s,a,y,v));for(var h,p,c=p,u=0;u<=r-3;u++)this.removeDuplicates(u,e),u+3<=(r=e.length)&&(s=e[u],a=e[u+1],l=e[u+2],h=this.controlPoints(s,a,l),he(i).controlOut(c),c=h[1],h=h[0],i.push(new M.geometry.Segment(a,h)));o?(s=e[r-2],a=e[r-1],l=e[0],t=this.controlPoints(s,a,l),he(i).controlOut(c),i.push(new M.geometry.Segment(a,t[0])),he(i).controlOut(t[1]),i.push(new M.geometry.Segment(l,n))):(p=this.tangent(a,l,y,v),he(i).controlOut(c),i.push(new M.geometry.Segment(l,this.secondControlPoint(p,a,l,y,v))))}}return i},An.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)},An.prototype.invertAxis=function(t,e,i){var o,r=!1;return t.x===e.x?r=!0:e.x===i.x?(e.y<i.y&&t.y<=e.y||i.y<e.y&&e.y<=t.y)&&(r=!0):(o=this.lineFunction(t,e),o=this.calculateFunction(o,i.x),t.y<=e.y&&i.y<=o||e.y<=t.y&&i.y>=o||(r=!0)),r},An.prototype.isLine=function(t,e,i){var o=this.lineFunction(t,e),o=this.calculateFunction(o,i.x);return t.x===e.x&&e.x===i.x||L(o,1)===L(i.y,1)},An.prototype.lineFunction=function(t,e){e=(e.y-t.y)/(e.x-t.x);return[t.y-e*t.x,e]},An.prototype.controlPoints=function(t,e,i){var o,r=y,n=v,s=!1,a=!1,l=(this.isLine(t,e,i)?o=this.tangent(t,e,y,v):(l={x:this.isMonotonicByField(t,e,i,y),y:this.isMonotonicByField(t,e,i,v)}).x&&l.y?(o=this.tangent(t,i,y,v),s=!0):(this.invertAxis(t,e,i)&&(r=v,n=y),l[r]?o=0:(o=.01*(i[n]<t[n]&&t[n]<=e[n]||t[n]<i[n]&&e[n]<=t[n]?wn((i[n]-t[n])*(e[r]-t[r])):-wn((i[r]-t[r])*(e[n]-t[n]))),a=!0)),this.secondControlPoint(o,t,e,r,n)),a=(a&&(a=r,r=n,n=a),this.firstControlPoint(o,e,i,r,n));return s&&(this.restrictControlPoint(t,e,l,o),this.restrictControlPoint(e,i,a,o)),[l,a]},An.prototype.restrictControlPoint=function(t,e,i,o){t.y<e.y?e.y<i.y?(i.x=t.x+(e.y-t.y)/o,i.y=e.y):i.y<t.y&&(i.x=e.x-(e.y-t.y)/o,i.y=t.y):i.y<e.y?(i.x=t.x-(t.y-e.y)/o,i.y=e.y):t.y<i.y&&(i.x=e.x+(t.y-e.y)/o,i.y=t.y)},An.prototype.tangent=function(t,e,i,o){i=e[i]-t[i];return 0==i?0:(e[o]-t[o])/i},An.prototype.isMonotonicByField=function(t,e,i,o){return i[o]>e[o]&&e[o]>t[o]||i[o]<e[o]&&e[o]<t[o]},An.prototype.firstControlPoint=function(t,e,i,o,r){var n=e[o],i=.333*(i[o]-n);return this.point(n+i,e[r]+i*t,o,r)},An.prototype.secondControlPoint=function(t,e,i,o,r){var e=e[o],n=i[o],e=.333*(n-e);return this.point(n-e,i[r]-e*t,o,r)},An.prototype.point=function(t,e,i,o){var r=new M.geometry.Point;return r[i]=t,r[o]=e,r},An.prototype.calculateFunction=function(t,e){for(var i=t.length,o=0,r=0;r<i;r++)o+=Math.pow(e,r)*t[r];return o};let kn=An;function An(t){gn.call(this),this.closed=t}function Sn(t){yn.call(this),this._axis=t,this.options=t.options}(yn=M.Class)&&(Sn.__proto__=yn),((Sn.prototype=Object.create(yn&&yn.prototype)).constructor=Sn).prototype.value=function(t){var e=this._axis;return e.getCategory?e.getCategory(t):e.getValue(t)},Sn.prototype.slot=function(t,e,i){return this._axis.slot(t,e,i=void 0===i?!0:i)},Sn.prototype.range=function(){return this._axis.range()},Sn.prototype.valueRange=function(){return this._axis.valueRange()};let Cn=Sn;function Pn(t,e){for(var i=0;i<e.length;i++)if(e[i].options.name===t)return e[i].prepareUserOptions(),new Cn(e[i])}function Tn(t){this.visual=t.visual,this.chartsVisual=t.chartContainer.visual,this._pane=t}var Mn;Tn.prototype.findAxisByName=function(t){return Pn(t,this._pane.axes)};let On=Tn,Ln=((Mn=M.Class)&&(In.__proto__=Mn),(In.prototype=Object.create(Mn&&Mn.prototype)).constructor=In);function In(t){Mn.call(this),this._plotArea=t,this.visual=t.visual,this.backgroundVisual=t._bgVisual}function Bn(t){for(var e=t.length,i=0,o=0;o<e;o++)m(t[o])&&i++;return i}var En={min:function(t){for(var e=t.length,i=rt,o=0;o<e;o++){var r=t[o];m(r)&&(i=Math.min(i,r))}return i===rt?t[0]:i},max:function(t){for(var e=t.length,i=nt,o=0;o<e;o++){var r=t[o];m(r)&&(i=Math.max(i,r))}return i===nt?t[0]:i},sum:function(t){for(var e=t.length,i=0,o=0;o<e;o++){var r=t[o];m(r)&&(i+=r)}return i},sumOrNull:function(t){var e=null;return e=Bn(t)?En.sum(t):e},count:function(t){for(var e=t.length,i=0,o=0;o<e;o++){var r=t[o];null!==r&&k(r)&&i++}return i},avg:function(t){var e=Bn(t),i=t[0];return i=0<e?En.sum(t)/e:i},first:function(t){for(var e=t.length,i=0;i<e;i++){var o=t[i];if(null!==o&&k(o))return o}return t[0]}};let Rn=En;function Vn(t,e){return null===e?e:Ht(t)(e)}(jn=M.Class)&&(zn.__proto__=jn),((zn.prototype=Object.create(jn&&jn.prototype)).constructor=zn).prototype.register=function(t,e,i){void 0===e&&(e=[ut]),void 0===i&&(i={});for(var o=0;o<t.length;o++){var r=t[o];this._valueFields[r]=e,this._otherFields[r]=i,this._nullValue[r]=this._makeValue(e,null),this._undefinedValue[r]=this._makeValue(e,void 0)}},zn.prototype.canonicalFields=function(t){return this.valueFields(t).concat(this.otherFields(t))},zn.prototype.valueFields=function(t){return this._valueFields[t.type]||[ut]},zn.prototype.otherFields=function(t){return this._otherFields[t.type]||[ut]},zn.prototype.bindPoint=function(t,e,i){var o,r,n,s,a=t.data,i=k(i)?i:a[e],a={valueFields:{value:i}},e=this.valueFields(t),l=this._otherFields[t.type];return null===i?o=this._nullValue[t.type]:k(i)?Array.isArray(i)?(r=i.slice(e.length),o=this._bindFromArray(i,e),r=this._bindFromArray(r,l)):"object"==typeof i&&(n=this.sourceFields(t,e),s=this.sourceFields(t,l),o=this._bindFromObject(i,e,n),r=this._bindFromObject(i,l,s)):o=this._undefinedValue[t.type],k(o)&&(1===e.length?a.valueFields.value=o[e[0]]:a.valueFields=o),a.fields=r||{},a},zn.prototype._makeValue=function(t,e){for(var i={},o=t.length,r=0;r<o;r++)i[t[r]]=e;return i},zn.prototype._bindFromArray=function(t,e){var i={};if(e)for(var o=Math.min(e.length,t.length),r=0;r<o;r++)i[e[r]]=t[r];return i},zn.prototype._bindFromObject=function(t,e,i){void 0===i&&(i=e);var o={};if(e)for(var r=e.length,n=0;n<r;n++){var s=e[n],a=i[n];null!==a&&(o[s]=Vn(a,t))}return o},zn.prototype.sourceFields=function(t,e){var i=[];if(e)for(var o=e.length,r=0;r<o;r++){var n=e[r],s=n===ut?"field":n+"Field";i.push(null!==t[s]?t[s]||n:null)}return i};var jn,t=zn;function zn(){jn.call(this),this._valueFields={},this._otherFields={},this._nullValue={},this._undefinedValue={}}t.current=new t;let Dn=t;var Fn,Hn=/percent(?:\w*)\((\d+)\)/,Nn=new RegExp("^stddev(?:\\((\\d+(?:\\.\\d+)?)\\))?$");function Un(t,e,i){Fn.call(this),this.initGlobalRanges(t,e,i)}(Fn=M.Class)&&(Un.__proto__=Fn),((Un.prototype=Object.create(Fn&&Fn.prototype)).constructor=Un).prototype.initGlobalRanges=function(t,e,i){var o,r,n,s,a=e.data,l=Nn.exec(t);l?(this.valueGetter=this.createValueGetter(e,i),o=this.getAverage(a),r=this.getStandardDeviation(a,o,!1),l=l[1]?parseFloat(l[1]):1,n={low:o.value-r*l,high:o.value+r*l},this.globalRange=function(){return n}):t.indexOf&&0<=t.indexOf("stderr")&&(this.valueGetter=this.createValueGetter(e,i),s=this.getStandardError(a,this.getAverage(a)),this.globalRange=function(t){return{low:t-s,high:t+s}})},Un.prototype.createValueGetter=function(t,e){var i,o=t.data,r=Dn.current,n=r.valueFields(t),o=k(o[0])?o[0]:{};return yt(o)?i=Ht("["+(e?n.indexOf(e):0)+"]"):m(o)?i=Ht():typeof o==at&&(i=Ht(r.sourceFields(t,n)[n.indexOf(e)])),i},Un.prototype.getErrorRange=function(t,e){var i;if(!k(e))return null;if(this.globalRange)return this.globalRange(t);if(yt(e))o=t-e[0],r=t+e[1];else if(m(i=parseFloat(e)))o=t-i,r=t+i;else{if(!(i=Hn.exec(e)))throw new Error("Invalid ErrorBar value: "+e);var e=t*(parseFloat(i[1])/100),o=t-Math.abs(e),r=t+Math.abs(e)}return{low:o,high:r}},Un.prototype.getStandardError=function(t,e){return this.getStandardDeviation(t,e,!0)/Math.sqrt(e.count)},Un.prototype.getStandardDeviation=function(t,e,i){for(var o=t.length,i=i?e.count-1:e.count,r=0,n=0;n<o;n++){var s=this.valueGetter(t[n]);m(s)&&(r+=Math.pow(s-e.value,2))}return Math.sqrt(r/i)},Un.prototype.getAverage=function(t){for(var e=t.length,i=0,o=0,r=0;r<e;r++){var n=this.valueGetter(t[r]);m(n)&&(i+=n,o++)}return{value:i/o,count:o}};let Gn=Un;var Wn,Xn,i=M.support.browser||{},Yn=600,qn="fadeIn",Zn=i.msie?.001:0,Qn="errorLow",Kn="errorHigh",$n="zero",Jn="interpolate",ts="above",es="below",is="smooth",os="step",rs="area",ns="bar",ss="boxPlot",as="bubble",ls="bullet",hs="candlestick",ps="column",cs="donut",us="funnel",ds="pyramid",fs="heatmap",gs="horizontalWaterfall",ys="line",vs="ohlc",ms="pie",xs="polarArea",_s="polarLine",bs="polarScatter",ws="radarArea",ks="radarColumn",As="radarLine",Ss="rangeArea",Cs="rangeBar",Ps="rangeColumn",Ts="scatter",Ms="scatterLine",Os="verticalArea",Ls="verticalBoxPlot",Is="verticalBullet",Bs="verticalLine",Es="verticalRangeArea",Rs="waterfall",Vs=[ns,ps,vs,hs,ss,Ls,ls,Ps,Cs,Rs,gs],t="exponentialTrendline",i="linearTrendline",js="logarithmicTrendline",zs="movingAverageTrendline",Ds="polynomialTrendline",Fs="powerTrendline",Hs=[t,i,js,zs,Ds,Fs],Ns="legendItemClick",Us="seriesClick",Gs="seriesHover",Ws="seriesOver",Xs="seriesLeave",Ys="plotAreaHover",qs="plotAreaLeave",Zs="drag",Qs="dragEnd",Ks="dragStart",$s="zoomStart",Js="zoom",ta="zoomEnd",ea="selectStart",ia="select",oa="selectEnd",ra="showTooltip",na="hideTooltip",t="graphics-symbol",i="k-chart-point",js="Point",sa="log",zs="category",aa="insideEnd",la="outsideEnd",ha="wheel",Ds="drilldown",Fs="pattern",l=((Wn=o)&&(pa.__proto__=Wn),((pa.prototype=Object.create(Wn&&Wn.prototype)).constructor=pa).prototype.reflow=function(t){var e,i=this.options.endCaps,o=this.isVertical,r=this.getAxis().getSlot(this.low,this.high),n=t.center(),t=this.getCapsWidth(t,o),s=o?n.x:n.y,a=s-t,s=s+t;o?(e=[new A(n.x,r.y1),new A(n.x,r.y2)],i&&e.push(new A(a,r.y1),new A(s,r.y1),new A(a,r.y2),new A(s,r.y2)),this.box=new I(a,r.y1,s,r.y2)):(e=[new A(r.x1,n.y),new A(r.x2,n.y)],i&&e.push(new A(r.x1,a),new A(r.x1,s),new A(r.x2,a),new A(r.x2,s)),this.box=new I(r.x1,a,r.x2,s)),this.linePoints=e},pa.prototype.getCapsWidth=function(t,e){e=e?t.width():t.height();return Math.min(Math.floor(e/2),4)||4},pa.prototype.createVisual=function(){var e=this,t=this.options,i=t.visual;i?this.visual=i({low:this.low,high:this.high,rect:this.box.toRect(),sender:this.getSender(),options:{endCaps:t.endCaps,color:t.color,line:t.line},createVisual:function(){e.createDefaultVisual();var t=e.visual;return delete e.visual,t}}):this.createDefaultVisual()},pa.prototype.createDefaultVisual=function(){var t=this.options,e=this.linePoints,i={stroke:{color:t.color,width:t.line.width,dashType:t.line.dashType}};Wn.prototype.createVisual.call(this);for(var o=0;o<e.length;o+=2){var r=new M.drawing.Path(i).moveTo(e[o].x,e[o].y).lineTo(e[o+1].x,e[o+1].y);_t(r),this.visual.append(r)}},pa);function pa(t,e,i,o,r,n){Wn.call(this,n),this.low=t,this.high=e,this.isVertical=i,this.chart=o,this.series=r}e(l,{animation:{type:qn,delay:Yn},endCaps:!0,line:{width:2},zIndex:1});let ca=l,ua=((Xn=ca)&&(da.__proto__=Xn),((da.prototype=Object.create(Xn&&Xn.prototype)).constructor=da).prototype.getAxis=function(){return this.chart.seriesValueAxis(this.series)},da);function da(){Xn.apply(this,arguments)}let fa=ua;function ga(t){for(var e=0;e<t.length;e++)if(k(t[e].zIndex))return!0}function ya(t,e){null!==e&&t.push(e)}function va(t){return Bn(t)===t.length}function ma(t,e,i){var e=e.visible;return k(e)?e:(e=t.pointVisibility)?e[i]:void 0}function xa(t){for(var e=t.data,i=[],o=0,r=0,n=0;n<e.length;n++){var s=Dn.current.bindPoint(t,n),a=s.valueFields.value;m(a=wt(a)?parseFloat(a):a)?(s.visible=!1!==ma(t,s.fields,n),s.value=Math.abs(a),i.push(s),s.visible&&(o+=s.value),0!==a&&r++):i.push(null)}return{total:o,points:i,count:r}}function _a(t){for(var e=t.length,i=0,o=0;o<e;o++)i=Math.max(i,t[o].data.length);return i}function ba(t,e){return t&&e?t.toLowerCase()===e.toLowerCase():t===e}var wa=5;function ka(t,e,i,o){void 0===o&&(o=!1);var r,n,s=(i=void 0===i?{}:i).defaults=i.defaults||{},a=i.depth=i.depth||0,l=!1;if(i.excluded=i.excluded||[],wa<a)return null;for(r in t)!u(r,i.excluded)&&je(t,r)&&(Pt(n=t[r])?(l=!0,o||(t[r]=_(n(e),s[r]))):Ot(n)&&(o||(i.defaults=s[r]),i.depth++,l=ka(n,e,i,o)||l,i.depth--));return l}function Aa(t,e){for(var i=[],o=[].concat(e),r=0;r<t.length;r++){var n=t[r];u(n.type,o)&&i.push(n)}return i}var Sa=new WeakMap;function Ca(t,e,i){var o;return null===e||"object"!=typeof e?Sr(i,t):((o=Sa.get(e))||(o=Sr(i,t),Sa.set(e,o)),o)}function Pa(t){t=t.overlay;return t&&t.gradient&&"none"!==t.gradient}function Ta(t){return k(t)&&null!==t}function Ma(t,e){t=t.type,e=e instanceof Date;return!t&&e||ba(t,K)}function Oa(t){return 1===t.length?t[0]:t}var La=/area/i;function Ia(t,e){var i,o=Dn.current.bindPoint(t,null,e).valueFields;for(i in o)if(kt(o[i]))return!0}function Ba(t){for(var e,i,o=t.start,r=t.dir,n=t.min,s=t.max,a=t.getter,l=t.hasItem,h=t.series,p=o;l(p+=r)&&(e=Ia(h,(i=a(p)).item)),n<=p&&p<=s&&!e;);if(e)return i}function Ea(t,e,i,o,r){var n,s,a,l,h=e.min,e=e.max,p=0<h&&h<i,c=e+1<i;(p||c)&&(((l=t).missingValues||(La.test(l.type)||l.stack?$n:Jn))!==Jn?(p&&(n=o(h-1)),c&&(s=o(e+1))):(p&&(n=Ia(t,(a=o(h-1)).item)?a:Ba({start:h,dir:-1,min:0,max:i-1,getter:o,hasItem:r,series:t})),c&&(s=Ia(t,(a=o(e+1)).item)?a:Ba({start:e,dir:1,min:0,max:i-1,getter:o,hasItem:r,series:t}))),n&&(t._outOfRangeMinPoint=n),s)&&(t._outOfRangeMaxPoint=s)}(Ra=o)&&(za.__proto__=Ra),((za.prototype=Object.create(Ra&&Ra.prototype)).constructor=za).prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},za.prototype.pointOptions=function(t,e){var i,o=this.seriesOptions[e];return o||(i=this.pointType().prototype.defaults,this.seriesOptions[e]=o=O({},i,{vertical:!this.options.invertAxes},t)),o},za.prototype.plotValue=function(t){if(!t)return 0;if(this.options.isStacked100&&m(t.value)){for(var e=t.categoryIx,i=this.categoryPoints[e],o=[],r=0,n=0;n<i.length;n++){var s,a,l=i[n];l&&(s=t.series.stack,a=l.series.stack,s&&a&&s.group!==a.group||m(l.value)&&(r+=Math.abs(l.value),o.push(Math.abs(l.value))))}if(0<r)return t.value/r}return t.value},za.prototype.plotRange=function(t,e){void 0===e&&(e=0);var i=this.categoryPoints[t.categoryIx];if(this.options.isStacked){var o=this.plotValue(t),r=0<=o,n=e,s=!1,a=k(t.series.stack)?t.series.stack:this.options.defaultStack,l=function(t){return!0===t||typeof t==at&&!t.group};if(a)for(var h=0;h<i.length;h++){var p=i[h];if(t===p)break;var c=k(p.series.stack)?p.series.stack:this.options.defaultStack;!c||typeof a===ct&&a!==c||l(a)&&!l(c)||a.group&&a.group!==c.group||!(0<=(c=this.plotValue(p))&&r||c<0&&!r)||0!==e&&0===c||(n+=c,o+=c,s=!0,this.options.isStacked100&&(o=Math.min(o,1)))}return s&&(n-=e),[n,o]}var u=this.seriesValueAxis(t.series),u=this.categoryAxisCrossingValue(u);return[u,kt(t.value)?t.value:u]},za.prototype.stackLimits=function(t,e){for(var i=rt,o=nt,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],k(a)&&isFinite(a)&&(o=Math.max(o,a),i=Math.min(i,a)))}}return{min:i,max:o}},za.prototype.updateStackRange=function(){var t=this.options,e=t.isStacked,i=t.series,o={};if(e)for(var r=0;r<i.length;r++){var n=i[r],s=n.axis,a=s+n.stack,l=o[a];l||(l=this.stackLimits(s,n.stack),(n=this.errorTotals)&&(n.negative.length&&(l.min=Math.min(l.min,ke(n.negative).min)),n.positive.length)&&(l.max=Math.max(l.max,ke(n.positive).max)),l.min!==rt||l.max!==nt?o[a]=l:l=null),l&&(this.valueAxisRanges[s]=l)}},za.prototype.addErrorBar=function(t,e,i){var o,r=t.value,n=t.series,s=t.seriesIx,a=t.options.errorBars,l=e.fields[Qn],e=e.fields[Kn];m(l)&&m(e)?o={low:l,high:e}:a&&k(a.value)&&(this.seriesErrorRanges=this.seriesErrorRanges||[],this.seriesErrorRanges[s]=this.seriesErrorRanges[s]||new Gn(a.value,n,ut),o=this.seriesErrorRanges[s].getErrorRange(r,a.value)),o&&(t.low=o.low,t.high=o.high,this.addPointErrorBar(t,i))},za.prototype.addPointErrorBar=function(t,e){var i,o=!this.options.invertAxes,r=t.options.errorBars,n=t.series,s=t.low,a=t.high,e=(this.options.isStacked?(s=(i=this.stackedErrorRange(t,e)).low,a=i.high):(this.updateRange({value:s},i={categoryIx:e,series:n}),this.updateRange({value:a},i)),new fa(s,a,o,this,n,r));t.errorBars=[e],t.append(e)},za.prototype.stackedErrorRange=function(t,e){var i=this.plotRange(t,0)[1]-t.value,o=t.low+i,t=t.high+i;return this.errorTotals=this.errorTotals||{positive:[],negative:[]},o<0&&(this.errorTotals.negative[e]=Math.min(this.errorTotals.negative[e]||0,o)),0<t&&(this.errorTotals.positive[e]=Math.max(this.errorTotals.positive[e]||0,t)),{low:o,high:t}},za.prototype.addValue=function(t,e){var i=e.categoryIx,o=e.series,r=e.seriesIx,n=this.categoryPoints[i],s=(n||(this.categoryPoints[i]=n=[]),this.seriesPoints[r]),r=(s||(this.seriesPoints[r]=s=[]),this.createPoint(t,e));r&&(Object.assign(r,e),r.owner=this,r.noteText=t.fields.noteText,k(r.dataItem)||(r.dataItem=o.data[i]),this.addErrorBar(r,t,i)),this.points.push(r),s.push(r),n.push(r),this.updateRange(t.valueFields,e)},za.prototype.evalPointOptions=function(t,e,i){var o=i.categoryIx,r=i.category,n=i.series,i=i.seriesIx,s={defaults:n._defaults,excluded:["data","aggregate","_events","tooltip","content","template","visual","toggle","_outOfRangeMinPoint","_outOfRangeMaxPoint","drilldownSeriesFactory","ariaTemplate","ariaContent"]},a=this._evalSeries[i],i=(k(a)||(this._evalSeries[i]=a=ka(t,{},s,!0)),t);return a&&ka(i=O({},i),{value:e,category:r,index:o,series:n,dataItem:n.data[o]},s),i},za.prototype.updateRange=function(t,e){var e=e.series.axis,t=t.value,i=this.valueAxisRanges[e];isFinite(t)&&null!==t&&((i=this.valueAxisRanges[e]=i||{min:rt,max:nt}).min=Math.min(i.min,t),i.max=Math.max(i.max,t))},za.prototype.seriesValueAxis=function(t){var e=this.plotArea,t=t.axis,e=t?e.namedValueAxes[t]:e.valueAxis;if(e)return e;throw new Error("Unable to locate value axis with name "+t)},za.prototype.reflow=function(t){var s=this,a=this.categorySlots=[],l=this.points,h=this.categoryAxis,p=0;this.traverseDataPoints(function(t,e){var i,o=e.categoryIx,e=s.seriesValueAxis(e.series),r=l[p++],n=a[o];n||(a[o]=n=s.categorySlot(h,o,e)),r&&(o=s.plotRange(r,e.startValue()),(i=s.valueSlot(e,o))?(n=s.pointSlot(n,i),r.aboveAxis=s.aboveAxis(r,e),r.stackValue=o[1],s.options.isStacked100&&(r.percentage=s.plotValue(r)),s.reflowPoint(r,n)):r.visible=!1)}),this.reflowCategories(a),!this.options.clip&&this.options.limitPoints&&this.points.length&&this.limitPoints(),this.box=t},za.prototype.valueSlot=function(t,e){return t.getSlot(e[0],e[1],!this.options.clip)},za.prototype.limitPoints=function(){for(var t=this.categoryPoints,e=t[0].concat(he(t)),i=0;i<e.length;i++)e[i]&&this.limitPoint(e[i])},za.prototype.limitPoint=function(t){var e=this.categoryAxis.limitSlot(t.box);e.equals(t.box)||t.reflow(e)},za.prototype.aboveAxis=function(t,e){var i=this.categoryAxisCrossingValue(e),t=t.value;return e.options.reverse?t<i:i<=t},za.prototype.categoryAxisCrossingValue=function(t){var e=this.categoryAxis,t=t.options;return[].concat(t.axisCrossingValues||t.axisCrossingValue)[e.axisIndex||0]||0},za.prototype.reflowPoint=function(t,e){t.reflow(e)},za.prototype.reflowCategories=function(){},za.prototype.pointSlot=function(t,e){var i=this.options.invertAxes,o=i?e:t,i=i?t:e;return new I(o.x1,i.y1,o.x2,i.y2)},za.prototype.categorySlot=function(t,e){return t.getSlot(e)},za.prototype.traverseDataPoints=function(t){for(var e=this.options.series,i=_a(e),o=e.length,r=0;r<o;r++)this._outOfRangeCallback(e[r],"_outOfRangeMinPoint",r,t);for(var n=0;n<i;n++)for(var s=0;s<o;s++){var a=e[s],l=this.categoryAxis.categoryAt(n);t(this.plotArea.bindPoint(a,n),{category:l,categoryIx:n,categoriesCount:i,series:a,seriesIx:s})}for(var h=0;h<o;h++)this._outOfRangeCallback(e[h],"_outOfRangeMaxPoint",h,t)},za.prototype._outOfRangeCallback=function(t,e,i,o){var r,e=t[e];e&&(r=e.categoryIx,o(this.plotArea.bindPoint(t,r,e.item),{category:e.category,categoryIx:r,series:t,seriesIx:i,dataItem:e.item}))},za.prototype.formatPointValue=function(t,e){return null===t.value?"":this.chartService.format.auto(e,t.value)},za.prototype.pointValue=function(t){return t.valueFields.value};var Ra,Va,ja,l=za;function za(t,e){Ra.call(this,e),this.plotArea=t,this.chartService=t.chartService,this.categoryAxis=t.seriesCategoryAxis(e.series[0]),this.valueAxisRanges={},this.points=[],this.categoryPoints=[],this.seriesPoints=[],this.seriesOptions=[],this._evalSeries=[],this.render()}e(l,{series:[],invertAxes:!1,isStacked:!1,clip:!0,limitPoints:!0});let Da=l,Fa={click:function(t,e){return t.trigger(Us,this.eventArgs(e))},hover:function(t,e){return t.trigger(Gs,this.eventArgs(e))},over:function(t,e){return t.trigger(Ws,this.eventArgs(e))},out:function(t,e){return t.trigger(Xs,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:ae(t),originalEvent:t,point:this}}},Ha=Fa,Na={createNote:function(){var t=this.options.notes,e=this.noteText||t.label.text;!1!==t.visible&&k(e)&&null!==e&&(this.note=new Ro({value:this.value,text:e,dataItem:this.dataItem,category:this.category,series:this.series},this.options.notes,this.owner.chartService),this.append(this.note))}},Ua=((Va=o)&&(Ga.__proto__=Va),((Ga.prototype=Object.create(Va&&Va.prototype)).constructor=Ga).prototype.render=function(){var t=this.options.markers;this._rendered||(this._rendered=!0,t.visible&&t.size&&(this.marker=this.createMarker(),this.append(this.marker)),this.createLabel(),this.createNote(),this.errorBar&&this.append(this.errorBar))},Ga.prototype.createLabel=function(){var t=this.options.labels;t.visible&&(this.label=this.createLabelElement(t),this.append(this.label))},Ga.prototype.createLabelElement=function(t){return new So(this.getLabelText(t),O({align:b,vAlign:b,margin:{left:5,right:5},zIndex:_(t.zIndex,this.series.zIndex)},t),this.pointData())},Ga.prototype.getLabelText=function(t){var e=jt(t);return e?e(this.pointData()):t.format?this.formatValue(t.format):this.value},Ga.prototype.getAriaLabelText=function(){var t=this.options.labels,e=zt(t);return e?e(this.pointData()):this.getLabelText(t)},Ga.prototype.markerBorder=function(){var t=this.options.markers,e=t.background,t=O({color:this.color},t.border);return k(t.color)||(t.color=new M.Color(e).brightness(.8).toHex()),t},Ga.prototype.createVisual=function(){},Ga.prototype.createMarker=function(){var t=this.options.markers;return new oo({type:t.type,width:t.size,height:t.size,rotation:t.rotation,background:t.background,border:this.markerBorder(),opacity:t.opacity,pattern:this.options.pattern,zIndex:_(t.zIndex,this.series.zIndex),animation:t.animation,visual:t.visual,accessibilityOptions:O({ariaLabel:this.getAriaLabelText(this.options.labels)},this.options.accessibility)},{dataItem:this.dataItem,value:this.value,series:this.series,category:this.category})},Ga.prototype.markerBox=function(){return this.marker||(this.marker=this.createMarker(),this.marker.reflow(this._childBox)),this.marker.box},Ga.prototype.reflow=function(t){var e=this.options,i=this.aboveAxis,o=e.vertical,r=(this.render(),(this.box=t).clone());if(o?i?r.y1-=r.height():r.y2+=r.height():i?r.x1+=r.width():r.x2-=r.width(),this._childBox=r,this.marker&&this.marker.reflow(r),this.reflowLabel(r),this.errorBars)for(var n=0;n<this.errorBars.length;n++)this.errorBars[n].reflow(r);this.note&&(t=this.markerBox(),e.markers.visible&&e.markers.size||(o=t.center(),t=new I(o.x,o.y,o.x,o.y)),this.note.reflow(t))},Ga.prototype.reflowLabel=function(t){var e=this.options,i=this.label,e=e.labels.position;i&&(e=(e=e===ts?T:e)===es?S:e,i.reflow(t),i.box.alignTo(this.markerBox(),e),i.reflow(i.box))},Ga.prototype.createHighlight=function(){var t=this.options.highlight.markers,e=this.markerBorder().color,i=this.options.markers,o=i.size+(i.border.width||0)+(t.border.width||0),o=new oo({type:i.type,width:o,height:o,rotation:i.rotation,background:t.color||e,border:{color:t.border.color,width:t.border.width,opacity:_(t.border.opacity,1)},opacity:_(t.opacity,1)});return o.reflow(this._childBox),o.getElement()},Ga.prototype.highlightVisual=function(){return(this.marker||{}).visual},Ga.prototype.highlightVisualArgs=function(){var t,e,i,o,r=this.marker;return r?(o=r.paddingBox.toRect(),t=r.visual):(e=(r=this.options.markers.size)/2,i=this.box.center(),o=new M.geometry.Rect([i.x-e,i.y-e],[r,r])),{options:this.options,rect:o,visual:t}},Ga.prototype.createFocusHighlight=function(){var t=this.options.markers,e=this.options.focusHighlight,i=t.size+(t.border.width||0),i=new oo({type:t.type,width:i,height:i,rotation:t.rotation,background:e.color,border:e.border,opacity:e.opacity,padding:e.border.width/2,zIndex:e.zIndex});return i.reflow(this._childBox),i.getElement()},Ga.prototype.tooltipAnchor=function(){var t,e,i=this.markerBox(),o=this.owner.pane.clipBox();if(!o||o.overlaps(i))return o=i.x2+5,e=C,i=this.aboveAxis?(t=i.y1,S):(t=i.y2,T),{point:new A(o,t),align:{horizontal:e,vertical:i}}},Ga.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Ga.prototype.overlapsBox=function(t){return this.markerBox().overlaps(t)},Ga.prototype.unclipElements=function(){this.label&&(this.label.options.noclip=!0),this.note&&(this.note.options.noclip=!0)},Ga.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,stackValue:this.stackValue,series:this.series}},Ga.prototype.focusVisual=function(){this.marker&&(this.marker.visual&&this.marker.visual.options.set("id",this._id),this.toggleFocusHighlight(!0))},Ga.prototype.clearFocusFromVisual=function(){this.marker&&(this.marker.visual&&this.marker.visual.options.set("id",""),this.toggleFocusHighlight(!1))},Ga.prototype.getIndex=function(){return k(this.categoryIx)?this.categoryIx:this.pointIx},Ga);function Ga(t,e){Va.call(this),this.value=t,this.options=e,this.aboveAxis=_(this.options.aboveAxis,!0),this.tooltipTracking=!0,this._id=Ue()}Ua.prototype.defaults={vertical:!0,markers:{visible:!0,background:a,size:8,type:q,border:{width:2},opacity:1},labels:{visible:!1,position:ts,margin:w(3),padding:w(4),animation:{type:qn,delay:Yn}},notes:{label:{}},highlight:{markers:{border:{color:"#fff",width:2}},zIndex:100},errorBars:{line:{width:1}},accessibility:{tabIndex:0,role:t,className:i,ariaRoleDescription:js}},O(Ua.prototype,Ha),O(Ua.prototype,Na);let Wa=Ua,Xa=((ja=o)&&(Ya.__proto__=ja),((Ya.prototype=Object.create(ja&&ja.prototype)).constructor=Ya).prototype.points=function(){return this.toGeometryPoints(this.linePoints)},Ya.prototype.toGeometryPoints=function(t){for(var e=[],i=0,o=t.length;i<o;i++)t[i]&&!1!==t[i].visible&&e.push(t[i]._childBox.toRect().center());return e},Ya.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&&!k(this.visual.options.zIndex)&&(this.visual.options.zIndex=this.series.zIndex)):this.segmentVisual()},Ya.prototype.segmentVisual=function(){var t=this.options,e=this.series,i=e.color,o=e._defaults,o=(Pt(i)&&o&&(i=o.color),M.drawing.Path.fromPoints(this.points(),{stroke:{color:i,width:e.width,opacity:e.opacity,dashType:e.dashType},zIndex:e.zIndex}));t.closed&&o.close(),this.visual=o},Ya.prototype.aliasFor=function(t,e){return this.parent.getNearestPoint(e.x,e.y,this.seriesIx)},Ya);function Ya(t,e,i){ja.call(this),this.linePoints=t,this.series=e,this.seriesIx=i}e(Xa,{closed:!1});let qa=Xa,Za={calculateStepPoints:function(t){for(var e=this.parent.plotArea.seriesCategoryAxis(this.series).options,i=e.justified,o=e.vertical,e=e.reverse,r=o?y:v,n=o?v:y,s=e?2:1,a=s,l=Qa(t[0],r,s,n,a),h=[l],p=1;p<t.length;p++){var c,u=Qa(t[p],r,s,n,a);l[r]!==u[r]&&((c=new M.geometry.Point)[r]=l[r],c[n]=u[n],h.push(c,u)),l=u}return i?l!==he(h)&&h.push(l):h.push(Qa(he(t),r,s,n,e?1:2)),h}};function Qa(t,e,i,o,r){var t=t.box,n=new M.geometry.Point;return n[e]=t[e+i],n[o]=t[o+r],n}var Ka,$a,l=Za,Ja=((Ka=qa)&&(tl.__proto__=Ka),((tl.prototype=Object.create(Ka&&Ka.prototype)).constructor=tl).prototype.points=function(){return this.calculateStepPoints(this.linePoints)},tl);function tl(){Ka.apply(this,arguments)}O(Ja.prototype,l);let el=Ja,il=(($a=qa)&&(ol.__proto__=$a),((ol.prototype=Object.create($a&&$a.prototype)).constructor=ol).prototype.segmentVisual=function(){var t=this.series,e=t._defaults,i=t.color,e=(Pt(i)&&e&&(i=e.color),new kn(this.options.closed).process(this.points())),i=new M.drawing.Path({stroke:{color:i,width:t.width,opacity:t.opacity,dashType:t.dashType},zIndex:t.zIndex});i.segments.push.apply(i.segments,e),this.visual=i},ol);function ol(){$a.apply(this,arguments)}let rl=il,nl={renderSegments:function(){var t,e=this.options,i=this.seriesPoints,o=e.series,r=i.length;this._segments=[];for(var n=0;n<r;n++){for(var s=o[n],a=this.sortPoints(i[n]),l=a.length,h=[],p=0;p<l;p++){var c=a[p];c?h.push(c):this.seriesMissingValues(s)!==Jn&&(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?$n:t||Jn},getNearestPoint:function(t,e,i){for(var o,r=new A(t,e),n=this.seriesPoints[i],s=rt,a=0;a<n.length;a++){var l,h=n[a];h&&k(h.value)&&null!==h.value&&!1!==h.visible&&(l=h.box.center().distanceTo(r))<s&&(o=h,s=l)}return o}};var sl,al,ll,hl,pl,cl,ul,dl,fl,Ja=nl,gl=((sl=M.drawing.Animation)&&(yl.__proto__=sl),((yl.prototype=Object.create(sl&&sl.prototype)).constructor=yl).prototype.setup=function(){this._setEnd(this.options.box.x1)},yl.prototype.step=function(t){var e=this.options.box;this._setEnd(Xt(e.x1,e.x2,t))},yl.prototype._setEnd=function(t){var e=this.element,i=e.segments,o=i[1].anchor(),i=i[2].anchor();e.suspend(),o.setX(t),e.resume(),i.setX(t)},yl);function yl(){sl.apply(this,arguments)}e(gl,{duration:Yn}),M.drawing.AnimationFactory.current.register("clip",gl);let vl=gl,ml={createAnimation:function(){var t,e=this.getRoot();e&&!1!==(e.options||{}).transitions&&(e=e.size(),t=M.drawing.Path.fromRect(e.toRect()),this.visual.clip(t),this.animation=new vl(t,{box:e}),ga(this.options.series))&&this._setChildrenAnimation(t)},_setChildrenAnimation:function(t){for(var e=this.animationPoints(),i=0;i<e.length;i++){var o=e[i];o&&o.visual&&k(o.visual.options.zIndex)&&o.visual.clip(t)}}},xl=((al=Da)&&(_l.__proto__=al),((_l.prototype=Object.create(al&&al.prototype)).constructor=_l).prototype.render=function(){al.prototype.render.call(this),this.updateStackRange(),this.renderSegments()},_l.prototype.pointType=function(){return Wa},_l.prototype.createPoint=function(t,e){var i=e.series,o=e.seriesIx,r=this.seriesMissingValues(i),n=t.valueFields.value;if(!k(n)||null===n){if(r!==$n)return null;n=0}r=this.pointOptions(i,o),r=this.evalPointOptions(r,n,e),o=t.fields.color||i.color,Pt(i.color)&&(o=r.color),e=new Wa(n,r);return e.color=o,this.append(e),e},_l.prototype.plotRange=function(t){var e=this.plotValue(t);if(this.options.isStacked)for(var i=t.categoryIx,o=this.categoryPoints[i],r=0;r<o.length;r++){var n=o[r];if(t===n)break;e+=this.plotValue(n),this.options.isStacked100&&(e=Math.min(e,1))}return[e,e]},_l.prototype.createSegment=function(t,e,i){var o=e.style;return new(o===os?el:o===is?rl:qa)(t,e,i)},_l.prototype.animationPoints=function(){for(var t=this.points,e=[],i=0;i<t.length;i++)e.push((t[i]||{}).marker);return e.concat(this._segments)},_l.prototype.supportsPointInactiveOpacity=function(){return!1},_l);function _l(){al.apply(this,arguments)}O(xl.prototype,Ja,ml);let bl=xl,wl=((ll=qa)&&(kl.__proto__=ll),((kl.prototype=Object.create(ll&&ll.prototype)).constructor=kl).prototype.createVisual=function(){var t=this.series,e=t._defaults,i=t.line||{},o=t.color;Pt(o)&&e&&(o=e.color),this.visual=new M.drawing.Group({zIndex:t.zIndex}),this.createFill({fill:Qi(t.pattern,{color:o,opacity:t.opacity}),stroke:null}),0<i.width&&!1!==i.visible&&this.createStroke({stroke:O({color:o,opacity:t.opacity,lineCap:"butt"},i)})},kl.prototype.strokeSegments=function(){return this._strokeSegments||(this._strokeSegments=this.createStrokeSegments())},kl.prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.points())},kl.prototype.stackSegments=function(){return(this.prevSegment||this).createStackSegments(this.stackPoints)},kl.prototype.createStackSegments=function(t){return this.segmentsFromPoints(this.toGeometryPoints(t)).reverse()},kl.prototype.segmentsFromPoints=function(t){return t.map(function(t){return new M.geometry.Segment(t)})},kl.prototype.createStroke=function(t){t=new M.drawing.Path(t);t.segments.push.apply(t.segments,this.strokeSegments()),this.visual.append(t)},kl.prototype.hasStackSegment=function(){return this.prevSegment||this.stackPoints&&this.stackPoints.length},kl.prototype.createFill=function(t){var e=this.strokeSegments(),i=e.slice(0),o=this.hasStackSegment(),r=(o&&(r=this.stackSegments(),ee(i,r)),new M.drawing.Path(t));r.segments.push.apply(r.segments,i),!o&&1<e.length&&this.fillToAxes(r),this.visual.append(r)},kl.prototype.fillToAxes=function(t){var e=this.parent,i=e.options.invertAxes,o=e.seriesValueAxis(this.series),e=e.categoryAxisCrossingValue(o),o=o.getSlot(e,e,!0),e=this.strokeSegments(),r=e[0].anchor(),e=he(e).anchor(),o=i?o.x1:o.y1;i?t.lineTo(o,e.y).lineTo(o,r.y):t.lineTo(e.x,o).lineTo(r.x,o)},kl);function kl(t,e,i,o,r){ll.call(this,t,e,i),this.prevSegment=o,this.stackPoints=r}let Al=wl,Sl=((hl=Al)&&(Cl.__proto__=hl),((Cl.prototype=Object.create(hl&&hl.prototype)).constructor=Cl).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.calculateStepPoints(this.linePoints))},Cl.prototype.createStackSegments=function(t){return this.segmentsFromPoints(this.calculateStepPoints(t)).reverse()},Cl);function Cl(){hl.apply(this,arguments)}O(Sl.prototype,l);let Pl=Sl,Tl=((pl=Al)&&(Ml.__proto__=pl),((Ml.prototype=Object.create(pl&&pl.prototype)).constructor=Ml).prototype.createStrokeSegments=function(){var t=new kn(this.options.closed),e=this.points();return t.process(e)},Ml.prototype.createStackSegments=function(){for(var t=this.strokeSegments(),e=[],i=t.length-1;0<=i;i--){var o=t[i];e.push(new M.geometry.Segment(o.anchor(),o.controlOut(),o.controlIn()))}return e},Ml);function Ml(){pl.apply(this,arguments)}let Ol=Tl,Ll=((cl=bl)&&(Il.__proto__=cl),((Il.prototype=Object.create(cl&&cl.prototype)).constructor=Il).prototype.createSegment=function(t,e,i,o){var r,n,s=this.options.isStacked,a=(e.line||{}).style;return s&&0<i&&o&&("gap"!==this.seriesMissingValues(e)?(n=o.linePoints,r=o):n=this._gapStackPoints(t,i,a)),new(a===os?Pl:a===is?Ol:Al)(t,e,i,r,n)},Il.prototype.reflow=function(t){cl.prototype.reflow.call(this,t);var e=this._stackPoints;if(e)for(var i=0;i<e.length;i++){var o=e[i],r=this.categoryAxis.getSlot(o.categoryIx);o.reflow(r)}},Il.prototype._gapStackPoints=function(t,e,i){var o=this.seriesPoints,r=t[0].categoryIx,t=t.length,n=(r<0&&(r=0,t--),r+t),s=this.seriesOptions[0]._outOfRangeMinPoint?1:0,a=[];this._stackPoints=this._stackPoints||[];for(var l=r;l<n;l++){for(var h,p=l+s,c=e,u=void 0;u=o[--c][p],0<c&&!u;);u?(i!==os&&r<l&&!o[c][p-1]&&a.push(this._previousSegmentPoint(l,p,p-1,c)),a.push(u),i!==os&&l+1<n&&!o[c][p+1]&&a.push(this._previousSegmentPoint(l,p,p+1,c))):(h=this._createGapStackPoint(l),this._stackPoints.push(h),a.push(h))}return a},Il.prototype._previousSegmentPoint=function(t,e,i,o){for(var r,n=this.seriesPoints,s=o;0<s&&!r;)r=n[--s][i];return r?r=n[s][e]:(r=this._createGapStackPoint(t),this._stackPoints.push(r)),r},Il.prototype._createGapStackPoint=function(t){var e=this.pointOptions({},0),e=new Wa(0,e);return e.categoryIx=t,e.series={},e},Il.prototype.seriesMissingValues=function(t){return t.missingValues||$n},Il.prototype.supportsPointInactiveOpacity=function(){return!1},Il);function Il(){cl.apply(this,arguments)}let Bl=Ll,El=((ul=M.Class)&&(Rl.__proto__=ul),((Rl.prototype=Object.create(ul&&ul.prototype)).constructor=Rl).prototype.update=function(t){var e,i=this.axisRanges;for(e in t){var o=t[e],r=i[e];i[e]=r=r||{min:rt,max:nt},r.min=Math.min(r.min,o.min),r.max=Math.max(r.max,o.max)}},Rl.prototype.reset=function(t){this.axisRanges[t]=void 0},Rl.prototype.query=function(t){return this.axisRanges[t]},Rl);function Rl(){ul.call(this),this.axisRanges={}}let Vl=El,jl=((dl=o)&&(zl.__proto__=dl),((zl.prototype=Object.create(dl&&dl.prototype)).constructor=zl).prototype.createVisual=function(){this.textBox.options.noclip=this.options.noclip},zl.prototype.reflow=function(t){var e,i=this.options,o=i.vertical,r=i.aboveAxis,n=this.children[0],s=n.options,a=n.box,l=n.options.padding,h=t;s.align=o?b:C,s.vAlign=o?T:b,i.position===aa?o?(s.vAlign=T,!r&&a.height()<t.height()&&(s.vAlign=S)):s.align=r?P:C:i.position===b?(s.vAlign=b,s.align=b):"insideBase"===i.position?o?s.vAlign=r?S:T:s.align=r?C:P:i.position===la&&(h=o?r?(e=(a.width()-t.width()-l.left-l.right)/2,new I(t.x1-e,t.y1-a.height(),t.x2+e,t.y1)):new I(t.x1,t.y2,t.x2,t.y2+a.height()):(s.align=b,r?new I(t.x2,t.y1,t.x2+a.width(),t.y2):new I(t.x1-a.width(),t.y1,t.x1,t.y2))),i.rotation||(o?l.left=l.right=(h.width()-n.contentBox.width())/2:l.top=l.bottom=(h.height()-n.contentBox.height())/2),n.reflow(h)},zl.prototype.alignToClipBox=function(t){var e=this.options.vertical?v:y,i=e+"1",e=e+"2",o=this.children[0],r=this.parent.box;(r[i]<t[i]||t[e]<r[e])&&((o=o.paddingBox.clone())[i]=Math.max(r[i],t[i]),o[e]=Math.min(r[e],t[e]),this.reflow(o))},zl);function zl(t,e,i){dl.call(this,e),this.textBox=new So(t,this.options,i),this.append(this.textBox)}e(jl,{position:la,margin:w(3),padding:w(4),color:Y,background:"",border:{width:1,color:""},aboveAxis:!0,vertical:!1,animation:{type:qn,delay:Yn},zIndex:2});let Dl=jl,Fl={addAccessibilityAttributesToVisual:function(){this._id=this._id||Ue();var t=O({ariaLabel:this.getAriaLabelText()},this.options.accessibility);to(this.visual,t)},getAriaLabelText:function(){var t=this.options.labels,e=zt(t);return e?e(this.pointData()):this.getLabelText(t)},focusVisual:function(){this.visual.options.set("id",this._id),this.toggleFocusHighlight(!0)},clearFocusFromVisual:function(){this.visual.options.set("id",""),this.toggleFocusHighlight(!1)}},Hl=((fl=o)&&(Nl.__proto__=fl),((Nl.prototype=Object.create(fl&&fl.prototype)).constructor=Nl).prototype.render=function(){this._rendered||(this._rendered=!0,this.createLabel(),this.createNote(),this.errorBar&&this.append(this.errorBar))},Nl.prototype.createLabel=function(){var t=this.options.labels;t.visible&&(this.label=this.createLabelElement(t),this.append(this.label))},Nl.prototype.createLabelElement=function(t){return new Dl(this.getLabelText(t),O({vertical:this.options.vertical},t),this.pointData())},Nl.prototype.getLabelText=function(t){var e=jt(t);return e?e(this.pointData()):this.formatValue(t.format)},Nl.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Nl.prototype.reflow=function(t){this.render();var e=this.label;if(this.box=t,e&&(e.options.aboveAxis=this.aboveAxis,e.reflow(t)),this.note&&this.note.reflow(t),this.errorBars)for(var i=0;i<this.errorBars.length;i++)this.errorBars[i].reflow(t)},Nl.prototype.createVisual=function(){var e=this,t=this.box,i=this.options,o=i.visual;!1!==this.visible&&(fl.prototype.createVisual.call(this),this.addAccessibilityAttributesToVisual(),o?(o=this.rectVisual=o({category:this.category,dataItem:this.dataItem,value:this.value,sender:this.getSender(),series:this.series,percentage:this.percentage,stackValue:this.stackValue,runningTotal:this.runningTotal,total:this.total,rect:t.toRect(),createVisual:function(){var t=new M.drawing.Group;return e.createRect(t),t},options:i}))&&this.visual.append(o):0<t.width()&&0<t.height()&&this.createRect(this.visual))},Nl.prototype.createRect=function(t){var e=this.options,i=e.border,o=(k(i.opacity)?i:e).opacity,r=this.box.toRect(),r=(r.size.width=Math.round(r.size.width),this.rectVisual=M.drawing.Path.fromRect(r,{fill:Qi(e.pattern,{color:this.color,opacity:e.opacity}),stroke:{color:this.getBorderColor(),width:i.width,opacity:o,dashType:i.dashType}})),o=this.box.width(),i=this.box.height();6<(e.vertical?o:i)&&(_t(r),o<1||i<1)&&(r.options.stroke.lineJoin="round"),t.append(r),Pa(e)&&(o=this.createGradientOverlay(r,{baseColor:this.color},O({end:e.vertical?void 0:[0,1]},e.overlay)),t.append(o))},Nl.prototype.createHighlight=function(t){return _t(M.drawing.Path.fromRect(this.box.toRect(),t))},Nl.prototype.highlightVisual=function(){return this.rectVisual},Nl.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this.rectVisual}},Nl.prototype.createFocusHighlight=function(t){var e=this.options.focusHighlight.border.width;return _t(M.drawing.Path.fromRect(this.box.pad(e/2).toRect(),t))},Nl.prototype.getBorderColor=function(){var t=this.color,e=this.options.border,i=e._brightness||.8,e=e.color;return e=k(e)?e:new M.Color(t).brightness(i).toHex()},Nl.prototype.tooltipAnchor=function(){var t,e,i,o,r=this.options,n=this.box,s=this.aboveAxis,a=this.owner.pane.clipBox()||n,l=C,h=T;return r.vertical?(t=Math.min(n.x2,a.x2)+5,s?o=Math.max(n.y1,a.y1):(o=Math.min(n.y2,a.y2),h=S)):(e=Math.max(n.x1,a.x1),i=Math.min(n.x2,a.x2),o=r.isStacked?(h=S,t=s?(l=P,i):e,Math.max(n.y1,a.y1)-5):(s?t=i+5:(t=e-5,l=P),Math.max(n.y1,a.y1))),{point:new A(t,o),align:{horizontal:l,vertical:h}}},Nl.prototype.overlapsBox=function(t){return this.box.overlaps(t)},Nl.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}},Nl.prototype.getIndex=function(){return this.categoryIx},Nl);function Nl(t,e){fl.call(this),this.options=e,this.color=e.color||a,this.aboveAxis=_(this.options.aboveAxis,!0),this.value=t}O(Hl.prototype,Ha),O(Hl.prototype,Na),O(Hl.prototype,Fl),Hl.prototype.defaults={border:{width:1},vertical:!0,overlay:{gradient:"glass"},labels:{visible:!1,format:"{0}"},opacity:1,notes:{label:{}},accessibility:{role:t,className:i,ariaRoleDescription:js}};let Ul=Hl;function Gl(t,e){t.forEach(e)}function Wl(t,e){for(var i=t.length,o=i-1;0<=o;o--)e(t[o],o-i-1)}(Xl=o)&&(lh.__proto__=Xl),((lh.prototype=Object.create(Xl&&Xl.prototype)).constructor=lh).prototype.reflow=function(o){var t=this.options,e=t.vertical,i=t.gap,r=t.spacing,t=this.children,n=t.length,s=e?v:y,a=n+i+r*(n-1),l=(e?o.height():o.width())/a,h=o[s+1]+i/2*l;this.forEach(t,function(t,e){var i=(t.box||o).clone();i[s+1]=h,i[s+2]=h+l,t.reflow(i),e<n-1&&(h+=l*r),h+=l})};var Xl,Yl,ql,Zl,Ql,Kl,$l,Jl,th,eh,ih,oh,rh,nh,sh,ah,gl=lh;function lh(t){Xl.call(this,t),this.forEach=t.rtl?Wl:Gl}e(gl,{vertical:!1,gap:0,spacing:0});let hh=gl,ph=((Yl=o)&&(ch.__proto__=Yl),((ch.prototype=Object.create(Yl&&Yl.prototype)).constructor=ch).prototype.reflow=function(t){for(var e=this.options.vertical?y:v,i=this.children,o=i.length,r=this.box=new I,n=0;n<o;n++){var s,a=i[n];!1!==a.visible&&((s=a.box.clone()).snapTo(t,e),0===n&&(r=this.box=s.clone()),a.reflow(s),r.wrap(s))}},ch);function ch(){Yl.apply(this,arguments)}e(ph,{vertical:!0});let uh=ph,dh=((ql=Da)&&(fh.__proto__=ql),((fh.prototype=Object.create(ql&&ql.prototype)).constructor=fh).prototype.render=function(){ql.prototype.render.call(this),this.updateStackRange()},fh.prototype.pointType=function(){return Ul},fh.prototype.clusterType=function(){return hh},fh.prototype.stackType=function(){return uh},fh.prototype.stackLimits=function(t,e){return ql.prototype.stackLimits.call(this,t,e)},fh.prototype.createPoint=function(t,e){var i=e.categoryIx,o=e.series,r=e.seriesIx,n=this.options,s=this.children,a=k(o.stack)?o.stack:n.defaultStack,l=this.pointValue(t),r=this.pointOptions(o,r),h=r.labels,h=(a&&h.position===la&&(h.position=aa),r.isStacked=a,t.fields.color||o.color),t=(l<0&&r.negativeColor&&(h=r.negativeColor),r=this.evalPointOptions(r,l,e),Pt(o.color)&&(h=r.color),new(this.pointType())(l,r)),e=(t.color=h,s[i]);return e||(e=new(this.clusterType())({vertical:n.invertAxes,gap:n.gap,spacing:n.spacing,rtl:!n.invertAxes&&(this.chartService||{}).rtl}),this.append(e)),(n.isStacked?this.getStackWrap(a,e):e).append(t),t},fh.prototype.getStackWrap=function(t,e){var i,o=typeof t==at?t.group||!0:t,r=e.children;if(typeof o===ct||!0===o)for(var n=0;n<r.length;n++)if(r[n]._stackGroup===o){i=r[n];break}return i||((i=new(this.stackType())({vertical:!this.options.invertAxes}))._stackGroup=o,e.append(i)),i},fh.prototype.categorySlot=function(t,e,i){var o=this.options,t=t.getSlot(e),e=i.startValue();return o.isStacked&&(i=i.getSlot(e,e,!0),t[(e=o.invertAxes?y:v)+1]=t[e+2]=i[e+1]),t},fh.prototype.reflowCategories=function(t){for(var e=this.children,i=e.length,o=0;o<i;o++)e[o].reflow(t[o])},fh.prototype.createAnimation=function(){this._setAnimationOptions(),ql.prototype.createAnimation.call(this),ga(this.options.series)&&this._setChildrenAnimation()},fh.prototype._setChildrenAnimation=function(){for(var t=this.points,e=0;e<t.length;e++){var i=t[e],o=i.visual;o&&k(o.options.zIndex)&&(i.options.animation=this.options.animation,i.createAnimation())}},fh.prototype._setAnimationOptions=function(){var t,e=this.options,i=e.animation||{};t=e.isStacked?(t=this.seriesValueAxis(e.series[0])).getSlot(t.startValue()):this.categoryAxis.getSlot(0),i.origin=new M.geometry.Point(t.x1,t.y1),i.vertical=!e.invertAxes},fh);function fh(){ql.apply(this,arguments)}e(dh,{animation:{type:ns}});let gh=dh,yh=((Zl=o)&&(vh.__proto__=Zl),((vh.prototype=Object.create(Zl&&Zl.prototype)).constructor=vh).prototype.getLabelText=function(t){return this.formatValue(t.format)},vh.prototype.reflow=function(t){var e=this.options,i=this.value,e=this.owner.seriesValueAxis(e),o=e.getSlot(i.open,i.close),e=e.getSlot(i.low,i.high),i=(o.x1=e.x1=t.x1,o.x2=e.x2=t.x2,this.realBody=o,e.center().x),t=[];t.push([[i,e.y1],[i,o.y1]]),t.push([[i,o.y2],[i,e.y2]]),this.lines=t,this.box=e.clone().wrap(o),this._rendered||(this._rendered=!0,this.createNote()),this.reflowNote()},vh.prototype.reflowNote=function(){this.note&&this.note.reflow(this.box)},vh.prototype.createVisual=function(){Zl.prototype.createVisual.call(this),this.addAccessibilityAttributesToVisual(),this._mainVisual=this.mainVisual(this.options),this.visual.append(this._mainVisual),this.createOverlay()},vh.prototype.mainVisual=function(t){var e=new M.drawing.Group;return this.createBody(e,t),this.createLines(e,t),e},vh.prototype.createBody=function(t,e){var i=M.drawing.Path.fromRect(this.realBody.toRect(),{fill:Qi(e.pattern,{color:this.color,opacity:e.opacity}),stroke:null});0<e.border.width&&i.options.set("stroke",{color:this.getBorderColor(),width:e.border.width,dashType:e.border.dashType,opacity:_(e.border.opacity,e.opacity)}),_t(i),t.append(i),Pa(e)&&t.append(this.createGradientOverlay(i,{baseColor:this.color},O({end:e.vertical?void 0:[0,1]},e.overlay)))},vh.prototype.createLines=function(t,e){this.drawLines(t,e,this.lines,e.line)},vh.prototype.drawLines=function(t,e,i,o){if(i)for(var r={stroke:{color:o.color||this.color,opacity:_(o.opacity,e.opacity),width:o.width,dashType:o.dashType,lineCap:"butt"}},n=0;n<i.length;n++){var s=M.drawing.Path.fromPoints(i[n],r);_t(s),t.append(s)}},vh.prototype.getBorderColor=function(){var t=this.options.border,e=t.color;return e=k(e)?e:new M.Color(this.color).brightness(t._brightness).toHex()},vh.prototype.createOverlay=function(){var t=M.drawing.Path.fromRect(this.box.toRect(),{fill:{color:a,opacity:0},stroke:null});this.visual.append(t)},vh.prototype.createHighlight=function(){var t=this.options.highlight,e=this.color,t=(this.color=t.color||this.color,this.mainVisual(O({},this.options,{line:{color:this.getBorderColor()}},t)));return this.color=e,t},vh.prototype.highlightVisual=function(){return this._mainVisual},vh.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this._mainVisual}},vh.prototype.tooltipAnchor=function(){var t=this.box,e=this.owner.pane.clipBox()||t;return{point:new A(t.x2+5,Math.max(t.y1,e.y1)+5),align:{horizontal:C,vertical:T}}},vh.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},vh.prototype.overlapsBox=function(t){return this.box.overlaps(t)},vh.prototype.pointData=function(){return{dataItem:this.dataItem,value:this.value,meanPoints:this.meanPoints,medianPoints:this.medianPoints,whiskerPoints:this.whiskerPoints,stackValue:this.stackValue,series:this.series}},vh.prototype.getIndex=function(){return this.categoryIx},vh);function vh(t,e){Zl.call(this,e),this.value=t}yh.prototype.createFocusHighlight=Ul.prototype.createFocusHighlight,e(yh,{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>"},labels:{format:""},highlight:{opacity:1,border:{width:1,opacity:1},line:{width:1,opacity:1}},notes:{visible:!0,label:{}},accessibility:{role:t,className:i,ariaRoleDescription:js}}),O(yh.prototype,Ha),O(yh.prototype,Na),O(yh.prototype,Fl);let mh=yh,xh=((Ql=Da)&&(_h.__proto__=Ql),((_h.prototype=Object.create(Ql&&Ql.prototype)).constructor=_h).prototype.reflowCategories=function(t){for(var e=this.children,i=e.length,o=0;o<i;o++)e[o].reflow(t[o])},_h.prototype.addValue=function(t,e){var i,o=e.categoryIx,r=e.category,n=e.series,s=e.seriesIx,a=this.children,l=this.options,h=t.valueFields,p=va(this.splitValue(h)),c=n.data[o],u=this.categoryPoints[o],p=(u||(this.categoryPoints[o]=u=[]),p&&(i=this.createPoint(t,e)),a[o]);p||(p=new hh({vertical:l.invertAxes,gap:l.gap,spacing:l.spacing,rtl:!l.invertAxes&&(this.chartService||{}).rtl}),this.append(p)),i&&(this.updateRange(h,e),p.append(i),i.categoryIx=o,i.category=r,i.series=n,i.seriesIx=s,i.owner=this,i.dataItem=c,i.noteText=t.fields.noteText),this.points.push(i),u.push(i)},_h.prototype.pointType=function(){return mh},_h.prototype.createPoint=function(t,e){var i=e.series,o=this.pointType(),r=t.valueFields,n=O({},i),s=t.fields.color||i.color,n=this.evalPointOptions(n,r,e),e=(i.type!==hs&&i.type!==vs||r.open>r.close&&(s=t.fields.downColor||i.downColor||i.color),Pt(i.color)&&(s=n.color),n.vertical=!this.options.invertAxes,new o(r,n));return e.color=s,e},_h.prototype.splitValue=function(t){return[t.low,t.open,t.close,t.high]},_h.prototype.updateRange=function(t,e){var e=e.series.axis,t=this.splitValue(t),i=this.valueAxisRanges[e]||{min:rt,max:nt};this.valueAxisRanges[e]={min:Math.min.apply(Math,t.concat([i.min])),max:Math.max.apply(Math,t.concat([i.max]))}},_h.prototype.formatPointValue=function(t,e){var i=t.value;return this.chartService.format.auto(e,i.open,i.high,i.low,i.close,t.category)},_h.prototype.animationPoints=function(){return this.points},_h);function _h(){Ql.apply(this,arguments)}O(xh.prototype,ml);let bh=xh,wh=((Kl=mh)&&(kh.__proto__=Kl),((kh.prototype=Object.create(Kl&&Kl.prototype)).constructor=kh).prototype.reflow=function(t){var e,i,o=this.options,r=this.value,o=this.owner.seriesValueAxis(o),n=(this.boxSlot=i=o.getSlot(r.q1,r.q3),this.realBody=i,this.reflowBoxSlot(t),this.whiskerSlot=e=o.getSlot(r.lower,r.upper),this.reflowWhiskerSlot(t),o.getSlot(r.median));r.mean&&(o=o.getSlot(r.mean),this.meanPoints=this.calcMeanPoints(t,o)),this.whiskerPoints=this.calcWhiskerPoints(i,e),this.medianPoints=this.calcMedianPoints(t,n),this.box=e.clone().wrap(i),this.reflowNote()},kh.prototype.reflowBoxSlot=function(t){this.boxSlot.x1=t.x1,this.boxSlot.x2=t.x2},kh.prototype.reflowWhiskerSlot=function(t){this.whiskerSlot.x1=t.x1,this.whiskerSlot.x2=t.x2},kh.prototype.calcMeanPoints=function(t,e){return[[[t.x1,e.y1],[t.x2,e.y1]]]},kh.prototype.calcWhiskerPoints=function(t,e){var i=e.center().x;return[[[i-5,e.y1],[i+5,e.y1],[i,e.y1],[i,t.y1]],[[i-5,e.y2],[i+5,e.y2],[i,e.y2],[i,t.y2]]]},kh.prototype.calcMedianPoints=function(t,e){return[[[t.x1,e.y1],[t.x2,e.y1]]]},kh.prototype.renderOutliers=function(t){for(var e,i=this.value,o=i.outliers||[],r=3*Math.abs(i.q3-i.q1),n=[],s=(t.markers,0);s<o.length;s++){var a=o[s],l=O({},(e=a<i.q3+r&&a>i.q1-r?t.outliers:t.extremes).border),l=(k(l.color)||(k(this.color)?l.color=this.color:l.color=new M.Color(e.background).brightness(.8).toHex()),new oo({type:e.type,width:e.size,height:e.size,rotation:e.rotation,background:e.background,border:l,opacity:e.opacity}));l.value=a,n.push(l)}return this.reflowOutliers(n),n},kh.prototype.reflowOutliers=function(t){for(var e=this.owner.seriesValueAxis(this.options),i=this.box.center(),o=0;o<t.length;o++){var r=t[o].value,r=e.getSlot(r);this.options.vertical?r.move(i.x):r.move(void 0,i.y),this.box=this.box.wrap(r),t[o].reflow(r)}},kh.prototype.mainVisual=function(t){for(var e=Kl.prototype.mainVisual.call(this,t),i=this.renderOutliers(t),o=0;o<i.length;o++){var r=i[o].getElement();r&&e.append(r)}return e},kh.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)},kh.prototype.getBorderColor=function(){return(this.options.border||{}).color?this.options.border.color:this.color||Kl.prototype.getBorderColor.call(this)},kh);function kh(t,e){Kl.call(this,t,e),this.createNote()}e(wh,{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:Q,background:a,border:{width:2,opacity:1},opacity:0},extremes:{visible:!0,size:8,type:q,background:a,border:{width:2,opacity:1},opacity:0}}),O(wh.prototype,Ha);let Ah=wh,Sh=(($l=Ah)&&(Ch.__proto__=$l),((Ch.prototype=Object.create($l&&$l.prototype)).constructor=Ch).prototype.reflowBoxSlot=function(t){this.boxSlot.y1=t.y1,this.boxSlot.y2=t.y2},Ch.prototype.reflowWhiskerSlot=function(t){this.whiskerSlot.y1=t.y1,this.whiskerSlot.y2=t.y2},Ch.prototype.calcMeanPoints=function(t,e){return[[[e.x1,t.y1],[e.x1,t.y2]]]},Ch.prototype.calcWhiskerPoints=function(t,e){var i=e.center().y;return[[[e.x1,i-5],[e.x1,i+5],[e.x1,i],[t.x1,i]],[[e.x2,i-5],[e.x2,i+5],[e.x2,i],[t.x2,i]]]},Ch.prototype.calcMedianPoints=function(t,e){return[[[e.x1,t.y1],[e.x1,t.y2]]]},Ch);function Ch(){$l.apply(this,arguments)}let Ph=Sh,Th=((Jl=bh)&&(Mh.__proto__=Jl),((Mh.prototype=Object.create(Jl&&Jl.prototype)).constructor=Mh).prototype.addValue=function(t,e){var i,o=e.categoryIx,r=e.category,n=e.series,s=e.seriesIx,a=this.children,l=this.options,h=t.valueFields,p=va(this.splitValue(h)),c=n.data[o],u=this.categoryPoints[o],p=(u||(this.categoryPoints[o]=u=[]),p&&(i=this.createPoint(t,e)),a[o]);p||(p=new hh({vertical:l.invertAxes,gap:l.gap,spacing:l.spacing,rtl:!l.invertAxes&&(this.chartService||{}).rtl}),this.append(p)),i&&(this.updateRange(h,e),p.append(i),i.categoryIx=o,i.category=r,i.series=n,i.seriesIx=s,i.owner=this,i.dataItem=c),this.points.push(i),u.push(i)},Mh.prototype.pointType=function(){return this.options.invertAxes?Ph:Ah},Mh.prototype.splitValue=function(t){return[t.lower,t.q1,t.median,t.q3,t.upper]},Mh.prototype.updateRange=function(t,e){var e=e.series.axis,i=this.splitValue(t).concat(this.filterOutliers(t.outliers)),t=(k(t.mean)&&(i=i.concat(t.mean)),this.valueAxisRanges[e]||{min:rt,max:nt});this.valueAxisRanges[e]={min:Math.min.apply(Math,i.concat([t.min])),max:Math.max.apply(Math,i.concat([t.max]))}},Mh.prototype.formatPointValue=function(t,e){var i=t.value;return this.chartService.format.auto(e,i.lower,i.q1,i.median,i.q3,i.upper,i.mean,t.category)},Mh.prototype.filterOutliers=function(t){for(var e=(t||[]).length,i=[],o=0;o<e;o++){var r=t[o];k(r)&&null!==r&&i.push(r)}return i},Mh.prototype.supportsPointInactiveOpacity=function(){return!1},Mh);function Mh(){Jl.apply(this,arguments)}let Oh=Th,Lh=((th=ca)&&(Ih.__proto__=th),((Ih.prototype=Object.create(th&&th.prototype)).constructor=Ih).prototype.getAxis=function(){var t=this.chart.seriesAxes(this.series);return this.isVertical?t.y:t.x},Ih);function Ih(){th.apply(this,arguments)}let Bh=Lh,Eh=((eh=o)&&(Rh.__proto__=eh),((Rh.prototype=Object.create(eh&&eh.prototype)).constructor=Rh).prototype._initFields=function(){this.xAxisRanges={},this.yAxisRanges={},this.points=[],this.seriesPoints=[],this.seriesOptions=[],this._evalSeries=[]},Rh.prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},Rh.prototype.addErrorBar=function(t,e,i){var o,r=t.value[e],n=e+"Value",s=i.seriesIx,a=i.series,l=t.options.errorBars,h=i[e+"ErrorLow"],i=i[e+"ErrorHigh"];m(r)&&(m(h)&&m(i)&&(o={low:h,high:i}),l&&k(l[n])&&(this.seriesErrorRanges=this.seriesErrorRanges||{x:[],y:[]},this.seriesErrorRanges[e][s]=this.seriesErrorRanges[e][s]||new Gn(l[n],a,e),o=this.seriesErrorRanges[e][s].getErrorRange(r,l[n])),o)&&this.addPointErrorBar(o,t,e)},Rh.prototype.addPointErrorBar=function(t,e,i){var o=t.low,t=t.high,r=e.series,n=e.options.errorBars,s=i===v,a={},s=(e[i+"Low"]=o,e[i+"High"]=t,e.errorBars=e.errorBars||[],new Bh(o,t,s,this,r,n));e.errorBars.push(s),e.append(s),a[i]=o,this.updateRange(a,r),a[i]=t,this.updateRange(a,r)},Rh.prototype.addValue=function(t,e){var i,o=t.x,r=t.y,n=e.seriesIx,s=this.options.series[n],s=this.seriesMissingValues(s),n=this.seriesPoints[n];(t=Ta(o)&&Ta(r)?t:this.createMissingValue(t,s))&&((i=this.createPoint(t,e))&&(Object.assign(i,e),this.addErrorBar(i,y,e),this.addErrorBar(i,v,e)),this.updateRange(t,e.series)),this.points.push(i),n.push(i)},Rh.prototype.seriesMissingValues=function(t){return t.missingValues},Rh.prototype.createMissingValue=function(){},Rh.prototype.updateRange=function(t,e){var i=this.chartService.intl,o=e.xAxis,e=e.yAxis,r=t.x,t=t.y,n=this.xAxisRanges[o],s=this.yAxisRanges[e];Ta(r)&&(n=this.xAxisRanges[o]=n||{min:rt,max:nt},wt(r)&&(r=Sr(i,r)),n.min=Math.min(n.min,r),n.max=Math.max(n.max,r)),Ta(t)&&(s=this.yAxisRanges[e]=s||{min:rt,max:nt},wt(t)&&(t=Sr(i,t)),s.min=Math.min(s.min,t),s.max=Math.max(s.max,t))},Rh.prototype.evalPointOptions=function(t,e,i){var o=i.series,r=i.seriesIx,n={defaults:o._defaults,excluded:["data","tooltip","content","template","visual","toggle","_outOfRangeMinPoint","_outOfRangeMaxPoint","drilldownSeriesFactory","ariaTemplate","ariaContent"]},s=this._evalSeries[r],r=(k(s)||(this._evalSeries[r]=s=ka(t,{},n,!0)),t);return s&&ka(r=O({},t),{value:e,series:o,dataItem:i.dataItem},n),r},Rh.prototype.pointType=function(){return Wa},Rh.prototype.pointOptions=function(t,e){var i,o=this.seriesOptions[e];return o||(i=this.pointType().prototype.defaults,this.seriesOptions[e]=o=O({},i,{markers:{opacity:t.opacity},tooltip:{format:this.options.tooltip.format},labels:{format:this.options.labels.format}},t)),o},Rh.prototype.createPoint=function(t,e){var i=e.series,o=this.pointOptions(i,e.seriesIx),r=e.color||i.color,o=this.evalPointOptions(o,t,e),e=(Pt(i.color)&&(r=o.color),new Wa(t,o));return e.color=r,this.append(e),e},Rh.prototype.seriesAxes=function(t){var e=t.xAxis,t=t.yAxis,i=this.plotArea,o=e?i.namedXAxes[e]:i.axisX,i=t?i.namedYAxes[t]:i.axisY;if(!o)throw new Error("Unable to locate X axis with name "+e);if(i)return{x:o,y:i};throw new Error("Unable to locate Y axis with name "+t)},Rh.prototype.reflow=function(t){var r=this,n=this.points,s=!this.options.clip,a=0;this.traverseDataPoints(function(t,e){var i=n[a++],e=r.seriesAxes(e.series),o=e.x.getSlot(t.x,t.x,s),e=e.y.getSlot(t.y,t.y,s);i&&(o&&e?(t=r.pointSlot(o,e),i.reflow(t)):i.visible=!1)}),this.box=t},Rh.prototype.pointSlot=function(t,e){return new I(t.x1,e.y1,t.x2,e.y2)},Rh.prototype.traverseDataPoints=function(t){for(var e=this.options.series,i=this.seriesPoints,o=0;o<e.length;o++){var r=e[o];i[o]||(i[o]=[]);for(var n=0;n<r.data.length;n++){var s=this.plotArea.bindPoint(r,n);t(s.valueFields,O({pointIx:n,series:r,seriesIx:o,dataItem:r.data[n],owner:this},s.fields))}}},Rh.prototype.formatPointValue=function(t,e){t=t.value;return this.chartService.format.auto(e,t.x,t.y)},Rh.prototype.animationPoints=function(){for(var t=this.points,e=[],i=0;i<t.length;i++)e.push((t[i]||{}).marker);return e},Rh);function Rh(t,e){eh.call(this,e),this.plotArea=t,this.chartService=t.chartService,this._initFields(),this.render()}e(Eh,{series:[],tooltip:{format:"{0}, {1}"},labels:{format:"{0}, {1}"},clip:!0}),O(Eh.prototype,ml);let Vh=Eh,jh=((ih=Wa)&&(zh.__proto__=ih),((zh.prototype=Object.create(ih&&ih.prototype)).constructor=zh).prototype.createHighlight=function(){var t=this.options.highlight,e=t.border,i=this.options.markers,o=this.box.center(),r=(i.size+i.border.width+e.width)/2,n=new M.drawing.Group,s=new M.drawing.Circle(new M.geometry.Circle([o.x,o.y+r/5+e.width/2],r+e.width/2),{stroke:{color:"none"},fill:this.createGradient({gradient:"bubbleShadow",color:i.background,stops:[{offset:0,color:i.background,opacity:.3},{offset:1,color:i.background,opacity:0}]})}),o=new M.drawing.Circle(new M.geometry.Circle([o.x,o.y],r),{stroke:{color:e.color||new M.Color(i.background).brightness(.8).toHex(),width:e.width,opacity:e.opacity},fill:Qi(this.options.pattern,{color:i.background,opacity:t.opacity})});return n.append(s,o),n},zh.prototype.createFocusHighlight=function(t){var e=this.options.focusHighlight,i=this.options.markers,o=this.box.center(),i=(i.size+i.border.width)/2+e.border.width/2;return new M.drawing.Circle(new M.geometry.Circle([o.x,o.y],i),t)},zh);function zh(t,e){ih.call(this,t,e),this.category=t.category}jh.prototype.defaults=O({},jh.prototype.defaults,{labels:{position:b},highlight:{opacity:1,border:{color:"#fff",width:2,opacity:1}}}),jh.prototype.defaults.highlight.zIndex=void 0;let Dh=jh,Fh=((oh=Vh)&&(Hh.__proto__=oh),((Hh.prototype=Object.create(oh&&oh.prototype)).constructor=Hh).prototype._initFields=function(){this._maxSize=nt,oh.prototype._initFields.call(this)},Hh.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)),oh.prototype.addValue.call(this,t,e)):(this.points.push(null),this.seriesPoints[e.seriesIx].push(null))},Hh.prototype.reflow=function(t){this.updateBubblesSize(t),oh.prototype.reflow.call(this,t)},Hh.prototype.pointType=function(){return Dh},Hh.prototype.createPoint=function(t,e){var i=e.series,o=i.data.length,o=e.pointIx*(Yn/o),r={delay:o,duration:Yn-o,type:as},n=e.color||i.color,o=(t.size<0&&i.negativeValues.visible&&(n=_(i.negativeValues.color,n)),O({labels:{animation:{delay:o,duration:Yn-o}}},this.pointOptions(i,e.seriesIx),{markers:{type:q,border:i.border,opacity:i.opacity,animation:r}})),o=this.evalPointOptions(o,t,e),r=(Pt(i.color)&&(n=o.color),o.markers.background=n,new Dh(t,o));return r.color=n,this.append(r),r},Hh.prototype.updateBubblesSize=function(t){for(var e=this.options.series,i=Math.min(t.width(),t.height()),o=0;o<e.length;o++)for(var r=e[o],n=this.seriesPoints[o],s=(r.minSize||Math.max(.02*i,10))/2,a=(r.maxSize||.2*i)/2,l=Math.PI*s*s,h=(Math.PI*a*a-l)/this._maxSize,p=0;p<n.length;p++){var c,u,d=n[p];d&&(c=Math.abs(d.value.size)*h,c=Math.sqrt((l+c)/Math.PI),u=_(d.options.zIndex,0)+(1-c/a),O(d.options,{zIndex:u,markers:{size:2*c,zIndex:u},labels:{zIndex:u+1}}))}},Hh.prototype.formatPointValue=function(t,e){var i=t.value;return this.chartService.format.auto(e,i.x,i.y,i.size,t.category)},Hh.prototype.createAnimation=function(){},Hh.prototype.createVisual=function(){},Hh);function Hh(){oh.apply(this,arguments)}e(Fh,{tooltip:{format:"{3}"},labels:{format:"{3}"}});let Nh=Fh,Uh=((rh=oo)&&(Gh.__proto__=rh),(Gh.prototype=Object.create(rh&&rh.prototype)).constructor=Gh);function Gh(){rh.apply(this,arguments)}O(Uh.prototype,Ha);let Wh=Uh,Xh=((nh=o)&&(Yh.__proto__=nh),((Yh.prototype=Object.create(nh&&nh.prototype)).constructor=Yh).prototype.render=function(){var t=this.options;this._rendered||(this._rendered=!0,k(this.value.target)&&(this.target=new Wh({type:t.target.shape,background:t.target.color||this.color,opacity:t.opacity,zIndex:t.zIndex,border:t.target.border,vAlign:T,align:P}),this.target.value=this.value,this.target.dataItem=this.dataItem,this.target.series=this.series,this.append(this.target)),this.createLabel(),this.createNote())},Yh.prototype.createLabel=function(){var t=this.options.labels;t.visible&&(this.label=this.createLabelElement(t),this.append(this.label))},Yh.prototype.createLabelElement=function(t){return new Dl(this.getLabelText(t),t,this.pointData())},Yh.prototype.getLabelText=function(t){var e=jt(t);return e?e(this.pointData()):this.formatValue(t.format)},Yh.prototype.reflow=function(t){this.render();var e=this.options,i=this.target,o=this.owner,r=e.invertAxes,n=o.seriesValueAxis(this.options),o=o.categorySlot(o.categoryAxis,e.categoryIx,n),n=n.getSlot(this.value.target),s=r?n:o,o=r?o:n,s=(i&&(n=new I(s.x1,o.y1,s.x2,o.y2),i.options.height=r?n.height():e.target.line.width,i.options.width=r?e.target.line.width:n.width(),i.reflow(n)),this.label);s&&(s.options.aboveAxis=this.aboveAxis,s.reflow(t)),this.note&&this.note.reflow(t),this.box=t},Yh.prototype.createVisual=function(){nh.prototype.createVisual.call(this),this.addAccessibilityAttributesToVisual();var t=this.options,e=M.drawing.Path.fromRect(this.box.toRect(),{fill:Qi(t.pattern,{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.border.opacity,t.opacity)}),_t(this.bodyVisual=e),this.visual.append(e)},Yh.prototype.createAnimation=function(){this.bodyVisual&&(this.animation=M.drawing.Animation.create(this.bodyVisual,this.options.animation))},Yh.prototype.createHighlight=function(t){return M.drawing.Path.fromRect(this.box.toRect(),t)},Yh.prototype.highlightVisual=function(){return this.bodyVisual},Yh.prototype.highlightVisualArgs=function(){return{rect:this.box.toRect(),visual:this.bodyVisual,options:this.options}},Yh.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Yh.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,series:this.series}},Yh.prototype.overlapsBox=function(t){return this.box.overlaps(t)},Yh.prototype.getIndex=function(){return this.categoryIx},Yh);function Yh(t,e){nh.call(this,e),this.aboveAxis=this.options.aboveAxis,this.color=e.color||a,this.value=t}Xh.prototype.tooltipAnchor=Ul.prototype.tooltipAnchor,Xh.prototype.createFocusHighlight=Ul.prototype.createFocusHighlight,e(Xh,{border:{width:1},vertical:!1,opacity:1,target:{shape:"",border:{width:0,color:"green"},line:{width:2}},labels:{visible:!1},tooltip:{format:"Current: {0}<br />Target: {1}"},notes:{label:{}},accessibility:{role:t,className:i,ariaRoleDescription:js}}),O(Xh.prototype,Ha),O(Xh.prototype,Na),O(Xh.prototype,Fl);let qh=Xh,Zh=((sh=Da)&&(Qh.__proto__=sh),((Qh.prototype=Object.create(sh&&sh.prototype)).constructor=Qh).prototype.reflowCategories=function(t){for(var e=this.children,i=e.length,o=0;o<i;o++)e[o].reflow(t[o])},Qh.prototype.plotRange=function(t){var e=t.series,e=this.seriesValueAxis(e),e=this.categoryAxisCrossingValue(e);return[e,t.value.current||e]},Qh.prototype.createPoint=function(t,e){var i=e.categoryIx,o=e.series,r=this.options,n=this.children,s=t.valueFields,a=O({vertical:!r.invertAxes,overlay:o.overlay,categoryIx:i,invertAxes:r.invertAxes},o),t=t.fields.color||o.color,a=this.evalPointOptions(a,s,e),e=(Pt(o.color)&&(t=a.color),new qh(s,a)),o=(e.color=t,n[i]);return o||(o=new hh({vertical:r.invertAxes,gap:r.gap,spacing:r.spacing,rtl:!r.invertAxes&&(this.chartService||{}).rtl}),this.append(o)),o.append(e),e},Qh.prototype.updateRange=function(t,e){var i=t.current,t=t.target,e=e.series.axis,o=this.valueAxisRanges[e];k(i)&&!isNaN(i)&&k(t&&!isNaN(t))&&((o=this.valueAxisRanges[e]=o||{min:rt,max:nt}).min=Math.min(o.min,i,t),o.max=Math.max(o.max,i,t))},Qh.prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value.current,t.value.target)},Qh.prototype.pointValue=function(t){return t.valueFields.current},Qh.prototype.aboveAxis=function(t){return 0<t.value.current},Qh.prototype.createAnimation=function(){var t=this.points;this._setAnimationOptions();for(var e=0;e<t.length;e++){var i=t[e];i.options.animation=this.options.animation,i.createAnimation()}},Qh);function Qh(t,e){for(var i=e.series,o=0;o<i.length;o++){var r=i[o],n=r.data;!n||yt(n[0])||Ot(n[0])||(r.data=[n])}sh.call(this,t,e)}Zh.prototype._setAnimationOptions=gh.prototype._setAnimationOptions,e(Zh,{animation:{type:ns}});let Kh=Zh,$h=((ah=M.Class)&&(Jh.__proto__=ah),((Jh.prototype=Object.create(ah&&ah.prototype)).constructor=Jh).prototype.getStyle=function(t,e){var i=t.background,o=t.border.color,e=(e&&(e=e.color||e.options.color,i=_(i,e),o=_(o,e)),void 0!==t.padding?w(t.padding):{});return"object"==typeof t.padding&&(e.top=void 0!==t.padding.top?e.top:void 0,e.right=void 0!==t.padding.right?e.right:void 0,e.bottom=void 0!==t.padding.bottom?e.bottom:void 0,e.left=void 0!==t.padding.left?e.left:void 0),{backgroundColor:i,borderColor:o,font:t.font,color:t.color,opacity:t.opacity,borderWidth:Lt(t.border.width),paddingTop:Lt(e.top),paddingBottom:Lt(e.bottom),paddingLeft:Lt(e.left),paddingRight:Lt(e.right)}},Jh.prototype.show=function(t,e,i){this.chartService&&(t.format=e.format,i=this.getStyle(e,i),t.style=i,i=new M.Color(i.backgroundColor),k(e.color)||i.isDark()||(t.className="k-chart-tooltip-inverse"),this.chartService.notify(ra,t),this.visible=!0)},Jh.prototype.hide=function(){this.chartService&&this.chartService.notify(na),this.visible=!1},Jh.prototype.destroy=function(){delete this.chartService},Jh);function Jh(t,e){ah.call(this),this.chartService=t,this.options=O({},this.options,e)}e($h,{border:{width:1},opacity:1});var tp,ep,ip,gl=$h,h=((tp=gl)&&(op.__proto__=tp),((op.prototype=Object.create(tp&&tp.prototype)).constructor=op).prototype.initAxisName=function(){var t=this.crosshair.axis,t=t.plotArea.categoryAxis?t.getCategory?"categoryAxis":"valueAxis":t.options.vertical?"yAxis":"xAxis";this.axisName=t},op.prototype.showAt=function(t){var e=this.crosshair.axis,i=this.options,o=e[i.stickyMode?"getCategory":"getValue"](t),r=o;i.format?r=this.formatService.auto(i.format,o):e.options.type===K&&(r=this.formatService.auto(e.options.labels.dateFormats[e.options.baseUnit],o)),this.show({point:t,anchor:this.getAnchor(),crosshair:this.crosshair,value:r,axisName:this.axisName,axisIndex:this.crosshair.axis.axisIndex},this.options)},op.prototype.hide=function(){this.chartService.notify(na,{crosshair:this.crosshair,axisName:this.axisName,axisIndex:this.crosshair.axis.axisIndex})},op.prototype.getAnchor=function(){var t,e,i=this.crosshair,o=this.options,r=o.position,o=o.padding,n=!i.axis.options.vertical,i=i.line.bbox(),n=n?(t=b,r===S?(e=T,i.bottomLeft().translate(0,o)):(e=S,i.topLeft().translate(0,-o))):(e=b,r===C?(t=P,i.topLeft().translate(-o,0)):(t=C,i.topRight().translate(o,0)));return{point:n,align:{horizontal:t,vertical:e}}},op);function op(t,e,i){tp.call(this,t,i),this.crosshair=e,this.formatService=t.format,this.initAxisName()}e(h,{padding:10});let rp=h,np=((ep=o)&&(sp.__proto__=ep),((sp.prototype=Object.create(ep&&ep.prototype)).constructor=sp).prototype.showAt=function(t){this.point=t,this.moveLine(),this.line.visible(!0),this.tooltip&&this.tooltip.showAt(t)},sp.prototype.hide=function(){this.line.visible(!1),this.tooltip&&this.tooltip.hide()},sp.prototype.moveLine=function(){var t=this.axis,e=this.point,i=t.options.vertical,o=this.getBox(),r=i?v:y,n=new M.geometry.Point(o.x1,o.y1),i=i?new M.geometry.Point(o.x2,o.y1):new M.geometry.Point(o.x1,o.y2);e&&(this.stickyMode?(t=t.getSlot(t.pointCategoryIndex(e)),n[r]=i[r]=t.center()[r]):n[r]=i[r]=e[r]),this.box=o,this.line.moveTo(n).lineTo(i)},sp.prototype.getBox=function(){for(var t,e=this.axis,i=e.pane.axes,o=i.length,r=e.options.vertical,e=e.lineBox().clone(),n=r?y:v,s=0;s<o;s++){var a=i[s];a.options.vertical!==r&&(t?t.wrap(a.lineBox()):t=a.lineBox().clone())}return e[n+1]=t[n+1],e[n+2]=t[n+2],e},sp.prototype.createVisual=function(){ep.prototype.createVisual.call(this);var t=this.options;this.line=new M.drawing.Path({stroke:{color:t.color,width:t.width,opacity:t.opacity,dashType:t.dashType},visible:!1}),this.moveLine(),this.visual.append(this.line)},sp.prototype.destroy=function(){this.tooltip&&this.tooltip.destroy(),ep.prototype.destroy.call(this)},sp);function sp(t,e,i){ep.call(this,i),this.axis=e,this.stickyMode=e instanceof Mr;i=this.options.tooltip;i.visible&&(this.tooltip=new rp(t,this,O({},i,{stickyMode:this.stickyMode})))}e(np,{color:Y,width:2,zIndex:-1,tooltip:{visible:!1}});let ap=np,lp=((ip=o)&&(hp.__proto__=ip),((hp.prototype=Object.create(ip&&ip.prototype)).constructor=hp).prototype.shouldClip=function(){for(var t=this.children,e=t.length,i=0;i<e;i++)if(!0===t[i].options.clip)return!0;return!1},hp.prototype._clipBox=function(){return this.pane.chartsBox()},hp.prototype.createVisual=function(){var t;this.visual=new M.drawing.Group({zIndex:0}),this.shouldClip()&&(t=(this.clipBox=this._clipBox()).toRect(),_t(t=M.drawing.Path.fromRect(t)),this.visual.clip(t),this.unclipLabels())},hp.prototype.stackRoot=function(){return this},hp.prototype.unclipLabels=function(){for(var t=this.children,e=this.clipBox,i=0;i<t.length;i++)for(var o=t[i].points||{},r=o.length,n=0;n<r;n++){var s,a=o[n];a&&!1!==a.visible&&a.overlapsBox&&a.overlapsBox(e)&&(a.unclipElements?a.unclipElements():(s=a.label,a=a.note,s&&s.options.visible&&(s.alignToClipBox&&s.alignToClipBox(e),s.options.noclip=!0),a&&a.options.visible&&(a.options.noclip=!0)))}},hp.prototype.destroy=function(){ip.prototype.destroy.call(this),delete this.parent},hp);function hp(t,e){ip.call(this,t),this.pane=e}lp.prototype.isStackRoot=!0;let pp=lp;(cp=Ji)&&(dp.__proto__=cp),((dp.prototype=Object.create(cp&&cp.prototype)).constructor=dp).prototype.createTitle=function(){var t=this.options.title;Ot(t)&&(t=O({},t,{align:t.position,position:T})),this.title=Mo.buildTitle(t,dp.prototype.options.title),this.title&&this.append(this.title)},dp.prototype.appendAxis=function(t){this.content.append(t),this.axes.push(t),t.pane=this},dp.prototype.appendAxisAt=function(t,e){this.content.append(t),this.axes.splice(e,0,t),t.pane=this},dp.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},dp.prototype.empty=function(){var t=this.parent;if(t){for(var e=0;e<this.axes.length;e++)t.removeAxis(this.axes[e]);for(var i=0;i<this.charts.length;i++)t.removeChart(this.charts[i])}this.axes=[],this.charts=[],this.content.destroy(),this.content.children=[],this.chartContainer.children=[]},dp.prototype.reflow=function(t){var e;he(this.children)===this.content&&(e=this.children.pop()),cp.prototype.reflow.call(this,t),e&&this.children.push(e),this.title&&(this.contentBox.y1+=this.title.box.height())},dp.prototype.visualStyle=function(){var t=cp.prototype.visualStyle.call(this);return t.zIndex=-10,t},dp.prototype.renderComplete=function(){this.options.visible&&this.createGridLines()},dp.prototype.stackRoot=function(){return this},dp.prototype.clipRoot=function(){return this},dp.prototype.createGridLines=function(){for(var t,e=this.axes,i=e.concat(this.parent.axes),o=[],r=[],n=0;n<e.length;n++)for(var s=e[n],a=s.options.vertical,l=a?o:r,h=0;h<i.length;h++)0===l.length&&a!==(t=i[h]).options.vertical&&ee(l,s.createGridLines(t))},dp.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()},dp.prototype.chartsBox=function(){for(var t=this.axes,e=t.length,i=new I,o=0;o<e;o++){var r=t[o],n=r.options.vertical?v:y,r=r.lineBox();i[n+1]=r[n+1],i[n+2]=r[n+2]}if(0===i.x2)for(var s=this.parent.axes,a=s.length,l=0;l<a;l++){var h=s[l];h.options.vertical||(h=h.lineBox(),i.x1=h.x1,i.x2=h.x2)}return i},dp.prototype.clipBox=function(){return this.chartContainer.clipBox},dp.prototype.notifyRender=function(){var t=this.getService();t&&t.notify("paneRender",{pane:new On(this),index:this.paneIndex,name:this.options.name})};var cp,h=dp,up=1;function dp(t){cp.call(this,t),this.id="pane"+up++,this.createTitle(),this.content=new o,this.chartContainer=new pp({},this),this.append(this.content),this.axes=[],this.charts=[]}h.prototype.isStackRoot=!0,e(h,{zIndex:-1,shrinkToFit:!0,title:{align:C},visible:!0});let fp=h;function gp(t){return!1!==t.options.visible}(yp=o)&&(p.__proto__=yp),((p.prototype=Object.create(yp&&yp.prototype)).constructor=p).prototype.initFields=function(){},p.prototype.initSeries=function(){for(var t=this.series,e=0;e<t.length;e++)t[e].index=e},p.prototype.bindPoint=function(t,e,i){var o=this._bindCache.get(t);return o||this._bindCache.set(t,o=[]),o[e]||(o[e]=Dn.current.bindPoint(t,e,i))},p.prototype.createPanes=function(){for(var t=this.options.title||{},e=this.options.paneDefaults,i=this.options.panes||[],o=Math.max(i.length,1),r=[],n=O({title:{color:t.color}},e),s=0;s<o;s++){var a=O({},n,i[s]),a=(wt(a.title)&&(a.title=O({text:a.title},n.title)),new fp(a));a.paneIndex=s,r.push(a),this.append(a)}this.panes=r},p.prototype.crosshairOptions=function(t){return t.options.crosshair},p.prototype.createCrosshairs=function(t){void 0===t&&(t=this.panes);for(var e=0;e<t.length;e++)for(var i=t[e],o=0;o<i.axes.length;o++){var r=i.axes[o],n=this.crosshairOptions(r);n&&n.visible&&(r=new ap(this.chartService,r,n),this.crosshairs.push(r),i.content.append(r))}},p.prototype.removeCrosshairs=function(t){for(var e=this.crosshairs,i=t.axes,o=e.length-1;0<=o;o--)for(var r=0;r<i.length;r++)if(e[o].axis===i[r]){e.splice(o,1);break}},p.prototype.hideCrosshairs=function(){for(var t=this.crosshairs,e=0;e<t.length;e++)t[e].hide()},p.prototype.findPane=function(t){for(var e,i=this.panes,o=0;o<i.length;o++)if(i[o].options.name===t){e=i[o];break}return e||i[0]},p.prototype.findPointPane=function(t){for(var e,i=this.panes,o=0;o<i.length;o++)if(i[o].box.containsPoint(t)){e=i[o];break}return e},p.prototype.appendAxis=function(t){this.findPane(t.options.pane).appendAxis(t),this.axes.push(t),t.plotArea=this},p.prototype.removeAxis=function(t){for(var e=[],i=0;i<this.axes.length;i++){var o=this.axes[i];t!==o?e.push(o):o.destroy()}this.axes=e},p.prototype.appendChart=function(t,e){this.charts.push(t),e?e.appendChart(t):this.append(t)},p.prototype.removeChart=function(t){for(var e=[],i=0;i<this.charts.length;i++){var o=this.charts[i];o!==t?e.push(o):o.destroy()}this.charts=e},p.prototype.addToLegend=function(t){for(var e=t.length,i=this.options.legend,o=i.labels||{},r=i.inactiveItems||{},n=r.labels||{},s=[],a=0;a<e;a++){var l,h,p,c,u=t[a],d=!1!==u.visible;!1!==u.visibleInLegend&&(l=u.name,(p=!d&&jt(n)||jt(o))&&(l=p({text:Ta(l)?l:"",series:u})),p=u._defaults,p=void(Pt(h=u.color)&&p&&(h=p.color)),c=void 0,c=d?(p={},h):(p={color:n.color,font:n.font},r.markers.color),Ta(l))&&""!==l&&s.push({text:l,labels:p,markerColor:c,series:u,active:d})}ee(i.data,s)},p.prototype.groupAxes=function(t){for(var e=[],i=[],o=0;o<t.length;o++)for(var r=t[o].axes,n=0;n<r.length;n++){var s=r[n];(s.options.vertical?i:e).push(s)}return{x:e,y:i,any:e.concat(i)}},p.prototype.groupSeriesByPane=function(){for(var t=this.series,e={},i=0;i<t.length;i++){var o=t[i],r=this.seriesPaneName(o);e[r]?e[r].push(o):e[r]=[o]}return e},p.prototype.filterVisibleSeries=function(t){for(var e=[],i=0;i<t.length;i++){var o=t[i];!1!==o.visible&&e.push(o)}return e},p.prototype.reflow=function(t){var e=this.options.plotArea,i=this.panes,e=w(e.margin);this.box=t.clone().unpad(e),this.reflowPanes(),this.detachLabels(),this.reflowAxes(i),this.reflowCharts(i)},p.prototype.redraw=function(t){var e=[].concat(t),t=(this.initSeries(),this.getRoot());t&&t.cleanGradients();for(var i=0;i<e.length;i++)this.removeCrosshairs(e[i]),e[i].empty();this._bindCache=new WeakMap,this.render(e),this.detachLabels(),this.reflowAxes(this.panes),this.reflowCharts(e),this.createCrosshairs(e);for(var o=0;o<e.length;o++)e[o].refresh()},p.prototype.axisCrossingValues=function(t,e){for(var t=t.options,i=[].concat(t.axisCrossingValues||t.axisCrossingValue),o=e.length-i.length,r=i[0]||0,n=0;n<o;n++)i.push(r);return i},p.prototype.alignAxisTo=function(t,e,i,o){var i=t.getSlot(i,i,!0),r=t.options.reverse?2:1,o=e.getSlot(o,o,!0),n=e.options.reverse?2:1,o=t.box.translate(o[y+n]-i[y+r],o[v+n]-i[v+r]);t.pane!==e.pane&&o.translate(0,t.pane.box.y1-e.pane.box.y1),t.reflow(o)},p.prototype.alignAxes=function(t,e){for(var i=t[0],o=e[0],r=this.axisCrossingValues(i,e),n=this.axisCrossingValues(o,t),s={},a={},l={},h={},p=0;p<e.length;p++){var c=e[p],u=c.pane,d=u.id,f=!1!==c.options.visible,g=mp(t,u)||i,y=r;g!==i&&(y=this.axisCrossingValues(g,e)),this.alignAxisTo(c,g,n[p],y[p]),c.options._overlap||(L(c.lineBox().x1)===L(g.lineBox().x1)&&(s[d]&&c.reflow(c.box.alignTo(s[d].box,C).translate(-c.options.margin,0)),f)&&(s[d]=c),L(c.lineBox().x2)===L(g.lineBox().x2)&&(c._mirrored||(c.options.labels.mirror=!c.options.labels.mirror,c._mirrored=!0),this.alignAxisTo(c,g,n[p],y[p]),a[d]&&c.reflow(c.box.alignTo(a[d].box,P).translate(c.options.margin,0)),f)&&(a[d]=c),(g=mp(e,u)||o)!==c&&(c.alignTo(g),c.reflow(c.box)))}for(var v=0;v<t.length;v++){var m=t[v],x=m.pane,_=x.id,b=!1!==m.options.visible,x=mp(e,x)||o,w=n;x!==o&&(w=this.axisCrossingValues(x,t)),this.alignAxisTo(m,x,r[v],w[v]),m.options._overlap||(L(m.lineBox().y1)===L(x.lineBox().y1)&&(m._mirrored||(m.options.labels.mirror=!m.options.labels.mirror,m._mirrored=!0),this.alignAxisTo(m,x,r[v],w[v]),l[_]&&m.reflow(m.box.alignTo(l[_].box,T).translate(0,-m.options.margin)),b)&&(l[_]=m),L(m.lineBox().y2,Z)===L(x.lineBox().y2,Z)&&(h[_]&&m.reflow(m.box.alignTo(h[_].box,S).translate(0,m.options.margin)),b)&&(h[_]=m),0!==v&&(m.alignTo(i),m.reflow(m.box)))}},p.prototype.shrinkAxisWidth=function(t){for(var e=this.groupAxes(t).any,i=vp(e),o=0,r=0;r<t.length;r++){var n=t[r];0<n.axes.length&&(o=Math.max(o,i.width()-n.contentBox.width()))}if(0!==o)for(var s=0;s<e.length;s++){var a=e[s];a.options.vertical||a.reflow(a.box.shrink(o,0))}},p.prototype.shrinkAxisHeight=function(t){for(var e,i=0;i<t.length;i++){var o=t[i],r=o.axes,n=Math.max(0,vp(r).height()-o.contentBox.height());if(0!==n){for(var s=0;s<r.length;s++){var a=r[s];a.options.vertical&&a.reflow(a.box.shrink(0,n))}e=!0}}return e},p.prototype.fitAxes=function(t){for(var e=this.groupAxes(t).any,i=0,o=0;o<t.length;o++){var r=t[o],n=r.axes,r=r.contentBox;if(0<n.length)for(var s=vp(n),a=Math.max(r.y1-s.y1,r.y2-s.y2),i=Math.max(i,r.x1-s.x1),l=0;l<n.length;l++){var h=n[l];h.reflow(h.box.translate(0,a))}}for(var p=0;p<e.length;p++){var c=e[p];c.reflow(c.box.translate(i,0))}},p.prototype.reflowAxes=function(t){for(var e=this.groupAxes(t),i=0;i<t.length;i++)this.reflowPaneAxes(t[i]);0<e.x.length&&0<e.y.length&&(this.alignAxes(e.x,e.y),this.shrinkAxisWidth(t),this.autoRotateAxisLabels(e),this.alignAxes(e.x,e.y),this.shrinkAxisWidth(t)&&this.alignAxes(e.x,e.y),this.shrinkAxisHeight(t),this.alignAxes(e.x,e.y),this.shrinkAxisHeight(t)&&this.alignAxes(e.x,e.y),this.fitAxes(t))},p.prototype.autoRotateAxisLabels=function(t){for(var e,i=this.panes,o=Ap(i),r=0;r<o.length;r++)o[r].autoRotateLabels()&&(e=!0);if(e){for(var n=0;n<i.length;n++)this.reflowPaneAxes(i[n]);0<t.x.length&&0<t.y.length&&(this.alignAxes(t.x,t.y),this.shrinkAxisWidth(i))}},p.prototype.reflowPaneAxes=function(t){var e=t.axes,i=e.length;if(0<i)for(var o=0;o<i;o++)e[o].reflow(t.contentBox)},p.prototype.reflowCharts=function(t){for(var e=this.charts,i=e.length,o=this.box,r=0;r<i;r++){var n=e[r].pane;n&&!u(n,t)||e[r].reflow(o)}},p.prototype.reflowPanes=function(){for(var t=this.box,e=this.panes,i=e.length,o=t.height(),r=0,n=t.y1,s=0;s<i;s++){var a=e[s],l=a.options.height;a.options.width=t.width(),a.options.height?(l.indexOf&&l.indexOf("%")&&(l=parseInt(l,10)/100,a.options.height=l*t.height()),a.reflow(t.clone()),o-=a.options.height):r++}for(var h=0;h<i;h++){var p=e[h];p.options.height||(p.options.height=o/r)}for(var c=0;c<i;c++){var u=e[c],d=t.clone().move(t.x1,n);u.reflow(d),n+=u.options.height}},p.prototype.backgroundBox=function(){for(var t=this.axes,e=t.length,i=0;i<e;i++)for(var o=t[i],r=0;r<e;r++){var n,s=t[r];o.options.vertical!==s.options.vertical&&(s=o.lineBox().clone().wrap(s.lineBox()),n=n?n.wrap(s):s)}return n||this.box},p.prototype.chartsBoxes=function(){for(var t=this.panes,e=[],i=0;i<t.length;i++)e.push(t[i].chartsBox());return e},p.prototype.addBackgroundPaths=function(t){for(var e=this.chartsBoxes(),i=0;i<e.length;i++)t.paths.push(M.drawing.Path.fromRect(e[i].toRect()))},p.prototype.backgroundContainsPoint=function(t){for(var e=this.chartsBoxes(),i=0;i<e.length;i++)if(e[i].containsPoint(t))return!0},p.prototype.createVisual=function(){yp.prototype.createVisual.call(this);var t=this.options.plotArea,e=t.opacity,i=t.background,t=t.border,i=(void 0===t&&(t={}),""!==i&&null!==i&&"none"!==i&&"transparent"!==i&&k(i)||(i=a,e=0),this._bgVisual=new M.drawing.MultiPath({fill:{color:i,opacity:e},stroke:{color:t.width?t.color:"",width:t.width,dashType:t.dashType},zIndex:-1}));this.addBackgroundPaths(i),this.appendVisual(i)},p.prototype.pointsByCategoryIndex=function(t){var e=this.charts,i=[];if(null!==t)for(var o=0;o<e.length;o++)if("_navigator"!==e[o].pane.options.name){var r=e[o].categoryPoints[t];if(r&&r.length)for(var n=0;n<r.length;n++){var s=r[n];s&&k(s.value)&&null!==s.value&&i.push(s)}}return i},p.prototype.pointsBySeriesIndex=function(e){return this.filterPoints(function(t){return t.series.index===e})},p.prototype.pointsByPointIndex=function(e){return this.filterPoints(function(t){return t.getIndex()===e})},p.prototype.pointsBySeriesName=function(e){return this.filterPoints(function(t){return t.series.name===e})},p.prototype.filterPoints=function(t){for(var e=this.charts,i=[],o=0;o<e.length;o++)for(var r=e[o].points,n=0;n<r.length;n++){var s=r[n];s&&!1!==s.visible&&t(s)&&i.push(s)}return i},p.prototype.findPoint=function(t){for(var e=this.charts,i=0;i<e.length;i++)for(var o=e[i].points,r=0;r<o.length;r++){var n=o[r];if(n&&!1!==n.visible&&t(n))return n}},p.prototype.paneByPoint=function(t){for(var e=this.panes,i=0;i<e.length;i++){var o=e[i];if(o.box.containsPoint(t))return o}},p.prototype.detachLabels=function(){var t=this.groupAxes(this.panes),e=t.x,t=t.y;this.detachAxisGroupLabels(t,e),this.detachAxisGroupLabels(e,t)},p.prototype.detachAxisGroupLabels=function(t,e){for(var i=0,o=0;o<t.length;o++){var r=t[o],n=r.pane,s=mp(e,n)||e[0],s=this.createLabelAxis(r,o+i,s);s&&(i++,r=n.axes.indexOf(r)+i,n.appendAxisAt(s,r))}},p.prototype.createLabelAxis=function(t,e,i){var o=t.options.labels,r=o.position;if(r!==J&&r!==pt||!1===o.visible)return null;var o=this.groupAxes(this.panes),o=i.options.vertical?o.x:o.y,o=this.axisCrossingValues(i,o),r=r===J,n=i.range(),r=r?n.max:n.min;if(x(o[e],n.min,n.max)-r==0)return null;o.splice(e+1,0,r),i.options.axisCrossingValues=o;n=t.clone();return t.clear(),n.options.name=void 0,n.options.line.visible=!1,n.options.crosshair=void 0,n.options.notes=void 0,n.options.plotBands=void 0,n},p.prototype.isTrendline=function(t){return t&&u(t.type,Hs)},p.prototype.trendlineFactory=function(){},p.prototype.createTrendlineSeries=function(){var o=this,r=[];return this.series=this.series.map(function(t){if(!o.isTrendline(t))return t;var e,i=o.seriesByName(t.for);if(i)return e=Dn.current.valueFields(i),e=he(e),(e=o.trendlineFactory(Object.assign({},{field:e},t),i))&&(!1===i.visible&&(e.visible=!1),e.color===ot&&(e.color=i.color),r.push(e)),e;throw new Error('Invalid Configuration: Unable to locate linked series "'+t.for+'" for trendline "'+t.name+'".')}).filter(function(t){return null!==t}),r},p.prototype.seriesByName=function(e){return this.series.find(function(t){return t.name===e})},p.prototype.getFirstPoint=function(){for(var t=0;t<this.series.length;t++){var e=this.pointsBySeriesIndex(t).find(gp);if(e)return e}},p.prototype.getPointBelow=function(t){return this._getNextPoint(t,this._pointsByVertical,1)},p.prototype.getPointAbove=function(t){return this._getNextPoint(t,this._pointsByVertical,-1)},p.prototype.getPointToTheRight=function(t){return this._getNextPoint(t,this._pointsByHorizontal,1)},p.prototype.getPointToTheLeft=function(t){return this._getNextPoint(t,this._pointsByHorizontal,-1)},p.prototype._getNextPoint=function(o,r,t){function e(t){for(var e,i=0;0===(e=r.call(n,o,i+=t).filter(gp)).length;);return e}var n=this,i=r.call(this,o).filter(gp),t=i.indexOf(o)+t;return t<0?(i=e(-1)).at(-1):t>=i.length?(i=e(1)).at(0):i[t]},p.prototype._pointsByVertical=function(t){return this.pointsByPointIndex(t.getIndex())},p.prototype._pointsByHorizontal=function(t,e){t=Ct(t.series.index+(e=void 0===e?0:e),this.series.length);return this.pointsBySeriesIndex(t)};var yp,h=p;function p(t,e,i){yp.call(this,e),this.initFields(t,e),this.series=t,this.initSeries(),this.charts=[],this.options.legend=this.options.legend||{},this.options.legend.data=[],this.axes=[],this.crosshairs=[],this.chartService=i,this.originalOptions=e,this.originalSeries=t,this._bindCache=new WeakMap,this.createPanes(),this.render(),this.createCrosshairs()}function vp(t){for(var e,i=t.length,o=0;o<i;o++){var r=t[o],n=!1!==r.options.visible;(n||(e=>!e.pane.axes.some(function(t){return t.options.vertical===e.options.vertical&&t!==e&&!1!==t.options.visible}))(r))&&(n=n?r.contentBox():r.lineBox(),e?e.wrap(n):e=n.clone())}return e||new I}function mp(t,e){for(var i=0;i<t.length;i++){var o=t[i];if(o&&o.pane===e)return o}}var xp,_p,bp,wp,kp,Ap=function(t){return t.reduce(function(t,e){return t.concat(e.axes)},[])};e(h,{series:[],plotArea:{margin:{}},background:"",border:{color:Y,width:0},paneDefaults:{title:{}},legend:{inactiveItems:{labels:{color:"#919191"},markers:{color:"#919191"}}}});let Sp=h,Cp={hover:function(t,e){this._dispatchEvent(t,e,Ys)},click:function(t,e){this._dispatchEvent(t,e,"plotAreaClick")}},Pp=Cp,Tp=((xp=M.Class)&&(Mp.__proto__=xp),((Mp.prototype=Object.create(xp&&xp.prototype)).constructor=Mp).prototype.aggregatePoints=function(t,e){var i,o=this._series,r=this._seriesFields,n=this._bindPoints(t||[]),t=n.dataItems[0],s={};!t||m(t)||yt(t)||((i=function(){}).prototype=t,s=new i);for(var a=0;a<r.length;a++){var l=r[a],h=this._bindField(n.values,l.canonicalName),h=l.transform(h,o,n.dataItems,e);if(!(null===h||!Ot(h)||k(h.length)||h instanceof Date)){s=h;break}if(k(h)){p=void 0;c=void 0;u=void 0;d=void 0;f=void 0;g=void 0;var p=l.name;var c=s;var u=h;var d=c,f=p;if(-1<p.indexOf(".")){for(var g=p.split(".");1<g.length;)f=g.shift(),k(d[f])||(d[f]={}),d=d[f];f=g.shift()}d[f]=u}}return s},Mp.prototype._bindPoints=function(t){for(var e=this._binder,i=this._series,o=[],r=[],n=0;n<t.length;n++){var s=t[n];o.push(e.bindPoint(i,s)),r.push(i.data[s])}return{values:o,dataItems:r}},Mp.prototype._bindField=function(t,e){for(var i=[],o=t.length,r=0;r<o;r++){var n=t[r],s=n.valueFields,s=(k(s[e])?s:n.fields)[e];i.push(s)}return i},Mp);function Mp(t,e,i){xp.call(this);var o=e.canonicalFields(t),r=e.valueFields(t),n=e.sourceFields(t,o),s=this._seriesFields=[],i=i.query(t.type),a=t.aggregate||i;this._series=t,this._binder=e;for(var l=0;l<o.length;l++){var h=o[l],p=void 0;if(Ot(a))p=a[h];else{if(0!==l&&!u(h,r))break;p=a}p&&s.push({canonicalName:h,name:n[l],transform:Pt(p)?p:Rn[p]})}}let Op=Tp,Lp=((_p=M.Class)&&(Ip.__proto__=_p),((Ip.prototype=Object.create(_p&&_p.prototype)).constructor=Ip).prototype.register=function(t,e){for(var i=0;i<t.length;i++)this._defaults[t[i]]=e},Ip.prototype.query=function(t){return this._defaults[t]},Ip);function Ip(){_p.call(this),this._defaults={}}Lp.current=new Lp;let Bp=Lp,Ep=((bp=Ul)&&(Rp.__proto__=bp),((Rp.prototype=Object.create(bp&&bp.prototype)).constructor=Rp).prototype.createLabel=function(){var t=this.options.labels,e=O({},t,t.from),t=O({},t,t.to);e.visible&&(this.labelFrom=this.createLabelElement(e),this.append(this.labelFrom)),t.visible&&(this.labelTo=this.createLabelElement(t),this.append(this.labelTo))},Rp.prototype.reflow=function(t){this.render();var e=this.labelFrom,i=this.labelTo,o=this.value;this.box=t,e&&(e.options.aboveAxis=o.from>o.to,e.reflow(t)),i&&(i.options.aboveAxis=o.to>o.from,i.reflow(t)),this.note&&this.note.reflow(t)},Rp);function Rp(){bp.apply(this,arguments)}Ep.prototype.defaults=O({},Ep.prototype.defaults,{labels:{format:"{0} - {1}"},tooltip:{format:"{1}"}});let Vp=Ep,jp=((wp=gh)&&(zp.__proto__=wp),((zp.prototype=Object.create(wp&&wp.prototype)).constructor=zp).prototype.pointType=function(){return Vp},zp.prototype.pointValue=function(t){return t.valueFields},zp.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)},zp.prototype.plotRange=function(t){return t?[t.value.from,t.value.to]:0},zp.prototype.updateRange=function(t,e){var e=e.series.axis,i=t.from,o=t.to,r=this.valueAxisRanges[e];null!==t&&m(i)&&m(o)&&((r=this.valueAxisRanges[e]=r||{min:rt,max:nt}).min=Math.min(r.min,i),r.max=Math.max(r.max,i),r.min=Math.min(r.min,o),r.max=Math.max(r.max,o))},zp.prototype.aboveAxis=function(t){t=t.value;return t.from<t.to},zp);function zp(){wp.apply(this,arguments)}jp.prototype.plotLimits=Da.prototype.plotLimits;let Dp=jp,Fp=((kp=Wa)&&(Hp.__proto__=kp),((Hp.prototype=Object.create(kp&&kp.prototype)).constructor=Hp).prototype.aliasFor=function(){return this.parent},Hp);function Hp(){kp.apply(this,arguments)}let Np=Fp;(Up=o)&&($p.__proto__=Up),(($p.prototype=Object.create(Up&&Up.prototype)).constructor=$p).prototype.render=function(){var t,e,i,o;this._rendered||(this._rendered=!0,t=(e=this.options).markers,e=e.labels,o=this.value,i=this.fromPoint=new Np(o,O({},this.options,{labels:e.from,markers:t.from})),o=this.toPoint=new Np(o,O({},this.options,{labels:e.to,markers:t.to})),this.copyFields(i),this.copyFields(o),this.append(i),this.append(o))},$p.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())},$p.prototype.createHighlight=function(){var t=new M.drawing.Group;return t.append(this.fromPoint.createHighlight()),t.append(this.toPoint.createHighlight()),t},$p.prototype.highlightVisual=function(){return this.visual},$p.prototype.highlightVisualArgs=function(){return{options:this.options,from:this.fromPoint.highlightVisualArgs(),to:this.toPoint.highlightVisualArgs()}},$p.prototype.createFocusHighlight=function(){var t=new M.drawing.Group;return t.append(this.fromPoint.createFocusHighlight()),t.append(this.toPoint.createFocusHighlight()),t},$p.prototype.tooltipAnchor=function(){var t,e,i,o,r=this.owner.pane.clipBox();if(!r||r.overlaps(this.box))return i=(r=this.box).center(),o=C,r=this.options.vertical?(t=i.x,e=r.y1-5,S):(t=r.x2+5,e=i.y,b),{point:new A(t,e),align:{horizontal:o,vertical:r}}},$p.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},$p.prototype.overlapsBox=function(t){return this.box.overlaps(t)},$p.prototype.unclipElements=function(){this.fromPoint.unclipElements(),this.toPoint.unclipElements()},$p.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}"}))},$p.prototype.positionLabels=function(t,e){var i,o=this.options,r=o.labels;"auto"===r.position&&(o=o.vertical?e.y1<=t.y1?(i=ts,es):(i=es,ts):e.x1<=t.x1?(i=C,P):(i=P,C),r.from&&r.from.position||(this.fromPoint.options.labels.position=o),r.to&&r.to.position||(this.toPoint.options.labels.position=i))},$p.prototype.copyFields=function(t){t.dataItem=this.dataItem,t.category=this.category,t.series=this.series,t.color=this.color,t.owner=this.owner},$p.prototype.focusVisual=function(){this.fromPoint.focusVisual()},$p.prototype.clearFocusFromVisual=function(){this.toPoint.clearFocusFromVisual()},$p.prototype.getIndex=function(){return this.categoryIx};var Up,Gp,Wp,Xp,Yp,qp,Zp,Qp,Kp,h=$p;function $p(t,e){Up.call(this),this.value=t,this.options=e,this.aboveAxis=_(this.options.aboveAxis,!0),this.tooltipTracking=!0,this._id=Ue(),this.initLabelsFormat()}O(h.prototype,Ha),O(h.prototype,Na),h.prototype.defaults={markers:{visible:!1,background:a,size:8,type:q,border:{width:2},opacity:1},labels:{visible:!1,margin:w(3),padding:w(4),animation:{type:qn,delay:Yn},position:"auto"},notes:{label:{}},highlight:{markers:{border:{color:a,width:2}},zIndex:100},tooltip:{format:"{0} - {1}"},accessibility:{role:t,className:i,ariaRoleDescription:js}};let Jp=h,tc=((Gp=Al)&&(ec.__proto__=Gp),((ec.prototype=Object.create(Gp&&Gp.prototype)).constructor=ec).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.toGeometryPoints(this.toPoints()))},ec.prototype.stackSegments=function(){var t=this.fromSegments;return t=this.fromSegments?t:this.fromSegments=this.segmentsFromPoints(this.toGeometryPoints(this.fromPoints().reverse()))},ec.prototype.createStroke=function(t){var e=new M.drawing.Path(t),t=new M.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)},ec.prototype.hasStackSegment=function(){return!0},ec.prototype.fromPoints=function(){return this.linePoints.map(function(t){return t.fromPoint})},ec.prototype.toPoints=function(){return this.linePoints.map(function(t){return t.toPoint})},ec);function ec(){Gp.apply(this,arguments)}let ic=tc,oc=((Wp=ic)&&(rc.__proto__=Wp),((rc.prototype=Object.create(Wp&&Wp.prototype)).constructor=rc).prototype.createStrokeSegments=function(){return this.createCurveSegments(this.toPoints())},rc.prototype.stackSegments=function(){var t=this.fromSegments;return t=this.fromSegments?t:this.fromSegments=this.createCurveSegments(this.fromPoints().reverse())},rc.prototype.createCurveSegments=function(t){return(new kn).process(this.toGeometryPoints(t))},rc);function rc(){Wp.apply(this,arguments)}let nc=oc,sc=((Xp=ic)&&(ac.__proto__=Xp),((ac.prototype=Object.create(Xp&&Xp.prototype)).constructor=ac).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.calculateStepPoints(this.toPoints()))},ac.prototype.stackSegments=function(){var t=this.fromSegments;return this.fromSegments||(t=this.fromSegments=this.segmentsFromPoints(this.calculateStepPoints(this.fromPoints()))).reverse(),t},ac);function ac(){Xp.apply(this,arguments)}O(sc.prototype,l);let lc=sc,hc=((Yp=Da)&&(pc.__proto__=Yp),((pc.prototype=Object.create(Yp&&Yp.prototype)).constructor=pc).prototype.render=function(){Yp.prototype.render.call(this),this.renderSegments()},pc.prototype.pointType=function(){return Jp},pc.prototype.createPoint=function(t,e){var i=e.series,o=e.seriesIx,r=t.valueFields;if(!Ta(r.from)&&!Ta(r.to)){if(this.seriesMissingValues(i)!==$n)return null;r={from:0,to:0}}o=this.pointOptions(i,o),o=this.evalPointOptions(o,r,e),e=t.fields.color||i.color,Pt(i.color)&&(e=o.color),t=new Jp(r,o);return t.color=e,this.append(t),t},pc.prototype.createSegment=function(t,e,i){var o=(e.line||{}).style;return new("smooth"===o?nc:"step"===o?lc:ic)(t,e,i)},pc.prototype.plotRange=function(t,e){return t?[t.value.from,t.value.to]:[e,e]},pc.prototype.valueSlot=function(t,e){var i=t.getSlot(e[0],e[0],!this.options.clip),t=t.getSlot(e[1],e[1],!this.options.clip);if(i&&t)return{from:i,to:t}},pc.prototype.pointSlot=function(t,e){var i,o=e.from,e=e.to,o=this.options.invertAxes?(i=new I(o.x1,t.y1,o.x2,t.y2),new I(e.x1,t.y1,e.x2,t.y2)):(i=new I(t.x1,o.y1,t.x2,o.y2),new I(t.x1,e.y1,t.x2,e.y2));return{from:i,to:o}},pc.prototype.addValue=function(t,e){var i=t.valueFields;m(i.from)||(i.from=i.to),m(i.to)||(i.to=i.from),Yp.prototype.addValue.call(this,t,e)},pc.prototype.updateRange=function(t,e){var i;null!==t&&m(t.from)&&m(t.to)&&(e=e.series.axis,e=this.valueAxisRanges[e]=this.valueAxisRanges[e]||{min:rt,max:nt},i=t.from,t=t.to,e.min=Math.min(e.min,i,t),e.max=Math.max(e.max,i,t))},pc.prototype.formatPointValue=function(t,e){t=t.value;return this.chartService.format.auto(e,t.from,t.to)},pc.prototype.animationPoints=function(){for(var t=this.points,e=[],i=0;i<t.length;i++){var o=t[i];o&&(e.push((o.fromPoint||{}).marker),e.push((o.toPoint||{}).marker))}return e.concat(this._segments)},pc);function pc(){Yp.apply(this,arguments)}O(hc.prototype,Ja,ml);let cc=hc,uc=((qp=mh)&&(dc.__proto__=qp),((dc.prototype=Object.create(qp&&qp.prototype)).constructor=dc).prototype.reflow=function(t){var e=this.options,i=this.value,e=this.owner.seriesValueAxis(e),o=[],r=[],n=[],s=e.getSlot(i.low,i.high),a=e.getSlot(i.open,i.open),e=e.getSlot(i.close,i.close),i=(a.x1=e.x1=s.x1=t.x1,a.x2=e.x2=s.x2=t.x2,s.center().x);o.push([a.x1,a.y1]),o.push([i,a.y1]),r.push([i,e.y1]),r.push([e.x2,e.y1]),n.push([i,s.y1]),n.push([i,s.y2]),this.lines=[o,r,n],this.box=s.clone().wrap(a.clone().wrap(e)),this.reflowNote()},dc.prototype.createBody=function(){},dc);function dc(){qp.apply(this,arguments)}let fc=uc,gc=((Zp=bh)&&(yc.__proto__=Zp),((yc.prototype=Object.create(Zp&&Zp.prototype)).constructor=yc).prototype.pointType=function(){return fc},yc);function yc(){Zp.apply(this,arguments)}let vc=gc,mc=((Qp=o)&&(xc.__proto__=Qp),((xc.prototype=Object.create(Qp&&Qp.prototype)).constructor=xc).prototype.linePoints=function(){var t,e=this.from,i=this.from.box,o=this.to.box,r=[];return e.isVertical?(t=e.aboveAxis?i.y1:i.y2,r.push([i.x1,t],[o.x2,t])):(t=e.aboveAxis?i.x2:i.x1,r.push([t,i.y1],[t,o.y2])),r},xc.prototype.createVisual=function(){Qp.prototype.createVisual.call(this);var t=this.series.line||{},t=M.drawing.Path.fromPoints(this.linePoints(),{stroke:{color:t.color,width:t.width,opacity:t.opacity,dashType:t.dashType}});_t(t),this.visual.append(t)},xc);function xc(t,e,i){Qp.call(this),this.from=t,this.to=e,this.series=i}e(mc,{animation:{type:qn,delay:Yn}});let _c=mc,bc=((Kp=gh)&&(wc.__proto__=Kp),((wc.prototype=Object.create(Kp&&Kp.prototype)).constructor=wc).prototype.render=function(){Kp.prototype.render.call(this),this.createSegments()},wc.prototype.traverseDataPoints=function(t){for(var e=this.options.series,i=_a(e),o=!this.options.invertAxes,r=0;r<e.length;r++)for(var n=e[r],s=0,a=0,l=0;l<i;l++){var h=Dn.current.bindPoint(n,l),p=h.valueFields.value,c=h.fields.summary,u=s,d=void 0;c?"total"===c.toLowerCase()?(u=0,d=h.valueFields.value=s):(d=u-(h.valueFields.value=a),a=0):m(p)&&(a+=p,d=s+=p),t(h,{category:this.categoryAxis.categoryAt(l),categoryIx:l,series:n,seriesIx:r,total:s,runningTotal:a,from:u,to:d,isVertical:o})}},wc.prototype.updateRange=function(t,e){Kp.prototype.updateRange.call(this,{value:e.to},e)},wc.prototype.aboveAxis=function(t){return 0<=t.value},wc.prototype.plotRange=function(t){return[t.from,t.to]},wc.prototype.createSegments=function(){for(var t=this.options.series,e=this.seriesPoints,i=this.segments=[],o=0;o<t.length;o++){var r=t[o],n=e[o];if(n)for(var s=void 0,a=0;a<n.length;a++){var l,h=n[a];h&&s&&(l=new _c(s,h,r),i.push(l),this.append(l)),s=h}}},wc);function wc(){Kp.apply(this,arguments)}function kc(t,e,i){return(t=t[String(e)])?t(i):null}function Ac(t,e){for(var i,o,r=0,n=0,s=0,a=0,l=0,h=Number.MAX_VALUE,p=Number.MIN_VALUE,c=0;c<t.length;c++){var u=e(t[c]),d=u.xValue,u=u.yValue;isFinite(d)&&null!==d&&isFinite(u)&&null!==u&&(h=Math.min(d,h),p=Math.max(d,p),l++,r+=d,n+=u,s+=Math.pow(d,2),a+=d*u)}return 0<l&&(o=(n-(i=(l*a-r*n)/(l*s-Math.pow(r,2)))*r)/l),{slope:i,intercept:o,count:l,xMin:h,xMax:p}}function Sc(t,e){return t.every(function(t){t=t.valueFields;return!Ta(t[e])||0<t[e]})}function Cc(t,e){for(var i=[],o=e.totalRangeIndices(),r=e.currentRangeIndices(),n={min:Math.floor(Math.max(r.min-1,o.min)),max:Math.ceil(Math.min(r.max+2,o.max))},s=n.min;s<n.max;s++){var a=s+1;i[s]={category:e.categoryAt(s,!0),value:t(a)}}return i}function Pc(t,e,i){for(var o=[],r=[],n=Math.max(2,i)-1,s=0,a=0,l=0;l<t.length;l++){var h=e(t[l]),p=h.xValue,h=h.yValue;if(isFinite(h)&&null!==h?(r.push(h),a+=h,s=Math.max(l,s)):r.push(null),n<=l){var h=r.filter(function(t){return null!==t}).length,c=r.shift()||0;if(0<h){o.push([p,a/h]),a-=c;continue}}o.push([p,null])}return o.slice(0,s+1)}function Tc(t,e,i){for(var o=Math.min(Math.max(i||1,1),6)+1,r=new De,n=new De,s=0,a=Number.MAX_VALUE,l=Number.MIN_VALUE,i=function(t){return t},h=[],p=0;p<t.length;p++){var c=e(t[p]),u=c.xValue,c=c.yValue;if(isFinite(u)&&null!==u&&isFinite(c)&&null!==c){a=Math.min(u,a),l=Math.max(u,l),s++,n.set(p,0,c),r.set(p,0,1),r.set(p,1,u);for(var d=2;d<=o;d++)r.set(p,d,Math.pow(r.get(p,1),d))}else r.set(p,0,0)}return r.width=Math.min(o,s),0<s&&(h=((t,e)=>{for(var i=t.transpose(),o=i.multiply(t).inverse().multiply(i).multiply(e),r=[],n=0;n<o.height;n++)r.push(o.get(n,0));return r})(r,n),i=function(o){return h.reduce(function(t,e,i){return t+e*Math.pow(o,i)},0)}),{coefficients:h,count:s,valueMapper:i,xMin:a,xMax:l}}let Mc=bc,Oc={exponentialTrendline:function(t){var e,i,o,r,n,s=t.options,t=(r=(t={seriesValues:t.seriesValues,categoryAxis:t.categoryAxis,options:s}).categoryAxis,n=t.options,t=(0,t.seriesValues)(),Sc(t,n.field)&&(n=(t=Ac(t,(e=n.field,function(t){return{xValue:t.categoryIx+1,yValue:Math.log(t.valueFields[e])}}))).slope,0<t.count)?(i=Math.exp(t.intercept),o=n,Cc(function(t){return i*Math.exp(o*t)},r)):null);return t?Object.assign({},s,{type:"line",data:t,categoryField:"category",field:"value"}):null},linearTrendline:function(t){var e,i,o,r,n=t.options,s=(i=(t={seriesValues:t.seriesValues,categoryAxis:t.categoryAxis,options:n}).categoryAxis,s=t.options,t=Ac((0,t.seriesValues)(),(e=s.field,function(t){return{xValue:t.categoryIx+1,yValue:t.valueFields[e]}})),o=t.slope,r=t.intercept,0<t.count?Cc(function(t){return o*t+r},i):null);return s?Object.assign({},n,{type:"line",data:s,categoryField:"category",field:"value"}):null},logarithmicTrendline:function(t){var i,e,o,r,n=t.options,s=(r=(t={seriesValues:t.seriesValues,categoryAxis:t.categoryAxis,options:n}).categoryAxis,s=t.options,t=Ac((0,t.seriesValues)(),(i=s.field,function(t){var e=t.categoryIx,t=t.valueFields;return{xValue:Math.log(e+1),yValue:t[i]}})),s=t.slope,0<t.count?(e=s,o=t.intercept,Cc(function(t){return e*Math.log(t)+o},r)):null);return s?Object.assign({},n,{type:"line",data:s,categoryField:"category",field:"value"}):null},movingAverageTrendline:function(t){var e,i,o,r,n,s,a=t.options,l=(i=r=(t=t).categoryAxis,l=t.seriesValues,o=((t=t.options).trendline||{}).period||2,n=i.totalRangeIndices(),i=i.currentRangeIndices(),i={min:Math.floor(Math.max(i.min-o,n.min)),max:Math.ceil(Math.min(i.max+o+2,n.max))},n=Pc(l(i),(e=t.field,function(t){return{xValue:t.categoryIx,yValue:t.valueFields[e]}}),o),s=[],n.forEach(function(t){var e=t[0],t=t[1];s[e]={category:r.categoryAt(e,!0),value:t}}),0<s.length?s:null);return l?Object.assign({},a,{type:"line",data:l,categoryField:"category",field:"value"}):null},polynomialTrendline:function(t){var e,i,o,r,n=t.options,s=(i=(t={seriesValues:t.seriesValues,categoryAxis:t.categoryAxis,options:n}).seriesValues,o=t.categoryAxis,s=((t=t.options).trendline||{}).order,i=Tc(i(),(e=t.field,function(t){return{xValue:t.categoryIx+1,yValue:t.valueFields[e]}}),s),t=i.count,r=i.valueMapper,0<t?Cc(function(t){return r(t)},o):null);return s?Object.assign({},n,{type:"line",data:s,categoryField:"category",field:"value"}):null},powerTrendline:function(t){var i,e,o,r,n,s=t.options,t=(r=(t={seriesValues:t.seriesValues,categoryAxis:t.categoryAxis,options:s}).categoryAxis,n=t.options,t=(0,t.seriesValues)(),Sc(t,n.field)&&(n=(t=Ac(t,(i=n.field,function(t){var e=t.categoryIx,t=t.valueFields;return{xValue:Math.log(e+1),yValue:Math.log(t[i])}}))).slope,0<t.count)?(e=Math.exp(t.intercept),o=n,Cc(function(t){return e*Math.pow(t,o)},r)):null);return t?Object.assign({},s,{type:"line",data:t,categoryField:"category",field:"value"}):null}},Lc=Oc;var Ic,Bc,Ec=[rs,Os,Ss,Es],Rc=[ys,Bs].concat(Ec),h=((Ic=Sp)&&(c.__proto__=Ic),((c.prototype=Object.create(Ic&&Ic.prototype)).constructor=c).prototype.initFields=function(t){if(this.namedCategoryAxes={},this.namedValueAxes={},this.valueAxisRangeTracker=new Vl,this._seriesPointsCache={},this._currentPointsCache={},0<t.length){this.invertAxes=u(t[0].type,[ns,ls,Bs,Os,Es,Cs,gs,Ls]);for(var e=0;e<t.length;e++){var i=t[e].stack;if(i&&"100%"===i.type){this.stack100=!0;break}}}},c.prototype.render=function(t){void 0===t&&(t=this.panes),this.series=[].concat(this.originalSeries),this.createCategoryAxes(t),this.aggregateCategories(t),this.createTrendlineSeries(t),this.createCategoryAxesLabels(t),this.createCharts(t),this.createValueAxes(t)},c.prototype.removeAxis=function(t){var e=t.options.name;Ic.prototype.removeAxis.call(this,t),t instanceof Mr?delete this.namedCategoryAxes[e]:(this.valueAxisRangeTracker.reset(e),delete this.namedValueAxes[e]),t===this.categoryAxis&&delete this.categoryAxis,t===this.valueAxis&&delete this.valueAxis},c.prototype.trendlineFactory=function(t,e){var i=this.seriesCategoryAxis(t),o=this.seriesValues.bind(this,e.index),t=kc(Lc,t.type,{options:t,categoryAxis:i,seriesValues:o});return t&&(t.categoryAxis=e.categoryAxis,t.valueAxis=e.valueAxis,this.filterSeries(t,i))},c.prototype.trendlineAggregateForecast=function(){return this.series.map(function(t){return(t.trendline||{}).forecast}).filter(function(t){return void 0!==t}).reduce(function(t,e){return{before:Math.max(t.before,e.before||0),after:Math.max(t.after,e.after||0)}},{before:0,after:0})},c.prototype.seriesValues=function(t,e){var i=[],o=this.srcSeries[t],t=this.seriesCategoryAxis(o);ba(t.options.type,K)&&(this._seriesPointsCache={},this._currentPointsCache={},t.options.dataItems=[],o=this.aggregateSeries(o,t,t.totalRangeIndices()));for(var t=e?e.min:0,r=e?e.max:o.data.length,n=t;n<r;n++){var s=this.bindPoint(o,n);i.push({categoryIx:n,category:s.fields.category,valueFields:s.valueFields})}return i},c.prototype.createCharts=function(t){for(var e=this.groupSeriesByPane(),i=0;i<t.length;i++){var o=t[i],r=e[o.options.name||"default"]||[],r=(this.addToLegend(r),this.filterVisibleSeries(r));if(r)for(var n=this.groupSeriesByCategoryAxis(r),s=0;s<n.length;s++)this.createChartGroup(n[s],o)}},c.prototype.createChartGroup=function(t,e){this.createAreaChart(Aa(t,[rs,Os]),e),this.createRangeAreaChart(Aa(t,[Ss,Es]),e),this.createBarChart(Aa(t,[ps,ns]),e),this.createRangeBarChart(Aa(t,[Ps,Cs]),e),this.createBulletChart(Aa(t,[ls,Is]),e),this.createCandlestickChart(Aa(t,hs),e),this.createBoxPlotChart(Aa(t,[ss,Ls]),e),this.createOHLCChart(Aa(t,vs),e),this.createWaterfallChart(Aa(t,[Rs,gs]),e),this.createLineChart(Aa(t,[ys,Bs]),e)},c.prototype.aggregateCategories=function(t){var e=[].concat(this.series),i=[];this._currentPointsCache={},this._seriesPointsCache=this._seriesPointsCache||{};for(var o=0;o<e.length;o++){var r,n,s=e[o];this.isTrendline(s)||(r=this.seriesCategoryAxis(s),n=this.findPane(r.options.pane),s=(ba(r.options.type,K)||s.categoryField)&&u(n,t)?this.aggregateSeries(s,r,r.currentRangeIndices()):this.filterSeries(s,r)),i.push(s)}this._seriesPointsCache=this._currentPointsCache,this._currentPointsCache=null,this.srcSeries=e,this.series=i},c.prototype.filterSeries=function(e,i){var o,t,r,n=(e.data||{}).length;return i._seriesMax=Math.max(i._seriesMax||0,n),k(i.options.min)||k(i.options.max)?(o=i.currentRangeIndices(),t=u(e.type,Rc),(r=O({},e)).data=(r.data||[]).slice(o.min,o.max+1),t&&Ea(r,o,n,function(t){return{item:e.data[t],category:i.categoryAt(t,!0),categoryIx:t-o.min}},function(t){return k(e.data[t])}),r):e},c.prototype.clearSeriesPointsCache=function(){this._seriesPointsCache={}},c.prototype.seriesSourcePoints=function(t,e){var i=t.index+";"+e.categoriesHash();if(this._seriesPointsCache&&this._seriesPointsCache[i])return this._currentPointsCache[i]=this._seriesPointsCache[i],this._seriesPointsCache[i];var o=e.options,r=o.srcCategories,n=ba(o.type,K),s=t.data,a=[];n||e.indexCategories();for(var l=0;l<s.length;l++){var h,p=Dn.current.bindPoint(t,l).fields.category;n&&(p=Ca(p,s[l],this.chartService.intl)),k(p)||(p=r[l]),k(p)&&null!==p&&(a[h=e.totalIndex(p)]=a[h]||{items:[],category:p},a[h].items.push(l))}return this._currentPointsCache[i]=a},c.prototype.aggregateSeries=function(t,o,r){if(!t.data.length)return t;for(var n=this.seriesSourcePoints(t,o),e=O({},t),s=new Op(O({},t),Dn.current,Bp.current),i=e.data=[],a=o.options.dataItems||[],l=function(t){var e=t-r.min,i=n[t];return(i=i||(n[t]={})).categoryIx=e,i.item||(e=o.categoryAt(t,!0),i.category=e,i.item=s.aggregatePoints(i.items,e)),i},h=r.min;h<=r.max;h++){var p=l(h);i[p.categoryIx]=p.item,p.items&&p.items.length&&(a[p.categoryIx]=p.item)}return u(e.type,Rc)&&Ea(e,r,o.totalCount(),l,function(t){return n[t]}),o.options.dataItems=a,e},c.prototype.appendChart=function(t,e){var i=t.options.series,o=this.seriesCategoryAxis(i[0]),r=o.options.categories,n=Math.max(0,_a(i)-r.length);if(0<n)for(r=o.options.categories=o.options.categories.slice(0);n--;)r.push("");this.valueAxisRangeTracker.update(t.valueAxisRanges),Ic.prototype.appendChart.call(this,t,e)},c.prototype.seriesPaneName=function(t){var e=this.options,i=t.axis,t=Nt([].concat(e.valueAxis),function(t){return t.name===i})[0],e=((e.panes||[{}])[0]||{}).name||"default";return(t||{}).pane||e},c.prototype.seriesCategoryAxis=function(t){var t=t.categoryAxis,e=t?this.namedCategoryAxes[t]:this.categoryAxis;if(e)return e;throw new Error("Unable to locate category axis with name "+t)},c.prototype.stackableChartOptions=function(t,e){var i=t.some(function(t){return t.stack}),o=t.some(function(t){return t.stack&&"100%"===t.stack.type}),e=e.options.clip;return{defaultStack:t[0].stack,isStacked:i,isStacked100:o,clip:e}},c.prototype.groupSeriesByCategoryAxis=function(t){for(var e=[],i={},o=0;o<t.length;o++){var r=t[o].categoryAxis||"$$default$$";je(i,r)||(i[r]=!0,e.push(r))}for(var n=[],s=0;s<e.length;s++){var a=((t,e,i)=>Nt(t,function(t){return 0===i&&!t.categoryAxis||t.categoryAxis===e}))(t,e[s],s);0!==a.length&&n.push(a)}return n},c.prototype.createBarChart=function(t,e){var i;0!==t.length&&(i=t[0],i=new gh(this,Object.assign({series:t,invertAxes:this.invertAxes,gap:i.gap,spacing:i.spacing},this.stackableChartOptions(t,e))),this.appendChart(i,e))},c.prototype.createRangeBarChart=function(t,e){var i;0!==t.length&&(i=t[0],t=new Dp(this,{series:t,invertAxes:this.invertAxes,gap:i.gap,spacing:i.spacing}),this.appendChart(t,e))},c.prototype.createBulletChart=function(t,e){var i;0!==t.length&&(i=t[0],t=new Kh(this,{series:t,invertAxes:this.invertAxes,gap:i.gap,spacing:i.spacing,clip:e.options.clip}),this.appendChart(t,e))},c.prototype.createLineChart=function(t,e){0!==t.length&&(t=new bl(this,Object.assign({invertAxes:this.invertAxes,series:t},this.stackableChartOptions(t,e))),this.appendChart(t,e))},c.prototype.createAreaChart=function(t,e){0!==t.length&&(t=new Bl(this,Object.assign({invertAxes:this.invertAxes,series:t},this.stackableChartOptions(t,e))),this.appendChart(t,e))},c.prototype.createRangeAreaChart=function(t,e){0!==t.length&&(t=new cc(this,{invertAxes:this.invertAxes,series:t,clip:e.options.clip}),this.appendChart(t,e))},c.prototype.createOHLCChart=function(t,e){var i;0!==t.length&&(i=t[0],t=new vc(this,{invertAxes:this.invertAxes,gap:i.gap,series:t,spacing:i.spacing,clip:e.options.clip}),this.appendChart(t,e))},c.prototype.createCandlestickChart=function(t,e){var i;0!==t.length&&(i=t[0],t=new bh(this,{invertAxes:this.invertAxes,gap:i.gap,series:t,spacing:i.spacing,clip:e.options.clip}),this.appendChart(t,e))},c.prototype.createBoxPlotChart=function(t,e){var i;0!==t.length&&(i=t[0],t=new Oh(this,{invertAxes:this.invertAxes,gap:i.gap,series:t,spacing:i.spacing,clip:e.options.clip}),this.appendChart(t,e))},c.prototype.createWaterfallChart=function(t,e){var i;0!==t.length&&(i=t[0],t=new Mc(this,{series:t,invertAxes:this.invertAxes,gap:i.gap,spacing:i.spacing}),this.appendChart(t,e))},c.prototype.axisRequiresRounding=function(t,e){for(var i=Aa(this.series,Vs),o=0;o<this.series.length;o++){var r,n=this.series[o];u(n.type,Ec)&&(r=n.line)&&r.style===os&&i.push(n)}for(var s=0;s<i.length;s++){var a=i[s].categoryAxis||"";if(a===t||!a&&0===e)return!0}},c.prototype.aggregatedAxis=function(t,e){for(var i=this.series,o=0;o<i.length;o++){var r=i[o].categoryAxis||"";if((r===t||!r&&0===e)&&i[o].categoryField)return!0}},c.prototype.createCategoryAxesLabels=function(){for(var t=this.axes,e=0;e<t.length;e++)t[e]instanceof Mr&&t[e].createLabels()},c.prototype.createCategoryAxes=function(t){for(var e=this.invertAxes,i=[].concat(this.options.categoryAxis),o=[],r=0;r<i.length;r++){var n=i[r];if(u(this.findPane(n.pane),t)){var s=n.name,a=n.categories,l=(void 0===a&&(a=[]),n=O({vertical:e,reverse:!e&&this.chartService.rtl,axisCrossingValue:e?rt:0},n),k(n.justified)||(n.justified=this.isJustified()),this.axisRequiresRounding(s,r)&&(n.justified=!1),void 0),l=new(Ma(n,a[0])?(n._forecast=this.trendlineAggregateForecast(),jr):Mr)(n,this.chartService);if(i[r].categories=l.options.srcCategories,s){if(this.namedCategoryAxes[s])throw new Error("Category axis with name "+s+" is already defined");this.namedCategoryAxes[s]=l}l.axisIndex=r,o.push(l),this.appendAxis(l)}}var h=this.categoryAxis||o[0];this.categoryAxis=h,e?this.axisY=h:this.axisX=h},c.prototype.isJustified=function(){for(var t=this.series,e=0;e<t.length;e++)if(!u(t[e].type,Ec))return!1;return!0},c.prototype.createValueAxes=function(t){var e=this.valueAxisRangeTracker,i=e.query(),o=[].concat(this.options.valueAxis),r=this.invertAxes,n={vertical:!r,reverse:r&&this.chartService.rtl},s=[];this.stack100&&(n.roundToMajorUnit=!1,n.labels={format:"P0"});for(var a=0;a<o.length;a++){var l=o[a];if(u(this.findPane(l.pane),t)){var h=l.name,p=ba(l.type,sa)?{min:.1,max:1}:{min:0,max:1},p=e.query(h)||i||p,p=(0===a&&p&&i&&(p.min=Math.min(p.min,i.min),p.max=Math.max(p.max,i.max)),new(ba(l.type,sa)?on:Xr)(p.min,p.max,O({},n,l),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},c.prototype._dispatchEvent=function(t,e,i){var o=t._eventCoordinates(e),r=new A(o.x,o.y),o=this.pointPane(r),n=[],s=[];if(o){for(var a=o.axes,l=0;l<a.length;l++){var h=a[l];h.getValue?ya(s,h.getValue(r)):ya(n,h.getCategory(r))}0===n.length&&ya(n,this.categoryAxis.getCategory(r)),0<n.length&&0<s.length&&t.trigger(i,{element:ae(e),originalEvent:e,category:Oa(n),value:Oa(s)})}},c.prototype.pointPane=function(t){for(var e=this.panes,i=0;i<e.length;i++){var o=e[i];if(o.contentBox.containsPoint(t))return o}},c.prototype.updateAxisOptions=function(t,e){Vc(this.options,t,e),Vc(this.originalOptions,t,e)},c.prototype._pointsByVertical=function(t,e){return void 0===e&&(e=0),this.invertAxes?this._siblingsBySeriesIndex(t.series.index,e):this._siblingsByPointIndex(t.getIndex())},c.prototype._pointsByHorizontal=function(t,e){return void 0===e&&(e=0),this.invertAxes?this._siblingsByPointIndex(t.getIndex()):(t=this._siblingsBySeriesIndex(t.series.index,e),this.chartService.rtl?t.reverse():t)},c.prototype._siblingsByPointIndex=function(e){for(var t=this.charts,i=[],o=0;o<t.length;o++){var r=t[o];r.pane&&"_navigator"===r.pane.options.name||(r=r.points.filter(function(t){return t&&!1!==t.visible&&t.getIndex()===e}),i.push.apply(i,r.sort(this._getSeriesCompareFn(r[0]))))}return i},c.prototype._siblingsBySeriesIndex=function(t,e){t=Ct(t+e,this.series.length);return this.pointsBySeriesIndex(t)},c.prototype._getSeriesCompareFn=function(t){t=this._isInStackedSeries(t);return t&&this.invertAxes||!t&&!this.invertAxes?function(t,e){return t.box.center().x-e.box.center().x}:function(t,e){return t.box.center().y-e.box.center().y}},c.prototype._isInStackedSeries=function(t){var e=u(t.series.type,[rs,Os,Ss,Es,ys,Bs,As,ws]),i=u(t.series.type,[ps,ns]);return e||i&&t.options.isStacked},c);function c(){Ic.apply(this,arguments)}function Vc(t,e,i){O([].concat(e instanceof Mr?t.categoryAxis:t.valueAxis)[e.axisIndex],i)}e(h,{categoryAxis:{},valueAxis:{}}),O(h.prototype,Pp);let jc=h,zc=((Bc=M.Class)&&(Dc.__proto__=Bc),((Dc.prototype=Object.create(Bc&&Bc.prototype)).constructor=Dc).prototype.destroy=function(){this._points=[]},Dc.prototype.show=function(t,e){var i=[].concat(t);this.hide();for(var o=0;o<i.length;o++){var r=i[o];r&&r.toggleHighlight&&r.hasHighlight()&&(this.togglePointHighlight(r,!0,e),this._points.push(r))}},Dc.prototype.togglePointHighlight=function(t,e,i){var o=(t.options.highlight||{}).toggle;o&&(o(o={category:t.category,series:t.series,dataItem:t.dataItem,value:t.value,stackValue:t.stackValue,preventDefault:Fc,visual:t.highlightVisual(),show:e}),o._defaultPrevented)||t.toggleHighlight(e,i)},Dc.prototype.hide=function(){for(var t=this._points;t.length;)this.togglePointHighlight(t.pop(),!1)},Dc.prototype.isHighlighted=function(t){for(var e=this._points,i=0;i<e.length;i++)if(t===e[i])return!0;return!1},Dc);function Dc(){Bc.call(this),this._points=[]}function Fc(){this._defaultPrevented=!0}let Hc=zc;function Nc(t,e){e=(e||"").toLowerCase(),t=t.event;return"none"===e&&!(t.ctrlKey||t.shiftKey||t.altKey)||t[e+"Key"]}function Uc(t){for(var e={},i=0;i<t.length;i++){var o=t[i];o.axis.options.name&&(e[o.axis.options.name]={min:o.range.min,max:o.range.max})}return e}(Gc=M.Class)&&(Jc.__proto__=Gc),((Jc.prototype=Object.create(Gc&&Gc.prototype)).constructor=Jc).prototype.start=function(t){return this._active=Nc(t,this.options.key),this._active},Jc.prototype.move=function(t){if(this._active){t=this.axisRanges=this._panAxes(t,y).concat(this._panAxes(t,v));if(t.length)return Uc(this.axisRanges=t)}},Jc.prototype.end=function(){var t=this._active;return this._active=!1,t},Jc.prototype.pan=function(){var t=this.plotArea,e=this.axisRanges;if(e.length){for(var i=0;i<e.length;i++){var o=e[i];t.updateAxisOptions(o.axis,o.range)}t.redraw(t.panes)}},Jc.prototype.destroy=function(){delete this.plotArea},Jc.prototype._panAxes=function(t,e){var i=this.plotArea,o=-t[e].delta,t=(this.options.lock||"").toLowerCase(),r=[];if(0!=o&&(t||"").toLowerCase()!==e)for(var n=i.axes,s=0;s<n.length;s++){var a,l=n[s];(e===y&&!l.options.vertical||e===v&&l.options.vertical)&&(a=l.pan(o))&&(a.limitRange=!0,r.push({axis:l,range:a}))}return r};var Gc,Wc,Xc,Yc,qc,Zc,Qc,Kc,$c,l=Jc;function Jc(t,e){Gc.call(this),this.plotArea=t,this.options=O({},this.options,e)}l.prototype.options={key:"none",lock:"none"};let tu=l,eu=((Wc=M.Class)&&(iu.__proto__=Wc),((iu.prototype=Object.create(Wc&&Wc.prototype)).constructor=iu).prototype.createElement=function(){var t=this._marquee=document.createElement("div"),e=(t.className="k-marquee",document.createElement("div"));e.className="k-marquee-color",t.appendChild(e)},iu.prototype.removeElement=function(){this._marquee.parentNode&&this._marquee.parentNode.removeChild(this._marquee)},iu.prototype.setStyles=function(t){Bt(this._marquee,t)},iu.prototype.start=function(t){if(Nc(t,this.options.key)){var e=this.chart,i=e._eventCoordinates(t),e=this._zoomPane=e._plotArea.paneByPoint(i),i=e?e.chartsBox().clone():null;if(e&&i)return e=this._elementOffset(),i.translate(e.left,e.top),this._zoomPaneClipBox=i,document.body.appendChild(this._marquee),this.setStyles({left:t.pageX+1,top:t.pageY+1,width:0,height:0}),!0}return!1},iu.prototype._elementOffset=function(){var t=this.chart.element,e=Bt(t,["paddingLeft","paddingTop"]),i=e.paddingLeft,e=e.paddingTop,t=re(t);return{left:i+t.left,top:e+t.top}},iu.prototype.move=function(t){this._zoomPane&&this.setStyles(this._selectionPosition(t))},iu.prototype.end=function(t){var e;if(this._zoomPane)return e=this._elementOffset(),(t=this._selectionPosition(t)).left-=e.left,t.top-=e.top,this._updateAxisRanges({x:t.left,y:t.top},{x:t.left+t.width,y:t.top+t.height}),this.removeElement(),delete this._zoomPane,Uc(this.axisRanges)},iu.prototype.zoom=function(){var t=this.axisRanges;if(t&&t.length){for(var e=this.chart._plotArea,i=0;i<t.length;i++){var o=t[i];e.updateAxisOptions(o.axis,o.range)}e.redraw(e.panes)}},iu.prototype.destroy=function(){this.removeElement(),delete this._marquee,delete this.chart},iu.prototype._updateAxisRanges=function(t,e){for(var i=(this.options.lock||"").toLowerCase(),o=[],r=this._zoomPane.axes,n=0;n<r.length;n++){var s=r[n],a=s.options.vertical;i===y&&!a||i===v&&a||!k(s.axisIndex)||(a=s.pointsRange(t,e))&&o.push({axis:s,range:a})}this.axisRanges=o},iu.prototype._selectionPosition=function(t){var e=this._zoomPaneClipBox,i={x:t.x.startLocation,y:t.y.startLocation},o=t.x.location,t=t.y.location,r=(this.options.lock||"").toLowerCase(),n=Math.min(i.x,o),s=Math.min(i.y,t),a=Math.abs(i.x-o),l=Math.abs(i.y-t);return r===y&&(n=e.x1,a=e.width()),r===v&&(s=e.y1,l=e.height()),o>e.x2&&(a=e.x2-i.x),o<e.x1&&(a=i.x-e.x1),t>e.y2&&(l=e.y2-i.y),t<e.y1&&(l=i.y-e.y1),{left:Math.max(n,e.x1),top:Math.max(s,e.y1),width:a,height:l}},iu);function iu(t,e){Wc.call(this),this.chart=t,this.options=O({},this.options,e),this.createElement()}eu.prototype.options={key:"shift",lock:"none"};let ou=eu,ru=((Xc=M.Class)&&(nu.__proto__=Xc),((nu.prototype=Object.create(Xc&&Xc.prototype)).constructor=nu).prototype.updateRanges=function(t,e){for(var i=(this.options.lock||"").toLowerCase(),o=[],r=this.chart._plotArea.axes,n=0;n<r.length;n++){var s=r[n],a=s.options.vertical;!(i===y&&!a||i===v&&a)&&s.zoomRange&&(a=x(this.options.rate,.01,.9),a=s.zoomRange(-t*a,e))&&o.push({axis:s,range:a})}return Uc(this.axisRanges=o)},nu.prototype.zoom=function(){var t=this.axisRanges,e=this.chart._plotArea;if(t&&t.length&&e.updateAxisOptions){for(var i=0;i<t.length;i++){var o=t[i];e.updateAxisOptions(o.axis,o.range)}e.redraw(e.panes)}},nu.prototype.destroy=function(){delete this.chart},nu);function nu(t,e){Xc.call(this),this.chart=t,this.options=O({rate:.3},this.options,e)}let su=ru,au=((Yc=o)&&(lu.__proto__=Yc),((lu.prototype=Object.create(Yc&&Yc.prototype)).constructor=lu).prototype.render=function(){var t=this.children,e=this.options,i=e.vertical;this.visual=new M.drawing.Layout(null,{spacing:i?0:e.spacing,lineSpacing:i?e.spacing:0,orientation:i?"vertical":gt,reverse:e.rtl,alignItems:i?e.rtl?J:pt:b});for(var o=0;o<t.length;o++){var r=t[o];r.reflow(new I),r.renderVisual()}},lu.prototype.reflow=function(t){this.visual.rect(t.toRect()),this.visual.reflow();t=this.visual.clippedBBox();this.box=t?mo(t):new I},lu.prototype.renderVisual=function(){this.addVisual()},lu.prototype.createVisual=function(){},lu);function lu(t,e){Yc.call(this,t),this.chartService=e}let hu=au,pu=((qc=oo)&&(cu.__proto__=qc),((cu.prototype=Object.create(qc&&qc.prototype)).constructor=cu).prototype.visualStyle=function(){var t=this.markerOptions(),e=t.border;return{stroke:{width:e.width,color:e.color,opacity:_(e.opacity,t.opacity),dashType:e.dashType},fill:{color:t.background,opacity:t.opacity},cursor:t.cursor}},cu.prototype.markerOptions=function(){return this.options},cu.prototype.markerHighlightOptions=function(){var t=this.markerOptions(),e=t.highlight.border.width;return O({},t,{background:t.border.color},t.highlight,t.type===Q?{background:t.highlight.border.color,border:{color:t.highlight.background,width:e/2},width:t.width,height:t.height,margin:{top:0,left:0}}:{})},cu.prototype.createHighlight=function(){var t=new qc(this.markerHighlightOptions()),e=this.paddingBox.clone();return t.reflow(e.pad(t.options.border.width)),this.highlight=[t.getElement()],this.highlight},cu);function cu(){qc.apply(this,arguments)}e(pu,{border:{width:2},width:8,height:8,background:a,margin:{top:-1,left:-1},vAlign:T,align:C,highlight:{width:10,height:10,border:{color:a,width:2}}});let uu=pu,du=((Zc=oo)&&(fu.__proto__=Zc),((fu.prototype=Object.create(Zc&&Zc.prototype)).constructor=fu).prototype.getElement=function(){var t=new M.drawing.Group,e=new M.drawing.MultiPath(this.visualStyle()),i=this.paddingBox,o=i.height()/2;return e.moveTo(i.x1,i.y1+o).lineTo(i.x1,i.y2).lineTo(i.x2,i.y2),t.append(e),t},fu);function fu(){Zc.apply(this,arguments)}e(du,{width:15,height:15,align:P,vAlign:S,margin:{right:-2,bottom:2}});let gu=du,yu=((Qc=oo)&&(vu.__proto__=Qc),((vu.prototype=Object.create(Qc&&Qc.prototype)).constructor=vu).prototype.getElement=function(){var t=new M.drawing.Group,e=new M.drawing.MultiPath({stroke:{color:this.options.border.color,opacity:this.options.opacity,width:this.options.height,dashType:this.options.dashType}}),i=this.paddingBox,o=i.center().y;return e.moveTo(i.x1,o).lineTo(i.x2,o),t.append(e),t},vu.prototype.createHighlight=function(){return this.highlight=[this.createHighlightLine(),this.createHighlightMarker()],this.highlight},vu.prototype.createHighlightLine=function(){var t=O({},{border:{color:this.options.border.color,opacity:this.options.border.opacity,dashType:this.options.border.dashType}},this.options.highlight),t=new gu(t);return t.reflow(this.parent.paddingBox.clone()),this.highlightLine=t.getElement(),this.highlightLine},vu.prototype.createHighlightMarker=function(){var t=O({},{background:this.options.background},this.options.highlight.markers),e=new Qc(t),i=this.parent.paddingBox,t=t.border.width,o=this.parent.box.clone();return o.pad({left:t-i.x1,top:t-i.y1}),e.reflow(o),this.highlightMarker=e.getElement(),this.highlightMarker},vu);function vu(){Qc.apply(this,arguments)}e(yu,{border:{width:0},type:"rect",align:C,vAlign:b,highlight:{border:{width:2},markers:{type:q,width:10,height:10,border:{width:2,color:a},align:C,vAlign:T}}});let mu=yu,xu=((Kc=oo)&&(_u.__proto__=Kc),((_u.prototype=Object.create(Kc&&Kc.prototype)).constructor=_u).prototype.createHighlight=function(){var t=O({},{background:this.options.background},this.options.highlight.markers),t=new Kc(t),e=this.paddingBox.clone(),i=this.parent.box.clone();return e.align(i,y,C),e.align(i,v,T),t.reflow(e),this.highlight=[t.getElement()],this.highlight},_u);function _u(){Kc.apply(this,arguments)}e(xu,{highlight:{markers:{type:q,width:10,height:10,border:{width:2,color:a},margin:{top:-3,left:-3}}}});let bu=xu,wu=(($c=Ji)&&(ku.__proto__=$c),((ku.prototype=Object.create($c&&$c.prototype)).constructor=ku).prototype.createContainer=function(){this.container=new uo({vertical:!1,wrap:!1,align:b,spacing:this.options.spacing}),this.append(this.container)},ku.prototype.createMarker=function(){this.markerWrap=new $c({vertical:!1,shrinkToFit:!0,wrap:!1,margin:1,width:22,height:22}),this.container.append(this.markerWrap),this.createMarkerArea(),this.options.markers.visible&&(this._marker=this._createMarker(),this.markerWrap.append(this._marker))},ku.prototype.createMarkerArea=function(){var t=this.options,e=t.markerColor,t=t.line,e={border:{color:(t=void 0===t?{}:t).color||e,opacity:t.opacity,dashType:t.dashType}};return this._createLine(e)||this._createMarkerLine(e,t)||this._createSquare()},ku.prototype.markerOptions=function(){var t=this.options,e=t.markers,i=t.markerColor,o=(e=void 0===e?{}:e).border;return void 0===o&&(o={}),e.zIndex=void 0,O({},e,{border:{color:o.color||i},highlight:t.highlight.markers})},ku.prototype._highlightOptions=function(){var t=this.options;return O({markers:{type:t.markers.type}},t.highlight)},ku.prototype._createLine=function(t){var e=this.options;return e.type!==ys||e.markers.visible||(this._line=new mu(O({},{background:e.markerColor,highlight:this._highlightOptions()},t,e.line)),this.markerWrap.append(this._line)),this._line},ku.prototype._createMarkerLine=function(t,e){return this.options.type===ys&&(this._markerLineArea=new gu(O({},{border:{width:e.height}},t)),this.markerWrap.append(this._markerLineArea)),this._markerLineArea},ku.prototype._reduceSize=function(t,e,i){void 0===i&&(i=.6),"number"==typeof t[e]&&(t[e]=t[e]*i)},ku.prototype._createSquare=function(){var t,e=this.options;return e.type===rs&&((t=e.pattern||(e.series||{}).pattern)&&("function"==typeof t&&(t=t(e.series)),t=Object.assign({},t),this._reduceSize(t,"gap"),this._reduceSize(t,"width"),this._reduceSize(t,"radius")),this._square=new bu(Object.assign({},{border:e.border,vAlign:e.markers.visible?S:b,highlight:this._highlightOptions()},e.area,{pattern:t,background:e.area.background||e.markerColor})),this.markerWrap.append(this._square)),this._square},ku.prototype._createMarker=function(){return new uu(this.markerOptions())},ku.prototype._highlightMarkers=function(){this.options.active&&this._toggleHighlight(!0)},ku.prototype._restoreMarkers=function(){this._toggleHighlight(!1)},ku.prototype._toggleHighlight=function(e){var t,i,o=this;this.options.highlight.visible&&((t=this._marker||this._square||this._line)&&t===this._line&&this._line.visual.visible(!e),t)&&((i=t.highlight)||(i=t.createHighlight()).forEach(function(t){return t&&o.markerWrap.appendVisual(t)}),i.forEach(function(t){return t&&t.visible(e)}))},ku.prototype.createLabel=function(){var t=this.options,e=O({},t.labels);this.container.append(new So(t.text,e))},ku.prototype.getAriaLabelText=function(){return this.options.text},ku.prototype.focusVisual=function(){this.visual.options.set("id",this._id),this.toggleFocusHighlight(!0),this._highlightMarkers()},ku.prototype.clearFocusFromVisual=function(){this.visual.options.set("id",""),this.toggleFocusHighlight(!1),this._restoreMarkers()},ku.prototype.renderComplete=function(){$c.prototype.renderComplete.call(this);var t=this.options.cursor||{},t=this._itemOverlay=M.drawing.Path.fromRect(this.container.box.toRect(),{fill:{color:a,opacity:0},stroke:null,cursor:t.style||t});this.appendVisual(t)},ku.prototype.click=function(t,e){var i=this.eventArgs(e);!t.trigger(Ns,i)&&e&&"contextmenu"===e.type&&e.preventDefault()},ku.prototype.over=function(t,e){e=this.eventArgs(e);return t.trigger("legendItemHover",e)||(t._legendItemHover(e.seriesIndex,e.pointIndex),this._highlightMarkers()),!0},ku.prototype.out=function(t,e){t._unsetActivePoint(),this._restoreMarkers(),t.trigger("legendItemLeave",this.eventArgs(e))},ku.prototype.eventArgs=function(t){var e=this.options;return{element:ae(t),text:e.text,series:e.series,seriesIndex:e.series.index,pointIndex:e.pointIndex}},ku.prototype.createVisual=function(){$c.prototype.createVisual.call(this);var t=this.options;this.options.visible&&(t=O({ariaLabel:void 0!==t.accessibility.ariaLabel?t.accessibility.ariaLabel:t.text},t.accessibility),to(this.visual,t))},ku.prototype.renderVisual=function(){var e=this,t=this.options,i=t.visual;i?(this.visual=i({active:t.active,series:t.series,sender:this.getSender(),pointIndex:t.pointIndex,options:{type:t.type,markers:O({background:this.options.markerColor},this.markerOptions()),labels:t.labels},createVisual:function(){e.createVisual(),e.renderChildren(),e.renderComplete();var t=e.visual;return delete e.visual,t}}),this._marker=this._markerLineArea=this._square=this._line=null,this.addVisual()):$c.prototype.renderVisual.call(this)},ku.prototype.createFocusHighlight=function(t){var e=t.stroke.width;return M.drawing.Path.fromRect(this.container.box.pad(e/2).toRect(),t)},ku);function ku(t){$c.call(this,t),this.createContainer(),t.rtl?(this.createLabel(),this.createMarker()):(this.createMarker(),this.createLabel()),this._id=Ue(),this.options.accessibility.ariaChecked=t.active}e(wu,{accessibility:{role:"checkbox",className:"k-chart-legend-item",ariaRoleDescription:"Legend item"},markers:{},highlight:{visible:!0,markers:{}}});let Au=wu;var Su,Cu,Pu="custom",h=((Su=o)&&(Tu.__proto__=Su),((Tu.prototype=Object.create(Su&&Su.prototype)).constructor=Tu).prototype.createContainers=function(){var t=this.options,e=t.position,i=t.align,o=e,r=b;e===Pu?o=C:u(e,[T,S])?(o=i===pt?C:i===J?P:b,r=e):i&&(i===pt?r=T:i===J&&(r=S)),this.container=new Ji({margin:t.margin,padding:t.padding,background:t.background,border:t.border,vAlign:r,align:o,zIndex:t.zIndex,shrinkToFit:!0}),this.hasTitle()?this.itemsContainer=new Ji({vAlign:r,align:o,zIndex:t.zIndex,shrinkToFit:!0}):this.itemsContainer=this.container,this.append(this.container)},Tu.prototype.createItems=function(){for(var t=this.getService(),e=this.options,i=this.isVertical(),o=new hu({vertical:i,spacing:e.spacing,rtl:t.rtl},t),r=e.data,n=(r=e.reverse?r.slice(0).reverse():r).length,s=0;s<n;s++){var a=r[s],l=a.series||{},h=l.markers,p=l.dashType,c=l.legendItem,l=l.opacity,h=O({visible:!1!==(h=void 0===h?{}:h).visible,type:q},h),h=(delete h.size,O({},{markers:h,labels:e.labels,rtl:t.rtl,line:Object.assign({},{dashType:p},e.line),area:Object.assign({},{opacity:l},e.area),opacity:l,accessibility:e.accessibility,focusHighlight:e.focusHighlight},e.item,c,a,{markers:e.markers}));o.append(new Au(h))}o.render(),this.itemsContainer.append(o)},Tu.prototype.isVertical=function(){var t=this.options,e=t.orientation,t=t.position;return t===Pu&&e!==gt||(k(e)?e!==gt:u(t,[C,P]))},Tu.prototype.hasItems=function(){return 0<this.container.children[0].children.length},Tu.prototype.getItems=function(){return this.itemsContainer.children[0].children},Tu.prototype.reflow=function(t){var e=this.options,t=t.clone();this.hasItems()?(e.position===Pu?(this.containerCustomReflow(t),this.box=t):this.containerReflow(t),this.hasTitle()&&this.title.reflow(new I(this.container.box.x1,this.title.box.y1,this.container.box.x2,this.title.box.y2))):this.box=t},Tu.prototype.containerReflow=function(t){var e=this.options,i=this.container,o=e.position,r=e.width,n=e.height,s=o===T||o===S?y:v,a=this.isVertical(),l=t.clone(),h=t.clone(),o=(o!==C&&o!==P||(h.y1=l.y1=0),a&&n?(h.y2=h.y1+n,h.align(l,v,i.options.vAlign)):!a&&r&&(h.x2=h.x1+r,h.align(l,y,i.options.align)),i.reflow(h),(h=i.box).clone());(e.offsetX||e.offsetY)&&(h.translate(e.offsetX,e.offsetY),i.reflow(h)),o[s+1]=t[s+1],o[s+2]=t[s+2],this.box=o},Tu.prototype.containerCustomReflow=function(t){var e=this.options,i=this.container,o=e.offsetX,r=e.offsetY,n=e.width,e=e.height,s=this.isVertical(),t=t.clone();s&&e?t.y2=t.y1+e:!s&&n&&(t.x2=t.x1+n),i.reflow(t),t=i.box,i.reflow(new I(o,r,o+t.width(),r+t.height()))},Tu.prototype.renderVisual=function(){this.hasItems()&&Su.prototype.renderVisual.call(this)},Tu.prototype.createLegendTitle=function(t){var e=O({},{color:Y,position:T,align:b},t),i=e.text;t&&!1!==t.visible&&t.text&&(k(e)&&e.visible&&((t=jt(e))?i=t({text:i}):e.format&&(i=this.chartService.format.auto(e.format,i))),this.title=new So(i,e),this.createTitleLayout(),this.appendTitleLayoutContent())},Tu.prototype.createTitleLayout=function(){this.layout=new uo({vertical:!0,wrap:!1}),this.container.append(this.layout)},Tu.prototype.hasTitle=function(){return Boolean(this.options.title&&!1!==this.options.title.visible&&this.options.title.text)},Tu.prototype.appendTitleLayoutContent=function(){this.options.title.position===S?(this.layout.append(this.itemsContainer),this.layout.append(this.title)):(this.layout.append(this.title),this.layout.append(this.itemsContainer))},Tu);function Tu(t,e){void 0===e&&(e={}),Su.call(this,t),this.chartService=e,u(this.options.position,[T,P,S,C,Pu])||(this.options.position=P),this.createContainers(),this.createLegendTitle(t.title),this.createItems()}e(h,{position:P,data:[],offsetX:0,offsetY:0,margin:w(2),padding:w(5),border:{color:Y,width:0},item:{cursor:ft,spacing:6},spacing:6,background:"",zIndex:1,markers:{},line:{width:20,height:2,cursor:ft,opacity:1},area:{type:"square",align:P,width:15,height:15}});let Mu=h,Ou=((Cu=M.Class)&&(Lu.__proto__=Cu),((Lu.prototype=Object.create(Cu&&Cu.prototype)).constructor=Lu).prototype.register=function(t,e){this._registry.push({type:t,seriesTypes:e})},Lu.prototype.create=function(t,e,i){for(var o=this._registry,r=o[0],n=0;n<o.length;n++){var s=o[n],a=Aa(t,s.seriesTypes),l=Aa(t,Hs);if(0<a.length-l.length){r=s;break}}return new r.type(a,e,i)},Lu);function Lu(){Cu.call(this),this._registry=[]}Ou.current=new Ou;let Iu=Ou;function Bu(t){var e=document.createElement("div");return t&&(e.className=t),e}function Eu(t){for(var e=t;e&&!Ut(e,"k-handle");)e=e.parentNode;return e}(Ru=M.Class)&&(Du.__proto__=Ru),((Du.prototype=Object.create(Ru&&Ru.prototype)).constructor=Du).prototype.onPane=function(t){return this.categoryAxis.pane===t},Du.prototype.createElements=function(){var t=this.options,e=this.wrapper=Bu("k-selector k-pointer-events-none"),i=(Bt(e,{top:t.offset.top,left:t.offset.left,width:t.width,height:t.height,direction:"ltr"}),this.selection=Bu("k-selection k-pointer-events-none")),o=(this.leftMask=Bu("k-mask k-pointer-events-none"),this.rightMask=Bu("k-mask k-pointer-events-none"),e.appendChild(this.leftMask),e.appendChild(this.rightMask),e.appendChild(i),this.body=Bu("k-selection-bg k-pointer-events-none")),o=(i.appendChild(o),this.leftHandle=Bu("k-handle k-left-handle k-pointer-events-auto")),r=this.rightHandle=Bu("k-handle k-right-handle k-pointer-events-auto"),i=(o.appendChild(Bu()),r.appendChild(Bu()),i.appendChild(o),i.appendChild(r),this.chartElement.appendChild(e),Bt(i,["borderLeftWidth","borderRightWidth","height"])),n=Bt(o,"height").height,s=Bt(r,"height").height;t.selection={border:{left:i.borderLeftWidth,right:i.borderRightWidth}},Bt(o,{top:(i.height-n)/2}),Bt(r,{top:(i.height-s)/2}),e.style.cssText=e.style.cssText},Du.prototype.bindEvents=function(){var t;!1!==this.options.mousewheel&&(this._mousewheelHandler=this._mousewheel.bind(this),ie(this.chartElement,((t={})[ha]=this._mousewheelHandler,t))),this._domEvents=Yo.create(this.chartElement,{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)})},Du.prototype.initOptions=function(){var t=this.options,e=this.categoryAxis.pane.chartsBox(),i=this.chart.chartService.intl,i=(this._dateAxis&&O(t,{min:Sr(i,t.min),max:Sr(i,t.max),from:Sr(i,t.from),to:Sr(i,t.to)}),Bt(this.chartElement,["paddingLeft","paddingTop"])),o=i.paddingLeft,i=i.paddingTop;this.options=O({},{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)},Du.prototype.destroy=function(){var t;this._domEvents&&(this._domEvents.destroy(),delete this._domEvents),clearTimeout(this._mwTimeout),this._state=null,this.wrapper&&(this._mousewheelHandler&&(ue(this.chartElement,((t={})[ha]=this._mousewheelHandler,t)),this._mousewheelHandler=null),this.chartElement.removeChild(this.wrapper),this.wrapper=null)},Du.prototype._rangeEventArgs=function(t){return{axis:this.categoryAxis.options,from:this._value(t.from),to:this._value(t.to)}},Du.prototype._pointInPane=function(t,e){var i=this.categoryAxis.pane.box,t=this.chart._toModelCoordinates(t,e);return i.containsPoint(t)},Du.prototype._start=function(t){var e,i,o=this.options,r=ae(t);!this._state&&r&&(e=se(t),this._pointInPane(e.x,e.y))&&(r=Eu(r),i=this.body.getBoundingClientRect(),e=!r&&e.x>=i.x&&e.x<=i.x+i.width&&e.y>=i.y&&e.y<=i.y+i.height,this.chart._unsetActivePoint(),this._state={moveTarget:r,startLocation:t.x?t.x.location:0,inBody:e,range:{from:this._index(o.from),to:this._index(o.to)}},i=this._rangeEventArgs({from:this._index(o.from),to:this._index(o.to)}),this.trigger(ea,i))&&(this._state=null)},Du.prototype._press=function(t){(t=this._state?this._state.moveTarget:Eu(ae(t)))&&vt(t,"k-handle-active")},Du.prototype._move=function(t){var e,i,o,r,n,s,a,l,h,p,c,u;this._state&&(e=this._state,a=this.options,c=this.categoryAxis,i=e.range,u=e.moveTarget,o=c.options.reverse,r=this._index(a.from),n=this._index(a.to),s=this._index(a.min),a=this._index(a.max),t=e.startLocation-t.x.location,l=i.from,h=i.to,p=i.to-i.from,c=Bt(this.wrapper,"width").width/(c.categoriesCount()-1),t=Math.round(t/c)*(o?-1:1),u||e.inBody)&&(c=u&&Ut(u,"k-left-handle"),u=u&&Ut(u,"k-right-handle"),e.inBody?(i.from=Math.min(Math.max(s,r-t),a-p),i.to=Math.min(i.from+p,a)):c&&!o||u&&o?(i.from=Math.min(Math.max(s,r-t),a-1),i.to=Math.max(i.from+1,i.to)):(c&&o||u&&!o)&&(i.to=Math.min(Math.max(s+1,n-t),a),i.from=Math.min(i.to-1,i.from)),i.from===l&&i.to===h||(this.move(i.from,i.to),this.trigger(ia,this._rangeEventArgs(i))))},Du.prototype._end=function(){var t;this._state&&((t=this._state.moveTarget)&&xt(t,"k-handle-active"),t=this._state.range,this.set(t.from,t.to),this.trigger(oa,this._rangeEventArgs(t)),delete this._state)},Du.prototype._tap=function(t){var e=this.options,i=this.categoryAxis,o=this.chart._eventCoordinates(t),o=i.pointCategoryIndex(new A(o.x,i.box.y1)),r=this._index(e.from),n=this._index(e.to),s=this._index(e.min),e=this._index(e.max),n=n-r,a={},l=3===t.event.which,o=Math.round(r+n/2-o);this._state||l||(this.chart._unsetActivePoint(),i.options.justified||o--,a.from=Math.min(Math.max(s,r-o),e-n),a.to=Math.min(a.from+n,e),this._start(t),this._state&&(this._state.range=a,this.trigger(ia,this._rangeEventArgs(a)),this._end()))},Du.prototype._mousewheel=function(t){var e,i=this,o=Jt(t);this._start(t),this._state&&(e=this._state.range,t.preventDefault(),t.stopPropagation(),1<Math.abs(o)&&(o*=3),this.options.mousewheel.reverse&&(o*=-1),this.expand(o)&&this.trigger(ia,{axis:this.categoryAxis.options,delta:o,originalEvent:t,from:this._value(e.from),to:this._value(e.to)}),this._mwTimeout&&clearTimeout(this._mwTimeout),this._mwTimeout=setTimeout(function(){i._end()},150))},Du.prototype._gesturestart=function(t){var e=this.options,i=t.touches[0];this._pointInPane(i.pageX,i.pageY)&&(this._state={range:{from:this._index(e.from),to:this._index(e.to)}},i=this._rangeEventArgs(this._state.range),this.trigger(ea,i)?this._state=null:t.preventDefault())},Du.prototype._gestureend=function(){this._state&&(this.trigger(oa,this._rangeEventArgs(this._state.range)),delete this._state)},Du.prototype._gesturechange=function(t){var e,i,o,r,n,s;this._state&&(r=this.chart,o=this._state,e=this.options,i=this.categoryAxis,o=o.range,s=r._toModelCoordinates(t.touches[0].x.location).x,r=r._toModelCoordinates(t.touches[1].x.location).x,n=Math.min(s,r),s=Math.max(s,r),t.preventDefault(),o.from=i.pointCategoryIndex(new A(n))||e.min,o.to=i.pointCategoryIndex(new A(s))||e.max,this.move(o.from,o.to),this.trigger(ia,this._rangeEventArgs(o)))},Du.prototype._index=function(t){var e=t;return e=t instanceof Date?this.categoryAxis.categoryIndex(t):e},Du.prototype._value=function(t){var e=t;return e=this._dateAxis&&(e=this.categoryAxis.categoryAt(t))>this.options.max?this.options.max:e},Du.prototype._slot=function(t){var e=this.categoryAxis,t=this._index(t);return e.getSlot(t,t,!0)},Du.prototype.move=function(t,e){var i=this.options,o=this.categoryAxis.options.reverse,r=i.offset,n=i.padding,s=i.selection.border,a=o?t:e,l="x"+(o?2:1),o=this._slot(o?e:t),e=L(o[l]-r.left+n.left),t=(Bt(this.leftMask,{width:e}),Bt(this.selection,{left:e}),o=this._slot(a),L(i.width-(o[l]-r.left+n.left))),a=(Bt(this.rightMask,{width:t}),i.width-t);a!==i.width&&(a+=s.right),Bt(this.rightMask,{left:a}),Bt(this.selection,{width:Math.max(i.width-(e+t)-s.right,0)})},Du.prototype.set=function(t,e){var i=this.options,o=this._index(i.min),r=this._index(i.max),t=x(this._index(t),o,r),o=x(this._index(e),t+1,r);i.visible&&this.move(t,o),i.from=this._value(t),i.to=this._value(o)},Du.prototype.expand=function(t){var e=this.options,i=this._index(e.min),o=this._index(e.max),r=e.mousewheel.zoom,n=this._index(e.from),e=this._index(e.to),s={from:n,to:e},a=O({},s);if(this._state&&(s=this._state.range),r!==P&&(s.from=x(x(n-t,0,e-1),i,o)),r!==C&&(s.to=x(x(e+t,s.from+1,o),i,o)),s.from!==a.from||s.to!==a.to)return this.set(s.from,s.to),!0},Du.prototype.zoom=function(t,e){var i=this.options,o=this._index(i.min),r=this._index(i.max),n=this._index(i.from),i=this._index(i.to),s={from:n,to:i},a=O({},s),l=this.categoryAxis.options.reverse,l=y+(l?"2":"1"),h=this.categoryAxis.lineBox(),l=Math.abs(h[l]-e.x),e=h.width(),h=L(l/e,2),l=L(h*t),e=L((1-h)*t);if((s=this._state?this._state.range:s).from=x(x(n-l,0,i-1),o,r),s.to=x(x(i+e,s.from+1,r),o,r),s.from!==a.from||s.to!==a.to)return this.set(s.from,s.to),!0},Du.prototype.trigger=function(t,e){return(this.observer||this.chart).trigger(t,e)};var Ru,Vu,ju,zu,l=Du;function Du(t,e,i,o){Ru.call(this);var r=t.element;this.options=O({},this.options,i),this.chart=t,this.observer=o,this.chartElement=r,this.categoryAxis=e,this._dateAxis=this.categoryAxis instanceof jr,this.initOptions(),this.visible=this.options.visible&&r.offsetHeight,this.visible&&(this.createElements(),this.set(this._index(this.options.from),this._index(this.options.to)),this.bindEvents())}e(l,{visible:!0,mousewheel:{zoom:"both"},min:nt,max:rt});let Fu=l,Hu=((Vu=gl)&&(Nu.__proto__=Vu),((Nu.prototype=Object.create(Vu&&Vu.prototype)).constructor=Nu).prototype.show=function(t){var e,i;!t||!t.tooltipAnchor||this._current&&this._current===t||(e=O({},this.options,t.options.tooltip),(i=t.tooltipAnchor())?(this._current=t,Vu.prototype.show.call(this,{point:t,anchor:i},e,t)):this.hide())},Nu.prototype.hide=function(){delete this._current,Vu.prototype.hide.call(this)},Nu);function Nu(){Vu.apply(this,arguments)}let Uu=Hu,Gu=((ju=gl)&&(Wu.__proto__=ju),((Wu.prototype=Object.create(ju&&ju.prototype)).constructor=Wu).prototype.showAt=function(t,e){var i,o=Nt(t,function(t){t=t.series.tooltip;return!t||!1!==t.visible});0<o.length&&(o=o[0],i=this.plotArea.categoryAxis.getSlot(o.categoryIx),e=e?this._slotAnchor(e,i):this._defaultAnchor(o,i),this.show({anchor:e,shared:!0,points:t,category:o.category,categoryText:this.formatService.auto(this.options.categoryFormat,o.category),series:this.plotArea.series},this.options))},Wu.prototype._slotAnchor=function(t,e){return this.plotArea.categoryAxis.options.vertical||(t.x=e.center().x),{point:t,align:{horizontal:"left",vertical:"center"}}},Wu.prototype._defaultAnchor=function(t,e){var t=t.owner.pane.chartsBox(),i=this.plotArea.categoryAxis.options.vertical,t=t.center(),e=e.center();return{point:i?new A(t.x,e.y):new A(e.x,t.y),align:{horizontal:"center",vertical:"center"}}},Wu);function Wu(t,e){ju.call(this,t.chartService,e),this.plotArea=t,this.formatService=t.chartService.format}e(Gu,{categoryFormat:"{0:d}"});let Xu=Gu,Yu=((zu=M.drawing.Animation)&&(qu.__proto__=zu),((qu.prototype=Object.create(zu&&zu.prototype)).constructor=qu).prototype.setup=function(){var t,e=this.element,i=this.options;e.bbox()?(this.origin=i.origin,i=i.vertical?v:y,(t=this.fromScale=new M.geometry.Point(1,1))[i]=Zn,e.transform(M.geometry.transform().scale(t.x,t.y))):this.abort()},qu.prototype.step=function(t){var e=Xt(this.fromScale.x,1,t),t=Xt(this.fromScale.y,1,t);this.element.transform(M.geometry.transform().scale(e,t,this.origin))},qu.prototype.abort=function(){zu.prototype.abort.call(this),this.element.transform(null)},qu);function qu(){zu.apply(this,arguments)}e(Yu,{duration:Yn}),M.drawing.AnimationFactory.current.register(ns,Yu);(Zu=M.drawing.Animation)&&(Qu.__proto__=Zu),((Qu.prototype=Object.create(Zu&&Zu.prototype)).constructor=Qu).prototype.setup=function(){var t=this.center=this.element.bbox().center();this.element.transform(M.geometry.transform().scale(Zn,Zn,t))},Qu.prototype.step=function(t){this.element.transform(M.geometry.transform().scale(t,t,this.center))};var Zu,h=Qu;function Qu(){Zu.apply(this,arguments)}e(h,{easing:"easeOutElastic"}),M.drawing.AnimationFactory.current.register(as,h);(Ku=M.drawing.Animation)&&($u.__proto__=Ku),(($u.prototype=Object.create(Ku&&Ku.prototype)).constructor=$u).prototype.setup=function(){this.fadeTo=this.element.opacity(),this.element.opacity(0)},$u.prototype.step=function(t){this.element.opacity(t*this.fadeTo)};var Ku,l=$u;function $u(){Ku.apply(this,arguments)}e(l,{duration:200,easing:"linear"}),M.drawing.AnimationFactory.current.register(qn,l);(Ju=M.drawing.Animation)&&(id.__proto__=Ju),((id.prototype=Object.create(Ju&&Ju.prototype)).constructor=id).prototype.setup=function(){this.element.transform(M.geometry.transform().scale(Zn,Zn,this.options.center))},id.prototype.step=function(t){this.element.transform(M.geometry.transform().scale(t,t,this.options.center))};var Ju,td,ed,gl=id;function id(){Ju.apply(this,arguments)}e(gl,{easing:"easeOutElastic",duration:Yn}),M.drawing.AnimationFactory.current.register(ms,gl);let od=gl,rd=((td=Vh)&&(nd.__proto__=td),((nd.prototype=Object.create(td&&td.prototype)).constructor=nd).prototype.render=function(){td.prototype.render.call(this),this.renderSegments()},nd.prototype.createSegment=function(t,e,i){return new(e.style===is?rl:qa)(t,e,i)},nd.prototype.animationPoints=function(){return td.prototype.animationPoints.call(this).concat(this._segments)},nd.prototype.createMissingValue=function(t,e){if(e===$n)return Ta((e={x:t.x,y:t.y}).x)||(e.x=0),Ta(e.y)||(e.y=0),e},nd);function nd(){td.apply(this,arguments)}O(rd.prototype,Ja);function sd(t,e,i){var o=[],r=e.xMin,n=e.xMax,e=((e=(i||{}).forecast)&&(0<e.before&&(r-=e.before),0<e.after)&&(n+=e.after),(i||{}).samplingInterval),s=_(e,Bi(r,n)/10);e<=0&&(s=n-r);for(var a=r;a<=n;a+=s)o.push([a,t(a)]);return o}function ad(e){return function(t){t=t.valueFields;return{xValue:t.x,yValue:t[e]}}}function ld(t,e){for(var i=Number.MAX_VALUE,o=Number.MIN_VALUE,r=0;r<t.length;r++){var n=e(t[r]),s=n.xValue,n=n.yValue;isFinite(s)&&null!==s&&isFinite(n)&&null!==n&&(i=Math.min(s,i),o=Math.max(s,o))}return{xMin:i,xMax:o}}let hd=rd,pd={exponentialTrendline:function(t){var e,i,o,r,n,s,a=t.options,t=(s=(t={seriesValues:t.seriesValues,options:a}).options,t=(0,t.seriesValues)(),Sc(t,s.field)&&(i=(t=Ac(t,(e=s.field,function(t){t=t.valueFields;return{xValue:t.x,yValue:Math.log(t[e])}}))).slope,o={xMin:t.xMin,xMax:t.xMax},0<t.count)?(r=Math.exp(t.intercept),n=i,sd(function(t){return r*Math.exp(n*t)},o,s.trendline)):null);return t?Object.assign({},a,{type:"scatterLine",data:t}):null},linearTrendline:function(t){var e,i,o,r,n,s=t.options,t=(e=(t={seriesValues:t.seriesValues,options:s}).options,t=Ac((0,t.seriesValues)(),ad(e.field)),i=t.slope,o=t.intercept,r=t.xMin,n=t.xMax,0<t.count?sd(function(t){return i*t+o},{xMin:r,xMax:n},e.trendline):null);return t?Object.assign({},s,{type:"scatterLine",data:t}):null},logarithmicTrendline:function(t){var e,i,o,r,n,s,a,l=t.options,h=(a=(t={seriesValues:t.seriesValues,options:l}).options,t=(0,t.seriesValues)(),Sc(t,"x")&&(i=(h=Ac(t,(e=a.field,function(t){t=t.valueFields;return{xValue:Math.log(t.x),yValue:t[e]}}))).slope,o=h.intercept,h=h.count,t=ld(t,(r=a.field,function(t){t=t.valueFields;return{xValue:t.x,yValue:t[r]}})),0<h)?(n=i,s=o,sd(function(t){return n*Math.log(t)+s},t,a.trendline)):null);return h?Object.assign({},l,{type:"scatterLine",data:h}):null},movingAverageTrendline:function(t){var e,i=t.options,o=(o=t.options,t=t.seriesValues,e=(o.trendline||{}).period||2,0<(t=Pc(t({before:e,after:e}),ad(o.field),e)).length?t:null);return o?Object.assign({},i,{type:"scatterLine",data:o}):null},polynomialTrendline:function(t){var e,i,o,r=t.options,n=(e=(t={seriesValues:t.seriesValues,options:r}).seriesValues,i=((t=t.options).trendline||{}).order,n=ad(t.field),e=Tc(e(),n,i),n=e.count,i=e.valueMapper,o=e.xMin,e=e.xMax,0<n?sd(i,{xMin:o,xMax:e},t.trendline):null);return n?Object.assign({},r,{type:"scatterLine",data:n}):null},powerTrendline:function(t){var e,i,o,r,n,s,a=t.options,l=(s=(t={seriesValues:t.seriesValues,options:a}).options,t=(0,t.seriesValues)(),Sc(t,"x")&&(i=(l=Ac(t,(e=s.field,function(t){t=t.valueFields;return{xValue:Math.log(t.x),yValue:Math.log(t[e])}}))).slope,o=l.intercept,l=l.count,t=ld(t,ad(s.field)),0<l)?(r=Math.exp(o),n=i,sd(function(t){return r*Math.pow(t,n)},t,s.trendline)):null);return l?Object.assign({},a,{type:"scatterLine",data:l}):null}},cd=pd,ud=((ed=Sp)&&(dd.__proto__=ed),((dd.prototype=Object.create(ed&&ed.prototype)).constructor=dd).prototype.initFields=function(){this.namedXAxes={},this.namedYAxes={},this.xAxisRangeTracker=new Vl,this.yAxisRangeTracker=new Vl},dd.prototype.render=function(t){void 0===t&&(t=this.panes),this.series=[].concat(this.originalSeries),this.createTrendlineSeries();for(var e=this.groupSeriesByPane(),i=0;i<t.length;i++){var o=t[i],r=e[o.options.name||"default"]||[],r=(this.addToLegend(r),this.filterVisibleSeries(r));r&&(this.createScatterChart(Aa(r,Ts),o),this.createScatterLineChart(Aa(r,Ms),o),this.createBubbleChart(Aa(r,as),o))}this.createAxes(t)},dd.prototype.appendChart=function(t,e){this.xAxisRangeTracker.update(t.xAxisRanges),this.yAxisRangeTracker.update(t.yAxisRanges),ed.prototype.appendChart.call(this,t,e)},dd.prototype.removeAxis=function(t){var e=t.options.name;ed.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},dd.prototype.seriesPaneName=function(t){var e=this.options,i=t.xAxis,o=Nt([].concat(e.xAxis),function(t){return t.name===i})[0],r=t.yAxis,t=Nt([].concat(e.yAxis),function(t){return t.name===r})[0],e=(e.panes||[{}])[0].name||"default";return(o||{}).pane||(t||{}).pane||e},dd.prototype.createScatterChart=function(t,e){0<t.length&&this.appendChart(new Vh(this,{series:t,clip:e.options.clip}),e)},dd.prototype.createScatterLineChart=function(t,e){0<t.length&&this.appendChart(new hd(this,{series:t,clip:e.options.clip}),e)},dd.prototype.createBubbleChart=function(t,e){0<t.length&&this.appendChart(new Nh(this,{series:t,clip:e.options.clip}),e)},dd.prototype.createXYAxis=function(t,e,i){for(var o,r=t.name,n=e?this.namedYAxes:this.namedXAxes,s=e?this.yAxisRangeTracker:this.xAxisRangeTracker,a=O({reverse:!e&&this.chartService.rtl},t,{vertical:e}),t=ba(a.type,sa),l=s.query(),h=t?{min:.1,max:1}:{min:0,max:1},s=s.query(r)||l||h,p=[a.min,a.max],c=this.series,u=0;u<c.length;u++){var d=c[u],f=d[e?"yAxis":"xAxis"];if(f===a.name||0===i&&!f){f=Dn.current.bindPoint(d,0).valueFields;p.push(f[e?"y":"x"]);break}}0===i&&l&&(s.min=Math.min(s.min,l.min),s.max=Math.max(s.max,l.max));for(var g=0;g<p.length;g++)if(p[g]instanceof Date){o=!0;break}h=new(ba(a.type,K)||!a.type&&o?Zr:t?on:Xr)(s.min,s.max,a,this.chartService);if(h.axisIndex=i,r){if(n[r])throw new Error((e?"Y":"X")+" axis with name "+r+" is already defined");n[r]=h}return this.appendAxis(h),h},dd.prototype.createAxes=function(t){for(var e=this.options,i=[].concat(e.xAxis),o=[],r=[].concat(e.yAxis),n=[],s=0;s<i.length;s++)u(this.findPane(i[s].pane),t)&&o.push(this.createXYAxis(i[s],!1,s));for(var a=0;a<r.length;a++)u(this.findPane(r[a].pane),t)&&n.push(this.createXYAxis(r[a],!0,a));this.axisX=this.axisX||o[0],this.axisY=this.axisY||n[0]},dd.prototype._dispatchEvent=function(t,e,i){for(var o=t._eventCoordinates(e),r=new A(o.x,o.y),n=this.axes,s=n.length,a=[],l=[],h=0;h<s;h++){var p=n[h],c=p.options.vertical?l:a,p=p.getValue(r);null!==p&&c.push(p)}0<a.length&&0<l.length&&t.trigger(i,{element:ae(e),originalEvent:e,x:Oa(a),y:Oa(l)})},dd.prototype.updateAxisOptions=function(t,e){var i=t.options.vertical,o=this.groupAxes(this.panes),o=(i?o.y:o.x).indexOf(t);fd(this.options,o,i,e),fd(this.originalOptions,o,i,e)},dd.prototype.trendlineFactory=function(t,e){var i=this.seriesValues.bind(this,e.index),t=kc(cd,t.type,{options:t,seriesValues:i});return t&&(t.xAxis=e.xAxis,t.yAxis=e.yAxis),t},dd.prototype.seriesValues=function(t){for(var e=[],i=this.series[t],o=0;o<i.data.length;o++){var r=this.bindPoint(i,o);e.push({pointIx:o,valueFields:r.valueFields})}return e},dd);function dd(){ed.apply(this,arguments)}function fd(t,e,i,o){O([].concat(i?t.yAxis:t.xAxis)[e],o)}e(ud,{xAxis:{},yAxis:{}}),O(ud.prototype,Pp);let gd=ud;(yd=o)&&(Sd.__proto__=yd),((Sd.prototype=Object.create(yd&&yd.prototype)).constructor=Sd).prototype.render=function(){this._rendered||!1===this.visible||(this._rendered=!0,this.createLabel())},Sd.prototype.createLabel=function(){var t=this.options.labels,e=this.owner.chartService,i=this.getLabelText(t);t.visible&&(i||0===i)&&(t.position===b||t.position===aa?(t.color||(t.color=Me(this.options.color)),t.background||(t.background=this.options.color)):(e=e.theme.seriesDefaults.labels,t.color=t.color||e.color,t.background=t.background||e.background),this.label=new So(i,O({},t,{align:b,vAlign:"",animation:{type:qn,delay:this.animationDelay}}),this.pointData()),this.append(this.label))},Sd.prototype.getLabelText=function(t){var e=jt(t);return e?e(this.pointData()):this.owner.chartService.format.auto(t.format,this.value)},Sd.prototype.reflow=function(t){this.render(),this.box=t,this.reflowLabel()},Sd.prototype.reflowLabel=function(){var t,e,i,o,r=this.options.labels,n=this.label,s=this.sector.clone(),a=r.distance,l=s.middle();n&&(e=n.box.height(),i=n.box.width(),r.position===b?(s.radius=Math.abs((s.radius-e)/2)+e,t=s.point(l),n.reflow(new I(t.x,t.y-e/2,t.x,t.y))):r.position===aa?(s.radius=s.radius-e/2,t=s.point(l),n.reflow(new I(t.x,t.y-e/2,t.x,t.y))):((t=s.clone().expand(a).point(l)).x>=s.center.x?(o=t.x+i,n.orientation=P):(o=t.x-i,n.orientation=C),n.reflow(new I(o,t.y-e,t.x,t.y))))},Sd.prototype.createVisual=function(){var t,e=this,i=this.sector,o=this.options;yd.prototype.createVisual.call(this),this.addAccessibilityAttributesToVisual(),this.value&&(o.visual?(t=(i.startAngle+180)%360,(t=o.visual({category:this.category,dataItem:this.dataItem,value:this.value,series:this.series,percentage:this.percentage,center:new M.geometry.Point(i.center.x,i.center.y),radius:i.radius,innerRadius:i.innerRadius,startAngle:t,endAngle:t+i.angle,options:o,sender:this.getSender(),createVisual:function(){var t=new M.drawing.Group;return e.createSegmentVisual(t),t}}))&&this.visual.append(t)):this.createSegmentVisual(this.visual))},Sd.prototype.createSegmentVisual=function(t){var e=this.sector,i=this.options,o=i.border||{},o=0<o.width?{stroke:{color:o.color,width:o.width,opacity:o.opacity,dashType:o.dashType}}:{},r=i.color,n=Qi(i.pattern,{color:r,opacity:i.opacity}),o=this.createSegment(e,O({fill:n,stroke:{opacity:i.opacity},zIndex:i.zIndex},o));t.append(o),Pa(i)&&t.append(this.createGradientOverlay(o,{baseColor:r,fallbackFill:n},O({center:[e.center.x,e.center.y],innerRadius:e.innerRadius,radius:e.radius,userSpace:!0},i.overlay)))},Sd.prototype.createSegment=function(t,e){return e.singleSegment?new M.drawing.Circle(new M.geometry.Circle(new M.geometry.Point(t.center.x,t.center.y),t.radius),e):Xi.current.createRing(t,e)},Sd.prototype.createAnimation=function(){var t=this.options,e=this.sector.center;O(t,{animation:{center:[e.x,e.y],delay:this.animationDelay}}),yd.prototype.createAnimation.call(this)},Sd.prototype.createHighlight=function(t){var e=this.options.highlight||{},i=e.border||{};return this.createSegment(this.sector,O({},t,{fill:{color:e.color,opacity:e.opacity},stroke:{opacity:i.opacity,width:i.width,color:i.color}}))},Sd.prototype.highlightVisual=function(){return this.visual.children[0]},Sd.prototype.highlightVisualArgs=function(){var t=this.sector;return{options:this.options,radius:t.radius,innerRadius:t.innerRadius,center:new M.geometry.Point(t.center.x,t.center.y),startAngle:t.startAngle,endAngle:t.angle+t.startAngle,visual:this.visual}},Sd.prototype.createFocusHighlight=function(t){var e=this.options.focusHighlight.border.width,t=this.createSegment(this.sector,O({},t,{stroke:{width:2*e}})),e=new M.drawing.MultiPath;return e.paths.push(M.drawing.Path.fromRect(t.bbox())),e.paths.push(this.createSegment(this.sector,{})),t.clip(e),t},Sd.prototype.tooltipAnchor=function(){var t=this.sector.clone().expand(5),e=t.middle();return{point:t.point(e),align:(t=ce(e+180),e=L(Math.sin(t),g),t=L(Math.cos(t),g),{horizontal:Math.abs(e)>Ad?b:t<0?P:C,vertical:Math.abs(e)<kd?b:e<0?S:T})}},Sd.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Sd.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,series:this.series,percentage:this.percentage}},Sd.prototype.getIndex=function(){return this.index};var yd,vd,md,xd,_d,bd,wd,h=Sd,kd=L(ce(30),g),Ad=L(ce(60),g);function Sd(t,e,i){yd.call(this,i),this.value=t,this.sector=e}e(h,{color:a,overlay:{gradient:"roundedBevel"},border:{width:.5},labels:{visible:!1,distance:35,font:$,margin:w(.5),align:q,zIndex:1,position:la},animation:{type:ms},highlight:{visible:!0,border:{width:1}},visible:!0,accessibility:{role:t,className:i,ariaRoleDescription:js}}),O(h.prototype,Ha),O(h.prototype,Fl);let Cd=h,Pd={createLegendItem:function(t,e,i){var o,r,n,s=this.options.legend||{},a=s.labels||{},s=s.inactiveItems||{},l=s.labels||{};i&&!1!==i.visibleInLegend&&(a=!(r=!1!==i.visible)&&jt(l)||jt(a),n=i.category,a&&(n=a({text:n,series:i.series,dataItem:i.dataItem,percentage:i.percentage,value:t})),a=(r?(o={},e):(o={color:l.color,font:l.font},s.markers||{})).color,Ta(n))&&""!==n&&this.legendItems.push({active:r,pointIndex:i.index,text:n,series:i.series,markerColor:a,pattern:e.pattern,labels:o})}},Td=Pd,Md=((vd=o)&&(Od.__proto__=vd),((Od.prototype=Object.create(vd&&vd.prototype)).constructor=Od).prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},Od.prototype.traverseDataPoints=function(t){for(var e=this.options,i=this.plotArea.options.seriesColors,o=(i=void 0===i?[]:i).length,r=e.series,n=r.length,s=0;s<n;s++){var a=r[s],l=a.data,h=xa(a),p=h.total,c=h.points,h=h.count,u=360/p,d=void 0,f=(isFinite(u)||(d=360/h),void 0),f=(k(a.startAngle)?a:e).startAngle;s!==n-1&&a.labels.position===la&&(a.labels.position=b);for(var g=0;g<c.length;g++){var y,v,m,x,_=c[g];_&&(y=_.fields,v=_.value,_=_.visible,m=0!==v?d||v*u:0,x=1!==l.length&&Boolean(y.explode),Pt(a.color)||(a.color=y.color||i[g%o]),t(v,new Fi(null,0,0,f,m),{owner:this,category:k(y.category)?y.category:"",pattern:(k(y.pattern)?y:a).pattern,index:g,series:a,seriesIx:s,dataItem:l[g],percentage:0!==p?v/p:0,explode:x,visibleInLegend:y.visibleInLegend,visible:_,zIndex:n-s,animationDelay:this.animationDelay(g,s,n)}),!1!==_)&&(f+=m)}}},Od.prototype.evalSegmentOptions=function(t,e,i){var o=i.series;ka(t,{value:e,series:o,dataItem:i.dataItem,category:i.category,percentage:i.percentage},{defaults:o._defaults,excluded:["data","content","template","visual","toggle","ariaTemplate","ariaContent"]})},Od.prototype.addValue=function(t,e,i){var o=O({},i.series,{index:i.index});o.pattern=i.pattern||o.pattern,this.evalSegmentOptions(o,t,i),this.createLegendItem(t,o,i),!1!==i.visible&&(t=new Cd(t,e,o),Object.assign(t,i),this.append(t),this.points.push(t))},Od.prototype.reflow=function(t){var e=this.options,i=this.points,o=this.seriesConfigs,r=(void 0===o&&(o=[]),i.length),n=t.clone(),s=Math.min(n.width(),n.height()),a=s/2,l=s-.85*s,h=new I(n.x1,n.y1,n.x1+s,n.y1+s),s=h.center(),n=n.center(),p=e.series.length,c=[],u=[],e=_(e.padding,l);this.targetBox=t,e=a-5<e?a-5:e,h.translate(n.x-s.x,n.y-s.y);for(var d=a-e,f=new A(d+h.x1+e,d+h.y1+e),g=0;g<r;g++){var y=i[g],v=y.sector,m=y.seriesIx,x=(v.radius=d,v.center=f,o.length&&(x=o[m],v.innerRadius=x.innerRadius,v.radius=x.radius),m===p-1&&y.explode&&(v.center=v.clone().setRadius(.15*v.radius).point(v.middle())),y.reflow(h),y.label);x&&x.options.position===la&&m===p-1&&(x.orientation===P?u:c).push(x)}0<c.length&&(c.sort(this.labelComparator(!0)),this.leftLabelsReflow(c)),0<u.length&&(u.sort(this.labelComparator(!1)),this.rightLabelsReflow(u)),this.box=h},Od.prototype.leftLabelsReflow=function(t){var e=this.distanceBetweenLabels(t);this.distributeLabels(e,t)},Od.prototype.rightLabelsReflow=function(t){var e=this.distanceBetweenLabels(t);this.distributeLabels(e,t)},Od.prototype.distanceBetweenLabels=function(t){var e=he(this.points),i=e.sector,o=t.length-1,e=i.radius+e.options.labels.distance,r=[],n=t[0].box,s=L(n.y1-(i.center.y-e-n.height()-n.height()/2));r.push(s);for(var a=0;a<o;a++){var l=t[a+1].box,n=t[a].box,s=L(l.y1-n.y2);r.push(s)}return s=L(i.center.y+e-t[o].box.y2-t[o].box.height()/2),r.push(s),r},Od.prototype.distributeLabels=function(t,e){for(var i,o,r,n=t.length,s=0;s<n;s++)for(r=-t[s],i=o=s;0<r&&(0<=i||o<n);)r=this._takeDistance(t,s,--i,r),r=this._takeDistance(t,s,++o,r);this.reflowLabels(t,e)},Od.prototype._takeDistance=function(t,e,i,o){var r;return 0<t[i]&&(o-=r=Math.min(t[i],o),t[i]-=r,t[e]+=r),o},Od.prototype.reflowLabels=function(t,e){var i,o=he(this.points),r=o.sector,n=o.options.labels,s=e.length,a=n.distance,l=r.center.y-(r.radius+a)-e[0].box.height();t[0]+=2;for(var h=0;h<s;h++){var p=e[h],c=p.box;l+=t[h],i=this.hAlignLabel(c.x2,r.clone().expand(a),l,l+c.height(),p.orientation===P),p.orientation===P?(n.align!==q&&(i=r.radius+r.center.x+a),p.reflow(new I(i+c.width(),l,i,l))):(n.align!==q&&(i=r.center.x-r.radius-a),p.reflow(new I(i-c.width(),l,i,l))),l+=c.height()}},Od.prototype.createVisual=function(){var t=this.options.connectors,e=this.points,i=e.length;vd.prototype.createVisual.call(this),this._connectorLines=[];for(var o=0;o<i;o++){var r,n,s,a,l,h,p,c=e[o],u=c.sector,d=c.label,f=u.middle(),g=(c.options.connectors||{}).color||t.color;d&&(g=new M.drawing.Path({stroke:{color:g,width:t.width},animation:{type:qn,delay:c.animationDelay}}),d.options.position===la)&&(r=d.box,n=u.center,p=u.point(f),s=new A(r.x1,r.center().y),h=l=a=void 0,p=u.clone().expand(t.padding).point(f),g.moveTo(p.x,p.y),d.orientation===P?(h=Ld(n,p,s,l=new A(r.x1-t.padding,r.center().y)),s=new A(l.x-4,l.y),(h=h||s).x=Math.min(h.x,s.x),this.pointInCircle(h,u.center,u.radius+4)||h.x<u.center.x?(a=u.center.x+u.radius+4,c.options.labels.align===ps||a<s.x?g.lineTo(a,p.y):g.lineTo(p.x+8,p.y),g.lineTo(s.x,l.y)):(h.y=l.y,g.lineTo(h.x,h.y))):(h=Ld(n,p,s,l=new A(r.x2+t.padding,r.center().y)),s=new A(l.x+4,l.y),(h=h||s).x=Math.max(h.x,s.x),this.pointInCircle(h,u.center,u.radius+4)||h.x>u.center.x?(a=u.center.x-u.radius-4,c.options.labels.align===ps||a>s.x?g.lineTo(a,p.y):g.lineTo(p.x-8,p.y),g.lineTo(s.x,l.y)):(h.y=l.y,g.lineTo(h.x,h.y))),g.lineTo(l.x,l.y),this._connectorLines.push(g),this.visual.append(g))}},Od.prototype.renderVisual=function(){var t,e,i,o;vd.prototype.renderVisual.call(this),Ae(this.options.series,function(t){return t.autoFit})&&(t=this.targetBox,e=this.box.center(),o=this.visual.bbox())&&(i=o.bottomRight(),(o=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(M.geometry.transform().scale(o,o,[e.x,e.y]))},Od.prototype.labelComparator=function(t){var i=t?-1:1;return function(t,e){return((t.parent.sector.middle()+270)%360-(e.parent.sector.middle()+270)%360)*i}},Od.prototype.hAlignLabel=function(t,e,i,o,r){var n=e.radius,e=e.center,s=e.x,e=e.y,i=Math.min(Math.abs(e-i),Math.abs(e-o));return n<i?t:s+Math.sqrt(n*n-i*i)*(r?1:-1)},Od.prototype.pointInCircle=function(t,e,i){return Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)<Math.pow(i,2)},Od.prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value)},Od.prototype.animationDelay=function(t){return 70*t},Od.prototype.stackRoot=function(){return this},Od);function Od(t,e){vd.call(this,e),this.plotArea=t,this.chartService=t.chartService,this.points=[],this.legendItems=[],this.render()}function Ld(t,e,i,o){var r,n=(o.x-i.x)*(t.y-i.y)-(o.y-i.y)*(t.x-i.x),o=(o.y-i.y)*(e.x-t.x)-(o.x-i.x)*(e.y-t.y);return 0!=o&&(i=n/o,r=new A(t.x+i*(e.x-t.x),t.y+i*(e.y-t.y))),r}e(Md,{startAngle:90,connectors:{width:2,color:"#939393",padding:8},inactiveItems:{markers:{},labels:{}}}),O(Md.prototype,Td),Md.prototype.isStackRoot=!0;let Id=Md,Bd=((md=Sp)&&(Ed.__proto__=md),((Ed.prototype=Object.create(md&&md.prototype)).constructor=Ed).prototype.render=function(){this.createPieChart(this.series)},Ed.prototype.createPieChart=function(t){var e=t[0],t=new Id(this,{series:t,padding:e.padding,startAngle:e.startAngle,connectors:e.connectors,legend:this.options.legend});this.appendChart(t)},Ed.prototype.appendChart=function(t,e){md.prototype.appendChart.call(this,t,e),ee(this.options.legend.data,t.legendItems)},Ed.prototype.getPointBelow=function(t){return this.getPointToTheRight(t)},Ed.prototype.getPointAbove=function(t){return this.getPointToTheLeft(t)},Ed);function Ed(){md.apply(this,arguments)}let Rd=Bd,Vd=((xd=Cd)&&(jd.__proto__=xd),((jd.prototype=Object.create(xd&&xd.prototype)).constructor=jd).prototype.reflowLabel=function(){var t,e=this.options.labels,i=this.label,o=this.sector.clone(),r=o.middle();i&&(t=i.box.height(),e.position===b?(o.radius-=(o.radius-o.innerRadius)/2,e=o.point(r),i.reflow(new I(e.x,e.y-t/2,e.x,e.y))):xd.prototype.reflowLabel.call(this))},jd.prototype.createSegment=function(t,e){return Xi.current.createRing(t,e)},jd);function jd(){xd.apply(this,arguments)}e(Vd,{overlay:{gradient:"roundedGlass"},labels:{position:b},animation:{type:ms}}),O(Vd.prototype,Ha);let zd=Vd,Dd=((_d=Id)&&(Fd.__proto__=_d),((Fd.prototype=Object.create(_d&&_d.prototype)).constructor=Fd).prototype.addValue=function(t,e,i){var o=O({},i.series,{index:i.index});o.pattern=i.pattern||o.pattern,this.evalSegmentOptions(o,t,i),this.createLegendItem(t,o,i),!1!==i.visible&&(t=new zd(t,e,o),Object.assign(t,i),this.append(t),this.points.push(t))},Fd.prototype.reflow=function(t){for(var e,i=this.options,o=t.clone(),o=Math.min(o.width(),o.height()),r=o/2,n=i.series,s=n.length,i=_(i.padding,o-.85*o),a=r-(i=r-5<i?r-5:i),l=0,h=0;h<s;h++){var p=n[h];0===h&&k(p.holeSize)&&(e=p.holeSize,a-=p.holeSize),k(p.size)?a-=p.size:l++,k(p.margin)&&h!==s-1&&(a-=p.margin)}k(e)||(a-=e=(r-i)/(s+.75)*.75);var c=e,u=0;this.seriesConfigs=[];for(var d=0;d<s;d++){var f=n[d],g=(c+=u)+_(f.size,a/l);this.seriesConfigs.push({innerRadius:c,radius:g}),u=f.margin||0,c=g}_d.prototype.reflow.call(this,t)},Fd.prototype.animationDelay=function(t,e,i){return 50*t+Yn*(e+1)/(i+1)},Fd);function Fd(){_d.apply(this,arguments)}e(Dd,{startAngle:90,connectors:{width:2,color:"#939393",padding:8}});let Hd=Dd,Nd=((bd=Rd)&&(Ud.__proto__=bd),((Ud.prototype=Object.create(bd&&bd.prototype)).constructor=Ud).prototype.render=function(){this.createDonutChart(this.series)},Ud.prototype.createDonutChart=function(t){var e=t[0],t=new Hd(this,{series:t,padding:e.padding,connectors:e.connectors,legend:this.options.legend});this.appendChart(t)},Ud.prototype.getPointBelow=function(t){return this._getNextPoint(t,this._pointsByVertical,-1)},Ud.prototype.getPointAbove=function(t){return this._getNextPoint(t,this._pointsByVertical,1)},Ud);function Ud(){bd.apply(this,arguments)}let Gd=Nd,Wd=((wd=Sp)&&(Xd.__proto__=wd),((Xd.prototype=Object.create(wd&&wd.prototype)).constructor=Xd).prototype.initFields=function(){this.valueAxisRangeTracker=new Vl},Xd.prototype.render=function(){this.addToLegend(this.series),this.createPolarAxis(),this.createCharts(),this.createValueAxis()},Xd.prototype.alignAxes=function(){var t=this.valueAxis,e=t.range(),e=t.options.reverse?e.max:e.min,e=t.getSlot(e),i=this.polarAxis.getSlot(0).center,i=t.box.translate(i.x-e.x1,i.y-e.y1);t.reflow(i)},Xd.prototype.createValueAxis=function(){var t,e=this.valueAxisRangeTracker.query(),i=this.valueAxisOptions({roundToMajorUnit:!1,zIndex:-1}),o=i.type===sa?(t=bn,{min:.1,max:1}):(t=mn,{min:0,max:1}),e=e||o,o=new t(e.min,e.max,i,this.chartService);this.valueAxis=o,this.appendAxis(o)},Xd.prototype.reflowAxes=function(){var t=this.options.plotArea,e=this.valueAxis,i=this.polarAxis,o=this.box,r=.15*Math.min(o.width(),o.height()),t=w(t.padding||{},r),r=o.clone().unpad(t),o=r.clone(),t=(o.y2=o.y1+Math.min(o.width(),o.height()),o.align(r,v,b),o.clone().shrink(0,o.height()/2)),r=(i.reflow(o),e.reflow(t),e.lineBox().height()-e.box.height());e.reflow(e.box.unpad({top:r})),this.axisBox=o,this.alignAxes(o)},Xd.prototype.backgroundBox=function(){return this.box},Xd.prototype.detachLabels=function(){},Xd);function Xd(){wd.apply(this,arguments)}var Yd,qd,Zd,Qd,Kd,$d,l=Wd,gl=((Yd=Vh)&&(Jd.__proto__=Yd),((Jd.prototype=Object.create(Yd&&Yd.prototype)).constructor=Jd).prototype.pointSlot=function(t,e){e=t.center.y-e.y1,t=A.onCircle(t.center,t.startAngle,e);return new I(t.x,t.y,t.x,t.y)},Jd);function Jd(){Yd.apply(this,arguments)}e(gl,{clip:!1});let tf=gl,ef=((qd=hd)&&(of.__proto__=qd),(of.prototype=Object.create(qd&&qd.prototype)).constructor=of);function of(){qd.apply(this,arguments)}ef.prototype.pointSlot=tf.prototype.pointSlot,e(ef,{clip:!1});let rf=ef,nf=((Zd=Ol)&&(sf.__proto__=Zd),((sf.prototype=Object.create(Zd&&Zd.prototype)).constructor=sf).prototype.fillToAxes=function(t){var e=this._polarAxisCenter();t.lineTo(e.x,e.y)},sf.prototype._polarAxisCenter=function(){return this.parent.plotArea.polarAxis.box.center()},sf.prototype.strokeSegments=function(){var t,e,i,o=this._strokeSegments;return o||(t=this._polarAxisCenter(),e=new kn(!1),(i=this.points()).push(t),(o=this._strokeSegments=e.process(i)).pop()),o},sf);function sf(){Zd.apply(this,arguments)}let af=nf,lf=((Qd=Al)&&(hf.__proto__=Qd),((hf.prototype=Object.create(Qd&&Qd.prototype)).constructor=hf).prototype.fillToAxes=function(t){var e=this.parent.plotArea.polarAxis.box.center(),e=new M.geometry.Segment([e.x,e.y]);t.segments.unshift(e),t.segments.push(e)},hf);function hf(){Qd.apply(this,arguments)}let pf=lf,cf=((Kd=rf)&&(uf.__proto__=Kd),((uf.prototype=Object.create(Kd&&Kd.prototype)).constructor=uf).prototype.createSegment=function(t,e,i){return new((e.line||{}).style===is?af:pf)(t,e,i)},uf.prototype.createMissingValue=function(t,e){var i;return Ta(t.x)&&e!==Jn&&(i={x:t.x,y:t.y},e===$n)&&(i.y=0),i},uf.prototype.seriesMissingValues=function(t){return t.missingValues||$n},uf.prototype._hasMissingValuesGap=function(){for(var t=this.options.series,e=0;e<t.length;e++)if("gap"===this.seriesMissingValues(t[e]))return!0},uf.prototype.sortPoints=function(t){if(t.sort(df),this._hasMissingValuesGap())for(var e=0;e<t.length;e++){var i=t[e];!i||Ta(i.value.y)||"gap"!==this.seriesMissingValues(i.series)||delete t[e]}return t},uf);function uf(){Kd.apply(this,arguments)}function df(t,e){return t.value.x-e.value.x}let ff=cf,gf=(($d=l)&&(yf.__proto__=$d),((yf.prototype=Object.create($d&&$d.prototype)).constructor=yf).prototype.createPolarAxis=function(){var t=new pn(this.options.xAxis,this.chartService);this.polarAxis=t,this.axisX=t,this.appendAxis(t)},yf.prototype.render=function(){this.series=[].concat(this.originalSeries),this.createTrendlineSeries(),$d.prototype.render.call(this)},yf.prototype.valueAxisOptions=function(t){return O(t,{majorGridLines:{type:H},minorGridLines:{type:H}},this.options.yAxis)},yf.prototype.createValueAxis=function(){$d.prototype.createValueAxis.call(this),this.axisY=this.valueAxis},yf.prototype.trendlineFactory=function(t,e){t=gd.prototype.trendlineFactory.call(this,t,e);return t&&(t.type=_s),t},yf.prototype.appendChart=function(t,e){this.valueAxisRangeTracker.update(t.yAxisRanges),Sp.prototype.appendChart.call(this,t,e)},yf.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createLineChart(Aa(t,[_s]),e),this.createScatterChart(Aa(t,[bs]),e),this.createAreaChart(Aa(t,[xs]),e)},yf.prototype.createLineChart=function(t,e){0!==t.length&&(t=new rf(this,{series:t}),this.appendChart(t,e))},yf.prototype.createScatterChart=function(t,e){0!==t.length&&(t=new tf(this,{series:t}),this.appendChart(t,e))},yf.prototype.createAreaChart=function(t,e){0!==t.length&&(t=new ff(this,{series:t}),this.appendChart(t,e))},yf.prototype._dispatchEvent=function(t,e,i){var o=t._eventCoordinates(e),o=new A(o.x,o.y),r=this.axisX.getValue(o),o=this.axisY.getValue(o);null!==r&&null!==o&&t.trigger(i,{element:ae(e),x:r,y:o})},yf.prototype.createCrosshairs=function(){},yf);function yf(){$d.apply(this,arguments)}e(gf,{xAxis:{},yAxis:{}}),O(gf.prototype,Pp,{seriesValues:gd.prototype.seriesValues});var vf,mf,xf,_f,bf,wf,kf,Af,Sf,Ja=gf,$=((vf=bl)&&(Cf.__proto__=vf),((Cf.prototype=Object.create(vf&&vf.prototype)).constructor=Cf).prototype.pointSlot=function(t,e){e=t.center.y-e.y1,t=A.onCircle(t.center,t.middle(),e);return new I(t.x,t.y,t.x,t.y)},Cf.prototype.renderSegments=function(){if(vf.prototype.renderSegments.call(this),this._segments&&1<this._segments.length)for(var t=(t=>{for(var e=[],i=0;i<t.length;i++){var o=t[i];e[o.seriesIx]=e[o.seriesIx]||[],e[o.seriesIx].push(o)}return e})(this._segments),e=0;e<t.length;e++){var i,o,r,n=t[e];n&&1<n.length&&(i=n[0].linePoints[0],r=he(n),r=he(r.linePoints),o=0===i.categoryIx,r=r.categoryIx===r.categoriesCount-1,o)&&r&&he(n).linePoints.push(i)}},Cf.prototype.createSegment=function(t,e,i){var i=new(e.style===is?rl:qa)(t,e,i),o=this.seriesMissingValues(e);return t.length!==e.data.length&&o!==Jn||(i.options.closed=!0),i},Cf);function Cf(){vf.apply(this,arguments)}e($,{clip:!1,limitPoints:!1});let Pf=$,Tf=((mf=Ol)&&(Mf.__proto__=mf),((Mf.prototype=Object.create(mf&&mf.prototype)).constructor=Mf).prototype.fillToAxes=function(){},Mf);function Mf(){mf.apply(this,arguments)}let Of=Tf,Lf=((xf=Al)&&(If.__proto__=xf),((If.prototype=Object.create(xf&&xf.prototype)).constructor=If).prototype.fillToAxes=function(){},If);function If(){xf.apply(this,arguments)}let Bf=Lf,Ef=((_f=Pf)&&(Rf.__proto__=_f),((Rf.prototype=Object.create(_f&&_f.prototype)).constructor=Rf).prototype.createSegment=function(t,e,i,o){var r,n,s,a=this.options.isStacked,l=(e.line||{}).style;return a&&0<i&&o&&(n=o.linePoints.slice(0),r=o),l===is?(s=new Of(t,e,i,r,n)).options.closed=!0:(t.push(t[0]),s=new Bf(t,e,i,r,n)),s},Rf.prototype.seriesMissingValues=function(t){return t.missingValues||$n},Rf);function Rf(){_f.apply(this,arguments)}let Vf=Ef,jf=((bf=zd)&&(zf.__proto__=bf),((zf.prototype=Object.create(bf&&bf.prototype)).constructor=zf).prototype.getIndex=function(){return this.categoryIx},zf);function zf(t,e){bf.call(this,t,null,e)}e(jf,{overlay:{gradient:"none"},labels:{distance:10}});let Df=jf,Ff=((wf=o)&&(Hf.__proto__=wf),((Hf.prototype=Object.create(wf&&wf.prototype)).constructor=Hf).prototype.reflow=function(i){var t=this.options,e=this.children,o=t.gap,r=t.spacing,t=e.length,n=i.angle/(t+o+r*(t-1)),s=i.startAngle+o/2*n;this.forEach(e,function(t){var e=i.clone();e.startAngle=s,e.angle=n,t.sector&&(e.radius=t.sector.radius),t.reflow(e),t.sector=e,s+=n+n*r})},Hf);function Hf(t){wf.call(this,t),this.forEach=t.rtl?Wl:Gl}e(Ff,{gap:1,spacing:0});let Nf=Ff,Uf=((kf=o)&&(Gf.__proto__=kf),((Gf.prototype=Object.create(kf&&kf.prototype)).constructor=Gf).prototype.reflow=function(t){var e=this.options.reverse,i=this.children,o=i.length,r=e?o-1:0,n=e?-1:1;this.box=new I;for(var s=r;0<=s&&s<o;s+=n){var a=i[s].sector;a.startAngle=t.startAngle,a.angle=t.angle}},Gf);function Gf(){kf.apply(this,arguments)}let Wf=Uf,Xf=((Af=gh)&&(Yf.__proto__=Af),((Yf.prototype=Object.create(Af&&Af.prototype)).constructor=Yf).prototype.pointType=function(){return Df},Yf.prototype.clusterType=function(){return Nf},Yf.prototype.stackType=function(){return Wf},Yf.prototype.categorySlot=function(t,e){return t.getSlot(e)},Yf.prototype.pointSlot=function(t,e){var i=t.clone(),t=t.center.y;return i.radius=t-e.y1,i.innerRadius=t-e.y2,i},Yf.prototype.reflowPoint=function(t,e){t.sector=e,t.reflow()},Yf.prototype.createAnimation=function(){this.options.animation.center=this.box.toRect().center(),Af.prototype.createAnimation.call(this)},Yf);function Yf(){Af.apply(this,arguments)}Xf.prototype.reflow=Da.prototype.reflow,e(Xf,{clip:!1,limitPoints:!1,animation:{type:"pie"}});let qf=Xf,Zf=((Sf=l)&&(Qf.__proto__=Sf),((Qf.prototype=Object.create(Sf&&Sf.prototype)).constructor=Qf).prototype.createPolarAxis=function(){var t=new an(this.options.categoryAxis,this.chartService);this.polarAxis=t,this.categoryAxis=t,this.appendAxis(t),this.aggregateCategories(),this.createTrendlineSeries(),this.createCategoryAxesLabels()},Qf.prototype.valueAxisOptions=function(t){return this._hasBarCharts&&O(t,{majorGridLines:{type:H},minorGridLines:{type:H}}),this._isStacked100&&O(t,{roundToMajorUnit:!1,labels:{format:"P0"}}),O(t,this.options.valueAxis)},Qf.prototype.aggregateCategories=function(){jc.prototype.aggregateCategories.call(this,this.panes)},Qf.prototype.createCategoryAxesLabels=function(){jc.prototype.createCategoryAxesLabels.call(this,this.panes)},Qf.prototype.filterSeries=function(t){return t},Qf.prototype.trendlineFactory=function(t,e){t=jc.prototype.trendlineFactory.call(this,t,e);return t&&(t.type=As),t},Qf.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createAreaChart(Aa(t,[ws]),e),this.createLineChart(Aa(t,[As]),e),this.createBarChart(Aa(t,[ks]),e)},Qf.prototype.chartOptions=function(t){var e={series:t},i=t[0];return i&&(t=this.filterVisibleSeries(t),i=i.stack,e.isStacked=i&&1<t.length,e.isStacked100=i&&"100%"===i.type&&1<t.length,e.isStacked100)&&(this._isStacked100=!0),e},Qf.prototype.createAreaChart=function(t,e){0!==t.length&&(t=new Vf(this,this.chartOptions(t)),this.appendChart(t,e))},Qf.prototype.createLineChart=function(t,e){0!==t.length&&(t=new Pf(this,this.chartOptions(t)),this.appendChart(t,e))},Qf.prototype.createBarChart=function(t,e){var i,o,r,n;0!==t.length&&(n=t[0],i=this.chartOptions(t),o=(t=this.filterVisibleSeries(t)).some(function(t){return t.stack}),r=t.some(function(t){return t.stack&&"100%"===t.stack.type}),i.gap=n.gap,i.spacing=n.spacing,i.defaultStack=n.stack&&1<t.length,i.isStacked=o&&1<t.length,i.isStacked100=r&&1<t.length,n=new qf(this,i),this.appendChart(n,e),this._hasBarCharts=!0)},Qf.prototype.seriesCategoryAxis=function(){return this.categoryAxis},Qf.prototype._dispatchEvent=function(t,e,i){var o=t._eventCoordinates(e),o=new A(o.x,o.y),r=this.categoryAxis.getCategory(o),o=this.valueAxis.getValue(o);null!==r&&null!==o&&t.trigger(i,{element:ae(e),category:r,value:o})},Qf.prototype.createCrosshairs=function(){},Qf.prototype._pointsByVertical=function(t){return Sf.prototype._pointsByVertical.call(this,t).sort(this._getSeriesCompareFn())},Qf.prototype._getSeriesCompareFn=function(){return function(t,e){return e.value-t.value}},Qf);function Qf(){Sf.apply(this,arguments)}O(Zf.prototype,Pp,{appendChart:jc.prototype.appendChart,aggregateSeries:jc.prototype.aggregateSeries,seriesSourcePoints:jc.prototype.seriesSourcePoints,seriesValues:jc.prototype.seriesValues}),e(Zf,{categoryAxis:{categories:[]},valueAxis:{}});var Kf,$f,Jf,tg,h=Zf,gl=((Kf=o)&&(eg.__proto__=Kf),((eg.prototype=Object.create(Kf&&Kf.prototype)).constructor=eg).prototype.getLabelText=function(t){var e=jt(t);return e?e(this.pointData()):t.format?this.formatValue(t.format):this.value},eg.prototype.reflow=function(t){var e=this.points,i=this.children[0],o=Math.min(e[0].x,e[3].x),r=Math.max(e[1].x,e[2].x);this.box=new I(o,e[0].y,r,e[2].y),i&&i.reflow(new I(t.x1,e[0].y,t.x2,e[2].y))},eg.prototype.createVisual=function(){var t=this,e=this.options;Kf.prototype.createVisual.call(this),this.addAccessibilityAttributesToVisual(),(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)},eg.prototype.createPath=function(){var t=this.options,e=t.border;return M.drawing.Path.fromPoints(this.points,{fill:Qi(t.pattern,{color:t.color,opacity:t.opacity}),stroke:{color:e.color,opacity:e.opacity,width:e.width}}).close()},eg.prototype.createHighlight=function(t){return M.drawing.Path.fromPoints(this.points,t)},eg.prototype.highlightVisual=function(){return this.visual.children[0]},eg.prototype.highlightVisualArgs=function(){var t=M.drawing.Path.fromPoints(this.points).close();return{options:this.options,path:t}},eg.prototype.createFocusHighlight=function(t){var e=this.options.focusHighlight.border.width,t=M.drawing.Path.fromPoints(this.points,O({},t,{stroke:{width:2*e}})).close(),i=new M.drawing.MultiPath;return i.paths.push(M.drawing.Path.fromRect(this.box.clone().pad(e).toRect())),i.paths.push(M.drawing.Path.fromPoints(this.points)),t.clip(i),t},eg.prototype.tooltipAnchor=function(){var t=this.box;return{point:new A(t.center().x,t.y1),align:{horizontal:"center",vertical:"top"}}},eg.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},eg.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,series:this.series,percentage:this.percentage}},eg.prototype.getIndex=function(){return this.index},eg);function eg(t,e,i){Kf.call(this,e),this.value=t,this.options.index=i.index}e(gl,{color:a,border:{width:1},labels:{format:""},accessibility:{role:t,className:i,ariaRoleDescription:js}}),O(gl.prototype,Ha),O(gl.prototype,Fl);let ig=gl,og=(($f=o)&&(rg.__proto__=$f),((rg.prototype=Object.create($f&&$f.prototype)).constructor=rg).prototype.formatPointValue=function(t,e){return this.plotArea.chartService.format.auto(e,t.value)},rg.prototype.render=function(){var t=this.options,e=this.plotArea.options.seriesColors,i=(void 0===e&&(e=[]),t.series[0]),o=i.data;if(o)for(var t=xa(i),r=t.total,n=t.points,s=0;s<n.length;s++){var a,l,h=n[s];h&&(a=h.fields,Pt(i.color)||(i.color=a.color||e[s%e.length]),a=O({index:s,owner:this,series:i,seriesIx:0,dataItem:o[s],percentage:h.value/r},a,{visible:h.visible}),h=h.valueFields.value,l=this.createSegment(h,a),h=this.createLabel(h,a),l)&&h&&l.append(h)}},rg.prototype.evalSegmentOptions=function(t,e,i){var o=i.series;ka(t,{value:e,series:o,dataItem:i.dataItem,index:i.index},{defaults:o._defaults,excluded:["data","content","template","toggle","visual","ariaTemplate","ariaContent"]})},rg.prototype.createSegment=function(t,e){var i=O({},e.series);if(i.pattern=e.pattern||i.pattern,this.evalSegmentOptions(i,t,e),this.createLegendItem(t,i,e),!1!==e.visible)return t=new ig(t,i,e),Object.assign(t,e),this.append(t),this.points.push(t),t},rg.prototype.createLabel=function(t,e){var i,o=e.series,r=e.dataItem,n=O({},this.options.labels,o.labels),s=t;if(n.visible)return i=jt(n),r={dataItem:r,value:t,percentage:e.percentage,category:e.category,series:o},i?s=i(r):n.format&&(s=this.chartService.format.auto(n.format,s)),n.color||(n.color=Me(o.color),n.background)||(n.background=o.color),this.evalSegmentOptions(n,t,e),i=new So(s,O({vAlign:n.position},n),r),this.labels.push(i),i},rg.prototype.labelPadding=function(){for(var t=this.labels,e={left:0,right:0},i=0;i<t.length;i++){var o,r=t[i].options.align;r!==b&&(o=t[i].box.width(),r===C?e.left=Math.max(e.left,o):e.right=Math.max(e.right,o))}return e},rg.prototype.dynamicSlopeReflow=function(t,e,i){for(var o=this.options,r=this.points,n=r.length,s=r[0],a=s,l=0;l<r.length;l++)r[l].percentage>a.percentage&&(a=r[l]);for(var h=s.percentage/a.percentage*e,p=(e-h)/2,c=0,u=0;u<n;u++){var d=r[u].percentage,f=r[u+1],f=f?f.percentage:d,g=r[u].points=[],y=o.dynamicHeight?i*d:i/n,d=x(d?(e-h*(f/d))/2:f?0:e/2,0,e);g.push(new M.geometry.Point(t.x1+p,t.y1+c)),g.push(new M.geometry.Point(t.x1+e-p,t.y1+c)),g.push(new M.geometry.Point(t.x1+e-d,t.y1+y+c)),g.push(new M.geometry.Point(t.x1+d,t.y1+y+c)),c+=y+o.segmentSpacing,h=x(e-2*(p=d),0,e)}},rg.prototype.constantSlopeReflow=function(t,e,i){for(var o=this.options,r=this.points,n=r.length,s=o.neckRatio<=1,a=s?o.neckRatio*e:e,l=s?0:(e-e/o.neckRatio)/2,h=((s?e:e-2*l)-a)/2,p=0,c=0;c<n;c++){var u=r[c].points=[],d=r[c].percentage,f=o.dynamicHeight?h*d:h/n,d=o.dynamicHeight?i*d:i/n;u.push(new M.geometry.Point(t.x1+l,t.y1+p)),u.push(new M.geometry.Point(t.x1+e-l,t.y1+p)),u.push(new M.geometry.Point(t.x1+e-l-f,t.y1+d+p)),u.push(new M.geometry.Point(t.x1+l+f,t.y1+d+p)),l+=f,p+=d+o.segmentSpacing}},rg.prototype.reflow=function(t){var e=this.points,i=e.length;if(i){var o=this.options,r=t.clone().unpad(this.labelPadding()),n=r.height()-o.segmentSpacing*(i-1),s=r.width();o.dynamicSlope?this.dynamicSlopeReflow(r,s,n):this.constantSlopeReflow(r,s,n);for(var a=0;a<i;a++)e[a].reflow(t)}},rg);function rg(t,e){$f.call(this,e),this.plotArea=t,this.chartService=t.chartService,this.points=[],this.labels=[],this.legendItems=[],this.render()}e(og,{neckRatio:.3,width:300,dynamicSlope:!1,dynamicHeight:!0,segmentSpacing:0,labels:{visible:!1,align:b,position:b,zIndex:1}}),O(og.prototype,Td);let ng=og,sg=((Jf=ng)&&(ag.__proto__=Jf),(ag.prototype=Object.create(Jf&&Jf.prototype)).constructor=ag);function ag(t,e){e.dynamicSlope=!1,e.neckRatio=1e6,Jf.call(this,t,e)}let lg=sg,hg=((tg=Sp)&&(pg.__proto__=tg),((pg.prototype=Object.create(tg&&tg.prototype)).constructor=pg).prototype.render=function(){this.createChart(ng,Aa(this.series,[us])),this.createChart(lg,Aa(this.series,[ds]))},pg.prototype.createChart=function(t,e){var i=e[0];i&&(t=new t(this,{series:e,legend:this.options.legend,neckRatio:i.neckRatio,dynamicHeight:i.dynamicHeight,dynamicSlope:i.dynamicSlope,segmentSpacing:i.segmentSpacing,highlight:i.highlight}),this.appendChart(t))},pg.prototype.appendChart=function(t,e){tg.prototype.appendChart.call(this,t,e),ee(this.options.legend.data,t.legendItems)},pg.prototype._pointsByVertical=function(t){return this.pointsBySeriesIndex(t.series.index)},pg.prototype.getPointToTheRight=function(t){return this.getPointBelow(t)},pg.prototype.getPointToTheLeft=function(t){return this.getPointAbove(t)},pg);function pg(){tg.apply(this,arguments)}var cg,ug,dg,$=hg,l=((cg=o)&&(fg.__proto__=cg),((fg.prototype=Object.create(cg&&cg.prototype)).constructor=fg).prototype.render=function(){this._rendered||(this._rendered=!0,this.createMarker(),this.createLabel(),this.createNote())},fg.prototype.createLabel=function(){var t=this.options.labels;t.visible&&(this.label=this.createLabelElement(t),this.append(this.label))},fg.prototype.createLabelElement=function(t){var e=(e=t.color)||Me(this.color);return new So(this.getLabelText(t),O({align:b,vAlign:b,margin:{left:5,right:5},zIndex:_(t.zIndex,this.series.zIndex)},t,{color:e}),this.pointData())},fg.prototype.getLabelText=function(t){var e=jt(t);return e?e(this.pointData()):this.formatValue(t.format)},fg.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},fg.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())},fg.prototype.createVisual=function(){cg.prototype.createVisual.call(this),this.addAccessibilityAttributesToVisual()},fg.prototype.markerBox=function(){var t,e=this.options.markers,i=e.border,o=this.box.toRect(),r=_(e.type,"rect")===ht,i=_(i.width,r?1:0),r=Math.round(i/2);return e.size&&(t=o.center(),o.size.width=o.size.height=e.size,o.origin.x=Math.round(t.x-o.size.width/2),o.origin.y=Math.round(t.y-o.size.height/2)),o.size.width-=i,o.size.height-=i,o.origin.y+=r+.5,o.origin.x+=r+.5,mo(o)},fg.prototype.markerBorder=function(){var t=this.options,e=t.markers.border,t=_(e.opacity,t.opacity);return{color:e.color||this.color,width:e.width,opacity:t,dashType:e.dashType}},fg.prototype.createMarker=function(){var t=this.options,e=t.markers,e=new oo({type:_(e.type,"rect"),width:e.size,height:e.size,rotation:e.rotation,background:this.color,border:this.markerBorder(),pattern:t.pattern,borderRadius:e.borderRadius,opacity:this.series.opacity||t.opacity,zIndex:_(t.zIndex,this.series.zIndex),animation:t.animation,visual:t.visual},{dataItem:this.dataItem,value:this.value,series:this.series,category:this.category});this.marker=e,this.append(e)},fg.prototype.createHighlight=function(t){var e=this.options,i=this.options.highlight.markers||this.options.markers,i=new oo({type:_(i.type,"rect"),width:i.size,height:i.size,rotation:i.rotation,background:i.color||this.color,border:this.markerBorder(),borderRadius:i.borderRadius,opacity:this.series.opacity||e.opacity,zIndex:_(e.zIndex,this.series.zIndex)}),e=(i.reflow(this.markerBox()),i.getElement());return e.options.fill=t.fill,e.options.stroke=t.stroke,e},fg.prototype.highlightVisual=function(){return this.rectVisual},fg.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this.rectVisual}},fg.prototype.createFocusHighlight=function(){var t=this.options.markers,e=this.options.focusHighlight,t=new oo({type:_(t.type,"rect"),width:t.size,height:t.size,rotation:t.rotation,background:e.color,border:e.border,borderRadius:t.borderRadius,padding:e.border.width/2,zIndex:e.zIndex});return t.reflow(this.markerBox()),t.getElement()},fg.prototype.tooltipAnchor=function(){var t=this.box.center().x,e=this.box.y1-5;return{point:new A(t,e),align:{horizontal:b,vertical:S}}},fg.prototype.overlapsBox=function(t){return this.box.overlaps(t)},fg.prototype.unclipElements=function(){},fg.prototype.pointData=function(){return{x:this.value.x,y:this.value.y,value:this.value.value,dataItem:this.dataItem,series:this.series}},fg);function fg(t,e){cg.call(this),this.options=e,this.color=e.color||a,this.value=t}O(l.prototype,Ha),O(l.prototype,Na),O(l.prototype,Fl),l.prototype.defaults={markers:{type:"rect",borderRadius:4,border:{color:"transparent"}},padding:{top:1},labels:{visible:!1,padding:3},opacity:1,notes:{label:{}},accessibility:{role:t,className:i,ariaRoleDescription:js}};let gg=l,yg=((ug=o)&&(vg.__proto__=ug),((vg.prototype=Object.create(ug&&ug.prototype)).constructor=vg).prototype._initFields=function(){this.points=[],this.seriesOptions=[],this.valueRange={min:rt,max:nt},this._evalSeries=[]},vg.prototype.render=function(){this.setRange(),this.traverseDataPoints(this.addValue.bind(this))},vg.prototype.setRange=function(){for(var t=this.options.series,e=0;e<t.length;e++)for(var i=t[e],o=0;o<i.data.length;o++){var r=this.plotArea.bindPoint(i,o).valueFields;k(r.value)&&null!==r.value&&(this.valueRange.min=Math.min(this.valueRange.min,r.value),this.valueRange.max=Math.max(this.valueRange.max,r.value))}},vg.prototype.addValue=function(t,e){var i;t&&k(t.value)&&null!==t.value&&(i=this.createPoint(t,e))&&Object.assign(i,e),this.points.push(i)},vg.prototype.evalPointOptions=function(t,e,i){var o=i.series,r=i.seriesIx,n={defaults:o._defaults,excluded:["data","tooltip","content","template","visual","toggle","drilldownSeriesFactory","ariaTemplate","ariaContent"]},s=this._evalSeries[r],r=(k(s)||(this._evalSeries[r]=s=ka(t,{},n,!0)),t);return s&&ka(r=O({},t),{value:e,series:o,dataItem:i.dataItem,min:this.valueRange.min,max:this.valueRange.max},n),r},vg.prototype.pointType=function(){return gg},vg.prototype.pointOptions=function(t,e){var i,o=this.seriesOptions[e];return o||(i=this.pointType().prototype.defaults,this.seriesOptions[e]=o=O({},i,{markers:{opacity:t.opacity},tooltip:{format:this.options.tooltip.format},labels:{format:this.options.labels.format}},t)),Object.assign({},o)},vg.prototype.createPoint=function(t,e){var i,o,r,n=e.series,s=this.pointOptions(n,e.seriesIx),a=e.color||n.color,n=(s.pattern=e.pattern||s.pattern,s=this.evalPointOptions(s,t,e),Pt(n.color)?a=s.color:0!==this.valueRange.max&&(e=a,void 0===i&&(i=.05),o=(0,M.parseColor)(e),r=1-i,a=(t=>{var e=o.toHSL(),i=100-e.l;return e.l+=Math.min((r-t)*i,i),e.toCss()})(t.value/this.valueRange.max)),new gg(t,s));return n.color=a,this.append(n),n},vg.prototype.seriesAxes=function(t){var e=t.xAxis,t=t.yAxis,i=this.plotArea,o=e?i.namedXAxes[e]:i.axisX,i=t?i.namedYAxes[t]:i.axisY;if(!o)throw new Error("Unable to locate X axis with name "+e);if(i)return{xAxis:o,yAxis:i};throw new Error("Unable to locate Y axis with name "+t)},vg.prototype.reflow=function(t){var n=this,s=this.points,a=!this.options.clip,l=0;this.traverseDataPoints(function(t,e){var i=s[l++],e=n.seriesAxes(e.series),o=e.xAxis,e=e.yAxis,r=o.categoryIndex(t.x),t=e.categoryIndex(t.y),o=o.getSlot(r,r,a),r=e.getSlot(t,t,a);i&&(o&&r?(e=n.pointSlot(o,r),i.reflow(e)):i.visible=!1)}),this.box=t},vg.prototype.pointSlot=function(t,e){return new I(t.x1,e.y1,t.x2,e.y2)},vg.prototype.traverseDataPoints=function(t){for(var e=this.options.series,i=0;i<e.length;i++)for(var o=e[i],r=this.seriesAxes(o),n=r.xAxis,s=r.yAxis,a=n.currentRangeIndices(),l=s.currentRangeIndices(),h=0;h<o.data.length;h++){var p=this.plotArea.bindPoint(o,h),c=p.valueFields,p=p.fields,u=n.totalIndex(c.x),d=s.totalIndex(c.y),u=a.min<=u&&u<=a.max,d=l.min<=d&&d<=l.max;u&&d&&t(c,O({pointIx:h,series:o,seriesIx:i,dataItem:o.data[h],owner:this},p))}},vg.prototype.formatPointValue=function(t,e){t=t.value;return this.chartService.format.auto(e,t.x,t.y,t.value)},vg.prototype.animationPoints=function(){for(var t=this.points,e=[],i=0;i<t.length;i++)e.push((t[i]||{}).marker);return e},vg);function vg(t,e){ug.call(this,e),this.plotArea=t,this.chartService=t.chartService,this._initFields(),this.render()}e(yg,{series:[],tooltip:{format:"{0}, {1}: {2}"},labels:{format:"{2}"},clip:!0});let mg=yg,xg=((dg=Sp)&&(_g.__proto__=dg),((_g.prototype=Object.create(dg&&dg.prototype)).constructor=_g).prototype.initFields=function(){this.namedXAxes={},this.namedYAxes={}},_g.prototype.render=function(t){void 0===t&&(t=this.panes),this.bindCategories(),this.createAxes(t),this.createCharts(t),this.createAxisLabels()},_g.prototype.bindCategories=function(){for(var t=this.srcSeries||this.series,e=0;e<t.length;e++){for(var i=t[e],o=i.data||[],r=this.seriesAxes(i),n=r.xAxis,r=r.yAxis,s=Ee(n.categories||[]),a=Ee(r.categories||[]),l=0;l<o.length;l++){var h=Dn.current.bindPoint(i,l).valueFields,p=h.x,h=h.y;s.has(p)||s.add(p),a.has(h)||a.add(h)}n.categories=s.values(),r.categories=a.values()}},_g.prototype.createCharts=function(t){for(var e=this.groupSeriesByPane(),i=0;i<t.length;i++){var o=t[i],r=e[o.options.name||"default"]||[],r=(this.addToLegend(r),this.filterVisibleSeries(r));r&&this.createHeatmapChart(Aa(r,[fs]),o)}},_g.prototype.createHeatmapChart=function(t,e){t=new mg(this,{series:t});this.appendChart(t,e)},_g.prototype.seriesPaneName=function(t){var e=this.options,i=t.xAxis,o=Nt([].concat(e.xAxis),function(t){return t.name===i})[0],r=t.yAxis,t=Nt([].concat(e.yAxis),function(t){return t.name===r})[0],e=(e.panes||[{}])[0].name||"default";return(o||{}).pane||(t||{}).pane||e},_g.prototype.seriesAxes=function(t){var e=this.options,i=[].concat(e.xAxis),o=t.xAxis,i=o?i.find(function(t){return t.name===o}):i[0],e=[].concat(e.yAxis),r=t.yAxis,t=r?e.find(function(t){return t.name===r}):e[0];if(!i)throw new Error("Unable to locate X axis with name "+o);if(t)return{xAxis:i,yAxis:t};throw new Error("Unable to locate Y axis with name "+r)},_g.prototype.createAxisLabels=function(){for(var t=this.axes,e=0;e<t.length;e++)t[e].createLabels()},_g.prototype.createXYAxis=function(t,e,i){for(var o,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],l=this.series,h=0;h<l.length;h++){var p=l[h],c=p[e?"yAxis":"xAxis"];if(c===s.name||0===i&&!c){c=Dn.current.bindPoint(p,0).valueFields;a.push(c[e?"y":"x"]);break}}for(var u=0;u<a.length;u++)if(a[u]instanceof Date){o=!0;break}t=new(ba(s.type,K)||!s.type&&o?jr:Mr)(s,this.chartService);if(t.axisIndex=i,r){if(n[r])throw new Error((e?"Y":"X")+" axis with name "+r+" is already defined");n[r]=t}return this.appendAxis(t),t.indexCategories(),t},_g.prototype.createAxes=function(t){for(var e=this.options,i=[].concat(e.xAxis),o=[],r=[].concat(e.yAxis),n=[],s=0;s<i.length;s++)u(this.findPane(i[s].pane),t)&&o.push(this.createXYAxis(i[s],!1,s));for(var a=0;a<r.length;a++)u(this.findPane(r[a].pane),t)&&n.push(this.createXYAxis(r[a],!0,a));this.axisX=this.axisX||o[0],this.axisY=this.axisY||n[0]},_g.prototype.removeAxis=function(t){var e=t.options.name;dg.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},_g.prototype._dispatchEvent=function(t,e,i){for(var o=t._eventCoordinates(e),r=new A(o.x,o.y),n=this.axes,s=n.length,a=[],l=[],h=0;h<s;h++){var p=n[h];ya(p.options.vertical?l:a,p.getCategory(r))}0<a.length&&0<l.length&&t.trigger(i,{element:ae(e),originalEvent:e,x:Oa(a),y:Oa(l)})},_g.prototype.updateAxisOptions=function(t,e){var i=t.options.vertical,o=this.groupAxes(this.panes),o=(i?o.y:o.x).indexOf(t);wg(this.options,o,i,e),wg(this.originalOptions,o,i,e)},_g.prototype.crosshairOptions=function(t){return Object.assign({},t.options.crosshair,{zIndex:0})},_g.prototype._pointsByVertical=function(t,e){var i=this,e=(void 0===e&&(e=0),this.axisX.options.reverse?-1*e:e),o=this.axisX.children,r=o[Ct(this._getPointAxisXIndex(t)+e,o.length)].value,t=this.filterPoints(function(t){return bg(t.pointData().x,r)}).sort(function(t,e){return i._getPointAxisYIndex(t)-i._getPointAxisYIndex(e)});return this.axisY.options.reverse?t.reverse():t},_g.prototype._pointsByHorizontal=function(t,e){var i=this,e=(void 0===e&&(e=0),this.axisY.options.reverse?-1*e:e),o=this.axisY.children,r=o[Ct(this._getPointAxisYIndex(t)+e,o.length)].value,t=this.filterPoints(function(t){return bg(t.pointData().y,r)}).sort(function(t,e){return i._getPointAxisXIndex(t)-i._getPointAxisXIndex(e)});return this.axisX.options.reverse?t.reverse():t},_g.prototype._getPointAxisXIndex=function(t){return this._getPointAxisIndex(this.axisX,t.pointData().x)},_g.prototype._getPointAxisYIndex=function(t){return this._getPointAxisIndex(this.axisY,t.pointData().y)},_g.prototype._getPointAxisIndex=function(t,e){return t.children.findIndex(function(t){return bg(e,t.value)})},_g);function _g(){dg.apply(this,arguments)}function bg(t,e){return t instanceof Date&&e instanceof Date?br(t,e):t===e}function wg(t,e,i,o){O([].concat(i?t.yAxis:t.xAxis)[e],o)}e(xg,{xAxis:{},yAxis:{}}),O(xg.prototype,Pp);var kg,gl=xg,t="color",i="first",js="max",l="noteText",Ag=(Iu.current.register(jc,[ns,ps,ys,Bs,rs,Os,hs,vs,ls,Is,ss,Ls,Ps,Cs,Rs,gs,Ss,Es].concat(Hs)),Iu.current.register(gd,[Ts,Ms,as].concat(Hs)),Iu.current.register(Rd,[ms]),Iu.current.register(Gd,[cs]),Iu.current.register($,[us,ds]),Iu.current.register(Ja,[xs,_s,bs].concat(Hs)),Iu.current.register(h,[ws,ks,As].concat(Hs)),Iu.current.register(gl,[fs]),Dn.current.register([ns,ps,ys,Bs,rs,Os],[ut],[zs,t,l,Qn,Kn,Ds,Fs]),Dn.current.register([Ps,Cs,Ss,Es],["from","to"],[zs,t,l,Ds,Fs]),Dn.current.register([Rs,gs],[ut],[zs,t,l,"summary",Ds,Fs]),Dn.current.register([xs,_s,bs],[y,v],[t,Ds,Fs]),Dn.current.register([ws,ks,As],[ut],[zs,t,Ds,Fs]),Dn.current.register([us,ds],[ut],[zs,t,"visibleInLegend","visible",Ds,Fs]),Bp.current.register([ns,ps,ys,Bs,rs,Os,Rs,gs],{value:js,color:i,noteText:i,errorLow:"min",errorHigh:js}),Bp.current.register([Ps,Cs,Ss,Es],{from:"min",to:js,color:i,noteText:i}),Bp.current.register([ws,ks,As],{value:js,color:i}),Dn.current.register([Ts,Ms,as],[y,v],[t,l,"xErrorLow","xErrorHigh","yErrorLow","yErrorHigh"]),Dn.current.register([as],[y,v,"size"],[t,zs,l,Fs]),Dn.current.register([fs],[y,v,ut],[t,l,Fs]),Dn.current.register([hs,vs],["open","high","low","close"],[zs,t,"downColor",l,Fs]),Bp.current.register([hs,vs],{open:js,high:js,low:"min",close:js,color:i,downColor:i,noteText:i}),Dn.current.register([ss,Ls],["lower","q1","median","q3","upper","mean","outliers"],[zs,t,l,Ds,Fs]),Bp.current.register([ss,Ls],{lower:js,q1:js,median:js,q3:js,upper:js,mean:js,outliers:i,color:i,noteText:i}),Dn.current.register([ls,Is],["current","target"],[zs,t,"visibleInLegend",l,Ds,Fs]),Bp.current.register([ls,Is],{current:js,target:js,color:i,noteText:i}),Dn.current.register([ms,cs],[ut],[zs,t,"explode","visibleInLegend","visible",Ds,Fs]),[zs,ut,y,v]),Sg="mousedown",Cg="mousemove",Pg="contextmenu",Tg="mouseleave",Mg="keydown",Og="k-chart-overlay-top",$=((kg=M.Class)&&(f.__proto__=kg),((f.prototype=Object.create(kg&&kg.prototype)).constructor=f).prototype._initElement=function(t){this._setElementClass(t),t.style.position="relative",t.tabIndex=t.getAttribute("tabindex")?t.getAttribute("tabindex"):0,t.setAttribute("role","graphics-document document");for(var e=t.childNodes.length-1;0<=e;e--){var i=t.childNodes[e];Ut(i,"k-chart-overlay")?this.overlayElement=i:t.removeChild(i)}this.element=t},f.prototype._setElementClass=function(t){vt(t,"k-chart")},f.prototype._restoreOverlayElement=function(){this.overlayElement&&(this._hasSeriesData()?this.overlayElement.style.display="none":((this.options.title&&(this.options.title,this.options.title.position===S)?xt:vt)(this.overlayElement,Og),this.overlayElement.style.display=""),this.overlayElement.parentElement!==this.element)&&this.element.appendChild(this.overlayElement)},f.prototype._hasSeriesData=function(){var t=this.options.series||[];return 0<t.length&&t.some(function(t){return t.data&&0<t.data.length})},f.prototype._initTheme=function(t,e){for(var i=[],o=t.series||[],r=0;r<o.length;r++)i.push(Object.assign({},o[r]));t.series=i;for(var n=t,s=Ag,a=0;a<s.length;a++){var l=s[a]+"Axes";n[l]&&(n[s[a]+"Axis"]=n[l],delete n[l])}this.applyDefaults(t,e),null===t.seriesColors&&delete t.seriesColors,wt(t.title)&&(t.title={text:t.title}),this.options=O({},e,t),this.applySeriesColors()},f.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)}},f.prototype.resize=function(t){var e=this.getSize(),i=this._size,o=0<e.width||0<e.height;t||o&&(!i||e.width!==i.width||e.height!==i.height)?(this._size=e,this._resize(e,t),this.trigger("resize",e)):o&&this._selections&&Ae(this._selections,function(t){return!t.visible})&&(this._destroySelections(),this._setupSelection())},f.prototype._resize=function(){this._noTransitionsRedraw()},f.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()},f.prototype.getAxis=function(t){return Pn(t,this._plotArea.axes)},f.prototype.findAxisByName=function(t){return this.getAxis(t)},f.prototype.findPaneByName=function(t){for(var e=this._plotArea.panes,i=0;i<e.length;i++)if(e[i].options.name===t)return new On(e[i])},f.prototype.findPaneByIndex=function(t){var e=this._plotArea.panes;if(e[t])return new On(e[t])},f.prototype.plotArea=function(){return new Ln(this._plotArea)},f.prototype.toggleHighlight=function(t,e){var i,o,r=this._plotArea,n=(r.srcSeries||r.series||[])[0],e=Pt(e)?r.filterPoints(e):(Ot(e)?(i=e.series,o=e.category):i=o=e,n.type===cs?Lg(r.pointsBySeriesName(i),o):u(n.type,[ms,us,ds])?Lg((r.charts[0]||{}).points,o):r.pointsBySeriesName(i));e&&this.togglePointsHighlight(t,e)},f.prototype.togglePointsHighlight=function(t,e){for(var i=this._highlight,o=0;o<e.length;o++)i.togglePointHighlight(e[o],t)},f.prototype.showTooltip=function(t){var e,i,o=this._sharedTooltip(),r=this._tooltip,n=this._plotArea;Pt(t)?(e=n.findPoint(t))&&o&&(i=e.categoryIx):o&&k(t)&&(i=n.categoryAxis.categoryIndex(t)),o?0<=i&&(n=this._plotArea.pointsByCategoryIndex(i),r.showAt(n)):e&&r.show(e)},f.prototype.hideTooltip=function(){this._tooltip.hide()},f.prototype._initSurface=function(){var t=this.surface,e=this._surfaceWrap(),i=this.options.chartArea||{};i.width&&ne(e,{width:i.width}),i.height&&ne(e,{height:i.height}),t&&t.options.type===this.options.renderAs?(this.surface.clear(),this.surface.resize()):(this._destroySurface(),this.surface=M.drawing.Surface.create(e,{type:this.options.renderAs}),this.surface.bind("mouseenter",this._surfaceMouseenterHandler),this.surface.bind("mouseleave",this._surfaceMouseleaveHandler)),this.element._kendoExportVisual=this._kendoExportVisual.bind(this)},f.prototype._surfaceWrap=function(){return this.element},f.prototype._redraw=function(){var t=this._getModel();this._size={width:t.options.width,height:t.options.height},this._destroyView(),this._setElementAccessibilityAttributes(),this._model=t,this._plotArea=t._plotArea,this._legend=t._legend,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 Hc,this._setupSelection(),this._createPannable(),this._createZoomSelection(),this._createMousewheelZoom(),this._setComputedStyles(),this.trigger("render"),jg(this._plotArea.panes),this._navState||this._cancelDomEvents(),this._redrawFocusHighlight()},f.prototype._setComputedStyles=function(){var t=this.titleHeight();this.element.style.setProperty("--kendo-chart-computed-title-height",t+"px")},f.prototype._redrawFocusHighlight=function(){var t;this._destroyed||(t=this._focusState).legendInFocus&&t.preserveHighlight&&(this._focusElement(this._getFocusedLegendItem(),!1),this._focusState.preserveHighlight=!1)},f.prototype._setElementAccessibilityAttributes=function(){var t=this.options.title,t=wt(t)?t:t.description||t.text;t&&this.element.setAttribute("aria-roledescription",t)},f.prototype._kendoExportVisual=function(t){var e;return t&&t.width&&t.height?(e={width:(e=this._originalOptions.chartArea||{}).width||t.width,height:e.height||t.height},this.exportVisual(e)):this.exportVisual()},f.prototype.exportVisual=function(t){var e,i;return t&&(t.width||t.height||t.options)?(i=this.options,t=O({},t.options,{chartArea:{width:t.width,height:t.height}}),Vg(this._originalOptions,t),this.options=O({},this._originalOptions,t),this._initTheme(this.options,this._theme),this.bindCategories(),(t=this._getModel()).renderVisual(),jg(t._plotArea.panes),e=t.visual,this.options=i):e=this.surface.exportVisual(),e},f.prototype._sharedTooltip=function(){return this._plotArea instanceof jc&&this.options.tooltip&&this.options.tooltip.shared},f.prototype._createPannable=function(){var t=this.options;!1!==t.pannable&&(this._pannable=new tu(this._plotArea,t.pannable))},f.prototype._createZoomSelection=function(){var t=this.options.zoomable,e=(t||{}).selection;!1!==t&&!1!==e&&(this._zoomSelection=new ou(this,e))},f.prototype._createMousewheelZoom=function(){var t=this.options.zoomable,e=(t||{}).mousewheel;!1!==t&&!1!==e&&(this._mousewheelZoom=new su(this,e))},f.prototype._toggleDragZoomEvents=function(){var t=this.options.pannable,e=this.options.zoomable,i=(e||{}).selection,o=(e||{}).mousewheel,t=!(t||!1!==e&&!1!==i||this.requiresHandlers([Ks,Zs,Qs])),i=(!1===e||!1===o)&&!this.requiresHandlers([$s,Js,ta]),e=this.element;this._dragZoomEnabled&&t&&i?(e.style.touchAction=this._touchAction||"",this._dragZoomEnabled=!1):this._dragZoomEnabled||t&&i||(e.style.touchAction="none",this._dragZoomEnabled=!0),this._toggleDomEvents(!t,!i)},f.prototype._toggleDomEvents=function(t,e){var i=this.domEvents;i&&(i.toggleDrag&&i.toggleDrag(t),i.toggleZoom)&&i.toggleZoom(e)},f.prototype._createTooltip=function(){var t=this.options.tooltip;return this._sharedTooltip()?this._createSharedTooltip(t):new Uu(this.chartService,t)},f.prototype._createSharedTooltip=function(t){return new Xu(this._plotArea,t)},f.prototype.applyDefaults=function(t,e){var i,o,r,n=t,s=(e||{}).axisDefaults||{};function a(t){var e=(t||{}).color||o.color,e=O({},s,s[i],o,o[i],{line:{color:e},labels:{color:e},title:{color:e}},t);return delete e[i],e}for(var l=0;l<Ag.length;l++)o=n.axisDefaults||{},r=(r=[].concat(n[i=Ag[l]+"Axis"])).map(a),n[i]=1<r.length?r:r[0];var h=t,t=e,p=h.series,c=p.length,u=h.seriesDefaults,d=O({},h.seriesDefaults),f=t?O({},t.seriesDefaults):{},g=O({},f);Ig(d),Ig(g);for(var y=0;y<c;y++){var v=p[y].type||h.seriesDefaults.type,v=O({data:[]},g,f[v],{tooltip:h.tooltip},d,u[v]);p[y]._defaults=v,p[y]=O({},v,p[y]),p[y].data=p[y].data||[]}},f.prototype.applySeriesColors=function(){for(var t=this.options,e=t.series,i=t.seriesColors||[],o=0;o<e.length;o++){var r=e[o],n=i[o%i.length],s=r._defaults;r.color=r.color||n,s&&(s.color=s.color||n)}},f.prototype._getModel=function(){var t=this.options,e=this._createPlotArea(),i=new ho(this._modelOptions()),o=(i.chart=this,i._plotArea=e,Mo.buildTitle(t.title)),r=Mo.buildTitle(t.subtitle,{align:t.title.align,position:t.title.position});return i.append.apply(i,Mo.orderTitles([o,r])),t.legend&&t.legend.visible&&(t=new Mu(e.options.legend,this.chartService),i.append(t),i._legend=t),i.append(e),i.reflow(),this._setTitleBox(o,r),i},f.prototype._setTitleBox=function(t,e){var i,o,r;(t||e)&&(this._titleBox=(t||e).box.clone(),i=t?t.options.position:"",r=(o=e?e.options.position:"")!==S,i===o&&e?this._titleBox.wrap(e.box):t&&e&&r&&(this._titleBox=e.box.clone()))},f.prototype._modelOptions=function(){var t=this.options,e=this.getSize();return O({transitions:t.transitions,width:e.width||600,height:e.height||400},t.chartArea)},f.prototype._createPlotArea=function(t){var e=this.options;return Iu.current.create(t?[]:e.series,e,this.chartService)},f.prototype._setupSelection=function(){for(var t=this._plotArea.axes,e=this._selections=[],i=0;i<t.length;i++){var o,r=t[i],n=r.options;r instanceof Mr&&n.select&&!n.vertical&&(o=r.range(),r=new Fu(this,r,O({min:o.min,max:o.max},n.select)),e.push(r))}},f.prototype._selectStart=function(t){return this.trigger(ea,t)},f.prototype._select=function(t){return this.trigger(ia,t)},f.prototype._selectEnd=function(t){return this.trigger(oa,t)},f.prototype._initHandlers=function(){this._clickHandler=this._click.bind(this),this._keydownHandler=this._keydown.bind(this),this._focusHandler=this._focus.bind(this),this._blurHandler=this._blur.bind(this),this._mousedownHandler=this._mousedown.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._mousemoveThrottled=(0,M.throttle)(this._mousemove.bind(this),20)},f.prototype.addObserver=function(t){t&&this.observers.push(t)},f.prototype.removeObserver=function(t){t=this.observers.indexOf(t);0<=t&&this.observers.splice(t,1)},f.prototype.requiresHandlers=function(t){for(var e=this.observers,i=0;i<e.length;i++)if(e[i].requiresHandlers(t))return!0},f.prototype.trigger=function(t,e){(e=void 0===e?{}:e).sender=this,t===ra?e.anchor.point=this._toDocumentCoordinates(e.anchor.point):t===Ws?this._updateDrilldownPoint(e.point):t===Xs?this._resetDrilldownPoint():t===Us?(this._focusPoint(e.point),this._startDrilldown(e.point)):t===Ns&&this._focusLegendItem(e);for(var i=this.observers,o=!1,r=0;r<i.length;r++)i[r].trigger(t,e)&&(o=!0);return o},f.prototype.titleHeight=function(){return this._titleBox?this._titleBox.height():0},f.prototype._attachEvents=function(){var t,e=this.element;this._touchAction=e.style.touchAction,ie(e,((t={})[Pg]=this._clickHandler,t[ha]=this._mousewheelHandler,t[Tg]=this._mouseleaveHandler,t[Mg]=this._keydownHandler,t[Sg]=this._mousedownHandler,t.focus=this._focusHandler,t.blur=this._blurHandler,t)),this._shouldAttachMouseMove()&&ie(e,((t={})[Cg]=this._mousemoveThrottled,t)),this.domEvents=Yo.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()},f.prototype._mouseleave=function(t){this._hoveredPoint&&(this._hoveredPoint.out(this,t),this._hoveredPoint=null),this._plotAreaHovered&&(this._plotAreaHovered=!1,this.trigger(qs)),this._hasInactiveOpacity()&&this._activeChartInstance&&(this._applySeriesOpacity(this._activeChartInstance.children,null,!0),this._updateSeriesOpacity(null,!0))},f.prototype._cancelDomEvents=function(){this.domEvents&&this.domEvents.cancel&&this.domEvents.cancel()},f.prototype._gesturestart=function(t){this._mousewheelZoom&&!this._stopChartHandlers(t)&&(this._gestureDistance=t.distance,this._unsetActivePoint(),this._clearFocusedElement(),this.surface.suspendTracking())},f.prototype._gestureend=function(t){this._zooming&&!this._stopChartHandlers(t)&&(this.surface&&this.surface.resumeTracking(),this._zooming=!1,this.trigger(ta,{}))},f.prototype._gesturechange=function(t){var e,i,o=this._mousewheelZoom;o&&!this._stopChartHandlers(t)&&(t.preventDefault(),e=this._gestureDistance,e=-t.distance/e+1,.1<=Math.abs(e))&&(e=Math.round(10*e),this._gestureDistance=t.distance,i={delta:e,axisRanges:Bg(this._plotArea.axes),originalEvent:t},!this._zooming&&this.trigger($s,i)||(t=this._eventCoordinates(t),this._zooming||(this._zooming=!0),(i.axisRanges=o.updateRanges(e,t))&&!this.trigger(Js,i)&&o.zoom()))},f.prototype._mouseout=function(t){var e;t.element&&(e=this._drawingChartElement(t.element,t))&&e.leave&&e.leave(this,t.originalEvent)},f.prototype._start=function(t){var e=this._eventCoordinates(t);!this._stopChartHandlers(t)&&this._plotArea.backgroundContainsPoint(e)&&(this.requiresHandlers([Ks,Zs,Qs])&&this._startNavigation(t,e,Ks),this._pannable&&this._pannable.start(t)&&(this.surface.suspendTracking(),this._unsetActivePoint(),this._clearFocusedElement(),this._suppressHover=!0,this.chartService.panning=!0),this._zoomSelection)&&this._zoomSelection.start(t)&&this.trigger($s,{axisRanges:Bg(this._plotArea.axes),originalEvent:t})},f.prototype._move=function(t){var e=this._navState,i=this._pannable;if(!this._stopChartHandlers(t)){if(i){var o=i.move(t);o&&!this.trigger(Zs,{axisRanges:o,originalEvent:t})&&i.pan()}else if(e){for(var r={},n=e.axes,s=0;s<n.length;s++){var a,l=n[s];l.options.name&&0!=(a=(a=l.options.vertical?t.y:t.x).startLocation-a.location)&&(r[l.options.name]=l.translateRange(a))}e.axisRanges=r,this.trigger(Zs,{axisRanges:r,originalEvent:t})}this._zoomSelection&&this._zoomSelection.move(t)}},f.prototype._end=function(t){var e;this._stopChartHandlers(t)||((e=this._pannable)&&e.end(t)?(this.surface.resumeTracking(),this.trigger(Qs,{axisRanges:Bg(this._plotArea.axes),originalEvent:t}),this._suppressHover=!1,this.chartService.panning=!1):this._endNavigation(t,Qs),this._zoomSelection&&(e=this._zoomSelection.end(t))&&!this.trigger(Js,{axisRanges:e,originalEvent:t})&&(this._zoomSelection.zoom(),this.trigger(ta,{axisRanges:e,originalEvent:t})))},f.prototype._stopChartHandlers=function(t){var e=this._selections||[];if(!e.length)return!1;var t=this._eventCoordinates(t),i=this._plotArea.paneByPoint(t);if(i)for(var o=0;o<e.length;o++)if(e[o].onPane(i))return!0},f.prototype._mousewheelZoomRate=function(){var t=(this.options.zoomable||{}).mousewheel||{};return _(t.rate,.3)},f.prototype._mousewheel=function(t){var e=this,i=Jt(t),o=this._mousewheelZoom,r=this._eventCoordinates(t);if(!this._stopChartHandlers(t)&&this._plotArea.backgroundContainsPoint(r))if(o){var n={delta:i,axisRanges:Bg(this._plotArea.axes),originalEvent:t};!this._zooming&&this.trigger($s,n)||(t.preventDefault(),this._zooming||(this._unsetActivePoint(),this._clearFocusedElement(),this.surface.suspendTracking(),this._zooming=!0),this._mwTimeout&&clearTimeout(this._mwTimeout),n.axisRanges=o.updateRanges(i,r),n.axisRanges&&!this.trigger(Js,n)&&o.zoom(),this._mwTimeout=setTimeout(function(){e.trigger(ta,n),e._zooming=!1,e.surface&&e.surface.resumeTracking()},150))}else{o=this._navState;if(o=o||this._startNavigation(t,r,$s)?o:this._navState){var s=o.totalDelta||i;o.totalDelta=s+i;for(var a=this._navState.axes,l={},h=0;h<a.length;h++){var p=a[h],c=p.options.name;c&&(l[c]=p.scaleRange(-s*this._mousewheelZoomRate(),r))}this.trigger(Js,{delta:i,axisRanges:l,originalEvent:t}),this._mwTimeout&&clearTimeout(this._mwTimeout),this._mwTimeout=setTimeout(function(){e._endNavigation(t,ta)},150)}}},f.prototype._startNavigation=function(t,e,i){var o,r=this._model._plotArea,e=r.findPointPane(e),r=r.axes.slice(0);e&&(o=Bg(r),this.trigger(i,{axisRanges:o,originalEvent:t})?this._cancelDomEvents():(this._suppressHover=!0,this._unsetActivePoint(),this._clearFocusedElement(),this._navState={axisRanges:o,pane:e,axes:r}))},f.prototype._endNavigation=function(t,e){this._navState&&(this.trigger(e,{axisRanges:this._navState.axisRanges,originalEvent:t}),this._suppressHover=!1,this._navState=null)},f.prototype._getChartElement=function(t,e){var i=this.surface.eventTarget(t);if(i)return this._drawingChartElement(i,t,e)},f.prototype._drawingChartElement=function(t,e,i){for(var o,r=t;r&&!o;)o=r.chartElement,r=r.parent;if(o)return o.aliasFor&&(o=o.aliasFor(e,this._eventCoordinates(e))),o=i&&(o=o.closest(i))&&o.aliasFor?o.aliasFor():o},f.prototype._eventCoordinates=function(t){t=se(t);return this._toModelCoordinates(t.x,t.y)},f.prototype._elementPadding=function(){var t,e;return this._padding||(e=(t=Bt(this.element,["paddingLeft","paddingTop"])).paddingLeft,this._padding={top:t.paddingTop,left:e}),this._padding},f.prototype._toDocumentCoordinates=function(t){var e=this._elementPadding(),i=re(this.element);return{left:L(t.x+e.left+i.left),top:L(t.y+e.top+i.top)}},f.prototype._toModelCoordinates=function(t,e){var i=this.element,o=re(i),r=this._elementPadding(),i=Te(i).invert(),t=new M.geometry.Point(t-o.left-r.left,e-o.top-r.top).transform(i);return new A(t.x,t.y)},f.prototype._tap=function(t){var e=this,i=this.surface.eventTarget(t),o=this._drawingChartElement(i,t),r=this._sharedTooltip();this._startHover(i,t)||r||this._unsetActivePoint(),r&&this._trackSharedTooltip(this._eventCoordinates(t),t,!0),this._propagateClick(o,t),this.handlingTap=!0,setTimeout(function(){e.handlingTap=!1},0)},f.prototype._click=function(t){var e=this._getChartElement(t);this._propagateClick(e,t)},f.prototype._propagateClick=function(t,e){for(var i=t;i;)i.click&&i.click(this,e),i=i.parent},f.prototype._isLegendBeforeChart=function(){var t=this.options.legend.position,e=this._legend;return e&&e.hasItems()&&(t===T||t===C)},f.prototype._focus=function(){this._preventInitialPointFocus||(this._isLegendBeforeChart()?this._focusFirstLegendItem():this._focusFirstPoint()),this._preventInitialPointFocus=!1},f.prototype._keydown=function(t){var e,i=this._focusState,o=i.legendInFocus,i=i.focusedElement,r=this._legend;"Tab"===t.key?(this._clearFocusedElement(),e=this._isLegendBeforeChart(),o&&e!==t.shiftKey?this._navigatePoints(t):!o&&e===t.shiftKey&&r.hasItems()&&this._navigateLegend(t)):"Escape"===t.key?(i&&t.stopPropagation(),this._tooltip&&this._tooltip.visible?this._hideTooltip():this._blur()):"Enter"===t.key?i&&(this._focusState.preserveHighlight=!0,this._propagateClick(i,t),this._focusElement(i)):o?this._navigateLegend(t):this._navigatePoints(t)},f.prototype._navigatePoints=function(e){var i=this,o=this._focusState,t=this._plotArea;if(o.legendInFocus=!1,o.focusedElement){var r=function(t){o.focusedPoint=t,i._focusElement(o.focusedPoint),i._displayTooltip(t),e.preventDefault()};switch(e.key){case W:r(t.getPointToTheRight(o.focusedPoint));break;case G:r(t.getPointToTheLeft(o.focusedPoint));break;case U:r(t.getPointBelow(o.focusedPoint));break;case N:r(t.getPointAbove(o.focusedPoint))}}else this._focusFirstPoint(),e.preventDefault()},f.prototype._navigateLegend=function(e){var i=this,o=this._focusState,t=this._legend,r=this.chartService.rtl;if(o.legendInFocus=!0,o.focusedElement){var n=t.getItems().length,s=function(t){o.focusedLegendItemIndex=t(o.focusedLegendItemIndex,n),i._focusElement(i._getFocusedLegendItem()),e.preventDefault()};switch(e.key){case N:case G:s(r?At:St);break;case U:case W:s(r?St:At)}}else this._focusFirstLegendItem(),e.preventDefault()},f.prototype._focusFirstPoint=function(){var t=this._focusState.focusedPoint=this._plotArea.getFirstPoint();t&&(this._focusElement(t),this._displayTooltip(t))},f.prototype._hasFocus=function(){return this.element.ownerDocument.activeElement===this.element},f.prototype._mousedown=function(){this._hasFocus()||(this._preventInitialPointFocus=!0)},f.prototype._focusChart=function(){this._hasFocus()||(this._preventInitialPointFocus=!0,this.element.focus())},f.prototype._focusPoint=function(t){this._focusState.focusedPoint=t,this._focusChart(),this._focusElement(t,!0)},f.prototype._focusFirstLegendItem=function(){var t=this._focusState;t.focusedLegendItemIndex=0,this._focusElement(this._getFocusedLegendItem()),t.legendInFocus=!0,this._hideTooltip()},f.prototype._focusLegendItem=function(e){var t=this._focusState;t.focusedLegendItemIndex=this._legend.getItems().findIndex(function(t){return t.options.series.index===e.seriesIndex&&t.options.pointIndex===e.pointIndex}),t.legendInFocus=!0,this._focusChart(),this._focusElement(this._getFocusedLegendItem(),!0)},f.prototype._getFocusedLegendItem=function(){var t=this._focusState;return this._legend.getItems()[t.focusedLegendItemIndex]},f.prototype._focusElement=function(t,e){var i=this._focusState;this._clearFocusedElement(),t&&(i.focusedElement=t,this._setElementActiveDescendant(t),!e)&&(t.focusVisual(),i.legendInFocus?(e=t.options,this._showSeriesInactiveOpacity(e.series.index,e.pointIndex)):this._showInactiveOpacity(t))},f.prototype._clearFocusedElement=function(){var t=this._focusState;t&&(t.focusedElement&&t.focusedElement.clearFocusFromVisual&&(t.focusedElement.clearFocusFromVisual(),this._clearElementActiveDescendant()),t.focusedElement=null)},f.prototype._setElementActiveDescendant=function(t){"canvas"===this.options.renderAs&&(this._pseudoFocusedElement=this._createPseudoFocusedElement(t),this.element.append(this._pseudoFocusedElement)),this.element.setAttribute(X,t._id)},f.prototype._clearElementActiveDescendant=function(){this._pseudoFocusedElement&&(this._pseudoFocusedElement.remove(),this._pseudoFocusedElement=null),this.element.removeAttribute(X)},f.prototype._createPseudoFocusedElement=function(t){var e=document.createElement("div"),i=t.options.accessibility,t=(e.id=t._id,e.setAttribute("aria-label",t.getAriaLabelText()),e.setAttribute("role",i.role),e.setAttribute("aria-roledescription",i.ariaRoleDescription),i.ariaChecked);return k(t)&&e.setAttribute("aria-checked",t),e},f.prototype._blur=function(){this._focusState.legendInFocus=!1,this._clearFocusedElement(),this._hideInactiveOpacity()},f.prototype._startHover=function(t,e){var i;return!this._suppressHover&&(t=this._drawingChartElement(t,e,function(t){return(t.hover||t.over)&&!(t instanceof Sp)}),i=this._activePoint,this._updateHoveredPoint(t,e),t&&i!==t&&t.hover&&(this._activePoint=t,this._sharedTooltip()||t.hover(this,e)||(this._displayTooltip(t),this._showInactiveOpacity(t))),t)},f.prototype._displayTooltip=function(t){O({},this.options.tooltip,t.options.tooltip).visible&&(this._sharedTooltip()&&t.box?this._trackSharedTooltip(t.box.center(),{}):this._tooltip.show(t))},f.prototype._hideTooltip=function(){this._tooltip&&this._tooltip.hide()},f.prototype._displayInactiveOpacity=function(t,e,i){var o=this._activeChartInstance=this._chartInstanceFromPoint(t);o&&(e?(this._updateSeriesOpacity(t),this._applySeriesOpacity(o.children,null,!0),this._applySeriesOpacity(o.children,t.series),this._highlight.show(i||t)):o.supportsPointInactiveOpacity()?(e=this._getInactivePoints(t,o))&&e.length&&this._highlight.show(e,1-this._getInactiveOpacityForSeries(t.series)):this._highlight.show(t))},f.prototype._getInactivePoints=function(e,t){return this._getAllPointsOfType(t,e.constructor).filter(function(t){return t!==e})},f.prototype._getAllPointsOfType=function(t,e){for(var i=[],o=0;o<t.children.length;o++){var r=t.children[o];r.constructor===e?i.push(r):r.children&&r.children.length&&(i=i.concat(this._getAllPointsOfType(r,e)))}return i},f.prototype._updateHoveredPoint=function(t,e){var i=this._hoveredPoint;i&&i!==t&&(i.out(this,e),this._hoveredPoint=null),t&&i!==t&&t.over&&(this._hoveredPoint=t).over(this,e)},f.prototype._updateDrilldownPoint=function(t){t&&t.series&&Dn.current.bindPoint(t.series,null,t.dataItem).fields.drilldown&&(this._drilldownState={cursor:this.element.style.cursor},this.element.style.cursor="pointer")},f.prototype._resetDrilldownPoint=function(){this._drilldownState&&(this.element.style.cursor=this._drilldownState.cursor,this._drilldownState=null)},f.prototype._startDrilldown=function(t){var e,i;t&&t.series&&(e=t.series,i=Dn.current.bindPoint(e,null,t.dataItem).fields.drilldown)&&this.trigger("drilldown",{series:e,point:t,value:i,sender:this})},f.prototype._updateSeriesOpacity=function(t,e){for(var i=this._plotArea,o=i.series.length,r=0;r<o;r++){var n=i.series[r],s=this._getDefaultOpacityForSeries(n),a=this._getInactiveOpacityForSeries(n);e||n===t.series?(n.opacity=s,n.line&&(n.line.opacity=s)):(n.defaultOpacity=s,n.opacity=a,n.line&&(n.line.opacity=a))}},f.prototype._applySeriesOpacity=function(t,e,i,o){for(var r=0;r<t.length;r++){var n,s=t[r],a=s.series||o;a&&(a.highlight||{}).visible&&s.visual&&(n=(o||s.series).opacity,a===e&&!i||s.visual.opacity(i?1:n)),s.children&&s.children.length&&this._applySeriesOpacity(s.children,e,i,s.series)}},f.prototype._chartInstanceFromPoint=function(t){for(var e=t.parent;e&&!e.plotArea;)e=e.parent;return e},f.prototype._showInactiveOpacity=function(t){var e=1<this._plotArea.series.length;this._hasInactiveOpacity()?this._displayInactiveOpacity(t,e):this._highlight.show(t)},f.prototype._hideInactiveOpacity=function(t){var e=1<this._plotArea.series.length;this._hasInactiveOpacity()&&(e&&this._activeChartInstance&&(this._updateSeriesOpacity(t,!0),this._applySeriesOpacity(this._activeChartInstance.children,null,!0),this._activeChartInstance=null),this._highlight&&this._highlight.hide(),this._activePoint=null)},f.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},f.prototype._getInactiveOpacityForSeries=function(t){var e=this.options.seriesDefaults.highlight.inactiveOpacity;return t.highlight.inactiveOpacity||e||t.opacity||1},f.prototype._getDefaultOpacityForSeries=function(t){return t.defaultOpacity||t.opacity||1},f.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),ie(document,((t={})[Cg]=this._mouseMoveTrackHandler,t)))},f.prototype._mouseMoveTracking=function(t){var e=this.options,i=this._tooltip,o=this._highlight,r=this._activePoint,n=this._eventCoordinates(t);this._plotArea.box.containsPoint(n)?r&&r.tooltipTracking&&r.series&&r.parent.getNearestPoint&&(n=r.parent.getNearestPoint(n.x,n.y,r.seriesIx))&&n!==r&&((this._activePoint=n).hover(this,t)||(O({},e.tooltip,n.options.tooltip).visible&&i.show(n),o.show(n))):(ue(document,((t={})[Cg]=this._mouseMoveTrackHandler,t)),this._unsetActivePoint(),this._clearFocusedElement(),this._mouseMoveTrackHandler=null,this._hideInactiveOpacity(r))},f.prototype._mousemove=function(t){var e=this._eventCoordinates(t),i=this._plotArea;this._trackCrosshairs(e),i.hover&&((i=i.backgroundContainsPoint(e))?(this._plotAreaHovered=!0,this._plotArea.hover(this,t)):this._plotAreaHovered&&!i&&(this._plotAreaHovered=!1,this.trigger(qs))),this._sharedTooltip()&&this._trackSharedTooltip(e,t)},f.prototype._trackCrosshairs=function(t){for(var e=this._plotArea.crosshairs,i=0;i<e.length;i++){var o=e[i];o.box.containsPoint(t)?o.showAt(t):o.hide()}},f.prototype._trackSharedTooltip=function(t,e,i){var o,r,n,s,a,l,h;this._suppressHover||(o=this.options.tooltip,a=this._plotArea,s=this._plotArea.categoryAxis,r=this._tooltip,n=this._highlight,a.backgroundContainsPoint(t)?(s=s.pointCategoryIndex(t))!==this._tooltipCategoryIx||!this._sharedHighlight&&i?((h=(l=(a=a.pointsByCategoryIndex(s)).map(function(t){return t.eventArgs(e)}))[0]||{}).categoryPoints=l,0<a.length&&!this.trigger(Gs,h)?(o.visible&&r.showAt(a,t),n.show(a),this._sharedHighlight=!0):r.hide(),this._tooltipCategoryIx=s):i&&this._sharedHighlight&&(n.hide(),r.hide(),this._sharedHighlight=!1):this._sharedHighlight&&(n.hide(),r.hide(),this._tooltipCategoryIx=null,this._sharedHighlight=!1))},f.prototype.hideElements=function(t){var e=this._plotArea;this._mousemoveThrottled.cancel(),e.hideCrosshairs(),this._unsetActivePoint(t)},f.prototype._unsetActivePoint=function(t){var e=this._highlight;this._activePoint=null,this._hoveredPoint=null,t&&t.keepTooltipOpen||this._hideTooltip(),this._tooltipCategoryIx=null,this._sharedHighlight=!1,e&&e.hide()},f.prototype._deferRedraw=function(){this._redraw()},f.prototype._clearRedrawTimeout=function(){this._redrawTimeout&&(clearInterval(this._redrawTimeout),this._redrawTimeout=null)},f.prototype.bindCategories=function(){for(var t=this.options,e=[].concat(t.categoryAxis),i=0;i<e.length;i++){var o=e[i];!1!==o.autoBind&&this.bindCategoryAxisFromSeries(o,i)}},f.prototype.bindCategoryAxisFromSeries=function(i,e){var o=this,r=new Set,t=this.options.series.filter(function(t){return t.categoryAxis===i.name||!t.categoryAxis&&0===e}),n=t.some(function(t){return Boolean(t.categoryField)}),t=t.filter(function(t){return t.data&&0<t.data.length}),s=t.map(function(t){return Dn.current.bindPoint(t,0).fields.category}),a=s.reduce(function(t,e){return t||Ma(i,e)},!1);t.filter(function(t,e){return t.categoryField||k(s[e])}).forEach(function(i){return i.data.forEach(function(t,e){e=Dn.current.bindPoint(i,e).fields.category;a&&(e=(t=Ca(e,t,o.chartService.intl))?t.getTime():void 0),r.add(e)})}),0<r.size?(t=Array.from(r.values()),a&&(t=t.sort().map(function(t){return t&&new Date(t)})),i.categories=t):n&&(i.categories=[])},f.prototype._isBindable=function(t){for(var e=Dn.current.valueFields(t),i=!0,o=0;o<e.length;o++){var r=e[o];if(r===ut?r="field":r+="Field",!k(t[r])){i=!1;break}}return i},f.prototype._noTransitionsRedraw=function(){var t,e=this.options;!1!==e.transitions&&(t=!(e.transitions=!1)),this._redraw(),t&&(e.transitions=!0)},f.prototype._legendItemHover=function(t,e){this._showSeriesInactiveOpacity(t,e)},f.prototype._showSeriesInactiveOpacity=function(e,i){var t=this._plotArea,o=this._highlight,r=(t.srcSeries||t.series)[e],n=u(r.type,[ms,cs,us,ds])?t.findPoint(function(t){return t.series.index===e&&t.index===i}):t.pointsBySeriesIndex(e);this._hasInactiveOpacity()&&r.visible&&n?(r=1<t.series.length,t=n.length?n[0]:n,this._displayInactiveOpacity(t,r,n)):o.show(n)},f.prototype._shouldAttachMouseMove=function(){return this._plotArea.crosshairs.length||this._tooltip&&this._sharedTooltip()||this.requiresHandlers([Ys,qs])},f.prototype.updateMouseMoveHandler=function(){var t;ue(this.element,((t={})[Cg]=this._mousemoveThrottled,t)),this._shouldAttachMouseMove()&&ie(this.element,((t={})[Cg]=this._mousemoveThrottled,t))},f.prototype.applyOptions=function(t,e){Vg(this._originalOptions,t),this._originalOptions=O(this._originalOptions,t),this.options=O({},this._originalOptions),e&&(this._theme=e,this.chartService.theme=e),this._initTheme(this.options,this._theme),this._toggleDragZoomEvents()},f.prototype.setOptions=function(t,e){this.applyOptions(t,e),this.bindCategories(),this.redraw(),this.updateMouseMoveHandler(),this._restoreOverlayElement()},f.prototype.setDirection=function(t){this.chartService.rtl=Boolean(t),this.surface&&"svg"===this.surface.type&&this._destroySurface()},f.prototype.setIntlService=function(t){this.chartService.intl=t},f.prototype.noTransitionsRedraw=function(){this._noTransitionsRedraw()},f.prototype.destroy=function(){var t;this._destroyed=!0,ue(this.element,((t={})[Pg]=this._clickHandler,t[ha]=this._mousewheelHandler,t[Cg]=this._mousemoveThrottled,t[Tg]=this._mouseleaveHandler,t[Sg]=this._mousedownHandler,t[Mg]=this._keydownHandler,t.focus=this._focusHandler,t.blur=this._blurHandler,t)),this.domEvents&&(this.domEvents.destroy(),delete this.domEvents),this._mouseMoveTrackHandler&&ue(document,((t={})[Cg]=this._mouseMoveTrackHandler,t)),this._focusState=null,this.element._kendoExportVisual=null,this._destroyView(),this._destroySurface(),this._clearRedrawTimeout()},f.prototype._destroySurface=function(){var t=this.surface;t&&(t.unbind("mouseenter",this._surfaceMouseenterHandler),t.unbind("mouseleave",this._surfaceMouseleaveHandler),t.destroy(),this.surface=null)},f.prototype._destroySelections=function(){var t=this._selections;if(t)for(;0<t.length;)t.shift().destroy()},f.prototype._destroyView=function(){var t=this._model;t&&(t.destroy(),this._model=null),this._unsetActivePoint(),this._clearFocusedElement(),this._resetDrilldownPoint(),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)},f);function f(t,e,i,o){var r=this,o=(void 0===o&&(o={}),kg.call(this),this.observers=[],this.addObserver(o.observer),this.chartService=new Go(this,o),this.chartService.theme=i,this._initElement(t),O({},this.options,e));this._originalOptions=O({},o),this._theme=i,this._initTheme(o,i),this._focusState={},this._initHandlers(),this._initSurface(),this.bindCategories(),de.preloadFonts(e,function(){r.fontLoaded=!0,r._destroyed||(r.trigger("init"),r._redraw(),r._attachEvents(),r._restoreOverlayElement())})}function Lg(t,e){if(t)for(var i=0;i<t.length;i++)if(t[i].category===e)return[t[i]]}function Ig(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 Bg(t){for(var e={},i=0;i<t.length;i++){var o=t[i],r=o.options.name;r&&(e[r]=o.range())}return e}var Eg,Rg=["data","categories"];function Vg(t,e){for(var i in e){var o,r,n;!u(i,Rg)&&je(e,i)&&(o=e[i],r=t[i],k(r))&&((n=null===o)||!k(o)?(delete t[i],n&&delete e[i]):r&&Ot(o)&&Ot(r)&&Vg(r,o))}}function jg(t){for(var e=0;e<t.length;e++)t[e].notifyRender()}e($,{renderAs:"",chartArea:{},legend:{visible:!0,labels:{},accessibility:{},focusHighlight:{border:{opacity:1,color:Y,width:2}}},categoryAxis:{},seriesDefaults:{type:ps,data:[],highlight:{visible:!0},labels:{},negativeValues:{visible:!1},accessibility:{},focusHighlight:{border:{opacity:1,width:2},zIndex:200}},series:[],seriesColors:null,tooltip:{visible:!1},transitions:!0,valueAxis:{narrowRange:!1},plotArea:{},title:{},xAxis:{},yAxis:{},panes:[{}],pannable:!1,zoomable:!1});let zg=$,Dg=((Eg=Xu)&&(Fg.__proto__=Eg),((Fg.prototype=Object.create(Eg&&Eg.prototype)).constructor=Fg).prototype._slotAnchor=function(t,e){var i=this.plotArea.categoryAxis.options.vertical,o=i?{horizontal:"left",vertical:"center"}:{horizontal:"center",vertical:"bottom"};return{point:i?new A(this.plotArea.box.x2,e.center().y):new A(e.center().x,-2),align:o}},Fg.prototype._defaultAnchor=function(t,e){return this._slotAnchor({},e)},Fg);function Fg(){Eg.apply(this,arguments)}let Hg=Dg;var Ng=[ns,ls];function Ug(t){for(var e=[],i=0;i<t.length;i++){var o=t[i];e[i]=o.style.display,o.style.display="none"}return e}function Gg(t,e){for(var i=0;i<t.length;i++)t[i].style.display=e[i]}function Wg(t){return m(t)?[t]:t}(Xg=zg)&&(qg.__proto__=Xg),((qg.prototype=Object.create(Xg&&Xg.prototype)).constructor=qg).prototype._setElementClass=function(t){vt(t,"k-sparkline")},qg.prototype._initElement=function(t){Xg.prototype._initElement.call(this,t),this._initialWidth=Math.floor(ne(t).width)},qg.prototype._resize=function(){var t=this.element,e=Ug(t.childNodes);this._initialWidth=Math.floor(ne(t).width),Gg(t.childNodes,e),Xg.prototype._resize.call(this)},qg.prototype._modelOptions=function(){var t=this.options,e=this._surfaceWrap(),i=Ug(e.childNodes),o=document.createElement("span"),t=(o.innerHTML=" ",e.appendChild(o),O({width:this._autoWidth,height:ne(e).height,transitions:t.transitions},t.chartArea,{inline:!0,align:!1}));return ne(e,{width:t.width,height:t.height}),e.removeChild(o),Gg(e.childNodes,i),this.surface&&this.surface.resize(),t},qg.prototype._surfaceWrap=function(){var t;return this.stage||(t=this.stage=document.createElement("span"),this.element.appendChild(t)),this.stage},qg.prototype._createPlotArea=function(t){t=Xg.prototype._createPlotArea.call(this,t);return this._autoWidth=this._initialWidth||this._calculateWidth(t),t},qg.prototype._calculateWidth=function(t){for(var e=this.options,i=w(e.chartArea.margin),o=t.charts,r=this._surfaceWrap(),n=0,s=0;s<o.length;s++){var a=o[s],l=(a.options.series||[])[0];if(l){if(l.type===ns)return 150;if(l.type===ls)return 150;if(l.type===ms)return ne(r).height;var h=a.categoryAxis;h&&(h=h.categoriesCount()*(!a.options.isStacked&&u(l.type,[ps,Is])?a.seriesOptions.length:1),n=Math.max(n,h))}}t=n*e.pointWidth;return 0<t&&(t+=i.left+i.right),t},qg.prototype._createSharedTooltip=function(t){return new Hg(this._plotArea,t)},qg.normalizeOptions=function(t){t=Wg(t);return(t=yt(t)?{seriesDefaults:{data:t}}:O({},t)).series||(t.series=[{data:Wg(t.data)}]),O(t,{seriesDefaults:{type:t.type}}),t=u(t.series[0].type,Ng)||u(t.seriesDefaults.type,Ng)?O({},{categoryAxis:{crosshair:{visible:!1}}},t):t};var Xg,Yg,Ja=qg;function qg(){Xg.apply(this,arguments)}e(Ja,{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}]});let Zg=Ja,Qg=((Yg=M.drawing.Animation)&&(Kg.__proto__=Yg),((Kg.prototype=Object.create(Yg&&Yg.prototype)).constructor=Kg).prototype.setup=function(){this._initialOpacity=parseFloat(Bt(this.element,"opacity").opacity)},Kg.prototype.step=function(t){Bt(this.element,{opacity:String(Xt(this._initialOpacity,0,t))})},Kg.prototype.abort=function(){Yg.prototype.abort.call(this),Bt(this.element,{display:"none",opacity:String(this._initialOpacity)})},Kg.prototype.cancel=function(){Yg.prototype.abort.call(this),Bt(this.element,{opacity:String(this._initialOpacity)})},Kg);function Kg(){Yg.apply(this,arguments)}let $g=Qg;function Jg(t,e){var i=document.createElement("div");return i.className=t,e&&(i.style.cssText=e),i}(ty=M.Class)&&(ey.__proto__=ty),((ey.prototype=Object.create(ty&&ty.prototype)).constructor=ey).prototype.createElements=function(){var t=this.element=Jg("k-navigator-hint","display: none; position: absolute; top: 1px; left: 1px;"),e=this.tooltip=Jg("k-tooltip k-chart-tooltip"),i=this.scroll=Jg("k-scroll");e.innerHTML=" ",t.appendChild(e),t.appendChild(i)},ey.prototype.show=function(t,e,i){var o=this.element,r=this.options,n=this.scroll,s=this.tooltip,a=fr(d(t)+d(e-t)/2),l=.4*i.width(),h=i.center().x-l,p=(i.center().x-h)/(r.max-r.min),a=a-r.min,c=this.chartService.intl.format(r.format,t,e),r=jt(r),r=(this.clearHideTimeout(),this._visible||(Bt(o,{visibility:"hidden",display:"block"}),this._visible=!0),r&&(c=r({from:t,to:e})),s.innerHTML=c,Bt(s,{left:i.center().x-s.offsetWidth/2,top:i.y1}),Bt(s,["marginTop","borderTopWidth","height"]));Bt(n,{width:l,left:h+a*p,top:i.y1+r.marginTop+r.borderTopWidth+r.height/2}),Bt(o,{visibility:"visible"})},ey.prototype.clearHideTimeout=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this._hideAnimation&&this._hideAnimation.cancel()},ey.prototype.hide=function(){var t=this;this.clearHideTimeout(),this._hideTimeout=setTimeout(function(){t._visible=!1,t._hideAnimation=new $g(t.element),t._hideAnimation.setup(),t._hideAnimation.play()},this.options.hideDelay)},ey.prototype.destroy=function(){this.clearHideTimeout(),this.container&&this.container.removeChild(this.element),delete this.container,delete this.chartService,delete this.element,delete this.tooltip,delete this.scroll};var ty,h=ey;function ey(t,e,i){ty.call(this),this.options=O({},this.options,i),this.container=t,this.chartService=e;i=Bt(t,["paddingLeft","paddingTop"]);this.chartPadding={top:i.paddingTop,left:i.paddingLeft},this.createElements(),t.appendChild(this.element)}e(h,{format:"{0:d} - {1:d}",hideDelay:500});let iy=h;var oy,ry,ny="_navigator",sy=ny,ay="_default";function ly(t){oy.call(this),this.chart=t;var e=this.options=O({},this.options,t.options.navigator),i=e.select;i&&(i.from=this.parseDate(i.from),i.to=this.parseDate(i.to)),k(e.hint.visible)||(e.hint.visible=e.visible),this.chartObserver=new Zt(this,((i={})[Zs]="_drag",i[Qs]="_dragEnd",i[Js]="_zoom",i[ta]="_zoomEnd",i)),t.addObserver(this.chartObserver)}function hy(){}(oy=M.Class)&&(ly.__proto__=oy),((ly.prototype=Object.create(oy&&oy.prototype)).constructor=ly).prototype.parseDate=function(t){return Sr(this.chart.chartService.intl,t)},ly.prototype.clean=function(){this.selection&&(this.selection.destroy(),this.selection=null),this.hint&&(this.hint.destroy(),this.hint=null)},ly.prototype.destroy=function(){this.chart&&(this.chart.removeObserver(this.chartObserver),delete this.chart),this.clean()},ly.prototype.redraw=function(){this._redrawSelf(),this.initSelection()},ly.prototype.initSelection=function(){var t=this.chart,e=this.options,i=this.mainAxis(),o=i.roundedRange(),r=o.min,o=o.max,n=e.select,s=n.from,a=n.to,n=n.mousewheel,l=(hy.prototype=i,new hy);0!==i.categoriesCount()&&(this.clean(),l.box=i.box,this.selection=new Fu(t,l,{min:r,max:o,from:s||r,to:a||o,mousewheel:_(n,{zoom:"left"}),visible:e.visible},new Zt(this,{selectStart:"_selectStart",select:"_select",selectEnd:"_selectEnd"})),e.hint.visible)&&(this.hint=new iy(t.element,t.chartService,{min:r,max:o,template:jt(e.hint),format:e.hint.format}))},ly.prototype.setRange=function(){var t=this.chart._createPlotArea(!0).namedCategoryAxes[sy].roundedRange(),e=t.min,t=t.max,i=this.options.select||{},o=i.from||e,r=i.to||t;this.options.select=O({},i,{from:o=o<e?e:o,to:r=t<r?t:r}),this.filterAxes()},ly.prototype._redrawSelf=function(t){var e=this.chart._plotArea;e&&e.redraw(he(e.panes),t)},ly.prototype.redrawSlaves=function(){var t=this.chart,e=t._plotArea,i=e.panes.filter(function(t){return t.options.name!==ny});e.srcSeries=t.options.series,e.options.categoryAxis=t.options.categoryAxis,e.clearSeriesPointsCache(),e.redraw(i)},ly.prototype._drag=function(t){var e=this.chart,i=this.selection,o=e._eventCoordinates(t.originalEvent),r=this.mainAxis(),n=r.roundedRange(),r=r.pane.box.containsPoint(o),o=e._plotArea.categoryAxis,e=t.axisRanges[o.options.name],t=this.options.select;e&&!r&&i&&(o=t.from&&t.to?d(t.to)-d(t.from):d(i.options.to)-d(i.options.from),r=fr(x(d(e.min),n.min,d(n.max)-o)),t=fr(x(d(r)+o,d(n.min)+o,n.max)),this.options.select={from:r,to:t},this.options.liveDrag&&(this.filterAxes(),this.redrawSlaves()),i.set(r,t),this.showHint(r,t))},ly.prototype._dragEnd=function(){this.filterAxes(),this.filter(),this.redrawSlaves(),this.hint&&this.hint.hide()},ly.prototype.readSelection=function(){var t=this.selection.options,e=t.from,t=t.to,i=this.options.select;i.from=e,i.to=t},ly.prototype.filterAxes=function(){for(var t=this.options.select,e=this.chart.options.categoryAxis,i=(t=void 0===t?{}:t).from,o=t.to,r=0;r<e.length;r++){var n=e[r];n.pane!==ny&&(n.min=i,n.max=o)}},ly.prototype.filter=function(){var t,e,i=this.chart,o=this.options.select;i.requiresHandlers(["navigatorFilter"])&&(e=this.mainAxis(),t={from:o.from,to:o.to},"category"!==e.options.type&&(e=new jr(O({baseUnit:"fit"},i.options.categoryAxis[0],{categories:[o.from,o.to]}),i.chartService).options,t.from=yr(e.min,-e.baseUnitStep,e.baseUnit),t.to=yr(e.max,e.baseUnitStep,e.baseUnit)),this.chart.trigger("navigatorFilter",t))},ly.prototype._zoom=function(t){var e,i,o=this.chart._plotArea.categoryAxis,r=this.selection,n=this.options,s=n.select,n=n.liveDrag,a=this.mainAxis(),l=t.delta;r&&(e=a.categoryIndex(r.options.from),a=a.categoryIndex(r.options.to),i=this.chart._eventCoordinates(t.originalEvent),t.originalEvent.preventDefault(),1<Math.abs(l)&&(l*=3),1<a-e?(r.zoom(l,i),this.readSelection()):(o.options.min=s.from,s.from=o.scaleRange(-t.delta*this.chart._mousewheelZoomRate(),i).min),n&&(this.filterAxes(),this.redrawSlaves()),r.set(s.from,s.to),this.showHint(this.options.select.from,this.options.select.to))},ly.prototype._zoomEnd=function(t){this._dragEnd(t)},ly.prototype.showHint=function(t,e){var i=this.chart._plotArea;this.hint&&this.hint.show(t,e,i.backgroundBox())},ly.prototype._selectStart=function(t){return this.chart._selectStart(t)},ly.prototype._select=function(t){return this.showHint(t.from,t.to),this.chart._select(t)},ly.prototype._selectEnd=function(t){return this.hint&&this.hint.hide(),this.readSelection(),this.filterAxes(),this.filter(),this.redrawSlaves(),this.chart._selectEnd(t)},ly.prototype.mainAxis=function(){var t=this.chart._plotArea;if(t)return t.namedCategoryAxes[sy]},ly.prototype.select=function(t,e){var i=this.options.select;return t&&e&&(i.from=this.parseDate(t),i.to=this.parseDate(e),this.filterAxes(),this.filter(),this.redrawSlaves(),this.selection.set(t,e)),{from:i.from,to:i.to}},ly.setup=function(t,e){var i,o,r;void 0===e&&(e={}),(t=void 0===t?{}:t).__navi||(t.__navi=!0,i=O({},e.navigator,t.navigator),o=t.panes=[].concat(t.panes),r=O({},i.pane,{name:ny}),i.visible||(r.visible=!1,r.height=.1),"top"!==t.navigator.position?o.push(r):o.unshift(r),o.forEach(function(t){t.name=t.name||ay}),ly.attachAxes(t,i),ly.attachSeries(t,i,e))},ly.attachAxes=function(t,e){var i=e.series||[],o=t.categoryAxis=[].concat(t.categoryAxis),t=t.valueAxis=[].concat(t.valueAxis),i=(o.concat(t).forEach(function(t){t.pane=t.pane||ay}),0===Aa(i,Vs).length),i=O({type:"date",pane:ny,roundToBaseUnit:!i,justified:i,_collapse:!1,majorTicks:{visible:!0},tooltip:{visible:!1},labels:{step:1},autoBind:e.autoBindElements,autoBaseUnitSteps:{minutes:[1],hours:[1,2],days:[1,2],weeks:[],months:[1],years:[1]}}),r=e.categoryAxis;o.push(O({},i,{maxDateGroups:200},r,{name:sy,title:null,baseUnit:"fit",baseUnitStep:"auto",labels:{visible:!1},majorTicks:{visible:!1}}),O({},i,r,{name:sy+"_labels",maxDateGroups:20,baseUnitStep:"auto",labels:{position:""},plotBands:[],autoBaseUnitSteps:{minutes:[]},_overlap:!0}),O({},i,r,{name:sy+"_ticks",maxDateGroups:200,majorTicks:{width:.5},plotBands:[],title:null,labels:{visible:!1,mirror:!0},_overlap:!0})),t.push(O({name:sy,pane:ny,majorGridLines:{visible:!1},visible:!1},e.valueAxis))},ly.attachSeries=function(t,e,i){for(var o=t.series=t.series||[],r=[].concat(e.series||[]),n=i.seriesColors,s=e.seriesDefaults,a=0;a<r.length;a++)o.push(O({color:n[a%n.length],categoryField:e.dateField,visibleInLegend:!1,tooltip:{visible:!1}},s,r[a],{axis:sy,categoryAxis:sy,autoBind:e.autoBindElements}))};let py=ly,cy=((ry=zg)&&(uy.__proto__=ry),((uy.prototype=Object.create(ry&&ry.prototype)).constructor=uy).prototype.applyDefaults=function(t,e){var i=ne(this.element).width||600,i={seriesDefaults:{categoryField:t.dateField},axisDefaults:{categoryAxis:{name:"default",majorGridLines:{visible:!1},labels:{step:2},majorTicks:{visible:!1},maxDateGroups:Math.floor(i/28)}}},e=e&&O({},e,i);py.setup(t,e),ry.prototype.applyDefaults.call(this,t,e)},uy.prototype._setElementClass=function(t){vt(t,"k-chart k-stockchart")},uy.prototype.setOptions=function(t){this.destroyNavigator(),ry.prototype.setOptions.call(this,t)},uy.prototype.noTransitionsRedraw=function(){var t=this.options.transitions;this.options.transitions=!1,this._fullRedraw(),this.options.transitions=t},uy.prototype._resize=function(){this.noTransitionsRedraw()},uy.prototype._redraw=function(){var t=this.navigator;!this._dirty()&&t&&t.options.partialRedraw?t.redrawSlaves():this._fullRedraw()},uy.prototype._dirty=function(){var t=this.options,t=Nt([].concat(t.series,t.navigator.series),function(t){return t&&t.visible}).length,e=this._seriesCount!==t;return this._seriesCount=t,e},uy.prototype._fullRedraw=function(){var t=this.navigator;t||(t=this.navigator=new py(this),this.trigger("navigatorCreated",{navigator:t})),t.clean(),t.setRange(),ry.prototype._redraw.call(this),t.initSelection()},uy.prototype._trackSharedTooltip=function(t){var e=this._plotArea.paneByPoint(t);e&&e.options.name===ny?this._unsetActivePoint():ry.prototype._trackSharedTooltip.call(this,t)},uy.prototype.bindCategories=function(){ry.prototype.bindCategories.call(this),this.copyNavigatorCategories()},uy.prototype.copyNavigatorCategories=function(){for(var t,e=[].concat(this.options.categoryAxis),i=0;i<e.length;i++){var o=e[i];o.name===sy?t=o.categories:t&&o.pane===ny&&(o.categories=t)}},uy.prototype.destroyNavigator=function(){this.navigator&&(this.navigator.destroy(),this.navigator=null)},uy.prototype.destroy=function(){this.destroyNavigator(),ry.prototype.destroy.call(this)},uy.prototype._stopChartHandlers=function(t){var e=this._eventCoordinates(t),e=this._plotArea.paneByPoint(e);return ry.prototype._stopChartHandlers.call(this,t)||e&&e.options.name===ny},uy.prototype._toggleDragZoomEvents=function(){this._dragZoomEnabled||(this.element.style.touchAction="none",this._dragZoomEnabled=!0)},uy);function uy(){ry.apply(this,arguments)}e(cy,{dateField:"date",axisDefaults:{categoryAxis:{type:"date",baseUnit:"fit",justified:!0},valueAxis:{narrowRange:!0,labels:{format:"C"}}},navigator:{select:{},seriesDefaults:{markers:{visible:!1},tooltip:{visible:!1},highlight:{visible:!1},line:{width:2}},hint:{},visible:!0},tooltip:{visible:!0},legend:{visible:!1}});let dy=cy;var fy="arrowPointer",gy="barPointer",yy=Math.PI/180,vy="inside",gl="linear",my="outside",l="radialPointer",js="radialRangePointer";function xy(t,e){var i=t.getOrigin(),o=t.getSize(),e=w(e);return t.setOrigin([i.x-e.left,i.y-e.top]),t.setSize([o.width+(e.left+e.right),o.height+(e.top+e.bottom)]),t}var _y=M.drawing.Group,by=M.drawing.Path,wy=M.drawing.Text;function ky(t,e){var i=t.box,o=t.children[0].box,r=e.border||{},n=e.background||"",i=by.fromRect(new M.geometry.Rect([i.x1,i.y1],[i.width(),i.height()]),{stroke:{}}),t=new wy(t.text,new M.geometry.Point(o.x1,o.y1),{font:e.font,fill:{color:e.color}}),o=xy(t.bbox().clone(),e.padding),e=by.fromRect(o,{stroke:{color:r.width?r.color:"",width:r.width,opacity:r.opacity,dashType:r.dashType,lineJoin:"round",lineCap:"round"},fill:{color:n}}),o=new _y;return o.append(i),o.append(e),o.append(t),o}function Ay(t,e,i){var o=k(t.from)?t.from:nt,r=k(t.to)?t.to:rt;return t.from=Math.max(Math.min(r,o),e),t.to=Math.min(Math.max(r,o),i),t}function Sy(t,e){e=w(e);return e.left=-e.left,e.top=-e.top,e.right=-e.right,e.bottom=-e.bottom,xy(t,e)}var Cy,Py=M.drawing.Path,Ty=M.drawing.Surface,i=((Cy=M.Class)&&(My.__proto__=Cy),((My.prototype=Object.create(Cy&&Cy.prototype)).constructor=My).prototype.destroy=function(){this.surface&&(this.surface.destroy(),this.surface=null),delete this.element,delete this.surfaceElement},My.prototype.value=function(t){var e=this.pointers[0];if(0===arguments.length)return e.value();e.value(t),this._setValueOptions(t)},My.prototype._draw=function(){var t=this.surface;t.clear(),t.draw(this._visuals)},My.prototype.exportVisual=function(){return this._visuals},My.prototype.allValues=function(t){var e=this.pointers,i=[];if(0===arguments.length){for(var o=0;o<e.length;o++)i.push(e[o].value());return i}if(yt(t))for(var r=0;r<t.length;r++)m(t[r])&&e[r].value(t[r]);this._setValueOptions(t)},My.prototype._setValueOptions=function(t){for(var e=[].concat(this.options.pointer),i=[].concat(t),o=0;o<i.length;o++)e[o].value=i[o]},My.prototype.resize=function(){this.noTransitionsRedraw()},My.prototype.noTransitionsRedraw=function(){var t=this.options.transitions;this._toggleTransitions(!1),this.redraw(),this._toggleTransitions(t)},My.prototype.redraw=function(){var t=this._surfaceSize(),t=new M.geometry.Rect([0,0],[t.width,t.height]),t=(this._initSurface(),this.gaugeArea=this._createGaugeArea(),this._createModel(),Sy(t.bbox(),this._gaugeAreaMargin));this.reflow(t)},My.prototype.setOptions=function(t,e){this._originalOptions=O(this._originalOptions,t),this.options=O({},this._originalOptions),this._initTheme(e),this.redraw()},My.prototype.setDirection=function(t){this.contextService.rtl=Boolean(t),this.surface&&"svg"===this.surface.type&&(this.surface.destroy(),this.surface=null)},My.prototype.setIntlService=function(t){this.contextService.intl=t},My.prototype._initTheme=function(t){var e=t||this.theme||{},t=(this.theme=e,this.options=O({},e,this.options),this.options),i=t.pointer;if(yt(i)){for(var o=[],r=0;r<i.length;r++)o.push(O({},e.pointer,i[r]));t.pointer=o}},My.prototype._createGaugeArea=function(){var t=this.options.gaugeArea,e=this.surface.size(),i=t.border||{},e=new M.geometry.Rect([0,0],[e.width,e.height]);return this._gaugeAreaMargin=t.margin||5,0<i.width&&(e=Sy(e,i.width)),Py.fromRect(e,{stroke:{color:i.width?i.color:"",width:i.width,opacity:i.opacity,dashType:i.dashType,lineJoin:"round",lineCap:"round"},fill:{color:t.background}})},My.prototype._initSurface=function(){var t=this.options,e=this.surface,i=this._surfaceElement(),o=this._surfaceSize();ne(i,o),e&&e.options.type===t.renderAs?(this.surface.clear(),this.surface.resize()):(e&&e.destroy(),this.surface=Ty.create(i,{type:t.renderAs}))},My.prototype._surfaceSize=function(){var t=this.options,e=this._getSize();return t.gaugeArea&&O(e,t.gaugeArea),e},My.prototype._surfaceElement=function(){return this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.element.appendChild(this.surfaceElement)),this.surfaceElement},My.prototype.getSize=function(){return this._getSize()},My.prototype._getSize=function(){var t=this.element,e=this._defaultSize(),i=t.offsetWidth,t=t.offsetHeight;return{width:i=i||e.width,height:t=t||e.height}},My.prototype._defaultSize=function(){return{width:200,height:200}},My.prototype._toggleTransitions=function(t){this.options.transitions=t;for(var e=0;e<this.pointers.length;e++)this.pointers[e].options.animation.transitions=t},My);function My(t,e,i,o){void 0===o&&(o={}),Cy.call(this),this.element=t,this.theme=i,this.contextService=new Go(this,o),this._originalOptions=O({},this.options,e),this.options=O({},this._originalOptions),this._initTheme(i),this.redraw()}e(i,{plotArea:{},theme:"default",renderAs:"",pointer:{},scale:{},gaugeArea:{}});let Oy=i;var Ly=M.drawing.Path,Iy=M.drawing.Group,By=M.geometry.Point;function Ey(t,e,i,o){var r,n,s,a,l,h,p=e.length;if(o.visible)for(var c=i.mirror,u=i.lineBox,d=o.skip;d<p;d+=o.step)d%o.skipUnit!=0&&(i.tickX=c?u.x2:u.x2-o.size,i.tickY=c?u.y1-o.size:u.y1,i.position=e[d],t.append((n=o,h=l=a=s=void 0,a=(r=i).position,l=i.tickX,h=i.tickY,r=i.vertical?(s=new By(l,a),new By(l+n.size,a)):(s=new By(a,h),new By(a,h+n.size)),new Ly({stroke:{color:n.color,width:n.width}}).moveTo(s).lineTo(r))))}(Ry=Xr)&&(jy.__proto__=Ry),((jy.prototype=Object.create(Ry&&Ry.prototype)).constructor=jy).prototype.initUserOptions=function(t){t=O({},this.options,t);return(t=O({},t,{labels:{mirror:t.mirror}})).majorUnit=t.majorUnit||Bi(t.min,t.max),t},jy.prototype.initFields=function(){},jy.prototype.render=function(){var t=this.elements=new Iy,e=this.renderLabels(),i=this.renderLine(),o=this.renderTicks(),r=this.renderRanges();return t.append(i,e,o,r),t},jy.prototype.renderRanges=function(){for(var t=this.options,e=t.min,i=t.max,o=t.vertical,r=t.labels.mirror,n=t.ranges||[],s=new Iy,a=n.length,l=t.rangeSize||t.minorTicks.size/2,h=0;h<a;h++){var p=Ay(n[h],e,i),c=this.getSlot(p.from,p.to),u=o?this.lineBox():c,c=o?c:this.lineBox();o?u.x1-=l*(r?-1:1):c.y2+=l*(r?-1:1),s.append(Ly.fromRect(new M.geometry.Rect([u.x1,c.y1],[u.x2-u.x1,c.y2-c.y1]),{fill:{color:p.color,opacity:p.opacity},stroke:{}}))}return s},jy.prototype.renderLabels=function(){for(var t=this.labels,e=this.options,i=new Iy,o=0;o<t.length;o++)i.append(ky(t[o],e.labels));return i},jy.prototype.renderLine=function(){var t=this.options.line,e=this.lineBox(),i=new Iy;return 0<t.width&&t.visible&&((t=new Ly({stroke:{color:t.color,dashType:t.dashType,width:t.width}})).moveTo(e.x1,e.y1).lineTo(e.x2,e.y2),i.append(t)),i},jy.prototype.renderTicks=function(){var t=new Iy,e=this.options,i=e.majorTicks.visible?e.majorUnit:0,o={vertical:e.vertical,mirror:e.labels.mirror,lineBox:this.lineBox()};return Ey(t,this.getMajorTickPositions(),o,e.majorTicks),Ey(t,this.getMinorTickPositions(),o,O({},{skipUnit:i/e.minorUnit},e.minorTicks)),t};var Ry,Vy,t=jy;function jy(t,e){t=t||{};!k(t.reverse)&&!1===t.vertical&&(e||{}).rtl&&(t=Object.assign({},t,{reverse:!0})),Ry.call(this,0,1,t,e),this.options.minorUnit=this.options.minorUnit||this.options.majorUnit/10}e(t,{min:0,max:50,majorTicks:{size:15,align:vy,color:Y,width:.5,visible:!0},minorTicks:{size:10,align:vy,color:Y,width:.5,visible:!0},line:{width:.5},labels:{position:vy,padding:2},mirror:!1,_alignLines:!1});let zy=t,Dy=((Vy=M.Class)&&(Fy.__proto__=Vy),((Fy.prototype=Object.create(Vy&&Vy.prototype)).constructor=Fy).prototype.value=function(t){var e=this.options,i=e.value;if(0===arguments.length)return i;var i=this.scale.options,o=i.min,i=i.max;e._oldValue=k(e._oldValue)?e.value:o,e.value=x(t,o,i),this.elements&&this.repaint()},Fy);function Fy(t,e){Vy.call(this);var i=t.options,o=i.min,i=i.max,e=this.options=O({},this.options,e);e.fill=e.color,this.scale=t,k(e.value)?e.value=x(e.value,o,i):e.value=o}e(Dy,{color:Y});var Hy,Ny,Ds=Dy,Fs=((Hy=Ds)&&(Uy.__proto__=Hy),((Uy.prototype=Object.create(Hy&&Hy.prototype)).constructor=Uy).prototype.reflow=function(){var t,e,i,o=this.options,r=this.scale,n=r.options,s=n.mirror,n=n.vertical,r=r.lineBox(),a=o.track.size||o.size,l=o.size/2,h=w(o.margin),h=n?h[s?"left":"right"]:h[s?"bottom":"top"],h=s?-h:h;n?(i=new I(r.x1+h,r.y1,r.x1+h,r.y2),s?i.x1-=a:i.x2+=a,o.shape!==gy&&(t=e=new I(r.x2+h,r.y1-l,r.x2+h,r.y2+l))):(i=new I(r.x1,r.y1-h,r.x2,r.y1-h),s?i.y2+=a:i.y1-=a,o.shape!==gy&&(t=e=new I(r.x1-l,r.y1-h,r.x2+l,r.y1-h))),this.trackBox=i,this.pointerRangeBox=e,this.box=t||i.clone().pad(o.border.width)},Uy.prototype.getElementOptions=function(){var t=this.options;return{fill:{color:t.color,opacity:t.opacity},stroke:k(t.border)?{color:t.border.width?t.border.color||t.color:"",width:t.border.width,dashType:t.border.dashType,opacity:t.opacity}:null}},Uy.prototype._margin=function(){var t=this.scale,e=this.options,t=t.options,i=t.mirror,t=t.vertical,e=w(e.margin);return t?e[i?"left":"right"]:e[i?"bottom":"top"]},Uy);function Uy(t,e){Hy.call(this,t,e),this.options=O({track:{visible:k(e.track)}},this.options)}e(Fs,{shape:gy,track:{border:{width:1}},color:Y,border:{width:1},opacity:1,margin:w(3),animation:{type:gy},visible:!0});let Gy=Fs,Wy=((Ny=M.drawing.Animation)&&(Xy.__proto__=Ny),((Xy.prototype=Object.create(Ny&&Ny.prototype)).constructor=Xy).prototype.setup=function(){var t=this.options,e=t.margin,i=t.from,o=t.to,r=t.vertical,n=r?"x1":"y1",r=(t.mirror===r?(i[n]-=e,o[n]-=e):(i[n]+=e,o[n]+=e),this.fromScale=new M.geometry.Point(i.x1,i.y1)),n=this.toScale=new M.geometry.Point(o.x1,o.y1);0!==t.duration&&(t.duration=Math.max(r.distanceTo(n)/t.duration*1e3,1))},Xy.prototype.step=function(t){var e=Xt(this.fromScale.x,this.toScale.x,t),t=Xt(this.fromScale.y,this.toScale.y,t);this.element.transform(M.geometry.transform().translate(e,t))},Xy);function Xy(){Ny.apply(this,arguments)}e(Wy,{easing:gl,duration:250}),M.drawing.AnimationFactory.current.register(fy,Wy);let Yy=Wy;var qy,Zy,Qy=M.geometry.Point,Ky=M.drawing.Path;function $y(t,e){qy.call(this,t,e),k(this.options.size)||(this.options.size=.6*this.scale.options.majorTicks.size)}(qy=Gy)&&($y.__proto__=qy),(($y.prototype=Object.create(qy&&qy.prototype)).constructor=$y).prototype.pointerShape=function(){var t=this.scale,e=this.options.size,i=e/2,o=t.options.mirror?-1:1;return t.options.vertical?[new Qy(0,0-i),new Qy(0-o*e,0),new Qy(0,0+i)]:[new Qy(0-i,0),new Qy(0,0+o*e),new Qy(0+i,0)]},$y.prototype.repaint=function(){var t=this.scale,e=this.options,t=new Yy(this.elements,O(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()},$y.prototype.render=function(){var t=this.scale,e=this.options,i=this.getElementOptions(),o=this.pointerShape(e.value),i=(e.animation.type=fy,new Ky({stroke:i.stroke,fill:i.fill}).moveTo(o[0]).lineTo(o[1]).lineTo(o[2]).close()),o=t.getSlot(e.value);return i.transform(M.geometry.transform().translate(o.x1,o.y1)),this.elements=i};let Jy=$y,tv=((Zy=M.drawing.Animation)&&(ev.__proto__=Zy),((ev.prototype=Object.create(Zy&&Zy.prototype)).constructor=ev).prototype.setup=function(){var t=this.options,e=this.axis=t.vertical?v:y,i=this.to=t.newPoints[0][e],e=this.from=t.oldPoints[0][e];0!==t.duration&&(t.duration=Math.max(Math.abs(i-e)/t.speed*1e3,1)),this._set(e)},ev.prototype.step=function(t){t=Xt(this.from,this.to,t);this._set(t)},ev.prototype._set=function(t){var e="set"+this.axis.toUpperCase(),i=this.options.newPoints;i[0][e](t),i[1][e](t)},ev);function ev(){Zy.apply(this,arguments)}e(tv,{easing:gl,speed:250}),M.drawing.AnimationFactory.current.register(gy,tv);let iv=tv;var ov,rv=M.drawing.Group,nv=M.drawing.Path;function sv(t,e){ov.call(this,t,e),k(this.options.size)||(this.options.size=.3*this.scale.options.majorTicks.size)}(ov=Gy)&&(sv.__proto__=ov),((sv.prototype=Object.create(ov&&ov.prototype)).constructor=sv).prototype.pointerShape=function(t){var e=this.scale,i=this.options,o=e.options,r=o.mirror,o=o.vertical,r=r===o?-1:1,i=i.size*r,n=e.getSlot(e.options.min),e=e.getSlot(t),t=o?v:y,s=o?y:v,r=this._margin()*r,a=new M.geometry.Point,n=(a[t]=n[t+"1"],a[s]=n[s+"1"],new M.geometry.Point),t=(n[t]=e[t+"1"],n[s]=e[s+"1"],o?(a.translate(r,0),n.translate(r,0)):(a.translate(0,r),n.translate(0,r)),n.clone()),e=a.clone();return o?(t.translate(i,0),e.translate(i,0)):(t.translate(0,i),e.translate(0,i)),[a,n,t,e]},sv.prototype.repaint=function(){var t=this.scale,e=this.options,i=this.pointerShape(e.value),o=this.pointerPath,r=this.pointerShape(e._oldValue),o=(o.moveTo(i[0]).lineTo(i[1]).lineTo(i[2]).lineTo(i[3]).close(),new iv(o,O(e.animation,{reverse:t.options.reverse,vertical:t.options.vertical,oldPoints:[r[1],r[2]],newPoints:[i[1],i[2]]})));!1===e.animation.transitions&&(o.options.duration=0),o.setup(),o.play()},sv.prototype.render=function(){var t=new rv,e=this.getElementOptions(),e=(this.options.track.visible&&t.append(this.renderTrack()),this.pointerPath=new nv({stroke:e.stroke,fill:e.fill}));return t.append(e),this.elements=t},sv.prototype.renderTrack=function(){var t=this.options.track,e=t.border||{},i=this.trackBox.clone().pad(e.width||0);return new nv.fromRect(i.toRect(),{fill:{color:t.color,opacity:t.opacity},stroke:{color:e.width?e.color||t.color:"",width:e.width,dashType:e.dashType}})};let av=sv;var lv,hv=M.drawing.Group,zs=((lv=Oy)&&(pv.__proto__=lv),((pv.prototype=Object.create(lv&&lv.prototype)).constructor=pv).prototype.reflow=function(t){var e=this.pointers,i=t.origin.x,o=t.origin.y,i=new I(i,o,i+t.width(),o+t.height());this.scale.reflow(i),this._shrinkScaleWidth(i);for(var r=0;r<e.length;r++)e[r].reflow();this.bbox=this._getBox(i),this._alignElements(),this._shrinkElements(),this._buildVisual(),this._draw()},pv.prototype._buildVisual=function(){var t=new hv,e=this.scale.render(),i=this.pointers;t.append(this.gaugeArea),t.append(e);for(var o=0;o<i.length;o++){var r=i[o];t.append(r.render()),r.value(r.options.value)}this._visuals=t},pv.prototype._createModel=function(){var t=this.options,e=this.scale=new zy(t.scale,this.contextService);this.pointers=[];for(var i=yt(i=t.pointer)?i:[i],o=0;o<i.length;o++){var r=O({},i[o],{animation:{transitions:t.transitions}}),n="arrow"===r.shape?Jy:av;this.pointers.push(new n(e,r))}},pv.prototype._defaultSize=function(){var t=this.options.scale.vertical;return{width:t?60:200,height:t?200:60}},pv.prototype._getBox=function(t){for(var e,i=this.scale,o=this.pointers,r=t.center(),n=o[0].box.clone().wrap(i.box),s=0;s<o.length;s++)n.wrap(o[s].box.clone());return n=i.options.vertical?(e=n.width()/2,new I(r.x-e,t.y1,r.x+e,t.y2)):(e=n.height()/2,new I(t.x1,r.y-e,t.x2,r.y+e))},pv.prototype._alignElements=function(){for(var t,e=this.scale,i=this.pointers,o=e.box,r=i[0].box.clone().wrap(e.box),n=this.bbox,s=0;s<i.length;s++)r.wrap(i[s].box.clone());e.options.vertical?(t=n.center().x-r.center().x,e.reflow(new I(o.x1+t,n.y1,o.x2+t,n.y2))):(t=n.center().y-r.center().y,e.reflow(new I(o.x1,o.y1+t,o.x2,o.y2+t)));for(var a=0;a<i.length;a++)i[a].reflow(this.bbox)},pv.prototype._shrinkScaleWidth=function(t){var e,i=this.scale;i.options.vertical||0<(e=i.contentBox().width()-t.width())&&(i.box.shrink(e,0),i.box.alignTo(t,"center"),i.reflow(i.box))},pv.prototype._shrinkElements=function(){for(var t=this.scale,e=this.pointers,i=t.box.clone(),o=t.options.vertical?"y":"x",r=e[0].box,n=0;n<e.length;n++)r.wrap(e[n].box.clone());i[o+1]+=Math.max(i[o+1]-r[o+1],0),i[o+2]-=Math.max(r[o+2]-i[o+2],0),t.reflow(i);for(var s=0;s<e.length;s++)e[s].reflow(this.bbox)},pv);function pv(){lv.apply(this,arguments)}e(zs,{transitions:!0,gaugeArea:{background:""},scale:{vertical:!0}});let cv=zs;var uv=M.drawing.Arc,dv=M.drawing.Path,fv=M.drawing.Group;function gv(t,e,i,o){var r=new fv,n=t.center,s=t.getRadiusX();if(o.visible)for(var a=0;a<e.length;a++){var l=t.pointAt(e[a]),h=new M.geometry.Point(n.x+s-o.size,n.y).rotate(e[a],n);r.append(new dv({stroke:{color:o.color,width:o.width}}).moveTo(l).lineTo(h))}return r}function yv(t,e,i,o){return{from:t,to:e,color:i,opacity:o}}(vv=Xr)&&(xv.__proto__=vv),((xv.prototype=Object.create(vv&&vv.prototype)).constructor=xv).prototype.initUserOptions=function(t){t=O({},this.options,t);return t.majorUnit=t.majorUnit||Bi(t.min,t.max),t.minorUnit=t.minorUnit||t.majorUnit/10,t},xv.prototype.initFields=function(){},xv.prototype.render=function(t,e){t=this.renderArc(t,e);this.bbox=t.bbox(),this.labelElements=this.renderLabels(),this.ticks=this.renderTicks(),this.ranges=this.renderRanges()},xv.prototype.reflow=function(t){var e=t.center(),t=Math.min(t.height(),t.width())/2;if(!k(this.bbox))return this.render(e,t);this.bbox=this.arc.bbox(),this.radius(this.arc.getRadiusX()),this.repositionRanges(),this.renderLabels()},xv.prototype.slotAngle=function(t){var e=this.options,i=e.min,o=e.max,r=e.startAngle,n=e.endAngle,s=n-r;return(e.reverse?n-(t-i)/(o-i)*s:(t-i)/(o-i)*s+r)+180},xv.prototype.hasRanges=function(){var t=this.options.ranges;return t&&t.length},xv.prototype.ticksSize=function(){var t=this.options,e=t.majorTicks,t=t.minorTicks,i=0;return e.visible&&(i=e.size),i=t.visible?Math.max(t.size,i):i},xv.prototype.labelsCount=function(){var t=vv.prototype.labelsCount.call(this),e=this.options;return 360<=e.endAngle-e.startAngle&&e.max%e.majorUnit==0&&--t,t},xv.prototype.renderLabels=function(){var t=this.options,e=this.arc.clone(),i=e.getRadiusX(),o=this.tickAngles(e,t.majorUnit),r=t.rangeSize=t.rangeSize||.1*i,n=new fv,s=.05*i,a=(k(t.rangeDistance)?s=t.rangeDistance:t.rangeDistance=s,t.labels),l=a.position===vy,h=k(this.labelElements);l&&(i-=this.ticksSize(),this.hasRanges()&&!h&&(i-=r+s),e.setRadiusX(i).setRadiusY(i));for(var p=this.labels,c=p.length,r=w(a.padding),u=(r.left+r.right)/2,d=(r.top+r.bottom)/2,f=0;f<c;f++){var g=p[f],y=g.box.width()/2,v=g.box.height()/2,m=o[f],x=(m-180)*yy,m=e.pointAt(m),_=m.x+Math.cos(x)*(y+u)*(l?1:-1),m=m.y+Math.sin(x)*(v+d)*(l?1:-1),x=(g.reflow(new I(_-y,m-v,_+y,m+v)),new M.geometry.Point(g.box.x1,g.box.y1)),_=void 0;h?(y=(_=this.labelElements.children[f]).bbox().origin,(m=_.transform()||M.geometry.transform()).translate(x.x-y.x,x.y-y.y),_.transform(m)):(_=ky(g,t.labels),n.append(_)),this.bbox=M.geometry.Rect.union(this.bbox,_.bbox())}return n},xv.prototype.repositionRanges=function(){var t=this.ranges.children;if(0<t.length){var e=this.options,i=e.rangeDistance,e=e.rangeSize,o=this.getRangeRadius();this.options.labels.position===vy&&(o+=e+i);for(var r=o+e/2,n=0;n<t.length;n++)t[n]._geometry.setRadiusX(r).setRadiusY(r);this.bbox=M.geometry.Rect.union(this.bbox,this.ranges.bbox())}},xv.prototype.renderRanges=function(){var t=this.rangeSegments(),e=t.length,i=new fv;if(e){var o=this.options,r=o.rangeSize,n=o.reverse,o=o.rangeDistance,s=this.getRangeRadius();this.radius(this.radius()-r-o);for(var a=0;a<e;a++){var l=t[a],h=this.slotAngle(l[n?"to":"from"]),p=this.slotAngle(l[n?"from":"to"]);p-h!=0&&i.append(this.createRange(h,p,s,l))}}return i},xv.prototype.createRange=function(t,e,i,o){var r=this.options.rangeSize,i=new M.geometry.Arc(this.arc.center,{radiusX:i+r/2,radiusY:i+r/2,startAngle:t,endAngle:e});return new uv(i,{stroke:{width:r,color:o.color,opacity:o.opacity,lineCap:o.lineCap}})},xv.prototype.rangeSegments=function(){var t=this.options,e=t.ranges||[],i=e.length,o=[];if(i){var r=t.min,n=t.max,s=t.rangePlaceholderColor;o.push(yv(r,n,s));for(var a=0;a<i;a++)for(var l=Ay(e[a],r,n),h=o.length,p=0;p<h;p++){var c=o[p];if(c.from<=l.from&&l.from<=c.to){o.push(yv(l.from,l.to,l.color,l.opacity)),c.from<=l.to&&l.to<=c.to&&o.push(yv(l.to,c.to,s,l.opacity)),c.to=l.from;break}}}return o},xv.prototype.getRangeRadius=function(){var t=this.arc,e=this.options,i=e.rangeSize,o=e.rangeDistance,r=e.majorTicks.size;return e.labels.position===my?t.getRadiusX()-r-o-i:t.getRadiusX()-i},xv.prototype.renderArc=function(t,e){var i=this.options;return this.arc=new M.geometry.Arc(t,{radiusX:e,radiusY:e,startAngle:i.startAngle+180,endAngle:i.endAngle+180})},xv.prototype.renderTicks=function(){var t,e=this.arc,i=this.options,o=e.clone(),r=(this.majorTickAngles=this.tickAngles(e,i.majorUnit),this.majorTicks=gv(o,this.majorTickAngles,i.majorUnit,i.majorTicks),new fv),n=(r.append(this.majorTicks),i.majorTicks.size),s=i.minorTicks.size;return this._tickDifference=n-s,i.labels.position===my&&(t=o.getRadiusX(),o.setRadiusX(t-n+s).setRadiusY(t-n+s)),this.minorTickAngles=this.normalizeTickAngles(this.tickAngles(e,i.minorUnit)),this.minorTicks=gv(o,this.minorTickAngles,i.minorUnit,i.minorTicks),r.append(this.minorTicks),r},xv.prototype.normalizeTickAngles=function(t){for(var e=this.options,i=e.majorUnit/e.minorUnit,o=t.length-1;0<=o;o--)o%i==0&&t.splice(o,1);return t},xv.prototype.tickAngles=function(t,e){var i=this.options,o=i.reverse,r=t.endAngle-t.startAngle,n=(i.max-i.min)/e,s=t.startAngle,a=r/n;o&&(s+=r,a=-a),360<=r&&i.max%e==0&&--n;for(var l=[],h=0;h<n;h++)l.push(L(s,Z)),s+=a;return L(s)<=t.endAngle&&l.push(s),l},xv.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)},xv.prototype.repositionTicks=function(t,e,i){var o=i&&this._tickDifference||0,r=this.arc,n=r.getRadiusX();i&&this.options.labels.position===my&&0!==o&&(r=this.arc.clone()).setRadiusX(n-o).setRadiusY(n-o);for(var s=0;s<t.length;s++){var a=r.pointAt(e[s]),l=t[s].segments,h=a.x-l[0].anchor().x,a=a.y-l[0].anchor().y;t[s].transform((new M.geometry.transform).translate(h,a))}};var vv,mv,$=xv;function xv(t,e){vv.call(this,0,1,t,e)}e($,{min:0,max:100,majorTicks:{size:15,align:vy,color:Y,width:.5,visible:!0},minorTicks:{size:10,align:vy,color:Y,width:.5,visible:!0},startAngle:-30,endAngle:210,labels:{position:vy,padding:2}});let _v=$,bv=((mv=M.drawing.Animation)&&(wv.__proto__=mv),((wv.prototype=Object.create(mv&&mv.prototype)).constructor=wv).prototype.step=function(t){var e=this.options,t=Xt(e.oldAngle,e.newAngle,t);this.element.transform(M.geometry.transform().rotate(t,e.center))},wv);function wv(t,e){mv.call(this,t,e);t=this.options;t.duration=Math.max(Math.abs(t.newAngle-t.oldAngle)/t.duration*1e3,1)}e(bv,{easing:gl,duration:150}),M.drawing.AnimationFactory.current.register(l,bv);let kv=bv;var Av,Sv=M.drawing.Circle,Cv=M.drawing.Group,Pv=M.drawing.Path,Ja=((Av=Ds)&&(Tv.__proto__=Av),((Tv.prototype=Object.create(Av&&Av.prototype)).constructor=Tv).prototype.setAngle=function(t){this.elements.transform(M.geometry.transform().rotate(t,this.center))},Tv.prototype.repaint=function(){var t=this.scale,e=this.options,i=t.slotAngle(e._oldValue),t=t.slotAngle(e.value);!1===e.animation.transitions?this.setAngle(t):new kv(this.elements,O(e.animation,{oldAngle:i,newAngle:t})).play()},Tv.prototype.render=function(){var t=this.scale,e=this.options,i=new Cv;return!1!==e.animation&&O(e.animation,{startAngle:0,center:t.arc.center,reverse:t.options.reverse}),i.append(this._renderNeedle(),this._renderCap()),this.elements=i,this.setAngle(yy),i},Tv.prototype.reflow=function(t){var e=this.center=t.center,i=x(this.options.length||1,.1,1.5),t=this.radius=t.getRadiusX()*i,i=this.capSize=Math.round(t*this.options.cap.size);this.bbox=M.geometry.Rect.fromPoints(new M.geometry.Point(e.x-i,e.y-i),new M.geometry.Point(e.x+i,e.y+i))},Tv.prototype._renderNeedle=function(){var t=this.scale.options.minorTicks.size,e=this.center,i=this.options.color,i=new Pv({fill:{color:i},stroke:{color:i,width:.5}});return i.moveTo(e.x+this.radius-t,e.y).lineTo(e.x,e.y-this.capSize/2).lineTo(e.x,e.y+this.capSize/2).close(),i},Tv.prototype._renderCap=function(){var t=this.options,t=t.cap.color||t.color,e=new M.geometry.Circle(this.center,this.capSize);return new Sv(e,{fill:{color:t},stroke:{color:t}})},Tv);function Tv(){Av.apply(this,arguments)}e(Ja,{cap:{size:.05},arrow:{width:16,height:14},animation:{type:l,duration:150}});let Mv=Ja;var Ov,Lv,Iv,Bv,Ev,Rv,Vv,jv=M.drawing.Group,h=((Ov=Oy)&&(zv.__proto__=Ov),((zv.prototype=Object.create(Ov&&Ov.prototype)).constructor=zv).prototype.reflow=function(t){var e=this.pointers;this.scale.reflow(t),this._initialPlotArea=this.scale.bbox;for(var i=0;i<e.length;i++)e[i].reflow(this.scale.arc),this._initialPlotArea=M.geometry.Rect.union(this._initialPlotArea,e[i].bbox);this.fitScale(t),this.alignScale(t),this._buildVisual(this.gaugeArea,e,this.scale),this._draw()},zv.prototype._buildVisual=function(t,e,i){var o=this._visuals=new jv;o.append(t),o.append(i.ticks),o.append(i.ranges),this._buildPointers(e),o.append(i.labelElements)},zv.prototype._buildPointers=function(t){for(var e=0;e<t.length;e++){var i=t[e];i.render(),this._visuals.append(i.elements),i.value(i.options.value)}},zv.prototype.fitScale=function(t){for(var e,i,o,r,n,s=this.scale.arc,a=this._initialPlotArea,a=Math.abs(this.getDiff(a,t)),l=L(a,Z),h=L(-a,Z),p=0,c=0;!(!(c++<100)||5<(p=n===o?p+1:0)||l!==r&&0<=(e=this.getPlotBox(l,t,s))&&e<=2||h!==r&&0<=(o=this.getPlotBox(h,t,s))&&o<=2||(r=0<e&&0<o?2*l:e<0&&o<0?2*h:L((l+h)/2||1,Z),0<=(i=this.getPlotBox(r,t,s))&&i<=2));)n=o,0<i?(h=r,o=i):(l=r,e=i)},zv.prototype.getPlotBox=function(t,e,i){var o=this.scale,r=this.pointers,n=i.getRadiusX(),s=i.clone();s.setRadiusX(n+t).setRadiusY(n+t),o.arc=s,o.reflow(e),this.plotBbox=o.bbox;for(var a=0;a<r.length;a++)r[a].reflow(s),this.plotBbox=M.geometry.Rect.union(this.plotBbox,r[a].bbox);return this.getDiff(this.plotBbox,e)},zv.prototype.getDiff=function(t,e){return Math.min(e.width()-t.width(),e.height()-t.height())},zv.prototype.alignScale=function(t){var e=this.plotBbox.center(),i=t.center(),o=e.x-i.x,e=e.y-i.y,r=this.scale,n=this.pointers;r.arc.center.x-=o,r.arc.center.y-=e,r.reflow(t);for(var s=0;s<n.length;s++)n[s].reflow(r.arc),this.plotBbox=M.geometry.Rect.union(r.bbox,n[s].bbox)},zv.prototype._createModel=function(){var t=this.options,e=t.pointer,i=this.scale=new _v(t.scale,this.contextService);this.pointers=[];for(var o=yt(e)?e:[e],r=0;r<o.length;r++){var n=new Mv(i,O({},o[r],{animation:{transitions:t.transitions}}));this.pointers.push(n)}},zv);function zv(){Ov.apply(this,arguments)}e(h,{transitions:!0,gaugeArea:{background:""}});let Dv=h,Fv=((Lv=_v)&&(Hv.__proto__=Lv),((Hv.prototype=Object.create(Lv&&Lv.prototype)).constructor=Hv).prototype.rangeSegments=function(){var t=this.options;return[{from:t.min,to:t.max,color:t.rangePlaceholderColor,lineCap:t.rangeLineCap}]},Hv.prototype.hasRanges=function(){return!0},Hv.prototype.placeholderRangeAngle=function(t){var e=this.ranges.children[0].geometry();this.options.reverse?e.setEndAngle(t):e.setStartAngle(t)},Hv.prototype.addRange=function(t,e,i){var o=this.options.reverse,r=this.slotAngle(o?e:t),o=this.slotAngle(o?t:e),t=this.createRange(r,o,this.getRangeRadius(),i);return this.ranges.append(t),t},Hv);function Hv(){Lv.apply(this,arguments)}e(Fv,{min:0,max:100,majorTicks:{visible:!1},minorTicks:{visible:!1},labels:{visible:!1},startAngle:0,endAngle:180,rangeLineCap:"round"});let Nv=Fv,Uv=((Iv=M.drawing.Animation)&&(Gv.__proto__=Iv),((Gv.prototype=Object.create(Iv&&Iv.prototype)).constructor=Gv).prototype.step=function(t){var e,i=this.options,o=this.startColor,r=this.color,i=Xt(i.oldAngle,i.newAngle,t);this.element.angle(i),r&&(i=L(Xt(o.r,r.r,t)),e=L(Xt(o.g,r.g,t)),o=L(Xt(o.b,r.b,t)),this.element.stroke(new M.Color(i,e,o).toHex()))},Gv);function Gv(t,e){Iv.call(this,t,e);var e=this.options,i=Math.abs(e.newAngle-e.oldAngle)/e.duration*1e3,e=(e.duration=x(i,150,800),t.elements.options.get("stroke.color")),i=t.currentColor();e!==i&&(this.startColor=new M.Color(e),this.color=new M.Color(i))}e(Uv,{easing:gl,duration:150}),M.drawing.AnimationFactory.current.register(js,Uv);let Wv=Uv,Xv=((Bv=Ds)&&(Yv.__proto__=Bv),((Yv.prototype=Object.create(Bv&&Bv.prototype)).constructor=Yv).prototype.repaint=function(){var t=this.scale,e=this.options,i=t.slotAngle(e._oldValue),t=t.slotAngle(e.value);this.animation&&this.animation.abort(),!1===e.animation.transitions?(this.angle(t),this.stroke(this.currentColor())):(this.animation=new Wv(this,O(e.animation,{oldAngle:i,newAngle:t})),this.animation.play())},Yv.prototype.angle=function(t){var e=this.elements.geometry();this.scale.options.reverse?e.setStartAngle(t):e.setEndAngle(t),this.scale.placeholderRangeAngle(t)},Yv.prototype.stroke=function(t){this.elements.stroke(t)},Yv.prototype.render=function(){var t,e;this.elements||(t=this.scale,!1!==(e=this.options).animation&&O(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}))},Yv.prototype.currentColor=function(){var t=this.scale.options,e=t.min,i=t.max,t=this.options,o=t.colors,r=t.color,t=t.value,n=m(t)?t:e;if(o)for(var s=0;s<o.length;s++){var a=o[s],l=a.color,h=a.from,a=a.to;if(void 0===a&&(a=i),(h=void 0===h?e:h)<=n&&n<=a)return l}return r},Yv.prototype.reflow=function(){this.render(),this.bbox=this.elements.bbox()},Yv);function Yv(){Bv.apply(this,arguments)}e(Xv,{animation:{type:js,duration:150}});let qv=Xv,Zv=((Ev=Dv)&&(Qv.__proto__=Ev),((Qv.prototype=Object.create(Ev&&Ev.prototype)).constructor=Qv).prototype._initTheme=function(t){Ev.prototype._initTheme.call(this,t),this.options.color=this.options.color||(this.theme.pointer||{}).color},Qv.prototype._createModel=function(){var t=this.options,e=this.scale=new Nv(t.scale,this.contextService),e=new qv(e,O({},{colors:t.colors,color:t.color,value:t.value,opacity:t.opacity,animation:{transitions:t.transitions}}));this.pointers=[e]},Qv.prototype._buildPointers=function(t){for(var e=0;e<t.length;e++){var i=t[e];i.render(),i.value(i.options.value)}},Qv.prototype._setValueOptions=function(t){this.options.value=t},Qv.prototype.currentColor=function(){var t=this.pointers[0];if(t)return t.currentColor()},Qv.prototype.centerLabelPosition=function(t,e){var i=this.getSize(),o=this.scale.arc.center,r=o.x-t/2,o=o.y-e/2;return t<i.width&&(t=r+t,r=Math.max(r,0),t>i.width)&&(r-=t-i.width),e<i.height&&(i=(t=this.scale.bbox).bottomRight().y,e=o+e,o=Math.max(o,t.origin.y),i<e)&&(o-=e-i),{left:r,top:o}},Qv);function Qv(){Ev.apply(this,arguments)}let Kv=Zv,$v=((Rv=Kv)&&(Jv.__proto__=Rv),((Jv.prototype=Object.create(Rv&&Rv.prototype)).constructor=Jv).prototype._createModel=function(){var t=this.options.scale;"number"!=typeof t.startAngle&&(t.startAngle=90),t.endAngle=t.startAngle+360,Rv.prototype._createModel.call(this)},Jv);function Jv(){Rv.apply(this,arguments)}let tm=$v,em=((Vv=M.Class)&&(im.__proto__=Vv),((im.prototype=Object.create(Vv&&Vv.prototype)).constructor=im).prototype.initProperties=function(){},im.prototype.setOptions=function(t){this.options=Object.assign({},this.options,t),this.quietZoneLength=this.options.addQuietZone?2*this.options.quietZoneLength:0},im.prototype.encode=function(t,e,i){t=k(t)?String(t):t;return this.initValue(t,e,i),this.options.addQuietZone&&this.addQuietZone(),this.addData(),this.options.addQuietZone&&this.addQuietZone(),{baseUnit:this.baseUnit,pattern:this.pattern}},im.prototype.initValue=function(){},im.prototype.addQuietZone=function(){this.pattern.push(this.options.quietZoneLength||10)},im.prototype.addData=function(){},im.prototype.invalidCharacterError=function(t){throw new Error('Character "'+t+'" is not valid for symbology '+this.name+".")},im);function im(t){Vv.call(this),this.setOptions(t),this.initProperties()}e(em,{quietZoneLength:10,addQuietZone:!0,addCheckSum:!0});var om,rm=Object.assign,i=((om=em)&&(nm.__proto__=om),((nm.prototype=Object.create(om&&om.prototype)).constructor=nm).prototype.initProperties=function(){om.prototype.initProperties.call(this),rm(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"})},nm.prototype.initValue=function(t,e){this.pattern=[],this.value=t,this.width=e,this.totalUnits=0},nm.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()},nm.prototype.setBaseUnit=function(){this.baseUnit=this.width/(this.totalUnits+this.quietZoneLength)},nm.prototype.addCheckSum=function(){var t=this.value,e=t.length,i=this.getWeightedSum(t,e,this.cCheckSumTotal)%this.checkSumMod;this.checksum=String(i),this.addPattern(this.characterMap[i]),++e>=this.kCheckSumMinLength&&(i=(i+this.getWeightedSum(t,e,this.kCheckSumTotal))%this.checkSumMod,this.checksum+=i,this.addPattern(this.characterMap[i]))},nm.prototype.getWeightedSum=function(t,e,i){for(var o=0,r=0;r<t.length;r++)o+=this.weightedValue(this.getValue(t.charAt(r)),e,r,i);return o},nm.prototype.weightedValue=function(t,e,i,o){return((e-i)%o||o)*t},nm.prototype.getValue=function(t){return isNaN(t)?(t!==this.DASH&&this.invalidCharacterError(t),this.DASH_VALUE):parseInt(t,10)},nm.prototype.addCharacter=function(t){t=this.getValue(t),t=this.characterMap[t];this.addPattern(t)},nm.prototype.addPattern=function(t){for(var e,i=0;i<t.length;i++)e=parseInt(t.charAt(i),10),this.pattern.push(e),this.totalUnits+=e},nm);function nm(){om.apply(this,arguments)}e(i,{addCheckSum:!0});var sm,am,lm=Object.assign,t=((am=em)&&(pm.__proto__=am),((pm.prototype=Object.create(am&&am.prototype)).constructor=pm).prototype.initProperties=function(){am.prototype.initProperties.call(this),lm(this,{minBaseUnitLength:.7})},pm.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()},pm.prototype.addCharacter=function(t){var e=this.characterMap[t];e||this.invalidCharacterError(t),this.addBase(e)},pm.prototype.addBase=function(){},pm),Fs=((sm=t)&&(hm.__proto__=sm),((hm.prototype=Object.create(sm&&sm.prototype)).constructor=hm).prototype.initProperties=function(){sm.prototype.initProperties.call(this),lm(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"}}})},hm.prototype.initValue=function(t,e,i){this.width=e,this.height=i,this.value=t,this.dataLength=t.length,this.pattern=[],this.patternString=""},hm.prototype.prepareValues=function(){var t,e=this.minBaseUnitLength,i=this.minRatio,o=Math.ceil(Math.max(.15*this.width,24)),r=this.maxRatio;if(this.height<o)throw new Error("Insufficient height for Code39 encoding: the current height is "+this.height+"px and the minimum height is "+o+"px.");for(t=this.getBaseUnit(r);t<e&&i<r;)r=parseFloat((r-.1).toFixed(1)),t=this.getBaseUnit(r);if(t<e)throw o=Math.ceil(this.getBaseWidth(i)*e),new Error("Insufficient width for Code39 encoding: the current width is "+this.width+'px and the minimum width for value "'+this.value+'" is '+o+"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))},hm.prototype.getBaseUnit=function(t){return this.width/this.getBaseWidth(t)},hm.prototype.getBaseWidth=function(t){return this.quietZoneLength+3*(t+2)*(this.dataLength+2)+this.gapWidth*(this.dataLength+1)},hm.prototype.addStart=function(){this.addPattern(this.characterMap.START.pattern),this.addCharacterGap()},hm.prototype.addBase=function(t){this.addPattern(t.pattern),this.addCharacterGap()},hm.prototype.addStop=function(){this.addPattern(this.characterMap.START.pattern)},hm.prototype.addPattern=function(t){for(var e=0;e<t.length;e++)this.patternString+=this.patternMappings[t.charAt(e)]},hm.prototype.addCharacterGap=function(){this.patternString+=this.gapWidth+this.splitCharacter},hm);function hm(){sm.apply(this,arguments)}function pm(){am.apply(this,arguments)}e(Fs,{addCheckSum:!1});var cm,um,dm,fm,gm,ym,vm,mm,xm,_m,bm,wm={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,i=0;i<this.extendedMappings.length;i++)if(e=this.extendedMappings[i].call(this,t)){for(var o=0;o<e.length;o++){var r=e[o];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 i=[],o=0;o<this.specialAsciiCodes[t].length;o++)i.push(this.characterMap[this.shiftCharacters[3]]),i.push(this.characterMap[this.specialAsciiCodes[t][o]]);else e=6*Math.floor(t/32)+(t-27)%32+64,i=[this.characterMap[this.shiftCharacters[3]],this.characterMap[String.fromCharCode(e)]];return i}],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"]},zs=((ym=Fs)&&(Rm.__proto__=ym),((Rm.prototype=Object.create(ym&&ym.prototype)).constructor=Rm).prototype.initProperties=function(){ym.prototype.initProperties.call(this),O(this,wm,{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}}})},Rm),km=Object.assign,$=((gm=t)&&(Em.__proto__=gm),((Em.prototype=Object.create(gm&&gm.prototype)).constructor=Em).prototype.initProperties=function(){gm.prototype.initProperties.call(this),km(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"}})},Em.prototype.initValue=function(t,e,i){this.value=t,this.width=e,this.height=i,this.pattern=[],this.values=[],this.dataLength=t.length},Em.prototype.prepareValues=function(){var t=Math.ceil(Math.max(.15*this.width,24));if(this.height<t)throw new Error("Insufficient height for Code93 encoding: the current height is "+this.height+"px, the minimum required height is "+t+"px.");if(this.setBaseUnit(),this.baseUnit<this.minBaseUnitLength)throw t=Math.ceil(this.minBaseUnitLength*(this.width/this.baseUnit)),new Error("Insufficient width for Code93 encoding: the current width is "+this.width+'px and the minimum required width for value "'+this.value+'" is '+t+"px.")},Em.prototype.setBaseUnit=function(){this.baseUnit=this.width/(9*(this.dataLength+2+2)+this.quietZoneLength+1)},Em.prototype.addStart=function(){var t=this.characterMap.START.pattern;this.addPattern(t)},Em.prototype.addStop=function(){this.addStart(),this.pattern.push(this.characterMap.TERMINATION_BAR)},Em.prototype.addBase=function(t){this.addPattern(t.pattern),this.values.push(t.value)},Em.prototype.pushCheckSum=function(){var t,e=this._getCheckValues();this.checksum=e.join("");for(var i=0;i<e.length;i++)t=this.characterMap[this._findCharacterByValue(e[i])],this.addPattern(t.pattern)},Em.prototype._getCheckValues=function(){for(var t,e=this.values,i=e.length,o=0,r=i-1;0<=r;r--)o+=this.weightedValue(e[r],i-r,this.cCheckSumTotal);for(t=o%this.checkSumMod,o=this.weightedValue(t,1,this.kCheckSumTotal),r=i-1;0<=r;r--)o+=this.weightedValue(e[r],i-r+1,this.kCheckSumTotal);return[t,o%this.checkSumMod]},Em.prototype._findCharacterByValue=function(t){for(var e in this.characterMap)if(this.characterMap[e].value===t)return e},Em.prototype.weightedValue=function(t,e,i){return(e%i||i)*t},Em.prototype.addPattern=function(t){for(var e,i=0;i<t.length;i++)e=parseInt(t.charAt(i),10),this.pattern.push(e)},Em),l=((fm=$)&&(Bm.__proto__=fm),((Bm.prototype=Object.create(fm&&fm.prototype)).constructor=Bm).prototype.initProperties=function(){fm.prototype.initProperties.call(this),O(this,wm,{name:"Code 93 extended",pushCheckSum:function(){var t=this._getCheckValues();this.checksum=t.join("");for(var e,i=0;i<t.length;i++)e=t[i],this.shiftValuesAsciiCodes[e]?this.addExtended(this.shiftValuesAsciiCodes[e]):(e=this._findCharacterByValue(e),this.addPattern(this.characterMap[e].pattern))}})},Bm),Am=/^\d+$/,Sm=Object.assign,Ja=((dm=em)&&(Im.__proto__=dm),((Im.prototype=Object.create(dm&&dm.prototype)).constructor=Im).prototype.initProperties=function(){dm.prototype.initProperties.call(this),Sm(this,{name:"Postnet",START:"2",VALID_CODE_LENGTHS:[5,9,11],DIGIT_SEPARATOR:"-",characterMap:["22111","11122","11212","11221","12112","12121","12211","21112","21121","21211"]})},Im.prototype.initValue=function(t,e,i){this.height=i,this.width=e,this.baseHeight=i/2,this.value=t.replace(new RegExp(this.DIGIT_SEPARATOR,"g"),""),this.pattern=[],this.validate(this.value),this.checkSum=0,this.setBaseUnit()},Im.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()},Im.prototype.addCharacter=function(t){var e=this.characterMap[t];this.checkSum+=parseInt(t,10),this.addPattern(e)},Im.prototype.addCheckSum=function(){this.checksum=(10-this.checkSum%10)%10,this.addCharacter(this.checksum)},Im.prototype.setBaseUnit=function(){this.baseUnit=this.width/(10*(this.value.length+1)+3+this.quietZoneLength)},Im.prototype.validate=function(t){if(Am.test(t)||this.invalidCharacterError(t.match(/[^0-9]/)[0]),!u(t.length,this.VALID_CODE_LENGTHS))throw new Error("Invalid value length. Valid lengths for the Postnet symbology are "+this.VALID_CODE_LENGTHS.join(",")+".")},Im.prototype.addPattern=function(t){for(var e,i=0;i<t.length;i++)e=this.height-this.baseHeight*t.charAt(i),this.pattern.push({width:1,y1:e,y2:this.height}),this.pattern.push(1)},Im),Cm=/^\d+$/,Pm=/^[a-z0-9]+$/i,Tm=Object.assign,h=((um=M.Class)&&(Lm.__proto__=um),((Lm.prototype=Object.create(um&&um.prototype)).constructor=Lm).prototype.initProperties=function(){},Lm.prototype.addStart=function(){},Lm.prototype.is=function(){},Lm.prototype.isCode=function(){return!1},Lm.prototype.move=function(){},Lm.prototype.pushState=function(){},Lm),gl=((cm=h)&&(Om.__proto__=cm),((Om.prototype=Object.create(cm&&cm.prototype)).constructor=Om).prototype.initProperties=function(){cm.prototype.initProperties.call(this),O(this,{FNC4:"FNC4",SHIFT:98})},Om.prototype.addStart=function(){this.encoding.addPattern(this.START)},Om.prototype.is=function(t,e){t=t.charCodeAt(e);return this.isCode(t)},Om.prototype.move=function(t){for(var e=0;!this._moves[e].call(this,t)&&e<this._moves.length;)e++},Om.prototype.pushState=function(t){var e,i=this.states,o=t.value,r=o.length;for(u("C",i)&&(i=o.substr(t.index).match(/\d{4,}/g))&&(r=o.indexOf(i[0],t.index));0<=(e=t.value.charCodeAt(t.index))&&this.isCode(e)&&t.index<r;)this.encoding.addPattern(this.getValue(e)),t.index++},Om.prototype._initMoves=function(t){this._moves=[],u(this.FNC4,t)&&this._moves.push(this._moveFNC),u(this.shiftKey,t)&&this._moves.push(this._shiftState),this._moves.push(this._moveState)},Om.prototype._moveFNC=function(t){if(t.fnc)return t.fnc=!1,t.previousState===this.key},Om.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},Om.prototype._moveState=function(){return this.encoding.addPattern(this.MOVE),!0},Om),Mm={};function Om(t,e){cm.call(this,t),this.states=e,this._initMoves(e)}function Lm(t){um.call(this),this.encoding=t,this.initProperties()}function Im(){dm.apply(this,arguments)}function Bm(){fm.apply(this,arguments)}function Em(){gm.apply(this,arguments)}function Rm(){ym.apply(this,arguments)}function Vm(t,e){vm.call(this,t),this.states=e}function jm(t,e){mm.call(this,t),this._initSubStates(e)}function zm(){xm.apply(this,arguments)}function Dm(){_m.apply(this,arguments)}function Fm(){bm.apply(this,arguments)}Mm.A=((bm=gl)&&(Fm.__proto__=bm),((Fm.prototype=Object.create(bm&&bm.prototype)).constructor=Fm).prototype.initProperties=function(){bm.prototype.initProperties.call(this),Tm(this,{key:"A",shiftKey:"B",MOVE:101,START:103})},Fm.prototype.isCode=function(t){return 0<=t&&t<96},Fm.prototype.getValue=function(t){return t<32?t+64:t-32},Fm),Mm.B=((_m=gl)&&(Dm.__proto__=_m),((Dm.prototype=Object.create(_m&&_m.prototype)).constructor=Dm).prototype.initProperties=function(){_m.prototype.initProperties.call(this),Tm(this,{key:"B",shiftKey:"A",MOVE:100,START:104})},Dm.prototype.isCode=function(t){return 32<=t&&t<128},Dm.prototype.getValue=function(t){return t-32},Dm),Mm.C=((xm=h)&&(zm.__proto__=xm),((zm.prototype=Object.create(xm&&xm.prototype)).constructor=zm).prototype.initProperties=function(){xm.prototype.initProperties.call(this),Tm(this,{key:"C",MOVE:99,START:105})},zm.prototype.addStart=function(){this.encoding.addPattern(this.START)},zm.prototype.is=function(t,e){var i=Jm(t,e,4);return(e+4<=t.length||2===t.length)&&Cm.test(i)},zm.prototype.move=function(){this.encoding.addPattern(this.MOVE)},zm.prototype.pushState=function(t){for(var e;(e=Jm(t.value,t.index,2))&&Cm.test(e)&&2===e.length;)this.encoding.addPattern(parseInt(e,10)),t.index+=2},zm.prototype.getValue=function(t){return t},zm),Mm.FNC4=((mm=h)&&(jm.__proto__=mm),((jm.prototype=Object.create(mm&&mm.prototype)).constructor=jm).prototype.initProperties=function(){mm.prototype.initProperties.call(this),Tm(this,{key:"FNC4",dependentStates:["A","B"]})},jm.prototype.addStart=function(t){t=t.value.charCodeAt(0)-128,t=this._getSubState(t);this.encoding[t].addStart()},jm.prototype.is=function(t,e){t=t.charCodeAt(e);return this.isCode(t)},jm.prototype.isCode=function(t){return 128<=t&&t<256},jm.prototype.pushState=function(t){var e,i=this._initSubState(t),o=this.encoding,r=i.value.length;if(t.index+=r,r<3)for(;i.index<r;i.index++)e=i.value.charCodeAt(i.index),i.state=this._getSubState(e),i.previousState!==i.state&&(i.previousState=i.state,o[i.state].move(i)),o.addPattern(o[i.state].MOVE),o.addPattern(o[i.state].getValue(e));else i.state!==i.previousState&&o[i.state].move(i),this._pushStart(i),o.pushData(i,this.subStates),t.index<t.value.length&&this._pushStart(i);t.fnc=!0,t.state=i.state},jm.prototype._pushStart=function(t){this.encoding.addPattern(this.encoding[t.state].MOVE),this.encoding.addPattern(this.encoding[t.state].MOVE)},jm.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},jm.prototype._initSubStates=function(t){this.subStates=[];for(var e=0;e<t.length;e++)u(t[e],this.dependentStates)&&this.subStates.push(t[e])},jm.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]},jm.prototype._getAll=function(t,e){for(var i,o="",r=e;(i=t.charCodeAt(r++))&&this.isCode(i);)o+=String.fromCharCode(i-128);return o},jm),Mm.FNC1=((vm=h)&&(Vm.__proto__=vm),((Vm.prototype=Object.create(vm&&vm.prototype)).constructor=Vm).prototype.initProperties=function(){vm.prototype.initProperties.call(this),Tm(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})},Vm.prototype.addStart=function(){this.encoding[this.startState].addStart()},Vm.prototype.is=function(){return u(this.key,this.states)},Vm.prototype.pushState=function(t){var e,i,o,r=this.encoding,n=t.value.replace(/\s/g,""),s=new RegExp("["+this.startAI+this.endAI+"]","g"),a=t.index,l={state:this.startState};for(r.addPattern(this.START);;){if((e=(l.index=0)<(o=n.charAt(a)===this.startAI?2:0)?this.getBySeparator(n,a):this.getByLength(n,a)).ai.length)i=a+o+e.id.length+e.ai.length;else if((i=n.indexOf(this.startAI,a+1))<0){if(a+e.ai.max+e.id.length+o<n.length)throw new Error("Separators are required after variable length identifiers");i=n.length}if(l.value=n.substring(a,i).replace(s,""),this.validate(e,l.value),r.pushData(l,this.dependentStates),i>=n.length)break;a=i,l.state!==this.startState&&(r[this.startState].move(l),l.state=this.startState),e.ai.length||r.addPattern(this.START)}t.index=t.value.length},Vm.prototype.validate=function(t,e){var e=e.substr(t.id.length),i=t.ai;if(!i.type&&!Cm.test(e))throw new Error("Application identifier "+t.id+" is numeric only but contains non numeric character(s).");if("alphanumeric"===i.type&&!Pm.test(e))throw new Error("Application identifier "+t.id+" is alphanumeric only but contains non alphanumeric character(s).");if(i.length&&i.length!==e.length)throw new Error("Application identifier "+t.id+" must be "+i.length+" characters long.");if(i.min&&i.min>e.length)throw new Error("Application identifier "+t.id+" must be at least "+i.min+" characters long.");if(i.max&&i.max<e.length)throw new Error("Application identifier "+t.id+" must be at most "+i.max+" characters long.")},Vm.prototype.getByLength=function(t,e){for(var i,o,r=2;r<=4;r++)if(i=Jm(t,e,r),o=this.getApplicationIdentifier(i)||this.getApplicationIdentifier(i.substring(0,i.length-1)))return{id:i,ai:o};this.unsupportedAIError(i)},Vm.prototype.unsupportedAIError=function(t){throw new Error("'"+t+"' is not a supported Application Identifier")},Vm.prototype.getBySeparator=function(t,e){var e=t.indexOf(this.startAI,e),i=t.indexOf(this.endAI,e),t=t.substring(e+1,i),e=this.getApplicationIdentifier(t)||this.getApplicationIdentifier(t.substr(t.length-1));return e||this.unsupportedAIError(t),{ai:e,id:t}},Vm.prototype.getApplicationIdentifier=function(t){var e=this.applicationIdentifiers,i=e.multiKey;if(e[t])return e[t];for(var o=0;o<i.length;o++){if(i[o].ids&&u(t,i[o].ids))return i[o].type;if(i[o].ranges)for(var r=i[o].ranges,n=0;n<r.length;n++)if(r[n][0]<=t&&t<=r[n][1])return i[o].type}},Vm);(Xm=em)&&($m.__proto__=Xm),(($m.prototype=Object.create(Xm&&Xm.prototype)).constructor=$m).prototype.initProperties=function(){Xm.prototype.initProperties.call(this),Tm(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})},$m.prototype._initStates=function(){for(var t=0;t<this.states.length;t++)this[this.states[t]]=new Mm[this.states[t]](this,this.states)},$m.prototype.initValue=function(t,e,i){this.pattern=[],this.value=t,this.width=e,this.height=i,this.checkSum=0,this.totalUnits=0,this.index=0,this.position=1},$m.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())},$m.prototype.pushData=function(t,e){for(;this[t.state].pushState(t),!(t.index>=t.value.length);){var i;t.shifted?(i=t.state,t.state=t.previousState,t.previousState=i,t.shifted=!1):(t.previousState=t.state,t.state=this.getNextState(t,e),this[t.state].move(t))}},$m.prototype.addStart=function(t){this[t.state].addStart(t),this.position=1},$m.prototype.addCheckSum=function(){this.checksum=this.checkSum%103,this.addPattern(this.checksum)},$m.prototype.addStop=function(){this.addPattern(this.STOP)},$m.prototype.setBaseUnit=function(){this.baseUnit=this.width/(this.totalUnits+this.quietZoneLength)},$m.prototype.addPattern=function(t){for(var e,i=this.characterMap[t].toString(),o=0;o<i.length;o++)e=parseInt(i.charAt(o),10),this.pattern.push(e),this.totalUnits+=e;this.checkSum+=t*this.position++},$m.prototype.getNextState=function(t,e){for(var i=0;i<e.length;i++)if(this[e[i]].is(t.value,t.index))return e[i];this.invalidCharacterError(t.value.charAt(t.index))};var Hm,Nm,Um,Gm,Wm,Xm,Ds=$m,js=((Wm=Ds)&&(Km.__proto__=Wm),((Km.prototype=Object.create(Wm&&Wm.prototype)).constructor=Km).prototype.initProperties=function(){Wm.prototype.initProperties.call(this),Tm(this,{name:"Code 128 A",states:["A"]})},Km),t=((Gm=Ds)&&(Qm.__proto__=Gm),((Qm.prototype=Object.create(Gm&&Gm.prototype)).constructor=Qm).prototype.initProperties=function(){Gm.prototype.initProperties.call(this),Tm(this,{name:"Code 128 B",states:["B"]})},Qm),gl=((Um=Ds)&&(Zm.__proto__=Um),((Zm.prototype=Object.create(Um&&Um.prototype)).constructor=Zm).prototype.initProperties=function(){Um.prototype.initProperties.call(this),Tm(this,{name:"Code 128 C",states:["C"]})},Zm),h=((Nm=Ds)&&(qm.__proto__=Nm),((qm.prototype=Object.create(Nm&&Nm.prototype)).constructor=qm).prototype.initProperties=function(){Nm.prototype.initProperties.call(this),Tm(this,{name:"Code 128",states:["C","B","A","FNC4"]})},qm),Ds=((Hm=Ds)&&(Ym.__proto__=Hm),((Ym.prototype=Object.create(Hm&&Hm.prototype)).constructor=Ym).prototype.initProperties=function(){Hm.prototype.initProperties.call(this),Tm(this,{name:"Code GS1-128",states:["FNC1","C","B"]})},Ym);function Ym(){Hm.apply(this,arguments)}function qm(){Nm.apply(this,arguments)}function Zm(){Um.apply(this,arguments)}function Qm(){Gm.apply(this,arguments)}function Km(){Wm.apply(this,arguments)}function $m(t){Xm.call(this,t),this._initStates()}function Jm(t,e,i){return t.substring(e,e+i)}var tx,ex,ix,ox,rx,nx,sx,ax=Object.assign,lx=((sx=em)&&(Ax.__proto__=sx),((Ax.prototype=Object.create(sx&&sx.prototype)).constructor=Ax).prototype.initProperties=function(){sx.prototype.initProperties.call(this),ax(this,{characterMap:["12121212","12121221","12122112","12122121","12211212","12211221","12212112","12212121","21121212","21121221"],START:"21",STOP:"121",checkSumType:"",checkSums:ux})},Ax.prototype.initValue=function(t,e){this.pattern=[],this.value=t,this.checkSumLength=0,this.width=e},Ax.prototype.setBaseUnit=function(){this.baseUnit=this.width/(12*(this.value.length+this.checkSumLength)+this.quietZoneLength+7)},Ax.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()},Ax.prototype.addCharacter=function(t){var e=this.characterMap[t];e||this.invalidCharacterError(t),this.addPattern(e)},Ax.prototype.addPattern=function(t){for(var e=0;e<t.length;e++)this.pattern.push(parseInt(t.charAt(e),10))},Ax.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]])},Ax),hx=((nx=lx)&&(kx.__proto__=nx),((kx.prototype=Object.create(nx&&nx.prototype)).constructor=kx).prototype.initProperties=function(){nx.prototype.initProperties.call(this),ax(this,{name:"MSI Modulo10",checkSumType:"Modulo10"})},kx),px=((rx=lx)&&(wx.__proto__=rx),((wx.prototype=Object.create(rx&&rx.prototype)).constructor=wx).prototype.initProperties=function(){rx.prototype.initProperties.call(this),ax(this,{name:"MSI Modulo11",checkSumType:"Modulo11"})},wx),cx=((ox=lx)&&(bx.__proto__=ox),((bx.prototype=Object.create(ox&&ox.prototype)).constructor=bx).prototype.initProperties=function(){ox.prototype.initProperties.call(this),ax(this,{name:"MSI Modulo10 Modulo10",checkSumType:"Modulo10Modulo10"})},bx),lx=((ix=lx)&&(_x.__proto__=ix),((_x.prototype=Object.create(ix&&ix.prototype)).constructor=_x).prototype.initProperties=function(){ix.prototype.initProperties.call(this),ax(this,{name:"MSI Modulo11 Modulo10",checkSumType:"Modulo11Modulo10"})},_x),ux={Modulo10:function(t){for(var e,i,o=[0,""],r=t.length%2,n=0;n<t.length;n++)o[(n+r)%2]+=parseInt(t.charAt(n),10);for(i=o[0],e=(2*o[1]).toString(),n=0;n<e.length;n++)i+=parseInt(e.charAt(n),10);return[(10-i%10)%10]},Modulo11:function(t){for(var e,i=0,o=t.length,r=0;r<o;r++)i+=(((o-r)%6||6)+1)*t.charAt(r);return 10!=(e=(11-i%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))}},dx=Object.assign,fx=((ex=em)&&(xx.__proto__=ex),((xx.prototype=Object.create(ex&&ex.prototype)).constructor=xx).prototype.initProperties=function(){ex.prototype.initProperties.call(this),dx(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]}})},xx.prototype.initValue=function(t,e,i){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=i,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},xx.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)},xx.prototype.addSide=function(t,e){for(var i=0;i<t.length;i++)e&&parseInt(this.keyTable[e].charAt(i),10)?this.addPieces(Array.prototype.slice.call(this.characterMap.digits[t.charAt(i)]).reverse(),!0):this.addPieces(this.characterMap.digits[t.charAt(i)],!0)},xx.prototype.addPieces=function(t,e){for(var i=0;i<t.length;i++)e?this.pattern.push({y1:0,y2:.95*this.options.height,width:t[i]}):this.pattern.push(t[i])},xx.prototype.calculateChecksum=function(){for(var t=0,e=0,i=this.value.split("").reverse().join(""),o=0;o<i.length;o++)o%2?e+=parseInt(i.charAt(o),10):t+=parseInt(i.charAt(o),10);return(10-(3*t+e)%10)%10},xx),gx=Object.assign,yx=((tx=fx)&&(mx.__proto__=tx),((mx.prototype=Object.create(tx&&tx.prototype)).constructor=mx).prototype.initProperties=function(){tx.prototype.initProperties.call(this),gx(this,{name:"EAN 8"})},mx.prototype.initValue=function(t,e,i){if(7!==t.length||/\D/.test(t))throw new Error("Invalid value provided");this.value=t,this.options.height=i,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)},mx),vx={code11:i,code39:Fs,code39extended:zs,code93:$,code93extended:l,code128:h,code128a:js,code128b:t,code128c:gl};function mx(){tx.apply(this,arguments)}function xx(){ex.apply(this,arguments)}function _x(){ix.apply(this,arguments)}function bx(){ox.apply(this,arguments)}function wx(){rx.apply(this,arguments)}function kx(){nx.apply(this,arguments)}function Ax(){sx.apply(this,arguments)}function Sx(t,e){var i=t.style.display,e=("canvas"===e&&(t.style.display="block"),{width:t.clientWidth,height:t.clientHeight});return t.style.display=i,e}vx["gs1-128"]=Ds,vx.msimod10=hx,vx.msimod11=px,vx.msimod1010=cx,vx.msimod1110=lx,vx.postnet=Ja,vx.ean8=yx,vx.ean13=fx;(Cx=M.Class)&&(Px.__proto__=Cx),((Px.prototype=Object.create(Cx&&Cx.prototype)).constructor=Px).prototype.destroy=function(){this._destroySurface()},Px.prototype._initElement=function(){vt(this.element,"k-barcode")},Px.prototype._initSurface=function(){var t=this.options,e=this.surface;e&&e.options.type===t.renderAs||(this._destroySurface(),this._initSurfaceElement(),this.surface=this._createSurface())},Px.prototype._createSurface=function(){return M.drawing.Surface.create(this.surfaceElement,{type:this.options.renderAs})},Px.prototype._destroySurface=function(){this.surface&&(this.surface.destroy(),this.surface=null,this._destroySurfaceElement())},Px.prototype._initSurfaceElement=function(){this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.surfaceElement.style.position="relative",this.element.appendChild(this.surfaceElement))},Px.prototype._destroySurfaceElement=function(){this.surfaceElement&&this.surfaceElement.parentNode&&(this.surfaceElement.parentNode.removeChild(this.surfaceElement),this.surfaceElement=null)},Px.prototype.setOptions=function(t){this._setOptions(t),this._initSurface(),this.redraw()},Px.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)},Px.prototype.getSize=function(){return{width:this.element.offsetWidth,height:this.element.offsetHeight}},Px.prototype._resize=function(){this.redraw()},Px.prototype.createVisual=function(){this.visual=this._render()},Px.prototype._render=function(){var t,e=this.options,i=e.value,o=e.text,r=w(o.margin),n=this._getSize(),s=e.border||{},a=this.encoding,s=new I(0,0,n.width,n.height).unpad(s.width).unpad(e.padding),l=s.height(),h=new M.drawing.Group;this.contentBox=s,h.append(this._getBackground(n)),o.visible&&(l-=M.drawing.util.measureText(i,{font:o.font}).height+r.top+r.bottom);try{t=a.encode(i,s.width(),l)}catch(t){return this.onError(t),h}return o.visible&&(n=i,e.checksum&&k(a.checksum)&&(n+=" "+a.checksum),h.append(this._getText(n))),this.barHeight=l,this._bandsGroup=this._getBands(t.pattern,t.baseUnit),h.append(this._bandsGroup),h},Px.prototype.exportVisual=function(){return this._render()},Px.prototype._getSize=function(){var t=Sx(this.element,this.options.renderAs),e=new M.geometry.Size(300,100);return 0<t.width&&(e.width=t.width),0<t.height&&(e.height=t.height),this.options.width&&(e.width=this.options.width),this.options.height&&(e.height=this.options.height),e},Px.prototype.value=function(t){if(!k(t))return this.options.value;this.options.value=String(t),this.redraw()},Px.prototype._getBands=function(t,e){for(var i=this.contentBox,o=i.x1,r=new M.drawing.Group,n=0;n<t.length;n++){var s,a=(s=Ot(t[n])?t[n]:{width:t[n],y1:0,y2:this.barHeight}).width*e;n%2&&(s=M.geometry.Rect.fromPoints(new M.geometry.Point(o,s.y1+i.y1),new M.geometry.Point(o+a,s.y2+i.y1)),s=M.drawing.Path.fromRect(s,{fill:{color:this.options.color},stroke:null}),r.append(s)),o+=a}return r},Px.prototype._getBackground=function(t){var e=this.options,i=e.border||{},t=new I(0,0,t.width,t.height).unpad(i.width/2);return M.drawing.Path.fromRect(t.toRect(),{fill:{color:e.background},stroke:{color:i.width?i.color:"",width:i.width,dashType:i.dashType}})},Px.prototype._getText=function(t){var e=this.options.text,t=this._textbox=new So(t,{font:e.font,color:e.color,align:"center",vAlign:"bottom",margin:e.margin});return t.reflow(this.contentBox),t.renderVisual(),t.visual},Px.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),!vx[this.type])throw new Error("Encoding '"+this.type+"' is not supported.");this.encoding=new vx[this.type],this.options=O({},this.options,t)};var Cx,i=Px;function Px(t,e,i){void 0===i&&(i=Re),Cx.call(this),this.options=O({},this.options,e),this.element=t,this.onError=i,this._initElement(),this._initSurface(),this._setOptions(e),e&&k(e.value)&&this.redraw()}e(i,{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}});let Tx=i;var Mx={width:500,height:100};let Ox=function(t,e){if(void 0===e&&(e=Mx),!t)throw new Error("Please specify barcode type to validate.");var i,o,r,n=t.toLowerCase(),s="";if("upca"===n?(n="ean13",s="0"):"upce"===n&&(n="ean8",s="0"),vx[n])return i=new vx[n],o=e,r=s,function(t){try{i.encode(r+t,o.width,o.height)}catch(t){return{valid:!1,error:t}}return{valid:!0}};throw new Error("Encoding '"+t+"' is not supported.")};var Lx=Object.assign;function Ix(t,e){for(var i=[],o=0;o<t.length;)i.push(t.substring(o,o+e)),o+=e;return i}function Bx(t,e){t=Number(t).toString(2);return t=t.length<e?new Array(e-t.length+1).join(0)+t:t}function Ex(t){return parseInt(t,2)}(Vx=M.Class)&&(Wx.__proto__=Vx),((Wx.prototype=Object.create(Vx&&Vx.prototype)).constructor=Wx).prototype.move=function(){this.row+=this.dir*this.c,this.c^=1,this.column=this.startColumn-this.c},Wx.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}},Wx.prototype.getNextRemainderCell=function(){if(this.move(),void 0===this.matrix[this.row][this.column])return{row:this.row,column:this.column}};var Rx,Vx,jx=Wx,zx=((Rx=M.Class)&&(Gx.__proto__=Rx),(Gx.prototype=Object.create(Rx&&Rx.prototype)).constructor=Gx),Dx="alphanumeric",Fx=/^\d+/,Fs="A-Z0-9 $%*+./:-",Hx=new RegExp("^[A-Z $%*+./:-]+"),Nx=new RegExp("^["+Fs+"]+"),Ux=new RegExp("^[^"+Fs+"]+");function Gx(t,e){Rx.call(this),this.dataString=t,this.version=e}function Wx(t){Vx.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}function Xx(t,e,i,o,r){var n,s=Fx.exec(t),s=s?s[0]:"",a=Hx.exec(t),a=a?a[0]:"",l=Nx.exec(t),l=l?l[0]:"",e=s&&(s.length>=e||t.length===s.length||s.length>=i&&!Nx.test(t.charAt(s.length)))?(n="numeric",s):l&&(t.length===l.length||l.length>=o||r===Dx)?(n=Dx,s||a):(n="byte",l?l+Ux.exec(t.substring(l.length))[0]:Ux.exec(t)[0]);return{mode:n,modeString:e}}(Qx=M.Class)&&(e_.__proto__=Qx),((e_.prototype=Object.create(Qx&&Qx.prototype)).constructor=e_).prototype.initProperties=function(){Lx(this,{modeIndicator:"",bitsInCharacterCount:[]})},e_.prototype.getVersionIndex=function(t){return t<10?0:26<t?2:1},e_.prototype.getBitsCharacterCount=function(t){return this.bitsInCharacterCount[this.getVersionIndex(t||40)]},e_.prototype.getModeCountString=function(t,e){return this.modeIndicator+Bx(t,this.getBitsCharacterCount(e))},e_.prototype.encode=function(){},e_.prototype.getStringBitsLength=function(){},e_.prototype.getValue=function(){};var Yx,qx,Zx,Qx,zs=e_,$=((Zx=zs)&&(t_.__proto__=Zx),((t_.prototype=Object.create(Zx&&Zx.prototype)).constructor=t_).prototype.initProperties=function(){Zx.prototype.initProperties.call(this),Lx(this,{bitsInCharacterCount:[10,12,14],modeIndicator:"0001"})},t_.prototype.getValue=function(t){return parseInt(t,10)},t_.prototype.encode=function(t,e){for(var i=Ix(t,3),o=this.getModeCountString(t.length,e),r=0;r<i.length-1;r++)o+=Bx(i[r],10);return o+Bx(i[r],1+3*i[r].length)},t_.prototype.getStringBitsLength=function(t,e){var i=t%3;return 4+this.getBitsCharacterCount(e)+10*Math.floor(t/3)+3*i+(0==i?0:1)},t_),l=((qx=zs)&&(Jx.__proto__=qx),((Jx.prototype=Object.create(qx&&qx.prototype)).constructor=Jx).prototype.initProperties=function(){qx.prototype.initProperties.call(this),Lx(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"})},Jx.prototype.getValue=function(t){return this.characters[t]},Jx.prototype.encode=function(t,e){for(var i=Ix(t,2),o=this.getModeCountString(t.length,e),r=0;r<i.length-1;r++)o+=Bx(45*this.getValue(i[r].charAt(0))+this.getValue(i[r].charAt(1)),11);return o+Bx(2===i[r].length?45*this.getValue(i[r].charAt(0))+this.getValue(i[r].charAt(1)):this.getValue(i[r].charAt(0)),1+5*i[r].length)},Jx.prototype.getStringBitsLength=function(t,e){return 4+this.getBitsCharacterCount(e)+11*Math.floor(t/2)+t%2*6},Jx),h=((Yx=zs)&&($x.__proto__=Yx),(($x.prototype=Object.create(Yx&&Yx.prototype)).constructor=$x).prototype.initProperties=function(){Yx.prototype.initProperties.call(this),Lx(this,{bitsInCharacterCount:[8,16,16],modeIndicator:"0100"})},$x.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+'".')},$x.prototype.encode=function(t,e){for(var i=this.getModeCountString(t.length,e),o=0;o<t.length;o++)i+=Bx(this.getValue(t.charAt(o)),8);return i},$x.prototype.getStringBitsLength=function(t,e){return 4+this.getBitsCharacterCount(e)+8*t},$x),Kx={};function $x(){Yx.apply(this,arguments)}function Jx(){qx.apply(this,arguments)}function t_(){Zx.apply(this,arguments)}function e_(){Qx.call(this),this.initProperties()}Kx.numeric=new $,Kx.alphanumeric=new l,Kx.byte=new h;var i_=[{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}}];function o_(t,e){for(var i=0,o=i_.length-1,r=Math.floor(i_.length/2);t<i_[r][e].totalDataCodewords?o=r:i=r,r=i+Math.floor((o-i)/2),1<o-i;);return t<=i_[i][e].totalDataCodewords?r+1:o+1}(n_=M.Class)&&(m_.__proto__=n_),((m_.prototype=Object.create(n_&&n_.prototype)).constructor=m_).prototype.getEncodingResult=function(n,t){var e=(()=>{var t,e=[],i=0,o=n;for(e.push(Xx(o,8,5,8,t)),t=e[0].mode,o=o.substr(e[0].modeString.length);0<o.length;){var r=Xx(o,17,9,16,t);r.mode!==t?(t=r.mode,e.push(r),i++):e[i].modeString+=r.modeString,o=o.substr(r.modeString.length)}return e})(),t=o_((t=>{for(var e=0,i=0;i<t.length;i++)e+=Kx[t[i].mode].getStringBitsLength(t[i].modeString.length);return Math.ceil(e/8)})(e),t),e=((t,e)=>{for(var i="",o=0;o<t.length;o++)i+=Kx[t[o].mode].encode(t[o].modeString,e);return i})(e,t);return new zx(e,t)};var r_,n_,s_=m_,a_=((r_=M.Class)&&(v_.__proto__=r_),((v_.prototype=Object.create(r_&&r_.prototype)).constructor=v_).prototype.initProperties=function(){Lx(this,{encodingMode:"byte",utfBOM:"111011111011101110111111",initialModeCountStringLength:20,ranges:[128,2048,65536,2097152,67108864]})},v_.prototype.getEncodingResult=function(t,e){t=this.encode(t),e=o_(this.getDataCodewordsCount(t),e),t=this.mode.getModeCountString(t.length/8,e)+t;return new zx(t,e)},v_.prototype.getDataCodewordsCount=function(t){t=t.length;return Math.ceil((this.initialModeCountStringLength+t)/8)},v_.prototype.encode=function(t){for(var e=this.utfBOM,i=0;i<t.length;i++)e+=this.encodeCharacter(t.charCodeAt(i));return e},v_.prototype.encodeCharacter=function(t){var e=this.getBytesCount(t),i=e-1,o="";if(1===e)o=Bx(t,8);else{for(var e=8-e,r=0;r<i;r++)o=Bx(t>>6*r&63|128,8)+o;o=(t>>6*i|255>>e<<e).toString(2)+o}return o},v_.prototype.getBytesCount=function(t){for(var e=this.ranges,i=0;i<e.length;i++)if(t<e[i])return i+1},v_),l_={1:0},h_={0:1},p_={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},c_=[1,0,1,1,1],u_=[1,0,1],d_={L:"01",M:"00",Q:"11",H:"10"},f_=["11101100","00010001"],g_=[function(t,e){return(t+e)%2==0},function(t,e){return t%2==0},function(t,e){return e%3==0},function(t,e){return(t+e)%3==0},function(t,e){return(Math.floor(t/2)+Math.floor(e/3))%2==0},function(t,e){return t*e%2+t*e%3==0},function(t,e){return(t*e%2+t*e%3)%2==0},function(t,e){return((t+e)%2+t*e%3)%2==0}],y_=[[1,0],[1,25,0]];function v_(){r_.call(this),this.initProperties(),this.mode=Kx[this.encodingMode]}function m_(){n_.apply(this,arguments)}function x_(t,e,i,o){for(var r=0;r<t.length;r++)t[r][i][o]=e}function __(t,e,i,o){for(var r=0;r<g_.length;r++)t[r][i][o]=g_[r](i,o)?1^e:parseInt(e,10)}function b_(t,e){for(var i,o=y_[e-1],r=new Array(e).concat(t),n=new Array(r.length-o.length).concat(o),s=t.length,a=[],l=0;l<s;l++)i=((t,e)=>{for(var i=[],o=t.length-1;i[o]=h_[(t[o]+e)%255],void 0!==t[--o];);return i})(n,l_[r[r.length-1]]),n.splice(0,1),r=((t,e)=>{for(var i=[],o=t.length-2;0<=o;o--)i[o]=t[o]^e[o];return i})(i,r);for(l=r.length-1;0<=l;l--)a[e-1-l]=Bx(r[l],8);return a}function w_(t,e,i){var o=Ex(e),e=e.length-1,r=t<<e;return Bx(t,i-e)+Bx(((t,e)=>{for(var i=e.toString(2).length,o=t.toString(2).length,r=t;i<=(o=(r^=e<<o-i).toString(2).length););return r})(r,o),e)}function k_(t,e){return parseInt(t.charAt(e),10)}function A_(t,e){for(var i=t[0],o=0,r=e.length,n=0,s=8;n<=8;n++)6!==n&&x_(t,k_(e,r-1-o++),n,s);for(n=8,s=7;0<=s;s--)6!==s&&x_(t,k_(e,r-1-o++),n,s);for(o=0,s=i.length-1,n=8;s>=i.length-8;s--)x_(t,k_(e,r-1-o++),n,s);for(x_(t,1,i.length-8,8),n=i.length-7,s=8;n<i.length;n++)x_(t,k_(e,r-1-o++),n,s)}function S_(t,e){for(var i,o,r,n=t[0].length,s=n-11,a=n-11,l=0;l<e.length;l++)i=Math.floor(l/3),o=l%3,x_(t,r=k_(e,e.length-l-1),0+i,s+o),x_(t,r,a+o,0+i)}function C_(t,e,i,o){for(var r,n=e.length+2,s=e.length+1,a=0;a<e.length;a++)for(var l=a;l<n-a;l++)x_(t,r=e[a],i+l,o+a),x_(t,r,i+a,o+l),x_(t,r,i+s-l,o+s-a),x_(t,r,i+s-a,o+s-l)}function P_(t,e,i,o){for(var r=i,n=o,s=t[0];x_(t,0,r,o),x_(t,0,i,n),r+=e[0],n+=e[1],0<=r&&r<s.length;);}function T_(t,e,i,o,r){e[t][o]=(e[t][o]<<1^r)%128,93===e[t][o]&&(i[t]+=40)}function M_(t,e,i,o,r,n){i[t][n]===o?r[t][n]++:(i[t][n]=o,5<=r[t][n]&&(e[t]+=3+r[t][n]-5),r[t][n]=1)}function O_(t,e,i){var r=(new(i&&0<=i.toLowerCase().indexOf("utf_8")?a_:s_)).getEncodingResult(t,e),n=r.version,s=i_[n-1][e],i=((t,e)=>{for(var i,o=0,r=[],n=[],s=e.groups,a=0;a<s.length;a++)for(var l=s[a][0],h=0;h<l;h++){for(var p=s[a][1],c=[],u=[],d=1;d<=p;d++)i=t.substring(o,o+8),c.push(i),u[p-d]=Ex(i),o+=8;r.push(c),n.push(b_(u,e.errorCodewordsPerBlock))}return[r,n]})((()=>{for(var t=8*s.totalDataCodewords,e=0,i=0,o=r.dataString;o.length<t&&e<4;)o+="0000".charAt(e++);for(o.length%8!=0&&(o+=new Array(9-o.length%8).join("0"));o.length<t;)o+=f_[i],i^=1;return o})(),s),t=(()=>{for(var t=[],e=17+4*n,i=0;i<g_.length;i++){t[i]=new Array(e);for(var o=0;o<e;o++)t[i][o]=new Array(e)}return t})(),o=(c=(a=t)[0].length,C_(a,c_,0,0),P_(a,[-1,-1],7,7),C_(a,c_,c-7,0),P_(a,[1,-1],c-8,7),C_(a,c_,0,c-7),P_(a,[-1,1],7,c-8),t),a=n;if(!(a<2)){var l,h=o[0],p=h.length,c=Math.floor(a/7),u=[6],d=0;for((a=p_[a])?l=(p-13-a)/c:a=l=(p-13)/(c+1),u.push(u[d++]+a);u[d]+l<p;)u.push(u[d++]+l);for(var f=0;f<u.length;f++)for(var g=0;g<u.length;g++)void 0===h[u[f]][u[g]]&&C_(o,u_,u[f]-2,u[g]-2)}for(var y=t,v=1,m=y[0].length,x=8;x<m-8;x++)x_(y,v,6,x),x_(y,v,x,6),v^=1;7<=n&&S_(t,Bx(0,18)),A_(t,Bx(0,15));for(var _,b,w,k=t,A=i,S=new jx(k[0]),C=0;C<A.length;C++)for(_=A[C],b=0;0<_.length;){for(var P=0;P<_.length;P++)for(var T=0;T<8;T++)w=S.getNextCell(),__(k,_[P][b].charAt(T),w.row,w.column);for(b++;_[0]&&b===_[0].length;)_.splice(0,1)}for(;w=S.getNextRemainderCell();)__(k,0,w.row,w.column);c=(t=>{for(var e,i=[],o=[],r=[],n=[],s=[],a=t[0].length,l=0;l<t.length;l++)s[l]=[r[l]=i[l]=0,0],n[l]=[0,0],o[l]=[];for(var h=0;h<a;h++)for(var p=0;p<a;p++)for(var c=0;c<t.length;c++)e=t[c],r[c]+=parseInt(e[h][p],10),o[c][0]===e[h][p]&&h+1<a&&0<=p-1&&e[h+1][p]===o[c][0]&&e[h+1][p-1]===o[c][0]&&(i[c]+=3),T_(c,n,i,0,e[h][p]),T_(c,n,i,1,e[p][h]),M_(c,i,o,e[h][p],s,0),M_(c,i,o,e[p][h],s,1);var u,d,f,g,y=a*a,v=Number.MAX_VALUE;for(l=0;l<i.length;l++)i[l]+=(d=r[l],f=y,g=void 0,f=(d=Math.floor(d/f*100))%5,g=Math.abs(d-f-50),d=Math.abs(d+5-f-50),10*Math.min(g/5,d/5)),i[l]<v&&(v=i[l],u=l);return u})(t),a=t[c];return 7<=n&&S_([a],w_(n,"1111100100101",18)),A_([a],(t=>{var e="";if(0===Ex(t))return"101010000010010";for(var i=w_(Ex(t),"10100110111",15),o=0;o<i.length;o++)e+=i.charAt(o)^"101010000010010".charAt(o);return e})(d_[e]+Bx(c,3))),a}for(var L_,I_=1;I_<255;I_++)255<(L_=2*h_[I_-1])&&(L_^=285),h_[I_]=L_,l_[L_]=I_;L_=2*h_[I_-1]^285,h_[I_]=L_,h_[-1]=0;for(var B_=2;B_<=68;B_++){var E_=y_[B_-1];y_[B_]=((t,e)=>{for(var i=[],o=0;o<t.length;o++)for(var r=0;r<e.length;r++)i[o+r]=void 0===i[o+r]?(t[o]+(0<=e[r]?e[r]:0))%255:l_[h_[i[o+r]]^h_[(t[o]+e[r])%255]];return i})(E_,[B_,0])}var R_,V_=Math.round,j_=[[0,1],[1,1],[1,2],[2,2],[2,1],[3,1],[3,0],[2,0],[2,-1],[1,-1],[1,0]],z_=[[0,1],[1,1],[1,0]],js=((R_=M.Class)&&(D_.__proto__=R_),((D_.prototype=Object.create(R_&&R_.prototype)).constructor=D_).prototype.destroy=function(){this._destroySurface()},D_.prototype._initElement=function(){vt(this.element,"k-qrcode")},D_.prototype._initSurface=function(){var t=this.options,e=this.surface;e&&e.options.type===t.renderAs||(this._destroySurface(),this._initSurfaceElement(),this.surface=this._createSurface())},D_.prototype._createSurface=function(){return M.drawing.Surface.create(this.surfaceElement,{type:this.options.renderAs})},D_.prototype._destroySurface=function(){this.surface&&(this.surface.destroy(),this.surface=null,this._destroySurfaceElement())},D_.prototype._initSurfaceElement=function(){this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.surfaceElement.style.position="relative",this.element.appendChild(this.surfaceElement))},D_.prototype._destroySurfaceElement=function(){this.surfaceElement&&this.surfaceElement.parentNode&&(this.surfaceElement.parentNode.removeChild(this.surfaceElement),this.surfaceElement=null)},D_.prototype.redraw=function(){var t=this._getSize();this.surface.clear(),this.surface.setSize({width:t,height:t}),this.createVisual(),this.surface.draw(this.visual)},D_.prototype.getSize=function(){var t=this.element,e=t.clientWidth,t=t.clientHeight,i={width:0,height:0};return 0<e&&(i.width=e),t&&(i.height=t),i},D_.prototype._resize=function(){this.redraw()},D_.prototype.createVisual=function(){this.visual=this._render()},D_.prototype.exportVisual=function(){return this._render()},D_.prototype._render=function(){var t,e,i,o,r,n=this._value,s=this.options.border||{},a=this.options.padding||0,l=s.width||0,h=(s.width=l,new M.drawing.Group);try{n&&(i=O_(n,this.options.errorCorrection,this.options.encoding),r=(o=this._getSize())-2*(l+a),t=this._calculateBaseUnit(r,i.length),e=l+a+(r-i.length*t)/2,h.append(this._renderBackground(o,s)),h.append(this._renderMatrix(i,t,e)),this._hasCustomLogo()?h.append(this._renderLogo(o,t)):this._isSwiss()&&h.append(this._renderSwissCode(o,t)))}catch(t){this.onError(t)}return h},D_.prototype._renderLogo=function(t,e){var t=V_(t/2),e=this._getLogoSize(7*e),i=this.options.overlay.imageUrl,t={x:t-e.width/2,y:t-e.height/2},t=new M.geometry.Rect(new M.geometry.Point(t.x,t.y),new M.geometry.Size(e.width,e.height));return new M.drawing.Image(i,t)},D_.prototype._renderSwissCode=function(t,e){var i=this._getLogoSize(7*e),o=(i=Math.max(i.width,i.height))/4,r=o/2,t=t/2,n={},s=new M.drawing.Group;return n.x=n.y=Math.ceil(t-e-i/2),s.append(this._renderShape(n,Math.ceil(i+2*e),z_,"#fff")),n.x=n.y=t-i/2,s.append(this._renderShape(n,i,z_,this.options.color)),n.x=t+r-i/2,n.y=t+r+o-i/2,s.append(this._renderShape(n,o,j_,"#fff")),s},D_.prototype._renderShape=function(t,e,i,o){var r=new M.drawing.MultiPath({fill:{color:o},stroke:null});r.moveTo(t.x,t.y);for(var n=0;n<i.length;n++)r.lineTo(t.x+e*i[n][0],t.y+e*i[n][1]);return r.close(),r},D_.prototype._getSize=function(){var t;return this.options.size?parseInt(this.options.size,10):(t=Sx(this.element,this.options.renderAs),0<(t=Math.min(t.width,t.height))?t:200)},D_.prototype._calculateBaseUnit=function(t,e){var i,o=Math.floor(t/e);return o<1?(i=Math.ceil(+e),this.onError(new Error("Insufficient size for QR Code: the current size is "+t+"px and the minimum size is "+i+"px."))):t<=o*e&&1<=o-1&&o--,o},D_.prototype._renderMatrix=function(t,e,i){for(var o=new M.drawing.MultiPath({fill:{color:this.options.color},stroke:null}),r=0;r<t.length;r++)for(var n=i+r*e,s=0;s<t.length;){for(;0===t[r][s]&&s<t.length;)s++;if(s<t.length){for(var a=s;1===t[r][s];)s++;var a=V_(i+a*e),l=V_(n),h=V_(i+s*e),p=V_(n+e);o.moveTo(a,l).lineTo(a,p).lineTo(h,p).lineTo(h,l).close()}}return o},D_.prototype._renderBackground=function(t,e){t=new I(0,0,t,t).unpad(e.width/2);return M.drawing.Path.fromRect(t.toRect(),{fill:{color:this.options.background},stroke:{color:e.color,width:e.width}})},D_.prototype.setOptions=function(t){this.options=Lx(this.options,t||{}),void 0!==t.value&&(this._value=String(this.options.value)),this._initSurface(),this.redraw()},D_.prototype.value=function(t){if(void 0===t)return this._value;this._value=String(t),this.redraw()},D_.prototype._hasCustomLogo=function(){return Boolean(this.options.overlay.imageUrl)},D_.prototype._isSwiss=function(){return"swiss"===this.options.overlay.type},D_.prototype._getLogoSize=function(t){var e=this.options.overlay.width,i=this.options.overlay.height;return e||i?e&&!i?i=e:!e&&i&&(e=i):e=i=t,{width:e,height:i}},D_);function D_(t,e,i){void 0===i&&(i=Re),R_.call(this),this.options=O({},this.options,e),this.element=t,this.wrapper=this.element,this.onError=i,this._initElement(),this._initSurface(),this.setOptions(e)}e(js,{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}});let F_=js,H_=function(e){return void 0===e&&(e="ISO_8859_1"),function(t){try{O_(t,"L",e)}catch(t){return{valid:!1,error:t}}return{valid:!0}}};var N_={WGS84:{a:6378137,b:6356752.314245179,f:.0033528106647474805,e:.08181919084262149}};function U_(t){return t*t}var G_,W_,X_=Math,Y_=X_.abs,q_=X_.atan,Z_=X_.atan2,Q_=X_.cos,K_=X_.sin,$_=X_.tan,J_=((W_=M.Class)&&(db.__proto__=W_),((db.prototype=Object.create(W_&&W_.prototype)).constructor=db).prototype.initProperties=function(){O(this,{DISTANCE_ITERATIONS:100,DISTANCE_CONVERGENCE:1e-12,DISTANCE_PRECISION:2,FORMAT:"{0:N6}{1:N6}"})},db.prototype.toArray=function(){return[this.lat,this.lng]},db.prototype.equals=function(t){return t&&t.lat===this.lat&&t.lng===this.lng},db.prototype.clone=function(){return new db(this.lat,this.lng)},db.prototype.round=function(t){return this.lng=L(this.lng,t),this.lat=L(this.lat,t),this},db.prototype.wrap=function(){return this.lng=this.lng%180,this.lat=this.lat%90,this},db.prototype.distanceTo=function(t,e){return this.greatCircleTo(t,e).distance},db.prototype.destination=function(t,e,i){var e=ce(e),i=i||N_.WGS84,o=ce(this.lat),r=ce(this.lng),t=t/i.a,i=X_.asin(K_(o)*Q_(t)+Q_(o)*K_(t)*Q_(e)),r=r+Z_(K_(e)*K_(t)*Q_(o),Q_(t)-K_(o)*K_(i));return new db(oe(i),oe(r))},db.prototype.greatCircleTo=function(t,e){var i=db.create(void 0),e=e||N_.WGS84;if(!i||this.clone().round(8).equals(i.clone().round(8)))return{distance:0,azimuthFrom:0,azimuthTo:0};for(var o,r,n=e.a,s=e.b,a=e.f,l=ce(i.lng-this.lng),e=q_((1-a)*$_(ce(this.lat))),h=K_(e),p=Q_(e),e=q_((1-a)*$_(ce(i.lat))),c=K_(e),u=Q_(e),d=l,f=this.DISTANCE_ITERATIONS,g=!1;!g&&0<f--;)var y=K_(d),v=Q_(d),m=X_.sqrt(U_(u*y)+U_(p*c-h*u*v)),x=Z_(m,r=h*c+p*u*v),_=p*u*y/m,b=0,w=(0!=(o=1-U_(_))&&(b=r-2*h*c/o),d),k=a/16*o*(4+a*(4-3*o)),d=l+(1-k)*a*_*(x+k*m*(b+k*r*(2*U_(b)-1))),g=Y_(d-w)<=this.DISTANCE_CONVERGENCE;var i=o*(U_(n)-U_(s))/U_(s),e=1+i/16384*(4096+i*(i*(320-175*i)-768)),n=i/1024*(256+i*(i*(74-47*i)-128)),i=n*m*(b+n/4*(r*(2*U_(b)-1)-n/6*b*(4*U_(m)-3)*(4*U_(b)-3))),n=Z_(u*y,p*c-h*u*v),A=Z_(p*y,-h*u+p*c*v);return{distance:L(s*e*(x-i),this.DISTANCE_PRECISION),azimuthFrom:oe(n),azimuthTo:oe(A)}},db.prototype.toString=function(){return String(this.lat)+","+String(this.lng)},db.fromLngLat=function(t){return new db(t[1],t[0])},db.fromLatLng=function(t){return new db(t[0],t[1])},db.create=function(t,e){if(k(t))return t instanceof db?t.clone():1===arguments.length&&2===t.length?db.fromLatLng(t):new db(t,e)},db),tb=Math,eb=tb.atan,ib=tb.exp,ob=tb.pow,rb=tb.sin,nb=tb.log,sb=tb.tan,ab=M.geometry.Point,lb=tb.PI,hb=lb/2,pb=lb/4,cb=lb/180,t=N_.WGS84,gl=((G_=M.Class)&&(ub.__proto__=G_),((ub.prototype=Object.create(G_&&G_.prototype)).constructor=ub).prototype._initOptions=function(t){this.options=O({},this.options,t)},ub.prototype.initProperties=function(){O(this,{MAX_LNG:180,MAX_LAT:85.0840590501,INVERSE_ITERATIONS:15,INVERSE_CONVERGENCE:1e-12})},ub.prototype.forward=function(t,e){var i=this.options,o=i.datum.a,i=i.centralMeridian,r=x(t.lat,-this.MAX_LAT,this.MAX_LAT),e=e?x(t.lng,-this.MAX_LNG,this.MAX_LNG):t.lng,t=ce(e-i)*o,e=this._projectLat(r);return new ab(t,e)},ub.prototype._projectLat=function(t){var e=this.options.datum,i=e.e,e=e.a,t=ce(t),o=sb(pb+t/2),t=i*rb(t),t=ob((1-t)/(1+t),i/2);return e*nb(o*t)},ub.prototype.inverse=function(t,e){var i=this.options,o=i.datum.a,o=t.x/(cb*o)+i.centralMeridian,i=x(this._inverseY(t.y),-this.MAX_LAT,this.MAX_LAT);return e&&(o=x(o,-this.MAX_LNG,this.MAX_LNG)),new J_(i,o)},ub.prototype._inverseY=function(t){for(var e=this.options.datum,i=e.a,o=e.e,r=o/2,n=ib(-t/i),s=hb-2*eb(n),a=0;a<=this.INVERSE_ITERATIONS;a++){var l=o*rb(s),l=ob((1-l)/(1+l),r),l=hb-2*eb(n*l)-s;if(s+=l,tb.abs(l)<=this.INVERSE_CONVERGENCE)break}return oe(s)},ub);function ub(t){G_.call(this),this.initProperties(),this._initOptions(t)}function db(t,e){W_.call(this),this.initProperties(),1===arguments.length?(this.lat=t[0],this.lng=t[1]):(this.lat=t,this.lng=e)}e(gl,{centralMeridian:0,datum:t});function fb(t,e){return t.bind(e)}function gb(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function yb(t,e){e.insertBefore(t,e.firstChild)}function vb(t){return t.replace(/([a-z][A-Z])/g,function(t){return t.charAt(0)+"-"+t.charAt(1).toLowerCase()})}function mb(t){return t&&String(t).endsWith("px")?t:String(t)+"px"}function xb(t,e){var i=t.prototype;i.events?e.forEach(function(t){i.events.indexOf(t)<0&&i.events.push(t)}):i.events=e}function _b(t){var e=[];if(t)for(var i=vb(t).split("-"),o=0;o<i.length;o++)e.push("k-pos-"+i[o]);return e.join(" ")}(kb=gl)&&(Ob.__proto__=kb),((Ob.prototype=Object.create(kb&&kb.prototype)).constructor=Ob).prototype.initProperties=function(){kb.prototype.initProperties.call(this),O(this,{MAX_LAT:85.0511287798})},Ob.prototype._projectLat=function(t){var e=this.options.datum.a,t=ce(t),t=sb(pb+t/2);return e*nb(t)},Ob.prototype._inverseY=function(t){var e=this.options.datum.a,t=ib(-t/e);return oe(hb-2*eb(t))};var bb,wb,kb,Ab=Ob,Sb=((wb=M.Class)&&(Mb.__proto__=wb),((Mb.prototype=Object.create(wb&&wb.prototype)).constructor=Mb).prototype.toPoint=function(t,e,i){return this._proj.forward(t,i).transform(this._tm).scale(e||1)},Mb.prototype.toLocation=function(t,e,i){t=t.clone().scale(1/(e||1)).transform(this._itm);return this._proj.inverse(t,i)},Mb),Cb=(Object.assign,function(t){var e=document.createElement("div");return e.innerHTML=t,e.firstChild}),Pb=((bb=ii)&&(Tb.__proto__=bb),((Tb.prototype=Object.create(bb&&bb.prototype)).constructor=Tb).prototype._initOptions=function(t){this.options=O({},this.options,t)},Tb.prototype.filter=function(t,e){this._extent=t,this._zoom=e,this._render()},Tb.prototype.add=function(t){var e=t;k(t)&&(this.items.push(e="string"==typeof t?{text:t}:e),this._render())},Tb.prototype.remove=function(t){for(var e=[],i=0;i<this.items.length;i++){var o=this.items[i];o.text!==t&&e.push(o)}this.items=e,this._render()},Tb.prototype.clear=function(){this.items=[],gb(this.element)},Tb.prototype._render=function(){for(var t=[],e=0;e<this.items.length;e++){var i=this.items[e],i=this._itemText(i);""!==i&&t.push(i)}if(0<t.length){gb(this.element);var o=t.join(this.options.separator),r=this.element,n=document.createElement("div");for(n.innerHTML=o;0<n.childNodes.length;)r.appendChild(n.childNodes[0]);this.showElement()}else this.hideElement()},Tb.prototype.hideElement=function(){this.element.style.display="none"},Tb.prototype.showElement=function(){this.element.style.display=""},Tb.prototype._itemText=function(t){var e="",i=this._inZoomLevel(t.minZoom,t.maxZoom),o=this._inArea(t.extent);return i&&o&&(e+=t.text),e},Tb.prototype._inZoomLevel=function(t,e){t=_(t,-Number.MAX_VALUE),e=_(e,Number.MAX_VALUE);return this._zoom>t&&this._zoom<e},Tb.prototype._inArea=function(t){var e=!0;return e=t?t.contains(this._extent):e},Tb);function Tb(t,e){bb.call(this),this.element=t,this._initOptions(e),this.items=[],vt(this.element,"k-widget k-attribution")}function Mb(){wb.call(this);var t=this._proj=new Ab,t=this.c=2*lb*t.options.datum.a;this._tm=M.geometry.transform().translate(.5,.5).scale(1/t,-1/t),this._itm=M.geometry.transform().scale(t,-t).translate(-.5,-.5)}function Ob(){kb.apply(this,arguments)}e(Pb,{name:"Attribution",separator:" | "});var Lb={up:{className:"k-navigator-n",iconClass:"k-i-caret-alt-up"},down:{className:"k-navigator-s",iconClass:"k-i-caret-alt-down"},right:{className:"k-navigator-e",iconClass:"k-i-caret-alt-right"},left:{className:"k-navigator-w",iconClass:"k-i-caret-alt-left"}};function Ib(t,e){t='<button class="k-button k-button-square k-rounded-full k-button-flat k-button-flat-base k-icon-button '+Lb[t].className+'" aria-label="move '+t+'">'+we({icon:"caret-alt-"+t,iconClass:"k-button-icon",svgIcons:e.svgIcons,type:e.type})+"</button>";return Cb(t)}(Bb=ii)&&(Rb.__proto__=Bb),((Rb.prototype=Object.create(Bb&&Bb.prototype)).constructor=Rb).prototype.destroy=function(){this.dispose()},Rb.prototype.dispose=function(){Ye(this._keyroot,"keydown",this._keydownHandler)},Rb.prototype._tabindex=function(t){var t=t||this.wrapper||this.element,e=this.element,i="tabindex",o=t.getAttribute(i)||e.getAttribute(i);e.removeAttribute(i),t.setAttribute(i,isNaN(o)?0:o)},Rb.prototype._initOptions=function(t){this.options=O({},this.options,t)},Rb.prototype._pan=function(t,e){var i=this.options.panStep;this.trigger("pan",{x:t*i,y:e*i})},Rb.prototype._click=function(t){var e=0,i=0,o=t.currentTarget;o.matches(".k-navigator-n")?i=1:o.matches(".k-navigator-s")?i=-1:o.matches(".k-navigator-e")?e=1:o.matches(".k-navigator-w")&&(e=-1),this._pan(e,i),t.preventDefault()},Rb.prototype._keydown=function(t){switch(t.which){case Ve.UP:this._pan(0,1),t.preventDefault();break;case Ve.DOWN:this._pan(0,-1),t.preventDefault();break;case Ve.RIGHT:this._pan(1,0),t.preventDefault();break;case Ve.LEFT:this._pan(-1,0),t.preventDefault()}};var Bb,Eb=Rb;function Rb(t,e){Bb.call(this),this.element=t,this._initOptions(e);var t=Ib("up",e.icons),i=Ib("right",e.icons),o=Ib("down",e.icons),e=Ib("left",e.icons),t=(this.element.appendChild(t),this.element.appendChild(i),this.element.appendChild(o),this.element.appendChild(e),vt(this.element,"k-widget k-navigator"),Xe(this.element,"click",".k-button",fb(this._click,this)),this.element.parentNode.closest("[data-role]"));this._keyroot=t||this.element,this._tabindex(this._keyroot),this._keydownHandler=fb(this._keydown,this),Xe(this._keyroot,"keydown",this._keydownHandler)}function Vb(t,e,i){t='<button class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-base k-icon-button k-zoom-'+t+'" title="zoom-'+t+'" aria-label="zoom-'+t+'">'+we({icon:e,iconClass:"k-button-icon",svgIcons:i.svgIcons,type:i.type})+"</button>";return Cb(t)}e(Eb,{name:"Navigator",panStep:1}),xb(Eb,["pan"]);(jb=ii)&&(Db.__proto__=jb),((Db.prototype=Object.create(jb&&jb.prototype)).constructor=Db).prototype.destroy=function(){this.element&&Ye(this.element,"click",this._clickHandler),this._keyroot&&Ye(this._keyroot,"keydown",this._keydownHandler)},Db.prototype._tabindex=function(t){var t=t||this.wrapper||this.element,e=this.element,i="tabindex",o=t.getAttribute(i)||e.getAttribute(i);e.removeAttribute(i),t.setAttribute(i,isNaN(o)?0:o)},Db.prototype._initOptions=function(t){this.options=O({},this.options,t)},Db.prototype._change=function(t){var e=this.options.zoomStep;this.trigger("change",{delta:t*e})},Db.prototype._click=function(t){var e=1;Ut(t.currentTarget,"k-zoom-out")&&(e=-1),this._change(e),t.preventDefault()},Db.prototype._keydown=function(t){switch(t.which){case Ve.NUMPAD_PLUS:case 187:case 61:this._change(1);break;case Ve.NUMPAD_MINUS:case 189:case 173:this._change(-1)}};var jb,zb=Db;function Db(t,e,i){jb.call(this),this.element=t,this._initOptions(e);t=Vb("in","plus",i),e=Vb("out","minus",i),this.element.appendChild(t),this.element.appendChild(e),this.element.setAttribute("role","group"),vt(this.element,"k-widget k-zoom-control k-button-group k-group-horizontal"),this._clickHandler=this._click.bind(this),Xe(this.element,"click",".k-button",this._clickHandler),i=this.element.parentNode.closest("[data-role]");this._keyroot=i||this.element,this._tabindex(this._keyroot),this._keydownHandler=this._keydown.bind(this),Xe(this._keyroot,"keydown",this._keydownHandler)}e(zb,{name:"ZoomControl",zoomStep:1}),xb(zb,["change"]);var Fb,Hb,Ds=Math,Nb=Ds.max,Ub=Ds.min,Gb=((Hb=M.Class)&&(qb.__proto__=Hb),hx={World:{configurable:!0}},((qb.prototype=Object.create(Hb&&Hb.prototype)).constructor=qb).prototype.contains=function(t){var e=this.nw,i=this.se,o=_(t.lng,t[1]),r=_(t.lat,t[0]);return t&&o+180>=e.lng+180&&o+180<=i.lng+180&&r+90>=i.lat+90&&r+90<=e.lat+90},qb.prototype.center=function(){var t=this.nw,e=this.se,i=t.lng+(e.lng-t.lng)/2;return new J_(t.lat+(e.lat-t.lat)/2,i)},qb.prototype.containsAny=function(t){for(var e=!1,i=0;i<t.length;i++)e=e||this.contains(t[i]);return e},qb.prototype.include=function(t){var e=this.nw,i=this.se,o=_(t.lng,t[1]),t=_(t.lat,t[0]);e.lng=Ub(e.lng,o),e.lat=Nb(e.lat,t),i.lng=Nb(i.lng,o),i.lat=Ub(i.lat,t)},qb.prototype.includeAll=function(t){for(var e=0;e<t.length;e++)this.include(t[e])},qb.prototype.edges=function(){var t=this.nw,e=this.se;return{nw:this.nw,ne:new J_(t.lat,e.lng),se:this.se,sw:new J_(e.lat,t.lng)}},qb.prototype.toArray=function(){var t=this.nw,e=this.se;return[t,new J_(t.lat,e.lng),e,new J_(e.lat,t.lng)]},qb.prototype.overlaps=function(t){return this.containsAny(t.toArray())||t.containsAny(this.toArray())},qb.create=function(t,e){return t instanceof qb?t:t&&e?new qb(t,e):t&&4===t.length&&!e?new qb([t[0],t[1]],[t[2],t[3]]):void 0},hx.World.get=function(){return new qb([90,-180],[-90,180])},Object.defineProperties(qb,hx),qb),Wb="centerChange",Xb=((Fb=M.Class)&&(Yb.__proto__=Fb),px={anchor:{configurable:!0}},((Yb.prototype=Object.create(Fb&&Fb.prototype)).constructor=Yb).prototype.show=function(t,e){this.location!==e.location&&(this.anchor=t,this.location=e.location,this.widgetService.notify("showTooltip",Object.assign({anchor:this.anchor},e)),this.visible=!0)},Yb.prototype.hide=function(){this.widgetService&&this.widgetService.notify("hideTooltip"),this.visible=!1,this.location=null},px.anchor.get=function(){return this._anchor},px.anchor.set=function(t){t=this.widgetService.widget._toDocumentCoordinates({x:t.left-this.offset.x,y:t.top-this.offset.y});this._anchor={left:t.left,top:t.top}},Yb.prototype.destroy=function(){this.widgetService=null},Object.defineProperties(Yb.prototype,px),Yb);function Yb(t,e){Fb.call(this),this.widgetService=t,this.options=O({},this.options,e),this.offset={x:0,y:0}}function qb(t,e){Hb.call(this);t=J_.create(t),e=J_.create(e);t.lng+180>e.lng+180&&t.lat+90<e.lat+90?(this.se=t,this.nw=e):(this.se=e,this.nw=t)}e(Xb,{border:{width:1},opacity:1});(Zb=M.Class)&&($b.__proto__=Zb),(($b.prototype=Object.create(Zb&&Zb.prototype)).constructor=$b).prototype.destroy=function(){this._deactivate()},$b.prototype._initOptions=function(t){this.options=O({},this.options,t)},$b.prototype.show=function(){this.reset(),this._activate(),this._applyExtent(!0)},$b.prototype.hide=function(){this._deactivate(),this._setVisibility(!1)},$b.prototype.reset=function(){this._beforeReset(),this._reset()},$b.prototype._reset=function(){this._applyExtent()},$b.prototype._beforeReset=function(){},$b.prototype._resize=function(){},$b.prototype._panEnd=function(){this._applyExtent()},$b.prototype._applyExtent=function(){var t=this.options,e=this.map.zoom(),i=!k(t.minZoom)||e>=t.minZoom,e=!k(t.maxZoom)||e<=t.maxZoom,t=Gb.create(t.extent),t=!t||t.overlaps(this.map.extent());this._setVisibility(i&&e&&t)},$b.prototype._setVisibility=function(t){this.element.style.display=t?"":"none"},$b.prototype._activate=function(){var t=this.map;this._deactivate(),t.bind("beforeReset",this._beforeReset),t.bind("reset",this._reset),t.bind("resize",this._resize),t.bind("panEnd",this._panEnd)},$b.prototype._deactivate=function(){var t=this.map;t.unbind("beforeReset",this._beforeReset),t.unbind("reset",this._reset),t.unbind("resize",this._resize),t.unbind("panEnd",this._panEnd)},$b.prototype._updateAttribution=function(){var t=this.map.attribution;t&&t.add(this.options.attribution)},$b.prototype._readData=function(){return this.options.data||[]},$b.prototype._hasData=function(){return this._data&&0<this._data.length},$b.prototype._layerIndex=function(){return(this.map.layers||[]).indexOf(this)};var Zb,cx=$b,Qb=Math,Kb=M.geometry.Point;function $b(t,e){Zb.call(this),this.support=qe(),this._initOptions(e),this.map=t;e=document.createElement("div");vt(e,"k-layer"),e.style.zIndex=this.options.zIndex,e.style.opacity=this.options.opacity,this.element=e,t.scrollElement.appendChild(this.element),this._beforeReset=this._beforeReset.bind(this),this._reset=this._reset.bind(this),this._resize=this._resize.bind(this),this._panEnd=this._panEnd.bind(this),this._activate(),this._updateAttribution()}function Jb(t){return Pt(t)?t:Vt.compile(t)}function t1(t){var e=t;return"string"!=typeof t&&(e+="px"),e}(e1=cx)&&(i1.__proto__=e1),((i1.prototype=Object.create(e1&&e1.prototype)).constructor=i1).prototype.destroy=function(){e1.prototype.destroy.call(this),this._view.destroy(),this._view=null},i1.prototype._beforeReset=function(){var t=this.map,t=t.locationToLayer(t.extent().nw).round();this._view.viewOrigin(t)},i1.prototype._reset=function(){e1.prototype._reset.call(this),this._updateView(),this._view.reset()},i1.prototype._viewType=function(){return n1},i1.prototype._activate=function(){e1.prototype._activate.call(this),this.support.mobileOS||(this._pan||(this._pan=(0,M.throttle)(this._render.bind(this),100)),this.map.bind("pan",this._pan))},i1.prototype._deactivate=function(){e1.prototype._deactivate.call(this),this._pan&&this.map.unbind("pan",this._pan)},i1.prototype._updateView=function(){var t=this._view,e=this.map,i=e.extent(),i={nw:e.locationToLayer(i.nw).round(),se:e.locationToLayer(i.se).round()};t.center(e.locationToLayer(e.center())),t.extent(i),t.zoom(e.zoom())},i1.prototype._resize=function(){this._render()},i1.prototype._panEnd=function(t){e1.prototype._panEnd.call(this,t),this._render()},i1.prototype._render=function(){this._updateView(),this._view.render()};var e1,lx=i1;function i1(t,e){e1.call(this,t,e),"string"==typeof this.options.subdomains&&(this.options.subdomains=this.options.subdomains.split(""));t=this._viewType();this._view=new t(this.element,this.options)}e(lx,{tileSize:256,subdomains:["a","b","c"],urlTemplate:"",zIndex:1});(r1=M.Class)&&(l1.__proto__=r1),((l1.prototype=Object.create(r1&&r1.prototype)).constructor=l1).prototype._initOptions=function(t){this.options=O({},this.options,t)},l1.prototype.center=function(t){this._center=t},l1.prototype.extent=function(t){this._extent=t},l1.prototype.viewOrigin=function(t){this._viewOrigin=t},l1.prototype.zoom=function(t){this._zoom=t},l1.prototype.pointToTileIndex=function(t){return new Kb(Qb.floor(t.x/this.options.tileSize),Qb.floor(t.y/this.options.tileSize))},l1.prototype.tileCount=function(){var t=this.size(),e=this.pointToTileIndex(this._extent.nw),i=this._extent.nw,e=this.indexToPoint(e).translate(-i.x,-i.y);return{x:Qb.ceil((Qb.abs(e.x)+t.width)/this.options.tileSize),y:Qb.ceil((Qb.abs(e.y)+t.height)/this.options.tileSize)}},l1.prototype.size=function(){var t=this._extent.nw,t=this._extent.se.clone().translate(-t.x,-t.y);return{width:t.x,height:t.y}},l1.prototype.indexToPoint=function(t){var e=t.x;return new Kb(e*this.options.tileSize,t.y*this.options.tileSize)},l1.prototype.subdomainText=function(){var t=this.options.subdomains;return t[this.subdomainIndex++%t.length]},l1.prototype.destroy=function(){gb(this.element),this.pool.empty()},l1.prototype.reset=function(){this.pool.reset(),this.subdomainIndex=0,this.render()},l1.prototype.render=function(){for(var t,e,i=this.tileCount(),o=this.pointToTileIndex(this._extent.nw),r=0;r<i.x;r++)for(e=0;e<i.y;e++)(t=this.createTile({x:o.x+r,y:o.y+e})).visible||t.show()},l1.prototype.createTile=function(t){t=this.tileOptions(t),t=this.pool.get(this._center,t);return t.element.parentNode||this.element.append(t.element),t},l1.prototype.tileOptions=function(t){var e=this.wrapIndex(t),i=this.indexToPoint(t),o=this._viewOrigin,o=i.clone().translate(-o.x,-o.y);return{index:e,currentIndex:t,point:i,offset:new Kb(L((e=o).x),L(e.y)),zoom:this._zoom,size:this.options.tileSize,subdomain:this.subdomainText(),urlTemplate:this.options.urlTemplate,errorUrlTemplate:this.options.errorUrlTemplate}},l1.prototype.wrapIndex=function(t){var e=Qb.pow(2,this._zoom);return{x:this.wrapValue(t.x,e),y:x(t.y,0,e-1)}},l1.prototype.wrapValue=function(t,e){var i=Qb.abs(t)%e;return 0<=t?i:e-(0==i?e:i)};var o1,r1,n1=l1,s1=((o1=M.Class)&&(a1.__proto__=o1),((a1.prototype=Object.create(o1&&o1.prototype)).constructor=a1).prototype.destroy=function(){var t=this.element,e=t?t.parentNode:null;t&&(e&&e.removeChild(t),this.element=null)},a1.prototype._initOptions=function(t){this.options=O({},this.options,t)},a1.prototype.createElement=function(){var t=document.createElement("img"),e=this.options.size+"px";t.setAttribute("alt",""),t.style.position="absolute",t.style.display="block",t.style.width=t.style.maxWidth=e,t.style.height=t.style.maxHeight=e,this.element=t},a1.prototype.show=function(){var t=this.element,e=(t.style.top=t1(this.options.offset.y),t.style.left=t1(this.options.offset.x),this.url());e&&t.setAttribute("src",e),t.style.visibility="visible",this.visible=!0},a1.prototype.hide=function(){this.element.style.visibility="hidden",this.visible=!1},a1.prototype.url=function(){return Jb(this.options.urlTemplate)(this.urlOptions())},a1.prototype.errorUrl=function(){return Jb(this.options.errorUrlTemplate)(this.urlOptions())},a1.prototype.urlOptions=function(){var t=this.options;return{zoom:t.zoom,subdomain:t.subdomain,z:t.zoom,x:t.index.x,y:t.index.y,s:t.subdomain,quadkey:t.quadkey,q:t.quadkey,culture:t.culture,c:t.culture}},a1);function a1(t,e){o1.call(this),this.id=t,this.visible=!0,this._initOptions(e),this.createElement(),this.show()}function l1(t,e){r1.call(this),this.element=t,this._initOptions(e),this.pool=new p1}e(s1,{urlTemplate:"",errorUrlTemplate:""});(h1=M.Class)&&(c1.__proto__=h1),((c1.prototype=Object.create(h1&&h1.prototype)).constructor=c1).prototype.get=function(t,e){return this._items.length>=this.options.maxSize&&this._remove(t),this._create(e)},c1.prototype.empty=function(){for(var t=this._items,e=0;e<t.length;e++)t[e].destroy();this._items=[]},c1.prototype.reset=function(){for(var t=this._items,e=0;e<t.length;e++)t[e].hide()},c1.prototype._create=function(t){for(var e,i=this._items,o=le(t.point.toString()+t.offset.toString()+t.zoom+t.urlTemplate),r=0;r<i.length;r++)if(i[r].id===o){e=i[r];break}return e?e.show():(e=new s1(o,t),this._items.push(e)),e},c1.prototype._remove=function(t){for(var e=this._items,i=-1,o=-1,r=0;r<e.length;r++){var n=e[r].options.point.distanceTo(t);i<n&&!e[r].visible&&(o=r,i=n)}-1!==o&&(e[o].destroy(),e.splice(o,1))};var h1,p1=c1;function c1(){h1.call(this),this._items=[]}e(p1,{maxSize:100});function u1(t,e,i){return"translate3d("+t+"px,"+e+"px,0) scale("+i+")"}var d1,f1,g1,y1,v1,m1,x1,_1=Object.assign,b1="change",w1=((x1=ii)&&(R1.__proto__=x1),((R1.prototype=Object.create(x1&&x1.prototype)).constructor=R1).prototype.captureNext=function(){this.capture=!0},R1.prototype.cancelCapture=function(){this.capture=!1},R1.prototype._press=function(t){this.trigger("press"),this.capture&&t.preventDefault()},R1.prototype._release=function(t){this.trigger("release"),this.capture&&(t.preventDefault(),this.cancelCapture())},R1),k1=((m1=ii)&&(E1.__proto__=m1),((E1.prototype=Object.create(m1&&m1.prototype)).constructor=E1).prototype.makeVirtual=function(){_1(this,{virtual:!0,forcedEnabled:!0,_virtualMin:0,_virtualMax:0})},E1.prototype.virtualSize=function(t,e){this._virtualMin===t&&this._virtualMax===e||(this._virtualMin=t,this._virtualMax=e,this.update())},E1.prototype.outOfBounds=function(t){return t>this.max||t<this.min},E1.prototype.forceEnabled=function(){this.forcedEnabled=!0},E1.prototype.getSize=function(){return this.container[this.measure]},E1.prototype.getTotal=function(){return this.element[this.scrollSize]},E1.prototype.rescale=function(t){this.scale=t},E1.prototype.update=function(t){var e=this,i=e.virtual?e._virtualMax:e.getTotal(),o=i*e.scale,r=e.getSize();0===i&&!e.forcedEnabled||(e.max=e.virtual?-e._virtualMin:0,e.size=r,e.total=o,e.min=Math.min(e.max,r-o),e.minScale=r/i,e.centerOffset=(o-r)/2,e.enabled=e.forcedEnabled||r<o,t)||e.trigger(b1,e)},E1),A1=((v1=ii)&&(B1.__proto__=v1),((B1.prototype=Object.create(v1&&v1.prototype)).constructor=B1).prototype.rescale=function(t){this.x.rescale(t),this.y.rescale(t),this.refresh()},B1.prototype.centerCoordinates=function(){return{x:Math.min(0,-this.x.centerOffset),y:Math.min(0,-this.y.centerOffset)}},B1.prototype.refresh=function(){var t=this;t.x.update(),t.y.update(),t.enabled=t.x.enabled||t.y.enabled,t.minScale=t.forcedMinScale||Math.min(t.x.minScale,t.y.minScale),t.fitScale=Math.max(t.x.minScale,t.y.minScale),t.trigger(b1)},B1),S1=((y1=ii)&&(I1.__proto__=y1),((I1.prototype=Object.create(y1&&y1.prototype)).constructor=I1).prototype.outOfBounds=function(){return this.dimension.outOfBounds(this.movable[this.axis])},I1.prototype.dragMove=function(t){var e,i=this.dimension,o=this.axis,r=this.movable,n=r[o]+t;i.enabled&&(e=t,(n<i.min&&t<0||n>i.max&&0<t)&&(e*=this.resistance),r.translateAxis(o,e),this.trigger(b1,this))},I1),C1=((g1=M.Class)&&(L1.__proto__=g1),(L1.prototype=Object.create(g1&&g1.prototype)).constructor=L1),P1=((f1=ii)&&(O1.__proto__=f1),((O1.prototype=Object.create(f1&&f1.prototype)).constructor=O1).prototype.translateAxis=function(t,e){this[t]+=e,this.refresh()},O1.prototype.scaleTo=function(t){this.scale=t,this.refresh()},O1.prototype.scaleWith=function(t){this.scale*=t,this.refresh()},O1.prototype.translate=function(t){this.x+=t.x,this.y+=t.y,this.refresh()},O1.prototype.moveAxis=function(t,e){this[t]=e,this.refresh()},O1.prototype.moveTo=function(t){_1(this,t),this.refresh()},O1.prototype.refresh=function(){var t=this.x,e=this.y;this.round&&(t=Math.round(t),e=Math.round(e)),(t=u1(t,e,this.scale))!==this.coordinates&&(this.element.style.transform=t,this._saveCoordinates(t),this.trigger(b1))},O1.prototype._saveCoordinates=function(t){this.coordinates=t},O1),T1=M.drawing.Group,Ja=((d1=cx)&&(M1.__proto__=d1),((M1.prototype=Object.create(d1&&d1.prototype)).constructor=M1).prototype.destroy=function(){d1.prototype.destroy.call(this),this.surface.destroy()},M1.prototype._reset=function(){d1.prototype._reset.call(this),this._translateSurface(),this._data=this._readData(),this._hasData()&&this._load(this._data)},M1.prototype._initRoot=function(){this._root=new T1,this.surface.draw(this._root)},M1.prototype._beforeReset=function(){this.surface.clear(),this._initRoot()},M1.prototype._resize=function(){this.surface.size(this.map.size())},M1.prototype._readData=function(){var t=d1.prototype._readData.call(this);return"FeatureCollection"===t.type?t.features:"GeometryCollection"===t.type?t.geometries:t},M1.prototype._load=function(t){this._data=t,this._clearMarkers(),this._loader||(this._loader=new z1(this.map,this.options.style,this));for(var e=new T1,i=0;i<t.length;i++){var o=this._loader.parse(t[i]);o&&e.append(o)}this._root.clear(),this._root.append(e)},M1.prototype.shapeCreated=function(t){var e=!1;return e=(e=t instanceof M.drawing.Circle&&this.map.options.renderPointsAsMarkers?k(this._createMarker(t)):e)||this.map.trigger("shapeCreated",{layer:this,shape:t})},M1.prototype.featureCreated=function(t){(t.layer=this).map.trigger("shapeFeatureCreated",t)},M1.prototype._createMarker=function(t){t=this.map.markers.bind({location:t.location},t.dataItem);return t&&this._markers.push(t),t},M1.prototype._clearMarkers=function(){for(var t=0;t<this._markers.length;t++)this.map.markers.remove(this._markers[t]);this._markers=[]},M1.prototype._pan=function(){this._panning||(this._panning=!0,this.surface.suspendTracking())},M1.prototype._panEnd=function(t){d1.prototype._panEnd.call(this,t),this._translateSurface(),this.surface.resumeTracking(),this._panning=!1},M1.prototype._translateSurface=function(){var t=this.map,t=t.locationToView(t.extent().nw);this.surface.translate&&(this.surface.translate(t),this.movable.moveTo({x:t.x,y:t.y}))},M1.prototype._eventArgs=function(t){return{layer:this,layerIndex:this._layerIndex(),shape:t.element,shapeIndex:(this._data||[]).indexOf(t.element.dataItem),originalEvent:t.originalEvent}},M1.prototype._handler=function(e){var i=this;return function(t){t.element&&i.map.trigger(e,i._eventArgs(t))}},M1.prototype._mouseenter=function(t){var e;t.element&&(this.map.trigger("shapeMouseEnter",this._eventArgs(t)),e=t.element,t=this._tooltipAnchor(t),this.map._tooltip.show(t,this._tooltipContext(e)))},M1.prototype._tooltipContext=function(t){return{type:"shape",layerIndex:this._layerIndex(),className:"k-map-shape-tooltip",dataItem:t.dataItem,location:t.location}},M1.prototype._tooltipAnchor=function(t){t=this.map.eventOffset(t.originalEvent);return{top:t.y,left:t.x}},M1.prototype._activate=function(){d1.prototype._activate.call(this),this._panHandler=fb(this._pan,this),this.map.bind("pan",this.panHandler)},M1.prototype._deactivate=function(){d1.prototype._deactivate.call(this),this.map.unbind("pan",this._panHandler)},M1);function M1(t,e){d1.call(this,t,e),this._pan=fb(this._pan,this),this.surface=M.drawing.Surface.create(this.element,{width:t.scrollElement.clientWidth,height:t.scrollElement.clientHeight}),this._initRoot(),this.movable=new P1(this.surface.element),this._markers=[],this._click=this._handler("shapeClick"),this.surface.bind("click",this._click),this._mouseleave=this._handler("shapeMouseLeave"),this.surface.bind("mouseleave",this._mouseleave),this.surface.bind("mouseenter",this._mouseenter.bind(this))}function O1(t){f1.call(this);var e=this,t=(e.element=t,e.element.style.transformOrigin="left top",e.x=0,e.y=0,e.scale=1,u1(e.x,e.y,e.scale));e.element.style.transform=t,e._saveCoordinates(t)}function L1(t){g1.call(this);var s,a,l,h=this;_1(h,{elastic:!0},t),t=h.elastic?.5:0,l=h.movable,h.x=s=new S1({axis:"x",dimension:h.dimensions.x,resistance:t,movable:l}),h.y=a=new S1({axis:"y",dimension:h.dimensions.y,resistance:t,movable:l}),h.userEvents.bind(["press","move","end","gesturestart","gesturechange"],{gesturestart:function(t){h.gesture=t,h.offset=re(h.dimensions.container)},press:function(t){var e=t.event.target.closest("a");e&&e.matches("[data-navigate-on-press=true]")&&t.sender.cancel()},gesturechange:function(t){var e=h.gesture,i=e.center,o=t.center,e=t.distance/e.distance,r=h.dimensions.minScale,n=h.dimensions.maxScale,r=(l.scale<=r&&e<1&&(e+=.8*(1-e)),l.scale*e>=n&&(e=n/l.scale),l.x+h.offset.left),n=l.y+h.offset.top,r={x:(r-i.x)*e+o.x-r,y:(n-i.y)*e+o.y-n};l.scaleWith(e),s.dragMove(r.x),a.dragMove(r.y),h.dimensions.rescale(l.scale),(h.gesture=t).preventDefault()},move:function(t){t.event.target.tagName.match(/textarea|input/i)||(s.dimension.enabled||a.dimension.enabled?(s.dragMove(t.x.delta),a.dragMove(t.y.delta),t.preventDefault()):t.touch.skip())},end:function(t){t.preventDefault()}})}function I1(t){y1.call(this),_1(this,t)}function B1(t){v1.call(this);this.x=new k1(_1({horizontal:!0},t)),this.y=new k1(_1({horizontal:!1},t)),this.container=t.container,this.forcedMinScale=t.minScale,this.maxScale=t.maxScale||100,this.bind(b1,t)}function E1(t){m1.call(this);var e=this;e.forcedEnabled=!1,_1(e,t),e.scale=1,e.horizontal?(e.measure="offsetWidth",e.scrollSize="scrollWidth",e.axis="x"):(e.measure="offsetHeight",e.scrollSize="scrollHeight",e.axis="y")}function R1(t,e){x1.call(this);var i=this,o=t[0]||t;i.capture=!1,o.addEventListener?(Fe.down.split(" ").forEach(function(t){o.addEventListener(t,fb(i._press,i),!0)}),Fe.up.split(" ").forEach(function(t){o.addEventListener(t,fb(i._release,i),!0)})):(Fe.down.split(" ").forEach(function(t){o.attachEvent(t,fb(i._press,i))}),Fe.up.split(" ").forEach(function(t){o.attachEvent(t,fb(i._release,i))})),i.bind(["press","release"],e||{})}e(Ja,{autoBind:!0,zIndex:100});(j1=M.Class)&&(F1.__proto__=j1),((F1.prototype=Object.create(j1&&j1.prototype)).constructor=F1).prototype.parse=function(t){var e=new T1,i=!0;return"Feature"===t.type?(i=!1,this._loadGeometryTo(e,t.geometry,t),this._featureCreated(e,t)):this._loadGeometryTo(e,t,t),e=i&&e.children.length<2?e.children[0]:e},F1.prototype._shapeCreated=function(t){var e=!1;return e=this.observer&&this.observer.shapeCreated?this.observer.shapeCreated(t):e},F1.prototype._featureCreated=function(t,e){this.observer&&this.observer.featureCreated&&this.observer.featureCreated({group:t,dataItem:e,properties:e.properties})},F1.prototype._loadGeometryTo=function(t,e,i){var o,r,n=e.coordinates;switch(e.type){case"LineString":r=this._loadPolygon(t,[n],i),this._setLineFill(r);break;case"MultiLineString":for(o=0;o<n.length;o++)r=this._loadPolygon(t,[n[o]],i),this._setLineFill(r);break;case"Polygon":this._loadPolygon(t,n,i);break;case"MultiPolygon":for(o=0;o<n.length;o++)this._loadPolygon(t,n[o],i);break;case"Point":this._loadPoint(t,n,i);break;case"MultiPoint":for(o=0;o<n.length;o++)this._loadPoint(t,n[o],i)}},F1.prototype._setLineFill=function(t){var e=t.segments;(e.length<4||!e[0].anchor().equals(he(e).anchor()))&&(t.options.fill=null)},F1.prototype._loadShape=function(t,e){return this._shapeCreated(e)||t.append(e),e},F1.prototype._loadPolygon=function(t,e,i){e=this._buildPolygon(e);return e.dataItem=i,e.location=this.locator.viewToLocation(e.bbox().center()),this._loadShape(t,e)},F1.prototype._buildPolygon=function(t){for(var e=new(1<t.length?M.drawing.MultiPath:M.drawing.Path)(this.style),i=0;i<t.length;i++)for(var o=0;o<t[i].length;o++){var r=this.locator.locationToView(J_.fromLngLat(t[i][o]));0===o?e.moveTo(r.x,r.y):e.lineTo(r.x,r.y)}return e},F1.prototype._loadPoint=function(t,e,i){var e=J_.fromLngLat(e),o=this.locator.locationToView(e),o=new M.geometry.Circle(o,10),o=new M.drawing.Circle(o,this.style);return o.dataItem=i,o.location=e,this._loadShape(t,o)};var V1,j1,z1=F1,yx=((V1=Ja)&&(D1.__proto__=V1),((D1.prototype=Object.create(V1&&V1.prototype)).constructor=D1).prototype._readData=function(){return this.options.data||[]},D1.prototype._load=function(t){if(this._data=t,this.surface.clear(),0!==t.length){var e=this.options,i=Ht(e.valueField),o=t.slice(0);o.sort(function(t,e){return i(e)-i(t)});for(var r=this._scaleType(),n=Ht(this.options.locationField),s=0;s<o.length;s++){var a,l,h,p=o[s],c=n(p),u=i(p);k(c)&&k(u)&&(a=a||new r([0,u],[e.minSize,e.maxSize]),c=J_.create(c),h=this.map.locationToView(c),l=a.map(u),(h=this._createSymbol({center:h,size:l,style:e.style,dataItem:p,location:c})).dataItem=p,h.location=c,h.value=u,this._drawSymbol(h))}}},D1.prototype._scaleType=function(){var t=this.options.scale;return Pt(t)?t:U1[t]},D1.prototype._createSymbol=function(t){var e=this.options.symbol;return(e=Pt(e)?e:G1[e])(t)},D1.prototype._drawSymbol=function(t){this.map.trigger("shapeCreated",{layer:this,shape:t})||this.surface.draw(t)},D1.prototype._tooltipContext=function(t){return{type:"bubble",layerIndex:this._layerIndex(),className:"k-map-bubble-tooltip",dataItem:t.dataItem,location:t.location,value:t.value}},D1.prototype._tooltipAnchor=function(t){t=t.element.bbox().center();return{top:t.y,left:t.x}},D1);function D1(){V1.apply(this,arguments)}function F1(t,e,i){j1.call(this),this.observer=i,this.locator=t,this.style=e}e(yx,{locationField:"location",valueField:"value",minSize:0,maxSize:100,scale:"sqrt",symbol:"circle",zIndex:200}),(N1=M.Class)&&($1.__proto__=N1),(($1.prototype=Object.create(N1&&N1.prototype)).constructor=$1).prototype.map=function(t){t=(Math.sqrt(t)-Math.sqrt(this._domain[0]))*this._ratio;return this._range[0]+t};var H1,N1,U1={sqrt:$1},G1={circle:function(t){var e=new M.geometry.Circle(t.center,t.size/2);return new M.drawing.Circle(e,t.style)},square:function(t){var e=new M.drawing.Path(t.style),i=t.size/2,t=t.center;return e.moveTo(t.x-i,t.y-i).lineTo(t.x+i,t.y-i).lineTo(t.x+i,t.y+i).lineTo(t.x-i,t.y+i).close(),e}},W1="mouseenter",X1="mouseleave",Y1=Object.assign,q1="k-marker",Z1="."+q1,Q1=((H1=cx)&&(K1.__proto__=H1),((K1.prototype=Object.create(H1&&H1.prototype)).constructor=K1).prototype.destroy=function(){H1.prototype.destroy.call(this),Ye(this.element,"click",this._markerClickHandler),this.clear()},K1.prototype.add=function(t){if(!yt(t))return this._addOne(t);for(var e=0;e<t.length;e++)this._addOne(t[e])},K1.prototype.remove=function(t){t.destroy();t=(this.items||[]).indexOf(t);-1<t&&this.items.splice(t,1)},K1.prototype.clear=function(){for(var t=0;t<this.items.length;t++)this.items[t].destroy();this.items=[]},K1.prototype.update=function(t){var e=t.location();e&&(t.showAt(this.map.locationToView(e)),this.map.trigger("markerActivate",{marker:t,layer:this}))},K1.prototype._reset=function(){H1.prototype._reset.call(this);for(var t=this.items,e=0;e<t.length;e++)this.update(t[e])},K1.prototype.bind=function(t,e){t=t0.create(t,this.options);if(t.dataItem=e,!this.map.trigger("markerCreated",{marker:t,layer:this}))return this.add(t),t},K1.prototype._addOne=function(t){t=t0.create(t,this.options);return t.addTo(this),t},K1.prototype._readData=function(){return this.options.data||[]},K1.prototype._load=function(t){this._data=t,this.clear();for(var e=Ht(this.options.locationField),i=Ht(this.options.titleField),o=0;o<t.length;o++){var r=t[o];this.bind({location:e(r),title:i(r)},r)}},K1.prototype._markerClick=function(t){var e=t.currentTarget._kendoNode,e={layer:this,layerIndex:this._layerIndex(),marker:e,markerIndex:(this.items||[]).indexOf(e),originalEvent:t};this.map.trigger("markerClick",e)},K1.prototype._markerMouseEnter=function(t){t=this._createMarkerEventArgs(t);this.map.trigger("markerMouseEnter",t)},K1.prototype._markerMouseLeave=function(t){t=this._createMarkerEventArgs(t);this.map.trigger("markerMouseLeave",t)},K1.prototype._createMarkerEventArgs=function(t){var e=t.marker;return Y1({},{layer:this,layerIndex:this._layerIndex(),marker:e,markerIndex:(this.items||[]).indexOf(e)},t)},K1);function K1(t,e){H1.call(this,t,e),this._markerClickHandler=fb(this._markerClick,this),Xe(this.element,"click",Z1,this._markerClickHandler),this.items=[],this._load(this._readData())}function $1(t,e){N1.call(this),this._domain=t,this._range=e;t=Math.sqrt(t[1])-Math.sqrt(t[0]),e=e[1]-e[0];this._ratio=e/t}e(Q1,{zIndex:1e3,autoBind:!0,locationField:"location",titleField:"title",template:""});(J1=M.Class)&&(i0.__proto__=J1),((i0.prototype=Object.create(J1&&J1.prototype)).constructor=i0).prototype.destroy=function(){this.layer=null,this.unbindEvents(),this.hide()},i0.prototype.addTo=function(t){this.layer=t.markers||t,this.layer.items.push(this),this.layer.update(this)},i0.prototype.location=function(t){return t?(this.options.location=J_.create(t).toArray(),this.layer&&this.layer.update(this),this):J_.create(this.options.location)},i0.prototype.showAt=function(t){this.render(),this._anchor={left:Math.round(t.x),top:Math.round(t.y)},this.element.style.left=mb(this._anchor.left),this.element.style.top=mb(this._anchor.top)},i0.prototype.hide=function(){this.element&&(this.element.remove(),this.element=null)},i0.prototype.bindEvents=function(){this.element&&(this._mouseEnterHandler=fb(this._mouseEnter,this),Xe(this.element,W1,Z1,this._mouseEnterHandler),this._mouseLeaveHandler=fb(this._mouseLeave,this),Xe(this.element,X1,Z1,this._mouseLeaveHandler))},i0.prototype.unbindEvents=function(){this.element&&(Ye(this.element,W1,this._mouseEnterHandler),Ye(this.element,X1,this._mouseLeaveHandler))},i0.prototype.render=function(){var t,e,i,o,r;this.element||(t=this.options,e=this.layer,vt(i=document.createElement("span"),q1),this.options.template?(o=this._compileTemplate(this.options.template)(this.dataItem),o=Cb(o),i.appendChild(o)):t.svgIcon?we(i,{icon:t.svgIcon,iconClass:"k-icon-xxl",svgIcons:this.options.icons.svgIcons,type:"svg"}):(o={icon:"map-marker",iconClass:"k-icon-xxl",svgIcons:this.options.icons.svgIcons,type:this.options.icons.type},t.shape?"pinTarget"===t.shape?(o.icon="map-marker-target",we(i,o)):"pin"===t.shape?we(i,o):vt(i,"k-icon k-icon-xxl k-i-marker-"+vb(t.shape||"pin")):we(i,o)),t.title&&i.setAttribute("title",t.title),r=t.attributes||{},Object.keys(r).forEach(function(t){i.setAttribute(t,r[t])}),i._kendoNode=this,i.style.zIndex=t.zIndex,this.element=i,e&&e.element.appendChild(this.element),this.bindEvents())},i0.prototype._mouseEnter=function(t){t=this._createEventArgs(t);this.layer._markerMouseEnter(t),this.layer.map._tooltip.show({top:this._anchor.top-this.element.offsetHeight,left:this._anchor.left},this._tooltipContext())},i0.prototype._tooltipContext=function(){return{type:"marker",layerIndex:this.layer._layerIndex(),className:"k-map-marker-tooltip",dataItem:this.dataItem,title:this.options.title,location:this.location()}},i0.prototype._mouseLeave=function(t){t=this._createEventArgs(t);this.layer._markerMouseLeave(t)},i0.prototype._createEventArgs=function(t){return{marker:this,originalEvent:t}},i0.prototype._compileTemplate=function(t){return Vt.compile(t,{paramName:"dataItem",useWithBlock:!1})},i0.create=function(t,e){return t instanceof i0?t:new i0(O({},e,t))};var J1,t0=i0,e0=Object.assign;function i0(t){J1.call(this),this.options=t||{}}function o0(t){window.requestAnimationFrame(t)}(p0=M.Class)&&(C0.__proto__=p0),((C0.prototype=Object.create(p0&&p0.prototype)).constructor=C0).prototype.tick=function(){},C0.prototype.done=function(){},C0.prototype.onEnd=function(){},C0.prototype.onCancel=function(){},C0.prototype.start=function(){this.enabled()&&(this.done()?this.onEnd():(this._started=!0,o0(this._tickProxy)))},C0.prototype.enabled=function(){return!0},C0.prototype.cancel=function(){this._started=!1,this.onCancel()},C0.prototype._tick=function(){this._started&&(this.tick(),this.done()?(this._started=!1,this.onEnd()):o0(this._tickProxy))};var r0,n0,s0,a0,l0,h0,p0,fx=C0,c0=((h0=fx)&&(S0.__proto__=h0),((S0.prototype=Object.create(h0&&h0.prototype)).constructor=S0).prototype.done=function(){return this.timePassed()>=this.duration},S0.prototype.timePassed=function(){return Math.min(this.duration,Qe()-this.startDate)},S0.prototype.moveTo=function(t){var e=this,i=e.movable;e.initial=i[e.axis],e.delta=t.location-e.initial,e.duration="number"==typeof t.duration?t.duration:300,e.tick=e._easeProxy(t.ease),e.startDate=Qe(),e.start()},S0.prototype._easeProxy=function(t){var e=this;return function(){e.movable.moveAxis(e.axis,t(e.timePassed(),e.initial,e.delta,e.duration))}},S0.easeOutExpo=function(t,e,i,o){return t===o?e+i:i*(1-Math.pow(2,-10*t/o))+e},S0),u0=Object.assign,d0=Math.abs,f0="change",g0=((l0=fx)&&(A0.__proto__=l0),((A0.prototype=Object.create(l0&&l0.prototype)).constructor=A0).prototype.enabled=function(){return this.movable.scale<this.dimensions.minScale},A0.prototype.done=function(){return this.dimensions.minScale-this.movable.scale<.01},A0.prototype.tick=function(){var t=this.movable;t.scaleWith(1.1),this.dimensions.rescale(t.scale)},A0.prototype.onEnd=function(){var t=this.movable;t.scaleTo(this.dimensions.minScale),this.dimensions.rescale(t.scale)},A0),y0=((a0=fx)&&(k0.__proto__=a0),((k0.prototype=Object.create(a0&&a0.prototype)).constructor=k0).prototype.onCancel=function(){this.transition.cancel()},k0.prototype.freeze=function(t){this.cancel(),this._moveTo(t)},k0.prototype.onEnd=function(){this.paneAxis.outOfBounds()?this._snapBack():this._end()},k0.prototype.done=function(){return d0(this.velocity)<1},k0.prototype.start=function(t){var e=this;e.dimension.enabled&&(e.paneAxis.outOfBounds()?e.transition._started?(e.transition.cancel(),e.velocity=Math.min(t.touch[e.axis].velocity*e.velocityMultiplier,55),a0.prototype.start.call(this)):e._snapBack():(t=2===t.touch.id?0:t.touch[e.axis].velocity,e.velocity=Math.max(Math.min(t*e.velocityMultiplier,55),-55),e.tapCapture.captureNext(),a0.prototype.start.call(this)))},k0.prototype.tick=function(){var t=this,e=t.dimension,i=t.paneAxis.outOfBounds()?.5:t.friction,i=t.velocity*=i,i=t.movable[t.axis]+i;!t.elastic&&e.outOfBounds(i)&&(i=Math.max(Math.min(i,e.max),e.min),t.velocity=0),t.movable.moveAxis(t.axis,i)},k0.prototype._end=function(){this.tapCapture.cancelCapture(),this.end()},k0.prototype._snapBack=function(){var t=this.dimension,t=this.movable[this.axis]>t.max?t.max:t.min;this._moveTo(t)},k0.prototype._moveTo=function(t){this.transition.moveTo({location:t,duration:500,ease:c0.easeOutExpo})},k0),v0=((s0=fx)&&(w0.__proto__=s0),((w0.prototype=Object.create(s0&&s0.prototype)).constructor=w0).prototype.tick=function(){this._updateCoordinates(),this.moveTo(this.origin)},w0.prototype.done=function(){return d0(this.offset.y)<5&&d0(this.offset.x)<5},w0.prototype.onEnd=function(){this.moveTo(this.destination),this.callback&&this.callback.call()},w0.prototype.setCoordinates=function(t,e){this.offset={},this.origin=t,this.destination=e},w0.prototype.setCallback=function(t){t&&Pt(t)&&(this.callback=t)},w0.prototype._updateCoordinates=function(){this.offset={x:(this.destination.x-this.origin.x)/4,y:(this.destination.y-this.origin.y)/4},this.origin={y:this.origin.y+this.offset.y,x:this.origin.x+this.offset.x}},w0),m0=((n0=M.Class)&&(b0.__proto__=n0),((b0.prototype=Object.create(n0&&n0.prototype)).constructor=b0).prototype.refresh=function(){var t=this.axis,e=this.dimension,i=e.size,o=this.scrollMovable,e=i/e.total,o=Math.round(-o[t]*e),r=Math.round(i*e);this.element.style.display=1<=e?"none":"",i<o+r?r=i-o:o<0&&(r+=o,o=0),this.elementSize!==r&&(this.element.style[this.size]=r+"px",this.elementSize=r),this.movable.moveAxis(t,o)},b0.prototype.show=function(){this.element.style.opacity=.7,this.element.style.visibility="visible"},b0.prototype.hide=function(){this.alwaysVisible||(this.element.style.opacity=0)},b0),x0=((r0=ii)&&(_0.__proto__=r0),((_0.prototype=Object.create(r0&&r0.prototype)).constructor=_0).prototype._initOptions=function(t){this.options=O({},this.options,t)},_0.prototype._wheelScroll=function(t){var e,i;t.ctrlKey||(this._wheel||(this._wheel=!0,this._wheelY=0,this.userEvents.press(0,this._wheelY)),clearTimeout(this._wheelTimeout),this._wheelTimeout=setTimeout(this._wheelEnd,50),i=t.wheelDeltaY,t.wheelDelta?void 0!==i&&!i||(e=t.wheelDelta):t.detail&&t.axis===t.VERTICAL_AXIS&&(e=10*-t.detail),e&&(this._wheelY+=e,this.userEvents.move(0,this._wheelY)),t.preventDefault())},_0.prototype.makeVirtual=function(){this.dimensions.y.makeVirtual()},_0.prototype.virtualSize=function(t,e){this.dimensions.y.virtualSize(t,e)},_0.prototype.height=function(){return this.dimensions.y.size},_0.prototype.scrollHeight=function(){return this.scrollElement.scrollHeight},_0.prototype.scrollWidth=function(){return this.scrollElement.scrollWidth},_0.prototype._resize=function(){this._native||this.contentResized()},_0.prototype.setOptions=function(t){this._initOptions(t),t.pullToRefresh&&this._initPullToRefresh()},_0.prototype.reset=function(){this._native?this.scrollElement.scrollTop(0):(this.movable.moveTo({x:0,y:0}),this._scale(1))},_0.prototype.contentResized=function(){this.dimensions.refresh(),this.pane.x.outOfBounds()&&this.movable.moveAxis("x",this.dimensions.x.min),this.pane.y.outOfBounds()&&this.movable.moveAxis("y",this.dimensions.y.min)},_0.prototype.zoomOut=function(){var t=this.dimensions;t.refresh(),this._scale(t.fitScale),this.movable.moveTo(t.centerCoordinates())},_0.prototype.enable=function(){this.enabled=!0},_0.prototype.disable=function(){this.enabled=!1},_0.prototype.scrollTo=function(t,e){this._native?(this.scrollElement.scrollLeft(d0(t)),this.scrollElement.scrollTop(d0(e))):(this.dimensions.refresh(),this.movable.moveTo({x:t,y:e}))},_0.prototype.animatedScrollTo=function(t,e,i){var o;this._native?this.scrollTo(t,e):(o={x:this.movable.x,y:this.movable.y},this.animatedScroller.setCoordinates(o,{x:t,y:e}),this.animatedScroller.setCallback(i),this.animatedScroller.start())},_0.prototype.pullHandled=function(){},_0.prototype.destroy=function(){Ye(this.element,"wheel",this._wheelScrollHandler),this.userEvents&&this.userEvents.destroy()},_0.prototype._scale=function(t){this.dimensions.rescale(t),this.movable.scaleTo(t)},_0.prototype._initPullToRefresh=function(){},_0.prototype._dragEnd=function(){},_0.prototype._paneChange=function(){},_0.prototype._initAxis=function(t){var e=this,i=e.movable,o=e.dimensions[t],r=e.tapCapture,n=e.pane[t],s=new m0({axis:t,movable:i,dimension:o,container:e.element,alwaysVisible:e.options.visibleScrollHints});o.bind(f0,function(){s.refresh()}),n.bind(f0,function(){s.show()}),e[t+"inertia"]=new y0({axis:t,paneAxis:n,movable:i,tapCapture:r,userEvents:e.userEvents,dimension:o,elastic:e.options.elastic,friction:e.options.friction||.96,velocityMultiplier:e.options.velocityMultiplier||10,end:function(){s.hide(),e.trigger("scrollEnd",{axis:t,scrollTop:e.scrollTop,scrollLeft:e.scrollLeft})}})},_0);function _0(t,e){r0.call(this);var r=this;this.element=t,this._initOptions(e);navigator.userAgent;e=(e=qe().mobileOS).ios||e.android,r._native=r.options.useNative&&e,e=Cb('<div class="km-scroll-header"/>');if(r._native)vt(t,"km-native-scroller"),yb(e,t),u0(r,{scrollElement:t,fixedContainer:t.children[0]});else{t.style.overflow="hidden",vt(t,"km-scroll-wrapper");var i=t,o=Cb('<div class="km-scroll-container"/>');for(i.appendChild(o);i.firstChild!==o;)o.appendChild(i.firstChild);yb(e,t);var e=t.children[1],n=new w1(t),s=new P1(e),a=new A1({element:e,container:t,forcedEnabled:r.options.zoom}),l=this.options.avoidScrolling,h=new Ii(t,{touchAction:"none",allowSelection:!0,preventDragEvent:!0,captureUpIfMoved:!0,multiTouch:r.options.zoom,supportDoubleTap:r.options.supportDoubleTap,start:function(t){a.refresh();var e=d0(t.x.velocity),i=d0(t.y.velocity),o=i<=2*e,e=e<=2*i;!r.fixedContainer.contains(t.event.target)&&!l(t)&&r.enabled&&(a.x.enabled&&o||a.y.enabled&&e)?h.capture():h.cancel()}}),p=new C1({movable:s,dimensions:a,userEvents:h,elastic:r.options.elastic}),c=new g0({movable:s,dimensions:a,userEvents:h,tapCapture:n}),u=new v0({moveTo:function(t){r.scrollTo(t.x,t.y)}});s.bind(f0,function(){r.scrollTop=-s.y,r.scrollLeft=-s.x,r.trigger("scroll",{scrollTop:r.scrollTop,scrollLeft:r.scrollLeft})}),r.options.mousewheelScrolling&&(this._wheelScrollHandler=this._wheelScroll.bind(this),Xe(t,"wheel",this._wheelScrollHandler)),u0(r,{movable:s,dimensions:a,zoomSnapBack:c,animatedScroller:u,userEvents:h,pane:p,tapCapture:n,pulled:!1,enabled:!0,scrollElement:e,scrollTop:0,scrollLeft:0,fixedContainer:t.children[0]}),r._initAxis("x"),r._initAxis("y"),r._wheelEnd=function(){r._wheel=!1,r.userEvents.end(0,r._wheelY)},a.refresh(),r.options.pullToRefresh&&r._initPullToRefresh()}}function b0(t){n0.call(this);var e="x"===t.axis,i=Cb('<div class="km-touch-scrollbar km-'+(e?"horizontal":"vertical")+'-scrollbar" />');u0(this,t,{element:i,elementSize:0,movable:new P1(i),scrollMovable:t.movable,alwaysVisible:t.alwaysVisible,size:e?"width":"height"}),this.scrollMovable.bind(f0,this.refresh.bind(this)),this.container.appendChild(i),t.alwaysVisible&&this.show()}function w0(t){s0.call(this,t),u0(this,t,{origin:{},destination:{},offset:{}})}function k0(t){a0.call(this);var e=this;u0(e,t,{transition:new c0({axis:t.axis,movable:t.movable,onEnd:function(){e._end()}})}),e.tapCapture.bind("press",function(){e.cancel()}),e.userEvents.bind("end",fb(e.start,e)),e.userEvents.bind("gestureend",fb(e.start,e)),e.userEvents.bind("tap",fb(e.onEnd,e))}function A0(t){l0.call(this,t);u0(this,t),this.userEvents.bind("gestureend",this.start.bind(this)),this.tapCapture.bind("press",this.cancel.bind(this))}function S0(t){h0.call(this),e0(this,t)}function C0(){p0.call(this);this._tickProxy=fb(this._tick,this),this._started=!1}e(x0,{name:"Scroller",zoom:!1,pullOffset:140,visibleScrollHints:!1,elastic:!0,useNative:!1,mousewheelScrolling:!0,avoidScrolling:function(){return!1},pullToRefresh:!1,messages:{pullTemplate:"Pull to refresh",releaseTemplate:"Release to refresh",refreshTemplate:"Refreshing"}}),xb(x0,["pull","scroll","resize"]);function P0(t,e){this.sender=(e=void 0===e?{}:e).sender||t,this.widget=t,this.rtl=Boolean(e.rtl)}P0.prototype.notify=function(t,e){this.widget&&this.widget.trigger(t,e)};let T0=P0;var M0,O0=Math,L0=O0.min,I0=O0.pow,B0=M.geometry.Point,E0="marker",R0="location",V0={bubble:yx,shape:Ja,tile:lx},i=(V0[E0]=Q1,(M0=ii)&&(B.__proto__=M0),((B.prototype=Object.create(M0&&M0.prototype)).constructor=B).prototype.destroy=function(){this.scroller.destroy(),this._tooltip&&this._tooltip.destroy(),this.navigator&&this.navigator.destroy(),this.attribution&&this.attribution.destroy(),this.zoomControl&&this.zoomControl.destroy(),yt(this.markers)?this.markers.forEach(function(t){t.destroy()}):this.markers.destroy();for(var t=0;t<this.layers.length;t++)this.layers[t].destroy();Ye(this.element,"wheel",this._mousewheelHandler),M0.prototype.destroy.call(this)},B.prototype._init=function(t,e,i,o){void 0===e&&(e={}),void 0===i&&(i={}),void 0===o&&(o={}),this.support=qe(),this.context=o,this.initObserver(o),this.initServices(o),this._notifyObserver("init"),this._initOptions(e),this._setEvents(e),this.crs=new Sb,this._initElement(t),this._viewOrigin=this._getOrigin(),this._tooltip=this._createTooltip(),this._initScroller(),this._initMarkers(),this._initControls(),this._initLayers(),this._reset();var r=(0,M.throttle)(this._mousewheel.bind(this),50);this._mousewheelHandler=function(t){t.preventDefault(),r(t)},Xe(this.element,"wheel",this._mousewheelHandler)},B.prototype._initOptions=function(t){this.options=O({},this.options,t)},B.prototype._initElement=function(t){vt(this.element=t,"k-map"),t.style.position="relative",t.setAttribute("data-role","map"),gb(t);t=Cb("<div />");this.element.appendChild(t)},B.prototype.initServices=function(t){void 0===t&&(t={}),this.widgetService=new T0(this,t)},B.prototype.initObserver=function(t){void 0===t&&(t={}),this.observers=[],this.addObserver(t.observer)},B.prototype.addObserver=function(t){t&&this.observers.push(t)},B.prototype.removeObserver=function(t){t=this.observers.indexOf(t);0<=t&&this.observers.splice(t,1)},B.prototype.requiresHandlers=function(t){for(var e=this.observers,i=0;i<e.length;i++)if(e[i].requiresHandlers(t))return!0},B.prototype.trigger=function(t,e){for(var i=((e=void 0===e?{}:e).sender=this).observers,o=!1,r=0;r<i.length;r++)i[r].trigger(t,e)&&(o=!0);return o||M0.prototype.trigger.call(this,t,e),o},B.prototype._notifyObserver=function(t,e){for(var i=((e=void 0===e?{}:e).sender=this).observers,o=!1,r=0;r<i.length;r++)i[r].trigger(t,e)&&(o=!0);return o},B.prototype.zoom=function(t){var e=this.options,t=k(t)?(t=O0.round(x(t,e.minZoom,e.maxZoom)),e.zoom!==t&&(e.zoom=t,this.widgetService.notify("zoomChange",{zoom:e.zoom}),this._reset()),this):e.zoom;return t},B.prototype.center=function(t){var e=t?(t=J_.create(t),e=J_.create(this.options.center),t.equals(e)||(this.options.center=t.toArray(),this.widgetService.notify(Wb,{center:this.options.center}),this._reset()),this):J_.create(this.options.center);return e},B.prototype.extent=function(t){t=t?(this._setExtent(t),this):this._getExtent();return t},B.prototype.setOptions=function(t){void 0===t&&(t={});var e=this.element;this.destroy(),gb(e),this._init(e,t,{},this.context),this._reset()},B.prototype.locationToLayer=function(t,e){var i=!this.options.wraparound,t=J_.create(t);return this.crs.toPoint(t,this._layerSize(e),i)},B.prototype.layerToLocation=function(t,e){var i=!this.options.wraparound,t=B0.create(t);return this.crs.toLocation(t,this._layerSize(e),i)},B.prototype.locationToView=function(t){var t=J_.create(t),e=this.locationToLayer(this._viewOrigin);return this.locationToLayer(t).translateWith(e.scale(-1))},B.prototype.viewToLocation=function(t,e){var i=this.locationToLayer(this._getOrigin(),e),t=B0.create(t).clone().translateWith(i);return this.layerToLocation(t,e)},B.prototype.eventOffset=function(t){var e,i=re(this.element);return t=t.x&&t.x[R0]||t.y&&t.y[R0]?(e=t.x[R0]-i.left,t.y[R0]-i.top):(t=t.originalEvent||t,e=_(t.pageX,t.clientX)-i.left,_(t.pageY,t.clientY)-i.top),new M.geometry.Point(e,t)},B.prototype.eventToView=function(t){t=this.eventOffset(t);return this.locationToView(this.viewToLocation(t))},B.prototype.eventToLayer=function(t){return this.locationToLayer(this.eventToLocation(t))},B.prototype.eventToLocation=function(t){t=this.eventOffset(t);return this.viewToLocation(t)},B.prototype.viewSize=function(){var t=this.element,e=this._layerSize(),i=t.clientWidth;return{width:i=this.options.wraparound?i:L0(e,i),height:L0(e,t.clientHeight)}},B.prototype.exportVisual=function(){return this._reset(),!1},B.prototype.hideTooltip=function(){this._tooltip&&this._tooltip.hide()},B.prototype._setOrigin=function(t,e){var i=this.viewSize(),t=this._origin=J_.create(t);return(t=this.locationToLayer(t,e)).x+=i.width/2,t.y+=i.height/2,this.options.center=this.layerToLocation(t,e).toArray(),this.widgetService.notify(Wb,{center:this.options.center}),this},B.prototype._getOrigin=function(t){var e=this.viewSize();return!t&&this._origin||((t=this.locationToLayer(this.center())).x-=e.width/2,t.y-=e.height/2,this._origin=this.layerToLocation(t)),this._origin},B.prototype._setExtent=function(t){var e=Gb.create(t),i=e.se.clone(),o=(this.options.wraparound&&i.lng<0&&0<t.nw.lng&&(i.lng=180+(180+i.lng)),new Gb(e.nw,i));this.center(o.center());for(var r=this.element.clientWidth,n=this.element.clientHeight,s=this.options.maxZoom;s>=this.options.minZoom;s--){var a=this.locationToLayer(o.nw,s),l=this.locationToLayer(o.se,s),h=O0.abs(l.x-a.x),l=O0.abs(l.y-a.y);if(h<=r&&l<=n)break}this.zoom(s)},B.prototype._getExtent=function(){var t=this._getOrigin(),e=this.locationToLayer(t),i=this.viewSize(),i=(e.x+=i.width,e.y+=i.height,this.layerToLocation(e));return new Gb(t,i)},B.prototype._zoomAround=function(t,e){this._setOrigin(this.layerToLocation(t,e),e),this.zoom(e)},B.prototype._initControls=function(){var t=this.options.controls;t.attribution&&this._createAttribution(t.attribution),this.support.mobileOS||(t.navigator&&this._createNavigator(t.navigator),t.zoom&&this._createZoomControl(t.zoom))},B.prototype._createControlElement=function(t,e){var i,t=t.position||e,e="."+_b(t).replace(" ","."),e=this.element.querySelector(".k-map-controls"+e)||[],t=(0===e.length&&(vt(i=document.createElement("div"),"k-map-controls "+_b(t)),this.element.appendChild(e=i)),document.createElement("div"));return e.appendChild(t),t},B.prototype._createAttribution=function(t){var e=this._createControlElement(t,"bottomRight");this.attribution=new Pb(e,t)},B.prototype._createNavigator=function(t){var e=this._createControlElement(t,"topLeft"),e=this.navigator=new Eb(e,O({},t,{icons:this.options.icons}));this._navigatorPan=this._navigatorPan.bind(this),e.bind("pan",this._navigatorPan),this._navigatorCenter=this._navigatorCenter.bind(this),e.bind("center",this._navigatorCenter)},B.prototype._navigatorPan=function(t){var e=this.scroller,i=e.scrollLeft+t.x,e=e.scrollTop-t.y,t=this._virtualSize,o=this.element.clientWidth,r=this.element.clientHeight,i=x(i,t.x.min,t.x.max-o),e=x(e,t.y.min,t.y.max-r);this.scroller.one("scroll",fb(this._scrollEnd,this)),this.scroller.scrollTo(-i,-e)},B.prototype._navigatorCenter=function(){this.center(this.options.center)},B.prototype._createZoomControl=function(t){var e=this._createControlElement(t,"topLeft"),e=this.zoomControl=new zb(e,t,this.options.icons);this._zoomControlChange=this._zoomControlChange.bind(this),e.bind("change",this._zoomControlChange)},B.prototype._zoomControlChange=function(t){this.trigger("zoomStart",{originalEvent:t})||(this.zoom(this.zoom()+t.delta),this.trigger("zoomEnd",{originalEvent:t}))},B.prototype._initScroller=function(){var t=this.support.mobileOS?.93:.9,e=!1!==this.options.zoomable,t=this.scroller=new x0(this.element.children[0],{friction:t,velocityMultiplier:5,zoom:e,mousewheelScrolling:!1,supportDoubleTap:!0});t.bind("scroll",fb(this._scroll,this)),t.bind("scrollEnd",fb(this._scrollEnd,this)),t.userEvents.bind("gesturestart",fb(this._scaleStart,this)),t.userEvents.bind("gestureend",fb(this._scale,this)),t.userEvents.bind("doubleTap",fb(this._doubleTap,this)),t.userEvents.bind("tap",fb(this._tap,this)),this.scrollElement=t.scrollElement},B.prototype._initLayers=function(){for(var t=this.options.layers,e=this.layers=[],i=0;i<t.length;i++){var o=t[i],o=this._createLayer(o);e.push(o)}},B.prototype._createLayer=function(t){var e=t.type||"shape",i=this.options.layerDefaults[e],i=e===E0?O({},this.options.markerDefaults,t,{icons:this.options.icons}):O({},i,t),t=new V0[e](this,i);return e===E0&&(this.markers=t),t},B.prototype._createTooltip=function(){return new Xb(this.widgetService,this.options.tooltip)},B.prototype._initMarkers=function(){0<(this.options.layers||[]).filter(function(t){return t&&t.type===E0}).length||(this.markers=new Q1(this,O({},this.options.markerDefaults,{icons:this.options.icons})),this.markers.add(this.options.markers))},B.prototype._scroll=function(t){var e=this.locationToLayer(this._viewOrigin).round(),i=t.sender.movable,i=new M.geometry.Point(i.x,i.y).scale(-1).scale(1/i.scale);e.x+=i.x,e.y+=i.y,this._scrollOffset=i,this._tooltip.offset=i,this.hideTooltip(),this._setOrigin(this.layerToLocation(e)),this.trigger("pan",{originalEvent:t,origin:this._getOrigin(),center:this.center()})},B.prototype._scrollEnd=function(t){this._scrollOffset&&this._panComplete()&&(this._scrollOffset=null,this._panEndTimestamp=Qe(),this.trigger("panEnd",{originalEvent:t,origin:this._getOrigin(),center:this.center()}))},B.prototype._panComplete=function(){return 50<Qe()-(this._panEndTimestamp||0)},B.prototype._scaleStart=function(t){this.trigger("zoomStart",{originalEvent:t})&&(t=t.touches[1])&&t.cancel()},B.prototype._scale=function(t){var e=this.scroller.movable.scale,e=this._scaleToZoom(e),i=new M.geometry.Point(t.center.x,t.center.y),o=this.viewToLocation(i,e),o=this.locationToLayer(o,e).translate(-i.x,-i.y);this._zoomAround(o,e),this.trigger("zoomEnd",{originalEvent:t})},B.prototype._scaleToZoom=function(t){t=this._layerSize()*t/this.options.minSize,t=O0.log(t)/O0.log(2);return O0.round(t)},B.prototype._reset=function(){this.attribution&&this.attribution.filter(this.center(),this.zoom()),this._viewOrigin=this._getOrigin(!0),this._resetScroller(),this.hideTooltip(),this.trigger("beforeReset"),this.trigger("reset")},B.prototype._resetScroller=function(){var t=this.scroller,e=t.dimensions.x,i=t.dimensions.y,o=this._layerSize(),r=this.extent().nw,r=this.locationToLayer(r).round(),n=(t.movable.round=!0,t.reset(),t.userEvents.cancel(),this.zoom()),t=(t.dimensions.forcedMinScale=I0(2,this.options.minZoom-n),t.dimensions.maxScale=I0(2,this.options.maxZoom-n),{min:-r.x,max:o-r.x}),n={min:-r.y,max:o-r.y};this.options.wraparound&&(t.max=20*o,t.min=-t.max),!1===this.options.pannable&&(r=this.viewSize(),t.min=n.min=0,t.max=r.width,n.max=r.height),e.makeVirtual(),i.makeVirtual(),e.virtualSize(t.min,t.max),i.virtualSize(n.min,n.max),this._virtualSize={x:t,y:n}},B.prototype._renderLayers=function(){},B.prototype._layerSize=function(t){t=_(t,this.options.zoom);return this.options.minSize*I0(2,t)},B.prototype._tap=function(t){var e;this._panComplete()&&(e=this.eventOffset(t),this.hideTooltip(),this.trigger("click",{originalEvent:t,location:this.viewToLocation(e)}))},B.prototype._doubleTap=function(t){var e,i,o;!1===this.options.zoomable||this.trigger("zoomStart",{originalEvent:t})||(e=this.zoom()+1,i=this.eventOffset(t),o=this.viewToLocation(i),o=this.locationToLayer(o,e).translate(-i.x,-i.y),this._zoomAround(o,e),this.trigger("zoomEnd",{originalEvent:t}))},B.prototype._mousewheel=function(t){var e=0<Jt(t)?-1:1,i=this.options,o=this.zoom(),e=x(o+e,i.minZoom,i.maxZoom);!1===i.zoomable||e===o||this.trigger("zoomStart",{originalEvent:t})||(i=this.eventOffset(t),o=this.viewToLocation(i),o=this.locationToLayer(o,e).translate(-i.x,-i.y),this._zoomAround(o,e),this.trigger("zoomEnd",{originalEvent:t}))},B.prototype._toDocumentCoordinates=function(t){var e=re(this.element);return{left:L(t.x+e.left),top:L(t.y+e.top)}},B);function B(t,e,i,o){void 0===e&&(e={}),void 0===i&&(i={}),void 0===o&&(o={}),M0.call(this),this._init(t,e,i,o)}e(i,{name:"Map",controls:{attribution:!0,navigator:{panStep:100},zoom:!0},layers:[],layerDefaults:{shape:{style:{fill:{color:"#fff"},stroke:{color:"#aaa",width:.5}}},bubble:{style:{fill:{color:"#fff",opacity:.5},stroke:{color:"#aaa",width:.5}}},marker:{shape:"pinTarget",tooltip:{position:"top"}}},center:[0,0],icons:{type:"font",svgIcons:{}},zoom:3,minSize:256,minZoom:1,maxZoom:19,markers:[],markerDefaults:{shape:"pinTarget",tooltip:{position:"top"}},wraparound:!0,renderPointsAsMarkers:!1}),xb(i,["beforeReset","click","markerActivate","markerClick","markerCreated","markerMouseEnter","markerMouseLeave","pan","panEnd","reset","shapeClick","shapeCreated","shapeFeatureCreated","shapeMouseEnter","shapeMouseLeave","zoomEnd","zoomStart"]);let j0=i;function z0(t,e){return t.map(e).reduce(function(t,e){return t+e},0)}function D0(t,e){return N0(t.source,e.source)}function F0(t,e){return N0(t.target,e.target)}function H0(t){return t.value}var N0=function(t,e){return t.y0===e.y0?t.index-e.index:t.y0+t.y1-e.y0-e.y1};function U0(t){t.forEach(function(t){t.targetLinks.forEach(function(t){t.source.sourceLinks.sort(F0)}),t.sourceLinks.forEach(function(t){t.target.targetLinks.sort(D0)})})}function G0(t){var e=t.nodesOptions,i=e.offset,o=(void 0===i&&(i={}),e.align);this.data={nodes:t.nodes.map(function(t){return O({},{offset:i,align:o},t)}),links:t.links.map(function(t){return O({},t)})},this.width=t.width,this.height=t.height,this.offsetX=t.offsetX||0,this.offsetY=t.offsetY||0,this.nodeWidth=t.nodesOptions.width,this.nodePadding=t.nodesOptions.padding,this.reverse=t.reverse,this.targetColumnIndex=t.targetColumnIndex,this.loops=t.loops,this.autoLayout=t.autoLayout}function W0(t){return new G0(t).calculate()}G0.prototype.calculate=function(){var t=this.data,e=t.nodes,t=(this.connectLinksToNodes(e,t.links),this.calculateNodeValues(e),this.calculateNodeHeights(e));if(t)return{nodes:[],links:[],columns:[],circularLinks:t};this.calculateNodeDepths(e);t=this.calculateNodeColumns(e);return this.calculateNodeBreadths(t),this.applyNodesOffset(e),this.calculateLinkBreadths(e),Object.assign({},this.data,{columns:t})},G0.prototype.connectLinksToNodes=function(t,e){var i=new Map;t.forEach(function(t,e){t.index=e,t.sourceLinks=[],t.targetLinks=[],t.id=void 0!==t.id?t.id:t.label.text,i.set(t.id,t)}),e.forEach(function(t){t.source=i.get(t.sourceId),t.target=i.get(t.targetId),t.source.sourceLinks.push(t),t.target.targetLinks.push(t)})},G0.prototype.calculateNodeValues=function(t){t.forEach(function(t){t.value=Math.max(z0(t.sourceLinks,H0),z0(t.targetLinks,H0))})},G0.prototype.calculateNodeDepths=function(t){for(var e=new Set(t),i=new Set,o=0;e.size;){for(var r=Array.from(e),n=0;n<r.length;n++){var s=r[n];s.depth=o;for(var a=0;a<s.sourceLinks.length;a++){var l=s.sourceLinks[a];i.add(l.target)}}o++,e=i,i=new Set}},G0.prototype.calculateNodeHeights=function(t){for(var e=t.length,i=new Set(t),o=new Set,r=0,n=function(t){t.height=r,t.targetLinks.forEach(function(t){o.add(t.source)})};i.size;){if(i.forEach(n),++r>e)return!0;i=o,o=new Set}return!1},G0.prototype.calculateNodeColumns=function(t){for(var e,i=Math.max.apply(null,t.map(function(t){return t.depth})),o=(this.width-this.offsetX-this.nodeWidth)/i,r=new Array(i+1),n=0;n<t.length;n++){var s=t[n],a=Math.max(0,Math.min(i,(e=i,"left"===(a=s).align?a.depth:"right"===a.align?e-a.height:a.sourceLinks.length?a.depth:e)));s.x0=this.offsetX+a*o,s.x1=s.x0+this.nodeWidth,r[s.layer=a]=r[a]||[],r[a].push(s)}return r},G0.prototype.calculateNodeBreadths=function(t){var e=this,o=Math.min.apply(null,t.map(function(t){return(e.height-e.offsetY-(t.length-1)*e.nodePadding)/z0(t,H0)}));if(t.forEach(function(t){var i=e.offsetY;t.forEach(function(t){t.y0=i,t.y1=i+t.value*o,i=t.y1+e.nodePadding,t.sourceLinks.forEach(function(t){t.width=t.value*o})}),i=(e.height-i+e.nodePadding)/(t.length+1),t.forEach(function(t,e){t.y0+=i*(e+1),t.y1+=i*(e+1)})}),!1!==this.autoLayout)for(var i=void 0!==this.loops?this.loops:t.length-1,r=this.targetColumnIndex||1,n=0;n<i;n++)this.reverse?(this.uncurlLinksToRight(t,r),this.uncurlLinksToLeft(t,r)):(this.uncurlLinksToLeft(t,r),this.uncurlLinksToRight(t,r));t.forEach(U0)},G0.prototype.applyNodesOffset=function(t){t.forEach(function(t){var e=(t.offset?t.offset.left:0)||0,i=(t.offset?t.offset.top:0)||0;t.x0+=e,t.x1+=e,t.y0+=i,t.y1+=i})},G0.prototype.calculateLinkBreadths=function(t){t.forEach(function(t){var e=t.sourceLinks,i=t.targetLinks,o=t.y0,r=o;e.forEach(function(t){t.x0=t.source.x1,t.y0=o+t.width/2,o+=t.width}),i.forEach(function(t){t.x1=t.target.x0,t.y1=r+t.width/2,r+=t.width})})},G0.prototype.uncurlLinksToRight=function(t,e){for(var n=this,i=t.length,o=e;o<i;o++){var r=t[o];r.forEach(function(i){var o=0,r=0,t=(i.targetLinks.forEach(function(t){var e=t.value*(i.layer-t.source.layer);o+=n.targetTopPos(t.source,i)*e,r+=e}),0===o?0:o/r-i.y0);i.y0+=t,i.y1+=t,U0([i])}),r.sort(N0),this.arrangeNodesVertically(r)}},G0.prototype.uncurlLinksToLeft=function(t,e){for(var n=this,i=t.length-1-e;0<=i;i--){for(var s=t[i],o=0;o<s.length;o++)(t=>{var i=s[t],o=0,r=0,t=(i.sourceLinks.forEach(function(t){var e=t.value*(t.target.layer-i.layer);o+=n.sourceTopPos(i,t.target)*e,r+=e}),0===o?0:o/r-i.y0);i.y0+=t,i.y1+=t,U0([i])})(o);s.sort(N0),this.arrangeNodesVertically(s)}},G0.prototype.arrangeNodesVertically=function(t){var e=t.length-1;this.arrangeUp(t,this.height,e),this.arrangeDown(t,this.offsetY,0)},G0.prototype.arrangeDown=function(t,e,i){for(var o=e,r=i;r<t.length;r++){var n=t[r],s=Math.max(0,o-n.y0);n.y0+=s,n.y1+=s,o=n.y1+this.nodePadding}},G0.prototype.arrangeUp=function(t,e,i){for(var o=e,r=i;0<=r;--r){var n=t[r],s=Math.max(0,n.y1-o);n.y0-=s,n.y1-=s,o=n.y0-this.nodePadding}},G0.prototype.sourceTopPos=function(t,e){for(var i=e.y0-(e.targetLinks.length-1)*this.nodePadding/2,o=0;o<e.targetLinks.length;o++){var r=e.targetLinks[o];if(r.source===t)break;i+=r.width+this.nodePadding}for(var n=0;n<t.sourceLinks.length;n++){var s=t.sourceLinks[n];if(s.target===e)break;i-=s.width}return i},G0.prototype.targetTopPos=function(t,e){for(var i=t.y0-(t.sourceLinks.length-1)*this.nodePadding/2,o=0;o<t.sourceLinks.length;o++){var r=t.sourceLinks[o];if(r.target===e)break;i+=r.width+this.nodePadding}for(var n=0;n<e.targetLinks.length;n++){var s=e.targetLinks[n];if(s.source===t)break;i-=s.width}return i};function X0(t,e,i,o,r,n){n=(n-e)*(i-t),i=(o-e)*(r-t);return i<n?1:n==i?0:-1}function Y0(t,e,i,o){return e=O({},e,e.node),O({},{color:(i=i,o=o,t.color||i[o%i.length])},e,{node:t},{visual:t.visual,opacity:t.opacity,offset:t.offset,color:t.color})}function q0(t,e,i,o,r){var n=1-r,s=n*n,a=r*r;return t*s*n+3*e*r*s+3*i*a*n+o*a*r}($0=M.Class)&&(lw.__proto__=$0),((lw.prototype=Object.create($0&&$0.prototype)).constructor=lw).prototype.createVisual=function(){this.visual=this.createElement()},lw.prototype.exportVisual=function(){return this.visual},lw.prototype.createElement=function(){var t=this,e=this.options.visual;return e?e({sender:this.getSender(),options:this.visualOptions(),createVisual:function(){return t.getElement()}}):this.getElement()},lw.prototype.getSender=function(){return this};var Z0,Q0,K0,$0,Fs=lw,J0=((K0=Fs)&&(aw.__proto__=K0),((aw.prototype=Object.create(K0&&K0.prototype)).constructor=aw).prototype.getElement=function(){return M.drawing.Path.fromRect(this.getRect(),this.visualOptions())},aw.prototype.getRect=function(){var t=this.options.node;return new M.geometry.Rect([t.x0,t.y0],[t.x1-t.x0,t.y1-t.y0])},aw.prototype.getLabelText=function(t){var e=t.labels.ariaTemplate;if(e)return e({node:t.node})},aw.prototype.visualOptions=function(){var t=O({},this.options,this.options.node),e=this.getLabelText(t);return{fill:{color:t.color,opacity:t.opacity},stroke:{width:0},className:"k-sankey-node",role:"graphics-symbol",ariaRoleDescription:"Node",ariaLabel:e}},aw.prototype.createFocusHighlight=function(){if(this.options.navigatable)return this._highlight=M.drawing.Path.fromRect(this.getRect(),{stroke:this.options.focusHighlight.border,visible:!1}),this._highlight},aw.prototype.focus=function(t){this._highlight&&((t=void 0===(t=(t||{}).highlight)?!0:t)&&this._highlight.options.set("visible",!0),t=this.options.node.id,this.visual.options.set("id",t),this.options.root())&&this.options.root().setAttribute(X,t)},aw.prototype.blur=function(){this._highlight&&(this._highlight.options.set("visible",!1),this.visual.options.set("id",""),this.options.root())&&this.options.root().removeAttribute(X)},aw),tw=((Q0=Fs)&&(sw.__proto__=Q0),((sw.prototype=Object.create(Q0&&Q0.prototype)).constructor=sw).prototype.getElement=function(){var t=this.options.link,e=t.x0,i=t.x1,o=t.y0,t=t.y1,r=(e+i)/2;return new M.drawing.Path(this.visualOptions()).moveTo(e,o).curveTo([r,o],[r,t],[i,t])},sw.prototype.getLabelText=function(t){var e=t.labels.ariaTemplate;if(e)return e({link:t.link})},sw.prototype.visualOptions=function(){var t=this.options,e=this.options.link,i=this.getLabelText(t);return{stroke:{width:t.link.width,color:e.color||t.color,opacity:(k(e.opacity)?e:t).opacity},role:"graphics-symbol",ariaRoleDescription:"Link",ariaLabel:i}},sw.prototype.createFocusHighlight=function(){var t,e,i,o,r,n,s,a,l,h,p,c,u,d,f,g,y,v,m,x;this.options.navigatable&&(t=(m=this.options.link).x0,i=m.y0,o=m.y1,r=(t+(e=m.x1))/2,s=this.options.rtl,h=n=m.width/2,p=s?m.x1:m.x0,c=s?m.x0:m.x1,u=s?m.y1:m.y0,s=s?m.y0:m.y1,f=[d=(p+c)/2,q0(u,u,s,s,.5)],g=[q0(p,d,d,c,.4999),q0(u,u,s,s,.4999)],m=m.width,x=((v=f[0])+(y=g[0]))/2,l=((f=f[1])+(g=g[1]))/2,f=f===g?(a=0,m/2):v===y?(a=m/2,0):(g=-1/((g-f)/(y-v)))*(a=m/2/Math.sqrt(1+g*g)),v=[d,q0(u+h,u+h,s+h,s+h,.5)],m=(y={P1:{x:x-a,y:l-f},P2:{x:x+a,y:l+f}}).P1.y>y.P2.y?y.P1:y.P2,g=p,x=c,h=d-(a=m,l={x:v[0],y:v[1]},f=h,y={x:v[0],y:v[1]},p={x:Math.max(1,v[0]+(s<u?1:-1)*h),y:v[1]},c=(a.x+l.x)/2,d=(a.y+l.y)/2,s=-(l.y-a.y),l=l.x-a.x,a=Math.sqrt(s*s+l*l),u=c+(s=s/a*f),a=d+(l=l/a*f),f=c-s,c=d-l,l=(d=p.y-y.y)*(u-f)-(s=p.x-y.x)*(a-c),(((!(Math.abs(l)<1e-10)&&(p=((u-f)*(c-y.y)-(a-c)*(f-y.x))/l,0<=(a=(s*(c-y.y)-d*(f-y.x))/l))&&a<=1&&0<=p&&p<=1?{x:f+a*(u-f)}:null)||{x:(v[0]+m.x)/2}).x-.125*g-.125*x)/.75),this._highlight=new M.drawing.Path({stroke:this.options.focusHighlight.border,visible:!1}).moveTo(t,i+n).lineTo(t,i-n).curveTo([r+h,i-n],[r+h,o-n],[e,o-n]).lineTo(e,o+n).curveTo([r-h,o+n],[r-h,i+n],[t,i+n]))},sw.prototype.focus=function(t){this._highlight&&((t=void 0===(t=(t||{}).highlight)?!0:t)&&this._highlight.options.set("visible",!0),t=this.options.link.sourceId+"->"+this.options.link.targetId,this.visual.options.set("id",t),this.options.root())&&this.options.root().setAttribute(X,t)},sw.prototype.blur=function(){this._highlight&&(this._highlight.options.set("visible",!1),this.visual.options.set("id",""),this.options.root())&&this.options.root().removeAttribute(X)},sw),ew="inside",iw="before",ow="after",rw=((Z0=Fs)&&(nw.__proto__=Z0),((nw.prototype=Object.create(Z0&&Z0.prototype)).constructor=nw).prototype.getElement=function(){var t,e=O({},this.options,this.options.node.label),i=e.node,o=e.diagramMinX,r=e.diagramMaxX,n=e.text,s=e.offset,a=e.rtl,l=e.position;return a&&l!==ew&&(l=l===iw?ow:iw),e.visible&&n?(e=new I(i.x0,i.y0,i.x1,i.y1),t=this.visualOptions(),a&&!t.align&&(t.align="right"),(n=new So(n,t)).reflow(new I),t=n.box,e=e.center().y-t.height()/2,r=i.x1+t.width()>r,o=i.x0-t.width()<o,r=l===iw||l===ew&&r?iw:ow,a=[(r=a?l===ow||l===ew&&o?ow:iw:r)===iw?i.x0-t.width():i.x1,e],(l=new I(a[0],a[1],a[0]+t.width(),a[1]+t.height())).translate(s.left||0,s.top||0),n.reflow(l),n.renderVisual(),n.visual):null},nw.prototype.visualOptions=function(){var t=O({},this.options,this.options.node.label);return{color:t.color,font:t.font,border:t.border,margin:t.margin,padding:t.padding,align:t.align,paintOrder:t.paintOrder,stroke:t.stroke}},nw);function nw(){Z0.apply(this,arguments)}function sw(){Q0.apply(this,arguments)}function aw(){K0.apply(this,arguments)}function lw(t){$0.call(this),this.options=O({},this.options,t),this.createVisual()}e(rw,{position:ew});function hw(t,e,i,o,r){return O({},e,{node:t,diagramMinX:o,diagramMaxX:r,rtl:i,visual:t.label.visual,visible:t.label.visible,margin:t.label.margin,padding:t.label.padding,border:t.label.border,align:t.label.align,offset:t.label.offset})}(pw=Fs)&&(uw.__proto__=pw),((uw.prototype=Object.create(pw&&pw.prototype)).constructor=uw).prototype.getElement=function(){var t=this.options,e=t.drawingRect,i=t.text;return!1!==t.visible&&i?((i=Mo.buildTitle(i,t)).reflow(e),i.renderVisual(),i.visual):null},uw.prototype.createElement=function(){return this.getElement()};var pw,cw=uw;function uw(){pw.apply(this,arguments)}e(cw,{align:b,border:{width:0},margin:w(5),padding:w(5)});function dw(t,e){return t.node.x0-e.node.x0!=0?t.node.x0-e.node.x0:t.node.y0-e.node.y0}function fw(t,e){return t.node.x1-e.node.x1!=0?t.node.x1-e.node.x1:e.node.y0-t.node.y0}(gw=Fs)&&(vw.__proto__=gw),((vw.prototype=Object.create(gw&&gw.prototype)).constructor=vw).prototype.getElement=function(){var e,t,i=this.options,o=i.drawingRect,r=i.rtl,n=i.nodes,s=(void 0===n&&(n=[]),i.item),a=i.position;return!1!==i.visible&&n.length?((t=i.labels||{}).content&&(e=jt(t)),(t=n.map(function(t){return{text:e?e(t):t.label&&t.label.text||"",area:{background:void 0!==s.areaBackground?s.areaBackground:t.color,opacity:void 0!==s.areaOpacity?s.areaOpacity:t.opacity},node:t}})).sort(r?fw:dw),n=r&&a!==C&&a!==P,(a=new Mu(Object.assign({},i,{data:t,reverse:n}),{rtl:r})).reflow(o),a.renderVisual(),a.visual):null},vw.prototype.createElement=function(){return this.getElement()};var gw,yw=vw;function vw(){gw.apply(this,arguments)}e(yw,{markers:{visible:!1},item:{type:rs,cursor:ft,opacity:1},position:S,align:b,accessibility:{role:"presentation",ariaLabel:null,ariaRoleDescription:null},border:{width:0}});var mw,xw="link",_w="node",bw=((mw=ii)&&(E.__proto__=mw),((E.prototype=Object.create(mw&&mw.prototype)).constructor=E).prototype.destroy=function(){this.unbind(),this._destroySurface(),this._destroyResizeObserver(),this.element&&(this.element.removeEventListener("keydown",this._keydownHandler),this.element.removeEventListener("focus",this._focusHandler),this.element.removeEventListener("mousedown",this._onDownHandler),this.element.removeEventListener("touchstart",this._onDownHandler),this.element.removeEventListener("pointerdown",this._onDownHandler)),this._focusState=null,this.element=null},E.prototype._initElement=function(t){vt(this.element=t,["k-chart","k-sankey"]),t.setAttribute("role","graphics-document");var e=this.options.title;e.text&&t.setAttribute("aria-label",e.text),e.description&&t.setAttribute("aria-roledescription",e.description)},E.prototype._initSurface=function(){this.surface||(this._destroySurface(),this._initSurfaceElement(),this.surface=this._createSurface())},E.prototype._initNavigation=function(t){t.tabIndex=t.getAttribute("tabindex")||0,this.options.disableKeyboardNavigation||(this._keydownHandler=this._keydown.bind(this),this._focusHandler=this._focus.bind(this),this._blurHandler=this._blur.bind(this),this._onDownHandler=this._onDown.bind(this),t.addEventListener("keydown",this._keydownHandler),t.addEventListener("focus",this._focusHandler),t.addEventListener("blur",this._blurHandler),t.addEventListener("mousedown",this._onDownHandler),t.addEventListener("touchstart",this._onDownHandler),t.addEventListener("pointerdown",this._onDownHandler),this._focusState={node:this.firstFocusableNode(),link:null})},E.prototype.firstFocusableNode=function(){return this.columns[0][0]},E.prototype._initResizeObserver=function(){var o=this,t=new ResizeObserver(function(t){t.forEach(function(t){var e=t.contentRect,i=e.width,e=e.height;t.target!==o.element||o.size&&o.size.width===i&&o.size.height===e||(o.size={width:i,height:e},o.surface.setSize(o.size),o.resize=!0,o._redraw())})});(this._resizeObserver=t).observe(this.element)},E.prototype._createSurface=function(){return M.drawing.Surface.create(this.surfaceElement,{mouseenter:this._mouseenter.bind(this),mouseleave:this._mouseleave.bind(this),mousemove:this._mousemove.bind(this),click:this._click.bind(this)})},E.prototype._initTheme=function(t){t=t||this.theme||{};this.theme=t,this.options=O({},t,this.options)},E.prototype.setLinksOpacity=function(e){var i=this;this.linksVisuals.forEach(function(t){i.setOpacity(t,e,t.linkOptions.opacity)})},E.prototype.setLinksInactivityOpacity=function(e){var i=this;this.linksVisuals.forEach(function(t){i.setOpacity(t,e,t.linkOptions.highlight.inactiveOpacity)})},E.prototype.setOpacity=function(t,e,i){t.options.set("stroke",Object.assign({},t.options.stroke,{opacity:k(i)?i:e}))},E.prototype.trigger=function(t,e){var i=e.element.dataItem,o=e.element.type,e=Object.assign({},e,{type:t,targetType:o,dataItem:i});return mw.prototype.trigger.call(this,t,e)},E.prototype._mouseenter=function(t){var e=t.element,i=e.type===xw,o=e.type===_w,r=Boolean(e.chartElement&&e.chartElement.options.node);i&&this.trigger("linkEnter",t)||o&&this.trigger("nodeEnter",t)||(t=this.options.links.highlight,i?(this.setLinksInactivityOpacity(t.inactiveOpacity),this.setOpacity(e,t.opacity,e.linkOptions.highlight.opacity)):o?this.highlightLinks(e,t):r&&(i=this.nodesVisuals.get(e.chartElement.options.node.id),this.highlightLinks(i,t)))},E.prototype._mouseleave=function(t){var e=this,i=t.element,o=i.type===xw,r=i.type===_w,i=Boolean(i.chartElement&&i.chartElement.options.node),n=t.originalEvent.relatedTarget;o&&n&&"text"===n.nodeName||((o||r)&&(this.tooltipTimeOut&&(clearTimeout(this.tooltipTimeOut),this.tooltipTimeOut=null),this.tooltipShown=!1,this.trigger("tooltipHide",t)),o&&this.trigger("linkLeave",t))||r&&this.trigger("nodeLeave",t)||(o||r||i)&&this.linksVisuals.forEach(function(t){e.setOpacity(t,e.options.links.opacity,t.linkOptions.opacity)})},E.prototype._mousemove=function(t){var e,i,o,r=this,n=this.options.tooltip,s=n.followPointer,n=n.delay,a=t.element,l=a.type;l!==xw&&l!==_w||this.tooltipShown&&!s||(e=t.originalEvent,o=this.element.getBoundingClientRect(),i=e.clientX-o.left<o.width/2,o=e.clientY-o.top<o.height/2,t.tooltipData={popupOffset:{left:e.pageX,top:e.pageY},popupAlign:{horizontal:i?"left":"right",vertical:o?"top":"bottom"}},l===_w&&(i=(e=a.dataItem).sourceLinks,l=(o=e.targetLinks).length?o:i,t.nodeValue=l.reduce(function(t,e){return t+e.value},0)),this.tooltipTimeOut&&(clearTimeout(this.tooltipTimeOut),this.tooltipTimeOut=null),a=s&&this.tooltipShown?0:n,this.tooltipTimeOut=setTimeout(function(){r.trigger("tooltipShow",t),r.tooltipShown=!0,r.tooltipTimeOut=null},a))},E.prototype._click=function(t){var e=t.element,i=e.dataItem,o=e.type===xw,r=this._focusState||{};e.type===_w?(!r.link&&this.sameNode(r.node,i)||(this._focusState={node:i,link:null},this._focusNode({highlight:!1})),this.trigger("nodeClick",t)):o&&(e={sourceId:i.source.id,targetId:i.target.id,value:i.value},this.sameLink(r.link,e)||(this._focusState={node:i.source,link:e},this._focusLink({highlight:!1})),this.trigger("linkClick",t))},E.prototype.sameNode=function(t,e){return t&&e&&t.id===e.id},E.prototype.sameLink=function(t,e){return t&&e&&t.sourceId===e.sourceId&&t.targetId===e.targetId},E.prototype._focusNode=function(t){this._cleanFocusHighlight();var e=this._focusState.node;this.models.map.get(e.id).focus(t)},E.prototype._focusLink=function(t){this._cleanFocusHighlight();var e=this._focusState.link;this.models.map.get(e.sourceId+"-"+e.targetId).focus(t)},E.prototype._focusNextNode=function(t){void 0===t&&(t=1);var e=this._focusState.node,i=this.columns.findIndex(function(t){return t.find(function(t){return t.id===e.id})}),i=this.columns[i],o=i.findIndex(function(t){return t.id===e.id}),i=i[o+t];i&&(this._focusState.node=i,this._focusNode())},E.prototype._focusNextLink=function(t){void 0===t&&(t=1);var e=this._focusState.node,i=this._focusState.link,o=e.sourceLinks.findIndex(function(t){return t.sourceId===i.sourceId&&t.targetId===i.targetId}),r=e.targetLinks.findIndex(function(t){return t.sourceId===i.sourceId&&t.targetId===i.targetId});-1!==o?(o=e.sourceLinks[o+t])&&(this._focusState.link=o,this._focusLink()):-1!==r&&(o=e.targetLinks[r+t])&&(this._focusState.link=o,this._focusLink())},E.prototype._focusSourceNode=function(){var t=this._focusState.link,t=this.models.map.get(t.sourceId);this._focusState={node:t.options.node,link:null},this._focusNode()},E.prototype._focusTargetNode=function(){var t=this._focusState.link,t=this.models.map.get(t.targetId);this._focusState={node:t.options.node,link:null},this._focusNode()},E.prototype._focusSourceLink=function(){var t=this._focusState.node.sourceLinks[0];t&&(this._focusState.link=t,this._focusLink())},E.prototype._focusTargetLink=function(){var t=this._focusState.node.targetLinks[0];t&&(this._focusState.link=t,this._focusLink())},E.prototype._focus=function(){this._skipFocusHighlight||(this._focusState.link?this._focusLink():this._focusNode()),this._skipFocusHighlight=!1},E.prototype._blur=function(){this._cleanFocusHighlight()},E.prototype._onDown=function(){this._hasFocus()||(this._skipFocusHighlight=!0)},E.prototype._hasFocus=function(){return this.element.ownerDocument.activeElement===this.element},E.prototype._cleanFocusHighlight=function(){this.models.nodes.forEach(function(t){return t.blur()}),this.models.links.forEach(function(t){return t.blur()})},E.prototype._keydown=function(t){var e=this["on"+t.key],i=this.options.rtl;i&&"ArrowLeft"===t.key?e=this.onArrowRight:i&&"ArrowRight"===t.key&&(e=this.onArrowLeft),e&&e.call(this,t)},E.prototype.onEscape=function(t){t.preventDefault(),this._focusState={node:this.firstFocusableNode(),link:null},this._focusNode()},E.prototype.onArrowDown=function(t){t.preventDefault(),this._focusState.link?this._focusNextLink(1):this._focusNextNode(1)},E.prototype.onArrowUp=function(t){t.preventDefault(),this._focusState.link?this._focusNextLink(-1):this._focusNextNode(-1)},E.prototype.onArrowLeft=function(t){t.preventDefault(),this._focusState.link?this._focusSourceNode():this._focusTargetLink()},E.prototype.onArrowRight=function(t){t.preventDefault(),this._focusState.link?this._focusTargetNode():this._focusSourceLink()},E.prototype.highlightLinks=function(t,e){var i=this;t&&(this.setLinksInactivityOpacity(e.inactiveOpacity),t.links.forEach(function(t){i.setOpacity(t,e.opacity,t.linkOptions.highlight.opacity)}))},E.prototype._destroySurface=function(){this.surface&&(this.surface.destroy(),this.surface=null,this._destroySurfaceElement())},E.prototype._destroyResizeObserver=function(){this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null)},E.prototype._initSurfaceElement=function(){this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.element.appendChild(this.surfaceElement))},E.prototype._destroySurfaceElement=function(){this.surfaceElement&&this.surfaceElement.parentNode&&(this.surfaceElement.parentNode.removeChild(this.surfaceElement),this.surfaceElement=null)},E.prototype.setOptions=function(t,e){this._setOptions(t),this._initTheme(e),this._initSurface(),this._redraw()},E.prototype._redraw=function(){this.surface.clear();var t=this._getSize(),e=t.width;this.size={width:e,height:t.height},this.surface.setSize(this.size),this.createVisual(),this.surface.draw(this.visual)},E.prototype._getSize=function(){return this.element.getBoundingClientRect()},E.prototype.createVisual=function(){this.visual=this._render()},E.prototype.titleBox=function(t,e){return t&&!1!==t.visible&&t.text?new cw(Object.assign({},{drawingRect:e},t)).exportVisual().chartElement.box:null},E.prototype.legendBox=function(t,e,i){return t&&!1!==t.visible?new yw(Object.assign({},{nodes:e},t,{drawingRect:i})).exportVisual().chartElement.box:null},E.prototype.calculateSankey=function(o,t){var e=t.title,i=t.legend,r=t.data,n=t.nodes,s=t.labels,a=t.nodeColors,l=t.rtl,h=!t.disableAutoLayout,p=((n.focusHighlight||{}).border||{}).width||0,t=t.disableKeyboardNavigation?0:p/2,p=new I(0,0,o.width,o.height),t=(p.unpad(t),this.titleBox(e,p)),c=p.clone(),e=(t&&(u=t.height(),c=e.position===T?(p.unpad({top:u}),new I(0,u,o.width,o.height)):(p.shrink(0,u),new I(0,0,o.width,o.height-u))),this.legendBox(i,r.nodes,c)),u=i&&i.position||yw.prototype.options.position,r=(e&&(u===C&&p.unpad({left:e.width()}),u===P&&p.shrink(e.width(),0),u===T&&p.unpad({top:e.height()}),u===S)&&p.shrink(0,e.height()),W0(Object.assign({},o,{offsetX:0,offsetY:0,width:p.width(),height:p.height()}))),c=r.nodes,i=r.circularLinks;if(i)return console.warn("Circular links detected. Kendo Sankey diagram does not support circular links."),{sankey:{nodes:[],links:[],columns:[[]],circularLinks:i},legendBox:e,titleBox:t};var d=new I,f=c.reduce(function(t,e){return Math.min(t,e.x0)},1/0),g=c.reduce(function(t,e){return Math.max(t,e.x1)},0),y=(c.forEach(function(t,e){l&&(i=t.x0,t.x0=g-t.x1,t.x1=g-i);var i=Y0(t,n,a,e),e=new J0(i),i=(d.wrap(mo(e.exportVisual().rawBBox())),new rw(hw(t,s,l,f,g)).exportVisual());i&&d.wrap(mo(i.rawBBox()))}),p.x1),v=p.y1,m=p.width()+y,x=p.height()+v;if(m-=d.x2>p.width()?d.x2-p.width():0,x-=d.y2>p.height()?d.y2-p.height():0,y+=d.x1<0?-d.x1:0,v+=d.y1<0?-d.y1:0,!1==h)return{sankey:W0(Object.assign({},o,{offsetX:y,offsetY:v,width:m,height:x,autoLayout:!1})),legendBox:e,titleBox:t};if(this.resize&&h&&this.permutation)this.resize=!1;else{for(var _=W0(Object.assign({},o,{offsetX:y,offsetY:v,width:m,height:x,autoLayout:!1})).columns.length,b=[],w=function(t,e){var i=(t=>{for(var e=0,i=t.length,o=0;o<i;o++)for(var r=t[o],n=o+1;n<i;n++){var s=t[n],a=X0((p=r).x0,p.y0,p.x1,p.y1,s.x1,s.y1),l=X0(p.x0,p.y0,p.x1,p.y1,s.x0,s.y0),h=X0(p.x0,p.y0,s.x0,s.y0,s.x1,s.y1),p=X0(p.x1,p.y1,s.x0,s.y0,s.x1,s.y1);a!==l&&h!==p&&(e+=Math.min(r.value,s.value))}return e})(W0(Object.assign({},o,{offsetX:y,offsetY:v,width:m,height:x,loops:2,targetColumnIndex:t,reverse:e})).links);return b.push({crosses:i,reverse:e,targetColumnIndex:t}),0===i},k=1;k<=_-1&&!w(k,!1)&&!w(k,!0);k++);var A=Math.min.apply(null,b.map(function(t){return t.crosses})),u=b.find(function(t){return t.crosses===A});this.permutation={targetColumnIndex:u.targetColumnIndex,reverse:u.reverse}}return{sankey:W0(Object.assign({},o,{offsetX:y,offsetY:v,width:m,height:x},this.permutation)),legendBox:e,titleBox:t}},E.prototype._render=function(t,e){var o,r,l,h,p,c,i,n,t=t||this.options,u=e||this,s=t.labels,a=t.nodes,d=t.links,f=t.nodeColors,e=t.title,g=t.legend,y=t.rtl,v=t.disableKeyboardNavigation,m=t.data,x=u.size,_=x.width,x=x.height,b=Object.assign({},m,{width:_,height:x,nodesOptions:a,title:e,legend:g}),b=this.calculateSankey(b,t),t=b.sankey,w=b.titleBox,b=b.legendBox,k=(y&&(k=t.nodes,A=t.links,o=Math.min.apply(Math,k.map(function(t){return t.x0})),r=Math.max.apply(Math,k.map(function(t){return t.x1}))-o,k.forEach(function(t){var e=r-(t.x1-2*o),i=r-(t.x0-2*o);t.x0=e,t.x1=i}),A.forEach(function(t){var e=r-(t.x1-2*o),i=r-(t.x0-2*o);t.x1=e,t.x0=i})),t.nodes),A=t.links,S=t.columns,C=(u.columns=S.map(function(t){t=t.slice();return t.sort(function(t,e){return t.y0-e.y0}),t}),new M.drawing.Group({clip:M.drawing.Path.fromRect(new M.geometry.Rect([0,0],[_,x]))}));return w&&(S=new cw(Object.assign({},e,{drawingRect:w})).exportVisual(),C.append(S)),t.circularLinks||(l=new Map,u.nodesVisuals=l,h={nodes:[],links:[],map:new Map},u.models=h,p=[],k.forEach(function(t,e){var i=Y0(t,a,f,e),o=(i.root=function(){return u.element},i.navigatable=!0!==v,new J0(i)),r=o.exportVisual();r.links=[],r.type=_w,t.color=i.color,t.opacity=i.opacity,r.dataItem=Object.assign({},m.nodes[e],{color:i.color,opacity:i.opacity,sourceLinks:t.sourceLinks.map(function(t){return{sourceId:t.sourceId,targetId:t.targetId,value:t.value}}),targetLinks:t.targetLinks.map(function(t){return{sourceId:t.sourceId,targetId:t.targetId,value:t.value}})}),l.set(t.id,r),h.nodes.push(o),h.map.set(t.id,o),C.append(r),o.createFocusHighlight(),o._highlight&&p.push(o._highlight)}),_=A.slice().sort(function(t,e){return e.value-t.value}),c=[],u.linksVisuals=c,_.forEach(function(t){var e=t.source,i=t.target,o=l.get(e.id),r=l.get(i.id),n=(n=o,s=r,"source"===(a=O({},d,{link:t,opacity:t.opacity,color:t.color,colorType:t.colorType,visual:t.visual,highlight:t.highlight})).colorType?a.color=n.options.fill.color:"target"===a.colorType&&(a.color=s.options.fill.color),a),s=(n.root=function(){return u.element},n.navigatable=!0!==v,n.rtl=y,new tw(n)),a=s.exportVisual();a.type=xw,a.dataItem={source:Object.assign({},o.dataItem),target:Object.assign({},r.dataItem),value:t.value},a.linkOptions=n,c.push(a),o.links.push(a),r.links.push(a),h.links.push(s),h.map.set(e.id+"-"+i.id,s),s.createFocusHighlight(),s._highlight&&p.push(s._highlight),C.append(a)}),i=k.reduce(function(t,e){return Math.min(t,e.x0)},1/0),n=k.reduce(function(t,e){return Math.max(t,e.x1)},0),k.forEach(function(t){t=hw(t,s,y,i,n),t=new rw(t).exportVisual();t&&C.append(t)}),b&&(x=new yw(Object.assign({},g,{rtl:y,drawingRect:b,nodes:k})).exportVisual(),C.append(x)),0!==p.length&&((e=new M.drawing.Group).append.apply(e,p),C.append(e))),C},E.prototype.exportVisual=function(t){var e=t&&t.options?O({},this.options,t.options):this.options,t={size:{width:(k(t&&t.width)?t:this.size).width,height:(k(t&&t.height)?t:this.size).height}};return this._render(e,t)},E.prototype._setOptions=function(t){this.options=O({},this.options,t)},E),zs={opacity:1,width:2,color:Y};function E(t,e,i){mw.call(this),this._initTheme(i),this._setOptions(e),this._initElement(t),this._initSurface(),e&&e.data&&(this._redraw(),this._initResizeObserver(),this._initNavigation(t))}e(bw,{title:{position:T},labels:{visible:!0,margin:{left:8,right:8},padding:0,border:{width:0},paintOrder:"stroke",stroke:{lineJoin:"round",width:1},offset:{left:0,top:0}},nodes:{width:24,padding:16,opacity:1,align:"stretch",offset:{left:0,top:0},focusHighlight:{border:Object.assign({},zs)},labels:{ariaTemplate:function(t){return t.node.label.text}}},links:{colorType:"static",opacity:.4,highlight:{opacity:.8,inactiveOpacity:.2},focusHighlight:{border:Object.assign({},zs)},labels:{ariaTemplate:function(t){t=t.link;return t.source.label.text+" to "+t.target.label.text}}},tooltip:{followPointer:!1,delay:200}});var ww=function(t,a,l){var h=new Set,p=new Map,c=new Map,o=(t.forEach(function(e){a.forEach(function(t){h.add(t.value(e))});for(var t=0;t<a.length-1;t++){var i=a[t].value(e),o=a[t+1].value(e),r=i+"_"+o,n=l.value(e),s=p.get(r);void 0!==s?p.set(r,s+n):(p.set(r,n),c.set(r,{source:i,target:o}))}}),new Map);return{nodes:Array.from(h).map(function(t,e){return o.set(t,e),{id:e,label:{text:String(t)}}}),links:Array.from(p).map(function(t){var e=t[0],t=t[1],e=c.get(e),i=e.source,e=e.target;return{sourceId:o.get(i),targetId:o.get(e),value:t}})}},R=Object.freeze({seriesType:0,stacked:1,categoryAxisX:2,valueAxisY:3,seriesChange:4,areaMarginLeft:5,areaMarginRight:6,areaMarginTop:7,areaMarginBottom:8,areaBackground:9,titleText:10,titleFontName:11,titleFontSize:12,titleColor:13,subtitleText:14,subtitleFontName:15,subtitleFontSize:16,subtitleColor:17,seriesColor:18,seriesLabel:19,legendVisible:20,legendFontName:21,legendFontSize:22,legendColor:23,legendPosition:24,categoryAxisTitleText:25,categoryAxisTitleFontName:26,categoryAxisTitleFontSize:27,categoryAxisTitleColor:28,categoryAxisLabelsFontName:29,categoryAxisLabelsFontSize:30,categoryAxisLabelsColor:31,categoryAxisLabelsRotation:32,categoryAxisReverseOrder:33,valueAxisTitleText:34,valueAxisTitleFontName:35,valueAxisTitleFontSize:36,valueAxisTitleColor:37,valueAxisLabelsFormat:38,valueAxisLabelsFontName:39,valueAxisLabelsFontSize:40,valueAxisLabelsColor:41,valueAxisLabelsRotation:42}),kw="12px",$=[{text:"Arial",value:"Arial, Helvetica, sans-serif",style:{fontFamily:"Arial, Helvetica, sans-serif"}},{text:"Courier New",value:"'Courier New', Courier, monospace",style:{fontFamily:"'Courier New', Courier, monospace"}},{text:"Georgia",value:"Georgia, serif",style:{fontFamily:"Georgia, serif"}},{text:"Impact",value:"Impact, Charcoal, sans-serif",style:{fontFamily:"Impact, Charcoal, sans-serif"}},{text:"Lucida Console",value:"'Lucida Console', Monaco, monospace",style:{fontFamily:"'Lucida Console', Monaco, monospace"}},{text:"Tahoma",value:"Tahoma, Geneva, sans-serif",style:{fontFamily:"Tahoma, Geneva, sans-serif"}},{text:"Times New Roman",value:"'Times New Roman', Times,serif",style:{fontFamily:"'Times New Roman', Times,serif"}},{text:"Trebuchet MS",value:"'Trebuchet MS', Helvetica, sans-serif",style:{fontFamily:"'Trebuchet MS', Helvetica, sans-serif"}},{text:"Verdana",value:"Verdana, Geneva, sans-serif",style:{fontFamily:"Verdana, Geneva, sans-serif"}}],Aw=$[0].value,Sw="scatter",Cw=["column","bar","line",Sw],Pw={type:"line",width:0};function Tw(t){return t&&Cw.includes(t)}var l=["string","date","number"],h=["number"],Mw={bar:[{axisType:"category",types:l},{axisType:"value",types:h}],column:[{axisType:"category",types:l},{axisType:"value",types:h}],line:[{axisType:"category",types:l},{axisType:"value",types:h}],pie:[{axisType:"category",types:l},{axisType:"value",types:h,count:1}],scatter:[{axisType:"category",types:l},{axisType:"value",types:h}]};function Ow(t,e){return((e||"")+" "+(t||"")).trim()}function Lw(t){var e=(t||"").indexOf(" ");return{size:t&&t.substring(0,e),name:t&&t.substring(e+1)}}function Iw(t,e,i){return i=Lw(i).size,t?Ow(t,i||e):""}function Bw(t,e,i){return i=Lw(i).name,t?Ow(i||e,t):""}function Ew(o,r,t){var n,e,i,s,a=Fw(),l=(a.seriesType=r,a.data=o||[],a.legend={visible:!0,position:"bottom"},Mw[r]);return l&&o.length&&(n=o[0].slice(),a.columns=o[0].map(function(t){return String(t.field)}),i=l.find(function(t){return"category"===t.axisType}),e=-1,i&&(e=t&&t.categoryAxis?a.columns.indexOf(t.categoryAxis):zw(o,i)),t=l.filter(function(t){return"value"===t.axisType}),(i=Dw(o,t)).includes(e)&&(1<i.length?i=i.filter(function(t){return t!==e}):e=-1),s=[],i.forEach(function(e){var t=n[e],i=[];o.forEach(function(t){i.push(t[e].value)}),s.push(Object.assign({},{name:t.field,type:r,data:i,stack:!1,labels:{visible:!1}},r===Sw?Pw:{}))}),l=-1<e?o.map(function(t){return String(Vw(t[e].value)?t[e].value:" ")}):[],s.length&&(a.series=s.map(function(t,e){return Object.assign({},t,{id:e})}),a.initialSeries=structuredClone(a.series)),a.categoryAxis=[{categories:l,labels:{visible:!0,rotation:"auto"}}],a.categoryField=a.columns[e]),a}function Rw(t,e,i){var o,r,n,s,a,l=Fw(),h=(l.seriesType=e,l.data=t||[],Mw[e]);return h&&t.length&&(o=t[0].map(function(t){return t.field}),n=h.find(function(t){return"category"===t.axisType}),r=-1,n&&(r=i&&i.categoryAxis?o.indexOf(i.categoryAxis):zw(t,n)),n=h.filter(function(t){return"value"===t.axisType}),s=[],(s=i&&i.valueAxis?[o.indexOf(i.valueAxis)]:Dw(t,n)).includes(r)&&1<s.length&&(s=s.filter(function(t){return t!==r})),"number"==typeof n[0].count&&(s=s.slice(0,n[0].count)),h=-1<r?t.map(function(t){return String(t[r].value)}):[],a=[],t.forEach(function(e){var i={};s.forEach(function(t){t=e[t];i[t.field]=t.value||0,i[e[r].field]=e[r].value||" "}),a.push(i)}),l.columns=o,l.categoryAxis=[{categories:h,title:{text:""}}],l.series=[{id:0,data:a,type:e,name:o[r],labels:{visible:!0},categoryField:o[r],field:o[s[0]]}],l.categoryField=o[r],l.valueField=o[s[0]],l.initialSeries=structuredClone(l.series)),l}var Vw=function(t){return null!=t},jw=function(r){var t=structuredClone(r[0]);return t.forEach(function(t,e){if(!Vw(t.value))for(var i=0;i<r.length;i++){var o=r[i][e].value;if(Vw(o)){t.value=o;break}}}),t},zw=function(i,t){var o=[],e=jw(i),t=(t.types.forEach(function(i){e.forEach(function(t,e){typeof t.value===i&&o.push(e)})}),o.findIndex(function(e){var t=i.map(function(t){return t[e].value});return new Set(t).size===t.length}));return Math.max(t,0)},Dw=function(t,e){var o=[],r=jw(t);return e.forEach(function(t){t.types.forEach(function(i){r.forEach(function(t,e){typeof t.value===i&&o.push(e)})})}),o},Fw=function(){return structuredClone({columns:[],data:[],series:[],initialSeries:[],categoryAxis:[{categories:[],labels:{visible:!0,rotation:"auto"},title:{text:""}}],valueAxis:[{labels:{visible:!0,rotation:"auto"}}],area:{margin:{left:void 0,right:void 0,top:void 0,bottom:void 0}},title:{text:""},subtitle:{text:""},stack:!1})};function Hw(t,e){return(Tw(e)?Ew:Rw)(t,e)}function Nw(t,e){var i=structuredClone(e);if(i.legend=t.legend,i.area=t.area,i.title=t.title,i.subtitle=t.subtitle,i.series.length===t.series.length)for(var o=0;o<i.series.length;o++)i.series[o].color=t.series[o].color,i.series[o].labels=t.series[o].labels;return t.series.every(function(t){return t.labels&&t.labels.visible})&&Tw(i.seriesType)&&Tw(t.seriesType)&&i.series.forEach(function(t){t.labels=t.labels||{},t.labels.visible=!0}),i}function Uw(t,e,i){var o=Object.assign({},t);switch(e){case R.seriesType:return Hw(o.data,i);case R.stacked:return o.series=o.series.map(function(t){return Object.assign({},t,{stack:i})}),o.stack=i,o;case R.categoryAxisX:return o.seriesType&&Tw(o.seriesType)?Nw(o,Ew(o.data,o.seriesType,{categoryAxis:i})):"pie"===o.seriesType?Nw(o,Rw(o.data,o.seriesType,{categoryAxis:i})):o;case R.valueAxisY:return"pie"===o.seriesType?Nw(o,Rw(o.data,o.seriesType,{categoryAxis:o.categoryField,valueAxis:i})):o;case R.seriesChange:return o.series=i,o;case R.areaMarginLeft:return o.area=Object.assign({},o.area,{margin:Object.assign({},o.area&&o.area.margin||{},{left:i})}),o;case R.areaMarginRight:return o.area=Object.assign({},o.area,{margin:Object.assign({},o.area&&o.area.margin||{},{right:i})}),o;case R.areaMarginTop:return o.area=Object.assign({},o.area,{margin:Object.assign({},o.area&&o.area.margin||{},{top:i})}),o;case R.areaMarginBottom:return o.area=Object.assign({},o.area,{margin:Object.assign({},o.area&&o.area.margin||{},{bottom:i})}),o;case R.areaBackground:return o.area=Object.assign({},o.area,{background:i}),o;case R.titleText:return o.title=Object.assign({},o.title,{text:i}),o;case R.titleFontName:return o.title=Object.assign({},o.title,{font:Iw(i,"20px",o.title&&o.title.font)}),o;case R.titleFontSize:return o.title=Object.assign({},o.title,{font:Bw(i,Aw,o.title&&o.title.font)}),o;case R.titleColor:return o.title=Object.assign({},o.title,{color:i}),o;case R.subtitleText:return o.subtitle=Object.assign({},o.subtitle,{text:i}),o;case R.subtitleFontName:return o.subtitle=Object.assign({},o.subtitle,{font:Iw(i,"16px",o.subtitle&&o.subtitle.font)}),o;case R.subtitleFontSize:return o.subtitle=Object.assign({},o.subtitle,{font:Bw(i,Aw,o.subtitle&&o.subtitle.font)}),o;case R.subtitleColor:return o.subtitle=Object.assign({},o.subtitle,{color:i}),o;case R.seriesColor:return o.series=o.series.map(function(t){return Object.assign({},t,{color:(i.seriesName===t.name?i:t).color})}),o;case R.seriesLabel:return o.series=o.series.map(function(t){return i.all||i.seriesName===t.name?Object.assign({},t,{labels:{visible:i.visible}}):t}),o;case R.legendVisible:return o.legend=Object.assign({},o.legend,{visible:i}),o;case R.legendFontName:var r=o.legend||{};return o.legend=Object.assign({},r,{labels:Object.assign({},r.labels,{font:Iw(i,kw,r.labels&&r.labels.font)})}),o;case R.legendFontSize:r=o.legend||{};return o.legend=Object.assign({},r,{labels:Object.assign({},r.labels,{font:Bw(i,Aw,r.labels&&r.labels.font)})}),o;case R.legendColor:r=o.legend||{};return o.legend=Object.assign({},r,{labels:Object.assign({},r.labels,{color:i})}),o;case R.legendPosition:return o.legend=Object.assign({},o.legend,{position:i}),o;case R.categoryAxisTitleText:return o.categoryAxis=(o.categoryAxis||[]).map(function(t){return Object.assign({},t,{title:Object.assign({},t.title,{text:i})})}),o;case R.categoryAxisTitleFontName:return o.categoryAxis=(o.categoryAxis||[]).map(function(t){return Object.assign({},t,{title:Object.assign({},t.title,{font:Iw(i,"16px",t.title&&t.title.font)})})}),o;case R.categoryAxisTitleFontSize:return o.categoryAxis=(o.categoryAxis||[]).map(function(t){return Object.assign({},t,{title:Object.assign({},t.title,{font:Bw(i,Aw,t.title&&t.title.font)})})}),o;case R.categoryAxisTitleColor:return o.categoryAxis=(o.categoryAxis||[]).map(function(t){return Object.assign({},t,{title:Object.assign({},t.title,{color:i})})}),o;case R.categoryAxisLabelsFontName:return o.categoryAxis=(o.categoryAxis||[]).map(function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{font:Iw(i,kw,t.labels&&t.labels.font)})})}),o;case R.categoryAxisLabelsFontSize:return o.categoryAxis=(o.categoryAxis||[]).map(function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{font:Bw(i,Aw,t.labels&&t.labels.font)})})}),o;case R.categoryAxisLabelsColor:return o.categoryAxis=(o.categoryAxis||[]).map(function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{color:i})})}),o;case R.categoryAxisLabelsRotation:var n=Vw(i)?i:"auto";return o.categoryAxis=(o.categoryAxis||[]).map(function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{rotation:n})})}),o;case R.categoryAxisReverseOrder:return o.categoryAxis=(o.categoryAxis||[]).map(function(t){return Object.assign({},t,{reverse:i})}),o;case R.valueAxisTitleText:return o.valueAxis&&0!==o.valueAxis.length?o.valueAxis=(o.valueAxis||[]).map(function(t){return Object.assign({},t,{title:Object.assign({},t.title,{text:i})})}):o.valueAxis=[{title:{text:i}}],o;case R.valueAxisTitleFontName:return o.valueAxis=(o.valueAxis||[]).map(function(t){return Object.assign({},t,{title:Object.assign({},t.title,{font:Iw(i,"16px",t.title&&t.title.font)})})}),o;case R.valueAxisTitleFontSize:return o.valueAxis=(o.valueAxis||[]).map(function(t){return Object.assign({},t,{title:Object.assign({},t.title,{font:Bw(i,Aw,t.title&&t.title.font)})})}),o;case R.valueAxisTitleColor:return o.valueAxis=(o.valueAxis||[]).map(function(t){return Object.assign({},t,{title:Object.assign({},t.title,{color:i})})}),o;case R.valueAxisLabelsFormat:return o.valueAxis=(o.valueAxis||[]).map(function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{format:i})})}),o;case R.valueAxisLabelsFontName:return o.valueAxis=(o.valueAxis||[]).map(function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{font:Iw(i,kw,t.labels&&t.labels.font)})})}),o;case R.valueAxisLabelsFontSize:return o.valueAxis=(o.valueAxis||[]).map(function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{font:Bw(i,Aw,t.labels&&t.labels.font)})})}),o;case R.valueAxisLabelsColor:return o.valueAxis=(o.valueAxis||[]).map(function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{color:i})})}),o;case R.valueAxisLabelsRotation:var s=Vw(i)?i:"auto";return o.valueAxis=(o.valueAxis||[]).map(function(t){return Object.assign({},t,{labels:Object.assign({},t.labels,{rotation:s})})}),o;default:return o}}function Gw(t,e){return parseFloat(_k(t).getPropertyValue(e))}function Ww(t){for(var e=_k(t),i=[],o=1,r=e.getPropertyValue(""+xk+o);r||o<=30;)i.push(r),r=e.getPropertyValue(""+xk+ ++o);return i}function Xw(t){return kk(t,"--kendo-chart-pane-title-font-weight","--kendo-chart-pane-title-font-size","--kendo-font-family")}function Yw(t){return{color:Sk(t),font:kk(t,"--kendo-font-weight","--kendo-chart-title-font-size","--kendo-font-family")}}var js=Object.freeze({windowTitle:"Chart Preview",exportButton:"Export",exportPDFButton:"PDF File",exportSVGButton:"SVG File",exportPNGButton:"PNG File",tabChart:"Chart",tabData:"Data",tabFormat:"Format",barChart:"Bar Chart",barChartBar:"Bar",barChartStackedBar:"Stacked Bar",barChart100StackedBar:"100% Stacked Bar",pieChart:"Pie Chart",pieChartPie:"Pie",columnChart:"Column Chart",columnChartColumn:"Column",columnChartStackedColumn:"Stacked Column",columnChart100StackedColumn:"100% Stacked Column",lineChart:"Line Chart",lineChartLine:"Line",lineChartStackedLine:"Stacked Line",lineChart100StackedLine:"100% Stacked Line",scatterChart:"Scatter Chart",scatterChartScatter:"Scatter",configuration:"Configuration",configurationCategoryAxis:"Category Axis",configurationXAxis:"X Axis",configurationValueAxis:"Value Axis",configurationSeries:"Series",configurationSeriesAdd:"Add",formatChartArea:"Chart Area",formatChartAreaMargins:"Margins",formatChartAreaMarginsAuto:"Auto",formatChartAreaMarginsLeft:"Left",formatChartAreaMarginsRight:"Right",formatChartAreaMarginsTop:"Top",formatChartAreaMarginsBottom:"Bottom",formatChartAreaBackground:"Background",formatChartAreaBackgroundColor:"Color",formatTitle:"Title",formatTitleApplyTo:"Apply to",formatTitleChartTitle:"Chart Title",formatTitleChartSubtitle:"Chart Subtitle",formatTitleLabel:"Title",formatTitleFont:"Font",formatTitleFontPlaceholder:"(inherited font)",formatTitleSize:"Size",formatTitleSizePlaceholder:"px",formatTitleColor:"Color",formatSeries:"Series",formatSeriesApplyTo:"Apply to",formatSeriesAllSeries:"All Series",formatSeriesColor:"Color",formatSeriesShowLabels:"Show Labels",formatLegend:"Legend",formatLegendShowLegend:"Show Legend",formatLegendFont:"Font",formatLegendFontPlaceholder:"(inherited font)",formatLegendSize:"Size",formatLegendSizePlaceholder:"px",formatLegendColor:"Color",formatLegendPosition:"Position",formatLegendPositionTop:"Top",formatLegendPositionBottom:"Bottom",formatLegendPositionLeft:"Left",formatLegendPositionRight:"Right",formatCategoryAxis:"Category Axis",formatXAxis:"X Axis",formatCategoryAxisTitle:"Title",formatCategoryAxisTitlePlaceholder:"Axis Title",formatCategoryAxisTitleFont:"Font",formatCategoryAxisTitleFontPlaceholder:"(inherited font)",formatCategoryAxisTitleSize:"Size",formatCategoryAxisTitleSizePlaceholder:"px",formatCategoryAxisTitleColor:"Color",formatCategoryAxisLabels:"Labels",formatCategoryAxisLabelsFont:"Font",formatCategoryAxisLabelsFontPlaceholder:"(inherited font)",formatCategoryAxisLabelsSize:"Size",formatCategoryAxisLabelsSizePlaceholder:"px",formatCategoryAxisLabelsColor:"Color",formatCategoryAxisLabelsRotation:"Rotation",formatCategoryAxisLabelsRotationAuto:"Auto",formatCategoryAxisLabelsReverseOrder:"Reverse Order",formatValueAxis:"Value Axis",formatYAxis:"Y Axis",formatValueAxisTitle:"Title",formatValueAxisTitlePlaceholder:"Axis Title",formatValueAxisTitleFont:"Font",formatValueAxisTitleFontPlaceholder:"(inherited font)",formatValueAxisTitleSize:"Size",formatValueAxisTitleSizePlaceholder:"px",formatValueAxisTitleColor:"Color",formatValueAxisLabels:"Labels",formatValueAxisLabelsFormat:"Label Format",formatValueAxisLabelsFormatText:"Text",formatValueAxisLabelsFormatNumber:"Number",formatValueAxisLabelsFormatCurrency:"Currency",formatValueAxisLabelsFormatPercent:"Percent",formatValueAxisLabelsFont:"Font",formatValueAxisLabelsFontPlaceholder:"(inherited font)",formatValueAxisLabelsSize:"Size",formatValueAxisLabelsSizePlaceholder:"px",formatValueAxisLabelsColor:"Color",formatValueAxisLabelsRotation:"Rotation",formatValueAxisLabelsRotationAuto:"Auto"}),qw=Object.freeze({getWizardDataFromDataRows:function(t){var o=[];return t.forEach(function(t){var e=t.dataItem,i=[];t.dataColumns.forEach(function(t){i.push({field:t.title||t.field,value:Ht(t.field)(e)})}),o.push(i)}),o},ActionTypes:R,createInitialState:function(t,e,i){t=Hw(t,i&&i.seriesType||e);return void 0!==(i&&i.stack)?Uw(t,R.stacked,i.stack):t},createState:Hw,fontNames:$,fontSizes:[{text:"10",value:"10px"},{text:"12",value:"12px"},{text:"14",value:"14px"},{text:"16",value:"16px"},{text:"20",value:"20px"},{text:"28",value:"28px"},{text:"42",value:"42px"},{text:"56",value:"56px"}],isCategorical:Tw,mergeStates:Nw,parseFont:Lw,updateState:Uw,messages:js}),Zw=1.5,Qw=.4,Kw="#000",t="Arial, Helvetica, sans-serif",$w="11px "+t,Jw="12px "+t,tk="16px "+t,ek="transparent",ik="#fff",ok={type:ys},rk={type:rs},nk=Object.assign({},rk,{markers:{visible:!1},highlight:{visible:!1}}),sk=function(){return{icon:{border:{width:1}},label:{font:Jw,padding:3},line:{length:10,width:2},legendItem:nk,visible:!0}},ak=function(){return{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},legendItem:rk,opacity:.4}},lk=function(){return{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},legendItem:rk,opacity:.4}},hk=function(){return{outliersField:"",meanField:"",border:{_brightness:.8,width:1},downColor:ik,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},legendItem:nk}},pk=function(){return{gap:Zw,spacing:Qw,target:{color:"#ff0000"},legendItem:nk}},ck=function(){return{width:2,legendItem:ok}},uk=function(){return{line:{opacity:1,width:0},markers:{size:6,visible:!1},legendItem:rk,opacity:.5}},dk=function(){return{markers:{visible:!1},legendItem:ok,width:2}},fk=function(){return{gap:.5,line:{color:Kw,width:1},legendItem:nk,spacing:Qw}},gk=function(){return{labels:{background:"",color:"",padding:{top:5,bottom:5,left:7,right:7}},legendItem:nk}},yk=gk,vk=function(t){return Object.assign({color:ot,trendline:{},markers:{visible:!1},width:1,dashType:"longDash",legendItem:ok},t)},mk=function(t){return void 0===t&&(t={}),{axisDefaults:{labels:{font:Jw},notes:sk(),title:{font:tk,margin:5}},categoryAxis:{majorGridLines:{visible:!0}},navigator:{pane:{height:90,margin:{top:10}}},seriesDefaults:{visible:!0,labels:{font:$w},overlay:t.gradients?{}:{gradient:"none"},area:ak(),rangeArea:lk(),verticalRangeArea:lk(),bar:{gap:Zw,spacing:Qw,legendItem:nk},boxPlot:hk(),bubble:{border:{width:0},labels:{background:ek},legendItem:nk,opacity:.6},bullet:pk(),candlestick:{border:{_brightness:.8,width:1},downColor:ik,gap:1,highlight:{border:{opacity:1,width:2},line:{width:2}},line:{color:Kw,width:1},legendItem:nk,spacing:.3},column:{gap:Zw,spacing:Qw,legendItem:nk},heatmap:{labels:{color:"",background:ek,visible:!0},highlight:{border:{width:0}},legendItem:nk},pie:{labels:{background:"",color:"",padding:{top:5,bottom:5,left:7,right:7}},legendItem:nk},donut:{margin:1,legendItem:nk},funnel:gk(),pyramid:yk(),horizontalWaterfall:fk(),line:ck(),notes:sk(),ohlc:{gap:1,highlight:{line:{opacity:1,width:3}},line:{width:1},legendItem:nk,spacing:.3},radarArea:uk(),radarLine:dk(),radarColumn:{legendItem:nk},polarArea:uk(),polarLine:dk(),polarScatter:{legendItem:ok},rangeBar:{gap:Zw,spacing:Qw,legendItem:nk},rangeColumn:{gap:Zw,spacing:Qw,legendItem:nk},scatter:{legendItem:ok},scatterLine:{width:1,legendItem:ok},verticalArea:ak(),verticalBoxPlot:hk(),verticalBullet:pk(),verticalLine:ck(),waterfall:fk(),linearTrendline:vk(),exponentialTrendline:vk({style:"smooth"}),logarithmicTrendline:vk({style:"smooth"}),polynomialTrendline:vk({style:"smooth"}),powerTrendline:vk({style:"smooth"}),movingAverageTrendline:vk()},title:{font:tk},subtitle:{font:Jw},legend:{labels:{font:Jw}}}},xk="--kendo-chart-series-",_k=function(t){return t.ownerDocument.defaultView.getComputedStyle(t)},bk={},wk=function(t,e){var i,o,r,e=_k(t).getPropertyValue(e);return/^color-mix/i.test(e)&&(t=t,e=bk[i=e]||(o=t.style.color,t.style.color=i,r=_k(t).color,t.style.color=o,bk[i]=r)),e},kk=function(t,e,i,o){t=_k(t);return[t.getPropertyValue(e),t.getPropertyValue(i),t.getPropertyValue(o)||t.fontFamily].join(" ")},Ak=function(t){return kk(t,"--kendo-font-weight","--kendo-chart-font-size","--kendo-font-family")},Sk=function(t){return wk(t,"--kendo-chart-text")},Ck=function(t){var e=Sk(t);return{labels:{color:e,font:Ak(t)},title:{color:e}}},Pk=function(t){var e=Sk(t);return{pointer:{color:wk(t,"--kendo-chart-gauge-pointer")},scale:{labels:{color:e},rangePlaceholderColor:wk(t,"--kendo-chart-gauge-track"),minorTicks:{color:e},majorTicks:{color:e},line:{color:e}}}},Tk=function(t){return{labels:{color:Sk(t),font:Ak(t),stroke:{color:wk(t,"--kendo-chart-bg")}},links:{color:wk(t,"--kendo-color-subtle")},nodeColors:Ww(t),title:Yw(t),legend:Ck(t)}},Mk=function(t){function e(){return{downColor:l,mean:{color:f},median:{color:f},whiskers:{color:g}}}function i(){return{line:{color:l}}}function o(){return{opacity:d,highlight:{inactiveOpacity:Gw(t,"--kendo-chart-area-inactive-opacity")}}}function r(){return{highlight:{inactiveOpacity:Gw(t,"--kendo-chart-line-inactive-opacity")}}}function n(){return{target:{color:h}}}var s,a,l=wk(t,"--kendo-chart-major-lines"),h=wk(t,"--kendo-chart-text"),p=kk(t,"--kendo-font-weight","--kendo-chart-label-font-size","--kendo-font-family"),c=wk(t,"--kendo-chart-bg"),u={icon:{background:wk(u=t,"--kendo-chart-notes-bg"),border:{color:wk(u,"--kendo-chart-notes-border")}},line:{color:wk(u,"--kendo-chart-notes-lines")},label:{font:Ak(u)}},d=Gw(t,"--kendo-chart-area-opacity"),f=wk(t,"--kendo-color-surface"),g=wk(t,"--kendo-chart-primary-bg");return{axisDefaults:{crosshair:{color:wk(t,"--kendo-chart-crosshair-bg")},labels:{color:h,font:p},line:{color:l},majorGridLines:{color:l},minorGridLines:{color:wk(t,"--kendo-chart-minor-lines")},notes:structuredClone(u),title:{color:h,font:Ak(t)}},chartArea:{background:c},legend:(a=wk(s=t,"--kendo-chart-inactive"),Object.assign({},{inactiveItems:{labels:{color:a},markers:{color:a}}},Ck(s))),seriesColors:Ww(t),seriesDefaults:{area:o(),verticalArea:o(),radarArea:o(),boxPlot:e(),verticalBoxPlot:e(),bullet:n(),verticalBullet:n(),horizontalWaterfall:i(),waterfall:i(),line:r(),verticalLine:r(),candlestick:{downColor:h,line:{color:h}},errorBars:{color:wk(t,"--kendo-chart-error-bars-bg")},icon:{border:{color:l}},labels:{background:c,color:h,font:p,opacity:d},notes:structuredClone(u)},subtitle:{color:h,font:Xw(t)},title:Yw(t),paneDefaults:{title:{font:Xw(t)}}}};return D})())}}});
|