@progress/kendo-charts 2.8.0-develop.1 → 2.8.0-develop.2

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.
Files changed (133) hide show
  1. package/dist/cdn/js/kendo-charts.js +1 -1
  2. package/dist/cdn/main.js +1 -1
  3. package/dist/es/barcode/barcode.js +1 -4
  4. package/dist/es/barcode/encodings/code128.js +1 -3
  5. package/dist/es/barcode/encodings/encoding.js +1 -3
  6. package/dist/es/chart/aggregates/aggregates.js +3 -3
  7. package/dist/es/chart/aggregates/default-aggregates.js +1 -5
  8. package/dist/es/chart/aggregates/series-aggregator.js +12 -10
  9. package/dist/es/chart/api-elements/chart-axis.js +1 -5
  10. package/dist/es/chart/api-elements/chart-plotarea.js +1 -5
  11. package/dist/es/chart/axis-group-range-tracker.js +1 -4
  12. package/dist/es/chart/categorical-chart.js +8 -8
  13. package/dist/es/chart/chart.js +2 -4
  14. package/dist/es/chart/error-bars/error-range-calculator.js +2 -4
  15. package/dist/es/chart/highlight.js +1 -5
  16. package/dist/es/chart/line-chart/line-chart.js +2 -2
  17. package/dist/es/chart/line-chart/line-point.js +19 -19
  18. package/dist/es/chart/mixins/accessibility-attributes-mixin.js +3 -4
  19. package/dist/es/chart/mixins/line-chart-mixin.js +1 -2
  20. package/dist/es/chart/mixins/note-mixin.js +1 -2
  21. package/dist/es/chart/pan-and-zoom/mousewheel-zoom.js +2 -4
  22. package/dist/es/chart/pan-and-zoom/pannable.js +2 -4
  23. package/dist/es/chart/pan-and-zoom/zoom-selection.js +2 -4
  24. package/dist/es/chart/plotarea/categorical-plotarea.js +2 -2
  25. package/dist/es/chart/plotarea/plotarea-factory.js +1 -5
  26. package/dist/es/chart/selection.js +2 -4
  27. package/dist/es/chart/series-binder.js +4 -8
  28. package/dist/es/chart/tooltip/base-tooltip.js +2 -4
  29. package/dist/es/common/getter.js +1 -3
  30. package/dist/es/common/grep.js +2 -11
  31. package/dist/es/common/in-array.js +1 -1
  32. package/dist/es/common/observable.js +1 -4
  33. package/dist/es/common/user-events.js +2 -6
  34. package/dist/es/core/box.js +38 -20
  35. package/dist/es/core/category-axis.js +5 -12
  36. package/dist/es/core/chart-element.js +8 -6
  37. package/dist/es/core/curve-processor.js +2 -5
  38. package/dist/es/core/point.js +2 -4
  39. package/dist/es/core/ring.js +2 -5
  40. package/dist/es/core/shape-builder.js +1 -2
  41. package/dist/es/core/utils/element-id.js +5 -0
  42. package/dist/es/core/utils/guid.js +4 -16
  43. package/dist/es/drawing-utils.js +0 -2
  44. package/dist/es/gauges/gauge.js +2 -5
  45. package/dist/es/gauges/pointer.js +2 -4
  46. package/dist/es/map/crs.js +5 -10
  47. package/dist/es/map/extent.js +1 -3
  48. package/dist/es/map/layers/bubble.js +1 -4
  49. package/dist/es/map/layers/layer.js +1 -4
  50. package/dist/es/map/layers/marker.js +1 -3
  51. package/dist/es/map/layers/shape.js +1 -3
  52. package/dist/es/map/layers/tile.js +3 -7
  53. package/dist/es/map/location.js +1 -4
  54. package/dist/es/map/scroller/draggable.js +1 -4
  55. package/dist/es/map/scroller/fx.js +1 -3
  56. package/dist/es/map/scroller/scroller.js +1 -4
  57. package/dist/es/map/tooltip/tooltip.js +2 -4
  58. package/dist/es/qrcode/encodings/data-modes/qr-data-mode.js +1 -4
  59. package/dist/es/qrcode/encodings/encoders/iso-encoder.js +1 -2
  60. package/dist/es/qrcode/encodings/encoders/utf8-encoder.js +1 -4
  61. package/dist/es/qrcode/encodings/encoding-result.js +1 -5
  62. package/dist/es/qrcode/encodings/free-cell-visitor.js +1 -5
  63. package/dist/es/qrcode/qrcode.js +1 -4
  64. package/dist/es/sankey/element.js +1 -3
  65. package/dist/es/stock/navigator-hint.js +2 -4
  66. package/dist/es/stock/navigator.js +2 -4
  67. package/dist/es2015/barcode/barcode.js +1 -4
  68. package/dist/es2015/barcode/encodings/code128.js +1 -3
  69. package/dist/es2015/barcode/encodings/encoding.js +1 -3
  70. package/dist/es2015/chart/aggregates/aggregates.js +3 -3
  71. package/dist/es2015/chart/aggregates/default-aggregates.js +1 -5
  72. package/dist/es2015/chart/aggregates/series-aggregator.js +12 -10
  73. package/dist/es2015/chart/api-elements/chart-axis.js +1 -5
  74. package/dist/es2015/chart/api-elements/chart-plotarea.js +1 -5
  75. package/dist/es2015/chart/axis-group-range-tracker.js +1 -4
  76. package/dist/es2015/chart/categorical-chart.js +8 -8
  77. package/dist/es2015/chart/chart.js +2 -4
  78. package/dist/es2015/chart/error-bars/error-range-calculator.js +2 -4
  79. package/dist/es2015/chart/highlight.js +1 -5
  80. package/dist/es2015/chart/line-chart/line-chart.js +2 -2
  81. package/dist/es2015/chart/line-chart/line-point.js +19 -19
  82. package/dist/es2015/chart/mixins/accessibility-attributes-mixin.js +3 -4
  83. package/dist/es2015/chart/mixins/line-chart-mixin.js +1 -2
  84. package/dist/es2015/chart/mixins/note-mixin.js +1 -2
  85. package/dist/es2015/chart/pan-and-zoom/mousewheel-zoom.js +2 -4
  86. package/dist/es2015/chart/pan-and-zoom/pannable.js +2 -4
  87. package/dist/es2015/chart/pan-and-zoom/zoom-selection.js +2 -4
  88. package/dist/es2015/chart/plotarea/categorical-plotarea.js +2 -2
  89. package/dist/es2015/chart/plotarea/plotarea-factory.js +1 -5
  90. package/dist/es2015/chart/selection.js +2 -4
  91. package/dist/es2015/chart/series-binder.js +4 -8
  92. package/dist/es2015/chart/tooltip/base-tooltip.js +2 -4
  93. package/dist/es2015/common/getter.js +1 -3
  94. package/dist/es2015/common/grep.js +2 -11
  95. package/dist/es2015/common/in-array.js +1 -1
  96. package/dist/es2015/common/observable.js +1 -4
  97. package/dist/es2015/common/user-events.js +2 -6
  98. package/dist/es2015/core/box.js +38 -20
  99. package/dist/es2015/core/category-axis.js +5 -12
  100. package/dist/es2015/core/chart-element.js +8 -6
  101. package/dist/es2015/core/curve-processor.js +2 -5
  102. package/dist/es2015/core/point.js +2 -4
  103. package/dist/es2015/core/ring.js +2 -5
  104. package/dist/es2015/core/shape-builder.js +1 -2
  105. package/dist/es2015/core/utils/element-id.js +5 -0
  106. package/dist/es2015/core/utils/guid.js +4 -16
  107. package/dist/es2015/drawing-utils.js +0 -2
  108. package/dist/es2015/gauges/gauge.js +2 -5
  109. package/dist/es2015/gauges/pointer.js +2 -4
  110. package/dist/es2015/map/crs.js +5 -10
  111. package/dist/es2015/map/extent.js +1 -3
  112. package/dist/es2015/map/layers/bubble.js +1 -4
  113. package/dist/es2015/map/layers/layer.js +1 -4
  114. package/dist/es2015/map/layers/marker.js +1 -3
  115. package/dist/es2015/map/layers/shape.js +1 -3
  116. package/dist/es2015/map/layers/tile.js +3 -7
  117. package/dist/es2015/map/location.js +1 -4
  118. package/dist/es2015/map/scroller/draggable.js +1 -4
  119. package/dist/es2015/map/scroller/fx.js +1 -3
  120. package/dist/es2015/map/scroller/scroller.js +1 -4
  121. package/dist/es2015/map/tooltip/tooltip.js +2 -4
  122. package/dist/es2015/qrcode/encodings/data-modes/qr-data-mode.js +1 -4
  123. package/dist/es2015/qrcode/encodings/encoders/iso-encoder.js +1 -2
  124. package/dist/es2015/qrcode/encodings/encoders/utf8-encoder.js +1 -4
  125. package/dist/es2015/qrcode/encodings/encoding-result.js +1 -5
  126. package/dist/es2015/qrcode/encodings/free-cell-visitor.js +1 -5
  127. package/dist/es2015/qrcode/qrcode.js +1 -4
  128. package/dist/es2015/sankey/element.js +1 -3
  129. package/dist/es2015/stock/navigator-hint.js +2 -4
  130. package/dist/es2015/stock/navigator.js +2 -4
  131. package/dist/npm/main.js +6372 -6890
  132. package/dist/systemjs/kendo-charts.js +1 -1
  133. package/package.json +1 -1
@@ -1 +1 @@
1
- System.register("@progress/kendo-charts",["@progress/kendo-drawing"],function(t,e){var Lk={};return{setters:[function(t){Lk.Class=t.Class,Lk.Color=t.Color,Lk.drawing=t.drawing,Lk.geometry=t.geometry,Lk.logToConsole=t.logToConsole,Lk.parseColor=t.parseColor,Lk.support=t.support,Lk.throttle=t.throttle}],execute:function(){t((()=>{var V={593:t=>{t.exports=Lk}},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:()=>$v,ArcScale:()=>Uv,AreaChart:()=>El,AreaSegment:()=>Sl,ArrowLinearPointer:()=>tv,Axis:()=>Ko,AxisGroupRangeTracker:()=>jl,AxisLabel:()=>Bo,Bar:()=>Gl,BarChart:()=>yh,BarLabel:()=>Fl,BarLinearPointer:()=>lv,Barcode:()=>Mx,Box:()=>B,BoxElement:()=>Ji,BoxPlot:()=>Sh,BoxPlotChart:()=>Lh,BubbleChart:()=>Uh,Bullet:()=>Zh,BulletChart:()=>$h,Candlestick:()=>xh,CandlestickChart:()=>wh,CategoricalChart:()=>Fa,CategoricalErrorBar:()=>fa,CategoricalPlotArea:()=>zc,CategoryAxis:()=>Mr,Chart:()=>Dg,ChartAxis:()=>Cn,ChartContainer:()=>cp,ChartElement:()=>o,ChartPane:()=>On,ChartPlotArea:()=>Ln,ChartService:()=>Go,ChartWizardCommon:()=>Zw,CircularGauge:()=>em,Class:()=>M.Class,ClipAnimation:()=>ml,ClusterLayout:()=>ph,Crosshair:()=>lp,CrosshairTooltip:()=>np,CurveProcessor:()=>kn,DateCategoryAxis:()=>jr,DateValueAxis:()=>Zr,DefaultAggregates:()=>Ep,DomEventsBuilder:()=>Yo,DonutChart:()=>Nd,DonutPlotArea:()=>Wd,DonutSegment:()=>Dd,ErrorBarBase:()=>ca,ErrorRangeCalculator:()=>Gn,Extent:()=>Wb,FloatElement:()=>uo,FontLoader:()=>de,FormatService:()=>No,Gauge:()=>Ly,Gradients:()=>no,HashMap:()=>Wt,Highlight:()=>Nc,InstanceObserver:()=>Zt,IntlService:()=>zo,Legend:()=>Ou,LegendItem:()=>Su,LegendLayout:()=>pu,LineChart:()=>wl,LinePoint:()=>Xa,LineSegment:()=>Za,LinearGauge:()=>uv,LinearPointer:()=>Wy,LinearScale:()=>Dy,Location:()=>tb,LogarithmicAxis:()=>on,Map:()=>z0,Matrix:()=>De,MousewheelZoom:()=>au,Navigator:()=>cy,NavigatorHint:()=>oy,Note:()=>Ro,NumericAxis:()=>Xr,OHLCChart:()=>mc,OHLCPoint:()=>gc,Observable:()=>ii,Pane:()=>gp,Pannable:()=>eu,PieAnimation:()=>rd,PieChart:()=>Id,PieChartMixin:()=>Md,PiePlotArea:()=>Vd,PieSegment:()=>Td,PlotAreaBase:()=>Cp,PlotAreaEventsMixin:()=>Pp,PlotAreaFactory:()=>Iu,Point:()=>A,PointEventsMixin:()=>Na,PolarAxis:()=>pn,QRCode:()=>H_,RadarCategoryAxis:()=>an,RadarLogarithmicAxis:()=>bn,RadarNumericAxis:()=>mn,RadialGauge:()=>Fv,RadialPointer:()=>Ov,RadialScale:()=>bv,RangeAreaChart:()=>uc,RangeAreaPoint:()=>tc,RangeBar:()=>jp,RangeBarChart:()=>Fp,RangePointer:()=>Zv,Ring:()=>Fi,RootElement:()=>ho,Sankey:()=>ww,ScatterChart:()=>jh,ScatterErrorBar:()=>Eh,ScatterLineChart:()=>pd,Sector:()=>Ui,Selection:()=>Hu,SeriesAggregator:()=>Lp,SeriesBinder:()=>Dn,ShapeBuilder:()=>Xi,ShapeElement:()=>oo,SharedTooltip:()=>Yu,Sparkline:()=>Qg,SplineAreaSegment:()=>Ll,SplineSegment:()=>nl,StackWrap:()=>dh,StockChart:()=>fy,TemplateService:()=>Vt,Text:()=>vo,TextBox:()=>So,Title:()=>Mo,Tooltip:()=>Gu,UserEvents:()=>Bi,WaterfallChart:()=>Oc,WaterfallSegment:()=>bc,XYPlotArea:()=>yd,ZoomSelection:()=>ru,addClass:()=>vt,alignPathToPixel:()=>_t,anyHasZIndex:()=>ga,append:()=>ee,appendIfNotNull:()=>ya,applyEventMap:()=>Ne,areNumbers:()=>va,autoMajorUnit:()=>Ii,autoTextColor:()=>Me,barcodeValidator:()=>Lx,bindEvents:()=>ie,bindSegments:()=>xa,categoriesCount:()=>_a,chartBaseTheme:()=>xk,chartTheme:()=>Ok,clockwise:()=>bt,constants:()=>F,convertableToNumber:()=>kt,countNumbers:()=>In,createHashSet:()=>Ee,createOutOfRangePoints:()=>Ea,createPatternFill:()=>Qi,createSankeyData:()=>kw,cycleDown:()=>St,cycleIndex:()=>Ct,cycleUp:()=>At,deepExtend:()=>O,defaultErrorHandler:()=>Re,defined:()=>k,deg:()=>oe,elementOffset:()=>re,elementScale:()=>Pe,elementSize:()=>ne,elementStyles:()=>It,equalsIgnoreCase:()=>ba,evalOptions:()=>ka,eventCoordinates:()=>se,eventElement:()=>ae,eventMap:()=>Fe,filterSeriesByType:()=>Aa,find:()=>Ae,findAxisByName:()=>Tn,gaugeTheme:()=>Pk,getAriaTemplate:()=>zt,getField:()=>Vn,getSpacing:()=>w,getSupportedFeatures:()=>qe,getTemplate:()=>jt,getter:()=>Ht,grep:()=>Nt,hasClasses:()=>Ut,hasGradientOverlay:()=>Ta,hasOwnProperty:()=>je,hasValue:()=>Pa,hashKey:()=>le,inArray:()=>u,interpolateValue:()=>Xt,isArray:()=>yt,isDateAxis:()=>Ma,isFunction:()=>Tt,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:()=>N_,rad:()=>ce,rectToBox:()=>mo,removeClass:()=>xt,renderIcon:()=>we,round:()=>L,sankeyTheme:()=>Mk,segmentVisible:()=>ma,setDefaultOptions:()=>e,singleItemOrArray:()=>Oa,sparseArrayLimits:()=>ke,styleValue:()=>Lt,unbindEvents:()=>ue,unclipBox:()=>Ra,valueOrDefault:()=>_}),{}),H=(z.r(F),z.d(F,{DEFAULT_PANE:()=>ly,NAVIGATOR_AXIS:()=>ay,NAVIGATOR_PANE:()=>sy}),"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",T="right",ht="roundedRect",pt="start",ct="string",P="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 Tt(t){return"function"==typeof t}var Pt="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]))===Pt&&null!==r?r.constructor:null)&&s!==Array?r instanceof Date?e[o]=new Date(r.getTime()):Tt(r.clone)?e[o]=r.clone():(s=e[o],e[o]=typeof s===Pt&&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 Bt=/width|height|top|left|bottom|right/i;function It(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]=Bt.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[P]=i[T]=i[S]=i[C]=t:(i[P]=t[P]||e,i[T]=t[T]||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):Tt(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):Tt(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 Te(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 Pe(t){if(!t)return Se.unit();for(var e=Te(t),i=t.parentElement;i;)var o=Te(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}},Be=(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}},Ie=(Be.prototype.values=function(){return Array.from(this._set)},Be.prototype.has=function(t){return this._set.has(t)},Be.prototype.add=function(t){this._set.add(t)},Be.prototype.delete=function(t){this._set.delete(t)},Be.prototype.clear=function(){this._set.clear()},t.size.get=function(){return this._set.size},Object.defineProperties(Be.prototype,t),function(){var t=!1;return t="function"==typeof Set?new Set([1]).has(1):t});function Ee(t){return new(Ie()?Be: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)&&Tt(o)&&!h?s=o:o&&"string"==typeof o&&Tt(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,Ti,Pi,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 Bi=Oi;function Ii(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.wrapLimit=function(t,e,i){return this.x1=Math.min(this.x1,Math.max(this.x1-e,t.x1)),this.y1=Math.min(this.y1,Math.max(this.y1-i,t.y1)),this.x2=Math.max(this.x2,Math.min(this.x2+e,t.x2)),this.y2=Math.max(this.y2,Math.min(this.y2+i,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===P||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===P||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,P])?(this[o]=t[o],this[r]=this[o]+n):u(i,[T,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 B=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 B(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 B(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=((Ti=Fi)&&(Ni.__proto__=Ti),((Ni.prototype=Object.create(Ti&&Ti.prototype)).constructor=Ni).prototype.expand=function(t){return Ti.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){Ti.call(this,t,0,e,i,o)}let Ui=Hi,Gi=((Pi=M.Class)&&(Wi.__proto__=Pi),((Wi.prototype=Object.create(Pi&&Pi.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(){Pi.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=Tt(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 B(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:P,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 B(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 B(s,h,a,p),d[1]=new B(n,p,s,c),d[2]=new B(a,p,l,c),d[3]=new B(s,c,a,u),o.x1===n&&o.y1===h||r.x1===n&&r.y1===h?(d[4]=new B(n,h,s,p),d[5]=new B(a,c,l,u)):(d[4]=new B(a,h,l,p),d[5]=new B(n,c,s,u)),Nt(d,function(t){return 0<t.height()&&0<t.width()})[0]))||new B},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 B(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 B;_[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===T||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 B(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 B)}e(t,{font:$,color:Y});let vo=t;function mo(t){var e=t.origin,t=t.bottomRight();return new B(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 B)}(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)&&(To.__proto__=_o),((To.prototype=Object.create(_o&&_o.prototype)).constructor=To).prototype.reflow=function(t){_o.prototype.reflow.call(this,t),this.box.snapTo(t,y)},To.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 To(t):i},To.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 Po(e),Po(t),t.reverse(),e.concat(t)},To);function To(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 Po(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:P,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||P,n=t===P||t===S?y:v,s=t===P||t===S?v:y,t=t===P||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 B)}e(Oo,{_autoReflow:!1});let Bo=Oo,Io=((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 B,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 B),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,T])?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(Io,{icon:{visible:!0,type:q},label:{position:it,visible:!0,align:b,vAlign:b},line:{visible:!0},visible:!0,position:P,zIndex:2});let Ro=Io;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 Bi(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?T: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 Bo)}),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 B(r,e.y1,r,e.y2-t):new B(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,T])?r.options.position=t.reverse?C:T:t.vertical||u(r.options.position,[P,S])||(r.options.position=t.reverse?S:P):t.vertical?r.options.position=t.reverse?C:T:r.options.position=t.reverse?S:P,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 B(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 B(t.x1,t.y1,t.x1+h+a,t.y2):new B(t.x1,t.y1,t.x2,t.y1+h+a),this.arrangeTitle(),this.arrangeLabels(),this.arrangeNotes()},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=T),t.box.move(n,i)):(n=s.y1,e?(n-=r+t.box.height(),t.options.rotationOrigin=S):(n+=r,t.options.rotationOrigin=P),new B(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 B);return!0}},r.prototype.arrangeTitle=function(){var t=this.options,e=this.title,i=t.labels.mirror;e&&(t.vertical?(e.options.align=i?T:C,e.options.vAlign=e.options.position):(e.options.align=e.options.position,e.options.vAlign=i?P: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 Tr(t,e){return m(t.weekStartDay)?t.weekStartDay:e&&e.firstDay?e.firstDay():0}(Pr=Ko)&&(n.__proto__=Pr),((n.prototype=Object.create(Pr&&Pr.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(){Pr.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),Pr.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 Bo(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(){Pr.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 Pr,t=n;function n(){Pr.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 Br(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 Ir(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))}Ir.prototype.displayIndices=function(){return{min:0,max:1}},Ir.prototype.displayRange=function(){return{}},Ir.prototype.total=function(){return{}},Ir.prototype.valueRange=function(){return{}},Ir.prototype.valueIndex=function(){return-1},Ir.prototype.values=function(){return[]},Ir.prototype.totalIndex=function(){return-1},Ir.prototype.valuesCount=function(){return 0},Ir.prototype.totalCount=function(){return 0},Ir.prototype.dateAt=function(){return null};function Rr(t,e,i){for(var o,r,n,s=Br(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:Tr(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=Br(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 Ir(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 Bo(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 Bo(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 B))},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=Br(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=Br((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=Ii(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=Ii(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 B(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 Bo(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 Bo(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:Tr(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(Ii(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 B(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 Bo(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 B,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 B,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 Tn(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 Pn(t){this.visual=t.visual,this.chartsVisual=t.chartContainer.visual,this._pane=t}var Mn;Pn.prototype.findAxisByName=function(t){return Tn(t,this._pane.axes)};let On=Pn,Ln=((Mn=M.Class)&&(Bn.__proto__=Mn),(Bn.prototype=Object.create(Mn&&Mn.prototype)).constructor=Bn);function Bn(t){Mn.call(this),this._plotArea=t,this.visual=t.visual,this.backgroundVisual=t._bgVisual}function In(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=In(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=In(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",Ts="rangeColumn",Ps="scatter",Ms="scatterLine",Os="verticalArea",Ls="verticalBoxPlot",Bs="verticalBullet",Is="verticalLine",Es="verticalRangeArea",Rs="waterfall",Vs=[ns,ps,vs,hs,ss,Ls,ls,Ts,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 B(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 B(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 In(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)&&(Tt(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 Ta(t){t=t.overlay;return t&&t.gradient&&"none"!==t.gradient}function Pa(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 Ba(t,e){var i,o=Dn.current.bindPoint(t,null,e).valueFields;for(i in o)if(kt(o[i]))return!0}function Ia(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=Ba(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=Ba(t,(a=o(h-1)).item)?a:Ia({start:h,dir:-1,min:0,max:i-1,getter:o,hasItem:r,series:t})),c&&(s=Ba(t,(a=o(e+1)).item)?a:Ia({start:e,dir:1,min:0,max:i-1,getter:o,hasItem:r,series:t}))),n&&(t._outOfRangeMinPoint=n),s)&&(t._outOfRangeMaxPoint=s)}function Ra(i,t){return t.forEach(function(t){var e=t&&t.options,t=t&&(t.box||t.wrapperBox);e&&t&&!1!==e.noclip&&!1!==e.visible&&i.wrap(t)}),i}(Va=o)&&(Da.__proto__=Va),((Da.prototype=Object.create(Va&&Va.prototype)).constructor=Da).prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},Da.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},Da.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},Da.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]},Da.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}},Da.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)}},Da.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))},Da.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)},Da.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}},Da.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)},Da.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},Da.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))},Da.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)},Da.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},Da.prototype.valueSlot=function(t,e){return t.getSlot(e[0],e[1],!this.options.clip)},Da.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])},Da.prototype.limitPoint=function(t){var e=this.categoryAxis.limitSlot(t.box);e.equals(t.box)||t.reflow(e)},Da.prototype.aboveAxis=function(t,e){var i=this.categoryAxisCrossingValue(e),t=t.value;return e.options.reverse?t<i:i<=t},Da.prototype.categoryAxisCrossingValue=function(t){var e=this.categoryAxis,t=t.options;return[].concat(t.axisCrossingValues||t.axisCrossingValue)[e.axisIndex||0]||0},Da.prototype.reflowPoint=function(t,e){t.reflow(e)},Da.prototype.reflowCategories=function(){},Da.prototype.pointSlot=function(t,e){var i=this.options.invertAxes,o=i?e:t,i=i?t:e;return new B(o.x1,i.y1,o.x2,i.y2)},Da.prototype.categorySlot=function(t,e){return t.getSlot(e)},Da.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)},Da.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}))},Da.prototype.formatPointValue=function(t,e){return null===t.value?"":this.chartService.format.auto(e,t.value)},Da.prototype.pointValue=function(t){return t.valueFields.value};var Va,ja,za,l=Da;function Da(t,e){Va.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 Fa=l,Ha={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}}},Na=Ha,Ua={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))}},Ga=((ja=o)&&(Wa.__proto__=ja),((Wa.prototype=Object.create(ja&&ja.prototype)).constructor=Wa).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))},Wa.prototype.createLabel=function(){var t=this.options.labels;t.visible&&(this.label=this.createLabelElement(t),this.append(this.label))},Wa.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())},Wa.prototype.getLabelText=function(t){var e=jt(t);return e?e(this.pointData()):t.format?this.formatValue(t.format):this.value},Wa.prototype.getAriaLabelText=function(){var t=this.options.labels,e=zt(t);return e?e(this.pointData()):this.getLabelText(t)},Wa.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},Wa.prototype.createVisual=function(){},Wa.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})},Wa.prototype.markerBox=function(){return this.marker||(this.marker=this.createMarker(),this.marker.reflow(this._childBox)),this.marker.box},Wa.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 B(o.x,o.y,o.x,o.y)),this.note.reflow(t))},Wa.prototype.reflowLabel=function(t){var e=this.options,i=this.label,e=e.labels.position;i&&(e=(e=e===ts?P:e)===es?S:e,i.reflow(t),i.box.alignTo(this.markerBox(),e),i.reflow(i.box))},Wa.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()},Wa.prototype.highlightVisual=function(){return(this.marker||{}).visual},Wa.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}},Wa.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()},Wa.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,P),{point:new A(o,t),align:{horizontal:e,vertical:i}}},Wa.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Wa.prototype.overlapsBox=function(t){return this.markerBox().overlaps(t)},Wa.prototype.clipElements=function(){this.options.visible=!1},Wa.prototype.unclipElements=function(){this.label&&(this.label.options.noclip=!0),this.note&&(this.note.options.noclip=!0)},Wa.prototype.unclipBox=function(){return Ra(this.markerBox().clone(),[this.label,this.note])},Wa.prototype.labelBox=function(){return this.label?this.label.box:new B},Wa.prototype.noteBox=function(){return this.note?this.note.box:new B},Wa.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,stackValue:this.stackValue,series:this.series}},Wa.prototype.focusVisual=function(){this.marker&&(this.marker.visual&&this.marker.visual.options.set("id",this._id),this.toggleFocusHighlight(!0))},Wa.prototype.clearFocusFromVisual=function(){this.marker&&(this.marker.visual&&this.marker.visual.options.set("id",""),this.toggleFocusHighlight(!1))},Wa.prototype.getIndex=function(){return k(this.categoryIx)?this.categoryIx:this.pointIx},Wa);function Wa(t,e){ja.call(this),this.value=t,this.options=Object.assign({},e),this.aboveAxis=_(this.options.aboveAxis,!0),this.tooltipTracking=!0,this._id=Ue()}Ga.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(Ga.prototype,Na),O(Ga.prototype,Ua);let Xa=Ga,Ya=((za=o)&&(qa.__proto__=za),((qa.prototype=Object.create(za&&za.prototype)).constructor=qa).prototype.points=function(){return this.toGeometryPoints(this.linePoints)},qa.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},qa.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()},qa.prototype.segmentVisual=function(){var t=this.options,e=this.series,i=e.color,o=e._defaults,o=(Tt(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},qa.prototype.aliasFor=function(t,e){return this.parent.getNearestPoint(e.x,e.y,this.seriesIx)},qa);function qa(t,e,i){za.call(this),this.linePoints=t,this.series=e,this.seriesIx=i}e(Ya,{closed:!1});let Za=Ya,Qa={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=Ka(t[0],r,s,n,a),h=[l],p=1;p<t.length;p++){var c,u=Ka(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(Ka(he(t),r,s,n,e?1:2)),h}};function Ka(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 $a,Ja,l=Qa,tl=(($a=Za)&&(el.__proto__=$a),((el.prototype=Object.create($a&&$a.prototype)).constructor=el).prototype.points=function(){return this.calculateStepPoints(this.linePoints)},el);function el(){$a.apply(this,arguments)}O(tl.prototype,l);let il=tl,ol=((Ja=Za)&&(rl.__proto__=Ja),((rl.prototype=Object.create(Ja&&Ja.prototype)).constructor=rl).prototype.segmentVisual=function(){var t=this.series,e=t._defaults,i=t.color,e=(Tt(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},rl);function rl(){Ja.apply(this,arguments)}let nl=ol,sl={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 al,ll,hl,pl,cl,ul,dl,fl,gl,tl=sl,yl=((al=M.drawing.Animation)&&(vl.__proto__=al),((vl.prototype=Object.create(al&&al.prototype)).constructor=vl).prototype.setup=function(){this._setEnd(this.options.box.x1)},vl.prototype.step=function(t){var e=this.options.box;this._setEnd(Xt(e.x1,e.x2,t))},vl.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)},vl);function vl(){al.apply(this,arguments)}e(yl,{duration:Yn}),M.drawing.AnimationFactory.current.register("clip",yl);let ml=yl,xl={createAnimation:function(){var t,e=this.getRoot(),i=(e&&e.options||{}).transitions;e&&!1!==i&&(e=this.parent&&this.parent.clipBox||e.size(),t=M.drawing.Path.fromRect(e.toRect()),i=i&&!0!==i?i.loading:i,this.visual.clip(t),this.animation=new ml(t,Object.assign({},{box:e},i)),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)}}},_l=((ll=Fa)&&(bl.__proto__=ll),((bl.prototype=Object.create(ll&&ll.prototype)).constructor=bl).prototype.render=function(){ll.prototype.render.call(this),this.updateStackRange(),this.renderSegments()},bl.prototype.pointType=function(){return Xa},bl.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,Tt(i.color)&&(o=r.color),e=new Xa(n,r);return e.color=o,this.append(e),e},bl.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]},bl.prototype.createSegment=function(t,e,i){var o=e.style;return new(o===os?il:o===is?nl:Za)(t,e,i)},bl.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)},bl.prototype.supportsPointInactiveOpacity=function(){return!1},bl);function bl(){ll.apply(this,arguments)}O(_l.prototype,tl,xl);let wl=_l,kl=((hl=Za)&&(Al.__proto__=hl),((Al.prototype=Object.create(hl&&hl.prototype)).constructor=Al).prototype.createVisual=function(){var t=this.series,e=t._defaults,i=t.line||{},o=t.color;Tt(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)})},Al.prototype.strokeSegments=function(){return this._strokeSegments||(this._strokeSegments=this.createStrokeSegments())},Al.prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.points())},Al.prototype.stackSegments=function(){return(this.prevSegment||this).createStackSegments(this.stackPoints)},Al.prototype.createStackSegments=function(t){return this.segmentsFromPoints(this.toGeometryPoints(t)).reverse()},Al.prototype.segmentsFromPoints=function(t){return t.map(function(t){return new M.geometry.Segment(t)})},Al.prototype.createStroke=function(t){t=new M.drawing.Path(t);t.segments.push.apply(t.segments,this.strokeSegments()),this.visual.append(t)},Al.prototype.hasStackSegment=function(){return this.prevSegment||this.stackPoints&&this.stackPoints.length},Al.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)},Al.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)},Al);function Al(t,e,i,o,r){hl.call(this,t,e,i),this.prevSegment=o,this.stackPoints=r}let Sl=kl,Cl=((pl=Sl)&&(Tl.__proto__=pl),((Tl.prototype=Object.create(pl&&pl.prototype)).constructor=Tl).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.calculateStepPoints(this.linePoints))},Tl.prototype.createStackSegments=function(t){return this.segmentsFromPoints(this.calculateStepPoints(t)).reverse()},Tl);function Tl(){pl.apply(this,arguments)}O(Cl.prototype,l);let Pl=Cl,Ml=((cl=Sl)&&(Ol.__proto__=cl),((Ol.prototype=Object.create(cl&&cl.prototype)).constructor=Ol).prototype.createStrokeSegments=function(){var t=new kn(this.options.closed),e=this.points();return t.process(e)},Ol.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},Ol);function Ol(){cl.apply(this,arguments)}let Ll=Ml,Bl=((ul=wl)&&(Il.__proto__=ul),((Il.prototype=Object.create(ul&&ul.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?Ll:Sl)(t,e,i,r,n)},Il.prototype.reflow=function(t){ul.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 Xa(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(){ul.apply(this,arguments)}let El=Bl,Rl=((dl=M.Class)&&(Vl.__proto__=dl),((Vl.prototype=Object.create(dl&&dl.prototype)).constructor=Vl).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)}},Vl.prototype.reset=function(t){this.axisRanges[t]=void 0},Vl.prototype.query=function(t){return this.axisRanges[t]},Vl);function Vl(){dl.call(this),this.axisRanges={}}let jl=Rl,zl=((fl=o)&&(Dl.__proto__=fl),((Dl.prototype=Object.create(fl&&fl.prototype)).constructor=Dl).prototype.createVisual=function(){this.textBox.options.noclip=this.options.noclip},Dl.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?P:b,i.position===aa?o?(s.vAlign=P,!r&&a.height()<t.height()&&(s.vAlign=S)):s.align=r?T:C:i.position===b?(s.vAlign=b,s.align=b):"insideBase"===i.position?o?s.vAlign=r?S:P:s.align=r?C:T:i.position===la&&(h=o?r?(e=(a.width()-t.width()-l.left-l.right)/2,new B(t.x1-e,t.y1-a.height(),t.x2+e,t.y1)):new B(t.x1,t.y2,t.x2,t.y2+a.height()):(s.align=b,r?new B(t.x2,t.y1,t.x2+a.width(),t.y2):new B(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)},Dl.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))},Dl);function Dl(t,e,i){fl.call(this,e),this.textBox=new So(t,this.options,i),this.append(this.textBox)}e(zl,{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 Fl=zl,Hl={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)}},Nl=((gl=o)&&(Ul.__proto__=gl),((Ul.prototype=Object.create(gl&&gl.prototype)).constructor=Ul).prototype.render=function(){this._rendered||(this._rendered=!0,this.createLabel(),this.createNote(),this.errorBar&&this.append(this.errorBar))},Ul.prototype.createLabel=function(){var t=this.options.labels;t.visible&&(this.label=this.createLabelElement(t),this.append(this.label))},Ul.prototype.createLabelElement=function(t){return new Fl(this.getLabelText(t),O({vertical:this.options.vertical},t),this.pointData())},Ul.prototype.getLabelText=function(t){var e=jt(t);return e?e(this.pointData()):this.formatValue(t.format)},Ul.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Ul.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)},Ul.prototype.createVisual=function(){var e=this,t=this.box,i=this.options,o=i.visual;!1!==this.visible&&(gl.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))},Ul.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),Ta(e)&&(o=this.createGradientOverlay(r,{baseColor:this.color},O({end:e.vertical?void 0:[0,1]},e.overlay)),t.append(o))},Ul.prototype.createHighlight=function(t){return _t(M.drawing.Path.fromRect(this.box.toRect(),t))},Ul.prototype.highlightVisual=function(){return this.rectVisual},Ul.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this.rectVisual}},Ul.prototype.createFocusHighlight=function(t){var e=this.options.focusHighlight.border.width;return _t(M.drawing.Path.fromRect(this.box.pad(e/2).toRect(),t))},Ul.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()},Ul.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=P;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=T,i):e,Math.max(n.y1,a.y1)-5):(s?t=i+5:(t=e-5,l=T),Math.max(n.y1,a.y1))),{point:new A(t,o),align:{horizontal:l,vertical:h}}},Ul.prototype.overlapsBox=function(t){return this.box.overlaps(t)},Ul.prototype.unclipBox=function(){var t=this.label&&this.label.textBox;return Ra(this.box.clone(),[t,this.note])},Ul.prototype.labelBox=function(){var t=this.label&&this.label.textBox;return t?t.box:new B},Ul.prototype.noteBox=function(){return this.note?this.note.box:new B},Ul.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}},Ul.prototype.getIndex=function(){return this.categoryIx},Ul);function Ul(t,e){gl.call(this),this.options=e,this.color=e.color||a,this.aboveAxis=_(this.options.aboveAxis,!0),this.value=t}O(Nl.prototype,Na),O(Nl.prototype,Ua),O(Nl.prototype,Hl),Nl.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 Gl=Nl;function Wl(t,e){t.forEach(e)}function Xl(t,e){for(var i=t.length,o=i-1;0<=o;o--)e(t[o],o-i-1)}(Yl=o)&&(hh.__proto__=Yl),((hh.prototype=Object.create(Yl&&Yl.prototype)).constructor=hh).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 Yl,ql,Zl,Ql,Kl,$l,Jl,th,eh,ih,oh,rh,nh,sh,ah,lh,yl=hh;function hh(t){Yl.call(this,t),this.forEach=t.rtl?Xl:Wl}e(yl,{vertical:!1,gap:0,spacing:0});let ph=yl,ch=((ql=o)&&(uh.__proto__=ql),((uh.prototype=Object.create(ql&&ql.prototype)).constructor=uh).prototype.reflow=function(t){for(var e=this.options.vertical?y:v,i=this.children,o=i.length,r=this.box=new B,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))}},uh);function uh(){ql.apply(this,arguments)}e(ch,{vertical:!0});let dh=ch,fh=((Zl=Fa)&&(gh.__proto__=Zl),((gh.prototype=Object.create(Zl&&Zl.prototype)).constructor=gh).prototype.render=function(){Zl.prototype.render.call(this),this.updateStackRange()},gh.prototype.pointType=function(){return Gl},gh.prototype.clusterType=function(){return ph},gh.prototype.stackType=function(){return dh},gh.prototype.stackLimits=function(t,e){return Zl.prototype.stackLimits.call(this,t,e)},gh.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),Tt(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},gh.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},gh.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},gh.prototype.reflowCategories=function(t){for(var e=this.children,i=e.length,o=0;o<i;o++)e[o].reflow(t[o])},gh.prototype.createAnimation=function(){this._setAnimationOptions(),Zl.prototype.createAnimation.call(this),ga(this.options.series)&&this._setChildrenAnimation()},gh.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())}},gh.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},gh);function gh(){Zl.apply(this,arguments)}e(fh,{animation:{type:ns}});let yh=fh,vh=((Ql=o)&&(mh.__proto__=Ql),((mh.prototype=Object.create(Ql&&Ql.prototype)).constructor=mh).prototype.getLabelText=function(t){return this.formatValue(t.format)},mh.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()},mh.prototype.reflowNote=function(){this.note&&this.note.reflow(this.box)},mh.prototype.createVisual=function(){Ql.prototype.createVisual.call(this),this.addAccessibilityAttributesToVisual(),this._mainVisual=this.mainVisual(this.options),this.visual.append(this._mainVisual),this.createOverlay()},mh.prototype.mainVisual=function(t){var e=new M.drawing.Group;return this.createBody(e,t),this.createLines(e,t),e},mh.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(e),width:e.border.width,dashType:e.border.dashType,opacity:_(e.border.opacity,e.opacity)}),_t(i),t.append(i),Ta(e)&&t.append(this.createGradientOverlay(i,{baseColor:this.color},O({end:e.vertical?void 0:[0,1]},e.overlay)))},mh.prototype.createLines=function(t,e){this.drawLines(t,e,this.lines,e.line)},mh.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)}},mh.prototype.getBorderColor=function(t){t=t.border.color;return t=k(t)?t:new M.Color(this.color).brightness(this.options.border._brightness).toHex()},mh.prototype.createOverlay=function(){var t=M.drawing.Path.fromRect(this.box.toRect(),{fill:{color:a,opacity:0},stroke:null});this.visual.append(t)},mh.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)}},t)));return this.color=e,t},mh.prototype.highlightVisual=function(){return this._mainVisual},mh.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this._mainVisual}},mh.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:P}}},mh.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},mh.prototype.overlapsBox=function(t){return this.box.overlaps(t)},mh.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}},mh.prototype.getIndex=function(){return this.categoryIx},mh);function mh(t,e){Ql.call(this,e),this.value=t}vh.prototype.createFocusHighlight=Gl.prototype.createFocusHighlight,e(vh,{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(vh.prototype,Na),O(vh.prototype,Ua),O(vh.prototype,Hl);let xh=vh,_h=((Kl=Fa)&&(bh.__proto__=Kl),((bh.prototype=Object.create(Kl&&Kl.prototype)).constructor=bh).prototype.reflowCategories=function(t){for(var e=this.children,i=e.length,o=0;o<i;o++)e[o].reflow(t[o])},bh.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 ph({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)},bh.prototype.pointType=function(){return xh},bh.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),Tt(i.color)&&(s=n.color),n.vertical=!this.options.invertAxes,new o(r,n));return e.color=s,e},bh.prototype.splitValue=function(t){return[t.low,t.open,t.close,t.high]},bh.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]))}},bh.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)},bh.prototype.animationPoints=function(){return this.points},bh);function bh(){Kl.apply(this,arguments)}O(_h.prototype,xl);let wh=_h,kh=(($l=xh)&&(Ah.__proto__=$l),((Ah.prototype=Object.create($l&&$l.prototype)).constructor=Ah).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()},Ah.prototype.reflowBoxSlot=function(t){this.boxSlot.x1=t.x1,this.boxSlot.x2=t.x2},Ah.prototype.reflowWhiskerSlot=function(t){this.whiskerSlot.x1=t.x1,this.whiskerSlot.x2=t.x2},Ah.prototype.calcMeanPoints=function(t,e){return[[[t.x1,e.y1],[t.x2,e.y1]]]},Ah.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]]]},Ah.prototype.calcMedianPoints=function(t,e){return[[[t.x1,e.y1],[t.x2,e.y1]]]},Ah.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},Ah.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)}},Ah.prototype.mainVisual=function(t){for(var e=$l.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},Ah.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)},Ah.prototype.getBorderColor=function(){return(this.options.border||{}).color?this.options.border.color:this.color||$l.prototype.getBorderColor.call(this)},Ah);function Ah(t,e){$l.call(this,t,e),this.createNote()}e(kh,{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(kh.prototype,Na);let Sh=kh,Ch=((Jl=Sh)&&(Th.__proto__=Jl),((Th.prototype=Object.create(Jl&&Jl.prototype)).constructor=Th).prototype.reflowBoxSlot=function(t){this.boxSlot.y1=t.y1,this.boxSlot.y2=t.y2},Th.prototype.reflowWhiskerSlot=function(t){this.whiskerSlot.y1=t.y1,this.whiskerSlot.y2=t.y2},Th.prototype.calcMeanPoints=function(t,e){return[[[e.x1,t.y1],[e.x1,t.y2]]]},Th.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]]]},Th.prototype.calcMedianPoints=function(t,e){return[[[e.x1,t.y1],[e.x1,t.y2]]]},Th);function Th(){Jl.apply(this,arguments)}let Ph=Ch,Mh=((th=wh)&&(Oh.__proto__=th),((Oh.prototype=Object.create(th&&th.prototype)).constructor=Oh).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 ph({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)},Oh.prototype.pointType=function(){return this.options.invertAxes?Ph:Sh},Oh.prototype.splitValue=function(t){return[t.lower,t.q1,t.median,t.q3,t.upper]},Oh.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]))}},Oh.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)},Oh.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},Oh.prototype.supportsPointInactiveOpacity=function(){return!1},Oh);function Oh(){th.apply(this,arguments)}let Lh=Mh,Bh=((eh=ca)&&(Ih.__proto__=eh),((Ih.prototype=Object.create(eh&&eh.prototype)).constructor=Ih).prototype.getAxis=function(){var t=this.chart.seriesAxes(this.series);return this.isVertical?t.y:t.x},Ih);function Ih(){eh.apply(this,arguments)}let Eh=Bh,Rh=((ih=o)&&(Vh.__proto__=ih),((Vh.prototype=Object.create(ih&&ih.prototype)).constructor=Vh).prototype._initFields=function(){this.xAxisRanges={},this.yAxisRanges={},this.points=[],this.seriesPoints=[],this.seriesOptions=[],this._evalSeries=[]},Vh.prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},Vh.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)},Vh.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 Eh(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)},Vh.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=Pa(o)&&Pa(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)},Vh.prototype.seriesMissingValues=function(t){return t.missingValues},Vh.prototype.createMissingValue=function(){},Vh.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];Pa(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)),Pa(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))},Vh.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},Vh.prototype.pointType=function(){return Xa},Vh.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},Vh.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=(Tt(i.color)&&(r=o.color),new Xa(t,o));return e.color=r,this.append(e),e},Vh.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)},Vh.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},Vh.prototype.pointSlot=function(t,e){return new B(t.x1,e.y1,t.x2,e.y2)},Vh.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))}}},Vh.prototype.formatPointValue=function(t,e){t=t.value;return this.chartService.format.auto(e,t.x,t.y)},Vh.prototype.animationPoints=function(){for(var t=this.points,e=[],i=0;i<t.length;i++)e.push((t[i]||{}).marker);return e},Vh);function Vh(t,e){ih.call(this,e),this.plotArea=t,this.chartService=t.chartService,this._initFields(),this.render()}e(Rh,{series:[],tooltip:{format:"{0}, {1}"},labels:{format:"{0}, {1}"},clip:!0}),O(Rh.prototype,xl);let jh=Rh,zh=((oh=Xa)&&(Dh.__proto__=oh),((Dh.prototype=Object.create(oh&&oh.prototype)).constructor=Dh).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,dashType:e.dashType},fill:Qi(this.options.pattern,{color:i.background,opacity:t.opacity})});return n.append(s,o),n},Dh.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)},Dh);function Dh(t,e){oh.call(this,t,e),this.category=t.category}zh.prototype.defaults=O({},zh.prototype.defaults,{labels:{position:b},highlight:{opacity:1,border:{color:"#fff",width:2,opacity:1}}}),zh.prototype.defaults.highlight.zIndex=void 0;let Fh=zh,Hh=((rh=jh)&&(Nh.__proto__=rh),((Nh.prototype=Object.create(rh&&rh.prototype)).constructor=Nh).prototype._initFields=function(){this._maxSize=nt,rh.prototype._initFields.call(this)},Nh.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)),rh.prototype.addValue.call(this,t,e)):(this.points.push(null),this.seriesPoints[e.seriesIx].push(null))},Nh.prototype.reflow=function(t){this.updateBubblesSize(t),rh.prototype.reflow.call(this,t)},Nh.prototype.pointType=function(){return Fh},Nh.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=(Tt(i.color)&&(n=o.color),o.markers.background=n,new Fh(t,o));return r.color=n,this.append(r),r},Nh.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}}))}},Nh.prototype.formatPointValue=function(t,e){var i=t.value;return this.chartService.format.auto(e,i.x,i.y,i.size,t.category)},Nh.prototype.createAnimation=function(){},Nh.prototype.createVisual=function(){},Nh);function Nh(){rh.apply(this,arguments)}e(Hh,{tooltip:{format:"{3}"},labels:{format:"{3}"}});let Uh=Hh,Gh=((nh=oo)&&(Wh.__proto__=nh),(Wh.prototype=Object.create(nh&&nh.prototype)).constructor=Wh);function Wh(){nh.apply(this,arguments)}O(Gh.prototype,Na);let Xh=Gh,Yh=((sh=o)&&(qh.__proto__=sh),((qh.prototype=Object.create(sh&&sh.prototype)).constructor=qh).prototype.render=function(){var t=this.options;this._rendered||(this._rendered=!0,k(this.value.target)&&(this.target=new Xh({type:t.target.shape,background:t.target.color||this.color,opacity:t.opacity,zIndex:t.zIndex,border:t.target.border,vAlign:P,align:T}),this.target.value=this.value,this.target.dataItem=this.dataItem,this.target.series=this.series,this.append(this.target)),this.createLabel(),this.createNote())},qh.prototype.createLabel=function(){var t=this.options.labels;t.visible&&(this.label=this.createLabelElement(t),this.append(this.label))},qh.prototype.createLabelElement=function(t){return new Fl(this.getLabelText(t),t,this.pointData())},qh.prototype.getLabelText=function(t){var e=jt(t);return e?e(this.pointData()):this.formatValue(t.format)},qh.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 B(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},qh.prototype.createVisual=function(){sh.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)},qh.prototype.createAnimation=function(){this.bodyVisual&&(this.animation=M.drawing.Animation.create(this.bodyVisual,this.options.animation))},qh.prototype.createHighlight=function(t){return M.drawing.Path.fromRect(this.box.toRect(),t)},qh.prototype.highlightVisual=function(){return this.bodyVisual},qh.prototype.highlightVisualArgs=function(){return{rect:this.box.toRect(),visual:this.bodyVisual,options:this.options}},qh.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},qh.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,series:this.series}},qh.prototype.overlapsBox=function(t){return this.box.overlaps(t)},qh.prototype.getIndex=function(){return this.categoryIx},qh);function qh(t,e){sh.call(this,e),this.aboveAxis=this.options.aboveAxis,this.color=e.color||a,this.value=t}Yh.prototype.tooltipAnchor=Gl.prototype.tooltipAnchor,Yh.prototype.createFocusHighlight=Gl.prototype.createFocusHighlight,e(Yh,{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(Yh.prototype,Na),O(Yh.prototype,Ua),O(Yh.prototype,Hl);let Zh=Yh,Qh=((ah=Fa)&&(Kh.__proto__=ah),((Kh.prototype=Object.create(ah&&ah.prototype)).constructor=Kh).prototype.reflowCategories=function(t){for(var e=this.children,i=e.length,o=0;o<i;o++)e[o].reflow(t[o])},Kh.prototype.plotRange=function(t){var e=t.series,e=this.seriesValueAxis(e),e=this.categoryAxisCrossingValue(e);return[e,t.value.current||e]},Kh.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=(Tt(o.color)&&(t=a.color),new Zh(s,a)),o=(e.color=t,n[i]);return o||(o=new ph({vertical:r.invertAxes,gap:r.gap,spacing:r.spacing,rtl:!r.invertAxes&&(this.chartService||{}).rtl}),this.append(o)),o.append(e),e},Kh.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))},Kh.prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value.current,t.value.target)},Kh.prototype.pointValue=function(t){return t.valueFields.current},Kh.prototype.aboveAxis=function(t){return 0<t.value.current},Kh.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()}},Kh);function Kh(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])}ah.call(this,t,e)}Qh.prototype._setAnimationOptions=yh.prototype._setAnimationOptions,e(Qh,{animation:{type:ns}});let $h=Qh,Jh=((lh=M.Class)&&(tp.__proto__=lh),((tp.prototype=Object.create(lh&&lh.prototype)).constructor=tp).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)}},tp.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)},tp.prototype.hide=function(){this.chartService&&this.chartService.notify(na),this.visible=!1},tp.prototype.destroy=function(){delete this.chartService},tp);function tp(t,e){lh.call(this),this.chartService=t,this.options=O({},this.options,e)}e(Jh,{border:{width:1},opacity:1});var ep,ip,op,yl=Jh,h=((ep=yl)&&(rp.__proto__=ep),((rp.prototype=Object.create(ep&&ep.prototype)).constructor=rp).prototype.initAxisName=function(){var t=this.crosshair.axis,t=t.plotArea.categoryAxis?t.getCategory?"categoryAxis":"valueAxis":t.options.vertical?"yAxis":"xAxis";this.axisName=t},rp.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)},rp.prototype.hide=function(){this.chartService.notify(na,{crosshair:this.crosshair,axisName:this.axisName,axisIndex:this.crosshair.axis.axisIndex})},rp.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=P,i.bottomLeft().translate(0,o)):(e=S,i.topLeft().translate(0,-o))):(e=b,r===C?(t=T,i.topLeft().translate(-o,0)):(t=C,i.topRight().translate(o,0)));return{point:n,align:{horizontal:t,vertical:e}}},rp);function rp(t,e,i){ep.call(this,t,i),this.crosshair=e,this.formatService=t.format,this.initAxisName()}e(h,{padding:10});let np=h,sp=((ip=o)&&(ap.__proto__=ip),((ap.prototype=Object.create(ip&&ip.prototype)).constructor=ap).prototype.showAt=function(t){this.point=t,this.moveLine(),this.line.visible(!0),this.tooltip&&this.tooltip.showAt(t)},ap.prototype.hide=function(){this.line.visible(!1),this.tooltip&&this.tooltip.hide()},ap.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)},ap.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},ap.prototype.createVisual=function(){ip.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)},ap.prototype.destroy=function(){this.tooltip&&this.tooltip.destroy(),ip.prototype.destroy.call(this)},ap);function ap(t,e,i){ip.call(this,i),this.axis=e,this.stickyMode=e instanceof Mr;i=this.options.tooltip;i.visible&&(this.tooltip=new np(t,this,O({},i,{stickyMode:this.stickyMode})))}e(sp,{color:Y,width:2,zIndex:-1,tooltip:{visible:!1}});let lp=sp,hp=((op=o)&&(pp.__proto__=op),((pp.prototype=Object.create(op&&op.prototype)).constructor=pp).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},pp.prototype._clipBox=function(){return this.pane.chartsBox()},pp.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())},pp.prototype.stackRoot=function(){return this},pp.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)))}},pp.prototype.unclipBox=function(){for(var t=this.children,e=this._clipBox(),i=e.clone(),o=0;o<t.length;o++)for(var r=t[o].points||[],n=r.length,s=0;s<n;s++){var a,l,h,p,c=r[s];c&&c.unclipBox&&c.overlapsBox&&!1!==c.visible&&(c.overlapsBox(e)?(a=c.unclipBox(),i.overlaps(a)&&(p=c.labelBox?c.labelBox():new B,l=c.noteBox?c.noteBox():new B,h=Math.max(p.height(),l.height()),p=Math.max(p.width(),l.width()),i.wrapLimit(a,p,h))):c.clipElements&&c.clipElements())}return i},pp.prototype.destroy=function(){op.prototype.destroy.call(this),delete this.parent},pp);function pp(t,e){op.call(this,t),this.pane=e}hp.prototype.isStackRoot=!0;let cp=hp;(up=Ji)&&(fp.__proto__=up),((fp.prototype=Object.create(up&&up.prototype)).constructor=fp).prototype.createTitle=function(){var t=this.options.title;Ot(t)&&(t=O({},t,{align:t.position,position:P})),this.title=Mo.buildTitle(t,fp.prototype.options.title),this.title&&this.append(this.title)},fp.prototype.appendAxis=function(t){this.content.append(t),this.axes.push(t),t.pane=this},fp.prototype.appendAxisAt=function(t,e){this.content.append(t),this.axes.splice(e,0,t),t.pane=this},fp.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},fp.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=[]},fp.prototype.reflow=function(t){var e;he(this.children)===this.content&&(e=this.children.pop()),up.prototype.reflow.call(this,t),e&&this.children.push(e),this.title&&(this.contentBox.y1+=this.title.box.height())},fp.prototype.unclipBox=function(){return this.chartContainer.unclipBox()},fp.prototype.visualStyle=function(){var t=up.prototype.visualStyle.call(this);return t.zIndex=-10,t},fp.prototype.renderComplete=function(){this.options.visible&&this.createGridLines()},fp.prototype.stackRoot=function(){return this},fp.prototype.clipRoot=function(){return this},fp.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))},fp.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()},fp.prototype.chartsBox=function(){for(var t=this.axes,e=t.length,i=new B,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},fp.prototype.clipBox=function(){return this.chartContainer.clipBox},fp.prototype.notifyRender=function(){var t=this.getService();t&&t.notify("paneRender",{pane:new On(this),index:this.paneIndex,name:this.options.name})};var up,h=fp,dp=1;function fp(t){up.call(this,t),this.id="pane"+dp++,this.createTitle(),this.content=new o,this.chartContainer=new cp({},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 gp=h;function yp(t){return!1!==t.options.visible}(vp=o)&&(p.__proto__=vp),((p.prototype=Object.create(vp&&vp.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 gp(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 lp(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:Pa(l)?l:"",series:u})),p=u._defaults,p=void(Tt(h=u.color)&&p&&(h=p.color)),c=void 0,c=d?(p={},h):(p={color:n.color,font:n.font},r.markers.color),Pa(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.reflowArea(i),this.ensureLabelsFit(i)&&this.reflowArea(i)},p.prototype.reflowArea=function(t){this.reflowPanes(),this.detachLabels(),this.reflowAxes(t),this.reflowCharts(t)},p.prototype.ensureLabelsFit=function(t){var r=!1;return t.forEach(function(t){var e=t.unclipBox(),i=t.chartContainer._clipBox(),o=w(t.options.padding||{});e.y1<i.y1+o.top&&(r=!0,o.top=i.y1-e.y1+o.top),e.y2>i.y2-o.bottom&&(r=!0,o.bottom=e.y2-i.y2+o.bottom),e.x1<i.x1+o.left&&(r=!0,o.left=i.x1-e.x1+o.left),e.x2>i.x2-o.right&&(r=!0,o.right=e.x2-i.x2+o.right),r&&(t.options.padding=o)}),r},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=xp(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,T).translate(c.options.margin,0)),f)&&(a[d]=c),(g=xp(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=xp(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,P).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=mp(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,mp(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=mp(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=Sp(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(){vp.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=xp(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(yp);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(yp)).length;);return e}var n=this,i=r.call(this,o).filter(yp),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 vp,h=p;function p(t,e,i){vp.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 mp(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 B}function xp(t,e){for(var i=0;i<t.length;i++){var o=t[i];if(o&&o.pane===e)return o}}var _p,bp,wp,kp,Ap,Sp=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 Cp=h,Tp={hover:function(t,e){this._dispatchEvent(t,e,Ys)},click:function(t,e){this._dispatchEvent(t,e,"plotAreaClick")}},Pp=Tp,Mp=((_p=M.Class)&&(Op.__proto__=_p),((Op.prototype=Object.create(_p&&_p.prototype)).constructor=Op).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},Op.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}},Op.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},Op);function Op(t,e,i){_p.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:Tt(p)?p:Rn[p]})}}let Lp=Mp,Bp=((bp=M.Class)&&(Ip.__proto__=bp),((Ip.prototype=Object.create(bp&&bp.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(){bp.call(this),this._defaults={}}Bp.current=new Bp;let Ep=Bp,Rp=((wp=Gl)&&(Vp.__proto__=wp),((Vp.prototype=Object.create(wp&&wp.prototype)).constructor=Vp).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))},Vp.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)},Vp);function Vp(){wp.apply(this,arguments)}Rp.prototype.defaults=O({},Rp.prototype.defaults,{labels:{format:"{0} - {1}"},tooltip:{format:"{1}"}});let jp=Rp,zp=((kp=yh)&&(Dp.__proto__=kp),((Dp.prototype=Object.create(kp&&kp.prototype)).constructor=Dp).prototype.pointType=function(){return jp},Dp.prototype.pointValue=function(t){return t.valueFields},Dp.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)},Dp.prototype.plotRange=function(t){return t?[t.value.from,t.value.to]:0},Dp.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))},Dp.prototype.aboveAxis=function(t){t=t.value;return t.from<t.to},Dp);function Dp(){kp.apply(this,arguments)}zp.prototype.plotLimits=Fa.prototype.plotLimits;let Fp=zp,Hp=((Ap=Xa)&&(Np.__proto__=Ap),((Np.prototype=Object.create(Ap&&Ap.prototype)).constructor=Np).prototype.aliasFor=function(){return this.parent},Np);function Np(){Ap.apply(this,arguments)}let Up=Hp;(Gp=o)&&(Jp.__proto__=Gp),((Jp.prototype=Object.create(Gp&&Gp.prototype)).constructor=Jp).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 Up(o,O({},this.options,{labels:e.from,markers:t.from})),o=this.toPoint=new Up(o,O({},this.options,{labels:e.to,markers:t.to})),this.copyFields(i),this.copyFields(o),this.append(i),this.append(o))},Jp.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())},Jp.prototype.createHighlight=function(){var t=new M.drawing.Group;return t.append(this.fromPoint.createHighlight()),t.append(this.toPoint.createHighlight()),t},Jp.prototype.highlightVisual=function(){return this.visual},Jp.prototype.highlightVisualArgs=function(){return{options:this.options,from:this.fromPoint.highlightVisualArgs(),to:this.toPoint.highlightVisualArgs()}},Jp.prototype.createFocusHighlight=function(){var t=new M.drawing.Group;return t.append(this.fromPoint.createFocusHighlight()),t.append(this.toPoint.createFocusHighlight()),t},Jp.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}}},Jp.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Jp.prototype.overlapsBox=function(t){return this.box.overlaps(t)},Jp.prototype.unclipElements=function(){this.fromPoint.unclipElements(),this.toPoint.unclipElements()},Jp.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}"}))},Jp.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,T):(i=T,C),r.from&&r.from.position||(this.fromPoint.options.labels.position=o),r.to&&r.to.position||(this.toPoint.options.labels.position=i))},Jp.prototype.copyFields=function(t){t.dataItem=this.dataItem,t.category=this.category,t.series=this.series,t.color=this.color,t.owner=this.owner},Jp.prototype.focusVisual=function(){this.fromPoint.focusVisual()},Jp.prototype.clearFocusFromVisual=function(){this.toPoint.clearFocusFromVisual()},Jp.prototype.getIndex=function(){return this.categoryIx};var Gp,Wp,Xp,Yp,qp,Zp,Qp,Kp,$p,h=Jp;function Jp(t,e){Gp.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,Na),O(h.prototype,Ua),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 tc=h,ec=((Wp=Sl)&&(ic.__proto__=Wp),((ic.prototype=Object.create(Wp&&Wp.prototype)).constructor=ic).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.toGeometryPoints(this.toPoints()))},ic.prototype.stackSegments=function(){var t=this.fromSegments;return t=this.fromSegments?t:this.fromSegments=this.segmentsFromPoints(this.toGeometryPoints(this.fromPoints().reverse()))},ic.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)},ic.prototype.hasStackSegment=function(){return!0},ic.prototype.fromPoints=function(){return this.linePoints.map(function(t){return t.fromPoint})},ic.prototype.toPoints=function(){return this.linePoints.map(function(t){return t.toPoint})},ic);function ic(){Wp.apply(this,arguments)}let oc=ec,rc=((Xp=oc)&&(nc.__proto__=Xp),((nc.prototype=Object.create(Xp&&Xp.prototype)).constructor=nc).prototype.createStrokeSegments=function(){return this.createCurveSegments(this.toPoints())},nc.prototype.stackSegments=function(){var t=this.fromSegments;return t=this.fromSegments?t:this.fromSegments=this.createCurveSegments(this.fromPoints().reverse())},nc.prototype.createCurveSegments=function(t){return(new kn).process(this.toGeometryPoints(t))},nc);function nc(){Xp.apply(this,arguments)}let sc=rc,ac=((Yp=oc)&&(lc.__proto__=Yp),((lc.prototype=Object.create(Yp&&Yp.prototype)).constructor=lc).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.calculateStepPoints(this.toPoints()))},lc.prototype.stackSegments=function(){var t=this.fromSegments;return this.fromSegments||(t=this.fromSegments=this.segmentsFromPoints(this.calculateStepPoints(this.fromPoints()))).reverse(),t},lc);function lc(){Yp.apply(this,arguments)}O(ac.prototype,l);let hc=ac,pc=((qp=Fa)&&(cc.__proto__=qp),((cc.prototype=Object.create(qp&&qp.prototype)).constructor=cc).prototype.render=function(){qp.prototype.render.call(this),this.renderSegments()},cc.prototype.pointType=function(){return tc},cc.prototype.createPoint=function(t,e){var i=e.series,o=e.seriesIx,r=t.valueFields;if(!Pa(r.from)&&!Pa(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,Tt(i.color)&&(e=o.color),t=new tc(r,o);return t.color=e,this.append(t),t},cc.prototype.createSegment=function(t,e,i){var o=(e.line||{}).style;return new("smooth"===o?sc:"step"===o?hc:oc)(t,e,i)},cc.prototype.plotRange=function(t,e){return t?[t.value.from,t.value.to]:[e,e]},cc.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}},cc.prototype.pointSlot=function(t,e){var i,o=e.from,e=e.to,o=this.options.invertAxes?(i=new B(o.x1,t.y1,o.x2,t.y2),new B(e.x1,t.y1,e.x2,t.y2)):(i=new B(t.x1,o.y1,t.x2,o.y2),new B(t.x1,e.y1,t.x2,e.y2));return{from:i,to:o}},cc.prototype.addValue=function(t,e){var i=t.valueFields;m(i.from)||(i.from=i.to),m(i.to)||(i.to=i.from),qp.prototype.addValue.call(this,t,e)},cc.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))},cc.prototype.formatPointValue=function(t,e){t=t.value;return this.chartService.format.auto(e,t.from,t.to)},cc.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)},cc);function cc(){qp.apply(this,arguments)}O(pc.prototype,tl,xl);let uc=pc,dc=((Zp=xh)&&(fc.__proto__=Zp),((fc.prototype=Object.create(Zp&&Zp.prototype)).constructor=fc).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()},fc.prototype.createBody=function(){},fc);function fc(){Zp.apply(this,arguments)}let gc=dc,yc=((Qp=wh)&&(vc.__proto__=Qp),((vc.prototype=Object.create(Qp&&Qp.prototype)).constructor=vc).prototype.pointType=function(){return gc},vc);function vc(){Qp.apply(this,arguments)}let mc=yc,xc=((Kp=o)&&(_c.__proto__=Kp),((_c.prototype=Object.create(Kp&&Kp.prototype)).constructor=_c).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},_c.prototype.createVisual=function(){Kp.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)},_c);function _c(t,e,i){Kp.call(this),this.from=t,this.to=e,this.series=i}e(xc,{animation:{type:qn,delay:Yn}});let bc=xc,wc=(($p=yh)&&(kc.__proto__=$p),((kc.prototype=Object.create($p&&$p.prototype)).constructor=kc).prototype.render=function(){$p.prototype.render.call(this),this.createSegments()},kc.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})}},kc.prototype.updateRange=function(t,e){$p.prototype.updateRange.call(this,{value:e.to},e)},kc.prototype.aboveAxis=function(t){return 0<=t.value},kc.prototype.plotRange=function(t){return[t.from,t.to]},kc.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 bc(s,h,r),i.push(l),this.append(l)),s=h}}},kc);function kc(){$p.apply(this,arguments)}function Ac(t,e,i){return(t=t[String(e)])?t(i):null}function Sc(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 Cc(t,e){return t.every(function(t){t=t.valueFields;return!Pa(t[e])||0<t[e]})}function Tc(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 Mc(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 Oc=wc,Lc={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)(),Cc(t,n.field)&&(n=(t=Sc(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,Tc(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=Sc((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?Tc(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=Sc((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,Tc(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=Mc(i(),(e=t.field,function(t){return{xValue:t.categoryIx+1,yValue:t.valueFields[e]}}),s),t=i.count,r=i.valueMapper,0<t?Tc(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)(),Cc(t,n.field)&&(n=(t=Sc(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,Tc(function(t){return e*Math.pow(t,o)},r)):null);return t?Object.assign({},s,{type:"line",data:t,categoryField:"category",field:"value"}):null}},Bc=Lc;var Ic,Ec,Rc=[rs,Os,Ss,Es],Vc=[ys,Is].concat(Rc),h=((Ic=Cp)&&(c.__proto__=Ic),((c.prototype=Object.create(Ic&&Ic.prototype)).constructor=c).prototype.initFields=function(t){if(this.namedCategoryAxes={},this.namedValueAxes={},this.valueAxisRangeTracker=new jl,this._seriesPointsCache={},this._currentPointsCache={},0<t.length){this.invertAxes=u(t[0].type,[ns,ls,Is,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=Ac(Bc,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,[Ts,Cs]),e),this.createBulletChart(Aa(t,[ls,Bs]),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,Is]),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,Vc),(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 Lp(O({},t),Dn.current,Ep.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,Vc)&&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 yh(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 Fp(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 $h(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 wl(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 El(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 uc(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 mc(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 wh(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 Lh(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 Oc(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,Rc)&&(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,Rc))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){jc(this.options,t,e),jc(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,Is,As,ws]),i=u(t.series.type,[ps,ns]);return e||i&&t.options.isStacked},c);function c(){Ic.apply(this,arguments)}function jc(t,e,i){O([].concat(e instanceof Mr?t.categoryAxis:t.valueAxis)[e.axisIndex],i)}e(h,{categoryAxis:{},valueAxis:{}}),O(h.prototype,Pp);let zc=h,Dc=((Ec=M.Class)&&(Fc.__proto__=Ec),((Fc.prototype=Object.create(Ec&&Ec.prototype)).constructor=Fc).prototype.destroy=function(){this._points=[]},Fc.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))}},Fc.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:Hc,visual:t.highlightVisual(),show:e}),o._defaultPrevented)||t.toggleHighlight(e,i)},Fc.prototype.hide=function(){for(var t=this._points;t.length;)this.togglePointHighlight(t.pop(),!1)},Fc.prototype.isHighlighted=function(t){for(var e=this._points,i=0;i<e.length;i++)if(t===e[i])return!0;return!1},Fc);function Fc(){Ec.call(this),this._points=[]}function Hc(){this._defaultPrevented=!0}let Nc=Dc;function Uc(t,e){e=(e||"").toLowerCase(),t=t.event;return"none"===e&&!(t.ctrlKey||t.shiftKey||t.altKey)||t[e+"Key"]}function Gc(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}(Wc=M.Class)&&(tu.__proto__=Wc),((tu.prototype=Object.create(Wc&&Wc.prototype)).constructor=tu).prototype.start=function(t){return this._active=Uc(t,this.options.key),this._active},tu.prototype.move=function(t){if(this._active){t=this.axisRanges=this._panAxes(t,y).concat(this._panAxes(t,v));if(t.length)return Gc(this.axisRanges=t)}},tu.prototype.end=function(){var t=this._active;return this._active=!1,t},tu.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)}},tu.prototype.destroy=function(){delete this.plotArea},tu.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 Wc,Xc,Yc,qc,Zc,Qc,Kc,$c,Jc,l=tu;function tu(t,e){Wc.call(this),this.plotArea=t,this.options=O({},this.options,e)}l.prototype.options={key:"none",lock:"none"};let eu=l,iu=((Xc=M.Class)&&(ou.__proto__=Xc),((ou.prototype=Object.create(Xc&&Xc.prototype)).constructor=ou).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)},ou.prototype.removeElement=function(){this._marquee.parentNode&&this._marquee.parentNode.removeChild(this._marquee)},ou.prototype.setStyles=function(t){It(this._marquee,t)},ou.prototype.start=function(t){if(Uc(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},ou.prototype._elementOffset=function(){var t=this.chart.element,e=It(t,["paddingLeft","paddingTop"]),i=e.paddingLeft,e=e.paddingTop,t=re(t);return{left:i+t.left,top:e+t.top}},ou.prototype.move=function(t){this._zoomPane&&this.setStyles(this._selectionPosition(t))},ou.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,Gc(this.axisRanges)},ou.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)}},ou.prototype.destroy=function(){this.removeElement(),delete this._marquee,delete this.chart},ou.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},ou.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}},ou);function ou(t,e){Xc.call(this),this.chart=t,this.options=O({},this.options,e),this.createElement()}iu.prototype.options={key:"shift",lock:"none"};let ru=iu,nu=((Yc=M.Class)&&(su.__proto__=Yc),((su.prototype=Object.create(Yc&&Yc.prototype)).constructor=su).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 Gc(this.axisRanges=o)},su.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)}},su.prototype.destroy=function(){delete this.chart},su);function su(t,e){Yc.call(this),this.chart=t,this.options=O({rate:.3},this.options,e)}let au=nu,lu=((qc=o)&&(hu.__proto__=qc),((hu.prototype=Object.create(qc&&qc.prototype)).constructor=hu).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 B),r.renderVisual()}},hu.prototype.reflow=function(t){this.visual.rect(t.toRect()),this.visual.reflow();t=this.visual.clippedBBox();this.box=t?mo(t):new B},hu.prototype.renderVisual=function(){this.addVisual()},hu.prototype.createVisual=function(){},hu);function hu(t,e){qc.call(this,t),this.chartService=e}let pu=lu,cu=((Zc=oo)&&(uu.__proto__=Zc),((uu.prototype=Object.create(Zc&&Zc.prototype)).constructor=uu).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}},uu.prototype.markerOptions=function(){return this.options},uu.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}}:{})},uu.prototype.createHighlight=function(){var t=new Zc(this.markerHighlightOptions()),e=this.paddingBox.clone();return t.reflow(e.pad(t.options.border.width)),this.highlight=[t.getElement()],this.highlight},uu);function uu(){Zc.apply(this,arguments)}e(cu,{border:{width:2},width:8,height:8,background:a,margin:{top:-1,left:-1},vAlign:P,align:C,highlight:{width:10,height:10,border:{color:a,width:2}}});let du=cu,fu=((Qc=oo)&&(gu.__proto__=Qc),((gu.prototype=Object.create(Qc&&Qc.prototype)).constructor=gu).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},gu);function gu(){Qc.apply(this,arguments)}e(fu,{width:15,height:15,align:T,vAlign:S,margin:{right:-2,bottom:2}});let yu=fu,vu=((Kc=oo)&&(mu.__proto__=Kc),((mu.prototype=Object.create(Kc&&Kc.prototype)).constructor=mu).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},mu.prototype.createHighlight=function(){return this.highlight=[this.createHighlightLine(),this.createHighlightMarker()],this.highlight},mu.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 yu(t);return t.reflow(this.parent.paddingBox.clone()),this.highlightLine=t.getElement(),this.highlightLine},mu.prototype.createHighlightMarker=function(){var t=O({},{background:this.options.background},this.options.highlight.markers),e=new Kc(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},mu);function mu(){Kc.apply(this,arguments)}e(vu,{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:P}}});let xu=vu,_u=(($c=oo)&&(bu.__proto__=$c),((bu.prototype=Object.create($c&&$c.prototype)).constructor=bu).prototype.createHighlight=function(){var t=O({},{background:this.options.background},this.options.highlight.markers),t=new $c(t),e=this.paddingBox.clone(),i=this.parent.box.clone();return e.align(i,y,C),e.align(i,v,P),t.reflow(e),this.highlight=[t.getElement()],this.highlight},bu);function bu(){$c.apply(this,arguments)}e(_u,{highlight:{markers:{type:q,width:10,height:10,border:{width:2,color:a},margin:{top:-3,left:-3}}}});let wu=_u,ku=((Jc=Ji)&&(Au.__proto__=Jc),((Au.prototype=Object.create(Jc&&Jc.prototype)).constructor=Au).prototype.createContainer=function(){this.container=new uo({vertical:!1,wrap:!1,align:b,spacing:this.options.spacing}),this.append(this.container)},Au.prototype.createMarker=function(){this.markerWrap=new Jc({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))},Au.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()},Au.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})},Au.prototype._highlightOptions=function(){var t=this.options;return O({markers:{type:t.markers.type}},t.highlight)},Au.prototype._createLine=function(t){var e=this.options;return e.type!==ys||e.markers.visible||(this._line=new xu(O({},{background:e.markerColor,highlight:this._highlightOptions()},t,e.line)),this.markerWrap.append(this._line)),this._line},Au.prototype._createMarkerLine=function(t,e){return this.options.type===ys&&(this._markerLineArea=new yu(O({},{border:{width:e.height}},t)),this.markerWrap.append(this._markerLineArea)),this._markerLineArea},Au.prototype._reduceSize=function(t,e,i){void 0===i&&(i=.6),"number"==typeof t[e]&&(t[e]=t[e]*i)},Au.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 wu(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},Au.prototype._createMarker=function(){return new du(this.markerOptions())},Au.prototype._highlightMarkers=function(){this.options.active&&this._toggleHighlight(!0)},Au.prototype._restoreMarkers=function(){this._toggleHighlight(!1)},Au.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)}))},Au.prototype.createLabel=function(){var t=this.options,e=O({},t.labels);this.container.append(new So(t.text,e))},Au.prototype.getAriaLabelText=function(){return this.options.text},Au.prototype.focusVisual=function(){this.visual.options.set("id",this._id),this.toggleFocusHighlight(!0),this._highlightMarkers()},Au.prototype.clearFocusFromVisual=function(){this.visual.options.set("id",""),this.toggleFocusHighlight(!1),this._restoreMarkers()},Au.prototype.renderComplete=function(){Jc.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)},Au.prototype.click=function(t,e){var i=this.eventArgs(e);!t.trigger(Ns,i)&&e&&"contextmenu"===e.type&&e.preventDefault()},Au.prototype.over=function(t,e){e=this.eventArgs(e);return t.trigger("legendItemHover",e)||(t._legendItemHover(e.seriesIndex,e.pointIndex),this._highlightMarkers()),!0},Au.prototype.out=function(t,e){t._unsetActivePoint(),this._restoreMarkers(),t.trigger("legendItemLeave",this.eventArgs(e))},Au.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}},Au.prototype.createVisual=function(){Jc.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))},Au.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()):Jc.prototype.renderVisual.call(this)},Au.prototype.createFocusHighlight=function(t){var e=t.stroke.width;return M.drawing.Path.fromRect(this.container.box.pad(e/2).toRect(),t)},Au);function Au(t){Jc.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(ku,{accessibility:{role:"checkbox",className:"k-chart-legend-item",ariaRoleDescription:"Legend item"},markers:{},highlight:{visible:!0,markers:{}}});let Su=ku;var Cu,Tu,Pu="custom",h=((Cu=o)&&(Mu.__proto__=Cu),((Mu.prototype=Object.create(Cu&&Cu.prototype)).constructor=Mu).prototype.createContainers=function(){var t=this.options,e=t.position,i=t.align,o=e,r=b;e===Pu?o=C:u(e,[P,S])?(o=i===pt?C:i===J?T:b,r=e):i&&(i===pt?r=P: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)},Mu.prototype.createItems=function(){for(var t=this.getService(),e=this.options,i=this.isVertical(),o=new pu({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 Su(h))}o.render(),this.itemsContainer.append(o)},Mu.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,T]))},Mu.prototype.hasItems=function(){return 0<this.container.children[0].children.length},Mu.prototype.getItems=function(){return this.itemsContainer.children[0].children},Mu.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 B(this.container.box.x1,this.title.box.y1,this.container.box.x2,this.title.box.y2))):this.box=t},Mu.prototype.containerReflow=function(t){var e=this.options,i=this.container,o=e.position,r=e.width,n=e.height,s=o===P||o===S?y:v,a=this.isVertical(),l=t.clone(),h=t.clone(),o=(o!==C&&o!==T||(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},Mu.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 B(o,r,o+t.width(),r+t.height()))},Mu.prototype.renderVisual=function(){this.hasItems()&&Cu.prototype.renderVisual.call(this)},Mu.prototype.createLegendTitle=function(t){var e=O({},{color:Y,position:P,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())},Mu.prototype.createTitleLayout=function(){this.layout=new uo({vertical:!0,wrap:!1}),this.container.append(this.layout)},Mu.prototype.hasTitle=function(){return Boolean(this.options.title&&!1!==this.options.title.visible&&this.options.title.text)},Mu.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))},Mu);function Mu(t,e){void 0===e&&(e={}),Cu.call(this,t),this.chartService=e,u(this.options.position,[P,T,S,C,Pu])||(this.options.position=T),this.createContainers(),this.createLegendTitle(t.title),this.createItems()}e(h,{position:T,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:T,width:15,height:15}});let Ou=h,Lu=((Tu=M.Class)&&(Bu.__proto__=Tu),((Bu.prototype=Object.create(Tu&&Tu.prototype)).constructor=Bu).prototype.register=function(t,e){this._registry.push({type:t,seriesTypes:e})},Bu.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)},Bu);function Bu(){Tu.call(this),this._registry=[]}Lu.current=new Lu;let Iu=Lu;function Eu(t){var e=document.createElement("div");return t&&(e.className=t),e}function Ru(t){for(var e=t;e&&!Ut(e,"k-handle");)e=e.parentNode;return e}(Vu=M.Class)&&(Fu.__proto__=Vu),((Fu.prototype=Object.create(Vu&&Vu.prototype)).constructor=Fu).prototype.onPane=function(t){return this.categoryAxis.pane===t},Fu.prototype.createElements=function(){var t=this.options,e=this.wrapper=Eu("k-selector k-pointer-events-none"),i=(It(e,{top:t.offset.top,left:t.offset.left,width:t.width,height:t.height,direction:"ltr"}),this.selection=Eu("k-selection k-pointer-events-none")),o=(this.leftMask=Eu("k-mask k-pointer-events-none"),this.rightMask=Eu("k-mask k-pointer-events-none"),e.appendChild(this.leftMask),e.appendChild(this.rightMask),e.appendChild(i),this.body=Eu("k-selection-bg k-pointer-events-none")),o=(i.appendChild(o),this.leftHandle=Eu("k-handle k-left-handle k-pointer-events-auto")),r=this.rightHandle=Eu("k-handle k-right-handle k-pointer-events-auto"),i=(o.appendChild(Eu()),r.appendChild(Eu()),i.appendChild(o),i.appendChild(r),this.chartElement.appendChild(e),It(i,["borderLeftWidth","borderRightWidth","height"])),n=It(o,"height").height,s=It(r,"height").height;t.selection={border:{left:i.borderLeftWidth,right:i.borderRightWidth}},It(o,{top:(i.height-n)/2}),It(r,{top:(i.height-s)/2}),e.style.cssText=e.style.cssText},Fu.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)})},Fu.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)}),It(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)},Fu.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)},Fu.prototype._rangeEventArgs=function(t){return{axis:this.categoryAxis.options,from:this._value(t.from),to:this._value(t.to)}},Fu.prototype._pointInPane=function(t,e){var i=this.categoryAxis.pane.box,t=this.chart._toModelCoordinates(t,e);return i.containsPoint(t)},Fu.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=Ru(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)},Fu.prototype._press=function(t){(t=this._state?this._state.moveTarget:Ru(ae(t)))&&vt(t,"k-handle-active")},Fu.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=It(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))))},Fu.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)},Fu.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()))},Fu.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))},Fu.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())},Fu.prototype._gestureend=function(){this._state&&(this.trigger(oa,this._rangeEventArgs(this._state.range)),delete this._state)},Fu.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)))},Fu.prototype._index=function(t){var e=t;return e=t instanceof Date?this.categoryAxis.categoryIndex(t):e},Fu.prototype._value=function(t){var e=t;return e=this._dateAxis&&(e=this.categoryAxis.categoryAt(t))>this.options.max?this.options.max:e},Fu.prototype._slot=function(t){var e=this.categoryAxis,t=this._index(t);return e.getSlot(t,t,!0)},Fu.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=(It(this.leftMask,{width:e}),It(this.selection,{left:e}),o=this._slot(a),L(i.width-(o[l]-r.left+n.left))),a=(It(this.rightMask,{width:t}),i.width-t);a!==i.width&&(a+=s.right),It(this.rightMask,{left:a}),It(this.selection,{width:Math.max(i.width-(e+t)-s.right,0)})},Fu.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)},Fu.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!==T&&(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},Fu.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},Fu.prototype.trigger=function(t,e){return(this.observer||this.chart).trigger(t,e)};var Vu,ju,zu,Du,l=Fu;function Fu(t,e,i,o){Vu.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 Hu=l,Nu=((ju=yl)&&(Uu.__proto__=ju),((Uu.prototype=Object.create(ju&&ju.prototype)).constructor=Uu).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,ju.prototype.show.call(this,{point:t,anchor:i},e,t)):this.hide())},Uu.prototype.hide=function(){delete this._current,ju.prototype.hide.call(this)},Uu);function Uu(){ju.apply(this,arguments)}let Gu=Nu,Wu=((zu=yl)&&(Xu.__proto__=zu),((Xu.prototype=Object.create(zu&&zu.prototype)).constructor=Xu).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))},Xu.prototype._slotAnchor=function(t,e){return this.plotArea.categoryAxis.options.vertical||(t.x=e.center().x),{point:t,align:{horizontal:"left",vertical:"center"}}},Xu.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"}}},Xu);function Xu(t,e){zu.call(this,t.chartService,e),this.plotArea=t,this.formatService=t.chartService.format}e(Wu,{categoryFormat:"{0:d}"});let Yu=Wu,qu=((Du=M.drawing.Animation)&&(Zu.__proto__=Du),((Zu.prototype=Object.create(Du&&Du.prototype)).constructor=Zu).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()},Zu.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))},Zu.prototype.abort=function(){Du.prototype.abort.call(this),this.element.transform(null)},Zu);function Zu(){Du.apply(this,arguments)}e(qu,{duration:Yn}),M.drawing.AnimationFactory.current.register(ns,qu);(Qu=M.drawing.Animation)&&(Ku.__proto__=Qu),((Ku.prototype=Object.create(Qu&&Qu.prototype)).constructor=Ku).prototype.setup=function(){var t=this.center=this.element.bbox().center();this.element.transform(M.geometry.transform().scale(Zn,Zn,t))},Ku.prototype.step=function(t){this.element.transform(M.geometry.transform().scale(t,t,this.center))};var Qu,h=Ku;function Ku(){Qu.apply(this,arguments)}e(h,{easing:"easeOutElastic"}),M.drawing.AnimationFactory.current.register(as,h);($u=M.drawing.Animation)&&(Ju.__proto__=$u),((Ju.prototype=Object.create($u&&$u.prototype)).constructor=Ju).prototype.setup=function(){this.fadeTo=this.element.opacity(),this.element.opacity(0)},Ju.prototype.step=function(t){this.element.opacity(t*this.fadeTo)};var $u,l=Ju;function Ju(){$u.apply(this,arguments)}e(l,{duration:200,easing:"linear"}),M.drawing.AnimationFactory.current.register(qn,l);(td=M.drawing.Animation)&&(od.__proto__=td),((od.prototype=Object.create(td&&td.prototype)).constructor=od).prototype.setup=function(){this.element.transform(M.geometry.transform().scale(Zn,Zn,this.options.center))},od.prototype.step=function(t){this.element.transform(M.geometry.transform().scale(t,t,this.options.center))};var td,ed,id,yl=od;function od(){td.apply(this,arguments)}e(yl,{easing:"easeOutElastic",duration:Yn}),M.drawing.AnimationFactory.current.register(ms,yl);let rd=yl,nd=((ed=jh)&&(sd.__proto__=ed),((sd.prototype=Object.create(ed&&ed.prototype)).constructor=sd).prototype.render=function(){ed.prototype.render.call(this),this.renderSegments()},sd.prototype.createSegment=function(t,e,i){return new(e.style===is?nl:Za)(t,e,i)},sd.prototype.animationPoints=function(){return ed.prototype.animationPoints.call(this).concat(this._segments)},sd.prototype.createMissingValue=function(t,e){if(e===$n)return Pa((e={x:t.x,y:t.y}).x)||(e.x=0),Pa(e.y)||(e.y=0),e},sd);function sd(){ed.apply(this,arguments)}O(nd.prototype,tl);function ad(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,Ii(r,n)/10);e<=0&&(s=n-r);for(var a=r;a<=n;a+=s)o.push([a,t(a)]);return o}function ld(e){return function(t){t=t.valueFields;return{xValue:t.x,yValue:t[e]}}}function hd(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 pd=nd,cd={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)(),Cc(t,s.field)&&(i=(t=Sc(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,ad(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=Sc((0,t.seriesValues)(),ld(e.field)),i=t.slope,o=t.intercept,r=t.xMin,n=t.xMax,0<t.count?ad(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)(),Cc(t,"x")&&(i=(h=Sc(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=hd(t,(r=a.field,function(t){t=t.valueFields;return{xValue:t.x,yValue:t[r]}})),0<h)?(n=i,s=o,ad(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}),ld(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=ld(t.field),e=Mc(e(),n,i),n=e.count,i=e.valueMapper,o=e.xMin,e=e.xMax,0<n?ad(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)(),Cc(t,"x")&&(i=(l=Sc(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=hd(t,ld(s.field)),0<l)?(r=Math.exp(o),n=i,ad(function(t){return r*Math.pow(t,n)},t,s.trendline)):null);return l?Object.assign({},a,{type:"scatterLine",data:l}):null}},ud=cd,dd=((id=Cp)&&(fd.__proto__=id),((fd.prototype=Object.create(id&&id.prototype)).constructor=fd).prototype.initFields=function(){this.namedXAxes={},this.namedYAxes={},this.xAxisRangeTracker=new jl,this.yAxisRangeTracker=new jl},fd.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,Ps),o),this.createScatterLineChart(Aa(r,Ms),o),this.createBubbleChart(Aa(r,as),o))}this.createAxes(t)},fd.prototype.appendChart=function(t,e){this.xAxisRangeTracker.update(t.xAxisRanges),this.yAxisRangeTracker.update(t.yAxisRanges),id.prototype.appendChart.call(this,t,e)},fd.prototype.removeAxis=function(t){var e=t.options.name;id.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},fd.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},fd.prototype.createScatterChart=function(t,e){0<t.length&&this.appendChart(new jh(this,{series:t,clip:e.options.clip}),e)},fd.prototype.createScatterLineChart=function(t,e){0<t.length&&this.appendChart(new pd(this,{series:t,clip:e.options.clip}),e)},fd.prototype.createBubbleChart=function(t,e){0<t.length&&this.appendChart(new Uh(this,{series:t,clip:e.options.clip}),e)},fd.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},fd.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]},fd.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)})},fd.prototype.updateAxisOptions=function(t,e){var i=t.options.vertical,o=this.groupAxes(this.panes),o=(i?o.y:o.x).indexOf(t);gd(this.options,o,i,e),gd(this.originalOptions,o,i,e)},fd.prototype.trendlineFactory=function(t,e){var i=this.seriesValues.bind(this,e.index),t=Ac(ud,t.type,{options:t,seriesValues:i});return t&&(t.xAxis=e.xAxis,t.yAxis=e.yAxis),t},fd.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},fd);function fd(){id.apply(this,arguments)}function gd(t,e,i,o){O([].concat(i?t.yAxis:t.xAxis)[e],o)}e(dd,{xAxis:{},yAxis:{}}),O(dd.prototype,Pp);let yd=dd;(vd=o)&&(Cd.__proto__=vd),((Cd.prototype=Object.create(vd&&vd.prototype)).constructor=Cd).prototype.render=function(){this._rendered||!1===this.visible||(this._rendered=!0,this.createLabel())},Cd.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))},Cd.prototype.getLabelText=function(t){var e=jt(t);return e?e(this.pointData()):this.owner.chartService.format.auto(t.format,this.value)},Cd.prototype.reflow=function(t){this.render(),this.box=t,this.reflowLabel()},Cd.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 B(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 B(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=T):(o=t.x-i,n.orientation=C),n.reflow(new B(o,t.y-e,t.x,t.y))))},Cd.prototype.createVisual=function(){var t,e=this,i=this.sector,o=this.options;vd.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))},Cd.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),Ta(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)))},Cd.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)},Cd.prototype.createAnimation=function(){var t=this.options,e=this.sector.center;O(t,{animation:{center:[e.x,e.y],delay:this.animationDelay}}),vd.prototype.createAnimation.call(this)},Cd.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,dashType:i.dashType}}))},Cd.prototype.highlightVisual=function(){return this.visual.children[0]},Cd.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}},Cd.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},Cd.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)>Sd?b:t<0?T:C,vertical:Math.abs(e)<Ad?b:e<0?S:P})}},Cd.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Cd.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,series:this.series,percentage:this.percentage}},Cd.prototype.getIndex=function(){return this.index};var vd,md,xd,_d,bd,wd,kd,h=Cd,Ad=L(ce(30),g),Sd=L(ce(60),g);function Cd(t,e,i){vd.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,Na),O(h.prototype,Hl);let Td=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,Pa(n))&&""!==n&&this.legendItems.push({active:r,pointIndex:i.index,text:n,series:i.series,markerColor:a,pattern:e.pattern,labels:o})}},Md=Pd,Od=((md=o)&&(Ld.__proto__=md),((Ld.prototype=Object.create(md&&md.prototype)).constructor=Ld).prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},Ld.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),Tt(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)}}},Ld.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"]})},Ld.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 Td(t,e,o),Object.assign(t,i),this.append(t),this.points.push(t))},Ld.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 B(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===T?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},Ld.prototype.leftLabelsReflow=function(t){var e=this.distanceBetweenLabels(t);this.distributeLabels(e,t)},Ld.prototype.rightLabelsReflow=function(t){var e=this.distanceBetweenLabels(t);this.distributeLabels(e,t)},Ld.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},Ld.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)},Ld.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},Ld.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===T),p.orientation===T?(n.align!==q&&(i=r.radius+r.center.x+a),p.reflow(new B(i+c.width(),l,i,l))):(n.align!==q&&(i=r.center.x-r.radius-a),p.reflow(new B(i-c.width(),l,i,l))),l+=c.height()}},Ld.prototype.createVisual=function(){var t=this.options.connectors,e=this.points,i=e.length;md.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===T?(h=Bd(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=Bd(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))}},Ld.prototype.renderVisual=function(){var t,e,i,o;md.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]))},Ld.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}},Ld.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)},Ld.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)},Ld.prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value)},Ld.prototype.animationDelay=function(t){return 70*t},Ld.prototype.stackRoot=function(){return this},Ld);function Ld(t,e){md.call(this,e),this.plotArea=t,this.chartService=t.chartService,this.points=[],this.legendItems=[],this.render()}function Bd(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(Od,{startAngle:90,connectors:{width:2,color:"#939393",padding:8},inactiveItems:{markers:{},labels:{}}}),O(Od.prototype,Md),Od.prototype.isStackRoot=!0;let Id=Od,Ed=((xd=Cp)&&(Rd.__proto__=xd),((Rd.prototype=Object.create(xd&&xd.prototype)).constructor=Rd).prototype.render=function(){this.createPieChart(this.series)},Rd.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)},Rd.prototype.appendChart=function(t,e){xd.prototype.appendChart.call(this,t,e),ee(this.options.legend.data,t.legendItems)},Rd.prototype.getPointBelow=function(t){return this.getPointToTheRight(t)},Rd.prototype.getPointAbove=function(t){return this.getPointToTheLeft(t)},Rd);function Rd(){xd.apply(this,arguments)}let Vd=Ed,jd=((_d=Td)&&(zd.__proto__=_d),((zd.prototype=Object.create(_d&&_d.prototype)).constructor=zd).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 B(e.x,e.y-t/2,e.x,e.y))):_d.prototype.reflowLabel.call(this))},zd.prototype.createSegment=function(t,e){return Xi.current.createRing(t,e)},zd);function zd(){_d.apply(this,arguments)}e(jd,{overlay:{gradient:"roundedGlass"},labels:{position:b},animation:{type:ms}}),O(jd.prototype,Na);let Dd=jd,Fd=((bd=Id)&&(Hd.__proto__=bd),((Hd.prototype=Object.create(bd&&bd.prototype)).constructor=Hd).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 Dd(t,e,o),Object.assign(t,i),this.append(t),this.points.push(t))},Hd.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}bd.prototype.reflow.call(this,t)},Hd.prototype.animationDelay=function(t,e,i){return 50*t+Yn*(e+1)/(i+1)},Hd);function Hd(){bd.apply(this,arguments)}e(Fd,{startAngle:90,connectors:{width:2,color:"#939393",padding:8}});let Nd=Fd,Ud=((wd=Vd)&&(Gd.__proto__=wd),((Gd.prototype=Object.create(wd&&wd.prototype)).constructor=Gd).prototype.render=function(){this.createDonutChart(this.series)},Gd.prototype.createDonutChart=function(t){var e=t[0],t=new Nd(this,{series:t,padding:e.padding,connectors:e.connectors,legend:this.options.legend});this.appendChart(t)},Gd.prototype.getPointBelow=function(t){return this._getNextPoint(t,this._pointsByVertical,-1)},Gd.prototype.getPointAbove=function(t){return this._getNextPoint(t,this._pointsByVertical,1)},Gd);function Gd(){wd.apply(this,arguments)}let Wd=Ud,Xd=((kd=Cp)&&(Yd.__proto__=kd),((Yd.prototype=Object.create(kd&&kd.prototype)).constructor=Yd).prototype.initFields=function(){this.valueAxisRangeTracker=new jl},Yd.prototype.render=function(){this.addToLegend(this.series),this.createPolarAxis(),this.createCharts(),this.createValueAxis()},Yd.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)},Yd.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)},Yd.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)},Yd.prototype.backgroundBox=function(){return this.box},Yd.prototype.detachLabels=function(){},Yd);function Yd(){kd.apply(this,arguments)}var qd,Zd,Qd,Kd,$d,Jd,l=Xd,yl=((qd=jh)&&(tf.__proto__=qd),((tf.prototype=Object.create(qd&&qd.prototype)).constructor=tf).prototype.pointSlot=function(t,e){e=t.center.y-e.y1,t=A.onCircle(t.center,t.startAngle,e);return new B(t.x,t.y,t.x,t.y)},tf);function tf(){qd.apply(this,arguments)}e(yl,{clip:!1});let ef=yl,of=((Zd=pd)&&(rf.__proto__=Zd),(rf.prototype=Object.create(Zd&&Zd.prototype)).constructor=rf);function rf(){Zd.apply(this,arguments)}of.prototype.pointSlot=ef.prototype.pointSlot,e(of,{clip:!1});let nf=of,sf=((Qd=Ll)&&(af.__proto__=Qd),((af.prototype=Object.create(Qd&&Qd.prototype)).constructor=af).prototype.fillToAxes=function(t){var e=this._polarAxisCenter();t.lineTo(e.x,e.y)},af.prototype._polarAxisCenter=function(){return this.parent.plotArea.polarAxis.box.center()},af.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},af);function af(){Qd.apply(this,arguments)}let lf=sf,hf=((Kd=Sl)&&(pf.__proto__=Kd),((pf.prototype=Object.create(Kd&&Kd.prototype)).constructor=pf).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)},pf);function pf(){Kd.apply(this,arguments)}let cf=hf,uf=(($d=nf)&&(df.__proto__=$d),((df.prototype=Object.create($d&&$d.prototype)).constructor=df).prototype.createSegment=function(t,e,i){return new((e.line||{}).style===is?lf:cf)(t,e,i)},df.prototype.createMissingValue=function(t,e){var i;return Pa(t.x)&&e!==Jn&&(i={x:t.x,y:t.y},e===$n)&&(i.y=0),i},df.prototype.seriesMissingValues=function(t){return t.missingValues||$n},df.prototype._hasMissingValuesGap=function(){for(var t=this.options.series,e=0;e<t.length;e++)if("gap"===this.seriesMissingValues(t[e]))return!0},df.prototype.sortPoints=function(t){if(t.sort(ff),this._hasMissingValuesGap())for(var e=0;e<t.length;e++){var i=t[e];!i||Pa(i.value.y)||"gap"!==this.seriesMissingValues(i.series)||delete t[e]}return t},df);function df(){$d.apply(this,arguments)}function ff(t,e){return t.value.x-e.value.x}let gf=uf,yf=((Jd=l)&&(vf.__proto__=Jd),((vf.prototype=Object.create(Jd&&Jd.prototype)).constructor=vf).prototype.createPolarAxis=function(){var t=new pn(this.options.xAxis,this.chartService);this.polarAxis=t,this.axisX=t,this.appendAxis(t)},vf.prototype.render=function(){this.series=[].concat(this.originalSeries),this.createTrendlineSeries(),Jd.prototype.render.call(this)},vf.prototype.valueAxisOptions=function(t){return O(t,{majorGridLines:{type:H},minorGridLines:{type:H}},this.options.yAxis)},vf.prototype.createValueAxis=function(){Jd.prototype.createValueAxis.call(this),this.axisY=this.valueAxis},vf.prototype.trendlineFactory=function(t,e){t=yd.prototype.trendlineFactory.call(this,t,e);return t&&(t.type=_s),t},vf.prototype.appendChart=function(t,e){this.valueAxisRangeTracker.update(t.yAxisRanges),Cp.prototype.appendChart.call(this,t,e)},vf.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)},vf.prototype.createLineChart=function(t,e){0!==t.length&&(t=new nf(this,{series:t}),this.appendChart(t,e))},vf.prototype.createScatterChart=function(t,e){0!==t.length&&(t=new ef(this,{series:t}),this.appendChart(t,e))},vf.prototype.createAreaChart=function(t,e){0!==t.length&&(t=new gf(this,{series:t}),this.appendChart(t,e))},vf.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})},vf.prototype.createCrosshairs=function(){},vf);function vf(){Jd.apply(this,arguments)}e(yf,{xAxis:{},yAxis:{}}),O(yf.prototype,Pp,{seriesValues:yd.prototype.seriesValues});var mf,xf,_f,bf,wf,kf,Af,Sf,Cf,tl=yf,$=((mf=wl)&&(Tf.__proto__=mf),((Tf.prototype=Object.create(mf&&mf.prototype)).constructor=Tf).prototype.pointSlot=function(t,e){e=t.center.y-e.y1,t=A.onCircle(t.center,t.middle(),e);return new B(t.x,t.y,t.x,t.y)},Tf.prototype.renderSegments=function(){if(mf.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)}},Tf.prototype.createSegment=function(t,e,i){var i=new(e.style===is?nl:Za)(t,e,i),o=this.seriesMissingValues(e);return t.length!==e.data.length&&o!==Jn||(i.options.closed=!0),i},Tf);function Tf(){mf.apply(this,arguments)}e($,{clip:!1,limitPoints:!1});let Pf=$,Mf=((xf=Ll)&&(Of.__proto__=xf),((Of.prototype=Object.create(xf&&xf.prototype)).constructor=Of).prototype.fillToAxes=function(){},Of);function Of(){xf.apply(this,arguments)}let Lf=Mf,Bf=((_f=Sl)&&(If.__proto__=_f),((If.prototype=Object.create(_f&&_f.prototype)).constructor=If).prototype.fillToAxes=function(){},If);function If(){_f.apply(this,arguments)}let Ef=Bf,Rf=((bf=Pf)&&(Vf.__proto__=bf),((Vf.prototype=Object.create(bf&&bf.prototype)).constructor=Vf).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 Lf(t,e,i,r,n)).options.closed=!0:(t.push(t[0]),s=new Ef(t,e,i,r,n)),s},Vf.prototype.seriesMissingValues=function(t){return t.missingValues||$n},Vf);function Vf(){bf.apply(this,arguments)}let jf=Rf,zf=((wf=Dd)&&(Df.__proto__=wf),((Df.prototype=Object.create(wf&&wf.prototype)).constructor=Df).prototype.getIndex=function(){return this.categoryIx},Df);function Df(t,e){wf.call(this,t,null,e)}e(zf,{overlay:{gradient:"none"},labels:{distance:10}});let Ff=zf,Hf=((kf=o)&&(Nf.__proto__=kf),((Nf.prototype=Object.create(kf&&kf.prototype)).constructor=Nf).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})},Nf);function Nf(t){kf.call(this,t),this.forEach=t.rtl?Xl:Wl}e(Hf,{gap:1,spacing:0});let Uf=Hf,Gf=((Af=o)&&(Wf.__proto__=Af),((Wf.prototype=Object.create(Af&&Af.prototype)).constructor=Wf).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 B;for(var s=r;0<=s&&s<o;s+=n){var a=i[s].sector;a.startAngle=t.startAngle,a.angle=t.angle}},Wf);function Wf(){Af.apply(this,arguments)}let Xf=Gf,Yf=((Sf=yh)&&(qf.__proto__=Sf),((qf.prototype=Object.create(Sf&&Sf.prototype)).constructor=qf).prototype.pointType=function(){return Ff},qf.prototype.clusterType=function(){return Uf},qf.prototype.stackType=function(){return Xf},qf.prototype.categorySlot=function(t,e){return t.getSlot(e)},qf.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},qf.prototype.reflowPoint=function(t,e){t.sector=e,t.reflow()},qf.prototype.createAnimation=function(){this.options.animation.center=this.box.toRect().center(),Sf.prototype.createAnimation.call(this)},qf);function qf(){Sf.apply(this,arguments)}Yf.prototype.reflow=Fa.prototype.reflow,e(Yf,{clip:!1,limitPoints:!1,animation:{type:"pie"}});let Zf=Yf,Qf=((Cf=l)&&(Kf.__proto__=Cf),((Kf.prototype=Object.create(Cf&&Cf.prototype)).constructor=Kf).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()},Kf.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)},Kf.prototype.aggregateCategories=function(){zc.prototype.aggregateCategories.call(this,this.panes)},Kf.prototype.createCategoryAxesLabels=function(){zc.prototype.createCategoryAxesLabels.call(this,this.panes)},Kf.prototype.filterSeries=function(t){return t},Kf.prototype.trendlineFactory=function(t,e){t=zc.prototype.trendlineFactory.call(this,t,e);return t&&(t.type=As),t},Kf.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)},Kf.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},Kf.prototype.createAreaChart=function(t,e){0!==t.length&&(t=new jf(this,this.chartOptions(t)),this.appendChart(t,e))},Kf.prototype.createLineChart=function(t,e){0!==t.length&&(t=new Pf(this,this.chartOptions(t)),this.appendChart(t,e))},Kf.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 Zf(this,i),this.appendChart(n,e),this._hasBarCharts=!0)},Kf.prototype.seriesCategoryAxis=function(){return this.categoryAxis},Kf.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})},Kf.prototype.createCrosshairs=function(){},Kf.prototype._pointsByVertical=function(t){return Cf.prototype._pointsByVertical.call(this,t).sort(this._getSeriesCompareFn())},Kf.prototype._getSeriesCompareFn=function(){return function(t,e){return e.value-t.value}},Kf);function Kf(){Cf.apply(this,arguments)}O(Qf.prototype,Pp,{appendChart:zc.prototype.appendChart,aggregateSeries:zc.prototype.aggregateSeries,seriesSourcePoints:zc.prototype.seriesSourcePoints,seriesValues:zc.prototype.seriesValues}),e(Qf,{categoryAxis:{categories:[]},valueAxis:{}});var $f,Jf,tg,eg,h=Qf,yl=(($f=o)&&(ig.__proto__=$f),((ig.prototype=Object.create($f&&$f.prototype)).constructor=ig).prototype.getLabelText=function(t){var e=jt(t);return e?e(this.pointData()):t.format?this.formatValue(t.format):this.value},ig.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 B(o,e[0].y,r,e[2].y),i&&i.reflow(new B(t.x1,e[0].y,t.x2,e[2].y))},ig.prototype.createVisual=function(){var t=this,e=this.options;$f.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)},ig.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()},ig.prototype.createHighlight=function(t){return M.drawing.Path.fromPoints(this.points,t)},ig.prototype.highlightVisual=function(){return this.visual.children[0]},ig.prototype.highlightVisualArgs=function(){var t=M.drawing.Path.fromPoints(this.points).close();return{options:this.options,path:t}},ig.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},ig.prototype.tooltipAnchor=function(){var t=this.box;return{point:new A(t.center().x,t.y1),align:{horizontal:"center",vertical:"top"}}},ig.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},ig.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,series:this.series,percentage:this.percentage}},ig.prototype.getIndex=function(){return this.index},ig);function ig(t,e,i){$f.call(this,e),this.value=t,this.options.index=i.index}e(yl,{color:a,border:{width:1},labels:{format:""},accessibility:{role:t,className:i,ariaRoleDescription:js}}),O(yl.prototype,Na),O(yl.prototype,Hl);let og=yl,rg=((Jf=o)&&(ng.__proto__=Jf),((ng.prototype=Object.create(Jf&&Jf.prototype)).constructor=ng).prototype.formatPointValue=function(t,e){return this.plotArea.chartService.format.auto(e,t.value)},ng.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,Tt(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)}},ng.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"]})},ng.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 og(t,i,e),Object.assign(t,e),this.append(t),this.points.push(t),t},ng.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},ng.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},ng.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)}},ng.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}},ng.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)}},ng);function ng(t,e){Jf.call(this,e),this.plotArea=t,this.chartService=t.chartService,this.points=[],this.labels=[],this.legendItems=[],this.render()}e(rg,{neckRatio:.3,width:300,dynamicSlope:!1,dynamicHeight:!0,segmentSpacing:0,labels:{visible:!1,align:b,position:b,zIndex:1}}),O(rg.prototype,Md);let sg=rg,ag=((tg=sg)&&(lg.__proto__=tg),(lg.prototype=Object.create(tg&&tg.prototype)).constructor=lg);function lg(t,e){e.dynamicSlope=!1,e.neckRatio=1e6,tg.call(this,t,e)}let hg=ag,pg=((eg=Cp)&&(cg.__proto__=eg),((cg.prototype=Object.create(eg&&eg.prototype)).constructor=cg).prototype.render=function(){this.createChart(sg,Aa(this.series,[us])),this.createChart(hg,Aa(this.series,[ds]))},cg.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))},cg.prototype.appendChart=function(t,e){eg.prototype.appendChart.call(this,t,e),ee(this.options.legend.data,t.legendItems)},cg.prototype._pointsByVertical=function(t){return this.pointsBySeriesIndex(t.series.index)},cg.prototype.getPointToTheRight=function(t){return this.getPointBelow(t)},cg.prototype.getPointToTheLeft=function(t){return this.getPointAbove(t)},cg);function cg(){eg.apply(this,arguments)}var ug,dg,fg,$=pg,l=((ug=o)&&(gg.__proto__=ug),((gg.prototype=Object.create(ug&&ug.prototype)).constructor=gg).prototype.render=function(){this._rendered||(this._rendered=!0,this.createMarker(),this.createLabel(),this.createNote())},gg.prototype.createLabel=function(){var t=this.options.labels;t.visible&&(this.label=this.createLabelElement(t),this.append(this.label))},gg.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())},gg.prototype.getLabelText=function(t){var e=jt(t);return e?e(this.pointData()):this.formatValue(t.format)},gg.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},gg.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())},gg.prototype.createVisual=function(){ug.prototype.createVisual.call(this),this.addAccessibilityAttributesToVisual()},gg.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)},gg.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}},gg.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)},gg.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},gg.prototype.highlightVisual=function(){return this.rectVisual},gg.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this.rectVisual}},gg.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()},gg.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}}},gg.prototype.overlapsBox=function(t){return this.box.overlaps(t)},gg.prototype.unclipElements=function(){},gg.prototype.pointData=function(){return{x:this.value.x,y:this.value.y,value:this.value.value,dataItem:this.dataItem,series:this.series}},gg);function gg(t,e){ug.call(this),this.options=e,this.color=e.color||a,this.value=t}O(l.prototype,Na),O(l.prototype,Ua),O(l.prototype,Hl),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 yg=l,vg=((dg=o)&&(mg.__proto__=dg),((mg.prototype=Object.create(dg&&dg.prototype)).constructor=mg).prototype._initFields=function(){this.points=[],this.seriesOptions=[],this.valueRange={min:rt,max:nt},this._evalSeries=[]},mg.prototype.render=function(){this.setRange(),this.traverseDataPoints(this.addValue.bind(this))},mg.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))}},mg.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)},mg.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},mg.prototype.pointType=function(){return yg},mg.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)},mg.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),Tt(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 yg(t,s));return n.color=a,this.append(n),n},mg.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)},mg.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},mg.prototype.pointSlot=function(t,e){return new B(t.x1,e.y1,t.x2,e.y2)},mg.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))}},mg.prototype.formatPointValue=function(t,e){t=t.value;return this.chartService.format.auto(e,t.x,t.y,t.value)},mg.prototype.animationPoints=function(){for(var t=this.points,e=[],i=0;i<t.length;i++)e.push((t[i]||{}).marker);return e},mg);function mg(t,e){dg.call(this,e),this.plotArea=t,this.chartService=t.chartService,this._initFields(),this.render()}e(vg,{series:[],tooltip:{format:"{0}, {1}: {2}"},labels:{format:"{2}"},clip:!0});let xg=vg,_g=((fg=Cp)&&(bg.__proto__=fg),((bg.prototype=Object.create(fg&&fg.prototype)).constructor=bg).prototype.initFields=function(){this.namedXAxes={},this.namedYAxes={}},bg.prototype.render=function(t){void 0===t&&(t=this.panes),this.bindCategories(),this.createAxes(t),this.createCharts(t),this.createAxisLabels()},bg.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()}},bg.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)}},bg.prototype.createHeatmapChart=function(t,e){t=new xg(this,{series:t});this.appendChart(t,e)},bg.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},bg.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)},bg.prototype.createAxisLabels=function(){for(var t=this.axes,e=0;e<t.length;e++)t[e].createLabels()},bg.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},bg.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]},bg.prototype.removeAxis=function(t){var e=t.options.name;fg.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},bg.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)})},bg.prototype.updateAxisOptions=function(t,e){var i=t.options.vertical,o=this.groupAxes(this.panes),o=(i?o.y:o.x).indexOf(t);kg(this.options,o,i,e),kg(this.originalOptions,o,i,e)},bg.prototype.crosshairOptions=function(t){return Object.assign({},t.options.crosshair,{zIndex:0})},bg.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 wg(t.pointData().x,r)}).sort(function(t,e){return i._getPointAxisYIndex(t)-i._getPointAxisYIndex(e)});return this.axisY.options.reverse?t.reverse():t},bg.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 wg(t.pointData().y,r)}).sort(function(t,e){return i._getPointAxisXIndex(t)-i._getPointAxisXIndex(e)});return this.axisX.options.reverse?t.reverse():t},bg.prototype._getPointAxisXIndex=function(t){return this._getPointAxisIndex(this.axisX,t.pointData().x)},bg.prototype._getPointAxisYIndex=function(t){return this._getPointAxisIndex(this.axisY,t.pointData().y)},bg.prototype._getPointAxisIndex=function(t,e){return t.children.findIndex(function(t){return wg(e,t.value)})},bg);function bg(){fg.apply(this,arguments)}function wg(t,e){return t instanceof Date&&e instanceof Date?br(t,e):t===e}function kg(t,e,i,o){O([].concat(i?t.yAxis:t.xAxis)[e],o)}e(_g,{xAxis:{},yAxis:{}}),O(_g.prototype,Pp);var Ag,yl=_g,t="color",i="first",js="max",l="noteText",Sg=(Iu.current.register(zc,[ns,ps,ys,Is,rs,Os,hs,vs,ls,Bs,ss,Ls,Ts,Cs,Rs,gs,Ss,Es].concat(Hs)),Iu.current.register(yd,[Ps,Ms,as].concat(Hs)),Iu.current.register(Vd,[ms]),Iu.current.register(Wd,[cs]),Iu.current.register($,[us,ds]),Iu.current.register(tl,[xs,_s,bs].concat(Hs)),Iu.current.register(h,[ws,ks,As].concat(Hs)),Iu.current.register(yl,[fs]),Dn.current.register([ns,ps,ys,Is,rs,Os],[ut],[zs,t,l,Qn,Kn,Ds,Fs]),Dn.current.register([Ts,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]),Ep.current.register([ns,ps,ys,Is,rs,Os,Rs,gs],{value:js,color:i,noteText:i,errorLow:"min",errorHigh:js}),Ep.current.register([Ts,Cs,Ss,Es],{from:"min",to:js,color:i,noteText:i}),Ep.current.register([ws,ks,As],{value:js,color:i}),Dn.current.register([Ps,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]),Ep.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]),Ep.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,Bs],["current","target"],[zs,t,"visibleInLegend",l,Ds,Fs]),Ep.current.register([ls,Bs],{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]),Cg="mousedown",Tg="mousemove",Pg="contextmenu",Mg="mouseleave",Og="keydown",Lg="k-chart-overlay-top",$=((Ag=M.Class)&&(f.__proto__=Ag),((f.prototype=Object.create(Ag&&Ag.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,Lg),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=Sg,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 Tn(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=Tt(e)?r.filterPoints(e):(Ot(e)?(i=e.series,o=e.category):i=o=e,n.type===cs?Bg(r.pointsBySeriesName(i),o):u(n.type,[ms,us,ds])?Bg((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;Tt(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(),i=(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(),this.options.transitions);!1!==i&&t.traverse(function(t){var e;t.animation&&(e=i&&!0!==i?i.loading:i,t.animation.options=Object.assign({},t.animation.options,e),t.animation.setup())}),this._initSurface(),this.surface.draw(t.visual),!1!==i&&t.traverse(function(t){t.animation&&t.animation.play()}),this._tooltip=this._createTooltip(),this._highlight=new Nc,this._setupSelection(),this._createPannable(),this._createZoomSelection(),this._createMousewheelZoom(),this._setComputedStyles(),this.trigger("render"),zg(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}}),jg(this._originalOptions,t),this.options=O({},this._originalOptions,t),this._initTheme(this.options,this._theme),this.bindCategories(),(t=this._getModel()).renderVisual(),zg(t._plotArea.panes),e=t.visual,this.options=i):e=this.surface.exportVisual(),e},f.prototype._sharedTooltip=function(){return this._plotArea instanceof zc&&this.options.tooltip&&this.options.tooltip.shared},f.prototype._createPannable=function(){var t=this.options;!1!==t.pannable&&(this._pannable=new eu(this._plotArea,t.pannable))},f.prototype._createZoomSelection=function(){var t=this.options.zoomable,e=(t||{}).selection;!1!==t&&!1!==e&&(this._zoomSelection=new ru(this,e))},f.prototype._createMousewheelZoom=function(){var t=this.options.zoomable,e=(t||{}).mousewheel;!1!==t&&!1!==e&&(this._mousewheelZoom=new au(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 Gu(this.chartService,t)},f.prototype._createSharedTooltip=function(t){return new Yu(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<Sg.length;l++)o=n.axisDefaults||{},r=(r=[].concat(n[i=Sg[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 Ou(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 Hu(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[Mg]=this._mouseleaveHandler,t[Og]=this._keydownHandler,t[Cg]=this._mousedownHandler,t.focus=this._focusHandler,t.blur=this._blurHandler,t)),this._shouldAttachMouseMove()&&ie(e,((t={})[Tg]=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:Eg(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:Eg(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:Eg(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:Eg(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=Eg(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=It(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=Pe(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===P||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 Cp)}),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={})[Tg]=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={})[Tg]=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,e.transitions=!1),this._redraw(),t&&(e.transitions=t)},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={})[Tg]=this._mousemoveThrottled,t)),this._shouldAttachMouseMove()&&ie(this.element,((t={})[Tg]=this._mousemoveThrottled,t))},f.prototype.applyOptions=function(t,e){jg(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[Tg]=this._mousemoveThrottled,t[Mg]=this._mouseleaveHandler,t[Cg]=this._mousedownHandler,t[Og]=this._keydownHandler,t.focus=this._focusHandler,t.blur=this._blurHandler,t)),this.domEvents&&(this.domEvents.destroy(),delete this.domEvents),this._mouseMoveTrackHandler&&ue(document,((t={})[Tg]=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={}),Ag.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 Bg(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 Eg(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 Rg,Vg=["data","categories"];function jg(t,e){for(var i in e){var o,r,n;!u(i,Vg)&&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)&&jg(r,o))}}function zg(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 Dg=$,Fg=((Rg=Yu)&&(Hg.__proto__=Rg),((Hg.prototype=Object.create(Rg&&Rg.prototype)).constructor=Hg).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}},Hg.prototype._defaultAnchor=function(t,e){return this._slotAnchor({},e)},Hg);function Hg(){Rg.apply(this,arguments)}let Ng=Fg;var Ug=[ns,ls];function Gg(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 Wg(t,e){for(var i=0;i<t.length;i++)t[i].style.display=e[i]}function Xg(t){return m(t)?[t]:t}(Yg=Dg)&&(Zg.__proto__=Yg),((Zg.prototype=Object.create(Yg&&Yg.prototype)).constructor=Zg).prototype._setElementClass=function(t){vt(t,"k-sparkline")},Zg.prototype._initElement=function(t){Yg.prototype._initElement.call(this,t),this._initialWidth=Math.floor(ne(t).width)},Zg.prototype._resize=function(){var t=this.element,e=Gg(t.childNodes);this._initialWidth=Math.floor(ne(t).width),Wg(t.childNodes,e),Yg.prototype._resize.call(this)},Zg.prototype._modelOptions=function(){var t=this.options,e=this._surfaceWrap(),i=Gg(e.childNodes),o=document.createElement("span"),t=(o.innerHTML="&nbsp;",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),Wg(e.childNodes,i),this.surface&&this.surface.resize(),t},Zg.prototype._surfaceWrap=function(){var t;return this.stage||(t=this.stage=document.createElement("span"),this.element.appendChild(t)),this.stage},Zg.prototype._createPlotArea=function(t){t=Yg.prototype._createPlotArea.call(this,t);return this._autoWidth=this._initialWidth||this._calculateWidth(t),t},Zg.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,Bs])?a.seriesOptions.length:1),n=Math.max(n,h))}}t=n*e.pointWidth;return 0<t&&(t+=i.left+i.right),t},Zg.prototype._createSharedTooltip=function(t){return new Ng(this._plotArea,t)},Zg.normalizeOptions=function(t){t=Xg(t);return(t=yt(t)?{seriesDefaults:{data:t}}:O({},t)).series||(t.series=[{data:Xg(t.data)}]),O(t,{seriesDefaults:{type:t.type}}),t=u(t.series[0].type,Ug)||u(t.seriesDefaults.type,Ug)?O({},{categoryAxis:{crosshair:{visible:!1}}},t):t};var Yg,qg,tl=Zg;function Zg(){Yg.apply(this,arguments)}e(tl,{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 Qg=tl,Kg=((qg=M.drawing.Animation)&&($g.__proto__=qg),(($g.prototype=Object.create(qg&&qg.prototype)).constructor=$g).prototype.setup=function(){this._initialOpacity=parseFloat(It(this.element,"opacity").opacity)},$g.prototype.step=function(t){It(this.element,{opacity:String(Xt(this._initialOpacity,0,t))})},$g.prototype.abort=function(){qg.prototype.abort.call(this),It(this.element,{display:"none",opacity:String(this._initialOpacity)})},$g.prototype.cancel=function(){qg.prototype.abort.call(this),It(this.element,{opacity:String(this._initialOpacity)})},$g);function $g(){qg.apply(this,arguments)}let Jg=Kg;function ty(t,e){var i=document.createElement("div");return i.className=t,e&&(i.style.cssText=e),i}(ey=M.Class)&&(iy.__proto__=ey),((iy.prototype=Object.create(ey&&ey.prototype)).constructor=iy).prototype.createElements=function(){var t=this.element=ty("k-navigator-hint","display: none; position: absolute; top: 1px; left: 1px;"),e=this.tooltip=ty("k-tooltip k-chart-tooltip"),i=this.scroll=ty("k-scroll");e.innerHTML="&nbsp;",t.appendChild(e),t.appendChild(i)},iy.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||(It(o,{visibility:"hidden",display:"block"}),this._visible=!0),r&&(c=r({from:t,to:e})),s.innerHTML=c,It(s,{left:i.center().x-s.offsetWidth/2,top:i.y1}),It(s,["marginTop","borderTopWidth","height"]));It(n,{width:l,left:h+a*p,top:i.y1+r.marginTop+r.borderTopWidth+r.height/2}),It(o,{visibility:"visible"})},iy.prototype.clearHideTimeout=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this._hideAnimation&&this._hideAnimation.cancel()},iy.prototype.hide=function(){var t=this;this.clearHideTimeout(),this._hideTimeout=setTimeout(function(){t._visible=!1,t._hideAnimation=new Jg(t.element),t._hideAnimation.setup(),t._hideAnimation.play()},this.options.hideDelay)},iy.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 ey,h=iy;function iy(t,e,i){ey.call(this),this.options=O({},this.options,i),this.container=t,this.chartService=e;i=It(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 oy=h;var ry,ny,sy="_navigator",ay=sy,ly="_default";function hy(t){ry.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 py(){}(ry=M.Class)&&(hy.__proto__=ry),((hy.prototype=Object.create(ry&&ry.prototype)).constructor=hy).prototype.parseDate=function(t){return Sr(this.chart.chartService.intl,t)},hy.prototype.clean=function(){this.selection&&(this.selection.destroy(),this.selection=null),this.hint&&(this.hint.destroy(),this.hint=null)},hy.prototype.destroy=function(){this.chart&&(this.chart.removeObserver(this.chartObserver),delete this.chart),this.clean()},hy.prototype.redraw=function(){this._redrawSelf(),this.initSelection()},hy.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=(py.prototype=i,new py);0!==i.categoriesCount()&&(this.clean(),l.box=i.box,this.selection=new Hu(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 oy(t.element,t.chartService,{min:r,max:o,template:jt(e.hint),format:e.hint.format}))},hy.prototype.setRange=function(){var t=this.chart._createPlotArea(!0).namedCategoryAxes[ay].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()},hy.prototype._redrawSelf=function(t){var e=this.chart._plotArea;e&&e.redraw(he(e.panes),t)},hy.prototype.redrawSlaves=function(){var t=this.chart,e=t._plotArea,i=e.panes.filter(function(t){return t.options.name!==sy});e.srcSeries=t.options.series,e.options.categoryAxis=t.options.categoryAxis,e.clearSeriesPointsCache(),e.redraw(i)},hy.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))},hy.prototype._dragEnd=function(){this.filterAxes(),this.filter(),this.redrawSlaves(),this.hint&&this.hint.hide()},hy.prototype.readSelection=function(){var t=this.selection.options,e=t.from,t=t.to,i=this.options.select;i.from=e,i.to=t},hy.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!==sy&&(n.min=i,n.max=o)}},hy.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))},hy.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))},hy.prototype._zoomEnd=function(t){this._dragEnd(t)},hy.prototype.showHint=function(t,e){var i=this.chart._plotArea;this.hint&&this.hint.show(t,e,i.backgroundBox())},hy.prototype._selectStart=function(t){return this.chart._selectStart(t)},hy.prototype._select=function(t){return this.showHint(t.from,t.to),this.chart._select(t)},hy.prototype._selectEnd=function(t){return this.hint&&this.hint.hide(),this.readSelection(),this.filterAxes(),this.filter(),this.redrawSlaves(),this.chart._selectEnd(t)},hy.prototype.mainAxis=function(){var t=this.chart._plotArea;if(t)return t.namedCategoryAxes[ay]},hy.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}},hy.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:sy}),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||ly}),hy.attachAxes(t,i),hy.attachSeries(t,i,e))},hy.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||ly}),0===Aa(i,Vs).length),i=O({type:"date",pane:sy,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:ay,title:null,baseUnit:"fit",baseUnitStep:"auto",labels:{visible:!1},majorTicks:{visible:!1}}),O({},i,r,{name:ay+"_labels",maxDateGroups:20,baseUnitStep:"auto",labels:{position:""},plotBands:[],autoBaseUnitSteps:{minutes:[]},_overlap:!0}),O({},i,r,{name:ay+"_ticks",maxDateGroups:200,majorTicks:{width:.5},plotBands:[],title:null,labels:{visible:!1,mirror:!0},_overlap:!0})),t.push(O({name:ay,pane:sy,majorGridLines:{visible:!1},visible:!1},e.valueAxis))},hy.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:ay,categoryAxis:ay,autoBind:e.autoBindElements}))};let cy=hy,uy=((ny=Dg)&&(dy.__proto__=ny),((dy.prototype=Object.create(ny&&ny.prototype)).constructor=dy).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);cy.setup(t,e),ny.prototype.applyDefaults.call(this,t,e)},dy.prototype._setElementClass=function(t){vt(t,"k-chart k-stockchart")},dy.prototype.setOptions=function(t){this.destroyNavigator(),ny.prototype.setOptions.call(this,t)},dy.prototype.noTransitionsRedraw=function(){var t=this.options.transitions;this.options.transitions=!1,this._fullRedraw(),this.options.transitions=t},dy.prototype._resize=function(){this.noTransitionsRedraw()},dy.prototype._redraw=function(){var t=this.navigator;!this._dirty()&&t&&t.options.partialRedraw?t.redrawSlaves():this._fullRedraw()},dy.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},dy.prototype._fullRedraw=function(){var t=this.navigator;t||(t=this.navigator=new cy(this),this.trigger("navigatorCreated",{navigator:t})),t.clean(),t.setRange(),ny.prototype._redraw.call(this),t.initSelection()},dy.prototype._trackSharedTooltip=function(t){var e=this._plotArea.paneByPoint(t);e&&e.options.name===sy?this._unsetActivePoint():ny.prototype._trackSharedTooltip.call(this,t)},dy.prototype.bindCategories=function(){ny.prototype.bindCategories.call(this),this.copyNavigatorCategories()},dy.prototype.copyNavigatorCategories=function(){for(var t,e=[].concat(this.options.categoryAxis),i=0;i<e.length;i++){var o=e[i];o.name===ay?t=o.categories:t&&o.pane===sy&&(o.categories=t)}},dy.prototype.destroyNavigator=function(){this.navigator&&(this.navigator.destroy(),this.navigator=null)},dy.prototype.destroy=function(){this.destroyNavigator(),ny.prototype.destroy.call(this)},dy.prototype._stopChartHandlers=function(t){var e=this._eventCoordinates(t),e=this._plotArea.paneByPoint(e);return ny.prototype._stopChartHandlers.call(this,t)||e&&e.options.name===sy},dy.prototype._toggleDragZoomEvents=function(){this._dragZoomEnabled||(this.element.style.touchAction="none",this._dragZoomEnabled=!0)},dy);function dy(){ny.apply(this,arguments)}e(uy,{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 fy=uy;var gy="arrowPointer",yy="barPointer",vy=Math.PI/180,my="inside",yl="linear",xy="outside",l="radialPointer",js="radialRangePointer";function _y(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 by=M.drawing.Group,wy=M.drawing.Path,ky=M.drawing.Text;function Ay(t,e){var i=t.box,o=t.children[0].box,r=e.border||{},n=e.background||"",i=wy.fromRect(new M.geometry.Rect([i.x1,i.y1],[i.width(),i.height()]),{stroke:{}}),t=new ky(t.text,new M.geometry.Point(o.x1,o.y1),{font:e.font,fill:{color:e.color}}),o=_y(t.bbox().clone(),e.padding),e=wy.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 by;return o.append(i),o.append(e),o.append(t),o}function Sy(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 Cy(t,e){e=w(e);return e.left=-e.left,e.top=-e.top,e.right=-e.right,e.bottom=-e.bottom,_y(t,e)}var Ty,Py=M.drawing.Path,My=M.drawing.Surface,i=((Ty=M.Class)&&(Oy.__proto__=Ty),((Oy.prototype=Object.create(Ty&&Ty.prototype)).constructor=Oy).prototype.destroy=function(){this.surface&&(this.surface.destroy(),this.surface=null),delete this.element,delete this.surfaceElement},Oy.prototype.value=function(t){var e=this.pointers[0];if(0===arguments.length)return e.value();e.value(t),this._setValueOptions(t)},Oy.prototype._draw=function(){var t=this.surface;t.clear(),t.draw(this._visuals)},Oy.prototype.exportVisual=function(){return this._visuals},Oy.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)},Oy.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]},Oy.prototype.resize=function(){this.noTransitionsRedraw()},Oy.prototype.noTransitionsRedraw=function(){var t=this.options.transitions;this._toggleTransitions(!1),this.redraw(),this._toggleTransitions(t)},Oy.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(),Cy(t.bbox(),this._gaugeAreaMargin));this.reflow(t)},Oy.prototype.setOptions=function(t,e){this._originalOptions=O(this._originalOptions,t),this.options=O({},this._originalOptions),this._initTheme(e),this.redraw()},Oy.prototype.setDirection=function(t){this.contextService.rtl=Boolean(t),this.surface&&"svg"===this.surface.type&&(this.surface.destroy(),this.surface=null)},Oy.prototype.setIntlService=function(t){this.contextService.intl=t},Oy.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}},Oy.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=Cy(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}})},Oy.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=My.create(i,{type:t.renderAs}))},Oy.prototype._surfaceSize=function(){var t=this.options,e=this._getSize();return t.gaugeArea&&O(e,t.gaugeArea),e},Oy.prototype._surfaceElement=function(){return this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.element.appendChild(this.surfaceElement)),this.surfaceElement},Oy.prototype.getSize=function(){return this._getSize()},Oy.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}},Oy.prototype._defaultSize=function(){return{width:200,height:200}},Oy.prototype._toggleTransitions=function(t){this.options.transitions=t;for(var e=0;e<this.pointers.length;e++)this.pointers[e].options.animation.transitions=t},Oy);function Oy(t,e,i,o){void 0===o&&(o={}),Ty.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 Ly=i;var By=M.drawing.Path,Iy=M.drawing.Group,Ey=M.geometry.Point;function Ry(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 Ey(l,a),new Ey(l+n.size,a)):(s=new Ey(a,h),new Ey(a,h+n.size)),new By({stroke:{color:n.color,width:n.width}}).moveTo(s).lineTo(r))))}(Vy=Xr)&&(zy.__proto__=Vy),((zy.prototype=Object.create(Vy&&Vy.prototype)).constructor=zy).prototype.initUserOptions=function(t){t=O({},this.options,t);return(t=O({},t,{labels:{mirror:t.mirror}})).majorUnit=t.majorUnit||Ii(t.min,t.max),t},zy.prototype.initFields=function(){},zy.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},zy.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=Sy(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(By.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},zy.prototype.renderLabels=function(){for(var t=this.labels,e=this.options,i=new Iy,o=0;o<t.length;o++)i.append(Ay(t[o],e.labels));return i},zy.prototype.renderLine=function(){var t=this.options.line,e=this.lineBox(),i=new Iy;return 0<t.width&&t.visible&&((t=new By({stroke:{color:t.color,dashType:t.dashType,width:t.width}})).moveTo(e.x1,e.y1).lineTo(e.x2,e.y2),i.append(t)),i},zy.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 Ry(t,this.getMajorTickPositions(),o,e.majorTicks),Ry(t,this.getMinorTickPositions(),o,O({},{skipUnit:i/e.minorUnit},e.minorTicks)),t};var Vy,jy,t=zy;function zy(t,e){t=t||{};!k(t.reverse)&&!1===t.vertical&&(e||{}).rtl&&(t=Object.assign({},t,{reverse:!0})),Vy.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:my,color:Y,width:.5,visible:!0},minorTicks:{size:10,align:my,color:Y,width:.5,visible:!0},line:{width:.5},labels:{position:my,padding:2},mirror:!1,_alignLines:!1});let Dy=t,Fy=((jy=M.Class)&&(Hy.__proto__=jy),((Hy.prototype=Object.create(jy&&jy.prototype)).constructor=Hy).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()},Hy);function Hy(t,e){jy.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(Fy,{color:Y});var Ny,Uy,Ds=Fy,Fs=((Ny=Ds)&&(Gy.__proto__=Ny),((Gy.prototype=Object.create(Ny&&Ny.prototype)).constructor=Gy).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 B(r.x1+h,r.y1,r.x1+h,r.y2),s?i.x1-=a:i.x2+=a,o.shape!==yy&&(t=e=new B(r.x2+h,r.y1-l,r.x2+h,r.y2+l))):(i=new B(r.x1,r.y1-h,r.x2,r.y1-h),s?i.y2+=a:i.y1-=a,o.shape!==yy&&(t=e=new B(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)},Gy.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}},Gy.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"]},Gy);function Gy(t,e){Ny.call(this,t,e),this.options=O({track:{visible:k(e.track)}},this.options)}e(Fs,{shape:yy,track:{border:{width:1}},color:Y,border:{width:1},opacity:1,margin:w(3),animation:{type:yy},visible:!0});let Wy=Fs,Xy=((Uy=M.drawing.Animation)&&(Yy.__proto__=Uy),((Yy.prototype=Object.create(Uy&&Uy.prototype)).constructor=Yy).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))},Yy.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))},Yy);function Yy(){Uy.apply(this,arguments)}e(Xy,{easing:yl,duration:250}),M.drawing.AnimationFactory.current.register(gy,Xy);let qy=Xy;var Zy,Qy,Ky=M.geometry.Point,$y=M.drawing.Path;function Jy(t,e){Zy.call(this,t,e),k(this.options.size)||(this.options.size=.6*this.scale.options.majorTicks.size)}(Zy=Wy)&&(Jy.__proto__=Zy),((Jy.prototype=Object.create(Zy&&Zy.prototype)).constructor=Jy).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 Ky(0,0-i),new Ky(0-o*e,0),new Ky(0,0+i)]:[new Ky(0-i,0),new Ky(0,0+o*e),new Ky(0+i,0)]},Jy.prototype.repaint=function(){var t=this.scale,e=this.options,t=new qy(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()},Jy.prototype.render=function(){var t=this.scale,e=this.options,i=this.getElementOptions(),o=this.pointerShape(e.value),i=(e.animation.type=gy,new $y({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 tv=Jy,ev=((Qy=M.drawing.Animation)&&(iv.__proto__=Qy),((iv.prototype=Object.create(Qy&&Qy.prototype)).constructor=iv).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)},iv.prototype.step=function(t){t=Xt(this.from,this.to,t);this._set(t)},iv.prototype._set=function(t){var e="set"+this.axis.toUpperCase(),i=this.options.newPoints;i[0][e](t),i[1][e](t)},iv);function iv(){Qy.apply(this,arguments)}e(ev,{easing:yl,speed:250}),M.drawing.AnimationFactory.current.register(yy,ev);let ov=ev;var rv,nv=M.drawing.Group,sv=M.drawing.Path;function av(t,e){rv.call(this,t,e),k(this.options.size)||(this.options.size=.3*this.scale.options.majorTicks.size)}(rv=Wy)&&(av.__proto__=rv),((av.prototype=Object.create(rv&&rv.prototype)).constructor=av).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]},av.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 ov(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()},av.prototype.render=function(){var t=new nv,e=this.getElementOptions(),e=(this.options.track.visible&&t.append(this.renderTrack()),this.pointerPath=new sv({stroke:e.stroke,fill:e.fill}));return t.append(e),this.elements=t},av.prototype.renderTrack=function(){var t=this.options.track,e=t.border||{},i=this.trackBox.clone().pad(e.width||0);return new sv.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 lv=av;var hv,pv=M.drawing.Group,zs=((hv=Ly)&&(cv.__proto__=hv),((cv.prototype=Object.create(hv&&hv.prototype)).constructor=cv).prototype.reflow=function(t){var e=this.pointers,i=t.origin.x,o=t.origin.y,i=new B(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()},cv.prototype._buildVisual=function(){var t=new pv,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},cv.prototype._createModel=function(){var t=this.options,e=this.scale=new Dy(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?tv:lv;this.pointers.push(new n(e,r))}},cv.prototype._defaultSize=function(){var t=this.options.scale.vertical;return{width:t?60:200,height:t?200:60}},cv.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 B(r.x-e,t.y1,r.x+e,t.y2)):(e=n.height()/2,new B(t.x1,r.y-e,t.x2,r.y+e))},cv.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 B(o.x1+t,n.y1,o.x2+t,n.y2))):(t=n.center().y-r.center().y,e.reflow(new B(o.x1,o.y1+t,o.x2,o.y2+t)));for(var a=0;a<i.length;a++)i[a].reflow(this.bbox)},cv.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))},cv.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)},cv);function cv(){hv.apply(this,arguments)}e(zs,{transitions:!0,gaugeArea:{background:""},scale:{vertical:!0}});let uv=zs;var dv=M.drawing.Arc,fv=M.drawing.Path,gv=M.drawing.Group;function yv(t,e,i,o){var r=new gv,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 fv({stroke:{color:o.color,width:o.width}}).moveTo(l).lineTo(h))}return r}function vv(t,e,i,o){return{from:t,to:e,color:i,opacity:o}}(mv=Xr)&&(_v.__proto__=mv),((_v.prototype=Object.create(mv&&mv.prototype)).constructor=_v).prototype.initUserOptions=function(t){t=O({},this.options,t);return t.majorUnit=t.majorUnit||Ii(t.min,t.max),t.minorUnit=t.minorUnit||t.majorUnit/10,t},_v.prototype.initFields=function(){},_v.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()},_v.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()},_v.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},_v.prototype.hasRanges=function(){var t=this.options.ranges;return t&&t.length},_v.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},_v.prototype.labelsCount=function(){var t=mv.prototype.labelsCount.call(this),e=this.options;return 360<=e.endAngle-e.startAngle&&e.max%e.majorUnit==0&&--t,t},_v.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 gv,s=.05*i,a=(k(t.rangeDistance)?s=t.rangeDistance:t.rangeDistance=s,t.labels),l=a.position===my,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)*vy,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 B(_-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)):(_=Ay(g,t.labels),n.append(_)),this.bbox=M.geometry.Rect.union(this.bbox,_.bbox())}return n},_v.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===my&&(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())}},_v.prototype.renderRanges=function(){var t=this.rangeSegments(),e=t.length,i=new gv;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},_v.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 dv(i,{stroke:{width:r,color:o.color,opacity:o.opacity,lineCap:o.lineCap}})},_v.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(vv(r,n,s));for(var a=0;a<i;a++)for(var l=Sy(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(vv(l.from,l.to,l.color,l.opacity)),c.from<=l.to&&l.to<=c.to&&o.push(vv(l.to,c.to,s,l.opacity)),c.to=l.from;break}}}return o},_v.prototype.getRangeRadius=function(){var t=this.arc,e=this.options,i=e.rangeSize,o=e.rangeDistance,r=e.majorTicks.size;return e.labels.position===xy?t.getRadiusX()-r-o-i:t.getRadiusX()-i},_v.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})},_v.prototype.renderTicks=function(){var t,e=this.arc,i=this.options,o=e.clone(),r=(this.majorTickAngles=this.tickAngles(e,i.majorUnit),this.majorTicks=yv(o,this.majorTickAngles,i.majorUnit,i.majorTicks),new gv),n=(r.append(this.majorTicks),i.majorTicks.size),s=i.minorTicks.size;return this._tickDifference=n-s,i.labels.position===xy&&(t=o.getRadiusX(),o.setRadiusX(t-n+s).setRadiusY(t-n+s)),this.minorTickAngles=this.normalizeTickAngles(this.tickAngles(e,i.minorUnit)),this.minorTicks=yv(o,this.minorTickAngles,i.minorUnit,i.minorTicks),r.append(this.minorTicks),r},_v.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},_v.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},_v.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)},_v.prototype.repositionTicks=function(t,e,i){var o=i&&this._tickDifference||0,r=this.arc,n=r.getRadiusX();i&&this.options.labels.position===xy&&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 mv,xv,$=_v;function _v(t,e){mv.call(this,0,1,t,e)}e($,{min:0,max:100,majorTicks:{size:15,align:my,color:Y,width:.5,visible:!0},minorTicks:{size:10,align:my,color:Y,width:.5,visible:!0},startAngle:-30,endAngle:210,labels:{position:my,padding:2}});let bv=$,wv=((xv=M.drawing.Animation)&&(kv.__proto__=xv),((kv.prototype=Object.create(xv&&xv.prototype)).constructor=kv).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))},kv);function kv(t,e){xv.call(this,t,e);t=this.options;t.duration=Math.max(Math.abs(t.newAngle-t.oldAngle)/t.duration*1e3,1)}e(wv,{easing:yl,duration:150}),M.drawing.AnimationFactory.current.register(l,wv);let Av=wv;var Sv,Cv=M.drawing.Circle,Tv=M.drawing.Group,Pv=M.drawing.Path,tl=((Sv=Ds)&&(Mv.__proto__=Sv),((Mv.prototype=Object.create(Sv&&Sv.prototype)).constructor=Mv).prototype.setAngle=function(t){this.elements.transform(M.geometry.transform().rotate(t,this.center))},Mv.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 Av(this.elements,O(e.animation,{oldAngle:i,newAngle:t})).play()},Mv.prototype.render=function(){var t=this.scale,e=this.options,i=new Tv;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(vy),i},Mv.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))},Mv.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},Mv.prototype._renderCap=function(){var t=this.options,t=t.cap.color||t.color,e=new M.geometry.Circle(this.center,this.capSize);return new Cv(e,{fill:{color:t},stroke:{color:t}})},Mv);function Mv(){Sv.apply(this,arguments)}e(tl,{cap:{size:.05},arrow:{width:16,height:14},animation:{type:l,duration:150}});let Ov=tl;var Lv,Bv,Iv,Ev,Rv,Vv,jv,zv=M.drawing.Group,h=((Lv=Ly)&&(Dv.__proto__=Lv),((Dv.prototype=Object.create(Lv&&Lv.prototype)).constructor=Dv).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()},Dv.prototype._buildVisual=function(t,e,i){var o=this._visuals=new zv;o.append(t),o.append(i.ticks),o.append(i.ranges),this._buildPointers(e),o.append(i.labelElements)},Dv.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)}},Dv.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)},Dv.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)},Dv.prototype.getDiff=function(t,e){return Math.min(e.width()-t.width(),e.height()-t.height())},Dv.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)},Dv.prototype._createModel=function(){var t=this.options,e=t.pointer,i=this.scale=new bv(t.scale,this.contextService);this.pointers=[];for(var o=yt(e)?e:[e],r=0;r<o.length;r++){var n=new Ov(i,O({},o[r],{animation:{transitions:t.transitions}}));this.pointers.push(n)}},Dv);function Dv(){Lv.apply(this,arguments)}e(h,{transitions:!0,gaugeArea:{background:""}});let Fv=h,Hv=((Bv=bv)&&(Nv.__proto__=Bv),((Nv.prototype=Object.create(Bv&&Bv.prototype)).constructor=Nv).prototype.rangeSegments=function(){var t=this.options;return[{from:t.min,to:t.max,color:t.rangePlaceholderColor,lineCap:t.rangeLineCap}]},Nv.prototype.hasRanges=function(){return!0},Nv.prototype.placeholderRangeAngle=function(t){var e=this.ranges.children[0].geometry();this.options.reverse?e.setEndAngle(t):e.setStartAngle(t)},Nv.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},Nv);function Nv(){Bv.apply(this,arguments)}e(Hv,{min:0,max:100,majorTicks:{visible:!1},minorTicks:{visible:!1},labels:{visible:!1},startAngle:0,endAngle:180,rangeLineCap:"round"});let Uv=Hv,Gv=((Iv=M.drawing.Animation)&&(Wv.__proto__=Iv),((Wv.prototype=Object.create(Iv&&Iv.prototype)).constructor=Wv).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()))},Wv);function Wv(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(Gv,{easing:yl,duration:150}),M.drawing.AnimationFactory.current.register(js,Gv);let Xv=Gv,Yv=((Ev=Ds)&&(qv.__proto__=Ev),((qv.prototype=Object.create(Ev&&Ev.prototype)).constructor=qv).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 Xv(this,O(e.animation,{oldAngle:i,newAngle:t})),this.animation.play())},qv.prototype.angle=function(t){var e=this.elements.geometry();this.scale.options.reverse?e.setStartAngle(t):e.setEndAngle(t),this.scale.placeholderRangeAngle(t)},qv.prototype.stroke=function(t){this.elements.stroke(t)},qv.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}))},qv.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},qv.prototype.reflow=function(){this.render(),this.bbox=this.elements.bbox()},qv);function qv(){Ev.apply(this,arguments)}e(Yv,{animation:{type:js,duration:150}});let Zv=Yv,Qv=((Rv=Fv)&&(Kv.__proto__=Rv),((Kv.prototype=Object.create(Rv&&Rv.prototype)).constructor=Kv).prototype._initTheme=function(t){Rv.prototype._initTheme.call(this,t),this.options.color=this.options.color||(this.theme.pointer||{}).color},Kv.prototype._createModel=function(){var t=this.options,e=this.scale=new Uv(t.scale,this.contextService),e=new Zv(e,O({},{colors:t.colors,color:t.color,value:t.value,opacity:t.opacity,animation:{transitions:t.transitions}}));this.pointers=[e]},Kv.prototype._buildPointers=function(t){for(var e=0;e<t.length;e++){var i=t[e];i.render(),i.value(i.options.value)}},Kv.prototype._setValueOptions=function(t){this.options.value=t},Kv.prototype.currentColor=function(){var t=this.pointers[0];if(t)return t.currentColor()},Kv.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}},Kv);function Kv(){Rv.apply(this,arguments)}let $v=Qv,Jv=((Vv=$v)&&(tm.__proto__=Vv),((tm.prototype=Object.create(Vv&&Vv.prototype)).constructor=tm).prototype._createModel=function(){var t=this.options.scale;"number"!=typeof t.startAngle&&(t.startAngle=90),t.endAngle=t.startAngle+360,Vv.prototype._createModel.call(this)},tm);function tm(){Vv.apply(this,arguments)}let em=Jv,im=((jv=M.Class)&&(om.__proto__=jv),((om.prototype=Object.create(jv&&jv.prototype)).constructor=om).prototype.initProperties=function(){},om.prototype.setOptions=function(t){this.options=Object.assign({},this.options,t),this.quietZoneLength=this.options.addQuietZone?2*this.options.quietZoneLength:0},om.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}},om.prototype.initValue=function(){},om.prototype.addQuietZone=function(){this.pattern.push(this.options.quietZoneLength||10)},om.prototype.addData=function(){},om.prototype.invalidCharacterError=function(t){throw new Error('Character "'+t+'" is not valid for symbology '+this.name+".")},om);function om(t){jv.call(this),this.setOptions(t),this.initProperties()}e(im,{quietZoneLength:10,addQuietZone:!0,addCheckSum:!0});var rm,nm=Object.assign,i=((rm=im)&&(sm.__proto__=rm),((sm.prototype=Object.create(rm&&rm.prototype)).constructor=sm).prototype.initProperties=function(){rm.prototype.initProperties.call(this),nm(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"})},sm.prototype.initValue=function(t,e){this.pattern=[],this.value=t,this.width=e,this.totalUnits=0},sm.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()},sm.prototype.setBaseUnit=function(){this.baseUnit=this.width/(this.totalUnits+this.quietZoneLength)},sm.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]))},sm.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},sm.prototype.weightedValue=function(t,e,i,o){return((e-i)%o||o)*t},sm.prototype.getValue=function(t){return isNaN(t)?(t!==this.DASH&&this.invalidCharacterError(t),this.DASH_VALUE):parseInt(t,10)},sm.prototype.addCharacter=function(t){t=this.getValue(t),t=this.characterMap[t];this.addPattern(t)},sm.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},sm);function sm(){rm.apply(this,arguments)}e(i,{addCheckSum:!0});var am,lm,hm=Object.assign,t=((lm=im)&&(cm.__proto__=lm),((cm.prototype=Object.create(lm&&lm.prototype)).constructor=cm).prototype.initProperties=function(){lm.prototype.initProperties.call(this),hm(this,{minBaseUnitLength:.7})},cm.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()},cm.prototype.addCharacter=function(t){var e=this.characterMap[t];e||this.invalidCharacterError(t),this.addBase(e)},cm.prototype.addBase=function(){},cm),Fs=((am=t)&&(pm.__proto__=am),((pm.prototype=Object.create(am&&am.prototype)).constructor=pm).prototype.initProperties=function(){am.prototype.initProperties.call(this),hm(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"}}})},pm.prototype.initValue=function(t,e,i){this.width=e,this.height=i,this.value=t,this.dataLength=t.length,this.pattern=[],this.patternString=""},pm.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))},pm.prototype.getBaseUnit=function(t){return this.width/this.getBaseWidth(t)},pm.prototype.getBaseWidth=function(t){return this.quietZoneLength+3*(t+2)*(this.dataLength+2)+this.gapWidth*(this.dataLength+1)},pm.prototype.addStart=function(){this.addPattern(this.characterMap.START.pattern),this.addCharacterGap()},pm.prototype.addBase=function(t){this.addPattern(t.pattern),this.addCharacterGap()},pm.prototype.addStop=function(){this.addPattern(this.characterMap.START.pattern)},pm.prototype.addPattern=function(t){for(var e=0;e<t.length;e++)this.patternString+=this.patternMappings[t.charAt(e)]},pm.prototype.addCharacterGap=function(){this.patternString+=this.gapWidth+this.splitCharacter},pm);function pm(){am.apply(this,arguments)}function cm(){lm.apply(this,arguments)}e(Fs,{addCheckSum:!1});var um,dm,fm,gm,ym,vm,mm,xm,_m,bm,wm,km={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=((vm=Fs)&&(Vm.__proto__=vm),((Vm.prototype=Object.create(vm&&vm.prototype)).constructor=Vm).prototype.initProperties=function(){vm.prototype.initProperties.call(this),O(this,km,{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}}})},Vm),Am=Object.assign,$=((ym=t)&&(Rm.__proto__=ym),((Rm.prototype=Object.create(ym&&ym.prototype)).constructor=Rm).prototype.initProperties=function(){ym.prototype.initProperties.call(this),Am(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"}})},Rm.prototype.initValue=function(t,e,i){this.value=t,this.width=e,this.height=i,this.pattern=[],this.values=[],this.dataLength=t.length},Rm.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.")},Rm.prototype.setBaseUnit=function(){this.baseUnit=this.width/(9*(this.dataLength+2+2)+this.quietZoneLength+1)},Rm.prototype.addStart=function(){var t=this.characterMap.START.pattern;this.addPattern(t)},Rm.prototype.addStop=function(){this.addStart(),this.pattern.push(this.characterMap.TERMINATION_BAR)},Rm.prototype.addBase=function(t){this.addPattern(t.pattern),this.values.push(t.value)},Rm.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)},Rm.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]},Rm.prototype._findCharacterByValue=function(t){for(var e in this.characterMap)if(this.characterMap[e].value===t)return e},Rm.prototype.weightedValue=function(t,e,i){return(e%i||i)*t},Rm.prototype.addPattern=function(t){for(var e,i=0;i<t.length;i++)e=parseInt(t.charAt(i),10),this.pattern.push(e)},Rm),l=((gm=$)&&(Em.__proto__=gm),((Em.prototype=Object.create(gm&&gm.prototype)).constructor=Em).prototype.initProperties=function(){gm.prototype.initProperties.call(this),O(this,km,{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))}})},Em),Sm=/^\d+$/,Cm=Object.assign,tl=((fm=im)&&(Im.__proto__=fm),((Im.prototype=Object.create(fm&&fm.prototype)).constructor=Im).prototype.initProperties=function(){fm.prototype.initProperties.call(this),Cm(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(Sm.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),Tm=/^\d+$/,Pm=/^[a-z0-9]+$/i,Mm=Object.assign,h=((dm=M.Class)&&(Bm.__proto__=dm),((Bm.prototype=Object.create(dm&&dm.prototype)).constructor=Bm).prototype.initProperties=function(){},Bm.prototype.addStart=function(){},Bm.prototype.is=function(){},Bm.prototype.isCode=function(){return!1},Bm.prototype.move=function(){},Bm.prototype.pushState=function(){},Bm),yl=((um=h)&&(Lm.__proto__=um),((Lm.prototype=Object.create(um&&um.prototype)).constructor=Lm).prototype.initProperties=function(){um.prototype.initProperties.call(this),O(this,{FNC4:"FNC4",SHIFT:98})},Lm.prototype.addStart=function(){this.encoding.addPattern(this.START)},Lm.prototype.is=function(t,e){t=t.charCodeAt(e);return this.isCode(t)},Lm.prototype.move=function(t){for(var e=0;!this._moves[e].call(this,t)&&e<this._moves.length;)e++},Lm.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++},Lm.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)},Lm.prototype._moveFNC=function(t){if(t.fnc)return t.fnc=!1,t.previousState===this.key},Lm.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},Lm.prototype._moveState=function(){return this.encoding.addPattern(this.MOVE),!0},Lm),Om={};function Lm(t,e){um.call(this,t),this.states=e,this._initMoves(e)}function Bm(t){dm.call(this),this.encoding=t,this.initProperties()}function Im(){fm.apply(this,arguments)}function Em(){gm.apply(this,arguments)}function Rm(){ym.apply(this,arguments)}function Vm(){vm.apply(this,arguments)}function jm(t,e){mm.call(this,t),this.states=e}function zm(t,e){xm.call(this,t),this._initSubStates(e)}function Dm(){_m.apply(this,arguments)}function Fm(){bm.apply(this,arguments)}function Hm(){wm.apply(this,arguments)}Om.A=((wm=yl)&&(Hm.__proto__=wm),((Hm.prototype=Object.create(wm&&wm.prototype)).constructor=Hm).prototype.initProperties=function(){wm.prototype.initProperties.call(this),Mm(this,{key:"A",shiftKey:"B",MOVE:101,START:103})},Hm.prototype.isCode=function(t){return 0<=t&&t<96},Hm.prototype.getValue=function(t){return t<32?t+64:t-32},Hm),Om.B=((bm=yl)&&(Fm.__proto__=bm),((Fm.prototype=Object.create(bm&&bm.prototype)).constructor=Fm).prototype.initProperties=function(){bm.prototype.initProperties.call(this),Mm(this,{key:"B",shiftKey:"A",MOVE:100,START:104})},Fm.prototype.isCode=function(t){return 32<=t&&t<128},Fm.prototype.getValue=function(t){return t-32},Fm),Om.C=((_m=h)&&(Dm.__proto__=_m),((Dm.prototype=Object.create(_m&&_m.prototype)).constructor=Dm).prototype.initProperties=function(){_m.prototype.initProperties.call(this),Mm(this,{key:"C",MOVE:99,START:105})},Dm.prototype.addStart=function(){this.encoding.addPattern(this.START)},Dm.prototype.is=function(t,e){var i=tx(t,e,4);return(e+4<=t.length||2===t.length)&&Tm.test(i)},Dm.prototype.move=function(){this.encoding.addPattern(this.MOVE)},Dm.prototype.pushState=function(t){for(var e;(e=tx(t.value,t.index,2))&&Tm.test(e)&&2===e.length;)this.encoding.addPattern(parseInt(e,10)),t.index+=2},Dm.prototype.getValue=function(t){return t},Dm),Om.FNC4=((xm=h)&&(zm.__proto__=xm),((zm.prototype=Object.create(xm&&xm.prototype)).constructor=zm).prototype.initProperties=function(){xm.prototype.initProperties.call(this),Mm(this,{key:"FNC4",dependentStates:["A","B"]})},zm.prototype.addStart=function(t){t=t.value.charCodeAt(0)-128,t=this._getSubState(t);this.encoding[t].addStart()},zm.prototype.is=function(t,e){t=t.charCodeAt(e);return this.isCode(t)},zm.prototype.isCode=function(t){return 128<=t&&t<256},zm.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},zm.prototype._pushStart=function(t){this.encoding.addPattern(this.encoding[t.state].MOVE),this.encoding.addPattern(this.encoding[t.state].MOVE)},zm.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},zm.prototype._initSubStates=function(t){this.subStates=[];for(var e=0;e<t.length;e++)u(t[e],this.dependentStates)&&this.subStates.push(t[e])},zm.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]},zm.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},zm),Om.FNC1=((mm=h)&&(jm.__proto__=mm),((jm.prototype=Object.create(mm&&mm.prototype)).constructor=jm).prototype.initProperties=function(){mm.prototype.initProperties.call(this),Mm(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})},jm.prototype.addStart=function(){this.encoding[this.startState].addStart()},jm.prototype.is=function(){return u(this.key,this.states)},jm.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},jm.prototype.validate=function(t,e){var e=e.substr(t.id.length),i=t.ai;if(!i.type&&!Tm.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.")},jm.prototype.getByLength=function(t,e){for(var i,o,r=2;r<=4;r++)if(i=tx(t,e,r),o=this.getApplicationIdentifier(i)||this.getApplicationIdentifier(i.substring(0,i.length-1)))return{id:i,ai:o};this.unsupportedAIError(i)},jm.prototype.unsupportedAIError=function(t){throw new Error("'"+t+"' is not a supported Application Identifier")},jm.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}},jm.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}},jm);(Ym=im)&&(Jm.__proto__=Ym),((Jm.prototype=Object.create(Ym&&Ym.prototype)).constructor=Jm).prototype.initProperties=function(){Ym.prototype.initProperties.call(this),Mm(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})},Jm.prototype._initStates=function(){for(var t=0;t<this.states.length;t++)this[this.states[t]]=new Om[this.states[t]](this,this.states)},Jm.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},Jm.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())},Jm.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))}},Jm.prototype.addStart=function(t){this[t.state].addStart(t),this.position=1},Jm.prototype.addCheckSum=function(){this.checksum=this.checkSum%103,this.addPattern(this.checksum)},Jm.prototype.addStop=function(){this.addPattern(this.STOP)},Jm.prototype.setBaseUnit=function(){this.baseUnit=this.width/(this.totalUnits+this.quietZoneLength)},Jm.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++},Jm.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 Nm,Um,Gm,Wm,Xm,Ym,Ds=Jm,js=((Xm=Ds)&&($m.__proto__=Xm),(($m.prototype=Object.create(Xm&&Xm.prototype)).constructor=$m).prototype.initProperties=function(){Xm.prototype.initProperties.call(this),Mm(this,{name:"Code 128 A",states:["A"]})},$m),t=((Wm=Ds)&&(Km.__proto__=Wm),((Km.prototype=Object.create(Wm&&Wm.prototype)).constructor=Km).prototype.initProperties=function(){Wm.prototype.initProperties.call(this),Mm(this,{name:"Code 128 B",states:["B"]})},Km),yl=((Gm=Ds)&&(Qm.__proto__=Gm),((Qm.prototype=Object.create(Gm&&Gm.prototype)).constructor=Qm).prototype.initProperties=function(){Gm.prototype.initProperties.call(this),Mm(this,{name:"Code 128 C",states:["C"]})},Qm),h=((Um=Ds)&&(Zm.__proto__=Um),((Zm.prototype=Object.create(Um&&Um.prototype)).constructor=Zm).prototype.initProperties=function(){Um.prototype.initProperties.call(this),Mm(this,{name:"Code 128",states:["C","B","A","FNC4"]})},Zm),Ds=((Nm=Ds)&&(qm.__proto__=Nm),((qm.prototype=Object.create(Nm&&Nm.prototype)).constructor=qm).prototype.initProperties=function(){Nm.prototype.initProperties.call(this),Mm(this,{name:"Code GS1-128",states:["FNC1","C","B"]})},qm);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(){Xm.apply(this,arguments)}function Jm(t){Ym.call(this,t),this._initStates()}function tx(t,e,i){return t.substring(e,e+i)}var ex,ix,ox,rx,nx,sx,ax,lx=Object.assign,hx=((ax=im)&&(Sx.__proto__=ax),((Sx.prototype=Object.create(ax&&ax.prototype)).constructor=Sx).prototype.initProperties=function(){ax.prototype.initProperties.call(this),lx(this,{characterMap:["12121212","12121221","12122112","12122121","12211212","12211221","12212112","12212121","21121212","21121221"],START:"21",STOP:"121",checkSumType:"",checkSums:dx})},Sx.prototype.initValue=function(t,e){this.pattern=[],this.value=t,this.checkSumLength=0,this.width=e},Sx.prototype.setBaseUnit=function(){this.baseUnit=this.width/(12*(this.value.length+this.checkSumLength)+this.quietZoneLength+7)},Sx.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()},Sx.prototype.addCharacter=function(t){var e=this.characterMap[t];e||this.invalidCharacterError(t),this.addPattern(e)},Sx.prototype.addPattern=function(t){for(var e=0;e<t.length;e++)this.pattern.push(parseInt(t.charAt(e),10))},Sx.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]])},Sx),px=((sx=hx)&&(Ax.__proto__=sx),((Ax.prototype=Object.create(sx&&sx.prototype)).constructor=Ax).prototype.initProperties=function(){sx.prototype.initProperties.call(this),lx(this,{name:"MSI Modulo10",checkSumType:"Modulo10"})},Ax),cx=((nx=hx)&&(kx.__proto__=nx),((kx.prototype=Object.create(nx&&nx.prototype)).constructor=kx).prototype.initProperties=function(){nx.prototype.initProperties.call(this),lx(this,{name:"MSI Modulo11",checkSumType:"Modulo11"})},kx),ux=((rx=hx)&&(wx.__proto__=rx),((wx.prototype=Object.create(rx&&rx.prototype)).constructor=wx).prototype.initProperties=function(){rx.prototype.initProperties.call(this),lx(this,{name:"MSI Modulo10 Modulo10",checkSumType:"Modulo10Modulo10"})},wx),hx=((ox=hx)&&(bx.__proto__=ox),((bx.prototype=Object.create(ox&&ox.prototype)).constructor=bx).prototype.initProperties=function(){ox.prototype.initProperties.call(this),lx(this,{name:"MSI Modulo11 Modulo10",checkSumType:"Modulo11Modulo10"})},bx),dx={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))}},fx=Object.assign,gx=((ix=im)&&(_x.__proto__=ix),((_x.prototype=Object.create(ix&&ix.prototype)).constructor=_x).prototype.initProperties=function(){ix.prototype.initProperties.call(this),fx(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]}})},_x.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},_x.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)},_x.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)},_x.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])},_x.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},_x),yx=Object.assign,vx=((ex=gx)&&(xx.__proto__=ex),((xx.prototype=Object.create(ex&&ex.prototype)).constructor=xx).prototype.initProperties=function(){ex.prototype.initProperties.call(this),yx(this,{name:"EAN 8"})},xx.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)},xx),mx={code11:i,code39:Fs,code39extended:zs,code93:$,code93extended:l,code128:h,code128a:js,code128b:t,code128c:yl};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(){ax.apply(this,arguments)}function Cx(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}mx["gs1-128"]=Ds,mx.msimod10=px,mx.msimod11=cx,mx.msimod1010=ux,mx.msimod1110=hx,mx.postnet=tl,mx.ean8=vx,mx.ean13=gx;(Tx=M.Class)&&(Px.__proto__=Tx),((Px.prototype=Object.create(Tx&&Tx.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 B(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=Cx(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 B(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),!mx[this.type])throw new Error("Encoding '"+this.type+"' is not supported.");this.encoding=new mx[this.type],this.options=O({},this.options,t)};var Tx,i=Px;function Px(t,e,i){void 0===i&&(i=Re),Tx.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 Mx=i;var Ox={width:500,height:100};let Lx=function(t,e){if(void 0===e&&(e=Ox),!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"),mx[n])return i=new mx[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 Bx=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 Ex(t,e){t=Number(t).toString(2);return t=t.length<e?new Array(e-t.length+1).join(0)+t:t}function Rx(t){return parseInt(t,2)}(jx=M.Class)&&(Xx.__proto__=jx),((Xx.prototype=Object.create(jx&&jx.prototype)).constructor=Xx).prototype.move=function(){this.row+=this.dir*this.c,this.c^=1,this.column=this.startColumn-this.c},Xx.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}},Xx.prototype.getNextRemainderCell=function(){if(this.move(),void 0===this.matrix[this.row][this.column])return{row:this.row,column:this.column}};var Vx,jx,zx=Xx,Dx=((Vx=M.Class)&&(Wx.__proto__=Vx),(Wx.prototype=Object.create(Vx&&Vx.prototype)).constructor=Wx),Fx="alphanumeric",Hx=/^\d+/,Fs="A-Z0-9 $%*+./:-",Nx=new RegExp("^[A-Z $%*+./:-]+"),Ux=new RegExp("^["+Fs+"]+"),Gx=new RegExp("^[^"+Fs+"]+");function Wx(t,e){Vx.call(this),this.dataString=t,this.version=e}function Xx(t){jx.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 Yx(t,e,i,o,r){var n,s=Hx.exec(t),s=s?s[0]:"",a=Nx.exec(t),a=a?a[0]:"",l=Ux.exec(t),l=l?l[0]:"",e=s&&(s.length>=e||t.length===s.length||s.length>=i&&!Ux.test(t.charAt(s.length)))?(n="numeric",s):l&&(t.length===l.length||l.length>=o||r===Fx)?(n=Fx,s||a):(n="byte",l?l+Gx.exec(t.substring(l.length))[0]:Gx.exec(t)[0]);return{mode:n,modeString:e}}(Kx=M.Class)&&(i_.__proto__=Kx),((i_.prototype=Object.create(Kx&&Kx.prototype)).constructor=i_).prototype.initProperties=function(){Bx(this,{modeIndicator:"",bitsInCharacterCount:[]})},i_.prototype.getVersionIndex=function(t){return t<10?0:26<t?2:1},i_.prototype.getBitsCharacterCount=function(t){return this.bitsInCharacterCount[this.getVersionIndex(t||40)]},i_.prototype.getModeCountString=function(t,e){return this.modeIndicator+Ex(t,this.getBitsCharacterCount(e))},i_.prototype.encode=function(){},i_.prototype.getStringBitsLength=function(){},i_.prototype.getValue=function(){};var qx,Zx,Qx,Kx,zs=i_,$=((Qx=zs)&&(e_.__proto__=Qx),((e_.prototype=Object.create(Qx&&Qx.prototype)).constructor=e_).prototype.initProperties=function(){Qx.prototype.initProperties.call(this),Bx(this,{bitsInCharacterCount:[10,12,14],modeIndicator:"0001"})},e_.prototype.getValue=function(t){return parseInt(t,10)},e_.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+=Ex(i[r],10);return o+Ex(i[r],1+3*i[r].length)},e_.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)},e_),l=((Zx=zs)&&(t_.__proto__=Zx),((t_.prototype=Object.create(Zx&&Zx.prototype)).constructor=t_).prototype.initProperties=function(){Zx.prototype.initProperties.call(this),Bx(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"})},t_.prototype.getValue=function(t){return this.characters[t]},t_.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+=Ex(45*this.getValue(i[r].charAt(0))+this.getValue(i[r].charAt(1)),11);return o+Ex(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)},t_.prototype.getStringBitsLength=function(t,e){return 4+this.getBitsCharacterCount(e)+11*Math.floor(t/2)+t%2*6},t_),h=((qx=zs)&&(Jx.__proto__=qx),((Jx.prototype=Object.create(qx&&qx.prototype)).constructor=Jx).prototype.initProperties=function(){qx.prototype.initProperties.call(this),Bx(this,{bitsInCharacterCount:[8,16,16],modeIndicator:"0100"})},Jx.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+'".')},Jx.prototype.encode=function(t,e){for(var i=this.getModeCountString(t.length,e),o=0;o<t.length;o++)i+=Ex(this.getValue(t.charAt(o)),8);return i},Jx.prototype.getStringBitsLength=function(t,e){return 4+this.getBitsCharacterCount(e)+8*t},Jx),$x={};function Jx(){qx.apply(this,arguments)}function t_(){Zx.apply(this,arguments)}function e_(){Qx.apply(this,arguments)}function i_(){Kx.call(this),this.initProperties()}$x.numeric=new $,$x.alphanumeric=new l,$x.byte=new h;var o_=[{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 r_(t,e){for(var i=0,o=o_.length-1,r=Math.floor(o_.length/2);t<o_[r][e].totalDataCodewords?o=r:i=r,r=i+Math.floor((o-i)/2),1<o-i;);return t<=o_[i][e].totalDataCodewords?r+1:o+1}(s_=M.Class)&&(x_.__proto__=s_),((x_.prototype=Object.create(s_&&s_.prototype)).constructor=x_).prototype.getEncodingResult=function(n,t){var e=(()=>{var t,e=[],i=0,o=n;for(e.push(Yx(o,8,5,8,t)),t=e[0].mode,o=o.substr(e[0].modeString.length);0<o.length;){var r=Yx(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=r_((t=>{for(var e=0,i=0;i<t.length;i++)e+=$x[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+=$x[t[o].mode].encode(t[o].modeString,e);return i})(e,t);return new Dx(e,t)};var n_,s_,a_=x_,l_=((n_=M.Class)&&(m_.__proto__=n_),((m_.prototype=Object.create(n_&&n_.prototype)).constructor=m_).prototype.initProperties=function(){Bx(this,{encodingMode:"byte",utfBOM:"111011111011101110111111",initialModeCountStringLength:20,ranges:[128,2048,65536,2097152,67108864]})},m_.prototype.getEncodingResult=function(t,e){t=this.encode(t),e=r_(this.getDataCodewordsCount(t),e),t=this.mode.getModeCountString(t.length/8,e)+t;return new Dx(t,e)},m_.prototype.getDataCodewordsCount=function(t){t=t.length;return Math.ceil((this.initialModeCountStringLength+t)/8)},m_.prototype.encode=function(t){for(var e=this.utfBOM,i=0;i<t.length;i++)e+=this.encodeCharacter(t.charCodeAt(i));return e},m_.prototype.encodeCharacter=function(t){var e=this.getBytesCount(t),i=e-1,o="";if(1===e)o=Ex(t,8);else{for(var e=8-e,r=0;r<i;r++)o=Ex(t>>6*r&63|128,8)+o;o=(t>>6*i|255>>e<<e).toString(2)+o}return o},m_.prototype.getBytesCount=function(t){for(var e=this.ranges,i=0;i<e.length;i++)if(t<e[i])return i+1},m_),h_={1:0},p_={0:1},c_={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},u_=[1,0,1,1,1],d_=[1,0,1],f_={L:"01",M:"00",Q:"11",H:"10"},g_=["11101100","00010001"],y_=[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}],v_=[[1,0],[1,25,0]];function m_(){n_.call(this),this.initProperties(),this.mode=$x[this.encodingMode]}function x_(){s_.apply(this,arguments)}function __(t,e,i,o){for(var r=0;r<t.length;r++)t[r][i][o]=e}function b_(t,e,i,o){for(var r=0;r<y_.length;r++)t[r][i][o]=y_[r](i,o)?1^e:parseInt(e,10)}function w_(t,e){for(var i,o=v_[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]=p_[(t[o]+e)%255],void 0!==t[--o];);return i})(n,h_[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]=Ex(r[l],8);return a}function k_(t,e,i){var o=Rx(e),e=e.length-1,r=t<<e;return Ex(t,i-e)+Ex(((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 A_(t,e){return parseInt(t.charAt(e),10)}function S_(t,e){for(var i=t[0],o=0,r=e.length,n=0,s=8;n<=8;n++)6!==n&&__(t,A_(e,r-1-o++),n,s);for(n=8,s=7;0<=s;s--)6!==s&&__(t,A_(e,r-1-o++),n,s);for(o=0,s=i.length-1,n=8;s>=i.length-8;s--)__(t,A_(e,r-1-o++),n,s);for(__(t,1,i.length-8,8),n=i.length-7,s=8;n<i.length;n++)__(t,A_(e,r-1-o++),n,s)}function C_(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,__(t,r=A_(e,e.length-l-1),0+i,s+o),__(t,r,a+o,0+i)}function T_(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++)__(t,r=e[a],i+l,o+a),__(t,r,i+a,o+l),__(t,r,i+s-l,o+s-a),__(t,r,i+s-a,o+s-l)}function P_(t,e,i,o){for(var r=i,n=o,s=t[0];__(t,0,r,o),__(t,0,i,n),r+=e[0],n+=e[1],0<=r&&r<s.length;);}function M_(t,e,i,o,r){e[t][o]=(e[t][o]<<1^r)%128,93===e[t][o]&&(i[t]+=40)}function O_(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 L_(t,e,i){var r=(new(i&&0<=i.toLowerCase().indexOf("utf_8")?l_:a_)).getEncodingResult(t,e),n=r.version,s=o_[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]=Rx(i),o+=8;r.push(c),n.push(w_(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+=g_[i],i^=1;return o})(),s),t=(()=>{for(var t=[],e=17+4*n,i=0;i<y_.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,T_(a,u_,0,0),P_(a,[-1,-1],7,7),T_(a,u_,c-7,0),P_(a,[1,-1],c-8,7),T_(a,u_,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=c_[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]]&&T_(o,d_,u[f]-2,u[g]-2)}for(var y=t,v=1,m=y[0].length,x=8;x<m-8;x++)__(y,v,6,x),__(y,v,x,6),v^=1;7<=n&&C_(t,Ex(0,18)),S_(t,Ex(0,15));for(var _,b,w,k=t,A=i,S=new zx(k[0]),C=0;C<A.length;C++)for(_=A[C],b=0;0<_.length;){for(var T=0;T<_.length;T++)for(var P=0;P<8;P++)w=S.getNextCell(),b_(k,_[T][b].charAt(P),w.row,w.column);for(b++;_[0]&&b===_[0].length;)_.splice(0,1)}for(;w=S.getNextRemainderCell();)b_(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),M_(c,n,i,0,e[h][p]),M_(c,n,i,1,e[p][h]),O_(c,i,o,e[h][p],s,0),O_(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&&C_([a],k_(n,"1111100100101",18)),S_([a],(t=>{var e="";if(0===Rx(t))return"101010000010010";for(var i=k_(Rx(t),"10100110111",15),o=0;o<i.length;o++)e+=i.charAt(o)^"101010000010010".charAt(o);return e})(f_[e]+Ex(c,3))),a}for(var B_,I_=1;I_<255;I_++)255<(B_=2*p_[I_-1])&&(B_^=285),p_[I_]=B_,h_[B_]=I_;B_=2*p_[I_-1]^285,p_[I_]=B_,p_[-1]=0;for(var E_=2;E_<=68;E_++){var R_=v_[E_-1];v_[E_]=((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:h_[p_[i[o+r]]^p_[(t[o]+e[r])%255]];return i})(R_,[E_,0])}var V_,j_=Math.round,z_=[[0,1],[1,1],[1,2],[2,2],[2,1],[3,1],[3,0],[2,0],[2,-1],[1,-1],[1,0]],D_=[[0,1],[1,1],[1,0]],js=((V_=M.Class)&&(F_.__proto__=V_),((F_.prototype=Object.create(V_&&V_.prototype)).constructor=F_).prototype.destroy=function(){this._destroySurface()},F_.prototype._initElement=function(){vt(this.element,"k-qrcode")},F_.prototype._initSurface=function(){var t=this.options,e=this.surface;e&&e.options.type===t.renderAs||(this._destroySurface(),this._initSurfaceElement(),this.surface=this._createSurface())},F_.prototype._createSurface=function(){return M.drawing.Surface.create(this.surfaceElement,{type:this.options.renderAs})},F_.prototype._destroySurface=function(){this.surface&&(this.surface.destroy(),this.surface=null,this._destroySurfaceElement())},F_.prototype._initSurfaceElement=function(){this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.surfaceElement.style.position="relative",this.element.appendChild(this.surfaceElement))},F_.prototype._destroySurfaceElement=function(){this.surfaceElement&&this.surfaceElement.parentNode&&(this.surfaceElement.parentNode.removeChild(this.surfaceElement),this.surfaceElement=null)},F_.prototype.redraw=function(){var t=this._getSize();this.surface.clear(),this.surface.setSize({width:t,height:t}),this.createVisual(),this.surface.draw(this.visual)},F_.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},F_.prototype._resize=function(){this.redraw()},F_.prototype.createVisual=function(){this.visual=this._render()},F_.prototype.exportVisual=function(){return this._render()},F_.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=L_(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},F_.prototype._renderLogo=function(t,e){var t=j_(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)},F_.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),D_,"#fff")),n.x=n.y=t-i/2,s.append(this._renderShape(n,i,D_,this.options.color)),n.x=t+r-i/2,n.y=t+r+o-i/2,s.append(this._renderShape(n,o,z_,"#fff")),s},F_.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},F_.prototype._getSize=function(){var t;return this.options.size?parseInt(this.options.size,10):(t=Cx(this.element,this.options.renderAs),0<(t=Math.min(t.width,t.height))?t:200)},F_.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},F_.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=j_(i+a*e),l=j_(n),h=j_(i+s*e),p=j_(n+e);o.moveTo(a,l).lineTo(a,p).lineTo(h,p).lineTo(h,l).close()}}return o},F_.prototype._renderBackground=function(t,e){t=new B(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}})},F_.prototype.setOptions=function(t){this.options=Bx(this.options,t||{}),void 0!==t.value&&(this._value=String(this.options.value)),this._initSurface(),this.redraw()},F_.prototype.value=function(t){if(void 0===t)return this._value;this._value=String(t),this.redraw()},F_.prototype._hasCustomLogo=function(){return Boolean(this.options.overlay.imageUrl)},F_.prototype._isSwiss=function(){return"swiss"===this.options.overlay.type},F_.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}},F_);function F_(t,e,i){void 0===i&&(i=Re),V_.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 H_=js,N_=function(e){return void 0===e&&(e="ISO_8859_1"),function(t){try{L_(t,"L",e)}catch(t){return{valid:!1,error:t}}return{valid:!0}}};var U_={WGS84:{a:6378137,b:6356752.314245179,f:.0033528106647474805,e:.08181919084262149}};function G_(t){return t*t}var W_,X_,Y_=Math,q_=Y_.abs,Z_=Y_.atan,Q_=Y_.atan2,K_=Y_.cos,$_=Y_.sin,J_=Y_.tan,tb=((X_=M.Class)&&(fb.__proto__=X_),((fb.prototype=Object.create(X_&&X_.prototype)).constructor=fb).prototype.initProperties=function(){O(this,{DISTANCE_ITERATIONS:100,DISTANCE_CONVERGENCE:1e-12,DISTANCE_PRECISION:2,FORMAT:"{0:N6}{1:N6}"})},fb.prototype.toArray=function(){return[this.lat,this.lng]},fb.prototype.equals=function(t){return t&&t.lat===this.lat&&t.lng===this.lng},fb.prototype.clone=function(){return new fb(this.lat,this.lng)},fb.prototype.round=function(t){return this.lng=L(this.lng,t),this.lat=L(this.lat,t),this},fb.prototype.wrap=function(){return this.lng=this.lng%180,this.lat=this.lat%90,this},fb.prototype.distanceTo=function(t,e){return this.greatCircleTo(t,e).distance},fb.prototype.destination=function(t,e,i){var e=ce(e),i=i||U_.WGS84,o=ce(this.lat),r=ce(this.lng),t=t/i.a,i=Y_.asin($_(o)*K_(t)+K_(o)*$_(t)*K_(e)),r=r+Q_($_(e)*$_(t)*K_(o),K_(t)-$_(o)*$_(i));return new fb(oe(i),oe(r))},fb.prototype.greatCircleTo=function(t,e){var i=fb.create(void 0),e=e||U_.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=Z_((1-a)*J_(ce(this.lat))),h=$_(e),p=K_(e),e=Z_((1-a)*J_(ce(i.lat))),c=$_(e),u=K_(e),d=l,f=this.DISTANCE_ITERATIONS,g=!1;!g&&0<f--;)var y=$_(d),v=K_(d),m=Y_.sqrt(G_(u*y)+G_(p*c-h*u*v)),x=Q_(m,r=h*c+p*u*v),_=p*u*y/m,b=0,w=(0!=(o=1-G_(_))&&(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*G_(b)-1))),g=q_(d-w)<=this.DISTANCE_CONVERGENCE;var i=o*(G_(n)-G_(s))/G_(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*G_(b)-1)-n/6*b*(4*G_(m)-3)*(4*G_(b)-3))),n=Q_(u*y,p*c-h*u*v),A=Q_(p*y,-h*u+p*c*v);return{distance:L(s*e*(x-i),this.DISTANCE_PRECISION),azimuthFrom:oe(n),azimuthTo:oe(A)}},fb.prototype.toString=function(){return String(this.lat)+","+String(this.lng)},fb.fromLngLat=function(t){return new fb(t[1],t[0])},fb.fromLatLng=function(t){return new fb(t[0],t[1])},fb.create=function(t,e){if(k(t))return t instanceof fb?t.clone():1===arguments.length&&2===t.length?fb.fromLatLng(t):new fb(t,e)},fb),eb=Math,ib=eb.atan,ob=eb.exp,rb=eb.pow,nb=eb.sin,sb=eb.log,ab=eb.tan,lb=M.geometry.Point,hb=eb.PI,pb=hb/2,cb=hb/4,ub=hb/180,t=U_.WGS84,yl=((W_=M.Class)&&(db.__proto__=W_),((db.prototype=Object.create(W_&&W_.prototype)).constructor=db).prototype._initOptions=function(t){this.options=O({},this.options,t)},db.prototype.initProperties=function(){O(this,{MAX_LNG:180,MAX_LAT:85.0840590501,INVERSE_ITERATIONS:15,INVERSE_CONVERGENCE:1e-12})},db.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 lb(t,e)},db.prototype._projectLat=function(t){var e=this.options.datum,i=e.e,e=e.a,t=ce(t),o=ab(cb+t/2),t=i*nb(t),t=rb((1-t)/(1+t),i/2);return e*sb(o*t)},db.prototype.inverse=function(t,e){var i=this.options,o=i.datum.a,o=t.x/(ub*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 tb(i,o)},db.prototype._inverseY=function(t){for(var e=this.options.datum,i=e.a,o=e.e,r=o/2,n=ob(-t/i),s=pb-2*ib(n),a=0;a<=this.INVERSE_ITERATIONS;a++){var l=o*nb(s),l=rb((1-l)/(1+l),r),l=pb-2*ib(n*l)-s;if(s+=l,eb.abs(l)<=this.INVERSE_CONVERGENCE)break}return oe(s)},db);function db(t){W_.call(this),this.initProperties(),this._initOptions(t)}function fb(t,e){X_.call(this),this.initProperties(),1===arguments.length?(this.lat=t[0],this.lng=t[1]):(this.lat=t,this.lng=e)}e(yl,{centralMeridian:0,datum:t});function gb(t,e){return t.bind(e)}function yb(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function vb(t,e){e.insertBefore(t,e.firstChild)}function mb(t){return t.replace(/([a-z][A-Z])/g,function(t){return t.charAt(0)+"-"+t.charAt(1).toLowerCase()})}function xb(t){return t&&String(t).endsWith("px")?t:String(t)+"px"}function _b(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 bb(t){var e=[];if(t)for(var i=mb(t).split("-"),o=0;o<i.length;o++)e.push("k-pos-"+i[o]);return e.join(" ")}(Ab=yl)&&(Lb.__proto__=Ab),((Lb.prototype=Object.create(Ab&&Ab.prototype)).constructor=Lb).prototype.initProperties=function(){Ab.prototype.initProperties.call(this),O(this,{MAX_LAT:85.0511287798})},Lb.prototype._projectLat=function(t){var e=this.options.datum.a,t=ce(t),t=ab(cb+t/2);return e*sb(t)},Lb.prototype._inverseY=function(t){var e=this.options.datum.a,t=ob(-t/e);return oe(pb-2*ib(t))};var wb,kb,Ab,Sb=Lb,Cb=((kb=M.Class)&&(Ob.__proto__=kb),((Ob.prototype=Object.create(kb&&kb.prototype)).constructor=Ob).prototype.toPoint=function(t,e,i){return this._proj.forward(t,i).transform(this._tm).scale(e||1)},Ob.prototype.toLocation=function(t,e,i){t=t.clone().scale(1/(e||1)).transform(this._itm);return this._proj.inverse(t,i)},Ob),Tb=(Object.assign,function(t){var e=document.createElement("div");return e.innerHTML=t,e.firstChild}),Pb=((wb=ii)&&(Mb.__proto__=wb),((Mb.prototype=Object.create(wb&&wb.prototype)).constructor=Mb).prototype._initOptions=function(t){this.options=O({},this.options,t)},Mb.prototype.filter=function(t,e){this._extent=t,this._zoom=e,this._render()},Mb.prototype.add=function(t){var e=t;k(t)&&(this.items.push(e="string"==typeof t?{text:t}:e),this._render())},Mb.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()},Mb.prototype.clear=function(){this.items=[],yb(this.element)},Mb.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){yb(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()},Mb.prototype.hideElement=function(){this.element.style.display="none"},Mb.prototype.showElement=function(){this.element.style.display=""},Mb.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},Mb.prototype._inZoomLevel=function(t,e){t=_(t,-Number.MAX_VALUE),e=_(e,Number.MAX_VALUE);return this._zoom>t&&this._zoom<e},Mb.prototype._inArea=function(t){var e=!0;return e=t?t.contains(this._extent):e},Mb);function Mb(t,e){wb.call(this),this.element=t,this._initOptions(e),this.items=[],vt(this.element,"k-widget k-attribution")}function Ob(){kb.call(this);var t=this._proj=new Sb,t=this.c=2*hb*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 Lb(){Ab.apply(this,arguments)}e(Pb,{name:"Attribution",separator:"&nbsp;|&nbsp;"});var Bb={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 '+Bb[t].className+'" aria-label="move '+t+'">'+we({icon:"caret-alt-"+t,iconClass:"k-button-icon",svgIcons:e.svgIcons,type:e.type})+"</button>";return Tb(t)}(Eb=ii)&&(Vb.__proto__=Eb),((Vb.prototype=Object.create(Eb&&Eb.prototype)).constructor=Vb).prototype.destroy=function(){this.dispose()},Vb.prototype.dispose=function(){Ye(this._keyroot,"keydown",this._keydownHandler)},Vb.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)},Vb.prototype._initOptions=function(t){this.options=O({},this.options,t)},Vb.prototype._pan=function(t,e){var i=this.options.panStep;this.trigger("pan",{x:t*i,y:e*i})},Vb.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()},Vb.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 Eb,Rb=Vb;function Vb(t,e){Eb.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",gb(this._click,this)),this.element.parentNode.closest("[data-role]"));this._keyroot=t||this.element,this._tabindex(this._keyroot),this._keydownHandler=gb(this._keydown,this),Xe(this._keyroot,"keydown",this._keydownHandler)}function jb(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 Tb(t)}e(Rb,{name:"Navigator",panStep:1}),_b(Rb,["pan"]);(zb=ii)&&(Fb.__proto__=zb),((Fb.prototype=Object.create(zb&&zb.prototype)).constructor=Fb).prototype.destroy=function(){this.element&&Ye(this.element,"click",this._clickHandler),this._keyroot&&Ye(this._keyroot,"keydown",this._keydownHandler)},Fb.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)},Fb.prototype._initOptions=function(t){this.options=O({},this.options,t)},Fb.prototype._change=function(t){var e=this.options.zoomStep;this.trigger("change",{delta:t*e})},Fb.prototype._click=function(t){var e=1;Ut(t.currentTarget,"k-zoom-out")&&(e=-1),this._change(e),t.preventDefault()},Fb.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 zb,Db=Fb;function Fb(t,e,i){zb.call(this),this.element=t,this._initOptions(e);t=jb("in","plus",i),e=jb("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(Db,{name:"ZoomControl",zoomStep:1}),_b(Db,["change"]);var Hb,Nb,Ds=Math,Ub=Ds.max,Gb=Ds.min,Wb=((Nb=M.Class)&&(Zb.__proto__=Nb),px={World:{configurable:!0}},((Zb.prototype=Object.create(Nb&&Nb.prototype)).constructor=Zb).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},Zb.prototype.center=function(){var t=this.nw,e=this.se,i=t.lng+(e.lng-t.lng)/2;return new tb(t.lat+(e.lat-t.lat)/2,i)},Zb.prototype.containsAny=function(t){for(var e=!1,i=0;i<t.length;i++)e=e||this.contains(t[i]);return e},Zb.prototype.include=function(t){var e=this.nw,i=this.se,o=_(t.lng,t[1]),t=_(t.lat,t[0]);e.lng=Gb(e.lng,o),e.lat=Ub(e.lat,t),i.lng=Ub(i.lng,o),i.lat=Gb(i.lat,t)},Zb.prototype.includeAll=function(t){for(var e=0;e<t.length;e++)this.include(t[e])},Zb.prototype.edges=function(){var t=this.nw,e=this.se;return{nw:this.nw,ne:new tb(t.lat,e.lng),se:this.se,sw:new tb(e.lat,t.lng)}},Zb.prototype.toArray=function(){var t=this.nw,e=this.se;return[t,new tb(t.lat,e.lng),e,new tb(e.lat,t.lng)]},Zb.prototype.overlaps=function(t){return this.containsAny(t.toArray())||t.containsAny(this.toArray())},Zb.create=function(t,e){return t instanceof Zb?t:t&&e?new Zb(t,e):t&&4===t.length&&!e?new Zb([t[0],t[1]],[t[2],t[3]]):void 0},px.World.get=function(){return new Zb([90,-180],[-90,180])},Object.defineProperties(Zb,px),Zb),Xb="centerChange",Yb=((Hb=M.Class)&&(qb.__proto__=Hb),cx={anchor:{configurable:!0}},((qb.prototype=Object.create(Hb&&Hb.prototype)).constructor=qb).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)},qb.prototype.hide=function(){this.widgetService&&this.widgetService.notify("hideTooltip"),this.visible=!1,this.location=null},cx.anchor.get=function(){return this._anchor},cx.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}},qb.prototype.destroy=function(){this.widgetService=null},Object.defineProperties(qb.prototype,cx),qb);function qb(t,e){Hb.call(this),this.widgetService=t,this.options=O({},this.options,e),this.offset={x:0,y:0}}function Zb(t,e){Nb.call(this);t=tb.create(t),e=tb.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(Yb,{border:{width:1},opacity:1});(Qb=M.Class)&&(Jb.__proto__=Qb),((Jb.prototype=Object.create(Qb&&Qb.prototype)).constructor=Jb).prototype.destroy=function(){this._deactivate()},Jb.prototype._initOptions=function(t){this.options=O({},this.options,t)},Jb.prototype.show=function(){this.reset(),this._activate(),this._applyExtent(!0)},Jb.prototype.hide=function(){this._deactivate(),this._setVisibility(!1)},Jb.prototype.reset=function(){this._beforeReset(),this._reset()},Jb.prototype._reset=function(){this._applyExtent()},Jb.prototype._beforeReset=function(){},Jb.prototype._resize=function(){},Jb.prototype._panEnd=function(){this._applyExtent()},Jb.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=Wb.create(t.extent),t=!t||t.overlaps(this.map.extent());this._setVisibility(i&&e&&t)},Jb.prototype._setVisibility=function(t){this.element.style.display=t?"":"none"},Jb.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)},Jb.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)},Jb.prototype._updateAttribution=function(){var t=this.map.attribution;t&&t.add(this.options.attribution)},Jb.prototype._readData=function(){return this.options.data||[]},Jb.prototype._hasData=function(){return this._data&&0<this._data.length},Jb.prototype._layerIndex=function(){return(this.map.layers||[]).indexOf(this)};var Qb,ux=Jb,Kb=Math,$b=M.geometry.Point;function Jb(t,e){Qb.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 t1(t){return Tt(t)?t:Vt.compile(t)}function e1(t){var e=t;return"string"!=typeof t&&(e+="px"),e}(i1=ux)&&(o1.__proto__=i1),((o1.prototype=Object.create(i1&&i1.prototype)).constructor=o1).prototype.destroy=function(){i1.prototype.destroy.call(this),this._view.destroy(),this._view=null},o1.prototype._beforeReset=function(){var t=this.map,t=t.locationToLayer(t.extent().nw).round();this._view.viewOrigin(t)},o1.prototype._reset=function(){i1.prototype._reset.call(this),this._updateView(),this._view.reset()},o1.prototype._viewType=function(){return s1},o1.prototype._activate=function(){i1.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))},o1.prototype._deactivate=function(){i1.prototype._deactivate.call(this),this._pan&&this.map.unbind("pan",this._pan)},o1.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())},o1.prototype._resize=function(){this._render()},o1.prototype._panEnd=function(t){i1.prototype._panEnd.call(this,t),this._render()},o1.prototype._render=function(){this._updateView(),this._view.render()};var i1,hx=o1;function o1(t,e){i1.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(hx,{tileSize:256,subdomains:["a","b","c"],urlTemplate:"",zIndex:1});(n1=M.Class)&&(h1.__proto__=n1),((h1.prototype=Object.create(n1&&n1.prototype)).constructor=h1).prototype._initOptions=function(t){this.options=O({},this.options,t)},h1.prototype.center=function(t){this._center=t},h1.prototype.extent=function(t){this._extent=t},h1.prototype.viewOrigin=function(t){this._viewOrigin=t},h1.prototype.zoom=function(t){this._zoom=t},h1.prototype.pointToTileIndex=function(t){return new $b(Kb.floor(t.x/this.options.tileSize),Kb.floor(t.y/this.options.tileSize))},h1.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:Kb.ceil((Kb.abs(e.x)+t.width)/this.options.tileSize),y:Kb.ceil((Kb.abs(e.y)+t.height)/this.options.tileSize)}},h1.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}},h1.prototype.indexToPoint=function(t){var e=t.x;return new $b(e*this.options.tileSize,t.y*this.options.tileSize)},h1.prototype.subdomainText=function(){var t=this.options.subdomains;return t[this.subdomainIndex++%t.length]},h1.prototype.destroy=function(){yb(this.element),this.pool.empty()},h1.prototype.reset=function(){this.pool.reset(),this.subdomainIndex=0,this.render()},h1.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()},h1.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},h1.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 $b(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}},h1.prototype.wrapIndex=function(t){var e=Kb.pow(2,this._zoom);return{x:this.wrapValue(t.x,e),y:x(t.y,0,e-1)}},h1.prototype.wrapValue=function(t,e){var i=Kb.abs(t)%e;return 0<=t?i:e-(0==i?e:i)};var r1,n1,s1=h1,a1=((r1=M.Class)&&(l1.__proto__=r1),((l1.prototype=Object.create(r1&&r1.prototype)).constructor=l1).prototype.destroy=function(){var t=this.element,e=t?t.parentNode:null;t&&(e&&e.removeChild(t),this.element=null)},l1.prototype._initOptions=function(t){this.options=O({},this.options,t)},l1.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},l1.prototype.show=function(){var t=this.element,e=(t.style.top=e1(this.options.offset.y),t.style.left=e1(this.options.offset.x),this.url());e&&t.setAttribute("src",e),t.style.visibility="visible",this.visible=!0},l1.prototype.hide=function(){this.element.style.visibility="hidden",this.visible=!1},l1.prototype.url=function(){return t1(this.options.urlTemplate)(this.urlOptions())},l1.prototype.errorUrl=function(){return t1(this.options.errorUrlTemplate)(this.urlOptions())},l1.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}},l1);function l1(t,e){r1.call(this),this.id=t,this.visible=!0,this._initOptions(e),this.createElement(),this.show()}function h1(t,e){n1.call(this),this.element=t,this._initOptions(e),this.pool=new c1}e(a1,{urlTemplate:"",errorUrlTemplate:""});(p1=M.Class)&&(u1.__proto__=p1),((u1.prototype=Object.create(p1&&p1.prototype)).constructor=u1).prototype.get=function(t,e){return this._items.length>=this.options.maxSize&&this._remove(t),this._create(e)},u1.prototype.empty=function(){for(var t=this._items,e=0;e<t.length;e++)t[e].destroy();this._items=[]},u1.prototype.reset=function(){for(var t=this._items,e=0;e<t.length;e++)t[e].hide()},u1.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 a1(o,t),this._items.push(e)),e},u1.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 p1,c1=u1;function u1(){p1.call(this),this._items=[]}e(c1,{maxSize:100});function d1(t,e,i){return"translate3d("+t+"px,"+e+"px,0) scale("+i+")"}var f1,g1,y1,v1,m1,x1,_1,b1=Object.assign,w1="change",k1=((_1=ii)&&(V1.__proto__=_1),((V1.prototype=Object.create(_1&&_1.prototype)).constructor=V1).prototype.captureNext=function(){this.capture=!0},V1.prototype.cancelCapture=function(){this.capture=!1},V1.prototype._press=function(t){this.trigger("press"),this.capture&&t.preventDefault()},V1.prototype._release=function(t){this.trigger("release"),this.capture&&(t.preventDefault(),this.cancelCapture())},V1),A1=((x1=ii)&&(R1.__proto__=x1),((R1.prototype=Object.create(x1&&x1.prototype)).constructor=R1).prototype.makeVirtual=function(){b1(this,{virtual:!0,forcedEnabled:!0,_virtualMin:0,_virtualMax:0})},R1.prototype.virtualSize=function(t,e){this._virtualMin===t&&this._virtualMax===e||(this._virtualMin=t,this._virtualMax=e,this.update())},R1.prototype.outOfBounds=function(t){return t>this.max||t<this.min},R1.prototype.forceEnabled=function(){this.forcedEnabled=!0},R1.prototype.getSize=function(){return this.container[this.measure]},R1.prototype.getTotal=function(){return this.element[this.scrollSize]},R1.prototype.rescale=function(t){this.scale=t},R1.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(w1,e)},R1),S1=((m1=ii)&&(E1.__proto__=m1),((E1.prototype=Object.create(m1&&m1.prototype)).constructor=E1).prototype.rescale=function(t){this.x.rescale(t),this.y.rescale(t),this.refresh()},E1.prototype.centerCoordinates=function(){return{x:Math.min(0,-this.x.centerOffset),y:Math.min(0,-this.y.centerOffset)}},E1.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(w1)},E1),C1=((v1=ii)&&(I1.__proto__=v1),((I1.prototype=Object.create(v1&&v1.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(w1,this))},I1),T1=((y1=M.Class)&&(B1.__proto__=y1),(B1.prototype=Object.create(y1&&y1.prototype)).constructor=B1),P1=((g1=ii)&&(L1.__proto__=g1),((L1.prototype=Object.create(g1&&g1.prototype)).constructor=L1).prototype.translateAxis=function(t,e){this[t]+=e,this.refresh()},L1.prototype.scaleTo=function(t){this.scale=t,this.refresh()},L1.prototype.scaleWith=function(t){this.scale*=t,this.refresh()},L1.prototype.translate=function(t){this.x+=t.x,this.y+=t.y,this.refresh()},L1.prototype.moveAxis=function(t,e){this[t]=e,this.refresh()},L1.prototype.moveTo=function(t){b1(this,t),this.refresh()},L1.prototype.refresh=function(){var t=this.x,e=this.y;this.round&&(t=Math.round(t),e=Math.round(e)),(t=d1(t,e,this.scale))!==this.coordinates&&(this.element.style.transform=t,this._saveCoordinates(t),this.trigger(w1))},L1.prototype._saveCoordinates=function(t){this.coordinates=t},L1),M1=M.drawing.Group,tl=((f1=ux)&&(O1.__proto__=f1),((O1.prototype=Object.create(f1&&f1.prototype)).constructor=O1).prototype.destroy=function(){f1.prototype.destroy.call(this),this.surface.destroy()},O1.prototype._reset=function(){f1.prototype._reset.call(this),this._translateSurface(),this._data=this._readData(),this._hasData()&&this._load(this._data)},O1.prototype._initRoot=function(){this._root=new M1,this.surface.draw(this._root)},O1.prototype._beforeReset=function(){this.surface.clear(),this._initRoot()},O1.prototype._resize=function(){this.surface.size(this.map.size())},O1.prototype._readData=function(){var t=f1.prototype._readData.call(this);return"FeatureCollection"===t.type?t.features:"GeometryCollection"===t.type?t.geometries:t},O1.prototype._load=function(t){this._data=t,this._clearMarkers(),this._loader||(this._loader=new D1(this.map,this.options.style,this));for(var e=new M1,i=0;i<t.length;i++){var o=this._loader.parse(t[i]);o&&e.append(o)}this._root.clear(),this._root.append(e)},O1.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})},O1.prototype.featureCreated=function(t){(t.layer=this).map.trigger("shapeFeatureCreated",t)},O1.prototype._createMarker=function(t){t=this.map.markers.bind({location:t.location},t.dataItem);return t&&this._markers.push(t),t},O1.prototype._clearMarkers=function(){for(var t=0;t<this._markers.length;t++)this.map.markers.remove(this._markers[t]);this._markers=[]},O1.prototype._pan=function(){this._panning||(this._panning=!0,this.surface.suspendTracking())},O1.prototype._panEnd=function(t){f1.prototype._panEnd.call(this,t),this._translateSurface(),this.surface.resumeTracking(),this._panning=!1},O1.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}))},O1.prototype._eventArgs=function(t){return{layer:this,layerIndex:this._layerIndex(),shape:t.element,shapeIndex:(this._data||[]).indexOf(t.element.dataItem),originalEvent:t.originalEvent}},O1.prototype._handler=function(e){var i=this;return function(t){t.element&&i.map.trigger(e,i._eventArgs(t))}},O1.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)))},O1.prototype._tooltipContext=function(t){return{type:"shape",layerIndex:this._layerIndex(),className:"k-map-shape-tooltip",dataItem:t.dataItem,location:t.location}},O1.prototype._tooltipAnchor=function(t){t=this.map.eventOffset(t.originalEvent);return{top:t.y,left:t.x}},O1.prototype._activate=function(){f1.prototype._activate.call(this),this._panHandler=gb(this._pan,this),this.map.bind("pan",this.panHandler)},O1.prototype._deactivate=function(){f1.prototype._deactivate.call(this),this.map.unbind("pan",this._panHandler)},O1);function O1(t,e){f1.call(this,t,e),this._pan=gb(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 L1(t){g1.call(this);var e=this,t=(e.element=t,e.element.style.transformOrigin="left top",e.x=0,e.y=0,e.scale=1,d1(e.x,e.y,e.scale));e.element.style.transform=t,e._saveCoordinates(t)}function B1(t){y1.call(this);var s,a,l,h=this;b1(h,{elastic:!0},t),t=h.elastic?.5:0,l=h.movable,h.x=s=new C1({axis:"x",dimension:h.dimensions.x,resistance:t,movable:l}),h.y=a=new C1({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){v1.call(this),b1(this,t)}function E1(t){m1.call(this);this.x=new A1(b1({horizontal:!0},t)),this.y=new A1(b1({horizontal:!1},t)),this.container=t.container,this.forcedMinScale=t.minScale,this.maxScale=t.maxScale||100,this.bind(w1,t)}function R1(t){x1.call(this);var e=this;e.forcedEnabled=!1,b1(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 V1(t,e){_1.call(this);var i=this,o=t[0]||t;i.capture=!1,o.addEventListener?(Fe.down.split(" ").forEach(function(t){o.addEventListener(t,gb(i._press,i),!0)}),Fe.up.split(" ").forEach(function(t){o.addEventListener(t,gb(i._release,i),!0)})):(Fe.down.split(" ").forEach(function(t){o.attachEvent(t,gb(i._press,i))}),Fe.up.split(" ").forEach(function(t){o.attachEvent(t,gb(i._release,i))})),i.bind(["press","release"],e||{})}e(tl,{autoBind:!0,zIndex:100});(z1=M.Class)&&(H1.__proto__=z1),((H1.prototype=Object.create(z1&&z1.prototype)).constructor=H1).prototype.parse=function(t){var e=new M1,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},H1.prototype._shapeCreated=function(t){var e=!1;return e=this.observer&&this.observer.shapeCreated?this.observer.shapeCreated(t):e},H1.prototype._featureCreated=function(t,e){this.observer&&this.observer.featureCreated&&this.observer.featureCreated({group:t,dataItem:e,properties:e.properties})},H1.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)}},H1.prototype._setLineFill=function(t){var e=t.segments;(e.length<4||!e[0].anchor().equals(he(e).anchor()))&&(t.options.fill=null)},H1.prototype._loadShape=function(t,e){return this._shapeCreated(e)||t.append(e),e},H1.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)},H1.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(tb.fromLngLat(t[i][o]));0===o?e.moveTo(r.x,r.y):e.lineTo(r.x,r.y)}return e},H1.prototype._loadPoint=function(t,e,i){var e=tb.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 j1,z1,D1=H1,vx=((j1=tl)&&(F1.__proto__=j1),((F1.prototype=Object.create(j1&&j1.prototype)).constructor=F1).prototype._readData=function(){return this.options.data||[]},F1.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=tb.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))}}},F1.prototype._scaleType=function(){var t=this.options.scale;return Tt(t)?t:G1[t]},F1.prototype._createSymbol=function(t){var e=this.options.symbol;return(e=Tt(e)?e:W1[e])(t)},F1.prototype._drawSymbol=function(t){this.map.trigger("shapeCreated",{layer:this,shape:t})||this.surface.draw(t)},F1.prototype._tooltipContext=function(t){return{type:"bubble",layerIndex:this._layerIndex(),className:"k-map-bubble-tooltip",dataItem:t.dataItem,location:t.location,value:t.value}},F1.prototype._tooltipAnchor=function(t){t=t.element.bbox().center();return{top:t.y,left:t.x}},F1);function F1(){j1.apply(this,arguments)}function H1(t,e,i){z1.call(this),this.observer=i,this.locator=t,this.style=e}e(vx,{locationField:"location",valueField:"value",minSize:0,maxSize:100,scale:"sqrt",symbol:"circle",zIndex:200}),(U1=M.Class)&&(J1.__proto__=U1),((J1.prototype=Object.create(U1&&U1.prototype)).constructor=J1).prototype.map=function(t){t=(Math.sqrt(t)-Math.sqrt(this._domain[0]))*this._ratio;return this._range[0]+t};var N1,U1,G1={sqrt:J1},W1={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}},X1="mouseenter",Y1="mouseleave",q1=Object.assign,Z1="k-marker",Q1="."+Z1,K1=((N1=ux)&&($1.__proto__=N1),(($1.prototype=Object.create(N1&&N1.prototype)).constructor=$1).prototype.destroy=function(){N1.prototype.destroy.call(this),Ye(this.element,"click",this._markerClickHandler),this.clear()},$1.prototype.add=function(t){if(!yt(t))return this._addOne(t);for(var e=0;e<t.length;e++)this._addOne(t[e])},$1.prototype.remove=function(t){t.destroy();t=(this.items||[]).indexOf(t);-1<t&&this.items.splice(t,1)},$1.prototype.clear=function(){for(var t=0;t<this.items.length;t++)this.items[t].destroy();this.items=[]},$1.prototype.update=function(t){var e=t.location();e&&(t.showAt(this.map.locationToView(e)),this.map.trigger("markerActivate",{marker:t,layer:this}))},$1.prototype._reset=function(){N1.prototype._reset.call(this);for(var t=this.items,e=0;e<t.length;e++)this.update(t[e])},$1.prototype.bind=function(t,e){t=e0.create(t,this.options);if(t.dataItem=e,!this.map.trigger("markerCreated",{marker:t,layer:this}))return this.add(t),t},$1.prototype._addOne=function(t){t=e0.create(t,this.options);return t.addTo(this),t},$1.prototype._readData=function(){return this.options.data||[]},$1.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)}},$1.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)},$1.prototype._markerMouseEnter=function(t){t=this._createMarkerEventArgs(t);this.map.trigger("markerMouseEnter",t)},$1.prototype._markerMouseLeave=function(t){t=this._createMarkerEventArgs(t);this.map.trigger("markerMouseLeave",t)},$1.prototype._createMarkerEventArgs=function(t){var e=t.marker;return q1({},{layer:this,layerIndex:this._layerIndex(),marker:e,markerIndex:(this.items||[]).indexOf(e)},t)},$1);function $1(t,e){N1.call(this,t,e),this._markerClickHandler=gb(this._markerClick,this),Xe(this.element,"click",Q1,this._markerClickHandler),this.items=[],this._load(this._readData())}function J1(t,e){U1.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(K1,{zIndex:1e3,autoBind:!0,locationField:"location",titleField:"title",template:""});(t0=M.Class)&&(o0.__proto__=t0),((o0.prototype=Object.create(t0&&t0.prototype)).constructor=o0).prototype.destroy=function(){this.layer=null,this.unbindEvents(),this.hide()},o0.prototype.addTo=function(t){this.layer=t.markers||t,this.layer.items.push(this),this.layer.update(this)},o0.prototype.location=function(t){return t?(this.options.location=tb.create(t).toArray(),this.layer&&this.layer.update(this),this):tb.create(this.options.location)},o0.prototype.showAt=function(t){this.render(),this._anchor={left:Math.round(t.x),top:Math.round(t.y)},this.element.style.left=xb(this._anchor.left),this.element.style.top=xb(this._anchor.top)},o0.prototype.hide=function(){this.element&&(this.element.remove(),this.element=null)},o0.prototype.bindEvents=function(){this.element&&(this._mouseEnterHandler=gb(this._mouseEnter,this),Xe(this.element,X1,Q1,this._mouseEnterHandler),this._mouseLeaveHandler=gb(this._mouseLeave,this),Xe(this.element,Y1,Q1,this._mouseLeaveHandler))},o0.prototype.unbindEvents=function(){this.element&&(Ye(this.element,X1,this._mouseEnterHandler),Ye(this.element,Y1,this._mouseLeaveHandler))},o0.prototype.render=function(){var t,e,i,o,r;this.element||(t=this.options,e=this.layer,vt(i=document.createElement("span"),Z1),this.options.template?(o=this._compileTemplate(this.options.template)(this.dataItem),o=Tb(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-"+mb(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())},o0.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())},o0.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()}},o0.prototype._mouseLeave=function(t){t=this._createEventArgs(t);this.layer._markerMouseLeave(t)},o0.prototype._createEventArgs=function(t){return{marker:this,originalEvent:t}},o0.prototype._compileTemplate=function(t){return Vt.compile(t,{paramName:"dataItem",useWithBlock:!1})},o0.create=function(t,e){return t instanceof o0?t:new o0(O({},e,t))};var t0,e0=o0,i0=Object.assign;function o0(t){t0.call(this),this.options=t||{}}function r0(t){window.requestAnimationFrame(t)}(c0=M.Class)&&(T0.__proto__=c0),((T0.prototype=Object.create(c0&&c0.prototype)).constructor=T0).prototype.tick=function(){},T0.prototype.done=function(){},T0.prototype.onEnd=function(){},T0.prototype.onCancel=function(){},T0.prototype.start=function(){this.enabled()&&(this.done()?this.onEnd():(this._started=!0,r0(this._tickProxy)))},T0.prototype.enabled=function(){return!0},T0.prototype.cancel=function(){this._started=!1,this.onCancel()},T0.prototype._tick=function(){this._started&&(this.tick(),this.done()?(this._started=!1,this.onEnd()):r0(this._tickProxy))};var n0,s0,a0,l0,h0,p0,c0,gx=T0,u0=((p0=gx)&&(C0.__proto__=p0),((C0.prototype=Object.create(p0&&p0.prototype)).constructor=C0).prototype.done=function(){return this.timePassed()>=this.duration},C0.prototype.timePassed=function(){return Math.min(this.duration,Qe()-this.startDate)},C0.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()},C0.prototype._easeProxy=function(t){var e=this;return function(){e.movable.moveAxis(e.axis,t(e.timePassed(),e.initial,e.delta,e.duration))}},C0.easeOutExpo=function(t,e,i,o){return t===o?e+i:i*(1-Math.pow(2,-10*t/o))+e},C0),d0=Object.assign,f0=Math.abs,g0="change",y0=((h0=gx)&&(S0.__proto__=h0),((S0.prototype=Object.create(h0&&h0.prototype)).constructor=S0).prototype.enabled=function(){return this.movable.scale<this.dimensions.minScale},S0.prototype.done=function(){return this.dimensions.minScale-this.movable.scale<.01},S0.prototype.tick=function(){var t=this.movable;t.scaleWith(1.1),this.dimensions.rescale(t.scale)},S0.prototype.onEnd=function(){var t=this.movable;t.scaleTo(this.dimensions.minScale),this.dimensions.rescale(t.scale)},S0),v0=((l0=gx)&&(A0.__proto__=l0),((A0.prototype=Object.create(l0&&l0.prototype)).constructor=A0).prototype.onCancel=function(){this.transition.cancel()},A0.prototype.freeze=function(t){this.cancel(),this._moveTo(t)},A0.prototype.onEnd=function(){this.paneAxis.outOfBounds()?this._snapBack():this._end()},A0.prototype.done=function(){return f0(this.velocity)<1},A0.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),l0.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(),l0.prototype.start.call(this)))},A0.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)},A0.prototype._end=function(){this.tapCapture.cancelCapture(),this.end()},A0.prototype._snapBack=function(){var t=this.dimension,t=this.movable[this.axis]>t.max?t.max:t.min;this._moveTo(t)},A0.prototype._moveTo=function(t){this.transition.moveTo({location:t,duration:500,ease:u0.easeOutExpo})},A0),m0=((a0=gx)&&(k0.__proto__=a0),((k0.prototype=Object.create(a0&&a0.prototype)).constructor=k0).prototype.tick=function(){this._updateCoordinates(),this.moveTo(this.origin)},k0.prototype.done=function(){return f0(this.offset.y)<5&&f0(this.offset.x)<5},k0.prototype.onEnd=function(){this.moveTo(this.destination),this.callback&&this.callback.call()},k0.prototype.setCoordinates=function(t,e){this.offset={},this.origin=t,this.destination=e},k0.prototype.setCallback=function(t){t&&Tt(t)&&(this.callback=t)},k0.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}},k0),x0=((s0=M.Class)&&(w0.__proto__=s0),((w0.prototype=Object.create(s0&&s0.prototype)).constructor=w0).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)},w0.prototype.show=function(){this.element.style.opacity=.7,this.element.style.visibility="visible"},w0.prototype.hide=function(){this.alwaysVisible||(this.element.style.opacity=0)},w0),_0=((n0=ii)&&(b0.__proto__=n0),((b0.prototype=Object.create(n0&&n0.prototype)).constructor=b0).prototype._initOptions=function(t){this.options=O({},this.options,t)},b0.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())},b0.prototype.makeVirtual=function(){this.dimensions.y.makeVirtual()},b0.prototype.virtualSize=function(t,e){this.dimensions.y.virtualSize(t,e)},b0.prototype.height=function(){return this.dimensions.y.size},b0.prototype.scrollHeight=function(){return this.scrollElement.scrollHeight},b0.prototype.scrollWidth=function(){return this.scrollElement.scrollWidth},b0.prototype._resize=function(){this._native||this.contentResized()},b0.prototype.setOptions=function(t){this._initOptions(t),t.pullToRefresh&&this._initPullToRefresh()},b0.prototype.reset=function(){this._native?this.scrollElement.scrollTop(0):(this.movable.moveTo({x:0,y:0}),this._scale(1))},b0.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)},b0.prototype.zoomOut=function(){var t=this.dimensions;t.refresh(),this._scale(t.fitScale),this.movable.moveTo(t.centerCoordinates())},b0.prototype.enable=function(){this.enabled=!0},b0.prototype.disable=function(){this.enabled=!1},b0.prototype.scrollTo=function(t,e){this._native?(this.scrollElement.scrollLeft(f0(t)),this.scrollElement.scrollTop(f0(e))):(this.dimensions.refresh(),this.movable.moveTo({x:t,y:e}))},b0.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())},b0.prototype.pullHandled=function(){},b0.prototype.destroy=function(){Ye(this.element,"wheel",this._wheelScrollHandler),this.userEvents&&this.userEvents.destroy()},b0.prototype._scale=function(t){this.dimensions.rescale(t),this.movable.scaleTo(t)},b0.prototype._initPullToRefresh=function(){},b0.prototype._dragEnd=function(){},b0.prototype._paneChange=function(){},b0.prototype._initAxis=function(t){var e=this,i=e.movable,o=e.dimensions[t],r=e.tapCapture,n=e.pane[t],s=new x0({axis:t,movable:i,dimension:o,container:e.element,alwaysVisible:e.options.visibleScrollHints});o.bind(g0,function(){s.refresh()}),n.bind(g0,function(){s.show()}),e[t+"inertia"]=new v0({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})}})},b0);function b0(t,e){n0.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=Tb('<div class="km-scroll-header"/>');if(r._native)vt(t,"km-native-scroller"),vb(e,t),d0(r,{scrollElement:t,fixedContainer:t.children[0]});else{t.style.overflow="hidden",vt(t,"km-scroll-wrapper");var i=t,o=Tb('<div class="km-scroll-container"/>');for(i.appendChild(o);i.firstChild!==o;)o.appendChild(i.firstChild);vb(e,t);var e=t.children[1],n=new k1(t),s=new P1(e),a=new S1({element:e,container:t,forcedEnabled:r.options.zoom}),l=this.options.avoidScrolling,h=new Bi(t,{touchAction:"none",allowSelection:!0,preventDragEvent:!0,captureUpIfMoved:!0,multiTouch:r.options.zoom,supportDoubleTap:r.options.supportDoubleTap,start:function(t){a.refresh();var e=f0(t.x.velocity),i=f0(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 T1({movable:s,dimensions:a,userEvents:h,elastic:r.options.elastic}),c=new y0({movable:s,dimensions:a,userEvents:h,tapCapture:n}),u=new m0({moveTo:function(t){r.scrollTo(t.x,t.y)}});s.bind(g0,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)),d0(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 w0(t){s0.call(this);var e="x"===t.axis,i=Tb('<div class="km-touch-scrollbar km-'+(e?"horizontal":"vertical")+'-scrollbar" />');d0(this,t,{element:i,elementSize:0,movable:new P1(i),scrollMovable:t.movable,alwaysVisible:t.alwaysVisible,size:e?"width":"height"}),this.scrollMovable.bind(g0,this.refresh.bind(this)),this.container.appendChild(i),t.alwaysVisible&&this.show()}function k0(t){a0.call(this,t),d0(this,t,{origin:{},destination:{},offset:{}})}function A0(t){l0.call(this);var e=this;d0(e,t,{transition:new u0({axis:t.axis,movable:t.movable,onEnd:function(){e._end()}})}),e.tapCapture.bind("press",function(){e.cancel()}),e.userEvents.bind("end",gb(e.start,e)),e.userEvents.bind("gestureend",gb(e.start,e)),e.userEvents.bind("tap",gb(e.onEnd,e))}function S0(t){h0.call(this,t);d0(this,t),this.userEvents.bind("gestureend",this.start.bind(this)),this.tapCapture.bind("press",this.cancel.bind(this))}function C0(t){p0.call(this),i0(this,t)}function T0(){c0.call(this);this._tickProxy=gb(this._tick,this),this._started=!1}e(_0,{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"}}),_b(_0,["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 M0=P0;var O0,L0=Math,B0=L0.min,I0=L0.pow,E0=M.geometry.Point,R0="marker",V0="location",j0={bubble:vx,shape:tl,tile:hx},i=(j0[R0]=K1,(O0=ii)&&(I.__proto__=O0),((I.prototype=Object.create(O0&&O0.prototype)).constructor=I).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),O0.prototype.destroy.call(this)},I.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 Cb,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)},I.prototype._initOptions=function(t){this.options=O({},this.options,t)},I.prototype._initElement=function(t){vt(this.element=t,"k-map"),t.style.position="relative",t.setAttribute("data-role","map"),yb(t);t=Tb("<div />");this.element.appendChild(t)},I.prototype.initServices=function(t){void 0===t&&(t={}),this.widgetService=new M0(this,t)},I.prototype.initObserver=function(t){void 0===t&&(t={}),this.observers=[],this.addObserver(t.observer)},I.prototype.addObserver=function(t){t&&this.observers.push(t)},I.prototype.removeObserver=function(t){t=this.observers.indexOf(t);0<=t&&this.observers.splice(t,1)},I.prototype.requiresHandlers=function(t){for(var e=this.observers,i=0;i<e.length;i++)if(e[i].requiresHandlers(t))return!0},I.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||O0.prototype.trigger.call(this,t,e),o},I.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},I.prototype.zoom=function(t){var e=this.options,t=k(t)?(t=L0.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},I.prototype.center=function(t){var e=t?(t=tb.create(t),e=tb.create(this.options.center),t.equals(e)||(this.options.center=t.toArray(),this.widgetService.notify(Xb,{center:this.options.center}),this._reset()),this):tb.create(this.options.center);return e},I.prototype.extent=function(t){t=t?(this._setExtent(t),this):this._getExtent();return t},I.prototype.setOptions=function(t){void 0===t&&(t={});var e=this.element;this.destroy(),yb(e),this._init(e,t,{},this.context),this._reset()},I.prototype.locationToLayer=function(t,e){var i=!this.options.wraparound,t=tb.create(t);return this.crs.toPoint(t,this._layerSize(e),i)},I.prototype.layerToLocation=function(t,e){var i=!this.options.wraparound,t=E0.create(t);return this.crs.toLocation(t,this._layerSize(e),i)},I.prototype.locationToView=function(t){var t=tb.create(t),e=this.locationToLayer(this._viewOrigin);return this.locationToLayer(t).translateWith(e.scale(-1))},I.prototype.viewToLocation=function(t,e){var i=this.locationToLayer(this._getOrigin(),e),t=E0.create(t).clone().translateWith(i);return this.layerToLocation(t,e)},I.prototype.eventOffset=function(t){var e,i=re(this.element);return t=t.x&&t.x[V0]||t.y&&t.y[V0]?(e=t.x[V0]-i.left,t.y[V0]-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)},I.prototype.eventToView=function(t){t=this.eventOffset(t);return this.locationToView(this.viewToLocation(t))},I.prototype.eventToLayer=function(t){return this.locationToLayer(this.eventToLocation(t))},I.prototype.eventToLocation=function(t){t=this.eventOffset(t);return this.viewToLocation(t)},I.prototype.viewSize=function(){var t=this.element,e=this._layerSize(),i=t.clientWidth;return{width:i=this.options.wraparound?i:B0(e,i),height:B0(e,t.clientHeight)}},I.prototype.exportVisual=function(){return this._reset(),!1},I.prototype.hideTooltip=function(){this._tooltip&&this._tooltip.hide()},I.prototype._setOrigin=function(t,e){var i=this.viewSize(),t=this._origin=tb.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(Xb,{center:this.options.center}),this},I.prototype._getOrigin=function(t){var e=this.viewSize();return!t&&this._origin||((t=this.locationToLayer(this.center())).x-=e.width/2,t.y-=e.height/2,this._origin=this.layerToLocation(t)),this._origin},I.prototype._setExtent=function(t){var e=Wb.create(t),i=e.se.clone(),o=(this.options.wraparound&&i.lng<0&&0<t.nw.lng&&(i.lng=180+(180+i.lng)),new Wb(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=L0.abs(l.x-a.x),l=L0.abs(l.y-a.y);if(h<=r&&l<=n)break}this.zoom(s)},I.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 Wb(t,i)},I.prototype._zoomAround=function(t,e){this._setOrigin(this.layerToLocation(t,e),e),this.zoom(e)},I.prototype._initControls=function(){var t=this.options.controls;t.attribution&&this._createAttribution(t.attribution),this.support.mobileOS||(t.navigator&&this._createNavigator(t.navigator),t.zoom&&this._createZoomControl(t.zoom))},I.prototype._createControlElement=function(t,e){var i,t=t.position||e,e="."+bb(t).replace(" ","."),e=this.element.querySelector(".k-map-controls"+e)||[],t=(0===e.length&&(vt(i=document.createElement("div"),"k-map-controls "+bb(t)),this.element.appendChild(e=i)),document.createElement("div"));return e.appendChild(t),t},I.prototype._createAttribution=function(t){var e=this._createControlElement(t,"bottomRight");this.attribution=new Pb(e,t)},I.prototype._createNavigator=function(t){var e=this._createControlElement(t,"topLeft"),e=this.navigator=new Rb(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)},I.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",gb(this._scrollEnd,this)),this.scroller.scrollTo(-i,-e)},I.prototype._navigatorCenter=function(){this.center(this.options.center)},I.prototype._createZoomControl=function(t){var e=this._createControlElement(t,"topLeft"),e=this.zoomControl=new Db(e,t,this.options.icons);this._zoomControlChange=this._zoomControlChange.bind(this),e.bind("change",this._zoomControlChange)},I.prototype._zoomControlChange=function(t){this.trigger("zoomStart",{originalEvent:t})||(this.zoom(this.zoom()+t.delta),this.trigger("zoomEnd",{originalEvent:t}))},I.prototype._initScroller=function(){var t=this.support.mobileOS?.93:.9,e=!1!==this.options.zoomable,t=this.scroller=new _0(this.element.children[0],{friction:t,velocityMultiplier:5,zoom:e,mousewheelScrolling:!1,supportDoubleTap:!0});t.bind("scroll",gb(this._scroll,this)),t.bind("scrollEnd",gb(this._scrollEnd,this)),t.userEvents.bind("gesturestart",gb(this._scaleStart,this)),t.userEvents.bind("gestureend",gb(this._scale,this)),t.userEvents.bind("doubleTap",gb(this._doubleTap,this)),t.userEvents.bind("tap",gb(this._tap,this)),this.scrollElement=t.scrollElement},I.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)}},I.prototype._createLayer=function(t){var e=t.type||"shape",i=this.options.layerDefaults[e],i=e===R0?O({},this.options.markerDefaults,t,{icons:this.options.icons}):O({},i,t),t=new j0[e](this,i);return e===R0&&(this.markers=t),t},I.prototype._createTooltip=function(){return new Yb(this.widgetService,this.options.tooltip)},I.prototype._initMarkers=function(){0<(this.options.layers||[]).filter(function(t){return t&&t.type===R0}).length||(this.markers=new K1(this,O({},this.options.markerDefaults,{icons:this.options.icons})),this.markers.add(this.options.markers))},I.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()})},I.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()}))},I.prototype._panComplete=function(){return 50<Qe()-(this._panEndTimestamp||0)},I.prototype._scaleStart=function(t){this.trigger("zoomStart",{originalEvent:t})&&(t=t.touches[1])&&t.cancel()},I.prototype._scale=function(t){var e=this.scroller.movable.scale,e=this._scaleToZoom(e),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})},I.prototype._scaleToZoom=function(t){t=this._layerSize()*t/this.options.minSize,t=L0.log(t)/L0.log(2);return L0.round(t)},I.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")},I.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}},I.prototype._renderLayers=function(){},I.prototype._layerSize=function(t){t=_(t,this.options.zoom);return this.options.minSize*I0(2,t)},I.prototype._tap=function(t){var e;this._panComplete()&&(e=this.eventOffset(t),this.hideTooltip(),this.trigger("click",{originalEvent:t,location:this.viewToLocation(e)}))},I.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}))},I.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}))},I.prototype._toDocumentCoordinates=function(t){var e=re(this.element);return{left:L(t.x+e.left),top:L(t.y+e.top)}},I);function I(t,e,i,o){void 0===e&&(e={}),void 0===i&&(i={}),void 0===o&&(o={}),O0.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}),_b(i,["beforeReset","click","markerActivate","markerClick","markerCreated","markerMouseEnter","markerMouseLeave","pan","panEnd","reset","shapeClick","shapeCreated","shapeFeatureCreated","shapeMouseEnter","shapeMouseLeave","zoomEnd","zoomStart"]);let z0=i;function D0(t,e){return t.map(e).reduce(function(t,e){return t+e},0)}function F0(t,e){return U0(t.source,e.source)}function H0(t,e){return U0(t.target,e.target)}function N0(t){return t.value}var U0=function(t,e){return t.y0===e.y0?t.index-e.index:t.y0+t.y1-e.y0-e.y1};function G0(t){t.forEach(function(t){t.targetLinks.forEach(function(t){t.source.sourceLinks.sort(H0)}),t.sourceLinks.forEach(function(t){t.target.targetLinks.sort(F0)})})}function W0(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 X0(t){return new W0(t).calculate()}W0.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})},W0.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)})},W0.prototype.calculateNodeValues=function(t){t.forEach(function(t){t.value=Math.max(D0(t.sourceLinks,N0),D0(t.targetLinks,N0))})},W0.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}},W0.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},W0.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},W0.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)/D0(t,N0)}));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(G0)},W0.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})},W0.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})})},W0.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,G0([i])}),r.sort(U0),this.arrangeNodesVertically(r)}},W0.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,G0([i])})(o);s.sort(U0),this.arrangeNodesVertically(s)}},W0.prototype.arrangeNodesVertically=function(t){var e=t.length-1;this.arrangeUp(t,this.height,e),this.arrangeDown(t,this.offsetY,0)},W0.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}},W0.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}},W0.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},W0.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 Y0(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 q0(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 Z0(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}(J0=M.Class)&&(hw.__proto__=J0),((hw.prototype=Object.create(J0&&J0.prototype)).constructor=hw).prototype.createVisual=function(){this.visual=this.createElement()},hw.prototype.exportVisual=function(){return this.visual},hw.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()},hw.prototype.getSender=function(){return this};var Q0,K0,$0,J0,Fs=hw,tw=(($0=Fs)&&(lw.__proto__=$0),((lw.prototype=Object.create($0&&$0.prototype)).constructor=lw).prototype.getElement=function(){return M.drawing.Path.fromRect(this.getRect(),this.visualOptions())},lw.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])},lw.prototype.getLabelText=function(t){var e=t.labels.ariaTemplate;if(e)return e({node:t.node})},lw.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}},lw.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},lw.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)},lw.prototype.blur=function(){this._highlight&&(this._highlight.options.set("visible",!1),this.visual.options.set("id",""),this.options.root())&&this.options.root().removeAttribute(X)},lw),ew=((K0=Fs)&&(aw.__proto__=K0),((aw.prototype=Object.create(K0&&K0.prototype)).constructor=aw).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])},aw.prototype.getLabelText=function(t){var e=t.labels.ariaTemplate;if(e)return e({link:t.link})},aw.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}},aw.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,Z0(u,u,s,s,.5)],g=[Z0(p,d,d,c,.4999),Z0(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,Z0(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]))},aw.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)},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),iw="inside",ow="before",rw="after",nw=((Q0=Fs)&&(sw.__proto__=Q0),((sw.prototype=Object.create(Q0&&Q0.prototype)).constructor=sw).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!==iw&&(l=l===ow?rw:ow),e.visible&&n?(e=new B(i.x0,i.y0,i.x1,i.y1),t=this.visualOptions(),a&&!t.align&&(t.align="right"),(n=new So(n,t)).reflow(new B),t=n.box,e=e.center().y-t.height()/2,r=i.x1+t.width()>r,o=i.x0-t.width()<o,r=l===ow||l===iw&&r?ow:rw,a=[(r=a?l===rw||l===iw&&o?rw:ow:r)===ow?i.x0-t.width():i.x1,e],(l=new B(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},sw.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}},sw);function sw(){Q0.apply(this,arguments)}function aw(){K0.apply(this,arguments)}function lw(){$0.apply(this,arguments)}function hw(t){J0.call(this),this.options=O({},this.options,t),this.createVisual()}e(nw,{position:iw});function pw(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})}(cw=Fs)&&(dw.__proto__=cw),((dw.prototype=Object.create(cw&&cw.prototype)).constructor=dw).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},dw.prototype.createElement=function(){return this.getElement()};var cw,uw=dw;function dw(){cw.apply(this,arguments)}e(uw,{align:b,border:{width:0},margin:w(5),padding:w(5)});function fw(t,e){return t.node.x0-e.node.x0!=0?t.node.x0-e.node.x0:t.node.y0-e.node.y0}function gw(t,e){return t.node.x1-e.node.x1!=0?t.node.x1-e.node.x1:e.node.y0-t.node.y0}(yw=Fs)&&(mw.__proto__=yw),((mw.prototype=Object.create(yw&&yw.prototype)).constructor=mw).prototype.getElement=function(){var i,t,e=this.options,o=e.drawingRect,r=e.rtl,n=e.nodes,s=(void 0===n&&(n=[]),e.item),a=e.position;return!1!==e.visible&&n.length?((t=e.labels||{}).content&&(i=jt(t)),(t=n.map(function(t){var e=t.label&&t.label.text||"";return{text:i?i({text:e,node:t}):e,area:{background:void 0!==s.areaBackground?s.areaBackground:t.color,opacity:void 0!==s.areaOpacity?s.areaOpacity:t.opacity},node:t}})).sort(r?gw:fw),n=r&&a!==C&&a!==T,(a=new Ou(Object.assign({},e,{data:t,reverse:n}),{rtl:r})).reflow(o),a.renderVisual(),a.visual):null},mw.prototype.createElement=function(){return this.getElement()};var yw,vw=mw;function mw(){yw.apply(this,arguments)}e(vw,{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 xw,_w="link",bw="node",ww=((xw=ii)&&(E.__proto__=xw),((E.prototype=Object.create(xw&&xw.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 xw.prototype.trigger.call(this,t,e)},E.prototype._mouseenter=function(t){var e=t.element,i=e.type===_w,o=e.type===bw,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===_w,r=i.type===bw,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!==_w&&l!==bw||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===bw&&(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===_w,r=this._focusState||{};e.type===bw?(!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 uw(Object.assign({},{drawingRect:e},t)).exportVisual().chartElement.box:null},E.prototype.legendBox=function(t,e,i){return t&&!1!==t.visible?new vw(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 B(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===P?(p.unpad({top:u}),new B(0,u,o.width,o.height)):(p.shrink(0,u),new B(0,0,o.width,o.height-u))),this.legendBox(i,r.nodes,c)),u=i&&i.position||vw.prototype.options.position,r=(e&&(u===C&&p.unpad({left:e.width()}),u===T&&p.shrink(e.width(),0),u===P&&p.unpad({top:e.height()}),u===S)&&p.shrink(0,e.height()),X0(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 B,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=q0(t,n,a,e),e=new tw(i),i=(d.wrap(mo(e.exportVisual().rawBBox())),new nw(pw(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:X0(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 _=X0(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=Y0((p=r).x0,p.y0,p.x1,p.y1,s.x1,s.y1),l=Y0(p.x0,p.y0,p.x1,p.y1,s.x0,s.y0),h=Y0(p.x0,p.y0,s.x0,s.y0,s.x1,s.y1),p=Y0(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})(X0(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:X0(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 uw(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=q0(t,a,f,e),o=(i.root=function(){return u.element},i.navigatable=!0!==v,new tw(i)),r=o.exportVisual();r.links=[],r.type=bw,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 ew(n)),a=s.exportVisual();a.type=_w,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=pw(t,s,y,i,n),t=new nw(t).exportVisual();t&&C.append(t)}),b&&(x=new vw(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){xw.call(this),this._initTheme(i),this._setOptions(e),this._initElement(t),this._initSurface(),e&&e.data&&(this._redraw(),this._initResizeObserver(),this._initNavigation(t))}e(ww,{title:{position:P},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 kw=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}),Aw="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"}}],Sw=$[0].value,Cw="scatter",Tw=["column","bar","line",Cw],Pw={type:"line",width:0};function Mw(t){return t&&Tw.includes(t)}var l=["string","date","number"],h=["number"],Ow={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 Lw(t,e){return((e||"")+" "+(t||"")).trim()}function Bw(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=Bw(i).size,t?Lw(t,i||e):""}function Ew(t,e,i){return i=Bw(i).name,t?Lw(i||e,t):""}function Rw(o,r,t){var n,e,i,s,a=Hw(),l=(a.seriesType=r,a.data=o||[],a.legend={visible:!0,position:"bottom"},Ow[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):Dw(o,i)),t=l.filter(function(t){return"value"===t.axisType}),(i=Fw(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===Cw?Pw:{}))}),l=-1<e?o.map(function(t){return String(jw(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 Vw(t,e,i){var o,r,n,s,a,l=Hw(),h=(l.seriesType=e,l.data=t||[],Ow[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):Dw(t,n)),n=h.filter(function(t){return"value"===t.axisType}),s=[],(s=i&&i.valueAxis?[o.indexOf(i.valueAxis)]:Fw(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 jw=function(t){return null!=t},zw=function(r){var t=structuredClone(r[0]);return t.forEach(function(t,e){if(!jw(t.value))for(var i=0;i<r.length;i++){var o=r[i][e].value;if(jw(o)){t.value=o;break}}}),t},Dw=function(i,t){var o=[],e=zw(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)},Fw=function(t,e){var o=[],r=zw(t);return e.forEach(function(t){t.types.forEach(function(i){r.forEach(function(t,e){typeof t.value===i&&o.push(e)})})}),o},Hw=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 Nw(t,e){return(Mw(e)?Rw:Vw)(t,e)}function Uw(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})&&Mw(i.seriesType)&&Mw(t.seriesType)&&i.series.forEach(function(t){t.labels=t.labels||{},t.labels.visible=!0}),i}function Gw(t,e,i){var o=Object.assign({},t);switch(e){case R.seriesType:return Nw(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&&Mw(o.seriesType)?Uw(o,Rw(o.data,o.seriesType,{categoryAxis:i})):"pie"===o.seriesType?Uw(o,Vw(o.data,o.seriesType,{categoryAxis:i})):o;case R.valueAxisY:return"pie"===o.seriesType?Uw(o,Vw(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:Ew(i,Sw,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:Ew(i,Sw,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,Aw,r.labels&&r.labels.font)})}),o;case R.legendFontSize:r=o.legend||{};return o.legend=Object.assign({},r,{labels:Object.assign({},r.labels,{font:Ew(i,Sw,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:Ew(i,Sw,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,Aw,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:Ew(i,Sw,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=jw(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:Ew(i,Sw,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,Aw,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:Ew(i,Sw,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=jw(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 Ww(t,e){return parseFloat(bk(t).getPropertyValue(e))}function Xw(t){for(var e=bk(t),i=[],o=1,r=e.getPropertyValue(""+_k+o);r||o<=30;)i.push(r),r=e.getPropertyValue(""+_k+ ++o);return i}function Yw(t){return Ak(t,"--kendo-chart-pane-title-font-weight","--kendo-chart-pane-title-font-size","--kendo-font-family")}function qw(t){return{color:Ck(t),font:Ak(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"}),Zw=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=Nw(t,i&&i.seriesType||e);return void 0!==(i&&i.stack)?Gw(t,R.stacked,i.stack):t},createState:Nw,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:Mw,mergeStates:Uw,parseFont:Bw,updateState:Gw,messages:js}),Qw=1.5,Kw=.4,$w="#000",t="Arial, Helvetica, sans-serif",Jw="11px "+t,tk="12px "+t,ek="16px "+t,ik="transparent",ok="#fff",rk={type:ys},nk={type:rs},sk=Object.assign({},nk,{markers:{visible:!1},highlight:{visible:!1}}),ak=function(){return{icon:{border:{width:1}},label:{font:tk,padding:3},line:{length:10,width:2},legendItem:sk,visible:!0}},lk=function(){return{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},legendItem:nk,opacity:.4}},hk=function(){return{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},legendItem:nk,opacity:.4}},pk=function(){return{outliersField:"",meanField:"",border:{_brightness:.8,width:1},downColor:ok,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:sk}},ck=function(){return{gap:Qw,spacing:Kw,target:{color:"#ff0000"},legendItem:sk}},uk=function(){return{width:2,legendItem:rk}},dk=function(){return{line:{opacity:1,width:0},markers:{size:6,visible:!1},legendItem:nk,opacity:.5}},fk=function(){return{markers:{visible:!1},legendItem:rk,width:2}},gk=function(){return{gap:.5,line:{color:$w,width:1},legendItem:sk,spacing:Kw}},yk=function(){return{labels:{background:"",color:"",padding:{top:5,bottom:5,left:7,right:7}},legendItem:sk}},vk=yk,mk=function(t){return Object.assign({color:ot,trendline:{},markers:{visible:!1},width:1,dashType:"longDash",legendItem:rk},t)},xk=function(t){return void 0===t&&(t={}),{axisDefaults:{labels:{font:tk},notes:ak(),title:{font:ek,margin:5}},categoryAxis:{majorGridLines:{visible:!0}},navigator:{pane:{height:90,margin:{top:10}}},seriesDefaults:{visible:!0,labels:{font:Jw},overlay:t.gradients?{}:{gradient:"none"},area:lk(),rangeArea:hk(),verticalRangeArea:hk(),bar:{gap:Qw,spacing:Kw,legendItem:sk},boxPlot:pk(),bubble:{border:{width:0},labels:{background:ik},legendItem:sk,opacity:.6},bullet:ck(),candlestick:{border:{_brightness:.8,width:1},downColor:ok,gap:1,highlight:{border:{opacity:1,width:2},line:{width:2}},line:{color:$w,width:1},legendItem:sk,spacing:.3},column:{gap:Qw,spacing:Kw,legendItem:sk},heatmap:{labels:{color:"",background:ik,visible:!0},highlight:{border:{width:0}},legendItem:sk},pie:{labels:{background:"",color:"",padding:{top:5,bottom:5,left:7,right:7}},legendItem:sk},donut:{margin:1,legendItem:sk},funnel:yk(),pyramid:vk(),horizontalWaterfall:gk(),line:uk(),notes:ak(),ohlc:{gap:1,highlight:{line:{opacity:1,width:3}},line:{width:1},legendItem:sk,spacing:.3},radarArea:dk(),radarLine:fk(),radarColumn:{legendItem:sk},polarArea:dk(),polarLine:fk(),polarScatter:{legendItem:rk},rangeBar:{gap:Qw,spacing:Kw,legendItem:sk},rangeColumn:{gap:Qw,spacing:Kw,legendItem:sk},scatter:{legendItem:rk},scatterLine:{width:1,legendItem:rk},verticalArea:lk(),verticalBoxPlot:pk(),verticalBullet:ck(),verticalLine:uk(),waterfall:gk(),linearTrendline:mk(),exponentialTrendline:mk({style:"smooth"}),logarithmicTrendline:mk({style:"smooth"}),polynomialTrendline:mk({style:"smooth"}),powerTrendline:mk({style:"smooth"}),movingAverageTrendline:mk()},title:{font:ek},subtitle:{font:tk},legend:{labels:{font:tk}}}},_k="--kendo-chart-series-",bk=function(t){return t.ownerDocument.defaultView.getComputedStyle(t)},wk={},kk=function(t,e){var i,o,r,e=bk(t).getPropertyValue(e);return/^color-mix/i.test(e)&&(t=t,e=wk[i=e]||(o=t.style.color,t.style.color=i,r=bk(t).color,t.style.color=o,wk[i]=r)),e},Ak=function(t,e,i,o){t=bk(t);return[t.getPropertyValue(e),t.getPropertyValue(i),t.getPropertyValue(o)||t.fontFamily].join(" ")},Sk=function(t){return Ak(t,"--kendo-font-weight","--kendo-chart-font-size","--kendo-font-family")},Ck=function(t){return kk(t,"--kendo-chart-text")},Tk=function(t){var e=Ck(t);return{labels:{color:e,font:Sk(t)},title:{color:e}}},Pk=function(t){var e=Ck(t);return{pointer:{color:kk(t,"--kendo-chart-gauge-pointer")},scale:{labels:{color:e},rangePlaceholderColor:kk(t,"--kendo-chart-gauge-track"),minorTicks:{color:e},majorTicks:{color:e},line:{color:e}}}},Mk=function(t){return{labels:{color:Ck(t),font:Sk(t),stroke:{color:kk(t,"--kendo-chart-bg")}},links:{color:kk(t,"--kendo-color-subtle")},nodeColors:Xw(t),title:qw(t),legend:Tk(t)}},Ok=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:Ww(t,"--kendo-chart-area-inactive-opacity")}}}function r(){return{highlight:{inactiveOpacity:Ww(t,"--kendo-chart-line-inactive-opacity")}}}function n(){return{target:{color:h}}}var s,a,l=kk(t,"--kendo-chart-major-lines"),h=kk(t,"--kendo-chart-text"),p=Ak(t,"--kendo-font-weight","--kendo-chart-label-font-size","--kendo-font-family"),c=kk(t,"--kendo-chart-bg"),u={icon:{background:kk(u=t,"--kendo-chart-notes-bg"),border:{color:kk(u,"--kendo-chart-notes-border")}},line:{color:kk(u,"--kendo-chart-notes-lines")},label:{font:Sk(u)}},d=Ww(t,"--kendo-chart-area-opacity"),f=kk(t,"--kendo-color-surface"),g=kk(t,"--kendo-chart-primary-bg");return{axisDefaults:{crosshair:{color:kk(t,"--kendo-chart-crosshair-bg")},labels:{color:h,font:p},line:{color:l},majorGridLines:{color:l},minorGridLines:{color:kk(t,"--kendo-chart-minor-lines")},notes:structuredClone(u),title:{color:h,font:Sk(t)}},chartArea:{background:c},legend:(a=kk(s=t,"--kendo-chart-inactive"),Object.assign({},{inactiveItems:{labels:{color:a},markers:{color:a}}},Tk(s))),seriesColors:Xw(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:kk(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:Yw(t)},title:qw(t),paneDefaults:{title:{font:Yw(t)}}}};return D})())}}});
1
+ System.register("@progress/kendo-charts",["@progress/kendo-drawing"],function(t,e){var iw={};return{setters:[function(t){iw.Color=t.Color,iw.drawing=t.drawing,iw.geometry=t.geometry,iw.logToConsole=t.logToConsole,iw.parseColor=t.parseColor,iw.support=t.support,iw.throttle=t.throttle}],execute:function(){t((()=>{var V={593:t=>{t.exports=iw}},z={};function j(t){var e=z[t];return void 0!==e||(e=z[t]={exports:{}},V[t](e,e.exports,j)),e.exports}j.d=(t,e)=>{for(var i in e)j.o(e,i)&&!j.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},j.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var D={},F=((j.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})})(D),j.d(D,{Aggregates:()=>bn,ArcGauge:()=>pv,ArcScale:()=>ev,AreaChart:()=>yl,AreaSegment:()=>sl,ArrowLinearPointer:()=>dy,Axis:()=>Do,AxisGroupRangeTracker:()=>vl,AxisLabel:()=>bo,Bar:()=>Al,BarChart:()=>Zl,BarLabel:()=>bl,BarLinearPointer:()=>_y,Barcode:()=>jm,Box:()=>B,BoxElement:()=>Hi,BoxPlot:()=>rh,BoxPlotChart:()=>ph,BubbleChart:()=>wh,Bullet:()=>Ph,BulletChart:()=>Bh,Candlestick:()=>$l,CandlestickChart:()=>eh,CategoricalChart:()=>ka,CategoricalErrorBar:()=>Ks,CategoricalPlotArea:()=>dc,CategoryAxis:()=>mr,Chart:()=>og,ChartAxis:()=>dn,ChartContainer:()=>Gh,ChartElement:()=>o,ChartPane:()=>yn,ChartPlotArea:()=>vn,ChartService:()=>Bo,ChartWizardCommon:()=>b0,CircularGauge:()=>fv,ClipAnimation:()=>Ja,ClusterLayout:()=>Ul,Crosshair:()=>Hh,CrosshairTooltip:()=>jh,CurveProcessor:()=>un,DateCategoryAxis:()=>Cr,DateValueAxis:()=>jr,DefaultAggregates:()=>hp,DomEventsBuilder:()=>Ro,DonutChart:()=>ad,DonutPlotArea:()=>pd,DonutSegment:()=>rd,ErrorBarBase:()=>qs,ErrorRangeCalculator:()=>Tn,Extent:()=>jb,FloatElement:()=>to,FontLoader:()=>de,FormatService:()=>Oo,Gauge:()=>Xg,Gradients:()=>Yi,HashMap:()=>Wt,Highlight:()=>gc,InstanceObserver:()=>Zt,IntlService:()=>Co,Legend:()=>$c,LegendItem:()=>Yc,LegendLayout:()=>Bc,LineChart:()=>ol,LinePoint:()=>Pa,LineSegment:()=>La,LinearGauge:()=>Sy,LinearPointer:()=>ry,LinearScale:()=>ty,Location:()=>I,LogarithmicAxis:()=>Wr,Map:()=>p_,Matrix:()=>De,MousewheelZoom:()=>Mc,Navigator:()=>Tg,NavigatorHint:()=>bg,Note:()=>ko,NumericAxis:()=>Rr,OHLCChart:()=>Yp,OHLCPoint:()=>Gp,Observable:()=>ii,Pane:()=>qh,Pannable:()=>Tc,PieAnimation:()=>ku,PieChart:()=>$u,PieChartMixin:()=>qu,PiePlotArea:()=>ed,PieSegment:()=>Xu,PlotAreaBase:()=>rp,PlotAreaEventsMixin:()=>sp,PlotAreaFactory:()=>Jc,Point:()=>A,PointEventsMixin:()=>Sa,PolarAxis:()=>$r,QRCode:()=>Fx,RadarCategoryAxis:()=>Zr,RadarLogarithmicAxis:()=>hn,RadarNumericAxis:()=>nn,RadialGauge:()=>$y,RadialPointer:()=>Uy,RadialScale:()=>Ey,RangeAreaChart:()=>Hp,RangeAreaPoint:()=>Mp,RangeBar:()=>up,RangeBarChart:()=>gp,RangePointer:()=>av,Ring:()=>Oi,RootElement:()=>Ki,Sankey:()=>Y_,ScatterChart:()=>yh,ScatterErrorBar:()=>dh,ScatterLineChart:()=>Mu,Sector:()=>Ri,Selection:()=>su,SeriesAggregator:()=>lp,SeriesBinder:()=>kn,ShapeBuilder:()=>Vi,ShapeElement:()=>Wi,SharedTooltip:()=>uu,Sparkline:()=>fg,SplineAreaSegment:()=>ul,SplineSegment:()=>Ha,StackWrap:()=>Xl,StockChart:()=>Og,TemplateService:()=>Vt,Text:()=>ro,TextBox:()=>uo,Title:()=>vo,Tooltip:()=>hu,UserEvents:()=>wi,WaterfallChart:()=>nc,WaterfallSegment:()=>Qp,XYPlotArea:()=>Ru,ZoomSelection:()=>Pc,addClass:()=>vt,alignPathToPixel:()=>bt,anyHasZIndex:()=>$s,append:()=>ee,appendIfNotNull:()=>Js,applyEventMap:()=>Ne,areNumbers:()=>ta,autoMajorUnit:()=>ki,autoTextColor:()=>Me,barcodeValidator:()=>Fm,bindEvents:()=>ie,bindSegments:()=>ia,categoriesCount:()=>oa,chartBaseTheme:()=>G0,chartTheme:()=>ew,clockwise:()=>_t,constants:()=>F,convertableToNumber:()=>kt,countNumbers:()=>mn,createHashSet:()=>Ee,createOutOfRangePoints:()=>va,createPatternFill:()=>ji,createSankeyData:()=>q_,cycleDown:()=>St,cycleIndex:()=>Ct,cycleUp:()=>At,deepExtend:()=>O,defaultErrorHandler:()=>Re,defined:()=>k,deg:()=>oe,elementOffset:()=>re,elementScale:()=>Pe,elementSize:()=>ne,elementStyles:()=>It,equalsIgnoreCase:()=>ra,evalOptions:()=>sa,eventCoordinates:()=>se,eventElement:()=>ae,eventMap:()=>Fe,filterSeriesByType:()=>aa,find:()=>Ae,findAxisByName:()=>fn,gaugeTheme:()=>J0,getAriaTemplate:()=>jt,getField:()=>_n,getSpacing:()=>w,getSupportedFeatures:()=>Ze,getTemplate:()=>zt,getter:()=>Ht,grep:()=>Nt,hasClasses:()=>Ut,hasGradientOverlay:()=>pa,hasOwnProperty:()=>ze,hasValue:()=>ca,hashKey:()=>le,inArray:()=>u,interpolateValue:()=>Xt,isArray:()=>yt,isDateAxis:()=>ua,isFunction:()=>Tt,isNumber:()=>m,isObject:()=>Ot,isPlainObject:()=>Qt,isString:()=>wt,keys:()=>Ve,last:()=>he,limitValue:()=>x,logToConsole:()=>M.logToConsole,map:()=>Kt,mousewheelDelta:()=>Jt,noop:()=>Qe,now:()=>Ke,objectKey:()=>pe,off:()=>qe,on:()=>Ye,parseDateCategory:()=>ha,qrcodeValidator:()=>Hx,rad:()=>ce,rectToBox:()=>no,removeClass:()=>xt,renderIcon:()=>we,round:()=>L,sankeyTheme:()=>tw,segmentVisible:()=>ea,setDefaultOptions:()=>e,singleItemOrArray:()=>da,sparseArrayLimits:()=>ke,styleValue:()=>Lt,unbindEvents:()=>ue,unclipBox:()=>ma,valueOrDefault:()=>b}),{}),H=(j.r(F),j.d(F,{DEFAULT_PANE:()=>Sg,NAVIGATOR_AXIS:()=>Ag,NAVIGATOR_PANE:()=>kg}),"arc"),N="ArrowUp",U="ArrowDown",G="ArrowLeft",W="ArrowRight",X="aria-activedescendant",Y="#000",S="bottom",_="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",T="right",ht="roundedRect",pt="start",ct="string",P="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=j(593);function bt(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 _t(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 Tt(t){return"function"==typeof t}var Pt="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]))===Pt&&null!==r?r.constructor:null)&&s!==Array?r instanceof Date?e[o]=new Date(r.getTime()):Tt(r.clone)?e[o]=r.clone():(s=e[o],e[o]=typeof s===Pt&&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 Bt=/width|height|top|left|bottom|right/i;function It(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]=Bt.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[P]=i[T]=i[S]=i[C]=t:(i[P]=t[P]||e,i[T]=t[T]||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 zt(t){var e;return(t=void 0===t?{}:t).template?t.template=e=Vt.compile(t.template):Tt(t.content)&&(e=t.content),e}function jt(t){var e;return(t=void 0===t?{}:t).ariaTemplate?t.ariaTemplate=e=Vt.compile(t.ariaTemplate):Tt(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(void 0!==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]}Ft[void 0]=function(t){return t};let Nt=function(t,e){return t.filter(e)};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}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 e.includes(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,b=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)&&(be.__proto__=xe),((be.prototype=Object.create(xe&&xe.prototype)).constructor=be).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=be;function be(t,e){t.innerHTML="",xe.call(this,t,e)}e(i,{name:"HTMLSvgIcon",icon:null,svgIcons:{}});var _e={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"),_e[e.type]?new _e[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 Te(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 Pe(t){if(!t)return Se.unit();for(var e=Te(t),i=t.parentElement;i;)var o=Te(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}},Be=(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}},Ie=(Be.prototype.values=function(){return Array.from(this._set)},Be.prototype.has=function(t){return this._set.has(t)},Be.prototype.add=function(t){this._set.add(t)},Be.prototype.delete=function(t){this._set.delete(t)},Be.prototype.clear=function(){this._set.clear()},t.size.get=function(){return this._set.size},Object.defineProperties(Be.prototype,t),function(){var t=!1;return t="function"==typeof Set?new Set([1]).has(1):t});function Ee(t){return new(Ie()?Be: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 ze(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function je(){this.height=0,this.width=0,this.data=[]}je.prototype.clone=function(){var t=new je;return t.height=this.height,t.width=this.width,t.data=this.data.map(function(t){return t.slice()}),t},je.prototype.get=function(t,e){t=this.data[t];return t?t[e]:null},je.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)},je.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}},je.prototype.map=function(o,t){var r=new je;return this.each(function(t,e,i){r.set(e,i,o(t,e,i))},t),r},je.prototype.transpose=function(){var o=new je;return this.each(function(t,e,i){o.set(i,e,t)}),o},je.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},je.prototype.multiply=function(t){for(var e=new je,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},je.prototype.inverse=function(){for(var n=this.width,t=this.augment((new je).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)},je.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},je.prototype.slice=function(t,e,i,o){for(var r=new je,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=je;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)},Ue=1;function Ge(){return"kchart"+Ue++}var We=new WeakMap,Xe=Symbol("id");function Ye(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)&&Tt(o)&&!h?s=o:o&&"string"==typeof o&&Tt(s)&&(n=o),s[Xe]||(s[Xe]=Ge()),(o=We.get(i))||(o=new Map,We.set(i,o)),o.set(t+s[Xe],e),i.addEventListener(t,e,Boolean(r))})}function qe(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=We.get(e))&&i&&i[Xe]&&(i=t+i[Xe],r=n.get(i),n.delete(i),r)&&e.removeEventListener(t,r,Boolean(o))})}function Ze(){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 Qe(){}function Ke(){return(new Date).getTime()}function $e(){this._defaultPrevented=!0}function Je(){return!0===this._defaultPrevented}function ti(){this._events={}}var ei="function";ti.prototype.destroy=function(){this.unbind()},ti.prototype.bind=function(t,e,i){var o,r,n=this,s="string"==typeof t?[t]:t||[],a=typeof e==ei;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},ti.prototype.one=function(t,e){return this.bind(t,e,!0)},ti.prototype.first=function(t,e){for(var i,o="string"==typeof t?[t]:t,r=typeof e==ei,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},ti.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=$e,n.isDefaultPrevented=Je,i=0,o=(r=r.slice()).length;i<o;i++)r[i].call(this,n);return!0===n._defaultPrevented}return!1},ti.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},ti.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=ti;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}function yi(t,e){var i=this;i.support=Ze(),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=Ke()}function vi(t,e,i){ri(this,{x:new yi("X",i.location),y:new yi("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})}yi.prototype.move=function(t){var e=this,i=t["page"+e.axis],o=Ke(),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)},yi.prototype._updateLocationData=function(t){var e=this.axis;this.location=t["page"+e],this.client=t["client"+e],this.screen=t["screen"+e]};function mi(t){for(var e=Fe.up.split(" "),i=0,o=e.length;i<o;i++)t(e[i])}vi.prototype.press=function(){var t=this;this._holdTimeout=setTimeout(function(){return t._hold()},this.userEvents.minHold),this._trigger("press",this.pressEvent)},vi.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))},vi.prototype._hold=function(){this._trigger("hold",this.pressEvent)},vi.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(bi.current&&bi.current!==e.userEvents)return e.dispose();e._start(t)}e._finished||e._trigger(ai,t)}},vi.prototype.end=function(t){this.endTime=Ke(),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())},vi.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)},vi.prototype.skip=function(){this.dispose()},vi.prototype.cancel=function(){this.dispose()},vi.prototype.isMoved=function(){return this._moved},vi.prototype._start=function(t){clearTimeout(this._holdTimeout),this.startTime=Ke(),this._moved=!0,this._trigger("start",t)},vi.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()},vi.prototype._withinIgnoreThreshold=function(){var t=this.x.initialDelta,e=this.y.initialDelta;return Math.sqrt(t*t+e*e)<=this.threshold};(xi=ii)&&(_i.__proto__=xi),((_i.prototype=Object.create(xi&&xi.prototype)).constructor=_i).prototype.preventIfMoving=function(t){this._isMoved()&&t.preventDefault()},_i.prototype.destroy=function(){var e,i=this,t=this.options,o=this.element;i._destroyed||(i._destroyed=!0,i.captureUpIfMoved&&(e=i.surface,mi(function(t){e.removeEventListener(t,i._preventIfMovingProxy,!0)})),qe(i.surface,Ne("move"),this._surfaceMoveHandler),qe(i.surface,Ne("up cancel"),this._surfaceEndHandler),qe(o,Ne("down"),this._elementStartHandler),t.preventDragEvent&&qe(o,Ne("dragstart"),this._elementDragStartHandler),qe(o,Ne("mousedown"),this._elementSelectHandler),i._disposeAll(),i.unbind(),delete i.surface,delete i.element,delete i.currentTarget)},_i.prototype.capture=function(){_i.current=this},_i.prototype.cancel=function(){this._disposeAll(),this.trigger("cancel")},_i.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}))},_i.prototype.press=function(t,e,i){this._apiCall("_start",t,e,i)},_i.prototype.move=function(t,e){this._apiCall("_move",t,e)},_i.prototype.end=function(t,e){this._apiCall("_end",t,e)},_i.prototype._isMultiTouch=function(){return 1<this.touches.length},_i.prototype._maxTouchesReached=function(){return this.touches.length>=this._maxTouches},_i.prototype._disposeAll=function(){for(var t=this.touches;0<t.length;)t.pop().dispose()},_i.prototype._isMoved=function(){return Nt(this.touches,function(t){return t.isMoved()}).length},_i.prototype._select=function(t){this.allowSelection&&!this.trigger("select",{event:t})||t.preventDefault()},_i.prototype._start=function(t){if(!(t.which&&1<t.which||this._maxTouchesReached())){_i.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 vi(this,o,r),this.touches.push(o),o.press(),this._isMultiTouch()&&this.notify("gesturestart",{}))}}},_i.prototype._move=function(t){this._eachTouch("move",t)},_i.prototype._end=function(t){this._eachTouch("end",t)},_i.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))},_i.prototype._apiCall=function(t,e,i,o){this[t]({api:!0,pageX:e,pageY:i,clientX:e,clientY:i,target:o||this.element,stopPropagation:Qe,preventDefault:Qe})},_i.defaultThreshold=function(t){si=t},_i.minHold=function(t){ni=t};var xi,bi=_i;function _i(t,e){xi.call(this);var i,o=this,r=Ze();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),Ye(o.surface,Ne("move"),this._surfaceMoveHandler),this._surfaceEndHandler=this._end.bind(this),Ye(o.surface,Ne("up cancel"),this._surfaceEndHandler),this._elementStartHandler=this._start.bind(this),Ye(t,Ne("down"),r,this._elementStartHandler),t.style["touch-action"]=e.touchAction||"none",e.preventDragEvent&&(this._elementDragStartHandler=oi,Ye(t,Ne("dragstart"),this._elementDragStartHandler)),this._elementSelectHandler=this._select.bind(this),Ye(t,Ne("mousedown"),r,this._elementSelectHandler),o.captureUpIfMoved&&(i=o.surface,o._preventIfMovingProxy=o.preventIfMoving.bind(o),mi(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 wi=bi;function ki(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)}function Ai(t,e){this.x=t||0,this.y=e||0}Ai.prototype.clone=function(){return new Ai(this.x,this.y)},Ai.prototype.equals=function(t){return t&&this.x===t.x&&this.y===t.y},Ai.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},Ai.prototype.multiply=function(t){return this.x*=t,this.y*=t,this},Ai.prototype.distanceTo=function(t){var e=this.x-t.x,t=this.y-t.y;return Math.sqrt(e*e+t*t)},Ai.onCircle=function(t,e,i){e=ce(e);return new Ai(t.x-i*Math.cos(e),t.y-i*Math.sin(e))};let A=Ai;function Si(t,e,i,o){this.x1=t||0,this.y1=e||0,this.x2=i||0,this.y2=o||0}function Ci(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.prototype.equals=function(t){return this.x1===t.x1&&this.x2===t.x2&&this.y1===t.y1&&this.y2===t.y2},Si.prototype.width=function(){return this.x2-this.x1},Si.prototype.height=function(){return this.y2-this.y1},Si.prototype.translate=function(t,e){return this.x1+=t,this.x2+=t,this.y1+=e,this.y2+=e,this},Si.prototype.move=function(t,e){var i=this.height(),o=this.width();return void 0!==t&&(this.x1=t,this.x2=this.x1+o),void 0!==e&&(this.y1=e,this.y2=this.y1+i),this},Si.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},Si.prototype.wrapLimit=function(t,e,i){return this.x1=Math.min(this.x1,Math.max(this.x1-e,t.x1)),this.y1=Math.min(this.y1,Math.max(this.y1-i,t.y1)),this.x2=Math.max(this.x2,Math.min(this.x2+e,t.x2)),this.y2=Math.max(this.y2,Math.min(this.y2+i,t.y2)),this},Si.prototype.wrapPoint=function(t){var e=yt(t),i=e?t[0]:t.x,e=e?t[1]:t.y;return this.wrap(new Si(i,e,i,e)),this},Si.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},Si.prototype.alignTo=function(t,e){var i,o,r=this.height(),n=this.width(),s=e===P||e===S?v:y,a=s==v?r:n;return e===_?(i=t.center(),o=this.center(),this.x1+=i.x-o.x,this.y1+=i.y-o.y):this[s+1]=e===P||e===C?t[s+1]-a:t[s+2],this.x2=this.x1+n,this.y2=this.y1+r,this},Si.prototype.shrink=function(t,e){return this.x2-=t,this.y2-=e,this},Si.prototype.expand=function(t,e){return this.shrink(-t,-e),this},Si.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},Si.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)},Si.prototype.clone=function(){return new Si(this.x1,this.y1,this.x2,this.y2)},Si.prototype.center=function(){return new A(this.x1+this.width()/2,this.y1+this.height()/2)},Si.prototype.containsPoint=function(t){return t.x>=this.x1&&t.x<=this.x2&&t.y>=this.y1&&t.y<=this.y2},Si.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)]},Si.prototype.getHash=function(){return[this.x1,this.y1,this.x2,this.y2].join(",")},Si.prototype.overlaps=function(t){return!(t.y2<this.y1||this.y2<t.y1||t.x2<this.x1||this.x2<t.x1)},Si.prototype.rotate=function(t){var e=this.width(),i=this.height(),o=this.center(),r=o.x,o=o.y,n=Ci(0,0,r,o,t),s=Ci(e,0,r,o,t),a=Ci(e,i,r,o,t),r=Ci(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},Si.prototype.toRect=function(){return new M.geometry.Rect([this.x1,this.y1],[this.width(),this.height()])},Si.prototype.hasSize=function(){return 0!==this.width()&&0!==this.height()},Si.prototype.align=function(t,e,i){return e===y?this.alignX(t,i):this.alignY(t,i),this},Si.prototype.alignX=function(t,e){var i=this.width();e===C?(this.x1=t.x1,this.x2=this.x1+i):e===T?(this.x2=t.x2,this.x1=this.x2-i):e===_&&(this.x1=t.x1+(t.width()-i)/2,this.x2=this.x1+i)},Si.prototype.alignY=function(t,e){var i=this.height();e===P?(this.y1=t.y1,this.y2=this.y1+i):e===S?(this.y2=t.y2,this.y1=this.y2-i):e===_&&(this.y1=t.y1+(t.height()-i)/2,this.y2=this.y1+i)};let B=Si;function Ti(t,e,i,o,r){this.center=t,this.innerRadius=e,this.radius=i,this.startAngle=o,this.angle=r}var Pi;function Mi(t,e){return t-e}Ti.prototype.clone=function(){return new Ti(this.center,this.innerRadius,this.radius,this.startAngle,this.angle)},Ti.prototype.middle=function(){return this.startAngle+this.angle/2},Ti.prototype.setRadius=function(t,e){return e?this.innerRadius=t:this.radius=t,this},Ti.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)},Ti.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 B(a,t,a+e,t+i)},Ti.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)||_t(r,a))&&!_t(n,a)&&i*i<=e&&e<=o*o},Ti.prototype.getBBox=function(){for(var t=new B(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(Mi),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},Ti.prototype.expand=function(t){return this.radius+=t,this};let Oi=Ti,Li=((Pi=Oi)&&(Bi.__proto__=Pi),((Bi.prototype=Object.create(Pi&&Pi.prototype)).constructor=Bi).prototype.expand=function(t){return Pi.prototype.expand.call(this,t)},Bi.prototype.clone=function(){return new Bi(this.center,this.radius,this.startAngle,this.angle)},Bi.prototype.setRadius=function(t){return this.radius=t,this},Bi);function Bi(t,e,i,o){Pi.call(this,t,0,e,i,o)}function Ii(){}function Ei(t){this.children=[],this.initOptions(t)}let Ri=Li,Vi=(Ii.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},Ii.current=new Ii,Ii),o=(Ei.prototype.initOptions=function(t){this.options=O({},this.options,this.initUserOptions(t))},Ei.prototype.initUserOptions=function(t){return t},Ei.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},Ei.prototype.destroy=function(){var t=this.children;this.animation&&this.animation.destroy();for(var e=0;e<t.length;e++)t[e].destroy()},Ei.prototype.getRoot=function(){var t=this.parent;return t?t.getRoot():null},Ei.prototype.getSender=function(){var t=this.getService();if(t)return t.sender},Ei.prototype.getService=function(){for(var t=this;t;){if(t.chartService)return t.chartService;t=t.parent}},Ei.prototype.translateChildren=function(t,e){for(var i=this.children,o=i.length,r=0;r<o;r++)i[r].box.translate(t,e)},Ei.prototype.append=function(){for(var t=arguments,e=0;e<arguments.length;e++){var i=t[e];this.children.push(i),i.parent=this}},Ei.prototype.renderVisual=function(){!1!==this.options.visible&&(this.createVisual(),this.addVisual(),this.renderChildren(),this.createAnimation(),this.renderComplete())},Ei.prototype.addVisual=function(){this.visual&&(this.visual.chartElement=this).parent&&this.parent.appendVisual(this.visual)},Ei.prototype.renderChildren=function(){for(var t=this.children,e=t.length,i=0;i<e;i++)t[i].renderVisual()},Ei.prototype.createVisual=function(){this.visual=new M.drawing.Group({zIndex:this.options.zIndex,visible:b(this.options.visible,!0)})},Ei.prototype.createAnimation=function(){this.visual&&this.options.animation&&(this.animation=M.drawing.Animation.create(this.visual,this.options.animation))},Ei.prototype.appendVisual=function(t){t.chartElement||(t.chartElement=this),t.options.noclip?this.clipRoot().visual.append(t):void 0!==t.options.zIndex?this.stackRoot().stackVisual(t):this.isStackRoot?this.stackVisual(t):this.visual?this.visual.append(t):this.parent.appendVisual(t)},Ei.prototype.clipRoot=function(){return this.parent?this.parent.clipRoot():this},Ei.prototype.stackRoot=function(){return this.parent?this.parent.stackRoot():this},Ei.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(b(n.options.zIndex,0)>e)break}this.visual.insert(r,t)},Ei.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)}},Ei.prototype.closest=function(t){for(var e=this,i=!1;e&&!i;)(i=t(e))||(e=e.parent);if(i)return e},Ei.prototype.renderComplete=function(){},Ei.prototype.hasHighlight=function(){var t=(this.options||{}).highlight;return!(!this.createHighlight||t&&!1===t.visible||!1===this.visible)},Ei.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);void 0===n.options.zIndex&&(n.options.zIndex=b(o.zIndex,this.options.zIndex)),this.appendVisual(n)}n.visible(t)},Ei.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))},Ei.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},Ei.prototype.createGradient=function(t){if(this.parent)return this.parent.createGradient(t)},Ei.prototype.supportsPointInactiveOpacity=function(){return!0},Ei.prototype.options={},Ei);var zi={dots:M.drawing.dotsPattern,verticalStripes:M.drawing.verticalStripesPattern,crosshatch:M.drawing.crosshatchPattern,diagonalStripes:M.drawing.diagonalStripesPattern,grid:M.drawing.gridPattern};function ji(t,e,i){i=Tt(t=t)?t(i):t,t=i&&zi[i.type];return t?t(Object.assign({},e,i)):e}(Di=o)&&(Fi.__proto__=Di),((Fi.prototype=Object.create(Di&&Di.prototype)).constructor=Fi).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),Di.prototype.reflow.call(this,u),i=l?this.box=new B(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)}},Fi.prototype.align=function(t,e,i){this.box.align(t,e,i)},Fi.prototype.hasBox=function(){var t=this.options;return t.border.width||t.background},Fi.prototype.createVisual=function(){Di.prototype.createVisual.call(this),this.options.visible&&this.hasBox()&&this.visual.append(M.drawing.Path.fromRect(this.paddingBox.toRect(),this.visualStyle()))},Fi.prototype.visualStyle=function(){var t=this.options,e=t.border||{};return{stroke:{width:e.width,color:e.color,opacity:b(e.opacity,t.opacity),dashType:e.dashType},fill:ji(t.pattern,{color:t.background,opacity:t.opacity},void 0),cursor:t.cursor}};var Di,i=Fi;function Fi(t){Di.call(this,t),this.options.margin=w(this.options.margin),this.options.padding=w(this.options.padding)}e(i,{align:C,vAlign:P,margin:{},padding:{},border:{color:Y,width:0},background:"",shrinkToFit:!1,width:0,height:0,visible:!0});let Hi=i;function Ni(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)}(Ui=Hi)&&(Gi.__proto__=Ui),((Gi.prototype=Object.create(Ui&&Ui.prototype)).constructor=Gi).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=b(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},Gi.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()},Gi.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}},Gi.prototype.createVisual=function(){this.visual=this.createElement(),Ni(this.visual,this.options.accessibilityOptions)};var Ui,t=Gi;function Gi(t,e){Ui.call(this,t),this.pointData=e}e(t,{type:q,align:_,vAlign:_});let Wi=t,Xi="radial",Yi={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:Xi,stops:[{offset:0,color:a,opacity:.55},{offset:.65,color:a,opacity:0},{offset:.95,color:a,opacity:.25}]},roundedBevel:{type:Xi,stops:[{offset:.33,color:a,opacity:.06},{offset:.83,color:a,opacity:.2},{offset:.95,color:a,opacity:0}]},roundedGlass:{type:Xi,supportVML:!1,stops:[{offset:0,color:a,opacity:0},{offset:.5,color:a,opacity:.3},{offset:.99,color:a,opacity:0}]},sharpGlass:{type:Xi,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:Xi,center:[.5,.5],radius:.5}};(qi=o)&&(Qi.__proto__=qi),((Qi.prototype=Object.create(qi&&qi.prototype)).constructor=Qi).prototype.reflow=function(){var t=this.options,e=this.children,i=new B(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 B(s,h,a,p),d[1]=new B(n,p,s,c),d[2]=new B(a,p,l,c),d[3]=new B(s,c,a,u),o.x1===n&&o.y1===h||r.x1===n&&r.y1===h?(d[4]=new B(n,h,s,p),d[5]=new B(a,c,l,u)):(d[4]=new B(a,h,l,p),d[5]=new B(n,c,s,u)),Nt(d,function(t){return 0<t.height()&&0<t.width()})[0]))||new B},Qi.prototype.createVisual=function(){this.visual=new M.drawing.Group,this.createBackground()},Qi.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)},Qi.prototype.getRoot=function(){return this},Qi.prototype.createGradient=function(t){var e,s,i=this.gradients,o=pe(t),r=Yi[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},Qi.prototype.cleanGradients=function(){var t,e=this.gradients;for(t in e)e[t]._observers=[]},Qi.prototype.size=function(){var t=this.options;return new B(0,0,t.width,t.height)};var qi,Zi,i=Qi;function Qi(t){qi.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 Ki=i,$i=((Zi=o)&&(Ji.__proto__=Zi),((Ji.prototype=Object.create(Zi&&Zi.prototype)).constructor=Ji).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)},Ji.prototype.reflow=function(t){this.box=t.clone(),this.reflowChildren()},Ji.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),b=new B;b[o+1]=x,b[o+2]=x+m[n],b[i+1]=f,b[i+2]=f+m[r],v.reflow(b),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}},Ji.prototype.alignStart=function(t,e){var i=0,o=this.options.align;return o===T||o===S?i=e-t:o===_&&(i=(e-t)/2),i},Ji.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)}},Ji.prototype.elementSize=function(t){return{width:t.box.width(),height:t.box.height()}},Ji.prototype.createVisual=function(){},Ji);function Ji(t){Zi.call(this,t),this._initDirection()}e($i,{vertical:!0,wrap:!0,vSpacing:0,spacing:0});let to=$i;var eo,io=M.drawing.Text,t=((eo=o)&&(oo.__proto__=eo),((oo.prototype=Object.create(eo&&eo.prototype)).constructor=oo).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 B(t.x1,t.y1,t.x1+e.width,t.y1+e.height)},oo.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 io(this.content,this.box.toRect().topLeft(),{font:e,fill:{color:i,opacity:o},cursor:r,stroke:n,paintOrder:t})},oo);function oo(t,e){eo.call(this,e),this.content=t,this.reflow(new B)}e(t,{font:$,color:Y});let ro=t;function no(t){var e=t.origin,t=t.bottomRight();return new B(e.x,e.y,t.x,t.y)}var so,ao,lo,ho,po=/\n/m;function co(t,e,i){so.call(this,e),this.content=t,this.data=i,this._initContainer(),!1!==this.options._autoReflow&&this.reflow(new B)}(so=Hi)&&(co.__proto__=so),((co.prototype=Object.create(so&&so.prototype)).constructor=co).prototype._initContainer=function(){var t=this.options,e=String(this.content).split(po),i=new to({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 ro(e[r].trim(),o);i.append(n)}},co.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=no(o.clippedBBox()||new M.geometry.Rect),o.options.zIndex=i.zIndex),this.box=this.contentBox=this.paddingBox=e):(so.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)))},co.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))},co.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()):so.prototype.renderVisual.call(this))},co.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},co.prototype.getDefaultVisual=function(){this.createVisual(),this.renderChildren();var t=this.visual;return delete this.visual,t},co.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},co.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 uo=co,fo=((ao=o)&&(go.__proto__=ao),((go.prototype=Object.create(ao&&ao.prototype)).constructor=go).prototype.reflow=function(t){ao.prototype.reflow.call(this,t),this.box.snapTo(t,y)},go.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 go(t):i},go.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 yo(e),yo(t),t.reverse(),e.concat(t)},go);function go(t){ao.call(this,t),this._textBox=new uo(this.options.text,Object.assign({},this.options,{vAlign:this.options.position})),this.append(this._textBox)}function yo(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(fo,{color:Y,position:P,align:_,margin:w(5),padding:w(5)});let vo=fo,mo=((lo=uo)&&(xo.__proto__=lo),((xo.prototype=Object.create(lo&&lo.prototype)).constructor=xo).prototype.visualContext=function(t){t=lo.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},xo.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})},xo.prototype.rotate=function(){var t,e;return this.options.alignRotation!==_?(t=this.normalBox.toRect(),e=this.rotationTransform(),this.box=no(t.bbox(e.matrix()))):lo.prototype.rotate.call(this),this.box},xo.prototype.rotationTransform=function(){var t=this.options,e=t.rotation;if(!e)return null;if(t.alignRotation===_)return lo.prototype.rotationTransform.call(this);var i=M.geometry.transform().rotate(e).matrix(),o=this.normalBox.toRect(),r=this.targetBox.toRect(),t=t.rotationOrigin||P,n=t===P||t===S?y:v,s=t===P||t===S?v:y,t=t===P||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)},xo);function xo(t,e,i,o,r){lo.call(this,e,r),this.text=e,this.value=t,this.index=i,this.dataItem=o,this.reflow(new B)}e(mo,{_autoReflow:!1});let bo=mo,_o=((ho=Hi)&&(wo.__proto__=ho),((wo.prototype=Object.create(ho&&ho.prototype)).constructor=wo).prototype.hide=function(){this.options.visible=!1},wo.prototype.show=function(){this.options.visible=!0},wo.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 B,r=function(){return l},n=h.size,s=this.fields.text,k(i)&&i.visible&&((a=zt(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 uo(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 Wi(O({},h))).aliasFor=r,this.marker=a,this.append(a),this.label&&this.append(this.label),a.reflow(new B),this.wrapperBox=o.wrap(a.box))},wo.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,T])?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)},wo.prototype.createVisual=function(){ho.prototype.createVisual.call(this),this.visual.options.noclip=this.options.noclip,this.options.visible&&this.createLine()},wo.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()):ho.prototype.renderVisual.call(this)},wo.prototype.createLine=function(){var t=this.options.line;this.linePoints&&(bt(t=M.drawing.Path.fromPoints(this.linePoints,{stroke:{color:t.color,width:t.width,dashType:t.dashType}})),this.visual.append(t))},wo.prototype.click=function(t,e){var i=this.eventArgs(e);t.trigger("noteClick",i)||e.preventDefault()},wo.prototype.over=function(t,e){var i=this.eventArgs(e);t.trigger("noteHover",i)||e.preventDefault()},wo.prototype.out=function(t,e){e=this.eventArgs(e);t.trigger("noteLeave",e)},wo.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})},wo);function wo(t,e,i){ho.call(this,e),this.fields=t,this.chartService=i,this.render()}e(_o,{icon:{visible:!0,type:q},label:{position:it,visible:!0,align:_,vAlign:_},line:{visible:!0},visible:!0,position:P,zIndex:2});let ko=_o;function Ao(){}var So={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}};Ao.register=function(t){So=t},i.implementation.get=function(){return So},Object.defineProperties(Ao,i);let Co=Ao;function To(t){this._intlService=t}var Po=/\{(\d+)(:[^\}]+)?\}/g,t={intl:{configurable:!0}};t.intl.get=function(){return this._intlService||Co.implementation},t.intl.set=function(t){this._intlService=t},To.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)},To.prototype.localeAuto=function(t,o,r){var n=this.intl;return wt(t)&&t.match(tt)?t.replace(Po,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(To.prototype,t);function Mo(t,e){this._intlService=(e=void 0===e?{}:e).intlService,this.sender=e.sender||t,this.format=new Oo(e.intlService),this.chart=t,this.rtl=Boolean(e.rtl)}let Oo=To,Lo={intl:{configurable:!0}},Bo=(Lo.intl.get=function(){return this._intlService||Co.implementation},Lo.intl.set=function(t){this._intlService=t,this.format.intl=t},Mo.prototype.notify=function(t,e){this.chart&&this.chart.trigger(t,e)},Mo.prototype.isPannable=function(t){var e=((this.chart||{}).options||{}).pannable;return e&&e.lock!==t},Object.defineProperties(Mo.prototype,Lo),Mo);function Io(){}var Eo;Io.register=function(t){Eo=t},Io.create=function(t,e){return Eo?Eo.create(t,e):new wi(t,Object.assign({},{multiTouch:!0},e))};let Ro=Io;function Vo(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),bt(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),bt(e),e}(jo=o)&&(r.__proto__=jo),((r.prototype=Object.create(jo&&jo.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?T:_,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 bo)}),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 B(r,e.y1,r,e.y2-t):new B(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 uo(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 ko({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,T])?r.options.position=t.reverse?C:T:t.vertical||u(r.options.position,[P,S])||(r.options.position=t.reverse?S:P):t.vertical?r.options.position=t.reverse?C:T:r.options.position=t.reverse?S:P,this.append(r),this.notes.push(r))}},r.prototype.parseNoteValue=function(t){return t},r.prototype.renderVisual=function(){jo.prototype.renderVisual.call(this),this.createPlotBands()},r.prototype.createVisual=function(){jo.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(Vo(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&&bt(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 B(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=zt(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 uo(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 B(t.x1,t.y1,t.x1+h+a,t.y2):new B(t.x1,t.y1,t.x2,t.y1+h+a),this.arrangeTitle(),this.arrangeLabels(),this.arrangeNotes()},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=T),t.box.move(n,i)):(n=s.y1,e?(n-=r+t.box.height(),t.options.rotationOrigin=S):(n+=r,t.options.rotationOrigin=P),new B(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 B);return!0}},r.prototype.arrangeTitle=function(){var t=this.options,e=this.title,i=t.labels.mirror;e&&(t.vertical?(e.options.align=i?T:C,e.options.vAlign=e.options.position):(e.options.align=e.options.position,e.options.vAlign=i?P: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=zt(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 jo,i=r;function r(t,e){void 0===e&&(e=new Bo),jo.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:_},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 Do=i;var Fo="milliseconds",Ho="seconds",No="minutes",Uo="hours",Go="days",Wo="weeks",Xo="months",Yo="years",qo=6e4,Zo=36e5,Qo=864e5,Ko=6048e5,$o=31536e6,Jo={years:$o,months:26784e5,weeks:Ko,days:Qo,hours:Zo,minutes:qo,seconds:1e3,milliseconds:1};function tr(t,e){return t.getTime()-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*qo}function er(t,e){return new Date(t.getTime()+e)}function ir(t){var e;return t instanceof Date?e=t:t&&(e=new Date(t)),e}function or(t,e){0===e&&23===t.getHours()&&t.setHours(t.getHours()+2)}function rr(t,e,i,r){var o,n,s,a=t;return t&&(o=(t=ir(t)).getHours(),i===Yo?or(a=new Date(t.getFullYear()+e,0,1),0):i===Xo?or(a=new Date(t.getFullYear(),t.getMonth()+e,1),o):i===Wo?or(a=rr(((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 er(t,-i*Qo)})(t,r),7*e,Go),o):i===Go?or(a=new Date(t.getFullYear(),t.getMonth(),t.getDate()+e),o):i===Uo?(o=t,n=e,(s=new Date(o)).setMinutes(0,0,0),o=(o.getTimezoneOffset()-s.getTimezoneOffset())*qo,a=er(s,o+n*Zo)):i===No?0<(a=er(t,e*qo)).getSeconds()&&a.setSeconds(0):i===Ho?a=er(t,1e3*e):i===Fo&&(a=er(t,e)),i!==Fo)&&0<a.getMilliseconds()&&a.setMilliseconds(0),a}function nr(t,e,i){return rr(ir(t),0,e,i)}function sr(t,e,i){t=ir(t);return t&&nr(t,e,i).getTime()===t.getTime()?t:rr(t,1,e,i)}function ar(t,e){return t&&e?t.getTime()-e.getTime():-1}function lr(t,e){return t.getTime()-e}function hr(t){if(yt(t)){for(var e=[],i=0;i<t.length;i++)e.push(hr(t[i]));return e}if(t)return ir(t).getTime()}function pr(t,e){return t&&e?hr(t)===hr(e):t===e}function cr(t,e,i){return tr(t,e)/Jo[i]}function ur(t,e,i,o){var t=ir(t),r=ir(e);return(i===Xo?t.getMonth()-r.getMonth()+12*(t.getFullYear()-r.getFullYear())+cr(t,new Date(t.getFullYear(),t.getMonth()),Go)/new Date(t.getFullYear(),t.getMonth()+1,0).getDate():i===Yo?t.getFullYear()-r.getFullYear()+ur(t,new Date(t.getFullYear(),0),Xo,1)/12:i===Go||i===Wo?cr(t,r,i):lr(t,e)/Jo[i])/o}function dr(t,e,i){return i===Yo?e.getFullYear()-t.getFullYear():i===Xo?12*dr(t,e,Yo)+e.getMonth()-t.getMonth():i===Go?Math.floor(lr(e,t)/Qo):Math.floor(lr(e,t)/Jo[i])}function fr(t,e){return wt(e)&&t.parseDate(e)||ir(e)}function gr(t,e){if(yt(e)){for(var i=[],o=0;o<e.length;o++)i.push(fr(t,e[o]));return i}return fr(t,e)}function yr(t,e){return m(t.weekStartDay)?t.weekStartDay:e&&e.firstDay?e.firstDay():0}(vr=Do)&&(n.__proto__=vr),((n.prototype=Object.create(vr&&vr.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=void 0!==t.min,o=void 0!==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(){vr.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=void 0===e,t=b(t,0),e=b(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),vr.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=b(o.categories[t],""),i=(i.dataItem=r,this.axisLabelText(o,e,i));return new bo(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(){vr.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,i=this.options;return this._categoriesMap?this._categoriesMap.get(t):(e=t,t=i.srcCategories,e instanceof Date?t.findIndex(function(t){return pr(t,e)}):t.indexOf(e))},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 vr,t=n;function n(){vr.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"},xr=[Fo,Ho,No,Uo,Go,Wo,Xo,Yo],br="fit";function _r(t,e){e&&(t._range=void 0);e=t._range;return e||((e=t._range=ke(t)).min=ir(e.min),e.max=ir(e.max)),e}function wr(t){this.options=t}function kr(t,e,i){(this.options=i).baseUnitStep=i.baseUnitStep||1;var o,r=i.roundToBaseUnit,n=i.justified,s=(this.start=rr(t,0,i.baseUnit,i.weekStartDay),this.roundToTotalStep(e)),a=!n&&pr(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&&pr(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))}wr.prototype.displayIndices=function(){return{min:0,max:1}},wr.prototype.displayRange=function(){return{}},wr.prototype.total=function(){return{}},wr.prototype.valueRange=function(){return{}},wr.prototype.valueIndex=function(){return-1},wr.prototype.values=function(){return[]},wr.prototype.totalIndex=function(){return-1},wr.prototype.valuesCount=function(){return 0},wr.prototype.totalCount=function(){return 0},wr.prototype.dateAt=function(){return null};function Ar(t,e,i){for(var o,r,n,s=_r(t.categories),a=(t.max||s.max)-(t.min||s.min),l=t.autoBaseUnitSteps,h=t.maxDateGroups,p=t.baseUnit===br,c=e?xr.indexOf(e):0,u=p?xr[c++]:t.baseUnit,d=a/Jo[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(xr)){r=Math.ceil(f/h);break}if(!p){h<d&&(r=Math.ceil(f/h));break}u=xr[c++]||he(xr),f=a/Jo[u],o=null}}t.baseUnitStep=r,t.baseUnit=u}kr.prototype.displayRange=function(){return{min:this.displayStart,max:this.displayEnd}},kr.prototype.displayIndices=function(){var t,e,i;return this._indices||(i=(t=this.options).baseUnit,e=ur(this.displayStart,this.valueStart,i,t=t.baseUnitStep),i=ur(this.displayEnd,this.valueStart,i,t),this._indices={min:e,max:i}),this._indices},kr.prototype.total=function(){return{min:this.start,max:this.end}},kr.prototype.totalCount=function(){return this.totalIndex(this.end)+(this.options.justified?1:0)},kr.prototype.valueRange=function(){return{min:this.valueStart,max:this.valueEnd}},kr.prototype.valueIndex=function(t){var e=this.options;return Math.floor(ur(t,this.valueStart,e.baseUnit,e.baseUnitStep))},kr.prototype.totalIndex=function(t){var e=this.options;return Math.floor(ur(t,this.start,e.baseUnit,e.baseUnitStep))},kr.prototype.dateIndex=function(t){var e=this.options;return ur(t,this.valueStart,e.baseUnit,e.baseUnitStep)},kr.prototype.valuesCount=function(){return this.valueIndex(this.valueEnd)+1},kr.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=rr(o,e.baseUnitStep,e.baseUnit,e.weekStartDay)}return t},kr.prototype.dateAt=function(t,e){var i=this.options;return rr(e?this.start:this.valueStart,i.baseUnitStep*t,i.baseUnit,i.weekStartDay)},kr.prototype.roundToTotalStep=function(t,e,i){var o=this.options,r=o.baseUnit,n=o.baseUnitStep,o=o.weekStartDay,s=this.start,t=ur(t,s,r,n),e=e?Math.ceil(t):Math.floor(t);return i&&(e+=i),rr(s,e*n,r,o)};(Sr=mr)&&(s.__proto__=Sr),((s.prototype=Object.create(Sr&&Sr.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(){Sr.prototype.initFields.call(this);var t,e=this.chartService,i=e.intl,o=this.options,r=o.categories||[];r._parsed||((r=gr(i,r))._parsed=!0),o=O({roundToBaseUnit:!0},o,{categories:r,min:fr(i,o.min),max:fr(i,o.max),weekStartDay:yr(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=_r(r,!0),e=o.maxDivisions,r=(t=>{var e=(t.baseUnit||"").toLowerCase();if(e!==br&&!u(e,xr)){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(tr(p,i)))&&(o=(a=Math.min(a,h))>=$o?Yo:24192e5<=a?Xo:Ko<=a?Wo:Qo<=a?Go:Zo<=a?Uo:qo<=a?No:Ho),i=p}r.baseUnit=o||Go}return e!==br&&"auto"!==t.baseUnitStep||Ar(t),t})(o),(t=o._forecast)&&(0<t.before&&(i.min=rr(i.min,-t.before,r.baseUnit,r.weekStartDay)),0<t.after)&&(i.max=rr(i.max,t.after,r.baseUnit,r.weekStartDay)),this.dataRange=new kr(i.min,i.max,r),e?(t=this.dataRange.displayRange(),Ar(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 kr(i.min,i.max,r)):this.divisionRange=this.dataRange):(o.baseUnit=o.baseUnit||Go,this.dataRange=this.divisionRange=new wr(o)),this.rangeLabels=[]},s.prototype.tickIndices=function(t){var e=this.dataRange,i=this.divisionRange,o=i.valuesCount();if(!this.options.maxDivisions||!o)return Sr.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<=ar(t,e.min)&&ar(t,e.max)<=0&&i.length},s.prototype.parseNoteValue=function(t){return fr(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=er(e.min||n.min,t),e=er(e.max||n.max,t),n={min:rr(r,0,i,o),max:rr(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=er(r,t=L(t/(o/(n-r)),g)*(e.reverse?-1:1)),r=er(n,t),(n=this.limitRange(hr(o),hr(r),hr(i.min),hr(i.max),t))?(n.min=ir(n.min),n.max=ir(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=Sr.prototype.pointsRange.call(this,t,e),e=this.dataRange.displayRange(),i=this.dataRange.displayIndices(),i=lr(e.max,e.min)/(i.max-i.min),o=this.options,{min:er(e.min,t.min*i),max:er(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===br,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*Jo[l],u=lr(n,s),d=lr(a,t),f=xr.indexOf(l);if(d<Jo[l]&&l!==Fo)l=xr[f-1],t=er(s,p=(u-(e-1)*(h=he(c[l]))*Jo[l])/2),a=er(n,-p);else if(o<d&&l!==Yo){var g=0;do{for(l=xr[++f],g=0,p=2*Jo[l];h=c[l][g],++g<c[l].length&&p*h<u;);}while(l!==Yo&&p*h<u);0<(p=(p*h-u)/2)&&(t=er(s,-p),a=er(n,p),t=er(t,x(a,r.min,r.max)-a),a=er(a,x(t,r.min,r.max)-t))}}return t&&a&&0<lr(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(){Sr.prototype.createLabels.call(this),this.createRangeLabels()},s.prototype.clearLabels=function(){Sr.prototype.clearLabels.call(this),this.rangeLabels=[]},s.prototype.arrangeLabels=function(){this.arrangeRangeLabels(),Sr.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(){Sr.prototype.autoRotateLabels.call(this),this.autoRotateRangeLabels()},s.prototype.hideOutOfRangeLabels=function(){Sr.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=Sr.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 bo(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:_,zIndex:i.zIndex});!0===r.visible&&(this.normalizeLabelRotation(r),r.alignRotation=_,"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 bo(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 B))},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)),Sr.prototype.getSlot.call(this,t,e,i)},s.prototype.valueRange=function(){var t=_r(this.options.srcCategories);return{min:ir(t.min),max:ir(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=_r((t=this.options).srcCategories),new kr(e.min,e.max,Object.assign({},t,{justified:!1,roundToBaseUnit:!0,justifyEnd:!1})).displayRange())};var Sr,t=s;function s(){Sr.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 Cr=t;function Tr(t,e){return L(Math.floor(t/e)*e,g)}function Pr(t,e){return L(Math.ceil(t/e)*e,g)}function Mr(t){return Math.max(Math.min(t,3e5),-3e5)}var Or,Lr,Br=Math.pow(10,1-g),t=((Or=Do)&&(Ir.__proto__=Or),((Ir.prototype=Object.create(Or&&Or.prototype)).constructor=Ir).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=ki(e,a),!(s={majorUnit:n})!==r.roundToMajorUnit&&(e<0&&Er(e,n,1/3)&&(e-=n),0<a)&&Er(a,n,1/3)&&(a+=n),s.min=Tr(e,n),s.max=Pr(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=Tr(n.min,s.majorUnit),n.max=Pr(n.max,s.majorUnit)):f&&(a=O(n,s),n.majorUnit=ki(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},Ir.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},Ir.prototype.clone=function(){return new Ir(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},Ir.prototype.startValue=function(){return 0},Ir.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},Ir.prototype.getDivisions=function(t){var e;return 0===t?1:(e=(e=this.options).max-e.min,Math.floor(L(e/t,Z))+1)},Ir.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},Ir.prototype.getMajorTickPositions=function(){return this.getTickPositions(this.options.majorUnit)},Ir.prototype.getMinorTickPositions=function(){return this.getTickPositions(this.options.minorUnit)},Ir.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=b(t,e||0),e=b(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 B(a.x1,a.y1,a.x1,a.y1);return h[n+1]=Mr(l+r*(0<s?t:i)),h[n+2]=Mr(l+r*(0<s?i:t)),h},Ir.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)},Ir.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}},Ir.prototype.labelsCount=function(){return this.getDivisions(this.options.majorUnit)},Ir.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 bo(o,i,t,null,e)},Ir.prototype.shouldRenderNote=function(t){var e=this.range();return e.min<=t&&t<=e.max},Ir.prototype.pan=function(t){t=this.translateRange(t);return this.limitRange(t.min,t.max,this.totalMin,this.totalMax,t.offset)},Ir.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}},Ir.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<Br?e+Br:t}},Ir.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}},Ir.prototype.isValidRange=function(t,e){return Br<e-t},Ir);function Ir(t,e,i,o){Or.call(this,Object.assign({},i,{seriesMin:t,seriesMax:e}),o)}function Er(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 Rr=t,Vr=((Lr=Do)&&(zr.__proto__=Lr),((zr.prototype=Object.create(Lr&&Lr.prototype)).constructor=zr).prototype.clone=function(){return new zr(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},zr.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},zr.prototype.getDivisions=function(t){var e=this.options;return Math.floor(dr(e.min,e.max,e.baseUnit)/t+1)},zr.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/lr(e.max,e.min),l=e.weekStartDay||0,h=[n],p=1;p<s;p++){var c=n+lr(rr(e.min,p*t,e.baseUnit,l),e.min)*a*o;h.push(L(c,Z))}return h},zr.prototype.getMajorTickPositions=function(){return this.getTickPositions(this.options.majorUnit)},zr.prototype.getMinorTickPositions=function(){return this.getTickPositions(this.options.minorUnit)},zr.prototype.getSlot=function(t,e,i){return Rr.prototype.getSlot.call(this,fr(this.intlService,t),fr(this.intlService,e),i)},zr.prototype.getValue=function(t){t=Rr.prototype.getValue.call(this,t);return null!==t?ir(t):null},zr.prototype.labelsCount=function(){return this.getDivisions(this.options.majorUnit)},zr.prototype.createAxisLabel=function(t,e,i){var o=this.options,r=t*o.majorUnit,n=o.min,r=(0<r&&(n=rr(n,r,o.baseUnit,o.weekStartDay||0)),e.dateFormats[o.baseUnit]),o=(e.format=e.format||r,this.axisLabelText(n,e,i));return new bo(n,o,t,null,e)},zr.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/lr(n.max,n.min),n=L(t/i,g);return{min:er(e.min,n=!o&&!r||o&&r?n:-n),max:er(e.max,n),offset:n}},zr.prototype.shouldRenderNote=function(t){var e=this.range();return 0<=ar(t,e.min)&&ar(t,e.max)<=0},zr.prototype.pan=function(t){t=this.translateRange(t,!0),t=this.limitRange(hr(t.min),hr(t.max),this.totalMin,this.totalMax,t.offset);if(t)return{min:ir(t.min),max:ir(t.max)}},zr.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:ir(i),max:ir(t)}},zr.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=ir(hr(this.options.min)+i),i=ir(hr(this.options.max)-e);return{min:t,max:i=i-t<1e3?ir(hr(t)+1e3):i}},zr.prototype.zoomRange=function(t,e){t=this.scaleRange(t,e);return{min:ir(x(hr(t.min),this.totalMin,this.totalMax)),max:ir(x(hr(t.max),this.totalMin,this.totalMax))}},zr);function zr(t,e,i,o){var r,n,s,a,l,h,p,t=ir(t),e=ir(e),c=o.intl,i=i||{},u=(u=t,r=e,n=i=O(i||{},{min:fr(c,i.min),max:fr(c,i.max),axisCrossingValue:gr(c,i.axisCrossingValues||i.axisCrossingValue),weekStartDay:yr(i,c)}),u=n.min||u,r=n.max||r,s=n.baseUnit||(r&&u?(s=tr(r,u),a=Uo,$o<=s?a=Yo:26784e5<=s?a=Xo:Ko<=s?a=Wo:Qo<=s&&(a=Go),a):Uo),a=Jo[s],l=n.weekStartDay||0,u=nr(hr(u)-1,s,l)||ir(r),r=sr(hr(r)+1,s,l),a=n.majorUnit||Pr(ki(u.getTime(),r.getTime()),a)/a,h=Pr(h=dr(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||rr(u,-p,s,l),n.max=n.max||rr(r,h,s,l),n.minorUnit=n.minorUnit||a/5,n.majorUnit=a,i=n,Lr.call(this,i,o),this.intlService=c,this.seriesMin=t,this.seriesMax=e,i.weekStartDay||0);this.totalMin=hr(nr(hr(t)-1,i.baseUnit,u)),this.totalMax=hr(sr(hr(e)+1,i.baseUnit,u))}e(Vr,{type:K,majorGridLines:{visible:!0,width:1,color:Y},labels:{dateFormats:i}});let jr=Vr;(Dr=Do)&&(Nr.__proto__=Dr),((Nr.prototype=Object.create(Dr&&Dr.prototype)).constructor=Nr).prototype.clone=function(){return new Nr(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},Nr.prototype.startValue=function(){return this.options.min},Nr.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=b(t,e||1),e=b(e,t||1);if(n<=0||e<=0)return null;i&&(n=x(n,a,o),e=x(e,a,o));n=Gr(n,s),e=Gr(e,s),t=Math.min(n,e)-r,i=Math.max(n,e)-r,a=new B(c.x1,c.y1,c.x1,c.y1);return a[h+1]=Mr(u+l*(0<p?t:i)),a[h+2]=Mr(u+l*(0<p?i:t)),a},Nr.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)},Nr.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},Nr.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}},Nr.prototype.labelsCount=function(){var t=Math.floor(this.logMax);return Math.floor(t-this.logMin)+1},Nr.prototype.getMajorTickPositions=function(){var e=[];return this.traverseMajorTicksPositions(function(t){e.push(t)},{step:1,skip:0}),e},Nr.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(Vo(a,e))}return e.visible&&this.traverseMajorTicksPositions(l,e),o.visible&&this.traverseMinorTicksPositions(l,o),[]},Nr.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},Nr.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)},Nr.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*(Gr(f,s)-h),g),e)}},Nr.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 bo(o,i,t,null,e)},Nr.prototype.shouldRenderNote=function(t){var e=this.range();return e.min<=t&&t<=e.max},Nr.prototype.pan=function(t){t=this.translateRange(t);return this.limitRange(t.min,t.max,this.totalMin,this.totalMax,t.offset)},Nr.prototype.pointsRange=function(t,e){t=this.getValue(t),e=this.getValue(e);return{min:Math.min(t,e),max:Math.max(t,e)}},Nr.prototype.scaleRange=function(t,e){var i=this.options.majorUnit,o=Gr(this.options.min,i),r=Gr(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}},Nr.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)}},Nr.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}},Nr.prototype.lineInfo=function(){var t=Dr.prototype.lineInfo.call(this);return t.step=t.axisDir*(t.lineSize/(this.logMax-this.logMin)),t};var Dr,Fr,Hr,t=Nr;function Nr(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(Gr(l=e,u=p),g)%1,l<=0?u:0!=c&&(c<.3||.9<c)?Math.pow(u,Gr(l,u)+.2):Math.pow(u,Math.ceil(Gr(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(Gr(l,s)))),a),d=(l=u,s=c,a=i,r=(d=h).min,n=d.max,k(d.axisCrossingValue)&&d.axisCrossingValue<=0&&Ur(),k(a.max)?a.max<=0&&Ur():n=s,k(a.min)?a.min<=0&&Ur():r=l,{min:r,max:n});h.max=d.max,h.min=d.min,h.minorUnit=i.minorUnit||L(p-1,g),Dr.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(Gr(d.min,p),g),this.logMax=L(Gr(d.max,p),g),this.seriesMin=t,this.seriesMax=e,this.createLabels()}function Ur(){throw new Error("Non positive values cannot be used for a logarithmic axis")}function Gr(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 Wr=t,Xr={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})}},Yr=((Fr=mr)&&(qr.__proto__=Fr),((qr.prototype=Object.create(Fr&&Fr.prototype)).constructor=qr).prototype.range=function(){return{min:0,max:this.options.categories.length}},qr.prototype.reflow=function(t){this.box=t,this.reflowLabels()},qr.prototype.lineBox=function(){return this.box},qr.prototype.reflowLabels=function(){for(var t=this.labels,e=this.options.labels,i=e.skip||0,o=e.step||1,r=new B,n=0;n<t.length;n++){t[n].reflow(r);var s=t[n].box;t[n].reflow(this.getSlot(i+n*o).adjacentBox(0,s.width(),s.height()))}},qr.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},qr.prototype.majorIntervals=function(){return this.intervals(1)},qr.prototype.minorIntervals=function(){return this.intervals(.5)},qr.prototype.intervalAngle=function(t){return(360+t+this.options.startAngle)%360},qr.prototype.majorAngles=function(){var e=this;return Kt(this.majorIntervals(),function(t){return e.intervalAngle(t)})},qr.prototype.createLine=function(){return[]},qr.prototype.majorGridLineAngles=function(t){var e=this.options.majorGridLines;return this.gridLineAngles(t,1,e.skip,e.step)},qr.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)},qr.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}},qr.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,Vi.current.createRing(r,{fill:{color:o.color,opacity:o.opacity},stroke:{opacity:o.opacity}}));e.append(a)}this.appendVisual(e)},qr.prototype.plotBandSlot=function(t){return this.getSlot(t.from,t.to-1)},qr.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 Oi(r.center(),0,r.height()/2,i,n)},qr.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})},qr.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},qr);function qr(){Fr.apply(this,arguments)}e(Yr,{startAngle:90,labels:{margin:w(10)},majorGridLines:{visible:!0},justified:!0}),O(Yr.prototype,Xr);let Zr=Yr,Qr=((Hr=Do)&&(Kr.__proto__=Hr),((Kr.prototype=Object.create(Hr&&Hr.prototype)).constructor=Kr).prototype.getDivisions=function(t){return Rr.prototype.getDivisions.call(this,t)-1},Kr.prototype.reflow=function(t){this.box=t,this.reflowLabels()},Kr.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 B,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()))}},Kr.prototype.lineBox=function(){return this.box},Kr.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},Kr.prototype.majorIntervals=function(){return this.intervals(this.options.majorUnit)},Kr.prototype.minorIntervals=function(){return this.intervals(this.options.minorUnit)},Kr.prototype.intervalAngle=function(t){return(540-t-this.options.startAngle)%360},Kr.prototype.createLine=function(){return[]},Kr.prototype.majorGridLineAngles=function(t){var e=this.options.majorGridLines;return this.gridLineAngles(t,this.options.majorUnit,e.skip,e.step)},Kr.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)},Kr.prototype.plotBandSlot=function(t){return this.getSlot(t.from,t.to)},Kr.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 Oi(o.center(),0,o.height()/2,t,e-t)},Kr.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})},Kr.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},Kr.prototype.valueRange=function(){return{min:0,max:2*Math.PI}},Kr);function Kr(t,e){Hr.call(this,t,e);t=this.options;t.minorUnit=t.minorUnit||t.majorUnit/2}e(Qr,{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(Qr.prototype,Xr,{createPlotBands:Zr.prototype.createPlotBands,majorAngles:Zr.prototype.majorAngles,range:Rr.prototype.range,labelsCount:Rr.prototype.labelsCount,createAxisLabel:Rr.prototype.createAxisLabel});let $r=Qr,Jr={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 Oi(r,r.y-a.y2,r.y-a.y1,0,360),a=e===H?Vi.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 tn(t,i)-tn(e,i)}),r=90-tn(n[0],n[1])/2,t=180-tn(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 tn(t,e){return 180-Math.abs(Math.abs(t-e)-180)}var en,on,i=Jr,t=((en=Rr)&&(rn.__proto__=en),((rn.prototype=Object.create(en&&en.prototype)).constructor=rn).prototype.radarMajorGridLinePositions=function(){return this.getTickPositions(this.options.majorUnit)},rn.prototype.radarMinorGridLinePositions=function(){var t=this.options,e=0;return t.majorGridLines.visible&&(e=t.majorUnit),this.getTickPositions(t.minorUnit,e)},rn.prototype.axisType=function(){return en},rn);function rn(){en.apply(this,arguments)}O(t.prototype,i);let nn=t,sn=((on=Wr)&&(an.__proto__=on),((an.prototype=Object.create(on&&on.prototype)).constructor=an).prototype.radarMajorGridLinePositions=function(){var e=[];return this.traverseMajorTicksPositions(function(t){e.push(t)},this.options.majorGridLines),e},an.prototype.radarMinorGridLinePositions=function(){var e=[];return this.traverseMinorTicksPositions(function(t){e.push(t)},this.options.minorGridLines),e},an.prototype.axisType=function(){return on},an);function an(){on.apply(this,arguments)}O(sn.prototype,i);function ln(t){this.closed=t}let hn=sn;function pn(t){return t<=0?-1:1}ln.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},ln.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)},ln.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},ln.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)},ln.prototype.lineFunction=function(t,e){e=(e.y-t.y)/(e.x-t.x);return[t.y-e*t.x,e]},ln.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]?pn((i[n]-t[n])*(e[r]-t[r])):-pn((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]},ln.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)},ln.prototype.tangent=function(t,e,i,o){i=e[i]-t[i];return 0==i?0:(e[o]-t[o])/i},ln.prototype.isMonotonicByField=function(t,e,i,o){return i[o]>e[o]&&e[o]>t[o]||i[o]<e[o]&&e[o]<t[o]},ln.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)},ln.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)},ln.prototype.point=function(t,e,i,o){var r=new M.geometry.Point;return r[i]=t,r[o]=e,r},ln.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};function cn(t){this._axis=t,this.options=t.options}let un=ln,dn=(cn.prototype.value=function(t){var e=this._axis;return e.getCategory?e.getCategory(t):e.getValue(t)},cn.prototype.slot=function(t,e,i){return this._axis.slot(t,e,i=void 0===i?!0:i)},cn.prototype.range=function(){return this._axis.range()},cn.prototype.valueRange=function(){return this._axis.valueRange()},cn);function fn(t,e){for(var i=0;i<e.length;i++)if(e[i].options.name===t)return e[i].prepareUserOptions(),new dn(e[i])}function gn(t){this.visual=t.visual,this.chartsVisual=t.chartContainer.visual,this._pane=t}gn.prototype.findAxisByName=function(t){return fn(t,this._pane.axes)};let yn=gn,vn=function(t){this._plotArea=t,this.visual=t.visual,this.backgroundVisual=t._bgVisual};function mn(t){for(var e=t.length,i=0,o=0;o<e;o++)m(t[o])&&i++;return i}var xn={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=mn(t)?xn.sum(t):e},count:function(t){for(var e=t.length,i=0,o=0;o<e;o++)null!=t[o]&&i++;return i},avg:function(t){var e=mn(t),i=t[0];return i=0<e?xn.sum(t)/e:i},first:function(t){for(var e=t.length,i=0;i<e;i++){var o=t[i];if(null!=o)return o}return t[0]}};let bn=xn;function _n(t,e){return null===e?e:Ht(t)(e)}function wn(){this._valueFields={},this._otherFields={},this._nullValue={},this._undefinedValue={}}wn.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)}},wn.prototype.canonicalFields=function(t){return this.valueFields(t).concat(this.otherFields(t))},wn.prototype.valueFields=function(t){return this._valueFields[t.type]||[ut]},wn.prototype.otherFields=function(t){return this._otherFields[t.type]||[ut]},wn.prototype.bindPoint=function(t,e,i){var o,r,n,s=t.data,i=void 0!==i?i:s[e],s={valueFields:{value:i}},e=this.valueFields(t),a=this._otherFields[t.type];return null===i?o=this._nullValue[t.type]:void 0===i?o=this._undefinedValue[t.type]:Array.isArray(i)?(r=i.slice(e.length),o=this._bindFromArray(i,e),r=this._bindFromArray(r,a)):"object"==typeof i&&(n=this.sourceFields(t,e),t=this.sourceFields(t,a),o=this._bindFromObject(i,e,n),r=this._bindFromObject(i,a,t)),void 0!==o&&(1===e.length?s.valueFields.value=o[e[0]]:s.valueFields=o),s.fields=r||{},s},wn.prototype._makeValue=function(t,e){for(var i={},o=t.length,r=0;r<o;r++)i[t[r]]=e;return i},wn.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},wn.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]=_n(a,t))}return o},wn.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},wn.current=new wn;let kn=wn;function An(t,e,i){this.initGlobalRanges(t,e,i)}var Sn=/percent(?:\w*)\((\d+)\)/,Cn=new RegExp("^stddev(?:\\((\\d+(?:\\.\\d+)?)\\))?$");An.prototype.initGlobalRanges=function(t,e,i){var o,r,n,s,a=e.data,l=Cn.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}})},An.prototype.createValueGetter=function(t,e){var i,o=t.data,r=kn.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},An.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=Sn.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}},An.prototype.getStandardError=function(t,e){return this.getStandardDeviation(t,e,!0)/Math.sqrt(e.count)},An.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)},An.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 Tn=An;var Pn,Mn,t=M.support.browser||{},On=600,Ln="fadeIn",Bn=t.msie?.001:0,In="errorLow",En="errorHigh",Rn="zero",Vn="interpolate",zn="above",jn="below",Dn="smooth",Fn="step",Hn="area",Nn="bar",Un="boxPlot",Gn="bubble",Wn="bullet",Xn="candlestick",Yn="column",qn="donut",Zn="funnel",Qn="pyramid",Kn="heatmap",$n="horizontalWaterfall",Jn="line",ts="ohlc",es="pie",is="polarArea",os="polarLine",rs="polarScatter",ns="radarArea",ss="radarColumn",as="radarLine",ls="rangeArea",hs="rangeBar",ps="rangeColumn",cs="scatter",us="scatterLine",ds="verticalArea",fs="verticalBoxPlot",gs="verticalBullet",ys="verticalLine",vs="verticalRangeArea",ms="waterfall",xs=[Nn,Yn,ts,Xn,Un,fs,Wn,ps,hs,ms,$n],i="exponentialTrendline",t="linearTrendline",bs="logarithmicTrendline",_s="movingAverageTrendline",ws="polynomialTrendline",ks="powerTrendline",As=[i,t,bs,_s,ws,ks],Ss="legendItemClick",Cs="seriesClick",Ts="seriesHover",Ps="seriesOver",Ms="seriesLeave",Os="plotAreaHover",Ls="plotAreaLeave",Bs="drag",Is="dragEnd",Es="dragStart",Rs="zoomStart",Vs="zoom",zs="zoomEnd",js="selectStart",Ds="select",Fs="selectEnd",Hs="showTooltip",Ns="hideTooltip",i="graphics-symbol",t="k-chart-point",bs="Point",Us="log",_s="category",Gs="insideEnd",Ws="outsideEnd",Xs="wheel",ws="drilldown",ks="pattern",l=((Pn=o)&&(Ys.__proto__=Pn),((Ys.prototype=Object.create(Pn&&Pn.prototype)).constructor=Ys).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 B(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 B(r.x1,a,r.x2,s)),this.linePoints=e},Ys.prototype.getCapsWidth=function(t,e){e=e?t.width():t.height();return Math.min(Math.floor(e/2),4)||4},Ys.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()},Ys.prototype.createDefaultVisual=function(){var t=this.options,e=this.linePoints,i={stroke:{color:t.color,width:t.line.width,dashType:t.line.dashType}};Pn.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);bt(r),this.visual.append(r)}},Ys);function Ys(t,e,i,o,r,n){Pn.call(this,n),this.low=t,this.high=e,this.isVertical=i,this.chart=o,this.series=r}e(l,{animation:{type:Ln,delay:On},endCaps:!0,line:{width:2},zIndex:1});let qs=l,Zs=((Mn=qs)&&(Qs.__proto__=Mn),((Qs.prototype=Object.create(Mn&&Mn.prototype)).constructor=Qs).prototype.getAxis=function(){return this.chart.seriesValueAxis(this.series)},Qs);function Qs(){Mn.apply(this,arguments)}let Ks=Zs;function $s(t){for(var e=0;e<t.length;e++)if(k(t[e].zIndex))return!0}function Js(t,e){null!==e&&t.push(e)}function ta(t){return mn(t)===t.length}function ea(t,e,i){var e=e.visible;return k(e)?e:(e=t.pointVisibility)?e[i]:void 0}function ia(t){for(var e=t.data,i=[],o=0,r=0,n=0;n<e.length;n++){var s=kn.current.bindPoint(t,n),a=s.valueFields.value;m(a=wt(a)?parseFloat(a):a)?(s.visible=!1!==ea(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 oa(t){for(var e=t.length,i=0,o=0;o<e;o++)i=Math.max(i,t[o].data.length);return i}function ra(t,e){return t&&e?t.toLowerCase()===e.toLowerCase():t===e}var na=5;function sa(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||[],na<a)return null;for(r in t)!u(r,i.excluded)&&ze(t,r)&&(Tt(n=t[r])?(l=!0,o||(t[r]=b(n(e),s[r]))):Ot(n)&&(o||(i.defaults=s[r]),i.depth++,l=sa(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 la=new WeakMap;function ha(t,e,i){var o;return null===e||"object"!=typeof e?fr(i,t):((o=la.get(e))||(o=fr(i,t),la.set(e,o)),o)}function pa(t){t=t.overlay;return t&&t.gradient&&"none"!==t.gradient}function ca(t){return k(t)&&null!==t}function ua(t,e){t=t.type,e=e instanceof Date;return!t&&e||ra(t,K)}function da(t){return 1===t.length?t[0]:t}var fa=/area/i;function ga(t,e){var i,o=kn.current.bindPoint(t,null,e).valueFields;for(i in o)if(kt(o[i]))return!0}function ya(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=ga(h,(i=a(p)).item)),n<=p&&p<=s&&!e;);if(e)return i}function va(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||(fa.test(l.type)||l.stack?Rn:Vn))!==Vn?(p&&(n=o(h-1)),c&&(s=o(e+1))):(p&&(n=ga(t,(a=o(h-1)).item)?a:ya({start:h,dir:-1,min:0,max:i-1,getter:o,hasItem:r,series:t})),c&&(s=ga(t,(a=o(e+1)).item)?a:ya({start:e,dir:1,min:0,max:i-1,getter:o,hasItem:r,series:t}))),n&&(t._outOfRangeMinPoint=n),s)&&(t._outOfRangeMaxPoint=s)}function ma(i,t){return t.forEach(function(t){var e=t&&t.options,t=t&&(t.box||t.wrapperBox);e&&t&&!1!==e.noclip&&!1!==e.visible&&i.wrap(t)}),i}(xa=o)&&(wa.__proto__=xa),((wa.prototype=Object.create(xa&&xa.prototype)).constructor=wa).prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},wa.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},wa.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},wa.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=void 0!==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=void 0!==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]},wa.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||void 0!==(a=this.plotRange(a,0)[1])&&isFinite(a)&&(o=Math.max(o,a),i=Math.min(i,a))}}return{min:i,max:o}},wa.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)}},wa.prototype.addErrorBar=function(t,e,i){var o,r=t.value,n=t.series,s=t.seriesIx,a=t.options.errorBars,l=e.fields[In],e=e.fields[En];m(l)&&m(e)?o={low:l,high:e}:a&&void 0!==a.value&&(this.seriesErrorRanges=this.seriesErrorRanges||[],this.seriesErrorRanges[s]=this.seriesErrorRanges[s]||new Tn(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))},wa.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 Ks(s,a,o,this,n,r));t.errorBars=[e],t.append(e)},wa.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}},wa.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,void 0===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)},wa.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=(void 0===a&&(this._evalSeries[i]=a=sa(t,{},s,!0)),t);return a&&sa(i=O({},i),{value:e,category:r,index:o,series:n,dataItem:n.data[o]},s),i},wa.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))},wa.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)},wa.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},wa.prototype.valueSlot=function(t,e){return t.getSlot(e[0],e[1],!this.options.clip)},wa.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])},wa.prototype.limitPoint=function(t){var e=this.categoryAxis.limitSlot(t.box);e.equals(t.box)||t.reflow(e)},wa.prototype.aboveAxis=function(t,e){var i=this.categoryAxisCrossingValue(e),t=t.value;return e.options.reverse?t<i:i<=t},wa.prototype.categoryAxisCrossingValue=function(t){var e=this.categoryAxis,t=t.options;return[].concat(t.axisCrossingValues||t.axisCrossingValue)[e.axisIndex||0]||0},wa.prototype.reflowPoint=function(t,e){t.reflow(e)},wa.prototype.reflowCategories=function(){},wa.prototype.pointSlot=function(t,e){var i=this.options.invertAxes,o=i?e:t,i=i?t:e;return new B(o.x1,i.y1,o.x2,i.y2)},wa.prototype.categorySlot=function(t,e){return t.getSlot(e)},wa.prototype.traverseDataPoints=function(t){for(var e=this.options.series,i=oa(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=this.categoryAxis.categoryAt(n),a=0;a<o;a++){var l=e[a];t(this.plotArea.bindPoint(l,n),{category:s,categoryIx:n,categoriesCount:i,series:l,seriesIx:a})}for(var h=0;h<o;h++)this._outOfRangeCallback(e[h],"_outOfRangeMaxPoint",h,t)},wa.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}))},wa.prototype.formatPointValue=function(t,e){return null===t.value?"":this.chartService.format.auto(e,t.value)},wa.prototype.pointValue=function(t){return t.valueFields.value};var xa,ba,_a,l=wa;function wa(t,e){xa.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 ka=l,Aa={click:function(t,e){return t.trigger(Cs,this.eventArgs(e))},hover:function(t,e){return t.trigger(Ts,this.eventArgs(e))},over:function(t,e){return t.trigger(Ps,this.eventArgs(e))},out:function(t,e){return t.trigger(Ms,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}}},Sa=Aa,Ca={createNote:function(){var t=this.options.notes,e=this.noteText||t.label.text;!1!==t.visible&&null!=e&&(this.note=new ko({value:this.value,text:e,dataItem:this.dataItem,category:this.category,series:this.series},this.options.notes,this.owner.chartService),this.append(this.note))}},Ta=((ba=o)&&(h.__proto__=ba),((h.prototype=Object.create(ba&&ba.prototype)).constructor=h).prototype.initOptions=function(t){this.options=Object.assign({},t)},h.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))},h.prototype.createLabel=function(){var t=this.options.labels;t.visible&&(this.label=this.createLabelElement(t),this.append(this.label))},h.prototype.createLabelElement=function(t){return new uo(this.getLabelText(t),Object.assign({},{align:_,vAlign:_,zIndex:b(t.zIndex,this.series.zIndex)},t,{margin:Object.assign({},{left:5,right:5},t.margin)}),this.pointData())},h.prototype.getLabelText=function(t){var e=zt(t);return e?e(this.pointData()):t.format?this.formatValue(t.format):this.value},h.prototype.getAriaLabelText=function(){var t=this.options.labels,e=jt(t);return e?e(this.pointData()):this.getLabelText(t)},h.prototype.markerBorder=function(){var t=this.options.markers,e=t.background,t=Object.assign({},{color:this.color},t.border);return void 0===t.color&&(t.color=new M.Color(e).brightness(.8).toHex()),t},h.prototype.createVisual=function(){},h.prototype.createMarker=function(){var t=this.options.markers;return new Wi({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:b(t.zIndex,this.series.zIndex),animation:t.animation,visual:t.visual,accessibilityOptions:Object.assign({},{ariaLabel:this.getAriaLabelText(this.options.labels)},this.options.accessibility)},{dataItem:this.dataItem,value:this.value,series:this.series,category:this.category})},h.prototype.markerBox=function(){return this.marker||(this.marker=this.createMarker(),this.marker.reflow(this._childBox)),this.marker.box},h.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 B(o.x,o.y,o.x,o.y)),this.note.reflow(t))},h.prototype.reflowLabel=function(t){var e=this.options,i=this.label,e=e.labels.position;i&&(e=(e=e===zn?P:e)===jn?S:e,i.reflow(t),i.box.alignTo(this.markerBox(),e),i.reflow(i.box))},h.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 Wi({type:i.type,width:o,height:o,rotation:i.rotation,background:t.color||e,border:{color:t.border.color,width:t.border.width,opacity:b(t.border.opacity,1)},opacity:b(t.opacity,1)});return o.reflow(this._childBox),o.getElement()},h.prototype.highlightVisual=function(){return(this.marker||{}).visual},h.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}},h.prototype.createFocusHighlight=function(){var t=this.options.markers,e=this.options.focusHighlight,i=t.size+(t.border.width||0),i=new Wi({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()},h.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,P),{point:new A(o,t),align:{horizontal:e,vertical:i}}},h.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},h.prototype.overlapsBox=function(t){return this.markerBox().overlaps(t)},h.prototype.clipElements=function(){this.options.visible=!1},h.prototype.unclipElements=function(){this.label&&(this.label.options.noclip=!0),this.note&&(this.note.options.noclip=!0)},h.prototype.unclipBox=function(){return ma(this.markerBox().clone(),[this.label,this.note])},h.prototype.labelBox=function(){return this.label?this.label.box:new B},h.prototype.noteBox=function(){return this.note?this.note.box:new B},h.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,stackValue:this.stackValue,series:this.series}},h.prototype.focusVisual=function(){this.marker&&(this.marker.visual&&this.marker.visual.options.set("id",this._id),this.toggleFocusHighlight(!0))},h.prototype.clearFocusFromVisual=function(){this.marker&&(this.marker.visual&&this.marker.visual.options.set("id",""),this.toggleFocusHighlight(!1))},h.prototype.getIndex=function(){return void 0!==this.categoryIx?this.categoryIx:this.pointIx},h);function h(t,e){ba.call(this,e),this.value=t,this.aboveAxis=b(this.options.aboveAxis,!0),this.tooltipTracking=!0,this._id=Ge()}Ta.prototype.defaults={vertical:!0,markers:{visible:!0,background:a,size:8,type:q,border:{width:2},opacity:1},labels:{visible:!1,position:zn,margin:w(3),padding:w(4),animation:{type:Ln,delay:On}},notes:{label:{}},highlight:{markers:{border:{color:"#fff",width:2}},zIndex:100},errorBars:{line:{width:1}},accessibility:{tabIndex:0,role:i,className:t,ariaRoleDescription:bs}},O(Ta.prototype,Sa),O(Ta.prototype,Ca);let Pa=Ta,Ma=((_a=o)&&(Oa.__proto__=_a),((Oa.prototype=Object.create(_a&&_a.prototype)).constructor=Oa).prototype.points=function(){return this.toGeometryPoints(this.linePoints)},Oa.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},Oa.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()},Oa.prototype.segmentVisual=function(){var t=this.options,e=this.series,i=e.color,o=e._defaults,o=(Tt(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},Oa.prototype.aliasFor=function(t,e){return this.parent.getNearestPoint(e.x,e.y,this.seriesIx)},Oa);function Oa(t,e,i){_a.call(this),this.linePoints=t,this.series=e,this.seriesIx=i}e(Ma,{closed:!1});let La=Ma,Ba={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=Ia(t[0],r,s,n,a),h=[l],p=1;p<t.length;p++){var c,u=Ia(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(Ia(he(t),r,s,n,e?1:2)),h}};function Ia(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 Ea,Ra,l=Ba,Va=((Ea=La)&&(za.__proto__=Ea),((za.prototype=Object.create(Ea&&Ea.prototype)).constructor=za).prototype.points=function(){return this.calculateStepPoints(this.linePoints)},za);function za(){Ea.apply(this,arguments)}O(Va.prototype,l);let ja=Va,Da=((Ra=La)&&(Fa.__proto__=Ra),((Fa.prototype=Object.create(Ra&&Ra.prototype)).constructor=Fa).prototype.segmentVisual=function(){var t=this.series,e=t._defaults,i=t.color,e=(Tt(i)&&e&&(i=e.color),new un(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},Fa);function Fa(){Ra.apply(this,arguments)}let Ha=Da,Na={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)!==Vn&&(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?Rn:t||Vn},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&&null!=h.value&&!1!==h.visible&&(l=h.box.center().distanceTo(r))<s&&(o=h,s=l)}return o}};var Ua,Ga,Wa,Xa,Ya,qa,Za,Qa,Va=Na,Ka=((Ua=M.drawing.Animation)&&($a.__proto__=Ua),(($a.prototype=Object.create(Ua&&Ua.prototype)).constructor=$a).prototype.setup=function(){this._setEnd(this.options.box.x1)},$a.prototype.step=function(t){var e=this.options.box;this._setEnd(Xt(e.x1,e.x2,t))},$a.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)},$a);function $a(){Ua.apply(this,arguments)}e(Ka,{duration:On}),M.drawing.AnimationFactory.current.register("clip",Ka);let Ja=Ka,tl={createAnimation:function(){var t,e=this.getRoot(),i=(e&&e.options||{}).transitions;e&&!1!==i&&(e=this.parent&&this.parent.clipBox||e.size(),t=M.drawing.Path.fromRect(e.toRect()),i=i&&!0!==i?i.loading:i,this.visual.clip(t),this.animation=new Ja(t,Object.assign({},{box:e},i)),$s(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)}}},el=((Ga=ka)&&(il.__proto__=Ga),((il.prototype=Object.create(Ga&&Ga.prototype)).constructor=il).prototype.render=function(){Ga.prototype.render.call(this),this.updateStackRange(),this.renderSegments()},il.prototype.pointType=function(){return Pa},il.prototype.createPoint=function(t,e){var i=e.series,o=e.seriesIx,r=this.seriesMissingValues(i),n=t.valueFields.value;if(null==n){if(r!==Rn)return null;n=0}r=this.pointOptions(i,o),r=this.evalPointOptions(r,n,e),o=t.fields.color||i.color,Tt(i.color)&&(o=r.color),e=new Pa(n,r);return e.color=o,this.append(e),e},il.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]},il.prototype.createSegment=function(t,e,i){var o=e.style;return new(o===Fn?ja:o===Dn?Ha:La)(t,e,i)},il.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)},il.prototype.supportsPointInactiveOpacity=function(){return!1},il);function il(){Ga.apply(this,arguments)}O(el.prototype,Va,tl);let ol=el,rl=((Wa=La)&&(nl.__proto__=Wa),((nl.prototype=Object.create(Wa&&Wa.prototype)).constructor=nl).prototype.createVisual=function(){var t=this.series,e=t._defaults,i=t.line||{},o=t.color;Tt(o)&&e&&(o=e.color),this.visual=new M.drawing.Group({zIndex:t.zIndex}),this.createFill({fill:ji(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)})},nl.prototype.strokeSegments=function(){return this._strokeSegments||(this._strokeSegments=this.createStrokeSegments())},nl.prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.points())},nl.prototype.stackSegments=function(){return(this.prevSegment||this).createStackSegments(this.stackPoints)},nl.prototype.createStackSegments=function(t){return this.segmentsFromPoints(this.toGeometryPoints(t)).reverse()},nl.prototype.segmentsFromPoints=function(t){return t.map(function(t){return new M.geometry.Segment(t)})},nl.prototype.createStroke=function(t){t=new M.drawing.Path(t);t.segments.push.apply(t.segments,this.strokeSegments()),this.visual.append(t)},nl.prototype.hasStackSegment=function(){return this.prevSegment||this.stackPoints&&this.stackPoints.length},nl.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)},nl.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)},nl);function nl(t,e,i,o,r){Wa.call(this,t,e,i),this.prevSegment=o,this.stackPoints=r}let sl=rl,al=((Xa=sl)&&(ll.__proto__=Xa),((ll.prototype=Object.create(Xa&&Xa.prototype)).constructor=ll).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.calculateStepPoints(this.linePoints))},ll.prototype.createStackSegments=function(t){return this.segmentsFromPoints(this.calculateStepPoints(t)).reverse()},ll);function ll(){Xa.apply(this,arguments)}O(al.prototype,l);let hl=al,pl=((Ya=sl)&&(cl.__proto__=Ya),((cl.prototype=Object.create(Ya&&Ya.prototype)).constructor=cl).prototype.createStrokeSegments=function(){var t=new un(this.options.closed),e=this.points();return t.process(e)},cl.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},cl);function cl(){Ya.apply(this,arguments)}let ul=pl,dl=((qa=ol)&&(fl.__proto__=qa),((fl.prototype=Object.create(qa&&qa.prototype)).constructor=fl).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===Fn?hl:a===Dn?ul:sl)(t,e,i,r,n)},fl.prototype.reflow=function(t){qa.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)}},fl.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!==Fn&&r<l&&!o[c][p-1]&&a.push(this._previousSegmentPoint(l,p,p-1,c)),a.push(u),i!==Fn&&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},fl.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},fl.prototype._createGapStackPoint=function(t){var e=this.pointOptions({},0),e=new Pa(0,e);return e.categoryIx=t,e.series={},e},fl.prototype.seriesMissingValues=function(t){return t.missingValues||Rn},fl.prototype.supportsPointInactiveOpacity=function(){return!1},fl);function fl(){qa.apply(this,arguments)}function gl(){this.axisRanges={}}let yl=dl,vl=(gl.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)}},gl.prototype.reset=function(t){this.axisRanges[t]=void 0},gl.prototype.query=function(t){return this.axisRanges[t]},gl),ml=((Za=o)&&(xl.__proto__=Za),((xl.prototype=Object.create(Za&&Za.prototype)).constructor=xl).prototype.createVisual=function(){this.textBox.options.noclip=this.options.noclip},xl.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?_:C,s.vAlign=o?P:_,i.position===Gs?o?(s.vAlign=P,!r&&a.height()<t.height()&&(s.vAlign=S)):s.align=r?T:C:i.position===_?(s.vAlign=_,s.align=_):"insideBase"===i.position?o?s.vAlign=r?S:P:s.align=r?C:T:i.position===Ws&&(h=o?r?(e=(a.width()-t.width()-l.left-l.right)/2,new B(t.x1-e,t.y1-a.height(),t.x2+e,t.y1)):new B(t.x1,t.y2,t.x2,t.y2+a.height()):(s.align=_,r?new B(t.x2,t.y1,t.x2+a.width(),t.y2):new B(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)},xl.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))},xl);function xl(t,e,i){Za.call(this,e),this.textBox=new uo(t,this.options,i),this.append(this.textBox)}e(ml,{position:Ws,margin:w(3),padding:w(4),color:Y,background:"",border:{width:1,color:""},aboveAxis:!0,vertical:!1,animation:{type:Ln,delay:On},zIndex:2});let bl=ml,_l={addAccessibilityAttributesToVisual:function(){this._id=this._id||Ge();var t=Object.assign({},{ariaLabel:this.getAriaLabelText()},this.options.accessibility);Ni(this.visual,t)},getAriaLabelText:function(){var t=this.options.labels,e=jt(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)}},wl=((Qa=o)&&(kl.__proto__=Qa),((kl.prototype=Object.create(Qa&&Qa.prototype)).constructor=kl).prototype.render=function(){this._rendered||(this._rendered=!0,this.createLabel(),this.createNote(),this.errorBar&&this.append(this.errorBar))},kl.prototype.createLabel=function(){var t=this.options.labels;t.visible&&(this.label=this.createLabelElement(t),this.append(this.label))},kl.prototype.createLabelElement=function(t){return new bl(this.getLabelText(t),O({vertical:this.options.vertical},t),this.pointData())},kl.prototype.getLabelText=function(t){var e=zt(t);return e?e(this.pointData()):this.formatValue(t.format)},kl.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},kl.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)},kl.prototype.createVisual=function(){var e=this,t=this.box,i=this.options,o=i.visual;!1!==this.visible&&(Qa.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))},kl.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:ji(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)&&(bt(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))},kl.prototype.createHighlight=function(t){return bt(M.drawing.Path.fromRect(this.box.toRect(),t))},kl.prototype.highlightVisual=function(){return this.rectVisual},kl.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this.rectVisual}},kl.prototype.createFocusHighlight=function(t){var e=this.options.focusHighlight.border.width;return bt(M.drawing.Path.fromRect(this.box.pad(e/2).toRect(),t))},kl.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()},kl.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=P;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=T,i):e,Math.max(n.y1,a.y1)-5):(s?t=i+5:(t=e-5,l=T),Math.max(n.y1,a.y1))),{point:new A(t,o),align:{horizontal:l,vertical:h}}},kl.prototype.overlapsBox=function(t){return this.box.overlaps(t)},kl.prototype.unclipBox=function(){var t=this.label&&this.label.textBox;return ma(this.box.clone(),[t,this.note])},kl.prototype.labelBox=function(){var t=this.label&&this.label.textBox;return t?t.box:new B},kl.prototype.noteBox=function(){return this.note?this.note.box:new B},kl.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}},kl.prototype.getIndex=function(){return this.categoryIx},kl);function kl(t,e){Qa.call(this),this.options=e,this.color=e.color||a,this.aboveAxis=b(this.options.aboveAxis,!0),this.value=t}O(wl.prototype,Sa),O(wl.prototype,Ca),O(wl.prototype,_l),wl.prototype.defaults={border:{width:1},vertical:!0,overlay:{gradient:"glass"},labels:{visible:!1,format:"{0}"},opacity:1,notes:{label:{}},accessibility:{role:i,className:t,ariaRoleDescription:bs}};let Al=wl;function Sl(t,e){t.forEach(e)}function Cl(t,e){for(var i=t.length,o=i-1;0<=o;o--)e(t[o],o-i-1)}(Tl=o)&&(Nl.__proto__=Tl),((Nl.prototype=Object.create(Tl&&Tl.prototype)).constructor=Nl).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 Tl,Pl,Ml,Ol,Ll,Bl,Il,El,Rl,Vl,zl,jl,Dl,Fl,Hl,Ka=Nl;function Nl(t){Tl.call(this,t),this.forEach=t.rtl?Cl:Sl}e(Ka,{vertical:!1,gap:0,spacing:0});let Ul=Ka,Gl=((Pl=o)&&(Wl.__proto__=Pl),((Wl.prototype=Object.create(Pl&&Pl.prototype)).constructor=Wl).prototype.reflow=function(t){for(var e=this.options.vertical?y:v,i=this.children,o=i.length,r=this.box=new B,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))}},Wl);function Wl(){Pl.apply(this,arguments)}e(Gl,{vertical:!0});let Xl=Gl,Yl=((Ml=ka)&&(ql.__proto__=Ml),((ql.prototype=Object.create(Ml&&Ml.prototype)).constructor=ql).prototype.render=function(){Ml.prototype.render.call(this),this.updateStackRange()},ql.prototype.pointType=function(){return Al},ql.prototype.clusterType=function(){return Ul},ql.prototype.stackType=function(){return Xl},ql.prototype.stackLimits=function(t,e){return Ml.prototype.stackLimits.call(this,t,e)},ql.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===Ws&&(h.position=Gs),r.isStacked=a,t.fields.color||o.color),t=(l<0&&r.negativeColor&&(h=r.negativeColor),r=this.evalPointOptions(r,l,e),Tt(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},ql.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},ql.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},ql.prototype.reflowCategories=function(t){for(var e=this.children,i=e.length,o=0;o<i;o++)e[o].reflow(t[o])},ql.prototype.createAnimation=function(){this._setAnimationOptions(),Ml.prototype.createAnimation.call(this),$s(this.options.series)&&this._setChildrenAnimation()},ql.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())}},ql.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},ql);function ql(){Ml.apply(this,arguments)}e(Yl,{animation:{type:Nn}});let Zl=Yl,Ql=((Ol=o)&&(Kl.__proto__=Ol),((Kl.prototype=Object.create(Ol&&Ol.prototype)).constructor=Kl).prototype.getLabelText=function(t){return this.formatValue(t.format)},Kl.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()},Kl.prototype.reflowNote=function(){this.note&&this.note.reflow(this.box)},Kl.prototype.createVisual=function(){Ol.prototype.createVisual.call(this),this.addAccessibilityAttributesToVisual(),this._mainVisual=this.mainVisual(this.options),this.visual.append(this._mainVisual),this.createOverlay()},Kl.prototype.mainVisual=function(t){var e=new M.drawing.Group;return this.createBody(e,t),this.createLines(e,t),e},Kl.prototype.createBody=function(t,e){var i=M.drawing.Path.fromRect(this.realBody.toRect(),{fill:ji(e.pattern,{color:this.color,opacity:e.opacity}),stroke:null});0<e.border.width&&i.options.set("stroke",{color:this.getBorderColor(e),width:e.border.width,dashType:e.border.dashType,opacity:b(e.border.opacity,e.opacity)}),bt(i),t.append(i),pa(e)&&t.append(this.createGradientOverlay(i,{baseColor:this.color},O({end:e.vertical?void 0:[0,1]},e.overlay)))},Kl.prototype.createLines=function(t,e){this.drawLines(t,e,this.lines,e.line)},Kl.prototype.drawLines=function(t,e,i,o){if(i)for(var r={stroke:{color:o.color||this.color,opacity:b(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);bt(s),t.append(s)}},Kl.prototype.getBorderColor=function(t){t=t.border.color;return t=k(t)?t:new M.Color(this.color).brightness(this.options.border._brightness).toHex()},Kl.prototype.createOverlay=function(){var t=M.drawing.Path.fromRect(this.box.toRect(),{fill:{color:a,opacity:0},stroke:null});this.visual.append(t)},Kl.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)}},t)));return this.color=e,t},Kl.prototype.highlightVisual=function(){return this._mainVisual},Kl.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this._mainVisual}},Kl.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:P}}},Kl.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Kl.prototype.overlapsBox=function(t){return this.box.overlaps(t)},Kl.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}},Kl.prototype.getIndex=function(){return this.categoryIx},Kl);function Kl(t,e){Ol.call(this,e),this.value=t}Ql.prototype.createFocusHighlight=Al.prototype.createFocusHighlight,e(Ql,{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:i,className:t,ariaRoleDescription:bs}}),O(Ql.prototype,Sa),O(Ql.prototype,Ca),O(Ql.prototype,_l);let $l=Ql,Jl=((Ll=ka)&&(th.__proto__=Ll),((th.prototype=Object.create(Ll&&Ll.prototype)).constructor=th).prototype.reflowCategories=function(t){for(var e=this.children,i=e.length,o=0;o<i;o++)e[o].reflow(t[o])},th.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=ta(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 Ul({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)},th.prototype.pointType=function(){return $l},th.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!==Xn&&i.type!==ts||r.open>r.close&&(s=t.fields.downColor||i.downColor||i.color),Tt(i.color)&&(s=n.color),n.vertical=!this.options.invertAxes,new o(r,n));return e.color=s,e},th.prototype.splitValue=function(t){return[t.low,t.open,t.close,t.high]},th.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]))}},th.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)},th.prototype.animationPoints=function(){return this.points},th);function th(){Ll.apply(this,arguments)}O(Jl.prototype,tl);let eh=Jl,ih=((Bl=$l)&&(oh.__proto__=Bl),((oh.prototype=Object.create(Bl&&Bl.prototype)).constructor=oh).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()},oh.prototype.reflowBoxSlot=function(t){this.boxSlot.x1=t.x1,this.boxSlot.x2=t.x2},oh.prototype.reflowWhiskerSlot=function(t){this.whiskerSlot.x1=t.x1,this.whiskerSlot.x2=t.x2},oh.prototype.calcMeanPoints=function(t,e){return[[[t.x1,e.y1],[t.x2,e.y1]]]},oh.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]]]},oh.prototype.calcMedianPoints=function(t,e){return[[[t.x1,e.y1],[t.x2,e.y1]]]},oh.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 Wi({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},oh.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)}},oh.prototype.mainVisual=function(t){for(var e=Bl.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},oh.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)},oh.prototype.getBorderColor=function(){return(this.options.border||{}).color?this.options.border.color:this.color||Bl.prototype.getBorderColor.call(this)},oh);function oh(t,e){Bl.call(this,t,e),this.createNote()}e(ih,{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(ih.prototype,Sa);let rh=ih,nh=((Il=rh)&&(sh.__proto__=Il),((sh.prototype=Object.create(Il&&Il.prototype)).constructor=sh).prototype.reflowBoxSlot=function(t){this.boxSlot.y1=t.y1,this.boxSlot.y2=t.y2},sh.prototype.reflowWhiskerSlot=function(t){this.whiskerSlot.y1=t.y1,this.whiskerSlot.y2=t.y2},sh.prototype.calcMeanPoints=function(t,e){return[[[e.x1,t.y1],[e.x1,t.y2]]]},sh.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]]]},sh.prototype.calcMedianPoints=function(t,e){return[[[e.x1,t.y1],[e.x1,t.y2]]]},sh);function sh(){Il.apply(this,arguments)}let ah=nh,lh=((El=eh)&&(hh.__proto__=El),((hh.prototype=Object.create(El&&El.prototype)).constructor=hh).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=ta(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 Ul({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)},hh.prototype.pointType=function(){return this.options.invertAxes?ah:rh},hh.prototype.splitValue=function(t){return[t.lower,t.q1,t.median,t.q3,t.upper]},hh.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]))}},hh.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)},hh.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},hh.prototype.supportsPointInactiveOpacity=function(){return!1},hh);function hh(){El.apply(this,arguments)}let ph=lh,ch=((Rl=qs)&&(uh.__proto__=Rl),((uh.prototype=Object.create(Rl&&Rl.prototype)).constructor=uh).prototype.getAxis=function(){var t=this.chart.seriesAxes(this.series);return this.isVertical?t.y:t.x},uh);function uh(){Rl.apply(this,arguments)}let dh=ch,fh=((Vl=o)&&(gh.__proto__=Vl),((gh.prototype=Object.create(Vl&&Vl.prototype)).constructor=gh).prototype._initFields=function(){this.xAxisRanges={},this.yAxisRanges={},this.points=[],this.seriesPoints=[],this.seriesOptions=[],this._evalSeries=[]},gh.prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},gh.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 Tn(l[n],a,e),o=this.seriesErrorRanges[e][s].getErrorRange(r,l[n])),o)&&this.addPointErrorBar(o,t,e)},gh.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 dh(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)},gh.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=ca(o)&&ca(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)},gh.prototype.seriesMissingValues=function(t){return t.missingValues},gh.prototype.createMissingValue=function(){},gh.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];ca(r)&&(n=this.xAxisRanges[o]=n||{min:rt,max:nt},wt(r)&&(r=fr(i,r)),n.min=Math.min(n.min,r),n.max=Math.max(n.max,r)),ca(t)&&(s=this.yAxisRanges[e]=s||{min:rt,max:nt},wt(t)&&(t=fr(i,t)),s.min=Math.min(s.min,t),s.max=Math.max(s.max,t))},gh.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=sa(t,{},n,!0)),t);return s&&sa(r=O({},t),{value:e,series:o,dataItem:i.dataItem},n),r},gh.prototype.pointType=function(){return Pa},gh.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},gh.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=(Tt(i.color)&&(r=o.color),new Pa(t,o));return e.color=r,this.append(e),e},gh.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)},gh.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},gh.prototype.pointSlot=function(t,e){return new B(t.x1,e.y1,t.x2,e.y2)},gh.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))}}},gh.prototype.formatPointValue=function(t,e){t=t.value;return this.chartService.format.auto(e,t.x,t.y)},gh.prototype.animationPoints=function(){for(var t=this.points,e=[],i=0;i<t.length;i++)e.push((t[i]||{}).marker);return e},gh);function gh(t,e){Vl.call(this,e),this.plotArea=t,this.chartService=t.chartService,this._initFields(),this.render()}e(fh,{series:[],tooltip:{format:"{0}, {1}"},labels:{format:"{0}, {1}"},clip:!0}),O(fh.prototype,tl);let yh=fh,vh=((zl=Pa)&&(mh.__proto__=zl),((mh.prototype=Object.create(zl&&zl.prototype)).constructor=mh).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,dashType:e.dashType},fill:ji(this.options.pattern,{color:i.background,opacity:t.opacity})});return n.append(s,o),n},mh.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)},mh);function mh(t,e){zl.call(this,t,e),this.category=t.category}vh.prototype.defaults=O({},vh.prototype.defaults,{labels:{position:_},highlight:{opacity:1,border:{color:"#fff",width:2,opacity:1}}}),vh.prototype.defaults.highlight.zIndex=void 0;let xh=vh,bh=((jl=yh)&&(_h.__proto__=jl),((_h.prototype=Object.create(jl&&jl.prototype)).constructor=_h).prototype._initFields=function(){this._maxSize=nt,jl.prototype._initFields.call(this)},_h.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)),jl.prototype.addValue.call(this,t,e)):(this.points.push(null),this.seriesPoints[e.seriesIx].push(null))},_h.prototype.reflow=function(t){this.updateBubblesSize(t),jl.prototype.reflow.call(this,t)},_h.prototype.pointType=function(){return xh},_h.prototype.createPoint=function(t,e){var i=e.series,o=i.data.length,o=e.pointIx*(On/o),r={delay:o,duration:On-o,type:Gn},n=e.color||i.color,o=(t.size<0&&i.negativeValues.visible&&(n=b(i.negativeValues.color,n)),O({labels:{animation:{delay:o,duration:On-o}}},this.pointOptions(i,e.seriesIx),{markers:{type:q,border:i.border,opacity:i.opacity,animation:r}})),o=this.evalPointOptions(o,t,e),r=(Tt(i.color)&&(n=o.color),o.markers.background=n,new xh(t,o));return r.color=n,this.append(r),r},_h.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=b(d.options.zIndex,0)+(1-c/a),O(d.options,{zIndex:u,markers:{size:2*c,zIndex:u},labels:{zIndex:u+1}}))}},_h.prototype.formatPointValue=function(t,e){var i=t.value;return this.chartService.format.auto(e,i.x,i.y,i.size,t.category)},_h.prototype.createAnimation=function(){},_h.prototype.createVisual=function(){},_h);function _h(){jl.apply(this,arguments)}e(bh,{tooltip:{format:"{3}"},labels:{format:"{3}"}});let wh=bh,kh=((Dl=Wi)&&(Ah.__proto__=Dl),(Ah.prototype=Object.create(Dl&&Dl.prototype)).constructor=Ah);function Ah(){Dl.apply(this,arguments)}O(kh.prototype,Sa);let Sh=kh,Ch=((Fl=o)&&(Th.__proto__=Fl),((Th.prototype=Object.create(Fl&&Fl.prototype)).constructor=Th).prototype.render=function(){var t=this.options;this._rendered||(this._rendered=!0,k(this.value.target)&&(this.target=new Sh({type:t.target.shape,background:t.target.color||this.color,opacity:t.opacity,zIndex:t.zIndex,border:t.target.border,vAlign:P,align:T}),this.target.value=this.value,this.target.dataItem=this.dataItem,this.target.series=this.series,this.append(this.target)),this.createLabel(),this.createNote())},Th.prototype.createLabel=function(){var t=this.options.labels;t.visible&&(this.label=this.createLabelElement(t),this.append(this.label))},Th.prototype.createLabelElement=function(t){return new bl(this.getLabelText(t),t,this.pointData())},Th.prototype.getLabelText=function(t){var e=zt(t);return e?e(this.pointData()):this.formatValue(t.format)},Th.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 B(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},Th.prototype.createVisual=function(){Fl.prototype.createVisual.call(this),this.addAccessibilityAttributesToVisual();var t=this.options,e=M.drawing.Path.fromRect(this.box.toRect(),{fill:ji(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:b(t.border.opacity,t.opacity)}),bt(this.bodyVisual=e),this.visual.append(e)},Th.prototype.createAnimation=function(){this.bodyVisual&&(this.animation=M.drawing.Animation.create(this.bodyVisual,this.options.animation))},Th.prototype.createHighlight=function(t){return M.drawing.Path.fromRect(this.box.toRect(),t)},Th.prototype.highlightVisual=function(){return this.bodyVisual},Th.prototype.highlightVisualArgs=function(){return{rect:this.box.toRect(),visual:this.bodyVisual,options:this.options}},Th.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Th.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,series:this.series}},Th.prototype.overlapsBox=function(t){return this.box.overlaps(t)},Th.prototype.getIndex=function(){return this.categoryIx},Th);function Th(t,e){Fl.call(this,e),this.aboveAxis=this.options.aboveAxis,this.color=e.color||a,this.value=t}Ch.prototype.tooltipAnchor=Al.prototype.tooltipAnchor,Ch.prototype.createFocusHighlight=Al.prototype.createFocusHighlight,e(Ch,{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:i,className:t,ariaRoleDescription:bs}}),O(Ch.prototype,Sa),O(Ch.prototype,Ca),O(Ch.prototype,_l);let Ph=Ch,Mh=((Hl=ka)&&(Oh.__proto__=Hl),((Oh.prototype=Object.create(Hl&&Hl.prototype)).constructor=Oh).prototype.reflowCategories=function(t){for(var e=this.children,i=e.length,o=0;o<i;o++)e[o].reflow(t[o])},Oh.prototype.plotRange=function(t){var e=t.series,e=this.seriesValueAxis(e),e=this.categoryAxisCrossingValue(e);return[e,t.value.current||e]},Oh.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=(Tt(o.color)&&(t=a.color),new Ph(s,a)),o=(e.color=t,n[i]);return o||(o=new Ul({vertical:r.invertAxes,gap:r.gap,spacing:r.spacing,rtl:!r.invertAxes&&(this.chartService||{}).rtl}),this.append(o)),o.append(e),e},Oh.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))},Oh.prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value.current,t.value.target)},Oh.prototype.pointValue=function(t){return t.valueFields.current},Oh.prototype.aboveAxis=function(t){return 0<t.value.current},Oh.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()}},Oh);function Oh(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])}Hl.call(this,t,e)}Mh.prototype._setAnimationOptions=Zl.prototype._setAnimationOptions,e(Mh,{animation:{type:Nn}});function Lh(t,e){this.chartService=t,this.options=O({},this.options,e)}let Bh=Mh;Lh.prototype.getStyle=function(t,e){var i=t.background,o=t.border.color,e=(e&&(e=e.color||e.options.color,i=b(i,e),o=b(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)}},Lh.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(Hs,t),this.visible=!0)},Lh.prototype.hide=function(){this.chartService&&this.chartService.notify(Ns),this.visible=!1},Lh.prototype.destroy=function(){delete this.chartService},e(Lh,{border:{width:1},opacity:1});var Ih,Eh,Rh,Ka=Lh,Vh=((Ih=Ka)&&(zh.__proto__=Ih),((zh.prototype=Object.create(Ih&&Ih.prototype)).constructor=zh).prototype.initAxisName=function(){var t=this.crosshair.axis,t=t.plotArea.categoryAxis?t.getCategory?"categoryAxis":"valueAxis":t.options.vertical?"yAxis":"xAxis";this.axisName=t},zh.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)},zh.prototype.hide=function(){this.chartService.notify(Ns,{crosshair:this.crosshair,axisName:this.axisName,axisIndex:this.crosshair.axis.axisIndex})},zh.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=_,r===S?(e=P,i.bottomLeft().translate(0,o)):(e=S,i.topLeft().translate(0,-o))):(e=_,r===C?(t=T,i.topLeft().translate(-o,0)):(t=C,i.topRight().translate(o,0)));return{point:n,align:{horizontal:t,vertical:e}}},zh);function zh(t,e,i){Ih.call(this,t,i),this.crosshair=e,this.formatService=t.format,this.initAxisName()}e(Vh,{padding:10});let jh=Vh,Dh=((Eh=o)&&(Fh.__proto__=Eh),((Fh.prototype=Object.create(Eh&&Eh.prototype)).constructor=Fh).prototype.showAt=function(t){this.point=t,this.moveLine(),this.line.visible(!0),this.tooltip&&this.tooltip.showAt(t)},Fh.prototype.hide=function(){this.line.visible(!1),this.tooltip&&this.tooltip.hide()},Fh.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)},Fh.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},Fh.prototype.createVisual=function(){Eh.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)},Fh.prototype.destroy=function(){this.tooltip&&this.tooltip.destroy(),Eh.prototype.destroy.call(this)},Fh);function Fh(t,e,i){Eh.call(this,i),this.axis=e,this.stickyMode=e instanceof mr;i=this.options.tooltip;i.visible&&(this.tooltip=new jh(t,this,O({},i,{stickyMode:this.stickyMode})))}e(Dh,{color:Y,width:2,zIndex:-1,tooltip:{visible:!1}});let Hh=Dh,Nh=((Rh=o)&&(Uh.__proto__=Rh),((Uh.prototype=Object.create(Rh&&Rh.prototype)).constructor=Uh).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},Uh.prototype._clipBox=function(){return this.pane.chartsBox()},Uh.prototype.createVisual=function(){var t;this.visual=new M.drawing.Group({zIndex:0}),this.shouldClip()&&(t=(this.clipBox=this._clipBox()).toRect(),bt(t=M.drawing.Path.fromRect(t)),this.visual.clip(t),this.unclipLabels())},Uh.prototype.stackRoot=function(){return this},Uh.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)))}},Uh.prototype.unclipBox=function(){for(var t=this.children,e=this._clipBox(),i=e.clone(),o=0;o<t.length;o++)for(var r=t[o].points||[],n=r.length,s=0;s<n;s++){var a,l,h,p,c=r[s];c&&c.unclipBox&&c.overlapsBox&&!1!==c.visible&&(c.overlapsBox(e)?(a=c.unclipBox(),i.overlaps(a)&&(p=c.labelBox?c.labelBox():new B,l=c.noteBox?c.noteBox():new B,h=Math.max(p.height(),l.height()),p=Math.max(p.width(),l.width()),i.wrapLimit(a,p,h))):c.clipElements&&c.clipElements())}return i},Uh.prototype.destroy=function(){Rh.prototype.destroy.call(this),delete this.parent},Uh);function Uh(t,e){Rh.call(this,t),this.pane=e}Nh.prototype.isStackRoot=!0;let Gh=Nh;(Wh=Hi)&&(Yh.__proto__=Wh),((Yh.prototype=Object.create(Wh&&Wh.prototype)).constructor=Yh).prototype.createTitle=function(){var t=this.options.title;Ot(t)&&(t=O({},t,{align:t.position,position:P})),this.title=vo.buildTitle(t,Yh.prototype.options.title),this.title&&this.append(this.title)},Yh.prototype.appendAxis=function(t){this.content.append(t),this.axes.push(t),t.pane=this},Yh.prototype.appendAxisAt=function(t,e){this.content.append(t),this.axes.splice(e,0,t),t.pane=this},Yh.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},Yh.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=[]},Yh.prototype.reflow=function(t){var e;he(this.children)===this.content&&(e=this.children.pop()),Wh.prototype.reflow.call(this,t),e&&this.children.push(e),this.title&&(this.contentBox.y1+=this.title.box.height())},Yh.prototype.unclipBox=function(){return this.chartContainer.unclipBox()},Yh.prototype.visualStyle=function(){var t=Wh.prototype.visualStyle.call(this);return t.zIndex=-10,t},Yh.prototype.renderComplete=function(){this.options.visible&&this.createGridLines()},Yh.prototype.stackRoot=function(){return this},Yh.prototype.clipRoot=function(){return this},Yh.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))},Yh.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()},Yh.prototype.chartsBox=function(){for(var t=this.axes,e=t.length,i=new B,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},Yh.prototype.clipBox=function(){return this.chartContainer.clipBox},Yh.prototype.notifyRender=function(){var t=this.getService();t&&t.notify("paneRender",{pane:new yn(this),index:this.paneIndex,name:this.options.name})};var Wh,Vh=Yh,Xh=1;function Yh(t){Wh.call(this,t),this.id="pane"+Xh++,this.createTitle(),this.content=new o,this.chartContainer=new Gh({},this),this.append(this.content),this.axes=[],this.charts=[]}Vh.prototype.isStackRoot=!0,e(Vh,{zIndex:-1,shrinkToFit:!0,title:{align:C},visible:!0});let qh=Vh;function Zh(t){return!1!==t.options.visible}(Qh=o)&&(p.__proto__=Qh),((p.prototype=Object.create(Qh&&Qh.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]=kn.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 qh(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 Hh(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&&zt(n)||zt(o))&&(l=p({text:ca(l)?l:"",series:u})),p=u._defaults,p=void(Tt(h=u.color)&&p&&(h=p.color)),c=void 0,c=d?(p={},h):(p={color:n.color,font:n.font},r.markers.color),ca(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.reflowArea(i),this.ensureLabelsFit(i)&&this.reflowArea(i)},p.prototype.reflowArea=function(t){this.reflowPanes(),this.detachLabels(),this.reflowAxes(t),this.reflowCharts(t)},p.prototype.ensureLabelsFit=function(t){var r=!1;return t.forEach(function(t){var e=t.unclipBox(),i=t.chartContainer._clipBox(),o=w(t.options.padding||{});e.y1<i.y1+o.top&&(r=!0,o.top=i.y1-e.y1+o.top),e.y2>i.y2-o.bottom&&(r=!0,o.bottom=e.y2-i.y2+o.bottom),e.x1<i.x1+o.left&&(r=!0,o.left=i.x1-e.x1+o.left),e.x2>i.x2-o.right&&(r=!0,o.right=e.x2-i.x2+o.right),r&&(t.options.padding=o)}),r},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=$h(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,T).translate(c.options.margin,0)),f)&&(a[d]=c),(g=$h(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,b=x.id,_=!1!==m.options.visible,x=$h(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[b]&&m.reflow(m.box.alignTo(l[b].box,P).translate(0,-m.options.margin)),_)&&(l[b]=m),L(m.lineBox().y2,Z)===L(x.lineBox().y2,Z)&&(h[b]&&m.reflow(m.box.alignTo(h[b].box,S).translate(0,m.options.margin)),_)&&(h[b]=m),0!==v&&(m.alignTo(i),m.reflow(m.box)))}},p.prototype.shrinkAxisWidth=function(t){for(var e=this.groupAxes(t).any,i=Kh(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,Kh(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=Kh(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=ip(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(){Qh.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=$h(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,As)},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=kn.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(Zh);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(Zh)).length;);return e}var n=this,i=r.call(this,o).filter(Zh),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 Qh,Vh=p;function p(t,e,i){Qh.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 Kh(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 B}function $h(t,e){for(var i=0;i<t.length;i++){var o=t[i];if(o&&o.pane===e)return o}}var Jh,tp,ep,ip=function(t){return t.reduce(function(t,e){return t.concat(e.axes)},[])};e(Vh,{series:[],plotArea:{margin:{}},background:"",border:{color:Y,width:0},paneDefaults:{title:{}},legend:{inactiveItems:{labels:{color:"#919191"},markers:{color:"#919191"}}}});function op(t,e,i){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:Tt(p)?p:bn[p]})}}let rp=Vh,np={hover:function(t,e){this._dispatchEvent(t,e,Os)},click:function(t,e){this._dispatchEvent(t,e,"plotAreaClick")}},sp=np;op.prototype.aggregatePoints=function(t,e){var i,o=this._series,r=this._seriesFields,n=this._bindPoints(t||[]),t=n.dataItems[0],s=null;!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)&&void 0===h.length&&!(h instanceof Date)){s=h;break}if(void 0!==h){null===s&&(s={});{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;)void 0===d[f=g.shift()]&&(d[f]={}),d=d[f];f=g.shift()}d[f]=u}}}return s},op.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}},op.prototype._bindField=function(t,e){for(var i=[],o=t.length,r=0;r<o;r++){var n=t[r],s=n.valueFields,s=(void 0!==s[e]?s:n.fields)[e];i.push(s)}return i};function ap(){this._defaults={}}let lp=op,hp=(ap.prototype.register=function(t,e){for(var i=0;i<t.length;i++)this._defaults[t[i]]=e},ap.prototype.query=function(t){return this._defaults[t]},ap.current=new ap,ap),pp=((Jh=Al)&&(cp.__proto__=Jh),((cp.prototype=Object.create(Jh&&Jh.prototype)).constructor=cp).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))},cp.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)},cp);function cp(){Jh.apply(this,arguments)}pp.prototype.defaults=O({},pp.prototype.defaults,{labels:{format:"{0} - {1}"},tooltip:{format:"{1}"}});let up=pp,dp=((tp=Zl)&&(fp.__proto__=tp),((fp.prototype=Object.create(tp&&tp.prototype)).constructor=fp).prototype.pointType=function(){return up},fp.prototype.pointValue=function(t){return t.valueFields},fp.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)},fp.prototype.plotRange=function(t){return t?[t.value.from,t.value.to]:0},fp.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))},fp.prototype.aboveAxis=function(t){t=t.value;return t.from<t.to},fp);function fp(){tp.apply(this,arguments)}dp.prototype.plotLimits=ka.prototype.plotLimits;let gp=dp,yp=((ep=Pa)&&(vp.__proto__=ep),((vp.prototype=Object.create(ep&&ep.prototype)).constructor=vp).prototype.aliasFor=function(){return this.parent},vp);function vp(){ep.apply(this,arguments)}let mp=yp;(xp=o)&&(Pp.__proto__=xp),((Pp.prototype=Object.create(xp&&xp.prototype)).constructor=Pp).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 mp(o,O({},this.options,{labels:e.from,markers:t.from})),o=this.toPoint=new mp(o,O({},this.options,{labels:e.to,markers:t.to})),this.copyFields(i),this.copyFields(o),this.append(i),this.append(o))},Pp.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())},Pp.prototype.createHighlight=function(){var t=new M.drawing.Group;return t.append(this.fromPoint.createHighlight()),t.append(this.toPoint.createHighlight()),t},Pp.prototype.highlightVisual=function(){return this.visual},Pp.prototype.highlightVisualArgs=function(){return{options:this.options,from:this.fromPoint.highlightVisualArgs(),to:this.toPoint.highlightVisualArgs()}},Pp.prototype.createFocusHighlight=function(){var t=new M.drawing.Group;return t.append(this.fromPoint.createFocusHighlight()),t.append(this.toPoint.createFocusHighlight()),t},Pp.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,_),{point:new A(t,e),align:{horizontal:o,vertical:r}}},Pp.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Pp.prototype.overlapsBox=function(t){return this.box.overlaps(t)},Pp.prototype.unclipElements=function(){this.fromPoint.unclipElements(),this.toPoint.unclipElements()},Pp.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}"}))},Pp.prototype.positionLabels=function(t,e){var i,o=this.options,r=o.labels;"auto"===r.position&&(o=o.vertical?e.y1<=t.y1?(i=zn,jn):(i=jn,zn):e.x1<=t.x1?(i=C,T):(i=T,C),r.from&&r.from.position||(this.fromPoint.options.labels.position=o),r.to&&r.to.position||(this.toPoint.options.labels.position=i))},Pp.prototype.copyFields=function(t){t.dataItem=this.dataItem,t.category=this.category,t.series=this.series,t.color=this.color,t.owner=this.owner},Pp.prototype.focusVisual=function(){this.fromPoint.focusVisual()},Pp.prototype.clearFocusFromVisual=function(){this.toPoint.clearFocusFromVisual()},Pp.prototype.getIndex=function(){return this.categoryIx};var xp,bp,_p,wp,kp,Ap,Sp,Cp,Tp,Vh=Pp;function Pp(t,e){xp.call(this),this.value=t,this.options=e,this.aboveAxis=b(this.options.aboveAxis,!0),this.tooltipTracking=!0,this._id=Ge(),this.initLabelsFormat()}O(Vh.prototype,Sa),O(Vh.prototype,Ca),Vh.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:Ln,delay:On},position:"auto"},notes:{label:{}},highlight:{markers:{border:{color:a,width:2}},zIndex:100},tooltip:{format:"{0} - {1}"},accessibility:{role:i,className:t,ariaRoleDescription:bs}};let Mp=Vh,Op=((bp=sl)&&(Lp.__proto__=bp),((Lp.prototype=Object.create(bp&&bp.prototype)).constructor=Lp).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.toGeometryPoints(this.toPoints()))},Lp.prototype.stackSegments=function(){var t=this.fromSegments;return t=this.fromSegments?t:this.fromSegments=this.segmentsFromPoints(this.toGeometryPoints(this.fromPoints().reverse()))},Lp.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)},Lp.prototype.hasStackSegment=function(){return!0},Lp.prototype.fromPoints=function(){return this.linePoints.map(function(t){return t.fromPoint})},Lp.prototype.toPoints=function(){return this.linePoints.map(function(t){return t.toPoint})},Lp);function Lp(){bp.apply(this,arguments)}let Bp=Op,Ip=((_p=Bp)&&(Ep.__proto__=_p),((Ep.prototype=Object.create(_p&&_p.prototype)).constructor=Ep).prototype.createStrokeSegments=function(){return this.createCurveSegments(this.toPoints())},Ep.prototype.stackSegments=function(){var t=this.fromSegments;return t=this.fromSegments?t:this.fromSegments=this.createCurveSegments(this.fromPoints().reverse())},Ep.prototype.createCurveSegments=function(t){return(new un).process(this.toGeometryPoints(t))},Ep);function Ep(){_p.apply(this,arguments)}let Rp=Ip,Vp=((wp=Bp)&&(zp.__proto__=wp),((zp.prototype=Object.create(wp&&wp.prototype)).constructor=zp).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.calculateStepPoints(this.toPoints()))},zp.prototype.stackSegments=function(){var t=this.fromSegments;return this.fromSegments||(t=this.fromSegments=this.segmentsFromPoints(this.calculateStepPoints(this.fromPoints()))).reverse(),t},zp);function zp(){wp.apply(this,arguments)}O(Vp.prototype,l);let jp=Vp,Dp=((kp=ka)&&(Fp.__proto__=kp),((Fp.prototype=Object.create(kp&&kp.prototype)).constructor=Fp).prototype.render=function(){kp.prototype.render.call(this),this.renderSegments()},Fp.prototype.pointType=function(){return Mp},Fp.prototype.createPoint=function(t,e){var i=e.series,o=e.seriesIx,r=t.valueFields;if(!ca(r.from)&&!ca(r.to)){if(this.seriesMissingValues(i)!==Rn)return null;r={from:0,to:0}}o=this.pointOptions(i,o),o=this.evalPointOptions(o,r,e),e=t.fields.color||i.color,Tt(i.color)&&(e=o.color),t=new Mp(r,o);return t.color=e,this.append(t),t},Fp.prototype.createSegment=function(t,e,i){var o=(e.line||{}).style;return new("smooth"===o?Rp:"step"===o?jp:Bp)(t,e,i)},Fp.prototype.plotRange=function(t,e){return t?[t.value.from,t.value.to]:[e,e]},Fp.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}},Fp.prototype.pointSlot=function(t,e){var i,o=e.from,e=e.to,o=this.options.invertAxes?(i=new B(o.x1,t.y1,o.x2,t.y2),new B(e.x1,t.y1,e.x2,t.y2)):(i=new B(t.x1,o.y1,t.x2,o.y2),new B(t.x1,e.y1,t.x2,e.y2));return{from:i,to:o}},Fp.prototype.addValue=function(t,e){var i=t.valueFields;m(i.from)||(i.from=i.to),m(i.to)||(i.to=i.from),kp.prototype.addValue.call(this,t,e)},Fp.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))},Fp.prototype.formatPointValue=function(t,e){t=t.value;return this.chartService.format.auto(e,t.from,t.to)},Fp.prototype.animationPoints=function(){for(var t=this.points,e=[],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)},Fp);function Fp(){kp.apply(this,arguments)}O(Dp.prototype,Va,tl);let Hp=Dp,Np=((Ap=$l)&&(Up.__proto__=Ap),((Up.prototype=Object.create(Ap&&Ap.prototype)).constructor=Up).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()},Up.prototype.createBody=function(){},Up);function Up(){Ap.apply(this,arguments)}let Gp=Np,Wp=((Sp=eh)&&(Xp.__proto__=Sp),((Xp.prototype=Object.create(Sp&&Sp.prototype)).constructor=Xp).prototype.pointType=function(){return Gp},Xp);function Xp(){Sp.apply(this,arguments)}let Yp=Wp,qp=((Cp=o)&&(Zp.__proto__=Cp),((Zp.prototype=Object.create(Cp&&Cp.prototype)).constructor=Zp).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},Zp.prototype.createVisual=function(){Cp.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}});bt(t),this.visual.append(t)},Zp);function Zp(t,e,i){Cp.call(this),this.from=t,this.to=e,this.series=i}e(qp,{animation:{type:Ln,delay:On}});let Qp=qp,Kp=((Tp=Zl)&&($p.__proto__=Tp),(($p.prototype=Object.create(Tp&&Tp.prototype)).constructor=$p).prototype.render=function(){Tp.prototype.render.call(this),this.createSegments()},$p.prototype.traverseDataPoints=function(t){for(var e=this.options.series,i=oa(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=kn.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})}},$p.prototype.updateRange=function(t,e){Tp.prototype.updateRange.call(this,{value:e.to},e)},$p.prototype.aboveAxis=function(t){return 0<=t.value},$p.prototype.plotRange=function(t){return[t.from,t.to]},$p.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 Qp(s,h,r),i.push(l),this.append(l)),s=h}}},$p);function $p(){Tp.apply(this,arguments)}function Jp(t,e,i){return(t=t[String(e)])?t(i):null}function tc(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 ec(t,e){return t.every(function(t){t=t.valueFields;return!ca(t[e])||0<t[e]})}function ic(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 oc(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 rc(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 nc=Kp,sc={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)(),ec(t,n.field)&&(n=(t=tc(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,ic(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=tc((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?ic(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=tc((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,ic(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=oc(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=rc(i(),(e=t.field,function(t){return{xValue:t.categoryIx+1,yValue:t.valueFields[e]}}),s),t=i.count,r=i.valueMapper,0<t?ic(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)(),ec(t,n.field)&&(n=(t=tc(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,ic(function(t){return e*Math.pow(t,o)},r)):null);return t?Object.assign({},s,{type:"line",data:t,categoryField:"category",field:"value"}):null}},ac=sc;var lc,hc=[Hn,ds,ls,vs],pc=[Jn,ys].concat(hc),Vh=((lc=rp)&&(c.__proto__=lc),((c.prototype=Object.create(lc&&lc.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,[Nn,Wn,ys,ds,vs,hs,$n,fs]);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;lc.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=Jp(ac,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);ra(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,[Hn,ds]),e),this.createRangeAreaChart(aa(t,[ls,vs]),e),this.createBarChart(aa(t,[Yn,Nn]),e),this.createRangeBarChart(aa(t,[ps,hs]),e),this.createBulletChart(aa(t,[Wn,gs]),e),this.createCandlestickChart(aa(t,Xn),e),this.createBoxPlotChart(aa(t,[Un,fs]),e),this.createOHLCChart(aa(t,ts),e),this.createWaterfallChart(aa(t,[ms,$n]),e),this.createLineChart(aa(t,[Jn,ys]),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=(ra(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,pc),(r=O({},e)).data=(r.data||[]).slice(o.min,o.max+1),t&&va(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=ra(o.type,K),s=t.data,a=[];n||e.indexCategories();for(var l=0;l<s.length;l++){var h,p=kn.current.bindPoint(t,l).fields.category;null!=(p=void 0===(p=n?ha(p,s[l],this.chartService.intl):p)?r[l]: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 lp(O({},t),kn.current,hp.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,pc)&&va(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,oa(i)-r.length);if(0<n)for(r=o.options.categories=o.options.categories.slice(0);n--;)r.push("");this.valueAxisRangeTracker.update(t.valueAxisRanges),lc.prototype.appendChart.call(this,t,e)},c.prototype.seriesPaneName=function(t){var e=this.options,i=t.axis,t=[].concat(e.valueAxis),t=Nt(t,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$$";ze(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 Zl(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 gp(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 Bh(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 ol(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 yl(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 Hp(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 Yp(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 eh(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 ph(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 nc(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,xs),o=0;o<this.series.length;o++){var r,n=this.series[o];u(n.type,hc)&&(r=n.line)&&r.style===Fn&&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(ua(n,a[0])?(n._forecast=this.trendlineAggregateForecast(),Cr):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,hc))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=ra(l.type,Us)?{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(ra(l.type,Us)?Wr:Rr)(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?Js(s,h.getValue(r)):Js(n,h.getCategory(r))}0===n.length&&Js(n,this.categoryAxis.getCategory(r)),0<n.length&&0<s.length&&t.trigger(i,{element:ae(e),originalEvent:e,category:da(n),value:da(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){cc(this.options,t,e),cc(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,[Hn,ds,ls,vs,Jn,ys,as,ns]),i=u(t.series.type,[Yn,Nn]);return e||i&&t.options.isStacked},c);function c(){lc.apply(this,arguments)}function cc(t,e,i){O([].concat(e instanceof mr?t.categoryAxis:t.valueAxis)[e.axisIndex],i)}e(Vh,{categoryAxis:{},valueAxis:{}}),O(Vh.prototype,sp);function uc(){this._points=[]}let dc=Vh;function fc(){this._defaultPrevented=!0}uc.prototype.destroy=function(){this._points=[]},uc.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))}},uc.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)},uc.prototype.hide=function(){for(var t=this._points;t.length;)this.togglePointHighlight(t.pop(),!1)},uc.prototype.isHighlighted=function(t){for(var e=this._points,i=0;i<e.length;i++)if(t===e[i])return!0;return!1};let gc=uc;function yc(t,e){e=(e||"").toLowerCase(),t=t.event;return"none"===e&&!(t.ctrlKey||t.shiftKey||t.altKey)||t[e+"Key"]}function vc(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}function mc(t,e){this.plotArea=t,this.options=O({},this.options,e)}var xc,bc,_c,wc,kc,Ac;mc.prototype.start=function(t){return this._active=yc(t,this.options.key),this._active},mc.prototype.move=function(t){if(this._active){t=this.axisRanges=this._panAxes(t,y).concat(this._panAxes(t,v));if(t.length)return vc(this.axisRanges=t)}},mc.prototype.end=function(){var t=this._active;return this._active=!1,t},mc.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)}},mc.prototype.destroy=function(){delete this.plotArea},mc.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},mc.prototype.options={key:"none",lock:"none"};function Sc(t,e){this.chart=t,this.options=O({},this.options,e),this.createElement()}function Cc(t,e){this.chart=t,this.options=O({rate:.3},this.options,e)}let Tc=mc,Pc=(Sc.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)},Sc.prototype.removeElement=function(){this._marquee.parentNode&&this._marquee.parentNode.removeChild(this._marquee)},Sc.prototype.setStyles=function(t){It(this._marquee,t)},Sc.prototype.start=function(t){if(yc(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},Sc.prototype._elementOffset=function(){var t=this.chart.element,e=It(t,["paddingLeft","paddingTop"]),i=e.paddingLeft,e=e.paddingTop,t=re(t);return{left:i+t.left,top:e+t.top}},Sc.prototype.move=function(t){this._zoomPane&&this.setStyles(this._selectionPosition(t))},Sc.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,vc(this.axisRanges)},Sc.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)}},Sc.prototype.destroy=function(){this.removeElement(),delete this._marquee,delete this.chart},Sc.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},Sc.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}},Sc.prototype.options={key:"shift",lock:"none"},Sc),Mc=(Cc.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 vc(this.axisRanges=o)},Cc.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)}},Cc.prototype.destroy=function(){delete this.chart},Cc),Oc=((xc=o)&&(Lc.__proto__=xc),((Lc.prototype=Object.create(xc&&xc.prototype)).constructor=Lc).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:_});for(var o=0;o<t.length;o++){var r=t[o];r.reflow(new B),r.renderVisual()}},Lc.prototype.reflow=function(t){this.visual.rect(t.toRect()),this.visual.reflow();t=this.visual.clippedBBox();this.box=t?no(t):new B},Lc.prototype.renderVisual=function(){this.addVisual()},Lc.prototype.createVisual=function(){},Lc);function Lc(t,e){xc.call(this,t),this.chartService=e}let Bc=Oc,Ic=((bc=Wi)&&(Ec.__proto__=bc),((Ec.prototype=Object.create(bc&&bc.prototype)).constructor=Ec).prototype.visualStyle=function(){var t=this.markerOptions(),e=t.border;return{stroke:{width:e.width,color:e.color,opacity:b(e.opacity,t.opacity),dashType:e.dashType},fill:{color:t.background,opacity:t.opacity},cursor:t.cursor}},Ec.prototype.markerOptions=function(){return this.options},Ec.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}}:{})},Ec.prototype.createHighlight=function(){var t=new bc(this.markerHighlightOptions()),e=this.paddingBox.clone();return t.reflow(e.pad(t.options.border.width)),this.highlight=[t.getElement()],this.highlight},Ec);function Ec(){bc.apply(this,arguments)}e(Ic,{border:{width:2},width:8,height:8,background:a,margin:{top:-1,left:-1},vAlign:P,align:C,highlight:{width:10,height:10,border:{color:a,width:2}}});let Rc=Ic,Vc=((_c=Wi)&&(zc.__proto__=_c),((zc.prototype=Object.create(_c&&_c.prototype)).constructor=zc).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},zc);function zc(){_c.apply(this,arguments)}e(Vc,{width:15,height:15,align:T,vAlign:S,margin:{right:-2,bottom:2}});let jc=Vc,Dc=((wc=Wi)&&(Fc.__proto__=wc),((Fc.prototype=Object.create(wc&&wc.prototype)).constructor=Fc).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},Fc.prototype.createHighlight=function(){return this.highlight=[this.createHighlightLine(),this.createHighlightMarker()],this.highlight},Fc.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 jc(t);return t.reflow(this.parent.paddingBox.clone()),this.highlightLine=t.getElement(),this.highlightLine},Fc.prototype.createHighlightMarker=function(){var t=O({},{background:this.options.background},this.options.highlight.markers),e=new wc(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},Fc);function Fc(){wc.apply(this,arguments)}e(Dc,{border:{width:0},type:"rect",align:C,vAlign:_,highlight:{border:{width:2},markers:{type:q,width:10,height:10,border:{width:2,color:a},align:C,vAlign:P}}});let Hc=Dc,Nc=((kc=Wi)&&(Uc.__proto__=kc),((Uc.prototype=Object.create(kc&&kc.prototype)).constructor=Uc).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,P),t.reflow(e),this.highlight=[t.getElement()],this.highlight},Uc);function Uc(){kc.apply(this,arguments)}e(Nc,{highlight:{markers:{type:q,width:10,height:10,border:{width:2,color:a},margin:{top:-3,left:-3}}}});let Gc=Nc,Wc=((Ac=Hi)&&(Xc.__proto__=Ac),((Xc.prototype=Object.create(Ac&&Ac.prototype)).constructor=Xc).prototype.createContainer=function(){this.container=new to({vertical:!1,wrap:!1,align:_,spacing:this.options.spacing}),this.append(this.container)},Xc.prototype.createMarker=function(){this.markerWrap=new Ac({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))},Xc.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()},Xc.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})},Xc.prototype._highlightOptions=function(){var t=this.options;return O({markers:{type:t.markers.type}},t.highlight)},Xc.prototype._createLine=function(t){var e=this.options;return e.type!==Jn||e.markers.visible||(this._line=new Hc(O({},{background:e.markerColor,highlight:this._highlightOptions()},t,e.line)),this.markerWrap.append(this._line)),this._line},Xc.prototype._createMarkerLine=function(t,e){return this.options.type===Jn&&(this._markerLineArea=new jc(O({},{border:{width:e.height}},t)),this.markerWrap.append(this._markerLineArea)),this._markerLineArea},Xc.prototype._reduceSize=function(t,e,i){void 0===i&&(i=.6),"number"==typeof t[e]&&(t[e]=t[e]*i)},Xc.prototype._createSquare=function(){var t,e=this.options;return e.type===Hn&&((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 Gc(Object.assign({},{border:e.border,vAlign:e.markers.visible?S:_,highlight:this._highlightOptions()},e.area,{pattern:t,background:e.area.background||e.markerColor})),this.markerWrap.append(this._square)),this._square},Xc.prototype._createMarker=function(){return new Rc(this.markerOptions())},Xc.prototype._highlightMarkers=function(){this.options.active&&this._toggleHighlight(!0)},Xc.prototype._restoreMarkers=function(){this._toggleHighlight(!1)},Xc.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)}))},Xc.prototype.createLabel=function(){var t=this.options,e=O({},t.labels);this.container.append(new uo(t.text,e))},Xc.prototype.getAriaLabelText=function(){return this.options.text},Xc.prototype.focusVisual=function(){this.visual.options.set("id",this._id),this.toggleFocusHighlight(!0),this._highlightMarkers()},Xc.prototype.clearFocusFromVisual=function(){this.visual.options.set("id",""),this.toggleFocusHighlight(!1),this._restoreMarkers()},Xc.prototype.renderComplete=function(){Ac.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)},Xc.prototype.click=function(t,e){var i=this.eventArgs(e);!t.trigger(Ss,i)&&e&&"contextmenu"===e.type&&e.preventDefault()},Xc.prototype.over=function(t,e){e=this.eventArgs(e);return t.trigger("legendItemHover",e)||(t._legendItemHover(e.seriesIndex,e.pointIndex),this._highlightMarkers()),!0},Xc.prototype.out=function(t,e){t._unsetActivePoint(),this._restoreMarkers(),t.trigger("legendItemLeave",this.eventArgs(e))},Xc.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}},Xc.prototype.createVisual=function(){Ac.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),Ni(this.visual,t))},Xc.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()):Ac.prototype.renderVisual.call(this)},Xc.prototype.createFocusHighlight=function(t){var e=t.stroke.width;return M.drawing.Path.fromRect(this.container.box.pad(e/2).toRect(),t)},Xc);function Xc(t){Ac.call(this,t),this.createContainer(),t.rtl?(this.createLabel(),this.createMarker()):(this.createMarker(),this.createLabel()),this._id=Ge(),this.options.accessibility.ariaChecked=t.active}e(Wc,{accessibility:{role:"checkbox",className:"k-chart-legend-item",ariaRoleDescription:"Legend item"},markers:{},highlight:{visible:!0,markers:{}}});let Yc=Wc;var qc,Zc="custom",l=((qc=o)&&(Qc.__proto__=qc),((Qc.prototype=Object.create(qc&&qc.prototype)).constructor=Qc).prototype.createContainers=function(){var t=this.options,e=t.position,i=t.align,o=e,r=_;e===Zc?o=C:u(e,[P,S])?(o=i===pt?C:i===J?T:_,r=e):i&&(i===pt?r=P:i===J&&(r=S)),this.container=new Hi({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 Hi({vAlign:r,align:o,zIndex:t.zIndex,shrinkToFit:!0}):this.itemsContainer=this.container,this.append(this.container)},Qc.prototype.createItems=function(){for(var t=this.getService(),e=this.options,i=this.isVertical(),o=new Bc({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 Yc(h))}o.render(),this.itemsContainer.append(o)},Qc.prototype.isVertical=function(){var t=this.options,e=t.orientation,t=t.position;return t===Zc&&e!==gt||(k(e)?e!==gt:u(t,[C,T]))},Qc.prototype.hasItems=function(){return 0<this.container.children[0].children.length},Qc.prototype.getItems=function(){return this.itemsContainer.children[0].children},Qc.prototype.reflow=function(t){var e=this.options,t=t.clone();this.hasItems()?(e.position===Zc?(this.containerCustomReflow(t),this.box=t):this.containerReflow(t),this.hasTitle()&&this.title.reflow(new B(this.container.box.x1,this.title.box.y1,this.container.box.x2,this.title.box.y2))):this.box=t},Qc.prototype.containerReflow=function(t){var e=this.options,i=this.container,o=e.position,r=e.width,n=e.height,s=o===P||o===S?y:v,a=this.isVertical(),l=t.clone(),h=t.clone(),o=(o!==C&&o!==T||(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},Qc.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 B(o,r,o+t.width(),r+t.height()))},Qc.prototype.renderVisual=function(){this.hasItems()&&qc.prototype.renderVisual.call(this)},Qc.prototype.createLegendTitle=function(t){var e=O({},{color:Y,position:P,align:_},t),i=e.text;t&&!1!==t.visible&&t.text&&(k(e)&&e.visible&&((t=zt(e))?i=t({text:i}):e.format&&(i=this.chartService.format.auto(e.format,i))),this.title=new uo(i,e),this.createTitleLayout(),this.appendTitleLayoutContent())},Qc.prototype.createTitleLayout=function(){this.layout=new to({vertical:!0,wrap:!1}),this.container.append(this.layout)},Qc.prototype.hasTitle=function(){return Boolean(this.options.title&&!1!==this.options.title.visible&&this.options.title.text)},Qc.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))},Qc);function Qc(t,e){void 0===e&&(e={}),qc.call(this,t),this.chartService=e,u(this.options.position,[P,T,S,C,Zc])||(this.options.position=T),this.createContainers(),this.createLegendTitle(t.title),this.createItems()}e(l,{position:T,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:T,width:15,height:15}});function Kc(){this._registry=[]}let $c=l,Jc=(Kc.prototype.register=function(t,e){this._registry.push({type:t,seriesTypes:e})},Kc.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,As);if(0<a.length-l.length){r=s;break}}return new r.type(a,e,i)},Kc.current=new Kc,Kc);function tu(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}function iu(t,e,i,o){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 Cr,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())}var ou,ru,nu;iu.prototype.onPane=function(t){return this.categoryAxis.pane===t},iu.prototype.createElements=function(){var t=this.options,e=this.wrapper=tu("k-selector k-pointer-events-none"),i=(It(e,{top:t.offset.top,left:t.offset.left,width:t.width,height:t.height,direction:"ltr"}),this.selection=tu("k-selection k-pointer-events-none")),o=(this.leftMask=tu("k-mask k-pointer-events-none"),this.rightMask=tu("k-mask k-pointer-events-none"),e.appendChild(this.leftMask),e.appendChild(this.rightMask),e.appendChild(i),this.body=tu("k-selection-bg k-pointer-events-none")),o=(i.appendChild(o),this.leftHandle=tu("k-handle k-left-handle k-pointer-events-auto")),r=this.rightHandle=tu("k-handle k-right-handle k-pointer-events-auto"),i=(o.appendChild(tu()),r.appendChild(tu()),i.appendChild(o),i.appendChild(r),this.chartElement.appendChild(e),It(i,["borderLeftWidth","borderRightWidth","height"])),n=It(o,"height").height,s=It(r,"height").height;t.selection={border:{left:i.borderLeftWidth,right:i.borderRightWidth}},It(o,{top:(i.height-n)/2}),It(r,{top:(i.height-s)/2}),e.style.cssText=e.style.cssText},iu.prototype.bindEvents=function(){var t;!1!==this.options.mousewheel&&(this._mousewheelHandler=this._mousewheel.bind(this),ie(this.chartElement,((t={})[Xs]=this._mousewheelHandler,t))),this._domEvents=Ro.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)})},iu.prototype.initOptions=function(){var t=this.options,e=this.categoryAxis.pane.chartsBox(),i=this.chart.chartService.intl,i=(this._dateAxis&&O(t,{min:fr(i,t.min),max:fr(i,t.max),from:fr(i,t.from),to:fr(i,t.to)}),It(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)},iu.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={})[Xs]=this._mousewheelHandler,t)),this._mousewheelHandler=null),this.chartElement.removeChild(this.wrapper),this.wrapper=null)},iu.prototype._rangeEventArgs=function(t){return{axis:this.categoryAxis.options,from:this._value(t.from),to:this._value(t.to)}},iu.prototype._pointInPane=function(t,e){var i=this.categoryAxis.pane.box,t=this.chart._toModelCoordinates(t,e);return i.containsPoint(t)},iu.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(js,i))&&(this._state=null)},iu.prototype._press=function(t){(t=this._state?this._state.moveTarget:eu(ae(t)))&&vt(t,"k-handle-active")},iu.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=It(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(Ds,this._rangeEventArgs(i))))},iu.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(Fs,this._rangeEventArgs(t)),delete this._state)},iu.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(Ds,this._rangeEventArgs(a)),this._end()))},iu.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(Ds,{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))},iu.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(js,i)?this._state=null:t.preventDefault())},iu.prototype._gestureend=function(){this._state&&(this.trigger(Fs,this._rangeEventArgs(this._state.range)),delete this._state)},iu.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(Ds,this._rangeEventArgs(o)))},iu.prototype._index=function(t){var e=t;return e=t instanceof Date?this.categoryAxis.categoryIndex(t):e},iu.prototype._value=function(t){var e=t;return e=this._dateAxis&&(e=this.categoryAxis.categoryAt(t))>this.options.max?this.options.max:e},iu.prototype._slot=function(t){var e=this.categoryAxis,t=this._index(t);return e.getSlot(t,t,!0)},iu.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=(It(this.leftMask,{width:e}),It(this.selection,{left:e}),o=this._slot(a),L(i.width-(o[l]-r.left+n.left))),a=(It(this.rightMask,{width:t}),i.width-t);a!==i.width&&(a+=s.right),It(this.rightMask,{left:a}),It(this.selection,{width:Math.max(i.width-(e+t)-s.right,0)})},iu.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)},iu.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!==T&&(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},iu.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},iu.prototype.trigger=function(t,e){return(this.observer||this.chart).trigger(t,e)},e(iu,{visible:!0,mousewheel:{zoom:"both"},min:nt,max:rt});let su=iu,au=((ou=Ka)&&(lu.__proto__=ou),((lu.prototype=Object.create(ou&&ou.prototype)).constructor=lu).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,ou.prototype.show.call(this,{point:t,anchor:i},e,t)):this.hide())},lu.prototype.hide=function(){delete this._current,ou.prototype.hide.call(this)},lu);function lu(){ou.apply(this,arguments)}let hu=au,pu=((ru=Ka)&&(cu.__proto__=ru),((cu.prototype=Object.create(ru&&ru.prototype)).constructor=cu).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))},cu.prototype._slotAnchor=function(t,e){return this.plotArea.categoryAxis.options.vertical||(t.x=e.center().x),{point:t,align:{horizontal:"left",vertical:"center"}}},cu.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"}}},cu);function cu(t,e){ru.call(this,t.chartService,e),this.plotArea=t,this.formatService=t.chartService.format}e(pu,{categoryFormat:"{0:d}"});let uu=pu,du=((nu=M.drawing.Animation)&&(fu.__proto__=nu),((fu.prototype=Object.create(nu&&nu.prototype)).constructor=fu).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]=Bn,e.transform(M.geometry.transform().scale(t.x,t.y))):this.abort()},fu.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))},fu.prototype.abort=function(){nu.prototype.abort.call(this),this.element.transform(null)},fu);function fu(){nu.apply(this,arguments)}e(du,{duration:On}),M.drawing.AnimationFactory.current.register(Nn,du);(gu=M.drawing.Animation)&&(yu.__proto__=gu),((yu.prototype=Object.create(gu&&gu.prototype)).constructor=yu).prototype.setup=function(){var t=this.center=this.element.bbox().center();this.element.transform(M.geometry.transform().scale(Bn,Bn,t))},yu.prototype.step=function(t){this.element.transform(M.geometry.transform().scale(t,t,this.center))};var gu,Vh=yu;function yu(){gu.apply(this,arguments)}e(Vh,{easing:"easeOutElastic"}),M.drawing.AnimationFactory.current.register(Gn,Vh);(vu=M.drawing.Animation)&&(mu.__proto__=vu),((mu.prototype=Object.create(vu&&vu.prototype)).constructor=mu).prototype.setup=function(){this.fadeTo=this.element.opacity(),this.element.opacity(0)},mu.prototype.step=function(t){this.element.opacity(t*this.fadeTo)};var vu,l=mu;function mu(){vu.apply(this,arguments)}e(l,{duration:200,easing:"linear"}),M.drawing.AnimationFactory.current.register(Ln,l);(xu=M.drawing.Animation)&&(wu.__proto__=xu),((wu.prototype=Object.create(xu&&xu.prototype)).constructor=wu).prototype.setup=function(){this.element.transform(M.geometry.transform().scale(Bn,Bn,this.options.center))},wu.prototype.step=function(t){this.element.transform(M.geometry.transform().scale(t,t,this.options.center))};var xu,bu,_u,Ka=wu;function wu(){xu.apply(this,arguments)}e(Ka,{easing:"easeOutElastic",duration:On}),M.drawing.AnimationFactory.current.register(es,Ka);let ku=Ka,Au=((bu=yh)&&(Su.__proto__=bu),((Su.prototype=Object.create(bu&&bu.prototype)).constructor=Su).prototype.render=function(){bu.prototype.render.call(this),this.renderSegments()},Su.prototype.createSegment=function(t,e,i){return new(e.style===Dn?Ha:La)(t,e,i)},Su.prototype.animationPoints=function(){return bu.prototype.animationPoints.call(this).concat(this._segments)},Su.prototype.createMissingValue=function(t,e){if(e===Rn)return ca((e={x:t.x,y:t.y}).x)||(e.x=0),ca(e.y)||(e.y=0),e},Su);function Su(){bu.apply(this,arguments)}O(Au.prototype,Va);function Cu(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=b(e,ki(r,n)/10);e<=0&&(s=n-r);for(var a=r;a<=n;a+=s)o.push([a,t(a)]);return o}function Tu(e){return function(t){t=t.valueFields;return{xValue:t.x,yValue:t[e]}}}function Pu(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 Mu=Au,Ou={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)(),ec(t,s.field)&&(i=(t=tc(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,Cu(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=tc((0,t.seriesValues)(),Tu(e.field)),i=t.slope,o=t.intercept,r=t.xMin,n=t.xMax,0<t.count?Cu(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)(),ec(t,"x")&&(i=(h=tc(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=Pu(t,(r=a.field,function(t){t=t.valueFields;return{xValue:t.x,yValue:t[r]}})),0<h)?(n=i,s=o,Cu(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=oc(t({before:e,after:e}),Tu(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=Tu(t.field),e=rc(e(),n,i),n=e.count,i=e.valueMapper,o=e.xMin,e=e.xMax,0<n?Cu(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)(),ec(t,"x")&&(i=(l=tc(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=Pu(t,Tu(s.field)),0<l)?(r=Math.exp(o),n=i,Cu(function(t){return r*Math.pow(t,n)},t,s.trendline)):null);return l?Object.assign({},a,{type:"scatterLine",data:l}):null}},Lu=Ou,Bu=((_u=rp)&&(Iu.__proto__=_u),((Iu.prototype=Object.create(_u&&_u.prototype)).constructor=Iu).prototype.initFields=function(){this.namedXAxes={},this.namedYAxes={},this.xAxisRangeTracker=new vl,this.yAxisRangeTracker=new vl},Iu.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,cs),o),this.createScatterLineChart(aa(r,us),o),this.createBubbleChart(aa(r,Gn),o))}this.createAxes(t)},Iu.prototype.appendChart=function(t,e){this.xAxisRangeTracker.update(t.xAxisRanges),this.yAxisRangeTracker.update(t.yAxisRanges),_u.prototype.appendChart.call(this,t,e)},Iu.prototype.removeAxis=function(t){var e=t.options.name;_u.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},Iu.prototype.seriesPaneName=function(t){var e=this.options,i=t.xAxis,o=[].concat(e.xAxis),o=Nt(o,function(t){return t.name===i})[0],r=t.yAxis,t=[].concat(e.yAxis),t=Nt(t,function(t){return t.name===r})[0],e=(e.panes||[{}])[0].name||"default";return(o||{}).pane||(t||{}).pane||e},Iu.prototype.createScatterChart=function(t,e){0<t.length&&this.appendChart(new yh(this,{series:t,clip:e.options.clip}),e)},Iu.prototype.createScatterLineChart=function(t,e){0<t.length&&this.appendChart(new Mu(this,{series:t,clip:e.options.clip}),e)},Iu.prototype.createBubbleChart=function(t,e){0<t.length&&this.appendChart(new wh(this,{series:t,clip:e.options.clip}),e)},Iu.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=ra(a.type,Us),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=kn.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(ra(a.type,K)||!a.type&&o?jr:t?Wr:Rr)(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},Iu.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]},Iu.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:da(a),y:da(l)})},Iu.prototype.updateAxisOptions=function(t,e){var i=t.options.vertical,o=this.groupAxes(this.panes),o=(i?o.y:o.x).indexOf(t);Eu(this.options,o,i,e),Eu(this.originalOptions,o,i,e)},Iu.prototype.trendlineFactory=function(t,e){var i=this.seriesValues.bind(this,e.index),t=Jp(Lu,t.type,{options:t,seriesValues:i});return t&&(t.xAxis=e.xAxis,t.yAxis=e.yAxis),t},Iu.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},Iu);function Iu(){_u.apply(this,arguments)}function Eu(t,e,i,o){O([].concat(i?t.yAxis:t.xAxis)[e],o)}e(Bu,{xAxis:{},yAxis:{}}),O(Bu.prototype,sp);let Ru=Bu;(Vu=o)&&(Wu.__proto__=Vu),((Wu.prototype=Object.create(Vu&&Vu.prototype)).constructor=Wu).prototype.render=function(){this._rendered||!1===this.visible||(this._rendered=!0,this.createLabel())},Wu.prototype.createLabel=function(){var t=this.options.labels,e=this.owner.chartService,i=this.getLabelText(t);t.visible&&(i||0===i)&&(t.position===_||t.position===Gs?(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 uo(i,O({},t,{align:_,vAlign:"",animation:{type:Ln,delay:this.animationDelay}}),this.pointData()),this.append(this.label))},Wu.prototype.getLabelText=function(t){var e=zt(t);return e?e(this.pointData()):this.owner.chartService.format.auto(t.format,this.value)},Wu.prototype.reflow=function(t){this.render(),this.box=t,this.reflowLabel()},Wu.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===_?(s.radius=Math.abs((s.radius-e)/2)+e,t=s.point(l),n.reflow(new B(t.x,t.y-e/2,t.x,t.y))):r.position===Gs?(s.radius=s.radius-e/2,t=s.point(l),n.reflow(new B(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=T):(o=t.x-i,n.orientation=C),n.reflow(new B(o,t.y-e,t.x,t.y))))},Wu.prototype.createVisual=function(){var t,e=this,i=this.sector,o=this.options;Vu.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))},Wu.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=ji(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)))},Wu.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):Vi.current.createRing(t,e)},Wu.prototype.createAnimation=function(){var t=this.options,e=this.sector.center;O(t,{animation:{center:[e.x,e.y],delay:this.animationDelay}}),Vu.prototype.createAnimation.call(this)},Wu.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,dashType:i.dashType}}))},Wu.prototype.highlightVisual=function(){return this.visual.children[0]},Wu.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}},Wu.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},Wu.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)>Gu?_:t<0?T:C,vertical:Math.abs(e)<Uu?_:e<0?S:P})}},Wu.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Wu.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,series:this.series,percentage:this.percentage}},Wu.prototype.getIndex=function(){return this.index};var Vu,zu,ju,Du,Fu,Hu,Nu,Vh=Wu,Uu=L(ce(30),g),Gu=L(ce(60),g);function Wu(t,e,i){Vu.call(this,i),this.value=t,this.sector=e}e(Vh,{color:a,overlay:{gradient:"roundedBevel"},border:{width:.5},labels:{visible:!1,distance:35,font:$,margin:w(.5),align:q,zIndex:1,position:Ws},animation:{type:es},highlight:{visible:!0,border:{width:1}},visible:!0,accessibility:{role:i,className:t,ariaRoleDescription:bs}}),O(Vh.prototype,Sa),O(Vh.prototype,_l);let Xu=Vh,Yu={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)&&zt(l)||zt(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,ca(n))&&""!==n&&this.legendItems.push({active:r,pointIndex:i.index,text:n,series:i.series,markerColor:a,pattern:e.pattern,labels:o})}},qu=Yu,Zu=((zu=o)&&(Qu.__proto__=zu),((Qu.prototype=Object.create(zu&&zu.prototype)).constructor=Qu).prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},Qu.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=ia(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===Ws&&(a.labels.position=_);for(var g=0;g<c.length;g++){var y,v,m,x,b=c[g];b&&(y=b.fields,v=b.value,b=b.visible,m=0!==v?d||v*u:0,x=1!==l.length&&Boolean(y.explode),Tt(a.color)||(a.color=y.color||i[g%o]),t(v,new Oi(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:b,zIndex:n-s,animationDelay:this.animationDelay(g,s,n)}),!1!==b)&&(f+=m)}}},Qu.prototype.evalSegmentOptions=function(t,e,i){var o=i.series;sa(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"]})},Qu.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 Xu(t,e,o),Object.assign(t,i),this.append(t),this.points.push(t))},Qu.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 B(n.x1,n.y1,n.x1+s,n.y1+s),s=h.center(),n=n.center(),p=e.series.length,c=[],u=[],e=b(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===Ws&&m===p-1&&(x.orientation===T?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},Qu.prototype.leftLabelsReflow=function(t){var e=this.distanceBetweenLabels(t);this.distributeLabels(e,t)},Qu.prototype.rightLabelsReflow=function(t){var e=this.distanceBetweenLabels(t);this.distributeLabels(e,t)},Qu.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},Qu.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)},Qu.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},Qu.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===T),p.orientation===T?(n.align!==q&&(i=r.radius+r.center.x+a),p.reflow(new B(i+c.width(),l,i,l))):(n.align!==q&&(i=r.center.x-r.radius-a),p.reflow(new B(i-c.width(),l,i,l))),l+=c.height()}},Qu.prototype.createVisual=function(){var t=this.options.connectors,e=this.points,i=e.length;zu.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:Ln,delay:c.animationDelay}}),d.options.position===Ws)&&(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===T?(h=Ku(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===Yn||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=Ku(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===Yn||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))}},Qu.prototype.renderVisual=function(){var t,e,i,o;zu.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]))},Qu.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}},Qu.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)},Qu.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)},Qu.prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value)},Qu.prototype.animationDelay=function(t){return 70*t},Qu.prototype.stackRoot=function(){return this},Qu);function Qu(t,e){zu.call(this,e),this.plotArea=t,this.chartService=t.chartService,this.points=[],this.legendItems=[],this.render()}function Ku(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(Zu,{startAngle:90,connectors:{width:2,color:"#939393",padding:8},inactiveItems:{markers:{},labels:{}}}),O(Zu.prototype,qu),Zu.prototype.isStackRoot=!0;let $u=Zu,Ju=((ju=rp)&&(td.__proto__=ju),((td.prototype=Object.create(ju&&ju.prototype)).constructor=td).prototype.render=function(){this.createPieChart(this.series)},td.prototype.createPieChart=function(t){var e=t[0],t=new $u(this,{series:t,padding:e.padding,startAngle:e.startAngle,connectors:e.connectors,legend:this.options.legend});this.appendChart(t)},td.prototype.appendChart=function(t,e){ju.prototype.appendChart.call(this,t,e),ee(this.options.legend.data,t.legendItems)},td.prototype.getPointBelow=function(t){return this.getPointToTheRight(t)},td.prototype.getPointAbove=function(t){return this.getPointToTheLeft(t)},td);function td(){ju.apply(this,arguments)}let ed=Ju,id=((Du=Xu)&&(od.__proto__=Du),((od.prototype=Object.create(Du&&Du.prototype)).constructor=od).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===_?(o.radius-=(o.radius-o.innerRadius)/2,e=o.point(r),i.reflow(new B(e.x,e.y-t/2,e.x,e.y))):Du.prototype.reflowLabel.call(this))},od.prototype.createSegment=function(t,e){return Vi.current.createRing(t,e)},od);function od(){Du.apply(this,arguments)}e(id,{overlay:{gradient:"roundedGlass"},labels:{position:_},animation:{type:es}}),O(id.prototype,Sa);let rd=id,nd=((Fu=$u)&&(sd.__proto__=Fu),((sd.prototype=Object.create(Fu&&Fu.prototype)).constructor=sd).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 rd(t,e,o),Object.assign(t,i),this.append(t),this.points.push(t))},sd.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=b(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)+b(f.size,a/l);this.seriesConfigs.push({innerRadius:c,radius:g}),u=f.margin||0,c=g}Fu.prototype.reflow.call(this,t)},sd.prototype.animationDelay=function(t,e,i){return 50*t+On*(e+1)/(i+1)},sd);function sd(){Fu.apply(this,arguments)}e(nd,{startAngle:90,connectors:{width:2,color:"#939393",padding:8}});let ad=nd,ld=((Hu=ed)&&(hd.__proto__=Hu),((hd.prototype=Object.create(Hu&&Hu.prototype)).constructor=hd).prototype.render=function(){this.createDonutChart(this.series)},hd.prototype.createDonutChart=function(t){var e=t[0],t=new ad(this,{series:t,padding:e.padding,connectors:e.connectors,legend:this.options.legend});this.appendChart(t)},hd.prototype.getPointBelow=function(t){return this._getNextPoint(t,this._pointsByVertical,-1)},hd.prototype.getPointAbove=function(t){return this._getNextPoint(t,this._pointsByVertical,1)},hd);function hd(){Hu.apply(this,arguments)}let pd=ld,cd=((Nu=rp)&&(ud.__proto__=Nu),((ud.prototype=Object.create(Nu&&Nu.prototype)).constructor=ud).prototype.initFields=function(){this.valueAxisRangeTracker=new vl},ud.prototype.render=function(){this.addToLegend(this.series),this.createPolarAxis(),this.createCharts(),this.createValueAxis()},ud.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)},ud.prototype.createValueAxis=function(){var t,e=this.valueAxisRangeTracker.query(),i=this.valueAxisOptions({roundToMajorUnit:!1,zIndex:-1}),o=i.type===Us?(t=hn,{min:.1,max:1}):(t=nn,{min:0,max:1}),e=e||o,o=new t(e.min,e.max,i,this.chartService);this.valueAxis=o,this.appendAxis(o)},ud.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,_),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)},ud.prototype.backgroundBox=function(){return this.box},ud.prototype.detachLabels=function(){},ud);function ud(){Nu.apply(this,arguments)}var dd,fd,gd,yd,vd,md,l=cd,Ka=((dd=yh)&&(xd.__proto__=dd),((xd.prototype=Object.create(dd&&dd.prototype)).constructor=xd).prototype.pointSlot=function(t,e){e=t.center.y-e.y1,t=A.onCircle(t.center,t.startAngle,e);return new B(t.x,t.y,t.x,t.y)},xd);function xd(){dd.apply(this,arguments)}e(Ka,{clip:!1});let bd=Ka,_d=((fd=Mu)&&(wd.__proto__=fd),(wd.prototype=Object.create(fd&&fd.prototype)).constructor=wd);function wd(){fd.apply(this,arguments)}_d.prototype.pointSlot=bd.prototype.pointSlot,e(_d,{clip:!1});let kd=_d,Ad=((gd=ul)&&(Sd.__proto__=gd),((Sd.prototype=Object.create(gd&&gd.prototype)).constructor=Sd).prototype.fillToAxes=function(t){var e=this._polarAxisCenter();t.lineTo(e.x,e.y)},Sd.prototype._polarAxisCenter=function(){return this.parent.plotArea.polarAxis.box.center()},Sd.prototype.strokeSegments=function(){var t,e,i,o=this._strokeSegments;return o||(t=this._polarAxisCenter(),e=new un(!1),(i=this.points()).push(t),(o=this._strokeSegments=e.process(i)).pop()),o},Sd);function Sd(){gd.apply(this,arguments)}let Cd=Ad,Td=((yd=sl)&&(Pd.__proto__=yd),((Pd.prototype=Object.create(yd&&yd.prototype)).constructor=Pd).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)},Pd);function Pd(){yd.apply(this,arguments)}let Md=Td,Od=((vd=kd)&&(Ld.__proto__=vd),((Ld.prototype=Object.create(vd&&vd.prototype)).constructor=Ld).prototype.createSegment=function(t,e,i){return new((e.line||{}).style===Dn?Cd:Md)(t,e,i)},Ld.prototype.createMissingValue=function(t,e){var i;return ca(t.x)&&e!==Vn&&(i={x:t.x,y:t.y},e===Rn)&&(i.y=0),i},Ld.prototype.seriesMissingValues=function(t){return t.missingValues||Rn},Ld.prototype._hasMissingValuesGap=function(){for(var t=this.options.series,e=0;e<t.length;e++)if("gap"===this.seriesMissingValues(t[e]))return!0},Ld.prototype.sortPoints=function(t){if(t.sort(Bd),this._hasMissingValuesGap())for(var e=0;e<t.length;e++){var i=t[e];!i||ca(i.value.y)||"gap"!==this.seriesMissingValues(i.series)||delete t[e]}return t},Ld);function Ld(){vd.apply(this,arguments)}function Bd(t,e){return t.value.x-e.value.x}let Id=Od,Ed=((md=l)&&(Rd.__proto__=md),((Rd.prototype=Object.create(md&&md.prototype)).constructor=Rd).prototype.createPolarAxis=function(){var t=new $r(this.options.xAxis,this.chartService);this.polarAxis=t,this.axisX=t,this.appendAxis(t)},Rd.prototype.render=function(){this.series=[].concat(this.originalSeries),this.createTrendlineSeries(),md.prototype.render.call(this)},Rd.prototype.valueAxisOptions=function(t){return O(t,{majorGridLines:{type:H},minorGridLines:{type:H}},this.options.yAxis)},Rd.prototype.createValueAxis=function(){md.prototype.createValueAxis.call(this),this.axisY=this.valueAxis},Rd.prototype.trendlineFactory=function(t,e){t=Ru.prototype.trendlineFactory.call(this,t,e);return t&&(t.type=os),t},Rd.prototype.appendChart=function(t,e){this.valueAxisRangeTracker.update(t.yAxisRanges),rp.prototype.appendChart.call(this,t,e)},Rd.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createLineChart(aa(t,[os]),e),this.createScatterChart(aa(t,[rs]),e),this.createAreaChart(aa(t,[is]),e)},Rd.prototype.createLineChart=function(t,e){0!==t.length&&(t=new kd(this,{series:t}),this.appendChart(t,e))},Rd.prototype.createScatterChart=function(t,e){0!==t.length&&(t=new bd(this,{series:t}),this.appendChart(t,e))},Rd.prototype.createAreaChart=function(t,e){0!==t.length&&(t=new Id(this,{series:t}),this.appendChart(t,e))},Rd.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})},Rd.prototype.createCrosshairs=function(){},Rd);function Rd(){md.apply(this,arguments)}e(Ed,{xAxis:{},yAxis:{}}),O(Ed.prototype,sp,{seriesValues:Ru.prototype.seriesValues});var Vd,zd,jd,Dd,Fd,Hd,Nd,Ud,Gd,Va=Ed,$=((Vd=ol)&&(Wd.__proto__=Vd),((Wd.prototype=Object.create(Vd&&Vd.prototype)).constructor=Wd).prototype.pointSlot=function(t,e){e=t.center.y-e.y1,t=A.onCircle(t.center,t.middle(),e);return new B(t.x,t.y,t.x,t.y)},Wd.prototype.renderSegments=function(){if(Vd.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)}},Wd.prototype.createSegment=function(t,e,i){var i=new(e.style===Dn?Ha:La)(t,e,i),o=this.seriesMissingValues(e);return t.length!==e.data.length&&o!==Vn||(i.options.closed=!0),i},Wd);function Wd(){Vd.apply(this,arguments)}e($,{clip:!1,limitPoints:!1});let Xd=$,Yd=((zd=ul)&&(qd.__proto__=zd),((qd.prototype=Object.create(zd&&zd.prototype)).constructor=qd).prototype.fillToAxes=function(){},qd);function qd(){zd.apply(this,arguments)}let Zd=Yd,Qd=((jd=sl)&&(Kd.__proto__=jd),((Kd.prototype=Object.create(jd&&jd.prototype)).constructor=Kd).prototype.fillToAxes=function(){},Kd);function Kd(){jd.apply(this,arguments)}let $d=Qd,Jd=((Dd=Xd)&&(tf.__proto__=Dd),((tf.prototype=Object.create(Dd&&Dd.prototype)).constructor=tf).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===Dn?(s=new Zd(t,e,i,r,n)).options.closed=!0:(t.push(t[0]),s=new $d(t,e,i,r,n)),s},tf.prototype.seriesMissingValues=function(t){return t.missingValues||Rn},tf);function tf(){Dd.apply(this,arguments)}let ef=Jd,of=((Fd=rd)&&(rf.__proto__=Fd),((rf.prototype=Object.create(Fd&&Fd.prototype)).constructor=rf).prototype.getIndex=function(){return this.categoryIx},rf);function rf(t,e){Fd.call(this,t,null,e)}e(of,{overlay:{gradient:"none"},labels:{distance:10}});let nf=of,sf=((Hd=o)&&(af.__proto__=Hd),((af.prototype=Object.create(Hd&&Hd.prototype)).constructor=af).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})},af);function af(t){Hd.call(this,t),this.forEach=t.rtl?Cl:Sl}e(sf,{gap:1,spacing:0});let lf=sf,hf=((Nd=o)&&(pf.__proto__=Nd),((pf.prototype=Object.create(Nd&&Nd.prototype)).constructor=pf).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 B;for(var s=r;0<=s&&s<o;s+=n){var a=i[s].sector;a.startAngle=t.startAngle,a.angle=t.angle}},pf);function pf(){Nd.apply(this,arguments)}let cf=hf,uf=((Ud=Zl)&&(df.__proto__=Ud),((df.prototype=Object.create(Ud&&Ud.prototype)).constructor=df).prototype.pointType=function(){return nf},df.prototype.clusterType=function(){return lf},df.prototype.stackType=function(){return cf},df.prototype.categorySlot=function(t,e){return t.getSlot(e)},df.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},df.prototype.reflowPoint=function(t,e){t.sector=e,t.reflow()},df.prototype.createAnimation=function(){this.options.animation.center=this.box.toRect().center(),Ud.prototype.createAnimation.call(this)},df);function df(){Ud.apply(this,arguments)}uf.prototype.reflow=ka.prototype.reflow,e(uf,{clip:!1,limitPoints:!1,animation:{type:"pie"}});let ff=uf,gf=((Gd=l)&&(yf.__proto__=Gd),((yf.prototype=Object.create(Gd&&Gd.prototype)).constructor=yf).prototype.createPolarAxis=function(){var t=new Zr(this.options.categoryAxis,this.chartService);this.polarAxis=t,this.categoryAxis=t,this.appendAxis(t),this.aggregateCategories(),this.createTrendlineSeries(),this.createCategoryAxesLabels()},yf.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)},yf.prototype.aggregateCategories=function(){dc.prototype.aggregateCategories.call(this,this.panes)},yf.prototype.createCategoryAxesLabels=function(){dc.prototype.createCategoryAxesLabels.call(this,this.panes)},yf.prototype.filterSeries=function(t){return t},yf.prototype.trendlineFactory=function(t,e){t=dc.prototype.trendlineFactory.call(this,t,e);return t&&(t.type=as),t},yf.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createAreaChart(aa(t,[ns]),e),this.createLineChart(aa(t,[as]),e),this.createBarChart(aa(t,[ss]),e)},yf.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},yf.prototype.createAreaChart=function(t,e){0!==t.length&&(t=new ef(this,this.chartOptions(t)),this.appendChart(t,e))},yf.prototype.createLineChart=function(t,e){0!==t.length&&(t=new Xd(this,this.chartOptions(t)),this.appendChart(t,e))},yf.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 ff(this,i),this.appendChart(n,e),this._hasBarCharts=!0)},yf.prototype.seriesCategoryAxis=function(){return this.categoryAxis},yf.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})},yf.prototype.createCrosshairs=function(){},yf.prototype._pointsByVertical=function(t){return Gd.prototype._pointsByVertical.call(this,t).sort(this._getSeriesCompareFn())},yf.prototype._getSeriesCompareFn=function(){return function(t,e){return e.value-t.value}},yf);function yf(){Gd.apply(this,arguments)}O(gf.prototype,sp,{appendChart:dc.prototype.appendChart,aggregateSeries:dc.prototype.aggregateSeries,seriesSourcePoints:dc.prototype.seriesSourcePoints,seriesValues:dc.prototype.seriesValues}),e(gf,{categoryAxis:{categories:[]},valueAxis:{}});var vf,mf,xf,bf,Vh=gf,Ka=((vf=o)&&(_f.__proto__=vf),((_f.prototype=Object.create(vf&&vf.prototype)).constructor=_f).prototype.getLabelText=function(t){var e=zt(t);return e?e(this.pointData()):t.format?this.formatValue(t.format):this.value},_f.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 B(o,e[0].y,r,e[2].y),i&&i.reflow(new B(t.x1,e[0].y,t.x2,e[2].y))},_f.prototype.createVisual=function(){var t=this,e=this.options;vf.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)},_f.prototype.createPath=function(){var t=this.options,e=t.border;return M.drawing.Path.fromPoints(this.points,{fill:ji(t.pattern,{color:t.color,opacity:t.opacity}),stroke:{color:e.color,opacity:e.opacity,width:e.width}}).close()},_f.prototype.createHighlight=function(t){return M.drawing.Path.fromPoints(this.points,t)},_f.prototype.highlightVisual=function(){return this.visual.children[0]},_f.prototype.highlightVisualArgs=function(){var t=M.drawing.Path.fromPoints(this.points).close();return{options:this.options,path:t}},_f.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},_f.prototype.tooltipAnchor=function(){var t=this.box;return{point:new A(t.center().x,t.y1),align:{horizontal:"center",vertical:"top"}}},_f.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},_f.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,series:this.series,percentage:this.percentage}},_f.prototype.getIndex=function(){return this.index},_f);function _f(t,e,i){vf.call(this,e),this.value=t,this.options.index=i.index}e(Ka,{color:a,border:{width:1},labels:{format:""},accessibility:{role:i,className:t,ariaRoleDescription:bs}}),O(Ka.prototype,Sa),O(Ka.prototype,_l);let wf=Ka,kf=((mf=o)&&(Af.__proto__=mf),((Af.prototype=Object.create(mf&&mf.prototype)).constructor=Af).prototype.formatPointValue=function(t,e){return this.plotArea.chartService.format.auto(e,t.value)},Af.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=ia(i),r=t.total,n=t.points,s=0;s<n.length;s++){var a,l,h=n[s];h&&(a=h.fields,Tt(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)}},Af.prototype.evalSegmentOptions=function(t,e,i){var o=i.series;sa(t,{value:e,series:o,dataItem:i.dataItem,index:i.index},{defaults:o._defaults,excluded:["data","content","template","toggle","visual","ariaTemplate","ariaContent"]})},Af.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 wf(t,i,e),Object.assign(t,e),this.append(t),this.points.push(t),t},Af.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=zt(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 uo(s,O({vAlign:n.position},n),r),this.labels.push(i),i},Af.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!==_&&(o=t[i].box.width(),r===C?e.left=Math.max(e.left,o):e.right=Math.max(e.right,o))}return e},Af.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)}},Af.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}},Af.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)}},Af);function Af(t,e){mf.call(this,e),this.plotArea=t,this.chartService=t.chartService,this.points=[],this.labels=[],this.legendItems=[],this.render()}e(kf,{neckRatio:.3,width:300,dynamicSlope:!1,dynamicHeight:!0,segmentSpacing:0,labels:{visible:!1,align:_,position:_,zIndex:1}}),O(kf.prototype,qu);let Sf=kf,Cf=((xf=Sf)&&(Tf.__proto__=xf),(Tf.prototype=Object.create(xf&&xf.prototype)).constructor=Tf);function Tf(t,e){e.dynamicSlope=!1,e.neckRatio=1e6,xf.call(this,t,e)}let Pf=Cf,Mf=((bf=rp)&&(Of.__proto__=bf),((Of.prototype=Object.create(bf&&bf.prototype)).constructor=Of).prototype.render=function(){this.createChart(Sf,aa(this.series,[Zn])),this.createChart(Pf,aa(this.series,[Qn]))},Of.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))},Of.prototype.appendChart=function(t,e){bf.prototype.appendChart.call(this,t,e),ee(this.options.legend.data,t.legendItems)},Of.prototype._pointsByVertical=function(t){return this.pointsBySeriesIndex(t.series.index)},Of.prototype.getPointToTheRight=function(t){return this.getPointBelow(t)},Of.prototype.getPointToTheLeft=function(t){return this.getPointAbove(t)},Of);function Of(){bf.apply(this,arguments)}var Lf,Bf,If,$=Mf,l=((Lf=o)&&(Ef.__proto__=Lf),((Ef.prototype=Object.create(Lf&&Lf.prototype)).constructor=Ef).prototype.render=function(){this._rendered||(this._rendered=!0,this.createMarker(),this.createLabel(),this.createNote())},Ef.prototype.createLabel=function(){var t=this.options.labels;t.visible&&(this.label=this.createLabelElement(t),this.append(this.label))},Ef.prototype.createLabelElement=function(t){var e=(e=t.color)||Me(this.color);return new uo(this.getLabelText(t),O({align:_,vAlign:_,margin:{left:5,right:5},zIndex:b(t.zIndex,this.series.zIndex)},t,{color:e}),this.pointData())},Ef.prototype.getLabelText=function(t){var e=zt(t);return e?e(this.pointData()):this.formatValue(t.format)},Ef.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Ef.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())},Ef.prototype.createVisual=function(){Lf.prototype.createVisual.call(this),this.addAccessibilityAttributesToVisual()},Ef.prototype.markerBox=function(){var t,e=this.options.markers,i=e.border,o=this.box.toRect(),r=b(e.type,"rect")===ht,i=b(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,no(o)},Ef.prototype.markerBorder=function(){var t=this.options,e=t.markers.border,t=b(e.opacity,t.opacity);return{color:e.color||this.color,width:e.width,opacity:t,dashType:e.dashType}},Ef.prototype.createMarker=function(){var t=this.options,e=t.markers,e=new Wi({type:b(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:b(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)},Ef.prototype.createHighlight=function(t){var e=this.options,i=this.options.highlight.markers||this.options.markers,i=new Wi({type:b(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:b(e.zIndex,this.series.zIndex)}),e=(i.reflow(this.markerBox()),i.getElement());return e.options.fill=t.fill,e.options.stroke=t.stroke,e},Ef.prototype.highlightVisual=function(){return this.rectVisual},Ef.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this.rectVisual}},Ef.prototype.createFocusHighlight=function(){var t=this.options.markers,e=this.options.focusHighlight,t=new Wi({type:b(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()},Ef.prototype.tooltipAnchor=function(){var t=this.box.center().x,e=this.box.y1-5;return{point:new A(t,e),align:{horizontal:_,vertical:S}}},Ef.prototype.overlapsBox=function(t){return this.box.overlaps(t)},Ef.prototype.unclipElements=function(){},Ef.prototype.pointData=function(){return{x:this.value.x,y:this.value.y,value:this.value.value,dataItem:this.dataItem,series:this.series}},Ef);function Ef(t,e){Lf.call(this),this.options=e,this.color=e.color||a,this.value=t}O(l.prototype,Sa),O(l.prototype,Ca),O(l.prototype,_l),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:i,className:t,ariaRoleDescription:bs}};let Rf=l,Vf=((Bf=o)&&(zf.__proto__=Bf),((zf.prototype=Object.create(Bf&&Bf.prototype)).constructor=zf).prototype._initFields=function(){this.points=[],this.seriesOptions=[],this.valueRange={min:rt,max:nt},this._evalSeries=[]},zf.prototype.render=function(){this.setRange(),this.traverseDataPoints(this.addValue.bind(this))},zf.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))}},zf.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)},zf.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=sa(t,{},n,!0)),t);return s&&sa(r=O({},t),{value:e,series:o,dataItem:i.dataItem,min:this.valueRange.min,max:this.valueRange.max},n),r},zf.prototype.pointType=function(){return Rf},zf.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)},zf.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),Tt(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 Rf(t,s));return n.color=a,this.append(n),n},zf.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)},zf.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},zf.prototype.pointSlot=function(t,e){return new B(t.x1,e.y1,t.x2,e.y2)},zf.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))}},zf.prototype.formatPointValue=function(t,e){t=t.value;return this.chartService.format.auto(e,t.x,t.y,t.value)},zf.prototype.animationPoints=function(){for(var t=this.points,e=[],i=0;i<t.length;i++)e.push((t[i]||{}).marker);return e},zf);function zf(t,e){Bf.call(this,e),this.plotArea=t,this.chartService=t.chartService,this._initFields(),this.render()}e(Vf,{series:[],tooltip:{format:"{0}, {1}: {2}"},labels:{format:"{2}"},clip:!0});let jf=Vf,Df=((If=rp)&&(Ff.__proto__=If),((Ff.prototype=Object.create(If&&If.prototype)).constructor=Ff).prototype.initFields=function(){this.namedXAxes={},this.namedYAxes={}},Ff.prototype.render=function(t){void 0===t&&(t=this.panes),this.bindCategories(),this.createAxes(t),this.createCharts(t),this.createAxisLabels()},Ff.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=kn.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()}},Ff.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,[Kn]),o)}},Ff.prototype.createHeatmapChart=function(t,e){t=new jf(this,{series:t});this.appendChart(t,e)},Ff.prototype.seriesPaneName=function(t){var e=this.options,i=t.xAxis,o=[].concat(e.xAxis),o=Nt(o,function(t){return t.name===i})[0],r=t.yAxis,t=[].concat(e.yAxis),t=Nt(t,function(t){return t.name===r})[0],e=(e.panes||[{}])[0].name||"default";return(o||{}).pane||(t||{}).pane||e},Ff.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)},Ff.prototype.createAxisLabels=function(){for(var t=this.axes,e=0;e<t.length;e++)t[e].createLabels()},Ff.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=kn.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(ra(s.type,K)||!s.type&&o?Cr: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},Ff.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]},Ff.prototype.removeAxis=function(t){var e=t.options.name;If.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},Ff.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];Js(p.options.vertical?l:a,p.getCategory(r))}0<a.length&&0<l.length&&t.trigger(i,{element:ae(e),originalEvent:e,x:da(a),y:da(l)})},Ff.prototype.updateAxisOptions=function(t,e){var i=t.options.vertical,o=this.groupAxes(this.panes),o=(i?o.y:o.x).indexOf(t);Nf(this.options,o,i,e),Nf(this.originalOptions,o,i,e)},Ff.prototype.crosshairOptions=function(t){return Object.assign({},t.options.crosshair,{zIndex:0})},Ff.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 Hf(t.pointData().x,r)}).sort(function(t,e){return i._getPointAxisYIndex(t)-i._getPointAxisYIndex(e)});return this.axisY.options.reverse?t.reverse():t},Ff.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 Hf(t.pointData().y,r)}).sort(function(t,e){return i._getPointAxisXIndex(t)-i._getPointAxisXIndex(e)});return this.axisX.options.reverse?t.reverse():t},Ff.prototype._getPointAxisXIndex=function(t){return this._getPointAxisIndex(this.axisX,t.pointData().x)},Ff.prototype._getPointAxisYIndex=function(t){return this._getPointAxisIndex(this.axisY,t.pointData().y)},Ff.prototype._getPointAxisIndex=function(t,e){return t.children.findIndex(function(t){return Hf(e,t.value)})},Ff);function Ff(){If.apply(this,arguments)}function Hf(t,e){return t instanceof Date&&e instanceof Date?pr(t,e):t===e}function Nf(t,e,i,o){O([].concat(i?t.yAxis:t.xAxis)[e],o)}e(Df,{xAxis:{},yAxis:{}}),O(Df.prototype,sp);function d(t,e,i,o){var r=this,o=(void 0===o&&(o={}),this.observers=[],this.addObserver(o.observer),this.chartService=new Bo(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())})}var Ka=Df,i="color",t="first",bs="max",l="noteText",Uf=(Jc.current.register(dc,[Nn,Yn,Jn,ys,Hn,ds,Xn,ts,Wn,gs,Un,fs,ps,hs,ms,$n,ls,vs].concat(As)),Jc.current.register(Ru,[cs,us,Gn].concat(As)),Jc.current.register(ed,[es]),Jc.current.register(pd,[qn]),Jc.current.register($,[Zn,Qn]),Jc.current.register(Va,[is,os,rs].concat(As)),Jc.current.register(Vh,[ns,ss,as].concat(As)),Jc.current.register(Ka,[Kn]),kn.current.register([Nn,Yn,Jn,ys,Hn,ds],[ut],[_s,i,l,In,En,ws,ks]),kn.current.register([ps,hs,ls,vs],["from","to"],[_s,i,l,ws,ks]),kn.current.register([ms,$n],[ut],[_s,i,l,"summary",ws,ks]),kn.current.register([is,os,rs],[y,v],[i,ws,ks]),kn.current.register([ns,ss,as],[ut],[_s,i,ws,ks]),kn.current.register([Zn,Qn],[ut],[_s,i,"visibleInLegend","visible",ws,ks]),hp.current.register([Nn,Yn,Jn,ys,Hn,ds,ms,$n],{value:bs,color:t,noteText:t,errorLow:"min",errorHigh:bs}),hp.current.register([ps,hs,ls,vs],{from:"min",to:bs,color:t,noteText:t}),hp.current.register([ns,ss,as],{value:bs,color:t}),kn.current.register([cs,us,Gn],[y,v],[i,l,"xErrorLow","xErrorHigh","yErrorLow","yErrorHigh"]),kn.current.register([Gn],[y,v,"size"],[i,_s,l,ks]),kn.current.register([Kn],[y,v,ut],[i,l,ks]),kn.current.register([Xn,ts],["open","high","low","close"],[_s,i,"downColor",l,ks]),hp.current.register([Xn,ts],{open:bs,high:bs,low:"min",close:bs,color:t,downColor:t,noteText:t}),kn.current.register([Un,fs],["lower","q1","median","q3","upper","mean","outliers"],[_s,i,l,ws,ks]),hp.current.register([Un,fs],{lower:bs,q1:bs,median:bs,q3:bs,upper:bs,mean:bs,outliers:t,color:t,noteText:t}),kn.current.register([Wn,gs],["current","target"],[_s,i,"visibleInLegend",l,ws,ks]),hp.current.register([Wn,gs],{current:bs,target:bs,color:t,noteText:t}),kn.current.register([es,qn],[ut],[_s,i,"explode","visibleInLegend","visible",ws,ks]),[_s,ut,y,v]),Gf="mousedown",Wf="mousemove",Xf="contextmenu",Yf="mouseleave",qf="keydown",Zf="k-chart-overlay-top";function Qf(t,e){if(t)for(var i=0;i<t.length;i++)if(t[i].category===e)return[t[i]]}function Kf(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 $f(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}d.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},d.prototype._setElementClass=function(t){vt(t,"k-chart")},d.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,Zf),this.overlayElement.style.display=""),this.overlayElement.parentElement!==this.element)&&this.element.appendChild(this.overlayElement)},d.prototype._hasSeriesData=function(){var t=this.options.series||[];return 0<t.length&&t.some(function(t){return t.data&&0<t.data.length})},d.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=Uf,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()},d.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)}},d.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())},d.prototype._resize=function(){this._noTransitionsRedraw()},d.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()},d.prototype.getAxis=function(t){return fn(t,this._plotArea.axes)},d.prototype.findAxisByName=function(t){return this.getAxis(t)},d.prototype.findPaneByName=function(t){for(var e=this._plotArea.panes,i=0;i<e.length;i++)if(e[i].options.name===t)return new yn(e[i])},d.prototype.findPaneByIndex=function(t){var e=this._plotArea.panes;if(e[t])return new yn(e[t])},d.prototype.plotArea=function(){return new vn(this._plotArea)},d.prototype.toggleHighlight=function(t,e){var i,o,r=this._plotArea,n=(r.srcSeries||r.series||[])[0],e=Tt(e)?r.filterPoints(e):(Ot(e)?(i=e.series,o=e.category):i=o=e,n.type===qn?Qf(r.pointsBySeriesName(i),o):u(n.type,[es,Zn,Qn])?Qf((r.charts[0]||{}).points,o):r.pointsBySeriesName(i));e&&this.togglePointsHighlight(t,e)},d.prototype.togglePointsHighlight=function(t,e){for(var i=this._highlight,o=0;o<e.length;o++)i.togglePointHighlight(e[o],t)},d.prototype.showTooltip=function(t){var e,i,o=this._sharedTooltip(),r=this._tooltip,n=this._plotArea;Tt(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)},d.prototype.hideTooltip=function(){this._tooltip.hide()},d.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)},d.prototype._surfaceWrap=function(){return this.element},d.prototype._redraw=function(){var t=this._getModel(),i=(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(),this.options.transitions);!1!==i&&t.traverse(function(t){var e;t.animation&&(e=i&&!0!==i?i.loading:i,t.animation.options=Object.assign({},t.animation.options,e),t.animation.setup())}),this._initSurface(),this.surface.draw(t.visual),!1!==i&&t.traverse(function(t){t.animation&&t.animation.play()}),this._tooltip=this._createTooltip(),this._highlight=new gc,this._setupSelection(),this._createPannable(),this._createZoomSelection(),this._createMousewheelZoom(),this._setComputedStyles(),this.trigger("render"),ig(this._plotArea.panes),this._navState||this._cancelDomEvents(),this._redrawFocusHighlight()},d.prototype._setComputedStyles=function(){var t=this.titleHeight();this.element.style.setProperty("--kendo-chart-computed-title-height",t+"px")},d.prototype._redrawFocusHighlight=function(){var t;this._destroyed||(t=this._focusState).legendInFocus&&t.preserveHighlight&&(this._focusElement(this._getFocusedLegendItem(),!1),this._focusState.preserveHighlight=!1)},d.prototype._setElementAccessibilityAttributes=function(){var t=this.options.title,t=wt(t)?t:t.description||t.text;t&&this.element.setAttribute("aria-roledescription",t)},d.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()},d.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}}),eg(this._originalOptions,t),this.options=O({},this._originalOptions,t),this._initTheme(this.options,this._theme),this.bindCategories(),(t=this._getModel()).renderVisual(),ig(t._plotArea.panes),e=t.visual,this.options=i):e=this.surface.exportVisual(),e},d.prototype._sharedTooltip=function(){return this._plotArea instanceof dc&&this.options.tooltip&&this.options.tooltip.shared},d.prototype._createPannable=function(){var t=this.options;!1!==t.pannable&&(this._pannable=new Tc(this._plotArea,t.pannable))},d.prototype._createZoomSelection=function(){var t=this.options.zoomable,e=(t||{}).selection;!1!==t&&!1!==e&&(this._zoomSelection=new Pc(this,e))},d.prototype._createMousewheelZoom=function(){var t=this.options.zoomable,e=(t||{}).mousewheel;!1!==t&&!1!==e&&(this._mousewheelZoom=new Mc(this,e))},d.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([Es,Bs,Is])),i=(!1===e||!1===o)&&!this.requiresHandlers([Rs,Vs,zs]),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)},d.prototype._toggleDomEvents=function(t,e){var i=this.domEvents;i&&(i.toggleDrag&&i.toggleDrag(t),i.toggleZoom)&&i.toggleZoom(e)},d.prototype._createTooltip=function(){var t=this.options.tooltip;return this._sharedTooltip()?this._createSharedTooltip(t):new hu(this.chartService,t)},d.prototype._createSharedTooltip=function(t){return new uu(this._plotArea,t)},d.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<Uf.length;l++)o=n.axisDefaults||{},r=(r=[].concat(n[i=Uf[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);Kf(d),Kf(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||[]}},d.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)}},d.prototype._getModel=function(){var t=this.options,e=this._createPlotArea(),i=new Ki(this._modelOptions()),o=(i.chart=this,i._plotArea=e,vo.buildTitle(t.title)),r=vo.buildTitle(t.subtitle,{align:t.title.align,position:t.title.position});return i.append.apply(i,vo.orderTitles([o,r])),t.legend&&t.legend.visible&&(t=new $c(e.options.legend,this.chartService),i.append(t),i._legend=t),i.append(e),i.reflow(),this._setTitleBox(o,r),i},d.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()))},d.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)},d.prototype._createPlotArea=function(t){var e=this.options;return Jc.current.create(t?[]:e.series,e,this.chartService)},d.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 su(this,r,O({min:o.min,max:o.max},n.select)),e.push(r))}},d.prototype._selectStart=function(t){return this.trigger(js,t)},d.prototype._select=function(t){return this.trigger(Ds,t)},d.prototype._selectEnd=function(t){return this.trigger(Fs,t)},d.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)},d.prototype.addObserver=function(t){t&&this.observers.push(t)},d.prototype.removeObserver=function(t){t=this.observers.indexOf(t);0<=t&&this.observers.splice(t,1)},d.prototype.requiresHandlers=function(t){for(var e=this.observers,i=0;i<e.length;i++)if(e[i].requiresHandlers(t))return!0},d.prototype.trigger=function(t,e){(e=void 0===e?{}:e).sender=this,t===Hs?e.anchor.point=this._toDocumentCoordinates(e.anchor.point):t===Ps?this._updateDrilldownPoint(e.point):t===Ms?this._resetDrilldownPoint():t===Cs?(this._focusPoint(e.point),this._startDrilldown(e.point)):t===Ss&&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},d.prototype.titleHeight=function(){return this._titleBox?this._titleBox.height():0},d.prototype._attachEvents=function(){var t,e=this.element;this._touchAction=e.style.touchAction,ie(e,((t={})[Xf]=this._clickHandler,t[Xs]=this._mousewheelHandler,t[Yf]=this._mouseleaveHandler,t[qf]=this._keydownHandler,t[Gf]=this._mousedownHandler,t.focus=this._focusHandler,t.blur=this._blurHandler,t)),this._shouldAttachMouseMove()&&ie(e,((t={})[Wf]=this._mousemoveThrottled,t)),this.domEvents=Ro.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()},d.prototype._mouseleave=function(t){this._hoveredPoint&&(this._hoveredPoint.out(this,t),this._hoveredPoint=null),this._plotAreaHovered&&(this._plotAreaHovered=!1,this.trigger(Ls)),this._hasInactiveOpacity()&&this._activeChartInstance&&(this._applySeriesOpacity(this._activeChartInstance.children,null,!0),this._updateSeriesOpacity(null,!0))},d.prototype._cancelDomEvents=function(){this.domEvents&&this.domEvents.cancel&&this.domEvents.cancel()},d.prototype._gesturestart=function(t){this._mousewheelZoom&&!this._stopChartHandlers(t)&&(this._gestureDistance=t.distance,this._unsetActivePoint(),this._clearFocusedElement(),this.surface.suspendTracking())},d.prototype._gestureend=function(t){this._zooming&&!this._stopChartHandlers(t)&&(this.surface&&this.surface.resumeTracking(),this._zooming=!1,this.trigger(zs,{}))},d.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:$f(this._plotArea.axes),originalEvent:t},!this._zooming&&this.trigger(Rs,i)||(t=this._eventCoordinates(t),this._zooming||(this._zooming=!0),(i.axisRanges=o.updateRanges(e,t))&&!this.trigger(Vs,i)&&o.zoom()))},d.prototype._mouseout=function(t){var e;t.element&&(e=this._drawingChartElement(t.element,t))&&e.leave&&e.leave(this,t.originalEvent)},d.prototype._start=function(t){var e=this._eventCoordinates(t);!this._stopChartHandlers(t)&&this._plotArea.backgroundContainsPoint(e)&&(this.requiresHandlers([Es,Bs,Is])&&this._startNavigation(t,e,Es),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(Rs,{axisRanges:$f(this._plotArea.axes),originalEvent:t})},d.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(Bs,{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(Bs,{axisRanges:r,originalEvent:t})}this._zoomSelection&&this._zoomSelection.move(t)}},d.prototype._end=function(t){var e;this._stopChartHandlers(t)||((e=this._pannable)&&e.end(t)?(this.surface.resumeTracking(),this.trigger(Is,{axisRanges:$f(this._plotArea.axes),originalEvent:t}),this._suppressHover=!1,this.chartService.panning=!1):this._endNavigation(t,Is),this._zoomSelection&&(e=this._zoomSelection.end(t))&&!this.trigger(Vs,{axisRanges:e,originalEvent:t})&&(this._zoomSelection.zoom(),this.trigger(zs,{axisRanges:e,originalEvent:t})))},d.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},d.prototype._mousewheelZoomRate=function(){var t=(this.options.zoomable||{}).mousewheel||{};return b(t.rate,.3)},d.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:$f(this._plotArea.axes),originalEvent:t};!this._zooming&&this.trigger(Rs,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(Vs,n)&&o.zoom(),this._mwTimeout=setTimeout(function(){e.trigger(zs,n),e._zooming=!1,e.surface&&e.surface.resumeTracking()},150))}else{o=this._navState;if(o=o||this._startNavigation(t,r,Rs)?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(Vs,{delta:i,axisRanges:l,originalEvent:t}),this._mwTimeout&&clearTimeout(this._mwTimeout),this._mwTimeout=setTimeout(function(){e._endNavigation(t,zs)},150)}}},d.prototype._startNavigation=function(t,e,i){var o,r=this._model._plotArea,e=r.findPointPane(e),r=r.axes.slice(0);e&&(o=$f(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}))},d.prototype._endNavigation=function(t,e){this._navState&&(this.trigger(e,{axisRanges:this._navState.axisRanges,originalEvent:t}),this._suppressHover=!1,this._navState=null)},d.prototype._getChartElement=function(t,e){var i=this.surface.eventTarget(t);if(i)return this._drawingChartElement(i,t,e)},d.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},d.prototype._eventCoordinates=function(t){t=se(t);return this._toModelCoordinates(t.x,t.y)},d.prototype._elementPadding=function(){var t,e;return this._padding||(e=(t=It(this.element,["paddingLeft","paddingTop"])).paddingLeft,this._padding={top:t.paddingTop,left:e}),this._padding},d.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)}},d.prototype._toModelCoordinates=function(t,e){var i=this.element,o=re(i),r=this._elementPadding(),i=Pe(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)},d.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)},d.prototype._click=function(t){var e=this._getChartElement(t);this._propagateClick(e,t)},d.prototype._propagateClick=function(t,e){for(var i=t;i;)i.click&&i.click(this,e),i=i.parent},d.prototype._isLegendBeforeChart=function(){var t=this.options.legend.position,e=this._legend;return e&&e.hasItems()&&(t===P||t===C)},d.prototype._focus=function(){this._preventInitialPointFocus||(this._isLegendBeforeChart()?this._focusFirstLegendItem():this._focusFirstPoint()),this._preventInitialPointFocus=!1},d.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)},d.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()},d.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()},d.prototype._focusFirstPoint=function(){var t=this._focusState.focusedPoint=this._plotArea.getFirstPoint();t&&(this._focusElement(t),this._displayTooltip(t))},d.prototype._hasFocus=function(){return this.element.ownerDocument.activeElement===this.element},d.prototype._mousedown=function(){this._hasFocus()||(this._preventInitialPointFocus=!0)},d.prototype._focusChart=function(){this._hasFocus()||(this._preventInitialPointFocus=!0,this.element.focus())},d.prototype._focusPoint=function(t){this._focusState.focusedPoint=t,this._focusChart(),this._focusElement(t,!0)},d.prototype._focusFirstLegendItem=function(){var t=this._focusState;t.focusedLegendItemIndex=0,this._focusElement(this._getFocusedLegendItem()),t.legendInFocus=!0,this._hideTooltip()},d.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)},d.prototype._getFocusedLegendItem=function(){var t=this._focusState;return this._legend.getItems()[t.focusedLegendItemIndex]},d.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))},d.prototype._clearFocusedElement=function(){var t=this._focusState;t&&(t.focusedElement&&t.focusedElement.clearFocusFromVisual&&(t.focusedElement.clearFocusFromVisual(),this._clearElementActiveDescendant()),t.focusedElement=null)},d.prototype._setElementActiveDescendant=function(t){"canvas"===this.options.renderAs&&(this._pseudoFocusedElement=this._createPseudoFocusedElement(t),this.element.append(this._pseudoFocusedElement)),this.element.setAttribute(X,t._id)},d.prototype._clearElementActiveDescendant=function(){this._pseudoFocusedElement&&(this._pseudoFocusedElement.remove(),this._pseudoFocusedElement=null),this.element.removeAttribute(X)},d.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},d.prototype._blur=function(){this._focusState.legendInFocus=!1,this._clearFocusedElement(),this._hideInactiveOpacity()},d.prototype._startHover=function(t,e){var i;return!this._suppressHover&&(t=this._drawingChartElement(t,e,function(t){return(t.hover||t.over)&&!(t instanceof rp)}),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)},d.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))},d.prototype._hideTooltip=function(){this._tooltip&&this._tooltip.hide()},d.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))},d.prototype._getInactivePoints=function(e,t){return this._getAllPointsOfType(t,e.constructor).filter(function(t){return t!==e})},d.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},d.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)},d.prototype._updateDrilldownPoint=function(t){t&&t.series&&kn.current.bindPoint(t.series,null,t.dataItem).fields.drilldown&&(this._drilldownState={cursor:this.element.style.cursor},this.element.style.cursor="pointer")},d.prototype._resetDrilldownPoint=function(){this._drilldownState&&(this.element.style.cursor=this._drilldownState.cursor,this._drilldownState=null)},d.prototype._startDrilldown=function(t){var e,i;t&&t.series&&(e=t.series,i=kn.current.bindPoint(e,null,t.dataItem).fields.drilldown)&&this.trigger("drilldown",{series:e,point:t,value:i,sender:this})},d.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))}},d.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)}},d.prototype._chartInstanceFromPoint=function(t){for(var e=t.parent;e&&!e.plotArea;)e=e.parent;return e},d.prototype._showInactiveOpacity=function(t){var e=1<this._plotArea.series.length;this._hasInactiveOpacity()?this._displayInactiveOpacity(t,e):this._highlight.show(t)},d.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)},d.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},d.prototype._getInactiveOpacityForSeries=function(t){var e=this.options.seriesDefaults.highlight.inactiveOpacity;return t.highlight.inactiveOpacity||e||t.opacity||1},d.prototype._getDefaultOpacityForSeries=function(t){return t.defaultOpacity||t.opacity||1},d.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={})[Wf]=this._mouseMoveTrackHandler,t)))},d.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={})[Wf]=this._mouseMoveTrackHandler,t)),this._unsetActivePoint(),this._clearFocusedElement(),this._mouseMoveTrackHandler=null,this._hideInactiveOpacity(r))},d.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(Ls))),this._sharedTooltip()&&this._trackSharedTooltip(e,t)},d.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()}},d.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(Ts,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))},d.prototype.hideElements=function(t){var e=this._plotArea;this._mousemoveThrottled.cancel(),e.hideCrosshairs(),this._unsetActivePoint(t)},d.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()},d.prototype._deferRedraw=function(){this._redraw()},d.prototype._clearRedrawTimeout=function(){this._redrawTimeout&&(clearInterval(this._redrawTimeout),this._redrawTimeout=null)},d.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)}},d.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 kn.current.bindPoint(t,0).fields.category}),a=s.reduce(function(t,e){return t||ua(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=kn.current.bindPoint(i,e).fields.category;a&&(e=(t=ha(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=[])},d.prototype._isBindable=function(t){for(var e=kn.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},d.prototype._noTransitionsRedraw=function(){var t,e=this.options;!1!==e.transitions&&(t=e.transitions,e.transitions=!1),this._redraw(),t&&(e.transitions=t)},d.prototype._legendItemHover=function(t,e){this._showSeriesInactiveOpacity(t,e)},d.prototype._showSeriesInactiveOpacity=function(e,i){var t=this._plotArea,o=this._highlight,r=(t.srcSeries||t.series)[e],n=u(r.type,[es,qn,Zn,Qn])?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)},d.prototype._shouldAttachMouseMove=function(){return this._plotArea.crosshairs.length||this._tooltip&&this._sharedTooltip()||this.requiresHandlers([Os,Ls])},d.prototype.updateMouseMoveHandler=function(){var t;ue(this.element,((t={})[Wf]=this._mousemoveThrottled,t)),this._shouldAttachMouseMove()&&ie(this.element,((t={})[Wf]=this._mousemoveThrottled,t))},d.prototype.applyOptions=function(t,e){eg(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()},d.prototype.setOptions=function(t,e){this.applyOptions(t,e),this.bindCategories(),this.redraw(),this.updateMouseMoveHandler(),this._restoreOverlayElement()},d.prototype.setDirection=function(t){this.chartService.rtl=Boolean(t),this.surface&&"svg"===this.surface.type&&this._destroySurface()},d.prototype.setIntlService=function(t){this.chartService.intl=t},d.prototype.noTransitionsRedraw=function(){this._noTransitionsRedraw()},d.prototype.destroy=function(){var t;this._destroyed=!0,ue(this.element,((t={})[Xf]=this._clickHandler,t[Xs]=this._mousewheelHandler,t[Wf]=this._mousemoveThrottled,t[Yf]=this._mouseleaveHandler,t[Gf]=this._mousedownHandler,t[qf]=this._keydownHandler,t.focus=this._focusHandler,t.blur=this._blurHandler,t)),this.domEvents&&(this.domEvents.destroy(),delete this.domEvents),this._mouseMoveTrackHandler&&ue(document,((t={})[Wf]=this._mouseMoveTrackHandler,t)),this._focusState=null,this.element._kendoExportVisual=null,this._destroyView(),this._destroySurface(),this._clearRedrawTimeout()},d.prototype._destroySurface=function(){var t=this.surface;t&&(t.unbind("mouseenter",this._surfaceMouseenterHandler),t.unbind("mouseleave",this._surfaceMouseleaveHandler),t.destroy(),this.surface=null)},d.prototype._destroySelections=function(){var t=this._selections;if(t)for(;0<t.length;)t.shift().destroy()},d.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)};var Jf,tg=["data","categories"];function eg(t,e){for(var i in e){var o,r,n;!u(i,tg)&&ze(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)&&eg(r,o))}}function ig(t){for(var e=0;e<t.length;e++)t[e].notifyRender()}e(d,{renderAs:"",chartArea:{},legend:{visible:!0,labels:{},accessibility:{},focusHighlight:{border:{opacity:1,color:Y,width:2}}},categoryAxis:{},seriesDefaults:{type:Yn,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 og=d,rg=((Jf=uu)&&(ng.__proto__=Jf),((ng.prototype=Object.create(Jf&&Jf.prototype)).constructor=ng).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}},ng.prototype._defaultAnchor=function(t,e){return this._slotAnchor({},e)},ng);function ng(){Jf.apply(this,arguments)}let sg=rg;var ag=[Nn,Wn];function lg(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 hg(t,e){for(var i=0;i<t.length;i++)t[i].style.display=e[i]}function pg(t){return m(t)?[t]:t}(cg=og)&&(dg.__proto__=cg),((dg.prototype=Object.create(cg&&cg.prototype)).constructor=dg).prototype._setElementClass=function(t){vt(t,"k-sparkline")},dg.prototype._initElement=function(t){cg.prototype._initElement.call(this,t),this._initialWidth=Math.floor(ne(t).width)},dg.prototype._resize=function(){var t=this.element,e=lg(t.childNodes);this._initialWidth=Math.floor(ne(t).width),hg(t.childNodes,e),cg.prototype._resize.call(this)},dg.prototype._modelOptions=function(){var t=this.options,e=this._surfaceWrap(),i=lg(e.childNodes),o=document.createElement("span"),t=(o.innerHTML="&nbsp;",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),hg(e.childNodes,i),this.surface&&this.surface.resize(),t},dg.prototype._surfaceWrap=function(){var t;return this.stage||(t=this.stage=document.createElement("span"),this.element.appendChild(t)),this.stage},dg.prototype._createPlotArea=function(t){t=cg.prototype._createPlotArea.call(this,t);return this._autoWidth=this._initialWidth||this._calculateWidth(t),t},dg.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===Nn)return 150;if(l.type===Wn)return 150;if(l.type===es)return ne(r).height;var h=a.categoryAxis;h&&(h=h.categoriesCount()*(!a.options.isStacked&&u(l.type,[Yn,gs])?a.seriesOptions.length:1),n=Math.max(n,h))}}t=n*e.pointWidth;return 0<t&&(t+=i.left+i.right),t},dg.prototype._createSharedTooltip=function(t){return new sg(this._plotArea,t)},dg.normalizeOptions=function(t){t=pg(t);return(t=yt(t)?{seriesDefaults:{data:t}}:O({},t)).series||(t.series=[{data:pg(t.data)}]),O(t,{seriesDefaults:{type:t.type}}),t=u(t.series[0].type,ag)||u(t.seriesDefaults.type,ag)?O({},{categoryAxis:{crosshair:{visible:!1}}},t):t};var cg,ug,$=dg;function dg(){cg.apply(this,arguments)}e($,{chartArea:{margin:2},axisDefaults:{visible:!1,majorGridLines:{visible:!1},valueAxis:{narrowRange:!0}},seriesDefaults:{type:"line",area:{line:{width:.5}},bar:{stack:!0},padding:2,width:.5,overlay:{gradient:null},highlight:{visible:!1},border:{width:0},markers:{size:2,visible:!1}},tooltip:{visible:!0,shared:!0},categoryAxis:{crosshair:{visible:!0,tooltip:{visible:!1}}},legend:{visible:!1},transitions:!1,pointWidth:5,panes:[{clip:!1}]});let fg=$,gg=((ug=M.drawing.Animation)&&(yg.__proto__=ug),((yg.prototype=Object.create(ug&&ug.prototype)).constructor=yg).prototype.setup=function(){this._initialOpacity=parseFloat(It(this.element,"opacity").opacity)},yg.prototype.step=function(t){It(this.element,{opacity:String(Xt(this._initialOpacity,0,t))})},yg.prototype.abort=function(){ug.prototype.abort.call(this),It(this.element,{display:"none",opacity:String(this._initialOpacity)})},yg.prototype.cancel=function(){ug.prototype.abort.call(this),It(this.element,{opacity:String(this._initialOpacity)})},yg);function yg(){ug.apply(this,arguments)}let vg=gg;function mg(t,e){var i=document.createElement("div");return i.className=t,e&&(i.style.cssText=e),i}function xg(t,e,i){this.options=O({},this.options,i),this.container=t,this.chartService=e,i=It(t,["paddingLeft","paddingTop"]),this.chartPadding={top:i.paddingTop,left:i.paddingLeft},this.createElements(),t.appendChild(this.element)}xg.prototype.createElements=function(){var t=this.element=mg("k-navigator-hint","display: none; position: absolute; top: 1px; left: 1px;"),e=this.tooltip=mg("k-tooltip k-chart-tooltip"),i=this.scroll=mg("k-scroll");e.innerHTML="&nbsp;",t.appendChild(e),t.appendChild(i)},xg.prototype.show=function(t,e,i){var o=this.element,r=this.options,n=this.scroll,s=this.tooltip,a=ir(hr(t)+hr(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=zt(r),r=(this.clearHideTimeout(),this._visible||(It(o,{visibility:"hidden",display:"block"}),this._visible=!0),r&&(c=r({from:t,to:e})),s.innerHTML=c,It(s,{left:i.center().x-s.offsetWidth/2,top:i.y1}),It(s,["marginTop","borderTopWidth","height"]));It(n,{width:l,left:h+a*p,top:i.y1+r.marginTop+r.borderTopWidth+r.height/2}),It(o,{visibility:"visible"})},xg.prototype.clearHideTimeout=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this._hideAnimation&&this._hideAnimation.cancel()},xg.prototype.hide=function(){var t=this;this.clearHideTimeout(),this._hideTimeout=setTimeout(function(){t._visible=!1,t._hideAnimation=new vg(t.element),t._hideAnimation.setup(),t._hideAnimation.play()},this.options.hideDelay)},xg.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},e(xg,{format:"{0:d} - {1:d}",hideDelay:500});let bg=xg;function _g(t){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={})[Bs]="_drag",i[Is]="_dragEnd",i[Vs]="_zoom",i[zs]="_zoomEnd",i)),t.addObserver(this.chartObserver)}var wg,kg="_navigator",Ag=kg,Sg="_default";function Cg(){}_g.prototype.parseDate=function(t){return fr(this.chart.chartService.intl,t)},_g.prototype.clean=function(){this.selection&&(this.selection.destroy(),this.selection=null),this.hint&&(this.hint.destroy(),this.hint=null)},_g.prototype.destroy=function(){this.chart&&(this.chart.removeObserver(this.chartObserver),delete this.chart),this.clean()},_g.prototype.redraw=function(){this._redrawSelf(),this.initSelection()},_g.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=(Cg.prototype=i,new Cg);0!==i.categoriesCount()&&(this.clean(),l.box=i.box,this.selection=new su(t,l,{min:r,max:o,from:s||r,to:a||o,mousewheel:b(n,{zoom:"left"}),visible:e.visible},new Zt(this,{selectStart:"_selectStart",select:"_select",selectEnd:"_selectEnd"})),e.hint.visible)&&(this.hint=new bg(t.element,t.chartService,{min:r,max:o,template:zt(e.hint),format:e.hint.format}))},_g.prototype.setRange=function(){var t=this.chart._createPlotArea(!0).namedCategoryAxes[Ag].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()},_g.prototype._redrawSelf=function(t){var e=this.chart._plotArea;e&&e.redraw(he(e.panes),t)},_g.prototype.redrawSlaves=function(){var t=this.chart,e=t._plotArea,i=e.panes.filter(function(t){return t.options.name!==kg});e.srcSeries=t.options.series,e.options.categoryAxis=t.options.categoryAxis,e.clearSeriesPointsCache(),e.redraw(i)},_g.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?hr(t.to)-hr(t.from):hr(i.options.to)-hr(i.options.from),r=ir(x(hr(e.min),n.min,hr(n.max)-o)),t=ir(x(hr(r)+o,hr(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))},_g.prototype._dragEnd=function(){this.filterAxes(),this.filter(),this.redrawSlaves(),this.hint&&this.hint.hide()},_g.prototype.readSelection=function(){var t=this.selection.options,e=t.from,t=t.to,i=this.options.select;i.from=e,i.to=t},_g.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!==kg&&(n.min=i,n.max=o)}},_g.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 Cr(O({baseUnit:"fit"},i.options.categoryAxis[0],{categories:[o.from,o.to]}),i.chartService).options,t.from=rr(e.min,-e.baseUnitStep,e.baseUnit),t.to=rr(e.max,e.baseUnitStep,e.baseUnit)),this.chart.trigger("navigatorFilter",t))},_g.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))},_g.prototype._zoomEnd=function(t){this._dragEnd(t)},_g.prototype.showHint=function(t,e){var i=this.chart._plotArea;this.hint&&this.hint.show(t,e,i.backgroundBox())},_g.prototype._selectStart=function(t){return this.chart._selectStart(t)},_g.prototype._select=function(t){return this.showHint(t.from,t.to),this.chart._select(t)},_g.prototype._selectEnd=function(t){return this.hint&&this.hint.hide(),this.readSelection(),this.filterAxes(),this.filter(),this.redrawSlaves(),this.chart._selectEnd(t)},_g.prototype.mainAxis=function(){var t=this.chart._plotArea;if(t)return t.namedCategoryAxes[Ag]},_g.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}},_g.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:kg}),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||Sg}),_g.attachAxes(t,i),_g.attachSeries(t,i,e))},_g.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||Sg}),0===aa(i,xs).length),i=O({type:"date",pane:kg,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:Ag,title:null,baseUnit:"fit",baseUnitStep:"auto",labels:{visible:!1},majorTicks:{visible:!1}}),O({},i,r,{name:Ag+"_labels",maxDateGroups:20,baseUnitStep:"auto",labels:{position:""},plotBands:[],autoBaseUnitSteps:{minutes:[]},_overlap:!0}),O({},i,r,{name:Ag+"_ticks",maxDateGroups:200,majorTicks:{width:.5},plotBands:[],title:null,labels:{visible:!1,mirror:!0},_overlap:!0})),t.push(O({name:Ag,pane:kg,majorGridLines:{visible:!1},visible:!1},e.valueAxis))},_g.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:Ag,categoryAxis:Ag,autoBind:e.autoBindElements}))};let Tg=_g,Pg=((wg=og)&&(Mg.__proto__=wg),((Mg.prototype=Object.create(wg&&wg.prototype)).constructor=Mg).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);Tg.setup(t,e),wg.prototype.applyDefaults.call(this,t,e)},Mg.prototype._setElementClass=function(t){vt(t,"k-chart k-stockchart")},Mg.prototype.setOptions=function(t){this.destroyNavigator(),wg.prototype.setOptions.call(this,t)},Mg.prototype.noTransitionsRedraw=function(){var t=this.options.transitions;this.options.transitions=!1,this._fullRedraw(),this.options.transitions=t},Mg.prototype._resize=function(){this.noTransitionsRedraw()},Mg.prototype._redraw=function(){var t=this.navigator;!this._dirty()&&t&&t.options.partialRedraw?t.redrawSlaves():this._fullRedraw()},Mg.prototype._dirty=function(){var t=this.options,t=[].concat(t.series,t.navigator.series),t=Nt(t,function(t){return t&&t.visible}).length,e=this._seriesCount!==t;return this._seriesCount=t,e},Mg.prototype._fullRedraw=function(){var t=this.navigator;t||(t=this.navigator=new Tg(this),this.trigger("navigatorCreated",{navigator:t})),t.clean(),t.setRange(),wg.prototype._redraw.call(this),t.initSelection()},Mg.prototype._trackSharedTooltip=function(t){var e=this._plotArea.paneByPoint(t);e&&e.options.name===kg?this._unsetActivePoint():wg.prototype._trackSharedTooltip.call(this,t)},Mg.prototype.bindCategories=function(){wg.prototype.bindCategories.call(this),this.copyNavigatorCategories()},Mg.prototype.copyNavigatorCategories=function(){for(var t,e=[].concat(this.options.categoryAxis),i=0;i<e.length;i++){var o=e[i];o.name===Ag?t=o.categories:t&&o.pane===kg&&(o.categories=t)}},Mg.prototype.destroyNavigator=function(){this.navigator&&(this.navigator.destroy(),this.navigator=null)},Mg.prototype.destroy=function(){this.destroyNavigator(),wg.prototype.destroy.call(this)},Mg.prototype._stopChartHandlers=function(t){var e=this._eventCoordinates(t),e=this._plotArea.paneByPoint(e);return wg.prototype._stopChartHandlers.call(this,t)||e&&e.options.name===kg},Mg.prototype._toggleDragZoomEvents=function(){this._dragZoomEnabled||(this.element.style.touchAction="none",this._dragZoomEnabled=!0)},Mg);function Mg(){wg.apply(this,arguments)}e(Pg,{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 Og=Pg;var Lg="arrowPointer",Bg="barPointer",Ig=Math.PI/180,Eg="inside",Va="linear",Rg="outside",Vh="radialPointer",Ka="radialRangePointer";function Vg(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 zg=M.drawing.Group,jg=M.drawing.Path,Dg=M.drawing.Text;function Fg(t,e){var i=t.box,o=t.children[0].box,r=e.border||{},n=e.background||"",i=jg.fromRect(new M.geometry.Rect([i.x1,i.y1],[i.width(),i.height()]),{stroke:{}}),t=new Dg(t.text,new M.geometry.Point(o.x1,o.y1),{font:e.font,fill:{color:e.color}}),o=Vg(t.bbox().clone(),e.padding),e=jg.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 zg;return o.append(i),o.append(e),o.append(t),o}function Hg(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 Ng(t,e){e=w(e);return e.left=-e.left,e.top=-e.top,e.right=-e.right,e.bottom=-e.bottom,Vg(t,e)}function Ug(t,e,i,o){void 0===o&&(o={}),this.element=t,this.theme=i,this.contextService=new Bo(this,o),this._originalOptions=O({},this.options,e),this.options=O({},this._originalOptions),this._initTheme(i),this.redraw()}var Gg=M.drawing.Path,Wg=M.drawing.Surface;Ug.prototype.destroy=function(){this.surface&&(this.surface.destroy(),this.surface=null),delete this.element,delete this.surfaceElement},Ug.prototype.value=function(t){var e=this.pointers[0];if(0===arguments.length)return e.value();e.value(t),this._setValueOptions(t)},Ug.prototype._draw=function(){var t=this.surface;t.clear(),t.draw(this._visuals)},Ug.prototype.exportVisual=function(){return this._visuals},Ug.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)},Ug.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]},Ug.prototype.resize=function(){this.noTransitionsRedraw()},Ug.prototype.noTransitionsRedraw=function(){var t=this.options.transitions;this._toggleTransitions(!1),this.redraw(),this._toggleTransitions(t)},Ug.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(),Ng(t.bbox(),this._gaugeAreaMargin));this.reflow(t)},Ug.prototype.setOptions=function(t,e){this._originalOptions=O(this._originalOptions,t),this.options=O({},this._originalOptions),this._initTheme(e),this.redraw()},Ug.prototype.setDirection=function(t){this.contextService.rtl=Boolean(t),this.surface&&"svg"===this.surface.type&&(this.surface.destroy(),this.surface=null)},Ug.prototype.setIntlService=function(t){this.contextService.intl=t},Ug.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}},Ug.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=Ng(e,i.width)),Gg.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}})},Ug.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=Wg.create(i,{type:t.renderAs}))},Ug.prototype._surfaceSize=function(){var t=this.options,e=this._getSize();return t.gaugeArea&&O(e,t.gaugeArea),e},Ug.prototype._surfaceElement=function(){return this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.element.appendChild(this.surfaceElement)),this.surfaceElement},Ug.prototype.getSize=function(){return this._getSize()},Ug.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}},Ug.prototype._defaultSize=function(){return{width:200,height:200}},Ug.prototype._toggleTransitions=function(t){this.options.transitions=t;for(var e=0;e<this.pointers.length;e++)this.pointers[e].options.animation.transitions=t},e(Ug,{plotArea:{},theme:"default",renderAs:"",pointer:{},scale:{},gaugeArea:{}});let Xg=Ug;var Yg=M.drawing.Path,qg=M.drawing.Group,Zg=M.geometry.Point;function Qg(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 Zg(l,a),new Zg(l+n.size,a)):(s=new Zg(a,h),new Zg(a,h+n.size)),new Yg({stroke:{color:n.color,width:n.width}}).moveTo(s).lineTo(r))))}(Kg=Rr)&&($g.__proto__=Kg),(($g.prototype=Object.create(Kg&&Kg.prototype)).constructor=$g).prototype.initUserOptions=function(t){t=O({},this.options,t);return(t=O({},t,{labels:{mirror:t.mirror}})).majorUnit=t.majorUnit||ki(t.min,t.max),t},$g.prototype.initFields=function(){},$g.prototype.render=function(){var t=this.elements=new qg,e=this.renderLabels(),i=this.renderLine(),o=this.renderTicks(),r=this.renderRanges();return t.append(i,e,o,r),t},$g.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 qg,a=n.length,l=t.rangeSize||t.minorTicks.size/2,h=0;h<a;h++){var p=Hg(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(Yg.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},$g.prototype.renderLabels=function(){for(var t=this.labels,e=this.options,i=new qg,o=0;o<t.length;o++)i.append(Fg(t[o],e.labels));return i},$g.prototype.renderLine=function(){var t=this.options.line,e=this.lineBox(),i=new qg;return 0<t.width&&t.visible&&((t=new Yg({stroke:{color:t.color,dashType:t.dashType,width:t.width}})).moveTo(e.x1,e.y1).lineTo(e.x2,e.y2),i.append(t)),i},$g.prototype.renderTicks=function(){var t=new qg,e=this.options,i=e.majorTicks.visible?e.majorUnit:0,o={vertical:e.vertical,mirror:e.labels.mirror,lineBox:this.lineBox()};return Qg(t,this.getMajorTickPositions(),o,e.majorTicks),Qg(t,this.getMinorTickPositions(),o,O({},{skipUnit:i/e.minorUnit},e.minorTicks)),t};var Kg,l=$g;function $g(t,e){t=t||{};!k(t.reverse)&&!1===t.vertical&&(e||{}).rtl&&(t=Object.assign({},t,{reverse:!0})),Kg.call(this,0,1,t,e),this.options.minorUnit=this.options.minorUnit||this.options.majorUnit/10}e(l,{min:0,max:50,majorTicks:{size:15,align:Eg,color:Y,width:.5,visible:!0},minorTicks:{size:10,align:Eg,color:Y,width:.5,visible:!0},line:{width:.5},labels:{position:Eg,padding:2},mirror:!1,_alignLines:!1});function Jg(t,e){var i=(o=t.options).min,o=o.max;(e=this.options=O({},this.options,e)).fill=e.color,this.scale=t,k(e.value)?e.value=x(e.value,i,o):e.value=i}let ty=l;Jg.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()},e(Jg,{color:Y});var ey,iy,bs=Jg,t=((ey=bs)&&(oy.__proto__=ey),((oy.prototype=Object.create(ey&&ey.prototype)).constructor=oy).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 B(r.x1+h,r.y1,r.x1+h,r.y2),s?i.x1-=a:i.x2+=a,o.shape!==Bg&&(t=e=new B(r.x2+h,r.y1-l,r.x2+h,r.y2+l))):(i=new B(r.x1,r.y1-h,r.x2,r.y1-h),s?i.y2+=a:i.y1-=a,o.shape!==Bg&&(t=e=new B(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)},oy.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}},oy.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"]},oy);function oy(t,e){ey.call(this,t,e),this.options=O({track:{visible:k(e.track)}},this.options)}e(t,{shape:Bg,track:{border:{width:1}},color:Y,border:{width:1},opacity:1,margin:w(3),animation:{type:Bg},visible:!0});let ry=t,ny=((iy=M.drawing.Animation)&&(sy.__proto__=iy),((sy.prototype=Object.create(iy&&iy.prototype)).constructor=sy).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))},sy.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))},sy);function sy(){iy.apply(this,arguments)}e(ny,{easing:Va,duration:250}),M.drawing.AnimationFactory.current.register(Lg,ny);let ay=ny;var ly,hy,py=M.geometry.Point,cy=M.drawing.Path;function uy(t,e){ly.call(this,t,e),k(this.options.size)||(this.options.size=.6*this.scale.options.majorTicks.size)}(ly=ry)&&(uy.__proto__=ly),((uy.prototype=Object.create(ly&&ly.prototype)).constructor=uy).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 py(0,0-i),new py(0-o*e,0),new py(0,0+i)]:[new py(0-i,0),new py(0,0+o*e),new py(0+i,0)]},uy.prototype.repaint=function(){var t=this.scale,e=this.options,t=new ay(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()},uy.prototype.render=function(){var t=this.scale,e=this.options,i=this.getElementOptions(),o=this.pointerShape(e.value),i=(e.animation.type=Lg,new cy({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 dy=uy,fy=((hy=M.drawing.Animation)&&(gy.__proto__=hy),((gy.prototype=Object.create(hy&&hy.prototype)).constructor=gy).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)},gy.prototype.step=function(t){t=Xt(this.from,this.to,t);this._set(t)},gy.prototype._set=function(t){var e="set"+this.axis.toUpperCase(),i=this.options.newPoints;i[0][e](t),i[1][e](t)},gy);function gy(){hy.apply(this,arguments)}e(fy,{easing:Va,speed:250}),M.drawing.AnimationFactory.current.register(Bg,fy);let yy=fy;var vy,my=M.drawing.Group,xy=M.drawing.Path;function by(t,e){vy.call(this,t,e),k(this.options.size)||(this.options.size=.3*this.scale.options.majorTicks.size)}(vy=ry)&&(by.__proto__=vy),((by.prototype=Object.create(vy&&vy.prototype)).constructor=by).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]},by.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 yy(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()},by.prototype.render=function(){var t=new my,e=this.getElementOptions(),e=(this.options.track.visible&&t.append(this.renderTrack()),this.pointerPath=new xy({stroke:e.stroke,fill:e.fill}));return t.append(e),this.elements=t},by.prototype.renderTrack=function(){var t=this.options.track,e=t.border||{},i=this.trackBox.clone().pad(e.width||0);return new xy.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 _y=by;var wy,ky=M.drawing.Group,i=((wy=Xg)&&(Ay.__proto__=wy),((Ay.prototype=Object.create(wy&&wy.prototype)).constructor=Ay).prototype.reflow=function(t){var e=this.pointers,i=t.origin.x,o=t.origin.y,i=new B(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()},Ay.prototype._buildVisual=function(){var t=new ky,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},Ay.prototype._createModel=function(){var t=this.options,e=this.scale=new ty(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?dy:_y;this.pointers.push(new n(e,r))}},Ay.prototype._defaultSize=function(){var t=this.options.scale.vertical;return{width:t?60:200,height:t?200:60}},Ay.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 B(r.x-e,t.y1,r.x+e,t.y2)):(e=n.height()/2,new B(t.x1,r.y-e,t.x2,r.y+e))},Ay.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 B(o.x1+t,n.y1,o.x2+t,n.y2))):(t=n.center().y-r.center().y,e.reflow(new B(o.x1,o.y1+t,o.x2,o.y2+t)));for(var a=0;a<i.length;a++)i[a].reflow(this.bbox)},Ay.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))},Ay.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)},Ay);function Ay(){wy.apply(this,arguments)}e(i,{transitions:!0,gaugeArea:{background:""},scale:{vertical:!0}});let Sy=i;var Cy=M.drawing.Arc,Ty=M.drawing.Path,Py=M.drawing.Group;function My(t,e,i,o){var r=new Py,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 Ty({stroke:{color:o.color,width:o.width}}).moveTo(l).lineTo(h))}return r}function Oy(t,e,i,o){return{from:t,to:e,color:i,opacity:o}}(Ly=Rr)&&(Iy.__proto__=Ly),((Iy.prototype=Object.create(Ly&&Ly.prototype)).constructor=Iy).prototype.initUserOptions=function(t){t=O({},this.options,t);return t.majorUnit=t.majorUnit||ki(t.min,t.max),t.minorUnit=t.minorUnit||t.majorUnit/10,t},Iy.prototype.initFields=function(){},Iy.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()},Iy.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()},Iy.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},Iy.prototype.hasRanges=function(){var t=this.options.ranges;return t&&t.length},Iy.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},Iy.prototype.labelsCount=function(){var t=Ly.prototype.labelsCount.call(this),e=this.options;return 360<=e.endAngle-e.startAngle&&e.max%e.majorUnit==0&&--t,t},Iy.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 Py,s=.05*i,a=(k(t.rangeDistance)?s=t.rangeDistance:t.rangeDistance=s,t.labels),l=a.position===Eg,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)*Ig,m=e.pointAt(m),b=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 B(b-y,m-v,b+y,m+v)),new M.geometry.Point(g.box.x1,g.box.y1)),b=void 0;h?(y=(b=this.labelElements.children[f]).bbox().origin,(m=b.transform()||M.geometry.transform()).translate(x.x-y.x,x.y-y.y),b.transform(m)):(b=Fg(g,t.labels),n.append(b)),this.bbox=M.geometry.Rect.union(this.bbox,b.bbox())}return n},Iy.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===Eg&&(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())}},Iy.prototype.renderRanges=function(){var t=this.rangeSegments(),e=t.length,i=new Py;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},Iy.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 Cy(i,{stroke:{width:r,color:o.color,opacity:o.opacity,lineCap:o.lineCap}})},Iy.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(Oy(r,n,s));for(var a=0;a<i;a++)for(var l=Hg(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(Oy(l.from,l.to,l.color,l.opacity)),c.from<=l.to&&l.to<=c.to&&o.push(Oy(l.to,c.to,s,l.opacity)),c.to=l.from;break}}}return o},Iy.prototype.getRangeRadius=function(){var t=this.arc,e=this.options,i=e.rangeSize,o=e.rangeDistance,r=e.majorTicks.size;return e.labels.position===Rg?t.getRadiusX()-r-o-i:t.getRadiusX()-i},Iy.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})},Iy.prototype.renderTicks=function(){var t,e=this.arc,i=this.options,o=e.clone(),r=(this.majorTickAngles=this.tickAngles(e,i.majorUnit),this.majorTicks=My(o,this.majorTickAngles,i.majorUnit,i.majorTicks),new Py),n=(r.append(this.majorTicks),i.majorTicks.size),s=i.minorTicks.size;return this._tickDifference=n-s,i.labels.position===Rg&&(t=o.getRadiusX(),o.setRadiusX(t-n+s).setRadiusY(t-n+s)),this.minorTickAngles=this.normalizeTickAngles(this.tickAngles(e,i.minorUnit)),this.minorTicks=My(o,this.minorTickAngles,i.minorUnit,i.minorTicks),r.append(this.minorTicks),r},Iy.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},Iy.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},Iy.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)},Iy.prototype.repositionTicks=function(t,e,i){var o=i&&this._tickDifference||0,r=this.arc,n=r.getRadiusX();i&&this.options.labels.position===Rg&&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 Ly,By,ws=Iy;function Iy(t,e){Ly.call(this,0,1,t,e)}e(ws,{min:0,max:100,majorTicks:{size:15,align:Eg,color:Y,width:.5,visible:!0},minorTicks:{size:10,align:Eg,color:Y,width:.5,visible:!0},startAngle:-30,endAngle:210,labels:{position:Eg,padding:2}});let Ey=ws,Ry=((By=M.drawing.Animation)&&(Vy.__proto__=By),((Vy.prototype=Object.create(By&&By.prototype)).constructor=Vy).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))},Vy);function Vy(t,e){By.call(this,t,e);t=this.options;t.duration=Math.max(Math.abs(t.newAngle-t.oldAngle)/t.duration*1e3,1)}e(Ry,{easing:Va,duration:150}),M.drawing.AnimationFactory.current.register(Vh,Ry);let zy=Ry;var jy,Dy=M.drawing.Circle,Fy=M.drawing.Group,Hy=M.drawing.Path,ks=((jy=bs)&&(Ny.__proto__=jy),((Ny.prototype=Object.create(jy&&jy.prototype)).constructor=Ny).prototype.setAngle=function(t){this.elements.transform(M.geometry.transform().rotate(t,this.center))},Ny.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 zy(this.elements,O(e.animation,{oldAngle:i,newAngle:t})).play()},Ny.prototype.render=function(){var t=this.scale,e=this.options,i=new Fy;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(Ig),i},Ny.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))},Ny.prototype._renderNeedle=function(){var t=this.scale.options.minorTicks.size,e=this.center,i=this.options.color,i=new Hy({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},Ny.prototype._renderCap=function(){var t=this.options,t=t.cap.color||t.color,e=new M.geometry.Circle(this.center,this.capSize);return new Dy(e,{fill:{color:t},stroke:{color:t}})},Ny);function Ny(){jy.apply(this,arguments)}e(ks,{cap:{size:.05},arrow:{width:16,height:14},animation:{type:Vh,duration:150}});let Uy=ks;var Gy,Wy,Xy,Yy,qy,Zy,Qy=M.drawing.Group,_s=((Gy=Xg)&&(Ky.__proto__=Gy),((Ky.prototype=Object.create(Gy&&Gy.prototype)).constructor=Ky).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()},Ky.prototype._buildVisual=function(t,e,i){var o=this._visuals=new Qy;o.append(t),o.append(i.ticks),o.append(i.ranges),this._buildPointers(e),o.append(i.labelElements)},Ky.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)}},Ky.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)},Ky.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)},Ky.prototype.getDiff=function(t,e){return Math.min(e.width()-t.width(),e.height()-t.height())},Ky.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)},Ky.prototype._createModel=function(){var t=this.options,e=t.pointer,i=this.scale=new Ey(t.scale,this.contextService);this.pointers=[];for(var o=yt(e)?e:[e],r=0;r<o.length;r++){var n=new Uy(i,O({},o[r],{animation:{transitions:t.transitions}}));this.pointers.push(n)}},Ky);function Ky(){Gy.apply(this,arguments)}e(_s,{transitions:!0,gaugeArea:{background:""}});let $y=_s,Jy=((Wy=Ey)&&(tv.__proto__=Wy),((tv.prototype=Object.create(Wy&&Wy.prototype)).constructor=tv).prototype.rangeSegments=function(){var t=this.options;return[{from:t.min,to:t.max,color:t.rangePlaceholderColor,lineCap:t.rangeLineCap}]},tv.prototype.hasRanges=function(){return!0},tv.prototype.placeholderRangeAngle=function(t){var e=this.ranges.children[0].geometry();this.options.reverse?e.setEndAngle(t):e.setStartAngle(t)},tv.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},tv);function tv(){Wy.apply(this,arguments)}e(Jy,{min:0,max:100,majorTicks:{visible:!1},minorTicks:{visible:!1},labels:{visible:!1},startAngle:0,endAngle:180,rangeLineCap:"round"});let ev=Jy,iv=((Xy=M.drawing.Animation)&&(ov.__proto__=Xy),((ov.prototype=Object.create(Xy&&Xy.prototype)).constructor=ov).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()))},ov);function ov(t,e){Xy.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(iv,{easing:Va,duration:150}),M.drawing.AnimationFactory.current.register(Ka,iv);let rv=iv,nv=((Yy=bs)&&(sv.__proto__=Yy),((sv.prototype=Object.create(Yy&&Yy.prototype)).constructor=sv).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 rv(this,O(e.animation,{oldAngle:i,newAngle:t})),this.animation.play())},sv.prototype.angle=function(t){var e=this.elements.geometry();this.scale.options.reverse?e.setStartAngle(t):e.setEndAngle(t),this.scale.placeholderRangeAngle(t)},sv.prototype.stroke=function(t){this.elements.stroke(t)},sv.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}))},sv.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},sv.prototype.reflow=function(){this.render(),this.bbox=this.elements.bbox()},sv);function sv(){Yy.apply(this,arguments)}e(nv,{animation:{type:Ka,duration:150}});let av=nv,lv=((qy=$y)&&(hv.__proto__=qy),((hv.prototype=Object.create(qy&&qy.prototype)).constructor=hv).prototype._initTheme=function(t){qy.prototype._initTheme.call(this,t),this.options.color=this.options.color||(this.theme.pointer||{}).color},hv.prototype._createModel=function(){var t=this.options,e=this.scale=new ev(t.scale,this.contextService),e=new av(e,O({},{colors:t.colors,color:t.color,value:t.value,opacity:t.opacity,animation:{transitions:t.transitions}}));this.pointers=[e]},hv.prototype._buildPointers=function(t){for(var e=0;e<t.length;e++){var i=t[e];i.render(),i.value(i.options.value)}},hv.prototype._setValueOptions=function(t){this.options.value=t},hv.prototype.currentColor=function(){var t=this.pointers[0];if(t)return t.currentColor()},hv.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}},hv);function hv(){qy.apply(this,arguments)}let pv=lv,cv=((Zy=pv)&&(uv.__proto__=Zy),((uv.prototype=Object.create(Zy&&Zy.prototype)).constructor=uv).prototype._createModel=function(){var t=this.options.scale;"number"!=typeof t.startAngle&&(t.startAngle=90),t.endAngle=t.startAngle+360,Zy.prototype._createModel.call(this)},uv);function uv(){Zy.apply(this,arguments)}function dv(t){this.setOptions(t),this.initProperties()}let fv=cv;dv.prototype.initProperties=function(){},dv.prototype.setOptions=function(t){this.options=Object.assign({},this.options,t),this.quietZoneLength=this.options.addQuietZone?2*this.options.quietZoneLength:0},dv.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}},dv.prototype.initValue=function(){},dv.prototype.addQuietZone=function(){this.pattern.push(this.options.quietZoneLength||10)},dv.prototype.addData=function(){},dv.prototype.invalidCharacterError=function(t){throw new Error('Character "'+t+'" is not valid for symbology '+this.name+".")},e(dv,{quietZoneLength:10,addQuietZone:!0,addCheckSum:!0});var gv,yv=Object.assign,$=((gv=dv)&&(vv.__proto__=gv),((vv.prototype=Object.create(gv&&gv.prototype)).constructor=vv).prototype.initProperties=function(){gv.prototype.initProperties.call(this),yv(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"})},vv.prototype.initValue=function(t,e){this.pattern=[],this.value=t,this.width=e,this.totalUnits=0},vv.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()},vv.prototype.setBaseUnit=function(){this.baseUnit=this.width/(this.totalUnits+this.quietZoneLength)},vv.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]))},vv.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},vv.prototype.weightedValue=function(t,e,i,o){return((e-i)%o||o)*t},vv.prototype.getValue=function(t){return isNaN(t)?(t!==this.DASH&&this.invalidCharacterError(t),this.DASH_VALUE):parseInt(t,10)},vv.prototype.addCharacter=function(t){t=this.getValue(t),t=this.characterMap[t];this.addPattern(t)},vv.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},vv);function vv(){gv.apply(this,arguments)}e($,{addCheckSum:!0});var mv,xv,bv=Object.assign,l=((xv=dv)&&(wv.__proto__=xv),((wv.prototype=Object.create(xv&&xv.prototype)).constructor=wv).prototype.initProperties=function(){xv.prototype.initProperties.call(this),bv(this,{minBaseUnitLength:.7})},wv.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()},wv.prototype.addCharacter=function(t){var e=this.characterMap[t];e||this.invalidCharacterError(t),this.addBase(e)},wv.prototype.addBase=function(){},wv),t=((mv=l)&&(_v.__proto__=mv),((_v.prototype=Object.create(mv&&mv.prototype)).constructor=_v).prototype.initProperties=function(){mv.prototype.initProperties.call(this),bv(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"}}})},_v.prototype.initValue=function(t,e,i){this.width=e,this.height=i,this.value=t,this.dataLength=t.length,this.pattern=[],this.patternString=""},_v.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))},_v.prototype.getBaseUnit=function(t){return this.width/this.getBaseWidth(t)},_v.prototype.getBaseWidth=function(t){return this.quietZoneLength+3*(t+2)*(this.dataLength+2)+this.gapWidth*(this.dataLength+1)},_v.prototype.addStart=function(){this.addPattern(this.characterMap.START.pattern),this.addCharacterGap()},_v.prototype.addBase=function(t){this.addPattern(t.pattern),this.addCharacterGap()},_v.prototype.addStop=function(){this.addPattern(this.characterMap.START.pattern)},_v.prototype.addPattern=function(t){for(var e=0;e<t.length;e++)this.patternString+=this.patternMappings[t.charAt(e)]},_v.prototype.addCharacterGap=function(){this.patternString+=this.gapWidth+this.splitCharacter},_v);function _v(){mv.apply(this,arguments)}function wv(){xv.apply(this,arguments)}e(t,{addCheckSum:!1});function kv(t){this.encoding=t,this.initProperties()}var Av,Sv,Cv,Tv,Pv={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"]},i=((Tv=t)&&(jv.__proto__=Tv),((jv.prototype=Object.create(Tv&&Tv.prototype)).constructor=jv).prototype.initProperties=function(){Tv.prototype.initProperties.call(this),O(this,Pv,{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}}})},jv),Mv=Object.assign,ws=((Cv=l)&&(zv.__proto__=Cv),((zv.prototype=Object.create(Cv&&Cv.prototype)).constructor=zv).prototype.initProperties=function(){Cv.prototype.initProperties.call(this),Mv(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"}})},zv.prototype.initValue=function(t,e,i){this.value=t,this.width=e,this.height=i,this.pattern=[],this.values=[],this.dataLength=t.length},zv.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.")},zv.prototype.setBaseUnit=function(){this.baseUnit=this.width/(9*(this.dataLength+2+2)+this.quietZoneLength+1)},zv.prototype.addStart=function(){var t=this.characterMap.START.pattern;this.addPattern(t)},zv.prototype.addStop=function(){this.addStart(),this.pattern.push(this.characterMap.TERMINATION_BAR)},zv.prototype.addBase=function(t){this.addPattern(t.pattern),this.values.push(t.value)},zv.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)},zv.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]},zv.prototype._findCharacterByValue=function(t){for(var e in this.characterMap)if(this.characterMap[e].value===t)return e},zv.prototype.weightedValue=function(t,e,i){return(e%i||i)*t},zv.prototype.addPattern=function(t){for(var e,i=0;i<t.length;i++)e=parseInt(t.charAt(i),10),this.pattern.push(e)},zv),Vh=((Sv=ws)&&(Vv.__proto__=Sv),((Vv.prototype=Object.create(Sv&&Sv.prototype)).constructor=Vv).prototype.initProperties=function(){Sv.prototype.initProperties.call(this),O(this,Pv,{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))}})},Vv),Ov=/^\d+$/,Lv=Object.assign,ks=((Av=dv)&&(Rv.__proto__=Av),((Rv.prototype=Object.create(Av&&Av.prototype)).constructor=Rv).prototype.initProperties=function(){Av.prototype.initProperties.call(this),Lv(this,{name:"Postnet",START:"2",VALID_CODE_LENGTHS:[5,9,11],DIGIT_SEPARATOR:"-",characterMap:["22111","11122","11212","11221","12112","12121","12211","21112","21121","21211"]})},Rv.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()},Rv.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()},Rv.prototype.addCharacter=function(t){var e=this.characterMap[t];this.checkSum+=parseInt(t,10),this.addPattern(e)},Rv.prototype.addCheckSum=function(){this.checksum=(10-this.checkSum%10)%10,this.addCharacter(this.checksum)},Rv.prototype.setBaseUnit=function(){this.baseUnit=this.width/(10*(this.value.length+1)+3+this.quietZoneLength)},Rv.prototype.validate=function(t){if(Ov.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(",")+".")},Rv.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)},Rv),Bv=/^\d+$/,Iv=/^[a-z0-9]+$/i,Ev=Object.assign;function Rv(){Av.apply(this,arguments)}function Vv(){Sv.apply(this,arguments)}function zv(){Cv.apply(this,arguments)}function jv(){Tv.apply(this,arguments)}kv.prototype.initProperties=function(){},kv.prototype.addStart=function(){},kv.prototype.is=function(){},kv.prototype.isCode=function(){return!1},kv.prototype.move=function(){},kv.prototype.pushState=function(){};(Dv=kv)&&(Xv.__proto__=Dv),((Xv.prototype=Object.create(Dv&&Dv.prototype)).constructor=Xv).prototype.initProperties=function(){Dv.prototype.initProperties.call(this),O(this,{FNC4:"FNC4",SHIFT:98})},Xv.prototype.addStart=function(){this.encoding.addPattern(this.START)},Xv.prototype.is=function(t,e){t=t.charCodeAt(e);return this.isCode(t)},Xv.prototype.move=function(t){for(var e=0;!this._moves[e].call(this,t)&&e<this._moves.length;)e++},Xv.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++},Xv.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)},Xv.prototype._moveFNC=function(t){if(t.fnc)return t.fnc=!1,t.previousState===this.key},Xv.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},Xv.prototype._moveState=function(){return this.encoding.addPattern(this.MOVE),!0};var Dv,Fv,Hv,Nv,Uv,Gv,_s=Xv,Wv={};function Xv(t,e){Dv.call(this,t),this.states=e,this._initMoves(e)}function Yv(t,e){Fv.call(this,t),this.states=e}function qv(t,e){Hv.call(this,t),this._initSubStates(e)}function Zv(){Nv.apply(this,arguments)}function Qv(){Uv.apply(this,arguments)}function Kv(){Gv.apply(this,arguments)}Wv.A=((Gv=_s)&&(Kv.__proto__=Gv),((Kv.prototype=Object.create(Gv&&Gv.prototype)).constructor=Kv).prototype.initProperties=function(){Gv.prototype.initProperties.call(this),Ev(this,{key:"A",shiftKey:"B",MOVE:101,START:103})},Kv.prototype.isCode=function(t){return 0<=t&&t<96},Kv.prototype.getValue=function(t){return t<32?t+64:t-32},Kv),Wv.B=((Uv=_s)&&(Qv.__proto__=Uv),((Qv.prototype=Object.create(Uv&&Uv.prototype)).constructor=Qv).prototype.initProperties=function(){Uv.prototype.initProperties.call(this),Ev(this,{key:"B",shiftKey:"A",MOVE:100,START:104})},Qv.prototype.isCode=function(t){return 32<=t&&t<128},Qv.prototype.getValue=function(t){return t-32},Qv),Wv.C=((Nv=kv)&&(Zv.__proto__=Nv),((Zv.prototype=Object.create(Nv&&Nv.prototype)).constructor=Zv).prototype.initProperties=function(){Nv.prototype.initProperties.call(this),Ev(this,{key:"C",MOVE:99,START:105})},Zv.prototype.addStart=function(){this.encoding.addPattern(this.START)},Zv.prototype.is=function(t,e){var i=pm(t,e,4);return(e+4<=t.length||2===t.length)&&Bv.test(i)},Zv.prototype.move=function(){this.encoding.addPattern(this.MOVE)},Zv.prototype.pushState=function(t){for(var e;(e=pm(t.value,t.index,2))&&Bv.test(e)&&2===e.length;)this.encoding.addPattern(parseInt(e,10)),t.index+=2},Zv.prototype.getValue=function(t){return t},Zv),Wv.FNC4=((Hv=kv)&&(qv.__proto__=Hv),((qv.prototype=Object.create(Hv&&Hv.prototype)).constructor=qv).prototype.initProperties=function(){Hv.prototype.initProperties.call(this),Ev(this,{key:"FNC4",dependentStates:["A","B"]})},qv.prototype.addStart=function(t){t=t.value.charCodeAt(0)-128,t=this._getSubState(t);this.encoding[t].addStart()},qv.prototype.is=function(t,e){t=t.charCodeAt(e);return this.isCode(t)},qv.prototype.isCode=function(t){return 128<=t&&t<256},qv.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},qv.prototype._pushStart=function(t){this.encoding.addPattern(this.encoding[t.state].MOVE),this.encoding.addPattern(this.encoding[t.state].MOVE)},qv.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},qv.prototype._initSubStates=function(t){this.subStates=[];for(var e=0;e<t.length;e++)u(t[e],this.dependentStates)&&this.subStates.push(t[e])},qv.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]},qv.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},qv),Wv.FNC1=((Fv=kv)&&(Yv.__proto__=Fv),((Yv.prototype=Object.create(Fv&&Fv.prototype)).constructor=Yv).prototype.initProperties=function(){Fv.prototype.initProperties.call(this),Ev(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})},Yv.prototype.addStart=function(){this.encoding[this.startState].addStart()},Yv.prototype.is=function(){return u(this.key,this.states)},Yv.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},Yv.prototype.validate=function(t,e){var e=e.substr(t.id.length),i=t.ai;if(!i.type&&!Bv.test(e))throw new Error("Application identifier "+t.id+" is numeric only but contains non numeric character(s).");if("alphanumeric"===i.type&&!Iv.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.")},Yv.prototype.getByLength=function(t,e){for(var i,o,r=2;r<=4;r++)if(i=pm(t,e,r),o=this.getApplicationIdentifier(i)||this.getApplicationIdentifier(i.substring(0,i.length-1)))return{id:i,ai:o};this.unsupportedAIError(i)},Yv.prototype.unsupportedAIError=function(t){throw new Error("'"+t+"' is not a supported Application Identifier")},Yv.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}},Yv.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}},Yv);(om=dv)&&(hm.__proto__=om),((hm.prototype=Object.create(om&&om.prototype)).constructor=hm).prototype.initProperties=function(){om.prototype.initProperties.call(this),Ev(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})},hm.prototype._initStates=function(){for(var t=0;t<this.states.length;t++)this[this.states[t]]=new Wv[this.states[t]](this,this.states)},hm.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},hm.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())},hm.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))}},hm.prototype.addStart=function(t){this[t.state].addStart(t),this.position=1},hm.prototype.addCheckSum=function(){this.checksum=this.checkSum%103,this.addPattern(this.checksum)},hm.prototype.addStop=function(){this.addPattern(this.STOP)},hm.prototype.setBaseUnit=function(){this.baseUnit=this.width/(this.totalUnits+this.quietZoneLength)},hm.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++},hm.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 $v,Jv,tm,em,im,om,Va=hm,bs=((im=Va)&&(lm.__proto__=im),((lm.prototype=Object.create(im&&im.prototype)).constructor=lm).prototype.initProperties=function(){im.prototype.initProperties.call(this),Ev(this,{name:"Code 128 A",states:["A"]})},lm),Ka=((em=Va)&&(am.__proto__=em),((am.prototype=Object.create(em&&em.prototype)).constructor=am).prototype.initProperties=function(){em.prototype.initProperties.call(this),Ev(this,{name:"Code 128 B",states:["B"]})},am),l=((tm=Va)&&(sm.__proto__=tm),((sm.prototype=Object.create(tm&&tm.prototype)).constructor=sm).prototype.initProperties=function(){tm.prototype.initProperties.call(this),Ev(this,{name:"Code 128 C",states:["C"]})},sm),_s=((Jv=Va)&&(nm.__proto__=Jv),((nm.prototype=Object.create(Jv&&Jv.prototype)).constructor=nm).prototype.initProperties=function(){Jv.prototype.initProperties.call(this),Ev(this,{name:"Code 128",states:["C","B","A","FNC4"]})},nm),Va=(($v=Va)&&(rm.__proto__=$v),((rm.prototype=Object.create($v&&$v.prototype)).constructor=rm).prototype.initProperties=function(){$v.prototype.initProperties.call(this),Ev(this,{name:"Code GS1-128",states:["FNC1","C","B"]})},rm);function rm(){$v.apply(this,arguments)}function nm(){Jv.apply(this,arguments)}function sm(){tm.apply(this,arguments)}function am(){em.apply(this,arguments)}function lm(){im.apply(this,arguments)}function hm(t){om.call(this,t),this._initStates()}function pm(t,e,i){return t.substring(e,e+i)}var cm,um,dm,fm,gm,ym,vm,mm=Object.assign,xm=((vm=dv)&&(Rm.__proto__=vm),((Rm.prototype=Object.create(vm&&vm.prototype)).constructor=Rm).prototype.initProperties=function(){vm.prototype.initProperties.call(this),mm(this,{characterMap:["12121212","12121221","12122112","12122121","12211212","12211221","12212112","12212121","21121212","21121221"],START:"21",STOP:"121",checkSumType:"",checkSums:km})},Rm.prototype.initValue=function(t,e){this.pattern=[],this.value=t,this.checkSumLength=0,this.width=e},Rm.prototype.setBaseUnit=function(){this.baseUnit=this.width/(12*(this.value.length+this.checkSumLength)+this.quietZoneLength+7)},Rm.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()},Rm.prototype.addCharacter=function(t){var e=this.characterMap[t];e||this.invalidCharacterError(t),this.addPattern(e)},Rm.prototype.addPattern=function(t){for(var e=0;e<t.length;e++)this.pattern.push(parseInt(t.charAt(e),10))},Rm.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]])},Rm),bm=((ym=xm)&&(Em.__proto__=ym),((Em.prototype=Object.create(ym&&ym.prototype)).constructor=Em).prototype.initProperties=function(){ym.prototype.initProperties.call(this),mm(this,{name:"MSI Modulo10",checkSumType:"Modulo10"})},Em),_m=((gm=xm)&&(Im.__proto__=gm),((Im.prototype=Object.create(gm&&gm.prototype)).constructor=Im).prototype.initProperties=function(){gm.prototype.initProperties.call(this),mm(this,{name:"MSI Modulo11",checkSumType:"Modulo11"})},Im),wm=((fm=xm)&&(Bm.__proto__=fm),((Bm.prototype=Object.create(fm&&fm.prototype)).constructor=Bm).prototype.initProperties=function(){fm.prototype.initProperties.call(this),mm(this,{name:"MSI Modulo10 Modulo10",checkSumType:"Modulo10Modulo10"})},Bm),xm=((dm=xm)&&(Lm.__proto__=dm),((Lm.prototype=Object.create(dm&&dm.prototype)).constructor=Lm).prototype.initProperties=function(){dm.prototype.initProperties.call(this),mm(this,{name:"MSI Modulo11 Modulo10",checkSumType:"Modulo11Modulo10"})},Lm),km={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))}},Am=Object.assign,Sm=((um=dv)&&(Om.__proto__=um),((Om.prototype=Object.create(um&&um.prototype)).constructor=Om).prototype.initProperties=function(){um.prototype.initProperties.call(this),Am(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]}})},Om.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},Om.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)},Om.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)},Om.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])},Om.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},Om),Cm=Object.assign,Tm=((cm=Sm)&&(Mm.__proto__=cm),((Mm.prototype=Object.create(cm&&cm.prototype)).constructor=Mm).prototype.initProperties=function(){cm.prototype.initProperties.call(this),Cm(this,{name:"EAN 8"})},Mm.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)},Mm),Pm={code11:$,code39:t,code39extended:i,code93:ws,code93extended:Vh,code128:_s,code128a:bs,code128b:Ka,code128c:l};function Mm(){cm.apply(this,arguments)}function Om(){um.apply(this,arguments)}function Lm(){dm.apply(this,arguments)}function Bm(){fm.apply(this,arguments)}function Im(){gm.apply(this,arguments)}function Em(){ym.apply(this,arguments)}function Rm(){vm.apply(this,arguments)}function Vm(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}Pm["gs1-128"]=Va,Pm.msimod10=bm,Pm.msimod11=_m,Pm.msimod1010=wm,Pm.msimod1110=xm,Pm.postnet=ks,Pm.ean8=Tm,Pm.ean13=Sm;function zm(t,e,i){void 0===i&&(i=Re),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()}zm.prototype.destroy=function(){this._destroySurface()},zm.prototype._initElement=function(){vt(this.element,"k-barcode")},zm.prototype._initSurface=function(){var t=this.options,e=this.surface;e&&e.options.type===t.renderAs||(this._destroySurface(),this._initSurfaceElement(),this.surface=this._createSurface())},zm.prototype._createSurface=function(){return M.drawing.Surface.create(this.surfaceElement,{type:this.options.renderAs})},zm.prototype._destroySurface=function(){this.surface&&(this.surface.destroy(),this.surface=null,this._destroySurfaceElement())},zm.prototype._initSurfaceElement=function(){this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.surfaceElement.style.position="relative",this.element.appendChild(this.surfaceElement))},zm.prototype._destroySurfaceElement=function(){this.surfaceElement&&this.surfaceElement.parentNode&&(this.surfaceElement.parentNode.removeChild(this.surfaceElement),this.surfaceElement=null)},zm.prototype.setOptions=function(t){this._setOptions(t),this._initSurface(),this.redraw()},zm.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)},zm.prototype.getSize=function(){return{width:this.element.offsetWidth,height:this.element.offsetHeight}},zm.prototype._resize=function(){this.redraw()},zm.prototype.createVisual=function(){this.visual=this._render()},zm.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 B(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},zm.prototype.exportVisual=function(){return this._render()},zm.prototype._getSize=function(){var t=Vm(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},zm.prototype.value=function(t){if(!k(t))return this.options.value;this.options.value=String(t),this.redraw()},zm.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},zm.prototype._getBackground=function(t){var e=this.options,i=e.border||{},t=new B(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}})},zm.prototype._getText=function(t){var e=this.options.text,t=this._textbox=new uo(t,{font:e.font,color:e.color,align:"center",vAlign:"bottom",margin:e.margin});return t.reflow(this.contentBox),t.renderVisual(),t.visual},zm.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),!Pm[this.type])throw new Error("Encoding '"+this.type+"' is not supported.");this.encoding=new Pm[this.type],this.options=O({},this.options,t)},e(zm,{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 jm=zm;var Dm={width:500,height:100};let Fm=function(t,e){if(void 0===e&&(e=Dm),!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"),Pm[n])return i=new Pm[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 Hm=Object.assign;function Nm(t,e){for(var i=[],o=0;o<t.length;)i.push(t.substring(o,o+e)),o+=e;return i}function Um(t,e){t=Number(t).toString(2);return t=t.length<e?new Array(e-t.length+1).join(0)+t:t}function Gm(t){return parseInt(t,2)}function Wm(t){this.matrix=t,this.row=t.length-1,this.column=t.length-1,this.startColumn=this.column,this.dir=-1,this.c=0}function Xm(t,e){this.dataString=t,this.version=e}Wm.prototype.move=function(){this.row+=this.dir*this.c,this.c^=1,this.column=this.startColumn-this.c},Wm.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}},Wm.prototype.getNextRemainderCell=function(){if(this.move(),void 0===this.matrix[this.row][this.column])return{row:this.row,column:this.column}};var Ym="alphanumeric",qm=/^\d+/,$="A-Z0-9 $%*+./:-",Zm=new RegExp("^[A-Z $%*+./:-]+"),Qm=new RegExp("^["+$+"]+"),Km=new RegExp("^[^"+$+"]+");function $m(t,e,i,o,r){var n,s=qm.exec(t),s=s?s[0]:"",a=Zm.exec(t),a=a?a[0]:"",l=Qm.exec(t),l=l?l[0]:"",e=s&&(s.length>=e||t.length===s.length||s.length>=i&&!Qm.test(t.charAt(s.length)))?(n="numeric",s):l&&(t.length===l.length||l.length>=o||r===Ym)?(n=Ym,s||a):(n="byte",l?l+Km.exec(t.substring(l.length))[0]:Km.exec(t)[0]);return{mode:n,modeString:e}}function Jm(){this.initProperties()}Jm.prototype.initProperties=function(){Hm(this,{modeIndicator:"",bitsInCharacterCount:[]})},Jm.prototype.getVersionIndex=function(t){return t<10?0:26<t?2:1},Jm.prototype.getBitsCharacterCount=function(t){return this.bitsInCharacterCount[this.getVersionIndex(t||40)]},Jm.prototype.getModeCountString=function(t,e){return this.modeIndicator+Um(t,this.getBitsCharacterCount(e))},Jm.prototype.encode=function(){},Jm.prototype.getStringBitsLength=function(){},Jm.prototype.getValue=function(){},(ix=Jm)&&(sx.__proto__=ix),((sx.prototype=Object.create(ix&&ix.prototype)).constructor=sx).prototype.initProperties=function(){ix.prototype.initProperties.call(this),Hm(this,{bitsInCharacterCount:[10,12,14],modeIndicator:"0001"})},sx.prototype.getValue=function(t){return parseInt(t,10)},sx.prototype.encode=function(t,e){for(var i=Nm(t,3),o=this.getModeCountString(t.length,e),r=0;r<i.length-1;r++)o+=Um(i[r],10);return o+Um(i[r],1+3*i[r].length)},sx.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)};var tx,ex,ix,t=sx,i=((ex=Jm)&&(nx.__proto__=ex),((nx.prototype=Object.create(ex&&ex.prototype)).constructor=nx).prototype.initProperties=function(){ex.prototype.initProperties.call(this),Hm(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"})},nx.prototype.getValue=function(t){return this.characters[t]},nx.prototype.encode=function(t,e){for(var i=Nm(t,2),o=this.getModeCountString(t.length,e),r=0;r<i.length-1;r++)o+=Um(45*this.getValue(i[r].charAt(0))+this.getValue(i[r].charAt(1)),11);return o+Um(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)},nx.prototype.getStringBitsLength=function(t,e){return 4+this.getBitsCharacterCount(e)+11*Math.floor(t/2)+t%2*6},nx),ws=((tx=Jm)&&(rx.__proto__=tx),((rx.prototype=Object.create(tx&&tx.prototype)).constructor=rx).prototype.initProperties=function(){tx.prototype.initProperties.call(this),Hm(this,{bitsInCharacterCount:[8,16,16],modeIndicator:"0100"})},rx.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+'".')},rx.prototype.encode=function(t,e){for(var i=this.getModeCountString(t.length,e),o=0;o<t.length;o++)i+=Um(this.getValue(t.charAt(o)),8);return i},rx.prototype.getStringBitsLength=function(t,e){return 4+this.getBitsCharacterCount(e)+8*t},rx),ox={};function rx(){tx.apply(this,arguments)}function nx(){ex.apply(this,arguments)}function sx(){ix.apply(this,arguments)}ox.numeric=new t,ox.alphanumeric=new i,ox.byte=new ws;var ax=[{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 lx(t,e){for(var i=0,o=ax.length-1,r=Math.floor(ax.length/2);t<ax[r][e].totalDataCodewords?o=r:i=r,r=i+Math.floor((o-i)/2),1<o-i;);return t<=ax[i][e].totalDataCodewords?r+1:o+1}function hx(){}function px(){this.initProperties(),this.mode=ox[this.encodingMode]}hx.prototype.getEncodingResult=function(n,t){var e=(()=>{var t,e=[],i=0,o=n;for(e.push($m(o,8,5,8,t)),t=e[0].mode,o=o.substr(e[0].modeString.length);0<o.length;){var r=$m(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=lx((t=>{for(var e=0,i=0;i<t.length;i++)e+=ox[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+=ox[t[o].mode].encode(t[o].modeString,e);return i})(e,t);return new Xm(e,t)};px.prototype.initProperties=function(){Hm(this,{encodingMode:"byte",utfBOM:"111011111011101110111111",initialModeCountStringLength:20,ranges:[128,2048,65536,2097152,67108864]})},px.prototype.getEncodingResult=function(t,e){t=this.encode(t),e=lx(this.getDataCodewordsCount(t),e),t=this.mode.getModeCountString(t.length/8,e)+t;return new Xm(t,e)},px.prototype.getDataCodewordsCount=function(t){t=t.length;return Math.ceil((this.initialModeCountStringLength+t)/8)},px.prototype.encode=function(t){for(var e=this.utfBOM,i=0;i<t.length;i++)e+=this.encodeCharacter(t.charCodeAt(i));return e},px.prototype.encodeCharacter=function(t){var e=this.getBytesCount(t),i=e-1,o="";if(1===e)o=Um(t,8);else{for(var e=8-e,r=0;r<i;r++)o=Um(t>>6*r&63|128,8)+o;o=(t>>6*i|255>>e<<e).toString(2)+o}return o},px.prototype.getBytesCount=function(t){for(var e=this.ranges,i=0;i<e.length;i++)if(t<e[i])return i+1};var cx={1:0},ux={0:1},dx={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},fx=[1,0,1,1,1],gx=[1,0,1],yx={L:"01",M:"00",Q:"11",H:"10"},vx=["11101100","00010001"],mx=[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}],xx=[[1,0],[1,25,0]];function bx(t,e,i,o){for(var r=0;r<t.length;r++)t[r][i][o]=e}function _x(t,e,i,o){for(var r=0;r<mx.length;r++)t[r][i][o]=mx[r](i,o)?1^e:parseInt(e,10)}function wx(t,e){for(var i,o=xx[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]=ux[(t[o]+e)%255],void 0!==t[--o];);return i})(n,cx[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]=Um(r[l],8);return a}function kx(t,e,i){var o=Gm(e),e=e.length-1,r=t<<e;return Um(t,i-e)+Um(((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 Ax(t,e){return parseInt(t.charAt(e),10)}function Sx(t,e){for(var i=t[0],o=0,r=e.length,n=0,s=8;n<=8;n++)6!==n&&bx(t,Ax(e,r-1-o++),n,s);for(n=8,s=7;0<=s;s--)6!==s&&bx(t,Ax(e,r-1-o++),n,s);for(o=0,s=i.length-1,n=8;s>=i.length-8;s--)bx(t,Ax(e,r-1-o++),n,s);for(bx(t,1,i.length-8,8),n=i.length-7,s=8;n<i.length;n++)bx(t,Ax(e,r-1-o++),n,s)}function Cx(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,bx(t,r=Ax(e,e.length-l-1),0+i,s+o),bx(t,r,a+o,0+i)}function Tx(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++)bx(t,r=e[a],i+l,o+a),bx(t,r,i+a,o+l),bx(t,r,i+s-l,o+s-a),bx(t,r,i+s-a,o+s-l)}function Px(t,e,i,o){for(var r=i,n=o,s=t[0];bx(t,0,r,o),bx(t,0,i,n),r+=e[0],n+=e[1],0<=r&&r<s.length;);}function Mx(t,e,i,o,r){e[t][o]=(e[t][o]<<1^r)%128,93===e[t][o]&&(i[t]+=40)}function Ox(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 Lx(t,e,i){var r=(new(i&&0<=i.toLowerCase().indexOf("utf_8")?px:hx)).getEncodingResult(t,e),n=r.version,s=ax[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]=Gm(i),o+=8;r.push(c),n.push(wx(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+=vx[i],i^=1;return o})(),s),t=(()=>{for(var t=[],e=17+4*n,i=0;i<mx.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,Tx(a,fx,0,0),Px(a,[-1,-1],7,7),Tx(a,fx,c-7,0),Px(a,[1,-1],c-8,7),Tx(a,fx,0,c-7),Px(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=dx[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]]&&Tx(o,gx,u[f]-2,u[g]-2)}for(var y=t,v=1,m=y[0].length,x=8;x<m-8;x++)bx(y,v,6,x),bx(y,v,x,6),v^=1;7<=n&&Cx(t,Um(0,18)),Sx(t,Um(0,15));for(var b,_,w,k=t,A=i,S=new Wm(k[0]),C=0;C<A.length;C++)for(b=A[C],_=0;0<b.length;){for(var T=0;T<b.length;T++)for(var P=0;P<8;P++)w=S.getNextCell(),_x(k,b[T][_].charAt(P),w.row,w.column);for(_++;b[0]&&_===b[0].length;)b.splice(0,1)}for(;w=S.getNextRemainderCell();)_x(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),Mx(c,n,i,0,e[h][p]),Mx(c,n,i,1,e[p][h]),Ox(c,i,o,e[h][p],s,0),Ox(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&&Cx([a],kx(n,"1111100100101",18)),Sx([a],(t=>{var e="";if(0===Gm(t))return"101010000010010";for(var i=kx(Gm(t),"10100110111",15),o=0;o<i.length;o++)e+=i.charAt(o)^"101010000010010".charAt(o);return e})(yx[e]+Um(c,3))),a}for(var Bx,Ix=1;Ix<255;Ix++)255<(Bx=2*ux[Ix-1])&&(Bx^=285),ux[Ix]=Bx,cx[Bx]=Ix;Bx=2*ux[Ix-1]^285,ux[Ix]=Bx,ux[-1]=0;for(var Ex=2;Ex<=68;Ex++){var Rx=xx[Ex-1];xx[Ex]=((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:cx[ux[i[o+r]]^ux[(t[o]+e[r])%255]];return i})(Rx,[Ex,0])}function Vx(t,e,i){void 0===i&&(i=Re),this.options=O({},this.options,e),this.element=t,this.wrapper=this.element,this.onError=i,this._initElement(),this._initSurface(),this.setOptions(e)}var zx=Math.round,jx=[[0,1],[1,1],[1,2],[2,2],[2,1],[3,1],[3,0],[2,0],[2,-1],[1,-1],[1,0]],Dx=[[0,1],[1,1],[1,0]];Vx.prototype.destroy=function(){this._destroySurface()},Vx.prototype._initElement=function(){vt(this.element,"k-qrcode")},Vx.prototype._initSurface=function(){var t=this.options,e=this.surface;e&&e.options.type===t.renderAs||(this._destroySurface(),this._initSurfaceElement(),this.surface=this._createSurface())},Vx.prototype._createSurface=function(){return M.drawing.Surface.create(this.surfaceElement,{type:this.options.renderAs})},Vx.prototype._destroySurface=function(){this.surface&&(this.surface.destroy(),this.surface=null,this._destroySurfaceElement())},Vx.prototype._initSurfaceElement=function(){this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.surfaceElement.style.position="relative",this.element.appendChild(this.surfaceElement))},Vx.prototype._destroySurfaceElement=function(){this.surfaceElement&&this.surfaceElement.parentNode&&(this.surfaceElement.parentNode.removeChild(this.surfaceElement),this.surfaceElement=null)},Vx.prototype.redraw=function(){var t=this._getSize();this.surface.clear(),this.surface.setSize({width:t,height:t}),this.createVisual(),this.surface.draw(this.visual)},Vx.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},Vx.prototype._resize=function(){this.redraw()},Vx.prototype.createVisual=function(){this.visual=this._render()},Vx.prototype.exportVisual=function(){return this._render()},Vx.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=Lx(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},Vx.prototype._renderLogo=function(t,e){var t=zx(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)},Vx.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),Dx,"#fff")),n.x=n.y=t-i/2,s.append(this._renderShape(n,i,Dx,this.options.color)),n.x=t+r-i/2,n.y=t+r+o-i/2,s.append(this._renderShape(n,o,jx,"#fff")),s},Vx.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},Vx.prototype._getSize=function(){var t;return this.options.size?parseInt(this.options.size,10):(t=Vm(this.element,this.options.renderAs),0<(t=Math.min(t.width,t.height))?t:200)},Vx.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},Vx.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=zx(i+a*e),l=zx(n),h=zx(i+s*e),p=zx(n+e);o.moveTo(a,l).lineTo(a,p).lineTo(h,p).lineTo(h,l).close()}}return o},Vx.prototype._renderBackground=function(t,e){t=new B(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}})},Vx.prototype.setOptions=function(t){this.options=Hm(this.options,t||{}),void 0!==t.value&&(this._value=String(this.options.value)),this._initSurface(),this.redraw()},Vx.prototype.value=function(t){if(void 0===t)return this._value;this._value=String(t),this.redraw()},Vx.prototype._hasCustomLogo=function(){return Boolean(this.options.overlay.imageUrl)},Vx.prototype._isSwiss=function(){return"swiss"===this.options.overlay.type},Vx.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}},e(Vx,{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 Fx=Vx,Hx=function(e){return void 0===e&&(e="ISO_8859_1"),function(t){try{Lx(t,"L",e)}catch(t){return{valid:!1,error:t}}return{valid:!0}}};var Nx={WGS84:{a:6378137,b:6356752.314245179,f:.0033528106647474805,e:.08181919084262149}};function Ux(t){return t*t}function Gx(t){this.initProperties(),this._initOptions(t)}var Wx,Xx=Math,Yx=Xx.abs,qx=Xx.atan,Zx=Xx.atan2,Qx=Xx.cos,Kx=Xx.sin,$x=Xx.tan,I=function(t,e){this.initProperties(),1===arguments.length?(this.lat=t[0],this.lng=t[1]):(this.lat=t,this.lng=e)},Jx=(I.prototype.initProperties=function(){O(this,{DISTANCE_ITERATIONS:100,DISTANCE_CONVERGENCE:1e-12,DISTANCE_PRECISION:2,FORMAT:"{0:N6}{1:N6}"})},I.prototype.toArray=function(){return[this.lat,this.lng]},I.prototype.equals=function(t){return t&&t.lat===this.lat&&t.lng===this.lng},I.prototype.clone=function(){return new I(this.lat,this.lng)},I.prototype.round=function(t){return this.lng=L(this.lng,t),this.lat=L(this.lat,t),this},I.prototype.wrap=function(){return this.lng=this.lng%180,this.lat=this.lat%90,this},I.prototype.distanceTo=function(t,e){return this.greatCircleTo(t,e).distance},I.prototype.destination=function(t,e,i){var e=ce(e),i=i||Nx.WGS84,o=ce(this.lat),r=ce(this.lng),t=t/i.a,i=Xx.asin(Kx(o)*Qx(t)+Qx(o)*Kx(t)*Qx(e)),r=r+Zx(Kx(e)*Kx(t)*Qx(o),Qx(t)-Kx(o)*Kx(i));return new I(oe(i),oe(r))},I.prototype.greatCircleTo=function(t,e){var i=I.create(void 0),e=e||Nx.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=qx((1-a)*$x(ce(this.lat))),h=Kx(e),p=Qx(e),e=qx((1-a)*$x(ce(i.lat))),c=Kx(e),u=Qx(e),d=l,f=this.DISTANCE_ITERATIONS,g=!1;!g&&0<f--;)var y=Kx(d),v=Qx(d),m=Xx.sqrt(Ux(u*y)+Ux(p*c-h*u*v)),x=Zx(m,r=h*c+p*u*v),b=p*u*y/m,_=0,w=(0!=(o=1-Ux(b))&&(_=r-2*h*c/o),d),k=a/16*o*(4+a*(4-3*o)),d=l+(1-k)*a*b*(x+k*m*(_+k*r*(2*Ux(_)-1))),g=Yx(d-w)<=this.DISTANCE_CONVERGENCE;var i=o*(Ux(n)-Ux(s))/Ux(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*(_+n/4*(r*(2*Ux(_)-1)-n/6*_*(4*Ux(m)-3)*(4*Ux(_)-3))),n=Zx(u*y,p*c-h*u*v),A=Zx(p*y,-h*u+p*c*v);return{distance:L(s*e*(x-i),this.DISTANCE_PRECISION),azimuthFrom:oe(n),azimuthTo:oe(A)}},I.prototype.toString=function(){return String(this.lat)+","+String(this.lng)},I.fromLngLat=function(t){return new I(t[1],t[0])},I.fromLatLng=function(t){return new I(t[0],t[1])},I.create=function(t,e){if(k(t))return t instanceof I?t.clone():1===arguments.length&&2===t.length?I.fromLatLng(t):new I(t,e)},Math),tb=Jx.atan,eb=Jx.exp,ib=Jx.pow,ob=Jx.sin,rb=Jx.log,nb=Jx.tan,sb=M.geometry.Point,ab=Jx.PI,lb=ab/2,hb=ab/4,pb=ab/180,Vh=Nx.WGS84,cb=(Gx.prototype._initOptions=function(t){this.options=O({},this.options,t)},Gx.prototype.initProperties=function(){O(this,{MAX_LNG:180,MAX_LAT:85.0840590501,INVERSE_ITERATIONS:15,INVERSE_CONVERGENCE:1e-12})},Gx.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 sb(t,e)},Gx.prototype._projectLat=function(t){var e=this.options.datum,i=e.e,e=e.a,t=ce(t),o=nb(hb+t/2),t=i*ob(t),t=ib((1-t)/(1+t),i/2);return e*rb(o*t)},Gx.prototype.inverse=function(t,e){var i=this.options,o=i.datum.a,o=t.x/(pb*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 I(i,o)},Gx.prototype._inverseY=function(t){for(var e=this.options.datum,i=e.a,o=e.e,r=o/2,n=eb(-t/i),s=lb-2*tb(n),a=0;a<=this.INVERSE_ITERATIONS;a++){var l=o*ob(s),l=ib((1-l)/(1+l),r),l=lb-2*tb(n*l)-s;if(s+=l,Jx.abs(l)<=this.INVERSE_CONVERGENCE)break}return oe(s)},e(Gx,{centralMeridian:0,datum:Vh}),(Wx=Gx)&&(ub.__proto__=Wx),((ub.prototype=Object.create(Wx&&Wx.prototype)).constructor=ub).prototype.initProperties=function(){Wx.prototype.initProperties.call(this),O(this,{MAX_LAT:85.0511287798})},ub.prototype._projectLat=function(t){var e=this.options.datum.a,t=ce(t),t=nb(hb+t/2);return e*rb(t)},ub.prototype._inverseY=function(t){var e=this.options.datum.a,t=eb(-t/e);return oe(lb-2*tb(t))},ub);function ub(){Wx.apply(this,arguments)}function db(){var t=this._proj=new cb,t=this.c=2*ab*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 fb(t,e){return t.bind(e)}db.prototype.toPoint=function(t,e,i){return this._proj.forward(t,i).transform(this._tm).scale(e||1)},db.prototype.toLocation=function(t,e,i){t=t.clone().scale(1/(e||1)).transform(this._itm);return this._proj.inverse(t,i)},Object.assign;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 bb(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(" ")}var _b,wb=function(t){var e=document.createElement("div");return e.innerHTML=t,e.firstChild},kb=((_b=ii)&&(Ab.__proto__=_b),((Ab.prototype=Object.create(_b&&_b.prototype)).constructor=Ab).prototype._initOptions=function(t){this.options=O({},this.options,t)},Ab.prototype.filter=function(t,e){this._extent=t,this._zoom=e,this._render()},Ab.prototype.add=function(t){var e=t;k(t)&&(this.items.push(e="string"==typeof t?{text:t}:e),this._render())},Ab.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()},Ab.prototype.clear=function(){this.items=[],gb(this.element)},Ab.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()},Ab.prototype.hideElement=function(){this.element.style.display="none"},Ab.prototype.showElement=function(){this.element.style.display=""},Ab.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},Ab.prototype._inZoomLevel=function(t,e){t=b(t,-Number.MAX_VALUE),e=b(e,Number.MAX_VALUE);return this._zoom>t&&this._zoom<e},Ab.prototype._inArea=function(t){var e=!0;return e=t?t.contains(this._extent):e},Ab);function Ab(t,e){_b.call(this),this.element=t,this._initOptions(e),this.items=[],vt(this.element,"k-widget k-attribution")}e(kb,{name:"Attribution",separator:"&nbsp;|&nbsp;"});var Sb={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 Cb(t,e){t='<button class="k-button k-button-square k-rounded-full k-button-flat k-button-flat-base k-icon-button '+Sb[t].className+'" aria-label="move '+t+'">'+we({icon:"caret-alt-"+t,iconClass:"k-button-icon",svgIcons:e.svgIcons,type:e.type})+"</button>";return wb(t)}(Tb=ii)&&(Mb.__proto__=Tb),((Mb.prototype=Object.create(Tb&&Tb.prototype)).constructor=Mb).prototype.destroy=function(){this.dispose()},Mb.prototype.dispose=function(){qe(this._keyroot,"keydown",this._keydownHandler)},Mb.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)},Mb.prototype._initOptions=function(t){this.options=O({},this.options,t)},Mb.prototype._pan=function(t,e){var i=this.options.panStep;this.trigger("pan",{x:t*i,y:e*i})},Mb.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()},Mb.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 Tb,Pb=Mb;function Mb(t,e){Tb.call(this),this.element=t,this._initOptions(e);var t=Cb("up",e.icons),i=Cb("right",e.icons),o=Cb("down",e.icons),e=Cb("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"),Ye(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),Ye(this._keyroot,"keydown",this._keydownHandler)}function Ob(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 wb(t)}e(Pb,{name:"Navigator",panStep:1}),xb(Pb,["pan"]);(Lb=ii)&&(Ib.__proto__=Lb),((Ib.prototype=Object.create(Lb&&Lb.prototype)).constructor=Ib).prototype.destroy=function(){this.element&&qe(this.element,"click",this._clickHandler),this._keyroot&&qe(this._keyroot,"keydown",this._keydownHandler)},Ib.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)},Ib.prototype._initOptions=function(t){this.options=O({},this.options,t)},Ib.prototype._change=function(t){var e=this.options.zoomStep;this.trigger("change",{delta:t*e})},Ib.prototype._click=function(t){var e=1;Ut(t.currentTarget,"k-zoom-out")&&(e=-1),this._change(e),t.preventDefault()},Ib.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 Lb,Bb=Ib;function Ib(t,e,i){Lb.call(this),this.element=t,this._initOptions(e);t=Ob("in","plus",i),e=Ob("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),Ye(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),Ye(this._keyroot,"keydown",this._keydownHandler)}e(Bb,{name:"ZoomControl",zoomStep:1}),xb(Bb,["change"]);function Eb(t,e){this.widgetService=t,this.options=O({},this.options,e),this.offset={x:0,y:0}}function Rb(t,e){this.support=Ze(),this._initOptions(e),this.map=t,vt(e=document.createElement("div"),"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()}var _s=Math,Vb=_s.max,zb=_s.min,jb=function(t,e){t=I.create(t),e=I.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)},bs={World:{configurable:!0}},Db=(jb.prototype.contains=function(t){var e=this.nw,i=this.se,o=b(t.lng,t[1]),r=b(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},jb.prototype.center=function(){var t=this.nw,e=this.se,i=t.lng+(e.lng-t.lng)/2;return new I(t.lat+(e.lat-t.lat)/2,i)},jb.prototype.containsAny=function(t){for(var e=!1,i=0;i<t.length;i++)e=e||this.contains(t[i]);return e},jb.prototype.include=function(t){var e=this.nw,i=this.se,o=b(t.lng,t[1]),t=b(t.lat,t[0]);e.lng=zb(e.lng,o),e.lat=Vb(e.lat,t),i.lng=Vb(i.lng,o),i.lat=zb(i.lat,t)},jb.prototype.includeAll=function(t){for(var e=0;e<t.length;e++)this.include(t[e])},jb.prototype.edges=function(){var t=this.nw,e=this.se;return{nw:this.nw,ne:new I(t.lat,e.lng),se:this.se,sw:new I(e.lat,t.lng)}},jb.prototype.toArray=function(){var t=this.nw,e=this.se;return[t,new I(t.lat,e.lng),e,new I(e.lat,t.lng)]},jb.prototype.overlaps=function(t){return this.containsAny(t.toArray())||t.containsAny(this.toArray())},jb.create=function(t,e){return t instanceof jb?t:t&&e?new jb(t,e):t&&4===t.length&&!e?new jb([t[0],t[1]],[t[2],t[3]]):void 0},bs.World.get=function(){return new jb([90,-180],[-90,180])},Object.defineProperties(jb,bs),"centerChange"),Ka={anchor:{configurable:!0}},Fb=(Eb.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)},Eb.prototype.hide=function(){this.widgetService&&this.widgetService.notify("hideTooltip"),this.visible=!1,this.location=null},Ka.anchor.get=function(){return this._anchor},Ka.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}},Eb.prototype.destroy=function(){this.widgetService=null},Object.defineProperties(Eb.prototype,Ka),e(Eb,{border:{width:1},opacity:1}),Rb.prototype.destroy=function(){this._deactivate()},Rb.prototype._initOptions=function(t){this.options=O({},this.options,t)},Rb.prototype.show=function(){this.reset(),this._activate(),this._applyExtent(!0)},Rb.prototype.hide=function(){this._deactivate(),this._setVisibility(!1)},Rb.prototype.reset=function(){this._beforeReset(),this._reset()},Rb.prototype._reset=function(){this._applyExtent()},Rb.prototype._beforeReset=function(){},Rb.prototype._resize=function(){},Rb.prototype._panEnd=function(){this._applyExtent()},Rb.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=jb.create(t.extent),t=!t||t.overlaps(this.map.extent());this._setVisibility(i&&e&&t)},Rb.prototype._setVisibility=function(t){this.element.style.display=t?"":"none"},Rb.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)},Rb.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)},Rb.prototype._updateAttribution=function(){var t=this.map.attribution;t&&t.add(this.options.attribution)},Rb.prototype._readData=function(){return this.options.data||[]},Rb.prototype._hasData=function(){return this._data&&0<this._data.length},Rb.prototype._layerIndex=function(){return(this.map.layers||[]).indexOf(this)},Math),Hb=M.geometry.Point;function Nb(t){return Tt(t)?t:Vt.compile(t)}function Ub(t){var e=t;return"string"!=typeof t&&(e+="px"),e}(Gb=Rb)&&(Wb.__proto__=Gb),((Wb.prototype=Object.create(Gb&&Gb.prototype)).constructor=Wb).prototype.destroy=function(){Gb.prototype.destroy.call(this),this._view.destroy(),this._view=null},Wb.prototype._beforeReset=function(){var t=this.map,t=t.locationToLayer(t.extent().nw).round();this._view.viewOrigin(t)},Wb.prototype._reset=function(){Gb.prototype._reset.call(this),this._updateView(),this._view.reset()},Wb.prototype._viewType=function(){return e1},Wb.prototype._activate=function(){Gb.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))},Wb.prototype._deactivate=function(){Gb.prototype._deactivate.call(this),this._pan&&this.map.unbind("pan",this._pan)},Wb.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())},Wb.prototype._resize=function(){this._render()},Wb.prototype._panEnd=function(t){Gb.prototype._panEnd.call(this,t),this._render()},Wb.prototype._render=function(){this._updateView(),this._view.render()};var Gb,l=Wb;function Wb(t,e){Gb.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(l,{tileSize:256,subdomains:["a","b","c"],urlTemplate:"",zIndex:1});function Xb(t,e){this.id=t,this.visible=!0,this._initOptions(e),this.createElement(),this.show()}function Yb(t){var s,a,l,h=this;o1(h,{elastic:!0},t),t=h.elastic?.5:0,l=h.movable,h.x=s=new l1({axis:"x",dimension:h.dimensions.x,resistance:t,movable:l}),h.y=a=new l1({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 qb(t,e,i){return"translate3d("+t+"px,"+e+"px,0) scale("+i+")"}var Zb,Qb,Kb,$b,Jb,t1,e1=function(t,e){this.element=t,this._initOptions(e),this.pool=new i1},i1=(e1.prototype._initOptions=function(t){this.options=O({},this.options,t)},e1.prototype.center=function(t){this._center=t},e1.prototype.extent=function(t){this._extent=t},e1.prototype.viewOrigin=function(t){this._viewOrigin=t},e1.prototype.zoom=function(t){this._zoom=t},e1.prototype.pointToTileIndex=function(t){return new Hb(Fb.floor(t.x/this.options.tileSize),Fb.floor(t.y/this.options.tileSize))},e1.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:Fb.ceil((Fb.abs(e.x)+t.width)/this.options.tileSize),y:Fb.ceil((Fb.abs(e.y)+t.height)/this.options.tileSize)}},e1.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}},e1.prototype.indexToPoint=function(t){var e=t.x;return new Hb(e*this.options.tileSize,t.y*this.options.tileSize)},e1.prototype.subdomainText=function(){var t=this.options.subdomains;return t[this.subdomainIndex++%t.length]},e1.prototype.destroy=function(){gb(this.element),this.pool.empty()},e1.prototype.reset=function(){this.pool.reset(),this.subdomainIndex=0,this.render()},e1.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()},e1.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},e1.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 Hb(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}},e1.prototype.wrapIndex=function(t){var e=Fb.pow(2,this._zoom);return{x:this.wrapValue(t.x,e),y:x(t.y,0,e-1)}},e1.prototype.wrapValue=function(t,e){var i=Fb.abs(t)%e;return 0<=t?i:e-(0==i?e:i)},Xb.prototype.destroy=function(){var t=this.element,e=t?t.parentNode:null;t&&(e&&e.removeChild(t),this.element=null)},Xb.prototype._initOptions=function(t){this.options=O({},this.options,t)},Xb.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},Xb.prototype.show=function(){var t=this.element,e=(t.style.top=Ub(this.options.offset.y),t.style.left=Ub(this.options.offset.x),this.url());e&&t.setAttribute("src",e),t.style.visibility="visible",this.visible=!0},Xb.prototype.hide=function(){this.element.style.visibility="hidden",this.visible=!1},Xb.prototype.url=function(){return Nb(this.options.urlTemplate)(this.urlOptions())},Xb.prototype.errorUrl=function(){return Nb(this.options.errorUrlTemplate)(this.urlOptions())},Xb.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}},e(Xb,{urlTemplate:"",errorUrlTemplate:""}),function(){this._items=[]}),o1=(i1.prototype.get=function(t,e){return this._items.length>=this.options.maxSize&&this._remove(t),this._create(e)},i1.prototype.empty=function(){for(var t=this._items,e=0;e<t.length;e++)t[e].destroy();this._items=[]},i1.prototype.reset=function(){for(var t=this._items,e=0;e<t.length;e++)t[e].hide()},i1.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 Xb(o,t),this._items.push(e)),e},i1.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))},e(i1,{maxSize:100}),Object.assign),r1="change",n1=((t1=ii)&&(y1.__proto__=t1),((y1.prototype=Object.create(t1&&t1.prototype)).constructor=y1).prototype.captureNext=function(){this.capture=!0},y1.prototype.cancelCapture=function(){this.capture=!1},y1.prototype._press=function(t){this.trigger("press"),this.capture&&t.preventDefault()},y1.prototype._release=function(t){this.trigger("release"),this.capture&&(t.preventDefault(),this.cancelCapture())},y1),s1=((Jb=ii)&&(g1.__proto__=Jb),((g1.prototype=Object.create(Jb&&Jb.prototype)).constructor=g1).prototype.makeVirtual=function(){o1(this,{virtual:!0,forcedEnabled:!0,_virtualMin:0,_virtualMax:0})},g1.prototype.virtualSize=function(t,e){this._virtualMin===t&&this._virtualMax===e||(this._virtualMin=t,this._virtualMax=e,this.update())},g1.prototype.outOfBounds=function(t){return t>this.max||t<this.min},g1.prototype.forceEnabled=function(){this.forcedEnabled=!0},g1.prototype.getSize=function(){return this.container[this.measure]},g1.prototype.getTotal=function(){return this.element[this.scrollSize]},g1.prototype.rescale=function(t){this.scale=t},g1.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(r1,e)},g1),a1=(($b=ii)&&(f1.__proto__=$b),((f1.prototype=Object.create($b&&$b.prototype)).constructor=f1).prototype.rescale=function(t){this.x.rescale(t),this.y.rescale(t),this.refresh()},f1.prototype.centerCoordinates=function(){return{x:Math.min(0,-this.x.centerOffset),y:Math.min(0,-this.y.centerOffset)}},f1.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(r1)},f1),l1=((Kb=ii)&&(d1.__proto__=Kb),((d1.prototype=Object.create(Kb&&Kb.prototype)).constructor=d1).prototype.outOfBounds=function(){return this.dimension.outOfBounds(this.movable[this.axis])},d1.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(r1,this))},d1),h1=((Qb=ii)&&(u1.__proto__=Qb),((u1.prototype=Object.create(Qb&&Qb.prototype)).constructor=u1).prototype.translateAxis=function(t,e){this[t]+=e,this.refresh()},u1.prototype.scaleTo=function(t){this.scale=t,this.refresh()},u1.prototype.scaleWith=function(t){this.scale*=t,this.refresh()},u1.prototype.translate=function(t){this.x+=t.x,this.y+=t.y,this.refresh()},u1.prototype.moveAxis=function(t,e){this[t]=e,this.refresh()},u1.prototype.moveTo=function(t){o1(this,t),this.refresh()},u1.prototype.refresh=function(){var t=this.x,e=this.y;this.round&&(t=Math.round(t),e=Math.round(e)),(t=qb(t,e,this.scale))!==this.coordinates&&(this.element.style.transform=t,this._saveCoordinates(t),this.trigger(r1))},u1.prototype._saveCoordinates=function(t){this.coordinates=t},u1),p1=M.drawing.Group,Va=((Zb=Rb)&&(c1.__proto__=Zb),((c1.prototype=Object.create(Zb&&Zb.prototype)).constructor=c1).prototype.destroy=function(){Zb.prototype.destroy.call(this),this.surface.destroy()},c1.prototype._reset=function(){Zb.prototype._reset.call(this),this._translateSurface(),this._data=this._readData(),this._hasData()&&this._load(this._data)},c1.prototype._initRoot=function(){this._root=new p1,this.surface.draw(this._root)},c1.prototype._beforeReset=function(){this.surface.clear(),this._initRoot()},c1.prototype._resize=function(){this.surface.size(this.map.size())},c1.prototype._readData=function(){var t=Zb.prototype._readData.call(this);return"FeatureCollection"===t.type?t.features:"GeometryCollection"===t.type?t.geometries:t},c1.prototype._load=function(t){this._data=t,this._clearMarkers(),this._loader||(this._loader=new m1(this.map,this.options.style,this));for(var e=new p1,i=0;i<t.length;i++){var o=this._loader.parse(t[i]);o&&e.append(o)}this._root.clear(),this._root.append(e)},c1.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})},c1.prototype.featureCreated=function(t){(t.layer=this).map.trigger("shapeFeatureCreated",t)},c1.prototype._createMarker=function(t){t=this.map.markers.bind({location:t.location},t.dataItem);return t&&this._markers.push(t),t},c1.prototype._clearMarkers=function(){for(var t=0;t<this._markers.length;t++)this.map.markers.remove(this._markers[t]);this._markers=[]},c1.prototype._pan=function(){this._panning||(this._panning=!0,this.surface.suspendTracking())},c1.prototype._panEnd=function(t){Zb.prototype._panEnd.call(this,t),this._translateSurface(),this.surface.resumeTracking(),this._panning=!1},c1.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}))},c1.prototype._eventArgs=function(t){return{layer:this,layerIndex:this._layerIndex(),shape:t.element,shapeIndex:(this._data||[]).indexOf(t.element.dataItem),originalEvent:t.originalEvent}},c1.prototype._handler=function(e){var i=this;return function(t){t.element&&i.map.trigger(e,i._eventArgs(t))}},c1.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)))},c1.prototype._tooltipContext=function(t){return{type:"shape",layerIndex:this._layerIndex(),className:"k-map-shape-tooltip",dataItem:t.dataItem,location:t.location}},c1.prototype._tooltipAnchor=function(t){t=this.map.eventOffset(t.originalEvent);return{top:t.y,left:t.x}},c1.prototype._activate=function(){Zb.prototype._activate.call(this),this._panHandler=fb(this._pan,this),this.map.bind("pan",this.panHandler)},c1.prototype._deactivate=function(){Zb.prototype._deactivate.call(this),this.map.unbind("pan",this._panHandler)},c1);function c1(t,e){Zb.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 h1(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 u1(t){Qb.call(this);var e=this,t=(e.element=t,e.element.style.transformOrigin="left top",e.x=0,e.y=0,e.scale=1,qb(e.x,e.y,e.scale));e.element.style.transform=t,e._saveCoordinates(t)}function d1(t){Kb.call(this),o1(this,t)}function f1(t){$b.call(this);this.x=new s1(o1({horizontal:!0},t)),this.y=new s1(o1({horizontal:!1},t)),this.container=t.container,this.forcedMinScale=t.minScale,this.maxScale=t.maxScale||100,this.bind(r1,t)}function g1(t){Jb.call(this);var e=this;e.forcedEnabled=!1,o1(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 y1(t,e){t1.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(Va,{autoBind:!0,zIndex:100});var v1,m1=function(t,e,i){this.observer=i,this.locator=t,this.style=e},bm=(m1.prototype.parse=function(t){var e=new p1,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},m1.prototype._shapeCreated=function(t){var e=!1;return e=this.observer&&this.observer.shapeCreated?this.observer.shapeCreated(t):e},m1.prototype._featureCreated=function(t,e){this.observer&&this.observer.featureCreated&&this.observer.featureCreated({group:t,dataItem:e,properties:e.properties})},m1.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)}},m1.prototype._setLineFill=function(t){var e=t.segments;(e.length<4||!e[0].anchor().equals(he(e).anchor()))&&(t.options.fill=null)},m1.prototype._loadShape=function(t,e){return this._shapeCreated(e)||t.append(e),e},m1.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)},m1.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(I.fromLngLat(t[i][o]));0===o?e.moveTo(r.x,r.y):e.lineTo(r.x,r.y)}return e},m1.prototype._loadPoint=function(t,e,i){var e=I.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)},(v1=Va)&&(x1.__proto__=v1),((x1.prototype=Object.create(v1&&v1.prototype)).constructor=x1).prototype._readData=function(){return this.options.data||[]},x1.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=I.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))}}},x1.prototype._scaleType=function(){var t=this.options.scale;return Tt(t)?t:w1[t]},x1.prototype._createSymbol=function(t){var e=this.options.symbol;return(e=Tt(e)?e:k1[e])(t)},x1.prototype._drawSymbol=function(t){this.map.trigger("shapeCreated",{layer:this,shape:t})||this.surface.draw(t)},x1.prototype._tooltipContext=function(t){return{type:"bubble",layerIndex:this._layerIndex(),className:"k-map-bubble-tooltip",dataItem:t.dataItem,location:t.location,value:t.value}},x1.prototype._tooltipAnchor=function(t){t=t.element.bbox().center();return{top:t.y,left:t.x}},x1);function x1(){v1.apply(this,arguments)}e(bm,{locationField:"location",valueField:"value",minSize:0,maxSize:100,scale:"sqrt",symbol:"circle",zIndex:200});function b1(t,e){this._domain=t,this._range=e,t=Math.sqrt(t[1])-Math.sqrt(t[0]),e=e[1]-e[0],this._ratio=e/t}b1.prototype.map=function(t){t=(Math.sqrt(t)-Math.sqrt(this._domain[0]))*this._ratio;return this._range[0]+t};var _1,w1={sqrt:b1},k1={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}},A1="mouseenter",S1="mouseleave",C1=Object.assign,T1="k-marker",P1="."+T1,M1=((_1=Rb)&&(O1.__proto__=_1),((O1.prototype=Object.create(_1&&_1.prototype)).constructor=O1).prototype.destroy=function(){_1.prototype.destroy.call(this),qe(this.element,"click",this._markerClickHandler),this.clear()},O1.prototype.add=function(t){if(!yt(t))return this._addOne(t);for(var e=0;e<t.length;e++)this._addOne(t[e])},O1.prototype.remove=function(t){t.destroy();t=(this.items||[]).indexOf(t);-1<t&&this.items.splice(t,1)},O1.prototype.clear=function(){for(var t=0;t<this.items.length;t++)this.items[t].destroy();this.items=[]},O1.prototype.update=function(t){var e=t.location();e&&(t.showAt(this.map.locationToView(e)),this.map.trigger("markerActivate",{marker:t,layer:this}))},O1.prototype._reset=function(){_1.prototype._reset.call(this);for(var t=this.items,e=0;e<t.length;e++)this.update(t[e])},O1.prototype.bind=function(t,e){t=L1.create(t,this.options);if(t.dataItem=e,!this.map.trigger("markerCreated",{marker:t,layer:this}))return this.add(t),t},O1.prototype._addOne=function(t){t=L1.create(t,this.options);return t.addTo(this),t},O1.prototype._readData=function(){return this.options.data||[]},O1.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)}},O1.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)},O1.prototype._markerMouseEnter=function(t){t=this._createMarkerEventArgs(t);this.map.trigger("markerMouseEnter",t)},O1.prototype._markerMouseLeave=function(t){t=this._createMarkerEventArgs(t);this.map.trigger("markerMouseLeave",t)},O1.prototype._createMarkerEventArgs=function(t){var e=t.marker;return C1({},{layer:this,layerIndex:this._layerIndex(),marker:e,markerIndex:(this.items||[]).indexOf(e)},t)},O1);function O1(t,e){_1.call(this,t,e),this._markerClickHandler=fb(this._markerClick,this),Ye(this.element,"click",P1,this._markerClickHandler),this.items=[],this._load(this._readData())}e(M1,{zIndex:1e3,autoBind:!0,locationField:"location",titleField:"title",template:""});var L1=function(t){this.options=t||{}},B1=(L1.prototype.destroy=function(){this.layer=null,this.unbindEvents(),this.hide()},L1.prototype.addTo=function(t){this.layer=t.markers||t,this.layer.items.push(this),this.layer.update(this)},L1.prototype.location=function(t){return t?(this.options.location=I.create(t).toArray(),this.layer&&this.layer.update(this),this):I.create(this.options.location)},L1.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)},L1.prototype.hide=function(){this.element&&(this.element.remove(),this.element=null)},L1.prototype.bindEvents=function(){this.element&&(this._mouseEnterHandler=fb(this._mouseEnter,this),Ye(this.element,A1,P1,this._mouseEnterHandler),this._mouseLeaveHandler=fb(this._mouseLeave,this),Ye(this.element,S1,P1,this._mouseLeaveHandler))},L1.prototype.unbindEvents=function(){this.element&&(qe(this.element,A1,this._mouseEnterHandler),qe(this.element,S1,this._mouseLeaveHandler))},L1.prototype.render=function(){var t,e,i,o,r;this.element||(t=this.options,e=this.layer,vt(i=document.createElement("span"),T1),this.options.template?(o=this._compileTemplate(this.options.template)(this.dataItem),o=wb(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())},L1.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())},L1.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()}},L1.prototype._mouseLeave=function(t){t=this._createEventArgs(t);this.layer._markerMouseLeave(t)},L1.prototype._createEventArgs=function(t){return{marker:this,originalEvent:t}},L1.prototype._compileTemplate=function(t){return Vt.compile(t,{paramName:"dataItem",useWithBlock:!1})},L1.create=function(t,e){return t instanceof L1?t:new L1(O({},e,t))},Object.assign);function I1(t){window.requestAnimationFrame(t)}function E1(){this._tickProxy=fb(this._tick,this),this._started=!1}function R1(t){var e="x"===t.axis,i=wb('<div class="km-touch-scrollbar km-'+(e?"horizontal":"vertical")+'-scrollbar" />');H1(this,t,{element:i,elementSize:0,movable:new h1(i),scrollMovable:t.movable,alwaysVisible:t.alwaysVisible,size:e?"width":"height"}),this.scrollMovable.bind(U1,this.refresh.bind(this)),this.container.appendChild(i),t.alwaysVisible&&this.show()}E1.prototype.tick=function(){},E1.prototype.done=function(){},E1.prototype.onEnd=function(){},E1.prototype.onCancel=function(){},E1.prototype.start=function(){this.enabled()&&(this.done()?this.onEnd():(this._started=!0,I1(this._tickProxy)))},E1.prototype.enabled=function(){return!0},E1.prototype.cancel=function(){this._started=!1,this.onCancel()},E1.prototype._tick=function(){this._started&&(this.tick(),this.done()?(this._started=!1,this.onEnd()):I1(this._tickProxy))},(D1=E1)&&(Q1.__proto__=D1),((Q1.prototype=Object.create(D1&&D1.prototype)).constructor=Q1).prototype.done=function(){return this.timePassed()>=this.duration},Q1.prototype.timePassed=function(){return Math.min(this.duration,Ke()-this.startDate)},Q1.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=Ke(),e.start()},Q1.prototype._easeProxy=function(t){var e=this;return function(){e.movable.moveAxis(e.axis,t(e.timePassed(),e.initial,e.delta,e.duration))}},Q1.easeOutExpo=function(t,e,i,o){return t===o?e+i:i*(1-Math.pow(2,-10*t/o))+e};var V1,z1,j1,D1,F1=Q1,H1=Object.assign,N1=Math.abs,U1="change",G1=((j1=E1)&&(Z1.__proto__=j1),((Z1.prototype=Object.create(j1&&j1.prototype)).constructor=Z1).prototype.enabled=function(){return this.movable.scale<this.dimensions.minScale},Z1.prototype.done=function(){return this.dimensions.minScale-this.movable.scale<.01},Z1.prototype.tick=function(){var t=this.movable;t.scaleWith(1.1),this.dimensions.rescale(t.scale)},Z1.prototype.onEnd=function(){var t=this.movable;t.scaleTo(this.dimensions.minScale),this.dimensions.rescale(t.scale)},Z1),W1=((z1=E1)&&(q1.__proto__=z1),((q1.prototype=Object.create(z1&&z1.prototype)).constructor=q1).prototype.onCancel=function(){this.transition.cancel()},q1.prototype.freeze=function(t){this.cancel(),this._moveTo(t)},q1.prototype.onEnd=function(){this.paneAxis.outOfBounds()?this._snapBack():this._end()},q1.prototype.done=function(){return N1(this.velocity)<1},q1.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),z1.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(),z1.prototype.start.call(this)))},q1.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)},q1.prototype._end=function(){this.tapCapture.cancelCapture(),this.end()},q1.prototype._snapBack=function(){var t=this.dimension,t=this.movable[this.axis]>t.max?t.max:t.min;this._moveTo(t)},q1.prototype._moveTo=function(t){this.transition.moveTo({location:t,duration:500,ease:F1.easeOutExpo})},q1),X1=((V1=E1)&&(Y1.__proto__=V1),((Y1.prototype=Object.create(V1&&V1.prototype)).constructor=Y1).prototype.tick=function(){this._updateCoordinates(),this.moveTo(this.origin)},Y1.prototype.done=function(){return N1(this.offset.y)<5&&N1(this.offset.x)<5},Y1.prototype.onEnd=function(){this.moveTo(this.destination),this.callback&&this.callback.call()},Y1.prototype.setCoordinates=function(t,e){this.offset={},this.origin=t,this.destination=e},Y1.prototype.setCallback=function(t){t&&Tt(t)&&(this.callback=t)},Y1.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}},Y1);function Y1(t){V1.call(this,t),H1(this,t,{origin:{},destination:{},offset:{}})}function q1(t){z1.call(this);var e=this;H1(e,t,{transition:new F1({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 Z1(t){j1.call(this,t);H1(this,t),this.userEvents.bind("gestureend",this.start.bind(this)),this.tapCapture.bind("press",this.cancel.bind(this))}function Q1(t){D1.call(this),B1(this,t)}R1.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)},R1.prototype.show=function(){this.element.style.opacity=.7,this.element.style.visibility="visible"},R1.prototype.hide=function(){this.alwaysVisible||(this.element.style.opacity=0)};(K1=ii)&&(J1.__proto__=K1),((J1.prototype=Object.create(K1&&K1.prototype)).constructor=J1).prototype._initOptions=function(t){this.options=O({},this.options,t)},J1.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())},J1.prototype.makeVirtual=function(){this.dimensions.y.makeVirtual()},J1.prototype.virtualSize=function(t,e){this.dimensions.y.virtualSize(t,e)},J1.prototype.height=function(){return this.dimensions.y.size},J1.prototype.scrollHeight=function(){return this.scrollElement.scrollHeight},J1.prototype.scrollWidth=function(){return this.scrollElement.scrollWidth},J1.prototype._resize=function(){this._native||this.contentResized()},J1.prototype.setOptions=function(t){this._initOptions(t),t.pullToRefresh&&this._initPullToRefresh()},J1.prototype.reset=function(){this._native?this.scrollElement.scrollTop(0):(this.movable.moveTo({x:0,y:0}),this._scale(1))},J1.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)},J1.prototype.zoomOut=function(){var t=this.dimensions;t.refresh(),this._scale(t.fitScale),this.movable.moveTo(t.centerCoordinates())},J1.prototype.enable=function(){this.enabled=!0},J1.prototype.disable=function(){this.enabled=!1},J1.prototype.scrollTo=function(t,e){this._native?(this.scrollElement.scrollLeft(N1(t)),this.scrollElement.scrollTop(N1(e))):(this.dimensions.refresh(),this.movable.moveTo({x:t,y:e}))},J1.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())},J1.prototype.pullHandled=function(){},J1.prototype.destroy=function(){qe(this.element,"wheel",this._wheelScrollHandler),this.userEvents&&this.userEvents.destroy()},J1.prototype._scale=function(t){this.dimensions.rescale(t),this.movable.scaleTo(t)},J1.prototype._initPullToRefresh=function(){},J1.prototype._dragEnd=function(){},J1.prototype._paneChange=function(){},J1.prototype._initAxis=function(t){var e=this,i=e.movable,o=e.dimensions[t],r=e.tapCapture,n=e.pane[t],s=new R1({axis:t,movable:i,dimension:o,container:e.element,alwaysVisible:e.options.visibleScrollHints});o.bind(U1,function(){s.refresh()}),n.bind(U1,function(){s.show()}),e[t+"inertia"]=new W1({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})}})};var K1,$1=J1;function J1(t,e){K1.call(this);var r=this;this.element=t,this._initOptions(e);navigator.userAgent;e=(e=Ze().mobileOS).ios||e.android,r._native=r.options.useNative&&e,e=wb('<div class="km-scroll-header"/>');if(r._native)vt(t,"km-native-scroller"),yb(e,t),H1(r,{scrollElement:t,fixedContainer:t.children[0]});else{t.style.overflow="hidden",vt(t,"km-scroll-wrapper");var i=t,o=wb('<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 n1(t),s=new h1(e),a=new a1({element:e,container:t,forcedEnabled:r.options.zoom}),l=this.options.avoidScrolling,h=new wi(t,{touchAction:"none",allowSelection:!0,preventDragEvent:!0,captureUpIfMoved:!0,multiTouch:r.options.zoom,supportDoubleTap:r.options.supportDoubleTap,start:function(t){a.refresh();var e=N1(t.x.velocity),i=N1(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 Yb({movable:s,dimensions:a,userEvents:h,elastic:r.options.elastic}),c=new G1({movable:s,dimensions:a,userEvents:h,tapCapture:n}),u=new X1({moveTo:function(t){r.scrollTo(t.x,t.y)}});s.bind(U1,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),Ye(t,"wheel",this._wheelScrollHandler)),H1(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()}}e($1,{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($1,["pull","scroll","resize"]);function t_(t,e){this.sender=(e=void 0===e?{}:e).sender||t,this.widget=t,this.rtl=Boolean(e.rtl)}t_.prototype.notify=function(t,e){this.widget&&this.widget.trigger(t,e)};let e_=t_;var i_,o_=Math,r_=o_.min,n_=o_.pow,s_=M.geometry.Point,a_="marker",l_="location",h_={bubble:bm,shape:Va,tile:l},_m=(h_[a_]=M1,(i_=ii)&&(f.__proto__=i_),((f.prototype=Object.create(i_&&i_.prototype)).constructor=f).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();qe(this.element,"wheel",this._mousewheelHandler),i_.prototype.destroy.call(this)},f.prototype._init=function(t,e,i,o){void 0===e&&(e={}),void 0===i&&(i={}),void 0===o&&(o={}),this.support=Ze(),this.context=o,this.initObserver(o),this.initServices(o),this._notifyObserver("init"),this._initOptions(e),this._setEvents(e),this.crs=new db,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)},Ye(this.element,"wheel",this._mousewheelHandler)},f.prototype._initOptions=function(t){this.options=O({},this.options,t)},f.prototype._initElement=function(t){vt(this.element=t,"k-map"),t.style.position="relative",t.setAttribute("data-role","map"),gb(t);t=wb("<div />");this.element.appendChild(t)},f.prototype.initServices=function(t){void 0===t&&(t={}),this.widgetService=new e_(this,t)},f.prototype.initObserver=function(t){void 0===t&&(t={}),this.observers=[],this.addObserver(t.observer)},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){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||i_.prototype.trigger.call(this,t,e),o},f.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},f.prototype.zoom=function(t){var e=this.options,t=k(t)?(t=o_.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},f.prototype.center=function(t){var e=t?(t=I.create(t),e=I.create(this.options.center),t.equals(e)||(this.options.center=t.toArray(),this.widgetService.notify(Db,{center:this.options.center}),this._reset()),this):I.create(this.options.center);return e},f.prototype.extent=function(t){t=t?(this._setExtent(t),this):this._getExtent();return t},f.prototype.setOptions=function(t){void 0===t&&(t={});var e=this.element;this.destroy(),gb(e),this._init(e,t,{},this.context),this._reset()},f.prototype.locationToLayer=function(t,e){var i=!this.options.wraparound,t=I.create(t);return this.crs.toPoint(t,this._layerSize(e),i)},f.prototype.layerToLocation=function(t,e){var i=!this.options.wraparound,t=s_.create(t);return this.crs.toLocation(t,this._layerSize(e),i)},f.prototype.locationToView=function(t){var t=I.create(t),e=this.locationToLayer(this._viewOrigin);return this.locationToLayer(t).translateWith(e.scale(-1))},f.prototype.viewToLocation=function(t,e){var i=this.locationToLayer(this._getOrigin(),e),t=s_.create(t).clone().translateWith(i);return this.layerToLocation(t,e)},f.prototype.eventOffset=function(t){var e,i=re(this.element);return t=t.x&&t.x[l_]||t.y&&t.y[l_]?(e=t.x[l_]-i.left,t.y[l_]-i.top):(t=t.originalEvent||t,e=b(t.pageX,t.clientX)-i.left,b(t.pageY,t.clientY)-i.top),new M.geometry.Point(e,t)},f.prototype.eventToView=function(t){t=this.eventOffset(t);return this.locationToView(this.viewToLocation(t))},f.prototype.eventToLayer=function(t){return this.locationToLayer(this.eventToLocation(t))},f.prototype.eventToLocation=function(t){t=this.eventOffset(t);return this.viewToLocation(t)},f.prototype.viewSize=function(){var t=this.element,e=this._layerSize(),i=t.clientWidth;return{width:i=this.options.wraparound?i:r_(e,i),height:r_(e,t.clientHeight)}},f.prototype.exportVisual=function(){return this._reset(),!1},f.prototype.hideTooltip=function(){this._tooltip&&this._tooltip.hide()},f.prototype._setOrigin=function(t,e){var i=this.viewSize(),t=this._origin=I.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(Db,{center:this.options.center}),this},f.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},f.prototype._setExtent=function(t){var e=jb.create(t),i=e.se.clone(),o=(this.options.wraparound&&i.lng<0&&0<t.nw.lng&&(i.lng=180+(180+i.lng)),new jb(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=o_.abs(l.x-a.x),l=o_.abs(l.y-a.y);if(h<=r&&l<=n)break}this.zoom(s)},f.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 jb(t,i)},f.prototype._zoomAround=function(t,e){this._setOrigin(this.layerToLocation(t,e),e),this.zoom(e)},f.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))},f.prototype._createControlElement=function(t,e){var i,t=t.position||e,e="."+bb(t).replace(" ","."),e=this.element.querySelector(".k-map-controls"+e)||[],t=(0===e.length&&(vt(i=document.createElement("div"),"k-map-controls "+bb(t)),this.element.appendChild(e=i)),document.createElement("div"));return e.appendChild(t),t},f.prototype._createAttribution=function(t){var e=this._createControlElement(t,"bottomRight");this.attribution=new kb(e,t)},f.prototype._createNavigator=function(t){var e=this._createControlElement(t,"topLeft"),e=this.navigator=new Pb(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)},f.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)},f.prototype._navigatorCenter=function(){this.center(this.options.center)},f.prototype._createZoomControl=function(t){var e=this._createControlElement(t,"topLeft"),e=this.zoomControl=new Bb(e,t,this.options.icons);this._zoomControlChange=this._zoomControlChange.bind(this),e.bind("change",this._zoomControlChange)},f.prototype._zoomControlChange=function(t){this.trigger("zoomStart",{originalEvent:t})||(this.zoom(this.zoom()+t.delta),this.trigger("zoomEnd",{originalEvent:t}))},f.prototype._initScroller=function(){var t=this.support.mobileOS?.93:.9,e=!1!==this.options.zoomable,t=this.scroller=new $1(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},f.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)}},f.prototype._createLayer=function(t){var e=t.type||"shape",i=this.options.layerDefaults[e],i=e===a_?O({},this.options.markerDefaults,t,{icons:this.options.icons}):O({},i,t),t=new h_[e](this,i);return e===a_&&(this.markers=t),t},f.prototype._createTooltip=function(){return new Eb(this.widgetService,this.options.tooltip)},f.prototype._initMarkers=function(){0<(this.options.layers||[]).filter(function(t){return t&&t.type===a_}).length||(this.markers=new M1(this,O({},this.options.markerDefaults,{icons:this.options.icons})),this.markers.add(this.options.markers))},f.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()})},f.prototype._scrollEnd=function(t){this._scrollOffset&&this._panComplete()&&(this._scrollOffset=null,this._panEndTimestamp=Ke(),this.trigger("panEnd",{originalEvent:t,origin:this._getOrigin(),center:this.center()}))},f.prototype._panComplete=function(){return 50<Ke()-(this._panEndTimestamp||0)},f.prototype._scaleStart=function(t){this.trigger("zoomStart",{originalEvent:t})&&(t=t.touches[1])&&t.cancel()},f.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})},f.prototype._scaleToZoom=function(t){t=this._layerSize()*t/this.options.minSize,t=o_.log(t)/o_.log(2);return o_.round(t)},f.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")},f.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=n_(2,this.options.minZoom-n),t.dimensions.maxScale=n_(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}},f.prototype._renderLayers=function(){},f.prototype._layerSize=function(t){t=b(t,this.options.zoom);return this.options.minSize*n_(2,t)},f.prototype._tap=function(t){var e;this._panComplete()&&(e=this.eventOffset(t),this.hideTooltip(),this.trigger("click",{originalEvent:t,location:this.viewToLocation(e)}))},f.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}))},f.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}))},f.prototype._toDocumentCoordinates=function(t){var e=re(this.element);return{left:L(t.x+e.left),top:L(t.y+e.top)}},f);function f(t,e,i,o){void 0===e&&(e={}),void 0===i&&(i={}),void 0===o&&(o={}),i_.call(this),this._init(t,e,i,o)}e(_m,{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(_m,["beforeReset","click","markerActivate","markerClick","markerCreated","markerMouseEnter","markerMouseLeave","pan","panEnd","reset","shapeClick","shapeCreated","shapeFeatureCreated","shapeMouseEnter","shapeMouseLeave","zoomEnd","zoomStart"]);let p_=_m;function c_(t,e){return t.map(e).reduce(function(t,e){return t+e},0)}function u_(t,e){return g_(t.source,e.source)}function d_(t,e){return g_(t.target,e.target)}function f_(t){return t.value}var g_=function(t,e){return t.y0===e.y0?t.index-e.index:t.y0+t.y1-e.y0-e.y1};function y_(t){t.forEach(function(t){t.targetLinks.forEach(function(t){t.source.sourceLinks.sort(d_)}),t.sourceLinks.forEach(function(t){t.target.targetLinks.sort(u_)})})}function v_(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 m_(t){return new v_(t).calculate()}v_.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})},v_.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)})},v_.prototype.calculateNodeValues=function(t){t.forEach(function(t){t.value=Math.max(c_(t.sourceLinks,f_),c_(t.targetLinks,f_))})},v_.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}},v_.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},v_.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},v_.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)/c_(t,f_)}));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(y_)},v_.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})},v_.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})})},v_.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,y_([i])}),r.sort(g_),this.arrangeNodesVertically(r)}},v_.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,y_([i])})(o);s.sort(g_),this.arrangeNodesVertically(s)}},v_.prototype.arrangeNodesVertically=function(t){var e=t.length-1;this.arrangeUp(t,this.height,e),this.arrangeDown(t,this.offsetY,0)},v_.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}},v_.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}},v_.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},v_.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 x_(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 b_(t){this.options=O({},this.options,t),this.createVisual()}function __(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 w_(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}b_.prototype.createVisual=function(){this.visual=this.createElement()},b_.prototype.exportVisual=function(){return this.visual},b_.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()},b_.prototype.getSender=function(){return this},(S_=b_)&&(E_.__proto__=S_),((E_.prototype=Object.create(S_&&S_.prototype)).constructor=E_).prototype.getElement=function(){return M.drawing.Path.fromRect(this.getRect(),this.visualOptions())},E_.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])},E_.prototype.getLabelText=function(t){var e=t.labels.ariaTemplate;if(e)return e({node:t.node})},E_.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}},E_.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},E_.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)},E_.prototype.blur=function(){this._highlight&&(this._highlight.options.set("visible",!1),this.visual.options.set("id",""),this.options.root())&&this.options.root().removeAttribute(X)};var k_,A_,S_,C_=E_,T_=((A_=b_)&&(I_.__proto__=A_),((I_.prototype=Object.create(A_&&A_.prototype)).constructor=I_).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])},I_.prototype.getLabelText=function(t){var e=t.labels.ariaTemplate;if(e)return e({link:t.link})},I_.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}},I_.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,w_(u,u,s,s,.5)],g=[w_(p,d,d,c,.4999),w_(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,w_(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]))},I_.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)},I_.prototype.blur=function(){this._highlight&&(this._highlight.options.set("visible",!1),this.visual.options.set("id",""),this.options.root())&&this.options.root().removeAttribute(X)},I_),P_="inside",M_="before",O_="after",L_=((k_=b_)&&(B_.__proto__=k_),((B_.prototype=Object.create(k_&&k_.prototype)).constructor=B_).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!==P_&&(l=l===M_?O_:M_),e.visible&&n?(e=new B(i.x0,i.y0,i.x1,i.y1),t=this.visualOptions(),a&&!t.align&&(t.align="right"),(n=new uo(n,t)).reflow(new B),t=n.box,e=e.center().y-t.height()/2,r=i.x1+t.width()>r,o=i.x0-t.width()<o,r=l===M_||l===P_&&r?M_:O_,a=[(r=a?l===O_||l===P_&&o?O_:M_:r)===M_?i.x0-t.width():i.x1,e],(l=new B(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},B_.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}},B_);function B_(){k_.apply(this,arguments)}function I_(){A_.apply(this,arguments)}function E_(){S_.apply(this,arguments)}e(L_,{position:P_});function R_(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})}(V_=b_)&&(j_.__proto__=V_),((j_.prototype=Object.create(V_&&V_.prototype)).constructor=j_).prototype.getElement=function(){var t=this.options,e=t.drawingRect,i=t.text;return!1!==t.visible&&i?((i=vo.buildTitle(i,t)).reflow(e),i.renderVisual(),i.visual):null},j_.prototype.createElement=function(){return this.getElement()};var V_,z_=j_;function j_(){V_.apply(this,arguments)}e(z_,{align:_,border:{width:0},margin:w(5),padding:w(5)});function D_(t,e){return t.node.x0-e.node.x0!=0?t.node.x0-e.node.x0:t.node.y0-e.node.y0}function F_(t,e){return t.node.x1-e.node.x1!=0?t.node.x1-e.node.x1:e.node.y0-t.node.y0}(H_=b_)&&(U_.__proto__=H_),((U_.prototype=Object.create(H_&&H_.prototype)).constructor=U_).prototype.getElement=function(){var i,t,e=this.options,o=e.drawingRect,r=e.rtl,n=e.nodes,s=(void 0===n&&(n=[]),e.item),a=e.position;return!1!==e.visible&&n.length?((t=e.labels||{}).content&&(i=zt(t)),(t=n.map(function(t){var e=t.label&&t.label.text||"";return{text:i?i({text:e,node:t}):e,area:{background:void 0!==s.areaBackground?s.areaBackground:t.color,opacity:void 0!==s.areaOpacity?s.areaOpacity:t.opacity},node:t}})).sort(r?F_:D_),n=r&&a!==C&&a!==T,(a=new $c(Object.assign({},e,{data:t,reverse:n}),{rtl:r})).reflow(o),a.renderVisual(),a.visual):null},U_.prototype.createElement=function(){return this.getElement()};var H_,N_=U_;function U_(){H_.apply(this,arguments)}e(N_,{markers:{visible:!1},item:{type:Hn,cursor:ft,opacity:1},position:S,align:_,accessibility:{role:"presentation",ariaLabel:null,ariaRoleDescription:null},border:{width:0}});var G_,W_="link",X_="node",Y_=((G_=ii)&&(E.__proto__=G_),((E.prototype=Object.create(G_&&G_.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 G_.prototype.trigger.call(this,t,e)},E.prototype._mouseenter=function(t){var e=t.element,i=e.type===W_,o=e.type===X_,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===W_,r=i.type===X_,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!==W_&&l!==X_||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===X_&&(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===W_,r=this._focusState||{};e.type===X_?(!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 z_(Object.assign({},{drawingRect:e},t)).exportVisual().chartElement.box:null},E.prototype.legendBox=function(t,e,i){return t&&!1!==t.visible?new N_(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 B(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===P?(p.unpad({top:u}),new B(0,u,o.width,o.height)):(p.shrink(0,u),new B(0,0,o.width,o.height-u))),this.legendBox(i,r.nodes,c)),u=i&&i.position||N_.prototype.options.position,r=(e&&(u===C&&p.unpad({left:e.width()}),u===T&&p.shrink(e.width(),0),u===P&&p.unpad({top:e.height()}),u===S)&&p.shrink(0,e.height()),m_(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 B,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=__(t,n,a,e),e=new C_(i),i=(d.wrap(no(e.exportVisual().rawBBox())),new L_(R_(t,s,l,f,g)).exportVisual());i&&d.wrap(no(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:m_(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 b=m_(Object.assign({},o,{offsetX:y,offsetY:v,width:m,height:x,autoLayout:!1})).columns.length,_=[],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=x_((p=r).x0,p.y0,p.x1,p.y1,s.x1,s.y1),l=x_(p.x0,p.y0,p.x1,p.y1,s.x0,s.y0),h=x_(p.x0,p.y0,s.x0,s.y0,s.x1,s.y1),p=x_(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})(m_(Object.assign({},o,{offsetX:y,offsetY:v,width:m,height:x,loops:2,targetColumnIndex:t,reverse:e})).links);return _.push({crosses:i,reverse:e,targetColumnIndex:t}),0===i},k=1;k<=b-1&&!w(k,!1)&&!w(k,!0);k++);var A=Math.min.apply(null,_.map(function(t){return t.crosses})),u=_.find(function(t){return t.crosses===A});this.permutation={targetColumnIndex:u.targetColumnIndex,reverse:u.reverse}}return{sankey:m_(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,b=x.width,x=x.height,_=Object.assign({},m,{width:b,height:x,nodesOptions:a,title:e,legend:g}),_=this.calculateSankey(_,t),t=_.sankey,w=_.titleBox,_=_.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],[b,x]))}));return w&&(S=new z_(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=__(t,a,f,e),o=(i.root=function(){return u.element},i.navigatable=!0!==v,new C_(i)),r=o.exportVisual();r.links=[],r.type=X_,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)}),b=A.slice().sort(function(t,e){return e.value-t.value}),c=[],u.linksVisuals=c,b.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 T_(n)),a=s.exportVisual();a.type=W_,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=R_(t,s,y,i,n),t=new L_(t).exportVisual();t&&C.append(t)}),_&&(x=new N_(Object.assign({},g,{rtl:y,drawingRect:_,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),wm={opacity:1,width:2,color:Y};function E(t,e,i){G_.call(this),this._initTheme(i),this._setOptions(e),this._initElement(t),this._initSurface(),e&&e.data&&(this._redraw(),this._initResizeObserver(),this._initNavigation(t))}e(Y_,{title:{position:P},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({},wm)},labels:{ariaTemplate:function(t){return t.node.label.text}}},links:{colorType:"static",opacity:.4,highlight:{opacity:.8,inactiveOpacity:.2},focusHighlight:{border:Object.assign({},wm)},labels:{ariaTemplate:function(t){t=t.link;return t.source.label.text+" to "+t.target.label.text}}},tooltip:{followPointer:!1,delay:200}});var q_=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}),Z_="12px",xm=[{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"}}],Q_=xm[0].value,K_="scatter",$_=["column","bar","line",K_],J_={type:"line",width:0};function t0(t){return t&&$_.includes(t)}var ks=["string","date","number"],Tm=["number"],e0={bar:[{axisType:"category",types:ks},{axisType:"value",types:Tm}],column:[{axisType:"category",types:ks},{axisType:"value",types:Tm}],line:[{axisType:"category",types:ks},{axisType:"value",types:Tm}],pie:[{axisType:"category",types:ks},{axisType:"value",types:Tm,count:1}],scatter:[{axisType:"category",types:ks},{axisType:"value",types:Tm}]};function i0(t,e){return((e||"")+" "+(t||"")).trim()}function o0(t){var e=(t||"").indexOf(" ");return{size:t&&t.substring(0,e),name:t&&t.substring(e+1)}}function r0(t,e,i){return i=o0(i).size,t?i0(t,i||e):""}function n0(t,e,i){return i=o0(i).name,t?i0(i||e,t):""}function s0(o,r,t){var n,e,i,s,a=u0(),l=(a.seriesType=r,a.data=o||[],a.legend={visible:!0,position:"bottom"},e0[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):p0(o,i)),t=l.filter(function(t){return"value"===t.axisType}),(i=c0(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===K_?J_:{}))}),l=-1<e?o.map(function(t){return String(l0(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 a0(t,e,i){var o,r,n,s,a,l=u0(),h=(l.seriesType=e,l.data=t||[],e0[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):p0(t,n)),n=h.filter(function(t){return"value"===t.axisType}),s=[],(s=i&&i.valueAxis?[o.indexOf(i.valueAxis)]:c0(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 l0=function(t){return null!=t},h0=function(r){var t=structuredClone(r[0]);return t.forEach(function(t,e){if(!l0(t.value))for(var i=0;i<r.length;i++){var o=r[i][e].value;if(l0(o)){t.value=o;break}}}),t},p0=function(i,t){var o=[],e=h0(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)},c0=function(t,e){var o=[],r=h0(t);return e.forEach(function(t){t.types.forEach(function(i){r.forEach(function(t,e){typeof t.value===i&&o.push(e)})})}),o},u0=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 d0(t,e){return(t0(e)?s0:a0)(t,e)}function f0(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})&&t0(i.seriesType)&&t0(t.seriesType)&&i.series.forEach(function(t){t.labels=t.labels||{},t.labels.visible=!0}),i}function g0(t,e,i){var o=Object.assign({},t);switch(e){case R.seriesType:return d0(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&&t0(o.seriesType)?f0(o,s0(o.data,o.seriesType,{categoryAxis:i})):"pie"===o.seriesType?f0(o,a0(o.data,o.seriesType,{categoryAxis:i})):o;case R.valueAxisY:return"pie"===o.seriesType?f0(o,a0(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:r0(i,"20px",o.title&&o.title.font)}),o;case R.titleFontSize:return o.title=Object.assign({},o.title,{font:n0(i,Q_,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:r0(i,"16px",o.subtitle&&o.subtitle.font)}),o;case R.subtitleFontSize:return o.subtitle=Object.assign({},o.subtitle,{font:n0(i,Q_,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:r0(i,Z_,r.labels&&r.labels.font)})}),o;case R.legendFontSize:r=o.legend||{};return o.legend=Object.assign({},r,{labels:Object.assign({},r.labels,{font:n0(i,Q_,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:r0(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:n0(i,Q_,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:r0(i,Z_,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:n0(i,Q_,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=l0(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:r0(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:n0(i,Q_,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:r0(i,Z_,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:n0(i,Q_,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=l0(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 y0(t,e){return parseFloat(X0(t).getPropertyValue(e))}function v0(t){for(var e=X0(t),i=[],o=1,r=e.getPropertyValue(""+W0+o);r||o<=30;)i.push(r),r=e.getPropertyValue(""+W0+ ++o);return i}function m0(t){return Z0(t,"--kendo-chart-pane-title-font-weight","--kendo-chart-pane-title-font-size","--kendo-font-family")}function x0(t){return{color:K0(t),font:Z0(t,"--kendo-font-weight","--kendo-chart-title-font-size","--kendo-font-family")}}var Sm=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"}),b0=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=d0(t,i&&i.seriesType||e);return void 0!==(i&&i.stack)?g0(t,R.stacked,i.stack):t},createState:d0,fontNames:xm,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:t0,mergeStates:f0,parseFont:o0,updateState:g0,messages:Sm}),_0=1.5,w0=.4,k0="#000",$="Arial, Helvetica, sans-serif",A0="11px "+$,S0="12px "+$,C0="16px "+$,T0="transparent",P0="#fff",M0={type:Jn},O0={type:Hn},L0=Object.assign({},O0,{markers:{visible:!1},highlight:{visible:!1}}),B0=function(){return{icon:{border:{width:1}},label:{font:S0,padding:3},line:{length:10,width:2},legendItem:L0,visible:!0}},I0=function(){return{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},legendItem:O0,opacity:.4}},E0=function(){return{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},legendItem:O0,opacity:.4}},R0=function(){return{outliersField:"",meanField:"",border:{_brightness:.8,width:1},downColor:P0,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:L0}},V0=function(){return{gap:_0,spacing:w0,target:{color:"#ff0000"},legendItem:L0}},z0=function(){return{width:2,legendItem:M0}},j0=function(){return{line:{opacity:1,width:0},markers:{size:6,visible:!1},legendItem:O0,opacity:.5}},D0=function(){return{markers:{visible:!1},legendItem:M0,width:2}},F0=function(){return{gap:.5,line:{color:k0,width:1},legendItem:L0,spacing:w0}},H0=function(){return{labels:{background:"",color:"",padding:{top:5,bottom:5,left:7,right:7}},legendItem:L0}},N0=H0,U0=function(t){return Object.assign({color:ot,trendline:{},markers:{visible:!1},width:1,dashType:"longDash",legendItem:M0},t)},G0=function(t){return void 0===t&&(t={}),{axisDefaults:{labels:{font:S0},notes:B0(),title:{font:C0,margin:5}},categoryAxis:{majorGridLines:{visible:!0}},navigator:{pane:{height:90,margin:{top:10}}},seriesDefaults:{visible:!0,labels:{font:A0},overlay:t.gradients?{}:{gradient:"none"},area:I0(),rangeArea:E0(),verticalRangeArea:E0(),bar:{gap:_0,spacing:w0,legendItem:L0},boxPlot:R0(),bubble:{border:{width:0},labels:{background:T0},legendItem:L0,opacity:.6},bullet:V0(),candlestick:{border:{_brightness:.8,width:1},downColor:P0,gap:1,highlight:{border:{opacity:1,width:2},line:{width:2}},line:{color:k0,width:1},legendItem:L0,spacing:.3},column:{gap:_0,spacing:w0,legendItem:L0},heatmap:{labels:{color:"",background:T0,visible:!0},highlight:{border:{width:0}},legendItem:L0},pie:{labels:{background:"",color:"",padding:{top:5,bottom:5,left:7,right:7}},legendItem:L0},donut:{margin:1,legendItem:L0},funnel:H0(),pyramid:N0(),horizontalWaterfall:F0(),line:z0(),notes:B0(),ohlc:{gap:1,highlight:{line:{opacity:1,width:3}},line:{width:1},legendItem:L0,spacing:.3},radarArea:j0(),radarLine:D0(),radarColumn:{legendItem:L0},polarArea:j0(),polarLine:D0(),polarScatter:{legendItem:M0},rangeBar:{gap:_0,spacing:w0,legendItem:L0},rangeColumn:{gap:_0,spacing:w0,legendItem:L0},scatter:{legendItem:M0},scatterLine:{width:1,legendItem:M0},verticalArea:I0(),verticalBoxPlot:R0(),verticalBullet:V0(),verticalLine:z0(),waterfall:F0(),linearTrendline:U0(),exponentialTrendline:U0({style:"smooth"}),logarithmicTrendline:U0({style:"smooth"}),polynomialTrendline:U0({style:"smooth"}),powerTrendline:U0({style:"smooth"}),movingAverageTrendline:U0()},title:{font:C0},subtitle:{font:S0},legend:{labels:{font:S0}}}},W0="--kendo-chart-series-",X0=function(t){return t.ownerDocument.defaultView.getComputedStyle(t)},Y0={},q0=function(t,e){var i,o,r,e=X0(t).getPropertyValue(e);return/^color-mix/i.test(e)&&(t=t,e=Y0[i=e]||(o=t.style.color,t.style.color=i,r=X0(t).color,t.style.color=o,Y0[i]=r)),e},Z0=function(t,e,i,o){t=X0(t);return[t.getPropertyValue(e),t.getPropertyValue(i),t.getPropertyValue(o)||t.fontFamily].join(" ")},Q0=function(t){return Z0(t,"--kendo-font-weight","--kendo-chart-font-size","--kendo-font-family")},K0=function(t){return q0(t,"--kendo-chart-text")},$0=function(t){var e=K0(t);return{labels:{color:e,font:Q0(t)},title:{color:e}}},J0=function(t){var e=K0(t);return{pointer:{color:q0(t,"--kendo-chart-gauge-pointer")},scale:{labels:{color:e},rangePlaceholderColor:q0(t,"--kendo-chart-gauge-track"),minorTicks:{color:e},majorTicks:{color:e},line:{color:e}}}},tw=function(t){return{labels:{color:K0(t),font:Q0(t),stroke:{color:q0(t,"--kendo-chart-bg")}},links:{color:q0(t,"--kendo-color-subtle")},nodeColors:v0(t),title:x0(t),legend:$0(t)}},ew=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:y0(t,"--kendo-chart-area-inactive-opacity")}}}function r(){return{highlight:{inactiveOpacity:y0(t,"--kendo-chart-line-inactive-opacity")}}}function n(){return{target:{color:h}}}var s,a,l=q0(t,"--kendo-chart-major-lines"),h=q0(t,"--kendo-chart-text"),p=Z0(t,"--kendo-font-weight","--kendo-chart-label-font-size","--kendo-font-family"),c=q0(t,"--kendo-chart-bg"),u={icon:{background:q0(u=t,"--kendo-chart-notes-bg"),border:{color:q0(u,"--kendo-chart-notes-border")}},line:{color:q0(u,"--kendo-chart-notes-lines")},label:{font:Q0(u)}},d=y0(t,"--kendo-chart-area-opacity"),f=q0(t,"--kendo-color-surface"),g=q0(t,"--kendo-chart-primary-bg");return{axisDefaults:{crosshair:{color:q0(t,"--kendo-chart-crosshair-bg")},labels:{color:h,font:p},line:{color:l},majorGridLines:{color:l},minorGridLines:{color:q0(t,"--kendo-chart-minor-lines")},notes:structuredClone(u),title:{color:h,font:Q0(t)}},chartArea:{background:c},legend:(a=q0(s=t,"--kendo-chart-inactive"),Object.assign({},{inactiveItems:{labels:{color:a},markers:{color:a}}},$0(s))),seriesColors:v0(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:q0(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:m0(t)},title:x0(t),paneDefaults:{title:{font:m0(t)}}}};return D})())}}});